� g\�gW��h�dZddlmZddlZddlmZmZddlmZddl m Z ddl m Z m Z dd lmZmZejrEdd lmZdd lmZmZmZdd lmZdd lmZedeef���Gd�de j����Zne jZdZejd��Z Gd�deej!e e���Z"dS)z%RootModel class and type definitions.�)� annotationsN)�copy�deepcopy)�PydanticUndefined�)�PydanticUserError)�_model_construction�_repr)� BaseModel�_object_setattr)�Any)�Literal�Self�dataclass_transform)�Field)� PrivateAttrF)�kw_only_default�field_specifiersc��eZdZdS)�_RootModelMetaclassN)�__name__� __module__� __qualname__���c/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/pydantic/root_model.pyrrs������CF�3rr)� RootModel�RootModelRootTypec ����eZdZUdZdZdZdZded<�fd�Ze fd.d �Z de _ e d/d0�fd � ��Z d1d�Zd2d�Zd3d�Zd/d4d�Zejrdddddddddddd� d5d)�Zd6�fd+� Zd7d-�Z�xZS)8ra�Usage docs: https://docs.pydantic.dev/2.10/concepts/models/#rootmodel-and-custom-root-types A Pydantic `BaseModel` for the root object of the model. Attributes: root: The root object of the model. __pydantic_root_model__: Whether the model is a RootModel. __pydantic_private__: Private fields in the model. __pydantic_extra__: Extra fields in the model. TNr�rootc ���|j�d��}|�tdd����t��jdi|��dS)N�extraz<`RootModel` does not support setting `model_config['extra']`zroot-model-extra)�coder)� model_config�getr�super�__init_subclass__)�cls�kwargsr"� __class__s �rr'zRootModel.__init_subclass__6sa���� �$�$�W�-�-�� � �#�N�Ug���� � "����!�+�+�F�+�+�+�+�+r�return�Nonec �z�d}|r|turtd���|}|j�||���dS)NTz_"RootModel.__init__" accepts either a single positional argument or arbitrary keyword arguments)� self_instance)r� ValueError�__pydantic_validator__�validate_python)�selfr �data�__tracebackhide__s r�__init__zRootModel.__init__>sZ�� �� � ��,�,�,� �u�����D� �#�3�3�D��3�M�M�M�M�Mr� _fields_set�set[str] | Nonerc�J��t���||���S)aSCreate a new model using the provided root object and update fields set. Args: root: The root object of the model. _fields_set: The set of fields to be updated. Returns: The new model. Raises: NotImplemented: If the model is not a subclass of `RootModel`. )r r6)r&�model_construct)r(r r6r*s �rr9zRootModel.model_constructJs"����w�w�&�&�D�k�&�J�J�Jr�dict[Any, Any]c� �|j|jd�S)N��__dict__�__pydantic_fields_set__r<�r2s r� __getstate__zRootModel.__getstate__Zs��� �'+�'C� � � r�statec�b�t|d|d��t|d|d��dS)Nr>r=)r )r2rAs r� __setstate__zRootModel.__setstate__`s8����7��?X�9Y�Z�Z�Z���j�%� �*;�<�<�<�<�<rc���t|��}|�|��}t|dt|j����t|dt|j����|S)z$Returns a shallow copy of the model.r=r>)�type�__new__r rr=r>)r2r(�ms r�__copy__zRootModel.__copy__ds]���4�j�j�� �K�K�� � ����:�t�D�M�':�':�;�;�;���4�d�4�;W�6X�6X�Y�Y�Y��r�memo�dict[int, Any] | Nonec���t|��}|�|��}t|dt|j|�����t|dt |j����|S)z!Returns a deep copy of the model.r=)rIr>)rErFr rr=rr>)r2rIr(rGs r� __deepcopy__zRootModel.__deepcopy__lsd���4�j�j�� �K�K�� � ����:�x�� �D�'I�'I�'I�J�J�J� ��4�d�4�;W�6X�6X�Y�Y�Y��r�pythonF) �mode�include�exclude�context�by_alias� exclude_unset�exclude_defaults� exclude_none� round_trip�warnings�serialize_as_anyrN�Literal['json', 'python'] | strrOr rPrQ�dict[str, Any] | NonerR�boolrSrTrUrVrW�'bool | Literal['none', 'warn', 'error']rXc ��dS)aThis method is included just to get a more accurate return type for type checkers. It is included in this `if TYPE_CHECKING:` block since no override is actually necessary. See the documentation of `BaseModel.model_dump` for more details about the arguments. Generally, this method will have a return type of `RootModelRootType`, assuming that `RootModelRootType` is not a `BaseModel` subclass. If `RootModelRootType` is a `BaseModel` subclass, then the return type will likely be `dict[str, Any]`, as `model_dump` calls are recursive. The return type could even be something different, in the case of a custom serializer. Thus, `Any` is used here to catch all of these cases. Nr) r2rNrOrPrQrRrSrTrUrVrWrXs r� model_dumpzRootModel.model_dumpxs ��4 �Cr�otherc����t|t��stS|jdj|jdjko t ���|��S�Nr )� isinstancer�NotImplemented�__pydantic_fields__� annotationr&�__eq__)r2r_r*s �rrfzRootModel.__eq__�s[����%��+�+� "�!� !��'��/�:�e�>W� �? � ��/�������.�.� /r�_repr.ReprArgsc#� K�d|jfV�dSra)r r?s r� __repr_args__zRootModel.__repr_args__�s�����d�i������r)r rr+r,)N)r rr6r7r+r)r+r:)rAr:r+r,)r+r)rIrJr+r)rNrYrOr rPr rQrZrRr[rSr[rTr[rUr[rVr[rWr\rXr[r+r )r_r r+r[)r+rg)rrr�__doc__�__pydantic_root_model__�__pydantic_private__�__pydantic_extra__�__annotations__r'rr5�__pydantic_base_init__� classmethodr9r@rCrHrL�typing� TYPE_CHECKINGr^rfri� __classcell__)r*s@rrr#s��������� � �#����������,�,�,�,�,�5F�N�N�N�N�N�'+�H�#�� K� K� K� K� K� K��[� K� � � � � =�=�=�=������������� 5=���-1�"�"'�%*�!&�$�@D�%*� � � � � � �8/�/�/�/�/�/� � � � � � � � rr)� metaclass)#rj� __future__r� _annotationsrqrr� pydantic_corer�r� _internalr r �mainr r rrr �typing_extensionsrrr�fieldsr�PydanticModelFieldr�PydanticModelPrivateAttr�ModelMetaclassr�__all__�TypeVarr�Genericrrrr�<module>r�s���+�+�2�2�2�2�2�2� � � � ���������+�+�+�+�+�+�������1�1�1�1�1�1�1�1�,�,�,�,�,�,�,�,� ��=�������D�D�D�D�D�D�D�D�D�D�3�3�3�3�3�3�?�?�?�?�?�?� ���BT�Vn�Ao�p�p�p�F�F�F�F�F�1�@�F�F�q�p�F�F�-�<�� ��"�F�N�#6�7�7��y �y �y �y �y � �6�>�*;�<�H[�y �y �y �y �y �y r
Memory