
    RhV                        d 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lZddl	Z	ddl
Z
ddlZ	 ddlZej                  Z	 ddlZ	 ddlZg dZ G d de      Z G d de      ZexZZdZd	Zd	ZdZd
ZdZdZdZdZdZ dZ!dZ"dZ#dZ$ ejJ                  e#      Z&dZ'dZ(dZ)dZ*dZ+dZ,dZ-dZ.d
Z/dZ0dZ1dZ2 ejJ                  e1      Z3dZ4dZ5dZ6dZ7dZ8dZ9dZ:dZ;d
Z<dZ=dZ>dZ?dZ@dZAdZBd ZCd!ZDd"ZEd#ZFdZGdZHd
ZId$ZJd%ZKd&ZLd'ZMd(ZN ejJ                  eM      ZOdZPdZQdZRdZSdZTdZUdZVdZWd
ZXdZYdZZdZ[d)Z\d*Z] ejJ                  e\      Z^d+Z_d,Z` ejJ                  e_      ZadZbdZcdZddZedZfdZgdZhdZid
ZjdZkd-Zl ej                  d.      Znd/ Zod0 Zpd1 Zqd2 Zrd3 Zsd4 Zt G d5 d6eu      Zvdawd7 Zxd8 Zy G d9 d:      Zz G d; d<      Z{i dd=dd>dd?dd?dd?dd?dd@ddAd
dBddCdd@ddDddEd#dFdGdHdIdJdKdLZ|dM Z}d^dNZ~dO Z G dP dQ      Z G dR dS      Z G dT dUej                        Z G dV dWej                        Z G dX dY      Z G dZ d[e      Zd^d\Zdd]lmZmZ y# e$ r dZej                  ZY $w xY w# e$ r dZY -w xY w# e$ r dZY 6w xY w)_zP
Read and write ZIP files.

XXX references to utf-8 need further investigation.
    N)
BadZipFile
BadZipfileerror
ZIP_STOREDZIP_DEFLATED	ZIP_BZIP2ZIP_LZMA
is_zipfileZipInfoZipFile	PyZipFileLargeZipFilePathc                       e Zd Zy)r   N)__name__
__module____qualname__     '/usr/lib/python3.12/zipfile/__init__.pyr   r   '   s    r   r   c                       e Zd ZdZy)r   zu
    Raised when writing a zipfile, the zipfile requires ZIP64 extensions
    and those extensions are disabled.
    N)r   r   r   __doc__r   r   r   r   r   +   s    r   r   i              -   .   ?   s   <4s4H2LHs   PK                     	   z<4s4B4HL2L5H2Ls   PK
                         @   i   z<4s2B4HL2L2Hs   PKz<4sLQLs   PKz
<4sQ2H2L4Qs   PKiPK<HHc                 ^   t         j                  }d}g }dx}}|dz   t        |       k  rN || ||dz          \  }}|dz   |z   }	||v r||k7  r|j                  | ||        |	}d}|	}|dz   t        |       k  rN|s| S |t        |       k7  r|j                  | |d         dj	                  |      S )NFr   r$   Tr   )_EXTRA_FIELD_STRUCTunpacklenappendjoin)
extraxidsr5   modifiedbufferstartixidxlenjs
             r   _strip_extrarB      s     ''FHFMEA
a%3u:
5QU+,	TEDL$;EzeEA./EH a%3u:
 E
eEFm$88Fr   c                 >    	 t        |       ry	 y# t        $ r Y yw xY w)NTF)_EndRecDataOSErrorfps    r   _check_zipfilerH      s2    r?    s    	c                     d}	 t        | d      rt        |       }|S t        | d      5 }t        |      }ddd       |S # 1 sw Y   |S xY w# t        $ r Y |S w xY w)zQuickly see if a file is a ZIP file by checking the magic number.

    The filename argument may be a file or file-like object too.
    FreadrF   rbN)hasattrrH   openrE   )filenameresultrG   s      r   r
   r
      sw    
 F8V$#x0F M	 h% ,'+, M	, M  Ms2   A A A A  A
A 
A 	AAc           
         	 | j                  |t        z
  d       | j                  t              }t	        |      t        k7  r|S t        j                  t        |      \  }}}}|t        k7  r|S |dk7  s|dkD  rt        d      | j                  |t        z
  t        z
  d       | j                  t              }t	        |      t        k7  r|S t        j                  t        |      \
  }}}	}
}}}}}}|t        k7  r|S ||t        <   ||t        <   ||t        <   ||t         <   ||t"        <   ||t$        <   ||t&        <   |S # t        $ r |cY S w xY w)zM
    Read the ZIP64 end-of-archive records and use that to update endrec
    r"   r   r!   z3zipfiles that span multiple disks are not supported)seeksizeEndCentDir64LocatorrE   rJ   r6   structr5   structEndArchive64LocatorstringEndArchive64Locatorr   sizeEndCentDir64structEndArchive64stringEndArchive64_ECD_SIGNATURE_ECD_DISK_NUMBER_ECD_DISK_START_ECD_ENTRIES_THIS_DISK_ECD_ENTRIES_TOTAL	_ECD_SIZE_ECD_OFFSET)fpinoffsetendrecdatasigdisknoreloffdisksszcreate_versionread_versiondisk_numdisk_dirdircount	dircount2dirsize	diroffsets                    r   _EndRecData64rq      s^   		&22A6 99,-D
4y++!'/H$!OC
''{eaiNOO 	IIf..1AA1E99%&D
4y$$ 	($/0C^\8X)Wi
   !F>'F&F?%-F!"!*FF9#F;ME   s   D= =E
Ec                    | j                  dd       | j                         }	 | j                  t         d       | j	                         }t        |      t        k(  rt|dd t        k(  rh|dd dk(  r`t        j                  t        |      }t        |      }|j                  d       |j                  |t        z
         t        | t         |      S t        |dz
  t        z
  d      }| j                  |d       | j	                         }|j                  t              }|dk\  r|||t        z    }t        |      t        k7  ryt        t        j                  t        |            }|t           }||t        z   |t        z   |z    }|j                  |       |j                  ||z          t        | ||z   |z
  |      S y# t        $ r Y yw xY w)	zReturn data from the "End of Central Directory" record, or None.

    The data is a list of the nine items in the ZIP "End of central dir"
    record followed by a tenth item, the file seek offset of this record.r   r"   Nr$   s     r   i   )rQ   tellsizeEndCentDirrE   rJ   r6   stringEndArchiverS   r5   structEndArchivelistr7   rq   maxrfind_ECD_COMMENT_SIZE)	r`   filesizerc   rb   maxCommentStartr=   recDatacommentSizecomments	            r   rD   rD     s    	IIaOyy{H
		>/1% 99;DD	^#Qq	%%RS	[ /6F| 	ch/0 TN?F;; (g.?COIIoq!99;DJJ'(EzuU>12w<>)fmm$4g>?./u^+E.,@,LMgo-. T?U#:X#E#% 	% W  s   F= =	G	G	c                    | j                  t        d            }|dk\  r| d| } t        j                  dk7  r2t        j                  | v r | j	                  t        j                  d      } t        j
                  rEt        j
                  dk7  r2t        j
                  | v r | j	                  t        j
                  d      } | S )zzTerminate the file name at the first null byte and
    ensure paths always use forward slashes as the directory separator.r   /)findchrossepreplacealtsep)rN   	null_bytes     r   _sanitize_filenamer   U  s     c!f%IA~Ai( 
vv}8+##BFFC0	yyRYY#%"))x*?##BIIs3Or   c                   T    e Zd ZdZdZddZd ZddZd Zd Z	e
dd	d
d       Zd Zy)r   z>Class with attributes describing each file in the ZIP archive.)orig_filenamerN   	date_timecompress_type_compresslevelr   r9   create_systemri   extract_versionreserved	flag_bitsvolumeinternal_attrexternal_attrheader_offsetCRCcompress_size	file_size	_raw_time_end_offsetc                    || _         t        |      }|| _        || _        |d   dk  rt	        d      t
        | _        d | _        d| _        d| _	        t        j                  dk(  rd| _        nd| _        t        | _        t        | _        d| _        d| _        d| _        d| _        d| _        d| _        d| _        d | _        y )Nr     z+ZIP does not support timestamps before 1980r   win32r#   )r   r   rN   r   
ValueErrorr   r   r   r   r9   sysplatformr   DEFAULT_VERSIONri   r   r   r   r   r   r   r   r   r   )selfrN   r   s      r   __init__zZipInfo.__init__  s    % &h/ "Q<$JKK ("
<<7"!"D "#D-.r   c                    d| j                   j                  d| j                  g}| j                  t        k7  r<|j                  dt        j                  | j                  | j                        z         | j                  dz	  }| j                  dz  }|r'|j                  dt        j                  |      z         |r|j                  d|z         | j                         }|r| j                  r|j                  d| j                  z         |r| j                  rJ| j                  t        k7  s| j                  | j                  k7  r|j                  d	| j                  z         |j                  d
       dj                  |      S )N<z
 filename= compress_type=%sr-   r   z filemode=%rz external_attr=%#xz file_size=%rz compress_size=%r> )	__class__r   rN   r   r   r7   compressor_namesgetr   statfilemodeis_dirr   r   r8   )r   rO   hiloisdirs        r   __repr__zZipInfo.__repr__  s;   '+~~'>'>NO+MM-*..t/A/A/3/A/ACC D 2%&(MM.4==+<<=MM.34MM/DNN:;$,,:-^^t111MM-0B0BBCcwwvr   Nc                    | j                   }|d   dz
  dz  |d   dz  z  |d   z  }|d   dz  |d	   dz  z  |d   dz  z  }| j                  t        z  rdx}x}}n$| j                  }| j                  }| j
                  }| j                  }d}	||t        kD  xs	 |t        kD  }|r>d
}
|t        j                  |
dt        j                  |
      d	z
  ||      z   }d}d}t        }	| j                  t        k(  rt        t        |	      }	n#| j                  t         k(  rt        t"        |	      }	t        |	| j$                        | _        t        |	| j&                        | _        | j)                         \  }}t        j                  t*        t,        | j$                  | j.                  || j                  |||||t1        |      t1        |            }||z   |z   S )zReturn the per-file header as a bytes object.

        When the optional zip64 arg is None rather than a bool, we will
        decide based upon the file_size and compress_size, if known,
        False otherwise.
        r   r   r(   r!   r%   r"   r#   r*   r$   z<HHQQ    )r   r   _MASK_USE_DATA_DESCRIPTORr   r   r   r9   ZIP64_LIMITrS   packcalcsizeZIP64_VERSIONr   r   ry   BZIP2_VERSIONr	   LZMA_VERSIONr   ri   _encodeFilenameFlagsstructFileHeaderstringFileHeaderr   r6   )r   zip64dtdosdatedostimer   r   r   r9   min_versionfmtrN   r   headers                 r   
FileHeaderzZipInfo.FileHeader  s    ^^a54<A%1
2RU:Q%2+1
*beqj9>>55.//C/-)((C ..MI

= +J}{/JECFKK()6??3+?+A9m] ]E"I&M'K*m[9K8+lK8K";0D0DE!+t/B/BC"779)-/?!114==)!//'3*I ]CJ	8
  5((r   c                     	 | j                   j                  d      | j                  fS # t        $ r1 | j                   j                  d      | j                  t        z  fcY S w xY w)Nasciiutf-8)rN   encoder   UnicodeEncodeError_MASK_UTF_FILENAMEr   s    r   r   zZipInfo._encodeFilenameFlags  s[    	V==''0$..@@! 	V==''0$..CU2UUU	Vs   &) 7A#"A#c                    | j                   }t        j                  }t        |      dk\  r2 |d|d d       \  }}|dz   t        |      kD  rt	        d||fz        |dk(  r|d|dz    }	 | j
                  dv rd} |d|d d       \  | _        |dd  }| j                  d	k(  rd
} |d|d d       \  | _        |dd  }| j                  d	k(  rd} |d|d d       \  | _        ne|dk(  r`|d|dz    }	  |d|d d       \  }}	|dk(  rC|	|k(  r>|dd  j                  d      }
|
rt        |
      | _        ndd l}|j                  dd       ||dz   d  }t        |      dk\  r1y y # t        j                  $ r t	        d d      d w xY w# t        j                  $ r}t	        d      |d }~wt        $ r}t	        d      |d }~ww xY w)Nr$   r2   z"Corrupt extra field %04x (size=%d)r!   )l    r   z	File sizez<Qr   r   zCompress sizezHeader offsetzCorrupt zip64 extra field. z not found.iup  z<BLr%   r   r   z'Empty unicode path extra field (0x7075)r"   
stacklevelz)Corrupt unicode path extra field (0x7075)z>Corrupt unicode path extra field (0x7075): invalid utf-8 bytes)r9   rS   r5   r6   r   r   r   r   r   decoder   rN   warningswarnUnicodeDecodeError)r   filename_crcr9   r5   tplnrc   field
up_versionup_name_crcup_unicode_namer   es                r   _decodeExtrazZipInfo._decodeExtra  s   

%jAoE5!9-FB!tc%j  !ER!PQQV|Qr!t}F~~)MM +*0tBQx*@#ABx))[8 /.4T48.D+*#ABx))[8 /.4T48.D+* vQr!t}n.4UD!H.E+J!Q;,+F*.qr(//'*B*,>,ODM+$MM*S`aMb "Q$%LEO %jAo& || F$'B(-wk&; <AEFF || Y$%PQWXX) n$%eflmmns2   *A5E .AF $FGF%%G1F==GTstrict_timestampsc                   t        |t        j                        rt        j                  |      }t        j                  |      }t	        j
                  |j                        }t        j                  |j                        }|dd }|s|d   dk  rd}n|s
|d   dkD  rd}||}t        j                  j                  t        j                  j                  |      d         }|d   t        j                  t        j                  fv r+|dd }|d   t        j                  t        j                  fv r+|r|d	z  } | ||      }|j                  d
z  dz  |_        |rd|_        |xj                  dz  c_        |S |j"                  |_        |S )a_  Construct an appropriate ZipInfo for a file on the filesystem.

        filename should be the path to a file or directory on the filesystem.

        arcname is the name which it will have within the archive (by default,
        this will be the same as filename, but without a drive letter and with
        leading path separators removed).
        r   r&   r   r   r!   r!   r   r   r   ;  )r   r         ;   r   Nr!   r   r   r-   )
isinstancer   PathLikefspathr   S_ISDIRst_modetime	localtimest_mtimepathnormpath
splitdriver   r   r   r   st_size)	clsrN   arcnamer   str   mtimer   zinfos	            r   	from_filezZipInfo.from_file!  sV    h,yy*HWWXRZZ(r{{+!AJ	 Yq\D%8-I"y|d':2I?G''""277#5#5g#>q#ABajRVVRYY//abkG ajRVVRYY//sNGGY'!zzF2r9EO4'  !jjEOr   c                 
   | j                   j                  d      ryt        j                  j                  rM| j                   j                  t        j                  j
                  t        j                  j                  f      S y)z2Return True if this archive member is a directory.r   TF)rN   endswithr   r   r   r   r   s    r   r   zZipInfo.is_dirG  sQ    ==!!#&
 77>>==))277;;*GHHr   )NoNamer   N)r   r   r   r   	__slots__r   r   r   r   r   classmethodr   r   r   r   r   r   r   h  sJ    HI0  J,.)`V+!Z #D # #J
r   r   c                 L    t        d      D ]  }| dz  r	| dz	  dz  } | dz  }  | S )Nr   r!   l    q[ )range)crcrA   s     r   _gen_crcr  Y  s:    1X 7!8z)CAIC	
 Jr   c                     dddt         "t        t        t        t	        d                  a t         fdfd| D ]
  } |        fd}|S )NixV4igE#ixV4   c                 &    |dz	  || z  dz     z  S )z(Compute the CRC32 primitive on one byte.r      r   )chr  crctables     r   crc32z_ZipDecrypter.<locals>.crc32s  s     qHcBh$%6777r   c                 \     |       dz  z   dz  dz  dz   dz   dz	        y )Nr  r   ir!      r   )cr
  key0key1key2s    r   update_keysz"_ZipDecrypter.<locals>.update_keysw  sE    Q~t$
2y 1$
2TRZ&r   c                     t               }|j                  }| D ](  }dz  }|||dz  z  dz	  dz  z  } |        ||       * t        |      S )zDecrypt a bytes object.r"   r!   r   r  )	bytearrayr7   bytes)rc   rO   r7   r  kr  r  s        r   	decrypterz _ZipDecrypter.<locals>.decrypter  sa     	AqA1!9"d**AN1I		
 V}r   )	_crctablerx   mapr  r  )	pwdpr  r
  r	  r  r  r  r  s	      @@@@@@r   _ZipDecrypterr  i  sc    DDD XuSz23	H8'  A	 r   c                   $    e Zd Zd Zd Zd Zd Zy)LZMACompressorc                     d | _         y r   )_compr   s    r   r   zLZMACompressor.__init__  s	    
r   c                 .   t        j                  dt         j                  i      }t        j                  t         j                  t        j
                  t         j                  |      g      | _        t        j                  dddt        |            |z   S )Nidfiltersz<BBHr(   r$   )
lzma_encode_filter_propertiesFILTER_LZMA1r  
FORMAT_RAW_decode_filter_propertiesr  rS   r   r6   )r   propss     r   _initzLZMACompressor._init  sq    ..d6G6G/HI((**4+<+<eDC
 
 {{61aU4u<<r   c                     | j                   ,| j                         | j                   j                  |      z   S | j                   j                  |      S r   )r  r*  compressr   rc   s     r   r,  zLZMACompressor.compress  sA    ::::<$**"5"5d";;;zz""4((r   c                     | j                   +| j                         | j                   j                         z   S | j                   j                         S r   )r  r*  flushr   s    r   r/  zLZMACompressor.flush  s=    ::::<$**"2"2"444zz!!r   N)r   r   r   r   r*  r,  r/  r   r   r   r  r    s    =)
"r   r  c                       e Zd Zd Zd Zy)LZMADecompressorc                 .    d | _         d| _        d| _        y )Nr   F)_decomp_unconsumedeofr   s    r   r   zLZMADecompressor.__init__  s    r   c           
      J   | j                   | xj                  |z  c_        t        | j                        dk  ryt        j                  d| j                  dd       \  }t        | j                        d|z   k  ryt        j                  t
        j                  t        j                  t
        j                  | j                  dd|z          g      | _         | j                  d|z   d  }| `| j                   j                  |      }| j                   j                  | _        |S )Nr$   r   z<Hr"   r"  )r3  r4  r6   rS   r5   r$  r1  r'  r(  r&  
decompressr5  )r   rc   psizerO   s       r   r7  zLZMADecompressor.decompress  s    <<$4##$)]]4)9)9!A)>?FE4##$E	100..t/@/@/3/?/?!e)/LNK DL ##AIJ/D ((.<<##r   N)r   r   r   r   r7  r   r   r   r1  r1    s    
r   r1  storeshrinkreduceimplodetokenizedeflate	deflate64bzip2r$  terse   lz77a   wavpackb   ppmdc                     | t         k(  ry | t        k(  rt        st        d      y | t        k(  rt
        st        d      y | t        k(  rt        st        d      y t        d      )Nz.Compression requires the (missing) zlib modulez-Compression requires the (missing) bz2 modulez.Compression requires the (missing) lzma modulez(That compression method is not supported)	r   r   zlibRuntimeErrorr   bz2r	   r$  NotImplementedError)compressions    r   _check_compressionrN    s    j 		$@B B  
		!?A A  
	 @B B  ""LMMr   c                 X   | t         k(  rZ|%t        j                  |t        j                  d      S t        j                  t        j                  t        j                  d      S | t
        k(  r+|t        j                  |      S t        j                         S | t        k(  r
t               S y )N)
r   rI  compressobjDEFLATEDZ_DEFAULT_COMPRESSIONr   rK  BZ2Compressorr	   r  )r   compresslevels     r   _get_compressorrV    s    $$##M4==#FF : :DMM3OO	)	#$$$]33  ""	(	"r   c                 4   t        |        | t        k(  ry | t        k(  rt        j                  d      S | t
        k(  rt        j                         S | t        k(  r
t               S t        j                  |       }|rt        d| |fz        t        d| fz        )NrP  zcompression type %d (%s)zcompression type %d)rN  r   r   rI  decompressobjr   rK  BZ2Decompressorr	   r1  r   r   rL  )r   descrs     r   _get_decompressorr[    s    }%
"	,	&!!#&&	)	#""$$	(	"!! $$]3%&@MSXCY&YZZ%&;}>N&NOOr   c                   .    e Zd Zd Zd ZddZddZd Zy)	_SharedFilec                 l    || _         || _        || _        || _        || _        |j
                  | _        y r   )_file_pos_close_lock_writingseekable)r   fileposcloselockwritings         r   r   z_SharedFile.__init__  s0    
	
r   c                     | j                   S r   )r`  r   s    r   rt   z_SharedFile.tell  s    yyr   c                 
   | j                   5  | j                         rt        d      | j                  j	                  ||       | j                  j                         | _        | j                  cd d d        S # 1 sw Y   y xY w)Nz}Can't reposition in the ZIP file while there is an open writing handle on it. Close the writing handle before trying to read.)rb  rc  r   r_  rQ   rt   r`  )r   ra   whences      r   rQ   z_SharedFile.seek  si    ZZ 	}}  "J K K JJOOFF+

)DI99	 	 	s   A"A99Bc                 >   | j                   5  | j                         rt        d      | j                  j	                  | j
                         | j                  j                  |      }| j                  j                         | _        |cd d d        S # 1 sw Y   y xY w)NyCan't read from the ZIP file while there is an open writing handle on it. Close the writing handle before trying to read.)rb  rc  r   r_  rQ   r`  rJ   rt   r   nrc   s      r   rJ   z_SharedFile.read!  sy    ZZ 	}}  "J K K JJOODII&::??1%D

)DI	 	 	s   A<BBc                 f    | j                   %| j                   }d | _         | j                  |       y y r   )r_  ra  )r   fileobjs     r   rg  z_SharedFile.close,  s-    ::!jjGDJKK  "r   N)r   )r   r   r   r   rt   rQ   rJ   rg  r   r   r   r]  r]    s    &	!r   r]  c                   *    e Zd Zd Zd Zd Zd Zd Zy)	_Tellablec                      || _         d| _        y Nr   )rG   ra   r   rG   s     r   r   z_Tellable.__init__4  s    r   c                 f    | j                   j                  |      }| xj                  |z  c_        |S r   )rG   writera   )r   rc   rp  s      r   r{  z_Tellable.write8  s'    GGMM$qr   c                     | j                   S r   )ra   r   s    r   rt   z_Tellable.tell=  s    {{r   c                 8    | j                   j                          y r   )rG   r/  r   s    r   r/  z_Tellable.flush@      r   c                 8    | j                   j                          y r   )rG   rg  r   s    r   rg  z_Tellable.closeC  r~  r   N)r   r   r   r   r{  rt   r/  rg  r   r   r   rv  rv  3  s    
r   rv  c                        e Zd ZdZdZdZdZ	 	 ddZd Zd Z	ddZ
dd	Zd
 ZddZd Zd Zd Zd Z fdZd Zej*                  fdZd Z xZS )
ZipExtFilezZFile-like object for reading an archive member.
       Is returned by ZipFile.open().
    i   @i   i   c                    || _         || _        || _        |j                  | _        |j
                  | _        |j                  | _        t        | j                        | _
        d| _        d| _        d| _        d | _        || _        |j                   | _        t%        |d      r"|j&                  | _        t+        d      | _        nd | _        d| _        	 |j1                         r`|j3                         | _        |j
                  | _        |j                  | _        | j,                  | _        | j(                  | _        d| _        d | _         |rf|jB                  tD        z  r|jF                  dz	  dz  }n|j&                  dz	  dz  }| jI                         }||k7  rtK        d	|jL                  z        y y # t>        $ r Y {w xY w)
NFr   r   r   Tr   r  r  zBad password for file %r)'_fileobj_pwd_close_fileobjr   _compress_typer   _compress_leftr   _leftr[  _decompressor_eof_readbuffer_offsetnewlinesmoderN   namerL   r   _expected_crcr
  _running_crc	_seekablerd  rt   _orig_compress_start_orig_compress_size_orig_file_size_orig_start_crc	_orig_crcAttributeError
_decrypterr   r   r   _init_decrypterrJ  r   )r   rr  r  zipinfor  close_fileobj
check_bytehs           r   r   zZipExtFile.__init__U  s   	+%33%33&&
.t/B/BC		$$	7E"!(D %c
D!%D		!,3LLN)+2+@+@('.'8'8$'+'8'8$!%!3!3!%   #<<%//14<
 &kkR/47
$$&AJ"#=@U@U#UVV  	  		s   A0F4 4	G ?G c                     t        | j                        | _        | j                  j	                  d      }| xj
                  dz  c_        | j                  |      d   S )Nr   r*   )r  r  r  r  rJ   r  )r   r   s     r   r  zZipExtFile._init_decrypter  sM    '		2 ##B'r!v&r**r   c                    d| j                   j                  d| j                   j                  g}| j                  s{|j	                  d| j
                  d| j                         | j                  t        k7  rN|j	                  dt        j                  | j                  | j                        z         n|j	                  d       |j	                  d       dj                  |      S )	Nr   .z name=z mode=r   	 [closed]r   r   )r   r   r   closedr7   r  r  r  r   r   r   r8   r   rO   s     r   r   zZipExtFile.__repr__  s    "nn77"nn99; <{{MM		499EF""j01.2243F3F373F3FHH I MM+&cwwvr   c                     |dk  rP| j                   j                  d| j                        dz   }|dkD  r"| j                   | j                  | }|| _        |S t        j                  j                  | |      S )zrRead and return a line from the stream.

        If limit is specified, at most limit bytes will be read.
        r      
r!   )r  r   r  ioBufferedIOBasereadline)r   limitr>   lines       r   r  zZipExtFile.readline  sn     19  %%eT\\:Q>A1u''a8   ))$66r   c                 x   |t        | j                        | j                  z
  kD  rp| j                  |      }t        |      | j                  kD  r)|| j                  | j                  d z   | _        d| _        n| xj                  t        |      z  c_        | j                  | j                  | j                  dz    S )z6Returns buffered bytes without advancing the position.Nr   i   )r6   r  r  rJ   )r   rp  chunks      r   peekzZipExtFile.peek  s    s4##$t||33IIaLE5zDLL(#(4+;+;DLLM+J#J  E
* dllS.@AAr   c                 2    | j                   rt        d      y)NI/O operation on closed file.T)r  r   r   s    r   readablezZipExtFile.readable  s    ;;<==r   c                    | j                   rt        d      ||dk  r`| j                  | j                  d }d| _        d| _        | j                  s+|| j                  | j                        z  }| j                  s+|S || j                  z   }|t        | j                        k  r"| j                  | j                  | }|| _        |S |t        | j                        z
  }| j                  | j                  d }d| _        d| _        |dkD  ri| j                  s]| j                  |      }|t        |      k  r|| _        || _        ||d| z  }	 |S ||z  }|t        |      z  }|dkD  r| j                  s]|S )zRead and return up to n bytes.
        If the argument is omitted, None, or negative, data is read and returned until EOF is reached.
        zread from closed file.Nr   r   )r  r   r  r  r  _read1MAX_Nr6   )r   rp  bufendrc   s        r   rJ   zZipExtFile.read  sk    ;;5669A""4<<=1C"DDLiit{{4::.. iiJ$,,T%%&&""4<<4CDLJ#d&&''t||}-!eDII;;q>D3t9}#'  tBQx 
 4KCTNA !eDII 
r   c                     | j                   y t        || j                        | _        | j                  r2| j                  | j                   k7  rt	        d| j
                  z        y y )NzBad CRC-32 for file %r)r  r
  r  r  r   r  )r   newdatas     r   _update_crczZipExtFile._update_crc  s]    %!'4+<+<=99**d.@.@@5		ABB A9r   c                    ||dk  rg| j                   | j                  d }d| _         d| _        | j                  s2| j                  | j                        }|r||z  }	 |S | j                  s2|S || j                  z   }|t        | j                         k  r"| j                   | j                  | }|| _        |S |t        | j                         z
  }| j                   | j                  d }d| _         d| _        |dkD  r[| j                  sO| j                  |      }|t        |      k  r|| _         || _        ||d| z  }	 |S |r||z  }	 |S | j                  sO|S )z7Read up to n bytes with at most one read() system call.Nr   r   )r  r  r  r  r  r6   )r   rp  r  rc   r  s        r   read1zZipExtFile.read1  sb    9A""4<<=1C"DDLii{{4::.4KCJ ii
 J$,,T%%&&""4<<4CDLJ#d&&''t||}-q5ii{{1~s4y='+D$#$DL48OC 
 4KC
 ii 
r   c                    | j                   s|dk  ry| j                  t        k(  rE| j                  j                  }|t        |      kD  r2|| j                  |t        |      z
        z  }n| j                  |      }| j                  t        k(  r| j                  dk  | _         n| j                  t        k(  rt        || j                        }| j                  j                  ||      }| j                  j                  xs( | j                  dk  xr | j                  j                   | _         | j                   re|| j                  j                         z  }nG| j                  j                  |      }| j                  j                  xs | j                  dk  | _         |d | j                   }| xj                  t        |      z  c_        | j                  dk  rd| _         | j                  |       |S )Nr   r   T)r  r  r   r  unconsumed_tailr6   _read2r   r  ry   MIN_READ_SIZEr7  r5  r/  r  r  ro  s      r   r  zZipExtFile._read1  s    99Q ,.%%55D3t9}AD	M22;;q>D*,++q0DI  L0At))*A%%00q9D++// @,,1 @!//??? I yy**0022%%006D**..J$2E2E2JDIKTZZ 

c$i
::?DIr   c                 :   | j                   dk  ryt        || j                        }t        || j                         }| j                  j                  |      }| xj                   t        |      z  c_         |st        | j                  | j                  |      }|S )Nr   r   )	r  ry   r  minr  rJ   r6   EOFErrorr  ro  s      r   r  zZipExtFile._read2:  s    !#4%%&4&&'}}!!!$s4y(N??&??4(Dr   c                     	 | j                   r| j                  j                          t        | 	          y # t        | 	          w xY wr   )r  r  rg  super)r   r   s    r   rg  zZipExtFile.closeJ  s4    	""##%GMOEGMOs	   &8 Ac                 H    | j                   rt        d      | j                  S Nr  )r  r   r  r   s    r   rd  zZipExtFile.seekableQ  s    ;;<==~~r   c                 L   | j                   rt        d      | j                  st        j                  d      | j                         }|t        j                  k(  r|}nG|t        j                  k(  r||z   }n.|t        j                  k(  r| j                  |z   }nt        d      || j                  kD  r| j                  }|dk  rd}||z
  }|| j                  z   }|dk\  r#|t        | j                        k  r|| _        d}n[| j                  t        k(  r| j                   |dkD  r|d | _        |t        | j                        | j                  z
  z  }| j$                  j'                  |t        j                         | xj(                  |z  c_        d}d| _        d| _        n|dk  r| j$                  j'                  | j*                         | j,                  | _        | j0                  | _        | j2                  | _        | j                  | _        d| _        d| _        t7        | j                        | _        d| _        |}| j                   | j=                          |dkD  r2t?        | j@                  |      }| jC                  |       ||z  }|dkD  r2| j                         S )Nzseek on closed file.!underlying stream is not seekablezCwhence must be os.SEEK_SET (0), os.SEEK_CUR (1), or os.SEEK_END (2)r   r   F)"r  r   r  r  UnsupportedOperationrt   r   SEEK_SETSEEK_CURSEEK_ENDr  r  r6   r  r  r   r  r  r  rQ   r  r  r  r  r  r  r  r[  r  r  r  r  MAX_SEEK_READrJ   )r   ra   rl  curr_posnew_posread_offsetbuff_offsetread_lens           r   rQ   zZipExtFile.seekV  sR   ;;344~~))*MNN99;R[[ Gr{{"'Gr{{"**V3G C D D T)))**GQ;G(!DLL0!c$2B2B.C C&DLK  J.4??3J{]^!%D3t//04<<??KMM{BKK8JJ+%JK"DDL1_MMt889 $ 4 4D!%D"&":":D--DJ"DDL!243F3F!GDDI!K*$$&Ao4--{;HIIh8#K Ao
 yy{r   c                     | j                   rt        d      | j                  st        j                  d      | j
                  | j                  z
  t        | j                        z
  | j                  z   }|S )Nztell on closed file.r  )
r  r   r  r  r  r  r  r6   r  r  )r   fileposs     r   rt   zZipExtFile.tell  s`    ;;344~~))*MNN&&3c$:J:J6KKdllZr   )NFrs  r!   )r   r   r   r   r  r  r  r   r  r   r  r  r  rJ   r  r  r  r  rg  rd  r   r  rQ   rt   __classcell__r   s   @r   r  r  G  s    
 E M M37$1Wh	+7 B
!FC#J"H 
 #%++ =~r   r  c                   @     e Zd Zd Zed        Zd Zd Z fdZ xZ	S )_ZipWriteFilec                     || _         || _        || _        t        |j                  |j
                        | _        d| _        d| _        d| _	        y rx  )
_zinfo_zip64_zipfilerV  r   r   _compressor
_file_size_compress_size_crc)r   zfr   r   s       r   r   z_ZipWriteFile.__init__  sL    *5+>+>+0+?+?A	r   c                 .    | j                   j                  S r   )r  rG   r   s    r   r  z_ZipWriteFile._fileobj  s    }}r   c                      y)NTr   r   s    r   writablez_ZipWriteFile.writable  s    r   c                    | j                   rt        d      t        |t        t        f      rt        |      }nt        |      }|j                  }| xj                  |z  c_        t        || j                        | _
        | j                  r9| j                  j                  |      }| xj                  t        |      z  c_        | j                  j                  |       |S r  )r  r   r   r  r  r6   
memoryviewnbytesr  r
  r  r  r,  r  r  r{  )r   rc   r  s      r   r{  z_ZipWriteFile.write  s    ;;<== dUI./YFd#D[[F6!$		*	##,,T2D3t9,D!r   c           	         | j                   ry 	 t        | 	          | j                  ro| j                  j	                         }| xj
                  t        |      z  c_        | j                  j                  |       | j
                  | j                  _
        n| j                  | j                  _
        | j                  | j                  _        | j                  | j                  _        | j                  s<| j                  t         kD  rt#        d      | j
                  t         kD  rt#        d      | j                  j$                  t&        z  r| j                  rdnd}| j                  j                  t)        j*                  |t,        | j                  j                  | j                  j                  | j                  j                               | j                  j/                         | j0                  _        n| j                  j/                         | j0                  _        | j                  j5                  | j                  j6                         | j                  j                  | j                  j9                  | j                               | j                  j5                  | j0                  j2                         | j0                  j:                  j=                  | j                         | j                  | j0                  j>                  | j                  j@                  <   d| j0                  _!        y # d| j0                  _!        w xY w)Nz*File size too large, try using force_zip64z0Compressed size too large, try using force_zip64z<LLQQz<LLLLF)"r  r  rg  r  r/  r  r6   r  r{  r  r   r  r  r   r   r  r   rJ  r   r   rS   r   _DD_SIGNATURErt   r  	start_dirrQ   r   r   filelistr7   
NameToInforN   rc  )r   r  r   r   s      r   rg  z_ZipWriteFile.close  s+   ;;(	+GMO&&,,.##s3x/###C(,0,?,?),0OO)"iiDKKO$(OODKK!;;??[0&'STT&&4&'YZZ {{$$'@@!%g'##FKK]DKKOOKK--t{{/D/D%F G*.--*<*<*>' +/--*<*<*>'""4;;#<#<=##DKK$:$:4;;$GH""4==#:#:; MM""))$++6=A[[DMM$$T[[%9%9:%*DMM"UDMM"s   LL8 8M)
r   r   r   r   propertyr  r  r{  rg  r  r  s   @r   r  r    s0        &++ ++r   r  c                   "   e Zd ZdZdZdZdeddfddddZd Zd Z	d	 Z
d
 Zd Zd Zd$dZd Zd Zd Zed        Zej(                  d        Zd$dZd%dddZd&dZd'dZd(dZed        Zd Zd Z	 	 d(dZ	 d'dZd)dZ d  Z!d! Z"d" Z#d# Z$y)*r   ai   Class with methods to open, read, write, close, list zip files.

    z = ZipFile(file, mode="r", compression=ZIP_STORED, allowZip64=True,
                compresslevel=None)

    file: Either the path to the file, or a file-like object.
          If it is a path, the file will be opened and closed by ZipFile.
    mode: The mode can be either read 'r', write 'w', exclusive create 'x',
          or append 'a'.
    compression: ZIP_STORED (no compression), ZIP_DEFLATED (requires zlib),
                 ZIP_BZIP2 (requires bz2) or ZIP_LZMA (requires lzma).
    allowZip64: if True ZipFile will create files with ZIP64 extensions when
                needed, otherwise it will raise an exception when this would
                be necessary.
    compresslevel: None (default for the given compression type) or an integer
                   specifying the level to pass to the compressor.
                   When using ZIP_STORED or ZIP_LZMA this keyword has no effect.
                   When using ZIP_DEFLATED integers 0 through 9 are accepted.
                   When using ZIP_BZIP2 integers 1 through 9 are accepted.

    NrT)r   metadata_encodingc                   |dvrt        d      t        |       || _        d| _        d| _        i | _        g | _        || _        || _        || _	        d| _
        d| _        || _        || _        | j                  r|dk7  rt        d      t        |t        j                         rt        j"                  |      }t        |t$              r;d| _        || _        d	d
ddd
ddd}||   }		 	 t+        j,                  ||	      | _        n d| _        || _        t3        |dd      | _        d| _        t7        j8                         | _        d| _        d| _        	 |dk(  r| jA                          y|dv rNd| _        	 | j.                  jC                         | _"        	 | j.                  jG                  | jD                         y|dk(  r7	 | jA                          | j.                  jG                  | jD                         yt        d      # t0        $ r |	|v r||	   }	Y 1 w xY w# tH        t0        f$ r
 d| _        Y yw xY w# tH        t0        f$ r+ tK        | j.                        | _        d| _"        d| _        Y yw xY w# tL        $ rE | j.                  jG                  dd       d| _        | j.                  jC                         | _"        Y yw xY w#  | j.                  }
d| _        | jO                  |
        xY w)z]Open the ZIP file with mode read 'r', write 'w', exclusive create 'x',
        or append 'a'.)r  wxaz+ZipFile requires mode 'r', 'w', 'x', or 'a'Fr   Nr   r  z5metadata_encoding is only supported for reading filesrK   w+bx+br+bwbxb)r  r  r  r  r  r  r  Tr!   r  )r  r  r  r"   z"Mode must be 'r', 'w', 'x', or 'a')(r   rN  _allowZip64
_didModifydebugr  r  rM  rU  r  r  _comment_strict_timestampsr  r   r   r   r   str_filePassedrN   r  rM   rG   rE   getattr_fileRefCnt	threadingRLockrb  r  rc  _RealGetContentsrt   r  rQ   r  rv  r   _fpclose)r   re  r  rM  
allowZip64rU  r   r  modeDictr   rG   s              r   r   zZipFile.__init__  s    ++JKK;'%
&*	"3!2 !!dckGI I dBKK(99T?DdC  D DM"U%$T$@H~H ggdH5DG  DDG#D&$7DM__&
'	s{%%'# #'/%)WW\\^DN/T^^4 4))+GGLL0 !!EFFc  8+#+H#5 	@ +G4 /)./ '0 +'0DG%&DN%*DN+  " 4GGLLA& '+DO%)WW\\^DN4	BDGMM"s   )H K *K 6H9 %H <K 5I6 8K HHH63K 5H66K 97I30K 2I33K 6AKK KK 'K.c                     | S r   r   r   s    r   	__enter__zZipFile.__enter__l  s    r   c                 $    | j                          y r   rg  )r   typevalue	tracebacks       r   __exit__zZipFile.__exit__o  s    

r   c                    d| j                   j                  d| j                   j                  g}| j                  t| j                  r|j                  d| j                  z         n*| j                  |j                  d| j                  z         |j                  d| j                  z         n|j                  d       |j                  d       dj                  |      S )	Nr   r  z file=%rz filename=%rz mode=%rr  r   r   )	r   r   r   rG   r  r7   rN   r  r8   r  s     r   r   zZipFile.__repr__r  s    "nn77"nn99; <77j47723*nt}}<=MM*tyy01MM+&cwwvr   c                    | j                   }	 t        |      }|st        d      | j                  dkD  rt        |       |t           }|t           }|t           | _	        |t           |z
  |z
  }|t           t        k(  r|t        t        z   z  }| j                  dkD  r||z   }t        d|||       ||z   | _        | j                  dk  rt        d      |j!                  | j                  d       |j#                  |      }t%        j&                  |      }d}||k  r|j#                  t(              }	t+        |	      t(        k7  rt        d      t-        j.                  t0        |	      }	|	t2           t4        k7  rt        d      | j                  dkD  rt        |	       |j#                  |	t6                 }
t9        |
      }|	t:           }|t<        z  r|
j?                  d	      }
n|
j?                  | j@                  xs d
      }
tC        |
      }|j#                  |	tD                 |_#        |j#                  |	tH                 |_%        |	tL           |_'        |	dd \  |_(        |_)        |_*        |_+        |_,        |_-        }}|_.        |_/        |_0        |jT                  tb        kD  rte        d|jT                  dz  z        |	dd \  |_3        |_4        |_5        ||_6        |dz	  dz   |dz	  dz  |dz  |dz	  |dz	  dz  |dz  dz  f|_7        |jq                  |       |jN                  |z   |_'        | jr                  ju                  |       || jv                  |jx                  <   |t(        z   |	t6           z   |	tD           z   |	tH           z   }| j                  dkD  rt        d|       ||k  r| j                  }t{        | jr                  d d      D ]  }||_>        |jN                  } y# t        $ r t        d      w xY w)z/Read in the table of contents for the ZIP file.zFile is not a zip filer!   r"   zgiven, inferred, offsetr   z Bad offset for central directoryzTruncated central directoryz&Bad magic number for central directoryr   cp437r   zzip file version %.1fr)   r,   r/   r(   r   r%   r   r*   r    totalc                     | j                   S r   )r   )r   s    r   <lambda>z*ZipFile._RealGetContents.<locals>.<lambda>  s    e.A.A r   T)keyreverseN)?rG   rD   rE   r   r  printr^   r_   _ECD_COMMENTr  _ECD_LOCATIONrY   rX   rV   rR   r  rQ   rJ   r  BytesIOsizeCentralDirr6   rS   r5   structCentralDir_CD_SIGNATUREstringCentralDir_CD_FILENAME_LENGTHr
  _CD_FLAG_BITSr   r   r  r   _CD_EXTRA_FIELD_LENGTHr9   _CD_COMMENT_LENGTHr   _CD_LOCAL_HEADER_OFFSETr   ri   r   r   r   r   r   r   r   r   MAX_EXTRACT_VERSIONrL  r   r   r   r   r   r   r  r7   r  rN   sortedr   )r   rG   rb   size_cd	offset_cdconcatinferredrc   r  centdirrN   orig_filename_crcflagsr  td
end_offsetr   s                     r   r  zZipFile._RealGetContents  s   WW	7 _F 566::>&M#;'	|, &09<.!%77'*AABF::>	)H+Y&I"V+>>A?@@
"wwwZZgoggn-G7|~- !>??mm$4g>G}%)99 !IJJzzA~gwww':;<H %hM*E))#??73 $??4+A+A+LWM!Aggg&<=>AG(: ;<AI%&=>AO 5<AbM2Qq0A1:[!/1aUAOQ[  #66)*A+,+<+<r+A+C D D9@B6AHaoqAKT4K!Q$QtVrEAqD$;41?AKNN,-oo6AOMM  #*+DOOAJJ' ^+g6I.JJ567123E zzA~gu%[ go^ ^^
DMM A$(* 	-E !+E,,J		-W  	7566	7s   O/ /Pc                 T    | j                   D cg c]  }|j                   c}S c c}w )z+Return a list of file names in the archive.)r  rN   r-  s     r   namelistzZipFile.namelist  s    *.--8$888s   %c                     | j                   S )zJReturn a list of class ZipInfo instances for files in the
        archive.)r  r   s    r   infolistzZipFile.infolist       }}r   c                     t        ddz  |       | j                  D ];  }d|j                  dd z  }t        d|j                  ||j                  fz  |       = y)z+Print a table of contents for the zip file.z%-46s %19s %12s)z	File NamezModified    Sizere  z%d-%02d-%02d %02d:%02d:%02dNr&   z%-46s %s %12d)r  r  r   rN   r   )r   re  r   dates       r   printdirzZipFile.printdir  s_    "GG	]] 	E05??2A3FFD/U^^T5??$KK	r   c                    d}| j                   D ]L  }	 | j                  |j                  d      5 }|j                  |      r	 |j                  |      rddd       N y# 1 sw Y   xY w# t        $ r |j                  cY c S w xY w)zRead all the files and check the CRC.

        Return None if all files could be read successfully, or the name
        of the offending file otherwise.i   r  N)r  rM   rN   rJ   r   )r   
chunk_sizer   fs       r   testzipzZipFile.testzip  s    
 
]] 	&E& YYu~~s3 q&&, &&,		&   &~~%&s(   A+$AA+A(	$A++BBc                 \    | j                   j                  |      }|t        d|z        |S )z,Return the instance of ZipInfo given 'name'.z(There is no item named %r in the archive)r  r   KeyError)r   r  infos      r   getinfozZipFile.getinfo  s9    ""4(<:TAC C r   c                     |r1t        |t              s!t        dt        |      j                  z        |r|| _        yd| _        y)z)Set default password for encrypted files.pwd: expected bytes, got %sN)r   r  	TypeErrorr  r   r  )r   r  s     r   setpasswordzZipFile.setpassword  s:    z#u-9DI<N<NNOODHDHr   c                     | j                   S )z.The comment text associated with the ZIP file.)r  r   s    r   r   zZipFile.comment
  r7  r   c                     t        |t              s!t        dt        |      j                  z        t        |      t        kD  r'dd l}|j                  dt        z  d       |d t         }|| _	        d| _
        y )Nzcomment: expected bytes, got %sr   z3Archive comment is too long; truncating to %d bytesr"   r   T)r   r  rG  r  r   r6   ZIP_MAX_COMMENTr   r   r  r  )r   r   r   s      r   r   zZipFile.comment  sp    '5)=W@V@VVWWw</)MMO+,89  ;./Gr   c                 t    | j                  |d|      5 }|j                         cddd       S # 1 sw Y   yxY w)zUReturn file bytes for name. 'pwd' is the password to decrypt
        encrypted files.r  N)rM   rJ   )r   r  r  rG   s       r   rJ   zZipFile.read  s4     YYtS#& 	"779	 	 	s   .7Fforce_zip64c                l    |dvrt        d      |r|dk(  rt        d       j                  st        d      t        |t              r|}nD|dk(  r.t        |      } j                  |_         j                  |_        n j                  |      }|dk(  r j                  ||      S  j                  rt        d       xj                  dz  c_        t         j                  |j                   j                   j                   fd	      }	 |j!                  t"              }t%        |      t"        k7  rt'        d
      t)        j*                  t,        |      }|t.           t0        k7  rt'        d      |j!                  |t2                 }|t4           r|j7                  |t4           d       |j8                  t:        z  rt=        d      |j8                  t>        z  rt=        d      |t@           tB        z  r|jE                  d      }	n|jE                   jF                  xs d      }	|	|jH                  k7  rt'        d|jH                  d|d      |jJ                  C|jM                         |jN                  z   |jJ                  kD  rt'        d|jH                  d      |j8                  tP        z  }
|
rQ|s jR                  }|r1t        |tT              s!tW        dtY        |      jZ                  z        |st]        d|z        d}t_        ||||d      S #  |ja                           xY w)au  Return file-like object for 'name'.

        name is a string for the file name within the ZIP file, or a ZipInfo
        object.

        mode should be 'r' to read a file already in the ZIP file, or 'w' to
        write to a file newly added to the archive.

        pwd is the password to decrypt files (only used for reading).

        When writing, if the file size is not known in advance but may exceed
        2 GiB, pass force_zip64 to use the ZIP64 format, which can handle large
        files.  If the size is known in advance, it is best to pass a ZipInfo
        instance for name, with zinfo.file_size set.
        >   r  r  zopen() requires mode "r" or "w"r  z'pwd is only supported for reading filesz2Attempt to use ZIP archive that was already closedrM  rn  r!   c                       j                   S r   )rc  r   s   r   r  zZipFile.open.<locals>.<lambda>Q  s    $-- r   zTruncated file headerz Bad magic number for file header)rl  z$compressed patched data (flag bit 5)zstrong encryption (flag bit 6)r   r  zFile name in directory z and header z differ.NzOverlapped entries: z (possible zip bomb)rF  z6File %r is encrypted, password required for extractionT)1r   rG   r   r   rM  r   rU  r   rD  _open_to_writerc  r  r]  r   r  rb  rJ   sizeFileHeaderr6   r   rS   r5   r   _FH_SIGNATUREr   _FH_FILENAME_LENGTH_FH_EXTRA_FIELD_LENGTHrQ   r   _MASK_COMPRESSED_PATCHrL  _MASK_STRONG_ENCRYPTION_FH_GENERAL_PURPOSE_FLAG_BITSr   r   r  r   r   rt   r   _MASK_ENCRYPTEDr  r  rG  r  r   rJ  r  rg  )r   r  r  r  rN  r   zef_filefheaderfname	fname_stris_encrypteds   `          r   rM   zZipFile.open"  s     z!>??DCKFGGwwDF F dG$ES[DME"&"2"2E#'#5#5E  LL&E3;&&u+&FF== F G G
 	Atww(;(;#}}djj:OQ4	mmN3G7|~- !899mm$4g>G}%)99 !CDDMM'*=">?E-.g&<=aH!77)*PQQ!88)*JKK458JJ!LL1	!LL)?)?)J7K	E/// **E34 4 !!-%"5"558I8II #78K8K7NNb!cdd !??_<L((Cz#u5#$ADIDVDV$VWW& (ACG(H I I heS$??	NNs   HL   L3c                    |r| j                   st        d      | j                  rt        d      d|_        d|_        d|_        |j                  t        k(  r|xj
                  t        z  c_        | j                  s|xj
                  t        z  c_        |j                  sd|_        |xs |j                  dz  t        kD  }| j                   s|rt        d      | j                  r%| j                  j!                  | j"                         | j                  j%                         |_        | j)                  |       d| _        | j                  j-                  |j/                  |             d| _        t1        | ||      S )NzHforce_zip64 is True, but allowZip64 was False when opening the ZIP file.zzCan't write to the ZIP file while there is another write handle open on it. Close the first handle before opening another.r     g?z'Filesize would require ZIP64 extensionsT)r  r   rc  r   r   r   r   r	   _MASK_COMPRESS_OPTION_1r  r   r   r   r   r   rG   rQ   r  rt   r   _writecheckr  r{  r   r  )r   r   rN  r   s       r   rQ  zZipFile._open_to_write  s=   t//   == N O O
  	(*OO66O~~OO88O"""-E E$ 6 DEHII>>GGLL("ggllne&&u-.T5%00r   c                     |t        j                         }nt        j                  |      }| j                  |||      S )al  Extract a member from the archive to the current working directory,
           using its full name. Its file information is extracted as accurately
           as possible. `member' may be a filename or a ZipInfo object. You can
           specify a different directory using `path'. You can specify the
           password to decrypt the file using 'pwd'.
        )r   getcwdr   _extract_member)r   memberr   r  s       r   extractzZipFile.extract  s6     <99;D99T?D##FD#66r   c                     || j                         }|t        j                         }nt        j                  |      }|D ]  }| j	                  |||        y)a?  Extract all members from the archive to the current working
           directory. `path' specifies a different directory to extract to.
           `members' is optional and must be a subset of the list returned
           by namelist(). You can specify the password to decrypt all files
           using 'pwd'.
        N)r4  r   rd  r   re  )r   r   membersr  r  s        r   
extractallzZipFile.extractall  sR     ?mmoG<99;D99T?D 	5G  $4	5r   c                     | j                   }|s+d}t        j                  |dt        |      z        }|| _         |j	                  |      }d |j                  |      D        }|j                  d |D              }|S )z;Replace bad characters and remove trailing dots from parts.z:<>|"?*_c              3   >   K   | ]  }|j                  d         yw)z .N)rstrip.0r  s     r   	<genexpr>z1ZipFile._sanitize_windows_name.<locals>.<genexpr>  s     Ba188D>Bs   c              3   &   K   | ]	  }|s|  y wr   r   ro  s     r   rq  z1ZipFile._sanitize_windows_name.<locals>.<genexpr>  s     7QQq7s   )!_windows_illegal_name_trans_tabler   	maketransr6   	translatesplitr8   )r   r   pathseptableillegals        r   _sanitize_windows_namezZipFile._sanitize_windows_name  st     55GMM'3W+=>E49C1##E*B7==+AB,,7'77r   c                    t        |t              s| j                  |      }|j                  j	                  dt
        j                  j                        }t
        j                  j                  rB|j	                  t
        j                  j                  t
        j                  j                        }t
        j                  j                  |      d   }dt
        j                  j                  t
        j                  j                  ft
        j                  j                  j                  fd|j                  t
        j                  j                        D              }t
        j                  j                  dk(  r*| j                  |t
        j                  j                        }|s|j                         st!        d      t
        j                  j                  ||      }t
        j                  j#                  |      }t
        j                  j%                  |      }|r4t
        j                  j'                  |      st        j(                  |       |j                         r6t
        j                  j+                  |      st        j,                  |       |S | j/                  ||      5 }t/        |d      5 }t1        j2                  ||       d	d	d	       d	d	d	       |S # 1 sw Y   xY w# 1 sw Y   |S xY w)
zbExtract the ZipInfo object 'member' to a physical
           file on the path targetpath.
        r   r!   r   c              3   *   K   | ]
  }|vr|  y wr   r   )rp  r  invalid_path_partss     r   rq  z*ZipFile._extract_member.<locals>.<genexpr>  s#      #C&'/A&A $% #Cs   \zEmpty filename.)r  r  N)r   r   rD  rN   r   r   r   r   r   r   curdirpardirr8   rv  rz  r   r   r   dirnameexistsmakedirsr   mkdirrM   shutilcopyfileobj)	r   rf  
targetpathr  r   	upperdirssourcetargetr}  s	           @r   re  zZipFile._extract_member  s    &'*\\&)F //))#rww{{;77>>oobggnnbggkkBG ''$$W-a0 "''.."''..A''++"" #CgmmBGGKK.H #C C77;;$11'277;;GGv}}.//WW\\*g6
WW%%j1
 GGOOJ/	RWW^^I6KK	"==?77==,$YYv3Y' 	/6*d#	/'-vv.	/ 	/ 		/ 	/ 	/ s$   4K6K*K6*K3	/K66L c                    |j                   | j                  v r$ddl}|j                  d|j                   z  d       | j                  dvrt        d      | j                  st        d      t        |j                         | j                  s]d}t        | j                        t        k\  rd	}n+|j                  t        kD  rd
}n|j                  t        kD  rd}|rt!        |dz         yy)z6Check for errors before writing a file to the archive.r   NzDuplicate name: %rr#   r   r  r  r  z&write() requires mode 'w', 'x', or 'a'z4Attempt to write ZIP archive that was already closedFiles countFilesizezZipfile size would require ZIP64 extensions)rN   r  r   r   r  r   rG   rN  r   r  r6   r  ZIP_FILECOUNT_LIMITr   r   r   r   )r   r   r   requires_zip64s       r   rb  zZipFile._writecheck  s    >>T__,MM.?AMN99O+EFFwwFH H5../!N4==!%88!.;.!+$${2!/">#D$E F F   r   c                 .   | j                   st        d      | j                  rt        d      t        j	                  ||| j
                        }|j                         r d|_        d|_        | j                  |       y|||_
        n| j                  |_
        |||_        n| j                  |_        t        |d      5 }| j                  |d      5 }t        j                   ||d       ddd       ddd       y# 1 sw Y   xY w# 1 sw Y   yxY w)	zLPut the bytes from filename into the archive under the name
        arcname.7Attempt to write to ZIP archive that was already closedz>Can't write to ZIP archive while an open writing handle existsr   r   NrK   r  i    )rG   r   rc  r   r   r  r   r   r   r  r   rM  r   rU  rM   r  r  )r   rN   r   r   rU  r   srcdests           r   r{  zZipFile.write%  s    wwIK K==P  !!(G484K4K " M <<>"#EEIJJu(&3#&*&6&6#('4$'+'9'9$h% 6diis.C 6t""3f56 6 6 6 6 6s$   DC?.D?D	DDc                    t        |t              r|j                  d      }t        |t              st        |t	        j
                  t	        j                               dd       }| j                  |_        | j                  |_	        |j                  j                  d      rd|_        |xj                  dz  c_        n
d|_        n|}| j                  st        d	      | j                  rt        d
      |||_        |||_	        t!        |      |_        | j$                  5  | j'                  |d      5 }|j)                  |       ddd       ddd       y# 1 sw Y   xY w# 1 sw Y   yxY w)a  Write a file into the archive.  The contents is 'data', which
        may be either a 'str' or a 'bytes' instance; if it is a 'str',
        it is encoded as UTF-8 first.
        'zinfo_or_arcname' is either a ZipInfo instance or
        the name of the file in the archive.r   Nr&   )rN   r   r   i  Ar-   r`  r  z?Can't write to ZIP archive while an open writing handle exists.r  )r  )r   r   r   r   r   r   rM  r   rU  r   rN   r   r   rG   r   rc  r6   r   rb  rM   r{  )r   zinfo_or_arcnamerc   r   rU  r   r  s          r   writestrzZipFile.writestrF  sO    dC ;;w'D*G4%5&*nnTYY[&A"1&EGE"&"2"2E#'#5#5E ~~&&s+&3###t+#&1#$EwwIK K==Q  $"/E$#0E d)ZZ 	!5s+ !t

4 !	! 	!! !	! 	!s$   'E*;EE*E'	#E**E3c                    t        |t              r|}|j                         st        d      t        |t              r^|}|j                  d      s|dz  }t        |      }d|_        d|_        d|z  dz  dz  |_        d|_	        |xj                  dz  c_        nt        d      | j                  5  | j                  r%| j                  j                  | j                         | j                  j!                         |_        |j$                  t&        k(  r|xj(                  t*        z  c_        | j-                  |       d| _        | j0                  j3                  |       || j4                  |j6                  <   | j                  j9                  |j;                  d	             | j                  j!                         | _        d
d
d
       y
# 1 sw Y   y
xY w)z+Creates a directory inside the zip archive.z/The given ZipInfo does not describe a directoryr   r   i @  r   r-   zExpected type str or ZipInfoTFN)r   r   r   r   r   r   r   r   r   r   rG  rb  r  rG   rQ   r  rt   r   r   r	   r   ra  rb  r  r  r7   r  rN   r{  r   )r   zinfo_or_directory_namer  r   directory_names        r   r  zZipFile.mkdiro  sm   -w7+E<<> !RSS/54N!**3/#%N+E"#EEI$+dNf#<"CEEO4':;;ZZ 	,~~T^^,"&'',,.E""h.#::U#"DOMM  '.3DOOENN+GGMM%**512!WW\\^DN	, 	, 	,s   3DGGc                 $    | j                          y)z2Call the "close()" method in case the user forgot.Nr  r   s    r   __del__zZipFile.__del__  s    

r   c                    | j                   y| j                  rt        d      	 | j                  dv rb| j                  rV| j
                  5  | j                  r%| j                   j                  | j                         | j                          ddd       | j                   }d| _         | j                  |       y# 1 sw Y   .xY w# | j                   }d| _         | j                  |       w xY w)zOClose the file, and for mode 'w', 'x' and 'a' write the ending
        records.NzvCan't close the ZIP file while there is an open writing handle on it. Close the writing handle before closing the zip.r  )rG   rc  r   r  r  rb  r  rQ   r  _write_end_recordr  ry  s     r   rg  zZipFile.close  s     77?== P Q Q		yyO+ZZ -~~T^^4**,-
 BDGMM"- -
 BDGMM"s$   &C AB;C ;C C &C-c                 	   | j                   D ]  }|j                  }|d   dz
  dz  |d   dz  z  |d   z  }|d   dz  |d	   dz  z  |d   dz  z  }g }|j                  t        kD  s|j                  t        kD  r;|j                  |j                         |j                  |j                         d
}d
}n|j                  }|j                  }|j                  t        kD  r|j                  |j                         d
}n|j                  }|j                  }	d}
|rHt        |	d      }	t        j                  ddt        |      z  z   ddt        |      z  g| |	z   }	t        }
|j                  t        k(  rt        t         |
      }
n#|j                  t"        k(  rt        t$        |
      }
t        |
|j&                        }t        |
|j(                        }|j+                         \  }}t        j                  t,        t.        ||j0                  ||j2                  ||j                  |||j4                  ||t        |      t        |	      t        |j6                        d|j8                  |j:                  |      }| j<                  j?                  |       | j<                  j?                  |       | j<                  j?                  |	       | j<                  j?                  |j6                          | j<                  jA                         }t        | j                         }|| jB                  z
  }| jB                  }d }|tD        kD  rd}n|t        kD  rd}n|t        kD  rd}|r| jF                  stI        |dz         t        j                  tJ        tL        ddddd||||      }| j<                  j?                  |       t        j                  tN        tP        d|d      }| j<                  j?                  |       tS        |d      }tS        |d
      }tS        |d
      }t        j                  tT        tV        dd||||t        | jX                        	      }| j<                  j?                  |       | j<                  j?                  | jX                         | jZ                  dk(  r| j<                  j]                          | j<                  j_                          y )Nr   r   r(   r!   r%   r"   r#   r*   r$   r   r  r2   Qr   r  zCentral directory offsetzCentral directory sizer  ,   r   r   r  )0r  r   r   r   r   r7   r   r9   rB   rS   r   r6   r   r   r   ry   r   r	   r   r   ri   r   r  r!  r   r   r   r   r   r   rG   r{  rt   r  r  r  r   rW   rX   rT   rU   r  rw   rv   r  r  truncater/  )r   r   r   r   r   r9   r   r   r   
extra_datar   r   ri   rN   r   r-  pos2centDirCountcentDirSizecentDirOffsetr  zip64endreczip64locrecrb   s                           r   r  zZipFile._write_end_record  s   ]] 3	)EB!ut|)BqEQJ6A>GerkBqEQJ."Q%1*=GE,%%3U__-U001&	 *!OO	 % 3 3""[0U001 * % 3 3JK)*d;
#[[CE
N*qU|-&+-/9:
 ,""i/!-=$$0!,<!+u/D/DEO e.B.BCN"'"<"<">Hikk"2"2N"'"5"5"+U-@-@'7"'))]I"%h-Z#emmBT"#U%8%8%:M:M"/1G GGMM'"GGMM(#GGMM*%GGMM%--(g3	)j ww||~4==)T^^+--*N[(7N;&5N##">#D$E F F ++"$6BAq,],K GGMM+& ++))1dA7K GGMM+&|V4Lk:6Kz:M-/?<(-T]]9KM 	fdmm$99GGr   c                     | j                   dkD  sJ | xj                   dz  c_         | j                   s| j                  s|j                          y y y )Nr   r!   )r  r  rg  ry  s     r   r  zZipFile._fpclose
  sI    !###A(8(8HHJ )9r   r   )r  N)F)NN)NNN)i  )%r   r   r   r   rG   rs  r   r   r  r  r   r  r4  r6  r<  r@  rD  rH  r  r   setterrJ   rM   rQ  rg  rj  r   rz  re  rb  r{  r  r  r  rg  r  r  r   r   r   r   r     s
   , 
B(,%"%:$#^:>RV^@T-l9
&    ^^
 
dE dL(1T75$  +ZF. '+046D 48'!R!,F,\|r   r   c                   .    e Zd ZdZdeddfdZd	dZd Zy)
r   zDClass to create ZIP archives with Python library files and packages.r  Trt  c                 F    t         j                  | ||||       || _        y )N)r  rM  r  )r   r   	_optimize)r   re  r  rM  r  optimizes         r   r   zPyZipFile.__init__  s'    t$K$. 	 	0!r   Nc                    t        j                  |      }|rI ||      sA| j                  r4t         j                  j	                  |      rdnd}t        |d|d       yt         j                  j                  |      \  }}t         j                  j	                  |      rt         j                  j                  |d      }t         j                  j                  |      r|r|d|}n|}| j                  rt        d|d	|       | j                  |d
d |      \  }}	| j                  rt        d|	       | j                  ||	       t        t        j                  |            }
|
j                  d       |
D ]$  }t         j                  j                  ||      }t         j                  j                  |      \  }}t         j                  j	                  |      rSt         j                  j                  t         j                  j                  |d            s| j                  |||       |dk(  s|r# ||      s| j                  rt        d|z         | j                  |d
d |      \  }}	| j                  rt        d|	       | j                  ||	       ' y| j                  rt        d|       t        t        j                  |            D ]  }t         j                  j                  ||      }t         j                  j                  |      \  }}|dk(  sK|r# ||      s| j                  rt        d|z         p| j                  |d
d |      \  }}	| j                  rt        d|	       | j                  ||	        y|dd dk7  rt!        d      | j                  |d
d |      \  }}	| j                  rt        d|	       | j                  ||	       y)a  Add all files from "pathname" to the ZIP archive.

        If pathname is a package directory, search the directory and
        all package subdirectories recursively for all *.py and enter
        the modules into the archive.  If pathname is a plain
        directory, listdir *.py and enter all modules.  Else, pathname
        must be a Python *.py file and the module will be put into the
        archive.  Added modules are always module.pyc.
        This method will compile the module.py into module.pyc if
        necessary.
        If filterfunc(pathname) is given, it is called with every argument.
        When it is False, the file or directory is skipped.
        r   re   z skipped by filterfuncNz__init__.pyr   zAdding package inasr   Adding)
filterfunc.pyzfile %r skipped by filterfunczAdding files from directoryz.Files added with writepy() must end with ".py"zAdding file)r   r   r  r   r   r  rv  r8   isfile_get_codenamer{  r(  listdirremovesplitextwritepyrJ  )r   pathnamebasenamer  labeldirr  initnamer\  r   dirlistrN   r   rootexts                  r   r  zPyZipFile.writepy  s"    99X&j2zz"$''--"9vuhGHGGMM(+	T77=="ww||Hm<Hww~~h'*2D9H#H::-xxH!%!3!3HQrNH!Mw::(G,

5'* H!56}- ' 3H77<<(;D " 0 0 :ID#ww}}T*77>>"'',,t]*KL LLx4> ) @%j.>#zz %&E&L M$)-););D2J<D*Fw::!(G4

5'2#3( ::7B &rzz('; < 3H77<<(;D " 0 0 :ID#e|%j.>#zz %&E&L M$)-););D2J<D*Fw::!(G4

5'23 }%"DF F!//2INE7zzmW-JJug&r   c                     d fd	}|dz   }|dz   }t         j                  j                  |d      }t         j                  j                  |d      }t         j                  j                  |d      } j                  dk(  rt        j
                  j                  |      rEt	        j                  |      j                  t	        j                  |      j                  k\  r|x}	}
nTt        j
                  j                  |      rEt	        j                  |      j                  t	        j                  |      j                  k\  r|}
|}	nt        j
                  j                  |      rEt	        j                  |      j                  t	        j                  |      j                  k\  r|}
|}	nt        j
                  j                  |      rEt	        j                  |      j                  t	        j                  |      j                  k\  r|}
|}	n( ||      rEt        j                  j                  d	k(  r|}
n"t        j                  j                  dk(  r|}
n|}
|}	n|x}
}	n։ j                  d	k(  r|}
|}	nL|}	 j                  dk(  r|}
n8 j                  dk(  r|}
n&d
j                   j                        }t        |      t        j
                  j                  |
      r?t	        j                  |
      j                  t	        j                  |      j                  k\  s || j                        s|x}
}	t        j
                  j                  |	      d   }|r|d|}|
|fS )a   Return (filename, archivename) for the path.

        Given a module name path, return the correct file path and
        archive name, compiling if necessary.  For example, given
        /python/lib/string, return (/python/lib/string.pyc, string).
        rt  c                     dd l }j                  rt        d|        	 |j                  | d|       y# |j                  $ r}t        |j
                         Y d }~yd }~ww xY w)Nr   	CompilingT)doraiser  F)
py_compiler  r  compilePyCompileErrormsg)re  r  r  errr   s       r   _compilez)PyZipFile._get_codename.<locals>._compiles  s\    zzk4(""4"I  ,, cggs   4 A"AA"r  z.pycr   )optimizationr!   r"   r   z"invalid value for 'optimize': {!r})r  r   rs  )	importlibutilcache_from_sourcer  r   r   r  r   r   r   r/  r  formatr   rv  )r   r  r  r  file_pyfile_pycpycache_opt0pycache_opt1pycache_opt2r   r\  r  archivenames   `            r   r  zPyZipFile._get_codenamel  s   		 e#f$ ~~77b7Q ~~77a7P ~~77a7P>>Rx(''(#,,0@0I0II"**%''...'','00BGGG4D4M4MM %"''...'','00BGGG4D4M4MM %"''...'','00BGGG4D4M4MM %" G$yy))Q. ,++q0 , ,&G&--EG ~~"$"">>Q&(E^^q((E>EEdnnUC$S/)GGNN5)GGEN++rwww/?/H/HH$..A&--EGggmmG,Q/%-{;K{##r   )r   N)r   r   r   r   r   r   r  r  r   r   r   r   r     s!    N"%: 2"P'dP$r   r   c                    dd l }d}|j                  |      }|j                  d      }|j                  dddd	
       |j                  ddddd       |j                  ddddd       |j                  dddd
       |j                  ddd
       |j	                  |       } | j
                  }| j                  [| j                  }t        |d|      5 }|j                         }d d d        rt        dj                  |             t        d       y | j                  4| j                  }t        |d|      5 }|j                          d d d        y | j                  8| j                  \  }}	t        |d|      5 }|j                  |	       d d d        y | j                  |r0t        d t         j"                  !       t!        j$                  d"       | j                  j'                  d      }
| j                  }fd#t        |
d$      5 }|D ]  }t(        j*                  j-                  |      }|s<t(        j*                  j-                  t(        j*                  j/                  |            }|d%t(        j0                  t(        j2                  fv rd%} |||        	 d d d        y y # 1 sw Y   xY w# 1 sw Y   y xY w# 1 sw Y   y xY w# 1 sw Y   y xY w)&Nr   z3A simple command-line interface for zipfile module.)descriptionT)requiredz-lz--list	<zipfile>zShow listing of a zipfile)metavarhelpz-ez	--extractr"   )r  z<output_dir>zExtract zipfile into target dir)nargsr  r  z-cz--create+)z<name>z<file>zCreate zipfile from sourcesz-tz--testzTest if a zipfile is validz--metadata-encodingz
<encoding>z2Specify encoding of member names for -l, -e and -tr  )r  z.The following enclosed file is corrupted: {!r}zDone testingz/Non-conforming encodings not supported with -c.r:  r!   c           	         t         j                  j                  |      r| j                  ||t               y t         j                  j                  |      r~|r| j                  ||       t        t        j                  |            D ]H  } | t         j                  j                  ||      t         j                  j                  ||             J y y r   )	r   r   r  r{  r   r   r(  r  r8   )r  r   zippathnmaddToZips       r   r  zmain.<locals>.addToZip  s    ww~~d#w5t$HHT7+ D!12 PBRWW\\$3RWW\\'25NPP %r   r  r   )argparseArgumentParseradd_mutually_exclusive_groupadd_argument
parse_argsr  testr   r@  r  r  rx   r<  rg  rj  creater   stderrexitpopr   r   r  r  r  r  )argsr  r  parsergroupencodingr  r  badfiler  zip_namefilesr   r  r  s                 @r   mainr    s   GK$$$=F///>E	tX{7  9	t[<=  ? 
tZs39  ; 
tX{8  :
-|Q  ST"D%%HyyiiS#: 	#bjjlG	#BII'RSn		iiS#: 	bKKM	 	 
	!llVS#: 	"bMM&!	" 	" 
	 Czz#HHQK;;??1%	P Xs# 	,r ,''**40 gg..rwwt/DEGr299bii88 GT7+,	, 	,) 
!!	# 	#	 	
	" 	".	, 	,s1   J4 KKBK4J>K
KK")r   CompleteDirsr   )r   binasciiimportlib.utilr  r  r   r  r   rS   r   r  r   rI  r
  ImportErrorrK  r$  __all__	Exceptionr   r   r   r   r   r  rK  r   r   r   r	   r   r   r   r   r'  rw   rv   r   ru   rY   rZ   r[   r\   r]   r^   r_   r{   r  r  r  r!  r  r   _CD_CREATE_VERSION_CD_CREATE_SYSTEM_CD_EXTRACT_VERSION_CD_EXTRACT_SYSTEMr#  _CD_COMPRESS_TYPE_CD_TIME_CD_DATE_CD_CRC_CD_COMPRESSED_SIZE_CD_UNCOMPRESSED_SIZEr"  r$  r%  _CD_DISK_NUMBER_START_CD_INTERNAL_FILE_ATTRIBUTES_CD_EXTERNAL_FILE_ATTRIBUTESr&  rY  ra  r   rV  rW  r   r   r   rR  rS  _FH_EXTRACT_VERSION_FH_EXTRACT_SYSTEMrX  _FH_COMPRESSION_METHOD_FH_LAST_MOD_TIME_FH_LAST_MOD_DATE_FH_CRC_FH_COMPRESSED_SIZE_FH_UNCOMPRESSED_SIZErT  rU  rT   rU   rR   rW   rX   rV   _CD64_SIGNATURE_CD64_DIRECTORY_RECSIZE_CD64_CREATE_VERSION_CD64_EXTRACT_VERSION_CD64_DISK_NUMBER_CD64_DISK_NUMBER_START_CD64_NUMBER_ENTRIES_THIS_DISK_CD64_NUMBER_ENTRIES_TOTAL_CD64_DIRECTORY_SIZE_CD64_OFFSET_START_CENTDIRr  Structr4   rB   rH   r
   rq   rD   r   objectr   r  r  r  r  r1  r   rN  rV  r[  r]  rv  r  r  r  r   r   r  _pathr   r  r   r   r   <module>r!     s  
   	 	    
  JJE

	 	9    
 #  
	       !12   	   $    !12      
      ! !     
 #      
   "    !12   !    
     % ) )&//*CD  " " "6??#56      !"    #fmmE* * (V:x&iv i` 	 #L" ". 8wx x x	
 x x y z y { 	      	!" # (N& P$%! %!P (T"" Tn
P+B%% P+h\ \~k$ k$\C,L cG  DNNE  
C
  Ds4   I
 I$ I2 
I! I!$I/.I/2I=<I=