1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
U
[±dßã@sÒddlmZddlmZmZddlmZddlZddlZddl    m
Z
ddl    m Z ddl    m Z eGd    d
„d
ƒƒZ eGd d „d ƒƒZeGd d„dƒƒZeGdd„dƒƒZdddœdd„ZedƒeGdd„dƒƒƒZdS)é)Ú annotationsé)Ú event_classÚ T_JSON_DICT)Ú    dataclassN)Údom)Únetwork)Úpagec@sbeZdZUdZded<ded<ded<dZded    <dZded
<dZd ed <d d„Ze    dd„ƒZ
dS)ÚLargestContentfulPaintz]
    See https://github.com/WICG/LargestContentfulPaint and largest_contentful_paint.idl
    únetwork.TimeSinceEpochÚ render_timeÚ    load_timeÚfloatÚsizeNztyping.Optional[str]Ú
element_idÚurlú"typing.Optional[dom.BackendNodeId]Únode_idcCsptƒ}|j ¡|d<|j ¡|d<|j|d<|jdk    r@|j|d<|jdk    rT|j|d<|jdk    rl|j ¡|d<|S)NÚ
renderTimeÚloadTimerÚ    elementIdrÚnodeId)Údictr Úto_jsonr rrrr©ÚselfÚjson©rúsd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\selenium/webdriver/common/devtools/v111/performance_timeline.pyr%s
 
 
 
 
 
zLargestContentfulPaint.to_jsonc
Cst|tj |d¡tj |d¡t|dƒd|kr<t|dƒndd|krRt|dƒndd|krltj |d¡nddS)Nrrrrrr)r r rrrr)rÚTimeSinceEpochÚ    from_jsonrÚstrrÚ BackendNodeId©Úclsrrrrr 2s
úz LargestContentfulPaint.from_json) Ú__name__Ú
__module__Ú __qualname__Ú__doc__Ú__annotations__rrrrÚ classmethodr rrrrr
s
    r
c@s>eZdZUded<ded<dZded<dd„Zed    d
„ƒZdS) ÚLayoutShiftAttributionzdom.RectÚ previous_rectÚ current_rectNrrcCs>tƒ}|j ¡|d<|j ¡|d<|jdk    r:|j ¡|d<|S)NÚ previousRectÚ currentRectr)rr,rr-rrrrrrFs 
zLayoutShiftAttribution.to_jsoncCs>|tj |d¡tj |d¡d|kr6tj |d¡nddS)Nr.r/r)r,r-r)rZRectr r"r#rrrr Ns
ýz LayoutShiftAttribution.from_json)r%r&r'r)rrr*r rrrrr+>s
 r+c@sFeZdZUdZded<ded<ded<ded    <d
d „Zed d „ƒZdS)Ú LayoutShiftz^
    See https://wicg.github.io/layout-instability/#sec-layout-shift and layout_shift.idl
    rÚvalueÚboolÚhad_recent_inputr Úlast_input_timez#typing.List[LayoutShiftAttribution]ÚsourcescCs@tƒ}|j|d<|j|d<|j ¡|d<dd„|jDƒ|d<|S)Nr1ÚhadRecentInputÚ lastInputTimecSsg|] }| ¡‘qSr)r©Ú.0ÚirrrÚ
<listcomp>jsz'LayoutShift.to_json.<locals>.<listcomp>r5)rr1r3r4rr5rrrrres 
 
zLayoutShift.to_jsoncCs:|t|dƒt|dƒtj |d¡dd„|dDƒdS)Nr1r6r7cSsg|]}t |¡‘qSr)r+r r8rrrr;ssz)LayoutShift.from_json.<locals>.<listcomp>r5)r1r3r4r5)rr2rrr r#rrrr ms 
 
üzLayoutShift.from_jsonN)r%r&r'r(r)rr*r rrrrr0Ws
r0c@sfeZdZUded<ded<ded<ded<dZd    ed
<dZd ed <dZd ed<dd„Zedd„ƒZ    dS)Ú TimelineEventz page.FrameIdÚframe_idr!Útype_Únamer ÚtimeNztyping.Optional[float]Údurationz'typing.Optional[LargestContentfulPaint]Ú lcp_detailsztyping.Optional[LayoutShift]Úlayout_shift_detailscCs~tƒ}|j ¡|d<|j|d<|j|d<|j ¡|d<|jdk    rJ|j|d<|jdk    rb|j ¡|d<|jdk    rz|j ¡|d<|S)NÚframeIdÚtyper?r@rAÚ
lcpDetailsÚlayoutShiftDetails)    rr=rr>r?r@rArBrCrrrrrs
 
 
 
 
 
zTimelineEvent.to_jsonc Cs~|tj |d¡t|dƒt|dƒtj |d¡d|krFt|dƒndd|kr^t |d¡ndd|krvt |d¡nddS)    NrDrEr?r@rArFrG)r=r>r?r@rArBrC)    r    ZFrameIdr r!rrrr
r0r#rrrr ›s
 
ùzTimelineEvent.from_json)
r%r&r'r)rArBrCrr*r rrrrr<ws
   r<ztyping.List[str]z0typing.Generator[T_JSON_DICT, T_JSON_DICT, None])Ú event_typesÚreturnccs,tƒ}dd„|Dƒ|d<d|dœ}|V}dS)a«
    Previously buffered events would be reported before method returns.
    See also: timelineEventAdded
 
    :param event_types: The types of event to report, as specified in https://w3c.github.io/performance-timeline/#dom-performanceentry-entrytype The specified filter overrides any previous filters, passing empty filter disables recording. Note that not all types exposed to the web platform are currently supported.
    cSsg|]}|‘qSrrr8rrrr;²szenable.<locals>.<listcomp>Z
eventTypeszPerformanceTimeline.enable)ÚmethodÚparamsN)r)rHrKZcmd_dictrrrrÚenable¨s     þrLz&PerformanceTimeline.timelineEventAddedc@s.eZdZUdZded<edddœdd„ƒZdS)    ÚTimelineEventAddedz`
    Sent when a performance timeline event is added. See reportPerformanceTimeline method.
    r<Úeventr)rrIcCs|t |d¡dS)NrN)rN)r<r r#rrrr Âs ÿzTimelineEventAdded.from_jsonN)r%r&r'r(r)r*r rrrrrMºs
rM)Ú
__future__rÚutilrrZ dataclassesrÚenumÚtypingÚrrr    r
r+r0r<rLrMrrrrÚ<module>s&     ,0