509318396
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
3
ct„jŠ#  ã               @   s¸   d dl Z d dlZd dlZd dlmZ ejdƒZdZdZdd„ Z	dd	„ Z
d
d„ ZG dd„ dejƒZG dd„ dejƒZG dd„ dejƒZG dd„ deejƒZG dd„ deejƒZdd„ ZdS )é    N)Ú	ucd_3_2_0u   [.ã€‚ï¼Žï½¡]s   xn--zxn--c             C   s  g }x(| D ] }t j|ƒrq
|jt j|ƒƒ q
W dj|ƒ} tjd| ƒ} xr| D ]j}t j|ƒs¨t j|ƒs¨t j	|ƒs¨t j
|ƒs¨t j|ƒs¨t j|ƒs¨t j|ƒs¨t j|ƒs¨t j|ƒrJtd| ƒ‚qJW dd„ | D ƒ}t|ƒ�rtdd„ | D ƒƒrêtdƒ‚|d	  pü|d  �rtdƒ‚| S )NÚ ÚNFKCzInvalid character %rc             S   s   g | ]}t j|ƒ‘qS © )Ú
stringprepZin_table_d1)Ú.0Úxr   r   ú&/usr/lib64/python3.6/encodings/idna.pyú
<listcomp>)   s    znameprep.<locals>.<listcomp>c             s   s   | ]}t j|ƒV  qd S )N)r   Zin_table_d2)r   r   r   r   r	   ú	<genexpr>1   s    znameprep.<locals>.<genexpr>zViolation of BIDI requirement 2r   é   zViolation of BIDI requirement 3éÿÿÿÿ)r   Zin_table_b1ÚappendZmap_table_b2ÚjoinÚunicodedataÚ	normalizeZin_table_c12Zin_table_c22Zin_table_c3Zin_table_c4Zin_table_c5Zin_table_c6Zin_table_c7Zin_table_c8Zin_table_c9ÚUnicodeErrorÚany)ÚlabelZnewlabelÚcZRandALr   r   r	   Únameprep   s2    













r   c             C   sð   y| j dƒ} W n tk
r"   Y n*X dt| ƒ  k o:dk n  rD| S tdƒ‚t| ƒ} y| j dƒ} W n tk
rv   Y n*X dt| ƒ  k oŽdk n  r˜| S tdƒ‚| jtƒr²tdƒ‚| j dƒ} t|  } dt| ƒ  k oÚdk n  rä| S tdƒ‚d S )NÚasciir   é@   zlabel empty or too longzLabel starts with ACE prefixÚpunycode)Úencoder   Úlenr   Ú
startswithÚsace_prefixÚ
ace_prefix)r   r   r   r	   ÚToASCII<   s,    

r   c             C   sÒ   t | tƒrd}n,y| jdƒ} d}W n tk
r:   d}Y nX |stt| ƒ} y| jdƒ} W n tk
rr   tdƒ‚Y nX | jtƒsˆt| dƒS | ttƒd … }|j	dƒ}t
|ƒ}t| dƒjƒ t|dƒkrÎtd| |ƒ‚|S )NTr   FzInvalid character in IDN labelr   zIDNA does not round-trip)Ú
isinstanceÚbytesr   r   r   r   r   Ústrr   Údecoder   Úlower)r   Z
pure_asciiZlabel1ÚresultZlabel2r   r   r	   Ú	ToUnicodeg   s*    





r&   c               @   s    e Zd Zddd„Zddd„ZdS )	ÚCodecÚstrictc             C   s  |dkrt d| ƒ‚|sdS y|jdƒ}W n tk
r>   Y njX |jdƒ}x8|d d… D ](}dt|ƒ  k ordk n  sXt d	ƒ‚qXW t|d ƒdkrœt d
ƒ‚|t|ƒfS tƒ }tj|ƒ}|rÒ|d  rÒd}|d= nd}x(|D ] }|rî|jdƒ |jt|ƒƒ qÜW t	|| ƒt|ƒfS )Nr(   zunsupported error handling ó    r   r   ó   .r   r   zlabel empty or too longzlabel too long)r)   r   r   r   r   r   )
r   r   ÚUnicodeEncodeErrorÚsplitr   Ú	bytearrayÚdotsÚextendr   r!   )ÚselfÚinputÚerrorsr%   Úlabelsr   Útrailing_dotr   r   r	   r   ‘   s4    



zCodec.encodec             C   sÂ   |dkrt d| ƒ‚|sd	S t|tƒs.t|ƒ}t|kr^y|jdƒt|ƒfS  tk
r\   Y nX |jdƒ}|rˆt|d
 ƒdkrˆd}|d= nd}g }x|D ]}|jt	|ƒƒ q–W dj
|ƒ| t|ƒfS )Nr(   zUnsupported error handling r   r   r   r*   r   Ú.)r   r   r   r   )r   r    r!   r   r#   r   ÚUnicodeDecodeErrorr,   r   r&   r   )r0   r1   r2   r3   r4   r%   r   r   r   r	   r#   ¶   s(    


zCodec.decodeN)r(   )r(   )Ú__name__Ú
__module__Ú__qualname__r   r#   r   r   r   r	   r'   �   s   
%r'   c               @   s   e Zd Zdd„ ZdS )ÚIncrementalEncoderc       	      C   s¼   |dkrt d| ƒ‚|sdS tj|ƒ}d}|rT|d sBd}|d	= n|sT|d
= |rTd}tƒ }d}x<|D ]4}|r~|jdƒ |d7 }|jt|ƒƒ |t|ƒ7 }qdW ||7 }|t|ƒ7 }t|ƒ|fS )Nr(   zunsupported error handling r)   r   r   r*   )r)   r   r   r   r   )r   r.   r,   r-   r/   r   r   r!   )	r0   r1   r2   Úfinalr3   r4   r%   Úsizer   r   r   r	   Ú_buffer_encodeÙ   s2    


z!IncrementalEncoder._buffer_encodeN)r7   r8   r9   r=   r   r   r   r	   r:   Ø   s   r:   c               @   s   e Zd Zdd„ ZdS )ÚIncrementalDecoderc       	      C   sÒ   |dkrt d| ƒ‚|sdS t|tƒr2tj|ƒ}nt|dƒ}|jdƒ}d}|rt|d	 sbd}|d
= n|st|d= |rtd}g }d}x2|D ]*}|jt|ƒƒ |r |d7 }|t|ƒ7 }q‚W dj|ƒ| }|t|ƒ7 }||fS )Nr(   zUnsupported error handling r   r   r   r5   r   )r   r   r   r   r   )	r   r    r"   r.   r,   r   r&   r   r   )	r0   r1   r2   r;   r3   r4   r%   r<   r   r   r   r	   Ú_buffer_decodeü   s6    



z!IncrementalDecoder._buffer_decodeN)r7   r8   r9   r?   r   r   r   r	   r>   û   s   r>   c               @   s   e Zd ZdS )ÚStreamWriterN)r7   r8   r9   r   r   r   r	   r@   "  s   r@   c               @   s   e Zd ZdS )ÚStreamReaderN)r7   r8   r9   r   r   r   r	   rA   %  s   rA   c            	   C   s    t jdtƒ jtƒ jttttd�S )NZidna)Únamer   r#   ÚincrementalencoderÚincrementaldecoderÚstreamwriterÚstreamreader)	ÚcodecsÚ	CodecInfor'   r   r#   r:   r>   r@   rA   r   r   r   r	   Úgetregentry*  s    rI   )r   ÚrerG   r   r   Úcompiler.   r   r   r   r   r&   r'   ÚBufferedIncrementalEncoderr:   ÚBufferedIncrementalDecoderr>   r@   rA   rI   r   r   r   r	   Ú<module>   s   
.+)H#'