@cloudflare/vite-plugin 0.0.0-ff0d9cd27 → 0.0.2

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.
@@ -1,18 +1,18 @@
1
1
  // ../workers-shared/dist/asset-worker.mjs
2
- import { WorkerEntrypoint as Bs } from "cloudflare:workers";
2
+ import { WorkerEntrypoint as Fs } from "cloudflare:workers";
3
3
  var sr = Object.defineProperty;
4
4
  var ir = (t, e, n) => e in t ? sr(t, e, { enumerable: true, configurable: true, writable: true, value: n }) : t[e] = n;
5
- var _e = (t, e, n) => (ir(t, typeof e != "symbol" ? e + "" : e, n), n);
6
- var Ft = (t, e, n) => {
5
+ var he = (t, e, n) => (ir(t, typeof e != "symbol" ? e + "" : e, n), n);
6
+ var Bt = (t, e, n) => {
7
7
  if (!e.has(t)) throw TypeError("Cannot " + n);
8
8
  };
9
- var et = (t, e, n) => (Ft(t, e, "read from private field"), n ? n.call(t) : e.get(t));
10
- var $t = (t, e, n) => {
9
+ var Qe = (t, e, n) => (Bt(t, e, "read from private field"), n ? n.call(t) : e.get(t));
10
+ var Ft = (t, e, n) => {
11
11
  if (e.has(t)) throw TypeError("Cannot add the same private member more than once");
12
12
  e instanceof WeakSet ? e.add(t) : e.set(t, n);
13
13
  };
14
- var Ht = (t, e, n, r) => (Ft(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n);
15
- var ge = class {
14
+ var Gt = (t, e, n, r) => (Bt(t, e, "write to private field"), r ? r.call(t, n) : e.set(t, n), n);
15
+ var _e = class {
16
16
  constructor(e) {
17
17
  this.performanceTimer = e;
18
18
  }
@@ -20,103 +20,73 @@ var ge = class {
20
20
  return this.performanceTimer ? this.performanceTimer.timeOrigin + this.performanceTimer.now() : Date.now();
21
21
  }
22
22
  };
23
- var Ee = class extends Response {
24
- constructor(e, n) {
25
- super(e, { ...n, status: 200 });
26
- }
27
- };
28
- var te = class extends Response {
29
- constructor(...[e, n]) {
30
- super(e, { ...n, status: 404, statusText: "Not Found" });
31
- }
32
- };
33
- var ye = class extends Response {
34
- constructor(...[e, n]) {
35
- super(e, { ...n, status: 405, statusText: "Method Not Allowed" });
36
- }
37
- };
38
- var L = class extends Response {
39
- constructor(e, n) {
40
- super(null, { ...n, status: 500 });
41
- }
42
- };
43
- var Se = class extends Response {
44
- constructor(...[e, n]) {
45
- super(null, { ...n, status: 304, statusText: "Not Modified" });
46
- }
47
- };
48
- var Te = class extends Response {
49
- constructor(e, n) {
50
- super(null, { ...n, status: 307, statusText: "Temporary Redirect", headers: { ...n?.headers, Location: e } });
51
- }
52
- };
53
- var Yt = Object.prototype.toString;
54
- function B(t) {
55
- switch (Yt.call(t)) {
23
+ var $t = Object.prototype.toString;
24
+ function L(t) {
25
+ switch ($t.call(t)) {
56
26
  case "[object Error]":
57
27
  case "[object Exception]":
58
28
  case "[object DOMException]":
59
29
  return true;
60
30
  default:
61
- return k(t, Error);
31
+ return O(t, Error);
62
32
  }
63
33
  }
64
- function jt(t, e) {
65
- return Yt.call(t) === `[object ${e}]`;
34
+ function Ht(t, e) {
35
+ return $t.call(t) === `[object ${e}]`;
66
36
  }
67
- function W(t) {
68
- return jt(t, "String");
37
+ function q(t) {
38
+ return Ht(t, "String");
69
39
  }
70
- function be(t) {
40
+ function ge(t) {
71
41
  return t === null || typeof t != "object" && typeof t != "function";
72
42
  }
73
- function I(t) {
74
- return jt(t, "Object");
43
+ function x(t) {
44
+ return Ht(t, "Object");
75
45
  }
76
- function tt(t) {
77
- return typeof Event < "u" && k(t, Event);
46
+ function et(t) {
47
+ return typeof Event < "u" && O(t, Event);
78
48
  }
79
- function nt(t) {
80
- return typeof Element < "u" && k(t, Element);
49
+ function tt(t) {
50
+ return typeof Element < "u" && O(t, Element);
81
51
  }
82
- function F(t) {
52
+ function B(t) {
83
53
  return !!(t && t.then && typeof t.then == "function");
84
54
  }
85
- function rt(t) {
86
- return I(t) && "nativeEvent" in t && "preventDefault" in t && "stopPropagation" in t;
55
+ function nt(t) {
56
+ return x(t) && "nativeEvent" in t && "preventDefault" in t && "stopPropagation" in t;
87
57
  }
88
- function ne(t) {
58
+ function ee(t) {
89
59
  return typeof t == "number" && t !== t;
90
60
  }
91
- function k(t, e) {
61
+ function O(t, e) {
92
62
  try {
93
63
  return t instanceof e;
94
64
  } catch {
95
65
  return false;
96
66
  }
97
67
  }
98
- function st(t) {
68
+ function rt(t) {
99
69
  return !!(typeof t == "object" && t !== null && (t.__isVue || t._isVue));
100
70
  }
101
- function M(t, e = 0) {
71
+ function P(t, e = 0) {
102
72
  return typeof t != "string" || e === 0 || t.length <= e ? t : `${t.slice(0, e)}...`;
103
73
  }
104
- function Re(t) {
74
+ function Ee(t) {
105
75
  return t && t.Math == Math ? t : void 0;
106
76
  }
107
- var h = typeof globalThis == "object" && Re(globalThis) || typeof window == "object" && Re(window) || typeof self == "object" && Re(self) || typeof global == "object" && Re(global) || /* @__PURE__ */ function() {
77
+ var h = typeof globalThis == "object" && Ee(globalThis) || typeof window == "object" && Ee(window) || typeof self == "object" && Ee(self) || typeof global == "object" && Ee(global) || /* @__PURE__ */ function() {
108
78
  return this;
109
79
  }() || {};
110
- function A() {
80
+ function N() {
111
81
  return h;
112
82
  }
113
- function re(t, e, n) {
83
+ function te(t, e, n) {
114
84
  let r = n || h, s = r.__SENTRY__ = r.__SENTRY__ || {};
115
85
  return s[t] || (s[t] = e());
116
86
  }
117
- var Vs = A();
87
+ var zs = N();
118
88
  var or = 80;
119
- function qt(t, e = {}) {
89
+ function Yt(t, e = {}) {
120
90
  if (!t) return "<unknown>";
121
91
  try {
122
92
  let n = t, r = 5, s = [], i = 0, o = 0, a = " > ", c = a.length, u, l = Array.isArray(e) ? e : e.keyAttrs, d = !Array.isArray(e) && e.maxStringLength || or;
@@ -134,19 +104,19 @@ function ar(t, e) {
134
104
  if (u && u.length) u.forEach((d) => {
135
105
  r.push(`[${d[0]}="${d[1]}"]`);
136
106
  });
137
- else if (n.id && r.push(`#${n.id}`), s = n.className, s && W(s)) for (i = s.split(/\s+/), c = 0; c < i.length; c++) r.push(`.${i[c]}`);
107
+ else if (n.id && r.push(`#${n.id}`), s = n.className, s && q(s)) for (i = s.split(/\s+/), c = 0; c < i.length; c++) r.push(`.${i[c]}`);
138
108
  let l = ["aria-label", "type", "name", "title", "alt"];
139
109
  for (c = 0; c < l.length; c++) o = l[c], a = n.getAttribute(o), a && r.push(`[${o}="${a}"]`);
140
110
  return r.join("");
141
111
  }
142
112
  var cr = "Sentry Logger ";
143
- var se = ["debug", "info", "warn", "error", "log", "assert", "trace"];
144
- var z = {};
145
- function xe(t) {
113
+ var ne = ["debug", "info", "warn", "error", "log", "assert", "trace"];
114
+ var W = {};
115
+ function ye(t) {
146
116
  if (!("console" in h)) return t();
147
- let e = h.console, n = {}, r = Object.keys(z);
117
+ let e = h.console, n = {}, r = Object.keys(W);
148
118
  r.forEach((s) => {
149
- let i = z[s];
119
+ let i = W[s];
150
120
  n[s] = e[s], e[s] = i;
151
121
  });
152
122
  try {
@@ -163,13 +133,13 @@ function ur() {
163
133
  }, disable: () => {
164
134
  t = false;
165
135
  }, isEnabled: () => t };
166
- return typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__ ? se.forEach((n) => {
136
+ return typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__ ? ne.forEach((n) => {
167
137
  e[n] = (...r) => {
168
- t && xe(() => {
138
+ t && ye(() => {
169
139
  h.console[n](`${cr}[${n}]:`, ...r);
170
140
  });
171
141
  };
172
- }) : se.forEach((n) => {
142
+ }) : ne.forEach((n) => {
173
143
  e[n] = () => {
174
144
  };
175
145
  }), e;
@@ -179,11 +149,11 @@ var dr = /^(?:(\w+):)\/\/(?:(\w+)(?::(\w+)?)?@)([\w.-]+)(?::(\d+))?\/(.+)/;
179
149
  function lr(t) {
180
150
  return t === "http" || t === "https";
181
151
  }
182
- function U(t, e = false) {
152
+ function M(t, e = false) {
183
153
  let { host: n, path: r, pass: s, port: i, projectId: o, protocol: a, publicKey: c } = t;
184
154
  return `${a}://${c}${e && s ? `:${s}` : ""}@${n}${i ? `:${i}` : ""}/${r && `${r}/`}${o}`;
185
155
  }
186
- function Wt(t) {
156
+ function jt(t) {
187
157
  let e = dr.exec(t);
188
158
  if (!e) {
189
159
  console.error(`Invalid Sentry Dsn: ${t}`);
@@ -194,9 +164,9 @@ function Wt(t) {
194
164
  let d = u.match(/^\d+/);
195
165
  d && (u = d[0]);
196
166
  }
197
- return zt({ host: i, pass: s, path: c, projectId: u, port: o, protocol: n, publicKey: r });
167
+ return qt({ host: i, pass: s, path: c, projectId: u, port: o, protocol: n, publicKey: r });
198
168
  }
199
- function zt(t) {
169
+ function qt(t) {
200
170
  return { protocol: t.protocol, publicKey: t.publicKey || "", pass: t.pass || "", host: t.host, port: t.port || "", path: t.path || "", projectId: t.projectId };
201
171
  }
202
172
  function fr(t) {
@@ -204,8 +174,8 @@ function fr(t) {
204
174
  let { port: e, projectId: n, protocol: r } = t;
205
175
  return ["protocol", "publicKey", "host", "projectId"].find((o) => t[o] ? false : (f.error(`Invalid Sentry Dsn: ${o} missing`), true)) ? false : n.match(/^\d+$/) ? lr(r) ? e && isNaN(parseInt(e, 10)) ? (f.error(`Invalid Sentry Dsn: Invalid port ${e}`), false) : true : (f.error(`Invalid Sentry Dsn: Invalid protocol ${r}`), false) : (f.error(`Invalid Sentry Dsn: Invalid projectId ${n}`), false);
206
176
  }
207
- function Ie(t) {
208
- let e = typeof t == "string" ? Wt(t) : zt(t);
177
+ function Se(t) {
178
+ let e = typeof t == "string" ? jt(t) : qt(t);
209
179
  if (!(!e || !fr(e))) return e;
210
180
  }
211
181
  var T = class extends Error {
@@ -213,69 +183,69 @@ var T = class extends Error {
213
183
  super(e), this.message = e, this.name = new.target.prototype.constructor.name, Object.setPrototypeOf(this, new.target.prototype), this.logLevel = n;
214
184
  }
215
185
  };
216
- function N(t, e, n) {
186
+ function I(t, e, n) {
217
187
  if (!(e in t)) return;
218
188
  let r = t[e], s = n(r);
219
- typeof s == "function" && Kt(s, r), t[e] = s;
189
+ typeof s == "function" && Vt(s, r), t[e] = s;
220
190
  }
221
- function V(t, e, n) {
191
+ function z(t, e, n) {
222
192
  try {
223
193
  Object.defineProperty(t, e, { value: n, writable: true, configurable: true });
224
194
  } catch {
225
195
  (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`Failed to add non-enumerable property "${e}" to object`, t);
226
196
  }
227
197
  }
228
- function Kt(t, e) {
198
+ function Vt(t, e) {
229
199
  try {
230
200
  let n = e.prototype || {};
231
- t.prototype = e.prototype = n, V(t, "__sentry_original__", e);
201
+ t.prototype = e.prototype = n, z(t, "__sentry_original__", e);
232
202
  } catch {
233
203
  }
234
204
  }
235
- function ot(t) {
205
+ function it(t) {
236
206
  return Object.keys(t).map((e) => `${encodeURIComponent(e)}=${encodeURIComponent(t[e])}`).join("&");
237
207
  }
238
- function Ne(t) {
239
- if (B(t)) return { message: t.message, name: t.name, stack: t.stack, ...Jt(t) };
240
- if (tt(t)) {
241
- let e = { type: t.type, target: Vt(t.target), currentTarget: Vt(t.currentTarget), ...Jt(t) };
242
- return typeof CustomEvent < "u" && k(t, CustomEvent) && (e.detail = t.detail), e;
208
+ function Te(t) {
209
+ if (L(t)) return { message: t.message, name: t.name, stack: t.stack, ...zt(t) };
210
+ if (et(t)) {
211
+ let e = { type: t.type, target: Wt(t.target), currentTarget: Wt(t.currentTarget), ...zt(t) };
212
+ return typeof CustomEvent < "u" && O(t, CustomEvent) && (e.detail = t.detail), e;
243
213
  } else return t;
244
214
  }
245
- function Vt(t) {
215
+ function Wt(t) {
246
216
  try {
247
- return nt(t) ? qt(t) : Object.prototype.toString.call(t);
217
+ return tt(t) ? Yt(t) : Object.prototype.toString.call(t);
248
218
  } catch {
249
219
  return "<unknown>";
250
220
  }
251
221
  }
252
- function Jt(t) {
222
+ function zt(t) {
253
223
  if (typeof t == "object" && t !== null) {
254
224
  let e = {};
255
225
  for (let n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
256
226
  return e;
257
227
  } else return {};
258
228
  }
259
- function ie(t, e = 40) {
260
- let n = Object.keys(Ne(t));
229
+ function re(t, e = 40) {
230
+ let n = Object.keys(Te(t));
261
231
  if (n.sort(), !n.length) return "[object has no keys]";
262
- if (n[0].length >= e) return M(n[0], e);
232
+ if (n[0].length >= e) return P(n[0], e);
263
233
  for (let r = n.length; r > 0; r--) {
264
234
  let s = n.slice(0, r).join(", ");
265
- if (!(s.length > e)) return r === n.length ? s : M(s, e);
235
+ if (!(s.length > e)) return r === n.length ? s : P(s, e);
266
236
  }
267
237
  return "";
268
238
  }
269
239
  function E(t) {
270
- return it(t, /* @__PURE__ */ new Map());
240
+ return st(t, /* @__PURE__ */ new Map());
271
241
  }
272
- function it(t, e) {
273
- if (I(t)) {
242
+ function st(t, e) {
243
+ if (x(t)) {
274
244
  let n = e.get(t);
275
245
  if (n !== void 0) return n;
276
246
  let r = {};
277
247
  e.set(t, r);
278
- for (let s of Object.keys(t)) typeof t[s] < "u" && (r[s] = it(t[s], e));
248
+ for (let s of Object.keys(t)) typeof t[s] < "u" && (r[s] = st(t[s], e));
279
249
  return r;
280
250
  }
281
251
  if (Array.isArray(t)) {
@@ -283,7 +253,7 @@ function it(t, e) {
283
253
  if (n !== void 0) return n;
284
254
  let r = [];
285
255
  return e.set(t, r), t.forEach((s) => {
286
- r.push(it(s, e));
256
+ r.push(st(s, e));
287
257
  }), r;
288
258
  }
289
259
  return t;
@@ -291,7 +261,7 @@ function it(t, e) {
291
261
  function pr(t, e = false) {
292
262
  return !(e || t && !t.startsWith("/") && !t.includes(":\\") && !t.startsWith(".") && !t.match(/^[a-zA-Z]([a-zA-Z0-9.\-+])*:\/\//)) && t !== void 0 && !t.includes("node_modules/");
293
263
  }
294
- function Xt(t) {
264
+ function Jt(t) {
295
265
  let e = /^\s*[-]{4,}$/, n = /at (?:async )?(?:(.+?)\s+\()?(?:(.+):(\d+):(\d+)?|([^)]+))\)?/;
296
266
  return (r) => {
297
267
  let s = r.match(n);
@@ -314,10 +284,10 @@ function Xt(t) {
314
284
  if (r.match(e)) return { filename: r };
315
285
  };
316
286
  }
317
- var en = 50;
318
- var Zt = /\(error: (.*)\)/;
319
- var Qt = /captureMessage|captureException/;
320
- function Ae(...t) {
287
+ var Zt = 50;
288
+ var Kt = /\(error: (.*)\)/;
289
+ var Xt = /captureMessage|captureException/;
290
+ function be(...t) {
321
291
  let e = t.sort((n, r) => n[0] - r[0]).map((n) => n[1]);
322
292
  return (n, r = 0) => {
323
293
  let s = [], i = n.split(`
@@ -325,7 +295,7 @@ function Ae(...t) {
325
295
  for (let o = r; o < i.length; o++) {
326
296
  let a = i[o];
327
297
  if (a.length > 1024) continue;
328
- let c = Zt.test(a) ? a.replace(Zt, "$1") : a;
298
+ let c = Kt.test(a) ? a.replace(Kt, "$1") : a;
329
299
  if (!c.match(/\S*Error: /)) {
330
300
  for (let u of e) {
331
301
  let l = u(c);
@@ -334,74 +304,74 @@ function Ae(...t) {
334
304
  break;
335
305
  }
336
306
  }
337
- if (s.length >= en) break;
307
+ if (s.length >= Zt) break;
338
308
  }
339
309
  }
340
- return tn(s);
310
+ return Qt(s);
341
311
  };
342
312
  }
343
- function ct(t) {
344
- return Array.isArray(t) ? Ae(...t) : t;
313
+ function at(t) {
314
+ return Array.isArray(t) ? be(...t) : t;
345
315
  }
346
- function tn(t) {
316
+ function Qt(t) {
347
317
  if (!t.length) return [];
348
318
  let e = Array.from(t);
349
- return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(), Qt.test(e[e.length - 1].function || "") && (e.pop(), Qt.test(e[e.length - 1].function || "") && e.pop()), e.slice(0, en).map((n) => ({ ...n, filename: n.filename || e[e.length - 1].filename, function: n.function || "?" }));
319
+ return /sentryWrapped/.test(e[e.length - 1].function || "") && e.pop(), e.reverse(), Xt.test(e[e.length - 1].function || "") && (e.pop(), Xt.test(e[e.length - 1].function || "") && e.pop()), e.slice(0, Zt).map((n) => ({ ...n, filename: n.filename || e[e.length - 1].filename, function: n.function || "?" }));
350
320
  }
351
- var at = "<anonymous>";
352
- function oe(t) {
321
+ var ot = "<anonymous>";
322
+ function se(t) {
353
323
  try {
354
- return !t || typeof t != "function" ? at : t.name || at;
324
+ return !t || typeof t != "function" ? ot : t.name || ot;
355
325
  } catch {
356
- return at;
326
+ return ot;
357
327
  }
358
328
  }
359
- function ut(t) {
360
- return [90, Xt(t)];
329
+ function ct(t) {
330
+ return [90, Jt(t)];
361
331
  }
362
- var dt = A();
332
+ var ut = N();
363
333
  function mr() {
364
- if (!("fetch" in dt)) return false;
334
+ if (!("fetch" in ut)) return false;
365
335
  try {
366
336
  return new Headers(), new Request("http://www.example.com"), new Response(), true;
367
337
  } catch {
368
338
  return false;
369
339
  }
370
340
  }
371
- function nn(t) {
341
+ function en(t) {
372
342
  return t && /^function fetch\(\)\s+\{\s+\[native code\]\s+\}$/.test(t.toString());
373
343
  }
374
- function rn() {
344
+ function tn() {
375
345
  if (!mr()) return false;
376
- if (nn(dt.fetch)) return true;
377
- let t = false, e = dt.document;
346
+ if (en(ut.fetch)) return true;
347
+ let t = false, e = ut.document;
378
348
  if (e && typeof e.createElement == "function") try {
379
349
  let n = e.createElement("iframe");
380
- n.hidden = true, e.head.appendChild(n), n.contentWindow && n.contentWindow.fetch && (t = nn(n.contentWindow.fetch)), e.head.removeChild(n);
350
+ n.hidden = true, e.head.appendChild(n), n.contentWindow && n.contentWindow.fetch && (t = en(n.contentWindow.fetch)), e.head.removeChild(n);
381
351
  } catch (n) {
382
352
  (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("Could not create sandbox iframe for pure fetch check, bailing to window.fetch: ", n);
383
353
  }
384
354
  return t;
385
355
  }
386
- var De = A();
387
- function sn() {
388
- let t = De.chrome, e = t && t.app && t.app.runtime, n = "history" in De && !!De.history.pushState && !!De.history.replaceState;
356
+ var Re = N();
357
+ function nn() {
358
+ let t = Re.chrome, e = t && t.app && t.app.runtime, n = "history" in Re && !!Re.history.pushState && !!Re.history.replaceState;
389
359
  return !e && n;
390
360
  }
391
- var y = A();
392
- var ae = "__sentry_xhr_v2__";
393
- var ce = {};
394
- var on = {};
361
+ var y = N();
362
+ var ie = "__sentry_xhr_v2__";
363
+ var oe = {};
364
+ var rn = {};
395
365
  function hr(t) {
396
- if (!on[t]) switch (on[t] = true, t) {
366
+ if (!rn[t]) switch (rn[t] = true, t) {
397
367
  case "console":
398
368
  _r();
399
369
  break;
400
370
  case "dom":
401
- fn();
371
+ dn();
402
372
  break;
403
373
  case "xhr":
404
- ln();
374
+ un();
405
375
  break;
406
376
  case "fetch":
407
377
  gr();
@@ -420,97 +390,97 @@ function hr(t) {
420
390
  return;
421
391
  }
422
392
  }
423
- function Ce(t, e) {
424
- ce[t] = ce[t] || [], ce[t].push(e), hr(t);
393
+ function De(t, e) {
394
+ oe[t] = oe[t] || [], oe[t].push(e), hr(t);
425
395
  }
426
- function D(t, e) {
427
- if (!(!t || !ce[t])) for (let n of ce[t] || []) try {
396
+ function A(t, e) {
397
+ if (!(!t || !oe[t])) for (let n of oe[t] || []) try {
428
398
  n(e);
429
399
  } catch (r) {
430
400
  (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.error(`Error while triggering instrumentation handler.
431
401
  Type: ${t}
432
- Name: ${oe(n)}
402
+ Name: ${se(n)}
433
403
  Error:`, r);
434
404
  }
435
405
  }
436
406
  function _r() {
437
- "console" in h && se.forEach(function(t) {
438
- t in h.console && N(h.console, t, function(e) {
439
- return z[t] = e, function(...n) {
440
- D("console", { args: n, level: t });
441
- let r = z[t];
407
+ "console" in h && ne.forEach(function(t) {
408
+ t in h.console && I(h.console, t, function(e) {
409
+ return W[t] = e, function(...n) {
410
+ A("console", { args: n, level: t });
411
+ let r = W[t];
442
412
  r && r.apply(h.console, n);
443
413
  };
444
414
  });
445
415
  });
446
416
  }
447
417
  function gr() {
448
- rn() && N(h, "fetch", function(t) {
418
+ tn() && I(h, "fetch", function(t) {
449
419
  return function(...e) {
450
- let { method: n, url: r } = dn(e), s = { args: e, fetchData: { method: n, url: r }, startTimestamp: Date.now() };
451
- return D("fetch", { ...s }), t.apply(h, e).then((i) => (D("fetch", { ...s, endTimestamp: Date.now(), response: i }), i), (i) => {
452
- throw D("fetch", { ...s, endTimestamp: Date.now(), error: i }), i;
420
+ let { method: n, url: r } = cn(e), s = { args: e, fetchData: { method: n, url: r }, startTimestamp: Date.now() };
421
+ return A("fetch", { ...s }), t.apply(h, e).then((i) => (A("fetch", { ...s, endTimestamp: Date.now(), response: i }), i), (i) => {
422
+ throw A("fetch", { ...s, endTimestamp: Date.now(), error: i }), i;
453
423
  });
454
424
  };
455
425
  });
456
426
  }
457
- function lt(t, e) {
427
+ function dt(t, e) {
458
428
  return !!t && typeof t == "object" && !!t[e];
459
429
  }
460
- function an(t) {
461
- return typeof t == "string" ? t : t ? lt(t, "url") ? t.url : t.toString ? t.toString() : "" : "";
430
+ function sn(t) {
431
+ return typeof t == "string" ? t : t ? dt(t, "url") ? t.url : t.toString ? t.toString() : "" : "";
462
432
  }
463
- function dn(t) {
433
+ function cn(t) {
464
434
  if (t.length === 0) return { method: "GET", url: "" };
465
435
  if (t.length === 2) {
466
436
  let [n, r] = t;
467
- return { url: an(n), method: lt(r, "method") ? String(r.method).toUpperCase() : "GET" };
437
+ return { url: sn(n), method: dt(r, "method") ? String(r.method).toUpperCase() : "GET" };
468
438
  }
469
439
  let e = t[0];
470
- return { url: an(e), method: lt(e, "method") ? String(e.method).toUpperCase() : "GET" };
440
+ return { url: sn(e), method: dt(e, "method") ? String(e.method).toUpperCase() : "GET" };
471
441
  }
472
- function ln() {
442
+ function un() {
473
443
  if (!y.XMLHttpRequest) return;
474
444
  let t = XMLHttpRequest.prototype;
475
- N(t, "open", function(e) {
445
+ I(t, "open", function(e) {
476
446
  return function(...n) {
477
- let r = Date.now(), s = n[1], i = this[ae] = { method: W(n[0]) ? n[0].toUpperCase() : n[0], url: n[1], request_headers: {} };
478
- W(s) && i.method === "POST" && s.match(/sentry_key/) && (this.__sentry_own_request__ = true);
447
+ let r = Date.now(), s = n[1], i = this[ie] = { method: q(n[0]) ? n[0].toUpperCase() : n[0], url: n[1], request_headers: {} };
448
+ q(s) && i.method === "POST" && s.match(/sentry_key/) && (this.__sentry_own_request__ = true);
479
449
  let o = () => {
480
- let a = this[ae];
450
+ let a = this[ie];
481
451
  if (a && this.readyState === 4) {
482
452
  try {
483
453
  a.status_code = this.status;
484
454
  } catch {
485
455
  }
486
- D("xhr", { args: n, endTimestamp: Date.now(), startTimestamp: r, xhr: this });
456
+ A("xhr", { args: n, endTimestamp: Date.now(), startTimestamp: r, xhr: this });
487
457
  }
488
458
  };
489
- return "onreadystatechange" in this && typeof this.onreadystatechange == "function" ? N(this, "onreadystatechange", function(a) {
459
+ return "onreadystatechange" in this && typeof this.onreadystatechange == "function" ? I(this, "onreadystatechange", function(a) {
490
460
  return function(...c) {
491
461
  return o(), a.apply(this, c);
492
462
  };
493
- }) : this.addEventListener("readystatechange", o), N(this, "setRequestHeader", function(a) {
463
+ }) : this.addEventListener("readystatechange", o), I(this, "setRequestHeader", function(a) {
494
464
  return function(...c) {
495
- let [u, l] = c, d = this[ae];
465
+ let [u, l] = c, d = this[ie];
496
466
  return d && (d.request_headers[u.toLowerCase()] = l), a.apply(this, c);
497
467
  };
498
468
  }), e.apply(this, n);
499
469
  };
500
- }), N(t, "send", function(e) {
470
+ }), I(t, "send", function(e) {
501
471
  return function(...n) {
502
- let r = this[ae];
503
- return r && n[0] !== void 0 && (r.body = n[0]), D("xhr", { args: n, startTimestamp: Date.now(), xhr: this }), e.apply(this, n);
472
+ let r = this[ie];
473
+ return r && n[0] !== void 0 && (r.body = n[0]), A("xhr", { args: n, startTimestamp: Date.now(), xhr: this }), e.apply(this, n);
504
474
  };
505
475
  });
506
476
  }
507
- var we;
477
+ var xe;
508
478
  function Er() {
509
- if (!sn()) return;
479
+ if (!nn()) return;
510
480
  let t = y.onpopstate;
511
481
  y.onpopstate = function(...n) {
512
- let r = y.location.href, s = we;
513
- if (we = r, D("history", { from: s, to: r }), t) try {
482
+ let r = y.location.href, s = xe;
483
+ if (xe = r, A("history", { from: s, to: r }), t) try {
514
484
  return t.apply(this, n);
515
485
  } catch {
516
486
  }
@@ -519,17 +489,17 @@ function Er() {
519
489
  return function(...r) {
520
490
  let s = r.length > 2 ? r[2] : void 0;
521
491
  if (s) {
522
- let i = we, o = String(s);
523
- we = o, D("history", { from: i, to: o });
492
+ let i = xe, o = String(s);
493
+ xe = o, A("history", { from: i, to: o });
524
494
  }
525
495
  return n.apply(this, r);
526
496
  };
527
497
  }
528
- N(y.history, "pushState", e), N(y.history, "replaceState", e);
498
+ I(y.history, "pushState", e), I(y.history, "replaceState", e);
529
499
  }
530
500
  var yr = 1e3;
531
- var cn;
532
- var Oe;
501
+ var on;
502
+ var Ie;
533
503
  function Sr(t, e) {
534
504
  if (t.type !== e.type) return false;
535
505
  try {
@@ -548,27 +518,27 @@ function Tr(t) {
548
518
  }
549
519
  return true;
550
520
  }
551
- function un(t, e = false) {
521
+ function an(t, e = false) {
552
522
  return (n) => {
553
523
  if (!n || n._sentryCaptured || Tr(n)) return;
554
- V(n, "_sentryCaptured", true);
524
+ z(n, "_sentryCaptured", true);
555
525
  let r = n.type === "keypress" ? "input" : n.type;
556
- (Oe === void 0 || !Sr(Oe, n)) && (t({ event: n, name: r, global: e }), Oe = n), clearTimeout(cn), cn = y.setTimeout(() => {
557
- Oe = void 0;
526
+ (Ie === void 0 || !Sr(Ie, n)) && (t({ event: n, name: r, global: e }), Ie = n), clearTimeout(on), on = y.setTimeout(() => {
527
+ Ie = void 0;
558
528
  }, yr);
559
529
  };
560
530
  }
561
- function fn() {
531
+ function dn() {
562
532
  if (!y.document) return;
563
- let t = D.bind(null, "dom"), e = un(t, true);
533
+ let t = A.bind(null, "dom"), e = an(t, true);
564
534
  y.document.addEventListener("click", e, false), y.document.addEventListener("keypress", e, false), ["EventTarget", "Node"].forEach((n) => {
565
535
  let r = y[n] && y[n].prototype;
566
- !r || !r.hasOwnProperty || !r.hasOwnProperty("addEventListener") || (N(r, "addEventListener", function(s) {
536
+ !r || !r.hasOwnProperty || !r.hasOwnProperty("addEventListener") || (I(r, "addEventListener", function(s) {
567
537
  return function(i, o, a) {
568
538
  if (i === "click" || i == "keypress") try {
569
539
  let c = this, u = c.__sentry_instrumentation_handlers__ = c.__sentry_instrumentation_handlers__ || {}, l = u[i] = u[i] || { refCount: 0 };
570
540
  if (!l.handler) {
571
- let d = un(t);
541
+ let d = an(t);
572
542
  l.handler = d, s.call(this, i, d, a);
573
543
  }
574
544
  l.refCount++;
@@ -576,7 +546,7 @@ function fn() {
576
546
  }
577
547
  return s.call(this, i, o, a);
578
548
  };
579
- }), N(r, "removeEventListener", function(s) {
549
+ }), I(r, "removeEventListener", function(s) {
580
550
  return function(i, o, a) {
581
551
  if (i === "click" || i == "keypress") try {
582
552
  let c = this, u = c.__sentry_instrumentation_handlers__ || {}, l = u[i];
@@ -588,28 +558,28 @@ function fn() {
588
558
  }));
589
559
  });
590
560
  }
591
- var ve = null;
561
+ var Ne = null;
592
562
  function br() {
593
- ve = y.onerror, y.onerror = function(t, e, n, r, s) {
594
- return D("error", { column: r, error: s, line: n, msg: t, url: e }), ve && !ve.__SENTRY_LOADER__ ? ve.apply(this, arguments) : false;
563
+ Ne = y.onerror, y.onerror = function(t, e, n, r, s) {
564
+ return A("error", { column: r, error: s, line: n, msg: t, url: e }), Ne && !Ne.__SENTRY_LOADER__ ? Ne.apply(this, arguments) : false;
595
565
  }, y.onerror.__SENTRY_INSTRUMENTED__ = true;
596
566
  }
597
- var ke = null;
567
+ var Ae = null;
598
568
  function Rr() {
599
- ke = y.onunhandledrejection, y.onunhandledrejection = function(t) {
600
- return D("unhandledrejection", t), ke && !ke.__SENTRY_LOADER__ ? ke.apply(this, arguments) : true;
569
+ Ae = y.onunhandledrejection, y.onunhandledrejection = function(t) {
570
+ return A("unhandledrejection", t), Ae && !Ae.__SENTRY_LOADER__ ? Ae.apply(this, arguments) : true;
601
571
  }, y.onunhandledrejection.__SENTRY_INSTRUMENTED__ = true;
602
572
  }
603
- function pn() {
573
+ function ln() {
604
574
  return typeof __SENTRY_BROWSER_BUNDLE__ < "u" && !!__SENTRY_BROWSER_BUNDLE__;
605
575
  }
606
- function mn() {
607
- return !pn() && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]";
576
+ function fn() {
577
+ return !ln() && Object.prototype.toString.call(typeof process < "u" ? process : 0) === "[object process]";
608
578
  }
609
- function hn(t, e) {
579
+ function pn(t, e) {
610
580
  return t.require(e);
611
581
  }
612
- function _n() {
582
+ function mn() {
613
583
  let t = typeof WeakSet == "function", e = t ? /* @__PURE__ */ new WeakSet() : [];
614
584
  function n(s) {
615
585
  if (t) return e.has(s) ? true : (e.add(s), false);
@@ -637,11 +607,11 @@ function g() {
637
607
  function xr(t) {
638
608
  return t.exception && t.exception.values ? t.exception.values[0] : void 0;
639
609
  }
640
- function ue(t, e, n) {
610
+ function ae(t, e, n) {
641
611
  let r = t.exception = t.exception || {}, s = r.values = r.values || [], i = s[0] = s[0] || {};
642
612
  i.value || (i.value = e || ""), i.type || (i.type = n || "Error");
643
613
  }
644
- function de(t, e) {
614
+ function ce(t, e) {
645
615
  let n = xr(t);
646
616
  if (!n) return;
647
617
  let r = { type: "generic", handled: true }, s = n.mechanism;
@@ -650,31 +620,31 @@ function de(t, e) {
650
620
  n.mechanism.data = i;
651
621
  }
652
622
  }
653
- function Pe(t) {
623
+ function we(t) {
654
624
  if (t && t.__sentry_captured__) return true;
655
625
  try {
656
- V(t, "__sentry_captured__", true);
626
+ z(t, "__sentry_captured__", true);
657
627
  } catch {
658
628
  }
659
629
  return false;
660
630
  }
661
- function le(t) {
631
+ function ue(t) {
662
632
  return Array.isArray(t) ? t : [t];
663
633
  }
664
- function w(t, e = 100, n = 1 / 0) {
634
+ function D(t, e = 100, n = 1 / 0) {
665
635
  try {
666
- return Me("", t, e, n);
636
+ return ve("", t, e, n);
667
637
  } catch (r) {
668
638
  return { ERROR: `**non-serializable** (${r})` };
669
639
  }
670
640
  }
671
- function J(t, e = 3, n = 100 * 1024) {
672
- let r = w(t, e);
673
- return Dr(r) > n ? J(t, e - 1, n) : r;
641
+ function V(t, e = 3, n = 100 * 1024) {
642
+ let r = D(t, e);
643
+ return Dr(r) > n ? V(t, e - 1, n) : r;
674
644
  }
675
- function Me(t, e, n = 1 / 0, r = 1 / 0, s = _n()) {
645
+ function ve(t, e, n = 1 / 0, r = 1 / 0, s = mn()) {
676
646
  let [i, o] = s;
677
- if (e == null || ["number", "boolean", "string"].includes(typeof e) && !ne(e)) return e;
647
+ if (e == null || ["number", "boolean", "string"].includes(typeof e) && !ee(e)) return e;
678
648
  let a = Ir(t, e);
679
649
  if (!a.startsWith("[object ")) return a;
680
650
  if (e.__sentry_skip_normalization__) return e;
@@ -684,10 +654,10 @@ function Me(t, e, n = 1 / 0, r = 1 / 0, s = _n()) {
684
654
  let u = e;
685
655
  if (u && typeof u.toJSON == "function") try {
686
656
  let m = u.toJSON();
687
- return Me("", m, c - 1, r, s);
657
+ return ve("", m, c - 1, r, s);
688
658
  } catch {
689
659
  }
690
- let l = Array.isArray(e) ? [] : {}, d = 0, p = Ne(e);
660
+ let l = Array.isArray(e) ? [] : {}, d = 0, p = Te(e);
691
661
  for (let m in p) {
692
662
  if (!Object.prototype.hasOwnProperty.call(p, m)) continue;
693
663
  if (d >= r) {
@@ -695,7 +665,7 @@ function Me(t, e, n = 1 / 0, r = 1 / 0, s = _n()) {
695
665
  break;
696
666
  }
697
667
  let v = p[m];
698
- l[m] = Me(m, v, c - 1, r, s), d++;
668
+ l[m] = ve(m, v, c - 1, r, s), d++;
699
669
  }
700
670
  return o(e), l;
701
671
  }
@@ -706,10 +676,10 @@ function Ir(t, e) {
706
676
  if (typeof global < "u" && e === global) return "[Global]";
707
677
  if (typeof window < "u" && e === window) return "[Window]";
708
678
  if (typeof document < "u" && e === document) return "[Document]";
709
- if (st(e)) return "[VueViewModel]";
710
- if (rt(e)) return "[SyntheticEvent]";
679
+ if (rt(e)) return "[VueViewModel]";
680
+ if (nt(e)) return "[SyntheticEvent]";
711
681
  if (typeof e == "number" && e !== e) return "[NaN]";
712
- if (typeof e == "function") return `[Function: ${oe(e)}]`;
682
+ if (typeof e == "function") return `[Function: ${se(e)}]`;
713
683
  if (typeof e == "symbol") return `[${String(e)}]`;
714
684
  if (typeof e == "bigint") return `[BigInt: ${String(e)}]`;
715
685
  let n = Nr(e);
@@ -729,35 +699,35 @@ function Dr(t) {
729
699
  return Ar(JSON.stringify(t));
730
700
  }
731
701
  var wr = /^(\S+:\\|\/?)([\s\S]*?)((?:\.{1,2}|[^/\\]+?|)(\.[^./\\]*|))(?:[/\\]*)$/;
732
- function Or(t) {
702
+ function vr(t) {
733
703
  let e = t.length > 1024 ? `<truncated>${t.slice(-1024)}` : t, n = wr.exec(e);
734
704
  return n ? n.slice(1) : [];
735
705
  }
736
- function ft(t, e) {
737
- let n = Or(t)[2];
706
+ function lt(t, e) {
707
+ let n = vr(t)[2];
738
708
  return e && n.slice(e.length * -1) === e && (n = n.slice(0, n.length - e.length)), n;
739
709
  }
740
- var C;
710
+ var k;
741
711
  (function(t) {
742
712
  t[t.PENDING = 0] = "PENDING";
743
713
  let n = 1;
744
714
  t[t.RESOLVED = n] = "RESOLVED";
745
715
  let r = 2;
746
716
  t[t.REJECTED = r] = "REJECTED";
747
- })(C || (C = {}));
717
+ })(k || (k = {}));
748
718
  function b(t) {
749
719
  return new S((e) => {
750
720
  e(t);
751
721
  });
752
722
  }
753
- function $(t) {
723
+ function F(t) {
754
724
  return new S((e, n) => {
755
725
  n(t);
756
726
  });
757
727
  }
758
728
  var S = class {
759
729
  constructor(e) {
760
- S.prototype.__init.call(this), S.prototype.__init2.call(this), S.prototype.__init3.call(this), S.prototype.__init4.call(this), this._state = C.PENDING, this._handlers = [];
730
+ S.prototype.__init.call(this), S.prototype.__init2.call(this), S.prototype.__init3.call(this), S.prototype.__init4.call(this), this._state = k.PENDING, this._handlers = [];
761
731
  try {
762
732
  e(this._resolve, this._reject);
763
733
  } catch (n) {
@@ -804,18 +774,18 @@ var S = class {
804
774
  }
805
775
  __init() {
806
776
  this._resolve = (e) => {
807
- this._setResult(C.RESOLVED, e);
777
+ this._setResult(k.RESOLVED, e);
808
778
  };
809
779
  }
810
780
  __init2() {
811
781
  this._reject = (e) => {
812
- this._setResult(C.REJECTED, e);
782
+ this._setResult(k.REJECTED, e);
813
783
  };
814
784
  }
815
785
  __init3() {
816
786
  this._setResult = (e, n) => {
817
- if (this._state === C.PENDING) {
818
- if (F(n)) {
787
+ if (this._state === k.PENDING) {
788
+ if (B(n)) {
819
789
  n.then(this._resolve, this._reject);
820
790
  return;
821
791
  }
@@ -825,15 +795,15 @@ var S = class {
825
795
  }
826
796
  __init4() {
827
797
  this._executeHandlers = () => {
828
- if (this._state === C.PENDING) return;
798
+ if (this._state === k.PENDING) return;
829
799
  let e = this._handlers.slice();
830
800
  this._handlers = [], e.forEach((n) => {
831
- n[0] || (this._state === C.RESOLVED && n[1](this._value), this._state === C.REJECTED && n[2](this._value), n[0] = true);
801
+ n[0] || (this._state === k.RESOLVED && n[1](this._value), this._state === k.REJECTED && n[2](this._value), n[0] = true);
832
802
  });
833
803
  };
834
804
  }
835
805
  };
836
- function pt(t) {
806
+ function ft(t) {
837
807
  let e = [];
838
808
  function n() {
839
809
  return t === void 0 || e.length < t;
@@ -842,7 +812,7 @@ function pt(t) {
842
812
  return e.splice(e.indexOf(o), 1)[0];
843
813
  }
844
814
  function s(o) {
845
- if (!n()) return $(new T("Not adding Promise because buffer limit was reached."));
815
+ if (!n()) return F(new T("Not adding Promise because buffer limit was reached."));
846
816
  let a = o();
847
817
  return e.indexOf(a) === -1 && e.push(a), a.then(() => r(a)).then(null, () => r(a).then(null, () => {
848
818
  })), a;
@@ -863,48 +833,48 @@ function pt(t) {
863
833
  }
864
834
  return { $: e, add: s, drain: i };
865
835
  }
866
- var En = A();
867
- var ht = { nowSeconds: () => Date.now() / 1e3 };
868
- function vr() {
869
- let { performance: t } = En;
836
+ var _n = N();
837
+ var mt = { nowSeconds: () => Date.now() / 1e3 };
838
+ function Or() {
839
+ let { performance: t } = _n;
870
840
  if (!t || !t.now) return;
871
841
  let e = Date.now() - t.now();
872
842
  return { now: () => t.now(), timeOrigin: e };
873
843
  }
874
844
  function kr() {
875
845
  try {
876
- return hn(module, "perf_hooks").performance;
846
+ return pn(module, "perf_hooks").performance;
877
847
  } catch {
878
848
  return;
879
849
  }
880
850
  }
881
- var mt = mn() ? kr() : vr();
882
- var gn = mt === void 0 ? ht : { nowSeconds: () => (mt.timeOrigin + mt.now()) / 1e3 };
883
- var H = ht.nowSeconds.bind(ht);
884
- var Y = gn.nowSeconds.bind(gn);
885
- var fe;
851
+ var pt = fn() ? kr() : Or();
852
+ var hn = pt === void 0 ? mt : { nowSeconds: () => (pt.timeOrigin + pt.now()) / 1e3 };
853
+ var G = mt.nowSeconds.bind(mt);
854
+ var $ = hn.nowSeconds.bind(hn);
855
+ var de;
886
856
  var Cr = (() => {
887
- let { performance: t } = En;
857
+ let { performance: t } = _n;
888
858
  if (!t || !t.now) {
889
- fe = "none";
859
+ de = "none";
890
860
  return;
891
861
  }
892
862
  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;
893
- return i || u ? s <= c ? (fe = "timeOrigin", t.timeOrigin) : (fe = "navigationStart", o) : (fe = "dateNow", r);
863
+ return i || u ? s <= c ? (de = "timeOrigin", t.timeOrigin) : (de = "navigationStart", o) : (de = "dateNow", r);
894
864
  })();
895
865
  var Pr = new RegExp("^[ \\t]*([0-9a-f]{32})?-?([0-9a-f]{16})?-?([01])?[ \\t]*$");
896
- function _t(t = g(), e = g().substring(16), n) {
866
+ function ht(t = g(), e = g().substring(16), n) {
897
867
  let r = "";
898
868
  return n !== void 0 && (r = n ? "-1" : "-0"), `${t}-${e}${r}`;
899
869
  }
900
- function G(t, e = []) {
870
+ function U(t, e = []) {
901
871
  return [t, e];
902
872
  }
903
- function Et(t, e) {
873
+ function gt(t, e) {
904
874
  let [n, r] = t;
905
875
  return [n, [...r, e]];
906
876
  }
907
- function Ue(t, e) {
877
+ function Oe(t, e) {
908
878
  let n = t[1];
909
879
  for (let r of n) {
910
880
  let s = r[0].type;
@@ -912,13 +882,13 @@ function Ue(t, e) {
912
882
  }
913
883
  return false;
914
884
  }
915
- function gt(t, e) {
885
+ function _t(t, e) {
916
886
  return (e || new TextEncoder()).encode(t);
917
887
  }
918
- function yt(t, e) {
888
+ function Et(t, e) {
919
889
  let [n, r] = t, s = JSON.stringify(n);
920
890
  function i(o) {
921
- typeof s == "string" ? s = typeof o == "string" ? s + o : [gt(s, e), o] : s.push(typeof o == "string" ? gt(o, e) : o);
891
+ typeof s == "string" ? s = typeof o == "string" ? s + o : [_t(s, e), o] : s.push(typeof o == "string" ? _t(o, e) : o);
922
892
  }
923
893
  for (let o of r) {
924
894
  let [a, c] = o;
@@ -930,7 +900,7 @@ ${JSON.stringify(a)}
930
900
  try {
931
901
  u = JSON.stringify(c);
932
902
  } catch {
933
- u = JSON.stringify(w(c));
903
+ u = JSON.stringify(D(c));
934
904
  }
935
905
  i(u);
936
906
  }
@@ -942,105 +912,105 @@ function Mr(t) {
942
912
  for (let s of t) n.set(s, r), r += s.length;
943
913
  return n;
944
914
  }
945
- function St(t, e) {
946
- let n = typeof t.data == "string" ? gt(t.data, e) : t.data;
915
+ function yt(t, e) {
916
+ let n = typeof t.data == "string" ? _t(t.data, e) : t.data;
947
917
  return [E({ type: "attachment", length: n.length, filename: t.filename, content_type: t.contentType, attachment_type: t.attachmentType }), n];
948
918
  }
949
919
  var Ur = { session: "session", sessions: "session", attachment: "attachment", transaction: "transaction", event: "error", client_report: "internal", user_report: "default", profile: "profile", replay_event: "replay", replay_recording: "replay", check_in: "monitor", statsd: "unknown" };
950
- function Ge(t) {
920
+ function ke(t) {
951
921
  return Ur[t];
952
922
  }
953
- function Le(t) {
923
+ function Ce(t) {
954
924
  if (!t || !t.sdk) return;
955
925
  let { name: e, version: n } = t.sdk;
956
926
  return { name: e, version: n };
957
927
  }
958
- function Tt(t, e, n, r) {
928
+ function St(t, e, n, r) {
959
929
  let s = t.sdkProcessingMetadata && t.sdkProcessingMetadata.dynamicSamplingContext;
960
- return { event_id: t.event_id, sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...e && { sdk: e }, ...!!n && r && { dsn: U(r) }, ...s && { trace: E({ ...s }) } };
930
+ return { event_id: t.event_id, sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...e && { sdk: e }, ...!!n && r && { dsn: M(r) }, ...s && { trace: E({ ...s }) } };
961
931
  }
962
- function yn(t, e = Date.now()) {
932
+ function gn(t, e = Date.now()) {
963
933
  let n = parseInt(`${t}`, 10);
964
934
  if (!isNaN(n)) return n * 1e3;
965
935
  let r = Date.parse(`${t}`);
966
936
  return isNaN(r) ? 6e4 : r - e;
967
937
  }
968
- function Sn(t, e) {
938
+ function En(t, e) {
969
939
  return t[e] || t.all || 0;
970
940
  }
971
- function bt(t, e, n = Date.now()) {
972
- return Sn(t, e) > n;
941
+ function Tt(t, e, n = Date.now()) {
942
+ return En(t, e) > n;
973
943
  }
974
- function Rt(t, { statusCode: e, headers: n }, r = Date.now()) {
944
+ function bt(t, { statusCode: e, headers: n }, r = Date.now()) {
975
945
  let s = { ...t }, i = n && n["x-sentry-rate-limits"], o = n && n["retry-after"];
976
946
  if (i) for (let a of i.trim().split(",")) {
977
947
  let [c, u] = a.split(":", 2), l = parseInt(c, 10), d = (isNaN(l) ? 60 : l) * 1e3;
978
948
  if (!u) s.all = r + d;
979
949
  else for (let p of u.split(";")) s[p] = r + d;
980
950
  }
981
- else o ? s.all = r + yn(o, r) : e === 429 && (s.all = r + 60 * 1e3);
951
+ else o ? s.all = r + gn(o, r) : e === 429 && (s.all = r + 60 * 1e3);
982
952
  return s;
983
953
  }
984
- function xt(t, e) {
954
+ function Rt(t, e) {
985
955
  return t(e.stack || "", 1);
986
956
  }
987
- function Tn(t, e) {
988
- let n = { type: e.name || e.constructor.name, value: e.message }, r = xt(t, e);
957
+ function yn(t, e) {
958
+ let n = { type: e.name || e.constructor.name, value: e.message }, r = Rt(t, e);
989
959
  return r.length && (n.stacktrace = { frames: r }), n;
990
960
  }
991
- function Gr(t) {
961
+ function Lr(t) {
992
962
  if ("name" in t && typeof t.name == "string") {
993
963
  let e = `'${t.name}' captured as exception`;
994
964
  return "message" in t && typeof t.message == "string" && (e += ` with message '${t.message}'`), e;
995
- } else return "message" in t && typeof t.message == "string" ? t.message : `Object captured as exception with keys: ${ie(t)}`;
965
+ } else return "message" in t && typeof t.message == "string" ? t.message : `Object captured as exception with keys: ${re(t)}`;
996
966
  }
997
- function It(t, e, n, r) {
967
+ function xt(t, e, n, r) {
998
968
  let s = n, o = r && r.data && r.data.mechanism || { handled: true, type: "generic" };
999
- if (!B(n)) {
1000
- if (I(n)) {
969
+ if (!L(n)) {
970
+ if (x(n)) {
1001
971
  let c = t(), u = c.getClient(), l = u && u.getOptions().normalizeDepth;
1002
972
  c.configureScope((p) => {
1003
- p.setExtra("__serialized__", J(n, l));
973
+ p.setExtra("__serialized__", V(n, l));
1004
974
  });
1005
- let d = Gr(n);
975
+ let d = Lr(n);
1006
976
  s = r && r.syntheticException || new Error(d), s.message = d;
1007
977
  } else s = r && r.syntheticException || new Error(n), s.message = n;
1008
978
  o.synthetic = true;
1009
979
  }
1010
- let a = { exception: { values: [Tn(e, s)] } };
1011
- return ue(a, void 0, void 0), de(a, o), { ...a, event_id: r && r.event_id };
980
+ let a = { exception: { values: [yn(e, s)] } };
981
+ return ae(a, void 0, void 0), ce(a, o), { ...a, event_id: r && r.event_id };
1012
982
  }
1013
- function Nt(t, e, n = "info", r, s) {
983
+ function It(t, e, n = "info", r, s) {
1014
984
  let i = { event_id: r && r.event_id, level: n, message: e };
1015
985
  if (s && r && r.syntheticException) {
1016
- let o = xt(t, r.syntheticException);
986
+ let o = Rt(t, r.syntheticException);
1017
987
  o.length && (i.exception = { values: [{ value: e, stacktrace: { frames: o } }] });
1018
988
  }
1019
989
  return i;
1020
990
  }
1021
- var K = "production";
1022
- function pe() {
1023
- return re("globalEventProcessors", () => []);
991
+ var J = "production";
992
+ function le() {
993
+ return te("globalEventProcessors", () => []);
1024
994
  }
1025
- function bn(t) {
1026
- pe().push(t);
995
+ function Sn(t) {
996
+ le().push(t);
1027
997
  }
1028
- function X(t, e, n, r = 0) {
998
+ function K(t, e, n, r = 0) {
1029
999
  return new S((s, i) => {
1030
1000
  let o = t[r];
1031
1001
  if (e === null || typeof o != "function") s(e);
1032
1002
  else {
1033
1003
  let a = o({ ...e }, n);
1034
- (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && o.id && a === null && f.log(`Event processor "${o.id}" dropped event`), F(a) ? a.then((c) => X(t, c, n, r + 1).then(s)).then(null, i) : X(t, a, n, r + 1).then(s).then(null, i);
1004
+ (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && o.id && a === null && f.log(`Event processor "${o.id}" dropped event`), B(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);
1035
1005
  }
1036
1006
  });
1037
1007
  }
1038
- function Rn(t) {
1039
- let e = Y(), n = { sid: g(), init: true, timestamp: e, started: e, duration: 0, status: "ok", errors: 0, ignoreDuration: false, toJSON: () => Lr(n) };
1040
- return t && P(n, t), n;
1008
+ function Tn(t) {
1009
+ let e = $(), n = { sid: g(), init: true, timestamp: e, started: e, duration: 0, status: "ok", errors: 0, ignoreDuration: false, toJSON: () => Br(n) };
1010
+ return t && C(n, t), n;
1041
1011
  }
1042
- function P(t, e = {}) {
1043
- 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 || Y(), 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 : g()), 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;
1012
+ function C(t, e = {}) {
1013
+ 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 || $(), 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 : g()), 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;
1044
1014
  else if (typeof e.duration == "number") t.duration = e.duration;
1045
1015
  else {
1046
1016
  let n = t.timestamp - t.started;
@@ -1048,20 +1018,20 @@ function P(t, e = {}) {
1048
1018
  }
1049
1019
  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);
1050
1020
  }
1051
- function xn(t, e) {
1021
+ function bn(t, e) {
1052
1022
  let n = {};
1053
- e ? n = { status: e } : t.status === "ok" && (n = { status: "exited" }), P(t, n);
1023
+ e ? n = { status: e } : t.status === "ok" && (n = { status: "exited" }), C(t, n);
1054
1024
  }
1055
- function Lr(t) {
1025
+ function Br(t) {
1056
1026
  return E({ sid: `${t.sid}`, init: t.init, started: new Date(t.started * 1e3).toISOString(), timestamp: new Date(t.timestamp * 1e3).toISOString(), status: t.status, errors: t.errors, did: typeof t.did == "number" || typeof t.did == "string" ? `${t.did}` : void 0, duration: t.duration, abnormal_mechanism: t.abnormal_mechanism, attrs: { release: t.release, environment: t.environment, ip_address: t.ipAddress, user_agent: t.userAgent } });
1057
1027
  }
1058
- var Br = 100;
1059
- var O = class {
1028
+ var Fr = 100;
1029
+ var w = class {
1060
1030
  constructor() {
1061
- this._notifyingListeners = false, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = In();
1031
+ this._notifyingListeners = false, this._scopeListeners = [], this._eventProcessors = [], this._breadcrumbs = [], this._attachments = [], this._user = {}, this._tags = {}, this._extra = {}, this._contexts = {}, this._sdkProcessingMetadata = {}, this._propagationContext = Rn();
1062
1032
  }
1063
1033
  static clone(e) {
1064
- let n = new O();
1034
+ let n = new w();
1065
1035
  return e && (n._breadcrumbs = [...e._breadcrumbs], n._tags = { ...e._tags }, n._extra = { ...e._extra }, n._contexts = { ...e._contexts }, n._user = e._user, n._level = e._level, n._span = e._span, n._session = e._session, n._transactionName = e._transactionName, n._fingerprint = e._fingerprint, n._eventProcessors = [...e._eventProcessors], n._requestSession = e._requestSession, n._attachments = [...e._attachments], n._sdkProcessingMetadata = { ...e._sdkProcessingMetadata }, n._propagationContext = { ...e._propagationContext }), n;
1066
1036
  }
1067
1037
  addScopeListener(e) {
@@ -1071,7 +1041,7 @@ var O = class {
1071
1041
  return this._eventProcessors.push(e), this;
1072
1042
  }
1073
1043
  setUser(e) {
1074
- return this._user = e || {}, this._session && P(this._session, { user: e }), this._notifyScopeListeners(), this;
1044
+ return this._user = e || {}, this._session && C(this._session, { user: e }), this._notifyScopeListeners(), this;
1075
1045
  }
1076
1046
  getUser() {
1077
1047
  return this._user;
@@ -1126,17 +1096,17 @@ var O = class {
1126
1096
  if (!e) return this;
1127
1097
  if (typeof e == "function") {
1128
1098
  let n = e(this);
1129
- return n instanceof O ? n : this;
1099
+ return n instanceof w ? n : this;
1130
1100
  }
1131
- return e instanceof O ? (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)) : I(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;
1101
+ return e instanceof w ? (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)) : x(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;
1132
1102
  }
1133
1103
  clear() {
1134
- 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._span = void 0, this._session = void 0, this._notifyScopeListeners(), this._attachments = [], this._propagationContext = In(), this;
1104
+ 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._span = void 0, this._session = void 0, this._notifyScopeListeners(), this._attachments = [], this._propagationContext = Rn(), this;
1135
1105
  }
1136
1106
  addBreadcrumb(e, n) {
1137
- let r = typeof n == "number" ? n : Br;
1107
+ let r = typeof n == "number" ? n : Fr;
1138
1108
  if (r <= 0) return this;
1139
- let s = { timestamp: H(), ...e }, i = this._breadcrumbs;
1109
+ let s = { timestamp: G(), ...e }, i = this._breadcrumbs;
1140
1110
  return i.push(s), this._breadcrumbs = i.length > r ? i.slice(-r) : i, this._notifyScopeListeners(), this;
1141
1111
  }
1142
1112
  getLastBreadcrumb() {
@@ -1166,7 +1136,7 @@ var O = class {
1166
1136
  }
1167
1137
  this._applyFingerprint(e);
1168
1138
  let s = this._getBreadcrumbs(), i = [...e.breadcrumbs || [], ...s];
1169
- return e.breadcrumbs = i.length > 0 ? i : void 0, e.sdkProcessingMetadata = { ...e.sdkProcessingMetadata, ...this._sdkProcessingMetadata, propagationContext: this._propagationContext }, X([...r || [], ...pe(), ...this._eventProcessors], e, n);
1139
+ return e.breadcrumbs = i.length > 0 ? i : void 0, e.sdkProcessingMetadata = { ...e.sdkProcessingMetadata, ...this._sdkProcessingMetadata, propagationContext: this._propagationContext }, K([...r || [], ...le(), ...this._eventProcessors], e, n);
1170
1140
  }
1171
1141
  setSDKProcessingMetadata(e) {
1172
1142
  return this._sdkProcessingMetadata = { ...this._sdkProcessingMetadata, ...e }, this;
@@ -1186,16 +1156,16 @@ var O = class {
1186
1156
  }), this._notifyingListeners = false);
1187
1157
  }
1188
1158
  _applyFingerprint(e) {
1189
- e.fingerprint = e.fingerprint ? le(e.fingerprint) : [], this._fingerprint && (e.fingerprint = e.fingerprint.concat(this._fingerprint)), e.fingerprint && !e.fingerprint.length && delete e.fingerprint;
1159
+ e.fingerprint = e.fingerprint ? ue(e.fingerprint) : [], this._fingerprint && (e.fingerprint = e.fingerprint.concat(this._fingerprint)), e.fingerprint && !e.fingerprint.length && delete e.fingerprint;
1190
1160
  }
1191
1161
  };
1192
- function In() {
1162
+ function Rn() {
1193
1163
  return { traceId: g(), spanId: g().substring(16) };
1194
1164
  }
1195
- var Nn = 4;
1196
- var Fr = 100;
1197
- var j = class {
1198
- constructor(e, n = new O(), r = Nn) {
1165
+ var xn = 4;
1166
+ var Gr = 100;
1167
+ var H = class {
1168
+ constructor(e, n = new w(), r = xn) {
1199
1169
  this._version = r, this._stack = [{ scope: n }], e && this.bindClient(e);
1200
1170
  }
1201
1171
  isOlderThan(e) {
@@ -1206,7 +1176,7 @@ var j = class {
1206
1176
  n.client = e, e && e.setupIntegrations && e.setupIntegrations();
1207
1177
  }
1208
1178
  pushScope() {
1209
- let e = O.clone(this.getScope());
1179
+ let e = w.clone(this.getScope());
1210
1180
  return this.getStack().push({ client: this.getClient(), scope: e }), e;
1211
1181
  }
1212
1182
  popScope() {
@@ -1256,9 +1226,9 @@ var j = class {
1256
1226
  addBreadcrumb(e, n) {
1257
1227
  let { scope: r, client: s } = this.getStackTop();
1258
1228
  if (!s) return;
1259
- let { beforeBreadcrumb: i = null, maxBreadcrumbs: o = Fr } = s.getOptions && s.getOptions() || {};
1229
+ let { beforeBreadcrumb: i = null, maxBreadcrumbs: o = Gr } = s.getOptions && s.getOptions() || {};
1260
1230
  if (o <= 0) return;
1261
- let c = { timestamp: H(), ...e }, u = i ? xe(() => i(c, n)) : c;
1231
+ let c = { timestamp: G(), ...e }, u = i ? ye(() => i(c, n)) : c;
1262
1232
  u !== null && (s.emit && s.emit("beforeAddBreadcrumb", u, n), r.addBreadcrumb(u, o));
1263
1233
  }
1264
1234
  setUser(e) {
@@ -1284,11 +1254,11 @@ var j = class {
1284
1254
  r && e(n);
1285
1255
  }
1286
1256
  run(e) {
1287
- let n = At(this);
1257
+ let n = Nt(this);
1288
1258
  try {
1289
1259
  e(this);
1290
1260
  } finally {
1291
- At(n);
1261
+ Nt(n);
1292
1262
  }
1293
1263
  }
1294
1264
  getIntegration(e) {
@@ -1320,11 +1290,11 @@ Sentry.init({...});
1320
1290
  }
1321
1291
  endSession() {
1322
1292
  let n = this.getStackTop().scope, r = n.getSession();
1323
- r && xn(r), this._sendSessionUpdate(), n.setSession();
1293
+ r && bn(r), this._sendSessionUpdate(), n.setSession();
1324
1294
  }
1325
1295
  startSession(e) {
1326
- let { scope: n, client: r } = this.getStackTop(), { release: s, environment: i = K } = r && r.getOptions() || {}, { userAgent: o } = h.navigator || {}, a = Rn({ release: s, environment: i, user: n.getUser(), ...o && { userAgent: o }, ...e }), c = n.getSession && n.getSession();
1327
- return c && c.status === "ok" && P(c, { status: "exited" }), this.endSession(), n.setSession(a), a;
1296
+ let { scope: n, client: r } = this.getStackTop(), { release: s, environment: i = J } = r && r.getOptions() || {}, { userAgent: o } = h.navigator || {}, a = Tn({ release: s, environment: i, user: n.getUser(), ...o && { userAgent: o }, ...e }), c = n.getSession && n.getSession();
1297
+ return c && c.status === "ok" && C(c, { status: "exited" }), this.endSession(), n.setSession(a), a;
1328
1298
  }
1329
1299
  shouldSendDefaultPii() {
1330
1300
  let e = this.getClient(), n = e && e.getOptions();
@@ -1339,56 +1309,56 @@ Sentry.init({...});
1339
1309
  r && e(r, n);
1340
1310
  }
1341
1311
  _callExtensionMethod(e, ...n) {
1342
- let s = q().__SENTRY__;
1312
+ let s = Y().__SENTRY__;
1343
1313
  if (s && s.extensions && typeof s.extensions[e] == "function") return s.extensions[e].apply(this, n);
1344
1314
  (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn(`Extension method ${e} couldn't be found, doing nothing.`);
1345
1315
  }
1346
1316
  };
1347
- function q() {
1317
+ function Y() {
1348
1318
  return h.__SENTRY__ = h.__SENTRY__ || { extensions: {}, hub: void 0 }, h;
1349
1319
  }
1350
- function At(t) {
1351
- let e = q(), n = Be(e);
1352
- return Dt(e, t), n;
1320
+ function Nt(t) {
1321
+ let e = Y(), n = Pe(e);
1322
+ return At(e, t), n;
1353
1323
  }
1354
1324
  function R() {
1355
- let t = q();
1325
+ let t = Y();
1356
1326
  if (t.__SENTRY__ && t.__SENTRY__.acs) {
1357
1327
  let e = t.__SENTRY__.acs.getCurrentHub();
1358
1328
  if (e) return e;
1359
1329
  }
1360
1330
  return $r(t);
1361
1331
  }
1362
- function $r(t = q()) {
1363
- return (!Hr(t) || Be(t).isOlderThan(Nn)) && Dt(t, new j()), Be(t);
1332
+ function $r(t = Y()) {
1333
+ return (!Hr(t) || Pe(t).isOlderThan(xn)) && At(t, new H()), Pe(t);
1364
1334
  }
1365
1335
  function Hr(t) {
1366
1336
  return !!(t && t.__SENTRY__ && t.__SENTRY__.hub);
1367
1337
  }
1368
- function Be(t) {
1369
- return re("hub", () => new j(), t);
1338
+ function Pe(t) {
1339
+ return te("hub", () => new H(), t);
1370
1340
  }
1371
- function Dt(t, e) {
1341
+ function At(t, e) {
1372
1342
  if (!t) return false;
1373
1343
  let n = t.__SENTRY__ = t.__SENTRY__ || {};
1374
1344
  return n.hub = e, true;
1375
1345
  }
1376
- function An(t) {
1346
+ function In(t) {
1377
1347
  return (t || R()).getScope().getTransaction();
1378
1348
  }
1379
- var Dn = false;
1380
- function wn() {
1381
- Dn || (Dn = true, Ce("error", wt), Ce("unhandledrejection", wt));
1349
+ var Nn = false;
1350
+ function An() {
1351
+ Nn || (Nn = true, De("error", Dt), De("unhandledrejection", Dt));
1382
1352
  }
1383
- function wt() {
1384
- let t = An();
1353
+ function Dt() {
1354
+ let t = In();
1385
1355
  if (t) {
1386
1356
  let e = "internal_error";
1387
1357
  (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`[Tracing] Transaction: ${e} -> Global error occured`), t.setStatus(e);
1388
1358
  }
1389
1359
  }
1390
- wt.tag = "sentry_tracingErrorCallback";
1391
- var Fe = class {
1360
+ Dt.tag = "sentry_tracingErrorCallback";
1361
+ var Me = class {
1392
1362
  constructor(e = 1e3) {
1393
1363
  this._maxlen = e, this.spans = [];
1394
1364
  }
@@ -1396,9 +1366,9 @@ var Fe = class {
1396
1366
  this.spans.length > this._maxlen ? e.spanRecorder = void 0 : this.spans.push(e);
1397
1367
  }
1398
1368
  };
1399
- var Z = class {
1369
+ var X = class {
1400
1370
  constructor(e = {}) {
1401
- this.traceId = e.traceId || g(), this.spanId = e.spanId || g().substring(16), this.startTimestamp = e.startTimestamp || Y(), this.tags = e.tags || {}, this.data = e.data || {}, this.instrumenter = e.instrumenter || "sentry", this.origin = e.origin || "manual", e.parentSpanId && (this.parentSpanId = e.parentSpanId), "sampled" in e && (this.sampled = e.sampled), e.op && (this.op = e.op), e.description && (this.description = e.description), e.name && (this.description = e.name), e.status && (this.status = e.status), e.endTimestamp && (this.endTimestamp = e.endTimestamp);
1371
+ this.traceId = e.traceId || g(), this.spanId = e.spanId || g().substring(16), this.startTimestamp = e.startTimestamp || $(), this.tags = e.tags || {}, this.data = e.data || {}, this.instrumenter = e.instrumenter || "sentry", this.origin = e.origin || "manual", e.parentSpanId && (this.parentSpanId = e.parentSpanId), "sampled" in e && (this.sampled = e.sampled), e.op && (this.op = e.op), e.description && (this.description = e.description), e.name && (this.description = e.name), e.status && (this.status = e.status), e.endTimestamp && (this.endTimestamp = e.endTimestamp);
1402
1372
  }
1403
1373
  get name() {
1404
1374
  return this.description || "";
@@ -1407,7 +1377,7 @@ var Z = class {
1407
1377
  this.setName(e);
1408
1378
  }
1409
1379
  startChild(e) {
1410
- let n = new Z({ ...e, parentSpanId: this.spanId, sampled: this.sampled, traceId: this.traceId });
1380
+ let n = new X({ ...e, parentSpanId: this.spanId, sampled: this.sampled, traceId: this.traceId });
1411
1381
  if (n.spanRecorder = this.spanRecorder, n.spanRecorder && n.spanRecorder.add(n), n.transaction = this.transaction, (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && n.transaction) {
1412
1382
  let r = e && e.op || "< unknown op >", s = n.transaction.name || "< unknown name >", i = n.transaction.spanId, o = `[Tracing] Starting '${r}' span on transaction '${s}' (${i}).`;
1413
1383
  n.transaction.metadata.spanMetadata[n.spanId] = { logMessage: o }, f.log(o);
@@ -1439,10 +1409,10 @@ var Z = class {
1439
1409
  let { logMessage: n } = this.transaction.metadata.spanMetadata[this.spanId];
1440
1410
  n && f.log(n.replace("Starting", "Finishing"));
1441
1411
  }
1442
- this.endTimestamp = typeof e == "number" ? e : Y();
1412
+ this.endTimestamp = typeof e == "number" ? e : $();
1443
1413
  }
1444
1414
  toTraceparent() {
1445
- return _t(this.traceId, this.spanId, this.sampled);
1415
+ return ht(this.traceId, this.spanId, this.sampled);
1446
1416
  }
1447
1417
  toContext() {
1448
1418
  return E({ 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 });
@@ -1487,11 +1457,11 @@ function Yr(t) {
1487
1457
  }
1488
1458
  return "unknown_error";
1489
1459
  }
1490
- function Q(t, e, n) {
1491
- let r = e.getOptions(), { publicKey: s } = e.getDsn() || {}, { segment: i } = n && n.getUser() || {}, o = E({ environment: r.environment || K, release: r.release, user_segment: i, public_key: s, trace_id: t });
1460
+ function Z(t, e, n) {
1461
+ let r = e.getOptions(), { publicKey: s } = e.getDsn() || {}, { segment: i } = n && n.getUser() || {}, o = E({ environment: r.environment || J, release: r.release, user_segment: i, public_key: s, trace_id: t });
1492
1462
  return e.emit && e.emit("createDsc", o), o;
1493
1463
  }
1494
- var $e = class extends Z {
1464
+ var Ue = class extends X {
1495
1465
  constructor(e, n) {
1496
1466
  super(e), delete this.description, this._measurements = {}, this._contexts = {}, this._hub = n || R(), this._name = e.name || "", this.metadata = { source: "custom", ...e.metadata, spanMetadata: {} }, this._trimEnd = e.trimEnd, this.transaction = this;
1497
1467
  let r = this.metadata.dynamicSamplingContext;
@@ -1507,7 +1477,7 @@ var $e = class extends Z {
1507
1477
  this._name = e, this.metadata.source = n;
1508
1478
  }
1509
1479
  initSpanRecorder(e = 1e3) {
1510
- this.spanRecorder || (this.spanRecorder = new Fe(e)), this.spanRecorder.add(this);
1480
+ this.spanRecorder || (this.spanRecorder = new Me(e)), this.spanRecorder.add(this);
1511
1481
  }
1512
1482
  setContext(e, n) {
1513
1483
  n === null ? delete this._contexts[e] : this._contexts[e] = n;
@@ -1533,7 +1503,7 @@ var $e = class extends Z {
1533
1503
  if (this._frozenDynamicSamplingContext) return this._frozenDynamicSamplingContext;
1534
1504
  let e = this._hub || R(), n = e.getClient();
1535
1505
  if (!n) return {};
1536
- let r = e.getScope(), s = Q(this.traceId, n, r), i = this.metadata.sampleRate;
1506
+ let r = e.getScope(), s = Z(this.traceId, n, r), i = this.metadata.sampleRate;
1537
1507
  i !== void 0 && (s.sample_rate = `${i}`);
1538
1508
  let o = this.metadata.source;
1539
1509
  return o && o !== "url" && (s.transaction = this.name), this.sampled !== void 0 && (s.sampled = String(this.sampled)), s;
@@ -1555,19 +1525,19 @@ var $e = class extends Z {
1555
1525
  return Object.keys(this._measurements).length > 0 && ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log("[Measurements] Adding measurements to transaction", JSON.stringify(this._measurements, void 0, 2)), i.measurements = this._measurements), (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`[Tracing] Finishing ${this.op} transaction: ${this.name}.`), i;
1556
1526
  }
1557
1527
  };
1558
- function On(t) {
1528
+ function Dn(t) {
1559
1529
  if (typeof __SENTRY_TRACING__ == "boolean" && !__SENTRY_TRACING__) return false;
1560
1530
  let e = R().getClient(), n = t || e && e.getOptions();
1561
1531
  return !!n && (n.enableTracing || "tracesSampleRate" in n || "tracesSampler" in n);
1562
1532
  }
1563
- function vn(t, e, n) {
1564
- if (!On(e)) return t.sampled = false, t;
1533
+ function wn(t, e, n) {
1534
+ if (!Dn(e)) return t.sampled = false, t;
1565
1535
  if (t.sampled !== void 0) return t.setMetadata({ sampleRate: Number(t.sampled) }), t;
1566
1536
  let r;
1567
1537
  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 })), jr(r) ? r ? (t.sampled = Math.random() < r, t.sampled ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`[Tracing] starting ${t.op} transaction - ${t.name}`), t) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(`[Tracing] Discarding transaction because it's not included in the random sample (sampling rate = ${Number(r)})`), t)) : ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.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__) && f.warn("[Tracing] Discarding transaction because of invalid sample rate."), t.sampled = false, t);
1568
1538
  }
1569
1539
  function jr(t) {
1570
- return ne(t) || !(typeof t == "number" || typeof t == "boolean") ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.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)}.`), false) : t < 0 || t > 1 ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`), false) : true;
1540
+ return ee(t) || !(typeof t == "number" || typeof t == "boolean") ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.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)}.`), false) : t < 0 || t > 1 ? ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn(`[Tracing] Given sample rate is invalid. Sample rate must be between 0 and 1. Got ${t}.`), false) : true;
1571
1541
  }
1572
1542
  function qr() {
1573
1543
  let e = this.getScope().getSpan();
@@ -1577,14 +1547,14 @@ function Wr(t, e) {
1577
1547
  let n = this.getClient(), r = n && n.getOptions() || {}, s = r.instrumenter || "sentry", i = t.instrumenter || "sentry";
1578
1548
  s !== i && ((typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.error(`A transaction was started with instrumenter=\`${i}\`, but the SDK is configured with the \`${s}\` instrumenter.
1579
1549
  The transaction will not be sampled. Please use the ${s} instrumentation to start transactions.`), t.sampled = false);
1580
- let o = new $e(t, this);
1581
- return o = vn(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;
1550
+ let o = new Ue(t, this);
1551
+ return o = wn(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;
1582
1552
  }
1583
- function kn() {
1584
- let t = q();
1585
- t.__SENTRY__ && (t.__SENTRY__.extensions = t.__SENTRY__.extensions || {}, t.__SENTRY__.extensions.startTransaction || (t.__SENTRY__.extensions.startTransaction = Wr), t.__SENTRY__.extensions.traceHeaders || (t.__SENTRY__.extensions.traceHeaders = qr), wn());
1553
+ function vn() {
1554
+ let t = Y();
1555
+ t.__SENTRY__ && (t.__SENTRY__.extensions = t.__SENTRY__.extensions || {}, t.__SENTRY__.extensions.startTransaction || (t.__SENTRY__.extensions.startTransaction = Wr), t.__SENTRY__.extensions.traceHeaders || (t.__SENTRY__.extensions.traceHeaders = qr), An());
1586
1556
  }
1587
- var He = class {
1557
+ var Le = class {
1588
1558
  constructor(e, n) {
1589
1559
  this._client = e, this.flushTimeout = 60, this._pendingAggregates = {}, this._isEnabled = true, this._intervalId = setInterval(() => this.flush(), this.flushTimeout * 1e3), this._sessionAttrs = n;
1590
1560
  }
@@ -1627,26 +1597,26 @@ function Jr(t) {
1627
1597
  return `${Vr(t)}${t.projectId}/envelope/`;
1628
1598
  }
1629
1599
  function Kr(t, e) {
1630
- return ot({ sentry_key: t.publicKey, sentry_version: zr, ...e && { sentry_client: `${e.name}/${e.version}` } });
1600
+ return it({ sentry_key: t.publicKey, sentry_version: zr, ...e && { sentry_client: `${e.name}/${e.version}` } });
1631
1601
  }
1632
- function Cn(t, e = {}) {
1602
+ function On(t, e = {}) {
1633
1603
  let n = typeof e == "string" ? e : e.tunnel, r = typeof e == "string" || !e._metadata ? void 0 : e._metadata.sdk;
1634
1604
  return n || `${Jr(t)}?${Kr(t, r)}`;
1635
1605
  }
1636
1606
  function Xr(t, e) {
1637
1607
  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;
1638
1608
  }
1639
- function Pn(t, e, n, r) {
1640
- let s = Le(n), i = { sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...s && { sdk: s }, ...!!r && e && { dsn: U(e) } }, o = "aggregates" in t ? [{ type: "sessions" }, t] : [{ type: "session" }, t.toJSON()];
1641
- return G(i, [o]);
1609
+ function kn(t, e, n, r) {
1610
+ let s = Ce(n), i = { sent_at: (/* @__PURE__ */ new Date()).toISOString(), ...s && { sdk: s }, ...!!r && e && { dsn: M(e) } }, o = "aggregates" in t ? [{ type: "sessions" }, t] : [{ type: "session" }, t.toJSON()];
1611
+ return U(i, [o]);
1642
1612
  }
1643
- function Mn(t, e, n, r) {
1644
- let s = Le(n), i = t.type && t.type !== "replay_event" ? t.type : "event";
1613
+ function Cn(t, e, n, r) {
1614
+ let s = Ce(n), i = t.type && t.type !== "replay_event" ? t.type : "event";
1645
1615
  Xr(t, n && n.sdk);
1646
- let o = Tt(t, s, r, e);
1647
- return delete t.sdkProcessingMetadata, G(o, [[{ type: i }, t]]);
1616
+ let o = St(t, s, r, e);
1617
+ return delete t.sdkProcessingMetadata, U(o, [[{ type: i }, t]]);
1648
1618
  }
1649
- var Un = [];
1619
+ var Pn = [];
1650
1620
  function Zr(t) {
1651
1621
  let e = {};
1652
1622
  return t.forEach((n) => {
@@ -1654,13 +1624,13 @@ function Zr(t) {
1654
1624
  s && !s.isDefaultInstance && n.isDefaultInstance || (e[r] = n);
1655
1625
  }), Object.keys(e).map((n) => e[n]);
1656
1626
  }
1657
- function Ot(t) {
1627
+ function wt(t) {
1658
1628
  let e = t.defaultIntegrations || [], n = t.integrations;
1659
1629
  e.forEach((o) => {
1660
1630
  o.isDefaultInstance = true;
1661
1631
  });
1662
1632
  let r;
1663
- Array.isArray(n) ? r = [...e, ...n] : typeof n == "function" ? r = le(n(e)) : r = e;
1633
+ Array.isArray(n) ? r = [...e, ...n] : typeof n == "function" ? r = ue(n(e)) : r = e;
1664
1634
  let s = Zr(r), i = Qr(s, (o) => o.name === "Debug");
1665
1635
  if (i !== -1) {
1666
1636
  let [o] = s.splice(i, 1);
@@ -1668,14 +1638,14 @@ function Ot(t) {
1668
1638
  }
1669
1639
  return s;
1670
1640
  }
1671
- function Gn(t, e) {
1641
+ function Mn(t, e) {
1672
1642
  let n = {};
1673
1643
  return e.forEach((r) => {
1674
1644
  r && vt(t, r, n);
1675
1645
  }), n;
1676
1646
  }
1677
1647
  function vt(t, e, n) {
1678
- if (n[e.name] = e, Un.indexOf(e.name) === -1 && (e.setupOnce(bn, R), Un.push(e.name)), t.on && typeof e.preprocessEvent == "function") {
1648
+ if (n[e.name] = e, Pn.indexOf(e.name) === -1 && (e.setupOnce(Sn, R), Pn.push(e.name)), t.on && typeof e.preprocessEvent == "function") {
1679
1649
  let r = e.preprocessEvent.bind(e);
1680
1650
  t.on("preprocessEvent", (s, i) => r(s, i, t));
1681
1651
  }
@@ -1689,11 +1659,11 @@ function Qr(t, e) {
1689
1659
  for (let n = 0; n < t.length; n++) if (e(t[n]) === true) return n;
1690
1660
  return -1;
1691
1661
  }
1692
- function Bn(t, e, n, r, s) {
1693
- let { normalizeDepth: i = 3, normalizeMaxBreadth: o = 1e3 } = t, a = { ...e, event_id: e.event_id || n.event_id || g(), timestamp: e.timestamp || H() }, c = n.integrations || t.integrations.map((p) => p.name);
1662
+ function Ln(t, e, n, r, s) {
1663
+ let { normalizeDepth: i = 3, normalizeMaxBreadth: o = 1e3 } = t, a = { ...e, event_id: e.event_id || n.event_id || g(), timestamp: e.timestamp || G() }, c = n.integrations || t.integrations.map((p) => p.name);
1694
1664
  es(a, t), rs(a, c), e.type === void 0 && ts(a, t.stackParser);
1695
1665
  let u = r;
1696
- n.captureContext && (u = O.clone(u).update(n.captureContext));
1666
+ n.captureContext && (u = w.clone(u).update(n.captureContext));
1697
1667
  let l = b(a), d = s && s.getEventProcessors ? s.getEventProcessors() : [];
1698
1668
  if (u) {
1699
1669
  if (u.getAttachments) {
@@ -1701,23 +1671,23 @@ function Bn(t, e, n, r, s) {
1701
1671
  p.length && (n.attachments = p);
1702
1672
  }
1703
1673
  l = u.applyToEvent(a, n, d);
1704
- } else l = X([...d, ...pe()], a, n);
1674
+ } else l = K([...d, ...le()], a, n);
1705
1675
  return l.then((p) => (p && ns(p), typeof i == "number" && i > 0 ? ss(p, i, o) : p));
1706
1676
  }
1707
1677
  function es(t, e) {
1708
1678
  let { environment: n, release: r, dist: s, maxValueLength: i = 250 } = e;
1709
- "environment" in t || (t.environment = "environment" in e ? n : K), t.release === void 0 && r !== void 0 && (t.release = r), t.dist === void 0 && s !== void 0 && (t.dist = s), t.message && (t.message = M(t.message, i));
1679
+ "environment" in t || (t.environment = "environment" in e ? n : J), t.release === void 0 && r !== void 0 && (t.release = r), t.dist === void 0 && s !== void 0 && (t.dist = s), t.message && (t.message = P(t.message, i));
1710
1680
  let o = t.exception && t.exception.values && t.exception.values[0];
1711
- o && o.value && (o.value = M(o.value, i));
1681
+ o && o.value && (o.value = P(o.value, i));
1712
1682
  let a = t.request;
1713
- a && a.url && (a.url = M(a.url, i));
1683
+ a && a.url && (a.url = P(a.url, i));
1714
1684
  }
1715
- var Ln = /* @__PURE__ */ new WeakMap();
1685
+ var Un = /* @__PURE__ */ new WeakMap();
1716
1686
  function ts(t, e) {
1717
1687
  let n = h._sentryDebugIds;
1718
1688
  if (!n) return;
1719
- let r, s = Ln.get(e);
1720
- s ? r = s : (r = /* @__PURE__ */ new Map(), Ln.set(e, r));
1689
+ let r, s = Un.get(e);
1690
+ s ? r = s : (r = /* @__PURE__ */ new Map(), Un.set(e, r));
1721
1691
  let i = Object.keys(n).reduce((o, a) => {
1722
1692
  let c, u = r.get(a);
1723
1693
  u ? c = u : (c = e(a), r.set(a, c));
@@ -1761,20 +1731,20 @@ function rs(t, e) {
1761
1731
  }
1762
1732
  function ss(t, e, n) {
1763
1733
  if (!t) return null;
1764
- let r = { ...t, ...t.breadcrumbs && { breadcrumbs: t.breadcrumbs.map((s) => ({ ...s, ...s.data && { data: w(s.data, e, n) } })) }, ...t.user && { user: w(t.user, e, n) }, ...t.contexts && { contexts: w(t.contexts, e, n) }, ...t.extra && { extra: w(t.extra, e, n) } };
1765
- return t.contexts && t.contexts.trace && r.contexts && (r.contexts.trace = t.contexts.trace, t.contexts.trace.data && (r.contexts.trace.data = w(t.contexts.trace.data, e, n))), t.spans && (r.spans = t.spans.map((s) => (s.data && (s.data = w(s.data, e, n)), s))), r;
1734
+ 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) } };
1735
+ 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;
1766
1736
  }
1767
- var Fn = "Not capturing exception because it's already been captured.";
1768
- var Ye = class {
1737
+ var Bn = "Not capturing exception because it's already been captured.";
1738
+ var Be = class {
1769
1739
  constructor(e) {
1770
- if (this._options = e, this._integrations = {}, this._integrationsInitialized = false, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = Ie(e.dsn) : (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("No DSN provided, client will not send events."), this._dsn) {
1771
- let n = Cn(this._dsn, e);
1740
+ if (this._options = e, this._integrations = {}, this._integrationsInitialized = false, this._numProcessing = 0, this._outcomes = {}, this._hooks = {}, this._eventProcessors = [], e.dsn ? this._dsn = Se(e.dsn) : (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("No DSN provided, client will not send events."), this._dsn) {
1741
+ let n = On(this._dsn, e);
1772
1742
  this._transport = e.transport({ recordDroppedEvent: this.recordDroppedEvent.bind(this), ...e.transportOptions, url: n });
1773
1743
  }
1774
1744
  }
1775
1745
  captureException(e, n, r) {
1776
- if (Pe(e)) {
1777
- (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(Fn);
1746
+ if (we(e)) {
1747
+ (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(Bn);
1778
1748
  return;
1779
1749
  }
1780
1750
  let s = n && n.event_id;
@@ -1783,14 +1753,14 @@ var Ye = class {
1783
1753
  })), s;
1784
1754
  }
1785
1755
  captureMessage(e, n, r, s) {
1786
- let i = r && r.event_id, o = be(e) ? this.eventFromMessage(String(e), n, r) : this.eventFromException(e, r);
1756
+ let i = r && r.event_id, o = ge(e) ? this.eventFromMessage(String(e), n, r) : this.eventFromException(e, r);
1787
1757
  return this._process(o.then((a) => this._captureEvent(a, r, s)).then((a) => {
1788
1758
  i = a;
1789
1759
  })), i;
1790
1760
  }
1791
1761
  captureEvent(e, n, r) {
1792
- if (n && n.originalException && Pe(n.originalException)) {
1793
- (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(Fn);
1762
+ if (n && n.originalException && we(n.originalException)) {
1763
+ (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.log(Bn);
1794
1764
  return;
1795
1765
  }
1796
1766
  let s = n && n.event_id;
@@ -1799,7 +1769,7 @@ var Ye = class {
1799
1769
  })), s;
1800
1770
  }
1801
1771
  captureSession(e) {
1802
- typeof e.release != "string" ? (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("Discarded session because of missing or non-string release") : (this.sendSession(e), P(e, { init: false }));
1772
+ typeof e.release != "string" ? (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("Discarded session because of missing or non-string release") : (this.sendSession(e), C(e, { init: false }));
1803
1773
  }
1804
1774
  getDsn() {
1805
1775
  return this._dsn;
@@ -1827,7 +1797,7 @@ var Ye = class {
1827
1797
  this._eventProcessors.push(e);
1828
1798
  }
1829
1799
  setupIntegrations(e) {
1830
- (e && !this._integrationsInitialized || this._isEnabled() && !this._integrationsInitialized) && (this._integrations = Gn(this, this._options.integrations), this._integrationsInitialized = true);
1800
+ (e && !this._integrationsInitialized || this._isEnabled() && !this._integrationsInitialized) && (this._integrations = Mn(this, this._options.integrations), this._integrationsInitialized = true);
1831
1801
  }
1832
1802
  getIntegrationById(e) {
1833
1803
  return this._integrations[e];
@@ -1844,13 +1814,13 @@ var Ye = class {
1844
1814
  }
1845
1815
  sendEvent(e, n = {}) {
1846
1816
  this.emit("beforeSendEvent", e, n);
1847
- let r = Mn(e, this._dsn, this._options._metadata, this._options.tunnel);
1848
- for (let i of n.attachments || []) r = Et(r, St(i, this._options.transportOptions && this._options.transportOptions.textEncoder));
1817
+ let r = Cn(e, this._dsn, this._options._metadata, this._options.tunnel);
1818
+ for (let i of n.attachments || []) r = gt(r, yt(i, this._options.transportOptions && this._options.transportOptions.textEncoder));
1849
1819
  let s = this._sendEnvelope(r);
1850
1820
  s && s.then((i) => this.emit("afterSendEvent", e, i), null);
1851
1821
  }
1852
1822
  sendSession(e) {
1853
- let n = Pn(e, this._dsn, this._options._metadata, this._options.tunnel);
1823
+ let n = kn(e, this._dsn, this._options._metadata, this._options.tunnel);
1854
1824
  this._sendEnvelope(n);
1855
1825
  }
1856
1826
  recordDroppedEvent(e, n, r) {
@@ -1878,7 +1848,7 @@ var Ye = class {
1878
1848
  }
1879
1849
  }
1880
1850
  let o = e.status === "ok";
1881
- (o && e.errors === 0 || o && r) && (P(e, { ...r && { status: "crashed" }, errors: e.errors || Number(s || r) }), this.captureSession(e));
1851
+ (o && e.errors === 0 || o && r) && (C(e, { ...r && { status: "crashed" }, errors: e.errors || Number(s || r) }), this.captureSession(e));
1882
1852
  }
1883
1853
  _isClientDoneProcessing(e) {
1884
1854
  return new S((n) => {
@@ -1892,13 +1862,13 @@ var Ye = class {
1892
1862
  }
1893
1863
  _prepareEvent(e, n, r) {
1894
1864
  let s = this.getOptions(), i = Object.keys(this._integrations);
1895
- return !n.integrations && i.length > 0 && (n.integrations = i), this.emit("preprocessEvent", e, n), Bn(s, e, n, r, this).then((o) => {
1865
+ return !n.integrations && i.length > 0 && (n.integrations = i), this.emit("preprocessEvent", e, n), Ln(s, e, n, r, this).then((o) => {
1896
1866
  if (o === null) return o;
1897
1867
  let { propagationContext: a } = o.sdkProcessingMetadata || {};
1898
1868
  if (!(o.contexts && o.contexts.trace) && a) {
1899
1869
  let { traceId: u, spanId: l, parentSpanId: d, dsc: p } = a;
1900
1870
  o.contexts = { trace: { trace_id: u, span_id: l, parent_span_id: d }, ...o.contexts };
1901
- let m = p || Q(u, this, r);
1871
+ let m = p || Z(u, this, r);
1902
1872
  o.sdkProcessingMetadata = { dynamicSamplingContext: m, ...o.sdkProcessingMetadata };
1903
1873
  }
1904
1874
  return o;
@@ -1913,8 +1883,8 @@ var Ye = class {
1913
1883
  });
1914
1884
  }
1915
1885
  _processEvent(e, n, r) {
1916
- let s = this.getOptions(), { sampleRate: i } = s, o = Hn(e), a = $n(e), c = e.type || "error", u = `before send for type \`${c}\``;
1917
- if (a && typeof i == "number" && Math.random() > i) return this.recordDroppedEvent("sample_rate", "error", e), $(new T(`Discarding event because it's not included in the random sample (sampling rate = ${i})`, "log"));
1886
+ let s = this.getOptions(), { sampleRate: i } = s, o = Gn(e), a = Fn(e), c = e.type || "error", u = `before send for type \`${c}\``;
1887
+ if (a && typeof i == "number" && Math.random() > i) return this.recordDroppedEvent("sample_rate", "error", e), F(new T(`Discarding event because it's not included in the random sample (sampling rate = ${i})`, "log"));
1918
1888
  let l = c === "replay_event" ? "replay" : c;
1919
1889
  return this._prepareEvent(e, n, r).then((d) => {
1920
1890
  if (d === null) throw this.recordDroppedEvent("event_processor", l, e), new T("An event processor returned `null`, will not send event.", "log");
@@ -1955,43 +1925,43 @@ Reason: ${d}`));
1955
1925
  };
1956
1926
  function is(t, e) {
1957
1927
  let n = `${e} must return \`null\` or a valid event.`;
1958
- if (F(t)) return t.then((r) => {
1959
- if (!I(r) && r !== null) throw new T(n);
1928
+ if (B(t)) return t.then((r) => {
1929
+ if (!x(r) && r !== null) throw new T(n);
1960
1930
  return r;
1961
1931
  }, (r) => {
1962
1932
  throw new T(`${e} rejected with ${r}`);
1963
1933
  });
1964
- if (!I(t) && t !== null) throw new T(n);
1934
+ if (!x(t) && t !== null) throw new T(n);
1965
1935
  return t;
1966
1936
  }
1967
1937
  function os(t, e, n) {
1968
1938
  let { beforeSend: r, beforeSendTransaction: s } = t;
1969
- return $n(e) && r ? r(e, n) : Hn(e) && s ? s(e, n) : e;
1939
+ return Fn(e) && r ? r(e, n) : Gn(e) && s ? s(e, n) : e;
1970
1940
  }
1971
- function $n(t) {
1941
+ function Fn(t) {
1972
1942
  return t.type === void 0;
1973
1943
  }
1974
- function Hn(t) {
1944
+ function Gn(t) {
1975
1945
  return t.type === "transaction";
1976
1946
  }
1977
- function Yn(t, e, n, r, s) {
1947
+ function $n(t, e, n, r, s) {
1978
1948
  let i = { sent_at: (/* @__PURE__ */ new Date()).toISOString() };
1979
- n && n.sdk && (i.sdk = { name: n.sdk.name, version: n.sdk.version }), r && s && (i.dsn = U(s)), e && (i.trace = E(e));
1949
+ n && n.sdk && (i.sdk = { name: n.sdk.name, version: n.sdk.version }), r && s && (i.dsn = M(s)), e && (i.trace = E(e));
1980
1950
  let o = as(t);
1981
- return G(i, [o]);
1951
+ return U(i, [o]);
1982
1952
  }
1983
1953
  function as(t) {
1984
1954
  return [{ type: "check_in" }, t];
1985
1955
  }
1986
- var me = class extends Ye {
1956
+ var fe = class extends Be {
1987
1957
  constructor(e) {
1988
- kn(), super(e);
1958
+ vn(), super(e);
1989
1959
  }
1990
1960
  eventFromException(e, n) {
1991
- return b(It(R, this._options.stackParser, e, n));
1961
+ return b(xt(R, this._options.stackParser, e, n));
1992
1962
  }
1993
1963
  eventFromMessage(e, n = "info", r) {
1994
- return b(Nt(this._options.stackParser, e, n, r, this._options.attachStacktrace));
1964
+ return b(It(this._options.stackParser, e, n, r, this._options.attachStacktrace));
1995
1965
  }
1996
1966
  captureException(e, n, r) {
1997
1967
  if (this._options.autoSessionTracking && this._sessionFlusher && r) {
@@ -2012,7 +1982,7 @@ var me = class extends Ye {
2012
1982
  }
2013
1983
  initSessionFlusher() {
2014
1984
  let { release: e, environment: n } = this._options;
2015
- e ? this._sessionFlusher = new He(this, { release: e, environment: n }) : (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("Cannot initialise an instance of SessionFlusher if no release is provided!");
1985
+ e ? this._sessionFlusher = new Le(this, { release: e, environment: n }) : (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn("Cannot initialise an instance of SessionFlusher if no release is provided!");
2016
1986
  }
2017
1987
  captureCheckIn(e, n, r) {
2018
1988
  let s = e.status !== "in_progress" && e.checkInId ? e.checkInId : g();
@@ -2021,7 +1991,7 @@ var me = class extends Ye {
2021
1991
  e.status !== "in_progress" && (u.duration = e.duration), n && (u.monitor_config = { schedule: n.schedule, checkin_margin: n.checkinMargin, max_runtime: n.maxRuntime, timezone: n.timezone });
2022
1992
  let [l, d] = this._getTraceInfoFromScope(r);
2023
1993
  d && (u.contexts = { trace: d });
2024
- let p = Yn(u, l, this.getSdkMetadata(), c, this.getDsn());
1994
+ let p = $n(u, l, this.getSdkMetadata(), c, this.getDsn());
2025
1995
  return (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.info("Sending checkin:", e.monitorSlug, e.status), this._sendEnvelope(p), s;
2026
1996
  }
2027
1997
  _captureRequestSession() {
@@ -2035,27 +2005,27 @@ var me = class extends Ye {
2035
2005
  let n = e.getSpan();
2036
2006
  if (n) return [n.transaction ? n.transaction.getDynamicSamplingContext() : void 0, n.getTraceContext()];
2037
2007
  let { traceId: r, spanId: s, parentSpanId: i, dsc: o } = e.getPropagationContext(), a = { trace_id: r, span_id: s, parent_span_id: i };
2038
- return o ? [o, a] : [Q(r, this, e), a];
2008
+ return o ? [o, a] : [Z(r, this, e), a];
2039
2009
  }
2040
2010
  };
2041
2011
  var cs = 30;
2042
- function kt(t, e, n = pt(t.bufferSize || cs)) {
2012
+ function Ot(t, e, n = ft(t.bufferSize || cs)) {
2043
2013
  let r = {}, s = (o) => n.drain(o);
2044
2014
  function i(o) {
2045
2015
  let a = [];
2046
- if (Ue(o, (d, p) => {
2047
- let m = Ge(p);
2048
- if (bt(r, m)) {
2049
- let v = jn(d, p);
2016
+ if (Oe(o, (d, p) => {
2017
+ let m = ke(p);
2018
+ if (Tt(r, m)) {
2019
+ let v = Hn(d, p);
2050
2020
  t.recordDroppedEvent("ratelimit_backoff", m, v);
2051
2021
  } else a.push(d);
2052
2022
  }), a.length === 0) return b();
2053
- let c = G(o[0], a), u = (d) => {
2054
- Ue(c, (p, m) => {
2055
- let v = jn(p, m);
2056
- t.recordDroppedEvent(d, Ge(m), v);
2023
+ let c = U(o[0], a), u = (d) => {
2024
+ Oe(c, (p, m) => {
2025
+ let v = Hn(p, m);
2026
+ t.recordDroppedEvent(d, ke(m), v);
2057
2027
  });
2058
- }, l = () => e({ body: yt(c, t.textEncoder) }).then((d) => (d.statusCode !== void 0 && (d.statusCode < 200 || d.statusCode >= 300) && (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn(`Sentry responded with status code ${d.statusCode} to sent event.`), r = Rt(r, d), d), (d) => {
2028
+ }, l = () => e({ body: Et(c, t.textEncoder) }).then((d) => (d.statusCode !== void 0 && (d.statusCode < 200 || d.statusCode >= 300) && (typeof __SENTRY_DEBUG__ > "u" || __SENTRY_DEBUG__) && f.warn(`Sentry responded with status code ${d.statusCode} to sent event.`), r = bt(r, d), d), (d) => {
2059
2029
  throw u("network_error"), d;
2060
2030
  });
2061
2031
  return n.add(l).then((d) => d, (d) => {
@@ -2065,61 +2035,61 @@ function kt(t, e, n = pt(t.bufferSize || cs)) {
2065
2035
  }
2066
2036
  return i.__sentry__baseTransport__ = true, { send: i, flush: s };
2067
2037
  }
2068
- function jn(t, e) {
2038
+ function Hn(t, e) {
2069
2039
  if (!(e !== "event" && e !== "transaction")) return Array.isArray(t) ? t[1] : void 0;
2070
2040
  }
2071
- function Wn(t) {
2041
+ function jn(t) {
2072
2042
  return typeof t == "object" && t !== null;
2073
2043
  }
2074
2044
  function us(t) {
2075
- return Wn(t) && "handled" in t && typeof t.handled == "boolean" && "type" in t && typeof t.type == "string";
2045
+ return jn(t) && "handled" in t && typeof t.handled == "boolean" && "type" in t && typeof t.type == "string";
2076
2046
  }
2077
2047
  function ds(t) {
2078
- return Wn(t) && "mechanism" in t && us(t.mechanism);
2048
+ return jn(t) && "mechanism" in t && us(t.mechanism);
2079
2049
  }
2080
2050
  function ls() {
2081
2051
  if (h.SENTRY_RELEASE && h.SENTRY_RELEASE.id) return h.SENTRY_RELEASE.id;
2082
2052
  }
2083
- function qn(t, e) {
2053
+ function Yn(t, e) {
2084
2054
  return t !== void 0 ? (t[e[0]] = e[1], t) : { [e[0]]: e[1] };
2085
2055
  }
2086
- function zn(t, e) {
2056
+ function qn(t, e) {
2087
2057
  return t(e.stack || "", 1);
2088
2058
  }
2089
2059
  function fs(t) {
2090
2060
  let e = t && t.message;
2091
2061
  return e ? e.error && typeof e.error.message == "string" ? e.error.message : e : "No error message";
2092
2062
  }
2093
- function Vn(t, e) {
2094
- let n = { type: e.name || e.constructor.name, value: fs(e) }, r = zn(t, e);
2063
+ function Wn(t, e) {
2064
+ let n = { type: e.name || e.constructor.name, value: fs(e) }, r = qn(t, e);
2095
2065
  return r.length && (n.stacktrace = { frames: r }), n.type === void 0 && n.value === "" && (n.value = "Unrecoverable error caught"), n;
2096
2066
  }
2097
2067
  function ps(t, e, n, r) {
2098
2068
  let s, o = (r && r.data && ds(r.data) ? r.data.mechanism : void 0) ?? { handled: true, type: "generic" };
2099
- if (B(n)) s = n;
2069
+ if (L(n)) s = n;
2100
2070
  else {
2101
- if (I(n)) {
2102
- let c = `Non-Error exception captured with keys: ${ie(n)}`, u = t?.getClient(), l = u && u.getOptions().normalizeDepth;
2071
+ if (x(n)) {
2072
+ let c = `Non-Error exception captured with keys: ${re(n)}`, u = t?.getClient(), l = u && u.getOptions().normalizeDepth;
2103
2073
  t?.configureScope((d) => {
2104
- d.setExtra("__serialized__", J(n, l));
2074
+ d.setExtra("__serialized__", V(n, l));
2105
2075
  }), s = r && r.syntheticException || new Error(c), s.message = c;
2106
2076
  } else s = r && r.syntheticException || new Error(n), s.message = n;
2107
2077
  o.synthetic = true;
2108
2078
  }
2109
- let a = { exception: { values: [Vn(e, s)] } };
2110
- return ue(a, void 0, void 0), de(a, o), { ...a, event_id: r && r.event_id };
2079
+ let a = { exception: { values: [Wn(e, s)] } };
2080
+ return ae(a, void 0, void 0), ce(a, o), { ...a, event_id: r && r.event_id };
2111
2081
  }
2112
2082
  function ms(t, e, n = "info", r, s) {
2113
2083
  let i = { event_id: r && r.event_id, level: n, message: e };
2114
2084
  if (s && r && r.syntheticException) {
2115
- let o = zn(t, r.syntheticException);
2085
+ let o = qn(t, r.syntheticException);
2116
2086
  o.length && (i.exception = { values: [{ value: e, stacktrace: { frames: o } }] });
2117
2087
  }
2118
2088
  return i;
2119
2089
  }
2120
2090
  var hs = 5;
2121
- var ze = class {
2122
- name = ze.id;
2091
+ var He = class {
2092
+ name = He.id;
2123
2093
  limit;
2124
2094
  constructor(e = {}) {
2125
2095
  this.limit = e.limit || hs;
@@ -2127,40 +2097,40 @@ var ze = class {
2127
2097
  setupOnce(e, n) {
2128
2098
  let r = n().getClient();
2129
2099
  r && e((s, i) => {
2130
- let o = n().getIntegration(ze);
2100
+ let o = n().getIntegration(He);
2131
2101
  return o ? _s(r.getOptions().stackParser, o.limit, s, i) : s;
2132
2102
  });
2133
2103
  }
2134
2104
  };
2135
- var je = ze;
2136
- _e(je, "id", "LinkedErrors");
2105
+ var Fe = He;
2106
+ he(Fe, "id", "LinkedErrors");
2137
2107
  function _s(t, e, n, r) {
2138
- if (!n.exception || !n.exception.values || !r || !k(r.originalException, Error)) return n;
2139
- let s = Jn(t, e, r.originalException);
2108
+ if (!n.exception || !n.exception.values || !r || !O(r.originalException, Error)) return n;
2109
+ let s = zn(t, e, r.originalException);
2140
2110
  return n.exception.values = [...s, ...n.exception.values], n;
2141
2111
  }
2142
- function Jn(t, e, n, r = []) {
2143
- if (!k(n.cause, Error) || r.length + 1 >= e) return r;
2144
- let s = Vn(t, n.cause);
2145
- return Jn(t, e, n.cause, [s, ...r]);
2112
+ function zn(t, e, n, r = []) {
2113
+ if (!O(n.cause, Error) || r.length + 1 >= e) return r;
2114
+ let s = Wn(t, n.cause);
2115
+ return zn(t, e, n.cause, [s, ...r]);
2146
2116
  }
2147
2117
  var gs = { allowedHeaders: ["CF-RAY", "CF-Worker"] };
2148
- var ee;
2149
- var Ve = class {
2118
+ var Q;
2119
+ var Ye = class {
2150
2120
  constructor(e = {}) {
2151
- _e(this, "name", Ve.id);
2152
- $t(this, ee, void 0);
2153
- Ht(this, ee, { ...gs, ...e });
2121
+ he(this, "name", Ye.id);
2122
+ Ft(this, Q, void 0);
2123
+ Gt(this, Q, { ...gs, ...e });
2154
2124
  }
2155
2125
  setupOnce(e, n) {
2156
2126
  n().getClient() && e((s) => {
2157
2127
  let { sdkProcessingMetadata: i } = s;
2158
- return !n().getIntegration(Ve) || !i || ("request" in i && i.request instanceof Request && (s.request = ys(i.request, et(this, ee)), s.user = Es(s.user ?? {}, i.request, et(this, ee))), "requestData" in i && (s.request ? s.request.data = i.requestData : s.request = { data: i.requestData })), s;
2128
+ return !n().getIntegration(Ye) || !i || ("request" in i && i.request instanceof Request && (s.request = ys(i.request, Qe(this, Q)), s.user = Es(s.user ?? {}, i.request, Qe(this, Q))), "requestData" in i && (s.request ? s.request.data = i.requestData : s.request = { data: i.requestData })), s;
2159
2129
  });
2160
2130
  }
2161
2131
  };
2162
- var qe = Ve;
2163
- ee = /* @__PURE__ */ new WeakMap(), _e(qe, "id", "RequestData");
2132
+ var Ge = Ye;
2133
+ Q = /* @__PURE__ */ new WeakMap(), he(Ge, "id", "RequestData");
2164
2134
  function Es(t, e, n) {
2165
2135
  let r = e.headers.get("CF-Connecting-IP"), { allowedIps: s } = n, i = { ...t };
2166
2136
  return !("ip_address" in t) && r && s !== void 0 && Ss(r, s) && (i.ip_address = r), Object.keys(i).length > 0 ? i : void 0;
@@ -2182,9 +2152,9 @@ function ys(t, e) {
2182
2152
  l < 0 ? i.url = t.url : (i.url = t.url.substr(0, l), i.query_string = t.url.substr(l + 1));
2183
2153
  }
2184
2154
  let { allowedHeaders: o, allowedCookies: a, allowedSearchParams: c } = e;
2185
- if (o !== void 0 && i.headers ? (i.headers = Ct(i.headers, o), Object.keys(i.headers).length === 0 && delete i.headers) : delete i.headers, a !== void 0 && i.cookies ? (i.cookies = Ct(i.cookies, a), Object.keys(i.cookies).length === 0 && delete i.cookies) : delete i.cookies, c !== void 0) {
2155
+ if (o !== void 0 && i.headers ? (i.headers = kt(i.headers, o), Object.keys(i.headers).length === 0 && delete i.headers) : delete i.headers, a !== void 0 && i.cookies ? (i.cookies = kt(i.cookies, a), Object.keys(i.cookies).length === 0 && delete i.cookies) : delete i.cookies, c !== void 0) {
2186
2156
  let u = Object.fromEntries(new URLSearchParams(i.query_string)), l = new URLSearchParams();
2187
- Object.keys(Ct(u, c)).forEach((d) => {
2157
+ Object.keys(kt(u, c)).forEach((d) => {
2188
2158
  l.set(d, u[d]);
2189
2159
  }), i.query_string = l.toString();
2190
2160
  } else delete i.query_string;
@@ -2193,7 +2163,7 @@ function ys(t, e) {
2193
2163
  function Ss(t, e) {
2194
2164
  return typeof e == "boolean" ? e : e instanceof RegExp ? e.test(t) : Array.isArray(e) ? e.map((r) => r.toLowerCase()).includes(t) : false;
2195
2165
  }
2196
- function Ct(t, e) {
2166
+ function kt(t, e) {
2197
2167
  let n = () => false;
2198
2168
  if (typeof e == "boolean") return e ? t : {};
2199
2169
  if (e instanceof RegExp) n = (r) => e.test(r);
@@ -2219,7 +2189,7 @@ function bs(t, e) {
2219
2189
  }, () => e);
2220
2190
  }), n;
2221
2191
  }
2222
- var Pt = class extends me {
2192
+ var Ct = class extends fe {
2223
2193
  #e = null;
2224
2194
  constructor(e) {
2225
2195
  e._metadata = e._metadata || {}, e._metadata.sdk = e._metadata.sdk || { name: "toucan-js", packages: [{ name: "npm:toucan-js", version: "3.3.1" }], version: "3.3.1" }, super(e);
@@ -2234,7 +2204,7 @@ var Pt = class extends me {
2234
2204
  return b(ms(this._options.stackParser, e, n, r, this._options.attachStacktrace));
2235
2205
  }
2236
2206
  _prepareEvent(e, n, r) {
2237
- return e.platform = e.platform || "javascript", this.getOptions().request && (e.sdkProcessingMetadata = qn(e.sdkProcessingMetadata, ["request", this.getOptions().request])), this.getOptions().requestData && (e.sdkProcessingMetadata = qn(e.sdkProcessingMetadata, ["requestData", this.getOptions().requestData])), super._prepareEvent(e, n, r);
2207
+ return e.platform = e.platform || "javascript", this.getOptions().request && (e.sdkProcessingMetadata = Yn(e.sdkProcessingMetadata, ["request", this.getOptions().request])), this.getOptions().requestData && (e.sdkProcessingMetadata = Yn(e.sdkProcessingMetadata, ["requestData", this.getOptions().requestData])), super._prepareEvent(e, n, r);
2238
2208
  }
2239
2209
  getSdk() {
2240
2210
  return this.#e;
@@ -2250,7 +2220,7 @@ var Pt = class extends me {
2250
2220
  }
2251
2221
  };
2252
2222
  function Rs(t) {
2253
- let [e, n] = ut(t);
2223
+ let [e, n] = ct(t);
2254
2224
  return [e, (s) => {
2255
2225
  let i = n(s);
2256
2226
  if (i) {
@@ -2261,27 +2231,27 @@ function Rs(t) {
2261
2231
  }];
2262
2232
  }
2263
2233
  function xs(t) {
2264
- if (t) return ft(t, ".js");
2234
+ if (t) return lt(t, ".js");
2265
2235
  }
2266
- var Is = Ae(Rs(xs));
2236
+ var Is = be(Rs(xs));
2267
2237
  function Ns(t) {
2268
2238
  function e({ body: n }) {
2269
2239
  try {
2270
2240
  let s = (t.fetcher ?? fetch)(t.url, { method: "POST", headers: t.headers, body: n }).then((i) => ({ statusCode: i.status, headers: { "retry-after": i.headers.get("Retry-After"), "x-sentry-rate-limits": i.headers.get("X-Sentry-Rate-Limits") } }));
2271
2241
  return t.context && t.context.waitUntil(s), s;
2272
2242
  } catch (r) {
2273
- return $(r);
2243
+ return F(r);
2274
2244
  }
2275
2245
  }
2276
- return kt(t, e);
2246
+ return Ot(t, e);
2277
2247
  }
2278
- var We = class extends j {
2248
+ var $e = class extends H {
2279
2249
  constructor(e) {
2280
- if (e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [new qe(e.requestDataOptions), new je()]], e.release === void 0) {
2250
+ if (e.defaultIntegrations = e.defaultIntegrations === false ? [] : [...Array.isArray(e.defaultIntegrations) ? e.defaultIntegrations : [new Ge(e.requestDataOptions), new Fe()]], e.release === void 0) {
2281
2251
  let r = ls();
2282
2252
  r !== void 0 && (e.release = r);
2283
2253
  }
2284
- let n = new Pt({ ...e, transport: Ns, integrations: Ot(e), stackParser: ct(e.stackParser || Is), transportOptions: { ...e.transportOptions, context: e.context } });
2254
+ let n = new Ct({ ...e, transport: Ns, integrations: wt(e), stackParser: at(e.stackParser || Is), transportOptions: { ...e.transportOptions, context: e.context } });
2285
2255
  super(n), n.setSdk(this), n.setupIntegrations();
2286
2256
  }
2287
2257
  setRequestBody(e) {
@@ -2294,21 +2264,12 @@ var We = class extends j {
2294
2264
  return e.status === "in_progress" && this.setContext("monitor", { slug: e.monitorSlug }), this.getClient().captureCheckIn(e, n, r);
2295
2265
  }
2296
2266
  };
2297
- function Kn(t, e, n, r, s, i, o, a) {
2267
+ function Vn(t, e, n, r, s, i, o, a) {
2298
2268
  if (!(n && r && s)) return;
2299
- let c = new We({ dsn: n, request: t, context: e, sampleRate: 1, 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": s } } });
2269
+ let c = new $e({ dsn: n, request: t, context: e, sampleRate: 1, 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": s } } });
2300
2270
  return i && (c.setTag("colo", i.coloId), c.setTag("metal", i.metalId)), o && a && (c.setTag("accountId", o), c.setTag("scriptId", a)), c.setUser({ id: o?.toString() }), c;
2301
2271
  }
2302
- function As() {
2303
- return { addLogs: () => {
2304
- }, setTags: () => {
2305
- }, end: () => {
2306
- }, isRecording: true };
2307
- }
2308
- function Xn() {
2309
- return { enterSpan: (t, e, ...n) => e(As(), ...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" };
2310
- }
2311
- var Je = class {
2272
+ var je = class {
2312
2273
  constructor(e) {
2313
2274
  this.data = {};
2314
2275
  this.readyAnalytics = e;
@@ -2323,30 +2284,30 @@ var Je = class {
2323
2284
  this.readyAnalytics && 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], blobs: [this.data.hostname?.substring(0, 256), this.data.userAgent?.substring(0, 256), this.data.htmlHandling, this.data.notFoundHandling, this.data.error?.substring(0, 256), this.data.version, this.data.coloRegion] });
2324
2285
  }
2325
2286
  };
2326
- var Xe = class {
2287
+ var We = class {
2327
2288
  constructor(e) {
2328
2289
  this.data = e;
2329
2290
  }
2330
2291
  async get(e) {
2331
- let n = await Os(e), r = Mt(new Uint8Array(this.data, 20), n);
2332
- return r ? ks(r) : null;
2292
+ let n = await ws(e), r = Pt(new Uint8Array(this.data, 20), n);
2293
+ return r ? Os(r) : null;
2333
2294
  }
2334
2295
  };
2335
- var Os = async (t) => {
2296
+ var ws = async (t) => {
2336
2297
  let n = new TextEncoder().encode(t), r = await crypto.subtle.digest("SHA-256", n.buffer);
2337
2298
  return new Uint8Array(r, 0, 16);
2338
2299
  };
2339
- var Mt = (t, e) => {
2300
+ var Pt = (t, e) => {
2340
2301
  if (t.byteLength === 0) return false;
2341
2302
  let n = t.byteOffset + (t.byteLength / 40 >> 1) * 40, r = new Uint8Array(t.buffer, n, 16);
2342
2303
  if (r.byteLength !== e.byteLength) throw new TypeError("Search value and current value are of different lengths");
2343
2304
  let s = vs(e, r);
2344
2305
  if (s < 0) {
2345
2306
  let i = t.byteOffset, o = n - t.byteOffset;
2346
- return Mt(new Uint8Array(t.buffer, i, o), e);
2307
+ return Pt(new Uint8Array(t.buffer, i, o), e);
2347
2308
  } else if (s > 0) {
2348
2309
  let i = n + 40, o = t.buffer.byteLength - n - 40;
2349
- return Mt(new Uint8Array(t.buffer, i, o), e);
2310
+ return Pt(new Uint8Array(t.buffer, i, o), e);
2350
2311
  } else return new Uint8Array(t.buffer, n, 40);
2351
2312
  };
2352
2313
  var vs = (t, e) => {
@@ -2358,54 +2319,79 @@ var vs = (t, e) => {
2358
2319
  }
2359
2320
  return 0;
2360
2321
  };
2361
- var ks = (t) => [...t.slice(16, 16 + 16)].map((n) => n.toString(16).padStart(2, "0")).join("");
2362
- var Ut = (t) => {
2363
- let e;
2364
- return t?.run_worker_first !== void 0 ? e = t?.run_worker_first : t?.serve_directly !== void 0 ? e = !t.serve_directly : e = false, { html_handling: t?.html_handling ?? "auto-trailing-slash", not_found_handling: t?.not_found_handling ?? "none", run_worker_first: e, serve_directly: !e };
2322
+ var Os = (t) => [...t.slice(16, 16 + 16)].map((n) => n.toString(16).padStart(2, "0")).join("");
2323
+ var Mt = (t) => ({ html_handling: t?.html_handling ?? "auto-trailing-slash", not_found_handling: t?.not_found_handling ?? "none", serve_directly: t?.serve_directly ?? true });
2324
+ var ze = class extends Response {
2325
+ constructor(e, n) {
2326
+ super(e, { ...n, status: 200 });
2327
+ }
2328
+ };
2329
+ var me = class extends Response {
2330
+ constructor(...[e, n]) {
2331
+ super(e, { ...n, status: 404, statusText: "Not Found" });
2332
+ }
2333
+ };
2334
+ var Ve = class extends Response {
2335
+ constructor(...[e, n]) {
2336
+ super(e, { ...n, status: 405, statusText: "Method Not Allowed" });
2337
+ }
2338
+ };
2339
+ var j = class extends Response {
2340
+ constructor(e, n) {
2341
+ super(null, { ...n, status: 500 });
2342
+ }
2343
+ };
2344
+ var Je = class extends Response {
2345
+ constructor(...[e, n]) {
2346
+ super(null, { ...n, status: 304, statusText: "Not Modified" });
2347
+ }
2365
2348
  };
2366
- var Zn = "public, max-age=0, must-revalidate";
2367
- function Qn(t, e, n) {
2349
+ var Ke = class extends Response {
2350
+ constructor(e, n) {
2351
+ super(null, { ...n, status: 307, statusText: "Temporary Redirect", headers: { ...n?.headers, Location: e } });
2352
+ }
2353
+ };
2354
+ var Jn = "public, max-age=0, must-revalidate";
2355
+ function Kn(t, e, n) {
2368
2356
  let r = new Headers({ "Content-Type": e, ETag: `"${t}"` });
2369
- return Cs(n) && r.append("Cache-Control", Zn), r;
2357
+ return ks(n) && r.append("Cache-Control", Jn), r;
2370
2358
  }
2371
- function Cs(t) {
2359
+ function ks(t) {
2372
2360
  return !t.headers.has("Authorization") && !t.headers.has("Range");
2373
2361
  }
2374
- var er = async (t, e, n, r, s) => {
2375
- let { pathname: i, search: o } = new URL(t.url), a = Gt(i);
2362
+ var Xn = async (t, e, n, r, s) => {
2363
+ let { pathname: i, search: o } = new URL(t.url), a = Ut(i);
2376
2364
  a = a.replace(/\/+/g, "/");
2377
- let c = await Ze(a, n, r);
2378
- if (!c) return e.JAEGER.enterSpan("no_intent", (x) => (x.setTags({ decodedPathname: a, configuration: JSON.stringify(n), status: 404 }), new te()));
2365
+ let c = await Xe(a, n, r);
2366
+ if (!c) return new me();
2379
2367
  let u = t.method.toUpperCase();
2380
- if (!["GET", "HEAD"].includes(u)) return e.JAEGER.enterSpan("method_not_allowed", (x) => (x.setTags({ method: u, status: 405 }), new ye()));
2368
+ if (!["GET", "HEAD"].includes(u)) return new Ve();
2381
2369
  let l = c.redirect ?? a, d = Ls(l);
2382
- if (d !== i && c.asset || c.redirect) return e.JAEGER.enterSpan("redirect", (x) => (x.setTags({ originalPath: i, location: d !== i ? d : c.redirect ?? "<unknown>", status: 307 }), new Te(d + o)));
2383
- if (!c.asset) return e.JAEGER.enterSpan("unknown_action", (x) => (x.setTags({ pathname: i, status: 500 }), new L(new Error("Unknown action"))));
2384
- let p = await e.JAEGER.enterSpan("getByETag", async (x) => (x.setTags({ pathname: i, eTag: c.asset.eTag, status: c.asset.status }), await s(c.asset.eTag))), m = Qn(c.asset.eTag, p.contentType, t), v = `"${c.asset.eTag}"`, rr = `W/${v}`, Lt = t.headers.get("If-None-Match") || "";
2385
- return [rr, v].includes(Lt) ? e.JAEGER.enterSpan("matched_etag", (x) => (x.setTags({ matchedEtag: Lt, status: 304 }), new Se(null, { headers: m }))) : e.JAEGER.enterSpan("response", (x) => {
2386
- x.setTags({ etag: c.asset.eTag, status: c.asset.status, head: u === "HEAD" });
2387
- let Bt = u === "HEAD" ? null : p.readableStream;
2388
- switch (c.asset.status) {
2389
- case 404:
2390
- return new te(Bt, { headers: m });
2391
- case 200:
2392
- return new Ee(Bt, { headers: m });
2393
- }
2394
- });
2370
+ if (d !== i && c.asset || c.redirect) return new Ke(d + o);
2371
+ if (!c.asset) return new j(new Error("Unknown action"));
2372
+ let p = await e.JAEGER.enterSpan("getByETag", async (rr) => (rr.setTags({ pathname: i, eTag: c.asset.eTag, status: c.asset.status }), await s(c.asset.eTag))), m = Kn(c.asset.eTag, p.contentType, t), v = `"${c.asset.eTag}"`, tr = `W/${v}`, nr = t.headers.get("If-None-Match") || "";
2373
+ if ([tr, v].includes(nr)) return new Je(null, { headers: m });
2374
+ let Lt = u === "HEAD" ? null : p.readableStream;
2375
+ switch (c.asset.status) {
2376
+ case 404:
2377
+ return new me(Lt, { headers: m });
2378
+ case 200:
2379
+ return new ze(Lt, { headers: m });
2380
+ }
2395
2381
  };
2396
- var Ze = async (t, e, n, r = false) => {
2382
+ var Xe = async (t, e, n, r = false) => {
2397
2383
  switch (e.html_handling) {
2398
2384
  case "auto-trailing-slash":
2399
- return Ps(t, e, n, r);
2385
+ return Cs(t, e, n, r);
2400
2386
  case "force-trailing-slash":
2401
- return Ms(t, e, n, r);
2387
+ return Ps(t, e, n, r);
2402
2388
  case "drop-trailing-slash":
2403
- return Us(t, e, n, r);
2389
+ return Ms(t, e, n, r);
2404
2390
  case "none":
2405
- return Gs(t, e, n);
2391
+ return Us(t, e, n);
2406
2392
  }
2407
2393
  };
2408
- var Ps = async (t, e, n, r) => {
2394
+ var Cs = async (t, e, n, r) => {
2409
2395
  let s = null, i = null, o = await n(t);
2410
2396
  if (t.endsWith("/index")) {
2411
2397
  if (o) return { asset: { eTag: o, status: 200 }, redirect: null };
@@ -2421,9 +2407,9 @@ var Ps = async (t, e, n, r) => {
2421
2407
  if (s = await _(t, t.slice(0, -5), e, n, r)) return s;
2422
2408
  if (s = await _(`${t.slice(0, -5)}/index.html`, `${t.slice(0, -5)}/`, e, n, r)) return s;
2423
2409
  }
2424
- return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (i = await n(`${t}.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : (s = await _(`${t}/index.html`, `${t}/`, e, n, r)) ? s : Qe(t, e, n);
2410
+ return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (i = await n(`${t}.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : (s = await _(`${t}/index.html`, `${t}/`, e, n, r)) ? s : Ze(t, e, n);
2425
2411
  };
2426
- var Ms = async (t, e, n, r) => {
2412
+ var Ps = async (t, e, n, r) => {
2427
2413
  let s = null, i = null, o = await n(t);
2428
2414
  if (t.endsWith("/index")) {
2429
2415
  if (o) return { asset: { eTag: o, status: 200 }, redirect: null };
@@ -2440,9 +2426,9 @@ var Ms = async (t, e, n, r) => {
2440
2426
  if (o) return { asset: { eTag: o, status: 200 }, redirect: null };
2441
2427
  if (s = await _(`${t.slice(0, -5)}/index.html`, `${t.slice(0, -5)}/`, e, n, r)) return s;
2442
2428
  }
2443
- return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (s = await _(`${t}.html`, `${t}/`, e, n, r)) || (s = await _(`${t}/index.html`, `${t}/`, e, n, r)) ? s : Qe(t, e, n);
2429
+ return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (s = await _(`${t}.html`, `${t}/`, e, n, r)) || (s = await _(`${t}/index.html`, `${t}/`, e, n, r)) ? s : Ze(t, e, n);
2444
2430
  };
2445
- var Us = async (t, e, n, r) => {
2431
+ var Ms = async (t, e, n, r) => {
2446
2432
  let s = null, i = null, o = await n(t);
2447
2433
  if (t.endsWith("/index")) {
2448
2434
  if (o) return { asset: { eTag: o, status: 200 }, redirect: null };
@@ -2469,13 +2455,13 @@ var Us = async (t, e, n, r) => {
2469
2455
  if (s = await _(t, t.slice(0, -5), e, n, r)) return s;
2470
2456
  if (s = await _(`${t.slice(0, -5)}/index.html`, t.slice(0, -5), e, n, r)) return s;
2471
2457
  }
2472
- return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (i = await n(`${t}.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : (i = await n(`${t}/index.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : Qe(t, e, n);
2458
+ return o ? { asset: { eTag: o, status: 200 }, redirect: null } : (i = await n(`${t}.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : (i = await n(`${t}/index.html`)) ? { asset: { eTag: i, status: 200 }, redirect: null } : Ze(t, e, n);
2473
2459
  };
2474
- var Gs = async (t, e, n) => {
2460
+ var Us = async (t, e, n) => {
2475
2461
  let r = await n(t);
2476
- return r ? { asset: { eTag: r, status: 200 }, redirect: null } : Qe(t, e, n);
2462
+ return r ? { asset: { eTag: r, status: 200 }, redirect: null } : Ze(t, e, n);
2477
2463
  };
2478
- var Qe = async (t, e, n) => {
2464
+ var Ze = async (t, e, n) => {
2479
2465
  switch (e.not_found_handling) {
2480
2466
  case "single-page-application": {
2481
2467
  let r = await n("/index.html");
@@ -2498,12 +2484,12 @@ var Qe = async (t, e, n) => {
2498
2484
  var _ = async (t, e, n, r, s) => {
2499
2485
  if (s) return null;
2500
2486
  if (!await r(e)) {
2501
- let i = await Ze(e, n, r, true);
2487
+ let i = await Xe(e, n, r, true);
2502
2488
  if (i?.asset && i.asset.eTag === await r(t)) return { asset: null, redirect: e };
2503
2489
  }
2504
2490
  return null;
2505
2491
  };
2506
- var Gt = (t) => t.split("/").map((e) => {
2492
+ var Ut = (t) => t.split("/").map((e) => {
2507
2493
  try {
2508
2494
  return decodeURIComponent(e);
2509
2495
  } catch {
@@ -2517,7 +2503,7 @@ var Ls = (t) => t.split("/").map((e) => {
2517
2503
  return e;
2518
2504
  }
2519
2505
  }).join("/");
2520
- async function tr(t, e, n, r = 1) {
2506
+ async function Zn(t, e, n, r = 1) {
2521
2507
  let s = 0;
2522
2508
  for (; s <= r; ) try {
2523
2509
  let i = await t.getWithMetadata(e, { type: "stream", cacheTtl: 31536e3 });
@@ -2531,13 +2517,22 @@ async function tr(t, e, n, r = 1) {
2531
2517
  await new Promise((o) => setTimeout(o, Math.pow(2, s++) * 1e3));
2532
2518
  }
2533
2519
  }
2534
- var nr = class extends Bs {
2520
+ function Bs() {
2521
+ return { addLogs: () => {
2522
+ }, setTags: () => {
2523
+ }, end: () => {
2524
+ }, isRecording: true };
2525
+ }
2526
+ function Qn() {
2527
+ return { enterSpan: (t, e, ...n) => e(Bs(), ...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" };
2528
+ }
2529
+ var er = class extends Fs {
2535
2530
  async fetch(t) {
2536
- let e, n = new Je(this.env.ANALYTICS), r = new ge(this.env.UNSAFE_PERFORMANCE), s = r.now();
2531
+ let e, n = new je(this.env.ANALYTICS), r = new _e(this.env.UNSAFE_PERFORMANCE), s = r.now();
2537
2532
  try {
2538
- this.env.JAEGER || (this.env.JAEGER = Xn()), e = Kn(t, this.ctx, this.env.SENTRY_DSN, this.env.SENTRY_ACCESS_CLIENT_ID, this.env.SENTRY_ACCESS_CLIENT_SECRET, this.env.COLO_METADATA, this.env.CONFIG?.account_id, this.env.CONFIG?.script_id);
2539
- let i = Ut(this.env.CONFIG), o = t.headers.get("user-agent") ?? "UA UNKNOWN", a = new URL(t.url);
2540
- return this.env.COLO_METADATA && this.env.VERSION_METADATA && this.env.CONFIG && n.setData({ accountId: this.env.CONFIG.account_id, scriptId: this.env.CONFIG.script_id, coloId: this.env.COLO_METADATA.coloId, metalId: this.env.COLO_METADATA.metalId, coloTier: this.env.COLO_METADATA.coloTier, coloRegion: this.env.COLO_METADATA.coloRegion, version: this.env.VERSION_METADATA.id, hostname: a.hostname, htmlHandling: i.html_handling, notFoundHandling: i.not_found_handling, userAgent: o }), await this.env.JAEGER.enterSpan("handleRequest", async (c) => (c.setTags({ hostname: a.hostname, eyeballPath: a.pathname, env: this.env.ENVIRONMENT, version: this.env.VERSION_METADATA?.id }), er(t, this.env, i, this.unstable_exists.bind(this), this.unstable_getByETag.bind(this))));
2533
+ this.env.JAEGER || (this.env.JAEGER = Qn()), e = Vn(t, this.ctx, this.env.SENTRY_DSN, this.env.SENTRY_ACCESS_CLIENT_ID, this.env.SENTRY_ACCESS_CLIENT_SECRET, this.env.COLO_METADATA, this.env.CONFIG?.account_id, this.env.CONFIG?.script_id);
2534
+ let i = Mt(this.env.CONFIG), o = t.headers.get("user-agent") ?? "UA UNKNOWN", a = new URL(t.url);
2535
+ return this.env.COLO_METADATA && this.env.VERSION_METADATA && this.env.CONFIG && n.setData({ accountId: this.env.CONFIG.account_id, scriptId: this.env.CONFIG.script_id, coloId: this.env.COLO_METADATA.coloId, metalId: this.env.COLO_METADATA.metalId, coloTier: this.env.COLO_METADATA.coloTier, coloRegion: this.env.COLO_METADATA.coloRegion, version: this.env.VERSION_METADATA.id, hostname: a.hostname, htmlHandling: i.html_handling, notFoundHandling: i.not_found_handling, userAgent: o }), this.env.JAEGER.enterSpan("handleRequest", async (c) => (c.setTags({ hostname: a.hostname, eyeballPath: a.pathname, env: this.env.ENVIRONMENT, version: this.env.VERSION_METADATA?.id }), Xn(t, this.env, i, this.unstable_exists.bind(this), this.unstable_getByETag.bind(this)))).catch((c) => this.handleError(e, n, c)).finally(() => this.submitMetrics(n, r, s));
2541
2536
  } catch (i) {
2542
2537
  let o = this.handleError(e, n, i);
2543
2538
  return this.submitMetrics(n, r, s), o;
@@ -2545,10 +2540,10 @@ var nr = class extends Bs {
2545
2540
  }
2546
2541
  handleError(t, e, n) {
2547
2542
  try {
2548
- let r = new L(n);
2543
+ let r = new j(n);
2549
2544
  return t && t.captureException(n), n instanceof Error && e.setData({ error: n.message }), r;
2550
2545
  } catch (r) {
2551
- return console.error("Error handling error", r), new L(r);
2546
+ return console.error("Error handling error", r), new j(r);
2552
2547
  }
2553
2548
  }
2554
2549
  submitMetrics(t, e, n) {
@@ -2559,11 +2554,11 @@ var nr = class extends Bs {
2559
2554
  }
2560
2555
  }
2561
2556
  async unstable_canFetch(t) {
2562
- let e = new URL(t.url), n = Gt(e.pathname);
2563
- return await Ze(n, { ...Ut(this.env.CONFIG), not_found_handling: "none" }, this.unstable_exists.bind(this)) !== null;
2557
+ let e = new URL(t.url), n = Ut(e.pathname);
2558
+ return await Xe(n, { ...Mt(this.env.CONFIG), not_found_handling: "none" }, this.unstable_exists.bind(this)) !== null;
2564
2559
  }
2565
2560
  async unstable_getByETag(t) {
2566
- let e = await tr(this.env.ASSETS_KV_NAMESPACE, t);
2561
+ let e = await Zn(this.env.ASSETS_KV_NAMESPACE, t);
2567
2562
  if (!e || !e.value) throw new Error(`Requested asset ${t} exists in the asset manifest but not in the KV namespace.`);
2568
2563
  return { readableStream: e.value, contentType: e.metadata?.contentType ?? "application/octet-stream" };
2569
2564
  }
@@ -2572,7 +2567,7 @@ var nr = class extends Bs {
2572
2567
  return e ? this.unstable_getByETag(e) : null;
2573
2568
  }
2574
2569
  async unstable_exists(t) {
2575
- return await new Xe(this.env.ASSETS_MANIFEST).get(t);
2570
+ return await new We(this.env.ASSETS_MANIFEST).get(t);
2576
2571
  }
2577
2572
  };
2578
2573
 
@@ -2580,7 +2575,7 @@ var nr = class extends Bs {
2580
2575
  var UNKNOWN_HOST = "http://localhost";
2581
2576
 
2582
2577
  // src/asset-workers/asset-worker.ts
2583
- var CustomAssetWorker = class extends nr {
2578
+ var CustomAssetWorker = class extends er {
2584
2579
  async fetch(request) {
2585
2580
  const response = await super.fetch(request);
2586
2581
  const modifiedResponse = new Response(response.body, response);