
    =)iEO                        d dl Z d dlZd dlmZ d dlmZmZmZmZm	Z	m
Z
 d dlZd dlZerddlmZmZ ddlmZ  ed      Zee   ZdZ G d d	ej,                        Z G d
 dej.                        Z G d de      Z G d dej4                        Z G d dej8                        Z G d dej<                        Z G d d      Z  e	d      Z! e	dedef         Z"de!de!fdZ# G d d      Z$ G d d      Z% G d  d!      Z& G d" d#e&      Z' G d$ d%e&      Z( G d& d'      Z) G d( d)      Z* G d* d+ejV                        Z,y),    N)Sequence)TYPE_CHECKINGAnyCallableOptionalTypeVarUnion   )TyperCommand
TyperGroup)Typer.c                       e Zd ZdZy)ContextaB  
    The [`Context`](https://click.palletsprojects.com/en/stable/api/#click.Context) has some additional data about the current execution of your program.
    When declaring it in a [callback](https://typer.tiangolo.com/tutorial/options/callback-and-context/) function,
    you can access this additional information.
    N__name__
__module____qualname____doc__     )/mnt/e/genesis-system/lib/typer/models.pyr   r      s     	r   r   c                       e Zd ZdZy)FileTexta  
    Gives you a file-like object for reading text, and you will get a `str` data from it.
    The default mode of this class is `mode="r"`.

    **Example**

    ```python
    from typing import Annotated

    import typer

    app = typer.Typer()

    @app.command()
    def main(config: Annotated[typer.FileText, typer.Option()]):
        for line in config:
            print(f"Config line: {line}")

    if __name__ == "__main__":
        app()
    ```
    Nr   r   r   r   r   r   &       . 	r   r   c                       e Zd ZdZy)FileTextWritea  
    You can use this class for writing text. Alternatively, you can use `FileText` with `mode="w"`.
    The default mode of this class is `mode="w"`.

    **Example**

    ```python
    from typing import Annotated

    import typer

    app = typer.Typer()

    @app.command()
    def main(config: Annotated[typer.FileTextWrite, typer.Option()]):
        config.write("Some config written by the app")
        print("Config written")

    if __name__ == "__main__":
        app()
    ```
    Nr   r   r   r   r   r   A   r   r   r   c                       e Zd ZdZy)FileBinaryReada  
    You can use this class to read binary data, receiving `bytes`.
    The default mode of this class is `mode="rb"`.
    It is useful for reading binary files like images:

    **Example**

    ```python
    from typing import Annotated

    import typer

    app = typer.Typer()

    @app.command()
    def main(file: Annotated[typer.FileBinaryRead, typer.Option()]):
        processed_total = 0
        for bytes_chunk in file:
            # Process the bytes in bytes_chunk
            processed_total += len(bytes_chunk)
            print(f"Processed bytes total: {processed_total}")

    if __name__ == "__main__":
        app()
    ```
    Nr   r   r   r   r   r   \   s    6 	r   r   c                       e Zd ZdZy)FileBinaryWriteut  
    You can use this class to write binary data: you pass `bytes` to it instead of strings.
    The default mode of this class is `mode="wb"`.
    It is useful for writing binary files like images:

    **Example**

    ```python
    from typing import Annotated

    import typer

    app = typer.Typer()

    @app.command()
    def main(file: Annotated[typer.FileBinaryWrite, typer.Option()]):
        first_line_str = "some settings\n"
        # You cannot write str directly to a binary file; encode it first
        first_line_bytes = first_line_str.encode("utf-8")
        # Then you can write the bytes
        file.write(first_line_bytes)
        # This is already bytes, it starts with b"
        second_line = b"la cigÃ¼eÃ±a trae al niÃ±o"
        file.write(second_line)
        print("Binary file written")

    if __name__ == "__main__":
        app()
    ```
    Nr   r   r   r   r    r    {   s    > 	r   r    c                       e Zd ZdZy)CallbackParamz
    In a callback function, you can declare a function parameter with type `CallbackParam`
    to access the specific Click [`Parameter`](https://click.palletsprojects.com/en/stable/api/#click.Parameter) object.
    Nr   r   r   r   r"   r"      s    
 	r   r"   c                   (    e Zd ZdZdefdZdefdZy)DefaultPlaceholderz
    You shouldn't use this class directly.

    It's used internally to recognize when a default value has been overwritten, even
    if the new value is `None`.
    valuec                     || _         y Nr%   )selfr%   s     r   __init__zDefaultPlaceholder.__init__   s	    
r   returnc                 ,    t        | j                        S r'   )boolr%   )r)   s    r   __bool__zDefaultPlaceholder.__bool__   s    DJJr   N)r   r   r   r   r   r*   r-   r.   r   r   r   r$   r$      s    c  $  r   r$   DefaultTypeCommandFunctionType)boundr%   r+   c                     t        |       S )z
    You shouldn't use this function directly.

    It's used internally to recognize when a default value has been overwritten, even
    if the new value is `None`.
    )r$   r(   s    r   Defaultr3      s     e$$r   c                       e Zd Z	 dddddddddddddddee   deed      d	eeeef      d
eedef      dee   dee   dee   dede	de	de	de	de
edf   fdZy)CommandInfoN	[OPTIONS]TF)clscontext_settingscallbackhelpepilog
short_helpoptions_metavaradd_help_optionno_args_is_helphidden
deprecatedrich_help_panelnamer7   r   r8   r9   .r:   r;   r<   r=   r>   r?   r@   rA   rB   c                    || _         || _        || _        || _        || _        || _        || _        || _        |	| _        |
| _	        || _
        || _        || _        y r'   )rC   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   )r)   rC   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   s                 r   r*   zCommandInfo.__init__   sd    $ 	 0 	$...$.r   r'   )r   r   r   r   strtypedictr   r   r-   r	   r*   r   r   r   r5   r5      s     #/ /35915" $$(* $ % ,0!/sm/ d>*+	/
 #4S>2/ 8CH-./ sm/ / SM/ / / / / /  sDy)!/r   r5   c            (          e Zd Z ed      f ed       ed       ed       ed       ed       ed       ed       ed       ed       ed       ed       ed       ed       ed       ed       ed       ed      dded   dee   d	eed
      dededee   dedeede	f      dee
e	e	f      deede	f      dee   dee   dee   dededededeedf   f$dZy)	TyperInfoNFr6   T)rC   r7   invoke_without_commandr?   subcommand_metavarchainresult_callbackr8   r9   r:   r;   r<   r=   r>   r@   rA   rB   typer_instancer   rC   r7   r   rJ   r?   rK   rL   rM   .r8   r9   r:   r;   r<   r=   r>   r@   rA   rB   c                    || _         || _        || _        || _        || _        || _        || _        || _        |	| _        |
| _	        || _
        || _        || _        || _        || _        || _        || _        || _        y r'   )rN   rC   r7   rJ   r?   rK   rL   rM   r8   r9   r:   r;   r<   r=   r>   r@   rA   rB   )r)   rN   rC   r7   rJ   r?   rK   rL   rM   r8   r9   r:   r;   r<   r=   r>   r@   rA   rB   s                      r   r*   zTyperInfo.__init__   s    0 -	&<#."4
. 0 	$..$.r   )r   r   r   r3   r   rE   rF   r-   r   r   rG   r	   r*   r   r   r   rI   rI      s    -4DM)/ &dm,3DM'.u~ ',3DMen8?5<T]18%dm '$+DM&{3 'u~"5>,3DM-)/ ))/ sm	)/
 d<())/ !%)/ )/ %SM)/ )/ "(38"45)/ #4S>2)/ 8CH-.)/ sm)/ )/  SM!)/" #)/$ %)/& ')/( ))/, sDy)-)/r   rI   c            K       D   e Zd Zddddddddddddddddddddddddddddddddddddd$dee   deee      deed	ef      d
ee   dededee	ee
e   f      deeej                  ej                  ege	e
d   e
e   f   f      deed	ef      deeg ef      deeegef      deej                     de	eef   dededee   dededee	eef      dee	eef      dedee
e      dee   dee   d ee   d!ee   d"ed#ed$ed%ed&ed'ed(ed)ed*e	dee   ee   f   d+e	edf   fHd,Zy)-ParameterInfoNTFstrict$defaultparam_declsr9   metavarexpose_valueis_eagerenvvarshell_completeautocompletiondefault_factoryparser
click_typeshow_defaultshow_choicesshow_envvarr:   r@   case_sensitiveminmaxclampformatsmodeencodingerrorslazyatomicexists	file_okaydir_okaywritablereadableresolve_path
allow_dash	path_typerB   rT   rU   r9   .rV   rW   rX   rY   rZ   %click.shell_completion.CompletionItemr[   r\   r]   r^   r_   r`   ra   r:   r@   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rB   c       $            |r|rt        d      || _        || _        || _        || _        || _        || _        || _        || _        |	| _	        |
| _
        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        || _        | | _         |!| _!        |"| _"        |#| _#        |$| _$        y )NzZMultiple custom type parsers provided. `parser` and `click_type` may not both be provided.)%
ValueErrorrT   rU   r9   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   r:   r@   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rB   )%r)   rT   rU   r9   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   r:   r@   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rB   s%                                        r   r*   zParameterInfo.__init__  s&   p jF 
 & ( ,,.$((&	,
	 	"   ($".r   )r   r   r   r   r   r   rE   r   r-   r	   listclickr   	Parameter	ParamTypeintfloatrF   bytesr*   r   r   r   rQ   rQ     s*    "&/315!%!26 7;7;1504)-! "#+/+/'+""& (#" 9=,0ki/ #i/ hsm,	i/
 8CH-.i/ #i/ i/ i/ sDI~./i/ !5dBCT#YNOQ
i/$ !#s(!34%i/& "(2s7"34'i/* 3%*-.+i/, U__--i/0 D#I&1i/2 3i/4 5i/6 sm7i/8 9i/< =i/@ eCJ'(Ai/B eCJ'(Ci/D Ei/H $s)$Ii/L smMi/N 3-Oi/P Qi/R tnSi/T Ui/X Yi/Z [i/\ ]i/^ _i/` ai/b ci/d ei/f tCy$u+56gi/j sDy)ki/r   rQ   c            [           e Zd Zddddddddddddddddddddddddddddddddddddddddddddd,dee   deee      deed	ef      d
ee   dededee	ee
e   f      deeej                  ej                  ege	e
d   e
e   f   f      deed	ef      deeg ef      deeegef      deej                     de	eef   de	eef   dedededee   dee   dededee   deded ed!ed"ee	eef      d#ee	eef      d$ed%ee
e      d&ee   d'ee   d(ee   d)ee   d*ed+ed,ed-ed.ed/ed0ed1ed2e	dee   ee   f   d3e	edf   fX fd4Z xZS )5
OptionInfoNTFrR   ),rT   rU   r9   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   promptconfirmation_promptprompt_required
hide_inputis_flag
flag_valuecountallow_from_autoenvr:   r@   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rB   rT   rU   r9   .rV   rW   rX   rY   rZ   rt   r[   r\   r]   r^   r_   r   r   r   r   r   r   r   r   r:   r@   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rB   c       ,            t        .|   d)i d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|d|d|d|d|d|d|d|d| d|!d|"d|#d|$d|%d|&d|'d |(d!|)d"|*d#|+d$|, ||d%d l}-|-j                  d&t        d'(       || _        || _        || _        || _        || _	        || _
        y )*NrT   rU   r9   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   r:   r@   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rB   r   zvThe 'is_flag' and 'flag_value' parameters are not supported by Typer and will be removed entirely in a future release.   )
stacklevelr   )superr*   warningswarnDeprecationWarningr   r   r   r   r   r   )/r)   rT   rU   r9   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r   r   r   r   r   r   r   r   r:   r@   r`   ra   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rB   r   	__class__s/                                                 r   r*   zOptionInfo.__init__  s   B 	 -	
-	
#-	
 -	
 	-	

 &-	
 -	
 -	
 *-	
 *-	
 ,-	
 -	
 "-	
 &-	
  &!-	
" $#-	
$ %-	
& '-	
* *+-	
. /-	
0 1-	
2 3-	
6 7-	
: ;-	
< =-	
> ?-	
@ A-	
B C-	
F G-	
H  I-	
J K-	
L M-	
N O-	
P &Q-	
R "S-	
T  U-	
X ,Y-	
\ *"8MMD"	   #6 .$
"4r   r   r   r   r   r   r   rE   r   r-   r	   rw   rx   r   ry   rz   r{   r|   rF   r}   r*   __classcell__r   s   @r   r   r     s   
 "&/315!%!26 7;7;1504)-#($) $ "&$(#'"! #+/+/'+""& (#" 9=,0}5 #	}5
 hsm,}5 8CH-.}5 #}5 }5 }5 sDI~./}5 !5dBCT#YNOQ
}5& !#s(!34'}5( "(2s7"34)}5, 3%*-.-}5. U__-/}52 D#I&3}54 dCi 5}56 "7}58 9}5: ;}5> $?}5@ SMA}5B C}5D !E}5F smG}5H I}5J K}5L M}5P Q}5T eCJ'(U}5V eCJ'(W}5X Y}5\ $s)$]}5` sma}5b 3-c}5d e}5f tng}5h i}5l m}5n o}5p q}5r s}5t u}5v w}5x y}5z tCy$u+56{}5~ sDy)}5 }5r   r   c            K       P    e Zd Zddddddddddddddddddddddddddddddddddddd$dee   deee      deed	ef      d
ee   dededee	ee
e   f      deeej                  ej                  ege	e
d   e
e   f   f      deed	ef      deeg ef      deeegef      deej                     de	eef   dededee   dededee	eef      dee	eef      dedee
e      dee   dee   d ee   d!ee   d"ed#ed$ed%ed&ed'ed(ed)ed*e	dee   ee   f   d+e	edf   fH fd,Z xZS )-ArgumentInfoNTFrR   rS   rT   rU   r9   .rV   rW   rX   rY   rZ   rt   r[   r\   r]   r^   r_   r`   ra   r:   r@   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rB   c       $             t        %|   d%i d|d|d|d|d|d|d|d|d	|	d
|
d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d|d | d!|!d"|"d#|#d$|$ y )&NrT   rU   r9   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   r:   r@   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rB   r   )r   r*   )&r)   rT   rU   r9   rV   rW   rX   rY   rZ   r[   r\   r]   r^   r_   r`   ra   r:   r@   rb   rc   rd   re   rf   rg   rh   ri   rj   rk   rl   rm   rn   ro   rp   rq   rr   rs   rB   r   s&                                        r   r*   zArgumentInfo.__init__  s   p 	 -	
-	
#-	
 -	
 	-	

 &-	
 -	
 -	
 *-	
 *-	
 ,-	
 -	
 "-	
 &-	
  &!-	
" $#-	
$ %-	
& '-	
* *+-	
. /-	
0 1-	
2 3-	
6 7-	
: ;-	
< =-	
> ?-	
@ A-	
B C-	
F G-	
H  I-	
J K-	
L M-	
N O-	
P &Q-	
R "S-	
T  U-	
X ,Y-	
r   r   r   s   @r   r   r     s1   
 "&/315!%!26 7;7;1504)-! "#+/+/'+""& (#" 9=,0me
 #	e

 hsm,e
 8CH-.e
 #e
 e
 e
 sDI~./e
 !5dBCT#YNOQ
e
& !#s(!34'e
( "(2s7"34)e
, 3%*-.-e
. U__-/e
2 D#I&3e
4 5e
6 7e
8 sm9e
: ;e
> ?e
B eCJ'(Ce
D eCJ'(Ee
F Ge
J $s)$Ke
N smOe
P 3-Qe
R Se
T tnUe
V We
Z [e
\ ]e
^ _e
` ae
b ce
d ee
f ge
h tCy$u+56ie
l sDy)me
 e
r   r   c            	           e Zd Zej                  j
                  Zej                  j
                  ej                  j
                  ddedededdfdZy)	ParamMeta)rT   
annotationrC   rT   r   r+   Nc                .    || _         || _        || _        y r'   )rC   rT   r   )r)   rC   rT   r   s       r   r*   zParamMeta.__init__o  s     	$r   )	r   r   r   inspectry   emptyrE   r   r*   r   r   r   r   r   l  s`    ##E ((..!++11	% 	% 		%
 	% 
	%r   r   c            	       .    e Zd ZdddddedededdfdZy)	DeveloperExceptionConfigTpretty_exceptions_enablepretty_exceptions_show_localspretty_exceptions_shortr   r   r   r+   Nc                .    || _         || _        || _        y r'   r   )r)   r   r   r   s       r   r*   z!DeveloperExceptionConfig.__init__|  s     )A%-J*'>$r   )r   r   r   r-   r*   r   r   r   r   r   {  s:     *..2(,	? #'	? (,		?
 "&	? 
	?r   r   c            	       z    e Zd Zdej                  dej
                  dedeej                  j                     fdZ
y)	TyperPathctxparam
incompleter+   c                     g S )zwReturn an empty list so that the autocompletion functionality
        will work properly from the commandline.
        r   )r)   r   r   r   s       r   rZ   zTyperPath.shell_complete  s	     	r   N)r   r   r   rx   r   ry   rE   rw   shell_completionCompletionItemrZ   r   r   r   r   r     s@    ==).FI	e$$33	4r   r   )-r   iocollections.abcr   typingr   r   r   r   r   r	   rx   click.shell_completioncorer   r   mainr   rF   NoneTypeAnyTypeRequiredr   TextIOWrapperr   r   BufferedReaderr   BufferedWriterr    ry   r"   r$   r/   r0   r3   r5   rI   rQ   r   r   r   r   Pathr   r   r   r   <module>r      sJ    	 $   . :
s)	emm 		r 	6	H 	6	R&& 	> 	b''  	F	EOO 	    m$38CH;MN %; %; % /  /F*/ */Zj/ j/Z~5 ~5Bf
= f
R% %
? 
?

 r   