
    gh\                     j   S r SSKrSSKrSSKrSSKrSSKJr  SSKJrJ	r	  SSK
JrJrJrJrJrJrJr  SSKJrJrJrJrJrJr  SSKJr  SSKJrJr  SS	KJrJ r J!r!J"r"J#r#  SS
K$J%r%  SSK&J'r'J(r(  SSK)J*r*J+r+  SSK,J-r-J.r.  S r/S r0S r1S r2S r3S r4 " S S\Rj                  5      r5\Rl                  4S jr7g)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OptionErrordocstring_headlineguess_decodeguess_decode_from_terminalterminal_encodingUnclosingTextIOWrapper)get_all_lexersget_lexer_by_nameguess_lexerload_lexer_from_fileget_lexer_for_filenamefind_lexer_class_for_filename)	TextLexer)LatexEmbeddedLexerLatexFormatter)get_all_formattersget_formatter_by_nameload_formatter_from_fileget_formatter_for_filenamefind_formatter_class)TerminalFormatter)Terminal256FormatterTerminalTrueColorFormatter)get_all_filtersfind_filter_class)get_all_stylesget_style_by_namec                 L   0 nU (       d  U$ U  H}  nUR                  5       (       d  M  UR                  S5      nU HL  nUR                  5       n UR                  SS5      u  pVUR                  5       nUR                  5       nXaU'   MN     M     U$ ! [         a    SX'    Mg  f = f)N,=   T)stripsplit
ValueError)o_strsoptso_stro_argso_argo_keyo_vals          d/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/pip/_vendor/pygments/cmdline.py_parse_optionsr1   !   s    D{{}}S!EKKME$${{32 $U 	  K	  #"#s   4BB#"B#c                     / nU (       d  U$ U  HO  nSU;   a3  UR                  SS5      u  p4UR                  U[        U/5      45        M<  UR                  U0 45        MQ     U$ )N:r%   )r'   appendr1   )f_strsfiltersf_strfnamefoptss        r0   _parse_filtersr:   6   sa    G%< ;;sA.LENNE>5'#:;<NNE2;'  N    c                     U S:X  aC  [        U5      n[        SUR                   S35        [        [        UR                  5      5        gU S:X  aC  [        U5      n[        SUR                   S35        [        [        UR                  5      5        gU S:X  a8  [        U5      n[        SU S35        [        [        UR                  5      5        g! [        [        4 a    [        U  S	3[        R                  S
9   gf = f)NlexerzHelp on the z lexer:	formatterz formatter:filterz filter:r   z not found!filer%   )r   printnamer   __doc__r   r   AttributeErrorr(   sysstderr)whatrC   clss      r0   _print_helprJ   C   s    7?#D)CL
'23&%&  [ &t,CL
+67&%&
 	 X#D)CLh/0&%&J' k"4s   AC AC >C +D Dc                    U S:X  a  [        5         [        S5        [        S5        / n[        5        HU  u  p#pESR                  U5      S-   UU=(       a    SSR                  U5      -   S-   =(       d    S4nUR                  U5        MW     UR	                  5         U H  n[        S	R
                  " U6 5        M     g U S
:X  a  [        5         [        S5        [        S5        / n[        5        Hz  n[        U5      n	SR                  UR                  5      S-   XR                  =(       a!    SSR                  UR                  5      -   S-   =(       d    S4nUR                  U5        M|     UR	                  5         U H  n[        S	R
                  " U6 5        M     g U S:X  ae  [        5         [        S5        [        S5        [        5        H6  n
[        U
5      n[        SU
-   S-   5        [        S[        U5       35        M8     g U S:X  ae  [        5         [        S5        [        S5        [        5        H6  n
[        U
5      n[        SU
-   S-   5        [        S[        U5       35        M8     g g )Nr=   zLexers:z~~~~~~~z, r3   z(filenames ) z* {}
    {} {}r>   zFormatters:z~~~~~~~~~~~r?   zFilters:z~~~~~~~~z* z    stylezStyles:)rB   r   joinr4   sortformatr   r   aliases	filenamesr   r   r    r!   )rH   infofullnamenamesexts_tupirI   docrC   s              r0   _print_listr\   W   s   wii(6(8$HT99U#C'AMDIIdO;cAGRICKK )9 			A$,,a01  
	mm%'C$S)C99S[[)C/mm 7B 499S]]#;;cA7HEGICKK	 (
 			A$,,a01  
	jj#%D#D)C$+#$D+C0123 &
 
ii"$D#D)C$+#$D+C0123 % 
r;   c                    SS K n0 nSU ;   a"  0 n[        5        H  u  pEpgUUUS.X4'   M     X2S'   SU ;   aH  0 n[        5        H4  n[        U5      n	UR                  UR
                  U	S.X8R                  '   M6     X2S'   SU ;   a1  0 n[        5        H  n
[        U
5      nS	[        U5      0X:'   M     X2S
'   SU ;   a1  0 n[        5        H  n
[        U
5      nS	[        U5      0X:'   M     X2S'   UR                  U[        R                  5        g )Nr   r=   )rR   rS   	mimetypeslexersr>   )rR   rS   r[   
formattersr?   r[   r6   rN   styles)jsonr   r   r   rR   rS   rC   r   r   r    r!   dumprF   stdout)requested_itemsrb   resultrT   rU   rV   rS   r^   rI   r[   rC   s              r0   _print_list_as_jsonrg      s(   F/!5C5E1HY &&DN 6F  xo%%'C$S)C;; ]]DN (  $|?"#%D#D)C)#.DJ &
 !y/!"$D#D)C)#.DJ %
  xIIfcjj!r;   c                   ^^& TR                   (       a  U R                  5         gTR                  (       a  [        S[         S35        gU4S jnTR
                  GbP  [        5       n[        T5      R                  5        H  u  pEU(       d  M  UR                  U5        M!     UR                  S5        UR                  S5        U(       a   U R                  [        R                  5        gTR                  (       d  [        SS	/5        1 S
km&TR
                   Vs/ s H  ofR                  S5      PM     nn[!        U&4S jU 5       5      (       a   U R                  [        R                  5        gU(       d  T&nTR                  (       d  U H  n[#        U5        M     g[%        U5        gTR&                  (       al  U" S5      (       d   U R                  [        R                  5        gTR&                  u  pUS;  a   U R                  [        R                  5        g[)        X5      $ [+        TR,                  =(       d    / 5      n
TR.                  =(       d    /  H  n UR1                  SS5      u  pXU	'   M     U
R5                  SU
R5                  S5      5      nU
R5                  SU
R5                  S5      5      nTR6                  (       a7  [9        TR6                  5      nUc  [:        n[        UR<                  S   5        gTR>                  (       aL  [        R@                  RB                  RE                  5       n [G        UUS9n[        UR<                  S   5        gTRJ                  nTRL                  nUb  TRN                  nU(       d   U R                  [        R                  5        gTRP                  (       d  TRR                  (       a   U R                  [        R                  5        g UU
S'   [U        U40 U
D6n[        URW                  U=(       d    S5      5        gTRL                  b   U R                  [        R                  5        g[Y        TRZ                  =(       d    / 5      n[]        TR^                  5      nS nTRP                  nU(       ak  U(       aW  SU;   aQ   S nS n	SU;   a  URa                  SS5      u  nn	SU	;   a  S n	U(       a  U	(       a  [c        UU	40 U
D6nO[c        U40 U
D6nO [e        U40 U
D6nS nTRR                  (       a  TRh                  (       a  [        S[        R                  S9  gTRR                  n [k        US5       nURE                  5       nS S S 5        U(       d  [o        U5      u  nnU(       d   [q        UU40 U
D6nOOTRh                  (       db  [        R@                  RB                  RE                  5       nU(       d  [u        U[        R@                  5      u  nnU(       d   [G        U40 U
D6nO!O U(       d  [        S[        R                  S9  gU H  u  nn URv                  " U40 UD6  M     TRx                  nTRN                  nU(       ak  U(       aW  SU;   aQ   S nS n	SU;   a  URa                  SS5      u  nn	SU	;   a  S n	U(       a  U	(       a  [{        UU	40 U
D6nO[{        U40 U
D6nO [U        U40 U
D6nU(       a"  U(       d   [}        U40 U
D6n [k        US5      n OU(       dk  [~        R                  R5                  S!S5      S";   a  [        S,0 U
D6nO;S#[~        R                  R5                  S$S5      ;   a  [        S,0 U
D6nO[        S,0 U
D6n[        R                  RB                  n U(       d-  U(       a  UUlE        O[        [        R                  5      UlE        U(       da  [        R                  S%;   aM  UR                  S&;   a=  [        U UR                  S'9n S UlE         SS KJn!U!R                  R                  U S S S(SS)9n U
R5                  S*S5      n"[        U"5      S:X  a,  [        U[        5      (       a  U"S   n#U"S   n$[        U#U$U5      nTRh                  (       d'   [        UUUU 5        U(       a  U R                  5         g  [        R@                  RB                  R                  5       n%U%(       d  OUU(       d  [u        U%[        R@                  5      S   n%[        U%UUU 5        [        U S+5      (       a  U R                  5         M   U(       a  U R                  5         ggs  snf ! [2         a	    SX'    GM  f = f! [H         a
    [:        n GN<f = f! [H         a"  n[        U[        R                  S9   S nAgS nAff = f! [H         a#  n[        SU[        R                  S9   S nAgS nAff = f! [f        [H        4 a#  n[        SU[        R                  S9   S nAgS nAff = f! , (       d  f       GN= f! [l         a#  n[        SU[        R                  S9   S nAgS nAff = f! [H         ag  nTRr                  (       a3   [G        U40 U
D6n S nAGNX! [H         a    [;        S,0 U
D6n  S nAGNtf = f[        SU[        R                  S9   S nAgS nAf[f         a#  n[        SU[        R                  S9   S nAgS nAff = f! [H         a    [;        S,0 U
D6n GNf = f! [H         a$  n[        SU[        R                  S9   S nA  gS nAff = f! [H         a#  n[        SU[        R                  S9   S nAgS nAff = f! [f        [H        4 a#  n[        SU[        R                  S9   S nAgS nAff = f! [f        [H        4 a#  n[        SU[        R                  S9   S nAgS nAff = f! [l         a#  n[        S U[        R                  S9   S nAgS nAff = f! [         a     GNf = f! U(       a  U R                  5         f f = f! [         a     U(       a  U R                  5         ggf = f! U(       a  U R                  5         f f = f)-Nr   zPygments version uD   , (c) 2006-2024 by Georg Brandl, Matthäus Chajdas and contributors.c                 h   >^  [        U 4S j[        T5      R                  5        5       5      (       + $ )Nc              3   <   >#    U  H  u  pUT:w  d  M  Uv   M     g 7fN ).0kvopts      r0   	<genexpr>5main_inner.<locals>.is_only_option.<locals>.<genexpr>   s     G':Vaa3hqq':s   	)anyvarsitems)rp   argnss   `r0   is_only_option"main_inner.<locals>.is_only_option   s$    GtE{'8'8':GGGGr;   Lrb      rM   -V>   r=   rN   r?   r>   sc              3   ,   >#    U  H	  oT;  v   M     g 7frk   rl   )rm   argallowed_typess     r0   rq   main_inner.<locals>.<genexpr>   s     95C-'5s   H)r=   r>   r?   r$   r%   T
inencodingencodingoutencoding)r   rN   r@   z.pyr3   zError:z5Error: -s option not usable when input file specifiedrbzError: cannot read infile:z7Error: when using -s a lexer has to be selected with -lwbzError: cannot open outfile:	COLORTERM)	truecolor24bit256TERM)win32cygwin)TerminalTerminal256)r   F)convertr&   	autoresetwrapescapeinsideflushrl   )Xhelp
print_helpVrB   r   ry   setrt   ru   adddiscardrF   rG   rb   mainrstriprs   r\   rg   r   rJ   r1   OPr'   r(   getNr   r   rR   Cstdinbufferreadr   r   Safl	INPUTFILEr   get_style_defsr:   Fboolxrsplitr   r   r   r|   open	Exceptionr	   r   gr
   
add_filteror   r   osenvironr   r   r   rd   r   r   platformrC   r   colorama.initialise
initialisewrap_streamImportErrorlen
isinstancer   r   r   closereadlinehasattrr   KeyboardInterrupt)'parserrv   rw   arg_setrn   ro   r~   largsrH   rC   parsed_optsp_optvaluer   r   r=   inpS_opta_optf_optfmtererrF_optsallow_custom_lexer_formatter	lexernamefilenamecodeinfninfpr8   r9   outfnoutfilecoloramar   leftrightliner   s'    `                                    @r0   
main_innerr      sc
   zzww!+ /* * 	+H ww%K%%'DAqA ( 	cjj) zz"dA,1GG4GSCG495999cjj)!EzzC     & wwc""cjj)WW
77cjj)4&& !B/K B	&++c1-KD !&  {z/JKJ//-1LMK ww-egg6=EemmA wwii##%	
;E 	emmA GGEGGEcjj)77eoocjj)	#(K )%?;?E
 	e""5;B/0 ww#**% EGGMr*F $(=  E I'EY,>)#%.%5%5c1%=NHd}  $04 @3>@E 1JkJE
))C{C D77Izz#	dD!Tyy{ "
 +D1D* .tTI[I   WW yy$$&9$		JD*1#D8K8  Kzz# u	U,e,  GGEGGE'EUN%<%*\\#q%9NHd}#4Xt D7BDE 5UJkJE
-eC{C
 25HKH	5$'G
 zz~~k"-1GG2A[A"**..44,;{;)8K8**## 'EN /szz:EN S\\%88zz00(5>>J	O& ))55TU 6 OG ??>26L
<A*UN"C"CAQ"46 77	 dE5'2	 yy''002!5dCIIFqID$ug67G,,MMO    Y	 5>  	&!%K	&.  	E	*  	#CJJ'	T ! h#**5  / h#**5 "! 	.#**E	 ! 779 +D @K @( 9 ) 8K 89 (Ccjj9 h#**5 ! 1!0K01  	(Ccjj1	2 ! h#**5  / h#**5  / h#**5
  	/3::F	<  		*    ! 	 	  s  e"e
e5 6f .Af; 1f; ?g+ h3 !h!2h3 i# l lAm 	m m? 2n5 ?o+ p p, :Bq	 e21e25f	f	
f8f33f8;
g(g##g(+h;hh!
h0+h3 0h3 3
i =ii #
k?-k?jj.&k-j..kk?k::k?ll
m(mm
m<m77m<?n2n--n25o(o##o(+
p5pp
p)(p),q	
q.q1 -q..q1 1rc                       \ rS rSrSS jrSrg)HelpFormatteri  Nc                     Uc#   [         R                  " 5       R                  S-
  n[        R
                  R                  XUX45        g ! [         a     N.f = f)Nrz   )shutilget_terminal_sizecolumnsr   argparser   __init__)selfprogindent_incrementmax_help_positionwidths        r0   r   HelpFormatter.__init__  sX    =002::Q> 	''4D(9	B  s   "A	 	
AArl   )rz      N)__name__
__module____qualname____firstlineno__r   __static_attributes__rl   r;   r0   r   r     s    Br;   r   c                 B   Sn[         R                  " US[        S9nUR                  S5      nUR	                  5       nUR                  SSSS9  UR                  S	S
SS9  UR                  SSSSS9  UR                  SSSS9  UR                  SSSSS9  UR                  SSSSS9  UR                  SSSS9  UR                  SSS S!9  UR                  S"5      nUR                  S#S
S$S9  UR                  S%S
S&S9  UR                  S'S
S(S9  UR                  S)S*SS
S+9  UR                  S,5      nUR	                  5       nUR                  S-S.S/S9  UR                  S0S1S2S3S49  UR                  S5S6S7S9  UR                  S8S
S9S9  UR                  S:S;S<S=S>S?9  UR                  S@S
SAS9  UR                  SBSCS
SDS9  UR                  SESFSGS9  UR                  U SHSI 5      n [        X(5      $ ! [         a     gJ[         Ga    UR                  (       a  [        [        R                  SK9  [        SL[        R                  SK9  [        SM[        R                  SK9  [        SN[        R                  SK9  [        SO[        R                  SK9  [        SL[        R                  SK9  [        [        R                  SK9  e SJSIKn	U	R                  " [        R                   " 5       6 n
U
SP   R#                  5       n[%        U
5      SQ:  a:  USRR'                  U
SS   R)                  ST5      SJ   R#                  5       SHSI 5      -  n[        [        R                  SK9  [        SU[        R                  SK9  [        U[        R                  SK9  [        SV[        R                  SK9   gHf = f)Wz 
Main command line entry point.
z?Highlight an input file and write the result to an output file.F)descriptionadd_helpformatter_classzMain operationz-lLEXERz~Specify the lexer to use.  (Query names with -L.)  If not given and -g is not present, the lexer is guessed from the filename.)metavarr   z-g
store_truez`Guess the lexer from the file contents, or pass through as plain text if nothing can be guessed.)actionr   z-FzFILTER[:options]r4   znAdd a filter to the token stream.  (Query names with -L.) Filter options are given after a colon if necessary.)r   r   r   z-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-OzOPTION=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.)nargsr   zOperation 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-xa  Allow 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.)r   defaultr   z*Special modes - do not do any highlightingz-SzSTYLE -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.)r   r   r   z-NFILENAMEzGuess 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-Hstorerz   )NAMETYPEzrPrint detailed help for the object <name> of type <type>, where <type> is one of "lexer", "formatter" or "filter".)r   r   r   r   r{   zPrint the package version.z-hz--helpzPrint this help.z-aARGzKFormatter-specific additional argument for the -S (print style sheet) mode.r%   Nr   r@   zA*****************************************************************z3An unhandled exception occurred while highlighting.z9Please report the whole traceback to the issue tracker atz.<https://github.com/pygments/pygments/issues>.   z	
   (f{})
z*** Error while highlighting:z>*** If this is a bug you want to report, please rerun with -v.)r   ArgumentParserr   add_argument_groupadd_mutually_exclusive_groupadd_argument
parse_argsr   BrokenPipeErrorr   ro   rB   rF   rG   	tracebackformat_exceptionexc_infor&   r   rQ   r'   )argsdescr   	operationlexerselflagsspecial_modes_groupspecial_modesrv   r  rT   msgs               r0   r   r     sW    MD$$5BDF ))*:;I557HgO  P \3  4 (?  @ k1  2 7.  /
 nXD  E
 lG  I 3D  F %%&78E	\3  4 
\C  D 
\6  7 
x '/  
 !3346'DDFM*  
 C<  =
 j6  7
 \/  0 WA/?C  D \)  + h|  ! $$e % 
 d12h'E&((  77szz"(,Gzz#Mzz#Bzz#(,szz"))3<<>:2hnnt9><&&tBx~~d';A'>'D'D'Fqr'JKKC3::-CJJ?c

#N::	1s   !
G, ,
N8F#NN)8rD   r   rF   r   r   textwrapr   pip._vendor.pygmentsr   r   pip._vendor.pygments.utilr   r   r   r	   r
   r   r   pip._vendor.pygments.lexersr   r   r   r   r   r   #pip._vendor.pygments.lexers.specialr   %pip._vendor.pygments.formatters.latexr   r   pip._vendor.pygments.formattersr   r   r   r   r   (pip._vendor.pygments.formatters.terminalr   +pip._vendor.pygments.formatters.terminal256r   r   pip._vendor.pygments.filtersr   r   pip._vendor.pygments.stylesr    r!   r1   r:   rJ   r\   rg   r   r   argvr   rl   r;   r0   <module>r$     s    
 
    7  P P 9 TO O F h K I*
(04f*"XL ^
BH** B hh Lr;   