HEX
Server: LiteSpeed
System: Linux us-phx-web1284.main-hosting.eu 4.18.0-553.109.1.lve.el8.x86_64 #1 SMP Thu Mar 5 20:23:46 UTC 2026 x86_64
User: u300739242 (300739242)
PHP: 8.2.30
Disabled: system, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail
Upload Files
File: //opt/alt/python311/lib/python3.11/site-packages/pygments/lexers/__pycache__/mime.cpython-311.pyc
�

�;f����dZddlZddlmZmZddlmZddlmZm	Z	m
Z
mZmZm
Z
ddlmZmZdgZGd�de��ZdS)	z�
    pygments.lexers.mime
    ~~~~~~~~~~~~~~~~~~~~

    Lexer for Multipurpose Internet Mail Extensions (MIME) data.

    :copyright: Copyright 2006-2024 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�	MIMELexerc����eZdZdZdZdgZgd�ZdZdZ�fd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�ZddhZde
fdefgdejfdejdfged��de
fdefdedfged��defgd�Z�xZS)raD
    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)
    �MIME�mime)zmultipart/mixedzmultipart/relatedzmultipart/alternativez"https://en.wikipedia.org/wiki/MIMEz2.5c���t��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__s  ��G/opt/alt/python311/lib/python3.11/site-packages/pygments/lexers/mime.pyrzMIMELexer.__init__;sz��������#�#�7�#�#�#����$8�9�9��
�)0���5P�)Q�)Q��&�#�K�K���E�E��� +�G�5E�r� J� J�����c#�TK�|�d��}|���|jvr�|�d��tj|dzfV�|�d��tj|�d��fV�|�d��}|�d��}|�	|d|���f��D]\}}}||z||fV��dS|���t|���fV�dS)N��:���root)�group�lower�attention_headers�startr�Tagr�
Whitespace�end�get_tokens_unprocessedr
)r�match�field�pos�body�i�t�vs        r!�get_header_tokenszMIMELexer.get_header_tokensBs�������A�����;�;�=�=�D�2�2�2��+�+�a�.�.�$�(�E�C�K�7�7�7�7��+�+�a�.�.�$�/�5�;�;�q�>�>�A�A�A�A��)�)�A�,�,�C��;�;�q�>�>�D��6�6�t�f�e�k�k�m�m�=T�U�U�
$�
$���1�a��A�g�q�!�m�#�#�#�#�
$�
$��+�+�-�-��%�+�+�-�-�7�7�7�7�7�7r"c#�K�|���}|���}|ddkr |tjdfV�|dz}|dd�}|j�d��r|js(|�|��D]\}}}||z||fV��dSdtj	|j���d�}tj
|tj��}|�|��}	|	rz||	�
��z}
|	�
��x}}|t|d|	����fV�||ztj|	���fV�n|}
d}|�||��D]�}	|
|z
}
|	���}||
|�}|�|��D]\}}}|
|z||fV��||ztj|	���fV�||	�
��z}
��|
|z
}
|
t#|��kr|
t||
d�fV�dSdS)Nr�
r$�	multipartz^--z(--)?\n)r,r)rr.r�
startswithr�get_bodypart_tokens�re�escape�compile�	MULTILINE�searchr/r�	Delimiter�finditer�len)rr1�pos_body_start�entire_bodyr5r6r7�bdry_pattern�bdry_matcher�m�pos_part_start�pos_iter_start�lpos_end�
lpos_start�parts               r!�get_body_tokenszMIMELexer.get_body_tokensQs������������k�k�m�m���q�>�T�!�!� �$�/�4�7�7�7�7�+�a�/�N�%�a�b�b�/�K�� �+�+�K�8�8�	��
�	��3�3�K�@�@�
/�
/���1�a�$�q�(�!�Q�.�.�.�.�.��F�@�b�i��
�6�6�?�?�?���z�,���=�=��
����,�,���	�+�a�e�e�g�g�5�N�()�����/�N�X� �$��J�Q�W�W�Y�Y�J�(?�?�?�?�?� �8�+�V�-=�q�w�w�y�y�H�H�H�H�H�+�N��N��&�&�{�N�C�C�
	6�
	6�A�'�.�8�J��w�w�y�y�H��z�(�2�3�D��3�3�D�9�9�
/�
/���1�a�$�q�(�!�Q�.�.�.�.�.�!�8�+�V�-=�q�w�w�y�y�H�H�H�H�+�a�e�e�g�g�5�N�N�$�n�4�
���[�)�)�)�)� �$��J�K�K�(@�@�@�@�@�@�@�*�)r"c��|���r|jsdt|fgS|j}|r|dvrdt|fgS|jdkrdt|fgS	t|j��}n#t$rdt|fgcYSwxYwt|t|����r|jdz
|_|�	|��S)Nr>�quoted-printable�7bit�8bitr$)
�striprrrrrr
�
isinstance�typer0)r�text�cte�lexers    r!r=zMIMELexer.get_bodypart_tokens�s����z�z�|�|�	&�4�#4�	&���t�$�%�%��,���	&�3�B�B�B���t�$�%�%�� �A�%�%���t�$�%�%�	&�*�4�+<�=�=�E�E���	&�	&�	&���t�$�%�%�%�%�	&�����e�T�$�Z�Z�(�(�	?�%)�%:�Q�%>�E�"��+�+�D�1�1�1s�A+�+B�Bc#�6K�|�d��|_|�d��|�d��z
}|�d��tj|�d��d|�fV�|�d��t
j|�d��fV�|�d��tj	dfV�|�d��t
j|�d��fV�dS)Nr$rr&�/r')
r)rr,rr.r�Labelr/rrC)rr1�
prefix_lens   r!�store_content_typezMIMELexer.store_content_type�s�����!�K�K��N�N����[�[��^�^�e�k�k�!�n�n�4�
��k�k�!�n�n�d�o�u�{�{�1�~�~�k�z�k�/J�J�J�J�J��k�k�!�n�n�d�j�%�+�+�a�.�.�8�8�8�8��i�i��l�l�F�,�c�1�1�1�1��k�k�!�n�n�d�j�%�+�+�a�.�.�8�8�8�8�8�8r"c#�K�|�d��t|�d��fV�|�d��tj|�d��fV�|�d��tj|�d��fV�|�d��t|�d��fV�|�d��t|�d��fV�|�d�����dkrR|�d���	��}|ddkr|d	dkr
|dd	�}||_
dSdS)
Nr$r&r'��rr�"r)r,rr)r.r�	Attributer	rr*rUr)rr1rs   r!�get_content_type_subtokensz$MIMELexer.get_content_type_subtokens�sF�����k�k�!�n�n�d�E�K�K��N�N�2�2�2�2��k�k�!�n�n�d�o�u�{�{�1�~�~�=�=�=�=��k�k�!�n�n�d�n�e�k�k�!�n�n�<�<�<�<��k�k�!�n�n�h����A���6�6�6�6��k�k�!�n�n�f�e�k�k�!�n�n�4�4�4�4��;�;�q�>�>���!�!�Z�/�/��{�{�1�~�~�+�+�-�-�H���{�c�!�!�h�r�l�c�&9�&9�#�A�b�D�>��$�D�M�M�M�	0�/r"c#��K�|�d�����|_|�d��tj|�d��fV�dS)Nr)r)r*rr,r�Constant)rr1s  r!�store_content_transfer_encodingz)MIMELexer.store_content_transfer_encoding�sS����).���Q���)=�)=�)?�)?��&��k�k�!�n�n�d�m�U�[�[��^�^�;�;�;�;�;�;r"�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(rkrirj)�__name__�
__module__�__qualname__�__doc__�name�aliases�	mimetypes�url�
version_addedrr8rPr=r_rerhr+rr.r�tokens�
__classcell__)r s@r!rrsi���������:�D��h�G�*�*�*�I�/�C��M�K�K�K�K�K�
8�
8�
8�/A�/A�/A�b2�2�2�69�9�9�%�%�%�<�<�<�(�)D�E��4�5F�G�
�?�+�
����)�
�T�_�f�5�
�
�G�H���'�"�
�
O�
'�
)�
"�D�&�1�

�
�G�H���
�9�:�&
�+��F�F�F�F�Fr")ror>�pygments.lexerrr�pygments.lexersr�pygments.tokenrrrr	r
r�
pygments.utilrr
�__all__rrr"r!�<module>r|s�����
�	�	�	�.�.�.�.�.�.�.�.�2�2�2�2�2�2�G�G�G�G�G�G�G�G�G�G�G�G�G�G�G�G�4�4�4�4�4�4�4�4��-��}�}�}�}�}�
�}�}�}�}�}r"