+
    Ai                     a  0 t $ R t^ RIHt ^ RIt^ RIt^ RIt^ RI	t	^ RI
t
^ RIt^ RIt^ RIt^ RIt^ RIt^ RIHtHtHtHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ RIHt ^ R	IHt ^ R
I	HtH t  ^ RI!H"t"H#t#H$t$H%t%H&t&H't' ^ RI(H)t) ^ RI*H+t+ ^ RI,H-t-H.t.H/t/H0t0 ^ RIH1t1H2t2H3t3H4t4H5t5H6t6H7t7H8t8H9t9H:t: ^ RI;H<t< ^ RI=H>t> ^ RI?t?^ RI@HAtAHBtBHCtCHDtDHEtEHFtFHGtGHHtHHItI ^ RI?HJtJHKtKHLtLHMtMHNtN ^ RIOHPtP ^ RIQHRtRHStSHTtT ^RIUHVtVHWtW ^RIXHYtYHZtZ ^RI[H\t\H]t]H^t^H_t_ ^RI`HataHbtbHctcHdtdHete ^RIfHgtgHhthHitiHjtjHktk ^RIlHmtm ^RInHoto ^RIHptpHqtqHrtrHsts ^RItHutuHvtvHwtwHxtxHyty ^RIzH{t{H|t| ^R I}H~t~Ht ^R!IHtHtHt ^R"IuHtHtHtHtHtHtHtHtHtHtHtHt ^R#IHt ^R$IHtHtHtHtHt ^R%IHt ^R&IHtHt ^R'IHtHt ^R(IHt ^R)IHtHt ^R*IHtHt ^R+IHt ^R,IHtHt ]1'       d!   ^R-IHtHt ^R.IHt ^R/I,Ht ^R0IHt ^R1IHt ]EPl                  R8  t]8]]]3,          t]7! R2]R37      t]8]],          ]],          ]],          3,          t]YtR4]R5&   ]3]2].]HP                  3,          tR4]R6&   R7tR4]R8&   ]EP~                  ].tR9]R:&   ]EP                  ]]EP                  EP                  .tR9]R;&   ]EP                  ]]EP                  EP                  .tR9]R<&   ]EP                  ]]EP                  EP                  .tR9]R=&   ]EP                  ].tR9]R>&   ]"]#]$]%]&]'.tR9]R?&   ]EP                  ]EP                  EP                  .tR9]R@&   ]P"                  ]EP                  P"                  ]P                   ]EP                  P                   .tR9]RA&   ]EP                  ].tR9]RB&   ]EP                  ]EP                  .tR9]RC&   ]
EP                  ]EP                  ]EP                  ]EP                  ]EP                  ]EP                  .tR9]RD&   ]P&                  ]EP                  ]EP                  P&                  ]EP                  EP                  ]EP                  ]?EP                  ]EP                  ]EP                  .t]EP                  ]EP                  .t]EP                  ]EP                  .tR9]RE&   ]8]/]-]0]3,          t]L! ]4      tRRRRF]F3RRRRRRRRR.tRG]RH&    RI]hRJ]gRK]jRL]k/tRM]RN&   RO RP ltRQ RR ltRS RT ltRU RV ltRW RX lt]]]2,          ]^3,          tRY RZ lt]a]b]c]d3t  ! R[ R\]4      t ! R] R^4      tRR_ RR` RRa RRb RRc RRd RRe RRf /tRg]Rh&   Ri Rj ltRk Rl ltRm Rn ltRo Rp ltRq Rr ltRs Rt lEt Ru Rv lEtRw Rx lEt ! Ry Rz4      Et ! R{ R|4      Et ! R} R~4      EtR# )z-Convert python types to pydantic-core schema.)annotationsN)	GeneratorIterableIteratorMapping)contextmanager)copy)Decimal)Enum)Fraction)partial)	Parameter_ParameterKind)IPv4AddressIPv4InterfaceIPv4NetworkIPv6AddressIPv6InterfaceIPv6Network)chain)
attrgetter)FunctionTypeGenericAlias
LambdaType
MethodType)
TYPE_CHECKINGAnyCallableFinal
ForwardRefLiteralTypeVarUnioncastoverload)UUID)ZoneInfo)	MISSING
CoreSchemaMultiHostUrlPydanticCustomError$PydanticSerializationUnexpectedValuePydanticUndefinedUrlcore_schemato_jsonable_python)	TypeAliasTypeAliasTypeget_args
get_originis_typeddict)typing_objects)AnnotationSourceget_literal_valuesis_union_origin)AliasChoices	AliasPath)GetCoreSchemaHandlerGetJsonSchemaHandler)
ConfigDictJsonDictJsonEncoderJsonSchemaExtraCallable)PydanticForbiddenQualifierPydanticInvalidForJsonSchemaPydanticSchemaGenerationErrorPydanticUndefinedAnnotationPydanticUserError)AfterValidatorBeforeValidatorFieldValidatorModesPlainValidatorWrapValidator)JsonSchemaValue)version_short)ArbitraryTypeWarningPydanticDeprecatedSince20TypedDictExtraConfigWarning UnsupportedFieldAttributeWarning)_decorators_discriminated_union_known_annotated_metadata_repr_typing_extra)ConfigWrapperConfigWrapperStack)CoreMetadataupdate_core_metadata)get_refget_type_ref%is_list_like_schema_with_items_schema)	DecoratorDecoratorInfosFieldSerializerDecoratorInfoFieldValidatorDecoratorInfoModelSerializerDecoratorInfoModelValidatorDecoratorInfoRootValidatorDecoratorInfoValidatorDecoratorInfoget_attribute_from_basesinspect_field_serializerinspect_model_serializerinspect_validator)extract_docstrings_from_cls)collect_dataclass_fieldsrebuild_dataclass_fieldsrebuild_model_fieldstakes_validated_data_argumentupdate_field_from_config)PydanticRecursiveRef)get_standard_typevars_mapreplace_types)import_cached_base_modelimport_cached_field_info)MockCoreSchema)NamespacesTuple
NsResolver)MissingDefinitionErrorgather_schemas_for_cleaning)CallbackGetCoreSchemaHandler)lenient_issubclasssmart_deepcopy)ComputedFieldInfo	FieldInfo	BaseModel)Discriminator)StandardDataclass)GetJsonSchemaFunctionFieldDecoratorInfoType)boundr0   ModifyCoreSchemaWrapHandlerGetCoreSchemaFunctionz1Callable[[int, str, Any], Literal['skip'] | None]ParametersCallbackz
list[type]TUPLE_TYPES
LIST_TYPES	SET_TYPESFROZEN_SET_TYPES
DICT_TYPESIP_TYPESSEQUENCE_TYPESITERABLE_TYPES
TYPE_TYPESPATTERN_TYPES
PATH_TYPESDEQUE_TYPESdefaultlist[tuple[str, Any]]+UNSUPPORTED_STANDALONE_FIELDINFO_ATTRIBUTESbeforeafterplainwrapzbdict[FieldValidatorModes, type[BeforeValidator | AfterValidator | PlainValidator | WrapValidator]]_mode_to_validatorc               $    V ^8  d   QhRRRRRR/# )   infoFieldDecoratorInfofieldstrreturnbool )formats   "a/var/www/html/photoedit/myenv/lib/python3.14/site-packages/pydantic/_internal/_generate_schema.py__annotate__r      s&     , ,
,, 
,    c                <    V P                   pRV9   ;'       g    W9   # )zCheck if field name is in validator fields.

Args:
    info: The field info.
    field: The field name to check.

Returns:
    `True` if field name is in validator fields, `False` otherwise.
*)fields)r   r   r   s   && r   )check_validator_fields_against_field_namer      s!     [[F&=++EO+r   c               $    V ^8  d   QhRRRRRR/# )r   
decoratorszIterable[AnyFieldDecorator]r   zIterable[str]r   Noner   )r   s   "r   r   r      s$      -H R_ dh r   c           	     6   \        V4      pV  F  pRVP                  P                  9   d   K   VP                  P                  RJ d   K<  VP                  P                   F1  pW19  g   K  \	        RVP
                   RVP                   R2RR7      h	  K  	  R# )	aZ  Check if the defined fields in decorators exist in `fields` param.

It ignores the check for a decorator if the decorator has `*` as field or `check_fields=False`.

Args:
    decorators: An iterable of decorators.
    fields: An iterable of fields name.

Raises:
    PydanticUserError: If one of the field names does not exist in `fields` param.
r   Fz*Decorators defined with incorrect fields: .zO (use check_fields=False if you're inheriting from the model and intended this)zdecorator-missing-fieldcodeN)setr   r   check_fieldsrE   cls_refcls_var_name)r   r   decr   s   &&  r   check_decorator_fields_existr      s     [F#((//!88  E)XX__E"'@QsO_O_N`ef2  % r   c               $    V ^8  d   QhRRRRRR/# )r   validator_functionsz+Iterable[Decorator[FieldDecoratorInfoType]]r   r   r   z'list[Decorator[FieldDecoratorInfoType]]r   )r   s   "r   r   r      s)     n nDnMPn,nr   c                l    V  Uu. uF#  p\        VP                  V4      '       g   K!  VNK%  	  up# u upi N)r   r   )r   r   r   s   && r   $filter_field_decorator_info_by_fieldr      s2     /m.C2[\_\d\dfk2lCC.mmms   11c               $    V ^8  d   QhRRRRRR/# )r   schemacore_schema.CoreSchemaeach_item_validatorsz'list[Decorator[ValidatorDecoratorInfo]]r   r   )r   s   "r   r   r      s&        " A   r   c                0   V'       g   V # V R ,          R8X  d   \        V R,          V4      V R&   V # V R ,          R8X  d<   V P                  R4      ;pe%   \        V R,          V,          V4      V R,          V&   V # \        V 4      '       d6   V P                  R\        P
                  ! 4       4      p\        W14      V R&   V # V R ,          R8X  d6   V P                  R\        P
                  ! 4       4      p\        W14      V R&   V # \        RV R ,           24      h)	typenullabler   tuplevariadic_item_indexitems_schemadictvalues_schemazO`@validator(..., each_item=True)` cannot be applied to fields with a schema of )apply_each_item_validatorsgetapply_validatorsr\   r.   
any_schema	TypeError)r   r   r   inner_schemas   &&  r   r   r      s     
 f~#5fX6FH\]x	7	"#)::.C#DDQ:J~&':;$;F>"#67 M 
/v	6	6zz.+2H2H2JK!1,!U~ M 
6	!zz/;3I3I3KL"2<"V
 M ]^dek^l]mn
 	
r   c                    V ^8  d   QhRRRR/# )r   r   zFieldInfo | ComputedFieldInfor   zAtuple[JsonDict | None, JsonDict | JsonSchemaExtraCallable | None]r   )r   s   "r   r   r     s      
A 
A
'
AF
Ar   c           
     Z   R V P                   RV P                  R\        V P                  4      ;'       g    V P                  R8H  ;'       g    RR\	        V P
                  4      /pVP                  4        UUu/ uF  w  r#Vf   K  W#bK  	  pppT;'       g    RV P                  3# u uppi )titledescription
deprecated Nexamples)r   r   r   r   r/   r   itemsjson_schema_extra)r   json_schema_updateskvs   &   r   )_extract_json_schema_info_from_field_infor     s     	t''d4??+LLt"/DLL&t}}5	 -@,E,E,GY,GDA1414,GY''4)?)?@@ Zs   9B'B'c               (    V ^8  d   QhRRRRRRRR/# )r   json_encoderszJsonEncoders | Nonetpr   r   r(   r   r   )r   s   "r   r   r   /  s,      &,/9Cr   c                >   V '       g   V# RV9   d   V# V.\        VRVP                  P                  4      RR O F^  pV P                  V4      pVf   K  \        P
                  ! R\        4        R2\        4       \        P                  ! VRR7      VR&   Vu # 	  V# )	zIterate over the json_encoders and add the first matching encoder to the schema.

Args:
    json_encoders: A dictionary of types and their encoder functions.
    tp: The type to check for a matching encoder.
    schema: The schema to add the encoder to.
serialization__mro__Nz=`json_encoders` is deprecated. See https://docs.pydantic.dev/z</concepts/serialization/#custom-serializers for alternativesjson	when_used)
getattr	__class__r   r   warningswarnrL   rN   r.   $plain_serializer_function_ser_schema)r   r   r   baseencoders   &&&  r   ,_add_custom_serialization_from_json_encodersr   /  s     &  Hgb)R\\-A-AB3BGH##D)?KMOK\  ]Y  Z%	
 #."R"RSZfl"m I Mr   c                      ] tR tRtRtRtR# )InvalidSchemaErroriZ  zThe core schema is invalid.r   N)__name__
__module____qualname____firstlineno____doc____static_attributes__r   r   r   r   r   Z  s    %r   r   c                    a  ] tR tRtRtRtRR R lltR V 3R llt]R R	 l4       t	]R
 R l4       t
]R R l4       tR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR R ltR  R! ltR" R# ltR$ R% ltR& R' ltR( R) ltR* R+ ltR, R- ltR. R/ ltR0 R1 ltR2 R3 ltR4 R5 lt] R6 R7 l4       t!] R8 R9 l4       t!RR: R; llt!R< R= lt"R> R? lt#R@ RA lt$RB RC lt%RD RE lt&RFRG/RH RI llt'RJ RK lt(RL RM lt)RN RO lt*RP RQ lt+RR RS lt,RT RU lt-RV RW lt.RX RY lt/]0Pb                  R3RZ R[ llt2]0Pb                  3R\ R] llt3R^ R_ lt4R` Ra lt5Rb Rc lt6Rd Re lt7Rf Rg lt8Rh Ri lt9Rj Rk lt:Rl Rm lt;Rn Ro lt<Rp Rq lt=Rr Rs lt>RRt Ru llt?RRv Rw llt@Rx Ry ltARz R{ ltBR| R} ltCR~ RG3R R lltDRR R lltER R ltFR R ltGRR R lltHR R ltIR R ltJRtKV ;tL# )GenerateSchemai^  z\Generate core schema for a Pydantic model, dataclass and types like `str`, `datetime`, ... .Nc               (    V ^8  d   QhRRRRRRRR/# )	r   config_wrapperrV   ns_resolverzNsResolver | Nonetypevars_mapzMapping[TypeVar, Any] | Noner   r   r   )r   s   "r   r   GenerateSchema.__annotate__j  s2     # #%# '# 3	#
 
#r   c                	    \        V4      V n        T;'       g    \        4       V n        W0n        \        4       V n        \        4       V n        \        4       V n
        R # r   )rW   _config_wrapper_stackrv   _ns_resolver_typevars_map_FieldNameStackfield_name_stack_ModelTypeStackmodel_type_stack_Definitionsdefs)selfr   r   r   s   &&&&r   __init__GenerateSchema.__init__j  sH     &8%G"'77:<) / 1 / 1 N	r   c                   V ^8  d   QhRR/# r   r   r   r   )r   s   "r   r   r   x  s     
 
$ 
r   c                	^   < \         SV `  4        \        P                  ! R \        ^R7       R# )zeSubclassing `GenerateSchema` is not supported. The API is highly subject to change in minor versions.)
stacklevelN)super__init_subclass__r   r   UserWarning)clsr   s   &r   r   GenerateSchema.__init_subclass__x  s#    !#s	
r   c                   V ^8  d   QhRR/# )r   r   rV   r   )r   s   "r   r   r     s     / / /r   c                	.    V P                   P                  # r   )r   tailr	  s   &r   _config_wrapperGenerateSchema._config_wrapper  s    ))...r   c                   V ^8  d   QhRR/# )r   r   ru   r   )r   s   "r   r   r     s     1 1/ 1r   c                	.    V P                   P                  # r   )r  types_namespacer  s   &r   _types_namespaceGenerateSchema._types_namespace  s      000r   c                   V ^8  d   QhRR/# )r   r   r   r   )r   s   "r   r   r     s     < <$ <r   c                	.    V P                   P                  # r   )r  arbitrary_types_allowedr  s   &r   _arbitrary_typesGenerateSchema._arbitrary_types  s    ##;;;r   c                    V ^8  d   QhRRRR/# r   
items_typer   r   r(   r   )r   s   "r   r   r     s     I Is Iz Ir   c                	L    \         P                  ! V P                  V4      4      # r   )r.   list_schemagenerate_schemar	  r'  s   &&r   _list_schemaGenerateSchema._list_schema  s    &&t';';J'GHHr   c               $    V ^8  d   QhRRRRRR/# )r   	keys_typer   values_typer   r(   r   )r   s   "r   r   r     s&     k kc k k
 kr   c                	l    \         P                  ! V P                  V4      V P                  V4      4      # r   )r.   dict_schemar*  )r	  r/  r0  s   &&&r   _dict_schemaGenerateSchema._dict_schema  s,    &&t';';I'FH\H\]hHijjr   c                    V ^8  d   QhRRRR/# r&  r   )r   s   "r   r   r     s     H Hc Hj Hr   c                	L    \         P                  ! V P                  V4      4      # r   )r.   
set_schemar*  r+  s   &&r   _set_schemaGenerateSchema._set_schema  s    %%d&:&::&FGGr   c                    V ^8  d   QhRRRR/# r&  r   )r   s   "r   r   r     s     N NC NJ Nr   c                	L    \         P                  ! V P                  V4      4      # r   )r.   frozenset_schemar*  r+  s   &&r   _frozenset_schema GenerateSchema._frozenset_schema  s    ++D,@,@,LMMr   c                    V ^8  d   QhRRRR/# )r   	enum_typez
type[Enum]r   r(   r   )r   s   "r   r   r     s     F Fj FZ Fr   c           	     	f  aa
aaa \        SP                  P                  4       4      o
\        S4      oSP                  '       g   R M\
        P                  ! SP                  4      pVR8X  d   R pRSP                  RV/oSP                  4        UUu/ uF  w  r4Vf   K  W4bK  	  uppoR o\        S\        4      '       d   Ro\        P                  ! R4      pMu\        S\        4      '       d   Ro\        P                  ! R4      pMF\        S\        4      '       d   Ro\        P                  ! R4      pM\        P                  ! R 4      pS
'       d   R V3R	 llp\!        SP"                  R
R 4      \$        P"                  P&                  J p\        P(                  ! SS
SV'       d   R MSP"                  SRV./R7      pV P*                  P,                  '       d"   \        P.                  ! \1        R4      WR7      pV# R V
VVVV3R llp	\        P2                  ! SRV	./R7      # u uppi )NzAn enumeration.r   r   intr   floatc                    V # r   r   xs   &r   <lambda>-GenerateSchema._enum_schema.<locals>.<lambda>  s    XYr   c               $    V ^8  d   QhRRRRRR/# )r   r   r(   handlerr<   r   rK   r   )r   s   "r   r   1GenerateSchema._enum_schema.<locals>.__annotate__  s#     # #
 #=Q #Ve #r   c                \   < V! V 4      pVP                  V4      pVP                  S4       V# r   )resolve_ref_schemaupdate)r   rJ  json_schemaoriginal_schema
js_updatess   &&  r   get_json_schema4GenerateSchema._enum_schema.<locals>.get_json_schema  s0    %fo")"<"<["I&&z2""r   __func__pydantic_js_functions)sub_typemissingrefmetadatavalue)r   c                    V ^8  d   QhRRRR/# )r   rJ  r<   r   rK   r   )r   s   "r   r   rK    s     # #5I #o #r   c           	        < V! \         P                  ! SSSSR 7      4      pVP                  V4      pVP                  S4       V# ))rV  rX  )r.   enum_schemarM  rN  )	_rJ  rO  rP  casesenum_refr@  rQ  rV  s	   &&  r   get_json_schema_no_cases=GenerateSchema._enum_schema.<locals>.get_json_schema_no_cases  sD    %k&=&=iYago&pq")"<"<["I&&z2""r   rY  )list__members__valuesr[   r   inspectcleandocr   r   
issubclassrB  r.   simple_ser_schemar   rC  r   r   	_missing_r
   rT  r]  r  use_enum_values no_info_after_validator_functionr   is_instance_schema)r	  r@  r   r   r   value_ser_typerR  default_missingr]  ra  r_  r`  rQ  rV  s   &f        @@@@r   _enum_schemaGenerateSchema._enum_schema  s   	 5 5 < < >?	*"+"3"3"3d9I9I)J[J[9\,,Ky11=+N
'1'7'7'9K'9tqQdad'9K
:>i%%H4?4Q4QRW4XN	3''H(::5AN	5))H(::7CN )MMkZN# # &i&9&9:tLPTP^P^PgPggO%11! /Y5H5H1O3DEK ##333)JJw' # # 1114L3MN s Ls   H-!H-c                    V ^8  d   QhRRRR/# r   r   r   r   r(   r   )r   s   "r   r   r     s     
 
S 
Z 
r   c                	  aa ^RI HpHp \        R\        R\
        R\        R\        R\        R/oR V3R	 llp\        P                  ! \        P                  ! VS,          4      \        P                  ! \        P                  ! S\        P                  ! 4       4      \        P                  ! S4      R
7      \        P                   ! VRRR7      RVV3R l./R7      # )   )IP_VALIDATOR_LOOKUPIpTypeipv4ipv4networkipv4interfaceipv6ipv6networkipv6interfacec               $    V ^8  d   QhRRRRRR/# )r   ipr   r   core_schema.SerializationInfor   zstr | IpTyper   )r   s   "r   r   /GenerateSchema._ip_schema.<locals>.__annotate__  s"     	 	s 	"? 	L 	r   c           	        < \        V S\        34      '       g   \        R S R\        V 4       RV  R24      hVP                  R8X  d   V # \        V 4      # z
Expected `z` but got `z` with value `'z-'` - serialized value may not be as expected.python
isinstancer   r+   r   mode)r  r   r   s   &&r   ser_ip)GenerateSchema._ip_schema.<locals>.ser_ip  sZ    b2s),,: KRzLyz  yyH$	r7Nr   rO  python_schemaTalwaysinfo_argr   rU  c                   < R RRSS,          /# )r   stringr   r   )_1_2ip_type_json_schema_formatr   s   &&r   rG  +GenerateSchema._ip_schema.<locals>.<lambda>  s    &(HVpqsVt9ur   
lax_schemastrict_schemar   rY  )_validatorsrw  rx  r   r   r   r   r   r   r.   lax_or_strict_schema no_info_plain_validator_functionjson_or_python_schemarm  
str_schemarn  r   )r	  r   rw  rx  r  r  s   &f   @r   
_ip_schemaGenerateSchema._ip_schema  s    < ???
"	 	 //"CCDWXZD[\%;;'HH[McMcMef)<<R@ &JJ6\`ltu'*u)v

 
	
r   c               $    V ^8  d   QhRRRRRR/# )r   r   r   	path_typer   r(   r   )r   s   "r   r   r     s!     8 8s 8s 8z 8r   c           
     	<  aaa	 S\         P                  J d;   S\        \        09  d*   \        P
                  ! S4      '       g   \        R RR7      hS\         P                  J d   \        P                  MSo	S\        J d   \        P                  ! RR7      M\        P                  ! RR7      pS\        J d   \        P                  ! 4       M\        P                  ! 4       pR V	V3R llpR V3R llp\        P                  ! \        P                  ! WT4      \        P                  ! S4      R	7      p\        P                  ! \        P                   ! V\        P                  ! WS4      .R
RS 2R7      V\        P"                  ! VRRR7      RR ./R7      pV# )z;`os.PathLike` can only be used with `str`, `bytes` or `Any`zschema-for-unknown-typer   Tstrictc                    V ^8  d   QhRRRR/# )r   input_valuezstr | bytesr   zos.PathLike[Any]r   )r   s   "r   r   1GenerateSchema._path_schema.<locals>.__annotate__  s     	[ 	[ 	[8H 	[r   c                V  <  S\         J d5   \        V \         4      '       d    V P                  4       p M.\	        R R4      h\        V \
        4      '       g   \	        RR4      hS! V 4      #   \         d   p\	        R R4      ThRp?ii ; i  \         d   p\	        RR4      ThRp?ii ; i)
bytes_typezInput must be valid bytesNzInput must be bytesr  zInput is not a valid path)bytesr  decodeUnicodeDecodeErrorr*   r   r   )r  epath_constructorr  s   & r   path_validator3GenerateSchema._path_schema.<locals>.path_validator  s    [%!+u55h*5*<*<*>K 2,@UVV#K55-k;VWW'44  2 h"5lD_"`fggh  [)+7RSYZZ[s>   	B B A+ 6B +B6BBB B(B##B(c               $    V ^8  d   QhRRRRRR/# )r   pathr   r   r  r   zstr | os.PathLike[Any]r   )r   s   "r   r   r     s#     	 	3 	&C 	H^ 	r   c           	        < \        V S\        34      '       g   \        R S R\        V 4       RV  R24      hVP                  R8X  d   V # \        V 4      # r  r  )r  r   r   s   &&r   ser_path-GenerateSchema._path_schema.<locals>.ser_path   s[    dRI..: KT
|?4&P}~  yyH$t9r   r  r  zInput is not a valid path for custom_error_typecustom_error_messager  r  rU  c                    / V! V 4      CR R/C# )r   r  r   )sourcerJ  s   &&r   rG  -GenerateSchema._path_schema.<locals>.<lambda>9  s    Hm7SY?Hm\dflHmr   r  )osPathLiker   r  r5   is_anyrE   pathlibPurePathr.   bytes_schemar  r  rm  rn  r  union_schemar   )
r	  r   r  strict_inner_schemalax_inner_schemar  r  instance_schemar   r  s
   &ff      @r   _path_schemaGenerateSchema._path_schema  s[   )C<"?H]H]^gHhHh#MTm  02R[[/@7++b6?56HK$$D1{OeOemqOr 	 ;Du:L;335S^SiSiSk	[ 	["	 	 &;;#DD^f%88<

 11"//#@@e #.'EbT%J *%JJ8^bnvw-0m/no
 r   c                    V ^8  d   QhRRRR/# r&  r   )r   s   "r   r   r   =  s     
 
 

 
r   c           
     	   ^RI Hp ^RIHp V P	                  V4      p\
        P                  ! VRR7      p\
        P                  ! V\
        P                  ! \        P                  RR7      R7      p\
        P                  ! W54      p\
        P                  ! V\
        P                  ! Wg.4      \
        P                  ! W$RR	7      R
7      # )rv  serialize_sequence_via_list)deque_validatorFr  Dequecls_reprr  Tr   r  r  r  r   )_serializersr  r  r  r*  r.   r)  r  rn  collectionsdequeno_info_wrap_validator_functionr  chain_schema#wrap_serializer_function_ser_schema)r	  r'  r  r  item_type_schemar)  check_instancer  s   &&      r   _deque_schemaGenerateSchema._deque_schema=  s    =0//
; "--.>uM$::#%889J9JU\]

 !@@^
//!%22N3OP%II+t
 	
r   c               (    V ^8  d   QhRRRRRRRR/# )r   r   r   r/  r0  r   r(   r   )r   s   "r   r   r   V  s(     , ,# ,# ,C ,J ,r   c           
     	   ^RI HpHpHp WA,          pV P	                  V4      p\
        P                  ! 4       ;_uu_ 4        \
        P                  ! R\        R7       V P	                  V4      p	RRR4       \        P                  ! VX	RR7      p
V\        J d   T
pV# \        P                  ! V
\        P                  ! V4      R7      pV\        P                  J d.   V! V4      p\!        \        P"                  \!        W]R7      4      pM\!        \        P$                  V4      pV! V
4      p\        P&                  ! W.4      p\        P(                  ! VV\        P*                  ! R	 V
RR
7      R7      pV#   + '       g   i     EL; i)rv  )MAPPING_ORIGIN_MAPdefaultdict_validator'get_defaultdict_default_default_factoryignorecategoryNFr  r  )default_default_factoryc                    V! V 4      # r   r   )r   hs   &&r   rG  0GenerateSchema._mapping_schema.<locals>.<lambda>~  s    1r   r  r  )r  r  r  r  r*  r   catch_warningssimplefilterrP   r.   r2  r   r  rn  r  defaultdictr   r  rm  r  r  r  )r	  r   r/  r0  r  r  r  mapped_originkeys_schemar   r2  r   r  r  coerce_instance_wrapr  r  s   &&&&             r   _mapping_schemaGenerateSchema._mapping_schemaV  sP   ss*.**95$$&& !!(5UV 00=M ' "--k=QVWD  F6 3 )>>')<<]KN
 [,,,*QR]*^''.??1c($
 (/{/[/[]j'k$-k:J'44n5QRM 55%+)MM%kEF O '&&s   .E77F	c                   V ^8  d   QhRR/# )r   r   r(   r   )r   s   "r   r   r     s     
 
* 
r   c           	         ^RI Hp \        P                  ! \        P                  ! V4      \        P
                  ! \        P                  ! V4      \        P                  ! \        4      R7      \        P                  ! RR7      RR ./R7      # )z7Support for [`fractions.Fraction`][fractions.Fraction].)fraction_validatorr  r  r   rU  c                    R RRR/# )r   r  r   fractionr   r  r  s   &&r   rG  1GenerateSchema._fraction_schema.<locals>.<lambda>  s    RZ\f?gr   r  )	r  r  r.   r  r  r  rn  r   to_string_ser_schema)r	  r  s   & r   _fraction_schemaGenerateSchema._fraction_schema  sp    3 //"CCDVW%;;'HHI[\)<<XF
 &::XN-0g/hi	
 		
r   c                    V ^8  d   QhRRRR/# rt  r   )r   s   "r   r   r     s     
2 
2 
2 
2r   c                	    \        V\        4      '       g5   \        P                  ! V: R 2\        4       \
        P                  ! 4       # \
        P                  ! V4      # )a   is not a Python type (it may be an instance of an object), Pydantic will allow any object with no validation since we cannot even enforce that the input is an instance of the given type. To get rid of this error wrap the type with `pydantic.SkipValidation`.)r  r   r   r   rM   r.   r   rn  )r	  r   s   &&r   _arbitrary_type_schema%GenerateSchema._arbitrary_type_schema  sS    "d##MM& Z Z % ))++--b11r   c                    V ^8  d   QhRRRR/# r   objr   r   r(   r   )r   s   "r   r   r     s     	
 	
 	

 	
r   c                	"    \        R V: R24      h),Unable to generate pydantic-core schema for a  . Set `arbitrary_types_allowed=True` in the model_config to ignore this error or implement `__get_pydantic_core_schema__` on your type to fully support it.

If you got this error by calling handler(<some type>) within `__get_pydantic_core_schema__` then you likely need to call `handler.generate_schema(<some type>)` since we do not call `__get_pydantic_core_schema__` on `<some type>` otherwise to avoid infinite recursion.)rC   r	  r   s   &&r   _unknown_type_schema#GenerateSchema._unknown_type_schema  s#    +:3' Bf f
 	
r   c               $    V ^8  d   QhRRRRRR/# )r   r   r(   discriminatorzstr | Discriminator | Noner   r   )r   s   "r   r   r     s$       1K	r   c                	    Vf   V#  \         P                  ! VVV P                  P                  4      #   \         P                   d    \         P
                  ! TT4       Tu # i ; ir   )rR   apply_discriminatorr  _definitionsMissingDefinitionForUnionRefset_discriminator_in_metadata)r	  r   r  s   &&&r   _apply_discriminator_to_union,GenerateSchema._apply_discriminator_to_union  sl      M	';;		&& 
 $@@ 	 >> M	s   +4 .A%$A%c                    V ^8  d   QhRRRR/# r   r   r(   r   r   )r   s   "r   r   r     s     1 1: 1* 1r   c                	8    V P                   P                  V4      # r   )r  finalize_schema)r	  r   s   &&r   clean_schemaGenerateSchema.clean_schema  s    yy((00r   c               $    V ^8  d   QhRRRRRR/# )r   metadata_schemar(   js_functionzCallable[..., Any]r   r   r   )r   s   "r   r   r     s#     	/ 	/
 	/I[ 	/`d 	/r   c                	    VP                  R / 4      pVP                  R. 4      pW$9  d   VP                  V4       W1R &   R# )rY  rU  N)r   
setdefaultappend)r	  r  r  rY  rU  s   &&&  r   _add_js_functionGenerateSchema._add_js_function  sF    "&&z26 ( 3 34KR P
 3!((5&.
#r   c                    V ^8  d   QhRRRR/# r   r   r   r   r   r   )r   s   "r   r   r     s     % %% 
 %r   c                   V P                  W4      pVf   V P                  V4      p\        V4      pVe/   \        W P                  4      pV'       d   V P                  WC4       \        V P                  P                  W4      pV# )a  Generate core schema.

Args:
    obj: The object to generate core schema for.

Returns:
    The generated core schema.

Raises:
    PydanticUndefinedAnnotation:
        If it is not possible to evaluate forward reference.
    PydanticSchemaGenerationError:
        If it is not possible to generate pydantic-core schema.
    TypeError:
        - If `alias_generator` returns a disallowed type (must be str, AliasPath or AliasChoices).
        - If V1 style validator with `each_item=True` applied on a wrong field.
    PydanticUserError:
        - If `typing.TypedDict` is used instead of `typing_extensions.TypedDict` on Python < 3.12.
        - If `__modify_schema__` method is used instead of `__get_pydantic_json_schema__`.
)	'_generate_schema_from_get_schema_method_generate_schema_inner!_extract_get_pydantic_json_schemaresolve_original_schemar  r  r   r  r   )r	  r   r   metadata_js_functionr  s   &&   r   r*  GenerateSchema.generate_schema  sw    0 ==cG>005F@E+5fiiHO%%oL=d>R>R>`>`benr   c                    V ^8  d   QhRRRR/# )r   r  ztype[BaseModel]r   r   r   )r   s   "r   r   r     s#     L L L5K Lr   c                   \        4       pV P                  P                  V4      ;_uu_ 4       w  r4Ve   VuuRRR4       # VP                  P	                  R4      pVe   \        V\        4      '       gn   VR,          R8X  d   V P                  P                  V4      p\        V4      pV'       d&   V P                  P                  V4      uuRRR4       # VuuRRR4       # \        VP                  RR7      pV P                  P                  V4      ;_uu_ 4        V P                  P                  V4      ;_uu_ 4        V P                  P!                  VP"                  R7      pVP$                  '       g   WJ d   \'        VR/ 4      p	\'        VR	R4      p
MqRVP                  9  d'   \)        VP"                  R
VP"                  : R2R7      h \+        TV P                  V P                  V P,                  ;'       g    / R7      w  rVP2                  pVP4                  p\7        \9        VP:                  P=                  4       VP>                  P=                  4       VP@                  P=                  4       4      0 V	PC                  4       mVPC                  4       m4       VPD                  P=                  4       pRpRpVP	                  R4      R8X  d   V
e   \G        V
PH                  4      pV\J        9  d   \M        R4      hV PO                  V
PH                  RR7      w  ppV\P        Jd   V PS                  V4      p\T        PV                  ! V4      '       g   V PS                  V4      p\'        VR/ 4      P	                  R4      pVPX                  '       d`   V P[                  RV	R,          V4      w  pp\]        VVR4      p\^        P`                  ! VVV\'        VRR4      R\'        VRR4      VVR7      pM\^        Pb                  ! V	Pe                  4        UUu/ uF  w  ppVV Pg                  VVV4      bK  	  uppVP=                  4        Uu. uF  pV Pi                  VVP>                  4      NK!  	  upVVVP"                  R7      p\k        VVPl                  P=                  4       4      p\]        VVR4      p\^        P`                  ! VVV\'        VRR4      R\'        VRR4      VVR7      pV Po                  VVPp                  P=                  4       4      p\]        W^R4      pV P                  P                  V4      uuRRR4       uuRRR4       uuRRR4       #   \.         d   p\(        P0                  ! T4      ThRp?ii ; iu uppi u upi   + '       g   i     M; iRRR4       M  + '       g   i     M; iRRR4       R#   + '       g   i     R# ; i)z%Generate schema for a Pydantic model.N__pydantic_core_schema__r   definitionsF)checkr   __pydantic_fields____pydantic_extra_info__zClass z is not defined)namemessager   r   r   extra_fields_behaviorallowzEThe type annotation for `__pydantic_extra__` must be `dict[str, ...]`Trequired__pydantic_generic_metadata__originrootinner__pydantic_custom_init____pydantic_post_init__)generic_origincustom_init
root_model	post_initconfigrX  )computed_fieldsextras_schemaextras_keys_schema
model_nameouter)9rr   r  get_schema_or_ref__dict__r   r  rt   unpack_definitionsrZ   "create_definition_reference_schemarV   model_configr   pushr  r  core_configr   __pydantic_fields_complete__r   rD   rl   r  	NameErrorfrom_name_error__pydantic_decorators__r@  r   r   field_validatorsrf  field_serializers
validatorskeysmodel_validatorsr3   
annotationr   rC    _get_args_resolving_forward_refsr   r*  r5   r  __pydantic_root_model___common_field_schemaapply_model_validatorsr.   model_schemamodel_fields_schemar   _generate_md_field_schema_computed_field_schemar   root_validators_apply_model_serializersmodel_serializers)r	  r  
BaseModel_	model_refmaybe_schemar   rX  r   rK  r   
extra_infor  r   r@  rT  rA  rB  r   extra_keys_typeextra_items_typer;  r   r^  rZ  r   r   dfields_schemas   &&                          r   _model_schemaGenerateSchema._model_schema  s3   -/
YY((--1J)'# .- \\%%&@AF!*V^*L*L&>]2!YY99&AFfo99GGO .- " .- +3+;+;5IN++00@@$BSBSBXBXY\B]B]"22>>S\\>R333s7H$S*?DF!(.G!NJ,CLL@ :!$&,S\\,<O$L T-A+/+?+?(,(9(9)-););)A)Ar	.* !88
","<"<,"33::<"44;;="--446
 >fkkm=o&:&:&<= $.#>#>#E#E#G  $%)"??#:;wF:Ka#J$9$9:B+;c 
 9=8]8]"--!% 9^ 95O%5 'c1-1-A-A/-R*)001ABB(,(<(<=M(N9@Fegi9j9n9now9x...&*&?&?vXb&cOL!#9,HXZa#bL#.#;#;$'5$+C1KT$R#'")#/G"N*%	$L =H<[<[Y_YeYeYghYgQUQRTUD::1aLLYgh &5%;%;%=)%= !77:;W;WX%=) '4+=#&<<	=M $4M:C]C]CdCdCf#gL#9,HXZa#bL#.#;#;$'5$+C1KT$R#(")#/G"N*%	$L 66|ZEaEaEhEhEjk/'RyyCCFKW C^B]@@! .-Z % T9II!LRSSTj i)g C^B]@@@@! .---s   WBWW#:W$V1	BV.U 
U EVCV V
=V%V7C
V
V1	
W V+VVVV% V1	(	W1W<WW	c                    V ^8  d   QhRRRR/# r   r   r   r   r   )r   s   "r   r   r   u  s      c c r   c                	\    V P                   P                  4       pVf   \        RRR7      hV# )Nz(`typing.Self` is invalid in this contextzinvalid-self-typer   )r  r   rE   r  s   &&r   _resolve_self_type!GenerateSchema._resolve_self_typeu  s/    ##'');#$NUhii
r   c               $    V ^8  d   QhRRRRRR/# )r   r   r   r  r   zcore_schema.CoreSchema | Noner   )r   s   "r   r   r   {  s'     9w 9w3 9w 9wPm 9wr   c           	     	   \        4       p\        VR R4      p\        VRR4      VP                  P                  J pVe   V'       g   V P                  P                  V4      ;_uu_ 4       w  rgVe   VuuRRR4       #  RRR4       WJ d   RpMRpV! V\        V P                  WR7      4      p	V	R,          R8X  d   V P                  P                  V	4      p	\        V	4      p
V
'       d   V P                  P                  V	4      # V	# Vf   \        VRR4      ;pe   ^ R	IHp \        W4      '       d+   \        P                  ! R
VP                    R2\"        4       M\        P                  ! R\$        4       \&        P(                  ! V! 4        Uu. uF  p\&        P*                  ! V4      NK  	  up4      # R# R#   + '       g   i     ELF; iu upi )__get_pydantic_core_schema__NrT  unpackzto-def)ref_moder   r)  __get_validators__r~   zeMixing V1 models and V2 models (or constructs, like `TypeAdapter`) is not supported. Please upgrade `z` to V2.zc`__get_validators__` is deprecated and will be removed, use `__get_pydantic_core_schema__` instead.)rr   r   rr  rT  r  rE  ry   r!  rG  rZ   rH  pydantic.v1r   ri  r   r   r   r  rN   r.   r  "with_info_plain_validator_function)r	  r   r  ra  
get_schemais_base_model_get_schemar^  rc  rt  r   rX  rR  BaseModelV1r   s   &&&           r   r   6GenerateSchema._generate_schema_from_get_schema_method{  s   -/
S"@$G
J
D1Z5\5\5e5ee 	!
 " - ,,S115Fa+' 21+ 2 }##4T5P5PRVjF f~.55f=&/CyyCCFKK M>RTX1Y#Y:"f<#++{|  }I  }I  |J  JR  S
 y- ++hrht,uhtcd[-[-[\]-^ht,uvv #g- 211F -vs   *F;G;G	c                    V ^8  d   QhRRRR/# rl  r   )r   s   "r   r   r     s        r   c                	L    \         P                  ! V.V P                  O5!  p\        T\        4      '       d   \	        TP                  RT 24      hT P                  '       d   \        YP                  4      pT#   \         d   p\        P
                  ! T4      ThR p?ii ; i)Nz%Unable to evaluate forward reference )rU   eval_type_backportr  rM  rD   rN  r  r   __forward_arg__r  rq   )r	  r   r  s   && r   _resolve_forward_ref#GenerateSchema._resolve_forward_ref  s    	H223O9N9NOC
 c:&&-c.A.AEjknjoCpqq%7%78C
  	H-==a@aG	Hs   "A< <B#BB#c               $    V ^8  d   QhRRRRRR/# )r   r   r   r4  zLiteral[True]r   ztuple[Any, ...]r   )r   s   "r   r   r     s    iiCi=iUdir   c                	    R # r   r   )r	  r   r4  s   &&&r   rV  /GenerateSchema._get_args_resolving_forward_refs  s    fir   c                    V ^8  d   QhRRRR/# )r   r   r   r   tuple[Any, ...] | Noner   )r   s   "r   r   r     s    WWCW<RWr   c                	    R # r   r   r  s   &&r   rV  r    s    TWr   c               $    V ^8  d   QhRRRRRR/# )r   r   r   r4  r   r   r  r   )r   s   "r   r   r     s"      C 4 Tj r   c                	  a  \        V4      pV'       dV   \        V\        4      '       d
   R  V 4       p\        ;QJ d    . V 3R lV 4       F  NK  	  5pV# ! V 3R lV 4       4      pV# V'       d   \	        RV R24      hV# )c              3  ~   "   T F3  p\        V\        4      '       d   \        P                  ! V4      MTx  K5  	  R # 5ir   )r  r   rU   _make_forward_ref).0as   & r   	<genexpr>BGenerateSchema._get_args_resolving_forward_refs.<locals>.<genexpr>  s0     fae\]jC>P>P77:VWWaes   ;=c              3  v   <"   T F.  p\        V\        4      '       d   SP                  V4      MTx  K0  	  R # 5ir   )r  r   r  )r  r  r	  s   & r   r  r    s1     hcg^_Az9R9R2215XYYcgs   69z	Expected z+ to have generic parameters but it had none)r2   r  r   r   r   )r	  r   r4  argss   f&& r   rV  r    s|    }#|,,
 gaef5hcgh5D  hcghhD  iu,WXYYr   c                    V ^8  d   QhRRRR/# rl  r   )r   s   "r   r   r     s        r   c                	R    V P                  V4      pV'       g   \        # V^ ,          # )    )rV  r   )r	  r   r  s   && r   _get_first_arg_or_any$GenerateSchema._get_first_arg_or_any  s#    44S9JAwr   c                    V ^8  d   QhRRRR/# )r   r   r   r   ztuple[Any, Any]r   )r   s   "r   r   r     s        c  o  r   c                	    V P                  V4      pV'       g   \        \        3# \        V4      ^8  d   \        V4      p\	        RV R24      hV^ ,          V^,          3# )r   z Expected two type arguments for z, got 1)rV  r   lenr3   r   )r	  r   r  r6  s   &&  r   _get_first_two_args_or_any)GenerateSchema._get_first_two_args_or_any  s[    44S9:t9q=_F>vhgNOOAwQr   c                    V ^8  d   QhRRRR/# r  r   )r   s   "r   r   r     s     $ $# $2H $r   c                	   \         P                  ! V4      '       d   V P                  V4      p\         P                  ! \	        V4      4      '       d   V P                  V4      # \        V\        4      '       d   V# \        V\        4      '       d   \        V4      p\        V\        4      '       d!   V P                  V P                  V4      4      # \        4       p\        W4      '       d@   V P                  P                  V4      ;_uu_ 4        V P!                  V4      uuR R R 4       # \        V\"        4      '       d"   \$        P&                  ! VP(                  R7      # V P+                  V4      #   + '       g   i     LX; i)N)
schema_ref)r5   is_selfrn  is_annotatedr3   _annotated_schemar  r   r   r   r*  r  rr   rz   r  rJ  ri  ro   r.   definition_reference_schematype_ref
match_type)r	  r   r   s   && r   r!  %GenerateSchema._generate_schema_inner  s   !!#&&))#.C&&z#77))#..c4  Jc3S/Cc:&&''(A(A#(FGG,.	c--&&++C00))#. 10 c/00::cllSSs## 10s   E55F	c                    V ^8  d   QhRRRR/# r  r   )r   s   "r   r   r     s     x. x.c x.&< x.r   c                $   V\         J d   \        P                  ! 4       # V\        J d   \        P                  ! 4       # V\
        J d   \        P                  ! 4       # V\        J d   \        P                  ! 4       # V\        J d   \        P                  ! 4       # V\        J d   \        P                  ! 4       # \        P                  ! V4      '       g   V\        J d   \        P                   ! 4       # V\"        P$                  J d   \        P&                  ! 4       # V\"        P"                  J d   \        P(                  ! 4       # V\"        P*                  J d   \        P,                  ! 4       # V\"        P.                  J d   \        P0                  ! 4       # V\2        J d   \        P4                  ! 4       # V\6        J d   \        P8                  ! 4       # V\:        J d   \        P<                  ! 4       # V\>        J d   V PA                  4       # V\B        J d   \        PD                  ! 4       # Ve   V\F        PH                  J d   \        PJ                  ! 4       # V\L        J d   \        PN                  ! 4       # V\P        9   d   V PS                  V4      # V\T        9   d   V PW                  V4      # V\X        9   d   V P[                  \\        4      # V\^        9   d   V Pa                  \\        4      # V\b        9   d   V Pe                  \\        4      # V\f        9   d   V Pi                  \\        4      # V\j        9   d   V Pm                  V4      # V\n        9   d   V Pq                  \\        \\        4      # V\r        9   d   V Pu                  V\\        4      # V\v        9   d   V Py                  \\        4      # V\z        9   d   V P}                  V\\        \\        4      # V\~        9   d   V P}                  V\\        \
        4      # \        P                  ! V4      '       d   V P                  V4      # V\        J d   V P                  4       # \F        P                  ! V4      '       d   \        P                  ! 4       # \        P                  ! \        V4      4      '       d   V P                  V4      # \        V4      '       d   V P                  VR4      # \        P                  ! V4      '       d(   \        V\        4      '       d   V P                  V4      # \F        P                  ! V4      '       d   V P                  VR4      # \        P                  ! V4      '       d   V P                  VP                  4      # V\        9   d   V P                  V4      # \F        P                  ! V4      '       d   V P                  4       # \        V\        P                  4      '       d   V P                  V4      # \F        P                  ! V4      '       d@   V\        J d   \        P                   ! 4       # V P                  V P                  V4      4      # \        V\        4      '       d   V P                  V4      # V\        J d   V P                  4       # \        P                  ! V4      '       d   V P                  VR4      # \        V4      pVe   V P                  W4      # V P                  '       d   V P                  V4      # V P                  V4      # )a  Main mapping of types to schemas.

The general structure is a series of if statements starting with the simple cases
(non-generic primitive types) and then handling generics and other more complex cases.

Each case either generates a schema directly, calls into a public user-overridable method
(like `GenerateSchema.tuple_variable_schema`) or calls into a private method that handles some
boilerplate before calling into the user-facing method (e.g. `GenerateSchema._tuple_schema`).

The idea is that we'll evolve this into adding more and more user facing methods over time
as they get requested and we figure out what the right API for them is.
N)kr   r.   r  r  r  rB  
int_schemarC  float_schemar   bool_schemacomplexcomplex_schemar5   r  objectr   datetimedatedate_schemadatetime_schematimetime_schema	timedeltatimedelta_schemar	   decimal_schemar%   uuid_schemar-   
url_schemar   r  r)   multi_host_url_schemarU   NoneTypenone_schemar'   missing_sentinel_schemar   r  r   _tuple_schemar   r,  r   r   r8  r   r=  r   _sequence_schemar   _iterable_schemar   r3  r   r  r   r  MAPPING_TYPESr  COUNTER_TYPESis_typealiastype_type_alias_type_schemar   _type_schemais_callablecallable_schema
is_literalr3   _literal_schemar4   _typed_dict_schemarg  isclassri  r
   rq  is_namedtuple_namedtuple_schema
is_newtyper*  __supertype__r   _pattern_schemais_hashable_hashable_schemar  typingr!   _unsubstituted_typevar_schemais_finalvarr   r  VALIDATE_CALL_SUPPORTED_TYPES_call_schemar&   _zoneinfo_schemadataclassesis_dataclass_dataclass_schema_match_generic_typer#  r  r  )r	  r   r6  s   && r   r  GenerateSchema.match_type  s^    #:))++E\++--CZ))++E\++--D[**,,G^--//""3''3&=))++HMM!**,,H%%%..00HMM!**,,H&&&//11G^--//D[**,,CZ))++H_((**L 4466[C=#9#99**,,'>6688H_??3''K%%c**J$$S))I##C(($$))#..N"((--N"((--J$$S#..J$$S#..K%%c**M!''S#66M!''S#66,,S11//44D[$$&&&&s++..00&&z#77'',,#**355__S!!jd&;&; $$S))((--**355&&s++''(9(9::M!'',,&&s++((**V^^,,55c::&&s++e|"--//''**3/  :;;$$S))H_((** ##C(())#t44C++C88   ..s33((--r   c               $    V ^8  d   QhRRRRRR/# )r   r   r   r6  r   r(   r   )r   s   "r   r   r     s!     1. 1.s 1.C 1.J 1.r   c                	"   \         P                  ! V4      '       d   V P                  W4      # \        P                  ! V4      '       d   V P                  W4      # V P                  W!4      pVe   V# \        P                  ! V4      '       d   V P                  V4      # \        V4      '       d   V P                  V4      # V\        9   d   V P                  V4      # V\        9   d!   V P                  V P!                  V4      4      # V\"        9   d!   V P%                  V P!                  V4      4      # V\&        9   d!   V P)                  V P!                  V4      4      # V\*        9   d    V P,                  ! V P/                  V4      !  # V\0        9   d!   V P3                  W P!                  V4      4      # V\4        9   d!   V P7                  V P!                  V4      4      # V\8        9   d$   V P:                  ! V.V P/                  V4      O5!  # V\<        9   d&   V P;                  W P!                  V4      \>        4      # \A        V4      '       d   V PC                  W4      # V\D        9   d   V PG                  V4      # V\H        9   d!   V PK                  V P!                  V4      4      # V\L        9   d   V PO                  V4      # V\P        9   d   V PS                  V4      # V PT                  '       d   V PW                  V4      # V PY                  V4      # r   )-r  r  r  rU   r  r  r   r5   r  r  r8   _union_schemar   r  r   r,  r  r   r8  r   r=  r   r3  r  r   r  r   r  r  r  r  rB  r4   r  r   _subclass_schemar   r  r   r  r   r  r#  r  r  )r	  r   r6  r   s   &&& r   r  "GenerateSchema._match_generic_type  s   
 ##F++))#66&&v..**377==fJM**622//44V$$%%c**{"%%c**z!$$T%?%?%DEEy ##D$>$>s$CDD''))$*D*DS*IJJz!$$d&E&Ec&JKKz!$$V-G-G-LMM{"%%d&@&@&EFF}$''V1P1PQT1UVV}$''0J0J30OQTUU&!!**377z!((--~%(()C)CC)HII~%((--}$'',,   ..v66((--r   r4  Tc          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   r.  r   
field_infor}   r   r^   r4  r   r   zcore_schema.TypedDictFieldr   )r   s   "r   r   r     s<     
 

 
 #	
 
 
$
r   c          
         V P                  WV4      w  rV\        P                  ! TVP                  4       '       g   RMTVP                  \        VP                  4      VP                  VP                  VR7      # )zAPrepare a TypedDictField to represent a model or typeddict field.F)r4  serialization_excludevalidation_aliasserialization_aliasserialization_exclude_ifrY  )	rX  r.   typed_dict_fieldis_requiredexclude_convert_to_aliasesr  r  
exclude_if)r	  r.  r  r   r4  r   rY  s   &&&&$  r   _generate_td_field_schema(GenerateSchema._generate_td_field_schema  sn      44TzR++","8"8":":U","4"401L1LM * > >%/%:%:
 	
r   c               (    V ^8  d   QhRRRRRRRR/# )	r   r.  r   r  r}   r   r^   r   zcore_schema.ModelFieldr   )r   s   "r   r   r     s2     
 

 
 #	

 
 
r   c           
         V P                  WV4      w  rE\        P                  ! VVP                  \	        VP
                  4      VP                  VP                  VP                  VR7      # )z0Prepare a ModelField to represent a model field.)r  r  r  r  frozenrY  )	rX  r.   model_fieldr  r  r  r  r  r  r	  r.  r  r   r   rY  s   &&&&  r   r\  (GenerateSchema._generate_md_field_schema  sd      44TzR&&","4"401L1LM * > >%/%:%:$$
 	
r   c               (    V ^8  d   QhRRRRRRRR/# )	r   r.  r   r  r}   r   r^   r   zcore_schema.DataclassFieldr   )r   s   "r   r   r     s2     
 

 
 #	

 
$
r   c                F   V P                  WV4      w  rE\        P                  ! TTVP                  VP                  ;'       g    RVP
                  '       d   RMRVP                  \        VP                  4      VP                  VP                  VP                  VR7      # )zJPrepare a DataclassField to represent the parameter/field, of a dataclass.NF)	init	init_onlykw_onlyr  r  r  r  r  rY  )rX  r.   dataclass_fieldr  init_varr  r  r  r  r  r  r  r  s   &&&&  r   _generate_dc_field_schema(GenerateSchema._generate_dc_field_schema  s      44TzR** ))11T&...DE","4"401L1LM * > >%/%:%:$$
 	
r   c               (    V ^8  d   QhRRRRRRRR/# )	r   r.  r   r  r}   r   r^   r   z!tuple[CoreSchema, dict[str, Any]]r   )r   s   "r   r   r     s,     7% 7%7%%.7%<J7%	*7%r   c                	D  a a SP                   SP                  rTR  VV 3R llp\        VP                  P	                  4       V4       Uu. uF3  p\
        VP                  P                  ,          P                  V4      NK5  	  ppS P                  P                  V4      ;_uu_ 4        SP                  e   S P                  WEV,           VR7      p	MS P                  VWX,           4      p	RRR4       \        VP                  P	                  4       V4      p
\        V
4      '       d   RSn        V
 Uu. uF   qP                  P                   RJ g   K  VNK"  	  ppV
 Uu. uF  qV9  g   K  VNK  	  p
p\#        X	V4      p	\%        W4      p	SP'                  4       '       g   \)        SV	4      p	S P+                  V	\        VP,                  P	                  4       V4      4      p	\/        S4      w  r/ p\1        WVR7       W3# u upi   + '       g   i     EL#; iu upi u upi )c                    V ^8  d   QhRRRR/# r  r   )r   s   "r   r   9GenerateSchema._common_field_schema.<locals>.__annotate__  s     	 	j 	Z 	r   c                @   < SP                  V SP                  4      p V # r   )r  r  )r   r  r	  s   &r   set_discriminator>GenerateSchema._common_field_schema.<locals>.set_discriminator  s     77
@X@XYFMr   N)transform_inner_schemaTpydantic_js_updatespydantic_js_extra)rU  rY  r   rP  rf  r   r   r  _from_decoratorr  rJ  r  _apply_annotationsrR  $_validators_require_validate_defaultvalidate_default	each_itemr   r   r  wrap_default_apply_field_serializersrQ  r   rY   )r	  r.  r  r   source_typer   r  	decoratorvalidators_from_decoratorsr   this_field_validatorsr   r   r  r	  core_metadatas   f&f&            r   rX  #GenerateSchema._common_field_schema  s    $.#8#8*:M:M[	 	 B*B]B]BdBdBfhlm&
m	 y~~223CCINm 	# &

 ""''--''300/I!Ibs 1  00< . !EZEZEZEaEaEcei j/0EFF*.J'+@]+@aFFDTDTX\D\+@],A c,AqNbEb,A c+F4HI!&@
 %%''!*f5F..89U9U9\9\9^`de
 2[[e1f.(*Vg	
 $$[&

 .--$  ^ cs+   
9G?(AH2HHH+HH	c                    V ^8  d   QhRRRR/# r   
union_typer   r   r   r   )r   s   "r   r   r   -  s       0F r   c                    V P                  VRR7      p. pRpV F?  pVe   V\        P                  J d   RpK  VP                  V P	                  V4      4       KA  	  \        V4      ^8X  d   V^ ,          pMy. pV F[  p\        \        VP                  R/ 4      4      P                  R4      p	V	e   VP                  W34       KJ  VP                  V4       K]  	  \        P                  ! V4      pV'       d   \        P                  ! V4      pV# )zGenerate schema for a Union.Tr3  FrY  pydantic_internal_union_tag_key)rV  rU   r  r  r*  r  r#   rX   r   r.   r  nullable_schema)
r	  r  r  choicesr   argschoices_with_tagschoicetags
   &&        r   r  GenerateSchema._union_schema-  s    44Z$4O$&C{c]%;%;;t33C89	  w<1
AKM!<J)CDHHIjk?%,,f];%,,V4 " (():;A++A.Ar   c                    V ^8  d   QhRRRR/# )r   r   r1   r   r(   r   )r   s   "r   r   r   H  s     H H= HZ Hr   c           	     	   V P                   P                  V4      ;_uu_ 4       w  r#Ve   VuuR R R 4       # \        V4      ;'       g    Tp\        V4      pV P                  P                  V4      ;_uu_ 4         \        P                  ! VP                  .V P                  O5!  p\        Ye4      pT P                  T4      pTR,          R8w  g   Q hY(R&   R R R 4       T P                   P                  X4      uuR R R 4       #   \         d   p\        P                  ! T4      ThR p?ii ; i  + '       g   i     L_; i  + '       g   i     R # ; i)Nr   r)  rX  )r  rE  r3   rp   r  rJ  rU   	eval_type	__value__r  rM  rD   rN  rq   r*  rH  )	r	  r   rX  rc  r6  r   rU  r  r   s	   &&       r   r  &GenerateSchema._type_alias_type_schemaH  s   YY((--1D#'# .- %/sO$:$:sF4S9L""''//P!.!8!89I9I!bDLaLa!bJ +:D
--j9f~666 #u 0 99??G! .- ! P5EEaHaOP 0/ .--sR   EE	1E:D/	<,D(0D/	"ED,D''D,,D/	/D?:EE	c                    V ^8  d   QhRRRR/# )r   literal_typer   r   r(   r   )r   s   "r   r   r   [  s      C J r   c                `   \        \        VRRR7      4      pV'       g   Q RV 24       h\        P                  ! V4      pV P                  P
                  '       dS   \        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \        P                  ! R V4      pV# )zGenerate schema for a Literal.Feager)
type_checkunpack_type_aliasesz(literal "expected" cannot be empty, obj=c              3  B   "   T F  p\        V\        4      x  K  	  R # 5ir   )r  r
   )r  r   s   & r   r  1GenerateSchema._literal_schema.<locals>.<genexpr>a  s     7^U]PQ
1d8K8KU]s   Tc                J    \        V \        4      '       d   V P                  # T # r   )r  r
   rZ  )r   s   &r   rG  0GenerateSchema._literal_schema.<locals>.<lambda>c  s    Z4%8%8!''?a?r   )rd  r7   r.   literal_schemar  rl  anyrm  )r	  r*  expectedr   s   &&  r   r  GenerateSchema._literal_schema[  s    *<E_fghRCL>RRx++H5///CC7^U]7^CCC7^U]7^4^4^ AA?F r   c               $    V ^8  d   QhRRRRRR/# )r   typed_dict_clsr   r6  r   r   r   )r   s   "r   r   r   h  s,     IL IL ILc ILF\ ILr   c                ^   \        4       pV P                  P                  V4      ;_uu_ 4        V P                  P	                  V4      ;_uu_ 4       w  ppVe   VuuRRR4       uuRRR4       # \        V4      pVe   Tp\        '       g(   \        V4      P                  R8X  d   \        RRR7      h \        VR4      pV P                  P                  V4      ;_uu_ 4        V P                  P                  VP                  R7      pVP                   p	/ p
\"        P$                  ! VRR	7      pVP'                  V P                  4       V P                  P(                  '       d   \+        VR
R7      pMRp \,        P.                  ! WP0                  R7      p. pTP9                  4        F  w  ppTP:                  ! T\<        P>                  R7      p\A        TPB                  T4      Tn!        TT	9   ;'       g    RTPD                  9   ;'       d    RTPD                  9  pRTPD                  9   d   TPG                  T4       Te$   TPH                  f   TT9   d   TT,          Tn$        \K        T P                  TT4       T PM                  TTTTR7      T
T&   K  	  T'       dn   RPO                  R T 4       4      p\Q        T4      ^8  p\R        PT                  ! RT'       d   RMR RT RTP                  : RT'       d   RMR R2	\V        4       RpRp\Y        \[        TRR4      4      p\[        TR\\        P^                  4      pT'       d   RpRpM9\`        Pb                  ! T4      '       g   R pT Pe                  \A        TT4      4      pT P                  Pf                  ;pR'9   d   T'       d4   TR 8X  d-   \R        PT                  ! R!TPh                  : R"2\j        R#7       MQ\`        Pb                  ! T4      '       g4   TR8X  d-   \R        PT                  ! R!TPh                  : R$2\j        R#7       MTp\l        Pn                  ! T
TTPp                  Ps                  4        Uu. uF  pT Pu                  TTPv                  4      NK!  	  upTTTTR%7      pT Py                  TTPz                  Ps                  4       4      p\}        TTP~                  Ps                  4       R&4      pT P                  P                  T4      uuRRR4       uuRRR4       uuRRR4       #   \         d    Rp ELmi ; i  \2         d   p\4        P6                  ! T4      ThRp?ii ; iu upi   + '       g   i     M; i RRR4       M  + '       g   i     M; iRRR4       R#   + '       g   i     R# ; i)(a  Generate a core schema for a `TypedDict` class.

To be able to build a `DecoratorInfos` instance for the `TypedDict` class (which will include
validators, serializers, etc.), we need to have access to the original bases of the class
(see https://docs.python.org/3/library/types.html#types.get_original_bases).
However, the `__orig_bases__` attribute was only added in 3.12 (https://github.com/python/cpython/pull/103698).

For this reason, we require Python 3.12 (or using the `typing_extensions` backport).
Nr  zXPlease use `typing_extensions.TypedDict` instead of `typing.TypedDict` on Python < 3.12.ztyped-dict-versionr   __pydantic_config__r+  Freplace_wrapped_methodsT)use_inspectr   _sourcer4  not_required	read_onlyr3  , c              3  8   "   T F  p\        V4      x  K  	  R # 5ir   repr)r  fs   & r   r  4GenerateSchema._typed_dict_schema.<locals>.<genexpr>  s     +M_DGG_   Itemr  r    z on TypedDict class areiszk using the `ReadOnly` qualifier. Pydantic will not protect items from any mutation on dictionary instances.r  
__closed____extra_items__forbidr2  zTypedDict class zk is closed, but 'extra' configuration is set to `'allow'`. The 'extra' configuration value will be ignored.r  zu allows extra items, but 'extra' configuration is set to `'forbid'`. The 'extra' configuration value will be ignored.)r  r@  extra_behaviorrA  rX  r?  all)r2  rP  )Ars   r  rJ  r  rE  rp   _SUPPORTS_TYPEDDICTr   r   rE   re   AttributeErrorr   r  rK  r   __required_keys__r^   buildupdate_from_configuse_attribute_docstringsri   rU   get_cls_type_hintsr  rM  rD   rN  r   from_annotationr6   
TYPED_DICTrq   rU  _qualifiersr  r   rn   r  joinr  r   r   r  r   r   typing_extensionsNoExtraItemsr5   is_noextraitemsr*  extrar   rO   r.   typed_dict_schemar@  rf  r]  rQ  r_  r`  rY  rT  rH  )r	  r8  r6  r}   typed_dict_refrc  r   r?  rK  required_keysr   r   field_docstringsr   r  readonly_fields
field_namerU  r  r4  fields_reprpluralrQ  rA  	is_closedextra_itemsconfig_extrarg  	td_schemar   s   &&&                           r   r  !GenerateSchema._typed_dict_schemah  s,    -.	 !!&&~66II''77 < '# 87 76 5^DL!!'&&4+?+J+Jh+V'n- 
 -E^Uj,k ++0088"22>>^E\E\>]0>0P0P@B+11.Z_`
--d.B.BC''@@@'B>_c'd$'+$P"/"B"B>_p_p"qK .0.9.?.?.A*J
!*!:!::O_OjOj!kJ,9*:O:OQ],^J) #m3[[zZE[E[7[ G  G(
0F0FF  #j&<&<<'..z: )4&22:&*::1A*1M
.,T-A-A:zZ)-)G)G"J
X *H *F:&% /B, #"&))+M_+M"MK 1Q6FMMfs"5Q{mCWXfXoXoWrrs$*55 6EE $	 =E37 !u!MN	%n6GIZIgIgh%-N$(M'77DD%,N$($8$8{T`9a$bM$($8$8$>$>>LCVV \W%< .~/J/J.M Nd d%@
 ,;;KHH\]eMe .~/J/J.M Ne e%@ *6'99& ",!;!;!B!B!D%!DA 33Az7S7ST!D% $2"/&&	 66y*B^B^BeBeBgh/
8S8S8Z8Z8\^cdyyCCFKE 983 87 76. " ( ! P5EEaHaOPJ%m 9883 8777 7666s   $V	U>	
V0U>	'U>	5T#U>	$BU!9!T2A U!;U!BU!&AU!A-U!1AU!3AU!A#U!%%U
A5U!?
U>		
VT/+U>	.T//U>	2U=UUU!!U1,U>	5	V>V	VV,	c               $    V ^8  d   QhRRRRRR/# )r   namedtuple_clsr   r6  r   r   r   )r   s   "r   r   r     s'     ,H ,H ,Hc ,HF\ ,Hr   c                l   V P                   P                  V4      ;_uu_ 4        V P                  P                  V4      ;_uu_ 4       w  ppVe   VuuRRR4       uuRRR4       # \	        V4      pVe   Tp \
        P                  ! WP                  R7      pTP                   Uu/ uF  qTP                  T\        4      bK  	  ppT'       d.   TP                  4        UU	u/ uF  w  rT\        Y4      bK  	  ppp	\         P"                  ! TP                  4        UU	u. uFP  w  rT P%                  TT	\&        P(                  TP*                  P                  T\,        P.                  4      R7      NKR  	  up	pRR/R7      p
\         P0                  ! YTR7      pT P                  P3                  T4      uuRRR4       uuRRR4       #   \         d   p\        P                  ! T4      ThRp?ii ; iu upi u up	pi u up	pi   + '       g   i     M; i RRR4       R#   + '       g   i     R# ; i)z!Generate schema for a NamedTuple.Nr>  )r  r   'pydantic_js_prefer_positional_argumentsTrc  )rX  )r  rJ  r  rE  rp   rU   rY  r  rM  rD   rN  _fieldsr   r   r   rq   r.   arguments_schema_generate_parameter_schemar6   NAMED_TUPLE_field_defaultsr   emptycall_schemarH  )r	  rp  r6  namedtuple_refrc  r   r   r  rg  rU  rt  r   s   &&&         r   r  !GenerateSchema._namedtuple_schema  s    !!&&~66II''77 < '# 87 76 5^DL!!'L+>>~[l[lm [iZpZpqZpJ{z3'GGZpKq 3>2C2C2E2E.
 j GG2E  
  +;; 3>2C2C2E 3F.
 33""/;; . > > B B:y _	 4  3F DTJ  !,,-=SabF99??GQ 87 76  L1AA!D!KL r9 877 7666sx   $H"	H	
H"&H	8!G	H	'G3H	#G8:&H	 AG>6>H	4
H"	G0G++G00H	HH""H3	c               0    V ^8  d   QhRRRRRRRRR	R
RR/# )r   r.  r   rU  z	type[Any]r  r6   r   r   r  zJLiteral['positional_only', 'positional_or_keyword', 'keyword_only'] | Noner   zcore_schema.ArgumentsParameterr   )r   s   "r   r   r   !  sG     +  + +  +  !	+ 
 +  Y+  
(+ r   c                B   \        4       pV\        P                  J d   VP                  ! W#R7      pMVP                  ! W$VR7      pVP
                  f   Q R4       h\        V P                  W4       V P                  P                  V4      ;_uu_ 4        V P                  VP
                  V.RR7      pRRR4       VP                  4       '       g   \        VX4      p\        P                  ! VXV\        VP                   4      R7      p	V	#   + '       g   i     La; i)zGenerate the definition of a field in a namedtuple or a parameter in a function signature.

This definition is meant to be used for the `'arguments'` core schema, which will be replaced
in V3 by the `'arguments-v3`'.
r?  Nz<field.annotation should not be None when generating a schemaF'check_unsupported_field_info_attributes)r  alias)rs   r   rx  rZ  from_annotated_attributerU  rn   r  r  rJ  r  r  r  r.   arguments_parameterr  r  )
r	  r.  rU  r  r   r  r}   r   r   parameter_schemas
   &&&&&&    r   ru  )GenerateSchema._generate_parameter_schema!  s     -.	ioo%--jIE66zTZ[E+k-kk+ !5!5tC""''--,,   9> - F .   ""!%0F&::%e&<&<=	
  ) .-s    DD	c               0    V ^8  d   QhRRRRRRRRR	RR
R/# )r   r.  r   rU  r   r  r6   r  zLiteral['positional_only', 'positional_or_keyword', 'keyword_only', 'var_args', 'var_kwargs_uniform', 'var_kwargs_unpacked_typed_dict']r   r   z core_schema.ArgumentsV3Parameterr   )r   s   "r   r   r   N  sF     0  0 0  0  !	0 

0  0  
*0 r   c                   \        4       pV\        P                  J d   VP                  ! W#R7      pMVP                  ! W%VR7      p\        V P                  W4       V P                  P                  V4      ;_uu_ 4        V P                  VP                  V.RR7      pRRR4       VP                  4       '       g   \        VX4      p\        P                  ! VXV\        VP                   4      R7      p	V	#   + '       g   i     La; i)zGenerate the definition of a parameter in a function signature.

This definition is meant to be used for the `'arguments-v3'` core schema, which will replace
the `'arguments`' schema in V3.
r?  Fr~  N)r.  r   r  r  )rs   r   rx  rZ  r  rn   r  r  rJ  r  rU  r  r  r.   arguments_v3_parameterr  r  )
r	  r.  rU  r  r  r   r}   r   r   r  s
   &&&&&&    r   _generate_parameter_v3_schema,GenerateSchema._generate_parameter_v3_schemaN  s    ( -.	ioo%--jIE66zTZ[E !5!5tC""''--,,   9> - F .   ""!%0F&==%e&<&<=	
  ) .-s     C99D		c                    V ^8  d   QhRRRR/# )r   
tuple_typer   r   r   r   )r   s   "r   r   r     s     _ _ _0F _r   c                  a \        V4      oV P                  V4      pS'       d;   V'       d3   \        ;QJ d    . V3R lV 4       F  NK  	  5M! V3R lV 4       4      pV'       gN   V\        9   d-   \        P
                  ! \        P                  ! 4       .^ R7      # \        P
                  ! . 4      # VR,          \        J dK   \        V4      ^8X  d0   \        P
                  ! V P                  V^ ,          4      .^ R7      # \        R4      h\        V4      ^8X  d%   V^ ,          R8X  d   \        P
                  ! . 4      # \        P
                  ! V Uu. uF  q0P                  V4      NK  	  up4      # u upi )zIGenerate schema for a Tuple, e.g. `tuple[int, str]` or `tuple[int, ...]`.c              3  <   <"   T F  p\        VS4      x  K  	  R # 5ir   )rq   )r  paramr   s   & r   r  /GenerateSchema._tuple_schema.<locals>.<genexpr>  s     R6%===6s   )r   z&Variable tuples can only have one typer   r   )rp   rV  r   r   r.   tuple_schemar   Ellipsisr  r*  
ValueError)r	  r  paramsr  r   s   &&  @r   r  GenerateSchema._tuple_schema  s&    1<66zBFUR6RUUR6RRF [("//1G1G1I0J`abb #//33BZ8#6{a"//1E1EfQi1P0Qghii !!IJJ[A&)r/ ++B//++V\,]V\U-A-A%-HV\,]^^,]s   E8c                   V ^8  d   QhRR/# r   r   r   r   )r   s   "r   r   r     s     
 
4 
r   c                	d    \         P                  ! \         P                  ! \        4      R RR7      # )is_typezInput should be a typer  )r.   custom_error_schemarn  r   r  s   &r   r  GenerateSchema._type_schema  s)    ..**40'!9
 	
r   c                   V ^8  d   QhRR/# r  r   )r   s   "r   r   r     s     	
 	
"8 	
r   c                r    ^RI Hp RR ./p\        P                  ! V\        P                  ! 4       VR7      # )z/Generate schema for a zone_info.ZoneInfo object)validate_str_is_valid_iana_tzrU  c                    R RRR/# )r   r  r   zoneinfor   r  s   &&r   rG  1GenerateSchema._zoneinfo_schema.<locals>.<lambda>  s    fhPXZd=er   r   rY  )r  r  r.   r  r  )r	  r  rY  s   &  r   r  GenerateSchema._zoneinfo_schema  s8    >+.e-fg;;)%::<
 	
r   c                    V ^8  d   QhRRRR/# r  r   )r   s   "r   r   r     s     ] ]C ]<R ]r   c           	         V P                  VRR7      p\        P                  ! V Uu. uF  q P                  \        V,          4      NK   	  up4      # u upi )z*Generate schema for `type[Union[X, ...]]`.Tr3  )rV  r.   r  r*  r   )r	  r  r  s   && r   _union_is_subclass_schema(GenerateSchema._union_is_subclass_schema  sJ    44Z$4O''VZ([VZd)=)=d4j)IVZ([\\([s   $Ac                    V ^8  d   QhRRRR/# )r   type_r   r   r   r   )r   s   "r   r   r     s     %> %>c %>.D %>r   c           
     X   V P                  V4      p\        P                  ! V4      ;'       g    Tp\        P                  ! V4      '       d   V P                  4       # \        P                  ! V4      '       d'   V P                  \        VP                  ,          4      # \        P                  ! V4      '       d   VP                  '       d`   \        \        VP                  4      4      '       d   V P                  VP                  4      # \        P                   ! VP                  4      # VP"                  '       dJ   \        P$                  ! VP"                   Uu. uF  q0P                  \        V,          4      NK   	  up4      # V P                  4       # \        \        V4      4      '       d   V P                  V4      # \        P&                  ! V4      '       d   V P)                  V4      p\        P*                  ! V4      '       d3   \-        RV: R\.        P0                  ! \        V4      4       R2RR7      h\2        P4                  ! V4      '       g8   Vf%   \        P                   ! \        P6                  4      # \9        RV: 24      h\        P                   ! V4      # u upi )z-Generate schema for a type, e.g. `type[int]`.z`Subscripting `type[]` with an already parametrized type is not supported. Instead of using type[z], use type[z].Nr   zExpected a class, got )r  rU   annotated_typer5   r  r  r  r*  r   r'  
is_typevar	__bound__r8   r3   r  r.   is_subclass_schema__constraints__r  r  rn  is_generic_aliasrE   rT   display_as_typerg  r  r  r   )r	  r  
type_paramcs   &&  r   r  GenerateSchema._subclass_schema  s   //6
 #11*=KK
  ,,$$&&,,Z88''Z-A-A(BCC&&z22###":j.B.B#CDD99*:N:NOO"55j6J6JKK+++"//XbXrXr0sXrST1E1Ed1g1NXr0stt((**Z
34411*==%%j11!44Z@
--j99'--7N,uG\G\]ghr]sGtFuuwy 
 ??:.. %&99-:P:PQQ"8 GHH11*==) 1ts   $J'c                    V ^8  d   QhRRRR/# )r   r'  r   r   r   r   )r   s   "r   r   r     s     
 
3 
3I 
r   c                   ^RI Hp V P                  V4      p\        P                  ! V4      p\        V4      p\        P                  ! \        P                  RR7      p\        P                  ! V4      '       g3   ^RIHp \        P                  ! V\        P                  ! Wt4      .4      p\        P                  ! W#RR7      p\        P                   ! WVVR7      # )z5Generate schema for a Sequence, e.g. `Sequence[int]`.r  Sequencer  )sequence_validatorTr  )rO  r  r   )r  r  r*  r.   r)  r{   rn  r  r  r5   r  r  r  r  r  r  r  )	r	  r'  r  r  r)  rO  r  r  r   s	   &&       r   r  GenerateSchema._sequence_schema  s    =//
;!--.>?$[1#66vQ[\$$Z007'44 K KL^ lmM $GG'4
 00#P]
 	
r   c                    V ^8  d   QhRRRR/# )r   r  r   r   zcore_schema.GeneratorSchemar   )r   s   "r   r   r     s     M Mc M.I Mr   c                n    V P                  V4      p\        P                  ! V P                  V4      4      # )z$Generate a schema for an `Iterable`.)r  r.   generator_schemar*  )r	  r  	item_types   && r   r  GenerateSchema._iterable_schema  s.    ..u5	++D,@,@,KLLr   c                    V ^8  d   QhRRRR/# )r   pattern_typer   r   r   r   )r   s   "r   r   r     s     r rC r4J rr   c                	   ^RI Hp RR ./p\        P                  ! \	        R4      R\        P
                  ! 4       R7      pV\        P                  J g   V\        P                  J d#   \        P                  ! VP                  WCR7      # V P                  VRR	7      ^ ,          pV\        J d#   \        P                  ! VP                  WCR7      # V\        J d#   \        P                  ! VP                  WCR7      # \!        R
V: R24      h)rv  )r  rU  c                    R RRR/# )r   r  r   regexr   r  s   &&r   rG  0GenerateSchema._pattern_schema.<locals>.<lambda>  s    fhPXZa=br   patternr   )r   return_schemar  Tr3  r  r   )r   r  r.   r   r   r  r  Patternrer  pattern_either_validatorrV  r   pattern_str_validatorr  pattern_bytes_validatorrC   )r	  r  r  rY  serr  s   &&    r   r  GenerateSchema._pattern_schema  s    !+.b-cd>>y!V;CYCYC[
 6>>)\RZZ-G??44C  55 6 
  C<??11  e^??333  02^_k^nno0pqqr   c                   V ^8  d   QhRR/# r  r   )r   s   "r   r   r     s     

 

"8 

r   c           
     	b   \         P                  ! \         P                  ! \         P                  ! \         P                  ! 4       \         P
                  ! \        P                  P                  4      .4      \         P
                  ! \        P                  P                  4      R 7      RRR7      # )r  r  zInput should be hashable)r   r  r  )	r.   r  r  r  r   rn  r  abcHashabler  s   &r   r  GenerateSchema._hashable_schema  sy    ..44'44 ++-{/M/MkooNfNf/gh *<<[__=U=UV	 ,!;	
 		
r   c               $    V ^8  d   QhRRRRRR/# )r   	dataclassztype[StandardDataclass]r6  ztype[StandardDataclass] | Noner   r   r   )r   s   "r   r   r   !  s.     xL xL0xL:XxL	xLr   c                \  a a S P                   P                  V4      ;_uu_ 4        S P                  P                  V4      ;_uu_ 4       w  ppVe   VuuRRR4       uuRRR4       # VP                  P                  R4      pVe   \        V\        4      '       g   VR,          R8X  d   S P                  P                  V4      p\        V4      pV'       d0   S P                  P                  V4      uuRRR4       uuRRR4       # VuuRRR4       uuRRR4       # \        V4      pVe   Tp\        VRR4      p^RIHp	 S P                  P                  V4      ;_uu_ 4        S P                   P                  V4      ;_uu_ 4        V	! V4      '       d   VP#                  4       '       dv   VP$                  P'                  4        U
Uu/ uF  w  rV
\)        V4      bK  	  pp
pV'       d6   VP+                  4        F!  pVP,                  ! V.S P.                  O5!   K#  	  MG \1        TS P2                  S P                  T;'       g    / R7      pM\;        VVS P2                  R7      pS P2                  P<                  R	8X  d;   VP'                  4        F&  w  rVP>                  R
J g   K  \A        RV R2RR7      h	  VP                  P                  R4      oSf4   \B        PD                  ! VR
R7      oSPG                  S P2                  4       \I        VV 3R lVP'                  4        4       R R7      p\K        VR4      p\K        VR4      p\L        PN                  ! VPP                  TSPR                  P+                  4        Uu. uF  pS PU                  VSPV                  4      NK!  	  upVR7      p\Y        VSPZ                  P+                  4       4      pSP\                  P+                  4       p\_        VVR4      pS P2                  Pa                  VPP                  R7      p\L        Pb                  ! TTTTT\        Pd                  ! V4       Uu. uF  qPf                  NK  	  upVVS P                   Ph                  Pj                  R7	      pS Pm                  VSPn                  P+                  4       4      p\_        VVR4      pS P                  P                  V4      uuRRR4       uuRRR4       uuRRR4       uuRRR4       # u upp
i   \4         d   p\6        P8                  ! T4      ThRp?ii ; iu upi u upi   + '       g   i     M; iRRR4       M  + '       g   i     M; iRRR4       M  + '       g   i     M; iRRR4       R#   + '       g   i     R# ; i)z Generate schema for a dataclass.Nr(  r   r)  r:  )is_pydantic_dataclassr0  )r   r   r2  FzField zd has `init=False` and dataclass has config setting `extra="allow"`. This combination is not allowed.z dataclass-init-false-extra-allowr   rO  r;  c              3  L   <"   T F  w  rSP                  WS4      x  K  	  R # 5ir   )r  )r  r   r   r   r	  s   &  r   r  3GenerateSchema._dataclass_schema.<locals>.<genexpr>s  s%     aR`$!T33A*EER`s   !$c                (    V P                  R 4      RJ# )r  F)r   )r  s   &r   rG  2GenerateSchema._dataclass_schema.<locals>.<lambda>t  s    !%%	"2%"?r   )key__post_init__	__slots__)r@  collect_init_onlyr8  r+  )r;  r>  rX  r   slotsr?  r  rD  )8r  rJ  r  rE  rF  r   r  rt   rG  rZ   rH  rp   r   r  r  r  r   rL  r,  r   r   rf  apply_typevars_mapr  rk   r  rM  rD   rN  rj   ra  r  rE   r^   rV  rW  sortedhasattrr.   dataclass_args_schemar   r@  r]  rQ  r   r^  rT  rY  rK  dataclass_schemar   r.  r  r  r_  r`  )r	  r  r6  dataclass_refrc  r   rX  r   r?  r  f_namer  r   r   r  rg  r  has_post_init	has_slotsrg  args_schemar   rT  rK  	dc_schemar   s   f&&                      @r   r   GenerateSchema._dataclass_schema!  s   
 !!&&y11II''	22 7 '# 32 21 ''++,FGF!*V^*L*L&>]2!YY99&AFfo99GGO 32 21" "! 32 21& 5Y?L!"	
 Y(=tDF;""''	22D4N4N4S4STZ4[4[(33 ==?? PYOlOlOrOrOt"Ot9KFD$44Ot  " ()/ % 8 8 ^H]H] ^ *9X%= )/3/C/C,0,=,=-9-?-?R	&F 6!%1'+';';F ''--8-3\\^)
 ::."3"( 5C !D%G#  .< '//334MN
%!/!5!5iY^!_J11$2F2FG aRXR^R^R`a? !(	? C#I{;	)??&& ",!;!;!B!B!D%!DA 33Az7S7ST!D% '4  0Z=W=W=^=^=`a#-#>#>#E#E#G 5lDTV]^"22>>YEWEW>X'88 #)+%4?4F4Fy4QR4Q5JJ4QR#&  55::AA	 66y*B^B^BeBeBgh/8H'RyyCCFKk 5\4[22; 32 21J"  ) X"="M"Ma"PVWWXF%( SY 5\4[2222; 3222 2111s   $V
	U=	
V(BU=	3
VU=		
VAU=	%$U!	$U.UT"AU$$T	TAU,CU%T;-B'UU "(A:U"
U!,
U=	6
VUT8T33T88UUU!	U=	!U1,U=	4	V=VVV+	c                    V ^8  d   QhRRRR/# )r   functionValidateCallSupportedTypesr   zcore_schema.CallSchemar   )r   s   "r   r   r     s     
 
%? 
DZ 
r   c                x   V P                  V4      pRpV P                  pVP                  '       dr   \        P                  ! V4      pVP
                  pWeP                  JdA   V P                  w  rx\        P                  ! WVR0R7      p	V P                  V	R,          4      p\        P                  ! VVVR7      # )zcGenerate schema for a Callable.

TODO support functional validators once we support them in Config
Nr   )globalnslocalnsinclude_keys)r  )_arguments_schemar  validate_returnrU   signature_no_evalreturn_annotationrx  r  get_function_type_hintsr*  r.   ry  )
r	  r  rt  r  r   sigreturn_hintr  r  
type_hintss
   &&        r   r  GenerateSchema._call_schema  s    
  11(;7;--)))11(;C//K))+$($9$9!*BBPXz
 !% 4 4Z5I J&&'
 	
r   c               $    V ^8  d   QhRRRRRR/# )r   r  r  parameters_callbackParametersCallback | Noner   zcore_schema.ArgumentsSchemar   )r   s   "r   r   r     s)     I
 I
2I
IbI
	$I
r   c                z   \         P                  R\         P                  R\         P                  R/p\        P
                  ! V4      pV P                  w  rV\        P                  ! WVR7      p. pRp	Rp
Rp\        VP                  P                  4       4       EFi  w  pw  rVP                  VP                  J d!   \        P                  ! \        \        4      pMW},          pVe   V! WV4      pVR8X  d   Ka  VP!                  VP"                  4      pVe@   V P%                  W\&        P(                  VP*                  V4      pVP-                  V4       K  VP"                  \         P.                  8X  d   V P1                  V4      p	K  VP"                  \         P2                  8X  g   Q VP"                  4       h\        P4                  ! V4      pVEe   \7        V4      ;'       g    Tp\9        V4      '       g   \;        RV: 2RR	7      hVP                  P                  4        UUu0 uF(  w  rVP"                  \         P                  8w  g   K&  VkK*  	  pppVP=                  VP>                  4      pV'       dS   \;        R
VP@                  : R\C        V4      ^8  d   RMR RRPE                  R \G        V4       4       4       2RR	7      hRpV PI                  V\7        V4      4      p
EKV  RpV P1                  V4      p
EKl  	  \J        PL                  ! VV	VV
V PN                  PP                  R7      # u uppi )z Generate schema for a Signature.positional_onlypositional_or_keywordkeyword_onlyr  r  Nskip7Expected a `TypedDict` class inside `Unpack[...]`, got unpack-typed-dictr   Typed dictionary  overlaps with parameterr  r   rK  rC  c              3  8   "   T F  p\        V4      x  K  	  R # 5ir   rE  r  ps   & r   r  3GenerateSchema._arguments_schema.<locals>.<genexpr>       (U:TQa:TrI  overlapping-unpack-typed-dictzunpacked-typed-dictuniform)var_args_schemavar_kwargs_modevar_kwargs_schemavalidate_by_name))r   POSITIONAL_ONLYPOSITIONAL_OR_KEYWORDKEYWORD_ONLYrU   r  r  r  	enumerate
parametersr   rU  rx  r  r#   r   r   kindru  r6   FUNCTIONr   r  VAR_POSITIONALr*  VAR_KEYWORDunpack_typer3   r4   rE   intersection__annotations__r   r  r]  r  r  r.   rt  r  r  )r	  r  r  mode_lookupr  r  r  r  arguments_listr  r  r  ir.  r
  rU  resultparameter_mode
arg_schemar  r6  non_pos_only_param_namesoverlapping_paramss   &&&                    r   r   GenerateSchema._arguments_schema  s   
 %%'8++-D""Nr
 --h7 11"::8`gh
?A9=;?<@%cnn&:&:&<=LAy||syy(#[[c2
'-
".,QjAV#(__QVV4N)!<<&6&?&?N
 %%j19333"&"6"6z"Bvv!6!66>>6+77
C*'4CCF'///UVaUde!4 
 -0NN,@,@,B0,BaffPYPiPiFi,B - 0 *B)N)NvOeOe)f&)///BBZ&)*<&=&BsK1#yy(U&AS:T(UUVX "A	  '<O(,(?(?ZXcMd(e%&/O(,(<(<Z(H%] >` ++++/!11BB
 	
%0s   *#L7L7c               $    V ^8  d   QhRRRRRR/# )r   r  r  r  r  r   zcore_schema.ArgumentsV3Schemar   )r   s   "r   r   r     s)     B
 B
2B
IbB
	&B
r   c                	   \         P                  R \         P                  R\         P                  R\         P                  R/p\
        P                  ! V4      pV P                  w  rV\
        P                  ! WVR7      p. p\        VP                  P                  4       4       EF  w  p	w  rVe   V! WVP                  4      pVR8X  d   K)  VP                  \         P                  J d!   \        P                  ! \         \         4      pMWz,          pVP#                  VP$                  4      pVEfM   VP$                  \         P&                  8X  g   Q VP$                  4       h\
        P(                  ! V4      pVEe    \+        V4      ;'       g    Tp\-        V4      '       g   \/        RV: 2RR7      hVP                  P                  4        U
Uu0 uF(  w  rVP$                  \         P                  8w  g   K&  V
kK*  	  pp
pVP1                  VP2                  4      pV'       dS   \/        R	VP4                  : R
\7        V4      ^8  d   RMR RRP9                  R \;        V4       4       4       2RR7      hRpTpMRpVP=                  V P?                  X
V\@        PB                  VXPD                  R7      4       EK  	  \F        PH                  ! VV PJ                  PL                  R7      # u upp
i )r  r   var_argsr  r  r  r  r  r   r  r  r  r   rK  rC  c              3  8   "   T F  p\        V4      x  K  	  R # 5ir   rE  r	  s   & r   r  6GenerateSchema._arguments_v3_schema.<locals>.<genexpr>0  r  rI  r  var_kwargs_unpacked_typed_dictvar_kwargs_uniform)r   )r  )'r   r  r  r  r  rU   r  r  r  r  r  r   rU  rx  r  r#   r   r   r  r  r  r3   r4   rE   r  r  r   r  r]  r  r  r  r6   r  r   r.   arguments_v3_schemar  r  )r	  r  r  r  r  r  r  r  parameters_listr!  r.  r
  r"  rU  r#  r  r6  r%  r&  s   &&&                r   _arguments_v3_schema#GenerateSchema._arguments_v3_schema  s    %%'8++-D$$j""N	
 	 --h7 11"::8`gh
BD%cnn&:&:&<=LAy".,QallCV#||y.#[[c2
'-
(__QVV4N%vv!6!66>>6+77
C*'4CCF'///UVaUde!4 
 -0NN,@,@,B0,BaffPYPiPiFi,B - 0 *B)N)NvOeOe)f&)///BBZ&)*<&=&BsK1#yy(U&AS:T(UUVX "A	  &FN!,J%9N""22*&6&?&?YZYbYb 3 O >Z ..!11BB
 	
-0s   #K-:K-c                    V ^8  d   QhRRRR/# )r   typevarztyping.TypeVarr   r   r   )r   s   "r   r   r   C  s     ( (^ (H^ (r   c                	    VP                  4       pV'       d   V P                  VP                  4      #  VP                  ;p'       d'   V P                  \        P                  V,          4      # VP                  ;p'       d-   V P                  V4      p\        P                  ! R 4      VR&   V# \        P                  ! 4       #   \         d     Li ; i)r4  r   )has_defaultr*  __default__rT  r  r  r  r"   r  r.   rj  r   )r	  r4  r6  constraintsr   r   s   &&    r   r  ,GenerateSchema._unsubstituted_typevar_schemaC  s    	A!--/K
 ++G,?,?@@  "111;1%%fll;&?@@%%%5%))%0F&1&C&CE&JF?#M%%''  		s   C CCc               $    V ^8  d   QhRRRRRR/# )r   rg  zDecorator[ComputedFieldInfo]rQ  z2dict[str, Decorator[FieldSerializerDecoratorInfo]]r   zcore_schema.ComputedFieldr   )r   s   "r   r   r   W  s)     0
 0
'0
 N0
 
#	0
r   c                	f   VP                   P                  \        Jd   VP                   P                  pM7 \        P                  ! VP
                  V P                  P                  R 7      pV\        J d   \        RRR7      h\        W0P                  4      p\        P                  ! VP                   VR7      Vn         V P!                  V4      pV P#                  V\%        VP'                  4       VP(                  4      4      p\+        VP                   4      w  rg/ p\-        TRR/V'       d   TM/ CVR7       VP                   P.                  p	\0        P2                  ! VP(                  VVP                   P4                  V	VR	7      #   \         d   p\        P                  ! T4      ThRp?ii ; i)
r  NzComputed field is missing return type annotation or specifying `return_type` to the `@computed_field` decorator (e.g. `@computed_field(return_type=int | str)`)zmodel-field-missing-annotationr   )return_typereadOnlyTr  )r  r  r  rY  )r   r=  r,   rQ   get_callable_return_typefuncr  localsrM  rD   rN  rE   rq   r  r  replacer*  r  r   rf  r   r   rY   r  r.   computed_fieldr  )
r	  rg  rQ  r=  r  return_type_schemar  r	  r  r  s
   &&&       r   r]  %GenerateSchema._computed_field_schemaW  s   
 66%66&&,,KL *BB166SWShShSoSop ++#f5  $K1C1CD $$QVVE!11+>!::01B1I1I1KQ^^\

 2[[\[a[a1b.(*!+T jM`6Ifh j/	

 VV&&
))NN,&&,,%/"
 	
;  L1AA!D!KLs   6F	 	F0F++F0c                    V ^8  d   QhRRRR/# )r   r  r   r   r   r   )r   s   "r   r   r     s       8N r   c                    \        4       pV P                  VRR7      vr4V P                  W44      pV F!  p\        Wb4      '       g   K  \	        We4      pK#  	  V# )zdGenerate schema for an Annotated type, e.g. `Annotated[int, Field(...)]` or `Annotated[int, Gt(0)]`.Tr3  )rs   rV  r  r  r  )r	  r  r}   r  r   r   rU  s   &&     r   r   GenerateSchema._annotated_schema  sc    ,.	$($I$I %J %
! ((B &J*00%j9 & r   c                	    V # r   r   rE  s   &r   rG  GenerateSchema.<lambda>  s    qr   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   r  r   r   z	list[Any]r  z"Callable[[CoreSchema], CoreSchema]r  r   r   r(   r   )r   s   "r   r   r     sD     .u .u.u .u !C	.u
 26.u 
.ur   c                ^  a aa \        \        P                  ! V4      4      p. pR V VV3R llp\        VS 4      pV F  pVf   K	  S P	                  VVVVR7      pK   	  V! S4      p	V'       d   V	P                  R/ 4      p
\        WR7       \        S P                  P                  SV	4      # )ad  Apply arguments from `Annotated` or from `FieldInfo` to a schema.

This gets called by `GenerateSchema._annotated_schema` but differs from it in that it does
not expect `source_type` to be an `Annotated` object, it expects it to be  the first argument of that
(in other words, `GenerateSchema._annotated_schema` just unpacks `Annotated`, this process it).
c                    V ^8  d   QhRRRR/# r  r   )r   s   "r   r   7GenerateSchema._apply_annotations.<locals>.__annotate__  s     	2 	2s 	2z 	2r   c                   < SP                  V S4      pVf   SP                  V 4      p\        V 4      pVe,   \        VSP                  4      pVe   SP                  W24       S! V4      # r   )r   r!  r"  r#  r  r  )r   r   r$  r  r	  r  r  s   &   r   inner_handler8GenerateSchema._apply_annotations.<locals>.inner_handler  sj    AA#{SF~44S9#DS#I #/"9&$))"L".))/P)&11r   r~  rY  ) pydantic_js_annotation_functions)
rd  rS   expand_grouped_metadatary   _get_wrapped_inner_schemar  rY   r   r  r   )r	  r  r   r  r  rR  rP  get_inner_schemarU  r   r  s   ff&f&      r   r  !GenerateSchema._apply_annotations  s     4LL[YZHJ(	2 	2 8tL%J!#== 08_	  >   & "+.+"--j"=M r;D<P<P<^<^`kmsttr   c               (    V ^8  d   QhRRRRRRRR/# )r   r   r   rY  r   r  r   r   r   )r   s   "r   r   r     s8     r r&r r 26	r
 
 rr   c           
     	   \        4       p\        W$4      '       d   V'       d   \        V4      VJ d   V P                  V4      ;p F.  w  rg\        P
                  ! R V: RV: RV: R2\        R7       K0  	  VP                  '       d@   V P                  P                  4       f$   RV9  d   \        P
                  ! R\        R7       VP                   F  pV P                  W4      pK  	  VP                  e   V P                  WP                  4      pV# VR,          R8X  dE   VP                  R	\        P                  ! 4       4      p	V P                  W4      p	V	'       d   WR	&   V# VR,          R
8X  Ed   \         ;QJ d0    R \        P"                  ! V4       4       F  '       g   K   RM%	  RM!! R \        P"                  ! V4       4       4      '       Ed   VR,           U
u. uF4  p
\        V
\$        4      '       d
   V
^ ,          MT
R,          R8w  g   K2  V
NK6  	  pp
\'        V4      ^8  dX   \        P(                  ! V4      pV P                  W4      pVP+                  4       pV\-        R VR,           4       4      .VR&   V# \'        V4      ^8X  d   \        V^ ,          \$        4      '       d   V^ ,          ^ ,          MV^ ,          p	V P                  W4      p	VP+                  4       pVR,           U
u. uF`  p
\        V
\$        4      '       d    V
^ ,          R,          R8w  d   W^,          3M'\        V
\$        4      '       g   V
R,          R8w  d   T	MT
NKb  	  up
VR&   V# TpVP                  R4      pVeM   VP+                  4       pVR\/        V4       2,           pV P0                  P3                  V4      ;pe   V# VVR&   MVR,          R8X  dt   VR,          pV P0                  P3                  V4      ;peL   VP+                  4       pVR\/        V4       2,           pV P0                  P3                  V4      ;pe   V# VVR&   \4        P6                  ! W!4      pVe   V# V# u up
i u up
i )zThe z attribute with value zY was provided to the `Field()` function, which has no effect in the context it was used. a   is field-specific metadata, and can only be attached to a model field using `Annotated` metadata or by assignment. This may have happened because an `Annotated` type alias using the `type` statement was used, or if the `Field()` function was attached to a single member of a union type.r  defaut_factoryzA 'default_factory' taking validated data as an argument was provided to the `Field()` function, but no validated data is available in the context it was used.r   r   r   unionc              3  8   "   T F  qR ,          R8H  x  K  	  R# 5i)r   missing-sentinelNr   r  r!  s   & r   r  :GenerateSchema._apply_single_annotation.<locals>.<genexpr>  s      -
?eV6N00?erI  TFr  r\  c              3     "   T F6  p\        V\        4      '       d
   V^ ,          MTR,          R8X  g   K2  Vx  K8  	  R# 5i)r  r   r\  N)r  r   r]  s   & r   r  r^  	  s:      &7F)3FE)B)BF1IPVW[mm &7s
   /A 
A rX  r^  definition-refr  )rs   r  r   &_get_unsupported_field_info_attributesr   r   rP   $default_factory_takes_validated_datar  r   rY  _apply_single_annotationr  r  r.   r   r4  iter_union_choicesr   r  r  r   nextrF  r  get_schema_from_refrS   apply_known_metadata)r	  r   rY  r  r}   unsupported_attributesattrrZ  field_metadatar8  r!  filtered_choicesfiltered_union	new_unionrP  rX  new_refexistingreferenced_schemamaybe_updated_schemas   &&&&                r   rc  'GenerateSchema._apply_single_annotation  sH    -.	h**7 Ni/>B>i>ijr>s$s$:$sKDMMth&<UI FKKO( Snn
 "B %t AAA--113;(0FFMMY!A #+"3"366vN #4 %%1;;FDZDZ[M&>Z'JJx)?)?)ABE11%BE#(x M&>W$ -
?J?]?]^d?e-
 -
?J?]?]^d?e-
 *
 *
 %Y/ /F!+FE!:!:F1IOSee /   
 #$) "-!9!9:J!K!%!>!>~!X"KKM	" &,Y&7 (	)$ ! %&!+ 3==Ma=PRW2X2X(+A.^nop^q55eF #KKM	 #)"3( #4	 "&%00VAYv5FJ\5\ 1I& &fe44K]9] 	 
 #4(	)$ !  jj?[[]FaX/00G II99'BBO#F5MF^//&C%)YY%B%B3%GG!T*//1!DN#3 44 $		 = =g FFHS#O 'u8MMh_+''w 8(s   '/Q,Q,<A&Q1c               $    V ^8  d   QhRRRRRR/# )r   r   r   rY  r   r   r   )r   s   "r   r   r   <	  s$      ,8;	r   c                	    \        4       p\        W#4      '       dQ   VP                   F  pV P                  W4      pK  	  \	        V4      w  rVVP                  R / 4      p\        WuVR7       V# )rY  r  )rs   r  rY  $_apply_single_annotation_json_schemar   r  rY   )r	  r   rY  r}   rj  r  r	  r  s   &&&     r   ru  3GenerateSchema._apply_single_annotation_json_schema<	  sp     -.	h**"*"3"3BB6Z #4 6__g5h2"--j"=M Zk r   c                    V ^8  d   QhRRRR/# )r   r  r}   r   r   r   )r   s   "r   r   r   L	  s       Od r   c                    . p\          Fh  w  r4\        W4      ;qTJg   K  VR9  g   V P                  P                  4       f   K<  VR9  g   RVP                  9  g   KV  VP                  W534       Kj  	  V# )zoGet the list of unsupported `FieldInfo` attributes when not directly used in `Annotated` for field annotations.r  )r   default_factory)r  r  )r   r   r  r   _attributes_setr  )r	  r  unused_metadataunused_metadata_nameunset_valueunused_metadata_values   &&    r   ra  5GenerateSchema._get_unsupported_field_info_attributesL	  s|    131\- *1**SS&g )0NN,,002> )0[[j&@&@@  &&(<'TU 2]" r   c          
     ,    V ^8  d   QhRRRRRRRRR	R
/# )r   rU  r;   rU  r   rR  zlist[GetJsonSchemaFunction]r  r   r   ry   r   )r   s   "r   r   r   b	  s=     ? ?.? ? +F	?
 26? 
&?r   c                	\   a aaaaa \        SR R4      oR VVVVVV 3R llp\        VS 4      # )rr  Nc                    V ^8  d   QhRRRR/# )r   r  r   r   r   r   )r   s   "r   r   >GenerateSchema._get_wrapped_inner_schema.<locals>.__annotate__k	  s     	 	 	(> 	r   c                   < Se   S! V S4      pM.S! V 4      pSP                  VSSR7      pSP                  VS4      p\        S4      pVe   SP                  V4       V# )Nr~  )rc  ru  r"  r  )	r  r   r$  rU  annotation_get_schemar  rU  rR  r	  s	   &  r   new_handler=GenerateSchema._get_wrapped_inner_schema.<locals>.new_handlerk	  sw    $0.v7GH)&166<c 7 
 BB6:V#DZ#P #/0778LMMr   )r   ry   )r	  rU  rU  rR  r  r  r  s   fffff @r   rT  (GenerateSchema._get_wrapped_inner_schemab	  s0     ?FjRprv>w	 	" ,K>>r   c               $    V ^8  d   QhRRRRRR/# )r   r   r   serializersz-list[Decorator[FieldSerializerDecoratorInfo]]r   r   )r   s   "r   r   r   ~	  s)     6 6&6 C6 
 	6r   c                   V'       Ed   \        V4      pVR,          R8X  d    VR,          pV P                  W24      VR&   V# RV9   d   V P                  P                  V4      pVR,          p\	        VP
                  VP                  P                  4      w  rVVP                  P                  \        Jd   VP                  P                  pM7 \        P                  ! VP
                  V P                  P                  R7      pV\        J d   Rp	MV P#                  V4      p	VP                  P                  R8X  d?   \$        P&                  ! VP
                  VVV	VP                  P(                  R7      VR	&   V# VP                  P                  R
8X  g   Q h\$        P*                  ! VP
                  VVV	VP                  P(                  R7      VR	&   V#   \         d   p\        P                   ! T4      ThRp?ii ; i)z$Apply field serializers to a schema.r   r)  r   rX  r<  Nr   )is_field_serializerr  r  r   r   r   r   )r   r  r  rH  rf   r@  r   r  r=  r,   rQ   r?  r  rA  rM  rD   rN  r*  r.   r  r   r   )
r	  r   r  r   
serializerr  r  r=  r  r  s
   &&&       r   r  'GenerateSchema._apply_field_serializers~	  s    ;&\Ff~.%h/#'#@#@#[x &EEfM %RJ,DZ__V`VeVeVjVj,k)**2CC(oo99P #."F"F"1F1F1M1M#K // $ $ 4 4[ A##v-*5*Y*YOO(;%"/(oo77+'   "++w666*5*Z*ZOO(;%"/(oo77+' 3 ! P5EEaHaOPs   6G G>"G99G>c               $    V ^8  d   QhRRRRRR/# )r   r   r   r  z1Iterable[Decorator[ModelSerializerDecoratorInfo]]r   r   )r   s   "r   r   r   	  s$     - -,-;l-	-r   c                T   VP                  RR4      pV'       EdW   \        V4      R,          p\        VP                  VP                  P
                  4      pVP                  P                  \        Jd   VP                  P                  pM7 \        P                  ! VP                  V P                  P                  R7      pV\        J d   RpMV P                  V4      pVP                  P
                  R8X  d:   \         P"                  ! VP                  VVVP                  P$                  R7      p	M8\         P&                  ! VP                  VVVP                  P$                  R7      p	WR&   V'       d   W1R&   V#   \         d   p\        P                  ! T4      ThRp?ii ; i)z$Apply model serializers to a schema.rX  Nr<  r   )r  r  r   r   r   )poprd  rg   r@  r   r  r=  r,   rQ   r?  r  rA  rM  rD   rN  r*  r.   r  r   r   )
r	  r   r  rX  r  r  r=  r  r  
ser_schemas
   &&&       r   r_  'GenerateSchema._apply_model_serializers	  sY    !**UD1;k*2.J/
AUAUVH**2CC(oo99P #."F"F"1F1F1M1M#K // $ $ 4 4[ A##v-4?4c4cOO%"/(oo77	5
 )MMOO%"/(oo77	
 '1?#5M5 ! P5EEaHaOPs   6F   F'F""F')r   r  r  r  r  r  )r   r  r  r  r  r  )NN)Fr   )T)Mr   r   r   r   r   r  r
  r  propertyr  r  r#  r,  r3  r8  r=  rq  r  r  r  r  r  r  r  r  r  r  r*  ri  rn  r   r  r$   rV  r  r  r!  r  r  r  r\  r  rX  r  r  r  r  r  r   rx  ru  r  r  r  r  r  r  r  r  r  r  r  r  r  r1  r  r]  r  r  rc  ru  ra  rT  r  r_  r   __classcell__)r   s   @r   r   r   ^  s   fI#
 
 / / 1 1 < <
IkHNFP
B8t
2,\
"
2	
&1	/%NLB9wv, i iW W $8x.t1.f
 
(
$
,7%r6H&ILV,Hf ![_+ t !0 d_<
	
]
%>N
.Mr8

xLt
2I
VB
H((0
d& FQ8<.u`rh ,?86p- -r   r   c                .    \         P                  ! W4      # r   )r.   !no_info_before_validator_functionrG  r   s   &&r   rG  rG  	      [-Z-Z[\-er   c                .    \         P                  ! W4      # r   )r.   rm  r  s   &&r   rG  rG  	  s    K,X,XYZ,cr   c                .    \         P                  ! V 4      # r   )r.   r  rG  r^  s   &&r   rG  rG  	  s    {'S'STU'Vr   c                .    \         P                  ! W4      # r   )r.   r  r  s   &&r   rG  rG  	  s    ;+V+VWX+ar   c                .    \         P                  ! W4      # r   )r.   #with_info_before_validator_functionr  s   &&r   rG  rG  	  s    {/^/^_`/ir   c                .    \         P                  ! W4      # r   )r.   "with_info_after_validator_functionr  s   &&r   rG  rG  	  s    k.\.\]^.gr   c                .    \         P                  ! V 4      # r   )r.   rw  r  s   &&r   rG  rG  	  s    )W)WXY)Zr   c                .    \         P                  ! W4      # r   )r.   !with_info_wrap_validator_functionr  s   &&r   rG  rG  	  r  r   zMapping[tuple[FieldValidatorModes, Literal['no-info', 'with-info']], Callable[[Callable[..., Any], core_schema.CoreSchema], core_schema.CoreSchema]]_VALIDATOR_F_MATCHc               $    V ^8  d   QhRRRRRR/# )r   r   r   rR  zIterable[Decorator[RootValidatorDecoratorInfo]] | Iterable[Decorator[ValidatorDecoratorInfo]] | Iterable[Decorator[FieldValidatorDecoratorInfo]]r   r   )r   s   "r   r   r   	  s(      "7
 r   c                    V Fo  p\        VP                  VP                  P                  RR7      pV'       d   RMRp\        VP                  P                  V3,          ! VP                  V 4      p Kq  	  V # )zApply validators to a schema.

Args:
    schema: The schema to apply validators on.
    validators: An iterable of validators.
    field_name: The name of the field if validators are being applied to a model field.

Returns:
    The updated schema.
r   r  r   	with-infono-info)rh   r@  r   r  r  )r   rR  	validatorr  val_types   &&   r   r   r   	  sb       	 %Y^^)..:M:MT[\"*;	#Y^^%8%8($CDY^^U[\   Mr   c                    V ^8  d   QhRRRR/# )r   rR  z+Iterable[Decorator[ValidatorDecoratorInfo]]r   r   r   )r   s   "r   r   r   
  s      5` ei r   c                V    V  F"  pVP                   P                  '       g   K!   R# 	  R# )a'  In v1, if any of the validators for a field had `always=True`, the default value would be validated.

This serves as an auxiliary function for re-implementing that logic, by looping over a provided
collection of (v1-style) ValidatorDecoratorInfo's and checking if any of them have `always=True`.

We should be able to drop this function and the associated logic calling it once we drop support
for v1-style validator decorators. (Or we can extend it and keep it if we add something equivalent
to the v1-validator `always` kwarg to `field_validator`.)
TF)r   r  )rR  r  s   & r   r  r  
  s&      	>>      r   c                    V ^8  d   QhRRRR/# )r   r  z%str | AliasChoices | AliasPath | Noner   z4str | list[str | int] | list[list[str | int]] | Noner   )r   s   "r   r   r   !
  s      09r   c                ^    \        V \        \        34      '       d   V P                  4       # V # r   )r  r9   r:   convert_to_aliases)r  s   &r   r  r  !
  s*     %,	233''))r   c               (    V ^8  d   QhRRRRRRRR/# )r   r   r   rR  z0Iterable[Decorator[ModelValidatorDecoratorInfo]]r  z Literal['inner', 'outer', 'all']r   r   )r   s   "r   r   r   *
  s0     , ,",@, +, 	,r   c                   V P                  RR4      pV EF  pVR8X  d   VP                  P                  R8w  d   K(  VR8X  d   VP                  P                  R8X  d   KL  \        VP                  VP                  P                  RR7      pVP                  P                  R8X  dQ   V'       d%   \
        P                  ! VP                  V R	7      p K  \
        P                  ! VP                  V R	7      p K  VP                  P                  R8X  dS   V'       d&   \
        P                  ! VP                  V R	7      p EK+  \
        P                  ! VP                  V R	7      p EKP  VP                  P                  R
8X  g   Q hV'       d&   \
        P                  ! VP                  V R	7      p EK  \
        P                  ! VP                  V R	7      p EK  	  V'       d   W0R&   V # )ak  Apply model validators to a schema.

If mode == 'inner', only "before" validators are applied
If mode == 'outer', validators other than "before" are applied
If mode == 'all', all validators are applied

Args:
    schema: The schema to apply validators on.
    validators: An iterable of validators.
    mode: The validator mode.

Returns:
    The updated schema.
rX  Nr8  r   rD  modelr  r   )r  r   r   )r  r   r  rh   r@  r.   r  r  r  r  r  rm  )r   rR  r  rX  r  r  s   &&&   r   rY  rY  *
  s]   & jj-C	7?y~~22h>7?y~~22h>$Y^^)..:M:MT[\>>&($FFPYP^P^gmn$DDinnekl^^  H,$HHR[R`R`iop$FFPYP^P^gmn>>&&'111$GGQZQ_Q_hno$EEy~~flm+  , uMr   c               $    V ^8  d   QhRRRRRR/# )r   r  r}   r   r   r   r   )r   s   "r   r   r   Y
  s#      Y 0F Ka r   c                ,   V P                   '       dB   \        P                  ! VV P                   \        V P                   4      V P                  R7      # V P
                  \        Jd-   \        P                  ! WP
                  V P                  R7      # V# )zWrap schema with default schema if default value or `default_factory` are available.

Args:
    field_info: The field info object.
    schema: The schema to apply default on.

Returns:
    Updated schema by default value or `default_factory`.
)ry  default_factory_takes_datar  )r   r  )ry  r.   with_default_schemarm   r  r   r,   )r  r   s   &&r   r  r  Y
  s     !!!..&66'DZE_E_'`'88	
 	
 
		#4	4....A\A\
 	
 r   c                    V ^8  d   QhRRRR/# )r   r   r   r   zGetJsonSchemaFunction | Noner   )r   s   "r   r   r   r
  s      # 2N r   c                d   \        V RR4      p\        V R4      '       dq   \        4       pVRJ;'       d'    VP                  P                  V\        VRR4      39  pV'       g-   \        V RR4      p\        RV'       d   RV R2MR	 R
2RR7      h\        V 4      ;pe   \        V4      # Vf   R# V# )z`Extract `__get_pydantic_json_schema__` from a type, handling the deprecated `__modify_schema__`.__get_pydantic_json_schema__N__modify_schema__rT  r   zjThe `__modify_schema__` method is not supported in Pydantic v2. Use `__get_pydantic_json_schema__` insteadz in class ``r   r   zcustom-json-schemar   )r   r  rr   r  rT  rE   r3   r"  )r   js_modify_functionr   has_custom_v2_modify_js_funccls_namer6  s   &     r   r"  r"  r
  s     %CTJr&'',.	 d* W W66??&0BJPT(UVW 	% ,r:t4H#=Zb{8*TU=Vhj<kkln)  R. - 188!r   c               $    V ^8  d   QhRRRRRR/# )r   r   r(   r)  r  r   CoreSchema | Noner   )r   s   "r   r   r   
  s"      J \ N_ r   c                    V R ,          R8X  d   VP                  V R,          4      # V R ,          R8X  d
   V R,          # V # )r   r`  r  r)  r   )rf  r   r)  s   &&r   r#  r#  
  sA    f~))..vl/CDD	=	(hr   c                    V ^8  d   QhRRRR/# )r   def_ref%core_schema.DefinitionReferenceSchemar   z.Literal['inline', 'keep', 'preserve_metadata']r   )r   s   "r   r   r   
  s      23r   c                    RV 9   d   R# V P                  R4      pV'       g   R# \        V4      ^8X  d
   RV9   d   R# R# )a  Determine the inlining behavior of the `'definition-ref'` schema.

- If no `'serialization'` schema and no metadata is attached, the schema can safely be inlined.
- If it has metadata but only related to the deferred discriminator application, it can be inlined
  provided that such metadata is kept.
- Otherwise, the schema should not be inlined. Doing so would remove the `'serialization'` schema or metadata.
r   keeprY  inline%pydantic_internal_union_discriminatorpreserve_metadata)r   r  )r  rY  s   & r   _inlining_behaviorr  
  s=     '!{{:&H
8}EQ"r   c                      ] tR tRt$ RtR]R&    R]R&    R R lt]R	 R
 l4       tR R lt	R R lt
R R ltR R ltR R ltRtR# )r  i
  z*Keeps track of references and definitions.zset[str]_recursively_seenz!dict[str, core_schema.CoreSchema]r
  c                   V ^8  d   QhRR/# r  r   )r   s   "r   r   _Definitions.__annotate__
  s      $ r   c                	2    \        4       V n        / V n        R # r   )r   r  r
  r  s   &r   r
  _Definitions.__init__
  s    !$r   c                    V ^8  d   QhRRRR/# )r   r   r   r   zCGenerator[tuple[str, core_schema.DefinitionReferenceSchema | None]]r   )r   s   "r   r   r  
  s     4 4C 4/r 4r   c             #  V  "   \        V4      pW P                  9   g   W P                  9   d   V\        P                  ! V4      3x  R# V P                  P                  V4        VR3x  V P                  P                  V4       R#   T P                  P                  T4       i ; i5i)aT  Get a definition for `tp` if one exists.

If a definition exists, a tuple of `(ref_string, CoreSchema)` is returned.
If no definition exists yet, a tuple of `(ref_string, None)` is returned.

Note that the returned `CoreSchema` will always be a `DefinitionReferenceSchema`,
not the actual definition itself.

This should be called for any type that can be identified by reference.
This includes any recursive types.

At present the following types can be named/recursive:

- Pydantic model
- Pydantic and stdlib dataclasses
- Typed dictionaries
- Named tuples
- `TypeAliasType` instances
- Enums
N)r[   r  r
  r.   r  adddiscard)r	  r   rX  s   "" r   rE  _Definitions.get_schema_or_ref
  s     , 2(((C3D3D,D??DEE""&&s+4Dk!&&..s3&&..s3s   A#B)&B	 ,B)	B&&B)c                    V ^8  d   QhRRRR/# )r   rX  r   r   r  r   )r   s   "r   r   r  
  s     * *s */@ *r   c                8    V P                   P                  V4      # )z,Resolve the schema from the given reference.)r
  r   )r	  rX  s   &&r   rf   _Definitions.get_schema_from_ref
  s      $$S))r   c                    V ^8  d   QhRRRR/# )r   r   r(   r   r  r   )r   s   "r   r   r  
  s     < < <Hm <r   c                \    VR,          pWP                   V&   \        P                  ! V4      # )zStore the schema as a definition and return a `'definition-reference'` schema pointing to it.

The schema must have a reference attached to it.
rX  )r
  r.   r  )r	  r   rX  s   && r   rH  /_Definitions.create_definition_reference_schema
  s,    
 Um!'#66s;;r   c                    V ^8  d   QhRRRR/# )r   r   zcore_schema.DefinitionsSchemar   r(   r   )r   s   "r   r   r  
  s        )F  :  r   c                ^    VR,           F  pW P                   VR,          &   K  	  VR,          # )zZStore the definitions of the `'definitions'` core schema and return the inner core schema.r)  rX  r   )r
  )r	  r   
def_schemas   && r   rG  _Definitions.unpack_definitions
  s2     //J3=j/0 0hr   c                    V ^8  d   QhRRRR/# r  r   )r   s   "r   r   r  
  s     8 8j 8Z 8r   c                `   V P                   p \        VVR7      p/ pTR,          P	                  4        F  w  rgTe   \        T4      ;pR8w  d   TR8X  d3   TP                  4        TP                  T P                  Yb4      4       KT  TR8X  dH   TP                  R4      p	TP                  4        TP                  T P                  Yb4      4       YR&   K  K  T P                  Yb4      YV&   K  	  TR,           Fh  p
T
R,          P                  R	R4      pTf   K"  \        P                  ! T
P                  4       Y4      pT
P                  4        T
P                  T4       Kj  	  T'       d)   \        P                  ! T. TP                  4       OR
7      pT#   \         d   p\        ThRp?ii ; i)zFinalize the core schema.

This traverses the core schema and referenced definitions, replaces `'definition-ref'` schemas
by the referenced definition if possible, and applies deferred discriminators.
)r)  Ncollected_referencesr  r  r  rY  deferred_discriminator_schemasr  r  )r
  rx   rw   r   r   r  clearrN  _resolve_definitionr  rR   r	  r   r.   definitions_schemarf  )r	  r   r)  gather_resultr  remaining_defsrX  inlinable_def_refinlining_behaviormetacsr  applieds   &&           r   r  _Definitions.finalize_schema
  s    ''	,7'M 13 '44J&K&Q&Q&S"C ,GYZkGl2l2Cqw1w$0
 &++-%,,T-E-Ec-WX&*== -00<D%++-%,,T-E-Ec-WX48j1 > '+&>&>s&P#+ 'T.   @AAB(*:(:(:;bdh(iM$ *>>rwwy-hGHHJIIg B  336OiQ_QfQfQhOijFY & 	,$!+	,s   F F-!F((F-c               $    V ^8  d   QhRRRRRR/# )r   rX  r   r)  zdict[str, CoreSchema]r   r(   r   )r   s   "r   r   r  6  s#     * *s *9N *S] *r   c                	   W!,          pVR ,          R8w  d   V# \        4       pVR ,          R8X  dK   \        V4      R8X  d;   VR,          pWT9   d   \        V R2RR7      hVP                  V4       W%,          pKX  / VCRV/C# )r   r`  r  r  z) contains a circular reference to itself.zcircular-reference-schemar   rX  )r   r  rE   r  )r	  rX  r)  
definitionvisitedr  s   &&&   r   r   _Definitions._resolve_definition6  s     %
f!11  E $449KJ9W[c9c#L1J$'eDELg  KK
#$0J)*)eS))r   )r
  r  N)r   r   r   r   r   r  r
  r   rE  rf  rH  rG  r  r  r   r   r   r   r  r  
  sV    4 43 4 4@*< 8t* *r   r  c                  H    ] tR tRtRtR R lt]R R l4       tR R ltRt	R	# )
r  iI  c                   V ^8  d   QhRR/# r  r   )r   s   "r   r   _FieldNameStack.__annotate__L  s     $ $$ $r   c                	    . V n         R # r   _stackr  s   &r   r
  _FieldNameStack.__init__L  s	    !#r   c                    V ^8  d   QhRRRR/# )r   rg  r   r   Iterator[None]r   )r   s   "r   r   r  P  s      s ~ r   c              #  	   "   V P                   P                  V4       R x  V P                   P                  4        R # 5ir   r  r  r  )r	  rg  s   &&r   rJ  _FieldNameStack.pushO  s(     :&   <>c                   V ^8  d   QhRR/# )r   r   z
str | Noner   )r   s   "r   r   r  U  s      Z r   c                	P    V P                   '       d   V P                   R,          # R# rv  Nr   r  r  s   &r   r   _FieldNameStack.getU      ;;;;;r?"r   r  N
r   r   r   r   r  r
  r   rJ  r   r   r   r   r   r  r  I  s*    I$  
 r   r  c                  H    ] tR tRtRtR R lt]R R l4       tR R ltRt	R	# )
r  i\  c                   V ^8  d   QhRR/# r  r   )r   s   "r   r   _ModelTypeStack.__annotate___  s     % %$ %r   c                	    . V n         R # r   r  r  s   &r   r
  _ModelTypeStack.__init___  s	    "$r   c                    V ^8  d   QhRRRR/# )r   type_objr   r   r  r   )r   s   "r   r   r  c  s      T n r   c              #  	   "   V P                   P                  V4       R x  V P                   P                  4        R # 5ir   r  )r	  r  s   &&r   rJ  _ModelTypeStack.pushb  s(     8$r  c                   V ^8  d   QhRR/# )r   r   ztype | Noner   )r   s   "r   r   r  h  s      [ r   c                	P    V P                   '       d   V P                   R,          # R# r  r  r  s   &r   r   _ModelTypeStack.geth  r  r   r  Nr	  r   r   r   r  r  \  s*    I%  
 r   r  )      )r  N)r  N)r  N)ry  N)r  N)r   N)rF  T)r  N)r  N)r  N)r  N)r  N)r   r  )r   r  )r   r  )r   r  )r   r  )r   r  )r   r  )r   r  (  __conditional_annotations__r   
__future__r   _annotationscollections.abcr  r  r  rg  r  r  r  sysr  r   r   r   r   r   
contextlibr   r   decimalr	   enumr
   	fractionsr   	functoolsr   r   r   	ipaddressr   r   r   r   r   r   	itertoolsr   operatorr   typesr   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   uuidr%   r  r&   r^  pydantic_corer'   r(   r)   r*   r+   r,   r-   r.   r/   r0   r1   r2   r3   r4   typing_inspectionr5   typing_inspection.introspectionr6   r7   r8   aliasesr9   r:   annotated_handlersr;   r<   r?  r=   r>   r?   r@   errorsrA   rB   rC   rD   rE   functional_validatorsrF   rG   rH   rI   rJ   rO  rK   versionrL   rM   rN   rO   rP   r   rQ   rR   rS   rT   rU   _configrV   rW   _core_metadatarX   rY   _core_utilsrZ   r[   r\   r]   r^   r_   r`   ra   rb   rc   rd   re   rf   rg   rh   _docs_extractionri   rs  rj   rk   rl   rm   rn   _forward_refro   	_genericsrp   rq   _import_utilsrr   rs   _mock_val_serrt   _namespace_utilsru   rv   _schema_gatherrw   rx   _schema_generation_sharedry   _utilsrz   r{   r   r|   r}   mainr   r   _dataclassesr   r   version_inforS  r   r   AnyFieldDecoratorr   r  r   r   Tupler   r   Listrd  r  MutableSequencer   Setr   
MutableSetr   	FrozenSet	frozensetr   Dictr   r   r   r  r   r   Typer   r   r  r   r  Pathr  	PosixPathPurePosixPathPureWindowsPathr   MutableMappingOrderedDictDefaultDictr  r  Counterr  r  r  r   r  r  r   r   r   r   r   r   r   JsonEncodersr   GENERATE_SCHEMA_ERRORS	Exceptionr   r   r  r   r  r  rY  r  r"  r#  r  r  r  r  )r  s   @r   <module>rS     s:   3 2     	  	 
   B B %      - f f   D D     
 
 
 [ Z , a a - K O O  x w ) #  a ` 6 > 
    :  / ? M ) 9 O C 65 %/@&&'1 13NPllm  !9AST $%)**+-  *> Y =#+S2M,NP[PfPf,f#g y g S I S!<</Z / ++t[__-L-LM
J MS+//*D*DE	: E & 0 0)[__=P=PQ * Q ++t,
J ,#]Km]hi* i$oo{/G/GH
 H$oo{/G/GIYIY[f[j[j[t[tu
 u ++t,
J ,#^^RZZ8z 8KKLL
J  NN
OOOO""!!
	 $$fnn5&,,fll;Z ; #  !))C D ! !"F +-B " O .RXZgh   i
,"6n F
A DI{*+F  !	  I& &E" E"XD ecVaigZe	   "4 ,^2@(W* W*t & r   