@cloudflare/vite-plugin 0.1.9 → 0.1.11
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 +9 -0
- package/dist/asset-workers/asset-worker.js +1151 -1018
- package/dist/asset-workers/router-worker.js +593 -594
- package/dist/index.js +56 -52
- package/package.json +7 -7
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// ../workers-shared/dist/router-worker.mjs
|
|
2
|
-
var
|
|
2
|
+
var ue = class {
|
|
3
3
|
constructor(e) {
|
|
4
4
|
this.performanceTimer = e;
|
|
5
5
|
}
|
|
@@ -8,79 +8,79 @@ var fe = class {
|
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
10
|
var bt = Object.prototype.toString;
|
|
11
|
-
function F(
|
|
12
|
-
switch (bt.call(
|
|
11
|
+
function F(t4) {
|
|
12
|
+
switch (bt.call(t4)) {
|
|
13
13
|
case "[object Error]":
|
|
14
14
|
case "[object Exception]":
|
|
15
15
|
case "[object DOMException]":
|
|
16
16
|
return true;
|
|
17
17
|
default:
|
|
18
|
-
return O(
|
|
18
|
+
return O(t4, Error);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
function
|
|
22
|
-
return bt.call(
|
|
21
|
+
function Le(t4, e) {
|
|
22
|
+
return bt.call(t4) === `[object ${e}]`;
|
|
23
23
|
}
|
|
24
|
-
function
|
|
25
|
-
return
|
|
24
|
+
function Fe(t4) {
|
|
25
|
+
return Le(t4, "ErrorEvent");
|
|
26
26
|
}
|
|
27
|
-
function
|
|
28
|
-
return
|
|
27
|
+
function Ue(t4) {
|
|
28
|
+
return Le(t4, "String");
|
|
29
29
|
}
|
|
30
|
-
function H(
|
|
31
|
-
return typeof
|
|
30
|
+
function H(t4) {
|
|
31
|
+
return typeof t4 == "object" && t4 !== null && "__sentry_template_string__" in t4 && "__sentry_template_values__" in t4;
|
|
32
32
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
33
|
+
function pe(t4) {
|
|
34
|
+
return t4 === null || H(t4) || typeof t4 != "object" && typeof t4 != "function";
|
|
35
35
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
36
|
+
function A(t4) {
|
|
37
|
+
return Le(t4, "Object");
|
|
38
38
|
}
|
|
39
|
-
function
|
|
40
|
-
return typeof Event < "u" && O(
|
|
39
|
+
function Be(t4) {
|
|
40
|
+
return typeof Event < "u" && O(t4, Event);
|
|
41
41
|
}
|
|
42
|
-
function
|
|
43
|
-
return typeof Element < "u" && O(
|
|
42
|
+
function $e(t4) {
|
|
43
|
+
return typeof Element < "u" && O(t4, Element);
|
|
44
44
|
}
|
|
45
|
-
function C(
|
|
46
|
-
return !!(
|
|
45
|
+
function C(t4) {
|
|
46
|
+
return !!(t4 && t4.then && typeof t4.then == "function");
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
return
|
|
48
|
+
function je(t4) {
|
|
49
|
+
return A(t4) && "nativeEvent" in t4 && "preventDefault" in t4 && "stopPropagation" in t4;
|
|
50
50
|
}
|
|
51
|
-
function O(
|
|
51
|
+
function O(t4, e) {
|
|
52
52
|
try {
|
|
53
|
-
return
|
|
53
|
+
return t4 instanceof e;
|
|
54
54
|
} catch {
|
|
55
55
|
return false;
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
59
|
-
return !!(typeof
|
|
58
|
+
function Ge(t4) {
|
|
59
|
+
return !!(typeof t4 == "object" && t4 !== null && (t4.__isVue || t4._isVue));
|
|
60
60
|
}
|
|
61
|
-
function k(
|
|
62
|
-
return typeof
|
|
61
|
+
function k(t4, e = 0) {
|
|
62
|
+
return typeof t4 != "string" || e === 0 || t4.length <= e ? t4 : `${t4.slice(0, e)}...`;
|
|
63
63
|
}
|
|
64
64
|
var D = "8.9.2";
|
|
65
65
|
var m = globalThis;
|
|
66
|
-
function q(
|
|
66
|
+
function q(t4, e, n) {
|
|
67
67
|
let r = n || m, o = r.__SENTRY__ = r.__SENTRY__ || {}, s = o[D] = o[D] || {};
|
|
68
|
-
return s[
|
|
68
|
+
return s[t4] || (s[t4] = e());
|
|
69
69
|
}
|
|
70
70
|
var kn = m;
|
|
71
71
|
var Dn = 80;
|
|
72
|
-
function Rt(
|
|
73
|
-
if (!
|
|
72
|
+
function Rt(t4, e = {}) {
|
|
73
|
+
if (!t4) return "<unknown>";
|
|
74
74
|
try {
|
|
75
|
-
let n =
|
|
75
|
+
let n = t4, r = 5, o = [], s = 0, i = 0, a = " > ", c = a.length, u, f = Array.isArray(e) ? e : e.keyAttrs, p = !Array.isArray(e) && e.maxStringLength || Dn;
|
|
76
76
|
for (; n && s++ < r && (u = vn(n, f), !(u === "html" || s > 1 && i + o.length * c + u.length >= p)); ) o.push(u), i += u.length, n = n.parentNode;
|
|
77
77
|
return o.reverse().join(a);
|
|
78
78
|
} catch {
|
|
79
79
|
return "<unknown>";
|
|
80
80
|
}
|
|
81
81
|
}
|
|
82
|
-
function vn(
|
|
83
|
-
let n =
|
|
82
|
+
function vn(t4, e) {
|
|
83
|
+
let n = t4, r = [], o, s, i, a, c;
|
|
84
84
|
if (!n || !n.tagName) return "";
|
|
85
85
|
if (kn.HTMLElement && n instanceof HTMLElement && n.dataset) {
|
|
86
86
|
if (n.dataset.sentryComponent) return n.dataset.sentryComponent;
|
|
@@ -91,24 +91,24 @@ function vn(t, e) {
|
|
|
91
91
|
if (u && u.length) u.forEach((p) => {
|
|
92
92
|
r.push(`[${p[0]}="${p[1]}"]`);
|
|
93
93
|
});
|
|
94
|
-
else if (n.id && r.push(`#${n.id}`), o = n.className, o &&
|
|
94
|
+
else if (n.id && r.push(`#${n.id}`), o = n.className, o && Ue(o)) for (s = o.split(/\s+/), c = 0; c < s.length; c++) r.push(`.${s[c]}`);
|
|
95
95
|
let f = ["aria-label", "type", "name", "title", "alt"];
|
|
96
96
|
for (c = 0; c < f.length; c++) i = f[c], a = n.getAttribute(i), a && r.push(`[${i}="${a}"]`);
|
|
97
97
|
return r.join("");
|
|
98
98
|
}
|
|
99
99
|
var v = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
|
|
100
100
|
var Mn = "Sentry Logger ";
|
|
101
|
-
var
|
|
102
|
-
var
|
|
103
|
-
function
|
|
104
|
-
if (!("console" in m)) return
|
|
105
|
-
let e = m.console, n = {}, r = Object.keys(
|
|
101
|
+
var He = ["debug", "info", "warn", "error", "log", "assert", "trace"];
|
|
102
|
+
var qe = {};
|
|
103
|
+
function fe(t4) {
|
|
104
|
+
if (!("console" in m)) return t4();
|
|
105
|
+
let e = m.console, n = {}, r = Object.keys(qe);
|
|
106
106
|
r.forEach((o) => {
|
|
107
|
-
let s =
|
|
107
|
+
let s = qe[o];
|
|
108
108
|
n[o] = e[o], e[o] = s;
|
|
109
109
|
});
|
|
110
110
|
try {
|
|
111
|
-
return
|
|
111
|
+
return t4();
|
|
112
112
|
} finally {
|
|
113
113
|
r.forEach((o) => {
|
|
114
114
|
e[o] = n[o];
|
|
@@ -116,36 +116,36 @@ function le(t) {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
function Pn() {
|
|
119
|
-
let
|
|
120
|
-
|
|
119
|
+
let t4 = false, e = { enable: () => {
|
|
120
|
+
t4 = true;
|
|
121
121
|
}, disable: () => {
|
|
122
|
-
|
|
123
|
-
}, isEnabled: () =>
|
|
124
|
-
return v ?
|
|
122
|
+
t4 = false;
|
|
123
|
+
}, isEnabled: () => t4 };
|
|
124
|
+
return v ? He.forEach((n) => {
|
|
125
125
|
e[n] = (...r) => {
|
|
126
|
-
|
|
126
|
+
t4 && fe(() => {
|
|
127
127
|
m.console[n](`${Mn}[${n}]:`, ...r);
|
|
128
128
|
});
|
|
129
129
|
};
|
|
130
|
-
}) :
|
|
130
|
+
}) : He.forEach((n) => {
|
|
131
131
|
e[n] = () => {
|
|
132
132
|
};
|
|
133
133
|
}), e;
|
|
134
134
|
}
|
|
135
135
|
var d = Pn();
|
|
136
136
|
var wn = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
|
|
137
|
-
function Ln(
|
|
138
|
-
return
|
|
137
|
+
function Ln(t4) {
|
|
138
|
+
return t4 === "http" || t4 === "https";
|
|
139
139
|
}
|
|
140
|
-
function M(
|
|
141
|
-
let { host: n, path: r, pass: o, port: s, projectId: i, protocol: a, publicKey: c } =
|
|
140
|
+
function M(t4, e = false) {
|
|
141
|
+
let { host: n, path: r, pass: o, port: s, projectId: i, protocol: a, publicKey: c } = t4;
|
|
142
142
|
return `${a}://${c}${e && o ? `:${o}` : ""}@${n}${s ? `:${s}` : ""}/${r && `${r}/`}${i}`;
|
|
143
143
|
}
|
|
144
|
-
function Ct(
|
|
145
|
-
let e = wn.exec(
|
|
144
|
+
function Ct(t4) {
|
|
145
|
+
let e = wn.exec(t4);
|
|
146
146
|
if (!e) {
|
|
147
|
-
|
|
148
|
-
console.error(`Invalid Sentry Dsn: ${
|
|
147
|
+
fe(() => {
|
|
148
|
+
console.error(`Invalid Sentry Dsn: ${t4}`);
|
|
149
149
|
});
|
|
150
150
|
return;
|
|
151
151
|
}
|
|
@@ -156,56 +156,56 @@ function Ct(t) {
|
|
|
156
156
|
}
|
|
157
157
|
return Ot({ host: s, pass: o, path: c, projectId: u, port: i, protocol: n, publicKey: r });
|
|
158
158
|
}
|
|
159
|
-
function Ot(
|
|
160
|
-
return { protocol:
|
|
159
|
+
function Ot(t4) {
|
|
160
|
+
return { protocol: t4.protocol, publicKey: t4.publicKey || "", pass: t4.pass || "", host: t4.host, port: t4.port || "", path: t4.path || "", projectId: t4.projectId };
|
|
161
161
|
}
|
|
162
|
-
function Fn(
|
|
162
|
+
function Fn(t4) {
|
|
163
163
|
if (!v) return true;
|
|
164
|
-
let { port: e, projectId: n, protocol: r } =
|
|
165
|
-
return ["protocol", "publicKey", "host", "projectId"].find((i) =>
|
|
164
|
+
let { port: e, projectId: n, protocol: r } = t4;
|
|
165
|
+
return ["protocol", "publicKey", "host", "projectId"].find((i) => t4[i] ? false : (d.error(`Invalid Sentry Dsn: ${i} missing`), true)) ? false : n.match(/^\d+$/) ? Ln(r) ? e && isNaN(parseInt(e, 10)) ? (d.error(`Invalid Sentry Dsn: Invalid port ${e}`), false) : true : (d.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), false) : (d.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), false);
|
|
166
166
|
}
|
|
167
|
-
function
|
|
168
|
-
let e = typeof
|
|
167
|
+
function de(t4) {
|
|
168
|
+
let e = typeof t4 == "string" ? Ct(t4) : Ot(t4);
|
|
169
169
|
if (!(!e || !Fn(e))) return e;
|
|
170
170
|
}
|
|
171
|
-
var
|
|
171
|
+
var y = class extends Error {
|
|
172
172
|
constructor(e, n = "warn") {
|
|
173
173
|
super(e), this.message = e, this.name = new.target.prototype.constructor.name, Object.setPrototypeOf(this, new.target.prototype), this.logLevel = n;
|
|
174
174
|
}
|
|
175
175
|
};
|
|
176
|
-
function U(
|
|
176
|
+
function U(t4, e, n) {
|
|
177
177
|
try {
|
|
178
|
-
Object.defineProperty(
|
|
178
|
+
Object.defineProperty(t4, e, { value: n, writable: true, configurable: true });
|
|
179
179
|
} catch {
|
|
180
|
-
v && d.log(`Failed to add non-enumerable property "${e}" to object`,
|
|
180
|
+
v && d.log(`Failed to add non-enumerable property "${e}" to object`, t4);
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
function
|
|
184
|
-
return Object.keys(
|
|
183
|
+
function Ye(t4) {
|
|
184
|
+
return Object.keys(t4).map((e) => `${encodeURIComponent(e)}=${encodeURIComponent(t4[e])}`).join("&");
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
if (F(
|
|
188
|
-
if (
|
|
189
|
-
let e = { type:
|
|
190
|
-
return typeof CustomEvent < "u" && O(
|
|
191
|
-
} else return
|
|
186
|
+
function le(t4) {
|
|
187
|
+
if (F(t4)) return { message: t4.message, name: t4.name, stack: t4.stack, ...kt(t4) };
|
|
188
|
+
if (Be(t4)) {
|
|
189
|
+
let e = { type: t4.type, target: Nt(t4.target), currentTarget: Nt(t4.currentTarget), ...kt(t4) };
|
|
190
|
+
return typeof CustomEvent < "u" && O(t4, CustomEvent) && (e.detail = t4.detail), e;
|
|
191
|
+
} else return t4;
|
|
192
192
|
}
|
|
193
|
-
function Nt(
|
|
193
|
+
function Nt(t4) {
|
|
194
194
|
try {
|
|
195
|
-
return
|
|
195
|
+
return $e(t4) ? Rt(t4) : Object.prototype.toString.call(t4);
|
|
196
196
|
} catch {
|
|
197
197
|
return "<unknown>";
|
|
198
198
|
}
|
|
199
199
|
}
|
|
200
|
-
function kt(
|
|
201
|
-
if (typeof
|
|
200
|
+
function kt(t4) {
|
|
201
|
+
if (typeof t4 == "object" && t4 !== null) {
|
|
202
202
|
let e = {};
|
|
203
|
-
for (let n in
|
|
203
|
+
for (let n in t4) Object.prototype.hasOwnProperty.call(t4, n) && (e[n] = t4[n]);
|
|
204
204
|
return e;
|
|
205
205
|
} else return {};
|
|
206
206
|
}
|
|
207
|
-
function
|
|
208
|
-
let n = Object.keys(
|
|
207
|
+
function K(t4, e = 40) {
|
|
208
|
+
let n = Object.keys(le(t4));
|
|
209
209
|
if (n.sort(), !n.length) return "[object has no keys]";
|
|
210
210
|
if (n[0].length >= e) return k(n[0], e);
|
|
211
211
|
for (let r = n.length; r > 0; r--) {
|
|
@@ -214,42 +214,42 @@ function V(t, e = 40) {
|
|
|
214
214
|
}
|
|
215
215
|
return "";
|
|
216
216
|
}
|
|
217
|
-
function E(
|
|
218
|
-
return
|
|
217
|
+
function E(t4) {
|
|
218
|
+
return ze(t4, /* @__PURE__ */ new Map());
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
if (Un(
|
|
222
|
-
let n = e.get(
|
|
220
|
+
function ze(t4, e) {
|
|
221
|
+
if (Un(t4)) {
|
|
222
|
+
let n = e.get(t4);
|
|
223
223
|
if (n !== void 0) return n;
|
|
224
224
|
let r = {};
|
|
225
|
-
e.set(
|
|
226
|
-
for (let o of Object.keys(
|
|
225
|
+
e.set(t4, r);
|
|
226
|
+
for (let o of Object.keys(t4)) typeof t4[o] < "u" && (r[o] = ze(t4[o], e));
|
|
227
227
|
return r;
|
|
228
228
|
}
|
|
229
|
-
if (Array.isArray(
|
|
230
|
-
let n = e.get(
|
|
229
|
+
if (Array.isArray(t4)) {
|
|
230
|
+
let n = e.get(t4);
|
|
231
231
|
if (n !== void 0) return n;
|
|
232
232
|
let r = [];
|
|
233
|
-
return e.set(
|
|
234
|
-
r.push(
|
|
233
|
+
return e.set(t4, r), t4.forEach((o) => {
|
|
234
|
+
r.push(ze(o, e));
|
|
235
235
|
}), r;
|
|
236
236
|
}
|
|
237
|
-
return
|
|
237
|
+
return t4;
|
|
238
238
|
}
|
|
239
|
-
function Un(
|
|
240
|
-
if (!
|
|
239
|
+
function Un(t4) {
|
|
240
|
+
if (!A(t4)) return false;
|
|
241
241
|
try {
|
|
242
|
-
let e = Object.getPrototypeOf(
|
|
242
|
+
let e = Object.getPrototypeOf(t4).constructor.name;
|
|
243
243
|
return !e || e === "Object";
|
|
244
244
|
} catch {
|
|
245
245
|
return true;
|
|
246
246
|
}
|
|
247
247
|
}
|
|
248
|
-
var
|
|
248
|
+
var me = "?";
|
|
249
249
|
var Dt = /\(error: (.*)\)/;
|
|
250
250
|
var vt = /captureMessage|captureException/;
|
|
251
|
-
function
|
|
252
|
-
let e =
|
|
251
|
+
function ge(...t4) {
|
|
252
|
+
let e = t4.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
|
|
253
253
|
return (n, r = 0, o = 0) => {
|
|
254
254
|
let s = [], i = n.split(`
|
|
255
255
|
`);
|
|
@@ -271,38 +271,38 @@ function _e(...t) {
|
|
|
271
271
|
return Mt(s.slice(o));
|
|
272
272
|
};
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
return Array.isArray(
|
|
274
|
+
function We(t4) {
|
|
275
|
+
return Array.isArray(t4) ? ge(...t4) : t4;
|
|
276
276
|
}
|
|
277
|
-
function Mt(
|
|
278
|
-
if (!
|
|
279
|
-
let e = Array.from(
|
|
280
|
-
return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(), vt.test(e[e.length - 1].function || "") && (e.pop(), vt.test(e[e.length - 1].function || "") && e.pop()), e.slice(0, 50).map((n) => ({ ...n, filename: n.filename || e[e.length - 1].filename, function: n.function ||
|
|
277
|
+
function Mt(t4) {
|
|
278
|
+
if (!t4.length) return [];
|
|
279
|
+
let e = Array.from(t4);
|
|
280
|
+
return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(), vt.test(e[e.length - 1].function || "") && (e.pop(), vt.test(e[e.length - 1].function || "") && e.pop()), e.slice(0, 50).map((n) => ({ ...n, filename: n.filename || e[e.length - 1].filename, function: n.function || me }));
|
|
281
281
|
}
|
|
282
|
-
var
|
|
283
|
-
function
|
|
282
|
+
var Je = "<anonymous>";
|
|
283
|
+
function V(t4) {
|
|
284
284
|
try {
|
|
285
|
-
return !
|
|
285
|
+
return !t4 || typeof t4 != "function" ? Je : t4.name || Je;
|
|
286
286
|
} catch {
|
|
287
|
-
return
|
|
287
|
+
return Je;
|
|
288
288
|
}
|
|
289
289
|
}
|
|
290
|
-
var
|
|
290
|
+
var he = {};
|
|
291
291
|
var Pt = {};
|
|
292
|
-
function
|
|
293
|
-
|
|
292
|
+
function _e(t4, e) {
|
|
293
|
+
he[t4] = he[t4] || [], he[t4].push(e);
|
|
294
294
|
}
|
|
295
|
-
function
|
|
296
|
-
Pt[
|
|
295
|
+
function Ee(t4, e) {
|
|
296
|
+
Pt[t4] || (e(), Pt[t4] = true);
|
|
297
297
|
}
|
|
298
|
-
function
|
|
299
|
-
let n =
|
|
298
|
+
function Se(t4, e) {
|
|
299
|
+
let n = t4 && he[t4];
|
|
300
300
|
if (n) for (let r of n) try {
|
|
301
301
|
r(e);
|
|
302
302
|
} catch (o) {
|
|
303
303
|
v && d.error(`Error while triggering instrumentation handler.
|
|
304
|
-
Type: ${
|
|
305
|
-
Name: ${
|
|
304
|
+
Type: ${t4}
|
|
305
|
+
Name: ${V(r)}
|
|
306
306
|
Error:`, o);
|
|
307
307
|
}
|
|
308
308
|
}
|
|
@@ -311,51 +311,51 @@ function z() {
|
|
|
311
311
|
return Date.now() / wt;
|
|
312
312
|
}
|
|
313
313
|
function Bn() {
|
|
314
|
-
let { performance:
|
|
315
|
-
if (!
|
|
316
|
-
let e = Date.now() -
|
|
317
|
-
return () => (n +
|
|
314
|
+
let { performance: t4 } = m;
|
|
315
|
+
if (!t4 || !t4.now) return z;
|
|
316
|
+
let e = Date.now() - t4.now(), n = t4.timeOrigin == null ? e : t4.timeOrigin;
|
|
317
|
+
return () => (n + t4.now()) / wt;
|
|
318
318
|
}
|
|
319
|
-
var
|
|
320
|
-
var
|
|
319
|
+
var Z = Bn();
|
|
320
|
+
var X;
|
|
321
321
|
var $n = (() => {
|
|
322
|
-
let { performance:
|
|
323
|
-
if (!
|
|
324
|
-
|
|
322
|
+
let { performance: t4 } = m;
|
|
323
|
+
if (!t4 || !t4.now) {
|
|
324
|
+
X = "none";
|
|
325
325
|
return;
|
|
326
326
|
}
|
|
327
|
-
let e = 3600 * 1e3, n =
|
|
328
|
-
return s || u ? o <= c ? (
|
|
327
|
+
let e = 3600 * 1e3, n = t4.now(), r = Date.now(), o = t4.timeOrigin ? Math.abs(t4.timeOrigin + n - r) : e, s = o < e, i = t4.timing && t4.timing.navigationStart, c = typeof i == "number" ? Math.abs(i + n - r) : e, u = c < e;
|
|
328
|
+
return s || u ? o <= c ? (X = "timeOrigin", t4.timeOrigin) : (X = "navigationStart", i) : (X = "dateNow", r);
|
|
329
329
|
})();
|
|
330
|
-
var
|
|
331
|
-
function
|
|
330
|
+
var ye = null;
|
|
331
|
+
function Ke(t4) {
|
|
332
332
|
let e = "error";
|
|
333
|
-
|
|
333
|
+
_e(e, t4), Ee(e, jn);
|
|
334
334
|
}
|
|
335
335
|
function jn() {
|
|
336
|
-
|
|
337
|
-
return
|
|
336
|
+
ye = m.onerror, m.onerror = function(t4, e, n, r, o) {
|
|
337
|
+
return Se("error", { column: r, error: o, line: n, msg: t4, url: e }), ye && !ye.__SENTRY_LOADER__ ? ye.apply(this, arguments) : false;
|
|
338
338
|
}, m.onerror.__SENTRY_INSTRUMENTED__ = true;
|
|
339
339
|
}
|
|
340
|
-
var
|
|
341
|
-
function
|
|
340
|
+
var Te = null;
|
|
341
|
+
function Ve(t4) {
|
|
342
342
|
let e = "unhandledrejection";
|
|
343
|
-
|
|
343
|
+
_e(e, t4), Ee(e, Gn);
|
|
344
344
|
}
|
|
345
345
|
function Gn() {
|
|
346
|
-
|
|
347
|
-
return
|
|
346
|
+
Te = m.onunhandledrejection, m.onunhandledrejection = function(t4) {
|
|
347
|
+
return Se("unhandledrejection", t4), Te && !Te.__SENTRY_LOADER__ ? Te.apply(this, arguments) : true;
|
|
348
348
|
}, m.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
|
|
349
349
|
}
|
|
350
350
|
function Lt() {
|
|
351
|
-
let
|
|
351
|
+
let t4 = typeof WeakSet == "function", e = t4 ? /* @__PURE__ */ new WeakSet() : [];
|
|
352
352
|
function n(o) {
|
|
353
|
-
if (
|
|
353
|
+
if (t4) return e.has(o) ? true : (e.add(o), false);
|
|
354
354
|
for (let s = 0; s < e.length; s++) if (e[s] === o) return true;
|
|
355
355
|
return e.push(o), false;
|
|
356
356
|
}
|
|
357
357
|
function r(o) {
|
|
358
|
-
if (
|
|
358
|
+
if (t4) e.delete(o);
|
|
359
359
|
else for (let s = 0; s < e.length; s++) if (e[s] === o) {
|
|
360
360
|
e.splice(s, 1);
|
|
361
361
|
break;
|
|
@@ -364,7 +364,7 @@ function Lt() {
|
|
|
364
364
|
return [n, r];
|
|
365
365
|
}
|
|
366
366
|
function S() {
|
|
367
|
-
let
|
|
367
|
+
let t4 = m, e = t4.crypto || t4.msCrypto, n = () => Math.random() * 16;
|
|
368
368
|
try {
|
|
369
369
|
if (e && e.randomUUID) return e.randomUUID().replace(/-/g, "");
|
|
370
370
|
e && e.getRandomValues && (n = () => {
|
|
@@ -375,15 +375,15 @@ function S() {
|
|
|
375
375
|
}
|
|
376
376
|
return ("10000000100040008000" + 1e11).replace(/[018]/g, (r) => (r ^ (n() & 15) >> r / 4).toString(16));
|
|
377
377
|
}
|
|
378
|
-
function Hn(
|
|
379
|
-
return
|
|
378
|
+
function Hn(t4) {
|
|
379
|
+
return t4.exception && t4.exception.values ? t4.exception.values[0] : void 0;
|
|
380
380
|
}
|
|
381
|
-
function
|
|
382
|
-
let r =
|
|
381
|
+
function Q(t4, e, n) {
|
|
382
|
+
let r = t4.exception = t4.exception || {}, o = r.values = r.values || [], s = o[0] = o[0] || {};
|
|
383
383
|
s.value || (s.value = e || ""), s.type || (s.type = n || "Error");
|
|
384
384
|
}
|
|
385
|
-
function B(
|
|
386
|
-
let n = Hn(
|
|
385
|
+
function B(t4, e) {
|
|
386
|
+
let n = Hn(t4);
|
|
387
387
|
if (!n) return;
|
|
388
388
|
let r = { type: "generic", handled: true }, o = n.mechanism;
|
|
389
389
|
if (n.mechanism = { ...r, ...o, ...e }, e && "data" in e) {
|
|
@@ -391,32 +391,32 @@ function B(t, e) {
|
|
|
391
391
|
n.mechanism.data = s;
|
|
392
392
|
}
|
|
393
393
|
}
|
|
394
|
-
function
|
|
395
|
-
if (
|
|
394
|
+
function Ie(t4) {
|
|
395
|
+
if (t4 && t4.__sentry_captured__) return true;
|
|
396
396
|
try {
|
|
397
|
-
U(
|
|
397
|
+
U(t4, "__sentry_captured__", true);
|
|
398
398
|
} catch {
|
|
399
399
|
}
|
|
400
400
|
return false;
|
|
401
401
|
}
|
|
402
|
-
function
|
|
403
|
-
return Array.isArray(
|
|
402
|
+
function ee(t4) {
|
|
403
|
+
return Array.isArray(t4) ? t4 : [t4];
|
|
404
404
|
}
|
|
405
|
-
function
|
|
405
|
+
function b(t4, e = 100, n = 1 / 0) {
|
|
406
406
|
try {
|
|
407
|
-
return
|
|
407
|
+
return Xe("", t4, e, n);
|
|
408
408
|
} catch (r) {
|
|
409
409
|
return { ERROR: `**non-serializable** (${r})` };
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
function Y(
|
|
413
|
-
let r =
|
|
414
|
-
return Jn(r) > n ? Y(
|
|
412
|
+
function Y(t4, e = 3, n = 100 * 1024) {
|
|
413
|
+
let r = b(t4, e);
|
|
414
|
+
return Jn(r) > n ? Y(t4, e - 1, n) : r;
|
|
415
415
|
}
|
|
416
|
-
function
|
|
416
|
+
function Xe(t4, e, n = 1 / 0, r = 1 / 0, o = Lt()) {
|
|
417
417
|
let [s, i] = o;
|
|
418
418
|
if (e == null || ["number", "boolean", "string"].includes(typeof e) && !Number.isNaN(e)) return e;
|
|
419
|
-
let a = qn(
|
|
419
|
+
let a = qn(t4, e);
|
|
420
420
|
if (!a.startsWith("[object ")) return a;
|
|
421
421
|
if (e.__sentry_skip_normalization__) return e;
|
|
422
422
|
let c = typeof e.__sentry_override_normalization_depth__ == "number" ? e.__sentry_override_normalization_depth__ : n;
|
|
@@ -425,10 +425,10 @@ function Ze(t, e, n = 1 / 0, r = 1 / 0, o = Lt()) {
|
|
|
425
425
|
let u = e;
|
|
426
426
|
if (u && typeof u.toJSON == "function") try {
|
|
427
427
|
let g = u.toJSON();
|
|
428
|
-
return
|
|
428
|
+
return Xe("", g, c - 1, r, o);
|
|
429
429
|
} catch {
|
|
430
430
|
}
|
|
431
|
-
let f = Array.isArray(e) ? [] : {}, p = 0, l =
|
|
431
|
+
let f = Array.isArray(e) ? [] : {}, p = 0, l = le(e);
|
|
432
432
|
for (let g in l) {
|
|
433
433
|
if (!Object.prototype.hasOwnProperty.call(l, g)) continue;
|
|
434
434
|
if (p >= r) {
|
|
@@ -436,21 +436,21 @@ function Ze(t, e, n = 1 / 0, r = 1 / 0, o = Lt()) {
|
|
|
436
436
|
break;
|
|
437
437
|
}
|
|
438
438
|
let h = l[g];
|
|
439
|
-
f[g] =
|
|
439
|
+
f[g] = Xe(g, h, c - 1, r, o), p++;
|
|
440
440
|
}
|
|
441
441
|
return i(e), f;
|
|
442
442
|
}
|
|
443
|
-
function qn(
|
|
443
|
+
function qn(t4, e) {
|
|
444
444
|
try {
|
|
445
|
-
if (
|
|
446
|
-
if (
|
|
445
|
+
if (t4 === "domain" && e && typeof e == "object" && e._events) return "[Domain]";
|
|
446
|
+
if (t4 === "domainEmitter") return "[DomainEmitter]";
|
|
447
447
|
if (typeof global < "u" && e === global) return "[Global]";
|
|
448
448
|
if (typeof window < "u" && e === window) return "[Window]";
|
|
449
449
|
if (typeof document < "u" && e === document) return "[Document]";
|
|
450
|
-
if (
|
|
451
|
-
if (
|
|
450
|
+
if (Ge(e)) return "[VueViewModel]";
|
|
451
|
+
if (je(e)) return "[SyntheticEvent]";
|
|
452
452
|
if (typeof e == "number" && e !== e) return "[NaN]";
|
|
453
|
-
if (typeof e == "function") return `[Function: ${
|
|
453
|
+
if (typeof e == "function") return `[Function: ${V(e)}]`;
|
|
454
454
|
if (typeof e == "symbol") return `[${String(e)}]`;
|
|
455
455
|
if (typeof e == "bigint") return `[BigInt: ${String(e)}]`;
|
|
456
456
|
let n = zn(e);
|
|
@@ -459,48 +459,48 @@ function qn(t, e) {
|
|
|
459
459
|
return `**non-serializable** (${n})`;
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
|
-
function zn(
|
|
463
|
-
let e = Object.getPrototypeOf(
|
|
462
|
+
function zn(t4) {
|
|
463
|
+
let e = Object.getPrototypeOf(t4);
|
|
464
464
|
return e ? e.constructor.name : "null prototype";
|
|
465
465
|
}
|
|
466
|
-
function Yn(
|
|
467
|
-
return ~-encodeURI(
|
|
466
|
+
function Yn(t4) {
|
|
467
|
+
return ~-encodeURI(t4).split(/%..|./).length;
|
|
468
468
|
}
|
|
469
|
-
function Jn(
|
|
470
|
-
return Yn(JSON.stringify(
|
|
469
|
+
function Jn(t4) {
|
|
470
|
+
return Yn(JSON.stringify(t4));
|
|
471
471
|
}
|
|
472
|
-
function Wn(
|
|
472
|
+
function Wn(t4, e) {
|
|
473
473
|
let n = 0;
|
|
474
|
-
for (let r =
|
|
475
|
-
let o =
|
|
476
|
-
o === "." ?
|
|
474
|
+
for (let r = t4.length - 1; r >= 0; r--) {
|
|
475
|
+
let o = t4[r];
|
|
476
|
+
o === "." ? t4.splice(r, 1) : o === ".." ? (t4.splice(r, 1), n++) : n && (t4.splice(r, 1), n--);
|
|
477
477
|
}
|
|
478
|
-
if (e) for (; n--; n)
|
|
479
|
-
return
|
|
478
|
+
if (e) for (; n--; n) t4.unshift("..");
|
|
479
|
+
return t4;
|
|
480
480
|
}
|
|
481
481
|
var Kn = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;
|
|
482
|
-
function Vn(
|
|
483
|
-
let e =
|
|
482
|
+
function Vn(t4) {
|
|
483
|
+
let e = t4.length > 1024 ? `<truncated>${t4.slice(-1024)}` : t4, n = Kn.exec(e);
|
|
484
484
|
return n ? n.slice(1) : [];
|
|
485
485
|
}
|
|
486
|
-
function
|
|
486
|
+
function Ze(...t4) {
|
|
487
487
|
let e = "", n = false;
|
|
488
|
-
for (let r =
|
|
489
|
-
let o = r >= 0 ?
|
|
488
|
+
for (let r = t4.length - 1; r >= -1 && !n; r--) {
|
|
489
|
+
let o = r >= 0 ? t4[r] : "/";
|
|
490
490
|
o && (e = `${o}/${e}`, n = o.charAt(0) === "/");
|
|
491
491
|
}
|
|
492
492
|
return e = Wn(e.split("/").filter((r) => !!r), !n).join("/"), (n ? "/" : "") + e || ".";
|
|
493
493
|
}
|
|
494
|
-
function Ft(
|
|
494
|
+
function Ft(t4) {
|
|
495
495
|
let e = 0;
|
|
496
|
-
for (; e <
|
|
497
|
-
let n =
|
|
498
|
-
for (; n >= 0 &&
|
|
499
|
-
return e > n ? [] :
|
|
500
|
-
}
|
|
501
|
-
function
|
|
502
|
-
|
|
503
|
-
let n = Ft(
|
|
496
|
+
for (; e < t4.length && t4[e] === ""; e++) ;
|
|
497
|
+
let n = t4.length - 1;
|
|
498
|
+
for (; n >= 0 && t4[n] === ""; n--) ;
|
|
499
|
+
return e > n ? [] : t4.slice(e, n - e + 1);
|
|
500
|
+
}
|
|
501
|
+
function Qe(t4, e) {
|
|
502
|
+
t4 = Ze(t4).slice(1), e = Ze(e).slice(1);
|
|
503
|
+
let n = Ft(t4.split("/")), r = Ft(e.split("/")), o = Math.min(n.length, r.length), s = o;
|
|
504
504
|
for (let a = 0; a < o; a++) if (n[a] !== r[a]) {
|
|
505
505
|
s = a;
|
|
506
506
|
break;
|
|
@@ -509,31 +509,31 @@ function et(t, e) {
|
|
|
509
509
|
for (let a = s; a < n.length; a++) i.push("..");
|
|
510
510
|
return i = i.concat(r.slice(s)), i.join("/");
|
|
511
511
|
}
|
|
512
|
-
function
|
|
513
|
-
let n = Vn(
|
|
512
|
+
function te(t4, e) {
|
|
513
|
+
let n = Vn(t4)[2];
|
|
514
514
|
return e && n.slice(e.length * -1) === e && (n = n.slice(0, n.length - e.length)), n;
|
|
515
515
|
}
|
|
516
516
|
var N;
|
|
517
|
-
(function(
|
|
518
|
-
|
|
517
|
+
(function(t4) {
|
|
518
|
+
t4[t4.PENDING = 0] = "PENDING";
|
|
519
519
|
let n = 1;
|
|
520
|
-
|
|
520
|
+
t4[t4.RESOLVED = n] = "RESOLVED";
|
|
521
521
|
let r = 2;
|
|
522
|
-
|
|
522
|
+
t4[t4.REJECTED = r] = "REJECTED";
|
|
523
523
|
})(N || (N = {}));
|
|
524
|
-
function
|
|
525
|
-
return new
|
|
526
|
-
e(
|
|
524
|
+
function I(t4) {
|
|
525
|
+
return new R((e) => {
|
|
526
|
+
e(t4);
|
|
527
527
|
});
|
|
528
528
|
}
|
|
529
|
-
function $(
|
|
530
|
-
return new
|
|
531
|
-
n(
|
|
529
|
+
function $(t4) {
|
|
530
|
+
return new R((e, n) => {
|
|
531
|
+
n(t4);
|
|
532
532
|
});
|
|
533
533
|
}
|
|
534
|
-
var
|
|
534
|
+
var R = class t {
|
|
535
535
|
constructor(e) {
|
|
536
|
-
|
|
536
|
+
t.prototype.__init.call(this), t.prototype.__init2.call(this), t.prototype.__init3.call(this), t.prototype.__init4.call(this), this._state = N.PENDING, this._handlers = [];
|
|
537
537
|
try {
|
|
538
538
|
e(this._resolve, this._reject);
|
|
539
539
|
} catch (n) {
|
|
@@ -541,7 +541,7 @@ var y = class {
|
|
|
541
541
|
}
|
|
542
542
|
}
|
|
543
543
|
then(e, n) {
|
|
544
|
-
return new
|
|
544
|
+
return new t((r, o) => {
|
|
545
545
|
this._handlers.push([false, (s) => {
|
|
546
546
|
if (!e) r(s);
|
|
547
547
|
else try {
|
|
@@ -563,7 +563,7 @@ var y = class {
|
|
|
563
563
|
return this.then((n) => n, e);
|
|
564
564
|
}
|
|
565
565
|
finally(e) {
|
|
566
|
-
return new
|
|
566
|
+
return new t((n, r) => {
|
|
567
567
|
let o, s;
|
|
568
568
|
return this.then((i) => {
|
|
569
569
|
s = false, o = i, e && e();
|
|
@@ -609,29 +609,29 @@ var y = class {
|
|
|
609
609
|
};
|
|
610
610
|
}
|
|
611
611
|
};
|
|
612
|
-
function
|
|
612
|
+
function et(t4) {
|
|
613
613
|
let e = [];
|
|
614
614
|
function n() {
|
|
615
|
-
return
|
|
615
|
+
return t4 === void 0 || e.length < t4;
|
|
616
616
|
}
|
|
617
617
|
function r(i) {
|
|
618
618
|
return e.splice(e.indexOf(i), 1)[0];
|
|
619
619
|
}
|
|
620
620
|
function o(i) {
|
|
621
|
-
if (!n()) return $(new
|
|
621
|
+
if (!n()) return $(new y("Not adding Promise because buffer limit was reached."));
|
|
622
622
|
let a = i();
|
|
623
623
|
return e.indexOf(a) === -1 && e.push(a), a.then(() => r(a)).then(null, () => r(a).then(null, () => {
|
|
624
624
|
})), a;
|
|
625
625
|
}
|
|
626
626
|
function s(i) {
|
|
627
|
-
return new
|
|
627
|
+
return new R((a, c) => {
|
|
628
628
|
let u = e.length;
|
|
629
629
|
if (!u) return a(true);
|
|
630
630
|
let f = setTimeout(() => {
|
|
631
631
|
i && i > 0 && a(false);
|
|
632
632
|
}, i);
|
|
633
633
|
e.forEach((p) => {
|
|
634
|
-
|
|
634
|
+
I(p).then(() => {
|
|
635
635
|
--u || (clearTimeout(f), a(true));
|
|
636
636
|
}, c);
|
|
637
637
|
});
|
|
@@ -639,10 +639,10 @@ function tt(t) {
|
|
|
639
639
|
}
|
|
640
640
|
return { $: e, add: o, drain: s };
|
|
641
641
|
}
|
|
642
|
-
function Ut(
|
|
643
|
-
return !(e ||
|
|
642
|
+
function Ut(t4, e = false) {
|
|
643
|
+
return !(e || t4 && !t4.startsWith("/") && !t4.match(/^[A-Z]:/) && !t4.startsWith(".") && !t4.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)) && t4 !== void 0 && !t4.includes("node_modules/");
|
|
644
644
|
}
|
|
645
|
-
function Bt(
|
|
645
|
+
function Bt(t4) {
|
|
646
646
|
let e = /^\s*[-]{4,}$/, n = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
|
|
647
647
|
return (r) => {
|
|
648
648
|
let o = r.match(n);
|
|
@@ -658,38 +658,38 @@ function Bt(t) {
|
|
|
658
658
|
}
|
|
659
659
|
c = void 0;
|
|
660
660
|
}
|
|
661
|
-
i && (c = s, u = i), i === "<anonymous>" && (u = void 0, a = void 0), a === void 0 && (u = u ||
|
|
661
|
+
i && (c = s, u = i), i === "<anonymous>" && (u = void 0, a = void 0), a === void 0 && (u = u || me, a = c ? `${c}.${u}` : u);
|
|
662
662
|
let f = o[2] && o[2].startsWith("file://") ? o[2].slice(7) : o[2], p = o[5] === "native";
|
|
663
|
-
return f && f.match(/\/[A-Z]:/) && (f = f.slice(1)), !f && o[5] && !p && (f = o[5]), { filename: f, module:
|
|
663
|
+
return f && f.match(/\/[A-Z]:/) && (f = f.slice(1)), !f && o[5] && !p && (f = o[5]), { filename: f, module: t4 ? t4(f) : void 0, function: a, lineno: parseInt(o[3], 10) || void 0, colno: parseInt(o[4], 10) || void 0, in_app: Ut(f, p) };
|
|
664
664
|
}
|
|
665
665
|
if (r.match(e)) return { filename: r };
|
|
666
666
|
};
|
|
667
667
|
}
|
|
668
|
-
function
|
|
669
|
-
return [90, Bt(
|
|
668
|
+
function tt(t4) {
|
|
669
|
+
return [90, Bt(t4)];
|
|
670
670
|
}
|
|
671
|
-
function P(
|
|
672
|
-
return [
|
|
671
|
+
function P(t4, e = []) {
|
|
672
|
+
return [t4, e];
|
|
673
673
|
}
|
|
674
|
-
function
|
|
675
|
-
let [n, r] =
|
|
674
|
+
function rt(t4, e) {
|
|
675
|
+
let [n, r] = t4;
|
|
676
676
|
return [n, [...r, e]];
|
|
677
677
|
}
|
|
678
|
-
function
|
|
679
|
-
let n =
|
|
678
|
+
function xe(t4, e) {
|
|
679
|
+
let n = t4[1];
|
|
680
680
|
for (let r of n) {
|
|
681
681
|
let o = r[0].type;
|
|
682
682
|
if (e(r, o)) return true;
|
|
683
683
|
}
|
|
684
684
|
return false;
|
|
685
685
|
}
|
|
686
|
-
function
|
|
687
|
-
return m.__SENTRY__ && m.__SENTRY__.encodePolyfill ? m.__SENTRY__.encodePolyfill(
|
|
686
|
+
function nt(t4) {
|
|
687
|
+
return m.__SENTRY__ && m.__SENTRY__.encodePolyfill ? m.__SENTRY__.encodePolyfill(t4) : new TextEncoder().encode(t4);
|
|
688
688
|
}
|
|
689
|
-
function
|
|
690
|
-
let [e, n] =
|
|
689
|
+
function ot(t4) {
|
|
690
|
+
let [e, n] = t4, r = JSON.stringify(e);
|
|
691
691
|
function o(s) {
|
|
692
|
-
typeof r == "string" ? r = typeof s == "string" ? r + s : [
|
|
692
|
+
typeof r == "string" ? r = typeof s == "string" ? r + s : [nt(r), s] : r.push(typeof s == "string" ? nt(s) : s);
|
|
693
693
|
}
|
|
694
694
|
for (let s of n) {
|
|
695
695
|
let [i, a] = s;
|
|
@@ -701,49 +701,49 @@ ${JSON.stringify(i)}
|
|
|
701
701
|
try {
|
|
702
702
|
c = JSON.stringify(a);
|
|
703
703
|
} catch {
|
|
704
|
-
c = JSON.stringify(
|
|
704
|
+
c = JSON.stringify(b(a));
|
|
705
705
|
}
|
|
706
706
|
o(c);
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
709
|
return typeof r == "string" ? r : Xn(r);
|
|
710
710
|
}
|
|
711
|
-
function Xn(
|
|
712
|
-
let e =
|
|
713
|
-
for (let o of
|
|
711
|
+
function Xn(t4) {
|
|
712
|
+
let e = t4.reduce((o, s) => o + s.length, 0), n = new Uint8Array(e), r = 0;
|
|
713
|
+
for (let o of t4) n.set(o, r), r += o.length;
|
|
714
714
|
return n;
|
|
715
715
|
}
|
|
716
|
-
function
|
|
717
|
-
let e = typeof
|
|
718
|
-
return [E({ type: "attachment", length: e.length, filename:
|
|
716
|
+
function st(t4) {
|
|
717
|
+
let e = typeof t4.data == "string" ? nt(t4.data) : t4.data;
|
|
718
|
+
return [E({ type: "attachment", length: e.length, filename: t4.filename, content_type: t4.contentType, attachment_type: t4.attachmentType }), e];
|
|
719
719
|
}
|
|
720
720
|
var Zn = { session: "session", sessions: "session", attachment: "attachment", transaction: "transaction", event: "error", client_report: "internal", user_report: "default", profile: "profile", profile_chunk: "profile", replay_event: "replay", replay_recording: "replay", check_in: "monitor", feedback: "feedback", span: "span", statsd: "metric_bucket" };
|
|
721
|
-
function
|
|
722
|
-
return Zn[
|
|
721
|
+
function Ae(t4) {
|
|
722
|
+
return Zn[t4];
|
|
723
723
|
}
|
|
724
|
-
function
|
|
725
|
-
if (!
|
|
726
|
-
let { name: e, version: n } =
|
|
724
|
+
function be(t4) {
|
|
725
|
+
if (!t4 || !t4.sdk) return;
|
|
726
|
+
let { name: e, version: n } = t4.sdk;
|
|
727
727
|
return { name: e, version: n };
|
|
728
728
|
}
|
|
729
|
-
function
|
|
730
|
-
let o =
|
|
731
|
-
return { event_id:
|
|
729
|
+
function it(t4, e, n, r) {
|
|
730
|
+
let o = t4.sdkProcessingMetadata && t4.sdkProcessingMetadata.dynamicSamplingContext;
|
|
731
|
+
return { event_id: t4.event_id, sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...e && { sdk: e }, ...!!n && r && { dsn: M(r) }, ...o && { trace: E({ ...o }) } };
|
|
732
732
|
}
|
|
733
|
-
function $t(
|
|
734
|
-
let n = parseInt(`${
|
|
733
|
+
function $t(t4, e = Date.now()) {
|
|
734
|
+
let n = parseInt(`${t4}`, 10);
|
|
735
735
|
if (!isNaN(n)) return n * 1e3;
|
|
736
|
-
let r = Date.parse(`${
|
|
736
|
+
let r = Date.parse(`${t4}`);
|
|
737
737
|
return isNaN(r) ? 6e4 : r - e;
|
|
738
738
|
}
|
|
739
|
-
function jt(
|
|
740
|
-
return
|
|
739
|
+
function jt(t4, e) {
|
|
740
|
+
return t4[e] || t4.all || 0;
|
|
741
741
|
}
|
|
742
|
-
function
|
|
743
|
-
return jt(
|
|
742
|
+
function at(t4, e, n = Date.now()) {
|
|
743
|
+
return jt(t4, e) > n;
|
|
744
744
|
}
|
|
745
|
-
function
|
|
746
|
-
let o = { ...
|
|
745
|
+
function ct(t4, { statusCode: e, headers: n }, r = Date.now()) {
|
|
746
|
+
let o = { ...t4 }, s = n && n["x-sentry-rate-limits"], i = n && n["retry-after"];
|
|
747
747
|
if (s) for (let a of s.trim().split(",")) {
|
|
748
748
|
let [c, u, , , f] = a.split(":", 5), p = parseInt(c, 10), l = (isNaN(p) ? 60 : p) * 1e3;
|
|
749
749
|
if (!u) o.all = r + l;
|
|
@@ -752,40 +752,40 @@ function ut(t, { statusCode: e, headers: n }, r = Date.now()) {
|
|
|
752
752
|
else i ? o.all = r + $t(i, r) : e === 429 && (o.all = r + 60 * 1e3);
|
|
753
753
|
return o;
|
|
754
754
|
}
|
|
755
|
-
function
|
|
756
|
-
return
|
|
755
|
+
function ut(t4, e) {
|
|
756
|
+
return t4(e.stack || "", 1);
|
|
757
757
|
}
|
|
758
|
-
function Gt(
|
|
759
|
-
let n = { type: e.name || e.constructor.name, value: e.message }, r =
|
|
758
|
+
function Gt(t4, e) {
|
|
759
|
+
let n = { type: e.name || e.constructor.name, value: e.message }, r = ut(t4, e);
|
|
760
760
|
return r.length && (n.stacktrace = { frames: r }), n;
|
|
761
761
|
}
|
|
762
|
-
function Qn(
|
|
763
|
-
for (let e in
|
|
764
|
-
let n =
|
|
762
|
+
function Qn(t4) {
|
|
763
|
+
for (let e in t4) if (Object.prototype.hasOwnProperty.call(t4, e)) {
|
|
764
|
+
let n = t4[e];
|
|
765
765
|
if (n instanceof Error) return n;
|
|
766
766
|
}
|
|
767
767
|
}
|
|
768
|
-
function er(
|
|
769
|
-
if ("name" in
|
|
770
|
-
let r = `'${
|
|
771
|
-
return "message" in
|
|
772
|
-
} else if ("message" in
|
|
773
|
-
let e =
|
|
774
|
-
if (
|
|
775
|
-
let n = tr(
|
|
768
|
+
function er(t4) {
|
|
769
|
+
if ("name" in t4 && typeof t4.name == "string") {
|
|
770
|
+
let r = `'${t4.name}' captured as exception`;
|
|
771
|
+
return "message" in t4 && typeof t4.message == "string" && (r += ` with message '${t4.message}'`), r;
|
|
772
|
+
} else if ("message" in t4 && typeof t4.message == "string") return t4.message;
|
|
773
|
+
let e = K(t4);
|
|
774
|
+
if (Fe(t4)) return `Event \`ErrorEvent\` captured as exception with message \`${t4.message}\``;
|
|
775
|
+
let n = tr(t4);
|
|
776
776
|
return `${n && n !== "Object" ? `'${n}'` : "Object"} captured as exception with keys: ${e}`;
|
|
777
777
|
}
|
|
778
|
-
function tr(
|
|
778
|
+
function tr(t4) {
|
|
779
779
|
try {
|
|
780
|
-
let e = Object.getPrototypeOf(
|
|
780
|
+
let e = Object.getPrototypeOf(t4);
|
|
781
781
|
return e ? e.constructor.name : void 0;
|
|
782
782
|
} catch {
|
|
783
783
|
}
|
|
784
784
|
}
|
|
785
|
-
function nr(
|
|
785
|
+
function nr(t4, e, n, r) {
|
|
786
786
|
if (F(n)) return [n, void 0];
|
|
787
|
-
if (e.synthetic = true,
|
|
788
|
-
let s =
|
|
787
|
+
if (e.synthetic = true, A(n)) {
|
|
788
|
+
let s = t4 && t4.getOptions().normalizeDepth, i = { __serialized__: Y(n, s) }, a = Qn(n);
|
|
789
789
|
if (a) return [a, i];
|
|
790
790
|
let c = er(n), u = r && r.syntheticException || new Error(c);
|
|
791
791
|
return u.message = c, [u, i];
|
|
@@ -793,14 +793,14 @@ function nr(t, e, n, r) {
|
|
|
793
793
|
let o = r && r.syntheticException || new Error(n);
|
|
794
794
|
return o.message = `${n}`, [o, void 0];
|
|
795
795
|
}
|
|
796
|
-
function
|
|
797
|
-
let s = r && r.data && r.data.mechanism || { handled: true, type: "generic" }, [i, a] = nr(
|
|
798
|
-
return a && (c.extra = a),
|
|
796
|
+
function pt(t4, e, n, r) {
|
|
797
|
+
let s = r && r.data && r.data.mechanism || { handled: true, type: "generic" }, [i, a] = nr(t4, s, n, r), c = { exception: { values: [Gt(e, i)] } };
|
|
798
|
+
return a && (c.extra = a), Q(c, void 0, void 0), B(c, s), { ...c, event_id: r && r.event_id };
|
|
799
799
|
}
|
|
800
|
-
function
|
|
800
|
+
function ft(t4, e, n = "info", r, o) {
|
|
801
801
|
let s = { event_id: r && r.event_id, level: n };
|
|
802
802
|
if (o && r && r.syntheticException) {
|
|
803
|
-
let i =
|
|
803
|
+
let i = ut(t4, r.syntheticException);
|
|
804
804
|
i.length && (s.exception = { values: [{ value: e, stacktrace: { frames: i } }] });
|
|
805
805
|
}
|
|
806
806
|
if (H(e)) {
|
|
@@ -809,41 +809,41 @@ function dt(t, e, n = "info", r, o) {
|
|
|
809
809
|
}
|
|
810
810
|
return s.message = e, s;
|
|
811
811
|
}
|
|
812
|
-
function
|
|
812
|
+
function Re() {
|
|
813
813
|
return { traceId: S(), spanId: S().substring(16) };
|
|
814
814
|
}
|
|
815
815
|
var _ = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
|
|
816
816
|
function w() {
|
|
817
|
-
return
|
|
817
|
+
return ne(m), m;
|
|
818
818
|
}
|
|
819
|
-
function
|
|
820
|
-
let e =
|
|
819
|
+
function ne(t4) {
|
|
820
|
+
let e = t4.__SENTRY__ = t4.__SENTRY__ || {};
|
|
821
821
|
return e.version = e.version || D, e[D] = e[D] || {};
|
|
822
822
|
}
|
|
823
|
-
function
|
|
824
|
-
if (e.user && (!
|
|
825
|
-
else if (typeof e.duration == "number")
|
|
823
|
+
function re(t4, e = {}) {
|
|
824
|
+
if (e.user && (!t4.ipAddress && e.user.ip_address && (t4.ipAddress = e.user.ip_address), !t4.did && !e.did && (t4.did = e.user.id || e.user.email || e.user.username)), t4.timestamp = e.timestamp || Z(), e.abnormal_mechanism && (t4.abnormal_mechanism = e.abnormal_mechanism), e.ignoreDuration && (t4.ignoreDuration = e.ignoreDuration), e.sid && (t4.sid = e.sid.length === 32 ? e.sid : S()), e.init !== void 0 && (t4.init = e.init), !t4.did && e.did && (t4.did = `${e.did}`), typeof e.started == "number" && (t4.started = e.started), t4.ignoreDuration) t4.duration = void 0;
|
|
825
|
+
else if (typeof e.duration == "number") t4.duration = e.duration;
|
|
826
826
|
else {
|
|
827
|
-
let n =
|
|
828
|
-
|
|
827
|
+
let n = t4.timestamp - t4.started;
|
|
828
|
+
t4.duration = n >= 0 ? n : 0;
|
|
829
829
|
}
|
|
830
|
-
e.release && (
|
|
830
|
+
e.release && (t4.release = e.release), e.environment && (t4.environment = e.environment), !t4.ipAddress && e.ipAddress && (t4.ipAddress = e.ipAddress), !t4.userAgent && e.userAgent && (t4.userAgent = e.userAgent), typeof e.errors == "number" && (t4.errors = e.errors), e.status && (t4.status = e.status);
|
|
831
831
|
}
|
|
832
|
-
var
|
|
833
|
-
function
|
|
834
|
-
e ? U(
|
|
832
|
+
var dt = "_sentrySpan";
|
|
833
|
+
function lt(t4, e) {
|
|
834
|
+
e ? U(t4, dt, e) : delete t4[dt];
|
|
835
835
|
}
|
|
836
|
-
function j(
|
|
837
|
-
return
|
|
836
|
+
function j(t4) {
|
|
837
|
+
return t4[dt];
|
|
838
838
|
}
|
|
839
839
|
var or = 100;
|
|
840
|
-
var
|
|
840
|
+
var mt = class t2 {
|
|
841
841
|
constructor() {
|
|
842
|
-
this._notifyingListeners = false, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext =
|
|
842
|
+
this._notifyingListeners = false, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = Re();
|
|
843
843
|
}
|
|
844
844
|
clone() {
|
|
845
|
-
let e = new
|
|
846
|
-
return e._breadcrumbs = [...this._breadcrumbs], e._tags = { ...this._tags }, e._extra = { ...this._extra }, e._contexts = { ...this._contexts }, e._user = this._user, e._level = this._level, e._session = this._session, e._transactionName = this._transactionName, e._fingerprint = this._fingerprint, e._eventProcessors = [...this._eventProcessors], e._requestSession = this._requestSession, e._attachments = [...this._attachments], e._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, e._propagationContext = { ...this._propagationContext }, e._client = this._client, e._lastEventId = this._lastEventId,
|
|
845
|
+
let e = new t2();
|
|
846
|
+
return e._breadcrumbs = [...this._breadcrumbs], e._tags = { ...this._tags }, e._extra = { ...this._extra }, e._contexts = { ...this._contexts }, e._user = this._user, e._level = this._level, e._session = this._session, e._transactionName = this._transactionName, e._fingerprint = this._fingerprint, e._eventProcessors = [...this._eventProcessors], e._requestSession = this._requestSession, e._attachments = [...this._attachments], e._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, e._propagationContext = { ...this._propagationContext }, e._client = this._client, e._lastEventId = this._lastEventId, lt(e, j(this)), e;
|
|
847
847
|
}
|
|
848
848
|
setClient(e) {
|
|
849
849
|
this._client = e;
|
|
@@ -864,7 +864,7 @@ var se = class {
|
|
|
864
864
|
return this._eventProcessors.push(e), this;
|
|
865
865
|
}
|
|
866
866
|
setUser(e) {
|
|
867
|
-
return this._user = e || { email: void 0, id: void 0, ip_address: void 0, username: void 0 }, this._session &&
|
|
867
|
+
return this._user = e || { email: void 0, id: void 0, ip_address: void 0, username: void 0 }, this._session && re(this._session, { user: e }), this._notifyScopeListeners(), this;
|
|
868
868
|
}
|
|
869
869
|
getUser() {
|
|
870
870
|
return this._user;
|
|
@@ -907,11 +907,11 @@ var se = class {
|
|
|
907
907
|
}
|
|
908
908
|
update(e) {
|
|
909
909
|
if (!e) return this;
|
|
910
|
-
let n = typeof e == "function" ? e(this) : e, [r, o] = n instanceof
|
|
910
|
+
let n = typeof e == "function" ? e(this) : e, [r, o] = n instanceof x ? [n.getScopeData(), n.getRequestSession()] : A(n) ? [e, e.requestSession] : [], { tags: s, extra: i, user: a, contexts: c, level: u, fingerprint: f = [], propagationContext: p } = r || {};
|
|
911
911
|
return this._tags = { ...this._tags, ...s }, this._extra = { ...this._extra, ...i }, this._contexts = { ...this._contexts, ...c }, a && Object.keys(a).length && (this._user = a), u && (this._level = u), f.length && (this._fingerprint = f), p && (this._propagationContext = p), o && (this._requestSession = o), this;
|
|
912
912
|
}
|
|
913
913
|
clear() {
|
|
914
|
-
return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._session = void 0,
|
|
914
|
+
return this._breadcrumbs = [], this._tags = {}, this._extra = {}, this._user = {}, this._contexts = {}, this._level = void 0, this._transactionName = void 0, this._fingerprint = void 0, this._requestSession = void 0, this._session = void 0, lt(this, void 0), this._attachments = [], this._propagationContext = Re(), this._notifyScopeListeners(), this;
|
|
915
915
|
}
|
|
916
916
|
addBreadcrumb(e, n) {
|
|
917
917
|
let r = typeof n == "number" ? n : or;
|
|
@@ -965,19 +965,19 @@ var se = class {
|
|
|
965
965
|
}), this._notifyingListeners = false);
|
|
966
966
|
}
|
|
967
967
|
};
|
|
968
|
-
var
|
|
968
|
+
var x = mt;
|
|
969
969
|
function Ht() {
|
|
970
|
-
return q("defaultCurrentScope", () => new
|
|
970
|
+
return q("defaultCurrentScope", () => new x());
|
|
971
971
|
}
|
|
972
972
|
function qt() {
|
|
973
|
-
return q("defaultIsolationScope", () => new
|
|
973
|
+
return q("defaultIsolationScope", () => new x());
|
|
974
974
|
}
|
|
975
975
|
var gt = class {
|
|
976
976
|
constructor(e, n) {
|
|
977
977
|
let r;
|
|
978
|
-
e ? r = e : r = new
|
|
978
|
+
e ? r = e : r = new x();
|
|
979
979
|
let o;
|
|
980
|
-
n ? o = n : o = new
|
|
980
|
+
n ? o = n : o = new x(), this._stack = [{ scope: r }], this._isolationScope = o;
|
|
981
981
|
}
|
|
982
982
|
withScope(e) {
|
|
983
983
|
let n = this._pushScope(), r;
|
|
@@ -1014,43 +1014,43 @@ var gt = class {
|
|
|
1014
1014
|
}
|
|
1015
1015
|
};
|
|
1016
1016
|
function J() {
|
|
1017
|
-
let
|
|
1017
|
+
let t4 = w(), e = ne(t4);
|
|
1018
1018
|
return e.stack = e.stack || new gt(Ht(), qt());
|
|
1019
1019
|
}
|
|
1020
|
-
function sr(
|
|
1021
|
-
return J().withScope(
|
|
1020
|
+
function sr(t4) {
|
|
1021
|
+
return J().withScope(t4);
|
|
1022
1022
|
}
|
|
1023
|
-
function ir(
|
|
1023
|
+
function ir(t4, e) {
|
|
1024
1024
|
let n = J();
|
|
1025
|
-
return n.withScope(() => (n.getStackTop().scope =
|
|
1025
|
+
return n.withScope(() => (n.getStackTop().scope = t4, e(t4)));
|
|
1026
1026
|
}
|
|
1027
|
-
function zt(
|
|
1028
|
-
return J().withScope(() =>
|
|
1027
|
+
function zt(t4) {
|
|
1028
|
+
return J().withScope(() => t4(J().getIsolationScope()));
|
|
1029
1029
|
}
|
|
1030
1030
|
function Yt() {
|
|
1031
|
-
return { withIsolationScope: zt, withScope: sr, withSetScope: ir, withSetIsolationScope: (
|
|
1031
|
+
return { withIsolationScope: zt, withScope: sr, withSetScope: ir, withSetIsolationScope: (t4, e) => zt(e), getCurrentScope: () => J().getScope(), getIsolationScope: () => J().getIsolationScope() };
|
|
1032
1032
|
}
|
|
1033
|
-
function
|
|
1034
|
-
let e =
|
|
1033
|
+
function oe(t4) {
|
|
1034
|
+
let e = ne(t4);
|
|
1035
1035
|
return e.acs ? e.acs : Yt();
|
|
1036
1036
|
}
|
|
1037
1037
|
function ht() {
|
|
1038
|
-
let
|
|
1039
|
-
return
|
|
1038
|
+
let t4 = w();
|
|
1039
|
+
return oe(t4).getCurrentScope();
|
|
1040
1040
|
}
|
|
1041
1041
|
function G() {
|
|
1042
|
-
let
|
|
1043
|
-
return
|
|
1042
|
+
let t4 = w();
|
|
1043
|
+
return oe(t4).getIsolationScope();
|
|
1044
1044
|
}
|
|
1045
1045
|
function Jt() {
|
|
1046
|
-
return q("globalScope", () => new
|
|
1046
|
+
return q("globalScope", () => new x());
|
|
1047
1047
|
}
|
|
1048
1048
|
function Wt() {
|
|
1049
1049
|
return ht().getClient();
|
|
1050
1050
|
}
|
|
1051
1051
|
var ar = "_sentryMetrics";
|
|
1052
|
-
function Kt(
|
|
1053
|
-
let e =
|
|
1052
|
+
function Kt(t4) {
|
|
1053
|
+
let e = t4[ar];
|
|
1054
1054
|
if (!e) return;
|
|
1055
1055
|
let n = {};
|
|
1056
1056
|
for (let [, [r, o]] of e) n[r] || (n[r] = []), n[r].push(E(o));
|
|
@@ -1061,73 +1061,73 @@ var Xt = "sentry.sample_rate";
|
|
|
1061
1061
|
var Zt = "sentry.op";
|
|
1062
1062
|
var Qt = "sentry.origin";
|
|
1063
1063
|
var cr = 1;
|
|
1064
|
-
function
|
|
1065
|
-
let { spanId: e, traceId: n } =
|
|
1064
|
+
function Ce(t4) {
|
|
1065
|
+
let { spanId: e, traceId: n } = t4.spanContext(), { parent_span_id: r } = W(t4);
|
|
1066
1066
|
return E({ parent_span_id: r, span_id: e, trace_id: n });
|
|
1067
1067
|
}
|
|
1068
|
-
function en(
|
|
1069
|
-
return typeof
|
|
1068
|
+
function en(t4) {
|
|
1069
|
+
return typeof t4 == "number" ? tn(t4) : Array.isArray(t4) ? t4[0] + t4[1] / 1e9 : t4 instanceof Date ? tn(t4.getTime()) : Z();
|
|
1070
1070
|
}
|
|
1071
|
-
function tn(
|
|
1072
|
-
return
|
|
1071
|
+
function tn(t4) {
|
|
1072
|
+
return t4 > 9999999999 ? t4 / 1e3 : t4;
|
|
1073
1073
|
}
|
|
1074
|
-
function W(
|
|
1075
|
-
if (pr(
|
|
1074
|
+
function W(t4) {
|
|
1075
|
+
if (pr(t4)) return t4.getSpanJSON();
|
|
1076
1076
|
try {
|
|
1077
|
-
let { spanId: e, traceId: n } =
|
|
1078
|
-
if (ur(
|
|
1079
|
-
let { attributes: r, startTime: o, name: s, endTime: i, parentSpanId: a, status: c } =
|
|
1080
|
-
return E({ span_id: e, trace_id: n, data: r, description: s, parent_span_id: a, start_timestamp: en(o), timestamp: en(i) || void 0, status: fr(c), op: r[Zt], origin: r[Qt], _metrics_summary: Kt(
|
|
1077
|
+
let { spanId: e, traceId: n } = t4.spanContext();
|
|
1078
|
+
if (ur(t4)) {
|
|
1079
|
+
let { attributes: r, startTime: o, name: s, endTime: i, parentSpanId: a, status: c } = t4;
|
|
1080
|
+
return E({ span_id: e, trace_id: n, data: r, description: s, parent_span_id: a, start_timestamp: en(o), timestamp: en(i) || void 0, status: fr(c), op: r[Zt], origin: r[Qt], _metrics_summary: Kt(t4) });
|
|
1081
1081
|
}
|
|
1082
1082
|
return { span_id: e, trace_id: n };
|
|
1083
1083
|
} catch {
|
|
1084
1084
|
return {};
|
|
1085
1085
|
}
|
|
1086
1086
|
}
|
|
1087
|
-
function ur(
|
|
1088
|
-
let e =
|
|
1087
|
+
function ur(t4) {
|
|
1088
|
+
let e = t4;
|
|
1089
1089
|
return !!e.attributes && !!e.startTime && !!e.name && !!e.endTime && !!e.status;
|
|
1090
1090
|
}
|
|
1091
|
-
function pr(
|
|
1092
|
-
return typeof
|
|
1091
|
+
function pr(t4) {
|
|
1092
|
+
return typeof t4.getSpanJSON == "function";
|
|
1093
1093
|
}
|
|
1094
|
-
function nn(
|
|
1095
|
-
let { traceFlags: e } =
|
|
1094
|
+
function nn(t4) {
|
|
1095
|
+
let { traceFlags: e } = t4.spanContext();
|
|
1096
1096
|
return e === cr;
|
|
1097
1097
|
}
|
|
1098
|
-
function fr(
|
|
1099
|
-
if (!(!
|
|
1098
|
+
function fr(t4) {
|
|
1099
|
+
if (!(!t4 || t4.code === 0)) return t4.code === 1 ? "ok" : t4.message || "unknown_error";
|
|
1100
1100
|
}
|
|
1101
1101
|
var dr = "_sentryRootSpan";
|
|
1102
|
-
function L(
|
|
1103
|
-
return
|
|
1102
|
+
function L(t4) {
|
|
1103
|
+
return t4[dr] || t4;
|
|
1104
1104
|
}
|
|
1105
1105
|
function rn() {
|
|
1106
|
-
let
|
|
1106
|
+
let t4 = w(), e = oe(t4);
|
|
1107
1107
|
return e.getActiveSpan ? e.getActiveSpan() : j(ht());
|
|
1108
1108
|
}
|
|
1109
1109
|
var on = false;
|
|
1110
1110
|
function sn() {
|
|
1111
|
-
on || (on = true,
|
|
1111
|
+
on || (on = true, Ke(_t), Ve(_t));
|
|
1112
1112
|
}
|
|
1113
1113
|
function _t() {
|
|
1114
|
-
let
|
|
1114
|
+
let t4 = rn(), e = t4 && L(t4);
|
|
1115
1115
|
if (e) {
|
|
1116
1116
|
let n = "internal_error";
|
|
1117
1117
|
_ && d.log(`[Tracing] Root span: ${n} -> Global error occured`), e.setStatus({ code: 2, message: n });
|
|
1118
1118
|
}
|
|
1119
1119
|
}
|
|
1120
1120
|
_t.tag = "sentry_tracingErrorCallback";
|
|
1121
|
-
var
|
|
1121
|
+
var Oe = "production";
|
|
1122
1122
|
var lr = "_frozenDsc";
|
|
1123
|
-
function
|
|
1124
|
-
let n = e.getOptions(), { publicKey: r } = e.getDsn() || {}, o = E({ environment: n.environment ||
|
|
1123
|
+
function se(t4, e) {
|
|
1124
|
+
let n = e.getOptions(), { publicKey: r } = e.getDsn() || {}, o = E({ environment: n.environment || Oe, release: n.release, public_key: r, trace_id: t4 });
|
|
1125
1125
|
return e.emit("createDsc", o), o;
|
|
1126
1126
|
}
|
|
1127
|
-
function
|
|
1127
|
+
function Ne(t4) {
|
|
1128
1128
|
let e = Wt();
|
|
1129
1129
|
if (!e) return {};
|
|
1130
|
-
let n =
|
|
1130
|
+
let n = se(W(t4).trace_id || "", e), r = L(t4);
|
|
1131
1131
|
if (!r) return n;
|
|
1132
1132
|
let o = r[lr];
|
|
1133
1133
|
if (o) return o;
|
|
@@ -1136,106 +1136,106 @@ function De(t) {
|
|
|
1136
1136
|
let c = i[Vt];
|
|
1137
1137
|
return c && c !== "url" && (n.transaction = s.description), n.sampled = String(nn(r)), e.emit("createDsc", n), n;
|
|
1138
1138
|
}
|
|
1139
|
-
function an(
|
|
1140
|
-
if (typeof
|
|
1141
|
-
let e = typeof
|
|
1139
|
+
function an(t4) {
|
|
1140
|
+
if (typeof t4 == "boolean") return Number(t4);
|
|
1141
|
+
let e = typeof t4 == "string" ? parseFloat(t4) : t4;
|
|
1142
1142
|
if (typeof e != "number" || isNaN(e) || e < 0 || e > 1) {
|
|
1143
|
-
_ && d.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(
|
|
1143
|
+
_ && d.warn(`[Tracing] Given sample rate is invalid. Sample rate must be a boolean or a number between 0 and 1. Got ${JSON.stringify(t4)} of type ${JSON.stringify(typeof t4)}.`);
|
|
1144
1144
|
return;
|
|
1145
1145
|
}
|
|
1146
1146
|
return e;
|
|
1147
1147
|
}
|
|
1148
|
-
function mr(
|
|
1149
|
-
return e && (
|
|
1148
|
+
function mr(t4, e) {
|
|
1149
|
+
return e && (t4.sdk = t4.sdk || {}, t4.sdk.name = t4.sdk.name || e.name, t4.sdk.version = t4.sdk.version || e.version, t4.sdk.integrations = [...t4.sdk.integrations || [], ...e.integrations || []], t4.sdk.packages = [...t4.sdk.packages || [], ...e.packages || []]), t4;
|
|
1150
1150
|
}
|
|
1151
|
-
function cn(
|
|
1152
|
-
let o =
|
|
1151
|
+
function cn(t4, e, n, r) {
|
|
1152
|
+
let o = be(n), s = { sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...o && { sdk: o }, ...!!r && e && { dsn: M(e) } }, i = "aggregates" in t4 ? [{ type: "sessions" }, t4] : [{ type: "session" }, t4.toJSON()];
|
|
1153
1153
|
return P(s, [i]);
|
|
1154
1154
|
}
|
|
1155
|
-
function un(
|
|
1156
|
-
let o =
|
|
1157
|
-
mr(
|
|
1158
|
-
let i =
|
|
1159
|
-
return delete
|
|
1155
|
+
function un(t4, e, n, r) {
|
|
1156
|
+
let o = be(n), s = t4.type && t4.type !== "replay_event" ? t4.type : "event";
|
|
1157
|
+
mr(t4, n && n.sdk);
|
|
1158
|
+
let i = it(t4, o, r, e);
|
|
1159
|
+
return delete t4.sdkProcessingMetadata, P(i, [[{ type: s }, t4]]);
|
|
1160
1160
|
}
|
|
1161
|
-
function
|
|
1162
|
-
return new
|
|
1163
|
-
let i =
|
|
1161
|
+
function ke(t4, e, n, r = 0) {
|
|
1162
|
+
return new R((o, s) => {
|
|
1163
|
+
let i = t4[r];
|
|
1164
1164
|
if (e === null || typeof i != "function") o(e);
|
|
1165
1165
|
else {
|
|
1166
1166
|
let a = i({ ...e }, n);
|
|
1167
|
-
_ && i.id && a === null && d.log(`Event processor "${i.id}" dropped event`), C(a) ? a.then((c) =>
|
|
1167
|
+
_ && i.id && a === null && d.log(`Event processor "${i.id}" dropped event`), C(a) ? a.then((c) => ke(t4, c, n, r + 1).then(o)).then(null, s) : ke(t4, a, n, r + 1).then(o).then(null, s);
|
|
1168
1168
|
}
|
|
1169
1169
|
});
|
|
1170
1170
|
}
|
|
1171
|
-
function pn(
|
|
1171
|
+
function pn(t4, e) {
|
|
1172
1172
|
let { fingerprint: n, span: r, breadcrumbs: o, sdkProcessingMetadata: s } = e;
|
|
1173
|
-
gr(
|
|
1173
|
+
gr(t4, e), r && Er(t4, r), Sr(t4, n), hr(t4, o), _r(t4, s);
|
|
1174
1174
|
}
|
|
1175
|
-
function Et(
|
|
1175
|
+
function Et(t4, e) {
|
|
1176
1176
|
let { extra: n, tags: r, user: o, contexts: s, level: i, sdkProcessingMetadata: a, breadcrumbs: c, fingerprint: u, eventProcessors: f, attachments: p, propagationContext: l, transactionName: g, span: h } = e;
|
|
1177
|
-
|
|
1177
|
+
ie(t4, "extra", n), ie(t4, "tags", r), ie(t4, "user", o), ie(t4, "contexts", s), ie(t4, "sdkProcessingMetadata", a), i && (t4.level = i), g && (t4.transactionName = g), h && (t4.span = h), c.length && (t4.breadcrumbs = [...t4.breadcrumbs, ...c]), u.length && (t4.fingerprint = [...t4.fingerprint, ...u]), f.length && (t4.eventProcessors = [...t4.eventProcessors, ...f]), p.length && (t4.attachments = [...t4.attachments, ...p]), t4.propagationContext = { ...t4.propagationContext, ...l };
|
|
1178
1178
|
}
|
|
1179
|
-
function
|
|
1179
|
+
function ie(t4, e, n) {
|
|
1180
1180
|
if (n && Object.keys(n).length) {
|
|
1181
|
-
|
|
1182
|
-
for (let r in n) Object.prototype.hasOwnProperty.call(n, r) && (
|
|
1181
|
+
t4[e] = { ...t4[e] };
|
|
1182
|
+
for (let r in n) Object.prototype.hasOwnProperty.call(n, r) && (t4[e][r] = n[r]);
|
|
1183
1183
|
}
|
|
1184
1184
|
}
|
|
1185
|
-
function gr(
|
|
1185
|
+
function gr(t4, e) {
|
|
1186
1186
|
let { extra: n, tags: r, user: o, contexts: s, level: i, transactionName: a } = e, c = E(n);
|
|
1187
|
-
c && Object.keys(c).length && (
|
|
1187
|
+
c && Object.keys(c).length && (t4.extra = { ...c, ...t4.extra });
|
|
1188
1188
|
let u = E(r);
|
|
1189
|
-
u && Object.keys(u).length && (
|
|
1189
|
+
u && Object.keys(u).length && (t4.tags = { ...u, ...t4.tags });
|
|
1190
1190
|
let f = E(o);
|
|
1191
|
-
f && Object.keys(f).length && (
|
|
1191
|
+
f && Object.keys(f).length && (t4.user = { ...f, ...t4.user });
|
|
1192
1192
|
let p = E(s);
|
|
1193
|
-
p && Object.keys(p).length && (
|
|
1193
|
+
p && Object.keys(p).length && (t4.contexts = { ...p, ...t4.contexts }), i && (t4.level = i), a && t4.type !== "transaction" && (t4.transaction = a);
|
|
1194
1194
|
}
|
|
1195
|
-
function hr(
|
|
1196
|
-
let n = [...
|
|
1197
|
-
|
|
1195
|
+
function hr(t4, e) {
|
|
1196
|
+
let n = [...t4.breadcrumbs || [], ...e];
|
|
1197
|
+
t4.breadcrumbs = n.length ? n : void 0;
|
|
1198
1198
|
}
|
|
1199
|
-
function _r(
|
|
1200
|
-
|
|
1199
|
+
function _r(t4, e) {
|
|
1200
|
+
t4.sdkProcessingMetadata = { ...t4.sdkProcessingMetadata, ...e };
|
|
1201
1201
|
}
|
|
1202
|
-
function Er(
|
|
1203
|
-
|
|
1202
|
+
function Er(t4, e) {
|
|
1203
|
+
t4.contexts = { trace: Ce(e), ...t4.contexts }, t4.sdkProcessingMetadata = { dynamicSamplingContext: Ne(e), ...t4.sdkProcessingMetadata };
|
|
1204
1204
|
let n = L(e), r = W(n).description;
|
|
1205
|
-
r && !
|
|
1205
|
+
r && !t4.transaction && t4.type === "transaction" && (t4.transaction = r);
|
|
1206
1206
|
}
|
|
1207
|
-
function Sr(
|
|
1208
|
-
|
|
1207
|
+
function Sr(t4, e) {
|
|
1208
|
+
t4.fingerprint = t4.fingerprint ? ee(t4.fingerprint) : [], e && (t4.fingerprint = t4.fingerprint.concat(e)), t4.fingerprint && !t4.fingerprint.length && delete t4.fingerprint;
|
|
1209
1209
|
}
|
|
1210
|
-
function dn(
|
|
1211
|
-
let { normalizeDepth: i = 3, normalizeMaxBreadth: a = 1e3 } =
|
|
1212
|
-
yr(c,
|
|
1210
|
+
function dn(t4, e, n, r, o, s) {
|
|
1211
|
+
let { normalizeDepth: i = 3, normalizeMaxBreadth: a = 1e3 } = t4, c = { ...e, event_id: e.event_id || n.event_id || S(), timestamp: e.timestamp || z() }, u = n.integrations || t4.integrations.map((T) => T.name);
|
|
1212
|
+
yr(c, t4), xr(c, u), e.type === void 0 && Tr(c, t4.stackParser);
|
|
1213
1213
|
let f = br(r, n.captureContext);
|
|
1214
1214
|
n.mechanism && B(c, n.mechanism);
|
|
1215
1215
|
let p = o ? o.getEventProcessors() : [], l = Jt().getScopeData();
|
|
1216
1216
|
if (s) {
|
|
1217
|
-
let
|
|
1218
|
-
Et(l,
|
|
1217
|
+
let T = s.getScopeData();
|
|
1218
|
+
Et(l, T);
|
|
1219
1219
|
}
|
|
1220
1220
|
if (f) {
|
|
1221
|
-
let
|
|
1222
|
-
Et(l,
|
|
1221
|
+
let T = f.getScopeData();
|
|
1222
|
+
Et(l, T);
|
|
1223
1223
|
}
|
|
1224
1224
|
let g = [...n.attachments || [], ...l.attachments];
|
|
1225
1225
|
g.length && (n.attachments = g), pn(c, l);
|
|
1226
1226
|
let h = [...p, ...l.eventProcessors];
|
|
1227
|
-
return
|
|
1227
|
+
return ke(h, c, n).then((T) => (T && Ir(T), typeof i == "number" && i > 0 ? Ar(T, i, a) : T));
|
|
1228
1228
|
}
|
|
1229
|
-
function yr(
|
|
1229
|
+
function yr(t4, e) {
|
|
1230
1230
|
let { environment: n, release: r, dist: o, maxValueLength: s = 250 } = e;
|
|
1231
|
-
"environment" in
|
|
1232
|
-
let i =
|
|
1231
|
+
"environment" in t4 || (t4.environment = "environment" in e ? n : Oe), t4.release === void 0 && r !== void 0 && (t4.release = r), t4.dist === void 0 && o !== void 0 && (t4.dist = o), t4.message && (t4.message = k(t4.message, s));
|
|
1232
|
+
let i = t4.exception && t4.exception.values && t4.exception.values[0];
|
|
1233
1233
|
i && i.value && (i.value = k(i.value, s));
|
|
1234
|
-
let a =
|
|
1234
|
+
let a = t4.request;
|
|
1235
1235
|
a && a.url && (a.url = k(a.url, s));
|
|
1236
1236
|
}
|
|
1237
1237
|
var fn = /* @__PURE__ */ new WeakMap();
|
|
1238
|
-
function Tr(
|
|
1238
|
+
function Tr(t4, e) {
|
|
1239
1239
|
let n = m._sentryDebugIds;
|
|
1240
1240
|
if (!n) return;
|
|
1241
1241
|
let r, o = fn.get(e);
|
|
@@ -1253,7 +1253,7 @@ function Tr(t, e) {
|
|
|
1253
1253
|
return i;
|
|
1254
1254
|
}, {});
|
|
1255
1255
|
try {
|
|
1256
|
-
|
|
1256
|
+
t4.exception.values.forEach((i) => {
|
|
1257
1257
|
i.stacktrace.frames.forEach((a) => {
|
|
1258
1258
|
a.filename && (a.debug_id = s[a.filename]);
|
|
1259
1259
|
});
|
|
@@ -1261,10 +1261,10 @@ function Tr(t, e) {
|
|
|
1261
1261
|
} catch {
|
|
1262
1262
|
}
|
|
1263
1263
|
}
|
|
1264
|
-
function Ir(
|
|
1264
|
+
function Ir(t4) {
|
|
1265
1265
|
let e = {};
|
|
1266
1266
|
try {
|
|
1267
|
-
|
|
1267
|
+
t4.exception.values.forEach((r) => {
|
|
1268
1268
|
r.stacktrace.frames.forEach((o) => {
|
|
1269
1269
|
o.debug_id && (o.abs_path ? e[o.abs_path] = o.debug_id : o.filename && (e[o.filename] = o.debug_id), delete o.debug_id);
|
|
1270
1270
|
});
|
|
@@ -1272,26 +1272,26 @@ function Ir(t) {
|
|
|
1272
1272
|
} catch {
|
|
1273
1273
|
}
|
|
1274
1274
|
if (Object.keys(e).length === 0) return;
|
|
1275
|
-
|
|
1276
|
-
let n =
|
|
1275
|
+
t4.debug_meta = t4.debug_meta || {}, t4.debug_meta.images = t4.debug_meta.images || [];
|
|
1276
|
+
let n = t4.debug_meta.images;
|
|
1277
1277
|
Object.keys(e).forEach((r) => {
|
|
1278
1278
|
n.push({ type: "sourcemap", code_file: r, debug_id: e[r] });
|
|
1279
1279
|
});
|
|
1280
1280
|
}
|
|
1281
|
-
function xr(
|
|
1282
|
-
e.length > 0 && (
|
|
1281
|
+
function xr(t4, e) {
|
|
1282
|
+
e.length > 0 && (t4.sdk = t4.sdk || {}, t4.sdk.integrations = [...t4.sdk.integrations || [], ...e]);
|
|
1283
1283
|
}
|
|
1284
|
-
function Ar(
|
|
1285
|
-
if (!
|
|
1286
|
-
let r = { ...
|
|
1287
|
-
return
|
|
1284
|
+
function Ar(t4, e, n) {
|
|
1285
|
+
if (!t4) return null;
|
|
1286
|
+
let r = { ...t4, ...t4.breadcrumbs && { breadcrumbs: t4.breadcrumbs.map((o) => ({ ...o, ...o.data && { data: b(o.data, e, n) } })) }, ...t4.user && { user: b(t4.user, e, n) }, ...t4.contexts && { contexts: b(t4.contexts, e, n) }, ...t4.extra && { extra: b(t4.extra, e, n) } };
|
|
1287
|
+
return t4.contexts && t4.contexts.trace && r.contexts && (r.contexts.trace = t4.contexts.trace, t4.contexts.trace.data && (r.contexts.trace.data = b(t4.contexts.trace.data, e, n))), t4.spans && (r.spans = t4.spans.map((o) => ({ ...o, ...o.data && { data: b(o.data, e, n) } }))), r;
|
|
1288
1288
|
}
|
|
1289
|
-
function br(
|
|
1290
|
-
if (!e) return
|
|
1291
|
-
let n =
|
|
1289
|
+
function br(t4, e) {
|
|
1290
|
+
if (!e) return t4;
|
|
1291
|
+
let n = t4 ? t4.clone() : new x();
|
|
1292
1292
|
return n.update(e), n;
|
|
1293
1293
|
}
|
|
1294
|
-
var
|
|
1294
|
+
var De = class {
|
|
1295
1295
|
constructor(e, n) {
|
|
1296
1296
|
this._client = e, this.flushTimeout = 60, this._pendingAggregates = {}, this._isEnabled = true, this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1e3), this._intervalId.unref && this._intervalId.unref(), this._sessionAttrs = n;
|
|
1297
1297
|
}
|
|
@@ -1326,34 +1326,34 @@ var Me = class {
|
|
|
1326
1326
|
}
|
|
1327
1327
|
};
|
|
1328
1328
|
var Rr = "7";
|
|
1329
|
-
function Cr(
|
|
1330
|
-
let e =
|
|
1331
|
-
return `${e}//${
|
|
1329
|
+
function Cr(t4) {
|
|
1330
|
+
let e = t4.protocol ? `${t4.protocol}:` : "", n = t4.port ? `:${t4.port}` : "";
|
|
1331
|
+
return `${e}//${t4.host}${n}${t4.path ? `/${t4.path}` : ""}/api/`;
|
|
1332
1332
|
}
|
|
1333
|
-
function Or(
|
|
1334
|
-
return `${Cr(
|
|
1333
|
+
function Or(t4) {
|
|
1334
|
+
return `${Cr(t4)}${t4.projectId}/envelope/`;
|
|
1335
1335
|
}
|
|
1336
|
-
function Nr(
|
|
1337
|
-
return
|
|
1336
|
+
function Nr(t4, e) {
|
|
1337
|
+
return Ye({ sentry_key: t4.publicKey, sentry_version: Rr, ...e && { sentry_client: `${e.name}/${e.version}` } });
|
|
1338
1338
|
}
|
|
1339
|
-
function ln(
|
|
1340
|
-
return e || `${Or(
|
|
1339
|
+
function ln(t4, e, n) {
|
|
1340
|
+
return e || `${Or(t4)}?${Nr(t4, n)}`;
|
|
1341
1341
|
}
|
|
1342
1342
|
var mn = [];
|
|
1343
|
-
function kr(
|
|
1343
|
+
function kr(t4) {
|
|
1344
1344
|
let e = {};
|
|
1345
|
-
return
|
|
1345
|
+
return t4.forEach((n) => {
|
|
1346
1346
|
let { name: r } = n, o = e[r];
|
|
1347
1347
|
o && !o.isDefaultInstance && n.isDefaultInstance || (e[r] = n);
|
|
1348
1348
|
}), Object.keys(e).map((n) => e[n]);
|
|
1349
1349
|
}
|
|
1350
|
-
function St(
|
|
1351
|
-
let e =
|
|
1350
|
+
function St(t4) {
|
|
1351
|
+
let e = t4.defaultIntegrations || [], n = t4.integrations;
|
|
1352
1352
|
e.forEach((i) => {
|
|
1353
1353
|
i.isDefaultInstance = true;
|
|
1354
1354
|
});
|
|
1355
1355
|
let r;
|
|
1356
|
-
Array.isArray(n) ? r = [...e, ...n] : typeof n == "function" ? r =
|
|
1356
|
+
Array.isArray(n) ? r = [...e, ...n] : typeof n == "function" ? r = ee(n(e)) : r = e;
|
|
1357
1357
|
let o = kr(r), s = Dr(o, (i) => i.name === "Debug");
|
|
1358
1358
|
if (s !== -1) {
|
|
1359
1359
|
let [i] = o.splice(s, 1);
|
|
@@ -1361,60 +1361,60 @@ function St(t) {
|
|
|
1361
1361
|
}
|
|
1362
1362
|
return o;
|
|
1363
1363
|
}
|
|
1364
|
-
function gn(
|
|
1364
|
+
function gn(t4, e) {
|
|
1365
1365
|
let n = {};
|
|
1366
1366
|
return e.forEach((r) => {
|
|
1367
|
-
r && Tt(
|
|
1367
|
+
r && Tt(t4, r, n);
|
|
1368
1368
|
}), n;
|
|
1369
1369
|
}
|
|
1370
|
-
function yt(
|
|
1371
|
-
for (let n of e) n && n.afterAllSetup && n.afterAllSetup(
|
|
1370
|
+
function yt(t4, e) {
|
|
1371
|
+
for (let n of e) n && n.afterAllSetup && n.afterAllSetup(t4);
|
|
1372
1372
|
}
|
|
1373
|
-
function Tt(
|
|
1373
|
+
function Tt(t4, e, n) {
|
|
1374
1374
|
if (n[e.name]) {
|
|
1375
1375
|
_ && d.log(`Integration skipped because it was already installed: ${e.name}`);
|
|
1376
1376
|
return;
|
|
1377
1377
|
}
|
|
1378
|
-
if (n[e.name] = e, mn.indexOf(e.name) === -1 && typeof e.setupOnce == "function" && (e.setupOnce(), mn.push(e.name)), e.setup && typeof e.setup == "function" && e.setup(
|
|
1378
|
+
if (n[e.name] = e, mn.indexOf(e.name) === -1 && typeof e.setupOnce == "function" && (e.setupOnce(), mn.push(e.name)), e.setup && typeof e.setup == "function" && e.setup(t4), typeof e.preprocessEvent == "function") {
|
|
1379
1379
|
let r = e.preprocessEvent.bind(e);
|
|
1380
|
-
|
|
1380
|
+
t4.on("preprocessEvent", (o, s) => r(o, s, t4));
|
|
1381
1381
|
}
|
|
1382
1382
|
if (typeof e.processEvent == "function") {
|
|
1383
|
-
let r = e.processEvent.bind(e), o = Object.assign((s, i) => r(s, i,
|
|
1384
|
-
|
|
1383
|
+
let r = e.processEvent.bind(e), o = Object.assign((s, i) => r(s, i, t4), { id: e.name });
|
|
1384
|
+
t4.addEventProcessor(o);
|
|
1385
1385
|
}
|
|
1386
1386
|
_ && d.log(`Integration installed: ${e.name}`);
|
|
1387
1387
|
}
|
|
1388
|
-
function Dr(
|
|
1389
|
-
for (let n = 0; n <
|
|
1388
|
+
function Dr(t4, e) {
|
|
1389
|
+
for (let n = 0; n < t4.length; n++) if (e(t4[n]) === true) return n;
|
|
1390
1390
|
return -1;
|
|
1391
1391
|
}
|
|
1392
1392
|
var hn = "Not capturing exception because it's already been captured.";
|
|
1393
|
-
var
|
|
1393
|
+
var ve = class {
|
|
1394
1394
|
constructor(e) {
|
|
1395
|
-
if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn =
|
|
1395
|
+
if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = de(e.dsn) : _ && d.warn("No DSN provided, client will not send events."), this._dsn) {
|
|
1396
1396
|
let n = ln(this._dsn, e.tunnel, e._metadata ? e._metadata.sdk : void 0);
|
|
1397
1397
|
this._transport = e.transport({ tunnel: this._options.tunnel, recordDroppedEvent: this.recordDroppedEvent.bind(this), ...e.transportOptions, url: n });
|
|
1398
1398
|
}
|
|
1399
1399
|
}
|
|
1400
1400
|
captureException(e, n, r) {
|
|
1401
1401
|
let o = S();
|
|
1402
|
-
if (
|
|
1402
|
+
if (Ie(e)) return _ && d.log(hn), o;
|
|
1403
1403
|
let s = { event_id: o, ...n };
|
|
1404
1404
|
return this._process(this.eventFromException(e, s).then((i) => this._captureEvent(i, s, r))), s.event_id;
|
|
1405
1405
|
}
|
|
1406
1406
|
captureMessage(e, n, r, o) {
|
|
1407
|
-
let s = { event_id: S(), ...r }, i = H(e) ? e : String(e), a =
|
|
1407
|
+
let s = { event_id: S(), ...r }, i = H(e) ? e : String(e), a = pe(e) ? this.eventFromMessage(i, n, s) : this.eventFromException(e, s);
|
|
1408
1408
|
return this._process(a.then((c) => this._captureEvent(c, s, o))), s.event_id;
|
|
1409
1409
|
}
|
|
1410
1410
|
captureEvent(e, n, r) {
|
|
1411
1411
|
let o = S();
|
|
1412
|
-
if (n && n.originalException &&
|
|
1412
|
+
if (n && n.originalException && Ie(n.originalException)) return _ && d.log(hn), o;
|
|
1413
1413
|
let s = { event_id: o, ...n }, a = (e.sdkProcessingMetadata || {}).capturedSpanScope;
|
|
1414
1414
|
return this._process(this._captureEvent(e, s, a || r)), s.event_id;
|
|
1415
1415
|
}
|
|
1416
1416
|
captureSession(e) {
|
|
1417
|
-
typeof e.release != "string" ? _ && d.warn("Discarded session because of missing or non-string release") : (this.sendSession(e),
|
|
1417
|
+
typeof e.release != "string" ? _ && d.warn("Discarded session because of missing or non-string release") : (this.sendSession(e), re(e, { init: false }));
|
|
1418
1418
|
}
|
|
1419
1419
|
getDsn() {
|
|
1420
1420
|
return this._dsn;
|
|
@@ -1430,7 +1430,7 @@ var Pe = class {
|
|
|
1430
1430
|
}
|
|
1431
1431
|
flush(e) {
|
|
1432
1432
|
let n = this._transport;
|
|
1433
|
-
return n ? (this.emit("flush"), this._isClientDoneProcessing(e).then((r) => n.flush(e).then((o) => r && o))) :
|
|
1433
|
+
return n ? (this.emit("flush"), this._isClientDoneProcessing(e).then((r) => n.flush(e).then((o) => r && o))) : I(true);
|
|
1434
1434
|
}
|
|
1435
1435
|
close(e) {
|
|
1436
1436
|
return this.flush(e).then((n) => (this.getOptions().enabled = false, this.emit("close"), n));
|
|
@@ -1454,7 +1454,7 @@ var Pe = class {
|
|
|
1454
1454
|
sendEvent(e, n = {}) {
|
|
1455
1455
|
this.emit("beforeSendEvent", e, n);
|
|
1456
1456
|
let r = un(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
1457
|
-
for (let s of n.attachments || []) r =
|
|
1457
|
+
for (let s of n.attachments || []) r = rt(r, st(s));
|
|
1458
1458
|
let o = this.sendEnvelope(r);
|
|
1459
1459
|
o && o.then((s) => this.emit("afterSendEvent", e, s), null);
|
|
1460
1460
|
}
|
|
@@ -1475,7 +1475,7 @@ var Pe = class {
|
|
|
1475
1475
|
this._hooks[e] && this._hooks[e].forEach((r) => r(...n));
|
|
1476
1476
|
}
|
|
1477
1477
|
sendEnvelope(e) {
|
|
1478
|
-
return this.emit("beforeEnvelope", e), this._isEnabled() && this._transport ? this._transport.send(e).then(null, (n) => (_ && d.error("Error while sending event:", n), n)) : (_ && d.error("Transport disabled"),
|
|
1478
|
+
return this.emit("beforeEnvelope", e), this._isEnabled() && this._transport ? this._transport.send(e).then(null, (n) => (_ && d.error("Error while sending event:", n), n)) : (_ && d.error("Transport disabled"), I({}));
|
|
1479
1479
|
}
|
|
1480
1480
|
_setupIntegrations() {
|
|
1481
1481
|
let { integrations: e } = this._options;
|
|
@@ -1494,10 +1494,10 @@ var Pe = class {
|
|
|
1494
1494
|
}
|
|
1495
1495
|
}
|
|
1496
1496
|
let i = e.status === "ok";
|
|
1497
|
-
(i && e.errors === 0 || i && r) && (
|
|
1497
|
+
(i && e.errors === 0 || i && r) && (re(e, { ...r && { status: "crashed" }, errors: e.errors || Number(o || r) }), this.captureSession(e));
|
|
1498
1498
|
}
|
|
1499
1499
|
_isClientDoneProcessing(e) {
|
|
1500
|
-
return new
|
|
1500
|
+
return new R((n) => {
|
|
1501
1501
|
let r = 0, o = 1, s = setInterval(() => {
|
|
1502
1502
|
this._numProcessing == 0 ? (clearInterval(s), n(true)) : (r += o, e && r >= e && (clearInterval(s), n(false)));
|
|
1503
1503
|
}, o);
|
|
@@ -1514,7 +1514,7 @@ var Pe = class {
|
|
|
1514
1514
|
if (!(a.contexts && a.contexts.trace) && c) {
|
|
1515
1515
|
let { traceId: f, spanId: p, parentSpanId: l, dsc: g } = c;
|
|
1516
1516
|
a.contexts = { trace: E({ trace_id: f, span_id: p, parent_span_id: l }), ...a.contexts };
|
|
1517
|
-
let h = g ||
|
|
1517
|
+
let h = g || se(f, this);
|
|
1518
1518
|
a.sdkProcessingMetadata = { dynamicSamplingContext: h, ...a.sdkProcessingMetadata };
|
|
1519
1519
|
}
|
|
1520
1520
|
return a;
|
|
@@ -1530,25 +1530,25 @@ var Pe = class {
|
|
|
1530
1530
|
}
|
|
1531
1531
|
_processEvent(e, n, r) {
|
|
1532
1532
|
let o = this.getOptions(), { sampleRate: s } = o, i = En(e), a = _n(e), c = e.type || "error", u = `before send for type \`${c}\``, f = typeof s > "u" ? void 0 : an(s);
|
|
1533
|
-
if (a && typeof f == "number" && Math.random() > f) return this.recordDroppedEvent("sample_rate", "error", e), $(new
|
|
1533
|
+
if (a && typeof f == "number" && Math.random() > f) return this.recordDroppedEvent("sample_rate", "error", e), $(new y(`Discarding event because it's not included in the random sample (sampling rate = ${s})`, "log"));
|
|
1534
1534
|
let p = c === "replay_event" ? "replay" : c, g = (e.sdkProcessingMetadata || {}).capturedSpanIsolationScope;
|
|
1535
1535
|
return this._prepareEvent(e, n, r, g).then((h) => {
|
|
1536
|
-
if (h === null) throw this.recordDroppedEvent("event_processor", p, e), new
|
|
1536
|
+
if (h === null) throw this.recordDroppedEvent("event_processor", p, e), new y("An event processor returned `null`, will not send event.", "log");
|
|
1537
1537
|
if (n.data && n.data.__sentry__ === true) return h;
|
|
1538
|
-
let
|
|
1539
|
-
return vr(
|
|
1538
|
+
let T = Mr(o, h, n);
|
|
1539
|
+
return vr(T, u);
|
|
1540
1540
|
}).then((h) => {
|
|
1541
|
-
if (h === null) throw this.recordDroppedEvent("before_send", p, e), new
|
|
1542
|
-
let
|
|
1543
|
-
!i &&
|
|
1544
|
-
let
|
|
1545
|
-
if (i &&
|
|
1541
|
+
if (h === null) throw this.recordDroppedEvent("before_send", p, e), new y(`${u} returned \`null\`, will not send event.`, "log");
|
|
1542
|
+
let ce = r && r.getSession();
|
|
1543
|
+
!i && ce && this._updateSessionFromEvent(ce, h);
|
|
1544
|
+
let T = h.transaction_info;
|
|
1545
|
+
if (i && T && h.transaction !== e.transaction) {
|
|
1546
1546
|
let Nn = "custom";
|
|
1547
|
-
h.transaction_info = { ...
|
|
1547
|
+
h.transaction_info = { ...T, source: Nn };
|
|
1548
1548
|
}
|
|
1549
1549
|
return this.sendEvent(h, n), h;
|
|
1550
1550
|
}).then(null, (h) => {
|
|
1551
|
-
throw h instanceof
|
|
1551
|
+
throw h instanceof y ? h : (this.captureException(h, { data: { __sentry__: true }, originalException: h }), new y(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
1552
1552
|
Reason: ${h}`));
|
|
1553
1553
|
});
|
|
1554
1554
|
}
|
|
@@ -1563,19 +1563,19 @@ Reason: ${h}`));
|
|
|
1563
1563
|
});
|
|
1564
1564
|
}
|
|
1565
1565
|
};
|
|
1566
|
-
function vr(
|
|
1566
|
+
function vr(t4, e) {
|
|
1567
1567
|
let n = `${e} must return \`null\` or a valid event.`;
|
|
1568
|
-
if (C(
|
|
1569
|
-
if (!
|
|
1568
|
+
if (C(t4)) return t4.then((r) => {
|
|
1569
|
+
if (!A(r) && r !== null) throw new y(n);
|
|
1570
1570
|
return r;
|
|
1571
1571
|
}, (r) => {
|
|
1572
|
-
throw new
|
|
1572
|
+
throw new y(`${e} rejected with ${r}`);
|
|
1573
1573
|
});
|
|
1574
|
-
if (!
|
|
1575
|
-
return
|
|
1574
|
+
if (!A(t4) && t4 !== null) throw new y(n);
|
|
1575
|
+
return t4;
|
|
1576
1576
|
}
|
|
1577
|
-
function Mr(
|
|
1578
|
-
let { beforeSend: r, beforeSendTransaction: o, beforeSendSpan: s } =
|
|
1577
|
+
function Mr(t4, e, n) {
|
|
1578
|
+
let { beforeSend: r, beforeSendTransaction: o, beforeSendSpan: s } = t4;
|
|
1579
1579
|
if (_n(e) && r) return r(e, n);
|
|
1580
1580
|
if (En(e)) {
|
|
1581
1581
|
if (e.spans && s) {
|
|
@@ -1590,30 +1590,30 @@ function Mr(t, e, n) {
|
|
|
1590
1590
|
}
|
|
1591
1591
|
return e;
|
|
1592
1592
|
}
|
|
1593
|
-
function _n(
|
|
1594
|
-
return
|
|
1593
|
+
function _n(t4) {
|
|
1594
|
+
return t4.type === void 0;
|
|
1595
1595
|
}
|
|
1596
|
-
function En(
|
|
1597
|
-
return
|
|
1596
|
+
function En(t4) {
|
|
1597
|
+
return t4.type === "transaction";
|
|
1598
1598
|
}
|
|
1599
|
-
function Sn(
|
|
1599
|
+
function Sn(t4, e, n, r, o) {
|
|
1600
1600
|
let s = { sent_at: (/* @__PURE__ */ new Date()).toISOString() };
|
|
1601
1601
|
n && n.sdk && (s.sdk = { name: n.sdk.name, version: n.sdk.version }), r && o && (s.dsn = M(o)), e && (s.trace = E(e));
|
|
1602
|
-
let i = Pr(
|
|
1602
|
+
let i = Pr(t4);
|
|
1603
1603
|
return P(s, [i]);
|
|
1604
1604
|
}
|
|
1605
|
-
function Pr(
|
|
1606
|
-
return [{ type: "check_in" },
|
|
1605
|
+
function Pr(t4) {
|
|
1606
|
+
return [{ type: "check_in" }, t4];
|
|
1607
1607
|
}
|
|
1608
|
-
var
|
|
1608
|
+
var ae = class extends ve {
|
|
1609
1609
|
constructor(e) {
|
|
1610
1610
|
sn(), super(e);
|
|
1611
1611
|
}
|
|
1612
1612
|
eventFromException(e, n) {
|
|
1613
|
-
return
|
|
1613
|
+
return I(pt(this, this._options.stackParser, e, n));
|
|
1614
1614
|
}
|
|
1615
1615
|
eventFromMessage(e, n = "info", r) {
|
|
1616
|
-
return
|
|
1616
|
+
return I(ft(this._options.stackParser, e, n, r, this._options.attachStacktrace));
|
|
1617
1617
|
}
|
|
1618
1618
|
captureException(e, n, r) {
|
|
1619
1619
|
if (this._options.autoSessionTracking && this._sessionFlusher) {
|
|
@@ -1634,7 +1634,7 @@ var ue = class extends Pe {
|
|
|
1634
1634
|
}
|
|
1635
1635
|
initSessionFlusher() {
|
|
1636
1636
|
let { release: e, environment: n } = this._options;
|
|
1637
|
-
e ? this._sessionFlusher = new
|
|
1637
|
+
e ? this._sessionFlusher = new De(this, { release: e, environment: n }) : _ && d.warn("Cannot initialise an instance of SessionFlusher if no release is provided!");
|
|
1638
1638
|
}
|
|
1639
1639
|
captureCheckIn(e, n, r) {
|
|
1640
1640
|
let o = "checkInId" in e && e.checkInId ? e.checkInId : S();
|
|
@@ -1657,45 +1657,45 @@ var ue = class extends Pe {
|
|
|
1657
1657
|
let n = j(e);
|
|
1658
1658
|
if (n) {
|
|
1659
1659
|
let c = L(n);
|
|
1660
|
-
return [
|
|
1660
|
+
return [Ne(c), Ce(c)];
|
|
1661
1661
|
}
|
|
1662
1662
|
let { traceId: r, spanId: o, parentSpanId: s, dsc: i } = e.getPropagationContext(), a = { trace_id: r, span_id: o, parent_span_id: s };
|
|
1663
|
-
return i ? [i, a] : [
|
|
1663
|
+
return i ? [i, a] : [se(r, this), a];
|
|
1664
1664
|
}
|
|
1665
1665
|
};
|
|
1666
1666
|
var wr = 64;
|
|
1667
|
-
function It(
|
|
1667
|
+
function It(t4, e, n = et(t4.bufferSize || wr)) {
|
|
1668
1668
|
let r = {}, o = (i) => n.drain(i);
|
|
1669
1669
|
function s(i) {
|
|
1670
1670
|
let a = [];
|
|
1671
|
-
if (
|
|
1672
|
-
let g =
|
|
1673
|
-
if (
|
|
1671
|
+
if (xe(i, (p, l) => {
|
|
1672
|
+
let g = Ae(l);
|
|
1673
|
+
if (at(r, g)) {
|
|
1674
1674
|
let h = yn(p, l);
|
|
1675
|
-
|
|
1675
|
+
t4.recordDroppedEvent("ratelimit_backoff", g, h);
|
|
1676
1676
|
} else a.push(p);
|
|
1677
|
-
}), a.length === 0) return
|
|
1677
|
+
}), a.length === 0) return I({});
|
|
1678
1678
|
let c = P(i[0], a), u = (p) => {
|
|
1679
|
-
|
|
1679
|
+
xe(c, (l, g) => {
|
|
1680
1680
|
let h = yn(l, g);
|
|
1681
|
-
|
|
1681
|
+
t4.recordDroppedEvent(p, Ae(g), h);
|
|
1682
1682
|
});
|
|
1683
|
-
}, f = () => e({ body:
|
|
1683
|
+
}, f = () => e({ body: ot(c) }).then((p) => (p.statusCode !== void 0 && (p.statusCode < 200 || p.statusCode >= 300) && _ && d.warn(`Sentry responded with status code ${p.statusCode} to sent event.`), r = ct(r, p), p), (p) => {
|
|
1684
1684
|
throw u("network_error"), p;
|
|
1685
1685
|
});
|
|
1686
1686
|
return n.add(f).then((p) => p, (p) => {
|
|
1687
|
-
if (p instanceof
|
|
1687
|
+
if (p instanceof y) return _ && d.error("Skipped sending event because buffer is full."), u("queue_overflow"), I({});
|
|
1688
1688
|
throw p;
|
|
1689
1689
|
});
|
|
1690
1690
|
}
|
|
1691
1691
|
return { send: s, flush: o };
|
|
1692
1692
|
}
|
|
1693
|
-
function yn(
|
|
1694
|
-
if (!(e !== "event" && e !== "transaction")) return Array.isArray(
|
|
1693
|
+
function yn(t4, e) {
|
|
1694
|
+
if (!(e !== "event" && e !== "transaction")) return Array.isArray(t4) ? t4[1] : void 0;
|
|
1695
1695
|
}
|
|
1696
1696
|
var Lr = "RewriteFrames";
|
|
1697
|
-
var
|
|
1698
|
-
let e =
|
|
1697
|
+
var Me = (t4 = {}) => {
|
|
1698
|
+
let e = t4.root, n = t4.prefix || "app:///", r = "window" in m && m.window !== void 0, o = t4.iteratee || Fr({ isBrowser: r, root: e, prefix: n });
|
|
1699
1699
|
function s(a) {
|
|
1700
1700
|
try {
|
|
1701
1701
|
return { ...a, exception: { ...a.exception, values: a.exception.values.map((c) => ({ ...c, ...c.stacktrace && { stacktrace: i(c.stacktrace) } })) } };
|
|
@@ -1711,108 +1711,108 @@ var we = (t = {}) => {
|
|
|
1711
1711
|
return a.exception && Array.isArray(a.exception.values) && (c = s(c)), c;
|
|
1712
1712
|
} };
|
|
1713
1713
|
};
|
|
1714
|
-
function Fr({ isBrowser:
|
|
1714
|
+
function Fr({ isBrowser: t4, root: e, prefix: n }) {
|
|
1715
1715
|
return (r) => {
|
|
1716
1716
|
if (!r.filename) return r;
|
|
1717
1717
|
let o = /^[a-zA-Z]:\\/.test(r.filename) || r.filename.includes("\\") && !r.filename.includes("/"), s = /^\//.test(r.filename);
|
|
1718
|
-
if (
|
|
1718
|
+
if (t4) {
|
|
1719
1719
|
if (e) {
|
|
1720
1720
|
let i = r.filename;
|
|
1721
1721
|
i.indexOf(e) === 0 && (r.filename = i.replace(e, n));
|
|
1722
1722
|
}
|
|
1723
1723
|
} else if (o || s) {
|
|
1724
|
-
let i = o ? r.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : r.filename, a = e ?
|
|
1724
|
+
let i = o ? r.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : r.filename, a = e ? Qe(e, i) : te(i);
|
|
1725
1725
|
r.filename = `${n}${a}`;
|
|
1726
1726
|
}
|
|
1727
1727
|
return r;
|
|
1728
1728
|
};
|
|
1729
1729
|
}
|
|
1730
|
-
function In(
|
|
1731
|
-
return typeof
|
|
1730
|
+
function In(t4) {
|
|
1731
|
+
return typeof t4 == "object" && t4 !== null;
|
|
1732
1732
|
}
|
|
1733
|
-
function Br(
|
|
1734
|
-
return In(
|
|
1733
|
+
function Br(t4) {
|
|
1734
|
+
return In(t4) && "handled" in t4 && typeof t4.handled == "boolean" && "type" in t4 && typeof t4.type == "string";
|
|
1735
1735
|
}
|
|
1736
|
-
function $r(
|
|
1737
|
-
return In(
|
|
1736
|
+
function $r(t4) {
|
|
1737
|
+
return In(t4) && "mechanism" in t4 && Br(t4.mechanism);
|
|
1738
1738
|
}
|
|
1739
1739
|
function jr() {
|
|
1740
1740
|
if (m.SENTRY_RELEASE && m.SENTRY_RELEASE.id) return m.SENTRY_RELEASE.id;
|
|
1741
1741
|
}
|
|
1742
|
-
function Tn(
|
|
1743
|
-
return
|
|
1742
|
+
function Tn(t4, e) {
|
|
1743
|
+
return t4 !== void 0 ? (t4[e[0]] = e[1], t4) : { [e[0]]: e[1] };
|
|
1744
1744
|
}
|
|
1745
|
-
function xn(
|
|
1746
|
-
return
|
|
1745
|
+
function xn(t4, e) {
|
|
1746
|
+
return t4(e.stack || "", 1);
|
|
1747
1747
|
}
|
|
1748
|
-
function Gr(
|
|
1749
|
-
let e =
|
|
1748
|
+
function Gr(t4) {
|
|
1749
|
+
let e = t4 && t4.message;
|
|
1750
1750
|
return e ? e.error && typeof e.error.message == "string" ? e.error.message : e : "No error message";
|
|
1751
1751
|
}
|
|
1752
|
-
function An(
|
|
1753
|
-
let n = { type: e.name || e.constructor.name, value: Gr(e) }, r = xn(
|
|
1752
|
+
function An(t4, e) {
|
|
1753
|
+
let n = { type: e.name || e.constructor.name, value: Gr(e) }, r = xn(t4, e);
|
|
1754
1754
|
return r.length && (n.stacktrace = { frames: r }), n.type === void 0 && n.value === "" && (n.value = "Unrecoverable error caught"), n;
|
|
1755
1755
|
}
|
|
1756
|
-
function Hr(
|
|
1756
|
+
function Hr(t4, e, n, r) {
|
|
1757
1757
|
let o, i = (r && r.data && $r(r.data) ? r.data.mechanism : void 0) ?? { handled: true, type: "generic" };
|
|
1758
1758
|
if (F(n)) o = n;
|
|
1759
1759
|
else {
|
|
1760
|
-
if (
|
|
1761
|
-
let c = `Non-Error exception captured with keys: ${
|
|
1762
|
-
|
|
1760
|
+
if (A(n)) {
|
|
1761
|
+
let c = `Non-Error exception captured with keys: ${K(n)}`, u = t4?.getClient(), f = u && u.getOptions().normalizeDepth;
|
|
1762
|
+
t4?.setExtra("__serialized__", Y(n, f)), o = r && r.syntheticException || new Error(c), o.message = c;
|
|
1763
1763
|
} else o = r && r.syntheticException || new Error(n), o.message = n;
|
|
1764
1764
|
i.synthetic = true;
|
|
1765
1765
|
}
|
|
1766
1766
|
let a = { exception: { values: [An(e, o)] } };
|
|
1767
|
-
return
|
|
1767
|
+
return Q(a, void 0, void 0), B(a, i), { ...a, event_id: r && r.event_id };
|
|
1768
1768
|
}
|
|
1769
|
-
function qr(
|
|
1769
|
+
function qr(t4, e, n = "info", r, o) {
|
|
1770
1770
|
let s = { event_id: r && r.event_id, level: n, message: e };
|
|
1771
1771
|
if (o && r && r.syntheticException) {
|
|
1772
|
-
let i = xn(
|
|
1772
|
+
let i = xn(t4, r.syntheticException);
|
|
1773
1773
|
i.length && (s.exception = { values: [{ value: e, stacktrace: { frames: i } }] });
|
|
1774
1774
|
}
|
|
1775
1775
|
return s;
|
|
1776
1776
|
}
|
|
1777
1777
|
var zr = 5;
|
|
1778
|
-
var Yr = (
|
|
1779
|
-
function Jr(
|
|
1778
|
+
var Yr = (t4 = { limit: zr }) => ({ name: "LinkedErrors", processEvent: (e, n, r) => Jr(r.getOptions().stackParser, t4.limit, e, n) });
|
|
1779
|
+
function Jr(t4, e, n, r) {
|
|
1780
1780
|
if (!n.exception || !n.exception.values || !r || !O(r.originalException, Error)) return n;
|
|
1781
|
-
let o = bn(
|
|
1781
|
+
let o = bn(t4, e, r.originalException);
|
|
1782
1782
|
return n.exception.values = [...o, ...n.exception.values], n;
|
|
1783
1783
|
}
|
|
1784
|
-
function bn(
|
|
1784
|
+
function bn(t4, e, n, r = []) {
|
|
1785
1785
|
if (!O(n.cause, Error) || r.length + 1 >= e) return r;
|
|
1786
|
-
let o = An(
|
|
1787
|
-
return bn(
|
|
1786
|
+
let o = An(t4, n.cause);
|
|
1787
|
+
return bn(t4, e, n.cause, [o, ...r]);
|
|
1788
1788
|
}
|
|
1789
1789
|
var Wr = { allowedHeaders: ["CF-RAY", "CF-Worker"] };
|
|
1790
|
-
var Kr = (
|
|
1791
|
-
let e = { ...Wr, ...
|
|
1790
|
+
var Kr = (t4 = {}) => {
|
|
1791
|
+
let e = { ...Wr, ...t4 };
|
|
1792
1792
|
return { name: "RequestData", preprocessEvent: (n) => {
|
|
1793
1793
|
let { sdkProcessingMetadata: r } = n;
|
|
1794
1794
|
return r && ("request" in r && r.request instanceof Request && (n.request = Xr(r.request, e), n.user = Vr(n.user ?? {}, r.request, e)), "requestData" in r && (n.request ? n.request.data = r.requestData : n.request = { data: r.requestData })), n;
|
|
1795
1795
|
} };
|
|
1796
1796
|
};
|
|
1797
|
-
function Vr(
|
|
1798
|
-
let r = e.headers.get("CF-Connecting-IP"), { allowedIps: o } = n, s = { ...
|
|
1799
|
-
return !("ip_address" in
|
|
1797
|
+
function Vr(t4, e, n) {
|
|
1798
|
+
let r = e.headers.get("CF-Connecting-IP"), { allowedIps: o } = n, s = { ...t4 };
|
|
1799
|
+
return !("ip_address" in t4) && r && o !== void 0 && Zr(r, o) && (s.ip_address = r), Object.keys(s).length > 0 ? s : void 0;
|
|
1800
1800
|
}
|
|
1801
|
-
function Xr(
|
|
1802
|
-
let n =
|
|
1801
|
+
function Xr(t4, e) {
|
|
1802
|
+
let n = t4.headers.get("cookie"), r;
|
|
1803
1803
|
if (n) try {
|
|
1804
1804
|
r = Qr(n);
|
|
1805
1805
|
} catch {
|
|
1806
1806
|
}
|
|
1807
1807
|
let o = {};
|
|
1808
|
-
for (let [u, f] of
|
|
1809
|
-
let s = { method:
|
|
1808
|
+
for (let [u, f] of t4.headers.entries()) u !== "cookie" && (o[u] = f);
|
|
1809
|
+
let s = { method: t4.method, cookies: r, headers: o };
|
|
1810
1810
|
try {
|
|
1811
|
-
let u = new URL(
|
|
1811
|
+
let u = new URL(t4.url);
|
|
1812
1812
|
s.url = `${u.protocol}//${u.hostname}${u.pathname}`, s.query_string = u.search;
|
|
1813
1813
|
} catch {
|
|
1814
|
-
let f =
|
|
1815
|
-
f < 0 ? s.url =
|
|
1814
|
+
let f = t4.url.indexOf("?");
|
|
1815
|
+
f < 0 ? s.url = t4.url : (s.url = t4.url.substr(0, f), s.query_string = t4.url.substr(f + 1));
|
|
1816
1816
|
}
|
|
1817
1817
|
let { allowedHeaders: i, allowedCookies: a, allowedSearchParams: c } = e;
|
|
1818
1818
|
if (i !== void 0 && s.headers ? (s.headers = xt(s.headers, i), Object.keys(s.headers).length === 0 && delete s.headers) : delete s.headers, a !== void 0 && s.cookies ? (s.cookies = xt(s.cookies, a), Object.keys(s.cookies).length === 0 && delete s.cookies) : delete s.cookies, c !== void 0) {
|
|
@@ -1823,30 +1823,30 @@ function Xr(t, e) {
|
|
|
1823
1823
|
} else delete s.query_string;
|
|
1824
1824
|
return s;
|
|
1825
1825
|
}
|
|
1826
|
-
function Zr(
|
|
1827
|
-
return typeof e == "boolean" ? e : e instanceof RegExp ? e.test(
|
|
1826
|
+
function Zr(t4, e) {
|
|
1827
|
+
return typeof e == "boolean" ? e : e instanceof RegExp ? e.test(t4) : Array.isArray(e) ? e.map((r) => r.toLowerCase()).includes(t4) : false;
|
|
1828
1828
|
}
|
|
1829
|
-
function xt(
|
|
1829
|
+
function xt(t4, e) {
|
|
1830
1830
|
let n = () => false;
|
|
1831
|
-
if (typeof e == "boolean") return e ?
|
|
1831
|
+
if (typeof e == "boolean") return e ? t4 : {};
|
|
1832
1832
|
if (e instanceof RegExp) n = (r) => e.test(r);
|
|
1833
1833
|
else if (Array.isArray(e)) {
|
|
1834
1834
|
let r = e.map((o) => o.toLowerCase());
|
|
1835
1835
|
n = (o) => r.includes(o.toLowerCase());
|
|
1836
1836
|
} else return {};
|
|
1837
|
-
return Object.keys(
|
|
1837
|
+
return Object.keys(t4).filter(n).reduce((r, o) => (r[o] = t4[o], r), {});
|
|
1838
1838
|
}
|
|
1839
|
-
function Qr(
|
|
1840
|
-
if (typeof
|
|
1839
|
+
function Qr(t4) {
|
|
1840
|
+
if (typeof t4 != "string") return {};
|
|
1841
1841
|
try {
|
|
1842
|
-
return
|
|
1842
|
+
return t4.split(";").map((e) => e.split("=")).reduce((e, [n, r]) => (e[decodeURIComponent(n.trim())] = decodeURIComponent(r.trim()), e), {});
|
|
1843
1843
|
} catch {
|
|
1844
1844
|
return {};
|
|
1845
1845
|
}
|
|
1846
1846
|
}
|
|
1847
|
-
function eo(
|
|
1847
|
+
function eo(t4, e) {
|
|
1848
1848
|
let n = {};
|
|
1849
|
-
return
|
|
1849
|
+
return t4.forEach((r) => {
|
|
1850
1850
|
n[r.name] = r, typeof r.setupOnce == "function" && r.setupOnce();
|
|
1851
1851
|
let o = e.getClient();
|
|
1852
1852
|
if (o) {
|
|
@@ -1861,7 +1861,7 @@ function eo(t, e) {
|
|
|
1861
1861
|
}
|
|
1862
1862
|
}), n;
|
|
1863
1863
|
}
|
|
1864
|
-
var At = class extends
|
|
1864
|
+
var At = class extends ae {
|
|
1865
1865
|
#e = null;
|
|
1866
1866
|
#t = false;
|
|
1867
1867
|
constructor(e) {
|
|
@@ -1871,10 +1871,10 @@ var At = class extends ue {
|
|
|
1871
1871
|
this._isEnabled() && !this.#t && this.#e && (this._integrations = eo(this._options.integrations, this.#e), this.#t = true);
|
|
1872
1872
|
}
|
|
1873
1873
|
eventFromException(e, n) {
|
|
1874
|
-
return
|
|
1874
|
+
return I(Hr(this.#e, this._options.stackParser, e, n));
|
|
1875
1875
|
}
|
|
1876
1876
|
eventFromMessage(e, n = "info", r) {
|
|
1877
|
-
return
|
|
1877
|
+
return I(qr(this._options.stackParser, e, n, r, this._options.attachStacktrace));
|
|
1878
1878
|
}
|
|
1879
1879
|
_prepareEvent(e, n, r) {
|
|
1880
1880
|
return e.platform = e.platform || "javascript", this.getOptions().request && (e.sdkProcessingMetadata = Tn(e.sdkProcessingMetadata, ["request", this.getOptions().request])), this.getOptions().requestData && (e.sdkProcessingMetadata = Tn(e.sdkProcessingMetadata, ["requestData", this.getOptions().requestData])), super._prepareEvent(e, n, r);
|
|
@@ -1892,8 +1892,8 @@ var At = class extends ue {
|
|
|
1892
1892
|
this.getOptions().enabled = e;
|
|
1893
1893
|
}
|
|
1894
1894
|
};
|
|
1895
|
-
function to(
|
|
1896
|
-
let [e, n] =
|
|
1895
|
+
function to(t4) {
|
|
1896
|
+
let [e, n] = tt(t4);
|
|
1897
1897
|
return [e, (o) => {
|
|
1898
1898
|
let s = n(o);
|
|
1899
1899
|
if (s) {
|
|
@@ -1903,22 +1903,22 @@ function to(t) {
|
|
|
1903
1903
|
return s;
|
|
1904
1904
|
}];
|
|
1905
1905
|
}
|
|
1906
|
-
function no(
|
|
1907
|
-
if (
|
|
1906
|
+
function no(t4) {
|
|
1907
|
+
if (t4) return te(t4, ".js");
|
|
1908
1908
|
}
|
|
1909
|
-
var ro =
|
|
1910
|
-
function oo(
|
|
1909
|
+
var ro = ge(to(no));
|
|
1910
|
+
function oo(t4) {
|
|
1911
1911
|
function e({ body: n }) {
|
|
1912
1912
|
try {
|
|
1913
|
-
let o = (
|
|
1914
|
-
return
|
|
1913
|
+
let o = (t4.fetcher ?? fetch)(t4.url, { method: "POST", headers: t4.headers, body: n }).then((s) => ({ statusCode: s.status, headers: { "retry-after": s.headers.get("Retry-After"), "x-sentry-rate-limits": s.headers.get("X-Sentry-Rate-Limits") } }));
|
|
1914
|
+
return t4.context && t4.context.waitUntil(o), o;
|
|
1915
1915
|
} catch (r) {
|
|
1916
1916
|
return $(r);
|
|
1917
1917
|
}
|
|
1918
1918
|
}
|
|
1919
|
-
return It(
|
|
1919
|
+
return It(t4, e);
|
|
1920
1920
|
}
|
|
1921
|
-
var
|
|
1921
|
+
var Pe = class t3 extends x {
|
|
1922
1922
|
#e;
|
|
1923
1923
|
constructor(e) {
|
|
1924
1924
|
if (super(), e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [Kr(e.requestDataOptions), Yr()]], e.release === void 0) {
|
|
@@ -1928,7 +1928,7 @@ var K = class extends A {
|
|
|
1928
1928
|
this.#e = e, this.attachNewClient();
|
|
1929
1929
|
}
|
|
1930
1930
|
attachNewClient() {
|
|
1931
|
-
let e = new At({ ...this.#e, transport: oo, integrations: St(this.#e), stackParser:
|
|
1931
|
+
let e = new At({ ...this.#e, transport: oo, integrations: St(this.#e), stackParser: We(this.#e.stackParser || ro), transportOptions: { ...this.#e.transportOptions, context: this.#e.context } });
|
|
1932
1932
|
this.setClient(e), e.setSdk(this), e.setupIntegrations();
|
|
1933
1933
|
}
|
|
1934
1934
|
setRequestBody(e) {
|
|
@@ -1945,7 +1945,7 @@ var K = class extends A {
|
|
|
1945
1945
|
return super.addBreadcrumb(e, o);
|
|
1946
1946
|
}
|
|
1947
1947
|
clone() {
|
|
1948
|
-
let e = new
|
|
1948
|
+
let e = new t3({ ...this.#e });
|
|
1949
1949
|
return e._breadcrumbs = [...this._breadcrumbs], e._tags = { ...this._tags }, e._extra = { ...this._extra }, e._contexts = { ...this._contexts }, e._user = this._user, e._level = this._level, e._session = this._session, e._transactionName = this._transactionName, e._fingerprint = this._fingerprint, e._eventProcessors = [...this._eventProcessors], e._requestSession = this._requestSession, e._attachments = [...this._attachments], e._sdkProcessingMetadata = { ...this._sdkProcessingMetadata }, e._propagationContext = { ...this._propagationContext }, e._lastEventId = this._lastEventId, e;
|
|
1950
1950
|
}
|
|
1951
1951
|
withScope(e) {
|
|
@@ -1953,9 +1953,9 @@ var K = class extends A {
|
|
|
1953
1953
|
return e(n);
|
|
1954
1954
|
}
|
|
1955
1955
|
};
|
|
1956
|
-
function Rn(
|
|
1956
|
+
function Rn(t4, e, n, r, o, s, i, a, c) {
|
|
1957
1957
|
if (!(n && r && o)) return;
|
|
1958
|
-
let u = new
|
|
1958
|
+
let u = new Pe({ dsn: n, request: t4, context: e, sampleRate: 1, release: i?.tag, integrations: [Me({ iteratee(f) {
|
|
1959
1959
|
return f.filename = "/index.js", f;
|
|
1960
1960
|
} })], requestDataOptions: { allowedHeaders: ["user-agent", "cf-challenge", "accept-encoding", "accept-language", "cf-ray", "content-length", "content-type", "host"], allowedSearchParams: /(.*)/ }, transportOptions: { headers: { "CF-Access-Client-ID": r, "CF-Access-Client-Secret": o } } });
|
|
1961
1961
|
return s && (u.setTag("colo", s.coloId), u.setTag("metal", s.metalId)), a && c && (u.setTag("accountId", a), u.setTag("scriptId", c)), u.setUser({ id: a?.toString() }), u;
|
|
@@ -1967,9 +1967,9 @@ function so() {
|
|
|
1967
1967
|
}, isRecording: true };
|
|
1968
1968
|
}
|
|
1969
1969
|
function Cn() {
|
|
1970
|
-
return { enterSpan: (
|
|
1970
|
+
return { enterSpan: (t4, e, ...n) => e(so(), ...n), getSpanContext: () => ({ traceId: "test-trace", spanId: "test-span", parentSpanId: "test-parent-span", traceFlags: 0 }), runWithSpanContext: (t4, e, ...n) => e(...n), traceId: "test-trace", spanId: "test-span", parentSpanId: "test-parent-span", cfTraceIdHeader: "test-trace:test-span:0" };
|
|
1971
1971
|
}
|
|
1972
|
-
var
|
|
1972
|
+
var we = class {
|
|
1973
1973
|
constructor(e) {
|
|
1974
1974
|
this.data = {};
|
|
1975
1975
|
this.hasWritten = false;
|
|
@@ -1985,23 +1985,22 @@ var Le = class {
|
|
|
1985
1985
|
this.hasWritten || this.readyAnalytics && (this.hasWritten = true, this.readyAnalytics.logEvent({ version: 1, accountId: this.data.accountId, indexId: this.data.scriptId?.toString(), doubles: [this.data.requestTime ?? -1, this.data.coloId ?? -1, this.data.metalId ?? -1, this.data.coloTier ?? -1, this.data.userWorkerAhead === void 0 ? -1 : Number(this.data.userWorkerAhead)], blobs: [this.data.hostname?.substring(0, 256), this.data.dispatchtype, this.data.error?.substring(0, 256), this.data.version, this.data.coloRegion] }));
|
|
1986
1986
|
}
|
|
1987
1987
|
};
|
|
1988
|
-
var On = (
|
|
1989
|
-
var Bc = { async fetch(
|
|
1990
|
-
let r, o = false, s = new
|
|
1988
|
+
var On = (t4) => ({ invoke_user_worker_ahead_of_assets: t4?.invoke_user_worker_ahead_of_assets ?? false, has_user_worker: t4?.has_user_worker ?? false, account_id: t4?.account_id ?? -1, script_id: t4?.script_id ?? -1 });
|
|
1989
|
+
var Bc = { async fetch(t4, e, n) {
|
|
1990
|
+
let r, o = false, s = new we(e.ANALYTICS), i = new ue(e.UNSAFE_PERFORMANCE), a = i.now();
|
|
1991
1991
|
try {
|
|
1992
|
-
e.JAEGER || (e.JAEGER = Cn()), r = Rn(
|
|
1993
|
-
let c = On(e.CONFIG), u = new URL(
|
|
1992
|
+
e.JAEGER || (e.JAEGER = Cn()), r = Rn(t4, n, e.SENTRY_DSN, e.SENTRY_ACCESS_CLIENT_ID, e.SENTRY_ACCESS_CLIENT_SECRET, e.COLO_METADATA, e.VERSION_METADATA, e.CONFIG?.account_id, e.CONFIG?.script_id);
|
|
1993
|
+
let c = On(e.CONFIG), u = new URL(t4.url);
|
|
1994
1994
|
e.COLO_METADATA && e.VERSION_METADATA && e.CONFIG && s.setData({ accountId: e.CONFIG.account_id, scriptId: e.CONFIG.script_id, coloId: e.COLO_METADATA.coloId, metalId: e.COLO_METADATA.metalId, coloTier: e.COLO_METADATA.coloTier, coloRegion: e.COLO_METADATA.coloRegion, hostname: u.hostname, version: e.VERSION_METADATA.tag, userWorkerAhead: c.invoke_user_worker_ahead_of_assets });
|
|
1995
|
-
let f =
|
|
1995
|
+
let f = t4.clone();
|
|
1996
1996
|
if (c.invoke_user_worker_ahead_of_assets) {
|
|
1997
1997
|
if (!c.has_user_worker) throw new Error("Fetch for user worker without having a user worker binding");
|
|
1998
1998
|
return s.setData({ dispatchtype: "worker" }), await e.JAEGER.enterSpan("dispatch_worker", async (l) => (l.setTags({ hasUserWorker: true, asset: "ignored", dispatchType: "worker" }), o = true, e.USER_WORKER.fetch(f)));
|
|
1999
1999
|
}
|
|
2000
|
-
let p = await e.ASSET_WORKER.unstable_canFetch(
|
|
2000
|
+
let p = await e.ASSET_WORKER.unstable_canFetch(t4);
|
|
2001
2001
|
return c.has_user_worker && !p ? (s.setData({ dispatchtype: "worker" }), await e.JAEGER.enterSpan("dispatch_worker", async (l) => (l.setTags({ hasUserWorker: c.has_user_worker, asset: p, dispatchType: "worker" }), o = true, e.USER_WORKER.fetch(f)))) : (s.setData({ dispatchtype: "asset" }), await e.JAEGER.enterSpan("dispatch_assets", async (l) => (l.setTags({ hasUserWorker: c.has_user_worker, asset: p, dispatchType: "asset" }), e.ASSET_WORKER.fetch(f))));
|
|
2002
2002
|
} catch (c) {
|
|
2003
|
-
|
|
2004
|
-
throw c instanceof Error && s.setData({ error: c.message }), r && r.captureException(c), c;
|
|
2003
|
+
throw o || (c instanceof Error && s.setData({ error: c.message }), r && r.captureException(c)), c;
|
|
2005
2004
|
} finally {
|
|
2006
2005
|
s.setData({ requestTime: i.now() - a }), s.write();
|
|
2007
2006
|
}
|