+
     h  c                   s   ^ RI t ^ RIt^ RIt^ RIt^ RIHtHt ^ RIHt ^ RI	H
t
Ht ^ RIHt ^ RI HtHt ^ RIHt ^ RIHt ^ R	IHt ^ R
IHtHt ^ RIHtHtHt ^ RIHt ^ RIHtHtH t H!t!H"t"H#t#H$t$H%t%H&t&H't'H(t(H)t)H*t*H+t+H,t,H-t-H.t.H/t/ ]P`                  R8  d   ^ RIH1t1 M^ RI2H1t1 ]P`                  R8  d   ^ RIH3t3 M^ RI2H3t3 ^RI4H5t5H6t6 ^RI7H8t8H9t9H:t:H;t; ^RI<H=t= ^RI>H?t? ^RI@HAtA ^RIBHCtC ^RIDHEtE ^RIFHGtG ^RIHHItIHJtJ ^RIKHLtLHMtM ](! R]N4      tO].! R4      tP] . ]Q3,          tR]P\                  ! R]+]4      tS ! R R]4      tTRR% R& lltU ! R' R(]]4      tV ! R) R*]!]S,          ]$]S,          4      tWR+R,R-RR.RR/R R0RR1^
R2R!R3R"R4R#R5R$R6R /R7 R8 lltX]P                  RR9RR+R,R-RR.RR/R R0RR1^
R2R!R3R"R4R#R5R$R6R /R: R; lll4       tZ]P                  RR9RR+R,R-RR.RR/R R0RR1^
R2R!R3R"R4R#R5R$R6R /R< R= lll4       tZRR9RR+R,R-RR.RR/R R0RR1^
R2R!R3R"R4R#R5R$R6R /R> R? llltZ ! R@ RA]4      t[ ! RB RC][4      t\ ! RD RE][4      t] ! RF RG][4      t^ ! RH RI][4      t_ ! RJ RK][4      t` ! RL RM]^4      ta ! RN RO][4      tb ! RP RQ][4      tc ! RR RS][4      td ! RT RU][4      te ! RV RW][4      tf ! RX RY][4      tg ! RZ R[]'4      th]
 ! R\ R]4      4       ti ! R^ R_]?4      tj]kR`8X  Edr   ^ RIltl^ RImtm^RaInHoto ^RbIpHqtq ^RcIrHsts ^RdIHHJtJ ]s! ReRfRRg7      tr]J! RhRiRj4      tH]HP                  RkRlRm4       Rn]o! Ro4      Rp]HRqRrRsRtRu/Rv]r]q! Rw4      .	tu^ RxIvHwtw ]w! ]u4      tx]8! RRy7      t7]j! ]]! 4       .]jP                  4       O]`! 4       N5R.]7R/R / ;_uu_ 4       tz]zP                  RzR{R|7      t|]zP                  R}R{R|7      t}]zP                  R~RR|7      t~]zP                  '       gq   ]zEP                  ]|RR7       ]zEP                  ]}RR7       ]mEP                  ! R4       ]lEP                  ! ^ ^d4      ^8  g   Kh  ]zEP                  ]! ]x4      4       K   RRR4       R# R#   + '       g   i     R# ; i)    N)ABCabstractmethoddeque)	dataclassfield)	timedelta)	RawIOBaseUnsupportedOperation)ceil)mmap)length_hint)PathLikestat)EventRLockThread)TracebackType)AnyBinaryIOCallableContextManagerDequeDictGenericIterableList
NamedTupleNewTypeOptionalSequenceTextIOTupleTypeTypeVarUnion)LiteralSelf)filesizeget_console)ConsoleGroupJustifyMethodRenderableType)Highlighter)JupyterMixin)LiveProgressBar)Spinner)	StyleType)ColumnTable)TextTextTypeTaskIDProgressType_Ic                   sx   a a ] tR t^Dt oRtV3R lV 3R lltV3R lR ltV3R lR ltV3R lR	 ltR
t	Vt
V ;t# )_TrackThreadz)A thread to periodically update progress.c                s(   < V ^8  d   QhRRRRRS[ /# )   progressProgresstask_idr9   update_periodfloatformat__classdict__   ">/usr/lib/python3.14/site-packages/pip/_vendor/rich/progress.py__annotate___TrackThread.__annotate__G   s"     & & &h &u &    c                sx   < Wn         W n        W0n        \        4       V n        ^ V n        \        SV `  RR7       R# )r    T)ZdaemonN)r>   r@   rA   r   done	completedsuper__init__)selfr>   r@   rA   	__class__   &&&&rH   rO   Z_TrackThread.__init__G   s3     *G	%rK   c                   < V ^8  d   QhRR/# r=   returnN rD   rG   rH   rI   rJ   P   s     S ST SrK   c                s   V P                   pV P                  P                  pV P                  p^ pV P                  P
                  pV! V4      '       gN   V P                  P                  P                  '       d(   V P                  pWF8w  g   KH  V! WV,
          4       TpK[  V P                  P                  V P                   V P                  RR7       R# )r    T)rM   refreshN)
r@   r>   advancerA   rL   waitlive
is_startedrM   update)rP   r@   rX   rA   Zlast_completedrY   rM   s   &      rH   runZ_TrackThread.runP   s    ,,--''**yy~~}%%$--*<*<*G*G*GI*^!;<!*T\\T^^TRrK   c                rS   )r=   rU   r<   rV   rD   rG   rH   rI   rJ   ^   s      > rK   c                &    V P                  4        V # NstartrP      &rH   	__enter__Z_TrackThread.__enter__^       

rK   c                p   < V ^8  d   QhRS[ S[S[,          ,          RS[ S[,          RS[ S[,          RR/# r=   exc_typeexc_valexc_tbrU   Nr   r"   ZBaseExceptionr   rD   rG   rH   rI   rJ   b   sG      4./ -( '	
 
rK   c                sZ    V P                   P                  4        V P                  4        R # r_   )rL   ZsetjoinrP   rh   ri   rj      &&&&rH   __exit__Z_TrackThread.__exit__b   s     					rK   )rM   rL   r>   r@   rA   )__name__
__module____qualname____firstlineno____doc__rO   r]   rd   ro   __static_attributes____classdictcell____classcell__rQ   rF      @@rH   r<   r<   D   s7     3& &S S   rK   r<   TFbar.backbar.completebar.finished	bar.pulsec          #      s   V ^8  d   QhR\         \        \        ,          \        \        ,          3,          R\        R\
        \        ,          R\        R\        R\
        \        ,          R\        R\
        \        . \        3,          ,          R	\        R
\        R\        R\        R\        R\        R\        R\        R\        \        ,          /# )r=   sequencedescriptiontotalrM   auto_refreshconsole	transientget_timerefresh_per_secondstylecomplete_stylefinished_stylepulse_stylerA   disable
show_speedrU   )r$   r   r:   r   strr   rC   intboolr*   r   r4   rE      "rH   rI   rI   l   s     I
 I
H\*H\,BBCI
I
 E?I
 	I

 I
 gI
 I
 xE	*+I
 I
 I
 I
 I
 I
 I
 I
  !I
" l#I
rK   c              #  sp  "   V'       d   \        R4      .M. pVP                  \        V	V
VVR7      \        VR7      \	        RR7      34       \        TRTRTRTR	TR
T;'       g    ^
RV/ pT;_uu_ 4        VP                  V VVVVR7       Rj  xL
  RRR4       R#  L  + '       g   i     R# ; i5i)a  Track progress by iterating over a sequence.

Args:
    sequence (Iterable[ProgressType]): A sequence (must support "len") you wish to iterate over.
    description (str, optional): Description of task show next to progress bar. Defaults to "Working".
    total: (float, optional): Total number of steps. Default is len(sequence).
    completed (int, optional): Number of steps completed so far. Defaults to 0.
    auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
    transient: (bool, optional): Clear the progress on exit. Defaults to False.
    console (Console, optional): Console to write to. Default creates internal Console instance.
    refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
    style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
    complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
    finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
    pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
    update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.
    disable (bool, optional): Disable display of progress.
    show_speed (bool, optional): Show speed if total isn't known. Defaults to True.
Returns:
    Iterable[ProgressType]: An iterable of the values in the sequence.

([progress.description]{task.description}r   r   r   r   )r   T)elapsed_when_finishedr   r   r   r   r   r   )r   rM   r   rA   N)
TextColumnextend	BarColumnTaskProgressColumnTimeRemainingColumnr?   track)r~   r   r   rM   r   r   r   r   r   r   r   r   r   rA   r   r   columnsr>   s   &&&&&&&&&&&&&&&&  rH   r   r   l   s     T EP>	?@UW  NN--'	 *5d;		
 	!  	
  .33 H 
>>#' " 
 	
 	
 
	
 
s0   A5B67B"B B"
B6 B""B3	-	B6c                   s  a  ] tR t^t o RtR0V 3R lR lltV 3R lR ltV 3R lR ltV 3R lR	 ltV 3R
 lR lt	]
V 3R lR l4       tV 3R lR ltV 3R lR lt]
V 3R lR l4       t]
V 3R lR l4       tV 3R lR ltV 3R lR ltV 3R lR ltR1V 3R lR lltV 3R lR ltR1V 3R  lR! lltR1V 3R" lR# lltV 3R$ lR% ltR2V 3R& lR' lltV 3R( lR) ltV 3R* lR+ ltV 3R, lR- ltR.tV tR/# )3_Readerz9A reader that tracks progress while it's being read from.c          
      s4   < V ^8  d   QhRS[ RRRS[RS[RR/# )r=   handler>   r?   taskclose_handlerU   N)r   r9   r   rD   rG   rH   rI   _Reader.__annotate__   s=        	
  
rK   c                sD    Wn         W n        W0n        W@n        R V n        R# FN)r   r>   r   r   _closed)rP   r   r>   r   r   s   &&&&&rH   rO   Z_Reader.__init__   s       	(rK   c                rS   )r=   rU   r   rV   rD   rG   rH   rI   r      s      9 rK   c                s:    V P                   P                  4        V # r_   )r   rd   rb   rc   rH   rd   Z_Reader.__enter__   s    rK   c                rf   rg   rk   rD   rG   rH   rI   r      sG      4./ -( '	
 
rK   c                &    V P                  4        R # r_   )closerm   rn   rH   ro   Z_Reader.__exit__   s     	

rK   c                    < V ^8  d   QhRS[ /# r=   rU   )r   rD   rG   rH   rI   r      s      ( rK   c                s    V # r_   rV   rb   rc   rH   __iter__Z_Reader.__iter__   s    rK   c                r   r   )bytesrD   rG   rH   rI   r      s      % rK   c                s    \        V P                  4      pV P                  P                  V P                  \        V4      R 7       V# rX   )nextr   r>   rX   r   len)rP   line   & rH   __next__Z_Reader.__next__   s4    DKK diiT;rK   c                r   r   r   rD   rG   rH   rI   r      s       rK   c                    V P                   # r_   )r   rb   rc   rH   closedZ_Reader.closed   s    ||rK   c                r   r   r   rD   rG   rH   rI   r      s     $ $ $rK   c                6    V P                   P                  4       # r_   )r   filenorb   rc   rH   r   Z_Reader.fileno       {{!!##rK   c                r   r   r   rD   rG   rH   rI   r      s     $ $ $rK   c                r   r_   )r   isattyrb   rc   rH   r   Z_Reader.isatty   r   rK   c                r   r   r   rD   rG   rH   rI   r              c  rK   c                .    V P                   P                  # r_   )r   moderb   rc   rH   r   Z_Reader.mode       {{rK   c                r   r   r   rD   rG   rH   rI   r      r   rK   c                r   r_   )r   namerb   rc   rH   r   Z_Reader.name   r   rK   c                r   r   r   rD   rG   rH   rI   r           & &$ &rK   c                r   r_   )r   readablerb   rc   rH   r   Z_Reader.readable       {{##%%rK   c                r   r   r   rD   rG   rH   rI   r      r   rK   c                r   r_   )r   seekablerb   rc   rH   r   Z_Reader.seekable   r   rK   c                r   r   r   rD   rG   rH   rI   r      s      $ rK   c                    R # )FrV   rb   rc   rH   writableZ_Reader.writable   s    rK   c                &   < V ^8  d   QhRS[ RS[/# r=   sizerU   r   r   rD   rG   rH   rI   r      s       e rK   c                    V P                   P                  V4      pV P                  P                  V P                  \        V4      R 7       V# r   )r   readr>   rX   r   r   )rP   r   Zblock   && rH   r   Z_Reader.read   s:      &diiU<rK   c                s:   < V ^8  d   QhRS[ S[S[S[3,          /# )r=   b)r$   Z	bytearrayZ
memoryviewr   rD   rG   rH   rI   r      s       %	:t ;< rK   c                s    V P                   P                  V4      pV P                  P                  V P                  VR 7       V# r   )r   readintor>   rX   r   )rP   r   Znr   rH   r   Z_Reader.readinto   s6    KK  #dii3rK   c                r   r   r   rD   rG   rH   rI   r     s      S % rK   c                r   r   )r   readliner>   rX   r   r   )rP   r   r   r   rH   r   Z_Reader.readline  s:    {{##D)diiT;rK   c                6   < V ^8  d   QhRS[ RS[S[,          /# )r=   hintrU   )r   r   r   rD   rG   rH   rI   r     s      c 4; rK   c           	     s    V P                   P                  V4      pV P                  P                  V P                  \        \        \        V4      4      R 7       V# r   )r   	readlinesr>   rX   r   sumZmapr   )rP   r   linesr   rH   r   Z_Reader.readlines  sA    %%d+diiSe_1EFrK   c                rS   rT   rV   rD   rG   rH   rI   r     s      t rK   c                sl    V P                   '       d   V P                  P                  4        R V n        R# )TN)r   r   r   r   rb   rc   rH   r   Z_Reader.close  s%    KKrK   c                s,   < V ^8  d   QhRS[ RS[ RS[ /# )r=   offsetwhencerU   r   rD   rG   rH   rI   r     s"      3  C rK   c                s    V P                   P                  W4      pV P                  P                  V P                  VR 7       V# )rM   )r   seekr>   r\   r   )rP   r   r   Zposs   &&& rH   r   Z_Reader.seek  s6    kkv.TYY#6
rK   c                r   r   r   rD   rG   rH   rI   r     s     " "c "rK   c                r   r_   )r   tellrb   rc   rH   r   Z_Reader.tell  s    {{!!rK   c                r   )r=   srU   )r   r   rD   rG   rH   rI   r     s     , ,s ,s ,rK   c                    \        R 4      h)writer	   )rP   r      &&rH   r   Z_Reader.write  s    "7++rK   c                4   < V ^8  d   QhRS[ S[,          RR/# )r=   r   rU   N)r   r   rD   rG   rH   rI   r     s     1 1 1$ 1rK   c                r   )
writelinesr   )rP   r   r   rH   r   Z_Reader.writelines  s    "<00rK   )r   r   r   r>   r   N)T))r    )rp   rq   rr   rs   rt   rO   rd   ro   r   r   propertyr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   ru   rv   rF      @rH   r   r      s    C     
  $ $$ $        & && &  
 
 
 
 
 
" ", ,1 1rK   r   c                   sZ   a  ] tR tRt o RtV 3R lR ltV 3R lR ltV 3R lR ltR	tV t	R
# )_ReadContexti  zEA utility class to handle a context for both a reader and a progress.c                s(   < V ^8  d   QhRRRS[ RR/# )r=   r>   r?   readerrU   Nr;   rD   rG   rH   rI   _ReadContext.__annotate__"  s"     ! ! !R !D !rK   c                s    Wn         W n        R # r_   r>   r   )rP   r>   r   s   &&&rH   rO   Z_ReadContext.__init__"  s      rK   c                r   r   r   rD   rG   rH   rI   r   &  s     ' '2 'rK   c                sj    V P                   P                  4        V P                  P                  4       # r_   )r>   ra   r   rd   rb   rc   rH   rd   Z_ReadContext.__enter__&  s%    {{$$&&rK   c                rf   rg   rk   rD   rG   rH   rI   r   *  sG     8 84./8 -(8 '	8
 
8rK   c                sr    V P                   P                  4        V P                  P                  WV4       R # r_   )r>   stopr   ro   rm   rn   rH   ro   Z_ReadContext.__exit__*  s(     	X7rK   r   N)
rp   rq   rr   rs   rt   rO   rd   ro   ru   rv   r   r   rH   r   r     s&     O! !' '8 8rK   r   r   
Reading...r   r   r   r   r   r   r   r   r   r   c                s   V ^8  d   QhR\         R\        R\        R\        R\        \
        ,          R\        R\        \        . \        3,          ,          R\        R	\        R
\        R\        R\        R\        R\        \         ,          /# )r=   filer   r   r   r   r   r   r   r   r   r   r   r   rU   )
r   r   r   r   r   r*   r   rC   r4   r   r   r   rH   rI   rI   4  s     >* >*
>*>* 	>*
 >* g>* >* xE	*+>* >* >* >* >* >* >* H>*rK   c               s
   V'       d   \        R4      .M. pVP                  \        VV	V
VR7      \        4       \	        4       34       \        TRTRTRTRTRT;'       g    ^
RV/ pVP                  WVR	7      p\        W4      # )
a  Read bytes from a file while tracking progress.

Args:
    file (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.
    total (int): Total number of bytes to read.
    description (str, optional): Description of task show next to progress bar. Defaults to "Reading".
    auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
    transient: (bool, optional): Clear the progress on exit. Defaults to False.
    console (Console, optional): Console to write to. Default creates internal Console instance.
    refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
    style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
    complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
    finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
    pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
    disable (bool, optional): Disable display of progress.
Returns:
    ContextManager[BinaryIO]: A context manager yielding a progress reader.

r   r   r   r   r   r   r   r   )r   r   )r   r   r   DownloadColumnr   r?   	wrap_filer   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r>   r   s   &&$$$$$$$$$$$   rH   r   r   4  s    J EP>	?@UW  NN--'	 !		
 	!  	
  .33 H {KF))rK   r   c          '      s   V ^8  d   QhR\         \        R\        3,          R\         \        R,          \        R,          3,          R\        R\
        \        ,          R\
        \        ,          R	\
        \        ,          R
\
        \        ,          R\        R\        R\
        \        ,          R\        R\
        \        . \        3,          ,          R\        R\        R\        R\        R\        R\        R\        \        ,          /# )r=   r   PathLike[str]r   rtr	bufferingencodingerrorsnewliner   r   r   r   r   r   r   r   r   r   r   r   rU   )r$   r   r   r%   r   r   r   r*   r   rC   r4   r   r    r   r   rH   rI   rI   v  s    	 	
_e+
,	
ws|+
,	 	 sm		
 SM	 c]	 C=	 	 	 g	 	 xE	*+	 	 	  !	" #	$ %	& '	( F)	rK   c                r   r_   rV   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r      &&&&&&$$$$$$$$$$$$rH   openr   u      , 	rK   c          '      s   V ^8  d   QhR\         \        R\        3,          R\        R,          R\        R\
        \        ,          R\
        \        ,          R\
        \        ,          R	\
        \        ,          R
\        R\        R\
        \        ,          R\        R\
        \        . \        3,          ,          R\        R\        R\        R\        R\        R\        R\        \        ,          /# )r=   r   r   r   rbr   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rU   )r$   r   r   r%   r   r   r   r*   r   rC   r4   r   r   r   r   rH   rI   rI     s     	 	
_e+
,	
$-	 	 sm		
 SM	 c]	 C=	 	 	 g	 	 xE	*+	 	 	  !	" #	$ %	& '	( H)	rK   c                r   r_   rV   r   r   rH   r   r     r   rK   c          )      sb   V ^8  d   QhR\         \        R\        3,          R\         \        R,          \        R,          \        R,          3,          R\        R\
        \        ,          R	\
        \        ,          R
\
        \        ,          R\
        \        ,          R\        R\        R\
        \        ,          R\        R\
        \        . \        3,          ,          R\        R\        R\        R\        R\        R\        R\         \        \        ,          \        \        ,          3,          /# )r=   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rU   )r$   r   r   r%   r   r   r   r*   r   rC   r4   r   r   r    r   r   rH   rI   rI     s6    S* S*
_e+
,S*
wt}gcl:
;S* S* sm	S*
 SMS* c]S* C=S* S* S* gS* S* xE	*+S* S* S*  !S*" #S*$ %S*& 'S*( >(#^F%;;<)S*rK   c               s   V'       d   \        R4      .M. pVP                  \        VVVVR7      \        4       \	        4       34       \        TRTRT	RT
RTRT;'       g    ^
RV/ pVP                  V VVVVVVVR	7      p\        VV4      # )
aV  Read bytes from a file while tracking progress.

Args:
    path (Union[str, PathLike[str], BinaryIO]): The path to the file to read, or a file-like object in binary mode.
    mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".
    buffering (int): The buffering strategy to use, see :func:`io.open`.
    encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.
    errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.
    newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`
    total: (int, optional): Total number of bytes to read. Must be provided if reading from a file handle. Default for a path is os.stat(file).st_size.
    description (str, optional): Description of task show next to progress bar. Defaults to "Reading".
    auto_refresh (bool, optional): Automatic refresh, disable to force a refresh after each iteration. Default is True.
    transient: (bool, optional): Clear the progress on exit. Defaults to False.
    console (Console, optional): Console to write to. Default creates internal Console instance.
    refresh_per_second (float): Number of times per second to refresh the progress information. Defaults to 10.
    style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
    complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
    finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
    pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
    disable (bool, optional): Disable display of progress.
    encoding (str, optional): The encoding to use when reading in text mode.

Returns:
    ContextManager[BinaryIO]: A context manager yielding a progress reader.

r   r   r   r   r   r   r   r   )r   r   r   r   r   r   r   )r   r   r   r   r   r?   r   r   )r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r>   r   s   &&&&&&$$$$$$$$$$$$   rH   r   r     s    b EP>	?@UW  NN--'	 !		
 	!  	
  .33 H ]]  	F &))rK   c                   s   a  ] tR tRt o RtRtRV 3R lR lltV 3R lR ltV 3R lR	 lt]	V 3R
 lR l4       t
V 3R ltRtV tR# )ProgressColumni  z3Base class for a widget to use in progress display.Nc                r   )r=   table_columnrU   N)r   r5   rD   rG   rH   rI   ProgressColumn.__annotate__  s      2 2Xf%5 2 2rK   c                s.    Wn         / V n        R V n        R # r_   )_table_column_renderable_cache_update_time)rP   r   r   rH   rO   ZProgressColumn.__init__  s    )MO-1rK   c                r   r   )r5   rD   rG   rH   rI   r     s     . .& .rK   c                s>    V P                   ;'       g    \        4       # )z.Get a table column, used to build tasks table.)r   r5   rb   rc   rH   get_table_columnZProgressColumn.get_table_column  s    !!--VX-rK   c                $   < V ^8  d   QhRRRS[ /# r=   r   TaskrU   r-   rD   rG   rH   rI   r     s      V  rK   c                sR   VP                  4       pV P                  eM   VP                  '       g;    V P                  VP                  ,          w  r4W0P                  ,           V8  d   V#  V P                  V4      pW$3V P                  VP                  &   V#   \
         d     L:i ; i)zCalled by the Progress object to return a renderable for the given task.

Args:
    task (Task): An object containing information regarding the task.

Returns:
    RenderableType: Anything renderable (including str).
)r   max_refreshrM   r   idZKeyErrorrender)rP   r   current_time	timestamp
renderable   &&   rH   __call__ZProgressColumn.__call__  s     }}'&(,(>(>tww(G%	 ///,>%% ? [[&
+7*Dtww'  s   B B&%B&c                r   r   r  rD   rG   rH   rI   r   #  s     1 16 1n 1rK   c                s    R# )z"Should return a renderable object.NrV   rP   r   r   rH   r  ZProgressColumn.render"  s    rK   c                s6   < V ^8  d   Qh/ S[ S[,          ;R&   # )r=   r  r   rC   rD   rG   rH   rI   r     s      %' rK   )r   r   r   r_   )rp   rq   rr   rs   rt   r  rO   r   r
  r   r  __annotate_func__ru   rv   r   r   rH   r   r     sG     =#'K2 2
. . . 1 1M  rK   r   c                   s`   a a ] tR tRt oRtR
RR/V3R lV 3R lllltV3R lR ltR	tVtV ;t	# )RenderableColumni'  zA column to insert an arbitrary column.

Args:
    renderable (RenderableType, optional): Any renderable. Defaults to empty string.
r   Nc                r   )r=   r  r   )r-   r   r5   rD   rG   rH   rI   RenderableColumn.__annotate__.  s"     4 4(4@H@P4rK   c               4   < Wn         \        SV `	  VR 7       R# r   N)r  rN   rO   )rP   r  r   rQ   s   &&$rH   rO   ZRenderableColumn.__init__.  s     %l3rK   c                r   r   r  rD   rG   rH   rI   r  4  s      6 n rK   c                r   r_   r  r  r   rH   r  ZRenderableColumn.render4  s    rK   r  ) 
rp   rq   rr   rs   rt   rO   r  ru   rv   rw   rx   ry   rH   r  r  '  s+     4SW4 4  rK   r  c                   sn   a a ] tR tRt oRtR
V3R lV 3R llltRV3R lR lltV3R lR ltR	tVt	V ;t
# )SpinnerColumni8  aq  A column with a 'spinner' animation.

Args:
    spinner_name (str, optional): Name of spinner animation. Defaults to "dots".
    style (StyleType, optional): Style of spinner. Defaults to "progress.spinner".
    speed (float, optional): Speed factor of spinner. Defaults to 1.0.
    finished_text (TextType, optional): Text used when task is finished. Defaults to " ".
c                sX   < V ^8  d   QhRS[ RS[S[,          RS[RS[RS[S[,          /# )r=   spinner_namer   speedfinished_textr   )r   r   r4   rC   r8   r5   rD   rG   rH   rI   SpinnerColumn.__annotate__B  sG     4 44 	"4 	4
  4 v&4rK   c                s   < \        WVR 7      V n        \        V\        4      '       d   \        P
                  ! V4      MTV n        \        SV `!  VR7       R# )r   r  r  N)	r3   spinner
isinstancer   r7   from_markupr  rN   rO   )rP   r  r   r  r  r   rQ   s   &&&&&&rH   rO   ZSpinnerColumn.__init__B  sO     |F --- ]+ 	
 	l3rK   c                s@   < V ^8  d   QhRS[ RS[S[,          RS[RR/# )r=   r  spinner_styler  rU   N)r   r   r4   rC   rD   rG   rH   rI   r  R  s>     O OO  	*O 	O
 
OrK   c                s*    \        WVR7      V n        R# )a  Set a new spinner.

Args:
    spinner_name (str): Spinner name, see python -m rich.spinner.
    spinner_style (Optional[StyleType], optional): Spinner style. Defaults to "progress.spinner".
    speed (float, optional): Speed factor of spinner. Defaults to 1.0.
r  N)r3   r  )rP   r  r  r  rn   rH   set_spinnerZSpinnerColumn.set_spinnerR  s     |NrK   c                r   r   r  rD   rG   rH   rI   r  a  s      6 n rK   c                s    VP                   '       d   V P                  pV# V P                  P                  VP	                  4       4      pV# r_   )finishedr  r  r  r   )rP   r   textr   rH   r  ZSpinnerColumn.rendera  sJ     }}}  	
  $$T]]_5 	
 rK   )r  r  )Zdotsprogress.spinner      ? N)r#  r$  )rp   rq   rr   rs   rt   rO   r   r  ru   rv   rw   rx   ry   rH   r  r  8  s/     4 4 O O  rK   r  c                   X   a a ] tR tRt oRtRV3R lV 3R llltV3R lR ltRtVtV ;t	# )	r   ij  zA column containing text.c                sb   < V ^8  d   QhRS[ RS[RS[RS[RS[S[,          RS[S[,          RR/# )	r=   text_formatr   justifymarkuphighlighterr   rU   Nr   r4   r,   r   r   r.   r5   rD   rG   rH   rI   TextColumn.__annotate__m  sd     L LL L 	L
 L k*L v&L 
LrK   c                s   < Wn         W0n        W n        W@n        WPn        \
        ST `  T;'       g    \        R R7      R7       R# )TZno_wrapr  N)r'  r(  r   r)  r*  rN   rO   r5   )rP   r'  r   r(  r)  r*  r   rQ      &&&&&&&rH   rO   ZTextColumn.__init__m  s=     '&-
&l&J&JfT6JKrK   c                r   r   r7   rD   rG   rH   rI   r,  }  s      6 d rK   c                sX   V P                   P                  VR 7      pV P                  '       d.   \        P                  ! W P
                  V P                  R7      pM!\        W P
                  V P                  R7      pV P                  '       d   V P                  P                  V4       V# )r   r   r(  )	r'  rE   r)  r7   r  r   r(  r*  	highlight)rP   r   _textr"     &&  rH   r  ZTextColumn.render}  sw      ''T'2;;;##ET\\RDZZFD&&t,rK   )r*  r(  r)  r   r'  )noneleftTNNr  rx   ry   rH   r   r   j  s#     #L L   rK   r   c                   r&  )	r   i  a  Renders a visual progress bar.

Args:
    bar_width (Optional[int], optional): Width of bar or None for full width. Defaults to 40.
    style (StyleType, optional): Style for the bar background. Defaults to "bar.back".
    complete_style (StyleType, optional): Style for the completed bar. Defaults to "bar.complete".
    finished_style (StyleType, optional): Style for a finished bar. Defaults to "bar.finished".
    pulse_style (StyleType, optional): Style for pulsing bars. Defaults to "bar.pulse".
c                sb   < V ^8  d   QhRS[ S[,          RS[RS[RS[RS[RS[ S[,          RR/# )	r=   	bar_widthr   r   r   r   r   rU   N)r   r   r4   r5   rD   rG   rH   rI   BarColumn.__annotate__  sZ     4 4C=4 4 "	4
 "4 4 v&4 
4rK   c                sd   < Wn         W n        W0n        W@n        WPn        \
        SV `  VR 7       R# r  )r7  r   r   r   r   rN   rO   )rP   r7  r   r   r   r   r   rQ   r.  rH   rO   ZBarColumn.__init__  s1     #
,,&l3rK   c                r   r   r1   rD   rG   rH   rI   r8    s     
 
6 
k 
rK   c                sl   \        VP                  e   \        ^ VP                  4      MR\        ^ VP                  4      V P                  f   RM\        ^V P                  4      VP
                  '       * VP                  4       V P                  V P                  V P                  V P                  R7	      # )z&Gets a progress bar widget for a task.N)	r   rM   ZwidthZpulseZanimation_timer   r   r   r   )r2   r   maxrM   r7  startedr   r   r   r   r   r  r   rH   r  ZBarColumn.render  s    (,

(>#a$D!T^^,..0$c!T^^6Lll"==?**....((

 
	
rK   )r7  r   r   r   r   )i(   rz   r{   r|   r}   Nr  rx   ry   rH   r   r     s#     4 4 
 
 
rK   r   c                   6   a  ] tR tRt o RtV 3R lR ltRtV tR# )TimeElapsedColumni  zRenders time elapsed.c                r   r   r/  rD   rG   rH   rI   ZTimeElapsedColumn.__annotate__  s     : :6 :d :rK   c                s    VP                   '       d   VP                  MVP                  pVf   \        RRR7      # \	        \        ^ \        V4      4      R7      p\        \        V4      RR7      # )zShow time elapsed.-:--:--progress.elapsedr   )seconds)r!  finished_timeelapsedr7   r   r9  r   r   )rP   r   rB  Zdeltar4  rH   r  ZTimeElapsedColumn.render  sU    (,$$$4<<?	);<<#aW"67CJ&899rK   rV   Nrp   rq   rr   rs   rt   r  ru   rv   r   r   rH   r<  r<    s     : :rK   r<  c                   st   a a ] tR tRt oRtR
V3R lV 3R lllt]V3R lR l4       tV3R lR ltR	t	Vt
V ;t# )r   i  a  Show task progress as a percentage.

Args:
    text_format (str, optional): Format for percentage display. Defaults to "[progress.percentage]{task.percentage:>3.0f}%".
    text_format_no_percentage (str, optional): Format if percentage is unknown. Defaults to "".
    style (StyleType, optional): Style of output. Defaults to "none".
    justify (JustifyMethod, optional): Text justification. Defaults to "left".
    markup (bool, optional): Enable markup. Defaults to True.
    highlighter (Optional[Highlighter], optional): Highlighter to apply to output. Defaults to None.
    table_column (Optional[Column], optional): Table Column to use. Defaults to None.
    show_speed (bool, optional): Show speed if total is unknown. Defaults to False.
c                sn   < V ^8  d   QhRS[ RS[ RS[RS[RS[RS[S[,          RS[S[,          RS[R	R
/	# )r=   r'  text_format_no_percentager   r(  r)  r*  r   r   rU   Nr+  rD   rG   rH   rI   TaskProgressColumn.__annotate__  so     
 

 $'
 	

 
 
 k*
 v&
 
 

rK   c	           	     sJ   < W n         Wn        \        S	V `  VVVVVVR 7       R# ))r'  r   r(  r)  r*  r   N)rD  r   rN   rO   )
rP   r'  rD  r   r(  r)  r*  r   r   rQ   s
   &&&&&&&&&rH   rO   ZTaskProgressColumn.__init__  s5     *C&$##% 	 	
rK   c                6   < V ^8  d   QhRS[ S[,          RS[/# )r=   r  rU   )r   rC   r7   rD   rG   rH   rI   rE    s#     S S% ST SrK   c                s    Vf   \        RRR7      # \        P                  ! \        V4      . ROR4      w  r#W,          p\        VR V R2RR7      # )zRender the speed in iterations per second.

Args:
    task (Task): A Task object.

Returns:
    Text: Text object containing the task speed.
r  zprogress.percentager?    z.1fz it/s)r  u   ×10³u   ×10⁶u   ×10⁹u   ×10¹²)r7   r(   pick_unit_and_suffixr   )clsr  unitsuffix
data_speedr	  rH   render_speedZTaskProgressColumn.render_speed  s[     ="78844J<

 \
z#&vhe4<QRRrK   c                r   r   r/  rD   rG   rH   rI   rE    s      6 d rK   c                s.   VP                   fB   V P                  '       d0   T P                  VP                  ;'       g    VP                  4      # VP                   f   V P
                  MV P                  pVP                  VR7      pV P                  '       d.   \        P                  ! W0P                  V P                  R7      pM!\        W0P                  V P                  R7      pV P                  '       d   V P                  P                  V4       V# )Nr0  r1  )r   r   rM  finished_speedr  rD  r'  rE   r)  r7   r  r   r(  r*  r2  )rP   r   r'  r3  r"  r	  rH   r  ZTaskProgressColumn.render  s    ::$///$$T%8%8%F%FDJJGG.2jj.@D**dFVFV 	 """-;;;##ET\\RDZZFD&&t,rK   )r   rD  )z-[progress.percentage]{task.percentage:>3.0f}%r  r5  r6  TNNF)rp   rq   rr   rs   rt   rO   classmethodrM  r  ru   rv   rw   rx   ry   rH   r   r     s9     
 
, S S&  rK   r   c                   s\   a a ] tR tRt oRtRtR	V3R lV 3R llltV3R lR ltRtVt	V ;t
# )
r   i  zRenders estimated time remaining.

Args:
    compact (bool, optional): Render MM:SS when time remaining is less than an hour. Defaults to False.
    elapsed_when_finished (bool, optional): Render time elapsed when the task is finished. Defaults to False.
      ?c                s<   < V ^8  d   QhRS[ RS[ RS[S[,          /# )r=   compactr   r   r   r   r5   rD   rG   rH   rI    TimeRemainingColumn.__annotate__  s.     4 44  $4 v&	4rK   c                s@   < Wn         W n        \        SV `  VR 7       R# r  )rQ  r   rN   rO   )rP   rQ  r   r   rQ   rR   rH   rO   ZTimeRemainingColumn.__init__  s      %:"l3rK   c                r   r   r/  rD   rG   rH   rI   rS    s     , ,6 ,d ,rK   c                s   V P                   '       d"   VP                  '       d   VP                  pRpMVP                  pRpVP                  f   \        RVR7      # Vf(   \        V P                  '       d	   RVR7      # RVR7      # \        \        V4      ^<4      w  rE\        V^<4      w  rdV P                  '       d   V'       g   VR RVR 2pMVR	 RVR RVR 2p\        WsR7      # )
zShow time remaining.r>  zprogress.remainingr  r?  z--:--r=  Z02dZ:d)	r   r!  rA  time_remainingr   r7   rQ  Zdivmodr   )rP   r   Z	task_timer   Zminutesr@  ZhoursZ	formatteds   &&      rH   r  ZTimeRemainingColumn.render  s    %%%$---**I&E++I(E::%((4<<<eLLYeLL "#i."5,<<<"3-q6I )1WSM73-@II++rK   )rQ  r   )FFN)rp   rq   rr   rs   rt   r  rO   r  ru   rv   rw   rx   ry   rH   r   r     s*      K4 4, , ,rK   r   c                   r;  )FileSizeColumni6  zRenders completed filesize.c                r   r   r/  rD   rG   rH   rI   ZFileSizeColumn.__annotate__9  s     : :6 :d :rK   c                sn    \         P                  ! \        VP                  4      4      p\	        VRR7      # )Show data completed.zprogress.filesizer?  )r(   decimalr   rM   r7   rP   r   Z	data_sizer   rH   r  ZFileSizeColumn.render9  s)    $$S%89	I%899rK   rV   NrC  r   r   rH   rV  rV  6  s     %: :rK   rV  c                   r;  )TotalFileSizeColumni?  zRenders total filesize.c                r   r   r/  rD   rG   rH   rI   Z TotalFileSizeColumn.__annotate__B  s     @ @6 @d @rK   c                s    VP                   e*   \        P                  ! \        VP                   4      4      MRp\	        VRR7      # )rW  r  zprogress.filesize.totalr?  )r   r(   rX  r   r7   rY  r   rH   r  ZTotalFileSizeColumn.renderB  s4    9=9OH$$S_5UW	I%>??rK   rV   NrC  r   r   rH   rZ  rZ  ?  s     !@ @rK   rZ  c                   r&  )	MofNCompleteColumniH  a0  Renders completed count/total, e.g. '  10/1000'.

Best for bounded tasks with int quantities.

Space pads the completed count so that progress length does not change as task progresses
past powers of 10.

Args:
    separator (str, optional): Text to separate completed and total values. Defaults to "/".
c                r   )r=   	separatorr   )r   r   r5   rD   rG   rH   rI   MofNCompleteColumn.__annotate__T  s      4 4# 48F;K 4rK   c                r  r  )r\  rN   rO   )rP   r\  r   rQ      &&&rH   rO   ZMofNCompleteColumn.__init__T  s    "l3rK   c                r   r   r/  rD   rG   rH   rI   r]  X  s     
 
6 
d 
rK   c                s    \        VP                  4      pVP                  e   \        VP                  4      MRp\        \	        V4      4      p\        W$ R2 V P                   V 2RR7      # )zShow completed/total.?rT  progress.downloadr?  )r   rM   r   r   r   r7   r\  )rP   r   rM   r   Ztotal_widthr	  rH   r  ZMofNCompleteColumn.renderX  sa    '	#'::#9DJJs#e*oa((8@%
 	
rK   )r\  )/Nr  rx   ry   rH   r[  r[  H  s#     	4 4
 
 
rK   r[  c                   r&  )	r   ic  zRenders file size downloaded and total, e.g. '0.5/2.3 GB'.

Args:
    binary_units (bool, optional): Use binary units, KiB, MiB etc. Defaults to False.
c                s:   < V ^8  d   QhRS[ RS[S[,          RR/# )r=   binary_unitsr   rU   NrR  rD   rG   rH   rI   DownloadColumn.__annotate__j  s*     4 4 48@8H4	4rK   c                r  r  )rb  rN   rO   )rP   rb  r   rQ   r^  rH   rO   ZDownloadColumn.__init__j  s     )l3rK   c                r   r   r/  rD   rG   rH   rI   rc  p  s     ! !6 !d !rK   c                s   \        VP                  4      pVP                  e   \        VP                  4      MTpV P                  '       d   \        P
                  ! V. R
OR4      w  rEM\        P
                  ! V. ROR4      w  rEV^8X  d   ^ M^pW$,          pVRV R2 pVP                  e'   \        VP                  4      p	W,          p
V
RV R2 pMRpV RV RV 2p\        VRR	7      pV# )z.Calculate common unit for completed and total.i   rG  z,.Zfr_  ra  r%  r`  r?  )	r   ZKiBZMiBZGiBZTiBZPiBZEiBZZiBZYiB)	r   ZkBZMBZGBZTBZPBZEBZZBZYB)r   rM   r   rb  r(   rH  r7   )rP   r   rM   Z unit_and_suffix_calculation_baserJ  rK  Z	precisionZcompleted_ratioZcompleted_strr   Ztotal_ratioZ	total_strZdownload_statusZdownload_texts   &&            rH   r  ZDownloadColumn.renderp  s    '	  $zz5C

O9 	) #880QLD& $880ILD
 A	#**2i[/:::!

OE,K&r)Ao6II*O1YKqA_4GHrK   )rb  r   r  rx   ry   rH   r   r   c  s#     4 4! ! !rK   r   c                   r;  )TransferSpeedColumni  z&Renders human readable transfer speed.c                r   r   r/  rD   rG   rH   rI   Z TransferSpeedColumn.__annotate__  s     D D6 Dd DrK   c                s    VP                   ;'       g    VP                  pVf   \        RRR7      # \        P                  ! \        V4      4      p\        V R2RR7      # )zShow data transfer speed.r_  zprogress.data.speedr?  z/s)rN  r  r7   r(   rX  r   )rP   r   r  rL  r4  rH   r  ZTransferSpeedColumn.render  sU    ##11tzz=#899%%c%j1
zl"%-BCCrK   rV   NrC  r   r   rH   rd  rd    s     0D DrK   rd  c                   s4   a  ] tR tRt o Rt  V 3R ltRtV tR# )ProgressSamplei  z$Sample of progress for a given time.c                s2   < V ^8  d   Qh/ S[ ;R&   S[ ;R&   # )r=   r  rM   rB   rD   rG   rH   rI   ZProgressSample.__annotate__  s       
  rK   rV   N)rp   rq   rr   rs   rt   r  ru   rv   r   r   rH   re  re    s     . $  rK   re  c                   s  a  ] tR tRt o Rt     Rt Rt ]! ]R7      t	 ]! RRRR7      t
 ]! RRRR7      t Rt ]! R RRR	7      t]! R]R
7      t V 3R lR lt]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       t]V 3R lR l4       tV 3R lR ltV 3R ltRtV tR# )r  i  z}Information regarding a progress task.

This object should be considered read-only outside of the :class:`~Progress` class.

NT)default_factoryF)Zdefaultinitreprc                 s    \        R R7      # )rG  )Zmaxlenr   rV   rK   rH   Z<lambda>ZTask.<lambda>  s	    T 2rK   )rf  rg  rh  )rh  rf  c                r   r   rB   rD   rG   rH   rI   Task.__annotate__  s        %  rK   c                s"    V P                  4       # )z(float: Get the current time, in seconds.)	_get_timerb   rc   rH   r   ZTask.get_time  s    ~~rK   c                r   r   r   rD   rG   rH   rI   ri    s     + + +rK   c                    V P                   RJ# )z#bool: Check if the task as started.N)
start_timerb   rc   rH   r:  ZTask.started  s     d**rK   c                0   < V ^8  d   QhRS[ S[,          /# r   r  rD   rG   rH   rI   ri    s     + +8E? +rK   c                s\    V P                   f   R# V P                   V P                  ,
          # )zPOptional[float]: Get the number of steps remaining, if a non-None total was set.Nr   rM   rb   rc   rH   	remainingZTask.remaining  s$     ::zzDNN**rK   c                rm  r   r  rD   rG   rH   rI   ri    s     1 1% 1rK   c                s    V P                   f   R# V P                  e   V P                  V P                   ,
          # V P                  4       V P                   ,
          # )z]Optional[float]: Time elapsed since task was started, or ``None`` if the task hasn't started.N)rl  	stop_timer   rb   rc   rH   rB  ZTask.elapsed  sC     ??">>%>>DOO33}}00rK   c                r   r   r   rD   rG   rH   rI   ri    s     . .$ .rK   c                rk  )zCheck if the task has finished.N)rA  rb   rc   rH   r!  ZTask.finished  s     !!--rK   c                r   r   rB   rD   rG   rH   rI   ri    s      E rK   c                s    V P                   '       g   R# V P                  V P                   ,          R,          p\        R\        RV4      4      pV# )zOfloat: Get progress of task as a percentage. If a None total was set, returns 0              Y@)r   rM   Zminr9  )rP   rM   r   rH   
percentageZTask.percentage  s@     zzz^^djj0E9	s3	23	rK   c                rm  r   r  rD   rG   rH   rI   ri    s      x rK   c                s   V P                   f   R# V P                  ;_uu_ 4        V P                  pV'       g    RRR4       R# VR,          P                  V^ ,          P                  ,
          pV^ 8X  d    RRR4       R# \	        V4      p\        V4       \        R V 4       4      pWB,          pVuuRRR4       #   + '       g   i     R# ; i)z=Optional[float]: Get the estimated speed in steps per second.Nc              3   8   "   T F  qP                   x  K  	  R # 5ir_   r   ).0Zsampler   rH   	<genexpr>ZTask.speed.<locals>.<genexpr>  s     !Ov"2"2   r   )rl  _lock	_progressr  Ziterr   r   )rP   r>   Z
total_timeZiter_progressZtotal_completedr  s   &     rH   r  Z
Task.speed   s     ??"ZZZ~~H Z ""//(1+2G2GGJQ Z !NM!!O!OOO#0E ZZZs   B>3B>1B>>C	c                rm  r   r  rD   rG   rH   rI   ri    s       rK   c                s    V P                   '       d   R# V P                  pV'       g   R# V P                  pVf   R# \        W!,          4      pV# )zJOptional[float]: Get estimated time to completion, or ``None`` if no data.rq  N)r!  r  ro  r
   )rP   r  ro  Zestimates   &   rH   rU  ZTask.time_remaining  sC     ===

NN		)*rK   c                rS   rT   rV   rD   rG   rH   rI   ri     s     # # #rK   c                sV    V P                   P                  4        RV n        RV n        R# )zReset progress.N)ry  ZclearrA  rN  rb   rc   rH   _resetZTask._reset   s"    !"rK   c                s,  < V ^8  d   Qh/ S[ ;R&   S[;R&   S[S[,          ;R&   S[;R&   S[;R&   S[S[,          ;R&   S[;R&   S[S[S[3,          ;R&   S[S[,          ;R	&   S[S[,          ;R
&   S[S[,          ;R&   S[S[	,          ;R&   S[
;R&   # )r=   r  r   r   rM   rj  rA  visiblefieldsrl  rp  rN  ry  rx  )r9   r   r   rC   GetTimeCallabler   r   r   r   re  r   rD   rG   rH   rI   ri    s      	J    E? " # ( ) . E?)/ 4 5 : cN8; @ MA F LG L UO*M R ^$ S Z ;[ rK   )rN  rA  )rp   rq   rr   rs   rt   rA  r{  r   Zdictr|  rl  rp  rN  ry  r   rx  r   r   r:  ro  rB  r!  rs  r  rU  rz  r  ru   rv   r   r   rH   r  r    s5     H ( ? + ,%)M(GJ"48F?"'5u"MJN!&t%e!LIN&*N>',2U(I eU;E    + + + + 1 1 . .    "  # #o  rK   r  c                   s0  a  ] tR tRt o RtRRRRR^
RR	R
RRRRRRRRRRR/
V 3R lR llt]V 3R lR l4       t]V 3R lR l4       t	]V 3R lR l4       t
]V 3R lR l4       t]V 3R lR l4       tV 3R lR ltV 3R lR  ltV 3R! lR" ltV 3R# lR$ ltRQV 3R% lR& lltRRR'RR(R)/V 3R* lR+ lllt]P(                  RSR,RR'RR(R)/V 3R- lR. lll4       t]P(                  RSR,RR'RR(R)/V 3R/ lR0 lll4       tRTR,RR'RR(R)/V 3R1 lR2 llltV 3R3 lR4 ltV 3R5 lR6 ltR,RR7RR8RR(RR9RR:R/V 3R; lR< lltR=RR,RR7^ R9RR(R/V 3R> lR? lltRUV 3R@ lRA lltV 3RB lRC ltV 3RD lRE ltV 3RF lRG ltV 3RH lRI ltV 3RJ lRK ltRVV 3RL lRM llt V 3RN lRO lt!RPt"V t#R# )Wr?   i'  a\  Renders an auto-updating progress bar(s).

Args:
    console (Console, optional): Optional Console instance. Defaults to an internal Console instance writing to stdout.
    auto_refresh (bool, optional): Enable auto refresh. If disabled, you will need to call `refresh()`.
    refresh_per_second (Optional[float], optional): Number of times per second to refresh the progress information or None to use default (10). Defaults to None.
    speed_estimate_period: (float, optional): Period (in seconds) used to calculate the speed estimate. Defaults to 30.
    transient: (bool, optional): Clear the progress on exit. Defaults to False.
    redirect_stdout: (bool, optional): Enable redirection of stdout, so ``print`` may be used. Defaults to True.
    redirect_stderr: (bool, optional): Enable redirection of stderr. Defaults to True.
    get_time: (Callable, optional): A callable that gets the current time, or None to use Console.get_time. Defaults to None.
    disable (bool, optional): Disable progress display. Defaults to False
    expand (bool, optional): Expand tasks table to fit width. Defaults to False.
r   Nr   Tr   speed_estimate_periodg      >@r   Fredirect_stdoutredirect_stderrr   r   expandc                s   < V ^8  d   QhRS[ S[S[3,          RS[S[,          RS[RS[RS[RS[RS[RS[R	S[S[,          R
S[RS[RR/# )r=   r   r   r   r   r~  r   r  r  r   r   r  rU   N)r$   r   r   r   r*   r   rC   r}  rD   rG   rH   rI   Progress.__annotate__7  s     "$ "$^+,"$ '""$ 	"$
 ""$  %"$ "$ "$ "$ ?+"$ "$ "$ 
"$rK   c       
   
     s   \        4       V n        T;'       g    V P                  4       V n        W@n        Wn        Wn        / V n        \        ^ 4      V n	        \        T;'       g    \        4       VVVVVV P                  R7      V n        T;'       g    V P                  P                  V n        V P                  P                   V n        V P                  P"                  V n        R# )r    )r   r   r   r   r  r  get_renderableN)r   rx  get_default_columnsr   r~  r   r  _tasksr9   _task_indexr0   r)   r  rZ   r   r   printlog)rP   r   r   r   r~  r   r  r  r   r   r  r   s   &$$$$$$$$$$*rH   rO   ZProgress.__init__7  s     W
<<$":":"<%:"*,#)!9,,{}%1++..
	 !99DLL$9$9\\''
<<##rK   c                s4   < V ^8  d   QhRS[ S[R3,          /# )r=   rU   .)r!   r   rD   rG   rH   rI   r  \  s     
 
E.#*=$> 
rK   c                sP    \        R4      \        4       \        4       \        4       3# )a  Get the default columns used for a new Progress instance:
   - a text column for the description (TextColumn)
   - the bar itself (BarColumn)
   - a text column showing completion percentage (TextColumn)
   - an estimated-time-remaining column (TimeRemainingColumn)
If the Progress instance is created without passing a columns argument,
the default columns defined here will be used.

You can also create a Progress instance using custom columns before
and/or after the defaults, as in this example:

    progress = Progress(
        SpinnerColumn(),
        *Progress.get_default_columns(),
        "Elapsed:",
        TimeElapsedColumn(),
    )

This code shows the creation of a Progress display, containing
a spinner to the left, the default columns, and a labeled elapsed
time column.
r   )r   r   r   r   )rI  rc   rH   r  ZProgress.get_default_columns[  s(    2 ABK !	
 	
rK   c                r   r   )r*   rD   rG   rH   rI   r  {  s     ! ! !rK   c                r   r_   )rZ   r   rb   rc   rH   r   ZProgress.consolez  s    yy   rK   c                rm  r   )r   r  rD   rG   rH   rI   r    s     . .tDz .rK   c                    V P                   ;_uu_ 4        \        V P                  P                  4       4      uuRRR4       #   + '       g   i     R# ; i)zGet a list of Task instances.N)rx  listr  valuesrb   rc   rH   tasksZProgress.tasks~  s.     ZZZ**,- ZZZ   #AA	c                rm  r   )r   r9   rD   rG   rH   rI   r    s     , ,$v, ,rK   c                r  )zA list of task IDs.N)rx  r  r  Zkeysrb   rc   rH   task_idsZProgress.task_ids  s.     ZZZ((*+ ZZZr  c                r   r   r   rD   rG   rH   rI   r    s     G G$ GrK   c                sj   V P                   ;_uu_ 4        V P                  '       g    RRR4       R# \        ;QJ d4    R V P                  P                  4        4       F  '       d   K   RM)	  RM%! R V P                  P                  4        4       4      uuRRR4       #   + '       g   i     R# ; i)z'Check if all tasks have been completed.NTc              3   rt  r_   )r!  )ru  r   r   rH   rv  Z$Progress.finished.<locals>.<genexpr>  s     F1E}}1Erw  F)rx  r  Zallr  rb   rc   rH   r!  ZProgress.finished  sf     ZZZ;;; Z 3F1C1C1EF333F1C1C1EFF ZZZs   B!
B!)B!*,B!!B2	c                rS   rT   rV   rD   rG   rH   rI   r    s     * *t *rK   c                sf    V P                   '       g   V P                  P                  RR7       R# R# )zStart the progress display.T)rW   N)r   rZ   ra   rb   rc   rH   ra   ZProgress.start  s"    |||IIOODO) rK   c                rS   rT   rV   rD   rG   rH   rI   r    s     ! !d !rK   c                s    V P                   P                  4        V P                  P                  '       g;   V P                  P                  '       g   V P                  P                  4        R# R# R# )zStop the progress display.N)rZ   r   r   Zis_interactiveZ
is_jupyterr  rb   rc   rH   r   ZProgress.stop  sH    		||***4<<3J3J3JLL  4K*rK   c                r   r   r&   rD   rG   rH   rI   r    s      4 rK   c                r^   r_   r`   rb   rc   rH   rd   ZProgress.__enter__  re   rK   c                rf   rg   rk   rD   rG   rH   rI   r    sG      4./ -( '	
 
rK   c                r   r_   )r   rm   rn   rH   ro   ZProgress.__exit__  s     			rK   c                s   < V ^8  d   QhRS[ S[S[,          S[S[,          3,          RS[S[,          RS[RS[S[,          RS[RS[RS[S[,          /# )r=   r~   r   rM   r@   r   rA   rU   )	r$   r   r:   r   r   rC   r   r9   r   rD   rG   rH   rI   r    ss     ) ).0FFG) ) 	)
 &!) ) ) 
,	)rK   c              #  s  "   Vf   \        \        V4      4      ;'       g    RpVf   V P                  WRVR7      pMV P                  WBVR7       V P                  P
                  '       dF   \        WV4      ;_uu_ 4       pV F   pVx  V;P                  ^,          un        K"  	  RRR4       R# V P                  p	V P                  p
V F  pVx  V	! V^4       V
! 4        K  	  R#   + '       g   i     R# ; i5i)a  Track progress by iterating over a sequence.

Args:
    sequence (Sequence[ProgressType]): A sequence of values you want to iterate over and track progress.
    total: (float, optional): Total number of steps. Default is len(sequence).
    completed (int, optional): Number of steps completed so far. Defaults to 0.
    task_id: (TaskID): Task to track. Default is new task.
    description: (str, optional): Description of task, if new task is created.
    update_period (float, optional): Minimum time (in seconds) between calls to update(). Defaults to 0.1.

Returns:
    Iterable[ProgressType]: An iterable of values taken from the provided sequence.
Nrn  )
rC   r   add_taskr\   rZ   r   r<   rM   rX   rW   )rP   r~   r   rM   r@   r   rA   Ztrack_threadZvaluerX   rW   s   &&&&&&&    rH   r   ZProgress.track  s     , =+h/088DE?mmK	mRGKK	KB99!!!d];;|%EK **a/* & <;
 llGllG!#	 " <;;s*   C<A	C<,C< 'C('AC<(C9	3	C<r@   r   r   c          
      sX   < V ^8  d   QhRS[ RS[S[,          RS[S[,          RS[RS[ /# )r=   r   r   r@   r   rU   )r   r   r   r9   r   rD   rG   rH   rI   r    sM     (@ (@(@ }(@
 &!(@ (@ 
(@rK   c               sB   RpVe   TpM>Ve;   V P                   ;_uu_ 4        V P                  V,          P                  pRRR4       Vf   \        R4      hVf   V P	                  WER7      pMV P                  W5R7       \        WVRR7      #   + '       g   i     LV; i)a  Track progress file reading from a binary file.

Args:
    file (BinaryIO): A file-like object opened in binary mode.
    total (int, optional): Total number of bytes to read. This must be provided unless a task with a total is also given.
    task_id (TaskID): Task to track. Default is new task.
    description (str, optional): Description of task, if new task is created.

Returns:
    BinaryIO: A readable file-like object in binary mode.

Raises:
    ValueError: When no total value can be extracted from the arguments or the task.
Nz?unable to get the total number of bytes, please specify 'total'r   Fr   )rx  r  r   
ValueErrorr  r\   r   )rP   r   r   r@   r   Ztotal_bytess   &&&$$ rH   r   ZProgress.wrap_file  s    . (,K "kk'288 Q 
 ?mmKmCGKKK3t7?? s   BB	r   c                s   < V ^8  d   QhRS[ S[RS[3,          RS[R,          RS[RS[S[,          RS[S[,          RS[S[,          R	S[S[,          R
S[S[,          RS[RS[/
# )r=   r   r   r   r   r   r   r   r   r   r@   r   rU   )r$   r   r   r%   r   r   r9   r   rD   rG   rH   rI   r    s      C%/0 dm 	
 3-  # } &!  
rK   c               r   r_   rV   
rP   r   r   r   r   r   r   r   r@   r   
   &&&&&&&$$$rH   r   Progress.open       	rK   c                s   < V ^8  d   QhRS[ S[RS[3,          RS[ S[R,          S[R,          3,          RS[RS[S[,          RS[S[,          R	S[S[,          R
S[S[,          RS[S[,          RS[RS[/
# )r=   r   r   r   r   r   r   r   r   r   r   r@   r   rU   )r$   r   r   r%   r   r   r9   r    rD   rG   rH   rI   r    s      C%/0 GCL'$-/0 	
 3-  # } &!  
rK   c               r   r_   rV   r  r  rH   r   r    r  rK   c                s  < V ^8  d   QhRS[ S[RS[3,          RS[ S[R,          S[R,          S[R,          3,          RS[RS[S[,          R	S[S[,          R
S[S[,          RS[S[,          RS[S[,          RS[RS[ S[S[3,          /
# )r=   r   r   r   r   r   r   r   r   r   r   r   r@   r   rU   )	r$   r   r   r%   r   r   r9   r   r    rD   rG   rH   rI   r    s     K KC%/0K GDM74='#,>?K 	K
 3-K K #K }K &!K K 
x	 KrK   c               s&   RP                  \        VRR7      4      p
V
R9  d   \        RV: 24      hV^8H  pV
R8X  d&   V^8X  d   \        P                  ! R\
        4       RpM"V
R9   d   V^ 8X  d   \        R4      hV^8X  d   RpVf   \        V4      P                  pVf   V P                  WR7      pMV P                  WR7       \        P                  ! VR	VR
7      p\        WVRR7      pVR9   d   \        P                  ! VVVVVR7      # V# )a  Track progress while reading from a binary file.

Args:
    path (Union[str, PathLike[str]]): The path to the file to read.
    mode (str): The mode to use to open the file. Only supports "r", "rb" or "rt".
    buffering (int): The buffering strategy to use, see :func:`io.open`.
    encoding (str, optional): The encoding to use when reading in text mode, see :func:`io.open`.
    errors (str, optional): The error handling strategy for decoding errors, see :func:`io.open`.
    newline (str, optional): The strategy for handling newlines in text mode, see :func:`io.open`.
    total (int, optional): Total number of bytes to read. If none given, os.stat(path).st_size is used.
    task_id (TaskID): Task to track. Default is new task.
    description (str, optional): Description of task, if new task is created.

Returns:
    BinaryIO: A readable file-like object in binary mode.

Raises:
    ValueError: When an invalid mode is given.
r  F)Zreversebrzinvalid mode zaline buffering (buffering=1) isn't supported in binary mode, the default buffer size will be usedzcan't have unbuffered text I/Or  r   )r   Tr  )r   r   r   line_buffering)r  r   r   r   )r   r   )r   r   )rl   Zsortedr  warningsZwarnZRuntimeWarningr   Zst_sizer  r\   ior   r   ZTextIOWrapper)rP   r   r   r   r   r   r   r   r@   r   Z_moder  r   r   s   &&&&&&&$$$    rH   r   r    s   B tU34))}TH566 #aD=Y!^MMs Ik!A~ !ABBa	 =J&&E ?mmKm=GKKK- ty9wTB ;##!-  rK   c                $   < V ^8  d   QhRS[ RR/# r=   r@   rU   Nr9   rD   rG   rH   rI   r  k  s     2 2& 2T 2rK   c                s    V P                   ;_uu_ 4        V P                  V,          pVP                  f   V P                  4       Vn        RRR4       R#   + '       g   i     R# ; i)zStart a task.

Starts a task (used when calculating elapsed time). You may need to call this manually,
if you called ``add_task`` with ``start=False``.

Args:
    task_id (TaskID): ID of task.
N)rx  r  rl  r   )rP   r@   r   r   rH   
start_taskZProgress.start_taskk  s>     ZZZ;;w'D&"&--/ ZZZs   7AA'	c                r  r  r  rD   rG   rH   rI   r  y  s     * * *D *rK   c                s    V P                   ;_uu_ 4        V P                  V,          pV P                  4       pVP                  f   W2n        W2n        RRR4       R#   + '       g   i     R# ; i)zfStop a task.

This will freeze the elapsed time on the task.

Args:
    task_id (TaskID): ID of task.
N)rx  r  r   rl  rp  )rP   r@   r   r  r4  rH   	stop_taskZProgress.stop_tasky  sF     ZZZ;;w'D==?L&".)N ZZZs   >AA.	rM   rX   r{  rW   c                s   < V ^8  d   QhRS[ RS[S[,          RS[S[,          RS[S[,          RS[S[,          RS[S[,          RS[RS[R	R
/	# )r=   r@   r   rM   rX   r   r{  rW   r|  rU   N)r9   r   rC   r   r   r   rD   rG   rH   rI   r    sy     ; ;; 	;
 E?; %; c]; $; ; ; 
;rK   c               s   V P                   ;_uu_ 4        V P                  V,          p	V	P                  p
Ve'   W)P                  8w  d   W)n        V	P	                  4        Ve   V	;P                  V,          un        Ve   W9n        Ve   WYn        Ve   Win        V	P                  P                  V4       V	P                  V
,
          pV P                  4       pWP                  ,
          pV	P                  pVP                  pV'       d"   V^ ,          P                  V8  d
   V! 4        K)  V^ 8  d   VP                  \        W4      4       V	P                  e;   V	P                  V	P                  8  d    V	P                   f   V	P"                  V	n        RRR4       V'       d   V P%                  4        R# R#   + '       g   i     L,; i)aH  Update information associated with a task.

Args:
    task_id (TaskID): Task id (returned by add_task).
    total (float, optional): Updates task.total if not None.
    completed (float, optional): Updates task.completed if not None.
    advance (float, optional): Add a value to task.completed if not None.
    description (str, optional): Change task description if not None.
    visible (bool, optional): Set visible flag if not None.
    refresh (bool): Force a refresh of progress information. Default is False.
    **fields (Any): Additional data fields required for rendering.
N)rx  r  rM   r   rz  r   r{  r|  r\   r   r~  ry  popleftr  appendre  rA  rB  rW   )rP   r@   r   rM   rX   r   r{  rW   r|  r   completed_startupdate_completedr  old_sample_timery  r  s   &&$$$$$$,       rH   r\   ZProgress.update  sN   0 ZZZ;;w'D"nnO Ujj%8"
"')$!*&#. "&KKv&#~~?==?L*-G-GGOI''G	! 6 6 H	!#  !OP

&NNdjj0&&.%)\\"A D LLN E Zs   C4F8
B
F88G	ra   c                sx   < V ^8  d   QhRS[ RS[RS[S[,          RS[RS[S[,          RS[S[,          RS[RR	/# )
r=   r@   ra   r   rM   r{  r   r|  rU   N)r9   r   r   rC   r   r   r   rD   rG   rH   rI   r    sg     % %% 	%
 % % $% c]% % 
%rK   c               s   V P                  4       pV P                  ;_uu_ 4        V P                  V,          p	V	P                  4        V'       d   TMRV	n        Ve   W9n        WIn        Ve   WYn        V'       d   Wyn        Ve   Win	        RV	n
        RRR4       V P                  4        R#   + '       g   i     L"; i)a@  Reset a task so completed is 0 and the clock is reset.

Args:
    task_id (TaskID): ID of task.
    start (bool, optional): Start the task after reset. Defaults to True.
    total (float, optional): New total steps in task, or None to use current total. Defaults to None.
    completed (int, optional): Number of steps completed. Defaults to 0.
    visible (bool, optional): Enable display of the task. Defaults to True.
    description (str, optional): Change task description if not None. Defaults to None.
    **fields (str): Additional data fields required for rendering.
N)r   rx  r  rz  rl  r   rM   r{  r|  r   rA  rW   )
rP   r@   ra   r   rM   r{  r   r|  r  r   s
   &&$$$$$,  rH   resetZProgress.reset  s    , }}ZZZ;;w'DKKM.3lDO "
&N"&$&#. !%D  	 Zs   AB-<B--B=	c                s*   < V ^8  d   QhRS[ RS[RR/# )r=   r@   rX   rU   N)r9   rC   rD   rG   rH   rI   r    s"     1 1v 1 1d 1rK   c                s   V P                  4       pV P                  ;_uu_ 4        V P                  V,          pVP                  pV;P                  V,          un        VP                  V,
          pW0P                  ,
          pVP
                  pVP                  p	V'       d"   V^ ,          P                  V8  d
   V	! 4        K)  \        V4      R8  d
   V	! 4        K  VP                  \        W64      4       VP                  eL   VP                  VP                  8  d1   VP                  f#   VP                  Vn        VP                  Vn        RRR4       R#   + '       g   i     R# ; i)zAdvance task by a number of steps.

Args:
    task_id (TaskID): ID of task.
    advance (float): Number of steps to advance. Default is 1.
rG  N)r   rx  r  rM   r~  ry  r  r  r   r  re  r   rA  rB  r  rN  )
rP   r@   rX   r  r   r  r  r  ry  r  s
   &&&       rH   rX   ZProgress.advance  s     }}ZZZ;;w'D"nnONNg%N#~~?*-G-GGOI''G	! 6 6 H	i.4'	^LKL

&NNdjj0&&.%)\\"&*jj#) ZZZs   A=E#B-EE+	c                rS   rT   rV   rD   rG   rH   rI   r  
  s          rK   c                s    V P                   '       g;   V P                  P                  '       d   V P                  P                  4        R# R# R# )z*Refresh (render) the progress information.N)r   rZ   r[   rW   rb   rc   rH   rW   ZProgress.refresh
  s1    |||		 4 4 4II !5|rK   c                r   r   r  rD   rG   rH   rI   r    s       rK   c                s4    \        V P                  4       !  pV# )z*Get a renderable for the progress display.)r+   get_renderables)rP   r  r   rH   r  ZProgress.get_renderable  s    D0023
rK   c                rm  r   )r   r-   rD   rG   rH   rI   r    s      .!9 rK   c              #  sL   "   V P                  V P                  4      pVx  R# 5i)z5Get a number of renderables for the progress display.N)make_tasks_tabler  )rP   tabler   rH   r  ZProgress.get_renderables  s     %%djj1s   "$c                rF  )r=   r  rU   )r   r  r6   rD   rG   rH   rI   r    s      htn  rK   c                s   a R V P                    4       p\        P                  ! VRRRV P                  / pV F;  oSP                  '       g   K  VP
                  ! V3R lV P                    4       !   K=  	  V# )zGet a table to render the Progress display.

Args:
    tasks (Iterable[Task]): An iterable of Task instances, one per row of the table.

Returns:
    Table: A table instance.
c              3   s   "   T FE  p\        V\        4      '       d   \        R R7      MVP                  4       P	                  4       x  KG  	  R# 5i)Tr-  N)r  r   r5   r   Zcopy)ru  Z_columnr   rH   rv  ,Progress.make_tasks_table.<locals>.<genexpr>"  sI      
 ( gs++ t$--/4467 (s   AAZpaddingr  c              3   s   <"   T F5  p\        V\        4      '       d   VP                  SR 7      MV! S4      x  K7  	  R# 5i)r0  N)r  r   rE   )ru  Zcolumnr   s   & rH   rv  r  /  sB       '3F  *&#66 #MMtM4!'. '3s   =A )r       )r   r6   Zgridr  r{  add_row)rP   r  Ztable_columnsr  r   s   &&  @rH   r  ZProgress.make_tasks_table  so    
  <<
 

MN6N$++ND||| '+ll	  rK   c                r   r   r  rD   rG   rH   rI   r  :  s     ) ). )rK   c                s    V P                   ;_uu_ 4        V P                  4       uuRRR4       #   + '       g   i     R# ; i)z+Makes the Progress class itself renderable.N)rx  r  rb   rc   rH   __rich__ZProgress.__rich__:  s#    ZZZ&&( ZZZs	   0A	c                sT   < V ^8  d   QhRS[ RS[RS[S[,          RS[RS[RS[RS[/# )r=   r   ra   r   rM   r{  r|  rU   )r   r   r   rC   r   r   r9   rD   rG   rH   rI   r  ?  sU     ) )) ) 	)
 ) ) ) 
)rK   c                s   V P                   ;_uu_ 4        \        V P                  VVVVVV P                  V P                   R7      pWpP                  V P                  &   V'       d   V P                  V P                  4       V P                  p\        \        V P                  4      ^,           4      V n        RRR4       V P                  4        X#   + '       g   i     L"; i)a  Add a new 'task' to the Progress display.

Args:
    description (str): A description of the task.
    start (bool, optional): Start the task immediately (to calculate elapsed time). If set to False,
        you will need to call `start` manually. Defaults to True.
    total (float, optional): Number of total steps in the progress if known.
        Set to None to render a pulsing animation. Defaults to 100.
    completed (int, optional): Number of steps completed so far. Defaults to 0.
    visible (bool, optional): Enable display of the task. Defaults to True.
    **fields (str): Additional data fields required for rendering.

Returns:
    TaskID: An ID you can use when calling `update`.
)r{  r|  rj  rx  N)	rx  r  r  r   r  r  r9   r   rW   )	rP   r   ra   r   rM   r{  r|  r   Znew_task_indexs	   &&&&&&,  rH   r  ZProgress.add_task?  s    0 ZZZ  --jj	D -1KK(() 0 01!--N%c$*:*:&;a&?@D   	# Zs   B#CC"	c                r  r  r  rD   rG   rH   rI   r  j  s     % %6 %d %rK   c                s    V P                   ;_uu_ 4        V P                  V RRR4       R#   + '       g   i     R# ; i)zEDelete a task if it exists.

Args:
    task_id (TaskID): A task ID.

N)rx  r  )rP   r@   r   rH   remove_taskZProgress.remove_taskj  s%     ZZZG$ ZZZs   ->	)rx  r  r  r   r   r  r   rZ   r  r  r~  )Nr    N
Working...皙?r_   r   NNNr   r   NNN)r  )Trr  r    T)$rp   rq   rr   rs   rt   rO   rO  r  r   r   r  r  r!  ra   r   rd   ro   r   r   typingoverloadr   r  r  r\   r  rX   rW   r  r  r  r  r  r  ru   rv   r   r   rH   r?   r?   '  s    "$ &*"$ "	"$
 %'"$ (,"$  "$ !%"$ !%"$ /3"$ "$ "$ "$H 
 
< ! ! . .
 , ,
 G G* *
! !  ) )V(@
 %)(@ ((@ (@T __  $ %) (   __  $ %) (  K  $K %)K (K KZ2 2* *; "&	;
 &*; $(; &*; #'; ; ;z% 	%
 "&% % #'% &*% %N1 1<   
 
 
 B) )
) )V% %rK   r?   Z__main__)Panel)Rule)Syntax)r6   a~  def loop_last(values: Iterable[T]) -> Iterable[Tuple[bool, T]]:
    """Iterate and generate a tuple with a flag for last value."""
    iter_values = iter(values)
    try:
        previous_value = next(iter_values)
    except StopIteration:
        return
    for value in iter_values:
        yield False, previous_value
        previous_value = value
    yield True, previous_valueZpython)Zline_numbersZfooZbarZbazZ1Z2Z3z:Text may be printed while the progress bars are rendering.z(In fact, [i]any[/i] renderable will workzSuch as [magenta]tables[/]...zPretty printed structures...ZtypeZexampler"  zPretty printedz	Syntax...zGive it a try!)cycle)Zrecordz[red]DownloadingrG  r  z[green]Processingz[yellow]ThinkingrP  r   g333333?g{Gz?)   i   )r  i   )r  Nr    TNFNi
   rz   r{   r|   r}   r  FTr  r  )r  Zsysr  r  Zabcr   r   Zcollectionsr   Zdataclassesr   r   Zdatetimer   r   r	   Zmathr
   r   Zoperatorr   Zosr   r   Z	threadingr   r   r   Ztypesr   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   Zversion_infor%   Zpip._vendor.typing_extensionsr'   r  r(   r)   r   r*   r+   r,   r-   r*  r.   Zjupyterr/   rZ   r0   Zprogress_barr2   r  r3   r   r4   r  r5   r6   r"  r7   r8   r   r9   r:   rC   r}  r;   r<   r   r   r   r   r  r   r   r  r  r   r   r<  r   r   rV  rZ  r[  r   rd  re  r  r?   rp   ZrandomZtimeZpanelr  Zruler  Zsyntaxr  r  Zprogress_renderablesZ	itertoolsr  Zexamplesr  r>   r  Ztask1Ztask2Ztask3r!  r\   ZsleepZrandintr  r   rV   rK   rH   <module>r     s   	 
   #  (  .      * *     * v5w2 # B B $ !  %      	3	~&2u9% ^^D&(+%6 %PI
Xd1i d1N8>"%wr{ 8*>* $	>*
 >* "&>* >* /3>* !#>* ">* !/>* !/>* )>* >*B 	  	 $	 	 "&	 	 /3	 !#	 "	  !/!	" !/#	$ )%	& '	 	0 	  	 $	 	 "&	 	 /3	 !#	 "	  !/!	" !/#	$ )%	& '	 	0S*  S* $S* S* "&S* S* /3S* !#S* "S*  !/!S*" !/#S*$ )%S*& 'S* S*l'1S '1T~ "/N /d <'
 '
T	: 	:E EP-,. -,`:^ :@. @
 
6.^ .b	D. 	D%Z % z# z# z#zK	%| K	%\ z
	" 	F  %&E	MM#sC  	E89'&	F$45
  )*HT"G	
		%	%	'
 	
 	

 
 
 
!!"4D!A!!"5T!B!!"4D!A###OOE3O/OOE3O/JJt~~a%)T(^, $
 
] \
 
 
s   <AQAQQQ	