
    -Phze              	         U d Z ddlmZ ddlZddlZddlZddlZddlmZm	Z	 ddlm
Z
 ddlmZ ddlmZ ddlmZ e
rBdd	lm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 ed         Zded<   ed         Z ded<    ej!        e"          Z#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/d0d1d2d3d4i d5d6d7d8d9d:d;d<d=d>d?d@dAdBdCdDdEdFdGdHdIdJdKdLdMdNdOdPdQdRdSdTdUdVi dWdXdYdZd[d\d]d^d_d`dadbdcdddedfdgdhdidjdkdldmdndodpdqdrdsdtdudvdwdxdydziZ$d{ed|<   ddZ%ej&        ej'        z  Z(ded<   ee)ge*f         Z+ded<   e
r G d de          Z,nGee)e)e)e-ee.e)ej        f         e	e)         ge/e0ej1                 e0ej2                 f         f         Z,ded<   e.e)ee)gej        f         f         Z3ded<   eej1        ge)f         Z4ded<   e.e)e.e)df         f         Z5ded<    G d dej6        d          Z7e
reege7f         Z8ded<   	 	 	 dddZ9ddZ:ddZ;ddZ<dddZ=ddZ>	 dddddZ?ddZ@i ZAded<   ddZBdS )zThe composite types for Sphinx.    )annotationsN)CallableSequence)TYPE_CHECKING)nodes)Inliner)logging)Mapping)	AnnotatedAnyFinalLiteralProtocol	TypeAlias)TypeIs)Sphinx)_InventoryItem)fully-qualified-except-typingsmartr   _RestifyMode)r   fully-qualifiedr   _StringifyMode)_contextvarsContextzcontextvars.Context)r   
ContextVarzcontextvars.ContextVar)r   Tokenzcontextvars.Token)_ctypesArrayzctypes.Array)r   	Structurezctypes.Structure)r   Unionzctypes.Union)_ioBufferedRandomzio.BufferedRandom)r!   BufferedReaderzio.BufferedReader)r!   BufferedRWPairzio.BufferedRWPair)r!   BufferedWriterzio.BufferedWriter)r!   BytesIOz
io.BytesIO)r!   FileIOz	io.FileIO)r!   StringIOzio.StringIO)r!   TextIOWrapperzio.TextIOWrapper)zjson.decoderJSONDecoderzjson.JSONDecoder)zjson.encoderJSONEncoderzjson.JSONEncoder)_lzmaLZMACompressorzlzma.LZMACompressor)r,   LZMADecompressorzlzma.LZMADecompressor)zmultiprocessing.contextProcesszmultiprocessing.Process)pathlib._localPathzpathlib.Path)r0   	PosixPathzpathlib.PosixPath)r0   PurePathzpathlib.PurePath)r0   PurePosixPathzpathlib.PurePosixPath)r0   PureWindowsPathzpathlib.PureWindowsPath)r0   WindowsPathzpathlib.WindowsPath)_picklePicklerzpickle.Pickler)r7   	Unpicklerzpickle.Unpickler)_structStructzstruct.Struct)builtinsasync_generatorztypes.AsyncGeneratorType)r<   builtin_function_or_methodztypes.BuiltinMethodType)r<   cellztypes.CellType)r<   classmethod_descriptorztypes.ClassMethodDescriptorType)r<   codeztypes.CodeType)r<   	coroutineztypes.CoroutineType)r<   ellipsisztypes.EllipsisType)r<   frameztypes.FrameType)r<   functionztypes.LambdaType)r<   	generatorztypes.GeneratorType)r<   getset_descriptorztypes.GetSetDescriptorType)r<   mappingproxyztypes.MappingProxyType)r<   member_descriptorztypes.MemberDescriptorType)r<   methodztypes.MethodType)r<   zmethod-wrapperztypes.MethodWrapperType)r<   method_descriptorztypes.MethodDescriptorType)r<   moduleztypes.ModuleType)r<   NoneTypeztypes.NoneType)r<   NotImplementedTypeztypes.NotImplementedType)r<   	tracebackztypes.TracebackType)r<   wrapper_descriptorztypes.WrapperDescriptorType)_weakrefsetWeakSetzweakref.WeakSet)zipfile._pathCompleteDirszzipfile.CompleteDirs)rS   r1   zzipfile.Pathz$Final[Mapping[tuple[str, str], str]]_INVALID_BUILTIN_CLASSESobjr   returnstrc                z    	 | j         | j        f}n# t          $ r Y dS w xY wt                              |d          S )z)Check *obj* is an invalid built-in class. )
__module____qualname__AttributeErrorrU   get)rV   keys     R/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/sphinx/util/typing.pyis_invalid_builtin_classra   m   sP    nc..   rr#''R000s    
TextlikeNodePathMatcherc                      e Zd Z	 	 dddZdS )RoleFunctionN optionsdict[str, Any] | NonecontentSequence[str]namerX   rawtexttextlinenointinlinerr   rW   3tuple[list[nodes.Node], list[nodes.system_message]]c                   d S Nrf   )selfrk   rl   rm   rn   rp   rg   ri   s           r`   __call__zRoleFunction.__call__   s     CF#    )Nrf   )rg   rh   ri   rj   rk   rX   rl   rX   rm   rX   rn   ro   rp   r   rW   rq   )__name__r[   r\   ru   rf   rv   r`   re   re      s<         .2%'
	F 
	F 
	F 
	F 
	F 
	F 
	Frv   re   
OptionSpecTitleGetterr   	Inventoryc                  B    e Zd ZU dZded<   	 ded<   	 ded<   	 ded<   d	S )
ExtensionMetadataz`The metadata returned by an extension's ``setup()`` function.

    See :ref:`ext-metadata`.
    rX   versionro   env_versionboolparallel_read_safeparallel_write_safeN)rw   r[   r\   __doc____annotations__rf   rv   r`   r|   r|      s\          
 LLLAT  rv   r|   F)total_ExtensionSetupFuncglobalnsrh   localnsinclude_extrasr   dict[str, Any]c                    ddl m} 	 t          j        | |||          S # t          $ r  || di           cY S t
          $ r  || di           cY S t          $ r  || di           cY S t          $ r i cY S w xY w)zReturn a dictionary containing type hints for a function, method, module or class
    object.

    This is a simple wrapper of `typing.get_type_hints()` that does not raise an error on
    runtime.
    r   )safe_getattr)r   r   )sphinx.util.inspectr   typingget_type_hints	NameErrorr]   	TypeErrorKeyError)rV   r   r   r   r   s        r`   r   r      s     100000$7>
 
 
 	
  8 8 8|C!2B77777 8 8 8|C!2B77777 8 8 8|C!2B77777    			s      A7A7A7)A76A7typc                d    t          | dd          }|dk    ot          | t          j                  S )z&Check *typ* is system defined TypeVar.r[   rZ   r   )getattr
isinstancer   TypeVar)r   modnames     r`   is_system_TypeVarr      s/    c<,,GhB:c6>#B#BBrv   TypeIs[Annotated[Any, ...]]c                    t          j        |           t           j        u p!t          |                               d          S )z$Check if *obj* is an annotated type.ztyping.Annotated)r   
get_originr   rX   
startswithrV   s    r`   _is_annotated_formr      s<     	#&"22 	3s88122rv   c                B    t          j        |           t           j        u S )z<Check if the object is :class:`typing.Unpack` or equivalent.)r   r   Unpackr   s    r`   _is_unpack_formr      s    S!!V]22rv   r   clsmodec           
        ddl m}m} ddlm}m} ddh}|vrLd                    t          t          t          |                              }d| d}t          |          | | t          j        k    rd
S | t          u rdS t          | t                    r| S t!          | dd          dk    }	dk    s|	rdnd}
	  ||           rd|
 | j         dS  ||           rd|
 | j         d| j         dS t'          |           x}rd|
 | dS t)          |           rRt+          | j        d                   }g }| j        D ]܊t          t0                    r$|                    t+                               ;t5          j                  rkd                    fdt5          j                  D                       }|                    t+          t1                               d| d           |                    t                               d                    |          }t:          j        d	d         dk    r	d| d| dS d|
 | j         d| j         d| d| d
S t          | t>          j                   rd|
 | j         d| j         dS t          | t          j!                  s  ||           r;|	r9| j"        t>          j#        u r&d                    fd| j        D                       S | j        dv ritI          | d          rN| j        sd| j         d| j        dS d                    fd| j        D                       }d| j         d| dS d| j         dS  ||           r`| j        r5t          | j"        t>          j%                  sd|
 | j         d| j         d}nt+          | j"                  }t!          | dd           }|s|S tM          t          tN          |                    r|S |	r| j        d!k    s| j        d"k    rU| j        d!k    rJd                    fd#|d	d$         D                       }t+          |d$                   }| d%| d&| dS |	r>| j"        j        d'k    r.d                    fd(| j        D                       }| d)| dS d                    fd*|D                       }| d)| dS t          | t>          j%                  rd+| j         d| j         dS | t>          j(        u rd+| j         d| j         dS tI          | d,          rd|
 | j         d| j)         dS t          | t>          j*                  rd| j+         dS d-|
 | j         d| j         dS # tX          tZ          f$ r2}t\          /                    d.| |            ||           cY d	}~S d	}~ww xY w)/a}  Convert a type-like object to a reST reference.

    :param mode: Specify a method how annotations will be stringified.

                 'fully-qualified-except-typing'
                     Show the module name and qualified name of the annotation except
                     the "typing" module.
                 'smart'
                     Show the name of the annotation.
    r   ismockismockmodule)isgenericaliasobject_descriptionr   r   , mode must be one of ; got Nz:py:obj:`None`...r[   rZ   r   ~z:py:class:``.c           
     x    g | ]6}|j         	|j         d t          t          |j                             7S )z=\ )reprrk   restifyr   ).0fmr   s     r`   
<listcomp>zrestify.<locals>.<listcomp>  sW     * * *6*FJJwwq!&/A/A4'H'HJJ* * *rv   z\ ()         z :py:class:`~typing.Annotated`\ []z`\ [ | c              3  8   K   | ]}t          |          V  d S rs   r   r   ar   s     r`   	<genexpr>zrestify.<locals>.<genexpr>7  s-      EE1ga..EEEEEErv   >   r<   __builtin____args__c              3  8   K   | ]}t          |          V  d S rs   r   )r   argr   s     r`   r   zrestify.<locals>.<genexpr>=  s>       . .+.GC&&. . . . . .rv   rf   r   zcollections.abcc              3  8   K   | ]}t          |          V  d S rs   r   r   s     r`   r   zrestify.<locals>.<genexpr>W  s-       I IaD!1!1 I I I I I Irv   z\ [[], r   c              3  :   K   | ]}t          |           V  dS )r   N)_format_literal_arg_restifyr   s     r`   r   zrestify.<locals>.<genexpr>\  sB       ! !BC/===! ! ! ! ! !rv   z\ [c              3  8   K   | ]}t          |          V  d S rs   r   r   s     r`   r   zrestify.<locals>.<genexpr>b  s-      @@!WQ--@@@@@@rv   z
:py:obj:`~r\   z	:py:obj:`z#restify on %r in mode %r failed: %r)0sphinx.ext.autodoc.mockr   r   r   r   r   joinmapr   sorted
ValueErrortypesrM   Ellipsisr   rX   r   rw   r[   ra   r   r   r   __metadata__typeappenddataclassesis_dataclassfieldssysversion_infor   NewType	UnionType
__origin__r    hasattr_SpecialFormallr   r   r\   
ForwardRef__forward_arg__r]   r   loggerdebug)r   r   r   r   r   r   valid_modesvalidmsgcls_module_is_typingmodule_prefix	fixed_clsargs	meta_argsd_fieldsmetaconcatenated_argsrm   r   returnsexcr   s    `                   @r`   r   r      s    =<<<<<<<FFFFFFFF2G<K;		#dF;$7$78899:U::$::oo {cU^++
hu#s 
"3b99XE
  7??.B?CCMg'< c	O??????VC[[ a	OPPPPPPPP23777Y _	O =<	<<<<$$ Z	O3<?D11DI% . .a&& .$$WQ%5%56666 -a00 	.#yy * * * * *!,!3A!6!6* * *    H
 $$a$)?)?%O%OH%O%O%OPPPP$$T!WW----99Y''D#w..J4JJ4JJJJ'm 'S^ ' 'cl ' '' '#' ' ' V^,, B	OPPPPPPPPU_-- @	ON3@	O$@	O &,..
 ::EEEEEEEEEE^:::sJ'' M| NM#,MMCLMMMM$(II . . . .25,. . . % %! MclLL8ILLLL00000^C   -	O| 5Js~v?R$S$S 5 U]TCNTTS\TTTs~t44sJ33H 3((3344  &9*-,**D*DN&777CLJ<V<Vyy I I I I8CRC= I I III!(2,5588T88g8888# ,(?9(L(Lyy ! ! ! !GJ|! ! !    ++D++++ 99@@@@x@@@@@D''''''V011 	O@@@@@@@FJ@@@@@@@S.)) 	OTTTTAQTTTTV.// 	O7!47777 O}NcnNNs|NNNNI& ' ' ':CsKKK!!#&&&&&&&&'s   ?V V 7V EV V 2.V !AV 2V 43V (
V 3A1V %#V 	A,V 6?V 6(V ,V  V -$V $V 7V W'W
W
Wr   c                  ddl m}  ||           rN| j        }|dk    s|j        dk    rd|j         d|j         d| j         dS d|j         d|j         d| j         dS t          |           S )	Nr   isenumattributer   r   z:py:attr:`~r   r   z
:py:attr:`r   r   	__class__r[   r\   rk   r   r   r   r   enum_clss       r`   r   r   u  s    333333s V=7??h1X== Xh1WWH4IWWCHWWW VH/UU(2GUU#(UUUU99rv   )short_literals
annotationr   c                 ddl m}m} h d}|vrLd                    t	          t
          t          |                              }d| d}t          |          | | t          j	        k    rdS | t          u rd	S t          | t                    r6|                     d
          r|                     d
          r
| dd         S | S | st          |           S dk    rdnd}t          | dd          }	t          | dd          }
t          | dd          }|
dk    }t           j        dd         dk    rt          | t$          j                  rd}t          | t$          j                  r!t+          |           s|rdv r|S ||
 d| z   S t          | t$          j                  r
||
 d| z   S  ||           r||z   S  ||           r
||
 d| z   S t/          |           x}r||z   S t1          |           rnY|
dk    rR|	rPt          | dd          }||	S |st          |           S d                    fd|D                       }|	 d| dS 	 |
 d}t          | dd          }|	s|r|sdk    rd| }|rdk    rd}n"t+          |           r|
d k    rdk    rdnd}nd}|r;|r|}n|r|}n|	r|	}nt3          | j        d!                              d"d          }nY|	r|	}nTt9          | d#          rt3          | j        !          }n,t          | t          j                  rd$}nt          |           S t          | dd%          }|rt          |t<          t>          z            r|d&v rYtA          d' |D                       r@t$          j!        |         j"        }d                    fd(|D                       }| d)| dS |d*v r"d+                    fd,|D                       S |d-k    rMd                    fd.|dd         D                       }t3          |d         !          }| d/| d0| dS |d1k    rLr!d+                    fd2|D                       S d                    fd3|D                       }| d)| dS t1          |           rkt3          |d         !          }g }| j#        D ]t          tH                    r&|%                    t3          !                     =tM          j'                  rnd                    fd4tM          j(                  D                       }|%                    t3          tI                    !           d5| d6           |%                    t                               d                    |          }t           j        dd         d7k    r0dk    r	d8| d| dS |                    dd          }| d8| d| dS | d8| d| dS tA          d9 |D                       r||z   S d                    fd:|D                       }| | d| dS ||z   S );aj  Stringify type annotation object.

    :param annotation: The annotation to stringified.
    :param mode: Specify a method how annotations will be stringified.

                 'fully-qualified-except-typing'
                     Show the module name and qualified name of the annotation except
                     the "typing" module.
                 'smart'
                     Show the name of the annotation.
                 'fully-qualified'
                     Show the module name and qualified name of the annotation.

    :param short_literals: Render :py:class:`Literals` in PEP 604 style (``|``).
    r   r   >   r   r   r   r   r   r   NNoner   '   r   r   r   rZ   r\   r[   rw   r   r   )r      T>   r   r   r   r<   r   c              3  <   K   | ]}t          |           V  dS r   r   Nstringify_annotation)r   r   r   r   s     r`   r   z'stringify_annotation.<locals>.<genexpr>  sF       &
 &
 !4OOO&
 &
 &
 &
 &
 &
rv   [r   r   r   typing_extensionsr  ztyping.r   types.UnionTyperf   >   r    r
  c              3  P   K   | ]!}t          |d d          t          j        u V  "dS )r   .N)r   r   r   r   r   s     r`   r   z'stringify_annotation.<locals>.<genexpr>  s5      ]]GA|S11V^C]]]]]]rv   c              3  :   K   | ]}t          |           V  dS r   _format_literal_arg_stringifyr   s     r`   r   z'stringify_annotation.<locals>.<genexpr>  B        @A-ad;;;     rv   zLiteral[>   r    Optionalr
  r   c              3  <   K   | ]}t          |           V  dS r  r  r   r   r   r   s     r`   r   z'stringify_annotation.<locals>.<genexpr>  sF         %QT.QQQ     rv   r   c              3  <   K   | ]}t          |           V  dS r  r  r  s     r`   r   z'stringify_annotation.<locals>.<genexpr>   F         %QT.QQQ     rv   z
Callable[[r   r   c              3  :   K   | ]}t          |           V  dS r   r  r   s     r`   r   z'stringify_annotation.<locals>.<genexpr>*  sB       " "DE1!$???" " " " " "rv   c              3  :   K   | ]}t          |           V  dS r   r  r   s     r`   r   z'stringify_annotation.<locals>.<genexpr>-  r  rv   c           
     |    g | ]8}|j         	|j         d t          t          |j                             9S )=r  )r   rk   r  r   )r   r   r   r   r   s     r`   r   z(stringify_annotation.<locals>.<listcomp>?  s_     * * *6*6xx$8AF9K9KRVgu$v$v$vxx* * *rv   (r   r   z
Annotated[c              3  4   K   | ]}t          |          V  d S rs   )r   r  s     r`   r   z'stringify_annotation.<locals>.<genexpr>P  s+      ??!"1%%??????rv   c              3  <   K   | ]}t          |           V  dS r  r  r  s     r`   r   z'stringify_annotation.<locals>.<genexpr>T  r  rv   ))r   r   r   r   r   r   r   r   r   rM   r   r   rX   r   endswithr   r   r   r   r   r   r   r   ra   r   r  r   replacer   r   listtupler   r   r   r   r   r   r   r   r   )r   r   r   r   r   r   r   r   r   annotation_qualnameannotation_moduleannotation_nameannotation_module_is_typingfixed_annotationr   r   annotation_forward_argqualnameannotation_argsflattened_argsr   r   r   r   r   s    ``                     @r`   r  r    s	   , =<<<<<<<OOOK;		#dF;$7$78899:U::$::oo Z5>99vXu*c""   %% 	$**=*=c*B*B 	$ad##  J7??CCM  'z>2FF$ZrBB":z2>>O"3x"?
w&&:j&BS+T+T&&*# *fn-- "oj6Q6Q "& 	#4 4
 ,
 ,
 #""3GGoGGGG	J	/	/ "3GGoGGGG	j	!	! ..	
		 "3GGoGGGG5jAA	A	 ///	J	'	' 	j	(	(-@	(z:t44<&&  	$
### II &
 &
 &
 &
 &
&
 &
 &
 
 
 &<<(9<<<< 	(+++M)0=NPT)U)U 
#
,B
 7??///M& 	43R+R+RM		$	$ ):>Q)Q)Q#wB"  ! 	)-HH )*$ 	). 0)8#1   ')R((	 
 
  &	\	*	* 
 '!^
 
 
 
J	0	0  $ J j*b99O I8:ote|DD I8444]]_]]]]] 5 $^O<EN99    ES    D $44T4444???::     (      ##99     ("-    D +#$~  G $BBtBBBBBB"" zz " " " "IX" " "    99    ET    D $44T4444
++ '	8'"n  D I, . .a&& .$$,D     
 !-a00 .#yy * * * * * *!,!3A!6!6* * *    H
 $$/QdSabbbppemppp    $$T!WW----99Y''D#w..:::7777777 - 5 5j( K K'BB4BB4BBBB#>>t>>t>>>>??????? 	8 8++99     (    D $7X7777778##rv   c                  ddl m}  ||           rB| j        }|dk    s|j        dk    r|j         d| j         S |j         d|j         d| j         S t          |           S )Nr   r   r   r   r   r   r   s       r`   r  r  ]  s    333333s K=7??h1X==+88ch888%JJ(=JJJJJ99rv   z+dict[str, tuple[Any, str, tuple[int, int]]]_DEPRECATED_OBJECTSrk   c                    | t           vrdt          d| }t          |          ddlm} t           |          \  }}} |t          | ||           |S )Nzmodule z has no attribute r   )_deprecation_warning)remove)r+  rw   r]   sphinx.deprecationr-  )rk   r   r-  deprecated_objectcanonical_namer.  s         r`   __getattr__r2  o  su    &&&>>>d>>S!!!7777770CD0I-~v4GGGGrv   )rV   r   rW   rX   )NNF)
rV   r   r   rh   r   rh   r   r   rW   r   )r   r   rW   r   )rV   r   rW   r   )rV   r   rW   r   )r   )r   r   r   r   rW   rX   )r   r   r   rX   rW   rX   )r   r   r   r   r   r   rW   rX   )rk   rX   rW   r   )Cr   
__future__r   r   r   r   r   collections.abcr   r   r   docutilsr   docutils.parsers.rst.statesr   sphinx.utilr	   r
   r   r   r   r   r   r   r	  r   sphinx.applicationr   sphinx.util.inventoryr   r   r   r   	getLoggerrw   r   rU   ra   TextTextElementrb   rX   r   rc   re   ro   dictr   r  Nodesystem_messagerx   ry   rz   	TypedDictr|   r   r   r   r   r   r   r   r  r  r+  r2  rf   rv   r`   <module>rA     s   % % % " " " " " "     



   . . . . . . . .                   / / / / / /       ''''''JJJJJJJJJJJJJJJJ(((((())))))444444%	L     !(	!N     
	8	$	$
AB!6AB #$<AB 2	AB .AB 0AB .AB 2AB 2AB 2AB 2AB AB {AB  !AB" 0#AB& $%7'AB( $%7)AB,  !6-AB AB. "#:/AB2 +,E3AB6 7AB8 $%89AB: #$6;AB< ()@=AB> *+D?AB@ &'<AABD ,EABF 0GABJ ?KABN $%?OABP /0IQABR *SABT +,MUABV *WABX 4YAB AB ABZ 2[AB\ ,]AB^ 0_AB` 4aABb &'CcABd !":eABf &'CgABh .iABj #$=kABl &'CmABn .oABp .qABr '(BsABt 4uABv '(EwABz  1{AB~ &'=AB AB@ ~AAB AB  A A A AH1 1 1 1  *u'88 8 8 8 8 "3%+. . . . .  F F F F Fx F F F F '	c3Wd3
?&;Xc]Kd5:U%9 ::;	=L     S(C5&*+<"==>
 > > > > "5:,"34 4 4 4 4 Cc+;&;!<<=	 = = = =    (    (  K%-vh8I.I%JJJJJ
 '+%) 	    BC C C C   3 3 3 3
J' J' J' J' J'Z   $ ;V$
 !V$ V$ V$ V$ V$ V$r
 
 
 
D     	 	 	 	 	 	rv   