ó
    pñ:iˆ  ã                  ó¼   • S SK Jr  S SKrS SKJr  SSKJr  SSKJ	r	  SSK
Jr  SS jr  S         SS	 jjr   S           SS
 jjr  S     SS jjrg)é    )ÚannotationsN)Úquoteé   )Ú
_plain_int)ÚSecurityError)Ú
uri_to_iric                óö  • U (       d  g U R                  S5      S   R                  S5      R                  S5      n [	        U[
        5      (       a  U/nU H  nUR                  S5      (       a  USS nS	nOSn UR                  S5      S   R                  S5      R                  S5      nX :X  d$  U(       d  Md  U R                  SU 35      (       d  M    g	   g! [         a     gf = f! [         a       gf = f)
zàCheck if a host matches a list of trusted names.

:param hostname: The name to check.
:param trusted_list: A list of valid names to match. If a name
    starts with a dot it will match all subdomains.

.. versionadded:: 0.9
FÚ:r   ÚidnaÚasciiÚ.é   NT)Ú	partitionÚencodeÚdecodeÚUnicodeEncodeErrorÚ
isinstanceÚstrÚ
startswithÚendswith)ÚhostnameÚtrusted_listÚrefÚsuffix_matchs       ÚX/srv/projetos/modelo_ml_acdoc/venv/lib/python3.13/site-packages/werkzeug/sansio/utils.pyÚhost_is_trustedr      sü   € ö ØðØ×%Ñ% cÓ*¨1Ñ-×4Ñ4°VÓ<×CÑCÀGÓLˆô �,¤×$Ñ$Ø$�~ˆãˆØ�>‰>˜#×ÑØ�a�b�'ˆCØ‰Là ˆLð	Ø—-‘- Ó$ QÑ'×.Ñ.¨vÓ6×=Ñ=¸gÓFˆCð ‹?Ÿ|˜|°×0AÑ0AÀAÀcÀUÀ)×0LÓ0LÙñ ð øô+ ó Ùðûô "ó 	Úð	ús#   Š2C Á:2C*Ã
C'Ã&C'Ã*
C8Ã7C8c                ó<  • SnUb  UnO-Ub*  US   nSU;   a  US   S:w  a  SU S3nUS   b
  U SUS    3nU S;   a  UR                  S	5      (       a  USS
 nO!U S;   a  UR                  S5      (       a  USS nUb   [        XC5      (       d  [        SU< S35      eU$ )a<  Return the host for the given parameters.

This first checks the ``host_header``. If it's not present, then
``server`` is used. The host will only contain the port if it is
different than the standard port for the protocol.

Optionally, verify that the host is trusted using
:func:`host_is_trusted` and raise a
:exc:`~werkzeug.exceptions.SecurityError` if it is not.

:param scheme: The protocol the request used, like ``"https"``.
:param host_header: The ``Host`` header value.
:param server: Address of the server. ``(host, port)``, or
    ``(path, None)`` for unix sockets.
:param trusted_hosts: A list of trusted host names.

:return: Host, with port if necessary.
:raise ~werkzeug.exceptions.SecurityError: If the host is not
    trusted.

.. versionchanged:: 3.1.3
    If ``SERVER_NAME`` is IPv6, it is wrapped in ``[]``.
Ú Nr   r
   Ú[Ú]r   >   ÚwsÚhttpz:80éýÿÿÿ>   ÚwssÚhttpsz:443éüÿÿÿzHost z is not trusted.)r   r   r   )ÚschemeÚhost_headerÚserverÚtrusted_hostsÚhosts        r   Úget_hostr,   1   sÏ   € ð: €DàÑØ‰Ø	Ñ	Ø�a‰yˆð �$‹;˜4 ™7 c›>Ø�t�f˜A�;ˆDà�!‰9Ñ Ø�V˜1˜V A™Y˜KÐ(ˆDà�Ó D§M¡M°%×$8Ñ$8Ø�C�Rˆy‰Ø	Ð#Ó	#¨¯©°f×(=Ñ(=Ø�C�RˆyˆàÑ Ü˜t×3Ñ3Ü %¨¡xÐ/?Ð @ÓAÐAà€Kó    c                óú  • U SU/nUc+  UR                  S5        [        SR                  U5      5      $ UR                  [        UR	                  S5      SS95        UR                  S5        Uc  [        SR                  U5      5      $ UR                  [        UR                  S5      SS95        U(       a*  UR                  S5        UR                  [        USS95        [        SR                  U5      5      $ )a[  Recreate the URL for a request. If an optional part isn't
provided, it and subsequent parts are not included in the URL.

The URL is an IRI, not a URI, so it may contain Unicode characters.
Use :func:`~werkzeug.urls.iri_to_uri` to convert it to ASCII.

:param scheme: The protocol the request used, like ``"https"``.
:param host: The host the request was made to. See :func:`get_host`.
:param root_path: Prefix that the application is mounted under. This
    is prepended to ``path``.
:param path: The path part of the URL after ``root_path``.
:param query_string: The portion of the URL after the "?".
z://Ú/r   z!$&'()*+,/:;=@%)ÚsafeÚ?z!$&'()*+,/:;=?@%)Úappendr   Újoinr   ÚrstripÚlstrip)r'   r+   Ú	root_pathÚpathÚquery_stringÚurls         r   Úget_current_urlr:   i   sÊ   € ð( �5˜$Ð
€CàÑØ�
‰
�3ŒÜ˜"Ÿ'™' #›,Ó'Ð'ð ‡J�JŒu�Y×%Ñ% cÓ*Ð1BÑCÔDØ‡J�Jˆs„Oà�|Ü˜"Ÿ'™' #›,Ó'Ð'à‡J�JŒu�T—[‘[ Ó%Ð,=Ñ>Ô?æØ�
‰
�3ŒØ�
‰
”5˜Ð,>Ñ?Ô@ä�b—g‘g˜c“lÓ#Ð#r-   c                ób   • US:X  d  U c  g [        S[        U 5      5      $ ! [         a     gf = f)a�  Return the ``Content-Length`` header value as an int. If the header is not given
or the ``Transfer-Encoding`` header is ``chunked``, ``None`` is returned to indicate
a streaming request. If the value is not an integer, or negative, 0 is returned.

:param http_content_length: The Content-Length HTTP header.
:param http_transfer_encoding: The Transfer-Encoding HTTP header.

.. versionadded:: 2.2
ÚchunkedNr   )Úmaxr   Ú
ValueError)Úhttp_content_lengthÚhttp_transfer_encodings     r   Úget_content_lengthrA   ”   s?   € ð  Ó*Ð.AÑ.IØðÜ�1”jÐ!4Ó5Ó6Ð6øÜó Ùðús   Œ! ¡
.­.)r   ú
str | Noner   zt.Iterable[str]ÚreturnÚbool)NN)
r'   r   r(   rB   r)   ztuple[str, int | None] | Noner*   zt.Iterable[str] | NonerC   r   )NNN)r'   r   r+   r   r6   rB   r7   rB   r8   zbytes | NonerC   r   )r?   rB   r@   rB   rC   z
int | None)Ú
__future__r   ÚtypingÚtÚurllib.parser   Ú	_internalr   Ú
exceptionsr   Úurlsr   r   r,   r:   rA   © r-   r   Ú<module>rM      sÉ   ðÝ "ã Ý å "Ý &Ý ô#ðR -1Ø,0ð	5Øð5àð5ð *ð5ð *ð	5ð
 	õ5ðv !ØØ!%ð($Øð($à
ð($ð ð($ð ð	($ð
 ð($ð 	õ($ðX '+Ø)-ðØ#ðà&ðð ör-   