HEX
Server: Apache/2.4.67 (Debian)
System: Linux vps-b2547eb4 6.1.0-41-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
User: root (0)
PHP: 8.2.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/rich/__pycache__/markdown.cpython-311.pyc
�

��c`W����ddlmZddlmZmZmZmZmZmZm	Z	ddl
mZddlm
Z
ddlmZddlmZddlmZdd	lmZmZmZmZdd
lmZddlmZddlmZdd
lm Z ddl!m"Z"ddl#m$Z$m%Z%ddl&m'Z'ddl(m)Z)m*Z*Gd�d��Z+Gd�de+��Z,Gd�de+��Z-Gd�de-��Z.Gd�de-��Z/Gd�de-��Z0Gd�de-��Z1Gd �d!e+��Z2Gd"�d#e+��Z3Gd$�d%e-��Z4Gd&�d'e-��Z5Gd(�d)e-��Z6Gd*�d+��Z7Gd,�d-e��Z8e9d.k�r-dd/l:Z:dd/l;Z;e:j<d0�1��Z=e=�>d2d3d4�5��e=�>d6d7d8d9d/d:�;��e=�>d<d=d>d?d@�A��e=�>dBdCdDd/dD�A��e=�>dEdFdGd9dH�I��e=�>dJdKe?dLd/dM�N��e=�>dOdPdQd9dR�I��e=�>dSdTdUd9dV�I��e=�@��ZAddWlBmZeAjCdXkre;jD�E��ZFn?eGeAjCdYdZ�[��5ZHeH�E��ZFd/d/d/��n#1swxYwYe8eFeAjIrd\nd]eAjJeAjKeAjL�^��ZMeAjNrhdd/lOZOdd/lPZPeOjQ��ZReeReAjSeAjT�_��Ze�UeM��ePjVeR�W����d/SeeAjSeAjTd`�a��Ze�UeM��d/Sd/S)b�)�annotations)�ClassVar�Dict�Iterable�List�Optional�Type�Union)�
MarkdownIt)�Token�)�box)�
loop_first)�Stack)�Console�ConsoleOptions�
JustifyMethod�RenderResult)�Renderables)�JupyterMixin)�Panel)�Rule)�Segment)�Style�
StyleStack)�Syntax)�Text�TextTypec�^�eZdZUdZded<edd
���Zdd�Zdd�Zdd�Z	d d�Z
d!d�ZdS)"�MarkdownElementTzClassVar[bool]�new_line�markdown�
'Markdown'�tokenr�return�'MarkdownElement'c��|��S)z�Factory to create markdown element,

        Args:
            markdown (Markdown): The parent Markdown object.
            token (Token): A node from markdown-it.

        Returns:
            MarkdownElement: A new markdown element
        ���clsr"r$s   �//usr/lib/python3/dist-packages/rich/markdown.py�createzMarkdownElement.creates���s�u�u���context�'MarkdownContext'�Nonec��dS)zuCalled when the node is entered.

        Args:
            context (MarkdownContext): The markdown context.
        Nr(��selfr.s  r+�on_enterzMarkdownElement.on_enter&����r-�textrc��dS)zpCalled when text is parsed.

        Args:
            context (MarkdownContext): The markdown context.
        Nr(�r3r.r6s   r+�on_textzMarkdownElement.on_text-r5r-c��dS)zwCalled when the parser leaves the element.

        Args:
            context (MarkdownContext): [description]
        Nr(r2s  r+�on_leavezMarkdownElement.on_leave4r5r-�child�boolc��dS)a|Called when a child element is closed.

        This method allows a parent element to take over rendering of its children.

        Args:
            context (MarkdownContext): The markdown context.
            child (MarkdownElement): The child markdown element.

        Returns:
            bool: Return True to render the element, or False to not render the element.
        Tr(�r3r.r<s   r+�on_child_closezMarkdownElement.on_child_close;s	���tr-�console�	'Console'�options�'ConsoleOptions'�'RenderResult'c��dS)Nr(r(�r3rArCs   r+�__rich_console__z MarkdownElement.__rich_console__Ks	���rr-N�r"r#r$rr%r&�r.r/r%r0�r.r/r6rr%r0�r.r/r<r&r%r=)rArBrCrDr%rE)�__name__�
__module__�__qualname__r!�__annotations__�classmethodr,r4r9r;r@rHr(r-r+r r s��������#�H�#�#�#�#��
�
�
��[�
����������������� �����r-r c��eZdZdZdS)�UnknownElementz�An unknown element.

    Hopefully there will be no unknown elements, and we will have a MarkdownElement for
    everything in the document.

    N)rMrNrO�__doc__r(r-r+rSrSQs���������r-rSc�.�eZdZdZdZd
d�Zdd
�Zd
d�ZdS)�TextElementz)Base class for elements that render text.�noner.r/r%r0c�n�|�|j��|_td���|_dS�N�left��justify)�enter_style�
style_name�stylerr6r2s  r+r4zTextElement.on_enter_s/���(�(���9�9��
���(�(�(��	�	�	r-r6rc�t�|j�|t|t��r|jnd��dS�N)r6�append�
isinstance�str�
current_styler8s   r+r9zTextElement.on_textcs8���	����
�4��8M�8M�W�w�4�4�SW�X�X�X�X�Xr-c�.�|���dSra)�leave_styler2s  r+r;zTextElement.on_leavefs���������r-NrJrK)rMrNrOrTr^r4r9r;r(r-r+rVrVZs_������3�3��J�)�)�)�)�Y�Y�Y�Y������r-rVc�J�eZdZUdZdZded<edd���Zdd
�Zdd�Z	dS)�	ParagraphzA Paragraph.zmarkdown.paragraphrr\r"r#r$rr%�'Paragraph'c�(�||jpd���SrYr[r)s   r+r,zParagraph.createps���s�8�+�5�v�6�6�6�6r-r0c��||_dSrar[)r3r\s  r+�__init__zParagraph.__init__ts
������r-rArrCrrc#�>K�|j|j_|jV�dSra)r\r6rGs   r+rHzParagraph.__rich_console__ws#����!�L��	���i�����r-N)r"r#r$rr%rj)r\rr%r0�rArrCrr%r)
rMrNrOrTr^rPrQr,rmrHr(r-r+ririjss���������%�J������7�7�7��[�7����������r-ric�L��eZdZdZedd���Zdd�Zd�fd�Zdd�Z�xZ	S)�Headingz
A heading.r"r#r$rr%�	'Heading'c�"�||j��Sra)�tagr)s   r+r,zHeading.create�s���s�5�9�~�~�r-r.r/r0c�`�t��|_|�|j��dSra)rr6r]r^r2s  r+r4zHeading.on_enter�s)���F�F��	����D�O�,�,�,�,�,r-rtrdc�j��||_d|��|_t�����dS)N�	markdown.)rtr^�superrm)r3rt�	__class__s  �r+rmzHeading.__init__�s5������+�c�+�+���
���������r-rArrCrrc#�K�|j}d|_|jdkr t|tjd���V�dS|jdkrt
d��V�|V�dS)N�center�h1zmarkdown.h1.border)rr_�h2�)r6r\rtrr�HEAVYr)r3rArCr6s    r+rHzHeading.__rich_console__�s������y������8�t������I�*����
�
�
�
�
��x�4����2�h�h�����J�J�J�J�Jr-)r"r#r$rr%rrrJ)rtrdr%r0ro)
rMrNrOrTrQr,r4rmrH�
__classcell__�rys@r+rqrq~s���������������[��-�-�-�-�������
�������r-rqc�>�eZdZdZdZedd	���Zdd�Zdd�ZdS)�	CodeBlockz&A code block with syntax highlighting.zmarkdown.code_blockr"r#r$rr%�'CodeBlock'c�p�|jpd}|�d��d}||pd|j��S)Nr~� r�default)�info�	partition�
code_theme)r*r"r$�	node_info�
lexer_names     r+r,zCodeBlock.create�s@���J�$�"�	��(�(��-�-�a�0�
��s�:�*��H�,?�@�@�@r-r�rd�themer0c�"�||_||_dSra)r�r�)r3r�r�s   r+rmzCodeBlock.__init__�s��$�����
�
�
r-rArrCrrc#�K�t|j�����}t||j|jdd���}|V�dS)NTr
)r��	word_wrap�padding)rdr6�rstriprr�r�)r3rArC�code�syntaxs     r+rHzCodeBlock.__rich_console__�sS�����4�9�~�~�$�$�&�&����$�/���t�Q�
�
�
�������r-N)r"r#r$rr%r�)r�rdr�rdr%r0ro)	rMrNrOrTr^rQr,rmrHr(r-r+r�r��si������0�0�&�J��A�A�A��[�A�
���������r-r�c�.�eZdZdZdZdd�Zdd�Zdd�ZdS)�
BlockQuotezA block quote.zmarkdown.block_quoter%r0c�,�t��|_dSra�r�elements�r3s r+rmzBlockQuote.__init__����%0�]�]��
�
�
r-r.r/r<r&r=c�:�|j�|��dS�NF�r�rbr?s   r+r@zBlockQuote.on_child_close����	
�
���U�#�#�#��ur-rArrCrrc#�K�|�|jdz
���}|�|j||j���}|j}td��}td|��}|D]}|V�|Ed{V��|V��dS)N���width�r_�
u▌ )�update�	max_width�render_linesr�r_r)	r3rArC�render_options�linesr_r!r��lines	         r+rHzBlockQuote.__rich_console__�s�����!���g�.?�!�.C��D�D���$�$�T�]�N�$�*�$�U�U���
���4�=�=���&�%�(�(���	�	�D��M�M�M��O�O�O�O�O�O�O��N�N�N�N�	�	r-N�r%r0rLro)rMrNrOrTr^rmr@rHr(r-r+r�r��s[��������'�J�3�3�3�3����������r-r�c��eZdZdZdZdd	�Zd
S)�HorizontalRulez%A horizontal rule to divide sections.FrArrCrr%rc#�\K�|�dd���}t|���V�dS)Nzmarkdown.hrrW�r�r�)�	get_styler)r3rArCr_s    r+rHzHorizontalRule.__rich_console__�s=�����!�!�-��!�@�@�����������r-Nro)rMrNrOrTr!rHr(r-r+r�r��s3������/�/��H� � � � � � r-r�c�B�eZdZdZedd���Zdd�Zdd�Zdd�ZdS) �ListElementzA list element.r"r#r$rr%�
'ListElement'c	�p�||jt|j�dd������S)N�startr
)�type�int�attrs�getr)s   r+r,zListElement.create�s.���s�5�:�s�5�;�?�?�7�A�#>�#>�?�?�@�@�@r-�	list_typerd�
list_start�
int | Noner0c�0�g|_||_||_dSra)�itemsr�r�)r3r�r�s   r+rmzListElement.__init__�s��%'��
�"���$����r-r.r/r<r&r=c�h�t|t��sJ�|j�|��dSr�)rc�ListItemr�rbr?s   r+r@zListElement.on_child_close�s5���%��*�*�*�*�*��
���%� � � ��ur-rArrCrrc#�4K�|jdkr(|jD]}|�||��Ed{V���dS|j�dn|j}|t	|j��z}t|j��D]&\}}|�||||z|��Ed{V���'dS)N�bullet_list_openr
)r�r��
render_bulletr��len�	enumerate�
render_number)r3rArC�item�number�last_number�indexs       r+rHzListElement.__rich_console__�s������>�/�/�/��
�
@�
@���-�-�g�w�?�?�?�?�?�?�?�?�?�?�
@�
@��/�1�Q�Q�t��F� �3�t�z�?�?�2�K�(���4�4�
�
���t��-�-��W�f�u�n�k�����������
�
r-N)r"r#r$rr%r�)r�rdr�r�r%r0rLro)	rMrNrOrTrQr,rmr@rHr(r-r+r�r��sx���������A�A�A��[�A�%�%�%�%�
���������r-r�c�6�eZdZdZdZdd�Zdd�Zdd�Zdd�ZdS)r�zAn item in a list.z
markdown.itemr%r0c�,�t��|_dSrar�r�s r+rmzListItem.__init__	r�r-r.r/r<r&r=c�:�|j�|��dSr�r�r?s   r+r@zListItem.on_child_closer�r-rArrCrrc#�hK�|�|jdz
���}|�|j||j���}|�dd���}t
d|��}t
d|��}t
d	��}t|��D]\}	}
|	r|n|V�|
Ed{V��|V��dS)
N�r�r�zmarkdown.item.bulletrWr�u • z   r�)r�r�r�r�r_r�rr)r3rArCr�r��bullet_style�bulletr�r!�firstr�s           r+r�zListItem.render_bullets����� ���g�.?�!�.C��D�D���$�$�T�]�N�$�*�$�U�U���(�(�)?��(�P�P����,�/�/���'�<�0�0���4�=�=��%�e�,�,�	�	�K�E�4�!�.�&�&�w�.�.�.��O�O�O�O�O�O�O��N�N�N�N�	�	r-r�r�r�c#��K�tt|����dz}|�|j|z
���}|�|j||j���}|�dd���}td��}	td|z|��}
t|��	|d	z
��dz|��}t|��D]\}}
|r|n|
V�|
Ed{V��|	V��dS)
N�r�r�zmarkdown.item.numberrWr�r�r�r
)r�rdr�r�r�r�r_r�r�rjustr)r3rArCr�r��number_widthr�r��number_styler!r��numeralr�r�s              r+r�zListItem.render_numbers�����3�{�+�+�,�,�q�0�� ���g�.?�,�.N��O�O���$�$�T�]�N�$�*�$�U�U���(�(�)?��(�P�P���4�=�=���#��,�l�;�;���V�+�+�+�L�1�,<�=�=��C�\�R�R��%�e�,�,�	�	�K�E�4�"�/�'�'��/�/�/��O�O�O�O�O�O�O��N�N�N�N�	�	r-Nr�rLro)
rArrCrr�r�r�r�r%r)	rMrNrOrTr^rmr@r�r�r(r-r+r�r�so�������� �J�3�3�3�3��������������r-r�c�.�eZdZed
d���Zdd�ZdS)�Linkr"r#r$rr%r&c�t�|j�dd��}||jt|����S)N�href�#)r�r��contentrd)r*r"r$�urls    r+r,zLink.create1s1���k�o�o�f�c�*�*���s�5�=�#�c�(�(�+�+�+r-r6rdr�c�<�t|��|_||_dSra)rr6r�)r3r6r�s   r+rmz
Link.__init__6s����J�J��	���	�	�	r-NrI)r6rdr�rd)rMrNrOrQr,rmr(r-r+r�r�0sF�������,�,�,��[�,������r-r�c�T��eZdZdZdZedd	���Zd�fd�Zd�fd�Zdd�Z	�xZ
S)�	ImageItemz#Renders a placeholder for an image.Fr"r#r$rr%r&c�p�|t|j�dd����|j��S)z�Factory to create markdown element,

        Args:
            markdown (Markdown): The parent Markdown object.
            token (Any): A token from markdown-it.

        Returns:
            MarkdownElement: A new markdown element
        �srcr~)rdr�r��
hyperlinksr)s   r+r,zImageItem.create@s1���s�3�u�{���u�b�1�1�2�2�H�4G�H�H�Hr-�destinationrdr�r=r0c�r��||_||_d|_t�����dSra)r�r��linkrxrm)r3r�r�rys   �r+rmzImageItem.__init__Ms5���&���$���#'��	�
���������r-r.r/c���|jj|_td���|_t	���|��dSrY)rer�rr6rxr4)r3r.rys  �r+r4zImageItem.on_enterSs@����)�.��	���(�(�(��	�
������!�!�!�!�!r-rArrCrrc#�FK�t|jp|jpd���}|jp@t	|j�d���dd��d��}|jr|�|��t	j	d|dd���}|V�dS)	N�r��/r
���u🌆 r�r~)�end)
rr�r�r6r�strip�rsplitr��stylize�assemble)r3rArC�
link_style�titler6s      r+rHzImageItem.__rich_console__Xs�������	� E�T�-=� E��F�F�F�
��	�Q�T�$�"2�"8�"8��"=�"=�"D�"D�S�!�"L�"L�R�"P�Q�Q���?�	&��M�M�*�%�%�%��}�W�e�S�b�9�9�9���
�
�
�
�
r-rI)r�rdr�r=r%r0rJro)rMrNrOrTr!rQr,rmr4rHr�r�s@r+r�r�;s��������-�-��H��
I�
I�
I��[�
I�������"�"�"�"�"�"�
�������r-r�c�P�eZdZdZ		ddd�Zedd���Zdd�Zdd�Zdd�Z	dS)�MarkdownContextz!Manages the console render state.N�monokairArrCrr_r�inline_code_lexer�
Optional[str]�inline_code_themerdr%r0c��||_||_t|��|_t	��|_d|_|�td||���|_dSdS)Nr~)r�)rArCr�style_stackr�stack�_syntaxr)r3rArCr_r�r�s      r+rmzMarkdownContext.__init__fs^��������'1�%�'8�'8���-2�W�W��
�)-����(�!�"�&7�?P�Q�Q�Q�D�L�L�L�)�(r-c��|jjS)z>Current style which is the product of all styles on the stack.)r��currentr�s r+rezMarkdownContext.current_stylews����'�'r-r6�	node_typec�8�|dvru|j�n|j�|��}|���|jj�|t
j||jj	�����dS|jj�||��dS)z#Called when the parser visits text.>�fence�code_inlineNr�)
r��	highlightr�r��topr9rr�r�r)r3r6r�highlight_texts    r+r9zMarkdownContext.on_text|s����0�0�0�T�\�5M�!�\�3�3�D�9�9�N��!�!�#�#�#��J�N�"�"��d�m�N�$�:J�:R�S�S�S�
�
�
�
�
�
�J�N�"�"�4��.�.�.�.�.r-r^�Union[str, Style]c�|�|j�|d���}|j�|��|jS)zEnter a style context.rWr�)rAr�r��pushre)r3r^r_s   r+r]zMarkdownContext.enter_style�s<����&�&�z�6�&�B�B������e�$�$�$��!�!r-c�8�|j���}|S)zLeave a style context.)r��pop)r3r_s  r+rgzMarkdownContext.leave_style�s��� �$�$�&�&���r-)Nr�)rArrCrr_rr�r�r�rdr%r0)r%r)r6rdrrdr%r0)r^r	r%r)
rMrNrOrTrm�propertyrer9r]rgr(r-r+r�r�cs�������+�+�,0�!*�
R�R�R�R�R�"�(�(�(��X�(�	/�	/�	/�	/�"�"�"�"������r-r�c�f�eZdZUdZeeeeeee	e	e
ed�
Zde
d<hd�Z						d"d#d�Zd$d�Zd%d!�ZdS)&�Markdowna�A Markdown renderable.

    Args:
        markup (str): A string containing markdown.
        code_theme (str, optional): Pygments theme for code blocks. Defaults to "monokai".
        justify (JustifyMethod, optional): Justify value for paragraphs. Defaults to None.
        style (Union[str, Style], optional): Optional style to apply to markdown.
        hyperlinks (bool, optional): Enable hyperlinks. Defaults to ``True``.
        inline_code_lexer: (str, optional): Lexer to use if inline code highlighting is
            enabled. Defaults to None.
        inline_code_theme: (Optional[str], optional): Pygments theme for inline code
            highlighting, or None for no highlighting. Defaults to None.
    )
�paragraph_open�heading_openr�
code_block�blockquote_open�hrr��ordered_list_open�list_item_open�imagez*ClassVar[Dict[str, Type[MarkdownElement]]]r�>�s�emr��strongr�NrWT�markuprdr�r\�Optional[JustifyMethod]r_r	r�r=r�r�r�r%r0c���t���d��}||_|�|��|_||_||_||_||_||_	|p||_
dS)N�
strikethrough)r�enabler�parse�parsedr�r\r_r�r�r�)	r3rr�r\r_r�r�r��parsers	         r+rmzMarkdown.__init__�sl�����$�$�_�5�5������l�l�6�*�*���$���07�����
�$���!2���!2�!@�j����r-�tokens�Iterable[Token]c#�K�|D]H}|jdk}|jdk}|jr%|s#|s!|�|j��Ed{V���D|V��IdS)zFlattens the token stream.r�imgN)r�rt�children�_flatten_tokens)r3r$r$�is_fence�is_images     r+r)zMarkdown._flatten_tokens�s������	�	�E��z�W�,�H��y�E�)�H��~�
�x�
�8�
��/�/���?�?�?�?�?�?�?�?�?�?������
	�	r-rArrCrrc#�\
K�|�|jd���}|�d���}t||||j|j���}|j}|j}d}tj	��}|�
|��D�]�}	|	j}
|	j}|	j
dk}|	j
dk}
|	j
d	k}|
d
kr|�|	j|
���T|
dkr|�d|
���q|
d
kr|�d|
����|
dkr�t!|	j�dd����}|jrA|�dd���}|t)|���z
}|�|����|j�t0�||	������9|
dk�r6|jr|�����]|j���}t9|t0��sJ�|�dd���}|�|��|�|jj|
��|���|�d|
��|�dd���}|�|��|�|j|
��|���|�d|
����v||vr�|
dkr�|
dkr�|r|�d|�������|
r|������|�d|����|	jr|�|	j|
��|�����
|j �|	j��ptB}|�||	��}|s|r/|j�|��|�"|��|
rr|j���}|jp&|jo|jj#�$||��}|r'|r|V�|�%||j&��Ed{V��n�|r�|j���|	j}|�|�||��|jp&|jo|jj#�$||��}|r'|r|V�|�%||j&��Ed{V��|
s|r|�'|��|j(}���dS)zRender markdown to the console.rWr�N)�height)r�r�Fr
r�rr6�	hardbreakr��	softbreakr��	link_openr�r~zmarkdown.link_urlr��
link_closez
markdown.linkz (�)rrrw))r�r_r�r�r�r�r"�inlinesrr�r)r�rt�nestingr9r�rdr�r�r�rr]r�rr�r,rgr
rcr6�plainr�r�rSr4rr@�renderrCr;r!)r3rArCr_r.r$�inline_style_tagsr!�_new_line_segmentr$rrt�entering�exiting�self_closingr�r��element�link_url_style�
element_class�
should_renderr6s                      r+rHzMarkdown.__rich_console__�s������!�!�$�*�f�!�=�=���.�.��.�-�-��!����"�4�"�4�
�
�
����� �L����#�L�N�N���)�)�&�1�1�b	0�b	0�E��
�I��)�C��}��)�H��m�r�)�G� �=�A�-�L��F�"�"�����
�y�9�9�9�9��k�)�)�����i�0�0�0�0��k�)�)�����Y�/�/�/�/��k�)�)��5�;�?�?�6�2�6�6�7�7���?�A�!(�!2�!2�3F�PV�!2�!W�!W�J��%�T�"2�"2�"2�2�J��'�'�
�3�3�3�3��M�&�&�t�{�{�4��'?�'?�@�@�@�@��l�*�*��?�4��'�'�)�)�)�)�%�m�/�/�1�1�G�%�g�t�4�4�4�4�4�!(�!2�!2�?�F�!2�!S�!S�J��'�'�
�3�3�3��O�O�G�L�$6�	�B�B�B��'�'�)�)�)��O�O�D�)�4�4�4�%,�%6�%6�+�V�&7�&�&�N��'�'��7�7�7��O�O�G�L�)�<�<�<��'�'�)�)�)��O�O�C��3�3�3�3��(�(�(���(�(���-�-��
*��'�'�(9�C�(9�(9�:�:�:�:��	*��'�'�)�)�)�)��'�'�(9�C�(9�(9�:�:�:��}�B�����
�y�A�A�A��'�'�)�)�)�)�!%�
� 1� 1�%�*� =� =� O��
�'�.�.�t�U�;�;���.�|�.��M�&�&�w�/�/�/��$�$�W�-�-�-��L�%�m�/�/�1�1�G�(/�
�$5�%��
�O�#�M�-�<�<�W�g�N�N�"�
%�L�#�4�"3�3�3�3�#*�>�>�'�7�?�#K�#K�K�K�K�K�K�K�K��!�L��M�%�%�'�'�'� �=�D��'������6�6�6�$�M�)�O�"�=�O�#�M�-�<�<�W�g�N�N�"�
%�L�#�4�"3�3�3�3�#*�>�>�'�7�?�#K�#K�K�K�K�K�K�K�K��0�l�0��$�$�W�-�-�-�&�/�H��Eb	0�b	0r-)r�NrWTNN)rrdr�rdr\rr_r	r�r=r�r�r�r�r%r0)r$r%r%r%ro)rMrNrOrTrirqr�r�r�r�r�r�r�rPr3rmr)rHr(r-r+rr�s����������$����%��'�(�"��<�<�H�����,�+�+�G�
$�+/�#)��+/�+/�A�A�A�A�A�(����t0�t0�t0�t0�t0�t0r-r�__main__Nz(Render Markdown to the console with Rich)�description�path�PATHz%path to markdown file, or - for stdin)�metavar�helpz-cz
--force-color�force_color�
store_truezforce color for non-terminals)�dest�actionr�rEz-tz--code-themer�r�zpygments code theme)rHr�rEz-iz--inline-code-lexerr�z-yz--hyperlinksr�zenable hyperlinks)rHrIrEz-wz--widthr�z*width of output (default will auto-detect))r�rHr�rEz-jz	--justifyr\zenable full text justifyz-pz--page�pagezuse pager to scroll output)r�-�rtzutf-8)�encoding�fullrZ)r\r�r�r�)�file�force_terminalr�T)rPr��record)X�
__future__r�typingrrrrrr	r
�markdown_itr�markdown_it.tokenrr~r�_loopr�_stackrrArrrr�
containersr�jupyterr�panelr�ruler�segmentrr_rrr�rr6rrr rSrVrirqr�r�r�r�r�r�r�r�rrM�argparse�sys�ArgumentParserr#�add_argumentr��
parse_args�args�rich.consolerB�stdin�read�
markdown_body�open�
markdown_filer\r�r�r�r"rJ�io�pydoc�StringIO�fileiorFr��print�pager�getvaluer(r-r+�<module>rps+��"�"�"�"�"�"�H�H�H�H�H�H�H�H�H�H�H�H�H�H�H�H�H�H�"�"�"�"�"�"�#�#�#�#�#�#�������������������I�I�I�I�I�I�I�I�I�I�I�I�#�#�#�#�#�#�!�!�!�!�!�!�������������������$�$�$�$�$�$�$�$������� � � � � � � � �8�8�8�8�8�8�8�8�v�����_����
�
�
�
�
�/�
�
�
� ���������( � � � � �k� � � �F���������2���������8	 �	 �	 �	 �	 �_�	 �	 �	 ������/����D)�)�)�)�)�{�)�)�)�X�����;����%�%�%�%�%��%�%�%�P-�-�-�-�-�-�-�-�`p0�p0�p0�p0�p0�|�p0�p0�p0�f�z����O�O�O��J�J�J�
$�X�
$�>����F������
4�����
�����
���
,�
���������
��
"����������
 ��
 ����������
��
 ����������
�
��
9�
���������
��
'����������
��
)����������D�$�$�$�$�$�$��y�C����	���(�(�
�
�
�T�$�)�T�G�
4�
4�
4�	1�
�)�.�.�0�0�M�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1�	1����	1�	1�	1�	1��x���,�2���F��?��?��0����H��y� ��	�	�	������������'���(8��
�
�
�
��	�
�
�h�������F�O�O�%�%�&�&�&�&�&��'��+�4�:�d�
�
�
��	�
�
�h�������s�;J�J �#J