Your IP : 3.129.73.6


Current Path : /opt/alt/python38/lib64/python3.8/email/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib64/python3.8/email/__pycache__/_encoded_words.cpython-38.opt-2.pyc

U

i�fL!�@s�ddlZddlZddlZddlZddlmZmZddlmZdddddd	d
dgZ	e�
e�d�jd
d��Z
dd�ZGdd�de�Ze�Zdeed�<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/python38/lib64/python3.8/email/_encoded_words.py�<lambda>A�rcCs|�dd�}t|�gfS)N�_� )�replace�_q_byte_subber)�encodedrrrrCsc@s,eZdZde�d�e�d�Zdd�ZdS)�	_QByteMaps-!*+/�asciicCs.||jkrt|�||<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>Zszencode_q.<locals>.<genexpr>)�join��bstringrrrrYscCstdd�|D��S)Ncss|]}tt|�VqdSr))�lenr*r+rrrr.]szlen_q.<locals>.<genexpr>)�sumr0rrrr	\scCs�t|�d}|r ddd|�nd}z&tj||dd�|rDt��gngfWStjk
�r�ztj|dd�t��gfWYStjk
r�z,tj|ddd�t��t��gfWYYStjk
r�|t��gfYYYSXYnXYnXdS)N�s===rT)ZvalidateFs==)	r2�base64Z	b64decoderZInvalidBase64PaddingDefect�binascii�ErrorZInvalidBase64CharactersDefectZInvalidBase64LengthDefect)rZpad_errZmissing_paddingrrrrds(��
��cCst�|��d�S)Nr)r5Z	b64encoderr0rrrr�scCs&tt|�d�\}}|d|r dndS)N�r4r)�divmodr2)r1Zgroups_of_3Zleftoverrrrr
�s)�q�bc	
Cs�|�d�\}}}}}|�d�\}}}|��}|�dd�}t||�\}}z|�|�}Wnvtk
r�|�t�	d�
|���|�|d�}YnBtk
r�|�dd�}|��dkr�|�t�d�
|���YnX||||fS)N�?�*r�surrogateescapez:Encoded word contains bytes not decodable using {} charset�unknown-8bitz<Unknown charset {} in encoded word; decoded as unknown bytes)
�split�	partition�lowerr�
_cte_decodersr�UnicodeError�appendrZUndecodableBytesDefectr�LookupErrorZCharsetError)	Zewr&�charsetZcteZ
cte_string�langr1Zdefects�stringrrrr�s&���utf-8r(cCs||dkr|�dd�}n
|�|�}|dkrTtd|�}td|�}||dkrPdnd}t||�}|rld|}d�||||�S)	Nr?rr>r:r;�r=z=?{}{}?{}?{}?=)r�_cte_encode_length�
_cte_encodersr)rIrG�encodingrHr1ZqlenZblenrrrrr�s
)rJNr()�rer5r6�	functoolsrIrrZemailr�__all__�partial�compile�subrr�dictrr*�ordrr	rrr
rCrrMrLrrrrr�<module>*sJ��&�+��

?>