@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.
Files changed (94) hide show
  1. package/README.md +10 -8
  2. package/assets/BRAZILIAN_ID.BychxTsM.webp +0 -0
  3. package/assets/BRAZILIAN_ID.COOwtpxb.js +5 -0
  4. package/assets/style.css +1 -388
  5. package/dd/profiler-DTWkT7Mn.js +235 -0
  6. package/dd/startRecording-DqW-BV0C.js +1494 -0
  7. package/{ar.6FvD271D.js → i18n/ar.ClpiOMp8.js} +18 -6
  8. package/{az.xV1CTm4w.js → i18n/az.Zjkmxx0W.js} +17 -5
  9. package/{bg.CCHtVJ8V.js → i18n/bg.TQ5gDhpN.js} +17 -5
  10. package/{bn.DDCfJGfy.js → i18n/bn.DqLfaDm8.js} +18 -6
  11. package/{ca.BmzzNtsu.js → i18n/ca.N1Ii2N6w.js} +17 -5
  12. package/{ceb.DP4PBOky.js → i18n/ceb.DGoxFAno.js} +17 -5
  13. package/{cs.CF_-gGCz.js → i18n/cs.B219Ze7G.js} +17 -5
  14. package/{da.BvNYfmLS.js → i18n/da.BmYd7JeC.js} +18 -6
  15. package/{de.ChoKs_Ih.js → i18n/de.4yYjZHjq.js} +17 -5
  16. package/{el.CmH9V0Yg.js → i18n/el.w7n6P_Tm.js} +17 -5
  17. package/{en._TYEyLHi.js → i18n/en.Ct44TlJ6.js} +15 -3
  18. package/{en_GB.0E4-hrRx.js → i18n/en_GB.DZfrkPbd.js} +15 -3
  19. package/{es.D__FE4D_.js → i18n/es.DcA3jLM9.js} +17 -5
  20. package/{es_MX.Db15FX9q.js → i18n/es_MX.ClqTjKZ-.js} +17 -5
  21. package/{et.Gn0z9Ivj.js → i18n/et.MMOd-uTo.js} +17 -5
  22. package/{fi.DzSyn__-.js → i18n/fi.CWbrDO4V.js} +17 -5
  23. package/{fil.DbXgzFds.js → i18n/fil.BJfPVW56.js} +17 -5
  24. package/{fr.Nad_Iv9w.js → i18n/fr.CjZ5cmiI.js} +17 -5
  25. package/{fr_CA.BqIhyqJg.js → i18n/fr_CA.CtHm7-qi.js} +19 -7
  26. package/{ga.DZftCvLf.js → i18n/ga.D6-1kfWr.js} +17 -5
  27. package/{he.D_Ot5G9X.js → i18n/he.Bi8juarT.js} +17 -5
  28. package/{hi.k1gL9P6R.js → i18n/hi.CFfDmSnf.js} +19 -7
  29. package/{hr.CFkMZjpr.js → i18n/hr.DZlUE7C8.js} +16 -4
  30. package/{hu.ChFZfAE3.js → i18n/hu.BpD-aMLX.js} +17 -5
  31. package/{hy.DNM9FTFD.js → i18n/hy.BaLqt_2N.js} +17 -5
  32. package/{id.CUwbO5IH.js → i18n/id.uRdF9gWF.js} +17 -5
  33. package/{is.hApbPYEY.js → i18n/is.BYQe-WHx.js} +17 -5
  34. package/{it.Bhegj4nF.js → i18n/it.CkU67L1U.js} +17 -5
  35. package/{ja.CJXtbCJw.js → i18n/ja.BH3qTT3H.js} +17 -5
  36. package/{jv.DQNROsUW.js → i18n/jv.B4fRWclO.js} +17 -5
  37. package/{ka_GE.DRQWZxDK.js → i18n/ka_GE.CTzSn9eo.js} +17 -5
  38. package/{kk.SmX8cO85.js → i18n/kk.C0siUu93.js} +17 -5
  39. package/{km_KH.tErSrUl8.js → i18n/km_KH.ZTbV01Qz.js} +17 -5
  40. package/{ko.BSuxjnwo.js → i18n/ko.Bb4J3kDH.js} +17 -5
  41. package/{lt.9xY-bF8b.js → i18n/lt.D3asVxYB.js} +16 -4
  42. package/{lv.KAJ3Th5c.js → i18n/lv.fkwne764.js} +17 -5
  43. package/{ms.B8ifUn3g.js → i18n/ms.DEHT6MDZ.js} +17 -5
  44. package/{my.46LpbgwX.js → i18n/my.CRVpYNLc.js} +17 -5
  45. package/{nl.jT_sFmTM.js → i18n/nl.DV_Z3712.js} +17 -5
  46. package/{no.C7sncEKD.js → i18n/no.C91-fx2t.js} +17 -5
  47. package/{pl.5XkGPjIZ.js → i18n/pl.deHkL4G-.js} +17 -5
  48. package/{pt.DgAAo08E.js → i18n/pt.D7DApQ_g.js} +17 -5
  49. package/{pt_BR.DEMIQWXD.js → i18n/pt_BR.DeWUm5I5.js} +17 -5
  50. package/{ro.O04ahCMK.js → i18n/ro.Bgy4hiF2.js} +17 -5
  51. package/{ru.58VavBFj.js → i18n/ru.Cn-5tOIR.js} +17 -5
  52. package/{sk.CKOgMaWx.js → i18n/sk.rlnyfpQR.js} +17 -5
  53. package/{sl.T6u4zQdv.js → i18n/sl.BHBnOa58.js} +21 -9
  54. package/{sq.DhxxMSD4.js → i18n/sq.qB--p25v.js} +17 -5
  55. package/{sr_Cyrl.ScPJhaK1.js → i18n/sr_Cyrl.CSBzkXjX.js} +16 -4
  56. package/{sr_Latn.ClgaYy2P.js → i18n/sr_Latn._nXdqCNI.js} +16 -4
  57. package/{sv.BqoHH9_Z.js → i18n/sv.exooz9wm.js} +17 -5
  58. package/{sw.ASoszWzl.js → i18n/sw.BrOra_jt.js} +16 -4
  59. package/{th.wQot4sEY.js → i18n/th.LZGAQSSx.js} +17 -5
  60. package/{tr.BgMiJg4a.js → i18n/tr.Dizt7E2M.js} +17 -5
  61. package/{uk.ODxwJ7HV.js → i18n/uk.xMYrw91N.js} +17 -5
  62. package/{ur.CE1x0LsE.js → i18n/ur.BmuWXUfh.js} +18 -6
  63. package/{uz.DBb8NWV6.js → i18n/uz.CzsxPnXQ.js} +21 -9
  64. package/{vi.DTsjGEnr.js → i18n/vi.B_KdJnMy.js} +17 -5
  65. package/{zh_CN.C898bOEl.js → i18n/zh_CN.BBdQPt4L.js} +17 -5
  66. package/{zh_HK.Bi_0oROP.js → i18n/zh_HK.BRzNtOzu.js} +17 -5
  67. package/index.BloC8BH6.js +64242 -0
  68. package/index.d.ts +3599 -1043
  69. package/index.html +41 -13
  70. package/index.js +24 -822
  71. package/index2.js +869 -0
  72. package/ml/assets_da_web_1_1_6.tar.D1WfMJyS.gz +0 -0
  73. package/ml/assets_da_web_1_1_6.tar.DmSCvmf5.js +5 -0
  74. package/ml/dac.D2xph-5h.js +5 -0
  75. package/ml/dac.DeLxs2vM.wasm +0 -0
  76. package/ml/dac_simd.2xjZJ5dE.js +5 -0
  77. package/ml/dac_simd.BHe9yV3l.wasm +0 -0
  78. package/package.json +8 -4
  79. package/pdfjs/pdf-U_mH0bJO.js +17500 -0
  80. package/pdfjs/pdf.worker.min-DFxVranA.js +5 -0
  81. package/third-party-licenses.txt +1684 -8532
  82. package/BRAZILIAN_ID.BmZRIYzL.js +0 -5
  83. package/CHANGELOG.md +0 -106
  84. package/assets/fonts/jumio-sdk-icomoon.svg +0 -117
  85. package/assets/fonts/jumio-sdk-icomoon.ttf +0 -0
  86. package/assets/fonts/jumio-sdk-icomoon.woff +0 -0
  87. package/assets_da_web_1_1_6.tar.CCpLQ2oJ.js +0 -5
  88. package/dac.C1nISBeT.js +0 -5
  89. package/dac_simd.CQrYamf5.js +0 -5
  90. package/index.C0rkfp1G.js +0 -60487
  91. package/pdfjs/pdf-DDTuoCrJ.js +0 -17532
  92. package/pdfjs/pdf.worker.min-BJaB4MSa.js +0 -5
  93. package/profiler.B7SF_C2Q.js +0 -278
  94. package/startRecording.BFOwOm6d.js +0 -1227
@@ -0,0 +1,235 @@
1
+ import { c as H, j as D, o as x, a as C, b as q, d as G, e as _, g as X, f as J, s as K, h as N, i as Q, k as W, l as Y, m as Z } from "../index.BloC8BH6.js";
2
+ function $(e, s, o, i) {
3
+ const p = (a) => {
4
+ s.notify(14, { error: a }), C("Error reported to customer", { "error.message": a.message });
5
+ }, d = H([e.profilingEndpointBuilder], p), c = o(i);
6
+ return {
7
+ async send({ event: a, ...E }) {
8
+ const f = new FormData(), m = D(a);
9
+ if (!m)
10
+ throw new Error("Failed to serialize event");
11
+ f.append("event", new Blob([m], { type: "application/json" }), "event.json");
12
+ let n = m.length;
13
+ for (const [v, k] of x(E)) {
14
+ const w = D(k);
15
+ if (!w)
16
+ throw new Error("Failed to serialize attachment");
17
+ const g = await ee(c, w);
18
+ n += g.outputBytesCount, f.append(v, new Blob([g.output]), v);
19
+ }
20
+ d.send({
21
+ data: f,
22
+ bytesCount: n
23
+ });
24
+ }
25
+ };
26
+ }
27
+ function ee(e, s) {
28
+ return new Promise((o) => {
29
+ e.write(s), e.finish((i) => {
30
+ o(i);
31
+ });
32
+ });
33
+ }
34
+ function te(e) {
35
+ let s = 0;
36
+ for (const o of e)
37
+ o.stackId !== void 0 && s++;
38
+ return s;
39
+ }
40
+ const se = /\/(?![vV]\d{1,2}\/)([^/\d?]*\d+[^/?]*)/g;
41
+ function ne(e) {
42
+ return e ? e.replace(se, "/?") : "/";
43
+ }
44
+ const O = (e, s) => e || ne(s);
45
+ function re(e, s, o) {
46
+ const { ids: i, names: p } = oe(e.views), d = e.longTasks.map((a) => a.id).filter((a) => a !== void 0), c = { application: { id: s } };
47
+ return o && (c.session = { id: o }), i.length && (c.view = { id: i, name: p }), d.length && (c.long_task = { id: d }), c;
48
+ }
49
+ function oe(e) {
50
+ const s = { ids: [], names: [] };
51
+ for (const o of e)
52
+ s.ids.push(o.viewId), o.viewName && s.names.push(o.viewName);
53
+ return s.names = Array.from(new Set(s.names)), s;
54
+ }
55
+ function ae(e, s, o) {
56
+ return {
57
+ event: ie(e, s, o),
58
+ "wall-time.json": e
59
+ };
60
+ }
61
+ function ie(e, s, o) {
62
+ const i = q(s), p = re(e, s.applicationId, o), d = le(i);
63
+ return {
64
+ ...p,
65
+ attachments: ["wall-time.json"],
66
+ start: new Date(e.startClocks.timeStamp).toISOString(),
67
+ end: new Date(e.endClocks.timeStamp).toISOString(),
68
+ family: "chrome",
69
+ runtime: "chrome",
70
+ format: "json",
71
+ version: 4,
72
+ // Ingestion event version (not the version application tag)
73
+ tags_profiler: d.join(","),
74
+ _dd: {
75
+ clock_drift: G()
76
+ }
77
+ };
78
+ }
79
+ function le(e) {
80
+ return e.concat(["language:javascript", "runtime:chrome", "family:chrome", "host:browser"]);
81
+ }
82
+ const ue = {
83
+ sampleIntervalMs: 10,
84
+ // Sample stack trace every 10ms
85
+ collectIntervalMs: 6e4,
86
+ // Collect data every minute
87
+ minProfileDurationMs: 5e3,
88
+ // Require at least 5 seconds of profile data to reduce noise and cost
89
+ minNumberOfSamples: 50
90
+ // Require at least 50 samples (~500 ms) to report a profile to reduce noise and cost
91
+ };
92
+ function de(e, s, o, i, p, d, c, a = ue) {
93
+ const E = $(
94
+ e,
95
+ s,
96
+ d,
97
+ 6
98
+ /* DeflateEncoderStreamId.PROFILING */
99
+ );
100
+ let f;
101
+ const m = [];
102
+ let n = { state: "stopped", stateReason: "initializing" };
103
+ s.subscribe(9, () => {
104
+ w("session-expired");
105
+ }), s.subscribe(10, () => {
106
+ n.state === "stopped" && n.stateReason === "session-expired" && v();
107
+ });
108
+ function v() {
109
+ if (n.state === "running")
110
+ return;
111
+ const t = c.findView();
112
+ f = t ? {
113
+ startClocks: t.startClocks,
114
+ viewId: t.id,
115
+ viewName: O(t.name, document.location.pathname)
116
+ } : void 0, m.push(_(e, window, "visibilitychange", A).stop, _(e, window, "beforeunload", B).stop), b();
117
+ }
118
+ function k() {
119
+ w("stopped-by-user");
120
+ }
121
+ function w(t) {
122
+ j(t), m.forEach((r) => r()), i.set({ status: "stopped", error_reason: void 0 });
123
+ }
124
+ function g(t) {
125
+ if (t.state === "running")
126
+ return {
127
+ cleanupTasks: t.cleanupTasks
128
+ };
129
+ const r = [], u = s.subscribe(2, (l) => {
130
+ const h = {
131
+ viewId: l.id,
132
+ // Note: `viewName` is only filled when users use manual view creation via `startView` method.
133
+ viewName: O(l.name, document.location.pathname),
134
+ startClocks: l.startClocks
135
+ };
136
+ y(h), f = h;
137
+ });
138
+ return r.push(u.unsubscribe), {
139
+ cleanupTasks: r
140
+ };
141
+ }
142
+ function b() {
143
+ const t = X().Profiler;
144
+ if (!t)
145
+ throw i.set({ status: "error", error_reason: "not-supported-by-browser" }), new Error("RUM Profiler is not supported in this browser.");
146
+ n.state === "running" && I(n);
147
+ const { cleanupTasks: r } = g(n);
148
+ let u;
149
+ try {
150
+ u = new t({
151
+ sampleInterval: a.sampleIntervalMs,
152
+ // Keep buffer size at 1.5 times of minimum required to collect data for a profiling instance
153
+ maxBufferSize: Math.round(a.collectIntervalMs * 1.5 / a.sampleIntervalMs)
154
+ });
155
+ } catch (l) {
156
+ l instanceof Error && l.message.includes("disabled by Document Policy") ? (J.warn("[DD_RUM] Profiler startup failed. Ensure your server includes the `Document-Policy: js-profiling` response header when serving HTML pages.", l), i.set({ status: "error", error_reason: "missing-document-policy-header" })) : i.set({ status: "error", error_reason: "unexpected-exception" });
157
+ return;
158
+ }
159
+ i.set({ status: "running", error_reason: void 0 }), n = {
160
+ state: "running",
161
+ startClocks: N(),
162
+ profiler: u,
163
+ timeoutId: K(b, a.collectIntervalMs),
164
+ views: [],
165
+ cleanupTasks: r,
166
+ longTasks: []
167
+ }, y(f), u.addEventListener("samplebufferfull", T);
168
+ }
169
+ function I(t) {
170
+ Q(t.timeoutId), t.profiler.removeEventListener("samplebufferfull", T);
171
+ const { startClocks: r, views: u } = t;
172
+ t.profiler.stop().then((l) => {
173
+ const h = N(), P = W(r.timeStamp, h.timeStamp), S = p.findLongTasks(r.relative, P), U = P < a.minProfileDurationMs, z = te(l.samples) < a.minNumberOfSamples;
174
+ S.length === 0 && (U || z) || R(
175
+ // Enrich trace with time and instance data
176
+ Object.assign(l, {
177
+ startClocks: r,
178
+ endClocks: h,
179
+ clocksOrigin: Y(),
180
+ longTasks: S,
181
+ views: u,
182
+ sampleInterval: a.sampleIntervalMs
183
+ })
184
+ );
185
+ }).catch(Z);
186
+ }
187
+ function j(t) {
188
+ if (n.state === "paused") {
189
+ n = { state: "stopped", stateReason: t };
190
+ return;
191
+ }
192
+ if (n.state !== "running")
193
+ return;
194
+ const r = n;
195
+ n = { state: "stopped", stateReason: t }, r.cleanupTasks.forEach((u) => u()), I(r);
196
+ }
197
+ function M() {
198
+ if (n.state !== "running")
199
+ return;
200
+ const t = n;
201
+ n = { state: "paused" }, t.cleanupTasks.forEach((r) => r()), I(t);
202
+ }
203
+ function y(t) {
204
+ n.state !== "running" || !t || n.views.push(t);
205
+ }
206
+ function R(t) {
207
+ var r;
208
+ const u = (r = o.findTrackedSession()) === null || r === void 0 ? void 0 : r.id, l = ae(t, e, u);
209
+ E.send(l);
210
+ }
211
+ function T() {
212
+ b();
213
+ }
214
+ function A() {
215
+ document.visibilityState === "hidden" && n.state === "running" ? M() : document.visibilityState === "visible" && n.state === "paused" && b();
216
+ }
217
+ function B() {
218
+ b();
219
+ }
220
+ function L() {
221
+ return n.state === "stopped";
222
+ }
223
+ function V() {
224
+ return n.state === "running";
225
+ }
226
+ function F() {
227
+ return n.state === "paused";
228
+ }
229
+ return { start: v, stop: k, isStopped: L, isRunning: V, isPaused: F };
230
+ }
231
+ export {
232
+ ue as DEFAULT_RUM_PROFILER_CONFIGURATION,
233
+ de as createRumProfiler
234
+ };
235
+ //# sourceMappingURL=profiler-DTWkT7Mn.js.map