+
    iD                        ^ RI Ht ^ RIHt ^ RIHtHtHt ^RIH	t	 ]'       d   ^ RI
Ht  ! R R4      t]R8X  dN   ^ R	It^ R
IHt ^ RIHt ^ RIHtHt ^ RIHt ^ RIHt  ! R R4      t]! 4       t]P7                  ]! 4       4       R	# R	# )    )sqrt)	lru_cache)SequenceTupleTYPE_CHECKING)ColorTripletTablec                      a  ] tR t^t o RtV 3R lR ltV 3R lR ltV 3R lR lt]! RR	7      V 3R
 lR l4       t	Rt
V tR# )PalettezA palette of available colors.c                J   < V ^8  d   QhRS[ S[S[S[S[3,          ,          /# )   colors)r   r   int)format__classdict__s   "_/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/pip/_vendor/rich/palette.py__annotate__Palette.__annotate__   s$      xc3m(<=     c                    Wn         R # N_colors)selfr   s   &&r   __init__Palette.__init__   s    r   c                &   < V ^8  d   QhRS[ RS[/# )r   numberreturn)r   r   )r   r   s   "r   r   r      s     3 3# 3, 3r   c                6    \        V P                  V,          !  # r   )r   r   )r   r   s   &&r   __getitem__Palette.__getitem__   s    T\\&122r   c                   < V ^8  d   QhRR/# )r   r    r
    )r   r   s   "r   r   r      s      ' r   c                @   ^ RI Hp ^ RIHp ^ RIHp ^ RIHp V! RRRR\        V P                  4       R	2R
RR7      p\        V P                  4       FG  w  rgVP                  \        V4      \        V4      V! RV! VP                  ! V!  R7      R7      4       KI  	  V# )r   ColorStyle)Textr	   indexRGBr(   r   z colorsTright)titlecaption	highlightcaption_justify)bgcolor)stylez                )pip._vendor.rich.colorr(   pip._vendor.rich.styler*   pip._vendor.rich.textr+   pip._vendor.rich.tabler
   lenr   	enumerateadd_rowstrreprfrom_rgb)r   r(   r*   r+   r
   tabler,   colors   &       r   __rich__Palette.__rich__   s    00.04<<()1#
 &dll3LEMME
UXU5>>53I%JK 4 r   i   )maxsizec                @   < V ^8  d   QhRS[ S[S[S[3,          RS[/# )r   r@   r    )r   r   )r   r   s   "r   r   r   -   s&      5c3/ C r   c                   aaaaa Vw  ooo\         oV P                  P                  oR VVVVV3R llp\        \	        \        V P                  4      4      VR7      pV# )zFind a color from a palette that most closely matches a given color.

Args:
    color (Tuple[int, int, int]): RGB components in range 0 > 255.

Returns:
    int: Index of closes matching color.
c                0    V ^8  d   QhR\         R\        /# )r   r,   r    )r   float)r   s   "r   r   #Palette.match.<locals>.__annotate__:   s     	 	c 	e 	r   c                (  < S
! V 4      w  rpSV,           ^,          pSV,
          pSV,
          pS	V,
          pS! RV,           V,          V,          ^,	          ^V,          V,          ,           RV,
          V,          V,          ^,	          ,           4      # )zGet the distance to a color.i   i  r%   )r,   red2green2blue2red_meanredgreenblue_sqrtblue1	get_colorgreen1red1s   &       r   get_color_distance)Palette.match.<locals>.get_color_distance:   s    "+E"2D%t)H+CVOE5=D>S(3.14e)e#$8^t+d2q8: r   )key)r   r   r"   minranger9   )	r   r@   rV   	min_indexrQ   rR   rS   rT   rU   s	   &&  @@@@@r   matchPalette.match,   sR     $feLL,,		 	 c$,,/06HI	r   r   N)__name__
__module____qualname____firstlineno____doc__r   r"   rA   r   r\   __static_attributes____classdictcell__r   s   @r   r   r      s?     ( 3 3 0 t r   r   __main__N)Iterabler'   )ConsoleConsoleOptions)Segmentr)   c                   2   a  ] tR t^St o V 3R lR ltRtV tR# )ColorBoxc                <   < V ^8  d   QhRS[ RS[RS[S[,          /# )r   consoleoptionsr    )rh   ri   rg   rj   )r   r   s   "r   r   ColorBox.__annotate__T   s*     	% 	%"	%-;	%g	%r   c           
   #    "   VP                   P                  ^,
          p\        ^ V4       EF  p\        VP                  4       F  pWRP                  ,          pWC^,           ,          p\        P
                  ! WgR4      w  rp
\        P
                  ! Wg^V,          ^,          ,           R4      w  rp\        P                  ! V^,          V	^,          V
^,          4      p\        P                  ! V^,          V^,          V^,          4      p\        R\        WR7      4      x  K  	  \        P                  ! 4       x  EK  	  R# 5i)   g      ?u   ▄)r@   r3   N)sizeheightrZ   	max_widthcolorsys
hls_to_rgbr(   r>   rj   r*   line)r   rn   ro   rt   yxhlr1g1b1r2g2b2r3   r@   s   &&&             r   __rich_console__ColorBox.__rich_console__T   s      \\((1,F1f%w001A---AaZ(A!)!4!4Q3!?JBB!)!4!4QQZ!^8Lc!RJBB#nnR#XrCxcJG!NN28R#XrCxHE!%U)LMM 2 lln$ &s   EEr%   N)r^   r_   r`   ra   r   rc   rd   re   s   @r   rl   rl   S   s     	% 	%r   rl   )mathr   	functoolsr   typingr   r   r   color_tripletr   r8   r
   r   r^   rv   rg   r5   r(   pip._vendor.rich.consolerh   ri   pip._vendor.rich.segmentrj   r6   r*   rl   rn   printr%   r   r   <module>r      sg      1 1 ',= =@ z,@0,% %  iGMM(*3 r   