+
    IV-jå  ã                   óX   € R t ^ RIHt ^ RIHt ^ RIHtHt R.tR t	/ t
 ! R R]4      tR# )z»
pygments.formatters.svg
~~~~~~~~~~~~~~~~~~~~~~~

Formatter for SVG output.

:copyright: Copyright 2006-present by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
)Ú	Formatter)ÚComment)Úget_bool_optÚget_int_optÚSvgFormatterc                ó¦   € V P                  RR4      P                  RR4      P                  RR4      P                  RR4      P                  R	R
4      # )z<Escape &, <, > as well as single and double quotes for HTML.Ú&z&amp;Ú<z&lt;Ú>z&gt;Ú"z&quot;Ú'z&#39;)Úreplace)Útexts   &Úh/Volumes/fast/ai/experiments/ui-tars-smoke/.venv/lib/python3.14/site-packages/pygments/formatters/svg.pyÚescape_htmlr      sE   € à�<‰<˜˜WÓ%ß‘˜˜VÓ$ß‘˜˜VÓ$ß‘˜˜XÓ&ß‘˜˜WÓ%ð	&ó    c                   óF   a € ] tR t^t o RtRtR.tR.tR tR t	R t
RtV tR	# )
r   ad  
Format tokens as an SVG graphics file.  This formatter is still experimental.
Each line of code is a ``<text>`` element with explicit ``x`` and ``y``
coordinates containing ``<tspan>`` elements with the individual token styles.

By default, this formatter outputs a full SVG document including doctype
declaration and the ``<svg>`` root element.

.. versionadded:: 0.9

Additional options accepted:

`nowrap`
    Don't wrap the SVG ``<text>`` elements in ``<svg><g>`` elements and
    don't add a XML declaration and a doctype.  If true, the `fontfamily`
    and `fontsize` options are ignored.  Defaults to ``False``.

`fontfamily`
    The value to give the wrapping ``<g>`` element's ``font-family``
    attribute, defaults to ``"monospace"``.

`fontsize`
    The value to give the wrapping ``<g>`` element's ``font-size``
    attribute, defaults to ``"14px"``.

`linenos`
    If ``True``, add line numbers (default: ``False``).

`linenostart`
    The line number for the first line (default: ``1``).

`linenostep`
    If set to a number n > 1, only every nth line number is printed.

`linenowidth`
    Maximum width devoted to line numbers (default: ``3*ystep``, sufficient
    for up to 4-digit line numbers. Increase width for longer code blocks).

`xoffset`
    Starting offset in X direction, defaults to ``0``.

`yoffset`
    Starting offset in Y direction, defaults to the font size if it is given
    in pixels, or ``20`` else.  (This is necessary since text coordinates
    refer to the text baseline, not the top edge.)

`ystep`
    Offset to add to the Y coordinate for each subsequent line.  This should
    roughly be the text size plus 5.  It defaults to that value if the text
    size is given in pixels, or ``25`` else.

`spacehack`
    Convert spaces in the source to ``&#160;``, which are non-breaking
    spaces.  SVG provides the ``xml:space`` attribute to control how
    whitespace inside tags is handled, in theory, the ``preserve`` value
    could be used to keep all whitespace as-is.  However, many current SVG
    viewers don't obey that rule, so this option is provided as a workaround
    and defaults to ``True``.
ÚSVGÚsvgz*.svgc                óØ  € \         P                  ! V 3/ VB  \        VR R4      V n        VP	                  RR4      V n        VP	                  RR4      V n        \        VR^ 4      V n        V P                  P                  4       pVP                  R4      '       d   VRR P                  4       p \        V4      p\        VR	V4      V n        \        VR
V^,           4      V n        \        VRR4      V n        \        VRR4      V n        \        VR^4      V n        \        VR^4      V n        \        VR^V P                  ,          4      V n        / V n        R#   \         d    ^p L®i ; i)ÚnowrapFÚ
fontfamilyÚ	monospaceÚfontsizeÚ14pxÚxoffsetÚpxNÚyoffsetÚystepÚ	spacehackTÚlinenosÚlinenostartÚ
linenostepÚlinenowidthéþÿÿÿ)r   Ú__init__r   r   Úgetr   r   r   r   ÚstripÚendswithÚintÚ
ValueErrorr   r   r   r    r!   r"   r#   Ú_stylecache)ÚselfÚoptionsÚfsÚint_fss   &,  r   r%   ÚSvgFormatter.__init__]   s7  € Ü×Ò˜4Ñ+ 7Ò+Ü" 7¨H°eÓ<ˆŒØ!Ÿ+™+ l°KÓ@ˆŒØŸ™ J°Ó7ˆŒÜ" 7¨I°qÓ9ˆŒØ�]‰]× Ñ Ó"ˆØ�;‰;�t×ÒØ�C�R�—‘“ˆBð	Ü˜“WˆFô # 7¨I°vÓ>ˆŒÜ  ¨'°6¸Aµ:Ó>ˆŒ
Ü% g¨{¸DÓAˆŒÜ# G¨I°eÓ<ˆŒÜ& w¨}¸QÓ?ˆÔÜ% g¨l¸1Ó=ˆŒÜ& w¨}¸aÀÇ
Á
½lÓKˆÔØˆÖøô ô 	ØŠFð	ús   Â/E ÅE)Å(E)c                ót  € V P                   pV P                  pV P                  '       g’   V P                  '       d!   VP	                  RV P                   R24       MVP	                  R4       VP	                  R4       VP	                  R4       VP	                  RV P
                   RV P                   R24       V P                  pV P                  pV P                  \        4      pTpV P                  '       dh   WV,          ^ 8X  d/   VP	                  R	W0P                  ,            R
V RV RV R2	4       W€P                  V P                  ,           ,          pV^,          pVP	                  R	V R
V R24       V EF  w  ršV P                  V	4      pT;'       d    RV,           R,           ;'       g    RpT;'       d    R;'       g    Rp\        V
4      p
V P                  '       d!   V
P!                  4       P#                  RR4      p
V
P%                  R4      pVRR  F²  pVP	                  WÏ,           V,           4       W@P                  ,          pVP	                  R4       V P                  '       d<   WV,          ^ 8X  d/   VP	                  R	W0P                  ,            R
V RV RV R2	4       V^,          pVP	                  R	V R
V R24       K´  	  VP	                  WÎR,          ,           V,           4       EK‚  	  VP	                  R4       V P                  '       g   VP	                  R4       R# R# )z¯
Format ``tokensource``, an iterable of ``(tokentype, tokenstring)``
tuples and write it into ``outfile``.

For our implementation we put all lines in their own 'line group'.
z<?xml version="1.0" encoding="z"?>
z<?xml version="1.0"?>
zk<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
z)<svg xmlns="http://www.w3.org/2000/svg">
z<g font-family="z" font-size="z">
z	<text x="z" y="z" z text-anchor="end">z</text>z" xml:space="preserve">z<tspanr
   Ú z</tspan>Ú z&#160;Ú
Nz</text>
z" text-anchor="end" z</g></svg>
éÿÿÿÿ)r   r   r   ÚencodingÚwriter   r   r!   r"   Ú
_get_styler   r    r#   r   r   r   Ú
expandtabsr   Úsplit)r,   ÚtokensourceÚoutfileÚxÚyÚcounterÚcounter_stepÚcounter_styleÚline_xÚttypeÚvalueÚstyleÚtspanÚtspanendÚpartsÚparts   &&&             r   Úformat_unencodedÚSvgFormatter.format_unencodeds   s·  € ð �L‰LˆØ�L‰LˆØ�{�{ˆ{Ø�}�}ˆ}Ø—‘Ð >¸t¿}¹}¸oÈUÐSÕTà—‘Ð7Ô8Ø�M‰Mð *ô +ð �M‰MÐFÔGØ�M‰MÐ,¨T¯_©_Ð,=¸]È4Ï=É=È/ÐY]Ð^Ô_à×"Ñ"ˆØ—‘ˆØŸ™¬Ó0ˆØˆà�<�<ˆ<ØÕ%¨Ô*Ø—‘ 	¨!×,<Ñ,<Õ*<Ð)=¸UÀ1À#ÀRÈÀÐViÐjqÐirÐryÐzÔ{Ø×&Ñ&¨¯©Õ3Õ3ˆFØ�q�LˆGà�‰˜	 & ¨¨q¨cÐ1HÐIÔJÜ'‰LˆEØ—O‘O EÓ*ˆEØ×4Ð4˜h¨Õ.°Õ4×:Ð:¸ˆEØ×+Ð+ ×1Ð1¨rˆHÜ Ó&ˆEØ�~�~ˆ~Ø×(Ñ(Ó*×2Ñ2°3¸ÓA�Ø—K‘K Ó%ˆEØ˜c˜r›
�Ø—‘˜e�l¨XÕ5Ô6Ø—Z‘Z•�Ø—‘˜kÔ*Ø—<—<�< GÕ$:¸aÔ$?Ø—M‘M I¨a×0@Ñ0@Õ.@Ð-AÀÀqÀcÐI]Ð^kÐ]lÐlmÐnuÐmvÐv}Ð"~Ôà˜1•�Ø—‘ 	¨&¨°°q°cÐ9TÐTÖUñ #ð �M‰M˜%¨¥)Õ+¨hÕ6×7ñ# (ð$ 	�‰�iÔ à�{�{ˆ{Ø�M‰M˜.Ö)ñ r   c                ó°  € WP                   9   d   V P                   V,          # TpV P                  P                  V4      '       g   VP                  pK/  V P                  P	                  V4      pR pVR,          '       d   RVR,          ,           R,           pVR,          '       d
   VR,          pVR,          '       d
   VR,          pW@P                   V&   V# )r2   Úcolorz fill="#r   Úboldz font-weight="bold"Úitalicz font-style="italic")r+   rE   Ústyles_tokenÚparentÚstyle_for_token)r,   Ú	tokentypeÚ
otokentyperD   Úresults   &&   r   r8   ÚSvgFormatter._get_styleª   s´   € Ø×(Ñ(Ô(Ø×#Ñ# IÕ.Ð.Øˆ
Ø—*‘*×)Ñ)¨)×4Ò4Ø!×(Ñ(ŠIØ—
‘
×*Ñ*¨9Ó5ˆØˆØ��>Œ>Ø %¨¥.Õ0°3Õ6ˆFØ��=Œ=ØÐ+Õ+ˆFØ��?Œ?ØÐ,Õ,ˆFØ'-×Ñ˜Ñ$Øˆr   )r+   r   r   r    r!   r"   r#   r   r   r   r   r   N)Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__ÚnameÚaliasesÚ	filenamesr%   rJ   r8   Ú__static_attributes__Ú__classdictcell__)Ú__classdict__s   @r   r   r      s5   ø‡ € ñ:ðv €DØˆg€GØ�	€Iòò,5*÷nð r   N)r[   Úpygments.formatterr   Úpygments.tokenr   Úpygments.utilr   r   Ú__all__r   Úclass2styler   © r   r   Ú<module>rh      s7   ðñõ )Ý "ß 3àÐ
€ò&ð €ô\�9ö \r   