@jumio/websdk 0.3.8 → 0.3.10
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/README.md +10 -8
- package/assets/BRAZILIAN_ID.BychxTsM.webp +0 -0
- package/assets/BRAZILIAN_ID.COOwtpxb.js +5 -0
- package/assets/style.css +1 -388
- package/dd/profiler-DTWkT7Mn.js +235 -0
- package/dd/startRecording-DqW-BV0C.js +1494 -0
- package/{ar.6FvD271D.js → i18n/ar.ClpiOMp8.js} +18 -6
- package/{az.xV1CTm4w.js → i18n/az.Zjkmxx0W.js} +17 -5
- package/{bg.CCHtVJ8V.js → i18n/bg.TQ5gDhpN.js} +17 -5
- package/{bn.DDCfJGfy.js → i18n/bn.DqLfaDm8.js} +18 -6
- package/{ca.BmzzNtsu.js → i18n/ca.N1Ii2N6w.js} +17 -5
- package/{ceb.DP4PBOky.js → i18n/ceb.DGoxFAno.js} +17 -5
- package/{cs.CF_-gGCz.js → i18n/cs.B219Ze7G.js} +17 -5
- package/{da.BvNYfmLS.js → i18n/da.BmYd7JeC.js} +18 -6
- package/{de.ChoKs_Ih.js → i18n/de.4yYjZHjq.js} +17 -5
- package/{el.CmH9V0Yg.js → i18n/el.w7n6P_Tm.js} +17 -5
- package/{en._TYEyLHi.js → i18n/en.Ct44TlJ6.js} +15 -3
- package/{en_GB.0E4-hrRx.js → i18n/en_GB.DZfrkPbd.js} +15 -3
- package/{es.D__FE4D_.js → i18n/es.DcA3jLM9.js} +17 -5
- package/{es_MX.Db15FX9q.js → i18n/es_MX.ClqTjKZ-.js} +17 -5
- package/{et.Gn0z9Ivj.js → i18n/et.MMOd-uTo.js} +17 -5
- package/{fi.DzSyn__-.js → i18n/fi.CWbrDO4V.js} +17 -5
- package/{fil.DbXgzFds.js → i18n/fil.BJfPVW56.js} +17 -5
- package/{fr.Nad_Iv9w.js → i18n/fr.CjZ5cmiI.js} +17 -5
- package/{fr_CA.BqIhyqJg.js → i18n/fr_CA.CtHm7-qi.js} +19 -7
- package/{ga.DZftCvLf.js → i18n/ga.D6-1kfWr.js} +17 -5
- package/{he.D_Ot5G9X.js → i18n/he.Bi8juarT.js} +17 -5
- package/{hi.k1gL9P6R.js → i18n/hi.CFfDmSnf.js} +19 -7
- package/{hr.CFkMZjpr.js → i18n/hr.DZlUE7C8.js} +16 -4
- package/{hu.ChFZfAE3.js → i18n/hu.BpD-aMLX.js} +17 -5
- package/{hy.DNM9FTFD.js → i18n/hy.BaLqt_2N.js} +17 -5
- package/{id.CUwbO5IH.js → i18n/id.uRdF9gWF.js} +17 -5
- package/{is.hApbPYEY.js → i18n/is.BYQe-WHx.js} +17 -5
- package/{it.Bhegj4nF.js → i18n/it.CkU67L1U.js} +17 -5
- package/{ja.CJXtbCJw.js → i18n/ja.BH3qTT3H.js} +17 -5
- package/{jv.DQNROsUW.js → i18n/jv.B4fRWclO.js} +17 -5
- package/{ka_GE.DRQWZxDK.js → i18n/ka_GE.CTzSn9eo.js} +17 -5
- package/{kk.SmX8cO85.js → i18n/kk.C0siUu93.js} +17 -5
- package/{km_KH.tErSrUl8.js → i18n/km_KH.ZTbV01Qz.js} +17 -5
- package/{ko.BSuxjnwo.js → i18n/ko.Bb4J3kDH.js} +17 -5
- package/{lt.9xY-bF8b.js → i18n/lt.D3asVxYB.js} +16 -4
- package/{lv.KAJ3Th5c.js → i18n/lv.fkwne764.js} +17 -5
- package/{ms.B8ifUn3g.js → i18n/ms.DEHT6MDZ.js} +17 -5
- package/{my.46LpbgwX.js → i18n/my.CRVpYNLc.js} +17 -5
- package/{nl.jT_sFmTM.js → i18n/nl.DV_Z3712.js} +17 -5
- package/{no.C7sncEKD.js → i18n/no.C91-fx2t.js} +17 -5
- package/{pl.5XkGPjIZ.js → i18n/pl.deHkL4G-.js} +17 -5
- package/{pt.DgAAo08E.js → i18n/pt.D7DApQ_g.js} +17 -5
- package/{pt_BR.DEMIQWXD.js → i18n/pt_BR.DeWUm5I5.js} +17 -5
- package/{ro.O04ahCMK.js → i18n/ro.Bgy4hiF2.js} +17 -5
- package/{ru.58VavBFj.js → i18n/ru.Cn-5tOIR.js} +17 -5
- package/{sk.CKOgMaWx.js → i18n/sk.rlnyfpQR.js} +17 -5
- package/{sl.T6u4zQdv.js → i18n/sl.BHBnOa58.js} +21 -9
- package/{sq.DhxxMSD4.js → i18n/sq.qB--p25v.js} +17 -5
- package/{sr_Cyrl.ScPJhaK1.js → i18n/sr_Cyrl.CSBzkXjX.js} +16 -4
- package/{sr_Latn.ClgaYy2P.js → i18n/sr_Latn._nXdqCNI.js} +16 -4
- package/{sv.BqoHH9_Z.js → i18n/sv.exooz9wm.js} +17 -5
- package/{sw.ASoszWzl.js → i18n/sw.BrOra_jt.js} +16 -4
- package/{th.wQot4sEY.js → i18n/th.LZGAQSSx.js} +17 -5
- package/{tr.BgMiJg4a.js → i18n/tr.Dizt7E2M.js} +17 -5
- package/{uk.ODxwJ7HV.js → i18n/uk.xMYrw91N.js} +17 -5
- package/{ur.CE1x0LsE.js → i18n/ur.BmuWXUfh.js} +18 -6
- package/{uz.DBb8NWV6.js → i18n/uz.CzsxPnXQ.js} +21 -9
- package/{vi.DTsjGEnr.js → i18n/vi.B_KdJnMy.js} +17 -5
- package/{zh_CN.C898bOEl.js → i18n/zh_CN.BBdQPt4L.js} +17 -5
- package/{zh_HK.Bi_0oROP.js → i18n/zh_HK.BRzNtOzu.js} +17 -5
- package/index.BloC8BH6.js +64242 -0
- package/index.d.ts +3599 -1043
- package/index.html +41 -13
- package/index.js +24 -822
- package/index2.js +869 -0
- package/ml/assets_da_web_1_1_6.tar.D1WfMJyS.gz +0 -0
- package/ml/assets_da_web_1_1_6.tar.DmSCvmf5.js +5 -0
- package/ml/dac.D2xph-5h.js +5 -0
- package/ml/dac.DeLxs2vM.wasm +0 -0
- package/ml/dac_simd.2xjZJ5dE.js +5 -0
- package/ml/dac_simd.BHe9yV3l.wasm +0 -0
- package/package.json +8 -4
- package/pdfjs/pdf-U_mH0bJO.js +17500 -0
- package/pdfjs/pdf.worker.min-DFxVranA.js +5 -0
- package/third-party-licenses.txt +1684 -8532
- package/BRAZILIAN_ID.BmZRIYzL.js +0 -5
- package/CHANGELOG.md +0 -106
- package/assets/fonts/jumio-sdk-icomoon.svg +0 -117
- package/assets/fonts/jumio-sdk-icomoon.ttf +0 -0
- package/assets/fonts/jumio-sdk-icomoon.woff +0 -0
- package/assets_da_web_1_1_6.tar.CCpLQ2oJ.js +0 -5
- package/dac.C1nISBeT.js +0 -5
- package/dac_simd.CQrYamf5.js +0 -5
- package/index.C0rkfp1G.js +0 -60487
- package/pdfjs/pdf-DDTuoCrJ.js +0 -17532
- package/pdfjs/pdf.worker.min-BJaB4MSa.js +0 -5
- package/profiler.B7SF_C2Q.js +0 -278
- package/startRecording.BFOwOm6d.js +0 -1227
|
@@ -1,1227 +0,0 @@
|
|
|
1
|
-
import { q as K, t as N, u as O, v as x, w, N as S, x as q, y as J, g as mt, z as gt, A as R, B as A, R as St, C as Tt, D as V, E as _, F as Et, P as j, S as yt, G as H, H as It, I as Nt, J as Z, K as wt, L as Mt, M as Ct, O as Rt, Q, T as tt, n as et, U as b, V as xt, W as vt, X as bt, Y as k, Z as _t, _ as Dt, $ as At, a0 as Lt, a1 as Ot, a2 as zt, a3 as Vt, l as kt, k as Pt, a4 as Ft, a5 as Bt, a6 as Ut, c as Ht, a7 as Gt, a as Wt } from "./index.C0rkfp1G.js";
|
|
2
|
-
const I = {
|
|
3
|
-
FullSnapshot: 2,
|
|
4
|
-
IncrementalSnapshot: 3,
|
|
5
|
-
Meta: 4,
|
|
6
|
-
Focus: 6,
|
|
7
|
-
ViewEnd: 7,
|
|
8
|
-
VisualViewport: 8,
|
|
9
|
-
FrustrationRecord: 9
|
|
10
|
-
}, C = {
|
|
11
|
-
Document: 0,
|
|
12
|
-
DocumentType: 1,
|
|
13
|
-
Element: 2,
|
|
14
|
-
Text: 3,
|
|
15
|
-
CDATA: 4,
|
|
16
|
-
DocumentFragment: 11
|
|
17
|
-
}, T = {
|
|
18
|
-
Mutation: 0,
|
|
19
|
-
MouseMove: 1,
|
|
20
|
-
MouseInteraction: 2,
|
|
21
|
-
Scroll: 3,
|
|
22
|
-
ViewportResize: 4,
|
|
23
|
-
Input: 5,
|
|
24
|
-
TouchMove: 6,
|
|
25
|
-
MediaInteraction: 7,
|
|
26
|
-
StyleSheetRule: 8
|
|
27
|
-
// CanvasMutation : 9,
|
|
28
|
-
// Font : 10,
|
|
29
|
-
}, E = {
|
|
30
|
-
MouseUp: 0,
|
|
31
|
-
MouseDown: 1,
|
|
32
|
-
Click: 2,
|
|
33
|
-
ContextMenu: 3,
|
|
34
|
-
DblClick: 4,
|
|
35
|
-
Focus: 5,
|
|
36
|
-
Blur: 6,
|
|
37
|
-
TouchStart: 7,
|
|
38
|
-
TouchEnd: 9
|
|
39
|
-
}, G = {
|
|
40
|
-
Play: 0,
|
|
41
|
-
Pause: 1
|
|
42
|
-
};
|
|
43
|
-
function nt(t) {
|
|
44
|
-
return !!t.changedTouches;
|
|
45
|
-
}
|
|
46
|
-
function D(t) {
|
|
47
|
-
return t.composed === !0 && K(t.target) ? t.composedPath()[0] : t.target;
|
|
48
|
-
}
|
|
49
|
-
const W = 25;
|
|
50
|
-
function $t(t) {
|
|
51
|
-
return Math.abs(t.pageTop - t.offsetTop - window.scrollY) > W || Math.abs(t.pageLeft - t.offsetLeft - window.scrollX) > W;
|
|
52
|
-
}
|
|
53
|
-
const Yt = (t, n) => {
|
|
54
|
-
const e = window.visualViewport, o = {
|
|
55
|
-
layoutViewportX: t,
|
|
56
|
-
layoutViewportY: n,
|
|
57
|
-
visualViewportX: t,
|
|
58
|
-
visualViewportY: n
|
|
59
|
-
};
|
|
60
|
-
if (e)
|
|
61
|
-
$t(e) ? (o.layoutViewportX = Math.round(t + e.offsetLeft), o.layoutViewportY = Math.round(n + e.offsetTop)) : (o.visualViewportX = Math.round(t - e.offsetLeft), o.visualViewportY = Math.round(n - e.offsetTop));
|
|
62
|
-
else return o;
|
|
63
|
-
return o;
|
|
64
|
-
}, st = (t) => ({
|
|
65
|
-
scale: t.scale,
|
|
66
|
-
offsetLeft: t.offsetLeft,
|
|
67
|
-
offsetTop: t.offsetTop,
|
|
68
|
-
pageLeft: t.pageLeft,
|
|
69
|
-
pageTop: t.pageTop,
|
|
70
|
-
height: t.height,
|
|
71
|
-
width: t.width
|
|
72
|
-
});
|
|
73
|
-
function y(t, n) {
|
|
74
|
-
return {
|
|
75
|
-
data: {
|
|
76
|
-
source: t,
|
|
77
|
-
...n
|
|
78
|
-
},
|
|
79
|
-
type: I.IncrementalSnapshot,
|
|
80
|
-
timestamp: N()
|
|
81
|
-
};
|
|
82
|
-
}
|
|
83
|
-
const Xt = 50;
|
|
84
|
-
function Kt(t, n, e) {
|
|
85
|
-
const { throttled: o, cancel: s } = O((r) => {
|
|
86
|
-
const u = D(r), a = n.nodeIds.get(u);
|
|
87
|
-
if (a === void 0)
|
|
88
|
-
return;
|
|
89
|
-
const c = ot(r);
|
|
90
|
-
if (!c)
|
|
91
|
-
return;
|
|
92
|
-
const d = {
|
|
93
|
-
id: a,
|
|
94
|
-
timeOffset: 0,
|
|
95
|
-
x: c.x,
|
|
96
|
-
y: c.y
|
|
97
|
-
};
|
|
98
|
-
e(y(nt(r) ? T.TouchMove : T.MouseMove, { positions: [d] }));
|
|
99
|
-
}, Xt, {
|
|
100
|
-
trailing: !1
|
|
101
|
-
}), { stop: i } = x(t, document, [
|
|
102
|
-
"mousemove",
|
|
103
|
-
"touchmove"
|
|
104
|
-
/* DOM_EVENT.TOUCH_MOVE */
|
|
105
|
-
], o, {
|
|
106
|
-
capture: !0,
|
|
107
|
-
passive: !0
|
|
108
|
-
});
|
|
109
|
-
return {
|
|
110
|
-
stop: () => {
|
|
111
|
-
i(), s();
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
function ot(t) {
|
|
116
|
-
let { clientX: n, clientY: e } = nt(t) ? t.changedTouches[0] : t;
|
|
117
|
-
if (window.visualViewport) {
|
|
118
|
-
const { visualViewportX: o, visualViewportY: s } = Yt(n, e);
|
|
119
|
-
n = o, e = s;
|
|
120
|
-
}
|
|
121
|
-
if (!(!Number.isFinite(n) || !Number.isFinite(e)))
|
|
122
|
-
return { x: n, y: e };
|
|
123
|
-
}
|
|
124
|
-
const $ = {
|
|
125
|
-
// Listen for pointerup DOM events instead of mouseup for MouseInteraction/MouseUp records. This
|
|
126
|
-
// allows to reference such records from Frustration records.
|
|
127
|
-
//
|
|
128
|
-
// In the context of supporting Mobile Session Replay, we introduced `PointerInteraction` records
|
|
129
|
-
// used by the Mobile SDKs in place of `MouseInteraction`. In the future, we should replace
|
|
130
|
-
// `MouseInteraction` by `PointerInteraction` in the Browser SDK so we have an uniform way to
|
|
131
|
-
// convey such interaction. This would cleanly solve the issue since we would have
|
|
132
|
-
// `PointerInteraction/Up` records that we could reference from `Frustration` records.
|
|
133
|
-
pointerup: E.MouseUp,
|
|
134
|
-
mousedown: E.MouseDown,
|
|
135
|
-
click: E.Click,
|
|
136
|
-
contextmenu: E.ContextMenu,
|
|
137
|
-
dblclick: E.DblClick,
|
|
138
|
-
focus: E.Focus,
|
|
139
|
-
blur: E.Blur,
|
|
140
|
-
touchstart: E.TouchStart,
|
|
141
|
-
touchend: E.TouchEnd
|
|
142
|
-
};
|
|
143
|
-
function qt(t, n, e, o) {
|
|
144
|
-
const s = (i) => {
|
|
145
|
-
const r = D(i), u = n.nodeIds.get(r);
|
|
146
|
-
if (u === void 0 || w(r, t.defaultPrivacyLevel) === S.HIDDEN)
|
|
147
|
-
return;
|
|
148
|
-
const a = $[i.type];
|
|
149
|
-
let c;
|
|
150
|
-
if (a !== E.Blur && a !== E.Focus) {
|
|
151
|
-
const l = ot(i);
|
|
152
|
-
if (!l)
|
|
153
|
-
return;
|
|
154
|
-
c = { id: u, type: a, x: l.x, y: l.y };
|
|
155
|
-
} else
|
|
156
|
-
c = { id: u, type: a };
|
|
157
|
-
const d = {
|
|
158
|
-
id: o.getIdForEvent(i),
|
|
159
|
-
...y(T.MouseInteraction, c)
|
|
160
|
-
};
|
|
161
|
-
e(d);
|
|
162
|
-
};
|
|
163
|
-
return x(t, document, Object.keys($), s, {
|
|
164
|
-
capture: !0,
|
|
165
|
-
passive: !0
|
|
166
|
-
});
|
|
167
|
-
}
|
|
168
|
-
const Jt = 100;
|
|
169
|
-
function rt(t, n, e, o, s = document) {
|
|
170
|
-
const { throttled: i, cancel: r } = O((a) => {
|
|
171
|
-
const c = D(a);
|
|
172
|
-
if (!c)
|
|
173
|
-
return;
|
|
174
|
-
const d = n.nodeIds.get(c);
|
|
175
|
-
if (d === void 0 || w(c, t.defaultPrivacyLevel) === S.HIDDEN)
|
|
176
|
-
return;
|
|
177
|
-
const l = c === document ? {
|
|
178
|
-
scrollTop: q(),
|
|
179
|
-
scrollLeft: J()
|
|
180
|
-
} : {
|
|
181
|
-
scrollTop: Math.round(c.scrollTop),
|
|
182
|
-
scrollLeft: Math.round(c.scrollLeft)
|
|
183
|
-
};
|
|
184
|
-
o.set(c, l), e(y(T.Scroll, {
|
|
185
|
-
id: d,
|
|
186
|
-
x: l.scrollLeft,
|
|
187
|
-
y: l.scrollTop
|
|
188
|
-
}));
|
|
189
|
-
}, Jt), { stop: u } = mt(t, s, "scroll", i, {
|
|
190
|
-
capture: !0,
|
|
191
|
-
passive: !0
|
|
192
|
-
});
|
|
193
|
-
return {
|
|
194
|
-
stop: () => {
|
|
195
|
-
u(), r();
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
}
|
|
199
|
-
const jt = 200;
|
|
200
|
-
function Zt(t, n) {
|
|
201
|
-
const e = gt(t).subscribe((o) => {
|
|
202
|
-
n(y(T.ViewportResize, o));
|
|
203
|
-
});
|
|
204
|
-
return {
|
|
205
|
-
stop: () => {
|
|
206
|
-
e.unsubscribe();
|
|
207
|
-
}
|
|
208
|
-
};
|
|
209
|
-
}
|
|
210
|
-
function Qt(t, n) {
|
|
211
|
-
const e = window.visualViewport;
|
|
212
|
-
if (!e)
|
|
213
|
-
return { stop: R };
|
|
214
|
-
const { throttled: o, cancel: s } = O(() => {
|
|
215
|
-
n({
|
|
216
|
-
data: st(e),
|
|
217
|
-
type: I.VisualViewport,
|
|
218
|
-
timestamp: N()
|
|
219
|
-
});
|
|
220
|
-
}, jt, {
|
|
221
|
-
trailing: !1
|
|
222
|
-
}), { stop: i } = x(t, e, [
|
|
223
|
-
"resize",
|
|
224
|
-
"scroll"
|
|
225
|
-
/* DOM_EVENT.SCROLL */
|
|
226
|
-
], o, {
|
|
227
|
-
capture: !0,
|
|
228
|
-
passive: !0
|
|
229
|
-
});
|
|
230
|
-
return {
|
|
231
|
-
stop: () => {
|
|
232
|
-
i(), s();
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
}
|
|
236
|
-
function te(t, n, e) {
|
|
237
|
-
return x(t, document, [
|
|
238
|
-
"play",
|
|
239
|
-
"pause"
|
|
240
|
-
/* DOM_EVENT.PAUSE */
|
|
241
|
-
], (o) => {
|
|
242
|
-
const s = D(o);
|
|
243
|
-
if (!s)
|
|
244
|
-
return;
|
|
245
|
-
const i = n.nodeIds.get(s);
|
|
246
|
-
i === void 0 || w(s, t.defaultPrivacyLevel) === S.HIDDEN || e(y(T.MediaInteraction, {
|
|
247
|
-
id: i,
|
|
248
|
-
type: o.type === "play" ? G.Play : G.Pause
|
|
249
|
-
}));
|
|
250
|
-
}, {
|
|
251
|
-
capture: !0,
|
|
252
|
-
passive: !0
|
|
253
|
-
});
|
|
254
|
-
}
|
|
255
|
-
function ee(t, n) {
|
|
256
|
-
function e(i, r) {
|
|
257
|
-
if (!i || !i.ownerNode)
|
|
258
|
-
return;
|
|
259
|
-
const u = t.nodeIds.get(i.ownerNode);
|
|
260
|
-
u !== void 0 && r(u);
|
|
261
|
-
}
|
|
262
|
-
const o = [
|
|
263
|
-
A(CSSStyleSheet.prototype, "insertRule", ({ target: i, parameters: [r, u] }) => {
|
|
264
|
-
e(i, (a) => n(y(T.StyleSheetRule, {
|
|
265
|
-
id: a,
|
|
266
|
-
adds: [{ rule: r, index: u }]
|
|
267
|
-
})));
|
|
268
|
-
}),
|
|
269
|
-
A(CSSStyleSheet.prototype, "deleteRule", ({ target: i, parameters: [r] }) => {
|
|
270
|
-
e(i, (u) => n(y(T.StyleSheetRule, {
|
|
271
|
-
id: u,
|
|
272
|
-
removes: [{ index: r }]
|
|
273
|
-
})));
|
|
274
|
-
})
|
|
275
|
-
];
|
|
276
|
-
typeof CSSGroupingRule < "u" ? s(CSSGroupingRule) : (s(CSSMediaRule), s(CSSSupportsRule));
|
|
277
|
-
function s(i) {
|
|
278
|
-
o.push(A(i.prototype, "insertRule", ({ target: r, parameters: [u, a] }) => {
|
|
279
|
-
e(r.parentStyleSheet, (c) => {
|
|
280
|
-
const d = Y(r);
|
|
281
|
-
d && (d.push(a || 0), n(y(T.StyleSheetRule, {
|
|
282
|
-
id: c,
|
|
283
|
-
adds: [{ rule: u, index: d }]
|
|
284
|
-
})));
|
|
285
|
-
});
|
|
286
|
-
}), A(i.prototype, "deleteRule", ({ target: r, parameters: [u] }) => {
|
|
287
|
-
e(r.parentStyleSheet, (a) => {
|
|
288
|
-
const c = Y(r);
|
|
289
|
-
c && (c.push(u), n(y(T.StyleSheetRule, {
|
|
290
|
-
id: a,
|
|
291
|
-
removes: [{ index: c }]
|
|
292
|
-
})));
|
|
293
|
-
});
|
|
294
|
-
}));
|
|
295
|
-
}
|
|
296
|
-
return {
|
|
297
|
-
stop: () => {
|
|
298
|
-
o.forEach((i) => i.stop());
|
|
299
|
-
}
|
|
300
|
-
};
|
|
301
|
-
}
|
|
302
|
-
function Y(t) {
|
|
303
|
-
const n = [];
|
|
304
|
-
let e = t;
|
|
305
|
-
for (; e.parentRule; ) {
|
|
306
|
-
const r = Array.from(e.parentRule.cssRules).indexOf(e);
|
|
307
|
-
n.unshift(r), e = e.parentRule;
|
|
308
|
-
}
|
|
309
|
-
if (!e.parentStyleSheet)
|
|
310
|
-
return;
|
|
311
|
-
const s = Array.from(e.parentStyleSheet.cssRules).indexOf(e);
|
|
312
|
-
return n.unshift(s), n;
|
|
313
|
-
}
|
|
314
|
-
function ne(t, n) {
|
|
315
|
-
return x(t, window, [
|
|
316
|
-
"focus",
|
|
317
|
-
"blur"
|
|
318
|
-
/* DOM_EVENT.BLUR */
|
|
319
|
-
], () => {
|
|
320
|
-
n({
|
|
321
|
-
data: { has_focus: document.hasFocus() },
|
|
322
|
-
type: I.Focus,
|
|
323
|
-
timestamp: N()
|
|
324
|
-
});
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
function se(t, n, e) {
|
|
328
|
-
const o = t.subscribe(12, (s) => {
|
|
329
|
-
var i, r;
|
|
330
|
-
s.rawRumEvent.type === St.ACTION && s.rawRumEvent.action.type === Tt.CLICK && (!((r = (i = s.rawRumEvent.action.frustration) === null || i === void 0 ? void 0 : i.type) === null || r === void 0) && r.length) && "events" in s.domainContext && s.domainContext.events && s.domainContext.events.length && n({
|
|
331
|
-
timestamp: s.rawRumEvent.date,
|
|
332
|
-
type: I.FrustrationRecord,
|
|
333
|
-
data: {
|
|
334
|
-
frustrationTypes: s.rawRumEvent.action.frustration.type,
|
|
335
|
-
recordIds: s.domainContext.events.map((u) => e.getIdForEvent(u))
|
|
336
|
-
}
|
|
337
|
-
});
|
|
338
|
-
});
|
|
339
|
-
return {
|
|
340
|
-
stop: () => {
|
|
341
|
-
o.unsubscribe();
|
|
342
|
-
}
|
|
343
|
-
};
|
|
344
|
-
}
|
|
345
|
-
function oe(t, n) {
|
|
346
|
-
const e = t.subscribe(5, () => {
|
|
347
|
-
n({
|
|
348
|
-
timestamp: N(),
|
|
349
|
-
type: I.ViewEnd
|
|
350
|
-
});
|
|
351
|
-
});
|
|
352
|
-
return {
|
|
353
|
-
stop: () => {
|
|
354
|
-
e.unsubscribe();
|
|
355
|
-
}
|
|
356
|
-
};
|
|
357
|
-
}
|
|
358
|
-
function P(t, n) {
|
|
359
|
-
const e = t.tagName, o = t.value;
|
|
360
|
-
if (V(t, n)) {
|
|
361
|
-
const s = t.type;
|
|
362
|
-
return e === "INPUT" && (s === "button" || s === "submit" || s === "reset") ? o : !o || e === "OPTION" ? void 0 : _;
|
|
363
|
-
}
|
|
364
|
-
if (e === "OPTION" || e === "SELECT")
|
|
365
|
-
return t.value;
|
|
366
|
-
if (!(e !== "INPUT" && e !== "TEXTAREA"))
|
|
367
|
-
return o;
|
|
368
|
-
}
|
|
369
|
-
const re = /url\((?:(')([^']*)'|(")([^"]*)"|([^)]*))\)/gm, ie = /^[A-Za-z]+:|^\/\//, ae = /^["']?data:.*,/i;
|
|
370
|
-
function ue(t, n) {
|
|
371
|
-
return t.replace(re, (e, o, s, i, r, u) => {
|
|
372
|
-
const a = s || r || u;
|
|
373
|
-
if (!n || !a || ie.test(a) || ae.test(a))
|
|
374
|
-
return e;
|
|
375
|
-
const c = o || i || "";
|
|
376
|
-
return `url(${c}${ce(a, n)}${c})`;
|
|
377
|
-
});
|
|
378
|
-
}
|
|
379
|
-
function ce(t, n) {
|
|
380
|
-
try {
|
|
381
|
-
return Et(t, n).href;
|
|
382
|
-
} catch {
|
|
383
|
-
return t;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
const de = /[^a-z1-6-_]/;
|
|
387
|
-
function it(t) {
|
|
388
|
-
const n = t.toLowerCase().trim();
|
|
389
|
-
return de.test(n) ? "div" : n;
|
|
390
|
-
}
|
|
391
|
-
function X(t, n) {
|
|
392
|
-
return `data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='${t}' height='${n}' style='background-color:silver'%3E%3C/svg%3E`;
|
|
393
|
-
}
|
|
394
|
-
function at(t) {
|
|
395
|
-
if (!(t === void 0 || t.length === 0))
|
|
396
|
-
return t.map((n) => {
|
|
397
|
-
const e = n.cssRules || n.rules;
|
|
398
|
-
return {
|
|
399
|
-
cssRules: Array.from(e, (i) => i.cssText),
|
|
400
|
-
disabled: n.disabled || void 0,
|
|
401
|
-
media: n.media.length > 0 ? Array.from(n.media) : void 0
|
|
402
|
-
};
|
|
403
|
-
});
|
|
404
|
-
}
|
|
405
|
-
const le = 1e6;
|
|
406
|
-
function ut(t, n, e, o) {
|
|
407
|
-
if (n === S.HIDDEN)
|
|
408
|
-
return null;
|
|
409
|
-
const s = t.getAttribute(e);
|
|
410
|
-
if (n === S.MASK && e !== j && !yt.includes(e) && e !== o.actionNameAttribute) {
|
|
411
|
-
const i = t.tagName;
|
|
412
|
-
switch (e) {
|
|
413
|
-
// Mask Attribute text content
|
|
414
|
-
case "title":
|
|
415
|
-
case "alt":
|
|
416
|
-
case "placeholder":
|
|
417
|
-
return _;
|
|
418
|
-
}
|
|
419
|
-
if (i === "IMG" && (e === "src" || e === "srcset")) {
|
|
420
|
-
const r = t;
|
|
421
|
-
if (r.naturalWidth > 0)
|
|
422
|
-
return X(r.naturalWidth, r.naturalHeight);
|
|
423
|
-
const { width: u, height: a } = t.getBoundingClientRect();
|
|
424
|
-
return u > 0 || a > 0 ? X(u, a) : H;
|
|
425
|
-
}
|
|
426
|
-
if (i === "SOURCE" && (e === "src" || e === "srcset"))
|
|
427
|
-
return H;
|
|
428
|
-
if (i === "A" && e === "href")
|
|
429
|
-
return _;
|
|
430
|
-
if (s && e.startsWith("data-"))
|
|
431
|
-
return _;
|
|
432
|
-
if (i === "IFRAME" && e === "srcdoc")
|
|
433
|
-
return _;
|
|
434
|
-
}
|
|
435
|
-
return !s || typeof s != "string" ? s : It(s, le);
|
|
436
|
-
}
|
|
437
|
-
function F() {
|
|
438
|
-
return {
|
|
439
|
-
cssText: {
|
|
440
|
-
count: 0,
|
|
441
|
-
max: 0,
|
|
442
|
-
sum: 0
|
|
443
|
-
},
|
|
444
|
-
serializationDuration: {
|
|
445
|
-
count: 0,
|
|
446
|
-
max: 0,
|
|
447
|
-
sum: 0
|
|
448
|
-
}
|
|
449
|
-
};
|
|
450
|
-
}
|
|
451
|
-
function L(t, n, e) {
|
|
452
|
-
t[n].count += 1, t[n].max = Math.max(t[n].max, e), t[n].sum += e;
|
|
453
|
-
}
|
|
454
|
-
function fe(t, n) {
|
|
455
|
-
for (const e of ["cssText", "serializationDuration"])
|
|
456
|
-
t[e].count += n[e].count, t[e].max = Math.max(t[e].max, n[e].max), t[e].sum += n[e].sum;
|
|
457
|
-
}
|
|
458
|
-
function pe(t, n, e) {
|
|
459
|
-
if (n === S.HIDDEN)
|
|
460
|
-
return {};
|
|
461
|
-
const o = {}, s = it(t.tagName), i = t.ownerDocument;
|
|
462
|
-
for (let d = 0; d < t.attributes.length; d += 1) {
|
|
463
|
-
const f = t.attributes.item(d).name, p = ut(t, n, f, e.configuration);
|
|
464
|
-
p !== null && (o[f] = p);
|
|
465
|
-
}
|
|
466
|
-
if (t.value && (s === "textarea" || s === "select" || s === "option" || s === "input")) {
|
|
467
|
-
const d = P(t, n);
|
|
468
|
-
d !== void 0 && (o.value = d);
|
|
469
|
-
}
|
|
470
|
-
if (s === "option" && n === S.ALLOW) {
|
|
471
|
-
const d = t;
|
|
472
|
-
d.selected && (o.selected = d.selected);
|
|
473
|
-
}
|
|
474
|
-
if (s === "link") {
|
|
475
|
-
const d = Array.from(i.styleSheets).find((f) => f.href === t.href), l = z(d);
|
|
476
|
-
l && d && (L(e.serializationContext.serializationStats, "cssText", l.length), o._cssText = l);
|
|
477
|
-
}
|
|
478
|
-
if (s === "style" && t.sheet) {
|
|
479
|
-
const d = z(t.sheet);
|
|
480
|
-
d && (L(e.serializationContext.serializationStats, "cssText", d.length), o._cssText = d);
|
|
481
|
-
}
|
|
482
|
-
const r = t;
|
|
483
|
-
if (s === "input" && (r.type === "radio" || r.type === "checkbox") && (n === S.ALLOW ? o.checked = !!r.checked : V(r, n) && delete o.checked), s === "audio" || s === "video") {
|
|
484
|
-
const d = t;
|
|
485
|
-
o.rr_mediaState = d.paused ? "paused" : "played";
|
|
486
|
-
}
|
|
487
|
-
let u, a;
|
|
488
|
-
const c = e.serializationContext;
|
|
489
|
-
switch (c.status) {
|
|
490
|
-
case 0:
|
|
491
|
-
u = Math.round(t.scrollTop), a = Math.round(t.scrollLeft), (u || a) && c.elementsScrollPositions.set(t, { scrollTop: u, scrollLeft: a });
|
|
492
|
-
break;
|
|
493
|
-
case 1:
|
|
494
|
-
c.elementsScrollPositions.has(t) && ({ scrollTop: u, scrollLeft: a } = c.elementsScrollPositions.get(t));
|
|
495
|
-
break;
|
|
496
|
-
}
|
|
497
|
-
return a && (o.rr_scrollLeft = a), u && (o.rr_scrollTop = u), o;
|
|
498
|
-
}
|
|
499
|
-
function z(t) {
|
|
500
|
-
if (!t)
|
|
501
|
-
return null;
|
|
502
|
-
let n;
|
|
503
|
-
try {
|
|
504
|
-
n = t.rules || t.cssRules;
|
|
505
|
-
} catch {
|
|
506
|
-
}
|
|
507
|
-
if (!n)
|
|
508
|
-
return null;
|
|
509
|
-
const e = Array.from(n, Nt() ? he : ct).join("");
|
|
510
|
-
return ue(e, t.href);
|
|
511
|
-
}
|
|
512
|
-
function he(t) {
|
|
513
|
-
if (ge(t) && t.selectorText.includes(":")) {
|
|
514
|
-
const n = /(\[[\w-]+[^\\])(:[^\]]+\])/g;
|
|
515
|
-
return t.cssText.replace(n, "$1\\$2");
|
|
516
|
-
}
|
|
517
|
-
return ct(t);
|
|
518
|
-
}
|
|
519
|
-
function ct(t) {
|
|
520
|
-
return me(t) && z(t.styleSheet) || t.cssText;
|
|
521
|
-
}
|
|
522
|
-
function me(t) {
|
|
523
|
-
return "styleSheet" in t;
|
|
524
|
-
}
|
|
525
|
-
function ge(t) {
|
|
526
|
-
return "selectorText" in t;
|
|
527
|
-
}
|
|
528
|
-
function B(t, n, e) {
|
|
529
|
-
const o = Se(t, n, e);
|
|
530
|
-
if (!o)
|
|
531
|
-
return null;
|
|
532
|
-
const s = e.scope.nodeIds.assign(t), i = o;
|
|
533
|
-
return i.id = s, e.serializedNodeIds && e.serializedNodeIds.add(s), i;
|
|
534
|
-
}
|
|
535
|
-
function U(t, n, e) {
|
|
536
|
-
const o = [];
|
|
537
|
-
return tt(t, (s) => {
|
|
538
|
-
const i = B(s, n, e);
|
|
539
|
-
i && o.push(i);
|
|
540
|
-
}), o;
|
|
541
|
-
}
|
|
542
|
-
function Se(t, n, e) {
|
|
543
|
-
switch (t.nodeType) {
|
|
544
|
-
case t.DOCUMENT_NODE:
|
|
545
|
-
return Te(t, n, e);
|
|
546
|
-
case t.DOCUMENT_FRAGMENT_NODE:
|
|
547
|
-
return Ee(t, n, e);
|
|
548
|
-
case t.DOCUMENT_TYPE_NODE:
|
|
549
|
-
return ye(t);
|
|
550
|
-
case t.ELEMENT_NODE:
|
|
551
|
-
return Ie(t, n, e);
|
|
552
|
-
case t.TEXT_NODE:
|
|
553
|
-
return we(t, n);
|
|
554
|
-
case t.CDATA_SECTION_NODE:
|
|
555
|
-
return Me();
|
|
556
|
-
}
|
|
557
|
-
}
|
|
558
|
-
function Te(t, n, e) {
|
|
559
|
-
return {
|
|
560
|
-
type: C.Document,
|
|
561
|
-
childNodes: U(t, n, e),
|
|
562
|
-
adoptedStyleSheets: at(t.adoptedStyleSheets)
|
|
563
|
-
};
|
|
564
|
-
}
|
|
565
|
-
function Ee(t, n, e) {
|
|
566
|
-
const o = Q(t);
|
|
567
|
-
return o && e.serializationContext.shadowRootsController.addShadowRoot(t), {
|
|
568
|
-
type: C.DocumentFragment,
|
|
569
|
-
childNodes: U(t, n, e),
|
|
570
|
-
isShadowRoot: o,
|
|
571
|
-
adoptedStyleSheets: o ? at(t.adoptedStyleSheets) : void 0
|
|
572
|
-
};
|
|
573
|
-
}
|
|
574
|
-
function ye(t) {
|
|
575
|
-
return {
|
|
576
|
-
type: C.DocumentType,
|
|
577
|
-
name: t.name,
|
|
578
|
-
publicId: t.publicId,
|
|
579
|
-
systemId: t.systemId
|
|
580
|
-
};
|
|
581
|
-
}
|
|
582
|
-
function Ie(t, n, e) {
|
|
583
|
-
const o = it(t.tagName), s = Ne(t) || void 0, i = wt(Mt(t), n);
|
|
584
|
-
if (i === S.HIDDEN) {
|
|
585
|
-
const { width: a, height: c } = t.getBoundingClientRect();
|
|
586
|
-
return {
|
|
587
|
-
type: C.Element,
|
|
588
|
-
tagName: o,
|
|
589
|
-
attributes: {
|
|
590
|
-
rr_width: `${a}px`,
|
|
591
|
-
rr_height: `${c}px`,
|
|
592
|
-
[j]: Ct
|
|
593
|
-
},
|
|
594
|
-
childNodes: [],
|
|
595
|
-
isSVG: s
|
|
596
|
-
};
|
|
597
|
-
}
|
|
598
|
-
if (i === S.IGNORE)
|
|
599
|
-
return;
|
|
600
|
-
const r = pe(t, i, e);
|
|
601
|
-
let u = [];
|
|
602
|
-
return Rt(t) && // Do not serialize style children as the css rules are already in the _cssText attribute
|
|
603
|
-
o !== "style" && (u = U(t, i, e)), {
|
|
604
|
-
type: C.Element,
|
|
605
|
-
tagName: o,
|
|
606
|
-
attributes: r,
|
|
607
|
-
childNodes: u,
|
|
608
|
-
isSVG: s
|
|
609
|
-
};
|
|
610
|
-
}
|
|
611
|
-
function Ne(t) {
|
|
612
|
-
return t.tagName === "svg" || t instanceof SVGElement;
|
|
613
|
-
}
|
|
614
|
-
function we(t, n) {
|
|
615
|
-
const e = Z(t, n);
|
|
616
|
-
if (e !== void 0)
|
|
617
|
-
return {
|
|
618
|
-
type: C.Text,
|
|
619
|
-
textContent: e
|
|
620
|
-
};
|
|
621
|
-
}
|
|
622
|
-
function Me() {
|
|
623
|
-
return {
|
|
624
|
-
type: C.CDATA,
|
|
625
|
-
textContent: ""
|
|
626
|
-
};
|
|
627
|
-
}
|
|
628
|
-
function Ce(t, n, e, o) {
|
|
629
|
-
const s = N(), i = B(t, n.defaultPrivacyLevel, {
|
|
630
|
-
serializationContext: o,
|
|
631
|
-
configuration: n,
|
|
632
|
-
scope: e
|
|
633
|
-
});
|
|
634
|
-
return L(o.serializationStats, "serializationDuration", et(s, N())), i;
|
|
635
|
-
}
|
|
636
|
-
function Re(t) {
|
|
637
|
-
return { nodeIds: t };
|
|
638
|
-
}
|
|
639
|
-
function dt(t, n, e, o = document) {
|
|
640
|
-
const s = t.defaultPrivacyLevel, i = /* @__PURE__ */ new WeakMap(), r = o !== document, { stop: u } = x(
|
|
641
|
-
t,
|
|
642
|
-
o,
|
|
643
|
-
// The 'input' event bubbles across shadow roots, so we don't have to listen for it on shadow
|
|
644
|
-
// roots since it will be handled by the event listener that we did add to the document. Only
|
|
645
|
-
// the 'change' event is blocked and needs to be handled on shadow roots.
|
|
646
|
-
r ? [
|
|
647
|
-
"change"
|
|
648
|
-
/* DOM_EVENT.CHANGE */
|
|
649
|
-
] : [
|
|
650
|
-
"input",
|
|
651
|
-
"change"
|
|
652
|
-
/* DOM_EVENT.CHANGE */
|
|
653
|
-
],
|
|
654
|
-
(l) => {
|
|
655
|
-
const f = D(l);
|
|
656
|
-
(f instanceof HTMLInputElement || f instanceof HTMLTextAreaElement || f instanceof HTMLSelectElement) && c(f);
|
|
657
|
-
},
|
|
658
|
-
{
|
|
659
|
-
capture: !0,
|
|
660
|
-
passive: !0
|
|
661
|
-
}
|
|
662
|
-
);
|
|
663
|
-
let a;
|
|
664
|
-
if (r)
|
|
665
|
-
a = R;
|
|
666
|
-
else {
|
|
667
|
-
const l = [
|
|
668
|
-
b(HTMLInputElement.prototype, "value", c),
|
|
669
|
-
b(HTMLInputElement.prototype, "checked", c),
|
|
670
|
-
b(HTMLSelectElement.prototype, "value", c),
|
|
671
|
-
b(HTMLTextAreaElement.prototype, "value", c),
|
|
672
|
-
b(HTMLSelectElement.prototype, "selectedIndex", c)
|
|
673
|
-
];
|
|
674
|
-
a = () => {
|
|
675
|
-
l.forEach((f) => f.stop());
|
|
676
|
-
};
|
|
677
|
-
}
|
|
678
|
-
return {
|
|
679
|
-
stop: () => {
|
|
680
|
-
a(), u();
|
|
681
|
-
}
|
|
682
|
-
};
|
|
683
|
-
function c(l) {
|
|
684
|
-
const f = w(l, s);
|
|
685
|
-
if (f === S.HIDDEN)
|
|
686
|
-
return;
|
|
687
|
-
const p = l.type;
|
|
688
|
-
let g;
|
|
689
|
-
if (p === "radio" || p === "checkbox") {
|
|
690
|
-
if (V(l, f))
|
|
691
|
-
return;
|
|
692
|
-
g = { isChecked: l.checked };
|
|
693
|
-
} else {
|
|
694
|
-
const m = P(l, f);
|
|
695
|
-
if (m === void 0)
|
|
696
|
-
return;
|
|
697
|
-
g = { text: m };
|
|
698
|
-
}
|
|
699
|
-
d(l, g, n);
|
|
700
|
-
const h = l.name;
|
|
701
|
-
p === "radio" && h && l.checked && document.querySelectorAll(`input[type="radio"][name="${CSS.escape(h)}"]`).forEach((m) => {
|
|
702
|
-
m !== l && d(m, { isChecked: !1 }, n);
|
|
703
|
-
});
|
|
704
|
-
}
|
|
705
|
-
function d(l, f, p) {
|
|
706
|
-
const g = p.nodeIds.get(l);
|
|
707
|
-
if (g === void 0)
|
|
708
|
-
return;
|
|
709
|
-
const h = i.get(l);
|
|
710
|
-
(!h || h.text !== f.text || h.isChecked !== f.isChecked) && (i.set(l, f), e(y(T.Input, {
|
|
711
|
-
id: g,
|
|
712
|
-
...f
|
|
713
|
-
})));
|
|
714
|
-
}
|
|
715
|
-
}
|
|
716
|
-
const xe = 100, ve = 16;
|
|
717
|
-
function be(t) {
|
|
718
|
-
let n = R, e = [];
|
|
719
|
-
function o() {
|
|
720
|
-
n(), t(e), e = [];
|
|
721
|
-
}
|
|
722
|
-
const { throttled: s, cancel: i } = O(o, ve, {
|
|
723
|
-
leading: !1
|
|
724
|
-
});
|
|
725
|
-
return {
|
|
726
|
-
addMutations: (r) => {
|
|
727
|
-
e.length === 0 && (n = xt(s, { timeout: xe })), e.push(...r);
|
|
728
|
-
},
|
|
729
|
-
flush: o,
|
|
730
|
-
stop: () => {
|
|
731
|
-
n(), i();
|
|
732
|
-
}
|
|
733
|
-
};
|
|
734
|
-
}
|
|
735
|
-
function lt(t, n, e, o, s) {
|
|
736
|
-
const i = vt();
|
|
737
|
-
if (!i)
|
|
738
|
-
return { stop: R, flush: R };
|
|
739
|
-
const r = be((a) => {
|
|
740
|
-
_e(a.concat(u.takeRecords()), t, n, e, o);
|
|
741
|
-
}), u = new i(bt(r.addMutations));
|
|
742
|
-
return u.observe(s, {
|
|
743
|
-
attributeOldValue: !0,
|
|
744
|
-
attributes: !0,
|
|
745
|
-
characterData: !0,
|
|
746
|
-
characterDataOldValue: !0,
|
|
747
|
-
childList: !0,
|
|
748
|
-
subtree: !0
|
|
749
|
-
}), {
|
|
750
|
-
stop: () => {
|
|
751
|
-
u.disconnect(), r.stop();
|
|
752
|
-
},
|
|
753
|
-
flush: () => {
|
|
754
|
-
r.flush();
|
|
755
|
-
}
|
|
756
|
-
};
|
|
757
|
-
}
|
|
758
|
-
function _e(t, n, e, o, s) {
|
|
759
|
-
const i = /* @__PURE__ */ new Map();
|
|
760
|
-
t.filter((p) => p.type === "childList").forEach((p) => {
|
|
761
|
-
p.removedNodes.forEach((g) => {
|
|
762
|
-
ft(g, s.removeShadowRoot);
|
|
763
|
-
});
|
|
764
|
-
});
|
|
765
|
-
const r = t.filter((p) => p.target.isConnected && o.nodeIds.areAssignedForNodeAndAncestors(p.target) && w(p.target, e.defaultPrivacyLevel, i) !== S.HIDDEN), u = F(), { adds: a, removes: c, hasBeenSerialized: d } = De(r.filter((p) => p.type === "childList"), e, o, u, s, i), l = Ae(r.filter((p) => p.type === "characterData" && !d(p.target)), e, o, i), f = Le(r.filter((p) => p.type === "attributes" && !d(p.target)), e, o, i);
|
|
766
|
-
!l.length && !f.length && !c.length && !a.length || n(y(T.Mutation, { adds: a, removes: c, texts: l, attributes: f }), u);
|
|
767
|
-
}
|
|
768
|
-
function De(t, n, e, o, s, i) {
|
|
769
|
-
const r = /* @__PURE__ */ new Set(), u = /* @__PURE__ */ new Map();
|
|
770
|
-
for (const h of t)
|
|
771
|
-
h.addedNodes.forEach((m) => {
|
|
772
|
-
r.add(m);
|
|
773
|
-
}), h.removedNodes.forEach((m) => {
|
|
774
|
-
r.has(m) || u.set(m, h.target), r.delete(m);
|
|
775
|
-
});
|
|
776
|
-
const a = Array.from(r);
|
|
777
|
-
Oe(a);
|
|
778
|
-
const c = /* @__PURE__ */ new Set(), d = {
|
|
779
|
-
status: 2,
|
|
780
|
-
serializationStats: o,
|
|
781
|
-
shadowRootsController: s
|
|
782
|
-
}, l = [];
|
|
783
|
-
for (const h of a) {
|
|
784
|
-
if (p(h))
|
|
785
|
-
continue;
|
|
786
|
-
const m = w(h.parentNode, n.defaultPrivacyLevel, i);
|
|
787
|
-
if (m === S.HIDDEN || m === S.IGNORE)
|
|
788
|
-
continue;
|
|
789
|
-
const M = N(), v = B(h, m, {
|
|
790
|
-
serializedNodeIds: c,
|
|
791
|
-
serializationContext: d,
|
|
792
|
-
configuration: n,
|
|
793
|
-
scope: e
|
|
794
|
-
});
|
|
795
|
-
if (L(o, "serializationDuration", et(M, N())), !v)
|
|
796
|
-
continue;
|
|
797
|
-
const ht = k(h);
|
|
798
|
-
l.push({
|
|
799
|
-
nextId: g(h),
|
|
800
|
-
parentId: e.nodeIds.get(ht),
|
|
801
|
-
node: v
|
|
802
|
-
});
|
|
803
|
-
}
|
|
804
|
-
const f = [];
|
|
805
|
-
return u.forEach((h, m) => {
|
|
806
|
-
const M = e.nodeIds.get(h), v = e.nodeIds.get(m);
|
|
807
|
-
M !== void 0 && v !== void 0 && f.push({ parentId: M, id: v });
|
|
808
|
-
}), { adds: l, removes: f, hasBeenSerialized: p };
|
|
809
|
-
function p(h) {
|
|
810
|
-
const m = e.nodeIds.get(h);
|
|
811
|
-
return m !== void 0 && c.has(m);
|
|
812
|
-
}
|
|
813
|
-
function g(h) {
|
|
814
|
-
let m = h.nextSibling;
|
|
815
|
-
for (; m; ) {
|
|
816
|
-
const M = e.nodeIds.get(m);
|
|
817
|
-
if (M !== void 0)
|
|
818
|
-
return M;
|
|
819
|
-
m = m.nextSibling;
|
|
820
|
-
}
|
|
821
|
-
return null;
|
|
822
|
-
}
|
|
823
|
-
}
|
|
824
|
-
function Ae(t, n, e, o) {
|
|
825
|
-
var s;
|
|
826
|
-
const i = [], r = /* @__PURE__ */ new Set(), u = t.filter((a) => r.has(a.target) ? !1 : (r.add(a.target), !0));
|
|
827
|
-
for (const a of u) {
|
|
828
|
-
if (a.target.textContent === a.oldValue)
|
|
829
|
-
continue;
|
|
830
|
-
const d = e.nodeIds.get(a.target);
|
|
831
|
-
if (d === void 0)
|
|
832
|
-
continue;
|
|
833
|
-
const l = w(k(a.target), n.defaultPrivacyLevel, o);
|
|
834
|
-
l === S.HIDDEN || l === S.IGNORE || i.push({
|
|
835
|
-
id: d,
|
|
836
|
-
value: (s = Z(a.target, l)) !== null && s !== void 0 ? s : null
|
|
837
|
-
});
|
|
838
|
-
}
|
|
839
|
-
return i;
|
|
840
|
-
}
|
|
841
|
-
function Le(t, n, e, o) {
|
|
842
|
-
const s = [], i = /* @__PURE__ */ new Map(), r = t.filter((a) => {
|
|
843
|
-
const c = i.get(a.target);
|
|
844
|
-
return c && c.has(a.attributeName) ? !1 : (c ? c.add(a.attributeName) : i.set(a.target, /* @__PURE__ */ new Set([a.attributeName])), !0);
|
|
845
|
-
}), u = /* @__PURE__ */ new Map();
|
|
846
|
-
for (const a of r) {
|
|
847
|
-
if (a.target.getAttribute(a.attributeName) === a.oldValue)
|
|
848
|
-
continue;
|
|
849
|
-
const d = e.nodeIds.get(a.target);
|
|
850
|
-
if (d === void 0)
|
|
851
|
-
continue;
|
|
852
|
-
const l = w(a.target, n.defaultPrivacyLevel, o), f = ut(a.target, l, a.attributeName, n);
|
|
853
|
-
let p;
|
|
854
|
-
if (a.attributeName === "value") {
|
|
855
|
-
const h = P(a.target, l);
|
|
856
|
-
if (h === void 0)
|
|
857
|
-
continue;
|
|
858
|
-
p = h;
|
|
859
|
-
} else typeof f == "string" ? p = f : p = null;
|
|
860
|
-
let g = u.get(a.target);
|
|
861
|
-
g || (g = { id: d, attributes: {} }, s.push(g), u.set(a.target, g)), g.attributes[a.attributeName] = p;
|
|
862
|
-
}
|
|
863
|
-
return s;
|
|
864
|
-
}
|
|
865
|
-
function Oe(t) {
|
|
866
|
-
t.sort((n, e) => {
|
|
867
|
-
const o = n.compareDocumentPosition(e);
|
|
868
|
-
return o & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : o & Node.DOCUMENT_POSITION_CONTAINS || o & Node.DOCUMENT_POSITION_FOLLOWING ? 1 : o & Node.DOCUMENT_POSITION_PRECEDING ? -1 : 0;
|
|
869
|
-
});
|
|
870
|
-
}
|
|
871
|
-
function ft(t, n) {
|
|
872
|
-
K(t) && n(t.shadowRoot), tt(t, (e) => ft(e, n));
|
|
873
|
-
}
|
|
874
|
-
function ze() {
|
|
875
|
-
const t = /* @__PURE__ */ new WeakMap();
|
|
876
|
-
return {
|
|
877
|
-
set(n, e) {
|
|
878
|
-
n === document && !document.scrollingElement || t.set(n === document ? document.scrollingElement : n, e);
|
|
879
|
-
},
|
|
880
|
-
get(n) {
|
|
881
|
-
return t.get(n);
|
|
882
|
-
},
|
|
883
|
-
has(n) {
|
|
884
|
-
return t.has(n);
|
|
885
|
-
}
|
|
886
|
-
};
|
|
887
|
-
}
|
|
888
|
-
const Ve = (t, n, e, o) => {
|
|
889
|
-
const s = /* @__PURE__ */ new Map(), i = {
|
|
890
|
-
addShadowRoot: (r) => {
|
|
891
|
-
if (s.has(r))
|
|
892
|
-
return;
|
|
893
|
-
const u = lt(e, t, n, i, r), a = dt(t, n, e, r), c = rt(t, n, e, o, r);
|
|
894
|
-
s.set(r, {
|
|
895
|
-
flush: () => u.flush(),
|
|
896
|
-
stop: () => {
|
|
897
|
-
u.stop(), a.stop(), c.stop();
|
|
898
|
-
}
|
|
899
|
-
});
|
|
900
|
-
},
|
|
901
|
-
removeShadowRoot: (r) => {
|
|
902
|
-
const u = s.get(r);
|
|
903
|
-
u && (u.stop(), s.delete(r));
|
|
904
|
-
},
|
|
905
|
-
stop: () => {
|
|
906
|
-
s.forEach(({ stop: r }) => r());
|
|
907
|
-
},
|
|
908
|
-
flush: () => {
|
|
909
|
-
s.forEach(({ flush: r }) => r());
|
|
910
|
-
}
|
|
911
|
-
};
|
|
912
|
-
return i;
|
|
913
|
-
};
|
|
914
|
-
function ke(t, n, e, o, s, i, r) {
|
|
915
|
-
const u = (c, d) => {
|
|
916
|
-
const { width: l, height: f } = _t();
|
|
917
|
-
r({
|
|
918
|
-
data: {
|
|
919
|
-
height: f,
|
|
920
|
-
href: window.location.href,
|
|
921
|
-
width: l
|
|
922
|
-
},
|
|
923
|
-
type: I.Meta,
|
|
924
|
-
timestamp: c
|
|
925
|
-
}), r({
|
|
926
|
-
data: {
|
|
927
|
-
has_focus: document.hasFocus()
|
|
928
|
-
},
|
|
929
|
-
type: I.Focus,
|
|
930
|
-
timestamp: c
|
|
931
|
-
});
|
|
932
|
-
const p = F();
|
|
933
|
-
r({
|
|
934
|
-
data: {
|
|
935
|
-
node: Ce(document, o, s, {
|
|
936
|
-
status: d,
|
|
937
|
-
elementsScrollPositions: t,
|
|
938
|
-
serializationStats: p,
|
|
939
|
-
shadowRootsController: n
|
|
940
|
-
}),
|
|
941
|
-
initialOffset: {
|
|
942
|
-
left: J(),
|
|
943
|
-
top: q()
|
|
944
|
-
}
|
|
945
|
-
},
|
|
946
|
-
type: I.FullSnapshot,
|
|
947
|
-
timestamp: c
|
|
948
|
-
}, p), window.visualViewport && r({
|
|
949
|
-
data: st(window.visualViewport),
|
|
950
|
-
type: I.VisualViewport,
|
|
951
|
-
timestamp: c
|
|
952
|
-
});
|
|
953
|
-
};
|
|
954
|
-
u(
|
|
955
|
-
N(),
|
|
956
|
-
0
|
|
957
|
-
/* SerializationContextStatus.INITIAL_FULL_SNAPSHOT */
|
|
958
|
-
);
|
|
959
|
-
const { unsubscribe: a } = e.subscribe(2, (c) => {
|
|
960
|
-
i(), u(
|
|
961
|
-
c.startClocks.timeStamp,
|
|
962
|
-
1
|
|
963
|
-
/* SerializationContextStatus.SUBSEQUENT_FULL_SNAPSHOT */
|
|
964
|
-
);
|
|
965
|
-
});
|
|
966
|
-
return {
|
|
967
|
-
stop: a
|
|
968
|
-
};
|
|
969
|
-
}
|
|
970
|
-
function Pe() {
|
|
971
|
-
const t = /* @__PURE__ */ new WeakMap();
|
|
972
|
-
let n = 1;
|
|
973
|
-
return {
|
|
974
|
-
getIdForEvent(e) {
|
|
975
|
-
return t.has(e) || t.set(e, n++), t.get(e);
|
|
976
|
-
}
|
|
977
|
-
};
|
|
978
|
-
}
|
|
979
|
-
function Fe() {
|
|
980
|
-
const t = /* @__PURE__ */ new WeakMap();
|
|
981
|
-
let n = 1;
|
|
982
|
-
const e = (o) => t.get(o);
|
|
983
|
-
return {
|
|
984
|
-
assign: (o) => {
|
|
985
|
-
let s = e(o);
|
|
986
|
-
return s === void 0 && (s = n++, t.set(o, s)), s;
|
|
987
|
-
},
|
|
988
|
-
get: e,
|
|
989
|
-
areAssignedForNodeAndAncestors: (o) => {
|
|
990
|
-
let s = o;
|
|
991
|
-
for (; s; ) {
|
|
992
|
-
if (e(s) === void 0 && !Q(s))
|
|
993
|
-
return !1;
|
|
994
|
-
s = k(s);
|
|
995
|
-
}
|
|
996
|
-
return !0;
|
|
997
|
-
}
|
|
998
|
-
};
|
|
999
|
-
}
|
|
1000
|
-
function Be(t) {
|
|
1001
|
-
const { emit: n, configuration: e, lifeCycle: o } = t;
|
|
1002
|
-
if (!n)
|
|
1003
|
-
throw new Error("emit function is required");
|
|
1004
|
-
const s = (p, g) => {
|
|
1005
|
-
n(p, g), Dt("record", { record: p });
|
|
1006
|
-
const h = t.viewHistory.findView();
|
|
1007
|
-
At(h.id);
|
|
1008
|
-
}, i = ze(), r = Re(Fe()), u = Ve(e, r, s, i), { stop: a } = ke(i, u, o, e, r, c, s);
|
|
1009
|
-
function c() {
|
|
1010
|
-
u.flush(), l.flush();
|
|
1011
|
-
}
|
|
1012
|
-
const d = Pe(), l = lt(s, e, r, u, document), f = [
|
|
1013
|
-
l,
|
|
1014
|
-
Kt(e, r, s),
|
|
1015
|
-
qt(e, r, s, d),
|
|
1016
|
-
rt(e, r, s, i, document),
|
|
1017
|
-
Zt(e, s),
|
|
1018
|
-
dt(e, r, s),
|
|
1019
|
-
te(e, r, s),
|
|
1020
|
-
ee(r, s),
|
|
1021
|
-
ne(e, s),
|
|
1022
|
-
Qt(e, s),
|
|
1023
|
-
se(o, s, d),
|
|
1024
|
-
oe(o, (p) => {
|
|
1025
|
-
c(), s(p);
|
|
1026
|
-
})
|
|
1027
|
-
];
|
|
1028
|
-
return {
|
|
1029
|
-
stop: () => {
|
|
1030
|
-
u.stop(), f.forEach((p) => p.stop()), a();
|
|
1031
|
-
},
|
|
1032
|
-
flushMutations: c,
|
|
1033
|
-
shadowRootsController: u
|
|
1034
|
-
};
|
|
1035
|
-
}
|
|
1036
|
-
function Ue(t, n, e, o) {
|
|
1037
|
-
const s = new FormData();
|
|
1038
|
-
s.append("segment", new Blob([t], {
|
|
1039
|
-
type: "application/octet-stream"
|
|
1040
|
-
}), `${n.session.id}-${n.start}`);
|
|
1041
|
-
const i = {
|
|
1042
|
-
raw_segment_size: o,
|
|
1043
|
-
compressed_segment_size: t.byteLength,
|
|
1044
|
-
...n
|
|
1045
|
-
}, r = JSON.stringify(i);
|
|
1046
|
-
return s.append("event", new Blob([r], { type: "application/json" })), {
|
|
1047
|
-
data: s,
|
|
1048
|
-
bytesCount: t.byteLength,
|
|
1049
|
-
cssText: e.cssText,
|
|
1050
|
-
isFullSnapshot: n.index_in_view === 0,
|
|
1051
|
-
rawSize: o,
|
|
1052
|
-
recordCount: n.records_count,
|
|
1053
|
-
serializationDuration: e.serializationDuration
|
|
1054
|
-
};
|
|
1055
|
-
}
|
|
1056
|
-
function He({ context: t, creationReason: n, encoder: e }) {
|
|
1057
|
-
let o = 0;
|
|
1058
|
-
const s = t.view.id, i = Lt(s), r = {
|
|
1059
|
-
start: 1 / 0,
|
|
1060
|
-
end: -1 / 0,
|
|
1061
|
-
creation_reason: n,
|
|
1062
|
-
records_count: 0,
|
|
1063
|
-
has_full_snapshot: !1,
|
|
1064
|
-
index_in_view: i,
|
|
1065
|
-
source: "browser",
|
|
1066
|
-
...t
|
|
1067
|
-
}, u = F();
|
|
1068
|
-
Ot(s);
|
|
1069
|
-
function a(d, l, f) {
|
|
1070
|
-
r.start = Math.min(r.start, d.timestamp), r.end = Math.max(r.end, d.timestamp), r.records_count += 1, r.has_full_snapshot || (r.has_full_snapshot = d.type === I.FullSnapshot), l && fe(u, l);
|
|
1071
|
-
const p = e.isEmpty ? '{"records":[' : ",";
|
|
1072
|
-
e.write(p + JSON.stringify(d), (g) => {
|
|
1073
|
-
o += g, f(o);
|
|
1074
|
-
});
|
|
1075
|
-
}
|
|
1076
|
-
function c(d) {
|
|
1077
|
-
if (e.isEmpty)
|
|
1078
|
-
throw new Error("Empty segment flushed");
|
|
1079
|
-
e.write(`],${JSON.stringify(r).slice(1)}
|
|
1080
|
-
`), e.finish((l) => {
|
|
1081
|
-
zt(r.view.id, l.rawBytesCount), d(r, u, l);
|
|
1082
|
-
});
|
|
1083
|
-
}
|
|
1084
|
-
return { addRecord: a, flush: c };
|
|
1085
|
-
}
|
|
1086
|
-
const Ge = 5 * Ft;
|
|
1087
|
-
let pt = 6e4;
|
|
1088
|
-
function We(t, n, e, o, s, i) {
|
|
1089
|
-
return $e(t, () => Ye(n.applicationId, e, o), s, i);
|
|
1090
|
-
}
|
|
1091
|
-
function $e(t, n, e, o) {
|
|
1092
|
-
let s = {
|
|
1093
|
-
status: 0,
|
|
1094
|
-
nextSegmentCreationReason: "init"
|
|
1095
|
-
};
|
|
1096
|
-
const { unsubscribe: i } = t.subscribe(2, () => {
|
|
1097
|
-
u("view_change");
|
|
1098
|
-
}), { unsubscribe: r } = t.subscribe(11, (a) => {
|
|
1099
|
-
u(a.reason);
|
|
1100
|
-
});
|
|
1101
|
-
function u(a) {
|
|
1102
|
-
s.status === 1 && (s.segment.flush((c, d, l) => {
|
|
1103
|
-
const f = Ue(l.output, c, d, l.rawBytesCount);
|
|
1104
|
-
Vt(a) ? e.sendOnExit(f) : e.send(f);
|
|
1105
|
-
}), kt(s.expirationTimeoutId)), a !== "stop" ? s = {
|
|
1106
|
-
status: 0,
|
|
1107
|
-
nextSegmentCreationReason: a
|
|
1108
|
-
} : s = {
|
|
1109
|
-
status: 2
|
|
1110
|
-
};
|
|
1111
|
-
}
|
|
1112
|
-
return {
|
|
1113
|
-
addRecord: (a, c) => {
|
|
1114
|
-
if (s.status !== 2) {
|
|
1115
|
-
if (s.status === 0) {
|
|
1116
|
-
const d = n();
|
|
1117
|
-
if (!d)
|
|
1118
|
-
return;
|
|
1119
|
-
s = {
|
|
1120
|
-
status: 1,
|
|
1121
|
-
segment: He({ encoder: o, context: d, creationReason: s.nextSegmentCreationReason }),
|
|
1122
|
-
expirationTimeoutId: Pt(() => {
|
|
1123
|
-
u("segment_duration_limit");
|
|
1124
|
-
}, Ge)
|
|
1125
|
-
};
|
|
1126
|
-
}
|
|
1127
|
-
s.segment.addRecord(a, c, (d) => {
|
|
1128
|
-
d > pt && u("segment_bytes_limit");
|
|
1129
|
-
});
|
|
1130
|
-
}
|
|
1131
|
-
},
|
|
1132
|
-
stop: () => {
|
|
1133
|
-
u("stop"), i(), r();
|
|
1134
|
-
}
|
|
1135
|
-
};
|
|
1136
|
-
}
|
|
1137
|
-
function Ye(t, n, e) {
|
|
1138
|
-
const o = n.findTrackedSession(), s = e.findView();
|
|
1139
|
-
if (!(!o || !s))
|
|
1140
|
-
return {
|
|
1141
|
-
application: {
|
|
1142
|
-
id: t
|
|
1143
|
-
},
|
|
1144
|
-
session: {
|
|
1145
|
-
id: o.id
|
|
1146
|
-
},
|
|
1147
|
-
view: {
|
|
1148
|
-
id: s.id
|
|
1149
|
-
}
|
|
1150
|
-
};
|
|
1151
|
-
}
|
|
1152
|
-
function Xe(t, n) {
|
|
1153
|
-
if (!t.metricsEnabled)
|
|
1154
|
-
return { stop: R };
|
|
1155
|
-
const { unsubscribe: e } = n.subscribe((o) => {
|
|
1156
|
-
if (o.type === "failure" || o.type === "queue-full" || o.type === "success" && o.payload.isFullSnapshot) {
|
|
1157
|
-
const s = Ke(o.type, o.bandwidth, o.payload);
|
|
1158
|
-
Bt("Segment network request metrics", { metrics: s });
|
|
1159
|
-
}
|
|
1160
|
-
});
|
|
1161
|
-
return {
|
|
1162
|
-
stop: e
|
|
1163
|
-
};
|
|
1164
|
-
}
|
|
1165
|
-
function Ke(t, n, e) {
|
|
1166
|
-
return {
|
|
1167
|
-
cssText: {
|
|
1168
|
-
count: e.cssText.count,
|
|
1169
|
-
max: e.cssText.max,
|
|
1170
|
-
sum: e.cssText.sum
|
|
1171
|
-
},
|
|
1172
|
-
isFullSnapshot: e.isFullSnapshot,
|
|
1173
|
-
ongoingRequests: {
|
|
1174
|
-
count: n.ongoingRequestCount,
|
|
1175
|
-
totalSize: n.ongoingByteCount
|
|
1176
|
-
},
|
|
1177
|
-
recordCount: e.recordCount,
|
|
1178
|
-
result: t,
|
|
1179
|
-
serializationDuration: {
|
|
1180
|
-
count: e.serializationDuration.count,
|
|
1181
|
-
max: e.serializationDuration.max,
|
|
1182
|
-
sum: e.serializationDuration.sum
|
|
1183
|
-
},
|
|
1184
|
-
size: {
|
|
1185
|
-
compressed: e.bytesCount,
|
|
1186
|
-
raw: e.rawSize
|
|
1187
|
-
}
|
|
1188
|
-
};
|
|
1189
|
-
}
|
|
1190
|
-
function qe(t) {
|
|
1191
|
-
const n = Ut();
|
|
1192
|
-
return {
|
|
1193
|
-
addRecord: (e) => {
|
|
1194
|
-
const o = t.findView();
|
|
1195
|
-
n.send("record", e, o.id);
|
|
1196
|
-
}
|
|
1197
|
-
};
|
|
1198
|
-
}
|
|
1199
|
-
function je(t, n, e, o, s, i, r) {
|
|
1200
|
-
const u = [], a = (f) => {
|
|
1201
|
-
t.notify(14, { error: f }), Wt("Error reported to customer", { "error.message": f.message });
|
|
1202
|
-
}, c = r || Ht([n.sessionReplayEndpointBuilder], pt, a);
|
|
1203
|
-
let d;
|
|
1204
|
-
if (Gt())
|
|
1205
|
-
({ addRecord: d } = qe(o));
|
|
1206
|
-
else {
|
|
1207
|
-
const f = We(t, n, e, o, c, s);
|
|
1208
|
-
d = f.addRecord, u.push(f.stop);
|
|
1209
|
-
const p = Xe(i, c.observable);
|
|
1210
|
-
u.push(p.stop);
|
|
1211
|
-
}
|
|
1212
|
-
const { stop: l } = Be({
|
|
1213
|
-
emit: d,
|
|
1214
|
-
configuration: n,
|
|
1215
|
-
lifeCycle: t,
|
|
1216
|
-
viewHistory: o
|
|
1217
|
-
});
|
|
1218
|
-
return u.push(l), {
|
|
1219
|
-
stop: () => {
|
|
1220
|
-
u.forEach((f) => f());
|
|
1221
|
-
}
|
|
1222
|
-
};
|
|
1223
|
-
}
|
|
1224
|
-
export {
|
|
1225
|
-
je as startRecording
|
|
1226
|
-
};
|
|
1227
|
-
//# sourceMappingURL=startRecording.BFOwOm6d.js.map
|