+
    i                         ^ RI t ^ RIHtHtHtHtHt ^RIHt ^RI	H
t
Ht  ! R R4      t ! R R]4      t ! R	 R
4      t]R8X  d   ]! 4       t]! ]P&                  4       R# R# )    N)IODictListMappingOptional)DEFAULT_STYLES)Style	StyleTypec                      a  ] tR t^t o RtRV 3R lR llt]V 3R lR l4       t]RV 3R lR ll4       t	]RV 3R	 lR
 ll4       t
V 3R ltRtV tR# )Themea  A container for style information, used by :class:`~rich.console.Console`.

Args:
    styles (Dict[str, Style], optional): A mapping of style names on to styles. Defaults to None for a theme with no styles.
    inherit (bool, optional): Inherit default styles. Defaults to True.
Nc                L   < V ^8  d   QhRS[ S[S[S[3,          ,          RS[/# )   stylesinherit)r   r   strr
   bool)format__classdict__s   "]/home/wkmabra/.openclaw/workspace/venv/lib/python3.14/site-packages/pip/_vendor/rich/theme.py__annotate__Theme.__annotate__   s+     
 
wsI~67
IM
    c                :   V'       d   \         P                  ! 4       M/ V n        Vem   V P                  P                  VP	                  4        UUu/ uF4  w  r4T\        V\        4      '       d   TM\        P                  ! V4      bK6  	  upp4       R # R # u uppi )N)r   copyr   updateitems
isinstancer	   parse)selfr   r   namestyles   &&&  r   __init__Theme.__init__   s{     07n))+BKK (.||~'5 :eU#;#;%UASS'5 s   :B
c                    < V ^8  d   QhRS[ /# )r   return)r   )r   r   s   "r   r   r      s       r   c                    RRP                  R \        V P                  P                  4       4       4       4      ,           pV# )z-Get contents of a config file for this theme.z	[styles]

c              3   4   "   T F  w  rV R V 2x  K  	  R# 5i)z = N ).0r    r!   s   &  r   	<genexpr>Theme.config.<locals>.<genexpr>!   s!      *
3NKDtfCw3Ns   )joinsortedr   r   )r   configs   & r   r/   Theme.config   s?     		 *
39$++:K:K:M3N*
 !
 
 r   c                P   < V ^8  d   QhRS[ S[,          RS[S[,          RS[RR/# )r   config_filesourcer   r%   r   )r   r   r   r   )r   r   s   "r   r   r   '   s5      S'+3C=JN	r   c                    \         P                  ! 4       pVP                  WR7       VP                  R4       UUu/ uF  w  rVV\        P
                  ! V4      bK  	  ppp\        WsR7      pV# u uppi )a  Load a theme from a text mode file.

Args:
    config_file (IO[str]): An open conf file.
    source (str, optional): The filename of the open file. Defaults to None.
    inherit (bool, optional): Inherit default styles. Defaults to True.

Returns:
    Theme: A New theme instance.
)r3   r   )r   )configparserConfigParser	read_filer   r	   r   r   )	clsr2   r3   r   r/   r    valuer   themes	   &&&&     r   	from_fileTheme.from_file&   sg     **,4>Dll8>TU>T{t$E**>TUf. Vs   "A/c                @   < V ^8  d   QhRS[ RS[RS[S[ ,          RR/# )r   pathr   encodingr%   r   )r   r   r   )r   r   s   "r   r   r   ;   s7     L LL!%L8@L	Lr   c                    \        WR7      ;_uu_ 4       pV P                  WAVR7      uuRRR4       #   + '       g   i     R# ; i)a/  Read a theme from a path.

Args:
    path (str): Path to a config file readable by Python configparser module.
    inherit (bool, optional): Inherit default styles. Defaults to True.
    encoding (str, optional): Encoding of the config file. Defaults to None.

Returns:
    Theme: A new theme instance.
)r?   )r3   r   N)openr;   )r8   r>   r   r?   r2   s   &&&& r   read
Theme.read:   s0     $**k==7=K +***s	   3A	c                <   < V ^8  d   Qh/ S[ S[S[3,          ;R&   # )r   r   )r   r   r	   )r   r   s   "r   r   r      s      e r   )r   )NT)TN)__name__
__module____qualname____firstlineno____doc__r"   propertyr/   classmethodr;   rB   __annotate_func____static_attributes____classdictcell__r   s   @r   r   r      se     
 
     & L L Lg  r   r   c                       ] tR t^LtRtRtR# )ThemeStackErrorz5Base exception for errors related to the theme stack.r)   N)rE   rF   rG   rH   rI   rM   r)   r   r   rQ   rQ   L   s    ?r   rQ   c                   ^   a  ] tR t^Pt o RtV 3R lR ltR
V 3R lR lltV 3R lR ltRtV t	R	# )
ThemeStackz>A stack of themes.

Args:
    theme (Theme): A theme instance
c                $   < V ^8  d   QhRS[ RR/# )r   r:   r%   N)r   )r   r   s   "r   r   ThemeStack.__annotate__W   s     ) )e ) )r   c                n    VP                   .V n        V P                  R,          P                  V n        R# )   N)r   _entriesget)r   r:   s   &&r   r"   ThemeStack.__init__W   s%    16==$((r   c                *   < V ^8  d   QhRS[ RS[RR/# )r   r:   r   r%   N)r   r   )r   r   s   "r   r   rU   [   s"     ) ) ) ) )r   c                   V'       d"   / V P                   R,          CVP                  CMVP                  P                  4       pV P                   P                  V4       V P                   R,          P                  V n        R# )zPush a theme on the top of the stack.

Args:
    theme (Theme): A Theme instance.
    inherit (boolean, optional): Inherit styles from current top of stack.
NrX   )rY   r   r   appendrZ   )r   r:   r   r   s   &&& r   
push_themeThemeStack.push_theme[   s_     6=1t}}R 1ELL1%,,BSBSBU 	 	V$==$((r   c                   < V ^8  d   QhRR/# )r   r%   Nr)   )r   r   s   "r   r   rU   i   s     ) )4 )r   c                    \        V P                  4      ^8X  d   \        R4      hV P                  P                  4        V P                  R,          P                  V n        R# )z%Pop (and discard) the top-most theme.zUnable to pop base themeNrX   )lenrY   rQ   poprZ   )r   s   &r   	pop_themeThemeStack.pop_themei   sE    t}}"!"<====$((r   )rY   rZ   N)T)
rE   rF   rG   rH   rI   r"   r_   re   rM   rN   rO   s   @r   rS   rS   P   s(     ) )) )) )r   rS   __main__)r5   typingr   r   r   r   r   default_stylesr   r!   r	   r
   r   	ExceptionrQ   rS   rE   r:   printr/   r)   r   r   <module>rl      s^     4 4 * #AL ALH@i @) )B zGE	%,, r   