AlkantarClanX12

Your IP : 18.191.107.181


Current Path : /opt/alt/python38/lib64/python3.8/encodings/__pycache__/
Upload File :
Current File : //opt/alt/python38/lib64/python3.8/encodings/__pycache__/idna.cpython-38.pyc

U

i�f�#�@s�ddlZddlZddlZddlmZe�d�ZdZdZdd�Z	dd	�Z
d
d�ZGdd
�d
ej�ZGdd�dej
�ZGdd�dej�ZGdd�deej�ZGdd�deej�Zdd�ZdS)�N)�	ucd_3_2_0u[.。.。]sxn--zxn--cCs�g}|D] }t�|�rq|�t�|��qd�|�}t�d|�}|D]j}t�|�s�t�|�s�t�	|�s�t�
|�s�t�|�s�t�|�s�t�
|�s�t�|�s�t�|�rDtd|��qDdd�|D�}t|�r�tdd�|D��r�td��|d	r�|d
s�td��|S)N�ZNFKCzInvalid character %rcSsg|]}t�|��qS�)�
stringprepZin_table_d1��.0�xrr�3/opt/alt/python38/lib64/python3.8/encodings/idna.py�
<listcomp>)sznameprep.<locals>.<listcomp>css|]}t�|�VqdS)N)rZin_table_d2rrrr	�	<genexpr>1sznameprep.<locals>.<genexpr>zViolation of BIDI requirement 2r���zViolation of BIDI requirement 3)rZin_table_b1�appendZmap_table_b2�join�unicodedataZ	normalizeZin_table_c12Zin_table_c22Zin_table_c3Zin_table_c4Zin_table_c5Zin_table_c6Zin_table_c7Zin_table_c8Zin_table_c9�UnicodeError�any)�labelZnewlabel�cZRandALrrr	�nameprepsB


��������	rcCs�z|�d�}Wntk
r"Yn*Xdt|�kr<dkrDnn|Std��t|�}z|�d�}Wntk
rvYn*Xdt|�kr�dkr�nn|Std��|�t�r�td��|�d�}t|}dt|�kr�dkr�nn|Std��dS)N�asciir�@�label empty or too longzLabel starts with ACE prefix�punycode)�encoder�lenr�
startswith�sace_prefix�
ace_prefix)rrrr	�ToASCII<s,

rcCs�t|t�rd}n,z|�d�}d}Wntk
r:d}YnX|stt|�}z|�d�}Wntk
rrtd��YnX|�t�s�t|d�S|tt�d�}|�	d�}t
|�}t|d���t|d�kr�td||��|S)NTrFzInvalid character in IDN labelrzIDNA does not round-trip)�
isinstance�bytesrrrrr�strr�decoder�lower)rZ
pure_asciiZlabel1�resultZlabel2rrr	�	ToUnicodegs*





r%c@s eZdZddd�Zddd�ZdS)	�Codec�strictcCs|dkrtd|��|sdSz|�d�}Wntk
r>YndX|�d�}|dd�D]&}dt|�krrdksVntd	��qVt|d�dkr�td
��|t|�fSt�}t�|�}|r�|ds�d}|d=nd}|D] }|r�|�d�|�t|��q�t	||�t|�fS)Nr'�unsupported error handling ��rr�.rrrrzlabel too longr*)
rr�UnicodeEncodeError�splitr�	bytearray�dots�extendrr )�self�input�errorsr$�labelsr�trailing_dotrrr	r�s4



zCodec.encodecCs�|dkrtd|��|sdSt|t�s.t|�}t|kr`z|�d�t|�fWStk
r^YnX|�d�}|r�t|d�dkr�d}|d=nd	}g}|D]}|�t	|��q�d�
|�|t|�fS)
Nr'�Unsupported error handling �rrrr+rr�.r)rrr rr"r�UnicodeDecodeErrorr-r
r%r)r1r2r3r4r5r$rrrr	r"�s(

zCodec.decodeN)r')r')�__name__�
__module__�__qualname__rr"rrrr	r&�s
%r&c@seZdZdd�ZdS)�IncrementalEncoderc	Cs�|dkrtd|��|sdSt�|�}d}|rT|dsBd}|d=n|sT|d=|rTd}t�}d}|D]4}|r||�d�|d7}|�t|��|t|�7}qb||7}|t|�7}t|�|fS)	Nr'r(r)r*rr+r�)rr/r-r.r0rrr �	r1r2r3�finalr4r5r$�sizerrrr	�_buffer_encode�s2

z!IncrementalEncoder._buffer_encodeN)r:r;r<rBrrrr	r=�sr=c@seZdZdd�ZdS)�IncrementalDecoderc	Cs�|dkrtd|��|sdSt|t�r2t�|�}nt|d�}|�d�}d}|rt|dsbd}|d=n|st|d=|rtd}g}d}|D]*}|�t|��|r�|d	7}|t|�7}q�d�|�|}|t|�7}||fS)
Nr'r6r7rr8rrrr>)	rrr!r/r-r
r%rrr?rrr	�_buffer_decode�s6


z!IncrementalDecoder._buffer_decodeN)r:r;r<rDrrrr	rC�srCc@seZdZdS)�StreamWriterN�r:r;r<rrrr	rE"srEc@seZdZdS)�StreamReaderNrFrrrr	rG%srGc	Cs tjdt�jt�jttttd�S)NZidna)�namerr"�incrementalencoder�incrementaldecoder�streamwriter�streamreader)	�codecs�	CodecInfor&rr"r=rCrErGrrrr	�getregentry*s�rO)r�rerMrr�compiler/rrrrr%r&�BufferedIncrementalEncoderr=�BufferedIncrementalDecoderrCrErGrOrrrr	�<module>s
.+)H#'