quPiLh dZdZdZdZdZdZdZdZddlZddl Z ddl Z ddl Z dd l Tgd Z d Z dd lmZmZmZd Zn#e$rdZYnwxYwdZdZdZdZdZe jje_dZdZdZ dZ! ddl"m#Z#n #e$rdZ#YnwxYwdZ$dZ%dZ& ddl"m'Z'dZ(n#e$rdZ(YnwxYwdZ) dd l"m*Z*d!Z+n #e$re)Z+YnwxYw dd"l"m,Z,m-Z.e/fd#Z0e/fd$Z1d%d&d'Z2n#e$r d%d&d(Z2YnwxYwe3e d)oe j4d*d+kZ5d/d,Z6d-Z7 dd.l"m8Z9dS#e$rYdSwxYw)0...\;/z.;C:\binnulN)*)'normcaseisabsjoin splitdrivesplitsplitextbasenamedirname commonprefixgetsizegetmtimegetatimegetctimeislinkexistslexistsisdirisfileismount expanduser expandvarsnormpathabspathcurdirpardirseppathsepdefpathaltsepextsepdevnullrealpathsupports_unicode_filenamesrelpathsamefile sameopenfilesamestat commonpath ALLOW_MISSINGc4t|trdSdS)N\/\/) isinstancebytespaths 1/opt/alt/python-internal/lib/python3.11/ntpath.py _get_bothsepsr9$s$vu) LCMapStringExLOCALE_NAME_INVARIANTLCMAP_LOWERCASEc tj|}|s|St|trnt j}||ddd}ttt|}| |dSttt|ddS)Nsurrogateescaperr) osfspathr4r5sysgetfilesystemencodingdecodereplace_LCMapStringEx_LOCALE_NAME_INVARIANT_LCMAP_LOWERCASEencode)sencodings r8r r 4s  IaLL H a   8022H#455==c4HHA5/44A88H&788 8!"8"2"#))C"6"688 8r:c> tj|}t|trLtjtj|ddS|ddS)Nrr)r@rAr4r5fsencodefsdecoderElower)rJs r8r r Gs}  IaLL a   J;r{1~~55c4@@FFHHII Iyyd##))+++r:c  tj|}t|trd}d}d}nd}d}d}|dd||}||s||drd Sd S) N\/s:\rrz:\TF)r@rAr4r5rE startswith)rJr#r& colon_seps r8r r Xs) ! A!U   "1" fc""A ||CALLA66t 5r:ctj|}t|trd}d}d}nd}d}d} |s |dd|zt |\}}t tj|D]x}t |\}} | r| d|vr |s|s|}| })|r7||kr1||kr|}| }`|}|r|d|vr||z}|| z}y|r"|d|vr|r|dd|kr||z|zS||zS#tttf$rtj d |g|RwxYw) NrQr2:rr3:rr ) r@rAr4r5r maprO TypeErrorAttributeError BytesWarning genericpath_check_arg_types) r7pathsr#sepscolon result_drive result_pathpp_drivep_paths r8r r ls 9T??D$  !HsNN$.t$4$4! kRY&& / /A(mmOGV '&)t+++,+#*L$  'W 44==??l&8&8&:&:::#*L"(K&  0{2d::)C/ %.KK  4KN$66 7)"##.%77#% 3 3k)) ~| 4$VT:E:::: sCDD,Ec^ tj|}t|dkrt|tr d}d}d}d}nd}d}d}d }|||}|d d|dzkr|dd |krd nd}|||}|d kr ||dd fS|||d z}|d kr ||dd fS|d|||dfS|d d|kr|dd|ddfS|dd |fS)NrQrRrX\\?\UNC\rrrY\\?\UNC\rrZrT)r@rAlenr4r5rEupperfind) rfr#r&rc unc_prefixnormpstartindexindex2s r8r r si$ ! A 1vv{{ a   (CFE(JJCFE'J &#&& 1:q rr**j88AAaEJJsE**E{{!BQB%xZZUQY//F||!BQB%xWfW:qz) ) 1:  RaR5!ABB%<  RaR5!8Or:c6 tj|}t|}t|\}}t |}|r!||dz |vr|dz}|r ||dz |v|d|||d}}||p|}||z|fSNrT)r@rAr9r rnrstrip)rfrbdiheadtails r8rrs! ! A   D a==DAq AA !A#d"" Q !A#d""2A2!""$D ;;t   $D t8T>r:ctj|}t|trt j|dddSt j|dddS)NrQrR.rrr)r@rAr4r5r_ _splitextrfs r8rrsO ! A!U8$QtT:::$Qc3777r:c. t|dSrwrrs r8rrs3 88A;r:c. t|dS)Nrrrs r8rrs7 88A;r:c tj|}n#tttf$rYdSwxYwt j|jS)NF)r@lstatOSError ValueErrorr]statS_ISLNKst_moder7sts r8rrsV Xd^^ Z 0uu < # ##s 33cd tj|}n#ttf$rYdSwxYwdS)NFT)r@rrrrs r8rr sEM Xd^^ Z uu 4s --)_getvolumepathnamec tj|}t|}t|}t |\}}|r|d|vr| p||vS|r||vrdSt ra||}t ||}||kSdS)NrTF)r@rAr9r r rrxcasefold)r7rbrootrestxys r8rr#s# 9T??D   D 4==DD!!JD$ ,Q4+ddl+  t KK   d # # * *4 0 0zz||qzz||++ur:c tj|}t|trd}nd}||s|Sdt |}}||kr9||t |vr"|dz }||kr||t |v"dtjvrtjd}nVdtjvr|S tjd}n#t$rd}YnwxYwt|tjd}|dkr|d|}t|trtj |}tj d}||kr2|t|kr|Stt||}t|trtj|}|||dzS) N~~rT USERPROFILEHOMEPATH HOMEDRIVEUSERNAME)r@rAr4r5rUrnr9environKeyErrorr rNgetrrrM)r7tilderznuserhomedrive target_user current_users r8rr@s0 9T??D$ ??5 ! ! c$iiqA a%%DG=#6#666 Q a%%DG=#6#666 "":m, 2: % %  J{+EE   EEE rz*566Avv1Q3i k5 ) ) 3+k22Kz~~j11 , & & x1111 GH--{;;H$);x(( d122h s C C+*C+c tj|}t|trOd|vrd|vr|Sddl}t|j|jzdzd}d}d}d}d}d}ttd d}n6d |vrd |vr|Sddl}|j|jzdz}d }d }d }d}d }tj}|dd} d} t|} | | kr || | dz} | |kre|| dzd}t|} | | } | | |d| dzzz } n#t$r| | |zz } | dz } YnwxYw| |kr|| dz| dz|kr | | z } | dz } n`|| dzd}t|} | |} |d| } |7tj tjtj | }n|| }n#t$r || z|z}YnwxYw| |z } n#t$r| ||zz } | dz } YnwxYw| |kr|| dz| dz|kr | | z } | dz } n}|| dz| dz|kr|| dzd}t|} | |} |d| } |7tj tjtj | }n|| }n#t$r||z| z|z}YnwxYw| |z } n#t$r| ||z|zz } | dz } YnwxYw|dd} | dz } || | dz} | r!| |vr| | z } | dz } || | dz} | r| |v |7tj tjtj | }n|| }n#t$r|| z}YnwxYw| |z } | r| dz} n| | z } | dz } | | k | S)N$%rz_-ascii'{}environb$%'{}rTrj)r@rAr4r5string ascii_lettersdigitsgetattrrrnrtrrMrNr)r7rvarcharsquotepercentbracerbracedollarrresrtpathlencvarvalues r8rr}s)- 9T??D$ t  D 0 0K - =DgNN"j$// d??s$K '&-7$>* rr(C E$iiG '// uQw  :: #D$iiG $ 1 q4  +++ $ $ $q4x!  $'\\EAIeai'(G33q E!GHH~d))! JJw//E vv,C8"?$&K 2;s;K;K0L$M$MEE$+CLE#888 '#  785LCC"(((7T>)C#aKEEE(&[[EAIeai'(F22q eai )*e33E!GHH~d))! JJv..E vv,C>"?$&K 2;s;K;K0L$M$MEE$+CLE#>>> & 4v =>5LCC"(((6E>D00C#aKEEE(2A2h uqy).AMM1HCQJEU519_-A.AMM) " BJr{37G7G,H I I ' )))"SLEEE)u QJE 1HC  W '//X Jso(D,,EE H-AG//HHH)(H)L$AK&&K>=K>L$#L$'AN))N;:N;)_path_normpathc tj|}t|tr5tjt tj|pdSt |pdS)Nr~r)r@rAr4r5rMrrNr6s r8rrs_>y dE " " J;~bk$.?.?@@AAIT Id##*s*r:c tj|}t|tr d}d}d}d}nd}d}d}d}|||}t |\}}||r||z }||}||}d }|t|kr||r |||kr||=n\|||krK|d kr ||d z |kr||d z |d z=|d z}n*|d kr| |r||=n |d z }n|d z }|t|k|s|s| ||| |zS) NrQrRr~..rrrrrrT) r@rAr4r5rEr rUlstriprrnendswithappendr )r7r#r&r!r"prefixcompsrzs r8rrs>y dE " " CFFFFCFFF||FC((!$''  ??3   $ cMF;;s##D 3 #e**nn8 uQx611!HHqV##q55U1Q3Z611ac!A#gFAA!VV 4 4VaFAAQ#e**nn !e ! LL ''r:c tj|}t|sLt|trtj}ntj}t||}t|SN) r@rAr r4r5getcwdbgetcwdr r)r7cwds r8_abspath_fallbackr#sg 9T??D ;; dE " " *,,CC)++CC D>>r:)_getfullpathnamec tt|S#ttf$rt |cYSwxYwr)rrrrrr6s r8r r ;sR4 +#HTNN33 3$ + + +$T** * * * +s AA)_getfinalpathnamereadlinkcd}t}t||vr|t| |}t|}t |s*>!?!???$}@F'J#N)++C~~'!2!222#|__V,, ] " "-MFF  $MM#M #%++ #T??D L$T**D   " " "  1c"gg&&D0D>>DDDDDD L L L!{ .t=JLLLDDDDDD L !doof55 !z** +&c*oo.>.>)??S[[\\* !$U++t33 D    ! ! !;"222 D  !  sBD F*.EF%FF)G?? H2 H2 H--H2c t|Sr)r )r7rs r8r)r)Fst}}r:getwindowsversionrSrjc tj|}t|trd}d}d}nd}d}d}||}|st dtj|} t t |}t t |}t|\}}t|\} } t|t| krt d| d |d | |D} d | |D} d } t| | D],\}}t|t|krn| d z } -|gt| | z z| | dz}|s|St|S#ttttt f$rt#jd||wxYw)NrQr~rrrrzno path specifiedzpath is on mount z, start on mount cg|]}||Srr.0rs r8 zrelpath.. s<<. s:::1:Q:::r:rrTr+)r@rAr4r5rr rr r rziprnr r\r]r^DeprecationWarningr_r`)r7rsr#r!r" start_abspath_abs start_drive start_rest path_drive path_rest start_list path_listrze1e2rel_lists r8r+r+s- 9T??D$ } .,--- Ie  EHUOO,, 8D>>**",Y"7"7 Z *8 4 4 I K HZ$8$8 8 8* KK)** *=<!1!1#!6!6<<< ::  4 4::: *i00  FB||x||++ FAA8s:q01IabbMA MX z>.9s;QQQaz!))FC"8"8">">"@"@AAQQQr:c@g|]\}}|Srrrryrfr#s r8rzcommonpath..:s'<<<1qwws||<<zcommonpath..=s3>>$!Q2A2#>>>>>>r:z%Can't mix absolute and relative pathsc3 K|] \}}|V dSrr)rryrfs r8rzcommonpath..Ds&--A1------r:rTzPaths don't have the same drivec$g|] }||k | Srrrrr!s r8rzcommonpath..Is#999q9Q&[[![[[r:c,g|]}fd|DS)c$g|] }||k | Srrrs r8rz)commonpath...Ks#:::a:a6kkkkkr:r)rrJr!s r8rzcommonpath..Ks.PPPq::::1:::PPPr:r/)rtupler[r@rAr4r5rrnr rErminmax enumerater r\r]r_r`)ra drivesplits split_pathsr rr7commons1s2rzrrr&r!r#s @@@r8r/r/(sxN B@AAA #bi'' ( (E%(E""!QQQQQ5QQQ <<<< <<<  P>>>>+>>>>>FEE P P PDEE4 O P s------- . .! 3 3>?? ? q!1!1&#!>!>?? tC9999V999PPPPKPPP      bMM & &DAqBqEzzHSWWH%F %05(((( ~ &$\:E:::: s%&GB"!G"B==DG%G>)_isdirr):r!r"r'r#r$r&r%r(r@rBrr___all__r9_winapir;rFr<rGr=rHr ImportErrorr r r rrr__doc__rrrrntrrrrrrrrr rrrrrrr)hasattrrr*r+r/r!rrr:r8r(s3            !,---------- 8888$ , , ,,,,,, ,$()))^...l.888 (0 $$$$%%%%%%%:---zjjj`3+!!!!!!Z++++W(((((('('('('('(((f" +###### ++++    GGG g>>>>>>>> ,3((((T9@0000d"'DDDDDDC!&R&gc+>??>3c355a8A=++++p111h #"""""""   DD si <AA7A>>BBBB*)B*1B;;CC C"" C0/C0 D((D10D1