
    i-                     b   % S SK r S SKrS SKrS SKrS SKrS SKrS SKrS SKJrJ	r	  S SK
Jr  S SKJr  S SKJrJr  S SKJr  S SKJr  S SKJr  S S	KJrJr  \S
   r\\S'   \	\   r\\S'   \\S4   r\\S'   S)S\S\4S jjr Sq!\"\\4   S-  \S'   S\"\\4   4S jr#\S\S\4S j5       r$Sq%\S-  \S'   S\4S jr&S*S\S\S\4S jjr'\(" 5       S0r)\"\(\   \4   \S'   S\	\   S-  S\4S jr*S\S\4S jr+0 r,\"\\\-\-\\4   \4   \S '   SSSS!S!S".S#\S-  S$\-S-  S%\-S-  S&\\   S'\\   S\4S( jjr.g)+    N)
CollectionIterable)cache)Path)Literal	TypeAlias)storage_directory)_current_build_context)InvalidArgument)IntervalSet
IntervalsT)%LLuLlLtLmLoMMnMcMeNNdNlNoPPcPdPsPePiPfPoSSmScSkSoZZsZlZpCCcCfCsCoCnCategoryName
Categories.CategoriesTuplefnamereturnc                 >    [        S[        R                  U  S35      $ )Nunicode_dataz.json.gz)r	   unicodedataunidata_version)r6   s    Z/var/www/html/ai-image-ml/venv/lib/python3.13/site-packages/hypothesis/internal/charmap.pycharmap_filer=   H   s#    33wh5G     _charmapc            	         [         c  [        5       n  [        R                  " U S5       n[	        [
        R                  " U5      5      nSSS5        WR1                  5        VVs0 s H  u  pU[9        S U 5       5      _M     snnq [         R;                  5        H[  n[=        [?        US5      5      n[A        S U 5       5      (       d   eU[/        U5      :X  d   e[A        S U 5       5      (       a  M[   e   [         c   e[         $ ! , (       d  f       N= f! [         Ga    [        R                  n0 nU" [        S5      5      nSn[        S[        R                  S-   5       HB  nU" [        U5      5      nXt:w  d  M  UR                  U/ 5      R                  XVS-
  45        XvpTMD     UR                  U/ 5      R                  U[        R                  45         [!        S5      nUR#                  SSS9  [$        R&                  " US9u  p[(        R*                  " U	5        [        R                  " U
S	SS
9 n[
        R,                  " [/        UR1                  5       5      5      nUR3                  UR5                  5       5        SSS5        O! , (       d  f       O= f[(        R6                  " X5         GNk! [         a      GNyf = ff = fs  snnf )zReturn a dict that maps a Unicode category, to a tuple of 2-tuples
covering the codepoint intervals for characters in that category.

>>> charmap()['Co']
((57344, 63743), (983040, 1048573), (1048576, 1114109))
Nrbr      tmpTexist_okparentsdirwbmtimec              3   8   #    U  H  n[        U5      v   M     g 7fN)tuple).0pairs     r<   	<genexpr>charmap.<locals>.<genexpr>   s     3UTU4[[Us    c              3   B   #    U  H  n[        U[        5      v   M     g 7frM   )
isinstanceint)rO   xs     r<   rQ   rR      s     84az!S))4s   c              3   >   #    U  H  n[        U5      S :H  v   M     g7f)   Nlen)rO   tups     r<   rQ   rR      s     3s3x1}s   )!r?   r=   gzipGzipFiledictjsonload	Exceptionr:   categorychrrangesys
maxunicode
setdefaultappendr	   mkdirtempfilemkstemposclosedumpssorteditemswriteencoderenamesrN   valueslistsumall)fdtmp_charmaprc   last_cat
last_starticattmpdirfdtmpfilefpresultkpairsvsintss                    r<   charmapr   Q   sS    N 	q$'1"499Q<0 (F EPDUDUDW
DWAu3U333DW

 //#BB$D84888886$<'''333333	 $ O] ('  	 #++HKA'HJ1cnnq01s1v&?**8R8??QRU@ST+.j	 2
 ""8R077S^^8TU*51dD9&..6:]]7D:b!ZZ{/@/@/B(CDFHHV]]_- ;:: 

7& 7	>
sn   D  D

D %K

DD D A$KAK AJ==AJ
	J=
J!	J==
KKKK
codec_namec                    U [         R                  " U 5      R                  :X  d   e[        SU  35      n [        R
                  " U5       n[        R                  " U5      nSSS5        [        W5      nUR!                  U5      n [#        S5      nUR%                  SSS9  [&        R(                  " US9u  px[*        R,                  " U5        [        R
                  " USSS	9 n	U	R/                  [        R0                  " UR2                  5      R                  5       5        SSS5        [*        R4                  " X5        U$ ! , (       d  f       N= f! [         ag    / n[        [        R                  S-   5       HA  n [        U5      R                  U 5        UR                  XD45        M2  ! [         a     M?  f = f    GNYf = f! , (       d  f       N= f! [         a     U$ f = f)
zAReturn an IntervalSet of characters which are part of this codec.zcodec-NrB   rC   TrD   rG   rI   rJ   )codecslookupnamer=   r]   r^   r`   ra   rb   re   rf   rg   rd   rs   ri   r   unionr	   rj   rk   rl   rm   rn   rr   ro   	intervalsrt   )
r   r6   gzfencodable_intervalsr~   resr   r   r   ry   s
             r<   intervals_from_codecr      s    z2777776*./E3]]5!S"&))C. " )
*C
))C.C"5)dD1&&62
]]7D2aGGDJJs}}-4467 3


7" J9 "!  	3 s~~)*A3Aj) $**A62   +	3( 32  Js~   E E#E AG %>G#G 
EE E +G F.G.
F<8G;F<<GG
GG 
G'&G'_categoriesc                    ^ [         cu  [        5       m[        TR                  5       U4S jS9n U R	                  S5        U R	                  S5        U R                  S5        U R                  S5        [        U 5      q [         $ )zReturn a tuple of Unicode categories in a normalised order.

>>> categories() # doctest: +ELLIPSIS
('Zl', 'Zp', 'Co', 'Me', 'Pc', ..., 'Cc', 'Cs')
c                     > [        TU    5      $ rM   rZ   )ccms    r<   <lambda>categories.<locals>.<lambda>   s    SAZr>   )keyr.   r0   )r   r   rp   keysremoveri   rN   )
categoriesr   s    @r<   r   r      sm     YBGGI+?@
$$$$J'r>   catsr   c           
        ^^ Sn[        5       n[        U 5      mU  HT  mTU;   a.  TR                  T5        TR                  U4S jU 5       5        M7  TU;  d  M?  [	        SU SU < ST< S35      e   [        U4S jU 5       5      $ )a  Return a tuple of Unicode categories in a normalised order.

This function expands one-letter designations of a major class to include
all subclasses:

>>> as_general_categories(['N'])
('Nd', 'Nl', 'No')

See section 4.5 of the Unicode standard for more on classes:
https://www.unicode.org/versions/Unicode10.0.0/ch04.pdf

If the collection ``cats`` includes any elements that do not represent a
major class or a class with subclass, a deprecation warning is raised.
)r   r   r   r   r$   r)   r-   c              3   V   >#    U  H  oR                  T5      (       d  M  Uv   M      g 7frM   )
startswith)rO   rW   r   s     r<   rQ   (as_general_categories.<locals>.<genexpr>   s     8"QQqq"s   )	)zIn =z, z! is not a valid Unicode category.c              3   6   >#    U  H  oT;   d  M
  Uv   M     g 7frM   rS   )rO   r   outs     r<   rQ   r      s     +Bqs(B   		)r   setdiscardupdater   rN   )r   r   major_classescsr   r   s       @@r<   as_general_categoriesr      s     8M	B
d)CKKNJJ8"88b[!dV1THBqe+LM   +B+++r>   rS   category_index_cachec                 ^   ^  [        5       nT c  [        U5      m [        U 4S jU 5       5      $ )a=  Return a normalised tuple of all Unicode categories that are in
`include`, but not in `exclude`.

If include is None then default to including all categories.
Any item in include that is not a unicode character will be excluded.

>>> _category_key(exclude=['So'], include=['Lu', 'Me', 'Cs', 'So'])
('Me', 'Lu', 'Cs')
c              3   6   >#    U  H  oT;   d  M
  Uv   M     g 7frM   rS   )rO   r   r   s     r<   rQ    _category_key.<locals>.<genexpr>   s     ,Bqt)Br   )r   r   rN   )r   r   s   ` r<   _category_keyr      s+     
B|2w,B,,,r>   r   c                    [        U 5      n [        U 5      n[        R                  nUb%  UR                  R
                  R                  (       d
   [        U   $ U (       d  gU (       d   e[        U 5      [        [        5       5      :X  a  [        S[        R                  4/5      nO=[        [        U SS 5      5      R                  [        [!        5       U S      5      5      n[#        U[        5      (       d   eUb%  UR                  R
                  R                  (       d  UR$                  [        U'   UR$                  $ ! [         a     Nf = f)a  Return a tuple of codepoint intervals covering characters that match one
or more categories in the tuple of categories `key`.

>>> _query_for_key(categories())
((0, 1114111),)
>>> _query_for_key(('Zl', 'Zp', 'Co'))
((8232, 8233), (57344, 63743), (983040, 1048573), (1048576, 1114109))
NrS   r   )rN   	frozensetr
   valuedataprovideravoid_realizationr   KeyErrorr   r   r   rf   rg   _query_for_keyr   r   rU   r   )r   	cache_keycontextr   s       r<   r   r      s    *C#I$**Ggll33EE	'	22 J3
3x3z|$$q#..123^CH56<<	#b'*+
 fk****gll33EE*0*:*:Y'  		s   E 
EElimited_category_index_cache )r   min_codepointmax_codepointinclude_charactersexclude_charactersr   r   r   r   r   c                    Uc  SnUc  [         R                  n[        U 5      n[        R                  " SR                  U5      5      n[        R                  " SR                  U5      5      nUUUUR                  UR                  4n[        R                  n	U	b%  U	R                  R                  R                  (       d
   [        U   $ [        U5      n
/ nU
 H8  u  pX:  d  M  X::  d  M  UR                  [!        X5      [#        X5      45        M:     [        U5      U-  U-
  nU	b%  U	R                  R                  R                  (       d	  U[        U'   U$ ! [         a     Nf = f)u  Return a tuple of intervals covering the codepoints for all characters
that meet the criteria.

>>> query()
((0, 1114111),)
>>> query(min_codepoint=0, max_codepoint=128)
((0, 128),)
>>> query(min_codepoint=0, max_codepoint=128, categories=['Lu'])
((65, 90),)
>>> query(min_codepoint=0, max_codepoint=128, categories=['Lu'],
...       include_characters='☃')
((65, 90), (9731, 9731))
r   r   )rf   rg   r   r   from_stringjoinr   r
   r   r   r   r   r   r   r   ri   maxmin)r   r   r   r   r   catkeycharacter_intervalsexclude_intervalsqkeyr   baser   uvs                 r<   queryr      sJ   * :&F%11"'':L2MN#//8J0KL%%##D %**Ggll33EE	/55 &!DF!"4MM3q0#a2GHI  &!$77;LLFgll33EE-3$T*M  		s   E 
E'&E')r   )r   )/r   r]   r`   rm   rf   rk   r:   collections.abcr   r   	functoolsr   pathlibr   typingr   r   hypothesis.configurationr	   hypothesis.controlr
   hypothesis.errorsr    hypothesis.internal.intervalsetsr   r   r3   __annotations__r4   rN   r5   strr=   r?   r_   r   r   r   r   r   r   r   r   r   r   rV   r   rS   r>   r<   <module>r      s      	 
   0   % 6 5 - D "$
&i &N !.
I ."<#45 5 D  37$|Z'
(4
/ 6<lJ./ <~ !S ![ ! !H "&Z$ %J $,
 ,# ,? ,: DM;PRBS d9\2J>? S-, - - 
 z F  d	/3Z
;<kI  %) $ $*,*,1T!1 :1 :	1
 #31 #31 1r>   