Ë
    &V.j>  ã                  óD  — d Z ddlmZ ddlZddlZddlZddlmZm	Z	m
Z
mZmZmZmZ ddlmZ ddlmZmZmZ ddlmZmZmZmZ dd	lmZ dd
lmZ ddlmZ ddl m!Z! ddl"m#Z#m$Z$m%Z% erddl&m'Z' ddl(m)Z) dZ* ed«      Z+ejX                  dk\  r‰ eejZ                  e#e%f¬«      edddddddddddœ
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d%d„«       «       Z. eejZ                  e#e%f¬«      edddddddddddœ
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d&d„«       «       Z.n| eejZ                  e#e%f¬«      edddddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d'd„«       «       Z. eejZ                  e#e%f¬«      edddddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d(d„«       «       Z. eejZ                  e#e%f¬«      	 d)dddddddddddœ
	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d*d„«       Z. ee/«      Z0dejX                  cxk  rdk  rn nd+d „Z1e1ejd                  _3        ddd!dd"œ	 	 	 	 	 	 	 	 	 	 	 d,d#„Z4d-d$„Z5y).z7Provide an enhanced dataclass that performs validation.é    )ÚannotationsN)ÚTYPE_CHECKINGÚAnyÚCallableÚGenericÚNoReturnÚTypeVarÚoverload)Úwarn)ÚLiteralÚ	TypeGuardÚdataclass_transformé   )Ú_configÚ_decoratorsÚ_namespace_utilsÚ_typing_extra)Ú_dataclasses)Úgetattr_migration)Ú
ConfigDict)ÚPydanticUserError)ÚFieldÚ	FieldInfoÚPrivateAttr)ÚPydanticDataclass)ÚMappingNamespace)Ú	dataclassÚrebuild_dataclassÚ_T©é   é
   )Úfield_specifiersFT.©
ÚinitÚreprÚeqÚorderÚunsafe_hashÚfrozenÚconfigÚvalidate_on_initÚkw_onlyÚslotsc        
         ó   — y ©N© r$   s
             úVC:\xampp\htdocs\tradingbinance\backend\.venv\Lib\site-packages\pydantic/dataclasses.pyr   r      s   € ð 	ó    c       
         ó   — y r0   r1   )Ú_clsr%   r&   r'   r(   r)   r*   r+   r,   r-   r.   s              r2   r   r   /   s   € ð #&r3   ©r%   r&   r'   r(   r)   r*   r+   r,   c                 ó   — y r0   r1   r6   s           r2   r   r   B   s   € ð 	r3   c                ó   — y r0   r1   )	r5   r%   r&   r'   r(   r)   r*   r+   r,   s	            r2   r   r   Q   s   € ð #&r3   c       
   	     ó®   ‡‡‡‡‡‡‡‡— |du sJ d«       ‚|dusJ d«       ‚t         j                  dk\  r|	|
dœŠni Šdd„Šd	ˆˆˆˆˆˆˆˆfd„}| €|S  || «      S )
aÄ  Usage docs: https://docs.pydantic.dev/2.10/concepts/dataclasses/

    A decorator used to create a Pydantic-enhanced dataclass, similar to the standard Python `dataclass`,
    but with added validation.

    This function should be used similarly to `dataclasses.dataclass`.

    Args:
        _cls: The target `dataclass`.
        init: Included for signature compatibility with `dataclasses.dataclass`, and is passed through to
            `dataclasses.dataclass` when appropriate. If specified, must be set to `False`, as pydantic inserts its
            own  `__init__` function.
        repr: A boolean indicating whether to include the field in the `__repr__` output.
        eq: Determines if a `__eq__` method should be generated for the class.
        order: Determines if comparison magic methods should be generated, such as `__lt__`, but not `__eq__`.
        unsafe_hash: Determines if a `__hash__` method should be included in the class, as in `dataclasses.dataclass`.
        frozen: Determines if the generated class should be a 'frozen' `dataclass`, which does not allow its
            attributes to be modified after it has been initialized. If not set, the value from the provided `config` argument will be used (and will default to `False` otherwise).
        config: The Pydantic config to use for the `dataclass`.
        validate_on_init: A deprecated parameter included for backwards compatibility; in V2, all Pydantic dataclasses
            are validated on init.
        kw_only: Determines if `__init__` method parameters must be specified by keyword only. Defaults to `False`.
        slots: Determines if the generated class should be a 'slots' `dataclass`, which does not allow the addition of
            new attributes after instantiation.

    Returns:
        A decorator that accepts a class as its argument and returns a Pydantic `dataclass`.

    Raises:
        AssertionError: Raised if `init` is not `False` or `validate_on_init` is `False`.
    Fz7pydantic.dataclasses.dataclass only supports init=Falsez-validate_on_init=False is no longer supportedr    )r-   r.   c                ó¼  — | j                   D ]Í  }t        |dg «      }|D ]¹  }t        | |d«      }t        |t        «      sŒ!d|i}t        j
                  dk\  r|j                  rd|d<   |j                  dur|j                  |d<   t        | |t        j                  di |¤Ž«       | j                  j                  d«      €i | _        ||   | j                  |<   Œ» ŒÏ y)	a  Make sure that stdlib `dataclasses` understands `Field` kwargs like `kw_only`
        To do that, we simply change
          `x: int = pydantic.Field(..., kw_only=True)`
        into
          `x: int = dataclasses.field(default=pydantic.Field(..., kw_only=True), kw_only=True)`
        Ú__annotations__NÚdefaultr    Tr-   r&   r1   )Ú__mro__ÚgetattrÚ
isinstancer   ÚsysÚversion_infor-   r&   ÚsetattrÚdataclassesÚfieldÚ__dict__Úgetr;   )ÚclsÚannotation_clsr   Ú
field_nameÚfield_valueÚ
field_argss         r2   Úmake_pydantic_fields_compatiblez2dataclass.<locals>.make_pydantic_fields_compatible—   så   € ð "ŸkœkˆNô " .Ð2CÀRÓHˆKÛ)�
Ü% c¨:°tÓ<�ä! +¬yÔ9Øð %.¨{Ð#;�
ô ×#Ñ# wÒ.°;×3FÒ3FØ,0�J˜yÑ)ð ×#Ñ#¨4Ñ/Ø)4×)9Ñ)9�J˜vÑ&ä˜˜Z¬×):Ñ):Ñ)H¸ZÑ)HÔIð —<‘<×#Ñ#Ð$5Ó6Ð>Ø*,�CÔ'Ø2=¸jÑ2I�×#Ñ# JÒ/ñ- *ñ	 *r3   c           
     óÈ  •— ddl m}  || «      rt        d| j                  › d�d¬«      ‚| }t	        d„ | j
                  D «       «      }|s.‰�,t        | d	«      r t        d
| j                  › d�t        d¬«       ‰�‰nt        | d	d«      }t        j                  |«      }t        j                  j                  | «      }| j                  }t!        j"                  | «      rNd}| f}t%        | t&        «      rt&        | j(                     }	||	fz   }t+        j,                  | j                  |«      }  ‰| «       ‰�/‰}
|j.                  r1t        d| j                  ›d�t        d¬«       n|j.                  xs d}
t1        j2                  | fd‰‰‰‰|
dœ‰¤Ž} || _        || _        |j6                  | _        |j8                  | _        d| _        t!        j<                  | |d¬«       | S )zÃCreate a Pydantic dataclass from a regular dataclass.

        Args:
            cls: The class to create the Pydantic dataclass from.

        Returns:
            A Pydantic dataclass.
        r   )Úis_model_classz(Cannot create a Pydantic dataclass from z" as it is already a Pydantic modelzdataclass-on-model)Úcodec              3  óF   K  — | ]  }t        j                  |«      –— Œ y ­wr0   )rC   Úis_dataclass)Ú.0Úbases     r2   Ú	<genexpr>z6dataclass.<locals>.create_dataclass.<locals>.<genexpr>Ï   s   è ø€ Ð ZÉMÀD¤×!9Ñ!9¸$×!?ÉMùs   ‚!NÚ__pydantic_config__z[`config` is set via both the `dataclass` decorator and `__pydantic_config__` for dataclass zK. The `config` specification from `dataclass` decorator will take priority.é   )ÚcategoryÚ
stacklevelzN`frozen` is set via both the `dataclass` decorator and `config` for dataclass zW.This is not recommended. The `frozen` specification on `dataclass` will take priority.FT)r%   r&   r'   r(   r)   r*   )Úraise_errors)Ú_internal._utilsrN   r   Ú__name__ÚanyÚ	__bases__Úhasattrr   ÚUserWarningr>   r   ÚConfigWrapperr   ÚDecoratorInfosÚbuildÚ__doc__Ú_pydantic_dataclassesÚis_builtin_dataclassÚ
issubclassr   Ú__parameters__ÚtypesÚ	new_classr*   rC   r   Ú__pydantic_decorators__Ú
__module__Ú__qualname__Ú__pydantic_complete__Úcomplete_dataclass)rG   rN   Úoriginal_clsÚhas_dataclass_baseÚconfig_dictÚconfig_wrapperÚ
decoratorsÚoriginal_docÚbasesÚgeneric_baseÚfrozen_r+   r'   r*   ÚkwargsrL   r(   r&   r)   s              €€€€€€€€r2   Úcreate_dataclassz#dataclass.<locals>.create_dataclassº   s  ø€ õ 	5á˜#ÔÜ#Ø:¸3¿<¹<¸.ÐHjÐkØ)ôð ð
 ˆô !Ñ ZÈCÏMÊMÓ ZÓZÐÙ! fÐ&8¼WÀSÐJ_Ô=`ÜØmÐnq×nzÑnzÐm{ð |\ð ]ä$Øõ	ð !'Ð 2‘f¼ÀÐEZÐ\`Ó8aˆÜ ×.Ñ.¨{Ó;ˆÜ ×/Ñ/×5Ñ5°cÓ:ˆ
ð
 —{‘{ˆä ×5Ñ5°cÔ:ð  ˆLð
 �FˆEÜ˜#œwÔ'Ü& s×'9Ñ'9Ñ:�Ø  Ñ/�Ü—/‘/ #§,¡,°Ó6ˆCá'¨Ô,ð ÐØˆGØ×$Ò$äØdÐeh×eqÑeqÐdtð umð mä(Ø ö	ð %×+Ñ+Ò4¨uˆGä×#Ñ#Øð

ð ØØØØ#Øñ

ð ñ

ˆð '1ˆÔ#Ø"ˆŒØ%×0Ñ0ˆŒØ'×4Ñ4ˆÔØ$)ˆÔ!ô 	×0Ñ0°°nÐSXÕYØˆ
r3   )rG   ú	type[Any]ÚreturnÚNone)rG   rz   r{   útype[PydanticDataclass])r@   rA   )r5   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   ry   rx   rL   s     ``````    @@r2   r   r   a   su   ÿ€ ð\ �5‰=ÐSÐSÓSˆ=Ø 5Ñ(ÐYÐ*YÓYÐ(ä
×Ñ˜7Ò"Ø$¨uÑ5‰àˆó!J÷F[ô [ðz  $˜|ÐÐGÑ1AÀ$Ó1GÐGr3   )r!   é   )r!   é   c                 ó   — t        d«      ‚)a9  This function does nothing but raise an error that is as similar as possible to what you'd get
        if you were to try calling `InitVar[int]()` without this monkeypatch. The whole purpose is just
        to ensure typing._type_check does not error if the type hint evaluates to `InitVar[<parameter>]`.
        z 'InitVar' object is not callable)Ú	TypeError)Úargsrx   s     r2   Ú_call_initvarrƒ      s   € ô
 Ð:Ó;Ð;r3   rV   )ÚforcerY   Ú_parent_namespace_depthÚ_types_namespacec               óB  — |s| j                   ryd| j                  v rt        | d«       |�|}n#|dkD  rt        j                  |d¬«      xs i }ni }t        j                  |¬«      }t        j                  | t        j                  | j                  d¬«      ||d¬	«      S )
ax  Try to rebuild the pydantic-core schema for the dataclass.

    This may be necessary when one of the annotations is a ForwardRef which could not be resolved during
    the initial attempt to build the schema, and automatic rebuilding fails.

    This is analogous to `BaseModel.model_rebuild`.

    Args:
        cls: The class to rebuild the pydantic-core schema for.
        force: Whether to force the rebuilding of the schema, defaults to `False`.
        raise_errors: Whether to raise errors, defaults to `True`.
        _parent_namespace_depth: The depth level of the parent namespace, defaults to 2.
        _types_namespace: The types namespace, defaults to `None`.

    Returns:
        Returns `None` if the schema is already "complete" and rebuilding was not required.
        If rebuilding _was_ required, returns `True` if rebuilding was successful, otherwise `False`.
    NÚ__pydantic_core_schema__r   T)Úparent_depthr„   )Úparent_namespaceF)Úcheck)rY   Úns_resolverÚ_force_build)rm   rE   Údelattrr   Úparent_frame_namespacer   Ú
NsResolverrd   rn   r   r`   rU   )rG   r„   rY   r…   r†   Ú
rebuild_nsrŒ   s          r2   r   r   *  s§   € ñ4 �S×.Ò.Øà! S§\¡\Ñ1Ü�Ð/Ô0àÐ#Ø%‰
Ø	  1Ò	$Ü"×9Ñ9ÐG^ÐfjÔkÒqÐoq‰
àˆ
ä"×-Ñ-Ø#ô€Kô !×3Ñ3ØÜ×Ñ˜c×5Ñ5¸UÔCØ!Øð
 ô
ð 
r3   c               ól   — 	 d| j                   v xr t        j                  | «      S # t        $ r Y yw xY w)z©Whether a class is a pydantic dataclass.

    Args:
        class_: The class.

    Returns:
        `True` if the class is a pydantic dataclass, `False` otherwise.
    Ú__pydantic_validator__F)rE   rC   rQ   ÚAttributeError)Úclass_s    r2   Úis_pydantic_dataclassr–   b  s9   € ðØ'¨6¯?©?Ð:Ò_¼{×?WÑ?WÐX^Ó?_Ð_øÜò Ùðús   ‚$' §	3²3)r%   úLiteral[False]r&   Úboolr'   r˜   r(   r˜   r)   r˜   r*   r˜   r+   ú ConfigDict | type[object] | Noner,   úbool | Noner-   r˜   r.   r˜   r{   ú-Callable[[type[_T]], type[PydanticDataclass]])r5   útype[_T]r%   r—   r&   r˜   r'   r˜   r(   r˜   r)   r˜   r*   rš   r+   r™   r,   rš   r-   r˜   r.   r˜   r{   r}   )r%   r—   r&   r˜   r'   r˜   r(   r˜   r)   r˜   r*   rš   r+   r™   r,   rš   r{   r›   )r5   rœ   r%   r—   r&   r˜   r'   r˜   r(   r˜   r)   r˜   r*   rš   r+   r™   r,   rš   r{   r}   r0   )r5   ztype[_T] | Noner%   r—   r&   r˜   r'   r˜   r(   r˜   r)   r˜   r*   rš   r+   r™   r,   rš   r-   r˜   r.   r˜   r{   zGCallable[[type[_T]], type[PydanticDataclass]] | type[PydanticDataclass])r‚   r   rx   r   r{   r   )rG   r}   r„   r˜   rY   r˜   r…   Úintr†   zMappingNamespace | Noner{   rš   )r•   rz   r{   z"TypeGuard[type[PydanticDataclass]])6rc   Ú
__future__r   Ú_annotationsrC   r@   rh   Útypingr   r   r   r   r   r	   r
   Úwarningsr   Útyping_extensionsr   r   r   Ú	_internalr   r   r   r   r   rd   Ú
_migrationr   r+   r   Úerrorsr   Úfieldsr   r   r   Ú_internal._dataclassesr   Ú_internal._namespace_utilsr   Ú__all__r   rA   rD   r   r[   Ú__getattr__rƒ   ÚInitVarÚ__call__r   r–   r1   r3   r2   Ú<module>r­      s™  ðÙ =å 2ã Û 
Û ß U× UÑ UÝ ç EÑ Eç LÓ LÝ <Ý )Ý Ý %ß 1Ñ 1áÝ9Ý<à
*€áˆTƒ]€à×Ñ�wÒá¨;×+<Ñ+<¸eÀ[Ð*QÔRØð  %ØØØØ!ØØ37Ø(,ØØñàðð ðð ð	ð
 ðð ðð ðð 1ðð &ðð ðð ðð 
7òó ó Sðñ ¨;×+<Ñ+<¸eÀ[Ð*QÔRØð  %ØØØØ!Ø"Ø37Ø(,ØØñ&Øð&ð ð&ð ð	&ð
 ð&ð ð&ð ð&ð ð&ð 1ð&ð &ð&ð ð&ð ð&ð 
!ò&ó ó Sñ&ñ" ¨;×+<Ñ+<¸eÀ[Ð*QÔRØð  %ØØØØ!Ø"Ø37Ø(,ñàðð ðð ð	ð
 ðð ðð ðð 1ðð &ðð 
7òó ó Sðñ ¨;×+<Ñ+<¸eÀ[Ð*QÔRØð  %ØØØØ!Ø"Ø37Ø(,ñ&Øð&ð ð&ð ð	&ð
 ð&ð ð&ð ð&ð ð&ð 1ð&ð &ð&ð 
!ò&ó ó Sð&ñ  {×'8Ñ'8¸%ÀÐ&MÔNà ðuHð !ØØØØØØ/3Ø$(ØØñuHØ
ðuHð ðuHð ð	uHð
 	ðuHð ðuHð ðuHð ðuHð -ðuHð "ðuHð ðuHð ðuHð MòuHó OðuHñp   Ó)€à	ˆS×ÑÔ' Õ'ó<ð $1€K×ÑÔ ð ØØ#$Ø04ñ5Ø	 ð5ð ð5ð ð	5ð
 !ð5ð .ð5ð ó5ôpr3   