Hacked By AnonymousFox

Current Path : /opt/alt/python312/lib64/python3.12/__pycache__/
Upload File :
Current File : //opt/alt/python312/lib64/python3.12/__pycache__/shutil.cpython-312.pyc

�

6�f����V�dZddlZddlZddlZddlZddlZddlZddlZ	ddlZ[dZ		ddlZ[dZ	ddl
Z
[
dZejdk(ZdxZZejdk(rddlZnerddlZej&dk(rddlZndZerdnd	Zeed
�xrej&j/d�aexr	eed�Zd
Zgd�ZGd�de�ZGd�de�ZGd�de�ZGd�de�Z Gd�de�Z!Gd�de"�Z#Gd�de"�Z$d�Z%d�Z&efd�Z'drd �Z(d!�Z)d"�Z*d#�Z+dd$�d%�Z,dd$�d&�Z-eed'�rdd$�d(�Z.nd)�Z.dd$�d*�Z/dd$�d+�Z0dd$�d,�Z1d-�Z2	dsd.�Z3dde1ddfd/�Z4eejjd0�rd1�Z6nd2�Z6d3�Z7d4�Z8ejrejejtejvhejxkxr2ejzej|vxrejej~vZ@dtddd5�d6�ZAe@eA_Bd7�ZCe1fd8�ZDd9�ZEd:�ZFd;�ZGd<�ZH		dud=�ZI		dvd>�ZJdeI_KdeJ_Kd?eId@gdAfiZLe	reIdBgdCfeLdD<eJgdEfeLdF<er	eIdGgdHfeLdI<er	eIdJgdKfeLdL<dM�ZMdwdN�ZNdO�ZO		dxdP�ZPdQ�ZQdR�ZR		dwdS�ZSdT�ZTdU�ZUdV�ZVddW�dX�ZWdYgeWgdAfdZgeVgdEfd[�ZXe	rd\d]geWgdCfeXdD<erd^d_geWgdHfeXdI<erd`dageWgdKfeXdL<db�ZYdyddW�dc�ZZeedd�r[ej�de�ej�dfdg�Z]dhe]j�_die]j�_dje]j�_dk�Zan)er'ej�de�ej�dfdg�Z]dl�Zadydm�Zbdzdn�Zcdo�Zddp�Zeej�ej�zdfdq�Zhy#e
$rdZ	Y��dwxYw#e
$rdZY��jwxYw#e
$rdZY��pwxYw){z�Utility functions for copying and archiving files and directory trees.

XXX The functions here don't copy the resource fork or other metadata on Mac.

�NTF�nt�posix�win32ii�sendfile�linux�
_fcopyfilez%.COM;.EXE;.BAT;.CMD;.VBS;.JS;.WS;.MSC)�copyfileobj�copyfile�copymode�copystat�copy�copy2�copytree�move�rmtree�Error�SpecialFileError�	ExecError�make_archive�get_archive_formats�register_archive_format�unregister_archive_format�get_unpack_formats�register_unpack_format�unregister_unpack_format�unpack_archive�ignore_patterns�chown�which�get_terminal_size�
SameFileErrorc��eZdZy)rN)�__name__�
__module__�__qualname__���-/opt/alt/python312/lib64/python3.12/shutil.pyrrCs��r'rc��eZdZdZy)r!z5Raised when source and destination are the same file.N�r#r$r%�__doc__r&r'r(r!r!Fs��?r'r!c��eZdZdZy)rz|Raised when trying to do a kind of operation (e.g. copying) which is
    not supported on a special file (e.g. a named pipe)Nr*r&r'r(rrIs��;r'rc��eZdZdZy)rz+Raised when a command could not be executedNr*r&r'r(rrMs��5r'rc��eZdZdZy)�	ReadErrorz%Raised when an archive cannot be readNr*r&r'r(r/r/Ps��/r'r/c��eZdZdZy)�
RegistryErrorzVRaised when a registry operation with the archiving
    and unpacking registries failsNr*r&r'r(r1r1Ss��&r'r1c��eZdZdZy)�_GiveupOnFastCopyzuRaised as a signal to fallback on using raw read()/write()
    file copy when fast-copy functions fail to do so.
    Nr*r&r'r(r3r3Ws��r'r3c��	|j�}|j�}	tj|||�y#t$r}t|��d}~wwxYw#t
$ra}|j|_|j|_|jtjtjhvrt|��|d�d}~wwxYw)zhCopy a regular file content or metadata by using high-performance
    fcopyfile(3) syscall (macOS).
    N)�fileno�	Exceptionr3rr�OSError�name�filename�	filename2�errno�EINVAL�ENOTSUP)�fsrc�fdst�flags�infd�outfd�errs      r(�_fastcopy_fcopyfilerD\s���%��{�{�}�����
�� �
����u�e�,��	�%���$�$��%��
� ��y�y����	�	��
��9�9����u�}�}�5�5�#�C�(�(��4���
 �s-� ;�A�	A�A�A�	C� AB<�<Cc���	|j�}|j�}	tt	j
|�jd�}tjdkrt|d�}d}		t	j||||�}|dk(ry||z
}�%#t$r}t|��d}~wwxYw#t$rd}Y�pwxYw#t$r�}|j|_
|j|_|jtj k(r
dat|��|jtj$k(r|d�|dk(r3t	j&|dtj(�dk(rt|��|�d}~wwxYw)z�Copy data from one regular mmap-like fd to another by using
    high-performance sendfile(2) syscall.
    This should work on Linux >= 2.6.33 only.
    Ni�ili@rF)r5r6r3�max�os�fstat�st_sizer7�sys�maxsize�minrr8r9r:r;�ENOTSOCK�_USE_CP_SENDFILE�ENOSPC�lseek�SEEK_CUR)r>r?rArBrC�	blocksize�offset�sents        r(�_fastcopy_sendfilerUpsV��%��{�{�}�����
���������.�.��8�	�
�{�{�W���	�7�+�	�
�F�
�	��;�;�u�d�F�I�>�D�,�q�y���d�N�F�5��%�%���$�$��%�����	����	��9�9�C�L� �I�I�C�M��y�y�E�N�N�*�$)� �'��,�,��y�y�E�L�L�(��t�#���{�r�x�x��q�"�+�+�>�!�C�'��,�,��I��'	�sA� B�)B/�/C�	B,�B'�'B,�/B=�<B=�	E4�	B&E/�/E4c��|j}|j}tt|��5}	||�}|sn%||kr|d|5}||�ddd�n	||��0ddd�y#1swY�xYw#1swYyxYw)z�readinto()/memoryview() based variant of copyfileobj().
    *fsrc* must support readinto() method and both files must be
    open in binary mode.
    N)�readinto�write�
memoryview�	bytearray)r>r?�length�
fsrc_readinto�
fdst_write�mv�n�smvs        r(�_copyfileobj_readintora�s����M�M�M����J�	�I�f�%�	&�
�"���b�!�A����V�����V�$�s��s�O�$���2���
�
�$�$��
�
�s#�A4�	A(�
A4�(A1	�-A4�4A=c��|st}|j}|j}||�x}r||�||�x}r�yy)z=copy data from file-like object fsrc to file-like object fdstN)�COPY_BUFSIZE�readrX)r>r?r[�	fsrc_readr]�bufs      r(r	r	�sE������	�	�I����J��6�"�
"�#�
"��3���6�"�
"�#�
"r'c��t|tj�r\ttjd�rB	tjj|j
�tj|��Sttjd�r!	tjj||�Stjjtjj|��tjjtjj|��k(S#t$rYywxYw#t$rYywxYw)N�samestatF�samefile)�
isinstancerG�DirEntry�hasattr�pathrh�statr7ri�normcase�abspath��src�dsts  r(�	_samefilert�s����#�r�{�{�#������(D�	��7�7�#�#�C�H�H�J������=�=��r�w�w�
�#�	��7�7�#�#�C��-�-�

�G�G���R�W�W�_�_�S�1�2��G�G���R�W�W�_�_�S�1�2�
3�4���	��	���	��	�s$�AD+�D:�+	D7�6D7�:	E�Ec��t|tj�r|j�Stj|�S�N)rjrGrkrn��fns r(�_statry�s(��"�2�r�{�{�3�2�7�7�9�D������Dr'c��t|tj�r|j�Stjj|�Srv)rjrGrk�
is_symlinkrm�islinkrws r(�_islinkr}�s-��(��R�[�[�9�2�=�=�?�Q�r�w�w�~�~�b�?Q�Qr'��follow_symlinksc
��tjd||�t||�rtdj	||���d}t||g�D]\}}	t
|�}tj|j�r6t|tj�r|jn|}td|z��ts�n|dk(s�t|j }��|s6t%|�r+tj&tj(|�|�|St+|d�5}	t+|d�5}t,r0	t/||t0j2�|cddd�cddd�St6r!	t9||�|cddd�cddd�Str4|dkDr/t;||t=|t>��|cddd�cddd�StA||�ddd�ddd�|S#t"$rY���wxYw#t4$rY�9wxYw#t4$rY�HwxYw#1swY�AxYw#tB$r4}	tjjE|�stGd|���|	��d}	~	wwxYw#1swY|SxYw)	z�Copy data from src to dst in the most efficient way possible.

    If follow_symlinks is not set and src is a symbolic link, a new
    symlink will be created instead of copying the file it points to.

    zshutil.copyfilez{!r} and {!r} are the same filerz`%s` is a named pipe�rb�wbNzDirectory does not exist: )$rJ�auditrtr!�format�	enumerateryrn�S_ISFIFO�st_moderjrGrkrmr�_WINDOWSrIr7r}�symlink�readlink�open�_HAS_FCOPYFILErDr�_COPYFILE_DATAr3rNrUrarLrcr	�IsADirectoryError�exists�FileNotFoundError)
rrrsr�	file_size�irx�str>r?�es
          r(r
r
�s>���I�I���c�*���c���=�D�D�S�#�N�O�O��I��C��:�&���2�	'��r��B��}�}�R�Z�Z�(� *�2�r�{�{� ;�R�W�W���&�'=��'B�C�C��A��F��J�J�	�'��w�s�|�
�
�
�2�;�;�s�#�S�)�D�J�A�#�t�_�	��
��#�t�_�,��%�!�/��d�E�<P�<P�Q�#&�,�,�	�	�*�!�.�t�T�:�#&�,�,�	�	�&"�i�!�m�-�d�D�#�i��:V�W�"�',�,�	�	�. ��d�+�+,�	�@�J��]�	��	��, 1�!� �!�� 1�!� �!��,�,��0%�
��w�w�~�~�c�*�+�.H���,N�O�UV�V���	
��5	�@�J�s��G�I�H�"H�*G(�	H�H� 
G7�-	H�'H�'	H�:H�H�	G%�$G%�(	G4�1H�3G4�4H�7	H�H�H�H�H	�H�	I�/I
�
I�I�Ic��tjd||�|s�t|�r�tjj|�rftjdk(r!tjtj}}n�ttd�r!tjtj}}njytjdk(r@tjj|�r!tjj|d��}ttj}}||�}||tj|j��y)z�Copy mode bits from src to dst.

    If follow_symlinks is not set, symlinks aren't followed if and only
    if both `src` and `dst` are symlinks.  If `lchmod` isn't available
    (e.g. Linux) this method does nothing.

    zshutil.copymoder�lchmodNT��strict)rJr�r}rGrmr|r8�lstat�chmodrlr��realpathryrn�S_IMODEr�)rrrsr�	stat_func�
chmod_funcr�s      r(rr&s����I�I���c�*��w�s�|������s�0C�
�7�7�d�?�$&�H�H�b�h�h�z�I�
�R��
"�$&�H�H�b�i�i�z�I��
�7�7�d�?�r�w�w�~�~�c�2��'�'�"�"�3�t�"�4�C� %�r�x�x�:�	�	�3��B��s�D�L�L����,�-r'�	listxattrc�*�	tj||��}|D]4}	tj|||��}tj||||���6y#t$rF}|jtjtj
tjfvr�Yd}~yd}~wwxYw#t$rd}|jtjtjtj
tjtjfvr�Yd}~��d}~wwxYw)z�Copy extended filesystem attributes from `src` to `dst`.

        Overwrite existing attributes.

        If `follow_symlinks` is false, symlinks won't be followed.

        r~N)rGr�r7r;r=�ENODATAr<�getxattr�setxattr�EPERM�EACCES)rrrsr�namesr�r8�values       r(�
_copyxattrr�@s���	��L�L��o�F�E�
�D�
����C���O�����C��u�o�N���	�	��w�w�u�}�}�e�m�m�U�\�\�J�J����	���
��7�7�5�;�;��
�
�u�}�}�#(�<�<����#?�?��?��
�s/�A�1B%�	B"�<B�B"�%	D�.AD
�
Dc��yrvr&��args�kwargss  r(r�r�X���r'c���
�tjd||�ddd�d��
|xs-t|�xrtjj|�}|r�
fd�}n�
fd�}t
|tj�r|j|��}n|d�||��}tj|j�}|d	�||j|jf|��t|||��|d
�}tjdk(rF|rAtjj|�r%tjj|d�
�}nd�}	||||��t#|d�r	|d�||j$|��yy#t $rY�5wxYw#t&$rB}dD]2}	t#t(|	�s�|j(t+t(|	�k(s�2n�Yd}~yd}~wwxYw)a�Copy file metadata

    Copy the permission bits, last access time, last modification time, and
    flags from `src` to `dst`. On Linux, copystat() also copies the "extended
    attributes" where possible. The file contents, owner, and group are
    unaffected. `src` and `dst` are path-like objects or path names given as
    strings.

    If the optional flag `follow_symlinks` is not set, symlinks aren't
    followed if and only if both `src` and `dst` are symlinks.
    zshutil.copystatN)�nsrc��yrvr&)r�rr�s   r(�_nopzcopystat.<locals>._nopir�r'c�&��tt|��Srv)�getattrrG)r8r�s �r(�lookupzcopystat.<locals>.lookupps����2�t�T�*�*r'c�R��tt|��}|tjvr|S�Srv)r�rG�supports_follow_symlinks)r8rxr�s  �r(r�zcopystat.<locals>.lookupus)�����T�4�(�B��R�0�0�0��	��Kr'r~rn�utimer�rTr�c�(�tj|�yrv)rGr�r�s  r(�_chmodzcopystat.<locals>._chmod�s
�����$�r'�st_flags�chflags)�
EOPNOTSUPPr=)rJr�r}rGrmr|rjrkrnr�r��st_atime_ns�st_mtime_nsr�r8r��NotImplementedErrorrlr�r7r;r�)rrrsr�followr�r��moder��whyrCr�s          @r(rr[s�����I�I���c�*��T�
��
J�W�S�\�%I�b�g�g�n�n�S�6I� J�F�
�	+�
	��#�r�{�{�#�
�X�X�f�X�
-��
�V�F�^�C��
8���<�<��
�
�#�D��F�7�O�C�R�^�^�R�^�^�<�� ��s�C��0�
�G�_�F�	�w�w�$����w�w�~�~�c�"��g�g�&�&�s�4�&�8��
 �

��s�D�&�1��r�:��	��F�9��c�2�;�;��G����
�	
�
���	�.���5�#�&�3�9�9���s�8K�+K��/����	�s6�F�)F�	F�F�	G �G�4G�G�G c��tjj|�r=tjj|tjj	|��}t|||��t
|||��|S)a3Copy data and mode bits ("cp src dst"). Return the file's destination.

    The destination may be a directory.

    If follow_symlinks is false, symlinks won't be followed. This
    resembles GNU's "cp -P src dst".

    If source and destination are the same file, a SameFileError will be
    raised.

    r~)rGrm�isdir�join�basenamer
r)rrrsrs   r(r
r
�sT��
�w�w�}�}�S���g�g�l�l�3���� 0� 0�� 5�6���S�#��7��S�#��7��Jr'c��tjj|�r=tjj|tjj	|��}ttd�ritj|�}tj|�}tj}|s|tjz}	t
j|||�|St|||��t!|||��|S#t$rI}|jtjk(r|sn|jtjk(rn�Yd}~�kd}~wwxYw)a0Copy data and metadata. Return the file's destination.

    Metadata is copied with copystat(). Please see the copystat function
    for more information.

    The destination may be a directory.

    If follow_symlinks is false, symlinks won't be followed. This
    resembles GNU's "cp -P src dst".
    �	CopyFile2Nr~)rGrmr�r�r�rl�_winapi�fsdecode�%COPY_FILE_ALLOW_DECRYPTED_DESTINATION�COPY_FILE_COPY_SYMLINKr�r7�winerror�ERROR_PRIVILEGE_NOT_HELD�ERROR_ACCESS_DENIEDr
r)rrrsr�src_�dst_r@�excs       r(rr�s���
�w�w�}�}�S���g�g�l�l�3���� 0� 0�� 5�6���w��$��{�{�3����{�{�3����=�=����W�3�3�3�E�	����d�D�%�0��J�
�S�#��7��S�#��7��J���	����� @� @�@�'������!<�!<�<�����	�s�=C4�4	E�=?E�Ec����fd�}|S)z�Function that can be used as copytree() ignore parameter.

    Patterns is a sequence of glob-style patterns
    that are used to exclude filesc�v��g}�D]'}|jtj||���)t|�Srv)�extend�fnmatch�filter�set)rmr��
ignored_names�pattern�patternss    �r(�_ignore_patternsz)ignore_patterns.<locals>._ignore_patterns�s6����
��G�� � �����w�!?�@� ��=�!�!r'r&)r�r�s` r(rr�s���
"�
�r'c
�X�|�5|tj|�|D�cgc]}|j��c}�}	nd}	tj||��g}
|tuxs|t
u}|D�]|}|j|	vr�tjj||j�}
tjj||j�}|r|n|
}	|j�}|rDtjdk(r1|jd��}|jtjk(rd}|r�tj|
�}|r&tj||�t|||��nztjj|�s|r��&|j!�rt#|||||||�n5|||�n+|j!�rt#|||||||�n	|||���	t||�|
rt%|
��|Scc}w#t$$r)}|
j'|j(d�Yd}~���d}~wt*$r(}|
j-|
|t/|�f�Yd}~���d}~wwxYw#t*$r4}t1|dd��|
j-||t/|�f�Yd}~��d}~wwxYw)Nr&)�exist_okrFr~rr�)rG�fspathr8�makedirsrr
rmr�r{rn�st_reparse_tag�IO_REPARSE_TAG_MOUNT_POINTr�r�rr��is_dirrrr�r�r7�append�strr�)�entriesrrrs�symlinks�ignore�
copy_function�ignore_dangling_symlinks�
dirs_exist_ok�xr��errors�use_srcentry�srcentry�srcname�dstname�srcobjr{r��linktorCr�s                     r(�	_copytreer��sM��
���r�y�y��~��/H�1����/H�I�
��
��K�K��m�,�
�F� �E�)�B�]�d�-B�L����=�=�M�)���'�'�,�,�s�H�M�M�2���'�'�,�,�s�H�M�M�2��)��w��&	8�!�,�,�.�J��b�g�g��o�!�
�
�e�
�<���'�'�4�+J�+J�J�!&�J�����W�-����J�J�v�w�/��V�W�(�l�K��7�7�>�>�&�1�6N� ����(� ���(�F�!.�0H�!.�0�&�f�g�6����"����(�F�M�1�=�B��f�g�.��M�Z0���c��
��F�m���J��{0I��b�	'��M�M�#�(�(�1�+�&�&���	8��M�M�7�G�S��X�6�7�7��	8���0��3�
�D�)�1��M�M�3��S��X�.�/���0�sI�H
�B6H�
AH�(I,�	I)�H5�5I)�I$�$I)�,	J)�5*J$�$J)c
��tjd||�tj|�5}t	|�}ddd�t|||||||��S#1swY�xYw)a*Recursively copy a directory tree and return the destination directory.

    If exception(s) occur, an Error is raised with a list of reasons.

    If the optional symlinks flag is true, symbolic links in the
    source tree result in symbolic links in the destination tree; if
    it is false, the contents of the files pointed to by symbolic
    links are copied. If the file pointed to by the symlink doesn't
    exist, an exception will be added in the list of errors raised in
    an Error exception at the end of the copy process.

    You can set the optional ignore_dangling_symlinks flag to true if you
    want to silence this exception. Notice that this has no effect on
    platforms that don't support os.symlink.

    The optional ignore argument is a callable. If given, it
    is called with the `src` parameter, which is the directory
    being visited by copytree(), and `names` which is the list of
    `src` contents, as returned by os.listdir():

        callable(src, names) -> ignored_names

    Since copytree() is called recursively, the callable will be
    called once for each directory that is copied. It returns a
    list of names relative to the `src` directory that should
    not be copied.

    The optional copy_function argument is a callable that will be used
    to copy each file. It will be called with the source path and the
    destination path as arguments. By default, copy2() is used, but any
    function that supports the same signature (like copy()) can be used.

    If dirs_exist_ok is false (the default) and `dst` already exists, a
    `FileExistsError` is raised. If `dirs_exist_ok` is true, the copying
    operation will continue if it encounters existing directories, and files
    within the `dst` tree will be overwritten by corresponding files from the
    `src` tree.
    zshutil.copytreeN)r�rrrsr�r�r�r�r�)rJr�rG�scandir�listr�)	rrrsr�r�r�r�r��itrr�s	         r(rr-sa��P�I�I���c�*�	���C���C��s�)����W�#�3��"�-�.F�#0�2�2���s�A�A�st_file_attributesc��	tj|�}tj|j�xs<|j
tjzxr|jtjk(S#t$rYywxYw)NF)
rGr�rn�S_ISLNKr�r��FILE_ATTRIBUTE_REPARSE_POINTr�r�r7)rmr�s  r(�_rmtree_islinkr�^sr��	����$��B��L�L����,�K��&�&��)J�)J�J�J��&�&�$�*I�*I�I�
L���	��	�s�A1A4�4	B�?Bc�@�tjj|�Srv)rGrmr|)rms r(r�r�gs���w�w�~�~�d�#�#r'c����fd�}tj|d|tj��}|D]�\}}}|D]8}tjj	||�}	tj
|��:|D]8}tjj	||�}	tj|��:��	tj
|�y#t$r"}	�tj
||	�Yd}	~	��d}	~	wwxYw#t$r"}	�tj||	�Yd}	~	��d}	~	wwxYw#t$r"}	�tj
||	�Yd}	~	yd}	~	wwxYw)Nc�J���tj|j|�yrv)rGr�r9)rC�onexcs �r(�onerrorz_rmtree_unsafe.<locals>.onerrorls���
�b�j�j�#�,�,��,r'F)�topdownr�followlinks)rG�walk�_walk_symlinks_as_filesrmr��rmdirr7�unlink)
rmrr�results�dirpath�dirnames�	filenamesr8�fullnamerCs
 `        r(�_rmtree_unsaferks���-��g�g�d�E�7��Hb�Hb�c�G�(/�$���9��D��w�w�|�|�G�T�2�H�
/�����"���D��w�w�|�|�G�T�2�H�
0��	�	�(�#��)0�#�
�������
/��b�h�h��#�.�.��
/���
0��b�i�i��3�/�/��
0���#�
�b�h�h��c�"�"��#�sH�C
�C8�4D&�
	C5�C0�0C5�8	D#�D�D#�&	E�/E�Ec��|j�\}}}}|�|n|j}	|tjurtj|�y|tjurtj||��y|tj
usJ�|�tj
||��}n|j
d��}tj}tj|tjtjz|��}tjj}	tjj|tj|��std��|jtj|||f�|jtj|||f�tj }tj |�5}	t#|	�}
ddd�
D]�}tjj%||j�}	|j'd��r$|jtj
|||f��d		tj(|j|����y#|jtj|||f�wxYw#1swY��xYw#t$rY�dwxYw#t$r"}
|tj(||
�Yd}
~
��d}
~
wwxYw#t$r}
||
_||||
�Yd}
~
yd}
~
wwxYw)N)�dir_fdFr~�%Cannot call rmtree on a symbolic link)�popr8rG�closerr�rnr��O_RDONLY�
O_NONBLOCKrmr|rhrHr7r�r�r�r�r�rr9)�stackr�func�dirfdrm�
orig_entryr8�orig_st�topfd�
scandir_itr��entryr
rCs              r(�_rmtree_safe_fdr�sN��%*�I�I�K�!�D�%��z��%�4�:�?�?�D�.��2�8�8���H�H�U�O���2�8�8���H�H�T�%�(���r�x�x�������h�h�t�E�2�G� �o�o�e�o�<�G��w�w������b�k�k�B�M�M�9�%�H���w�w�~�~��	>��7�7�#�#�G�R�X�X�e�_�=��E�F�F��L�L�"�(�(�E�4��<�=��L�L�"�(�(�E�4��<�=��z�z��
�Z�Z��
�	'�*��:�&�G�	'��E��w�w�|�|�D�%�*�*�5�H�
��<�<��<�6��L�L�"�(�(�E�8�U�!C�D��7�
0��	�	�%�*�*�U�3���
�L�L�"�(�(�E�4��<�=��	'�	'���
��
���
0��b�i�i��3�/�/��
0�������
�d�D�#�����s��'K�)K�9B!K�A!I$�<AK�J�7K�5J�=K�!J'�!K�$%J	�	K�J�K�	J$�!K�#J$�$K�'	K�0K
�K�
K�K�	K9�K4�4K9)rrc���tjd||�|rd�}n��|�d�}n
|���d�}n�fd�}tr�t|t�rtj|�}t
j||dfg}	|rt||�|r�|rB|j�\}}}}|t
jur�*	tj|�|r�Ayy|�td��	t|�rtd��	t!||�S#t$r"}	|t
j||	�Yd}	~	�\d}	~	wwxYw#|rq|j�\}}}}|t
jur�*	tj|�n.#t$r"}	|t
j||	�Yd}	~	nd}	~	wwxYw|r�pwwxYw#t$r,}	|t
jj||	�Yd}	~	yd}	~	wwxYw)	a�Recursively delete a directory tree.

    If dir_fd is not None, it should be a file descriptor open to a directory;
    path will then be relative to that directory.
    dir_fd may not be implemented on your platform.
    If it is unavailable, using it will raise a NotImplementedError.

    If ignore_errors is set, errors are ignored; otherwise, if onexc or
    onerror is set, it is called to handle the error with arguments (func,
    path, exc_info) where func is platform and implementation dependent;
    path is the argument to that function that caused it to fail; and
    the value of exc_info describes the exception. For onexc it is the
    exception instance, and for onerror it is a tuple as returned by
    sys.exc_info().  If ignore_errors is false and both onexc and
    onerror are None, the exception is reraised.

    onerror is deprecated and only remains for backwards compatibility.
    If both onerror and onexc are set, onerror is ignored and onexc is used.
    z
shutil.rmtreec��yrvr&�r�s r(rzrmtree.<locals>.onexc�s��r'Nc���rvr&r!s r(rzrmtree.<locals>.onexc�s��r'c���rvr&r!s r(rzrmtree.<locals>.onexc�s��r'c�^��|\}}}|�d}nt|�||jf}�|||�S)N)NNN)�type�
__traceback__)r�rrmr��exc_infors     �r(rzrmtree.<locals>.onexc�s=���"&���d�C��;�/�H�#�C�y�#�s�/@�/@�@�H��t�T�8�4�4r'z#dir_fd unavailable on this platformr)rJr��_use_fd_functionsrj�bytesrGr�r�rrrr7r�r�rmr|r)
rm�
ignore_errorsrrrrr�fdrrCs
  `       r(rr�s����*�I�I�o�t�V�,��	�	��U�]�	�	���?�
�
5���d�E�"��;�;�t�$�D��(�(�F�D�$�/�0��	/����u�-���(-�	�	��%��b�$���r�x�x�'��/��H�H�R�L����%�&K�L�L�	��d�#��E�F�F�$��d�E�*�*���/��"�(�(�D�#�.�.��/��
�(-�	�	��%��b�$���r�x�x�'��/��H�H�R�L���/��"�(�(�D�#�.�.��/��
���	��"�'�'�.�.�$��,���	�sl�5D*�1C<�F"�<	D'�D"�"D'�*+F�E,�+F�,	F�5F�
F�F�F�F�"	G�+"G�Gc��tj|�}tjjtjjxsdz}tjj|j
|��S)aHA basename() variant which first strips the trailing slash, if present.
    Thus we always get the last component of the path, even for directories.

    path: Union[PathLike, str]

    e.g.
    >>> os.path.basename('/bar/foo')
    'foo'
    >>> os.path.basename('/bar/foo/')
    ''
    >>> _basename('/bar/foo/')
    'foo'
    �)rGr�rm�sep�altsepr��rstrip)rmr.s  r(�	_basenamer1sN���9�9�T�?�D�
�'�'�+�+������-�2�
.�C�
�7�7���D�K�K��,�-�-r'c�|�tjd||�|}tjj	|�r�t||�r6tjj
|�stj||�ytjj|t|��}tjj|�rtd|z��	tj||�|S#t$�rGtjj
|�rCtj|�}tj||�tj|�Y|Stjj	|�r�t!||�rtd|�d|�d���t#|�sLtj$|tj&�s:tj(|�r%tj*dk(rt-d|�d	|�d���t/|||d
��t1|�Y|S|||�tj|�Y|SwxYw)a.Recursively move a file or directory to another location. This is
    similar to the Unix "mv" command. Return the file or directory's
    destination.

    If dst is an existing directory or a symlink to a directory, then src is
    moved inside that directory. The destination path in that directory must
    not already exist.

    If dst already exists but is not a directory, it may be overwritten
    depending on os.rename() semantics.

    If the destination is on our current filesystem, then rename() is used.
    Otherwise, src is copied to the destination and then removed. Symlinks are
    recreated under the new name if os.rename() fails because of cross
    filesystem renames.

    The optional `copy_function` argument is a callable that will be used
    to copy the source or it will be delegated to `copytree`.
    By default, copy2() is used, but any function that supports the same
    signature (like copy()) can be used.

    A lot more could be done here...  A look at a mv.c shows a lot of
    the issues this implementation glosses over.

    zshutil.moveNz$Destination path '%s' already existszCannot move a directory 'z' into itself 'z'.�darwinz%Cannot move the non-empty directory 'z ': Lacking write permission to 'T)r�r�)rJr�rGrmr�rtr|�renamer�r1r�rr7r�r�r�
_destinsrc�
_is_immutable�access�W_OK�listdir�platform�PermissionErrorrr)rrrsr��real_dstr�s     r(rr%s���4�I�I�m�S�#�&��H�	�w�w�}�}�S���S�#��r�w�w�~�~�c�':�
�I�I�c�3����7�7�<�<��Y�s�^�4��
�7�7�>�>�(�#��>��I�J�J��
�	�	�#�x� �,�O��+��
�7�7�>�>�#���[�[��%�F��J�J�v�x�(��I�I�c�N�"�O�!�W�W�]�]�3�
��#�s�#��(+�S�2�3�3��c�"��I�I�c�2�7�7�3��
�
�3���L�L�H�4�%�),�c�'3�4�4�
�S�(�-�"�
$��3�K��O�
�#�x�(��I�I�c�N��O�+�s �C*�*A)H;�CH;�H;�:H;c��tjj|�}tjj|�}|jtjj�s|tjjz
}|jtjj�s|tjjz
}|j|�Srv)rGrmrp�endswithr.�
startswithrqs  r(r5r5gs���
�'�'�/�/�#�
�C�
�'�'�/�/�#�
�C��<�<������$��r�w�w�{�{����<�<������$��r�w�w�{�{����>�>�#��r'c��t|�}tjtjg}t	|d�xr|j
|vS)Nr�)ryrn�UF_IMMUTABLE�SF_IMMUTABLErlr�)rrr��immutable_statess   r(r6r6ps>��	�s��B��)�)�4�+<�+<�=���2�z�"�F�r�{�{�6F�'F�Fr'c�x�|�y	ddlm}	||�}|�|dSy#t$rYywxYw#t$rd}Y�$wxYw)z"Returns a gid, given a group name.Nr)�getgrnam�)�grprE�ImportError�KeyError)r8rE�results   r(�_get_gidrKu�^���|��� ���$������a�y���������
��������+�	(�(�9�9c�x�|�y	ddlm}	||�}|�|dSy#t$rYywxYw#t$rd}Y�$wxYw)z"Returns an uid, given a user name.Nr)�getpwnamrF)�pwdrOrHrI)r8rOrJs   r(�_get_uidrQ�rLrMc	�.�����|�d}	nDtr|dk(rd}	n6tr|dk(rd}	n(tr|dk(rd}	ntdj	|���d	dl}
|rd
|	znd}|dz|z}tjj|�}
|
rJtjj|
�s+|�|jd|
�|st
j|
�|�|jd
�t���t�������fd�}|s^|
j|d|	z�}|}|� tjj||�}	|j!|||��|j#�|�tjj%|�}|S#|j#�wxYw)a�Create a (possibly compressed) tar file from all the files under
    'base_dir'.

    'compress' must be "gzip" (the default), "bzip2", "xz", or None.

    'owner' and 'group' can be used to define an owner and a group for the
    archive that is being built. If not provided, the current owner and group
    will be used.

    The output tar file will be named 'base_name' +  ".tar", possibly plus
    the appropriate compression extension (".gz", ".bz2", or ".xz").

    Returns the output filename.
    Nr-�gzip�gz�bzip2�bz2�xzzCbad value for 'compress', or compression format not supported : {0}r�.�.tar�creating %szCreating tar archivec�H�����|_�|_���|_�|_|Srv)�gid�gname�uid�uname)�tarinfor\�group�ownerr^s ����r(�_set_uid_gidz#_make_tarball.<locals>._set_uid_gid�s.����?��G�K�!�G�M��?��G�K�!�G�M��r'zw|%s�r�)�_ZLIB_SUPPORTED�_BZ2_SUPPORTED�_LZMA_SUPPORTED�
ValueErrorr��tarfilerGrm�dirnamer��infor�rQrKr�r��addrrp)�	base_name�base_dir�compress�verbose�dry_runrbra�logger�root_dir�tar_compressionri�compress_ext�archive_name�archive_dirrc�tar�arcnamer\r^s     ``          @@r(�
_make_tarballrz�sr��� ����	�X��/���	�H��/���	�X��-����+�+1�6�(�+;�=�	=��,4�3��(�"�L��v�%��4�L��'�'�/�/�,�/�K��2�7�7�>�>�+�6����K�K�
�{�3���K�K��$������*�+�
�5�/�C�
�5�/�C����l�l�<��/�)A�B�������w�w�|�|�H�h�7�H�	��G�G�H�g�l�G�;��I�I�K����w�w���|�4�����	
�I�I�K�s�;F�Fc��ddl}|dz}	tjj|�}
|
rJtjj	|
�s+|�|jd|
�|stj|
�|�|jd|	|�|�sH|j|	d|j��5}tjj|�}|� tjj||�}tjj|�}|tjk7r&|j||�|�|jd|�tj|�D�]n\}
}}|
}|� tjj||�}tjj|�}t|�D]i}tjj|
|�}tjj||�}|j||�|��X|jd|��k|D]�}tjj|
|�}tjj|�}tjj!|�s�btjj||�}|j||�|���|jd|�����q	ddd�|�tjj#|	�}	|	S#1swY�,xYw)	z�Create a zip file from all the files under 'base_dir'.

    The output zip file will be named 'base_name' + ".zip".  Returns the
    name of the output zip file.
    rN�.ziprZz#creating '%s' and adding '%s' to it�w)�compressionzadding '%s')�zipfilerGrmrjr�rkr��ZipFile�ZIP_DEFLATED�normpathr��curdirrXr�relpath�sorted�isfilerp)rmrnrprqrrrbrarsr�zip_filenamerw�zfryr
rr�
arcdirpathr8rms                   r(�
_make_zipfiler��s_����v�%�L��'�'�/�/�)�,�K��2�7�7�>�>�+�6����K�K�
�{�3���K�K��$�
�����9� �(�	,��
�_�_�\�3�)0�)=�)=��?�	=�BD��g�g�&�&�x�0�G��#��7�7�<�<��(�;���w�w�'�'��1�H��"�)�)�#�����7�+��%��K�K�
�x�8�02����0A�,���9�$�
��'�!#������X�!F�J��W�W�-�-�j�9�
�"�8�,�D��7�7�<�<���6�D� �g�g�l�l�:�t�<�G��H�H�T�7�+��)����M�4�8�-�&�D��7�7�<�<���6�D��7�7�+�+�D�1�D��w�w�~�~�d�+�"$�'�'�,�,�z�4�"@������w�/�!�-�"�K�K�
�t�<�&�1B�	=�<���w�w���|�4����A	=�	=�s �+EK8�A7K8�4K8�5K8�8Lrx)roNzuncompressed tar file)rorSzgzip'ed tar-file�gztarzZIP file�zip)rorUzbzip2'ed tar-file�bztar)rorWzxz'ed tar-file�xztarc��tj�D��cgc]\}}||df��}}}|j�|Scc}}w)z�Returns a list of supported formats for archiving and unarchiving.

    Each element of the returned sequence is a tuple (name, description)
    rF)�_ARCHIVE_FORMATS�items�sort)r8�registry�formatss   r(rr1sF�� �%�%�'�)�~�t�X��h�q�k�"�)�G�)��L�L�N��N��)s�>c��|�g}t|�std|z��t|ttf�std��|D]1}t|ttf�rt|�dk7s�(td��|||ft|<y)auRegisters an archive format.

    name is the name of the format. function is the callable that will be
    used to create archives. If provided, extra_args is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_archive_formats() function.
    NzThe %s object is not callablez!extra_args needs to be a sequencerFz+extra_args elements are : (arg_name, value))�callable�	TypeErrorrj�tupler��lenr�)r8�function�
extra_args�description�elements     r(rr;s������
��H���7�(�B�C�C��j�5�$�-�0��;�<�<����'�E�4�=�1�S��\�A�5E��I�J�J��'�
�K�@��T�r'c��t|=yrv)r��r8s r(rrPs
����r'c	�h�tjd||||�	t|}	||||d�}
|	d}|	dD]
\}}
|
|
|<�|�t
j}t|dd�}d}|��tj|�j}tj|�sttjd	|��|rtj|�}||
d
<n^tj�}|�|j!d|�t
j"j%|�}|stj&|�	|||fi|
��}|�)|�|j!d|�tj&|�|S#t$rt	d|z�d�wxYw#|�*|�|j!d|�tj&|�wwxYw)
aCreate an archive file (eg. zip or tar).

    'base_name' is the name of the file to create, minus any format-specific
    extension; 'format' is the archive format: one of "zip", "tar", "gztar",
    "bztar", or "xztar".  Or any other registered format.

    'root_dir' is a directory that will be the root directory of the
    archive; ie. we typically chdir into 'root_dir' before creating the
    archive.  'base_dir' is the directory where we start archiving from;
    ie. 'base_dir' will be the common prefix of all files and
    directories in the archive.  'root_dir' and 'base_dir' both default
    to the current directory.  Returns the name of the archive file.

    'owner' and 'group' are used when creating a tar archive. By default,
    uses the current owner and group.
    zshutil.make_archivezunknown archive format '%s'N)rqrrrbrar��supports_root_dirFzNot a directoryrszchanging into '%s'zchanging back to '%s')rJr�r�rIrhrGr�r�rnr��S_ISDIR�NotADirectoryErrorr;�ENOTDIRr��getcwd�debugrmrp�chdir)rmr�rsrnrprqrbrarr�format_infor�r�arg�valr��save_cwd�stmdr9s                  r(rrSs���$�I�I�#�Y���(�K�K�&�v�.��!�F��u�.�F��q�>�D���N���S���s��#����9�9����&9�5�A���H����w�w�x� �(�(���|�|�D�!�$�U�]�]�4E�x�P�P���	�	�)�,�I�!)�F�:���y�y�{�H��!����1�8�<������	�2�I������"���	�8�6�v�6�����!����4�h�?��H�H�X���O��Q�K��6��?�@�d�J�K��F���!����4�h�?��H�H�X�� �s�	E'�0
F�'F�.F1c��tj�D��cgc]\}}||d|df��}}}|j�|Scc}}w)z�Returns a list of supported formats for unpacking.

    Each element of the returned sequence is a tuple
    (name, extensions, description)
    r�)�_UNPACK_FORMATSr�r�)r8rkr�s   r(rr�sL���$�$�&�(�J�D�$��d�1�g�t�A�w�'�(�G�(��L�L�N��N��(s�Ac���i}tj�D]\}}|dD]}|||<�	�|D]}||vs�d}t||||fz��t|�st	d��y)z+Checks what gets registered as an unpacker.rz!%s is already registered for "%s"z*The registered function must be a callableN)r�r�r1r�r�)	�
extensionsr�r��existing_extensionsr8rk�ext�	extension�msgs	         r(�_check_unpack_optionsr��s�����%�+�+�-�
��d���7�C�'+���$��.� �	��+�+�5�C���y�':�9�'E�'G�!G�H�
H� ��H���D�E�E�r'c�@�|�g}t|||�||||ft|<y)aMRegisters an unpack format.

    `name` is the name of the format. `extensions` is a list of extensions
    corresponding to the format.

    `function` is the callable that will be
    used to unpack archives. The callable will receive archives to unpack.
    If it's unable to handle an archive, it needs to raise a ReadError
    exception.

    If provided, `extra_args` is a sequence of
    (name, value) tuples that will be passed as arguments to the callable.
    description can be provided to describe the format, and will be returned
    by the get_unpack_formats() function.
    N)r�r�)r8r�r�r�r�s     r(rr�s.��"���
��*�h�
�;�&��*�k�I�O�D�r'c��t|=y)z*Removes the pack format from the registry.N)r�r�s r(rr�s
����r'c��tjj|�}tjj|�stj|�yy)z1Ensure that the parent directory of `path` existsN)rGrmrjr�r�)rmrjs  r(�_ensure_directoryr��s5���g�g�o�o�d�#�G�
�7�7�=�=��!�
���G��"r'c�n�ddl}|j|�std|z��|j|�}	|j	�D]�}|j
}|j
d�sd|vr�%tjj|g|jd����}|s�Wt|�|jd�r�t|j|d�5}t|d�5}t||�ddd�ddd���	|j�y#1swY�%xYw#1swY��xYw#|j�wxYw)z+Unpack zip `filename` to `extract_dir`
    rNz%s is not a zip file�/z..�rr�)r�
is_zipfiler/r��infolistr9r?rGrmr��splitr�r>r�r	r)	r9�extract_dirrr�rkr8�
targetpath�source�targets	         r(�_unpack_zipfiler��s������h�'��.��9�:�:�
�/�/�(�
#�C���L�L�N�D��=�=�D����s�#�t�t�|�������k�D�D�J�J�s�O�D�J����j�)��=�=��%��X�X�d�C�(�0�F��Z��.�0�28����/�0�0�0�#�$	�	�	��	0�0��0�0��	�	�	��sB�BD"�:D"�
D�
D
�&D�.
D"�
D�D�D	�D"�"D4rdc���ddl}	|j|�}	|j	||��|j�y#|j$rtd|z��wxYw#|j�wxYw)zAUnpack tar/tar.gz/tar.bz2/tar.xz `filename` to `extract_dir`
    rNz/%s is not a compressed or uncompressed tar filerd)rir��TarErrorr/�
extractallr)r9r�r�ri�tarobjs     r(�_unpack_tarfiler��sx���J����h�'������+�f��5������
���J��=��H�J�	J�J��	����s�<�A�A�A/rYr|)rxr�z.tar.gzz.tgzz.tar.bz2z.tbz2z.tar.xzz.txzc�~�tj�D]&\}}|dD]}|j|�s�|ccS�(y)Nr)r�r�r>)r9r8rkr�s    r(�_find_unpack_formatr�s?��%�+�+�-�
��d��a��I�� � ��+���!�.�r'c��tjd|||�|�tj�}tj|�}tj|�}|�i}nd|i}|�(	t
|}|d}|||fit|d��|��yt|�}|�tdj|���t
|d}tt
|d�|z}|||fi|��y#t$rtdj|��d�wxYw)a]Unpack an archive.

    `filename` is the name of the archive.

    `extract_dir` is the name of the target directory, where the archive
    is unpacked. If not provided, the current working directory is used.

    `format` is the archive format: one of "zip", "tar", "gztar", "bztar",
    or "xztar".  Or any other registered format.  If not provided,
    unpack_archive will use the filename extension and see if an unpacker
    was registered for that extension.

    In case none is found, a ValueError is raised.

    If `filter` is given, it is passed to the underlying
    extraction function.
    zshutil.unpack_archiveNr�zUnknown unpack format '{0}'r�rFzUnknown archive format '{0}')rJr�rGr�r�r�rIrhr��dictr�r/)r9r�r�r��
filter_kwargsr�rr�s        r(rrs"��$�I�I�%�x��f�E����i�i�k���)�)�K�(�K��y�y��"�H�
�~��
�!�6�*�
�
��	U�)�&�1�K��1�~���X�{�L�d�;�q�>�&:�L�m�L�%�X�.���>��:�A�A�(�K�L�L��v�&�q�)���o�f�-�a�0�1�M�A���X�{�-�f�-���	U��:�A�A�&�I�J�PT�T�	U�s�%	C"�"%D�statvfs�
disk_usage�usageztotal used freezTotal space in byteszUsed space in byteszFree space in bytesc��tj|�}|j|jz}|j|jz}|j|j
z
|jz}t
|||�S)z�Return disk usage statistics about the given path.

        Returned value is a named tuple with attributes 'total', 'used' and
        'free', which are the amount of total, used and free space, in bytes.
        )rGr��f_bavail�f_frsize�f_blocks�f_bfree�_ntuple_diskusage)rmr��free�total�useds     r(r�r�Rs`���Z�Z��
���{�{�R�[�[�(�����b�k�k�)�����b�j�j�(�B�K�K�7�� ���d�3�3r'c�V�tj|�\}}||z
}t|||�S)z�Return disk usage statistics about the given path.

        Returned values is a named tuple with attributes 'total', 'used' and
        'free', which are the amount of total, used and free space, in bytes.
        )r�
_getdiskusager�)rmr�r�r�s    r(r�r�cs0���&�&�t�,���t��t�|�� ���d�3�3r'c�x�tjd|||�|�
|�td��|}|}|�d}n7t|t�r't|�}|�t
dj|���|�d}n7t|t�s't|�}|�t
dj|���tj|||�y)z�Change owner user and group of the given path.

    user and group can be the uid/gid or the user/group names, and in that case,
    they are converted to their respective uid/gid.
    zshutil.chownNzuser and/or group must be set���zno such user: {!r}zno such group: {!r})rJr�rhrjr�rQ�LookupErrorr��intrKrGr)rm�userra�_user�_groups     r(rrns����I�I�n�d�D�%�0��|��
��8�9�9��E�
�F��|���	�D�#�	������=��2�9�9�$�?�@�@��}���
��s�
#��%����>��3�:�:�5�A�B�B��H�H�T�5�&�!r'c�6�	ttjd�}	ttjd�}|dks|dkrb	tj
tjj��}|dkr|jxs|d}|dkr|jxs|d}tj||f�S#ttf$rd}Y��wxYw#ttf$rd}Y��wxYw#tttf$rtj|�}Y��wxYw)aGet the size of the terminal window.

    For each of the two dimensions, the environment variable, COLUMNS
    and LINES respectively, is checked. If the variable is defined and
    the value is a positive integer, it is used.

    When COLUMNS or LINES is not defined, which is the common case,
    the terminal connected to sys.__stdout__ is queried
    by invoking os.get_terminal_size.

    If the terminal size cannot be successfully queried, either because
    the system doesn't support querying, or because we are not
    connected to a terminal, the value given in fallback parameter
    is used. Fallback defaults to (80, 24) which is the default
    size used by many terminal emulators.

    The value returned is a named tuple of type os.terminal_size.
    �COLUMNSr�LINESr�)r�rG�environrIrhr rJ�
__stdout__r5�AttributeErrorr7�
terminal_size�columns�lines)�fallbackr�r��sizes    r(r r �s��(��b�j�j��+�,����B�J�J�w�'�(��
�!�|�u��z�	.��'�'����(=�(=�(?�@�D�
�a�<��l�l�1�h�q�k�G��A�:��J�J�-�(�1�+�E�
���W�e�,�-�-��+
�j�!������

�j�!�������
�G�4�	.��#�#�H�-�D�	.�s4�B>�C�1C,�>C�C�C)�(C)�,)D�Dc��tjj|�xr8tj||�xr tjj	|�Srv)rGrmr�r7r�)rxr�s  r(�
_access_checkr��sA���G�G�N�N�2��
&�2�9�9�R��#6�
&��G�G�M�M�"�%�%�'r'c�~�|tjzxs(tjtj|��S)z�
    On Windows, we can use NeedCurrentDirectoryForExePath to figure out
    if we should add the cwd to PATH when searching for executables if
    the mode is executable.
    )rG�X_OKr��NeedCurrentDirectoryForExePathr�)�cmdr�s  r(�_win_path_needs_curdirr��s5������� �"�W�%K�%K����C� �&"�"r'c�8��t|t�}tjj	|�\}}|r|g}�n|�8tj
j
dd�}|�	tjd�}|sy|rHtj|�}|j	tjtj��}n4tj|�}|j	tj�}tjdk(rEt!||�r9tj"}|rtj|�}|j%d|�tjdk(�rtj&d�xst(}|j	tj�D�cgc]}|s�|��	}}|r"|D�cgc]}tj|���}}|g|D�cgc]}||z��	c}z}	tjj+|	d�dj-��|tj.zr8t1�fd�|D��s$|	j3|	j5d��n|g}	t7�}
|D]p}tjj9|�}||
vs�'|
j;|�|	D]4}
tjj=||
�}t?||�s�0|ccS�ry#ttf$rtj}Y���wxYwcc}wcc}wcc}w)	a3Given a command, mode, and a PATH string, return the path which
    conforms to the given mode on the PATH, or None if there is no such
    file.

    `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result
    of os.environ.get("PATH"), or can be overridden with a custom search
    path.

    N�PATH�CS_PATHrr�PATHEXTr�c3�D�K�|]}�|j�k(���y�wrv)�upper)�.0r��suffixs  �r(�	<genexpr>zwhich.<locals>.<genexpr>s�����%O��f��	�	��&;�%O�s� ) rjr)rGrmr�r��get�confstrr�rh�defpath�fsencode�pathsepr�rJr:r�r��insert�getenv�_WIN_DEFAULT_PATHEXT�splitextr�r��anyr�rr�rorlr�r�)r�r�rm�	use_bytesrjr��pathext_sourcer��pathext�files�seen�dir�normdir�thefiler8r�s               @r(rr�sh����3��&�I�
�7�7�=�=��%�L�G�S���y���<��:�:�>�>�&�$�/�D��|�&��:�:�i�0�D�����;�;�t�$�D��:�:�b�k�k�"�*�*�5�6�D��;�;�t�$�D��:�:�b�j�j�)�D��<�<�7�"�'=�c�4�'H��Y�Y�F�����V�,���K�K��6�"�
�|�|�w�����9�-�E�1E��"0�"6�"6�r�z�z�"B�J�3�c�3�J��J��3:�;�C�r�{�{�3�'�;�G�;���w�7��#��)�7�7�����!�!�%��(�+�A�.�4�4�6���"�'�'�>�#�%O�w�%O�"O��L�L����1��&�����5�D����'�'�"�"�3�'���$���H�H�W�� ���w�w�|�|�C��1�� ��t�,��K�!�	���q'�
�3�&��:�:�D�&��6K��<��7s*� K'� L
�(L
�4L�L�'L
�	L
)r)F)FN)rSrrNNNN)rrNNNN)Nr-)NNrrNNN)NN))�P�)ir+rGrJrnr��collectionsr;�warnings�zlibrerHrVrf�lzmargr8r�rrr:r�rcrlr?rNr�r�__all__r7rr!rrr/r6r1r3rDrUrar	rtryr}r
rr�rr
rrr�r�stat_resultr�rrr�rr�supports_dir_fdr��supports_fdr�r(r�avoids_symlink_attacksr1rr5r6rKrQrzr�r�r�rrrrrr�rrr�r�r�r�r�rr��
namedtupler�r�r�r�r�rr r�r��F_OKr�rr&r'r(�<module>r s;���
�
����������O�����N�����O��7�7�d�?��
�����7�7�g���
�
��<�<�7����G�&�{�I���2�z�*�O�s�|�|�/F�/F�w�/O���7�7�5�,�7��?����	�G�	�@�E�@�;�w�;�6��6�0��0�&�I�&��	��
 �(>�@.:��(�4�$E�R�+/�>�@+/�.�2�2�{��04��0
�+/�H�T'+��$(,�&�P
�7<�@�D!&�d�%�&+�5�.2�`�2�>�>�/�0��$�#�.=�~�g�g�r�w�w��	�	�2�8�8�<��'�'�(�<��Z�Z�2�>�>�1�<��W�W�� ;� ;�;��
G+�T�$�G+�V!2���.�$"'�@�D�G�
�$�$LM�@D�D�L;<�@D�7�r#'�
��"&�
��
�m�0�1�%�'���
�!.�1E�0F� 2�!4��W��,�b�*�=��U���!.�1F�0G� 3�!5��W���!.�1C�0D� 0�!2��W���A�*�KL�;?�=�@	�F�$CG�')�J�,���<6:��(�h���-D�
E��h���Z�
8���
�!*�F� 3�_�b� 2� 4�O�G���!+�W� 5��� 3� 5�O�G���!*�F� 3�_�b� 0� 2�O�G���..�d�..�b�2�y���N�N�<� �.��.�.�w�8I�J��&<����#�%:����"�%:����"�
4���N�N�<� �.��.�.�w�8I�J��4�"�@+.�b'�
"��G�G�b�g�g�%�D�P��w-���O������N������O��s3�N�N�N�N�N�N�N�N(�'N(

Hacked By AnonymousFox1.0, Coded By AnonymousFox