§
    ŒŸjk  ã                  ó|   — d dl mZ d dlmZmZmZmZmZ d dlm	Z	m
Z
mZ d dlmZ d dlmZ dgZ G d„ de
¦  «        ZdS )	é    )Úannotations)ÚCallableÚIterableÚMappingÚPatternÚSequence)ÚCompleteEventÚ	CompleterÚ
Completion)ÚDocument)ÚAnyFormattedTextÚWordCompleterc                  ó2   — e Zd ZdZ	 	 	 	 	 	 	 ddd„Zdd„ZdS )r   aè  
    Simple autocompletion on a list of words.

    :param words: List of words or callable that returns a list of words.
    :param ignore_case: If True, case-insensitive completion.
    :param meta_dict: Optional dict mapping words to their meta-text. (This
        should map strings to strings or formatted text.)
    :param WORD: When True, use WORD characters.
    :param sentence: When True, don't complete by comparing the word before the
        cursor, but by comparing all the text before the cursor. In this case,
        the list of words is just a list of strings, where each string can
        contain spaces. (Can not be used together with the WORD option.)
    :param match_middle: When True, match not only the start, but also in the
                         middle of the word.
    :param pattern: Optional compiled regex for finding the word before
        the cursor to complete. When given, use this regex pattern instead of
        default one (see document._FIND_WORD_RE)
    FNÚwordsú+Sequence[str] | Callable[[], Sequence[str]]Úignore_caseÚboolÚdisplay_dictú%Mapping[str, AnyFormattedText] | NoneÚ	meta_dictÚWORDÚsentenceÚmatch_middleÚpatternúPattern[str] | NoneÚreturnÚNonec	                óŠ   — |r|rJ ‚|| _         || _        |pi | _        |pi | _        || _        || _        || _        || _        d S )N)r   r   r   r   r   r   r   r   )	Úselfr   r   r   r   r   r   r   r   s	            úu/var/www/finuniver-perm.ru/html/student/venv/lib/python3.11/site-packages/prompt_toolkit/completion/word_completer.pyÚ__init__zWordCompleter.__init__"   s]   € ð Ð&˜XÐ&Ð&Ð&àˆŒ
Ø&ˆÔØ(Ð.¨BˆÔØ"˜ bˆŒØˆŒ	Ø ˆŒØ(ˆÔØˆŒˆˆó    Údocumentr   Úcomplete_eventr	   úIterable[Completion]c              #  óÄ  ‡ ‡K  — ‰ j         }t          |¦  «        r
 |¦   «         }‰ j        r|j        Šn!|                     ‰ j        ‰ j        ¬¦  «        Š‰ j        r‰                     ¦   «         Šd	ˆ ˆfd„}|D ]f} ||¦  «        rY‰ j	         
                    ||¦  «        }‰ j         
                    |d¦  «        }t          |t          ‰¦  «         ||¬¦  «        V — Œgd S )
N)r   r   ÚwordÚstrr   r   c                óz   •— ‰j         r|                      ¦   «         } ‰j        r‰| v S |                      ‰¦  «        S )z-True when the word before the cursor matches.)r   Úlowerr   Ú
startswith)r'   r   Úword_before_cursors    €€r    Úword_matchesz3WordCompleter.get_completions.<locals>.word_matchesK   sD   ø€ àÔð $Ø—z’z‘|”|�àÔ ð ;Ø)¨TÐ1Ð1à—’Ð'9Ñ:Ô:Ð:r"   Ú )ÚtextÚstart_positionÚdisplayÚdisplay_meta)r'   r(   r   r   )r   Úcallabler   Útext_before_cursorÚget_word_before_cursorr   r   r   r*   r   Úgetr   r   Úlen)	r   r#   r$   r   r-   Úar1   r2   r,   s	   `       @r    Úget_completionszWordCompleter.get_completions8   s=  øøè è € ð ”
ˆÝ�E‰?Œ?ð 	Ø�E‘G”GˆEð Œ=ð 	Ø!)Ô!<ÐÐà!)×!@Ò!@Ø”Y¨¬ð "Añ "ô "Ðð Ôð 	<Ø!3×!9Ò!9Ñ!;Ô!;Ðð	;ð 	;ð 	;ð 	;ð 	;ð 	;ð 	;ð ð 		ð 		ˆAØˆ|˜A‰Œð ØÔ+×/Ò/°°1Ñ5Ô5�Ø#œ~×1Ò1°!°RÑ8Ô8�Ý ØÝ$'Ð(:Ñ$;Ô$;Ð#;Ø#Ø!-ð	ñ ô ð ð ð øð			ð 		r"   )FNNFFFN)r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   )r#   r   r$   r	   r   r%   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r!   r9   © r"   r    r   r      sb   € € € € € ðð ð, "Ø>BØ;?ØØØ"Ø'+ðð ð ð ð ð,&ð &ð &ð &ð &ð &r"   N)Ú
__future__r   Útypingr   r   r   r   r   Úprompt_toolkit.completionr	   r
   r   Úprompt_toolkit.documentr   Úprompt_toolkit.formatted_textr   Ú__all__r   r>   r"   r    ú<module>rE      sÍ   ðØ "Ð "Ð "Ð "Ð "Ð "à AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ AÐ Aà JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JÐ JØ ,Ð ,Ð ,Ð ,Ð ,Ð ,Ø :Ð :Ð :Ð :Ð :Ð :ð ð€ð
Pð Pð Pð Pð P�Iñ Pô Pð Pð Pð Pr"   