a
    $ñ»j§ ã                   @  sd  d dl mZ d dlZd dlmZ ddlmZmZ G dd„ deƒZ	eG dd	„ d	ƒƒZ
eG d
d„ dƒƒZG dd„ deƒZG dd„ deƒZeG dd„ dƒƒZeG dd„ dƒƒZeG dd„ dƒƒZeG dd„ dƒƒZeG dd„ dƒƒZeG dd„ dƒƒZeG dd„ dƒƒZeG dd„ dƒƒZeG d d!„ d!ƒƒZG d"d#„ d#eƒZeG d$d%„ d%ƒƒZeG d&d'„ d'ƒƒZG d(d)„ d)eƒZG d*d+„ d+eƒZeG d,d-„ d-ƒƒZeG d.d/„ d/ƒƒZG d0d1„ d1eƒZ eG d2d3„ d3ƒƒZ!dždd4d4d5d6œd7d8„Z"dŸd9d:d;d4d4d4d4d4d<d=d4d=d>d5d?œd@dA„Z#d d9d9dBd<dCdDœdEdF„Z$dGdHœdIdJ„Z%dGdHœdKdL„Z&dGdHœdMdN„Z'd¡d9d=d4d4d<d4d4d4d4d4dOd4d4d4d=d>d5dPœdQdR„Z(dSdHœdTdU„Z)dVdHœdWdX„Z*d¢dd4d4d4d4dYdZœd[d\„Z+d£d<d]d^œd_d`„Z,d¤dd=dadbœdcdd„Z-ddGdeœdfdg„Z.d9dGdhœdidj„Z/dGdHœdkdl„Z0d¥dd<d=d4d4d4d4d4d5dmœ	dndo„Z1dpdGdqœdrds„Z2dBdGdtœdudv„Z3dpdGdwœdxdy„Z4dGdHœdzd{„Z5d¦d9d<d=dGd|œd}d~„Z6d9dGdœd€d�„Z7dd‚dƒœd„d…„Z8ed†ƒeG d‡dˆ„ dˆƒƒƒZ9ed‰ƒeG dŠd‹„ d‹ƒƒƒZ:edŒƒeG d�dŽ„ dŽƒƒƒZ;ed�ƒeG d�d‘„ d‘ƒƒƒZ<ed’ƒeG d“d”„ d”ƒƒƒZ=ed•ƒeG d–d—„ d—ƒƒƒZ>ed˜ƒeG d™dš„ dšƒƒƒZ?ed›ƒeG dœd�„ d�ƒƒƒZ@dS )§é    )ÚannotationsN)Ú	dataclassé   )Úevent_classÚT_JSON_DICTc                      sB   e Zd ZdZddœdd„Zedd dœdd„ƒZ‡ fd	d
„Z‡  ZS )ÚScriptIdzUnique script identifier.Ústr©Úreturnc                 C  s   | S ©N© ©Úselfr   r   ú3E:\soccer\ml_env\Lib\site-packages\mycdp/runtime.pyÚto_json   s    zScriptId.to_json©Újsonr
   c                 C  s   | |ƒS r   r   ©Úclsr   r   r   r   Ú	from_json   s    zScriptId.from_jsonc                   s   d  tƒ  ¡ ¡S )NzScriptId({})©ÚformatÚsuperÚ__repr__r   ©Ú	__class__r   r   r      s    zScriptId.__repr__©	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úclassmethodr   r   Ú__classcell__r   r   r   r   r      s
   r   c                   @  sT   e Zd ZU dZded< dZded< dZded< d	d
œdd„Zed	d dœdd„ƒZ	dS )ÚSerializationOptionszd
    Represents options for serialization.
    Overrides `generatePreview` and `returnByValue`.
    r   ÚserializationNútyping.Optional[int]Ú	max_depthútyping.Optional[dict]Úadditional_parametersr   r	   c                 C  s<   t ƒ }| j|d< | jd ur$| j|d< | jd ur8| j|d< |S )Nr$   ÚmaxDepthÚadditionalParameters)Údictr$   r&   r(   ©r   r   r   r   r   r   -   s    




zSerializationOptions.to_jsonr   c                 C  sT   | t | d¡ƒ| dd ¡d ur,t| d¡ƒnd | dd ¡d urLt| d¡ƒnd d�S )Nr$   r)   r*   )r$   r&   r(   )r   ÚgetÚintr+   r   r   r   r   r   6   s    ÿÿözSerializationOptions.from_json)
r   r   r   r    Ú__annotations__r&   r(   r   r!   r   r   r   r   r   r#      s   
	r#   c                   @  s`   e Zd ZU dZded< dZded< dZded< dZd	ed
< ddœdd„Ze	dd dœdd„ƒZ
dS )ÚDeepSerializedValuez!Represents deep serialized value.r   Útype_Nútyping.Optional[typing.Any]Úvalueútyping.Optional[str]Ú	object_idr%   Úweak_local_object_referencer   r	   c                 C  sP   t ƒ }| j|d< | jd ur$| j|d< | jd ur8| j|d< | jd urL| j|d< |S )NÚtyper3   ÚobjectIdÚweakLocalObjectReference)r+   r1   r3   r5   r6   r,   r   r   r   r   R   s    






zDeepSerializedValue.to_jsonr   c                 C  sn   | t | d¡ƒ| dd ¡d ur&|d nd | dd ¡d urFt | d¡ƒnd | dd ¡d urft| d¡ƒnd d�S )Nr7   r3   r8   r9   )r1   r3   r5   r6   ©r   r-   r.   r   r   r   r   r   ]   s    ÿÿózDeepSerializedValue.from_json)r   r   r   r    r/   r3   r5   r6   r   r!   r   r   r   r   r   r0   G   s   
r0   c                      sB   e Zd ZdZddœdd„Zedd dœdd„ƒZ‡ fd	d
„Z‡  ZS )ÚRemoteObjectIdzUnique object identifier.r   r	   c                 C  s   | S r   r   r   r   r   r   r   t   s    zRemoteObjectId.to_jsonr   c                 C  s   | |ƒS r   r   r   r   r   r   r   w   s    zRemoteObjectId.from_jsonc                   s   d  tƒ  ¡ ¡S )NzRemoteObjectId({})r   r   r   r   r   r   {   s    zRemoteObjectId.__repr__r   r   r   r   r   r;   q   s
   r;   c                      sB   e Zd ZdZddœdd„Zedd dœdd„ƒZ‡ fd	d
„Z‡  ZS )ÚUnserializableValuezŽ
    Primitive value which cannot be JSON-stringified.
    Includes values `-0`, `NaN`, `Infinity`, `-Infinity`,
    and bigint literals.
    r   r	   c                 C  s   | S r   r   r   r   r   r   r   †   s    zUnserializableValue.to_jsonr   c                 C  s   | |ƒS r   r   r   r   r   r   r   ‰   s    zUnserializableValue.from_jsonc                   s   d  tƒ  ¡ ¡S )NzUnserializableValue({})r   r   r   r   r   r   �   s    zUnserializableValue.__repr__r   r   r   r   r   r<      s
   r<   c                   @  s¨   e Zd ZU dZded< dZded< dZded< dZded	< dZd
ed< dZ	ded< dZ
ded< dZded< dZded< dZded< ddœdd„Zedd dœdd„ƒZdS )ÚRemoteObjectz5Mirror object referencing original JavaScript object.r   r1   Nr4   ÚsubtypeÚ
class_namer2   r3   ú$typing.Optional[UnserializableValue]Úunserializable_valueÚdescriptionz$typing.Optional[DeepSerializedValue]Údeep_serialized_valueútyping.Optional[RemoteObjectId]r5   útyping.Optional[ObjectPreview]Úpreviewztyping.Optional[CustomPreview]Úcustom_previewr   r	   c                 C  sÜ   t ƒ }| j|d< | jd ur$| j|d< | jd ur8| j|d< | jd urL| j|d< | jd urd| j ¡ |d< | jd urx| j|d< | jd ur�| j ¡ |d< | j	d ur¨| j	 ¡ |d< | j
d urÀ| j
 ¡ |d	< | jd urØ| j ¡ |d
< |S )Nr7   r>   Ú	classNamer3   ÚunserializableValuerB   ÚdeepSerializedValuer8   rF   ÚcustomPreview)r+   r1   r>   r?   r3   rA   r   rB   rC   r5   rF   rG   r,   r   r   r   r   ®   s*    













zRemoteObject.to_jsonr   c                 C  s<  | t | d¡ƒ| dd ¡d ur,t | d¡ƒnd | dd ¡d urLt | d¡ƒnd | dd ¡d urf|d nd | dd ¡d urˆt | d¡¡nd | dd ¡d ur¨t | d¡ƒnd | dd ¡d urÊt | d¡¡nd | dd ¡d urìt | d¡¡nd | d	d ¡d u�rt | d	¡¡nd | d
d ¡d u�r4t | d
¡¡nd d�
S )Nr7   r>   rH   r3   rI   rB   rJ   r8   rF   rK   )
r1   r>   r?   r3   rA   rB   rC   r5   rF   rG   )r   r-   r<   r   r0   r;   ÚObjectPreviewÚCustomPreviewr   r   r   r   r   Å   s8    ÿÿÿÿÿÿÿÿÕzRemoteObject.from_json)r   r   r   r    r/   r>   r?   r3   rA   rB   rC   r5   rF   rG   r   r!   r   r   r   r   r   r=   ‘   s   
r=   c                   @  sD   e Zd ZU ded< dZded< ddœdd	„Zedd d
œdd„ƒZdS )rM   r   ÚheaderNrD   Úbody_getter_idr   r	   c                 C  s,   t ƒ }| j|d< | jd ur(| j ¡ |d< |S )NrN   ÚbodyGetterId)r+   rN   rO   r   r,   r   r   r   r     s
    

zCustomPreview.to_jsonr   c                 C  s6   | t | d¡ƒ| dd ¡d ur.t | d¡¡nd d�S )NrN   rP   )rN   rO   )r   r-   r;   r   r   r   r   r   r   	  s    ÿûzCustomPreview.from_json)r   r   r   r/   rO   r   r!   r   r   r   r   r   rM   ÷   s
   
rM   c                   @  sp   e Zd ZU dZded< ded< ded< dZd	ed
< dZd	ed< dZded< ddœdd„Ze	dd dœdd„ƒZ
dS )rL   z2Object containing abbreviated remote object value.r   r1   ÚboolÚoverflowztyping.List[PropertyPreview]Ú
propertiesNr4   r>   rB   z*typing.Optional[typing.List[EntryPreview]]Úentriesr   r	   c                 C  sx   t ƒ }| j|d< | j|d< dd„ | jD ƒ|d< | jd urB| j|d< | jd urV| j|d< | jd urtdd„ | jD ƒ|d	< |S )
Nr7   rR   c                 S  s   g | ]}|  ¡ ‘qS r   ©r   ©Ú.0Úir   r   r   Ú
<listcomp>+  ó    z)ObjectPreview.to_json.<locals>.<listcomp>rS   r>   rB   c                 S  s   g | ]}|  ¡ ‘qS r   rU   rV   r   r   r   rY   1  rZ   rT   )r+   r1   rR   rS   r>   rB   rT   r,   r   r   r   r   '  s    






zObjectPreview.to_jsonr   c              
   C  s”   | t | d¡ƒt| d¡ƒdd„ |d D ƒ| dd ¡d urHt | d¡ƒnd | dd ¡d urht | d¡ƒnd | dd ¡d urŒd	d„ |d D ƒnd d
�S )Nr7   rR   c                 S  s   g | ]}t  |¡‘qS r   )ÚPropertyPreviewr   rV   r   r   r   rY   9  s   z+ObjectPreview.from_json.<locals>.<listcomp>rS   r>   rB   rT   c                 S  s   g | ]}t  |¡‘qS r   )ÚEntryPreviewr   rV   r   r   r   rY   G  rZ   )r1   rR   rS   r>   rB   rT   )r   r-   rQ   r   r   r   r   r   4  s     ÿÿÿÿízObjectPreview.from_json)r   r   r   r    r/   r>   rB   rT   r   r!   r   r   r   r   r   rL     s   
rL   c                   @  sd   e Zd ZU ded< ded< dZded< dZded< dZded	< d
dœdd„Zed
d dœdd„ƒZ	dS )r[   r   Únamer1   Nr4   r3   rE   Úvalue_previewr>   r   r	   c                 C  s^   t ƒ }| j|d< | j|d< | jd ur.| j|d< | jd urF| j ¡ |d< | jd urZ| j|d< |S )Nr]   r7   r3   ÚvaluePreviewr>   )r+   r]   r1   r3   r^   r   r>   r,   r   r   r   r   \  s    






zPropertyPreview.to_jsonr   c              	   C  s‚   | t | d¡ƒt | d¡ƒ| dd ¡d ur8t | d¡ƒnd | dd ¡d urZt | d¡¡nd | dd ¡d urzt | d¡ƒnd d�S )Nr]   r7   r3   r_   r>   )r]   r1   r3   r^   r>   )r   r-   rL   r   r   r   r   r   r   h  s    ÿÿÿðzPropertyPreview.from_json)
r   r   r   r/   r3   r^   r>   r   r!   r   r   r   r   r   r[   N  s   
r[   c                   @  sD   e Zd ZU ded< dZded< ddœdd	„Zedd d
œdd„ƒZdS )r\   rL   r3   NrE   Úkeyr   r	   c                 C  s0   t ƒ }| j ¡ |d< | jd ur,| j ¡ |d< |S )Nr3   r`   )r+   r3   r   r`   r,   r   r   r   r   †  s
    
zEntryPreview.to_jsonr   c                 C  s8   | t  | d¡¡| dd ¡d ur0t  | d¡¡nd d�S )Nr3   r`   )r3   r`   )rL   r   r-   r   r   r   r   r   �  s    ÿûzEntryPreview.from_json)r   r   r   r/   r`   r   r!   r   r   r   r   r   r\     s
   
r\   c                   @  s    e Zd ZU dZded< ded< ded< dZded	< dZd
ed< dZded< dZded< dZ	d
ed< dZ
d
ed< dZded< ddœdd„Zedd dœdd„ƒZdS )ÚPropertyDescriptorzObject property descriptor.r   r]   rQ   ÚconfigurableÚ
enumerableNútyping.Optional[RemoteObject]r3   útyping.Optional[bool]Úwritabler-   Úset_Ú
was_thrownÚis_ownÚsymbolr   r	   c                 C  sÄ   t ƒ }| j|d< | j|d< | j|d< | jd ur<| j ¡ |d< | jd urP| j|d< | jd urh| j ¡ |d< | jd ur€| j ¡ |d< | j	d ur”| j	|d< | j
d ur¨| j
|d	< | jd urÀ| j ¡ |d
< |S )Nr]   rb   rc   r3   rf   r-   ÚsetÚ	wasThrownÚisOwnrj   )r+   r]   rb   rc   r3   r   rf   r-   rg   rh   ri   rj   r,   r   r   r   r   ¶  s&    












zPropertyDescriptor.to_jsonr   c                 C  s  | t | d¡ƒt| d¡ƒt| d¡ƒ| dd ¡d urFt | d¡¡nd | dd ¡d urft| d¡ƒnd | dd ¡d urˆt | d¡¡nd | dd ¡d urªt | d¡¡nd | dd ¡d urÊt| d¡ƒnd | d	d ¡d urêt| d	¡ƒnd | d
d ¡d u�rt | d
¡¡nd d�
S )Nr]   rb   rc   r3   rf   r-   rk   rl   rm   rj   )
r]   rb   rc   r3   rf   r-   rg   rh   ri   rj   )r   r-   rQ   r=   r   r   r   r   r   r   Ë  s4    ÿÿÿÿÿÿÿÛzPropertyDescriptor.from_json)r   r   r   r    r/   r3   rf   r-   rg   rh   ri   rj   r   r!   r   r   r   r   r   ra   ™  s   
ra   c                   @  sH   e Zd ZU dZded< dZded< ddœd	d
„Zedd dœdd„ƒZdS )ÚInternalPropertyDescriptorzk
    Object internal property descriptor.
    This property isn't normally visible in JavaScript code.
    r   r]   Nrd   r3   r   r	   c                 C  s,   t ƒ }| j|d< | jd ur(| j ¡ |d< |S )Nr]   r3   )r+   r]   r3   r   r,   r   r   r   r     s
    

z"InternalPropertyDescriptor.to_jsonr   c                 C  s6   | t | d¡ƒ| dd ¡d ur.t | d¡¡nd d�S )Nr]   r3   )r]   r3   ©r   r-   r=   r   r   r   r   r   r   	  s    ÿûz$InternalPropertyDescriptor.from_json)	r   r   r   r    r/   r3   r   r!   r   r   r   r   r   rn   ÷  s   
rn   c                   @  s`   e Zd ZU dZded< dZded< dZded< dZded< d	d
œdd„Ze	d	d dœdd„ƒZ
dS )ÚPrivatePropertyDescriptorz Object private field descriptor.r   r]   Nrd   r3   r-   rg   r   r	   c                 C  s\   t ƒ }| j|d< | jd ur(| j ¡ |d< | jd ur@| j ¡ |d< | jd urX| j ¡ |d< |S )Nr]   r3   r-   rk   )r+   r]   r3   r   r-   rg   r,   r   r   r   r   #  s    



z!PrivatePropertyDescriptor.to_jsonr   c              	   C  sz   | t | d¡ƒ| dd ¡d ur.t | d¡¡nd | dd ¡d urPt | d¡¡nd | dd ¡d urrt | d¡¡nd d�S )Nr]   r3   r-   rk   )r]   r3   r-   rg   ro   r   r   r   r   r   .  s    ÿÿÿñz#PrivatePropertyDescriptor.from_json)r   r   r   r    r/   r3   r-   rg   r   r!   r   r   r   r   r   rp     s   
rp   c                   @  sX   e Zd ZU dZdZded< dZded< dZded< d	d
œdd„Ze	d	d dœdd„ƒZ
dS )ÚCallArgumentzÆ
    Represents function call argument.
    Either remote object id `objectId`, primitive `value`,
    unserializable primitive value or neither of them (for undefined)
    should be specified.
    Nr2   r3   r@   rA   rD   r5   r   r	   c                 C  sN   t ƒ }| jd ur| j|d< | jd ur2| j ¡ |d< | jd urJ| j ¡ |d< |S )Nr3   rI   r8   )r+   r3   rA   r   r5   r,   r   r   r   r   S  s    



zCallArgument.to_jsonr   c                 C  sh   | |  dd ¡d ur|  d¡nd |  dd ¡d ur>t |  d¡¡nd |  dd ¡d ur`t |  d¡¡nd d�S )Nr3   rI   r8   )r3   rA   r5   )r-   r<   r   r;   r   r   r   r   r   ]  s    ÿÿÿòzCallArgument.from_json)r   r   r   r    r3   r/   rA   r5   r   r!   r   r   r   r   r   rq   D  s   

rq   c                      sB   e Zd ZdZddœdd„Zedd dœdd„ƒZ‡ fd	d
„Z‡  ZS )ÚExecutionContextIdzId of an execution context.r.   r	   c                 C  s   | S r   r   r   r   r   r   r   u  s    zExecutionContextId.to_jsonr   c                 C  s   | |ƒS r   r   r   r   r   r   r   x  s    zExecutionContextId.from_jsonc                   s   d  tƒ  ¡ ¡S )NzExecutionContextId({})r   r   r   r   r   r   |  s    zExecutionContextId.__repr__r   r   r   r   r   rr   r  s
   rr   c                   @  s`   e Zd ZU dZded< ded< ded< ded< dZd	ed
< ddœdd„Zedd dœdd„ƒZdS )ÚExecutionContextDescriptionz!Description of an isolated world.rr   Úid_r   Úoriginr]   Ú	unique_idNr'   Úaux_datar   r	   c                 C  sJ   t ƒ }| j ¡ |d< | j|d< | j|d< | j|d< | jd urF| j|d< |S )NÚidru   r]   ÚuniqueIdÚauxData)r+   rt   r   ru   r]   rv   rw   r,   r   r   r   r   •  s    




z#ExecutionContextDescription.to_jsonr   c              	   C  sZ   | t  | d¡¡t| d¡ƒt| d¡ƒt| d¡ƒ| dd ¡d urRt| d¡ƒnd d�S )Nrx   ru   r]   ry   rz   )rt   ru   r]   rv   rw   )rr   r   r-   r   r+   r   r   r   r   r   Ÿ  s    ÿøz%ExecutionContextDescription.from_json)	r   r   r   r    r/   rw   r   r!   r   r   r   r   r   rs   €  s   

rs   c                   @  sœ   e Zd ZU dZded< ded< ded< ded< dZd	ed
< dZded< dZded< dZded< dZ	ded< dZ
ded< ddœdd„Zedd dœdd„ƒZdS )ÚExceptionDetailszu
    Detailed information about exception (or error)
    that was thrown during script compilation or execution.
    r.   Úexception_idr   ÚtextÚline_numberÚcolumn_numberNztyping.Optional[ScriptId]Ú	script_idr4   Úurlútyping.Optional[StackTrace]Ústack_tracerd   Ú	exceptionú#typing.Optional[ExecutionContextId]Úexecution_context_idr'   Úexception_meta_datar   r	   c                 C  sº   t ƒ }| j|d< | j|d< | j|d< | j|d< | jd urF| j ¡ |d< | jd urZ| j|d< | jd urr| j ¡ |d< | j	d urŠ| j	 ¡ |d< | j
d ur¢| j
 ¡ |d	< | jd ur¶| j|d
< |S )NÚexceptionIdr}   Ú
lineNumberÚcolumnNumberÚscriptIdr�   Ú
stackTracer„   ÚexecutionContextIdÚexceptionMetaData)r+   r|   r}   r~   r   r€   r   r�   rƒ   r„   r†   r‡   r,   r   r   r   r   Í  s$    











zExceptionDetails.to_jsonr   c                 C  s   | t | d¡ƒt| d¡ƒt | d¡ƒt | d¡ƒ| dd ¡d urRt | d¡¡nd | dd ¡d urrt| d¡ƒnd | dd ¡d ur”t | d¡¡nd | dd ¡d ur¶t | d¡¡nd | d	d ¡d urØt | d	¡¡nd | d
d ¡d urøt| d
¡ƒnd d�
S )Nrˆ   r}   r‰   rŠ   r‹   r�   rŒ   r„   r�   rŽ   )
r|   r}   r~   r   r€   r�   rƒ   r„   r†   r‡   )	r.   r-   r   r   r   Ú
StackTracer=   rr   r+   r   r   r   r   r   á  s0    ÿÿÿÿÿÿßzExceptionDetails.from_json)r   r   r   r    r/   r€   r�   rƒ   r„   r†   r‡   r   r!   r   r   r   r   r   r{   ®  s   
r{   c                      sB   e Zd ZdZddœdd„Zedd dœdd„ƒZ‡ fd	d
„Z‡  ZS )Ú	Timestampz#Number of milliseconds since epoch.Úfloatr	   c                 C  s   | S r   r   r   r   r   r   r     s    zTimestamp.to_jsonr   c                 C  s   | |ƒS r   r   r   r   r   r   r     s    zTimestamp.from_jsonc                   s   d  tƒ  ¡ ¡S )NzTimestamp({})r   r   r   r   r   r     s    zTimestamp.__repr__r   r   r   r   r   r�   	  s
   r�   c                      sB   e Zd ZdZddœdd„Zedd dœdd„ƒZ‡ fd	d
„Z‡  ZS )Ú	TimeDeltazNumber of milliseconds.r‘   r	   c                 C  s   | S r   r   r   r   r   r   r     s    zTimeDelta.to_jsonr   c                 C  s   | |ƒS r   r   r   r   r   r   r     s    zTimeDelta.from_jsonc                   s   d  tƒ  ¡ ¡S )NzTimeDelta({})r   r   r   r   r   r   !  s    zTimeDelta.__repr__r   r   r   r   r   r’     s
   r’   c                   @  s\   e Zd ZU dZded< ded< ded< ded< ded	< d
dœdd„Zed
d dœdd„ƒZdS )Ú	CallFramez.Stack entry for runtime errors and assertions.r   Úfunction_namer   r€   r�   r.   r~   r   r   r	   c                 C  s@   t ƒ }| j|d< | j ¡ |d< | j|d< | j|d< | j|d< |S )NÚfunctionNamer‹   r�   r‰   rŠ   )r+   r”   r€   r   r�   r~   r   r,   r   r   r   r   3  s    



zCallFrame.to_jsonr   c              	   C  sF   | t | d¡ƒt | d¡¡t | d¡ƒt| d¡ƒt| d¡ƒd�S )Nr•   r‹   r�   r‰   rŠ   )r”   r€   r�   r~   r   )r   r-   r   r   r.   r   r   r   r   r   <  s    ûzCallFrame.from_jsonN)r   r   r   r    r/   r   r!   r   r   r   r   r   r“   %  s   
	r“   c                   @  s`   e Zd ZU dZded< dZded< dZded< dZd	ed
< ddœdd„Ze	dd dœdd„ƒZ
dS )r�   z-Call frames for assertions or error messages.ztyping.List[CallFrame]Úcall_framesNr4   rB   r‚   Úparentztyping.Optional[StackTraceId]Ú	parent_idr   r	   c                 C  sb   t ƒ }dd„ | jD ƒ|d< | jd ur.| j|d< | jd urF| j ¡ |d< | jd ur^| j ¡ |d< |S )Nc                 S  s   g | ]}|  ¡ ‘qS r   rU   rV   r   r   r   rY   Y  rZ   z&StackTrace.to_json.<locals>.<listcomp>Ú
callFramesrB   r—   ÚparentId)r+   r–   rB   r—   r   r˜   r,   r   r   r   r   W  s    



zStackTrace.to_jsonr   c              	   C  s|   | dd„ |d D ƒ|  dd ¡d ur0t|  d¡ƒnd |  dd ¡d urRt |  d¡¡nd |  dd ¡d urtt |  d¡¡nd d�S )Nc                 S  s   g | ]}t  |¡‘qS r   )r“   r   rV   r   r   r   rY   e  rZ   z(StackTrace.from_json.<locals>.<listcomp>r™   rB   r—   rš   )r–   rB   r—   r˜   )r-   r   r�   r   ÚStackTraceIdr   r   r   r   r   b  s    ÿÿÿñzStackTrace.from_json)r   r   r   r    r/   rB   r—   r˜   r   r!   r   r   r   r   r   r�   G  s   
r�   c                      sB   e Zd ZdZddœdd„Zedd dœdd„ƒZ‡ fd	d
„Z‡  ZS )ÚUniqueDebuggerIdz&Unique identifier of current debugger.r   r	   c                 C  s   | S r   r   r   r   r   r   r   {  s    zUniqueDebuggerId.to_jsonr   c                 C  s   | |ƒS r   r   r   r   r   r   r   ~  s    zUniqueDebuggerId.from_jsonc                   s   d  tƒ  ¡ ¡S )NzUniqueDebuggerId({})r   r   r   r   r   r   ‚  s    zUniqueDebuggerId.__repr__r   r   r   r   r   rœ   x  s
   rœ   c                   @  sH   e Zd ZU dZded< dZded< ddœd	d
„Zedd dœdd„ƒZdS )r›   zÑ
    If `debuggerId` is set stack trace comes from another debugger
    and can be resolved there. This allows to track cross-debugger calls.
    See `Runtime.StackTrace` and `Debugger.paused` for usages.
    r   rt   Nz!typing.Optional[UniqueDebuggerId]Údebugger_idr   r	   c                 C  s,   t ƒ }| j|d< | jd ur(| j ¡ |d< |S )Nrx   Ú
debuggerId)r+   rt   r�   r   r,   r   r   r   r   �  s
    

zStackTraceId.to_jsonr   c                 C  s6   | t | d¡ƒ| dd ¡d ur.t | d¡¡nd d�S )Nrx   rž   )rt   r�   )r   r-   rœ   r   r   r   r   r   r   —  s    ÿûzStackTraceId.from_json)	r   r   r   r    r/   r�   r   r!   r   r   r   r   r   r›   †  s   
r›   re   zityping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[RemoteObject, typing.Optional[ExceptionDetails]]])Úpromise_object_idÚreturn_by_valueÚgenerate_previewr
   c                 c  sv   t ƒ }|  ¡ |d< |dur"||d< |dur2||d< d|dœ}|V }t | d¡¡| dd¡durpt | d¡¡ndfS )	a\  
    Add handler to promise with given promise object id.
    :param promise_object_id: Identifier of the promise.
    :param return_by_value: *(Optional)*
     Whether the result is expected to be a JSON object
     that should be sent by value.
    :param generate_preview: *(Optional)*
     Whether preview should be generated for the result.
    :returns: A tuple with the following items:
        0. **result** - Promise result.
         Will contain rejected value if promise was rejected.
        1. **exceptionDetails** - *(Optional)*
         Exception details if stack strace is available.
    ZpromiseObjectIdNÚreturnByValueÚgeneratePreviewzRuntime.awaitPromise©ÚmethodÚparamsÚresultÚexceptionDetails©r+   r   r=   r   r-   r{   )rŸ   r    r¡   r¦   Úcmd_dictr   r   r   r   Úawait_promise£  s    þÿûr«   r   rD   z*typing.Optional[typing.List[CallArgument]]r…   r4   z%typing.Optional[SerializationOptions])Úfunction_declarationr5   Ú	argumentsÚsilentr    r¡   Úuser_gesturer«   r†   Úobject_groupÚthrow_on_side_effectÚunique_context_idÚserialization_optionsr
   c                 c  s*  t ƒ }| |d< |dur"| ¡ |d< |dur<dd„ |D ƒ|d< |durL||d< |dur\||d< |durl||d	< |dur|||d
< |durŒ||d< |dur | ¡ |d< |	dur°|	|d< |
durÀ|
|d< |durÐ||d< |durä| ¡ |d< d|dœ}|V }t | d¡¡| dd¡du�r$t | d¡¡ndfS )a
  
    Calls function with given declaration on the given object.
    Object group of the result is inherited from the target object.
    :param function_declaration: Declaration of the function to call.
    :param object_id: *(Optional)*
     Identifier of the object to call function on.
     Either objectId or executionContextId should be specified.
    :param arguments: *(Optional)*
     Call arguments. All call arguments must belong to the same JavaScript
     world as the target object.
    :param silent: *(Optional)*
     In silent mode exceptions thrown during evaluation are not reported
     and do not pause execution. Overrides `setPauseOnException` state.
    :param return_by_value: *(Optional)*
     Whether the result is expected to be a JSON object which should be
     sent by value. Can be overriden by `serializationOptions`.
    :param generate_preview: **(EXPERIMENTAL)** *(Optional)*
     Whether preview should be generated for the result.
    :param user_gesture: *(Optional)*
     Whether execution should be treated as initiated by user in the UI.
    :param await_promise: *(Optional)*
     Whether execution should `await` for resulting value and return
     once awaited promise is resolved.
    :param execution_context_id: *(Optional)*
     Specifies execution context which global object will be used to call
     function on. Either executionContextId or objectId should be specified.
    :param object_group: *(Optional)*
     Symbolic group name that can be used to release multiple objects.
     If objectGroup is not specified and objectId is,
     objectGroup will be inherited from object.
    :param throw_on_side_effect: **(EXPERIMENTAL)** *(Optional)*
     Whether to throw an exception if side effect cannot be ruled out
     during evaluation.
    :param unique_context_id: **(EXPERIMENTAL)** *(Optional)*
     An alternative way to specify the execution context to call function on.
     Compared to contextId that may be reused across processes,
     this is guaranteed to be system-unique, so it can be used
     to prevent accidental function call in context different than intended
     (e.g. as a result of navigation across process boundaries).
     This is mutually exclusive with `executionContextId`.
    :param serialization_options: **(EXPERIMENTAL)** *(Optional)*
     Specifies the result serialization.
     If provided, overrides `generatePreview` and `returnByValue`.
    :returns: A tuple with the following items:
        0. **result** - Call result.
        1. **exceptionDetails** - *(Optional)* Exception details.
    ZfunctionDeclarationNr8   c                 S  s   g | ]}|  ¡ ‘qS r   rU   rV   r   r   r   rY     rZ   z$call_function_on.<locals>.<listcomp>r­   r®   r¢   r£   ÚuserGestureÚawaitPromiser�   ÚobjectGroupÚthrowOnSideEffectÚuniqueContextIdÚserializationOptionszRuntime.callFunctionOnr¤   r§   r¨   r©   )r¬   r5   r­   r®   r    r¡   r¯   r«   r†   r°   r±   r²   r³   r¦   rª   r   r   r   r   Úcall_function_onÏ  sF    Bþÿûrº   rQ   zvtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.Optional[ScriptId], typing.Optional[ExceptionDetails]]])Ú
expressionÚ
source_urlÚpersist_scriptr†   r
   c                 c  sŠ   t ƒ }| |d< ||d< ||d< |dur2| ¡ |d< d|dœ}|V }| dd¡durbt | d¡¡nd| d	d¡dur„t | d	¡¡ndfS )
aj  
    Compiles expression.
    :param expression: Expression to compile.
    :param source_url: Source url to be set for the script.
    :param persist_script:
     Specifies whether the compiled script should be persisted.
    :param execution_context_id: *(Optional)*
     Specifies in which execution context to perform script run.
     If the parameter is omitted the evaluation will be performed
     in the context of the inspected page.
    :returns: A tuple with the following items:
        0. **scriptId** - *(Optional)* Id of the script.
        1. **exceptionDetails** - *(Optional)* Exception details.
    r»   Z	sourceURLZpersistScriptNr�   zRuntime.compileScriptr¤   r‹   r¨   )r+   r   r-   r   r   r{   )r»   r¼   r½   r†   r¦   rª   r   r   r   r   Úcompile_script:  s"    þÿÿ÷r¾   z0typing.Generator[T_JSON_DICT, T_JSON_DICT, None]r	   c                  c  s   ddi} | V }dS )z2Disables reporting of execution contexts creation.r¥   zRuntime.disableNr   ©rª   r   r   r   r   Údisablek  s    ÿrÀ   c                  c  s   ddi} | V }dS )z4Discards collected exceptions and console API calls.r¥   zRuntime.discardConsoleEntriesNr   r¿   r   r   r   Údiscard_console_entriess  s    ÿrÁ   c                  c  s   ddi} | V }dS )zÛ
    Enables reporting of execution contexts creation
    by means of `executionContextCreated` event.
    When the reporting gets enabled the event will be sent immediately
    for each existing execution context.
    r¥   zRuntime.enableNr   r¿   r   r   r   Úenable}  s    ÿrÂ   ztyping.Optional[TimeDelta])r»   r°   Úinclude_command_line_apir®   Ú
context_idr    r¡   r¯   r«   r±   ÚtimeoutÚdisable_breaksÚ	repl_modeÚ allow_unsafe_eval_blocked_by_cspr²   r³   r
   c                 c  sR  t ƒ }| |d< |dur||d< |dur.||d< |dur>||d< |durR| ¡ |d< |durb||d< |durr||d< |dur‚||d	< |dur’||d
< |	dur¢|	|d< |
dur¶|
 ¡ |d< |durÆ||d< |durÖ||d< |duræ||d< |durö||d< |du�r| ¡ |d< d|dœ}|V }t | d¡¡| dd¡du�rLt | d¡¡ndfS )a¡  
    Evaluates expression on global object.
    :param expression: Expression to evaluate.
    :param object_group: *(Optional)*
     Symbolic group name that can be used to release multiple objects.
    :param include_command_line_api: *(Optional)*
     Determines whether Command Line API should be available
     during the evaluation.
    :param silent: *(Optional)*
     In silent mode exceptions thrown during evaluation are not reported
     and do not pause execution. Overrides `setPauseOnException` state.
    :param context_id: *(Optional)*
     Specifies in which execution context to perform evaluation.
     If the parameter is omitted the evaluation will be performed
     in the context of the inspected page.
     This is mutually exclusive with `uniqueContextId`,
     which offers an alternative way to identify the execution context
     that is more reliable in a multi-process environment.
    :param return_by_value: *(Optional)*
     Whether the result is expected to be a JSON object
     that should be sent by value.
    :param generate_preview: **(EXPERIMENTAL)** *(Optional)*
     Whether preview should be generated for the result.
    :param user_gesture: *(Optional)*
     Whether execution should be treated as initiated by user in the UI.
    :param await_promise: *(Optional)*
     Whether execution should `await` for resulting value
     and return once awaited promise is resolved.
    :param throw_on_side_effect: **(EXPERIMENTAL)** *(Optional)*
     Whether to throw an exception if side effect cannot be ruled out
     during evaluation. This implies `disableBreaks` below.
    :param timeout: **(EXPERIMENTAL)** *(Optional)*
     Terminate execution after timing out (number of milliseconds).
    :param disable_breaks: **(EXPERIMENTAL)** *(Optional)*
     Disable breakpoints during execution.
    :param repl_mode: **(EXPERIMENTAL)** *(Optional)*
     Setting this flag to true enables `let` re-declaration
     and top-level `await`. Note that `let` variables can only be
     re-declared if they originate from `replMode` themselves.
    :param allow_unsafe_eval_blocked_by_csp: **(EXPERIMENTAL)** *(Optional)*
     The Content Security Policy (CSP) for the target might block 'unsafe-eval'
     which includes eval(), Function(), setTimeout() and setInterval()
     when called with non-callable arguments.
     This flag bypasses CSP for this evaluation and allows unsafe-eval.
     Defaults to true.
    :param unique_context_id: **(EXPERIMENTAL)** *(Optional)*
     An alternative way to specify the execution context to evaluate in.
     Compared to contextId that may be reused across processes,
     this is guaranteed to be system-unique, so it can be used to prevent
     accidental evaluation of the expression in context different than
     intended (e.g. as a result of navigation across process boundaries).
     This is mutually exclusive with `contextId`.
    :param serialization_options: *(Optional)*
     Specifies the result serialization.
     If provided, overrides `generatePreview` and `returnByValue`.
    :returns: A tuple with the following items:
        0. **result** - Evaluation result.
        1. **exceptionDetails** - *(Optional)* Exception details.
    r»   Nr¶   ÚincludeCommandLineAPIr®   Z	contextIdr¢   r£   r´   rµ   r·   rÅ   ZdisableBreaksZreplModeZallowUnsafeEvalBlockedByCSPr¸   r¹   zRuntime.evaluater¤   r§   r¨   r©   )r»   r°   rÃ   r®   rÄ   r    r¡   r¯   r«   r±   rÅ   rÆ   rÇ   rÈ   r²   r³   r¦   rª   r   r   r   r   ÚevaluateŠ  sT    Qÿ
þÿûrÊ   z/typing.Generator[T_JSON_DICT, T_JSON_DICT, str]c                  c  s   ddi} | V }t | d¡ƒS )zT
    Returns the isolate id.
    **EXPERIMENTAL**
    :returns: The isolate id.
    r¥   zRuntime.getIsolateIdrx   )r   r-   r¿   r   r   r   Úget_isolate_id  s    ÿrË   zFtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[float, float]]c                  c  s*   ddi} | V }t | d¡ƒt | d¡ƒfS )a<  
    Returns the JavaScript heap usage.
    It is the total usage of the corresponding
    isolate not scoped to a particular Runtime.
    **EXPERIMENTAL**
    :returns: A tuple with the following items:
        0. **usedSize** - Used heap size in bytes.
        1. **totalSize** - Allocated heap size in bytes.
    r¥   zRuntime.getHeapUsageZusedSizeZ	totalSize)r‘   r-   r¿   r   r   r   Úget_heap_usage  s    ÿrÌ   zïtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Tuple[typing.List[PropertyDescriptor], typing.Optional[typing.List[InternalPropertyDescriptor]], typing.Optional[typing.List[PrivatePropertyDescriptor]], typing.Optional[ExceptionDetails]]])r5   Úown_propertiesÚaccessor_properties_onlyr¡   Únon_indexed_properties_onlyr
   c                 c  sà   t ƒ }|  ¡ |d< |dur"||d< |dur2||d< |durB||d< |durR||d< d|dœ}|V }d	d
„ |d D ƒ| dd¡dur”dd
„ |d D ƒnd| dd¡dur¸dd
„ |d D ƒnd| dd¡durÚt | d¡¡ndfS )aU  
    Returns properties of a given object.
    Object group of the result is inherited from the target object.
    :param object_id: Identifier of the object to return properties for.
    :param own_properties: *(Optional)*
     If true, returns properties belonging only to the element itself,
     not to its prototype chain.
    :param accessor_properties_only: **(EXPERIMENTAL)** *(Optional)*
     If true, returns accessor properties (with getter/setter) only;
     internal properties are not returned either.
    :param generate_preview: **(EXPERIMENTAL)** *(Optional)*
     Whether preview should be generated for the results.
    :param non_indexed_properties_only: **(EXPERIMENTAL)** *(Optional)*
     If true, returns non-indexed properties only.
    :returns: A tuple with the following items:
        0. **result** - Object properties.
        1. **internalProperties** - *(Optional)*
         Internal object properties (only of the element itself).
        2. **privateProperties** - *(Optional)* Object private properties.
        3. **exceptionDetails** - *(Optional)* Exception details.
    r8   NZownPropertiesZaccessorPropertiesOnlyr£   ZnonIndexedPropertiesOnlyzRuntime.getPropertiesr¤   c                 S  s   g | ]}t  |¡‘qS r   )ra   r   rV   r   r   r   rY   a  rZ   z"get_properties.<locals>.<listcomp>r§   ZinternalPropertiesc                 S  s   g | ]}t  |¡‘qS r   )rn   r   rV   r   r   r   rY   c  s   ÿZprivatePropertiesc                 S  s   g | ]}t  |¡‘qS r   )rp   r   rV   r   r   r   rY   k  s   ÿr¨   ©r+   r   r-   r{   r   )r5   rÍ   rÎ   r¡   rÏ   r¦   rª   r   r   r   r   Úget_properties,  s:    %þüþüþÿërÑ   z<typing.Generator[T_JSON_DICT, T_JSON_DICT, typing.List[str]])r†   r
   c                 c  s<   t ƒ }| dur|  ¡ |d< d|dœ}|V }dd„ |d D ƒS )zÁ
    Returns all let, const and class variables from global scope.
    :param execution_context_id: *(Optional)*
     Specifies in which execution context to lookup global scope variables.
    Nr�   zRuntime.globalLexicalScopeNamesr¤   c                 S  s   g | ]}t |ƒ‘qS r   )r   rV   r   r   r   rY   Š  rZ   z.global_lexical_scope_names.<locals>.<listcomp>Únames©r+   r   )r†   r¦   rª   r   r   r   r   Úglobal_lexical_scope_namesz  s    þrÔ   z8typing.Generator[T_JSON_DICT, T_JSON_DICT, RemoteObject])Úprototype_object_idr°   r
   c                 c  sB   t ƒ }|  ¡ |d< |dur"||d< d|dœ}|V }t | d¡¡S )zç
    :param prototype_object_id:
     Identifier of the prototype to return objects for.
    :param object_group: *(Optional)*
     Symbolic group name that can be used to release the results.
    :returns: Array with objects.
    ZprototypeObjectIdNr¶   zRuntime.queryObjectsr¤   Úobjects)r+   r   r=   r   r-   )rÕ   r°   r¦   rª   r   r   r   r   Úquery_objects�  s    þr×   )r5   r
   c                 c  s&   t ƒ }|  ¡ |d< d|dœ}|V }dS )zj
    Releases remote object with given id.
    :param object_id: Identifier of the object to release.
    r8   zRuntime.releaseObjectr¤   NrÓ   )r5   r¦   rª   r   r   r   r   Úrelease_object¤  s    þrØ   )r°   r
   c                 c  s"   t ƒ }| |d< d|dœ}|V }dS )zx
    Releases all remote objects that belong to a given group.
    :param object_group: Symbolic object group name.
    r¶   zRuntime.releaseObjectGroupr¤   N©r+   )r°   r¦   rª   r   r   r   r   Úrelease_object_group´  s    þrÚ   c                  c  s   ddi} | V }dS )zBTells inspected instance to run if waiting for debugger to attach.r¥   zRuntime.runIfWaitingForDebuggerNr   r¿   r   r   r   Úrun_if_waiting_for_debuggerÄ  s    ÿrÛ   )	r€   r†   r°   r®   rÃ   r    r¡   r«   r
   c                 c  sÊ   t ƒ }|  ¡ |d< |dur&| ¡ |d< |dur6||d< |durF||d< |durV||d< |durf||d< |durv||d< |dur†||d	< d
|dœ}	|	V }
t |
 d¡¡|
 dd¡durÄt |
 d¡¡ndfS )a  
    Runs script with given id in a given context.
    :param script_id: Id of the script to run.
    :param execution_context_id: *(Optional)*
     Specifies in which execution context to perform script run.
     If the parameter is omitted the evaluation will be performed
     in the context of the inspected page.
    :param object_group: *(Optional)*
     Symbolic group name that can be used to release multiple objects.
    :param silent: *(Optional)*
     In silent mode exceptions thrown during evaluation
     are not reported and do not pause execution.
     Overrides `setPauseOnException` state.
    :param include_command_line_api: *(Optional)*
     Determines whether Command Line API should be available
     during the evaluation.
    :param return_by_value: *(Optional)*
     Whether the result is expected to be a JSON object
     which should be sent by value.
    :param generate_preview: *(Optional)*
     Whether preview should be generated for the result.
    :param await_promise: *(Optional)*
     Whether execution should `await` for resulting value
     and return once awaited promise is resolved.
    :returns: A tuple with the following items:
        0. **result** - Run result.
        1. **exceptionDetails** - *(Optional)* Exception details.
    r‹   Nr�   r¶   r®   rÉ   r¢   r£   rµ   zRuntime.runScriptr¤   r§   r¨   r©   )r€   r†   r°   r®   rÃ   r    r¡   r«   r¦   rª   r   r   r   r   Ú
run_scriptÎ  s2    *þÿûrÜ   r.   )r&   r
   c                 c  s"   t ƒ }| |d< d|dœ}|V }dS )z¼
    Enables or disables async call stacks tracking.
    :param max_depth: Maximum depth of async call stacks.
     Setting to `0` (default) will disable collecting async call stacks.
    r)   zRuntime.setAsyncCallStackDepthr¤   NrÙ   )r&   r¦   rª   r   r   r   r   Úset_async_call_stack_depth  s    þrÝ   )Úenabledr
   c                 c  s"   t ƒ }| |d< d|dœ}|V }dS )z.
    **EXPERIMENTAL**
    :param enabled:
    rÞ   z'Runtime.setCustomObjectFormatterEnabledr¤   NrÙ   )rÞ   r¦   rª   r   r   r   r   Ú#set_custom_object_formatter_enabled(  s    þrß   )Úsizer
   c                 c  s"   t ƒ }| |d< d|dœ}|V }dS )z+
    **EXPERIMENTAL**
    :param size:
    rà   z$Runtime.setMaxCallStackSizeToCapturer¤   NrÙ   )rà   r¦   rª   r   r   r   r   Ú"set_max_call_stack_size_to_capture8  s    þrá   c                  c  s   ddi} | V }dS )z™
    Terminate current or next JavaScript execution.
    Will cancel the termination when the outer-most script execution ends.
    **EXPERIMENTAL**
    r¥   zRuntime.terminateExecutionNr   r¿   r   r   r   Úterminate_executionH  s    ÿrâ   )r]   r†   Úexecution_context_namer
   c                 c  sF   t ƒ }| |d< |dur"| ¡ |d< |dur2||d< d|dœ}|V }dS )aN  
    If executionContextId is empty, adds binding with the given name on the
    global objects of all inspected contexts, including those created later,
    bindings survive reloads.
    Binding function takes exactly one argument,
    this argument should be string, in case of any other input,
    function throws an exception.
    Each binding function call produces Runtime.bindingCalled notification.
    :param name:
    :param execution_context_id: **(DEPRECATED)** **(EXPERIMENTAL)**
     *(Optional)* If specified, the binding would only be exposed to the
     specified execution context. If omitted and `executionContextName` is
     not set, the binding is exposed to all execution contexts of the target.
     This parameter is mutually exclusive with `executionContextName`.
     Deprecated in favor of `executionContextName` due to an unclear use case
     and bugs in implementation (crbug.com/1169639).
     `executionContextId` will be removed in the future.
    :param execution_context_name: *(Optional)*
     If specified, the binding is exposed to the executionContext
     with matching name, even for contexts created after the binding is added.
     See also `ExecutionContext.name` and `worldName` parameters to
     `Page.addScriptToEvaluateOnNewDocument`.
     This parameter is mutually exclusive with `executionContextId`.
    r]   Nr�   ZexecutionContextNamezRuntime.addBindingr¤   rÓ   )r]   r†   rã   r¦   rª   r   r   r   r   Úadd_bindingT  s    þrä   )r]   r
   c                 c  s"   t ƒ }| |d< d|dœ}|V }dS )z®
    This method does not remove binding function from global object but
    unsubscribes current runtime agent from Runtime.bindingCalled notifications
    :param name:
    r]   zRuntime.removeBindingr¤   NrÙ   )r]   r¦   rª   r   r   r   r   Úremove_binding~  s    þrå   zMtyping.Generator[T_JSON_DICT, T_JSON_DICT, typing.Optional[ExceptionDetails]])Úerror_object_idr
   c                 c  sF   t ƒ }|  ¡ |d< d|dœ}|V }| dd¡durBt | d¡¡S dS )a‰  
    This method tries to lookup and populate exception details for a
    JavaScript Error object.
    Note that the stackTrace portion of the resulting exceptionDetails will
    only be populated if the Runtime domain was enabled at the time when the
    Error was thrown.
    **EXPERIMENTAL**
    :param error_object_id:
     The error object for which to resolve the exception details.
    ZerrorObjectIdzRuntime.getExceptionDetailsr¤   r¨   NrÐ   )ræ   r¦   rª   r   r   r   r   Úget_exception_details�  s    þÿýrç   zRuntime.bindingCalledc                   @  s>   e Zd ZU dZded< ded< ded< edd dœd	d
„ƒZdS )ÚBindingCalledzX
    **EXPERIMENTAL**
    Notification is issued every time when binding is called.
    r   r]   Úpayloadrr   r†   r   r   c                 C  s.   | t | d¡ƒt | d¡ƒt | d¡¡d�S )Nr]   ré   r�   )r]   ré   r†   )r   r-   rr   r   r   r   r   r   r   ¸  s    ÿýzBindingCalled.from_jsonN©r   r   r   r    r/   r!   r   r   r   r   r   rè   ¬  s   
rè   zRuntime.consoleAPICalledc                   @  sV   e Zd ZU dZded< ded< ded< ded	< d
ed< ded< edd dœdd„ƒZdS )ÚConsoleAPICalledz#Issued when console API was called.r   r1   ztyping.List[RemoteObject]Úargsrr   r†   r�   Ú	timestampr‚   rƒ   r4   Úcontextr   r   c              
   C  s‚   | t | d¡ƒdd„ |d D ƒt | d¡¡t | d¡¡| dd ¡d urZt | d¡¡nd | dd ¡d urzt | d¡ƒnd d	�S )
Nr7   c                 S  s   g | ]}t  |¡‘qS r   )r=   r   rV   r   r   r   rY   ß  rZ   z.ConsoleAPICalled.from_json.<locals>.<listcomp>rì   r�   rí   rŒ   rî   )r1   rì   r†   rí   rƒ   rî   )r   r-   rr   r   r�   r�   r   r   r   r   r   Û  s    ÿÿÿñzConsoleAPICalled.from_jsonNrê   r   r   r   r   rë   Ã  s   
rë   zRuntime.exceptionRevokedc                   @  s6   e Zd ZU dZded< ded< edd dœdd	„ƒZd
S )ÚExceptionRevokedz,Issued when unhandled exception was revoked.r   Úreasonr.   r|   r   r   c                 C  s    | t | d¡ƒt| d¡ƒd�S )Nrð   rˆ   )rð   r|   r:   r   r   r   r   r   ú  s    þzExceptionRevoked.from_jsonNrê   r   r   r   r   rï   ñ  s
   
rï   zRuntime.exceptionThrownc                   @  s6   e Zd ZU dZded< ded< edd dœdd	„ƒZd
S )ÚExceptionThrownz/Issued when exception was thrown and unhandled.r�   rí   r{   Úexception_detailsr   r   c                 C  s$   | t  | d¡¡t | d¡¡d�S )Nrí   r¨   )rí   rò   )r�   r   r-   r{   r   r   r   r   r   
  s    ÿþzExceptionThrown.from_jsonNrê   r   r   r   r   rñ     s
   
rñ   zRuntime.executionContextCreatedc                   @  s.   e Zd ZU dZded< edd dœdd„ƒZdS )	ÚExecutionContextCreatedz-Issued when new execution context is created.rs   rî   r   r   c                 C  s   | t  | d¡¡d�S )Nrî   )rî   )rs   r   r-   r   r   r   r   r     s    ÿz!ExecutionContextCreated.from_jsonNrê   r   r   r   r   ró     s   
ró   z!Runtime.executionContextDestroyedc                   @  s6   e Zd ZU dZded< ded< edd dœdd	„ƒZd
S )ÚExecutionContextDestroyedz+Issued when execution context is destroyed.rr   r†   r   Úexecution_context_unique_idr   r   c                 C  s"   | t  | d¡¡t| d¡ƒd�S )Nr�   ZexecutionContextUniqueId)r†   rõ   )rr   r   r-   r   r   r   r   r   r   +  s    ÿÿüz#ExecutionContextDestroyed.from_jsonNrê   r   r   r   r   rô   "  s
   
rô   z Runtime.executionContextsClearedc                   @  s$   e Zd ZdZedd dœdd„ƒZdS )ÚExecutionContextsClearedz9Issued when all executionContexts were cleared in browserr   r   c                 C  s   | ƒ S r   r   r   r   r   r   r   <  s    z"ExecutionContextsCleared.from_jsonN)r   r   r   r    r!   r   r   r   r   r   rö   7  s   rö   zRuntime.inspectRequestedc                   @  s>   e Zd ZU dZded< ded< ded< edd d	œd
d„ƒZdS )ÚInspectRequestedzs
    Issued when object should be inspected
    (for example, as a result of inspect() command line API call).
    r=   Úobject_r+   Úhintsr…   r†   r   r   c                 C  sD   | t  | d¡¡t| d¡ƒ| dd ¡d ur<t | d¡¡nd d�S )NÚobjectrù   r�   )rø   rù   r†   )r=   r   r-   r+   rr   r   r   r   r   r   M  s    ÿúzInspectRequested.from_jsonNrê   r   r   r   r   r÷   A  s   
r÷   )NN)NNNNNNNNNNNN)N)NNNNNNNNNNNNNNN)NNNN)N)N)NNNNNNN)NN)AÚ
__future__r   ÚtypingÚdataclassesr   Úutilr   r   r   r   r#   r0   r;   r<   r=   rM   rL   r[   r\   ra   rn   rp   rq   r.   rr   rs   r{   r‘   r�   r’   r“   r�   rœ   r›   r«   rº   r¾   rÀ   rÁ   rÂ   rÊ   rË   rÌ   rÑ   rÔ   r×   rØ   rÚ   rÛ   rÜ   rÝ   rß   rá   râ   rä   rå   rç   rè   rë   rï   rñ   ró   rô   rö   r÷   r   r   r   r   Ú<module>   s  *)e80].--Z!0  ý.            ó*o ü1
               ð0     ûO ÿ þ       ø I  ý*,