Hacked By AnonymousFox

Current Path : /proc/thread-self/root/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/
Upload File :
Current File : //proc/thread-self/root/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyc

�
�Rec@`s�ddlmZmZmZddlmZddlZddlmZddlm	Z	ddlm
Z
dd	lmZdd
lmZddl
mZejd�Zed
�Zee�ZdS(i(tabsolute_importtdivisiontunicode_literals(t	text_typeN(tcopyi(tbasei(t	_ihatexml(t	constants(t
namespaces(tmoduleFactoryFactoryu
{([^}]*)}(.*)c
`s���jd�j�dtjf�fd��Y�d�f�fd��Y�d�f�fd��Y�d�f�fd	��Y�d
�f�fd��Y��fd��	��fd
�}dtjf��������	fd��Y}t�S(NuasdtElementc`s�eZd�fd�Zd�Zd�Zd�Zeee�Zd�Z	d�Z
ee
e	�Zd�Zd�Z
eee
�Zd�Zd	�Zeee�Zd
�Zd�Zd�Zd
�Zdd�Zd�Zd�ZRS(c`s�||_||_�j|j||��|_|dkrUtd|jf|_n|j|jf|_d|_g|_	g|_
dS(Nuhtml(t_namet
_namespaceR
t_getETreeTagt_elementtNoneRt	nameTupletparentt_childNodest_flags(tselftnamet	namespace(tElementTree(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt__init__s				cS`s)|dkr|}nd||f}|S(Nu{%s}%s(R(RRRt	etree_tag((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyR
%s	cS`s+||_|j|j|j�|j_dS(N(RR
RRttag(RR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt_setName,s	cS`s|jS(N(R(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt_getName0scS`s+||_|j|j|j�|j_dS(N(RR
RRR(RR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt
_setNamespace5s	cS`s|jS(N(R(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt
_getNamespace9scS`s
|jjS(N(Rtattrib(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt_getAttributes>scS`sz|jj}|j�|rvxW|j�D]F\}}t|t�r_d|d|df}n|}|||<q)WndS(Nu{%s}%sii(RRtcleartitemst
isinstancettuple(Rt
attributest	el_attribtkeytvalueR((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt_setAttributesAs
cS`s|jS(N(R(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt_getChildNodesPscS`s2|j2g|_x|D]}|j|�qWdS(N(RRtinsertChild(RR(telement((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt_setChildNodesSs	
cS`st|jjpt|j��S(u,Return true if the node has children or text(tboolRttexttlen(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt
hasContent[scS`s0|jj|�|jj|j�||_dS(N(RtappendRR(Rtnode((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pytappendChild_scS`s>t|j�j|j�}|jj||j�||_dS(N(tlistRtindextinsertR(RR3trefNodeR6((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pytinsertBeforedscS`s0|jj|�|jj|j�d|_dS(N(RtremoveRRR(RR3((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pytremoveChildiscS`s-t|j�s?|jjs*d|j_n|jj|7_n�|dkr�|jdjsnd|jd_n|jdj|7_n�t|j�}|j|j�}|dkr�|j|djs�d|j|d_n|j|dj|7_n-|jjsd|j_n|jj|7_dS(Nui����ii(R0RR/RttailR5R6(RtdataR9tchildrenR6((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt
insertTextns"cS`sFt|�|j|j�}|jjrBt|jj�|j_n|S(N(ttypeRRRRR(RR,((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt	cloneNode�scS`s�|jr+|jdjj|jj7_nH|jjsFd|j_n|jjdk	rs|jj|jj7_nd|j_tjj||�dS(Ni����u(t
childNodesRR<R/RRtNodetreparentChildren(Rt	newParent((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyRD�s	"N(t__name__t
__module__RRR
RRtpropertyRRRRR R)R%R*R-RBR1R4R9R;R?RARD((R(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyR
s*
							
							tCommentc`s8eZ�fd�Zd�Zd�Zeee�ZRS(c`s1�j|�|_d|_g|_g|_dS(N(RIRRRRR(RR=(R(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyR�s		cS`s
|jjS(N(RR/(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt_getData�scS`s||j_dS(N(RR/(RR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt_setData�s(RFRGRRJRKRHR=((R(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyRI�s		tDocumentTypec`sYeZ�fd�Zd�Zd�Zeee�Zd�Zd�Zeee�Z	RS(c`s2�j|d�||j_||_||_dS(Nu
<!DOCTYPE>(RRR/tpublicIdtsystemId(RRRMRN(R
(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyR�s	cS`s|jjdd�S(NupublicIdu(Rtget(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt_getPublicId�scS`s&|dk	r"|jjd|�ndS(NupublicId(RRtset(RR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt_setPublicId�scS`s|jjdd�S(NusystemIdu(RRO(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt_getSystemId�scS`s&|dk	r"|jjd|�ndS(NusystemId(RRRQ(RR(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt_setSystemId�s(
RFRGRRPRRRHRMRSRTRN((R
(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyRL�s				tDocumentc`seZ�fd�ZRS(c`s�j|d�dS(Nu
DOCUMENT_ROOT(R(R(R
(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyR�s(RFRGR((R
(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyRU�stDocumentFragmentc`seZ�fd�ZRS(c`s�j|d�dS(NuDOCUMENT_FRAGMENT(R(R(R
(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyR�s(RFRGR((R
(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyRV�sc`s8g�d���fd���|d�dj��S(Nic`s�t|d�s|j�}n|jdkr�|jd�sK|jd�r�|jd�p]d}|jd�prd}�jd|j||f�q0�jd|jf�n�|jdkrM�jd	�|jdk	r��jd
d|d|jf�n|jdk	rtd
��nt|d�r0t	|j
�r0td��q0n�|j�kr}�jdd||jf�n�t|jt�s�t
dt|j�|jf��tj|j�}|dkr�|j}n/|j�\}}tj|}d||f}�jdd||f�t|d�rg}x�|j
j�D]r\}}	tj|�}|dk	r�|j�\}}tj|}d||f}
n|}
|j|
|	f�qJWx?t|�D].\}}	�jdd|d||	f�q�Wn|jr0�jd
d|d|jf�n|d7}x|D]}�||�qAW|jr��jd
d|d|jf�ndS(Nutagu
<!DOCTYPE>upublicIdusystemIduu<!DOCTYPE %s "%s" "%s">u
<!DOCTYPE %s>u
DOCUMENT_ROOTu	#documentu|%s"%s"u iuDocument node cannot have tailuattribu$Document node cannot have attributesu|%s<!-- %s -->uExpected unicode, got %s, %su%s %su|%s<%s>u
|%s%s="%s"(thasattrtgetrootRROR2R/RR<t	TypeErrorR0RR#RtAssertionErrorR@t
tag_regexptmatchtgroupsRtprefixesR"tsorted(R,tindentRMRNtnsmatchRtnstprefixR%R(tattr_stringtchild(tElementTreeCommentTypetrvtserializeElement(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyRh�s^	
%!

)	%

	u
(tjoin(R,(Rf(RgRhs�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyttestSerializer�s7
c`sDg�tj�������fd���|�dj��S(u4Serialize an element and its child nodes to a stringc`smt|�j�r!|j�}n|jdkr�|jd�sN|jd�r�|jd�p`d}|jd�pud}�jd|j||f�qM�jd|jf�n�|jdkrL|jdk	r��j|j�n|jdk	rt	d��nt
|d	�r.t|j�r.t	d
��nx|D]}�|�q5Wn|j�kru�jd|jf�n�|js��jd�j
|j�f�n^d
jg|jj�D]%\}}d�j
|�|f^q��}�jd|j|f�|jr�j|j�nx|D]}�|�q"W�jd|jf�|jri�j|j�ndS(Nu
<!DOCTYPE>upublicIdusystemIduu<!DOCTYPE %s PUBLIC "%s" "%s">u
<!DOCTYPE %s>u
DOCUMENT_ROOTuDocument node cannot have tailuattribu$Document node cannot have attributesu	<!--%s-->u<%s>u u%s="%s"u<%s %s>u</%s>(R#RRXRROR2R/RR<RYRWR0RtfromXmlNameRiR"(R,RMRNReRR(tattr(RRftfilterRgRh(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyRhs@	
	#	;	
	u(Rt
InfosetFilterRi(R,(RRf(RmRgRhs�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyttostrings
-
tTreeBuilderc`sSeZ�Z�Z�Z�Z�Z�Z�fd�Z�fd�Z	d�Z
RS(c`s
�|�S(N((RR,(Rj(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyRjDsc`sP�r|jjS|jdk	r9|jjjd|j�S|jjjd�SdS(Nu{%s}htmluhtml(tdocumentRtdefaultNamespaceRtfind(R(tfullTree(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pytgetDocumentGs
cS`stjj|�jS(N(RRptgetFragmentR(R((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyRvQs(RFRGt
documentClasstdoctypeClasstelementClasstcommentClasst
fragmentClasstimplementationRjRuRv((RIRURVRLR
tElementTreeImplementationRtRj(s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyRp<s
(RIRRRCRptlocals(R}RtRoRp((
RIRURVRLR
RRfR}RtRjs�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pytgetETreeBuilders>64(t
__future__RRRtpip._vendor.sixRtreRtRRRRt_utilsR	tcompileR[tFalseRtgetETreeModule(((s�/builddir/build/BUILDROOT/alt-python27-pip-20.2.4-5.el8.x86_64/opt/alt/python27/lib/python2.7/site-packages/pip/_vendor/html5lib/treebuilders/etree.pyt<module>s�E

Hacked By AnonymousFox1.0, Coded By AnonymousFox