+
    4Ssi                         R  t ] ! 4        ]! ]! 4       P                  4       4       F2  t]P                  4       '       g   K  ]3R lt]]! 4       R],          &   K4  	  AAR tR tRR lt	RR/R lt
RR/R	 ltR
 tR# )c                     \        4       p \        R4       FI  w  rRV,          W&   RV,          V RV,           &   RV,          V RV,           &   RV,          V RV,           &   KK  	  \        V R&   \        V R	&   R
V R&   RV R&   R# )BLACKz[1;3%dmz[3%dmDARK_z[1;4%dmREV_z[4%dm	REV_DARK_PURPLEGREYz[0mC_NORMALz[4m	UNDERLINEN)r   REDGREENYELLOWBLUEMAGENTACYANWHITE)globals	enumerateDARK_MAGENTA
DARK_WHITE)ginames      ./usr/lib/python3/dist-packages/samba/colour.py_gen_ansi_coloursr      s    	A : ;!#'!O'D.(1,&4- +a+
; AhKAfI AjM AkN    c                 >    \        4       V,          : V : \        : 2# )N)r   r	   )sr   s   &&r   _fr   B   s    &y8<<r   zc_%sc                     \        4       p \        V P                  4       4       FR  w  rVP                  4       '       g   K  \	        V\
        4      '       g   K5  VP                  R4      '       g   KN  RW&   KT  	  R# )z5Convert all the ANSI colour codes into empty strings. N)r   listitemsisupper
isinstancestr
startswith)r   kvs      r   switch_colour_offr*   I   sK    	AQWWY99;;:a--!,,v2F2FAD  r   c                     \        4        R# )z%Regenerate all the ANSI colour codes.N)r    r   r   switch_colour_onr-   Q   s    r   c                 Z    V'       d   R MRpV'       d   RMRpRW4\        V 4      3,          # )z01;r!   4838z[%s%s;5;%dm)int)nbgboldweighttargets   &&&  r   xterm_256_colourr7   V   s(    UFTTFA777r   hintautoc                8   V R	9   d   R# V R
9   d   R# V R9  d   \        RV  R24      h^ RIHp VP                  R4      '       d   R# V FL  p\	        V\
        4      '       d   VR8w  d    R# ^ RIpVP                  pVP                  4       '       d   KK   R# 	  R# )a  The hint is presumably a --color argument.

The streams to be considered can be file objects or file names,
with '-' being a special filename indicating stdout.

We follow the behaviour of GNU `ls` in what we accept.
* `git` is stricter, accepting only {always,never,auto}.
* `grep` is looser, accepting mixed case variants.
* historically we have used {yes,no,auto}.
* {always,never,auto} appears the commonest convention.
* if the caller tries to opt out of choosing and sets hint to None
  or '', we assume 'auto'.
FTNzunexpected colour hint: z; try always|never|auto)environNO_COLOR-)nonevernone)yesalwaysforce)r9   ttyzif-ttyNr!   )	
ValueErrorosr;   getr%   r&   sysstdoutisatty)r8   streamsr;   streamrH   s   $*   r   is_colour_wantedrM   ]   s     &&))663D6 :1 1 2 	2 {{:fc"" }ZZF}}  r   c                 X    \        VR V / pV'       d   \        4        V# \        4        V# )r8   )rM   r-   r*   )r8   rK   wanteds   $* r   colour_if_wantedrP      s.    w2T2F M 	Mr   c                   ^ RI Hp . p\        V \        4      '       d   V P	                  R4      p \        V\        4      '       d   VP	                  R4      pV P                  RR4      p VP                  RR4      pV! RW4      pVP                  4        F  w  rVrxp	VR8X  d   VP                  WV 4       K#  VR8X  d   VP                  \        WV 4      4       KH  VR8X  d   VP                  \        WV	 4      4       Km  VR	8X  d;   VP                  \        WV 4      4       VP                  \        WV	 4      4       K  VP                  R
V R24       K  	  RP                  V4      # )zGenerate a string comparing two strings or byte sequences, with
differences coloured to indicate what changed.

Byte sequences are printed as hex pairs separated by colons.
)SequenceMatcher: u   ␠Nequaldeleteinsertreplacez --unknown diff op z!-- r!   )difflibrR   r%   byteshexrX   get_opcodesappendc_REDc_GREENjoin)
abrR   outr   opalarblbrs
   &&        r   
colourdiffri      s)    (
C!UEE#J!UEE#J			#uA			#uAa#Ammo=JJqRy!8^JJuQ2Y'(8^JJwqRy)*9_JJuQ2Y'(JJwqRy)*JJ,RD56 . 773<r   N)FF)r   r"   r   keys_kr$   r   r*   r-   r7   rM   rP   ri   r,   r   r   <module>rl      s   :(   wy~~
 B	zz|| 	=!#	&2+	 ! 
8)F )XF r   