403Webshell
Server IP : 209.209.40.120  /  Your IP : 216.73.217.112
Web Server : Microsoft-IIS/10.0
System : Windows NT NEWWWW 10.0 build 17763 (Windows Server 2019) i586
User : NEWWWW$ ( 0)
PHP Version : 8.3.30
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Python312/Lib/site-packages/pip/_vendor/pygments/formatters/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/Python312/Lib/site-packages/pip/_vendor/pygments/formatters/__pycache__/rtf.cpython-312.pyc
�

�k�f�.��`�dZddlmZddlmZddlmZddlmZm	Z	m
Z
mZdgZGd�de�Z
y)	z�
    pygments.formatters.rtf
    ~~~~~~~~~~~~~~~~~~~~~~~

    A formatter that generates RTF files.

    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�OrderedDict)�	Formatter)�_ansimap)�get_bool_opt�get_int_opt�get_list_opt�
surrogatepair�RtfFormatterc��eZdZdZdZdgZdgZd�Zd�Zd�Z	e
d��Zd	�Zd
�Z
ed��Zed��Zed
��Zd�Zy)r
a�	
    Format tokens as RTF markup. This formatter automatically outputs full RTF
    documents with color information and other useful stuff. Perfect for Copy and
    Paste into Microsoft(R) Word(R) documents.

    Please note that ``encoding`` and ``outencoding`` options are ignored.
    The RTF format is ASCII natively, but handles unicode characters correctly
    thanks to escape sequences.

    .. versionadded:: 0.6

    Additional options accepted:

    `style`
        The style to use, can be a string or a Style subclass (default:
        ``'default'``).

    `fontface`
        The used font family, for example ``Bitstream Vera Sans``. Defaults to
        some generic font which is supposed to have fixed width.

    `fontsize`
        Size of the font used. Size is specified in half points. The
        default is 24 half-points, giving a size 12 font.

        .. versionadded:: 2.0

    `linenos`
        Turn on line numbering (default: ``False``).

        .. versionadded:: 2.18

    `lineno_fontsize`
        Font size for line numbers. Size is specified in half points
        (default: `fontsize`). 

        .. versionadded:: 2.18

    `lineno_padding`
        Number of spaces between the (inline) line numbers and the
        source code (default: ``2``).

        .. versionadded:: 2.18

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

        .. versionadded:: 2.18

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

        .. versionadded:: 2.18

    `lineno_color`
        Color for line numbers specified as a hex triplet, e.g. ``'5e5e5e'``. 
        Defaults to the style's line number color if it is a hex triplet, 
        otherwise ansi bright black.

        .. versionadded:: 2.18

    `hl_lines`
        Specify a list of lines to be highlighted, as line numbers separated by
        spaces, e.g. ``'3 7 8'``. The line numbers are relative to the input 
        (i.e. the first line is line 1) unless `hl_linenostart` is set.

        .. versionadded:: 2.18

    `hl_color`
        Color for highlighting the lines specified in `hl_lines`, specified as 
        a hex triplet (default: style's `highlight_color`).

        .. versionadded:: 2.18

    `hl_linenostart`
        If set to ``True`` line numbers in `hl_lines` are specified
        relative to `linenostart` (default ``False``).

        .. versionadded:: 2.18
    �RTF�rtfz*.rtfc���tj|fi|��|jd�xsd|_t	|dd�|_t
|dd�|_t	|d|j
�|_t	|dd	�|_	tt	|d
d��|_tt	|dd��|_t
|d
d�|_
|jdd�|_|js|jj |_g|_t%|dg�D]G}	t'|�}|jr||jz
dz}|j"j)|��I|jdd�|_|j,sC|jj.dk(rt0d|_n|jj.|_|j3�|_y#t*$rY��wxYw)a�
        Additional options accepted:

        ``fontface``
            Name of the font used. Could for example be ``'Courier New'``
            to further specify the default which is ``'\fmodern'``. The RTF
            specification claims that ``\fmodern`` are "Fixed-pitch serif
            and sans serif fonts". Hope every RTF implementation thinks
            the same about modern...

        �fontface��fontsizer�linenosF�lineno_fontsize�lineno_padding��linenostart��
linenostep�hl_linenostart�hl_color�hl_lines�lineno_color�inherit�ansibrightblackN)r�__init__�getrrrrrrr�absrrrr�style�highlight_colorrr�int�append�
ValueErrorr�line_number_colorr�_create_color_mapping�
color_mapping)�self�options�linenos   �EC:\Python312\Lib\site-packages\pip/_vendor/pygments/formatters/rtf.pyrzRtfFormatter.__init__is���	���4�+�7�+����J�/�5�2��
�#�G�Z��;��
�#�G�Y��>���*�7�4E�+/�=�=� :���)�'�3C�Q�G����{�7�M�1�E�F����k�'�<��C�D���*�7�4D�e�L������J��3��
��}�}� �J�J�6�6�D�M���
�"�7�J��;�	�F�
��V����&�&�#�d�&6�&6�6��:�F��
�
�$�$�V�,�	�$�K�K���;���� � ��
�
�,�,�	�9�%-�->�$?��!�%)�J�J�$@�$@��!�!�7�7�9�����
��
�s�!AG#�#	G/�.G/c�f�|jdd�jdd�jdd�S)N�\z\\�{z\{�}z\})�replace)r*�texts  r-�_escapezRtfFormatter._escape�s-���|�|�D�&�)��G�C��'��G�C��'�	(�c�`�|sy|j|�}g}|D]s}t|�}|dkr|jt|���.d|cxkrdkrnn|jd|z��Qd|ks�W|jdt	|�z��udj|�j
dd�S)Nr�iz{\u%d}z{\u%d}{\u%d}�
z\par)r4�ordr%�strr	�joinr2)r*r3�buf�c�cns     r-�_escape_textzRtfFormatter._escape_text�s������|�|�D�!�����	A�A��Q��B��T�{��
�
�3�q�6�"��2�'��'��
�
�9�r�>�*��B���
�
�+�m�B�.?�?�@�	A��w�w�s�|�#�#�D�'�2�2r5c�z�|ddk(r|dd}dt|ddd�t|ddd�t|ddd�fzS)	Nr�#rz\red%d\green%d\blue%d;r���)r$)�	hex_colors r-�hex_to_rtf_colorzRtfFormatter.hex_to_rtf_color�s[���Q�<�3��!�!�"�
�I�*��I�a��N�B�/��I�a��N�B�/��I�a��N�B�/�.��	r5c#�K�|D]O\}}|dk(r||f���d|vr4|jd�}|ddD]}||dzf���
|ds�@||df���J||f���Qy�w)z�
        Split tokens containing newline characters into multiple token
        each representing a line of the input file. Needed for numbering
        lines of e.g. multiline comments.
        r8N���)�split)r*�tokensource�ttype�value�lines�lines      r-�_split_tokens_on_newlinesz&RtfFormatter._split_tokens_on_newlines�s�����(�
	%�L�E�5���}��e�n�$�������D�)��!�#�2�J�-�D� �$�t�)�,�,�-���9� �%��)�,�,��e�n�$�
	%�s�AA�Ac��t�}d}|jr|||j<|dz
}|jr|||j<|dz
}|j
D]*\}}|d|d|dfD]}|s�||vs�|||<|dz
}��,|S)zf
        Create a mapping of style hex colors to index/offset in
        the RTF color table.
        r�color�bgcolor�border)rrrrrr")r*r)�offset�_r"rQs      r-r(z"RtfFormatter._create_color_mapping�s���
$�
�
����<�<�/5�M�$�+�+�,��a�K�F��=�=�+1�M�$�-�-�(��a�K�F��
�
�	 �H�A�u��w���y�)9�5��?�J�
 ���U�-�7�+1�M�%�(��a�K�F�
 �	 ��r5c�"�|j|jk7rAdj|j|j|jd|j
z�Sdj|j|jd|j
z�S)Nz{{\fs{} \cf{} %s{}}}� z{{\cf{} %s{}}})rr�formatr)rr�r*s r-�_lineno_templatezRtfFormatter._lineno_template�s������4�=�=�0�+�2�2�4�3G�3G��,�,�T�->�->�?��� 3� 3�3�5�
5�!�'�'��(:�(:�4�;L�;L�(M��D�/�/�/�1�	1r5c�<�d|j|j�d�S)Nz{\highlightrW)r)rrYs r-�_hl_open_strzRtfFormatter._hl_open_str�s!���t�1�1�$�-�-�@�A��C�Cr5c���g}|jd|jxrd|j|j�zxsdz�|jd�|jj	�D]%\}}|j|j|���'|jd�|jd�|jr|jd|jz�|jd�|S)	Nz?{\rtf1\ansi\uc0\deff0{\fonttbl{\f0\fmodern\fprq1\fcharset0%s;}}rWrz{\colortbl;r1z\f0\sa0z\fs%dz\dntblnsbdb)r%rr4r)�itemsrFr)r*rMrQrUs    r-�_rtf_headerzRtfFormatter._rtf_header�s�����
���G��
�
�6�#��,�,�t�}�}�5�+6�<�9;�=�	>�	���^�$��*�*�0�0�2�	7�H�E�1��L�L��.�.�u�5�6�	7�
���S��	���[�!��=�=��L�L��D�M�M�1�2�
	���^�$��r5c��|jD]}|j|dz��|j|�}|jr^d}g}|D]/\}}|j	||f�|jd�s�+|dz
}�1t
t||jzdz
��}|}d}	d}
|D�]�\}}|
r)|	|jvr|j|j�|
r�|jr~|	|jz
dz|jzdk(r-|	|jzdz
}t|�j�}ndj�}|j|j|z�|jj|�s@|j r4|j }|jj|�s
|j r�4|jj#|�}
g}|
dr$|j	d|j$|
dz�|
dr$|j	d	|j$|
dz�|
d
r|j	d�|
dr|j	d
�|
dr|j	d�|
dr$|j	d|j$|
dz�dj'|�}|r|jd|�d��|j|j)|��|r|jd�d}
|jd�s��c|	|jvr|jd�|jd�d}
|	dz
}	���|jd�y)Nr8rrTrrRz\cb%drQz\cf%d�boldz\b�italicz\i�	underlinez\ulrSz\chbrdr\chcfpat%dr0rWr1Fz}
)r_�writerOrr%�endswith�lenr:rrr\r�rjustrZr"�styles_token�parent�style_for_tokenr)r;r?)r*rJ�outfilerN�
line_count�tokensrKrL�
linenos_widthr,�start_new_line�current_lineno�
lineno_strr"r<�starts                r-�format_unencodedzRtfFormatter.format_unencodeds
���$�$�	'�D��M�M�$��+�&�	'��4�4�[�A���<�<��J��F� +�
$���u��
�
�u�e�n�-��>�>�$�'��!�O�J�
$� ��J�t�/?�/?�$?��$A� B�C�M� �K�����'�.	�L�E�5��&�D�M�M�"9��
�
�d�/�/�0��$�,�,��4�+�+�+�A�-�t���>�!�C�%+�d�.>�.>�%>��%B�N�!$�^�!4�!:�!:�=�!I�J�!#���-�!8�J��
�
�d�3�3�j�@�A��j�j�-�-�e�4���������j�j�-�-�e�4�����J�J�.�.�u�5�E��C��Y���
�
�8�d�&8�&8��y�9I�&J�J�K��W�~��
�
�8�d�&8�&8��w��&H�H�I��V�}��
�
�5�!��X���
�
�5�!��[�!��
�
�6�"��X���
�
�0��-�-�e�H�o�>�?�@��G�G�C�L�E���
�
��5�'��m�,��M�M�$�+�+�E�2�3���
�
�c�"�"�N��~�~�d�#��T�]�]�*��M�M�#�&��
�
�d�#�!%���!���].	�`	�
�
�e�r5N)�__name__�
__module__�__qualname__�__doc__�name�aliases�	filenamesrr4r?�staticmethodrFrOr(�propertyrZr\r_rs�r5r-r
r
s���O�`�D��g�G��	�I�0:�d(�
3�0����%�$�0�1��1��D��D�����4Gr5N)rw�collectionsr�pip._vendor.pygments.formatterr�pip._vendor.pygments.styler�pip._vendor.pygments.utilrrrr	�__all__r
r}r5r-�<module>r�s3���$�4�/�\�\��
��I�9�Ir5

Youez - 2016 - github.com/yon3zu
LinuXploit