403Webshell
Server IP : 127.0.0.1  /  Your IP : 216.73.216.109
Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10
System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64
User : SERVERWEB ( 0)
PHP Version : 8.1.10
Disable Function : NONE
MySQL : OFF |  cURL : ON |  WGET : OFF |  Perl : OFF |  Python : OFF |  Sudo : OFF |  Pkexec : OFF
Directory :  C:/cygwin64/lib/python3.9/site-packages/sphinx/domains/__pycache__/

Upload File :
current_dir [ Writeable] document_root [ Writeable]

 

Command :


[ Back ]     

Current File : C:/cygwin64/lib/python3.9/site-packages/sphinx/domains/__pycache__/javascript.cpython-39.opt-1.pyc
a

�ab�F�@s�dZddlmZmZmZmZmZmZmZddl	m
Z
ddlmZm
Z
ddlmZddlmZddlmZmZddlmZdd	lmZdd
lmZddlmZmZddlmZdd
l m!Z!ddl"m#Z#m$Z$ddl%m&Z&ddl'm(Z(ddl)m*Z*m+Z+m,Z,ddl-m.Z.ddl/m0Z0m1Z1ddl2m3Z3e(�4e5�Z6Gdd�deee7e7f�Z8Gdd�de8�Z9Gdd�de9�Z:Gdd�de.�Z;Gdd�de&�Z<Gdd �d e�Z=eee7efd!�d"d#�Z>d$S)%z�
    sphinx.domains.javascript
    ~~~~~~~~~~~~~~~~~~~~~~~~~

    The JavaScript domain.

    :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�)�Any�Dict�Iterator�List�Optional�Tuple�cast)�nodes)�Element�Node)�
directives)�addnodes)�desc_signature�pending_xref)�Sphinx)�Builder)�ObjectDescription)�Domain�ObjType)�_pseudo_parse_arglist)�BuildEnvironment)�_�__)�XRefRole)�logging)�Field�GroupedField�
TypedField)�SphinxDirective)�make_id�make_refnode)�
OptionSpecc@s�eZdZUdZdZdZejejd�Ze	e
d<eed�dd�Z
eeeeefd�d	d
�Zeeefeedd�d
d�Zeeeefed�dd�Zdd�dd�Zdd�dd�Zeed�dd�ZdS)�JSObjectz-
    Description of a JavaScript object.
    F)�noindex�noindexentry�option_spec��returncCsgS�N���selfr)r)�=/usr/lib/python3.9/site-packages/sphinx/domains/javascript.py�get_display_prefix5szJSObject.get_display_prefix)�sig�signoder'c
Cs|��}d|vrJ|dd�dkrJ|�dd�\}}|��}|dd���}n|}d}|jj�dd�}|jj�d�}|}z`z|�dd�\}}	Wnty�|}	d	}Yn0W|	}|r�|r�d�||g�}n|dur�|r�|}n2|	}|r�|r�d�||g�}n|du�r|�r|}0|}
|�r d�||g�}
||d
<||d<|
|d<|��}|�r^|t	j
d	d	g|�R�7}d}|�rn|}n
|�rx|}|�r�t	�d	d	�}
|�d�D]&}|
t	�||�7}
|
t	�
dd�7}
�q�||
7}|t	�d	d	t	�||��7}|j�r|�s�|t	��7}n
t||�|
|fS)
z�Breaks down construct signatures

        Parses out prefix and argument list from construct definition. The
        namespace and class will be determined by the nesting of domain
        directives.
        �(���N�)��	js:object�	js:module�.��module�object�fullname)�strip�split�env�ref_context�get�rsplit�
ValueError�joinr-r
Zdesc_annotationZdesc_addnameZ
desc_sig_nameZdesc_sig_punctuationZ	desc_name�
has_argumentsZdesc_parameterlistr)r+r.r/�memberZarglist�prefix�mod_name�nameZ
member_prefix�member_namer:Zdisplay_prefixZ
actual_prefixZaddName�pr)r)r,�handle_signature9sf�
zJSObject.handle_signatureN)�name_objr.r/r'c
Cs�|jj�d�}|r|dnd|d}t|j|jjd|�}|d�|�|�|�}||jjjvrz||dvrz|d�|�|jj�	|�t
t|j�d��}|j
||j||d�d|jvr�|�||�}	|	r�|jd	�d
|	|ddf�dS)Nr5r6r7r�ids�js��locationr$�entries�single)r=r>r?r�state�document�append�make_old_idrL�note_explicit_targetr�JavaScriptDomain�
get_domain�note_object�objtype�options�get_index_textZ	indexnode)
r+rKr.r/rFr:�node_id�old_node_id�domain�	indextextr)r)r,�add_target_and_indexws

zJSObject.add_target_and_index)�
objectnamerKr'cCs||\}}|jdkr2|s"td�|Std�||fS|jdkrHtd�|S|jdkr^td�|S|jdkrxtd	�||fSd
S)N�functionz%s() (built-in function)z%s() (%s method)�classz%s() (class)�dataz %s (global variable or constant)�	attributez%s (%s attribute)r7)rZr)r+rbrKrG�objr)r)r,r\�s



zJSObject.get_index_textcCshd}|jr4|j��\}}|r&|�d�nd}|jr4|}|rd||jjd<|jrd|jj�dg�}|�|�dS)aHandle object nesting before content

        :py:class:`JSObject` represents JavaScript language constructs. For
        constructs that are nestable, this method will build up a stack of the
        nesting hierarchy so that it can be later de-nested correctly, in
        :py:meth:`after_content`.

        For constructs that aren't nestable, the stack is bypassed, and instead
        only the most recent object is tracked. This object prefix name will be
        removed with :py:meth:`after_content`.

        The following keys are used in ``self.env.ref_context``:

            js:objects
                Stores the object prefix history. With each nested element, we
                add the object prefix to this list. When we exit that object's
                nesting level, :py:meth:`after_content` is triggered and the
                prefix is removed from the end of the list.

            js:object
                Current object prefix. This should generally reflect the last
                element in the prefix history
        Nr6r4�
js:objects)�names�popr;�
allow_nestingr=r>�
setdefaultrT)r+rEZobj_nameZobj_name_prefix�objectsr)r)r,�before_content�szJSObject.before_contentcCsZ|jj�dg�}|jr6z|��Wnty4Yn0t|�dkrJ|dnd|jjd<dS)a^Handle object de-nesting after content

        If this class is a nestable object, removing the last nested class prefix
        ends further nesting in the object.

        If this class is not a nestable object, the list of classes should not
        be altered as we didn't affect the nesting levels in
        :py:meth:`before_content`.
        rhrr1Nr4)r=r>rlrkrj�
IndexError�len)r+rmr)r)r,�
after_content�s
�zJSObject.after_content)r:r'cCs|�dd�S)z�Generate old styled node_id for JS objects.

        .. note:: Old Styled node_id was used until Sphinx-3.0.
                  This will be removed in Sphinx-5.0.
        �$Z_S_)�replace)r+r:r)r)r,rU�szJSObject.make_old_id)�__name__�
__module__�__qualname__�__doc__rCrkr�flagr%r!�__annotations__rrr-�strrrrJrar\rnrqrUr)r)r)r,r"$s
�>�$r"c	@sdeZdZdZdZeded�dddd�ed	ed
�dddd�ed
ed�ddd�eded�ddd�gZ	dS)�
JSCallablez<Description of a JavaScript function, method or constructor.T�	argumentsZ	Arguments)�argument�argZ	parameterZparam�func)Z	paramtype�type)�labelriZtyperolenameZ	typenames�errorsZThrows)Zthrows)r�ZrolenameriZcan_collapseZreturnvalueZReturnsF)�returnsr')r�Zhas_argriZ
returntypezReturn type)ZrtypeN)
rtrurvrwrCrrrrZdoc_field_typesr)r)r)r,r{�s"
�����r{c@s&eZdZdZdZeed�dd�ZdS)�
JSConstructorz,Like a callable but with a different prefix.Tr&cCst�dd�t��gS)Nrd)r
Zdesc_sig_keywordZdesc_sig_spacer*r)r)r,r-�s
�z JSConstructor.get_display_prefixN)rtrurvrwrkrrr-r)r)r)r,r��sr�c@sVeZdZUdZdZdZdZdZdej	iZ
eed<e
ed�dd	�Zeed
�dd�Zd
S)�JSModulea�
    Directive to mark description of a new JavaScript module.

    This directive specifies the module name that will be used by objects that
    follow this directive.

    Options
    -------

    noindex
        If the ``noindex`` option is specified, no linkable elements will be
        created, and the module won't be added to the global module index. This
        is useful for splitting up the module definition across multiple
        sections or files.

    :param mod_name: Module name
    Fr3rr#r%r&c
Cs|jd��}||jjd<d|jv}g}|�stt|j�d��}t|j|j	j
d|�}|�||�|j|d||jj
|jfd�tjdd|gdd	�}|�|�}||j	j
jvr�||d
vr�|d
�|�|j	j
�|�|�|�td�|}tjd||ddfgd
�}	|�|	�|S)Nrr5r#rMr8rNr7T)rLZismodrLz%s (module)rQ)rP)r|r;r=r>r[rrWrXrrRrS�note_modulerY�docname�linenor	�targetrUrLrTrVrr
�index)
r+rFr#�retr_r]r�r^r`�inoder)r)r,�runs*

�


zJSModule.run)�modnamer'cCsd|S)z�Generate old styled node_id for JS modules.

        .. note:: Old Styled node_id was used until Sphinx-3.0.
                  This will be removed in Sphinx-5.0.
        zmodule-r))r+r�r)r)r,rU1szJSModule.make_old_idN)rtrurvrwZhas_contentZrequired_argumentsZoptional_argumentsZfinal_argument_whitespacerrxr%r!ryrrr�rzrUr)r)r)r,r��s
�r�c@s,eZdZeeeeeeeefd�dd�ZdS)�
JSXRefRole)r=�refnode�has_explicit_title�titler�r'cCs�|j�d�|d<|j�d�|d<|sv|�d�}|�d�}|dd�dkrv|dd�}|�d�}|dkrv||dd�}|dd�dkr�|dd�}d|d	<||fS)
Nr4r5r6�~rr3r1T�refspecific)r>r?�lstrip�rfind)r+r=r�r�r�r��dotr)r)r,�process_link;s


zJSXRefRole.process_linkN)	rtrurvrr
�boolrzrr�r)r)r)r,r�:s�r�c
@s
eZdZUdZdZdZeed�d�eed�d�eed�d�eed	�d	�eed
�d�eed�d
�d�Ze	e	e
eeed�Z
edd�edd�edd�e�e�e�d�Ziid�Zeeeeeeefffed<eeeeeeeffd�dd��Zd5eeeedd�dd�Zeeeeeeffd�dd��Zeedd�dd�Zedd �d!d"�Zeeedd#�d$d%�Zd6eeeeeeeeeeeeffd'�d(d)�Z eee!eee"e#e$e#d*�d+d,�Z%eee!ee"e#eeee#fd-�d.d/�Z&e'eeeeeeefd�d0d1�Z(e#ed2�d3d4�Z)dS)7rWzJavaScript language domain.rMZ
JavaScriptrcr�method�methrdrerf�attrr8�mod)rcr�rdrerfr8T)Z
fix_parens)rr�rdrer�r�)rm�modules�initial_datar&cCs|j�di�S)Nrm�rerlr*r)r)r,rmpszJavaScriptDomain.objectsN)r:rZr]rOr'cCsJ||jvr2|j|d}tjtd�|||||d�|jj||f|j|<dS)Nrz.duplicate %s description of %s, other %s in %srN)rm�loggerZwarningrr=r�)r+r:rZr]rOr�r)r)r,rYts


�zJavaScriptDomain.note_objectcCs|j�di�S)Nr�r�r*r)r)r,r�|szJavaScriptDomain.modules)r�r]r'cCs|jj|f|j|<dSr()r=r�r�)r+r�r]r)r)r,r��szJavaScriptDomain.note_module)r�r'cCs^t|j���D]\}\}}}||kr|j|=qt|j���D]\}\}}||kr<|j|=q<dSr()�listrm�itemsr�)r+r�r:�pkg_docnameZ_node_idZ_lr�r)r)r,�	clear_doc�s
zJavaScriptDomain.clear_doc)�docnames�	otherdatar'c	Csh|d��D]&\}\}}}||vr|||f|j|<q|d��D]"\}\}}||vr@||f|j|<q@dS)Nrmr�)r�rmr�)	r+r�r�r:�fnr]rZrFr�r)r)r,�merge_domaindata�sz!JavaScriptDomain.merge_domaindatar)r=rFrErG�typ�searchorderr'c
Cs�|dd�dkr|dd�}g}|r>|r>|�d�|||g��|rV|�d�||g��|rn|�d�||g��|�|�|dkr�|��d}|D]}	|	|jvr�|	}q�||j�|�fS)N���z()r6r)rTrB�reversermr?)
r+r=rFrErGr�r�ZsearchesZnewnameZsearch_namer)r)r,�find_obj�s"

zJavaScriptDomain.find_obj)r=�fromdocname�builderr�r��node�contnoder'c
Cs`|�d�}|�d�}	|�d�r"dnd}
|�|||	|||
�\}}|sFdSt|||d|d||�S)Nr5r4r�r3r)r?�hasattrr�r )
r+r=r�r�r�r�r�r�rFrEr�rGrgr)r)r,�resolve_xref�s

zJavaScriptDomain.resolve_xref)r=r�r�r�r�r�r'cCsb|�d�}|�d�}|�||||dd�\}	}
|
s4gSd|�|
d�t|||
d|
d||	�fgS)Nr5r4r3zjs:�r)r?r�Zrole_for_objtyper )r+r=r�r�r�r�r�rFrErGrgr)r)r,�resolve_any_xref�s

�z!JavaScriptDomain.resolve_any_xrefccs4t|j���D] \}\}}}|||||dfVqdS)Nr3)r�rmr�)r+Zrefnamer�r]r�r)r)r,�get_objects�szJavaScriptDomain.get_objects)r�r'cCsD|�d�}|�d�}|�d�}|dur*dSd�td|||g��SdS)Nr5r4Z	reftargetr6)r?rB�filter)r+r�r�rEr�r)r)r,�get_full_qualified_name�s


z(JavaScriptDomain.get_full_qualified_name)N)r)*rtrurvrwrGr�rrZobject_typesr{r�r"r�rr�Zrolesr�rrzrry�propertyrmrrYr�r�r�rr�r�intr�rrr
rr�r�rr�r�r)r)r)r,rWNsh
�	�	�	�&"�� 
�
���"rW)�appr'cCs|�t�ddddd�S)NZbuiltinr�T)�versionZenv_versionZparallel_read_safeZparallel_write_safe)Z
add_domainrW)r�r)r)r,�setup�s
�r�N)?rw�typingrrrrrrrZdocutilsr	Zdocutils.nodesr
rZdocutils.parsers.rstrZsphinxr
Zsphinx.addnodesrrZsphinx.applicationrZsphinx.buildersrZsphinx.directivesrZsphinx.domainsrrZsphinx.domains.pythonrZsphinx.environmentrZ
sphinx.localerrZsphinx.rolesrZsphinx.utilrZsphinx.util.docfieldsrrrZsphinx.util.docutilsrZsphinx.util.nodesrr Zsphinx.util.typingr!Z	getLoggerrtr�rzr"r{r�r�r�rWr�r)r)r)r,�<module>s:
$
9
B

Youez - 2016 - github.com/yon3zu
LinuXploit