@banou/stub 0.0.23 → 0.0.25

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.
Files changed (47) hide show
  1. package/build/assets/account-BENsgVNM.js +1 -0
  2. package/build/assets/account-DlIk6xHa.js +1 -0
  3. package/build/assets/api-BdTgLphT-N3l6mbjo.js +3 -0
  4. package/build/assets/api-D1AUDaGk.js +1 -0
  5. package/build/assets/build-CQLpK1BK.js +1 -0
  6. package/build/assets/embed-BiH-YCjQ.js +1461 -0
  7. package/build/assets/index-js0hDSG0.js +2126 -0
  8. package/build/assets/lib-Co-0V6DV.js +71 -0
  9. package/build/assets/{lib-account-DncELSPq.js → lib-account-BUymp__o.js} +12 -12
  10. package/build/assets/lib-account-zcRp2Stn.js +2 -0
  11. package/build/assets/{lib-api-BdTgLphT-CAZBNIQ5.js → lib-api-BdTgLphT-DSr8Qbeb.js} +353 -367
  12. package/build/assets/lib-api-MaBk5T3E.js +2 -0
  13. package/build/assets/{lib-rolldown-runtime-B1bRi_D7.js → lib-rolldown-runtime-Cb76FRpK.js} +2 -2
  14. package/build/assets/{lib-worker-0qYIS3eh.js → lib-worker-BGozEgr9.js} +148 -140
  15. package/build/assets/{lib-worker-Cv77f0ZX.js → lib-worker-GYQJyD7j.js} +1 -1
  16. package/build/assets/lib-worker-index-B4F7kvUH.js +2126 -0
  17. package/build/assets/main-CSyC6ryz.css +1 -0
  18. package/build/assets/main-CzEKJyQ-.js +3844 -0
  19. package/build/assets/remote-CVVOdyaq.js +1 -0
  20. package/build/assets/remote-VQoP8ehb.js +1 -0
  21. package/build/assets/uri-DvH8-88e.js +1 -0
  22. package/build/assets/{worker-BCl_Bm_R.js → worker-BwFHZ688.js} +1 -1
  23. package/build/assets/{worker-BsQDcd-k.js → worker-CT1T8vTt.js} +1 -1
  24. package/build/embed.html +8 -39
  25. package/build/index.html +9 -9
  26. package/build/index.js +2664 -2655
  27. package/package.json +10 -8
  28. package/build/.well-known/fkn.json +0 -1
  29. package/build/_headers +0 -5
  30. package/build/assets/account-B0kxAr97.js +0 -1
  31. package/build/assets/account-DjnuxpAV.js +0 -1
  32. package/build/assets/api-BdTgLphT-QGKmIqNg.js +0 -3
  33. package/build/assets/api-DsRXk6Ul.js +0 -1
  34. package/build/assets/build-BuC_lDPE.js +0 -1
  35. package/build/assets/embed-k24RBb_R.js +0 -1461
  36. package/build/assets/index-CPsp3E-B.js +0 -1964
  37. package/build/assets/lib-BqoXHewM.js +0 -71
  38. package/build/assets/lib-account-cGGxEwWz.js +0 -2
  39. package/build/assets/lib-api-Bi9f-0mj.js +0 -2
  40. package/build/assets/lib-worker-index-rcCwnCgE.js +0 -1964
  41. package/build/assets/main-Cpi6zSh1.js +0 -3844
  42. package/build/assets/main-DZ0Ws1xk.css +0 -1
  43. package/build/assets/remote-CW2xewp5.js +0 -1
  44. package/build/assets/remote-DNcNpuT3.js +0 -1
  45. package/build/assets/uri-BYw9k-7q.js +0 -1
  46. package/build/fkn.json +0 -1
  47. package/fkn.json +0 -1
@@ -1,9 +1,9 @@
1
- import { i as e, n as t, r as n, t as r } from "./lib-rolldown-runtime-B1bRi_D7.js";
2
- import { a as i, c as a, d as o, f as s, i as c, l, m as u, n as d, o as f, p, t as m, u as h } from "./lib-api-BdTgLphT-CAZBNIQ5.js";
3
- import { o as g } from "./lib-account-DncELSPq.js";
1
+ import { i as e, n as t, r as n, t as r } from "./lib-rolldown-runtime-Cb76FRpK.js";
2
+ import { a as i, c as a, d as o, f as s, i as c, l, n as u, o as d, p as f, s as p, t as m, u as h } from "./lib-api-BdTgLphT-DSr8Qbeb.js";
3
+ import { o as g } from "./lib-account-BUymp__o.js";
4
4
  //#region src/worker/index.ts?worker
5
5
  function _(e) {
6
- return new Worker("" + new URL("lib-worker-index-rcCwnCgE.js", import.meta.url).href, {
6
+ return new Worker(new URL("lib-worker-index-B4F7kvUH.js", import.meta.url).href, {
7
7
  type: "module",
8
8
  name: e?.name
9
9
  });
@@ -402,13 +402,13 @@ var P = N, F = (e, t) => {
402
402
  }, xe = (e) => B(he(e), be(e)), Se = (e) => typeof e == "object" && !!e && e[de] === !0, Ce = (e, t) => {
403
403
  let n = e;
404
404
  return {
405
- ...s,
405
+ ...o,
406
406
  type: se,
407
407
  initialState: n[fe],
408
- controller: p(n[pe], t)
408
+ controller: s(n[pe], t)
409
409
  };
410
410
  }, we = (e, t) => {
411
- let n = h(e.controller, t);
411
+ let n = l(e.controller, t);
412
412
  return B({ ...e.initialState }, n);
413
413
  }, Te = (e) => [oe, ...e], Ee = "fknExtension", De = "fknExtensionAbi", Oe = "fknExtensionOps", ke = [
414
414
  "data-fkn-extension",
@@ -438,7 +438,7 @@ var P = N, F = (e, t) => {
438
438
  constructor(e, t) {
439
439
  super(`The FKN WebExtension is installed but too old for this page: it speaks ABI ${e} and this page needs at least ${t}. Updating the extension fixes this.`), this.abi = e, this.required = t;
440
440
  }
441
- }, Pe = "FKN_WEB_EXTENSION_MAIN_WORLD_CONTENT_SCRIPT_ENABLED_EVENT_KEY", Fe = Ee, Ie = o();
441
+ }, Pe = "FKN_WEB_EXTENSION_MAIN_WORLD_CONTENT_SCRIPT_ENABLED_EVENT_KEY", Fe = Ee, Ie = h();
442
442
  typeof document < "u" && document.addEventListener(Pe, () => {
443
443
  Ie.dispatchEvent(new CustomEvent("statuschange", { detail: { enabled: Le() } }));
444
444
  });
@@ -472,7 +472,7 @@ var Le = () => typeof document > "u" ? !1 : document.documentElement.dataset[Fe]
472
472
  r() && a(t);
473
473
  }), Ue;
474
474
  new Proxy({}, { get: (e, t) => async (...e) => {
475
- await He(), Ue ??= u({}, {
475
+ await He(), Ue ??= f({}, {
476
476
  transport: window,
477
477
  revivableModules: Te
478
478
  });
@@ -1850,7 +1850,7 @@ var jn = (e) => An.get(e)?.category, Mn = (e) => {
1850
1850
  let t = await e.clone().arrayBuffer();
1851
1851
  return t.byteLength ? t : void 0;
1852
1852
  }, Hn = async (e, t) => {
1853
- if (l(e), typeof e == "object" && e && !(e instanceof URL) && typeof e.url == "string") {
1853
+ if (a(e), typeof e == "object" && e && !(e instanceof URL) && typeof e.url == "string") {
1854
1854
  let n = e, r = {};
1855
1855
  n.headers.forEach((e, t) => {
1856
1856
  r[t] = e;
@@ -1940,8 +1940,7 @@ function Yn(e, t, n) {
1940
1940
  return (t + n) * 3 / 4 - n;
1941
1941
  }
1942
1942
  function Xn(e) {
1943
- var t, n = qn(e), r = n[0], i = n[1], a = new nr(Yn(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c;
1944
- for (c = 0; c < s; c += 4) t = W[e.charCodeAt(c)] << 18 | W[e.charCodeAt(c + 1)] << 12 | W[e.charCodeAt(c + 2)] << 6 | W[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
1943
+ for (var t, n = qn(e), r = n[0], i = n[1], a = new nr(Yn(e, r, i)), o = 0, s = i > 0 ? r - 4 : r, c = 0; c < s; c += 4) t = W[e.charCodeAt(c)] << 18 | W[e.charCodeAt(c + 1)] << 12 | W[e.charCodeAt(c + 2)] << 6 | W[e.charCodeAt(c + 3)], a[o++] = t >> 16 & 255, a[o++] = t >> 8 & 255, a[o++] = t & 255;
1945
1944
  return i === 2 && (t = W[e.charCodeAt(c)] << 2 | W[e.charCodeAt(c + 1)] >> 4, a[o++] = t & 255), i === 1 && (t = W[e.charCodeAt(c)] << 10 | W[e.charCodeAt(c + 1)] << 4 | W[e.charCodeAt(c + 2)] >> 2, a[o++] = t >> 8 & 255, a[o++] = t & 255), a;
1946
1945
  }
1947
1946
  function Zn(e) {
@@ -2194,7 +2193,7 @@ var U, er, tr, W, nr, rr, ir, ar, or, sr, cr, lr, G, ur, dr, fr, pr, mr, hr, gr,
2194
2193
  return e === 0 ? "" : arguments.length === 0 ? ee(this, 0, e) : C.apply(this, arguments);
2195
2194
  }, u.prototype.toLocaleString = u.prototype.toString, u.prototype.equals = function(e) {
2196
2195
  if (!u.isBuffer(e)) throw TypeError("Argument must be a Buffer");
2197
- return this === e ? !0 : u.compare(this, e) === 0;
2196
+ return this === e || u.compare(this, e) === 0;
2198
2197
  }, u.prototype.inspect = function() {
2199
2198
  let t = "", n = e.INSPECT_MAX_BYTES;
2200
2199
  return t = this.toString("hex", 0, n).replace(/(.{2})/g, "$1 ").trim(), this.length > n && (t += " ... "), "<Buffer " + t + ">";
@@ -2217,8 +2216,10 @@ var U, er, tr, W, nr, rr, ir, ar, or, sr, cr, lr, G, ur, dr, fr, pr, mr, hr, gr,
2217
2216
  if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, xe(n) && (n = i ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
2218
2217
  if (i) return -1;
2219
2218
  n = e.length - 1;
2220
- } else if (n < 0) if (i) n = 0;
2221
- else return -1;
2219
+ } else if (n < 0) {
2220
+ if (i) n = 0;
2221
+ else return -1;
2222
+ }
2222
2223
  if (typeof t == "string" && (t = u.from(t, r)), u.isBuffer(t)) return t.length === 0 ? -1 : E(e, t, n, r, i);
2223
2224
  if (typeof t == "number") return t &= 255, typeof a.prototype.indexOf == "function" ? i ? a.prototype.indexOf.call(e, t, n) : a.prototype.lastIndexOf.call(e, t, n) : E(e, [t], n, r, i);
2224
2225
  throw TypeError("val must be string, number or Buffer");
@@ -2261,8 +2262,8 @@ var U, er, tr, W, nr, rr, ir, ar, or, sr, cr, lr, G, ur, dr, fr, pr, mr, hr, gr,
2261
2262
  r ? (r = Number(r), r > i && (r = i)) : r = i;
2262
2263
  let a = t.length;
2263
2264
  r > a / 2 && (r = a / 2);
2264
- let o;
2265
- for (o = 0; o < r; ++o) {
2265
+ let o = 0;
2266
+ for (; o < r; ++o) {
2266
2267
  let r = parseInt(t.substr(o * 2, 2), 16);
2267
2268
  if (xe(r)) return o;
2268
2269
  e[n + o] = r;
@@ -2405,13 +2406,13 @@ var U, er, tr, W, nr, rr, ir, ar, or, sr, cr, lr, G, ur, dr, fr, pr, mr, hr, gr,
2405
2406
  e >>>= 0, fe(e, "offset");
2406
2407
  let t = this[e], n = this[e + 7];
2407
2408
  (t === void 0 || n === void 0) && pe(e, this.length - 8);
2408
- let r = t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24, i = this[++e] + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + n * 2 ** 24;
2409
+ let r = t + this[++e] * 256 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24, i = this[++e] + this[++e] * 256 + this[++e] * 2 ** 16 + n * 2 ** 24;
2409
2410
  return BigInt(r) + (BigInt(i) << BigInt(32));
2410
2411
  }), u.prototype.readBigUInt64BE = Ce(function(e) {
2411
2412
  e >>>= 0, fe(e, "offset");
2412
2413
  let t = this[e], n = this[e + 7];
2413
2414
  (t === void 0 || n === void 0) && pe(e, this.length - 8);
2414
- let r = t * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e], i = this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + n;
2415
+ let r = t * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 256 + this[++e], i = this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 256 + n;
2415
2416
  return (BigInt(r) << BigInt(32)) + BigInt(i);
2416
2417
  }), u.prototype.readIntLE = function(e, t, n) {
2417
2418
  e >>>= 0, t >>>= 0, n || L(e, t, this.length);
@@ -2441,14 +2442,14 @@ var U, er, tr, W, nr, rr, ir, ar, or, sr, cr, lr, G, ur, dr, fr, pr, mr, hr, gr,
2441
2442
  e >>>= 0, fe(e, "offset");
2442
2443
  let t = this[e], n = this[e + 7];
2443
2444
  (t === void 0 || n === void 0) && pe(e, this.length - 8);
2444
- let r = this[e + 4] + this[e + 5] * 2 ** 8 + this[e + 6] * 2 ** 16 + (n << 24);
2445
- return (BigInt(r) << BigInt(32)) + BigInt(t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24);
2445
+ let r = this[e + 4] + this[e + 5] * 256 + this[e + 6] * 2 ** 16 + (n << 24);
2446
+ return (BigInt(r) << BigInt(32)) + BigInt(t + this[++e] * 256 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24);
2446
2447
  }), u.prototype.readBigInt64BE = Ce(function(e) {
2447
2448
  e >>>= 0, fe(e, "offset");
2448
2449
  let t = this[e], n = this[e + 7];
2449
2450
  (t === void 0 || n === void 0) && pe(e, this.length - 8);
2450
- let r = (t << 24) + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e];
2451
- return (BigInt(r) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + n);
2451
+ let r = (t << 24) + this[++e] * 2 ** 16 + this[++e] * 256 + this[++e];
2452
+ return (BigInt(r) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 256 + n);
2452
2453
  }), u.prototype.readFloatLE = function(e, t) {
2453
2454
  return e >>>= 0, t || L(e, 4, this.length), n.read(this, e, !0, 23, 4);
2454
2455
  }, u.prototype.readFloatBE = function(e, t) {
@@ -2657,7 +2658,8 @@ var U, er, tr, W, nr, rr, ir, ar, or, sr, cr, lr, G, ur, dr, fr, pr, mr, hr, gr,
2657
2658
  if (n > 56319) {
2658
2659
  (t -= 3) > -1 && a.push(239, 191, 189);
2659
2660
  continue;
2660
- } else if (o + 1 === r) {
2661
+ }
2662
+ if (o + 1 === r) {
2661
2663
  (t -= 3) > -1 && a.push(239, 191, 189);
2662
2664
  continue;
2663
2665
  }
@@ -2700,8 +2702,8 @@ var U, er, tr, W, nr, rr, ir, ar, or, sr, cr, lr, G, ur, dr, fr, pr, mr, hr, gr,
2700
2702
  return t.toByteArray(he(e));
2701
2703
  }
2702
2704
  function be(e, t, n, r) {
2703
- let i;
2704
- for (i = 0; i < r && !(i + n >= t.length || i >= e.length); ++i) t[i + n] = e[i];
2705
+ let i = 0;
2706
+ for (; i < r && !(i + n >= t.length || i >= e.length); ++i) t[i + n] = e[i];
2705
2707
  return i;
2706
2708
  }
2707
2709
  function B(e, t) {
@@ -2784,7 +2786,7 @@ var Tr = {
2784
2786
  return r.code = e, r.path = t, r.syscall = n, r;
2785
2787
  }, q = (e) => {
2786
2788
  let t = [];
2787
- for (let n of e.split("/")) if (!(!n || n === ".")) {
2789
+ for (let n of e.split("/")) if (n && n !== ".") {
2788
2790
  if (n === "..") {
2789
2791
  t.pop();
2790
2792
  continue;
@@ -2823,7 +2825,7 @@ var Tr = {
2823
2825
  let s = await e.list().catch(() => []), l = /* @__PURE__ */ new Set(), u = !1;
2824
2826
  for (let c of s) {
2825
2827
  let s = q(c.path);
2826
- if (l.add(s), !r.has(s) && !(n.has(s) && !i.has(s))) try {
2828
+ if (l.add(s), !r.has(s) && (!n.has(s) || i.has(s))) try {
2827
2829
  let l = await (await e.readFile(c.path)).arrayBuffer();
2828
2830
  if (r.has(s) || n.has(s) && !i.has(s)) continue;
2829
2831
  o(kr(s));
@@ -3226,7 +3228,7 @@ var Hr = "FKN_STORAGE_NOT_FOUND", Ur = /* @__PURE__ */ g({
3226
3228
  }
3227
3229
  function i(e) {
3228
3230
  return function() {
3229
- return this.addressMinusSuffix === this.correctForm() ? this.subnetMask === e && !this.parsedSubnet ? !0 : this.parsedSubnet === String(this.subnetMask) : !1;
3231
+ return this.addressMinusSuffix === this.correctForm() ? this.subnetMask === e && !this.parsedSubnet || this.parsedSubnet === String(this.subnetMask) : !1;
3230
3232
  };
3231
3233
  }
3232
3234
  function a(e, n) {
@@ -3346,8 +3348,8 @@ var Hr = "FKN_STORAGE_NOT_FOUND", Ur = /* @__PURE__ */ g({
3346
3348
  return this.parsedAddress.map((e) => parseInt(e, 10));
3347
3349
  }
3348
3350
  toGroup6() {
3349
- let e = [], t;
3350
- for (t = 0; t < a.GROUPS; t += 2) e.push(`${i.stringToPaddedHex(this.parsedAddress[t])}${i.stringToPaddedHex(this.parsedAddress[t + 1])}`);
3351
+ let e = [], t = 0;
3352
+ for (; t < a.GROUPS; t += 2) e.push(`${i.stringToPaddedHex(this.parsedAddress[t])}${i.stringToPaddedHex(this.parsedAddress[t + 1])}`);
3351
3353
  return e.join(":");
3352
3354
  }
3353
3355
  bigInt() {
@@ -3593,8 +3595,8 @@ var Hr = "FKN_STORAGE_NOT_FOUND", Ur = /* @__PURE__ */ g({
3593
3595
  return e = e.replace(/^(0{1,})([1-9]+)$/, "<span class=\"parse-error\">$1</span>$2"), e = e.replace(/^(0{1,})(0)$/, "<span class=\"parse-error\">$1</span>$2"), e;
3594
3596
  }
3595
3597
  function g(e, t) {
3596
- let n = [], r = [], i;
3597
- for (i = 0; i < e.length; i++) i < t[0] ? n.push(e[i]) : i > t[1] && r.push(e[i]);
3598
+ let n = [], r = [], i = 0;
3599
+ for (; i < e.length; i++) i < t[0] ? n.push(e[i]) : i > t[1] && r.push(e[i]);
3598
3600
  return n.concat(["compact"]).concat(r);
3599
3601
  }
3600
3602
  function _(e) {
@@ -3605,7 +3607,7 @@ var Hr = "FKN_STORAGE_NOT_FOUND", Ur = /* @__PURE__ */ g({
3605
3607
  }
3606
3608
  var y = class e {
3607
3609
  constructor(e, t) {
3608
- this.addressMinusSuffix = "", this.parsedSubnet = "", this.subnet = "/128", this.subnetMask = 128, this.v4 = !1, this.zone = "", this.isInSubnet = i.isInSubnet, this.isHostInSubnet = i.isHostInSubnet, this.isCorrect = f, t === void 0 ? this.groups = o.GROUPS : this.groups = t, this.address = e;
3610
+ this.addressMinusSuffix = "", this.parsedSubnet = "", this.subnet = "/128", this.subnetMask = 128, this.v4 = !1, this.zone = "", this.isInSubnet = i.isInSubnet, this.isHostInSubnet = i.isHostInSubnet, this.isCorrect = f, this.groups = t === void 0 ? o.GROUPS : t, this.address = e;
3609
3611
  let n = o.RE_SUBNET_STRING.exec(e);
3610
3612
  if (n) {
3611
3613
  if (this.parsedSubnet = n[0].replace("/", ""), this.subnetMask = parseInt(this.parsedSubnet, 10), this.subnet = `/${this.subnetMask}`, Number.isNaN(this.subnetMask) || this.subnetMask < 0 || this.subnetMask > o.BITS) throw new u.AddressError("Invalid subnet mask.");
@@ -4302,14 +4304,14 @@ var ki = "webvpn-udp-port-ack", Ai = (e) => Y.Address4.isValid(e), ji = (e) => Y
4302
4304
  else throw TypeError("The \"emitter\" argument must be of type EventEmitter. Received type " + typeof e);
4303
4305
  }
4304
4306
  })), Li = /* @__PURE__ */ r(((e, t) => {
4305
- typeof Object.create == "function" ? t.exports = function(e, t) {
4307
+ t.exports = typeof Object.create == "function" ? function(e, t) {
4306
4308
  t && (e.super_ = t, e.prototype = Object.create(t.prototype, { constructor: {
4307
4309
  value: e,
4308
4310
  enumerable: !1,
4309
4311
  writable: !0,
4310
4312
  configurable: !0
4311
4313
  } }));
4312
- } : t.exports = function(e, t) {
4314
+ } : function(e, t) {
4313
4315
  if (t) {
4314
4316
  e.super_ = t;
4315
4317
  var n = function() {};
@@ -4357,7 +4359,7 @@ function Wi(e) {
4357
4359
  }
4358
4360
  }
4359
4361
  function Gi() {
4360
- !$i || !ea || ($i = !1, ea.length ? Qi = ea.concat(Qi) : ta = -1, Qi.length && Ki());
4362
+ $i && ea && ($i = !1, ea.length ? Qi = ea.concat(Qi) : ta = -1, Qi.length && Ki());
4361
4363
  }
4362
4364
  function Ki() {
4363
4365
  if (!$i) {
@@ -4545,9 +4547,9 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
4545
4547
  if (!e || typeof e != "object" || !("code" in e) || e.code !== "ERR_PROTO_ACCESS") throw e;
4546
4548
  }
4547
4549
  var a = !!i && r && r(Object.prototype, "__proto__"), o = Object, s = o.getPrototypeOf;
4548
- t.exports = a && typeof a.get == "function" ? n([a.get]) : typeof s == "function" ? function(e) {
4550
+ t.exports = a && typeof a.get == "function" ? n([a.get]) : typeof s == "function" && function(e) {
4549
4551
  return s(e == null ? e : o(e));
4550
- } : !1;
4552
+ };
4551
4553
  })), La = /* @__PURE__ */ r(((e, t) => {
4552
4554
  var n = Da(), r = Oa(), i = Ia();
4553
4555
  t.exports = n ? function(e) {
@@ -4901,7 +4903,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
4901
4903
  }
4902
4904
  }, c = function(e) {
4903
4905
  try {
4904
- return s(e) ? !1 : (n.call(e), !0);
4906
+ return !s(e) && (n.call(e), !0);
4905
4907
  } catch {
4906
4908
  return !1;
4907
4909
  }
@@ -4982,7 +4984,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
4982
4984
  if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null) throw new i("`nonWritable`, if provided, must be a boolean or null");
4983
4985
  if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null) throw new i("`nonConfigurable`, if provided, must be a boolean or null");
4984
4986
  if (arguments.length > 6 && typeof arguments[6] != "boolean") throw new i("`loose`, if provided, must be a boolean");
4985
- var s = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null, u = arguments.length > 6 ? arguments[6] : !1, d = !!a && a(e, t);
4987
+ var s = arguments.length > 3 ? arguments[3] : null, c = arguments.length > 4 ? arguments[4] : null, l = arguments.length > 5 ? arguments[5] : null, u = arguments.length > 6 && arguments[6], d = !!a && a(e, t);
4986
4988
  if (n) n(e, t, {
4987
4989
  configurable: l === null && d ? d.configurable : !l,
4988
4990
  enumerable: s === null && d ? d.enumerable : !s,
@@ -5062,7 +5064,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
5062
5064
  if (!e || typeof e != "object") return !1;
5063
5065
  if (!l) {
5064
5066
  var t = f(c(e), 8, -1);
5065
- return p(d, t) > -1 ? t : t === "Object" ? g(e) : !1;
5067
+ return p(d, t) > -1 ? t : t === "Object" && g(e);
5066
5068
  }
5067
5069
  return o ? h(e) : null;
5068
5070
  };
@@ -5193,7 +5195,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
5193
5195
  return c(e) === "[object SharedArrayBuffer]";
5194
5196
  }
5195
5197
  function z(e) {
5196
- return L === void 0 ? !1 : (R.working === void 0 && (R.working = R(new L())), R.working ? R(e) : e instanceof L);
5198
+ return L !== void 0 && (R.working === void 0 && (R.working = R(new L())), R.working ? R(e) : e instanceof L);
5197
5199
  }
5198
5200
  e.isSharedArrayBuffer = z;
5199
5201
  function re(e) {
@@ -5306,13 +5308,15 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
5306
5308
  a = a.replace(/[|\\{}()[\]^$+?.]/g, "\\$&").replace(/\*/g, ".*").replace(/,/g, "$|^").toUpperCase(), i = RegExp("^" + a + "$", "i");
5307
5309
  }
5308
5310
  e.debuglog = function(t) {
5309
- if (t = t.toUpperCase(), !r[t]) if (i.test(t)) {
5310
- var n = Z.pid;
5311
- r[t] = function() {
5312
- var r = e.format.apply(e, arguments);
5313
- console.error("%s %d: %s", t, n, r);
5314
- };
5315
- } else r[t] = function() {};
5311
+ if (t = t.toUpperCase(), !r[t]) {
5312
+ if (i.test(t)) {
5313
+ var n = Z.pid;
5314
+ r[t] = function() {
5315
+ var r = e.format.apply(e, arguments);
5316
+ console.error("%s %d: %s", t, n, r);
5317
+ };
5318
+ } else r[t] = function() {};
5319
+ }
5316
5320
  return r[t];
5317
5321
  };
5318
5322
  function o(t, n) {
@@ -5671,7 +5675,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
5671
5675
  value: function() {
5672
5676
  if (this.length !== 0) {
5673
5677
  var e = this.head.data;
5674
- return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, e;
5678
+ return this.head = this.length === 1 ? this.tail = null : this.head.next, --this.length, e;
5675
5679
  }
5676
5680
  }
5677
5681
  },
@@ -5717,7 +5721,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
5717
5721
  for (e -= r.length; t = t.next;) {
5718
5722
  var i = t.data, a = e > i.length ? i.length : e;
5719
5723
  if (a === i.length ? r += i : r += i.slice(0, e), e -= a, e === 0) {
5720
- a === i.length ? (++n, t.next ? this.head = t.next : this.head = this.tail = null) : (this.head = t, t.data = i.slice(a));
5724
+ a === i.length ? (++n, this.head = t.next ? t.next : this.tail = null) : (this.head = t, t.data = i.slice(a));
5721
5725
  break;
5722
5726
  }
5723
5727
  ++n;
@@ -5732,7 +5736,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
5732
5736
  for (n.data.copy(t), e -= n.data.length; n = n.next;) {
5733
5737
  var i = n.data, a = e > i.length ? i.length : e;
5734
5738
  if (i.copy(t, t.length - e, 0, a), e -= a, e === 0) {
5735
- a === i.length ? (++r, n.next ? this.head = n.next : this.head = this.tail = null) : (this.head = n, n.data = i.slice(a));
5739
+ a === i.length ? (++r, this.head = n.next ? n.next : this.tail = null) : (this.head = n, n.data = i.slice(a));
5736
5740
  break;
5737
5741
  }
5738
5742
  ++r;
@@ -5763,7 +5767,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
5763
5767
  o(e, t), i(e);
5764
5768
  }
5765
5769
  function i(e) {
5766
- e._writableState && !e._writableState.emitClose || e._readableState && !e._readableState.emitClose || e.emit("close");
5770
+ (!e._writableState || e._writableState.emitClose) && (!e._readableState || e._readableState.emitClose) && e.emit("close");
5767
5771
  }
5768
5772
  function a() {
5769
5773
  this._readableState && (this._readableState.destroyed = !1, this._readableState.reading = !1, this._readableState.ended = !1, this._readableState.endEmitted = !1), this._writableState && (this._writableState.destroyed = !1, this._writableState.ended = !1, this._writableState.ending = !1, this._writableState.finalCalled = !1, this._writableState.prefinished = !1, this._writableState.finished = !1, this._writableState.errorEmitted = !1);
@@ -5805,7 +5809,8 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
5805
5809
  return e = e.map(function(e) {
5806
5810
  return String(e);
5807
5811
  }), n > 2 ? `one of ${t} ${e.slice(0, n - 1).join(", ")}, or ` + e[n - 1] : n === 2 ? `one of ${t} ${e[0]} or ${e[1]}` : `of ${t} ${e[0]}`;
5808
- } else return `of ${t} ${String(e)}`;
5812
+ }
5813
+ return `of ${t} ${String(e)}`;
5809
5814
  }
5810
5815
  function o(e, t, n) {
5811
5816
  return e.substr(!n || n < 0 ? 0 : +n, t.length) === t;
@@ -5841,7 +5846,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
5841
5846
  if (!(isFinite(o) && Math.floor(o) === o) || o < 0) throw new n(a ? i : "highWaterMark", o);
5842
5847
  return Math.floor(o);
5843
5848
  }
5844
- return e.objectMode ? 16 : 16 * 1024;
5849
+ return e.objectMode ? 16 : 16384;
5845
5850
  }
5846
5851
  t.exports = { getHighWaterMark: i };
5847
5852
  })), lo = /* @__PURE__ */ r(((e, t) => {
@@ -5865,7 +5870,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
5865
5870
  return !1;
5866
5871
  }
5867
5872
  var t = Ri.localStorage[e];
5868
- return t == null ? !1 : String(t).toLowerCase() === "true";
5873
+ return t != null && String(t).toLowerCase() === "true";
5869
5874
  }
5870
5875
  })), uo = /* @__PURE__ */ r(((t, n) => {
5871
5876
  zi(), ra(), n.exports = E;
@@ -5906,7 +5911,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
5906
5911
  })();
5907
5912
  var T;
5908
5913
  typeof Symbol == "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] == "function" ? (T = Function.prototype[Symbol.hasInstance], Object.defineProperty(E, Symbol.hasInstance, { value: function(e) {
5909
- return T.call(this, e) ? !0 : this === E ? e && e._writableState instanceof w : !1;
5914
+ return T.call(this, e) ? !0 : this === E && e && e._writableState instanceof w;
5910
5915
  } })) : T = function(e) {
5911
5916
  return e instanceof this;
5912
5917
  };
@@ -5925,7 +5930,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
5925
5930
  }
5926
5931
  function O(e, t, n, r) {
5927
5932
  var i;
5928
- return n === null ? i = new y() : typeof n != "string" && !t.objectMode && (i = new m("chunk", ["string", "Buffer"], n)), i ? (S(e, i), Z.nextTick(r, i), !1) : !0;
5933
+ return n === null ? i = new y() : typeof n != "string" && !t.objectMode && (i = new m("chunk", ["string", "Buffer"], n)), !i || (S(e, i), Z.nextTick(r, i), !1);
5929
5934
  }
5930
5935
  E.prototype.write = function(e, t, n) {
5931
5936
  var r = this._writableState, i = !1, a = !r.objectMode && u(e);
@@ -6070,7 +6075,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
6070
6075
  Object.defineProperty(E.prototype, "destroyed", {
6071
6076
  enumerable: !1,
6072
6077
  get: function() {
6073
- return this._writableState === void 0 ? !1 : this._writableState.destroyed;
6078
+ return this._writableState !== void 0 && this._writableState.destroyed;
6074
6079
  },
6075
6080
  set: function(e) {
6076
6081
  this._writableState && (this._writableState.destroyed = e);
@@ -6124,7 +6129,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
6124
6129
  return this._readableState === void 0 || this._writableState === void 0 ? !1 : this._readableState.destroyed && this._writableState.destroyed;
6125
6130
  },
6126
6131
  set: function(e) {
6127
- this._readableState === void 0 || this._writableState === void 0 || (this._readableState.destroyed = e, this._writableState.destroyed = e);
6132
+ this._readableState !== void 0 && this._writableState !== void 0 && (this._readableState.destroyed = e, this._writableState.destroyed = e);
6128
6133
  }
6129
6134
  });
6130
6135
  })), po = /* @__PURE__ */ r(((t, n) => {
@@ -6491,7 +6496,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
6491
6496
  Object.defineProperty(D.prototype, "destroyed", {
6492
6497
  enumerable: !1,
6493
6498
  get: function() {
6494
- return this._readableState === void 0 ? !1 : this._readableState.destroyed;
6499
+ return this._readableState !== void 0 && this._readableState.destroyed;
6495
6500
  },
6496
6501
  set: function(e) {
6497
6502
  this._readableState && (this._readableState.destroyed = e);
@@ -6511,11 +6516,12 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
6511
6516
  else {
6512
6517
  var s;
6513
6518
  if (i || (s = A(a, t)), s) C(e, s);
6514
- else if (a.objectMode || t && t.length > 0) if (typeof t != "string" && !a.objectMode && Object.getPrototypeOf(t) !== o.prototype && (t = c(t)), r) a.endEmitted ? C(e, new y()) : k(e, a, t, !0);
6515
- else if (a.ended) C(e, new _());
6516
- else if (a.destroyed) return !1;
6517
- else a.reading = !1, a.decoder && !n ? (t = a.decoder.write(t), a.objectMode || t.length !== 0 ? k(e, a, t, !1) : I(e, a)) : k(e, a, t, !1);
6518
- else r || (a.reading = !1, I(e, a));
6519
+ else if (a.objectMode || t && t.length > 0) {
6520
+ if (typeof t != "string" && !a.objectMode && Object.getPrototypeOf(t) !== o.prototype && (t = c(t)), r) a.endEmitted ? C(e, new y()) : k(e, a, t, !0);
6521
+ else if (a.ended) C(e, new _());
6522
+ else if (a.destroyed) return !1;
6523
+ else a.reading = !1, a.decoder && !n ? (t = a.decoder.write(t), a.objectMode || t.length !== 0 ? k(e, a, t, !1) : I(e, a)) : k(e, a, t, !1);
6524
+ } else r || (a.reading = !1, I(e, a));
6519
6525
  }
6520
6526
  return !a.ended && (a.length < a.highWaterMark || a.length === 0);
6521
6527
  }
@@ -6594,9 +6600,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
6594
6600
  case 1:
6595
6601
  r.pipes = [r.pipes, e];
6596
6602
  break;
6597
- default:
6598
- r.pipes.push(e);
6599
- break;
6603
+ default: r.pipes.push(e);
6600
6604
  }
6601
6605
  r.pipesCount += 1, d("pipe count=%d opts=%j", r.pipesCount, t);
6602
6606
  var a = (!t || t.end !== !1) && e !== Z.stdout && e !== Z.stderr ? s : g;
@@ -6697,7 +6701,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
6697
6701
  }
6698
6702
  t.push(null);
6699
6703
  }), e.on("data", function(i) {
6700
- d("wrapped data"), n.decoder && (i = n.decoder.write(i)), !(n.objectMode && i == null) && (!n.objectMode && (!i || !i.length) || t.push(i) || (r = !0, e.pause()));
6704
+ d("wrapped data"), n.decoder && (i = n.decoder.write(i)), !(n.objectMode && i == null) && (n.objectMode || i && i.length) && (t.push(i) || (r = !0, e.pause()));
6701
6705
  }), e) this[i] === void 0 && typeof e[i] == "function" && (this[i] = function(t) {
6702
6706
  return function() {
6703
6707
  return e[t].apply(e, arguments);
@@ -6994,7 +6998,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
6994
6998
  }).catch(n);
6995
6999
  }
6996
7000
  connect(...e) {
6997
- let t = Ni(...e), n = this.__webvpn_tcp_socket_init__(f("an outbound tcp socket").then((e) => e.cloud.webvpn.tcpSocket({
7001
+ let t = Ni(...e), n = this.__webvpn_tcp_socket_init__(d("an outbound tcp socket").then((e) => e.cloud.webvpn.tcpSocket({
6998
7002
  remoteAddress: t.host ?? "localhost",
6999
7003
  remotePort: t.port
7000
7004
  })));
@@ -7165,7 +7169,7 @@ var Yi, X, Xi, Zi, Qi, $i, ea, ta, na, Z, ra = t((() => {
7165
7169
  } finally {
7166
7170
  this._emitClose();
7167
7171
  }
7168
- }, i = (e) => f("a tcp listener").then((i) => i.cloud.webvpn.tcpSocketListener({
7172
+ }, i = (e) => d("a tcp listener").then((i) => i.cloud.webvpn.tcpSocketListener({
7169
7173
  localAddress: e,
7170
7174
  localPort: t.port,
7171
7175
  onConnection: n,
@@ -7358,7 +7362,7 @@ var jo = /* @__PURE__ */ g({
7358
7362
  return this._localAddress;
7359
7363
  }
7360
7364
  bind(...e) {
7361
- let t = Pi(...e), n = this._type === "udp6" ? "::" : "0.0.0.0", r = this.__webvpn_udp_socket_init__(f("a udp socket").then((e) => e.cloud.webvpn.udpSocket({
7365
+ let t = Pi(...e), n = this._type === "udp6" ? "::" : "0.0.0.0", r = this.__webvpn_udp_socket_init__(d("a udp socket").then((e) => e.cloud.webvpn.udpSocket({
7362
7366
  type: this._type,
7363
7367
  address: t.address ?? n,
7364
7368
  port: t.port,
@@ -8153,7 +8157,7 @@ var Bo = /* @__PURE__ */ g({
8153
8157
  request: cs,
8154
8158
  get: ls
8155
8159
  }, fs = async () => {
8156
- let e = () => f("frame consent");
8160
+ let e = () => d("frame consent");
8157
8161
  try {
8158
8162
  let t = await e();
8159
8163
  return {
@@ -8161,7 +8165,7 @@ var Bo = /* @__PURE__ */ g({
8161
8165
  ensure: t.frameConsent.ensure
8162
8166
  };
8163
8167
  } catch (t) {
8164
- if (!(t instanceof d)) throw t;
8168
+ if (!(t instanceof u)) throw t;
8165
8169
  return {
8166
8170
  request: void 0,
8167
8171
  ensure: (t) => e().then((e) => e.frameConsent.ensure(t))
@@ -8318,19 +8322,19 @@ var Bo = /* @__PURE__ */ g({
8318
8322
  }
8319
8323
  let s = o?.href ?? "";
8320
8324
  s && Sn(s);
8321
- let c = s, l = Os(n), d = z(t), f = /* @__PURE__ */ new Set();
8325
+ let c = s, l = Os(n), u = z(t), d = /* @__PURE__ */ new Set();
8322
8326
  try {
8323
- f.add(new URL(s).origin);
8327
+ d.add(new URL(s).origin);
8324
8328
  } catch {}
8325
8329
  let p = new AbortController(), m = e.referrerPolicy, h = e.allow, g = crypto.randomUUID();
8326
8330
  if (e.referrerPolicy = "origin", e.allow = Ns(bs, e.allow), e.src = ks({
8327
8331
  target: s,
8328
8332
  session: l,
8329
- domains: d,
8333
+ domains: u,
8330
8334
  attach: g
8331
8335
  }), !e.contentWindow) throw Error("cloud.attachFrame: the iframe window is not available");
8332
8336
  try {
8333
- let t = await As(u({}, {
8337
+ let t = await As(f({}, {
8334
8338
  key: "fkn-attach-frame",
8335
8339
  origin: Es(),
8336
8340
  transport: {
@@ -8344,11 +8348,11 @@ var Bo = /* @__PURE__ */ g({
8344
8348
  let n = In("attached frame");
8345
8349
  p.signal.aborted ? n() : p.signal.addEventListener("abort", n, { once: !0 });
8346
8350
  let r = e.contentWindow, a = () => {
8347
- if (!(!p.signal.aborted && e.isConnected && e.contentWindow === r)) throw p.abort(), Ms();
8351
+ if (p.signal.aborted || !e.isConnected || e.contentWindow !== r) throw p.abort(), Ms();
8348
8352
  }, { gate: o, requestCategories: m } = vs({
8349
8353
  session: l,
8350
- declaredHosts: d,
8351
- approvedOrigins: f,
8354
+ declaredHosts: u,
8355
+ approvedOrigins: d,
8352
8356
  attach: g,
8353
8357
  assertLive: a,
8354
8358
  documentHost: typeof t.documentHost == "function" ? () => t.documentHost() : void 0,
@@ -8370,12 +8374,12 @@ var Bo = /* @__PURE__ */ g({
8370
8374
  } catch {
8371
8375
  return "";
8372
8376
  }
8373
- })(), l = s !== "" && !f.has(s);
8374
- l && f.add(s);
8377
+ })(), l = s !== "" && !d.has(s);
8378
+ l && d.add(s);
8375
8379
  try {
8376
8380
  await As(t.goto(i, r), (o ?? Cs) + ws, "cloud.attachFrame: the render proxy did not answer goto; the frame may have been detached or its page reloaded");
8377
8381
  } catch (e) {
8378
- throw l && f.delete(s), e;
8382
+ throw l && d.delete(s), e;
8379
8383
  }
8380
8384
  c = i, Fs(e);
8381
8385
  },
@@ -8420,6 +8424,8 @@ var Bo = /* @__PURE__ */ g({
8420
8424
  Be(() => (Hs ||= Vs().then(() => void 0).finally(() => {
8421
8425
  Hs = null;
8422
8426
  }), Hs));
8427
+ //#endregion
8428
+ //#region node_modules/@fkn/lib/opfs-D0goLAQW.js
8423
8429
  var Us = /* @__PURE__ */ g({
8424
8430
  available: () => qs,
8425
8431
  list: () => Zs,
@@ -8527,7 +8533,7 @@ var xc = () => Object.keys(dc()).length > 0 || Object.keys(mc()).length > 0, Sc
8527
8533
  }).finally(() => {
8528
8534
  bc = null;
8529
8535
  }));
8530
- }, Oc = null, kc = () => Oc ??= import("./lib-api-Bi9f-0mj.js").then((e) => e.apiPromise), Ac = async () => {
8536
+ }, Oc = null, kc = () => Oc ??= import("./lib-api-MaBk5T3E.js").then((e) => e.apiPromise), Ac = async () => {
8531
8537
  Zc();
8532
8538
  let e = await tc(), t = e === "connected", [n, r] = await Promise.all([ec().then((e) => e ? Zs() : []).catch(() => []), t ? ei().then((e) => ({
8533
8539
  ok: !0,
@@ -8765,13 +8771,13 @@ var xc = () => Object.keys(dc()).length > 0 || Object.keys(mc()).length > 0, Sc
8765
8771
  };
8766
8772
  qc = () => {
8767
8773
  i.cloud.fs.setAdoptSource(o, a).catch(() => {});
8768
- }, Jc || (Jc = !0, import("./lib-api-Bi9f-0mj.js").then((e) => e.onApiEpoch((e, t) => {
8774
+ }, Jc || (Jc = !0, import("./lib-api-MaBk5T3E.js").then((e) => e.onApiEpoch((e, t) => {
8769
8775
  t > 1 && qc?.();
8770
8776
  })).catch(() => {})), await i.cloud.fs.setAdoptSource(o, a);
8771
8777
  }, Xc = !1, Zc = () => {
8772
8778
  Xc || typeof window > "u" || (Xc = !0, window.addEventListener("online", () => {
8773
8779
  Dc();
8774
- }), import("./lib-account-cGGxEwWz.js").then((e) => e.onChange(() => {
8780
+ }), import("./lib-account-zcRp2Stn.js").then((e) => e.onChange(() => {
8775
8781
  Kc().catch(() => {}), Dc();
8776
8782
  })).catch(() => {}));
8777
8783
  }, Qc = Vr(Qs, { memfs: !0 }), { available: $c, readFileSync: el, writeFileSync: tl, appendFileSync: nl, existsSync: rl, statSync: il, lstatSync: al, readdirSync: ol, mkdirSync: sl, rmSync: cl, rmdirSync: ll, unlinkSync: ul, renameSync: dl, readFile: fl, writeFile: pl, appendFile: ml, stat: hl, readdir: gl, mkdir: _l, rm: vl, unlink: yl, rename: bl, exists: xl, promises: Sl, mount: Cl, flush: wl, remount: Tl } = Qc;
@@ -8793,7 +8799,7 @@ var { available: El, readFileSync: Dl, writeFileSync: Ol, appendFileSync: kl, ex
8793
8799
  }), eu = "fkn-packages-connection", tu = 3e4, Q = (e, t) => Object.assign(Error(t), { code: e }), nu = async () => {
8794
8800
  if (!i) throw Q("unavailable", "packages: no FKN transport in this realm - use relayWorker to bridge workers");
8795
8801
  return c;
8796
- }, ru = (e, t, n) => u(e ?? {}, {
8802
+ }, ru = (e, t, n) => f(e ?? {}, {
8797
8803
  transport: t,
8798
8804
  key: eu,
8799
8805
  unregisterSignal: n
@@ -8933,31 +8939,31 @@ var gu = async (e, t) => {
8933
8939
  ...t.path === void 0 ? {} : { path: t.path }
8934
8940
  });
8935
8941
  if ("error" in n) throw Q(n.error, n.message);
8936
- let r = In("package connection"), i = a()?.epoch ?? 0, o = m((e, t) => {
8937
- t !== i && (r(), o());
8942
+ let r = In("package connection"), i = p()?.epoch ?? 0, a = m((e, t) => {
8943
+ t !== i && (r(), a());
8938
8944
  });
8939
8945
  Promise.resolve(n.closed).then(() => {
8940
- r(), o();
8946
+ r(), a();
8941
8947
  }, () => {
8942
- r(), o();
8948
+ r(), a();
8943
8949
  });
8944
- let { port: s, closed: c } = n;
8950
+ let { port: o, closed: s } = n;
8945
8951
  if (t.raw) return {
8946
- closed: c,
8947
- port: s
8952
+ closed: s,
8953
+ port: o
8948
8954
  };
8949
- let l = await iu(t.payload, s, {
8955
+ let c = await iu(t.payload, o, {
8950
8956
  signal: t.signal,
8951
- closed: c
8957
+ closed: s
8952
8958
  });
8953
8959
  return t.signal && t.signal.addEventListener("abort", () => {
8954
8960
  try {
8955
- s.postMessage({ type: "fkn-packages-disconnect" });
8961
+ o.postMessage({ type: "fkn-packages-disconnect" });
8956
8962
  } catch {}
8957
8963
  }, { once: !0 }), {
8958
- remote: l,
8959
- closed: c,
8960
- port: s
8964
+ remote: c,
8965
+ closed: s,
8966
+ port: o
8961
8967
  };
8962
8968
  }), bu = ["allow-scripts", "allow-same-origin"], xu = (e) => {
8963
8969
  let t = e.getAttribute("sandbox");
@@ -9160,7 +9166,7 @@ var gu = async (e, t) => {
9160
9166
  maxMessageBytes: 262144
9161
9167
  }, Gu = async () => {
9162
9168
  if (!i) return;
9163
- let e = (await f("a room").catch(() => void 0))?.rooms;
9169
+ let e = (await d("a room").catch(() => void 0))?.rooms;
9164
9170
  return typeof e?.open == "function" ? e : void 0;
9165
9171
  }, Ku = () => {
9166
9172
  throw $("unavailable", Hu.unavailable);
@@ -9294,82 +9300,84 @@ var gu = async (e, t) => {
9294
9300
  let i = await r.join(e, t).catch(Ku);
9295
9301
  if ("error" in i) throw $(i.error, i.message);
9296
9302
  return Ju(i);
9297
- }, $u = () => "https://fkn.app/connect-button", ed = /* @__PURE__ */ new Set(), td = () => {
9298
- if (ed.size === 0) return !1;
9299
- for (let e of [...ed]) try {
9303
+ }, $u = /* @__PURE__ */ new Set(), ed = () => {
9304
+ if ($u.size === 0) return !1;
9305
+ for (let e of [...$u]) try {
9300
9306
  e();
9301
9307
  } catch {}
9302
9308
  return !0;
9303
- }, nd = (e, t) => {
9309
+ }, td = (e, t) => {
9304
9310
  if (typeof e?.onUpdateTaken == "function") return Promise.resolve(e.onUpdateTaken(t));
9305
- }, rd = /* @__PURE__ */ new Set(), id = () => {
9306
- for (let e of [...rd]) try {
9311
+ }, nd = /* @__PURE__ */ new Set(), rd = () => {
9312
+ for (let e of [...nd]) try {
9307
9313
  e();
9308
9314
  } catch {}
9309
- }, ad = 0;
9315
+ }, id = 0;
9310
9316
  typeof window < "u" && m(() => {
9311
- let e = a();
9312
- !e || rd.size === 0 || ad === e.epoch || (ad = e.epoch, Promise.resolve(e.remote.shell?.onUpdate(id)).catch(() => {
9313
- ad === e.epoch && (ad = 0);
9317
+ let e = p();
9318
+ !e || nd.size === 0 || id === e.epoch || (id = e.epoch, Promise.resolve(e.remote.shell?.onUpdate(rd)).catch(() => {
9319
+ id === e.epoch && (id = 0);
9314
9320
  }));
9315
9321
  });
9316
- var od = 0, sd = !1, cd = () => {
9317
- if (!td() && !sd) {
9318
- sd = !0;
9322
+ var ad = 0, od = !1, sd = () => {
9323
+ if (!ed() && !od) {
9324
+ od = !0;
9319
9325
  try {
9320
9326
  location.reload();
9321
9327
  } catch {}
9322
9328
  }
9323
9329
  };
9324
9330
  typeof window < "u" && m(() => {
9325
- let e = a();
9326
- if (!e || od === e.epoch) return;
9327
- od = e.epoch;
9328
- let t = nd(e.remote.shell, cd);
9331
+ let e = p();
9332
+ if (!e || ad === e.epoch) return;
9333
+ ad = e.epoch;
9334
+ let t = td(e.remote.shell, sd);
9329
9335
  if (!t) {
9330
- od = 0;
9336
+ ad = 0;
9331
9337
  return;
9332
9338
  }
9333
9339
  t.catch(() => {
9334
- od === e.epoch && (od = 0);
9340
+ ad === e.epoch && (ad = 0);
9335
9341
  });
9336
9342
  });
9337
- var ld = (e, t) => zs.fetch(e, t), ud = "banou26/stub", dd = "season-seed", fd = (e) => `https://github.com/${ud}/releases/download/${dd}/${e}`, pd = (e) => e.startsWith(fd("")), md = "export", hd = "store", gd = "answers", _d = (e, t, n) => {
9343
+ //#endregion
9344
+ //#region src/utils/fetch.ts
9345
+ var cd = (e, t) => zs.fetch(e, t), ld = "banou26/stub", ud = "season-seed", dd = (e) => `https://github.com/${ld}/releases/download/${ud}/${e}`, fd = (e) => e.startsWith(dd("")), pd = "export", md = "store", hd = "answers", gd = (e, t, n) => {
9338
9346
  try {
9339
- return new URL(e, n).searchParams.getAll(md).includes(t);
9347
+ return new URL(e, n).searchParams.getAll(pd).includes(t);
9340
9348
  } catch {
9341
9349
  return !1;
9342
9350
  }
9343
- }, vd = (e, t) => _d(e, hd, t), yd = (e, t) => _d(e, gd, t), bd = "query", xd = (e, t) => _d(e, bd, t), Sd = "store", Cd = "legacy", wd = (e, t) => {
9351
+ }, _d = (e, t) => gd(e, md, t), vd = (e, t) => gd(e, hd, t), yd = "query", bd = (e, t) => gd(e, yd, t), xd = "store", Sd = "legacy", Cd = (e, t) => {
9344
9352
  try {
9345
- return new URL(e, t).searchParams.get(Sd) === Cd;
9353
+ return new URL(e, t).searchParams.get(xd) === Sd;
9346
9354
  } catch {
9347
9355
  return !1;
9348
9356
  }
9349
- }, Td = "trace", Ed = (e, t) => {
9357
+ }, wd = "trace", Td = (e, t) => {
9350
9358
  try {
9351
- return new URL(e, t).searchParams.getAll(Td).includes("1");
9359
+ return new URL(e, t).searchParams.getAll(wd).includes("1");
9352
9360
  } catch {
9353
9361
  return !1;
9354
9362
  }
9355
- }, Dd = "seed", Od = (e, t) => {
9363
+ }, Ed = "seed", Dd = (e, t) => {
9356
9364
  try {
9357
- return new URL(e, t).searchParams.getAll(Dd).includes("off");
9365
+ return new URL(e, t).searchParams.getAll(Ed).includes("off");
9358
9366
  } catch {
9359
9367
  return !1;
9360
9368
  }
9361
- }, kd = (e) => typeof e == "string" ? e : e instanceof URL ? e.href : e.url, Ad = (e, t) => Od(e) && pd(kd(t)), jd = new _();
9362
- u({ fetch: (e, t) => Ad(location.href, e) ? new Response(null, {
9369
+ }, Od = (e) => typeof e == "string" ? e : e instanceof URL ? e.href : e.url, kd = (e, t) => Dd(e) && fd(Od(t)), Ad = new _();
9370
+ f({ fetch: (e, t) => kd(location.href, e) ? new Response(null, {
9363
9371
  status: 404,
9364
9372
  statusText: "the season seed is switched off for this page"
9365
- }) : ld(e, t) }, {
9366
- transport: jd,
9373
+ }) : cd(e, t) }, {
9374
+ transport: Ad,
9367
9375
  key: "fetch"
9368
9376
  });
9369
- var { handleRequest: Md, setUserKeys: Nd, registerRemoteSource: Pd, unregisterRemoteSource: Fd, remotePicker: Id, remotePlayer: Ld, selectRemoteRelease: Rd, exportStore: zd, exportAnswers: Bd, exportAsks: Vd, graphCounts: Hd, traceGraph: Ud, traceAnswer: Wd, setGraphEnabled: Gd, setReadStore: Kd } = await u({}, {
9370
- transport: jd,
9377
+ var { handleRequest: jd, setUserKeys: Md, registerRemoteSource: Nd, unregisterRemoteSource: Pd, remotePicker: Fd, remotePlayer: Id, selectRemoteRelease: Ld, exportStore: Rd, exportAnswers: zd, exportAsks: Bd, graphCounts: Vd, traceGraph: Hd, traceAnswer: Ud, setGraphEnabled: Wd, setReadStore: Gd } = await f({}, {
9378
+ transport: Ad,
9371
9379
  key: "yoga"
9372
- }), qd = new URLSearchParams(location.search);
9373
- wd(location.href) ? Gd(qd.has("graph")) : await Kd("graph");
9380
+ }), Kd = new URLSearchParams(location.search);
9381
+ Cd(location.href) ? Wd(Kd.has("graph")) : await Gd("graph");
9374
9382
  //#endregion
9375
- export { Ed as _, Md as a, $l as b, Ld as c, Wd as d, Ud as f, xd as g, vd as h, Hd as i, Rd as l, yd as m, Vd as n, Pd as o, Fd as p, zd as r, Id as s, Bd as t, Nd as u, $u as v, Vu as y };
9383
+ export { Td as _, jd as a, Id as c, Ud as d, Hd as f, bd as g, _d as h, Vd as i, Ld as l, vd as m, Bd as n, Nd as o, Pd as p, Rd as r, Fd as s, zd as t, Md as u, Vu as v, $l as y };