
    &g#              
          S SK JrJrJrJr  SSKJrJr  SSKJ	r	J
r
JrJr  SSKJr  SSKJr  SSKJr  SSKJrJrJr  SS	KJr   " S
 S\5      r\S:X  Ga  S SKJr  S SKJr  S SKJ r   S SK!J"r"  S SK#J$r$  \$" SS/S9r%\%RM                  SSSS9  \%RM                  SSS9  \%RM                  SSSS9  \%RO                  S S!S"5        \%RO                  S#S$S%5        \%RO                  S&S'S(5        \%RO                  S)S*S+5        S,r(\"" \(S-S.SS/9r)\" S05      r*\" S1SSS29r+\+RY                  S3S4S59r-\-RY                  S6S7S59r.\.RY                  \" S8\)5      5        \.RY                  \" S9\ " \*SS:95      5        \-RY                  S;S<S59r/S\/l0        \ Rb                  " S=S4S:9r2\/RY                  \" S>\25      5        \/RY                  \" S?\%5      5        \	" 5       r\Rg                  \+5        g@g@)A    )IteratorListOptionalTuple   )
loop_first	loop_last)ConsoleConsoleOptionsRenderableTypeRenderResult)JupyterMixin)Measurement)Segment)Style
StyleStack	StyleType)Styledc                       \ rS rSrSrSSSSSS.S\S	\S
\S\S\S\SS4S jjrSSSSS.S\S	\	\   S
\	\   S\S\	\   SS 4S jjr
      SS jr      SS jrSrg)Tree   a  A renderable for a tree structure.

Args:
    label (RenderableType): The renderable or str for the tree label.
    style (StyleType, optional): Style of this tree. Defaults to "tree".
    guide_style (StyleType, optional): Style of the guide lines. Defaults to "tree.line".
    expanded (bool, optional): Also display children. Defaults to True.
    highlight (bool, optional): Highlight renderable (if str). Defaults to False.
treez	tree.lineTF)styleguide_styleexpanded	highlight	hide_rootlabelr   r   r   r   r   returnNc                Z    Xl         X l        X0l        / U l        X@l        XPl        X`l        g N)r   r   r   childrenr   r   r   )selfr   r   r   r   r   r   s          N/home/matz/Project1/venv/lib/python3.13/site-packages/pip/_vendor/rich/tree.py__init__Tree.__init__   s*     

&$& ""    r   r   r   r   c                    [        UUc  U R                  OUUc  U R                  OUUUc  U R                  OUS9nU R                  R                  U5        U$ )a  Add a child tree.

Args:
    label (RenderableType): The renderable or str for the tree label.
    style (StyleType, optional): Style of this tree. Defaults to "tree".
    guide_style (StyleType, optional): Style of the guide lines. Defaults to "tree.line".
    expanded (bool, optional): Also display children. Defaults to True.
    highlight (Optional[bool], optional): Highlight renderable (if str). Defaults to False.

Returns:
    Tree: A new child Tree, which may be further modified.
r(   )r   r   r   r   r"   append)r#   r   r   r   r   r   nodes          r$   addTree.add)   sX    *  %$**5,7,?(([(1(9dnny
 	T"r'   c           
   #   H  ^^^^#    / nUR                   nUR                  n[        R                  " 5       nUR                  n[
        R                  " 5       nU" U R                  SS9=(       d    Un	[        S5      u  ppSm/ SQm[        mS[        S[
        S[        4UUUU4S	 jjnU" X5      /nU" [        [        U /5      5      5        [        U" U R                  5      5      n[        U" U R                  5      5      n[        S
S
S9nSnU(       Ga  U" 5       n [        U5      u  nnU" U5        U(       a!  U" XS   R                  =(       d    U5      US'   UR                   U" UR                  5      -   n	UR                   U" UR                  5      -   nXR"                  (       a  SOSS  nUR%                  ['        UR(                  U5      TR+                  TR,                  [/        S U 5       5      -
  U R0                  S S9TR2                  S LS9nUS:X  a  U R"                  (       d  [5        U5       H{  u  nnU(       a#  TR7                  UUR8                  US9 S h  vN   U S h  vN   Uv   U(       d  MG  U(       d  MP  U" U(       a  U
OUUS   R                  =(       d    U5      US'   M}     UR:                  (       a  UR<                  (       a  U" U(       a  U
OUUS   R                  =(       d    U5      US'   UR                  U" [?        UR<                  5      S:X  a  UOUU	5      5        URA                  U" UR                  5      5        URA                  U" UR                  5      5        U" [        [        UR<                  5      5      5        US-  nU(       a  GM  g g ! [         a_    UR                  5         U(       aC  US   R                  =(       d    Un	U" X5      US'   UR                  5         UR                  5          GM
  f = f GN GN7f)N )default   )    z|   z+-- z`-- ))r2   u   │   u
   ├── u
   └── )r2   u   ┃   u
   ┣━━ u
   ┗━━ )r2   u   ║   u
   ╠══ u
   ╚══ indexr   r   c                    > TR                   (       a  TU    nOCUR                  (       a  SOUR                  (       a  SOSnTTR                  (       a  SOU   U    nT" X!5      $ )z.Make a Segment for a level of the guide lines.r      r   )
ascii_onlybold
underline2legacy_windows)r3   r   lineguideASCII_GUIDESTREE_GUIDES_Segmentoptionss       r$   
make_guide)Tree.__rich_console__.<locals>.make_guide]   sQ    !!#E*"ZZ53C3Ca"(>(>1EJ5QD((r'   F)r7   r8   r   r5   r   c              3   8   #    U  H  oR                   v   M     g 7fr!   )cell_length).0levels     r$   	<genexpr>(Tree.__rich_console__.<locals>.<genexpr>   s     @++s   )widthr   height)pad)
post_style)!popr*   r   r:   	get_styler   nullr   rangeintiterr	   r   r   nextStopIterationcurrentr   render_linesr   r   update	max_widthsumr   justifyr   apply_stylebackground_styler   r"   lenpush)r#   consoler?   stackrM   r^   new_linerN   
null_styler   SPACECONTINUEFORKENDr@   levelsguide_style_stackstyle_stackremove_guide_stylesdepth
stack_nodelastr+   r   prefixrenderable_linesfirstr:   r<   r=   r>   s     `                         @@@r$   __rich_console__Tree.__rich_console__H   s     46ii||<<>%%	ZZ\
 0 0"=K%*1X"7

 	)c 	)% 	)G 	) 	) ",H!B CT)TF#$%&y1A1A'BC 4::!67#5AJ	!*-
d 'BZ-=-=-KLr
+33i@P@P6QQK'')DJJ*??E..Qa:;F&33tzz5)!++@@@A"nn	   OO4/  4 	  QJ4>>#-.>#?KE4#+#7#7"!22': $8 $  
  $OO"Nu%/%)Ex9I9I9WZ&r
 $@ }}'!Ex1A1A1OZr
 c$--&8A&=s4U   4::!67!&&y1A1A'BCT)DMM234
o e ! 

"(*"2"2"@jK!+D!>F2J%))+OO%:
 $s]   DP"N0 ,D9P"%P&	P"/P0P"P"
D!P".P"0A$PP"PP"P"c                     [        U /5      /nUR                  nUR                  nSnSn[        R                  nSn	U(       a  U" 5       n
 [        U
5      nU" U
5        U" XUR                  5      u  pU	S-  n[        X-   U5      n[        X-   U5      nUR                  (       a1  UR                  (       a   U" [        UR                  5      5        U	S-  n	U(       a  M  [        Xg5      $ ! [         a	    U	S-  n	 M  f = f)Nr   r   r1   )rR   rM   r*   r   getrS   rT   r   maxr   r"   )r#   r_   r?   r`   rM   r^   minimummaximummeasurerF   	iter_treer   min_measuremax_measureindents                  r$   __rich_measure__Tree.__rich_measure__   s     (,TF|nii||//II O'.w'L$KQYF+.8G+.8G}}T$--()
 e 7,, ! 
s   C* *C=<C=)r"   r   r   r   r   r   r   )r_   r
   r?   r   r   r   )r_   r
   r?   r   r   r   )__name__
__module____qualname____firstlineno____doc__r   r   boolr%   r   r,   rq   r}   __static_attributes__ r'   r$   r   r      s     "!,## 	#
 # # # # 
#, &*+/$) 	"	
 i(  D> 
>^ ^+;^	^@- -+;-	-r'   r   __main__)Group)Markdown)Panel)Syntax)Tabler/   dim)
row_stylesReleasedcyanT)r   no_wrapTitlemagenta)r   z
Box Officerightgreen)rZ   r   zDec 20, 2019z Star Wars: The Rise of Skywalkerz$952,110,690zMay 25, 2018zSolo: A Star Wars Storyz$393,151,347zDec 15, 2017z!Star Wars Ep. V111: The Last Jediz$1,332,539,889zDec 16, 2016zRogue One: A Star Wars Storyz$1,332,439,889zmclass Segment(NamedTuple):
    text: str = ""
    style: Optional[Style] = None
    is_control: bool = False
pythonmonokai)themeline_numbersz=### example.md
> Hello, World!
>
> Markdown _all_ the things
u   🌲 [b green]Rich Tree)r   r   z:file_folder: Renderablesred)r   z!:file_folder: [bold yellow]Atomiczuu greenu   📄 Syntaxu   📄 Markdown)border_stylez&:file_folder: [bold magenta]Containerszbold magentazJust a panelu   📄 Panelsu   📄 [b magenta]TableN)4typingr   r   r   r   _loopr   r	   r_   r
   r   r   r   jupyterr   rx   r   segmentr   r   r   r   r   styledr   r   r   pip._vendor.rich.consoler   pip._vendor.rich.markdownr   pip._vendor.rich.panelr   pip._vendor.rich.syntaxr   pip._vendor.rich.tabler   table
add_columnadd_rowcodesyntaxmarkdownrootr,   r+   simple_nodecontainers_noder   fitpanelprintr   r'   r$   <module>r      s   2 2 ( J J !    / / u-< u-p z.2,.,b%[)E	Zvt<	WI.	\7'B	MM."DnU	MM.";^L	MM."EGWX	MM."@BRSD D()$GF	H )TTJD88/U8CD((>J(WKOOE-01OOE/5+PQRhh0n  O  $OIIn59EmU345u=>iGMM$k r'   