Ë
    M/Åe
  ã                   ó¤   — d Z ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 	 ddl
Z
 G d	„ d
«      Zy# e$ r ddlmc mc mZ
 Y Œw xY w)z8Provides Tab completion when prompting users for a path.é    N)ÚTracebackType)ÚCallable)ÚIterator)ÚLiteral)ÚOptional)ÚTypec                   ój   — e Zd ZdZdd„Zdededee   fd„Zdd„Z	d	ee
e      d
ee   dee   ddfd„Zy)Ú	Completera/  Provides Tab completion when prompting users for a path.

    This class is meant to be used with readline to provide Tab
    completion for users entering paths. The complete method can be
    passed to readline.set_completer directly, however, this function
    works best as a context manager. For example:

    with Completer():
        raw_input()

    In this example, Tab completion will be available during the call to
    raw_input above, however, readline will be restored to its previous
    state when exiting the body of the with statement.

    ÚreturnNc                 ó   — |  |  |  y )N© ©Úselfs    úE/usr/lib/python3/dist-packages/certbot/_internal/display/completer.pyÚ__init__zCompleter.__init__"   s   € ÙÙÚó    ÚtextÚstatec                 ór   — |dk(  rt        j                  |dz   «      | _        t        | j                  d«      S )a(  Provides path completion for use with readline.

        :param str text: text to offer completions for
        :param int state: which completion to return

        :returns: possible completion for text or ``None`` if all
            completions have been returned
        :rtype: str

        r   Ú*N)ÚglobÚiglobÚ_iterÚnext)r   r   r   s      r   ÚcompletezCompleter.complete'   s0   € ð �AŠ:ÜŸ™ D¨3¡JÓ/ˆDŒJÜ�D—J‘J Ó%Ð%r   c                 ój  — t        j                  «       | _        t        j                  «       | _        t        j
                  | j                  «       t        j                  d«       t         j                  �(dt         j                  v rt        j                  d«       y t        j                  d«       y )Nz 	
;Úlibeditzbind ^I rl_completeztab: complete)
ÚreadlineÚget_completerÚ_original_completerÚget_completer_delimsÚ_original_delimsÚset_completerr   Úset_completer_delimsÚ__doc__Úparse_and_bindr   s    r   Ú	__enter__zCompleter.__enter__6   s|   € Ü#+×#9Ñ#9Ó#;ˆÔ Ü (× =Ñ =Ó ?ˆÔä×Ñ˜tŸ}™}Ô-Ü×%Ñ% hÔ/ô ×ÑÐ'¨I¼×9IÑ9IÑ,IÜ×#Ñ#Ð$9Õ:ä×#Ñ# OÕ4r   Úunused_typeÚunused_valueÚunused_tracebackzLiteral[False]c                 ó€   — t        j                  | j                  «       t        j                  | j                  «       y)NF)r   r$   r"   r#   r    )r   r(   r)   r*   s       r   Ú__exit__zCompleter.__exit__D   s/   € ô 	×%Ñ% d×&;Ñ&;Ô<Ü×Ñ˜t×7Ñ7Ô8Ør   )r   N)Ú__name__Ú
__module__Ú__qualname__r%   r   ÚstrÚintr   r   r'   r   ÚBaseExceptionr   r,   r   r   r   r
   r
      sg   „ ñó #ð
&˜Sð &¨ð &°¸#±ó &ó5ð H¨T°-Ñ-@Ñ$Að Ø'¨Ñ6ðà#+¨MÑ#:ðà?Oôr   r
   )r%   r   Útypesr   Útypingr   r   r   r   r   r   ÚImportErrorÚ(certbot._internal.display.dummy_readlineÚ	_internalÚdisplayÚdummy_readliner
   r   r   r   ú<module>r:      sI   ðÙ >Û Ý Ý Ý Ý Ý Ý ð@Û÷
8ò 8øð	 ò @ß?Õ?ð@ús   ¬; »AÁA