8fh\\dZddlZddlZddlZddlZddlmZddlmZm Z ddl m Z m Z m Z mZmZmZmZddlmZmZmZmZmZmZddlmZddlmZmZdd lmZm Z m!Z!m"Z"m#Z#dd l$m%Z%dd l&m'Z'm(Z(dd l)m*Z*m+Z+dd l,m-Z-m.Z.dZ/dZ0dZ1dZ2dZ3dZ4Gddej5Z5ej6fdZ7dS)z pygments.cmdline ~~~~~~~~~~~~~~~~ Command line interface. :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. N)dedent) __version__ highlight) ClassNotFound OptionErrordocstring_headline guess_decodeguess_decode_from_terminalterminal_encodingUnclosingTextIOWrapper)get_all_lexersget_lexer_by_name guess_lexerload_lexer_from_fileget_lexer_for_filenamefind_lexer_class_for_filename) TextLexer)LatexEmbeddedLexerLatexFormatter)get_all_formattersget_formatter_by_nameload_formatter_from_fileget_formatter_for_filenamefind_formatter_class)TerminalFormatter)Terminal256FormatterTerminalTrueColorFormatter)get_all_filtersfind_filter_class)get_all_stylesget_style_by_namecZi}|s|S|D]}|s|d}|D]r}|} |dd\}}|}|}|||<^#t$rd||<YowxYw|S)N,=T)stripsplit ValueError)o_strsoptso_stro_argso_argo_keyo_vals |/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/pip/_vendor/pygments/cmdline.py_parse_optionsr1!s D   $ ${{}}  S!! $ $EKKMME $${{322 u  $U  # # #"U  # $ KsABB'&B'cg}|s|S|D]\}d|vr?|dd\}}||t|gfE||if]|S)N:r%)r'appendr1)f_strsfiltersf_strfnamefoptss r0_parse_filtersr:6sG (( %<< ;;sA..LE5 NNE>5'#:#:; < < < < NNE2; ' ' ' ' NcB |dkrIt|}td|jdtt|jn|dkrIt |}td|jdtt|jnI|dkrCt |}td|dtt|jdS#ttf$r"t|d tj Yd SwxYw) Nlexerz Help on the z lexer: formatterz formatter:filterz filter:rz not found!filer%) rprintnamer__doc__rrAttributeErrorr(sysstderr)whatrCclss r0 _print_helprJCs7 7??#D))C 2222 3 3 3 &%% & & & & [ &t,,C 6666 7 7 7 &%% & & & & X  #D))C //// 0 0 0 &%% & & &q J ' """4444qqsC'C++/DDc||dkrttdtdg}tD]T\}}}}d|dz||rdd|zdzpdf}||U||D]}td j|dS|d krttd td g}t D]m}t|} d|jdz| |j r dd|j zdzpdf}||n||D]}td j|dS|d krttdtdtD]E} t| }td| zdztdt|FdS|dkrttdtdtD]G} t| }td| zdztdt|FdSdS)Nr=zLexers:z~~~~~~~z, r3z (filenames )z* {} {} {}r>z Formatters:z ~~~~~~~~~~~r?zFilters:z~~~~~~~~z* z stylezStyles:)rBr joinr4sortformatrraliases filenamesrrr r!) rHinfofullnamenamesexts_tupirIdocrCs r0 _print_listr\Ws w  i i(6(8(8   $HeT199U##C'AMDIIdOO;cAGRIC KK      2 2A ,$,a0 1 1 1 1 2 2     m m%''  C$S))C99S[))C/cm7B 499S]#;#;;cA7HEGIC KK      2 2A ,$,a0 1 1 1 1 2 2     j j#%% 4 4D#D))C $+# $ $ $ 2+C0022 3 3 3 3 4 4   i i"$$ 4 4D#D))C $+# $ $ $ 2+C0022 3 3 3 3   4 4r;c(ddl}i}d|vr&i}tD]\}}}}|||d||<||d<d|vr?i}tD])}t|} |j|j| d||j<*||d<d|vr;i}tD]%} t| }d t|i|| <&||d <d |vr;i}tD]%} t| }d t|i|| <&||d <| |tj dS) Nrr=)rRrS mimetypeslexersr>)rRrSr[ formattersr?r[r6rNstyles)jsonr rrrRrSrCrrr r!dumprFstdout) requested_itemsrbresultrTrUrVrSr^rIr[rCs r0_print_list_as_jsonrgsKKK F/!!5C5E5E   1HeY  &&DNN  xo%%%''  C$S))C; ]DNN $|?""#%%  D#D))C)#..DJJ!y/!!"$$  D#D))C)#..DJJ xIIfcj!!!!!r;cP&jr|dSjrtdtddSfd}j3t }tD]\}}|r| || d| d|r!|tj dSj stdd ghd &d jD}t&fd |Dr!|tj dS|s&}j s|D]}t!|nt#|dSjrk|d s!|tj dSj\}} |dvr!|tj dSt'|| St)jpg} jpgD]6} | dd\} } | | | <"#t0$rd| | <Y3wxYw| d| d} | d| d}jr9t7j}|t8}t|jddSjritjj !} tE|| }n#tF$r t8}YnwxYwt|jddSj$}j%}|Ɖj&}|s!|tj dSj'sj(r!|tj dS || d<tS|fi| }n3#tF$r&}t|tj Yd}~dSd}~wwxYwt|*|pddSj%!|tj dStWj,pg}t[j.}d}j'}|r|rd|vr} d}d} d|vr|/dd\}} d| vrd} |r| rta|| fi| }n ta|fi| }n~#tF$r'}td|tj Yd}~dSd}~wwxYw tc|fi| }n;#tdtFf$r'}td|tj Yd}~dSd}~wwxYwd}j(r_j3rtdtj dSj(} ti|d5}|!}dddn #1swxYwYn4#tj$r'}td|tj Yd}~dSd}~wwxYw| stm|\}} |s to||fi| }n1#tF$r^}j8r+ tE|fi| }n>#tF$rt9d,i| }Yn&wxYwtd|tj Yd}~dSYd}~nd}~wtd$r'}td|tj Yd}~dSd}~wwxYwnj3sptjj !}| sts|tj\}} |s+ tE|fi| }n<#tF$rt9d,i| }Yn$wxYwn|stdtj dS|D]I\}} |j:|fi|#tF$r(}td|tj Yd}~dSd}~wwxYwj;}j&}|r|rd|vr} d}d} d|vr|/dd\}} d| vrd} |r| rty|| fi| }n ty|fi| }n~#tF$r'}td|tj Yd}~dSd}~wwxYw tS|fi| }n;#tdtFf$r'}td|tj Yd}~dSd}~wwxYw|r|sJ t{|fi| }n;#tdtFf$r'}td|tj Yd}~dSd}~wwxYw ti|d} n#tj$r'}td |tj Yd}~dSd}~wwxYw|sjt|j?d!dd"vr td,i| }n;d#t|j?d$dvr td,i| }n td,i| }tjCj } |s(|r| |_DnttjC|_D|sitjFd%vr[|jGd&vrRt| |jD'} d|_D ddlI}!|!jJK| ddd(d)} n#t$rYnwxYw| d*d}"t|"dkr6t|tr!|"d}#|"d}$t|#|$|}j3sH t|||| |r| Rn#|r| RwwxYwdS tjj S}%|%snY| s ts|%tjd}%t|%||| t| d+r| U |r| RdSdS#t$rY|r| RdSdSwxYw#|r| RwwxYw)-NrzPygments version uD, (c) 2006-2024 by Georg Brandl, Matthäus Chajdas and contributors.c|tfdtD S)Nc3.K|]\}}|k |VdSN).0kvopts r0 z5main_inner..is_only_option..s+GGVaa3hhqhhhhGGr;)anyvarsitems)rpargnss`r0is_only_optionz"main_inner..is_only_options<GGGGtE{{'8'8':':GGGGGGGr;LrbrM-V>r=rNr?r>c8g|]}|dS)s)rstrip)rmargs r0 zmain_inner..s"444SC444r;c3 K|]}|vV dSrkrl)rmr} allowed_typess r0rqzmain_inner..s(99Cs-'999999r;H)r=r>r?r$r%T inencodingencoding outencoding)rrNr@z.pyr3zError:z5Error: -s option not usable when input file specifiedrbzError: cannot read infile:z7Error: when using -s a lexer has to be selected with -lwbzError: cannot open outfile: COLORTERM) truecolor24bit256TERM)win32cygwin)Terminal Terminal256)rF)convertr& autoresetwrap escapeinsideflushrl)Whelp print_helpVrBrrwsetrsrtadddiscardrFrGrbmainrrr\rgrrJr1OPr'r(getNrrrRCstdinbufferreadrrSafl INPUTFILErget_style_defsr:Fboolxrsplitrrrr{open Exceptionr rgr add_filterorrosenvironrrrrdrr platformrCr colorama.initialise initialise wrap_stream ImportErrorlen isinstancerrrclosereadlinehasattrrKeyboardInterrupt)'parserrurvarg_setrnrolargsr}rHrC parsed_optsp_optvaluerrr=inpS_opta_optf_optfmtererrF_optsallow_custom_lexer_formatter lexernamefilenamecodeinfninfpr8r9outfnoutfilecoloramarleftrightliners' ` @r0 main_innerrs@ zq w *+*** + + +qHHHHH w%%KK%%''  DAq  A     cj ) ) )1z  "d   AAA 44EG444 99995999 9 9    cj ) ) )1 "!Ez ' ! !C     !  & & &q w'~c""    cj ) ) )1W d 7 7 7   cj ) ) )14&&&!B//KB&& &++c1--KD%!&K   & & &!%K    & {z/J/JKKJ//-1L1LMMK w-eg66 =E emAq wi##%%  ;;;EE   EEE  emAq GE GE     cj ) ) )1 7 eo    cj ) ) )1 #(K )%??;??EE    #CJ ' ' ' '11111  e""5;B//000q w#*%%%qEGMr * *F$(==  EI ' EY,>,> )##%.%5%5c1%=%=NHd}} $KK04@@3>@@EE1JJkJJE    h#*5555qqqqq  ))CC{CC/   h#*5555qqqqq  D 2 7  Iz # # # #1 dD!! #Tyy{{ # # # # # # # # # # # # # # #    .#* E E E E11111  2+D11 D*  .tTII[II    79 +D @ @K @ @(999 ) 8 8K 8 89(Ccj999911111   h#*5555qqqqq   Wy$$&& K9$ JJ D* 1 1#D88K88  1 1 1!00K00 1 1  Kz # # # #1 u  E U , ,e , , , ,    (Ccj 1 1 1 1111111  GE GE  ' EUNN %<<%*\\#q%9%9NHd}}#KK4XtDD7BDDEE5UJJkJJE    h#*5555qqqqq  -eCC{CC/   h#*5555qqqqq  $  25HHKHH/   h#*5555qqqqq  5$''GG    /3: F F F F11111  9z~~k"--1GGG2AA[AA"*..4444,;;{;;)88K88*# ;  ;'ENN/sz::EN  OS\%888 z000(5>JJJ O & & & &)55TU6OOGG    D ??>266L <A*UN"C"CAQ"466 7  dE5' 2 2 2     q  $y'0022!J5dCIFFqID$ug6667G,,$MMOOO $    !           sH44IILL,+L,5O O8O33O8AS S>S99S> TU!UUV>V2& V>2V66V>9V6:V>> W/W**W/ X Z0#Y<+ X98Y<9YY<YY<< Z0 Z++Z0 \\'&\']!! ^+^^-A_55 `&?`!!`&* `88a0 a++a08 bb>b99b>c dc??d%h hhj))kBm## n -n n  n n%ceZdZddZdS) HelpFormatterrxNc|- tjjdz }n#t$rYnwxYwtj|||||dS)Nrx)shutilget_terminal_sizecolumnsrargparser__init__)selfprogindent_incrementmax_help_positionwidths r0rzHelpFormatter.__init__sz = 022:Q>    ''d4D(95 B B B B Bs  --)rxrN)__name__ __module__ __qualname__rrlr;r0rrs.BBBBBBr;rc d}tj|dt}|d}|}|ddd|d d d |d ddd|ddd|dddd|dddd|ddd|ddd !|d"}|d#d d$ |d%d d& |d'd d( |d)d*dd +|d,}|}|d-d.d/|d0d1d2d34|d5d6d7|d8d d9 |d:d;d?|d@d dA |dBdCd dD |dEdFdG||dHdI} t||S#t$rYdJSt$r|j rttj KtdLtj KtdMtj KtdNtj KtdOtj KtdLtj Kttj KdJdIl} | jtj} | dP} t%| dQkrQ| dR| dSdTdJdHdIz } ttj KtdUtj Kt| tj KtdVtj KYdHSwxYw)Wz( Main command line entry point. z?Highlight an input file and write the result to an output file.F) descriptionadd_helpformatter_classzMain operationz-lLEXERz~Specify the lexer to use. (Query names with -L.) If not given and -g is not present, the lexer is guessed from the filename.)metavarrz-g store_truez`Guess the lexer from the file contents, or pass through as plain text if nothing can be guessed.)actionrz-FzFILTER[:options]r4znAdd a filter to the token stream. (Query names with -L.) Filter options are given after a colon if necessary.)rrrz-f FORMATTERzSpecify the formatter to use. (Query names with -L.) If not given, the formatter is guessed from the output filename, and defaults to the terminal formatter if the output is to the terminal or an unknown file extension.z-OzOPTION=value[,OPTION=value,...]zyGive options to the lexer and formatter as a comma-separated list of key-value pairs. Example: `-O bg=light,python=cool`.z-Pz OPTION=valuezGive a single option to the lexer and formatter - with this you can pass options whose value contains commas and equal signs. Example: `-P "heading=Pygments, the Python highlighter"`.z-o OUTPUTFILEz8Where to write the output. Defaults to standard output.r?z5Where to read the input. Defaults to standard input.)nargsrzOperation flagsz-vzbPrint a detailed traceback on unhandled exceptions, which is useful for debugging and bug reports.z-sa!Process lines one at a time until EOF, rather than waiting to process the entire file. This only works for stdin, only for lexers with no line-spanning constructs, and is intended for streaming input such as you get from `tail -f`. Example usage: `tail -f sql.log | pygmentize -s -l sql`.z-xaAllow custom lexers and formatters to be loaded from a .py file relative to the current working directory. For example, `-l ./customlexer.py -x`. By default, this option expects a file with a class named CustomLexer or CustomFormatter; you can also specify your own class name with a colon (`-l ./lexer.py:MyLexer`). Users should be very careful not to use this option with untrusted files, because it will import and run them.z--jsonz=Output as JSON. This can be only used in conjunction with -L.)rdefaultrz*Special modes - do not do any highlightingz-SzSTYLE -f formatterzqPrint style definitions for STYLE for a formatter given with -f. The argument given by -a is formatter dependent.z-L*WHATzList lexers, formatters, styles or filters -- give additional arguments for the thing(s) you want to list (e.g. "styles"), or omit them to list everything.)rrrz-NFILENAMEzGuess and print out a lexer name based solely on the given filename. Does not take input or highlight anything. If no specific lexer can be determined, "text" is printed.z-CzXLike -N, but print out a lexer name based solely on a given content from standard input.z-Hstorerx)NAMETYPEzrPrint detailed help for the object of type , where is one of "lexer", "formatter" or "filter".)rrrrryzPrint the package version.z-hz--helpzPrint this help.z-aARGzKFormatter-specific additional argument for the -S (print style sheet) mode.r%Nrr@zA*****************************************************************z3An unhandled exception occurred while highlighting.z9Please report the whole traceback to the issue tracker atz..z (f{}) z*** Error while highlighting:z>*** If this is a bug you want to report, please rerun with -v.)rArgumentParserradd_argument_groupadd_mutually_exclusive_group add_argument parse_argsrBrokenPipeErrorrrorBrFrG tracebackformat_exceptionexc_infor&rrQr') argsdescr operationlexerselflagsspecial_modes_group special_modesrur rTmsgs r0rrs MD  $5BDDDF))*:;;I5577H  gOPPP  \3444 (?@@@ k1222  7.///  nXDEEE  l GIII3 DFFF  % %&7 8 8E  \3444  \CDDD  \6777 x'/ !33466'DDFFM *  C<===  j6777  \/000 WA/?CDDD \ )+++ h| !!!$$ e%   d122h ' 'E&%((( qq  7  sz " " " " ( , , , , Gz # # # # Mz # # # # Bz # # # # ( , , , , sz " " " " )y)3<>>:2hnn t99>> <&&tBx~~d';';A'>'D'D'F'Fqrr'JKK KC 3: -CJ???? c #### N:    qq1s J R)GRR)8rDrrFrrtextwraprpip._vendor.pygmentsrrpip._vendor.pygments.utilrrrr r r r pip._vendor.pygments.lexersr rrrrr#pip._vendor.pygments.lexers.specialr%pip._vendor.pygments.formatters.latexrrpip._vendor.pygments.formattersrrrrr(pip._vendor.pygments.formatters.terminalr+pip._vendor.pygments.formatters.terminal256rrpip._vendor.pygments.filtersrrpip._vendor.pygments.stylesr r!r1r:rJr\rgrrargvrrlr;r0r s 77777777PPPPPPPPPPPPPPPP999999TTTTTTTTOOOOOOOOOOOOOOFFFFFFhhhhhhhhKKKKKKKKIIIIIIII*   (040404f*"*"*"XL L L ^ BBBBBH*BBBhLLLLLLr;