@persona/relay 0.1.2 → 0.1.3

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/relay.js CHANGED
@@ -1,77 +1,211 @@
1
- var Jr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2
- function cn(e) {
1
+ var de = /* @__PURE__ */ ((e) => (e.Complete = "complete", e.Error = "error", e.WidgetResize = "widget-resize", e.PopoverResize = "popover-resize", e.FullscreenResize = "fullscreen-resize", e.Expire = "expire", e))(de || {}), Mr = /* @__PURE__ */ ((e) => (e.Resize = "resize", e.Destroy = "destroy", e))(Mr || {}), Ae = /* @__PURE__ */ ((e) => (e.Development = "http://localhost:3000", e.Staging = "https://relay.withpersona-staging.com", e.Production = "https://relay.withpersona.com", e))(Ae || {});
2
+ function nn(e) {
3
+ try {
4
+ const i = new URL(e);
5
+ return i.hostname === "localhost" ? !0 : !(i.protocol !== "https:" || !i.hostname || !i.hostname.includes("."));
6
+ } catch {
7
+ return !1;
8
+ }
9
+ }
10
+ function Fr(e) {
11
+ switch (e) {
12
+ case "development":
13
+ return Ae.Development;
14
+ case "staging":
15
+ return Ae.Staging;
16
+ case "production":
17
+ case void 0:
18
+ case null:
19
+ return Ae.Production;
20
+ default:
21
+ if (typeof e == "string") {
22
+ const i = e.startsWith("localhost") ? `http://${e}` : `https://${e}`;
23
+ if (nn(i))
24
+ return i.replace(/\/$/, "");
25
+ }
26
+ return console.warn(
27
+ `[PersonaRelay] Invalid host: "${e}". Expected 'development', 'staging', 'production', or a valid hostname/URL. Falling back to 'production'.`
28
+ ), Ae.Production;
29
+ }
30
+ }
31
+ function an() {
32
+ return "relay-widget-" + crypto.randomUUID();
33
+ }
34
+ class on {
35
+ constructor(i) {
36
+ this.id = i;
37
+ }
38
+ /**
39
+ * Checks if the stylesheet is currently mounted in the document.
40
+ */
41
+ isMounted() {
42
+ return document.getElementById(this.id) != null;
43
+ }
44
+ /**
45
+ * Mounts the stylesheet with the given CSS content.
46
+ * Does nothing if already mounted.
47
+ *
48
+ * @param css - The CSS content to mount
49
+ */
50
+ mount(i) {
51
+ if (document.getElementById(this.id)) {
52
+ console.warn(`[PersonaRelay] Stylesheet ${this.id} already appended. Skipping.`);
53
+ return;
54
+ }
55
+ const u = Bt("style", { id: this.id }, [document.createTextNode(i)]);
56
+ document.head.appendChild(u);
57
+ }
58
+ /**
59
+ * Unmounts the stylesheet from the document.
60
+ * Does nothing if not mounted.
61
+ */
62
+ unmount() {
63
+ const i = document.getElementById(this.id);
64
+ if (i == null) {
65
+ console.warn(`[PersonaRelay] No stylesheet ${this.id} to remove. Skipping.`);
66
+ return;
67
+ }
68
+ i.parentNode?.removeChild(i);
69
+ }
70
+ }
71
+ function Bt(e, i, u = []) {
72
+ const l = document.createElement(e);
73
+ for (const [g, w] of Object.entries(i)) {
74
+ const R = g === "className" ? "class" : g;
75
+ l.setAttribute(R, w);
76
+ }
77
+ for (const g of u)
78
+ g !== !1 && (typeof g == "string" ? l.appendChild(document.createTextNode(g)) : l.appendChild(g));
79
+ return l;
80
+ }
81
+ const ln = ".relay-widget__container{position:relative;width:100%;color-scheme:light dark}.relay-widget__iframe{border:none;background:transparent;display:block;width:100%;height:0px}.relay-widget__popover-iframe{border:none;background:transparent;display:block;position:absolute;bottom:100%;left:-32px;transform:translateY(28px);width:calc(100% + 64px);height:0px}.relay-widget__fullscreen-iframe{border:none;background:transparent;display:none;height:0px;color-scheme:light dark}.relay-widget__fullscreen-iframe--visible{display:block;position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483647}.relay-widget__scroll-locked{overflow:hidden!important}";
82
+ function jr(e) {
83
+ if (e === "localhost" || /^\d+\.\d+\.\d+\.\d+$/.test(e))
84
+ return e;
85
+ const i = e.split(".");
86
+ return i.length <= 1 ? e : i.slice(-2).join(".");
87
+ }
88
+ function fn(e, {
89
+ onComplete: i,
90
+ onError: u,
91
+ onExpire: l,
92
+ onWidgetResize: g,
93
+ onPopoverResize: w,
94
+ onFullscreenResize: R,
95
+ host: v
96
+ }) {
97
+ const O = (p) => {
98
+ const m = Fr(v ?? "production");
99
+ if (p.origin !== "")
100
+ try {
101
+ const M = jr(new URL(p.origin).host), A = jr(new URL(m).host);
102
+ if (M !== A)
103
+ return;
104
+ } catch {
105
+ return;
106
+ }
107
+ if (e !== p.data.containerId)
108
+ return;
109
+ const y = p.data;
110
+ switch (y.name) {
111
+ case de.Complete:
112
+ i?.();
113
+ break;
114
+ case de.Error:
115
+ u?.(y.error);
116
+ break;
117
+ case de.WidgetResize:
118
+ g?.(y.metadata);
119
+ break;
120
+ case de.PopoverResize:
121
+ w?.(y.metadata);
122
+ break;
123
+ case de.FullscreenResize:
124
+ R?.(y.metadata);
125
+ break;
126
+ case de.Expire:
127
+ l?.();
128
+ break;
129
+ }
130
+ };
131
+ return window.addEventListener("message", O), () => {
132
+ window.removeEventListener("message", O);
133
+ };
134
+ }
135
+ var Kr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
136
+ function un(e) {
3
137
  if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
4
- var a = e.default;
5
- if (typeof a == "function") {
6
- var f = function l() {
138
+ var i = e.default;
139
+ if (typeof i == "function") {
140
+ var u = function l() {
7
141
  var g = !1;
8
142
  try {
9
143
  g = this instanceof l;
10
144
  } catch {
11
145
  }
12
- return g ? Reflect.construct(a, arguments, this.constructor) : a.apply(this, arguments);
146
+ return g ? Reflect.construct(i, arguments, this.constructor) : i.apply(this, arguments);
13
147
  };
14
- f.prototype = a.prototype;
15
- } else f = {};
16
- return Object.defineProperty(f, "__esModule", { value: !0 }), Object.keys(e).forEach(function(l) {
148
+ u.prototype = i.prototype;
149
+ } else u = {};
150
+ return Object.defineProperty(u, "__esModule", { value: !0 }), Object.keys(e).forEach(function(l) {
17
151
  var g = Object.getOwnPropertyDescriptor(e, l);
18
- Object.defineProperty(f, l, g.get ? g : {
152
+ Object.defineProperty(u, l, g.get ? g : {
19
153
  enumerable: !0,
20
154
  get: function() {
21
155
  return e[l];
22
156
  }
23
157
  });
24
- }), f;
158
+ }), u;
25
159
  }
26
- var Ue, Yr;
160
+ var Be, Qr;
27
161
  function be() {
28
- return Yr || (Yr = 1, Ue = TypeError), Ue;
162
+ return Qr || (Qr = 1, Be = TypeError), Be;
29
163
  }
30
- const sn = {}, pn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
164
+ const cn = {}, sn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
31
165
  __proto__: null,
32
- default: sn
33
- }, Symbol.toStringTag, { value: "Module" })), yn = /* @__PURE__ */ cn(pn);
34
- var ze, Xr;
35
- function xe() {
36
- if (Xr) return ze;
37
- Xr = 1;
38
- var e = typeof Map == "function" && Map.prototype, a = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, f = e && a && typeof a.get == "function" ? a.get : null, l = e && Map.prototype.forEach, g = typeof Set == "function" && Set.prototype, b = Object.getOwnPropertyDescriptor && g ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, P = g && b && typeof b.get == "function" ? b.get : null, v = g && Set.prototype.forEach, O = typeof WeakMap == "function" && WeakMap.prototype, y = O ? WeakMap.prototype.has : null, m = typeof WeakSet == "function" && WeakSet.prototype, d = m ? WeakSet.prototype.has : null, F = typeof WeakRef == "function" && WeakRef.prototype, A = F ? WeakRef.prototype.deref : null, n = Boolean.prototype.valueOf, u = Object.prototype.toString, i = Function.prototype.toString, I = String.prototype.match, w = String.prototype.slice, E = String.prototype.replace, M = String.prototype.toUpperCase, h = String.prototype.toLowerCase, R = RegExp.prototype.test, o = Array.prototype.concat, c = Array.prototype.join, p = Array.prototype.slice, S = Math.floor, _ = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, x = Object.getOwnPropertySymbols, B = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, N = typeof Symbol == "function" && typeof Symbol.iterator == "object", k = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === N || !0) ? Symbol.toStringTag : null, D = Object.prototype.propertyIsEnumerable, K = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(r) {
166
+ default: cn
167
+ }, Symbol.toStringTag, { value: "Module" })), pn = /* @__PURE__ */ un(sn);
168
+ var Ue, Vr;
169
+ function _e() {
170
+ if (Vr) return Ue;
171
+ Vr = 1;
172
+ var e = typeof Map == "function" && Map.prototype, i = Object.getOwnPropertyDescriptor && e ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, u = e && i && typeof i.get == "function" ? i.get : null, l = e && Map.prototype.forEach, g = typeof Set == "function" && Set.prototype, w = Object.getOwnPropertyDescriptor && g ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, R = g && w && typeof w.get == "function" ? w.get : null, v = g && Set.prototype.forEach, O = typeof WeakMap == "function" && WeakMap.prototype, p = O ? WeakMap.prototype.has : null, m = typeof WeakSet == "function" && WeakSet.prototype, y = m ? WeakSet.prototype.has : null, M = typeof WeakRef == "function" && WeakRef.prototype, A = M ? WeakRef.prototype.deref : null, a = Boolean.prototype.valueOf, f = Object.prototype.toString, o = Function.prototype.toString, I = String.prototype.match, h = String.prototype.slice, S = String.prototype.replace, D = String.prototype.toUpperCase, P = String.prototype.toLowerCase, b = RegExp.prototype.test, n = Array.prototype.concat, c = Array.prototype.join, d = Array.prototype.slice, E = Math.floor, _ = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, x = Object.getOwnPropertySymbols, U = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, F = typeof Symbol == "function" && typeof Symbol.iterator == "object", W = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === F || !0) ? Symbol.toStringTag : null, $ = Object.prototype.propertyIsEnumerable, G = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(r) {
39
173
  return r.__proto__;
40
174
  } : null);
41
175
  function s(r, t) {
42
- if (r === 1 / 0 || r === -1 / 0 || r !== r || r && r > -1e3 && r < 1e3 || R.call(/e/, t))
176
+ if (r === 1 / 0 || r === -1 / 0 || r !== r || r && r > -1e3 && r < 1e3 || b.call(/e/, t))
43
177
  return t;
44
- var C = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
178
+ var N = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
45
179
  if (typeof r == "number") {
46
- var L = r < 0 ? -S(-r) : S(r);
47
- if (L !== r) {
48
- var U = String(L), q = w.call(t, U.length + 1);
49
- return E.call(U, C, "$&_") + "." + E.call(E.call(q, /([0-9]{3})/g, "$&_"), /_$/, "");
180
+ var B = r < 0 ? -E(-r) : E(r);
181
+ if (B !== r) {
182
+ var z = String(B), q = h.call(t, z.length + 1);
183
+ return S.call(z, N, "$&_") + "." + S.call(S.call(q, /([0-9]{3})/g, "$&_"), /_$/, "");
50
184
  }
51
185
  }
52
- return E.call(t, C, "$&_");
186
+ return S.call(t, N, "$&_");
53
187
  }
54
- var $ = yn, j = $.custom, X = H(j) ? j : null, ce = {
188
+ var T = pn, K = T.custom, X = Q(K) ? K : null, ie = {
55
189
  __proto__: null,
56
190
  double: '"',
57
191
  single: "'"
58
- }, ve = {
192
+ }, oe = {
59
193
  __proto__: null,
60
194
  double: /(["\\])/g,
61
195
  single: /(['\\])/g
62
196
  };
63
- ze = function r(t, C, L, U) {
64
- var q = C || {};
65
- if (W(q, "quoteStyle") && !W(ce, q.quoteStyle))
197
+ Ue = function r(t, N, B, z) {
198
+ var q = N || {};
199
+ if (J(q, "quoteStyle") && !J(ie, q.quoteStyle))
66
200
  throw new TypeError('option "quoteStyle" must be "single" or "double"');
67
- if (W(q, "maxStringLength") && (typeof q.maxStringLength == "number" ? q.maxStringLength < 0 && q.maxStringLength !== 1 / 0 : q.maxStringLength !== null))
201
+ if (J(q, "maxStringLength") && (typeof q.maxStringLength == "number" ? q.maxStringLength < 0 && q.maxStringLength !== 1 / 0 : q.maxStringLength !== null))
68
202
  throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
69
- var ue = W(q, "customInspect") ? q.customInspect : !0;
70
- if (typeof ue != "boolean" && ue !== "symbol")
203
+ var se = J(q, "customInspect") ? q.customInspect : !0;
204
+ if (typeof se != "boolean" && se !== "symbol")
71
205
  throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
72
- if (W(q, "indent") && q.indent !== null && q.indent !== " " && !(parseInt(q.indent, 10) === q.indent && q.indent > 0))
206
+ if (J(q, "indent") && q.indent !== null && q.indent !== " " && !(parseInt(q.indent, 10) === q.indent && q.indent > 0))
73
207
  throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
74
- if (W(q, "numericSeparator") && typeof q.numericSeparator != "boolean")
208
+ if (J(q, "numericSeparator") && typeof q.numericSeparator != "boolean")
75
209
  throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
76
210
  var ye = q.numericSeparator;
77
211
  if (typeof t > "u")
@@ -81,7 +215,7 @@ function xe() {
81
215
  if (typeof t == "boolean")
82
216
  return t ? "true" : "false";
83
217
  if (typeof t == "string")
84
- return Ur(t, q);
218
+ return Nr(t, q);
85
219
  if (typeof t == "number") {
86
220
  if (t === 0)
87
221
  return 1 / 0 / t > 0 ? "0" : "-0";
@@ -89,136 +223,136 @@ function xe() {
89
223
  return ye ? s(t, Y) : Y;
90
224
  }
91
225
  if (typeof t == "bigint") {
92
- var fe = String(t) + "n";
93
- return ye ? s(t, fe) : fe;
226
+ var pe = String(t) + "n";
227
+ return ye ? s(t, pe) : pe;
94
228
  }
95
- var De = typeof q.depth > "u" ? 5 : q.depth;
96
- if (typeof L > "u" && (L = 0), L >= De && De > 0 && typeof t == "object")
97
- return ae(t) ? "[Array]" : "[Object]";
98
- var we = ln(q, L);
99
- if (typeof U > "u")
100
- U = [];
101
- else if (se(U, t) >= 0)
229
+ var Fe = typeof q.depth > "u" ? 5 : q.depth;
230
+ if (typeof B > "u" && (B = 0), B >= Fe && Fe > 0 && typeof t == "object")
231
+ return fe(t) ? "[Array]" : "[Object]";
232
+ var we = en(q, B);
233
+ if (typeof z > "u")
234
+ z = [];
235
+ else if (ce(z, t) >= 0)
102
236
  return "[Circular]";
103
- function te(Se, _e, fn) {
104
- if (_e && (U = p.call(U), U.push(_e)), fn) {
105
- var Vr = {
237
+ function ne(Se, Ie, tn) {
238
+ if (Ie && (z = d.call(z), z.push(Ie)), tn) {
239
+ var Hr = {
106
240
  depth: q.depth
107
241
  };
108
- return W(q, "quoteStyle") && (Vr.quoteStyle = q.quoteStyle), r(Se, Vr, L + 1, U);
242
+ return J(q, "quoteStyle") && (Hr.quoteStyle = q.quoteStyle), r(Se, Hr, B + 1, z);
109
243
  }
110
- return r(Se, q, L + 1, U);
244
+ return r(Se, q, B + 1, z);
111
245
  }
112
- if (typeof t == "function" && !oe(t)) {
113
- var Wr = Ee(t), kr = Pe(t, te);
114
- return "[Function" + (Wr ? ": " + Wr : " (anonymous)") + "]" + (kr.length > 0 ? " { " + c.call(kr, ", ") + " }" : "");
246
+ if (typeof t == "function" && !j(t)) {
247
+ var Lr = ve(t), Br = Re(t, ne);
248
+ return "[Function" + (Lr ? ": " + Lr : " (anonymous)") + "]" + (Br.length > 0 ? " { " + c.call(Br, ", ") + " }" : "");
115
249
  }
116
- if (H(t)) {
117
- var Gr = N ? E.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : B.call(t);
118
- return typeof t == "object" && !N ? Oe(Gr) : Gr;
250
+ if (Q(t)) {
251
+ var Ur = F ? S.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : U.call(t);
252
+ return typeof t == "object" && !F ? Ee(Ur) : Ur;
119
253
  }
120
- if (nn(t)) {
121
- for (var Ae = "<" + h.call(String(t.nodeName)), Ce = t.attributes || [], Ie = 0; Ie < Ce.length; Ie++)
122
- Ae += " " + Ce[Ie].name + "=" + ee(ne(Ce[Ie].value), "double", q);
123
- return Ae += ">", t.childNodes && t.childNodes.length && (Ae += "..."), Ae += "</" + h.call(String(t.nodeName)) + ">", Ae;
254
+ if (Yt(t)) {
255
+ for (var Oe = "<" + P.call(String(t.nodeName)), De = t.attributes || [], Pe = 0; Pe < De.length; Pe++)
256
+ Oe += " " + De[Pe].name + "=" + le(ae(De[Pe].value), "double", q);
257
+ return Oe += ">", t.childNodes && t.childNodes.length && (Oe += "..."), Oe += "</" + P.call(String(t.nodeName)) + ">", Oe;
124
258
  }
125
- if (ae(t)) {
259
+ if (fe(t)) {
126
260
  if (t.length === 0)
127
261
  return "[]";
128
- var $e = Pe(t, te);
129
- return we && !on($e) ? "[" + Me($e, we) + "]" : "[ " + c.call($e, ", ") + " ]";
262
+ var Ce = Re(t, ne);
263
+ return we && !Zt(Ce) ? "[" + Me(Ce, we) + "]" : "[ " + c.call(Ce, ", ") + " ]";
130
264
  }
131
- if (Q(t)) {
132
- var Ne = Pe(t, te);
133
- return !("cause" in Error.prototype) && "cause" in t && !D.call(t, "cause") ? "{ [" + String(t) + "] " + c.call(o.call("[cause]: " + te(t.cause), Ne), ", ") + " }" : Ne.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + c.call(Ne, ", ") + " }";
265
+ if (C(t)) {
266
+ var $e = Re(t, ne);
267
+ return !("cause" in Error.prototype) && "cause" in t && !$.call(t, "cause") ? "{ [" + String(t) + "] " + c.call(n.call("[cause]: " + ne(t.cause), $e), ", ") + " }" : $e.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + c.call($e, ", ") + " }";
134
268
  }
135
- if (typeof t == "object" && ue) {
136
- if (X && typeof t[X] == "function" && $)
137
- return $(t, { depth: De - L });
138
- if (ue !== "symbol" && typeof t.inspect == "function")
269
+ if (typeof t == "object" && se) {
270
+ if (X && typeof t[X] == "function" && T)
271
+ return T(t, { depth: Fe - B });
272
+ if (se !== "symbol" && typeof t.inspect == "function")
139
273
  return t.inspect();
140
274
  }
141
- if (pe(t)) {
142
- var Hr = [];
143
- return l && l.call(t, function(Se, _e) {
144
- Hr.push(te(_e, t, !0) + " => " + te(Se, t));
145
- }), zr("Map", f.call(t), Hr, we);
275
+ if (te(t)) {
276
+ var zr = [];
277
+ return l && l.call(t, function(Se, Ie) {
278
+ zr.push(ne(Ie, t, !0) + " => " + ne(Se, t));
279
+ }), Tr("Map", u.call(t), zr, we);
146
280
  }
147
- if (me(t)) {
148
- var jr = [];
281
+ if (ge(t)) {
282
+ var Wr = [];
149
283
  return v && v.call(t, function(Se) {
150
- jr.push(te(Se, t));
151
- }), zr("Set", P.call(t), jr, we);
284
+ Wr.push(ne(Se, t));
285
+ }), Tr("Set", R.call(t), Wr, we);
152
286
  }
153
- if (re(t))
287
+ if (he(t))
154
288
  return qe("WeakMap");
155
- if (ge(t))
289
+ if (Jt(t))
156
290
  return qe("WeakSet");
157
- if (he(t))
291
+ if (me(t))
158
292
  return qe("WeakRef");
159
- if (G(t))
160
- return Oe(te(Number(t)));
161
- if (V(t))
162
- return Oe(te(_.call(t)));
163
- if (z(t))
164
- return Oe(n.call(t));
165
- if (T(t))
166
- return Oe(te(String(t)));
293
+ if (L(t))
294
+ return Ee(ne(Number(t)));
295
+ if (ee(t))
296
+ return Ee(ne(_.call(t)));
297
+ if (H(t))
298
+ return Ee(a.call(t));
299
+ if (k(t))
300
+ return Ee(ne(String(t)));
167
301
  if (typeof window < "u" && t === window)
168
302
  return "{ [object Window] }";
169
- if (typeof globalThis < "u" && t === globalThis || typeof Jr < "u" && t === Jr)
303
+ if (typeof globalThis < "u" && t === globalThis || typeof Kr < "u" && t === Kr)
170
304
  return "{ [object globalThis] }";
171
- if (!ie(t) && !oe(t)) {
172
- var Te = Pe(t, te), Kr = K ? K(t) === Object.prototype : t instanceof Object || t.constructor === Object, Le = t instanceof Object ? "" : "null prototype", Qr = !Kr && k && Object(t) === t && k in t ? w.call(J(t), 8, -1) : Le ? "Object" : "", un = Kr || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "", Be = un + (Qr || Le ? "[" + c.call(o.call([], Qr || [], Le || []), ": ") + "] " : "");
173
- return Te.length === 0 ? Be + "{}" : we ? Be + "{" + Me(Te, we) + "}" : Be + "{ " + c.call(Te, ", ") + " }";
305
+ if (!ue(t) && !j(t)) {
306
+ var Ne = Re(t, ne), kr = G ? G(t) === Object.prototype : t instanceof Object || t.constructor === Object, Te = t instanceof Object ? "" : "null prototype", Gr = !kr && W && Object(t) === t && W in t ? h.call(re(t), 8, -1) : Te ? "Object" : "", rn = kr || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "", Le = rn + (Gr || Te ? "[" + c.call(n.call([], Gr || [], Te || []), ": ") + "] " : "");
307
+ return Ne.length === 0 ? Le + "{}" : we ? Le + "{" + Me(Ne, we) + "}" : Le + "{ " + c.call(Ne, ", ") + " }";
174
308
  }
175
309
  return String(t);
176
310
  };
177
- function ee(r, t, C) {
178
- var L = C.quoteStyle || t, U = ce[L];
179
- return U + r + U;
311
+ function le(r, t, N) {
312
+ var B = N.quoteStyle || t, z = ie[B];
313
+ return z + r + z;
180
314
  }
181
- function ne(r) {
182
- return E.call(String(r), /"/g, "&quot;");
315
+ function ae(r) {
316
+ return S.call(String(r), /"/g, "&quot;");
183
317
  }
184
318
  function Z(r) {
185
- return !k || !(typeof r == "object" && (k in r || typeof r[k] < "u"));
186
- }
187
- function ae(r) {
188
- return J(r) === "[object Array]" && Z(r);
319
+ return !W || !(typeof r == "object" && (W in r || typeof r[W] < "u"));
189
320
  }
190
- function ie(r) {
191
- return J(r) === "[object Date]" && Z(r);
321
+ function fe(r) {
322
+ return re(r) === "[object Array]" && Z(r);
192
323
  }
193
- function oe(r) {
194
- return J(r) === "[object RegExp]" && Z(r);
324
+ function ue(r) {
325
+ return re(r) === "[object Date]" && Z(r);
195
326
  }
196
- function Q(r) {
197
- return J(r) === "[object Error]" && Z(r);
327
+ function j(r) {
328
+ return re(r) === "[object RegExp]" && Z(r);
198
329
  }
199
- function T(r) {
200
- return J(r) === "[object String]" && Z(r);
330
+ function C(r) {
331
+ return re(r) === "[object Error]" && Z(r);
201
332
  }
202
- function G(r) {
203
- return J(r) === "[object Number]" && Z(r);
333
+ function k(r) {
334
+ return re(r) === "[object String]" && Z(r);
204
335
  }
205
- function z(r) {
206
- return J(r) === "[object Boolean]" && Z(r);
336
+ function L(r) {
337
+ return re(r) === "[object Number]" && Z(r);
207
338
  }
208
339
  function H(r) {
209
- if (N)
340
+ return re(r) === "[object Boolean]" && Z(r);
341
+ }
342
+ function Q(r) {
343
+ if (F)
210
344
  return r && typeof r == "object" && r instanceof Symbol;
211
345
  if (typeof r == "symbol")
212
346
  return !0;
213
- if (!r || typeof r != "object" || !B)
347
+ if (!r || typeof r != "object" || !U)
214
348
  return !1;
215
349
  try {
216
- return B.call(r), !0;
350
+ return U.call(r), !0;
217
351
  } catch {
218
352
  }
219
353
  return !1;
220
354
  }
221
- function V(r) {
355
+ function ee(r) {
222
356
  if (!r || typeof r != "object" || !_)
223
357
  return !1;
224
358
  try {
@@ -227,36 +361,36 @@ function xe() {
227
361
  }
228
362
  return !1;
229
363
  }
230
- var le = Object.prototype.hasOwnProperty || function(r) {
364
+ var V = Object.prototype.hasOwnProperty || function(r) {
231
365
  return r in this;
232
366
  };
233
- function W(r, t) {
234
- return le.call(r, t);
367
+ function J(r, t) {
368
+ return V.call(r, t);
235
369
  }
236
- function J(r) {
237
- return u.call(r);
370
+ function re(r) {
371
+ return f.call(r);
238
372
  }
239
- function Ee(r) {
373
+ function ve(r) {
240
374
  if (r.name)
241
375
  return r.name;
242
- var t = I.call(i.call(r), /^function\s*([\w$]+)/);
376
+ var t = I.call(o.call(r), /^function\s*([\w$]+)/);
243
377
  return t ? t[1] : null;
244
378
  }
245
- function se(r, t) {
379
+ function ce(r, t) {
246
380
  if (r.indexOf)
247
381
  return r.indexOf(t);
248
- for (var C = 0, L = r.length; C < L; C++)
249
- if (r[C] === t)
250
- return C;
382
+ for (var N = 0, B = r.length; N < B; N++)
383
+ if (r[N] === t)
384
+ return N;
251
385
  return -1;
252
386
  }
253
- function pe(r) {
254
- if (!f || !r || typeof r != "object")
387
+ function te(r) {
388
+ if (!u || !r || typeof r != "object")
255
389
  return !1;
256
390
  try {
257
- f.call(r);
391
+ u.call(r);
258
392
  try {
259
- P.call(r);
393
+ R.call(r);
260
394
  } catch {
261
395
  return !0;
262
396
  }
@@ -265,13 +399,13 @@ function xe() {
265
399
  }
266
400
  return !1;
267
401
  }
268
- function re(r) {
269
- if (!y || !r || typeof r != "object")
402
+ function he(r) {
403
+ if (!p || !r || typeof r != "object")
270
404
  return !1;
271
405
  try {
272
- y.call(r, y);
406
+ p.call(r, p);
273
407
  try {
274
- d.call(r, d);
408
+ y.call(r, y);
275
409
  } catch {
276
410
  return !0;
277
411
  }
@@ -280,7 +414,7 @@ function xe() {
280
414
  }
281
415
  return !1;
282
416
  }
283
- function he(r) {
417
+ function me(r) {
284
418
  if (!A || !r || typeof r != "object")
285
419
  return !1;
286
420
  try {
@@ -289,13 +423,13 @@ function xe() {
289
423
  }
290
424
  return !1;
291
425
  }
292
- function me(r) {
293
- if (!P || !r || typeof r != "object")
426
+ function ge(r) {
427
+ if (!R || !r || typeof r != "object")
294
428
  return !1;
295
429
  try {
296
- P.call(r);
430
+ R.call(r);
297
431
  try {
298
- f.call(r);
432
+ u.call(r);
299
433
  } catch {
300
434
  return !0;
301
435
  }
@@ -304,13 +438,13 @@ function xe() {
304
438
  }
305
439
  return !1;
306
440
  }
307
- function ge(r) {
308
- if (!d || !r || typeof r != "object")
441
+ function Jt(r) {
442
+ if (!y || !r || typeof r != "object")
309
443
  return !1;
310
444
  try {
311
- d.call(r, d);
445
+ y.call(r, y);
312
446
  try {
313
- y.call(r, y);
447
+ p.call(r, p);
314
448
  } catch {
315
449
  return !0;
316
450
  }
@@ -319,236 +453,236 @@ function xe() {
319
453
  }
320
454
  return !1;
321
455
  }
322
- function nn(r) {
456
+ function Yt(r) {
323
457
  return !r || typeof r != "object" ? !1 : typeof HTMLElement < "u" && r instanceof HTMLElement ? !0 : typeof r.nodeName == "string" && typeof r.getAttribute == "function";
324
458
  }
325
- function Ur(r, t) {
459
+ function Nr(r, t) {
326
460
  if (r.length > t.maxStringLength) {
327
- var C = r.length - t.maxStringLength, L = "... " + C + " more character" + (C > 1 ? "s" : "");
328
- return Ur(w.call(r, 0, t.maxStringLength), t) + L;
461
+ var N = r.length - t.maxStringLength, B = "... " + N + " more character" + (N > 1 ? "s" : "");
462
+ return Nr(h.call(r, 0, t.maxStringLength), t) + B;
329
463
  }
330
- var U = ve[t.quoteStyle || "single"];
331
- U.lastIndex = 0;
332
- var q = E.call(E.call(r, U, "\\$1"), /[\x00-\x1f]/g, an);
333
- return ee(q, "single", t);
464
+ var z = oe[t.quoteStyle || "single"];
465
+ z.lastIndex = 0;
466
+ var q = S.call(S.call(r, z, "\\$1"), /[\x00-\x1f]/g, Xt);
467
+ return le(q, "single", t);
334
468
  }
335
- function an(r) {
336
- var t = r.charCodeAt(0), C = {
469
+ function Xt(r) {
470
+ var t = r.charCodeAt(0), N = {
337
471
  8: "b",
338
472
  9: "t",
339
473
  10: "n",
340
474
  12: "f",
341
475
  13: "r"
342
476
  }[t];
343
- return C ? "\\" + C : "\\x" + (t < 16 ? "0" : "") + M.call(t.toString(16));
477
+ return N ? "\\" + N : "\\x" + (t < 16 ? "0" : "") + D.call(t.toString(16));
344
478
  }
345
- function Oe(r) {
479
+ function Ee(r) {
346
480
  return "Object(" + r + ")";
347
481
  }
348
482
  function qe(r) {
349
483
  return r + " { ? }";
350
484
  }
351
- function zr(r, t, C, L) {
352
- var U = L ? Me(C, L) : c.call(C, ", ");
353
- return r + " (" + t + ") {" + U + "}";
485
+ function Tr(r, t, N, B) {
486
+ var z = B ? Me(N, B) : c.call(N, ", ");
487
+ return r + " (" + t + ") {" + z + "}";
354
488
  }
355
- function on(r) {
489
+ function Zt(r) {
356
490
  for (var t = 0; t < r.length; t++)
357
- if (se(r[t], `
491
+ if (ce(r[t], `
358
492
  `) >= 0)
359
493
  return !1;
360
494
  return !0;
361
495
  }
362
- function ln(r, t) {
363
- var C;
496
+ function en(r, t) {
497
+ var N;
364
498
  if (r.indent === " ")
365
- C = " ";
499
+ N = " ";
366
500
  else if (typeof r.indent == "number" && r.indent > 0)
367
- C = c.call(Array(r.indent + 1), " ");
501
+ N = c.call(Array(r.indent + 1), " ");
368
502
  else
369
503
  return null;
370
504
  return {
371
- base: C,
372
- prev: c.call(Array(t + 1), C)
505
+ base: N,
506
+ prev: c.call(Array(t + 1), N)
373
507
  };
374
508
  }
375
509
  function Me(r, t) {
376
510
  if (r.length === 0)
377
511
  return "";
378
- var C = `
512
+ var N = `
379
513
  ` + t.prev + t.base;
380
- return C + c.call(r, "," + C) + `
514
+ return N + c.call(r, "," + N) + `
381
515
  ` + t.prev;
382
516
  }
383
- function Pe(r, t) {
384
- var C = ae(r), L = [];
385
- if (C) {
386
- L.length = r.length;
387
- for (var U = 0; U < r.length; U++)
388
- L[U] = W(r, U) ? t(r[U], r) : "";
389
- }
390
- var q = typeof x == "function" ? x(r) : [], ue;
517
+ function Re(r, t) {
518
+ var N = fe(r), B = [];
391
519
  if (N) {
392
- ue = {};
520
+ B.length = r.length;
521
+ for (var z = 0; z < r.length; z++)
522
+ B[z] = J(r, z) ? t(r[z], r) : "";
523
+ }
524
+ var q = typeof x == "function" ? x(r) : [], se;
525
+ if (F) {
526
+ se = {};
393
527
  for (var ye = 0; ye < q.length; ye++)
394
- ue["$" + q[ye]] = q[ye];
528
+ se["$" + q[ye]] = q[ye];
395
529
  }
396
530
  for (var Y in r)
397
- W(r, Y) && (C && String(Number(Y)) === Y && Y < r.length || N && ue["$" + Y] instanceof Symbol || (R.call(/[^\w$]/, Y) ? L.push(t(Y, r) + ": " + t(r[Y], r)) : L.push(Y + ": " + t(r[Y], r))));
531
+ J(r, Y) && (N && String(Number(Y)) === Y && Y < r.length || F && se["$" + Y] instanceof Symbol || (b.call(/[^\w$]/, Y) ? B.push(t(Y, r) + ": " + t(r[Y], r)) : B.push(Y + ": " + t(r[Y], r))));
398
532
  if (typeof x == "function")
399
- for (var fe = 0; fe < q.length; fe++)
400
- D.call(r, q[fe]) && L.push("[" + t(q[fe]) + "]: " + t(r[q[fe]], r));
401
- return L;
533
+ for (var pe = 0; pe < q.length; pe++)
534
+ $.call(r, q[pe]) && B.push("[" + t(q[pe]) + "]: " + t(r[q[pe]], r));
535
+ return B;
402
536
  }
403
- return ze;
537
+ return Ue;
404
538
  }
405
- var We, Zr;
406
- function dn() {
407
- if (Zr) return We;
408
- Zr = 1;
409
- var e = /* @__PURE__ */ xe(), a = /* @__PURE__ */ be(), f = function(v, O, y) {
410
- for (var m = v, d; (d = m.next) != null; m = d)
411
- if (d.key === O)
412
- return m.next = d.next, y || (d.next = /** @type {NonNullable<typeof list.next>} */
413
- v.next, v.next = d), d;
539
+ var ze, Jr;
540
+ function yn() {
541
+ if (Jr) return ze;
542
+ Jr = 1;
543
+ var e = /* @__PURE__ */ _e(), i = /* @__PURE__ */ be(), u = function(v, O, p) {
544
+ for (var m = v, y; (y = m.next) != null; m = y)
545
+ if (y.key === O)
546
+ return m.next = y.next, p || (y.next = /** @type {NonNullable<typeof list.next>} */
547
+ v.next, v.next = y), y;
414
548
  }, l = function(v, O) {
415
549
  if (v) {
416
- var y = f(v, O);
417
- return y && y.value;
550
+ var p = u(v, O);
551
+ return p && p.value;
418
552
  }
419
- }, g = function(v, O, y) {
420
- var m = f(v, O);
421
- m ? m.value = y : v.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
553
+ }, g = function(v, O, p) {
554
+ var m = u(v, O);
555
+ m ? m.value = p : v.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
422
556
  {
423
557
  // eslint-disable-line no-param-reassign, no-extra-parens
424
558
  key: O,
425
559
  next: v.next,
426
- value: y
560
+ value: p
427
561
  };
428
- }, b = function(v, O) {
429
- return v ? !!f(v, O) : !1;
430
- }, P = function(v, O) {
562
+ }, w = function(v, O) {
563
+ return v ? !!u(v, O) : !1;
564
+ }, R = function(v, O) {
431
565
  if (v)
432
- return f(v, O, !0);
566
+ return u(v, O, !0);
433
567
  };
434
- return We = function() {
435
- var O, y = {
568
+ return ze = function() {
569
+ var O, p = {
436
570
  assert: function(m) {
437
- if (!y.has(m))
438
- throw new a("Side channel does not contain " + e(m));
571
+ if (!p.has(m))
572
+ throw new i("Side channel does not contain " + e(m));
439
573
  },
440
574
  delete: function(m) {
441
- var d = O && O.next, F = P(O, m);
442
- return F && d && d === F && (O = void 0), !!F;
575
+ var y = R(O, m);
576
+ return y && O && !O.next && (O = void 0), !!y;
443
577
  },
444
578
  get: function(m) {
445
579
  return l(O, m);
446
580
  },
447
581
  has: function(m) {
448
- return b(O, m);
582
+ return w(O, m);
449
583
  },
450
- set: function(m, d) {
584
+ set: function(m, y) {
451
585
  O || (O = {
452
586
  next: void 0
453
587
  }), g(
454
588
  /** @type {NonNullable<typeof $o>} */
455
589
  O,
456
590
  m,
457
- d
591
+ y
458
592
  );
459
593
  }
460
594
  };
461
- return y;
462
- }, We;
595
+ return p;
596
+ }, ze;
463
597
  }
464
- var ke, et;
465
- function jt() {
466
- return et || (et = 1, ke = Object), ke;
598
+ var We, Yr;
599
+ function Ut() {
600
+ return Yr || (Yr = 1, We = Object), We;
467
601
  }
468
- var Ge, rt;
602
+ var ke, Xr;
603
+ function dn() {
604
+ return Xr || (Xr = 1, ke = Error), ke;
605
+ }
606
+ var Ge, Zr;
469
607
  function vn() {
470
- return rt || (rt = 1, Ge = Error), Ge;
608
+ return Zr || (Zr = 1, Ge = EvalError), Ge;
471
609
  }
472
- var He, tt;
610
+ var He, et;
473
611
  function hn() {
474
- return tt || (tt = 1, He = EvalError), He;
612
+ return et || (et = 1, He = RangeError), He;
475
613
  }
476
- var je, nt;
614
+ var je, rt;
477
615
  function mn() {
478
- return nt || (nt = 1, je = RangeError), je;
616
+ return rt || (rt = 1, je = ReferenceError), je;
479
617
  }
480
- var Ke, at;
618
+ var Ke, tt;
481
619
  function gn() {
482
- return at || (at = 1, Ke = ReferenceError), Ke;
620
+ return tt || (tt = 1, Ke = SyntaxError), Ke;
483
621
  }
484
- var Qe, it;
622
+ var Qe, nt;
485
623
  function wn() {
486
- return it || (it = 1, Qe = SyntaxError), Qe;
624
+ return nt || (nt = 1, Qe = URIError), Qe;
487
625
  }
488
- var Ve, ot;
626
+ var Ve, at;
489
627
  function Sn() {
490
- return ot || (ot = 1, Ve = URIError), Ve;
628
+ return at || (at = 1, Ve = Math.abs), Ve;
491
629
  }
492
- var Je, lt;
630
+ var Je, it;
493
631
  function bn() {
494
- return lt || (lt = 1, Je = Math.abs), Je;
632
+ return it || (it = 1, Je = Math.floor), Je;
495
633
  }
496
- var Ye, ut;
634
+ var Ye, ot;
497
635
  function En() {
498
- return ut || (ut = 1, Ye = Math.floor), Ye;
636
+ return ot || (ot = 1, Ye = Math.max), Ye;
499
637
  }
500
- var Xe, ft;
638
+ var Xe, lt;
501
639
  function On() {
502
- return ft || (ft = 1, Xe = Math.max), Xe;
640
+ return lt || (lt = 1, Xe = Math.min), Xe;
503
641
  }
504
- var Ze, ct;
642
+ var Ze, ft;
505
643
  function An() {
506
- return ct || (ct = 1, Ze = Math.min), Ze;
644
+ return ft || (ft = 1, Ze = Math.pow), Ze;
507
645
  }
508
- var er, st;
646
+ var er, ut;
509
647
  function Rn() {
510
- return st || (st = 1, er = Math.pow), er;
648
+ return ut || (ut = 1, er = Math.round), er;
511
649
  }
512
- var rr, pt;
650
+ var rr, ct;
513
651
  function Pn() {
514
- return pt || (pt = 1, rr = Math.round), rr;
652
+ return ct || (ct = 1, rr = Number.isNaN || function(i) {
653
+ return i !== i;
654
+ }), rr;
515
655
  }
516
- var tr, yt;
656
+ var tr, st;
517
657
  function In() {
518
- return yt || (yt = 1, tr = Number.isNaN || function(a) {
519
- return a !== a;
520
- }), tr;
658
+ if (st) return tr;
659
+ st = 1;
660
+ var e = /* @__PURE__ */ Pn();
661
+ return tr = function(u) {
662
+ return e(u) || u === 0 ? u : u < 0 ? -1 : 1;
663
+ }, tr;
521
664
  }
522
- var nr, dt;
665
+ var nr, pt;
523
666
  function _n() {
524
- if (dt) return nr;
525
- dt = 1;
526
- var e = /* @__PURE__ */ In();
527
- return nr = function(f) {
528
- return e(f) || f === 0 ? f : f < 0 ? -1 : 1;
529
- }, nr;
667
+ return pt || (pt = 1, nr = Object.getOwnPropertyDescriptor), nr;
530
668
  }
531
- var ar, vt;
532
- function xn() {
533
- return vt || (vt = 1, ar = Object.getOwnPropertyDescriptor), ar;
534
- }
535
- var ir, ht;
536
- function Kt() {
537
- if (ht) return ir;
538
- ht = 1;
539
- var e = /* @__PURE__ */ xn();
669
+ var ar, yt;
670
+ function zt() {
671
+ if (yt) return ar;
672
+ yt = 1;
673
+ var e = /* @__PURE__ */ _n();
540
674
  if (e)
541
675
  try {
542
676
  e([], "length");
543
677
  } catch {
544
678
  e = null;
545
679
  }
546
- return ir = e, ir;
680
+ return ar = e, ar;
547
681
  }
548
- var or, mt;
549
- function Fn() {
550
- if (mt) return or;
551
- mt = 1;
682
+ var ir, dt;
683
+ function xn() {
684
+ if (dt) return ir;
685
+ dt = 1;
552
686
  var e = Object.defineProperty || !1;
553
687
  if (e)
554
688
  try {
@@ -556,246 +690,218 @@ function Fn() {
556
690
  } catch {
557
691
  e = !1;
558
692
  }
559
- return or = e, or;
693
+ return ir = e, ir;
560
694
  }
561
- var lr, gt;
695
+ var or, vt;
562
696
  function qn() {
563
- return gt || (gt = 1, lr = function() {
697
+ return vt || (vt = 1, or = function() {
564
698
  if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
565
699
  return !1;
566
700
  if (typeof Symbol.iterator == "symbol")
567
701
  return !0;
568
- var a = {}, f = /* @__PURE__ */ Symbol("test"), l = Object(f);
569
- if (typeof f == "string" || Object.prototype.toString.call(f) !== "[object Symbol]" || Object.prototype.toString.call(l) !== "[object Symbol]")
702
+ var i = {}, u = /* @__PURE__ */ Symbol("test"), l = Object(u);
703
+ if (typeof u == "string" || Object.prototype.toString.call(u) !== "[object Symbol]" || Object.prototype.toString.call(l) !== "[object Symbol]")
570
704
  return !1;
571
705
  var g = 42;
572
- a[f] = g;
573
- for (var b in a)
706
+ i[u] = g;
707
+ for (var w in i)
574
708
  return !1;
575
- if (typeof Object.keys == "function" && Object.keys(a).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(a).length !== 0)
709
+ if (typeof Object.keys == "function" && Object.keys(i).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(i).length !== 0)
576
710
  return !1;
577
- var P = Object.getOwnPropertySymbols(a);
578
- if (P.length !== 1 || P[0] !== f || !Object.prototype.propertyIsEnumerable.call(a, f))
711
+ var R = Object.getOwnPropertySymbols(i);
712
+ if (R.length !== 1 || R[0] !== u || !Object.prototype.propertyIsEnumerable.call(i, u))
579
713
  return !1;
580
714
  if (typeof Object.getOwnPropertyDescriptor == "function") {
581
715
  var v = (
582
716
  /** @type {PropertyDescriptor} */
583
- Object.getOwnPropertyDescriptor(a, f)
717
+ Object.getOwnPropertyDescriptor(i, u)
584
718
  );
585
719
  if (v.value !== g || v.enumerable !== !0)
586
720
  return !1;
587
721
  }
588
722
  return !0;
589
- }), lr;
723
+ }), or;
590
724
  }
591
- var ur, wt;
725
+ var lr, ht;
592
726
  function Mn() {
593
- if (wt) return ur;
594
- wt = 1;
595
- var e = typeof Symbol < "u" && Symbol, a = qn();
596
- return ur = function() {
597
- return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof /* @__PURE__ */ Symbol("bar") != "symbol" ? !1 : a();
598
- }, ur;
727
+ if (ht) return lr;
728
+ ht = 1;
729
+ var e = typeof Symbol < "u" && Symbol, i = qn();
730
+ return lr = function() {
731
+ return typeof e != "function" || typeof Symbol != "function" || typeof e("foo") != "symbol" || typeof /* @__PURE__ */ Symbol("bar") != "symbol" ? !1 : i();
732
+ }, lr;
599
733
  }
600
- var fr, St;
601
- function Qt() {
602
- return St || (St = 1, fr = typeof Reflect < "u" && Reflect.getPrototypeOf || null), fr;
734
+ var fr, mt;
735
+ function Wt() {
736
+ return mt || (mt = 1, fr = typeof Reflect < "u" && Reflect.getPrototypeOf || null), fr;
603
737
  }
604
- var cr, bt;
605
- function Vt() {
606
- if (bt) return cr;
607
- bt = 1;
608
- var e = /* @__PURE__ */ jt();
609
- return cr = e.getPrototypeOf || null, cr;
738
+ var ur, gt;
739
+ function kt() {
740
+ if (gt) return ur;
741
+ gt = 1;
742
+ var e = /* @__PURE__ */ Ut();
743
+ return ur = e.getPrototypeOf || null, ur;
610
744
  }
611
- var sr, Et;
612
- function Dn() {
613
- if (Et) return sr;
614
- Et = 1;
615
- var e = "Function.prototype.bind called on incompatible ", a = Object.prototype.toString, f = Math.max, l = "[object Function]", g = function(O, y) {
616
- for (var m = [], d = 0; d < O.length; d += 1)
617
- m[d] = O[d];
618
- for (var F = 0; F < y.length; F += 1)
619
- m[F + O.length] = y[F];
745
+ var cr, wt;
746
+ function Fn() {
747
+ if (wt) return cr;
748
+ wt = 1;
749
+ var e = "Function.prototype.bind called on incompatible ", i = Object.prototype.toString, u = Math.max, l = "[object Function]", g = function(O, p) {
750
+ for (var m = [], y = 0; y < O.length; y += 1)
751
+ m[y] = O[y];
752
+ for (var M = 0; M < p.length; M += 1)
753
+ m[M + O.length] = p[M];
620
754
  return m;
621
- }, b = function(O, y) {
622
- for (var m = [], d = y, F = 0; d < O.length; d += 1, F += 1)
623
- m[F] = O[d];
755
+ }, w = function(O, p) {
756
+ for (var m = [], y = p, M = 0; y < O.length; y += 1, M += 1)
757
+ m[M] = O[y];
624
758
  return m;
625
- }, P = function(v, O) {
626
- for (var y = "", m = 0; m < v.length; m += 1)
627
- y += v[m], m + 1 < v.length && (y += O);
628
- return y;
759
+ }, R = function(v, O) {
760
+ for (var p = "", m = 0; m < v.length; m += 1)
761
+ p += v[m], m + 1 < v.length && (p += O);
762
+ return p;
629
763
  };
630
- return sr = function(O) {
631
- var y = this;
632
- if (typeof y != "function" || a.apply(y) !== l)
633
- throw new TypeError(e + y);
634
- for (var m = b(arguments, 1), d, F = function() {
635
- if (this instanceof d) {
636
- var I = y.apply(
764
+ return cr = function(O) {
765
+ var p = this;
766
+ if (typeof p != "function" || i.apply(p) !== l)
767
+ throw new TypeError(e + p);
768
+ for (var m = w(arguments, 1), y, M = function() {
769
+ if (this instanceof y) {
770
+ var I = p.apply(
637
771
  this,
638
772
  g(m, arguments)
639
773
  );
640
774
  return Object(I) === I ? I : this;
641
775
  }
642
- return y.apply(
776
+ return p.apply(
643
777
  O,
644
778
  g(m, arguments)
645
779
  );
646
- }, A = f(0, y.length - m.length), n = [], u = 0; u < A; u++)
647
- n[u] = "$" + u;
648
- if (d = Function("binder", "return function (" + P(n, ",") + "){ return binder.apply(this,arguments); }")(F), y.prototype) {
649
- var i = function() {
780
+ }, A = u(0, p.length - m.length), a = [], f = 0; f < A; f++)
781
+ a[f] = "$" + f;
782
+ if (y = Function("binder", "return function (" + R(a, ",") + "){ return binder.apply(this,arguments); }")(M), p.prototype) {
783
+ var o = function() {
650
784
  };
651
- i.prototype = y.prototype, d.prototype = new i(), i.prototype = null;
785
+ o.prototype = p.prototype, y.prototype = new o(), o.prototype = null;
652
786
  }
653
- return d;
654
- }, sr;
787
+ return y;
788
+ }, cr;
655
789
  }
656
- var pr, Ot;
657
- function Fe() {
658
- if (Ot) return pr;
659
- Ot = 1;
660
- var e = Dn();
661
- return pr = Function.prototype.bind || e, pr;
790
+ var sr, St;
791
+ function xe() {
792
+ if (St) return sr;
793
+ St = 1;
794
+ var e = Fn();
795
+ return sr = Function.prototype.bind || e, sr;
662
796
  }
663
- var yr, At;
664
- function Nr() {
665
- return At || (At = 1, yr = Function.prototype.call), yr;
797
+ var pr, bt;
798
+ function Dr() {
799
+ return bt || (bt = 1, pr = Function.prototype.call), pr;
666
800
  }
667
- var dr, Rt;
668
- function Jt() {
669
- return Rt || (Rt = 1, dr = Function.prototype.apply), dr;
801
+ var yr, Et;
802
+ function Gt() {
803
+ return Et || (Et = 1, yr = Function.prototype.apply), yr;
670
804
  }
671
- var vr, Pt;
672
- function Cn() {
673
- return Pt || (Pt = 1, vr = typeof Reflect < "u" && Reflect && Reflect.apply), vr;
805
+ var dr, Ot;
806
+ function Dn() {
807
+ return Ot || (Ot = 1, dr = typeof Reflect < "u" && Reflect && Reflect.apply), dr;
674
808
  }
675
- var hr, It;
676
- function $n() {
677
- if (It) return hr;
678
- It = 1;
679
- var e = Fe(), a = Jt(), f = Nr(), l = Cn();
680
- return hr = l || e.call(f, a), hr;
809
+ var vr, At;
810
+ function Cn() {
811
+ if (At) return vr;
812
+ At = 1;
813
+ var e = xe(), i = Gt(), u = Dr(), l = Dn();
814
+ return vr = l || e.call(u, i), vr;
681
815
  }
682
- var mr, _t;
683
- function Yt() {
684
- if (_t) return mr;
685
- _t = 1;
686
- var e = Fe(), a = /* @__PURE__ */ be(), f = Nr(), l = $n();
687
- return mr = function(b) {
688
- if (b.length < 1 || typeof b[0] != "function")
689
- throw new a("a function is required");
690
- return l(e, f, b);
691
- }, mr;
816
+ var hr, Rt;
817
+ function Ht() {
818
+ if (Rt) return hr;
819
+ Rt = 1;
820
+ var e = xe(), i = /* @__PURE__ */ be(), u = Dr(), l = Cn();
821
+ return hr = function(w) {
822
+ if (w.length < 1 || typeof w[0] != "function")
823
+ throw new i("a function is required");
824
+ return l(e, u, w);
825
+ }, hr;
692
826
  }
693
- var gr, xt;
694
- function Nn() {
695
- if (xt) return gr;
696
- xt = 1;
697
- var e = Yt(), a = /* @__PURE__ */ Kt(), f;
827
+ var mr, Pt;
828
+ function $n() {
829
+ if (Pt) return mr;
830
+ Pt = 1;
831
+ var e = Ht(), i = /* @__PURE__ */ zt(), u;
698
832
  try {
699
- f = /** @type {{ __proto__?: typeof Array.prototype }} */
833
+ u = /** @type {{ __proto__?: typeof Array.prototype }} */
700
834
  [].__proto__ === Array.prototype;
701
- } catch (P) {
702
- if (!P || typeof P != "object" || !("code" in P) || P.code !== "ERR_PROTO_ACCESS")
703
- throw P;
835
+ } catch (R) {
836
+ if (!R || typeof R != "object" || !("code" in R) || R.code !== "ERR_PROTO_ACCESS")
837
+ throw R;
704
838
  }
705
- var l = !!f && a && a(
839
+ var l = !!u && i && i(
706
840
  Object.prototype,
707
841
  /** @type {keyof typeof Object.prototype} */
708
842
  "__proto__"
709
- ), g = Object, b = g.getPrototypeOf;
710
- return gr = l && typeof l.get == "function" ? e([l.get]) : typeof b == "function" ? (
843
+ ), g = Object, w = g.getPrototypeOf;
844
+ return mr = l && typeof l.get == "function" ? e([l.get]) : typeof w == "function" ? (
711
845
  /** @type {import('./get')} */
712
846
  function(v) {
713
- return b(v == null ? v : g(v));
847
+ return w(v == null ? v : g(v));
714
848
  }
715
- ) : !1, gr;
849
+ ) : !1, mr;
716
850
  }
717
- var wr, Ft;
718
- function Tn() {
719
- if (Ft) return wr;
720
- Ft = 1;
721
- var e = Qt(), a = Vt(), f = /* @__PURE__ */ Nn();
722
- return wr = e ? function(g) {
851
+ var gr, It;
852
+ function Nn() {
853
+ if (It) return gr;
854
+ It = 1;
855
+ var e = Wt(), i = kt(), u = /* @__PURE__ */ $n();
856
+ return gr = e ? function(g) {
723
857
  return e(g);
724
- } : a ? function(g) {
858
+ } : i ? function(g) {
725
859
  if (!g || typeof g != "object" && typeof g != "function")
726
860
  throw new TypeError("getProto: not an object");
727
- return a(g);
728
- } : f ? function(g) {
729
- return f(g);
730
- } : null, wr;
861
+ return i(g);
862
+ } : u ? function(g) {
863
+ return u(g);
864
+ } : null, gr;
731
865
  }
732
- var Sr, qt;
733
- function Ln() {
734
- if (qt) return Sr;
735
- qt = 1;
736
- const e = (
737
- /** @type {import('.').AsyncFunctionConstructor} */
738
- (async function() {
739
- }).constructor
740
- );
741
- return Sr = () => e, Sr;
742
- }
743
- var br, Mt;
744
- function Bn() {
745
- if (Mt) return br;
746
- Mt = 1;
747
- const e = (
748
- /** @type {GeneratorFunctionConstructor} */
749
- (function* () {
750
- }).constructor
751
- );
752
- return br = () => e, br;
753
- }
754
- var Er, Dt;
755
- function Un() {
756
- if (Dt) return Er;
757
- Dt = 1;
758
- const e = (
759
- /** @type {import('.').AsyncGeneratorFunctionConstructor} */
760
- (async function* () {
761
- }).constructor
762
- );
763
- return Er = () => e, Er;
764
- }
765
- var Or, Ct;
766
- function zn() {
767
- if (Ct) return Or;
768
- Ct = 1;
769
- var e = Function.prototype.call, a = Object.prototype.hasOwnProperty, f = Fe();
770
- return Or = f.call(e, a), Or;
866
+ var wr, _t;
867
+ function Tn() {
868
+ if (_t) return wr;
869
+ _t = 1;
870
+ var e = Function.prototype.call, i = Object.prototype.hasOwnProperty, u = xe();
871
+ return wr = u.call(e, i), wr;
771
872
  }
772
- var Ar, $t;
773
- function Tr() {
774
- if ($t) return Ar;
775
- $t = 1;
776
- var e, a = /* @__PURE__ */ jt(), f = /* @__PURE__ */ vn(), l = /* @__PURE__ */ hn(), g = /* @__PURE__ */ mn(), b = /* @__PURE__ */ gn(), P = /* @__PURE__ */ wn(), v = /* @__PURE__ */ be(), O = /* @__PURE__ */ Sn(), y = /* @__PURE__ */ bn(), m = /* @__PURE__ */ En(), d = /* @__PURE__ */ On(), F = /* @__PURE__ */ An(), A = /* @__PURE__ */ Rn(), n = /* @__PURE__ */ Pn(), u = /* @__PURE__ */ _n(), i = /* @__PURE__ */ Kt(), I = /* @__PURE__ */ Fn(), w = function() {
873
+ var Sr, xt;
874
+ function Cr() {
875
+ if (xt) return Sr;
876
+ xt = 1;
877
+ var e, i = /* @__PURE__ */ Ut(), u = /* @__PURE__ */ dn(), l = /* @__PURE__ */ vn(), g = /* @__PURE__ */ hn(), w = /* @__PURE__ */ mn(), R = /* @__PURE__ */ gn(), v = /* @__PURE__ */ be(), O = /* @__PURE__ */ wn(), p = /* @__PURE__ */ Sn(), m = /* @__PURE__ */ bn(), y = /* @__PURE__ */ En(), M = /* @__PURE__ */ On(), A = /* @__PURE__ */ An(), a = /* @__PURE__ */ Rn(), f = /* @__PURE__ */ In(), o = Function, I = function(j) {
878
+ try {
879
+ return o('"use strict"; return (' + j + ").constructor;")();
880
+ } catch {
881
+ }
882
+ }, h = /* @__PURE__ */ zt(), S = /* @__PURE__ */ xn(), D = function() {
777
883
  throw new v();
778
- }, E = i ? (function() {
884
+ }, P = h ? (function() {
779
885
  try {
780
- return arguments.callee, w;
886
+ return arguments.callee, D;
781
887
  } catch {
782
888
  try {
783
- return i(arguments, "callee").get;
889
+ return h(arguments, "callee").get;
784
890
  } catch {
785
- return w;
891
+ return D;
786
892
  }
787
893
  }
788
- })() : w, M = Mn()(), h = Tn(), R = Vt(), o = Qt(), c = Jt(), p = Nr(), S = {}, _ = typeof Uint8Array > "u" || !h ? e : h(Uint8Array), x = {
894
+ })() : D, b = Mn()(), n = Nn(), c = kt(), d = Wt(), E = Gt(), _ = Dr(), x = {}, U = typeof Uint8Array > "u" || !n ? e : n(Uint8Array), F = {
789
895
  __proto__: null,
790
896
  "%AggregateError%": typeof AggregateError > "u" ? e : AggregateError,
791
897
  "%Array%": Array,
792
898
  "%ArrayBuffer%": typeof ArrayBuffer > "u" ? e : ArrayBuffer,
793
- "%ArrayIteratorPrototype%": M && h ? h([][Symbol.iterator]()) : e,
899
+ "%ArrayIteratorPrototype%": b && n ? n([][Symbol.iterator]()) : e,
794
900
  "%AsyncFromSyncIteratorPrototype%": e,
795
- "%AsyncFunction%": S,
796
- "%AsyncGenerator%": S,
797
- "%AsyncGeneratorFunction%": S,
798
- "%AsyncIteratorPrototype%": S,
901
+ "%AsyncFunction%": x,
902
+ "%AsyncGenerator%": x,
903
+ "%AsyncGeneratorFunction%": x,
904
+ "%AsyncIteratorPrototype%": x,
799
905
  "%Atomics%": typeof Atomics > "u" ? e : Atomics,
800
906
  "%BigInt%": typeof BigInt > "u" ? e : BigInt,
801
907
  "%BigInt64Array%": typeof BigInt64Array > "u" ? e : BigInt64Array,
@@ -807,7 +913,7 @@ function Tr() {
807
913
  "%decodeURIComponent%": decodeURIComponent,
808
914
  "%encodeURI%": encodeURI,
809
915
  "%encodeURIComponent%": encodeURIComponent,
810
- "%Error%": f,
916
+ "%Error%": u,
811
917
  "%eval%": eval,
812
918
  // eslint-disable-line no-eval
813
919
  "%EvalError%": l,
@@ -815,38 +921,38 @@ function Tr() {
815
921
  "%Float32Array%": typeof Float32Array > "u" ? e : Float32Array,
816
922
  "%Float64Array%": typeof Float64Array > "u" ? e : Float64Array,
817
923
  "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? e : FinalizationRegistry,
818
- "%Function%": Function,
819
- "%GeneratorFunction%": S,
924
+ "%Function%": o,
925
+ "%GeneratorFunction%": x,
820
926
  "%Int8Array%": typeof Int8Array > "u" ? e : Int8Array,
821
927
  "%Int16Array%": typeof Int16Array > "u" ? e : Int16Array,
822
928
  "%Int32Array%": typeof Int32Array > "u" ? e : Int32Array,
823
929
  "%isFinite%": isFinite,
824
930
  "%isNaN%": isNaN,
825
- "%IteratorPrototype%": M && h ? h(h([][Symbol.iterator]())) : e,
931
+ "%IteratorPrototype%": b && n ? n(n([][Symbol.iterator]())) : e,
826
932
  "%JSON%": typeof JSON == "object" ? JSON : e,
827
933
  "%Map%": typeof Map > "u" ? e : Map,
828
- "%MapIteratorPrototype%": typeof Map > "u" || !M || !h ? e : h((/* @__PURE__ */ new Map())[Symbol.iterator]()),
934
+ "%MapIteratorPrototype%": typeof Map > "u" || !b || !n ? e : n((/* @__PURE__ */ new Map())[Symbol.iterator]()),
829
935
  "%Math%": Math,
830
936
  "%Number%": Number,
831
- "%Object%": a,
832
- "%Object.getOwnPropertyDescriptor%": i,
937
+ "%Object%": i,
938
+ "%Object.getOwnPropertyDescriptor%": h,
833
939
  "%parseFloat%": parseFloat,
834
940
  "%parseInt%": parseInt,
835
941
  "%Promise%": typeof Promise > "u" ? e : Promise,
836
942
  "%Proxy%": typeof Proxy > "u" ? e : Proxy,
837
943
  "%RangeError%": g,
838
- "%ReferenceError%": b,
944
+ "%ReferenceError%": w,
839
945
  "%Reflect%": typeof Reflect > "u" ? e : Reflect,
840
946
  "%RegExp%": RegExp,
841
947
  "%Set%": typeof Set > "u" ? e : Set,
842
- "%SetIteratorPrototype%": typeof Set > "u" || !M || !h ? e : h((/* @__PURE__ */ new Set())[Symbol.iterator]()),
948
+ "%SetIteratorPrototype%": typeof Set > "u" || !b || !n ? e : n((/* @__PURE__ */ new Set())[Symbol.iterator]()),
843
949
  "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? e : SharedArrayBuffer,
844
950
  "%String%": String,
845
- "%StringIteratorPrototype%": M && h ? h(""[Symbol.iterator]()) : e,
846
- "%Symbol%": M ? Symbol : e,
847
- "%SyntaxError%": P,
848
- "%ThrowTypeError%": E,
849
- "%TypedArray%": _,
951
+ "%StringIteratorPrototype%": b && n ? n(""[Symbol.iterator]()) : e,
952
+ "%Symbol%": b ? Symbol : e,
953
+ "%SyntaxError%": R,
954
+ "%ThrowTypeError%": P,
955
+ "%TypedArray%": U,
850
956
  "%TypeError%": v,
851
957
  "%Uint8Array%": typeof Uint8Array > "u" ? e : Uint8Array,
852
958
  "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? e : Uint8ClampedArray,
@@ -856,43 +962,43 @@ function Tr() {
856
962
  "%WeakMap%": typeof WeakMap > "u" ? e : WeakMap,
857
963
  "%WeakRef%": typeof WeakRef > "u" ? e : WeakRef,
858
964
  "%WeakSet%": typeof WeakSet > "u" ? e : WeakSet,
859
- "%Function.prototype.call%": p,
860
- "%Function.prototype.apply%": c,
861
- "%Object.defineProperty%": I,
862
- "%Object.getPrototypeOf%": R,
863
- "%Math.abs%": y,
965
+ "%Function.prototype.call%": _,
966
+ "%Function.prototype.apply%": E,
967
+ "%Object.defineProperty%": S,
968
+ "%Object.getPrototypeOf%": c,
969
+ "%Math.abs%": p,
864
970
  "%Math.floor%": m,
865
- "%Math.max%": d,
866
- "%Math.min%": F,
971
+ "%Math.max%": y,
972
+ "%Math.min%": M,
867
973
  "%Math.pow%": A,
868
- "%Math.round%": n,
869
- "%Math.sign%": u,
870
- "%Reflect.getPrototypeOf%": o
974
+ "%Math.round%": a,
975
+ "%Math.sign%": f,
976
+ "%Reflect.getPrototypeOf%": d
871
977
  };
872
- if (h)
978
+ if (n)
873
979
  try {
874
980
  null.error;
875
- } catch (Q) {
876
- var B = h(h(Q));
877
- x["%Error.prototype%"] = B;
981
+ } catch (j) {
982
+ var W = n(n(j));
983
+ F["%Error.prototype%"] = W;
878
984
  }
879
- var N = Ln(), k = /* @__PURE__ */ Bn(), D = Un(), K = function Q(T) {
880
- var G;
881
- if (T === "%AsyncFunction%")
882
- G = N() || void 0;
883
- else if (T === "%GeneratorFunction%")
884
- G = k() || void 0;
885
- else if (T === "%AsyncGeneratorFunction%")
886
- G = D() || void 0;
887
- else if (T === "%AsyncGenerator%") {
888
- var z = Q("%AsyncGeneratorFunction%");
889
- z && (G = z.prototype);
890
- } else if (T === "%AsyncIteratorPrototype%") {
891
- var H = Q("%AsyncGenerator%");
892
- H && h && (G = h(H.prototype));
985
+ var $ = function j(C) {
986
+ var k;
987
+ if (C === "%AsyncFunction%")
988
+ k = I("async function () {}");
989
+ else if (C === "%GeneratorFunction%")
990
+ k = I("function* () {}");
991
+ else if (C === "%AsyncGeneratorFunction%")
992
+ k = I("async function* () {}");
993
+ else if (C === "%AsyncGenerator%") {
994
+ var L = j("%AsyncGeneratorFunction%");
995
+ L && (k = L.prototype);
996
+ } else if (C === "%AsyncIteratorPrototype%") {
997
+ var H = j("%AsyncGenerator%");
998
+ H && n && (k = n(H.prototype));
893
999
  }
894
- return x[T] = G, G;
895
- }, s = {
1000
+ return F[C] = k, k;
1001
+ }, G = {
896
1002
  __proto__: null,
897
1003
  "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
898
1004
  "%ArrayPrototype%": ["Array", "prototype"],
@@ -945,376 +1051,376 @@ function Tr() {
945
1051
  "%URIErrorPrototype%": ["URIError", "prototype"],
946
1052
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
947
1053
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
948
- }, $ = Fe(), j = /* @__PURE__ */ zn(), X = $.call(p, Array.prototype.concat), ce = $.call(c, Array.prototype.splice), ve = $.call(p, String.prototype.replace), ee = $.call(p, String.prototype.slice), ne = $.call(p, RegExp.prototype.exec), Z = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, ae = /\\(\\)?/g, ie = function(T) {
949
- var G = ee(T, 0, 1), z = ee(T, -1);
950
- if (G === "%" && z !== "%")
951
- throw new P("invalid intrinsic syntax, expected closing `%`");
952
- if (z === "%" && G !== "%")
953
- throw new P("invalid intrinsic syntax, expected opening `%`");
1054
+ }, s = xe(), T = /* @__PURE__ */ Tn(), K = s.call(_, Array.prototype.concat), X = s.call(E, Array.prototype.splice), ie = s.call(_, String.prototype.replace), oe = s.call(_, String.prototype.slice), le = s.call(_, RegExp.prototype.exec), ae = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, Z = /\\(\\)?/g, fe = function(C) {
1055
+ var k = oe(C, 0, 1), L = oe(C, -1);
1056
+ if (k === "%" && L !== "%")
1057
+ throw new R("invalid intrinsic syntax, expected closing `%`");
1058
+ if (L === "%" && k !== "%")
1059
+ throw new R("invalid intrinsic syntax, expected opening `%`");
954
1060
  var H = [];
955
- return ve(T, Z, function(V, le, W, J) {
956
- H[H.length] = W ? ve(J, ae, "$1") : le || V;
1061
+ return ie(C, ae, function(Q, ee, V, J) {
1062
+ H[H.length] = V ? ie(J, Z, "$1") : ee || Q;
957
1063
  }), H;
958
- }, oe = function(T, G) {
959
- var z = T, H;
960
- if (j(s, z) && (H = s[z], z = "%" + H[0] + "%"), j(x, z)) {
961
- var V = x[z];
962
- if (V === S && (V = K(z)), typeof V > "u" && !G)
963
- throw new v("intrinsic " + T + " exists, but is not available. Please file an issue!");
1064
+ }, ue = function(C, k) {
1065
+ var L = C, H;
1066
+ if (T(G, L) && (H = G[L], L = "%" + H[0] + "%"), T(F, L)) {
1067
+ var Q = F[L];
1068
+ if (Q === x && (Q = $(L)), typeof Q > "u" && !k)
1069
+ throw new v("intrinsic " + C + " exists, but is not available. Please file an issue!");
964
1070
  return {
965
1071
  alias: H,
966
- name: z,
967
- value: V
1072
+ name: L,
1073
+ value: Q
968
1074
  };
969
1075
  }
970
- throw new P("intrinsic " + T + " does not exist!");
1076
+ throw new R("intrinsic " + C + " does not exist!");
971
1077
  };
972
- return Ar = function(T, G) {
973
- if (typeof T != "string" || T.length === 0)
1078
+ return Sr = function(C, k) {
1079
+ if (typeof C != "string" || C.length === 0)
974
1080
  throw new v("intrinsic name must be a non-empty string");
975
- if (arguments.length > 1 && typeof G != "boolean")
1081
+ if (arguments.length > 1 && typeof k != "boolean")
976
1082
  throw new v('"allowMissing" argument must be a boolean');
977
- if (ne(/^%?[^%]*%?$/, T) === null)
978
- throw new P("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
979
- var z = ie(T), H = z.length > 0 ? z[0] : "", V = oe("%" + H + "%", G), le = V.name, W = V.value, J = !1, Ee = V.alias;
980
- Ee && (H = Ee[0], ce(z, X([0, 1], Ee)));
981
- for (var se = 1, pe = !0; se < z.length; se += 1) {
982
- var re = z[se], he = ee(re, 0, 1), me = ee(re, -1);
1083
+ if (le(/^%?[^%]*%?$/, C) === null)
1084
+ throw new R("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
1085
+ var L = fe(C), H = L.length > 0 ? L[0] : "", Q = ue("%" + H + "%", k), ee = Q.name, V = Q.value, J = !1, re = Q.alias;
1086
+ re && (H = re[0], X(L, K([0, 1], re)));
1087
+ for (var ve = 1, ce = !0; ve < L.length; ve += 1) {
1088
+ var te = L[ve], he = oe(te, 0, 1), me = oe(te, -1);
983
1089
  if ((he === '"' || he === "'" || he === "`" || me === '"' || me === "'" || me === "`") && he !== me)
984
- throw new P("property names with quotes must have matching quotes");
985
- if ((re === "constructor" || !pe) && (J = !0), H += "." + re, le = "%" + H + "%", j(x, le))
986
- W = x[le];
987
- else if (W != null) {
988
- if (!(re in W)) {
989
- if (!G)
990
- throw new v("base intrinsic for " + T + " exists, but the property is not available.");
1090
+ throw new R("property names with quotes must have matching quotes");
1091
+ if ((te === "constructor" || !ce) && (J = !0), H += "." + te, ee = "%" + H + "%", T(F, ee))
1092
+ V = F[ee];
1093
+ else if (V != null) {
1094
+ if (!(te in V)) {
1095
+ if (!k)
1096
+ throw new v("base intrinsic for " + C + " exists, but the property is not available.");
991
1097
  return;
992
1098
  }
993
- if (i && se + 1 >= z.length) {
994
- var ge = i(W, re);
995
- pe = !!ge, pe && "get" in ge && !("originalValue" in ge.get) ? W = ge.get : W = W[re];
1099
+ if (h && ve + 1 >= L.length) {
1100
+ var ge = h(V, te);
1101
+ ce = !!ge, ce && "get" in ge && !("originalValue" in ge.get) ? V = ge.get : V = V[te];
996
1102
  } else
997
- pe = j(W, re), W = W[re];
998
- pe && !J && (x[le] = W);
1103
+ ce = T(V, te), V = V[te];
1104
+ ce && !J && (F[ee] = V);
999
1105
  }
1000
1106
  }
1001
- return W;
1002
- }, Ar;
1107
+ return V;
1108
+ }, Sr;
1003
1109
  }
1004
- var Rr, Nt;
1005
- function Xt() {
1006
- if (Nt) return Rr;
1007
- Nt = 1;
1008
- var e = /* @__PURE__ */ Tr(), a = Yt(), f = a([e("%String.prototype.indexOf%")]);
1009
- return Rr = function(g, b) {
1010
- var P = (
1110
+ var br, qt;
1111
+ function jt() {
1112
+ if (qt) return br;
1113
+ qt = 1;
1114
+ var e = /* @__PURE__ */ Cr(), i = Ht(), u = i([e("%String.prototype.indexOf%")]);
1115
+ return br = function(g, w) {
1116
+ var R = (
1011
1117
  /** @type {(this: unknown, ...args: unknown[]) => unknown} */
1012
- e(g, !!b)
1118
+ e(g, !!w)
1013
1119
  );
1014
- return typeof P == "function" && f(g, ".prototype.") > -1 ? a(
1120
+ return typeof R == "function" && u(g, ".prototype.") > -1 ? i(
1015
1121
  /** @type {const} */
1016
- [P]
1017
- ) : P;
1018
- }, Rr;
1122
+ [R]
1123
+ ) : R;
1124
+ }, br;
1019
1125
  }
1020
- var Pr, Tt;
1021
- function Zt() {
1022
- if (Tt) return Pr;
1023
- Tt = 1;
1024
- var e = /* @__PURE__ */ Tr(), a = /* @__PURE__ */ Xt(), f = /* @__PURE__ */ xe(), l = /* @__PURE__ */ be(), g = e("%Map%", !0), b = a("Map.prototype.get", !0), P = a("Map.prototype.set", !0), v = a("Map.prototype.has", !0), O = a("Map.prototype.delete", !0), y = a("Map.prototype.size", !0);
1025
- return Pr = !!g && /** @type {Exclude<import('.'), false>} */
1126
+ var Er, Mt;
1127
+ function Kt() {
1128
+ if (Mt) return Er;
1129
+ Mt = 1;
1130
+ var e = /* @__PURE__ */ Cr(), i = /* @__PURE__ */ jt(), u = /* @__PURE__ */ _e(), l = /* @__PURE__ */ be(), g = e("%Map%", !0), w = i("Map.prototype.get", !0), R = i("Map.prototype.set", !0), v = i("Map.prototype.has", !0), O = i("Map.prototype.delete", !0), p = i("Map.prototype.size", !0);
1131
+ return Er = !!g && /** @type {Exclude<import('.'), false>} */
1026
1132
  function() {
1027
- var d, F = {
1133
+ var y, M = {
1028
1134
  assert: function(A) {
1029
- if (!F.has(A))
1030
- throw new l("Side channel does not contain " + f(A));
1135
+ if (!M.has(A))
1136
+ throw new l("Side channel does not contain " + u(A));
1031
1137
  },
1032
1138
  delete: function(A) {
1033
- if (d) {
1034
- var n = O(d, A);
1035
- return y(d) === 0 && (d = void 0), n;
1139
+ if (y) {
1140
+ var a = O(y, A);
1141
+ return p(y) === 0 && (y = void 0), a;
1036
1142
  }
1037
1143
  return !1;
1038
1144
  },
1039
1145
  get: function(A) {
1040
- if (d)
1041
- return b(d, A);
1146
+ if (y)
1147
+ return w(y, A);
1042
1148
  },
1043
1149
  has: function(A) {
1044
- return d ? v(d, A) : !1;
1150
+ return y ? v(y, A) : !1;
1045
1151
  },
1046
- set: function(A, n) {
1047
- d || (d = new g()), P(d, A, n);
1152
+ set: function(A, a) {
1153
+ y || (y = new g()), R(y, A, a);
1048
1154
  }
1049
1155
  };
1050
- return F;
1051
- }, Pr;
1156
+ return M;
1157
+ }, Er;
1052
1158
  }
1053
- var Ir, Lt;
1054
- function Wn() {
1055
- if (Lt) return Ir;
1056
- Lt = 1;
1057
- var e = /* @__PURE__ */ Tr(), a = /* @__PURE__ */ Xt(), f = /* @__PURE__ */ xe(), l = Zt(), g = /* @__PURE__ */ be(), b = e("%WeakMap%", !0), P = a("WeakMap.prototype.get", !0), v = a("WeakMap.prototype.set", !0), O = a("WeakMap.prototype.has", !0), y = a("WeakMap.prototype.delete", !0);
1058
- return Ir = b ? (
1159
+ var Or, Ft;
1160
+ function Ln() {
1161
+ if (Ft) return Or;
1162
+ Ft = 1;
1163
+ var e = /* @__PURE__ */ Cr(), i = /* @__PURE__ */ jt(), u = /* @__PURE__ */ _e(), l = Kt(), g = /* @__PURE__ */ be(), w = e("%WeakMap%", !0), R = i("WeakMap.prototype.get", !0), v = i("WeakMap.prototype.set", !0), O = i("WeakMap.prototype.has", !0), p = i("WeakMap.prototype.delete", !0);
1164
+ return Or = w ? (
1059
1165
  /** @type {Exclude<import('.'), false>} */
1060
1166
  function() {
1061
- var d, F, A = {
1062
- assert: function(n) {
1063
- if (!A.has(n))
1064
- throw new g("Side channel does not contain " + f(n));
1167
+ var y, M, A = {
1168
+ assert: function(a) {
1169
+ if (!A.has(a))
1170
+ throw new g("Side channel does not contain " + u(a));
1065
1171
  },
1066
- delete: function(n) {
1067
- if (b && n && (typeof n == "object" || typeof n == "function")) {
1068
- if (d)
1069
- return y(d, n);
1070
- } else if (l && F)
1071
- return F.delete(n);
1172
+ delete: function(a) {
1173
+ if (w && a && (typeof a == "object" || typeof a == "function")) {
1174
+ if (y)
1175
+ return p(y, a);
1176
+ } else if (l && M)
1177
+ return M.delete(a);
1072
1178
  return !1;
1073
1179
  },
1074
- get: function(n) {
1075
- return b && n && (typeof n == "object" || typeof n == "function") && d ? P(d, n) : F && F.get(n);
1180
+ get: function(a) {
1181
+ return w && a && (typeof a == "object" || typeof a == "function") && y ? R(y, a) : M && M.get(a);
1076
1182
  },
1077
- has: function(n) {
1078
- return b && n && (typeof n == "object" || typeof n == "function") && d ? O(d, n) : !!F && F.has(n);
1183
+ has: function(a) {
1184
+ return w && a && (typeof a == "object" || typeof a == "function") && y ? O(y, a) : !!M && M.has(a);
1079
1185
  },
1080
- set: function(n, u) {
1081
- b && n && (typeof n == "object" || typeof n == "function") ? (d || (d = new b()), v(d, n, u)) : l && (F || (F = l()), F.set(n, u));
1186
+ set: function(a, f) {
1187
+ w && a && (typeof a == "object" || typeof a == "function") ? (y || (y = new w()), v(y, a, f)) : l && (M || (M = l()), M.set(a, f));
1082
1188
  }
1083
1189
  };
1084
1190
  return A;
1085
1191
  }
1086
- ) : l, Ir;
1192
+ ) : l, Or;
1087
1193
  }
1088
- var _r, Bt;
1089
- function en() {
1090
- if (Bt) return _r;
1091
- Bt = 1;
1092
- var e = /* @__PURE__ */ be(), a = /* @__PURE__ */ xe(), f = dn(), l = Zt(), g = Wn(), b = g || l || f;
1093
- return _r = function() {
1194
+ var Ar, Dt;
1195
+ function Qt() {
1196
+ if (Dt) return Ar;
1197
+ Dt = 1;
1198
+ var e = /* @__PURE__ */ be(), i = /* @__PURE__ */ _e(), u = yn(), l = Kt(), g = Ln(), w = g || l || u;
1199
+ return Ar = function() {
1094
1200
  var v, O = {
1095
- assert: function(y) {
1096
- if (!O.has(y))
1097
- throw new e("Side channel does not contain " + a(y));
1201
+ assert: function(p) {
1202
+ if (!O.has(p))
1203
+ throw new e("Side channel does not contain " + i(p));
1098
1204
  },
1099
- delete: function(y) {
1100
- return !!v && v.delete(y);
1205
+ delete: function(p) {
1206
+ return !!v && v.delete(p);
1101
1207
  },
1102
- get: function(y) {
1103
- return v && v.get(y);
1208
+ get: function(p) {
1209
+ return v && v.get(p);
1104
1210
  },
1105
- has: function(y) {
1106
- return !!v && v.has(y);
1211
+ has: function(p) {
1212
+ return !!v && v.has(p);
1107
1213
  },
1108
- set: function(y, m) {
1109
- v || (v = b()), v.set(y, m);
1214
+ set: function(p, m) {
1215
+ v || (v = w()), v.set(p, m);
1110
1216
  }
1111
1217
  };
1112
1218
  return O;
1113
- }, _r;
1219
+ }, Ar;
1114
1220
  }
1115
- var xr, Ut;
1116
- function Lr() {
1117
- if (Ut) return xr;
1118
- Ut = 1;
1119
- var e = String.prototype.replace, a = /%20/g, f = {
1221
+ var Rr, Ct;
1222
+ function $r() {
1223
+ if (Ct) return Rr;
1224
+ Ct = 1;
1225
+ var e = String.prototype.replace, i = /%20/g, u = {
1120
1226
  RFC1738: "RFC1738",
1121
1227
  RFC3986: "RFC3986"
1122
1228
  };
1123
- return xr = {
1124
- default: f.RFC3986,
1229
+ return Rr = {
1230
+ default: u.RFC3986,
1125
1231
  formatters: {
1126
1232
  RFC1738: function(l) {
1127
- return e.call(l, a, "+");
1233
+ return e.call(l, i, "+");
1128
1234
  },
1129
1235
  RFC3986: function(l) {
1130
1236
  return String(l);
1131
1237
  }
1132
1238
  },
1133
- RFC1738: f.RFC1738,
1134
- RFC3986: f.RFC3986
1135
- }, xr;
1239
+ RFC1738: u.RFC1738,
1240
+ RFC3986: u.RFC3986
1241
+ }, Rr;
1136
1242
  }
1137
- var Fr, zt;
1138
- function rn() {
1139
- if (zt) return Fr;
1140
- zt = 1;
1141
- var e = /* @__PURE__ */ Lr(), a = en(), f = Object.prototype.hasOwnProperty, l = Array.isArray, g = a(), b = function(o, c) {
1142
- return g.set(o, c), o;
1143
- }, P = function(o) {
1144
- return g.has(o);
1145
- }, v = function(o) {
1146
- return g.get(o);
1147
- }, O = function(o, c) {
1148
- g.set(o, c);
1149
- }, y = (function() {
1150
- for (var R = [], o = 0; o < 256; ++o)
1151
- R[R.length] = "%" + ((o < 16 ? "0" : "") + o.toString(16)).toUpperCase();
1152
- return R;
1153
- })(), m = function(o) {
1154
- for (; o.length > 1; ) {
1155
- var c = o.pop(), p = c.obj[c.prop];
1156
- if (l(p)) {
1157
- for (var S = [], _ = 0; _ < p.length; ++_)
1158
- typeof p[_] < "u" && (S[S.length] = p[_]);
1159
- c.obj[c.prop] = S;
1243
+ var Pr, $t;
1244
+ function Vt() {
1245
+ if ($t) return Pr;
1246
+ $t = 1;
1247
+ var e = /* @__PURE__ */ $r(), i = Qt(), u = Object.prototype.hasOwnProperty, l = Array.isArray, g = i(), w = function(n, c) {
1248
+ return g.set(n, c), n;
1249
+ }, R = function(n) {
1250
+ return g.has(n);
1251
+ }, v = function(n) {
1252
+ return g.get(n);
1253
+ }, O = function(n, c) {
1254
+ g.set(n, c);
1255
+ }, p = (function() {
1256
+ for (var b = [], n = 0; n < 256; ++n)
1257
+ b[b.length] = "%" + ((n < 16 ? "0" : "") + n.toString(16)).toUpperCase();
1258
+ return b;
1259
+ })(), m = function(n) {
1260
+ for (; n.length > 1; ) {
1261
+ var c = n.pop(), d = c.obj[c.prop];
1262
+ if (l(d)) {
1263
+ for (var E = [], _ = 0; _ < d.length; ++_)
1264
+ typeof d[_] < "u" && (E[E.length] = d[_]);
1265
+ c.obj[c.prop] = E;
1160
1266
  }
1161
1267
  }
1162
- }, d = function(o, c) {
1163
- for (var p = c && c.plainObjects ? { __proto__: null } : {}, S = 0; S < o.length; ++S)
1164
- typeof o[S] < "u" && (p[S] = o[S]);
1165
- return p;
1166
- }, F = function R(o, c, p) {
1268
+ }, y = function(n, c) {
1269
+ for (var d = c && c.plainObjects ? { __proto__: null } : {}, E = 0; E < n.length; ++E)
1270
+ typeof n[E] < "u" && (d[E] = n[E]);
1271
+ return d;
1272
+ }, M = function b(n, c, d) {
1167
1273
  if (!c)
1168
- return o;
1274
+ return n;
1169
1275
  if (typeof c != "object" && typeof c != "function") {
1170
- if (l(o)) {
1171
- var S = o.length;
1172
- if (p && typeof p.arrayLimit == "number" && S > p.arrayLimit)
1173
- return b(d(o.concat(c), p), S);
1174
- o[S] = c;
1175
- } else if (o && typeof o == "object")
1176
- if (P(o)) {
1177
- var _ = v(o) + 1;
1178
- o[_] = c, O(o, _);
1276
+ if (l(n)) {
1277
+ var E = n.length;
1278
+ if (d && typeof d.arrayLimit == "number" && E > d.arrayLimit)
1279
+ return w(y(n.concat(c), d), E);
1280
+ n[E] = c;
1281
+ } else if (n && typeof n == "object")
1282
+ if (R(n)) {
1283
+ var _ = v(n) + 1;
1284
+ n[_] = c, O(n, _);
1179
1285
  } else {
1180
- if (p && p.strictMerge)
1181
- return [o, c];
1182
- (p && (p.plainObjects || p.allowPrototypes) || !f.call(Object.prototype, c)) && (o[c] = !0);
1286
+ if (d && d.strictMerge)
1287
+ return [n, c];
1288
+ (d && (d.plainObjects || d.allowPrototypes) || !u.call(Object.prototype, c)) && (n[c] = !0);
1183
1289
  }
1184
1290
  else
1185
- return [o, c];
1186
- return o;
1291
+ return [n, c];
1292
+ return n;
1187
1293
  }
1188
- if (!o || typeof o != "object") {
1189
- if (P(c)) {
1190
- for (var x = Object.keys(c), B = p && p.plainObjects ? { __proto__: null, 0: o } : { 0: o }, N = 0; N < x.length; N++) {
1191
- var k = parseInt(x[N], 10);
1192
- B[k + 1] = c[x[N]];
1294
+ if (!n || typeof n != "object") {
1295
+ if (R(c)) {
1296
+ for (var x = Object.keys(c), U = d && d.plainObjects ? { __proto__: null, 0: n } : { 0: n }, F = 0; F < x.length; F++) {
1297
+ var W = parseInt(x[F], 10);
1298
+ U[W + 1] = c[x[F]];
1193
1299
  }
1194
- return b(B, v(c) + 1);
1300
+ return w(U, v(c) + 1);
1195
1301
  }
1196
- var D = [o].concat(c);
1197
- return p && typeof p.arrayLimit == "number" && D.length > p.arrayLimit ? b(d(D, p), D.length - 1) : D;
1302
+ var $ = [n].concat(c);
1303
+ return d && typeof d.arrayLimit == "number" && $.length > d.arrayLimit ? w(y($, d), $.length - 1) : $;
1198
1304
  }
1199
- var K = o;
1200
- return l(o) && !l(c) && (K = d(o, p)), l(o) && l(c) ? (c.forEach(function(s, $) {
1201
- if (f.call(o, $)) {
1202
- var j = o[$];
1203
- j && typeof j == "object" && s && typeof s == "object" ? o[$] = R(j, s, p) : o[o.length] = s;
1305
+ var G = n;
1306
+ return l(n) && !l(c) && (G = y(n, d)), l(n) && l(c) ? (c.forEach(function(s, T) {
1307
+ if (u.call(n, T)) {
1308
+ var K = n[T];
1309
+ K && typeof K == "object" && s && typeof s == "object" ? n[T] = b(K, s, d) : n[n.length] = s;
1204
1310
  } else
1205
- o[$] = s;
1206
- }), o) : Object.keys(c).reduce(function(s, $) {
1207
- var j = c[$];
1208
- if (f.call(s, $) ? s[$] = R(s[$], j, p) : s[$] = j, P(c) && !P(s) && b(s, v(c)), P(s)) {
1209
- var X = parseInt($, 10);
1210
- String(X) === $ && X >= 0 && X > v(s) && O(s, X);
1311
+ n[T] = s;
1312
+ }), n) : Object.keys(c).reduce(function(s, T) {
1313
+ var K = c[T];
1314
+ if (u.call(s, T) ? s[T] = b(s[T], K, d) : s[T] = K, R(c) && !R(s) && w(s, v(c)), R(s)) {
1315
+ var X = parseInt(T, 10);
1316
+ String(X) === T && X >= 0 && X > v(s) && O(s, X);
1211
1317
  }
1212
1318
  return s;
1213
- }, K);
1214
- }, A = function(o, c) {
1215
- return Object.keys(c).reduce(function(p, S) {
1216
- return p[S] = c[S], p;
1217
- }, o);
1218
- }, n = function(R, o, c) {
1219
- var p = R.replace(/\+/g, " ");
1319
+ }, G);
1320
+ }, A = function(n, c) {
1321
+ return Object.keys(c).reduce(function(d, E) {
1322
+ return d[E] = c[E], d;
1323
+ }, n);
1324
+ }, a = function(b, n, c) {
1325
+ var d = b.replace(/\+/g, " ");
1220
1326
  if (c === "iso-8859-1")
1221
- return p.replace(/%[0-9a-f]{2}/gi, unescape);
1327
+ return d.replace(/%[0-9a-f]{2}/gi, unescape);
1222
1328
  try {
1223
- return decodeURIComponent(p);
1329
+ return decodeURIComponent(d);
1224
1330
  } catch {
1225
- return p;
1331
+ return d;
1226
1332
  }
1227
- }, u = 1024, i = function(o, c, p, S, _) {
1228
- if (o.length === 0)
1229
- return o;
1230
- var x = o;
1231
- if (typeof o == "symbol" ? x = Symbol.prototype.toString.call(o) : typeof o != "string" && (x = String(o)), p === "iso-8859-1")
1232
- return escape(x).replace(/%u[0-9a-f]{4}/gi, function($) {
1233
- return "%26%23" + parseInt($.slice(2), 16) + "%3B";
1333
+ }, f = 1024, o = function(n, c, d, E, _) {
1334
+ if (n.length === 0)
1335
+ return n;
1336
+ var x = n;
1337
+ if (typeof n == "symbol" ? x = Symbol.prototype.toString.call(n) : typeof n != "string" && (x = String(n)), d === "iso-8859-1")
1338
+ return escape(x).replace(/%u[0-9a-f]{4}/gi, function(T) {
1339
+ return "%26%23" + parseInt(T.slice(2), 16) + "%3B";
1234
1340
  });
1235
- for (var B = "", N = 0; N < x.length; N += u) {
1236
- for (var k = x.length >= u ? x.slice(N, N + u) : x, D = [], K = 0; K < k.length; ++K) {
1237
- var s = k.charCodeAt(K);
1341
+ for (var U = "", F = 0; F < x.length; F += f) {
1342
+ for (var W = x.length >= f ? x.slice(F, F + f) : x, $ = [], G = 0; G < W.length; ++G) {
1343
+ var s = W.charCodeAt(G);
1238
1344
  if (s === 45 || s === 46 || s === 95 || s === 126 || s >= 48 && s <= 57 || s >= 65 && s <= 90 || s >= 97 && s <= 122 || _ === e.RFC1738 && (s === 40 || s === 41)) {
1239
- D[D.length] = k.charAt(K);
1345
+ $[$.length] = W.charAt(G);
1240
1346
  continue;
1241
1347
  }
1242
1348
  if (s < 128) {
1243
- D[D.length] = y[s];
1349
+ $[$.length] = p[s];
1244
1350
  continue;
1245
1351
  }
1246
1352
  if (s < 2048) {
1247
- D[D.length] = y[192 | s >> 6] + y[128 | s & 63];
1353
+ $[$.length] = p[192 | s >> 6] + p[128 | s & 63];
1248
1354
  continue;
1249
1355
  }
1250
1356
  if (s < 55296 || s >= 57344) {
1251
- D[D.length] = y[224 | s >> 12] + y[128 | s >> 6 & 63] + y[128 | s & 63];
1357
+ $[$.length] = p[224 | s >> 12] + p[128 | s >> 6 & 63] + p[128 | s & 63];
1252
1358
  continue;
1253
1359
  }
1254
- K += 1, s = 65536 + ((s & 1023) << 10 | k.charCodeAt(K) & 1023), D[D.length] = y[240 | s >> 18] + y[128 | s >> 12 & 63] + y[128 | s >> 6 & 63] + y[128 | s & 63];
1360
+ G += 1, s = 65536 + ((s & 1023) << 10 | W.charCodeAt(G) & 1023), $[$.length] = p[240 | s >> 18] + p[128 | s >> 12 & 63] + p[128 | s >> 6 & 63] + p[128 | s & 63];
1255
1361
  }
1256
- B += D.join("");
1362
+ U += $.join("");
1257
1363
  }
1258
- return B;
1259
- }, I = function(o) {
1260
- for (var c = [{ obj: { o }, prop: "o" }], p = [], S = 0; S < c.length; ++S)
1261
- for (var _ = c[S], x = _.obj[_.prop], B = Object.keys(x), N = 0; N < B.length; ++N) {
1262
- var k = B[N], D = x[k];
1263
- typeof D == "object" && D !== null && p.indexOf(D) === -1 && (c[c.length] = { obj: x, prop: k }, p[p.length] = D);
1364
+ return U;
1365
+ }, I = function(n) {
1366
+ for (var c = [{ obj: { o: n }, prop: "o" }], d = [], E = 0; E < c.length; ++E)
1367
+ for (var _ = c[E], x = _.obj[_.prop], U = Object.keys(x), F = 0; F < U.length; ++F) {
1368
+ var W = U[F], $ = x[W];
1369
+ typeof $ == "object" && $ !== null && d.indexOf($) === -1 && (c[c.length] = { obj: x, prop: W }, d[d.length] = $);
1264
1370
  }
1265
- return m(c), o;
1266
- }, w = function(o) {
1267
- return Object.prototype.toString.call(o) === "[object RegExp]";
1268
- }, E = function(o) {
1269
- return !o || typeof o != "object" ? !1 : !!(o.constructor && o.constructor.isBuffer && o.constructor.isBuffer(o));
1270
- }, M = function(o, c, p, S) {
1271
- if (P(o)) {
1272
- var _ = v(o) + 1;
1273
- return o[_] = c, O(o, _), o;
1371
+ return m(c), n;
1372
+ }, h = function(n) {
1373
+ return Object.prototype.toString.call(n) === "[object RegExp]";
1374
+ }, S = function(n) {
1375
+ return !n || typeof n != "object" ? !1 : !!(n.constructor && n.constructor.isBuffer && n.constructor.isBuffer(n));
1376
+ }, D = function(n, c, d, E) {
1377
+ if (R(n)) {
1378
+ var _ = v(n) + 1;
1379
+ return n[_] = c, O(n, _), n;
1274
1380
  }
1275
- var x = [].concat(o, c);
1276
- return x.length > p ? b(d(x, { plainObjects: S }), x.length - 1) : x;
1277
- }, h = function(o, c) {
1278
- if (l(o)) {
1279
- for (var p = [], S = 0; S < o.length; S += 1)
1280
- p[p.length] = c(o[S]);
1281
- return p;
1381
+ var x = [].concat(n, c);
1382
+ return x.length > d ? w(y(x, { plainObjects: E }), x.length - 1) : x;
1383
+ }, P = function(n, c) {
1384
+ if (l(n)) {
1385
+ for (var d = [], E = 0; E < n.length; E += 1)
1386
+ d[d.length] = c(n[E]);
1387
+ return d;
1282
1388
  }
1283
- return c(o);
1389
+ return c(n);
1284
1390
  };
1285
- return Fr = {
1286
- arrayToObject: d,
1391
+ return Pr = {
1392
+ arrayToObject: y,
1287
1393
  assign: A,
1288
- combine: M,
1394
+ combine: D,
1289
1395
  compact: I,
1290
- decode: n,
1291
- encode: i,
1292
- isBuffer: E,
1293
- isOverflow: P,
1294
- isRegExp: w,
1295
- markOverflow: b,
1296
- maybeMap: h,
1297
- merge: F
1298
- }, Fr;
1396
+ decode: a,
1397
+ encode: o,
1398
+ isBuffer: S,
1399
+ isOverflow: R,
1400
+ isRegExp: h,
1401
+ markOverflow: w,
1402
+ maybeMap: P,
1403
+ merge: M
1404
+ }, Pr;
1299
1405
  }
1300
- var qr, Wt;
1301
- function kn() {
1302
- if (Wt) return qr;
1303
- Wt = 1;
1304
- var e = en(), a = /* @__PURE__ */ rn(), f = /* @__PURE__ */ Lr(), l = Object.prototype.hasOwnProperty, g = {
1305
- brackets: function(i) {
1306
- return i + "[]";
1406
+ var Ir, Nt;
1407
+ function Bn() {
1408
+ if (Nt) return Ir;
1409
+ Nt = 1;
1410
+ var e = Qt(), i = /* @__PURE__ */ Vt(), u = /* @__PURE__ */ $r(), l = Object.prototype.hasOwnProperty, g = {
1411
+ brackets: function(o) {
1412
+ return o + "[]";
1307
1413
  },
1308
1414
  comma: "comma",
1309
- indices: function(i, I) {
1310
- return i + "[" + I + "]";
1415
+ indices: function(o, I) {
1416
+ return o + "[" + I + "]";
1311
1417
  },
1312
- repeat: function(i) {
1313
- return i;
1418
+ repeat: function(o) {
1419
+ return o;
1314
1420
  }
1315
- }, b = Array.isArray, P = Array.prototype.push, v = function(u, i) {
1316
- P.apply(u, b(i) ? i : [i]);
1317
- }, O = Date.prototype.toISOString, y = f.default, m = {
1421
+ }, w = Array.isArray, R = Array.prototype.push, v = function(f, o) {
1422
+ R.apply(f, w(o) ? o : [o]);
1423
+ }, O = Date.prototype.toISOString, p = u.default, m = {
1318
1424
  addQueryPrefix: !1,
1319
1425
  allowDots: !1,
1320
1426
  allowEmptyArrays: !1,
@@ -1325,174 +1431,174 @@ function kn() {
1325
1431
  delimiter: "&",
1326
1432
  encode: !0,
1327
1433
  encodeDotInKeys: !1,
1328
- encoder: a.encode,
1434
+ encoder: i.encode,
1329
1435
  encodeValuesOnly: !1,
1330
1436
  filter: void 0,
1331
- format: y,
1332
- formatter: f.formatters[y],
1437
+ format: p,
1438
+ formatter: u.formatters[p],
1333
1439
  // deprecated
1334
1440
  indices: !1,
1335
- serializeDate: function(i) {
1336
- return O.call(i);
1441
+ serializeDate: function(o) {
1442
+ return O.call(o);
1337
1443
  },
1338
1444
  skipNulls: !1,
1339
1445
  strictNullHandling: !1
1340
- }, d = function(i) {
1341
- return typeof i == "string" || typeof i == "number" || typeof i == "boolean" || typeof i == "symbol" || typeof i == "bigint";
1342
- }, F = {}, A = function u(i, I, w, E, M, h, R, o, c, p, S, _, x, B, N, k, D, K) {
1343
- for (var s = i, $ = K, j = 0, X = !1; ($ = $.get(F)) !== void 0 && !X; ) {
1344
- var ce = $.get(i);
1345
- if (j += 1, typeof ce < "u") {
1346
- if (ce === j)
1446
+ }, y = function(o) {
1447
+ return typeof o == "string" || typeof o == "number" || typeof o == "boolean" || typeof o == "symbol" || typeof o == "bigint";
1448
+ }, M = {}, A = function f(o, I, h, S, D, P, b, n, c, d, E, _, x, U, F, W, $, G) {
1449
+ for (var s = o, T = G, K = 0, X = !1; (T = T.get(M)) !== void 0 && !X; ) {
1450
+ var ie = T.get(o);
1451
+ if (K += 1, typeof ie < "u") {
1452
+ if (ie === K)
1347
1453
  throw new RangeError("Cyclic object value");
1348
1454
  X = !0;
1349
1455
  }
1350
- typeof $.get(F) > "u" && (j = 0);
1456
+ typeof T.get(M) > "u" && (K = 0);
1351
1457
  }
1352
- if (typeof p == "function" ? s = p(I, s) : s instanceof Date ? s = x(s) : w === "comma" && b(s) && (s = a.maybeMap(s, function(V) {
1353
- return V instanceof Date ? x(V) : V;
1458
+ if (typeof d == "function" ? s = d(I, s) : s instanceof Date ? s = x(s) : h === "comma" && w(s) && (s = i.maybeMap(s, function(ee) {
1459
+ return ee instanceof Date ? x(ee) : ee;
1354
1460
  })), s === null) {
1355
- if (h)
1356
- return c && !k ? c(I, m.encoder, D, "key", B) : I;
1461
+ if (P)
1462
+ return c && !W ? c(I, m.encoder, $, "key", U) : I;
1357
1463
  s = "";
1358
1464
  }
1359
- if (d(s) || a.isBuffer(s)) {
1465
+ if (y(s) || i.isBuffer(s)) {
1360
1466
  if (c) {
1361
- var ve = k ? I : c(I, m.encoder, D, "key", B);
1362
- return [N(ve) + "=" + N(c(s, m.encoder, D, "value", B))];
1467
+ var oe = W ? I : c(I, m.encoder, $, "key", U);
1468
+ return [F(oe) + "=" + F(c(s, m.encoder, $, "value", U))];
1363
1469
  }
1364
- return [N(I) + "=" + N(String(s))];
1470
+ return [F(I) + "=" + F(String(s))];
1365
1471
  }
1366
- var ee = [];
1472
+ var le = [];
1367
1473
  if (typeof s > "u")
1368
- return ee;
1369
- var ne;
1370
- if (w === "comma" && b(s))
1371
- k && c && (s = a.maybeMap(s, c)), ne = [{ value: s.length > 0 ? s.join(",") || null : void 0 }];
1372
- else if (b(p))
1373
- ne = p;
1474
+ return le;
1475
+ var ae;
1476
+ if (h === "comma" && w(s))
1477
+ W && c && (s = i.maybeMap(s, c)), ae = [{ value: s.length > 0 ? s.join(",") || null : void 0 }];
1478
+ else if (w(d))
1479
+ ae = d;
1374
1480
  else {
1375
1481
  var Z = Object.keys(s);
1376
- ne = S ? Z.sort(S) : Z;
1482
+ ae = E ? Z.sort(E) : Z;
1377
1483
  }
1378
- var ae = o ? String(I).replace(/\./g, "%2E") : String(I), ie = E && b(s) && s.length === 1 ? ae + "[]" : ae;
1379
- if (M && b(s) && s.length === 0)
1380
- return ie + "[]";
1381
- for (var oe = 0; oe < ne.length; ++oe) {
1382
- var Q = ne[oe], T = typeof Q == "object" && Q && typeof Q.value < "u" ? Q.value : s[Q];
1383
- if (!(R && T === null)) {
1384
- var G = _ && o ? String(Q).replace(/\./g, "%2E") : String(Q), z = b(s) ? typeof w == "function" ? w(ie, G) : ie : ie + (_ ? "." + G : "[" + G + "]");
1385
- K.set(i, j);
1386
- var H = e();
1387
- H.set(F, K), v(ee, u(
1388
- T,
1389
- z,
1390
- w,
1391
- E,
1392
- M,
1484
+ var fe = n ? String(I).replace(/\./g, "%2E") : String(I), ue = S && w(s) && s.length === 1 ? fe + "[]" : fe;
1485
+ if (D && w(s) && s.length === 0)
1486
+ return ue + "[]";
1487
+ for (var j = 0; j < ae.length; ++j) {
1488
+ var C = ae[j], k = typeof C == "object" && C && typeof C.value < "u" ? C.value : s[C];
1489
+ if (!(b && k === null)) {
1490
+ var L = _ && n ? String(C).replace(/\./g, "%2E") : String(C), H = w(s) ? typeof h == "function" ? h(ue, L) : ue : ue + (_ ? "." + L : "[" + L + "]");
1491
+ G.set(o, K);
1492
+ var Q = e();
1493
+ Q.set(M, G), v(le, f(
1494
+ k,
1495
+ H,
1393
1496
  h,
1394
- R,
1395
- o,
1396
- w === "comma" && k && b(s) ? null : c,
1397
- p,
1398
1497
  S,
1498
+ D,
1499
+ P,
1500
+ b,
1501
+ n,
1502
+ h === "comma" && W && w(s) ? null : c,
1503
+ d,
1504
+ E,
1399
1505
  _,
1400
1506
  x,
1401
- B,
1402
- N,
1403
- k,
1404
- D,
1405
- H
1507
+ U,
1508
+ F,
1509
+ W,
1510
+ $,
1511
+ Q
1406
1512
  ));
1407
1513
  }
1408
1514
  }
1409
- return ee;
1410
- }, n = function(i) {
1411
- if (!i)
1515
+ return le;
1516
+ }, a = function(o) {
1517
+ if (!o)
1412
1518
  return m;
1413
- if (typeof i.allowEmptyArrays < "u" && typeof i.allowEmptyArrays != "boolean")
1519
+ if (typeof o.allowEmptyArrays < "u" && typeof o.allowEmptyArrays != "boolean")
1414
1520
  throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
1415
- if (typeof i.encodeDotInKeys < "u" && typeof i.encodeDotInKeys != "boolean")
1521
+ if (typeof o.encodeDotInKeys < "u" && typeof o.encodeDotInKeys != "boolean")
1416
1522
  throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
1417
- if (i.encoder !== null && typeof i.encoder < "u" && typeof i.encoder != "function")
1523
+ if (o.encoder !== null && typeof o.encoder < "u" && typeof o.encoder != "function")
1418
1524
  throw new TypeError("Encoder has to be a function.");
1419
- var I = i.charset || m.charset;
1420
- if (typeof i.charset < "u" && i.charset !== "utf-8" && i.charset !== "iso-8859-1")
1525
+ var I = o.charset || m.charset;
1526
+ if (typeof o.charset < "u" && o.charset !== "utf-8" && o.charset !== "iso-8859-1")
1421
1527
  throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
1422
- var w = f.default;
1423
- if (typeof i.format < "u") {
1424
- if (!l.call(f.formatters, i.format))
1528
+ var h = u.default;
1529
+ if (typeof o.format < "u") {
1530
+ if (!l.call(u.formatters, o.format))
1425
1531
  throw new TypeError("Unknown format option provided.");
1426
- w = i.format;
1532
+ h = o.format;
1427
1533
  }
1428
- var E = f.formatters[w], M = m.filter;
1429
- (typeof i.filter == "function" || b(i.filter)) && (M = i.filter);
1430
- var h;
1431
- if (i.arrayFormat in g ? h = i.arrayFormat : "indices" in i ? h = i.indices ? "indices" : "repeat" : h = m.arrayFormat, "commaRoundTrip" in i && typeof i.commaRoundTrip != "boolean")
1534
+ var S = u.formatters[h], D = m.filter;
1535
+ (typeof o.filter == "function" || w(o.filter)) && (D = o.filter);
1536
+ var P;
1537
+ if (o.arrayFormat in g ? P = o.arrayFormat : "indices" in o ? P = o.indices ? "indices" : "repeat" : P = m.arrayFormat, "commaRoundTrip" in o && typeof o.commaRoundTrip != "boolean")
1432
1538
  throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
1433
- var R = typeof i.allowDots > "u" ? i.encodeDotInKeys === !0 ? !0 : m.allowDots : !!i.allowDots;
1539
+ var b = typeof o.allowDots > "u" ? o.encodeDotInKeys === !0 ? !0 : m.allowDots : !!o.allowDots;
1434
1540
  return {
1435
- addQueryPrefix: typeof i.addQueryPrefix == "boolean" ? i.addQueryPrefix : m.addQueryPrefix,
1436
- allowDots: R,
1437
- allowEmptyArrays: typeof i.allowEmptyArrays == "boolean" ? !!i.allowEmptyArrays : m.allowEmptyArrays,
1438
- arrayFormat: h,
1541
+ addQueryPrefix: typeof o.addQueryPrefix == "boolean" ? o.addQueryPrefix : m.addQueryPrefix,
1542
+ allowDots: b,
1543
+ allowEmptyArrays: typeof o.allowEmptyArrays == "boolean" ? !!o.allowEmptyArrays : m.allowEmptyArrays,
1544
+ arrayFormat: P,
1439
1545
  charset: I,
1440
- charsetSentinel: typeof i.charsetSentinel == "boolean" ? i.charsetSentinel : m.charsetSentinel,
1441
- commaRoundTrip: !!i.commaRoundTrip,
1442
- delimiter: typeof i.delimiter > "u" ? m.delimiter : i.delimiter,
1443
- encode: typeof i.encode == "boolean" ? i.encode : m.encode,
1444
- encodeDotInKeys: typeof i.encodeDotInKeys == "boolean" ? i.encodeDotInKeys : m.encodeDotInKeys,
1445
- encoder: typeof i.encoder == "function" ? i.encoder : m.encoder,
1446
- encodeValuesOnly: typeof i.encodeValuesOnly == "boolean" ? i.encodeValuesOnly : m.encodeValuesOnly,
1447
- filter: M,
1448
- format: w,
1449
- formatter: E,
1450
- serializeDate: typeof i.serializeDate == "function" ? i.serializeDate : m.serializeDate,
1451
- skipNulls: typeof i.skipNulls == "boolean" ? i.skipNulls : m.skipNulls,
1452
- sort: typeof i.sort == "function" ? i.sort : null,
1453
- strictNullHandling: typeof i.strictNullHandling == "boolean" ? i.strictNullHandling : m.strictNullHandling
1546
+ charsetSentinel: typeof o.charsetSentinel == "boolean" ? o.charsetSentinel : m.charsetSentinel,
1547
+ commaRoundTrip: !!o.commaRoundTrip,
1548
+ delimiter: typeof o.delimiter > "u" ? m.delimiter : o.delimiter,
1549
+ encode: typeof o.encode == "boolean" ? o.encode : m.encode,
1550
+ encodeDotInKeys: typeof o.encodeDotInKeys == "boolean" ? o.encodeDotInKeys : m.encodeDotInKeys,
1551
+ encoder: typeof o.encoder == "function" ? o.encoder : m.encoder,
1552
+ encodeValuesOnly: typeof o.encodeValuesOnly == "boolean" ? o.encodeValuesOnly : m.encodeValuesOnly,
1553
+ filter: D,
1554
+ format: h,
1555
+ formatter: S,
1556
+ serializeDate: typeof o.serializeDate == "function" ? o.serializeDate : m.serializeDate,
1557
+ skipNulls: typeof o.skipNulls == "boolean" ? o.skipNulls : m.skipNulls,
1558
+ sort: typeof o.sort == "function" ? o.sort : null,
1559
+ strictNullHandling: typeof o.strictNullHandling == "boolean" ? o.strictNullHandling : m.strictNullHandling
1454
1560
  };
1455
1561
  };
1456
- return qr = function(u, i) {
1457
- var I = u, w = n(i), E, M;
1458
- typeof w.filter == "function" ? (M = w.filter, I = M("", I)) : b(w.filter) && (M = w.filter, E = M);
1459
- var h = [];
1562
+ return Ir = function(f, o) {
1563
+ var I = f, h = a(o), S, D;
1564
+ typeof h.filter == "function" ? (D = h.filter, I = D("", I)) : w(h.filter) && (D = h.filter, S = D);
1565
+ var P = [];
1460
1566
  if (typeof I != "object" || I === null)
1461
1567
  return "";
1462
- var R = g[w.arrayFormat], o = R === "comma" && w.commaRoundTrip;
1463
- E || (E = Object.keys(I)), w.sort && E.sort(w.sort);
1464
- for (var c = e(), p = 0; p < E.length; ++p) {
1465
- var S = E[p], _ = I[S];
1466
- w.skipNulls && _ === null || v(h, A(
1568
+ var b = g[h.arrayFormat], n = b === "comma" && h.commaRoundTrip;
1569
+ S || (S = Object.keys(I)), h.sort && S.sort(h.sort);
1570
+ for (var c = e(), d = 0; d < S.length; ++d) {
1571
+ var E = S[d], _ = I[E];
1572
+ h.skipNulls && _ === null || v(P, A(
1467
1573
  _,
1468
- S,
1469
- R,
1470
- o,
1471
- w.allowEmptyArrays,
1472
- w.strictNullHandling,
1473
- w.skipNulls,
1474
- w.encodeDotInKeys,
1475
- w.encode ? w.encoder : null,
1476
- w.filter,
1477
- w.sort,
1478
- w.allowDots,
1479
- w.serializeDate,
1480
- w.format,
1481
- w.formatter,
1482
- w.encodeValuesOnly,
1483
- w.charset,
1574
+ E,
1575
+ b,
1576
+ n,
1577
+ h.allowEmptyArrays,
1578
+ h.strictNullHandling,
1579
+ h.skipNulls,
1580
+ h.encodeDotInKeys,
1581
+ h.encode ? h.encoder : null,
1582
+ h.filter,
1583
+ h.sort,
1584
+ h.allowDots,
1585
+ h.serializeDate,
1586
+ h.format,
1587
+ h.formatter,
1588
+ h.encodeValuesOnly,
1589
+ h.charset,
1484
1590
  c
1485
1591
  ));
1486
1592
  }
1487
- var x = h.join(w.delimiter), B = w.addQueryPrefix === !0 ? "?" : "";
1488
- return w.charsetSentinel && (w.charset === "iso-8859-1" ? B += "utf8=%26%2310003%3B&" : B += "utf8=%E2%9C%93&"), x.length > 0 ? B + x : "";
1489
- }, qr;
1593
+ var x = P.join(h.delimiter), U = h.addQueryPrefix === !0 ? "?" : "";
1594
+ return h.charsetSentinel && (h.charset === "iso-8859-1" ? U += "utf8=%26%2310003%3B&" : U += "utf8=%E2%9C%93&"), x.length > 0 ? U + x : "";
1595
+ }, Ir;
1490
1596
  }
1491
- var Mr, kt;
1492
- function Gn() {
1493
- if (kt) return Mr;
1494
- kt = 1;
1495
- var e = /* @__PURE__ */ rn(), a = Object.prototype.hasOwnProperty, f = Array.isArray, l = {
1597
+ var _r, Tt;
1598
+ function Un() {
1599
+ if (Tt) return _r;
1600
+ Tt = 1;
1601
+ var e = /* @__PURE__ */ Vt(), i = Object.prototype.hasOwnProperty, u = Array.isArray, l = {
1496
1602
  allowDots: !1,
1497
1603
  allowEmptyArrays: !1,
1498
1604
  allowPrototypes: !1,
@@ -1516,231 +1622,202 @@ function Gn() {
1516
1622
  strictNullHandling: !1,
1517
1623
  throwOnLimitExceeded: !1
1518
1624
  }, g = function(A) {
1519
- return A.replace(/&#(\d+);/g, function(n, u) {
1520
- return String.fromCharCode(parseInt(u, 10));
1625
+ return A.replace(/&#(\d+);/g, function(a, f) {
1626
+ return String.fromCharCode(parseInt(f, 10));
1521
1627
  });
1522
- }, b = function(A, n, u) {
1523
- if (A && typeof A == "string" && n.comma && A.indexOf(",") > -1)
1628
+ }, w = function(A, a, f) {
1629
+ if (A && typeof A == "string" && a.comma && A.indexOf(",") > -1)
1524
1630
  return A.split(",");
1525
- if (n.throwOnLimitExceeded && u >= n.arrayLimit)
1526
- throw new RangeError("Array limit exceeded. Only " + n.arrayLimit + " element" + (n.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
1631
+ if (a.throwOnLimitExceeded && f >= a.arrayLimit)
1632
+ throw new RangeError("Array limit exceeded. Only " + a.arrayLimit + " element" + (a.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
1527
1633
  return A;
1528
- }, P = "utf8=%26%2310003%3B", v = "utf8=%E2%9C%93", O = function(n, u) {
1529
- var i = { __proto__: null }, I = u.ignoreQueryPrefix ? n.replace(/^\?/, "") : n;
1634
+ }, R = "utf8=%26%2310003%3B", v = "utf8=%E2%9C%93", O = function(a, f) {
1635
+ var o = { __proto__: null }, I = f.ignoreQueryPrefix ? a.replace(/^\?/, "") : a;
1530
1636
  I = I.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
1531
- var w = u.parameterLimit === 1 / 0 ? void 0 : u.parameterLimit, E = I.split(
1532
- u.delimiter,
1533
- u.throwOnLimitExceeded ? w + 1 : w
1637
+ var h = f.parameterLimit === 1 / 0 ? void 0 : f.parameterLimit, S = I.split(
1638
+ f.delimiter,
1639
+ f.throwOnLimitExceeded && typeof h < "u" ? h + 1 : h
1534
1640
  );
1535
- if (u.throwOnLimitExceeded && E.length > w)
1536
- throw new RangeError("Parameter limit exceeded. Only " + w + " parameter" + (w === 1 ? "" : "s") + " allowed.");
1537
- var M = -1, h, R = u.charset;
1538
- if (u.charsetSentinel)
1539
- for (h = 0; h < E.length; ++h)
1540
- E[h].indexOf("utf8=") === 0 && (E[h] === v ? R = "utf-8" : E[h] === P && (R = "iso-8859-1"), M = h, h = E.length);
1541
- for (h = 0; h < E.length; ++h)
1542
- if (h !== M) {
1543
- var o = E[h], c = o.indexOf("]="), p = c === -1 ? o.indexOf("=") : c + 1, S, _;
1544
- if (p === -1 ? (S = u.decoder(o, l.decoder, R, "key"), _ = u.strictNullHandling ? null : "") : (S = u.decoder(o.slice(0, p), l.decoder, R, "key"), S !== null && (_ = e.maybeMap(
1545
- b(
1546
- o.slice(p + 1),
1547
- u,
1548
- f(i[S]) ? i[S].length : 0
1641
+ if (f.throwOnLimitExceeded && typeof h < "u" && S.length > h)
1642
+ throw new RangeError("Parameter limit exceeded. Only " + h + " parameter" + (h === 1 ? "" : "s") + " allowed.");
1643
+ var D = -1, P, b = f.charset;
1644
+ if (f.charsetSentinel)
1645
+ for (P = 0; P < S.length; ++P)
1646
+ S[P].indexOf("utf8=") === 0 && (S[P] === v ? b = "utf-8" : S[P] === R && (b = "iso-8859-1"), D = P, P = S.length);
1647
+ for (P = 0; P < S.length; ++P)
1648
+ if (P !== D) {
1649
+ var n = S[P], c = n.indexOf("]="), d = c === -1 ? n.indexOf("=") : c + 1, E, _;
1650
+ if (d === -1 ? (E = f.decoder(n, l.decoder, b, "key"), _ = f.strictNullHandling ? null : "") : (E = f.decoder(n.slice(0, d), l.decoder, b, "key"), E !== null && (_ = e.maybeMap(
1651
+ w(
1652
+ n.slice(d + 1),
1653
+ f,
1654
+ u(o[E]) ? o[E].length : 0
1549
1655
  ),
1550
- function(B) {
1551
- return u.decoder(B, l.decoder, R, "value");
1656
+ function(U) {
1657
+ return f.decoder(U, l.decoder, b, "value");
1552
1658
  }
1553
- ))), _ && u.interpretNumericEntities && R === "iso-8859-1" && (_ = g(String(_))), o.indexOf("[]=") > -1 && (_ = f(_) ? [_] : _), u.comma && f(_) && _.length > u.arrayLimit) {
1554
- if (u.throwOnLimitExceeded)
1555
- throw new RangeError("Array limit exceeded. Only " + u.arrayLimit + " element" + (u.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
1556
- _ = e.combine([], _, u.arrayLimit, u.plainObjects);
1659
+ ))), _ && f.interpretNumericEntities && b === "iso-8859-1" && (_ = g(String(_))), n.indexOf("[]=") > -1 && (_ = u(_) ? [_] : _), f.comma && u(_) && _.length > f.arrayLimit) {
1660
+ if (f.throwOnLimitExceeded)
1661
+ throw new RangeError("Array limit exceeded. Only " + f.arrayLimit + " element" + (f.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
1662
+ _ = e.combine([], _, f.arrayLimit, f.plainObjects);
1557
1663
  }
1558
- if (S !== null) {
1559
- var x = a.call(i, S);
1560
- x && (u.duplicates === "combine" || o.indexOf("[]=") > -1) ? i[S] = e.combine(
1561
- i[S],
1664
+ if (E !== null) {
1665
+ var x = i.call(o, E);
1666
+ x && (f.duplicates === "combine" || n.indexOf("[]=") > -1) ? o[E] = e.combine(
1667
+ o[E],
1562
1668
  _,
1563
- u.arrayLimit,
1564
- u.plainObjects
1565
- ) : (!x || u.duplicates === "last") && (i[S] = _);
1669
+ f.arrayLimit,
1670
+ f.plainObjects
1671
+ ) : (!x || f.duplicates === "last") && (o[E] = _);
1566
1672
  }
1567
1673
  }
1568
- return i;
1569
- }, y = function(A, n, u, i) {
1674
+ return o;
1675
+ }, p = function(A, a, f, o) {
1570
1676
  var I = 0;
1571
1677
  if (A.length > 0 && A[A.length - 1] === "[]") {
1572
- var w = A.slice(0, -1).join("");
1573
- I = Array.isArray(n) && n[w] ? n[w].length : 0;
1678
+ var h = A.slice(0, -1).join("");
1679
+ I = Array.isArray(a) && a[h] ? a[h].length : 0;
1574
1680
  }
1575
- for (var E = i ? n : b(n, u, I), M = A.length - 1; M >= 0; --M) {
1576
- var h, R = A[M];
1577
- if (R === "[]" && u.parseArrays)
1578
- e.isOverflow(E) ? h = E : h = u.allowEmptyArrays && (E === "" || u.strictNullHandling && E === null) ? [] : e.combine(
1681
+ for (var S = o ? a : w(a, f, I), D = A.length - 1; D >= 0; --D) {
1682
+ var P, b = A[D];
1683
+ if (b === "[]" && f.parseArrays)
1684
+ e.isOverflow(S) ? P = S : P = f.allowEmptyArrays && (S === "" || f.strictNullHandling && S === null) ? [] : e.combine(
1579
1685
  [],
1580
- E,
1581
- u.arrayLimit,
1582
- u.plainObjects
1686
+ S,
1687
+ f.arrayLimit,
1688
+ f.plainObjects
1583
1689
  );
1584
1690
  else {
1585
- h = u.plainObjects ? { __proto__: null } : {};
1586
- var o = R.charAt(0) === "[" && R.charAt(R.length - 1) === "]" ? R.slice(1, -1) : R, c = u.decodeDotInKeys ? o.replace(/%2E/g, ".") : o, p = parseInt(c, 10), S = !isNaN(p) && R !== c && String(p) === c && p >= 0 && u.parseArrays;
1587
- if (!u.parseArrays && c === "")
1588
- h = { 0: E };
1589
- else if (S && p < u.arrayLimit)
1590
- h = [], h[p] = E;
1691
+ P = f.plainObjects ? { __proto__: null } : {};
1692
+ var n = b.charAt(0) === "[" && b.charAt(b.length - 1) === "]" ? b.slice(1, -1) : b, c = f.decodeDotInKeys ? n.replace(/%2E/g, ".") : n, d = parseInt(c, 10), E = !isNaN(d) && b !== c && String(d) === c && d >= 0 && f.parseArrays;
1693
+ if (!f.parseArrays && c === "")
1694
+ P = { 0: S };
1695
+ else if (E && d < f.arrayLimit)
1696
+ P = [], P[d] = S;
1591
1697
  else {
1592
- if (S && u.throwOnLimitExceeded)
1593
- throw new RangeError("Array limit exceeded. Only " + u.arrayLimit + " element" + (u.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
1594
- S ? (h[p] = E, e.markOverflow(h, p)) : c !== "__proto__" && (h[c] = E);
1698
+ if (E && f.throwOnLimitExceeded)
1699
+ throw new RangeError("Array limit exceeded. Only " + f.arrayLimit + " element" + (f.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
1700
+ E ? (P[d] = S, e.markOverflow(P, d)) : c !== "__proto__" && (P[c] = S);
1595
1701
  }
1596
1702
  }
1597
- E = h;
1703
+ S = P;
1598
1704
  }
1599
- return E;
1600
- }, m = function(n, u) {
1601
- var i = u.allowDots ? n.replace(/\.([^.[]+)/g, "[$1]") : n;
1602
- if (u.depth <= 0)
1603
- return !u.plainObjects && a.call(Object.prototype, i) && !u.allowPrototypes ? void 0 : [i];
1604
- var I = /(\[[^[\]]*])/, w = /(\[[^[\]]*])/g, E = I.exec(i), M = E ? i.slice(0, E.index) : i, h = [];
1605
- if (M) {
1606
- if (!u.plainObjects && a.call(Object.prototype, M) && !u.allowPrototypes)
1705
+ return S;
1706
+ }, m = function(a, f) {
1707
+ var o = f.allowDots ? a.replace(/\.([^.[]+)/g, "[$1]") : a;
1708
+ if (f.depth <= 0)
1709
+ return !f.plainObjects && i.call(Object.prototype, o) && !f.allowPrototypes ? void 0 : [o];
1710
+ var I = /(\[[^[\]]*])/, h = /(\[[^[\]]*])/g, S = I.exec(o), D = S ? o.slice(0, S.index) : o, P = [];
1711
+ if (D) {
1712
+ if (!f.plainObjects && i.call(Object.prototype, D) && !f.allowPrototypes)
1607
1713
  return;
1608
- h[h.length] = M;
1714
+ P[P.length] = D;
1609
1715
  }
1610
- for (var R = 0; (E = w.exec(i)) !== null && R < u.depth; ) {
1611
- R += 1;
1612
- var o = E[1].slice(1, -1);
1613
- if (!u.plainObjects && a.call(Object.prototype, o) && !u.allowPrototypes)
1716
+ for (var b = 0; (S = h.exec(o)) !== null && b < f.depth; ) {
1717
+ b += 1;
1718
+ var n = S[1].slice(1, -1);
1719
+ if (!f.plainObjects && i.call(Object.prototype, n) && !f.allowPrototypes)
1614
1720
  return;
1615
- h[h.length] = E[1];
1721
+ P[P.length] = S[1];
1616
1722
  }
1617
- if (E) {
1618
- if (u.strictDepth === !0)
1619
- throw new RangeError("Input depth exceeded depth option of " + u.depth + " and strictDepth is true");
1620
- h[h.length] = "[" + i.slice(E.index) + "]";
1723
+ if (S) {
1724
+ if (f.strictDepth === !0)
1725
+ throw new RangeError("Input depth exceeded depth option of " + f.depth + " and strictDepth is true");
1726
+ P[P.length] = "[" + o.slice(S.index) + "]";
1621
1727
  }
1622
- return h;
1623
- }, d = function(n, u, i, I) {
1624
- if (n) {
1625
- var w = m(n, i);
1626
- if (w)
1627
- return y(w, u, i, I);
1728
+ return P;
1729
+ }, y = function(a, f, o, I) {
1730
+ if (a) {
1731
+ var h = m(a, o);
1732
+ if (h)
1733
+ return p(h, f, o, I);
1628
1734
  }
1629
- }, F = function(n) {
1630
- if (!n)
1735
+ }, M = function(a) {
1736
+ if (!a)
1631
1737
  return l;
1632
- if (typeof n.allowEmptyArrays < "u" && typeof n.allowEmptyArrays != "boolean")
1738
+ if (typeof a.allowEmptyArrays < "u" && typeof a.allowEmptyArrays != "boolean")
1633
1739
  throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
1634
- if (typeof n.decodeDotInKeys < "u" && typeof n.decodeDotInKeys != "boolean")
1740
+ if (typeof a.decodeDotInKeys < "u" && typeof a.decodeDotInKeys != "boolean")
1635
1741
  throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
1636
- if (n.decoder !== null && typeof n.decoder < "u" && typeof n.decoder != "function")
1742
+ if (a.decoder !== null && typeof a.decoder < "u" && typeof a.decoder != "function")
1637
1743
  throw new TypeError("Decoder has to be a function.");
1638
- if (typeof n.charset < "u" && n.charset !== "utf-8" && n.charset !== "iso-8859-1")
1744
+ if (typeof a.charset < "u" && a.charset !== "utf-8" && a.charset !== "iso-8859-1")
1639
1745
  throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
1640
- if (typeof n.throwOnLimitExceeded < "u" && typeof n.throwOnLimitExceeded != "boolean")
1746
+ if (typeof a.throwOnLimitExceeded < "u" && typeof a.throwOnLimitExceeded != "boolean")
1641
1747
  throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
1642
- var u = typeof n.charset > "u" ? l.charset : n.charset, i = typeof n.duplicates > "u" ? l.duplicates : n.duplicates;
1643
- if (i !== "combine" && i !== "first" && i !== "last")
1748
+ var f = typeof a.charset > "u" ? l.charset : a.charset, o = typeof a.duplicates > "u" ? l.duplicates : a.duplicates;
1749
+ if (o !== "combine" && o !== "first" && o !== "last")
1644
1750
  throw new TypeError("The duplicates option must be either combine, first, or last");
1645
- var I = typeof n.allowDots > "u" ? n.decodeDotInKeys === !0 ? !0 : l.allowDots : !!n.allowDots;
1751
+ var I = typeof a.allowDots > "u" ? a.decodeDotInKeys === !0 ? !0 : l.allowDots : !!a.allowDots;
1646
1752
  return {
1647
1753
  allowDots: I,
1648
- allowEmptyArrays: typeof n.allowEmptyArrays == "boolean" ? !!n.allowEmptyArrays : l.allowEmptyArrays,
1649
- allowPrototypes: typeof n.allowPrototypes == "boolean" ? n.allowPrototypes : l.allowPrototypes,
1650
- allowSparse: typeof n.allowSparse == "boolean" ? n.allowSparse : l.allowSparse,
1651
- arrayLimit: typeof n.arrayLimit == "number" ? n.arrayLimit : l.arrayLimit,
1652
- charset: u,
1653
- charsetSentinel: typeof n.charsetSentinel == "boolean" ? n.charsetSentinel : l.charsetSentinel,
1654
- comma: typeof n.comma == "boolean" ? n.comma : l.comma,
1655
- decodeDotInKeys: typeof n.decodeDotInKeys == "boolean" ? n.decodeDotInKeys : l.decodeDotInKeys,
1656
- decoder: typeof n.decoder == "function" ? n.decoder : l.decoder,
1657
- delimiter: typeof n.delimiter == "string" || e.isRegExp(n.delimiter) ? n.delimiter : l.delimiter,
1754
+ allowEmptyArrays: typeof a.allowEmptyArrays == "boolean" ? !!a.allowEmptyArrays : l.allowEmptyArrays,
1755
+ allowPrototypes: typeof a.allowPrototypes == "boolean" ? a.allowPrototypes : l.allowPrototypes,
1756
+ allowSparse: typeof a.allowSparse == "boolean" ? a.allowSparse : l.allowSparse,
1757
+ arrayLimit: typeof a.arrayLimit == "number" ? a.arrayLimit : l.arrayLimit,
1758
+ charset: f,
1759
+ charsetSentinel: typeof a.charsetSentinel == "boolean" ? a.charsetSentinel : l.charsetSentinel,
1760
+ comma: typeof a.comma == "boolean" ? a.comma : l.comma,
1761
+ decodeDotInKeys: typeof a.decodeDotInKeys == "boolean" ? a.decodeDotInKeys : l.decodeDotInKeys,
1762
+ decoder: typeof a.decoder == "function" ? a.decoder : l.decoder,
1763
+ delimiter: typeof a.delimiter == "string" || e.isRegExp(a.delimiter) ? a.delimiter : l.delimiter,
1658
1764
  // eslint-disable-next-line no-implicit-coercion, no-extra-parens
1659
- depth: typeof n.depth == "number" || n.depth === !1 ? +n.depth : l.depth,
1660
- duplicates: i,
1661
- ignoreQueryPrefix: n.ignoreQueryPrefix === !0,
1662
- interpretNumericEntities: typeof n.interpretNumericEntities == "boolean" ? n.interpretNumericEntities : l.interpretNumericEntities,
1663
- parameterLimit: typeof n.parameterLimit == "number" ? n.parameterLimit : l.parameterLimit,
1664
- parseArrays: n.parseArrays !== !1,
1665
- plainObjects: typeof n.plainObjects == "boolean" ? n.plainObjects : l.plainObjects,
1666
- strictDepth: typeof n.strictDepth == "boolean" ? !!n.strictDepth : l.strictDepth,
1667
- strictMerge: typeof n.strictMerge == "boolean" ? !!n.strictMerge : l.strictMerge,
1668
- strictNullHandling: typeof n.strictNullHandling == "boolean" ? n.strictNullHandling : l.strictNullHandling,
1669
- throwOnLimitExceeded: typeof n.throwOnLimitExceeded == "boolean" ? n.throwOnLimitExceeded : !1
1765
+ depth: typeof a.depth == "number" || a.depth === !1 ? +a.depth : l.depth,
1766
+ duplicates: o,
1767
+ ignoreQueryPrefix: a.ignoreQueryPrefix === !0,
1768
+ interpretNumericEntities: typeof a.interpretNumericEntities == "boolean" ? a.interpretNumericEntities : l.interpretNumericEntities,
1769
+ parameterLimit: typeof a.parameterLimit == "number" ? a.parameterLimit : l.parameterLimit,
1770
+ parseArrays: a.parseArrays !== !1,
1771
+ plainObjects: typeof a.plainObjects == "boolean" ? a.plainObjects : l.plainObjects,
1772
+ strictDepth: typeof a.strictDepth == "boolean" ? !!a.strictDepth : l.strictDepth,
1773
+ strictMerge: typeof a.strictMerge == "boolean" ? !!a.strictMerge : l.strictMerge,
1774
+ strictNullHandling: typeof a.strictNullHandling == "boolean" ? a.strictNullHandling : l.strictNullHandling,
1775
+ throwOnLimitExceeded: typeof a.throwOnLimitExceeded == "boolean" ? a.throwOnLimitExceeded : !1
1670
1776
  };
1671
1777
  };
1672
- return Mr = function(A, n) {
1673
- var u = F(n);
1778
+ return _r = function(A, a) {
1779
+ var f = M(a);
1674
1780
  if (A === "" || A === null || typeof A > "u")
1675
- return u.plainObjects ? { __proto__: null } : {};
1676
- for (var i = typeof A == "string" ? O(A, u) : A, I = u.plainObjects ? { __proto__: null } : {}, w = Object.keys(i), E = 0; E < w.length; ++E) {
1677
- var M = w[E], h = d(M, i[M], u, typeof A == "string");
1678
- I = e.merge(I, h, u);
1781
+ return f.plainObjects ? { __proto__: null } : {};
1782
+ for (var o = typeof A == "string" ? O(A, f) : A, I = f.plainObjects ? { __proto__: null } : {}, h = Object.keys(o), S = 0; S < h.length; ++S) {
1783
+ var D = h[S], P = y(D, o[D], f, typeof A == "string");
1784
+ I = e.merge(I, P, f);
1679
1785
  }
1680
- return u.allowSparse === !0 ? I : e.compact(I);
1681
- }, Mr;
1786
+ return f.allowSparse === !0 ? I : e.compact(I);
1787
+ }, _r;
1682
1788
  }
1683
- var Dr, Gt;
1684
- function Hn() {
1685
- if (Gt) return Dr;
1686
- Gt = 1;
1687
- var e = /* @__PURE__ */ kn(), a = /* @__PURE__ */ Gn(), f = /* @__PURE__ */ Lr();
1688
- return Dr = {
1689
- formats: f,
1690
- parse: a,
1789
+ var xr, Lt;
1790
+ function zn() {
1791
+ if (Lt) return xr;
1792
+ Lt = 1;
1793
+ var e = /* @__PURE__ */ Bn(), i = /* @__PURE__ */ Un(), u = /* @__PURE__ */ $r();
1794
+ return xr = {
1795
+ formats: u,
1796
+ parse: i,
1691
1797
  stringify: e
1692
- }, Dr;
1693
- }
1694
- var jn = /* @__PURE__ */ Hn(), de = /* @__PURE__ */ ((e) => (e.Complete = "complete", e.Error = "error", e.WidgetResize = "widget-resize", e.PopoverResize = "popover-resize", e.FullscreenResize = "fullscreen-resize", e.Expire = "expire", e))(de || {}), $r = /* @__PURE__ */ ((e) => (e.Resize = "resize", e.Destroy = "destroy", e))($r || {}), Re = /* @__PURE__ */ ((e) => (e.Development = "http://localhost:3000", e.Staging = "https://relay.withpersona-staging.com", e.Production = "https://relay.withpersona.com", e))(Re || {});
1695
- function Kn(e) {
1696
- try {
1697
- const a = new URL(e);
1698
- return a.hostname === "localhost" ? !0 : !(a.protocol !== "https:" || !a.hostname || !a.hostname.includes("."));
1699
- } catch {
1700
- return !1;
1701
- }
1702
- }
1703
- function Br(e) {
1704
- switch (e) {
1705
- case "development":
1706
- return Re.Development;
1707
- case "staging":
1708
- return Re.Staging;
1709
- case "production":
1710
- case void 0:
1711
- case null:
1712
- return Re.Production;
1713
- default:
1714
- if (typeof e == "string") {
1715
- const a = e.startsWith("localhost") ? `http://${e}` : `https://${e}`;
1716
- if (Kn(a))
1717
- return a.replace(/\/$/, "");
1718
- }
1719
- return console.warn(
1720
- `[PersonaRelay] Invalid host: "${e}". Expected 'development', 'staging', 'production', or a valid hostname/URL. Falling back to 'production'.`
1721
- ), Re.Production;
1722
- }
1798
+ }, xr;
1723
1799
  }
1724
- const Qn = "0.1.2", Vn = [
1800
+ var Wn = /* @__PURE__ */ zn();
1801
+ const kn = "0.1.3", Gn = [
1725
1802
  "allow-scripts",
1726
1803
  // Run the widget app
1727
1804
  "allow-same-origin",
1728
1805
  // Cookies, localStorage
1729
1806
  "allow-popups"
1730
1807
  // External links
1731
- ], Jn = [
1808
+ ], Hn = [
1732
1809
  "allow-forms",
1733
1810
  "allow-modals",
1734
1811
  "allow-top-navigation-by-user-activation"
1735
1812
  ];
1736
- function Cr(e, a, { accessToken: f, host: l, theme: g }, b = "/relay-widget") {
1737
- if (!f)
1813
+ function qr(e, i, { accessToken: u, host: l, theme: g }, w = "/relay-widget") {
1814
+ if (!u)
1738
1815
  throw new Error("[PersonaRelay] accessToken is required to initialize the relay widget");
1739
- const P = Br(l), v = jn.stringify(
1816
+ const R = Fr(l), v = Wn.stringify(
1740
1817
  {
1741
- "client-version": Qn,
1742
- "container-id": a,
1743
- "relay-session-access-token": f,
1818
+ "client-version": kn,
1819
+ "container-id": i,
1820
+ "relay-session-access-token": u,
1744
1821
  theme: g
1745
1822
  },
1746
1823
  {
@@ -1748,125 +1825,23 @@ function Cr(e, a, { accessToken: f, host: l, theme: g }, b = "/relay-widget") {
1748
1825
  skipNulls: !0
1749
1826
  }
1750
1827
  );
1751
- return b === "/relay-popover" ? (e.title = "Relay popover", e.className = "relay-widget__popover-iframe", e.allow = "clipboard-write") : b === "/relay-fullscreen" ? (e.title = "Relay fullscreen", e.className = "relay-widget__fullscreen-iframe", e.allow = "camera;microphone;clipboard-write") : (e.title = "Verify via Relay", e.className = "relay-widget__iframe", e.allow = "clipboard-write"), e.setAttribute(
1828
+ return w === "/relay-popover" ? (e.title = "Relay popover", e.className = "relay-widget__popover-iframe", e.allow = "clipboard-write") : w === "/relay-fullscreen" ? (e.title = "Relay fullscreen", e.className = "relay-widget__fullscreen-iframe", e.allow = "camera;microphone;clipboard-write") : (e.title = "Verify via Relay", e.className = "relay-widget__iframe", e.allow = "clipboard-write"), e.setAttribute(
1752
1829
  "sandbox",
1753
- Vn.concat(Jn).join(" ")
1754
- ), e.referrerPolicy = "no-referrer", e.src = P + b + v, e;
1755
- }
1756
- function Ht(e) {
1757
- if (e === "localhost" || /^\d+\.\d+\.\d+\.\d+$/.test(e))
1758
- return e;
1759
- const a = e.split(".");
1760
- return a.length <= 1 ? e : a.slice(-2).join(".");
1761
- }
1762
- function Yn(e, {
1763
- onComplete: a,
1764
- onError: f,
1765
- onExpire: l,
1766
- onWidgetResize: g,
1767
- onPopoverResize: b,
1768
- onFullscreenResize: P,
1769
- host: v
1770
- }) {
1771
- const O = (y) => {
1772
- const m = Br(v ?? "production");
1773
- if (y.origin !== "")
1774
- try {
1775
- const F = Ht(new URL(y.origin).host), A = Ht(new URL(m).host);
1776
- if (F !== A)
1777
- return;
1778
- } catch {
1779
- return;
1780
- }
1781
- if (e !== y.data.containerId)
1782
- return;
1783
- const d = y.data;
1784
- switch (d.name) {
1785
- case de.Complete:
1786
- a?.();
1787
- break;
1788
- case de.Error:
1789
- f?.(d.error);
1790
- break;
1791
- case de.WidgetResize:
1792
- g?.(d.metadata);
1793
- break;
1794
- case de.PopoverResize:
1795
- b?.(d.metadata);
1796
- break;
1797
- case de.FullscreenResize:
1798
- P?.(d.metadata);
1799
- break;
1800
- case de.Expire:
1801
- l?.();
1802
- break;
1803
- }
1804
- };
1805
- return window.addEventListener("message", O), () => {
1806
- window.removeEventListener("message", O);
1807
- };
1808
- }
1809
- function Xn() {
1810
- return "relay-widget-" + crypto.randomUUID();
1830
+ Gn.concat(Hn).join(" ")
1831
+ ), e.referrerPolicy = "no-referrer", e.src = R + w + v, e;
1811
1832
  }
1812
- class Zn {
1813
- constructor(a) {
1814
- this.id = a;
1815
- }
1816
- /**
1817
- * Checks if the stylesheet is currently mounted in the document.
1818
- */
1819
- isMounted() {
1820
- return document.getElementById(this.id) != null;
1821
- }
1822
- /**
1823
- * Mounts the stylesheet with the given CSS content.
1824
- * Does nothing if already mounted.
1825
- *
1826
- * @param css - The CSS content to mount
1827
- */
1828
- mount(a) {
1829
- if (document.getElementById(this.id)) {
1830
- console.warn(`[PersonaRelay] Stylesheet ${this.id} already appended. Skipping.`);
1831
- return;
1832
- }
1833
- const f = tn("style", { id: this.id }, [document.createTextNode(a)]);
1834
- document.head.appendChild(f);
1835
- }
1836
- /**
1837
- * Unmounts the stylesheet from the document.
1838
- * Does nothing if not mounted.
1839
- */
1840
- unmount() {
1841
- const a = document.getElementById(this.id);
1842
- if (a == null) {
1843
- console.warn(`[PersonaRelay] No stylesheet ${this.id} to remove. Skipping.`);
1844
- return;
1845
- }
1846
- a.parentNode?.removeChild(a);
1847
- }
1848
- }
1849
- function tn(e, a, f = []) {
1850
- const l = document.createElement(e);
1851
- for (let [g, b] of Object.entries(a))
1852
- g === "className" && (g = "class"), l.setAttribute(g, b);
1853
- for (const g of f)
1854
- g !== !1 && (typeof g == "string" ? l.appendChild(document.createTextNode(g)) : l.appendChild(g));
1855
- return l;
1856
- }
1857
- const ea = ".relay-widget__container{position:relative;width:100%;color-scheme:light dark}.relay-widget__iframe{border:none;background:transparent;display:block;width:100%;height:0px}.relay-widget__popover-iframe{border:none;background:transparent;display:block;position:absolute;bottom:100%;left:-32px;transform:translateY(28px);width:calc(100% + 64px);height:0px}.relay-widget__fullscreen-iframe{border:none;background:transparent;display:none;height:0px}.relay-widget__fullscreen-iframe--visible{display:block;position:fixed;top:0;left:0;width:100%;height:100%;z-index:2147483647}.relay-widget__scroll-locked{overflow:hidden!important}";
1858
- class ra {
1833
+ class jn {
1859
1834
  /**
1860
1835
  * Creates a new Relay widget instance.
1861
1836
  *
1862
1837
  * @param container - CSS selector string or HTMLElement to mount into
1863
1838
  * @param options - Configuration options for the widget
1864
1839
  */
1865
- constructor(a, f) {
1866
- this.relayCSS = new Zn("relay-widget-styles"), this.resizeObserver = null, this.removeResizeListener = null, this.options = f, this.baseUrl = Br(this.options.host), this.containerParent = this.resolveContainer(a), this.containerId = Xn(), this.containerElement = tn("div", {
1840
+ constructor(i, u) {
1841
+ this.relayCSS = new on("relay-widget-styles"), this.resizeObserver = null, this.removeResizeListener = null, this.options = u, this.baseUrl = Fr(this.options.host), this.containerParent = this.resolveContainer(i), this.containerId = an(), this.containerElement = Bt("div", {
1867
1842
  class: "relay-widget__container",
1868
1843
  id: this.containerId
1869
- }), this.iframeElement = document.createElement("iframe"), this.popoverIframeElement = document.createElement("iframe"), this.fullscreenIframeElement = document.createElement("iframe"), this.unsubscribeFromEvents = Yn(this.containerId, {
1844
+ }), this.iframeElement = document.createElement("iframe"), this.popoverIframeElement = document.createElement("iframe"), this.fullscreenIframeElement = document.createElement("iframe"), this.unsubscribeFromEvents = fn(this.containerId, {
1870
1845
  onComplete: this.options.onComplete ?? null,
1871
1846
  onError: this.options.onError ?? null,
1872
1847
  onExpire: this.options.onExpire ?? null,
@@ -1874,9 +1849,9 @@ class ra {
1874
1849
  onPopoverResize: (l) => this.handlePopoverResize(l),
1875
1850
  onFullscreenResize: (l) => this.handleFullscreenResize(l),
1876
1851
  host: this.options.host ?? null
1877
- }), this.containerElement.appendChild(this.iframeElement), this.containerElement.appendChild(this.popoverIframeElement), this.containerParent.appendChild(this.containerElement), document.body.appendChild(this.fullscreenIframeElement), this.relayCSS.mount(ea);
1852
+ }), this.containerElement.appendChild(this.iframeElement), this.containerElement.appendChild(this.popoverIframeElement), this.containerParent.appendChild(this.containerElement), document.body.appendChild(this.fullscreenIframeElement), this.relayCSS.mount(ln);
1878
1853
  try {
1879
- Cr(this.iframeElement, this.containerId, this.options, "/relay-widget"), Cr(this.popoverIframeElement, this.containerId, this.options, "/relay-popover"), Cr(
1854
+ qr(this.iframeElement, this.containerId, this.options, "/relay-widget"), qr(this.popoverIframeElement, this.containerId, this.options, "/relay-popover"), qr(
1880
1855
  this.fullscreenIframeElement,
1881
1856
  this.containerId,
1882
1857
  this.options,
@@ -1891,33 +1866,33 @@ class ra {
1891
1866
  * Resolves the container option to an HTMLElement.
1892
1867
  * Accepts a CSS selector string or an HTMLElement.
1893
1868
  */
1894
- resolveContainer(a) {
1895
- if (a instanceof HTMLElement)
1896
- return a;
1897
- const f = document.querySelector(a);
1898
- if (!f)
1899
- throw new Error(`[PersonaRelay] Container element not found for selector: "${a}"`);
1900
- return f;
1869
+ resolveContainer(i) {
1870
+ if (i instanceof HTMLElement)
1871
+ return i;
1872
+ const u = document.querySelector(i);
1873
+ if (!u)
1874
+ throw new Error(`[PersonaRelay] Container element not found for selector: "${i}"`);
1875
+ return u;
1901
1876
  }
1902
1877
  /**
1903
1878
  * Handles widget-resize events by updating the iframe height to match the widget content.
1904
1879
  */
1905
- handleWidgetResize({ height: a }) {
1906
- this.iframeElement.style.height = `${a}px`;
1880
+ handleWidgetResize({ height: i }) {
1881
+ this.iframeElement.style.height = `${i}px`;
1907
1882
  }
1908
1883
  /**
1909
1884
  * Handles popover-resize events by updating the popover iframe height.
1910
1885
  */
1911
- handlePopoverResize({ height: a }) {
1912
- const f = a > 0 ? a + 64 : 0;
1913
- this.popoverIframeElement.style.height = `${f}px`;
1886
+ handlePopoverResize({ height: i }) {
1887
+ const u = i > 0 ? i + 64 : 0;
1888
+ this.popoverIframeElement.style.height = `${u}px`;
1914
1889
  }
1915
1890
  /**
1916
1891
  * Shows or hides the fullscreen iframe as a fullscreen overlay.
1917
1892
  * The iframe is kept in the DOM at 0px when hidden so it continues to render and receive messages.
1918
1893
  */
1919
- handleFullscreenResize({ fullscreen: a }) {
1920
- a ? (this.lockScroll(), this.fullscreenIframeElement.classList.add("relay-widget__fullscreen-iframe--visible")) : (this.fullscreenIframeElement.classList.remove("relay-widget__fullscreen-iframe--visible"), this.unlockScroll());
1894
+ handleFullscreenResize({ fullscreen: i }) {
1895
+ i ? (this.lockScroll(), this.fullscreenIframeElement.classList.add("relay-widget__fullscreen-iframe--visible")) : (this.fullscreenIframeElement.classList.remove("relay-widget__fullscreen-iframe--visible"), this.unlockScroll());
1921
1896
  }
1922
1897
  /**
1923
1898
  * Locks page scroll when the fullscreen overlay is active.
@@ -1935,10 +1910,10 @@ class ra {
1935
1910
  * Sends the current parent container dimensions to the widget iframe.
1936
1911
  */
1937
1912
  sendResize() {
1938
- const { clientWidth: a, clientHeight: f } = document.body, l = {
1939
- action: $r.Resize,
1913
+ const { clientWidth: i, clientHeight: u } = document.body, l = {
1914
+ action: Mr.Resize,
1940
1915
  containerId: this.containerId,
1941
- metadata: { width: a, height: f }
1916
+ metadata: { width: i, height: u }
1942
1917
  };
1943
1918
  this.iframeElement.contentWindow?.postMessage(l, this.baseUrl), this.popoverIframeElement.contentWindow?.postMessage(l, this.baseUrl), this.fullscreenIframeElement.contentWindow?.postMessage(l, this.baseUrl);
1944
1919
  }
@@ -1948,19 +1923,19 @@ class ra {
1948
1923
  */
1949
1924
  setupResizeObserver() {
1950
1925
  this.iframeElement.addEventListener("load", () => this.sendResize(), { once: !0 });
1951
- const a = () => this.sendResize();
1952
- window.addEventListener("resize", a), this.removeResizeListener = () => window.removeEventListener("resize", a);
1926
+ const i = () => this.sendResize();
1927
+ window.addEventListener("resize", i), this.removeResizeListener = () => window.removeEventListener("resize", i);
1953
1928
  }
1954
1929
  /**
1955
1930
  * Destroys the widget and cleans up all resources.
1956
1931
  * After calling this, the instance should not be used.
1957
1932
  */
1958
1933
  destroy() {
1959
- const a = { action: $r.Destroy, metadata: {} };
1960
- this.iframeElement.contentWindow?.postMessage(a, this.baseUrl), this.popoverIframeElement.contentWindow?.postMessage(a, this.baseUrl), this.fullscreenIframeElement.contentWindow?.postMessage(a, this.baseUrl), this.relayCSS.unmount(), this.unlockScroll(), this.resizeObserver?.disconnect(), this.resizeObserver = null, this.removeResizeListener?.(), this.removeResizeListener = null, this.containerElement.parentNode && this.containerParent.removeChild(this.containerElement), this.fullscreenIframeElement.parentNode && this.fullscreenIframeElement.parentNode.removeChild(this.fullscreenIframeElement), this.unsubscribeFromEvents();
1934
+ const i = { action: Mr.Destroy, metadata: {} };
1935
+ this.iframeElement.contentWindow?.postMessage(i, this.baseUrl), this.popoverIframeElement.contentWindow?.postMessage(i, this.baseUrl), this.fullscreenIframeElement.contentWindow?.postMessage(i, this.baseUrl), this.relayCSS.unmount(), this.unlockScroll(), this.resizeObserver?.disconnect(), this.resizeObserver = null, this.removeResizeListener?.(), this.removeResizeListener = null, this.containerElement.parentNode && this.containerParent.removeChild(this.containerElement), this.fullscreenIframeElement.parentNode && this.fullscreenIframeElement.parentNode.removeChild(this.fullscreenIframeElement), this.unsubscribeFromEvents();
1961
1936
  }
1962
1937
  }
1963
1938
  export {
1964
- ra as default
1939
+ jn as default
1965
1940
  };
1966
1941
  //# sourceMappingURL=relay.js.map