݁[c@sdZdZddlZddlZddlZddlZddlmZmZddlm Z m Z ddl m Z m Z de fdYZdS( s( Docutils component-related transforms. treStructuredTextiN(tnodestutils(tApplicationErrort DataError(t TransformtTransformErrortFiltercBseZdZdZdZRS(sA Include or exclude elements which depend on a specific Docutils component. For use with `nodes.pending` elements. A "pending" element's dictionary attribute ``details`` must contain the keys "component" and "format". The value of ``details['component']`` must match the type name of the component the elements depend on (e.g. "writer"). The value of ``details['format']`` is the name of a specific format or context of that component (e.g. "html"). If the matching Docutils component supports that format or context, the "pending" element is replaced by the contents of ``details['nodes']`` (a list of nodes); otherwise, the "pending" element is removed. For example, the reStructuredText "meta" directive creates a "pending" element containing a "meta" element (in ``pending.details['nodes']``). Only writers (``pending.details['component'] == 'writer'``) supporting the "html" format (``pending.details['format'] == 'html'``) will include the "meta" element; it will be deleted from the output of all other writers. i cCsp|j}|jd}|jd}|jjj|}|j|r\|j|jdn|jj|dS(Nt componenttformatR( t startnodetdetailstdocumentt transformert componentstsupportst replace_selftparenttremove(tselftpendingtcomponent_typeR R((sv/private/var/folders/71/gccz42bs2nl23mxwq3vp1qmhw5xjlw/T/pip-install-k836tR/docutils/docutils/transforms/components.pytapply,s   (t__name__t __module__t__doc__tdefault_priorityR(((sv/private/var/folders/71/gccz42bs2nl23mxwq3vp1qmhw5xjlw/T/pip-install-k836tR/docutils/docutils/transforms/components.pyRs(Rt __docformat__tsystostrettimetdocutilsRRRRtdocutils.transformsRRR(((sv/private/var/folders/71/gccz42bs2nl23mxwq3vp1qmhw5xjlw/T/pip-install-k836tR/docutils/docutils/transforms/components.pyts