
    i q                       d dl mZ d dlZd dlZd dlZd dlZd dlmZ d dlm	Z	m
Z
mZmZmZmZmZ 	 d dlmZ 	 d dlmZ d dlZd d
lmZmZmZ ddlmZm Z! ddl"m#Z#m$Z$ ddl%m&Z&m'Z'm(Z)m*Z+m,Z- dZ.d Z/ G d dej`                        Z G d de      Z1 G d de      Z2 G d de      Z3 G d de      Z4 G d de      Z5 G d de      Z6 G d d e      Z7 G d! d"e      Z8 G d# d$e      Z9 G d% d&e      Z: G d' d(e      Z; G d) d*e      Z< G d+ d,e      Z= G d- d.e      Z> G d/ d0e      Z? G d1 d2e      Z@ G d3 d4e      ZA G d5 d6e      ZB G d7 d8e      ZC G d9 d:e      ZD G d; d<e      ZE G d= de      Z G d> d?e      ZF G d@ dAeF      ZG G dB dCeF      ZH G dD dEeF      ZI G dF dGeF      ZJ G dH dIe      ZK G dJ dKe      ZL G dL dMej`                        ZM G dN dOe      ZN G dP dQe      ZO G dR dSe      ZP G dT dUe      ZQdadVZRdbdWZSdX ZTdY ZUdZ ZVd[ ZWd\ ZXd] ZYd^ ZZ G d_ d`      Z[y# e$ r  eddi       ZY w xY w# e$ r  ed	di       ZY w xY w)c    )annotationsN)Iterable)AnyFinalLiteralTupleTypeTypeVarUnion)	UnionTyper    )TypeAliasTyper   )	NODEFAULTUNSET	UnsetType   )Factoryto_builtins)	is_structis_struct_type)_CONCRETE_TYPES_AnnotatedAliasget_class_annotationsget_dataclass_infoget_typeddict_info)'	type_infomulti_type_infor	   MetadataAnyTypeNoneTypeBoolTypeIntType	FloatTypeStrType	BytesTypeByteArrayTypeMemoryViewTypeDateTimeTypeTimeTypeDateTypeTimeDeltaTypeUUIDTypeDecimalTypeExtTypeRawTypeEnumTypeLiteralType
CustomTyper   CollectionTypeListTypeSetTypeFrozenSetTypeVarTupleType	TupleTypeDictTypeFieldTypedDictTypeNamedTupleTypeDataclassType
StructTyper   r   c                     t         S N)__all__r       B/root/searxng-venv/lib/python3.12/site-packages/msgspec/inspect.py__dir__rD   W   s    NrB   c                      e Zd ZdZy)r	   zThe base Type.N__name__
__module____qualname____doc__r   rB   rC   r	   r	   [   s    rB   r	   c                  8    e Zd ZU dZded<   dZded<   dZded<   y)r   a_  A type wrapping a subtype with additional metadata.

    Parameters
    ----------
    type: Type
        The subtype.
    extra_json_schema: dict, optional
        A dict of extra fields to set for the subtype when generating a
        json-schema.
    extra: dict, optional
        A dict of extra user-defined metadata attached to the subtype.
    r	   typeNzUnion[dict, None]extra_json_schemaextra)rG   rH   rI   rJ   __annotations__rM   rN   r   rB   rC   r   r   _   s%     J+/(/#E#rB   r   c                      e Zd ZdZy)r   z%A type corresponding to `typing.Any`.NrF   r   rB   rC   r   r   r   s    /rB   r   c                      e Zd ZdZy)r    zA type corresponding to `None`.NrF   r   rB   rC   r    r    v       )rB   r    c                      e Zd ZdZy)r!   zA type corresponding to `bool`.NrF   r   rB   rC   r!   r!   z   rR   rB   r!   c                  X    e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dZ	ded<   y)	r"   a6  A type corresponding to `int`.

    Parameters
    ----------
    gt: int, optional
        If set, an instance of this type must be greater than ``gt``.
    ge: int, optional
        If set, an instance of this type must be greater than or equal to ``ge``.
    lt: int, optional
        If set, an instance of this type must be less than to ``lt``.
    le: int, optional
        If set, an instance of this type must be less than or equal to ``le``.
    multiple_of: int, optional
        If set, an instance of this type must be a multiple of ``multiple_of``.
    NUnion[int, None]gtgeltlemultiple_of
rG   rH   rI   rJ   rV   rO   rW   rX   rY   rZ   r   rB   rC   r"   r"   ~   s@       BBBB$(K!(rB   r"   c                  X    e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dZ	ded<   y)	r#   aB  A type corresponding to `float`.

    Parameters
    ----------
    gt: float, optional
        If set, an instance of this type must be greater than ``gt``.
    ge: float, optional
        If set, an instance of this type must be greater than or equal to ``ge``.
    lt: float, optional
        If set, an instance of this type must be less than to ``lt``.
    le: float, optional
        If set, an instance of this type must be less than or equal to ``le``.
    multiple_of: float, optional
        If set, an instance of this type must be a multiple of ``multiple_of``.
    NzUnion[float, None]rV   rW   rX   rY   rZ   r[   r   rB   rC   r#   r#      s@      "B!!B!!B!!B!&*K#*rB   r#   c                  <    e Zd ZU dZdZded<   dZded<   dZded<   y)r$   a  A type corresponding to `str`.

    Parameters
    ----------
    min_length: int, optional
        If set, an instance of this type must have length greater than or equal
        to ``min_length``.
    max_length: int, optional
        If set, an instance of this type must have length less than or equal
        to ``max_length``.
    pattern: str, optional
        If set, an instance of this type must match against this regex pattern.
        Note that the pattern is treated as **unanchored**.
    NrU   
min_length
max_lengthUnion[str, None]pattern)rG   rH   rI   rJ   r^   rO   r_   ra   r   rB   rC   r$   r$      s*     $(J '#'J ' $G$rB   r$   c                  .    e Zd ZU dZdZded<   dZded<   y)r%   aS  A type corresponding to `bytes`.

    Parameters
    ----------
    min_length: int, optional
        If set, an instance of this type must have length greater than or equal
        to ``min_length``.
    max_length: int, optional
        If set, an instance of this type must have length less than or equal
        to ``max_length``.
    NrU   r^   r_   rG   rH   rI   rJ   r^   rO   r_   r   rB   rC   r%   r%          
 $(J '#'J 'rB   r%   c                  .    e Zd ZU dZdZded<   dZded<   y)r&   aW  A type corresponding to `bytearray`.

    Parameters
    ----------
    min_length: int, optional
        If set, an instance of this type must have length greater than or equal
        to ``min_length``.
    max_length: int, optional
        If set, an instance of this type must have length less than or equal
        to ``max_length``.
    NrU   r^   r_   rc   r   rB   rC   r&   r&      rd   rB   r&   c                  .    e Zd ZU dZdZded<   dZded<   y)r'   aX  A type corresponding to `memoryview`.

    Parameters
    ----------
    min_length: int, optional
        If set, an instance of this type must have length greater than or equal
        to ``min_length``.
    max_length: int, optional
        If set, an instance of this type must have length less than or equal
        to ``max_length``.
    NrU   r^   r_   rc   r   rB   rC   r'   r'      rd   rB   r'   c                       e Zd ZU dZdZded<   y)r(   a{  A type corresponding to `datetime.datetime`.

    Parameters
    ----------
    tz: bool
        The timezone-requirements for an instance of this type. ``True``
        indicates a timezone-aware value is required, ``False`` indicates a
        timezone-naive value is required. The default is ``None``, which
        accepts either timezone-aware or timezone-naive values.
    NUnion[bool, None]tzrG   rH   rI   rJ   ri   rO   r   rB   rC   r(   r(          	 !B rB   r(   c                       e Zd ZU dZdZded<   y)r)   aw  A type corresponding to `datetime.time`.

    Parameters
    ----------
    tz: bool
        The timezone-requirements for an instance of this type. ``True``
        indicates a timezone-aware value is required, ``False`` indicates a
        timezone-aware value is required. The default is ``None``, which
        accepts either timezone-aware or timezone-naive values.
    Nrh   ri   rj   r   rB   rC   r)   r)     rk   rB   r)   c                      e Zd ZdZy)r*   z(A type corresponding to `datetime.date`.NrF   r   rB   rC   r*   r*     s    2rB   r*   c                      e Zd ZdZy)r+   z-A type corresponding to `datetime.timedelta`.NrF   r   rB   rC   r+   r+     s    7rB   r+   c                      e Zd ZdZy)r,   z$A type corresponding to `uuid.UUID`.NrF   r   rB   rC   r,   r,     s    .rB   r,   c                      e Zd ZdZy)r-   z*A type corresponding to `decimal.Decimal`.NrF   r   rB   rC   r-   r-      s    4rB   r-   c                      e Zd ZdZy)r.   z.A type corresponding to `msgspec.msgpack.Ext`.NrF   r   rB   rC   r.   r.   $  s    8rB   r.   c                      e Zd ZdZy)r/   z&A type corresponding to `msgspec.Raw`.NrF   r   rB   rC   r/   r/   (  s    0rB   r/   c                      e Zd ZU dZded<   y)r0   zA type corresponding to an `enum.Enum` type.

    Parameters
    ----------
    cls: type
        The corresponding `enum.Enum` type.
    ztyping_Type[enum.Enum]clsNrG   rH   rI   rJ   rO   r   rB   rC   r0   r0   ,  s     
 rB   r0   c                      e Zd ZU dZded<   y)r1   zA type corresponding to a `typing.Literal` type.

    Parameters
    ----------
    values: tuple
        A tuple of possible values for this literal instance. Only `str` or
        `int` literals are supported.
    z'Union[Tuple[str, ...], Tuple[int, ...]]valuesNru   r   rB   rC   r1   r1   8  s     43rB   r1   c                      e Zd ZU dZded<   y)r2   zgA custom type.

    Parameters
    ----------
    cls: type
        The corresponding custom type.
    rL   rt   Nru   r   rB   rC   r2   r2   E  s     
IrB   r2   c                  .    e Zd ZU dZded<   edd       Zy)r   zA union type.

    Parameters
    ----------
    types: Tuple[Type, ...]
        A tuple of possible types for this union.
    Tuple[Type, ...]typesc                :    t        d | j                  D              S )zAA helper for checking whether ``None`` is included in this union.c              3  <   K   | ]  }t        |t                y wr@   )
isinstancer    ).0ts     rC   	<genexpr>z*UnionType.includes_none.<locals>.<genexpr>_  s     ?q:a*?s   )anyr{   )selfs    rC   includes_nonezUnionType.includes_none\  s     ?DJJ???rB   N)returnbool)rG   rH   rI   rJ   rO   propertyr   r   rB   rC   r   r   Q  s#     @ @rB   c                  8    e Zd ZU dZded<   dZded<   dZded<   y)r3   a  A collection type.

    This is the base type shared by collection types like `ListType`,
    `SetType`, etc.

    Parameters
    ----------
    item_type: Type
        The item type.
    min_length: int, optional
        If set, an instance of this type must have length greater than or equal
        to ``min_length``.
    max_length: int, optional
        If set, an instance of this type must have length less than or equal
        to ``max_length``.
    r	   	item_typeNrU   r^   r_   rG   rH   rI   rJ   rO   r^   r_   r   rB   rC   r3   r3   b  s$    " O#'J '#'J 'rB   r3   c                      e Zd ZdZy)r4   a  A type corresponding to a `list`.

    Parameters
    ----------
    item_type: Type
        The item type.
    min_length: int, optional
        If set, an instance of this type must have length greater than or equal
        to ``min_length``.
    max_length: int, optional
        If set, an instance of this type must have length less than or equal
        to ``max_length``.
    NrF   r   rB   rC   r4   r4   y      rB   r4   c                      e Zd ZdZy)r7   a  A type corresponding to a variadic `tuple`.

    Parameters
    ----------
    item_type: Type
        The item type.
    min_length: int, optional
        If set, an instance of this type must have length greater than or equal
        to ``min_length``.
    max_length: int, optional
        If set, an instance of this type must have length less than or equal
        to ``max_length``.
    NrF   r   rB   rC   r7   r7     r   rB   r7   c                      e Zd ZdZy)r5   a~  A type corresponding to a `set`.

    Parameters
    ----------
    item_type: Type
        The item type.
    min_length: int, optional
        If set, an instance of this type must have length greater than or equal
        to ``min_length``.
    max_length: int, optional
        If set, an instance of this type must have length less than or equal
        to ``max_length``.
    NrF   r   rB   rC   r5   r5     r   rB   r5   c                      e Zd ZdZy)r6   a  A type corresponding to a `frozenset`.

    Parameters
    ----------
    item_type: Type
        The item type.
    min_length: int, optional
        If set, an instance of this type must have length greater than or equal
        to ``min_length``.
    max_length: int, optional
        If set, an instance of this type must have length less than or equal
        to ``max_length``.
    NrF   r   rB   rC   r6   r6     r   rB   r6   c                      e Zd ZU dZded<   y)r8   zA type corresponding to `tuple`.

    Parameters
    ----------
    item_types: Tuple[Type, ...]
        A tuple of types for each element in the tuple.
    rz   
item_typesNru   r   rB   rC   r8   r8     s     ! rB   r8   c                  B    e Zd ZU dZded<   ded<   dZded<   dZded<   y)	r9   a  A type corresponding to `dict`.

    Parameters
    ----------
    key_type: Type
        The key type.
    value_type: Type
        The value type.
    min_length: int, optional
        If set, an instance of this type must have length greater than or equal
        to ``min_length``.
    max_length: int, optional
        If set, an instance of this type must have length less than or equal
        to ``max_length``.
    r	   key_type
value_typeNrU   r^   r_   r   r   rB   rC   r9   r9     s*      N#'J '#'J 'rB   r9   c                      e Zd ZU dZded<   ded<   ded<   dZded	<    ej                  d
       Zded<    ej                  d       Z	ded<   y)r:   am  A record describing a field in an object-like type.

    Parameters
    ----------
    name: str
        The field name as seen by Python code (e.g. ``field_one``).
    encode_name: str
        The name used when encoding/decoding the field. This may differ if
        the field is renamed (e.g. ``fieldOne``).
    type: Type
        The field type.
    required: bool, optional
        Whether the field is required. Note that if `required` is False doesn't
        necessarily mean that `default` or `default_factory` will be set -
        optional fields may exist with no default value.
    default: Any, optional
        A default value for the field. Will be `NODEFAULT` if no default value
        is set.
    default_factory: Any, optional
        A callable that creates a default value for the field. Will be
        `NODEFAULT` if no ``default_factory`` is set.
    strnameencode_namer	   rL   Tr   requiredc                     t         S r@   r   r   rB   rC   <lambda>zField.<lambda>  s     rB   )default_factoryr   defaultc                     t         S r@   r   r   rB   rC   r   zField.<lambda>  s     rB   r   N)
rG   rH   rI   rJ   rO   r   msgspecfieldr   r   r   rB   rC   r:   r:     sO    . I
JHd 7==1BCGSC(7==9JKOSKrB   r:   c                  &    e Zd ZU dZded<   ded<   y)r;   zA type corresponding to a `typing.TypedDict` type.

    Parameters
    ----------
    cls: type
        The corresponding TypedDict type.
    fields: Tuple[Field, ...]
        A tuple of fields in the TypedDict.
    rL   rt   Tuple[Field, ...]fieldsNru   r   rB   rC   r;   r;          
IrB   r;   c                  &    e Zd ZU dZded<   ded<   y)r<   zA type corresponding to a `typing.NamedTuple` type.

    Parameters
    ----------
    cls: type
        The corresponding NamedTuple type.
    fields: Tuple[Field, ...]
        A tuple of fields in the NamedTuple.
    rL   rt   r   r   Nru   r   rB   rC   r<   r<     r   rB   r<   c                  &    e Zd ZU dZded<   ded<   y)r=   zA type corresponding to a `dataclasses` or `attrs` type.

    Parameters
    ----------
    cls: type
        The corresponding dataclass type.
    fields: Tuple[Field, ...]
        A tuple of fields in the dataclass.
    rL   rt   r   r   Nru   r   rB   rC   r=   r=     r   rB   r=   c                  ^    e Zd ZU dZded<   ded<   dZded<   dZd	ed
<   dZded<   dZded<   y)r>   a  A type corresponding to a `msgspec.Struct` type.

    Parameters
    ----------
    cls: type
        The corresponding Struct type.
    fields: Tuple[Field, ...]
        A tuple of fields in the Struct.
    tag_field: str or None, optional
        If set, the field name used for the tag in a tagged union.
    tag: str, int, or None, optional
        If set, the value used for the tag in a tagged union.
    array_like: bool, optional
        Whether the struct is encoded as an array rather than an object.
    forbid_unknown_fields: bool, optional
        If ``False`` (the default) unknown fields are ignored when decoding. If
        ``True`` any unknown fields will result in an error.
    ztyping_Type[msgspec.Struct]rt   r   r   Nr`   	tag_fieldzUnion[str, int, None]tagFr   
array_likeforbid_unknown_fields)	rG   rH   rI   rJ   rO   r   r   r   r   r   rB   rC   r>   r>   )  s@    & 
%$"&I&!%C	%J"'4'rB   r>   c                4    t        |       j                         S )aY  Get information about multiple msgspec-compatible types.

    Parameters
    ----------
    types: an iterable of types
        The types to get info about.

    Returns
    -------
    tuple[Type, ...]

    Examples
    --------
    >>> msgspec.inspect.multi_type_info([int, float, list[str]])  # doctest: +NORMALIZE_WHITESPACE
    (IntType(gt=None, ge=None, lt=None, le=None, multiple_of=None),
     FloatType(gt=None, ge=None, lt=None, le=None, multiple_of=None),
     ListType(item_type=StrType(min_length=None, max_length=None, pattern=None),
              min_length=None, max_length=None))
    )_Translatorrun)r{   s    rC   r   r   E  s    ( u!!##rB   c                     t        | g      d   S )a  Get information about a msgspec-compatible type.

    Note that if you need to inspect multiple types it's more efficient to call
    `multi_type_info` once with a sequence of types than calling `type_info`
    multiple times.

    Parameters
    ----------
    type: type
        The type to get info about.

    Returns
    -------
    Type

    Examples
    --------
    >>> msgspec.inspect.type_info(bool)
    BoolType()

    >>> msgspec.inspect.type_info(int)
    IntType(gt=None, ge=None, lt=None, le=None, multiple_of=None)

    >>> msgspec.inspect.type_info(list[int])  # doctest: +NORMALIZE_WHITESPACE
    ListType(item_type=IntType(gt=None, ge=None, lt=None, le=None, multiple_of=None),
             min_length=None, max_length=None)
    r   )r   )rL   s    rC   r   r   \  s    8 D6"1%%rB   c                   g }	 	 t        j                  |       }|d }nt        | dd       }|t	        |       t
        u r%|j                  d | j                  D               |} n|t        k(  r| j                  d   } nt	        |      t        u r|j                  | j                     } nYt        | dd       }t        j                  ||      }n6t        | dd       }||} n#t	        |       t        u r| j                  } n| }d }nt	        |      t        u r|j                  }t        }||t        |      fS # t        $ r d }Y 'w xY w)N
__origin__c              3  X   K   | ]"  }t        |      t        j                  u s| $ y wr@   )rL   r   Meta)r   ms     rC   r   z(_origin_args_metadata.<locals>.<genexpr>  s     UaT!W=TUs    **r   __args____supertype__)r   get	TypeErrorgetattrrL   r   extend__metadata__r   r   _TypeAliasType	__value___types_UnionTyper   tuple)r   metadataoriginargs	supertypes        rC   _origin_args_metadatar   |  sH   H
	$((+F
 DL$/Aw/)U1>>UU5JJqMf/$$QZZ0q*d3(,,VV<?D9I$aN*KKC F F|''4x((G  	F	s   D3 3EEc                8    t        |       t        j                  u S r@   )rL   enumEnumMetar   s    rC   _is_enumr     s    7dmm##rB   c                    t        | d      S )N__dataclass_fields__hasattrr   s    rC   _is_dataclassr     s    1,--rB   c                    t        | d      S )N__attrs_attrs__r   r   s    rC   	_is_attrsr     s    1'((rB   c                ^    	 t        | t              xr t        | d      S # t        $ r Y yw xY w)N	__total__F)
issubclassdictr   r   r   s    rC   _is_typeddictr     s2    !T">wq+'>>      	,,c                ^    	 t        | t              xr t        | d      S # t        $ r Y yw xY w)N_fieldsF)r   r   r   r   r   s    rC   _is_namedtupler     s2    !U#=9(== r   c                p   |r| j                         } |j                         D ]  \  }}|| v r| |   }t        |t              r t        |t              rt	        ||      | |<   ?t        |t
        t        f      r1t        |t
        t        f      rt        |      t        |      z   | |<   || |<   || |<    | S r@   )copyitemsr~   r   _merge_jsonlistr   )abkeyb_vala_vals        rC   r   r     s    FFH'') 	JCax#eT*z%/F(6AcFe}5*D%=; "%[4;6AcF"AcF#	 HrB   c                  >    e Zd Zd Zd Zd Zd Z	 	 	 	 	 	 	 	 	 ddZy)r   c                @    t        |      | _        i | _        i | _        y r@   )r   r{   
type_hintscache)r   r{   s     rC   __init__z_Translator.__init__  s    5\

rB   c                x    	 | j                   |   S # t        $ r t        |      x}| j                   |<   |cY S w xY w)z+A cached version of `get_class_annotations`)r   KeyError_get_class_annotations)r   r   outs      rC   r   z"_Translator._get_class_annotations  sB    	??1%% 	'=a'@@C$//!$J	s    %99c                ~     ddl m}  |t         j                            t	         fd j                  D              S )Nr   )MsgpackDecoderc              3  @   K   | ]  }j                  |        y wr@   	translate)r   r   r   s     rC   r   z"_Translator.run.<locals>.<genexpr>  s     ;1T^^A&;   )_corer   r   r{   r   )r   r   s   ` rC   r   z_Translator.run  s,    )uTZZ();

;;;rB   c                   t        |      \  }}}i }i }i }|D ]  }dD ]  }	t        ||	      x}
|
||	<    dD ]  }	t        ||	      x}
|
||	<    |j                  !t        |t	        |j                  d            }|j
                  s|j                  |j
                           | j                  ||fi |}|s|rt        ||xs d |xs d       S |S )N)	rW   rV   rY   rX   rZ   ra   r^   r_   ri   )titledescriptionexamplesT)str_keys)rM   rN   )	r   r   rM   r   _to_builtinsrN   update_translate_innerr   )r   typr   r   r   constrsrM   rN   metaattrvalr   s               rC   r   z_Translator.translate  s    1#64  	)D
 ( #4..C;$'GDM( = 2"4..C;.1%d+2 %%1$/% !7!7$G%! zz%TZZ(/	)2 $d##At7w7 '8'@DQU  
rB   Nc                L    t         u r
t               S t        t              r1j                   j                  j                        S t               S t        d       u r
t               S t        u r
t               S t        u rt        |||||      S t        u rt        |||||      S t        u rt        |	|
|      S t         u rt#        |	|
      S t$        u rt'        |	|
      S t(        u rt+        |	|
      S t,        j,                  u rt/        |      S t,        j0                  u rt3        |      S t,        j4                  u r
t7               S t,        j8                  u r
t;               S t<        j>                  u r
tA               S tB        jD                  u r
tG               S tH        jJ                  u r
tM               S tH        jN                  jP                  u r
tS               S tT        u r,tW        |r j                  |d         n	t               |	|
      S tX        u r,t[        |r j                  |d         n	t               |	|
      S t\        u r,t_        |r j                  |d         n	t               |	|
      S t`        u rq|dk(  rd}|tc        t               |	|
      S te        |      dk(  r'|d	   d
u r tc         j                  |d         |	|
      S tg        ta         fd|D                    S th        u rKtk        |r j                  |d         n	t               |r j                  |d         n	t               |	|
      S tl        u r2ta         fd|D              }te        |      dk(  r|d   S to        |      S tp        u rts        ta        tu        |                  S tw              rty              S t{              r|r|   n}| j|                  v r j|                  |   S j~                  }t        |d|j                  |j                  |j                  |j                        x j|                  |<   } j                  |      te        j                        te        j                        z
  }g }t        j                  j                  t        f|z  j                  z         D ]  \  }}}|t        u rdt        x}}n=t        |t              rdt        }|j                  }nd|t        u rt        n|}t        }t        || j                  |         ||      }|j                  |        ta        |      |_P        |S t              r|r|   n}| j|                  v r j|                  |   S t        |d      x j|                  |<   }t        |      \  ta         fdtu        j                               D              |_P        |S t              st              r|r|   n}| j|                  v r j|                  |   S t        |d      x j|                  |<   }t        |      \  }}}}}t        fte        |      te        |      z
  z  |z   }g }t        ||      D ]p  \  \  }}}}|t        u rdt        x}}n%|rdt        }|}nd|t        u rt        n|}t        }|j                  t        || j                  |      ||             r ta        |      |_P        |S t              ry|r|   n}| j|                  v r j|                  |   S t        |d      x j|                  |<   } j                  |      ta         fdj                  D              |_P        |S t              S )N)rW   rV   rY   rX   rZ   )r^   r_   ra   )r^   r_   )ri   r   )r   r      .c              3  @   K   | ]  }j                  |        y wr@   r   r   r   r   s     rC   r   z/_Translator._translate_inner.<locals>.<genexpr>l  s     &GQt~~a'8&Gr   r   c              3  R   K   | ]  }|t         usj                  |         y wr@   )
_UnsetTyper   r  s     rC   r   z/_Translator._translate_inner.<locals>.<genexpr>u  s!     PqAZ<O*Ps   '')r   r   r   r   TF)r   r   rL   r   r   r   c              3  d   K   | ]'  \  }}t        ||j                  |      |v         ) yw))r   r   rL   r   N)r:   r   )r   r   
field_typer   r   s      rC   r   z/_Translator._translate_inner.<locals>.<genexpr>  sC       %D*  $
3!X-	 s   -0c              3     K   | ]a  }t        ||j                  j                  |t                    |j                  vj                  j                  |t
                      c yw))r   r   rL   r   r   N)r:   r   r   r   _field_defaultsr   )r   r   hintsr   r   s     rC   r   z/_Translator._translate_inner.<locals>.<genexpr>  sf      	   $		$(<=!):)::--11$	B 	s   A'A*)]r   r   r~   r
   	__bound__r   rL   r    r   r!   intr"   floatr#   r   r$   bytesr%   	bytearrayr&   
memoryviewr'   datetimer(   timer)   dater*   	timedeltar+   uuidUUIDr,   decimalDecimalr-   r   Rawr/   msgpackExtr.   r   r4   setr5   	frozensetr6   r   r7   lenr8   r   r9   r   r   r   r1   sortedr   r0   r   r   __struct_config__r>   r   r   r   r   r   __struct_fields____struct_defaults__zip__struct_encode_fields__r   _Factoryfactoryr   r:   appendr   r   r;   _get_typeddict_infor   r   r   r=   _get_dataclass_infor   r<   r   r2   )r   r   r   rW   rV   rY   rX   rZ   ra   r^   r_   ri   rt   configr   nposr   r   r   default_objr   r   r   _infodefaultsr   
is_factoryr  r   s   ``                          @@rC   r   z_Translator._translate_inner  s&    897#{{&~~akk229Y!tDz/:$Y:#XbRB2;OO%ZrbR[QQ#X%*g  %Z
zJJ)^ J:NN*_!ZJOO(###2&&(--r?"(--:($$$ ?"$))^:'//!= '++9'//%%%9$Y+/tAw'WY%% 
 #X+/tAw'WY%% 
 )^ +/tAw'WY%% 
 %Z u}|#I*  TaDHO#NN47+))  !&G$&G!GHH$Y+/tAw'WY+/tAw'WY%%	  %ZPDPPD!$i1n47A)D/A'\uVD\233a[A;A!!D'qCdjj zz#&((F$. **JJ!,,&,&B&B% DJJsOc //4Eq**+c!2G2G.HHDF25##**t#a&;&;;3 %.k;
 )+#H099GoX6$H'G&1&9&9O$H+6%+?i[G&/O +d4%#$3 e$3%6 vCJJ1!!D'qCdjj zz#&$1#r$::DJJsOc1#6OE8  )/u{{}(= CJ J11!!D'qCdjj zz#&$1#r$::DJJsOc&9#&>#AtXq!"D	CM(ABhNHF8;D(8K 4'sJ)+#H099Go$H'G&1O$H+6%+?i[G&/O!$(!^^C0!) '(7	. vCJJA!!D'qCdjj zz#&$23$;;DJJsOc//4E 	 II	 	CJ Ja= rB   )	NNNNNNNNN)rG   rH   rI   r   r   r   r   r   r   rB   rC   r   r     s:    
<'Z Y!rB   r   )r{   zIterable[Any]r   ztuple[Type, ...])rL   r   r   r	   )\
__future__r   r  r  r   r  collections.abcr   typingr   r   r   r   r	   typing_Typer
   r   r{   r   r   	ExceptionrL   r   r   r   r   r   r   r	  r   r   r)  r   r   _typing_utilsr   r   _utilsr   r   r   r   r   r-  r   r,  rA   rD   Structr   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   r7   r5   r6   r8   r9   r:   r;   r<   r=   r>   r   r   r   r   r   r   r   r   r   r   r   rB   rC   <module>r=     s   "     $  1336  = = 5 (V7>> $t $&0d 0*t **t *)d )0+ +0%d %*( ("(D ("(T ("!4 !!t !3t 38D 8/t /5$ 59d 91d 1	 t 	 
4$ 
4	 	@ @"(T (.~  >  n  N  	! 	!(t (.LGNN L@D T D ( (8$.&@))X$.)&W! W!C  1KR01
  3/2r2N3s"   H+ I +H>=H>II