ó
    ÷Þ j<f  ã                  ón  • % S SK Jr  S SKJr  S SKrS SKrS SKrS SK	J	r
  SSKJr  SSKJr  SSKJr  SSKJr  SS	KJr  SS
KJr  SSKJr  SSKJr              S6S jr\R,                  (       a  S SKJr  \" SS\R2                  S9rO\R0                  " SSS9r " S S\R6                  \   5      rSrSrSrSr  " S S\RB                  5      r" " S S5      r# " S S\#5      r$ " S S \#5      r% " S! S"\#5      r& " S# S$\#5      r'\$\&\'\%S%.r(S&\)S''   \R0                  " S(SS)9r* S7     S8S* jjr+\RX                  S9S+ j5       r-\RX                  S:S, j5       r-\RX                  S;S- j5       r-\RX                  S<S. j5       r-S<S/ jr-S=S0 jr.S>S1 jr/S?S2 jr0S@S3 jr1          SAS4 jr2        SBS5 jr3g)Cé    )ÚannotationsN)Úgettexté   )ÚArgument)ÚCommand)ÚContext)ÚGroup)ÚOption)Ú	Parameter)ÚParameterSource)Úechoc                ó  • UR                  S5      u  pVn[        U5      nUc  gU" XX#5      nUS:X  a'  [        UR                  5       R	                  5       SS9  gUS:X  a(  [        UR                  5       R	                  5       5        gg)aØ  Perform shell completion for the given CLI program.

:param cli: Command being called.
:param ctx_args: Extra arguments to pass to
    ``cli.make_context``.
:param prog_name: Name of the executable in the shell.
:param complete_var: Name of the environment variable that holds
    the completion instruction.
:param instruction: Value of ``complete_var`` with the completion
    instruction and shell, in the form ``instruction_shell``.
:return: Status code to exit with.
Ú_r   ÚsourceF)Únlr   Úcomplete)Ú	partitionÚget_completion_classr   r   Úencoder   )	ÚcliÚctx_argsÚ	prog_nameÚcomplete_varÚinstructionÚshellr   Úcomp_clsÚcomps	            ÚP/var/www/html/gaurav/venv/lib/python3.13/site-packages/click/shell_completion.pyÚshell_completer      sƒ   € ð& (×1Ñ1°#Ó6Ñ€EˆkÜ# EÓ*€HàÑØá�C 9Ó;€Dð �hÓÜˆT�[‰[‹]×!Ñ!Ó#¨Ò.Øà�jÓ ÜˆT�]‰]‹_×#Ñ#Ó%Ô&Øàó    )ÚTypeVarÚ
_ValueT_coT)Ú	covariantÚdefault)r#   c                  óJ   • \ rS rSrSrSr  S         S	S jjrS
S jrSrg)ÚCompletionIteméC   añ  Represents a completion value and metadata about the value. The
default metadata is ``type`` to indicate special shell handling,
and ``help`` if a shell supports showing a help string next to the
value.

Arbitrary parameters can be passed when creating the object, and
accessed using ``item.attr``. If an attribute wasn't passed,
accessing it returns ``None``.

:param value: The completion suggestion.
:param type: Tells the shell script to provide special completion
    support for the type. Click uses ``"dir"`` and ``"file"``.
:param help: String shown next to the value if supported.
:param kwargs: Arbitrary metadata. The built-in implementations
    don't use this, but custom type completions paired with custom
    shell support could use it.
©ÚvalueÚtypeÚhelpÚ_infoNc                ó4   • Xl         X l        X0l        X@l        g ©Nr(   )Úselfr)   r*   r+   Úkwargss        r   Ú__init__ÚCompletionItem.__init__X   s   € ð "'Œ
ØŒ	Ø $Œ	Ø�
r    c                ó8   • U R                   R                  U5      $ r.   )r,   Úget)r/   Únames     r   Ú__getattr__ÚCompletionItem.__getattr__d   s   € Ø�z‰z�~‰~˜dÓ#Ð#r    )r,   r+   r*   r)   )ÚplainN)
r)   r"   r*   Ústrr+   ú
str | Noner0   út.AnyÚreturnÚNone)r5   r9   r<   r;   )	Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__Ú	__slots__r1   r6   Ú__static_attributes__© r    r   r&   r&   C   sP   † ñð$ 3€Ið
 Øð	
àð
ð ð
ð ð	
ð
 ð
ð 
õ
÷$r    r&   a¢  %(complete_func)s() {
    local IFS=$'\n'
    local response

    response=$(env COMP_WORDS="${COMP_WORDS[*]}" COMP_CWORD=$COMP_CWORD %(complete_var)s=bash_complete $1)

    for completion in $response; do
        IFS=',' read type value <<< "$completion"

        if [[ $type == 'dir' ]]; then
            COMPREPLY=()
            compopt -o dirnames
        elif [[ $type == 'file' ]]; then
            COMPREPLY=()
            compopt -o default
        elif [[ $type == 'plain' ]]; then
            COMPREPLY+=($value)
        fi
    done

    return 0
}

%(complete_func)s_setup() {
    complete -o nosort -F %(complete_func)s %(prog_name)s
}

%(complete_func)s_setup;
a¦  #compdef %(prog_name)s

%(complete_func)s() {
    local -a completions
    local -a completions_with_descriptions
    local -a response
    (( ! $+commands[%(prog_name)s] )) && return 1

    response=("${(@f)$(env COMP_WORDS="${words[*]}" COMP_CWORD=$((CURRENT-1)) %(complete_var)s=zsh_complete %(prog_name)s)}")

    for type key descr in ${response}; do
        if [[ "$type" == "plain" ]]; then
            if [[ "$descr" == "_" ]]; then
                completions+=("$key")
            else
                completions_with_descriptions+=("$key":"$descr")
            fi
        elif [[ "$type" == "dir" ]]; then
            _path_files -/
        elif [[ "$type" == "file" ]]; then
            _path_files -f
        fi
    done

    if [ -n "$completions_with_descriptions" ]; then
        _describe -V unsorted completions_with_descriptions -U
    fi

    if [ -n "$completions" ]; then
        compadd -U -V unsorted -a completions
    fi
}

if [[ $zsh_eval_context[-1] == loadautofunc ]]; then
    # autoload from fpath, call function directly
    %(complete_func)s "$@"
else
    # eval/source/. command, register function for later
    compdef %(complete_func)s %(prog_name)s
fi
af  function %(complete_func)s;
    set -l response (env %(complete_var)s=fish_complete COMP_WORDS=(commandline -cp) COMP_CWORD=(commandline -t) %(prog_name)s);

    for completion in $response;
        set -l metadata (string split "," $completion);

        if test $metadata[1] = "dir";
            __fish_complete_directories $metadata[2];
        else if test $metadata[1] = "file";
            __fish_complete_path $metadata[2];
        else if test $metadata[1] = "plain";
            echo $metadata[2];
        end;
    end;
end;

complete --no-files --command %(prog_name)s --arguments "(%(complete_func)s)";
aÉ  Register-ArgumentCompleter -Native -CommandName %(prog_name)s -ScriptBlock {
    param($wordToComplete, $commandAst, $cursorPosition)

    $prev_complete = $env:%(complete_var)s
    $prev_words = $env:COMP_WORDS
    $prev_cword = $env:COMP_CWORD

    $env:%(complete_var)s = 'powershell_complete'
    $env:COMP_WORDS = $commandAst.ToString()
    if ($wordToComplete) {
        $env:COMP_CWORD = $commandAst.CommandElements.Count - 1
    } else {
        $env:COMP_CWORD = $commandAst.CommandElements.Count
    }

    try {
        $response = & %(prog_name)s 2>$null
    } finally {
        $env:%(complete_var)s = $prev_complete
        $env:COMP_WORDS = $prev_words
        $env:COMP_CWORD = $prev_cword
    }

    if (-not $response) { return }

    $prefix = "$wordToComplete*"
    $lines = $response -split "`n"
    for ($i = 0; $i + 2 -lt $lines.Count; $i += 3) {
        $type = $lines[$i]
        $value = $lines[$i + 1]
        $descr = $lines[$i + 2]
        if (-not $type) { continue }

        if ($type -eq 'plain') {
            $tip = if ($descr -and $descr -ne '_') { $descr } else { $value }
            [System.Management.Automation.CompletionResult]::new(
                $value, $value, 'ParameterValue', $tip)
        } elseif ($type -eq 'dir') {
            Get-ChildItem -Directory -Path $prefix -ErrorAction SilentlyContinue |
                ForEach-Object {
                    [System.Management.Automation.CompletionResult]::new(
                        $_.FullName, $_.Name, 'ProviderContainer', $_.FullName)
                }
        } elseif ($type -eq 'file') {
            Get-ChildItem -Path $prefix -ErrorAction SilentlyContinue |
                ForEach-Object {
                    $kind = 'ProviderItem'
                    if ($_.PSIsContainer) { $kind = 'ProviderContainer' }
                    [System.Management.Automation.CompletionResult]::new(
                        $_.FullName, $_.Name, $kind, $_.FullName)
                }
        }
    }
}
c                  ó4   • \ rS rSr% S\S'   S\S'   S\S'   Srg)Ú_SourceVarsDicti  r9   Úcomplete_funcr   r   rE   N)r>   r?   r@   rA   Ú__annotations__rD   rE   r    r   rG   rG     s   ‡ ØÓØÓØ†Nr    rG   c                  óÔ   • \ rS rSr% SrS\S'    S\S'    S\S'   S\S	'   S
\S'   S
\S'             SS jr\SS j5       rSS jr	SS jr
SS jr      SS jrSS jrSS jrSrg)ÚShellCompletei  a�  Base class for providing shell completion support. A subclass for
a given shell will override attributes and methods to implement the
completion instructions (``source`` and ``complete``).

:param cli: Command being called.
:param prog_name: Name of the executable in the shell.
:param complete_var: Name of the environment variable that holds
    the completion instruction.

.. versionadded:: 8.0
út.ClassVar[str]r5   Úsource_templater   r   úcabc.MutableMapping[str, t.Any]r   r9   r   r   c                ó4   • Xl         X l        X0l        X@l        g r.   )r   r   r   r   )r/   r   r   r   r   s        r   r1   ÚShellComplete.__init__3  s   € ð ŒØ ŒØ"ŒØ(Õr    c                óŒ   • [         R                  " SSU R                  R                  SS5      [         R                  S9nSU S3$ )zAThe name of the shell function defined by the completion
script.
z\W*Ú Ú-r   )ÚflagsÚ_completion)ÚreÚsubr   ÚreplaceÚASCII)r/   Ú	safe_names     r   Ú	func_nameÚShellComplete.func_name?  s<   € ô
 —F’F˜6 2 t§~¡~×'=Ñ'=¸cÀ3Ó'GÌrÏxÉxÑXˆ	Ø�9�+˜[Ð)Ð)r    c                óJ   • U R                   U R                  U R                  S.$ )zVars for formatting :attr:`source_template`.

By default this provides ``complete_func``, ``complete_var``,
and ``prog_name``.
)rH   r   r   )r[   r   r   ©r/   s    r   Úsource_varsÚShellComplete.source_varsG  s%   € ð "Ÿ^™^Ø ×-Ñ-ØŸ™ñ
ð 	
r    c                ó<   • U R                   U R                  5       -  $ )zªProduce the shell script that defines the completion
function. By default this ``%``-style formats
:attr:`source_template` with the dict returned by
:meth:`source_vars`.
)rM   r_   r^   s    r   r   ÚShellComplete.sourceS  s   € ð ×#Ñ# d×&6Ñ&6Ó&8Ñ8Ð8r    c                ó   • [         e)z€Use the env vars defined by the shell script to return a
tuple of ``args, incomplete``. This must be implemented by
subclasses.
©ÚNotImplementedErrorr^   s    r   Úget_completion_argsÚ!ShellComplete.get_completion_args[  s
   € ô
 "Ð!r    c                ó˜   • [        U R                  U R                  U R                  U5      n[	        X1U5      u  pBUR                  X25      $ )a,  Determine the context and last complete command or parameter
from the complete args. Call that object's ``shell_complete``
method to get the completions for the incomplete value.

:param args: List of complete args before the incomplete value.
:param incomplete: Value being completed. May be empty.
)Ú_resolve_contextr   r   r   Ú_resolve_incompleter   )r/   ÚargsÚ
incompleteÚctxÚobjs        r   Úget_completionsÚShellComplete.get_completionsb  s?   € ô ˜tŸx™x¨¯©¸¿¹ÈÓMˆÜ-¨c¸ÓD‰ˆØ×!Ñ! #Ó2Ð2r    c                ó   • [         e)z˜Format a completion item into the form recognized by the
shell script. This must be implemented by subclasses.

:param item: Completion item to format.
rd   ©r/   Úitems     r   Úformat_completionÚShellComplete.format_completionp  s
   € ô "Ð!r    c                ó²   • U R                  5       u  pU R                  X5      nU Vs/ sH  o@R                  U5      PM     nnSR                  U5      $ s  snf )z»Produce the completion data to send back to the shell.

By default this calls :meth:`get_completion_args`, gets the
completions, then calls :meth:`format_completion` for each
completion.
Ú
)rf   ro   rt   Újoin)r/   rk   rl   Úcompletionsrs   Úouts         r   r   ÚShellComplete.completex  sV   € ð  ×3Ñ3Ó5ÑˆØ×*Ñ*¨4Ó<ˆÙ8CÓD¹°×%Ñ% dÖ+¹ˆÐDØ�y‰y˜‹~Ðùò Es   ¨A)r   r   r   r   N)
r   r   r   rN   r   r9   r   r9   r<   r=   ©r<   r9   )r<   rG   ©r<   ztuple[list[str], str])rk   ú	list[str]rl   r9   r<   zlist[CompletionItem[str]]©rs   zCompletionItem[str]r<   r9   )r>   r?   r@   rA   rB   rI   r1   Úpropertyr[   r_   r   rf   ro   rt   r   rD   rE   r    r   rK   rK     s¸   ‡ ñ
ð Óðð
 %Ó$ðð 
ƒLØ-Ó-ØƒNØÓð
)àð
)ð 2ð
)ð ð	
)ð
 ð
)ð 
ô
)ð ó*ó ð*ô

ô9ô"ð3Øð3Ø+.ð3à	"ô3ô"÷
r    rK   c                  óv   ^ • \ rS rSr% SrSrS\S'   \rS\S'   \	SS j5       r
SU 4S jjrSS	 jrSS
 jrSrU =r$ )ÚBashCompletei…  zShell completion for Bash.ÚbashrL   r5   rM   c                 ó|  • SS K n SS KnU R                  S5      nUc  S nOMUR                  USSS/UR                  S9n[
        R                  " SUR                  R                  5       5      nUb:  UR                  5       u  pVUS:  d  US:X  a  US:  a  [        [        S	5      S
S9  g g g [        [        S5      S
S9  g )Nr   rƒ   z--norcz-czecho "${BASH_VERSION}")Ústdoutz^(\d+)\.(\d+)\.\d+Ú4zCShell completion is not supported for Bash versions older than 4.4.T)Úerrz@Couldn't detect Bash version, shell completion is not supported.)ÚshutilÚ
subprocessÚwhichÚrunÚPIPErV   Úsearchr…   ÚdecodeÚgroupsr   r   )rˆ   r‰   Úbash_exeÚmatchÚoutputÚmajorÚminors          r   Ú_check_versionÚBashComplete._check_version‹  sÅ   € ãÛà—<‘< Ó'ˆàÑØ‰Eà—^‘^Ø˜8 TÐ+CÐDØ!—‘ð $ð ˆFô —I’IÐ3°V·]±]×5IÑ5IÓ5KÓLˆEàÑØ Ÿ<™<›>‰LˆEà�s‹{˜e s›l¨u°s«{ÜÜð4óð óð 0;˜lô ÜÐTÓUØór    c                ó@   >• U R                  5         [        TU ]	  5       $ r.   )r•   Úsuperr   )r/   Ú	__class__s    €r   r   ÚBashComplete.source¬  s   ø€ Ø×ÑÔÜ‰w‰~ÓÐr    c                ó´   • [        [        R                  S   5      n[        [        R                  S   5      nUSU n X   nX44$ ! [         a    Sn X44$ f = f©NÚ
COMP_WORDSÚ
COMP_CWORDr   rR   ©Úsplit_arg_stringÚosÚenvironÚintÚ
IndexError©r/   ÚcwordsÚcwordrk   rl   s        r   rf   Ú BashComplete.get_completion_args°  ói   € Ü!¤"§*¡*¨\Ñ":Ó;ˆÜ”B—J‘J˜|Ñ,Ó-ˆØ�a˜ˆˆð	Ø™ˆJð ÐÐøô ó 	Ø‰JàÐÐð	úó   ¿A ÁAÁAc                ó8   • UR                    SUR                   3$ )NÚ,)r*   r)   rr   s     r   rt   ÚBashComplete.format_completion¼  s   € Ø—)‘)�˜A˜dŸj™j˜\Ð*Ð*r    rE   )r<   r=   r|   r}   )rs   zCompletionItem[t.Any]r<   r9   )r>   r?   r@   rA   rB   r5   rI   Ú_SOURCE_BASHrM   Ústaticmethodr•   r   rf   rt   rD   Ú__classcell__)r™   s   @r   r‚   r‚   …  sA   ø‡ Ù$à"€Dˆ/Ó"Ø'3€O�_Ó3àóó ð÷@ ô
 ÷+ò +r    r‚   c                  óJ   • \ rS rSr% SrSrS\S'   \rS\S'   SS jr	SS jr
S	rg
)ÚZshCompleteiÀ  zShell completion for Zsh.ÚzshrL   r5   rM   c                ó´   • [        [        R                  S   5      n[        [        R                  S   5      nUSU n X   nX44$ ! [         a    Sn X44$ f = frœ   rŸ   r¥   s        r   rf   ÚZshComplete.get_completion_argsÆ  r©   rª   c                ó°   • UR                   =(       d    SnUS:w  a  UR                  R                  SS5      OUR                  nUR                   SU SU 3$ )Nr   Ú:z\:rw   )r+   r)   rX   r*   )r/   rs   Úhelp_r)   s       r   rt   ÚZshComplete.format_completionÒ  sO   € Ø—	‘	× ˜Sˆð 38¸3³,�—
‘
×"Ñ" 3¨Ô.ÀDÇJÁJˆØ—)‘)�˜B˜u˜g R¨ wÐ/Ð/r    rE   Nr}   r   )r>   r?   r@   rA   rB   r5   rI   Ú_SOURCE_ZSHrM   rf   rt   rD   rE   r    r   r²   r²   À  s#   ‡ Ù#à!€Dˆ/Ó!Ø'2€O�_Ó2ô
 ÷0r    r²   c                  óJ   • \ rS rSr% SrSrS\S'   \rS\S'   SS jr	SS jr
S	rg
)ÚFishCompleteiä  zShell completion for Fish.ÚfishrL   r5   rM   c                óè   • [        [        R                  S   5      n[        R                  S   nU(       a  [        U5      S   nUSS  nU(       a   U(       a  US   U:X  a  UR                  5         X24$ )Nr�   rž   r   r   éÿÿÿÿ)r    r¡   r¢   Úpop)r/   r¦   rl   rk   s       r   rf   Ú FishComplete.get_completion_argsê  sd   € Ü!¤"§*¡*¨\Ñ":Ó;ˆÜ—Z‘Z Ñ-ˆ
ÞÜ)¨*Ó5°aÑ8ˆJØ�a�bˆzˆö ž$ 4¨¡8¨zÓ#9Ø�H‰HŒJàÐÐr    c                óî   • UR                   (       aJ  UR                   R                  SS5      R                  SS5      nUR                   SUR                   SU 3$ UR                   SUR                   3$ )z˜
.. versionchanged:: 8.4.2
    Escape newlines and replace tabs with spaces in the help text to
    fix completion errors with multi-line help strings.
rw   z\nÚ	Ú r¬   ©r+   rX   r*   r)   ©r/   rs   r¸   s      r   rt   ÚFishComplete.format_completionø  sf   € ð �9�9Ø—I‘I×%Ñ% d¨EÓ2×:Ñ:¸4ÀÓEˆEØ—i‘i�[  $§*¡* ¨R°¨wÐ7Ð7à—)‘)�˜A˜dŸj™j˜\Ð*Ð*r    rE   Nr}   r   )r>   r?   r@   rA   rB   r5   rI   Ú_SOURCE_FISHrM   rf   rt   rD   rE   r    r   r¼   r¼   ä  s#   ‡ Ù$à"€Dˆ/Ó"Ø'3€O�_Ó3ô ÷+r    r¼   c                  óJ   • \ rS rSr% SrSrS\S'   \rS\S'   SS jr	SS jr
S	rg
)ÚPowerShellCompletei	  z`Shell completion for PowerShell (Windows PowerShell 5.1+ and pwsh 7+).

.. versionadded:: 8.5.0
Ú
powershellrL   r5   rM   c                ó´   • [        [        R                  S   5      n[        [        R                  S   5      nUSU n X   nX44$ ! [         a    Sn X44$ f = frœ   rŸ   r¥   s        r   rf   Ú&PowerShellComplete.get_completion_args  r©   rª   c                ó¾   • UR                   (       a-  UR                   R                  SS5      R                  SS5      nOSnUR                   SUR                   SU 3$ )NÚrÄ   rw   r   rÅ   rÆ   s      r   rt   Ú$PowerShellComplete.format_completion  sR   € ð �9�9Ø—I‘I×%Ñ% d¨CÓ0×8Ñ8¸¸sÓC‰EàˆEØ—)‘)�˜B˜tŸz™z˜l¨"¨U¨GÐ4Ð4r    rE   Nr}   r   )r>   r?   r@   rA   rB   r5   rI   Ú_SOURCE_POWERSHELLrM   rf   rt   rD   rE   r    r   rÊ   rÊ   	  s'   ‡ ñð
 )€Dˆ/Ó(Ø'9€O�_Ó9ô
 ÷
5r    rÊ   )rƒ   r½   rË   r³   z't.Final[dict[str, type[ShellComplete]]]Ú_available_shellsÚ_ShellCompleteT)Úboundc                ó6   • Uc  U R                   nU [        U'   U $ )aQ  Register a :class:`ShellComplete` subclass under the given name.
The name will be provided by the completion instruction environment
variable during completion.

:param cls: The completion class that will handle completion for the
    shell.
:param name: Name to register the class under. Defaults to the
    class's ``name`` attribute.
)r5   rÒ   )Úclsr5   s     r   Úadd_completion_classr×   5  s"   € ð �|Ø�x‰xˆà!Ô�dÑà€Jr    c                ó   • g r.   rE   ©r   s    r   r   r   I  ó   € ØJMr    c                ó   • g r.   rE   rÙ   s    r   r   r   K  rÚ   r    c                ó   • g r.   rE   rÙ   s    r   r   r   M  s   € ØHKr    c                ó   • g r.   rE   rÙ   s    r   r   r   O  s   € ØDGr    c                ó,   • [         R                  U 5      $ )záLook up a registered :class:`ShellComplete` subclass by the name
provided by the completion instruction environment variable. If the
name isn't registered, returns ``None``.

:param shell: Name the class is registered under.
)rÒ   r4   rÙ   s    r   r   r   Q  s   € ô × Ñ  Ó'Ð'r    c                óÊ   • SSK nUR                  U SS9nSUl        SUl        / n UR                  U5        U$ ! [         a    UR                  UR                  5         U$ f = f)aÇ  Split an argument string as with :func:`shlex.split`, but don't
fail if the string is incomplete. Ignores a missing closing quote or
incomplete escape sequence and uses the partial token as-is.

.. code-block:: python

    split_arg_string("example 'my file")
    ["example", "my file"]

    split_arg_string("example my\")
    ["example", "my"]

:param string: String to split.

.. versionchanged:: 8.2
    Moved to ``shell_completion`` from ``parser``.
r   NT)ÚposixrR   )ÚshlexÚwhitespace_splitÚ
commentersÚextendÚ
ValueErrorÚappendÚtoken)Ústringrá   Úlexrz   s       r   r    r    [  sl   € ó$ à
�+‰+�f Dˆ+Ð
)€CØ€CÔØ€C„NØ€CðØ�
‰
�3Œð €Jøô ó ð 	�
‰
�3—9‘9Õà€Jðús   ¦9 ¹%A"Á!A"c                óž  • [        U[        5      (       d  gU R                  R                  UR                  5      nUR
                  S:H  =(       d}    U R                  UR                  5      [        R                  L=(       dK    UR
                  S:„  =(       a5    [        U[        [        45      =(       a    [        U5      UR
                  :  $ )zØDetermine if the given parameter is an argument that can still
accept values.

:param ctx: Invocation context for the command represented by the
    parsed complete args.
:param param: Argument object being checked.
Fr¿   r   )Ú
isinstancer   Úparamsr4   r5   ÚnargsÚget_parameter_sourcer   ÚCOMMANDLINEÚtupleÚlistÚlen)rm   Úparamr)   s      r   Ú_is_incomplete_argumentrô     s—   € ô �eœX×&Ñ&Øà�J‰J�N‰N˜5Ÿ:™:Ó&€Eà�‰�rÑ÷ 	
Ø×#Ñ# E§J¡JÓ/´×7RÑ7RÐR÷	
ð �K‰K˜!‰O÷ )Ü˜5¤5¬$ -Ó0÷)ä�E“
˜UŸ[™[Ñ(ðr    c                ó8   • U(       d  gUS   nX R                   ;   $ )z5Check if the value looks like the start of an option.Fr   )Ú_opt_prefixes)rm   r)   Úcs      r   Ú_start_of_optionrø   –  s    € æØàˆa‰€AØ×!Ñ!Ñ!Ð!r    c                ó6  • [        U[        5      (       d  gUR                  (       d  UR                  (       a  gSn[	        [        U5      5       H.  u  pEUS-   UR                  :”  a    O[        X5      (       d  M,  Un  O   USL=(       a    X2R                  ;   $ )z®Determine if the given parameter is an option that needs a value.

:param args: List of complete args before the incomplete value.
:param param: Option object being checked.
FNr   )	rë   r
   Úis_flagÚcountÚ	enumerateÚreversedrí   rø   Úopts)rm   rk   ró   Úlast_optionÚindexÚargs         r   Ú_is_incomplete_optionr  Ÿ  s}   € ô �eœV×$Ñ$Øà‡}‡}˜ŸŸØà€Kä¤¨£Ö/‰
ˆØ�1‰9�u—{‘{Ó"Ùä˜C×%Ó%ØˆKÙñ 0ð ˜dÐ"×@ {·j±jÑ'@Ð@r    c           
     ó0  • SUS'   U R                   " X#R                  5       40 UD6 nUR                  UR                  -   nU(       Ga  UR                  n[        U[        5      (       aå  UR                  (       dX  UR                  XC5      u  pgnUc  UsSSS5        $ UR                  XcUSS9 nUnUR                  UR                  -   nSSS5        O}UnU(       aV  UR                  XC5      u  pgnUc  UsSSS5        $ UR                  UUUSSSS9 n	U	nUR                  nSSS5        U(       a  MV  Un/ UR                  QUR                  QnOO
U(       a  GM  SSS5        U$ ! , (       d  f       N"= f! , (       d  f       NZ= f! , (       d  f       W$ = f)aH  Produce the context hierarchy starting with the command and
traversing the complete arguments. This only follows the commands,
it doesn't trigger input prompts or callbacks.

:param cli: Command being called.
:param prog_name: Name of the executable in the shell.
:param args: List of complete args before the incomplete value.
TÚresilient_parsingN)Úparentr  F)r  Úallow_extra_argsÚallow_interspersed_argsr  )	Úmake_contextÚcopyÚ_protected_argsrk   Úcommandrë   r	   ÚchainÚresolve_command)
r   r   r   rk   rm   r  r5   ÚcmdÚsub_ctxÚsub_sub_ctxs
             r   ri   ri   ¸  s—  € ð %)€HÐ Ñ!Ø	×	Ò	˜)§Y¡Y£[Ñ	=°HÒ	=ÀØ×"Ñ" S§X¡XÑ-ˆçØ—k‘kˆGä˜'¤5×)Ñ)Ø—}—}Ø&-×&=Ñ&=¸cÓ&H‘O�D˜tà‘{Ø"÷ 
>Ñ	=ð ×)Ñ)Ø¨3À$ð *ñ à Ø%˜Ø"×2Ñ2°S·X±XÑ=˜÷	ð ð "�GæØ*1×*AÑ*AÀ#Ó*L™˜ 4à™;Ø#&÷3 
>Ñ	=ð6 !×-Ñ-Ø Ø Ø#&Ø-1Ø49Ø.2ð .ñ ð )Ø&1˜GØ#*§<¡<˜D÷÷ ˜$ð" "�CØD˜W×4Ñ4ÐD°w·|±|ÐD‘Dà÷M ‰d÷ 
>ðV €J÷=õ ú÷õ ú÷7 
>Ô	=ðV €JúsN   §A,FÂFÂ.E$Ã
*FÃ>FÄE5Ä!FÄ2%FÅ$
E2	Å.FÅ5
F	Å?FÆ
Fc                óž  • US:X  a  SnO;SU;   a5  [        X5      (       a%  UR                  S5      u  p4nUR                  U5        SU;  a  [        X5      (       a  U R                  U4$ U R                  R	                  U 5      nU H  n[        XU5      (       d  M  Xb4s  $    U H  n[        X5      (       d  M  Xb4s  $    U R                  U4$ )aP  Find the Click object that will handle the completion of the
incomplete value. Return the object and the incomplete value.

:param ctx: Invocation context for the command represented by
    the parsed complete args.
:param args: List of complete args before the incomplete value.
:param incomplete: Value being completed. May be empty.
Ú=rR   z--)rø   r   ræ   r  Ú
get_paramsr  rô   )rm   rk   rl   r5   r   rì   ró   s          r   rj   rj   õ  sÐ   € ð �SÓØ‰
Ø	�
Ó	Ô/°×@Ñ@Ø(×2Ñ2°3Ó7Ñˆ�Ø�‰�DÔð �4ÓÔ,¨S×=Ñ=Ø�{‰{˜JÐ&Ð&à�[‰[×#Ñ# CÓ(€Fó ˆÜ  ¨E×2Ó2ØÐ$Ò$ñ ó ˆÜ" 3×.Ó.ØÐ$Ò$ñ ð �;‰;˜
Ð"Ð"r    )r   r   r   rN   r   r9   r   r9   r   r9   r<   zt.Literal[0, 1]r.   )rÖ   útype[_ShellCompleteT]r5   r:   r<   r  )r   zt.Literal['bash']r<   ztype[BashComplete])r   zt.Literal['fish']r<   ztype[FishComplete])r   zt.Literal['zsh']r<   ztype[ZshComplete])r   r9   r<   ztype[ShellComplete] | None)rè   r9   r<   r~   )rm   r   ró   r   r<   Úbool)rm   r   r)   r9   r<   r  )rm   r   rk   r~   ró   r   r<   r  )
r   r   r   rN   r   r9   rk   r~   r<   r   )rm   r   rk   r~   rl   r9   r<   ztuple[Command | Parameter, str])4Ú
__future__r   Úcollections.abcÚabcÚcabcr¡   rV   ÚtypingÚtr   r   Úcorer   r   r   r	   r
   r   r   Úutilsr   r   ÚTYPE_CHECKINGÚtyping_extensionsr!   ÚAnyr"   ÚGenericr&   r®   rº   rÈ   rÑ   Ú	TypedDictrG   rK   r‚   r²   r¼   rÊ   rÒ   rI   rÓ   r×   Úoverloadr   r    rô   rø   r  ri   rj   rE   r    r   Ú<module>r$     s5  ðÞ "å Û 	Û 	Û Ý  å Ý Ý Ý Ý Ý Ý !Ý ð$Ø	ð$à-ð$ð ð$ð ð	$ð
 ð$ð ô$ðN ‡?‡?Ý)ñ ˜°¸q¿u¹uÑE�Jà—’˜<°4Ñ8€Jô"$�Q—Y‘Y˜zÑ*ô "$ðL€ðL*€ðX€ð67Ð ôt�a—k‘kô ÷lñ lô^8+�=ô 8+ôv!0�-ô !0ôH"+�=ô "+ôJ5˜ô 5ðF ØØ$Øñ	>Ð Ð:ó ð —)’)Ð-°_ÑE€ð 48ðØ	ðØ&0ðàõð( ‡�Û Mó Ø MØ‡�Û Mó Ø MØ‡�Û Kó Ø KØ‡�Û Gó Ø Gô(ô!ôHô."ôAð2:Ø	ð:à-ð:ð ð:ð ð	:ð
 ô:ðz,#Ø	ð,#Ø!ð,#Ø/2ð,#à$õ,#r    