� u��g�y���ddlmZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl m Z mZddlmZddlmZmZmZddlmZmZmZddlmZmZmZmZmZmZdd lm Z m!Z!m"Z"m#Z#e$j%Z&d Z'd Z(d Z)e j*i��Z+e$��Z,ej-ej.ej/��Z0Gd �dej1��Z2e2j3Z3 Gd�de4��Z5e3ddddddddddddddfd�Z6 d�d�d�Z7 d�d�d!�Z8d�d&�Z9Gd'�d(e��Z:d)�Z;d*�Z<d�d,�Z=d-�Z>d�d.�Z?d/�Z@d0�ZAd1�ZBd2�ZCGd3�d4��ZDd5�ZEd6�ZF d�d7�ZG d�d8�ZHeHZI d9�ZJd�d<�ZKd�dC�ZLd�dD�ZMdE�ZNd�dG�ZOdH�ZPd�dI�ZQd�dJ�ZRd�dK�ZSdL�ZTdM�ZUdN�Z/dO�ZVd�dQ�ZWd�dU�ZXd�dX�ZYd�dZ�ZZd�d[�Z[d�d_�Z\d�dj�Z]d�dl�Z^Gdm�dn��Z_do�e_j`D��ZaeMeQeSe_ea�p��dq�eaD���p��dr�eaD���p��Z_Gds�dt��ZbeQeSeb����ZbGdu�dv��Zcdw�ecj`D��ZdeMeQeSeced�p��ed�p��ed�p��ZcGdx�dW��Zedy�dzD��ZdeMeQeSeeed�p��ed�p��ed�p��Zee$fdfd{�ZfeHdd�|��Gd}�d~����Zgd�Zhd��Z-dS)��)� annotationsN)�Callable�Mapping)�cached_property)�Any� NamedTuple�TypeVar�)�_compat�_config�setters)� PY_3_10_PLUS� PY_3_11_PLUS� PY_3_13_PLUS�_AnnotationExtractor�_get_annotations�get_generic_base)�DefaultAlreadySetError�FrozenInstanceError�NotAnAttrsClassError�UnannotatedAttributeErrorz__attr_factory_%s)ztyping.ClassVarz t.ClassVar�ClassVarztyping_extensions.ClassVar�_attrs_cached_hashc�<�eZdZdZej��Zd�Zd�ZdS)�_NothingaF Sentinel to indicate the lack of a value when `None` is ambiguous. If extending attrs, you can use ``typing.Literal[NOTHING]`` to show that a value may be ``NOTHING``. .. versionchanged:: 21.1.0 ``bool(NOTHING)`` is now False. .. versionchanged:: 22.2.0 ``NOTHING`` is now an ``enum.Enum`` variant. c��dS)N�NOTHING���selfs �Z/home/asafur/pinokio/api/open-webui.git/app/env/lib/python3.11/site-packages/attr/_make.py�__repr__z_Nothing.__repr__Js���y�c��dS)NFrrs r!�__bool__z_Nothing.__bool__Ms���ur#N) �__name__� __module__� __qualname__�__doc__�enum�autorr"r%rr#r!rr=sK���������d�i�k�k�G��������r#rc�0�eZdZdZed��dfd�ZdS)�_CacheHashWrappera An integer subclass that pickles / copies as None This is used for non-slots classes with ``cache_hash=True``, to avoid serializing a potentially (even likely) invalid hash value. Since `None` is the default value for uncalculated hashes, whenever this is copied, the copy's value for the hash should automatically reset. See GH #613 for more details. Nrc� �||fS�Nr)r �_none_constructor�_argss r!� __reduce__z_CacheHashWrapper.__reduce__es �� �%�'�'r#)r&r'r(r)�typer2rr#r!r-r-YsA������ � �,0�4��:�:�R�(�(�(�(�(�(r#r-TFc�h�t|| | d��\} }} }|�|dur|durd}t|���| �I|turd}t|���t | ��sd}t|���t | ��}|�i}t | ttf��rtj | �} |r%t |ttf��r t|�}|r%t |ttf��r t|�}tdid|�d|�d |�d d�d |�d |�d |�d|�d|�d| �d| �d|�d| �d|�d| �d|��S)a� Create a new field / attribute on a class. Identical to `attrs.field`, except it's not keyword-only. Consider using `attrs.field` in new code (``attr.ib`` will *never* go away, though). .. warning:: Does **nothing** unless the class is also decorated with `attr.s` (or similar)! .. versionadded:: 15.2.0 *convert* .. versionadded:: 16.3.0 *metadata* .. versionchanged:: 17.1.0 *validator* can be a ``list`` now. .. versionchanged:: 17.1.0 *hash* is `None` and therefore mirrors *eq* by default. .. versionadded:: 17.3.0 *type* .. deprecated:: 17.4.0 *convert* .. versionadded:: 17.4.0 *converter* as a replacement for the deprecated *convert* to achieve consistency with other noun-based arguments. .. versionadded:: 18.1.0 ``factory=f`` is syntactic sugar for ``default=attr.Factory(f)``. .. versionadded:: 18.2.0 *kw_only* .. versionchanged:: 19.2.0 *convert* keyword argument removed. .. versionchanged:: 19.2.0 *repr* also accepts a custom callable. .. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01. .. versionadded:: 19.2.0 *eq* and *order* .. versionadded:: 20.1.0 *on_setattr* .. versionchanged:: 20.3.0 *kw_only* backported to Python 2 .. versionchanged:: 21.1.0 *eq*, *order*, and *cmp* also accept a custom callable .. versionchanged:: 21.1.0 *cmp* undeprecated .. versionadded:: 22.2.0 *alias* TNF�6Invalid value for hash. Must be True, False, or None.z=The `default` and `factory` arguments are mutually exclusive.z*The `factory` argument must be a callable.�default� validator�repr�cmp�hash�init� converter�metadatar3�kw_only�eq�eq_key�order� order_key� on_setattr�aliasr) �_determine_attrib_eq_order� TypeErrorr� ValueError�callable�Factory� isinstance�list�tupler �pipe�and_� _CountingAttr)r6r7r8r9r:r;r=r3r<�factoryr>r?rArCrDr@rB�msgs r!�attribrRis���n$>� �R���$�$� �B���y� ��D��,�,��U�1B�1B�F����n�n���� �'� !� !�O� ��S�/�/� !��� � � "�>�C��S�/�/� !��'�"�"�������*�t�U�m�,�,�/��\�:�.� ��%�Z� �D�%�=�9�9�%��)�$� ��%�Z� �D�%�=�9�9�%��)�$� � � � � ��� ��)� ��T� � �D�  � �T�  � �T�  ��)� ��� ��T� ��� � �2� ��v� ��e� ��)� ��:� � �e�! �r#��script�str�globs�dict[str, Any] | None�locs�Mapping[str, object] | None�filename�return�Nonec�J�t||d��}t|||��dS)z[ Evaluate the script with the given global (globs) and local (locs) variables. �execN)�compile�eval)rTrVrXrZ�bytecodes r!�_compile_and_evalrb�s-���v�x��0�0�H���5�$�����r#�locals�dict[str, Any]c��|�in|}d}|} t|��d|�d��|f}tj�||��}||krn|dd��d|�d�}|dz }�ct ||||��|S)zP Cache the script with _linecache_, compile it and return the _locals_. Nr T������-�>)�len� splitlines� linecache�cache� setdefaultrb) rTrZrVrcrX�count� base_filename�linecache_tuple�old_vals r!�_linecache_and_compilerr�s�����2�2�V�D� �E��M� � ��K�K� � � � �d� #� #� �  �� �/�,�,�X��G�G�� �o� %� %� �#�C�R�C�(�3�3�5�3�3�3�� �� �� ��f�e�T�8�4�4�4� �Kr#�cls_name� attr_names� list[str]r3c��|�d�}i}t|��D]\}}|fd�}t|��||<�t|tf|��S)z� Create a tuple subclass to hold `Attribute`s for an `attrs` class. The subclass is a bare tuple with properties for names. class MyClassAttributes(tuple): __slots__ = () x = property(itemgetter(0)) � Attributesc��||Sr/r)r �is r!�getterz&_make_attr_tuple_class.<locals>.getters ����7�Nr#)� enumerate�propertyr3rL)rsrt�attr_class_name�bodyry� attr_namerzs r!�_make_attr_tuple_classr�sr��"�-�-�-�O� �D�!�*�-�-�+�+� ��9�� � � � �#�6�*�*��Y��� ��%��4� 0� 0�0r#c�.�eZdZUded<ded<ded<dS)� _Attributesr3�attrs�list[Attribute]� base_attrs�dict[str, type]�base_attrs_mapN)r&r'r(�__annotations__rr#r!r�r�s3��������K�K�K�����#�#�#�#�#�#r#r�c��t|��}|�d��r|�d��r |dd�}|�t��S)z� Check whether *annot* is a typing.ClassVar. The string comparison hack is used to avoid evaluating all string annotations which would put attrs-based classes at a performance disadvantage compared to plain old classes. )�'�"r rf)rU� startswith�endswith�_CLASSVAR_PREFIXES)�annots r!� _is_class_varr�"s\�� ��J�J�E� ��� �#�#�����z�(B�(B���a��d� �� � � �.� /� /�/r#c��||jvS)zR Check whether *cls* defines *attrib_name* (and doesn't just inherit it). )�__dict__)�cls� attrib_names r!�_has_own_attributer�3s�� �#�,� &�&r#�'tuple[list[Attribute], dict[str, type]]c��g}i}t|jdd���D]\}t|dg��D]H}|js |j|vr�|�d���}|�|��|||j<�I�]g}t��}t|��D]<}|j|vr� |�d|��|� |j���=||fS)zQ Collect attr.ibs from base classes of *cls*, except *taken_attr_names*. r rf�__attrs_attrs__T�� inheritedr) �reversed�__mro__�getattrr��name�evolve�append�set�insert�add)r��taken_attr_namesr�� base_attr_map�base_cls�a�filtered�seens r!�_collect_base_attrsr�:s�� �J��M��S�[��2��.�/�/�-�-����#4�b�9�9� -� -�A��{� �a�f�(8�8�8�����4��(�(�A� � � �a� � � �$,�M�!�&� !� !�  -��H� �5�5�D� �j� !� !���� �6�T�>�>� �����1���� ��������� �]� "�"r#c��g}i}|jdd�D]o}t|dg��D][}|j|vr� |�d���}|�|j��|�|��|||j<�\�p||fS)a- Collect attr.ibs from base classes of *cls*, except *taken_attr_names*. N.B. *taken_attr_names* will be mutated. Adhere to the old incorrect behavior. Notably it collects from the front and considers inherited attributes which leads to the buggy behavior reported in #428. r rfr�Tr�)r�r�r�r�r�r�)r�r�r�r�r�r�s r!�_collect_base_attrs_brokenr�[s����J��M��K��"��%�-�-����#4�b�9�9� -� -�A��v�)�)�)�����4��(�(�A� � � ��� (� (� (� � � �a� � � �$,�M�!�&� !� !� -� �}� $�$r#c �����|j�t|���|�#t|�����}�n0|dur�d�����D��}g}t ��}����D]y\} } t | ��r�|�| ����| t��} | j turt| ��} |� | | f���z||z } | r:tdd�t| �fd������zdz���n.td �����D��d ����}t j���fd �|D��} |rt%|d �| D����\}}nt'|d �| D����\}}|rd�| D��} d�|D��}|| z}|�t)|||����}d}d�|D��D]<} |dur"| jturd| ��}t-|���|dur| jturd}�=|D]>} | js5t1�| ��dt5| j�����?d�|D��}t9|j|��}t=||��||��S)a3 Transform all `_CountingAttr`s on a class into `Attribute`s. If *these* is passed, use that and don't look for them on the class. If *collect_by_mro* is True, collect them in the correct MRO order, otherwise use the old -- incorrect -- order. See #428. Return an `_Attributes`. NTc�4�h|]\}}|jtu�|��Sr�� __class__rO��.0r��attrs r!� <setcomp>z#_transform_attrs.<locals>.<setcomp>�s3�� � � ���d��~��.�.� �.�.�.r#z1The following `attr.ib`s lack a type annotation: �, c�8����|��jSr/)�get�counter)�n�cds �r!�<lambda>z"_transform_attrs.<locals>.<lambda>�s���b�f�f�Q�i�i�6G�r#)�key�.c3�@K�|]\}}|jtu�||fV��dSr/r�r�s r!� <genexpr>z#_transform_attrs.<locals>.<genexpr>�sC���� � ��D�$��>�]�2�2��t� �2�2�2�2� � r#c��|djS�Nr )r�)�es r!r�z"_transform_attrs.<locals>.<lambda>�s ��!�A�$�,�r#c �V��g|]%\}}�||��|������&Sr)r�)r�r�ca�anns�fcas ��r!� <listcomp>z$_transform_attrs.<locals>.<listcomp>�sD������4A�I�r���I�r�4�8�8�I�.�.�/�/���r#c��h|] }|j�� Sr�r��r�r�s r!r�z#_transform_attrs.<locals>.<setcomp>����,�,�,�Q�!�&�,�,�,r#c��h|] }|j�� Srr�r�s r!r�z#_transform_attrs.<locals>.<setcomp>�r�r#c�:�g|]}|�d�����S�T)r>�r�r�s r!r�z$_transform_attrs.<locals>.<listcomp>�s&��?�?�?��Q�X�X�d�X�+�+�?�?�?r#c�:�g|]}|�d�����Sr�r�r�s r!r�z$_transform_attrs.<locals>.<listcomp>�s&��A�A�A��a�h�h�t�h�,�,�A�A�Ar#Fc3�>K�|]}|jdu� |jdu�|V��dS)FN)r;r>r�s r!r�z#_transform_attrs.<locals>.<genexpr>�s:���� M� M�A�!�&��"5�"5�!�)�u�:L�:L�a�:L�:L�:L�:L� M� Mr#zlNo mandatory attributes allowed after an attribute with a default value or factory. Attribute in question: rDc��g|] }|j�� Srr�r�s r!r�z$_transform_attrs.<locals>.<listcomp>�s��(�(�(�Q�!�&�(�(�(r#)r�rrK�itemsr�r�r�r�rr�rOrRr�r�join�sorted� Attribute�from_counting_attrr�r�rLr6rGrD� _OBJ_SETATTR�__get__�_default_init_alias_forr�r�r&r�)r��these� auto_attribsr>�collect_by_mro�field_transformer�ca_list�ca_names� annot_namesrr3r�� unannotated� own_attrsr�r�r�� had_defaultrQrt� AttrsClassr�r�r�s @@@r!�_transform_attrsr�ws������ ��B� �C� � �D� ���u�{�{�}�}�%�%��� �� � � � � �h�h�j�j� � � �� ���e�e� �#�z�z�|�|� +� +�O�I�t��T�"�"� �� �O�O�I� &� &� &����y�'�*�*�A��{�-�/�/��1�I�I�� �N�N�I�q�>� *� *� *� *���,� � � �+�C��)�)��;�,G�,G�,G�,G�H�H�H����� ��� � �� � �"$�(�(�*�*� � � � '�&�  � � �� � &�C������EL����I�� �$7� �,�,�)�,�,�,�% �% �!� �M�M�%?� �,�,�)�,�,�,�% �% �!� �M��B�?�?�Y�?�?�?� �A�A�j�A�A�A� � �� "�E��$��'�'��U�3�3�4�4���K� M� M�� M� M� M���� �$� � �1�9��#7�#7�G�BC�G�G�C��S�/�/� !� �%� � �A�I�W�$<�$<��K�� �N�N���w� N� � � �� #� #�G�-D�Q�V�-L�-L� M� M� M��)�(�%�(�(�(�J�'�� �j�A�A�J� �z�z�%�(�(�*�m� D� D�Dr#c�2�gd�}|�|�d��n|�gd���|�ddg��t|d��}|tj|d�}t d�|��||d |i� ��d S) N) zdef wrapper(_cls):z __class__ = _clsz� def __getattr__(self, item, cached_properties=cached_properties, original_getattr=original_getattr, _cached_setattr_get=_cached_setattr_get):z+ func = cached_properties.get(item)z if func is not None:z! result = func(self)z1 _setter = _cached_setattr_get(self)z# _setter(item, result)z return resultz, return original_getattr(self, item))z try:z2 return super().__getattribute__(item)z except AttributeError:z4 if not hasattr(super(), '__getattr__'):z raisez- return super().__getattr__(item)zY original_error = f"'{self.__class__.__name__}' object has no attribute '{item}'"z- raise AttributeError(original_error)z return __getattr__z__getattr__ = wrapper(_cls)r�)�cached_properties�_cached_setattr_get�original_getattr� �_cls)rc� __getattr__)r��extend�_generate_unique_filenamer�r�rrr�)r�r�r��lines�unique_filename�globs r!�_make_cached_property_getattrr��s��� � � �E��#� � � � :� � � � � � � � � � � � � � �L�L� $� )� ����0��Y�?�?�O�/�+�3�,� � �D� "� � � �%���/�4��� � � � �� �r#c�~�t|t��r"|dvrt�|||��dSt�)z4 Attached to frozen classes as __setattr__. )� __cause__� __context__� __traceback__�__suppress_context__� __notes__N)rJ� BaseException� __setattr__r�r r��values r!�_frozen_setattrsr�sL���$� �&�&��4�4�,�,� �!�!�$��e�4�4�4��� �r#c�|�t|t��r!|dvrt�||��dSt�)z4 Attached to frozen classes as __delattr__. )r�N)rJr�� __delattr__r)r r�s r!�_frozen_delattrsr(sA���$� �&�&��4�>�+A�+A��!�!�$��-�-�-��� �r#c�� |\}n1#t$r$dt|���d�}t|��d�wxYw|j}t |��}|D]/}|js� |j}|j}||vrt||��||<�0|di|��S)a Create a new instance, based on the first positional argument with *changes* applied. .. tip:: On Python 3.13 and later, you can also use `copy.replace` instead. Args: inst: Instance of a class with *attrs* attributes. *inst* must be passed as a positional argument. changes: Keyword changes in the new copy. Returns: A copy of inst with *changes* incorporated. Raises: TypeError: If *attr_name* couldn't be found in the class ``__init__``. attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs* class. .. versionadded:: 17.1.0 .. deprecated:: 23.1.0 It is now deprecated to pass the instance using the keyword argument *inst*. It will raise a warning until at least April 2024, after which it will become an error. Always pass the instance as a positional argument. .. versionchanged:: 24.1.0 *inst* can't be passed as a keyword argument anymore. z*evolve() takes 1 positional argument, but z were givenNr) rGrirFr��fieldsr;r�rDr�) �args�changes�instrQr�r�r�r� init_names r!r�r�3s���J'������ �'�'�'� O��T��� O� O� O� ���n�n�$�&� '���� �.�C� �3�K�K�E� �:�:���v� � ��F� ��G� � �G� #� #�!(��y�!9�!9�G�I� �� �3�>�>��>�>�s��.5c��eZdZdZdZdd�Zd�Zdd �Zd �Zd �Z d �Z d �Z d�Z d�Z d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd d�Zd d�ZdS)!� _ClassBuilderz( Iteratively build *one* class. )�_add_method_dunders� _attr_names�_attrs�_base_attr_map� _base_names� _cache_hashr�� _cls_dict�_delete_attribs�_frozen�_has_custom_setattr�_has_post_init� _has_pre_init�_is_exc� _on_setattr�_pre_init_has_args� _repr_added�_script_snippets�_slots� _weakref_slot�_wrote_own_setattrr�r3c��t||||| |��\}}}||_|rt|j��ni|_||_d�|D��|_||_td�|D����|_ ||_ ||_ ||_ | |_ tt|dd����|_d|_|jr8|j}t'j|��}t+|j��dk|_tt|dd����|_t|�� |_| |_| |_| |_d|_|j|jd<|r&t:|jd<t<|jd <d |_n{| t>t@j!t@j"fvr[dx}}|D]}|j#�d }|j$�d }|r|rn�| t>kr|s|r$| t@j!kr|r| t@j"kr |sd|_|r'|�%��\|jd <|jd <g|_&d|_'tQ|jd ��rtQ|jd��s|j)|_*dS|j+|_*dS)Nc��h|] }|j�� Srr�r�s r!r�z)_ClassBuilder.__init__.<locals>.<setcomp>�s��7�7�7�q�A�F�7�7�7r#c3�$K�|] }|jV�� dSr/r�r�s r!r�z)_ClassBuilder.__init__.<locals>.<genexpr>�s$���� 7� 7�A��� 7� 7� 7� 7� 7� 7r#�__attrs_pre_init__Fr �__attrs_post_init__r�r�rT� __getstate__� __setstate__r'r(),r�r��dictr�rr rr rLr rrrr�boolr�rrr!�inspect� signatureri� parametersrrrrrrr�r�_DEFAULT_ON_SETATTRr �validate�convertr7r<�_make_getstate_setstaterr�hasattr�_add_method_dunders_safer �_add_method_dunders_unsafe)r r�r��slots�frozen� weakref_slot�getstate_setstater�r>� cache_hash�is_excr�rC�has_custom_setattrr�r�r��base_map� pre_init_func�pre_init_signature� has_validator� has_converterr�s r!�__init__z_ClassBuilder.__init__�s���"'7� � � � � � � ' �' �#��z�8��� �/4�<��c�l�+�+�+�"����� �7�7�J�7�7�7���&��� � 7� 7�� 7� 7� 7�7�7����� ��� �)���%���!�'�#�/C�U�"K�"K�L�L���"'��� � � M� �2�M�!(�!2�=�!A�!A� �&)�*<�*G�&H�&H�1�&L�D� #�"�7�3�0E�u�#M�#M�N�N���#'��;�;������ �%���#5�� �"'���,0�K���(�)� � (�,<�D�N�=� )�,<�D�N�=� )�&*�D� #� #� � � � � �O� � � � -2� 1�M�M�� � ���;�*�$(�M��;�*�$(�M� ��]���E���"5�5�5�*�6�.;�6��'�"2�2�2�=�2��'�/�1�1�-�1� $(�� � � /��,�,�.�.� ���~�.���~�.� � ��!����t�y�,�/�/� G�w� �I�~�8 �8 � G�(,�'D�D� $� $� $�'+�'F�D� $� $� $r#c�"�d|jj�d�S)Nz<_ClassBuilder(cls=z)>)r�r&rs r!r"z_ClassBuilder.__repr__�s��;�T�Y�%7�;�;�;�;r#r[r\c��d�d�|jD����}i}|jD]\}}}|�|���t|t |jd��|��}|jD]\}}}||j|���dS)z= Evaluate any registered snippets in one go. r�c��g|] }|d�� S)rr)r��snippets r!r�z0_ClassBuilder._eval_snippets.<locals>.<listcomp>�s��L�L�L�7�G�A�J�L�L�Lr#�methodsN)r�r�updaterrr�r�r)r rTrV�_� snippet_globsrX�hooks r!�_eval_snippetsz_ClassBuilder._eval_snippets�s������L�L�d�6K�L�L�L�M�M����#'�#8� (� (� �A�}�a� �L�L�� '� '� '� '�%� � %�d�i�� ;� ;� � � �� �/� '� '�J�A�q�$� �D���� &� &� &� &� '� 'r#c�$�|���|jdur|���}n/|���}trt j|��}t|dd��rd|jvr|� ��|S)z� Finalize class based on the accumulated configuration. Builder cannot be used after calling this method. T�__attrs_init_subclass__N) rGr�_create_slots_class�_patch_original_classr�abc�update_abstractmethodsr�r�rI)r r�s r!� build_classz_ClassBuilder.build_class s��� ������ �;�$� � ��*�*�,�,�C�C��,�,�.�.�C�� 6��0��5�5�� �C�2�D� 9� 9� *�)���=�=� � '� '� )� )� )�� r#c���|j}|j}|jrl|jD]d}||vr^t ||t ��t urAt jt��5t||��ddd��n #1swxYwY�e|j � ��D]\}}t|||���|j s+t |dd��rd|_|js t |_|S)zA Apply accumulated methods and return the class. N�__attrs_own_setattr__F)r�rrr r�� _SENTINEL� contextlib�suppress�AttributeError�delattrrr��setattrrrPrr�r�)r r�� base_namesr�r�s r!rKz#_ClassBuilder._patch_original_class"sL���i���%� � � � +��(� +� +��� �*�*���T�9�5�5�Y�F�F� $�,�^�<�<�+�+���T�*�*�*�+�+�+�+�+�+�+�+�+�+�+����+�+�+�+�� �>�/�/�1�1� &� &�K�D�%� �C��u� %� %� %� %��&� /�7� �(�%�, �, � /�).�C� %��+� /�".���� s�A6�6A: �=A: c �8�������fd��j���D��}�jsBd|d<�js6�jjD])��j�dd��r t|d<n�*i}d}�jj dd�D]O��j�dd���d }|� �fd �t�d g��D�����Pt�j ����j}�jr#dt�jd d ��vr d|vr|s|d z }d�|���D��}g}|r�t!�j��}|���D]T\}} ||fz }||=|�| ��t%j| ��j} | t$jjur| ||<�U|�d��} | �|�| ��t/|| �j��|d<�fd�|D����fd�|���D����fd��D���|� ����jr��t2��t5���|d <�jj|d<t9�j���jj�jj|��} t=j| j� ��|��D]�} tC| tDtFf��rt| j$dd��}n=tC| tJ��rt| j&dd��}nt| dd��}|s�u|D]*} |j'�ju}|r| |_'�#tP$rY�'wxYw��| S)zL Build and return a new class with a `__slots__` attribute. c�V��i|]%\}}|gt�j���d�d�Rv�"||��&S)r�� __weakref__)rLr )r��k�vr s �r!� <dictcomp>z5_ClassBuilder._create_slots_class.<locals>.<dictcomp>JsR��� � � ���1��M�%�� 0�1�1�M�:�M�}�M�M�M�M� �q�M�M�Mr#FrPr�r rfrZNTc�2��i|]}|t�|����Sr�r�)r�r�r�s �r!r]z5_ClassBuilder._create_slots_class.<locals>.<dictcomp>is5��������'�(�D�1�1���r#� __slots__r)rZc�N�i|]"\}}t|t���||j��#Sr)rJr�func)r�r�� cached_props r!r]z5_ClassBuilder._create_slots_class.<locals>.<dictcomp>zsA�� � � �!��k��+��7�7� � �+�"� � � r#r�c���g|]}|�v�|�� Srr)r�r�rWs �r!r�z5_ClassBuilder._create_slots_class.<locals>.<listcomp>�s#���G�G�G�t��J�0F�0F�d�0F�0F�0Fr#c�$��i|] \}}|�v� ||�� Srr)r��slot�slot_descriptor� slot_namess �r!r]z5_ClassBuilder._create_slots_class.<locals>.<dictcomp>�s4��� � � �%��o��z�!�!� �/�!�!�!r#c���g|]}|�v�|�� Srr)r�r�� reused_slotss �r!r�z5_ClassBuilder._create_slots_class.<locals>.<listcomp>�s#���N�N�N�t�T��5M�5M�d�5M�5M�5Mr#r(� __closure__))rr�rrr�� __bases__r�r�r�r�rCr�r�rr rrr�r'r(�return_annotation� Parameter�emptyr�r�_HASH_CACHE_FIELDrLr(r3r&� itertools�chain�valuesrJ� classmethod� staticmethod�__func__r|�fget� cell_contentsrG)r r��existing_slots�weakref_inherited�namesr��&additional_closure_functions_to_update�class_annotationsr�rb� annotationr�r��item� closure_cells�cell�matchr�rWrjrhs` @@@@r!rJz!_ClassBuilder._create_slots_classFs�������� � � � ���,�,�.�.� � � ���&� �*/�B�&� '��+� � $� � 3���H��(�,�,�-D�e�L�L��,8��=�)���� ��!��� �)�!�B�$�/� � �H�� �$�$�]�D�9�9�E�$(�!� � !� !����� '��+�r� B� B���� � � � ���)�*�*� �� �� � � &��W�T�Y� �R�%H�%H�H�H��U�*�*�%�+� �%� %�E� � �%'�X�X�Z�Z� � � ��24�.� � � 0��� ;� ;� �/�5�5�7�7� 9� 9� ��d��$�� ���t�H�6�=�=�d�C�C�C�$�.�t�4�4�F� ��W�%6�%<�<�<�.8�%�d�+��!�v�v�m�4�4� ��+�6�=�=�>N�O�O�O� =�!�#3�T�Y�!�!�B�}� � H�G�G�G�u�G�G�G� �  � � � �)7�)=�)=�)?�)?� � � � � O�N�N�N�z�N�N�N� � � � �,���� � � 1� � � �/� 0� 0� 0�� �+�+��;��!�Y�3��>���d�4�9�o�o�d�i�0�$�)�2E�r�J�J���O� �L� � � !� !�#I� � � 1� 1�D��$��l� ;�<�<� C�!(�� �}�d� K� K� � ��D�(�+�+� C�!(�� �=�$� G� G� � � '��m�T� B� B� � � ��%� 1� 1��1� �.�$�)�;�E� �1�-0��*��� "�����D����� 1�� s�1N � N�Nc���t�j|��\}}�fd�}�j�|||f��d�_�S)Nc�D����|d��|d<dS)Nr"�r ��cls_dictrVr s �r!� _attach_reprz,_ClassBuilder.add_repr.<locals>._attach_repr�s&���#'�#;�#;�E�*�<M�#N�#N�H�Z� � � r#T)�_make_repr_scriptr rr�r)r �nsrTrVr�s` r!�add_reprz_ClassBuilder.add_repr�sc���)�$�+�r�:�:� ��� O� O� O� O� O� ��$�$�f�e�\�%B�C�C�C����� r#c�v�|jsd}t|���d�}|�|��|jd<|S)Nz3__str__ can only be generated if a __repr__ exists.c�*�|���Sr/�r"rs r!�__str__z&_ClassBuilder.add_str.<locals>.__str__�s���=�=�?�?� "r#r�)rrGr r)r rQr�s r!�add_strz_ClassBuilder.add_str�sN���� "�G�C��S�/�/� !� #� #� #�%)�$<�$<�W�$E�$E���y�!�� r#c�n���td�|jD������fd�}|j���fd�}||fS)zF Create custom __setstate__ and __getstate__ methods. c3�&K�|] }|dk�|V�� dS)rZNr)r��ans r!r�z8_ClassBuilder._make_getstate_setstate.<locals>.<genexpr>�s5����! �! ��R�=�-@�-@�B�-@�-@�-@�-@�! �! r#c�"����fd��D��S)�9 Automatically created by attrs. c�2��i|]}|t�|����Srr_�r�r�r s �r!r]zQ_ClassBuilder._make_getstate_setstate.<locals>.slots_getstate.<locals>.<dictcomp>�s%���K�K�K�$�D�'�$��-�-�K�K�Kr#r)r �state_attr_namess`�r!�slots_getstatez=_ClassBuilder._make_getstate_setstate.<locals>.slots_getstate�s"����L�K�K�K�:J�K�K�K� Kr#c� ��t�|��}t|t��r#t �|��D]\}}|||���n�D]}||vr||||����r|t d��dSdS)r�N)r�r�rJrL�ziprp)r �state�_ClassBuilder__bound_setattrr�r��hash_caching_enabledr�s ��r!�slots_setstatez=_ClassBuilder._make_getstate_setstate.<locals>.slots_setstate�s����+�2�2�4�8�8�O��%��'�'� ;�$'�'7��#?�#?�1�1�K�D�%�#�O�D�%�0�0�0�0�1�-�;�;�D��u�}�}�'���e�D�k�:�:�:�� $� 9��� 1�4�8�8�8�8�8� 9� 9r#)rLr r)r r�r�r�r�s @@r!r-z%_ClassBuilder._make_getstate_setstate�s����� !�! �! ��)�! �! �! � � �� L� L� L� L� L� $�/�� 9� 9� 9� 9� 9� 9�,�~�-�-r#c��d|jd<|S�N�__hash__)rrs r!�make_unhashablez_ClassBuilder.make_unhashables��%)���z�"�� r#c���t�j�j�j�j���\}}d�fd� }�j�|||f���S) N�r2r5r�r%rXr[r\c�D����|d��|d<dSr�r�)r�rXr s �r!� attach_hashz+_ClassBuilder.add_hash.<locals>.attach_hashs&���#'�#;�#;�D��<L�#M�#M�H�Z� � � r#)r�r%rXr%r[r\)�_make_hash_scriptr�r rrrr�)r rTrVr�s` r!�add_hashz_ClassBuilder.add_hashsy���)� �I� �K��<��'�  � � � ��� N� N� N� N� N� N� ��$�$�f�e�[�%A�B�B�B�� r#c�����t�j�j�j�j�j�j�j�j�j �j �j d�� � \}}���fd�}�j � |||f���S)NF�� attrs_initc�V��|d}�|_��|��|d<dS)Nr=�r�r �r�rVr;rr s ��r!� _attach_initz,_ClassBuilder.add_init.<locals>._attach_init2s3�����$�D�#.�D� �#'�#;�#;�D�#A�#A�H�Z� � � r#��_make_init_scriptr�r rrrrrrr rrrr�)r rTrVr�rs` @r!�add_initz_ClassBuilder.add_init"s�����%6� �I� �K� � � � #� � � �L� �K� � � � � �L� � �� & � & � & �"���{� B� B� B� B� B� B� ��$�$�f�e�\�%B�C�C�C�� r#c�B�|�d���|jd<|S)Nc��t|fi|��Sr/r�)r rs r!r�z+_ClassBuilder.add_replace.<locals>.<lambda>=s��F�4�$;�$;�7�$;�$;�r#� __replace__)r rrs r!� add_replacez_ClassBuilder.add_replace;s+��(,�(@�(@� ;� ;�) �) ���}�%�� r#c�R�td�|jD����|jd<dS)Nc3�@K�|]}|j� |j�|jV��dSr/)r;r>r�)r��fields r!r�z/_ClassBuilder.add_match_args.<locals>.<genexpr>BsL����1 �1 ���z�1 �#(�-�1 � �J�1 �1 �1 �1 �1 �1 r#�__match_args__)rLr rrs r!�add_match_argsz_ClassBuilder.add_match_argsAs=��+0�1 �1 ���1 �1 �1 �, �, ���'�(�(�(r#c�����t�j�j�j�j�j�j�j�j�j �j �j d�� � \}}���fd�}�j � |||f���S)NTr�c�V��|d}�|_��|��|d<dS)N�__attrs_init__r�r�s ��r!�_attach_attrs_initz8_ClassBuilder.add_attrs_init.<locals>._attach_attrs_initXs5����)�*�D�#.�D� �)-�)A�)A�$�)G�)G�H�%� &� &� &r#r�)r rTrVr�rs` @r!�add_attrs_initz_ClassBuilder.add_attrs_initHs�����%6� �I� �K� � � � #� � � �L� �K� � � � � �L� � �� & � & � & �"���{� H� H� H� H� H� H� ��$�$�f�e�5G�%H�I�I�I�� r#c����j}t�j��\}}�fd�}�j�|||f��t |d<�S)Nc�D����|d��|d<dS)N�__eq__r�r�s �r!� _attach_eqz(_ClassBuilder.add_eq.<locals>._attach_eqfs%���!%�!9�!9�%��/�!J�!J�H�X� � � r#�__ne__)r�_make_eq_scriptr rr�r�)r r�rTrVr�s` r!�add_eqz_ClassBuilder.add_eqasi��� �^��'�� �4�4� ��� K� K� K� K� K� ��$�$�f�e�Z�%@�A�A�A���8� �� r#c����j}�fd�t�j�j��D��\|d<|d<|d<|d<�S)Nc3�B�K�|]}��|��V��dSr/r�)r��methr s �r!r�z*_ClassBuilder.add_order.<locals>.<genexpr>rsM�����B �B �� � $� $�T� *� *�B �B �B �B �B �B r#�__lt__�__le__�__gt__�__ge__)r� _make_orderr�r )r r�s` r!� add_orderz_ClassBuilder.add_orderosg��� �^��B �B �B �B �#�D�I�t�{�;�;�B �B �B �>��8� �b��l�B�x�L�"�X�,� � r#c���i�|jD],}|jp|j}|r|tjur ||f�|j<�-�s|S|jrd}t|����fd�}d|jd<|� |��|jd<d|_ |S)Nz7Can't combine custom __setattr__ with on_setattr hooks.c��� �|\}}||||��}n#t$r|}YnwxYwt|||��dSr/)�KeyErrorr�)r r��valr�rF�nval�sa_attrss �r!r�z._ClassBuilder.add_setattr.<locals>.__setattr__�sl��� *�"�4�.���4��t�D�!�S�)�)����� � � ����� ���� ��t�T� *� *� *� *� *s � � +�+TrPr�) r rCrr �NO_OPr�rrGrr r)r r�rCrQr�r�s @r!� add_setattrz_ClassBuilder.add_setattrys�������� 1� 1�A���9��)9�J�� 1�j�� �=�=�#$�j�=���� ��� ��K� � #� "�K�C��S�/�/� !� +� +� +� +� +�37���.�/�(,�(@�(@��(M�(M���}�%�"&���� r#�methodrc��|jj|_|jj�d|j��|_d|jj�d�|_|S)z@ Add __module__ and __qualname__ to a *method*. r��$Method generated by attrs for class )r�r'r(r&r)�r r�s r!r0z(_ClassBuilder._add_method_dunders_unsafe�sR��!�I�0���!%��!7�K�K�&�/�K�K��� M�4�9�3I� L� L� L� ��� r#c��tjt��5|jj|_ddd��n #1swxYwYtjt��5|jj�d|j��|_ddd��n #1swxYwYtjt��5d|jj�d�|_ddd��n #1swxYwY|S)zL Add __module__ and __qualname__ to a *method* if possible. Nr�r�)rRrSrTr�r'r(r&r)r�s r!r/z&_ClassBuilder._add_method_dunders_safe�s���� �� 0� 0� 5� 5� $� � 4�F� � 5� 5� 5� 5� 5� 5� 5� 5� 5� 5� 5���� 5� 5� 5� 5�� �� 0� 0� P� P�%)�Y�%;�"O�"O�f�o�"O�"O�F� � P� P� P� P� P� P� P� P� P� P� P���� P� P� P� P�� �� 0� 0� ^� ^�]�D�I�DZ�]�]�]�F�N� ^� ^� ^� ^� ^� ^� ^� ^� ^� ^� ^���� ^� ^� ^� ^�� s0�8�<�<�B�B� B�(C � C�CN)r�r3)r[r\)r�rr[r)r&r'r(r)r`r=r"rGrNrKrJr�r�r-r�r�r�r�r�r�r�r�r�r0r/rr#r!r r msu���������I�0iG�iG�iG�iG�V<�<�<�'�'�'�'�$���0"�"�"�HI�I�I�V��� � � �'.�'.�'.�R��� � � ����2���  � � ����2 � � �������@ � � � � � � � � � r#r c��|�&t|du|duf��rd}t|���|�||fS|�|}|�|}|dur|durd}t|���||fS)�� Validate the combination of *cmp*, *eq*, and *order*. Derive the effective values of eq and order. If *eq* is None, set it to *default_eq*. N�&Don't mix `cmp` with `eq' and `order`.FT�-`order` can only be True if `eq` is True too.��anyrG)r9r?rA� default_eqrQs r!�_determine_attrs_eq_orderr��s���  ��3��$���T�0A�B�C�C��6����o�o�� ���C�x�� �z� �� �}��� �U�{�{�u��}�}�=����o�o�� �u�9�r#c��|�&t|du|duf��rd}t|���d�}|�||��\}}||||fS|�|d}}n||��\}}|�||}}n||��\}}|dur|durd}t|���||||fS)r�Nr�c�6�t|��rd|}}nd}||fS)z8 Decide whether a key function is used. TN)rH)r�r�s r!�decide_callable_or_booleanz>_determine_attrib_eq_order.<locals>.decide_callable_or_boolean�s,�� �E�?�?� ��u�3�E�E��C��c�z�r#FTr�r�) r9r?rAr�rQr��cmp_keyr@rBs r!rErE�s���  ��3��$���T�0A�B�C�C��6����o�o����� ��1�1�#�6�6� ��W��G�S�'�)�)� �z���F���/�/��3�3� ��F� �}��v�y���5�5�e�<�<���y� �U�{�{�u��}�}�=����o�o�� �v�u�i� '�'r#c�Z�|dus|dur|S|�|dur|S|D]}t||��rdS�|S)ap Check whether we should implement a set of methods for *cls*. *flag* is the argument passed into @attr.s like 'init', *auto_detect* the same as passed into @attr.s and *dunders* is a tuple of attribute names whose presence signal that the user has implemented it themselves. Return *default* if no reason for either for or against is found. TF)r�)r��flag� auto_detect�dundersr6�dunders r!�_determine_whether_to_implementr��sd�� �t�|�|�t�u�}�}�� � �|� �u�,�,������� �c�6� *� *� ��5�5� � �Nr#c�V�������� � � � � ������������(ddl}|�td��d���t|||d��\��|�|�t �t t f��rtj���� ��� �������� ������� �� fd�}|�|S||��S)a� A class decorator that adds :term:`dunder methods` according to the specified attributes using `attr.ib` or the *these* argument. Consider using `attrs.define` / `attrs.frozen` in new code (``attr.s`` will *never* go away, though). Args: repr_ns (str): When using nested classes, there was no way in Python 2 to automatically detect that. This argument allows to set a custom name for a more meaningful ``repr`` output. This argument is pointless in Python 3 and is therefore deprecated. .. caution:: Refer to `attrs.define` for the rest of the parameters, but note that they can have different defaults. Notably, leaving *on_setattr* as `None` will **not** add any hooks. .. versionadded:: 16.0.0 *slots* .. versionadded:: 16.1.0 *frozen* .. versionadded:: 16.3.0 *str* .. versionadded:: 16.3.0 Support for ``__attrs_post_init__``. .. versionchanged:: 17.1.0 *hash* supports `None` as value which is also the default now. .. versionadded:: 17.3.0 *auto_attribs* .. versionchanged:: 18.1.0 If *these* is passed, no attributes are deleted from the class body. .. versionchanged:: 18.1.0 If *these* is ordered, the order is retained. .. versionadded:: 18.2.0 *weakref_slot* .. deprecated:: 18.2.0 ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` now raise a `DeprecationWarning` if the classes compared are subclasses of each other. ``__eq`` and ``__ne__`` never tried to compared subclasses to each other. .. versionchanged:: 19.2.0 ``__lt__``, ``__le__``, ``__gt__``, and ``__ge__`` now do not consider subclasses comparable anymore. .. versionadded:: 18.2.0 *kw_only* .. versionadded:: 18.2.0 *cache_hash* .. versionadded:: 19.1.0 *auto_exc* .. deprecated:: 19.2.0 *cmp* Removal on or after 2021-06-01. .. versionadded:: 19.2.0 *eq* and *order* .. versionadded:: 20.1.0 *auto_detect* .. versionadded:: 20.1.0 *collect_by_mro* .. versionadded:: 20.1.0 *getstate_setstate* .. versionadded:: 20.1.0 *on_setattr* .. versionadded:: 20.3.0 *field_transformer* .. versionchanged:: 21.1.0 ``init=False`` injects ``__attrs_init__`` .. versionchanged:: 21.1.0 Support for ``__attrs_pre_init__`` .. versionchanged:: 21.1.0 *cmp* undeprecated .. versionadded:: 21.3.0 *match_args* .. versionadded:: 22.2.0 *unsafe_hash* as an alias for *hash* (for :pep:`681` compliance). .. deprecated:: 24.1.0 *repr_ns* .. versionchanged:: 24.1.0 Instances are not compared as tuples of attributes anymore, but using a big ``and`` condition. This is faster and has more correct behavior for uncomparable values like `math.nan`. .. versionadded:: 24.1.0 If a class has an *inherited* classmethod called ``__attrs_init_subclass__``, it is executed after the class is created. .. deprecated:: 24.1.0 *hash* is deprecated in favor of *unsafe_hash*. NrzQThe `repr_ns` argument is deprecated and will be removed in or after August 2025.�)� stacklevelc����pt|��}� duot|t��}�ot|d��}|r|rd}t |���t |��|�t |��d������� |� �|� ��}t |��d��r|�����dur|���t |� �d��}|s|dur|� ��|s&t |��d��r|� ���s|� �����durt|d ��rd ��dur�d ur��d }t|����d us��|d us|r� rd }t|���nJ�dus ��|dur|dur|� ��n'� rd }t|���|���t |��d ��r|���n'|���� rd}t|���t"r$t|d��s|���t&r&�r$t|d��s|���|���S)NTr�z/Can't freeze a class with a custom __setattr__.)r#r$)r6r�)r�r�)r�r�r�r�r�Fr5zlInvalid value for cache_hash. To use hash caching, hashing must be either explicitly or implicitly enabled.�r=zFInvalid value for cache_hash. To use hash caching, init must be True.r�r�)�_has_frozen_base_class� issubclassr�r�rGr r�r�r�r�r�r�rFr�r�r�r�rr�rr�rN)r�� is_frozenr6�has_own_setattrrQ�builderr?r�r��auto_excr5r��eq_r�r2r4r:r;r>� match_argsrC�order_r8�repr_nsr1rUr�r3s ���������������������r!�wrapzattrs.<locals>.wrap�sp����9�4�S�9�9� ��T�!�D�j��m�&D�&D��%� �*<� ��+ �+ �� � "�y� "�C�C��S�/�/� !�� � � � � � +��!��0��  � � � � � � � � � � �) � ��. +� ��{�M� � � &� � � �W� %� %� %� �$�;�;� �O�O� � � � ,� ��k�#7� � ��� �"��*�*� �N�N� � � �� �9� ���&N� � � � � � � � � �� "� � � � !� !� !� �L��t�#�#�"�3� �3�3�$��D� �t� � ��E� 1� 1�d�6F�J�C��C�.�.� � �5�=�=�T�\�b�E�k�k�f�k�� %�E����n�n�$� %��T�\�\� �L�R�4�Z�Z�I��,=�,=� � � � � � � �� %�E����n�n�$� � #� #� %� %� %� *� ��{�M� � � %� � � � � � � � � "� "� $� $� $�� %�^����n�n�$� � "� 2�3� � F� F� "� � � � !� !� !� � %�� %�'�s�,<�=�=� %� � "� "� $� $� $��"�"�$�$�$r#) �warnings�warn�DeprecationWarningr�rJrKrLr rM)� maybe_clsr�r�r8r9r:r;r1r2r3rUr�r>r5r�r?rAr�r�r4rCr�r�� unsafe_hashrrr�r�s ``` `````````` `````` @@r!r�r�sS�����������������������x������� � � �c� � �� � � � �,�C��U�D�A�A�K�C�������*�t�U�m�,�,�/��\�:�.� �j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�j%�\��� � �4� �?�?�r#c��|jtuS)zV Check whether *cls* has a frozen ancestor by looking at its __setattr__. )r�r�)r�s r!r�r�s�� �?�.� .�.r#r�� func_namec �L�d|�d|j�dt|d|j���d�S)zF Create a "filename" suitable for a function being generated. z<attrs generated � r�r(rh)r'r�r&)r�rs r!r�r� sF��  9�I� 9� 9��� 9� 9� �3��� � 5� 5� 9� 9� 9�r#r�r�r2r&r5�tuple[str, dict]c�N��� � � � �td��D�����d}tt|d����� i� d}d� d�|s|dz }n|dz }|d z }d � z� �d z �|g� ��� � � � fd �}|r�� �|d t�d�z��|r4|dt�d�|dz��� �|dzd z��n|dt�d�|dz��� �|dt��z��n |d|��d�� ��}|� fS)Nc3�LK�|]}|jdus|j�|jdu�|V�� dS)TN)r:r?r�s r!r�z$_make_hash_script.<locals>.<genexpr>sA�������A�F�d�N�N�q�v�~�!�$�$�,�,��,�,�,�,��r#� r:zdef __hash__(selfzhash((z))z):z, *zC, _cache_wrapper=__import__('attr._make')._make._CacheHashWrapper):z_cache_wrapper(�)c �T����||z�z|d� �d�zg���D]d}|jr:d|j�d�}|j�|<��|d|�d|j�d�z���C��|d|j�d�z���e��|dz�z��d S) z� Generate the code for actually computing the hash code. Below this will either be returned directly or used to compute a value which is then cached, depending on the value of cache_hash r �,rD�_key�(self.z),� self.� N)r�r@r�r�) �prefix�indentr��cmp_namer��closing_bracesrV� hash_func� method_lines� type_hashs ������r!�append_hash_computation_linesz8_make_hash_script.<locals>.append_hash_computation_lines/s��� ������)�+��0�I�0�0�0�0� � � � �� H� H�A��x� H�+�q�v�+�+�+��"#�(��h���#�#��B��B�B���B�B�B�B������#�#�F�-F�Q�V�-F�-F�-F�$F�G�G�G�G����F�V�O�n�<�=�=�=�=�=r#zif self.z is None:zobject.__setattr__(self, '�', r��self.� = z return self.zreturn r�)rLr:r�r�rpr�) r�r�r2r5�tab�hash_defrrTrrVrrrs ` @@@@@r!r�r�s��������� ������� � �E� �C��.�s�F�;�;�<�<�I� �E�"�H��I��N� ���D�����E����Y�Y��%� �1� ��#����:�L�>�>�>�>�>�>�>�>�>�>�4� 6����C�"I�->�"I�"I�"I�I�J�J�J� � � )� )�C�->�C�C�C�S�1�W� � � � � � ��a��#� � .� .� .� .� )� )�.�)�.�.�.��a�� � � � ���C�"D�1B�"D�"D�D�E�E�E�E�%�%�i��5�5�5� �Y�Y�|� $� $�F� �5�=�r#c��t||dd���\}}t||t|d�����|d|_|S)z% Add a hash method to *cls*. Fr�r��rZ)r�rbr�r��r�r�rTrVs r!� _add_hashr%\sc��&� �U�5�U����M�F�E���� 9�#�z� J� J�������$�C�L� �Jr#c�R�|�|��}|turtS| S)z^ Check equality and either forward a NotImplemented or return the result negated. )r��NotImplemented)r �other�results r!r�r�js.�� �[�[�� � �F� �������:�r#rKc ���d�|D��}gd�}i}|r�|�d��|D]�}|jrBd|j�d�}|j||<|�d|�d|j�d|�d |j�d � ��n%|�d |j�d |j����||d ur|d �d�|d <��|�d��n|�d��d�|��}||fS)z6 Create __eq__ method for *cls* with *attrs*. c� �g|] }|j� |�� Sr)r?r�s r!r�z#_make_eq_script.<locals>.<listcomp>zs�� &� &� &�1��� &�Q� &� &� &r#)zdef __eq__(self, other):z- if other.__class__ is not self.__class__:z return NotImplementedz return (rDrr rz) == z(other.rrz == other.rfz andz )z return Truer�)r�r@r�r�)r�r�rVr�rrTs r!r�r�vsY�� '� &�� &� &� &�E� � � �E� �E� �(� � � �_�%�%�%�� /� /�A��x� I�+�q�v�+�+�+��#$�(��h��� � �V�x�V�V�q�v�V�V�H�V�V�Q�V�V�V�V������ � �G�Q�V�G�G�q�v�G�G�H�H�H���b� �!�!�$�R�y�.�.�.��b� �� � � �W����� � � �&�'�'�'� �Y�Y�u� � �F� �5�=�r#c�\���d��D����fd���fd�}�fd�}�fd�}�fd�}||||fS)z9 Create ordering methods for *cls* with *attrs*. c� �g|] }|j� |�� Sr)rAr�s r!r�z_make_order.<locals>.<listcomp>�s�� )� )� )�1��� )�Q� )� )� )r#c�P���td��fd��D��D����S)z& Save us some typing. c3�:K�|]\}}|r ||��n|V��dSr/r)r�r�r�s r!r�z6_make_order.<locals>.attrs_to_tuple.<locals>.<genexpr>�sK���� � ���s�� (�C�C��J�J�J�5� � � � � � r#c3�P�K�|] }t�|j��|jfV��!dSr/)r�r�rB)r�r��objs �r!r�z6_make_order.<locals>.attrs_to_tuple.<locals>.<genexpr>�sG�������89���a�f�%�%�q�{�3������r#)rL)r1r�s`�r!�attrs_to_tuplez#_make_order.<locals>.attrs_to_tuple�sW����� � �����=B���� � � � � � r#c�^��|j|jur�|���|��kStS�z1 Automatically created by attrs. �r�r'�r r(r2s �r!r�z_make_order.<locals>.__lt__��9��� �?�d�n� ,� ,�!�>�$�'�'�.�.��*?�*?�?� ?��r#c�^��|j|jur�|���|��kStSr4r5r6s �r!r�z_make_order.<locals>.__le__��9��� �?�d�n� ,� ,�!�>�$�'�'�>�>�%�+@�+@�@� @��r#c�^��|j|jur�|���|��kStSr4r5r6s �r!r�z_make_order.<locals>.__gt__�r7r#c�^��|j|jur�|���|��kStSr4r5r6s �r!r�z_make_order.<locals>.__ge__�r9r#r)r�r�r�r�r�r�r2s ` @r!r�r��s����� *� )�� )� )� )�E�  �  �  �  �  ��������������������� �6�6�6� )�)r#c��|�|j}t|��\}}t||t|d�����|d|_t |_|S)z5 Add equality methods to *cls* with *attrs*. Nr�r#)r�r�rbr�r�r�r$s r!�_add_eqr=�sd�� �}��#��#�E�*�*�M�F�E���� 9�#�x� H� H������x��C�J��C�J� �Jr#c��td�|D����}d�|D��}t|d<t|d<t|d<g}|D]H\}}}|rd|znd|zdz}|tkr|�d |�d �n |�d |�d |�d �} |�| ���Id �|��} |�d} n|dz} ddddddddddddd| �d| �d�dd g} d!�| ��|fS)"zC Create the source and globs for a __repr__ and return it. c3�pK�|]1}|jdu� |j|jdurtn|j|jfV��2dS)FTN)r8r�r;r�s r!r�z$_make_repr_script.<locals>.<genexpr>�sV����"�"� � �6�� � � ��!�&�D�.�.�$�$�a�f�q�v�>� � � � �"�"r#c�8�i|]\}}}|tk�|dz|��S)�_repr)r8)r�r��rrDs r!r]z%_make_repr_script.<locals>.<dictcomp>�s0�� � � �(�d�A�q�Q�$�Y�Y��w���Y�Y�Yr#r rTrrzgetattr(self, "z ", NOTHING)z={z!r}z_repr(z)}r�Nz1{self.__class__.__qualname__.rsplit(">.", 1)[-1]}z.{self.__class__.__name__}zdef __repr__(self):z try:z: already_repring = _compat.repr_context.already_repringz except AttributeError:z! already_repring = {id(self),}z: _compat.repr_context.already_repring = already_repringz else:z# if id(self) in already_repring:z return '...'z else:z# already_repring.add(id(self))z return f'�(z)'z finally:z$ already_repring.remove(id(self))r�)rLr rTrr8r�r�) r�r��attr_names_with_reprsrV�attribute_fragmentsr�rBry�accessor�fragment� repr_fragment�cls_name_fragmentr�s r!r�r��s���"�"�"��"�"�"����  � �,A� � � �E��E�)��,�E� ���E�)����+� -� -� ��a��� M�G�d�N�N�%6��%=� �%M� � �D�y�y� �4�4���� *� *�'+�t�t�T�T�T�8�8�8�<� � �"�"�8�,�,�,�,��I�I�1�2�2�M� �z�O����!=�=�� ��D�"�+�D��-���-��=�)�=�=�M�=�=�=��.� �E�$ �9�9�U� � �U� "�"r#c��|�|j}t||��\}}t||t|d�����|d|_|S)z% Add a repr method to *cls*. Nr"r#)r�r�rbr�r")r�r�r�rTrVs r!� _add_reprrKs`�� �}��#��%�e�R�0�0�M�F�E���� 9�#�z� J� J�������$�C�L� �Jr#c���t|��}|�&t|t��sd}t|���t |dd��}|�2|�t |dd��}|� ||_|S|�d�}t |���|S)aG Return the tuple of *attrs* attributes for a class. The tuple also allows accessing the fields by their names (see below for examples). Args: cls (type): Class to introspect. Raises: TypeError: If *cls* is not a class. attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs* class. Returns: tuple (with name accessors) of `attrs.Attribute` .. versionchanged:: 16.2.0 Returned tuple allows accessing the fields by name. .. versionchanged:: 23.1.0 Add support for generic classes. N�Passed object must be a class.r��! is not an attrs-decorated class.)rrJr3rFr�r�r)r�� generic_baserQr�s r!rr,s���.$�C�(�(�L���J�s�D�$9�$9��.����n�n�� �C�*�D� 1� 1�E� �}� � #��L�*;�T�B�B�E�� �',��#�� ��9�9�9��"�3�'�'�'� �Lr#c��t|t��sd}t|���t|dd��}|�|�d�}t |���d�|D��S)a� Return an ordered dictionary of *attrs* attributes for a class, whose keys are the attribute names. Args: cls (type): Class to introspect. Raises: TypeError: If *cls* is not a class. attrs.exceptions.NotAnAttrsClassError: If *cls* is not an *attrs* class. Returns: dict[str, attrs.Attribute]: Dict of attribute name to definition .. versionadded:: 18.1.0 rMr�NrNc��i|] }|j|�� Srr�r�s r!r]zfields_dict.<locals>.<dictcomp>ts�� %� %� %�!�A�F�A� %� %� %r#)rJr3rFr�r)r�rQr�s r!� fields_dictrRZsn��& �c�4� � ��.����n�n�� �C�*�D� 1� 1�E� �}��9�9�9��"�3�'�'�'� %� %�u� %� %� %�%r#c ��tjdurdSt|j��D]+}|j}|� |||t ||j�����,dS)z� Validate all attributes on *inst* that have a validator. Leaves all exceptions through. Args: inst: Instance of a class with *attrs* attributes. FN)r �_run_validatorsrr�r7r�r�)rr�r\s r!r+r+wsg����%�'�'��� �D�N� #� #�.�.�� �K�� �=� �A�d�A�w�t�Q�V�,�,� -� -� -��.�.r#c�B�|�|��}|od|jvS)z> Check if the attribute name comes from a slot class. r`)r�r�)�a_namer�r�s r!� _is_slot_attrrW�s)�� � � �F� #� #�C� � .�;�#�,�.�.r#�tuple[str, dict, dict]c �n�| duo | tju} |r| rd} t| ���|p|}g}i}|D]m}|js|jt ur�|�|��|||j<|j�|durd} t| ���d}�V| r|jtjurd}�nt||||||||| || | rdnd� � \}}}|j tj vr/|� tj |j j��|� t |d���|rtj|d<|||fS)Nz$Frozen classes can't use on_setattr.Tr�r=)r� attr_dictr�)r r�rGr;r6rr�r�rC�_attrs_to_init_scriptr'�sys�modulesrCr�r�r�)r�r��pre_init�pre_init_has_args� post_initr2r1r5r�r6�cls_on_setattrr��has_cls_on_setattrrQ�needs_cached_setattr�filtered_attrsrZr�rTrVrs r!r�r��s��� �d�"�J�~�W�]�'J����$��4����o�o��%�/����N��I� �(�(���v� �!�)�w�.�.� ����a� � � �� �!�&�� �<� #���~�~�<�� ��o�o�%�#'� � � � (�A�L�� �$E�$E�#'� ��!6��� ���������&�6���J� "� "��F�E�;� �~���$�$� � � �S�[���0�9�:�:�:� �L�L�W�9�=�=�>�>�>��<�(4�';��#�$� �5�+� %�%r#r� value_var�has_on_setattrc��d|�d|�d�S)zJ Use the cached object.setattr to set *attr_name* to *value_var*. � _setattr('rrr)rrerfs r!�_setattrri�s�� 3� � 2� 2�i� 2� 2� 2�2r#r<� Converterc�<�d|�d|�||���d�S)zk Use the cached object.setattr to set *attr_name* to *value_var*, but run its converter first. rhrr)�_fmt_converter_call�rrerfr<s r!�_setattr_with_converterrn�s.�� ]� � \� \�i�&C�&C�I�y�&Y�&Y� \� \� \�\r#r�c�8�|rt||d��Sd|�d|��S)zo Unless *attr_name* has an on_setattr hook, use normal assignment. Otherwise relegate to _setattr. Trr)ri)rr�rfs r!�_assignrp�s4�� �0�� �5�$�/�/�/� (�9� (� (�� (� (�(r#c�b�|rt||d|��Sd|�d|�||����S)z� Unless *attr_name* has an on_setattr hook, use normal assignment after conversion. Otherwise relegate to _setattr_with_converter. Trr)rnrlrms r!�_assign_with_converterrr�sG���N�&�y�)�T�9�M�M�M� V�9� V� V��!>�!>�y�)�!T�!T� V� V�Vr#r1r�r�c�r��|dur$|durdttfSd�fd � }d�fd � }d ||fSdttfS)zg Determine the correct setter functions based on whether a class is frozen and/or slotted. TrrrUrerfr&r[c�V��t|���rt|||��Sd|�d|��S�N� _inst_dict['z'] = )rWri)rrerfr�s �r!� fmt_setterz&_determine_setters.<locals>.fmt_setters@����Y� �6�6� F�� �9�n�E�E�E�=�)�=�=�)�=�=� =r#r<rjc���|st|���rt||||��Sd|�d|�||����Sru)rWrnrl)rrerfr<r�s �r!�fmt_setter_with_converterz5_determine_setters.<locals>.fmt_setter_with_convertersd��� � ��y�-�!H�!H� �.��y�.�)����h�)�g�g�)�2O�2O�PY�[d�2e�2e�g�g� gr#)z_inst_dict = self.__dict__�rrUrerUrfr&r[rU� rrUrerUrfr&r<rjr[rU)rirnrprr)r2r1r�rwrys ` r!�_determine_settersr|�s������~�~� �D�=�=��x�!8�8� 8� >� >� >� >� >� >� h� h� h� h� h� h� ,� � %� � � �w�.� .�.r#r�� is_slotted� call_pre_initr_�call_post_init�does_cache_hashr6rcrb� method_namec �> �|rdgng} | r| �d��t|||��\} }}| �| ��g}g}g}i}ddi}|D�]�}|jr|�|��|j}|jdup|jt juo| }|j}t|j t��}|r|j j rdnd}|j �/t|j t��st|j ��}n|j }|jdu�r|r�t |jfz}|�K| �|||d|�d �z||����|j ||�|j��<n'| �|||d|�d �z|����|j j||<�n|�I| �||d |�d �||����|j ||�|j��<�n�| �||d |�d �|�����n�|j t&ur�|s�|�d |�d �}|jr|�|��n|�|��|�E| �|||||����|j ||�|j��<�n| �||||�����n�|�r_|�d �}|jr|�|��n|�|��| �d|�d���t |jfz}|��| �d|||||��z��| �d��| �d|||dz|zd z||��z��|j ||�|j��<nd| �d||||��z��| �d��| �d|||dz|zd z|��z��|j j||<n�|jr|�|��n|�|��|�D| �|||||����|j ||�|j��<n | �||||����|jdur(|j�|� |j||<���|�|jr |j||<���|rkt.|d<| �d��|D]I}d|jz}d|jz}| �d|�d|�d|j�d ���|j||<|||<�J|r| �d��|r<|r|r dt0�d�}ndt0�d�}n dt0�d�}| �|��|r8d �d!�|D����} | �d"| �d ���d#�|��}|}!|rX||rd#nd�d$d#�|����z }d#�d%�d&�|D��D����}"|!|!rd#ndz }!|!|"z }!|r |r d'|!�d �| d(<d)}#d*| �d|�d+| r|#�| ��nd,�d-�||fS).z� Return a script of an initializer for *attrs*, a dict of globals, and annotations for the initializer. The globals are required by the generated script. zself.__attrs_pre_init__()z$_setattr = _cached_setattr_get(self)r[Nr rSFrCrz attr_dict['z '].defaultz =attr_dict['z=NOTHINGzif z is not NOTHING:rzelse:Tr z#if _config._run_validators is True:�__attr_validator_�__attr_z(self, z, self.zself.__attrs_post_init__()rhz', None)rvz '] = Nonerz = Nonerc3�8K�|]}|j� d|j��V��dS)rN)r;r�r�s r!r�z(_attrs_to_init_script.<locals>.<genexpr> s4����B�B�Q�1�6�B�(���(�(�B�B�B�B�B�Br#zBaseException.__init__(self, r�z*, c��g|] }|�d|���� S)�=r)r�� kw_arg_names r!r�z)_attrs_to_init_script.<locals>.<listcomp> s8�� � � � ��.�.��.�.� � � r#c3�LK�|]}|�d��dV�� dS)r�rN)�split)r��kwas r!r�z(_attrs_to_init_script.<locals>.<genexpr> s1����#N�#N�#�C�I�I�c�N�N�1�$5�#N�#N�#N�#N�#N�#Nr#zself.__attrs_pre_init__(rz zdef z): �passr�)r�r|r�r7r�rCr r�rDrJr6rI� takes_selfr<rjr;�_INIT_FACTORY_PAT�_get_global_namerPrr>r3�_first_param_typer rpr�)$r�r�r}r~r_rr�r�r6rcrbr�r�� extra_linesrwryr� kw_only_args�attrs_to_validate�names_for_globalsrr�rrf�arg_name� has_factory� maybe_selfr<�init_factory_name�arg�val_name�init_hash_cache�vals� pre_init_args�pre_init_kw_only_args�NLs$ r!r[r[.s ��(.;� B� (� )� )��E�� � � � � 3�  � � �:L��:�}�:�:�6�K��6� �L�L����� �D��L������T�"�K� �UD�UD�� �;� (� � $� $�Q� '� '� '��F� ���T�1� � �L�� � -� D�2D� � �7�� ���G�4�4� �*�K�q�y�/C�K�V�V�� � �;� "�:�a�k�9�+M�+M� "�!�!�+�.�.�I�I�� �I� �6�U�?�?��* �$5��� �$A�!��(��L�L�1�1�%�-�0A�J�0A�0A�0A�A�*�%� �����"�+�&�i�&@�&@���&H�&H�I�I��L�L�"� �%�-�0A�J�0A�0A�0A�A�*������89�y�7H�!�"3�4�4��&�� � �-�-�!�;�i�;�;�;�&�!� ������'�"�)�"<�"<�Q�V�"D�"D�E�E�� � ��J�!�;�i�;�;�;�&��������Y�g� %� %�k� %��@�@�9�@�@�@�C��y� !��#�#�C�(�(�(�(�� � �C� � � ��$�� � �-�-�!�8�^�Y������ �'�"�)�"<�"<�Q�V�"D�"D�E�E�� � �Z�Z� �8�^�L�L�M�M�M�M� �; N��'�'�'�C��y� !��#�#�C�(�(�(�(�� � �C� � � � �L�L�9�x�9�9�9� :� :� :� 1�Q�V�I� =� ��$�� � ��/�/�!�8�^�Y������� � � �W�%�%�%�� � ��/�/�!�)�C�/�*�<�s�B�&�!� �������'�"�)�"<�"<�Q�V�"D�"D�E�E�� � ��Z�Z� �8�^�L�L�L����� � �W�%�%�%�� � �� �j�!�)�C�/�*�<�s�B�&�������45�9�3D� �/� 0� 0��y� &��#�#�H�-�-�-�-�� � �H�%�%�%��$�� � �-�-�!�8�^�Y������ �'�"�)�"<�"<�Q�V�"D�"D�E�E�� � �Z�Z� �8�^�L�L�M�M�M� �6�T�>�>��v�!�i�&7�()�� �H�%�%��&�9�+F�&�(1�(C� �H�%���-�'.��)�$� � � �:�;�;�;�"� -� -�A�*�Q�V�3�H�!�A�F�*�I� �L�L�L��L�L��L�L�1�6�L�L�L� M� M� M�*+�+� �h� '�+,� �i� (� (��3� � � �1�2�2�2��&� � A�� N�"J�/@�"J�"J�"J���"M�1B�"M�"M�"M���@�&7�@�@�@�O� � � �_�%�%�%��>��x�x�B�B�%�B�B�B�B�B�� � � �<�T�<�<�<�=�=�=� �9�9�T�?�?�D��M�� /� �4�'�4�4�R�E�E�D�I�I�l�,C�,C�E�E�E�� $� � � � �$O�#N��#N�#N�#N� � � �! �! �� ��6���B�6� ��.�.� ��?�*�?�>�m�>�>�>��a�� �B� �� � �T� � ��(�R�W�W�U�^�^�^�&� � � � ��  �r#r�c�,�|�d��S)z� The default __init__ parameter name for a field. This performs private-name adjustment via leading-unscore stripping, and is the default value of Attribute.alias if not provided. rD)�lstripr�s r!r�r�2 s�� �;�;�s� � �r#c�j�eZdZdZdZ dd�Zd�Zeddd ���Zd �Z d �Z d�Z d�Z dS)r�a� *Read-only* representation of an attribute. .. warning:: You should never instantiate this class yourself. The class has *all* arguments of `attr.ib` (except for ``factory`` which is only syntactic sugar for ``default=Factory(...)`` plus the following: - ``name`` (`str`): The name of the attribute. - ``alias`` (`str`): The __init__ parameter name of the attribute, after any explicit overrides and default private-attribute-name handling. - ``inherited`` (`bool`): Whether or not that attribute has been inherited from a base class. - ``eq_key`` and ``order_key`` (`typing.Callable` or `None`): The callables that are used for comparing and ordering objects by this attribute, respectively. These are set by passing a callable to `attr.ib`'s ``eq``, ``order``, or ``cmp`` arguments. See also :ref:`comparison customization <custom-comparison>`. Instances of this class are frequently used for introspection purposes like: - `fields` returns a tuple of them. - Validators get them passed as the first argument. - The :ref:`field transformer <transform-fields>` hook receives a list of them. - The ``alias`` property exposes the __init__ parameter name of the field, with any overrides and default private-attribute handling applied. .. versionadded:: 20.1.0 *inherited* .. versionadded:: 20.1.0 *on_setattr* .. versionchanged:: 20.2.0 *inherited* is not taken into account for equality checks and hashing anymore. .. versionadded:: 21.1.0 *eq_key* and *order_key* .. versionadded:: 22.2.0 *alias* For the full version history of the fields, see `attr.ib`. )r�r6r7r8r?r@rArBr:r;r=r3r<r>r�rCrDNFc�X�t||p| |p|d��\} }}}t�|��}|d|��|d|��|d|��|d|��|d| ��|d|��|d|��|d |��|d |��|d |��|d | ��|d | r!tjt | ����nt ��|d| ��|d| ��|d|��|d|��|d|��dS)NTr�r6r7r8r?r@rArBr:r;r<r=r3r>r�rCrD)rEr�r��types�MappingProxyTyper%�_EMPTY_METADATA_SINGLETON)r r�r6r7r8r9r:r;r�r=r3r<r>r?r@rArBrCrD� bound_setattrs r!r=zAttribute.__init__~ s���*(B� ���2�y�1�E�4�( �( �$��F�E�9� %�,�,�T�2�2� � � �f�d�#�#�#�� �i��)�)�)�� �k�9�-�-�-�� �f�d�#�#�#�� �d�B����� �h��'�'�'�� �g�u�%�%�%�� �k�9�-�-�-�� �f�d�#�#�#�� �f�d�#�#�#�� �k�9�-�-�-�� � ��/��&�t�H�~�~�6�6�6�.�  � � � � �f�d�#�#�#�� �i��)�)�)�� �k�9�-�-�-�� �l�J�/�/�/�� �g�u�%�%�%�%�%r#c��t�r/)rr�s r!r�zAttribute.__setattr__� s��!�!r#r�rUr�rOc��|�|j}n|j�d|�d�}t|���|||j|j|jd|j|jd|j||j|j |j |j |j |j |j|j��S)Nz>Type annotation and type argument cannot both be present for 'z'.F)r3rG�_default� _validatorr8r:r;r=r<r>r?r@rArBrCrD)r�r�r�r3rQs r!r�zAttribute.from_counting_attr� s��� �<��7�D�D� �W� �[�SW�[�[�[�C��S�/�/� !��s� � �K� �M� �G� � �G� �G� � �K� � �L� �J� �E� �I� �H� �L� �M� �H�% � � r#c �|�tj|��}|�|�����|S)a  Copy *self* and apply *changes*. This works similarly to `attrs.evolve` but that function does not work with :class:`attrs.Attribute`. It is mainly meant to be used for `transform-fields`. .. versionadded:: 20.3.0 )�copy� _setattrsr�)r r�news r!r�zAttribute.evolve� s0���i��o�o�� � � �g�m�m�o�o�&�&�&�� r#c�D��t�fd��jD����S)�( Play nice with pickle. c3�l�K�|].}|dkrt�|��nt�j��V��/dS)r=N)r�r%r=r�s �r!r�z)Attribute.__getstate__.<locals>.<genexpr>� sZ����� � ��$(�:�#5�#5�G�D�$� � � �4�� �;N�;N� � � � � � r#�rLr`rs`r!r#zAttribute.__getstate__� s?���� � � � ��� � � � � � r#c�V�|�t|j|����dS�r�N)r�r�r`�r r�s r!r$zAttribute.__setstate__� s(�� ���s�4�>�5�1�1�2�2�2�2�2r#c ���t�|��}|D]L\}}|dkr |||���|||r!tjt |����nt ���MdS)Nr=)r�r�r�r�r%r�)r �name_values_pairsr�r�r�s r!r�zAttribute._setattrs� s���$�,�,�T�2�2� �,� � �K�D�%��z�!�!�� �d�E�*�*�*�*�� ��!�7��.�t�E�{�{�;�;�;�6� ���� � r#) NNNFNNNNNNr/)r�rUr�rO) r&r'r(r)r`r=r�rtr�r�r#r$r�rr#r!r�r�= s�������(�(�X�I�<� ��� ������'5&�5&�5&�5&�n"�"�"�� � � � ��[� �:���$ � � �3�3�3� � � � � r#r�c�n�g|]2}t|tddddd|dkddt|���� � ��3S)NTFr=) r�r6r7r8r9r?rAr:r;r�rD)r�rr��r�r�s r!r�r� sg����� �� ��� � � ���j� � ��%�d�+�+� � � ���r#)r�c�(�g|]}|jdk� |��Sr�r�r�s r!r�r� s$��6�6�6�Q���+� 5� 5�q� 5� 5� 5r#c�6�g|]}|j� |jdk�|��Sr�)r:r�r�s r!r�r� s+�� =� =� =��A�F� =�q�v��'<�'<�1�'<�'<�'<r#c��eZdZdZdZged�dD�����eddddddddddddddd� ���RZd Zd �Z d �Z d �Z dS)rOa Intermediate representation of attributes that uses a counter to preserve the order in which the attributes have been defined. *Internal* data structure of the attrs library. Running into is most likely the result of a bug like a forgotten `@attr.s` decorator. )r�r�rDr<r�r?r@r:r;r>r=rCrArBr8r3c#�vK�|]4}t|t|��tdddddddddddd���V��5dS)NTF�r�rDr6r7r8r9r:r;r>r?r@rArBr�rC)r�r�rr�s r!r�z_CountingAttr.<genexpr>= s|���� � �$�# ��-�d�3�3�������������� � � � � � � � � r#) r�r�r8r?rAr:r;rCrDr=NTFr�rc�$�txjdz c_tj|_||_||_||_||_| |_| |_| |_ ||_ ||_ ||_ ||_ | |_| |_||_||_dSr�)rO� cls_counterr�r�r�r<r8r?r@rArBr:r;r=r3r>rCrD)r r6r7r8r9r:r;r<r=r3r>r?r@rArBrCrDs r!r=z_CountingAttr.__init__o s���& �!�!�Q�&�!�!�$�0�� ��� �#���"����� ������ ��� �"����� ��� � �� ��� ��� �$����� � � r#c�X�|j�||_nt|j|��|_|S)z� Decorator that adds *meth* to the list of validators. Returns *meth* unchanged. .. versionadded:: 17.1.0 )r�rN�r r�s r!r7z_CountingAttr.validator� s-�� �?� "�"�D�O�O�"�4�?�D�9�9�D�O�� r#c�\�|jturt�t|d���|_|S)z� Decorator that allows to set the default for an attribute. Returns *meth* unchanged. Raises: DefaultAlreadySetError: If default has been set before. .. versionadded:: 17.1.0 T)r�)r�rrrIr�s r!r6z_CountingAttr.default� s0�� �=�� '� '�(� (����6�6�6�� �� r#) r&r'r(r)r`rLr�r�r�r=r7r6rr#r!rOrO! s����������I�$0� �� � �$ �% � � � � �0�> � ���������������� � � �?0�0�O�b�K�#�#�#�J � � �����r#rOc�*�eZdZdZdZdd�Zd�Zd�ZdS) rIa� Stores a factory callable. If passed as the default value to `attrs.field`, the factory is used to generate a new value. Args: factory (typing.Callable): A callable that takes either none or exactly one mandatory positional argument depending on *takes_self*. takes_self (bool): Pass the partially initialized instance that is being initialized as a positional argument. .. versionadded:: 17.1.0 *takes_self* �rPr�Fc�"�||_||_dSr/r�)r rPr�s r!r=zFactory.__init__� s���� �$����r#c�D��t�fd��jD����S)r�c3�8�K�|]}t�|��V��dSr/r_r�s �r!r�z'Factory.__getstate__.<locals>.<genexpr>� s-�����D�D�T�W�T�4�(�(�D�D�D�D�D�Dr#r�rs`r!r#zFactory.__getstate__� s*����D�D�D�D�T�^�D�D�D�D�D�Dr#c�^�t|j|��D]\}}t|||���dSr�)r�r`rV)r r�r�r�s r!r$zFactory.__setstate__� sB���t�~�u�5�5� '� '�K�D�%� �D�$�� &� &� &� &� '� 'r#N)F)r&r'r(r)r`r=r#r$rr#r!rIrI� sZ��������$*�I�%�%�%�%�E�E�E� '�'�'�'�'r#rIc�J�g|] }t|tdddddddd�� � ��!S�NTF) r�r6r7r8r9r?rAr:r;r��r�rr�s r!r�r�� �W����� �� ��� � � �� � �� � � ���r#c�P�eZdZdZdZddd�d�Zedd ���Zdd �Zd �Z d �Z dS)rjae Stores a converter callable. Allows for the wrapped converter to take additional arguments. The arguments are passed in the order they are documented. Args: converter (Callable): A callable that converts the passed value. takes_self (bool): Pass the partially initialized instance that is being initialized as a positional argument. (default: `False`) takes_field (bool): Pass the field definition (an :class:`Attribute`) into the converter as a positional argument. (default: `False`) .. versionadded:: 24.1.0 )�__call__r�� _global_namer<� takes_fieldr�F�r�r�c�z��|�_|�_|�_t|��}|����_�js�js �fd��_n<�jr�js �fd��_n#�js�jr �fd��_n �fd��_|���}|�|�jjd<dSdS)Nc�.����|��Sr/�r<)r�rD�__r s �r!r�z$Converter.__init__.<locals>.<lambda> s�������1F�1F�r#c�0����||��Sr/r�)r��instancer�r s �r!r�z$Converter.__init__.<locals>.<lambda> s�������x�9�9�r#c�0����||��Sr/r�)r�r�r�r s �r!r�z$Converter.__init__.<locals>.<lambda> s���T�^�^��u�6�6�r#c�2����|||��Sr/r�)r�r�r�r s �r!r�z$Converter.__init__.<locals>.<lambda># s���4�>�>��x��<�<�r#r[) r<r�r�r�get_first_param_typer�r��get_return_typer�)r r<r�r��ex�rts` r!r=zConverter.__init__ s ���"���$���&��� !�)� ,� ,��!#�!8�!8�!:�!:����� �4�#3� �F�F�F�F�D�M�M� �_� �T�%5� �����D�M�M��� �T�%5� �����D�M�M�����D�M�� � � !� !�� �>�68�D�M� )�(� 3� 3� 3� �>r#rrUr[c� �d|��S)zh Return the name that a converter for an attribute name *attr_name* would have. �__attr_converter_r)rs r!r�zConverter._get_global_name+ s�� /�9�.�.�.r#rec�,�|js"|js|�|���d|�d�S|jr%|jr|�|���d|�d|�d�S|jr|�|���d|�d�S|�|���d|�d|�d�S)z� Return a string that calls the converter for an attribute name *attr_name* and the value in variable named *value_var* according to `self.takes_self` and `self.takes_field`. rCrz, self, attr_dict['z'])z, self)z , attr_dict[')r�r�r�)r rres r!rlzConverter._fmt_converter_call3 s��� �� F�4�#3� F��+�+�I�6�6�E�E��E�E�E� E� �?� f�t�/� f��+�+�I�6�6�e�e��e�e�W`�e�e�e� e� �?� L��+�+�I�6�6�K�K��K�K�K� K��'�'� �2�2�[�[�Y�[�[�Y�[�[�[�[r#c�,�|j|j|jd�S)zx Return a dict containing only converter and takes_self -- the rest gets computed when loading. �r<r�r�r�rs r!r#zConverter.__getstate__D s#�� ���/��+� � � r#c� �|jdi|��dS)z+ Load instance from state. Nrr�r�s r!r$zConverter.__setstate__O s"�� �� ��������r#N)rrUr[rU)rrUrerUr[rU) r&r'r(r)r`r=rur�rlr#r$rr#r!rjrj� s���������(�I�16�5�9�9�9�9�9�6�/�/�/��\�/�\�\�\�\�"  �  �  �����r#c�J�g|] }t|tdddddddd�� � ��!Sr�r�r�s r!r�r�V r�r#r�c ��� �tjd|��}t|t��r|}n:t|tt f��r d�|D��}nd}t |���|�dd��}|�dd��}|�dd��} i� |�� �|��|�|� d<|�|� d<| �| � d<tj ||i� fd���} tj tt��5tjd ��j�d d ��| _ddd��n #1swxYwY|�d d��} t)| |�d ��|�d��d��\|d <|d<t+dd|i|��| ��} d�|���D��| _| S)a A quick way to create a new class called *name* with *attrs*. .. note:: ``make_class()`` is a thin wrapper around `attr.s`, not `attrs.define` which means that it doesn't come with some of the improved defaults. For example, if you want the same ``on_setattr`` behavior as in `attrs.define`, you have to pass the hooks yourself: ``make_class(..., on_setattr=setters.pipe(setters.convert, setters.validate)`` .. warning:: It is *your* duty to ensure that the class name and the attribute names are valid identifiers. ``make_class()`` will *not* validate them for you. Args: name (str): The name for the new class. attrs (list | dict): A list of names or a dictionary of mappings of names to `attr.ib`\ s / `attrs.field`\ s. The order is deduced from the order of the names or attributes inside *attrs*. Otherwise the order of the definition of the attributes is used. bases (tuple[type, ...]): Classes that the new class will subclass. class_body (dict): An optional dictionary of class attributes for the new class. attributes_arguments: Passed unmodified to `attr.s`. Returns: type: A new class with *attrs*. .. versionadded:: 17.1.0 *bases* .. versionchanged:: 18.1.0 If *attrs* is ordered, the order is retained. .. versionchanged:: 23.2.0 *class_body* .. versionchanged:: 25.2.0 Class names can now be unicode. �NFKCc�,�i|]}|t����Sr)rRr�s r!r]zmake_class.<locals>.<dictcomp>� s��/�/�/�A�A�v�x�x�/�/�/r#z(attrs argument must be a dict or a list.r!Nr"r=c�.��|����Sr/)rC)r�r~s �r!r�zmake_class.<locals>.<lambda>� s���� � �$���r#r r&�__main__r9r?rATr�c�2�i|]\}}|j� ||j��Sr/)r3)r�r[r\s r!r]zmake_class.<locals>.<dictcomp>� s.������a��!�&�2D��1�6�2D�2D�2Dr#r)� unicodedata� normalizerJr%rKrLrF�poprCr�� new_classrRrSrTrGr\� _getframe� f_globalsr�r'r�r r�r�)r�r��bases� class_body�attributes_argumentsr�rQr^r`� user_init�type_r9r�r~s @r!� make_classr�k sd���` � ��� .� .�D��%�������� �E�D�%�=� )� )��/�/��/�/�/���8����n�n���|�|�0�$�7�7�H�� � �2�D�9�9�I�� � �Z��.�.�I� �D��� � � �J������%-�� !�"���&/�� "�#���$��Z�� �O�D�%��-G�-G�-G�-G� H� H�E� � �^�Z� 8� 8� � ��=��+�+�5�9�9� � � � ��� � � � � � � � � � � ���� � � � � � "� "�5�$� /� /�C� "� �� � ��&�&�� � ��)�)� �  � ���T�"��W�%� 9�&� 8� 8�x� 8�#7� 8� 8�� ?� ?�C���&�n�n�.�.����C�� �Js�3E�E�E)r1rc�,�eZdZdZe��Zd�ZdS)� _AndValidatorz2 Compose many validators to a single one. c�4�|jD]}||||���dSr/)� _validators)r rr�r�r\s r!r�z_AndValidator.__call__� s5���!� !� !�A� �A�d�D�%� � � � � !� !r#N)r&r'r(r)rRr�r�rr#r!r�r�� s:���������&�(�(�K�!�!�!�!�!r#r�c��g}|D]4}|�t|t��r|jn|g���5tt |����S)a A validator that composes multiple validators into one. When called on a value, it runs all wrapped validators. Args: validators (~collections.abc.Iterable[typing.Callable]): Arbitrary number of validators. .. versionadded:: 17.1.0 )r�rJr�r�rL)� validatorsr�r7s r!rNrN� sh�� �D�� � � � � � ��)�]�3�3� �I� !� !��� � � � � ��t��� %� %�%r#c����td��D����}|r�fd�}n�fd�}�s-td��}|j�||d���n�t �d�����}|r ||jd<�d}t st|t��r|j }t |��� ��}|r ||jd <|rt|d d � ��S|S) a� A converter that composes multiple converters into one. When called on a value, it runs all wrapped converters, returning the *last* value. Type annotations will be inferred from the wrapped converters', if they have any. converters (~collections.abc.Iterable[typing.Callable]): Arbitrary number of converters. .. versionadded:: 20.1.0 c3�@K�|]}t|t��V��dSr/�rJrj)r��cs r!r�zpipe.<locals>.<genexpr> s,����G�G�q�*�Q� �2�2�G�G�G�G�G�Gr#c�l���D]/}t|t��r ||||��n ||��}�0|Sr/r)r�rr�r� converterss �r!�pipe_converterzpipe.<locals>.pipe_converter sM���� � ��+5�a��+C�+C�O�A�A�c�4��'�'�'���3������Jr#c�(���D] }||��}�|Sr/r)r�rrs �r!rzpipe.<locals>.pipe_converter s&���� � ���a��f�f����Jr#�A)r�r[rr�rfr[Tr�) r�r r�rCrr�rrJrjr�r�)r�return_instancerr�t�lastr�s` r!rMrM� sH��� �G�G�J�G�G�G�G�G�O��� � � � � � � � � � � � �:� �C�L�L���&�-�-�a�1�.E�.E�F�F�F�F� !��A�� /� /� D� D� F� F�� � 6�45�N� *�5� 1��"�~��� !� �4�� ;� ;� !��=�D�"�$� '� '� 7� 7� 9� 9�� � :�79�N� *�8� 4��L���D�d�K�K�K�K� �r#)NrS) rTrUrVrWrXrYrZrUr[r\r/) rTrUrZrUrVrWrcrYr[rd)rsrUrtrur[r3)r[r�)r[r�)T)NNNNNNNFFTFFFFFNNFFNNNTN)r�r3rrUr[rU) r�r3r�r�r2r&r5r&r[r )r�r3r�r�)r�rKr[r )r[r )NN)r[rXrzr{)rrUr�rUrfr&r[rU)r2r&r1r&r�r�)r�r�r�r&r}r&r~r&r_r&rr&r�r&r�r�r6r&rcr&rbr&r�rUr[rX)r�rUr[rU)i� __future__rrLrRr�r*r'rqrkr\r�r��collections.abcrr� functoolsr�typingrrr rSr r r rrrrrr� exceptionsrrrr�objectr�r�r�r�rpr�r�rQrMr,r+r*�Enumrr�intr-rRrbrrr�r�r�r�r�r�r�r�r�rr�r r�rEr�r�r r�r�r�r%r�r�r�r=r�rKrrRrWr�rirnrprrr|r[r�r�r`�_arOrI�_frjr�r�rNrr#r!�<module>rs���#�"�"�"�"�"� � � � ����� � � � � � � � ������������� � � � � � � � �����-�-�-�-�-�-�-�-�%�%�%�%�%�%�+�+�+�+�+�+�+�+�+�+�(�'�'�'�'�'�'�'�'�'������������������������������!� �'����)��2�E�2�2�6�6�� �F�H�H� �"�g�l�7�?�G�4D�E�E�������t�y����( � ��� (� (� (� (� (�� (� (� (�" �� � � � � � �� � � � �� �h�h�h�h�\)-��  �  �  �  �  �$+/� � � � � �F1�1�1�1�.$�$�$�$�$�*�$�$�$� 0�0�0�"'�'�'�#�#�#�#�B%�%�%�8iE�iE�iE�iE�X1�1�1�h���"���7�7�7�tG �G �G �G �G �G �G �G �T���8((�((�((�X.2�����6� � � � � � � � �� �� �� � � ��������1`�`�`�`�F ��� /�/�/�����E�E�E�E�P � � � � � � �"�"�"�"�J5*�5*�5*�p����"6#�6#�6#�6#�r � � � �+�+�+�\&�&�&�:.�.�.�$/�/�/�B&�B&�B&�B&�J3�3�3�3�]�]�]�]�)�)�)�)� W� W� W� W�,/�,/�,/�,/�^A�A�A�A�H����G�G�G�G�G�G�G�G�T���#�����" �I� �G�� �)�2�&�&�&�6�6�"�6�6�6���� >� =�b� =� =� =�  � � � �Q�Q�Q�Q�Q�Q�Q�Q�h�� � �-�0�0�1�1� �$'�$'�$'�$'�$'�$'�$'�$'�N���!����� �)�G�G�I�I�g�R�8�8�8��C�C�C�2� N� N� N��a�a�a�a�a�a�a�a�H��;����� �I� �G�I�I�i�r� *� *� *�"�5�5�5�R� � � � � �y�T�d�d�d�d�V��T�t�$�$�$� !� !� !� !� !� !� !�%�$� !�&�&�&�.9�9�9�9�9r#
Memory