Ë
    iKêj¾"  ã            	       ó´  — U d dl Z d dlZd dlmZ d dlmZ d dlmZmZm	Z	 d dl
mZ d dlmZ d dlmZ d dlmZmZ d d	lmZ d d
lmZ  e	d«      Zeeef   Zeed<   eeeedf   eeeef      f   Zeed<    e«       Z eeef   ed<    eeef   d«      Z!dedefd„Z"d"d„Z#dedefd„Z$dddœde%de%ed   z  deegef   fd„Z&dede%de'e(   defd „Z)dede%defd!„Z*y)#é    N)ÚCallable)Úpartial)ÚLiteralÚ	TypeAliasÚTypeVar)ÚWeakValueDictionary©ÚInvalidArgument)ÚLRUReusedCache)ÚclampÚfloat_to_int)Úproxies)ÚprettyÚTÚValueKey.ÚStrategyCacheKeyÚ_all_strategiesi   ÚvalueÚreturnc                 ó^   — t        | t        «      rt        t        | «      fS t        | «      | fS ©N)Ú
isinstanceÚfloatr   Útype)r   s    új/home/oem/CyberBrain26-unified/.venv/lib/python3.12/site-packages/hypothesis/strategies/_internal/utils.pyÚ
_value_keyr   $   s+   € Ü�%œÔÜ”| EÓ*Ð+Ð+Ü�‹K˜ÐÐó    c                  ó,   — t         j                  «        y r   )Ú_STRATEGY_CACHEÚclear© r   r   Úclear_strategy_cacher"   *   s   € Ü×ÑÕr   Úfnc                 ód   ‡ ‡‡— ddl mŠ ddlmŠ t	        ‰ «      ˆˆˆ fd„«       }t
        |_        |S )Nr   )Ú_current_build_context)ÚSearchStrategyc                  óî  •— ‰	j                   }|�(|j                  j                  j                  r ‰
| i |¤ŽS 	 |j	                  «       D ��ch c]  \  }}|t        |«      f’Œ }}}‰
t        d„ | D «       «      t        |«      f}	 t        |   S c c}}w # t        $ r  ‰
| i |¤ŽcY S w xY w# t        $ r Y nt        $ r  ‰
| i |¤ŽcY S w xY w ‰
| i |¤Ž}t        |‰«      r|j                  r	|t        |<   |S )Nc              3   ó2   K  — | ]  }t        |«      –— Œ y ­wr   )r   )Ú.0Úvs     r   ú	<genexpr>z5cacheable.<locals>.cached_strategy.<locals>.<genexpr>?   s   è ø€ Ò. A”*˜Q—-Ñ.ùs   ‚)r   ÚdataÚproviderÚavoid_realizationÚitemsr   Ú	TypeErrorÚtupleÚ	frozensetr   ÚKeyErrorr   Úis_cacheable)ÚargsÚkwargsÚcontextÚkr*   Úkwargs_cache_keyÚ	cache_keyÚresultr&   r%   r#   s           €€€r   Úcached_strategyz"cacheable.<locals>.cached_strategy2   s  ø€ à(×.Ñ.ˆØÐ 7§<¡<×#8Ñ#8×#JÒ#JÙ�tÐ&˜vÑ&Ð&ð	'Ø?E¿|¹|»~×N±t°q¸! ¤J¨q£MÒ 2ÐNÐÑNð
 ÜÑ.¨Ô.Ó.ÜÐ&Ó'ð
ˆ	ð
	'Ü" 9Ñ-Ð-ùó  OøÜò 	'Ù�tÐ&˜vÑ&Ò&ð	'ûô ò 	ÙÜò 	'Ù�tÐ&˜vÑ&Ò&ð	'úñ �TÐ$˜VÑ$ˆÜ˜& .Ô1°V×5HÒ5HØ)/ŒO˜IÑ&Øˆs;   ¹B ÁBÁ#B ÂB+ ÂB ÂB(Â'B(Â+	C	Â6C	ÃC	)Úhypothesis.controlr%   Ú*hypothesis.strategies._internal.strategiesr&   r   r"   Ú__clear_cache)r#   r<   r&   r%   s   ` @@r   Ú	cacheabler@   .   s/   ú€ Ý9ÝIäˆRƒ[õó ðô: %9€OÔ!ØÐr   F)Úforce_reusable_valuesÚeagerrA   rB   Útryc                 ó@   ‡ ‡— ‰dur‰ rt        d‰› d�«      ‚ˆˆ fd„}|S )a$  
    Each standard strategy function provided to users by Hypothesis should be
    decorated with @defines_strategy. This registers the strategy with _all_strategies,
    which is used in our own test suite to check that e.g. we document all strategies
    in sphinx.

    If you're reading this and are the author of a third-party strategy library:
    don't worry, third-party strategies don't need to be decorated with
    @defines_strategy. This function is internal to Hypothesis and not intended
    for outside use.

    Parameters
    ----------
    force_reusable_values : bool
        If ``True``, strategies returned from the strategy function will have
        ``.has_reusable_values == True`` set, even if it uses maps/filters or
        non-reusable strategies internally. This tells our numpy/pandas strategies
        that they can implicitly use such strategies as background values.
    eager : bool | "try"
        If ``True``, strategies returned by the strategy function are returned
        as-is, and not wrapped in LazyStrategy.

        If "try", we first attempt to call the strategy function and return the
        resulting strategy. If this throws an exception, we treat it the same as
        ``eager = False``, by returning the strategy function wrapped in a
        LazyStrategy.
    FzPassing both eager=z: and force_reusable_values=True is currently not supportedc                 ót   •‡ — ‰ t         ‰ j                  <   ‰du r‰ S t        ‰ «      ˆˆˆ fd„«       }d|_        |S )NTc                  ó�   •— ddl m} ‰dk(  r		  ‰| i |¤ŽS  |‰| |«      }‰rd|_        |j                  sJ ‚|S # t        $ r Y Œ.w xY w)Nr   )ÚLazyStrategyrC   T)Ú$hypothesis.strategies._internal.lazyrG   Ú	ExceptionÚforce_has_reusable_valuesÚhas_reusable_values)r5   r6   rG   r;   rB   rA   Ústrategy_definitions       €€€r   Úacceptz3defines_strategy.<locals>.decorator.<locals>.acceptƒ   sj   ø€ åIà˜Š~ðÙ.°Ð?¸Ñ?Ð?ñ
 "Ð"5°t¸VÓDˆFÙ$ð 48�Ô0Ø×1Ò1Ð1Ð1ØˆMøô !ò ñ ðús   Ž9 ¹	AÁA)r   Ú__name__r   Úis_hypothesis_strategy_function)rL   rM   rB   rA   s   ` €€r   Ú	decoratorz#defines_strategy.<locals>.decorator}   sH   ù€ Ø8KŒÐ+×4Ñ4Ñ5à�D‰=Ø&Ð&ä	Ð$Ó	%õ	ó 
&ð	ð* 26ˆÔ.Øˆr   r	   )rA   rB   rP   s   `` r   Údefines_strategyrQ   T   s>   ù€ ðB �EÑÑ3ô Ø! % ð )&ð &ó
ð 	
õ
ð> Ðr   Úobjr.   Úseenc          
      óÐ  — t        | t        t        t        t        t        d «      f«      r|t        | t        «      rjt        | t        «      sZt        | «      dk\  rL|ryt        t        j                  j                   | t        j                  j                  «      } t        | «      S | S |ryt        | «      }||v rt        | d¬«      S t        t        |||hz  ¬«      }t        | t        t         t"        t$        f«      rHt        | t         «      r"t'        | d«      r || j)                  «       «      S | D �cg c]
  } ||«      ‘Œ c}S t        | t*        «      rE| j-                  «       D ��ci c])  \  }}t        |t        «      r|n
t        |«       ||«      “Œ+ c}}S 	  || j/                  «       «      S c c}w c c}}w # t0        $ r Y nw xY wt3        j4                  | «      r]t        | t
        «      sMt3        j6                  | «      D �ci c])  }|j8                   |t;        | |j8                  «      «      “Œ+ c}S c c}w t        j<                  j?                  d«      x}	�3|	jA                  t        | «      «      r ||	jC                  | d¬	«      «      S t        j<                  j?                  d
«      x}
r,t        | |
jD                  «      r || jG                  «       «      S t        | «      S )Nl            z
<symbolic>T)Úcycle©r.   rS   Ú_asdictÚattrF)ÚrecurseÚpydantic)$r   ÚstrÚintr   Úboolr   Úabsr   ÚsysÚ
float_infoÚmaxÚidr   r   Ú_to_jsonableÚlistr1   Úsetr2   ÚhasattrrW   Údictr/   Úto_jsonrI   ÚdataclassesÚis_dataclassÚfieldsÚnameÚgetattrÚmodulesÚgetÚhasÚasdictÚ	BaseModelÚ
model_dump)rR   r.   rS   Úobj_idÚrecurÚxr8   r*   ÚfieldrX   Úpyds              r   rc   rc   Ÿ   s[  € Ü�#œœS¤%¬¬t°D«zÐ:Ô;ô
 �cœ3Ô¬
°3¼Ô(=Ä#ÀcÃ(ÈeÒBSñ !Ø#ÜœŸ™×+Ñ+Ð+¨S´#·.±.×2DÑ2DÓEˆCÜ˜“:ÐØˆ
ÙØä�‹W€FØ��~Ü�c Ô&Ð&äÜÐ(9ÀÈÀxÁô€Eô �#œœe¤S¬)Ð4Ô5Ü�cœ5Ô!¤g¨c°9Ô&=Ù˜Ÿ™›Ó'Ð'Ø"%Ö&˜Q‘�a•Ò&Ð&Ü�#”tÔàILÏÉË÷
ÙAEÀÀA”˜AœsÔ#‰A¬°«±E¸!³HÑ<ó
ð 	
ðÙ�S—[‘[“]Ó#Ð#ùò 'ùó
øô ò Ùðúô ×Ñ Ô$¬Z¸¼TÔ-Bô
 %×+Ñ+¨CÓ0ö
àð �J‰J™œg c¨5¯:©:Ó6Ó7Ñ7ò
ð 	
ùò 
ô —‘—‘ Ó'Ð'ˆÐ4¸¿¹Ä$ÀsÃ)Ô9LÙ�T—[‘[ ¨e�[Ó4Ó5Ð5Ü�{‰{�‰˜zÓ*Ð*ˆÐ*´
¸3ÀÇÁÔ0NÙ�S—^‘^Ó%Ó&Ð&ô �#‹;Ðs$   Ä2F0Å'.F5ÆF; Æ;	GÇGÈ.H7c                ó.   — t        | |t        «       ¬«      S )zçRecursively convert an object to json-encodable form.

    This is not intended to round-trip, but rather provide an analysis-ready
    format for observability.  To avoid side affects, we pretty-print all but
    known types.
    rV   )rc   re   )rR   r.   s     r   Úto_jsonablerz   Ù   s   € ô ˜Ð/@ÄsÃuÔMÐMr   )r   N)+ri   r_   Úcollections.abcr   Ú	functoolsr   Útypingr   r   r   Úweakrefr   Úhypothesis.errorsr
   Úhypothesis.internal.cacher   Úhypothesis.internal.floatsr   r   Úhypothesis.internal.reflectionr   Úhypothesis.vendor.prettyr   r   r1   r   Úobjectr   Ú__annotations__r2   r[   r   r   r   r   r"   r@   r]   rQ   re   r\   rc   rz   r!   r   r   ú<module>r†      s]  ðô Û 
Ý $Ý ß .Ñ .Ý 'å -Ý 4ß :Ý 2Ý +áˆCƒL€Ø˜D &˜LÑ)€ˆ)Ó )à#Ø
ˆE�(˜C�-Ñ  )¨E°#°x°-Ñ,@Ñ"AÐAñÐ �)ó ñ 7JÓ6K€Ð$ S¨( ]Ñ3Ó Kà:�.Ð!1°6Ð!9Ñ:¸4Ó@€ð �fð   ó  óð#�!ð #˜ó #ðP #(Ø#(òHàðHð �'˜%‘.Ñ ðHð ˆqˆc�1ˆfÑó	HðV7�fð 7°Dð 7ÀÀCÁð 7ÈVó 7ðtN�Vð N°4ð N¸Fô Nr   