@tracelog/lib 2.8.4 → 2.8.5-rc.106.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/tracelog-shopify-pixel.iife.js +1 -0
- package/dist/browser/tracelog-shopify-pixel.iife.js.map +1 -0
- package/dist/browser/tracelog.esm.js +218 -206
- package/dist/browser/tracelog.esm.js.map +1 -1
- package/dist/browser/tracelog.js +2 -2
- package/dist/browser/tracelog.js.map +1 -1
- package/dist/pixel/index.cjs +3 -0
- package/dist/pixel/index.cjs.map +1 -0
- package/dist/pixel/index.d.mts +138 -0
- package/dist/pixel/index.d.ts +138 -0
- package/dist/pixel/index.js +3 -0
- package/dist/pixel/index.js.map +1 -0
- package/dist/public-api.cjs +2 -2
- package/dist/public-api.cjs.map +1 -1
- package/dist/public-api.d.mts +2 -1
- package/dist/public-api.d.ts +2 -1
- package/dist/public-api.js +2 -2
- package/dist/public-api.js.map +1 -1
- package/package.json +8 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
const
|
|
2
|
-
const
|
|
3
|
-
const
|
|
1
|
+
const fr = 9e5;
|
|
2
|
+
const mr = 120, gr = 49152, Er = 100, pr = 500, Sr = 200;
|
|
3
|
+
const Tr = 1e3, Ir = 500, vr = 1e3;
|
|
4
4
|
const b = "data-tlog", bt = [
|
|
5
5
|
"button",
|
|
6
6
|
"a",
|
|
@@ -82,10 +82,11 @@ const E = {
|
|
|
82
82
|
], S = "tlog", X = `${S}:qa_mode`, Te = `${S}:uid`, rt = "tlog_mode", Ue = "qa", Fe = "qa_off", Ct = (r) => r ? `${S}:${r}:queue` : `${S}:queue`, Rt = (r) => r ? `${S}:${r}:rate_limit` : `${S}:rate_limit`, Nt = (r) => r ? `${S}:${r}:session` : `${S}:session`, Ot = (r) => r ? `${S}:${r}:broadcast` : `${S}:broadcast`, He = (r, e) => `${S}:${r}:session_counts:${e}`, xe = 10080 * 60 * 1e3, $e = `${S}:session_counts_last_cleanup`, Be = 3600 * 1e3, fe = (r) => r ? `${S}:${r}:identity` : `${S}:identity`, U = `${S}:pending_identity`;
|
|
83
83
|
var $ = /* @__PURE__ */ ((r) => (r.Localhost = "localhost:8080", r.Fail = "localhost:9999", r))($ || {}), A = /* @__PURE__ */ ((r) => (r.Mobile = "mobile", r.Tablet = "tablet", r.Desktop = "desktop", r.Unknown = "unknown", r))(A || {}), se = /* @__PURE__ */ ((r) => (r.EVENT = "event", r.QUEUE = "queue", r))(se || {});
|
|
84
84
|
class O extends Error {
|
|
85
|
-
constructor(e, t) {
|
|
86
|
-
super(e), this.statusCode = t, this.name = "PermanentError", Error.captureStackTrace && Error.captureStackTrace(this, O);
|
|
85
|
+
constructor(e, t, s) {
|
|
86
|
+
super(e), this.statusCode = t, this.responseCode = s, this.name = "PermanentError", Error.captureStackTrace && Error.captureStackTrace(this, O);
|
|
87
87
|
}
|
|
88
88
|
statusCode;
|
|
89
|
+
responseCode;
|
|
89
90
|
}
|
|
90
91
|
class re extends Error {
|
|
91
92
|
constructor(e) {
|
|
@@ -98,7 +99,7 @@ class ie extends Error {
|
|
|
98
99
|
}
|
|
99
100
|
}
|
|
100
101
|
var u = /* @__PURE__ */ ((r) => (r.PAGE_VIEW = "page_view", r.CLICK = "click", r.SCROLL = "scroll", r.SESSION_START = "session_start", r.CUSTOM = "custom", r.WEB_VITALS = "web_vitals", r.ERROR = "error", r.VIEWPORT_VISIBLE = "viewport_visible", r))(u || {}), Z = /* @__PURE__ */ ((r) => (r.UP = "up", r.DOWN = "down", r))(Z || {}), B = /* @__PURE__ */ ((r) => (r.JS_ERROR = "js_error", r.PROMISE_REJECTION = "promise_rejection", r))(B || {}), ne = /* @__PURE__ */ ((r) => (r.QA = "qa", r))(ne || {});
|
|
101
|
-
const
|
|
102
|
+
const _r = (r) => r.type === u.SCROLL && "scroll_data" in r && r.scroll_data.is_primary === !0, yr = (r) => r.type === u.SCROLL && "scroll_data" in r && r.scroll_data.is_primary === !1;
|
|
102
103
|
class j extends Error {
|
|
103
104
|
constructor(e, t, s) {
|
|
104
105
|
super(e), this.errorCode = t, this.layer = s, this.name = this.constructor.name, Error.captureStackTrace && Error.captureStackTrace(this, this.constructor);
|
|
@@ -126,7 +127,7 @@ class N extends j {
|
|
|
126
127
|
super(e, "INTEGRATION_INVALID", t);
|
|
127
128
|
}
|
|
128
129
|
}
|
|
129
|
-
class
|
|
130
|
+
class wr extends j {
|
|
130
131
|
constructor(e, t, s = "runtime") {
|
|
131
132
|
super(e, "INITIALIZATION_TIMEOUT", s), this.timeoutMs = t;
|
|
132
133
|
}
|
|
@@ -253,7 +254,7 @@ const xt = () => {
|
|
|
253
254
|
/:\/\/[^:/]+:([^@]+)@/gi,
|
|
254
255
|
// Sensitive URL query parameters (token=, password=, auth=, secret=, api_key=, etc.)
|
|
255
256
|
/[?&](token|password|passwd|auth|secret|secret_key|private_key|auth_key|api_key|apikey|access_token)=[^&\s]+/gi
|
|
256
|
-
], Xe = 500, Ge = 2e3, je = 5e3, ee = 50, Gt = ee * 2, lt = 1, jt = 1e3,
|
|
257
|
+
], Xe = 500, Ge = 2e3, je = 5e3, ee = 50, Gt = ee * 2, lt = 1, jt = 1e3, Kt = 10, Ke = 5e3, zt = 6e4, Qt = 64, br = {
|
|
257
258
|
LCP: 2500,
|
|
258
259
|
// Good: ≤ 2.5s
|
|
259
260
|
FCP: 1800,
|
|
@@ -265,7 +266,7 @@ const xt = () => {
|
|
|
265
266
|
TTFB: 800,
|
|
266
267
|
// Good: ≤ 800ms
|
|
267
268
|
LONG_TASK: 50
|
|
268
|
-
},
|
|
269
|
+
}, ze = {
|
|
269
270
|
LCP: 2500,
|
|
270
271
|
// Needs improvement: > 2.5s (same as good boundary)
|
|
271
272
|
FCP: 1800,
|
|
@@ -277,7 +278,7 @@ const xt = () => {
|
|
|
277
278
|
TTFB: 800,
|
|
278
279
|
// Needs improvement: > 800ms
|
|
279
280
|
LONG_TASK: 50
|
|
280
|
-
},
|
|
281
|
+
}, Yt = {
|
|
281
282
|
LCP: 4e3,
|
|
282
283
|
// Poor: > 4s
|
|
283
284
|
FCP: 3e3,
|
|
@@ -295,13 +296,13 @@ const xt = () => {
|
|
|
295
296
|
return { LCP: 0, FCP: 0, CLS: 0, INP: 0, TTFB: 0, LONG_TASK: 0 };
|
|
296
297
|
// Track everything
|
|
297
298
|
case "needs-improvement":
|
|
298
|
-
return
|
|
299
|
+
return ze;
|
|
299
300
|
case "poor":
|
|
300
|
-
return
|
|
301
|
+
return Yt;
|
|
301
302
|
default:
|
|
302
|
-
return
|
|
303
|
+
return ze;
|
|
303
304
|
}
|
|
304
|
-
},
|
|
305
|
+
}, qt = 1e3, Jt = 50, Zt = "2.8.5", es = Zt, ct = () => typeof window < "u" && typeof sessionStorage < "u", ts = () => {
|
|
305
306
|
try {
|
|
306
307
|
const r = new URLSearchParams(window.location.search);
|
|
307
308
|
r.delete(rt);
|
|
@@ -309,7 +310,7 @@ const xt = () => {
|
|
|
309
310
|
window.history.replaceState({}, "", t);
|
|
310
311
|
} catch {
|
|
311
312
|
}
|
|
312
|
-
},
|
|
313
|
+
}, ss = () => {
|
|
313
314
|
if (!ct())
|
|
314
315
|
return !1;
|
|
315
316
|
try {
|
|
@@ -321,11 +322,11 @@ const xt = () => {
|
|
|
321
322
|
})) : e === Fe && (s = !1, sessionStorage.setItem(X, "false"), a("info", "QA Mode DISABLED", {
|
|
322
323
|
visibility: "qa",
|
|
323
324
|
style: nt
|
|
324
|
-
})), (e === Ue || e === Fe) &&
|
|
325
|
+
})), (e === Ue || e === Fe) && ts(), s ?? t === "true";
|
|
325
326
|
} catch {
|
|
326
327
|
return !1;
|
|
327
328
|
}
|
|
328
|
-
},
|
|
329
|
+
}, rs = (r) => {
|
|
329
330
|
if (ct())
|
|
330
331
|
try {
|
|
331
332
|
sessionStorage.setItem(X, r ? "true" : "false"), a("info", r ? "QA Mode ACTIVE" : "QA Mode DISABLED", {
|
|
@@ -335,7 +336,7 @@ const xt = () => {
|
|
|
335
336
|
} catch {
|
|
336
337
|
a("debug", "Cannot set QA mode: sessionStorage unavailable");
|
|
337
338
|
}
|
|
338
|
-
},
|
|
339
|
+
}, is = [
|
|
339
340
|
"co.uk",
|
|
340
341
|
"org.uk",
|
|
341
342
|
"com.au",
|
|
@@ -352,14 +353,14 @@ const xt = () => {
|
|
|
352
353
|
if (e.length <= 2)
|
|
353
354
|
return r.toLowerCase();
|
|
354
355
|
const t = e.slice(-2).join(".");
|
|
355
|
-
return
|
|
356
|
-
},
|
|
356
|
+
return is.includes(t) ? e.slice(-3).join(".") : e.slice(-2).join(".");
|
|
357
|
+
}, ns = (r, e) => r === e ? !0 : Ye(r) === Ye(e), me = () => {
|
|
357
358
|
const r = document.referrer;
|
|
358
359
|
if (!r)
|
|
359
360
|
return "Direct";
|
|
360
361
|
try {
|
|
361
362
|
const e = new URL(r).hostname.toLowerCase(), t = window.location.hostname.toLowerCase();
|
|
362
|
-
return
|
|
363
|
+
return ns(e, t) ? "Direct" : r;
|
|
363
364
|
} catch (e) {
|
|
364
365
|
return a("debug", "Failed to parse referrer URL, using raw value", { error: e, data: { referrer: r } }), r;
|
|
365
366
|
}
|
|
@@ -377,7 +378,7 @@ const xt = () => {
|
|
|
377
378
|
return (r === "x" ? e : e & 3 | 8).toString(16);
|
|
378
379
|
});
|
|
379
380
|
let Y = 0, q = 0;
|
|
380
|
-
const
|
|
381
|
+
const os = () => {
|
|
381
382
|
let r = Date.now();
|
|
382
383
|
r < q && (r = q), r === q ? Y = (Y + 1) % 1e3 : Y = 0, q = r;
|
|
383
384
|
const e = Y.toString().padStart(3, "0");
|
|
@@ -397,7 +398,7 @@ const ns = () => {
|
|
|
397
398
|
} catch {
|
|
398
399
|
return !1;
|
|
399
400
|
}
|
|
400
|
-
},
|
|
401
|
+
}, as = (r) => {
|
|
401
402
|
try {
|
|
402
403
|
const t = new URL(window.location.href).hostname;
|
|
403
404
|
if (!t || typeof t != "string")
|
|
@@ -421,9 +422,9 @@ const ns = () => {
|
|
|
421
422
|
} catch (e) {
|
|
422
423
|
throw new Error(`Invalid SaaS URL configuration: ${e instanceof Error ? e.message : String(e)}`);
|
|
423
424
|
}
|
|
424
|
-
},
|
|
425
|
+
}, ls = (r) => {
|
|
425
426
|
const e = {};
|
|
426
|
-
r.integrations?.tracelog?.projectId && (e.saas =
|
|
427
|
+
r.integrations?.tracelog?.projectId && (e.saas = as(r.integrations.tracelog.projectId));
|
|
427
428
|
const t = r.integrations?.custom?.collectApiUrl;
|
|
428
429
|
if (t) {
|
|
429
430
|
const s = r.integrations?.custom?.allowHttp ?? !1;
|
|
@@ -486,7 +487,7 @@ const ns = () => {
|
|
|
486
487
|
return t;
|
|
487
488
|
}
|
|
488
489
|
return null;
|
|
489
|
-
},
|
|
490
|
+
}, cs = (r) => {
|
|
490
491
|
if (typeof r != "object" || r === null)
|
|
491
492
|
return {};
|
|
492
493
|
try {
|
|
@@ -496,7 +497,7 @@ const ns = () => {
|
|
|
496
497
|
const t = e instanceof Error ? e.message : String(e);
|
|
497
498
|
throw new Error(`[TraceLog] Metadata sanitization failed: ${t}`);
|
|
498
499
|
}
|
|
499
|
-
},
|
|
500
|
+
}, ds = (r) => {
|
|
500
501
|
if (r !== void 0 && (r === null || typeof r != "object"))
|
|
501
502
|
throw new m("Configuration must be an object", "config");
|
|
502
503
|
if (r) {
|
|
@@ -504,7 +505,7 @@ const ns = () => {
|
|
|
504
505
|
throw new Pt(E.INVALID_SESSION_TIMEOUT, "config");
|
|
505
506
|
if (r.globalMetadata !== void 0 && (typeof r.globalMetadata != "object" || r.globalMetadata === null))
|
|
506
507
|
throw new m(E.INVALID_GLOBAL_METADATA, "config");
|
|
507
|
-
if (r.integrations &&
|
|
508
|
+
if (r.integrations && hs(r.integrations), r.sensitiveQueryParams !== void 0) {
|
|
508
509
|
if (!Array.isArray(r.sensitiveQueryParams))
|
|
509
510
|
throw new m(E.INVALID_SENSITIVE_QUERY_PARAMS, "config");
|
|
510
511
|
for (const e of r.sensitiveQueryParams)
|
|
@@ -536,7 +537,7 @@ const ns = () => {
|
|
|
536
537
|
throw new m(E.INVALID_MAX_SAME_EVENT_PER_MINUTE, "config");
|
|
537
538
|
if (r.sendIntervalMs !== void 0 && (!Number.isFinite(r.sendIntervalMs) || r.sendIntervalMs < 1e3 || r.sendIntervalMs > 6e4))
|
|
538
539
|
throw new m(E.INVALID_SEND_INTERVAL, "config");
|
|
539
|
-
if (r.viewport !== void 0 &&
|
|
540
|
+
if (r.viewport !== void 0 && us(r.viewport), r.webVitalsMode !== void 0) {
|
|
540
541
|
if (typeof r.webVitalsMode != "string")
|
|
541
542
|
throw new m(
|
|
542
543
|
`Invalid webVitalsMode type: ${typeof r.webVitalsMode}. Must be a string`,
|
|
@@ -567,7 +568,7 @@ const ns = () => {
|
|
|
567
568
|
}
|
|
568
569
|
}
|
|
569
570
|
}
|
|
570
|
-
},
|
|
571
|
+
}, us = (r) => {
|
|
571
572
|
if (typeof r != "object" || r === null)
|
|
572
573
|
throw new m(E.INVALID_VIEWPORT_CONFIG, "config");
|
|
573
574
|
if (!r.elements || !Array.isArray(r.elements))
|
|
@@ -597,7 +598,7 @@ const ns = () => {
|
|
|
597
598
|
throw new m(E.INVALID_VIEWPORT_COOLDOWN_PERIOD, "config");
|
|
598
599
|
if (r.maxTrackedElements !== void 0 && (typeof r.maxTrackedElements != "number" || r.maxTrackedElements <= 0))
|
|
599
600
|
throw new m(E.INVALID_VIEWPORT_MAX_TRACKED_ELEMENTS, "config");
|
|
600
|
-
},
|
|
601
|
+
}, hs = (r) => {
|
|
601
602
|
if (r) {
|
|
602
603
|
if (r.tracelog && (!r.tracelog.projectId || typeof r.tracelog.projectId != "string" || r.tracelog.projectId.trim() === ""))
|
|
603
604
|
throw new N(E.INVALID_TRACELOG_PROJECT_ID, "config");
|
|
@@ -620,8 +621,8 @@ const ns = () => {
|
|
|
620
621
|
if (r.tracelog?.shopify !== void 0 && typeof r.tracelog.shopify != "boolean")
|
|
621
622
|
throw new N("tracelog.shopify must be a boolean", "config");
|
|
622
623
|
}
|
|
623
|
-
},
|
|
624
|
-
|
|
624
|
+
}, fs = (r) => {
|
|
625
|
+
ds(r);
|
|
625
626
|
const e = {
|
|
626
627
|
...r ?? {},
|
|
627
628
|
sessionTimeout: r?.sessionTimeout ?? 9e5,
|
|
@@ -649,13 +650,13 @@ const ns = () => {
|
|
|
649
650
|
return !0;
|
|
650
651
|
const t = typeof r;
|
|
651
652
|
return t === "string" || t === "number" || t === "boolean" ? !0 : t === "function" || t === "symbol" || t === "bigint" || e.has(r) ? !1 : (e.add(r), Array.isArray(r) ? r.every((s) => be(s, e)) : t === "object" ? Object.values(r).every((s) => be(s, e)) : !1);
|
|
652
|
-
},
|
|
653
|
+
}, ms = (r) => typeof r != "object" || r === null ? !1 : be(r), ht = (r) => {
|
|
653
654
|
if (typeof r != "object" || r === null || Array.isArray(r)) return;
|
|
654
655
|
const e = {};
|
|
655
656
|
for (const [t, s] of Object.entries(r))
|
|
656
657
|
typeof s == "string" && (e[t] = s);
|
|
657
658
|
return Object.keys(e).length > 0 ? e : void 0;
|
|
658
|
-
},
|
|
659
|
+
}, gs = (r) => typeof r != "string" ? {
|
|
659
660
|
valid: !1,
|
|
660
661
|
error: "Event name must be a string"
|
|
661
662
|
} : r.length === 0 ? {
|
|
@@ -671,8 +672,8 @@ const ns = () => {
|
|
|
671
672
|
valid: !1,
|
|
672
673
|
error: "Event name cannot be a reserved word"
|
|
673
674
|
} : { valid: !0 }, Je = (r, e, t) => {
|
|
674
|
-
const s =
|
|
675
|
-
if (!
|
|
675
|
+
const s = cs(e), i = t && t === "customEvent" ? `${t} "${r}" metadata error` : `${r} metadata error`;
|
|
676
|
+
if (!ms(s))
|
|
676
677
|
return {
|
|
677
678
|
valid: !1,
|
|
678
679
|
error: `${i}: object has invalid types. Valid types are string, number, boolean or string arrays.`
|
|
@@ -744,8 +745,8 @@ const ns = () => {
|
|
|
744
745
|
};
|
|
745
746
|
}
|
|
746
747
|
return Je(r, e, t);
|
|
747
|
-
},
|
|
748
|
-
const t =
|
|
748
|
+
}, Es = (r, e) => {
|
|
749
|
+
const t = gs(r);
|
|
749
750
|
if (!t.valid)
|
|
750
751
|
return a("error", "Event name validation failed", {
|
|
751
752
|
data: { eventName: r, error: t.error }
|
|
@@ -760,7 +761,7 @@ const ns = () => {
|
|
|
760
761
|
}
|
|
761
762
|
}), s;
|
|
762
763
|
};
|
|
763
|
-
class
|
|
764
|
+
class ps {
|
|
764
765
|
listeners = /* @__PURE__ */ new Map();
|
|
765
766
|
/**
|
|
766
767
|
* Subscribes to an event channel
|
|
@@ -888,7 +889,7 @@ function mt(r, e, t) {
|
|
|
888
889
|
}), r;
|
|
889
890
|
}
|
|
890
891
|
}
|
|
891
|
-
function
|
|
892
|
+
function Ss(r, e, t) {
|
|
892
893
|
return r.map((s) => mt(s, e, t)).filter((s) => s !== null);
|
|
893
894
|
}
|
|
894
895
|
function gt(r, e, t) {
|
|
@@ -1197,21 +1198,6 @@ class Ze extends _ {
|
|
|
1197
1198
|
}
|
|
1198
1199
|
), !0) : this.sendQueueSyncInternal(e);
|
|
1199
1200
|
}
|
|
1200
|
-
/**
|
|
1201
|
-
* Persists events to localStorage for recovery without sending.
|
|
1202
|
-
*
|
|
1203
|
-
* Used when an async send is already in-flight to avoid sending the same
|
|
1204
|
-
* events through two paths (fetch + sendBeacon) with different idempotency tokens.
|
|
1205
|
-
* `ensureBatchMetadata()` assigns a stable token before persisting.
|
|
1206
|
-
* On next page load, `recoverPersistedEvents()` sends with the persisted token.
|
|
1207
|
-
*
|
|
1208
|
-
* @param body - Event queue to persist
|
|
1209
|
-
*/
|
|
1210
|
-
persistForRecovery(e) {
|
|
1211
|
-
if (this.shouldSkipSend()) return;
|
|
1212
|
-
const t = this.ensureBatchMetadata(e);
|
|
1213
|
-
this.persistEventsWithFailureCount(t, 0, !0);
|
|
1214
|
-
}
|
|
1215
1201
|
/**
|
|
1216
1202
|
* Sends events asynchronously using `fetch()` API with automatic persistence on failure.
|
|
1217
1203
|
*
|
|
@@ -1387,7 +1373,7 @@ class Ze extends _ {
|
|
|
1387
1373
|
const t = this.transformers.beforeSend;
|
|
1388
1374
|
if (!t)
|
|
1389
1375
|
return e;
|
|
1390
|
-
const s =
|
|
1376
|
+
const s = Ss(
|
|
1391
1377
|
e.events,
|
|
1392
1378
|
t,
|
|
1393
1379
|
this.integrationId || "SenderManager"
|
|
@@ -1618,8 +1604,13 @@ class Ze extends _ {
|
|
|
1618
1604
|
"Content-Type": "application/json"
|
|
1619
1605
|
}
|
|
1620
1606
|
});
|
|
1621
|
-
if (!l.ok)
|
|
1622
|
-
|
|
1607
|
+
if (!l.ok) {
|
|
1608
|
+
if (l.status >= 400 && l.status < 500 && l.status !== 408 && l.status !== 429) {
|
|
1609
|
+
const d = await this.readTraceLogErrorCode(l), f = d ? `HTTP ${l.status}: ${l.statusText} (${d})` : `HTTP ${l.status}: ${l.statusText}`;
|
|
1610
|
+
throw new O(f, l.status, d);
|
|
1611
|
+
}
|
|
1612
|
+
throw l.status === 429 ? new re(`HTTP 429: ${l.statusText}`) : new Error(`HTTP ${l.status}: ${l.statusText}`);
|
|
1613
|
+
}
|
|
1623
1614
|
return l;
|
|
1624
1615
|
} catch (o) {
|
|
1625
1616
|
throw o instanceof O ? o : i ? new ie("Request timed out") : o;
|
|
@@ -1627,6 +1618,26 @@ class Ze extends _ {
|
|
|
1627
1618
|
clearTimeout(n), this.pendingControllers.delete(s);
|
|
1628
1619
|
}
|
|
1629
1620
|
}
|
|
1621
|
+
/**
|
|
1622
|
+
* Best-effort extraction of an application `code` from a 4xx response body.
|
|
1623
|
+
*
|
|
1624
|
+
* Used purely for logging context (e.g. `PLAN_LIMIT_EXCEEDED`, `PROJECT_READ_ONLY`).
|
|
1625
|
+
* Status alone already determines retry semantics, so this never affects the
|
|
1626
|
+
* retry/persistence decision. Bounded to {@link MAX_RESPONSE_CODE_LENGTH} chars
|
|
1627
|
+
* to keep noisy/untrusted payloads out of logs without coupling the lib to the
|
|
1628
|
+
* API's evolving code catalogue.
|
|
1629
|
+
*
|
|
1630
|
+
* Only string `code` values are accepted — numeric or object codes are
|
|
1631
|
+
* intentionally dropped to keep the log shape stable.
|
|
1632
|
+
*/
|
|
1633
|
+
async readTraceLogErrorCode(e) {
|
|
1634
|
+
try {
|
|
1635
|
+
const t = await e.clone().json();
|
|
1636
|
+
if (typeof t.code == "string" && t.code.length > 0 && t.code.length <= Qt)
|
|
1637
|
+
return t.code;
|
|
1638
|
+
} catch {
|
|
1639
|
+
}
|
|
1640
|
+
}
|
|
1630
1641
|
/**
|
|
1631
1642
|
* Internal synchronous send logic using navigator.sendBeacon() for page unload scenarios.
|
|
1632
1643
|
*
|
|
@@ -1708,7 +1719,7 @@ class Ze extends _ {
|
|
|
1708
1719
|
idempotency_token: e._metadata?.idempotency_token ?? this.computeContentToken(e),
|
|
1709
1720
|
referer: typeof window < "u" ? window.location.href : void 0,
|
|
1710
1721
|
timestamp: t,
|
|
1711
|
-
client_version:
|
|
1722
|
+
client_version: es
|
|
1712
1723
|
}
|
|
1713
1724
|
};
|
|
1714
1725
|
return {
|
|
@@ -1882,13 +1893,13 @@ class Ze extends _ {
|
|
|
1882
1893
|
return typeof navigator < "u" && typeof navigator.sendBeacon == "function";
|
|
1883
1894
|
}
|
|
1884
1895
|
logPermanentError(e, t) {
|
|
1885
|
-
const s = Date.now()
|
|
1886
|
-
(!this.lastPermanentErrorLog || this.lastPermanentErrorLog.
|
|
1887
|
-
data: { status: t.statusCode, message: t.message }
|
|
1888
|
-
}), this.lastPermanentErrorLog = {
|
|
1896
|
+
const s = Date.now(), i = `${t.statusCode ?? "unknown"}:${t.responseCode ?? ""}`;
|
|
1897
|
+
(!this.lastPermanentErrorLog || this.lastPermanentErrorLog.key !== i || s - this.lastPermanentErrorLog.timestamp >= zt) && (a("error", `${e}${this.integrationId ? ` [${this.integrationId}]` : ""}`, {
|
|
1898
|
+
data: { status: t.statusCode, code: t.responseCode, message: t.message }
|
|
1899
|
+
}), this.lastPermanentErrorLog = { key: i, timestamp: s });
|
|
1889
1900
|
}
|
|
1890
1901
|
}
|
|
1891
|
-
class
|
|
1902
|
+
class Ts extends _ {
|
|
1892
1903
|
bootTime;
|
|
1893
1904
|
bootTimestamp;
|
|
1894
1905
|
hasPerformanceNow;
|
|
@@ -2037,8 +2048,8 @@ class Ss extends _ {
|
|
|
2037
2048
|
};
|
|
2038
2049
|
}
|
|
2039
2050
|
}
|
|
2040
|
-
const
|
|
2041
|
-
class
|
|
2051
|
+
const Is = new Set(Object.values(u));
|
|
2052
|
+
class vs extends _ {
|
|
2042
2053
|
dataSenders;
|
|
2043
2054
|
emitter;
|
|
2044
2055
|
transformers;
|
|
@@ -2077,7 +2088,7 @@ class Is extends _ {
|
|
|
2077
2088
|
* @param fetchCredentials - Fetch credentials mode for custom backend. @default 'include'
|
|
2078
2089
|
*/
|
|
2079
2090
|
constructor(e, t = null, s = {}, i = {}, n, o = "include") {
|
|
2080
|
-
super(), this.emitter = t, this.transformers = s, this.timeManager = new
|
|
2091
|
+
super(), this.emitter = t, this.transformers = s, this.timeManager = new Ts(), this.dataSenders = [];
|
|
2081
2092
|
const l = this.get("collectApiUrls");
|
|
2082
2093
|
l?.saas && this.dataSenders.push(new Ze(e, "saas", l.saas, s)), l?.custom && this.dataSenders.push(
|
|
2083
2094
|
new Ze(
|
|
@@ -2208,7 +2219,7 @@ class Is extends _ {
|
|
|
2208
2219
|
a("error", "Event type is required - event will be ignored");
|
|
2209
2220
|
return;
|
|
2210
2221
|
}
|
|
2211
|
-
if (!
|
|
2222
|
+
if (!Is.has(e)) {
|
|
2212
2223
|
a("error", "Invalid event type - event will be ignored", {
|
|
2213
2224
|
data: { type: e }
|
|
2214
2225
|
});
|
|
@@ -2594,13 +2605,10 @@ class Is extends _ {
|
|
|
2594
2605
|
const t = this.buildEventsPayload(), s = [...this.eventsQueue], i = s.map((n) => n.id);
|
|
2595
2606
|
if (this.dataSenders.length === 0)
|
|
2596
2607
|
return this.removeProcessedEvents(i), this.clearSendTimeout(), this.emitEventsQueue(t), e ? !0 : Promise.resolve(!0);
|
|
2597
|
-
if (e && this.sendInProgress)
|
|
2598
|
-
|
|
2599
|
-
n.persistForRecovery(t);
|
|
2600
|
-
return a("debug", "Sync flush deferred: async send in progress, events persisted for recovery", {
|
|
2608
|
+
if (e && this.sendInProgress)
|
|
2609
|
+
return a("debug", "Sync flush skipped: async send already in-flight, trusting fetch to deliver", {
|
|
2601
2610
|
data: { eventCount: i.length }
|
|
2602
2611
|
}), !0;
|
|
2603
|
-
}
|
|
2604
2612
|
if (e) {
|
|
2605
2613
|
const o = this.dataSenders.map((l) => l.sendEventsQueueSync(t)).some((l) => l);
|
|
2606
2614
|
return o ? (this.removeProcessedEvents(i), this.clearSendTimeout(), this.emitEventsQueue(t)) : (this.clearSendTimeout(), a("debug", "Sync flush complete failure, events kept in queue for retry", {
|
|
@@ -2685,7 +2693,7 @@ class Is extends _ {
|
|
|
2685
2693
|
});
|
|
2686
2694
|
const n = this.get("sessionReferrer"), o = this.get("sessionUtm");
|
|
2687
2695
|
let l = {
|
|
2688
|
-
id:
|
|
2696
|
+
id: os(),
|
|
2689
2697
|
type: e.type,
|
|
2690
2698
|
page_url: t,
|
|
2691
2699
|
timestamp: s,
|
|
@@ -3005,7 +3013,7 @@ class Is extends _ {
|
|
|
3005
3013
|
}
|
|
3006
3014
|
}
|
|
3007
3015
|
}
|
|
3008
|
-
class
|
|
3016
|
+
class _s {
|
|
3009
3017
|
/**
|
|
3010
3018
|
* Gets or creates a unique user ID.
|
|
3011
3019
|
*
|
|
@@ -3030,8 +3038,8 @@ class vs {
|
|
|
3030
3038
|
return e.setItem(Te, s), s;
|
|
3031
3039
|
}
|
|
3032
3040
|
}
|
|
3033
|
-
const
|
|
3034
|
-
class
|
|
3041
|
+
const ys = /^\d{13}-[a-z0-9]{9}$/;
|
|
3042
|
+
class ws extends _ {
|
|
3035
3043
|
storageManager;
|
|
3036
3044
|
eventManager;
|
|
3037
3045
|
projectId;
|
|
@@ -3077,7 +3085,7 @@ class ys extends _ {
|
|
|
3077
3085
|
const e = this.loadStoredSession();
|
|
3078
3086
|
if (!e)
|
|
3079
3087
|
return null;
|
|
3080
|
-
if (!
|
|
3088
|
+
if (!ys.test(e.id))
|
|
3081
3089
|
return a("warn", "Invalid session ID format recovered from storage, clearing", {
|
|
3082
3090
|
data: { sessionId: e.id }
|
|
3083
3091
|
}), this.clearStoredSession(), null;
|
|
@@ -3362,7 +3370,7 @@ class ys extends _ {
|
|
|
3362
3370
|
this.clearSessionTimeout(), this.cleanupActivityListeners(), this.cleanupCrossTabSync(), this.cleanupLifecycleListeners(), this.isTracking = !1, this.needsRenewal = !1, this.set("hasStartSession", !1);
|
|
3363
3371
|
}
|
|
3364
3372
|
}
|
|
3365
|
-
class
|
|
3373
|
+
class bs extends _ {
|
|
3366
3374
|
eventManager;
|
|
3367
3375
|
storageManager;
|
|
3368
3376
|
sessionManager = null;
|
|
@@ -3397,7 +3405,7 @@ class ws extends _ {
|
|
|
3397
3405
|
}
|
|
3398
3406
|
const t = this.get("config")?.integrations?.tracelog?.projectId ?? "custom";
|
|
3399
3407
|
try {
|
|
3400
|
-
this.sessionManager = new
|
|
3408
|
+
this.sessionManager = new ws(this.storageManager, this.eventManager, t), this.sessionManager.startTracking(), this.eventManager.flushPendingEvents();
|
|
3401
3409
|
} catch (s) {
|
|
3402
3410
|
if (this.sessionManager) {
|
|
3403
3411
|
try {
|
|
@@ -3450,7 +3458,7 @@ class ws extends _ {
|
|
|
3450
3458
|
this.destroyed || (this.sessionManager && (this.sessionManager.destroy(), this.sessionManager = null), this.destroyed = !0);
|
|
3451
3459
|
}
|
|
3452
3460
|
}
|
|
3453
|
-
class
|
|
3461
|
+
class Ls extends _ {
|
|
3454
3462
|
eventManager;
|
|
3455
3463
|
onTrack;
|
|
3456
3464
|
originalPushState;
|
|
@@ -3526,7 +3534,7 @@ class bs extends _ {
|
|
|
3526
3534
|
};
|
|
3527
3535
|
}
|
|
3528
3536
|
}
|
|
3529
|
-
class
|
|
3537
|
+
class As extends _ {
|
|
3530
3538
|
eventManager;
|
|
3531
3539
|
lastClickTimes = /* @__PURE__ */ new Map();
|
|
3532
3540
|
clickHandler;
|
|
@@ -3783,7 +3791,7 @@ class Ls extends _ {
|
|
|
3783
3791
|
};
|
|
3784
3792
|
}
|
|
3785
3793
|
}
|
|
3786
|
-
class
|
|
3794
|
+
class Ms extends _ {
|
|
3787
3795
|
eventManager;
|
|
3788
3796
|
containers = [];
|
|
3789
3797
|
limitWarningLogged = !1;
|
|
@@ -4011,7 +4019,7 @@ class As extends _ {
|
|
|
4011
4019
|
e.isPrimary = t;
|
|
4012
4020
|
}
|
|
4013
4021
|
}
|
|
4014
|
-
class
|
|
4022
|
+
class Cs extends _ {
|
|
4015
4023
|
eventManager;
|
|
4016
4024
|
trackedElements = /* @__PURE__ */ new Map();
|
|
4017
4025
|
observer = null;
|
|
@@ -4172,38 +4180,42 @@ class Ms extends _ {
|
|
|
4172
4180
|
});
|
|
4173
4181
|
}
|
|
4174
4182
|
}
|
|
4175
|
-
const
|
|
4176
|
-
class
|
|
4183
|
+
const Rs = "tracelog_session_id", Ns = "tracelog_user_id";
|
|
4184
|
+
class Os extends _ {
|
|
4177
4185
|
visibilityHandler = null;
|
|
4178
|
-
|
|
4186
|
+
lastSyncedKey = null;
|
|
4179
4187
|
activate() {
|
|
4180
4188
|
this.cleanupVisibilityListener(), this.syncCartAttribute(), this.setupVisibilityListener();
|
|
4181
4189
|
}
|
|
4182
4190
|
deactivate() {
|
|
4183
|
-
this.cleanupVisibilityListener(), this.
|
|
4191
|
+
this.cleanupVisibilityListener(), this.lastSyncedKey = null;
|
|
4184
4192
|
}
|
|
4185
|
-
/** Re-syncs
|
|
4193
|
+
/** Re-syncs cart attributes when session rotates (called by App on SESSION_START). */
|
|
4186
4194
|
onSessionChange() {
|
|
4187
4195
|
this.syncCartAttribute();
|
|
4188
4196
|
}
|
|
4189
4197
|
syncCartAttribute() {
|
|
4190
4198
|
const e = this.get("sessionId");
|
|
4191
|
-
|
|
4199
|
+
if (!e) return;
|
|
4200
|
+
const t = this.get("userId"), s = typeof t == "string" && t.length > 0 ? t : "", i = `${e}|${s}`;
|
|
4201
|
+
i !== this.lastSyncedKey && (this.lastSyncedKey = i, this.postCartUpdate(e, s));
|
|
4192
4202
|
}
|
|
4193
|
-
postCartUpdate(e) {
|
|
4203
|
+
postCartUpdate(e, t) {
|
|
4204
|
+
const s = { [Rs]: e };
|
|
4205
|
+
t.length > 0 && (s[Ns] = t);
|
|
4194
4206
|
try {
|
|
4195
4207
|
fetch("/cart/update.js", {
|
|
4196
4208
|
method: "POST",
|
|
4197
4209
|
headers: { "Content-Type": "application/json" },
|
|
4198
|
-
body: JSON.stringify({ attributes:
|
|
4210
|
+
body: JSON.stringify({ attributes: s }),
|
|
4199
4211
|
credentials: "same-origin"
|
|
4200
|
-
}).then((
|
|
4201
|
-
|
|
4212
|
+
}).then((i) => {
|
|
4213
|
+
i.ok || (this.lastSyncedKey = null, a("debug", "Shopify cart attribute update failed", { data: { status: i.status } }));
|
|
4202
4214
|
}).catch(() => {
|
|
4203
|
-
this.
|
|
4215
|
+
this.lastSyncedKey = null, a("debug", "Shopify cart attribute update failed");
|
|
4204
4216
|
});
|
|
4205
4217
|
} catch {
|
|
4206
|
-
this.
|
|
4218
|
+
this.lastSyncedKey = null, a("debug", "Shopify cart attribute update failed");
|
|
4207
4219
|
}
|
|
4208
4220
|
}
|
|
4209
4221
|
setupVisibilityListener() {
|
|
@@ -4215,7 +4227,7 @@ class Rs extends _ {
|
|
|
4215
4227
|
this.visibilityHandler && (document.removeEventListener("visibilitychange", this.visibilityHandler), this.visibilityHandler = null);
|
|
4216
4228
|
}
|
|
4217
4229
|
}
|
|
4218
|
-
class
|
|
4230
|
+
class Ps {
|
|
4219
4231
|
storage;
|
|
4220
4232
|
sessionStorageRef;
|
|
4221
4233
|
fallbackStorage = /* @__PURE__ */ new Map();
|
|
@@ -4498,7 +4510,7 @@ class Ns {
|
|
|
4498
4510
|
this.fallbackSessionStorage.delete(e);
|
|
4499
4511
|
}
|
|
4500
4512
|
}
|
|
4501
|
-
class
|
|
4513
|
+
class Ds extends _ {
|
|
4502
4514
|
eventManager;
|
|
4503
4515
|
reportedByNav = /* @__PURE__ */ new Map();
|
|
4504
4516
|
navigationHistory = [];
|
|
@@ -4597,7 +4609,7 @@ class Os extends _ {
|
|
|
4597
4609
|
}
|
|
4598
4610
|
async initWebVitals() {
|
|
4599
4611
|
try {
|
|
4600
|
-
const { onLCP: e, onCLS: t, onFCP: s, onTTFB: i, onINP: n } = await Promise.resolve().then(() =>
|
|
4612
|
+
const { onLCP: e, onCLS: t, onFCP: s, onTTFB: i, onINP: n } = await Promise.resolve().then(() => hr), o = (l) => (c) => {
|
|
4601
4613
|
const d = Number(c.value.toFixed(2));
|
|
4602
4614
|
this.sendVital({ type: l, value: d });
|
|
4603
4615
|
};
|
|
@@ -4624,7 +4636,7 @@ class Os extends _ {
|
|
|
4624
4636
|
const t = e.getEntries();
|
|
4625
4637
|
for (const s of t) {
|
|
4626
4638
|
const i = Number(s.duration.toFixed(2)), n = Date.now();
|
|
4627
|
-
n - this.lastLongTaskSentAt >=
|
|
4639
|
+
n - this.lastLongTaskSentAt >= qt && (this.shouldSendVital("LONG_TASK", i) && this.trackWebVital("LONG_TASK", i), this.lastLongTaskSentAt = n);
|
|
4628
4640
|
}
|
|
4629
4641
|
},
|
|
4630
4642
|
{ type: "longtask", buffered: !0 }
|
|
@@ -4640,7 +4652,7 @@ class Os extends _ {
|
|
|
4640
4652
|
return;
|
|
4641
4653
|
if (s)
|
|
4642
4654
|
s.add(e.type);
|
|
4643
|
-
else if (this.reportedByNav.set(t, /* @__PURE__ */ new Set([e.type])), this.navigationHistory.push(t), this.navigationHistory.length >
|
|
4655
|
+
else if (this.reportedByNav.set(t, /* @__PURE__ */ new Set([e.type])), this.navigationHistory.push(t), this.navigationHistory.length > Jt) {
|
|
4644
4656
|
const n = this.navigationHistory.shift();
|
|
4645
4657
|
n && this.reportedByNav.delete(n);
|
|
4646
4658
|
}
|
|
@@ -4767,11 +4779,11 @@ class ae extends _ {
|
|
|
4767
4779
|
const e = Date.now();
|
|
4768
4780
|
if (e < this.burstBackoffUntil)
|
|
4769
4781
|
return !1;
|
|
4770
|
-
if (e - this.burstWindowStart > jt && (this.errorBurstCounter = 0, this.burstWindowStart = e), this.errorBurstCounter++, this.errorBurstCounter >
|
|
4771
|
-
return this.burstBackoffUntil = e +
|
|
4782
|
+
if (e - this.burstWindowStart > jt && (this.errorBurstCounter = 0, this.burstWindowStart = e), this.errorBurstCounter++, this.errorBurstCounter > Kt)
|
|
4783
|
+
return this.burstBackoffUntil = e + Ke, a("debug", "Error burst detected - entering cooldown", {
|
|
4772
4784
|
data: {
|
|
4773
4785
|
errorsInWindow: this.errorBurstCounter,
|
|
4774
|
-
cooldownMs:
|
|
4786
|
+
cooldownMs: Ke
|
|
4775
4787
|
}
|
|
4776
4788
|
}), !1;
|
|
4777
4789
|
const s = this.get("config").errorSampling ?? lt;
|
|
@@ -4861,11 +4873,11 @@ class ae extends _ {
|
|
|
4861
4873
|
}
|
|
4862
4874
|
}
|
|
4863
4875
|
}
|
|
4864
|
-
class
|
|
4876
|
+
class ks extends _ {
|
|
4865
4877
|
isInitialized = !1;
|
|
4866
4878
|
suppressNextScrollTimer = null;
|
|
4867
4879
|
pageUnloadHandler = null;
|
|
4868
|
-
emitter = new
|
|
4880
|
+
emitter = new ps();
|
|
4869
4881
|
transformers = {};
|
|
4870
4882
|
customHeadersProvider;
|
|
4871
4883
|
managers = {};
|
|
@@ -4884,11 +4896,11 @@ class Ps extends _ {
|
|
|
4884
4896
|
async init(e = {}) {
|
|
4885
4897
|
if (this.isInitialized)
|
|
4886
4898
|
return { sessionId: this.get("sessionId") ?? "" };
|
|
4887
|
-
this.managers.storage = new
|
|
4899
|
+
this.managers.storage = new Ps();
|
|
4888
4900
|
try {
|
|
4889
4901
|
this.setupState(e);
|
|
4890
4902
|
const t = e.integrations?.custom?.headers ?? {}, s = e.integrations?.custom?.fetchCredentials ?? "include";
|
|
4891
|
-
return this.managers.event = new
|
|
4903
|
+
return this.managers.event = new vs(
|
|
4892
4904
|
this.managers.storage,
|
|
4893
4905
|
this.emitter,
|
|
4894
4906
|
this.transformers,
|
|
@@ -4918,7 +4930,7 @@ class Ps extends _ {
|
|
|
4918
4930
|
}
|
|
4919
4931
|
let s = t;
|
|
4920
4932
|
t && typeof t == "object" && !Array.isArray(t) && Object.getPrototypeOf(t) !== Object.prototype && (s = Object.assign({}, t));
|
|
4921
|
-
const { valid: i, error: n, sanitizedMetadata: o } =
|
|
4933
|
+
const { valid: i, error: n, sanitizedMetadata: o } = Es(e, s);
|
|
4922
4934
|
if (!i) {
|
|
4923
4935
|
if (this.get("mode") === ne.QA)
|
|
4924
4936
|
throw new Error(`[TraceLog] Custom event "${e}" validation failed: ${n}`);
|
|
@@ -4988,14 +5000,14 @@ class Ps extends _ {
|
|
|
4988
5000
|
}
|
|
4989
5001
|
setupState(e = {}) {
|
|
4990
5002
|
this.set("config", e);
|
|
4991
|
-
const t =
|
|
5003
|
+
const t = _s.getId(this.managers.storage);
|
|
4992
5004
|
this.set("userId", t);
|
|
4993
|
-
const s =
|
|
5005
|
+
const s = ls(e);
|
|
4994
5006
|
this.set("collectApiUrls", s);
|
|
4995
5007
|
const i = Xt();
|
|
4996
5008
|
this.set("device", i);
|
|
4997
5009
|
const n = ye(window.location.href, e.sensitiveQueryParams);
|
|
4998
|
-
this.set("pageUrl", n),
|
|
5010
|
+
this.set("pageUrl", n), ss() && this.set("mode", ne.QA);
|
|
4999
5011
|
}
|
|
5000
5012
|
/**
|
|
5001
5013
|
* Returns the current configuration object.
|
|
@@ -5222,7 +5234,7 @@ class Ps extends _ {
|
|
|
5222
5234
|
}
|
|
5223
5235
|
initializeHandlers() {
|
|
5224
5236
|
const e = this.get("config");
|
|
5225
|
-
this.handlers.session = new
|
|
5237
|
+
this.handlers.session = new bs(
|
|
5226
5238
|
this.managers.storage,
|
|
5227
5239
|
this.managers.event
|
|
5228
5240
|
), this.handlers.session.startTracking();
|
|
@@ -5231,10 +5243,10 @@ class Ps extends _ {
|
|
|
5231
5243
|
this.set("suppressNextScroll", !1);
|
|
5232
5244
|
}, 500);
|
|
5233
5245
|
};
|
|
5234
|
-
if (this.handlers.pageView = new
|
|
5246
|
+
if (this.handlers.pageView = new Ls(this.managers.event, t), this.handlers.pageView.startTracking(), this.handlers.click = new As(this.managers.event), this.handlers.click.startTracking(), this.handlers.scroll = new Ms(this.managers.event), this.handlers.scroll.startTracking(), this.handlers.performance = new Ds(this.managers.event), this.handlers.performance.startTracking().catch((s) => {
|
|
5235
5247
|
a("warn", "Failed to start performance tracking", { error: s });
|
|
5236
|
-
}), this.handlers.error = new ae(this.managers.event), this.handlers.error.startTracking(), e.viewport && (this.handlers.viewport = new
|
|
5237
|
-
const s = new
|
|
5248
|
+
}), this.handlers.error = new ae(this.managers.event), this.handlers.error.startTracking(), e.viewport && (this.handlers.viewport = new Cs(this.managers.event), this.handlers.viewport.startTracking()), e.integrations?.tracelog?.shopify) {
|
|
5249
|
+
const s = new Os();
|
|
5238
5250
|
s.activate(), this.integrationInstances.shopifyCartLinker = s, this.emitter.on(se.EVENT, (i) => {
|
|
5239
5251
|
i.type === u.SESSION_START && s.onSessionChange();
|
|
5240
5252
|
});
|
|
@@ -5243,9 +5255,9 @@ class Ps extends _ {
|
|
|
5243
5255
|
}
|
|
5244
5256
|
const k = [], M = [];
|
|
5245
5257
|
let D = null, h = null, R = !1, T = !1, P = null;
|
|
5246
|
-
const
|
|
5258
|
+
const Vs = async (r) => typeof window > "u" || typeof document > "u" ? { sessionId: "" } : (T = !1, window.__traceLogDisabled === !0 ? { sessionId: "" } : h ? { sessionId: h.getSessionId() ?? "" } : (R && P || (R = !0, P = (async () => {
|
|
5247
5259
|
try {
|
|
5248
|
-
const e =
|
|
5260
|
+
const e = fs(r ?? {}), t = new ks();
|
|
5249
5261
|
try {
|
|
5250
5262
|
k.forEach(({ event: o, callback: l }) => {
|
|
5251
5263
|
t.on(o, l);
|
|
@@ -5271,7 +5283,7 @@ const Ds = async (r) => typeof window > "u" || typeof document > "u" ? { session
|
|
|
5271
5283
|
} finally {
|
|
5272
5284
|
R = !1, P = null;
|
|
5273
5285
|
}
|
|
5274
|
-
})()), P)),
|
|
5286
|
+
})()), P)), Us = (r, e) => {
|
|
5275
5287
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5276
5288
|
if (!h)
|
|
5277
5289
|
throw new Error("[TraceLog] TraceLog not initialized. Please call init() first.");
|
|
@@ -5279,7 +5291,7 @@ const Ds = async (r) => typeof window > "u" || typeof document > "u" ? { session
|
|
|
5279
5291
|
throw new Error("[TraceLog] Cannot send events while TraceLog is being destroyed");
|
|
5280
5292
|
h.sendCustomEvent(r, e);
|
|
5281
5293
|
}
|
|
5282
|
-
},
|
|
5294
|
+
}, Fs = (r, e) => {
|
|
5283
5295
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5284
5296
|
if (!h || R) {
|
|
5285
5297
|
k.push({ event: r, callback: e });
|
|
@@ -5287,7 +5299,7 @@ const Ds = async (r) => typeof window > "u" || typeof document > "u" ? { session
|
|
|
5287
5299
|
}
|
|
5288
5300
|
h.on(r, e);
|
|
5289
5301
|
}
|
|
5290
|
-
},
|
|
5302
|
+
}, Hs = (r, e) => {
|
|
5291
5303
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5292
5304
|
if (!h) {
|
|
5293
5305
|
const t = k.findIndex((s) => s.event === r && s.callback === e);
|
|
@@ -5297,7 +5309,7 @@ const Ds = async (r) => typeof window > "u" || typeof document > "u" ? { session
|
|
|
5297
5309
|
h.off(r, e);
|
|
5298
5310
|
}
|
|
5299
5311
|
};
|
|
5300
|
-
function
|
|
5312
|
+
function xs(r, e) {
|
|
5301
5313
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5302
5314
|
if (typeof e != "function")
|
|
5303
5315
|
throw new Error(`[TraceLog] Transformer must be a function, received: ${typeof e}`);
|
|
@@ -5311,7 +5323,7 @@ function Fs(r, e) {
|
|
|
5311
5323
|
r === "beforeSend" ? h.setTransformer("beforeSend", e) : h.setTransformer("beforeBatch", e);
|
|
5312
5324
|
}
|
|
5313
5325
|
}
|
|
5314
|
-
const
|
|
5326
|
+
const $s = (r) => {
|
|
5315
5327
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5316
5328
|
if (!h) {
|
|
5317
5329
|
const e = M.findIndex((t) => t.hook === r);
|
|
@@ -5322,7 +5334,7 @@ const Hs = (r) => {
|
|
|
5322
5334
|
throw new Error("[TraceLog] Cannot remove transformers while TraceLog is being destroyed");
|
|
5323
5335
|
h.removeTransformer(r);
|
|
5324
5336
|
}
|
|
5325
|
-
},
|
|
5337
|
+
}, Bs = (r) => {
|
|
5326
5338
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5327
5339
|
if (typeof r != "function")
|
|
5328
5340
|
throw new Error(`[TraceLog] Custom headers provider must be a function, received: ${typeof r}`);
|
|
@@ -5334,7 +5346,7 @@ const Hs = (r) => {
|
|
|
5334
5346
|
throw new Error("[TraceLog] Cannot set custom headers while TraceLog is being destroyed");
|
|
5335
5347
|
h.setCustomHeaders(r);
|
|
5336
5348
|
}
|
|
5337
|
-
},
|
|
5349
|
+
}, Ws = () => {
|
|
5338
5350
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5339
5351
|
if (!h) {
|
|
5340
5352
|
D = null;
|
|
@@ -5344,7 +5356,7 @@ const Hs = (r) => {
|
|
|
5344
5356
|
throw new Error("[TraceLog] Cannot remove custom headers while TraceLog is being destroyed");
|
|
5345
5357
|
h.removeCustomHeaders();
|
|
5346
5358
|
}
|
|
5347
|
-
},
|
|
5359
|
+
}, Xs = () => typeof window > "u" || typeof document > "u" ? !1 : h !== null, Gs = () => typeof window > "u" || typeof document > "u" || !h ? null : h.getSessionId(), js = () => {
|
|
5348
5360
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5349
5361
|
if (T)
|
|
5350
5362
|
throw new Error("[TraceLog] Destroy operation already in progress");
|
|
@@ -5359,9 +5371,9 @@ const Hs = (r) => {
|
|
|
5359
5371
|
h = null, R = !1, P = null, k.length = 0, M.length = 0, D = null, T = !1, a("warn", "Error during destroy, forced cleanup completed", { error: r });
|
|
5360
5372
|
}
|
|
5361
5373
|
}
|
|
5362
|
-
},
|
|
5363
|
-
typeof window > "u" || typeof document > "u" ||
|
|
5364
|
-
},
|
|
5374
|
+
}, Ks = (r) => {
|
|
5375
|
+
typeof window > "u" || typeof document > "u" || rs(r);
|
|
5376
|
+
}, zs = (r) => {
|
|
5365
5377
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5366
5378
|
if (!h)
|
|
5367
5379
|
throw new Error("[TraceLog] TraceLog not initialized. Please call init() first.");
|
|
@@ -5369,7 +5381,7 @@ const Hs = (r) => {
|
|
|
5369
5381
|
throw new Error("[TraceLog] Cannot update metadata while TraceLog is being destroyed");
|
|
5370
5382
|
h.updateGlobalMetadata(r);
|
|
5371
5383
|
}
|
|
5372
|
-
},
|
|
5384
|
+
}, Qs = (r) => {
|
|
5373
5385
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5374
5386
|
if (!h)
|
|
5375
5387
|
throw new Error("[TraceLog] TraceLog not initialized. Please call init() first.");
|
|
@@ -5377,7 +5389,7 @@ const Hs = (r) => {
|
|
|
5377
5389
|
throw new Error("[TraceLog] Cannot update metadata while TraceLog is being destroyed");
|
|
5378
5390
|
h.mergeGlobalMetadata(r);
|
|
5379
5391
|
}
|
|
5380
|
-
},
|
|
5392
|
+
}, Ys = (r, e) => {
|
|
5381
5393
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5382
5394
|
if (!r || typeof r != "string" || r.trim().length === 0) {
|
|
5383
5395
|
a("warn", "identify() called with invalid userId");
|
|
@@ -5405,7 +5417,7 @@ const Hs = (r) => {
|
|
|
5405
5417
|
a("debug", "Failed to persist pre-init identity");
|
|
5406
5418
|
}
|
|
5407
5419
|
}
|
|
5408
|
-
},
|
|
5420
|
+
}, qs = async () => {
|
|
5409
5421
|
if (!(typeof window > "u" || typeof document > "u")) {
|
|
5410
5422
|
if (!h) {
|
|
5411
5423
|
try {
|
|
@@ -5418,23 +5430,23 @@ const Hs = (r) => {
|
|
|
5418
5430
|
throw new Error("[TraceLog] Cannot reset identity while TraceLog is being destroyed");
|
|
5419
5431
|
await h.resetIdentity();
|
|
5420
5432
|
}
|
|
5421
|
-
},
|
|
5422
|
-
init:
|
|
5423
|
-
event:
|
|
5424
|
-
on:
|
|
5425
|
-
off:
|
|
5426
|
-
setTransformer:
|
|
5427
|
-
removeTransformer:
|
|
5428
|
-
setCustomHeaders:
|
|
5429
|
-
removeCustomHeaders:
|
|
5430
|
-
isInitialized:
|
|
5431
|
-
getSessionId:
|
|
5432
|
-
destroy:
|
|
5433
|
-
setQaMode:
|
|
5434
|
-
updateGlobalMetadata:
|
|
5435
|
-
mergeGlobalMetadata:
|
|
5436
|
-
identify:
|
|
5437
|
-
resetIdentity:
|
|
5433
|
+
}, Lr = {
|
|
5434
|
+
init: Vs,
|
|
5435
|
+
event: Us,
|
|
5436
|
+
on: Fs,
|
|
5437
|
+
off: Hs,
|
|
5438
|
+
setTransformer: xs,
|
|
5439
|
+
removeTransformer: $s,
|
|
5440
|
+
setCustomHeaders: Bs,
|
|
5441
|
+
removeCustomHeaders: Ws,
|
|
5442
|
+
isInitialized: Xs,
|
|
5443
|
+
getSessionId: Gs,
|
|
5444
|
+
destroy: js,
|
|
5445
|
+
setQaMode: Ks,
|
|
5446
|
+
updateGlobalMetadata: zs,
|
|
5447
|
+
mergeGlobalMetadata: Qs,
|
|
5448
|
+
identify: Ys,
|
|
5449
|
+
resetIdentity: qs
|
|
5438
5450
|
};
|
|
5439
5451
|
var Le, C, G, Et, le, pt = -1, V = function(r) {
|
|
5440
5452
|
addEventListener("pageshow", (function(e) {
|
|
@@ -5474,7 +5486,7 @@ var Le, C, G, Et, le, pt = -1, V = function(r) {
|
|
|
5474
5486
|
return r();
|
|
5475
5487
|
}));
|
|
5476
5488
|
}));
|
|
5477
|
-
},
|
|
5489
|
+
}, K = function(r) {
|
|
5478
5490
|
document.addEventListener("visibilitychange", (function() {
|
|
5479
5491
|
document.visibilityState === "hidden" && r();
|
|
5480
5492
|
}));
|
|
@@ -5486,10 +5498,10 @@ var Le, C, G, Et, le, pt = -1, V = function(r) {
|
|
|
5486
5498
|
}, F = -1, et = function() {
|
|
5487
5499
|
return document.visibilityState !== "hidden" || document.prerendering ? 1 / 0 : 0;
|
|
5488
5500
|
}, ce = function(r) {
|
|
5489
|
-
document.visibilityState === "hidden" && F > -1 && (F = r.type === "visibilitychange" ? r.timeStamp : 0,
|
|
5501
|
+
document.visibilityState === "hidden" && F > -1 && (F = r.type === "visibilitychange" ? r.timeStamp : 0, Js());
|
|
5490
5502
|
}, tt = function() {
|
|
5491
5503
|
addEventListener("visibilitychange", ce, !0), addEventListener("prerenderingchange", ce, !0);
|
|
5492
|
-
},
|
|
5504
|
+
}, Js = function() {
|
|
5493
5505
|
removeEventListener("visibilitychange", ce, !0), removeEventListener("prerenderingchange", ce, !0);
|
|
5494
5506
|
}, ke = function() {
|
|
5495
5507
|
return F < 0 && (F = et(), tt(), V((function() {
|
|
@@ -5499,12 +5511,12 @@ var Le, C, G, Et, le, pt = -1, V = function(r) {
|
|
|
5499
5511
|
}))), { get firstHiddenTime() {
|
|
5500
5512
|
return F;
|
|
5501
5513
|
} };
|
|
5502
|
-
},
|
|
5514
|
+
}, z = function(r) {
|
|
5503
5515
|
document.prerendering ? addEventListener("prerenderingchange", (function() {
|
|
5504
5516
|
return r();
|
|
5505
5517
|
}), !0) : r();
|
|
5506
5518
|
}, Ae = [1800, 3e3], St = function(r, e) {
|
|
5507
|
-
e = e || {},
|
|
5519
|
+
e = e || {}, z((function() {
|
|
5508
5520
|
var t, s = ke(), i = y("FCP"), n = H("paint", (function(o) {
|
|
5509
5521
|
o.forEach((function(l) {
|
|
5510
5522
|
l.name === "first-contentful-paint" && (n.disconnect(), l.startTime < s.firstHiddenTime && (i.value = Math.max(l.startTime - de(), 0), i.entries.push(l), t(!0)));
|
|
@@ -5516,7 +5528,7 @@ var Le, C, G, Et, le, pt = -1, V = function(r) {
|
|
|
5516
5528
|
}));
|
|
5517
5529
|
})));
|
|
5518
5530
|
}));
|
|
5519
|
-
}, Me = [0.1, 0.25],
|
|
5531
|
+
}, Me = [0.1, 0.25], Zs = function(r, e) {
|
|
5520
5532
|
e = e || {}, St(ue((function() {
|
|
5521
5533
|
var t, s = y("CLS", 0), i = 0, n = [], o = function(c) {
|
|
5522
5534
|
c.forEach((function(d) {
|
|
@@ -5526,7 +5538,7 @@ var Le, C, G, Et, le, pt = -1, V = function(r) {
|
|
|
5526
5538
|
}
|
|
5527
5539
|
})), i > s.value && (s.value = i, s.entries = n, t());
|
|
5528
5540
|
}, l = H("layout-shift", o);
|
|
5529
|
-
l && (t = w(r, s, Me, e.reportAllChanges),
|
|
5541
|
+
l && (t = w(r, s, Me, e.reportAllChanges), K((function() {
|
|
5530
5542
|
o(l.takeRecords()), t(!0);
|
|
5531
5543
|
})), V((function() {
|
|
5532
5544
|
i = 0, s = y("CLS", 0), t = w(r, s, Me, e.reportAllChanges), De((function() {
|
|
@@ -5534,19 +5546,19 @@ var Le, C, G, Et, le, pt = -1, V = function(r) {
|
|
|
5534
5546
|
}));
|
|
5535
5547
|
})), setTimeout(t, 0));
|
|
5536
5548
|
})));
|
|
5537
|
-
}, Tt = 0, pe = 1 / 0, J = 0,
|
|
5549
|
+
}, Tt = 0, pe = 1 / 0, J = 0, er = function(r) {
|
|
5538
5550
|
r.forEach((function(e) {
|
|
5539
5551
|
e.interactionId && (pe = Math.min(pe, e.interactionId), J = Math.max(J, e.interactionId), Tt = J ? (J - pe) / 7 + 1 : 0);
|
|
5540
5552
|
}));
|
|
5541
5553
|
}, It = function() {
|
|
5542
5554
|
return Le ? Tt : performance.interactionCount || 0;
|
|
5543
|
-
},
|
|
5544
|
-
"interactionCount" in performance || Le || (Le = H("event",
|
|
5545
|
-
}, L = [], te = /* @__PURE__ */ new Map(), vt = 0,
|
|
5555
|
+
}, tr = function() {
|
|
5556
|
+
"interactionCount" in performance || Le || (Le = H("event", er, { type: "event", buffered: !0, durationThreshold: 0 }));
|
|
5557
|
+
}, L = [], te = /* @__PURE__ */ new Map(), vt = 0, sr = function() {
|
|
5546
5558
|
var r = Math.min(L.length - 1, Math.floor((It() - vt) / 50));
|
|
5547
5559
|
return L[r];
|
|
5548
|
-
},
|
|
5549
|
-
if (
|
|
5560
|
+
}, rr = [], ir = function(r) {
|
|
5561
|
+
if (rr.forEach((function(i) {
|
|
5550
5562
|
return i(r);
|
|
5551
5563
|
})), r.interactionId || r.entryType === "first-input") {
|
|
5552
5564
|
var e = L[L.length - 1], t = te.get(r.interactionId);
|
|
@@ -5565,26 +5577,26 @@ var Le, C, G, Et, le, pt = -1, V = function(r) {
|
|
|
5565
5577
|
}
|
|
5566
5578
|
}, _t = function(r) {
|
|
5567
5579
|
var e = self.requestIdleCallback || self.setTimeout, t = -1;
|
|
5568
|
-
return r = ue(r), document.visibilityState === "hidden" ? r() : (t = e(r),
|
|
5569
|
-
}, Ce = [200, 500],
|
|
5570
|
-
"PerformanceEventTiming" in self && "interactionId" in PerformanceEventTiming.prototype && (e = e || {},
|
|
5580
|
+
return r = ue(r), document.visibilityState === "hidden" ? r() : (t = e(r), K(r)), t;
|
|
5581
|
+
}, Ce = [200, 500], nr = function(r, e) {
|
|
5582
|
+
"PerformanceEventTiming" in self && "interactionId" in PerformanceEventTiming.prototype && (e = e || {}, z((function() {
|
|
5571
5583
|
var t;
|
|
5572
|
-
|
|
5584
|
+
tr();
|
|
5573
5585
|
var s, i = y("INP"), n = function(l) {
|
|
5574
5586
|
_t((function() {
|
|
5575
|
-
l.forEach(
|
|
5576
|
-
var c =
|
|
5587
|
+
l.forEach(ir);
|
|
5588
|
+
var c = sr();
|
|
5577
5589
|
c && c.latency !== i.value && (i.value = c.latency, i.entries = c.entries, s());
|
|
5578
5590
|
}));
|
|
5579
5591
|
}, o = H("event", n, { durationThreshold: (t = e.durationThreshold) !== null && t !== void 0 ? t : 40 });
|
|
5580
|
-
s = w(r, i, Ce, e.reportAllChanges), o && (o.observe({ type: "first-input", buffered: !0 }),
|
|
5592
|
+
s = w(r, i, Ce, e.reportAllChanges), o && (o.observe({ type: "first-input", buffered: !0 }), K((function() {
|
|
5581
5593
|
n(o.takeRecords()), s(!0);
|
|
5582
5594
|
})), V((function() {
|
|
5583
5595
|
vt = It(), L.length = 0, te.clear(), i = y("INP"), s = w(r, i, Ce, e.reportAllChanges);
|
|
5584
5596
|
})));
|
|
5585
5597
|
})));
|
|
5586
|
-
}, Re = [2500, 4e3], Se = {},
|
|
5587
|
-
e = e || {},
|
|
5598
|
+
}, Re = [2500, 4e3], Se = {}, or = function(r, e) {
|
|
5599
|
+
e = e || {}, z((function() {
|
|
5588
5600
|
var t, s = ke(), i = y("LCP"), n = function(c) {
|
|
5589
5601
|
e.reportAllChanges || (c = c.slice(-1)), c.forEach((function(d) {
|
|
5590
5602
|
d.startTime < s.firstHiddenTime && (i.value = Math.max(d.startTime - de(), 0), i.entries = [d], t());
|
|
@@ -5599,38 +5611,38 @@ var Le, C, G, Et, le, pt = -1, V = function(r) {
|
|
|
5599
5611
|
addEventListener(c, (function() {
|
|
5600
5612
|
return _t(l);
|
|
5601
5613
|
}), { once: !0, capture: !0 });
|
|
5602
|
-
})),
|
|
5614
|
+
})), K(l), V((function(c) {
|
|
5603
5615
|
i = y("LCP"), t = w(r, i, Re, e.reportAllChanges), De((function() {
|
|
5604
5616
|
i.value = performance.now() - c.timeStamp, Se[i.id] = !0, t(!0);
|
|
5605
5617
|
}));
|
|
5606
5618
|
}));
|
|
5607
5619
|
}
|
|
5608
5620
|
}));
|
|
5609
|
-
}, Ne = [800, 1800],
|
|
5610
|
-
document.prerendering ?
|
|
5621
|
+
}, Ne = [800, 1800], ar = function r(e) {
|
|
5622
|
+
document.prerendering ? z((function() {
|
|
5611
5623
|
return r(e);
|
|
5612
5624
|
})) : document.readyState !== "complete" ? addEventListener("load", (function() {
|
|
5613
5625
|
return r(e);
|
|
5614
5626
|
}), !0) : setTimeout(e, 0);
|
|
5615
|
-
},
|
|
5627
|
+
}, lr = function(r, e) {
|
|
5616
5628
|
e = e || {};
|
|
5617
5629
|
var t = y("TTFB"), s = w(r, t, Ne, e.reportAllChanges);
|
|
5618
|
-
|
|
5630
|
+
ar((function() {
|
|
5619
5631
|
var i = Pe();
|
|
5620
5632
|
i && (t.value = Math.max(i.responseStart - de(), 0), t.entries = [i], s(!0), V((function() {
|
|
5621
5633
|
t = y("TTFB", 0), (s = w(r, t, Ne, e.reportAllChanges))(!0);
|
|
5622
5634
|
})));
|
|
5623
5635
|
}));
|
|
5624
|
-
}, W = { passive: !0, capture: !0 },
|
|
5636
|
+
}, W = { passive: !0, capture: !0 }, cr = /* @__PURE__ */ new Date(), st = function(r, e) {
|
|
5625
5637
|
C || (C = e, G = r, Et = /* @__PURE__ */ new Date(), wt(removeEventListener), yt());
|
|
5626
5638
|
}, yt = function() {
|
|
5627
|
-
if (G >= 0 && G < Et -
|
|
5639
|
+
if (G >= 0 && G < Et - cr) {
|
|
5628
5640
|
var r = { entryType: "first-input", name: C.type, target: C.target, cancelable: C.cancelable, startTime: C.timeStamp, processingStart: C.timeStamp + G };
|
|
5629
5641
|
le.forEach((function(e) {
|
|
5630
5642
|
e(r);
|
|
5631
5643
|
})), le = [];
|
|
5632
5644
|
}
|
|
5633
|
-
},
|
|
5645
|
+
}, dr = function(r) {
|
|
5634
5646
|
if (r.cancelable) {
|
|
5635
5647
|
var e = (r.timeStamp > 1e12 ? /* @__PURE__ */ new Date() : performance.now()) - r.timeStamp;
|
|
5636
5648
|
r.type == "pointerdown" ? (function(t, s) {
|
|
@@ -5646,16 +5658,16 @@ var Le, C, G, Et, le, pt = -1, V = function(r) {
|
|
|
5646
5658
|
}
|
|
5647
5659
|
}, wt = function(r) {
|
|
5648
5660
|
["mousedown", "keydown", "touchstart", "pointerdown"].forEach((function(e) {
|
|
5649
|
-
return r(e,
|
|
5661
|
+
return r(e, dr, W);
|
|
5650
5662
|
}));
|
|
5651
|
-
}, Oe = [100, 300],
|
|
5652
|
-
e = e || {},
|
|
5663
|
+
}, Oe = [100, 300], ur = function(r, e) {
|
|
5664
|
+
e = e || {}, z((function() {
|
|
5653
5665
|
var t, s = ke(), i = y("FID"), n = function(c) {
|
|
5654
5666
|
c.startTime < s.firstHiddenTime && (i.value = c.processingStart - c.startTime, i.entries.push(c), t(!0));
|
|
5655
5667
|
}, o = function(c) {
|
|
5656
5668
|
c.forEach(n);
|
|
5657
5669
|
}, l = H("first-input", o);
|
|
5658
|
-
t = w(r, i, Oe, e.reportAllChanges), l && (
|
|
5670
|
+
t = w(r, i, Oe, e.reportAllChanges), l && (K(ue((function() {
|
|
5659
5671
|
o(l.takeRecords()), l.disconnect();
|
|
5660
5672
|
}))), V((function() {
|
|
5661
5673
|
var c;
|
|
@@ -5663,7 +5675,7 @@ var Le, C, G, Et, le, pt = -1, V = function(r) {
|
|
|
5663
5675
|
})));
|
|
5664
5676
|
}));
|
|
5665
5677
|
};
|
|
5666
|
-
const
|
|
5678
|
+
const hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
5667
5679
|
__proto__: null,
|
|
5668
5680
|
CLSThresholds: Me,
|
|
5669
5681
|
FCPThresholds: Ae,
|
|
@@ -5671,31 +5683,31 @@ const dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
5671
5683
|
INPThresholds: Ce,
|
|
5672
5684
|
LCPThresholds: Re,
|
|
5673
5685
|
TTFBThresholds: Ne,
|
|
5674
|
-
onCLS:
|
|
5686
|
+
onCLS: Zs,
|
|
5675
5687
|
onFCP: St,
|
|
5676
|
-
onFID:
|
|
5677
|
-
onINP:
|
|
5678
|
-
onLCP:
|
|
5679
|
-
onTTFB:
|
|
5688
|
+
onFID: ur,
|
|
5689
|
+
onINP: nr,
|
|
5690
|
+
onLCP: or,
|
|
5691
|
+
onTTFB: lr
|
|
5680
5692
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
5681
5693
|
export {
|
|
5682
5694
|
m as AppConfigValidationError,
|
|
5683
|
-
|
|
5695
|
+
fr as DEFAULT_SESSION_TIMEOUT,
|
|
5684
5696
|
_e as DEFAULT_WEB_VITALS_MODE,
|
|
5685
5697
|
A as DeviceType,
|
|
5686
5698
|
se as EmitterEvent,
|
|
5687
5699
|
B as ErrorType,
|
|
5688
5700
|
u as EventType,
|
|
5689
|
-
|
|
5701
|
+
wr as InitializationTimeoutError,
|
|
5690
5702
|
N as IntegrationValidationError,
|
|
5691
|
-
|
|
5692
|
-
|
|
5693
|
-
|
|
5694
|
-
|
|
5695
|
-
|
|
5696
|
-
|
|
5697
|
-
|
|
5698
|
-
|
|
5703
|
+
vr as MAX_ARRAY_LENGTH,
|
|
5704
|
+
pr as MAX_CUSTOM_EVENT_ARRAY_SIZE,
|
|
5705
|
+
Er as MAX_CUSTOM_EVENT_KEYS,
|
|
5706
|
+
mr as MAX_CUSTOM_EVENT_NAME_LENGTH,
|
|
5707
|
+
gr as MAX_CUSTOM_EVENT_STRING_SIZE,
|
|
5708
|
+
Sr as MAX_NESTED_OBJECT_KEYS,
|
|
5709
|
+
Tr as MAX_STRING_LENGTH,
|
|
5710
|
+
Ir as MAX_STRING_LENGTH_IN_ARRAY,
|
|
5699
5711
|
ne as Mode,
|
|
5700
5712
|
at as PII_PATTERNS,
|
|
5701
5713
|
O as PermanentError,
|
|
@@ -5706,11 +5718,11 @@ export {
|
|
|
5706
5718
|
$ as SpecialApiUrl,
|
|
5707
5719
|
ie as TimeoutError,
|
|
5708
5720
|
j as TraceLogValidationError,
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5721
|
+
br as WEB_VITALS_GOOD_THRESHOLDS,
|
|
5722
|
+
ze as WEB_VITALS_NEEDS_IMPROVEMENT_THRESHOLDS,
|
|
5723
|
+
Yt as WEB_VITALS_POOR_THRESHOLDS,
|
|
5712
5724
|
Qe as getWebVitalsThresholds,
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5725
|
+
_r as isPrimaryScrollEvent,
|
|
5726
|
+
yr as isSecondaryScrollEvent,
|
|
5727
|
+
Lr as tracelog
|
|
5716
5728
|
};
|