jf8I& UddlZddlZddlZddlZddlZddlZddlmZej dZ ej dZ dZ ejejejgejfed<ejdZ dQdejd ejed ejed ed ed ejf dZd ed efdZdejejd efdZGddejZGddZdRdejejded efdZdRdejejded efdZ dejejd ejejfdZ!dejejd ejejfdZ"dejd efdZ#dejdedejed efdZ$dejd ejed ejed efdZ% dQdejejd ejed ejed ejejejegefd!ejejejgejejfd ed ed ejfd"Z& dRd#ejejd ejed ejed ed ejf d$Z' dRd%ejejd ejed ejed ed ejf d&Z(d ejfd'Z)d ejfd(Z*d ejfd)Z+ dSd ejed ejed ejfd*Z, dSd ejed ejed ejfd+Z- dSd ejed ejed ejfd,Z.d-ej/ed.e0fd/ed ejed ejed ejejf d0Z1 dTd3d4d/ed ejed ejed5ed ej2ejejeff d6Z3Gd7d8Z4ded efd9Z5dejejd efd:Z6 dSdejejejd;ejed efd<Z7ej drVe rTd=d>l8m9Z9d efd?Z:eZ;ej<ejejfed@< dUdejd;ejed ejfdAZ n=d efdBZ:dCejd ejed ejed ejejfdDZ9dEed e0fdFZ=dejejd efdGZ>dHejgejejfdIejgejfd ejgejejffdJZ?e?dKe,Z@e?dLe-ZAe?dMe.ZBe)e*e+dNZCejDeejgejffedO<e,e-e.dNZEejDeejejeejegejffedP<dS)VN)WeakKeyDictionarycygwinwinauto_wrap_for_ansiz\033\[[;?0-9]*[a-zA-Z]Fstreamencodingerrorsforce_readableforce_writablereturncV|t|}|d}t|||d||S)NreplaceT)line_bufferingr r )get_best_encoding_NonClosingTextIOWrapper)rrr r r s m/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/click/_compat.py_make_text_streamrsJ$V,, ~ #%%    c` tj|jdkS#t$rYdSwxYw)z$Checks if a given encoding is ascii.asciiF)codecslookupname LookupError)rs ris_ascii_encodingr$sA}X&&+w66 uus  --cpt|ddptj}t|rdS|S)z1Returns the default stream encoding if not found.rNzutf-8)getattrsysgetdefaultencodingr)rrvs rrr,s; T * * Fc.D.F.FBw IrceZdZ d dejdejedejedededejdd ffd Z dd Z defd Z xZ S)rFrrr r r extrar Nc tjtjt|||x|_}t j|||fi|dSN)tcastBinaryIO _FixupStream_streamsuper__init__)selfrrr r r r" __class__s rr+z!_NonClosingTextIOWrapper.__init__5s]!" J V^^LL! !   v 6;;U;;;;;rcR |dS#t$rYdSwxYwr$)detach Exceptionr,s r__del__z _NonClosingTextIOWrapper.__del__Cs:  KKMMMMM    DD s  &&c4|jSr$)r)isattyr1s rr4z_NonClosingTextIOWrapper.isattyIs|""$$$rFF)r N) __name__ __module__ __qualname__r%r'OptionalstrboolAnyr+r2r4 __classcell__)r-s@rrr4s %$ < <  <*S/ < 3 <  <  < <  < < < < < < %%%%%%%%%rrceZdZdZ ddejdedefdZdedej fd Z d e de fd Z defd Zdefd ZdefdZdS)r(aQThe new io interface needs more from streams than streams traditionally implement. As such, this fix-up code is necessary in some circumstances. The forcing of readable and writable flags are there because some tools put badly patched objects on sys (one such offender are certain version of jupyter notebook). Frr r c0||_||_||_dSr$)r)_force_readable_force_writable)r,rr r s rr+z_FixupStream.__init__Xs!  --rrr c,t|j|Sr$)rr)r,rs r __getattr__z_FixupStream.__getattr__bst|T***rsizect|jdd}|#tjt||S|j|S)Nread1)rr)r%r&bytesread)r,rEfs rrGz_FixupStream.read1esJ DL'4 0 0 =6%4)) )|  &&&rc|jrdSt|jdd}|"tjt |S |jdn#t$rYdSwxYwdS)NTreadablerF)r@rr)r%r&r;rIr0r,xs rrLz_FixupStream.readablems   4 DL*d 3 3 =6$$$ $  L  a    55 tsA A.-A.c@|jrdSt|jdd}|"tjt |S |jdn>#t$r1 |jdn#t$rYYdSwxYwYnwxYwdS)NTwritablerF)rArr)r%r&r;writer0rMs rrPz_FixupStream.writableys   4 DL*d 3 3 =6$$$ $  L  r " " " "     ""3''''   uuu ('  ts6A B+BB BBBBBct|jdd}|"tjt|S |j|jn#t$rYdSwxYwdS)NseekableFT)rr)r%r&r;seektellr0rMs rrTz_FixupStream.seekables DL*d 3 3 =6$$$ $  L  dl//11 2 2 2 2   55 ts1A.. A<;A<Nr5)r6r7r8__doc__r%r'r;r+r:r<rDintrHrGrLrPrTrrr(r(Ns %$ .. .. ....++++++'#'%'''' $     $    $rr(defaultcx t|dtS#t$r|cYSwxYwNr) isinstancerIrHr0rrZs r_is_binary_readerr_sE&++a..%000 s '* 99c |dn;#t$r. |dYdS#t$rYnwxYw|cYSwxYwdS)NrrQFT)rRr0r^s r_is_binary_writerras S   LL   55    D   4s* A; AAAAAct|drtjtj|St |dd}|/t|drtjtj|SdSNFbufferT)r_r%r&r'rrbufs r_find_binary_readerrgj ''*vaj&))) &(D ) )C ,S$77vaj#&&& 4rct|drtjtj|St |dd}|/t|drtjtj|SdSrc)rar%r&r'rres r_find_binary_writerrjrhrcBtt|ddpdS)z3A stream is misconfigured if its encoding is ASCII.rNr)rrrs r_stream_is_misconfiguredrms# WVZ>>I' J JJrattrvaluec@t||d}||kp|duo|duS)zA stream attribute is compatible if it is equal to the desired value or the desired value is unset and the attribute has a value. N)r)rrnro stream_values r_is_compat_stream_attrrrs3 64..L 5 PUd]%O|47OPrcFt|d|ot|d|S)zcCheck if a stream's encoding and errors attributes are compatible with the desired values. rr )rr)rrr s r_is_compatible_text_streamrts1 " H   ; 6 : :;r text_stream is_binary find_binaryc2||dr tjtj|}nTtjtj|}t |||r|t |s|S||}||S|}|d}t |||||S)NFr)r r )r%r&r'TextIOrtrmr) rurr rvrwr r binary_readerpossible_binary_readers r_force_correct_text_streamr|sye$$/qz;77 fQX{33  &k8V D D   !9+!F!F  "-[!9!9 " ) . ~ %%    r text_readerc@t|||tt|S)Nr )r|r_rg)r}rr r s r_force_correct_text_readerr- &%    r text_writerc@t|||tt|S)Nr )r|rarj)rrr r s r_force_correct_text_writerr(rrcZttj}|td|S)Nz6Was not able to determine binary stream for sys.stdin.)rgrstdin RuntimeError)readers rget_binary_stdinr8s*  + +F ~STTT MrcZttj}|td|S)Nz7Was not able to determine binary stream for sys.stdout.)rjrstdoutrwriters rget_binary_stdoutr?*  , ,F ~TUUU MrcZttj}|td|S)Nz7Was not able to determine binary stream for sys.stderr.)rjrstderrrrs rget_binary_stderrrFrrczttj||}||Sttj||dS)NTr)_get_windows_console_streamrrrrr r s rget_text_stdinrMs; %SY& A AB ~ %ci6RV W W WWrczttj||}||Sttj||dSNTr)rrrrrs rget_text_stdoutrV; %SZ6 B BB ~ %cj(FSW X X XXrczttj||}||Sttj||dSr)rrrrrs rget_text_stderrr_rrfilezos.PathLike[str]modecPd|vrt||St||||S)z?Handles not passing ``encoding`` and ``errors`` in binary mode.brr )open)rrrr s r _wrap_io_openrhs4 d{{D$ dXf = = ==rrstrictfilenamezt.Union[str, os.PathLike[str]]atomiccdv}tj|}tj|dkretfddDr%|rt dfSt ||dfS|rt dfSt||dfS|st|||dfSdvrtd d vrtd d vrtd ddl }ddl } tj |j }n#t$rd}YnwxYwtjtjztjz} |r| t%tddz} tjtj|d|dd} tj| | |dn|} n#t$r} | j |jkshtjdkr]| j |jkrMtj| jr)tj| jtjrYd} ~ d} ~ wwxYw|tj| |t| ||} tA| | tj!|}tEj#tDj$tDj%|dfS)Nr-c3 K|]}|vV dSr$rY).0mrs r zopen_stream..s'22QqDy222222r)warNFrTrzAppending to an existing file is not supported, because that would involve an expensive `copy`-operation to a temporary file. Open the file in normal `w`-mode and copy explicitly if that's what you're after.rNz&Use the `overwrite`-parameter instead.rz,Atomic writes only make sense with `w`-mode.rO_BINARYz.__atomic-writel08xint)&osfspathfsdecodeanyrrrrr ValueErrorerrnorandomstatst_modeOSErrorO_RDWRO_CREATO_EXCLrpathjoindirname randrangerEEXISTrEACCESisdirraccessW_OKchmod _AtomicFilerealpathr%r&IOr<)rrrr rbinaryrrpermflags tmp_filenamefderJafs ` r open_streamrusD[Fy""H {8## 2222/222 2 2 L 2(**E11"HVDDDeK K  -#%%u, ,x???FF EXtXv>>DD d{{ ,    d{{ABBB $GHHH LLLMMM " 1 1 9  I "RY .E , Z+++w|| GOOH % % =f..w77 = = =   ut|eeNNB    w%,&&4Gu|++GMM!*--,Iaj"'22,    t$$$b$&11A Q bg&6&6x&@&@ A AB 6!$qu+r " "D ((s1/D DD2G IA8IIIceZdZdejejdededdfdZedefdZ dd e ddfd Z d edejfd Z dd Z dejejedejddfdZdefdZdS)rrJr real_filenamer Nc>||_||_||_d|_dSNF)_f _tmp_filename_real_filenameclosed)r,rJrrs rr+z_AtomicFile.__init__s$)+ rc|jSr$)rr1s rrz_AtomicFile.names ""rFdeletec|jrdS|jtj|j|jd|_dS)NT)rrcloserrrr)r,rs rrz_AtomicFile.closesC ;  F   4%t':;;; rrc,t|j|Sr$)rrrCs rrDz_AtomicFile.__getattr__stw%%%rc|Sr$rYr1s r __enter__z_AtomicFile.__enter__s rexc_type_c6||dudS)N)r)r)r,rrs r__exit__z_AtomicFile.__exit__s! ($. /////rc*t|jSr$)reprrr1s r__repr__z_AtomicFile.__repr__sDG}}rF)r r)r6r7r8r%rr<r:r+propertyrr;rrDrr9Type BaseExceptionrrrYrrrrs(!$qu+SQU #c###X#DT&&&&&&0AF=,A!B00RV0000#rrc8td|S)NrQ)_ansi_resub)ros r strip_ansirs <<E " ""rct|ttfr#|j}t|ttf#|jjdS)Nz ipykernel.)r]r(rr)r-r7 startswithrls r_is_jupyter_kernel_outputrsW Vl,DE F F  Vl,DE F F    & 1 1, ? ??rcolorch|.| tj}t| ot| S| Sr$)rrr4r)rrs rshould_strip_ansirs= } >YF&>>!K*CF*K*K&KK9r)rc2ddl}|Sr\)localegetpreferredencoding)rs r_get_argv_encodingrs **,,,r_ansi_stream_wrapperscl t|}n#t$rd}YnwxYw||Sddl}t ||}|||t jt jj }|j fd}||_ |t|<n#t$rYnwxYw|S)zbSupport ANSI color and style codes on Windows by wrapping a stream with colorama. Nr)stripcb |S#t$rwxYwr$)r reset_all)s_write ansi_wrappers r _safe_writez'auto_wrap_for_ansi.._safe_writesF vayy     &&((( s  .) rgetr0coloramar AnsiToWin32r%r&ryrrR) rrcachedr rr rrrs @@rrrs  *..v66FF   FFF   M!&%00++F%+@@ VAHl1 2 2       ,. !& ) )    D  s .. B$$ B10B1c^ttjddptjS)Nr)rrrgetfilesystemencodingrYrrrr.s$sy*d33Rs7P7R7RRrrJcdSr$rY)rJrr s rrr1s trrNc:tt|Sr$)lenr)rNs rterm_lenr7s z!}}  rcN |S#t$rYdSwxYwr)r4r0rls rr4r4;s7}} uus  $$src_func wrapper_funccptdtjtjffd }|S)Nr c}|dS |}n#t$rd}YnwxYw||S} ||<n#t$rYnwxYw|Sr$)rr0)rr cacherrs rfuncz&_make_cached_stream_func..funcHs >4 6""BB   BBB  >I \^^ E&MM    D  s' 66A AA)rr%r9ry)rrrrs`` @r_make_cached_stream_funcrBsR3D2E2EE!*QX&& KrctjSr$)rrrYrrr^ssyrctjSr$)rrrYrrrr_ rctjSr$)rrrYrrrr`rr)rrrbinary_streams text_streamsr5r)NN)rNrFr$)Friorrertypingr%weakrefrplatformrCYGWINWINrr9Callablery__annotations__compilerr'r:r;rrrr<r TextIOWrapperrr(r_rargrjrmrrrtr|rrrrrrrrUnionrXrTuplerrrrr _winconsolerrrMutableMappingrr4r_default_text_stdin_default_text_stdout_default_text_stderrrMappingr rYrrr4s  %%%%%%   * * le$$CGAJqz18*ah*>?@GGG 2:/ 0 0!  Jjo JsO    X *ad15kc%%%%%r/%%%4BBBBBBBBJad15kDT  ad15k D T    QU  1:0F$QU  1:0F$KQXK$KKKKQ18Q3Qqz#QSWQQQQ; H; ! 3;9:C; ;;;;"! ++ae+jo+ JsO+z14;-t34 + QT!%[M1:aj+AAB +  ++X++++d!  ae jo  JsO   X    (!  ae jo  JsO   X     !*1:1:AEXXjoX./joXXXXXXAEYYjoY./joYXYYYYAEYYjoY./joYXYYYY > '#)3. / >  >jo > JsO > T!%[ > > > > $& N)N).N) N)joN) JsO N)  N) WQT!%[$  N)N)N)N)b>#c#c####@ad15k@d@@@@GK JqtAE{ #34:d3C <5!!7c7888888----- CTBSBUBU1+AHah,>?UUU59###!"D!1# #####NSSSSS 8 z#89 3 AH  14;4jQZ112*R\*ZAJqx(()8/./@/@.QQ//0B0BOTT//0B0BOTT>> #qz"aj.99: aiQZ_ajo6@ AAr