Hacked By AnonymousFox

Current Path : /opt/imunify360/venv/lib/python3.11/site-packages/docutils/transforms/__pycache__/
Upload File :
Current File : //opt/imunify360/venv/lib/python3.11/site-packages/docutils/transforms/__pycache__/parts.cpython-311.pyc

�

j��f���dZdZddlZddlmZddlmZGd�de��ZGd�d	e��ZGd
�dej	��Z
dS)z'
Transforms related to document parts.
�reStructuredText�N)�nodes)�	Transformc�&�eZdZdZdZ	d�Zdd�ZdS)	�SectNumaS
    Automatically assigns numbers to the titles of document sections.

    It is possible to limit the maximum section level for which the numbers
    are added.  For those sections that are auto-numbered, the "autonum"
    attribute is set, informing the contents table generator that a different
    form of the TOC should be used.
    i�c��|jj�dd��|_|jj�dd��|_|jj�dd��|_|jj�dd��|_|jj�|j��|j	j
jr4|j�tj
|_|�|j	��dS|j|j	j
_|j|j	j
_|j|j	j
_|j|j	j
_dS)N�depth�start��prefix��suffix)�	startnode�details�get�maxdepth�
startvaluerr�parent�remove�document�settings�
sectnum_xform�sys�maxsize�update_section_numbers�
sectnum_depth�
sectnum_start�sectnum_prefix�sectnum_suffix��selfs �y/builddir/build/BUILD/imunify360-venv-2.3.5/opt/imunify360/venv/lib/python3.11/site-packages/docutils/transforms/parts.py�applyz
SectNum.applys
����.�2�2�7�D�A�A��
��.�0�4�4�W�a�@�@����n�,�0�0��2�>�>����n�,�0�0��2�>�>������$�$�T�^�4�4�4��=�!�/�	@��}�$� #���
��'�'��
�6�6�6�6�6�37�=�D�M�"�0�37�?�D�M�"�0�48�K�D�M�"�1�48�K�D�M�"�1�1�1��rc��|dz
}|rd}n|j}|D]�}t|tj��r�|t	|��fz}|d}tjd|jd�|��z|jzdzdg���}|�	d|��d|d<||j
kr|�|||��|dz
}��dS)	Nrrr
�.u   �sectnum)�classes�auto)r�
isinstancer�section�str�	generatedr�joinr�insertrr)	r!�noderr	r(�child�numbers�titler.s	         r"rzSectNum.update_section_numbers/s���
��
���	&��G�G��o�G��
	�
	�E��%���/�/�
� �C��L�L�?�2���a���!�O����s�x�x��'8�'8�8�4�;�F�'�(�&�K�)�)�)�	����Q�	�*�*�*� !��f�
��4�=�(�(��/�/��w��F�F�F��1����
	�
	r$N)r%r)�__name__�
__module__�__qualname__�__doc__�default_priorityr#rr%r$r"rrsO����������.�@�@�@� �����r$rc�*�eZdZdZdZd�Zdd�Zd�ZdS)	�Contentsa�
    This transform generates a table of contents from the entire document tree
    or from a single branch.  It locates "section" elements and builds them
    into a nested bullet list, which is placed within a "topic" created by the
    contents directive.  A title is either explicitly specified, taken from
    the appropriate language module, or omitted (local table of contents).
    The depth may be specified.  Two-way references between the table of
    contents and section titles are generated (requires Writer support).

    This transform requires a startnode, which contains generation
    options and provides the location for the generated table of contents (the
    startnode is replaced by the table of contents "topic").
    i�c�j�t|jjdd��}|jj}d|vr�|jjj}t
|tj��sUt
|tj��s;|j}t
|tj��st
|tj���;n|j}|jjdd|_	d|vr|d|_
n|jjj|_
|rJ|jjj�
|��|jj�|j��dS|�|��}t!|��r|j�|��dS|jjj�|jj��dS)N�
use_latex_tocF�local�idsr�	backlinks)�getattrrrrrrr+rr,�toc_idr@�
toc_backlinks�
attributes�updater�build_contents�len�replace_self)r!�
toc_by_writerrr�contentss     r"r#zContents.applyWs�����
� 6���O�O�
��.�(���g�����-�4�I�!�)�U�]�;�;�
-�$�Y���?�?�
-�&�,�	�"�)�U�]�;�;�
-�$�Y���?�?�
-��
�
�I��n�+�E�2�1�5����'�!�!�$�[�1�D�N�N�!�]�3�A�D�N��		K��N�!�,�3�3�G�<�<�<��N�!�(�(���8�8�8�8�8��*�*�9�5�5�H��8�}�}�
K���+�+�H�5�5�5�5�5���%�,�3�3�D�N�4I�J�J�J�J�Jr$rc�2�|dz
}d�|D��}g}|jj�dtj��}|D�]"}|d}|�d��}|�|��}	t
jddg|	�Rd|ddi�}
|j�	|
d	�
��}t
j
dd|
��}t
jd|��}
|jdvrE|�
tj���&|jdkr||d<n|jd
kr
|j|d<||kr|�||��}|
|z
}
|�|
����$|r1t
jdg|�R�}|r|d�d��|SgS)Nrc�F�g|]}t|tj���|��Sr%)r+rr,)�.0�sects  r"�
<listcomp>z+Contents.build_contents.<locals>.<listcomp>us)��M�M�M�T�Z��e�m�-L�-L�M�D�M�M�Mr$r	rr*r
�refidr?z	toc-entry)�suggested_prefix)�entry�toprRrSr)zauto-toc)rrrrr�copy_and_filterr�	referencer�set_id�	paragraph�	list_itemr@�	next_noderBrF�append�bullet_list)r!r1�level�sections�entriesr	r,r4r*�	entrytextrU�ref_idrR�item�subsectsrJs                r"rFzContents.build_contentsss���
��
��M�M�T�M�M�M������&�*�*�7�C�K�@�@���	!�	!�G��A�J�E��9�9�V�$�$�D��,�,�U�3�3�I����B�4�)2�4�4�4�g�e�n�Q�6G�4�4�I��]�)�)�)�;F�*�H�H�F��O�B��I�6�6�E��?�2�u�-�-�D���"2�2�2��O�O�E�O�4�4�<��>�W�,�,�%+�E�'�N�N��^�u�,�,�%)�[�E�'�N��u�}�}��.�.�w��>�>���� ���N�N�4� � � � ��	��(��6�g�6�6�6�H��
7���#�*�*�:�6�6�6��O��Ir$c�|�t|j��}|�|��|���S)z@Return a copy of a title, with references, images, etc. removed.)�ContentsFilterr�	walkabout�get_entry_text)r!r1�visitors   r"rTzContents.copy_and_filter�s5�� ���/�/�����w�����%�%�'�'�'r$N)r)r5r6r7r8r9r#rFrTr%r$r"r;r;Es\����������K�K�K�8����B(�(�(�(�(r$r;c�8�eZdZd�Zd�Zd�Zd�Zd�ZeZeZ	eZ
dS)rdc�4�|���jS�N)�
get_tree_copy�childrenr s r"rfzContentsFilter.get_entry_text�s���!�!�#�#�,�,r$c��tj�rj�r�SkipNode�r!r1s  r"�visit_citation_referencez'ContentsFilter.visit_citation_reference��
���n�r$c��tj�rjrnrps  r"�visit_footnote_referencez'ContentsFilter.visit_footnote_reference�rrr$c��|�d��r2|j�tj|d����tj�)N�alt)�hasattrrrZr�Textrorps  r"�visit_imagezContentsFilter.visit_image�sB���<�<����	8��K���u�z�$�u�+�6�6�7�7�7��n�r$c��tj�rj)r�
SkipDeparturerps  r"� ignore_node_but_process_childrenz/ContentsFilter.ignore_node_but_process_children�s���!�!r$N)r5r6r7rfrqrtryr|�visit_problematic�visit_reference�visit_targetr%r$r"rdrd�sk������-�-�-����������
"�"�"�9��6�O�3�L�L�Lr$rd)r8�
__docformat__r�docutilsr�docutils.transformsrrr;�TreeCopyVisitorrdr%r$r"�<module>r�s���
��#�
��
�
�
�������)�)�)�)�)�)�1�1�1�1�1�i�1�1�1�hS(�S(�S(�S(�S(�y�S(�S(�S(�l4�4�4�4�4�U�*�4�4�4�4�4r$

Hacked By AnonymousFox1.0, Coded By AnonymousFox