+
     ]ie;  c                  s   ^ RI Ht ^ RIt^ RIt^RIHt ^RIHt RAt]P                  ! R4      t
]P                  ! R4      t]P                  ! R]P                  ]P                  ,          4      tRtR	tR
P#                  ]]R7      tR]R]/t. RBOtRtRRP-                  ] U u. uF  q ],          NK  	  up 4      ,           R,           tR],           R,           tR],           R,           ],           R,           tRt]P                  ! R4      t]P                  ! R],           R,           4      t]P                  ! R],           R,           4      t]P                  ! R],           R,           4      t]P                  ! R]^RC ,           R,           4      t]P                  ! R],           R,           4      t R]: R]: R]: R2t!]P                  ! ]!]P                  ]P                  ,          4      t"]#! R4      t$]#! R4      t%]$]%,          R 0,          t&]&R!R"0,          t']'R#0,          ;t(t) ! R$ R%]PT                  ! R%R&]PV                  ],,          3R']PV                  ],,          3R(]PV                  ],,          3R)]PV                  ]-,          3R*]PV                  ],,          3R+]PV                  ],,          3R,]PV                  ],,          3.4      4      t.]P^                  R- R. l4       t0]P^                  R/ R0 l4       t0R1 R2 lt0R3 R4 lt1]P^                  R5 R6 l4       t2]P^                  R7 R8 l4       t2R9 R: lt2R; R< lt3R= R> lt4R? R@ lt5R# u up i )D    )annotationsN)LocationParseError)to_strz%[a-fA-F0-9]{2}z^(?:[a-zA-Z][a-zA-Z0-9+-]*:|/)zS^(?:([a-zA-Z][a-zA-Z0-9+.-]*):)?(?://([^\\/?#]*))?([^?#]*)(?:\?([^#]*))?(?:#(.*))?$z(?:[0-9]{1,3}\.){3}[0-9]{1,3}z[0-9A-Fa-f]{1,4}z(?:{hex}:{hex}|{ipv4}))hexZipv4r   Zls32zCABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._\-~z(?:Z|Z)z(?:%25|%)(?:[z]|%[a-fA-F0-9]{2})+z\[z)?\]z!(?:[^\[\]%:/?#]|%[a-fA-F0-9]{2})*z!^(/[^?#]*)(?:\?([^#]*))?(?:#.*)?$Z^Z$Z(z)\]$z^(z)(?::0*?(|0|[1-9][0-9]{0,4}))?$zBABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789._-~z!$&'()*+,;=:@/?c                  s   a  ] tR t^PtRtRR V 3R lllt]R R l4       t]R R l4       t]R R	 l4       t	]R
 R l4       t
]R R l4       tR R ltRtV ;t# )Urlz
Data structure for representing an HTTP URL. Used as a return value for
:func:`parse_url`. Both the scheme and host are normalized as they are
both case-insensitive according to RFC 3986.
c               s4    V ^8  d   QhRRRRRRRRRRRRR	R/# )
   scheme
str | Noneauthhostportz
int | Nonepathqueryfragment format   "5/usr/lib/python3.14/site-packages/urllib3/util/url.py__annotate__Url.__annotate__d   sY     U UU U 	U
 U U U U    c           
     	s   < V'       d!   VP                  R 4      '       g
   R V,           pVe   VP                  4       p\        SV `  WW#WEWg4      # )r   )
startswithlowerZsuper__new__)	Zclsr   r   r   r   r   r   r   	__class__s	   &&&&&&&&r   r   ZUrl.__new__d   sE     ,,:D\\^FwsDETTr   c                   V ^8  d   QhRR/# r
   returnr   r   r   r   r   r   r   u   s      * r   c                    V P                   # )z@For backwards-compatibility with urlparse. We're nice like that.)r   self   &r   hostnameZUrl.hostnamet   s     yyr   c               r   r
   r!   strr   r   r   r   r   r   z   s      S r   c                s    V P                   ;'       g    RpV P                  e   VRV P                  ,           ,          pV# )z)Absolute path including the query string.r   r   )r   r   )r$   Zuri   & r   request_uriZUrl.request_uriy   s7     ii3::!3##C
r   c               r   r    r   r   r   r   r   r      s     * *: *r   c                sT    V P                   pV P                  pVe   Vf   V# V RV 2# )z|
Authority component as defined in RFC 3986 3.2.
This includes userinfo (auth), host and port.

i.e.
    userinfo@host:port
r   )r   netloc)r$   Zuserinfor+   s   &  r   	authorityZUrl.authority   s6     99>X-MZq))r   c               r   r    r   r   r   r   r   r      s      
 r   c                s    V P                   f   R# V P                  '       d   V P                    RV P                   2# V P                   # )z
Network location including host and port.

If you need the equivalent of urllib.parse's ``netloc``,
use the ``authority`` property instead.
Nr   )r   r   r#   r%   r   r+   Z
Url.netloc   s=     99999ii[$))--yyr   c               r   r'   r   r   r   r   r   r      s     - -S -r   c                s   V w  rr4rVpRpVe   WR,           ,          pVe   WR,           ,          pVe	   W,          pVe   VR\        V4      ,           ,          pVe	   W,          pVe   VRV,           ,          pVe   VRV,           ,          pV# )a  
Convert self into a url

This function should more or less round-trip with :func:`.parse_url`. The
returned url may not be exactly the same as the url inputted to
:func:`.parse_url`, but it should be equivalent by the RFC (e.g., urls
with a blank port will have : removed).

Example:

.. code-block:: python

    import urllib3

    U = urllib3.util.parse_url("https://google.com/mail/")

    print(U.url)
    # "https://google.com/mail/"

    print( urllib3.util.Url("https", "username:password",
                            "host.com", 80, "/path", "query", "fragment"
                            ).url
        )
    # "https://username:password@host.com:80/path?query#fragment"
 z://r   r   r   Z#)r(   )	r$   r   r   r   r   r   r   r   urls	   &        r   r.   ZUrl.url   s    6 ;?7d$x E>!C#:CKC3T?"CKC3;C3>!C
r   c               r   r'   r   r   r   r   r   r      s       r   c                	r"   N)r.   r#   r%   r   __str__ZUrl.__str__   s    xxr   r   )NNNNNNN)Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__r   Zpropertyr&   r*   r,   r+   r.   r0   Z__static_attributes__Z__classcell__)r   s   @r   r	   r	   P   s    U U      * *   - -^ r   r	   r   r   r   r   r   r   r   c               $    V ^8  d   QhRRRRRR/# )r
   	componentr(   allowed_charstyping.Container[str]r!   r   r   r   r   r   r      s$      #8r   c                    R # r/   r   r2   r3      &&r   _encode_invalid_charsr8           r   c               r1   )r
   r2   Noner3   r4   r!   r   r   r   r   r   r      s$      $9	r   c                r5   r/   r   r6   r7   r   r8   r8      r9   r   c               r1   )r
   r2   r   r3   r4   r!   r   r   r   r   r   r      s$     !& !&!&*?!&!&r   c                sH   V f   V # \        V 4      p \        P                  R V 4      w  rV P                  RR4      pW#P	                  R4      8H  p\        4       p\        ^ \        V4      4       F  pW6V^,            p\        V4      pV'       d   VR8X  g   V^8  d    VP                  4       V9   d   WW,          pKN  VP                  R\        V4      R,          P                  4       P                  ^4      P                  4       ,           4       K  	  VP                  4       # )z^Percent-encodes a URI component without reapplying
onto an already percent-encoded component.
c                s@    V P                  ^ 4      P                  4       # )r    )Zgroupupper)matchr%   r   Z<lambda>Z'_encode_invalid_chars.<locals>.<lambda>   s    ekk!n**,r   zutf-8Zsurrogatepasss   %:r
   NN)r   _PERCENT_REZsubnencodeZcountZ	bytearrayZrangeZlenZordZdecodeZextendr   Zzfillr;   )	r2   r3   Zpercent_encodingsZ	uri_bytesZis_percent_encodedZencoded_componentZiZbyteZbyte_ords	   &&       r   r8   r8      s    y!I
 $/#3#3,i$ I   /:I*ood.CC!1c)n%QU#t944<sNt{{}=%  Xr):)A)A)C)I)I!)L)R)R)T!UV & ##%%r   c                    V ^8  d   QhRRRR/# )r
   r   r(   r!   r   r   r   r   r   r     s      C C r   c                s   V P                  R 4      p. pV F@  pVR8X  d   K  VR8w  d   VP                  V4       K&  V'       g   K0  VP                  4        KB  	  V P                  R 4      '       d*   V'       d   V^ ,          '       d   VP	                  ^ R4       V P                  R4      '       d   VP                  R4       R P                  V4      # )r   .z..r-   )z/.z/..)splitZappendZpopr   ZinsertZendswithjoin)r   ZsegmentsZoutputZsegments   &   r   _remove_path_dot_segmentsrC     s    zz#HFc>d?MM'" VJJL  sVvayya }}]##b88Fr   c               r1   )r
   r   r:   r   r   r!   r   r   r   r   r   r   &  s     @ @$ @
 @t @r   c                r5   r/   r   r   r   r7   r   _normalize_hostrE   %  s    =@r   c               r1   )r
   r   r(   r   r   r!   r   r   r   r   r   r   *  s     > ># >z >c >r   c                r5   r/   r   rD   r7   r   rE   rE   )  s    ;>r   c               s$    V ^8  d   QhRRRRRR/# )r
   r   r   r   r!   r   r   r   r   r   r   -  s!      * j Z r   c           
     sr   V '       Ed)   V\         9   Ed   \        P                  V 4      pV'       d   \        P	                  V 4      pV'       du   VP                  ^4      w  rEWV pVP                  R4      '       d   VR8w  d   VR,          pM	VR,          p\        V\        4      pV RV P                  4        RV WR  2# V P                  4       # \        P                  V 4      '       gD   \        RP                  V P                  R4       Uu. uF  p\        V4      NK  	  up4      R4      # V # u upi )	   z%25:i   NN:rF   NNNZ%s   .r@   ascii)_NORMALIZABLE_SCHEMES_IPV6_ADDRZ_REr<   _ZONE_ID_REsearchZspanr   r8   _UNRESERVED_CHARSr   _IPV4_REr   rB   rA   _idna_encode)r   r   Zis_ipv6r<   ZstartZendZzone_idZlabels   &&      r   rE   rE   -  s   t**$**40G $**40!&AJE"oG))%00W5E")"+")"+3G=NOG"6El00231WId4j\JJ::<'^^D))II

3Pu|E2PQ  K Qs   D4c                    V ^8  d   QhRRRR/# )r
   namer(   r!   Zbytesr   r   r   r   r   r   J  s     ( (s (u (r   c                s<   V P                  4       '       g)    ^ RIp TP	                  T P                  4       RRR7      # V P                  4       P	                  R4      #   \         d    \        R4      Rhi ; i  TP                   d    \        RT  R24      Rhi ; i)r    Nz-Unable to parse URL without the 'idna' moduleT)ZstrictZ
std3_ruleszName 'z' is not a valid IDNA labelrG   )ZisasciiidnaZImportErrorr   r>   r   Z	IDNAError)rP   rQ   r)   r   rN   rN   J  s    <<>>		;;tzz|DT;JJ ::<w''  	$?	 ~~ 	$9:	s   A !A9 A69"Bc               r?   )r
   targetr(   r!   r   r   r   r   r   r   ]  s      3 3 r   c                s    \         P                  V 4      pV'       g   \        V : R24      hVP                  4       w  r#\	        V\
        4      pVe!   \	        V\        4      pVRV,           ,          pV# )zPercent-encodes a request target so that there are no invalid characters

Pre-condition for this function is that 'target' must start with '/'.
If that is the case then _TARGET_RE will always produce a match.
z is not a valid request URIr   )
_TARGET_REr<   r   groupsr8   _PATH_CHARS_QUERY_CHARS)rR   r<   r   r   Zencoded_targets   &    r   _encode_targetrW   ]  si     V$E F:-H!IJJ,,.KD*4=N%e\:#+%r   c               rO   )r
   r.   r(   r!   r	   r   r   r   r   r   r   o  s     f f3 f3 fr   c           
     s   V '       g   \        4       # T p\        P                  V 4      '       g
   RV ,           p  \        P	                  V 4      P                  4       w  r#rEpVRJ ;'       g    VP                  4       \        9   pV'       d   VP                  4       pV'       dp   VP                  R4      w  rp
T;'       g    Rp\        P	                  V
4      P                  4       w  rV'       d   V'       d   \        V\        4      pVR8X  d   RpMRRRrpVe)   \        V4      p^ Tu;8:  d   R8:  g   M \        V 4      hMRp\        W4      pV'       d$   V'       d   \        V4      p\        V\         4      pV'       d   V'       d   \        V\"        4      pV'       d   V'       d   \        V\$        4      pT'       g   Tf   Te   RpMRp\        TTTTTTTR7      #   \&        \(        3 d   p\        T4      ThRp?ii ; i)aH  
Given a url, return a parsed :class:`.Url` namedtuple. Best-effort is
performed to parse incomplete urls. Fields not provided will be None.
This parser is RFC 3986 and RFC 6874 compliant.

The parser logic and helper functions are based heavily on
work done in the ``rfc3986`` module.

:param str url: URL to parse into a :class:`.Url` namedtuple.

Partly backwards-compatible with :mod:`urllib.parse`.

Example:

.. code-block:: python

    import urllib3

    print( urllib3.util.parse_url('http://google.com/mail/'))
    # Url(scheme='http', host='google.com', port=None, path='/mail/', ...)

    print( urllib3.util.parse_url('google.com:80'))
    # Url(scheme=None, host='google.com', port=80, path=None, ...)

    print( urllib3.util.parse_url('/foo?bar'))
    # Url(scheme=None, host=None, port=None, path='/foo', query='bar', ...)
z//Nr   r-   i  )r   r   r   r   r   r   r   )r	   
_SCHEME_RErK   _URI_REr<   rT   r   rH   Z
rpartition_HOST_PORT_REr8   _USERINFO_CHARSintr   rE   rC   rU   rV   _FRAGMENT_CHARSZ
ValueErrorZAttributeError)r.   Z
source_urlr   r,   r   r   r   Znormalize_urir   Z_Z	host_portr   r   Zport_intZes   &              r   	parse_urlr^   o  s   8 uJS!!Sj$43:==3E3L3L3N04$QQ&,,.<Q*Q\\^F!*!5!5c!:DY<<4D&,,Y7>>@JD,T?Crz#T4D4yH*U*(-- + Ht,T,T2D({;DU)%>EX,XGH  4DD  ' 4 ,!34sT   1G# ,G# G# $G# 7G# 9A'G# !"G# G# G# $G# ,G# #H4H  H)ZhttpZhttpsN)	z(?:%(hex)s:){6}%(ls32)sz::(?:%(hex)s:){5}%(ls32)sz%(?:%(hex)s)?::(?:%(hex)s:){4}%(ls32)sz2(?:(?:%(hex)s:)?%(hex)s)?::(?:%(hex)s:){3}%(ls32)sz6(?:(?:%(hex)s:){0,2}%(hex)s)?::(?:%(hex)s:){2}%(ls32)sz/(?:(?:%(hex)s:){0,3}%(hex)s)?::%(hex)s:%(ls32)sz'(?:(?:%(hex)s:){0,4}%(hex)s)?::%(ls32)sz&(?:(?:%(hex)s:){0,5}%(hex)s)?::%(hex)sz(?:(?:%(hex)s:){0,6}%(hex)s)?::i)6Z
__future__r   ZreZtypingZ
exceptionsr   Zutilr   rH   Zcompiler=   rX   ZUNICODEZDOTALLrY   Z	_IPV4_PATZ_HEX_PATr   Z	_LS32_PATZ_subsZ_variationsZ_UNRESERVED_PATrB   Z	_IPV6_PATZ_ZONE_ID_PATZ_IPV6_ADDRZ_PATZ_REG_NAME_PATrS   rM   Z_IPV6_RErI   Z_BRACELESS_IPV6_ADDRZ_RErJ   Z_HOST_PORT_PATrZ   ZsetrL   Z_SUB_DELIM_CHARSr[   rU   rV   r]   Z
NamedTupleZOptionalr(   r\   r	   Zoverloadr8   rC   rE   rN   rW   r^   )Zxs   0r   <module>r_      s   " 	  +  0  jj+,ZZ9:

**
 JJ -	$++y+I		&),* YCHH=A%ii=>>D	03HH)#f,|;gE4ZZ<=
::cIo+,::cIo+,C/1C78::cOAb,A&AC&GH jj|+g56 
 

>2::		+ABH  }% #&66#>c
*!,u!4 4B
vs+,V__S)*V__S)*V__S)*V__S)*fooc*+-.	
BJ    !&H<  @  @  >  >:(&$fw	 >s   "M
