Ë
    ±Œj“  ã                  óŽ  — U d Z ddlmZ ddlmZ ddlmZmZmZ d)d„Z	 G d„ de«      Z
 e e
dd	«       e
d
d«       e
dd«       e
dd«       e
dd«       e
dd«      ¬«      Zi Zded<    G d„ de«      Ze G d„ de¬«      «       Z G d„ de«      Z G d„ de«      Z G d „ d!e«      Z G d"„ d#e«      Z G d$„ d%e«      Z G d&„ d'e«      Zy()*Ú é    )Úannotations)Útotal_ordering)ÚClassVarÚ
NamedTupleÚcastc                óX   — t        | t        «      r| j                  «       S t        | «      S )z4
    normalize a byte/str/int or float to a str
    )Ú
isinstanceÚbytesÚdecodeÚstr)Úvalues    úW/var/www/html/Fitness-lenito-AI-main/venv/lib/python3.12/site-packages/limits/limits.pyÚsafe_stringr   
   s$   € ô
 �%œÔØ�|‰|‹~Ðäˆu‹:Ðó    c                  ó"   — e Zd ZU ded<   ded<   y)ÚGranularityÚintÚsecondsr   ÚnameN)Ú__name__Ú
__module__Ú__qualname__Ú__annotations__© r   r   r   r      s   … ØƒLØ
„Ir   r   i€Q Údayi �' Úmonthi œÚÚyeari  Úhouré<   Úminuteé   Úsecond)r   r   r   r   r!   r#   zdict[str, type[RateLimitItem]]ÚGRANULARITIESc                  ó0   ‡ — e Zd Z	 	 	 	 	 	 	 	 dˆ fd„Zˆ xZS )ÚRateLimitItemMetac                óŽ   •— d|vrg |d<   t         ‰| �  | |||«      }d|v r$t        t        t           |«      t
        |d   d   <   |S )NÚ	__slots__ÚGRANULARITYr"   )ÚsuperÚ__new__r   ÚtypeÚRateLimitItemr$   )Úclsr   ÚparentsÚdctÚgranularityÚ	__class__s        €r   r+   zRateLimitItemMeta.__new__'   s^   ø€ ð ˜cÑ!Ø!ˆC�ÑÜ‘g‘o c¨4°¸#Ó>ˆà˜CÑÜ37Ü”]Ñ# [ó4ŒM˜#˜mÑ,¨QÑ/Ñ0ð Ðr   )r   r   r/   ztuple[type, ...]r0   z"dict[str, Granularity | list[str]]Úreturnr&   )r   r   r   r+   Ú__classcell__)r2   s   @r   r&   r&   &   s3   ø„ ðàðð "ðð 0ð	ð
 
÷ñ r   r&   c                  ó~   — e Zd ZU dZg d¢Zded<   	 	 d	 	 	 	 	 dd„Zedd„«       Zdd„Z	dd„Z
dd	„Zdd
„Zdd„Zdd„Zy)r-   a]  
    defines a Rate limited resource which contains the characteristic
    namespace, amount and granularity multiples of the rate limiting window.

    :param amount: the rate limit amount
    :param multiples: multiple of the 'per' :attr:`GRANULARITY`
     (e.g. 'n' per 'm' seconds)
    :param namespace: category for the specific rate limit
    )Ú	namespaceÚamountÚ	multipleszClassVar[Granularity]r)   c                óZ   — || _         t        |«      | _        t        |xs d«      | _        y )Nr"   )r6   r   r7   r8   )Úselfr7   r8   r6   s       r   Ú__init__zRateLimitItem.__init__N   s&   € ð #ˆŒÜ˜&“kˆŒÜ˜Yš^¨!Ó,ˆ�r   c                ó€   — |j                  «       | j                  j                  | j                  j                  › d�hv S )z­
        Checks if this instance matches a *granularity_string*
        of type ``n per hour``, ``n per minute`` etc,
        by comparing with :attr:`GRANULARITY`

        Ús)Úlowerr)   r   )r.   Úgranularity_strings     r   Úcheck_granularity_stringz&RateLimitItem.check_granularity_stringU   sA   € ð "×'Ñ'Ó)Ø�O‰O× Ñ Ø�‰×#Ñ#Ð$ AÐ&ð.
ð 
ð 	
r   c                óH   — | j                   j                  | j                  z  S )zM
        :return: the duration the limit is enforced for in seconds.
        )r)   r   r8   ©r:   s    r   Ú
get_expiryzRateLimitItem.get_expiryc   s   € ð
 ×Ñ×'Ñ'¨$¯.©.Ñ8Ð8r   c                óþ   — dj                  |D �cg c]  }t        |«      ‘Œ c}t        | j                  «      t        | j                  «      | j                  j
                  gz   «      }| j                  › d|› �S c c}w )a#  
        Constructs a key for the current limit and any additional
        identifiers provided.

        :param identifiers: a list of strings to append to the key
        :return: a string key identifying this resource with
         each identifier separated with a '/' delimiter.
        Ú/)Újoinr   r7   r8   r)   r   r6   )r:   ÚidentifiersÚkÚ	remainders       r   Úkey_forzRateLimitItem.key_forj   sv   € ð —H‘HÙ%0Ó1¡[ Œ[˜�^ [Ñ1ä˜DŸK™KÓ(Ü˜DŸN™NÓ+Ø× Ñ ×%Ñ%ðñó
ˆ	ð —.‘.Ð!  9 +Ð.Ð.ùò 2s   �A:c                óÂ   — t        |t        «      rO| j                  |j                  k(  xr4 | j                  |j                  k(  xr | j                  |j                  k(  S y)NF)r
   r-   r7   r)   r8   ©r:   Úothers     r   Ú__eq__zRateLimitItem.__eq__~   sT   € Ü�eœ]Ô+à—‘˜uŸ|™|Ñ+ò 6Ø×$Ñ$¨×(9Ñ(9Ñ9ò6à—N‘N e§o¡oÑ5ðð
 r   c                óf   — | j                   › d| j                  › d| j                  j                  › �S )Nz per r   )r7   r8   r)   r   rB   s    r   Ú__repr__zRateLimitItem.__repr__‡   s/   € Ø—+‘+�˜e D§N¡NÐ#3°1°T×5EÑ5E×5JÑ5JÐ4KÐLÐLr   c                ó\   — | j                   j                  |j                   j                  k  S ©N)r)   r   rL   s     r   Ú__lt__zRateLimitItem.__lt__Š   s%   € Ø×Ñ×'Ñ'¨%×*;Ñ*;×*CÑ*CÑCÐCr   c                óp   — t        | j                  | j                  | j                  | j                  f«      S rR   )Úhashr6   r7   r8   r)   rB   s    r   Ú__hash__zRateLimitItem.__hash__�   s(   € Ü�T—^‘^ T§[¡[°$·.±.À$×BRÑBRÐSÓTÐTr   N)r"   ÚLIMITER)r7   r   r8   z
int | Noner6   r   )r?   r   r3   Úbool)r3   r   )rG   úbytes | str | int | floatr3   r   )rM   Úobjectr3   rX   )r3   r   )rM   r-   r3   rX   )r   r   r   Ú__doc__r(   r   r;   Úclassmethodr@   rC   rJ   rN   rP   rS   rV   r   r   r   r-   r-   :   sr   … ñò 5€Ià&Ó&ðð HQð-Øð-Ø&0ð-ØADó-ð ò
ó ð
ó9ó/ó(óMóDôUr   r-   )Ú	metaclassc                  ó   — e Zd ZdZed   Zy)ÚRateLimitItemPerYearz)
    per year rate limited resource.
    r   N©r   r   r   r[   Ú
TIME_TYPESr)   r   r   r   r_   r_   ‘   s   „ ñð ˜VÑ$€KØr   r_   c                  ó   — e Zd ZdZed   Zy)ÚRateLimitItemPerMonthz*
    per month rate limited resource.
    r   Nr`   r   r   r   rc   rc   š   s   „ ñð ˜WÑ%€KØr   rc   c                  ó   — e Zd ZdZed   Zy)ÚRateLimitItemPerDayz(
    per day rate limited resource.
    r   Nr`   r   r   r   re   re   £   s   „ ñð ˜UÑ#€KØr   re   c                  ó   — e Zd ZdZed   Zy)ÚRateLimitItemPerHourz)
    per hour rate limited resource.
    r   Nr`   r   r   r   rg   rg   ¬   s   „ ñð ˜VÑ$€KØr   rg   c                  ó   — e Zd ZdZed   Zy)ÚRateLimitItemPerMinutez+
    per minute rate limited resource.
    r!   Nr`   r   r   r   ri   ri   µ   ó   „ ñð ˜XÑ&€KØr   ri   c                  ó   — e Zd ZdZed   Zy)ÚRateLimitItemPerSecondz+
    per second rate limited resource.
    r#   Nr`   r   r   r   rl   rl   ¾   rj   r   rl   N)r   rY   r3   r   )r[   Ú
__future__r   Ú	functoolsr   Úlimits.typingr   r   r   r   r   Údictra   r$   r   r,   r&   r-   r_   rc   re   rg   ri   rl   r   r   r   Ú<module>rq      só   ðÚ å "å $ç 4Ñ 4óô�*ô ñ
 Ù�L %Ó(Ù
Ð'¨Ó
1Ù	Ð+¨VÓ	4Ù	�W˜fÓ	%Ù�r˜8Ó$Ù�q˜(Ó#ô€
ð 13€Ð-Ó 2ô˜ô ð( ôSUÐ/ô SUó ðSUôl˜=ô ô˜Mô ô˜-ô ô˜=ô ô˜]ô ô˜]õ r   