+
    IV-jì  ã                   ó†   € R t ^ RIt^ RIHt ^ RIHt ^ RIHt ]P                  ! R4      t]! ^ 4      t	R 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-present by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
N)Úescape)Úgroupby)Ú
itemgetterz[\[\^\\\-\]]c                ó–   € V '       g   R# \        V 4      p\        V 4      p\        V4       F  w  r4WBV,          8w  g   K  VRV u # 	  V# )zJGiven an iterable of strings, returns the longest common leading substringÚ N)ÚminÚmaxÚ	enumerate)ÚmÚs1Ús2ÚiÚcs   &    Úb/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/pygments/regexopt.pyÚcommonprefixr      sE   € çÙÜ	ˆQ‹€BÜ	ˆQ‹€BÜ˜"–‰ˆØ�1•Ž:Ø�b�q�6ŠMñ ð €Ió    c                 ój   € R \         P                  R RP                  V 4      4      ,           R,           # )Ú[c                 ó0   € R V P                  4       ,           # )Ú\)Úgroup)r
   s   &r   Ú<lambda>Úmake_charset.<locals>.<lambda>"   s   € ¨°·±³	Ö)9r   r   Ú])Ú	CS_ESCAPEÚsubÚjoin)Úletterss   &r   Úmake_charsetr   !   s'   € Ø”—‘Ñ9¸2¿7¹7À7Ó;KÓLÕLÈsÕ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>S   s   øé € Ð$@¹°1 v¨¨¥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*   X   s*   é € ð LÙJ�Uô !¤ e¨A¥h£°×4Ð4ÛJùs   ‚)+c                 ó*   <€ V ^ ,          S^ ,          8H  # )é    r%   )r'   Úfirsts   &€r   r   Ú!regex_opt_inner.<locals>.<lambda>Y   s   ø€ ¸¸1½ÀÀqÅÒ9Ir   éÿÿÿÿ)	Úlenr   r,   Úappendr   r   Úsortedr   r   )ÚstringsÚ
open_parenÚclose_parenÚ	oneletterÚrestr'   ÚprefixÚplenÚstrings_revÚsuffixr0   r(   s   &&        @@r   r,   r,   %   s  ù€ à×$Ð$ ×*Ð*¨€KçáØ�A�J€EÜ
ˆ7ƒ|�qÔàœF 5›MÕ)¨KÕ7Ð7ßàœO¨G°B­K¸Ó?Õ?ØõØõ ð 	 ä
ˆ5ƒz�Q„àˆ	ØˆÛˆAÜ�1‹v˜Œ{Ø× Ñ  Ö#à—‘˜A–ñ	 ô
 ˆy‹>˜AÔßà!¤O°D¸"Ó$=Õ=ÀÕCÜ" 9Ó-õ.Ø0;õ<ð <ð ¤¨YÓ 7Õ7¸+ÕEÐEÜ˜'Ó"€FßÜ�6‹{ˆð œF 6›NÕ*Ü±Ó9±¨A  ›x±Ñ9¸5ÓAõBàõð 	ñ %,Ó,¡G˜q‘T�r�T—7�7¡G€KÐ,Ü˜+Ó&€FßÜ�6‹{ˆàÜœfÔ$@¹Ó$@Ó@À%ÓHõIä�V™D˜b˜D•\Ó"õ#à%0õ1ð 	1ð
 Ø�‰ñ LÜ% gÔ/IÔJóLó 	LõLð õð ùò :ùò -s   Å0I
ÆI
c                óL   € \        V 4      p V\        V R4      ,           V,           # )zÝReturn 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.
Ú()r5   r,   )r6   r;   r>   s   &&&r   Ú	regex_optrA   ]   s$   € ô �W‹o€GØ”O G¨SÓ1Õ1°FÕ:Ð:r   )r   r   )Ú__doc__Úrer   Ú	itertoolsr   Úoperatorr   Úcompiler   ÚFIRST_ELEMENTr   r   r,   rA   r%   r   r   Ú<module>rH      sE   ðñ	ó 
Ý Ý Ý à�JŠJ�Ó'€	Ù˜1“€ò	òSò5öp	;r   