ok

Mini Shell

Direktori : /opt/alt/python311/lib64/python3.11/email/__pycache__/
Upload File :
Current File : //opt/alt/python311/lib64/python3.11/email/__pycache__/header.cpython-311.opt-2.pyc

�

�f^���	gd�ZddlZddlZddlZddlZddlmZddlmZ	e	j
Z
dZdZdZ
dZd	Zd
ZdZe
d��Ze
d
��Zejdejejz��Zejd��Zejd��ZejjZd�Z		dd�ZGd�d��ZGd�d��ZGd�de ��Z!dS))�Header�
decode_header�make_header�N)�HeaderParseError)�charset�
� � z        ��Nz 	�us-asciizutf-8ai
  =\?                   # literal =?
  (?P<charset>[^?]*?)   # non-greedy up to the next ? is the charset
  \?                    # literal ?
  (?P<encoding>[qQbB])  # either a "q" or a "b", case insensitive
  \?                    # literal ?
  (?P<encoded>.*?)      # non-greedy up to the next ?= is the encoded string
  \?=                   # literal ?=
  z[\041-\176]+:$z
\n[^ \t]+:c��	t|d��rd�|jD��St�|��s|dfgSg}|���D]�}t�|��}d}|r�|�d��}|r|���}d}|r|�|ddf��|r{|�d���	��}|�d���	��}|�d��}|�|||f��|�ƌ�g}	t|��D]_\}
}|
dkrT|drL||
dz
dr;||
dz
d���r|	�|
dz
���`t|	��D]}||=�g}
|D]�\}}}|�|
�||f��� |dkr7tj�|��}|
�||f���]|d	kr~t!|��d
z}|r|ddd
|z
�z
}	tj�|��}|
�||f����#t&j$rt+d���wxYwt-d
|z���g}dx}}|
D]h\}}t/|t0��rt3|d��}|�|}|}�1||kr|�||f��|}|}�S|�|t4|zz
}�c||z
}�i|�||f��|S)N�_chunksc�v�g|]6\}}tj|t|����t|��f��7S�)�_charset�_encode�str)�.0�stringrs   �3/opt/alt/python311/lib64/python3.11/email/header.py�
<listcomp>z!decode_header.<locals>.<listcomp>KsJ��;�;�;�'����!�&�#�g�,�,�7�7��W���F�;�;�;�TrF���q�b�z===zBase64 decoding errorzUnexpected encoding: zraw-unicode-escape)�hasattrr�ecre�search�
splitlines�split�pop�lstrip�append�lower�	enumerate�isspace�reversed�email�
quoprimime�
header_decode�len�
base64mime�decode�binascii�Errorr�AssertionError�
isinstancer�bytes�BSPACE)�header�words�line�parts�first�	unencodedr�encoding�encoded�droplist�n�w�d�
decoded_words�encoded_string�word�paderr�	collapsed�	last_word�last_charsets                    rrr;s�����v�y�!�!�;�;�;�+1�>�;�;�;�	;��;�;�v��� ������
�E��!�!�#�#�;�;���
�
�4� � �����	;��	�	�!���I��
�%�,�,�.�.�	����
6����i��t�4�5�5�5��
;��)�)�A�,�,�,�,�.�.�� �9�9�Q�<�<�-�-�/�/���)�)�A�,�,�����g�x��9�:�:�:��	;���H��%� � �!�!���1��Q�3�3�1�Q�4�3�E�!�A�#�J�q�M�3�e�A�a�C�j��m�.C�.C�.E�.E�3��O�O�A�a�C� � � ��
�h�
�
�����!�H�H�
�M�-2�E�E�)���'���� � �.�'�!:�;�;�;�;�
��_�_��#�1�1�.�A�A�D�� � �$���1�1�1�1�
��_�_���(�(�1�,�F��
5��%���V���"4�4��
6��'�.�.�~�>�>���$�$�d�G�_�5�5�5�5���>�
@�
@�
@�&�'>�?�?�?�
@����
!�!8�8�!C�D�D�D��I�#�#�I��&�
�
�
��g��d�C� � �	5���3�4�4�D����I�"�L�L�
��
$�
$����i��6�7�7�7��I�"�L�L�
�
!���$��&�I�I����I�I�
���i��.�/�/�/��s�J�J'c��	t|||���}|D]A\}}|�$t|t��st|��}|�||���B|S)N)�
maxlinelen�header_name�continuation_ws)rr4�Charsetr&)�decoded_seqrKrLrM�h�srs       rrr�su��	�	�*�+�.�	0�	0�	0�A�!���
��7���z�'�7�'C�'C���g�&�&�G�	����G������Hrc�D�eZdZ			d
d�Zd�Zd�Zdd�Zd�Zdd�Zd�Z	dS)rNr	�strictc�$�	|�t}n$t|t��st|��}||_||_g|_|�|�|||��|�t}||_|�	d|_	dSt|��dz|_	dS)Nrr)�USASCIIr4rNr�_continuation_wsrr&�
MAXLINELEN�_maxlinelen�
_headerlenr.)�selfrQrrKrLrM�errorss       r�__init__zHeader.__init__�s���	�4�?��G�G��G�W�-�-�	'��g�&�&�G���
� /�������=��K�K��7�F�+�+�+���#�J�%������D�O�O�O�"�+�.�.��2�D�O�O�Orc�6�	|���g}d}d}|jD]�\}}|}|tjkr,|�dd��}|�dd��}|rd|o|�|d��}|dvr#|dvr|s|�t��d}n |dvr|s|�t��|o|�|d��}|}|�|����t�
|��S)N�ascii�surrogateescape�replacer�Nr
���)�
_normalizerr�UNKNOWN8BIT�encoder0�	_nonctextr&�SPACE�EMPTYSTRING�join)	rZ�uchunks�lastcs�	lastspacerr�nextcs�original_bytes�hasspaces	         r�__str__zHeader.__str__�s9��4������������	�#�|�	#�	#�O�F�G��F���-�-�-�!'���w�8I�!J�!J��'�.�.�w�	�B�B���
*�!�?�d�n�n�V�A�Y�&?�&?���!3�3�3��!3�3�3�H�3����u�-�-�-�!%����#5�5�5�i�5��N�N�5�)�)�)��=�4�>�>�&��*�#=�#=�I��F��N�N�6�"�"�"�"�����(�(�(rc�(�|t|��kS�N)r)rZ�others  r�__eq__z
Header.__eq__�s����D�	�	�!�!rc���	|�|j}n$t|t��st|��}t|t��sF|jpd}|tjkr|�dd��}n|�||��}|jpd}|tjkr6	|�||��n#t$r|dkr�t}YnwxYw|j�||f��dS)Nr
r_)
rr4rNr�input_codecrdr0�output_codecre�UnicodeEncodeError�UTF8rr&)rZrQrr[�
input_charset�output_charsets      rr&z
Header.appends��	�(�?��m�G�G��G�W�-�-�	'��g�&�&�G��!�S�!�!�	4�#�/�=�:�M��� 4�4�4��H�H�Z�):�;�;����H�H�]�F�3�3��!�-�;����X�1�1�1�
������0�0�0�0��%�
�
�
�!�:�-�-������
����	
����Q��L�)�)�)�)�)s�%B<�<C�Cc�4�	|���p|dvS)N)�(�)�\)r))rZrQs  rrfzHeader._nonctext0s ��	��y�y�{�{�3�a�#3�3�3r�;, 	rc��	|���|�|j}|dkrd}t|j||j|��}d}dx}}|jD�]�\}}	|�V|o|�|d��}|dvr|r|	dvr|���n|	dvr|s|���|o|�|d��}|	}d}|���}
|
r|�	d|
d|	��n|�	dd|	��|
dd�D]�}|�
��|	j�2|�	|jd|���z|	���O|���}|dt|��t|��z
�}
|�	|
||	����t|
��dkr|�
�����|jr|���|�|��}t�|��r"t#d	�|�����|S)
Nri@BrarbFrrr	z8header value appears to contain an embedded header: {!r})rcrX�_ValueFormatterrYrVrrf�add_transitionr"�feed�newline�header_encodingr%r.�_str�_embedded_headerr!r�format)rZ�
splitcharsrK�linesep�	formatterrkrorlrr�linesr9�sline�fws�values               rrez
Header.encode5s���	�@	
���������)�J���?�?� �J�#�D�O�Z�$(�$9�:�G�G�	���#�#��9�#�|�	$�	$�O�F�G��#�!�?�d�n�n�V�A�Y�&?�&?���!3�3�3�#�3�w�6H�'H�'H�!�0�0�2�2�2���$6�6�6�y�6��,�,�.�.�.��=�4�>�>�&��*�#=�#=�I��F��H��%�%�'�'�E��
0����r�5��8�W�5�5�5�5����r�2�w�/�/�/��a�b�b�	�
8�
8���!�!�#�#�#��*�6��N�N�4�#8�#����
�
�:M�#*�,�,�,�,�!�K�K�M�M�E��4��D�	�	�#�e�*�*� 4�4�5�C��N�N�3��w�7�7�7�7��5�z�z�A�~�~��!�!�#�#�#���<�	'��$�$�&�&�&����w�'�'���"�"�5�)�)�	:�"�$+�+1�6�%�=�=�:�:�
:��rc�@�g}d}g}|jD]W\}}||kr|�|���!|�/|�t�|��|f��|g}|}�X|r/|�t�|��|f��||_dSrr)rr&rgri)rZ�chunksrI�
last_chunkrrs      rrczHeader._normalize�s��������
�#�|�	'�	'�O�F�G��,�&�&��!�!�&�)�)�)�)��+��M�M�5�:�:�j�#9�#9�<�"H�I�I�I�$�X�
�&����	B��M�M�5�:�:�j�1�1�<�@�A�A�A�����r)NNNNr	rS)NrS)r�Nr)
�__name__�
__module__�__qualname__r\rprtr&rfrercrrrrr�s�������'+�.2�-5�-3�-3�-3�-3�^)�)�)�@"�"�"�)*�)*�)*�)*�V4�4�4�
N�N�N�N�`����rrc�D�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z	d�Z
d	�Zd
S)r�c��||_||_t|��|_||_g|_t
|��|_dSrr)�_maxlenrVr.�_continuation_ws_len�_splitchars�_lines�_Accumulator�
_current_line)rZ�	headerlen�maxlenrMr�s     rr\z_ValueFormatter.__init__�sF����� /���$'��$8�$8��!�%������)�)�4�4����rc�^�|���|�|j��Srr)r�rir�)rZr�s  rr�z_ValueFormatter._str�s#���������|�|�D�K�(�(�(rc�6�|�t��Srr)r��NL�rZs rrpz_ValueFormatter.__str__�s���y�y��}�}�rc��|j���}|dkr|jj|�t|j��dkrt|j���r/|jr(|jdxxt
|j��z
cc<n,|j�t
|j����|j���dS)N)r	rrrb)	r�r$�pushr.�	is_onlywsr�rr&�reset)rZ�end_of_lines  rr�z_ValueFormatter.newline�s����(�,�,�.�.���)�#�#�#�D��#�[�1�1��t�!�"�"�Q�&�&��!�+�+�-�-�
<�$�+�
<���B����3�t�'9�#:�#:�:�������"�"�3�t�'9�#:�#:�;�;�;��� � �"�"�"�"�"rc�<�|j�dd��dS)Nr	r)r�r�r�s rr�z_ValueFormatter.add_transition�s!�������R�(�(�(�(�(rc�$�|j�|�|||j��dS|�||�����}	|�d��}n#t$rYdSwxYw|�|�||��	|���}n#t$rYdSwxYw|���|j	�
|j|��|D]$}|j�
|j|z���%dS�Nr)r��_ascii_splitr��header_encode_lines�_maxlengthsr$�
IndexError�
_append_chunkr�r�r�rVr�r&)rZr�rr�
encoded_lines�
first_line�	last_liner9s        rr�z_ValueFormatter.feed�sI���"�*����c�6�4�+;�<�<�<��F� �3�3�F�D�<L�<L�<N�<N�O�O�
�	�&�*�*�1�-�-�J�J���	�	�	��F�F�	�����!����s�J�/�/�/�	�%�)�)�+�+�I�I���	�	�	��F�F�	����	
����������� 5�y�A�A�A�!�	=�	=�D��K���t�4�t�;�<�<�<�<�	=�	=s$�A%�%
A3�2A3�B$�$
B2�1B2c#�hK�|jt|j��z
V�	|j|jz
V��rr)r�r.r�r�r�s rr�z_ValueFormatter._maxlengths�sD�����l�S��!3�4�4�4�4�4�4�	;��,��!:�:�:�:�:�	;rc��tjdtzdz||z��}|dr	dg|dd�<n|�d��t	t|��gdz�D]\}}|�||���dS)Nz([z]+)rrr)�rer#�FWSr$�zip�iterr�)rZr�rr�r:�parts      rr�z_ValueFormatter._ascii_split�s������c��%���V��4�4����8�	���E�"�1�"�I�I��I�I�a�L�L�L��t�E�{�{�m�A�o�.�	*�	*�I�C�����s�D�)�)�)�)�	*�	*rc�,�|j�||��t|j��|jk�rZ|jD]�}t|j���dz
dd��D]_}|���r#|j|d}|r|d|krn(|j|dz
d}|r|d|krn�`��na|j���\}}|jj	dkr|�
��|sd}|j�||��dS|j�|��}|j�
t|j����|j�|��dSdS)Nrrrbr	)r�r�r.r�r��range�
part_countr)r$�
_initial_sizer��pop_fromr�r&rr�)rZr�r�ch�i�prevpartr��	remainders        rr�z_ValueFormatter._append_chunk�s��������V�,�,�,��t�!�"�"�T�\�1�1��&�
�
���t�1�<�<�>�>�q�@�!�R�H�H�	�	�A��z�z�|�|�"�"�0��3�A�6���"�3�q�6�2�:�:�!�E�#�1�!�A�#�6�q�9�H���H�R�L�"�$4�$4������� �.�2�2�4�4�	��T��%�3�a�7�7��L�L�N�N�N��"�"���"�'�'��T�2�2�2����*�3�3�A�6�6�I��K���s�4�#5�6�6�7�7�7���$�$�Y�/�/�/�/�/�92�1rN)r�r�r�r\r�rpr�r�r�r�r�r�rrrr�r��s�������5�5�5�)�)�)����	#�	#�	#�)�)�)�#=�#=�#=�J;�;�;�*�*�*�,0�0�0�0�0rr�c�\��eZdZd�fd�	Zd�Zdd�Z�fd�Zd�Zd�Zd
d	�Z	d
�Z
�fd�Z�xZS)r�rc�V��||_t�����dSrr)r��superr\)rZ�initial_size�	__class__s  �rr\z_Accumulator.__init__s'���)���
���������rc�4�|�||f��dSrr)r&)rZr�rs   rr�z_Accumulator.pushs�����S�&�M�"�"�"�"�"rc�(�||d�}g||d�<|Srrr)rZr��poppeds   rr�z_Accumulator.pop_from!s!���a�b�b�����Q�R�R���
rc�x��|���dkrdSt�����S)Nr)rr)r�r�r$�rZr�s �rr$z_Accumulator.pop&s/����?�?���a����8��w�w�{�{�}�}�rc�@�td�|D��|j��S)Nc3�ZK�|]&\}}t|��t|��zV��'dSrr)r.�rr�r�s   r�	<genexpr>z'_Accumulator.__len__.<locals>.<genexpr>,s7����=�=�9�3��C��H�H�S��Y�Y�&�=�=�=�=�=�=r)�sumr�r�s r�__len__z_Accumulator.__len__+s+���=�=��=�=�=��%�'�'�	'rc�J�t�d�|D����S)Nc3�TK�|]#\}}t�||f��V��$dSrr�rhrir�s   rr�z'_Accumulator.__str__.<locals>.<genexpr>0sL����!7�!7�$-�C��"-�!1�!1�3��+�!>�!>�!7�!7�!7�!7�!7�!7rr�r�s rrpz_Accumulator.__str__/s6�����!7�!7�15�!7�!7�!7�8�8�	8rNc�*�|�g}||dd�<d|_dSr�)r�)rZ�startvals  rr�z_Accumulator.reset3s(�����H���Q�Q�Q������rc�`�|jdko#|p t|�����Sr�)r�rr)r�s rr�z_Accumulator.is_onlyws9s.���!�1�$�J�d�(�*I�c�$�i�i�6G�6G�6I�6I�Jrc�D��t�����Srr)r�r�r�s �rr�z_Accumulator.part_count<s����w�w��� � � r)rrr)
r�r�r�r\r�r�r$r�rpr�r�r��
__classcell__)r�s@rr�r�s��������������#�#�#�����
�����
'�'�'�8�8�8�����K�K�K�!�!�!�!�!�!�!�!�!rr�)NNr	)"�__all__r�r1�email.quoprimimer+�email.base64mime�email.errorsrrrrNr�rgr6�SPACE8rhrWr�rUry�compile�VERBOSE�	MULTILINEr �fcrer�r,�_max_appendrrrr��listr�rrr�<module>r�s���
2�����
�	�	�	�������������)�)�)�)�)�)�%�%�%�%�%�%�
�
��	����	
��	����
�
���
�'�*�
�
���w�w�����r�z��
�z�B�L� �"�"���r�z�#�$�$���2�:�m�,�,����*��[�[�[�|;?� #�
�
�
�
�,f�f�f�f�f�f�f�f�R}0�}0�}0�}0�}0�}0�}0�}0�@%!�%!�%!�%!�%!�4�%!�%!�%!�%!�%!r

Zerion Mini Shell 1.0