+
    i	                        R t ^ RIHt ^ RIHtHtHtHt ^ RIH	t	 ^ RI
HtHt ]'       d   ^ RIHt ]	P                  ! 4       t]	P"                  ! RRR7      t]P'                  ]4       R	 R
 ltR R ltRR R lltR# )zXML parser for python-docx.)annotations)TYPE_CHECKINGDictTypecast)etree)NamespacePrefixedTagnsmap)BaseOxmlElementTF)remove_blank_textresolve_entitiesc                    V ^8  d   QhRRRR/# )   xmlzstr | bytesreturnz'BaseOxmlElement' )formats   "V/Users/agent/.openclaw/workspace/venv/lib/python3.14/site-packages/docx/oxml/parser.py__annotate__r      s     G G; G#4 G    c                L    \        R\        P                  ! V \        4      4      # )zRoot lxml element obtained by parsing XML character string `xml`.

The custom parser is used, so custom element classes are produced for elements in
`xml` that have them.
r
   )r   r   
fromstringoxml_parser)r   s   &r   	parse_xmlr      s     !5#3#3C#EFFr   c                    V ^8  d   QhRRRR/# )r   tagstrclszType['BaseOxmlElement']r   )r   s   "r   r   r       s     	 	c 	(? 	r   c                t    V P                  R4      w  r#\        P                  \        V,          4      pWV&   R# )zRegister an lxml custom element-class to use for `tag`.

A instance of `cls` to be constructed when the oxml parser encounters an element
with matching `tag`. `tag` is a string of the form `nspfx:tagroot`, e.g.
`'w:document'`.
:N)splitelement_class_lookupget_namespacer	   )r   r   nspfxtagroot	namespaces   &&   r   register_element_clsr&       s/     YYs^NE$225<@Igr   Nc               (    V ^8  d   QhRRRRRRRR/# )r   
nsptag_strr   attrszDict[str, str] | Nonensdeclsr   z BaseOxmlElement | etree._Elementr   )r   s   "r   r   r   ,   s6     S SS S #S &	Sr   c                z    \        V 4      pVf   VP                  p\        P                  VP                  WR7      # )aL  Return a 'loose' lxml element having the tag specified by `nsptag_str`.

The tag in `nsptag_str` must contain the standard namespace prefix, e.g. `a:tbl`.
The resulting element is an instance of the custom element class for this tag name
if one is defined. A dictionary of attribute values may be provided as `attrs`; they
are set if present. All namespaces defined in the dict `nsdecls` are declared in the
element using the key as the prefix and the value as the namespace name. If
`nsdecls` is not provided, a single namespace declaration is added based on the
prefix on `nsptag_str`.
)attribr	   )r   r	   r   makeelement
clark_name)r(   r)   r*   nsptags   &&& r   OxmlElementr0   ,   s8     "*-F,,""6#4#4U"RRr   )NN)__doc__
__future__r   typingr   r   r   r   lxmlr   docx.oxml.nsr   r	   docx.oxml.xmlchemyr
   ElementNamespaceClassLookupr!   	XMLParserr   set_element_class_lookupr   r&   r0   r   r   r   <module>r:      sf    " " 2 2  42 88: oouM  $ $%9 :G	S Sr   