+
    i                          R t ^ RIt^ RIHt ^ RIHt ^ RIHt ^ RIHt ]P                  ! R4      t
]! ^ 4      tR tR tR
R	 ltR# )z
pygments.regexopt
~~~~~~~~~~~~~~~~~

An algorithm that generates optimized regexes for matching long lists of
literal strings.

:copyright: Copyright 2006-2025 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
N)escape)commonprefix)groupby)
itemgetterz[\[\^\\\-\]]c                 j    R \         P                  R RP                  V 4      4      ,           R,           # )[c                 0    R V P                  4       ,           # )\)group)ms   &d/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/pip/_vendor/pygments/regexopt.py<lambda>make_charset.<locals>.<lambda>   s    	)9     ])	CS_ESCAPEsubjoin)letterss   &r   make_charsetr      s'    92777;KLLsRRr   c           	       a
a T;'       d    R;'       g    RpV '       g   R# V ^ ,          o
\        V 4      ^8X  d   V\        S
4      ,           V,           # S
'       g)   V\        V R,          R4      ,           R,           V,           # \        S
4      ^8X  d   . p. pV  F7  p\        V4      ^8X  d   VP                  V4       K&  VP                  V4       K9  	  \        V4      ^8  dS   V'       d2   V\        VR4      ,           R,           \	        V4      ,           V,           # V\	        V4      ,           V,           # \        V 4      pV'       dH   \        V4      pV\        V4      ,           \        V  Uu. uF  qUVR NK	  	  upR4      ,           V,           # V  Uu. uF  qURRR1,          NK  	  pp\        V4      p	V	'       dS   \        V	4      oV\        \        V3R lV  4       4      R4      ,           \        V	RRR1,          4      ,           V,           # VRP                  R	 \        V V
3R
 l4       4       4      ,           V,           # u upi u upi )zEReturn a regex that matches any string in the sorted list of strings.)r   :   NNz(?:?|Nc              3   .   <"   T F
  qR S)  x  K  	  R # 5i)N ).0sslens   & r   	<genexpr>"regex_opt_inner.<locals>.<genexpr>H   s     $@1vYs   c              3   Z   "   T F!  p\        \        V^,          4      R4      x  K#  	  R# 5i)r   r   N)regex_opt_innerlist)r   r
   s   & r   r!   r"   M   s*      LJU !eAh44Js   )+c                 *   < V ^ ,          S^ ,          8H  # )    r   )r   firsts   &r   r   !regex_opt_inner.<locals>.<lambda>N   s    1q9Ir   )	lenr   r$   appendr   r   sortedr   r   )strings
open_parenclose_paren	oneletterrestr   prefixplenstrings_revsuffixr(   r    s   &&        @@r   r$   r$      s   $$**KAJE
7|qF5M)K77OGBK??  	 
5zQ	A1v{  #A	 
 y>A!OD"$==C"9-.0;< < Y 77+EE'"F6{ F6N*9Ax95AB 	 %,,GqTrT77GK,+&F6{f$@$@@%HIVDbD\"#%01 	1
  L%g/IJL 	LL   : -s   0I
I
c                L    \        V 4      p V\        V R4      ,           V,           # )zReturn a compiled regex that matches any string in the given list.

The strings to match must be literal strings, not regexes.  They will be
regex-escaped.

*prefix* and *suffix* are pre- and appended to the final regex.
()r-   r$   )r.   r3   r6   s   &&&r   	regex_optr9   R   s$     WoGOGS11F::r   )r   r   )__doc__rer   os.pathr   	itertoolsr   operatorr   compiler   FIRST_ELEMENTr   r$   r9   r   r   r   <module>rA      sC   	 
     JJ'	1S5p	;r   