Ë
    R>{i+  ã                  óö   — d dl mZ d dlZd dlZd dlZej                  eef   Z	ej                  e	ej                  ee	f   ej                  ee	ef   f   Z	 d
	 	 	 	 	 dd„Zdd„Zdd„Zdd„Zdd„Z G d„ d	«      Zy)é    )ÚannotationsNc                óB   — | rt        j                  | «      d   xs |S |S )zæ
    Guess the "Content-Type" of a file.

    :param filename:
        The filename to guess the "Content-Type" of using :mod:`mimetypes`.
    :param default:
        If no "Content-Type" can be guessed, default to `default`.
    r   )Ú	mimetypesÚ
guess_type)ÚfilenameÚdefaults     úL/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/urllib3/fields.pyÚguess_content_typer
      s'   € ñ Ü×#Ñ# HÓ-¨aÑ0Ò;°GÐ;Ø€Nó    c                óZ  ‡— ddl }|j                  dt        d¬«       t        ‰t        «      r‰j                  d«      Št        ˆfd„dD «       «      s| › d	‰› d
�}	 |j                  d«       |S t        j                  j                  ‰d«      Š| › d‰› �Š‰S # t        t        f$ r Y Œ:w xY w)a´  
    Helper function to format and quote a single header parameter using the
    strategy defined in RFC 2231.

    Particularly useful for header parameters which might contain
    non-ASCII values, like file names. This follows
    `RFC 2388 Section 4.4 <https://tools.ietf.org/html/rfc2388#section-4.4>`_.

    :param name:
        The name of the parameter, a string expected to be ASCII only.
    :param value:
        The value of the parameter, provided as ``bytes`` or `str``.
    :returns:
        An RFC-2231-formatted unicode string.

    .. deprecated:: 2.0.0
        Will be removed in urllib3 v2.1.0. This is not valid for
        ``multipart/form-data`` header parameters.
    r   Nz�'format_header_param_rfc2231' is deprecated and will be removed in urllib3 v2.1.0. This is not valid for multipart/form-data header parameters.é   ©Ú
stacklevelúutf-8c              3  ó&   •K  — | ]  }|‰v –— Œ
 y ­w©N© )Ú.0ÚchÚvalues     €r	   ú	<genexpr>z.format_header_param_rfc2231.<locals>.<genexpr>@   s   øè ø€ Ò/˜rˆr�UŒ{Ñ/ùs   ƒz"\
ú="ú"Úasciiz*=)ÚwarningsÚwarnÚDeprecationWarningÚ
isinstanceÚbytesÚdecodeÚanyÚencodeÚUnicodeEncodeErrorÚUnicodeDecodeErrorÚemailÚutilsÚencode_rfc2231)Únamer   r   Úresults    `  r	   Úformat_header_param_rfc2231r*      s½   ø€ ó( à‡M�Mð	1ô 	Øð ô ô �%œÔØ—‘˜WÓ%ˆäÓ/ YÔ/Ô/Ø�6˜˜E˜7 !Ð$ˆð	Ø�M‰M˜'Ô"ð ˆMä�K‰K×&Ñ& u¨gÓ6€EØˆf�B�u�gÐ€Eà€Løô #Ô$6Ð7ò 	Ùð	ús   ÁB ÂB*Â)B*c                ó~   — t        |t        «      r|j                  d«      }|j                  ddddœ«      }| › d|› d�S )aí  
    Format and quote a single multipart header parameter.

    This follows the `WHATWG HTML Standard`_ as of 2021/06/10, matching
    the behavior of current browser and curl versions. Values are
    assumed to be UTF-8. The ``\n``, ``\r``, and ``"`` characters are
    percent encoded.

    .. _WHATWG HTML Standard:
        https://html.spec.whatwg.org/multipage/
        form-control-infrastructure.html#multipart-form-data

    :param name:
        The name of the parameter, an ASCII-only ``str``.
    :param value:
        The value of the parameter, a ``str`` or UTF-8 encoded
        ``bytes``.
    :returns:
        A string ``name="value"`` with the escaped value.

    .. versionchanged:: 2.0.0
        Matches the WHATWG HTML Standard as of 2021/06/10. Control
        characters are no longer percent encoded.

    .. versionchanged:: 2.0.0
        Renamed from ``format_header_param_html5`` and
        ``format_header_param``. The old names will be removed in
        urllib3 v2.1.0.
    r   z%0Az%0Dz%22)é
   é   é"   r   r   )r   r   r    Ú	translate)r(   r   s     r	   Úformat_multipart_header_paramr0   O   sF   € ô< �%œÔØ—‘˜WÓ%ˆð �O‰O ¨E°uÑ=Ó>€EØˆV�2�e�W˜AÐÐr   c                óR   — ddl }|j                  dt        d¬«       t        | |«      S )ú„
    .. deprecated:: 2.0.0
        Renamed to :func:`format_multipart_header_param`. Will be
        removed in urllib3 v2.1.0.
    r   Nz€'format_header_param_html5' has been renamed to 'format_multipart_header_param'. The old name will be removed in urllib3 v2.1.0.r   r   ©r   r   r   r0   ©r(   r   r   s      r	   Úformat_header_param_html5r5   u   ó4   € ó à‡M�Mð	%ô 	Øð ô ô )¨¨uÓ5Ð5r   c                óR   — ddl }|j                  dt        d¬«       t        | |«      S )r2   r   Nzz'format_header_param' has been renamed to 'format_multipart_header_param'. The old name will be removed in urllib3 v2.1.0.r   r   r3   r4   s      r	   Úformat_header_paramr8   ‡   r6   r   c                  ó”   — e Zd ZdZ	 	 	 d		 	 	 	 	 	 	 	 	 d
d„Ze	 d	 	 	 	 	 	 	 dd„«       Zdd„Z	 	 	 	 dd„Zdd„Z		 	 	 d		 	 	 	 	 	 	 dd„Z
y)ÚRequestFieldaô  
    A data container for request body parameters.

    :param name:
        The name of this request field. Must be unicode.
    :param data:
        The data/value body.
    :param filename:
        An optional filename of the request field. Must be unicode.
    :param headers:
        An optional dict-like object of headers to initially use for the field.

    .. versionchanged:: 2.0.0
        The ``header_formatter`` parameter is deprecated and will
        be removed in urllib3 v2.1.0.
    Nc                óÂ   — || _         || _        || _        i | _        |rt	        |«      | _        |�$dd l}|j                  dt        d¬«       || _        y t        | _        y )Nr   zUThe 'header_formatter' parameter is deprecated and will be removed in urllib3 v2.1.0.r   r   )
Ú_nameÚ	_filenameÚdataÚheadersÚdictr   r   r   Úheader_formatterr0   )Úselfr(   r>   r   r?   rA   r   s          r	   Ú__init__zRequestField.__init__«   se   € ð ˆŒ
Ø!ˆŒØˆŒ	Ø.0ˆŒÙÜ ›=ˆDŒLàÐ'Ûà�M‰Mð5ä"Øð	 ô ð %5ˆDÕ!ä$AˆDÕ!r   c                ó€  — t        |t        «      r‰t        |«      dk(  r;t        j                  t        j
                  t        t        t        f   |«      \  }}}nFt        j                  t        j
                  t        t        f   |«      \  }}t        |«      }nd}d}|} | ||||¬«      }|j                  |¬«       |S )a³  
        A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.

        Supports constructing :class:`~urllib3.fields.RequestField` from
        parameter of key/value strings AND key/filetuple. A filetuple is a
        (filename, data, MIME type) tuple where the MIME type is optional.
        For example::

            'foo': 'bar',
            'fakefile': ('foofile.txt', 'contents of foofile'),
            'realfile': ('barfile.txt', open('realfile').read()),
            'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
            'nonamefile': 'contents of nonamefile field',

        Field names and filenames must be unicode.
        é   N)r   rA   )Úcontent_type)
r   ÚtupleÚlenÚtypingÚcastÚTupleÚstrÚ_TYPE_FIELD_VALUEr
   Úmake_multipart)ÚclsÚ	fieldnamer   rA   r   r>   rF   Úrequest_params           r	   Úfrom_tupleszRequestField.from_tuplesÇ   s´   € ô6 �eœUÔ#Ü�5‹z˜QŠÜ/5¯{©{Ü—L‘L¤Ô&7¼Ð!<Ñ=¸uó0Ñ,�˜$¡ô "(§¡Ü—L‘L¤Ô&7Ð!7Ñ8¸%ó"‘�˜$ô  2°(Ó;‘àˆHØˆLØˆDáØ�t hÐAQô
ˆð 	×$Ñ$°,Ð$Ô?àÐr   c                ó&   — | j                  ||«      S )a‹  
        Override this method to change how each multipart header
        parameter is formatted. By default, this calls
        :func:`format_multipart_header_param`.

        :param name:
            The name of the parameter, an ASCII-only ``str``.
        :param value:
            The value of the parameter, a ``str`` or UTF-8 encoded
            ``bytes``.

        :meta public:
        )rA   )rB   r(   r   s      r	   Ú_render_partzRequestField._render_partø   s   € ð ×$Ñ$ T¨5Ó1Ð1r   c                óÊ   — g }t        |t        «      r|j                  «       }n|}|D ])  \  }}|€Œ	|j                  | j	                  ||«      «       Œ+ dj                  |«      S )aO  
        Helper function to format and quote a single header.

        Useful for single headers that are composed of multiple items. E.g.,
        'Content-Disposition' fields.

        :param header_parts:
            A sequence of (k, v) tuples or a :class:`dict` of (k, v) to format
            as `k1="v1"; k2="v2"; ...`.
        ú; )r   r@   ÚitemsÚappendrT   Újoin)rB   Úheader_partsÚpartsÚiterabler(   r   s         r	   Ú_render_partszRequestField._render_parts  si   € ð& ˆÜ�l¤DÔ)Ø#×)Ñ)Ó+‰Hà#ˆHà#ò 	=‰KˆD�%ØÑ Ø—‘˜T×.Ñ.¨t°UÓ;Õ<ð	=ð �y‰y˜ÓÐr   c                ó`  — g }g d¢}|D ]B  }| j                   j                  |d«      sŒ |j                  |› d| j                   |   › �«       ŒD | j                   j                  «       D ]#  \  }}||vsŒ|sŒ|j                  |› d|› �«       Œ% |j                  d«       dj	                  |«      S )z=
        Renders the headers for this request field.
        )úContent-DispositionúContent-TypeúContent-LocationFz: z
)r?   ÚgetrX   rW   rY   )rB   ÚlinesÚ	sort_keysÚsort_keyÚheader_nameÚheader_values         r	   Úrender_headerszRequestField.render_headers'  s¸   € ð ˆâOˆ	Ø!ò 	FˆHØ�|‰|×Ñ ¨%Õ0Ø—‘ ˜z¨¨D¯L©L¸Ñ,BÐ+CÐDÕEð	Fð *.¯©×);Ñ);Ó)=ò 	CÑ%ˆK˜Ø )Ò+ÚØ—L‘L K =°°<°.Ð!AÕBð	Cð
 	�‰�VÔØ�{‰{˜5Ó!Ð!r   c           	     óä   — |xs ddj                  d| j                  d| j                  fd| j                  ff«      g«      z   }|| j                  d<   || j                  d<   || j                  d<   y	)
aó  
        Makes this request field into a multipart request field.

        This method overrides "Content-Disposition", "Content-Type" and
        "Content-Location" headers to the request parameter.

        :param content_disposition:
            The 'Content-Disposition' of the request body. Defaults to 'form-data'
        :param content_type:
            The 'Content-Type' of the request body.
        :param content_location:
            The 'Content-Location' of the request body.

        z	form-datarV   Ú r(   r   r_   r`   ra   N)rY   r]   r<   r=   r?   )rB   Úcontent_dispositionrF   Úcontent_locations       r	   rN   zRequestField.make_multipart:  s   € ð(  3ÒA°kÀTÇYÁYàØ×"Ñ"Ø˜dŸj™jÐ)¨J¸¿¹Ð+GÐHóðóF
ñ 
Ðð /Bˆ�‰Ð*Ñ+Ø'3ˆ�‰�^Ñ$Ø+;ˆ�‰Ð'Ò(r   )NNN)
r(   rL   r>   rM   r   ú
str | Noner?   ztyping.Mapping[str, str] | NonerA   ú5typing.Callable[[str, _TYPE_FIELD_VALUE], str] | Noner   )rP   rL   r   Ú_TYPE_FIELD_VALUE_TUPLErA   rn   Úreturnr:   ©r(   rL   r   rM   rp   rL   )rZ   z[dict[str, _TYPE_FIELD_VALUE | None] | typing.Sequence[tuple[str, _TYPE_FIELD_VALUE | None]]rp   rL   )rp   rL   )rk   rm   rF   rm   rl   rm   rp   ÚNone)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rC   ÚclassmethodrR   rT   r]   rh   rN   r   r   r	   r:   r:   ™   së   „ ñð*  $Ø37ØRVðBàðBð  ðBð ð	Bð
 1ðBð PóBð8 ð
 SWð	.àð.ð 'ð.ð Pð	.ð
 
ò.ó ð.ó`2ð  ðDð ð 
ó ó>"ð* +/Ø#'Ø'+ð	<à'ð<ð !ð<ð %ð	<ð
 
ô<r   r:   )zapplication/octet-stream)r   rm   r   rL   rp   rL   rq   )Ú
__future__r   Úemail.utilsr%   r   rI   ÚUnionrL   r   rM   rK   ro   r
   r*   r0   r5   r8   r:   r   r   r	   ú<module>r{      s¦   ðÝ "ã Û Û à—L‘L  e Ñ,Ð Ø Ÿ,™,ØØ
‡L�L�Ð'Ð'Ñ(Ø
‡L�L�Ð'¨Ð,Ñ-ð/ñÐ ð *DðØðØ#&ðàóó -ó`#óL6ó$6÷$@<ò @<r   