o
    h<                     @   s   d Z ddlmZ ddlmZmZ zddlmZ dd ZW n! e	y=   zddlmZ W n e	y:   ddl
mZ Y nw Y nw d	Zi Zd
d ZdS )z Unicode to ASCII transliteration    )intern)	MAX_WBITS
decompress)filesc                 C   s   t | | S )N)r   joinpath
read_bytes)packageresource r
   Q/var/www/html/ndineBlogger/venv/lib/python3.10/site-packages/anyascii/__init__.pyread_binary	   s   r   )r   )get_dataz0.3.2c           	      C   s   z	|   r| W S W n	 ty   Y nw g }| D ]a}t|}|dkr'|| q|d? }|d@ }zt| }W n5 tyj   ztdd| }t|t 	d}t
tt|d}W n tyc   d}Y nw |t|< Y nw t||krx|||  qd	|S )
z"Transliterate a string into ASCII.         zanyascii._dataz%03xascii	r
    )isasciiAttributeErrorordappend_blocksKeyErrorr   r   r   decodetuplemapr   splitFileNotFoundErrorlenjoin)	stringresultchar	codepointblocknumloblockbsr
   r
   r   anyascii   s>   

r*   N)__doc__sysr   zlibr   r   importlib.resourcesr   r   ImportErrorpkgutilr   __version__r   r*   r
   r
   r
   r   <module>   s"    