+
    b1  c                   s    ^ RI t ^ RIt^ RIHt ^ RIHt ^ RIHt RRRRR	R
RRRRRRRRRRRRRR
RRRR/tRRRRR
R RR!RR"RR#RR$/t	R t
 ! R R]4      t ! R R]R7      tR# )%    N)
exceptions)string_type)get_methodsboolbooleanlistarraydictobjectNoneTypenullunicodestringstrfloatnumberintlongOrderedDict_Projection_Expressionexprefc                  s   a  V 3R  lpV# )c                 s   < SV n         V # N)	signature)Zfunc	argumentss   &7/usr/lib/python3.14/site-packages/jmespath/functions.py_record_signatureZ$signature.<locals>._record_signature'   s    "     )r   r   s   j r   r   r   &   s     r   c                   s8   a a ] tR t^-t oV 3R ltR tRtVtV ;t# )FunctionRegistryc                sP   < V P                  4        \        \        V `  WV4       R # r   )_populate_function_tableZsuperr   __init__)clsnameZbasesZattrs	__class__s   &&&&r   r    ZFunctionRegistry.__init__.   s!    $$&-d5Ar   c                s    / p\        V 4       F@  w  r#VP                  R 4      '       g   K  \        VRR4      pVf   K1  RVRV/WR,          &   KB  	  Wn        R# )Z_func_r   Nfunction:i   NN)r   
startswithZgetattrFUNCTION_TABLE)r!   Zfunction_tabler"   Zmethodr   s   &    r   r   Z)FunctionRegistry._populate_function_table2   s`     (,LD??8,,T:I$,Bx( - ,r   r   )	__name__
__module____qualname____firstlineno__r    r   __static_attributes____classdictcell__Z__classcell__)r#   __classdict__s   @@r   r   r   -   s     B, ,r   r   c                   s  a  ] tR t^Ct o / tR tR tR tR tR t	R t
]! RR./4      R	 4       t]! RR
./4      R 4       t]! R. RR/4      R 4       t]! R. /4      R 4       t]! R. /4      R 4       t]! R. /4      R 4       t]! RRR./R. /4      R 4       t]! R. R/O/4      R 4       t]! RR./RR./4      R 4       t]! RR./RR./4      R 4       t]! RRR./4      R 4       t]! RR./4      R 4       t]! RR./4      R 4       t]! RR./RR./4      R 4       t]! RR./RR./4      R 4       t]! RR
R./4      R  4       t]! RR.RR/4      R! 4       t]! RR
R./4      R" 4       t]! RRR
./4      R# 4       t]! RR
./4      R$ 4       t]! RR./4      R% 4       t ]! RR./4      R& 4       t!]! R. /4      R' 4       t"]! RR./RR./4      R( 4       t#]! RR./RR./4      R) 4       t$]! RR./RR./4      R* 4       t%R+ t&R, t'R-t(V t)R.# )0	Functionsc                s     V P                   V,          pTR,          pTR,          pT P	                  Y%T4       T! T .TO5!  #   \         d    \        P                  ! R T,          4      hi ; i)zUnknown function: %s()r$   r   )r&   ZKeyErrorr   ZUnknownFunctionError_validate_arguments)selffunction_nameZresolved_argsZspecr$   r   s   &&&   r   call_functionZFunctions.call_functionH   sy    	:&&}5D 
#%	  =I-}--  	:11(=8: :	:s   A )A,c                s   V'       dc   VR,          P                  R4      '       dE   \        V4      \        V4      8  d+   \        P                  ! \        V4      \        V4      V4      hMC\        V4      \        V4      8w  d+   \        P                  ! \        V4      \        V4      V4      hV P                  WV4      # )   variadic)getlenr   ZVariadictArityErrorZ
ArityError_type_check)r0   Zargsr   r1   s   &&&&r   r/   ZFunctions._validate_argumentsS   s    2**:664y3y>) 44	NCI}> > * Y#i.(''ID	=: :??r   c                s    \        \        V4      4       F5  pW$,          R ,          pV'       g   K  V P                  W,          VV4       K7  	  R# )typesN)Zranger7   _type_check_single)r0   Zactualr   r1   Ziallowed_typess   &&&&  r   r8   ZFunctions._type_check]   s=    s9~&A%L1M}''	=(57 'r   c                s    V P                  V4      w  rE\        V4      P                  pWd9  d(   \        P                  ! W1V P                  V4      V4      hV'       d   V P                  WW#4       R # R # r   )_get_allowed_pytypestyper'   r   JMESPathTypeError_convert_to_jmespath_type_subtype_check)r0   currentr9   r1   r;   allowed_subtypesactual_typenames   &&&&   r   r:   ZFunctions._type_check_singled   ss     +/*C*CE*J'
 w-00/....?H H  %6 r   c                s    . p. pV Fk  pVP                  R ^4      p\        V4      ^8X  d"   Vw  rVVP                  \        V,          4       M	V^ ,          pVP	                  \        V,          4       Km  	  W#3# )Z-)Zsplitr7   appendREVERSE_TYPES_MAPZextend)r0   r9   r;   rB   ZtZtype_Zsubtypes   &&     r   r<   ZFunctions._get_allowed_pytypes{   st    AGGCOE5zQ!& ''(9'(BCa  !25!9:  ..r   c                s   \        V4      ^8X  dG   V^ ,          pV F5  p\        V4      P                  pWb9  g   K   \        P                  ! WEWc4      h	  R# \        V4      ^8  d   V'       d   \        V^ ,          4      P                  pV F  pWx9   g   K  Tp	 M 	  \        P                  ! WA^ ,          Ws4      hV F5  p\        V4      P                  pWi9  g   K   \        P                  ! WEWc4      h	  R# R# R# )r3   N)r7   r=   r'   r   r>   )
r0   rA   rB   r9   r1   elementrC   ZfirstZsubtypesZalloweds
   &&&&&     r   r@   ZFunctions._subtype_check   s     A%  02""&w-"8"8":$66%H H #
 !"Q&7 $--E,$&G -
 !22!1:u= =""&w-"8"8"1$66%H H # ,3&r   r9   r   c                    \        V4      # r   )Zabsr0   arg   &&r   	_func_absZFunctions._func_abs       3xr   zarray-numberc                s^    V'       d%   \        V4      \        \        V4      4      ,          # R # r   )sumr   r7   rH   rJ   r   	_func_avgZFunctions._func_avg   s    s8eCHo--r   r4   Tc                s(    V F  pVf   K	  Vu # 	  R # r   r   )r0   r   Zarguments   &* r   _func_not_nullZFunctions._func_not_null   s    !H# "r   c                s8    \        V\        4      '       d   V# V.# r   )
isinstancer   rH   rJ   r   _func_to_arrayZFunctions._func_to_array   s    c4  J5Lr   c                sl    \        V\        4      '       d   V# \        P                  ! VR\        R7      # ),)Z
separatorsZdefault)rR   Z:)rP   STRING_TYPEjsonZdumpsr   rH   rJ   r   _func_to_stringZFunctions._func_to_string   s,    c;''J::cj&)+ +r   c                s   \        V\        \        \        34      '       d   R # Vf   R # \        V\        \
        34      '       d   V#  \	        V4      #   \         d#     \        T4      u #   \         d      R # i ; ii ; ir   )rP   r   r   r   r   r   Z
ValueErrorrH   rJ   r   _func_to_numberZFunctions._func_to_number   su    cD$-..[c5\**J 3x    :%!    s0   	
A B 
A-*B-A=8B<A==Br   r   c                s
    W!9   # r   r   )r0   Zsubjectsearch   &&&r   _func_containsZFunctions._func_contains   s      r   r	   c                rG   r   )r7   rH   rJ   r   _func_lengthZFunctions._func_length   rL   r   c                $    VP                  V4      # r   )Zendswithr0   rW   ZsuffixrX   r   _func_ends_withZFunctions._func_ends_with   s    v&&r   c                r[   r   )r%   r\   rX   r   _func_starts_withZFunctions._func_starts_with   s      ((r   c                sn    \        V\        4      '       d   VR R R1,          # \        \        V4      4      # )Nr5   )rP   rS   r   ZreversedrH   rJ   r   _func_reverseZFunctions._func_reverse   s,    c;''tt9&&r   c                .    \         P                  ! V4      # r   )mathZceilrH   rJ   r   
_func_ceilZFunctions._func_ceil   s    yy~r   c                r`   r   )ra   ZfloorrH   rJ   r   _func_floorZFunctions._func_floor   s    zz#r   zarray-stringc                r[   r   )Zjoin)r0   Z	separatorr   rX   r   
_func_joinZFunctions._func_join   s    ~~e$$r   r   c                sr    . pV F.  pVP                  VP                  VP                  V4      4       K0  	  V# r   )rD   visit
expression)r0   r   rI   resultrF      &&&  r   	_func_mapZFunctions._func_map   s3    GMM&,,v'8'8'BC r   c                ,    V'       d   \        V4      # R # r   )maxrH   rJ   r   	_func_maxZFunctions._func_max       s8Or   c                s>    / pV F  pVP                  V4       K  	  V# r   )Zupdate)r0   r   ZmergedrI   s   &*  r   _func_mergeZFunctions._func_merge  s"    CMM# r   c                rj   r   )minrH   rJ   r   	_func_minZFunctions._func_min  rm   r   c                s*    \        \        V4      4      # r   )r   sortedrH   rJ   r   
_func_sortZFunctions._func_sort  s    F3K  r   c                rG   r   )rM   rH   rJ   r   	_func_sumZFunctions._func_sum  rL   r   c                4    \        VP                  4       4      # r   )r   ZkeysrH   rJ   r   
_func_keysZFunctions._func_keys  s     CHHJr   c                rt   r   )r   ZvaluesrH   rJ   r   _func_valuesZFunctions._func_values"  s    CJJL!!r   c                s   \        V\        4      '       d   R # \        V\        4      '       d   R# \        V\        4      '       d   R# \        V\        4      '       d   R# \        V\
        \        34      '       d   R# Vf   R# R# )r   r   r   r	   r   Nr   )rP   rS   r   r   r   r   r   rH   rJ   r   
_func_typeZFunctions._func_type&  sc    c;''T""T""T""eS\**[ r   c           	     sD   V'       g   V# V P                  \        VP                  VP                  V^ ,          4      4      P                  4      pVR9  d#   \
        P                  ! RV^ ,          VRR.4      hV P                  VV.R4      p\        \        WR7      4      # )r    r   r   Zsort_byZkey)r   r   )
r?   r=   re   rf   r'   r   r>   _create_key_funcr   rq   )r0   r   r   Zrequired_typekeyfuncrh   r   _func_sort_byZFunctions._func_sort_by5  s    L 66f//q:;DDF 44..58]Xx4HJ J'')6(13 F5.//r   c                X    V P                  VR R.R4      pV'       d   \        WR7      # R# )r   r   Zmin_byrx   N)ry   ro   r0   r   r   rz      &&& r   _func_min_byZFunctions._func_min_byI  2    '')18(<(02 u**r   c                r|   )r   r   Zmax_byrx   N)ry   rk   r}   r~   r   _func_max_byZFunctions._func_max_byS  r   r   c                s    a aaa VVVV 3R  lpV# )c                 s   < SP                  SP                  V 4      p\        V4      P                  pSP	                  V4      pVS9  d   \
        P                  ! SWS4      hV# r   )re   rf   r=   r'   r?   r   r>   )Zxrg   rC   Zjmespath_typer;   r   r1   r0   s   &   r   rz   Z+Functions._create_key_func.<locals>.keyfunc^  sa    \\&"3"3Q7F"6l33O ::?KMM1 22!6-I IMr   r   )r0   r   r;   r1   rz   s   ffff r   ry   ZFunctions._create_key_func]  s    	 	 r   c                s.    \         P                  VR 4      # )Zunknown)	TYPES_MAPr6   )r0   ZpyobjectrJ   r   r?   Z#Functions._convert_to_jmespath_typei  s    }}Xy11r   r   N)r   r   r	   )*r'   r(   r)   r*   r&   r2   r/   r8   r:   r<   r@   r   rK   rN   rO   rQ   rU   rV   rY   rZ   r]   r^   r_   rb   rc   rd   ri   rl   rn   rp   rr   rs   ru   rv   rw   r{   r   r   ry   r?   r+   r,   )r-   s   @r   r.   r.   C   s    N	.@76./H8 ($% & .)*+ , Z./  0 
 }  }+ + }     '8,-}=! >! 678 9 ($w
&;<' =' ($w
&;<) =) '8,-.' /' ($% & ($% & ($w0@&AB% C% ($w	&:; < ..9:; < (Z67 8 ..9:; < ..9:;! <! .)*+ , ($%  & 
 ($%" &" }  '#gz%:;0 <0& '#gz%:; < '#gz%:; <
2 2r   r.   )Z	metaclass)r   )r   r   )r   r   )r
   )r   r   )r   r   r   )r   )ra   rT   Zjmespathr   Zjmespath.compatr   rS   r   r   rE   r   r=   r   r.   r   r   r   <module>r      s       6 '
 I
G
Hx	8X	8
H878	$ y$&
M & ,t ,,g2* g2r   