
    ԟfp                       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$m%Z&m'Z(m)Z* dZ+d Z, G d dejZ                        Z G d de      Z. G d de      Z/ G d de      Z0 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 d0 d1e      Z= G d2 d3e      Z> G d4 d5e      Z? G d6 d7e      Z@ G d8 d9e      ZA G d: d;e      ZB G d< de      Z G d= d>e      ZC G d? d@eC      ZD G dA dBeC      ZE G dC dDeC      ZF G dE dFeC      ZG G dG dHe      ZH G dI dJe      ZI G dK dLejZ                        ZJ G dM dNe      ZK G dO dPe      ZL G dQ dRe      ZM G dS dTe      ZNdadUZOdbdVZPdW ZQdX ZRdY ZSdZ ZTd[ ZUd\ ZVd] ZWd^ ZX G d_ d`      ZYy# 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)_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
StructTypec                     t         S N)__all__r       J/var/www/cvtools/html/venv/lib/python3.12/site-packages/msgspec/inspect.py__dir__rB   T   s    Nr@   c                      e Zd ZdZy)r	   zThe base Type.N__name__
__module____qualname____doc__r   r@   rA   r	   r	   X   s    r@   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)rE   rF   rG   rH   __annotations__rK   rL   r   r@   rA   r   r   \   s%     J+/(/#E#r@   r   c                      e Zd ZdZy)r   z%A type corresponding to `typing.Any`.NrD   r   r@   rA   r   r   o   s    /r@   r   c                      e Zd ZdZy)r   zA type corresponding to `None`.NrD   r   r@   rA   r   r   s       )r@   r   c                      e Zd ZdZy)r   zA type corresponding to `bool`.NrD   r   r@   rA   r   r   w   rP   r@   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
rE   rF   rG   rH   rT   rM   rU   rV   rW   rX   r   r@   rA   r    r    {   s@       BBBB$(K!(r@   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]rT   rU   rV   rW   rX   rY   r   r@   rA   r!   r!      s@      "B!!B!!B!!B!&*K#*r@   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**.
    NrS   
min_length
max_lengthUnion[str, None]pattern)rE   rF   rG   rH   r\   rM   r]   r_   r   r@   rA   r"   r"      s*     $(J '#'J ' $G$r@   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``.
    NrS   r\   r]   rE   rF   rG   rH   r\   rM   r]   r   r@   rA   r#   r#          
 $(J '#'J 'r@   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``.
    NrS   r\   r]   ra   r   r@   rA   r$   r$      rb   r@   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``.
    NrS   r\   r]   ra   r   r@   rA   r%   r%      rb   r@   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-aware value is required. The default is ``None``, which
        accepts either timezone-aware or timezone-naive values.
    NUnion[bool, None]tzrE   rF   rG   rH   rg   rM   r   r@   rA   r&   r&          	 !B r@   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.
    Nrf   rg   rh   r   r@   rA   r'   r'     ri   r@   r'   c                      e Zd ZdZy)r(   z(A type corresponding to `datetime.date`.NrD   r   r@   rA   r(   r(     s    2r@   r(   c                      e Zd ZdZy)r)   z-A type corresponding to `datetime.timedelta`.NrD   r   r@   rA   r)   r)     s    7r@   r)   c                      e Zd ZdZy)r*   z$A type corresponding to `uuid.UUID`.NrD   r   r@   rA   r*   r*     s    .r@   r*   c                      e Zd ZdZy)r+   z*A type corresponding to `decimal.Decimal`.NrD   r   r@   rA   r+   r+     s    4r@   r+   c                      e Zd ZdZy)r,   z.A type corresponding to `msgspec.msgpack.Ext`.NrD   r   r@   rA   r,   r,   !  s    8r@   r,   c                      e Zd ZdZy)r-   z&A type corresponding to `msgspec.Raw`.NrD   r   r@   rA   r-   r-   %  s    0r@   r-   c                      e Zd ZU dZded<   y)r.   zA type corresponding to an `enum.Enum` type.

    Parameters
    ----------
    cls: type
        The corresponding `enum.Enum` type.
    ztyping_Type[enum.Enum]clsNrE   rF   rG   rH   rM   r   r@   rA   r.   r.   )  s     
 r@   r.   c                      e Zd ZU dZded<   y)r/   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, ...]]valuesNrs   r   r@   rA   r/   r/   5  s     43r@   r/   c                      e Zd ZU dZded<   y)r0   zgA custom type.

    Parameters
    ----------
    cls: type
        The corresponding custom type.
    rJ   rr   Nrs   r   r@   rA   r0   r0   B  s     
Ir@   r0   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     rA   	<genexpr>z*UnionType.includes_none.<locals>.<genexpr>\  s     ?q:a*?s   )anyry   )selfs    rA   includes_nonezUnionType.includes_noneY  s     ?DJJ???r@   N)returnbool)rE   rF   rG   rH   rM   propertyr   r   r@   rA   r   r   N  s#     @ @r@   c                  8    e Zd ZU dZded<   dZded<   dZded<   y)r1   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_typeNrS   r\   r]   rE   rF   rG   rH   rM   r\   r]   r   r@   rA   r1   r1   _  s$    " O#'J '#'J 'r@   r1   c                      e Zd ZdZy)r2   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``.
    NrD   r   r@   rA   r2   r2   v      r@   r2   c                      e Zd ZdZy)r5   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``.
    NrD   r   r@   rA   r5   r5     r   r@   r5   c                      e Zd ZdZy)r3   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``.
    NrD   r   r@   rA   r3   r3     r   r@   r3   c                      e Zd ZdZy)r4   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``.
    NrD   r   r@   rA   r4   r4     r   r@   r4   c                      e Zd ZU dZded<   y)r6   zA type corresponding to `tuple`.

    Parameters
    ----------
    item_types: Tuple[Type, ...]
        A tuple of types for each element in the tuple.
    rx   
item_typesNrs   r   r@   rA   r6   r6     s     ! r@   r6   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)	r7   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_typeNrS   r\   r]   r   r   r@   rA   r7   r7     s*      N#'J '#'J 'r@   r7   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)r8   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	   rJ   Tr   requiredc                     t         S r>   r   r   r@   rA   <lambda>zField.<lambda>  s     r@   )default_factoryr   defaultc                     t         S r>   r   r   r@   rA   r   zField.<lambda>  s     r@   r   N)
rE   rF   rG   rH   rM   r   msgspecfieldr   r   r   r@   rA   r8   r8     sO    . I
JHd 7==1BCGSC(7==9JKOSKr@   r8   c                  &    e Zd ZU dZded<   ded<   y)r9   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.
    rJ   rr   Tuple[Field, ...]fieldsNrs   r   r@   rA   r9   r9          
Ir@   r9   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.
    rJ   rr   r   r   Nrs   r   r@   rA   r:   r:     r   r@   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.
    rJ   rr   r   r   Nrs   r   r@   rA   r;   r;     r   r@   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]rr   r   r   Nr^   	tag_fieldzUnion[str, int, None]tagFr   
array_likeforbid_unknown_fields)	rE   rF   rG   rH   rM   r   r   r   r   r   r@   rA   r<   r<   &  s@    & 
%$"&I&!%C	%J"'4'r@   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)ry   s    rA   r   r   B  s    ( u!!##r@   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   )rJ   s    rA   r   r   Y  s    8 D6"1%%r@   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>   )rJ   r   Meta)r}   ms     rA   r   z(_origin_args_metadata.<locals>.<genexpr>  s     UaT!W=TUs    **r   __args____supertype__)r   get	TypeErrorgetattrrJ   r   extend__metadata__r   r   _TypeAliasType	__value___types_UnionTyper   tuple)r~   metadataoriginargs	supertypes        rA   _origin_args_metadatar   y  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                J    t        |       t        t        j                        u S r>   )rJ   r   Structr~   s    rA   
_is_structr     s    7d7>>***r@   c                8    t        |       t        j                  u S r>   )rJ   enumEnumMetar   s    rA   _is_enumr     s    7dmm##r@   c                    t        | d      S )N__dataclass_fields__hasattrr   s    rA   _is_dataclassr     s    1,--r@   c                    t        | d      S )N__attrs_attrs__r   r   s    rA   	_is_attrsr     s    1'((r@   c                ^    	 t        | t              xr t        | d      S # t        $ r Y yw xY w)N	__total__F)
issubclassdictr   r   r   s    rA   _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    rA   _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        rA   r   r     s    FFH'') 	JCax#eT*z%/F(6AcFe}5*D%=; "%[4;6AcF"AcF#	 Hr@   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   ry   
type_hintscache)r   ry   s     rA   __init__z_Translator.__init__  s    5\

r@   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      rA   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     rA   r   z"_Translator.run.<locals>.<genexpr>  s     ;1T^^A&;   )_corer   r   ry   r   )r   r   s   ` rA   r   z_Translator.run  s,    )uTZZ();

;;;r@   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)	rU   rT   rW   rV   rX   r_   r\   r]   rg   )titledescriptionexamplesT)str_keys)rK   rL   )	r   r   rK   r   _to_builtinsrL   update_translate_innerr   )r   typr~   r   r   constrsrK   rL   metaattrvalr   s               rA   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  
r@   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)rU   rT   rW   rV   rX   )r\   r]   r_   )r\   r]   )rg   r   )r   r      .c              3  @   K   | ]  }j                  |        y wr>   r   r}   r   r   s     rA   r   z/_Translator._translate_inner.<locals>.<genexpr>m  s     &GQt~~a'8&Gr   r   c              3  R   K   | ]  }|t         usj                  |         y wr>   )
_UnsetTyper   r  s     rA   r   z/_Translator._translate_inner.<locals>.<genexpr>v  s!     PqAZ<O*Ps   '')r   r   r   r   TF)r   r   rJ   r   r   r   c              3  d   K   | ]'  \  }}t        ||j                  |      |v         ) yw))r   r   rJ   r   N)r8   r   )r}   r   
field_typer   r   s      rA   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   rJ   r   r   N)r8   r   r   r   _field_defaultsr   )r}   r   hintsr   r~   s     rA   r   z/_Translator._translate_inner.<locals>.<genexpr>  sf      	   $		$(<=!):)::--11$	B 	s   A'A*)]r   r   r|   r
   	__bound__r   rJ   r   r   r   intr    floatr!   r   r"   bytesr#   	bytearrayr$   
memoryviewr%   datetimer&   timer'   dater(   	timedeltar)   uuidUUIDr*   decimalDecimalr+   r   Rawr-   msgpackExtr,   r   r2   setr3   	frozensetr4   r   r5   lenr6   r   r7   r   r   r   r/   sortedr   r.   r   r   __struct_config__r<   r   r   r   r   r   __struct_fields____struct_defaults__zip__struct_encode_fields__r   _Factoryfactoryr   r8   appendr   r   r9   _get_typeddict_infor   r   r   r;   _get_dataclass_infor   r:   r   r0   )r   r~   r   rU   rT   rW   rV   rX   r_   r\   r]   rg   rr   configr   nposr   r   r   default_objr   r   r   _infodefaultsr   
is_factoryr  r   s   ``                          @@rA   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;]!!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= r@   )	NNNNNNNNN)rE   rF   rG   r   r   r   r   r   r   r@   rA   r   r     s:    
<'Z Y!r@   r   )ry   zIterable[Any]r   ztuple[Type, ...])rJ   r   r   r	   )Z
__future__r   r  r  r   r  collections.abcr   typingr   r   r   r   r	   typing_Typer
   r   ry   r   r   	ExceptionrJ   r   r   r   r   r   r   r
  r   r   r*  r   r   _utilsr   r   r   r   r   r.  r   r-  r?   rB   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r5   r3   r4   r6   r7   r8   r9   r:   r;   r<   r   r   r   r   r   r   r   r   r   r   r   r   r@   rA   <module>r<     s   "     $  1336  = = &R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!E  1KR01
  3/2r2N3s"   H& H< &H98H9<II