
    +g|                    p   S SK Jr  SSKJrJr  S SKJr  S SKrS SKrSSK	J
r
  SSK	Jr  SSK	Jr  \ " S	 S
5      5       r\ " S S5      5       r\ " S S5      5       r\ " S S5      5       r\ " S S5      5       r " S S\5      r " S S\5      r\ " S S5      5       r\ " S S5      5       r\ " S S5      5       r " S S\5      r\ " S S 5      5       r\ " S! S"5      5       r\ " S# S$5      5       r\ " S% S&5      5       rS+S' jrS+S( jr   S,         S-S) jjr     S.           S/S* jjr!g)0    )annotations   )event_classT_JSON_DICT)	dataclassN)dom)dom_debugger)pagec                     \ rS rSr% SrS\S'   S\S'   S\S'   S\S	'   S
rS\S'   S
rS\S'   S
rS\S'   S
r	S\S'   S
r
S\S'   S
rS\S'   S
rS\S'   S
rS\S'   S
rS\S'   S
rS\S'   S
rS\S'   S
rS\S'   S
rS\S'   S
rS\S'   S
rS\S'   S
rS\S '   S
rS!\S"'   S
rS#\S$'   S
rS\S%'   S
rS&\S''   S
rS\S('   S
rS\S)'   S
rS*\S+'   S
rS*\S,'   S- r\S. 5       r S/r!g
)0DOMNode   z
A Node in the DOM tree.
int	node_typestr	node_name
node_valuezdom.BackendNodeIdbackend_node_idNtyping.Optional[str]
text_valueinput_valuetyping.Optional[bool]input_checkedoption_selected!typing.Optional[typing.List[int]]child_node_indexesz'typing.Optional[typing.List[NameValue]]
attributespseudo_element_indexestyping.Optional[int]layout_node_indexdocument_urlbase_urlcontent_languagedocument_encoding	public_id	system_idztyping.Optional[page.FrameId]frame_idcontent_document_indexztyping.Optional[dom.PseudoType]pseudo_typez#typing.Optional[dom.ShadowRootType]shadow_root_typeis_clickablez8typing.Optional[typing.List[dom_debugger.EventListener]]event_listenerscurrent_source_url
origin_urltyping.Optional[float]scroll_offset_xscroll_offset_yc                "   [        5       nU R                  US'   U R                  US'   U R                  US'   U R                  R                  5       US'   U R                  b  U R                  US'   U R                  b  U R                  US'   U R                  b  U R                  US'   U R                  b  U R                  US'   U R                  b  U R                   Vs/ s H  o"PM     snUS	'   U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS
'   U R                  b  U R                   Vs/ s H  o"PM     snUS'   U R                  b  U R                  US'   U R                  b  U R                  US'   U R                  b  U R                  US'   U R                   b  U R                   US'   U R"                  b  U R"                  US'   U R$                  b  U R$                  US'   U R&                  b  U R&                  US'   U R(                  b  U R(                  R                  5       US'   U R*                  b  U R*                  US'   U R,                  b  U R,                  R                  5       US'   U R.                  b  U R.                  R                  5       US'   U R0                  b  U R0                  US'   U R2                  b-  U R2                   Vs/ s H  o"R                  5       PM     snUS'   U R4                  b  U R4                  US'   U R6                  b  U R6                  US'   U R8                  b  U R8                  US'   U R:                  b  U R:                  US'   U$ s  snf s  snf s  snf s  snf )NnodeTypenodeName	nodeValuebackendNodeId	textValue
inputValueinputCheckedoptionSelectedchildNodeIndexesr   pseudoElementIndexeslayoutNodeIndexdocumentURLbaseURLcontentLanguagedocumentEncodingpublicIdsystemIdframeIdcontentDocumentIndex
pseudoTypeshadowRootTypeisClickableeventListenerscurrentSourceURL	originURLscrollOffsetXscrollOffsetY)dictr   r   r   r   to_jsonr   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r/   r0   selfjsonis      |/Users/Alptekin/Desktop/izin_takip/venv/lib/python3.13/site-packages/selenium/webdriver/common/devtools/v131/dom_snapshot.pyrN   DOMNode.to_jsono   sU   v>>Z>>Z OO[ $ 4 4 < < >_??& $D'!%!1!1D)#'#5#5D +%)%9%9D!""".373J3J'K3Ja3J'KD#$??&7;!G!))+!GD&&27;7R7R+S7R!A7R+SD'(!!-&*&<&<D"#("&"3"3D==$"mmDO  ,&*&;&;D"#!!-'+'='=D#$>>%#~~D>>%#~~D==$"mm335DO&&2+/+F+FD'('!%!1!1!9!9!;D  ,%)%:%:%B%B%DD!"("&"3"3D+;?;O;O%P;Oaiik;O%PD!""".'+'>'>D#$??& $D+$($8$8D!+$($8$8D!O (L!G+S4 &Qs    M=NN,Nc                f   U " S80 S[        US   5      _S[        US   5      _S[        US   5      _S[        R                  R	                  US   5      _S	S
U;   a  [        US
   5      OS _SSU;   a  [        US   5      OS _SSU;   a  [        US   5      OS _SSU;   a  [        US   5      OS _SSU;   a  US    Vs/ s H  n[        U5      PM     snOS _SSU;   a)  US    Vs/ s H  n[        R	                  U5      PM     snOS _SSU;   a  US    Vs/ s H  n[        U5      PM     snOS _SSU;   a  [        US   5      OS _SSU;   a  [        US   5      OS _SSU;   a  [        US   5      OS _SSU;   a  [        US   5      OS _SSU;   a  [        US   5      OS _S S!U;   a  [        US!   5      OS _S"S#U;   a  [        US#   5      OS _S$S%U;   a"  [        R                  R	                  US%   5      OS _S&S'U;   a  [        US'   5      OS _S(S)U;   a"  [        R                  R	                  US)   5      OS _S*S+U;   a"  [        R                  R	                  US+   5      OS _S,S-U;   a  [        US-   5      OS _S.S/U;   a3  US/    Vs/ s H"  n[        R                  R	                  U5      PM$     snOS _S0S1U;   a  [        US1   5      OS _S2S3U;   a  [        US3   5      OS _S4S5U;   a  [        US5   5      OS _S6S7U;   a  [        US7   5      _6$ S _6$ s  snf s  snf s  snf s  snf )9Nr   r2   r   r3   r   r4   r   r5   r   r6   r   r7   r   r8   r   r9   r   r:   r   r   r;   r   r<   r    r=   r!   r>   r"   r?   r#   r@   r$   rA   r%   rB   r&   rC   r'   rD   r(   rE   r)   rF   r*   rG   r+   rH   r,   rI   r-   rJ   r/   rK   r0   rL    )r   r   r   BackendNodeId	from_jsonbool	NameValuer
   FrameId
PseudoTypeShadowRootTyper	   EventListenerfloatclsrQ   rR   s      rS   rX   DOMNode.from_json   s    
$z*+
$z*+
 4,-
  --77_8MN	

 2=1Ds4,-$
 4@43GD./T
 9G$8N$tN34TX
 =MPT<TD&6!78Z^
 N`cgMg5G0HI0H1A0HImq
 P\_cOc\8JK8J1	++A.8JKim
 VlosUsD9O4P#Q4PqCF4P#Qy}
 ?PSW>Wc$'8"9:]a
 6Cd5JT-01PT
 .7$->Si)D
 >ORV=VS&7!89\`
  @RUY?Yc$'9":;_c!
" 0:T/Ac$z*+t#
$ 0:T/Ac$z*+t%
& AJT@QT\\++DO<W['
( I_bfHf3t,B'C#Dlp)
* IUX\H\00l1CDbf+
, VfimUmS//99$?O:PQsw-
. 7Dt6Kd=12QU/
0 jz  ~B  jBdScNdeNd\77AA!DNde  HL1
2 ASVZ@Zs4(:#;<`d3
4 2=1Ds4,-$5
6 =Lt<SE$"78Y]7
8 =Lt<SE$"789
 	
8 Z^9
 	
  JK#Q fs   ?L'L$L))L.rV   )"__name__
__module____qualname____firstlineno____doc____annotations__r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   r&   r'   r(   r)   r*   r+   r,   r-   r/   r0   rN   classmethodrX   __static_attributes__rV       rS   r   r      s    N N O '& (,J$+ )-K%, ,0M(/ .2O*1 =A9@ ;?J7> AE=D /3+2 *.L&- &*H") .2*1 /3+2 '+I#* '+I#* /3H+2 4807 48K07 =A9@
 +/L'. QUOMT 04,3 (,J$+ /3O+2.2O+26p 
 
rk   r   c                  N    \ rS rSr% SrS\S'   S\S'   S\S'   S r\S	 5       rS
r	g)InlineTextBox   z
Details of post layout rendered text positions. The exact layout should not be regarded as
stable and may change between versions.
dom.Rectbounding_boxr   start_character_indexnum_charactersc                    [        5       nU R                  R                  5       US'   U R                  US'   U R                  US'   U$ )NboundingBoxstartCharacterIndexnumCharacters)rM   rp   rN   rq   rr   rP   rQ   s     rS   rN   InlineTextBox.to_json   sH    v"//779]&*&@&@"# $ 3 3_rk   c                    U " [         R                  R                  US   5      [        US   5      [        US   5      S9$ )Nrt   ru   rv   )rp   rq   rr   )r   RectrX   r   ra   rQ   s     rS   rX   InlineTextBox.from_json   sA    ++D,?@"%d+@&A"BtO45
 	
rk   rV   N
rc   rd   re   rf   rg   rh   rN   ri   rX   rj   rV   rk   rS   rm   rm      s8    
    
 
rk   rm   c                      \ rS rSr% SrS\S'   S\S'   SrS\S	'   SrS
\S'   SrS\S'   Sr	S\S'   Sr
S\S'   S r\S 5       rSrg)LayoutTreeNode   z<
Details of an element in the DOM tree with a LayoutObject.
r   dom_node_indexro   rp   Nr   layout_textz+typing.Optional[typing.List[InlineTextBox]]inline_text_nodesr   style_indexpaint_orderr   is_stacking_contextc                   [        5       nU R                  US'   U R                  R                  5       US'   U R                  b  U R                  US'   U R
                  b-  U R
                   Vs/ s H  o"R                  5       PM     snUS'   U R                  b  U R                  US'   U R                  b  U R                  US'   U R                  b  U R                  US'   U$ s  snf )NdomNodeIndexrt   
layoutTextinlineTextNodes
styleIndex
paintOrderisStackingContext)	rM   r   rp   rN   r   r   r   r   r   rO   s      rS   rN   LayoutTreeNode.to_json  s    v#22^"//779]'!%!1!1D!!-<@<R<R&S<Rqyy{<R&SD"#'!%!1!1D'!%!1!1D##/(,(@(@D$% 'Ts   .C#c                ~   U " [        US   5      [        R                  R                  US   5      SU;   a  [	        US   5      OS SU;   a)  US    Vs/ s H  n[
        R                  U5      PM     snOS SU;   a  [        US   5      OS SU;   a  [        US   5      OS SU;   a  [        US   5      S9$ S S9$ s  snf )	Nr   rt   r   r   r   r   r   )r   rp   r   r   r   r   r   )r   r   rz   rX   r   rm   rY   r`   s      rS   rX   LayoutTreeNode.from_json  s    tN34++D,?@3?43GD./T_ptx_x4HYCZ[CZa}66q9CZ[  C3?43GD./T3?43GD./TCVZ^C^T*=%> ?
 	
 ei
 	
 \s   B:rV   )rc   rd   re   rf   rg   rh   r   r   r   r   r   rN   ri   rX   rj   rV   rk   rS   r   r      su       )-K%, FJBI )-K%,
 )-K%, 26.5  	
 	
rk   r   c                  :    \ rS rSr% SrS\S'   S r\S 5       rSr	g)	ComputedStylei#  zI
A subset of the full ComputedStyle as defined by the request whitelist.
ztyping.List[NameValue]
propertiesc                ~    [        5       nU R                   Vs/ s H  o"R                  5       PM     snUS'   U$ s  snf )Nr   )rM   r   rN   rO   s      rS   rN   ComputedStyle.to_json+  s5    v37??C?aiik?C\ Ds   :c                f    U " US    Vs/ s H  n[         R                  U5      PM     snS9$ s  snf )Nr   )r   )rZ   rX   r`   s      rS   rX   ComputedStyle.from_json0  s6    8<\8JK8J1	++A.8JK
 	
Ks   .rV   Nr}   rV   rk   rS   r   r   #  s(     '&
 
 
rk   r   c                  D    \ rS rSr% SrS\S'   S\S'   S r\S 5       rSr	g	)
rZ   i7  z
A name/value pair.
r   namevaluec                V    [        5       nU R                  US'   U R                  US'   U$ )Nr   r   )rM   r   r   rw   s     rS   rN   NameValue.to_jsonB  s(    vyyV

Wrk   c                @    U " [        US   5      [        US   5      S9$ )Nr   r   )r   r   )r   r{   s     rS   rX   NameValue.from_jsonH  s'    T&\"d7m$
 	
rk   rV   Nr}   rV   rk   rS   rZ   rZ   7  s.     I J 
 
rk   rZ   c                  J   ^  \ rS rSrSrSS jr\SS j5       rU 4S jrSr	U =r
$ )	StringIndexiP  +
Index of the string in the strings table.
c                    U $ NrV   rP   s    rS   rN   StringIndex.to_jsonT      rk   c                    U " U5      $ r   rV   r{   s     rS   rX   StringIndex.from_jsonW      4yrk   c                >   > SR                  [        TU ]	  5       5      $ )NzStringIndex({})formatsuper__repr__rP   	__class__s    rS   r   StringIndex.__repr__[  s     ''(8(:;;rk   rV   )returnr   )rQ   r   r   r   rc   rd   re   rf   rg   rN   ri   rX   r   rj   __classcell__r   s   @rS   r   r   P  s+      < <rk   r   c                  J   ^  \ rS rSrSrSS jr\SS j5       rU 4S jrSr	U =r
$ )	ArrayOfStringsi_  r   c                    U $ r   rV   r   s    rS   rN   ArrayOfStrings.to_jsonc  r   rk   c                    U " U5      $ r   rV   r{   s     rS   rX   ArrayOfStrings.from_jsonf  r   rk   c                >   > SR                  [        TU ]	  5       5      $ )NzArrayOfStrings({})r   r   s    rS   r   ArrayOfStrings.__repr__j  s    #**57+;+=>>rk   rV   )r   typing.List[StringIndex])rQ   r   r   r   r   r   s   @rS   r   r   _  s+      ? ?rk   r   c                  D    \ rS rSr% SrS\S'   S\S'   S r\S 5       rS	r	g
)RareStringDatain  z*
Data that is only present on rare nodes.
typing.List[int]indexr   r   c                    [        5       nU R                   Vs/ s H  o"PM     snUS'   U R                   Vs/ s H  o"R                  5       PM     snUS'   U$ s  snf s  snf Nr   r   )rM   r   r   rN   rO   s      rS   rN   RareStringData.to_jsonw  sR    v$(JJ/JqJ/W.2jj9jj9W 09s
   AAc           	         U " US    Vs/ s H  n[        U5      PM     snUS    Vs/ s H  n[        R                  U5      PM     snS9$ s  snf s  snf Nr   r   )r   r   )r   r   rX   r`   s      rS   rX   RareStringData.from_json}  sP    #'=1=a3q6=159']C];((+]C
 	
1Cs
   AA
rV   Nr}   rV   rk   rS   r   r   n  s.     ## 
 
rk   r   c                  6    \ rS rSr% S\S'   S r\S 5       rSrg)RareBooleanDatai  r   r   c                b    [        5       nU R                   Vs/ s H  o"PM     snUS'   U$ s  snf )Nr   )rM   r   rO   s      rS   rN   RareBooleanData.to_json  s/    v$(JJ/JqJ/W 0s   ,c                R    U " US    Vs/ s H  n[        U5      PM     snS9$ s  snf )Nr   )r   r   r`   s      rS   rX   RareBooleanData.from_json  s,    #'=1=a3q6=1
 	
1s   $rV   N	rc   rd   re   rf   rh   rN   ri   rX   rj   rV   rk   rS   r   r     s!    
 
 
rk   r   c                  @    \ rS rSr% S\S'   S\S'   S r\S 5       rSrg)	RareIntegerDatai  r   r   r   c                    [        5       nU R                   Vs/ s H  o"PM     snUS'   U R                   Vs/ s H  o"PM     snUS'   U$ s  snf s  snf r   )rM   r   r   rO   s      rS   rN   RareIntegerData.to_json  sN    v$(JJ/JqJ/W$(JJ/JqJ/W 0/s
   AAc           	         U " US    Vs/ s H  n[        U5      PM     snUS    Vs/ s H  n[        U5      PM     snS9$ s  snf s  snf r   r   r`   s      rS   rX   RareIntegerData.from_json  sI    #'=1=a3q6=1#'=1=a3q6=1
 	
11s
   AA
rV   Nr   rV   rk   rS   r   r     s'     
 
rk   r   c                  F   ^  \ rS rSrSS jr\SS j5       rU 4S jrSrU =r	$ )	Rectanglei  c                    U $ r   rV   r   s    rS   rN   Rectangle.to_json  r   rk   c                    U " U5      $ r   rV   r{   s     rS   rX   Rectangle.from_json  r   rk   c                >   > SR                  [        TU ]	  5       5      $ )NzRectangle({})r   r   s    rS   r   Rectangle.__repr__  s    %%eg&6&899rk   rV   )r   typing.List[float])rQ   r   r   r   )
rc   rd   re   rf   rN   ri   rX   r   rj   r   r   s   @rS   r   r     s&      : :rk   r   c                      \ rS rSr% SrS\S'   S\S'   S\S'   S\S'   S\S'   S\S	'   S\S
'   S\S'   S\S'   S\S'   S\S'   SrS\S'   SrS\S'   SrS\S'   Sr	S\S'   S r
\S 5       rSrg)DocumentSnapshoti  z
Document snapshot.
r   r    titler!   r"   encoding_namer$   r%   r&   NodeTreeSnapshotnodesLayoutTreeSnapshotlayoutTextBoxSnapshot
text_boxesNr.   r/   r0   content_widthcontent_heightc                x   [        5       nU R                  R                  5       US'   U R                  R                  5       US'   U R                  R                  5       US'   U R
                  R                  5       US'   U R                  R                  5       US'   U R                  R                  5       US'   U R                  R                  5       US'   U R                  R                  5       US'   U R                  R                  5       US	'   U R                  R                  5       US
'   U R                  R                  5       US'   U R                  b  U R                  US'   U R                  b  U R                  US'   U R                  b  U R                  US'   U R                   b  U R                   US'   U$ )Nr=   r   r>   r?   encodingNamerA   rB   rC   r   r   	textBoxesrK   rL   contentWidthcontentHeight)rM   r    rN   r   r!   r"   r   r$   r%   r&   r   r   r   r/   r0   r   r   rw   s     rS   rN   DocumentSnapshot.to_json  s}   v"//779]

**,W--//1Y"&"7"7"?"?"A#1199;^>>113Z>>113Z--//1Y

**,W,,.X OO335[+$($8$8D!+$($8$8D!)#'#5#5D *$($7$7D!rk   c                   U " [         R                  US   5      [         R                  US   5      [         R                  US   5      [         R                  US   5      [         R                  US   5      [         R                  US   5      [         R                  US   5      [         R                  US   5      [        R                  US	   5      [        R                  US
   5      [        R                  US   5      SU;   a  [        US   5      OS SU;   a  [        US   5      OS SU;   a  [        US   5      OS SU;   a  [        US   5      S9$ S S9$ )Nr=   r   r>   r?   r   rA   rB   rC   r   r   r   rK   rL   r   r   )r    r   r!   r"   r   r$   r%   r&   r   r   r   r/   r0   r   r   )r   rX   r   r   r   r_   r{   s     rS   rX   DocumentSnapshot.from_json  sF   $..tM/BC''W6 **4	?;(2248I3JK%//^0DE!++D,<=!++D,<= **4	?;",,T'];%//X?&00k1BC<Kt<SE$"78Y]<Kt<SE$"78Y]9G49O%^ 45UY;Jd;R5o!67
 	
 Y]
 	
rk   rV   )rc   rd   re   rf   rg   rh   r/   r0   r   r   rN   ri   rX   rj   rV   rk   rS   r   r     s        "!         /3O+2 /3O+2 -1M)0 .2N*1. 
 
rk   r   c                     \ rS rSr% SrSrS\S'   SrS\S'   SrS\S'   Sr	S	\S
'   Sr
S	\S'   SrS\S'   SrS\S'   SrS\S'   SrS\S'   SrS\S'   SrS\S'   SrS\S'   SrS\S'   SrS\S'   SrS\S'   SrS\S'   SrS\S'   S r\S 5       rSrg)r   i  z
Table containing nodes.
Nr   parent_indexr   ztyping.Optional[RareStringData]r)   )typing.Optional[typing.List[StringIndex]]r   r   z/typing.Optional[typing.List[dom.BackendNodeId]]r   z,typing.Optional[typing.List[ArrayOfStrings]]r   r   r   z typing.Optional[RareBooleanData]r   r   z typing.Optional[RareIntegerData]r'   r(   pseudo_identifierr*   r,   r-   c                r   [        5       nU R                  b  U R                   Vs/ s H  o"PM     snUS'   U R                  b  U R                   Vs/ s H  o"PM     snUS'   U R                  b  U R                  R	                  5       US'   U R
                  b-  U R
                   Vs/ s H  o"R	                  5       PM     snUS'   U R                  b-  U R                   Vs/ s H  o"R	                  5       PM     snUS'   U R                  b-  U R                   Vs/ s H  o"R	                  5       PM     snUS'   U R                  b-  U R                   Vs/ s H  o"R	                  5       PM     snUS'   U R                  b  U R                  R	                  5       US'   U R                  b  U R                  R	                  5       US	'   U R                  b  U R                  R	                  5       US
'   U R                  b  U R                  R	                  5       US'   U R                  b  U R                  R	                  5       US'   U R                  b  U R                  R	                  5       US'   U R                  b  U R                  R	                  5       US'   U R                   b  U R                   R	                  5       US'   U R"                  b  U R"                  R	                  5       US'   U R$                  b  U R$                  R	                  5       US'   U$ s  snf s  snf s  snf s  snf s  snf s  snf )NparentIndexr2   rF   r3   r4   r5   r   r6   r7   r8   r9   rD   rE   pseudoIdentifierrG   rI   rJ   )rM   r   r   r)   rN   r   r   r   r   r   r   r   r   r'   r(   r   r*   r,   r-   rO   s      rS   rN   NodeTreeSnapshot.to_jsonN  s   v(.2.?.?"@.?1.?"@D>>%+/>>:>a>:D  ,%)%:%:%B%B%DD!">>%59^^D^		^DD??&6:oo Foo FD+:>:N:N$O:NQYY[:N$OD!??&7;!G!))+!GD??& $ 7 7 9D'!%!1!1!9!9!;D)#'#5#5#=#=#?D +%)%9%9%A%A%CD!"&&2+/+F+F+N+N+PD'('!%!1!1!9!9!;D!!-'+'='='E'E'GD#$("&"3"3";";"=D"".'+'>'>'F'F'HD#$??& $ 7 7 9DC #A:  E F$O!Gs#   LL (L%"L*L/L4c                h   U " S"0 SSU;   a  US    Vs/ s H  n[        U5      PM     snOS _SSU;   a  US    Vs/ s H  n[        U5      PM     snOS _SSU;   a  [        R                  US   5      OS _SSU;   a)  US    Vs/ s H  n[        R                  U5      PM     snOS _S	S
U;   a)  US
    Vs/ s H  n[        R                  U5      PM     snOS _SSU;   a3  US    Vs/ s H"  n[        R
                  R                  U5      PM$     snOS _SSU;   a)  US    Vs/ s H  n[        R                  U5      PM     snOS _SSU;   a  [        R                  US   5      OS _SSU;   a  [        R                  US   5      OS _SSU;   a  [        R                  US   5      OS _SSU;   a  [        R                  US   5      OS _SSU;   a  [        R                  US   5      OS _SSU;   a  [        R                  US   5      OS _SSU;   a  [        R                  US   5      OS _SSU;   a  [        R                  US   5      OS _SSU;   a  [        R                  US   5      OS _S S!U;   a  [        R                  US!   5      _6$ S _6$ s  snf s  snf s  snf s  snf s  snf s  snf )#Nr   r   r   r2   r)   rF   r   r3   r   r4   r   r5   r   r   r6   r   r7   r   r8   r   r9   r'   rD   r(   rE   r   r   r*   rG   r,   rI   r-   rJ   rV   )	r   r   rX   r   r   rW   r   r   r   r`   s      rS   rX   NodeTreeSnapshot.from_jsont  s8    
BOSWBW$}*=>*=Q#a&*=>]a
<F$<NtJ'78'7!s1v'78TX
 RbeiQi^55d;K6LMos
 OY\`N`j9IJ9IA{,,Q/9IJfj	

 Q\_cPc${:KL:KQ--a0:KLim
 `orv_vT/EZ[EZS..88;EZ[  }A
 UadhThT,=OP=O003=OPnr
 GRUYFY~//[0AB_c
 IUX\H\00l1CDbf
 N\_cMc/33D4HIim
 RbeiQiO55d;K6LMos
 _ux|^|?#<#<TBX=Y#Z  CG
 IUX\H\00l1CDbf
 UgjnTnn66t<N7OPtx
 LY\`K`2243FGfj
  VhkoUo~77=O8PQuy!
" GRUYFY~//[0AB#
 	
" `d#
 	
>8JL[Ps"   JJJ 6J%()J*$J/rV   )rc   rd   re   rf   rg   r   rh   r   r)   r   r   r   r   r   r   r   r   r'   r(   r   r*   r,   r-   rN   ri   rX   rj   rV   rk   rS   r   r     s
    7;L3: 48I07 9=5< <@I8? =AJ9@ HLODK @DJ<C 37J/6 48K07 7;M3: 9=O5< @D<C 48K07 :>6=
 6:L29 ;?7> 37J/6$L 
 
rk   r   c                      \ rS rSr% SrS\S'   S\S'   S\S'   S	\S
'   S\S'   SrS\S'   SrS\S'   SrS\S'   Sr	S\S'   Sr
S\S'   SrS\S'   S r\S 5       rSrg)r   i  zE
Table of details of an element in the DOM tree with a LayoutObject.
r   
node_indexztyping.List[ArrayOfStrings]stylestyping.List[Rectangle]boundsr   textr   stacking_contextsNr   paint_ordersz'typing.Optional[typing.List[Rectangle]]offset_rectsscroll_rectsclient_rectsr   blended_background_colorsz#typing.Optional[typing.List[float]]text_color_opacitiesc                   [        5       nU R                   Vs/ s H  o"PM     snUS'   U R                   Vs/ s H  o"R                  5       PM     snUS'   U R                   Vs/ s H  o"R                  5       PM     snUS'   U R
                   Vs/ s H  o"R                  5       PM     snUS'   U R                  R                  5       US'   U R                  b  U R                   Vs/ s H  o"PM     snUS'   U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS'   U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS'   U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS	'   U R                  b-  U R                   Vs/ s H  o"R                  5       PM     snUS
'   U R                  b  U R                   Vs/ s H  o"PM     snUS'   U$ s  snf s  snf s  snf s  snf s  snf s  snf s  snf s  snf s  snf s  snf )N	nodeIndexr   r  r  stackingContextspaintOrdersoffsetRectsscrollRectsclientRectsblendedBackgroundColorstextColorOpacities)rM   r   r   rN   r  r  r  r  r  r  r  r	  r
  rO   s      rS   rN   LayoutTreeSnapshot.to_json  s   v(,81Q8[/3{{;{!))+{;X/3{{;{!))+{;X-1YY7Y		Y7V#'#9#9#A#A#C (.2.?.?"@.?1.?"@D(8<8I8I"J8I199;8I"JD(8<8I8I"J8I199;8I"JD(8<8I8I"J8I199;8I"JD))5DHDbDb.cDbqyy{Db.cD*+$$0595N5N)O5N!5N)OD%&# 9;;7 #A"J"J"J.c)Os:   HH%HH)H$H)H.	H3H8=H=c                   U " US    Vs/ s H  n[        U5      PM     snUS    Vs/ s H  n[        R                  U5      PM     snUS    Vs/ s H  n[        R                  U5      PM     snUS    Vs/ s H  n[        R                  U5      PM     sn[
        R                  US   5      SU;   a  US    Vs/ s H  n[        U5      PM     snOS SU;   a)  US    Vs/ s H  n[        R                  U5      PM     snOS SU;   a)  US    Vs/ s H  n[        R                  U5      PM     snOS S	U;   a)  US	    Vs/ s H  n[        R                  U5      PM     snOS S
U;   a)  US
    Vs/ s H  n[        R                  U5      PM     snOS SU;   a!  US    Vs/ s H  n[        U5      PM     snS9$ S S9$ s  snf s  snf s  snf s  snf s  snf s  snf s  snf s  snf s  snf s  snf )Nr  r   r  r  r  r  r  r  r  r  r  )r   r   r  r  r  r  r  r  r  r	  r
  )r   r   rX   r   r   r   r_   r`   s      rS   rX   LayoutTreeSnapshot.from_json  s   (,[(9:(91A(9:9=hHAN,,Q/H48NCNqI''*NC48LALq+''*LA-77=O8PQBOSWBW$}*=>*=Q#a&*=>]aR_cgRg$}:MN:MQ)--a0:MNmqR_cgRg$}:MN:MQ)--a0:MNmqR_cgRg$}:MN:MQ)--a0:MNmq nG  KO  nONgIh&iIhA{'<'<Q'?Ih&i  UYSgkoSoD9M4N!O4Nq%(4N!O
 	
 vz
 	
:HCA>NNN&i!Os:   GG
G8G=G#GGG$3G)#G.rV   )rc   rd   re   rf   rg   rh   r  r  r  r  r	  r
  rN   ri   rX   rj   rV   rk   rS   r   r     s     !  (' #" #" '&
 7;L3: =AL9@ =AL9@ =AL9@ LPHO AE=D* 
 
rk   r   c                  X    \ rS rSr% SrS\S'   S\S'   S\S'   S\S'   S	 r\S
 5       rSr	g)r   i  z
Table of details of the post layout rendered text positions. The exact layout should not be regarded as
stable and may change between versions.
r   layout_indexr  r  startlengthc                V   [        5       nU R                   Vs/ s H  o"PM     snUS'   U R                   Vs/ s H  o"R                  5       PM     snUS'   U R                   Vs/ s H  o"PM     snUS'   U R
                   Vs/ s H  o"PM     snUS'   U$ s  snf s  snf s  snf s  snf )NlayoutIndexr  r  r  )rM   r  r  rN   r  r  rO   s      rS   rN   TextBoxSnapshot.to_json  s    v*.*;*;<*;Qq*;<]/3{{;{!))+{;X$(JJ/JqJ/W%)[[1[![1X	 =;/1s   BB%B!B&c                8   U " US    Vs/ s H  n[        U5      PM     snUS    Vs/ s H  n[        R                  U5      PM     snUS    Vs/ s H  n[        U5      PM     snUS    Vs/ s H  n[        U5      PM     snS9$ s  snf s  snf s  snf s  snf )Nr  r  r  r  )r  r  r  r  )r   r   rX   r`   s      rS   rX   TextBoxSnapshot.from_json  s    *.}*=>*=Q#a&*=>48NCNqI''*NC#'=1=a3q6=1$(N3NqCFN3	
 	
>C13s   BB
B.BrV   Nr}   rV   rk   rS   r   r     s@    
 #" #"   
 
rk   r   c               #     #    SS0n U v ng7f)z1
Disables DOM snapshot agent for the given page.
methodzDOMSnapshot.disableNrV   cmd_dictrQ   s     rS   disabler$    s     
 	'H >D   
c               #     #    SS0n U v ng7f)z0
Enables DOM snapshot agent for the given page.
r!  zDOMSnapshot.enableNrV   r"  s     rS   enabler'  	  s     
 	&H >Dr%  c              #    #    [        5       nU  Vs/ s H  oUPM     snUS'   Ub  XS'   Ub  X$S'   Ub  X4S'   SUS.nUv nUS    Vs/ s H  n[        R                  U5      PM     snUS    Vs/ s H  n[        R                  U5      PM     snUS	    Vs/ s H  n[        R                  U5      PM     sn4$ s  snf s  snf s  snf s  snf 7f)
a  
Returns a document snapshot, including the full DOM tree of the root node (including iframes,
template contents, and imported documents) in a flattened array, as well as layout and
white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
flattened.

:param computed_style_whitelist: Whitelist of computed styles to return.
:param include_event_listeners: *(Optional)* Whether or not to retrieve details of DOM listeners (default false).
:param include_paint_order: *(Optional)* Whether to determine and include the paint order index of LayoutTreeNodes (default false).
:param include_user_agent_shadow_tree: *(Optional)* Whether to include UA shadow tree in the snapshot (default false).
:returns: A tuple with the following items:

    0. **domNodes** - The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
    1. **layoutTreeNodes** - The nodes in the layout tree.
    2. **computedStyles** - Whitelisted ComputedStyle properties for each node in the layout tree.
computedStyleWhitelistincludeEventListenersincludePaintOrderincludeUserAgentShadowTreezDOMSnapshot.getSnapshotr!  paramsdomNodeslayoutTreeNodescomputedStyles)rM   r   rX   r   r   )computed_style_whitelistinclude_event_listenersinclude_paint_orderinclude_user_agent_shadow_treer.  rR   r#  rQ   s           rS   get_snapshotr6    s     , &F3K'L3Ka3K'LF#$**A&'&&9"#%1/M+,+H >D'+J'78'7!		1	'78.23D.EF.E	!	!!	$.EF-12B-CD-C	 	 	#-CD  (M 	9FDs3   CB:+CB?&	C/C	CC	6Cc              #  @  #    [        5       nU  Vs/ s H  ofPM     snUS'   Ub  XS'   Ub  X%S'   Ub  X5S'   Ub  XES'   SUS.nUv nUS    Vs/ s H  n[        R                  U5      PM     snUS	    Vs/ s H  n[        U5      PM     sn4$ s  snf s  snf s  snf 7f)
a  
Returns a document snapshot, including the full DOM tree of the root node (including iframes,
template contents, and imported documents) in a flattened array, as well as layout and
white-listed computed style information for the nodes. Shadow DOM in the returned DOM tree is
flattened.

:param computed_styles: Whitelist of computed styles to return.
:param include_paint_order: *(Optional)* Whether to include layout object paint orders into the snapshot.
:param include_dom_rects: *(Optional)* Whether to include DOM rectangles (offsetRects, clientRects, scrollRects) into the snapshot
:param include_blended_background_colors: **(EXPERIMENTAL)** *(Optional)* Whether to include blended background colors in the snapshot (default: false). Blended background color is achieved by blending background colors of all elements that overlap with the current element.
:param include_text_color_opacities: **(EXPERIMENTAL)** *(Optional)* Whether to include text color opacity in the snapshot (default: false). An element might have the opacity property set that affects the text color of the element. The final text color opacity is computed based on the opacity of all overlapping elements.
:returns: A tuple with the following items:

    0. **documents** - The nodes in the DOM tree. The DOMNode at index 0 corresponds to the root document.
    1. **strings** - Shared string table that all string properties refer to with indexes.
r1  r+  includeDOMRectsincludeBlendedBackgroundColorsincludeTextColorOpacitieszDOMSnapshot.captureSnapshotr-  	documentsstrings)rM   r   rX   r   )	computed_stylesr4  include_dom_rects!include_blended_background_colorsinclude_text_color_opacitiesr.  rR   r#  rQ   s	            rS   capture_snapshotrA  =  s     . &F+:;?a?;F&&9"#$$5 !(43T/0#/.J*+/H >D04[0AB0A1		#	#A	&0ABi)AQ)   < 	C)s'   BB2BB-	B6BB)r   z0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])NNN)
r2  typing.List[str]r3  r   r4  r   r5  r   r   ztyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.List[DOMNode], typing.List[LayoutTreeNode], typing.List[ComputedStyle]]])NNNN)r=  rB  r4  r   r>  r   r?  r   r@  r   r   zityping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.List[DocumentSnapshot], typing.List[str]]])"
__future__r   utilr   r   dataclassesr   enumtyping r   r	   r
   r   rm   r   r   rZ   r   r   listr   r   r   r   r   r   r   r   r   r$  r'  r6  rA  rV   rk   rS   <module>rJ     s   # * !      t
 t
 t
n 
 
 
@ 5
 5
 5
p 
 
 
& 
 
 
0<# <?T ? 
 
 
, 
 
 
 
 
 
&	: 	: Z
 Z
 Z
z t
 t
 t
n J
 J
 J
Z "
 "
 "
J :>59@D	'"2'!6' 3' )>	'
 
O'X 6:37CG>B)))2) 1) ,A	)
 '<) 
q)rk   