+
    7*i}A  c                  s<  a  0 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 ^ RIHtHtHtHt ^ RIHt ^R	IHt ^R
IHt ]'       d    R0tR0tRR0t0 R,mtR0]mtR0t0 ]m]mRkRkRkRkRkt0 ]m]mt 0 ]m]m]mt!0 ]m]m]mt"0 ]m]m]mt#0 ]m]mt$0 ]m]mt%0 ]m]mt&0 ]m]m]mt'RR0]'mt(0 ]m]m]mt)]t*]t+0 ]m]mt,0 ]m]mt-0 ]m]mt.]t/]t0]t1R0t20 R-mt3R.t4. R/O]4O5t5R0t6]! ]74      t8R]9R&   ]]43] R13]!R23]"R33]#R43]$R53]%R63]'R73])R83],R93]. ]4O]5O]6ORNRN53]2R:3]3R;3]*R<3]+R=3]/R>3]0R?3](R@3]1RA3.t:R]9R&   ]: F'  w  t;t<]; F  t=]8]=,          P}                  ]<4       K  	  K)  	  R R  lt?R! R" lt@]	R# R$ l4       tAR% R& ltBR' R( ltCR) R* ltDR+# )Bi    )annotations)defaultdict)Iterable)copy)	lru_cachepartial)TYPE_CHECKINGAny)
CoreSchemaPydanticCustomErrorValidationErrorto_jsonable_python)core_schema)PydanticMetadata)import_cached_field_infostrictZ	fail_fast
min_length
max_lengthmultiple_ofallow_inf_nanstrip_whitespaceto_lowerto_upperpatterncoerce_numbers_to_strZ
max_digitsZdecimal_places
union_modezdict[str, set[str]]CONSTRAINTS_TO_ALLOWED_SCHEMASz
typed-dictZmodelz&list[tuple[set[str], tuple[str, ...]]]constraint_schema_pairingsc                    V ^8  d   QhRRRR/#    vr   return Zformat   "Q/usr/lib/python3.14/site-packages/pydantic/_internal/_known_annotated_metadata.py__annotate__r%   d   s            c           	     s    \        V 4      \        \        \        \        \
        \        R 4      39  d   \        V 4      # V # )N)typeintstrfloatbytesboolr   )r   s   &r$   as_jsonable_valuer-   d   s/    AwsCtT$Z@@!!$$Hr&   c               r   )r   r    Iterable[Any]r    r!   r"   r#   r$   r%   r%   j   s     % % %= %r&   c              #  s  "   ^ RI p\        4       pV  Fk  p\        W1P                  4      '       d   T Rj  xL
  K*  \        W24      '       d-   VP                   Rj  xL
  \        V4      p. Vn        Vx  Kg  Vx  Km  	  R#  LM L(5i)a  Expand the annotations.

Args:
    annotations: An iterable of annotations.

Returns:
    An iterable of expanded annotations.

Example:
    ```python
    from annotated_types import Ge, Len

    from pydantic._internal._known_annotated_metadata import expand_grouped_metadata

    print(list(expand_grouped_metadata([Ge(4), Len(5)])))
    #> [Ge(ge=4), MinLen(min_length=5)]
    ```
N)annotated_typesr   
isinstanceZGroupedMetadatametadatar   )r    atZ	FieldInfo
annotations   &   r$   expand_grouped_metadatar4   j   sv     & !(*I!
j"4"455!!!
..!**** j)J"$J "!*s!   4BB&BB'BBc               s    V ^8  d   QhRR/# )r   r    zdict[type, str]r!   r"   r#   r$   r%   r%      s      ? r&   c                 s    ^ RI p V P                  RV P                  RV P                  RV P                  RV P
                  RV P                  RV P                  R/# )	aw  Return a mapping of annotated types to constraints.

Normally, we would define a mapping like this in the module scope, but we can't do that
because we don't permit module level imports of `annotated_types`, in an attempt to speed up
the import time of `pydantic`. We still only want to have this dictionary defined in one place,
so we use this function to cache the result.
Ngtgeltler   r   r   )r/   ZGtZGeZLtZLeZ
MultipleOfZMinLenZMaxLen)r2   s    r$   _get_at_to_constraint_mapr9      sR     ! 	t
t
t
t
}
		<
		< r&   c               s$    V ^8  d   QhRRRRRR/# )r   r3   r   schemar   r    zCoreSchema | Noner!   r"   r#   r$   r%   r%      s'     i iS i* iAR ir&   c                s(  a aaa ^ RI p^RIHpHp VP	                  4       p\        S .4      w  rVVR,          o0 R"mp. pVP                  4        EF  w  op	S\        9  d   \        RS 24      h\        S,          p
SR#9   d"   SR8X  d   \        S VR,          4      VR&   Vu # SV
9   d   SR8X  d   SR8X  d   WR	&   MWS&   Ku  SV9   dI   R
 VV3R llpVP                  \        P                  ! V\        P                  ! R$/ SV	/B 4      4       K  SV9   d   S\        9   d`   TpVR,          R#9   d   VR,          pK  VR,          pVR8X  g   VR8X  d"   VR,          R,          R8X  d   SR8X  d   RMRpMSR8X  d   RMRpMSp\        P                  ! \!        VS,          3/ SV	/B V4      pVP#                  R/ 4      pVP#                  R4      ;pe   / VCV\%        V	4      /CVR&   MV\%        V	4      /VR&   WR&   EK  SR8X  d!   V	RJ d   \        P                  ! VV4      pEK  \'        RS RS R24      h	  V EF&  o \)        S 4      ;p\+        4       ;p9   d\   VV,          oVP#                  S4      pVf   \        RS 24      h\        P                  ! \!        VS\-        S S4      /4      V4      pK{  \/        S VP0                  VP2                  34      '       d   \5        S P6                  R4      '       d   S P6                  P8                  : R2MRo\/        S VP0                  4      '       d   R V V3R llpM
R  V V3R! llp\        P                  ! VV4      pEK&   R# 	  V'       d!   V.V,           p\        P:                  ! V4      # V# )%a  Apply `annotation` to `schema` if it is an annotation we know about (Gt, Le, etc.).
Otherwise return `None`.

This does not handle all known annotations. If / when it does, it can always
return a CoreSchema and return the unmodified schema if the annotation should be ignored.

Assumes that GroupedMetadata has already been expanded via `expand_grouped_metadata`.

Args:
    annotation: The annotation.
    schema: The schema.

Returns:
    An updated schema with annotation if it is an annotation we know about, `None` otherwise.

Raises:
    RuntimeError: If a constraint can't be applied to a specific schema type.
    ValueError: If an unknown constraint is encountered.
N)NUMERIC_VALIDATOR_LOOKUPforbid_inf_nan_checkr'   zUnknown constraint r   r:   r   unionZmodec               s$    V ^8  d   QhRRRRRR/# )r   valuer   handlerzcs.ValidatorFunctionWrapHandlerr    r!   r"   r#   r$   r%   *apply_known_metadata.<locals>.__annotate__   s$      %Dr&   c           
     s   <  V! V 4      pV#   \          d@   pR TP                  4       ^ ,          R ,          9   d   \        RS RT  RS R24      hThRp?ii ; i)r'   Unable to apply constraint 'z' to supplied value z for schema of type ''N)r
   Zerrors	TypeError)r>   r?   ZxZve
constraintschema_types   &&  r$   +_apply_constraint_with_incompatibility_infoZIapply_known_metadata.<locals>._apply_constraint_with_incompatibility_info   s    A  ' 
 Q!77'::,FZ[`Zaav  xC  wD  DE  F  H
s    A:AAlistzjson-or-pythonZjson_schemar   ZminItemsZmaxItemsZ	minLengthZ	maxLengthr1   Zpydantic_js_updatesr   FrA   z' to schema of type 'rB   __qualname__Z Z c               r   r   r!   r"   r#   r$   r%   r@   4          r&   c                sZ   < SP                  V 4      pV'       g   \        R RS R24      hV # )Zpredicate_failedz
Predicate failedfuncr	   r   Zpredicate_satisfiedr3   predicate_name   & r$   val_func&apply_known_metadata.<locals>.val_func4  s9    *4//!*<'.1.((8?  Hr&   c               r   r   r!   r"   r#   r$   r%   r@   ?  rI   r&   c                sZ   < SP                  V 4      pV'       d   \        R RS R24      hV # )Znot_operation_failedzNot of rJ   rK   rM   rO   r$   rP   rQ   ?  s9    *4//!*<'*12%n%5V<  Hr&   >   r   r   r   r   r   >   zfunction-wrapzfunction-afterzfunction-beforer!   )r/   Z_validatorsr;   r<   r   collect_known_metadataitemsr   Z
ValueErrorapply_known_metadataappendcsZno_info_wrap_validator_functionZ
str_schemaLENGTH_CONSTRAINTSZ no_info_after_validator_functionr   Zgetr-   ZRuntimeErrorr'   r9   getattrr0   Z	PredicateZNotZhasattrrL   rH   Zchain_schema)r3   r:   r2   r;   r<   Zschema_updateZother_metadataZchain_schema_constraintsZchain_schema_stepsr>   Zallowed_schemasrF   Zinner_schemaZinner_schema_typeZjs_constraint_keyr1   Zexisting_json_schema_updatesannotation_typeat_to_constraint_mapZ	validatorrP   rD   rN   rE   s   f&                   @@@r$   rT   rT      s   ( !K[[]F$:J<$H!M.K* ,.*002
E;;2:,?@@8D PPU_ckUk3Jx@PQF8M /)\)kW.D!&v%*z" 11 $ %%22?AeR\^cQdAe
 33//%"6*.dd#/#9L$0$8!$.%)99l=>YZ`>aek>k6@L6P
V`%7A\7QWb%$.!880<TU@STV\F zz*b1H08=R0SS,`323(*;E*BC3./
 4EFWX]F^2_./!):?*u~88$F !=j\I^_j^kklmnne 3h %
#J//OMfMh5h5Ii-o>J044Z@I  #6zl!CDD88	J
J0O#PQSYF 
R\\266$:;;ELZ__^lEmEm
 < <?qAsuN *bll33   886JF U %X $X(::122Mr&   c               s     V ^8  d   QhRRRR/# )r   r    r.   r    z tuple[dict[str, Any], list[Any]]r!   r"   r#   r$   r%   r%   T  s     * * *:Z *r&   c           
     s   \        V 4      p / p. pV  F  p\        V\        4      '       d   VP                  VP                  4       K6  \        V4      ;p\        4       ;p9   d   WT,          p\        W64      W&   Ki  \        V\
        4      '       dn   \        V\        4      '       dX   TP                  \        V4      P                  4        UUu/ uF   w  rxVP                  R4      '       d   K  WxbK"  	  upp4       K  VP                  V4       K  	  VP                  4        UUu/ uF  w  rxVf   K  WxbK  	  pppW3# u uppi u uppi )a  Split `annotations` into known metadata and unknown annotations.

Args:
    annotations: An iterable of annotations.

Returns:
    A tuple contains a dict of known metadata and a list of unknown annotations.

Example:
    ```python
    from annotated_types import Gt, Len

    from pydantic._internal._known_annotated_metadata import collect_known_metadata

    print(collect_known_metadata([Gt(1), Len(42), ...]))
    #> ({'gt': 1, 'min_length': 42}, [Ellipsis])
    ```
Z_)r4   r0   r   updateZ__dict__r'   r9   rX   Z
issubclassZvarsrS   Z
startswithrU   )	r    ZresZ	remainingr3   rY   rZ   rD   kr   s	   &        r$   rR   rR   T  s   & *+6KCI!
j"233JJz**+!%j!11oOhOj7j7Kk->J%j=CO
D))jEU.V.V JJj)9)?)?)A[)AVYIZ)A[\Z( ""  IIK
9KDA1414KC
9> \ :s   D?.D?&E3Ec               s(    V ^8  d   QhRRRRRRRR/# )	r   r1   zdict[str, Any]allowedzIterable[str]source_typer   r    ZNoner!   r"   r#   r$   r%   r%     s*     
 
^ 
m 
RU 
Z^ 
r&   c                s    V P                  4       \        V4      ,
          pV'       d3   \        RV: RRP                  V Uu. uF  qD: NK  	  up4       24      hR# u upi )a  A small utility function to validate that the given metadata can be applied to the target.
More than saving lines of code, this gives us a consistent error message for all of our internal implementations.

Args:
    metadata: A dict of metadata.
    allowed: An iterable of allowed metadata.
    source_type: The source type.

Raises:
    TypeError: If there is metadatas that can't be applied on source type.
z/The following constraints cannot be applied to z: z, N)ZkeyssetrC   Zjoin)r1   r]   r^   Zunknownr\   s   &&&  r$   check_metadatar`     sa     mmoG,G=k_BtyylsYtlsgh\aZblsYtOuNvw
 	
 Yts   AN>   r6   r5   r8   r7   >   r   Zdefault_hostZdefault_pathZdefault_portZhost_requiredZallowed_schemes)r)   r+   urlmulti-host-url)rG   tupler_   	frozenset	generator)r*   r(   datetime	timedeltadatetime)r+   )rG   )rc   )r_   rd   )Zdict)re   )r*   )r(   )rf   rg   ri   rh   )r=   )ra   rb   )r,   )Zuuid)zlax-or-strict)Zenum)Zdecimal)Zcomplex)E__conditional_annotations__Z
__future__r    Zcollectionsr   Zcollections.abcr   r   Z	functoolsr   r   Ztypingr   r   Zpydantic_corer   r	   r
   r   r   rV   Z_fieldsr   Z_import_utilsr   ZSTRICTZ	FAIL_FASTrW   Z
INEQUALITYZNUMERIC_CONSTRAINTSZALLOW_INF_NANZSTR_CONSTRAINTSZBYTES_CONSTRAINTSZLIST_CONSTRAINTSZTUPLE_CONSTRAINTSZSET_CONSTRAINTSZDICT_CONSTRAINTSZGENERATOR_CONSTRAINTSZSEQUENCE_CONSTRAINTSZFLOAT_CONSTRAINTSZDECIMAL_CONSTRAINTSZINT_CONSTRAINTSZBOOL_CONSTRAINTSZUUID_CONSTRAINTSZDATE_TIME_CONSTRAINTSZTIMEDELTA_CONSTRAINTSZTIME_CONSTRAINTSZLAX_OR_STRICT_CONSTRAINTSZENUM_CONSTRAINTSZCOMPLEX_CONSTRAINTSZUNION_CONSTRAINTSZURL_CONSTRAINTSZTEXT_SCHEMA_TYPESZSEQUENCE_SCHEMA_TYPESZNUMERIC_SCHEMA_TYPESr_   r   Z__annotations__r   ZconstraintsZschemasZcr[   r-   r4   r9   rT   rR   r`   )rj   s   @r$   <module>rk      s*   " " # $  ( % ^ ^ + % 3
M	"L1 %
$2z2  !  	
    3(262 ='=&=9= >(>6>I> <&<<)<1'1&1 6,6v6 8+8i8 C)CMCFC #%5J8IJ A'A-A&A  7-77 7-77 2(262 "   !N  > ^L]^ P 6A#6F  3 F '(
#y!
#*+y!N+
#hEFg g#8g;OgQ]g_fgh
#/0y!y! 23y!,',')F B . 7K&q)009  7
%P  *iX*Z
r&   