QfC^ dZdZdZdZdZdZdZdZddlZddl Z ddl Z ddl Z ddl gd Z d Z d Zd Zd ZdZdZe j&j(e_dZdZdZdZdZdZdZdZdadadZ ddl m!Z"dZ$dddZ%dZ&e jNd k(Z(d#d!Z)d"Z*y#e#$rdZ"Y-wxYw)$.../:z /bin:/usr/binNz /dev/null)*)(normcaseisabsjoin splitdrive splitrootsplitsplitextbasenamedirname commonprefixgetsizegetmtimegetatimegetctimeislinkexistslexistsisdirisfileismount expanduser expandvarsnormpathabspathsamefile sameopenfilesamestatcurdirpardirseppathsepdefpathaltsepextsepdevnullrealpathsupports_unicode_filenamesrelpath commonpath isjunctionc&t|tryy)N/r) isinstancebytespaths 0/opt/alt/python312/lib64/python3.12/posixpath.py_get_sepr7)s$c. tj|SNosfspath)ss r6rr4s@ 99Q<r8cf tj|}t|}|j|Sr:)r<r=r7 startswith)r>r%s r6r r <s*) ! A 1+C << r8cl tj|}t|}|} |s|dd|zttj|D]7}|j |r|}|r|j |r||z }0|||zz }9 |S#t ttf$rtjd|g|wxYw)Nrr ) r<r=r7mapr@endswith TypeErrorAttributeError BytesWarning genericpath_check_arg_types)apr%r5bs r6r r Gs ! A 1+C D  !HsNRYY"A||C T]]3/ a # K ~| 4$$VQ33 s AB-B3c tj|}t|}|j|dz}|d|||d}}|r"||t |zk7r|j |}||fSNr<r=r7rfindlenrstrip)rJr%iheadtails r6r r dsoD ! A 1+C  qA2A!"$D CI %{{3 :r8ctj|}t|trd}d}nd}d}t j ||d|S)Nr1.rr)r<r=r2r3rG _splitext)rJr%r)s r6rrusD ! A!U  Cv 66r8c< tj|}|dd|fSNrr;)rJs r6r r s# ! A Ra5!8Or8c tj|}t|trd}d}nd}d}|dd|k7r|||fS|dd|k7s|dd|k(r|||ddfS||dd|ddfS)Nr1r8rrN)r<r=r2r3)rJr%emptys r6r r s ! A!U!u|eQ 1Q3!Aa&C-c1QR5  aeQqrU""r8cv tj|}t|}|j|dz}||dSrM)r<r=r7rP)rJr%rSs r6rrs83 ! A 1+C  qA QR5Lr8c tj|}t|}|j|dz}|d|}|r"||t |zk7r|j |}|SrMrO)rJr%rSrTs r6rrs]7 ! A 1+C  qA Ra5D CI %{{3 Kr8c0 tj|y)NFr;r4s r6r/r/s3IIdO r8c\ tj|y#ttf$rYywxYw)NFT)r<lstatOSError ValueErrorr4s r6rrs3M   Z s ++c tj|}tj|jrytj|}t|tr t|d}n t|d}t|} tj|}|j}|j}||k7ry|j}|j}||k(ryy#t t f$rYywxYw#t t f$rYywxYw)NF..rT)r<rdstatS_ISLNKst_modererfr=r2r3r r+st_devst_ino)r5s1parents2dev1dev2ino1ino2s r6rrs. XXd^ << # 99T?D$dE"dD! f F XXf  99D 99D t| 99D 99D t| 7 Z  Z s#CC)C&%C&)C;:C;ct tj|}t|trd}nd}|j |s|St |}|j |d}|dkr t|}|dk(rZdtjvr4 ddl } |jtjj}natjd}nM ddl }|d|}t|trtj|} |j!|}|j}|t"j$dk(r|St|trtj&|}d}nd}|j)|}|||dzxs|S#t$r|cYSwxYw#t$r|cYSwxYw#t$r|cYSwxYw#t$r|cYSwxYw) N~~rNrHOMEvxworksr1r)r<r=r2r3r@r7findrQenvironpwd ImportErrorgetpwuidgetuidpw_dirKeyErrorfsdecodegetpwnamsysplatformfsencoderR) r5tilder%rSr|userhomenamepwentroots r6rrs 99T?D$ ??5 ! 4.C #qA1u IAv  #  << 4;; zz&)H  Aay dE ";;t$D LL&E <<CLLI5 $;;x(t$H tABx  (D(I        K  K sHE6 -F F;F)6 FF FF F&%F&) F76F7c. tj|}t|trRd|vr|Sts ddl}|j d|jatj}d}d}ttdd}nPd|vr|Sts ddl}|j d|ja tj}d }d }tj}d} |||}|s |S|jd\}}|jd } | j|r| j|r| d d } |:tj tjtj"| } n|| } ||d} |d|| z}t%|}|| z }#t&$r|}YwxYw) N$rs\$(\w+|\{[^}]*\}){}environb$z\$(\w+|\{[^}]*\}){}rN)r<r=r2r3 _varprogbrecompileASCIIsearchgetattr_varprogr{spangroupr@rCrrrQr) r5rrstartendr{rSmjrvaluerUs r6rr@s 99T?D$ t K  #8"((CI!!"j$/ d?K zz"6AH** A  4O " K!vvay1wwqz ??5 !dmmC&8":D  BJJr{{4/@$AB 8D8e#DD A DLD'  A s'AF FF)_path_normpathc tj|}t|tr d}d}d}d}nd}d}d}d}||k(r|St |\}}}|j |}g}|D]A} | ||fvr | |k7s|s|r |r|d |k(r|j | /|s2|jC|}||j|z}|xs|S) Nr1r8rWrhrr\rrr) r<r=r2r3r r appendpopr ) r5r%r_dotdotdot_initial_slashescomps new_compscomps r6rrys>yy dE "CECFCECF 5=J#,T? ?D 3 Ds|#y "  7  & %0{sr8c tj|}t|sEt|trtj }ntj }t||}t|Sr:) r<r=r r2r3getcwdbgetcwdr r)r5cwds r6rrsN" 99T?D ; dE "**,C))+CC D>r8F)strictcl tj|}t|dd||i\}}t|SrZ)r<r= _joinrealpathr)filenamerr5oks r6r+r+s9+yy"HXbq\8VR@HD" 4=r8ct|trd}d}d}nd}d}d}t|r|dd}|}|r|j|\}}}|r||k(r ||k(r&|r!t |\}}||k(rt |||}n|}Kt ||} t j| } tj| j} | s| }| |vr.|| }||rt j| nt | |dfSd|| <t|t j| ||\}} | st ||dfS||| <|r|d fS#t$r|rd} YwxYw) Nr1rWrhrrrrNFT)r2r3r partitionr r r<rdrirjrkrerreadlink) r5restrseenr%r#r$rrnewpathstis_linkrs r6rrs$ T{ABx s+ atv~  6>"4[ d6>ff5D tT" /'"B ll2::.GD  d?=D GT*E11W  r{{7';VTJbd#U* *W Y \ :; G sD99E  E darwincR |s tdtj|}t|trd}d}d}nd}d}d}||}ntj|} t |j |Dcgc]}|s| }}t |j |Dcgc]}|s| }}tt||g}|gt||z z||dz} | s|St| Scc}wcc}w#ttttf$rtjd||wxYw) Nzno path specifiedrWr1rhrrrr-)rfr<r=r2r3rr rQrr rDrErFDeprecationWarningrGrH) r5rr#r%r$x start_list path_listrSrel_lists r6r-r-s3- ,-- 99T?D$ } %  !(!5!5c!:@!:Aaa!: @ ' 3 3C 8> 81AQ 8 >  j)45 68s:q01IabMAMXA> ~|5G H$$Ye< s<C48C*C*C4"C/*C/.3C4"C4* C442D&c  |s tdtttj|}t |dt rd d}nd d} |Dcgc]}|j }} t fd|D\}|Dcgc]}|Dcgc] }|s||k7s |c}}}}t|}t|}|} t|D]\} }||| k7s|d| } n|r n dd} | j| zScc}w#t$r tddwxYwcc}wcc}}w#ttf$rtj d g|wxYw) Nz%commonpath() arg is an empty sequencerr1rWrrc3.K|] }|ddk(ywrM).0rJr%s r6 zcommonpath..,s5u!2A#usz%Can't mix absolute and relative pathsr.)rftuplerBr<r=r2r3r setminmax enumerater rDrErGrH) pathsr#r5 split_pathsr r>crnrpcommonrSprefixr%s @r6r.r.svN @AA #bii' (E%(E"38954tzz#5 9 P5u55FEEPPKq1:1aa6k1:K P    bMDAqBqEzBQ" 3r7(((#: PDE4 O P;P ~ &$$\:E: slD-D,D-/D D- D'D" D" !D" %D'*4D-$D-D- DD-"D''D--'Er:)+r#r$r)r%r&r'r(r*r<rrirG__all__r7rr r r rrX__doc__r r rrr/rrrrrrposixrrr}rr+rrr,r-r.rr8r6rs            ': "7((00 #>V6)z   .j 0D "'<~"llh6!R#Es8B!!B,+B,