Ë
    6•±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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lmZ  G d„ d	«      Zdd
„Z G d„ de«      Zy)é    )ÚannotationsN)Údate)Ú	http_date)ÚResponseé   )ÚAppc                  óT   — e Zd ZdZd
d„Zdd„Zdd„Zdd„Zdd„Z	 	 	 	 	 	 dd„Z	dd„Z
y	)ÚJSONProvideraÉ  A standard set of JSON operations for an application. Subclasses
    of this can be used to customize JSON behavior or use different
    JSON libraries.

    To implement a provider for a specific library, subclass this base
    class and implement at least :meth:`dumps` and :meth:`loads`. All
    other methods have default implementations.

    To use a different provider, either subclass ``Flask`` and set
    :attr:`~flask.Flask.json_provider_class` to a provider class, or set
    :attr:`app.json <flask.Flask.json>` to an instance of the class.

    :param app: An application instance. This will be stored as a
        :class:`weakref.proxy` on the :attr:`_app` attribute.

    .. versionadded:: 2.2
    c                ó8   — t        j                  |«      | _        y )N)ÚweakrefÚproxyÚ_app)ÚselfÚapps     ú^/var/www/passport.vulcan-creative.com/venv/lib/python3.12/site-packages/flask/json/provider.pyÚ__init__zJSONProvider.__init__&   s   € Ü Ÿ™ sÓ+ˆ�	ó    c                ó   — t         ‚)z‘Serialize data as JSON.

        :param obj: The data to serialize.
        :param kwargs: May be passed to the underlying JSON library.
        ©ÚNotImplementedError©r   ÚobjÚkwargss      r   ÚdumpszJSONProvider.dumps)   ó
   € ô "Ð!r   c                óH   — |j                   | j                  |fi |¤Ž«       y)a  Serialize data as JSON and write to a file.

        :param obj: The data to serialize.
        :param fp: A file opened for writing text. Should use the UTF-8
            encoding to be valid JSON.
        :param kwargs: May be passed to the underlying JSON library.
        N)Úwriter   )r   r   Úfpr   s       r   ÚdumpzJSONProvider.dump1   s    € ð 	�‰��—‘˜CÑ* 6Ñ*Õ+r   c                ó   — t         ‚)z�Deserialize data as JSON.

        :param s: Text or UTF-8 bytes.
        :param kwargs: May be passed to the underlying JSON library.
        r   ©r   Úsr   s      r   ÚloadszJSONProvider.loads;   r   r   c                óD   —  | j                   |j                  «       fi |¤ŽS )z»Deserialize data as JSON read from a file.

        :param fp: A file opened for reading text or UTF-8 bytes.
        :param kwargs: May be passed to the underlying JSON library.
        )r#   Úread)r   r   r   s      r   ÚloadzJSONProvider.loadC   s    € ð ˆt�z‰z˜"Ÿ'™'›)Ñ. vÑ.Ð.r   c                ó\   — |r|rt        d«      ‚|s|sy t        |«      dk(  r|d   S |xs |S )Nz9app.json.response() takes either args or kwargs, not bothé   r   )Ú	TypeErrorÚlen)r   Úargsr   s      r   Ú_prepare_response_objz"JSONProvider._prepare_response_objK   s;   € ñ ‘FÜÐWÓXÐXá™FØäˆt‹9˜Š>Ø˜‘7ˆNàŠ~�vÐr   c                ó~   — | j                  ||«      }| j                  j                  | j                  |«      d¬«      S )a(  Serialize the given arguments as JSON, and return a
        :class:`~flask.Response` object with the ``application/json``
        mimetype.

        The :func:`~flask.json.jsonify` function calls this method for
        the current application.

        Either positional or keyword arguments can be given, not both.
        If no arguments are given, ``None`` is serialized.

        :param args: A single value to serialize, or multiple values to
            treat as a list to serialize.
        :param kwargs: Treat as a dict to serialize.
        úapplication/json©Úmimetype)r,   r   Úresponse_classr   )r   r+   r   r   s       r   ÚresponsezJSONProvider.responseY   s9   € ð ×(Ñ(¨¨vÓ6ˆØ�y‰y×'Ñ'¨¯
©
°3«ÐBTÐ'ÓUÐUr   N)r   r   ÚreturnÚNone©r   út.Anyr   r6   r3   Ústr)r   r6   r   z	t.IO[str]r   r6   r3   r4   ©r"   zstr | bytesr   r6   r3   r6   )r   zt.IO[t.AnyStr]r   r6   r3   r6   )r+   ztuple[t.Any, ...]r   zdict[str, t.Any]r3   r6   ©r+   r6   r   r6   r3   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r#   r&   r,   r2   © r   r   r
   r
      sC   „ ñó$,ó"ó,ó"ó/ðØ%ðØ/?ðà	óôVr   r
   c                ó�  — t        | t        «      rt        | «      S t        | t        j                  t
        j                  f«      rt        | «      S t        r*t        j                  | «      rt        j                  | «      S t        | d«      rt        | j                  «       «      S t        dt        | «      j                  › d�«      ‚)NÚ__html__zObject of type z is not JSON serializable)Ú
isinstancer   r   ÚdecimalÚDecimalÚuuidÚUUIDr7   ÚdataclassesÚis_dataclassÚasdictÚhasattrr@   r)   Útyper:   )Úos    r   Ú_defaultrL   l   s’   € Ü�!”TÔÜ˜‹|Ðä�!”g—o‘o¤t§y¡yÐ1Ô2Ü�1‹vˆå”{×/Ñ/°Ô2Ü×!Ñ! !Ó$Ð$äˆq�*ÔÜ�1—:‘:“<Ó Ð ä
�o¤d¨1£g×&6Ñ&6Ð%7Ð7PÐQÓ
RÐRr   c                  óh   — e Zd ZU dZ ee«      Zded<   	 dZ	 dZ		 dZ
ded<   	 dZ	 dd	„Zdd
„Zdd„Zy)ÚDefaultJSONProvidera4  Provide JSON operations using Python's built-in :mod:`json`
    library. Serializes the following additional data types:

    -   :class:`datetime.datetime` and :class:`datetime.date` are
        serialized to :rfc:`822` strings. This is the same as the HTTP
        date format.
    -   :class:`uuid.UUID` is serialized to a string.
    -   :class:`dataclasses.dataclass` is passed to
        :func:`dataclasses.asdict`.
    -   :class:`~markupsafe.Markup` (or any object with a ``__html__``
        method) will call the ``__html__`` method to get a string.
    zt.Callable[[t.Any], t.Any]ÚdefaultTNzbool | NoneÚcompactr.   c                óÖ   — |j                  d| j                  «       |j                  d| j                  «       |j                  d| j                  «       t	        j
                  |fi |¤ŽS )aI  Serialize data as JSON to a string.

        Keyword arguments are passed to :func:`json.dumps`. Sets some
        parameter defaults from the :attr:`default`,
        :attr:`ensure_ascii`, and :attr:`sort_keys` attributes.

        :param obj: The data to serialize.
        :param kwargs: Passed to :func:`json.dumps`.
        rO   Úensure_asciiÚ	sort_keys)Ú
setdefaultrO   rR   rS   Újsonr   r   s      r   r   zDefaultJSONProvider.dumps¦   sV   € ð 	×Ñ˜) T§\¡\Ô2Ø×Ñ˜.¨$×*;Ñ*;Ô<Ø×Ñ˜+ t§~¡~Ô6Ü�z‰z˜#Ñ( Ñ(Ð(r   c                ó.   — t        j                  |fi |¤ŽS )z–Deserialize data as JSON from a string or bytes.

        :param s: Text or UTF-8 bytes.
        :param kwargs: Passed to :func:`json.loads`.
        )rU   r#   r!   s      r   r#   zDefaultJSONProvider.loadsµ   s   € ô �z‰z˜!Ñ&˜vÑ&Ð&r   c                óJ  — | j                  ||«      }i }| j                  €| j                  j                  s| j                  du r|j	                  dd«       n|j	                  dd«       | j                  j                   | j                  |fi |¤Ž› d�| j                  ¬«      S )a�  Serialize the given arguments as JSON, and return a
        :class:`~flask.Response` object with it. The response mimetype
        will be "application/json" and can be changed with
        :attr:`mimetype`.

        If :attr:`compact` is ``False`` or debug mode is enabled, the
        output will be formatted to be easier to read.

        Either positional or keyword arguments can be given, not both.
        If no arguments are given, ``None`` is serialized.

        :param args: A single value to serialize, or multiple values to
            treat as a list to serialize.
        :param kwargs: Treat as a dict to serialize.
        FÚindentr   Ú
separators)ú,ú:ú
r/   )r,   rP   r   ÚdebugrT   r1   r   r0   )r   r+   r   r   Ú	dump_argss        r   r2   zDefaultJSONProvider.response½   s—   € ð  ×(Ñ(¨¨vÓ6ˆØ&(ˆ	à�L‰LÐ  T§Y¡Y§_¢_¸¿¹ÈÑ9NØ× Ñ  ¨1Õ-à× Ñ  ¨zÔ:à�y‰y×'Ñ'Øˆt�z‰z˜#Ñ+ Ñ+Ð,¨BÐ/¸$¿-¹-ð (ó 
ð 	
r   r5   r8   r9   )r:   r;   r<   r=   ÚstaticmethodrL   rO   Ú__annotations__rR   rS   rP   r0   r   r#   r2   r>   r   r   rN   rN   |   s`   … ññ +7°xÓ*@€GÐ'Ó@ðð
 €Lðð
 €Iðð  €Gˆ[Óðð
 "€HØ/ó)ó'ô
r   rN   )rK   r6   r3   r6   )Ú
__future__r   rF   rB   rU   ÚtypingÚtrD   r   Údatetimer   Úwerkzeug.httpr   ÚTYPE_CHECKINGÚwerkzeug.sansio.responser   Ú
sansio.appr   r
   rL   rN   r>   r   r   ú<module>ri      sP   ðÝ "ã Û Û Û Û Û Ý å #à‡?‚?Ý1å ÷VVñ VVórSô [
˜,õ [
r   