+
    i  c                   s    ^ RI t ^ RIt] P                  ]! ] P                  4      ]! ] P                  4      ,          ,           t ! R R4      tR tR# )    Nc                   sr   a  ] tR t^t o Rt]3V 3R lR lltR tR tR t	R t
R tR	 tR
 tV 3R ltRtV tR# )
Translatorz
>>> Translator('xyz')
Traceback (most recent call last):
...
AssertionError: Invalid separators

>>> Translator('')
Traceback (most recent call last):
...
AssertionError: Invalid separators
c                s    < V ^8  d   QhRS[ /# i   sepsstrZformat__classdict__   "+/usr/lib64/python3.14/zipfile/_path/glob.py__annotate__Translator.__annotate__   s      S     c                s    Wn         R # )Nr   )selfr      &&r	   __init__ZTranslator.__init__   s    	r   c                s`    V P                  V P                  V P                  V4      4      4      # )z8
Given a glob pattern, produce a regex that matches it.
)extend
match_dirstranslate_corer   patternr   r	   	translateZTranslator.translate   s'     {{4??4+>+>w+GHIIr   c                s    RV R2# )z
Extend regex for pattern-wide concerns.

Apply '(?s:)' to create a non-matching group that
matches newlines (valid on Unix).

Append '\z' to imply fullmatch even when match is used.
z(?s:z)\z r   r   r	   r   ZTranslator.extend    s     wis##r   c                s    V R2# )zl
Ensure that zipfile.Path directory names are matched.

zipfile.Path directory names always end in a slash.
z[/]?r   r   r   r	   r   ZTranslator.match_dirs+   s     )4  r   c           
     s    V P                  V4       RP                  \        V P                  \	        V P                  V4      4      4      4      # )z
Given a glob pattern, produce a regex that matches it.

>>> t = Translator()
>>> t.translate_core('*.txt').replace('\\\\', '')
'[^/]*\\.txt'
>>> t.translate_core('a?txt')
'a[^/]txt'
>>> t.translate_core('**/*').replace('\\\\', '')
'.*/[^/][^/]*'
Z )restrict_rglobZjoinZmapreplaceseparatestar_not_emptyr   r   r	   r   ZTranslator.translate_core3   s<     	G$wws4<<$2E2Eg2N)OPQQr   c                s"   VP                  R4      ;'       gx    \        P                  ! VP                  ^ 4      4      P                  RR4      P                  RR\        P                  ! V P                  4       R24      P                  RR4      # )	z=
Perform the replacements for a match from :func:`separate`.
Zsetz\*\*z.*z\*[^z]*z\?z[^/])groupreescaper   r   )r   matchr   r	   r   ZTranslator.replaceB   sn     {{5! 
 
IIekk!n%WXu%WUr"))DII"6!7r:;WUG$		
r   c                s   R\         P                  ! V P                  4       R2p\         P                  ! W!4      p\        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      '       d   \        R4      hR# )z
Raise ValueError if ** appears in anything but a full path segment.

>>> Translator().translate('**foo')
Traceback (most recent call last):
...
ValueError: ** must appear alone in a path segment
Z[]+c              3   sF   "   T F  pR V9   ;'       d    VR 8g  x  K  	  R# 5i)z**Nr   )Z.0segment   & r	   Z	<genexpr>Z,Translator.restrict_rglob.<locals>.<genexpr>X   s#     K(wtw227d?2(s   !!TFz&** must appear alone in a path segmentN)r   r   r   ZsplitZanyZ
ValueError)r   r   Zseps_patternZsegments   &&  r	   r   ZTranslator.restrict_rglobM   sa     BIIdii01488L23K(K333K(KKKEFF Lr   c                s~    R pR\         P                  ! V P                  4       R2p\         P                  ! W2V4      # )z0
Ensure that * will not match an empty segment.
c                 s:    V P                  ^ 4      pVR8X  d   R# T# )r    Z*z?*)r   )r    r"   r#   r	   handle_segmentZ1Translator.star_not_empty.<locals>.handle_segment`   s     kk!nG"c>46w6r   r   r!   )r   r   r   Zsub)r   r   r%   Znot_seps_patternr$   r	   r   ZTranslator.star_not_empty[   s8    
	7 !499!5 6b9vv&@@r   c                s&   < V ^8  d   Qh/ S[ ;R&   # r   r   r   r   r	   r
   r      s      I r   r   N)Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc___default_sepsr   r   r   r   r   r   r   r   Z__annotate_func__Z__static_attributes__Z__classdictcell__)r   s   @r	   r   r      sH     
 $1  J	$!R	
G
Ai  r   r   c                s0    \         P                  ! RV 4      # )z
Separate out character sets to avoid translating their contents.

>>> [m.group(0) for m in separate('*.txt')]
['*.txt']
>>> [m.group(0) for m in separate('a[?]txt')]
['a', '[?]', 'txt']
z+([^\[]+)|(?P<set>[\[].*?[\]])|([\[][^\]]*$))r   Zfinditer)r   s   &r	   r   r   h   s     ;;EwOOr   )	Zosr   Zsepr   ZaltsepZboolr&   r   r   r   r   r	   <module>r'      sC    	 	RYY$ryy/99^A ^AB	Pr   