@fixback/sdk 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -1,15 +1,15 @@
1
- function Rt(e) {
1
+ function Xn(e) {
2
2
  return `${e.replace(/\/+$/, "")}/api/ingest/boot`;
3
3
  }
4
- function $t(e) {
4
+ function qn(e) {
5
5
  if (typeof e != "object" || e === null) return !1;
6
6
  const t = e;
7
7
  return typeof t.originAllowed == "boolean" && typeof t.canSubmit == "boolean" && typeof t.gate == "string" && (t.tier === null || typeof t.tier == "string");
8
8
  }
9
- async function Nt(e, t, o = fetch) {
10
- let n;
9
+ async function Gn(e, t, n = fetch) {
10
+ let r;
11
11
  try {
12
- n = await o(Rt(e), {
12
+ r = await n(Xn(e), {
13
13
  method: "POST",
14
14
  headers: { "content-type": "application/json" },
15
15
  body: JSON.stringify(t)
@@ -17,76 +17,76 @@ async function Nt(e, t, o = fetch) {
17
17
  } catch {
18
18
  return null;
19
19
  }
20
- if (!n.ok) return null;
21
- let i;
20
+ if (!r.ok) return null;
21
+ let o;
22
22
  try {
23
- i = await n.json();
23
+ o = await r.json();
24
24
  } catch {
25
25
  return null;
26
26
  }
27
- return $t(i) ? i : null;
27
+ return qn(o) ? o : null;
28
+ }
29
+ var tt = ["data-fixback-root", "data-fixback-overlay"], Pa = tt.map((e) => `[${e}]`).join(",");
30
+ function Wn(e) {
31
+ return e instanceof Element && tt.some((t) => e.hasAttribute(t));
28
32
  }
29
- var tt = ["data-fixback-root", "data-fixback-overlay"], Bt = tt.map((e) => `[${e}]`).join(",");
30
- function _e(e) {
33
+ function Ge(e) {
31
34
  let t = e instanceof Node ? e : null;
32
35
  for (; t; ) {
33
36
  if (t instanceof Element) {
34
- for (const n of tt) if (t.hasAttribute(n)) return !0;
37
+ for (const r of tt) if (t.hasAttribute(r)) return !0;
35
38
  }
36
- const o = t.getRootNode();
37
- if (o instanceof ShadowRoot && o !== t) {
38
- t = o.host;
39
+ const n = t.getRootNode();
40
+ if (n instanceof ShadowRoot && n !== t) {
41
+ t = n.host;
39
42
  continue;
40
43
  }
41
44
  t = t.parentNode;
42
45
  }
43
46
  return !1;
44
47
  }
45
- function Pt(e) {
46
- for (const t of Array.from(e.querySelectorAll(Bt))) t.remove();
47
- }
48
- function je(e) {
48
+ function kt(e) {
49
49
  const t = globalThis.CSS;
50
- return t != null && t.escape ? t.escape(e) : e.replace(/[^\w-]/g, (o) => `\\${o}`);
50
+ return t != null && t.escape ? t.escape(e) : e.replace(/[^\w-]/g, (n) => `\\${n}`);
51
51
  }
52
- function Ot(e) {
53
- let t = 1, o = e.previousElementSibling;
54
- for (; o; )
55
- o.tagName === e.tagName && (t += 1), o = o.previousElementSibling;
52
+ function Yn(e) {
53
+ let t = 1, n = e.previousElementSibling;
54
+ for (; n; )
55
+ n.tagName === e.tagName && (t += 1), n = n.previousElementSibling;
56
56
  return t;
57
57
  }
58
- function ot(e) {
59
- if (e.id) return `#${je(e.id)}`;
58
+ function Vt(e) {
59
+ if (e.id) return `#${kt(e.id)}`;
60
60
  const t = [];
61
- let o = e;
62
- for (; o && o.tagName.toLowerCase() !== "html"; ) {
63
- if (o.id) {
64
- t.unshift(`#${je(o.id)}`);
61
+ let n = e;
62
+ for (; n && n.tagName.toLowerCase() !== "html"; ) {
63
+ if (n.id) {
64
+ t.unshift(`#${kt(n.id)}`);
65
65
  break;
66
66
  }
67
- const n = o.tagName.toLowerCase(), i = o.parentElement;
68
- if (i) {
69
- const r = Array.from(i.children).filter((s) => s.tagName === o.tagName);
70
- t.unshift(r.length > 1 ? `${n}:nth-of-type(${Ot(o)})` : n);
71
- } else t.unshift(n);
72
- o = i;
67
+ const r = n.tagName.toLowerCase(), o = n.parentElement;
68
+ if (o) {
69
+ const i = Array.from(o.children).filter((a) => a.tagName === n.tagName);
70
+ t.unshift(i.length > 1 ? `${r}:nth-of-type(${Yn(n)})` : r);
71
+ } else t.unshift(r);
72
+ n = o;
73
73
  }
74
74
  return t.join(" > ");
75
75
  }
76
- function Ut(e) {
76
+ function Kn(e) {
77
77
  const t = e.tagName.toLowerCase();
78
78
  if (e.id) return `${t}#${e.id}`;
79
- const o = e.classList[0];
80
- return o ? `${t}.${o}` : t;
79
+ const n = e.classList[0];
80
+ return n ? `${t}.${n}` : t;
81
81
  }
82
- function zt(e) {
82
+ function Zn(e) {
83
83
  const t = [];
84
- let o = e;
85
- for (; o; )
86
- t.unshift(Ut(o)), o = o.parentElement;
84
+ let n = e;
85
+ for (; n; )
86
+ t.unshift(Kn(n)), n = n.parentElement;
87
87
  return t.join(" > ");
88
88
  }
89
- function Dt(e) {
89
+ function Jn(e) {
90
90
  const t = e.getBoundingClientRect();
91
91
  return {
92
92
  x: Math.round(t.x),
@@ -95,116 +95,235 @@ function Dt(e) {
95
95
  height: Math.round(t.height)
96
96
  };
97
97
  }
98
- function jt(e) {
98
+ function Qn(e) {
99
99
  return {
100
- selector: ot(e),
101
- domPath: zt(e),
100
+ selector: Vt(e),
101
+ domPath: Zn(e),
102
102
  tag: e.tagName.toLowerCase(),
103
- rect: Dt(e)
103
+ rect: Jn(e)
104
104
  };
105
105
  }
106
- function Ft(e) {
107
- var t, o;
108
- const n = (t = e.doc) !== null && t !== void 0 ? t : document, i = (o = e.ignore) !== null && o !== void 0 ? o : _e;
109
- let r = null, s = !1;
110
- function f(b) {
111
- var u;
112
- const m = (u = (typeof b.composedPath == "function" ? b.composedPath() : [])[0]) !== null && u !== void 0 ? u : b.target;
113
- return m instanceof Element ? i(m) ? null : m : null;
114
- }
115
- function l(b) {
116
- var u;
117
- s || (r = f(b), (u = e.onHover) === null || u === void 0 || u.call(e, r));
118
- }
119
- function d(b) {
120
- var u;
121
- if (s) return;
122
- const m = (u = f(b)) !== null && u !== void 0 ? u : r;
123
- m && (b.preventDefault(), b.stopPropagation(), a(), e.onPick(m));
124
- }
125
- function h(b) {
126
- if (!s && b.key === "Escape") {
127
- var u;
128
- b.preventDefault(), a(), (u = e.onCancel) === null || u === void 0 || u.call(e);
106
+ function er(e) {
107
+ var t, n;
108
+ const r = (t = e.doc) !== null && t !== void 0 ? t : document, o = (n = e.ignore) !== null && n !== void 0 ? n : Ge;
109
+ let i = null, a = !1;
110
+ function c(h) {
111
+ var f;
112
+ const b = (f = (typeof h.composedPath == "function" ? h.composedPath() : [])[0]) !== null && f !== void 0 ? f : h.target;
113
+ return b instanceof Element ? o(b) ? null : b : null;
114
+ }
115
+ function l(h) {
116
+ var f;
117
+ a || (i = c(h), (f = e.onHover) === null || f === void 0 || f.call(e, i));
118
+ }
119
+ function d(h) {
120
+ var f;
121
+ if (a) return;
122
+ const b = (f = c(h)) !== null && f !== void 0 ? f : i;
123
+ b && (h.preventDefault(), h.stopPropagation(), s(), e.onPick(b));
124
+ }
125
+ function p(h) {
126
+ if (!a && h.key === "Escape") {
127
+ var f;
128
+ h.preventDefault(), s(), (f = e.onCancel) === null || f === void 0 || f.call(e);
129
129
  }
130
130
  }
131
- function a() {
132
- s || (s = !0, n.removeEventListener("mouseover", l, !0), n.removeEventListener("click", d, !0), n.removeEventListener("keydown", h, !0), r = null);
131
+ function s() {
132
+ a || (a = !0, r.removeEventListener("mouseover", l, !0), r.removeEventListener("click", d, !0), r.removeEventListener("keydown", p, !0), i = null);
133
133
  }
134
- return n.addEventListener("mouseover", l, !0), n.addEventListener("click", d, !0), n.addEventListener("keydown", h, !0), { stop: a };
134
+ return r.addEventListener("mouseover", l, !0), r.addEventListener("click", d, !0), r.addEventListener("keydown", p, !0), { stop: s };
135
135
  }
136
- var Ht = 7, Vt = /[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi, Xt = new RegExp(`\\d{${Ht},}`, "g"), Gt = /\b(bearer|token)\s+[\w.\-~+/]+=*/gi, Yt = /\bhttps?:\/\/[^\s"'<>]+/gi;
137
- function Kt(e) {
138
- return typeof e != "string" || e.length === 0 ? e : e.replace(Vt, "[redacted-email]").replace(Gt, (t, o) => `${o} [redacted]`).replace(Xt, "[redacted-number]");
136
+ var tr = 7, Xt = /[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,}/gi, qt = new RegExp(`\\d{${tr},}`, "g"), nr = /\b(bearer|token)\s+[\w.\-~+/]+=*/gi, rr = /\bhttps?:\/\/[^\s"'<>]+/gi;
137
+ function or(e) {
138
+ return typeof e != "string" || e.length === 0 ? e : e.replace(Xt, "[redacted-email]").replace(nr, (t, n) => `${n} [redacted]`).replace(qt, "[redacted-number]");
139
139
  }
140
- function X(e) {
141
- if (typeof e != "string" || e.length === 0) return e;
142
- let t = e;
143
- return t = t.replace(/(^[a-z][a-z0-9+.-]*:\/\/)[^/@?#]*@/i, "$1"), t = t.replace(/\?[^#]*/, ""), t = t.replace(/#.*$/, (o) => o.includes("=") ? "" : o), t;
140
+ function Ue(e) {
141
+ return e.replace(Xt, "[redacted-email]").replace(qt, "[redacted-number]");
144
142
  }
145
- function qt(e) {
143
+ function H(e) {
144
+ var t;
145
+ if (typeof e != "string" || e.length === 0) return e;
146
+ let n = e;
147
+ n = n.replace(/(^[a-z][a-z0-9+.-]*:\/\/)[^/@?#]*@/i, "$1"), n = n.replace(/\?[^#]*/, ""), n = n.replace(/#.*$/, (a) => a.includes("=") ? "" : a);
148
+ const r = n.match(/^([a-z][a-z0-9+.-]*:\/\/[^/?#]*)([\s\S]*)$/i);
149
+ if (r) return r[1] + Ue((t = r[2]) !== null && t !== void 0 ? t : "");
150
+ const o = n.match(/^(\/\/[^/?#]*)([\s\S]*)$/);
151
+ if (o) {
152
+ var i;
153
+ return o[1] + Ue((i = o[2]) !== null && i !== void 0 ? i : "");
154
+ }
155
+ return Ue(n);
156
+ }
157
+ function ir(e) {
146
158
  const t = { ...e };
147
- return typeof t.url == "string" && (t.url = X(t.url)), typeof t.from == "string" && (t.from = X(t.from)), typeof t.to == "string" && (t.to = X(t.to)), t;
159
+ return typeof t.url == "string" && (t.url = H(t.url)), typeof t.from == "string" && (t.from = H(t.from)), typeof t.to == "string" && (t.to = H(t.to)), t;
148
160
  }
149
- function Wt(e) {
150
- return Kt(e.replace(Yt, (t) => X(t)));
161
+ function ce(e) {
162
+ return or(e.replace(rr, (t) => H(t)));
163
+ }
164
+ function We(e) {
165
+ if (typeof e == "string") return ce(e);
166
+ if (Array.isArray(e)) return e.map(We);
167
+ if (e && typeof e == "object") {
168
+ const t = {};
169
+ for (const [n, r] of Object.entries(e)) t[n] = We(r);
170
+ return t;
171
+ }
172
+ return e;
173
+ }
174
+ function ar(e) {
175
+ switch (e.t) {
176
+ case "string":
177
+ return typeof e.v == "string" ? {
178
+ t: "string",
179
+ v: ce(e.v)
180
+ } : e;
181
+ case "json":
182
+ return {
183
+ t: "json",
184
+ v: We(e.v)
185
+ };
186
+ case "error": {
187
+ if (!e.v || typeof e.v != "object") return e;
188
+ const t = { ...e.v };
189
+ return typeof t.message == "string" && (t.message = ce(t.message)), typeof t.stack == "string" && (t.stack = ce(t.stack)), {
190
+ t: "error",
191
+ v: t
192
+ };
193
+ }
194
+ default:
195
+ return e;
196
+ }
151
197
  }
152
- function Zt(e) {
198
+ function sr(e) {
153
199
  const t = { ...e };
154
- return typeof t.message == "string" && (t.message = Wt(t.message)), t.data && (t.data = qt(t.data)), t;
200
+ return typeof t.message == "string" && (t.message = ce(t.message)), t.data && (t.data = ir(t.data)), typeof t.url == "string" && (t.url = H(t.url)), Array.isArray(t.args) && (t.args = t.args.map(ar)), t;
155
201
  }
156
- function Jt(e) {
202
+ function lr(e) {
157
203
  const t = { ...e };
158
- return typeof t.url == "string" && (t.url = X(t.url)), t.trace && t.trace.length > 0 && (t.trace = t.trace.map(Zt)), t;
204
+ return typeof t.url == "string" && (t.url = H(t.url)), t.trace && t.trace.length > 0 && (t.trace = t.trace.map(sr)), t;
159
205
  }
160
- function nt(e, t = {}) {
161
- const o = t.scrub === !1 ? e : Jt(e), n = t.hook;
162
- if (!n) return o;
206
+ function Gt(e, t = {}) {
207
+ const n = t.scrub === !1 ? e : lr(e), r = t.hook;
208
+ if (!r) return n;
163
209
  try {
164
- const i = n(o);
165
- return i != null ? i : null;
210
+ const o = r(n);
211
+ return o != null ? o : null;
166
212
  } catch {
167
- return o;
213
+ return n;
168
214
  }
169
215
  }
170
- var Qt = [
216
+ var $e = {
217
+ network: 100,
218
+ console: 80,
219
+ breadcrumbs: 40
220
+ }, cr = 18e4, ur = [
221
+ "log",
222
+ "info",
223
+ "warn",
224
+ "error",
225
+ "assert",
226
+ "debug"
227
+ ], Wt = [
171
228
  "warn",
172
229
  "error",
173
230
  "assert"
174
231
  ];
175
- function eo(e) {
176
- return typeof e != "number" || !Number.isFinite(e) || e < 1 ? 30 : Math.floor(e);
232
+ function dr(e) {
233
+ return e !== void 0 && Wt.includes(e);
177
234
  }
178
- function to(e = {}) {
179
- var t;
180
- const o = eo(e.maxBreadcrumbs), n = e.maxAgeMs, i = e.beforeBreadcrumb, r = (t = e.now) !== null && t !== void 0 ? t : Date.now;
181
- let s = [];
182
- function f() {
183
- if (typeof n == "number" && n > 0 && s.length > 0) {
184
- const l = r() - n;
185
- s = s.filter((d) => d.timestamp >= l);
235
+ var fr = Wt;
236
+ function pr(e) {
237
+ return fr.includes(e);
238
+ }
239
+ function br(e) {
240
+ return e === "console" ? "console" : e === "fetch" || e === "xhr" || e === "beacon" ? "network" : "breadcrumbs";
241
+ }
242
+ function Fe(e, t) {
243
+ return typeof e != "number" || !Number.isFinite(e) || e < 1 ? t : Math.floor(e);
244
+ }
245
+ function Te() {
246
+ return typeof performance != "undefined" && typeof performance.now == "function" ? performance.now() : Date.now();
247
+ }
248
+ function hr() {
249
+ const e = Math.random().toString(36).slice(2, 8);
250
+ let t = 0;
251
+ return () => `${e}${(t++).toString(36)}`;
252
+ }
253
+ var Et = [
254
+ "network",
255
+ "console",
256
+ "breadcrumbs"
257
+ ];
258
+ function mr(e, t) {
259
+ const n = e.length - t;
260
+ if (n <= 0) return e;
261
+ const r = /* @__PURE__ */ new Set();
262
+ for (let o = 0; o < e.length && r.size < n; o += 1) dr(e[o].crumb.level) || r.add(o);
263
+ for (let o = 0; o < e.length && r.size < n; o += 1) r.has(o) || r.add(o);
264
+ return e.filter((o, i) => !r.has(i));
265
+ }
266
+ function vr(e = {}) {
267
+ var t, n, r, o, i, a;
268
+ const c = {
269
+ network: Fe((t = e.budgets) === null || t === void 0 ? void 0 : t.network, $e.network),
270
+ console: Fe((n = e.budgets) === null || n === void 0 ? void 0 : n.console, $e.console),
271
+ breadcrumbs: Fe((r = e.budgets) === null || r === void 0 ? void 0 : r.breadcrumbs, $e.breadcrumbs)
272
+ }, l = e.maxAgeMs === void 0 ? cr : e.maxAgeMs, d = e.beforeBreadcrumb, p = (o = e.now) !== null && o !== void 0 ? o : Date.now, s = (i = e.mono) !== null && i !== void 0 ? i : Te, h = (a = e.nextId) !== null && a !== void 0 ? a : hr(), f = {
273
+ network: [],
274
+ console: [],
275
+ breadcrumbs: []
276
+ };
277
+ let b = 0;
278
+ function m() {
279
+ if (typeof l != "number" || l <= 0) return;
280
+ const u = p() - l;
281
+ for (const y of Et) {
282
+ const g = f[y];
283
+ g.length > 0 && (f[y] = g.filter((v) => v.crumb.timestamp >= u));
186
284
  }
187
285
  }
188
286
  return {
189
- add(l) {
190
- let d = l;
191
- if (i) try {
192
- d = i(l);
287
+ add(u) {
288
+ var y;
289
+ let g = u;
290
+ if (d) try {
291
+ g = d(u);
193
292
  } catch {
194
- d = l;
293
+ g = u;
195
294
  }
196
- d && (s.push(d), f(), s.length > o && (s = s.slice(-o)));
295
+ if (!g) return;
296
+ const v = {
297
+ ...g,
298
+ id: (y = g.id) !== null && y !== void 0 ? y : h(),
299
+ timestamp: typeof g.timestamp == "number" ? g.timestamp : p(),
300
+ mono: typeof g.mono == "number" ? g.mono : s()
301
+ }, w = br(v.category);
302
+ f[w].push({
303
+ crumb: v,
304
+ seq: b++
305
+ }), m();
306
+ const S = f[w], k = c[w];
307
+ S.length > k && (f[w] = w === "console" ? mr(S, k) : S.slice(-k));
197
308
  },
198
309
  snapshot() {
199
- return f(), s.slice();
310
+ m();
311
+ const u = [];
312
+ for (const y of Et) u.push(...f[y]);
313
+ return u.sort((y, g) => (typeof y.crumb.mono == "number" ? y.crumb.mono : y.crumb.timestamp) - (typeof g.crumb.mono == "number" ? g.crumb.mono : g.crumb.timestamp) || y.seq - g.seq), u.map((y) => y.crumb);
200
314
  },
201
315
  clear() {
202
- s = [];
316
+ f.network = [], f.console = [], f.breadcrumbs = [], b = 0;
203
317
  }
204
318
  };
205
319
  }
206
- var Fe = 300;
207
- function rt(e) {
320
+ var St = 300, Ye = 2048;
321
+ var nt = 1024;
322
+ var gr = 2048;
323
+ function K(e, t) {
324
+ return e.length > t ? `${e.slice(0, t)}…` : e;
325
+ }
326
+ function Yt(e) {
208
327
  if (typeof e == "string") return e;
209
328
  if (e instanceof Error) return `${e.name}: ${e.message}`;
210
329
  if (e == null || typeof e == "number" || typeof e == "boolean") return String(e);
@@ -215,78 +334,201 @@ function rt(e) {
215
334
  return "[object]";
216
335
  }
217
336
  }
218
- function oo(e) {
219
- const t = e.map(rt).join(" ");
220
- return t.length > Fe ? `${t.slice(0, Fe)}…` : t;
337
+ function yr(e) {
338
+ const t = e.map(Yt).join(" ");
339
+ return t.length > St ? `${t.slice(0, St)}…` : t;
221
340
  }
222
- function He(e, t, o) {
341
+ function Kt(e) {
342
+ var t;
343
+ const n = {
344
+ name: e.name || "Error",
345
+ message: K(String((t = e.message) !== null && t !== void 0 ? t : ""), nt)
346
+ };
347
+ return typeof e.stack == "string" && e.stack.length > 0 && (n.stack = K(e.stack, gr)), n;
348
+ }
349
+ function Ke(e, t, n) {
350
+ if (e === null) return null;
351
+ const r = typeof e;
352
+ if (r === "string") return K(e, nt);
353
+ if (r === "number") return Number.isFinite(e) ? e : String(e);
354
+ if (r === "boolean") return e;
355
+ if (r === "bigint") return `${e.toString()}n`;
356
+ if (r === "symbol") return e.toString();
357
+ if (r === "function") return "[Function]";
358
+ if (r === "undefined") return null;
359
+ const o = e;
360
+ if (e instanceof Error) {
361
+ const { name: i, message: a } = Kt(e);
362
+ return {
363
+ name: i,
364
+ message: a
365
+ };
366
+ }
367
+ if (n.has(o)) return "[Circular]";
368
+ if (t <= 0) return Array.isArray(e) ? "[Array]" : "[Object]";
369
+ n.add(o);
370
+ try {
371
+ if (Array.isArray(e)) {
372
+ const l = e.slice(0, 100).map((d) => Ke(d, t - 1, n));
373
+ return e.length > 100 && l.push(`… ${e.length - 100} more`), l;
374
+ }
375
+ const i = e, a = Object.keys(i), c = {};
376
+ for (const l of a.slice(0, 100)) {
377
+ const d = i[l];
378
+ typeof d == "undefined" || typeof d == "function" || (c[l] = Ke(d, t - 1, n));
379
+ }
380
+ return a.length > 100 && (c["…"] = `${a.length - 100} more`), c;
381
+ } finally {
382
+ n.delete(o);
383
+ }
384
+ }
385
+ function wr(e) {
386
+ if (e == null) return {
387
+ t: "null",
388
+ v: null
389
+ };
390
+ const t = typeof e;
391
+ return t === "string" ? {
392
+ t: "string",
393
+ v: K(e, nt)
394
+ } : t === "number" ? Number.isFinite(e) ? {
395
+ t: "number",
396
+ v: e
397
+ } : {
398
+ t: "string",
399
+ v: String(e)
400
+ } : t === "boolean" ? {
401
+ t: "bool",
402
+ v: e
403
+ } : t === "bigint" ? {
404
+ t: "string",
405
+ v: `${e.toString()}n`
406
+ } : t === "symbol" ? {
407
+ t: "string",
408
+ v: e.toString()
409
+ } : t === "function" ? {
410
+ t: "string",
411
+ v: "[Function]"
412
+ } : e instanceof Error ? {
413
+ t: "error",
414
+ v: Kt(e)
415
+ } : {
416
+ t: "json",
417
+ v: Ke(e, 4, /* @__PURE__ */ new Set())
418
+ };
419
+ }
420
+ function Oe(e) {
421
+ try {
422
+ var t;
423
+ const n = (t = JSON.stringify(e)) !== null && t !== void 0 ? t : "";
424
+ return typeof TextEncoder != "undefined" ? new TextEncoder().encode(n).length : n.length;
425
+ } catch {
426
+ return Number.POSITIVE_INFINITY;
427
+ }
428
+ }
429
+ function xr(e) {
430
+ if (Oe(e) <= 4096) return e;
431
+ let t = e.slice();
432
+ for (; t.length > 1 && Oe(t) > 4096; ) t = t.slice(0, -1);
433
+ return t.length === 1 && Oe(t) > 4096 ? [{
434
+ t: "string",
435
+ v: "[trace: console argument omitted (too large)]"
436
+ }] : t;
437
+ }
438
+ function Tt(e, t, n, r) {
439
+ const o = xr(t.map(wr));
223
440
  return {
224
441
  category: "console",
225
442
  level: e,
226
- message: oo(t),
227
- timestamp: o
443
+ message: yr(t),
444
+ timestamp: n,
445
+ ...o.length > 0 ? { args: o } : {},
446
+ ...r ? { source: r } : {}
228
447
  };
229
448
  }
230
- function no(e, t, o) {
231
- const n = X(e), i = X(t);
449
+ function kr(e, t, n) {
450
+ const r = K(H(e), Ye), o = K(H(t), Ye);
232
451
  return {
233
452
  category: "navigation",
234
- message: `${n} → ${i}`,
235
- timestamp: o,
453
+ message: `${r} → ${o}`,
454
+ timestamp: n,
236
455
  data: {
237
- from: n,
238
- to: i
456
+ from: r,
457
+ to: o
239
458
  }
240
459
  };
241
460
  }
242
- function it(e, t, o, n, i) {
243
- const r = X(o), s = n ? {
244
- method: t,
245
- url: r,
246
- status: n
247
- } : {
248
- method: t,
249
- url: r
250
- };
251
- return {
252
- category: e,
253
- message: `${t} ${r}${n ? ` [${n}]` : ""}`,
254
- timestamp: i,
255
- data: s
256
- };
461
+ function Ze(e) {
462
+ return typeof e != "number" || e <= 0 ? "network-error" : e >= 500 ? "http-5xx" : e >= 400 ? "http-4xx" : "ok";
257
463
  }
258
- function Ve(e, t, o, n) {
259
- return it("fetch", e, t, o, n);
464
+ function rt(e) {
465
+ if (typeof e == "string") return Er(e);
466
+ if (typeof Blob != "undefined" && e instanceof Blob) return e.size;
467
+ if (typeof ArrayBuffer != "undefined" && (e instanceof ArrayBuffer || ArrayBuffer.isView(e)))
468
+ return e.byteLength;
260
469
  }
261
- function ro(e, t, o, n) {
262
- return it("xhr", e, t, o, n);
470
+ function Er(e) {
471
+ try {
472
+ return typeof TextEncoder != "undefined" ? new TextEncoder().encode(e).length : e.length;
473
+ } catch {
474
+ return e.length;
475
+ }
476
+ }
477
+ function Zt(e) {
478
+ if (typeof e != "string") return;
479
+ const t = Number.parseInt(e, 10);
480
+ return Number.isFinite(t) && t >= 0 ? t : void 0;
263
481
  }
264
- function at(e) {
482
+ function Jt(e) {
483
+ var t;
484
+ if (typeof e != "string" || e.length === 0) return;
485
+ const n = (t = e.split(";")[0]) === null || t === void 0 ? void 0 : t.trim();
486
+ return n && n.length > 0 ? n : void 0;
487
+ }
488
+ function xe(e, t) {
489
+ const n = K(H(e.url), Ye), r = typeof e.status == "number" && e.status > 0, o = r ? ` → ${e.status}` : "", i = e.outcome !== "ok" ? ` (${e.outcome})` : "";
490
+ return {
491
+ category: e.api,
492
+ api: e.api,
493
+ method: e.method,
494
+ url: n,
495
+ message: `${e.method} ${n}${o}${i}`,
496
+ timestamp: t,
497
+ ...r ? { status: e.status } : {},
498
+ ...e.statusText ? { statusText: e.statusText } : {},
499
+ ...typeof e.durationMs == "number" ? { durationMs: e.durationMs } : {},
500
+ ...typeof e.reqSize == "number" ? { reqSize: e.reqSize } : {},
501
+ ...typeof e.respSize == "number" ? { respSize: e.respSize } : {},
502
+ ...e.contentType ? { contentType: e.contentType } : {},
503
+ outcome: e.outcome
504
+ };
505
+ }
506
+ function Qt(e) {
265
507
  try {
266
- return ot(e);
508
+ return Vt(e);
267
509
  } catch {
268
510
  return e.tagName ? e.tagName.toLowerCase() : "unknown";
269
511
  }
270
512
  }
271
- function io(e, t) {
272
- const o = at(e);
513
+ function Sr(e, t) {
514
+ const n = Qt(e);
273
515
  return {
274
516
  category: "ui.click",
275
- message: `click ${o}`,
517
+ message: `click ${n}`,
276
518
  timestamp: t,
277
- data: { target: o }
519
+ data: { target: n }
278
520
  };
279
521
  }
280
- function ao(e, t) {
281
- const o = at(e);
522
+ function Tr(e, t) {
523
+ const n = Qt(e);
282
524
  return {
283
525
  category: "ui.input",
284
- message: `input ${o}`,
526
+ message: `input ${n}`,
285
527
  timestamp: t,
286
- data: { target: o }
528
+ data: { target: n }
287
529
  };
288
530
  }
289
- function so(e) {
531
+ function Cr(e) {
290
532
  return e instanceof Error ? {
291
533
  name: e.name || "Error",
292
534
  message: e.message
@@ -295,208 +537,1213 @@ function so(e) {
295
537
  message: e
296
538
  } : {
297
539
  name: "Error",
298
- message: rt(e)
540
+ message: Yt(e)
299
541
  };
300
542
  }
301
- function lo(e, t) {
302
- const { name: o, message: n } = so(e);
303
- return {
543
+ function _r(e, t, n) {
544
+ const { name: r, message: o } = Cr(e), i = {
304
545
  category: "error",
305
546
  level: "error",
306
- message: n ? `${o}: ${n}` : o,
547
+ message: o ? `${r}: ${o}` : r,
307
548
  timestamp: t,
308
- data: { errorType: o }
549
+ data: { errorType: r }
309
550
  };
551
+ return n && n.length > 0 ? {
552
+ ...i,
553
+ causedBy: n
554
+ } : i;
555
+ }
556
+ function Ce() {
557
+ }
558
+ function Ar(e) {
559
+ var t, n;
560
+ let r;
561
+ const o = e.match(/^at\s+.+?\s+\((.+)\)$/);
562
+ if (o) r = o[1];
563
+ else {
564
+ const l = e.match(/^at\s+(.+)$/);
565
+ if (l) r = l[1];
566
+ else {
567
+ const d = e.indexOf("@");
568
+ d >= 0 && (r = e.slice(d + 1));
569
+ }
570
+ }
571
+ if (!r) return;
572
+ r = r.replace(/\?[^:]*/, "");
573
+ const i = (t = r.match(/^(.*):(\d+):\d+$/)) !== null && t !== void 0 ? t : r.match(/^(.*):(\d+)$/);
574
+ if (!i) return;
575
+ const a = (n = i[1]) !== null && n !== void 0 ? n : "", c = Number(i[2]);
576
+ if (!(!a || !Number.isFinite(c)))
577
+ return {
578
+ file: a,
579
+ line: c
580
+ };
310
581
  }
311
- function Te() {
582
+ function Lr(e, t = 0) {
583
+ if (typeof e != "string" || e.length === 0) return;
584
+ const n = [];
585
+ for (const r of e.split(`
586
+ `)) {
587
+ const o = Ar(r.trim());
588
+ o && n.push(o);
589
+ }
590
+ return n[t];
312
591
  }
313
- function co(e, t, o, n) {
314
- const i = [];
315
- for (const r of o) {
316
- const s = t[r];
317
- if (typeof s != "function") continue;
318
- const f = (...l) => {
592
+ var Nr = 1;
593
+ function Ir(e, t, n, r) {
594
+ const o = [];
595
+ for (const i of n) {
596
+ const a = t[i];
597
+ if (typeof a != "function") continue;
598
+ const c = pr(i), l = (...d) => {
599
+ let p;
600
+ if (c) try {
601
+ p = Lr((/* @__PURE__ */ new Error()).stack, Nr);
602
+ } catch {
603
+ p = void 0;
604
+ }
319
605
  try {
320
- r === "assert" ? l[0] || e.add(He("assert", l.slice(1), n())) : e.add(He(r, l, n()));
606
+ i === "assert" ? d[0] || e.add(Tt("assert", d.slice(1), r(), p)) : e.add(Tt(i, d, r(), p));
321
607
  } catch {
322
608
  }
323
- return s.apply(t, l);
609
+ return a.apply(t, d);
324
610
  };
325
- t[r] = f, i.push(() => {
326
- t[r] = s;
611
+ t[i] = l, o.push(() => {
612
+ t[i] = a;
327
613
  });
328
614
  }
329
615
  return () => {
330
- for (const r of i) r();
616
+ for (const i of o) i();
331
617
  };
332
618
  }
333
- function uo(e) {
619
+ function Rr(e) {
334
620
  return typeof e == "string" ? e : e instanceof URL ? e.toString() : e.url;
335
621
  }
336
- function fo(e, t) {
337
- var o, n;
338
- return ((o = (n = t == null ? void 0 : t.method) !== null && n !== void 0 ? n : typeof e == "object" && "method" in e ? e.method : void 0) !== null && o !== void 0 ? o : "GET").toUpperCase();
622
+ function Mr(e, t) {
623
+ var n, r;
624
+ return ((n = (r = t == null ? void 0 : t.method) !== null && r !== void 0 ? r : typeof e == "object" && "method" in e ? e.method : void 0) !== null && n !== void 0 ? n : "GET").toUpperCase();
339
625
  }
340
- function bo(e, t, o, n) {
626
+ function Ct(e, t) {
627
+ try {
628
+ var n, r, o;
629
+ return (n = (r = e.headers) === null || r === void 0 || (o = r.get) === null || o === void 0 ? void 0 : o.call(r, t)) !== null && n !== void 0 ? n : null;
630
+ } catch {
631
+ return null;
632
+ }
633
+ }
634
+ function Dr(e) {
635
+ return e.type === "opaque" || e.type === "opaqueredirect" ? "opaque-cors" : Ze(e.status);
636
+ }
637
+ function Pr(e) {
638
+ const t = typeof e == "object" && e !== null && "name" in e ? String(e.name) : "";
639
+ return t === "AbortError" ? "aborted" : t === "TimeoutError" ? "timeout" : "network-error";
640
+ }
641
+ function Br(e, t, n, r, o = Te) {
341
642
  const i = t.fetch;
342
- if (typeof i != "function") return Te;
343
- const r = (s, f) => {
344
- const l = uo(s), d = fo(s, f), h = i.call(t, s, f);
345
- return o(l) ? h : h.then((a) => {
643
+ if (typeof i != "function") return Ce;
644
+ const a = (c, l) => {
645
+ const d = Rr(c), p = Mr(c, l), s = rt(l == null ? void 0 : l.body), h = o(), f = i.call(t, c, l);
646
+ return n(d) ? f : f.then((b) => {
346
647
  try {
347
- e.add(Ve(d, l, a.status, n()));
648
+ e.add(xe({
649
+ api: "fetch",
650
+ method: p,
651
+ url: d,
652
+ status: b.status || void 0,
653
+ statusText: b.statusText || void 0,
654
+ durationMs: Math.max(0, o() - h),
655
+ reqSize: s,
656
+ respSize: Zt(Ct(b, "content-length")),
657
+ contentType: Jt(Ct(b, "content-type")),
658
+ outcome: Dr(b)
659
+ }, r()));
348
660
  } catch {
349
661
  }
350
- return a;
351
- }, (a) => {
662
+ return b;
663
+ }, (b) => {
352
664
  try {
353
- e.add(Ve(d, l, void 0, n()));
665
+ e.add(xe({
666
+ api: "fetch",
667
+ method: p,
668
+ url: d,
669
+ durationMs: Math.max(0, o() - h),
670
+ reqSize: s,
671
+ outcome: Pr(b)
672
+ }, r()));
354
673
  } catch {
355
674
  }
356
- throw a;
675
+ throw b;
357
676
  });
358
677
  };
359
- return t.fetch = r, () => {
678
+ return t.fetch = a, () => {
360
679
  t.fetch = i;
361
680
  };
362
681
  }
363
- function po(e, t, o, n) {
682
+ function _t(e, t) {
683
+ try {
684
+ return typeof e.getResponseHeader == "function" ? e.getResponseHeader(t) : null;
685
+ } catch {
686
+ return null;
687
+ }
688
+ }
689
+ function Ur(e) {
690
+ try {
691
+ return e.statusText || void 0;
692
+ } catch {
693
+ return;
694
+ }
695
+ }
696
+ function $r(e, t, n, r, o = Te) {
364
697
  const i = t.XMLHttpRequest;
365
- if (typeof i != "function") return Te;
366
- const r = i.prototype, s = r.open, f = r.send;
367
- return r.open = function(l, d, ...h) {
698
+ if (typeof i != "function") return Ce;
699
+ const a = i.prototype, c = a.open, l = a.send;
700
+ return a.open = function(d, p, ...s) {
368
701
  return this.__fixbackMeta = {
369
- method: String(l).toUpperCase(),
370
- url: String(d)
371
- }, s.call(this, l, d, ...h);
372
- }, r.send = function(l) {
373
- const d = this.__fixbackMeta;
374
- if (d && !o(d.url)) {
375
- const h = () => {
702
+ method: String(d).toUpperCase(),
703
+ url: String(p)
704
+ }, c.call(this, d, p, ...s);
705
+ }, a.send = function(d) {
706
+ const p = this.__fixbackMeta;
707
+ if (p && !n(p.url)) {
708
+ const s = o(), h = rt(d);
709
+ let f;
710
+ const b = () => {
711
+ f = Ze(this.status || void 0);
712
+ }, m = () => {
713
+ f = "network-error";
714
+ }, u = () => {
715
+ f = "timeout";
716
+ }, y = () => {
717
+ f = "aborted";
718
+ }, g = () => {
376
719
  try {
377
- e.add(ro(d.method, d.url, this.status || void 0, n()));
720
+ var v;
721
+ e.add(xe({
722
+ api: "xhr",
723
+ method: p.method,
724
+ url: p.url,
725
+ status: this.status || void 0,
726
+ statusText: Ur(this),
727
+ durationMs: Math.max(0, o() - s),
728
+ reqSize: h,
729
+ respSize: Zt(_t(this, "content-length")),
730
+ contentType: Jt(_t(this, "content-type")),
731
+ outcome: (v = f) !== null && v !== void 0 ? v : Ze(this.status || void 0)
732
+ }, r()));
378
733
  } catch {
379
734
  }
380
- this.removeEventListener("loadend", h);
735
+ this.removeEventListener("load", b), this.removeEventListener("error", m), this.removeEventListener("timeout", u), this.removeEventListener("abort", y), this.removeEventListener("loadend", g);
381
736
  };
382
- this.addEventListener("loadend", h);
737
+ this.addEventListener("load", b), this.addEventListener("error", m), this.addEventListener("timeout", u), this.addEventListener("abort", y), this.addEventListener("loadend", g);
383
738
  }
384
- return f.call(this, l);
739
+ return l.call(this, d);
385
740
  }, () => {
386
- r.open = s, r.send = f;
741
+ a.open = c, a.send = l;
387
742
  };
388
743
  }
389
- function ho(e, t, o) {
390
- const n = t.history, i = t.location;
391
- if (!n || !i) return Te;
392
- let r = i.href;
393
- const s = (a) => {
744
+ function Fr(e, t, n, r) {
745
+ const o = t.navigator;
746
+ if (!o || typeof o.sendBeacon != "function") return Ce;
747
+ const i = o.sendBeacon, a = (l, d, p) => {
748
+ if (!n(l))
749
+ try {
750
+ e.add(xe({
751
+ api: "beacon",
752
+ method: "POST",
753
+ url: l,
754
+ reqSize: rt(d),
755
+ outcome: p
756
+ }, r()));
757
+ } catch {
758
+ }
759
+ }, c = function(l, d) {
760
+ const p = typeof l == "string" ? l : String(l);
761
+ let s;
762
+ try {
763
+ s = i.call(o, l, d);
764
+ } catch (h) {
765
+ throw a(p, d, "network-error"), h;
766
+ }
767
+ return a(p, d, s ? "ok" : "network-error"), s;
768
+ };
769
+ return o.sendBeacon = c, () => {
770
+ o.sendBeacon = i;
771
+ };
772
+ }
773
+ function Or(e, t, n) {
774
+ const r = t.history, o = t.location;
775
+ if (!r || !o) return Ce;
776
+ let i = o.href;
777
+ const a = (s) => {
394
778
  try {
395
- e.add(no(r, a, o()));
779
+ e.add(kr(i, s, n()));
396
780
  } catch {
397
781
  }
398
- r = a;
399
- }, f = n.pushState, l = n.replaceState;
400
- n.pushState = function(a, b, u) {
401
- const m = f.call(this, a, b, u);
402
- return s(i.href), m;
403
- }, n.replaceState = function(a, b, u) {
404
- const m = l.call(this, a, b, u);
405
- return s(i.href), m;
782
+ i = s;
783
+ }, c = r.pushState, l = r.replaceState;
784
+ r.pushState = function(s, h, f) {
785
+ const b = c.call(this, s, h, f);
786
+ return a(o.href), b;
787
+ }, r.replaceState = function(s, h, f) {
788
+ const b = l.call(this, s, h, f);
789
+ return a(o.href), b;
406
790
  };
407
- const d = () => s(i.href), h = () => s(i.href);
408
- return t.addEventListener("popstate", d), t.addEventListener("hashchange", h), () => {
409
- n.pushState = f, n.replaceState = l, t.removeEventListener("popstate", d), t.removeEventListener("hashchange", h);
791
+ const d = () => a(o.href), p = () => a(o.href);
792
+ return t.addEventListener("popstate", d), t.addEventListener("hashchange", p), () => {
793
+ r.pushState = c, r.replaceState = l, t.removeEventListener("popstate", d), t.removeEventListener("hashchange", p);
410
794
  };
411
795
  }
412
- function Xe(e) {
796
+ function At(e) {
413
797
  var t;
414
- const o = (t = (typeof e.composedPath == "function" ? e.composedPath() : [])[0]) !== null && t !== void 0 ? t : e.target;
415
- return o instanceof Element ? o : null;
798
+ const n = (t = (typeof e.composedPath == "function" ? e.composedPath() : [])[0]) !== null && t !== void 0 ? t : e.target;
799
+ return n instanceof Element ? n : null;
416
800
  }
417
- function vo(e, t, o) {
418
- const n = (r) => {
419
- const s = Xe(r);
420
- if (!(!s || _e(s)))
801
+ function zr(e, t, n) {
802
+ const r = (i) => {
803
+ const a = At(i);
804
+ if (!(!a || Ge(a)))
421
805
  try {
422
- e.add(io(s, o()));
806
+ e.add(Sr(a, n()));
423
807
  } catch {
424
808
  }
425
- }, i = (r) => {
426
- const s = Xe(r);
427
- if (!(!s || _e(s)))
809
+ }, o = (i) => {
810
+ const a = At(i);
811
+ if (!(!a || Ge(a)))
428
812
  try {
429
- e.add(ao(s, o()));
813
+ e.add(Tr(a, n()));
430
814
  } catch {
431
815
  }
432
816
  };
433
- return t.addEventListener("click", n, !0), t.addEventListener("input", i, !0), () => {
434
- t.removeEventListener("click", n, !0), t.removeEventListener("input", i, !0);
817
+ return t.addEventListener("click", r, !0), t.addEventListener("input", o, !0), () => {
818
+ t.removeEventListener("click", r, !0), t.removeEventListener("input", o, !0);
435
819
  };
436
820
  }
437
- function mo(e, t = {}) {
438
- var o, n, i, r, s, f;
439
- const l = (o = t.win) !== null && o !== void 0 ? o : globalThis, d = (n = t.doc) !== null && n !== void 0 ? n : typeof document != "undefined" ? document : void 0, h = (i = t.consoleObj) !== null && i !== void 0 ? i : typeof console != "undefined" ? console : void 0, a = (r = t.consoleLevels) !== null && r !== void 0 ? r : Qt, b = (s = t.ignoreUrl) !== null && s !== void 0 ? s : (() => !1), u = (f = t.now) !== null && f !== void 0 ? f : Date.now, m = [];
440
- return h && m.push(co(e, h, a, u)), l && (m.push(bo(e, l, b, u)), m.push(po(e, l, b, u)), m.push(ho(e, l, u))), d && m.push(vo(e, d, u)), () => {
441
- for (const p of m) try {
442
- p();
821
+ function jr(e, t = {}) {
822
+ var n, r, o, i, a, c, l;
823
+ const d = (n = t.win) !== null && n !== void 0 ? n : globalThis, p = (r = t.doc) !== null && r !== void 0 ? r : typeof document != "undefined" ? document : void 0, s = (o = t.consoleObj) !== null && o !== void 0 ? o : typeof console != "undefined" ? console : void 0, h = (i = t.consoleLevels) !== null && i !== void 0 ? i : ur, f = (a = t.ignoreUrl) !== null && a !== void 0 ? a : (() => !1), b = (c = t.now) !== null && c !== void 0 ? c : Date.now, m = (l = t.mono) !== null && l !== void 0 ? l : Te, u = t.captureConsole !== !1, y = t.captureNetwork !== !1, g = [];
824
+ return s && u && g.push(Ir(e, s, h, b)), d && (y && (g.push(Br(e, d, f, b, m)), g.push($r(e, d, f, b, m)), g.push(Fr(e, d, f, b))), g.push(Or(e, d, b))), p && g.push(zr(e, p, b)), () => {
825
+ for (const v of g) try {
826
+ v();
443
827
  } catch {
444
828
  }
445
829
  };
446
830
  }
447
- var go = "#e5484d";
448
- function Ge(e, t, o, n) {
831
+ var Hr = "#e5484d";
832
+ function Lt(e, t, n, r) {
449
833
  return {
450
- x: Math.round(Math.min(e, o)),
451
- y: Math.round(Math.min(t, n)),
452
- width: Math.round(Math.abs(o - e)),
453
- height: Math.round(Math.abs(n - t))
834
+ x: Math.round(Math.min(e, n)),
835
+ y: Math.round(Math.min(t, r)),
836
+ width: Math.round(Math.abs(n - e)),
837
+ height: Math.round(Math.abs(r - t))
454
838
  };
455
839
  }
456
- function xo(e, t, o, n, i = 14) {
457
- const r = Math.atan2(n - t, o - e);
840
+ function Vr(e, t, n, r, o = 14) {
841
+ const i = Math.atan2(r - t, n - e);
458
842
  return [
459
843
  {
460
- x: o,
461
- y: n
844
+ x: n,
845
+ y: r
462
846
  },
463
847
  {
464
- x: o - i * Math.cos(r - Math.PI / 6),
465
- y: n - i * Math.sin(r - Math.PI / 6)
848
+ x: n - o * Math.cos(i - Math.PI / 6),
849
+ y: r - o * Math.sin(i - Math.PI / 6)
466
850
  },
467
851
  {
468
- x: o - i * Math.cos(r + Math.PI / 6),
469
- y: n - i * Math.sin(r + Math.PI / 6)
852
+ x: n - o * Math.cos(i + Math.PI / 6),
853
+ y: r - o * Math.sin(i + Math.PI / 6)
470
854
  }
471
855
  ];
472
856
  }
473
- function yo(e) {
857
+ function Xr(e) {
474
858
  const t = {};
475
859
  return e.element && (t.element = e.element), e.region && (t.region = e.region), e.marks && e.marks.length > 0 && (t.marks = e.marks.slice()), Object.keys(t).length > 0 ? t : void 0;
476
860
  }
477
- function st(e, t) {
478
- var o;
479
- const n = {}, i = e.innerWidth;
480
- typeof i == "number" && i > 0 && (n.viewportWidth = Math.round(i));
481
- const r = e.innerHeight;
482
- typeof r == "number" && r > 0 && (n.viewportHeight = Math.round(r));
483
- const s = (o = e.navigator) === null || o === void 0 ? void 0 : o.userAgent;
484
- return typeof s == "string" && s.length > 0 && (n.browser = s), t.length > 0 && (n.sdkVersion = t), n;
485
- }
486
- function lt(e) {
861
+ function en(e, t) {
862
+ var n;
863
+ const r = {}, o = e.innerWidth;
864
+ typeof o == "number" && o > 0 && (r.viewportWidth = Math.round(o));
865
+ const i = e.innerHeight;
866
+ typeof i == "number" && i > 0 && (r.viewportHeight = Math.round(i));
867
+ const a = (n = e.navigator) === null || n === void 0 ? void 0 : n.userAgent;
868
+ return typeof a == "string" && a.length > 0 && (r.browser = a), t.length > 0 && (r.sdkVersion = t), r;
869
+ }
870
+ function tn(e) {
487
871
  var t;
488
- const o = {};
489
- e.kind && (o.kind = e.kind);
490
- const n = (t = e.comment) === null || t === void 0 ? void 0 : t.trim();
491
- n && (o.comment = n), e.url && (o.url = e.url), e.environment && Object.keys(e.environment).length > 0 && (o.environment = e.environment);
492
- const i = yo({
872
+ const n = {};
873
+ e.kind && (n.kind = e.kind);
874
+ const r = (t = e.comment) === null || t === void 0 ? void 0 : t.trim();
875
+ r && (n.comment = r), e.url && (n.url = e.url), e.environment && Object.keys(e.environment).length > 0 && (n.environment = e.environment);
876
+ const o = Xr({
493
877
  element: e.element,
494
878
  region: e.region,
495
879
  marks: e.marks
496
880
  });
497
- return i && (o.annotation = i), e.trace && e.trace.length > 0 && (o.trace = e.trace), o;
881
+ return o && (n.annotation = o), e.trace && e.trace.length > 0 && (n.trace = e.trace), n;
882
+ }
883
+ var ze;
884
+ function qr(e, t) {
885
+ return e[13] = 1, e[14] = t >> 8, e[15] = t & 255, e[16] = t >> 8, e[17] = t & 255, e;
886
+ }
887
+ var nn = 112, rn = 72, on = 89, an = 115, je;
888
+ function Gr() {
889
+ const e = /* @__PURE__ */ new Int32Array(256);
890
+ for (let t = 0; t < 256; t++) {
891
+ let n = t;
892
+ for (let r = 0; r < 8; r++) n = n & 1 ? 3988292384 ^ n >>> 1 : n >>> 1;
893
+ e[t] = n;
894
+ }
895
+ return e;
896
+ }
897
+ function Wr(e) {
898
+ let t = -1;
899
+ je || (je = Gr());
900
+ for (let n = 0; n < e.length; n++) t = je[(t ^ e[n]) & 255] ^ t >>> 8;
901
+ return t ^ -1;
902
+ }
903
+ function Yr(e) {
904
+ const t = e.length - 1;
905
+ for (let n = t; n >= 4; n--) if (e[n - 4] === 9 && e[n - 3] === nn && e[n - 2] === rn && e[n - 1] === on && e[n] === an) return n - 3;
906
+ return 0;
907
+ }
908
+ function Kr(e, t, n = !1) {
909
+ const r = /* @__PURE__ */ new Uint8Array(13);
910
+ t *= 39.3701, r[0] = nn, r[1] = rn, r[2] = on, r[3] = an, r[4] = t >>> 24, r[5] = t >>> 16, r[6] = t >>> 8, r[7] = t & 255, r[8] = r[4], r[9] = r[5], r[10] = r[6], r[11] = r[7], r[12] = 1;
911
+ const o = Wr(r), i = /* @__PURE__ */ new Uint8Array(4);
912
+ if (i[0] = o >>> 24, i[1] = o >>> 16, i[2] = o >>> 8, i[3] = o & 255, n) {
913
+ const a = Yr(e);
914
+ return e.set(r, a), e.set(i, a + 13), e;
915
+ } else {
916
+ const a = /* @__PURE__ */ new Uint8Array(4);
917
+ a[0] = 0, a[1] = 0, a[2] = 0, a[3] = 9;
918
+ const c = /* @__PURE__ */ new Uint8Array(54);
919
+ return c.set(e, 0), c.set(a, 33), c.set(r, 37), c.set(i, 50), c;
920
+ }
921
+ }
922
+ var sn = "[modern-screenshot]", G = typeof window != "undefined", Zr = G && "Worker" in window, Jr = G && "atob" in window, Ba = G && "btoa" in window, ot = G ? (ze = window.navigator) === null || ze === void 0 ? void 0 : ze.userAgent : "", ln = ot.includes("Chrome"), ke = ot.includes("AppleWebKit") && !ln, it = ot.includes("Firefox"), Qr = (e) => e && "__CONTEXT__" in e, eo = (e) => e.constructor.name === "CSSFontFaceRule", to = (e) => e.constructor.name === "CSSImportRule", no = (e) => e.constructor.name === "CSSLayerBlockRule", z = (e) => e.nodeType === 1, be = (e) => typeof e.className == "object", cn = (e) => e.tagName === "image", ro = (e) => e.tagName === "use", ue = (e) => z(e) && typeof e.style != "undefined" && !be(e), oo = (e) => e.nodeType === 8, io = (e) => e.nodeType === 3, re = (e) => e.tagName === "IMG", _e = (e) => e.tagName === "VIDEO", ao = (e) => e.tagName === "CANVAS", so = (e) => e.tagName === "TEXTAREA", lo = (e) => e.tagName === "INPUT", co = (e) => e.tagName === "STYLE", uo = (e) => e.tagName === "SCRIPT", fo = (e) => e.tagName === "SELECT", po = (e) => e.tagName === "SLOT", bo = (e) => e.tagName === "IFRAME", ho = (...e) => console.warn(sn, ...e);
923
+ function mo(e) {
924
+ var t;
925
+ const n = e == null || (t = e.createElement) === null || t === void 0 ? void 0 : t.call(e, "canvas");
926
+ return n && (n.height = n.width = 1), !!n && "toDataURL" in n && !!n.toDataURL("image/webp").includes("image/webp");
927
+ }
928
+ var Je = (e) => e.startsWith("data:");
929
+ function un(e, t) {
930
+ if (e.match(/^[a-z]+:\/\//i)) return e;
931
+ if (G && e.match(/^\/\//)) return window.location.protocol + e;
932
+ if (e.match(/^[a-z]+:/i) || !G) return e;
933
+ const n = Ae().implementation.createHTMLDocument(), r = n.createElement("base"), o = n.createElement("a");
934
+ return n.head.appendChild(r), n.body.appendChild(o), t && (r.href = t), o.href = e, o.href;
935
+ }
936
+ function Ae(e) {
937
+ var t;
938
+ return (t = e && z(e) ? e == null ? void 0 : e.ownerDocument : e) !== null && t !== void 0 ? t : window.document;
939
+ }
940
+ var Le = "http://www.w3.org/2000/svg";
941
+ function vo(e, t, n) {
942
+ const r = Ae(n).createElementNS(Le, "svg");
943
+ return r.setAttributeNS(null, "width", e.toString()), r.setAttributeNS(null, "height", t.toString()), r.setAttributeNS(null, "viewBox", `0 0 ${e} ${t}`), r;
944
+ }
945
+ function go(e, t) {
946
+ let n = new XMLSerializer().serializeToString(e);
947
+ return t && (n = n.replace(/[\u0000-\u0008\v\f\u000E-\u001F\uD800-\uDFFF\uFFFE\uFFFF]/gu, "")), `data:image/svg+xml;charset=utf-8,${encodeURIComponent(n)}`;
948
+ }
949
+ async function yo(e, t = "image/png", n = 1) {
950
+ try {
951
+ return await new Promise((r, o) => {
952
+ e.toBlob((i) => {
953
+ i ? r(i) : o(/* @__PURE__ */ new Error("Blob is null"));
954
+ }, t, n);
955
+ });
956
+ } catch (r) {
957
+ if (Jr) return wo(e.toDataURL(t, n));
958
+ throw r;
959
+ }
960
+ }
961
+ function wo(e) {
962
+ var t, n;
963
+ const [r, o] = e.split(","), i = (t = (n = r.match(/data:(.+);/)) === null || n === void 0 ? void 0 : n[1]) !== null && t !== void 0 ? t : void 0, a = window.atob(o), c = a.length, l = new Uint8Array(c);
964
+ for (let d = 0; d < c; d += 1) l[d] = a.charCodeAt(d);
965
+ return new Blob([l], { type: i });
966
+ }
967
+ function dn(e, t) {
968
+ return new Promise((n, r) => {
969
+ const o = new FileReader();
970
+ o.onload = () => n(o.result), o.onerror = () => r(o.error), o.onabort = () => r(/* @__PURE__ */ new Error(`Failed read blob to ${t}`)), t === "dataUrl" ? o.readAsDataURL(e) : t === "arrayBuffer" && o.readAsArrayBuffer(e);
971
+ });
972
+ }
973
+ var xo = (e) => dn(e, "dataUrl"), ko = (e) => dn(e, "arrayBuffer");
974
+ function ne(e, t) {
975
+ const n = Ae(t).createElement("img");
976
+ return n.decoding = "sync", n.loading = "eager", n.src = e, n;
977
+ }
978
+ function de(e, t) {
979
+ return new Promise((n) => {
980
+ const { timeout: r, ownerDocument: o, onError: i, onWarn: a } = t != null ? t : {}, c = typeof e == "string" ? ne(e, Ae(o)) : e;
981
+ let l = null, d = null;
982
+ function p() {
983
+ n(c), l && clearTimeout(l), d == null || d();
984
+ }
985
+ if (r && (l = setTimeout(p, r)), _e(c)) {
986
+ const s = c.currentSrc || c.src;
987
+ if (!s)
988
+ return c.poster ? de(c.poster, t).then(n) : p();
989
+ if (c.readyState >= 2) return p();
990
+ const h = p, f = (b) => {
991
+ a == null || a("Failed video load", s, b), i == null || i(b), p();
992
+ };
993
+ d = () => {
994
+ c.removeEventListener("loadeddata", h), c.removeEventListener("error", f);
995
+ }, c.addEventListener("loadeddata", h, { once: !0 }), c.addEventListener("error", f, { once: !0 });
996
+ } else {
997
+ const s = cn(c) ? c.href.baseVal : c.currentSrc || c.src;
998
+ if (!s) return p();
999
+ const h = async () => {
1000
+ if (re(c) && "decode" in c) try {
1001
+ await c.decode();
1002
+ } catch (b) {
1003
+ a == null || a("Failed to decode image, trying to render anyway", c.dataset.originalSrc || s, b);
1004
+ }
1005
+ p();
1006
+ }, f = (b) => {
1007
+ a == null || a("Failed image load", c.dataset.originalSrc || s, b), p();
1008
+ };
1009
+ if (re(c) && c.complete) return h();
1010
+ d = () => {
1011
+ c.removeEventListener("load", h), c.removeEventListener("error", f);
1012
+ }, c.addEventListener("load", h, { once: !0 }), c.addEventListener("error", f, { once: !0 });
1013
+ }
1014
+ });
1015
+ }
1016
+ async function Eo(e, t) {
1017
+ ue(e) && (re(e) || _e(e) ? await de(e, t) : await Promise.all(["img", "video"].flatMap((n) => Array.from(e.querySelectorAll(n)).map((r) => de(r, t)))));
1018
+ }
1019
+ var fn = /* @__PURE__ */ (function() {
1020
+ let t = 0;
1021
+ const n = () => `0000${(Math.random() * 36 ** 4 << 0).toString(36)}`.slice(-4);
1022
+ return () => (t += 1, `u${n()}${t}`);
1023
+ })();
1024
+ function pn(e) {
1025
+ return e == null ? void 0 : e.split(",").map((t) => t.trim().replace(/"|'/g, "").toLowerCase()).filter(Boolean);
1026
+ }
1027
+ var Nt = 0;
1028
+ function So(e) {
1029
+ const t = `${sn}[#${Nt}]`;
1030
+ return Nt++, {
1031
+ time: (n) => e && console.time(`${t} ${n}`),
1032
+ timeEnd: (n) => e && console.timeEnd(`${t} ${n}`),
1033
+ warn: (...n) => e && ho(...n)
1034
+ };
1035
+ }
1036
+ function To(e) {
1037
+ return { cache: e ? "no-cache" : "force-cache" };
1038
+ }
1039
+ async function at(e, t) {
1040
+ return Qr(e) ? e : Co(e, {
1041
+ ...t,
1042
+ autoDestruct: !0
1043
+ });
1044
+ }
1045
+ async function Co(e, t) {
1046
+ var n, r, o, i, a;
1047
+ const { scale: c = 1, workerUrl: l, workerNumber: d = 1 } = t || {}, p = !!(t != null && t.debug), s = (n = t == null ? void 0 : t.features) !== null && n !== void 0 ? n : !0, h = (r = e.ownerDocument) !== null && r !== void 0 ? r : G ? window.document : void 0, f = (o = (i = e.ownerDocument) === null || i === void 0 ? void 0 : i.defaultView) !== null && o !== void 0 ? o : G ? window : void 0, b = /* @__PURE__ */ new Map(), m = {
1048
+ width: 0,
1049
+ height: 0,
1050
+ quality: 1,
1051
+ type: "image/png",
1052
+ scale: c,
1053
+ backgroundColor: null,
1054
+ style: null,
1055
+ filter: null,
1056
+ maximumCanvasSize: 0,
1057
+ timeout: 3e4,
1058
+ progress: null,
1059
+ debug: p,
1060
+ fetch: {
1061
+ requestInit: To(t == null || (a = t.fetch) === null || a === void 0 ? void 0 : a.bypassingCache),
1062
+ placeholderImage: "data:image/png;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",
1063
+ bypassingCache: !1,
1064
+ ...t == null ? void 0 : t.fetch
1065
+ },
1066
+ fetchFn: null,
1067
+ font: {},
1068
+ drawImageInterval: 100,
1069
+ workerUrl: null,
1070
+ workerNumber: d,
1071
+ onCloneEachNode: null,
1072
+ onCloneNode: null,
1073
+ onEmbedNode: null,
1074
+ onCreateForeignObjectSvg: null,
1075
+ includeStyleProperties: null,
1076
+ autoDestruct: !1,
1077
+ ...t,
1078
+ __CONTEXT__: !0,
1079
+ log: So(p),
1080
+ node: e,
1081
+ ownerDocument: h,
1082
+ ownerWindow: f,
1083
+ dpi: c === 1 ? null : 96 * c,
1084
+ svgStyleElement: bn(h),
1085
+ svgDefsElement: h == null ? void 0 : h.createElementNS(Le, "defs"),
1086
+ svgStyles: /* @__PURE__ */ new Map(),
1087
+ defaultComputedStyles: /* @__PURE__ */ new Map(),
1088
+ workers: [...Array.from({ length: Zr && l && d ? d : 0 })].map(() => {
1089
+ try {
1090
+ const g = new Worker(l);
1091
+ return g.onmessage = async (v) => {
1092
+ const { url: w, result: S } = v.data;
1093
+ if (S) {
1094
+ var k, N;
1095
+ (k = b.get(w)) === null || k === void 0 || (N = k.resolve) === null || N === void 0 || N.call(k, S);
1096
+ } else {
1097
+ var T, B;
1098
+ (T = b.get(w)) === null || T === void 0 || (B = T.reject) === null || B === void 0 || B.call(T, /* @__PURE__ */ new Error(`Error receiving message from worker: ${w}`));
1099
+ }
1100
+ }, g.onmessageerror = (v) => {
1101
+ var w, S;
1102
+ const { url: k } = v.data;
1103
+ (w = b.get(k)) === null || w === void 0 || (S = w.reject) === null || S === void 0 || S.call(w, /* @__PURE__ */ new Error(`Error receiving message from worker: ${k}`));
1104
+ }, g;
1105
+ } catch (g) {
1106
+ return m.log.warn("Failed to new Worker", g), null;
1107
+ }
1108
+ }).filter(Boolean),
1109
+ fontFamilies: /* @__PURE__ */ new Map(),
1110
+ fontCssTexts: /* @__PURE__ */ new Map(),
1111
+ acceptOfImage: `${[
1112
+ mo(h) && "image/webp",
1113
+ "image/svg+xml",
1114
+ "image/*",
1115
+ "*/*"
1116
+ ].filter(Boolean).join(",")};q=0.8`,
1117
+ requests: b,
1118
+ drawImageCount: 0,
1119
+ tasks: [],
1120
+ features: s,
1121
+ isEnable: (g) => {
1122
+ var v;
1123
+ if (g === "restoreScrollPosition") {
1124
+ var w;
1125
+ return typeof s == "boolean" ? !1 : (w = s[g]) !== null && w !== void 0 ? w : !1;
1126
+ }
1127
+ return typeof s == "boolean" ? s : (v = s[g]) !== null && v !== void 0 ? v : !0;
1128
+ },
1129
+ shadowRoots: []
1130
+ };
1131
+ m.log.time("wait until load"), await Eo(e, {
1132
+ timeout: m.timeout,
1133
+ onWarn: m.log.warn
1134
+ }), m.log.timeEnd("wait until load");
1135
+ const { width: u, height: y } = _o(e, m);
1136
+ return m.width = u, m.height = y, m;
1137
+ }
1138
+ function bn(e) {
1139
+ if (!e) return;
1140
+ const t = e.createElement("style"), n = t.ownerDocument.createTextNode(`
1141
+ .______background-clip--text {
1142
+ background-clip: text;
1143
+ -webkit-background-clip: text;
1144
+ }
1145
+ `);
1146
+ return t.appendChild(n), t;
1147
+ }
1148
+ function _o(e, t) {
1149
+ let { width: n, height: r } = t;
1150
+ if (z(e) && (!n || !r)) {
1151
+ const o = e.getBoundingClientRect();
1152
+ n = n || o.width || Number(e.getAttribute("width")) || 0, r = r || o.height || Number(e.getAttribute("height")) || 0;
1153
+ }
1154
+ return {
1155
+ width: n,
1156
+ height: r
1157
+ };
1158
+ }
1159
+ async function Ao(e, t) {
1160
+ const { log: n, timeout: r, drawImageCount: o, drawImageInterval: i } = t;
1161
+ n.time("image to canvas");
1162
+ const a = await de(e, {
1163
+ timeout: r,
1164
+ onWarn: t.log.warn
1165
+ }), { canvas: c, context2d: l } = Lo(e.ownerDocument, t), d = () => {
1166
+ try {
1167
+ l == null || l.drawImage(a, 0, 0, c.width, c.height);
1168
+ } catch (p) {
1169
+ t.log.warn("Failed to drawImage", p);
1170
+ }
1171
+ };
1172
+ if (d(), t.isEnable("fixSvgXmlDecode")) for (let p = 0; p < o; p++) await new Promise((s) => {
1173
+ setTimeout(() => {
1174
+ l == null || l.clearRect(0, 0, c.width, c.height), d(), s();
1175
+ }, p + i);
1176
+ });
1177
+ return t.drawImageCount = 0, n.timeEnd("image to canvas"), c;
1178
+ }
1179
+ function Lo(e, t) {
1180
+ const { width: n, height: r, scale: o, backgroundColor: i, maximumCanvasSize: a } = t, c = e.createElement("canvas");
1181
+ c.width = Math.floor(n * o), c.height = Math.floor(r * o), c.style.width = `${n}px`, c.style.height = `${r}px`, a && (c.width > a || c.height > a) && (c.width > a && c.height > a ? c.width > c.height ? (c.height *= a / c.width, c.width = a) : (c.width *= a / c.height, c.height = a) : c.width > a ? (c.height *= a / c.width, c.width = a) : (c.width *= a / c.height, c.height = a));
1182
+ const l = c.getContext("2d");
1183
+ return l && i && (l.fillStyle = i, l.fillRect(0, 0, c.width, c.height)), {
1184
+ canvas: c,
1185
+ context2d: l
1186
+ };
1187
+ }
1188
+ function hn(e, t) {
1189
+ if (e.ownerDocument) try {
1190
+ const i = e.toDataURL();
1191
+ if (i !== "data:,") return ne(i, e.ownerDocument);
1192
+ } catch (i) {
1193
+ t.log.warn("Failed to clone canvas", i);
1194
+ }
1195
+ const n = e.cloneNode(!1), r = e.getContext("2d"), o = n.getContext("2d");
1196
+ try {
1197
+ return r && o && o.putImageData(r.getImageData(0, 0, e.width, e.height), 0, 0), n;
1198
+ } catch (i) {
1199
+ t.log.warn("Failed to clone canvas", i);
1200
+ }
1201
+ return n;
1202
+ }
1203
+ function No(e, t) {
1204
+ try {
1205
+ var n;
1206
+ if (!(e == null || (n = e.contentDocument) === null || n === void 0) && n.documentElement) return st(e.contentDocument.documentElement, t);
1207
+ } catch (r) {
1208
+ t.log.warn("Failed to clone iframe", r);
1209
+ }
1210
+ return e.cloneNode(!1);
1211
+ }
1212
+ function Io(e) {
1213
+ const t = e.cloneNode(!1);
1214
+ return e.currentSrc && e.currentSrc !== e.src && (t.src = e.currentSrc, t.srcset = ""), t.loading === "lazy" && (t.loading = "eager"), t;
1215
+ }
1216
+ async function Ro(e, t) {
1217
+ if (e.ownerDocument && !e.currentSrc && e.poster) return ne(e.poster, e.ownerDocument);
1218
+ const n = e.cloneNode(!1);
1219
+ n.crossOrigin = "anonymous", e.currentSrc && e.currentSrc !== e.src && (n.src = e.currentSrc);
1220
+ const r = n.ownerDocument;
1221
+ if (r) {
1222
+ let o = !0;
1223
+ if (await de(n, {
1224
+ onError: () => o = !1,
1225
+ onWarn: t.log.warn
1226
+ }), !o)
1227
+ return e.poster ? ne(e.poster, e.ownerDocument) : n;
1228
+ n.currentTime = e.currentTime, await new Promise((a) => {
1229
+ n.addEventListener("seeked", a, { once: !0 });
1230
+ });
1231
+ const i = r.createElement("canvas");
1232
+ i.width = e.offsetWidth, i.height = e.offsetHeight;
1233
+ try {
1234
+ const a = i.getContext("2d");
1235
+ a && a.drawImage(n, 0, 0, i.width, i.height);
1236
+ } catch (a) {
1237
+ return t.log.warn("Failed to clone video", a), e.poster ? ne(e.poster, e.ownerDocument) : n;
1238
+ }
1239
+ return hn(i, t);
1240
+ }
1241
+ return n;
1242
+ }
1243
+ function Mo(e, t) {
1244
+ return ao(e) ? hn(e, t) : bo(e) ? No(e, t) : re(e) ? Io(e) : _e(e) ? Ro(e, t) : e.cloneNode(!1);
1245
+ }
1246
+ function Do(e) {
1247
+ let t = e.sandbox;
1248
+ if (!t) {
1249
+ const { ownerDocument: n } = e;
1250
+ try {
1251
+ n && (t = n.createElement("iframe"), t.id = `__SANDBOX__${fn()}`, t.width = "0", t.height = "0", t.style.visibility = "hidden", t.style.position = "fixed", n.body.appendChild(t), t.srcdoc = '<!DOCTYPE html><meta charset="UTF-8"><title></title><body>', e.sandbox = t);
1252
+ } catch (r) {
1253
+ e.log.warn("Failed to getSandBox", r);
1254
+ }
1255
+ }
1256
+ return t;
498
1257
  }
499
- var wo = 32, ko = /* @__PURE__ */ new Set([
1258
+ var Po = [
1259
+ "width",
1260
+ "height",
1261
+ "-webkit-text-fill-color"
1262
+ ], Bo = ["stroke", "fill"];
1263
+ function mn(e, t, n) {
1264
+ const { defaultComputedStyles: r } = n, o = e.nodeName.toLowerCase(), i = be(e) && o !== "svg", a = i ? Bo.map((m) => [m, e.getAttribute(m)]).filter(([, m]) => m !== null) : [], c = [
1265
+ i && "svg",
1266
+ o,
1267
+ a.map((m, u) => `${m}=${u}`).join(","),
1268
+ t
1269
+ ].filter(Boolean).join(":");
1270
+ if (r.has(c)) return r.get(c);
1271
+ const l = Do(n), d = l == null ? void 0 : l.contentWindow;
1272
+ if (!d) return /* @__PURE__ */ new Map();
1273
+ const p = d == null ? void 0 : d.document;
1274
+ let s, h;
1275
+ i ? (s = p.createElementNS(Le, "svg"), h = s.ownerDocument.createElementNS(s.namespaceURI, o), a.forEach(([m, u]) => {
1276
+ h.setAttributeNS(null, m, u);
1277
+ }), s.appendChild(h)) : s = h = p.createElement(o), h.textContent = " ", p.body.appendChild(s);
1278
+ const f = d.getComputedStyle(h, t), b = /* @__PURE__ */ new Map();
1279
+ for (let m = f.length, u = 0; u < m; u++) {
1280
+ const y = f.item(u);
1281
+ Po.includes(y) || b.set(y, f.getPropertyValue(y));
1282
+ }
1283
+ return p.body.removeChild(s), r.set(c, b), b;
1284
+ }
1285
+ function vn(e, t, n) {
1286
+ const r = /* @__PURE__ */ new Map(), o = [], i = /* @__PURE__ */ new Map();
1287
+ if (n) for (const l of n) c(l);
1288
+ else for (let l = e.length, d = 0; d < l; d++) c(e.item(d));
1289
+ for (let l = o.length, d = 0; d < l; d++) {
1290
+ var a;
1291
+ (a = i.get(o[d])) === null || a === void 0 || a.forEach((p, s) => r.set(s, p));
1292
+ }
1293
+ function c(l) {
1294
+ const d = e.getPropertyValue(l), p = e.getPropertyPriority(l), s = l.lastIndexOf("-"), h = s > -1 ? l.substring(0, s) : void 0;
1295
+ if (h) {
1296
+ let f = i.get(h);
1297
+ f || (f = /* @__PURE__ */ new Map(), i.set(h, f)), f.set(l, [d, p]);
1298
+ }
1299
+ t.get(l) === d && !p || (h ? o.push(h) : r.set(l, [d, p]));
1300
+ }
1301
+ return r;
1302
+ }
1303
+ function Uo(e, t, n, r) {
1304
+ var o;
1305
+ const { ownerWindow: i, includeStyleProperties: a, currentParentNodeStyle: c } = r, l = t.style, d = i.getComputedStyle(e), p = mn(e, null, r);
1306
+ c == null || c.forEach((m, u) => {
1307
+ p.delete(u);
1308
+ });
1309
+ const s = vn(d, p, a);
1310
+ if (s.delete("transition-property"), s.delete("all"), s.delete("d"), s.delete("content"), n && (s.delete("position"), s.delete("margin-top"), s.delete("margin-right"), s.delete("margin-bottom"), s.delete("margin-left"), s.delete("margin-block-start"), s.delete("margin-block-end"), s.delete("margin-inline-start"), s.delete("margin-inline-end"), s.set("box-sizing", ["border-box", ""])), ((o = s.get("background-clip")) === null || o === void 0 ? void 0 : o[0]) === "text" && t.classList.add("______background-clip--text"), ln) {
1311
+ var h, f, b;
1312
+ s.has("font-kerning") || s.set("font-kerning", ["normal", ""]), (((h = s.get("overflow-x")) === null || h === void 0 ? void 0 : h[0]) === "hidden" || ((f = s.get("overflow-y")) === null || f === void 0 ? void 0 : f[0]) === "hidden") && ((b = s.get("text-overflow")) === null || b === void 0 ? void 0 : b[0]) === "ellipsis" && e.scrollWidth === e.clientWidth && s.set("text-overflow", ["clip", ""]);
1313
+ }
1314
+ for (let m = l.length, u = 0; u < m; u++) l.removeProperty(l.item(u));
1315
+ return s.forEach(([m, u], y) => {
1316
+ l.setProperty(y, m, u);
1317
+ }), s;
1318
+ }
1319
+ function $o(e, t) {
1320
+ (so(e) || lo(e) || fo(e)) && t.setAttribute("value", e.value);
1321
+ }
1322
+ var Fo = ["::before", "::after"], Oo = [
1323
+ "::-webkit-scrollbar",
1324
+ "::-webkit-scrollbar-button",
1325
+ "::-webkit-scrollbar-thumb",
1326
+ "::-webkit-scrollbar-track",
1327
+ "::-webkit-scrollbar-track-piece",
1328
+ "::-webkit-scrollbar-corner",
1329
+ "::-webkit-resizer"
1330
+ ];
1331
+ function zo(e, t, n, r, o) {
1332
+ const { ownerWindow: i, svgStyleElement: a, svgStyles: c, currentNodeStyle: l } = r;
1333
+ if (!a || !i) return;
1334
+ function d(p) {
1335
+ var s;
1336
+ const h = i.getComputedStyle(e, p);
1337
+ let f = h.getPropertyValue("content");
1338
+ if (!f || f === "none") return;
1339
+ o == null || o(f), f = f.replace(/(')|(")|(counter\(.+\))/g, "");
1340
+ const b = [fn()], m = mn(e, p, r);
1341
+ l == null || l.forEach((w, S) => {
1342
+ m.delete(S);
1343
+ });
1344
+ const u = vn(h, m, r.includeStyleProperties);
1345
+ u.delete("content"), u.delete("-webkit-locale"), ((s = u.get("background-clip")) === null || s === void 0 ? void 0 : s[0]) === "text" && t.classList.add("______background-clip--text");
1346
+ const y = [`content: '${f}';`];
1347
+ if (u.forEach(([w, S], k) => {
1348
+ y.push(`${k}: ${w}${S ? " !important" : ""};`);
1349
+ }), y.length === 1) return;
1350
+ try {
1351
+ t.className = [t.className, ...b].join(" ");
1352
+ } catch (w) {
1353
+ r.log.warn("Failed to copyPseudoClass", w);
1354
+ return;
1355
+ }
1356
+ const g = y.join(`
1357
+ `);
1358
+ let v = c.get(g);
1359
+ v || (v = [], c.set(g, v)), v.push(`.${b[0]}${p}`);
1360
+ }
1361
+ Fo.forEach(d), n && Oo.forEach(d);
1362
+ }
1363
+ var It = /* @__PURE__ */ new Set(["symbol"]);
1364
+ async function Rt(e, t, n, r, o) {
1365
+ if (z(n) && (co(n) || uo(n)) || r.filter && !r.filter(n)) return;
1366
+ It.has(t.nodeName) || It.has(n.nodeName) ? r.currentParentNodeStyle = void 0 : r.currentParentNodeStyle = r.currentNodeStyle;
1367
+ const i = await st(n, r, !1, o);
1368
+ r.isEnable("restoreScrollPosition") && jo(e, i), t.appendChild(i);
1369
+ }
1370
+ async function Mt(e, t, n, r) {
1371
+ let o = e.firstChild;
1372
+ if (z(e) && e.shadowRoot) {
1373
+ var i;
1374
+ o = (i = e.shadowRoot) === null || i === void 0 ? void 0 : i.firstChild, n.shadowRoots.push(e.shadowRoot);
1375
+ }
1376
+ for (let a = o; a; a = a.nextSibling)
1377
+ if (!oo(a))
1378
+ if (z(a) && po(a) && typeof a.assignedNodes == "function") {
1379
+ const c = a.assignedNodes();
1380
+ for (let l = 0; l < c.length; l++) await Rt(e, t, c[l], n, r);
1381
+ } else await Rt(e, t, a, n, r);
1382
+ }
1383
+ function jo(e, t) {
1384
+ if (!ue(e) || !ue(t)) return;
1385
+ const { scrollTop: n, scrollLeft: r } = e;
1386
+ if (!n && !r) return;
1387
+ const { transform: o } = t.style, i = new DOMMatrix(o), { a, b: c, c: l, d } = i;
1388
+ i.a = 1, i.b = 0, i.c = 0, i.d = 1, i.translateSelf(-r, -n), i.a = a, i.b = c, i.c = l, i.d = d, t.style.transform = i.toString();
1389
+ }
1390
+ function Ho(e, t) {
1391
+ const { backgroundColor: n, width: r, height: o, style: i } = t, a = e.style;
1392
+ if (n && a.setProperty("background-color", n, "important"), r && a.setProperty("width", `${r}px`, "important"), o && a.setProperty("height", `${o}px`, "important"), i) for (const c in i) a[c] = i[c];
1393
+ }
1394
+ var Vo = /^[\w-:]+$/;
1395
+ async function st(e, t, n = !1, r) {
1396
+ const { ownerDocument: o, ownerWindow: i, fontFamilies: a, onCloneEachNode: c } = t;
1397
+ if (o && io(e))
1398
+ return r && /\S/.test(e.data) && r(e.data), o.createTextNode(e.data);
1399
+ if (o && i && z(e) && (ue(e) || be(e))) {
1400
+ var l, d;
1401
+ const f = await Mo(e, t);
1402
+ if (t.isEnable("removeAbnormalAttributes")) {
1403
+ const v = f.getAttributeNames();
1404
+ for (let w = v.length, S = 0; S < w; S++) {
1405
+ const k = v[S];
1406
+ Vo.test(k) || f.removeAttribute(k);
1407
+ }
1408
+ }
1409
+ const b = t.currentNodeStyle = Uo(e, f, n, t);
1410
+ n && Ho(f, t);
1411
+ let m = !1;
1412
+ if (t.isEnable("copyScrollbar")) {
1413
+ var p, s;
1414
+ const v = [(p = b.get("overflow-x")) === null || p === void 0 ? void 0 : p[0], (s = b.get("overflow-y")) === null || s === void 0 ? void 0 : s[0]];
1415
+ m = v.includes("scroll") || (v.includes("auto") || v.includes("overlay")) && (e.scrollHeight > e.clientHeight || e.scrollWidth > e.clientWidth);
1416
+ }
1417
+ const u = (l = b.get("text-transform")) === null || l === void 0 ? void 0 : l[0], y = pn((d = b.get("font-family")) === null || d === void 0 ? void 0 : d[0]), g = y ? (v) => {
1418
+ u === "uppercase" ? v = v.toUpperCase() : u === "lowercase" ? v = v.toLowerCase() : u === "capitalize" && (v = v[0].toUpperCase() + v.substring(1)), y.forEach((w) => {
1419
+ let S = a.get(w);
1420
+ S || a.set(w, S = /* @__PURE__ */ new Set()), v.split("").forEach((k) => S.add(k));
1421
+ });
1422
+ } : void 0;
1423
+ return zo(e, f, m, t, g), $o(e, f), _e(e) || await Mt(e, f, t, g), await (c == null ? void 0 : c(f)), f;
1424
+ }
1425
+ const h = e.cloneNode(!1);
1426
+ return await Mt(e, h, t), await (c == null ? void 0 : c(h)), h;
1427
+ }
1428
+ function Xo(e) {
1429
+ if (e.ownerDocument = void 0, e.ownerWindow = void 0, e.svgStyleElement = void 0, e.svgDefsElement = void 0, e.svgStyles.clear(), e.defaultComputedStyles.clear(), e.sandbox) {
1430
+ try {
1431
+ e.sandbox.remove();
1432
+ } catch (t) {
1433
+ e.log.warn("Failed to destroyContext", t);
1434
+ }
1435
+ e.sandbox = void 0;
1436
+ }
1437
+ e.workers = [], e.fontFamilies.clear(), e.fontCssTexts.clear(), e.requests.clear(), e.tasks = [], e.shadowRoots = [];
1438
+ }
1439
+ function qo(e) {
1440
+ const { url: t, timeout: n, responseType: r, ...o } = e, i = new AbortController(), a = n ? setTimeout(() => i.abort(), n) : void 0;
1441
+ return fetch(t, {
1442
+ signal: i.signal,
1443
+ ...o
1444
+ }).then((c) => {
1445
+ if (!c.ok) throw new Error("Failed fetch, not 2xx response", { cause: c });
1446
+ switch (r) {
1447
+ case "arrayBuffer":
1448
+ return c.arrayBuffer();
1449
+ case "dataUrl":
1450
+ return c.blob().then(xo);
1451
+ default:
1452
+ return c.text();
1453
+ }
1454
+ }).finally(() => clearTimeout(a));
1455
+ }
1456
+ function fe(e, t) {
1457
+ const { url: n, requestType: r = "text", responseType: o = "text", imageDom: i } = t;
1458
+ let a = n;
1459
+ const { timeout: c, acceptOfImage: l, requests: d, fetchFn: p, fetch: { requestInit: s, bypassingCache: h, placeholderImage: f }, font: b, workers: m, fontFamilies: u } = e;
1460
+ r === "image" && (ke || it) && e.drawImageCount++;
1461
+ let y = d.get(n);
1462
+ if (!y) {
1463
+ h && h instanceof RegExp && h.test(a) && (a += (/\?/.test(a) ? "&" : "?") + (/* @__PURE__ */ new Date()).getTime());
1464
+ const g = r.startsWith("font") && b && b.minify, v = /* @__PURE__ */ new Set();
1465
+ g && r.split(";")[1].split(",").forEach((k) => {
1466
+ u.has(k) && u.get(k).forEach((N) => v.add(N));
1467
+ });
1468
+ const w = g && v.size, S = {
1469
+ url: a,
1470
+ timeout: c,
1471
+ responseType: w ? "arrayBuffer" : o,
1472
+ headers: r === "image" ? { accept: l } : void 0,
1473
+ ...s
1474
+ };
1475
+ y = {
1476
+ type: r,
1477
+ resolve: void 0,
1478
+ reject: void 0,
1479
+ response: null
1480
+ }, y.response = (async () => {
1481
+ if (p && r === "image") {
1482
+ const k = await p(n);
1483
+ if (k) return k;
1484
+ }
1485
+ return !ke && n.startsWith("http") && m.length ? new Promise((k, N) => {
1486
+ m[d.size & m.length - 1].postMessage({
1487
+ rawUrl: n,
1488
+ ...S
1489
+ }), y.resolve = k, y.reject = N;
1490
+ }) : qo(S);
1491
+ })().catch((k) => {
1492
+ if (d.delete(n), r === "image" && f)
1493
+ return e.log.warn("Failed to fetch image base64, trying to use placeholder image", a), typeof f == "string" ? f : f(i);
1494
+ throw k;
1495
+ }), d.set(n, y);
1496
+ }
1497
+ return y.response;
1498
+ }
1499
+ async function gn(e, t, n, r) {
1500
+ if (!yn(e)) return e;
1501
+ for (const [o, i] of Go(e, t)) try {
1502
+ const a = await fe(n, {
1503
+ url: i,
1504
+ requestType: r ? "image" : "text",
1505
+ responseType: "dataUrl"
1506
+ });
1507
+ e = e.replace(Wo(o), `$1${a}$3`);
1508
+ } catch (a) {
1509
+ n.log.warn("Failed to fetch css data url", o, a);
1510
+ }
1511
+ return e;
1512
+ }
1513
+ function yn(e) {
1514
+ return /url\((['"]?)([^'"]+?)\1\)/.test(e);
1515
+ }
1516
+ var wn = /url\((['"]?)([^'"]+?)\1\)/g;
1517
+ function Go(e, t) {
1518
+ const n = [];
1519
+ return e.replace(wn, (r, o, i) => (n.push([i, un(i, t)]), r)), n.filter(([r]) => !Je(r));
1520
+ }
1521
+ function Wo(e) {
1522
+ const t = e.replace(/([.*+?^${}()|\[\]\/\\])/g, "\\$1");
1523
+ return new RegExp(`(url\\(['"]?)(${t})(['"]?\\))`, "g");
1524
+ }
1525
+ var Yo = [
1526
+ "background-image",
1527
+ "border-image-source",
1528
+ "-webkit-border-image",
1529
+ "-webkit-mask-image",
1530
+ "list-style-image"
1531
+ ];
1532
+ function Ko(e, t) {
1533
+ return Yo.map((n) => {
1534
+ const r = e.getPropertyValue(n);
1535
+ return !r || r === "none" ? null : ((ke || it) && t.drawImageCount++, gn(r, null, t, !0).then((o) => {
1536
+ !o || r === o || e.setProperty(n, o, e.getPropertyPriority(n));
1537
+ }));
1538
+ }).filter(Boolean);
1539
+ }
1540
+ function Zo(e, t) {
1541
+ if (re(e)) {
1542
+ const n = e.currentSrc || e.src;
1543
+ if (!Je(n)) return [fe(t, {
1544
+ url: n,
1545
+ imageDom: e,
1546
+ requestType: "image",
1547
+ responseType: "dataUrl"
1548
+ }).then((r) => {
1549
+ r && (e.srcset = "", e.dataset.originalSrc = n, e.src = r || "");
1550
+ })];
1551
+ (ke || it) && t.drawImageCount++;
1552
+ } else if (be(e) && !Je(e.href.baseVal)) {
1553
+ const n = e.href.baseVal;
1554
+ return [fe(t, {
1555
+ url: n,
1556
+ imageDom: e,
1557
+ requestType: "image",
1558
+ responseType: "dataUrl"
1559
+ }).then((r) => {
1560
+ r && (e.dataset.originalSrc = n, e.href.baseVal = r || "");
1561
+ })];
1562
+ }
1563
+ return [];
1564
+ }
1565
+ function Jo(e, t) {
1566
+ var n;
1567
+ const { ownerDocument: r, svgDefsElement: o } = t, i = (n = e.getAttribute("href")) !== null && n !== void 0 ? n : e.getAttribute("xlink:href");
1568
+ if (!i) return [];
1569
+ const [a, c] = i.split("#");
1570
+ if (c) {
1571
+ const l = `#${c}`, d = t.shadowRoots.reduce((p, s) => p != null ? p : s.querySelector(`svg ${l}`), r == null ? void 0 : r.querySelector(`svg ${l}`));
1572
+ if (a && e.setAttribute("href", l), o != null && o.querySelector(l)) return [];
1573
+ if (d)
1574
+ return o == null || o.appendChild(d.cloneNode(!0)), [];
1575
+ if (a) return [fe(t, {
1576
+ url: a,
1577
+ responseType: "text"
1578
+ }).then((p) => {
1579
+ o == null || o.insertAdjacentHTML("beforeend", p);
1580
+ })];
1581
+ }
1582
+ return [];
1583
+ }
1584
+ function xn(e, t) {
1585
+ const { tasks: n } = t;
1586
+ z(e) && ((re(e) || cn(e)) && n.push(...Zo(e, t)), ro(e) && n.push(...Jo(e, t))), ue(e) && n.push(...Ko(e.style, t)), e.childNodes.forEach((r) => {
1587
+ xn(r, t);
1588
+ });
1589
+ }
1590
+ async function Qo(e, t) {
1591
+ const { ownerDocument: n, svgStyleElement: r, fontFamilies: o, fontCssTexts: i, tasks: a, font: c } = t;
1592
+ if (!(!n || !r || !o.size))
1593
+ if (c && c.cssText) {
1594
+ const l = Pt(c.cssText, t);
1595
+ r.appendChild(n.createTextNode(`${l}
1596
+ `));
1597
+ } else {
1598
+ const l = Array.from(n.styleSheets).filter((f) => {
1599
+ try {
1600
+ return "cssRules" in f && !!f.cssRules.length;
1601
+ } catch (b) {
1602
+ return t.log.warn(`Error while reading CSS rules from ${f.href}`, b), !1;
1603
+ }
1604
+ }), d = n.implementation.createHTMLDocument(""), p = d.createElement("style");
1605
+ d.head.appendChild(p);
1606
+ const s = p.sheet;
1607
+ await Promise.all(l.flatMap((f) => Array.from(f.cssRules).map(async (b) => {
1608
+ if (to(b)) {
1609
+ const m = b.href;
1610
+ let u = "";
1611
+ try {
1612
+ u = await fe(t, {
1613
+ url: m,
1614
+ requestType: "text",
1615
+ responseType: "text"
1616
+ });
1617
+ } catch (g) {
1618
+ t.log.warn(`Error fetch remote css import from ${m}`, g);
1619
+ }
1620
+ const y = u.replace(wn, (g, v, w) => g.replace(w, un(w, m)));
1621
+ for (const g of ti(y)) try {
1622
+ s.insertRule(g, s.cssRules.length);
1623
+ } catch (v) {
1624
+ t.log.warn("Error inserting rule from remote css import", {
1625
+ rule: g,
1626
+ error: v
1627
+ });
1628
+ }
1629
+ }
1630
+ }))), s.cssRules.length && l.push(s);
1631
+ const h = [];
1632
+ l.forEach((f) => {
1633
+ Qe(f.cssRules, h);
1634
+ }), h.filter((f) => {
1635
+ var b;
1636
+ return eo(f) && yn(f.style.getPropertyValue("src")) && ((b = pn(f.style.getPropertyValue("font-family"))) === null || b === void 0 ? void 0 : b.some((m) => o.has(m)));
1637
+ }).forEach((f) => {
1638
+ const b = f, m = i.get(b.cssText);
1639
+ m ? r.appendChild(n.createTextNode(`${m}
1640
+ `)) : a.push(gn(b.cssText, b.parentStyleSheet ? b.parentStyleSheet.href : null, t).then((u) => {
1641
+ u = Pt(u, t), i.set(b.cssText, u), r.appendChild(n.createTextNode(`${u}
1642
+ `));
1643
+ }));
1644
+ });
1645
+ }
1646
+ }
1647
+ var ei = /(\/\*[\s\S]*?\*\/)/g, Dt = /((@.*?keyframes [\s\S]*?){([\s\S]*?}\s*?)})/gi;
1648
+ function ti(e) {
1649
+ if (e == null) return [];
1650
+ const t = [];
1651
+ let n = e.replace(ei, "");
1652
+ for (; ; ) {
1653
+ const i = Dt.exec(n);
1654
+ if (!i) break;
1655
+ t.push(i[0]);
1656
+ }
1657
+ n = n.replace(Dt, "");
1658
+ const r = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi, o = /* @__PURE__ */ new RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})", "gi");
1659
+ for (; ; ) {
1660
+ let i = r.exec(n);
1661
+ if (i)
1662
+ o.lastIndex = r.lastIndex;
1663
+ else if (i = o.exec(n), i) r.lastIndex = o.lastIndex;
1664
+ else break;
1665
+ t.push(i[0]);
1666
+ }
1667
+ return t;
1668
+ }
1669
+ var ni = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g, ri = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;
1670
+ function Pt(e, t) {
1671
+ const { font: n } = t, r = n ? n == null ? void 0 : n.preferredFormat : void 0;
1672
+ return r ? e.replace(ri, (o) => {
1673
+ for (; ; ) {
1674
+ const [i, , a] = ni.exec(o) || [];
1675
+ if (!a) return "";
1676
+ if (a === r) return `src: ${i};`;
1677
+ }
1678
+ }) : e;
1679
+ }
1680
+ function Qe(e, t = []) {
1681
+ for (const n of Array.from(e)) no(n) ? t.push(...Qe(n.cssRules)) : "cssRules" in n ? Qe(n.cssRules, t) : t.push(n);
1682
+ return t;
1683
+ }
1684
+ var oi = /\bx?link:?href\s*=\s*["'](?!data:)[^"']+["']/i;
1685
+ function ii(e) {
1686
+ return oi.test(e.innerHTML);
1687
+ }
1688
+ async function ai(e, t) {
1689
+ const n = await at(e, t);
1690
+ if (z(n.node) && be(n.node) && !ii(n.node)) return n.node;
1691
+ const { ownerDocument: r, log: o, tasks: i, svgStyleElement: a, svgDefsElement: c, svgStyles: l, font: d, progress: p, autoDestruct: s, onCloneNode: h, onEmbedNode: f, onCreateForeignObjectSvg: b } = n;
1692
+ o.time("clone node");
1693
+ const m = await st(n.node, n, !0);
1694
+ if (a && r) {
1695
+ let w = "";
1696
+ l.forEach((S, k) => {
1697
+ w += `${S.join(`,
1698
+ `)} {
1699
+ ${k}
1700
+ }
1701
+ `;
1702
+ }), a.appendChild(r.createTextNode(w));
1703
+ }
1704
+ o.timeEnd("clone node"), await (h == null ? void 0 : h(m)), d !== !1 && z(m) && (o.time("embed web font"), await Qo(m, n), o.timeEnd("embed web font")), o.time("embed node"), xn(m, n);
1705
+ const u = i.length;
1706
+ let y = 0;
1707
+ const g = async () => {
1708
+ for (; ; ) {
1709
+ const w = i.pop();
1710
+ if (!w) break;
1711
+ try {
1712
+ await w;
1713
+ } catch (S) {
1714
+ n.log.warn("Failed to run task", S);
1715
+ }
1716
+ p == null || p(++y, u);
1717
+ }
1718
+ };
1719
+ p == null || p(y, u), await Promise.all([...Array.from({ length: 4 })].map(g)), o.timeEnd("embed node"), await (f == null ? void 0 : f(m));
1720
+ const v = si(m, n);
1721
+ return c && v.insertBefore(c, v.children[0]), a && v.insertBefore(a, v.children[0]), s && Xo(n), await (b == null ? void 0 : b(v)), v;
1722
+ }
1723
+ function si(e, t) {
1724
+ const { width: n, height: r } = t, o = vo(n, r, e.ownerDocument), i = o.ownerDocument.createElementNS(o.namespaceURI, "foreignObject");
1725
+ return i.setAttributeNS(null, "x", "0%"), i.setAttributeNS(null, "y", "0%"), i.setAttributeNS(null, "width", "100%"), i.setAttributeNS(null, "height", "100%"), i.append(e), o.appendChild(i), o;
1726
+ }
1727
+ async function li(e, t) {
1728
+ const n = await at(e, t), r = await ai(n), o = go(r, n.isEnable("removeControlCharacter"));
1729
+ if (!n.autoDestruct) {
1730
+ var i;
1731
+ n.svgStyleElement = bn(n.ownerDocument), n.svgDefsElement = (i = n.ownerDocument) === null || i === void 0 ? void 0 : i.createElementNS(Le, "defs"), n.svgStyles.clear();
1732
+ }
1733
+ return await Ao(ne(o, r.ownerDocument), n);
1734
+ }
1735
+ async function ci(e, t) {
1736
+ const n = await at(e, t), { log: r, type: o, quality: i, dpi: a } = n, c = await li(n);
1737
+ r.time("canvas to blob");
1738
+ const l = await yo(c, o, i);
1739
+ if (["image/png", "image/jpeg"].includes(o) && a) {
1740
+ const d = await ko(l.slice(0, 33));
1741
+ let p = new Uint8Array(d);
1742
+ return o === "image/png" ? p = Kr(p, a) : o === "image/jpeg" && (p = qr(p, a)), r.timeEnd("canvas to blob"), new Blob([p, l.slice(33)], { type: o });
1743
+ }
1744
+ return r.timeEnd("canvas to blob"), l;
1745
+ }
1746
+ var ui = 32, di = /* @__PURE__ */ new Set([
500
1747
  "button",
501
1748
  "submit",
502
1749
  "reset",
@@ -508,140 +1755,116 @@ var wo = 32, ko = /* @__PURE__ */ new Set([
508
1755
  "image",
509
1756
  "hidden"
510
1757
  ]);
511
- function ye(e) {
512
- const t = Math.min(Math.max(e, 1), wo);
1758
+ function He(e) {
1759
+ const t = Math.min(Math.max(e, 1), ui);
513
1760
  return "•".repeat(t);
514
1761
  }
515
- function Eo(e) {
516
- for (const n of Array.from(e.querySelectorAll("input"))) {
1762
+ function fi(e) {
1763
+ for (const r of Array.from(e.querySelectorAll("input"))) {
517
1764
  var t;
518
- const i = ((t = n.getAttribute("type")) !== null && t !== void 0 ? t : "text").toLowerCase();
519
- if (ko.has(i)) continue;
520
- const r = n.value;
521
- if (!r) continue;
522
- const s = ye(r.length);
523
- n.value = s, n.setAttribute("value", s);
524
- }
525
- for (const n of Array.from(e.querySelectorAll("textarea"))) {
526
- const i = n.value || n.textContent || "";
1765
+ const o = ((t = r.getAttribute("type")) !== null && t !== void 0 ? t : "text").toLowerCase();
1766
+ if (di.has(o)) continue;
1767
+ const i = r.value;
527
1768
  if (!i) continue;
528
- const r = ye(i.length);
529
- n.value = r, n.textContent = r;
1769
+ const a = He(i.length);
1770
+ r.value = a, r.setAttribute("value", a);
530
1771
  }
531
- for (const n of Array.from(e.querySelectorAll("[contenteditable]"))) {
532
- var o;
533
- if (n.getAttribute("contenteditable") === "false") continue;
534
- const i = (o = n.textContent) !== null && o !== void 0 ? o : "";
535
- i.trim() && (n.textContent = ye(i.length));
1772
+ for (const r of Array.from(e.querySelectorAll("textarea"))) {
1773
+ const o = r.value || r.textContent || "";
1774
+ if (!o) continue;
1775
+ const i = He(o.length);
1776
+ r.value = i, r.textContent = i, r.setAttribute("value", i);
1777
+ }
1778
+ for (const r of Array.from(e.querySelectorAll("[contenteditable]"))) {
1779
+ var n;
1780
+ if (r.getAttribute("contenteditable") === "false") continue;
1781
+ const o = (n = r.textContent) !== null && n !== void 0 ? n : "";
1782
+ o.trim() && (r.textContent = He(o.length));
536
1783
  }
537
1784
  }
538
- var _o = {
1785
+ var pi = {
539
1786
  "image/png": "png",
540
1787
  "image/jpeg": "jpg",
541
1788
  "image/webp": "webp",
542
1789
  "image/gif": "gif"
543
1790
  };
544
- function ct(e) {
1791
+ function kn(e) {
545
1792
  var t;
546
- return (t = _o[e]) !== null && t !== void 0 ? t : "png";
547
- }
548
- function Ye(e, t, o) {
549
- const n = e == null ? void 0 : e[`inner${o}`], i = t.documentElement[`client${o}`];
550
- return Math.max(1, Math.round((typeof n == "number" && n > 0 ? n : i) || 0) || 1);
551
- }
552
- function So(e, t, o) {
553
- return `<svg xmlns="http://www.w3.org/2000/svg" width="${t}" height="${o}"><foreignObject x="0" y="0" width="100%" height="100%"><div xmlns="http://www.w3.org/1999/xhtml">${new XMLSerializer().serializeToString(e)}</div></foreignObject></svg>`;
554
- }
555
- var To = 4e3, Co = (e, { width: t, height: o, type: n }) => new Promise((i) => {
556
- let r = !1;
557
- const s = (f) => {
558
- r || (r = !0, i(f));
559
- };
560
- try {
561
- const f = new Image(), l = setTimeout(() => s(null), To);
562
- f.onload = () => {
563
- try {
564
- const d = document.createElement("canvas");
565
- d.width = t, d.height = o;
566
- const h = d.getContext("2d");
567
- if (!h) {
568
- clearTimeout(l), s(null);
569
- return;
570
- }
571
- h.drawImage(f, 0, 0), d.toBlob((a) => {
572
- clearTimeout(l), s(a);
573
- }, n);
574
- } catch {
575
- clearTimeout(l), s(null);
576
- }
577
- }, f.onerror = () => {
578
- clearTimeout(l), s(null);
579
- }, f.src = `data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`;
580
- } catch {
581
- s(null);
582
- }
1793
+ return (t = pi[e]) !== null && t !== void 0 ? t : "png";
1794
+ }
1795
+ function Bt(e, t, n) {
1796
+ const r = e == null ? void 0 : e[`inner${n}`], o = t.documentElement[`client${n}`];
1797
+ return Math.max(1, Math.round((typeof r == "number" && r > 0 ? r : o) || 0) || 1);
1798
+ }
1799
+ var bi = 6e3, hi = (e, t) => ci(e, {
1800
+ width: t.width,
1801
+ height: t.height,
1802
+ type: t.type,
1803
+ timeout: bi,
1804
+ filter: t.filter,
1805
+ onCloneNode: t.onCloneNode
583
1806
  });
584
- async function dt(e = {}) {
1807
+ async function En(e = {}) {
585
1808
  try {
586
- var t, o, n, i, r, s;
587
- const f = (t = e.doc) !== null && t !== void 0 ? t : document, l = (o = (n = e.win) !== null && n !== void 0 ? n : f.defaultView) !== null && o !== void 0 ? o : void 0, d = (i = e.target) !== null && i !== void 0 ? i : f.documentElement, h = (r = e.type) !== null && r !== void 0 ? r : "image/png", a = Ye(l, f, "Width"), b = Ye(l, f, "Height"), u = d.cloneNode(!0);
588
- Pt(u), Eo(u);
589
- const m = So(u, a, b), p = await ((s = e.rasterize) !== null && s !== void 0 ? s : Co)(m, {
590
- width: a,
591
- height: b,
592
- type: h
1809
+ var t, n, r, o, i, a;
1810
+ const c = (t = e.doc) !== null && t !== void 0 ? t : document, l = (n = (r = e.win) !== null && r !== void 0 ? r : c.defaultView) !== null && n !== void 0 ? n : void 0, d = (o = e.target) !== null && o !== void 0 ? o : c.documentElement, p = (i = e.type) !== null && i !== void 0 ? i : "image/png", s = Bt(l, c, "Width"), h = Bt(l, c, "Height"), f = await ((a = e.capture) !== null && a !== void 0 ? a : hi)(d, {
1811
+ width: s,
1812
+ height: h,
1813
+ type: p,
1814
+ filter: (b) => !Wn(b),
1815
+ onCloneNode: (b) => fi(b)
593
1816
  });
594
- return p ? {
595
- blob: p,
596
- width: a,
597
- height: b,
598
- type: h
1817
+ return f ? {
1818
+ blob: f,
1819
+ width: s,
1820
+ height: h,
1821
+ type: p
599
1822
  } : null;
600
1823
  } catch {
601
1824
  return null;
602
1825
  }
603
1826
  }
604
- function ne(e) {
1827
+ function pe(e) {
605
1828
  "@babel/helpers - typeof";
606
- return ne = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
1829
+ return pe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(t) {
607
1830
  return typeof t;
608
1831
  } : function(t) {
609
1832
  return t && typeof Symbol == "function" && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t;
610
- }, ne(e);
611
- }
612
- function Lo(e, t) {
613
- if (ne(e) != "object" || !e) return e;
614
- var o = e[Symbol.toPrimitive];
615
- if (o !== void 0) {
616
- var n = o.call(e, t || "default");
617
- if (ne(n) != "object") return n;
1833
+ }, pe(e);
1834
+ }
1835
+ function mi(e, t) {
1836
+ if (pe(e) != "object" || !e) return e;
1837
+ var n = e[Symbol.toPrimitive];
1838
+ if (n !== void 0) {
1839
+ var r = n.call(e, t || "default");
1840
+ if (pe(r) != "object") return r;
618
1841
  throw new TypeError("@@toPrimitive must return a primitive value.");
619
1842
  }
620
1843
  return (t === "string" ? String : Number)(e);
621
1844
  }
622
- function Mo(e) {
623
- var t = Lo(e, "string");
624
- return ne(t) == "symbol" ? t : t + "";
1845
+ function vi(e) {
1846
+ var t = mi(e, "string");
1847
+ return pe(t) == "symbol" ? t : t + "";
625
1848
  }
626
- function W(e, t, o) {
627
- return (t = Mo(t)) in e ? Object.defineProperty(e, t, {
628
- value: o,
1849
+ function te(e, t, n) {
1850
+ return (t = vi(t)) in e ? Object.defineProperty(e, t, {
1851
+ value: n,
629
1852
  enumerable: !0,
630
1853
  configurable: !0,
631
1854
  writable: !0
632
- }) : e[t] = o, e;
1855
+ }) : e[t] = n, e;
633
1856
  }
634
- function Ao(e, t) {
1857
+ function gi(e, t) {
635
1858
  if (e == null) return 60;
636
- const o = e.trim();
637
- if (o === "") return 60;
638
- if (/^\d+$/.test(o)) return Number(o);
639
- const n = Date.parse(o);
640
- return Number.isNaN(n) ? 60 : Math.max(0, Math.ceil((n - t) / 1e3));
1859
+ const n = e.trim();
1860
+ if (n === "") return 60;
1861
+ if (/^\d+$/.test(n)) return Number(n);
1862
+ const r = Date.parse(n);
1863
+ return Number.isNaN(r) ? 60 : Math.max(0, Math.ceil((r - t) / 1e3));
641
1864
  }
642
- var Io = class {
1865
+ var yi = class {
643
1866
  constructor(e = Date.now) {
644
- W(this, "now", void 0), W(this, "pausedUntil", 0), this.now = e;
1867
+ te(this, "now", void 0), te(this, "pausedUntil", 0), this.now = e;
645
1868
  }
646
1869
  isPaused() {
647
1870
  return this.now() < this.pausedUntil;
@@ -650,39 +1873,39 @@ var Io = class {
650
1873
  return Math.max(0, Math.ceil((this.pausedUntil - this.now()) / 1e3));
651
1874
  }
652
1875
  hold(e) {
653
- const t = this.now(), o = Ao(e, t), n = t + o * 1e3;
654
- return n > this.pausedUntil && (this.pausedUntil = n), o;
1876
+ const t = this.now(), n = gi(e, t), r = t + n * 1e3;
1877
+ return r > this.pausedUntil && (this.pausedUntil = r), n;
655
1878
  }
656
- }, Ro = "screenshot", $o = new Io();
657
- function No(e) {
1879
+ }, wi = "screenshot", xi = new yi();
1880
+ function ki(e) {
658
1881
  return `${e.replace(/\/+$/, "")}/api/ingest/feedback`;
659
1882
  }
660
- function Bo(e) {
1883
+ function Ei(e) {
661
1884
  if (!e) return {};
662
1885
  const t = {};
663
1886
  return e.signedIdentity && (t.signedIdentity = e.signedIdentity), e.reporterId && (t.reporterId = e.reporterId), e.anonymousId && (t.anonymousId = e.anonymousId), t;
664
1887
  }
665
- async function ut(e, t, o = fetch, n = $o) {
666
- var i, r;
667
- const s = (i = t.content.source) !== null && i !== void 0 ? i : "reporter", f = s === "auto";
668
- if (f && n.isPaused()) return {
1888
+ async function Sn(e, t, n = fetch, r = xi) {
1889
+ var o, i;
1890
+ const a = (o = t.content.source) !== null && o !== void 0 ? o : "reporter", c = a === "auto";
1891
+ if (c && r.isPaused()) return {
669
1892
  ok: !1,
670
1893
  reason: "backpressure",
671
- retryAfterSeconds: n.retryAfterSeconds()
1894
+ retryAfterSeconds: r.retryAfterSeconds()
672
1895
  };
673
1896
  const l = {
674
1897
  key: t.key,
675
- ...Bo(t.identity),
1898
+ ...Ei(t.identity),
676
1899
  ...t.content,
677
- source: s
1900
+ source: a
678
1901
  }, d = new FormData();
679
- if (d.append("payload", JSON.stringify(l)), !((r = t.screenshot) === null || r === void 0) && r.blob) {
680
- var h;
681
- d.append(Ro, t.screenshot.blob, (h = t.screenshot.filename) !== null && h !== void 0 ? h : "screenshot.png");
1902
+ if (d.append("payload", JSON.stringify(l)), !((i = t.screenshot) === null || i === void 0) && i.blob) {
1903
+ var p;
1904
+ d.append(wi, t.screenshot.blob, (p = t.screenshot.filename) !== null && p !== void 0 ? p : "screenshot.png");
682
1905
  }
683
- let a;
1906
+ let s;
684
1907
  try {
685
- a = await o(No(e), {
1908
+ s = await n(ki(e), {
686
1909
  method: "POST",
687
1910
  body: d
688
1911
  });
@@ -692,20 +1915,20 @@ async function ut(e, t, o = fetch, n = $o) {
692
1915
  reason: "unreachable"
693
1916
  };
694
1917
  }
695
- if (!a.ok)
696
- return f && a.status === 429 ? {
1918
+ if (!s.ok)
1919
+ return c && s.status === 429 ? {
697
1920
  ok: !1,
698
1921
  reason: "backpressure",
699
- retryAfterSeconds: n.hold(a.headers.get("Retry-After"))
1922
+ retryAfterSeconds: r.hold(s.headers.get("Retry-After"))
700
1923
  } : {
701
1924
  ok: !1,
702
1925
  reason: "refused",
703
- status: a.status
1926
+ status: s.status
704
1927
  };
705
1928
  try {
706
1929
  return {
707
1930
  ok: !0,
708
- feedback: await a.json()
1931
+ feedback: await s.json()
709
1932
  };
710
1933
  } catch {
711
1934
  return {
@@ -714,60 +1937,71 @@ async function ut(e, t, o = fetch, n = $o) {
714
1937
  };
715
1938
  }
716
1939
  }
717
- var de = "0.1.0";
718
- var Po = 2e3;
719
- var Oo = 5, Uo = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi, zo = /\bhttps?:\/\/[^\s"')]+/gi, Do = /\b0x[0-9a-f]+\b/gi, jo = /\b[0-9a-f]{8,}\b/gi, Fo = /\d{4,}/g;
720
- function Ho(e) {
721
- return typeof e != "string" || e.length === 0 ? "" : e.replace(Uo, "<uuid>").replace(zo, "<url>").replace(Do, "<hex>").replace(jo, "<hex>").replace(Fo, "<n>").trim();
1940
+ var Ee = "0.3.0";
1941
+ var Si = 2e3;
1942
+ var Ti = 5, Ci = 5;
1943
+ function _i(e) {
1944
+ if (!e || e.length === 0) return [];
1945
+ const t = [];
1946
+ for (let r = e.length - 1; r >= 0 && t.length < Ci; r -= 1) {
1947
+ var n;
1948
+ const o = (n = e[r]) === null || n === void 0 ? void 0 : n.id;
1949
+ typeof o == "string" && o.length > 0 && t.unshift(o);
1950
+ }
1951
+ return t;
1952
+ }
1953
+ var Ai = /[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi, Li = /\bhttps?:\/\/[^\s"')]+/gi, Ni = /\b0x[0-9a-f]+\b/gi, Ii = /\b[0-9a-f]{8,}\b/gi, Ri = /\d{4,}/g;
1954
+ function Mi(e) {
1955
+ return typeof e != "string" || e.length === 0 ? "" : e.replace(Ai, "<uuid>").replace(Li, "<url>").replace(Ni, "<hex>").replace(Ii, "<hex>").replace(Ri, "<n>").trim();
722
1956
  }
723
- function Vo(e) {
1957
+ function Di(e) {
724
1958
  let t = 2166136261;
725
- for (let o = 0; o < e.length; o++)
726
- t ^= e.charCodeAt(o), t = Math.imul(t, 16777619);
1959
+ for (let n = 0; n < e.length; n++)
1960
+ t ^= e.charCodeAt(n), t = Math.imul(t, 16777619);
727
1961
  return (t >>> 0).toString(36);
728
1962
  }
729
- function we(e) {
730
- const t = e.replace(/\?[^:]*/, ""), o = t.lastIndexOf("/");
731
- return o >= 0 ? t.slice(o + 1) : t;
1963
+ function Ve(e) {
1964
+ const t = e.replace(/\?[^:]*/, ""), n = t.lastIndexOf("/");
1965
+ return n >= 0 ? t.slice(n + 1) : t;
732
1966
  }
733
- function Xo(e) {
734
- var t, o, n;
735
- const i = e.match(/^at\s+(.+?)\s+\((.+)\)$/);
736
- if (i) return `${(t = i[1]) !== null && t !== void 0 ? t : ""}@${we((o = i[2]) !== null && o !== void 0 ? o : "")}`;
737
- const r = e.match(/^at\s+(.+)$/);
738
- if (r) return `@${we((n = r[1]) !== null && n !== void 0 ? n : "")}`;
739
- const s = e.indexOf("@");
740
- return s >= 0 ? `${e.slice(0, s)}@${we(e.slice(s + 1))}` : null;
741
- }
742
- function Go(e, t = Oo) {
1967
+ function Pi(e) {
1968
+ var t, n, r;
1969
+ const o = e.match(/^at\s+(.+?)\s+\((.+)\)$/);
1970
+ if (o) return `${(t = o[1]) !== null && t !== void 0 ? t : ""}@${Ve((n = o[2]) !== null && n !== void 0 ? n : "")}`;
1971
+ const i = e.match(/^at\s+(.+)$/);
1972
+ if (i) return `@${Ve((r = i[1]) !== null && r !== void 0 ? r : "")}`;
1973
+ const a = e.indexOf("@");
1974
+ return a >= 0 ? `${e.slice(0, a)}@${Ve(e.slice(a + 1))}` : null;
1975
+ }
1976
+ function Bi(e, t = Ti) {
743
1977
  if (typeof e != "string" || e.length === 0) return "";
744
- const o = [];
745
- for (const n of e.split(`
1978
+ const n = [];
1979
+ for (const r of e.split(`
746
1980
  `)) {
747
- const i = Xo(n.trim());
748
- if (i && (o.push(i), o.length >= t))
1981
+ const o = Pi(r.trim());
1982
+ if (o && (n.push(o), n.length >= t))
749
1983
  break;
750
1984
  }
751
- return o.join(" < ");
1985
+ return n.join(" < ");
752
1986
  }
753
- function Yo(e, t, o) {
754
- return Vo(`${e}|${Ho(t)}|${Go(o)}`);
1987
+ function Ui(e, t, n) {
1988
+ return Di(`${e}|${Mi(t)}|${Bi(n)}`);
755
1989
  }
756
- var Ko = class {
1990
+ var $i = class {
757
1991
  constructor(e) {
758
1992
  var t;
759
- W(this, "options", void 0), W(this, "tokens", void 0), W(this, "last", void 0), W(this, "now", void 0), this.options = e, this.now = (t = e.now) !== null && t !== void 0 ? t : Date.now, this.tokens = Math.max(0, e.capacity), this.last = this.now();
1993
+ te(this, "options", void 0), te(this, "tokens", void 0), te(this, "last", void 0), te(this, "now", void 0), this.options = e, this.now = (t = e.now) !== null && t !== void 0 ? t : Date.now, this.tokens = Math.max(0, e.capacity), this.last = this.now();
760
1994
  }
761
1995
  take() {
762
- const e = this.now(), { capacity: t, refillIntervalMs: o } = this.options;
763
- if (o > 0 && e > this.last) {
764
- const n = Math.floor((e - this.last) / o);
765
- n > 0 && (this.tokens = Math.min(t, this.tokens + n), this.last += n * o);
1996
+ const e = this.now(), { capacity: t, refillIntervalMs: n } = this.options;
1997
+ if (n > 0 && e > this.last) {
1998
+ const r = Math.floor((e - this.last) / n);
1999
+ r > 0 && (this.tokens = Math.min(t, this.tokens + r), this.last += r * n);
766
2000
  }
767
2001
  return this.tokens >= 1 ? (this.tokens -= 1, !0) : !1;
768
2002
  }
769
2003
  };
770
- function V(e) {
2004
+ function q(e) {
771
2005
  if (typeof e == "string") return e;
772
2006
  if (e == null) return "";
773
2007
  try {
@@ -776,202 +2010,203 @@ function V(e) {
776
2010
  return "";
777
2011
  }
778
2012
  }
779
- function qo(e) {
780
- const t = e, o = t.error;
781
- if (o && typeof o == "object") {
782
- const i = o;
2013
+ function Fi(e) {
2014
+ const t = e, n = t.error;
2015
+ if (n && typeof n == "object") {
2016
+ const o = n;
783
2017
  return {
784
- type: V(i.name) || "Error",
785
- value: V(i.message) || V(t.message),
786
- stack: typeof i.stack == "string" ? i.stack : void 0,
787
- original: o
2018
+ type: q(o.name) || "Error",
2019
+ value: q(o.message) || q(t.message),
2020
+ stack: typeof o.stack == "string" ? o.stack : void 0,
2021
+ original: n
788
2022
  };
789
2023
  }
790
- const n = V(t.message);
791
- return n ? {
2024
+ const r = q(t.message);
2025
+ return r ? {
792
2026
  type: "Error",
793
- value: n,
794
- original: n
2027
+ value: r,
2028
+ original: r
795
2029
  } : null;
796
2030
  }
797
- function Wo(e) {
2031
+ function Oi(e) {
798
2032
  const t = e.reason;
799
2033
  if (t && typeof t == "object") {
800
- const n = t;
2034
+ const r = t;
801
2035
  return {
802
- type: V(n.name) || "UnhandledRejection",
803
- value: V(n.message) || V(t),
804
- stack: typeof n.stack == "string" ? n.stack : void 0,
2036
+ type: q(r.name) || "UnhandledRejection",
2037
+ value: q(r.message) || q(t),
2038
+ stack: typeof r.stack == "string" ? r.stack : void 0,
805
2039
  original: t
806
2040
  };
807
2041
  }
808
- const o = V(t);
2042
+ const n = q(t);
809
2043
  return {
810
2044
  type: "UnhandledRejection",
811
- value: o,
812
- original: t != null ? t : o
2045
+ value: n,
2046
+ original: t != null ? t : n
813
2047
  };
814
2048
  }
815
- var Zo = {
2049
+ var zi = {
816
2050
  destroy: () => {
817
2051
  },
818
2052
  droppedCount: () => 0
819
2053
  };
820
- function Jo(e) {
821
- var t, o, n, i, r, s, f, l, d, h, a, b;
822
- const u = (t = e.win) !== null && t !== void 0 ? t : typeof window != "undefined" ? window : void 0;
823
- if (!u) return Zo;
824
- const m = u, p = (o = (n = e.doc) !== null && n !== void 0 ? n : m.document) !== null && o !== void 0 ? o : typeof document != "undefined" ? document : void 0, c = (i = e.now) !== null && i !== void 0 ? i : Date.now, T = (r = e.sdkVersion) !== null && r !== void 0 ? r : de, C = (s = e.maxDistinct) !== null && s !== void 0 ? s : 20, w = (f = (l = e.deps) === null || l === void 0 ? void 0 : l.captureView) !== null && f !== void 0 ? f : dt, _ = (d = (h = e.deps) === null || h === void 0 ? void 0 : h.submitReport) !== null && d !== void 0 ? d : ut, N = new Ko({
825
- capacity: (a = e.burstCapacity) !== null && a !== void 0 ? a : 5,
826
- refillIntervalMs: (b = e.burstRefillMs) !== null && b !== void 0 ? b : Po,
827
- now: c
828
- }), M = /* @__PURE__ */ new Map();
829
- let A = 0;
830
- function y(I, L, O) {
831
- var R, z;
2054
+ function ji(e) {
2055
+ var t, n, r, o, i, a, c, l, d, p, s, h;
2056
+ const f = (t = e.win) !== null && t !== void 0 ? t : typeof window != "undefined" ? window : void 0;
2057
+ if (!f) return zi;
2058
+ const b = f, m = (n = (r = e.doc) !== null && r !== void 0 ? r : b.document) !== null && n !== void 0 ? n : typeof document != "undefined" ? document : void 0, u = (o = e.now) !== null && o !== void 0 ? o : Date.now, y = (i = e.sdkVersion) !== null && i !== void 0 ? i : Ee, g = (a = e.maxDistinct) !== null && a !== void 0 ? a : 20, v = (c = (l = e.deps) === null || l === void 0 ? void 0 : l.captureView) !== null && c !== void 0 ? c : En, w = (d = (p = e.deps) === null || p === void 0 ? void 0 : p.submitReport) !== null && d !== void 0 ? d : Sn, S = new $i({
2059
+ capacity: (s = e.burstCapacity) !== null && s !== void 0 ? s : 5,
2060
+ refillIntervalMs: (h = e.burstRefillMs) !== null && h !== void 0 ? h : Si,
2061
+ now: u
2062
+ }), k = /* @__PURE__ */ new Map();
2063
+ let N = 0;
2064
+ function T(R, I, $) {
2065
+ var M, O;
832
2066
  return {
833
- ...lt({
2067
+ ...tn({
834
2068
  kind: "bug",
835
- url: (R = m.location) === null || R === void 0 ? void 0 : R.href,
836
- environment: st(m, T),
837
- trace: O.trace ? (z = e.buffer) === null || z === void 0 ? void 0 : z.snapshot() : void 0
2069
+ url: (M = b.location) === null || M === void 0 ? void 0 : M.href,
2070
+ environment: en(b, y),
2071
+ trace: $.trace ? (O = e.buffer) === null || O === void 0 ? void 0 : O.snapshot() : void 0
838
2072
  }),
839
2073
  source: "auto",
840
- errorSignature: I,
841
- occurrences: L
2074
+ errorSignature: R,
2075
+ occurrences: I
842
2076
  };
843
2077
  }
844
- async function D(I, L, O) {
845
- const R = M.get(I);
846
- if (!R) return;
847
- const z = R.sentCount;
848
- R.sentCount = L;
2078
+ async function B(R, I, $) {
2079
+ const M = k.get(R);
2080
+ if (!M) return;
2081
+ const O = M.sentCount;
2082
+ M.sentCount = I;
849
2083
  try {
850
- const fe = y(I, L, O), J = nt(fe, {
2084
+ const W = T(R, I, $), Y = Gt(W, {
851
2085
  hook: e.beforeSend,
852
2086
  scrub: e.scrub
853
2087
  });
854
- if (!J) return;
855
- let Q = null;
856
- if (O.screenshot) {
857
- const G = await w({
858
- doc: p,
859
- win: m
2088
+ if (!Y) return;
2089
+ let ie = null;
2090
+ if ($.screenshot) {
2091
+ const Z = await v({
2092
+ doc: m,
2093
+ win: b
860
2094
  });
861
- Q = G ? {
862
- blob: G.blob,
863
- filename: `screenshot.${ct(G.type)}`
2095
+ ie = Z ? {
2096
+ blob: Z.blob,
2097
+ filename: `screenshot.${kn(Z.type)}`
864
2098
  } : null;
865
2099
  }
866
- !(await _(e.apiUrl, {
2100
+ !(await w(e.apiUrl, {
867
2101
  key: e.key,
868
2102
  identity: e.identity,
869
- content: J,
870
- screenshot: Q
871
- })).ok && R.sentCount === L && (R.sentCount = z);
2103
+ content: Y,
2104
+ screenshot: ie
2105
+ })).ok && M.sentCount === I && (M.sentCount = O);
872
2106
  } catch {
873
- R.sentCount === L && (R.sentCount = z);
2107
+ M.sentCount === I && (M.sentCount = O);
874
2108
  }
875
2109
  }
876
- function v(I) {
877
- const L = Yo(I.type, I.value, I.stack), O = M.get(L);
878
- if (O) {
879
- O.count += 1, O.lastAt = c();
2110
+ function x(R) {
2111
+ const I = Ui(R.type, R.value, R.stack), $ = k.get(I);
2112
+ if ($) {
2113
+ $.count += 1, $.lastAt = u();
880
2114
  return;
881
2115
  }
882
- if (!N.take()) {
883
- A += 1;
2116
+ if (!S.take()) {
2117
+ N += 1;
884
2118
  return;
885
2119
  }
886
- if (M.size >= C) {
887
- A += 1;
2120
+ if (k.size >= g) {
2121
+ N += 1;
888
2122
  return;
889
2123
  }
890
- const R = c();
891
- M.set(L, {
2124
+ const M = u();
2125
+ k.set(I, {
892
2126
  count: 1,
893
- firstAt: R,
894
- lastAt: R,
2127
+ firstAt: M,
2128
+ lastAt: M,
895
2129
  sentCount: 0
896
2130
  });
897
2131
  try {
898
- var z;
899
- (z = e.buffer) === null || z === void 0 || z.add(lo(I.original, R));
2132
+ var O, W;
2133
+ const Y = _i((O = e.buffer) === null || O === void 0 ? void 0 : O.snapshot());
2134
+ (W = e.buffer) === null || W === void 0 || W.add(_r(R.original, M, Y));
900
2135
  } catch {
901
2136
  }
902
- D(L, 1, {
2137
+ B(I, 1, {
903
2138
  screenshot: !0,
904
2139
  trace: !0
905
2140
  });
906
2141
  }
907
- const S = (I) => {
2142
+ const L = (R) => {
908
2143
  try {
909
- const L = qo(I);
910
- L && v(L);
2144
+ const I = Fi(R);
2145
+ I && x(I);
911
2146
  } catch {
912
2147
  }
913
- }, U = (I) => {
2148
+ }, F = (R) => {
914
2149
  try {
915
- const L = Wo(I);
916
- L && v(L);
2150
+ const I = Oi(R);
2151
+ I && x(I);
917
2152
  } catch {
918
2153
  }
919
- }, $ = () => {
2154
+ }, D = () => {
920
2155
  try {
921
- for (const [I, L] of M) L.count > L.sentCount && D(I, L.count, {
2156
+ for (const [R, I] of k) I.count > I.sentCount && B(R, I.count, {
922
2157
  screenshot: !1,
923
2158
  trace: !1
924
2159
  });
925
2160
  } catch {
926
2161
  }
927
- }, Z = () => {
928
- (p == null ? void 0 : p.visibilityState) === "hidden" && $();
2162
+ }, oe = () => {
2163
+ (m == null ? void 0 : m.visibilityState) === "hidden" && D();
929
2164
  };
930
- return m.addEventListener("error", S, !0), m.addEventListener("unhandledrejection", U, !0), m.addEventListener("pagehide", $), p == null || p.addEventListener("visibilitychange", Z), {
2165
+ return b.addEventListener("error", L, !0), b.addEventListener("unhandledrejection", F, !0), b.addEventListener("pagehide", D), m == null || m.addEventListener("visibilitychange", oe), {
931
2166
  destroy: () => {
932
- m.removeEventListener("error", S, !0), m.removeEventListener("unhandledrejection", U, !0), m.removeEventListener("pagehide", $), p == null || p.removeEventListener("visibilitychange", Z);
2167
+ b.removeEventListener("error", L, !0), b.removeEventListener("unhandledrejection", F, !0), b.removeEventListener("pagehide", D), m == null || m.removeEventListener("visibilitychange", oe);
933
2168
  },
934
- droppedCount: () => A
2169
+ droppedCount: () => N
935
2170
  };
936
2171
  }
937
- var Ke = "fixback.anonymousId";
938
- function qe() {
2172
+ var Ut = "fixback.anonymousId";
2173
+ function $t() {
939
2174
  const e = globalThis.crypto;
940
2175
  return e && typeof e.randomUUID == "function" ? e.randomUUID() : `fb-${Date.now().toString(36)}-${Math.random().toString(36).slice(2, 10)}`;
941
2176
  }
942
- function Qo() {
2177
+ function Hi() {
943
2178
  try {
944
- const e = globalThis.localStorage, t = e.getItem(Ke);
2179
+ const e = globalThis.localStorage, t = e.getItem(Ut);
945
2180
  if (t) return t;
946
- const o = qe();
947
- return e.setItem(Ke, o), o;
2181
+ const n = $t();
2182
+ return e.setItem(Ut, n), n;
948
2183
  } catch {
949
- return qe();
2184
+ return $t();
950
2185
  }
951
2186
  }
952
- var ft = "fixback_invite", en = "fixback:reporter:";
953
- function tn(e) {
2187
+ var Tn = "fixback_invite", Vi = "fixback:reporter:";
2188
+ function Xi(e) {
954
2189
  try {
955
- const t = new URL(e).searchParams.get(ft);
2190
+ const t = new URL(e).searchParams.get(Tn);
956
2191
  return t && t.length > 0 ? t : null;
957
2192
  } catch {
958
2193
  return null;
959
2194
  }
960
2195
  }
961
- function on(e) {
2196
+ function qi(e) {
962
2197
  try {
963
2198
  const t = new URL(e.location.href);
964
2199
  if (!t.searchParams.has("fixback_invite")) return;
965
- t.searchParams.delete(ft);
966
- const o = t.searchParams.toString(), n = `${t.pathname}${o ? `?${o}` : ""}${t.hash}`;
967
- e.history.replaceState(e.history.state, "", n);
2200
+ t.searchParams.delete(Tn);
2201
+ const n = t.searchParams.toString(), r = `${t.pathname}${n ? `?${n}` : ""}${t.hash}`;
2202
+ e.history.replaceState(e.history.state, "", r);
968
2203
  } catch {
969
2204
  }
970
2205
  }
971
- function bt(e) {
972
- return `${en}${e}`;
2206
+ function Cn(e) {
2207
+ return `${Vi}${e}`;
973
2208
  }
974
- function pt() {
2209
+ function _n() {
975
2210
  try {
976
2211
  var e;
977
2212
  return (e = globalThis.localStorage) !== null && e !== void 0 ? e : null;
@@ -979,99 +2214,99 @@ function pt() {
979
2214
  return null;
980
2215
  }
981
2216
  }
982
- function ue(e) {
2217
+ function Se(e) {
983
2218
  if (typeof e != "string") return;
984
2219
  const t = e.trim();
985
2220
  return t.length > 0 ? t : void 0;
986
2221
  }
987
- function nn(e, t, o = pt()) {
988
- if (!o) return;
989
- const n = ue(t.name), i = ue(t.email), r = {
2222
+ function Gi(e, t, n = _n()) {
2223
+ if (!n) return;
2224
+ const r = Se(t.name), o = Se(t.email), i = {
990
2225
  reporterId: t.reporterId,
991
- ...n ? { name: n } : {},
992
- ...i ? { email: i } : {}
2226
+ ...r ? { name: r } : {},
2227
+ ...o ? { email: o } : {}
993
2228
  };
994
2229
  try {
995
- o.setItem(bt(e), JSON.stringify(r));
2230
+ n.setItem(Cn(e), JSON.stringify(i));
996
2231
  } catch {
997
2232
  }
998
2233
  }
999
- function We(e, t = pt()) {
2234
+ function Ft(e, t = _n()) {
1000
2235
  if (!t) return null;
1001
2236
  try {
1002
- const o = t.getItem(bt(e));
1003
- if (!o) return null;
1004
- const n = JSON.parse(o);
1005
- if (typeof (n == null ? void 0 : n.reporterId) != "string" || n.reporterId.length === 0) return null;
1006
- const i = ue(n.name), r = ue(n.email);
2237
+ const n = t.getItem(Cn(e));
2238
+ if (!n) return null;
2239
+ const r = JSON.parse(n);
2240
+ if (typeof (r == null ? void 0 : r.reporterId) != "string" || r.reporterId.length === 0) return null;
2241
+ const o = Se(r.name), i = Se(r.email);
1007
2242
  return {
1008
- reporterId: n.reporterId,
1009
- ...i ? { name: i } : {},
1010
- ...r ? { email: r } : {}
2243
+ reporterId: r.reporterId,
2244
+ ...o ? { name: o } : {},
2245
+ ...i ? { email: i } : {}
1011
2246
  };
1012
2247
  } catch {
1013
2248
  return null;
1014
2249
  }
1015
2250
  }
1016
- function ht(e, t) {
2251
+ function An(e, t) {
1017
2252
  return `${e.replace(/\/+$/, "")}/api/invites/${encodeURIComponent(t)}`;
1018
2253
  }
1019
- function rn(e, t) {
1020
- return `${ht(e, t)}/redeem`;
2254
+ function Wi(e, t) {
2255
+ return `${An(e, t)}/redeem`;
1021
2256
  }
1022
- var vt = /* @__PURE__ */ new Set([
2257
+ var Ln = /* @__PURE__ */ new Set([
1023
2258
  "revoked",
1024
2259
  "expired",
1025
2260
  "exhausted",
1026
2261
  "not_found"
1027
2262
  ]);
1028
- function mt(e) {
2263
+ function Nn(e) {
1029
2264
  return e === "public" || e === "invited" || e === "internal";
1030
2265
  }
1031
- function an(e) {
2266
+ function Yi(e) {
1032
2267
  if (typeof e != "object" || e === null) return !1;
1033
2268
  const t = e;
1034
- return t.status === "pending" ? typeof t.projectId == "string" && (t.kind === "targeted" || t.kind === "shared") && mt(t.tier) : typeof t.status == "string" && vt.has(t.status);
2269
+ return t.status === "pending" ? typeof t.projectId == "string" && (t.kind === "targeted" || t.kind === "shared") && Nn(t.tier) : typeof t.status == "string" && Ln.has(t.status);
1035
2270
  }
1036
- function sn(e) {
2271
+ function Ki(e) {
1037
2272
  if (typeof e != "object" || e === null) return !1;
1038
2273
  const t = e;
1039
- return t.status === "redeemed" ? typeof t.reporterId == "string" && typeof t.projectId == "string" && mt(t.tier) : typeof t.status == "string" && vt.has(t.status);
2274
+ return t.status === "redeemed" ? typeof t.reporterId == "string" && typeof t.projectId == "string" && Nn(t.tier) : typeof t.status == "string" && Ln.has(t.status);
1040
2275
  }
1041
- async function gt(e) {
2276
+ async function In(e) {
1042
2277
  try {
1043
2278
  return await e.json();
1044
2279
  } catch {
1045
2280
  return null;
1046
2281
  }
1047
2282
  }
1048
- async function ln(e, t, o = fetch) {
1049
- let n;
2283
+ async function Zi(e, t, n = fetch) {
2284
+ let r;
1050
2285
  try {
1051
- n = await o(ht(e, t), {
2286
+ r = await n(An(e, t), {
1052
2287
  method: "GET",
1053
2288
  headers: { accept: "application/json" }
1054
2289
  });
1055
2290
  } catch {
1056
2291
  return null;
1057
2292
  }
1058
- const i = await gt(n);
1059
- return an(i) ? i : null;
2293
+ const o = await In(r);
2294
+ return Yi(o) ? o : null;
1060
2295
  }
1061
- async function cn(e, t, o = fetch) {
1062
- let n;
2296
+ async function Ji(e, t, n = fetch) {
2297
+ let r;
1063
2298
  try {
1064
- n = await o(rn(e, t), {
2299
+ r = await n(Wi(e, t), {
1065
2300
  method: "POST",
1066
2301
  headers: { accept: "application/json" }
1067
2302
  });
1068
2303
  } catch {
1069
2304
  return null;
1070
2305
  }
1071
- const i = await gt(n);
1072
- return sn(i) ? i : null;
2306
+ const o = await In(r);
2307
+ return Ki(o) ? o : null;
1073
2308
  }
1074
- var dn = `
2309
+ var Qi = `
1075
2310
  :host {
1076
2311
  /* Vendored Signal tokens (packages/ui/src/tokens.css). */
1077
2312
  --fb-color-accent: #2f6fed;
@@ -1317,78 +2552,78 @@ var dn = `
1317
2552
  animation: none;
1318
2553
  }
1319
2554
  }
1320
- `, Ze = "data-fixback-root", Se = "fixback:launch", un = "fixback:welcomed:", fn = 5e3, bn = 4400, pn = 280, hn = '<svg class="fb-launcher__icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" d="M3.25 2h9.5A1.25 1.25 0 0 1 14 3.25v6.5A1.25 1.25 0 0 1 12.75 11H7.6l-3.19 2.55A.6.6 0 0 1 3.4 13.1V11h-.15A1.25 1.25 0 0 1 2 9.75v-6.5A1.25 1.25 0 0 1 3.25 2Z"/></svg>', vn = '<svg class="fb-launcher__tuck-icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M4 6l4 4 4-4"/></svg>';
1321
- function mn(e, t) {
1322
- const o = un + (t != null ? t : "default");
2555
+ `, Ot = "data-fixback-root", et = "fixback:launch", ea = "fixback:welcomed:", ta = 5e3, na = 4400, ra = 280, oa = '<svg class="fb-launcher__icon" viewBox="0 0 16 16" aria-hidden="true" focusable="false"><path fill="currentColor" d="M3.25 2h9.5A1.25 1.25 0 0 1 14 3.25v6.5A1.25 1.25 0 0 1 12.75 11H7.6l-3.19 2.55A.6.6 0 0 1 3.4 13.1V11h-.15A1.25 1.25 0 0 1 2 9.75v-6.5A1.25 1.25 0 0 1 3.25 2Z"/></svg>', ia = '<svg class="fb-launcher__tuck-icon" viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.9" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" focusable="false"><path d="M4 6l4 4 4-4"/></svg>';
2556
+ function aa(e, t) {
2557
+ const n = ea + (t != null ? t : "default");
1323
2558
  try {
1324
- const n = e == null ? void 0 : e.localStorage;
1325
- return n ? n.getItem(o) === "1" ? !1 : (n.setItem(o, "1"), !0) : !0;
2559
+ const r = e == null ? void 0 : e.localStorage;
2560
+ return r ? r.getItem(n) === "1" ? !1 : (r.setItem(n, "1"), !0) : !0;
1326
2561
  } catch {
1327
2562
  return !0;
1328
2563
  }
1329
2564
  }
1330
- function gn(e, t = {}) {
1331
- const o = e.ownerDocument, n = o.defaultView, i = o.querySelector(`[${Ze}]`);
1332
- i && i.remove();
1333
- const r = o.createElement("div");
1334
- r.setAttribute(Ze, ""), r.style.cssText = "position:fixed;right:20px;bottom:20px;z-index:2147483000;margin:0;padding:0;border:0;", t.reduceMotion && r.setAttribute("data-fb-reduce-motion", "true");
1335
- const s = r.attachShadow({ mode: "open" }), f = o.createElement("style");
1336
- f.textContent = dn, s.appendChild(f);
1337
- const l = o.createElement("div");
2565
+ function sa(e, t = {}) {
2566
+ const n = e.ownerDocument, r = n.defaultView, o = n.querySelector(`[${Ot}]`);
2567
+ o && o.remove();
2568
+ const i = n.createElement("div");
2569
+ i.setAttribute(Ot, ""), i.style.cssText = "position:fixed;right:20px;bottom:20px;z-index:2147483000;margin:0;padding:0;border:0;", t.reduceMotion && i.setAttribute("data-fb-reduce-motion", "true");
2570
+ const a = i.attachShadow({ mode: "open" }), c = n.createElement("style");
2571
+ c.textContent = Qi, a.appendChild(c);
2572
+ const l = n.createElement("div");
1338
2573
  l.className = "fb-launcher";
1339
- const d = o.createElement("button");
1340
- d.type = "button", d.className = "fb-launcher__button", d.setAttribute("aria-haspopup", "dialog"), d.setAttribute("aria-label", "Give feedback"), d.innerHTML = `${hn}<span class="fb-launcher__label">Feedback</span>`, d.addEventListener("click", () => {
1341
- r.dispatchEvent(new CustomEvent(Se, {
2574
+ const d = n.createElement("button");
2575
+ d.type = "button", d.className = "fb-launcher__button", d.setAttribute("aria-haspopup", "dialog"), d.setAttribute("aria-label", "Give feedback"), d.innerHTML = `${oa}<span class="fb-launcher__label">Feedback</span>`, d.addEventListener("click", () => {
2576
+ i.dispatchEvent(new CustomEvent(et, {
1342
2577
  bubbles: !0,
1343
2578
  composed: !0
1344
2579
  }));
1345
2580
  });
1346
- const h = o.createElement("span");
1347
- h.className = "fb-launcher__divider", h.setAttribute("aria-hidden", "true");
1348
- const a = o.createElement("button");
1349
- a.type = "button", a.className = "fb-launcher__tuck", a.setAttribute("data-fb-tuck", ""), a.setAttribute("aria-label", "Hide feedback button"), a.title = "Tuck away — hover the corner to bring it back", a.innerHTML = vn, l.append(d, h, a);
1350
- const b = o.createElement("div");
1351
- b.className = "fb-launcher__peekzone", b.setAttribute("aria-hidden", "true");
1352
- const u = o.createElement("div");
1353
- u.className = "fb-launcher__nub", u.setAttribute("role", "button"), u.setAttribute("tabindex", "0"), u.setAttribute("aria-label", "Show feedback button"), s.append(l, b, u);
1354
- let m = !1, p = !1, c, T, C, w, _;
1355
- const N = () => {
1356
- m ? r.setAttribute("data-fb-hidden", "true") : r.removeAttribute("data-fb-hidden"), m && p ? r.setAttribute("data-fb-peeking", "true") : r.removeAttribute("data-fb-peeking");
1357
- }, M = () => {
1358
- T !== void 0 && (clearTimeout(T), T = void 0), l.classList.remove("fb-launcher--pulse"), w == null || w.remove(), w = void 0;
1359
- }, A = () => {
1360
- C !== void 0 && (clearTimeout(C), C = void 0), _ == null || _.remove(), _ = void 0;
1361
- }, y = () => {
1362
- c !== void 0 && (clearTimeout(c), c = void 0), p || (p = !0, N());
1363
- }, D = () => {
1364
- c !== void 0 && clearTimeout(c), c = setTimeout(() => {
1365
- c = void 0, p = !1, N();
1366
- }, pn);
2581
+ const p = n.createElement("span");
2582
+ p.className = "fb-launcher__divider", p.setAttribute("aria-hidden", "true");
2583
+ const s = n.createElement("button");
2584
+ s.type = "button", s.className = "fb-launcher__tuck", s.setAttribute("data-fb-tuck", ""), s.setAttribute("aria-label", "Hide feedback button"), s.title = "Tuck away — hover the corner to bring it back", s.innerHTML = ia, l.append(d, p, s);
2585
+ const h = n.createElement("div");
2586
+ h.className = "fb-launcher__peekzone", h.setAttribute("aria-hidden", "true");
2587
+ const f = n.createElement("div");
2588
+ f.className = "fb-launcher__nub", f.setAttribute("role", "button"), f.setAttribute("tabindex", "0"), f.setAttribute("aria-label", "Show feedback button"), a.append(l, h, f);
2589
+ let b = !1, m = !1, u, y, g, v, w;
2590
+ const S = () => {
2591
+ b ? i.setAttribute("data-fb-hidden", "true") : i.removeAttribute("data-fb-hidden"), b && m ? i.setAttribute("data-fb-peeking", "true") : i.removeAttribute("data-fb-peeking");
2592
+ }, k = () => {
2593
+ y !== void 0 && (clearTimeout(y), y = void 0), l.classList.remove("fb-launcher--pulse"), v == null || v.remove(), v = void 0;
2594
+ }, N = () => {
2595
+ g !== void 0 && (clearTimeout(g), g = void 0), w == null || w.remove(), w = void 0;
2596
+ }, T = () => {
2597
+ u !== void 0 && (clearTimeout(u), u = void 0), m || (m = !0, S());
2598
+ }, B = () => {
2599
+ u !== void 0 && clearTimeout(u), u = setTimeout(() => {
2600
+ u = void 0, m = !1, S();
2601
+ }, ra);
1367
2602
  };
1368
- for (const $ of [
2603
+ for (const D of [
1369
2604
  l,
1370
- b,
1371
- u
2605
+ h,
2606
+ f
1372
2607
  ])
1373
- $.addEventListener("mouseenter", y), $.addEventListener("mouseleave", D);
1374
- const v = () => {
1375
- c !== void 0 && (clearTimeout(c), c = void 0), m = !1, p = !1, N(), A();
1376
- }, S = () => {
1377
- M(), m = !0, p = !1, N(), A(), _ = o.createElement("div"), _.className = "fb-launcher__hint", _.setAttribute("role", "status"), _.textContent = "Tucked away down here. Hover the bottom-right corner and I'll bring it back.", s.appendChild(_), C = setTimeout(A, bn);
2608
+ D.addEventListener("mouseenter", T), D.addEventListener("mouseleave", B);
2609
+ const x = () => {
2610
+ u !== void 0 && (clearTimeout(u), u = void 0), b = !1, m = !1, S(), N();
2611
+ }, L = () => {
2612
+ k(), b = !0, m = !1, S(), N(), w = n.createElement("div"), w.className = "fb-launcher__hint", w.setAttribute("role", "status"), w.textContent = "Tucked away down here. Hover the bottom-right corner and I'll bring it back.", a.appendChild(w), g = setTimeout(N, na);
1378
2613
  };
1379
- return a.addEventListener("click", S), u.addEventListener("click", v), u.addEventListener("keydown", ($) => {
1380
- ($.key === "Enter" || $.key === " " || $.key === "Spacebar") && ($.preventDefault(), v());
1381
- }), mn(n, t.key) && (w = o.createElement("div"), w.className = "fb-launcher__welcome", w.setAttribute("role", "status"), w.innerHTML = "You're all set — tap <strong>Feedback</strong> any time to report something.", s.appendChild(w), t.reduceMotion || l.classList.add("fb-launcher--pulse"), T = setTimeout(M, fn)), e.appendChild(r), {
1382
- host: r,
2614
+ return s.addEventListener("click", L), f.addEventListener("click", x), f.addEventListener("keydown", (D) => {
2615
+ (D.key === "Enter" || D.key === " " || D.key === "Spacebar") && (D.preventDefault(), x());
2616
+ }), aa(r, t.key) && (v = n.createElement("div"), v.className = "fb-launcher__welcome", v.setAttribute("role", "status"), v.innerHTML = "You're all set — tap <strong>Feedback</strong> any time to report something.", a.appendChild(v), t.reduceMotion || l.classList.add("fb-launcher--pulse"), y = setTimeout(k, ta)), e.appendChild(i), {
2617
+ host: i,
1383
2618
  dispose: () => {
1384
- c !== void 0 && clearTimeout(c), T !== void 0 && clearTimeout(T), C !== void 0 && clearTimeout(C);
2619
+ u !== void 0 && clearTimeout(u), y !== void 0 && clearTimeout(y), g !== void 0 && clearTimeout(g);
1385
2620
  }
1386
2621
  };
1387
2622
  }
1388
- function xn(e) {
2623
+ function la(e) {
1389
2624
  e.dispose(), e.host.remove();
1390
2625
  }
1391
- var yn = `
2626
+ var ca = `
1392
2627
  :host {
1393
2628
  --fb-color-accent: #2f6fed;
1394
2629
  --fb-color-accent-hover: #245fd0;
@@ -1582,214 +2817,214 @@ var yn = `
1582
2817
  @media (prefers-reduced-motion: reduce) {
1583
2818
  .fb-ob-backdrop, .fb-ob-panel { animation: none; }
1584
2819
  }
1585
- `, wn = "data-fixback-onboard", kn = {
2820
+ `, ua = "data-fixback-onboard", da = {
1586
2821
  invited: "Invited tester",
1587
2822
  internal: "Internal",
1588
2823
  public: "Public"
1589
- }, En = {
2824
+ }, fa = {
1590
2825
  invited: "reviewed before it ships",
1591
2826
  internal: "ships straight through",
1592
2827
  public: "tracked, not auto-shipped"
1593
- }, _n = '<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="#2f9e5b" stroke-width="1.5" aria-hidden="true"><path d="M8 1.8 13.5 4v3.5c0 3.6-2.4 5.6-5.5 6.7C4.9 13.1 2.5 11.1 2.5 7.5V4z"/><path d="M5.8 8 7.3 9.5 10.3 6.2"/></svg>';
1594
- function E(e, t, o = {}, n = []) {
1595
- const i = e.createElement(t);
1596
- for (const [r, s] of Object.entries(o)) s !== void 0 && i.setAttribute(r, s);
1597
- for (const r of n) i.appendChild(typeof r == "string" ? e.createTextNode(r) : r);
1598
- return i;
2828
+ }, pa = '<svg width="14" height="14" viewBox="0 0 16 16" fill="none" stroke="#2f9e5b" stroke-width="1.5" aria-hidden="true"><path d="M8 1.8 13.5 4v3.5c0 3.6-2.4 5.6-5.5 6.7C4.9 13.1 2.5 11.1 2.5 7.5V4z"/><path d="M5.8 8 7.3 9.5 10.3 6.2"/></svg>';
2829
+ function A(e, t, n = {}, r = []) {
2830
+ const o = e.createElement(t);
2831
+ for (const [i, a] of Object.entries(n)) a !== void 0 && o.setAttribute(i, a);
2832
+ for (const i of r) o.appendChild(typeof i == "string" ? e.createTextNode(i) : i);
2833
+ return o;
1599
2834
  }
1600
- function ce(e) {
2835
+ function we(e) {
1601
2836
  const t = e.trim();
1602
2837
  return t.length > 0 ? t : void 0;
1603
2838
  }
1604
- function Sn(e) {
1605
- var t, o, n, i, r, s;
1606
- const f = (t = e.target) !== null && t !== void 0 ? t : document.body, l = (o = e.doc) !== null && o !== void 0 ? o : f.ownerDocument;
1607
- (n = l.querySelector("[data-fixback-onboard]")) === null || n === void 0 || n.remove();
1608
- const d = E(l, "div", { [wn]: "" }), h = d.attachShadow({ mode: "open" }), a = l.createElement("style");
1609
- a.textContent = yn, h.appendChild(a);
1610
- const b = E(l, "div", { class: "fb-ob-head" }, [
1611
- E(l, "span", { class: "fb-ob-mark" }),
1612
- E(l, "span", { class: "fb-ob-brand" }, ["Fixback"]),
1613
- E(l, "span", { class: "fb-ob-chip" }, ["invite link"])
1614
- ]), u = E(l, "p", { class: "fb-ob-lede" }, [
2839
+ function ba(e) {
2840
+ var t, n, r, o, i, a;
2841
+ const c = (t = e.target) !== null && t !== void 0 ? t : document.body, l = (n = e.doc) !== null && n !== void 0 ? n : c.ownerDocument;
2842
+ (r = l.querySelector("[data-fixback-onboard]")) === null || r === void 0 || r.remove();
2843
+ const d = A(l, "div", { [ua]: "" }), p = d.attachShadow({ mode: "open" }), s = l.createElement("style");
2844
+ s.textContent = ca, p.appendChild(s);
2845
+ const h = A(l, "div", { class: "fb-ob-head" }, [
2846
+ A(l, "span", { class: "fb-ob-mark" }),
2847
+ A(l, "span", { class: "fb-ob-brand" }, ["Fixback"]),
2848
+ A(l, "span", { class: "fb-ob-chip" }, ["invite link"])
2849
+ ]), f = A(l, "p", { class: "fb-ob-lede" }, [
1615
2850
  "You've been invited to give feedback on ",
1616
- E(l, "strong", {}, [e.origin]),
2851
+ A(l, "strong", {}, [e.origin]),
1617
2852
  ". Point, mark up, send."
1618
- ]), m = E(l, "div", { class: "fb-ob-card" }, [E(l, "div", { class: "fb-ob-row" }, [E(l, "span", { class: "fb-ob-rowlabel" }, ["SITE"]), E(l, "span", { class: "fb-ob-site" }, [e.origin])]), E(l, "div", { class: "fb-ob-row" }, [
1619
- E(l, "span", { class: "fb-ob-rowlabel" }, ["ACCESS"]),
1620
- E(l, "span", { class: "fb-ob-tier" }, [kn[e.tier]]),
1621
- E(l, "span", { class: "fb-ob-tiernote" }, [En[e.tier]])
1622
- ])]), p = E(l, "input", {
2853
+ ]), b = A(l, "div", { class: "fb-ob-card" }, [A(l, "div", { class: "fb-ob-row" }, [A(l, "span", { class: "fb-ob-rowlabel" }, ["SITE"]), A(l, "span", { class: "fb-ob-site" }, [e.origin])]), A(l, "div", { class: "fb-ob-row" }, [
2854
+ A(l, "span", { class: "fb-ob-rowlabel" }, ["ACCESS"]),
2855
+ A(l, "span", { class: "fb-ob-tier" }, [da[e.tier]]),
2856
+ A(l, "span", { class: "fb-ob-tiernote" }, [fa[e.tier]])
2857
+ ])]), m = A(l, "input", {
1623
2858
  class: "fb-ob-input fb-ob-name",
1624
2859
  type: "text",
1625
2860
  "aria-label": "Name",
1626
2861
  placeholder: "Name"
1627
- }), c = E(l, "input", {
2862
+ }), u = A(l, "input", {
1628
2863
  class: "fb-ob-input fb-ob-email",
1629
2864
  type: "email",
1630
2865
  "aria-label": "Email",
1631
2866
  placeholder: "email@example.com"
1632
2867
  });
1633
- !((i = e.defaults) === null || i === void 0) && i.name && (p.value = e.defaults.name), !((r = e.defaults) === null || r === void 0) && r.email && (c.value = e.defaults.email);
1634
- const T = E(l, "div", { class: "fb-ob-privacy" }), C = E(l, "span");
1635
- C.innerHTML = _n, T.appendChild((s = C.firstChild) !== null && s !== void 0 ? s : l.createTextNode("")), T.appendChild(E(l, "span", {}, [E(l, "strong", {}, ["Private by default."]), " Anything you type is masked before it leaves your browser."]));
1636
- const w = E(l, "div", { class: "fb-ob-body" }, [
1637
- E(l, "div", { class: "fb-ob-title" }, ["You're invited to give feedback"]),
1638
- u,
1639
- m,
1640
- E(l, "label", {
2868
+ !((o = e.defaults) === null || o === void 0) && o.name && (m.value = e.defaults.name), !((i = e.defaults) === null || i === void 0) && i.email && (u.value = e.defaults.email);
2869
+ const y = A(l, "div", { class: "fb-ob-privacy" }), g = A(l, "span");
2870
+ g.innerHTML = pa, y.appendChild((a = g.firstChild) !== null && a !== void 0 ? a : l.createTextNode("")), y.appendChild(A(l, "span", {}, [A(l, "strong", {}, ["Private by default."]), " Anything you type is masked before it leaves your browser."]));
2871
+ const v = A(l, "div", { class: "fb-ob-body" }, [
2872
+ A(l, "div", { class: "fb-ob-title" }, ["You're invited to give feedback"]),
2873
+ f,
2874
+ b,
2875
+ A(l, "label", {
1641
2876
  class: "fb-ob-fieldlabel",
1642
2877
  for: "fb-ob-name-input"
1643
2878
  }, ["Continue as"]),
1644
- E(l, "div", { class: "fb-ob-fields" }, [p, c]),
1645
- T
2879
+ A(l, "div", { class: "fb-ob-fields" }, [m, u]),
2880
+ y
1646
2881
  ]);
1647
- p.id = "fb-ob-name-input";
1648
- const _ = E(l, "button", {
2882
+ m.id = "fb-ob-name-input";
2883
+ const w = A(l, "button", {
1649
2884
  type: "button",
1650
2885
  class: "fb-ob-confirm"
1651
- }, ["Start giving feedback"]), N = E(l, "div", { class: "fb-ob-backdrop" }, [E(l, "div", {
2886
+ }, ["Start giving feedback"]), S = A(l, "div", { class: "fb-ob-backdrop" }, [A(l, "div", {
1652
2887
  class: "fb-ob-panel",
1653
2888
  role: "dialog",
1654
2889
  "aria-modal": "true",
1655
2890
  "aria-label": "Fixback invite"
1656
2891
  }, [
1657
- b,
1658
- w,
1659
- E(l, "div", { class: "fb-ob-foot" }, [_])
2892
+ h,
2893
+ v,
2894
+ A(l, "div", { class: "fb-ob-foot" }, [w])
1660
2895
  ])]);
1661
- h.appendChild(N);
1662
- let M = !1;
1663
- return _.addEventListener("click", () => {
1664
- if (M) return;
1665
- M = !0, _.disabled = !0;
1666
- const A = {
1667
- ...ce(p.value) ? { name: ce(p.value) } : {},
1668
- ...ce(c.value) ? { email: ce(c.value) } : {}
2896
+ p.appendChild(S);
2897
+ let k = !1;
2898
+ return w.addEventListener("click", () => {
2899
+ if (k) return;
2900
+ k = !0, w.disabled = !0;
2901
+ const N = {
2902
+ ...we(m.value) ? { name: we(m.value) } : {},
2903
+ ...we(u.value) ? { email: we(u.value) } : {}
1669
2904
  };
1670
- e.onConfirm(A);
1671
- }), f.appendChild(d), {
2905
+ e.onConfirm(N);
2906
+ }), c.appendChild(d), {
1672
2907
  host: d,
1673
2908
  destroy: () => d.remove()
1674
2909
  };
1675
2910
  }
1676
- var Tn = "http://www.w3.org/2000/svg", ke = "3", Je = 4, Cn = '600 16px "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif';
1677
- function Ln(e) {
1678
- var t, o;
1679
- const n = (t = e.doc) !== null && t !== void 0 ? t : document, { svg: i, textInput: r } = e, s = (o = e.color) !== null && o !== void 0 ? o : go;
1680
- let f = "arrow", l = e.initialMarks ? e.initialMarks.slice() : [], d = null, h = !1, a = null, b = !1;
1681
- function u() {
1682
- var v;
1683
- (v = e.onChange) === null || v === void 0 || v.call(e, l.slice());
2911
+ var ha = "http://www.w3.org/2000/svg", Xe = "3", zt = 4, ma = '600 16px "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif';
2912
+ function va(e) {
2913
+ var t, n;
2914
+ const r = (t = e.doc) !== null && t !== void 0 ? t : document, { svg: o, textInput: i } = e, a = (n = e.color) !== null && n !== void 0 ? n : Hr;
2915
+ let c = "arrow", l = e.initialMarks ? e.initialMarks.slice() : [], d = null, p = !1, s = null, h = !1;
2916
+ function f() {
2917
+ var x;
2918
+ (x = e.onChange) === null || x === void 0 || x.call(e, l.slice());
1684
2919
  }
1685
- function m(v) {
2920
+ function b(x) {
1686
2921
  return {
1687
- x: Math.round(v.clientX),
1688
- y: Math.round(v.clientY)
2922
+ x: Math.round(x.clientX),
2923
+ y: Math.round(x.clientY)
1689
2924
  };
1690
2925
  }
1691
- function p(v) {
1692
- const S = typeof v.composedPath == "function" ? v.composedPath() : [v.target];
1693
- for (const U of S) {
1694
- if (U === n) break;
1695
- if (U instanceof Element) {
1696
- const $ = U.tagName;
1697
- if ($ === "BUTTON" || $ === "INPUT" || $ === "TEXTAREA") return !0;
2926
+ function m(x) {
2927
+ const L = typeof x.composedPath == "function" ? x.composedPath() : [x.target];
2928
+ for (const F of L) {
2929
+ if (F === r) break;
2930
+ if (F instanceof Element) {
2931
+ const D = F.tagName;
2932
+ if (D === "BUTTON" || D === "INPUT" || D === "TEXTAREA") return !0;
1698
2933
  }
1699
2934
  }
1700
2935
  return !1;
1701
2936
  }
1702
- function c(v) {
1703
- return v.type === "pen" ? v.points.length > 1 : v.type === "text" ? v.text.trim().length > 0 : Math.abs(v.x1 - v.x0) > Je || Math.abs(v.y1 - v.y0) > Je;
2937
+ function u(x) {
2938
+ return x.type === "pen" ? x.points.length > 1 : x.type === "text" ? x.text.trim().length > 0 : Math.abs(x.x1 - x.x0) > zt || Math.abs(x.y1 - x.y0) > zt;
1704
2939
  }
1705
- function T(v) {
1706
- if (b || h || p(v)) return;
1707
- const S = m(v);
1708
- if (f === "text") {
1709
- _(S);
2940
+ function y(x) {
2941
+ if (h || p || m(x)) return;
2942
+ const L = b(x);
2943
+ if (c === "text") {
2944
+ w(L);
1710
2945
  return;
1711
2946
  }
1712
- v.cancelable && v.preventDefault(), h = !0, d = f === "pen" ? {
2947
+ x.cancelable && x.preventDefault(), p = !0, d = c === "pen" ? {
1713
2948
  type: "pen",
1714
- points: [S],
1715
- color: s
2949
+ points: [L],
2950
+ color: a
1716
2951
  } : {
1717
- type: f,
1718
- x0: S.x,
1719
- y0: S.y,
1720
- x1: S.x,
1721
- y1: S.y,
1722
- color: s
1723
- }, y();
1724
- }
1725
- function C(v) {
1726
- if (b || !h || !d) return;
1727
- const S = m(v);
2952
+ type: c,
2953
+ x0: L.x,
2954
+ y0: L.y,
2955
+ x1: L.x,
2956
+ y1: L.y,
2957
+ color: a
2958
+ }, T();
2959
+ }
2960
+ function g(x) {
2961
+ if (h || !p || !d) return;
2962
+ const L = b(x);
1728
2963
  d.type === "pen" ? d = {
1729
2964
  type: "pen",
1730
- points: [...d.points, S],
2965
+ points: [...d.points, L],
1731
2966
  color: d.color
1732
2967
  } : d = {
1733
2968
  ...d,
1734
- x1: S.x,
1735
- y1: S.y
1736
- }, y();
1737
- }
1738
- function w() {
1739
- if (b || !h) return;
1740
- h = !1;
1741
- const v = d;
1742
- d = null, v && c(v) && (l = [...l, v], u()), y();
1743
- }
1744
- function _(v) {
1745
- a = v, r.value = "", r.style.display = "block", r.style.left = `${v.x}px`, r.style.top = `${v.y}px`, r.onkeydown = N, r.onblur = M, setTimeout(() => {
2969
+ x1: L.x,
2970
+ y1: L.y
2971
+ }, T();
2972
+ }
2973
+ function v() {
2974
+ if (h || !p) return;
2975
+ p = !1;
2976
+ const x = d;
2977
+ d = null, x && u(x) && (l = [...l, x], f()), T();
2978
+ }
2979
+ function w(x) {
2980
+ s = x, i.value = "", i.style.display = "block", i.style.left = `${x.x}px`, i.style.top = `${x.y}px`, i.onkeydown = S, i.onblur = k, setTimeout(() => {
1746
2981
  try {
1747
- r.focus();
2982
+ i.focus();
1748
2983
  } catch {
1749
2984
  }
1750
2985
  }, 0);
1751
2986
  }
1752
- function N(v) {
1753
- v.key === "Enter" ? (v.preventDefault(), v.stopPropagation(), M()) : v.key === "Escape" && (v.preventDefault(), v.stopPropagation(), A());
2987
+ function S(x) {
2988
+ x.key === "Enter" ? (x.preventDefault(), x.stopPropagation(), k()) : x.key === "Escape" && (x.preventDefault(), x.stopPropagation(), N());
1754
2989
  }
1755
- function M() {
1756
- if (!a) return;
1757
- const v = r.value.trim(), S = a;
1758
- A(), v.length > 0 && (l = [...l, {
2990
+ function k() {
2991
+ if (!s) return;
2992
+ const x = i.value.trim(), L = s;
2993
+ N(), x.length > 0 && (l = [...l, {
1759
2994
  type: "text",
1760
- x: S.x,
1761
- y: S.y,
1762
- text: v,
1763
- color: s
1764
- }], u(), y());
1765
- }
1766
- function A() {
1767
- a = null, r.onkeydown = null, r.onblur = null, r.value = "", r.style.display = "none";
1768
- }
1769
- function y() {
1770
- for (; i.firstChild; ) i.removeChild(i.firstChild);
1771
- for (const v of l) i.appendChild(Qe(n, v));
1772
- d && i.appendChild(Qe(n, d));
1773
- }
1774
- function D() {
1775
- b || (b = !0, n.removeEventListener("mousedown", T, !0), n.removeEventListener("mousemove", C, !0), n.removeEventListener("mouseup", w, !0), A());
1776
- }
1777
- return n.addEventListener("mousedown", T, !0), n.addEventListener("mousemove", C, !0), n.addEventListener("mouseup", w, !0), y(), {
1778
- setTool: (v) => {
1779
- f = v;
2995
+ x: L.x,
2996
+ y: L.y,
2997
+ text: x,
2998
+ color: a
2999
+ }], f(), T());
3000
+ }
3001
+ function N() {
3002
+ s = null, i.onkeydown = null, i.onblur = null, i.value = "", i.style.display = "none";
3003
+ }
3004
+ function T() {
3005
+ for (; o.firstChild; ) o.removeChild(o.firstChild);
3006
+ for (const x of l) o.appendChild(jt(r, x));
3007
+ d && o.appendChild(jt(r, d));
3008
+ }
3009
+ function B() {
3010
+ h || (h = !0, r.removeEventListener("mousedown", y, !0), r.removeEventListener("mousemove", g, !0), r.removeEventListener("mouseup", v, !0), N());
3011
+ }
3012
+ return r.addEventListener("mousedown", y, !0), r.addEventListener("mousemove", g, !0), r.addEventListener("mouseup", v, !0), T(), {
3013
+ setTool: (x) => {
3014
+ c = x;
1780
3015
  },
1781
- getTool: () => f,
3016
+ getTool: () => c,
1782
3017
  undo: () => {
1783
- l.length !== 0 && (l = l.slice(0, -1), u(), y());
3018
+ l.length !== 0 && (l = l.slice(0, -1), f(), T());
1784
3019
  },
1785
3020
  marks: () => l.slice(),
1786
- stop: D
3021
+ stop: B
1787
3022
  };
1788
3023
  }
1789
- function Qe(e, t) {
3024
+ function jt(e, t) {
1790
3025
  switch (t.type) {
1791
3026
  case "box":
1792
- return q(e, "rect", {
3027
+ return ee(e, "rect", {
1793
3028
  x: String(Math.min(t.x0, t.x1)),
1794
3029
  y: String(Math.min(t.y0, t.y1)),
1795
3030
  width: String(Math.abs(t.x1 - t.x0)),
@@ -1797,87 +3032,87 @@ function Qe(e, t) {
1797
3032
  rx: "2",
1798
3033
  fill: "none",
1799
3034
  stroke: t.color,
1800
- "stroke-width": ke
3035
+ "stroke-width": Xe
1801
3036
  });
1802
3037
  case "pen":
1803
- return q(e, "polyline", {
1804
- points: t.points.map((o) => `${o.x},${o.y}`).join(" "),
3038
+ return ee(e, "polyline", {
3039
+ points: t.points.map((n) => `${n.x},${n.y}`).join(" "),
1805
3040
  fill: "none",
1806
3041
  stroke: t.color,
1807
- "stroke-width": ke,
3042
+ "stroke-width": Xe,
1808
3043
  "stroke-linecap": "round",
1809
3044
  "stroke-linejoin": "round"
1810
3045
  });
1811
3046
  case "text": {
1812
- const o = q(e, "text", {
3047
+ const n = ee(e, "text", {
1813
3048
  x: String(t.x),
1814
3049
  y: String(t.y),
1815
3050
  fill: t.color,
1816
- style: `font:${Cn}`
3051
+ style: `font:${ma}`
1817
3052
  });
1818
- return o.textContent = t.text, o;
3053
+ return n.textContent = t.text, n;
1819
3054
  }
1820
3055
  case "arrow": {
1821
- const o = q(e, "g", {});
1822
- o.appendChild(q(e, "line", {
3056
+ const n = ee(e, "g", {});
3057
+ n.appendChild(ee(e, "line", {
1823
3058
  x1: String(t.x0),
1824
3059
  y1: String(t.y0),
1825
3060
  x2: String(t.x1),
1826
3061
  y2: String(t.y1),
1827
3062
  stroke: t.color,
1828
- "stroke-width": ke,
3063
+ "stroke-width": Xe,
1829
3064
  "stroke-linecap": "round"
1830
3065
  }));
1831
- const n = xo(t.x0, t.y0, t.x1, t.y1);
1832
- return o.appendChild(q(e, "polygon", {
1833
- points: n.map((i) => `${i.x},${i.y}`).join(" "),
3066
+ const r = Vr(t.x0, t.y0, t.x1, t.y1);
3067
+ return n.appendChild(ee(e, "polygon", {
3068
+ points: r.map((o) => `${o.x},${o.y}`).join(" "),
1834
3069
  fill: t.color
1835
- })), o;
3070
+ })), n;
1836
3071
  }
1837
3072
  }
1838
3073
  }
1839
- function q(e, t, o) {
1840
- const n = e.createElementNS(Tn, t);
1841
- for (const [i, r] of Object.entries(o)) n.setAttribute(i, r);
1842
- return n;
1843
- }
1844
- var Mn = 12;
1845
- function An(e) {
1846
- var t, o;
1847
- const n = (t = e.doc) !== null && t !== void 0 ? t : document, i = (o = e.minSize) !== null && o !== void 0 ? o : Mn;
1848
- let r = null, s = !1;
1849
- function f(b) {
1850
- s || r || (r = {
1851
- x: b.clientX,
1852
- y: b.clientY
1853
- }, b.cancelable && b.preventDefault());
1854
- }
1855
- function l(b) {
1856
- var u;
1857
- s || !r || (u = e.onProgress) === null || u === void 0 || u.call(e, Ge(r.x, r.y, b.clientX, b.clientY));
1858
- }
1859
- function d(b) {
1860
- if (s || !r) return;
1861
- const u = Ge(r.x, r.y, b.clientX, b.clientY);
1862
- if (r = null, a(), u.width < i || u.height < i) {
1863
- var m;
1864
- (m = e.onCancel) === null || m === void 0 || m.call(e);
3074
+ function ee(e, t, n) {
3075
+ const r = e.createElementNS(ha, t);
3076
+ for (const [o, i] of Object.entries(n)) r.setAttribute(o, i);
3077
+ return r;
3078
+ }
3079
+ var ga = 12;
3080
+ function ya(e) {
3081
+ var t, n;
3082
+ const r = (t = e.doc) !== null && t !== void 0 ? t : document, o = (n = e.minSize) !== null && n !== void 0 ? n : ga;
3083
+ let i = null, a = !1;
3084
+ function c(h) {
3085
+ a || i || (i = {
3086
+ x: h.clientX,
3087
+ y: h.clientY
3088
+ }, h.cancelable && h.preventDefault());
3089
+ }
3090
+ function l(h) {
3091
+ var f;
3092
+ a || !i || (f = e.onProgress) === null || f === void 0 || f.call(e, Lt(i.x, i.y, h.clientX, h.clientY));
3093
+ }
3094
+ function d(h) {
3095
+ if (a || !i) return;
3096
+ const f = Lt(i.x, i.y, h.clientX, h.clientY);
3097
+ if (i = null, s(), f.width < o || f.height < o) {
3098
+ var b;
3099
+ (b = e.onCancel) === null || b === void 0 || b.call(e);
1865
3100
  return;
1866
3101
  }
1867
- e.onComplete(u);
3102
+ e.onComplete(f);
1868
3103
  }
1869
- function h(b) {
1870
- if (!s && b.key === "Escape") {
1871
- var u;
1872
- b.preventDefault(), a(), (u = e.onCancel) === null || u === void 0 || u.call(e);
3104
+ function p(h) {
3105
+ if (!a && h.key === "Escape") {
3106
+ var f;
3107
+ h.preventDefault(), s(), (f = e.onCancel) === null || f === void 0 || f.call(e);
1873
3108
  }
1874
3109
  }
1875
- function a() {
1876
- s || (s = !0, n.removeEventListener("mousedown", f, !0), n.removeEventListener("mousemove", l, !0), n.removeEventListener("mouseup", d, !0), n.removeEventListener("keydown", h, !0), r = null);
3110
+ function s() {
3111
+ a || (a = !0, r.removeEventListener("mousedown", c, !0), r.removeEventListener("mousemove", l, !0), r.removeEventListener("mouseup", d, !0), r.removeEventListener("keydown", p, !0), i = null);
1877
3112
  }
1878
- return n.addEventListener("mousedown", f, !0), n.addEventListener("mousemove", l, !0), n.addEventListener("mouseup", d, !0), n.addEventListener("keydown", h, !0), { stop: a };
3113
+ return r.addEventListener("mousedown", c, !0), r.addEventListener("mousemove", l, !0), r.addEventListener("mouseup", d, !0), r.addEventListener("keydown", p, !0), { stop: s };
1879
3114
  }
1880
- var In = `
3115
+ var wa = `
1881
3116
  :host {
1882
3117
  --fb-color-accent: #2f6fed;
1883
3118
  --fb-color-accent-hover: #245fd0;
@@ -2226,7 +3461,7 @@ var In = `
2226
3461
  @media (prefers-reduced-motion: reduce) {
2227
3462
  .fb-ov-highlight { transition: none; }
2228
3463
  }
2229
- `, Rn = "data-fixback-overlay", $n = "http://www.w3.org/2000/svg", Nn = [
3464
+ `, xa = "data-fixback-overlay", ka = "http://www.w3.org/2000/svg", Ea = [
2230
3465
  {
2231
3466
  value: "bug",
2232
3467
  label: "Bug"
@@ -2239,7 +3474,7 @@ var In = `
2239
3474
  value: "idea",
2240
3475
  label: "Idea"
2241
3476
  }
2242
- ], Bn = [
3477
+ ], Sa = [
2243
3478
  {
2244
3479
  tool: "arrow",
2245
3480
  label: "Arrow"
@@ -2256,377 +3491,377 @@ var In = `
2256
3491
  tool: "text",
2257
3492
  label: "Text label"
2258
3493
  }
2259
- ], et = 1800;
2260
- function x(e, t, o = {}, n = []) {
2261
- const i = e.createElement(t);
2262
- for (const [r, s] of Object.entries(o)) s !== void 0 && i.setAttribute(r, s);
2263
- for (const r of n) i.appendChild(typeof r == "string" ? e.createTextNode(r) : r);
2264
- return i;
2265
- }
2266
- function j(e, t, o = {}, n = []) {
2267
- const i = e.createElementNS($n, t);
2268
- for (const [r, s] of Object.entries(o)) i.setAttribute(r, s);
2269
- for (const r of n) i.appendChild(r);
2270
- return i;
2271
- }
2272
- function Pn(e) {
2273
- var t, o, n, i, r, s, f, l, d, h;
2274
- const a = (t = e.doc) !== null && t !== void 0 ? t : document, b = (o = (n = e.win) !== null && n !== void 0 ? n : a.defaultView) !== null && o !== void 0 ? o : window, u = (i = e.sdkVersion) !== null && i !== void 0 ? i : de, m = {
2275
- captureView: (r = (s = e.deps) === null || s === void 0 ? void 0 : s.captureView) !== null && r !== void 0 ? r : dt,
2276
- submitReport: (f = (l = e.deps) === null || l === void 0 ? void 0 : l.submitReport) !== null && f !== void 0 ? f : ut,
2277
- startElementPicker: (d = (h = e.deps) === null || h === void 0 ? void 0 : h.startElementPicker) !== null && d !== void 0 ? d : Ft
3494
+ ], Ht = 1800;
3495
+ function C(e, t, n = {}, r = []) {
3496
+ const o = e.createElement(t);
3497
+ for (const [i, a] of Object.entries(n)) a !== void 0 && o.setAttribute(i, a);
3498
+ for (const i of r) o.appendChild(typeof i == "string" ? e.createTextNode(i) : i);
3499
+ return o;
3500
+ }
3501
+ function j(e, t, n = {}, r = []) {
3502
+ const o = e.createElementNS(ka, t);
3503
+ for (const [i, a] of Object.entries(n)) o.setAttribute(i, a);
3504
+ for (const i of r) o.appendChild(i);
3505
+ return o;
3506
+ }
3507
+ function Ta(e) {
3508
+ var t, n, r, o, i, a, c, l, d, p;
3509
+ const s = (t = e.doc) !== null && t !== void 0 ? t : document, h = (n = (r = e.win) !== null && r !== void 0 ? r : s.defaultView) !== null && n !== void 0 ? n : window, f = (o = e.sdkVersion) !== null && o !== void 0 ? o : Ee, b = {
3510
+ captureView: (i = (a = e.deps) === null || a === void 0 ? void 0 : a.captureView) !== null && i !== void 0 ? i : En,
3511
+ submitReport: (c = (l = e.deps) === null || l === void 0 ? void 0 : l.submitReport) !== null && c !== void 0 ? c : Sn,
3512
+ startElementPicker: (d = (p = e.deps) === null || p === void 0 ? void 0 : p.startElementPicker) !== null && d !== void 0 ? d : er
2278
3513
  };
2279
- let p = null, c = null, T = null, C = null, w = null, _ = null, N = null, M = !1, A = "compose";
2280
- const y = {
3514
+ let m = null, u = null, y = null, g = null, v = null, w = null, S = null, k = !1, N = "compose";
3515
+ const T = {
2281
3516
  kind: "bug",
2282
3517
  selectedElement: null,
2283
3518
  region: null,
2284
3519
  marks: [],
2285
3520
  phase: "compose"
2286
3521
  };
2287
- function D(g, k) {
2288
- c && (c.status.textContent = g, c.status.classList.toggle("is-error", k));
2289
- }
2290
- function v(g) {
2291
- if (y.kind = g, !!c)
2292
- for (const [k, B] of c.tabs) {
2293
- const P = k === g;
2294
- B.classList.toggle("is-active", P), B.setAttribute("aria-pressed", String(P));
3522
+ function B(E, _) {
3523
+ u && (u.status.textContent = E, u.status.classList.toggle("is-error", _));
3524
+ }
3525
+ function x(E) {
3526
+ if (T.kind = E, !!u)
3527
+ for (const [_, P] of u.tabs) {
3528
+ const U = _ === E;
3529
+ P.classList.toggle("is-active", U), P.setAttribute("aria-pressed", String(U));
2295
3530
  }
2296
3531
  }
2297
- function S(g) {
2298
- if (A = g, !c) return;
2299
- const k = g !== "compose";
2300
- c.panel.classList.toggle("is-marking", k), c.pickLayer.classList.toggle("is-visible", g === "picking"), c.captureLayer.classList.toggle("is-visible", g === "capturing"), c.drawLayer.classList.toggle("is-visible", g === "drawing"), c.pickBtn.classList.toggle("is-active", g === "picking"), c.captureBtn.classList.toggle("is-active", g === "capturing" || g === "drawing");
2301
- }
2302
- function U() {
2303
- if (!c) return;
2304
- const g = !!y.selectedElement, k = !!y.region, B = y.marks.length;
2305
- c.mark.classList.toggle("has-element", g), c.selector.textContent = g ? y.selectedElement.selector : "", c.pickBtn.textContent = "", c.pickBtn.append(On(a), a.createTextNode(g ? "Change element" : "Pick element")), c.captureBtn.classList.toggle("is-attached", k || B > 0);
2306
- const P = [];
2307
- g && P.push("Element"), k && P.push("Region"), B > 0 && P.push(`${B} mark${B === 1 ? "" : "s"}`), c.caption.textContent = P.length ? `${P.join(" · ")} · masked screenshot on Send` : "Masked screenshot attached on Send";
2308
- }
2309
- function $(g) {
2310
- if (!c) return;
2311
- if (!g) {
2312
- c.highlight.style.display = "none";
3532
+ function L(E) {
3533
+ if (N = E, !u) return;
3534
+ const _ = E !== "compose";
3535
+ u.panel.classList.toggle("is-marking", _), u.pickLayer.classList.toggle("is-visible", E === "picking"), u.captureLayer.classList.toggle("is-visible", E === "capturing"), u.drawLayer.classList.toggle("is-visible", E === "drawing"), u.pickBtn.classList.toggle("is-active", E === "picking"), u.captureBtn.classList.toggle("is-active", E === "capturing" || E === "drawing");
3536
+ }
3537
+ function F() {
3538
+ if (!u) return;
3539
+ const E = !!T.selectedElement, _ = !!T.region, P = T.marks.length;
3540
+ u.mark.classList.toggle("has-element", E), u.selector.textContent = E ? T.selectedElement.selector : "", u.pickBtn.textContent = "", u.pickBtn.append(Ca(s), s.createTextNode(E ? "Change element" : "Pick element")), u.captureBtn.classList.toggle("is-attached", _ || P > 0);
3541
+ const U = [];
3542
+ E && U.push("Element"), _ && U.push("Region"), P > 0 && U.push(`${P} mark${P === 1 ? "" : "s"}`), u.caption.textContent = U.length ? `${U.join(" · ")} · masked screenshot on Send` : "Masked screenshot attached on Send";
3543
+ }
3544
+ function D(E) {
3545
+ if (!u) return;
3546
+ if (!E) {
3547
+ u.highlight.style.display = "none";
2313
3548
  return;
2314
3549
  }
2315
- const k = g.getBoundingClientRect();
2316
- c.highlight.style.display = "block", c.highlight.style.left = `${k.left}px`, c.highlight.style.top = `${k.top}px`, c.highlight.style.width = `${k.width}px`, c.highlight.style.height = `${k.height}px`;
3550
+ const _ = E.getBoundingClientRect();
3551
+ u.highlight.style.display = "block", u.highlight.style.left = `${_.left}px`, u.highlight.style.top = `${_.top}px`, u.highlight.style.width = `${_.width}px`, u.highlight.style.height = `${_.height}px`;
2317
3552
  }
2318
- function Z() {
2319
- T == null || T.stop(), T = null;
3553
+ function oe() {
3554
+ y == null || y.stop(), y = null;
3555
+ }
3556
+ function R() {
3557
+ u && (u.highlight.style.display = "none"), oe(), N === "picking" && L("compose");
2320
3558
  }
2321
3559
  function I() {
2322
- c && (c.highlight.style.display = "none"), Z(), A === "picking" && S("compose");
2323
- }
2324
- function L() {
2325
- c && (Y(), S("picking"), T = m.startElementPicker({
2326
- doc: a,
2327
- onHover: $,
2328
- onPick: (g) => {
2329
- y.selectedElement = jt(g), I(), U();
3560
+ u && (J(), L("picking"), y = b.startElementPicker({
3561
+ doc: s,
3562
+ onHover: D,
3563
+ onPick: (E) => {
3564
+ T.selectedElement = Qn(E), R(), F();
2330
3565
  },
2331
- onCancel: I
3566
+ onCancel: R
2332
3567
  }));
2333
3568
  }
2334
- function O(g) {
2335
- if (!c) return;
2336
- const k = c.selBox;
2337
- if (!g) {
2338
- k.style.display = "none";
3569
+ function $(E) {
3570
+ if (!u) return;
3571
+ const _ = u.selBox;
3572
+ if (!E) {
3573
+ _.style.display = "none";
2339
3574
  return;
2340
3575
  }
2341
- k.style.display = "block", k.style.left = `${g.x}px`, k.style.top = `${g.y}px`, k.style.width = `${g.width}px`, k.style.height = `${g.height}px`;
3576
+ _.style.display = "block", _.style.left = `${E.x}px`, _.style.top = `${E.y}px`, _.style.width = `${E.width}px`, _.style.height = `${E.height}px`;
2342
3577
  }
2343
- function R() {
2344
- C == null || C.stop(), C = null;
2345
- }
2346
- function z() {
2347
- c && (Y(), O(null), S("capturing"), C = An({
2348
- doc: a,
2349
- onProgress: O,
2350
- onComplete: (g) => {
2351
- R(), O(null), yt(g);
3578
+ function M() {
3579
+ g == null || g.stop(), g = null;
3580
+ }
3581
+ function O() {
3582
+ u && (J(), $(null), L("capturing"), g = ya({
3583
+ doc: s,
3584
+ onProgress: $,
3585
+ onComplete: (E) => {
3586
+ M(), $(null), Mn(E);
2352
3587
  },
2353
3588
  onCancel: () => {
2354
- R(), O(null), S("compose");
3589
+ M(), $(null), L("compose");
2355
3590
  }
2356
3591
  }));
2357
3592
  }
2358
- function fe(g) {
2359
- c && (c.drawFrame.style.left = `${g.x}px`, c.drawFrame.style.top = `${g.y}px`, c.drawFrame.style.width = `${g.width}px`, c.drawFrame.style.height = `${g.height}px`);
3593
+ function W(E) {
3594
+ u && (u.drawFrame.style.left = `${E.x}px`, u.drawFrame.style.top = `${E.y}px`, u.drawFrame.style.width = `${E.width}px`, u.drawFrame.style.height = `${E.height}px`);
2360
3595
  }
2361
- function J(g) {
2362
- if (w == null || w.setTool(g), !!c)
2363
- for (const [k, B] of c.drawTools) B.classList.toggle("is-active", k === g);
3596
+ function Y(E) {
3597
+ if (v == null || v.setTool(E), !!u)
3598
+ for (const [_, P] of u.drawTools) P.classList.toggle("is-active", _ === E);
2364
3599
  }
2365
- function Q(g) {
2366
- c && (c.undoBtn.disabled = g.length === 0);
3600
+ function ie(E) {
3601
+ u && (u.undoBtn.disabled = E.length === 0);
2367
3602
  }
2368
- function G() {
2369
- w == null || w.stop(), w = null;
3603
+ function Z() {
3604
+ v == null || v.stop(), v = null;
2370
3605
  }
2371
- function yt(g) {
2372
- c && (_ = g, fe(g), S("drawing"), w = Ln({
2373
- doc: a,
2374
- svg: c.drawSvg,
2375
- textInput: c.drawText,
2376
- initialMarks: y.marks,
2377
- onChange: Q
2378
- }), J("arrow"), Q(y.marks));
3606
+ function Mn(E) {
3607
+ u && (w = E, W(E), L("drawing"), v = va({
3608
+ doc: s,
3609
+ svg: u.drawSvg,
3610
+ textInput: u.drawText,
3611
+ initialMarks: T.marks,
3612
+ onChange: ie
3613
+ }), Y("arrow"), ie(T.marks));
2379
3614
  }
2380
- function wt() {
2381
- w && (y.marks = w.marks().slice(), _ && (y.region = _)), Ce(), U();
3615
+ function Dn() {
3616
+ v && (T.marks = v.marks().slice(), w && (T.region = w)), lt(), F();
2382
3617
  }
2383
- function kt() {
2384
- Ce(), U();
3618
+ function Pn() {
3619
+ lt(), F();
2385
3620
  }
2386
- function Ce() {
2387
- G(), _ = null, A === "drawing" && S("compose");
3621
+ function lt() {
3622
+ Z(), w = null, N === "drawing" && L("compose");
2388
3623
  }
2389
- function Y() {
2390
- Z(), R(), G(), _ = null, O(null), c && (c.highlight.style.display = "none"), A !== "compose" && S("compose");
3624
+ function J() {
3625
+ oe(), M(), Z(), w = null, $(null), u && (u.highlight.style.display = "none"), N !== "compose" && L("compose");
2391
3626
  }
2392
- function be() {
2393
- N !== null && (clearTimeout(N), N = null);
3627
+ function Ne() {
3628
+ S !== null && (clearTimeout(S), S = null);
2394
3629
  }
2395
- async function Et() {
2396
- if (!(!c || y.phase === "sending")) {
2397
- Y(), y.phase = "sending", c.sendBtn.disabled = !0, c.sendBtn.textContent = "Sending…", D("", !1);
3630
+ async function Bn() {
3631
+ if (!(!u || T.phase === "sending")) {
3632
+ J(), T.phase = "sending", u.sendBtn.disabled = !0, u.sendBtn.textContent = "Sending…", B("", !1);
2398
3633
  try {
2399
- var g, k, B, P;
2400
- const ee = lt({
2401
- kind: y.kind,
2402
- comment: c.comment.value,
2403
- element: (g = y.selectedElement) !== null && g !== void 0 ? g : void 0,
2404
- region: (k = y.region) !== null && k !== void 0 ? k : void 0,
2405
- marks: y.marks.length > 0 ? y.marks : void 0,
2406
- url: (B = b.location) === null || B === void 0 ? void 0 : B.href,
2407
- environment: st(b, u),
2408
- trace: (P = e.buffer) === null || P === void 0 ? void 0 : P.snapshot()
2409
- }), te = nt(ee, {
3634
+ var E, _, P, U;
3635
+ const ae = tn({
3636
+ kind: T.kind,
3637
+ comment: u.comment.value,
3638
+ element: (E = T.selectedElement) !== null && E !== void 0 ? E : void 0,
3639
+ region: (_ = T.region) !== null && _ !== void 0 ? _ : void 0,
3640
+ marks: T.marks.length > 0 ? T.marks : void 0,
3641
+ url: (P = h.location) === null || P === void 0 ? void 0 : P.href,
3642
+ environment: en(h, f),
3643
+ trace: (U = e.buffer) === null || U === void 0 ? void 0 : U.snapshot()
3644
+ }), se = Gt(ae, {
2410
3645
  hook: e.beforeSend,
2411
3646
  scrub: e.scrub
2412
3647
  });
2413
- if (!te) {
2414
- y.phase = "sent", c.panel.classList.add("is-sent"), N = setTimeout(re, et);
3648
+ if (!se) {
3649
+ T.phase = "sent", u.panel.classList.add("is-sent"), S = setTimeout(he, Ht);
2415
3650
  return;
2416
3651
  }
2417
- const K = await m.captureView({
2418
- doc: a,
2419
- win: b
2420
- }), ie = K ? {
2421
- blob: K.blob,
2422
- filename: `screenshot.${ct(K.type)}`
2423
- } : null, oe = await m.submitReport(e.apiUrl, {
3652
+ const Q = await b.captureView({
3653
+ doc: s,
3654
+ win: h
3655
+ }), me = Q ? {
3656
+ blob: Q.blob,
3657
+ filename: `screenshot.${kn(Q.type)}`
3658
+ } : null, le = await b.submitReport(e.apiUrl, {
2424
3659
  key: e.key,
2425
3660
  identity: e.identity,
2426
- content: te,
2427
- screenshot: ie
3661
+ content: se,
3662
+ screenshot: me
2428
3663
  });
2429
- oe.ok ? (y.phase = "sent", c.panel.classList.add("is-sent"), N = setTimeout(re, et)) : (pe(), D(oe.reason === "unreachable" ? "Couldn't reach Fixback — try again." : "Fixback couldn't accept this report.", !0));
3664
+ le.ok ? (T.phase = "sent", u.panel.classList.add("is-sent"), S = setTimeout(he, Ht)) : (Ie(), B(le.reason === "unreachable" ? "Couldn't reach Fixback — try again." : "Fixback couldn't accept this report.", !0));
2430
3665
  } catch {
2431
- pe(), D("Something went wrong — try again.", !0);
3666
+ Ie(), B("Something went wrong — try again.", !0);
2432
3667
  }
2433
3668
  }
2434
3669
  }
2435
- function pe() {
2436
- y.phase = "compose", c && (c.sendBtn.disabled = !1, c.sendBtn.textContent = "Send");
3670
+ function Ie() {
3671
+ T.phase = "compose", u && (u.sendBtn.disabled = !1, u.sendBtn.textContent = "Send");
2437
3672
  }
2438
- function _t() {
2439
- var g;
2440
- p = x(a, "div", { [Rn]: "" }), p.style.cssText = "position:fixed;right:20px;bottom:84px;z-index:2147483001;margin:0;padding:0;border:0;display:none;";
2441
- const k = p.attachShadow({ mode: "open" }), B = a.createElement("style");
2442
- B.textContent = In, k.appendChild(B);
2443
- const P = x(a, "button", {
3673
+ function Un() {
3674
+ var E;
3675
+ m = C(s, "div", { [xa]: "" }), m.style.cssText = "position:fixed;right:20px;bottom:84px;z-index:2147483001;margin:0;padding:0;border:0;display:none;";
3676
+ const _ = m.attachShadow({ mode: "open" }), P = s.createElement("style");
3677
+ P.textContent = wa, _.appendChild(P);
3678
+ const U = C(s, "button", {
2444
3679
  type: "button",
2445
3680
  class: "fb-ov-close",
2446
3681
  "aria-label": "Close"
2447
- }, ["✕"]), ee = x(a, "div", { class: "fb-ov-head" }, [x(a, "span", { class: "fb-ov-mark-sq" }), x(a, "span", { class: "fb-ov-brand" }, ["Fixback"])]);
2448
- e.tier != null && ee.appendChild(x(a, "span", {
3682
+ }, ["✕"]), ae = C(s, "div", { class: "fb-ov-head" }, [C(s, "span", { class: "fb-ov-mark-sq" }), C(s, "span", { class: "fb-ov-brand" }, ["Fixback"])]);
3683
+ e.tier != null && ae.appendChild(C(s, "span", {
2449
3684
  class: "fb-ov-tier",
2450
3685
  "aria-label": `Trust tier: ${e.tier}`
2451
- }, [e.tier])), ee.appendChild(P);
2452
- const te = /* @__PURE__ */ new Map(), K = x(a, "div", { class: "fb-ov-tabs" });
2453
- for (const { value: F, label: le } of Nn) {
2454
- const H = x(a, "button", {
3686
+ }, [e.tier])), ae.appendChild(U);
3687
+ const se = /* @__PURE__ */ new Map(), Q = C(s, "div", { class: "fb-ov-tabs" });
3688
+ for (const { value: V, label: ye } of Ea) {
3689
+ const X = C(s, "button", {
2455
3690
  type: "button",
2456
3691
  class: "fb-ov-tab",
2457
- "data-kind": F
2458
- }, [le]);
2459
- H.addEventListener("click", () => v(F)), te.set(F, H), K.appendChild(H);
3692
+ "data-kind": V
3693
+ }, [ye]);
3694
+ X.addEventListener("click", () => x(V)), se.set(V, X), Q.appendChild(X);
2460
3695
  }
2461
- const ie = x(a, "span", { class: "fb-ov-selector" }), oe = x(a, "span", { class: "fb-ov-mark-caption" }), Le = x(a, "div", { class: "fb-ov-mark" }, [ie, oe]), Me = x(a, "textarea", {
3696
+ const me = C(s, "span", { class: "fb-ov-selector" }), le = C(s, "span", { class: "fb-ov-mark-caption" }), ct = C(s, "div", { class: "fb-ov-mark" }, [me, le]), ut = C(s, "textarea", {
2462
3697
  class: "fb-ov-comment",
2463
3698
  placeholder: "Describe what you saw or want…",
2464
3699
  "aria-label": "Comment"
2465
- }), Ae = x(a, "div", {
3700
+ }), dt = C(s, "div", {
2466
3701
  class: "fb-ov-status",
2467
3702
  role: "status",
2468
3703
  "aria-live": "polite"
2469
- }), he = x(a, "button", {
3704
+ }), Re = C(s, "button", {
2470
3705
  type: "button",
2471
3706
  class: "fb-ov-pickbtn",
2472
3707
  title: "Point at an element"
2473
3708
  });
2474
- he.addEventListener("click", () => {
2475
- y.phase !== "sending" && (A === "picking" ? I() : L());
3709
+ Re.addEventListener("click", () => {
3710
+ T.phase !== "sending" && (N === "picking" ? R() : I());
2476
3711
  });
2477
- const ae = x(a, "button", {
3712
+ const ve = C(s, "button", {
2478
3713
  type: "button",
2479
3714
  class: "fb-ov-capturebtn",
2480
3715
  title: "Capture a region and draw",
2481
3716
  "aria-label": "Capture a region and draw"
2482
3717
  });
2483
- ae.appendChild(Un(a)), ae.addEventListener("click", () => {
2484
- y.phase !== "sending" && z();
3718
+ ve.appendChild(_a(s)), ve.addEventListener("click", () => {
3719
+ T.phase !== "sending" && O();
2485
3720
  });
2486
- const ve = x(a, "button", {
3721
+ const Me = C(s, "button", {
2487
3722
  type: "button",
2488
3723
  class: "fb-ov-send"
2489
3724
  }, ["Send"]);
2490
- ve.addEventListener("click", () => {
2491
- Et();
3725
+ Me.addEventListener("click", () => {
3726
+ Bn();
2492
3727
  });
2493
- const Lt = x(a, "div", { class: "fb-ov-tools" }, [
2494
- he,
2495
- ae,
2496
- ve
2497
- ]), Mt = x(a, "div", { class: "fb-ov-form" }, [
2498
- K,
2499
- Le,
2500
- Me,
2501
- Ae,
2502
- Lt
2503
- ]), At = x(a, "div", { class: "fb-ov-done" }, [
2504
- x(a, "div", { class: "fb-ov-done__check" }, ["✓"]),
2505
- x(a, "div", { class: "fb-ov-done__title" }, ["Report sent"]),
2506
- x(a, "div", { class: "fb-ov-done__sub" }, ["Thanks — the team can see it now."])
2507
- ]), Ie = x(a, "div", {
3728
+ const zn = C(s, "div", { class: "fb-ov-tools" }, [
3729
+ Re,
3730
+ ve,
3731
+ Me
3732
+ ]), jn = C(s, "div", { class: "fb-ov-form" }, [
3733
+ Q,
3734
+ ct,
3735
+ ut,
3736
+ dt,
3737
+ zn
3738
+ ]), Hn = C(s, "div", { class: "fb-ov-done" }, [
3739
+ C(s, "div", { class: "fb-ov-done__check" }, ["✓"]),
3740
+ C(s, "div", { class: "fb-ov-done__title" }, ["Report sent"]),
3741
+ C(s, "div", { class: "fb-ov-done__sub" }, ["Thanks — the team can see it now."])
3742
+ ]), ft = C(s, "div", {
2508
3743
  class: "fb-ov-panel",
2509
3744
  role: "dialog",
2510
3745
  "aria-label": "Fixback feedback"
2511
3746
  }, [
2512
- ee,
2513
- Mt,
2514
- At
2515
- ]), me = x(a, "div", { class: "fb-ov-highlight" });
2516
- me.style.display = "none";
2517
- const Re = x(a, "div", { class: "fb-ov-pick" }, [x(a, "div", { class: "fb-ov-hint" }, ["Click the element you mean · Esc to cancel"]), me]), ge = x(a, "div", { class: "fb-ov-capture-sel" });
2518
- ge.style.display = "none";
2519
- const $e = x(a, "div", { class: "fb-ov-capture" }, [
2520
- x(a, "div", { class: "fb-ov-capture-dim" }),
2521
- x(a, "div", { class: "fb-ov-hint" }, ["Drag to capture an area · Esc to cancel"]),
2522
- ge
2523
- ]), Ne = j(a, "svg", {
3747
+ ae,
3748
+ jn,
3749
+ Hn
3750
+ ]), De = C(s, "div", { class: "fb-ov-highlight" });
3751
+ De.style.display = "none";
3752
+ const pt = C(s, "div", { class: "fb-ov-pick" }, [C(s, "div", { class: "fb-ov-hint" }, ["Click the element you mean · Esc to cancel"]), De]), Pe = C(s, "div", { class: "fb-ov-capture-sel" });
3753
+ Pe.style.display = "none";
3754
+ const bt = C(s, "div", { class: "fb-ov-capture" }, [
3755
+ C(s, "div", { class: "fb-ov-capture-dim" }),
3756
+ C(s, "div", { class: "fb-ov-hint" }, ["Drag to capture an area · Esc to cancel"]),
3757
+ Pe
3758
+ ]), ht = j(s, "svg", {
2524
3759
  class: "fb-ov-draw-svg",
2525
3760
  width: "100%",
2526
3761
  height: "100%"
2527
- }), xe = x(a, "input", {
3762
+ }), Be = C(s, "input", {
2528
3763
  class: "fb-ov-draw-text",
2529
3764
  placeholder: "label…",
2530
3765
  "aria-label": "Mark label"
2531
3766
  });
2532
- xe.style.display = "none";
2533
- const Be = x(a, "div", { class: "fb-ov-draw-frame" }), Pe = /* @__PURE__ */ new Map(), Oe = [];
2534
- for (const { tool: F, label: le } of Bn) {
2535
- const H = x(a, "button", {
3767
+ Be.style.display = "none";
3768
+ const mt = C(s, "div", { class: "fb-ov-draw-frame" }), vt = /* @__PURE__ */ new Map(), gt = [];
3769
+ for (const { tool: V, label: ye } of Sa) {
3770
+ const X = C(s, "button", {
2536
3771
  type: "button",
2537
3772
  class: "fb-ov-drawtool",
2538
- "data-tool": F,
2539
- title: le,
2540
- "aria-label": le
3773
+ "data-tool": V,
3774
+ title: ye,
3775
+ "aria-label": ye
2541
3776
  });
2542
- H.appendChild(Dn(a, F)), H.addEventListener("click", () => J(F)), Pe.set(F, H), Oe.push(H);
3777
+ X.appendChild(La(s, V)), X.addEventListener("click", () => Y(V)), vt.set(V, X), gt.push(X);
2543
3778
  }
2544
- const se = x(a, "button", {
3779
+ const ge = C(s, "button", {
2545
3780
  type: "button",
2546
3781
  class: "fb-ov-draw-undo",
2547
3782
  title: "Undo",
2548
3783
  "aria-label": "Undo"
2549
3784
  });
2550
- se.appendChild(zn(a)), se.addEventListener("click", () => w == null ? void 0 : w.undo());
2551
- const Ue = x(a, "button", {
3785
+ ge.appendChild(Aa(s)), ge.addEventListener("click", () => v == null ? void 0 : v.undo());
3786
+ const yt = C(s, "button", {
2552
3787
  type: "button",
2553
3788
  class: "fb-ov-draw-cancel"
2554
3789
  }, ["Cancel"]);
2555
- Ue.addEventListener("click", () => kt());
2556
- const ze = x(a, "button", {
3790
+ yt.addEventListener("click", () => Pn());
3791
+ const wt = C(s, "button", {
2557
3792
  type: "button",
2558
3793
  class: "fb-ov-draw-attach"
2559
3794
  }, ["Attach"]);
2560
- ze.addEventListener("click", () => wt());
2561
- const It = x(a, "div", { class: "fb-ov-draw-toolbar" }, [
2562
- ...Oe,
2563
- x(a, "span", { class: "fb-ov-draw-divider" }),
2564
- se,
2565
- Ue,
2566
- ze
2567
- ]), De = x(a, "div", { class: "fb-ov-draw" }, [
3795
+ wt.addEventListener("click", () => Dn());
3796
+ const Vn = C(s, "div", { class: "fb-ov-draw-toolbar" }, [
3797
+ ...gt,
3798
+ C(s, "span", { class: "fb-ov-draw-divider" }),
3799
+ ge,
3800
+ yt,
3801
+ wt
3802
+ ]), xt = C(s, "div", { class: "fb-ov-draw" }, [
3803
+ mt,
3804
+ ht,
2568
3805
  Be,
2569
- Ne,
2570
- xe,
2571
- It
3806
+ Vn
2572
3807
  ]);
2573
- k.append(Ie, Re, $e, De), P.addEventListener("click", re), ((g = e.target) !== null && g !== void 0 ? g : a.body).appendChild(p), c = {
2574
- panel: Ie,
2575
- tabs: te,
2576
- mark: Le,
2577
- selector: ie,
2578
- caption: oe,
2579
- comment: Me,
2580
- status: Ae,
2581
- pickBtn: he,
2582
- captureBtn: ae,
2583
- sendBtn: ve,
2584
- highlight: me,
2585
- pickLayer: Re,
2586
- captureLayer: $e,
2587
- selBox: ge,
2588
- drawLayer: De,
2589
- drawSvg: Ne,
2590
- drawText: xe,
2591
- drawFrame: Be,
2592
- drawTools: Pe,
2593
- undoBtn: se
3808
+ _.append(ft, pt, bt, xt), U.addEventListener("click", he), ((E = e.target) !== null && E !== void 0 ? E : s.body).appendChild(m), u = {
3809
+ panel: ft,
3810
+ tabs: se,
3811
+ mark: ct,
3812
+ selector: me,
3813
+ caption: le,
3814
+ comment: ut,
3815
+ status: dt,
3816
+ pickBtn: Re,
3817
+ captureBtn: ve,
3818
+ sendBtn: Me,
3819
+ highlight: De,
3820
+ pickLayer: pt,
3821
+ captureLayer: bt,
3822
+ selBox: Pe,
3823
+ drawLayer: xt,
3824
+ drawSvg: ht,
3825
+ drawText: Be,
3826
+ drawFrame: mt,
3827
+ drawTools: vt,
3828
+ undoBtn: ge
2594
3829
  };
2595
3830
  }
2596
- function St() {
2597
- (!p || !c) && _t();
3831
+ function $n() {
3832
+ (!m || !u) && Un();
2598
3833
  }
2599
- function Tt() {
2600
- if (St(), !(!p || !c)) {
2601
- be(), Y(), y.phase = "compose", y.selectedElement = null, y.region = null, y.marks = [], c.panel.classList.remove("is-sent"), c.comment.value = "", pe(), D("", !1), v("bug"), U(), p.style.display = "block", M = !0;
3834
+ function Fn() {
3835
+ if ($n(), !(!m || !u)) {
3836
+ Ne(), J(), T.phase = "compose", T.selectedElement = null, T.region = null, T.marks = [], u.panel.classList.remove("is-sent"), u.comment.value = "", Ie(), B("", !1), x("bug"), F(), m.style.display = "block", k = !0;
2602
3837
  try {
2603
- c.comment.focus();
3838
+ u.comment.focus();
2604
3839
  } catch {
2605
3840
  }
2606
3841
  }
2607
3842
  }
2608
- function re() {
2609
- be(), Y(), p && (p.style.display = "none"), M = !1;
3843
+ function he() {
3844
+ Ne(), J(), m && (m.style.display = "none"), k = !1;
2610
3845
  }
2611
- function Ct() {
2612
- be(), Y(), p == null || p.remove(), p = null, c = null, M = !1;
3846
+ function On() {
3847
+ Ne(), J(), m == null || m.remove(), m = null, u = null, k = !1;
2613
3848
  }
2614
3849
  return {
2615
- open: Tt,
2616
- close: re,
2617
- destroy: Ct,
3850
+ open: Fn,
3851
+ close: he,
3852
+ destroy: On,
2618
3853
  get isOpen() {
2619
- return M;
3854
+ return k;
2620
3855
  }
2621
3856
  };
2622
3857
  }
2623
- function On(e) {
2624
- return x(e, "span", {
3858
+ function Ca(e) {
3859
+ return C(e, "span", {
2625
3860
  class: "fb-ov-pickbtn__glyph",
2626
3861
  "aria-hidden": "true"
2627
3862
  }, ["⌖"]);
2628
3863
  }
2629
- function Un(e) {
3864
+ function _a(e) {
2630
3865
  return j(e, "svg", {
2631
3866
  class: "fb-ov-icon",
2632
3867
  width: "14",
@@ -2638,7 +3873,7 @@ function Un(e) {
2638
3873
  "aria-hidden": "true"
2639
3874
  }, [j(e, "path", { d: "M2 5V2h3M14 5V2h-3M2 11v3h3M14 11v3h-3" })]);
2640
3875
  }
2641
- function zn(e) {
3876
+ function Aa(e) {
2642
3877
  return j(e, "svg", {
2643
3878
  class: "fb-ov-icon",
2644
3879
  width: "15",
@@ -2650,8 +3885,8 @@ function zn(e) {
2650
3885
  "aria-hidden": "true"
2651
3886
  }, [j(e, "path", { d: "M6 4 3 7l3 3M3 7h6a4 4 0 0 1 0 8H7" })]);
2652
3887
  }
2653
- function Dn(e, t) {
2654
- return t === "text" ? x(e, "span", {
3888
+ function La(e, t) {
3889
+ return t === "text" ? C(e, "span", {
2655
3890
  class: "fb-ov-drawtool__t",
2656
3891
  "aria-hidden": "true"
2657
3892
  }, ["T"]) : j(e, "svg", {
@@ -2675,9 +3910,14 @@ function Dn(e, t) {
2675
3910
  pen: j(e, "path", { d: "M3 13l1-3 6-6 2 2-6 6-3 1Z" })
2676
3911
  }[t]]);
2677
3912
  }
2678
- var jn = "https://api.fixback.dev", Ee = { destroy() {
3913
+ var Na = "https://api.fixback.dev";
3914
+ function Ia(e, t) {
3915
+ const n = e.replace(/\/+$/, "");
3916
+ return t.startsWith(`${n}/api/ingest/`) || t.startsWith(`${n}/api/invites/`);
3917
+ }
3918
+ var qe = { destroy() {
2679
3919
  } };
2680
- function Fn() {
3920
+ function Ra() {
2681
3921
  try {
2682
3922
  const e = window.location;
2683
3923
  return e.host || e.hostname || "this site";
@@ -2685,142 +3925,144 @@ function Fn() {
2685
3925
  return "this site";
2686
3926
  }
2687
3927
  }
2688
- function Hn() {
3928
+ function Ma() {
2689
3929
  try {
2690
3930
  return window.location.href;
2691
3931
  } catch {
2692
3932
  return "";
2693
3933
  }
2694
3934
  }
2695
- function Vn(e) {
2696
- const { options: t, apiUrl: o, key: n, identity: i, target: r, answer: s } = e, f = gn(r, {
2697
- key: n,
3935
+ function Da(e) {
3936
+ const { options: t, apiUrl: n, key: r, identity: o, target: i, answer: a } = e, c = sa(i, {
3937
+ key: r,
2698
3938
  reduceMotion: t.reduceMotion
2699
- }), l = o.replace(/\/+$/, "");
2700
- let d = null, h = () => {
3939
+ });
3940
+ let l = null, d = () => {
2701
3941
  };
2702
3942
  if (t.trace !== !1) {
2703
- var a;
2704
- const p = (a = t.trace) !== null && a !== void 0 ? a : {};
2705
- d = to({
2706
- maxBreadcrumbs: p.maxBreadcrumbs,
2707
- maxAgeMs: p.maxAgeMs,
2708
- beforeBreadcrumb: p.beforeBreadcrumb
2709
- }), h = mo(d, {
2710
- consoleLevels: p.consoleLevels,
2711
- ignoreUrl: (c) => c.startsWith(l)
3943
+ var p, s, h, f, b;
3944
+ const g = (p = t.trace) !== null && p !== void 0 ? p : {}, v = e.answer.capture, w = (s = (h = t.capture) === null || h === void 0 ? void 0 : h.console) !== null && s !== void 0 ? s : typeof (v == null ? void 0 : v.console) == "boolean" ? v.console : !0, S = (f = (b = t.capture) === null || b === void 0 ? void 0 : b.network) !== null && f !== void 0 ? f : typeof (v == null ? void 0 : v.network) == "boolean" ? v.network : !0;
3945
+ l = vr({
3946
+ budgets: g.budgets,
3947
+ maxAgeMs: g.maxAgeMs,
3948
+ beforeBreadcrumb: g.beforeBreadcrumb
3949
+ }), d = jr(l, {
3950
+ consoleLevels: g.consoleLevels,
3951
+ ignoreUrl: (k) => Ia(n, k),
3952
+ captureConsole: w,
3953
+ captureNetwork: S
2712
3954
  });
2713
3955
  }
2714
- const b = Pn({
2715
- apiUrl: o,
2716
- key: n,
2717
- identity: i,
2718
- gate: s.gate,
2719
- tier: s.tier,
2720
- sdkVersion: de,
2721
- target: r,
2722
- buffer: d,
3956
+ const m = Ta({
3957
+ apiUrl: n,
3958
+ key: r,
3959
+ identity: o,
3960
+ gate: a.gate,
3961
+ tier: a.tier,
3962
+ sdkVersion: Ee,
3963
+ target: i,
3964
+ buffer: l,
2723
3965
  beforeSend: t.beforeSend,
2724
3966
  scrub: t.scrub
2725
- }), u = () => b.open();
2726
- f.host.addEventListener(Se, u);
2727
- let m = () => {
3967
+ }), u = () => m.open();
3968
+ c.host.addEventListener(et, u);
3969
+ let y = () => {
2728
3970
  };
2729
- return t.autoCapture !== !1 && (m = Jo({
2730
- apiUrl: o,
2731
- key: n,
2732
- identity: i,
2733
- sdkVersion: de,
2734
- buffer: d,
3971
+ return t.autoCapture !== !1 && (y = ji({
3972
+ apiUrl: n,
3973
+ key: r,
3974
+ identity: o,
3975
+ sdkVersion: Ee,
3976
+ buffer: l,
2735
3977
  beforeSend: t.beforeSend,
2736
3978
  scrub: t.scrub
2737
3979
  }).destroy), () => {
2738
- f.host.removeEventListener(Se, u), b.destroy(), xn(f), h(), m();
3980
+ c.host.removeEventListener(et, u), m.destroy(), la(c), d(), y();
2739
3981
  };
2740
3982
  }
2741
- async function xt(e, t) {
3983
+ async function Rn(e, t) {
2742
3984
  try {
2743
- var o, n, i;
2744
- if (typeof document == "undefined") return Ee;
2745
- const r = e == null ? void 0 : e.key;
2746
- if (typeof r != "string" || r.length === 0) return Ee;
2747
- const s = (o = e.apiUrl) !== null && o !== void 0 ? o : jn, f = (n = e.anonymousId) !== null && n !== void 0 ? n : Qo(), l = (i = e.target) !== null && i !== void 0 ? i : document.body;
2748
- let d = !1, h = () => {
2749
- }, a = () => {
3985
+ var n, r, o;
3986
+ if (typeof document == "undefined") return qe;
3987
+ const i = e == null ? void 0 : e.key;
3988
+ if (typeof i != "string" || i.length === 0) return qe;
3989
+ const a = (n = e.apiUrl) !== null && n !== void 0 ? n : Na, c = (r = e.anonymousId) !== null && r !== void 0 ? r : Hi(), l = (o = e.target) !== null && o !== void 0 ? o : document.body;
3990
+ let d = !1, p = () => {
3991
+ }, s = () => {
2750
3992
  };
2751
- const b = { destroy: () => {
2752
- d = !0, a(), a = () => {
2753
- }, h(), h = () => {
3993
+ const h = { destroy: () => {
3994
+ d = !0, s(), s = () => {
3995
+ }, p(), p = () => {
2754
3996
  };
2755
- } }, u = () => {
2756
- var p;
2757
- const c = We(r);
3997
+ } }, f = () => {
3998
+ var m;
3999
+ const u = Ft(i);
2758
4000
  return {
2759
4001
  signedIdentity: e.signedIdentity,
2760
- reporterId: (p = e.reporterId) !== null && p !== void 0 ? p : c == null ? void 0 : c.reporterId,
2761
- anonymousId: f
4002
+ reporterId: (m = e.reporterId) !== null && m !== void 0 ? m : u == null ? void 0 : u.reporterId,
4003
+ anonymousId: c
2762
4004
  };
2763
- }, m = async (p) => {
2764
- const c = await Nt(s, {
2765
- key: r,
2766
- ...p
4005
+ }, b = async (m) => {
4006
+ const u = await Gn(a, {
4007
+ key: i,
4008
+ ...m
2767
4009
  });
2768
- d || !(c != null && c.canSubmit) || (h = Vn({
4010
+ d || !(u != null && u.canSubmit) || (p = Da({
2769
4011
  options: e,
2770
- apiUrl: s,
2771
- key: r,
2772
- identity: p,
4012
+ apiUrl: a,
4013
+ key: i,
4014
+ identity: m,
2773
4015
  target: l,
2774
- answer: c
4016
+ answer: u
2775
4017
  }));
2776
4018
  };
2777
4019
  if (t) {
2778
- const p = await ln(s, t);
2779
- if (d) return b;
2780
- if (p && p.status === "pending") {
2781
- const c = We(r), T = async (w) => {
2782
- const _ = await cn(s, t);
2783
- d || (a(), a = () => {
2784
- }, _ && _.status === "redeemed" ? (nn(r, {
2785
- reporterId: _.reporterId,
2786
- name: w.name,
2787
- email: w.email
2788
- }), on(window), await m({
4020
+ const m = await Zi(a, t);
4021
+ if (d) return h;
4022
+ if (m && m.status === "pending") {
4023
+ const u = Ft(i), y = async (v) => {
4024
+ const w = await Ji(a, t);
4025
+ d || (s(), s = () => {
4026
+ }, w && w.status === "redeemed" ? (Gi(i, {
4027
+ reporterId: w.reporterId,
4028
+ name: v.name,
4029
+ email: v.email
4030
+ }), qi(window), await b({
2789
4031
  signedIdentity: e.signedIdentity,
2790
- reporterId: _.reporterId,
2791
- anonymousId: f
2792
- })) : await m(u()));
2793
- }, C = Sn({
2794
- origin: Fn(),
2795
- tier: p.tier,
2796
- defaults: c ? {
2797
- name: c.name,
2798
- email: c.email
4032
+ reporterId: w.reporterId,
4033
+ anonymousId: c
4034
+ })) : await b(f()));
4035
+ }, g = ba({
4036
+ origin: Ra(),
4037
+ tier: m.tier,
4038
+ defaults: u ? {
4039
+ name: u.name,
4040
+ email: u.email
2799
4041
  } : void 0,
2800
4042
  target: l,
2801
- onConfirm: (w) => {
2802
- T(w);
4043
+ onConfirm: (v) => {
4044
+ y(v);
2803
4045
  }
2804
4046
  });
2805
- return a = () => C.destroy(), b;
4047
+ return s = () => g.destroy(), h;
2806
4048
  }
2807
4049
  }
2808
- return await m(u()), b;
4050
+ return await b(f()), h;
2809
4051
  } catch {
2810
- return Ee;
4052
+ return qe;
2811
4053
  }
2812
4054
  }
2813
- function Xn(e) {
2814
- return xt(e, typeof window != "undefined" ? tn(Hn()) : null);
4055
+ function Ua(e) {
4056
+ return Rn(e, typeof window != "undefined" ? Xi(Ma()) : null);
2815
4057
  }
2816
- function Gn(e) {
2817
- return xt(e, typeof (e == null ? void 0 : e.token) == "string" && e.token.length > 0 ? e.token : null);
4058
+ function $a(e) {
4059
+ return Rn(e, typeof (e == null ? void 0 : e.token) == "string" && e.token.length > 0 ? e.token : null);
2818
4060
  }
2819
4061
  export {
2820
- jn as DEFAULT_API_URL,
2821
- Se as LAUNCH_EVENT,
2822
- Xn as init,
2823
- Gn as redeem
4062
+ Na as DEFAULT_API_URL,
4063
+ et as LAUNCH_EVENT,
4064
+ Ua as init,
4065
+ $a as redeem
2824
4066
  };
2825
4067
 
2826
4068
  //# sourceMappingURL=index.mjs.map