HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/sphinx/directives/__pycache__/other.cpython-310.pyc
o

�$�a�8�@s�dZddlZddlmZmZmZmZmZddlm	Z	ddl
mZmZddl
mZddlmZddlmZdd	lmZdd
lmZddlmZddlmZmZdd
lmZmZmZddl m!Z!ddl"m#Z#m$Z$ddl%m&Z&ddl'm(Z(erzddl)m*Z*e�+d�Z,e�-e.�Z/de0de1fdd�Z2Gdd�de!�Z3Gdd�de!�Z4Gdd�de�Z5Gdd�de!�Z6Gd d!�d!e!�Z7Gd"d#�d#e!�Z8Gd$d%�d%e!�Z9Gd&d'�d'e!�Z:Gd(d)�d)ee!�Zd*d+dee0effd,d-�Z;dS).z�
    sphinx.directives.other
    ~~~~~~~~~~~~~~~~~~~~~~~

    :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
�N)�
TYPE_CHECKING�Any�Dict�List�cast)�nodes)�Element�Node)�
directives)�BaseAdmonition)�Class)�Include)�addnodes)�
VersionChange)�_�__)�docname_join�logging�url_re)�SphinxDirective)�Matcher�	patfilter)�explicit_title_re)�
OptionSpec)�Sphinxz
.*[*?\[].*�argument�returncCs|sdSt|�S)Ni�)�int)r�r�9/usr/lib/python3/dist-packages/sphinx/directives/other.py�int_or_nothing$sr c
@speZdZdZdZdZdZdZee	j
e	je	je	je	je
e	je	jd�	Zdeefdd�Zd	ejdeefd
d�ZdS)
�TocTreez�
    Directive to notify Sphinx about the hierarchical structure of the docs,
    and to include a table-of-contents like tree in the current document.
    TrF)	�maxdepth�name�caption�glob�hidden�
includehidden�numbered�
titlesonly�reversedrcCs�t��}|jj|d<g|d<g|d<|j�dd�|d<|j�d�|d<d|jv|d<d|jv|d<d	|jv|d	<|j�d
d�|d
<d|jv|d<|�|�tjd
gd�}|�	|�|�
|�|�|�}|�	|�|S)N�parent�entries�includefilesr"���r$r%r&r'r(rr)ztoctree-wrapper)�classes)r�toctree�env�docname�options�get�set_source_infor�compound�append�add_name�
parse_content)�self�subnode�wrappernode�retrrr�run?s$




zTocTree.runr0cCs8|jj}|jj��}|�|jj�g}t|jj�}|j	D]�}|s!qt
�|�}|drkt�|�rk|skt
�|�skt|jj|�}tt||��}	|	D]}
|�|
�|d�d|
f�|d�|
�qF|	sjtjtd�||d�q|rz|�d�}|�d�}|}
n|}}
d}|D]}
|
�|
�r�|
dt|
��}
nq�t|jj|
�}
t
�|�s�|dkr�|d�||f�q|
|jjvr�||j�|
d��r�td	�}d
}ntd�}d}tj||
d
||d�|j��q|
|vr�|�|
�n
tjtd�|
|d�|d�||
f�|d�|
�qd|jv�rtt|d��|d<tt|d��|d<|S)Nr%r,r-z2toctree glob pattern %r didn't match any documents��location��r:z2toctree contains reference to excluded document %r�excludedz5toctree contains reference to nonexisting document %r�not_readable�toc)�type�subtyper@z%duplicated entry found in toctree: %sr*)�config�
source_suffixr1�
found_docs�copy�remover2r�exclude_patterns�contentr�match�glob_rerr�sortedrr7�logger�warningr�group�endswith�len�doc2path�note_rereadr3�listr*)r:r0�suffixes�all_docnamesr=rC�entry�explicit�patname�docnamesr2�ref�title�suffix�messagerGrrrr9Wsx

��

��


���zTocTree.parse_contentN)�__name__�
__module__�__qualname__�__doc__�has_content�required_arguments�optional_arguments�final_argument_whitespacerr
�	unchanged�unchanged_required�flagr �option_specrr	r>rr0r9rrrrr!*s$�r!c@�@eZdZUdZdZdZdZdZiZe	e
d<deefdd	�Z
d
S)�Authorz�
    Directive to give the name of the author of the current document
    or section. Shown in the output only if the show_authors option is on.
    FrBrTrorcCs�|jjsgStjdd�}t��}||7}|jdkrtd�}n|jdkr(td�}n|jdkr2td�}ntd	�}|t�||�7}|j�	|j
d
|j�\}}|�|�|g}||7}|S)NF)�translatable�
sectionauthorzSection author: �moduleauthorzModule author: �
codeauthorz
Code author: zAuthor: r)
rH�show_authorsr�	paragraph�emphasisr#r�Text�state�inline_text�	arguments�lineno�extend)r:�para�emph�text�inodes�messagesr=rrrr>�s$






z
Author.runN�rdrerfrgrhrirjrkror�__annotations__rr	r>rrrrrq�s
rqc@seZdZdZejZdS)�SeeAlsozB
    An admonition mentioning things to look at as reference.
    N)rdrerfrgr�seealso�
node_classrrrrr��s
r�c@rp)�TabularColumnszL
    Directive to give an explicit tabulary column definition to LaTeX.
    FrBrTrorcCs&t��}|jd|d<|�|�|gS)Nr�spec)r�tabular_col_specr|r5�r:�noderrrr>�s
zTabularColumns.runNr�rrrrr���
r�c@rp)�Centeredz;
    Directive to create a centered line of bold text.
    FrBrTrorcCsH|jsgSt��}|j�|jd|j�\}}|�|�|g}||7}|S)Nr)r|r�centeredrzr{r}r~)r:r;r�r�r=rrrr>�s
zCentered.runNr�rrrrr��r�r�c@s@eZdZUdZdZdZdZdZiZe	e
d<deefdd�Z
d	S)
�Acksz(
    Directive for a list of names.
    TrFrorcCslt��}|jj|_|j�|j|j|�t|j�dks#t	|jdt
j�s3tj
td�|jj|jfd�gS|gS)NrBrz.. acks content is not a listr?)r�acksrz�document�nested_parserN�content_offsetrV�children�
isinstancer�bullet_listrRrSrr1r2r}r�rrrr>�s
�
�zAcks.runNr�rrrrr��r�r�c@sDeZdZUdZdZdZdZdZdeiZ	e
ed<dee
fdd	�Zd
S)�HListz@
    Directive for a list that gets compacted horizontally.
    TrF�columnsrorcCs|j�dd�}t��}|jj|_|j�|j|j|�t	|j
�dks*t|j
dtj�s:t
jtd�|jj|jfd�gS|j
d}tt	|�|�\}}d}t��}t|�|d<t|�D]%}|||krc|dn|}	t��}
|
|j
||	�7}
|t�d|
�7}|	}qX|gS)	Nr�rArBrz.. hlist content is not a listr?�ncolumns�)r3r4rrwrzr�r�rNr�rVr�r�r�rRrSrr1r2r}�divmodr�hlist�str�range�hlistcol)r:r�r��fulllist�npercol�nmore�index�newnode�column�endindexr�rrrr>s.
�
�
z	HList.runN)rdrerfrgrhrirjrkrrorr�rr	r>rrrrr�s
�r�c@s@eZdZUdZdZdZdZdZiZe	e
d<deefdd�Z
d	S)
�OnlyzI
    Directive to only include text if the given tag(s) are enabled.
    TrBrrorcCsFt��}|jj|_|�|�|jd|d<|jj}|j}|j}g|_d|_zv|jj	|j
|j|dd�|j}|rC|rC|d|vsC|jjsM|gW||_||_Sd}|jj}|r^|d7}|j}|sU|d8}|d}t
|�}	||vrs|�|�}	||	d}
ttj|jj�}t|
�D]}|jr�|j}q�|�|�gW||_||_S||_||_w)Nr�exprT)�match_titlesrBrA)r�onlyrzr�r5r|�memo�title_styles�
section_levelr�rNr�r+rVr�rrrr�r7)r:r�r��surrounding_title_styles�surrounding_section_levelr��
current_depthr+�title_style�nested_depth�n_sects_to_raise�irrrr>3s\

�����
�
�zOnly.runNr�rrrrr�)r�r�cs*eZdZdZdeef�fdd�Z�ZS)r
z�
    Like the standard "Include" directive, but interprets absolute paths
    "correctly", i.e. relative to source directory.
    rcs`|jd�d�r|jd�d�rt���S|j�|jd�\}}||jd<|j�|�t���S)Nr�<�>)r|�
startswithrU�superr>r1�
relfn2path�
note_included)r:�rel_filename�filename��	__class__rrr>is�


zInclude.run)rdrerfrgrr	r>�
__classcell__rrr�rr
csr
�apprcCs�t�dt�t�dt�t�dt�t�dt�t�dt�t�dt�t�dt�t�dt�t�d	t�t�d
t	�t�dt
�t�dt�t�d
t�dddd�S)Nr0rsrtrur��tabularcolumnsr�r�r�r��include�cssclassz	rst-class�builtinT)�version�parallel_read_safe�parallel_write_safe)r
�register_directiver!rqr�r�r�r�r�r�r
r)r�rrr�setupts"�r�)<rg�re�typingrrrrr�docutilsr�docutils.nodesrr	�docutils.parsers.rstr
�+docutils.parsers.rst.directives.admonitionsr�$docutils.parsers.rst.directives.miscrr
�BaseInclude�sphinxr�sphinx.domains.changesetr�
sphinx.localerr�sphinx.utilrrr�sphinx.util.docutilsr�sphinx.util.matchingrr�sphinx.util.nodesr�sphinx.util.typingr�sphinx.applicationr�compilerP�	getLoggerrdrRr�rr r!rqr�r�r�r�r�r�r�rrrr�<module>s@

t"%: