https://t.me/RX1948
Server : Apache
System : Linux iad1-shared-b8-43 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
User : dh_edsupp ( 6597262)
PHP Version : 8.2.26
Disable Function : NONE
Directory :  /lib/python3/dist-packages/pygments/lexers/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //lib/python3/dist-packages/pygments/lexers/__pycache__/mime.cpython-310.pyc
o

���ar�@srdZddlZddlmZmZddlmZddlmZm	Z	m
Z
mZmZm
Z
ddlmZmZdgZGdd�de�ZdS)	z�
    pygments.lexers.mime
    ~~~~~~~~~~~~~~~~~~~~

    Lexer for Multipurpose Internet Mail Extensions (MIME) data.

    :copyright: Copyright 2006-2021 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�
RegexLexer�include)�get_lexer_for_mimetype)�Text�Name�String�Operator�Comment�Other)�get_int_opt�
ClassNotFound�	MIMELexercs�eZdZdZdZdgZgd�Z�fdd�Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
ddhZdefde	fgdejfdejdfged�defdefdedfged�de
fgd�Z�ZS) r
a_
    Lexer for Multipurpose Internet Mail Extensions (MIME) data. This lexer is
    designed to process nested multipart data.

    It assumes that the given data contains both header and body (and is
    split at an empty line). If no valid header is found, then the entire data
    will be treated as body.

    Additional options accepted:

    `MIME-max-level`
        Max recursion level for nested MIME structure. Any negative number
        would treated as unlimited. (default: -1)

    `Content-Type`
        Treat the data as a specific content type. Useful when header is
        missing, or this lexer would try to parse from header. (default:
        `text/plain`)

    `Multipart-Boundary`
        Set the default multipart boundary delimiter. This option is only used
        when `Content-Type` is `multipart` and header is missing. This lexer
        would try to parse from header by default. (default: None)

    `Content-Transfer-Encoding`
        Treat the data as a specific encoding. Or this lexer would try to parse
        from header by default. (default: None)

    .. versionadded:: 2.5
    �MIME�mime)zmultipart/mixedzmultipart/relatedzmultipart/alternativecsJt�jdi|��|�d�|_|�d�|_|�dd�|_t|dd�|_dS)NzMultipart-Boundary�Content_Transfer_Encoding�Content_Typez
text/plainzMIME-max-level����)�super�__init__�get�boundary�content_transfer_encoding�content_typer�max_nested_level)�self�options��	__class__r�6/usr/lib/python3/dist-packages/pygments/lexers/mime.pyr;s
zMIMELexer.__init__ccs��|�d�}|��|jvrJ|�d�tj|dfV|�d�tj|�d�fV|�d�}|�d�}|�	|d|��f�D]
\}}}||||fVq:dS|��t
|��fVdS)N��:���root)�group�lower�attention_headers�startr�Tagr�
Whitespace�end�get_tokens_unprocessedr	)r�match�field�pos�body�i�t�vrrr�get_header_tokensBs�


�zMIMELexer.get_header_tokensccs��|��}|��}|ddkr |tjdfV|d}|dd�}|j�d�r)|js>|�|�D]
\}}}||||fVq.dSdt�	|j�}t�
|tj�}|�|�}	|	rx||	�
�}
|	�
�}}|t|d|	���fV||tj|	��fVn|}
d}|�||�D]4}	|
|}
|	��}||
|�}|�|�D]
\}}}|
|||fVq�||tj|	��fV||	�
�}
q�|
|}
|
t|�kr�|
t||
d�fVdSdS)Nr�
r �	multipartz^--%s(--)?\n)r(r%rr*r�
startswithr�get_bodypart_tokens�re�escape�compile�	MULTILINE�searchr+r�	Delimiter�finditer�len)rr-�pos_body_start�entire_bodyr1r2r3�bdry_pattern�bdry_matcher�m�pos_part_start�pos_iter_start�lpos_end�
lpos_start�partrrr�get_body_tokensQsB�
�zMIMELexer.get_body_tokenscCs�|��r|js
dt|fgS|j}|r|dvrdt|fgS|jdkr'dt|fgSzt|j�}Wnty=dt|fgYSwt|t|��rK|jd|_|�	|�S)Nr>�quoted-printable�7bit�8bitr )
�striprr
rrrr�
isinstance�typer,)r�text�cte�lexerrrrr8�s
�
zMIMELexer.get_bodypart_tokensccs��|�d�|_|�d�|�d�}|�d�tj|�d�d|�fV|�d�tj|�d�fV|�d�tj	dfV|�d�tj|�d�fVdS)Nr rr"�/r#)
r%rr(rr*r�Labelr+rr>)rr-�
prefix_lenrrr�store_content_type�s�"zMIMELexer.store_content_typeccs��|�d�t|�d�fV|�d�tj|�d�fV|�d�tj|�d�fV|�d�t|�d�fV|�d�t|�d�fV|�d���dkrf|�d��	�}|ddkra|d	dkra|dd	�}||_
dSdS)
Nr r"r#��rr�"r)r(rr%r*r�	Attributerrr&rOr)rr-rrrr�get_content_type_subtokens�s�
�z$MIMELexer.get_content_type_subtokensccs0�|�d���|_|�d�tj|�d�fVdS)Nr)r%r&rr(r�Constant)rr-rrr�store_content_transfer_encoding�s�z)MIMELexer.store_content_transfer_encoding�content-type�content-transfer-encodingz#^([\w-]+):( *)([\s\S]*?\n)(?![ \t])z	^$[\s\S]+z\n[ \t]z\n(?![ \t])z#pop�headerzP^\s*((multipart|application|audio|font|image|model|text|video|message)/([\w-]+))z>(;)((?:[ \t]|\n[ \t])*)([\w:-]+)(=)([\s\S]*?)(?=;|\n(?![ \t]))z;[ \t]*\n(?![ \t])z([\w-]+))r$rbr`ra)�__name__�
__module__�__qualname__�__doc__�name�aliases�	mimetypesrr4rKr8rXr]r_r'rr*r�tokens�
__classcell__rrrrr
s@1	
�
������)rfr9�pygments.lexerrr�pygments.lexersr�pygments.tokenrrrrr	r
�
pygments.utilrr�__all__r
rrrr�<module>s
 

https://t.me/RX1948 - 2025