ó
    …~i7  ã                  ó´   • S r SSKJr  SSKrSSKrSSKJrJrJrJ	r	  \(       a  SSK
Jr  SSKJr  \	" SS	S
9r\R                  r " S S	5      r\	" S\S
9rSS jrg)z
Base renderer class
é    )ÚannotationsN)ÚTYPE_CHECKINGÚAnyÚCallableÚTypeVaré   ©ÚDocument)ÚElementÚ_TÚRenderer)Úboundc                  ó~   • \ rS rSr% SrSrS\S'   \R                  " S5      r	SS jr
SS jrSS	 jrSS
 jrSS jrSrg)r   é   a÷  The base class of renderers.

A custom renderer should subclass this class and include your own render functions.

A render function should:

* be named as ``render_<element_name>``, where the ``element_name`` is the snake
  case form of the element class name, the renderer will search the corresponding
  function in this way.
* accept the element instance and return any output you want.

If no corresponding render function is found, renderer will fallback to call
:meth:`Renderer.render_children`.
TÚboolÚdelegatez<&(#[0-9]{1,7};|#[xX][0-9a-fA-F]{1,6};|[^\t\n\f <&#;]{1,32};)c                ó   • S U l         g ©N©Ú	root_node©Úselfs    ÚK/home/mande/repo/quber/.venv/lib/python3.13/site-packages/marko/renderer.pyÚ__init__ÚRenderer.__init__-   s	   € Ø*.ˆ�ó    c                ó0   • U R                   [        l         U $ )z>Provide a context so that root_node can be reset after render.)Ú_charrefÚhtmlr   s    r   Ú	__enter__ÚRenderer.__enter__0   s   € àŸ™ŒŒØˆr   c                ó0   • [         [        l        S U l        g r   )Ú_charref_bakr   r   r   )r   Úargss     r   Ú__exit__ÚRenderer.__exit__5   s   € Ü$ŒŒØˆ�r   c                óv  • SSK Jn  U R                  (       d5  [        X5      (       a  Xl        OU" 5       U l        U/U R                  l        [        US5      (       aL  SUR                  SS9-   n[        XS5      nUb+  [        USS	5      (       d  U R                  (       a  U" U5      $ U R                  U5      $ )
z{Renders the given element to string.

:param element: a element to be rendered.
:returns: the output string or any values.
r   r	   Úget_typeÚrender_T)Ú
snake_caseNÚ_force_delegateF)
Úblockr
   r   Ú
isinstanceÚchildrenÚhasattrr(   Úgetattrr   Úrender_children)r   Úelementr
   Ú	func_nameÚrender_funcs        r   ÚrenderÚRenderer.render9   s¢   € õ 	$ð �~�~Ü˜'×,Ñ,Ø!(•ñ "*£�”Ø+2¨)�—‘Ô'Ü�7˜J×'Ñ'Ø! G×$4Ñ$4ÀÐ$4Ð$EÑEˆIÜ! $°4Ó8ˆKØÑ&Ü˜Ð%6¸×>Ñ>À$Ç-Ç-á" 7Ó+Ð+Ø×#Ñ# GÓ,Ð,r   c                ó‚   • UR                    Vs/ s H  o R                  U5      PM     nnSR                  U5      $ s  snf )aw  
Recursively renders child elements. Joins the rendered
strings with no space in between.

If newlines / spaces are needed between elements, add them
in their respective templates, or override this function
in the renderer subclass, so that whitespace won't seem to
appear magically for anyone reading your program.

:param element: a branch node who has children attribute.
Ú )r.   r5   Újoin)r   r2   ÚchildÚrendereds       r   r1   ÚRenderer.render_childrenR   s<   € ð 5<×4DÒ4DÓEÒ4D¨5—K‘K Ö&Ñ4DˆÐEØ�w‰w�xÓ Ð ùò Fs   �<r   N)ÚreturnÚNone)r   r   r=   r   )r$   r   r=   r>   )r2   r   r=   r   )r2   r   r=   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ú__annotations__ÚreÚcompiler   r   r    r%   r5   r1   Ú__static_attributes__© r   r   r   r      s=   ‡ ñð& €HˆdÓà�zŠzØOó€Hô/ôô
ô-÷2!r   Ú_Fc                ó   • SU l         U $ )zW
A decorator to allow delegation for the specified method even if cls.delegate = False
T)r+   )Úfuncs    r   Úforce_delegaterL   e   s   € ð  €DÔØ€Kr   )rK   rI   r=   rI   )rC   Ú
__future__r   r   rE   Útypingr   r   r   r   r,   r
   r2   r   r   r   r#   r   rI   rL   rH   r   r   Ú<module>rO      sY   ðñõ #ã Û 	ß 8Ó 8æÝÝ áˆT˜Ñ$€Ø�}‰}€÷L!ñ L!ñ^ ˆT˜Ñ"€õr   