Your IP : 3.137.219.213


Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/typing.cpython-312.opt-2.pyc

�

�Q�f�����	ddlmZmZddlZddlmZddlZddlZddlZddlZddl	Z	ddl
ZddlZddl
Z
ddlZddl
mZmZmZmZddlmZmZmZmZmZmZmZmZgd�Zd�dd�d	�Zd�dd�d�Zd�Zd
�Z d�Z!d�Z"d�Z#d�Z$dd�d�Z%d�Z&d�Z'd�Z(d�Z)gZ*iZ+d�dd�d�Z,d�e-�d�d�Z.Gd�d�Z/Gd�d�Z0Gd �d!e/e0d
�"�Z1Gd#�d$e1d
�"�Z2Gd%�d&e3�Z4Gd'�d(e4�)�Z5e1d*��Z6e1d+��Z7e1d,��Z8e1d-��Z9e1d.��Z:e1d/��Z;e1d0��Z<d1�Z=e1d2��Z>e2e,d
��d3���Z?e1d4��Z@e1d5��ZAe1d6��ZBGd7�d8e/d
�"�ZCd9e5d:eDfd;�ZEd9e5d:eDfd<�ZFGd=�d>�ZGd?�ZHd@�ZIdA�ZJdB�ZKe,dC��ZLdD�ZMdE�ZNGdF�dGe/d
�"�ZOGdH�dIeOd
�"�ZPGdJ�dKe0eOd
�"�ZQGdL�dMeQd
�"�ZRGdN�dOe0ePd
�"�ZSGdP�dQeQd
�"�ZTGdR�dSeQd
�"�ZUGdT�dUe0ePd
�"�ZVdV�ZWGdW�dXePd
�"�ZXGdY�dZePd
�"�ZYe1d[��ZZGd\�d]ePd
�"�Z[Gd^�d_�Z\e-hd`��Z]e-hda��Z^e]e^zdbhzZ_dc�Z`dd�Zad�df�Zbd�dh�Zcgdi�djdkgdl�Zdej�dm��Zfe*j�efj��dn�Ziej�eei�do�Zkej�eek�[i[kGdp�dqe�Zlemdr��ZnGds�dteel�)�ZoGdu�dve0ePd
�"�ZpGdw�dx�Zqdy�Zrdz�Zsd{�Zte
j�e
j�e
j�e
j�eeefZyd�d|�Zzd}�Z{d~�Z|d�Z}d��Z~d�Zd�e7d:e7fd��Z�d��Z�d��Z�d��Z�ee�jee���Z�d��Z�d��Z�d��Z�d��Z�ed��Z�ed��Z�ed��Z�ed�d
���Z�ed�d
���Z�ed�d
���Z�ed�d
���Z�ed�d
e3���Z�ed�e�e��Z�eQZ�e�ej�j.d�Z�e�ej�j0de�Z�e�ej�j2d��Z�e�ej�j4de�Z�e�ej�j6de�Z�e�ej�j8de�Z�e�ej�j:de�Z�e�ej�j<de�Z�e�ej�j>d�Z�e�ej�j@de�Z�e�ej�jBde�Z�eTej�jDdg�Z�d�e�_�e�ej�jHded����Z�e�ej�jLde�Z�e�ej�jNdg�Z�e�ej�jPdg�Z�e�ej�jRde�Z�e�ej�jTde�Z�eRej�jVdd����Z�eUe�d�dd����Z�d�e�_�e�e�dedd����Z�e�e�j`ded����Z�e�e�dedd����Z�e�e-dedd����Z�e�ej�jhde�Z�e�ej�jjde�Z�e�ej�jldg�Z�e�ej�jnde�Z�e�e�jpded����Z�e�e�jtded����Z�e�e�dgdd����Z�e�ejdgd����Z�e�e�j|dg�Z�e�e�j~de�Z�e�e�j�dg�Z�e�ej�j�d��Z�e�ej�j�dg�Z�e�e3dedd����Z�d�e�_�erGd��d�eo��Z�erGd��d�eo��Z�erGd��d�eo��Z�erGd��d�eo��Z�erGd��d�eo��Z�erd����Z�erd����Z�d�d��Z�e-hd���Z�e-hd���Z�Gd��d�e3�Z�d�d��Z�e3�j�e�d�d�i�Z�d��Z�e�e�_�Gd��d�e3�Z�d�d
dœdÄZ�e3�j�e�d�d�i�Z�dńe�_�e1dƄ�Z�e1dDŽ�Z�GdȄdɫZ�e�Z�dZ�Gdʄd�ee��Z�Gd̄d�e�e��Z�Gd΄d�e�e��Z�GdЄd�e3�Z�Gd҄d�e߬)�Z�e�d�ze�_�e�e�j�e�j�<e�e�j�de�Z�e�e�j�de�Z�GdՄd�e߬)�Z
e�d�ze
_�e
e�j�e
�j�<d؄�Z�Gdلd�eo�Z�d
dddd�dۜd�eDd�eDd�eDd�eDd�e�e3e5e�d�e5fzd�fd�e5d:e�fd�Z�d�dd�f�Z�d��Z�y)��)�abstractmethod�ABCMetaN)�defaultdict)�WrapperDescriptorType�MethodWrapperType�MethodDescriptorType�GenericAlias)�_idfunc�TypeVar�	ParamSpec�TypeVarTuple�
ParamSpecArgs�ParamSpecKwargs�
TypeAliasType�Generic)c�	Annotated�Any�Callable�ClassVar�Concatenate�Final�
ForwardRefr�Literal�Optionalr�Protocol�Tuple�Typerr
�Union�AbstractSet�
ByteString�	Container�ContextManager�Hashable�	ItemsView�Iterable�Iterator�KeysView�Mapping�MappingView�MutableMapping�MutableSequence�
MutableSet�Sequence�Sized�
ValuesView�	Awaitable�
AsyncIterator�
AsyncIterable�	Coroutine�
Collection�AsyncGenerator�AsyncContextManager�
Reversible�SupportsAbs�
SupportsBytes�SupportsComplex�
SupportsFloat�
SupportsIndex�SupportsInt�
SupportsRound�ChainMap�Counter�Deque�Dict�DefaultDict�List�OrderedDict�Set�	FrozenSet�
NamedTuple�	TypedDict�	Generator�BinaryIO�IO�Match�Pattern�TextIO�AnyStr�assert_type�assert_never�cast�clear_overloads�dataclass_transform�final�get_args�
get_origin�
get_overloads�get_type_hints�is_typeddict�
LiteralString�Never�NewType�
no_type_check�no_type_check_decorator�NoReturn�NotRequired�overload�overriderr�Required�reveal_type�runtime_checkable�Self�Text�
TYPE_CHECKING�	TypeAlias�	TypeGuardr�UnpackF��allow_special_formsc�^�	|�td�St|t�rt|||��S|S)N)�module�is_class)�type�
isinstance�strr)�argrqros   �-/opt/alt/python312/lib64/python3.12/typing.py�
_type_convertrx�s3��G�
�{��D�z���#�s���#�f�7J�K�K��J�Tc���	ttf}|s|tfz
}|r
|tfz
}t	|||��}t|t�r|j|vrt|�d���|ttttttfvr|S|r|ttfvr|St|t�s|ttfvrtd|�d���t!|�t"urt|�d|d�d���|S)N)rqro� is not valid as type argumentzPlain z Got z.100�.)rrrrrxrt�
_GenericAlias�
__origin__�	TypeErrorrr\rar]rhrk�_SpecialFormrs�tuple)rv�msg�is_argumentrqro�invalid_generic_formss      rw�_type_checkr��s���
�%�h�/����(��,���!�e�X�-�!�
��F�@S�
T�C��3�
�&��N�N�3�3��3�%�=�>�?�?�
�s�M�8�U�D�)�D�D��
��s�x��&7�7��
��#�|�$����/B�(B��&���%C�D�E�E��C�y�E���3�%�u�S�4�L��2�3�3��Jryc�N�|duxs t|ttttf�S�N.)rtr��listr�_ConcatenateGenericAlias)rvs rw�_is_param_exprr��s,���#�:�@��C�
�D�)�%=�>�@�@ryc��	|jtjjuxrt	|�dk(xrt|d�S)N�r)r~�collections�abcr�lenr�)�typ�argss  rw�_should_unflatten_callable_argsr��sE���$	���+�/�/�2�2�2�	=��T��a��;�N�4��7�$;�<�ryc�X�	t|t�r6|jdk(r|jS|j�d|j��S|duryt|tj
�r|jSt|t�rddjd�|D��zdzSt|�S)	N�builtinsr|.�...�[�, c3�2K�|]}t|����y�w�N)�
_type_repr)�.0�ts  rw�	<genexpr>z_type_repr.<locals>.<genexpr>s����:�c��z�!�}�c����])
rtrs�
__module__�__qualname__�types�FunctionType�__name__r��join�repr��objs rwr�r��s�����#�t���>�>�Z�'��#�#�#��.�.�!��3�#3�#3�"4�5�5�
�c�z���#�u�)�)�*��|�|���#�u���T�Y�Y�:�c�:�:�:�S�@�@���9�ryc�b�	g}|D]�}t|t�r�t|t�r/|D])}t|g�D]}||vs�|j	|���+�St|d�r||vs�d|j	|��vt
|dd�D]}||vs�|j	|����t|�S�N�__typing_subst__�__parameters__�)rtrsr��_collect_parameters�append�hasattr�getattr)r��
parametersr��x�	collecteds     rwr�r�s���	��J�
���a����
��5�
!���!4�a�S�!9�I� �
�2�"�)�)�)�4�":���Q�*�
+��
�"��!�!�!�$��Q� 0�"�5���J�&��%�%�a�(�6��$���ryc
��	|st|�d���t|�}||k7rtd||kDrdnd�d|�d|�d|����y)N� is not a generic class�Too �many�few� arguments for �	; actual �, expected )rr�)�clsr��elen�alens    rw�_check_genericr�'sm�����3�%�6�7�8�8��z�?�D��t�|��$����v�%�@��PS�u�U#�#'�&��D�6�;�<�	<�ryc��g}|D]=}t|dd�}|�|r|ddus|j|��-|j|��?|S)N�__typing_unpacked_tuple_args__���.)r��extendr�)r��newargsrv�subargss    rw�_unpack_argsr�3sR���G����#�?��F�����G�B�K�3�4F��N�N�7�#��N�N�3����Nry��unhashable_fallbackc�h�	tj|�S#t$r|s�t|�cYSwxYwr�)�dict�fromkeysr�_deduplicate_unhashable)�paramsr�s  rw�_deduplicater�=s6��/��}�}�V�$�$���/�"��&�v�.�.�	/�s��1�1c�D�g}|D]}||vs�|j|��|Sr�)r�)�unhashable_params�new_unhashabler�s   rwr�r�Gs/���N�
���N�"��!�!�!�$���ryc��t|�}t|�}t|�}	|D]}|j|��	|S#t$rYywxYw)NF)r�r��remove�
ValueError)�
first_args�second_args�first_unhashable�second_unhashabler��elems      rw�_compare_args_orderlessr�NsZ��.�z�:��/��<���
��A��$�D�
�H�H�T�N�%��5�L������s�?�	A�
Ac���	g}|D]O}t|ttjf�r|j	|j
��?|j
|��Qtt|d���S)NTr�)	rt�_UnionGenericAliasr��	UnionTyper��__args__r�r�r��r�r��ps   rw�_remove_dups_flattenr�Ys\���
�F�
���a�,�e�o�o�>�?��M�M�!�*�*�%��M�M�!��	���f�$�?�@�@ryc��	g}|D]?}t|t�r|j|j��/|j	|��At|�Sr�)rt�_LiteralGenericAliasr�r�r�r�r�s   rw�_flatten_literal_paramsr�isG��R�
�F�
���a�-�.��M�M�!�*�*�%��M�M�!��	�
��=�ry��typedc�(��	�fd�}|�||�S|S)Nc�����tj�����}|t�<tj	|j
�~tj���fd��}|S)Nr�c�P��	t�|i|��S#t$rYnwxYw�|i|��Sr�)�_cachesr)r��kwds�funcs  �rw�innerz+_tp_cache.<locals>.decorator.<locals>.inner�s>���
��t�}�d�3�d�3�3���
��
����&��&�&s�
�	�)�	functools�	lru_cacher��	_cleanupsr��cache_clear�wraps)r��cacher�r�s`  �rw�	decoratorz_tp_cache.<locals>.decorator}s^���1�	�#�#�%�0��6�����
�����*�*�+��	����	�	'�
�	'��ryr�)r�r�r�s ` rw�	_tp_cacher�xs%�����(�������ry��recursive_guardc�������	t|t�r|j������St|ttt
jf��rt|t�rftd�|jD��}|j}t||�r|j|dd|df}n|j|}|r	t|}t����fd�|jD��}||jk(r|St|t�rt	|j|�St|t
j�r$tjtj |�S|j#|�S|S)Nr�c3�VK�|]!}t|t�rt|�n|���#y�wr�)rtrur�r�rvs  rwr�z_eval_type.<locals>.<genexpr>�s*�����%�C�$.�c�3�#7�
�3��S�@�%�s�')r�c3�>�K�|]}t|���������y�w)r�N)�
_eval_type)r��a�globalns�localnsr��type_paramss  ����rwr�z_eval_type.<locals>.<genexpr>�s2�����
� ��
��8�W�k�?�
�
� �s�)rtr�	_evaluater}r	r�r�r�r��__unpacked__r�r~rmr��reduce�operator�or_�	copy_with)r�r�rrr�r��is_unpacked�ev_argss ````   rwr�r��s5�����!�Z� ��{�{�8�W�k�?�{�[�[��!�m�\�5�?�?�C�D��a��&����:�:���D��.�.�K�.�q�$�7��L�L�$�s��)�T�"�X�!6�7���L�L��&����1�I���
��Z�Z�	
�
���a�j�j� ��H��a��&�����g�6�6��a����)��#�#�H�L�L�'�:�:��;�;�w�'�'��Hryc��eZdZ	dZd�Zy)�_Final)�__weakref__c�"�d|vrtd��y)N�_rootz&Cannot subclass special typing classes�r)r�r�r�s   rw�__init_subclass__z_Final.__init_subclass__�s���$���D�E�E�ryN)r�r�r��	__slots__rr�ryrwrr�s��(� �I�Fryrc��eZdZ	dZdZy)�_NotIterabler�N)r�r�r�r�__iter__r�ryrwrr�s����I��Hryrc�\�eZdZdZd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
ed��Zy
)r�)�_name�__doc__�_getitemc�V�||_|j|_|j|_yr�)rr�rr)�self�getitems  rw�__init__z_SpecialForm.__init__�s!����
��%�%��
�����ryc�8�|dvr|jSt|��)N>r�r�)r�AttributeError)r�items  rw�__getattr__z_SpecialForm.__getattr__�s ���/�/��:�:���T�"�"ryc��td|����)N�Cannot subclass r�r�basess  rw�__mro_entries__z_SpecialForm.__mro_entries__�s���*�4�(�3�4�4ryc� �d|jzS�N�typing.�r�rs rw�__repr__z_SpecialForm.__repr__�����4�:�:�%�%ryc��|jSr�r)r*s rw�
__reduce__z_SpecialForm.__reduce__�����z�z�ryc��td|����)NzCannot instantiate r)rr�r�s   rw�__call__z_SpecialForm.__call__�s���-�d�X�6�7�7ryc��t||fSr��r�r�others  rw�__or__z_SpecialForm.__or__�����T�5�[�!�!ryc��t||fSr�r3r4s  rw�__ror__z_SpecialForm.__ror__�����U�D�[�!�!ryc��t|�d���)Nz! cannot be used with isinstance()r�rr�s  rw�__instancecheck__z_SpecialForm.__instancecheck__�����4�&� A�B�C�Cryc��t|�d���)Nz! cannot be used with issubclass()r�rr�s  rw�__subclasscheck__z_SpecialForm.__subclasscheck__r>ryc�&�|j||�Sr�)r�rr�s  rw�__getitem__z_SpecialForm.__getitem__s���}�}�T�:�.�.ryN)r�r�r�rrr r%r+r.r1r6r9r=rAr�rDr�ryrwr�r��sO��0�I�'�
#�5�&��8�"�"�D�D��/��/ryr�)rc��eZdZd�Zy)�_LiteralSpecialFormc�N�t|t�s|f}|j|g|���Sr�)rtr�rrCs  rwrDz_LiteralSpecialForm.__getitem__	s)���*�e�,�$��J��t�}�}�T�/�J�/�/ryN)r�r�r�rDr�ryrwrFrFs��0ryrFc�(��eZdZ�fd�Z�fd�Z�xZS)�_AnyMetac�H��|turtd��t�|�
|�S)Nz+typing.Any cannot be used with isinstance())rr�superr=)rr��	__class__s  �rwr=z_AnyMeta.__instancecheck__s&����3�;��I�J�J��w�(��-�-ryc�2��|turyt�|�	�S)Nz
typing.Any)rrKr+)rrLs �rwr+z_AnyMeta.__repr__s����3�;���w��!�!ry)r�r�r�r=r+�
__classcell__�rLs@rwrIrIs���.�
"�"ryrIc� ��eZdZ	�fd�Z�xZS)rc�H��|turtd��t�|�
|�S)NzAny cannot be instantiated)rrrK�__new__�r�r��kwargsrLs   �rwrRzAny.__new__'s%����#�:��8�9�9��w��s�#�#ry)r�r�r�rRrNrOs@rwrrs���	�$�$ryr)�	metaclassc� �	t|�d����Nz is not subscriptablerrCs  rwrara-s��
��t�f�1�2�
3�3ryc� �	t|�d���rWrrCs  rwr]r]Bs���(�t�f�1�2�
3�3ryc� �	t|�d���rWrrCs  rwrhrh[s����t�f�1�2�
3�3ryc� �	t|�d���rWrrCs  rwr\r\os���,�t�f�1�2�
3�3ryc�<�	t||�d��}t||f�S�N� accepts only single type.�r�r}�rr�rs   rwrr��,���"�z�d�V�+E�#F�G�D����w�'�'ryc�<�	t||�d��}t||f�Sr\r^r_s   rwrr�r`ryc���	|dk(rtd��t|t�s|f}d�t�fd�|D��}t|�}t	|�dk(r|dSt	|�dk(rtd�|vrt
||d�	�St
||�S)
Nr�z Cannot take a Union of no types.z)Union[arg, ...]: each arg must be a type.c3�6�K�|]}t|�����y�wr��r��r�r�r�s  �rwr�zUnion.<locals>.<genexpr>�s�����?�J�q�{�1�c�*�J����rr�r��name)rrtr�r�r�rsr��rr�r�s  @rwrr�s�����:�R���:�;�;��j�%�(� �]�
�
5�C��?�J�?�?�J�%�j�1�J�
�:��!���!�}��
�:��!���T�
�j� 8�!�$�
��D�D��d�J�/�/ryc��	t||fSr�r3)�left�rights  rw�_make_unionrn�s�����u���ryc�J�	t||�d��}t|td�fS)Nz requires a single type.)r�rrs)rr�rvs   rwrr�s,��6�
�j�T�F�*B�"C�
D�C���d�4�j��!�!ryc
��	t|�}	td�ttt	|���D��}t
||�S#t
$rY�wxYw)Nc3�&K�|]	\}}|���y�wr�r�)r�r��_s   rwr�zLiteral.<locals>.<genexpr>
s����^�)]���A�1�)]�s�)r�r�r�r��_value_and_type_iterrr�rCs  rwrr�s\���,)��4�J�
��^��d�;O�PZ�;[�6\�)]�^�^�
� ��j�1�1���
��
�s�-A�	A�Ac� �	t|�d���rWrrCs  rwrkrks����t�f�1�2�
3�3ryc����	|dk(rtd��t|t�s|f}|ddust|dt�std��d�g�fd�|ddD��|d��}t	||�S)Nr�z&Cannot take a Concatenate of no types.r�.zMThe last parameter to Concatenate should be a ParamSpec variable or ellipsis.z/Concatenate[arg, ...]: each arg must be a type.c3�6�K�|]}t|�����y�wr�rdres  �rwr�zConcatenate.<locals>.<genexpr>;s�����A��A�K��3�'��rf)rrtr�rr�rjs  @rwrr%s������R���@�A�A��j�%�(� �]�
��r�N�c�!�Z�
�2��	�%J��:�;�	;�
;�C�R�A��C�R��A�R�:�b�>�R�J�#�D�*�5�5ryc�<�	t||�d��}t||f�Sr\r^r_s   rwrlrl?s-��.�^�z�d�V�+E�#F�G�D����w�'�'ryc�F�eZdZ	dZddd�d�Zd
d�Zd�Zd�Zd	�Zd
�Z	d�Z
y)r)�__forward_arg__�__forward_code__�__forward_evaluated__�__forward_value__�__forward_is_argument__�__forward_is_class__�__forward_module__NF)rrc�(�t|t�std|����|jd�rd|�d�}n|}	t	|dd�}||_||_d|_d|_	||_
||_||_y#t
$rtd|����wxYw)	Nz*Forward reference must be a string -- got �*�(z,)[0]z<string>�evalz/Forward reference must be an expression -- got F)
rtrur�
startswith�compile�SyntaxErrorryrzr{r|r}r~r)rrvr�rqrr�arg_to_compile�codes       rwrzForwardRef.__init__|s����#�s�#��H���P�Q�Q�
�>�>�#�� ���U�^�N� �N�	Y��>�:�v�>�D� #��� $���%*��"�!%���'2��$�$,��!�"(�����	Y�� O�PS�w�W�X�X�	Y�s�
A9�9Bc�l�|j|vr|S|jr||u�r|�|�ix}}n	|�|}n|�|}|j�5ttj
j
|jd�d|�}|rQt|�t|�}}|D]6}|j}|jr||vs� |||<|j|d��8tt|j||�d|j|j��}t||||||jhz��|_d|_|j S)N�__dict__z*Forward references must evaluate to types.)r�ror�T)ryr{rr��sys�modules�getr�r�r~�popr�r�rzr}r�r|)rr�rrr��param�
param_name�type_s        rwrzForwardRef._evaluate�sG�����?�2��K��)�)�W�H�-D���G�O�%'�'��7��!�"����"���&�&�2�"��K�K�O�O�D�$;�$;�T�B�J�PX����$(��N�D��M�'��(�E�!&���J��4�4�
�(�8R�/4���,����J��5�	)� ��T�*�*�H�g�>�<� �8�8�$(�$=�$=�	�E�&0�����!0�D�4H�4H�3I�!I�&�D�"�*.�D�&��%�%�%ryc�.�t|t�stS|jr@|jr4|j|jk(xr|j
|j
k(S|j|jk(xr|j|jk(Sr�)rtr�NotImplementedr{ryr|rr4s  rw�__eq__zForwardRef.__eq__�s����%��,�!�!��%�%�%�*E�*E��(�(�E�,A�,A�A�F��*�*�e�.E�.E�E�
G��$�$��(=�(=�=�D��'�'�5�+C�+C�C�	Eryc�D�t|j|jf�Sr�)�hashryrr*s rw�__hash__zForwardRef.__hash__�s���T�)�)�4�+B�+B�C�D�Dryc��t||fSr�r3r4s  rwr6zForwardRef.__or__�r7ryc��t||fSr�r3r4s  rwr9zForwardRef.__ror__�r:ryc�b�|j�d}nd|j��}d|j�|�d�S)N�z	, module=zForwardRef(�))rry)r�module_reprs  rwr+zForwardRef.__repr__�s@���"�"�*��K�%�d�&=�&=�%@�A�K��T�1�1�4�[�M��C�Cry�TNr�)r�r�r�rrrr�r�r6r9r+r�ryrwrrts:��7�'�I�
)�u�)�0,&�\E�E�"�"�Dryrr��returnc�B�t|t�xr
t|dd�S)N�#__typing_is_unpacked_typevartuple__F)rtrsr��r�s rw�_is_unpacked_typevartupler��s(���A�t�$�
$�
E��A�<�e�D�Fryc�H�t|ttf�xst|�Sr�)rtrrr�r�s rw�_is_typevar_liker��s���a�'�9�-�.�N�2K�A�2N�Nryc��eZdZ	d�Zy)�_PickleUsingNameMixinc��|jSr��r�r*s rwr.z _PickleUsingNameMixin.__reduce__�s���}�}�ryN)r�r�r�r.r�ryrwr�r��s
��9�ryr�c��d}t||d��}t|t�r|jtust|t
�rt
|dd�rt|�d���|S)N�*Parameters to generic types must be types.T)r�rFr{)r�rtr}r~rmr	r�r)rrvr�s   rw�_typevar_substr��sW��
6�C�
�c�3�D�
1�C�	�C��	'�C�N�N�f�,D�	�C��	&�7�3���+N��3�%�=�>�?�?��Jryc	��|j}|j|�}||dzdD] }t|t�s�t	d|����t|�}t|�}|}||z
dz
}	d}
d}t
|�D]Q\}}
t|
t�r�t|
dd�}|s�'t|�dk(s�6|ddus�>|
�t	d��|}
|d}�S|
�t||
�}t|	||
z
dz
�}	n||	z|kDrt	d	|�d
|�d|dz
����g|d|�|g||z
z�t||||	z
��|g||	z
|z
|z
dz
z�|||	z
d��S)Nrgz(More than one TypeVarTuple parameter in r�r�r�.z6More than one unpacked arbitrary-length tuple argumentr�Too few arguments for r�z, expected at least )r��indexrtr
rr��	enumeratersr��minr�)r�aliasr�r��typevartuple_indexr�r��plenrlrm�var_tuple_index�fillarg�krvr�s               rw�_typevartuple_prepare_substr��s���
�
!�
!�F����d�+���*�Q�.�/�0���e�\�*��F�u�g�N�O�O�1��t�9�D��v�;�D��D��%�%��)�E��O��G��D�/���3��#�t�$��c�#C�T�J�G��3�w�<�1�,�����1C�"�.�#�$\�]�]�"#��!�!�*��"��"��4��)���E�4�/�1�A�5�6��	
����	��0���8#�#'�&�(<�T�!�V�H�F�G�	G��	
�e�t����)�'�$�.�
/��	�d�4����&�'���)�T�E�\�D�(�+=�=��A�
B�	�

�d�U�l�m�	��ryc��t|ttf�rtd�|D��}|St|�st	d|����|S)Nc3�4K�|]}t|d����y�w)zExpected a type.Nrd�r�r�s  rwr�z#_paramspec_subst.<locals>.<genexpr>s����D��1�K��#5�6����zFExpected a list of types, an ellipsis, ParamSpec, or Concatenate. Got )rtr�r�r�r�rrvs  rw�_paramspec_substr�sU���#��e�}�%��D��D�D���J��C�
 ��:�:=��@�A�	A��Jryc��|j}|j|�}|t|�k\rtd|����t|�dk(rt	|d�s|f}|St||t�rg|d|�t||��||dzd��}|S)Nr�rgr)r�r�r�rr�rtr�r�)rr�r�r��is     rw�_paramspec_prepare_substr�#s���
�
!�
!�F����T��A��C��I�~��0���8�9�9�
�6�{�a���t�A�w� 7��w���K�
�D��G�T�	"�7��b�q��7�5��a��>�7�D��1���J�7���Kryc���	t|t�s|f}td�|D��}|ttfv}|r|st	d|j
�d���t
d�|D��st	d|j�d���tt|��t|�k7r�t	d|j�d���|jD]}t|dd�}|��|||�}�t||t|j��g}t|j|�D]8\}}t|t�r|j|��(|j!|��:t|�}t#||�S)	Nc3�2K�|]}t|����y�wr��rx�r�r�s  rwr�z)_generic_class_getitem.<locals>.<genexpr>@s����4�V��=��#�V�r�zParameter list to z[...] cannot be emptyc3�2K�|]}t|����y�wr�)r�r�s  rwr�z)_generic_class_getitem.<locals>.<genexpr>Is����7��1�#�A�&��r�zParameters to zF[...] must all be type variables or parameter specification variables.z[...] must all be unique�__typing_prepare_subst__)rtr�rrrr��allr�r��setr�r�r��zipr
r�r�r})r�r��is_generic_or_protocolr��prepare�new_args�new_args       rw�_generic_class_getitemr�2sp����f�e�$����
�4�V�4�
4�F� �W�h�$7�7�����$�S�%5�%5�$6�6K�L��
��7��7�7�� �����/8�9�:�
:��s�6�{��s�6�{�*�� �����.F�G�I�
I��'�'�E��e�%?��F�G��"� ��f�-��(�	�s�F�C��(:�(:�$;�<���!�#�"4�"4�f�=�N�E�7��%��.�����(�����(�	>�
�x�����f�%�%ryc���
�tt|�
|i|��g}d|jvrt|jv}n7t|j
vxr#|jdk7xrt|�tk7}|rtd��d|jvr�t|j�}d}|jD]?}t|t�s�|jtus�'|�td��|j}�A|�at|�}t|��
|�
ksDdj!�
fd�|D��}dj!d�|D��}	td|�d	|	�d
���|}t#|�|_y)N�__orig_bases__rz!Cannot inherit from plain Genericz0Cannot inherit from Generic[...] multiple times.r�c3�>�K�|]}|�vs�t|����y�wr��ru)r�r��gvarsets  �rwr�z)_generic_init_subclass.<locals>.<genexpr>�s�����"M�5�a�A�W�<L�3�q�6�5�s�	�c3�2K�|]}t|����y�wr�r�)r��gs  rwr�z)_generic_init_subclass.<locals>.<genexpr>�s����"9�5�a�3�q�6�5�r�zSome type variables (z) are not listed in Generic[r�)rKrrr�r��	__bases__r�rs�_TypedDictMetarr�rtr}r~r�r�r�r�)r�r�rT�tvars�error�gvars�base�tvarset�s_vars�s_argsr�s          @rw�_generic_init_subclassr�csl���	�'�3�)�4�:�6�:��E��3�<�<�'��3�-�-�-���C�M�M�)�0��L�L�J�.�0���I��/�	�
��;�<�<��3�<�<�'�#�C�$6�$6�7�����&�&�D��4��/��O�O�w�.��$�#�J�L�L��+�+��
'����%�j�G��%�j�G��g�%����"M�5�"M�M�����"9�5�"9�9���"7��x�@:�:@���!D�E�E��E��u��C�ryc�J�|jd�xr|jd�S)N�__)r��endswith)�attrs rw�
_is_dunderr��s���?�?�4� �8�T�]�]�4�%8�8ryc�V��eZdZ	ddd�d�Zd�Zd�Zd�Z�fd�Zd	�Zd
�Z	�fd�Z
�xZS)�_BaseGenericAliasTN��instric�<�||_||_||_d|_yr�)�_instrr~r)r�originr�ris    rwrz_BaseGenericAlias.__init__�s����
���
� �����ryc���|js0td|j�d|jj�d���|j|i|��}	||_|S#t$rY|SwxYw)NzType z cannot be instantiated; use z
() instead)r�rrr~r��__orig_class__�	Exception)rr�rT�results    rwr1z_BaseGenericAlias.__call__�s����z�z��e�D�J�J�<�0#�#'�?�?�#;�#;�"<�J�H�I�
I� ����$�1�&�1��	�$(�F�!�
�
���	���
�	�s�A�	A&�%A&c�,�g}|j|vr|j|j�|j|�}||dzdD].}t|t�st|t�s�$t|�S|jt�t|�S)Nrg)r~r�r�rtr��
issubclassrr�)rr$�resr��bs     rwr%z!_BaseGenericAlias.__mro_entries__�s������?�?�%�'��J�J�t���'��K�K�����q��s�t��A��!�.�/�:�a��3I���S�z���
�J�J�w���S�z�ryc���|dvr$|jxs|jjSd|jvr!t	|�st|j|�St
|��)N>r�r�r~)rr~r�r�r�r�r)rr�s  rwr z_BaseGenericAlias.__getattr__�sU���/�/��:�:�9����!9�!9�9��4�=�=�(��D�1A��4�?�?�D�1�1��T�"�"ryc�t��t|�s|dvrt�|�	||�yt|j||�y)N>r�r�_nparams)r�rK�__setattr__�setattrr~)rr��valrLs   �rwr�z_BaseGenericAlias.__setattr__�s2����d��t�'E�E��G���c�*��D�O�O�T�3�/ryc�6�|jt|��Sr��rArsr<s  rwr=z#_BaseGenericAlias.__instancecheck__�����%�%�d�3�i�0�0ryc��td��)NzBSubscripted generics cannot be used with class and instance checksrr@s  rwrAz#_BaseGenericAlias.__subclasscheck__�s���5�6�	6ryc���ttt�|�
�t	|j
�D�cgc]}t
|�r�|��c}z��Scc}wr�)r�r�rK�__dir__�dirr~r��rr�rLs  �rwrz_BaseGenericAlias.__dir__�sP����C����)�$'����$8�Q�$8�D�
�4�@P�4�$8�Q�R�S�T�	T��Qs�A�A)r�r�r�rr1r%r r�r=rArrNrOs@rwr�r��s>����(,�$���
�#�0�1�6�T�Tryr�c�|��eZdZddd��fd�
Zd�Zd�Zd�Zd�Zed	��Z	d
�Z
d�Zd�Zd
�Z
d�Z�fd�Zd�Z�xZS)r}TNr�c����t�|�|||��t|t�s|f}td�|D��|_t|�|_|s|j|_yy)Nr�c3�4K�|]}|turdn|���y�w).N)�_TypingEllipsisr�s  rwr�z)_GenericAlias.__init__.<locals>.<genexpr>�s'����/�)-�A�&'�/�%9�c�� �)-�r�)rKrrtr�r�r�r�r�)rr�r�r�rirLs     �rwrz_GenericAlias.__init__�sc���
����d���6��$��&��7�D��/�)-�/�/��
�1�$�7����$�/�/�D�O�ryc��t|t�stS|j|jk(xr|j|jk(Sr�)rtr}r�r~r�r4s  rwr�z_GenericAlias.__eq__�s>���%��/�!�!����5�#3�#3�3�4��M�M�U�^�^�3�	5ryc�D�t|j|jf�Sr�)r�r~r�r*s rwr�z_GenericAlias.__hash__s���T�_�_�d�m�m�4�5�5ryc��t||fSr�r3�rrms  rwr6z_GenericAlias.__or__r7ryc��t||fSr�r3�rrls  rwr9z_GenericAlias.__ror__����T�4�Z� � ryc�*�|jttfvrtd|����|jst|�d���t|t�s|f}t
d�|D��}t|�}|j|�}|j|�}|S)Nz%Cannot subscript already-subscripted r�c3�2K�|]}t|����y�wr�r�r�s  rwr�z,_GenericAlias.__getitem__.<locals>.<genexpr>(s����4�t�!�]�1�%�t�r�)
r~rrrr�rtr�r��_determine_new_argsr)rr�r��rs    rwrDz_GenericAlias.__getitem__s���"�?�?�w��1�1��C�D�6�J�K�K��"�"��t�f�$;�<�=�=��$��&��7�D��4�t�4�4���D�!���+�+�D�1���N�N�8�$���ryc
�@�|j}|D]}t|dd�}|��|||�}�t|�}t|�}||k7rtd||kDrdnd�d|�d|�d|����t	t||��}t
|j|j|��S)Nr�r�r�r�r�r�r�)	r�r�r�rr�r�r��_make_substitutionr�)rr�r�r�r�r�r��new_arg_by_params        rwrz!_GenericAlias._determine_new_args.s����$�$���E��e�%?��F�G��"��t�T�*����4�y���6�{���4�<��d�T�D�[�6�e�"D�O�TX�SY�Z'�'+�f�K��v�?�@�
@���F�D� 1�2���T�,�,�T�]�]�<L�M�N�Nryc	���	g}|D�]V}t|t�r|j|��&t|dd�}|r|||�}nbt|dd�}|s|}nPg}|D];}	t|	t�r|j||	��(|j||	��=|t
|�}|jtjjk(r"t|t�r|j|���t|�r|j|���
t|t�r,|jt
|j||�����F|j|���Y|Sr�)
rtrsr�r�r
r�r�r~r�r�rr�r)
rr�rr��old_arg�	substfuncr��	subparamsr�r�s
          rwrz _GenericAlias._make_substitutionKs<��2����G��'�4�(�����(����);�T�B�I��#�$4�W�$=�>��#�G�-=�r�B�	� �%�G� �G�&��%�a��6�#�N�N�+;�A�+>�?�#�N�N�+;�A�+>�?�	'�
&�e�G�n�5�G����+�/�/�":�":�:�z�'�SX�?Y�����(�*�7�3�����(��G�U�+�����$�1�1�'�;K�L�M������(�q�r�ryc�h�|j|j||j|j��S�N)rir�)rLr~rr��rr�s  rwrz_GenericAlias.copy_with�s%���~�~�d�o�o�t�$�*�*�4�:�:�~�V�Vryc��|jrd|jz}nt|j�}|jr3dj	|jD�cgc]
}t|���c}�}nd}|�d|�d�Scc}w)Nr(r�z()r�r�)rr�r~r�r�)rrir�r�s    rwr+z_GenericAlias.__repr__�sq���:�:��t�z�z�)�D��d�o�o�.�D��=�=��9�9�T�]�]�C�]��j��m�]�C�D�D��D���q���a� � ��	Ds�A;c��|jrt�|j}n|j}t|j�}t|�dk(rt
|dt�s|\}tj||ffS)Nrgr)	r�globalsr~r�r�r�rtrr)rr�r�s   rwr.z_GenericAlias.__reduce__�sd���:�:��Y�t�z�z�*�F��_�_�F��T�]�]�#���t�9��>�*�T�!�W�e�"<��E�D����&�$��/�/ryc�D��t|jt�rtd|����|jrt
�|�|�S|jtur>t|vry|j|�}||dzdD]}t|t�s�||us�y|jfS)Nr"r�rg)rtr~r�rrrKr%rrr�r�)rr$r�r�rLs    �rwr%z_GenericAlias.__mro_entries__�s�����d�o�o�|�4��.�t�h�7�8�8��:�:��7�*�5�1�1��?�?�g�%��5� �����D�!�A��1�Q�3�4�[���a�!2�3���
��!����!�!ryc#�"K�t|��y�wr�)rmr*s rwrz_GenericAlias.__iter__�s�����T�l��s�
)r�r�r�rr�r�r6r9r�rDrrrr+r.r%rrNrOs@rwr}r}�s]���2.2��0�5�6�"�!�����>O�:<�|W�
!�0�
"�ryr}c�^��eZdZddd��fd�
Zed��Zd�Zd�Z�fd�Zd	�Z	d
�Z
d�Z�xZS)�_SpecialGenericAliasTNr�c����|�|j}t�|�	|||��||_|jdk(rd|j
�d�|_yd|j�d|j
�d�|_y)Nr�r�zA generic version of r|)r�rKrr�r�r�r)rr��nparamsr�rirLs     �rwrz_SpecialGenericAlias.__init__�sv����<��?�?�D�
����d���6���
����
�*�2�6�3F�3F�2G�q�I�D�L�2�6�3D�3D�2E�Q�v�GZ�GZ�F[�[\�]�D�Lryc���t|t�s|f}d�t�fd�|D��}t|||j�|j	|�S)Nr�c3�6�K�|]}t|�����y�wr�rdres  �rwr�z3_SpecialGenericAlias.__getitem__.<locals>.<genexpr>�������;�F�q�{�1�c�*�F�rf)rtr�r�r�r�rr�r�s  @rwrDz _SpecialGenericAlias.__getitem__�sH����&�%�(��Y�F�:���;�F�;�;���t�V�T�]�]�3��~�~�f�%�%ryc�\�t|j||j|j��Sr)r}r~rr��rr�s  rwrz_SpecialGenericAlias.copy_with�s$���T�_�_�f�"&�*�*�4�:�:�?�	?ryc� �d|jzSr'r)r*s rwr+z_SpecialGenericAlias.__repr__�r,ryc����t|t�r t|j|j�St|t�st||j�St
�|�|�Sr�)rtr"r�r~r}rKrA)rr�rLs  �rwrAz&_SpecialGenericAlias.__subclasscheck__�sN����c�/�0��c�n�n�d�o�o�>�>��#�}�-��c�4�?�?�3�3��w�(��-�-ryc��|jSr�r)r*s rwr.z_SpecialGenericAlias.__reduce__�r/ryc��t||fSr�r3r
s  rwr6z_SpecialGenericAlias.__or__�r7ryc��t||fSr�r3rs  rwr9z_SpecialGenericAlias.__ror__�r
ry)
r�r�r�rr�rDrr+rAr.r6r9rNrOs@rwr"r"�s@���04�4�^��&��&�?�&�.��"�!ryr"c�0��eZdZddd��fd�
Z�fd�Z�xZS)�_DeprecatedGenericAliasTNr�c�:��t�|�||||��||_y)Nr�)rKr�_removal_version)rr�r$�removal_versionr�rirLs      �rwrz _DeprecatedGenericAlias.__init__�s#���	�����t�$��?� /��ryc���ddl}|j|j�d|j��|j��t
�|�|�S)Nrr|)r�)�warnings�_deprecatedr�rr3rKr=)rr�r6rLs   �rwr=z)_DeprecatedGenericAlias.__instancecheck__�sG������������q�����-�d�6K�6K�	
��w�(��.�.ry)r�r�r�rr=rNrOs@rwr1r1�s���8<�4�0�/�/ryr1c�$��eZdZ�fd�Zd�Z�xZS)�_CallableGenericAliasc	���|j}t|�dk(rt|d�rt�|��Sddj|ddD�cgc]
}t
|���c}��dt
|d��d�Scc}w)Nr�rztyping.Callable[[r�r�z], r�)r�r�r�rKr+r�r�)rr�r�rLs   �rwr+z_CallableGenericAlias.__repr__�s}����}�}���t�9��>�n�T�!�W�5��7�#�%�%���Y�Y�t�C�R�y�A�y�!�
�1�
�y�A�B�C�3��d�2�h�'�(��+�	,��As�A6
c��|j}t|�dk(rt|d�st|dd�|df}tj
t|ffS)Nr�rr�)r�r�r�r�rrrrs  rwr.z _CallableGenericAlias.__reduce__�sO���}�}���D�	�Q��>�$�q�'�#:���S�b�	�?�D��H�,�D����(�D�!1�1�1ry)r�r�r�r+r.rNrOs@rwr9r9�s
���,�2ryr9c�(�eZdZd�Zd�Zed��Zy)�
_CallableTypec�\�t|j||j|j��Sr)r9r~rr�r*s  rwrz_CallableType.copy_withs&��$�T�_�_�f�*.�*�*�4�:�:�G�	Gryc���t|t�rt|�dk7rtd��|\}}t|t�rt|�|f}n||f}|j|�S)Nr�z6Callable must be used as Callable[[arg, ...], result].)rtr�r�rr��__getitem_inner__)rr�r�r�s    rwrDz_CallableType.__getitem__
sf���&�%�(�C��K�1�,<��<�=�
=����f��d�D�!��D�k�6�*�F��F�^�F��%�%�f�-�-ryc���|\}}d}t||�}|tur|jt|f�St	|t
�s|f}td�|D��}||fz}|j|�S)Nz.Callable[args, result]: result must be a type.c3�2K�|]}t|����y�wr�r�r�s  rwr�z2_CallableType.__getitem_inner__.<locals>.<genexpr>!s����8�4�C�]�3�'�4�r�)r��Ellipsisrrrtr�)rr�r�r�r�s     rwr@z_CallableType.__getitem_inner__st�����f�>���V�S�)���8���>�>�?�F�";�<�<��$��&��7�D��8�4�8�8����	�!���~�~�f�%�%ryN)r�r�r�rrDr�r@r�ryrwr=r=s!��G�.��
&��
&ryr=c��eZdZed��Zy)�
_TupleTypec���t|t�s|f}t|�dk\r:|ddur3d�t�fd�|ddD��}|jg|�t���Sd�t�fd�|D��}|j|�S)Nr�r�.z Tuple[t, ...]: t must be a type.c3�6�K�|]}t|�����y�wr�rdres  �rwr�z)_TupleType.__getitem__.<locals>.<genexpr>-s�����D��1�;�q�#�.��rfz*Tuple[t0, t1, ...]: each t must be a type.c3�6�K�|]}t|�����y�wr�rdres  �rwr�z)_TupleType.__getitem__.<locals>.<genexpr>0r'rf)rtr�r�rrr(s  @rwrDz_TupleType.__getitem__'s�����&�%�(��Y�F��v�;�!���r�
�c� 1�4�C��D��s���D�D�F��>�>�"<�F�"<�O�"<�=�=�:���;�F�;�;���~�~�f�%�%ryN)r�r�r�r�rDr�ryrwrErE&s���	&��	&ryrEc�F��eZdZd�Zd�Zd�Z�fd�Zd�Zd�Z�fd�Z	�xZ
S)r�c��t|Sr�r3r*s  rwrz_UnionGenericAlias.copy_with5s���V�}�ryc��t|ttjf�stS	t|j�t|j�k(S#t$r#t|j|j�cYSwxYwr�)	rtr�r�r�r�r�r�rr�r4s  rwr�z_UnionGenericAlias.__eq__8se���%�"4�e�o�o�!F�G�!�!�	J��t�}�}�%��U�^�^�)<�<�<���	J�*�4�=�=�%�.�.�I�I�	J�s�*A�)A?�>A?c�>�tt|j��Sr�)r��	frozensetr�r*s rwr�z_UnionGenericAlias.__hash__@s���I�d�m�m�,�-�-ryc����|j}t|�dk(rD|dtd�urdt|d��d�S|dtd�urdt|d��d�St�|��S)Nr�rztyping.Optional[rgr�)r�r�rsr�rKr+�rr�rLs  �rwr+z_UnionGenericAlias.__repr__Csw����}�}���t�9��>��A�w�$�t�*�$�)�*�T�!�W�*=�)>�a�@�@��a��D��J�&�)�*�T�!�W�*=�)>�a�@�@��w��!�!ryc�6�|jt|��Sr�r�r<s  rwr=z$_UnionGenericAlias.__instancecheck__Lr�ryc�B�|jD]}t||�s�yy�NT)r�r�)rr�rvs   rwrAz$_UnionGenericAlias.__subclasscheck__Os���=�=�C��#�s�#��!ryc�@��t�|��\}\}}|t|ffSr�)rKr.r)rr�r�r�rLs    �rwr.z_UnionGenericAlias.__reduce__Ts(���$�w�1�3���n�v�t��e�T�]�"�"ry)r�r�r�rr�r�r+r=rAr.rNrOs@rwr�r�4s,����J�.�"�1��
#�#ryr�c��d�|D�S)Nc3�6K�|]}|t|�f���y�wr�)rsr�s  rwr�z'_value_and_type_iter.<locals>.<genexpr>Zs����-�*�Q�Q��Q��L�*�s�r�)r�s rwrsrsYs
��-�*�-�-ryc��eZdZd�Zd�Zy)r�c��t|t�stStt	|j
��tt	|j
��k(Sr�)rtr�r�r�rsr�r4s  rwr�z_LiteralGenericAlias.__eq__^s?���%�!5�6�!�!��'��
�
�6�7�3�?S�TY�Tb�Tb�?c�;d�d�dryc�P�ttt|j���Sr�)r�rMrsr�r*s rwr�z_LiteralGenericAlias.__hash__ds���I�2�4�=�=�A�B�C�CryN)r�r�r�r�r�r�ryrwr�r�]s��e�Dryr�c���eZdZ�fd�Z�xZS)r�c����t|dttf�r
g|dd�|d��St|dt�rg|dd�|dj��}t
�|�|�S)Nr�)rtr�r�r�r�rKr)rr�rLs  �rwrz"_ConcatenateGenericAlias.copy_withism����f�R�j�4��-�0�.�V�C�R�[�.�6�"�:�.�.��f�R�j�":�;�9�v�c�r�{�9�V�B�Z�%8�%8�9�F��w� ��(�(ry)r�r�r�rrNrOs@rwr�r�hs
���)�)ryr�c�>�	t||�d��}t||f��S)Nr])r�r�)r��_UnpackGenericAliasr_s   rwrmrmqs-��,�Z�z�d�V�+E�#F�G�D��d�$��9�9ryc�D��eZdZd�Z�fd�Zed��Zed��Z�xZS)r\c�:�dt|jd��d�S)Nztyping.Unpack[rr�)r�r�r*s rwr+z_UnpackGenericAlias.__repr__�s"�� �
�4�=�=��+;� <�=�Q�?�?ryc�>��|jr|St�|�	|�Sr�)r�rKrDrOs  �rwrDz_UnpackGenericAlias.__getitem__�s!����3�3��K��w�"�4�(�(ryc��|j\}t|ttjf�r)|j
turtd��|jSy)Nz*Unpack[...] must be used with a tuple type)r�rtr}r�r	r~r�rr�s  rwr�z2_UnpackGenericAlias.__typing_unpacked_tuple_args__�sI���}�}����c�M�5�+=�+=�>�?��~�~�U�*�� L�M�M��<�<��ryc�<�t|jdt�S�Nr)rtr�r
r*s rwr�z7_UnpackGenericAlias.__typing_is_unpacked_typevartuple__�s���$�-�-��*�L�9�9ry)	r�r�r�r+rD�propertyr�r�rNrOs@rwr\r\�s6���@�
)�
�����:��:ryr\c��eZdZy)rN)r�r�r�r�ryrwrr�s��2ryr>�_is_protocolr�r�r��__type_params__�__protocol_attrs__�_is_runtime_protocol�__non_callable_proto_members__>rrRr�rrr�r�__annotations__�__subclasshook__�__class_getitem__�__abstractmethods__�_MutableMapping__markerc��	t�}|jddD]`}|jdvr�t|di�}g|j�|��D].}|jd�r�|tvs�|j|��0�b|S)Nr�>rrrj�_abc_)r��__mro__r�r�r�r��EXCLUDED_ATTRIBUTES�add)r��attrsr��annotationsr�s     rw�_get_protocol_attrsrv�s����

�E�E����C�R� ���=�=�3�3���d�$5�r�:��2�d�m�m�2�k�2�D��?�?�7�+��<O�0O��	�	�$��3�	!��Lryc�H�t|�}|jrtd��|jtury|j
D]3}|jjdt�}|tus�,||_ntj|_|j|g|��i|��y)Nz Protocols cannot be instantiatedr)	rsrerr�_no_init_or_replace_initrqr�r��object)rr�rTr�r��inits      rwrxrx�s���
�t�*�C�
����:�;�;��|�|�3�3�������}�}� � ��-E�F���/�/��C�L��	�������C�L�L��'��'��'ryrgc���	tj|dz�xs|S#t$rYnwxYw	tj|dz�jjd|�S#ttf$rYywxYw)Nrgr�)r��_getframemodulenamer�	_getframe�	f_globalsr�r�)�depth�defaults  rw�_callerr�sx��
��&�&�u�q�y�1�<�W�<���
��
��
��}�}�U�Q�Y�'�1�1�5�5�j�'�J�J���J�'�
���
�s��	*�*�1A � A2�1A2r�c��	t|�dvS)N>Nr�r�)r�)rs rw�_allow_reckless_class_checksr�s���
�5�>�7�7�7ry)rr0r%r&r2r#r.r!r4r7�Buffer�AbstractContextManager�AbstractAsyncContextManager)zcollections.abc�
contextlibc��ddlm}|S)Nr��getattr_static)�inspectr�r�s rw�_lazy_load_getattr_staticr� s
��'��ryc�(�t|jffSr�)rr~)�psargss rw�_pickle_psargsr�*s���6�,�,�.�.�.ryc�(�t|jffSr�)rr~)�pskwargss rw�_pickle_pskwargsr�/s���X�0�0�2�2�2ryc�<��eZdZ�fd�Z�fd�Z�fd�Z�fd�Z�xZS)�
_ProtocolMetac�6��|dk(r|tfk(rnvt|vrn|D]i}|tthvr�|jtj|jg�vr�?t|t�rt|dd�r�]td|����t�|�,||||fi|��S)NrreFz5Protocols can only inherit from other protocols, got )rrryr��_PROTO_ALLOWLISTr�r�r�r�rrKrR)�mclsrir$�	namespacerTr�rLs      �rwrRz_ProtocolMeta.__new__:s�����:��%�G�:�"5��
��
����V�W�-�-��}�}�(8�(<�(<�T�_�_�b�(Q�Q�"�4��1�#�D�.�%�@�$��#�h�(�����w��t�T�5�)�F�v�F�Fryc�`��t�|�|i|��t|dd�rt|�|_yy)NreF)rKrr�rvrgrSs   �rwrz_ProtocolMeta.__init__Ms3���
���$�)�&�)��3���.�%8��%=�C�"�/ryc�b��|turtj||�St|dd�rut	�skt|t�st
d��t|dd�st
d��|jr,|jjd�turt
d��t�|�	|�S)NreFz"issubclass() arg 1 must be a classrh�LInstance and class checks can only be used with @runtime_checkable protocolsrkz<Protocols with non-method members don't support issubclass())rrsrAr�r�rtrrir�r��_proto_hookrK)r�r5rLs  �rwrAz_ProtocolMeta.__subclasscheck__Rs�����(�?��)�)�#�u�5�5��C���/�0�2��e�T�*�� D�E�E��3� 6��>��3����2�2��L�L�$�$�%7�8�K�G��R����w�(��/�/ryc�n��|turtj||�St|dd�st�|�	|�St|dd�st�st
d��t�|�	|�ryt�}|jD]}	|||�}|��||jvs�yy#t$rYywxYw)NreFrhr�T)rrsr=r�rKr�rr�rgrri)r��instancer�r�r�rLs     �rwr=z_ProtocolMeta.__instancecheck__ks�����(�?��)�)�#�x�8�8��s�N�E�2��7�,�X�6�6���3�U�;�,�.��<�=�
=��7�$�X�.��2�4���*�*�D�
�$�X�t�4���{�t�3�+M�+M�M���+���
"�
���
�s�	B'�'	B4�3B4)r�r�r�rRrrAr=rNrOs@rwr�r�7s���G�&>�
0�2�ryr�c��|jjdd�stS|jD]�}|jD]�}||jvr|j|�
tccS�;t|di�}t
|tjj�s�^||vs�ct|t�s�tt|dd�s����tcSy)NreFrjT)r�r�r�rgrqr�rtr�r�r(r�r)r�r5r�r�rus     rwr�r��s����<�<���N�E�2����&�&���M�M�D��t�}�}�$��=�=��&�.�)�)��"�$�(9�2�>�K��;����(?�(?�@��K�'��u�g�.�7�5�.�RW�3X��"�"�!�'� ryc�,��eZdZ	dZdZdZ�fd�Z�xZS)rr�TFc�:��t�|�|i|��|jjdd�s!t	d�|j
D��|_d|jvrt|_|jr)|jtjurt|_	yyy)NreFc3�,K�|]}|tu���y�wr��r�r�r�s  rwr�z-Protocol.__init_subclass__.<locals>.<genexpr>�s����"H�-�Q�1��=�-�s�rk)rKrr�r��anyr�rer�rkrrrxrSs   �rwrzProtocol.__init_subclass__�s����
��!�4�2�6�2��|�|�����6�"�"H�#�-�-�"H�H�C���S�\�\�1�#.�C� ��������0A�0A� A�3�C�L�!B�ry)r�r�r�rrerhrrNrOs@rwrr�s%����@�I��L� ��
4�
4ryrc�N��eZdZ	�fd�Zd�Zd�Zd�Zd�Zd�Z�fd�Z	d�Z
�xZS)	�_AnnotatedAliasc���t|t�r|j|z}|j}t�|�||d��||_y)Nrrh)rtr��__metadata__r~rKr)rr��metadatarLs   �rwrz_AnnotatedAlias.__init__�sD����f�o�.��*�*�X�5�H��&�&�F�
�����k��:�$��ryc�8�|d}t||j�Srb)r�r�)rr��new_types   rwrz_AnnotatedAlias.copy_with�s���!�9���x��):�):�;�;ryc��djt|j�djd�|jD���S)Nztyping.Annotated[{}, {}]r�c3�2K�|]}t|����y�wr�)r�r�s  rwr�z+_AnnotatedAlias.__repr__.<locals>.<genexpr>�s����9�'8�!�d�1�g�'8�r�)�formatr�r~r�r�r*s rwr+z_AnnotatedAlias.__repr__�s9��)�0�0��t���'��I�I�9�t�'8�'8�9�9�
�	
ryc�b�tjt|jf|jzffSr�)rrrr~r�r*s rwr.z_AnnotatedAlias.__reduce__�s1���������)�D�,=�,=�=�"
�
�	
ryc��t|t�stS|j|jk(xr|j|jk(Sr�)rtr�r�r~r�r4s  rwr�z_AnnotatedAlias.__eq__�sB���%��1�!�!����5�#3�#3�3�<��%�%��);�);�;�	=ryc�D�t|j|jf�Sr�)r�r~r�r*s rwr�z_AnnotatedAlias.__hash__s���T�_�_�d�&7�&7�8�9�9ryc�,��|dvryt�|�|�S)N>r�r�r)rKr rs  �rwr z_AnnotatedAlias.__getattr__s����/�/���w�"�4�(�(ryc��|jfSr�)r~r#s  rwr%z_AnnotatedAlias.__mro_entries__
s�����!�!ry)r�r�r�rrr+r.r�r�r r%rNrOs@rwr�r��s0����%�<�

�
�
=�:�)�
"ryr�c�B�eZdZ	dZd�Zd�Zed��d��Zd�Zy)	rr�c��td��)Nz&Type Annotated cannot be instantiated.r�r�r�rTs   rwrRzAnnotated.__new__@s���@�A�Aryc�N�t|t�s|f}|j|g|���Sr�)rtr��_class_getitem_inner)r�r�s  rwrlzAnnotated.__class_getitem__Cs+���&�%�(��Y�F�'�s�'�'��5�f�5�5ryTr�c��t|�dkrtd��t|d�rtd��d}t|d|d��}t	|dd�}t||�S)	Nr�zUAnnotated[...] should be used with at least two arguments (a type and an annotation).rz?Annotated[...] should not be used with an unpacked TypeVarTuplez$Annotated[t, ...]: t must be a type.Trnrg)r�rr�r�r�r�)r�r�r�r�r�s     rwr�zAnnotated._class_getitem_innerHss���v�;��?��+�,�
,�%�V�A�Y�/��4�5�
5�4���V�A�Y���F�������$���v�x�0�0ryc�J�tdj|j���)NzCannot subclass {}.Annotated)rr�r�r�s   rwrzAnnotated.__init_subclass__Vs!���*�1�1�#�.�.�A�
�	
ryN)	r�r�r�rrRrlr�r�rr�ryrwrrs8��-�^�I�B�6�
�T��1��1�
ryrc�X�	t|t�r
t|dd�std|z��d|_t�|_|jD]7}	tt||d��}|r�|jj|��9|S#t$r}td|�d��|�d}~wwxYw)NreFzB@runtime_checkable can be only applied to protocol classes, got %rTz,Failed to determine whether protocol member z is a method member)r�rr�rrhr�rirg�callablersr�)r�r��is_callable�es    rwrgrg\s����$�c�7�#�7�3���+N��"�$'�(�)�	)�#�C��
*-��C�&��&�&��		=�"�7�3��d�#;�<�K���2�2�6�6�t�<�'��J���	��>�t�h�G%�%���
��	�s�B�	B)�B$�$B)c��	|Sr�r�)r�r�s  rwrSrS�s����Jryc��	|Sr�r�)r�r�s  rwrQrQ�s����Jryc��	t|dd�riSt|t��r?i}t|j�D]�}|�6tt
jj|jd�di�}n|}|jjdi�}t|tj�ri}|�tt|��n|}|�|�||}}|j�D]M\}	}
|
�td�}
t|
t�rt!|
dd��}
t#|
|||j$�}
|
||	<�O��|r|S|j�D��cic]\}}|t'|���c}}S|�`t|tj(�r
|j}n4|}
t+|
d�r|
j,}
t+|
d�r�t|
di�}|�|}n|�|}t|dd�}|�,t|t.�riSt1d	j3|���t|�}t|d
d�}|j�D]Z\}	}
|
�td�}
t|
t�r't!|
t|tj(�d��}
t#|
|||�||	<�\|r|S|j�D��cic]\}}|t'|���c}}Scc}}wcc}}w)N�__no_type_check__r�rjFT)r�rr�__wrapped__�__globals__z1{!r} is not a module, class, method, or function.rfr�)r�rtrs�reversedrqr�r�r�r�r�r��GetSetDescriptorTyper��vars�itemsrurr�rf�_strip_annotations�
ModuleTyper�r��_allowed_typesrr�)r�r�r�include_extras�hintsr��base_globals�ann�base_localsri�valuer�r��nsobjrs               rwrZrZ�s����<�s�'��.��	��#�t�����S�[�[�)�D���&�s�{�{���t����'M�z�[]�^��'���-�-�#�#�$5�r�:�C��#�u�9�9�:���.5�o�$�t�D�z�*�7�K���8�#3�-8��k��"�y�y�{���e��=� ��J�E��e�S�)�&�u�%�$�O�E�"�5�,��T�EY�EY�Z��#��d��
 +�#*�0'�u�`�RW�R]�R]�R_�,`�R_�$�!�Q�Q�0B�1�0E�-E�R_�,`�`����c�5�+�+�,��|�|�H��E��%��/��)�)���%��/��u�m�R�8�H��?��G�	�����C�*�D�1�E��}��c�>�*��I��+�+1�6�#�;�8�
8���K�E��#�0�"�5�K��{�{�}���e��=���J�E��e�S�!��� *�3��0@�0@� A�A���E�
!���'�;�G��d��%�#�5�\�e�k�k�m�(\�m�d�a���,>�q�,A�)A�m�(\�\��K-a��J)]s�J8�J>c���	t|t�rt|j�St	|d�r0|jt
tfvrt|jd�St|t�r>td�|jD��}||jk(r|S|j|�St|t�rCtd�|jD��}||jk(r|St|j|�St|tj�rQtd�|jD��}||jk(r|Stjt j"|�S|S)Nr~rc3�2K�|]}t|����y�wr��r�r�s  rwr�z%_strip_annotations.<locals>.<genexpr>	�����H�Z��0��3�Z�r�c3�2K�|]}t|����y�wr�r�r�s  rwr�z%_strip_annotations.<locals>.<genexpr>	r�r�c3�2K�|]}t|����y�wr�r�r�s  rwr�z%_strip_annotations.<locals>.<genexpr>	r�r�)rtr�r�r~r�rerbr�r}r�rr	r�r�r�rrr)r��
stripped_argss  rwr�r�
	s��2��!�_�%�!�!�,�,�/�/��q�,��A�L�L�X�{�4K�$K�!�!�*�*�Q�-�0�0��!�]�#��H�Q�Z�Z�H�H�
��A�J�J�&��H��{�{�=�)�)��!�\�"��H�Q�Z�Z�H�H�
��A�J�J�&��H��A�L�L�-�8�8��!�U�_�_�%��H�Q�Z�Z�H�H�
��A�J�J�&��H�������m�<�<��Hryc��	t|t�rtSt|ttt
tf�r|jS|turtSt|tj�rtjSyr�)rtr�rr�r	rrr~rr�r���tps rwrXrX#	sc���"�"�o�&����"�(�,�$�o�7�8��}�}��	�W�}����"�e�o�o�&�����ryc�,�	t|t�r|jf|jzSt|tt
f�r-|j}t||�rt|dd�|df}|St|tj�r|jSy)Nr�r�)rtr�r~r�r}r	r�r�r�r�r�)r�r�s  rwrWrWA	s�����"�o�&��
�
��"�/�/�1�1��"�}�l�3�4��k�k��*�2�s�3���C�R��>�3�r�7�+�C��
��"�e�o�o�&��{�{��
ryc�$�	t|t�Sr�)rtr�r�s rwr[r[[	s��
��b�.�)�)ry�drvc�r�	t|�}t|�tkDr|dtdz}td|����)Nr�z*Expected code to be unreachable, but got: )r�r��_ASSERT_NEVER_REPR_MAX_LENGTH�AssertionError)rvr�s  rwrRrRp	sE���$
��I�E�
�5�z�1�1��4�4�5��=��
�E�e�W�M�
N�Nryc��	t|t�r�t|�D]�}t||�}t	|d�rB|j
|j
�d|j��k7st|dd�|jk7r�^t|tj�rd|_
t|tj�rd|j_
t|t�s��t|���	d|_
|S#t$rY|SwxYw)Nr�r|r�T)rtrsrr�r�r�r�r�r�r�r��
MethodType�__func__r_r)rv�keyr�s   rwr_r_�	s�����#�t���s�8�C��#�s�#�C��C��0��#�#�#�*:�*:�);�1�S�\�\�N�'K�K��3��d�3�s�~�~�E�
��#�u�1�1�2�(,��%��#�u�/�/�0�15����.��#�t�$��c�"�%�&
� $����J���
���J�
�s�&C/�/	C<�;C<c�D��	tj���fd��}|S)Nc�.���|i|��}t|�}|Sr�)r_)r�r�r�r�s   �rw�wrapped_decoratorz2no_type_check_decorator.<locals>.wrapped_decorator�	s!����$�'�$�'���T�"���ry)r�r�)r�r�s` rwr`r`�	s-����
�_�_�Y��� ��
�ryc��	td��)Nz�You should not call an overloaded function. A series of @overload-decorated functions outside a stub module should always be followed by an implementation that is not @overload-ed.)�NotImplementedError)r�r�s  rw�_overload_dummyr��	s��4�
�	9�:�:ryc���	t|d|�}	|t|j|j|jj
<tS#t$rYtSwxYw�Nr�)r��_overload_registryr�r��__code__�co_firstlinenorr�)r��fs  rwrcrc�	se���>	��j�$�'�A�
�VZ��1�<�<�(����8����9R�9R�S�����
����
�s�7A
�
	A�Ac���	t|d|�}|jtvrgSt|j}|j|vrgSt	||jj��Sr�)r�r�r�r�r��values)r�r��mod_dicts   rwrYrY�	sa��@���j�$�'�A��|�|�-�-��	�!�!�,�,�/�H��~�~�X�%��	������(�/�/�1�2�2ryc�.�	tj�yr�)r��clearr�ryrwrTrT�	s��.����ryc�D�		d|_|S#ttf$rY|SwxYwrR)�	__final__rr)r�s rwrVrV
s:���2
����
�H��
�I�&�
�	
��H�
������T�KT�VT�T_co)�	covariant�V_co�VT_co�T_contra)�
contravariant�CT_co)r�boundrP�aDeprecated alias to collections.abc.Callable.

    Callable[[int], str] signifies a function that takes a single
    parameter of type int and returns a str.

    The subscription syntax must always be used with exactly two
    values: the argument list and the return type.
    The argument list must be a list of types, a ParamSpec,
    Concatenate or ellipsis. The return type must be a single type.

    There is no syntax to indicate optional or keyword arguments;
    such function types are rarely used as callback types.
    rrh)r�)r4r�rr�a]Deprecated alias to builtins.tuple.

    Tuple[X, Y] is the cross-product type of X and Y.

    Example: Tuple[T1, T2] is a tuple of two elements corresponding
    to type variables T1 and T2.  Tuple[int, float, str] is a tuple
    of an int, a float and a string.

    To specify a variable-length tuple of homogeneous type, use Tuple[T, ...].
    rDrArFrGr"r6rBrCra�Deprecated alias to builtins.type.

    builtins.type or typing.Type can be used to annotate class objects.
    For example, suppose we have the following classes::

        class User: ...  # Abstract base for User classes
        class BasicUser(User): ...
        class ProUser(User): ...
        class TeamUser(User): ...

    And a function that takes a class argument that's a subclass of
    User and returns an instance of the corresponding class::

        def new_user[U](user_class: Type[U]) -> U:
            user = user_class()
            # (Here we could write the user object to a database)
            return user

        joe = new_user(BasicUser)

    At this point the type checker knows that joe has type BasicUser.
    c�(�eZdZ	dZedefd��Zy)r=r�r�c��yr�r�r*s rw�__int__zSupportsInt.__int__�
���ryN)r�r�r�rr�intrr�ryrwr=r=�
s#��2��I��
��
��
ryr=c�(�eZdZ	dZedefd��Zy)r;r�r�c��yr�r�r*s rw�	__float__zSupportsFloat.__float__�
rryN)r�r�r�rr�floatrr�ryrwr;r;�
�#��4��I��
�5�
��
ryr;c�(�eZdZ	dZedefd��Zy)r:r�r�c��yr�r�r*s rw�__complex__zSupportsComplex.__complex__�
rryN)r�r�r�rr�complexrr�ryrwr:r:�
s#��6��I��
�W�
��
ryr:c�(�eZdZ	dZedefd��Zy)r9r�r�c��yr�r�r*s rw�	__bytes__zSupportsBytes.__bytes__�
rryN)r�r�r�rr�bytesrr�ryrwr9r9�
rryr9c�(�eZdZ	dZedefd��Zy)r<r�r�c��yr�r�r*s rw�	__index__zSupportsIndex.__index__�
rryN)r�r�r�rrr
rr�ryrwr<r<�
s#��4��I��
�3�
��
ryr<c�>���d�x�f�G��fd�d��
}t|�S)r�c�2��eZdZW�Z	dZedW�fd��Zy)r8r�r�c��yr�r�r*s rw�__abs__zSupportsAbs.__abs__�
rryN)r�r�r�rfrrr!��.type_paramsr�s��rwr8r8�
s$���W��I��
��
��
ryr8r���
.generic_baser#r�s @@rw�#<generic parameters of SupportsAbs>r&�
s����
�
�X�
ryc�>���d�x�f�G��fd�d��
}t|�S)r�c�8��eZdZW�Z	dZeddedW�fd��Zy)r>r��ndigitsr�c��yr�r�)rr)s  rw�	__round__zSupportsRound.__round__�
rryN�r)r�r�r�rfrrr
r+r"s��rwr>r>�
s+���Y��I��
��
�Q�
��
ryr>r�r$s @@rw�%<generic parameters of SupportsRound>r-�
s����
�
�x�
ryr�c���|D��cgc]\}}|��	}}}|D��cic]\}}|t|d|�d����}}}tj||||��}|x|_|j_|Scc}}wcc}}w)Nzfield z annotation must be a type��defaultsrq)r�r��
namedtuplerjrR)rir�rqr0�nr��fields�nm_tpls        rw�
_make_nmtupler5�
s���!�
"�E�D�A�q�a�E�F�
"��
 ����A���A���s�*D�E�F�
F��
�
 �
�
#�
#�D�&�-5�f�F�F�>C�C�F��V�^�^�;��M��
#��
 s
�A+�A1>
�_makerR�_asdict�_fields�_sourcer�_replacer�__getnewargs__�_field_defaults>r�r�rjc��eZdZd�Zy)�NamedTupleMetac��|D]}|tus�|tus�td��td�|D��}|j	di�}g}|D]M}||vr|j|��|s�td|�dt
|�dkDrdnd�d	d
j|�����t||j�|D�cgc]}||��	c}|d��}	||	_
t|vrt}
t|
�|	_
|D]@}|tvrtd
|z��|t vs�"||	j"vs�1t%|	|||��Bt|vr|	j'�|	Scc}w)Nz3can only inherit from a NamedTuple type and Genericc3�<K�|]}|turtn|���y�wr�)�_NamedTupler�)r�r�s  rwr�z)NamedTupleMeta.__new__.<locals>.<genexpr>�
s����O���t�{�2�e��<����rjzNon-default namedtuple field z cannot follow default fieldrg�sr�� r�r�r/z&Cannot overwrite NamedTuple attribute )rArrr�r�r�r�r�r5r�r�r��classmethodrl�_prohibitedr�_specialr8r�r)r��typenamer$�nsr�r��
default_names�
field_namer2r4�
class_getitemr�s            rwrRzNamedTupleMeta.__new__�
s~���D��;�&�4�w�+>��I�K�K���O��O�O�����(�"�-���
��J��R���$�$�Z�0���"?�
�|�L>�*-�m�*<�q�*@�3�b�"I��#'�9�9�]�#;�"<�!>�?�?�	 ��x������8E�(F�
�1��A��
�(F�&(��&6�8��!����e��2�M�'2�=�'A�F�$��C��k�!�$�%M�PS�%S�T�T��H�$��F�N�N�)B����R��W�-�	�
�e���$�$�&��
��)Gs�6EN)r�r�r�rRr�ryrwr>r>�
s�� ryr>c��	|�|j�}n
|rtd��t||t���}tf|_|S)NzIEither list of fields or keywords can be provided to NamedTuple, not both�rq)r�rr5r�rHr�)rHr3rT�nts    rwrHrHsP���&�~������	��C�D�	D�	�x���	�	:�B�#�
�B��
�IryrHc��tfSr�)rA�r$s rw�_namedtuple_mro_entriesrR;s
���>�ryc�"�eZdZdd�ZeZd�ZeZy)r�c
���	|D]'}t|�tus�|tus�td��t	d�|D��rtf}nd}tjt|g|�t��|�}t|d�s||_i}|jdi�}	d}
|	j�D��cic]\}}|t||
|j���� }	}}t�}
t�}|D]�}|j|jjdi��|jjdt��}|
|z}
||z}|jjd	t��}|
|z}
||z}��|j|	�|	j�D]�\}}t!|�}|t"urt%|�}|r|d
}t!|�}|t&urd}n
|t(urd}n|}|r#|
j+|�|j-|��s|j+|�|
j-|���||_t1|
�|_t1|�|_t|d
�s||_|Scc}}w)NzHcannot inherit from both a TypedDict type and a non-TypedDict base classc3�<K�|]}t|t����y�wr�)r�rr�s  rwr�z)_TypedDictMeta.__new__.<locals>.<genexpr>Ps����5�u�!�z�!�W�%�u�rBr�r�rjz?TypedDict('Name', {f0: t0, f1: t1, ...}); each t must be a typerN�__required_keys__�__optional_keys__rTF�	__total__)rsr�rrr�rRr�r�r�r�r�r�r�r��updater�rXrrWrerbrs�discardrjrMrVrWrX)r�rir$rI�totalr��generic_base�tp_dictru�own_annotationsr�r2r��
required_keys�
optional_keys�
base_required�
base_optional�annotation_key�annotation_type�annotation_origin�annotation_args�is_requireds                      rwrRz_TypedDictMeta.__new__Cst��	��D��D�z��/�D��4G��!A�B�B��
�5�u�5�5�#�:�L��L��,�,�~�t�5J�|�5J�T�5J�B�O���w� 0�1�%*�G�"����&�&�!2�B�7��O��)�.�.�0�
�0���2�
�{�2�s�7�+=�+=�>�>�0�	�
���
���
��D����t�}�}�0�0�1B�B�G�H� �M�M�-�-�.A�3�5�I�M��]�*�M��]�*�M� �M�M�-�-�.A�3�5�I�M��]�*�M��]�*�M��	���?�+�/>�/D�/D�/F�+�N�O� *�?� ;�� �I�-�"*�?�";��"�&5�a�&8�O�(2�?�(C�%� �H�,�"��"�k�1�#��#����!�!�.�1��%�%�n�5��!�!�.�1��%�%�n�5�)0G�4#.���$-�m�$<��!�$-�m�$<��!��w��,� %�G�����e
s�+#I'c��td��)Nz4TypedDict does not support instance and class checksr)r�r5s  rwrAz _TypedDictMeta.__subclasscheck__�s���N�O�OryN)T)r�r�r�rRr�r1rAr=r�ryrwr�r�Bs��L�\�H�P�*�ryr��r[c���	|�|}n
|rtd��|rtjdtd��dt	|�i}t�}|�||d<t
|d||��}tf|_|S)	Nz@TypedDict takes either a dict or keyword arguments, but not bothz�The kwargs-based syntax for TypedDict definitions is deprecated in Python 3.11, will be removed in Python 3.13, and may not be understood by third-party type checkers.r���
stacklevelrjr�r�ri)	rr6�warn�DeprecationWarningr�r�r�rIr�)rHr3r[rTrIrq�tds       rwrIrI�s���-�\�~���	��(�)�	)�
��
�
�
7�
��	
��T�&�\�	*�B�
�Y�F�
��!��<��	��"�b��	6�B�"��B��
�IryrIc��tfSr�)�
_TypedDictrQs rw�<lambda>rr�s��:�-ryc�P�	t||j�d��}t||f�S�Nz accepts only a single type.�r�rr}r_s   rwrere�s0���$�z�d�j�j�\�1M�#N�O�D����w�'�'ryc�P�	t||j�d��}t||f�Srtrur_s   rwrbrb�s0����z�d�j�j�\�1M�#N�O�D����w�'�'ryc�6�eZdZ	eZd�Zd�Zd�Zd�Zd�Z	d�Z
y)r^c��||_d|vr|jd�d}||_||_t	�}|dk7r||_yy)Nr|r��typing)r��
rpartitionr��
__supertype__r�r�)rrir��def_mods    rwrzNewType.__init__(sN�� ����$�;��?�?�3�'��+�D���
�����)���h��%�D�O�ryc�:��|j�G�fd�d�}|fS)Nc���eZdZ�fd�Zy)�&NewType.__mro_entries__.<locals>.Dummyc	�F��|j}td|�d|�d��d���)NzGCannot subclass an instance of NewType. Perhaps you were looking for: `z = NewType(r�z)`)r�r)r��
subclass_name�superclass_names  �rwrz8NewType.__mro_entries__.<locals>.Dummy.__init_subclass__8s:��� #���
���%��k�-�1B�"�_�DU�UW�Y��ryN)r�r�r�r)r�s�rw�Dummyr7s���
ryr�r�)rr$r�r�s   @rwr%zNewType.__mro_entries__2s!����-�-��	�	��x�ryc�8�|j�d|j��S)Nr|)r�r�r*s rwr+zNewType.__repr__As���/�/�"�!�D�$5�$5�#6�7�7ryc��|jSr�)r�r*s rwr.zNewType.__reduce__Ds��� � � ryc��t||fSr�r3r4s  rwr6zNewType.__or__Gr7ryc��t||fSr�r3r4s  rwr9zNewType.__ror__Jr:ryN)r�r�r�r
r1rr%r+r.r6r9r�ryrwr^r^s,���*�H�&�
�8�!�"�"ryr^c��eZdZ	dZeedefd���Zeedefd���Zed d��Z	eede
fd���Zedefd��Z
ed d	��Zede
fd
��Zed!dedefd��Zede
fd
��Zed!dedefd��Zed!dedeefd��Zed"dededefd��Zede
fd��Zedefd��Zed#dedefd��Zede
fd��Zededefd��Zedeeddfd��Zed$d��Zed d��Zy)%rLr�r�c��yr�r�r*s rw�modezIO.modee���	
ryc��yr�r�r*s rwrizIO.namejr�ryNc��yr�r�r*s rw�closezIO.closeorryc��yr�r�r*s rw�closedz	IO.closedsr�ryc��yr�r�r*s rw�filenoz	IO.filenoxrryc��yr�r�r*s rw�flushzIO.flush|rryc��yr�r�r*s rw�isattyz	IO.isatty�rryr2c��yr�r�)rr2s  rw�readzIO.read�rryc��yr�r�r*s rw�readablezIO.readable�rry�limitc��yr�r�)rr�s  rw�readlinezIO.readline�rry�hintc��yr�r�)rr�s  rw�	readlineszIO.readlines�rry�offset�whencec��yr�r�)rr�r�s   rw�seekzIO.seek�rryc��yr�r�r*s rw�seekablezIO.seekable�rryc��yr�r�r*s rw�tellzIO.tell�rry�sizec��yr�r�)rr�s  rw�truncatezIO.truncate�rryc��yr�r�r*s rw�writablezIO.writable�rryrCc��yr�r��rrCs  rw�writezIO.write�rry�linesc��yr�r�)rr�s  rw�
writelinesz
IO.writelines�rryc��yr�r�r*s rw�	__enter__zIO.__enter__�rryc��yr�r�)rrsr��	tracebacks    rw�__exit__zIO.__exit__�rry)r�N)r�r,r�)r�z
IO[AnyStr])r�r�r�rrcrrur�rir��boolr�r
r�r�r�rPr�r�r�rDr�r�r�r�r�r�r�r�r�r�r�ryrwrLrLVsd��
��I�
��
�c�
���
���
�c�
���
��
��
���
��
���
��
��
��
��
��
��
��
��
��
�c�
�6�
��
��
�$�
��
��
�c�
�6�
��
��
�c�
�4��<�
��
��
�3�
��
�C�
��
��
�$�
��
��
�c�
��
��
�S�
�C�
��
��
�$�
��
��
�v�
�#�
��
��
��V��
��
��
��
��
��
��
ryrLc�H�eZdZ	dZedeeefdefd��Z	edd��Z
y)rKr�rCr�c��yr�r�r�s  rwr�zBinaryIO.write�rryc��yr�r�r*s rwr�zBinaryIO.__enter__�rryN)r�rK)r�r�r�rrrr�	bytearrayr
r�r�r�ryrwrKrK�sH��?��I��
�u�U�I�-�.�
�3�
��
��
��
ryrKc���eZdZ	dZeedefd���Zeedefd���Z	eede
efd���Zeedefd���Z
eedefd���Zed
d��Zy	)rOr�r�c��yr�r�r*s rw�bufferz
TextIO.buffer�r�ryc��yr�r�r*s rw�encodingzTextIO.encoding�r�ryc��yr�r�r*s rw�errorsz
TextIO.errors�r�ryc��yr�r�r*s rw�line_bufferingzTextIO.line_buffering�r�ryc��yr�r�r*s rw�newlineszTextIO.newlines�r�ryc��yr�r�r*s rwr�zTextIO.__enter__�rryN)r�rO)r�r�r�rrcrrKr�rur�rr�r�r�rr�r�r�ryrwrOrO�s���=��I�
��
��
���
���
�#�
���
���
���
�
���
���
��
���
���
�#�
���
��
��
ryrOc���eZdZ�fd�Z�xZS)�_DeprecatedTypec���|dvrD||jvr6tj|j�d|j�d�td��t
�|�|�S)N>rr�r�z5 is deprecated, import directly from typing instead. z  will be removed in Python 3.13.r�rk)r�r6rmr�rnrK�__getattribute__)r�rirLs  �rwr�z _DeprecatedType.__getattribute__�s^����<�<�����AU��M�M��<�<�.�!(�(+���~�6"�"�#��
��w�'��-�-ry)r�r�r�r�rNrOs@rwr�r��s
���	.�	.ryr�c�"�eZdZ	gd�ZeZeZeZy)�io)rLrOrKN)r�r�r��__all__rLrOrKr�ryrwr�r��s��3�*�G�	�B�
�F��Hryr�z.ioc��eZdZ	ddgZeZeZy)�rerNrMN)r�r�r�r�rNrMr�ryrwr�r�
s��0��'�"�G��G��Eryr�z.rec� �d�x}fd|d|fd�c�S)r�r�r�c�j�	tdt|�j��tj��|S)NzRuntime type is )�file)�printrsr�r��stderrr�s rwrfrf
s/��
�
��T�#�Y�/�/�2�
3�#�*�*�E��Jryr�)�	.defaultsr�s  rw�#<generic parameters of reveal_type>r�
s�������ryc�*��eZdZW��fd��Z�Zy)�_IdentityCallablec�"��d�x}fd|d|fd�c�S)r�rvr�c��yr�r�r�s  rwr1z_IdentityCallable.__call__&
s��ryr�)r�r��
__classdict__s  �rwz <generic parameters of __call__>z2_IdentityCallable.<generic parameters of __call__>&
s�����q���ryN)r�r�r�r1�__classdictcell__)r�s@rwr�r�%
s
����ryr�)�
eq_default�
order_default�kw_only_default�frozen_default�field_specifiersr�r�r�r�r�.rTc�(�������	������fd�}|S)Nc�$��������d�|_|S)N)r�r�r�r�r�rT)�__dataclass_transform__)�	cls_or_fnr�r�r�r�rTr�s ������rwr�z&dataclass_transform.<locals>.decoratorq
s'���$�*�.�,� 0��
-
�	�)��ryr�)r�r�r�r�r�rTr�s`````` rwrUrU*
s���=�|	�	��ry�_Funcc� �tdtfSr�)rrr�ryrwr�r�~
s��X�c�3�h�
�ryc�$�dd��x}fd|d|fd�c�S)�Fc��tSr�)r�r�ryrwr�r��
s���Xry�methodr�c�D�		d|_|S#ttf$rY|SwxYwrR)�__override__rr)r�s rwrdrd�
s;���0
�"����M��
�I�&�
�	
��M�
�r�r�)r�r�s  rw� <generic parameters of override>r��
s��X� �q� �� ryr�r�)rg�__main__)r�)NNF)r�)�r�rrr�r�collections.abc�copyregr�r�rr��	stdlib_rer�r�r6rrrr	�_typingr
rrr
rrrrr�rxr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�rMr�rrr�rFrsrIrrar]rhr\rrrrnrrrkrrlrr�r�r�r�r�r�r�r�r�r�r�r�r}r"r1r9r=rEr�rsr�r�rmr\r�_TYPING_INTERNALS�_SPECIAL_NAMESrrrvrxr�r�r�r�r�r�r�r��pickler�r�rEr�rr�rrgrSrQr��BuiltinFunctionTyper�r�r�rZr�rXrWr[r�rRr_r`r��partialr�r�rcrYrTrVr�r�r�r�rrrrrrurP�_aliasr#r0r3r2r1r%r&r7r.r!r4rrrFrr,r(r*r-r+r r�rr�rD�dequerAr�rGr)r'r$r/r�r"r�r6rBrCrEr@r?rJr5rr=r;r:r9r<r8r>r5rFrGr>rHrRrArRr%r�rIrqrerbr^rirjrLrKrOr�r�r�r�rNrMrfr�rUr�rdr�ryrw�<module>r�s����*(��#�������
���^�^�	�	�	�o��l�5���PU��B@�
�0�2�B
<��16�/��	�
A� �
�	�
���U��>%
�)�+�%
�PF�F���((/�6�<�t�(/�V0�,�d�0�	"�t�	"�$�H�$�$�4��4�(�4��4�0�4��4�&�4��4�4�(��(�*�(��(�*�)0��)0�V��"��"�
�
���2���2�B�
4��
4� �6��6�2�1(��1(�heD��t�eD�PF��F��F�
O��O��O����"�J���-&��-&�`#&�L9�BT��d�BT�`V�%�T�V�z)!�<�):�$�)!�X/�2�$�/�2�L�-�t�2�"&�(��&�B&�%�T�&�"#��}�D�"#�J.�D�=��D�)�}�D�)��/:��/:�d:�-�t�:�:3�3���������(�.�8�<U�;V�V���"(�:	�8��,�-J�K���������
���*�6�6�7�/�����}�n�-�3������ 0�1��$�S�G�S�l
��
��.24�w�-�24�j1"�l�M��1"�hK
�K
�\'�T�
� �$�$�e�&?�&?��"�"�E�$4�$4�'�):�<P�R��
a]�H
�2�<�4*�$!$��O�e�O�5�O�2!�H�:�!�!2��!2�!2�;��!E�F��&�R	3��
!
�N�C�L���T�]���T�]���v��&���v��&����4�(���:�T�2����4�t�4��

��5�#�	&��
���+�/�/�*�*�A�.���;�?�?�,�,�a�0�	��;�?�?�,�,�a�0�	��{���4�4�a�8�
��{���4�4�a�8�
��+�/�/�*�*�A�.���+�/�/�*�*�A�.��
�K�O�O�.�.��
2�
��{���$�$�a�(���;�?�?�,�,�a�0�	�
�K�O�O�.�.��
2�
�����1�1�1�5���	���[�_�_�(�(�!�-�@��
�K�O�O�.�.��
2�
�
����(�(�!�
,������6�6��:���+�/�/�*�*�A�.������8�8�!�<��
$��O�O����7��
�	�5�"�5�w�7��	��
��d�A�E��/���{� � �!�'�2���S�!�%�e�,���9�a�e�+�>�	��[�_�_�0�0�!�4���+�/�/�*�*�A�.���;�?�?�,�,�a�0�	�
�K�O�O�.�.��
2�
��
�9�9�1�CS�T���Z�C�C�Q�Mb�c��
�d�A�E��/���[�,�,�a�m�D���[�,�,�a�0��
��$�$�a�
(���+�&�&��*���;�?�?�,�,�a�0�	�����6�6��:��
�d�A�E��/�����2�
�(�
��
��
�H�
��
��
�h�
��
��
�H�
��
��
�H�
��
��
��
��
��
���D�E���B�C��!�T�!�H�:�l�l�>�<��R�@���5�
��U*�T�U*�pE��E�N�\�\�.�+�r�2�
>�
�7�	���(��(�.�(��(�$;"�;"�~���
�`
����`
�F
�r�%�y�
� 
�R��W� 
�F
.�d�
.��?�����������B�K�K��
��"�"�A�
&���y����"���?�����������B�K�K���&�����!� �CE�
Q��Q��Q��	Q�
�Q��D��I���c��(:�:�C�?�@�
Q��Q��Q�h � � ry

?>