@cloudflare/vite-plugin 0.0.0-e98269a59 → 0.0.0-eb46f987c
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/asset-workers/asset-worker.js +1261 -1539
- package/dist/asset-workers/router-worker.js +1173 -1481
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7615 -517
- package/dist/runner-worker/index.js +7 -2
- package/package.json +17 -10
|
@@ -1,17 +1,5 @@
|
|
|
1
1
|
// ../workers-shared/dist/router-worker.mjs
|
|
2
|
-
var
|
|
3
|
-
var Mn = (t, e, n) => e in t ? Pn(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
|
|
4
|
-
var fe = (t, e, n) => (Mn(t, typeof e != "symbol" ? e + "" : e, n), n);
|
|
5
|
-
var bt = (t, e, n) => {
|
|
6
|
-
if (!e.has(t)) throw TypeError("Cannot " + n);
|
|
7
|
-
};
|
|
8
|
-
var Ye = (t, e, n) => (bt(t, e, "read from private field"), n ? n.call(t) : e.get(t));
|
|
9
|
-
var Rt = (t, e, n) => {
|
|
10
|
-
if (e.has(t)) throw TypeError("Cannot add the same private member more than once");
|
|
11
|
-
e instanceof WeakSet ? e.add(t) : e.set(t, n);
|
|
12
|
-
};
|
|
13
|
-
var It = (t, e, n, r) => (bt(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n);
|
|
14
|
-
var pe = class {
|
|
2
|
+
var fe = class {
|
|
15
3
|
constructor(e) {
|
|
16
4
|
this.performanceTimer = e;
|
|
17
5
|
}
|
|
@@ -19,9 +7,9 @@ var pe = class {
|
|
|
19
7
|
return this.performanceTimer ? this.performanceTimer.timeOrigin + this.performanceTimer.now() : Date.now();
|
|
20
8
|
}
|
|
21
9
|
};
|
|
22
|
-
var
|
|
23
|
-
function
|
|
24
|
-
switch (
|
|
10
|
+
var bt = Object.prototype.toString;
|
|
11
|
+
function L(t) {
|
|
12
|
+
switch (bt.call(t)) {
|
|
25
13
|
case "[object Error]":
|
|
26
14
|
case "[object Exception]":
|
|
27
15
|
case "[object DOMException]":
|
|
@@ -30,17 +18,23 @@ function U(t) {
|
|
|
30
18
|
return O(t, Error);
|
|
31
19
|
}
|
|
32
20
|
}
|
|
33
|
-
function
|
|
34
|
-
return
|
|
21
|
+
function Le(t, e) {
|
|
22
|
+
return bt.call(t) === `[object ${e}]`;
|
|
35
23
|
}
|
|
36
|
-
function
|
|
37
|
-
return
|
|
24
|
+
function Ue(t) {
|
|
25
|
+
return Le(t, "ErrorEvent");
|
|
38
26
|
}
|
|
39
|
-
function
|
|
40
|
-
return t
|
|
27
|
+
function Be(t) {
|
|
28
|
+
return Le(t, "String");
|
|
41
29
|
}
|
|
42
|
-
function
|
|
43
|
-
return
|
|
30
|
+
function H(t) {
|
|
31
|
+
return typeof t == "object" && t !== null && "__sentry_template_string__" in t && "__sentry_template_values__" in t;
|
|
32
|
+
}
|
|
33
|
+
function de(t) {
|
|
34
|
+
return t === null || H(t) || typeof t != "object" && typeof t != "function";
|
|
35
|
+
}
|
|
36
|
+
function b(t) {
|
|
37
|
+
return Le(t, "Object");
|
|
44
38
|
}
|
|
45
39
|
function $e(t) {
|
|
46
40
|
return typeof Event < "u" && O(t, Event);
|
|
@@ -48,14 +42,11 @@ function $e(t) {
|
|
|
48
42
|
function je(t) {
|
|
49
43
|
return typeof Element < "u" && O(t, Element);
|
|
50
44
|
}
|
|
51
|
-
function
|
|
45
|
+
function C(t) {
|
|
52
46
|
return !!(t && t.then && typeof t.then == "function");
|
|
53
47
|
}
|
|
54
|
-
function
|
|
55
|
-
return
|
|
56
|
-
}
|
|
57
|
-
function Z(t) {
|
|
58
|
-
return typeof t == "number" && t !== t;
|
|
48
|
+
function Ge(t) {
|
|
49
|
+
return b(t) && "nativeEvent" in t && "preventDefault" in t && "stopPropagation" in t;
|
|
59
50
|
}
|
|
60
51
|
function O(t, e) {
|
|
61
52
|
try {
|
|
@@ -64,669 +55,485 @@ function O(t, e) {
|
|
|
64
55
|
return false;
|
|
65
56
|
}
|
|
66
57
|
}
|
|
67
|
-
function
|
|
58
|
+
function He(t) {
|
|
68
59
|
return !!(typeof t == "object" && t !== null && (t.__isVue || t._isVue));
|
|
69
60
|
}
|
|
70
|
-
function
|
|
61
|
+
function k(t, e = 0) {
|
|
71
62
|
return typeof t != "string" || e === 0 || t.length <= e ? t : `${t.slice(0, e)}...`;
|
|
72
63
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
return this;
|
|
78
|
-
}() || {};
|
|
79
|
-
function x() {
|
|
80
|
-
return m;
|
|
81
|
-
}
|
|
82
|
-
function Q(t, e, n) {
|
|
83
|
-
let r = n || m, s = r.__SENTRY__ = r.__SENTRY__ || {};
|
|
64
|
+
var D = "8.9.2";
|
|
65
|
+
var l = globalThis;
|
|
66
|
+
function q(t, e, n) {
|
|
67
|
+
let r = n || l, o = r.__SENTRY__ = r.__SENTRY__ || {}, s = o[D] = o[D] || {};
|
|
84
68
|
return s[t] || (s[t] = e());
|
|
85
69
|
}
|
|
86
|
-
var
|
|
87
|
-
var
|
|
88
|
-
function
|
|
70
|
+
var Nn = l;
|
|
71
|
+
var kn = 80;
|
|
72
|
+
function Rt(t, e = {}) {
|
|
89
73
|
if (!t) return "<unknown>";
|
|
90
74
|
try {
|
|
91
|
-
let n = t, r = 5,
|
|
92
|
-
for (; n &&
|
|
93
|
-
return
|
|
75
|
+
let n = t, 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 || kn;
|
|
76
|
+
for (; n && s++ < r && (u = Dn(n, f), !(u === "html" || s > 1 && i + o.length * c + u.length >= p)); ) o.push(u), i += u.length, n = n.parentNode;
|
|
77
|
+
return o.reverse().join(a);
|
|
94
78
|
} catch {
|
|
95
79
|
return "<unknown>";
|
|
96
80
|
}
|
|
97
81
|
}
|
|
98
|
-
function
|
|
99
|
-
let n = t, r = [], s, i,
|
|
82
|
+
function Dn(t, e) {
|
|
83
|
+
let n = t, r = [], o, s, i, a, c;
|
|
100
84
|
if (!n || !n.tagName) return "";
|
|
85
|
+
if (Nn.HTMLElement && n instanceof HTMLElement && n.dataset) {
|
|
86
|
+
if (n.dataset.sentryComponent) return n.dataset.sentryComponent;
|
|
87
|
+
if (n.dataset.sentryElement) return n.dataset.sentryElement;
|
|
88
|
+
}
|
|
101
89
|
r.push(n.tagName.toLowerCase());
|
|
102
|
-
let u = e && e.length ? e.filter((
|
|
103
|
-
if (u && u.length) u.forEach((
|
|
104
|
-
r.push(`[${
|
|
90
|
+
let u = e && e.length ? e.filter((p) => n.getAttribute(p)).map((p) => [p, n.getAttribute(p)]) : null;
|
|
91
|
+
if (u && u.length) u.forEach((p) => {
|
|
92
|
+
r.push(`[${p[0]}="${p[1]}"]`);
|
|
105
93
|
});
|
|
106
|
-
else if (n.id && r.push(`#${n.id}`),
|
|
94
|
+
else if (n.id && r.push(`#${n.id}`), o = n.className, o && Be(o)) for (s = o.split(/\s+/), c = 0; c < s.length; c++) r.push(`.${s[c]}`);
|
|
107
95
|
let f = ["aria-label", "type", "name", "title", "alt"];
|
|
108
|
-
for (c = 0; c < f.length; c++)
|
|
96
|
+
for (c = 0; c < f.length; c++) i = f[c], a = n.getAttribute(i), a && r.push(`[${i}="${a}"]`);
|
|
109
97
|
return r.join("");
|
|
110
98
|
}
|
|
111
|
-
var
|
|
112
|
-
var
|
|
113
|
-
var
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
r.
|
|
118
|
-
|
|
119
|
-
|
|
99
|
+
var v = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
|
|
100
|
+
var vn = "Sentry Logger ";
|
|
101
|
+
var qe = ["debug", "info", "warn", "error", "log", "assert", "trace"];
|
|
102
|
+
var ze = {};
|
|
103
|
+
function le(t) {
|
|
104
|
+
if (!("console" in l)) return t();
|
|
105
|
+
let e = l.console, n = {}, r = Object.keys(ze);
|
|
106
|
+
r.forEach((o) => {
|
|
107
|
+
let s = ze[o];
|
|
108
|
+
n[o] = e[o], e[o] = s;
|
|
120
109
|
});
|
|
121
110
|
try {
|
|
122
111
|
return t();
|
|
123
112
|
} finally {
|
|
124
|
-
r.forEach((
|
|
125
|
-
e[
|
|
113
|
+
r.forEach((o) => {
|
|
114
|
+
e[o] = n[o];
|
|
126
115
|
});
|
|
127
116
|
}
|
|
128
117
|
}
|
|
129
|
-
function
|
|
118
|
+
function Mn() {
|
|
130
119
|
let t = false, e = { enable: () => {
|
|
131
120
|
t = true;
|
|
132
121
|
}, disable: () => {
|
|
133
122
|
t = false;
|
|
134
123
|
}, isEnabled: () => t };
|
|
135
|
-
return
|
|
124
|
+
return v ? qe.forEach((n) => {
|
|
136
125
|
e[n] = (...r) => {
|
|
137
|
-
t &&
|
|
138
|
-
|
|
126
|
+
t && le(() => {
|
|
127
|
+
l.console[n](`${vn}[${n}]:`, ...r);
|
|
139
128
|
});
|
|
140
129
|
};
|
|
141
|
-
}) :
|
|
130
|
+
}) : qe.forEach((n) => {
|
|
142
131
|
e[n] = () => {
|
|
143
132
|
};
|
|
144
133
|
}), e;
|
|
145
134
|
}
|
|
146
|
-
var
|
|
147
|
-
var
|
|
148
|
-
function
|
|
135
|
+
var d = Mn();
|
|
136
|
+
var Pn = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
|
|
137
|
+
function wn(t) {
|
|
149
138
|
return t === "http" || t === "https";
|
|
150
139
|
}
|
|
151
|
-
function
|
|
152
|
-
let { host: n, path: r, pass:
|
|
153
|
-
return `${a}://${c}${e &&
|
|
140
|
+
function M(t, e = false) {
|
|
141
|
+
let { host: n, path: r, pass: o, port: s, projectId: i, protocol: a, publicKey: c } = t;
|
|
142
|
+
return `${a}://${c}${e && o ? `:${o}` : ""}@${n}${s ? `:${s}` : ""}/${r && `${r}/`}${i}`;
|
|
154
143
|
}
|
|
155
|
-
function
|
|
156
|
-
let e =
|
|
144
|
+
function Ct(t) {
|
|
145
|
+
let e = Pn.exec(t);
|
|
157
146
|
if (!e) {
|
|
158
|
-
|
|
147
|
+
le(() => {
|
|
148
|
+
console.error(`Invalid Sentry Dsn: ${t}`);
|
|
149
|
+
});
|
|
159
150
|
return;
|
|
160
151
|
}
|
|
161
|
-
let [n, r,
|
|
152
|
+
let [n, r, o = "", s, i = "", a] = e.slice(1), c = "", u = a, f = u.split("/");
|
|
162
153
|
if (f.length > 1 && (c = f.slice(0, -1).join("/"), u = f.pop()), u) {
|
|
163
|
-
let
|
|
164
|
-
|
|
154
|
+
let p = u.match(/^\d+/);
|
|
155
|
+
p && (u = p[0]);
|
|
165
156
|
}
|
|
166
|
-
return Ot({ host:
|
|
157
|
+
return Ot({ host: s, pass: o, path: c, projectId: u, port: i, protocol: n, publicKey: r });
|
|
167
158
|
}
|
|
168
159
|
function Ot(t) {
|
|
169
160
|
return { protocol: t.protocol, publicKey: t.publicKey || "", pass: t.pass || "", host: t.host, port: t.port || "", path: t.path || "", projectId: t.projectId };
|
|
170
161
|
}
|
|
171
|
-
function
|
|
172
|
-
if (!
|
|
162
|
+
function Fn(t) {
|
|
163
|
+
if (!v) return true;
|
|
173
164
|
let { port: e, projectId: n, protocol: r } = t;
|
|
174
|
-
return ["protocol", "publicKey", "host", "projectId"].find((
|
|
165
|
+
return ["protocol", "publicKey", "host", "projectId"].find((i) => t[i] ? false : (d.error(`Invalid Sentry Dsn: ${i} missing`), true)) ? false : n.match(/^\d+$/) ? wn(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);
|
|
175
166
|
}
|
|
176
|
-
function
|
|
177
|
-
let e = typeof t == "string" ?
|
|
178
|
-
if (!(!e ||
|
|
167
|
+
function me(t) {
|
|
168
|
+
let e = typeof t == "string" ? Ct(t) : Ot(t);
|
|
169
|
+
if (!(!e || !Fn(e))) return e;
|
|
179
170
|
}
|
|
180
|
-
var
|
|
171
|
+
var T = class extends Error {
|
|
181
172
|
constructor(e, n = "warn") {
|
|
182
173
|
super(e), this.message = e, this.name = new.target.prototype.constructor.name, Object.setPrototypeOf(this, new.target.prototype), this.logLevel = n;
|
|
183
174
|
}
|
|
184
175
|
};
|
|
185
|
-
function
|
|
186
|
-
if (!(e in t)) return;
|
|
187
|
-
let r = t[e], s = n(r);
|
|
188
|
-
typeof s == "function" && vt(s, r), t[e] = s;
|
|
189
|
-
}
|
|
190
|
-
function q(t, e, n) {
|
|
176
|
+
function U(t, e, n) {
|
|
191
177
|
try {
|
|
192
178
|
Object.defineProperty(t, e, { value: n, writable: true, configurable: true });
|
|
193
179
|
} catch {
|
|
194
|
-
|
|
180
|
+
v && d.log(`Failed to add non-enumerable property "${e}" to object`, t);
|
|
195
181
|
}
|
|
196
182
|
}
|
|
197
|
-
function
|
|
198
|
-
try {
|
|
199
|
-
let n = e.prototype || {};
|
|
200
|
-
t.prototype = e.prototype = n, q(t, "__sentry_original__", e);
|
|
201
|
-
} catch {
|
|
202
|
-
}
|
|
203
|
-
}
|
|
204
|
-
function ze(t) {
|
|
183
|
+
function Je(t) {
|
|
205
184
|
return Object.keys(t).map((e) => `${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&");
|
|
206
185
|
}
|
|
207
186
|
function ge(t) {
|
|
208
|
-
if (
|
|
187
|
+
if (L(t)) return { message: t.message, name: t.name, stack: t.stack, ...kt(t) };
|
|
209
188
|
if ($e(t)) {
|
|
210
|
-
let e = { type: t.type, target:
|
|
189
|
+
let e = { type: t.type, target: Nt(t.target), currentTarget: Nt(t.currentTarget), ...kt(t) };
|
|
211
190
|
return typeof CustomEvent < "u" && O(t, CustomEvent) && (e.detail = t.detail), e;
|
|
212
191
|
} else return t;
|
|
213
192
|
}
|
|
214
|
-
function
|
|
193
|
+
function Nt(t) {
|
|
215
194
|
try {
|
|
216
|
-
return je(t) ?
|
|
195
|
+
return je(t) ? Rt(t) : Object.prototype.toString.call(t);
|
|
217
196
|
} catch {
|
|
218
197
|
return "<unknown>";
|
|
219
198
|
}
|
|
220
199
|
}
|
|
221
|
-
function
|
|
200
|
+
function kt(t) {
|
|
222
201
|
if (typeof t == "object" && t !== null) {
|
|
223
202
|
let e = {};
|
|
224
203
|
for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
225
204
|
return e;
|
|
226
205
|
} else return {};
|
|
227
206
|
}
|
|
228
|
-
function
|
|
207
|
+
function V(t, e = 40) {
|
|
229
208
|
let n = Object.keys(ge(t));
|
|
230
209
|
if (n.sort(), !n.length) return "[object has no keys]";
|
|
231
|
-
if (n[0].length >= e) return
|
|
210
|
+
if (n[0].length >= e) return k(n[0], e);
|
|
232
211
|
for (let r = n.length; r > 0; r--) {
|
|
233
|
-
let
|
|
234
|
-
if (!(
|
|
212
|
+
let o = n.slice(0, r).join(", ");
|
|
213
|
+
if (!(o.length > e)) return r === n.length ? o : k(o, e);
|
|
235
214
|
}
|
|
236
215
|
return "";
|
|
237
216
|
}
|
|
238
|
-
function
|
|
239
|
-
return
|
|
217
|
+
function E(t) {
|
|
218
|
+
return Ye(t, /* @__PURE__ */ new Map());
|
|
240
219
|
}
|
|
241
|
-
function
|
|
242
|
-
if (
|
|
220
|
+
function Ye(t, e) {
|
|
221
|
+
if (Ln(t)) {
|
|
243
222
|
let n = e.get(t);
|
|
244
223
|
if (n !== void 0) return n;
|
|
245
224
|
let r = {};
|
|
246
225
|
e.set(t, r);
|
|
247
|
-
for (let
|
|
226
|
+
for (let o of Object.keys(t)) typeof t[o] < "u" && (r[o] = Ye(t[o], e));
|
|
248
227
|
return r;
|
|
249
228
|
}
|
|
250
229
|
if (Array.isArray(t)) {
|
|
251
230
|
let n = e.get(t);
|
|
252
231
|
if (n !== void 0) return n;
|
|
253
232
|
let r = [];
|
|
254
|
-
return e.set(t, r), t.forEach((
|
|
255
|
-
r.push(
|
|
233
|
+
return e.set(t, r), t.forEach((o) => {
|
|
234
|
+
r.push(Ye(o, e));
|
|
256
235
|
}), r;
|
|
257
236
|
}
|
|
258
237
|
return t;
|
|
259
238
|
}
|
|
260
|
-
function
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
let i, o, a, c, u;
|
|
269
|
-
if (s[1]) {
|
|
270
|
-
a = s[1];
|
|
271
|
-
let l = a.lastIndexOf(".");
|
|
272
|
-
if (a[l - 1] === "." && l--, l > 0) {
|
|
273
|
-
i = a.slice(0, l), o = a.slice(l + 1);
|
|
274
|
-
let _ = i.indexOf(".Module");
|
|
275
|
-
_ > 0 && (a = a.slice(_ + 1), i = i.slice(0, _));
|
|
276
|
-
}
|
|
277
|
-
c = void 0;
|
|
278
|
-
}
|
|
279
|
-
o && (c = i, u = o), o === "<anonymous>" && (u = void 0, a = void 0), a === void 0 && (u = u || "<anonymous>", a = c ? `${c}.${u}` : u);
|
|
280
|
-
let f = s[2] && s[2].startsWith("file://") ? s[2].slice(7) : s[2], d = s[5] === "native";
|
|
281
|
-
return !f && s[5] && !d && (f = s[5]), { filename: f, module: t ? t(f) : void 0, function: a, lineno: parseInt(s[3], 10) || void 0, colno: parseInt(s[4], 10) || void 0, in_app: jn(f, d) };
|
|
282
|
-
}
|
|
283
|
-
if (r.match(e)) return { filename: r };
|
|
284
|
-
};
|
|
239
|
+
function Ln(t) {
|
|
240
|
+
if (!b(t)) return false;
|
|
241
|
+
try {
|
|
242
|
+
let e = Object.getPrototypeOf(t).constructor.name;
|
|
243
|
+
return !e || e === "Object";
|
|
244
|
+
} catch {
|
|
245
|
+
return true;
|
|
246
|
+
}
|
|
285
247
|
}
|
|
286
|
-
var
|
|
287
|
-
var
|
|
288
|
-
var
|
|
289
|
-
function
|
|
248
|
+
var he = "?";
|
|
249
|
+
var Dt = /\(error: (.*)\)/;
|
|
250
|
+
var vt = /captureMessage|captureException/;
|
|
251
|
+
function _e(...t) {
|
|
290
252
|
let e = t.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
|
|
291
|
-
return (n, r = 0) => {
|
|
253
|
+
return (n, r = 0, o = 0) => {
|
|
292
254
|
let s = [], i = n.split(`
|
|
293
255
|
`);
|
|
294
|
-
for (let
|
|
295
|
-
let
|
|
296
|
-
if (
|
|
297
|
-
let
|
|
298
|
-
if (!
|
|
299
|
-
for (let
|
|
300
|
-
let
|
|
301
|
-
if (
|
|
302
|
-
s.push(
|
|
256
|
+
for (let a = r; a < i.length; a++) {
|
|
257
|
+
let c = i[a];
|
|
258
|
+
if (c.length > 1024) continue;
|
|
259
|
+
let u = Dt.test(c) ? c.replace(Dt, "$1") : c;
|
|
260
|
+
if (!u.match(/\S*Error: /)) {
|
|
261
|
+
for (let f of e) {
|
|
262
|
+
let p = f(u);
|
|
263
|
+
if (p) {
|
|
264
|
+
s.push(p);
|
|
303
265
|
break;
|
|
304
266
|
}
|
|
305
267
|
}
|
|
306
|
-
if (s.length >=
|
|
268
|
+
if (s.length >= 50 + o) break;
|
|
307
269
|
}
|
|
308
270
|
}
|
|
309
|
-
return
|
|
271
|
+
return Mt(s.slice(o));
|
|
310
272
|
};
|
|
311
273
|
}
|
|
312
|
-
function
|
|
313
|
-
return Array.isArray(t) ?
|
|
274
|
+
function Ke(t) {
|
|
275
|
+
return Array.isArray(t) ? _e(...t) : t;
|
|
314
276
|
}
|
|
315
|
-
function
|
|
277
|
+
function Mt(t) {
|
|
316
278
|
if (!t.length) return [];
|
|
317
279
|
let e = Array.from(t);
|
|
318
|
-
return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(),
|
|
319
|
-
}
|
|
320
|
-
var Ke = "<anonymous>";
|
|
321
|
-
function ne(t) {
|
|
322
|
-
try {
|
|
323
|
-
return !t || typeof t != "function" ? Ke : t.name || Ke;
|
|
324
|
-
} catch {
|
|
325
|
-
return Ke;
|
|
326
|
-
}
|
|
327
|
-
}
|
|
328
|
-
function Je(t) {
|
|
329
|
-
return [90, Ct(t)];
|
|
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 || he }));
|
|
330
281
|
}
|
|
331
|
-
var
|
|
332
|
-
function
|
|
333
|
-
if (!("fetch" in Xe)) return false;
|
|
282
|
+
var We = "<anonymous>";
|
|
283
|
+
function X(t) {
|
|
334
284
|
try {
|
|
335
|
-
return
|
|
285
|
+
return !t || typeof t != "function" ? We : t.name || We;
|
|
336
286
|
} catch {
|
|
337
|
-
return
|
|
287
|
+
return We;
|
|
338
288
|
}
|
|
339
289
|
}
|
|
340
|
-
|
|
341
|
-
|
|
290
|
+
var Ee = {};
|
|
291
|
+
var Pt = {};
|
|
292
|
+
function Se(t, e) {
|
|
293
|
+
Ee[t] = Ee[t] || [], Ee[t].push(e);
|
|
342
294
|
}
|
|
343
|
-
function
|
|
344
|
-
|
|
345
|
-
if (Ft(Xe.fetch)) return true;
|
|
346
|
-
let t = false, e = Xe.document;
|
|
347
|
-
if (e && typeof e.createElement == "function") try {
|
|
348
|
-
let n = e.createElement("iframe");
|
|
349
|
-
n.hidden = true, e.head.appendChild(n), n.contentWindow && n.contentWindow.fetch && (t = Ft(n.contentWindow.fetch)), e.head.removeChild(n);
|
|
350
|
-
} catch (n) {
|
|
351
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", n);
|
|
352
|
-
}
|
|
353
|
-
return t;
|
|
354
|
-
}
|
|
355
|
-
var Se = x();
|
|
356
|
-
function Lt() {
|
|
357
|
-
let t = Se.chrome, e = t && t.app && t.app.runtime, n = "history" in Se && !!Se.history.pushState && !!Se.history.replaceState;
|
|
358
|
-
return !e && n;
|
|
295
|
+
function ye(t, e) {
|
|
296
|
+
Pt[t] || (e(), Pt[t] = true);
|
|
359
297
|
}
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
case "console":
|
|
367
|
-
Wn();
|
|
368
|
-
break;
|
|
369
|
-
case "dom":
|
|
370
|
-
zt();
|
|
371
|
-
break;
|
|
372
|
-
case "xhr":
|
|
373
|
-
Wt();
|
|
374
|
-
break;
|
|
375
|
-
case "fetch":
|
|
376
|
-
zn();
|
|
377
|
-
break;
|
|
378
|
-
case "history":
|
|
379
|
-
Kn();
|
|
380
|
-
break;
|
|
381
|
-
case "error":
|
|
382
|
-
Zn();
|
|
383
|
-
break;
|
|
384
|
-
case "unhandledrejection":
|
|
385
|
-
Qn();
|
|
386
|
-
break;
|
|
387
|
-
default:
|
|
388
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("unknown instrumentation type:", t);
|
|
389
|
-
return;
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
function Ie(t, e) {
|
|
393
|
-
se[t] = se[t] || [], se[t].push(e), qn(t);
|
|
394
|
-
}
|
|
395
|
-
function N(t, e) {
|
|
396
|
-
if (!(!t || !se[t])) for (let n of se[t] || []) try {
|
|
397
|
-
n(e);
|
|
398
|
-
} catch (r) {
|
|
399
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.error(`Error while triggering instrumentation handler.
|
|
298
|
+
function Te(t, e) {
|
|
299
|
+
let n = t && Ee[t];
|
|
300
|
+
if (n) for (let r of n) try {
|
|
301
|
+
r(e);
|
|
302
|
+
} catch (o) {
|
|
303
|
+
v && d.error(`Error while triggering instrumentation handler.
|
|
400
304
|
Type: ${t}
|
|
401
|
-
Name: ${
|
|
402
|
-
Error:`,
|
|
403
|
-
}
|
|
404
|
-
}
|
|
405
|
-
function Wn() {
|
|
406
|
-
"console" in m && ee.forEach(function(t) {
|
|
407
|
-
t in m.console && I(m.console, t, function(e) {
|
|
408
|
-
return H[t] = e, function(...n) {
|
|
409
|
-
N("console", { args: n, level: t });
|
|
410
|
-
let r = H[t];
|
|
411
|
-
r && r.apply(m.console, n);
|
|
412
|
-
};
|
|
413
|
-
});
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
function zn() {
|
|
417
|
-
Bt() && I(m, "fetch", function(t) {
|
|
418
|
-
return function(...e) {
|
|
419
|
-
let { method: n, url: r } = qt(e), s = { args: e, fetchData: { method: n, url: r }, startTimestamp: Date.now() };
|
|
420
|
-
return N("fetch", { ...s }), t.apply(m, e).then((i) => (N("fetch", { ...s, endTimestamp: Date.now(), response: i }), i), (i) => {
|
|
421
|
-
throw N("fetch", { ...s, endTimestamp: Date.now(), error: i }), i;
|
|
422
|
-
});
|
|
423
|
-
};
|
|
424
|
-
});
|
|
425
|
-
}
|
|
426
|
-
function Ze(t, e) {
|
|
427
|
-
return !!t && typeof t == "object" && !!t[e];
|
|
428
|
-
}
|
|
429
|
-
function $t(t) {
|
|
430
|
-
return typeof t == "string" ? t : t ? Ze(t, "url") ? t.url : t.toString ? t.toString() : "" : "";
|
|
431
|
-
}
|
|
432
|
-
function qt(t) {
|
|
433
|
-
if (t.length === 0) return { method: "GET", url: "" };
|
|
434
|
-
if (t.length === 2) {
|
|
435
|
-
let [n, r] = t;
|
|
436
|
-
return { url: $t(n), method: Ze(r, "method") ? String(r.method).toUpperCase() : "GET" };
|
|
305
|
+
Name: ${X(r)}
|
|
306
|
+
Error:`, o);
|
|
437
307
|
}
|
|
438
|
-
let e = t[0];
|
|
439
|
-
return { url: $t(e), method: Ze(e, "method") ? String(e.method).toUpperCase() : "GET" };
|
|
440
308
|
}
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
I(t, "open", function(e) {
|
|
445
|
-
return function(...n) {
|
|
446
|
-
let r = Date.now(), s = n[1], i = this[re] = { method: j(n[0]) ? n[0].toUpperCase() : n[0], url: n[1], request_headers: {} };
|
|
447
|
-
j(s) && i.method === "POST" && s.match(/sentry_key/) && (this.__sentry_own_request__ = true);
|
|
448
|
-
let o = () => {
|
|
449
|
-
let a = this[re];
|
|
450
|
-
if (a && this.readyState === 4) {
|
|
451
|
-
try {
|
|
452
|
-
a.status_code = this.status;
|
|
453
|
-
} catch {
|
|
454
|
-
}
|
|
455
|
-
N("xhr", { args: n, endTimestamp: Date.now(), startTimestamp: r, xhr: this });
|
|
456
|
-
}
|
|
457
|
-
};
|
|
458
|
-
return "onreadystatechange" in this && typeof this.onreadystatechange == "function" ? I(this, "onreadystatechange", function(a) {
|
|
459
|
-
return function(...c) {
|
|
460
|
-
return o(), a.apply(this, c);
|
|
461
|
-
};
|
|
462
|
-
}) : this.addEventListener("readystatechange", o), I(this, "setRequestHeader", function(a) {
|
|
463
|
-
return function(...c) {
|
|
464
|
-
let [u, f] = c, d = this[re];
|
|
465
|
-
return d && (d.request_headers[u.toLowerCase()] = f), a.apply(this, c);
|
|
466
|
-
};
|
|
467
|
-
}), e.apply(this, n);
|
|
468
|
-
};
|
|
469
|
-
}), I(t, "send", function(e) {
|
|
470
|
-
return function(...n) {
|
|
471
|
-
let r = this[re];
|
|
472
|
-
return r && n[0] !== void 0 && (r.body = n[0]), N("xhr", { args: n, startTimestamp: Date.now(), xhr: this }), e.apply(this, n);
|
|
473
|
-
};
|
|
474
|
-
});
|
|
309
|
+
var wt = 1e3;
|
|
310
|
+
function z() {
|
|
311
|
+
return Date.now() / wt;
|
|
475
312
|
}
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
if (!
|
|
479
|
-
let t =
|
|
480
|
-
|
|
481
|
-
let r = E.location.href, s = ye;
|
|
482
|
-
if (ye = r, N("history", { from: s, to: r }), t) try {
|
|
483
|
-
return t.apply(this, n);
|
|
484
|
-
} catch {
|
|
485
|
-
}
|
|
486
|
-
};
|
|
487
|
-
function e(n) {
|
|
488
|
-
return function(...r) {
|
|
489
|
-
let s = r.length > 2 ? r[2] : void 0;
|
|
490
|
-
if (s) {
|
|
491
|
-
let i = ye, o = String(s);
|
|
492
|
-
ye = o, N("history", { from: i, to: o });
|
|
493
|
-
}
|
|
494
|
-
return n.apply(this, r);
|
|
495
|
-
};
|
|
496
|
-
}
|
|
497
|
-
I(E.history, "pushState", e), I(E.history, "replaceState", e);
|
|
498
|
-
}
|
|
499
|
-
var Vn = 1e3;
|
|
500
|
-
var jt;
|
|
501
|
-
var Te;
|
|
502
|
-
function Jn(t, e) {
|
|
503
|
-
if (t.type !== e.type) return false;
|
|
504
|
-
try {
|
|
505
|
-
if (t.target !== e.target) return false;
|
|
506
|
-
} catch {
|
|
507
|
-
}
|
|
508
|
-
return true;
|
|
313
|
+
function Un() {
|
|
314
|
+
let { performance: t } = l;
|
|
315
|
+
if (!t || !t.now) return z;
|
|
316
|
+
let e = Date.now() - t.now(), n = t.timeOrigin == null ? e : t.timeOrigin;
|
|
317
|
+
return () => (n + t.now()) / wt;
|
|
509
318
|
}
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
319
|
+
var Q = Un();
|
|
320
|
+
var Z;
|
|
321
|
+
var Bn = (() => {
|
|
322
|
+
let { performance: t } = l;
|
|
323
|
+
if (!t || !t.now) {
|
|
324
|
+
Z = "none";
|
|
325
|
+
return;
|
|
517
326
|
}
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
(Te === void 0 || !Jn(Te, n)) && (t({ event: n, name: r, global: e }), Te = n), clearTimeout(jt), jt = E.setTimeout(() => {
|
|
526
|
-
Te = void 0;
|
|
527
|
-
}, Vn);
|
|
528
|
-
};
|
|
529
|
-
}
|
|
530
|
-
function zt() {
|
|
531
|
-
if (!E.document) return;
|
|
532
|
-
let t = N.bind(null, "dom"), e = Ht(t, true);
|
|
533
|
-
E.document.addEventListener("click", e, false), E.document.addEventListener("keypress", e, false), ["EventTarget", "Node"].forEach((n) => {
|
|
534
|
-
let r = E[n] && E[n].prototype;
|
|
535
|
-
!r || !r.hasOwnProperty || !r.hasOwnProperty("addEventListener") || (I(r, "addEventListener", function(s) {
|
|
536
|
-
return function(i, o, a) {
|
|
537
|
-
if (i === "click" || i == "keypress") try {
|
|
538
|
-
let c = this, u = c.__sentry_instrumentation_handlers__ = c.__sentry_instrumentation_handlers__ || {}, f = u[i] = u[i] || { refCount: 0 };
|
|
539
|
-
if (!f.handler) {
|
|
540
|
-
let d = Ht(t);
|
|
541
|
-
f.handler = d, s.call(this, i, d, a);
|
|
542
|
-
}
|
|
543
|
-
f.refCount++;
|
|
544
|
-
} catch {
|
|
545
|
-
}
|
|
546
|
-
return s.call(this, i, o, a);
|
|
547
|
-
};
|
|
548
|
-
}), I(r, "removeEventListener", function(s) {
|
|
549
|
-
return function(i, o, a) {
|
|
550
|
-
if (i === "click" || i == "keypress") try {
|
|
551
|
-
let c = this, u = c.__sentry_instrumentation_handlers__ || {}, f = u[i];
|
|
552
|
-
f && (f.refCount--, f.refCount <= 0 && (s.call(this, i, f.handler, a), f.handler = void 0, delete u[i]), Object.keys(u).length === 0 && delete c.__sentry_instrumentation_handlers__);
|
|
553
|
-
} catch {
|
|
554
|
-
}
|
|
555
|
-
return s.call(this, i, o, a);
|
|
556
|
-
};
|
|
557
|
-
}));
|
|
558
|
-
});
|
|
559
|
-
}
|
|
560
|
-
var be = null;
|
|
561
|
-
function Zn() {
|
|
562
|
-
be = E.onerror, E.onerror = function(t, e, n, r, s) {
|
|
563
|
-
return N("error", { column: r, error: s, line: n, msg: t, url: e }), be && !be.__SENTRY_LOADER__ ? be.apply(this, arguments) : false;
|
|
564
|
-
}, E.onerror.__SENTRY_INSTRUMENTED__ = true;
|
|
565
|
-
}
|
|
566
|
-
var Re = null;
|
|
567
|
-
function Qn() {
|
|
568
|
-
Re = E.onunhandledrejection, E.onunhandledrejection = function(t) {
|
|
569
|
-
return N("unhandledrejection", t), Re && !Re.__SENTRY_LOADER__ ? Re.apply(this, arguments) : true;
|
|
570
|
-
}, E.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
|
|
327
|
+
let e = 3600 * 1e3, n = t.now(), r = Date.now(), o = t.timeOrigin ? Math.abs(t.timeOrigin + n - r) : e, s = o < e, i = t.timing && t.timing.navigationStart, c = typeof i == "number" ? Math.abs(i + n - r) : e, u = c < e;
|
|
328
|
+
return s || u ? o <= c ? (Z = "timeOrigin", t.timeOrigin) : (Z = "navigationStart", i) : (Z = "dateNow", r);
|
|
329
|
+
})();
|
|
330
|
+
var Ie = null;
|
|
331
|
+
function Ve(t) {
|
|
332
|
+
let e = "error";
|
|
333
|
+
Se(e, t), ye(e, $n);
|
|
571
334
|
}
|
|
572
|
-
function
|
|
573
|
-
|
|
335
|
+
function $n() {
|
|
336
|
+
Ie = l.onerror, l.onerror = function(t, e, n, r, o) {
|
|
337
|
+
return Te("error", { column: r, error: o, line: n, msg: t, url: e }), Ie && !Ie.__SENTRY_LOADER__ ? Ie.apply(this, arguments) : false;
|
|
338
|
+
}, l.onerror.__SENTRY_INSTRUMENTED__ = true;
|
|
574
339
|
}
|
|
575
|
-
|
|
576
|
-
|
|
340
|
+
var xe = null;
|
|
341
|
+
function Xe(t) {
|
|
342
|
+
let e = "unhandledrejection";
|
|
343
|
+
Se(e, t), ye(e, jn);
|
|
577
344
|
}
|
|
578
|
-
function
|
|
579
|
-
|
|
345
|
+
function jn() {
|
|
346
|
+
xe = l.onunhandledrejection, l.onunhandledrejection = function(t) {
|
|
347
|
+
return Te("unhandledrejection", t), xe && !xe.__SENTRY_LOADER__ ? xe.apply(this, arguments) : true;
|
|
348
|
+
}, l.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
|
|
580
349
|
}
|
|
581
|
-
function
|
|
350
|
+
function Ft() {
|
|
582
351
|
let t = typeof WeakSet == "function", e = t ? /* @__PURE__ */ new WeakSet() : [];
|
|
583
|
-
function n(
|
|
584
|
-
if (t) return e.has(
|
|
585
|
-
for (let
|
|
586
|
-
return e.push(
|
|
587
|
-
}
|
|
588
|
-
function r(
|
|
589
|
-
if (t) e.delete(
|
|
590
|
-
else for (let
|
|
591
|
-
e.splice(
|
|
352
|
+
function n(o) {
|
|
353
|
+
if (t) return e.has(o) ? true : (e.add(o), false);
|
|
354
|
+
for (let s = 0; s < e.length; s++) if (e[s] === o) return true;
|
|
355
|
+
return e.push(o), false;
|
|
356
|
+
}
|
|
357
|
+
function r(o) {
|
|
358
|
+
if (t) e.delete(o);
|
|
359
|
+
else for (let s = 0; s < e.length; s++) if (e[s] === o) {
|
|
360
|
+
e.splice(s, 1);
|
|
592
361
|
break;
|
|
593
362
|
}
|
|
594
363
|
}
|
|
595
364
|
return [n, r];
|
|
596
365
|
}
|
|
597
|
-
function
|
|
598
|
-
let t =
|
|
366
|
+
function S() {
|
|
367
|
+
let t = l, e = t.crypto || t.msCrypto, n = () => Math.random() * 16;
|
|
599
368
|
try {
|
|
600
369
|
if (e && e.randomUUID) return e.randomUUID().replace(/-/g, "");
|
|
601
|
-
e && e.getRandomValues && (n = () =>
|
|
370
|
+
e && e.getRandomValues && (n = () => {
|
|
371
|
+
let r = new Uint8Array(1);
|
|
372
|
+
return e.getRandomValues(r), r[0];
|
|
373
|
+
});
|
|
602
374
|
} catch {
|
|
603
375
|
}
|
|
604
376
|
return ("10000000100040008000" + 1e11).replace(/[018]/g, (r) => (r ^ (n() & 15) >> r / 4).toString(16));
|
|
605
377
|
}
|
|
606
|
-
function
|
|
378
|
+
function Gn(t) {
|
|
607
379
|
return t.exception && t.exception.values ? t.exception.values[0] : void 0;
|
|
608
380
|
}
|
|
609
|
-
function
|
|
610
|
-
let r = t.exception = t.exception || {},
|
|
611
|
-
|
|
381
|
+
function ee(t, e, n) {
|
|
382
|
+
let r = t.exception = t.exception || {}, o = r.values = r.values || [], s = o[0] = o[0] || {};
|
|
383
|
+
s.value || (s.value = e || ""), s.type || (s.type = n || "Error");
|
|
612
384
|
}
|
|
613
|
-
function
|
|
614
|
-
let n =
|
|
385
|
+
function B(t, e) {
|
|
386
|
+
let n = Gn(t);
|
|
615
387
|
if (!n) return;
|
|
616
|
-
let r = { type: "generic", handled: true },
|
|
617
|
-
if (n.mechanism = { ...r, ...
|
|
618
|
-
let
|
|
619
|
-
n.mechanism.data =
|
|
388
|
+
let r = { type: "generic", handled: true }, o = n.mechanism;
|
|
389
|
+
if (n.mechanism = { ...r, ...o, ...e }, e && "data" in e) {
|
|
390
|
+
let s = { ...o && o.data, ...e.data };
|
|
391
|
+
n.mechanism.data = s;
|
|
620
392
|
}
|
|
621
393
|
}
|
|
622
|
-
function
|
|
394
|
+
function Ae(t) {
|
|
623
395
|
if (t && t.__sentry_captured__) return true;
|
|
624
396
|
try {
|
|
625
|
-
|
|
397
|
+
U(t, "__sentry_captured__", true);
|
|
626
398
|
} catch {
|
|
627
399
|
}
|
|
628
400
|
return false;
|
|
629
401
|
}
|
|
630
|
-
function
|
|
402
|
+
function te(t) {
|
|
631
403
|
return Array.isArray(t) ? t : [t];
|
|
632
404
|
}
|
|
633
|
-
function
|
|
405
|
+
function R(t, e = 100, n = 1 / 0) {
|
|
634
406
|
try {
|
|
635
|
-
return
|
|
407
|
+
return Ze("", t, e, n);
|
|
636
408
|
} catch (r) {
|
|
637
409
|
return { ERROR: `**non-serializable** (${r})` };
|
|
638
410
|
}
|
|
639
411
|
}
|
|
640
|
-
function
|
|
641
|
-
let r =
|
|
642
|
-
return
|
|
412
|
+
function Y(t, e = 3, n = 100 * 1024) {
|
|
413
|
+
let r = R(t, e);
|
|
414
|
+
return Yn(r) > n ? Y(t, e - 1, n) : r;
|
|
643
415
|
}
|
|
644
|
-
function
|
|
645
|
-
let [
|
|
646
|
-
if (e == null || ["number", "boolean", "string"].includes(typeof e) && !
|
|
647
|
-
let a =
|
|
416
|
+
function Ze(t, e, n = 1 / 0, r = 1 / 0, o = Ft()) {
|
|
417
|
+
let [s, i] = o;
|
|
418
|
+
if (e == null || ["number", "boolean", "string"].includes(typeof e) && !Number.isNaN(e)) return e;
|
|
419
|
+
let a = Hn(t, e);
|
|
648
420
|
if (!a.startsWith("[object ")) return a;
|
|
649
421
|
if (e.__sentry_skip_normalization__) return e;
|
|
650
422
|
let c = typeof e.__sentry_override_normalization_depth__ == "number" ? e.__sentry_override_normalization_depth__ : n;
|
|
651
423
|
if (c === 0) return a.replace("object ", "");
|
|
652
|
-
if (
|
|
424
|
+
if (s(e)) return "[Circular ~]";
|
|
653
425
|
let u = e;
|
|
654
426
|
if (u && typeof u.toJSON == "function") try {
|
|
655
|
-
let
|
|
656
|
-
return
|
|
427
|
+
let m = u.toJSON();
|
|
428
|
+
return Ze("", m, c - 1, r, o);
|
|
657
429
|
} catch {
|
|
658
430
|
}
|
|
659
|
-
let f = Array.isArray(e) ? [] : {},
|
|
660
|
-
for (let
|
|
661
|
-
if (!Object.prototype.hasOwnProperty.call(
|
|
662
|
-
if (
|
|
663
|
-
f[
|
|
431
|
+
let f = Array.isArray(e) ? [] : {}, p = 0, g = ge(e);
|
|
432
|
+
for (let m in g) {
|
|
433
|
+
if (!Object.prototype.hasOwnProperty.call(g, m)) continue;
|
|
434
|
+
if (p >= r) {
|
|
435
|
+
f[m] = "[MaxProperties ~]";
|
|
664
436
|
break;
|
|
665
437
|
}
|
|
666
|
-
let
|
|
667
|
-
f[
|
|
438
|
+
let h = g[m];
|
|
439
|
+
f[m] = Ze(m, h, c - 1, r, o), p++;
|
|
668
440
|
}
|
|
669
|
-
return
|
|
441
|
+
return i(e), f;
|
|
670
442
|
}
|
|
671
|
-
function
|
|
443
|
+
function Hn(t, e) {
|
|
672
444
|
try {
|
|
673
445
|
if (t === "domain" && e && typeof e == "object" && e._events) return "[Domain]";
|
|
674
446
|
if (t === "domainEmitter") return "[DomainEmitter]";
|
|
675
447
|
if (typeof global < "u" && e === global) return "[Global]";
|
|
676
448
|
if (typeof window < "u" && e === window) return "[Window]";
|
|
677
449
|
if (typeof document < "u" && e === document) return "[Document]";
|
|
678
|
-
if (
|
|
679
|
-
if (
|
|
450
|
+
if (He(e)) return "[VueViewModel]";
|
|
451
|
+
if (Ge(e)) return "[SyntheticEvent]";
|
|
680
452
|
if (typeof e == "number" && e !== e) return "[NaN]";
|
|
681
|
-
if (typeof e == "function") return `[Function: ${
|
|
453
|
+
if (typeof e == "function") return `[Function: ${X(e)}]`;
|
|
682
454
|
if (typeof e == "symbol") return `[${String(e)}]`;
|
|
683
455
|
if (typeof e == "bigint") return `[BigInt: ${String(e)}]`;
|
|
684
|
-
let n =
|
|
456
|
+
let n = qn(e);
|
|
685
457
|
return /^HTML(\w*)Element$/.test(n) ? `[HTMLElement: ${n}]` : `[object ${n}]`;
|
|
686
458
|
} catch (n) {
|
|
687
459
|
return `**non-serializable** (${n})`;
|
|
688
460
|
}
|
|
689
461
|
}
|
|
690
|
-
function
|
|
462
|
+
function qn(t) {
|
|
691
463
|
let e = Object.getPrototypeOf(t);
|
|
692
464
|
return e ? e.constructor.name : "null prototype";
|
|
693
465
|
}
|
|
694
|
-
function
|
|
466
|
+
function zn(t) {
|
|
695
467
|
return ~-encodeURI(t).split(/%..|./).length;
|
|
696
468
|
}
|
|
697
|
-
function
|
|
698
|
-
return
|
|
469
|
+
function Yn(t) {
|
|
470
|
+
return zn(JSON.stringify(t));
|
|
699
471
|
}
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
let
|
|
472
|
+
function Jn(t, e) {
|
|
473
|
+
let n = 0;
|
|
474
|
+
for (let r = t.length - 1; r >= 0; r--) {
|
|
475
|
+
let o = t[r];
|
|
476
|
+
o === "." ? t.splice(r, 1) : o === ".." ? (t.splice(r, 1), n++) : n && (t.splice(r, 1), n--);
|
|
477
|
+
}
|
|
478
|
+
if (e) for (; n--; n) t.unshift("..");
|
|
479
|
+
return t;
|
|
480
|
+
}
|
|
481
|
+
var Wn = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;
|
|
482
|
+
function Kn(t) {
|
|
483
|
+
let e = t.length > 1024 ? `<truncated>${t.slice(-1024)}` : t, n = Wn.exec(e);
|
|
703
484
|
return n ? n.slice(1) : [];
|
|
704
485
|
}
|
|
705
|
-
function Qe(t
|
|
706
|
-
let n =
|
|
486
|
+
function Qe(...t) {
|
|
487
|
+
let e = "", n = false;
|
|
488
|
+
for (let r = t.length - 1; r >= -1 && !n; r--) {
|
|
489
|
+
let o = r >= 0 ? t[r] : "/";
|
|
490
|
+
o && (e = `${o}/${e}`, n = o.charAt(0) === "/");
|
|
491
|
+
}
|
|
492
|
+
return e = Jn(e.split("/").filter((r) => !!r), !n).join("/"), (n ? "/" : "") + e || ".";
|
|
493
|
+
}
|
|
494
|
+
function Lt(t) {
|
|
495
|
+
let e = 0;
|
|
496
|
+
for (; e < t.length && t[e] === ""; e++) ;
|
|
497
|
+
let n = t.length - 1;
|
|
498
|
+
for (; n >= 0 && t[n] === ""; n--) ;
|
|
499
|
+
return e > n ? [] : t.slice(e, n - e + 1);
|
|
500
|
+
}
|
|
501
|
+
function et(t, e) {
|
|
502
|
+
t = Qe(t).slice(1), e = Qe(e).slice(1);
|
|
503
|
+
let n = Lt(t.split("/")), r = Lt(e.split("/")), o = Math.min(n.length, r.length), s = o;
|
|
504
|
+
for (let a = 0; a < o; a++) if (n[a] !== r[a]) {
|
|
505
|
+
s = a;
|
|
506
|
+
break;
|
|
507
|
+
}
|
|
508
|
+
let i = [];
|
|
509
|
+
for (let a = s; a < n.length; a++) i.push("..");
|
|
510
|
+
return i = i.concat(r.slice(s)), i.join("/");
|
|
511
|
+
}
|
|
512
|
+
function ne(t, e) {
|
|
513
|
+
let n = Kn(t)[2];
|
|
707
514
|
return e && n.slice(e.length * -1) === e && (n = n.slice(0, n.length - e.length)), n;
|
|
708
515
|
}
|
|
709
|
-
var
|
|
516
|
+
var N;
|
|
710
517
|
(function(t) {
|
|
711
518
|
t[t.PENDING = 0] = "PENDING";
|
|
712
519
|
let n = 1;
|
|
713
520
|
t[t.RESOLVED = n] = "RESOLVED";
|
|
714
521
|
let r = 2;
|
|
715
522
|
t[t.REJECTED = r] = "REJECTED";
|
|
716
|
-
})(
|
|
717
|
-
function
|
|
718
|
-
return new
|
|
523
|
+
})(N || (N = {}));
|
|
524
|
+
function x(t) {
|
|
525
|
+
return new y((e) => {
|
|
719
526
|
e(t);
|
|
720
527
|
});
|
|
721
528
|
}
|
|
722
|
-
function
|
|
723
|
-
return new
|
|
529
|
+
function $(t) {
|
|
530
|
+
return new y((e, n) => {
|
|
724
531
|
n(t);
|
|
725
532
|
});
|
|
726
533
|
}
|
|
727
|
-
var
|
|
534
|
+
var y = class {
|
|
728
535
|
constructor(e) {
|
|
729
|
-
|
|
536
|
+
y.prototype.__init.call(this), y.prototype.__init2.call(this), y.prototype.__init3.call(this), y.prototype.__init4.call(this), this._state = N.PENDING, this._handlers = [];
|
|
730
537
|
try {
|
|
731
538
|
e(this._resolve, this._reject);
|
|
732
539
|
} catch (n) {
|
|
@@ -734,20 +541,20 @@ var S = class {
|
|
|
734
541
|
}
|
|
735
542
|
}
|
|
736
543
|
then(e, n) {
|
|
737
|
-
return new
|
|
738
|
-
this._handlers.push([false, (
|
|
739
|
-
if (!e) r(
|
|
544
|
+
return new y((r, o) => {
|
|
545
|
+
this._handlers.push([false, (s) => {
|
|
546
|
+
if (!e) r(s);
|
|
740
547
|
else try {
|
|
741
|
-
r(e(
|
|
742
|
-
} catch (
|
|
743
|
-
|
|
548
|
+
r(e(s));
|
|
549
|
+
} catch (i) {
|
|
550
|
+
o(i);
|
|
744
551
|
}
|
|
745
|
-
}, (
|
|
746
|
-
if (!n) s
|
|
552
|
+
}, (s) => {
|
|
553
|
+
if (!n) o(s);
|
|
747
554
|
else try {
|
|
748
|
-
r(n(
|
|
749
|
-
} catch (
|
|
750
|
-
|
|
555
|
+
r(n(s));
|
|
556
|
+
} catch (i) {
|
|
557
|
+
o(i);
|
|
751
558
|
}
|
|
752
559
|
}]), this._executeHandlers();
|
|
753
560
|
});
|
|
@@ -756,35 +563,35 @@ var S = class {
|
|
|
756
563
|
return this.then((n) => n, e);
|
|
757
564
|
}
|
|
758
565
|
finally(e) {
|
|
759
|
-
return new
|
|
760
|
-
let
|
|
761
|
-
return this.then((
|
|
762
|
-
|
|
763
|
-
}, (
|
|
764
|
-
|
|
566
|
+
return new y((n, r) => {
|
|
567
|
+
let o, s;
|
|
568
|
+
return this.then((i) => {
|
|
569
|
+
s = false, o = i, e && e();
|
|
570
|
+
}, (i) => {
|
|
571
|
+
s = true, o = i, e && e();
|
|
765
572
|
}).then(() => {
|
|
766
|
-
if (
|
|
767
|
-
r(
|
|
573
|
+
if (s) {
|
|
574
|
+
r(o);
|
|
768
575
|
return;
|
|
769
576
|
}
|
|
770
|
-
n(
|
|
577
|
+
n(o);
|
|
771
578
|
});
|
|
772
579
|
});
|
|
773
580
|
}
|
|
774
581
|
__init() {
|
|
775
582
|
this._resolve = (e) => {
|
|
776
|
-
this._setResult(
|
|
583
|
+
this._setResult(N.RESOLVED, e);
|
|
777
584
|
};
|
|
778
585
|
}
|
|
779
586
|
__init2() {
|
|
780
587
|
this._reject = (e) => {
|
|
781
|
-
this._setResult(
|
|
588
|
+
this._setResult(N.REJECTED, e);
|
|
782
589
|
};
|
|
783
590
|
}
|
|
784
591
|
__init3() {
|
|
785
592
|
this._setResult = (e, n) => {
|
|
786
|
-
if (this._state ===
|
|
787
|
-
if (
|
|
593
|
+
if (this._state === N.PENDING) {
|
|
594
|
+
if (C(n)) {
|
|
788
595
|
n.then(this._resolve, this._reject);
|
|
789
596
|
return;
|
|
790
597
|
}
|
|
@@ -794,222 +601,227 @@ var S = class {
|
|
|
794
601
|
}
|
|
795
602
|
__init4() {
|
|
796
603
|
this._executeHandlers = () => {
|
|
797
|
-
if (this._state ===
|
|
604
|
+
if (this._state === N.PENDING) return;
|
|
798
605
|
let e = this._handlers.slice();
|
|
799
606
|
this._handlers = [], e.forEach((n) => {
|
|
800
|
-
n[0] || (this._state ===
|
|
607
|
+
n[0] || (this._state === N.RESOLVED && n[1](this._value), this._state === N.REJECTED && n[2](this._value), n[0] = true);
|
|
801
608
|
});
|
|
802
609
|
};
|
|
803
610
|
}
|
|
804
611
|
};
|
|
805
|
-
function
|
|
612
|
+
function tt(t) {
|
|
806
613
|
let e = [];
|
|
807
614
|
function n() {
|
|
808
615
|
return t === void 0 || e.length < t;
|
|
809
616
|
}
|
|
810
|
-
function r(
|
|
811
|
-
return e.splice(e.indexOf(
|
|
617
|
+
function r(i) {
|
|
618
|
+
return e.splice(e.indexOf(i), 1)[0];
|
|
812
619
|
}
|
|
813
|
-
function
|
|
814
|
-
if (!n()) return
|
|
815
|
-
let a =
|
|
620
|
+
function o(i) {
|
|
621
|
+
if (!n()) return $(new T("Not adding Promise because buffer limit was reached."));
|
|
622
|
+
let a = i();
|
|
816
623
|
return e.indexOf(a) === -1 && e.push(a), a.then(() => r(a)).then(null, () => r(a).then(null, () => {
|
|
817
624
|
})), a;
|
|
818
625
|
}
|
|
819
|
-
function i
|
|
820
|
-
return new
|
|
626
|
+
function s(i) {
|
|
627
|
+
return new y((a, c) => {
|
|
821
628
|
let u = e.length;
|
|
822
629
|
if (!u) return a(true);
|
|
823
630
|
let f = setTimeout(() => {
|
|
824
|
-
|
|
825
|
-
},
|
|
826
|
-
e.forEach((
|
|
827
|
-
|
|
631
|
+
i && i > 0 && a(false);
|
|
632
|
+
}, i);
|
|
633
|
+
e.forEach((p) => {
|
|
634
|
+
x(p).then(() => {
|
|
828
635
|
--u || (clearTimeout(f), a(true));
|
|
829
636
|
}, c);
|
|
830
637
|
});
|
|
831
638
|
});
|
|
832
639
|
}
|
|
833
|
-
return { $: e, add:
|
|
640
|
+
return { $: e, add: o, drain: s };
|
|
834
641
|
}
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
function ar() {
|
|
838
|
-
let { performance: t } = Qt;
|
|
839
|
-
if (!t || !t.now) return;
|
|
840
|
-
let e = Date.now() - t.now();
|
|
841
|
-
return { now: () => t.now(), timeOrigin: e };
|
|
642
|
+
function Ut(t, e = false) {
|
|
643
|
+
return !(e || t && !t.startsWith("/") && !t.match(/^[A-Z]:/) && !t.startsWith(".") && !t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)) && t !== void 0 && !t.includes("node_modules/");
|
|
842
644
|
}
|
|
843
|
-
function
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
645
|
+
function Bt(t) {
|
|
646
|
+
let e = /^\s*[-]{4,}$/, n = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
|
|
647
|
+
return (r) => {
|
|
648
|
+
let o = r.match(n);
|
|
649
|
+
if (o) {
|
|
650
|
+
let s, i, a, c, u;
|
|
651
|
+
if (o[1]) {
|
|
652
|
+
a = o[1];
|
|
653
|
+
let g = a.lastIndexOf(".");
|
|
654
|
+
if (a[g - 1] === "." && g--, g > 0) {
|
|
655
|
+
s = a.slice(0, g), i = a.slice(g + 1);
|
|
656
|
+
let m = s.indexOf(".Module");
|
|
657
|
+
m > 0 && (a = a.slice(m + 1), s = s.slice(0, m));
|
|
658
|
+
}
|
|
659
|
+
c = void 0;
|
|
660
|
+
}
|
|
661
|
+
i && (c = s, u = i), i === "<anonymous>" && (u = void 0, a = void 0), a === void 0 && (u = u || he, a = c ? `${c}.${u}` : u);
|
|
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: t ? t(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
|
+
}
|
|
665
|
+
if (r.match(e)) return { filename: r };
|
|
666
|
+
};
|
|
849
667
|
}
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
var B = nt.nowSeconds.bind(nt);
|
|
853
|
-
var L = Zt.nowSeconds.bind(Zt);
|
|
854
|
-
var ce;
|
|
855
|
-
var ur = (() => {
|
|
856
|
-
let { performance: t } = Qt;
|
|
857
|
-
if (!t || !t.now) {
|
|
858
|
-
ce = "none";
|
|
859
|
-
return;
|
|
860
|
-
}
|
|
861
|
-
let e = 3600 * 1e3, n = t.now(), r = Date.now(), s = t.timeOrigin ? Math.abs(t.timeOrigin + n - r) : e, i = s < e, o = t.timing && t.timing.navigationStart, c = typeof o == "number" ? Math.abs(o + n - r) : e, u = c < e;
|
|
862
|
-
return i || u ? s <= c ? (ce = "timeOrigin", t.timeOrigin) : (ce = "navigationStart", o) : (ce = "dateNow", r);
|
|
863
|
-
})();
|
|
864
|
-
var dr = new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");
|
|
865
|
-
function rt(t = h(), e = h().substring(16), n) {
|
|
866
|
-
let r = "";
|
|
867
|
-
return n !== void 0 && (r = n ? "-1" : "-0"), `${t}-${e}${r}`;
|
|
668
|
+
function nt(t) {
|
|
669
|
+
return [90, Bt(t)];
|
|
868
670
|
}
|
|
869
671
|
function P(t, e = []) {
|
|
870
672
|
return [t, e];
|
|
871
673
|
}
|
|
872
|
-
function
|
|
674
|
+
function ot(t, e) {
|
|
873
675
|
let [n, r] = t;
|
|
874
676
|
return [n, [...r, e]];
|
|
875
677
|
}
|
|
876
|
-
function
|
|
678
|
+
function be(t, e) {
|
|
877
679
|
let n = t[1];
|
|
878
680
|
for (let r of n) {
|
|
879
|
-
let
|
|
880
|
-
if (e(r,
|
|
681
|
+
let o = r[0].type;
|
|
682
|
+
if (e(r, o)) return true;
|
|
881
683
|
}
|
|
882
684
|
return false;
|
|
883
685
|
}
|
|
884
|
-
function
|
|
885
|
-
return (
|
|
686
|
+
function rt(t) {
|
|
687
|
+
return l.__SENTRY__ && l.__SENTRY__.encodePolyfill ? l.__SENTRY__.encodePolyfill(t) : new TextEncoder().encode(t);
|
|
886
688
|
}
|
|
887
|
-
function
|
|
888
|
-
let [
|
|
889
|
-
function
|
|
890
|
-
typeof
|
|
891
|
-
}
|
|
892
|
-
for (let
|
|
893
|
-
let [
|
|
894
|
-
if (
|
|
895
|
-
${JSON.stringify(
|
|
896
|
-
`), typeof
|
|
689
|
+
function st(t) {
|
|
690
|
+
let [e, n] = t, r = JSON.stringify(e);
|
|
691
|
+
function o(s) {
|
|
692
|
+
typeof r == "string" ? r = typeof s == "string" ? r + s : [rt(r), s] : r.push(typeof s == "string" ? rt(s) : s);
|
|
693
|
+
}
|
|
694
|
+
for (let s of n) {
|
|
695
|
+
let [i, a] = s;
|
|
696
|
+
if (o(`
|
|
697
|
+
${JSON.stringify(i)}
|
|
698
|
+
`), typeof a == "string" || a instanceof Uint8Array) o(a);
|
|
897
699
|
else {
|
|
898
|
-
let
|
|
700
|
+
let c;
|
|
899
701
|
try {
|
|
900
|
-
|
|
702
|
+
c = JSON.stringify(a);
|
|
901
703
|
} catch {
|
|
902
|
-
|
|
704
|
+
c = JSON.stringify(R(a));
|
|
903
705
|
}
|
|
904
|
-
|
|
706
|
+
o(c);
|
|
905
707
|
}
|
|
906
708
|
}
|
|
907
|
-
return typeof
|
|
709
|
+
return typeof r == "string" ? r : Vn(r);
|
|
908
710
|
}
|
|
909
|
-
function
|
|
910
|
-
let e = t.reduce((
|
|
911
|
-
for (let
|
|
711
|
+
function Vn(t) {
|
|
712
|
+
let e = t.reduce((o, s) => o + s.length, 0), n = new Uint8Array(e), r = 0;
|
|
713
|
+
for (let o of t) n.set(o, r), r += o.length;
|
|
912
714
|
return n;
|
|
913
715
|
}
|
|
914
|
-
function
|
|
915
|
-
let
|
|
916
|
-
return [
|
|
716
|
+
function it(t) {
|
|
717
|
+
let e = typeof t.data == "string" ? rt(t.data) : t.data;
|
|
718
|
+
return [E({ type: "attachment", length: e.length, filename: t.filename, content_type: t.contentType, attachment_type: t.attachmentType }), e];
|
|
917
719
|
}
|
|
918
|
-
var
|
|
919
|
-
function
|
|
920
|
-
return
|
|
720
|
+
var Xn = { 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 Re(t) {
|
|
722
|
+
return Xn[t];
|
|
921
723
|
}
|
|
922
|
-
function
|
|
724
|
+
function Ce(t) {
|
|
923
725
|
if (!t || !t.sdk) return;
|
|
924
726
|
let { name: e, version: n } = t.sdk;
|
|
925
727
|
return { name: e, version: n };
|
|
926
728
|
}
|
|
927
|
-
function
|
|
928
|
-
let
|
|
929
|
-
return { event_id: t.event_id, sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...e && { sdk: e }, ...!!n && r && { dsn:
|
|
729
|
+
function at(t, e, n, r) {
|
|
730
|
+
let o = t.sdkProcessingMetadata && t.sdkProcessingMetadata.dynamicSamplingContext;
|
|
731
|
+
return { event_id: t.event_id, sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...e && { sdk: e }, ...!!n && r && { dsn: M(r) }, ...o && { trace: E({ ...o }) } };
|
|
930
732
|
}
|
|
931
|
-
function
|
|
733
|
+
function $t(t, e = Date.now()) {
|
|
932
734
|
let n = parseInt(`${t}`, 10);
|
|
933
735
|
if (!isNaN(n)) return n * 1e3;
|
|
934
736
|
let r = Date.parse(`${t}`);
|
|
935
737
|
return isNaN(r) ? 6e4 : r - e;
|
|
936
738
|
}
|
|
937
|
-
function
|
|
739
|
+
function jt(t, e) {
|
|
938
740
|
return t[e] || t.all || 0;
|
|
939
741
|
}
|
|
940
|
-
function
|
|
941
|
-
return
|
|
742
|
+
function ct(t, e, n = Date.now()) {
|
|
743
|
+
return jt(t, e) > n;
|
|
942
744
|
}
|
|
943
|
-
function
|
|
944
|
-
let
|
|
945
|
-
if (
|
|
946
|
-
let [c, u] = a.split(":",
|
|
947
|
-
if (!u)
|
|
948
|
-
else for (let
|
|
745
|
+
function ut(t, { statusCode: e, headers: n }, r = Date.now()) {
|
|
746
|
+
let o = { ...t }, s = n && n["x-sentry-rate-limits"], i = n && n["retry-after"];
|
|
747
|
+
if (s) for (let a of s.trim().split(",")) {
|
|
748
|
+
let [c, u, , , f] = a.split(":", 5), p = parseInt(c, 10), g = (isNaN(p) ? 60 : p) * 1e3;
|
|
749
|
+
if (!u) o.all = r + g;
|
|
750
|
+
else for (let m of u.split(";")) m === "metric_bucket" ? (!f || f.split(";").includes("custom")) && (o[m] = r + g) : o[m] = r + g;
|
|
949
751
|
}
|
|
950
|
-
else
|
|
951
|
-
return
|
|
752
|
+
else i ? o.all = r + $t(i, r) : e === 429 && (o.all = r + 60 * 1e3);
|
|
753
|
+
return o;
|
|
952
754
|
}
|
|
953
|
-
function
|
|
755
|
+
function pt(t, e) {
|
|
954
756
|
return t(e.stack || "", 1);
|
|
955
757
|
}
|
|
956
|
-
function
|
|
957
|
-
let n = { type: e.name || e.constructor.name, value: e.message }, r =
|
|
758
|
+
function Gt(t, e) {
|
|
759
|
+
let n = { type: e.name || e.constructor.name, value: e.message }, r = pt(t, e);
|
|
958
760
|
return r.length && (n.stacktrace = { frames: r }), n;
|
|
959
761
|
}
|
|
960
|
-
function
|
|
762
|
+
function Zn(t) {
|
|
763
|
+
for (let e in t) if (Object.prototype.hasOwnProperty.call(t, e)) {
|
|
764
|
+
let n = t[e];
|
|
765
|
+
if (n instanceof Error) return n;
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
function Qn(t) {
|
|
961
769
|
if ("name" in t && typeof t.name == "string") {
|
|
962
|
-
let
|
|
963
|
-
return "message" in t && typeof t.message == "string" && (
|
|
964
|
-
} else
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
let
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
s = r && r.syntheticException || new Error(d), s.message = d;
|
|
976
|
-
} else s = r && r.syntheticException || new Error(n), s.message = n;
|
|
977
|
-
o.synthetic = true;
|
|
770
|
+
let r = `'${t.name}' captured as exception`;
|
|
771
|
+
return "message" in t && typeof t.message == "string" && (r += ` with message '${t.message}'`), r;
|
|
772
|
+
} else if ("message" in t && typeof t.message == "string") return t.message;
|
|
773
|
+
let e = V(t);
|
|
774
|
+
if (Ue(t)) return `Event \`ErrorEvent\` captured as exception with message \`${t.message}\``;
|
|
775
|
+
let n = er(t);
|
|
776
|
+
return `${n && n !== "Object" ? `'${n}'` : "Object"} captured as exception with keys: ${e}`;
|
|
777
|
+
}
|
|
778
|
+
function er(t) {
|
|
779
|
+
try {
|
|
780
|
+
let e = Object.getPrototypeOf(t);
|
|
781
|
+
return e ? e.constructor.name : void 0;
|
|
782
|
+
} catch {
|
|
978
783
|
}
|
|
979
|
-
let a = { exception: { values: [nn(e, s)] } };
|
|
980
|
-
return ie(a, void 0, void 0), oe(a, o), { ...a, event_id: r && r.event_id };
|
|
981
784
|
}
|
|
982
|
-
function
|
|
983
|
-
|
|
984
|
-
if (
|
|
985
|
-
let
|
|
986
|
-
|
|
785
|
+
function tr(t, e, n, r) {
|
|
786
|
+
if (L(n)) return [n, void 0];
|
|
787
|
+
if (e.synthetic = true, b(n)) {
|
|
788
|
+
let s = t && t.getOptions().normalizeDepth, i = { __serialized__: Y(n, s) }, a = Zn(n);
|
|
789
|
+
if (a) return [a, i];
|
|
790
|
+
let c = Qn(n), u = r && r.syntheticException || new Error(c);
|
|
791
|
+
return u.message = c, [u, i];
|
|
987
792
|
}
|
|
988
|
-
|
|
793
|
+
let o = r && r.syntheticException || new Error(n);
|
|
794
|
+
return o.message = `${n}`, [o, void 0];
|
|
989
795
|
}
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
return
|
|
796
|
+
function ft(t, e, n, r) {
|
|
797
|
+
let s = r && r.data && r.data.mechanism || { handled: true, type: "generic" }, [i, a] = tr(t, s, n, r), c = { exception: { values: [Gt(e, i)] } };
|
|
798
|
+
return a && (c.extra = a), ee(c, void 0, void 0), B(c, s), { ...c, event_id: r && r.event_id };
|
|
993
799
|
}
|
|
994
|
-
function
|
|
995
|
-
|
|
800
|
+
function dt(t, e, n = "info", r, o) {
|
|
801
|
+
let s = { event_id: r && r.event_id, level: n };
|
|
802
|
+
if (o && r && r.syntheticException) {
|
|
803
|
+
let i = pt(t, r.syntheticException);
|
|
804
|
+
i.length && (s.exception = { values: [{ value: e, stacktrace: { frames: i } }] });
|
|
805
|
+
}
|
|
806
|
+
if (H(e)) {
|
|
807
|
+
let { __sentry_template_string__: i, __sentry_template_values__: a } = e;
|
|
808
|
+
return s.logentry = { message: i, params: a }, s;
|
|
809
|
+
}
|
|
810
|
+
return s.message = e, s;
|
|
996
811
|
}
|
|
997
|
-
function
|
|
998
|
-
return
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && o.id && a === null && p.log(`Event processor "${o.id}" dropped event`), G(a) ? a.then((c) => K(t, c, n, r + 1).then(s)).then(null, i) : K(t, a, n, r + 1).then(s).then(null, i);
|
|
1004
|
-
}
|
|
1005
|
-
});
|
|
812
|
+
function Oe() {
|
|
813
|
+
return { traceId: S(), spanId: S().substring(16) };
|
|
814
|
+
}
|
|
815
|
+
var _ = typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__;
|
|
816
|
+
function w() {
|
|
817
|
+
return re(l), l;
|
|
1006
818
|
}
|
|
1007
|
-
function
|
|
1008
|
-
let e =
|
|
1009
|
-
return
|
|
819
|
+
function re(t) {
|
|
820
|
+
let e = t.__SENTRY__ = t.__SENTRY__ || {};
|
|
821
|
+
return e.version = e.version || D, e[D] = e[D] || {};
|
|
1010
822
|
}
|
|
1011
|
-
function
|
|
1012
|
-
if (e.user && (!t.ipAddress && e.user.ip_address && (t.ipAddress = e.user.ip_address), !t.did && !e.did && (t.did = e.user.id || e.user.email || e.user.username)), t.timestamp = e.timestamp ||
|
|
823
|
+
function oe(t, e = {}) {
|
|
824
|
+
if (e.user && (!t.ipAddress && e.user.ip_address && (t.ipAddress = e.user.ip_address), !t.did && !e.did && (t.did = e.user.id || e.user.email || e.user.username)), t.timestamp = e.timestamp || Q(), e.abnormal_mechanism && (t.abnormal_mechanism = e.abnormal_mechanism), e.ignoreDuration && (t.ignoreDuration = e.ignoreDuration), e.sid && (t.sid = e.sid.length === 32 ? e.sid : S()), e.init !== void 0 && (t.init = e.init), !t.did && e.did && (t.did = `${e.did}`), typeof e.started == "number" && (t.started = e.started), t.ignoreDuration) t.duration = void 0;
|
|
1013
825
|
else if (typeof e.duration == "number") t.duration = e.duration;
|
|
1014
826
|
else {
|
|
1015
827
|
let n = t.timestamp - t.started;
|
|
@@ -1017,21 +829,33 @@ function w(t, e = {}) {
|
|
|
1017
829
|
}
|
|
1018
830
|
e.release && (t.release = e.release), e.environment && (t.environment = e.environment), !t.ipAddress && e.ipAddress && (t.ipAddress = e.ipAddress), !t.userAgent && e.userAgent && (t.userAgent = e.userAgent), typeof e.errors == "number" && (t.errors = e.errors), e.status && (t.status = e.status);
|
|
1019
831
|
}
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
e ?
|
|
832
|
+
var lt = "_sentrySpan";
|
|
833
|
+
function mt(t, e) {
|
|
834
|
+
e ? U(t, lt, e) : delete t[lt];
|
|
1023
835
|
}
|
|
1024
|
-
function
|
|
1025
|
-
return
|
|
836
|
+
function j(t) {
|
|
837
|
+
return t[lt];
|
|
1026
838
|
}
|
|
1027
|
-
var
|
|
1028
|
-
var
|
|
839
|
+
var rr = 100;
|
|
840
|
+
var se = class {
|
|
1029
841
|
constructor() {
|
|
1030
|
-
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 = Oe();
|
|
843
|
+
}
|
|
844
|
+
clone() {
|
|
845
|
+
let e = new se();
|
|
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, mt(e, j(this)), e;
|
|
1031
847
|
}
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
848
|
+
setClient(e) {
|
|
849
|
+
this._client = e;
|
|
850
|
+
}
|
|
851
|
+
setLastEventId(e) {
|
|
852
|
+
this._lastEventId = e;
|
|
853
|
+
}
|
|
854
|
+
getClient() {
|
|
855
|
+
return this._client;
|
|
856
|
+
}
|
|
857
|
+
lastEventId() {
|
|
858
|
+
return this._lastEventId;
|
|
1035
859
|
}
|
|
1036
860
|
addScopeListener(e) {
|
|
1037
861
|
this._scopeListeners.push(e);
|
|
@@ -1040,7 +864,7 @@ var k = class {
|
|
|
1040
864
|
return this._eventProcessors.push(e), this;
|
|
1041
865
|
}
|
|
1042
866
|
setUser(e) {
|
|
1043
|
-
return this._user = e || {}, this._session &&
|
|
867
|
+
return this._user = e || { email: void 0, id: void 0, ip_address: void 0, username: void 0 }, this._session && oe(this._session, { user: e }), this._notifyScopeListeners(), this;
|
|
1044
868
|
}
|
|
1045
869
|
getUser() {
|
|
1046
870
|
return this._user;
|
|
@@ -1075,16 +899,6 @@ var k = class {
|
|
|
1075
899
|
setContext(e, n) {
|
|
1076
900
|
return n === null ? delete this._contexts[e] : this._contexts[e] = n, this._notifyScopeListeners(), this;
|
|
1077
901
|
}
|
|
1078
|
-
setSpan(e) {
|
|
1079
|
-
return this._span = e, this._notifyScopeListeners(), this;
|
|
1080
|
-
}
|
|
1081
|
-
getSpan() {
|
|
1082
|
-
return this._span;
|
|
1083
|
-
}
|
|
1084
|
-
getTransaction() {
|
|
1085
|
-
let e = this.getSpan();
|
|
1086
|
-
return e && e.transaction;
|
|
1087
|
-
}
|
|
1088
902
|
setSession(e) {
|
|
1089
903
|
return e ? this._session = e : delete this._session, this._notifyScopeListeners(), this;
|
|
1090
904
|
}
|
|
@@ -1093,20 +907,17 @@ var k = class {
|
|
|
1093
907
|
}
|
|
1094
908
|
update(e) {
|
|
1095
909
|
if (!e) return this;
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
return n instanceof k ? n : this;
|
|
1099
|
-
}
|
|
1100
|
-
return e instanceof k ? (this._tags = { ...this._tags, ...e._tags }, this._extra = { ...this._extra, ...e._extra }, this._contexts = { ...this._contexts, ...e._contexts }, e._user && Object.keys(e._user).length && (this._user = e._user), e._level && (this._level = e._level), e._fingerprint && (this._fingerprint = e._fingerprint), e._requestSession && (this._requestSession = e._requestSession), e._propagationContext && (this._propagationContext = e._propagationContext)) : R(e) && (e = e, this._tags = { ...this._tags, ...e.tags }, this._extra = { ...this._extra, ...e.extra }, this._contexts = { ...this._contexts, ...e.contexts }, e.user && (this._user = e.user), e.level && (this._level = e.level), e.fingerprint && (this._fingerprint = e.fingerprint), e.requestSession && (this._requestSession = e.requestSession), e.propagationContext && (this._propagationContext = e.propagationContext)), this;
|
|
910
|
+
let n = typeof e == "function" ? e(this) : e, [r, o] = n instanceof A ? [n.getScopeData(), n.getRequestSession()] : b(n) ? [e, e.requestSession] : [], { tags: s, extra: i, user: a, contexts: c, level: u, fingerprint: f = [], propagationContext: p } = r || {};
|
|
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;
|
|
1101
912
|
}
|
|
1102
913
|
clear() {
|
|
1103
|
-
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.
|
|
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, mt(this, void 0), this._attachments = [], this._propagationContext = Oe(), this._notifyScopeListeners(), this;
|
|
1104
915
|
}
|
|
1105
916
|
addBreadcrumb(e, n) {
|
|
1106
|
-
let r = typeof n == "number" ? n :
|
|
917
|
+
let r = typeof n == "number" ? n : rr;
|
|
1107
918
|
if (r <= 0) return this;
|
|
1108
|
-
let
|
|
1109
|
-
return
|
|
919
|
+
let o = { timestamp: z(), ...e }, s = this._breadcrumbs;
|
|
920
|
+
return s.push(o), this._breadcrumbs = s.length > r ? s.slice(-r) : s, this._notifyScopeListeners(), this;
|
|
1110
921
|
}
|
|
1111
922
|
getLastBreadcrumb() {
|
|
1112
923
|
return this._breadcrumbs[this._breadcrumbs.length - 1];
|
|
@@ -1117,25 +928,11 @@ var k = class {
|
|
|
1117
928
|
addAttachment(e) {
|
|
1118
929
|
return this._attachments.push(e), this;
|
|
1119
930
|
}
|
|
1120
|
-
getAttachments() {
|
|
1121
|
-
return this._attachments;
|
|
1122
|
-
}
|
|
1123
931
|
clearAttachments() {
|
|
1124
932
|
return this._attachments = [], this;
|
|
1125
933
|
}
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
e.contexts = { trace: this._span.getTraceContext(), ...e.contexts };
|
|
1129
|
-
let o = this._span.transaction;
|
|
1130
|
-
if (o) {
|
|
1131
|
-
e.sdkProcessingMetadata = { dynamicSamplingContext: o.getDynamicSamplingContext(), ...e.sdkProcessingMetadata };
|
|
1132
|
-
let a = o.name;
|
|
1133
|
-
a && (e.tags = { transaction: a, ...e.tags });
|
|
1134
|
-
}
|
|
1135
|
-
}
|
|
1136
|
-
this._applyFingerprint(e);
|
|
1137
|
-
let s = this._getBreadcrumbs(), i = [...e.breadcrumbs || [], ...s];
|
|
1138
|
-
return e.breadcrumbs = i.length > 0 ? i : void 0, e.sdkProcessingMetadata = { ...e.sdkProcessingMetadata, ...this._sdkProcessingMetadata, propagationContext: this._propagationContext }, K([...r || [], ...ue(), ...this._eventProcessors], e, n);
|
|
934
|
+
getScopeData() {
|
|
935
|
+
return { breadcrumbs: this._breadcrumbs, attachments: this._attachments, contexts: this._contexts, tags: this._tags, extra: this._extra, user: this._user, level: this._level, fingerprint: this._fingerprint || [], eventProcessors: this._eventProcessors, propagationContext: this._propagationContext, sdkProcessingMetadata: this._sdkProcessingMetadata, transactionName: this._transactionName, span: j(this) };
|
|
1139
936
|
}
|
|
1140
937
|
setSDKProcessingMetadata(e) {
|
|
1141
938
|
return this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...e }, this;
|
|
@@ -1146,48 +943,52 @@ var k = class {
|
|
|
1146
943
|
getPropagationContext() {
|
|
1147
944
|
return this._propagationContext;
|
|
1148
945
|
}
|
|
1149
|
-
|
|
1150
|
-
|
|
946
|
+
captureException(e, n) {
|
|
947
|
+
let r = n && n.event_id ? n.event_id : S();
|
|
948
|
+
if (!this._client) return d.warn("No client configured on scope - will not capture exception!"), r;
|
|
949
|
+
let o = new Error("Sentry syntheticException");
|
|
950
|
+
return this._client.captureException(e, { originalException: e, syntheticException: o, ...n, event_id: r }, this), r;
|
|
951
|
+
}
|
|
952
|
+
captureMessage(e, n, r) {
|
|
953
|
+
let o = r && r.event_id ? r.event_id : S();
|
|
954
|
+
if (!this._client) return d.warn("No client configured on scope - will not capture message!"), o;
|
|
955
|
+
let s = new Error(e);
|
|
956
|
+
return this._client.captureMessage(e, n, { originalException: e, syntheticException: s, ...r, event_id: o }, this), o;
|
|
957
|
+
}
|
|
958
|
+
captureEvent(e, n) {
|
|
959
|
+
let r = n && n.event_id ? n.event_id : S();
|
|
960
|
+
return this._client ? (this._client.captureEvent(e, { ...n, event_id: r }, this), r) : (d.warn("No client configured on scope - will not capture event!"), r);
|
|
1151
961
|
}
|
|
1152
962
|
_notifyScopeListeners() {
|
|
1153
963
|
this._notifyingListeners || (this._notifyingListeners = true, this._scopeListeners.forEach((e) => {
|
|
1154
964
|
e(this);
|
|
1155
965
|
}), this._notifyingListeners = false);
|
|
1156
966
|
}
|
|
1157
|
-
_applyFingerprint(e) {
|
|
1158
|
-
e.fingerprint = e.fingerprint ? ae(e.fingerprint) : [], this._fingerprint && (e.fingerprint = e.fingerprint.concat(this._fingerprint)), e.fingerprint && !e.fingerprint.length && delete e.fingerprint;
|
|
1159
|
-
}
|
|
1160
967
|
};
|
|
1161
|
-
|
|
1162
|
-
|
|
968
|
+
var A = se;
|
|
969
|
+
function Ht() {
|
|
970
|
+
return q("defaultCurrentScope", () => new A());
|
|
1163
971
|
}
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
bindClient(e) {
|
|
1174
|
-
let n = this.getStackTop();
|
|
1175
|
-
n.client = e, e && e.setupIntegrations && e.setupIntegrations();
|
|
1176
|
-
}
|
|
1177
|
-
pushScope() {
|
|
1178
|
-
let e = k.clone(this.getScope());
|
|
1179
|
-
return this.getStack().push({ client: this.getClient(), scope: e }), e;
|
|
1180
|
-
}
|
|
1181
|
-
popScope() {
|
|
1182
|
-
return this.getStack().length <= 1 ? false : !!this.getStack().pop();
|
|
972
|
+
function qt() {
|
|
973
|
+
return q("defaultIsolationScope", () => new A());
|
|
974
|
+
}
|
|
975
|
+
var gt = class {
|
|
976
|
+
constructor(e, n) {
|
|
977
|
+
let r;
|
|
978
|
+
e ? r = e : r = new A();
|
|
979
|
+
let o;
|
|
980
|
+
n ? o = n : o = new A(), this._stack = [{ scope: r }], this._isolationScope = o;
|
|
1183
981
|
}
|
|
1184
982
|
withScope(e) {
|
|
1185
|
-
let n = this.
|
|
983
|
+
let n = this._pushScope(), r;
|
|
1186
984
|
try {
|
|
1187
|
-
e(n);
|
|
1188
|
-
}
|
|
1189
|
-
this.
|
|
985
|
+
r = e(n);
|
|
986
|
+
} catch (o) {
|
|
987
|
+
throw this._popScope(), o;
|
|
1190
988
|
}
|
|
989
|
+
return C(r) ? r.then((o) => (this._popScope(), o), (o) => {
|
|
990
|
+
throw this._popScope(), o;
|
|
991
|
+
}) : (this._popScope(), r);
|
|
1191
992
|
}
|
|
1192
993
|
getClient() {
|
|
1193
994
|
return this.getStackTop().client;
|
|
@@ -1195,367 +996,304 @@ var Y = class {
|
|
|
1195
996
|
getScope() {
|
|
1196
997
|
return this.getStackTop().scope;
|
|
1197
998
|
}
|
|
999
|
+
getIsolationScope() {
|
|
1000
|
+
return this._isolationScope;
|
|
1001
|
+
}
|
|
1198
1002
|
getStack() {
|
|
1199
1003
|
return this._stack;
|
|
1200
1004
|
}
|
|
1201
1005
|
getStackTop() {
|
|
1202
1006
|
return this._stack[this._stack.length - 1];
|
|
1203
1007
|
}
|
|
1204
|
-
|
|
1205
|
-
let
|
|
1206
|
-
return this.
|
|
1207
|
-
i.captureException(e, { originalException: e, syntheticException: s, ...n, event_id: r }, o);
|
|
1208
|
-
}), r;
|
|
1209
|
-
}
|
|
1210
|
-
captureMessage(e, n, r) {
|
|
1211
|
-
let s = this._lastEventId = r && r.event_id ? r.event_id : h(), i = new Error(e);
|
|
1212
|
-
return this._withClient((o, a) => {
|
|
1213
|
-
o.captureMessage(e, n, { originalException: e, syntheticException: i, ...r, event_id: s }, a);
|
|
1214
|
-
}), s;
|
|
1215
|
-
}
|
|
1216
|
-
captureEvent(e, n) {
|
|
1217
|
-
let r = n && n.event_id ? n.event_id : h();
|
|
1218
|
-
return e.type || (this._lastEventId = r), this._withClient((s, i) => {
|
|
1219
|
-
s.captureEvent(e, { ...n, event_id: r }, i);
|
|
1220
|
-
}), r;
|
|
1221
|
-
}
|
|
1222
|
-
lastEventId() {
|
|
1223
|
-
return this._lastEventId;
|
|
1224
|
-
}
|
|
1225
|
-
addBreadcrumb(e, n) {
|
|
1226
|
-
let { scope: r, client: s } = this.getStackTop();
|
|
1227
|
-
if (!s) return;
|
|
1228
|
-
let { beforeBreadcrumb: i = null, maxBreadcrumbs: o = hr } = s.getOptions && s.getOptions() || {};
|
|
1229
|
-
if (o <= 0) return;
|
|
1230
|
-
let c = { timestamp: B(), ...e }, u = i ? _e(() => i(c, n)) : c;
|
|
1231
|
-
u !== null && (s.emit && s.emit("beforeAddBreadcrumb", u, n), r.addBreadcrumb(u, o));
|
|
1232
|
-
}
|
|
1233
|
-
setUser(e) {
|
|
1234
|
-
this.getScope().setUser(e);
|
|
1235
|
-
}
|
|
1236
|
-
setTags(e) {
|
|
1237
|
-
this.getScope().setTags(e);
|
|
1238
|
-
}
|
|
1239
|
-
setExtras(e) {
|
|
1240
|
-
this.getScope().setExtras(e);
|
|
1241
|
-
}
|
|
1242
|
-
setTag(e, n) {
|
|
1243
|
-
this.getScope().setTag(e, n);
|
|
1244
|
-
}
|
|
1245
|
-
setExtra(e, n) {
|
|
1246
|
-
this.getScope().setExtra(e, n);
|
|
1247
|
-
}
|
|
1248
|
-
setContext(e, n) {
|
|
1249
|
-
this.getScope().setContext(e, n);
|
|
1250
|
-
}
|
|
1251
|
-
configureScope(e) {
|
|
1252
|
-
let { scope: n, client: r } = this.getStackTop();
|
|
1253
|
-
r && e(n);
|
|
1254
|
-
}
|
|
1255
|
-
run(e) {
|
|
1256
|
-
let n = mt(this);
|
|
1257
|
-
try {
|
|
1258
|
-
e(this);
|
|
1259
|
-
} finally {
|
|
1260
|
-
mt(n);
|
|
1261
|
-
}
|
|
1262
|
-
}
|
|
1263
|
-
getIntegration(e) {
|
|
1264
|
-
let n = this.getClient();
|
|
1265
|
-
if (!n) return null;
|
|
1266
|
-
try {
|
|
1267
|
-
return n.getIntegration(e);
|
|
1268
|
-
} catch {
|
|
1269
|
-
return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn(`Cannot retrieve integration ${e.id} from the current Hub`), null;
|
|
1270
|
-
}
|
|
1271
|
-
}
|
|
1272
|
-
startTransaction(e, n) {
|
|
1273
|
-
let r = this._callExtensionMethod("startTransaction", e, n);
|
|
1274
|
-
if ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && !r) {
|
|
1275
|
-
let s = this.getClient();
|
|
1276
|
-
console.warn(s ? `Tracing extension 'startTransaction' has not been added. Call 'addTracingExtensions' before calling 'init':
|
|
1277
|
-
Sentry.addTracingExtensions();
|
|
1278
|
-
Sentry.init({...});
|
|
1279
|
-
` : "Tracing extension 'startTransaction' is missing. You should 'init' the SDK before calling 'startTransaction'");
|
|
1280
|
-
}
|
|
1281
|
-
return r;
|
|
1282
|
-
}
|
|
1283
|
-
traceHeaders() {
|
|
1284
|
-
return this._callExtensionMethod("traceHeaders");
|
|
1285
|
-
}
|
|
1286
|
-
captureSession(e = false) {
|
|
1287
|
-
if (e) return this.endSession();
|
|
1288
|
-
this._sendSessionUpdate();
|
|
1289
|
-
}
|
|
1290
|
-
endSession() {
|
|
1291
|
-
let n = this.getStackTop().scope, r = n.getSession();
|
|
1292
|
-
r && on(r), this._sendSessionUpdate(), n.setSession();
|
|
1293
|
-
}
|
|
1294
|
-
startSession(e) {
|
|
1295
|
-
let { scope: n, client: r } = this.getStackTop(), { release: s, environment: i = z } = r && r.getOptions() || {}, { userAgent: o } = m.navigator || {}, a = sn({ release: s, environment: i, user: n.getUser(), ...o && { userAgent: o }, ...e }), c = n.getSession && n.getSession();
|
|
1296
|
-
return c && c.status === "ok" && w(c, { status: "exited" }), this.endSession(), n.setSession(a), a;
|
|
1297
|
-
}
|
|
1298
|
-
shouldSendDefaultPii() {
|
|
1299
|
-
let e = this.getClient(), n = e && e.getOptions();
|
|
1300
|
-
return !!(n && n.sendDefaultPii);
|
|
1301
|
-
}
|
|
1302
|
-
_sendSessionUpdate() {
|
|
1303
|
-
let { scope: e, client: n } = this.getStackTop(), r = e.getSession();
|
|
1304
|
-
r && n && n.captureSession && n.captureSession(r);
|
|
1305
|
-
}
|
|
1306
|
-
_withClient(e) {
|
|
1307
|
-
let { scope: n, client: r } = this.getStackTop();
|
|
1308
|
-
r && e(r, n);
|
|
1008
|
+
_pushScope() {
|
|
1009
|
+
let e = this.getScope().clone();
|
|
1010
|
+
return this.getStack().push({ client: this.getClient(), scope: e }), e;
|
|
1309
1011
|
}
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
if (s && s.extensions && typeof s.extensions[e] == "function") return s.extensions[e].apply(this, n);
|
|
1313
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn(`Extension method ${e} couldn't be found, doing nothing.`);
|
|
1012
|
+
_popScope() {
|
|
1013
|
+
return this.getStack().length <= 1 ? false : !!this.getStack().pop();
|
|
1314
1014
|
}
|
|
1315
1015
|
};
|
|
1316
|
-
function
|
|
1317
|
-
|
|
1016
|
+
function J() {
|
|
1017
|
+
let t = w(), e = re(t);
|
|
1018
|
+
return e.stack = e.stack || new gt(Ht(), qt());
|
|
1318
1019
|
}
|
|
1319
|
-
function
|
|
1320
|
-
|
|
1321
|
-
return _t(e, t), n;
|
|
1020
|
+
function or(t) {
|
|
1021
|
+
return J().withScope(t);
|
|
1322
1022
|
}
|
|
1323
|
-
function
|
|
1324
|
-
let
|
|
1325
|
-
|
|
1326
|
-
let e = t.__SENTRY__.acs.getCurrentHub();
|
|
1327
|
-
if (e) return e;
|
|
1328
|
-
}
|
|
1329
|
-
return gr(t);
|
|
1023
|
+
function sr(t, e) {
|
|
1024
|
+
let n = J();
|
|
1025
|
+
return n.withScope(() => (n.getStackTop().scope = t, e(t)));
|
|
1330
1026
|
}
|
|
1331
|
-
function
|
|
1332
|
-
return (
|
|
1027
|
+
function zt(t) {
|
|
1028
|
+
return J().withScope(() => t(J().getIsolationScope()));
|
|
1333
1029
|
}
|
|
1334
|
-
function
|
|
1335
|
-
return
|
|
1030
|
+
function Yt() {
|
|
1031
|
+
return { withIsolationScope: zt, withScope: or, withSetScope: sr, withSetIsolationScope: (t, e) => zt(e), getCurrentScope: () => J().getScope(), getIsolationScope: () => J().getIsolationScope() };
|
|
1336
1032
|
}
|
|
1337
|
-
function
|
|
1338
|
-
|
|
1033
|
+
function ie(t) {
|
|
1034
|
+
let e = re(t);
|
|
1035
|
+
return e.acs ? e.acs : Yt();
|
|
1339
1036
|
}
|
|
1340
|
-
function
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
return n.hub = e, true;
|
|
1037
|
+
function ht() {
|
|
1038
|
+
let t = w();
|
|
1039
|
+
return ie(t).getCurrentScope();
|
|
1344
1040
|
}
|
|
1345
|
-
function
|
|
1346
|
-
|
|
1041
|
+
function G() {
|
|
1042
|
+
let t = w();
|
|
1043
|
+
return ie(t).getIsolationScope();
|
|
1347
1044
|
}
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
dn || (dn = true, Ie("error", ht), Ie("unhandledrejection", ht));
|
|
1045
|
+
function Jt() {
|
|
1046
|
+
return q("globalScope", () => new A());
|
|
1351
1047
|
}
|
|
1352
|
-
function
|
|
1353
|
-
|
|
1354
|
-
if (t) {
|
|
1355
|
-
let e = "internal_error";
|
|
1356
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`[Tracing] Transaction: ${e} -> Global error occured`), t.setStatus(e);
|
|
1357
|
-
}
|
|
1048
|
+
function Wt() {
|
|
1049
|
+
return ht().getClient();
|
|
1358
1050
|
}
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
}
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
var
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1051
|
+
var ir = "_sentryMetrics";
|
|
1052
|
+
function Kt(t) {
|
|
1053
|
+
let e = t[ir];
|
|
1054
|
+
if (!e) return;
|
|
1055
|
+
let n = {};
|
|
1056
|
+
for (let [, [r, o]] of e) n[r] || (n[r] = []), n[r].push(E(o));
|
|
1057
|
+
return n;
|
|
1058
|
+
}
|
|
1059
|
+
var Vt = "sentry.source";
|
|
1060
|
+
var Xt = "sentry.sample_rate";
|
|
1061
|
+
var Zt = "sentry.op";
|
|
1062
|
+
var Qt = "sentry.origin";
|
|
1063
|
+
var ar = 1;
|
|
1064
|
+
function Ne(t) {
|
|
1065
|
+
let { spanId: e, traceId: n } = t.spanContext(), { parent_span_id: r } = W(t);
|
|
1066
|
+
return E({ parent_span_id: r, span_id: e, trace_id: n });
|
|
1067
|
+
}
|
|
1068
|
+
function en(t) {
|
|
1069
|
+
return typeof t == "number" ? tn(t) : Array.isArray(t) ? t[0] + t[1] / 1e9 : t instanceof Date ? tn(t.getTime()) : Q();
|
|
1070
|
+
}
|
|
1071
|
+
function tn(t) {
|
|
1072
|
+
return t > 9999999999 ? t / 1e3 : t;
|
|
1073
|
+
}
|
|
1074
|
+
function W(t) {
|
|
1075
|
+
if (ur(t)) return t.getSpanJSON();
|
|
1076
|
+
try {
|
|
1077
|
+
let { spanId: e, traceId: n } = t.spanContext();
|
|
1078
|
+
if (cr(t)) {
|
|
1079
|
+
let { attributes: r, startTime: o, name: s, endTime: i, parentSpanId: a, status: c } = t;
|
|
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: pr(c), op: r[Zt], origin: r[Qt], _metrics_summary: Kt(t) });
|
|
1383
1081
|
}
|
|
1384
|
-
return n;
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
return this.tags = { ...this.tags, [e]: n }, this;
|
|
1388
|
-
}
|
|
1389
|
-
setData(e, n) {
|
|
1390
|
-
return this.data = { ...this.data, [e]: n }, this;
|
|
1391
|
-
}
|
|
1392
|
-
setStatus(e) {
|
|
1393
|
-
return this.status = e, this;
|
|
1394
|
-
}
|
|
1395
|
-
setHttpStatus(e) {
|
|
1396
|
-
this.setTag("http.status_code", String(e)), this.setData("http.response.status_code", e);
|
|
1397
|
-
let n = Sr(e);
|
|
1398
|
-
return n !== "unknown_error" && this.setStatus(n), this;
|
|
1399
|
-
}
|
|
1400
|
-
setName(e) {
|
|
1401
|
-
this.description = e;
|
|
1082
|
+
return { span_id: e, trace_id: n };
|
|
1083
|
+
} catch {
|
|
1084
|
+
return {};
|
|
1402
1085
|
}
|
|
1403
|
-
|
|
1404
|
-
|
|
1086
|
+
}
|
|
1087
|
+
function cr(t) {
|
|
1088
|
+
let e = t;
|
|
1089
|
+
return !!e.attributes && !!e.startTime && !!e.name && !!e.endTime && !!e.status;
|
|
1090
|
+
}
|
|
1091
|
+
function ur(t) {
|
|
1092
|
+
return typeof t.getSpanJSON == "function";
|
|
1093
|
+
}
|
|
1094
|
+
function nn(t) {
|
|
1095
|
+
let { traceFlags: e } = t.spanContext();
|
|
1096
|
+
return e === ar;
|
|
1097
|
+
}
|
|
1098
|
+
function pr(t) {
|
|
1099
|
+
if (!(!t || t.code === 0)) return t.code === 1 ? "ok" : t.message || "unknown_error";
|
|
1100
|
+
}
|
|
1101
|
+
var fr = "_sentryRootSpan";
|
|
1102
|
+
function F(t) {
|
|
1103
|
+
return t[fr] || t;
|
|
1104
|
+
}
|
|
1105
|
+
function rn() {
|
|
1106
|
+
let t = w(), e = ie(t);
|
|
1107
|
+
return e.getActiveSpan ? e.getActiveSpan() : j(ht());
|
|
1108
|
+
}
|
|
1109
|
+
var on = false;
|
|
1110
|
+
function sn() {
|
|
1111
|
+
on || (on = true, Ve(_t), Xe(_t));
|
|
1112
|
+
}
|
|
1113
|
+
function _t() {
|
|
1114
|
+
let t = rn(), e = t && F(t);
|
|
1115
|
+
if (e) {
|
|
1116
|
+
let n = "internal_error";
|
|
1117
|
+
_ && d.log(`[Tracing] Root span: ${n} -> Global error occured`), e.setStatus({ code: 2, message: n });
|
|
1118
|
+
}
|
|
1119
|
+
}
|
|
1120
|
+
_t.tag = "sentry_tracingErrorCallback";
|
|
1121
|
+
var ke = "production";
|
|
1122
|
+
var dr = "_frozenDsc";
|
|
1123
|
+
function ae(t, e) {
|
|
1124
|
+
let n = e.getOptions(), { publicKey: r } = e.getDsn() || {}, o = E({ environment: n.environment || ke, release: n.release, public_key: r, trace_id: t });
|
|
1125
|
+
return e.emit("createDsc", o), o;
|
|
1126
|
+
}
|
|
1127
|
+
function De(t) {
|
|
1128
|
+
let e = Wt();
|
|
1129
|
+
if (!e) return {};
|
|
1130
|
+
let n = ae(W(t).trace_id || "", e), r = F(t);
|
|
1131
|
+
if (!r) return n;
|
|
1132
|
+
let o = r[dr];
|
|
1133
|
+
if (o) return o;
|
|
1134
|
+
let s = W(r), i = s.data || {}, a = i[Xt];
|
|
1135
|
+
a != null && (n.sample_rate = `${a}`);
|
|
1136
|
+
let c = i[Vt];
|
|
1137
|
+
return c && c !== "url" && (n.transaction = s.description), n.sampled = String(nn(r)), e.emit("createDsc", n), n;
|
|
1138
|
+
}
|
|
1139
|
+
function an(t) {
|
|
1140
|
+
if (typeof t == "boolean") return Number(t);
|
|
1141
|
+
let e = typeof t == "string" ? parseFloat(t) : t;
|
|
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(t)} of type ${JSON.stringify(typeof t)}.`);
|
|
1144
|
+
return;
|
|
1405
1145
|
}
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1146
|
+
return e;
|
|
1147
|
+
}
|
|
1148
|
+
function lr(t, e) {
|
|
1149
|
+
return e && (t.sdk = t.sdk || {}, t.sdk.name = t.sdk.name || e.name, t.sdk.version = t.sdk.version || e.version, t.sdk.integrations = [...t.sdk.integrations || [], ...e.integrations || []], t.sdk.packages = [...t.sdk.packages || [], ...e.packages || []]), t;
|
|
1150
|
+
}
|
|
1151
|
+
function cn(t, e, n, r) {
|
|
1152
|
+
let o = Ce(n), s = { sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...o && { sdk: o }, ...!!r && e && { dsn: M(e) } }, i = "aggregates" in t ? [{ type: "sessions" }, t] : [{ type: "session" }, t.toJSON()];
|
|
1153
|
+
return P(s, [i]);
|
|
1154
|
+
}
|
|
1155
|
+
function un(t, e, n, r) {
|
|
1156
|
+
let o = Ce(n), s = t.type && t.type !== "replay_event" ? t.type : "event";
|
|
1157
|
+
lr(t, n && n.sdk);
|
|
1158
|
+
let i = at(t, o, r, e);
|
|
1159
|
+
return delete t.sdkProcessingMetadata, P(i, [[{ type: s }, t]]);
|
|
1160
|
+
}
|
|
1161
|
+
function ve(t, e, n, r = 0) {
|
|
1162
|
+
return new y((o, s) => {
|
|
1163
|
+
let i = t[r];
|
|
1164
|
+
if (e === null || typeof i != "function") o(e);
|
|
1165
|
+
else {
|
|
1166
|
+
let a = i({ ...e }, n);
|
|
1167
|
+
_ && i.id && a === null && d.log(`Event processor "${i.id}" dropped event`), C(a) ? a.then((c) => ve(t, c, n, r + 1).then(o)).then(null, s) : ve(t, a, n, r + 1).then(o).then(null, s);
|
|
1410
1168
|
}
|
|
1411
|
-
|
|
1412
|
-
}
|
|
1413
|
-
toTraceparent() {
|
|
1414
|
-
return rt(this.traceId, this.spanId, this.sampled);
|
|
1415
|
-
}
|
|
1416
|
-
toContext() {
|
|
1417
|
-
return g({ data: this.data, description: this.description, endTimestamp: this.endTimestamp, op: this.op, parentSpanId: this.parentSpanId, sampled: this.sampled, spanId: this.spanId, startTimestamp: this.startTimestamp, status: this.status, tags: this.tags, traceId: this.traceId });
|
|
1418
|
-
}
|
|
1419
|
-
updateWithContext(e) {
|
|
1420
|
-
return this.data = e.data || {}, this.description = e.description, this.endTimestamp = e.endTimestamp, this.op = e.op, this.parentSpanId = e.parentSpanId, this.sampled = e.sampled, this.spanId = e.spanId || this.spanId, this.startTimestamp = e.startTimestamp || this.startTimestamp, this.status = e.status, this.tags = e.tags || {}, this.traceId = e.traceId || this.traceId, this;
|
|
1421
|
-
}
|
|
1422
|
-
getTraceContext() {
|
|
1423
|
-
return g({ data: Object.keys(this.data).length > 0 ? this.data : void 0, description: this.description, op: this.op, parent_span_id: this.parentSpanId, span_id: this.spanId, status: this.status, tags: Object.keys(this.tags).length > 0 ? this.tags : void 0, trace_id: this.traceId });
|
|
1424
|
-
}
|
|
1425
|
-
toJSON() {
|
|
1426
|
-
return g({ data: Object.keys(this.data).length > 0 ? this.data : void 0, description: this.description, op: this.op, parent_span_id: this.parentSpanId, span_id: this.spanId, start_timestamp: this.startTimestamp, status: this.status, tags: Object.keys(this.tags).length > 0 ? this.tags : void 0, timestamp: this.endTimestamp, trace_id: this.traceId, origin: this.origin });
|
|
1427
|
-
}
|
|
1428
|
-
};
|
|
1429
|
-
function Sr(t) {
|
|
1430
|
-
if (t < 400 && t >= 100) return "ok";
|
|
1431
|
-
if (t >= 400 && t < 500) switch (t) {
|
|
1432
|
-
case 401:
|
|
1433
|
-
return "unauthenticated";
|
|
1434
|
-
case 403:
|
|
1435
|
-
return "permission_denied";
|
|
1436
|
-
case 404:
|
|
1437
|
-
return "not_found";
|
|
1438
|
-
case 409:
|
|
1439
|
-
return "already_exists";
|
|
1440
|
-
case 413:
|
|
1441
|
-
return "failed_precondition";
|
|
1442
|
-
case 429:
|
|
1443
|
-
return "resource_exhausted";
|
|
1444
|
-
default:
|
|
1445
|
-
return "invalid_argument";
|
|
1446
|
-
}
|
|
1447
|
-
if (t >= 500 && t < 600) switch (t) {
|
|
1448
|
-
case 501:
|
|
1449
|
-
return "unimplemented";
|
|
1450
|
-
case 503:
|
|
1451
|
-
return "unavailable";
|
|
1452
|
-
case 504:
|
|
1453
|
-
return "deadline_exceeded";
|
|
1454
|
-
default:
|
|
1455
|
-
return "internal_error";
|
|
1456
|
-
}
|
|
1457
|
-
return "unknown_error";
|
|
1169
|
+
});
|
|
1458
1170
|
}
|
|
1459
|
-
function
|
|
1460
|
-
let
|
|
1461
|
-
|
|
1171
|
+
function pn(t, e) {
|
|
1172
|
+
let { fingerprint: n, span: r, breadcrumbs: o, sdkProcessingMetadata: s } = e;
|
|
1173
|
+
mr(t, e), r && _r(t, r), Er(t, n), gr(t, o), hr(t, s);
|
|
1174
|
+
}
|
|
1175
|
+
function Et(t, e) {
|
|
1176
|
+
let { extra: n, tags: r, user: o, contexts: s, level: i, sdkProcessingMetadata: a, breadcrumbs: c, fingerprint: u, eventProcessors: f, attachments: p, propagationContext: g, transactionName: m, span: h } = e;
|
|
1177
|
+
ce(t, "extra", n), ce(t, "tags", r), ce(t, "user", o), ce(t, "contexts", s), ce(t, "sdkProcessingMetadata", a), i && (t.level = i), m && (t.transactionName = m), h && (t.span = h), c.length && (t.breadcrumbs = [...t.breadcrumbs, ...c]), u.length && (t.fingerprint = [...t.fingerprint, ...u]), f.length && (t.eventProcessors = [...t.eventProcessors, ...f]), p.length && (t.attachments = [...t.attachments, ...p]), t.propagationContext = { ...t.propagationContext, ...g };
|
|
1178
|
+
}
|
|
1179
|
+
function ce(t, e, n) {
|
|
1180
|
+
if (n && Object.keys(n).length) {
|
|
1181
|
+
t[e] = { ...t[e] };
|
|
1182
|
+
for (let r in n) Object.prototype.hasOwnProperty.call(n, r) && (t[e][r] = n[r]);
|
|
1183
|
+
}
|
|
1184
|
+
}
|
|
1185
|
+
function mr(t, e) {
|
|
1186
|
+
let { extra: n, tags: r, user: o, contexts: s, level: i, transactionName: a } = e, c = E(n);
|
|
1187
|
+
c && Object.keys(c).length && (t.extra = { ...c, ...t.extra });
|
|
1188
|
+
let u = E(r);
|
|
1189
|
+
u && Object.keys(u).length && (t.tags = { ...u, ...t.tags });
|
|
1190
|
+
let f = E(o);
|
|
1191
|
+
f && Object.keys(f).length && (t.user = { ...f, ...t.user });
|
|
1192
|
+
let p = E(s);
|
|
1193
|
+
p && Object.keys(p).length && (t.contexts = { ...p, ...t.contexts }), i && (t.level = i), a && t.type !== "transaction" && (t.transaction = a);
|
|
1194
|
+
}
|
|
1195
|
+
function gr(t, e) {
|
|
1196
|
+
let n = [...t.breadcrumbs || [], ...e];
|
|
1197
|
+
t.breadcrumbs = n.length ? n : void 0;
|
|
1198
|
+
}
|
|
1199
|
+
function hr(t, e) {
|
|
1200
|
+
t.sdkProcessingMetadata = { ...t.sdkProcessingMetadata, ...e };
|
|
1201
|
+
}
|
|
1202
|
+
function _r(t, e) {
|
|
1203
|
+
t.contexts = { trace: Ne(e), ...t.contexts }, t.sdkProcessingMetadata = { dynamicSamplingContext: De(e), ...t.sdkProcessingMetadata };
|
|
1204
|
+
let n = F(e), r = W(n).description;
|
|
1205
|
+
r && !t.transaction && t.type === "transaction" && (t.transaction = r);
|
|
1206
|
+
}
|
|
1207
|
+
function Er(t, e) {
|
|
1208
|
+
t.fingerprint = t.fingerprint ? te(t.fingerprint) : [], e && (t.fingerprint = t.fingerprint.concat(e)), t.fingerprint && !t.fingerprint.length && delete t.fingerprint;
|
|
1209
|
+
}
|
|
1210
|
+
function dn(t, e, n, r, o, s) {
|
|
1211
|
+
let { normalizeDepth: i = 3, normalizeMaxBreadth: a = 1e3 } = t, c = { ...e, event_id: e.event_id || n.event_id || S(), timestamp: e.timestamp || z() }, u = n.integrations || t.integrations.map((I) => I.name);
|
|
1212
|
+
Sr(c, t), Ir(c, u), e.type === void 0 && yr(c, t.stackParser);
|
|
1213
|
+
let f = Ar(r, n.captureContext);
|
|
1214
|
+
n.mechanism && B(c, n.mechanism);
|
|
1215
|
+
let p = o ? o.getEventProcessors() : [], g = Jt().getScopeData();
|
|
1216
|
+
if (s) {
|
|
1217
|
+
let I = s.getScopeData();
|
|
1218
|
+
Et(g, I);
|
|
1219
|
+
}
|
|
1220
|
+
if (f) {
|
|
1221
|
+
let I = f.getScopeData();
|
|
1222
|
+
Et(g, I);
|
|
1223
|
+
}
|
|
1224
|
+
let m = [...n.attachments || [], ...g.attachments];
|
|
1225
|
+
m.length && (n.attachments = m), pn(c, g);
|
|
1226
|
+
let h = [...p, ...g.eventProcessors];
|
|
1227
|
+
return ve(h, c, n).then((I) => (I && Tr(I), typeof i == "number" && i > 0 ? xr(I, i, a) : I));
|
|
1228
|
+
}
|
|
1229
|
+
function Sr(t, e) {
|
|
1230
|
+
let { environment: n, release: r, dist: o, maxValueLength: s = 250 } = e;
|
|
1231
|
+
"environment" in t || (t.environment = "environment" in e ? n : ke), t.release === void 0 && r !== void 0 && (t.release = r), t.dist === void 0 && o !== void 0 && (t.dist = o), t.message && (t.message = k(t.message, s));
|
|
1232
|
+
let i = t.exception && t.exception.values && t.exception.values[0];
|
|
1233
|
+
i && i.value && (i.value = k(i.value, s));
|
|
1234
|
+
let a = t.request;
|
|
1235
|
+
a && a.url && (a.url = k(a.url, s));
|
|
1462
1236
|
}
|
|
1463
|
-
var
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
initSpanRecorder(e = 1e3) {
|
|
1479
|
-
this.spanRecorder || (this.spanRecorder = new we(e)), this.spanRecorder.add(this);
|
|
1480
|
-
}
|
|
1481
|
-
setContext(e, n) {
|
|
1482
|
-
n === null ? delete this._contexts[e] : this._contexts[e] = n;
|
|
1483
|
-
}
|
|
1484
|
-
setMeasurement(e, n, r = "") {
|
|
1485
|
-
this._measurements[e] = { value: n, unit: r };
|
|
1486
|
-
}
|
|
1487
|
-
setMetadata(e) {
|
|
1488
|
-
this.metadata = { ...this.metadata, ...e };
|
|
1489
|
-
}
|
|
1490
|
-
finish(e) {
|
|
1491
|
-
let n = this._finishTransaction(e);
|
|
1492
|
-
if (n) return this._hub.captureEvent(n);
|
|
1493
|
-
}
|
|
1494
|
-
toContext() {
|
|
1495
|
-
let e = super.toContext();
|
|
1496
|
-
return g({ ...e, name: this.name, trimEnd: this._trimEnd });
|
|
1497
|
-
}
|
|
1498
|
-
updateWithContext(e) {
|
|
1499
|
-
return super.updateWithContext(e), this.name = e.name || "", this._trimEnd = e.trimEnd, this;
|
|
1500
|
-
}
|
|
1501
|
-
getDynamicSamplingContext() {
|
|
1502
|
-
if (this._frozenDynamicSamplingContext) return this._frozenDynamicSamplingContext;
|
|
1503
|
-
let e = this._hub || b(), n = e.getClient();
|
|
1504
|
-
if (!n) return {};
|
|
1505
|
-
let r = e.getScope(), s = J(this.traceId, n, r), i = this.metadata.sampleRate;
|
|
1506
|
-
i !== void 0 && (s.sample_rate = `${i}`);
|
|
1507
|
-
let o = this.metadata.source;
|
|
1508
|
-
return o && o !== "url" && (s.transaction = this.name), this.sampled !== void 0 && (s.sampled = String(this.sampled)), s;
|
|
1509
|
-
}
|
|
1510
|
-
setHub(e) {
|
|
1511
|
-
this._hub = e;
|
|
1512
|
-
}
|
|
1513
|
-
_finishTransaction(e) {
|
|
1514
|
-
if (this.endTimestamp !== void 0) return;
|
|
1515
|
-
this.name || ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("Transaction has no name, falling back to `<unlabeled transaction>`."), this.name = "<unlabeled transaction>"), super.finish(e);
|
|
1516
|
-
let n = this._hub.getClient();
|
|
1517
|
-
if (n && n.emit && n.emit("finishTransaction", this), this.sampled !== true) {
|
|
1518
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log("[Tracing] Discarding transaction because its trace was not chosen to be sampled."), n && n.recordDroppedEvent("sample_rate", "transaction");
|
|
1519
|
-
return;
|
|
1237
|
+
var fn = /* @__PURE__ */ new WeakMap();
|
|
1238
|
+
function yr(t, e) {
|
|
1239
|
+
let n = l._sentryDebugIds;
|
|
1240
|
+
if (!n) return;
|
|
1241
|
+
let r, o = fn.get(e);
|
|
1242
|
+
o ? r = o : (r = /* @__PURE__ */ new Map(), fn.set(e, r));
|
|
1243
|
+
let s = Object.keys(n).reduce((i, a) => {
|
|
1244
|
+
let c, u = r.get(a);
|
|
1245
|
+
u ? c = u : (c = e(a), r.set(a, c));
|
|
1246
|
+
for (let f = c.length - 1; f >= 0; f--) {
|
|
1247
|
+
let p = c[f];
|
|
1248
|
+
if (p.filename) {
|
|
1249
|
+
i[p.filename] = n[a];
|
|
1250
|
+
break;
|
|
1251
|
+
}
|
|
1520
1252
|
}
|
|
1521
|
-
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1253
|
+
return i;
|
|
1254
|
+
}, {});
|
|
1255
|
+
try {
|
|
1256
|
+
t.exception.values.forEach((i) => {
|
|
1257
|
+
i.stacktrace.frames.forEach((a) => {
|
|
1258
|
+
a.filename && (a.debug_id = s[a.filename]);
|
|
1259
|
+
});
|
|
1260
|
+
});
|
|
1261
|
+
} catch {
|
|
1525
1262
|
}
|
|
1526
|
-
};
|
|
1527
|
-
function pn(t) {
|
|
1528
|
-
if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) return false;
|
|
1529
|
-
let e = b().getClient(), n = t || e && e.getOptions();
|
|
1530
|
-
return !!n && (n.enableTracing || "tracesSampleRate" in n || "tracesSampler" in n);
|
|
1531
|
-
}
|
|
1532
|
-
function ln(t, e, n) {
|
|
1533
|
-
if (!pn(e)) return t.sampled = false, t;
|
|
1534
|
-
if (t.sampled !== void 0) return t.setMetadata({ sampleRate: Number(t.sampled) }), t;
|
|
1535
|
-
let r;
|
|
1536
|
-
return typeof e.tracesSampler == "function" ? (r = e.tracesSampler(n), t.setMetadata({ sampleRate: Number(r) })) : n.parentSampled !== void 0 ? r = n.parentSampled : typeof e.tracesSampleRate < "u" ? (r = e.tracesSampleRate, t.setMetadata({ sampleRate: Number(r) })) : (r = 1, t.setMetadata({ sampleRate: r })), yr(r) ? r ? (t.sampled = Math.random() < r, t.sampled ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`[Tracing] starting ${t.op} transaction - ${t.name}`), t) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`), t)) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.log(`[Tracing] Discarding transaction because ${typeof e.tracesSampler == "function" ? "tracesSampler returned 0 or false" : "a negative sampling decision was inherited or tracesSampleRate is set to 0"}`), t.sampled = false, t) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn("[Tracing] Discarding transaction because of invalid sample rate."), t.sampled = false, t);
|
|
1537
1263
|
}
|
|
1538
|
-
function
|
|
1539
|
-
|
|
1264
|
+
function Tr(t) {
|
|
1265
|
+
let e = {};
|
|
1266
|
+
try {
|
|
1267
|
+
t.exception.values.forEach((r) => {
|
|
1268
|
+
r.stacktrace.frames.forEach((o) => {
|
|
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
|
+
});
|
|
1271
|
+
});
|
|
1272
|
+
} catch {
|
|
1273
|
+
}
|
|
1274
|
+
if (Object.keys(e).length === 0) return;
|
|
1275
|
+
t.debug_meta = t.debug_meta || {}, t.debug_meta.images = t.debug_meta.images || [];
|
|
1276
|
+
let n = t.debug_meta.images;
|
|
1277
|
+
Object.keys(e).forEach((r) => {
|
|
1278
|
+
n.push({ type: "sourcemap", code_file: r, debug_id: e[r] });
|
|
1279
|
+
});
|
|
1540
1280
|
}
|
|
1541
|
-
function
|
|
1542
|
-
|
|
1543
|
-
return e ? { "sentry-trace": e.toTraceparent() } : {};
|
|
1281
|
+
function Ir(t, e) {
|
|
1282
|
+
e.length > 0 && (t.sdk = t.sdk || {}, t.sdk.integrations = [...t.sdk.integrations || [], ...e]);
|
|
1544
1283
|
}
|
|
1545
|
-
function
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
let o = new ve(t, this);
|
|
1550
|
-
return o = ln(o, r, { parentSampled: t.parentSampled, transactionContext: t, ...e }), o.sampled && o.initSpanRecorder(r._experiments && r._experiments.maxSpans), n && n.emit && n.emit("startTransaction", o), o;
|
|
1284
|
+
function xr(t, e, n) {
|
|
1285
|
+
if (!t) return null;
|
|
1286
|
+
let r = { ...t, ...t.breadcrumbs && { breadcrumbs: t.breadcrumbs.map((o) => ({ ...o, ...o.data && { data: R(o.data, e, n) } })) }, ...t.user && { user: R(t.user, e, n) }, ...t.contexts && { contexts: R(t.contexts, e, n) }, ...t.extra && { extra: R(t.extra, e, n) } };
|
|
1287
|
+
return t.contexts && t.contexts.trace && r.contexts && (r.contexts.trace = t.contexts.trace, t.contexts.trace.data && (r.contexts.trace.data = R(t.contexts.trace.data, e, n))), t.spans && (r.spans = t.spans.map((o) => ({ ...o, ...o.data && { data: R(o.data, e, n) } }))), r;
|
|
1551
1288
|
}
|
|
1552
|
-
function
|
|
1553
|
-
|
|
1554
|
-
|
|
1289
|
+
function Ar(t, e) {
|
|
1290
|
+
if (!e) return t;
|
|
1291
|
+
let n = t ? t.clone() : new A();
|
|
1292
|
+
return n.update(e), n;
|
|
1555
1293
|
}
|
|
1556
|
-
var
|
|
1294
|
+
var Me = class {
|
|
1557
1295
|
constructor(e, n) {
|
|
1558
|
-
this._client = e, this.flushTimeout = 60, this._pendingAggregates = {}, this._isEnabled = true, this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1e3), this._sessionAttrs = n;
|
|
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;
|
|
1559
1297
|
}
|
|
1560
1298
|
flush() {
|
|
1561
1299
|
let e = this.getSessionAggregates();
|
|
@@ -1563,212 +1301,120 @@ var Ce = class {
|
|
|
1563
1301
|
}
|
|
1564
1302
|
getSessionAggregates() {
|
|
1565
1303
|
let e = Object.keys(this._pendingAggregates).map((r) => this._pendingAggregates[parseInt(r)]), n = { attrs: this._sessionAttrs, aggregates: e };
|
|
1566
|
-
return
|
|
1304
|
+
return E(n);
|
|
1567
1305
|
}
|
|
1568
1306
|
close() {
|
|
1569
1307
|
clearInterval(this._intervalId), this._isEnabled = false, this.flush();
|
|
1570
1308
|
}
|
|
1571
1309
|
incrementSessionStatusCount() {
|
|
1572
1310
|
if (!this._isEnabled) return;
|
|
1573
|
-
let e =
|
|
1311
|
+
let e = G(), n = e.getRequestSession();
|
|
1574
1312
|
n && n.status && (this._incrementSessionStatusCount(n.status, /* @__PURE__ */ new Date()), e.setRequestSession(void 0));
|
|
1575
1313
|
}
|
|
1576
1314
|
_incrementSessionStatusCount(e, n) {
|
|
1577
1315
|
let r = new Date(n).setSeconds(0, 0);
|
|
1578
1316
|
this._pendingAggregates[r] = this._pendingAggregates[r] || {};
|
|
1579
|
-
let
|
|
1580
|
-
switch (
|
|
1317
|
+
let o = this._pendingAggregates[r];
|
|
1318
|
+
switch (o.started || (o.started = new Date(r).toISOString()), e) {
|
|
1581
1319
|
case "errored":
|
|
1582
|
-
return
|
|
1320
|
+
return o.errored = (o.errored || 0) + 1, o.errored;
|
|
1583
1321
|
case "ok":
|
|
1584
|
-
return
|
|
1322
|
+
return o.exited = (o.exited || 0) + 1, o.exited;
|
|
1585
1323
|
default:
|
|
1586
|
-
return
|
|
1324
|
+
return o.crashed = (o.crashed || 0) + 1, o.crashed;
|
|
1587
1325
|
}
|
|
1588
1326
|
}
|
|
1589
1327
|
};
|
|
1590
|
-
var
|
|
1591
|
-
function
|
|
1328
|
+
var br = "7";
|
|
1329
|
+
function Rr(t) {
|
|
1592
1330
|
let e = t.protocol ? `${t.protocol}:` : "", n = t.port ? `:${t.port}` : "";
|
|
1593
1331
|
return `${e}//${t.host}${n}${t.path ? `/${t.path}` : ""}/api/`;
|
|
1594
1332
|
}
|
|
1595
|
-
function
|
|
1596
|
-
return `${
|
|
1333
|
+
function Cr(t) {
|
|
1334
|
+
return `${Rr(t)}${t.projectId}/envelope/`;
|
|
1597
1335
|
}
|
|
1598
|
-
function
|
|
1599
|
-
return
|
|
1600
|
-
}
|
|
1601
|
-
function _n(t, e = {}) {
|
|
1602
|
-
let n = typeof e == "string" ? e : e.tunnel, r = typeof e == "string" || !e._metadata ? void 0 : e._metadata.sdk;
|
|
1603
|
-
return n || `${xr(t)}?${Nr(t, r)}`;
|
|
1604
|
-
}
|
|
1605
|
-
function Dr(t, e) {
|
|
1606
|
-
return e && (t.sdk = t.sdk || {}, t.sdk.name = t.sdk.name || e.name, t.sdk.version = t.sdk.version || e.version, t.sdk.integrations = [...t.sdk.integrations || [], ...e.integrations || []], t.sdk.packages = [...t.sdk.packages || [], ...e.packages || []]), t;
|
|
1607
|
-
}
|
|
1608
|
-
function hn(t, e, n, r) {
|
|
1609
|
-
let s = Oe(n), i = { sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...s && { sdk: s }, ...!!r && e && { dsn: C(e) } }, o = "aggregates" in t ? [{ type: "sessions" }, t] : [{ type: "session" }, t.toJSON()];
|
|
1610
|
-
return P(i, [o]);
|
|
1336
|
+
function Or(t, e) {
|
|
1337
|
+
return Je({ sentry_key: t.publicKey, sentry_version: br, ...e && { sentry_client: `${e.name}/${e.version}` } });
|
|
1611
1338
|
}
|
|
1612
|
-
function
|
|
1613
|
-
|
|
1614
|
-
Dr(t, n && n.sdk);
|
|
1615
|
-
let o = ct(t, s, r, e);
|
|
1616
|
-
return delete t.sdkProcessingMetadata, P(o, [[{ type: i }, t]]);
|
|
1339
|
+
function ln(t, e, n) {
|
|
1340
|
+
return e || `${Cr(t)}?${Or(t, n)}`;
|
|
1617
1341
|
}
|
|
1618
|
-
var
|
|
1619
|
-
function
|
|
1342
|
+
var mn = [];
|
|
1343
|
+
function Nr(t) {
|
|
1620
1344
|
let e = {};
|
|
1621
1345
|
return t.forEach((n) => {
|
|
1622
|
-
let { name: r } = n,
|
|
1623
|
-
|
|
1346
|
+
let { name: r } = n, o = e[r];
|
|
1347
|
+
o && !o.isDefaultInstance && n.isDefaultInstance || (e[r] = n);
|
|
1624
1348
|
}), Object.keys(e).map((n) => e[n]);
|
|
1625
1349
|
}
|
|
1626
|
-
function
|
|
1350
|
+
function St(t) {
|
|
1627
1351
|
let e = t.defaultIntegrations || [], n = t.integrations;
|
|
1628
|
-
e.forEach((
|
|
1629
|
-
|
|
1352
|
+
e.forEach((i) => {
|
|
1353
|
+
i.isDefaultInstance = true;
|
|
1630
1354
|
});
|
|
1631
1355
|
let r;
|
|
1632
|
-
Array.isArray(n) ? r = [...e, ...n] : typeof n == "function" ? r =
|
|
1633
|
-
let
|
|
1634
|
-
if (
|
|
1635
|
-
let [
|
|
1636
|
-
|
|
1356
|
+
Array.isArray(n) ? r = [...e, ...n] : typeof n == "function" ? r = te(n(e)) : r = e;
|
|
1357
|
+
let o = Nr(r), s = kr(o, (i) => i.name === "Debug");
|
|
1358
|
+
if (s !== -1) {
|
|
1359
|
+
let [i] = o.splice(s, 1);
|
|
1360
|
+
o.push(i);
|
|
1637
1361
|
}
|
|
1638
|
-
return
|
|
1362
|
+
return o;
|
|
1639
1363
|
}
|
|
1640
|
-
function
|
|
1364
|
+
function gn(t, e) {
|
|
1641
1365
|
let n = {};
|
|
1642
1366
|
return e.forEach((r) => {
|
|
1643
|
-
r &&
|
|
1367
|
+
r && Tt(t, r, n);
|
|
1644
1368
|
}), n;
|
|
1645
1369
|
}
|
|
1646
|
-
function
|
|
1647
|
-
|
|
1370
|
+
function yt(t, e) {
|
|
1371
|
+
for (let n of e) n && n.afterAllSetup && n.afterAllSetup(t);
|
|
1372
|
+
}
|
|
1373
|
+
function Tt(t, e, n) {
|
|
1374
|
+
if (n[e.name]) {
|
|
1375
|
+
_ && d.log(`Integration skipped because it was already installed: ${e.name}`);
|
|
1376
|
+
return;
|
|
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(t), typeof e.preprocessEvent == "function") {
|
|
1648
1379
|
let r = e.preprocessEvent.bind(e);
|
|
1649
|
-
t.on("preprocessEvent", (
|
|
1380
|
+
t.on("preprocessEvent", (o, s) => r(o, s, t));
|
|
1650
1381
|
}
|
|
1651
|
-
if (
|
|
1652
|
-
let r = e.processEvent.bind(e),
|
|
1653
|
-
t.addEventProcessor(
|
|
1382
|
+
if (typeof e.processEvent == "function") {
|
|
1383
|
+
let r = e.processEvent.bind(e), o = Object.assign((s, i) => r(s, i, t), { id: e.name });
|
|
1384
|
+
t.addEventProcessor(o);
|
|
1654
1385
|
}
|
|
1655
|
-
|
|
1386
|
+
_ && d.log(`Integration installed: ${e.name}`);
|
|
1656
1387
|
}
|
|
1657
|
-
function
|
|
1388
|
+
function kr(t, e) {
|
|
1658
1389
|
for (let n = 0; n < t.length; n++) if (e(t[n]) === true) return n;
|
|
1659
1390
|
return -1;
|
|
1660
1391
|
}
|
|
1661
|
-
|
|
1662
|
-
let { normalizeDepth: i = 3, normalizeMaxBreadth: o = 1e3 } = t, a = { ...e, event_id: e.event_id || n.event_id || h(), timestamp: e.timestamp || B() }, c = n.integrations || t.integrations.map((l) => l.name);
|
|
1663
|
-
Ar(a, t), Cr(a, c), e.type === void 0 && wr(a, t.stackParser);
|
|
1664
|
-
let u = r;
|
|
1665
|
-
n.captureContext && (u = k.clone(u).update(n.captureContext));
|
|
1666
|
-
let f = T(a), d = s && s.getEventProcessors ? s.getEventProcessors() : [];
|
|
1667
|
-
if (u) {
|
|
1668
|
-
if (u.getAttachments) {
|
|
1669
|
-
let l = [...n.attachments || [], ...u.getAttachments()];
|
|
1670
|
-
l.length && (n.attachments = l);
|
|
1671
|
-
}
|
|
1672
|
-
f = u.applyToEvent(a, n, d);
|
|
1673
|
-
} else f = K([...d, ...ue()], a, n);
|
|
1674
|
-
return f.then((l) => (l && vr(l), typeof i == "number" && i > 0 ? Pr(l, i, o) : l));
|
|
1675
|
-
}
|
|
1676
|
-
function Ar(t, e) {
|
|
1677
|
-
let { environment: n, release: r, dist: s, maxValueLength: i = 250 } = e;
|
|
1678
|
-
"environment" in t || (t.environment = "environment" in e ? n : z), t.release === void 0 && r !== void 0 && (t.release = r), t.dist === void 0 && s !== void 0 && (t.dist = s), t.message && (t.message = v(t.message, i));
|
|
1679
|
-
let o = t.exception && t.exception.values && t.exception.values[0];
|
|
1680
|
-
o && o.value && (o.value = v(o.value, i));
|
|
1681
|
-
let a = t.request;
|
|
1682
|
-
a && a.url && (a.url = v(a.url, i));
|
|
1683
|
-
}
|
|
1684
|
-
var yn = /* @__PURE__ */ new WeakMap();
|
|
1685
|
-
function wr(t, e) {
|
|
1686
|
-
let n = m._sentryDebugIds;
|
|
1687
|
-
if (!n) return;
|
|
1688
|
-
let r, s = yn.get(e);
|
|
1689
|
-
s ? r = s : (r = /* @__PURE__ */ new Map(), yn.set(e, r));
|
|
1690
|
-
let i = Object.keys(n).reduce((o, a) => {
|
|
1691
|
-
let c, u = r.get(a);
|
|
1692
|
-
u ? c = u : (c = e(a), r.set(a, c));
|
|
1693
|
-
for (let f = c.length - 1; f >= 0; f--) {
|
|
1694
|
-
let d = c[f];
|
|
1695
|
-
if (d.filename) {
|
|
1696
|
-
o[d.filename] = n[a];
|
|
1697
|
-
break;
|
|
1698
|
-
}
|
|
1699
|
-
}
|
|
1700
|
-
return o;
|
|
1701
|
-
}, {});
|
|
1702
|
-
try {
|
|
1703
|
-
t.exception.values.forEach((o) => {
|
|
1704
|
-
o.stacktrace.frames.forEach((a) => {
|
|
1705
|
-
a.filename && (a.debug_id = i[a.filename]);
|
|
1706
|
-
});
|
|
1707
|
-
});
|
|
1708
|
-
} catch {
|
|
1709
|
-
}
|
|
1710
|
-
}
|
|
1711
|
-
function vr(t) {
|
|
1712
|
-
let e = {};
|
|
1713
|
-
try {
|
|
1714
|
-
t.exception.values.forEach((r) => {
|
|
1715
|
-
r.stacktrace.frames.forEach((s) => {
|
|
1716
|
-
s.debug_id && (s.abs_path ? e[s.abs_path] = s.debug_id : s.filename && (e[s.filename] = s.debug_id), delete s.debug_id);
|
|
1717
|
-
});
|
|
1718
|
-
});
|
|
1719
|
-
} catch {
|
|
1720
|
-
}
|
|
1721
|
-
if (Object.keys(e).length === 0) return;
|
|
1722
|
-
t.debug_meta = t.debug_meta || {}, t.debug_meta.images = t.debug_meta.images || [];
|
|
1723
|
-
let n = t.debug_meta.images;
|
|
1724
|
-
Object.keys(e).forEach((r) => {
|
|
1725
|
-
n.push({ type: "sourcemap", code_file: r, debug_id: e[r] });
|
|
1726
|
-
});
|
|
1727
|
-
}
|
|
1728
|
-
function Cr(t, e) {
|
|
1729
|
-
e.length > 0 && (t.sdk = t.sdk || {}, t.sdk.integrations = [...t.sdk.integrations || [], ...e]);
|
|
1730
|
-
}
|
|
1731
|
-
function Pr(t, e, n) {
|
|
1732
|
-
if (!t) return null;
|
|
1733
|
-
let r = { ...t, ...t.breadcrumbs && { breadcrumbs: t.breadcrumbs.map((s) => ({ ...s, ...s.data && { data: D(s.data, e, n) } })) }, ...t.user && { user: D(t.user, e, n) }, ...t.contexts && { contexts: D(t.contexts, e, n) }, ...t.extra && { extra: D(t.extra, e, n) } };
|
|
1734
|
-
return t.contexts && t.contexts.trace && r.contexts && (r.contexts.trace = t.contexts.trace, t.contexts.trace.data && (r.contexts.trace.data = D(t.contexts.trace.data, e, n))), t.spans && (r.spans = t.spans.map((s) => (s.data && (s.data = D(s.data, e, n)), s))), r;
|
|
1735
|
-
}
|
|
1736
|
-
var bn = "Not capturing exception because it's already been captured.";
|
|
1392
|
+
var hn = "Not capturing exception because it's already been captured.";
|
|
1737
1393
|
var Pe = class {
|
|
1738
1394
|
constructor(e) {
|
|
1739
|
-
if (this._options = e, this._integrations = {}, this.
|
|
1740
|
-
let n =
|
|
1741
|
-
this._transport = e.transport({ recordDroppedEvent: this.recordDroppedEvent.bind(this), ...e.transportOptions, url: n });
|
|
1395
|
+
if (this._options = e, this._integrations = {}, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = me(e.dsn) : _ && d.warn("No DSN provided, client will not send events."), this._dsn) {
|
|
1396
|
+
let n = ln(this._dsn, e.tunnel, e._metadata ? e._metadata.sdk : void 0);
|
|
1397
|
+
this._transport = e.transport({ tunnel: this._options.tunnel, recordDroppedEvent: this.recordDroppedEvent.bind(this), ...e.transportOptions, url: n });
|
|
1742
1398
|
}
|
|
1743
1399
|
}
|
|
1744
1400
|
captureException(e, n, r) {
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
let s = n && n.event_id;
|
|
1750
|
-
return this._process(this.eventFromException(e, n).then((i) => this._captureEvent(i, n, r)).then((i) => {
|
|
1751
|
-
s = i;
|
|
1752
|
-
})), s;
|
|
1401
|
+
let o = S();
|
|
1402
|
+
if (Ae(e)) return _ && d.log(hn), o;
|
|
1403
|
+
let s = { event_id: o, ...n };
|
|
1404
|
+
return this._process(this.eventFromException(e, s).then((i) => this._captureEvent(i, s, r))), s.event_id;
|
|
1753
1405
|
}
|
|
1754
|
-
captureMessage(e, n, r,
|
|
1755
|
-
let
|
|
1756
|
-
return this._process(
|
|
1757
|
-
i = a;
|
|
1758
|
-
})), i;
|
|
1406
|
+
captureMessage(e, n, r, o) {
|
|
1407
|
+
let s = { event_id: S(), ...r }, i = H(e) ? e : String(e), a = de(e) ? this.eventFromMessage(i, n, s) : this.eventFromException(e, s);
|
|
1408
|
+
return this._process(a.then((c) => this._captureEvent(c, s, o))), s.event_id;
|
|
1759
1409
|
}
|
|
1760
1410
|
captureEvent(e, n, r) {
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
let s = n && n.event_id;
|
|
1766
|
-
return this._process(this._captureEvent(e, n, r).then((i) => {
|
|
1767
|
-
s = i;
|
|
1768
|
-
})), s;
|
|
1411
|
+
let o = S();
|
|
1412
|
+
if (n && n.originalException && Ae(n.originalException)) return _ && d.log(hn), o;
|
|
1413
|
+
let s = { event_id: o, ...n }, a = (e.sdkProcessingMetadata || {}).capturedSpanScope;
|
|
1414
|
+
return this._process(this._captureEvent(e, s, a || r)), s.event_id;
|
|
1769
1415
|
}
|
|
1770
1416
|
captureSession(e) {
|
|
1771
|
-
typeof e.release != "string" ?
|
|
1417
|
+
typeof e.release != "string" ? _ && d.warn("Discarded session because of missing or non-string release") : (this.sendSession(e), oe(e, { init: false }));
|
|
1772
1418
|
}
|
|
1773
1419
|
getDsn() {
|
|
1774
1420
|
return this._dsn;
|
|
@@ -1784,10 +1430,10 @@ var Pe = class {
|
|
|
1784
1430
|
}
|
|
1785
1431
|
flush(e) {
|
|
1786
1432
|
let n = this._transport;
|
|
1787
|
-
return n ? this._isClientDoneProcessing(e).then((r) => n.flush(e).then((
|
|
1433
|
+
return n ? (this.emit("flush"), this._isClientDoneProcessing(e).then((r) => n.flush(e).then((o) => r && o))) : x(true);
|
|
1788
1434
|
}
|
|
1789
1435
|
close(e) {
|
|
1790
|
-
return this.flush(e).then((n) => (this.getOptions().enabled = false, n));
|
|
1436
|
+
return this.flush(e).then((n) => (this.getOptions().enabled = false, this.emit("close"), n));
|
|
1791
1437
|
}
|
|
1792
1438
|
getEventProcessors() {
|
|
1793
1439
|
return this._eventProcessors;
|
|
@@ -1795,37 +1441,31 @@ var Pe = class {
|
|
|
1795
1441
|
addEventProcessor(e) {
|
|
1796
1442
|
this._eventProcessors.push(e);
|
|
1797
1443
|
}
|
|
1798
|
-
|
|
1799
|
-
|
|
1444
|
+
init() {
|
|
1445
|
+
this._isEnabled() && this._setupIntegrations();
|
|
1800
1446
|
}
|
|
1801
|
-
|
|
1447
|
+
getIntegrationByName(e) {
|
|
1802
1448
|
return this._integrations[e];
|
|
1803
1449
|
}
|
|
1804
|
-
getIntegration(e) {
|
|
1805
|
-
try {
|
|
1806
|
-
return this._integrations[e.id] || null;
|
|
1807
|
-
} catch {
|
|
1808
|
-
return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.warn(`Cannot retrieve integration ${e.id} from the current Client`), null;
|
|
1809
|
-
}
|
|
1810
|
-
}
|
|
1811
1450
|
addIntegration(e) {
|
|
1812
|
-
|
|
1451
|
+
let n = this._integrations[e.name];
|
|
1452
|
+
Tt(this, e, this._integrations), n || yt(this, [e]);
|
|
1813
1453
|
}
|
|
1814
1454
|
sendEvent(e, n = {}) {
|
|
1815
1455
|
this.emit("beforeSendEvent", e, n);
|
|
1816
|
-
let r =
|
|
1817
|
-
for (let
|
|
1818
|
-
let
|
|
1819
|
-
|
|
1456
|
+
let r = un(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
1457
|
+
for (let s of n.attachments || []) r = ot(r, it(s));
|
|
1458
|
+
let o = this.sendEnvelope(r);
|
|
1459
|
+
o && o.then((s) => this.emit("afterSendEvent", e, s), null);
|
|
1820
1460
|
}
|
|
1821
1461
|
sendSession(e) {
|
|
1822
|
-
let n =
|
|
1823
|
-
this.
|
|
1462
|
+
let n = cn(e, this._dsn, this._options._metadata, this._options.tunnel);
|
|
1463
|
+
this.sendEnvelope(n);
|
|
1824
1464
|
}
|
|
1825
1465
|
recordDroppedEvent(e, n, r) {
|
|
1826
1466
|
if (this._options.sendClientReports) {
|
|
1827
|
-
let
|
|
1828
|
-
|
|
1467
|
+
let o = `${e}:${n}`;
|
|
1468
|
+
_ && d.log(`Adding outcome: "${o}"`), this._outcomes[o] = this._outcomes[o] + 1 || 1;
|
|
1829
1469
|
}
|
|
1830
1470
|
}
|
|
1831
1471
|
on(e, n) {
|
|
@@ -1834,11 +1474,18 @@ var Pe = class {
|
|
|
1834
1474
|
emit(e, ...n) {
|
|
1835
1475
|
this._hooks[e] && this._hooks[e].forEach((r) => r(...n));
|
|
1836
1476
|
}
|
|
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"), x({}));
|
|
1479
|
+
}
|
|
1480
|
+
_setupIntegrations() {
|
|
1481
|
+
let { integrations: e } = this._options;
|
|
1482
|
+
this._integrations = gn(this, e), yt(this, e);
|
|
1483
|
+
}
|
|
1837
1484
|
_updateSessionFromEvent(e, n) {
|
|
1838
|
-
let r = false,
|
|
1839
|
-
if (
|
|
1840
|
-
|
|
1841
|
-
for (let c of
|
|
1485
|
+
let r = false, o = false, s = n.exception && n.exception.values;
|
|
1486
|
+
if (s) {
|
|
1487
|
+
o = true;
|
|
1488
|
+
for (let c of s) {
|
|
1842
1489
|
let u = c.mechanism;
|
|
1843
1490
|
if (u && u.handled === false) {
|
|
1844
1491
|
r = true;
|
|
@@ -1846,133 +1493,139 @@ var Pe = class {
|
|
|
1846
1493
|
}
|
|
1847
1494
|
}
|
|
1848
1495
|
}
|
|
1849
|
-
let
|
|
1850
|
-
(
|
|
1496
|
+
let i = e.status === "ok";
|
|
1497
|
+
(i && e.errors === 0 || i && r) && (oe(e, { ...r && { status: "crashed" }, errors: e.errors || Number(o || r) }), this.captureSession(e));
|
|
1851
1498
|
}
|
|
1852
1499
|
_isClientDoneProcessing(e) {
|
|
1853
|
-
return new
|
|
1854
|
-
let r = 0,
|
|
1855
|
-
this._numProcessing == 0 ? (clearInterval(
|
|
1856
|
-
},
|
|
1500
|
+
return new y((n) => {
|
|
1501
|
+
let r = 0, o = 1, s = setInterval(() => {
|
|
1502
|
+
this._numProcessing == 0 ? (clearInterval(s), n(true)) : (r += o, e && r >= e && (clearInterval(s), n(false)));
|
|
1503
|
+
}, o);
|
|
1857
1504
|
});
|
|
1858
1505
|
}
|
|
1859
1506
|
_isEnabled() {
|
|
1860
1507
|
return this.getOptions().enabled !== false && this._transport !== void 0;
|
|
1861
1508
|
}
|
|
1862
|
-
_prepareEvent(e, n, r) {
|
|
1509
|
+
_prepareEvent(e, n, r, o = G()) {
|
|
1863
1510
|
let s = this.getOptions(), i = Object.keys(this._integrations);
|
|
1864
|
-
return !n.integrations && i.length > 0 && (n.integrations = i), this.emit("preprocessEvent", e, n),
|
|
1865
|
-
if (
|
|
1866
|
-
let {
|
|
1867
|
-
if (!(
|
|
1868
|
-
let { traceId:
|
|
1869
|
-
|
|
1870
|
-
let
|
|
1871
|
-
|
|
1511
|
+
return !n.integrations && i.length > 0 && (n.integrations = i), this.emit("preprocessEvent", e, n), e.type || o.setLastEventId(e.event_id || n.event_id), dn(s, e, n, r, this, o).then((a) => {
|
|
1512
|
+
if (a === null) return a;
|
|
1513
|
+
let c = { ...o.getPropagationContext(), ...r ? r.getPropagationContext() : void 0 };
|
|
1514
|
+
if (!(a.contexts && a.contexts.trace) && c) {
|
|
1515
|
+
let { traceId: f, spanId: p, parentSpanId: g, dsc: m } = c;
|
|
1516
|
+
a.contexts = { trace: E({ trace_id: f, span_id: p, parent_span_id: g }), ...a.contexts };
|
|
1517
|
+
let h = m || ae(f, this);
|
|
1518
|
+
a.sdkProcessingMetadata = { dynamicSamplingContext: h, ...a.sdkProcessingMetadata };
|
|
1872
1519
|
}
|
|
1873
|
-
return
|
|
1520
|
+
return a;
|
|
1874
1521
|
});
|
|
1875
1522
|
}
|
|
1876
1523
|
_captureEvent(e, n = {}, r) {
|
|
1877
|
-
return this._processEvent(e, n, r).then((
|
|
1878
|
-
if (
|
|
1879
|
-
let
|
|
1880
|
-
|
|
1524
|
+
return this._processEvent(e, n, r).then((o) => o.event_id, (o) => {
|
|
1525
|
+
if (_) {
|
|
1526
|
+
let s = o;
|
|
1527
|
+
s.logLevel === "log" ? d.log(s.message) : d.warn(s);
|
|
1881
1528
|
}
|
|
1882
1529
|
});
|
|
1883
1530
|
}
|
|
1884
1531
|
_processEvent(e, n, r) {
|
|
1885
|
-
let
|
|
1886
|
-
if (a && typeof
|
|
1887
|
-
let
|
|
1888
|
-
return this._prepareEvent(e, n, r).then((
|
|
1889
|
-
if (
|
|
1890
|
-
if (n.data && n.data.__sentry__ === true) return
|
|
1891
|
-
let
|
|
1892
|
-
return
|
|
1893
|
-
}).then((
|
|
1894
|
-
if (
|
|
1895
|
-
let
|
|
1896
|
-
!
|
|
1897
|
-
let
|
|
1898
|
-
if (
|
|
1899
|
-
let
|
|
1900
|
-
|
|
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 T(`Discarding event because it's not included in the random sample (sampling rate = ${s})`, "log"));
|
|
1534
|
+
let p = c === "replay_event" ? "replay" : c, m = (e.sdkProcessingMetadata || {}).capturedSpanIsolationScope;
|
|
1535
|
+
return this._prepareEvent(e, n, r, m).then((h) => {
|
|
1536
|
+
if (h === null) throw this.recordDroppedEvent("event_processor", p, e), new T("An event processor returned `null`, will not send event.", "log");
|
|
1537
|
+
if (n.data && n.data.__sentry__ === true) return h;
|
|
1538
|
+
let I = vr(o, h, n);
|
|
1539
|
+
return Dr(I, u);
|
|
1540
|
+
}).then((h) => {
|
|
1541
|
+
if (h === null) throw this.recordDroppedEvent("before_send", p, e), new T(`${u} returned \`null\`, will not send event.`, "log");
|
|
1542
|
+
let pe = r && r.getSession();
|
|
1543
|
+
!i && pe && this._updateSessionFromEvent(pe, h);
|
|
1544
|
+
let I = h.transaction_info;
|
|
1545
|
+
if (i && I && h.transaction !== e.transaction) {
|
|
1546
|
+
let On = "custom";
|
|
1547
|
+
h.transaction_info = { ...I, source: On };
|
|
1901
1548
|
}
|
|
1902
|
-
return this.sendEvent(
|
|
1903
|
-
}).then(null, (
|
|
1904
|
-
throw
|
|
1905
|
-
Reason: ${
|
|
1549
|
+
return this.sendEvent(h, n), h;
|
|
1550
|
+
}).then(null, (h) => {
|
|
1551
|
+
throw h instanceof T ? h : (this.captureException(h, { data: { __sentry__: true }, originalException: h }), new T(`Event processing pipeline threw an error, original event will not be sent. Details have been sent as a new event.
|
|
1552
|
+
Reason: ${h}`));
|
|
1906
1553
|
});
|
|
1907
1554
|
}
|
|
1908
1555
|
_process(e) {
|
|
1909
1556
|
this._numProcessing++, e.then((n) => (this._numProcessing--, n), (n) => (this._numProcessing--, n));
|
|
1910
1557
|
}
|
|
1911
|
-
_sendEnvelope(e) {
|
|
1912
|
-
if (this.emit("beforeEnvelope", e), this._isEnabled() && this._transport) return this._transport.send(e).then(null, (n) => {
|
|
1913
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.error("Error while sending event:", n);
|
|
1914
|
-
});
|
|
1915
|
-
(typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && p.error("Transport disabled");
|
|
1916
|
-
}
|
|
1917
1558
|
_clearOutcomes() {
|
|
1918
1559
|
let e = this._outcomes;
|
|
1919
1560
|
return this._outcomes = {}, Object.keys(e).map((n) => {
|
|
1920
|
-
let [r,
|
|
1921
|
-
return { reason: r, category:
|
|
1561
|
+
let [r, o] = n.split(":");
|
|
1562
|
+
return { reason: r, category: o, quantity: e[n] };
|
|
1922
1563
|
});
|
|
1923
1564
|
}
|
|
1924
1565
|
};
|
|
1925
|
-
function
|
|
1566
|
+
function Dr(t, e) {
|
|
1926
1567
|
let n = `${e} must return \`null\` or a valid event.`;
|
|
1927
|
-
if (
|
|
1928
|
-
if (!
|
|
1568
|
+
if (C(t)) return t.then((r) => {
|
|
1569
|
+
if (!b(r) && r !== null) throw new T(n);
|
|
1929
1570
|
return r;
|
|
1930
1571
|
}, (r) => {
|
|
1931
|
-
throw new
|
|
1572
|
+
throw new T(`${e} rejected with ${r}`);
|
|
1932
1573
|
});
|
|
1933
|
-
if (!
|
|
1574
|
+
if (!b(t) && t !== null) throw new T(n);
|
|
1934
1575
|
return t;
|
|
1935
1576
|
}
|
|
1936
|
-
function
|
|
1937
|
-
let { beforeSend: r, beforeSendTransaction: s } = t;
|
|
1938
|
-
|
|
1577
|
+
function vr(t, e, n) {
|
|
1578
|
+
let { beforeSend: r, beforeSendTransaction: o, beforeSendSpan: s } = t;
|
|
1579
|
+
if (_n(e) && r) return r(e, n);
|
|
1580
|
+
if (En(e)) {
|
|
1581
|
+
if (e.spans && s) {
|
|
1582
|
+
let i = [];
|
|
1583
|
+
for (let a of e.spans) {
|
|
1584
|
+
let c = s(a);
|
|
1585
|
+
c && i.push(c);
|
|
1586
|
+
}
|
|
1587
|
+
e.spans = i;
|
|
1588
|
+
}
|
|
1589
|
+
if (o) return o(e, n);
|
|
1590
|
+
}
|
|
1591
|
+
return e;
|
|
1939
1592
|
}
|
|
1940
|
-
function
|
|
1593
|
+
function _n(t) {
|
|
1941
1594
|
return t.type === void 0;
|
|
1942
1595
|
}
|
|
1943
|
-
function
|
|
1596
|
+
function En(t) {
|
|
1944
1597
|
return t.type === "transaction";
|
|
1945
1598
|
}
|
|
1946
|
-
function
|
|
1947
|
-
let
|
|
1948
|
-
n && n.sdk && (
|
|
1949
|
-
let
|
|
1950
|
-
return P(
|
|
1599
|
+
function Sn(t, e, n, r, o) {
|
|
1600
|
+
let s = { sent_at: (/* @__PURE__ */ new Date()).toISOString() };
|
|
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 = Mr(t);
|
|
1603
|
+
return P(s, [i]);
|
|
1951
1604
|
}
|
|
1952
|
-
function
|
|
1605
|
+
function Mr(t) {
|
|
1953
1606
|
return [{ type: "check_in" }, t];
|
|
1954
1607
|
}
|
|
1955
|
-
var
|
|
1608
|
+
var ue = class extends Pe {
|
|
1956
1609
|
constructor(e) {
|
|
1957
|
-
|
|
1610
|
+
sn(), super(e);
|
|
1958
1611
|
}
|
|
1959
1612
|
eventFromException(e, n) {
|
|
1960
|
-
return
|
|
1613
|
+
return x(ft(this, this._options.stackParser, e, n));
|
|
1961
1614
|
}
|
|
1962
1615
|
eventFromMessage(e, n = "info", r) {
|
|
1963
|
-
return
|
|
1616
|
+
return x(dt(this._options.stackParser, e, n, r, this._options.attachStacktrace));
|
|
1964
1617
|
}
|
|
1965
1618
|
captureException(e, n, r) {
|
|
1966
|
-
if (this._options.autoSessionTracking && this._sessionFlusher
|
|
1967
|
-
let
|
|
1968
|
-
|
|
1619
|
+
if (this._options.autoSessionTracking && this._sessionFlusher) {
|
|
1620
|
+
let o = G().getRequestSession();
|
|
1621
|
+
o && o.status === "ok" && (o.status = "errored");
|
|
1969
1622
|
}
|
|
1970
1623
|
return super.captureException(e, n, r);
|
|
1971
1624
|
}
|
|
1972
1625
|
captureEvent(e, n, r) {
|
|
1973
|
-
if (this._options.autoSessionTracking && this._sessionFlusher &&
|
|
1974
|
-
let
|
|
1975
|
-
|
|
1626
|
+
if (this._options.autoSessionTracking && this._sessionFlusher && (e.type || "exception") === "exception" && e.exception && e.exception.values && e.exception.values.length > 0) {
|
|
1627
|
+
let i = G().getRequestSession();
|
|
1628
|
+
i && i.status === "ok" && (i.status = "errored");
|
|
1976
1629
|
}
|
|
1977
1630
|
return super.captureEvent(e, n, r);
|
|
1978
1631
|
}
|
|
@@ -1981,198 +1634,209 @@ var de = class extends Pe {
|
|
|
1981
1634
|
}
|
|
1982
1635
|
initSessionFlusher() {
|
|
1983
1636
|
let { release: e, environment: n } = this._options;
|
|
1984
|
-
e ? this._sessionFlusher = new
|
|
1637
|
+
e ? this._sessionFlusher = new Me(this, { release: e, environment: n }) : _ && d.warn("Cannot initialise an instance of SessionFlusher if no release is provided!");
|
|
1985
1638
|
}
|
|
1986
1639
|
captureCheckIn(e, n, r) {
|
|
1987
|
-
let
|
|
1988
|
-
if (!this._isEnabled()) return
|
|
1989
|
-
let
|
|
1990
|
-
|
|
1991
|
-
let [f,
|
|
1992
|
-
|
|
1993
|
-
let
|
|
1994
|
-
return
|
|
1640
|
+
let o = "checkInId" in e && e.checkInId ? e.checkInId : S();
|
|
1641
|
+
if (!this._isEnabled()) return _ && d.warn("SDK not enabled, will not capture checkin."), o;
|
|
1642
|
+
let s = this.getOptions(), { release: i, environment: a, tunnel: c } = s, u = { check_in_id: o, monitor_slug: e.monitorSlug, status: e.status, release: i, environment: a };
|
|
1643
|
+
"duration" in e && (u.duration = e.duration), n && (u.monitor_config = { schedule: n.schedule, checkin_margin: n.checkinMargin, max_runtime: n.maxRuntime, timezone: n.timezone, failure_issue_threshold: n.failureIssueThreshold, recovery_threshold: n.recoveryThreshold });
|
|
1644
|
+
let [f, p] = this._getTraceInfoFromScope(r);
|
|
1645
|
+
p && (u.contexts = { trace: p });
|
|
1646
|
+
let g = Sn(u, f, this.getSdkMetadata(), c, this.getDsn());
|
|
1647
|
+
return _ && d.info("Sending checkin:", e.monitorSlug, e.status), this.sendEnvelope(g), o;
|
|
1995
1648
|
}
|
|
1996
1649
|
_captureRequestSession() {
|
|
1997
|
-
this._sessionFlusher ? this._sessionFlusher.incrementSessionStatusCount() :
|
|
1650
|
+
this._sessionFlusher ? this._sessionFlusher.incrementSessionStatusCount() : _ && d.warn("Discarded request mode session because autoSessionTracking option was disabled");
|
|
1998
1651
|
}
|
|
1999
|
-
_prepareEvent(e, n, r) {
|
|
2000
|
-
return this._options.platform && (e.platform = e.platform || this._options.platform), this._options.runtime && (e.contexts = { ...e.contexts, runtime: (e.contexts || {}).runtime || this._options.runtime }), this._options.serverName && (e.server_name = e.server_name || this._options.serverName), super._prepareEvent(e, n, r);
|
|
1652
|
+
_prepareEvent(e, n, r, o) {
|
|
1653
|
+
return this._options.platform && (e.platform = e.platform || this._options.platform), this._options.runtime && (e.contexts = { ...e.contexts, runtime: (e.contexts || {}).runtime || this._options.runtime }), this._options.serverName && (e.server_name = e.server_name || this._options.serverName), super._prepareEvent(e, n, r, o);
|
|
2001
1654
|
}
|
|
2002
1655
|
_getTraceInfoFromScope(e) {
|
|
2003
1656
|
if (!e) return [void 0, void 0];
|
|
2004
|
-
let n = e
|
|
2005
|
-
if (n)
|
|
2006
|
-
|
|
2007
|
-
|
|
1657
|
+
let n = j(e);
|
|
1658
|
+
if (n) {
|
|
1659
|
+
let c = F(n);
|
|
1660
|
+
return [De(c), Ne(c)];
|
|
1661
|
+
}
|
|
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] : [ae(r, this), a];
|
|
2008
1664
|
}
|
|
2009
1665
|
};
|
|
2010
|
-
var
|
|
2011
|
-
function
|
|
2012
|
-
let r = {},
|
|
2013
|
-
function i
|
|
1666
|
+
var Pr = 64;
|
|
1667
|
+
function It(t, e, n = tt(t.bufferSize || Pr)) {
|
|
1668
|
+
let r = {}, o = (i) => n.drain(i);
|
|
1669
|
+
function s(i) {
|
|
2014
1670
|
let a = [];
|
|
2015
|
-
if (
|
|
2016
|
-
let
|
|
2017
|
-
if (
|
|
2018
|
-
let
|
|
2019
|
-
t.recordDroppedEvent("ratelimit_backoff",
|
|
2020
|
-
} else a.push(
|
|
2021
|
-
}), a.length === 0) return
|
|
2022
|
-
let c = P(
|
|
2023
|
-
|
|
2024
|
-
let
|
|
2025
|
-
t.recordDroppedEvent(
|
|
1671
|
+
if (be(i, (p, g) => {
|
|
1672
|
+
let m = Re(g);
|
|
1673
|
+
if (ct(r, m)) {
|
|
1674
|
+
let h = yn(p, g);
|
|
1675
|
+
t.recordDroppedEvent("ratelimit_backoff", m, h);
|
|
1676
|
+
} else a.push(p);
|
|
1677
|
+
}), a.length === 0) return x({});
|
|
1678
|
+
let c = P(i[0], a), u = (p) => {
|
|
1679
|
+
be(c, (g, m) => {
|
|
1680
|
+
let h = yn(g, m);
|
|
1681
|
+
t.recordDroppedEvent(p, Re(m), h);
|
|
2026
1682
|
});
|
|
2027
|
-
}, f = () => e({ body:
|
|
2028
|
-
throw u("network_error"),
|
|
1683
|
+
}, f = () => e({ body: st(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 = ut(r, p), p), (p) => {
|
|
1684
|
+
throw u("network_error"), p;
|
|
2029
1685
|
});
|
|
2030
|
-
return n.add(f).then((
|
|
2031
|
-
if (
|
|
2032
|
-
throw
|
|
1686
|
+
return n.add(f).then((p) => p, (p) => {
|
|
1687
|
+
if (p instanceof T) return _ && d.error("Skipped sending event because buffer is full."), u("queue_overflow"), x({});
|
|
1688
|
+
throw p;
|
|
2033
1689
|
});
|
|
2034
1690
|
}
|
|
2035
|
-
return
|
|
1691
|
+
return { send: s, flush: o };
|
|
2036
1692
|
}
|
|
2037
|
-
function
|
|
1693
|
+
function yn(t, e) {
|
|
2038
1694
|
if (!(e !== "event" && e !== "transaction")) return Array.isArray(t) ? t[1] : void 0;
|
|
2039
1695
|
}
|
|
2040
|
-
|
|
1696
|
+
var wr = "RewriteFrames";
|
|
1697
|
+
var we = (t = {}) => {
|
|
1698
|
+
let e = t.root, n = t.prefix || "app:///", r = "window" in l && l.window !== void 0, o = t.iteratee || Fr({ isBrowser: r, root: e, prefix: n });
|
|
1699
|
+
function s(a) {
|
|
1700
|
+
try {
|
|
1701
|
+
return { ...a, exception: { ...a.exception, values: a.exception.values.map((c) => ({ ...c, ...c.stacktrace && { stacktrace: i(c.stacktrace) } })) } };
|
|
1702
|
+
} catch {
|
|
1703
|
+
return a;
|
|
1704
|
+
}
|
|
1705
|
+
}
|
|
1706
|
+
function i(a) {
|
|
1707
|
+
return { ...a, frames: a && a.frames && a.frames.map((c) => o(c)) };
|
|
1708
|
+
}
|
|
1709
|
+
return { name: wr, processEvent(a) {
|
|
1710
|
+
let c = a;
|
|
1711
|
+
return a.exception && Array.isArray(a.exception.values) && (c = s(c)), c;
|
|
1712
|
+
} };
|
|
1713
|
+
};
|
|
1714
|
+
function Fr({ isBrowser: t, root: e, prefix: n }) {
|
|
1715
|
+
return (r) => {
|
|
1716
|
+
if (!r.filename) return r;
|
|
1717
|
+
let o = /^[a-zA-Z]:\\/.test(r.filename) || r.filename.includes("\\") && !r.filename.includes("/"), s = /^\//.test(r.filename);
|
|
1718
|
+
if (t) {
|
|
1719
|
+
if (e) {
|
|
1720
|
+
let i = r.filename;
|
|
1721
|
+
i.indexOf(e) === 0 && (r.filename = i.replace(e, n));
|
|
1722
|
+
}
|
|
1723
|
+
} else if (o || s) {
|
|
1724
|
+
let i = o ? r.filename.replace(/^[a-zA-Z]:/, "").replace(/\\/g, "/") : r.filename, a = e ? et(e, i) : ne(i);
|
|
1725
|
+
r.filename = `${n}${a}`;
|
|
1726
|
+
}
|
|
1727
|
+
return r;
|
|
1728
|
+
};
|
|
1729
|
+
}
|
|
1730
|
+
function In(t) {
|
|
2041
1731
|
return typeof t == "object" && t !== null;
|
|
2042
1732
|
}
|
|
2043
|
-
function
|
|
2044
|
-
return
|
|
1733
|
+
function Ur(t) {
|
|
1734
|
+
return In(t) && "handled" in t && typeof t.handled == "boolean" && "type" in t && typeof t.type == "string";
|
|
2045
1735
|
}
|
|
2046
|
-
function
|
|
2047
|
-
return
|
|
1736
|
+
function Br(t) {
|
|
1737
|
+
return In(t) && "mechanism" in t && Ur(t.mechanism);
|
|
2048
1738
|
}
|
|
2049
|
-
function
|
|
2050
|
-
if (
|
|
1739
|
+
function $r() {
|
|
1740
|
+
if (l.SENTRY_RELEASE && l.SENTRY_RELEASE.id) return l.SENTRY_RELEASE.id;
|
|
2051
1741
|
}
|
|
2052
|
-
function
|
|
1742
|
+
function Tn(t, e) {
|
|
2053
1743
|
return t !== void 0 ? (t[e[0]] = e[1], t) : { [e[0]]: e[1] };
|
|
2054
1744
|
}
|
|
2055
|
-
function
|
|
1745
|
+
function xn(t, e) {
|
|
2056
1746
|
return t(e.stack || "", 1);
|
|
2057
1747
|
}
|
|
2058
|
-
function
|
|
1748
|
+
function jr(t) {
|
|
2059
1749
|
let e = t && t.message;
|
|
2060
1750
|
return e ? e.error && typeof e.error.message == "string" ? e.error.message : e : "No error message";
|
|
2061
1751
|
}
|
|
2062
1752
|
function An(t, e) {
|
|
2063
|
-
let n = { type: e.name || e.constructor.name, value:
|
|
1753
|
+
let n = { type: e.name || e.constructor.name, value: jr(e) }, r = xn(t, e);
|
|
2064
1754
|
return r.length && (n.stacktrace = { frames: r }), n.type === void 0 && n.value === "" && (n.value = "Unrecoverable error caught"), n;
|
|
2065
1755
|
}
|
|
2066
|
-
function
|
|
2067
|
-
let
|
|
2068
|
-
if (
|
|
1756
|
+
function Gr(t, e, n, r) {
|
|
1757
|
+
let o, i = (r && r.data && Br(r.data) ? r.data.mechanism : void 0) ?? { handled: true, type: "generic" };
|
|
1758
|
+
if (L(n)) o = n;
|
|
2069
1759
|
else {
|
|
2070
|
-
if (
|
|
2071
|
-
let c = `Non-Error exception captured with keys: ${
|
|
2072
|
-
t?.
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
} else s = r && r.syntheticException || new Error(n), s.message = n;
|
|
2076
|
-
o.synthetic = true;
|
|
1760
|
+
if (b(n)) {
|
|
1761
|
+
let c = `Non-Error exception captured with keys: ${V(n)}`, u = t?.getClient(), f = u && u.getOptions().normalizeDepth;
|
|
1762
|
+
t?.setExtra("__serialized__", Y(n, f)), o = r && r.syntheticException || new Error(c), o.message = c;
|
|
1763
|
+
} else o = r && r.syntheticException || new Error(n), o.message = n;
|
|
1764
|
+
i.synthetic = true;
|
|
2077
1765
|
}
|
|
2078
|
-
let a = { exception: { values: [An(e,
|
|
2079
|
-
return
|
|
1766
|
+
let a = { exception: { values: [An(e, o)] } };
|
|
1767
|
+
return ee(a, void 0, void 0), B(a, i), { ...a, event_id: r && r.event_id };
|
|
2080
1768
|
}
|
|
2081
|
-
function Hr(t, e, n = "info", r,
|
|
2082
|
-
let
|
|
2083
|
-
if (
|
|
2084
|
-
let
|
|
2085
|
-
|
|
1769
|
+
function Hr(t, e, n = "info", r, o) {
|
|
1770
|
+
let s = { event_id: r && r.event_id, level: n, message: e };
|
|
1771
|
+
if (o && r && r.syntheticException) {
|
|
1772
|
+
let i = xn(t, r.syntheticException);
|
|
1773
|
+
i.length && (s.exception = { values: [{ value: e, stacktrace: { frames: i } }] });
|
|
2086
1774
|
}
|
|
2087
|
-
return
|
|
1775
|
+
return s;
|
|
2088
1776
|
}
|
|
2089
1777
|
var qr = 5;
|
|
2090
|
-
var
|
|
2091
|
-
|
|
2092
|
-
limit;
|
|
2093
|
-
constructor(e = {}) {
|
|
2094
|
-
this.limit = e.limit || qr;
|
|
2095
|
-
}
|
|
2096
|
-
setupOnce(e, n) {
|
|
2097
|
-
let r = n().getClient();
|
|
2098
|
-
r && e((s, i) => {
|
|
2099
|
-
let o = n().getIntegration(Fe);
|
|
2100
|
-
return o ? Wr(r.getOptions().stackParser, o.limit, s, i) : s;
|
|
2101
|
-
});
|
|
2102
|
-
}
|
|
2103
|
-
};
|
|
2104
|
-
var Me = Fe;
|
|
2105
|
-
fe(Me, "id", "LinkedErrors");
|
|
2106
|
-
function Wr(t, e, n, r) {
|
|
1778
|
+
var zr = (t = { limit: qr }) => ({ name: "LinkedErrors", processEvent: (e, n, r) => Yr(r.getOptions().stackParser, t.limit, e, n) });
|
|
1779
|
+
function Yr(t, e, n, r) {
|
|
2107
1780
|
if (!n.exception || !n.exception.values || !r || !O(r.originalException, Error)) return n;
|
|
2108
|
-
let
|
|
2109
|
-
return n.exception.values = [...
|
|
1781
|
+
let o = bn(t, e, r.originalException);
|
|
1782
|
+
return n.exception.values = [...o, ...n.exception.values], n;
|
|
2110
1783
|
}
|
|
2111
|
-
function
|
|
1784
|
+
function bn(t, e, n, r = []) {
|
|
2112
1785
|
if (!O(n.cause, Error) || r.length + 1 >= e) return r;
|
|
2113
|
-
let
|
|
2114
|
-
return
|
|
2115
|
-
}
|
|
2116
|
-
var
|
|
2117
|
-
var
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
}
|
|
2124
|
-
setupOnce(e, n) {
|
|
2125
|
-
n().getClient() && e((s) => {
|
|
2126
|
-
let { sdkProcessingMetadata: i } = s;
|
|
2127
|
-
return !n().getIntegration(Be) || !i || ("request" in i && i.request instanceof Request && (s.request = Vr(i.request, Ye(this, X)), s.user = Kr(s.user ?? {}, i.request, Ye(this, X))), "requestData" in i && (s.request ? s.request.data = i.requestData : s.request = { data: i.requestData })), s;
|
|
2128
|
-
});
|
|
2129
|
-
}
|
|
1786
|
+
let o = An(t, n.cause);
|
|
1787
|
+
return bn(t, e, n.cause, [o, ...r]);
|
|
1788
|
+
}
|
|
1789
|
+
var Jr = { allowedHeaders: ["CF-RAY", "CF-Worker"] };
|
|
1790
|
+
var Wr = (t = {}) => {
|
|
1791
|
+
let e = { ...Jr, ...t };
|
|
1792
|
+
return { name: "RequestData", preprocessEvent: (n) => {
|
|
1793
|
+
let { sdkProcessingMetadata: r } = n;
|
|
1794
|
+
return r && ("request" in r && r.request instanceof Request && (n.request = Vr(r.request, e), n.user = Kr(n.user ?? {}, r.request, e)), "requestData" in r && (n.request ? n.request.data = r.requestData : n.request = { data: r.requestData })), n;
|
|
1795
|
+
} };
|
|
2130
1796
|
};
|
|
2131
|
-
var Ue = Be;
|
|
2132
|
-
X = /* @__PURE__ */ new WeakMap(), fe(Ue, "id", "RequestData");
|
|
2133
1797
|
function Kr(t, e, n) {
|
|
2134
|
-
let r = e.headers.get("CF-Connecting-IP"), { allowedIps:
|
|
2135
|
-
return !("ip_address" in t) && r &&
|
|
1798
|
+
let r = e.headers.get("CF-Connecting-IP"), { allowedIps: o } = n, s = { ...t };
|
|
1799
|
+
return !("ip_address" in t) && r && o !== void 0 && Xr(r, o) && (s.ip_address = r), Object.keys(s).length > 0 ? s : void 0;
|
|
2136
1800
|
}
|
|
2137
1801
|
function Vr(t, e) {
|
|
2138
1802
|
let n = t.headers.get("cookie"), r;
|
|
2139
1803
|
if (n) try {
|
|
2140
|
-
r =
|
|
1804
|
+
r = Zr(n);
|
|
2141
1805
|
} catch {
|
|
2142
1806
|
}
|
|
2143
|
-
let
|
|
2144
|
-
for (let [u, f] of t.headers.entries()) u !== "cookie" && (
|
|
2145
|
-
let
|
|
1807
|
+
let o = {};
|
|
1808
|
+
for (let [u, f] of t.headers.entries()) u !== "cookie" && (o[u] = f);
|
|
1809
|
+
let s = { method: t.method, cookies: r, headers: o };
|
|
2146
1810
|
try {
|
|
2147
1811
|
let u = new URL(t.url);
|
|
2148
|
-
|
|
1812
|
+
s.url = `${u.protocol}//${u.hostname}${u.pathname}`, s.query_string = u.search;
|
|
2149
1813
|
} catch {
|
|
2150
1814
|
let f = t.url.indexOf("?");
|
|
2151
|
-
f < 0 ?
|
|
2152
|
-
}
|
|
2153
|
-
let { allowedHeaders:
|
|
2154
|
-
if (
|
|
2155
|
-
let u = Object.fromEntries(new URLSearchParams(
|
|
2156
|
-
Object.keys(
|
|
2157
|
-
f.set(
|
|
2158
|
-
}),
|
|
2159
|
-
} else delete
|
|
2160
|
-
return
|
|
2161
|
-
}
|
|
2162
|
-
function
|
|
1815
|
+
f < 0 ? s.url = t.url : (s.url = t.url.substr(0, f), s.query_string = t.url.substr(f + 1));
|
|
1816
|
+
}
|
|
1817
|
+
let { allowedHeaders: i, allowedCookies: a, allowedSearchParams: c } = e;
|
|
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) {
|
|
1819
|
+
let u = Object.fromEntries(new URLSearchParams(s.query_string)), f = new URLSearchParams();
|
|
1820
|
+
Object.keys(xt(u, c)).forEach((p) => {
|
|
1821
|
+
f.set(p, u[p]);
|
|
1822
|
+
}), s.query_string = f.toString();
|
|
1823
|
+
} else delete s.query_string;
|
|
1824
|
+
return s;
|
|
1825
|
+
}
|
|
1826
|
+
function Xr(t, e) {
|
|
2163
1827
|
return typeof e == "boolean" ? e : e instanceof RegExp ? e.test(t) : Array.isArray(e) ? e.map((r) => r.toLowerCase()).includes(t) : false;
|
|
2164
1828
|
}
|
|
2165
|
-
function
|
|
1829
|
+
function xt(t, e) {
|
|
2166
1830
|
let n = () => false;
|
|
2167
1831
|
if (typeof e == "boolean") return e ? t : {};
|
|
2168
1832
|
if (e instanceof RegExp) n = (r) => e.test(r);
|
|
2169
1833
|
else if (Array.isArray(e)) {
|
|
2170
|
-
let r = e.map((
|
|
2171
|
-
n = (
|
|
1834
|
+
let r = e.map((o) => o.toLowerCase());
|
|
1835
|
+
n = (o) => r.includes(o.toLowerCase());
|
|
2172
1836
|
} else return {};
|
|
2173
|
-
return Object.keys(t).filter(n).reduce((r,
|
|
1837
|
+
return Object.keys(t).filter(n).reduce((r, o) => (r[o] = t[o], r), {});
|
|
2174
1838
|
}
|
|
2175
|
-
function
|
|
1839
|
+
function Zr(t) {
|
|
2176
1840
|
if (typeof t != "string") return {};
|
|
2177
1841
|
try {
|
|
2178
1842
|
return t.split(";").map((e) => e.split("=")).reduce((e, [n, r]) => (e[decodeURIComponent(n.trim())] = decodeURIComponent(r.trim()), e), {});
|
|
@@ -2180,30 +1844,40 @@ function Xr(t) {
|
|
|
2180
1844
|
return {};
|
|
2181
1845
|
}
|
|
2182
1846
|
}
|
|
2183
|
-
function
|
|
1847
|
+
function Qr(t, e) {
|
|
2184
1848
|
let n = {};
|
|
2185
1849
|
return t.forEach((r) => {
|
|
2186
|
-
n[r.name] = r, r.setupOnce(
|
|
2187
|
-
|
|
2188
|
-
|
|
1850
|
+
n[r.name] = r, typeof r.setupOnce == "function" && r.setupOnce();
|
|
1851
|
+
let o = e.getClient();
|
|
1852
|
+
if (o) {
|
|
1853
|
+
if (typeof r.setup == "function" && r.setup(o), typeof r.preprocessEvent == "function") {
|
|
1854
|
+
let s = r.preprocessEvent.bind(r);
|
|
1855
|
+
o.on("preprocessEvent", (i, a) => s(i, a, o));
|
|
1856
|
+
}
|
|
1857
|
+
if (typeof r.processEvent == "function") {
|
|
1858
|
+
let s = r.processEvent.bind(r), i = Object.assign((a, c) => s(a, c, o), { id: r.name });
|
|
1859
|
+
o.addEventProcessor(i);
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
2189
1862
|
}), n;
|
|
2190
1863
|
}
|
|
2191
|
-
var
|
|
1864
|
+
var At = class extends ue {
|
|
2192
1865
|
#e = null;
|
|
1866
|
+
#t = false;
|
|
2193
1867
|
constructor(e) {
|
|
2194
|
-
e._metadata = e._metadata || {}, e._metadata.sdk = e._metadata.sdk || { name: "toucan-js", packages: [{ name: "npm:toucan-js", version: "
|
|
1868
|
+
e._metadata = e._metadata || {}, e._metadata.sdk = e._metadata.sdk || { name: "toucan-js", packages: [{ name: "npm:toucan-js", version: "4.0.0" }], version: "4.0.0" }, super(e);
|
|
2195
1869
|
}
|
|
2196
1870
|
setupIntegrations() {
|
|
2197
|
-
this._isEnabled() && !this
|
|
1871
|
+
this._isEnabled() && !this.#t && this.#e && (this._integrations = Qr(this._options.integrations, this.#e), this.#t = true);
|
|
2198
1872
|
}
|
|
2199
1873
|
eventFromException(e, n) {
|
|
2200
|
-
return
|
|
1874
|
+
return x(Gr(this.#e, this._options.stackParser, e, n));
|
|
2201
1875
|
}
|
|
2202
1876
|
eventFromMessage(e, n = "info", r) {
|
|
2203
|
-
return
|
|
1877
|
+
return x(Hr(this._options.stackParser, e, n, r, this._options.attachStacktrace));
|
|
2204
1878
|
}
|
|
2205
1879
|
_prepareEvent(e, n, r) {
|
|
2206
|
-
return e.platform = e.platform || "javascript", this.getOptions().request && (e.sdkProcessingMetadata =
|
|
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);
|
|
2207
1881
|
}
|
|
2208
1882
|
getSdk() {
|
|
2209
1883
|
return this.#e;
|
|
@@ -2218,40 +1892,44 @@ var Tt = class extends de {
|
|
|
2218
1892
|
this.getOptions().enabled = e;
|
|
2219
1893
|
}
|
|
2220
1894
|
};
|
|
2221
|
-
function
|
|
2222
|
-
let [e, n] =
|
|
2223
|
-
return [e, (
|
|
2224
|
-
let
|
|
2225
|
-
if (
|
|
2226
|
-
let
|
|
2227
|
-
|
|
1895
|
+
function eo(t) {
|
|
1896
|
+
let [e, n] = nt(t);
|
|
1897
|
+
return [e, (o) => {
|
|
1898
|
+
let s = n(o);
|
|
1899
|
+
if (s) {
|
|
1900
|
+
let i = s.filename;
|
|
1901
|
+
s.abs_path = i !== void 0 && !i.startsWith("/") ? `/${i}` : i, s.in_app = i !== void 0;
|
|
2228
1902
|
}
|
|
2229
|
-
return
|
|
1903
|
+
return s;
|
|
2230
1904
|
}];
|
|
2231
1905
|
}
|
|
2232
|
-
function
|
|
2233
|
-
if (t) return
|
|
1906
|
+
function to(t) {
|
|
1907
|
+
if (t) return ne(t, ".js");
|
|
2234
1908
|
}
|
|
2235
|
-
var
|
|
2236
|
-
function
|
|
1909
|
+
var no = _e(eo(to));
|
|
1910
|
+
function ro(t) {
|
|
2237
1911
|
function e({ body: n }) {
|
|
2238
1912
|
try {
|
|
2239
|
-
let
|
|
2240
|
-
return t.context && t.context.waitUntil(
|
|
1913
|
+
let o = (t.fetcher ?? fetch)(t.url, { method: "POST", headers: t.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 t.context && t.context.waitUntil(o), o;
|
|
2241
1915
|
} catch (r) {
|
|
2242
|
-
return
|
|
1916
|
+
return $(r);
|
|
2243
1917
|
}
|
|
2244
1918
|
}
|
|
2245
|
-
return
|
|
1919
|
+
return It(t, e);
|
|
2246
1920
|
}
|
|
2247
|
-
var
|
|
1921
|
+
var K = class extends A {
|
|
1922
|
+
#e;
|
|
2248
1923
|
constructor(e) {
|
|
2249
|
-
if (e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [
|
|
2250
|
-
let
|
|
2251
|
-
|
|
1924
|
+
if (super(), e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [Wr(e.requestDataOptions), zr()]], e.release === void 0) {
|
|
1925
|
+
let n = $r();
|
|
1926
|
+
n !== void 0 && (e.release = n);
|
|
2252
1927
|
}
|
|
2253
|
-
|
|
2254
|
-
|
|
1928
|
+
this.#e = e, this.attachNewClient();
|
|
1929
|
+
}
|
|
1930
|
+
attachNewClient() {
|
|
1931
|
+
let e = new At({ ...this.#e, transport: ro, integrations: St(this.#e), stackParser: Ke(this.#e.stackParser || no), transportOptions: { ...this.#e.transportOptions, context: this.#e.context } });
|
|
1932
|
+
this.setClient(e), e.setSdk(this), e.setupIntegrations();
|
|
2255
1933
|
}
|
|
2256
1934
|
setRequestBody(e) {
|
|
2257
1935
|
this.getClient()?.setRequestBody(e);
|
|
@@ -2262,22 +1940,36 @@ var Ge = class extends Y {
|
|
|
2262
1940
|
captureCheckIn(e, n, r) {
|
|
2263
1941
|
return e.status === "in_progress" && this.setContext("monitor", { slug: e.monitorSlug }), this.getClient().captureCheckIn(e, n, r);
|
|
2264
1942
|
}
|
|
1943
|
+
addBreadcrumb(e, n = 100) {
|
|
1944
|
+
let o = this.getClient().getOptions().maxBreadcrumbs || n;
|
|
1945
|
+
return super.addBreadcrumb(e, o);
|
|
1946
|
+
}
|
|
1947
|
+
clone() {
|
|
1948
|
+
let e = new K({ ...this.#e });
|
|
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
|
+
}
|
|
1951
|
+
withScope(e) {
|
|
1952
|
+
let n = this.clone();
|
|
1953
|
+
return e(n);
|
|
1954
|
+
}
|
|
2265
1955
|
};
|
|
2266
|
-
function
|
|
2267
|
-
if (!(n && r &&
|
|
2268
|
-
let
|
|
2269
|
-
|
|
2270
|
-
}
|
|
2271
|
-
|
|
1956
|
+
function Rn(t, e, n, r, o, s, i, a, c) {
|
|
1957
|
+
if (!(n && r && o)) return;
|
|
1958
|
+
let u = new K({ dsn: n, request: t, context: e, sampleRate: 1, release: i?.tag, integrations: [we({ iteratee(f) {
|
|
1959
|
+
return f.filename = "/index.js", f;
|
|
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
|
+
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;
|
|
1962
|
+
}
|
|
1963
|
+
function oo() {
|
|
2272
1964
|
return { addLogs: () => {
|
|
2273
1965
|
}, setTags: () => {
|
|
2274
1966
|
}, end: () => {
|
|
2275
1967
|
}, isRecording: true };
|
|
2276
1968
|
}
|
|
2277
1969
|
function Cn() {
|
|
2278
|
-
return { enterSpan: (t, e, ...n) => e(
|
|
1970
|
+
return { enterSpan: (t, e, ...n) => e(oo(), ...n), getSpanContext: () => ({ traceId: "test-trace", spanId: "test-span", parentSpanId: "test-parent-span", traceFlags: 0 }), runWithSpanContext: (t, e, ...n) => e(...n), traceId: "test-trace", spanId: "test-span", parentSpanId: "test-parent-span", cfTraceIdHeader: "test-trace:test-span:0" };
|
|
2279
1971
|
}
|
|
2280
|
-
var
|
|
1972
|
+
var Fe = class {
|
|
2281
1973
|
constructor(e) {
|
|
2282
1974
|
this.data = {};
|
|
2283
1975
|
this.hasWritten = false;
|
|
@@ -2293,29 +1985,29 @@ var Le = class {
|
|
|
2293
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] }));
|
|
2294
1986
|
}
|
|
2295
1987
|
};
|
|
2296
|
-
var
|
|
2297
|
-
let r,
|
|
1988
|
+
var Fc = { async fetch(t, e, n) {
|
|
1989
|
+
let r, o = false, s = new Fe(e.ANALYTICS), i = new fe(e.UNSAFE_PERFORMANCE), a = i.now();
|
|
2298
1990
|
try {
|
|
2299
|
-
e.JAEGER || (e.JAEGER = Cn()), r =
|
|
1991
|
+
e.JAEGER || (e.JAEGER = Cn()), r = Rn(t, 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);
|
|
2300
1992
|
let c = new URL(t.url);
|
|
2301
|
-
e.COLO_METADATA && e.VERSION_METADATA && e.CONFIG &&
|
|
1993
|
+
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: c.hostname, version: e.VERSION_METADATA.tag, userWorkerAhead: e.CONFIG.invoke_user_worker_ahead_of_assets });
|
|
2302
1994
|
let u = t.clone();
|
|
2303
1995
|
if (e.CONFIG.invoke_user_worker_ahead_of_assets) {
|
|
2304
1996
|
if (!e.CONFIG.has_user_worker) throw new Error("Fetch for user worker without having a user worker binding");
|
|
2305
|
-
return
|
|
1997
|
+
return s.setData({ dispatchtype: "worker" }), await e.JAEGER.enterSpan("dispatch_worker", async (p) => (p.setTags({ hasUserWorker: true, asset: "ignored", dispatchType: "worker" }), o = true, e.USER_WORKER.fetch(u)));
|
|
2306
1998
|
}
|
|
2307
1999
|
let f = await e.ASSET_WORKER.unstable_canFetch(t);
|
|
2308
|
-
return e.CONFIG.has_user_worker && !f ? (
|
|
2000
|
+
return e.CONFIG.has_user_worker && !f ? (s.setData({ dispatchtype: "worker" }), await e.JAEGER.enterSpan("dispatch_worker", async (p) => (p.setTags({ hasUserWorker: e.CONFIG.has_user_worker || false, asset: f, dispatchType: "worker" }), o = true, e.USER_WORKER.fetch(u)))) : (s.setData({ dispatchtype: "asset" }), await e.JAEGER.enterSpan("dispatch_assets", async (p) => (p.setTags({ hasUserWorker: e.CONFIG.has_user_worker || false, asset: f, dispatchType: "asset" }), e.ASSET_WORKER.fetch(u))));
|
|
2309
2001
|
} catch (c) {
|
|
2310
|
-
if (
|
|
2311
|
-
throw c instanceof Error &&
|
|
2002
|
+
if (o) return;
|
|
2003
|
+
throw c instanceof Error && s.setData({ error: c.message }), r && r.captureException(c), c;
|
|
2312
2004
|
} finally {
|
|
2313
|
-
|
|
2005
|
+
s.setData({ requestTime: i.now() - a }), s.write();
|
|
2314
2006
|
}
|
|
2315
2007
|
} };
|
|
2316
2008
|
|
|
2317
2009
|
// src/asset-workers/router-worker.ts
|
|
2318
|
-
var router_worker_default =
|
|
2010
|
+
var router_worker_default = Fc;
|
|
2319
2011
|
export {
|
|
2320
2012
|
router_worker_default as default
|
|
2321
2013
|
};
|