+
    NV-jë   ã                   óB  € ^ RI t ^ RIHt ^ RIHt ^ RIHtHtHtH	t	H
t
HtHtHt ^RIHt ^RIHt ^RIHt ^RIHt ^R	IHtHt ] P0                  ! R
] P2                  4      t] P0                  ! R4      t ! R R]
4      t]	],          t]].]3,          t]]].]3,          t ] P0                  ! R4      PB                  3R R llt"R R lt#RR R llt$]%R8X  dG   . ROt&^ RI'H(t( ^ RI)H*t* ]*! RRRR7      t+]& F  t,]+P[                  ]! ],4      ],4       K  	  ](! ]+4       R# R# )é    N)Úliteral_eval)Ú
attrgetter)ÚCallableÚIterableÚListÚMatchÚ
NamedTupleÚOptionalÚTupleÚUnion)Ú_emoji_replace)ÚEmojiVariant)ÚMarkupError)ÚStyle)ÚSpanÚTextz((\\*)\[([a-z#/@][^[]*?)])z^([\w.]*?)(\(.*?\))?$c                   ób   a € ] tR t^t o Rt  V 3R lR lt]V 3R lR l4       tV 3R ltRt	V t
R# )	ÚTagzA tag in console markup.c                ó    <€ V ^8„  d   QhRS[ /# ©é   Úreturn©Ústr)ÚformatÚ__classdict__s   "€Ú\/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/rich/markup.pyÚ__annotate__ÚTag.__annotate__   s   ø€ ÷ 
ñ 
™ñ 
ó    c                ól   € V P                   f   V P                  # V P                   RV P                    2# )NÚ ©Ú
parametersÚname©Úselfs   &r   Ú__str__ÚTag.__str__   s3   € àŸ™Ò0ˆD�I‰Ið	
Ø9=¿¹¸À1ÀTÇ_Á_ÐDUÐ6Vð	
r    c                ó    <€ V ^8„  d   QhRS[ /# r   r   )r   r   s   "€r   r   r   "   s   ø€ ÷ 
ñ 
™ñ 
r    c                óx   € V P                   f   RV P                   R2# RV P                   RV P                    R2# )z*Get the string representation of this tag.Ú[Ú]Ú=r#   r&   s   &r   ÚmarkupÚ
Tag.markup!   sG   € ð
 �‰Ò&ð �—	‘	ˆ{˜!Ðð	
ð �T—Y‘Y�K˜q §¡Ð 1°Ð3ð	
r    c                óB   <€ V ^8„  d   Qh/ S[ ;R&   S[S[ ,          ;R&   # )r   r%   r$   )r   r
   )r   r   s   "€r   r   r      s"   ø‡ ‚ ñ �Iñ ñ
 ™•Ñò r    © N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r(   Úpropertyr/   Ú__annotate_func__Ú__static_attributes__Ú__classdictcell__)r   s   @r   r   r      s5   ø‡ € Ù"ð %à3÷
ð 
ð
 ÷
ó ð
÷ ƒ r    r   z(\\*)(\[[a-z#/@][^[]*?])c                ó<   € V ^8„  d   QhR\         R\        R\         /# )r   r/   Ú_escaper   )r   Ú_EscapeSubMethod)r   s   "r   r   r   0   s&   € ÷ ñ Üðäðô 	ñr    c                ó�   € R R lpV! W 4      p V P                  R4      '       d!   V P                  R4      '       g
   V R,           # V # )z®Escapes text so that it won't be interpreted as markup.

Args:
    markup (str): Content to be inserted in to markup.

Returns:
    str: Markup with square brackets escaped.
c                óF   € V ^8„  d   QhR\         \        ,          R\        /# )r   Úmatchr   )r   r   )r   s   "r   r   Úescape.<locals>.__annotate__=   s   € ÷ 5ñ 5¤%¬¥*ð 5´ñ 5r    c                ó8   € V P                  4       w  rV V RV 2# )z!Called by re.sub replace matches.Ú\)Úgroups)rA   ÚbackslashesÚtexts   &  r   Úescape_backslashesÚ"escape.<locals>.escape_backslashes=   s%   € à!ŸL™L›NÑˆØ�˜{˜m¨2¨d¨VÐ4Ð4r    rD   z\\)Úendswith)r/   r=   rH   s   && r   ÚescaperK   0   s@   € õ5ñ
 Ð'Ó0€FØ‡��t×Ò V§_¡_°V×%<Ò%<Ø˜�}Ðà€Mr    c          	      óž   € V ^8„  d   QhR\         R\        \        \        \        \         ,          \        \
        ,          3,          ,          /# )r   r/   r   )r   r   r   Úintr
   r   )r   s   "r   r   r   I   s3   € ÷ 0ñ 0”3ð 0œ8¤E¬#¬x¼­}¼hÄs½mÐ*KÕ$LÕMñ 0r    c              #  ó  "  € ^ p\         p\        p\        P                  V 4       FÂ  pVP	                  4       w  rVpVP                  4       w  r‰W�8”  d	   W€W R3x € V'       dX   V! \        V4      ^4      w  r«V
'       d   VRV
,          R3x € WŠ^,          ,          pV'       d   W…\        V4      R R3x € T	pK•  VP                  R4      w  rÍpTRT! YÍ'       d   TMR4      3x € T	pKÄ  	  V\        V 4      8  d   WVR R3x € R# R# 5i)z€Parse markup in to an iterable of tuples of (position, text, tag).

Args:
    markup (str): A string containing console markup

NrD   r.   )Údivmodr   ÚRE_TAGSÚfinditerrE   ÚspanÚlenÚ	partition)r/   ÚpositionÚ_divmodÚ_TagrA   Ú	full_textÚescapesÚtag_textÚstartÚendrF   ÚescapedrG   Úequalsr$   s   &              r   Ú_parser_   I   s  é € ð €HÜ€GÜ€DÜ×!Ñ! &Ö)ˆØ',§|¡|£~Ñ$ˆ	˜HØ—Z‘Z“\‰
ˆØÔØ Ð/°Ð5Ò5ßÙ#*¬3¨w«<¸Ó#;Ñ ˆKßà˜T KÕ/°Ð5Ò5Ø q�Õ(�ßà¤s¨7£| ~Ð6¸Ð<Ò<Ø�ÙØ#+×#5Ñ#5°cÓ#:Ñ ˆ�jØ�T™4 ¶F¡jÀÓEÐEÒEØŠñ% *ð& ”#�f“+ÔØ˜x˜yÐ)¨4Ð/Ô/ñ ùs   ‚A!D	Á$A D	Â%A$D	c          
      óŒ   € V ^8„  d   QhR\         R\        \         \        3,          R\        R\        \
        ,          R\        /# )r   r/   ÚstyleÚemojiÚemoji_variantr   )r   r   r   Úboolr
   r   r   )r   s   "r   r   r   j   sO   € ÷ }ñ }Üð}ä””e�Õð}ô ð}ô œLÕ)ð	}ô
 
ñ}r    c                ót  aa€ \         pRV 9  d%   \        V'       d   V! WR7      VR7      # T VR7      # \        VR7      pVP                  p\        P                  p. oSP
                  o. pVP                  p	\        p
\        pR VV3R llp\        V 4       EFõ  w  rÞpVe-   VP                  RR4      pT! V'       d	   V! V4      MT4       K7  Vf   K=  VP                  P                  R4      '       EdX   VP                  R	,          P                  4       pV'       d   V! V4      p V! V4      w  ppM S! 4       w  ppVP                  P                  R4      '       dÉ   VP"                  '       dƒ   RpVP"                  P                  4       p\$        P'                  V4      pVe   VP)                  4       w  ppVf   RMTp \+        V4      pT'       d   T\3        T\4        4      '       d   TMT33pMRpV	! V
! V\7        V4      \        VP                  V/R7      4      4       EK‘  V	! V
! V\7        V4      \9        V4      4      4       EK¶  V! V! VP                  4      VP"                  4      pSP                  \7        V4      V34       EKø  	  \7        V4      pS'       d;   SP                  4       w  pp\9        V4      pV'       g   K0  V	! V
! VVV4      4       KB  \;        VRRR1,          \=        R4      R7      Vn        V#   \         d    \        R
TP                   RT R24      Rhi ; i  \          d    \        RT R24      Rhi ; i  \,         d0   p\        RT: RTP"                  : RTP.                   24      hRp?i\0         d#   p\        RTP"                  : RT 24      RhRp?ii ; i)a³  Render console markup in to a Text instance.

Args:
    markup (str): A string containing console markup.
    style: (Union[str, Style]): The style to use.
    emoji (bool, optional): Also render emoji code. Defaults to True.
    emoji_variant (str, optional): Optional emoji variant, either "text" or "emoji". Defaults to None.


Raises:
    MarkupError: If there is a syntax error in the markup.

Returns:
    Text: A test instance.
r,   )Údefault_variant)ra   c                óR   € V ^8„  d   QhR\         R\        \        \        3,          /# )r   Ú
style_namer   )r   r   rM   r   )r   s   "r   r   Úrender.<locals>.__annotate__’   s"   € ÷ #ñ #œcð #¤e¬C´¨H¥oñ #r    c                ó”   <€ \        \        S4      ^4       F$  w  pw  r#VP                  V 8X  g   K  S! V) 4      u # 	  \        V 4      h)z"Pop tag matching given style name.)Ú	enumerateÚreversedr%   ÚKeyError)rh   ÚindexÚ_ÚtagÚpopÚstyle_stacks   &   €€r   Ú	pop_styleÚrender.<locals>.pop_style’   sE   ø€ ä(¬°+Ó)>ÀÖB‰OˆE‘8�AØ�x‰x˜:Ö%Ù˜E˜6“{Ò"ñ  Cô �zÓ"Ð"r    Nz\[Ú/:é   NNzclosing tag 'z' at position z doesn't match any open tagzclosing tag '[/]' at position z has nothing to closeÚ@Ú z()zerror parsing z in z; )Úmetar[   )Úkeyr2   éÿÿÿÿ) r   r   Úappendr   Ú	normalizerq   r   r   r_   Úreplacer%   Ú
startswithÚstriprm   r   r/   Ú
IndexErrorr$   Ú
RE_HANDLERrA   rE   r   ÚSyntaxErrorÚmsgÚ	ExceptionÚ
isinstanceÚtuplerS   r   Úsortedr   Úspans)r/   ra   rb   rc   Úemoji_replacerG   r|   r}   r‰   Úappend_spanÚ_SpanrW   rs   rU   Ú
plain_textrp   rh   r[   Úopen_tagÚhandler_namer$   Úhandler_matchÚmatch_parametersÚmeta_paramsÚerrorÚnormalized_tagÚtext_lengthrq   rr   s   &&&&                       @@r   Úrenderr–   j   sŒ  ù€ ô* #€MØ
�&ÔÜßDI‰M˜&Ô@Øô
ð 	
ØOUØô
ð 	
ô �eÔ€DØ�[‰[€FÜ—‘€Ià)+€KØ
�/‰/€Cà€EØ—,‘,€Kä€EÜ€D÷#ñ #ô &,¨F§^Ñ!ˆ˜cØÒ!à#×+Ñ+¨E°3Ó7ˆJÙ·‘= Ô,¸:ÖFØŒ_Ø�x‰x×"Ñ" 3×'Ó'Ø ŸX™X b�\×/Ñ/Ó1�
çÙ!*¨:Ó!6�Jð$Ù*3°JÓ*?™˜™xð$Ù*-«%™˜˜xð —=‘=×+Ñ+¨C×0Ò0Ø×*×*Ð*Ø')˜Ø%-×%8Ñ%8×%>Ñ%>Ó%@˜
Ü(2×(8Ñ(8¸Ó(D˜Ø(Ò4Ø=J×=QÑ=QÓ=SÑ:˜LÐ*:à(8Ò(@¡ÐFVð 'ð	(Ü*6°zÓ*B˜K÷ (à ,ä#-¨k¼5×#AÒ#Añ !,à&1 ^ð	+˜Køð ')˜áÙØ!¤3 t£9¬e¸(¿-¹-ÈÐ9UÔ.Vó÷ñ  ¡ e¬S°«Y¼¸H»Ó F×Gñ "&¡i°·±Ó&9¸3¿>¹>Ó!J�Ø×"Ñ"¤C¨£I¨~Ð#>×?ñI &4ôL �d“)€Kß
Ø —_‘_Ó&‰
ˆˆsÜ�C“ˆß‰5Ù™˜e [°%Ó8Ö9ä˜™d ˜d�¬°GÓ)<Ô=€D„JØ€KøôC $ô $Ü)Ø+¨C¯J©J¨<°~ÀhÀZÐOjÐkóà#ð$ð$ûô &ô $Ü)Ø<¸X¸JÐF[Ð\óà#ð$ð$ûô$  +ô Ü"-Ø"0°±¸dÀ8×CVÑCVÑBYÐY[Ð\a×\eÑ\eÐ[fÐ gó#ð ûô  )ô (Ü"-Ø"0°×1DÑ1DÑ0GÀrÈ%ÈÐ Qó#à#'ð(ûð(úsB   Ä*LÄ7
L3ÇMÌ)L0Ì3MÍN7Í*NÎN7ÎN7ÎN2Î2N7Ú__main__)Úprint)ÚTableÚMarkupÚResult)Úpadding)rx   TN)z[red]Hello World[/red]z[magenta]Hello [b]World[/b]z9[bold]Bold[italic] bold and italic [/bold]italic[/italic]zDClick [link=https://www.willmcgugan.com]here[/link] to visit my Blogz+:warning-emoji: [bold red blink] DANGER![/])r   rv   ).ÚreÚastr   Úoperatorr   Útypingr   r   r   r   r	   r
   r   r   r   rb   r   Úerrorsr   ra   r   rG   r   r   ÚcompileÚVERBOSErP   r‚   r   r   Ú_ReStringMatchÚ_ReSubCallabler>   ÚsubrK   r_   r–   r3   ÚMARKUPÚrichr˜   Ú
rich.tabler™   Úgridr/   Úadd_rowr2   r    r   Ú<module>r¬      s  ðÛ 	Ý Ý ß V× VÓ Vå *Ý Ý Ý ß à
�*Š*Ø%Ø‡J�Jó€ð
 �ZŠZÐ0Ó1€
ô
ˆ*ô 
ð. �s•€Ø˜>Ð*¨CÐ/Õ0€Ø˜^¨SÐ1°3Ð6Õ7Ð ð
 !#§
¢
Ð+FÓ G× KÑ K÷õ20÷B}ð@ ˆzÔò€Fõ Ý á�˜8¨VÔ4€DãˆØ�‰‘T˜&“\ 6Ö*ñ ñ 
ˆ$†Kñ# r    