1
1
function Ct ( ) {
2
- const e = document . querySelector ( 'script[type="ecomdev/ rum-beacon-ingest "]' ) ;
2
+ const e = document . querySelector ( 'script[type="text/x- rum-beacon-config "]' ) ;
3
3
if ( ! e )
4
4
return ! 1 ;
5
5
const t = JSON . parse ( e . textContent ) ;
@@ -36,28 +36,28 @@ class ot {
36
36
this . o && r && i && t . startTime - i . startTime < 1e3 && t . startTime - r . startTime < 5e3 ? ( this . o += t . value , this . i . push ( t ) ) : ( this . o = t . value , this . i = [ t ] ) , this . t ?. ( t ) ;
37
37
}
38
38
}
39
- const P = ( ) => {
39
+ const I = ( ) => {
40
40
const e = performance . getEntriesByType ( "navigation" ) [ 0 ] ;
41
41
if ( e && e . responseStart > 0 && e . responseStart < performance . now ( ) ) return e ;
42
42
} , R = ( e ) => {
43
43
if ( document . readyState === "loading" ) return "loading" ;
44
44
{
45
- const t = P ( ) ;
45
+ const t = I ( ) ;
46
46
if ( t ) {
47
47
if ( e < t . domInteractive ) return "loading" ;
48
48
if ( t . domContentLoadedEventStart === 0 || e < t . domContentLoadedEventStart ) return "dom-interactive" ;
49
49
if ( t . domComplete === 0 || e < t . domComplete ) return "dom-content-loaded" ;
50
50
}
51
51
}
52
52
return "complete" ;
53
- } , It = ( e ) => {
53
+ } , xt = ( e ) => {
54
54
const t = e . nodeName ;
55
55
return e . nodeType === 1 ? t . toLowerCase ( ) : t . toUpperCase ( ) . replace ( / ^ # / , "" ) ;
56
56
} , Z = ( e ) => {
57
57
let t = "" ;
58
58
try {
59
59
for ( ; e ?. nodeType !== 9 ; ) {
60
- const r = e , i = r . id ? "#" + r . id : [ It ( r ) , ...Array . from ( r . classList ) . sort ( ) ] . join ( "." ) ;
60
+ const r = e , i = r . id ? "#" + r . id : [ xt ( r ) , ...Array . from ( r . classList ) . sort ( ) ] . join ( "." ) ;
61
61
if ( t . length + i . length > 99 ) return t || i ;
62
62
if ( t = t ? i + ">" + t : i , r . id ) break ;
63
63
e = r . parentNode ;
@@ -70,7 +70,7 @@ function w(e, t) {
70
70
return Q . get ( e ) || Q . set ( e , new t ( ) ) , Q . get ( e ) ;
71
71
}
72
72
let yt = - 1 ;
73
- const bt = ( ) => yt , x = ( e ) => {
73
+ const bt = ( ) => yt , P = ( e ) => {
74
74
addEventListener ( "pageshow" , ( t ) => {
75
75
t . persisted && ( yt = t . timeStamp , e ( t ) ) ;
76
76
} , ! 0 ) ;
@@ -81,11 +81,11 @@ const bt = () => yt, x = (e) => {
81
81
} ;
82
82
} , tt = ( e ) => {
83
83
requestAnimationFrame ( ( ) => requestAnimationFrame ( ( ) => e ( ) ) ) ;
84
- } , F = ( ) => P ( ) ?. activationStart ?? 0 , S = ( e , t = - 1 ) => {
85
- const r = P ( ) ;
84
+ } , F = ( ) => I ( ) ?. activationStart ?? 0 , S = ( e , t = - 1 ) => {
85
+ const r = I ( ) ;
86
86
let i = "navigate" ;
87
87
return bt ( ) >= 0 ? i = "back-forward-cache" : r && ( document . prerendering || F ( ) > 0 ? i = "prerender" : document . wasDiscarded ? i = "restore" : r . type && ( i = r . type . replace ( / _ / g, "-" ) ) ) , { name : e , value : t , rating : "good" , delta : 0 , entries : [ ] , id : `v5-${ Date . now ( ) } -${ Math . floor ( 8999999999999 * Math . random ( ) ) + 1e12 } ` , navigationType : i } ;
88
- } , I = ( e , t , r = { } ) => {
88
+ } , x = ( e , t , r = { } ) => {
89
89
try {
90
90
if ( PerformanceObserver . supportedEntryTypes . includes ( e ) ) {
91
91
const i = new PerformanceObserver ( ( n ) => {
@@ -105,15 +105,15 @@ const bt = () => yt, x = (e) => {
105
105
} ;
106
106
let M = - 1 ;
107
107
const st = ( ) => document . visibilityState !== "hidden" || document . prerendering ? 1 / 0 : 0 , j = ( e ) => {
108
- document . visibilityState === "hidden" && M > - 1 && ( M = e . type === "visibilitychange" ? e . timeStamp : 0 , Pt ( ) ) ;
108
+ document . visibilityState === "hidden" && M > - 1 && ( M = e . type === "visibilitychange" ? e . timeStamp : 0 , It ( ) ) ;
109
109
} , ct = ( ) => {
110
110
addEventListener ( "visibilitychange" , j , ! 0 ) , addEventListener ( "prerenderingchange" , j , ! 0 ) ;
111
- } , Pt = ( ) => {
111
+ } , It = ( ) => {
112
112
removeEventListener ( "visibilitychange" , j , ! 0 ) , removeEventListener ( "prerenderingchange" , j , ! 0 ) ;
113
113
} , St = ( ) => {
114
114
if ( M < 0 ) {
115
115
const e = F ( ) ;
116
- M = ( document . prerendering ? void 0 : globalThis . performance . getEntriesByType ( "visibility-state" ) . filter ( ( r ) => r . name === "hidden" && r . startTime > e ) [ 0 ] ?. startTime ) ?? st ( ) , ct ( ) , x ( ( ) => {
116
+ M = ( document . prerendering ? void 0 : globalThis . performance . getEntriesByType ( "visibility-state" ) . filter ( ( r ) => r . name === "hidden" && r . startTime > e ) [ 0 ] ?. startTime ) ?? st ( ) , ct ( ) , P ( ( ) => {
117
117
setTimeout ( ( ) => {
118
118
M = st ( ) , ct ( ) ;
119
119
} ) ;
@@ -128,16 +128,16 @@ const st = () => document.visibilityState !== "hidden" || document.prerendering
128
128
U ( ( ) => {
129
129
const r = St ( ) ;
130
130
let i , n = S ( "FCP" ) ;
131
- const o = I ( "paint" , ( a ) => {
131
+ const o = x ( "paint" , ( a ) => {
132
132
for ( const s of a ) s . name === "first-contentful-paint" && ( o . disconnect ( ) , s . startTime < r . firstHiddenTime && ( n . value = Math . max ( s . startTime - F ( ) , 0 ) , n . entries . push ( s ) , i ( ! 0 ) ) ) ;
133
133
} ) ;
134
- o && ( i = b ( e , n , ut , t . reportAllChanges ) , x ( ( a ) => {
134
+ o && ( i = b ( e , n , ut , t . reportAllChanges ) , P ( ( a ) => {
135
135
n = S ( "FCP" ) , i = b ( e , n , ut , t . reportAllChanges ) , tt ( ( ) => {
136
136
n . value = performance . now ( ) - a . timeStamp , i ( ! 0 ) ;
137
137
} ) ;
138
138
} ) ) ;
139
139
} ) ;
140
- } , lt = [ 0.1 , 0.25 ] , dt = ( e ) => e . find ( ( t ) => t . node ?. nodeType === 1 ) || e [ 0 ] , xt = ( e , t = { } ) => {
140
+ } , lt = [ 0.1 , 0.25 ] , dt = ( e ) => e . find ( ( t ) => t . node ?. nodeType === 1 ) || e [ 0 ] , Pt = ( e , t = { } ) => {
141
141
const r = w ( t = Object . assign ( { } , t ) , ot ) , i = /* @__PURE__ */ new WeakMap ( ) ;
142
142
r . t = ( n ) => {
143
143
if ( n ?. sources ?. length ) {
@@ -153,10 +153,10 @@ const st = () => document.visibilityState !== "hidden" || document.prerendering
153
153
const u = w ( o , ot ) , g = ( h ) => {
154
154
for ( const T of h ) u . u ( T ) ;
155
155
u . o > s . value && ( s . value = u . o , s . entries = u . i , a ( ) ) ;
156
- } , m = I ( "layout-shift" , g ) ;
156
+ } , m = x ( "layout-shift" , g ) ;
157
157
m && ( a = b ( n , s , lt , o . reportAllChanges ) , document . addEventListener ( "visibilitychange" , ( ) => {
158
158
document . visibilityState === "hidden" && ( g ( m . takeRecords ( ) ) , a ( ! 0 ) ) ;
159
- } ) , x ( ( ) => {
159
+ } ) , P ( ( ) => {
160
160
u . o = 0 , s = S ( "CLS" , 0 ) , a = b ( n , s , lt , o . reportAllChanges ) , tt ( ( ) => a ( ) ) ;
161
161
} ) , setTimeout ( a ) ) ;
162
162
} ) ) ;
@@ -179,7 +179,7 @@ const st = () => document.visibilityState !== "hidden" || document.prerendering
179
179
const i = ( ( n ) => {
180
180
let o = { timeToFirstByte : 0 , firstByteToFCP : n . value , loadState : R ( bt ( ) ) } ;
181
181
if ( n . entries . length ) {
182
- const a = P ( ) , s = n . entries . at ( - 1 ) ;
182
+ const a = I ( ) , s = n . entries . at ( - 1 ) ;
183
183
if ( a ) {
184
184
const u = a . activationStart || 0 , g = Math . max ( 0 , a . responseStart - u ) ;
185
185
o = { timeToFirstByte : g , firstByteToFCP : n . value - g , loadState : R ( n . entries [ 0 ] . startTime ) , navigationEntry : a , fcpEntry : s } ;
@@ -196,7 +196,7 @@ const Ft = (e) => {
196
196
} ;
197
197
let K ;
198
198
const gt = ( ) => K ? Dt : performance . interactionCount ?? 0 , kt = ( ) => {
199
- "interactionCount" in performance || K || ( K = I ( "event" , Ft , { type : "event" , buffered : ! 0 , durationThreshold : 0 } ) ) ;
199
+ "interactionCount" in performance || K || ( K = x ( "event" , Ft , { type : "event" , buffered : ! 0 , durationThreshold : 0 } ) ) ;
200
200
} ;
201
201
let ft = 0 ;
202
202
class mt {
@@ -291,7 +291,7 @@ const X = (e) => {
291
291
it >= D + _ + nt && ( V = v . nextPaintTime - it ) , W && H && ( v . longestScript = { entry : W , subpart : H , intersectingDuration : z } ) , v . totalScriptDuration = $ , v . totalStyleAndLayoutDuration = A , v . totalPaintDuration = V , v . totalUnattributedDuration = v . nextPaintTime - D - $ - A - V ;
292
292
} ) ( k ) , Object . assign ( c , { attribution : k } ) ;
293
293
} ;
294
- I ( "long-animation-frame" , ( c ) => {
294
+ x ( "long-animation-frame" , ( c ) => {
295
295
i = i . concat ( c ) , g ( ) ;
296
296
} ) , ( ( c , l = { } ) => {
297
297
globalThis . PerformanceEventTiming && "interactionId" in PerformanceEventTiming . prototype && U ( ( ) => {
@@ -303,10 +303,10 @@ const X = (e) => {
303
303
const L = p . M ( ) ;
304
304
L && L . T !== f . value && ( f . value = L . T , f . entries = L . entries , d ( ) ) ;
305
305
} ) ;
306
- } , C = I ( "event" , y , { durationThreshold : l . durationThreshold ?? 40 } ) ;
306
+ } , C = x ( "event" , y , { durationThreshold : l . durationThreshold ?? 40 } ) ;
307
307
d = b ( c , f , pt , l . reportAllChanges ) , C && ( C . observe ( { type : "first-input" , buffered : ! 0 } ) , document . addEventListener ( "visibilitychange" , ( ) => {
308
308
document . visibilityState === "hidden" && ( y ( C . takeRecords ( ) ) , d ( ! 0 ) ) ;
309
- } ) , x ( ( ) => {
309
+ } ) , P ( ( ) => {
310
310
p . v ( ) , f = S ( "INP" ) , d = b ( c , f , pt , l . reportAllChanges ) ;
311
311
} ) ) ;
312
312
} ) ;
@@ -335,14 +335,14 @@ const vt = [2500, 4e3], qt = (e, t = {}) => {
335
335
const g = w ( o , ht ) , m = ( T ) => {
336
336
o . reportAllChanges || ( T = T . slice ( - 1 ) ) ;
337
337
for ( const c of T ) g . u ( c ) , c . startTime < a . firstHiddenTime && ( u . value = Math . max ( c . startTime - F ( ) , 0 ) , u . entries = [ c ] , s ( ) ) ;
338
- } , h = I ( "largest-contentful-paint" , m ) ;
338
+ } , h = x ( "largest-contentful-paint" , m ) ;
339
339
if ( h ) {
340
340
s = b ( n , u , vt , o . reportAllChanges ) ;
341
341
const T = et ( ( ) => {
342
342
m ( h . takeRecords ( ) ) , h . disconnect ( ) , s ( ! 0 ) ;
343
343
} ) ;
344
344
for ( const c of [ "keydown" , "click" , "visibilitychange" ] ) addEventListener ( c , ( ) => X ( T ) , { capture : ! 0 , once : ! 0 } ) ;
345
- x ( ( c ) => {
345
+ P ( ( c ) => {
346
346
u = S ( "LCP" ) , s = b ( n , u , vt , o . reportAllChanges ) , tt ( ( ) => {
347
347
u . value = performance . now ( ) - c . timeStamp , s ( ! 0 ) ;
348
348
} ) ;
@@ -353,7 +353,7 @@ const vt = [2500, 4e3], qt = (e, t = {}) => {
353
353
const o = ( ( a ) => {
354
354
let s = { timeToFirstByte : 0 , resourceLoadDelay : 0 , resourceLoadDuration : 0 , elementRenderDelay : a . value } ;
355
355
if ( a . entries . length ) {
356
- const u = P ( ) ;
356
+ const u = I ( ) ;
357
357
if ( u ) {
358
358
const g = u . activationStart || 0 , m = a . entries . at ( - 1 ) , h = m . url && performance . getEntriesByType ( "resource" ) . filter ( ( d ) => d . name === m . url ) [ 0 ] , T = Math . max ( 0 , u . responseStart - g ) , c = Math . max ( T , h ? ( h . requestStart || h . startTime ) - g : 0 ) , l = Math . min ( a . value , Math . max ( c , h ? h . responseEnd - g : 0 ) ) ;
359
359
s = { target : i . get ( m ) , timeToFirstByte : T , resourceLoadDelay : c - T , resourceLoadDuration : l - c , elementRenderDelay : a . value - l , navigationEntry : u , lcpEntry : m } , m . url && ( s . url = m . url ) , h && ( s . lcpResourceEntry = h ) ;
@@ -369,8 +369,8 @@ const vt = [2500, 4e3], qt = (e, t = {}) => {
369
369
( ( r , i = { } ) => {
370
370
let n = S ( "TTFB" ) , o = b ( r , n , Tt , i . reportAllChanges ) ;
371
371
Y ( ( ) => {
372
- const a = P ( ) ;
373
- a && ( n . value = Math . max ( a . responseStart - F ( ) , 0 ) , n . entries = [ a ] , o ( ! 0 ) , x ( ( ) => {
372
+ const a = I ( ) ;
373
+ a && ( n . value = Math . max ( a . responseStart - F ( ) , 0 ) , n . entries = [ a ] , o ( ! 0 ) , P ( ( ) => {
374
374
n = S ( "TTFB" , 0 ) , o = b ( r , n , Tt , i . reportAllChanges ) , o ( ! 0 ) ;
375
375
} ) ) ;
376
376
} ) ;
@@ -436,7 +436,7 @@ function Wt(e) {
436
436
} ) ;
437
437
}
438
438
function Ht ( e ) {
439
- xt ( ( t ) => {
439
+ Pt ( ( t ) => {
440
440
e . cls = {
441
441
value : t . value ,
442
442
navigationType : t . navigationType ,
0 commit comments