
    hu                        S r SSKrSSKJrJr  SSKJr  SSK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  S
SKJr  S
SKJrJrJrJrJrJrJrJrJrJrJrJr  Sr / SQr! " S S\"5      r# " S S\$5      r% " S S\&5      r' " S S\'\(5      r) " S S\'\*5      r+ " S S\'\,5      r-S r. " S S\/5      r0 " S S\/5      r1 " S  S!\/5      r2 " S" S#\5      r3S$ r4g)%z
Customisable progressbar decorator for iterators.
Includes a default `range` iterator printing to `stderr`.

Usage:
>>> from tqdm import trange, tqdm
>>> for i in trange(10):
...     ...
    N)OrderedDictdefaultdict)contextmanager)datetime	timedeltatimezone)Number)time)warn)WeakSet   )TMonitor)CallbackIOWrapper
ComparableDisableOnWriteErrorFormatReplaceSimpleTextIOWrapper	_is_ascii_screen_shape_wrapper_supports_unicode_term_move_updisp_len	disp_trimenvwrapz*https://github.com/tqdm/tqdm#contributions)tqdmtrangeTqdmTypeErrorTqdmKeyErrorTqdmWarningTqdmExperimentalWarningTqdmDeprecationWarningTqdmMonitorWarningc                       \ rS rSrSrg)r        N__name__
__module____qualname____firstlineno____static_attributes__r%       :/var/www/html/env/lib/python3.13/site-packages/tqdm/std.pyr   r           r,   r   c                       \ rS rSrSrg)r   $   r%   Nr&   r%   r,   r-   r   r   $   r.   r,   r   c                   0   ^  \ rS rSrSrSU 4S jjrSrU =r$ )r   (   zibase class for all tqdm warnings.

Used for non-external-code-breaking errors, such as garbled printing.
c                    > Ub@  U" SU R                   R                  -   S-   [        U5      R                  5       -   S-   5        g [        TU ]  " U/UQ70 UD6  g )N
: )	__class__r'   strrstripsuper__init__)selfmsgfp_writeakr6   s        r-   r:   TqdmWarning.__init__-   sR    TDNN333d:SX__=NNQUUVGS*1**r,   r%   N)r'   r(   r)   r*   __doc__r:   r+   __classcell__)r6   s   @r-   r   r   (   s    + +r,   r   c                       \ rS rSrSrSrg)r    4   z(beta feature, unstable API and behaviourr%   Nr'   r(   r)   r*   rB   r+   r%   r,   r-   r    r    4   s    2r,   r    c                       \ rS rSrSrg)r!   9   r%   Nr&   r%   r,   r-   r!   r!   9   s    r,   r!   c                       \ rS rSrSrSrg)r"   >   z>tqdm monitor errors which do not affect external functionalityr%   NrF   r%   r,   r-   r"   r"   >   s    Hr,   r"   c                  L     SSK Jn  U" U 0 UD6$ ! [        [        4 a     gf = f)zthreading RLockr   RLockN)	threadingrM   ImportErrorOSError)argskwargsrM   s      r-   TRLockrS   C   s1    #d%f%%! s    ##c                   d    \ rS rSrSr\" 5       rS rS rS r	S r
S r\S 5       r\S	 5       rS
rg)TqdmDefaultWriteLockL   a~  
Provide a default write lock for thread and multiprocessing safety.
Works only on platforms supporting `fork` (so Windows is excluded).
You must initialise a `tqdm` or `TqdmDefaultWriteLock` instance
before forking in order for the write lock to work.
On Windows, you need to supply the lock from the parent to the children as
an argument to joblib or the parallelism lib you use.
c                    [        U 5      nUR                  nUb  UR                  5         UR                  5         UR                  UR                  4 Vs/ s H	  o3c  M  UPM     snU l        Ub  UR                  5         g g s  snf rA   )typeth_lockacquirecreate_mp_lockmp_locklocksrelease)r;   cls	root_locklks       r-   r:   TqdmDefaultWriteLock.__init__Z   sv     4jKK	 $'KK#=P#=Rb#=P
  ! Qs   BBc                 N    U R                    H  nUR                  " U0 UD6  M     g rA   )r]   rZ   )r;   r>   r?   locks       r-   rZ   TqdmDefaultWriteLock.acquiref   s!    JJDLL!!q! r,   c                 V    U R                   S S S2    H  nUR                  5         M     g )N)r]   r^   )r;   rd   s     r-   r^   TqdmDefaultWriteLock.releasej   s"    JJtt$DLLN %r,   c                 $    U R                  5         g rA   )rZ   r;   s    r-   	__enter__TqdmDefaultWriteLock.__enter__n       r,   c                 $    U R                  5         g rA   )r^   )r;   excs     r-   __exit__TqdmDefaultWriteLock.__exit__q   rm   r,   c                     [        U S5      (       d   SSKJn  U" 5       U l        g g ! [        [
        4 a
    S U l         g f = f)Nr\   r   rL   )hasattrmultiprocessingrM   r\   rO   rP   )r_   rM   s     r-   r[   #TqdmDefaultWriteLock.create_mp_lockt   sB    sI&&#1#g '  ) #"#s   ' A Ac                 H    [        U S5      (       d   e[        S[        SS9  g )NrY   z!create_th_lock not needed anymore   
stacklevel)rs   r   r!   r_   s    r-   create_th_lock#TqdmDefaultWriteLock.create_th_lock}   s$    sI&&&&02HUVWr,   )r]   N)r'   r(   r)   r*   rB   rS   rY   r:   rZ   r^   rk   rp   classmethodr[   r{   r+   r%   r,   r-   rU   rU   L   sS     hG
 " # # X Xr,   rU   c                       \ rS rSrSrSrSSR                  \" \\	" SSS5      5      5      -   r
S	rS
rSrSSSSSSSSS.rS\
S4S jr\S 5       r\R$                  S 5       rS rSrg)Bar   ai  
`str.format`-able bar with format specifiers: `[width][type]`

- `width`
  + unspecified (default): use `self.default_len`
  + `int >= 0`: overrides `self.default_len`
  + `int < 0`: subtract from `self.default_len`
- `type`
  + `a`: ascii (`charset=self.ASCII` override)
  + `u`: unicode (`charset=self.UTF` override)
  + `b`: blank (`charset="  "` override)
z 123456789#  i%  i%  rg   z  z[0mz[38;2;%d;%d;%dmz[30mz[31mz[32mz[33mz[34mz[35mz[36mz[37m)BLACKREDGREENYELLOWBLUEMAGENTACYANWHITE
   Nc                     SUs=::  a  S::  d'  O  [        S[        SS9  [        S[        SU5      5      nUS:  d   eXl        X l        X0l        X@l        g )Nr   r   zclamping frac to range [0, 1]rw   rx   )r   r   maxminfracdefault_lencharsetcolour)r;   r   r   r   r   s        r-   r:   Bar.__init__   sM    D~A~0+!Lq#a,'DQ	&r,   c                     U R                   $ rA   )_colourrj   s    r-   r   
Bar.colour   s    ||r,   c           	         U(       d  S U l         g  UR                  5       U R                  ;   a#  U R                  UR                  5          U l         g US   S:X  a@  [        U5      S:X  a1  U R                  [        S USS USS USS 4 5       5      -  U l         g [        e! [        [        4 a;    [        SU< S	S
R                  U R                  5      < S3[        SS9  S U l          g f = f)Nr   #   c              3   :   #    U  H  n[        US 5      v   M     g7f)   N)int).0is     r-   	<genexpr>Bar.colour.<locals>.<genexpr>   s      7N(L1C2JJ(Ls   r         zUnknown colour (z"); valid choices: [hex (#00ff00), , ]rw   rx   )r   upperCOLOURSlen
COLOUR_RGBtupleKeyErrorAttributeErrorr   joinr   )r;   values     r-   r   r      s    DL	 {{},#||EKKM:qSSZ1_# 7N).qU1QZq(L7N 2N  N .) 	 		$,,/1,  DL		 s    A B! AB! B! !AC,+C,c                 l   U(       at  US   R                  5       n U R                  U R                  U R                  S.U   nUS S nU(       a   [        U5      nUS:  a  X@R                  -  nO%U R                  nOU R
                  nU R                  n[        U5      S-
  n[        [        U R                  U-  U-  5      U5      u  pgUS   U-  nXd:  a  XU   -   US   XF-
  S-
  -  -   nU R                  (       a  U R                  U-   U R                  -   $ U$ ! [         a    U R
                  n Nf = f)Nrg   )r>   ubr   r   )lowerASCIIUTFBLANKr   r   r   r   r   divmodr   r   COLOUR_RESET)	r;   format_spec_typer   N_BARSnsyms
bar_lengthfrac_bar_lengthress	            r-   
__format__Bar.__format__   s0   O))+E/ $



KER *#2.[)A:...F))llG%%FGq &,SV1Ce1K-Le&T#
bkJ&0071:ATWXAX3YYC8<t{{S 4#4#44LL)  ',,'s   'D D32D3)r   r   r   r   r   )r'   r(   r)   r*   rB   r   r   mapchrranger   r   r   r   r   r:   propertyr   setterr   r+   r%   r,   r-   r   r      s     E
#c5#<=>
>CEL&J":
#ZJ!J8G *,S    ]]   $Mr,   r   c                   ,    \ rS rSrSrSS jrSS jrSrg)	EMA   a7  
Exponential moving average: smoothing to give progressively lower
weights to older values.

Parameters
----------
smoothing  : float, optional
    Smoothing factor in range [0, 1], [default: 0.3].
    Increase to give more weight to recent values.
    Ranges from 0 (yields old value) to 1 (yields new value).
c                 ,    Xl         SU l        SU l        g )Nr   alphalastcalls)r;   	smoothings     r-   r:   EMA.__init__   s    
	
r,   Nc                    SU R                   -
  nUb8  U R                   U-  X R                  -  -   U l        U =R                  S-  sl        U R                  (       a  U R                  SX R                  -  -
  -  $ U R                  $ )zC
Parameters
----------
x  : float
    New value to include in EMA.
r   r   )r;   xbetas      r-   __call__EMA.__call__   sh     4::~=

Q		)99DIJJ!OJ7;zztyyA

 223PtyyPr,   )r   r   r   )333333?rA   )r'   r(   r)   r*   rB   r:   r   r+   r%   r,   r-   r   r      s    

Qr,   r   c            
       6   \ rS rSrSrSrSr\" 5       r\	S1S j5       r
\	S 5       r\	S 5       r\	S 5       r\	   S2S	 j5       rS
 r\S3S j5       r\S 5       r\S4S j5       r\\S5S j5       5       r\S 5       r\S 5       r\S 5       r\" SS\\\\\S.S9      S6S j5       rS rS rS rS r S r!S r"S r#S r$\%S 5       r&S  r'S! r(S7S" jr)S# r*S8S$ jr+S9S% jr,S& r-S3S' jr.S:S( jr/S:S) jr0S:S* jr1S;S+ jr2S, r3\%S- 5       r4S<S. jr5\\S:S/ j5       5       r6S0r7g)=r      a  
Decorate an iterable object, returning an iterator which acts exactly
like the original iterable, but prints a dynamically updating
progressbar every time a value is requested.

Parameters
----------
iterable  : iterable, optional
    Iterable to decorate with a progressbar.
    Leave blank to manually manage the updates.
desc  : str, optional
    Prefix for the progressbar.
total  : int or float, optional
    The number of expected iterations. If unspecified,
    len(iterable) is used if possible. If float("inf") or as a last
    resort, only basic progress statistics are displayed
    (no ETA, no progressbar).
    If `gui` is True and this parameter needs subsequent updating,
    specify an initial arbitrary large positive number,
    e.g. 9e9.
leave  : bool, optional
    If [default: True], keeps all traces of the progressbar
    upon termination of iteration.
    If `None`, will leave only if `position` is `0`.
file  : `io.TextIOWrapper` or `io.StringIO`, optional
    Specifies where to output the progress messages
    (default: sys.stderr). Uses `file.write(str)` and `file.flush()`
    methods.  For encoding, see `write_bytes`.
ncols  : int, optional
    The width of the entire output message. If specified,
    dynamically resizes the progressbar to stay within this bound.
    If unspecified, attempts to use environment width. The
    fallback is a meter width of 10 and no limit for the counter and
    statistics. If 0, will not print any meter (only stats).
mininterval  : float, optional
    Minimum progress display update interval [default: 0.1] seconds.
maxinterval  : float, optional
    Maximum progress display update interval [default: 10] seconds.
    Automatically adjusts `miniters` to correspond to `mininterval`
    after long display update lag. Only works if `dynamic_miniters`
    or monitor thread is enabled.
miniters  : int or float, optional
    Minimum progress display update interval, in iterations.
    If 0 and `dynamic_miniters`, will automatically adjust to equal
    `mininterval` (more CPU efficient, good for tight loops).
    If > 0, will skip display of specified number of iterations.
    Tweak this and `mininterval` to get very efficient loops.
    If your progress is erratic with both fast and slow iterations
    (network, skipping items, etc) you should set miniters=1.
ascii  : bool or str, optional
    If unspecified or False, use unicode (smooth blocks) to fill
    the meter. The fallback is to use ASCII characters " 123456789#".
disable  : bool, optional
    Whether to disable the entire progressbar wrapper
    [default: False]. If set to None, disable on non-TTY.
unit  : str, optional
    String that will be used to define the unit of each iteration
    [default: it].
unit_scale  : bool or int or float, optional
    If 1 or True, the number of iterations will be reduced/scaled
    automatically and a metric prefix following the
    International System of Units standard will be added
    (kilo, mega, etc.) [default: False]. If any other non-zero
    number, will scale `total` and `n`.
dynamic_ncols  : bool, optional
    If set, constantly alters `ncols` and `nrows` to the
    environment (allowing for window resizes) [default: False].
smoothing  : float, optional
    Exponential moving average smoothing factor for speed estimates
    (ignored in GUI mode). Ranges from 0 (average speed) to 1
    (current/instantaneous speed) [default: 0.3].
bar_format  : str, optional
    Specify a custom bar string formatting. May impact performance.
    [default: '{l_bar}{bar}{r_bar}'], where
    l_bar='{desc}: {percentage:3.0f}%|' and
    r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, '
        '{rate_fmt}{postfix}]'
    Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt,
        percentage, elapsed, elapsed_s, ncols, nrows, desc, unit,
        rate, rate_fmt, rate_noinv, rate_noinv_fmt,
        rate_inv, rate_inv_fmt, postfix, unit_divisor,
        remaining, remaining_s, eta.
    Note that a trailing ": " is automatically removed after {desc}
    if the latter is empty.
initial  : int or float, optional
    The initial counter value. Useful when restarting a progress
    bar [default: 0]. If using float, consider specifying `{n:.3f}`
    or similar in `bar_format`, or specifying `unit_scale`.
position  : int, optional
    Specify the line offset to print this bar (starting from 0)
    Automatic if unspecified.
    Useful to manage multiple bars at once (eg, from threads).
postfix  : dict or *, optional
    Specify additional stats to display at the end of the bar.
    Calls `set_postfix(**postfix)` if possible (dict).
unit_divisor  : float, optional
    [default: 1000], ignored unless `unit_scale` is True.
write_bytes  : bool, optional
    Whether to write bytes. If (default: False) will write unicode.
lock_args  : tuple, optional
    Passed to `refresh` for intermediate output
    (initialisation, iterating, and updating).
nrows  : int, optional
    The screen height. If specified, hides nested bars outside this
    bound. If unspecified, attempts to use environment height.
    The fallback is 20.
colour  : str, optional
    Bar colour (e.g. 'green', '#00ff00').
delay  : float, optional
    Don't display until [default: 0] seconds have elapsed.
gui  : bool, optional
    WARNING: internal parameter - do not use.
    Use tqdm.gui.tqdm(...) instead. If set, will attempt to use
    matplotlib animations for a graphical output [default: False].

Returns
-------
out  : decorated iterator.
r   Nc                     S HU  n[        U 5      S:  a?  [        U 5      S:  a%  [        U 5      S:  a  U S U U 3s  $ U S U U 3s  $ U S U U 3s  $ X-  n MW     U S S	U 3$ )
a_  
Formats a number (greater than unity) with SI Order of Magnitude
prefixes.

Parameters
----------
num  : float
    Number ( >= 1) to format.
suffix  : str, optional
    Post-postfix [default: ''].
divisor  : float, optional
    Divisor between prefixes [default: 1000].

Returns
-------
out  : str
    Number with Order of Magnitude SI unit postfix.
)r   r?   MGTPEZg     <@gX@g=
ףp#@z1.2fz2.1f3.0fz3.1fY)abs)numsuffixdivisorunits       r-   format_sizeoftqdm.format_sizeofr  s    ( <D3x%s8e#3x%'"%dD6&::!$ZvfX66dD6&22NC < d1VH%%r,   c                     [        [        U 5      S5      u  p[        US5      u  p4U(       a  US SUS SUS 3$ US SUS 3$ )z
Formats a number of seconds as a clock time, [H:]MM:SS

Parameters
----------
t  : int
    Number of seconds.

Returns
-------
out  : str
    [H:]MM:SS
<   d:02d)r   r   )tminsshms        r-   format_intervaltqdm.format_interval  sW     Q$dB+,!Aa#wa#w'DQsG1QsG2DDr,   c                     U S R                  SS5      R                  SS5      n[        U 5      n [        U5      [        U 5      :  a  U$ U $ )z
Intelligent scientific notation (.3g).

Parameters
----------
n  : int or float or Numeric
    A Number.

Returns
-------
out  : str
    Formatted number.
z.3gze+0ze+ze-0ze-)replacer7   r   )nfs     r-   
format_numtqdm.format_num  sI     gud+33E4@FFSVOq**r,   c                   ^^^^ U m[        TSS 5      mT[        R                  [        R                  4;   aB  [        [        R                  SS 5      " 5         [        [        R                  SS 5      " 5         UU4S jmS/mUU4S jnU$ )z
Manage the printing and in-place updating of a line of characters.
Note that if the string is longer than a line, then in-place
updating may not work (it will print a new line at each refresh).
flushc                      g rA   r%   r%   r,   r-   <lambda>%tqdm.status_printer.<locals>.<lambda>  s    r,   c                      g rA   r%   r%   r,   r-   r   r         r,   c                      g rA   r%   r%   r,   r-   r   r     r   r,   c                 H   > TR                  [        U 5      5        T" 5         g rA   )writer7   )r   fpfp_flushs    r-   r=   %tqdm.status_printer.<locals>.fp_write  s    HHSVJr,   r   c                 h   > [        U 5      nT" SU -   S[        TS   U-
  S5      -  -   5        UTS'   g )Nr   r   )r   r   )r   len_sr=   last_lens     r-   print_status)tqdm.status_printer.<locals>.print_status  s;    QKETAXs8A;+>'B!BCDHQKr,   )getattrsysstderrstdout)filer
  r  r  r=   r	  s     @@@@r-   status_printertqdm.status_printer  sn     2w5#**cjj))CJJ68CJJ68	 3	 
 r,   c                    U(       a
  XS-   :  a  SnU(       a"  US;  a  U(       a  X-  nX-  n U(       a  X-  nSn[         R                  U5      nUc  U(       a  X-
  U-  nU(       a  SU-  OSn[         R                  nU(       a  U(       a  U" U5      OUS OSU-   S-   nU(       a  U(       a  U" U5      OUS OSS	-   U-   nU(       a  US:  a  UOUnU(       a  U" XS
9nUb  U" XS
9OSnO[        U 5      nUb  [        U5      OSn U
(       a  SU
-   OSn
U(       a  U(       a  X-
  U-  OSnU(       a  [         R                  U5      OSn U(       a&  U(       a  [
        R                  " 5       [        US9-   O$[
        R                  " S[        R                  5      nU(       a  USS S:H  nU(       a  UOUS-   nOSnSU SU SU SU SU U
 S3n0 SU _SU_SU_SU_SU_SU_SU_SU=(       d    S_SU_SU(       a  US:  a  UOU_S U_S!U_S"U_S#U_S$U_S%U
_S&U_UUUUUUS'.EUEnU(       GaJ  X-  nUS(-  nUUS) S*3-  nUS:X  a  USS+ USS -   $ UR                  US,9  U	(       a)  UR                  US-9  U(       d  U	R                  S.S5      n	OS/n	[        5       n U	R                   " S6S0U 0UD6n!U R"                  (       d  U!$ [%        UU(       a  [        SU['        U!5      -
  5      OS1US2L a  [$        R(                  OU=(       d    [$        R*                  US39n [-        U R.                  5      (       d  [-        U	5      (       a  [        U	5      n	U	R                   " S6S0U 0UD6n"U(       a  [1        U"U5      $ U"$ U	(       a  US4-  nUR                  USS59  [        5       n U	R                   " S6S0U 0UD6n!U R"                  (       d  U!$ [%        SU(       a  [        SU['        U!5      -
  5      OS1[$        R2                  US39n U	R                   " S6S0U 0UD6n"U(       a  [1        U"U5      $ U"$ U(       a  US-   OS U U SU SU U
 S3	$ ! [         a     GN?f = f! [         a    [
        R                  n GNf = f)7a	  
Return a string-based progress bar given some parameters

Parameters
----------
n  : int or float
    Number of finished iterations.
total  : int or float
    The expected total number of iterations. If meaningless (None),
    only basic progress statistics are displayed (no ETA).
elapsed  : float
    Number of seconds passed since start.
ncols  : int, optional
    The width of the entire output message. If specified,
    dynamically resizes `{bar}` to stay within this bound
    [default: None]. If `0`, will not print any bar (only stats).
    The fallback is `{bar:10}`.
prefix  : str, optional
    Prefix message (included in total width) [default: ''].
    Use as {desc} in bar_format string.
ascii  : bool, optional or str, optional
    If not set, use unicode (smooth blocks) to fill the meter
    [default: False]. The fallback is to use ASCII characters
    " 123456789#".
unit  : str, optional
    The iteration unit [default: 'it'].
unit_scale  : bool or int or float, optional
    If 1 or True, the number of iterations will be printed with an
    appropriate SI metric prefix (k = 10^3, M = 10^6, etc.)
    [default: False]. If any other non-zero number, will scale
    `total` and `n`.
rate  : float, optional
    Manual override for iteration rate.
    If [default: None], uses n/elapsed.
bar_format  : str, optional
    Specify a custom bar string formatting. May impact performance.
    [default: '{l_bar}{bar}{r_bar}'], where
    l_bar='{desc}: {percentage:3.0f}%|' and
    r_bar='| {n_fmt}/{total_fmt} [{elapsed}<{remaining}, '
      '{rate_fmt}{postfix}]'
    Possible vars: l_bar, bar, r_bar, n, n_fmt, total, total_fmt,
      percentage, elapsed, elapsed_s, ncols, nrows, desc, unit,
      rate, rate_fmt, rate_noinv, rate_noinv_fmt,
      rate_inv, rate_inv_fmt, postfix, unit_divisor,
      remaining, remaining_s, eta.
    Note that a trailing ": " is automatically removed after {desc}
    if the latter is empty.
postfix  : *, optional
    Similar to `prefix`, but placed at the end
    (e.g. for additional stats).
    Note: postfix is usually a string (not a dict) for this method,
    and will if possible be set to postfix = ', ' + postfix.
    However other types are supported (#382).
unit_divisor  : float, optional
    [default: 1000], ignored unless `unit_scale` is True.
initial  : int or float, optional
    The initial counter value [default: 0].
colour  : str, optional
    Bar colour (e.g. 'green', '#00ff00').

Returns
-------
out  : Formatted meter and stats, ready to display.
g      ?N)Tr   Fr   z5.2f?z/szs/)r   r   r   r   )secondsr5   z| /z [<r   r   n_fmttotal	total_fmtelapsed	elapsed_sncolsdescr   raterate_fmt
rate_noinvrate_noinv_fmtrate_invrate_inv_fmtpostfixunit_divisor)r   	remainingremaining_sl_barr_baretad   r   z%|rg   )r*  )
percentagez{desc}: z{l_bar}{bar}{r_bar}barr   T)r   r   |)r*  r.  r%   )r   r   r   r7   	TypeErrorr   nowr   fromtimestampr   utcOverflowErrorr   updater   r   formatformat_calledr   r   r   r   r   r   r   r   )#r   r  r  r  prefixasciir   
unit_scaler   
bar_formatr&  r'  initialr   extra_kwargselapsed_strinv_rater   r#  r%  r!  r  r  r(  remaining_streta_dtbool_prefix_colon_alreadyr*  r+  format_dictr   r.  full_barnobarr   s#                                      r-   format_metertqdm.format_meter  s1   L Q3;'E *I5#OA"J**73 <GK7*D#1t8**! 3==.T$K'*d359:  )3]8$8D/ D)+/0 $,1<.!!:EFKFWeB]`IFE&+&7E
SI	(/dWnRG +/5UY$&a	;?,,Y7S	"% llny'CC-5-C-CAx||-T  )/)<%7FVd]EEUG1YKr+ab
SZR[[\]U$+U4? { %0 U	 #FLb	 39$	
 X\Ht  #/ n /9( L w !/ &yU6 " 9DJ
4(++EzSbzE!"I--U+""j"9 !+!3!3J!CJ2
$H%%B(BkBE)) 4>C3q%(5/"9:053995CSCGG"(*H X--..9Z3H3H _
##@@K@C,19S%(:s:SLEUq9$H%%B(BkBE))1>C3q%(5/"9:#&99V=H ##@@K@C,19S%(:s: +1b9gdV2k]"XJwiqJ Ku  		  	"\\F	"s%   	Q	 AQ 	
QQQ87Q8c                    [         R                  U 5      nU R                  5          U R                  R	                  U5        U R
                  (       aG  U R                  b  U R                  R                  5       (       d   [        X R
                  5      U l        S S S 5        U$ ! [         a,  n[        S[        U5      -   [        SS9  SU l         S nAN;S nAff = f! , (       d  f       U$ = f)Nz>tqdm:disabling monitor support (monitor_interval = 0) due to:
rw   rx   r   )object__new__get_lock
_instancesaddmonitor_intervalmonitorreportr   	Exceptionr   r7   r"   )r_   ___instancees        r-   rK  tqdm.__new__  s    >>#&\\^NNx(##)<030B0B0D0D-"*30D0D"ECK   ! - =?B1vF+; ,-C((	- ^ s0   AC B$$
C."CCCC
C,c           	         U R                    Vs1 s H1  nX!Ld  M	  [        US5      (       d  M  [        UR                  5      iM3     nn[	        [        [        [        U5      S-   5      5      R                  U5      5      $ s  snf )zSkips specified instance.posr   )	rM  rs   r   rY  r   setr   r   
difference)r_   rU  inst	positionss       r-   _get_free_postqdm._get_free_pos  ss     03~~ G~t, #18u1E #S]~	 G3uS^a/01<<YGHHGs   BBBc                   ^ U R                       U R                  R                  U5        UR                  (       dv  UR
                  =(       d    SS-
  m[        [        U4S jU R                  5      5      nU(       a4  [        US S9nUR                  SS9  [        UR                  5      Ul        SSS5        g! [         a     Nf = f! , (       d  f       g= f)	a  
Remove from list and reposition another unfixed bar
to fill the new gap.

This means that by default (where all nested bars are unfixed),
order is not maintained but screen flicker/blank space is minimised.
(tqdm<=4.44.1 moved ALL subsequent unfixed bars up.)
   r   c                 H   > [        U S5      =(       a    TU R                  :*  $ )NrY  )rs   rY  )r   r   s    r-   r   &tqdm._decr_instances.<locals>.<lambda>  s    ga/ADAEEMAr,   c                     U R                   $ rA   rY  )r   s    r-   r   rc    s    r,   )keyTnolockN)_lockrM  remover   guinrowslistfilterr   clearr   rY  )r_   rU  	instancesr\  r   s       @r-   _decr_instancestqdm._decr_instances  s     YY%%h/ << ,"1 ANN"$ %	 yo>DJJdJ+"8<<0DH% Y    Ys.   CB;BC;
CCCC
Cc                     Ub  UO[         R                  nU R                  X$S9   UR                  U5        UR                  U5        SSS5        g! , (       d  f       g= f)z5Print a message via tqdm (without overlap with bars).N)r  rh  )r  r  external_write_moder  )r_   r   r  endrh  r  s         r-   r  
tqdm.write  sG     %T3::$$$$>HHQKHHSM ?>>s   #A
Ac              #   F  #    Ub  UO[         R                  n U(       d  U R                  5       R                  5         / n[	        U S/ 5       Hj  n[        US5      (       d  M  UR                  U:X  d$  [        S X5R                  4 5       5      (       d  MJ  UR                  SS9  UR                  U5        Ml     Sv   U H  nUR                  SS9  M     U(       d  U R                  R                  5         gg! U(       d  U R                  R                  5         f f = f7f)zh
Disable tqdm within context and refresh tqdm when exits.
Useful when writing to standard output stream
NrM  start_tc              3   f   #    U  H'  o[         R                  [         R                  4;   v   M)     g 7frA   )r  r  r  )r   r   s     r-   r   +tqdm.external_write_mode.<locals>.<genexpr>  s%      FN?L!cjj#**55}s   /1Trg  )r  r  rL  rZ   r  rs   r  allro  appendrefreshri  r^   )r_   r  rh  r  inst_clearedr\  s         r-   rt  tqdm.external_write_mode  s      %T3::	$&&(L\26 4++B# FN@BGG}FN CN CNJJdJ+ ''- 7 $D) % 		!!# 6		!!# s*   D!AC: #0C: A C: #D!:$DD!c                     Xl         g)zSet the global lock.N)ri  )r_   rd   s     r-   set_locktqdm.set_lock  s	     	r,   c                 Z    [        U S5      (       d  [        5       U l        U R                  $ )z7Get the global lock. Construct it if it does not exist.ri  )rs   rU   ri  rz   s    r-   rL  tqdm.get_lock  s%     sG$$,.CIyyr,   c                   ^ ^^^^ SSK JnJn  SSKJn  SSKJm   U" 5          U" S[        S9  SSKJ	n  SSS5        S	u  pg SS
KJm   SSKJn  SSKJn	   SSKJn
   SSKJn  TR1                  5       mTR3                  SS5      /mSUUU UU4S jjnU" 5       Tl        U" 5       Ul        U" S5      Tl        U" S5      Ul        U" 5       Ul        U" 5       U	l        U" S5      Ul        U" S5      Ul        U" S5      U	l        Wb  U" 5       Ul        Ub  U" 5       Ul        U" 5       U
l        U" S5      U
l        U" S5      U
l        Ub  Ub  U" 5       Ul        U" 5       Ul        gTb  U" 5       Tl        gg! , (       d  f       GNI= f! [         a    Sn GN[f = f! [         aB     SS
KJm   GNh! [         a*     SSKJn  SSKJn  Xg4m  GN! [         a    Sm   GNf = ff = ff = f! [         a'     SSKJn	Jn   GN! [         a    SSKJn	Jn    GNf = ff = f! [         a
    SSKJn
   GNf = f! [         a     SSKJn   GN! [         a    Sn  GNf = ff = f)a  
Registers the current `tqdm` class with
    pandas.core.
    ( frame.DataFrame
    | series.Series
    | groupby.(generic.)DataFrameGroupBy
    | groupby.(generic.)SeriesGroupBy
    ).progress_apply

A new instance will be created every time `progress_apply` is called,
and each instance will automatically `close()` upon completion.

Parameters
----------
tqdm_kwargs  : arguments for the tqdm instance

Examples
--------
>>> import pandas as pd
>>> import numpy as np
>>> from tqdm import tqdm
>>> from tqdm.gui import tqdm as tqdm_gui
>>>
>>> df = pd.DataFrame(np.random.randint(0, 100, (100000, 6)))
>>> tqdm.pandas(ncols=50)  # can use tqdm_gui, optional kwargs, etc
>>> # Now you can use `progress_apply` instead of `apply`
>>> df.groupby(0).progress_apply(lambda x: x**2)

References
----------
<https://stackoverflow.com/questions/18603270/        progress-indicator-during-pandas-operations-python>
r   )catch_warningssimplefilter)	DataFrame)Seriesignore)category)PanelNNN)_Rolling_and_Expanding)	Expanding)Rolling)SeriesGroupBy)DataFrameGroupBy)r  r  )GroupBy)PanelGroupBydeprecated_tc                     >^  UUUUU U4S jnU$ )Nc                   >^^ TR                  S[        U SS5      5      nUc  TS:X  a  U R                  nOp[        U T	5      (       a  [	        U 5      nOST
b  [        U T
5      (       d?  UR                  SS5      nUS:X  a  SnOUS:X  a  S	nU R                  U R                  U   -  nTS   b  TS   mSTS'   O
T" SSU0TD6m[	        U5      S:  a7  [        S
[        TR                  S[        R                  R                  5      S9   SSKJn   U" T5      mUU4S jn [        U T5      " U40 UD6TR#                  5         $ ! [         a    U R                  n NLf = f! [          a     NSf = f! TR#                  5         f = f)z
Parameters
----------
df  : (DataFrame|Series)[GroupBy]
    Data (may be grouped).
func  : function
    To be applied on the (grouped) data.
**kwargs  : optional
    Transmitted to `df.apply()`.
r  ngroupsNapplymapaxisr   indexcolumnsr   zExcept func, normal arguments are intentionally not supported by `(DataFrame|Series|GroupBy).progress_apply`. Use keyword arguments instead.r  r=   )is_builtin_funcc                     > TR                  TR                  (       a  TR                  TR                  :  a  SOSS9  T" U 0 UD6$ )Nr   r   )r   )r6  r  r   )rQ   rR   funcr   s     r-   wrapperDtqdm.pandas.<locals>.inner_generator.<locals>.inner.<locals>.wrapper  s9    
 HH133=qaHH000r,   r%   )popr  size
isinstancer   getshaper!   r  r  r  r  pandas.core.commonr  rO   _is_builtin_funcr1  close)dfr  rQ   rR   r  r  r  r  r   r  r  r_   r  df_functiontqdm_kwargss    `      @r-   inner3tqdm.pandas.<locals>.inner_generator.<locals>.innerR  s{    $Y1MN="j0 "#B// #B08(-CDD%zz&!47?#$D!Y.#$D "288D> 9  ?.$QA&*LO7%7;7At9q=*: ")w

8H8H!IK:B*40D
1"2{3GFvFGGI+ # :&(&9&9O: ! " GGIs0   	E E  E/ EE
E,+E,/Fr%   )r  r  r  r  r_   r  r  s   ` r-   inner_generator$tqdm.pandas.<locals>.inner_generatorQ  s    E EN Lr,   r   r  	aggregate	transform)apply)warningsr  r  pandas.core.framer  pandas.core.seriesr  FutureWarningpandasr  rO   pandas.core.window.rollingr  pandas.core.windowpandas.core.window.expandingr  r  pandas.core.groupby.genericr  r  pandas.core.groupby.groupbypandas.core.groupbyr  r  copyr  progress_applyprogress_mapprogress_applymapprogress_aggregateprogress_transform)r_   r  r  r  r  r  r  r  r  r  r  r  r  r  r  r  s   ``           @@@r-   r  tqdm.pandas  sf   F 	:/-	!X>( "
 (	2I	PAD	4;	$@ "&&(#=>H	 H	X !0 1'6'8$-e4%4U%;"#2#4	 *9*;'&5j&A	#!0!7	(7(>%#2#4E #*9*;L'!0!2%4[%A"%4[%A"9#8%4%6G"'6'8I$#/4C4E"1 0[ "!  	E	
  		22EE 22FB-4-?*" 2-1*22		2  	PPWW POOP	P  	433	4
  	$$<< $#$	$s   F E6F F G* H H5 6
F F F FF
G'&F//
G#:G	G'GG#G'GG##G'*
H5H  HHHHH21H25
I I		IIIITQDM_T)r  r  miniterspositionrl  )	is_methodtypesc                    Uc  [         R                  nU(       a  [        U[        USS5      =(       d    SS9n[	        XPS9nUc(  [        US5      (       a  UR                  5       (       d  SnUc  Ub   [        U5      nU[        S5      :X  a  SnU(       af  Xl        Xl        U R                     U R                  U 5      U l        U R                   R#                  U 5        SSS5        UU l        X0l        X@l        gU(       a  SU l        U R                     U R                  U 5      U l        U R                   R#                  U 5        SSS5        S	U;   a-  [+        S
[        US[         R                  R,                  5      S9e[/        S[1        U5      -   5      eUb  Uc$  U[         R                  [         R2                  4;   d  U(       aJ  U(       a  [5        5       nU(       a  U" U5      u  nnO&[5        5       nU(       a  U" U5      u  nnUc  UnUc  UnU	c  Sn	SnOSnUc  SnUc  SnU
c  [7        U5      (       + n
U(       a   U
SLa  [9        U
5      (       d  [1        U5      nUc  SnXl        U=(       d    SU l        X0l        X@l        XPl        X`l        UU l         Xpl!        Xl"        Xl#        UU l$        Xl%        Xl        Xl&        Xl'        UU l(        UU l)        UU l*        UU l+        UU l,        Xl-        Xl.        [_        U5      U l0        [_        U5      U l1        [_        U5      U l2        UU l3        SU l4        UU l5        [l        U l7        U(       a   U Rp                  " SSS0UD6  UU l9        UU l        U R                     Uc  U R                  U 5      OU* U l        SSS5        U(       d?  U Ru                  U R<                  5      U l;        US::  a  U Ry                  U RT                  S9  U Ro                  5       U l=        U Rz                  U l>        g! [        [        4 a    Sn GNf = f! , (       d  f       GNU= f! , (       d  f       GN= f! [         a
    UU l4         Nf = f! , (       d  f       N= f)zsee tqdm.tqdm for argumentsNencodingzutf-8)r  )tqdm_instanceisattyTinfnestedzQ`nested` is deprecated and automated.
Use `position` instead for manual control.
r  r  zUnknown argument(s): r   Fr   r}  	lock_argsr%   )?r  r  r   r  r   rs   r  r   r1  r   floatiterabledisableri  r^  rY  rM  rj  r   r  leaver!   r  r   r7   r  r   r   r   r  r  r  rl  minintervalmaxintervalr  dynamic_minitersr:  r   r;  r'  r=  r  delayrk  dynamic_ncolsr   r   _ema_dn_ema_dt_ema_minitersr<  r&  r   r
   _timeset_postfixlast_print_nr  spr}  last_print_trx  ) r;   r  r  r  r  r  r  r  r  r  r:  r  r   r;  r  r   r<  r=  r  r&  r'  write_bytesr  rl  r   r  rk  rR   _dynamic_ncols_ncols_nrowsr  s                                    r-   r:   tqdm.__init__  s    <::D 'wtZ>I'KD #4<?wtX66t{{}}G=X1H E%L E$M"L--d3&&t,  DFJJDL--d3&&t,  v%	 'C$T7CJJ4D4DEGE 4s6{BCE ]em$3::szz:R2R 5 7 #0#6LE5!6!8!%3D%9NFF} &} &H#$KK=)$//E%t+Ie4D4DZJI !JB	



&&  0
	$("
*"9~9~ ^$
'  ::':
 $ ZZ3;3Ct))$/(DH  ))$''2DGzt~~6 !JJL((y ~.   f  '&' ZsH   4P /2P/2QQ Q*P,+P,/
P>
QQ'&Q'*
Q8c                     U R                   b  U R                   S:  $ U R                  c  [        S5      e[        U R                  5      $ )Nr   z/bool() undefined when iterable == total == None)r  r  r1  boolrj   s    r-   __bool__tqdm.__bool__Q  s?    ::!::>!== MNNDMM""r,   c                    U R                   c  U R                  $ [        U R                   S5      (       a  U R                   R                  S   $ [        U R                   S5      (       a  [	        U R                   5      $ [        U R                   S5      (       a  U R                   R                  5       $ [        U SS 5      $ )Nr  r   __len____length_hint__r  )r  r  rs   r  r   r  r  rj   s    r-   r  tqdm.__len__X  s    --/DJJ	/+24=='+J+J$$Q'	/ (/t}}i'H'HT]]#	/ 5<DMMK\4]4]..0		/
 w-	/r,   c                      U R                   n[        U R                   5      U l         U R                  5       Xl         $ ! [         a    [	        S5      ef = f! WU l         f = f)Nz'tqdm' object is not reversible)r  reversed__iter__r   r1  )r;   origs     r-   __reversed__tqdm.__reversed__`  sW    	!==D %T]]3DM==? M  	?=>>	? !DMs   > )A AA 	A c                 j    [        U R                  SS 5      nUb  U" U5      $ XR                  5       ;   $ )N__contains__)r  r  r  )r;   itemcontainss      r-   r  tqdm.__contains__k  s1    4==.$?!)!5x~R4==?;RRr,   c                     U $ rA   r%   rj   s    r-   rk   tqdm.__enter__o  s    r,   c                 v     U R                  5         g ! [         a    XU4S:X  a  e [        S[        SS9   g f = f)N)NNNzAttributeError ignoredrw   rx   )r  r   r   r   )r;   exc_type	exc_value	tracebacks       r-   rp   tqdm.__exit__r  s@    	FJJL 	FY/3EE);1E		Fs    "88c                 $    U R                  5         g rA   )r  rj   s    r-   __del__tqdm.__del__{  s    

r,   c                 :    U R                   " S0 U R                  D6$ )Nr%   )rG  rD  rj   s    r-   __str__tqdm.__str__~  s      44#3#344r,   c                 .    [        [        U SS5      5      $ )NrY  l        )r   r  rj   s    r-   _comparabletqdm._comparable  s    74011r,   c                     [        U 5      $ rA   )idrj   s    r-   __hash__tqdm.__hash__  s    $xr,   c              #   D  #    U R                   nU R                  (       a  U H  nUv   M	     gU R                  nU R                  nU R                  nU R
                  U R                  -   nU R                  nU R                  n U Hd  nUv   US-  nXu-
  U R                  :  d  M   U" 5       n	X-
  n
X:  d  M2  X:  d  M9  U R                  Xu-
  5        U R                  nU R                  nMf     Xpl        U R                  5         g! Xpl        U R                  5         f = f7f)z6Backward-compatibility to use: for x in tqdm(iterable)Nr   )r  r  r  r  r  rx  r  r   r  r  r6  r  )r;   r  objr  r  r  min_start_tr   r
   cur_tdts              r-   r  tqdm.__iter__  s      == <<	  &&((((llTZZ/FFzz		 Q#t}}4 FE-B(U-AA$45'+'8'8'+'8'8   FJJL FJJLs0   BD D &D 8D ?/D .D DD c                 6   U R                   (       a  gUS:  a  U =R                  U-  sl        U =R                  U-  sl        U R                  U R                  -
  U R                  :  Ga  U R	                  5       nX R
                  -
  nX0R                  :  Ga  X R                  U R                  -   :  Gab  U R	                  5       nU R                  U R                  -
  nU R                  (       a0  U(       a)  U(       a"  U R                  U5        U R                  U5        U R                  U R                  S9  U R                  (       a  U R                  (       a9  X0R                  :  a*  X@R                  =(       d    U R                  -  U-  U l        OlU R                  (       a@  U R!                  X@R                  (       a  U(       a  U R                  U-  OS-  5      U l        O[#        U R                  U5      U l        U R                  U l        X l        gggg)a  
Manually update the progress bar, useful for streams
such as reading files.
E.g.:
>>> t = tqdm(total=filesize) # Initialise
>>> for current_buffer in stream:
...    ...
...    t.update(len(current_buffer))
>>> t.close()
The last line is highly recommended, but possibly not necessary if
`t.update()` will be called in such a way that `filesize` will be
exactly reached and printed.

Parameters
----------
n  : int or float, optional
    Increment to add to the internal counter of iterations
    [default: 1]. If using float, consider specifying `{n:.3f}`
    or similar in `bar_format`, or specifying `unit_scale`.

Returns
-------
out  : bool or None
    True if a `display()` was triggered.
Nr   r  r   T)r  r  r   r  r  r  r  rx  r  r   r  r  r}  r  r  r  r  r   )r;   r   r  r  dns        r-   r6  tqdm.update  s   4 <<q5"! 66D%%%6JJLE***B%%%%<<$**3L*L

VVd///>>bRLL$LL$t~~6(( ''B2B2B,B(*.>.>.R$BRBR(SVX(X(,(:(:;K;KPR$"2"2R"7'(*)+
 ),DMM2(> %)FF!$)!9 +M% 7r,   c                 |  ^  T R                   (       a  gST l         [        T R                  5      nT R                  T 5        T R                  T R
                  T R                  -   :  a  g[        T SS5      c  gU 4S jn U" S5        T R                  c  US:H  OT R                  nT R                     U(       a   S T l        T R                  SS	9  U" S
5        O$T R                  SUS9(       a  U(       d  U" S5        SSS5        g! [         a  nS[        U5      ;   a   SnAge SnAff = f! , (       d  f       g= f)z3Cleanup and (if leave=False) close the progressbar.NTr  c                 N   > TR                   R                  [        U 5      5        g rA   )r  r  r7   )r   r;   s    r-   r=   tqdm.close.<locals>.fp_write  s    GGMM#a&!r,   r   closedr   c                      g rA   r%   r%   r,   r-   r   tqdm.close.<locals>.<lambda>      tr,   re  r4   )r<   rY  r  )r  r   rY  rq  r  rx  r  r  
ValueErrorr7   r  ri  r  display)r;   rY  r=   rV  r  s   `    r-   r  
tqdm.close  s   <<  $((mT"t||djj88 4t$,	"	RL !JJ.qDJJZZ+# <<BC<0TN Z  	3q6!	 Zs+   ?D 1AD-
D*D%$D%%D*-
D;c                    U R                   (       a  gU(       d  U R                  R                  5         [        U R                  5      nX R
                  =(       d    S:  aO  U R                  U5        U R                  S5        U R                  R                  S5        U R                  U* 5        U(       d  U R                  R                  5         gg)zClear current bar display.Nra  r   r  )r  ri  rZ   r   rY  rl  movetor  r  r  r^   )r;   rh  rY  s      r-   ro  
tqdm.clear  s    <<JJ $((m**"#KKGGBKGGMM$KKJJ  r,   c                    U R                   (       a  gU(       dA  U(       a   U R                  R                  " U6 (       d  gOU R                  R                  5         U R                  5         U(       d  U R                  R	                  5         g)aD  
Force refresh the display of this bar.

Parameters
----------
nolock  : bool, optional
    If `True`, does not lock.
    If [default: `False`]: calls `acquire()` on internal lock.
lock_args  : tuple, optional
    Passed to internal lock's `acquire()`.
    If specified, will only `display()` if `acquire()` returns `True`.
NFT)r  ri  rZ   r"  r^   )r;   rh  r  s      r-   r}  tqdm.refresh-  s_     <<zz))95  6 

""$JJ r,   c                     U R                   (       a  gU R                  5       nU =R                  XR                  -
  -  sl        Xl        g)z(Restart tqdm timer from last print time.N)r  r  rx  r  )r;   r  s     r-   unpausetqdm.unpauseH  s4    <<

 1 111!r,   c                 J   SU l         Ub  Xl        U R                  (       a  gSU l        U R	                  5       =U l        U l        [        U R                  5      U l	        [        U R                  5      U l
        [        U R                  5      U l        U R                  5         g)z
Resets to 0 iterations for repeated use.

Consider combining with `leave=True`.

Parameters
----------
total  : int or float, optional. Total to use for the new bar.
r   N)r   r  r  r  r  r  rx  r   r   r  r  r  r}  )r;   r  s     r-   reset
tqdm.resetP  sw     J<<+/::<7DL4>>*4>>* 0r,   c                 Z    U(       a  US-   OSU l         U(       a  U R                  5         gg)z
Set/modify description of the progress bar.

Parameters
----------
desc  : str, optional
refresh  : bool, optional
    Forces refresh [default: True].
r5   r   Nr  r}  r;   r  r}  s      r-   set_descriptiontqdm.set_descriptionf  s$     $(D4KR	LLN r,   c                 T    U=(       d    SU l         U(       a  U R                  5         gg)z-Set/modify description without ': ' appended.r   Nr0  r1  s      r-   set_description_strtqdm.set_description_strt  s    JB	LLN r,   c                   ^ [        Uc  / OU5      m[        UR                  5       5       H
  nX4   TU'   M     TR                  5        H_  n[        TU   [        5      (       a  U R                  TU   5      TU'   M4  [        TU   [        5      (       a  MN  [        TU   5      TU'   Ma     SR                  U4S jTR                  5        5       5      U l        U(       a  U R                  5         gg)z
Set/modify postfix (additional stats)
with automatic formatting based on datatype.

Parameters
----------
ordered_dict  : dict or OrderedDict, optional
refresh  : bool, optional
    Forces refresh [default: True].
kwargs  : dict, optional
Nr   c              3   V   >#    U  H  nUS -   TU   R                  5       -   v   M      g7f)=N)strip)r   rf  r&  s     r-   r   #tqdm.set_postfix.<locals>.<genexpr>  s.      !<,:S "%sWS\-?-?-A!A,:s   &))
r   sortedkeysr  r	   r   r7   r   r&  r}  )r;   ordered_dictr}  rR   rf  r&  s        @r-   r  tqdm.set_postfixz  s     L$8blK&++-(C!;GCL ) <<>C'#,//#ws|<c22"73<0 " yy !<,3LLN!< <LLN r,   c                 T    [        U5      U l        U(       a  U R                  5         gg)zC
Postfix without dictionary expansion, similar to prefix handling.
N)r7   r&  r}  )r;   r   r}  s      r-   set_postfix_strtqdm.set_postfix_str  s      1vLLN r,   c                     U R                   R                  SU-  [        5       U* -  -   5        [        U R                   SS 5      " 5         g )Nr4   r   c                      g rA   r%   r%   r,   r-   r   tqdm.moveto.<locals>.<lambda>  s    $r,   )r  r  r   r  )r;   r   s     r-   r%  tqdm.moveto  s7    dQhA2!556,/1r,   c                    U R                   (       a7  [        U S5      (       d&  [        S U R                  U R                  SSS.5      $ U R
                  (       a(  U R                  U R                  5      u  U l        U l        U R                  U R                  [        U S5      (       a  U R                  5       U R                  -
  OSU R                  U R                  U R                  U R                  U R                  U R                  U R                  5       (       a!  U R!                  5       U R                  5       -  OSU R"                  U R$                  U R&                  U R(                  U R*                  S.$ )	z'Public API for read-only member access.r   c                      g rA   r%   r%   r,   r-   r   "tqdm.format_dict.<locals>.<lambda>  r   r,   r   it)r   r  r  r   rx  N)r   r  r  r  rl  r9  r:  r   r;  r   r<  r&  r'  r=  r   )r  rs   r   r   r  r  r  r  rl  r  rx  r  r:  r   r;  r  r  r<  r&  r'  r=  r   rj   s    r-   rD  tqdm.format_dict  s    <<f 5 5|VVdjjQ.N O O%)%7%7%@"DJ
$**6=dI6N6Ntzz|dll2TUZZ$**		ZZ$//7;||~~DLLNT\\^34//dll --$,,kk# 	#r,   c                    Uc  [        U R                  5      nU R                  =(       d    SnX#S-
  :  a  X#:  a  gU(       d  Uc  Sn[        U S5      (       d7  [	        S[        U R                  S[        R                  R                  5      S9eU(       a  U R                  U5        U R                  Uc  U R                  5       OU5        U(       a  U R                  U* 5        g	)
aW  
Use `self.sp` to display `msg` in the specified `pos`.

Consider overloading this function when inheriting to use e.g.:
`self.some_frontend(**self.format_dict)` instead of `self.sp`.

Parameters
----------
msg  : str, optional. What to display (default: `repr(self)`).
pos  : int, optional. Position to `moveto`
  (default: `abs(self.pos)`).
ra  r   Fz ... (more hidden) ...r  zAPlease use `tqdm.gui.tqdm(...)` instead of `tqdm(..., gui=True)`
r  r  T)r   rY  rl  rs   r!   r  r  r  r  r  r%  r  r  )r;   r<   rY  rl  s       r-   r"  tqdm.display  s     ;dhh-C

 b!)|ck.tT""(6 '3::3C3CDF F
 KK#+37KKr,   c              +      #    U " SSU0UD6 nU(       a  SUl         SUl        SUl        [        UR                  X5      v   SSS5        g! , (       d  f       g= f7f)aK  
stream  : file-like object.
method  : str, "read" or "write". The result of `read()` and
    the first argument of `write()` should have a `len()`.

>>> with tqdm.wrapattr(file_obj, "read", total=file_obj.size) as fobj:
...     while True:
...         chunk = fobj.read(chunk_size)
...         if not chunk:
...             break
r  BTi   Nr%   )r   r;  r'  r   r6  )r_   streammethodr  bytesr  r   s          r-   wrapattrtqdm.wrapattr  sM      ,u,,#!%#AHHf== -,,s   A5A	A
AA)#r  r  r  r  r:  r<  r   r  r  r  r  r  r  rk  r=  r  r  r  r  r  r  r  r  r   r  rl  rY  r&  r   r  rx  r  r   r'  r;  )r     )Nr   FrJ  FNNNrU  r   NrA   )Nr4   F)NF)NNNTNNg?g      $@NNFrJ  FFr   Nr   NNrU  FNNNg        F)r   )F)FN)NT)r   Tr  )8r'   r(   r)   r*   rB   rO  rP  r   rM  staticmethodr   r   r   r  rG  rK  r}   r^  rq  r  r   rt  r  rL  r  r   r  r   r:   r  r  r  r  rk   rp   r  r  r   r  r  r  r6  r  ro  r}  r*  r-  r2  r5  r  rA  r%  rD  r"  rS  r+   r%   r,   r-   r   r      s.   vp GJ& &: E E$ + +$  2 QUKO:>DK DKL  I I 1 1:   $  $8     uF uFp WecW\9<s-L MNRIMBGNOMRINU)MU)n#/	!SF5 2 2$LAF*#X! 6",>2
 # #""H >  >r,   r   c                  &    [        [        U 6 40 UD6$ )z*Shortcut for tqdm(range(*args), **kwargs).)r   r   )rQ   rR   s     r-   r   r     s    t'''r,   )5rB   r  collectionsr   r   
contextlibr   r   r   r   numbersr	   r
   r  r   weakrefr   _monitorr   utilsr   r   r   r   r   r   r   r   r   r   r   r   
__author____all__r1  r   r   r   Warningr   r  r    DeprecationWarningr!   RuntimeWarningr"   rS   rJ  rU   r   r   r   r   r%   r,   r-   <module>rc     s     0 % 2 2        
 :
!	I 		8 		+' 	+	k= 	
	[*< 	
	n 	
4X6 4XnPM& PMfQ& Q>z>: z>z'(r,   