§
    ŒŸjÄ	  ã                  ó`   — d dl mZ d dlZd dlZd dlmZmZ ddlmZm	Z	m
Z
 ddgZddd„Zdd„ZdS )é    )ÚannotationsN)ÚContextManagerÚTextIOé   )Ú
DummyInputÚInputÚ	PipeInputÚcreate_inputÚcreate_pipe_inputFÚstdinúTextIO | NoneÚalways_prefer_ttyÚboolÚreturnr   c                óÄ  — t           j        dk    r9ddlm} | €t           j        €t          ¦   «         S  || pt           j        ¦  «        S ddlm} | €Lt           j        } |r>t           j        t           j        t           j	        fD ]}| 
                    ¦   «         r|}  nŒ	 |                      ¦   «          n## t          j        $ r t          ¦   «         cY S w xY w || ¦  «        S )a§  
    Create the appropriate `Input` object for the current os/environment.

    :param always_prefer_tty: When set, if `sys.stdin` is connected to a Unix
        `pipe`, check whether `sys.stdout` or `sys.stderr` are connected to a
        pseudo terminal. If so, open the tty for reading instead of reading for
        `sys.stdin`. (We can open `stdout` or `stderr` for reading, this is how
        a `$PAGER` works.)
    Úwin32r   )Ú
Win32InputN)Ú
Vt100Input)ÚsysÚplatformr   r   r   r   Úvt100r   ÚstdoutÚstderrÚisattyÚfilenoÚioÚUnsupportedOperation)r   r   r   r   Úobjs        új/var/www/finuniver-perm.ru/html/student/venv/lib/python3.11/site-packages/prompt_toolkit/input/defaults.pyr
   r
      s	  € õ „|�wÒÐØ%Ð%Ð%Ð%Ð%Ð%ð ˆ=�SœYÐ.Ý‘<”<Ðàˆz˜%Ð,¥3¤9Ñ-Ô-Ð-à%Ð%Ð%Ð%Ð%Ð%ð ˆ=Ý”IˆEà ð ÝœI¥s¤zµ3´:Ð>ð ð �CØ—z’z‘|”|ð Ø #˜Ø˜ðð	 Ø�LŠL‰NŒNˆNˆNøÝÔ&ð 	 ð 	 ð 	 Ý‘<”<ÐÐÐð	 øøøð ˆz˜%Ñ Ô Ð s   ÂB4 Â4CÃCúContextManager[PipeInput]c                 óŠ   — t           j        dk    rddlm}  |                      ¦   «         S ddlm} |                     ¦   «         S )aA  
    Create an input pipe.
    This is mostly useful for unit testing.

    Usage::

        with create_pipe_input() as input:
            input.send_text('inputdata')

    Breaking change: In prompt_toolkit 3.0.28 and earlier, this was returning
    the `PipeInput` directly, rather than through a context manager.
    r   r   )ÚWin32PipeInput)ÚPosixPipeInput)r   r   Ú
win32_piper"   ÚcreateÚ
posix_piper#   )r"   r#   s     r   r   r   ;   sY   € õ „|�wÒÐØ.Ð.Ð.Ð.Ð.Ð.à×$Ò$Ñ&Ô&Ð&à.Ð.Ð.Ð.Ð.Ð.à×$Ò$Ñ&Ô&Ð&ó    )NF)r   r   r   r   r   r   )r   r    )Ú
__future__r   r   r   Útypingr   r   Úbaser   r   r	   Ú__all__r
   r   © r'   r   ú<module>r-      s¦   ðØ "Ð "Ð "Ð "Ð "Ð "à 	€	€	€	Ø 
€
€
€
Ø )Ð )Ð )Ð )Ð )Ð )Ð )Ð )à .Ð .Ð .Ð .Ð .Ð .Ð .Ð .Ð .Ð .ð Øð€ð)!ð )!ð )!ð )!ð )!ðX'ð 'ð 'ð 'ð 'ð 'r'   