Your IP : 3.145.64.210


Current Path : /opt/alt/python39/lib64/python3.9/email/__pycache__/
Upload File :
Current File : //opt/alt/python39/lib64/python3.9/email/__pycache__/_encoded_words.cpython-39.opt-2.pyc

a

R�f]!�@s�ddlZddlZddlZddlZddlmZmZddlmZgd�Z	e�
e�d�jdd��Z
dd	�ZGd
d�de�Ze�Zdeed
�<dd�Zdd�Zdd�Zdd�Zdd�Zeed�Zdd�Zeed�Zeed�Zddd�ZdS) �N)�
ascii_letters�digits)�errors)�decode_q�encode_q�decode_b�encode_b�len_q�len_b�decode�encodes=([a-fA-F0-9]{2})cCst�|�d����S)N�)�bytes�fromhex�groupr)�m�r�9/opt/alt/python39/lib64/python3.9/email/_encoded_words.py�<lambda>A�rcCs|�dd�}t|�gfS)N�_� )�replace�_q_byte_subber)�encodedrrrrCsrc@s,eZdZde�d�e�d�Zdd�ZdS)�	_QByteMaps-!*+/�asciicCs.||jvrt|�||<nd�|�||<||S)Nz={:02X})�safe�chr�format)�self�keyrrr�__missing__Ms
z_QByteMap.__missing__N)�__name__�
__module__�__qualname__rrrrr"rrrrrIsr�_� cCsd�dd�|D��S)N�css|]}t|VqdS�N)�_q_byte_map��.0�xrrr�	<genexpr>Zrzencode_q.<locals>.<genexpr>)�join��bstringrrrrYsrcCstdd�|D��S)Ncss|]}tt|�VqdSr))�lenr*r+rrrr.]rzlen_q.<locals>.<genexpr>)�sumr0rrrr	\sr	cCs�t|�d}|r ddd|�nd}z&tj||dd�|rDt��gngfWStjy�ztj|dd�t��gfWYStjy�z,tj|ddd�t��t��gfWYYStjy�|t��gfYYYS0Yn0Yn0dS)N�s===rT)ZvalidateFs==)	r2�base64Z	b64decoderZInvalidBase64PaddingDefect�binascii�ErrorZInvalidBase64CharactersDefectZInvalidBase64LengthDefect)rZpad_errZmissing_paddingrrrrds(��
��rcCst�|��d�S)Nr)r5Z	b64encoderr0rrrr�srcCs&tt|�d�\}}|d|r dndS)N�r4r)�divmodr2)r1Zgroups_of_3Zleftoverrrrr
�sr
)�q�bc	
Cs�|�d�\}}}}}|�d�\}}}|��}|�dd�}t||�\}}z|�|�}Wnzty�|�t�	d|�d���|�|d�}YnFt
tfy�|�dd�}|��dkr�|�t�d|�d	���Yn0||||fS)
N�?�*r�surrogateescapez0Encoded word contains bytes not decodable using z charset�unknown-8bitzUnknown charset z* in encoded word; decoded as unknown bytes)
�split�	partition�lowerr�
_cte_decodersr�UnicodeDecodeError�appendrZUndecodableBytesDefect�LookupError�UnicodeEncodeErrorZCharsetError)	Zewr&�charsetZcteZ
cte_string�langr1Zdefects�stringrrrr�s"
�r�utf-8r(cCs||dkr|�dd�}n
|�|�}|durTtd|�}td|�}||dkrPdnd}t||�}|rld|}d�||||�S)	Nr?rr>r:r;�r=z=?{}{}?{}?{}?=)r�_cte_encode_length�
_cte_encodersr)rJrH�encodingrIr1ZqlenZblenrrrrr�s
r)rKNr()�rer5r6�	functoolsrJrrZemailr�__all__�partial�compile�subrr�dictrr*�ordrr	rrr
rCrrNrMrrrrr�<module>*s:�&�+��

?>