+
    i  c                  s    ^ RI Ht ^ RIt^ RIHtHt ^ RIt^ RIt^ RIt^ RI	H
t
Ht ^ RIt^ RItRt]'       d   ^ RIHt ^ RIHt ]
 ! R R	4      4       t]
 ! R
 R]4      4       t ! R R]P*                  4      tR# )    )annotationsN)ABCabstractmethod)	dataclassfieldF)IO)Callablec                  s:    ] tR t^(t$ R]R&   R]R&   RtR]R&   RtR# )	EventstrZevtZdata    Zbytesraw N)__name__
__module____qualname____firstlineno____annotations__r   __static_attributes__r   r
   (/usr/lib64/python3.14/_pyrepl/console.pyr   r   (   s    	H
ICr
   r   c                  s   ] tR t^/t$ R]R&   ]! ]R7      tR]R&   ^tR]R&   ^Pt	R]R&   R/R	 R
 llt
]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R R l4       t]R0R R ll4       t]R R l4       t]R R l4       t]R R l4       t]R R  l4       t]R! R" l4       t]R# R$ l4       t]R% R& l4       t]R' R( l4       t]R) R* l4       t]R+ R, l4       tR-tR.# )1Consoletuple[int, int]Zposxy)Zdefault_factory	list[str]screenintheightwidthc               s(    V ^8  d   QhRRRRRRRR/# )   f_inzIO[bytes] | intf_outtermr	   encodingr   Zformat   "r   __annotate__Console.__annotate__6   s2     , ,, , 	,
 ,r
   c                	s   T;'       g    \         P                  ! 4       V n        \        V\        4      '       d   Wn        MVP                  4       V n        \        V\        4      '       d	   W n        R # VP                  4       V n        R # N)sysZgetdefaultencodingr   Z
isinstancer   input_fdZfileno	output_fd)selfr   r   r   r   s   &&&&&r   __init__ZConsole.__init__6   sZ     !<<C$:$:$<dC   M KKMDMeS!!"N"\\^DNr
   c               s$    V ^8  d   QhRRRRRR/# )r   r   r   xyr   returnNoner   r    r!   r   r"   r#   J   s    JJiJ_JJr
   c                	    R # r$   r   )r(   r   r*      &&&r   refreshZConsole.refreshI   s    GJr
   c                   V ^8  d   QhRR/# r   r+   r,   r   r    r!   r   r"   r#   M       """r
   c                	r-   r$   r   r(      &r   prepareZConsole.prepareL       "r
   c               r0   r1   r   r    r!   r   r"   r#   P   r2   r
   c                	r-   r$   r   r3   r4   r   restoreZConsole.restoreO   r6   r
   c               s$    V ^8  d   QhRRRRRR/# )r   xr   yr+   r,   r   r    r!   r   r"   r#   S   s    66S6S6T6r
   c                	r-   r$   r   )r(   r8   r9   r.   r   move_cursorZConsole.move_cursorR   s    36r
   c                    V ^8  d   QhRRRR/# )r   visibleboolr+   r,   r   r    r!   r   r"   r#   V   s    88d8t8r
   c                	r-   r$   r   )r(   r<      &&r   set_cursor_visZConsole.set_cursor_visU   s    58r
   c               r0   )r   r+   r   r   r    r!   r   r"   r#   Y   s       r
   c                    R# )zlReturn (height, width) where height and width are the height
and width of the terminal window in characters.Nr   r3   r4   r   getheightwidthZConsole.getheightwidthX        	r
   c               r;   )r   blockr=   r+   zEvent | Noner   r    r!   r   r"   r#   _   s      t | r
   c                r@   )zReturn an Event instance.  Returns None if |block| is false
and there is no event pending, otherwise waits for the
completion of an event.Nr   )r(   rC   r>   r   	get_eventZConsole.get_event^       
 	r
   c               r;   )r   charzint | bytesr+   r,   r   r    r!   r   r"   r#   f   s      k d r
   c                r@   )z.
Push a character to the console event queue.
Nr   )r(   rF   r>   r   	push_charZConsole.push_chare   rE   r
   c               r0   r1   r   r    r!   r   r"   r#   m   s    dr
   c                	r-   r$   r   r3   r4   r   beepZConsole.beepl   s    r
   c               r0   r1   r   r    r!   r   r"   r#   p   s      t r
   c                r@   )zWipe the screenNr   r3   r4   r   clearZConsole.clearo        	r
   c               r0   r1   r   r    r!   r   r"   r#   u   s       r
   c                r@   )zsMove the cursor to the end of the display and otherwise get
ready for end.  XXX could be merged with restore?  Hmm.Nr   r3   r4   r   finishZConsole.finisht   rB   r
   c               r0   r1   r   r    r!   r   r"   r#   {   s      T r
   c                r@   )zTFlush all output to the screen (assuming there's some
buffering going on somewhere).Nr   r3   r4   r   flushoutputZConsole.flushoutputz   rB   r
   c               r0   r1   r   r    r!   r   r"   r#      s      T r
   c                r@   )z0Forget all pending, but not yet processed input.Nr   r3   r4   r   forgetinputZConsole.forgetinput   rJ   r
   c               r0   )r   r+   r   r   r    r!   r   r"   r#      s      E r
   c                r@   )zAReturn the characters that have been typed but not yet
processed.Nr   r3   r4   r   
getpendingZConsole.getpending   rB   r
   c               r;   )r   timeoutzfloat | Noner+   r=   r   r    r!   r   r"   r#      s      L T r
   c                r@   )zWait for an event. The return value is True if an event is
available, False if the timeout has been reached. If timeout is
None, wait forever. The timeout is in milliseconds.Nr   )r(   rO   r>   r   waitZConsole.wait   rE   r
   c               r0   )r   r+   zCallable[[], int] | Noner   r    r!   r   r"   r#      s      4 r
   c                r@   )zReturns the current input hook.Nr   r3   r4   r   
input_hookZConsole.input_hook   rJ   r
   c               r0   r1   r   r    r!   r   r"   r#      r2   r
   c                	r-   r$   r   r3   r4   r   repaintZConsole.repaint   r6   r
   )r   r&   r'   N)r    i    rS   )T)r   r   r   r   r   r   Zlistr   r   r   r)   r   r/   r5   r7   r:   r?   rA   rD   rG   rH   rI   rK   rL   rM   rN   rP   ZpropertyrQ   rR   r   r   r
   r   r   r   /   s[   d3FI3FCE3O,& J J" "" "6 68 8 
         
  
    
     " "r
   r   c                  sn   a  ] tR t^t]! 4       tR
RR/R V 3R lllltRV 3R lltR tR t	RR lt
R	tV ;t# )InteractiveColoredConsole
local_exitFc               s(    V ^8  d   QhRRRRRRRR/# )	r   localszdict[str, object] | Nonefilenamer	   rU   r=   r+   r,   r   r    r!   r   r"   Z&InteractiveColoredConsole.__annotate__   s2     5 5(5 5
 5 
5r
   c               	s^   < \         SV `  WVR 7       \        P                  ! 4       V n        R# ))rV   rW   rU   N)superr)   	_colorizecan_colorize)r(   rV   rW   rU   	__class__s   &&&$r   r)   Z"InteractiveColoredConsole.__init__   s(     	jQ%224r
   c                	s,   < \         SV `  ! RR V/VB  R# )rW   Nr   )rX   showsyntaxerror)r(   rW   Zkwargsr[   s   &&,r   r\   Z)InteractiveColoredConsole.showsyntaxerror   s    <<V<r
   c                	s    ^ RI pVP                  WVV P                  VP                  R7      pV P	                  RP                  V4      4       R# )r    N)ZcolorizeZlimitrS   )	tracebackZformat_exceptionrZ   ZBUILTIN_EXCEPTION_LIMITZwriteZjoin)r(   ZtypZvalueZtbr]   Zliness   &&&&  r   _excepthookZ%InteractiveColoredConsole._excepthook   sG    **B**77 + 9 	

2775>"r
   c                	s     \        WP                  4       R #   \         d    h \         d     T P	                  4        T P
                  u # i ; ir$   )execrV   Z
SystemExitZBaseExceptionZshowtracebackSTATEMENT_FAILED)r(   coder>   r   runcodeZ!InteractiveColoredConsole.runcode   sL    	){{#   	 	) (((	)s    AAAc                	s    V P                   P                  VVR \        P                  RR7      pTP                  '       d   TP                  Ev rVTP                   F  pTXJ d   \        P                  M\        P                  pYvJ d   TMR p	T! T.4      p
 T P                   P                  YT	4      p\        P                  ! YT4       Tf    R# T P)                  T4      pYP*                  J g   K   R# 	  R#   \        \
        \        3 d    T P                  Y!R7        R# i ; i  \         dy   pTP                  ^ ,          R8X  dC   \        P                  P!                  \"        P$                  4      pTP'                  RT R24       T P                  Y!R7        Rp? R# Rp?i\
        \        3 d    T P                  Y!R7         R# i ; i)	r_   F)Zincomplete_input)sourcez'await' outside functionzTry the asyncio REPL (zG -m asyncio) to use top-level 'await' and run background asyncio tasks.NT)ZcompileZcompilerastZPyCF_ONLY_ASTZSyntaxErrorZOverflowErrorZ
ValueErrorr\   ZbodyZInteractiveZModule	linecacheZ_register_codeZargsosZpathZbasenamer%   Z
executableZadd_noterb   r`   )r(   rc   rW   ZsymbolZtreeZ_Z	last_stmtZstmtZwrapperZ
the_symbolZitemra   ZeZpythonZresults   &&&&           r   	runsourceZ#InteractiveColoredConsole.runsource   s   
	<<((!!!& ) D 999 IIMQIID)-):coo

G#'#4&JD6?D||,,TZH((x@ |\\$'F...5 4 ? ]J7 	   9	  66!9 ::WW--cnn=FJJ0 9O P $$X$=!:. $$X$=s6   .C; 3D*;(D'&D'*G5A,F((G;GG)rZ   )Nz	<console>r$   )z<input>Zsingle)r   r   r   r   Zobjectr`   r)   r\   r^   rb   rg   r   Z__classcell__)r[   s   @r   rT   rT      s8    x5
 !5 5=#( (r
   rT   )Z
__future__r   rY   Zabcr   r   rd   ra   re   Zdataclassesr   r   Zos.pathrf   r%   ZTYPE_CHECKINGZtypingr   r   r   r   ZInteractiveConsolerT   r   r
   r   <module>rh      s~   ( #  # 
   (  
     h#c h# h#VJ 7 7 Jr
   