Ë
    WV.j]   ã                  óÌ   — d dl mZ d dlZd dlZd dlZd dlZd dlmZ ddlm	Z	 ej                  rddlmZ dd„Zdd„Zddd	„Zddd
„Zdd„Zdd„Zdd„Z G d„ d«      Zdd„Zdd„Zy)é    )ÚannotationsN)Ú
getproxiesé   )ÚPrimitiveData©ÚURLc                ó2   — | du ry| du ry| €yt        | «      S )z‡
    Coerce a primitive data type into a string value.

    Note that we prefer JSON-style 'true'/'false' for boolean values here.
    TÚtrueFÚfalseÚ )Ústr©Úvalues    úNC:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\httpx/_utils.pyÚprimitive_value_to_strr      s*   € ð ��}ØØ	�%‰ØØ	ˆØÜˆu‹:Ðó    c                 óÒ  — t        «       } i }dD ]*  }| j                  |«      sŒ| |   }d|v r|nd|› �||› d�<   Œ, | j                  dd«      j                  d«      D �cg c]  }|j                  «       ‘Œ }}|D ]e  }|dk(  ri c S |sŒd|v rd||<   Œt	        |«      r	d|d	|› �<   Œ-t        |«      r
d|d
|› d�<   ŒB|j                  «       dk(  r	d|d	|› �<   Œ^d|d|› �<   Œg |S c c}w )z+Gets proxy information from the environment)ÚhttpÚhttpsÚallz://zhttp://Únor   Ú,Ú*Nzall://zall://[Ú]Ú	localhostzall://*)r   ÚgetÚsplitÚstripÚis_ipv4_hostnameÚis_ipv6_hostnameÚlower)Ú
proxy_infoÚmountsÚschemeÚhostnameÚhostÚno_proxy_hostss         r   Úget_environment_proxiesr(      s*  € ô “€JØ$&€Fã*ˆØ�>‰>˜&Õ!Ø! &Ñ)ˆHà! XÑ-‘°W¸X¸JÐ3Gð �f�X˜S�>Ò"ð +ð 0:¯~©~¸dÀBÓ/G×/MÑ/MÈcÔ/RÓSÑ/R t�d—j‘j•lÐ/R€NÐSÛ"ˆð �sŠ?ð
 ŠIÚð ˜Ñ Ø#'��xÒ Ü! (Ô+Ø.2�˜ ˜zÐ*Ò+Ü! (Ô+Ø04�˜  
¨!Ð,Ò-Ø—‘Ó! [Ò0Ø.2�˜ ˜zÐ*Ò+à/3�˜  
Ð+Ò,ð5 #ð8 €Mùò; Ts   ÁC$c                óH   — t        | t        «      r| j                  |«      S | S ©N©Ú
isinstancer   Úencode©r   Úencodings     r   Úto_bytesr0   O   s   € Ü%/°´sÔ%;ˆ5�<‰<˜Ó!ÐFÀÐFr   c                óH   — t        | t        «      r| S | j                  |«      S r*   )r,   r   Údecoder.   s     r   Úto_strr3   S   s   € Ü˜u¤cÔ*ˆ5ÐF°·±¸XÓ0FÐFr   c                óF   — t        |t        «      r| S | j                  «       S r*   r+   )r   Úmatch_type_ofs     r   Úto_bytes_or_strr6   W   s   € Ü˜}¬cÔ2ˆ5ÐF¸¿¹»ÐFr   c                ó8   — | d   | d   cxk(  rdk(  rn n| dd S | S )Nr   éÿÿÿÿÚ"r   © r   s    r   Úunquoter;   [   s'   € Ø ™( e¨B¡iÔ6°3Õ6ˆ5��2ˆ;ÐA¸EÐAr   c                óB  — 	 | j                  «       }t        j                  |«      j                  }|S # t        t
        f$ r\ 	 | j                  «       }| j                  dt        j                  «      }| j                  |«       Y |S # t        t
        f$ r Y Y yw xY ww xY w)zs
    Given a file-like stream object, return its length in number of bytes
    without reading it into memory.
    r   N)	ÚfilenoÚosÚfstatÚst_sizeÚAttributeErrorÚOSErrorÚtellÚseekÚSEEK_END)ÚstreamÚfdÚlengthÚoffsets       r   Úpeek_filelike_lengthrJ   _   s”   € ð
à�]‰]‹_ˆä—‘˜"“×%Ñ%ˆð €Møô œGÐ$ò 
ð	ð —[‘[“]ˆFØ—[‘[ ¤B§K¡KÓ0ˆFØ�K‰K˜Õð
 €Møô	 ¤Ð(ò 	âð	úð
ús(   ‚/3 ³BÁABÂBÂBÂBÂBc                  óJ   — e Zd ZdZd	d„Zd
d„Zedd„«       Zdd„Zdd„Z	dd„Z
y)Ú
URLPatternaË  
    A utility class currently used for making lookups against proxy keys...

    # Wildcard matching...
    >>> pattern = URLPattern("all://")
    >>> pattern.matches(httpx.URL("http://example.com"))
    True

    # Witch scheme matching...
    >>> pattern = URLPattern("https://")
    >>> pattern.matches(httpx.URL("https://example.com"))
    True
    >>> pattern.matches(httpx.URL("http://example.com"))
    False

    # With domain matching...
    >>> pattern = URLPattern("https://example.com")
    >>> pattern.matches(httpx.URL("https://example.com"))
    True
    >>> pattern.matches(httpx.URL("http://example.com"))
    False
    >>> pattern.matches(httpx.URL("https://other.com"))
    False

    # Wildcard scheme, with domain matching...
    >>> pattern = URLPattern("all://example.com")
    >>> pattern.matches(httpx.URL("https://example.com"))
    True
    >>> pattern.matches(httpx.URL("http://example.com"))
    True
    >>> pattern.matches(httpx.URL("https://other.com"))
    False

    # With port matching...
    >>> pattern = URLPattern("https://example.com:1234")
    >>> pattern.matches(httpx.URL("https://example.com:1234"))
    True
    >>> pattern.matches(httpx.URL("https://example.com"))
    False
    c                ó8  — ddl m} |rd|vrt        d|› d|› d�«      ‚ ||«      }|| _        |j                  dk(  rdn|j                  | _        |j
                  d	k(  rdn|j
                  | _        |j                  | _        |j
                  r|j
                  d	k(  rd | _        y |j
                  j                  d
«      rAt        j                  |j
                  dd  «      }t        j                  d|› d�«      | _        y |j
                  j                  d	«      rAt        j                  |j
                  dd  «      }t        j                  d|› d�«      | _        y t        j                  |j
                  «      }t        j                  d|› d�«      | _        y )Nr   r   Ú:zUProxy keys should use proper URL forms rather than plain scheme strings. Instead of "z", use "z://"r   r   r   z*.é   z^.+\.Ú$z^(.+\.)?Ú^)Ú_urlsr   Ú
ValueErrorÚpatternr$   r&   ÚportÚ
host_regexÚ
startswithÚreÚescapeÚcompile)ÚselfrT   r   ÚurlÚdomains        r   Ú__init__zURLPattern.__init__¢   sI  € Ýá�s 'Ñ)Üðà&˜i x°¨y¸ð>óð ñ �'‹lˆØˆŒØŸJ™J¨%Ò/‘b°S·Z±ZˆŒØŸ(™( cš/‘B¨s¯x©xˆŒ	Ø—H‘HˆŒ	Ø�xŠx˜3Ÿ8™8 sš?Ø:>ˆD�OØ�X‰X× Ñ  Ô&ä—Y‘Y˜sŸx™x¨¨˜|Ó,ˆFÜ Ÿj™j¨6°&°¸Ð);Ó<ˆD�OØ�X‰X× Ñ  Ô%ä—Y‘Y˜sŸx™x¨¨˜|Ó,ˆFÜ Ÿj™j¨9°V°H¸AÐ)>Ó?ˆD�Oô —Y‘Y˜sŸx™xÓ(ˆFÜ Ÿj™j¨1¨V¨H°A¨Ó7ˆD�Or   c                ó  — | j                   r| j                   |j                   k7  ry| j                  r2| j                  �&| j                  j                  |j                  «      sy| j                  �| j                  |j                  k7  ryy)NFT)r$   r&   rV   ÚmatchrU   ©r[   Úothers     r   ÚmatcheszURLPattern.matchesÀ   sd   € Ø�;Š;˜4Ÿ;™;¨%¯,©,Ò6Øà�IŠIØ—‘Ð+Ø—O‘O×)Ñ)¨%¯*©*Ô5àØ�9‰9Ð  T§Y¡Y°%·*±*Ò%<ØØr   c                ó„   — | j                   �dnd}t        | j                  «       }t        | j                  «       }|||fS )z�
        The priority allows URLPattern instances to be sortable, so that
        we can match from most specific to least specific.
        r   r   )rU   Úlenr&   r$   )r[   Úport_priorityÚhost_priorityÚscheme_prioritys       r   ÚpriorityzURLPattern.priorityÍ   sA   € ð "ŸY™YÐ2™¸ˆä˜TŸY™Y›˜ˆä˜tŸ{™{Ó+Ð+ˆØ˜}¨oÐ>Ð>r   c                ó,   — t        | j                  «      S r*   )ÚhashrT   )r[   s    r   Ú__hash__zURLPattern.__hash__Û   s   € Ü�D—L‘LÓ!Ð!r   c                ó4   — | j                   |j                   k  S r*   )ri   ra   s     r   Ú__lt__zURLPattern.__lt__Þ   s   € Ø�}‰}˜uŸ~™~Ñ-Ð-r   c                óX   — t        |t        «      xr | j                  |j                  k(  S r*   )r,   rL   rT   ra   s     r   Ú__eq__zURLPattern.__eq__á   s!   € Ü˜%¤Ó,ÒN°·±ÀÇÁÑ1NÐNr   N)rT   r   ÚreturnÚNone)rb   r   rq   Úbool)rq   ztuple[int, int, int])rq   Úint)rb   rL   rq   rs   )rb   ú
typing.Anyrq   rs   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r^   rc   Úpropertyri   rl   rn   rp   r:   r   r   rL   rL   x   s6   „ ñ'óR8ó<ð ò?ó ð?ó"ó.ôOr   rL   c                ór   — 	 t        j                  | j                  d«      d   «       y# t        $ r Y yw xY w©NÚ/r   FT)Ú	ipaddressÚIPv4Addressr   Ú	Exception©r%   s    r   r   r   å   ó<   € ðÜ×Ñ˜hŸn™n¨SÓ1°!Ñ4Ô5ð øô ò Ùðúó   ‚'* ª	6µ6c                ór   — 	 t        j                  | j                  d«      d   «       y# t        $ r Y yw xY wr|   )r~   ÚIPv6Addressr   r€   r�   s    r   r    r    í   r‚   rƒ   )r   r   rq   r   )rq   zdict[str, str | None])zutf-8)r   ústr | bytesr/   r   rq   Úbytes)r   r†   r/   r   rq   r   )r   r   r5   útyping.AnyStrrq   rˆ   )r   r   rq   r   )rF   ru   rq   z
int | None)r%   r   rq   rs   )Ú
__future__r   r~   r>   rX   ÚtypingÚurllib.requestr   Ú_typesr   ÚTYPE_CHECKINGrR   r   r   r(   r0   r3   r6   r;   rJ   rL   r   r    r:   r   r   Ú<module>rŽ      sg   ðÝ "ã Û 	Û 	Û Ý %å !à	×ÒÝóó.ôbGôGóGóBó÷2jOñ jOóZôr   