Ë
    Ö—Äjk  ã                  ó*  — d dl mZ d dlZd dlZd dlZd dlmZmZmZm	Z	m
Z
mZ d dlmZ d dlmZ d dlmZmZ d dlmZ d dlmZmZmZ d d	lmZmZ d d
lmZ d dlmZm Z  d dl!m"Z" d dl#m$Z$m%Z% d dl&m'Z'm(Z(m)Z)m*Z*m+Z+m,Z, erd dl-m.Z.m/Z/ 	 d&	 	 	 d'd„Z0d(d)d„Z1	 d(	 	 	 d*d„Z2dddddddddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d+d„Z3dddddddddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d,d„Z4ddddddddddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d-d„Z5ddddddddddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d.d„Z6ddddddddddddœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d/d„Z7eddddddddddejp                  dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d0d„«       Z9eddddddddddejp                  dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d1d„«       Z9eddddddddddejp                  dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d2d „«       Z9 e«       	 d&ddddddddddejp                  dœ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d3d!„«       Z9ddddddd"œ	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d4d#„Z:d&d5d$„Z;	 d6	 	 	 	 	 d7d%„Z<y)8é    )ÚannotationsN)ÚTYPE_CHECKINGÚAnyÚHashableÚTextIOÚcastÚoverload)ÚTheme)Údataclass_transform)ÚargparseÚparser)Údetect)ÚAliasÚCommandÚFinalCommand)ÚHelpFormattableÚHelpFormatter)Úresolve_callable)ÚDepTypesÚInvokeCallableSpec)ÚOutput)ÚSÚState)ÚBackendÚCappaCapableÚFuncOrClassDecoratorÚParseResultÚTÚU)ÚArgÚFinalArgc                ó0  — ddl m} ddlm}m}m}m} | sy t        | t        «      r# || dgdgd |ddd	¬
«      |j                  ¬«      } | j                  |u rt        d«      ‚| j                  du r
 || d¬«      } | j                  |j                  dd ¬«      S )Nr   )Úreplace)r    Ú	ArgActionÚEmptyÚGroupz-vz	--versionzShow the version and exit.é   ÚHelpé   ©Úsection)Ú
value_nameÚshortÚlongÚhelpÚgroupÚactionz^Expected explicit version `Arg` to supply version number as its name, like `Arg('1.2.3', ...)`T)r.   Úversion©r1   Ú
field_nameÚdefault)Údataclassesr#   Ú	cappa.argr    r$   r%   r&   Ú
isinstanceÚstrr2   r,   Ú
ValueErrorr.   Ú	normalize)r2   r#   r    r$   r%   r&   s         úOC:\Users\pivot\Documents\cueki\casual-preloader\Lib\site-packages\cappa/base.pyÚcreate_version_argr=       s«   € õ $ç6Ó6áØä�'œ3ÔÙØØ�&Ø�Ø-Ù˜˜6¨1Ô-Ø×$Ñ$ô
ˆð ×Ñ˜UÑ"ÜØló
ð 	
ð ‡|�|�tÑÙ˜'¨Ô4ˆà×ÑØ× Ñ ¨YÀð ó ð ó    Tc           
     ó¼   — ddl m}m}m} | sy t	        | t
        «      r" |dgdgd |ddd¬«      |j                  ¬	«      } | j                  |j                  d
d ¬«      S )Nr   ©r    r$   r&   z-hz--helpzShow this message and exit.r(   r)   r*   )r-   r.   r/   r0   r1   r/   r3   )r7   r    r$   r&   r8   Úboolr/   r;   )r/   r    r$   r&   s       r<   Úcreate_help_argrB   A   s]   € ß/Ñ/áØä�$œÔÙØ�&Ø�Ø.Ù˜˜6¨1Ô-Ø—>‘>ô
ˆð �>‰> §¡¸FÈDˆ>ÓQÐQr>   c           	     ó¾   — ddl m}m}m} | sy t	        | t
        «      r# |dgddg |ddd¬«      d	|j                  ¬
«      } | j                  d|j                  d ¬«      S )Nr   r@   z--completionÚgenerateÚcompleter)   r(   r*   zFUse `--completion generate` to print shell-specific completion source.)r.   Úchoicesr0   r/   r1   Ú
completion)r4   r1   r5   )r7   r    r$   r&   r8   rA   rG   r;   )rG   r    r$   r&   s       r<   Úcreate_completion_argrH   S   ss   € ÷ 0Ñ/áØä�*œdÔ#ÙØ Ð!Ø Ð,Ù˜˜6¨1Ô-ØYØ×'Ñ'ô
ˆ
ð ×ÑØØ×#Ñ#Øð  ó ð r>   )ÚargvÚinputÚbackendÚcolorr2   r/   rG   ÚthemeÚoutputÚhelp_formatterÚstateÚ
exit_stackc               óî   — t        | |||||||||	|
|¬«      }|�6|j                  |j                  j                  |j                  d¬«      «      S |j                  j                  |j                  d¬«      S )a§  Parse the command, returning an instance of `obj`.

    In the event that a subcommand is selected, only the selected subcommand
    function is invoked.

    Arguments:
        obj: A class which can represent a CLI command chain.
        argv: Defaults to the process argv. This command is generally only
            necessary when testing.
        input: Defaults to the process stdin. This command is generally only
            necessary when testing.
        backend: A function used to perform the underlying parsing and return a raw
            parsed state. This defaults to the native cappa parser, but can be changed
            to the argparse parser at `cappa.argparse.backend`.
        color: Whether to output in color.
        version: If a string is supplied, adds a -v/--version flag which returns the
            given string as the version. If an `Arg` is supplied, uses the `name`/`short`/`long`/`help`
            fields to add a corresponding version argument. Note the `name` is assumed to **be**
            the CLI's version, e.x. `Arg('1.2.3', help="Prints the version")`.
        help: If `True` (default to True), adds a -h/--help flag. If an `Arg` is supplied,
            uses the `short`/`long`/`help` fields to add a corresponding help argument.
        completion: Enables completion when using the cappa `backend` option. If `True`
            (default to True), adds a --completion flag. An `Arg` can be supplied to customize
            the argument's behavior.
        theme: Optional rich theme to customized output formatting.
        output: Optional `Output` instance. A default `Output` will constructed if one is not provided.
            Note the `color` and `theme` arguments take precedence over manually constructed `Output`
            attributes.
        help_formatter: Override the default help formatter.
        state: Optional initial State object.
        exit_stack: Optional ExitStack to use for managing context managers. If provided,
            the caller is responsible for closing the stack, allowing context to exceed the
            function call. If not provided, contexts are not entered (parse does not manage
            contexts by default).
    ©ÚobjrI   rJ   rK   rL   r2   r/   rG   rM   rN   rO   rP   T©rN   ÚmanagedF)Úparse_commandÚenter_contextÚinstanceÚgetrN   Úcall©rT   rI   rJ   rK   rL   r2   r/   rG   rM   rN   rO   rP   rQ   Úparse_results                 r<   Úparser^   k   s‘   € ôf !ØØØØØØØØØØØ%Øô€Lð ÐØ×'Ñ'Ø×!Ñ!×%Ñ%¨\×-@Ñ-@È$Ð%ÓOó
ð 	
ð × Ñ ×%Ñ%¨\×-@Ñ-@È%Ð%ÓPÐPr>   c             ƒ  ó  K  — t        | |||||||||	|
|¬«      }|�>|j                  |j                  j                  |j                  d¬«      «      ƒ d{  –—† S |j                  j                  |j                  d¬«      ƒ d{  –—† S 7 Œ37 Œ­w)a	  Parse the command asynchronously, returning an instance of `obj`.

    This is the async version of `parse()`, necessary when using async parse functions.

    In the event that a subcommand is selected, only the selected subcommand
    function is invoked.

    Arguments:
        obj: A class which can represent a CLI command chain.
        argv: Defaults to the process argv. This command is generally only
            necessary when testing.
        input: Defaults to the process stdin. This command is generally only
            necessary when testing.
        backend: A function used to perform the underlying parsing and return a raw
            parsed state. This defaults to the native cappa parser, but can be changed
            to the argparse parser at `cappa.argparse.backend`.
        color: Whether to output in color.
        version: If a string is supplied, adds a -v/--version flag which returns the
            given string as the version. If an `Arg` is supplied, uses the `name`/`short`/`long`/`help`
            fields to add a corresponding version argument. Note the `name` is assumed to **be**
            the CLI's version, e.x. `Arg('1.2.3', help="Prints the version")`.
        help: If `True` (default to True), adds a -h/--help flag. If an `Arg` is supplied,
            uses the `short`/`long`/`help` fields to add a corresponding help argument.
        completion: Enables completion when using the cappa `backend` option. If `True`
            (default to True), adds a --completion flag. An `Arg` can be supplied to customize
            the argument's behavior.
        theme: Optional rich theme to customized output formatting.
        output: Optional `Output` instance. A default `Output` will constructed if one is not provided.
            Note the `color` and `theme` arguments take precedence over manually constructed `Output`
            attributes.
        help_formatter: Override the default help formatter.
        state: Optional initial State object.
        exit_stack: Optional AsyncExitStack to use for managing async context managers.
            If provided, the caller is responsible for closing the stack, allowing context
            to exceed the function call. If not provided, contexts are not entered (parse does
            not manage contexts by default).
    rS   NTrU   F)rW   Úenter_async_contextrY   Ú	get_asyncrN   Ú
call_asyncr\   s                 r<   Úparse_asyncrc   ³   s²   è ø€ ôj !ØØØØØØØØØØØ%Øô€Lð ÐØ×3Ñ3Ø×!Ñ!×+Ñ+°<×3FÑ3FÐPTÐ+ÓUó
÷ 
ð 	
ð ×&Ñ&×1Ñ1Ø×"Ñ"¨Eð 2ó ÷ ð ð
øðús$   ‚ABÁB	Á.BÂBÂBÂB)ÚdepsrI   rJ   rK   rL   r2   r/   rG   rM   rN   rO   rP   rQ   c               óº   ‡‡— t        | ||||||||	|
||¬«      Šdˆˆfd„}|� ||«      S t        j                  «       5 } ||«      cddd«       S # 1 sw Y   yxY w)a+	  Parse the command, and invoke the selected async command or subcommand.

    In the event that a subcommand is selected, only the selected subcommand
    function is invoked.

    Arguments:
        obj: A class which can represent a CLI command chain.
        deps: Optional extra depdnencies to load ahead of invoke processing. These
            deps are evaluated in order and unconditionally.
        argv: Defaults to the process argv. This command is generally only
            necessary when testing.
        input: Defaults to the process stdin. This command is generally only
            necessary when testing.
        backend: A function used to perform the underlying parsing and return a raw
            parsed state. This defaults to the native cappa parser, but can be changed
            to the argparse parser at `cappa.argparse.backend`.
        color: Whether to output in color.
        version: If a string is supplied, adds a -v/--version flag which returns the
            given string as the version. If an `Arg` is supplied, uses the `name`/`short`/`long`/`help`
            fields to add a corresponding version argument. Note the `name` is assumed to **be**
            the CLI's version, e.x. `Arg('1.2.3', help="Prints the version")`.
        help: If `True` (default to True), adds a -h/--help flag. If an `Arg` is supplied,
            uses the `short`/`long`/`help` fields to add a corresponding help argument.
        completion: Enables completion when using the cappa `backend` option. If `True`
            (default to True), adds a --completion flag. An `Arg` can be supplied to customize
            the argument's behavior.
        theme: Optional rich theme to customized output formatting.
        output: Optional `Output` instance. A default `Output` will constructed if one is not provided.
            Note the `color` and `theme` arguments take precedence over manually constructed `Output`
            attributes.
        help_formatter: Override the default help formatter.
        state: Optional initial State object.
        exit_stack: Optional ExitStack to use for managing context managers. If provided,
            the caller is responsible for closing the stack, allowing context to exceed the
            function call. If not provided, a new stack is created and automatically closed.
    rS   c           	     óF  •— | j                  ‰	j                  j                  ‰	j                  ¬«      «      }i }‰	j                  j                  «       D ]3  \  }}| j                  |j                  ‰	j                  ¬«      «      ||<   Œ5 t        ‰	j                  ‰	j                  ||‰	j                  ‰	j                  ‰¬«      \  }}|D ]-  }| j                  |j                  ‰	j                  ¬«      «       Œ/ | j                  |j                  ‰	j                  ¬«      «      S ©N)rN   )Úimplicit_depsrN   rP   rd   )
rX   rY   rZ   rN   rh   Úitemsr   Úroot_commandÚparsed_commandrP   ©
ÚstackrY   Úresolved_implicit_depsÚkeyÚresolved_depÚresolvedÚglobal_depsÚdeprd   r]   s
           €€r<   Ú_invoke_with_stackz"invoke.<locals>._invoke_with_stackC  s  ø€ Ø×&Ñ&Ø×!Ñ!×%Ñ%¨\×-@Ñ-@Ð%ÓAó
ˆð
 79ÐØ!-×!;Ñ!;×!AÑ!AÖ!CÑˆC�Ø*/×*=Ñ*=Ø× Ñ ¨×(;Ñ(;Ð Ó<ó+Ð" 3Ò'ð "Dô
 !1Ø×%Ñ%Ø×'Ñ'ØØ0Ø×&Ñ&Ø×$Ñ$Øô!
Ñˆ�+ó ˆCØ×Ñ §¡¨|×/BÑ/B Ó CÕDð ð ×"Ñ" 8§<¡<°|×7JÑ7J <Ó#KÓLÐLr>   N)rm   zcontextlib.ExitStack)rW   Ú
contextlibÚ	ExitStack)rT   rd   rI   rJ   rK   rL   r2   r/   rG   rM   rN   rO   rP   rQ   rt   rm   r]   s    `              @r<   Úinvokerw   ÿ   so   ù€ ôj !ØØØØØØØØØØØ%Øô€LöMð4 ÐÙ! *Ó-Ð-ä	×	Ñ	Ô	 5Ù! %Ó(÷ 
 ×	Ò	ús   ¿AÁAc             ƒ  ó$  ‡‡K  — t        | ||||||||	|
||¬«      Šdˆˆfd„}|� ||«      ƒ d{  –—† S t        j                  «       4 ƒd{  –—† } ||«      ƒ d{  –—† cddd«      ƒd{  –—†  S 7 ŒB7 Œ'7 Œ7 Œ# 1 ƒd{  –—†7  sw Y   yxY w­w)a0	  Parse the command, and invoke the selected command or subcommand.

    In the event that a subcommand is selected, only the selected subcommand
    function is invoked.

    Arguments:
        obj: A class which can represent a CLI command chain.
        deps: Optional extra depdnencies to load ahead of invoke processing. These
            deps are evaluated in order and unconditionally.
        argv: Defaults to the process argv. This command is generally only
            necessary when testing.
        input: Defaults to the process stdin. This command is generally only
            necessary when testing.
        backend: A function used to perform the underlying parsing and return a raw
            parsed state. This defaults to the native cappa parser, but can be changed
            to the argparse parser at `cappa.argparse.backend`.
        color: Whether to output in color.
        version: If a string is supplied, adds a -v/--version flag which returns the
            given string as the version. If an `Arg` is supplied, uses the `name`/`short`/`long`/`help`
            fields to add a corresponding version argument. Note the `name` is assumed to **be**
            the CLI's version, e.x. `Arg('1.2.3', help="Prints the version")`.
        help: If `True` (default to True), adds a -h/--help flag. If an `Arg` is supplied,
            uses the `short`/`long`/`help` fields to add a corresponding help argument.
        completion: Enables completion when using the cappa `backend` option. If `True`
            (default to True), adds a --completion flag. An `Arg` can be supplied to customize
            the argument's behavior.
        theme: Optional rich theme to customized output formatting.
        output: Optional `Output` instance. A default `Output` will constructed if one is not provided.
            Note the `color` and `theme` arguments take precedence over manually constructed `Output`
            attributes.
        help_formatter: Override the default help formatter.
        state: Optional initial State object.
        exit_stack: Optional AsyncExitStack to use for managing async context managers.
            If provided, the caller is responsible for closing the stack, allowing context to
            exceed the function call. If not provided, a new stack is created and automatically closed.
    rS   c           	   “  ó   •K  — | j                  ‰	j                  j                  ‰	j                  ¬«      «      ƒ d {  –—† }i }‰	j                  j                  «       D ];  \  }}| j                  |j                  ‰	j                  ¬«      «      ƒ d {  –—† ||<   Œ= t        ‰	j                  ‰	j                  ||‰	j                  ‰	j                  ‰¬«      \  }}|D ]5  }| j                  |j                  ‰	j                  ¬«      «      ƒ d {  –—†  Œ7 | j                  |j                  ‰	j                  ¬«      «      ƒ d {  –—† S 7 �Œ	7 Œ¶7 Œ>7 Œ­wrg   )
r`   rY   ra   rN   rh   ri   r   rj   rk   rP   rl   s
           €€r<   Ú_invoke_async_with_stackz.invoke_async.<locals>._invoke_async_with_stack¨  sJ  øè ø€ Ø×2Ñ2Ø×!Ñ!×+Ñ+°<×3FÑ3FÐ+ÓGó
÷ 
ˆð
 79ÐØ!-×!;Ñ!;×!AÑ!AÖ!CÑˆC�Ø05×0IÑ0IØ×&Ñ&¨l×.AÑ.AÐ&ÓBó1÷ +Ð" 3Ò'ð "Dô
 !1Ø×%Ñ%Ø×'Ñ'ØØ0Ø×&Ñ&Ø×$Ñ$Øô!
Ñˆ�+ó ˆCØ×+Ñ+¨C¯M©MÀ×ATÑAT¨MÓ,UÓV×VÑVð ð ×.Ñ.Ø×Ñ l×&9Ñ&9ÐÓ:ó
÷ 
ð 	
ð/
ùð+øð Wøð
úsG   ƒ9E¼E½AEÂEÂA9EÄE
Ä4EÅ EÅEÅEÅ
EÅEN)rm   zcontextlib.AsyncExitStack)rW   ru   ÚAsyncExitStack)rT   rd   rI   rJ   rK   rL   r2   r/   rG   rM   rN   rO   rP   rQ   rz   rm   r]   s    `              @r<   Úinvoke_asyncr|   d  s—   ùè ø€ ôj !ØØØØØØØØØØØ%Øô€Lö
ð8 ÐÙ-¨jÓ9×9Ð9ä×(Ñ(×*Ô*¨eÙ-¨eÓ4×4÷ +×*Ñ*ð :øà*øØ4øð +ø×*×*Ñ*üsi   „,B°A3±BÁA5ÁBÁA;ÁA7ÁA;Á!BÁ-A9Á.BÁ5BÁ7A;Á9BÁ;BÂBÂBÂ	B)rI   rJ   rK   rL   r2   r/   rG   rM   rN   rO   rP   c          	     ó¬   — t        |«      }t        |	||«      }t        j                  |«      }t	        | |||||
|¬«      }|j                  |||||¬«      S )N)r/   r2   rG   rK   rO   rP   )rI   rJ   rK   rN   rP   )Ú_coalesce_backendÚ_coalesce_outputr   ÚensureÚcollectrW   )rT   rI   rJ   rK   rL   r2   r/   rG   rM   rN   rO   rP   Úconcrete_backendÚconcrete_outputÚconcrete_stateÚcommands                   r<   rW   rW   Ë  ss   € ô )¨Ó1ÐÜ& v¨u°eÓ<€OÜ$Ÿ|™|¨EÓ2€Nä&ØØØØØ Ø%Øô €Gð × Ñ ØØØ ØØð !ó ð r>   F©ÚnameÚaliasesr/   ÚdescriptionÚepilogrw   ÚhiddenÚdefault_shortÚdefault_longÚ
deprecatedrO   c                ó   — y ©N© ©Ú_clsr‡   rˆ   r/   r‰   rŠ   rw   r‹   rŒ   r�   rŽ   rO   s               r<   r…   r…   ð  s   € ð r>   c                 ó   — y r�   r‘   r†   s              r<   r…   r…      s   € ð r>   c                ó   — y r�   r‘   r’   s               r<   r…   r…     s   € ð 	r>   c               óP   ‡‡‡‡‡‡‡‡‡	‡
‡— dˆˆ	ˆˆ
ˆˆˆˆˆˆˆfd„}| � || «      S |S )aÄ  Register a cappa CLI command/subcomment.

    Args:
        name: The name of the command. If omitted, the name of the command
            will be the name of the `cls`, converted to dash-case.
        aliases: Alternate names that may be used to invoke this command as a
            subcommand. Each entry is either a plain string (visible alias) or
            an :class:`Alias` instance (which can be marked `hidden=True` or
            `deprecated=...`). Only meaningful when the class is used as a
            subcommand.
        help: Optional help text. If omitted, the `cls` docstring will be parsed,
            and the headline section will be used to document the command
            itself, and the arguments section will become the default help text for
            any params/options.
        description: Optional extended help text. If omitted, the `cls` docstring will
            be parsed, and the extended long description section will be used.
        epilog: Optional text displayed after the argument list in the help output.
        invoke: Optional command to be called in the event parsing is successful.
            In the case of subcommands, it will only call the parsed/selected
            function to invoke.
        hidden: If `True`, the command will not be included in the help output.
            This option is only relevant to subcommands.
        default_short: If `True`, all arguments will be treated as though annotated
            with `Annotated[T, Arg(short=True)]`, unless otherwise annotated.
        default_long: If `True`, all arguments will be treated as though annotated
            with `Annotated[T, Arg(long=True)]`, unless otherwise annotated.
        deprecated: If supplied, the argument will be marked as deprecated. If given `True`,
            a default message will be generated, otherwise a supplied string will be
            used as the deprecation message.
        help_formatter: Override the default help formatter.
    c                óx  •— t        j                  | «      r t        | «      st        j                  | «      } t        j                  | «      }t        j                  |‰‰‰�t        ‰«      n|j                  ‰	‰‰‰‰‰‰‰
¬«      }|| _
        t        j                  | «      rt        t        | «      S |j                  S )N)rw   r‡   rˆ   r/   r‰   rŠ   r‹   rŒ   r�   rŽ   rO   )ÚinspectÚisclassr   r6   Ú	dataclassr   rZ   r#   Úlistrˆ   Ú	__cappa__Ú
isfunctionr   r   Úcmd_cls)Ú_decorated_clsr…   rY   rˆ   r�   rŒ   rŽ   r‰   rŠ   r/   rO   r‹   rw   r‡   s      €€€€€€€€€€€r<   Úwrapperzcommand.<locals>.wrapperQ  s¬   ø€ Ü�?‰?˜>Ô*´6¸.Ô3IÜ(×2Ñ2°>ÓBˆNä%Ÿk™k¨.Ó9ˆÜ×&Ñ&ØØØØ%,Ð%8”D˜”M¸g¿o¹oØØ#ØØØ'Ø%Ø!Ø)ô
ˆð $,ˆÔ ô ×Ñ˜nÔ-Üœ˜>Ó*Ð*ð ×ÑÐr>   )rŸ   r   Úreturnr   r‘   )r“   r‡   rˆ   r/   r‰   rŠ   rw   r‹   rŒ   r�   rŽ   rO   r    s    ``````````` r<   r…   r…   !  s&   ÿú€ ÷` ÷  ð< ÐÙ�t‹}ÐØ€Nr>   )rK   r2   r/   rG   rO   rP   c               ó"  — t        j                  |«      }t        j                  | |¬«      j	                  |¬«      }t        |«      }|t        j                  u rd}t        |«      }	t        |«      }
t        |«      }|j                  |	|
|¬«      S )aÓ  Retrieve the `Command` object from a cappa-capable source class.

    Arguments:
        obj: A class which can represent a CLI command chain.
        backend: A function used to perform the underlying parsing and return a raw
            parsed state. This defaults to constructing built-in function using argparse.
        version: If a string is supplied, adds a -v/--version flag which returns the
            given string as the version. If an `Arg` is supplied, uses the `name`/`short`/`long`/`help`
            fields to add a corresponding version argument. Note the `name` is assumed to **be**
            the CLI's version, e.x. `Arg('1.2.3', help="Prints the version")`.
        help: If `True` (default to True), adds a -h/--help flag. If an `Arg` is supplied,
            uses the `short`/`long`/`help` fields to add a corresponding help argument.
        completion: Enables completion when using the cappa `backend` option. If `True`
            (default to True), adds a --completion flag. An `Arg` can be supplied to customize
            the argument's behavior.
        color: Whether to output in color.
        help_formatter: Override the default help formatter.
        state: Optional initial State object.
    )rO   )rP   F)r/   r2   rG   )r   r€   r   rZ   r�   r~   r   rK   rB   r=   rH   Úadd_meta_actions)rT   rK   r2   r/   rG   rO   rP   r…   r‚   Úhelp_argÚversion_argÚcompletion_args               r<   r�   r�   t  s‘   € ô: �L‰L˜Ó€Eä&Ÿ{™{Ø˜Nô ç�g�E€gÓð ô )¨Ó1ÐØœ8×+Ñ+Ñ+Øˆ
ä˜tÓ$€HÜ$ WÓ-€KÜ*¨:Ó6€Nà×#Ñ#Ø˜{°~ð $ó ð r>   c                ó*   — | €t         j                  S | S r�   )r   rK   )rK   s    r<   r~   r~   ¤  s   € Ø€Ü�~‰~ÐØ€Nr>   c                óf   — | €
t        «       } | j                  |«       |s| j                  d«       | S )NF)r   rM   rL   )rN   rM   rL   s      r<   r   r   ª  s0   € ð €~Ü“ˆà
‡L�L�ÔáØ�‰�UÔà€Mr>   r�   )r2   ústr | Arg[Any] | Noner¡   zFinalArg[Any] | None)T)r/   zbool | Arg[bool] | Noner¡   úFinalArg[bool] | None)rG   úbool | Arg[bool]r¡   rª   )rT   úCappaCapable[T]rI   úlist[str] | NonerJ   úTextIO | NonerK   úBackend | NonerL   rA   r2   r©   r/   úbool | Arg[Any]rG   r°   rM   úTheme | NonerN   úOutput | NonerO   úHelpFormattable | NonerP   úState[Any] | NonerQ   úcontextlib.ExitStack | Noner¡   r   )rT   r¬   rI   r­   rJ   r®   rK   r¯   rL   rA   r2   r©   r/   r°   rG   r°   rM   r±   rN   r²   rO   r³   rP   r´   rQ   ú contextlib.AsyncExitStack | Noner¡   r   )rT   r¬   rd   r   rI   r­   rJ   r®   rK   r¯   rL   rA   r2   r©   r/   r°   rG   r°   rM   r±   rN   r²   rO   r³   rP   r´   rQ   rµ   r¡   r   )rT   r¬   rd   r   rI   r­   rJ   r®   rK   r¯   rL   rA   r2   ústr | Arg[str] | Noner/   r«   rG   r«   rM   r±   rN   r²   rO   r³   rP   r´   rQ   r¶   r¡   r   )rT   r¬   rI   r­   rJ   r®   rK   r¯   rL   rA   r2   r·   r/   r«   rG   r«   rM   r±   rN   r²   rO   r³   rP   zState[S] | Noner¡   zParseResult[T, S])r“   útype[T]r‡   ú
str | Nonerˆ   úlist[str | Alias] | Noner/   r¹   r‰   r¹   rŠ   r¹   rw   úInvokeCallableSpec[Any] | Noner‹   rA   rŒ   rA   r�   rA   rŽ   rA   rO   r   r¡   r¸   )r‡   r¹   rˆ   rº   r/   r¹   r‰   r¹   rŠ   r¹   rw   r»   r‹   rA   rŒ   rA   r�   rA   rŽ   rA   rO   r   r¡   r   )r“   r   r‡   r¹   rˆ   rº   r/   r¹   r‰   r¹   rŠ   r¹   rw   r»   r‹   rA   rŒ   rA   r�   rA   rŽ   rA   rO   r   r¡   r   )r“   ztype[T] | T | Noner‡   r¹   rˆ   rº   r/   r¹   r‰   r¹   rŠ   r¹   rw   r»   r‹   rA   rŒ   rA   r�   rA   rŽ   rA   rO   r   r¡   z"type[T] | T | FuncOrClassDecorator)rT   r¬   rK   r¯   r2   r·   r/   r«   rG   r«   rO   r³   rP   r´   r¡   zFinalCommand[T])rK   r¯   r¡   r   )NNT)rN   r²   rM   r±   rL   rA   )=Ú
__future__r   ru   r6   r˜   Útypingr   r   r   r   r   r	   Ú
rich.themer
   Útyping_extensionsr   Úcappar   r   Úcappa.class_inspectr   Úcappa.commandr   r   r   Ú
cappa.helpr   r   Úcappa.invoke.baser   Úcappa.invoke.typesr   r   Úcappa.outputr   Úcappa.stater   r   Úcappa.typesr   r   r   r   r   r   r7   r    r!   r=   rB   rH   r^   rc   rw   r|   rW   r5   r…   r�   r~   r   r‘   r>   r<   Ú<module>rÉ      s  ðÝ "ã Û Û ÷÷ õ Ý 1ç "Ý &ß 6Ñ 6ß 5Ý .ß ;Ý ß  ß V× Váß'ð &*ðØ"ðàóôBRð& $(ðØ ðàóð6 "ØØ"ØØ%)Ø Ø"&ØØ Ø-1Ø#Ø.2ñEQØ	ðEQð ðEQð ð	EQð
 ðEQð ðEQð #ðEQð ðEQð  ðEQð ðEQð ðEQð +ðEQð ðEQð ,ðEQð óEQðV "ØØ"ØØ%)Ø Ø"&ØØ Ø-1Ø#Ø37ñIØ	ðIð ðIð ð	Ið
 ðIð ðIð #ðIð ðIð  ðIð ðIð ðIð +ðIð ðIð 1ðIð óIð^ Ø!ØØ"ØØ%)Ø Ø"&ØØ Ø-1Ø#Ø.2ñb)Ø	ðb)ð ðb)ð ð	b)ð
 ðb)ð ðb)ð ðb)ð #ðb)ð ðb)ð  ðb)ð ðb)ð ðb)ð +ðb)ð ðb)ð ,ðb)ð  	ó!b)ðP Ø!ØØ"ØØ%)Ø!Ø#'ØØ Ø-1Ø#Ø37ñd5Ø	ðd5ð ðd5ð ð	d5ð
 ðd5ð ðd5ð ðd5ð #ðd5ð ðd5ð !ðd5ð ðd5ð ðd5ð +ðd5ð ðd5ð 1ðd5ð  	ó!d5ðT "ØØ"ØØ%)Ø!Ø#'ØØ Ø-1Ø!ñ"Ø	ð"ð ð"ð ð	"ð
 ð"ð ð"ð #ð"ð ð"ð !ð"ð ð"ð ð"ð +ð"ð ð"ð ó"ðJ 
ð Ø(,ØØ"ØØ-1ØØØØØ&3×&;Ñ&;ñØ
ðð ðð &ð	ð
 ðð ðð ðð +ðð ðð ðð ðð ðð $ðð òó 
ðð 
ð Ø(,ØØ"ØØ-1ØØØØØ&3×&;Ñ&;ñà
ðð &ðð ð	ð
 ðð ðð +ðð ðð ðð ðð ðð $ðð òó 
ðð 
ð Ø(,ØØ"ØØ-1ØØØØØ&3×&;Ñ&;ñØ
ðð ðð &ð	ð
 ðð ðð ðð +ðð ðð ðð ðð ðð $ðð òó 
ðñ" Óà#ðOð Ø(,ØØ"ØØ-1ØØØØØ&3×&;Ñ&;ñOØ
ðOð ðOð &ð	Oð
 ðOð ðOð ðOð +ðOð ðOð ðOð ðOð ðOð $ðOð (òOó ðOðj #Ø%)Ø!Ø#'Ø-1Ø#ñ-Ø	ð-ð ð-ð #ð	-ð
 ð-ð !ð-ð +ð-ð ð-ð ó-ô`ð MQðØðØ)5ðØEIôr>   