Your IP : 18.221.147.141
�
�Q�f,
� �^ � d dl Z d dlZd dlmZmZmZmZ d dl� d dlm Z m
Z
ej j j ej j j fZ G d� dej j � Z eedd� � eed
d� � eedd
� � d� Zd� Zd� Zd� Zd� Z G d� de� Z G d� de� Z eedd� � eedd� � eedd� � G d� de� Z eedd� � eZ G d � d!e� Z edd� Z G d"� d#e� Z eed$d%� � eedd&� � d'� Z G d(� d)� Z G d*� d+ee� Z G d,� d-ee� Z! ee!dd.� � G d/� d0e!� Z" ee"d1d2� � ee"d3d4� � d5� Z#d6� Z$ G d7� d8e!� Z% G d9� d:e"� Z& G d;� d<e� Z' ee'dd=� � G d>� d?� Z( G d@� dAe(ee� Z) G dB� dCe(e� Z* G dD� dEe(ee� Z+ G dF� dGe � Z, G dH� dIe� Z-dJ� Z. G dK� dLee
� Z/ ee/dMdN� � dO� Z0dP� Z1dQ� Z2dUdR�Z3dVdS�Z4dVdT�Z5y)W� N)�EMPTY_NAMESPACE�EMPTY_PREFIX�XMLNS_NAMESPACE�domreg)�*)�DOMImplementationLS�
DocumentLSc � � e Zd ZdZdZdZdZdZeZ d� Z
dd�Z dd�Zd� Z
d� Zd� Zd� Zd � Zd
� Zd� Zd� Zd
� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z y)�NodeNc � � y)NT� ��selfs �6/opt/alt/python312/lib64/python3.12/xml/dom/minidom.py�__bool__z
Node.__bool__+ � � �� c �* � | j dd||� S �N� )�toprettyxml)r �encoding�
standalones r �toxmlz
Node.toxml. s � �����B��*�=�=r c �v � |�t j � }n+t j t j � |dd�� }| j t
j k( r| j |d||||� n| j |d||� |�|j � S |j � j � S )N�xmlcharrefreplace�
)r �errors�newliner )
�io�StringIO�
TextIOWrapper�BytesIO�nodeTyper �
DOCUMENT_NODE�writexml�getvalue�detach)r �indent�newlr r �writers r r zNode.toprettyxml1 s� � ����[�[�]�F��%�%�b�j�j�l�/7�-@�.2�4�F� �=�=�D�.�.�.��M�M�&�"�f�d�H�j�I��M�M�&�"�f�d�3����?�?�$�$��=�=�?�+�+�-�-r c �, � t | j � S �N)�bool�
childNodesr s r �
hasChildNodeszNode.hasChildNodesD s � ��D�O�O�$�$r c � � | j S r- �r/ r s r �_get_childNodeszNode._get_childNodesG � � ����r c �: � | j r| j d S y �Nr r2 r s r �_get_firstChildzNode._get_firstChildJ s � ��?�?��?�?�1�%�%� r c �: � | j r| j d S y �N���r2 r s r �_get_lastChildzNode._get_lastChildN s � ��?�?��?�?�2�&�&� r c �& � |j | j k( r.t |j � D ] }| j ||� � |S |j | j
vr6t j j t |� �dt | � ��� �|j �|j j |� |�| j |� |S | j j |� }|j t v rt# | � | j j% ||� ||_ ||_ |r!| j |dz
}||_ ||_ nd |_ | |_
|S # t $ r t j j � �w xY w)N� cannot be child of � )r$ �DOCUMENT_FRAGMENT_NODE�tupler/ �insertBefore�_child_node_types�xml�dom�HierarchyRequestErr�repr�
parentNode�removeChild�appendChild�index�
ValueError�NotFoundErr�_nodeTypes_with_children�_clear_id_cache�insert�nextSibling�previousSibling)r �newChild�refChild�crJ �nodes r rA zNode.insertBeforeR sn � ����� ;� ;�;��8�.�.�/���!�!�!�X�.� 0� �O����D�$:�$:�:��'�'�-�-�.2�8�n�d�4�j�I�K�
K����*����+�+�H�5������X�&�$ ��!
,����-�-�h�7�� � � �$<�<���%��O�O�"�"�5�(�3�#+�H� �'/�H�$�����u�Q�w�/��#+�� �+/��(�+/��(�"&�H����� �
,��g�g�)�)�+�+�
,�s �E( �((Fc �� � |j | j k( r-t |j � D ] }| j |� � |S |j | j
vr6t j j t |� �dt | � ��� �|j t v rt | � |j �|j j |� t | |� d |_ |S �Nr= )r$ r? r@ r/ rI rB rC rD rE rF rM rN rG rH �
_append_childrP )r rU rT s r rI zNode.appendChildr s� � ��=�=�D�7�7�7��4�?�?�+��� � ��#� ,� �K��=�=�� 6� 6�6��'�'�-�-�.2�4�j�$�t�*�E�G�
G�
�]�]�6�
6��D�!��?�?�&��O�O�'�'��-��d�D�!�����r c � � |j | j k( r/|j }| j |� | j ||� S |j | j
vr6t j j t |� �dt | � ��� �||u ry |j �|j j |� | j j |� }|| j |<