
Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­Â�Â­
<!DOCTYPE html>
<html>
U
    ¡ê,a-x  ã                   @   sR  d Z ddlZddlmZmZ ddlZddlZddlZddl	Z	ddl
Z
ddlZddgZejZejdd… ZG dd„ deƒZi Zee
ƒZdZd	Zd
ZG dd„ dƒZed ddfed ddfddfZdd„ Zdd„ Zdd„ Zdd„ ZdZdadd„ Z dd„ Z!dd „ Z"d!d"„ Z#ee#j$ƒZ%d#d$„ Z&d%d&„ Z'd'd(„ Z(d)d*„ Z)d+d,„ Z*d-d.„ Z+G d/d0„ d0ƒZ,dS )1aP  zipimport provides support for importing Python modules from Zip archives.

This module exports three objects:
- zipimporter: a class; its constructor takes a path to a Zip archive.
- ZipImportError: exception raised by zipimporter objects. It's a
  subclass of ImportError, so it can be caught as ImportError, too.
- _zip_directory_cache: a dict, mapping archive paths to zip directory
  info dicts, as used in zipimporter._files.

It is usually not needed to use the zipimport module explicitly; it is
used by the builtin import mechanism for sys.path items that are paths
to Zip archives.
é    N)Ú_unpack_uint16Ú_unpack_uint32ÚZipImportErrorÚzipimporteré   c                   @   s   e Zd ZdS )r   N)Ú__name__Ú
__module__Ú__qualname__© r
   r
   ú./opt/alt/python38/lib64/python3.8/zipimport.pyr   !   s   é   s   PKiÿÿ  c                   @   sl   e Zd ZdZdd„ Zddd„Zddd„Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zdd„ Zdd„ Zdd„ ZdS )r   aÿ  zipimporter(archivepath) -> zipimporter object

    Create a new zipimporter instance. 'archivepath' must be a path to
    a zipfile, or to a specific path inside a zipfile. For example, it can be
    '/tmp/myimport.zip', or '/tmp/myimport.zip/mydirectory', if mydirectory is a
    valid directory inside the archive.

    'ZipImportError is raised if 'archivepath' doesn't point to a valid Zip
    archive.

    The 'archive' attribute of zipimporter objects contains the name of the
    zipfile targeted.
    c              	   C   s$  t |tƒsdd l}| |¡}|s,td|d�‚tr<| tt¡}g }zt 	|¡}W nH t
tfk
r–   t |¡\}}||kr„td|d�‚|}| |¡ Y q@X |jd@ dkr¶td|d�‚q¶q@zt| }W n$ tk
ræ   t|ƒ}|t|< Y nX || _|| _tj|d d d… Ž | _| j�r |  jt7  _d S )Nr   zarchive path is empty©Úpathznot a Zip filei ð  i €  éÿÿÿÿ)Ú
isinstanceÚstrÚosÚfsdecoder   Úalt_path_sepÚreplaceÚpath_sepÚ_bootstrap_externalÚ
_path_statÚOSErrorÚ
ValueErrorÚ_path_splitÚappendÚst_modeÚ_zip_directory_cacheÚKeyErrorÚ_read_directoryÚ_filesÚarchiveÚ
_path_joinÚprefix)Úselfr   r   r$   ÚstÚdirnameÚbasenameÚfilesr
   r
   r   Ú__init__?   s:    

zzipimporter.__init__Nc                 C   sN   t | |ƒ}|dk	r| g fS t| |ƒ}t| |ƒrFd| j› t› |› �gfS dg fS )aï  find_loader(fullname, path=None) -> self, str or None.

        Search for a module specified by 'fullname'. 'fullname' must be the
        fully qualified (dotted) module name. It returns the zipimporter
        instance itself if the module was found, a string containing the
        full path name if it's possibly a portion of a namespace package,
        or None otherwise. The optional 'path' argument is ignored -- it's
        there for compatibility with the importer protocol.
        N)Ú_get_module_infoÚ_get_module_pathÚ_is_dirr"   r   )r%   Úfullnamer   ÚmiÚmodpathr
   r
   r   Úfind_loaderm   s    



zzipimporter.find_loaderc                 C   s   |   ||¡d S )a‹  find_module(fullname, path=None) -> self or None.

        Search for a module specified by 'fullname'. 'fullname' must be the
        fully qualified (dotted) module name. It returns the zipimporter
        instance itself if the module was found, or None if it wasn't.
        The optional 'path' argument is ignored -- it's there for compatibility
        with the importer protocol.
        r   )r1   )r%   r.   r   r
   r
   r   Úfind_module�   s    	zzipimporter.find_modulec                 C   s   t | |ƒ\}}}|S )z£get_code(fullname) -> code object.

        Return the code object for the specified module. Raise ZipImportError
        if the module couldn't be found.
        ©Ú_get_module_code©r%   r.   ÚcodeÚ	ispackager0   r
   r
   r   Úget_code™   s    zzipimporter.get_codec                 C   sv   t r| t t¡}|}| | jt ¡r:|t| jt ƒd… }z| j| }W n  tk
rh   tdd|ƒ‚Y nX t	| j|ƒS )zšget_data(pathname) -> string with file data.

        Return the data associated with 'pathname'. Raise OSError if
        the file wasn't found.
        Nr   Ú )
r   r   r   Ú
startswithr"   Úlenr!   r   r   Ú	_get_data)r%   ÚpathnameÚkeyÚ	toc_entryr
   r
   r   Úget_data£   s    zzipimporter.get_datac                 C   s   t | |ƒ\}}}|S )zjget_filename(fullname) -> filename string.

        Return the filename for the specified module.
        r3   r5   r
   r
   r   Úget_filename¸   s    zzipimporter.get_filenamec                 C   s€   t | |ƒ}|dkr$td|›�|d�‚t| |ƒ}|r@t |d¡}n
|› d�}z| j| }W n tk
rn   Y dS X t| j|ƒ 	¡ S )zýget_source(fullname) -> source string.

        Return the source code for the specified module. Raise ZipImportError
        if the module couldn't be found, return None if the archive does
        contain the module, but has no source for it.
        Núcan't find module ©Únameú__init__.pyú.py)
r+   r   r,   r   r#   r!   r   r<   r"   Údecode)r%   r.   r/   r   Úfullpathr?   r
   r
   r   Ú
get_sourceÃ   s    


zzipimporter.get_sourcec                 C   s(   t | |ƒ}|dkr$td|›�|d�‚|S )z«is_package(fullname) -> bool.

        Return True if the module specified by fullname is a package.
        Raise ZipImportError if the module couldn't be found.
        NrB   rC   )r+   r   )r%   r.   r/   r
   r
   r   Ú
is_packageÝ   s    
zzipimporter.is_packagec                 C   sø   t | |ƒ\}}}tj |¡}|dks.t|tƒs@t|ƒ}|tj|< | |_zT|rlt| |ƒ}t 	| j
|¡}|g|_t|dƒs|t|_t |j||¡ t||jƒ W n   tj|= ‚ Y nX ztj| }W n$ tk
rä   td|›d�ƒ‚Y nX t d||¡ |S )zõload_module(fullname) -> module.

        Load the module specified by 'fullname'. 'fullname' must be the
        fully qualified (dotted) module name. It returns the imported
        module, or raises ZipImportError if it wasn't found.
        NÚ__builtins__zLoaded module z not found in sys.moduleszimport {} # loaded from Zip {})r4   ÚsysÚmodulesÚgetr   Ú_module_typeÚ
__loader__r,   r   r#   r"   Ú__path__ÚhasattrrK   Ú_fix_up_moduleÚ__dict__Úexecr   ÚImportErrorÚ
_bootstrapÚ_verbose_message)r%   r.   r6   r7   r0   Úmodr   rH   r
   r
   r   Úload_moduleê   s0    


zzipimporter.load_modulec                 C   sX   z|   |¡sW dS W n tk
r*   Y dS X tjsNddlm} | t¡ dt_t| |ƒS )zÌReturn the ResourceReader for a package in a zip file.

        If 'fullname' is a package within the zip file, return the
        'ResourceReader' object for the package.  Otherwise return None.
        Nr   )ÚResourceReaderT)rJ   r   Ú_ZipImportResourceReaderÚ_registeredÚimportlib.abcr[   Úregister)r%   r.   r[   r
   r
   r   Úget_resource_reader  s    


zzipimporter.get_resource_readerc                 C   s   d| j › t› | j› d�S )Nz<zipimporter object "z">)r"   r   r$   )r%   r
   r
   r   Ú__repr__"  s    zzipimporter.__repr__)N)N)r   r   r	   Ú__doc__r*   r1   r2   r8   r@   rA   rI   rJ   rZ   r`   ra   r
   r
   r
   r   r   -   s   .
 

&z__init__.pycTrE   F)z.pycTF)rF   FFc                 C   s   | j | d¡d  S )NÚ.é   )r$   Ú
rpartition)r%   r.   r
   r
   r   r,   4  s    r,   c                 C   s   |t  }|| jkS ©N)r   r!   )r%   r   Údirpathr
   r
   r   r-   8  s    r-   c                 C   s8   t | |ƒ}tD ]$\}}}|| }|| jkr|  S qd S rf   )r,   Ú_zip_searchorderr!   )r%   r.   r   ÚsuffixÚ
isbytecoder7   rH   r
   r
   r   r+   A  s    


r+   c              	   C   sü  zt  | ¡}W n& tk
r4   td| ›�| d�‚Y nX |��¨ z$| t d¡ | ¡ }| t¡}W n& tk
rˆ   td| ›�| d�‚Y nX t|ƒtkr¨td| ›�| d�‚|d d… t	k�r²z| dd¡ | ¡ }W n& tk
rø   td| ›�| d�‚Y nX t
|t t dƒ}z| |¡ | ¡ }W n( tk
�rJ   td| ›�| d�‚Y nX | t	¡}|dk �rrtd| ›�| d�‚|||t … }t|ƒtk�r¢td| ›�| d�‚|t|ƒ | }t|d	d
… ƒ}t|d
d… ƒ}	||k �rîtd| ›�| d�‚||	k �r
td| ›�| d�‚||8 }||	 }
|
dk �r6td| ›�| d�‚i }d}z| |¡ W n( tk
�rt   td| ›�| d�‚Y nX | d¡}t|ƒdk �r–tdƒ‚|d d… dk�r¬�qàt|ƒdk�rÂtdƒ‚t|dd… ƒ}t|dd	… ƒ}t|d	d… ƒ}t|dd
… ƒ}t|d
d… ƒ}t|dd… ƒ}t|dd… ƒ}t|dd… ƒ}t|dd… ƒ}t|dd… ƒ}t|dd… ƒ}|| | }||	k�rštd| ›�| d�‚||
7 }z| |¡}W n( tk
�rØ   td| ›�| d�‚Y nX t|ƒ|k�rútd| ›�| d�‚z2t| || ¡ƒ|| k�r*td| ›�| d�‚W n( tk
�rT   td| ›�| d�‚Y nX |d@ �rj| ¡ }n6z| d¡}W n& tk
�rž   | d¡ t¡}Y nX | dt¡}t | |¡}||||||||f}|||< |d 7 }�qvW 5 Q R X t d!|| ¡ |S )"Nzcan't open Zip file: r   rd   úcan't read Zip file: é   r   znot a Zip file: zcorrupt Zip file: é   é   é   zbad central directory size: zbad central directory offset: z&bad central directory size or offset: é.   úEOF read where not expecteds   PKé   é
   é   é   é   é   é    é"   é*   zbad local header offset: i   ÚasciiÚlatin1ú/r   z!zipimport: found {} names in {!r})Ú_ioÚ	open_coder   r   ÚseekÚEND_CENTRAL_DIR_SIZEÚtellÚreadr;   ÚSTRING_END_ARCHIVEÚmaxÚMAX_COMMENT_LENÚrfindr   ÚEOFErrorr   rG   ÚUnicodeDecodeErrorÚ	translateÚcp437_tabler   r   r   r#   rW   rX   )r"   ÚfpÚheader_positionÚbufferÚ	file_sizeÚmax_comment_startÚdataÚposÚheader_sizeÚheader_offsetÚ
arc_offsetr)   ÚcountÚflagsÚcompressÚtimeÚdateÚcrcÚ	data_sizeÚ	name_sizeÚ
extra_sizeÚcomment_sizeÚfile_offsetrD   r   Útr
   r
   r   r    `  sÔ    
ÿÿÿ

ÿ


ÿ
ÿ






r    u¾   	
 !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~Ã‡Ã¼Ã©Ã¢Ã¤Ã Ã¥Ã§ÃªÃ«Ã¨Ã¯Ã®Ã¬Ã„Ã…Ã‰Ã¦Ã†Ã´Ã¶Ã²Ã»Ã¹Ã¿Ã–ÃœÂ¢Â£Â¥â‚§Æ’Ã¡Ã­Ã³ÃºÃ±Ã‘ÂªÂºÂ¿âŒ�Â¬Â½Â¼Â¡Â«Â»â–‘â–’â–“â”‚â”¤â•¡â•¢â•–â••â•£â•‘â•—â•�â•œâ•›â”�â””â”´â”¬â”œâ”€â”¼â•žâ•Ÿâ•šâ•”â•©â•¦â• â•�â•¬â•§â•¨â•¤â•¥â•™â•˜â•’â•“â•«â•ªâ”˜â”Œâ–ˆâ–„â–Œâ–�â–€Î±ÃŸÎ“Ï€Î£ÏƒÂµÏ„Î¦Î˜Î©Î´âˆžÏ†Îµâˆ©â‰¡Â±â‰¥â‰¤âŒ âŒ¡Ã·â‰ˆÂ°âˆ™Â·âˆšâ�¿Â²â– Â c                  C   sl   t rt d¡ tdƒ‚da z<zddlm}  W n& tk
rR   t d¡ tdƒ‚Y nX W 5 da X t d¡ | S )Nzzipimport: zlib UNAVAILABLEú)can't decompress data; zlib not availableTFr   ©Ú
decompresszzipimport: zlib available)Ú_importing_zlibrW   rX   r   Úzlibr¤   Ú	Exceptionr£   r
   r
   r   Ú_get_decompress_funcþ  s    


r¨   c              	   C   s€  |\}}}}}}}}	|dk r$t dƒ‚t | ¡��}
z|
 |¡ W n& tk
rf   t d| ›�| d�‚Y nX |
 d¡}t|ƒdkr†tdƒ‚|d d… dkr¨t d	| ›�| d�‚t|d
d… ƒ}t|dd… ƒ}d| | }||7 }z|
 |¡ W n( tk
�r   t d| ›�| d�‚Y nX |
 |¡}t|ƒ|k�r4tdƒ‚W 5 Q R X |dk�rL|S z
t	ƒ }W n t
k
�rt   t dƒ‚Y nX ||dƒS )Nr   znegative data sizerk   r   rw   rq   rl   s   PKzbad local file header: é   rv   zzipimport: can't read datar¢   iñÿÿÿ)r   r~   r   r€   r   rƒ   r;   rˆ   r   r¨   r§   )r"   r?   Údatapathr˜   rœ   r�   r    r™   rš   r›   rŒ   rŽ   r�   rž   r“   Úraw_datar¤   r
   r
   r   r<     s>    



r<   c                 C   s   t | | ƒdkS )Nr   )Úabs)Út1Út2r
   r
   r   Ú	_eq_mtimeA  s    r¯   c                 C   s<  ||dœ}zt  |||¡}W n tk
r2   Y d S X |d@ dk}|r¶|d@ dk}tjdkr´|shtjdkr´t| |ƒ}	|	d k	r´t t j|	¡}
zt  ||
||¡ W n tk
r²   Y d S X nTt	| |ƒ\}}|�r
t
t|dd… ƒ|ƒröt|dd	… ƒ|k�r
t d
|›�¡ d S t |d	d … ¡}t|tƒ�s8td|›d�ƒ‚|S )N)rD   r   r   r   rd   ÚneverÚalwaysrr   rm   rn   zbytecode is stale for zcompiled module z is not a code object)r   Ú_classify_pycrV   Ú_impÚcheck_hash_based_pycsÚ_get_pyc_sourceÚsource_hashÚ_RAW_MAGIC_NUMBERÚ_validate_hash_pycÚ_get_mtime_and_size_of_sourcer¯   r   rW   rX   ÚmarshalÚloadsr   Ú
_code_typeÚ	TypeError)r%   r=   rH   r.   r‘   Úexc_detailsr—   Ú
hash_basedÚcheck_sourceÚsource_bytesr¶   Úsource_mtimeÚsource_sizer6   r
   r
   r   Ú_unmarshal_codeK  sX    þ
ÿÿ
þ   ÿ
ÿÿÿrÄ   c                 C   s   |   dd¡} |   dd¡} | S )Ns   
ó   
ó   )r   )Úsourcer
   r
   r   Ú_normalize_line_endings~  s    rÈ   c                 C   s   t |ƒ}t|| ddd�S )NrU   T)Údont_inherit)rÈ   Úcompile)r=   rÇ   r
   r
   r   Ú_compile_source…  s    rË   c                 C   sD   t  | d? d | d? d@ | d@ |d? |d? d@ |d@ d d	d	d	f	¡S )
Né	   i¼  é   é   é   é   é?   rd   r   )r™   Úmktime)Údr¡   r
   r
   r   Ú_parse_dostime‹  s    



  ùrÔ   c              
   C   s`   z>|d d… }| j | }|d }|d }|d }t||ƒ|fW S  tttfk
rZ   Y dS X d S )Nr   rÍ   é   é   )r   r   )r!   rÔ   r   Ú
IndexErrorr½   )r%   r   r?   r™   rš   Úuncompressed_sizer
   r
   r   r¹   ˜  s    
r¹   c                 C   sB   |d d… }z| j | }W n tk
r0   Y d S X t| j|ƒS d S )Nr   )r!   r   r<   r"   )r%   r   r?   r
   r
   r   rµ   «  s    rµ   c              	   C   sÆ   t | |ƒ}tD ] \}}}|| }tjd| jt|dd� z| j| }W n tk
rX   Y qX |d }t| j|ƒ}	|r„t	| ||||	ƒ}
n
t
||	ƒ}
|
d kr˜q|d }|
||f  S qtd|›�|d�‚d S )Nztrying {}{}{}rd   )Ú	verbosityr   rB   rC   )r,   rh   rW   rX   r"   r   r!   r   r<   rÄ   rË   r   )r%   r.   r   ri   rj   r7   rH   r?   r0   r‘   r6   r
   r
   r   r4   º  s$    

r4   c                   @   s<   e Zd ZdZdZdd„ Zdd„ Zdd„ Zd	d
„ Zdd„ Z	dS )r\   z¥Private class used to support ZipImport.get_resource_reader().

    This class is allowed to reference all the innards and private parts of
    the zipimporter.
    Fc                 C   s   || _ || _d S rf   )r   r.   )r%   r   r.   r
   r
   r   r*   Ü  s    z!_ZipImportResourceReader.__init__c                 C   s\   | j  dd¡}|› d|› �}ddlm} z|| j |¡ƒW S  tk
rV   t|ƒ‚Y nX d S )Nrc   r}   r   )ÚBytesIO)r.   r   ÚiorÚ   r   r@   r   ÚFileNotFoundError)r%   ÚresourceÚfullname_as_pathr   rÚ   r
   r
   r   Úopen_resourceà  s    z&_ZipImportResourceReader.open_resourcec                 C   s   t ‚d S rf   )rÜ   )r%   rÝ   r
   r
   r   Úresource_pathé  s    z&_ZipImportResourceReader.resource_pathc                 C   sH   | j  dd¡}|› d|› �}z| j |¡ W n tk
rB   Y dS X dS )Nrc   r}   FT)r.   r   r   r@   r   )r%   rD   rÞ   r   r
   r
   r   Úis_resourceï  s    z$_ZipImportResourceReader.is_resourcec           	   	   c   s¬   ddl m} || j | j¡ƒ}| | jj¡}|j}tƒ }| jj	D ]f}z||ƒ |¡}W n t
k
rn   Y q@Y nX |jj}t|ƒdkrŽ|jV  q@||kr@| |¡ |V  q@d S )Nr   )ÚPath)Úpathlibrâ   r   rA   r.   Úrelative_tor"   ÚparentÚsetr!   r   rD   r;   Úadd)	r%   râ   Úfullname_pathÚrelative_pathÚpackage_pathÚsubdirs_seenÚfilenameÚrelativeÚparent_namer
   r
   r   Úcontentsú  s     


z!_ZipImportResourceReader.contentsN)
r   r   r	   rb   r]   r*   rß   rà   rá   rï   r
   r
   r
   r   r\   Ô  s   	r\   )-rb   Ú_frozen_importlib_externalr   r   r   Ú_frozen_importlibrW   r³   r~   rº   rL   r™   Ú__all__r   Úpath_separatorsr   rV   r   r   ÚtyperO   r�   r„   r†   r   rh   r,   r-   r+   r    r‹   r¥   r¨   r<   r¯   rÄ   Ú__code__r¼   rÈ   rË   rÔ   r¹   rµ   r4   r\   r
   r
   r
   r   Ú<module>   sX     ü		~þ.
.
