@canton-network/core-wallet-ui-components 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -77,7 +77,7 @@ const { is: Bo, defineProperty: Fo, getOwnPropertyDescriptor: Go, getOwnProperty
77
77
  }
78
78
  }
79
79
  return o;
80
- } }, ir = (t, r) => !Bo(t, r), kr = { attribute: !0, type: String, converter: Zt, reflect: !1, useDefault: !1, hasChanged: ir };
80
+ } }, nr = (t, r) => !Bo(t, r), kr = { attribute: !0, type: String, converter: Zt, reflect: !1, useDefault: !1, hasChanged: nr };
81
81
  Symbol.metadata ?? (Symbol.metadata = Symbol("metadata")), R.litPropertyMetadata ?? (R.litPropertyMetadata = /* @__PURE__ */ new WeakMap());
82
82
  class et extends HTMLElement {
83
83
  static addInitializer(r) {
@@ -93,14 +93,14 @@ class et extends HTMLElement {
93
93
  }
94
94
  }
95
95
  static getPropertyDescriptor(r, o, e) {
96
- const { get: a, set: i } = Go(this.prototype, r) ?? { get() {
96
+ const { get: a, set: n } = Go(this.prototype, r) ?? { get() {
97
97
  return this[o];
98
- }, set(n) {
99
- this[o] = n;
98
+ }, set(i) {
99
+ this[o] = i;
100
100
  } };
101
- return { get: a, set(n) {
101
+ return { get: a, set(i) {
102
102
  const s = a == null ? void 0 : a.call(this);
103
- i == null || i.call(this, n), this.requestUpdate(r, s, e);
103
+ n == null || n.call(this, i), this.requestUpdate(r, s, e);
104
104
  }, configurable: !0, enumerable: !0 };
105
105
  }
106
106
  static getPropertyOptions(r) {
@@ -185,34 +185,34 @@ class et extends HTMLElement {
185
185
  this._$AK(r, e);
186
186
  }
187
187
  _$ET(r, o) {
188
- var i;
188
+ var n;
189
189
  const e = this.constructor.elementProperties.get(r), a = this.constructor._$Eu(r, e);
190
190
  if (a !== void 0 && e.reflect === !0) {
191
- const n = (((i = e.converter) == null ? void 0 : i.toAttribute) !== void 0 ? e.converter : Zt).toAttribute(o, e.type);
192
- this._$Em = r, n == null ? this.removeAttribute(a) : this.setAttribute(a, n), this._$Em = null;
191
+ const i = (((n = e.converter) == null ? void 0 : n.toAttribute) !== void 0 ? e.converter : Zt).toAttribute(o, e.type);
192
+ this._$Em = r, i == null ? this.removeAttribute(a) : this.setAttribute(a, i), this._$Em = null;
193
193
  }
194
194
  }
195
195
  _$AK(r, o) {
196
- var i, n;
196
+ var n, i;
197
197
  const e = this.constructor, a = e._$Eh.get(r);
198
198
  if (a !== void 0 && this._$Em !== a) {
199
- const s = e.getPropertyOptions(a), l = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((i = s.converter) == null ? void 0 : i.fromAttribute) !== void 0 ? s.converter : Zt;
199
+ const s = e.getPropertyOptions(a), l = typeof s.converter == "function" ? { fromAttribute: s.converter } : ((n = s.converter) == null ? void 0 : n.fromAttribute) !== void 0 ? s.converter : Zt;
200
200
  this._$Em = a;
201
201
  const c = l.fromAttribute(o, s.type);
202
- this[a] = c ?? ((n = this._$Ej) == null ? void 0 : n.get(a)) ?? c, this._$Em = null;
202
+ this[a] = c ?? ((i = this._$Ej) == null ? void 0 : i.get(a)) ?? c, this._$Em = null;
203
203
  }
204
204
  }
205
205
  requestUpdate(r, o, e) {
206
206
  var a;
207
207
  if (r !== void 0) {
208
- const i = this.constructor, n = this[r];
209
- if (e ?? (e = i.getPropertyOptions(r)), !((e.hasChanged ?? ir)(n, o) || e.useDefault && e.reflect && n === ((a = this._$Ej) == null ? void 0 : a.get(r)) && !this.hasAttribute(i._$Eu(r, e)))) return;
208
+ const n = this.constructor, i = this[r];
209
+ if (e ?? (e = n.getPropertyOptions(r)), !((e.hasChanged ?? nr)(i, o) || e.useDefault && e.reflect && i === ((a = this._$Ej) == null ? void 0 : a.get(r)) && !this.hasAttribute(n._$Eu(r, e)))) return;
210
210
  this.C(r, o, e);
211
211
  }
212
212
  this.isUpdatePending === !1 && (this._$ES = this._$EP());
213
213
  }
214
- C(r, o, { useDefault: e, reflect: a, wrapped: i }, n) {
215
- e && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(r) && (this._$Ej.set(r, n ?? o ?? this[r]), i !== !0 || n !== void 0) || (this._$AL.has(r) || (this.hasUpdated || e || (o = void 0), this._$AL.set(r, o)), a === !0 && this._$Em !== r && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(r));
214
+ C(r, o, { useDefault: e, reflect: a, wrapped: n }, i) {
215
+ e && !(this._$Ej ?? (this._$Ej = /* @__PURE__ */ new Map())).has(r) && (this._$Ej.set(r, i ?? o ?? this[r]), n !== !0 || i !== void 0) || (this._$AL.has(r) || (this.hasUpdated || e || (o = void 0), this._$AL.set(r, o)), a === !0 && this._$Em !== r && (this._$Eq ?? (this._$Eq = /* @__PURE__ */ new Set())).add(r));
216
216
  }
217
217
  async _$EP() {
218
218
  this.isUpdatePending = !0;
@@ -232,21 +232,21 @@ class et extends HTMLElement {
232
232
  if (!this.isUpdatePending) return;
233
233
  if (!this.hasUpdated) {
234
234
  if (this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this._$Ep) {
235
- for (const [i, n] of this._$Ep) this[i] = n;
235
+ for (const [n, i] of this._$Ep) this[n] = i;
236
236
  this._$Ep = void 0;
237
237
  }
238
238
  const a = this.constructor.elementProperties;
239
- if (a.size > 0) for (const [i, n] of a) {
240
- const { wrapped: s } = n, l = this[i];
241
- s !== !0 || this._$AL.has(i) || l === void 0 || this.C(i, void 0, n, l);
239
+ if (a.size > 0) for (const [n, i] of a) {
240
+ const { wrapped: s } = i, l = this[n];
241
+ s !== !0 || this._$AL.has(n) || l === void 0 || this.C(n, void 0, i, l);
242
242
  }
243
243
  }
244
244
  let r = !1;
245
245
  const o = this._$AL;
246
246
  try {
247
247
  r = this.shouldUpdate(o), r ? (this.willUpdate(o), (e = this._$EO) == null || e.forEach(((a) => {
248
- var i;
249
- return (i = a.hostUpdate) == null ? void 0 : i.call(a);
248
+ var n;
249
+ return (n = a.hostUpdate) == null ? void 0 : n.call(a);
250
250
  })), this.update(o)) : this._$EM();
251
251
  } catch (a) {
252
252
  throw r = !1, this._$EM(), a;
@@ -288,31 +288,31 @@ et.elementStyles = [], et.shadowRootOptions = { mode: "open" }, et[at("elementPr
288
288
  * Copyright 2017 Google LLC
289
289
  * SPDX-License-Identifier: BSD-3-Clause
290
290
  */
291
- const Ko = { attribute: !0, type: String, converter: Zt, reflect: !1, hasChanged: ir }, Jo = (t = Ko, r, o) => {
291
+ const Ko = { attribute: !0, type: String, converter: Zt, reflect: !1, hasChanged: nr }, Jo = (t = Ko, r, o) => {
292
292
  const { kind: e, metadata: a } = o;
293
- let i = globalThis.litPropertyMetadata.get(a);
294
- if (i === void 0 && globalThis.litPropertyMetadata.set(a, i = /* @__PURE__ */ new Map()), e === "setter" && ((t = Object.create(t)).wrapped = !0), i.set(o.name, t), e === "accessor") {
295
- const { name: n } = o;
293
+ let n = globalThis.litPropertyMetadata.get(a);
294
+ if (n === void 0 && globalThis.litPropertyMetadata.set(a, n = /* @__PURE__ */ new Map()), e === "setter" && ((t = Object.create(t)).wrapped = !0), n.set(o.name, t), e === "accessor") {
295
+ const { name: i } = o;
296
296
  return { set(s) {
297
297
  const l = r.get.call(this);
298
- r.set.call(this, s), this.requestUpdate(n, l, t);
298
+ r.set.call(this, s), this.requestUpdate(i, l, t);
299
299
  }, init(s) {
300
- return s !== void 0 && this.C(n, void 0, t, s), s;
300
+ return s !== void 0 && this.C(i, void 0, t, s), s;
301
301
  } };
302
302
  }
303
303
  if (e === "setter") {
304
- const { name: n } = o;
304
+ const { name: i } = o;
305
305
  return function(s) {
306
- const l = this[n];
307
- r.call(this, s), this.requestUpdate(n, l, t);
306
+ const l = this[i];
307
+ r.call(this, s), this.requestUpdate(i, l, t);
308
308
  };
309
309
  }
310
310
  throw Error("Unsupported decorator location: " + e);
311
311
  };
312
312
  function y(t) {
313
- return (r, o) => typeof o == "object" ? Jo(t, r, o) : ((e, a, i) => {
314
- const n = a.hasOwnProperty(i);
315
- return a.constructor.createProperty(i, e), n ? Object.getOwnPropertyDescriptor(a, i) : void 0;
313
+ return (r, o) => typeof o == "object" ? Jo(t, r, o) : ((e, a, n) => {
314
+ const i = a.hasOwnProperty(n);
315
+ return a.constructor.createProperty(n, e), i ? Object.getOwnPropertyDescriptor(a, n) : void 0;
316
316
  })(t, r, o);
317
317
  }
318
318
  /**
@@ -357,10 +357,15 @@ hr.styles = [
357
357
  ];
358
358
  let f = hr;
359
359
  var te = Object.defineProperty, re = Object.getOwnPropertyDescriptor, Lt = (t, r, o, e) => {
360
- for (var a = e > 1 ? void 0 : e ? re(r, o) : r, i = t.length - 1, n; i >= 0; i--)
361
- (n = t[i]) && (a = (e ? n(r, o, a) : n(a)) || a);
360
+ for (var a = e > 1 ? void 0 : e ? re(r, o) : r, n = t.length - 1, i; n >= 0; n--)
361
+ (i = t[n]) && (a = (e ? i(r, o, a) : i(a)) || a);
362
362
  return e && a && te(r, o, a), a;
363
363
  };
364
+ class oe extends Event {
365
+ constructor() {
366
+ super("logout", { bubbles: !0, composed: !0 });
367
+ }
368
+ }
364
369
  let J = class extends f {
365
370
  constructor() {
366
371
  super(...arguments), this.iconSrc = "images/icon.png", this.menuOpen = !1, this.darkMode = localStorage.getItem("theme") === "dark";
@@ -381,8 +386,12 @@ let J = class extends f {
381
386
  window.location.href = t;
382
387
  }
383
388
  /** TODO: abstract this -- the component library might be used in a desktop Electron app */
384
- logout() {
385
- localStorage.clear(), window.name === "wallet-popup" && window.opener && !window.opener.closed ? window.close() : window.location.href = "/login";
389
+ async logout() {
390
+ try {
391
+ console.log("Logging out..."), this.dispatchEvent(new oe());
392
+ } catch (t) {
393
+ console.error("Error during logout:", t);
394
+ }
386
395
  }
387
396
  render() {
388
397
  return g`
@@ -572,12 +581,12 @@ Lt([
572
581
  J = Lt([
573
582
  S("app-header")
574
583
  ], J);
575
- var oe = Object.defineProperty, ee = Object.getOwnPropertyDescriptor, nr = (t, r, o, e) => {
576
- for (var a = e > 1 ? void 0 : e ? ee(r, o) : r, i = t.length - 1, n; i >= 0; i--)
577
- (n = t[i]) && (a = (e ? n(r, o, a) : n(a)) || a);
578
- return e && a && oe(r, o, a), a;
584
+ var ee = Object.defineProperty, ae = Object.getOwnPropertyDescriptor, ir = (t, r, o, e) => {
585
+ for (var a = e > 1 ? void 0 : e ? ae(r, o) : r, n = t.length - 1, i; n >= 0; n--)
586
+ (i = t[n]) && (a = (e ? i(r, o, a) : i(a)) || a);
587
+ return e && a && ee(r, o, a), a;
579
588
  };
580
- let nt = class extends f {
589
+ let it = class extends f {
581
590
  constructor() {
582
591
  super(...arguments), this.iconSrc = "/images/icon.png", this.customThemeCss = null;
583
592
  }
@@ -614,20 +623,20 @@ let nt = class extends f {
614
623
  `;
615
624
  }
616
625
  };
617
- nt.styles = [f.styles];
618
- nr([
626
+ it.styles = [f.styles];
627
+ ir([
619
628
  y({ type: String })
620
- ], nt.prototype, "iconSrc", 2);
621
- nr([
629
+ ], it.prototype, "iconSrc", 2);
630
+ ir([
622
631
  y({ type: String })
623
- ], nt.prototype, "themeSrc", 2);
624
- nt = nr([
632
+ ], it.prototype, "themeSrc", 2);
633
+ it = ir([
625
634
  S("app-layout")
626
- ], nt);
627
- var ae = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, rt = (t, r, o, e) => {
628
- for (var a = e > 1 ? void 0 : e ? ie(r, o) : r, i = t.length - 1, n; i >= 0; i--)
629
- (n = t[i]) && (a = (e ? n(r, o, a) : n(a)) || a);
630
- return e && a && ae(r, o, a), a;
635
+ ], it);
636
+ var ne = Object.defineProperty, ie = Object.getOwnPropertyDescriptor, rt = (t, r, o, e) => {
637
+ for (var a = e > 1 ? void 0 : e ? ie(r, o) : r, n = t.length - 1, i; n >= 0; n--)
638
+ (i = t[n]) && (a = (e ? i(r, o, a) : i(a)) || a);
639
+ return e && a && ne(r, o, a), a;
631
640
  };
632
641
  let U = class extends f {
633
642
  constructor() {
@@ -779,7 +788,7 @@ U = rt([
779
788
  function Wr(t) {
780
789
  return Array.isArray(t) ? t.reduce((r, o) => r + Wr(o), "") : t instanceof Mo ? t.cssText : "";
781
790
  }
782
- const ne = Wr([
791
+ const se = Wr([
783
792
  f.styles,
784
793
  I`
785
794
  * {
@@ -840,11 +849,11 @@ const ne = Wr([
840
849
  bottom: 100%;
841
850
  }
842
851
  `
843
- ]), it = class it extends HTMLElement {
852
+ ]), nt = class nt extends HTMLElement {
844
853
  constructor() {
845
854
  super(), this.selectedTabId = "tab-1", this.attachShadow({ mode: "open" });
846
855
  const r = document.createElement("style");
847
- r.textContent = it.styles, this.root = document.createElement("div"), this.root.id = "discovery-root", this.shadowRoot && (this.shadowRoot.appendChild(r), this.shadowRoot.appendChild(this.root)), window.opener && (window.opener.postMessage({ type: "SPLICE_WALLET_EXT_READY" }, "*"), window.opener.addEventListener(
856
+ r.textContent = nt.styles, this.root = document.createElement("div"), this.root.id = "discovery-root", this.shadowRoot && (this.shadowRoot.appendChild(r), this.shadowRoot.appendChild(this.root)), window.opener && (window.opener.postMessage({ type: "SPLICE_WALLET_EXT_READY" }, "*"), window.opener.addEventListener(
848
857
  "message",
849
858
  (o) => {
850
859
  o.data.type === "SPLICE_WALLET_EXT_ACK" && this.setAttribute("wallet-extension-loaded", "");
@@ -896,10 +905,10 @@ const ne = Wr([
896
905
  "data-tooltip": r.rpcUrl
897
906
  }), a = this.mkElement("div", "", {
898
907
  class: "kernel-content d-flex"
899
- }), i = this.mkElement("span", r.name, {
908
+ }), n = this.mkElement("span", r.name, {
900
909
  class: "kernel-name"
901
- }), n = this.mkElement("span", "(logo)");
902
- return a.append(i, n), o.appendChild(a), e.addEventListener("click", () => {
910
+ }), i = this.mkElement("span", "(logo)");
911
+ return a.append(n, i), o.appendChild(a), e.addEventListener("click", () => {
903
912
  this.selectKernel({
904
913
  url: r.rpcUrl,
905
914
  walletType: r.walletType
@@ -911,22 +920,22 @@ const ne = Wr([
911
920
  }
912
921
  mkElement(r, o, e = {}) {
913
922
  const a = document.createElement(r);
914
- return o && (a.innerText = o), Object.entries(e).forEach(([i, n]) => {
915
- a.setAttribute(i, n);
923
+ return o && (a.innerText = o), Object.entries(e).forEach(([n, i]) => {
924
+ a.setAttribute(n, i);
916
925
  }), a;
917
926
  }
918
927
  render() {
919
928
  var l;
920
- const r = this.mkElement("div", "", { class: "root" }), o = this.mkElement("div", "", { class: "wrapper" }), e = this.mkElement("h3", "Connect to a Wallet Gateway"), a = this.mkElement("div", "", { class: "card" }), i = this.mkElement("div", "", { class: "card-header" }), n = this.mkElement("ul", "", {
929
+ const r = this.mkElement("div", "", { class: "root" }), o = this.mkElement("div", "", { class: "wrapper" }), e = this.mkElement("h3", "Connect to a Wallet Gateway"), a = this.mkElement("div", "", { class: "card" }), n = this.mkElement("div", "", { class: "card-header" }), i = this.mkElement("ul", "", {
921
930
  class: "nav nav-tabs card-header-tabs"
922
931
  });
923
932
  for (const c of this.tabs()) {
924
933
  const p = this.mkElement("li", "", { class: "nav-item" }), u = this.mkElement("a", c.label, { class: "nav-link" });
925
934
  c.id === this.selectedTabId && u.classList.add("active"), u.addEventListener("click", (h) => {
926
935
  h.preventDefault(), this.selectedTabId = c.id, this.render();
927
- }), p.appendChild(u), n.appendChild(p);
936
+ }), p.appendChild(u), i.appendChild(p);
928
937
  }
929
- i.appendChild(n);
938
+ n.appendChild(i);
930
939
  const s = this.mkElement("div", "", { class: "card-body" });
931
940
  if (this.selectedTabId === "tab-1") {
932
941
  if (this.walletExtensionLoaded) {
@@ -958,7 +967,7 @@ const ne = Wr([
958
967
  console.log("Connecting to Wallet Gateway..." + h), this.selectKernel({ url: h, walletType: "remote" });
959
968
  }), c.append(p, u), s.appendChild(c);
960
969
  }
961
- a.append(i, s), o.append(e, a), r.appendChild(o), this.shadowRoot && (Array.from(this.shadowRoot.childNodes).forEach((c) => {
970
+ a.append(n, s), o.append(e, a), r.appendChild(o), this.shadowRoot && (Array.from(this.shadowRoot.childNodes).forEach((c) => {
962
971
  c instanceof HTMLStyleElement || this.shadowRoot.removeChild(c);
963
972
  }), this.shadowRoot.appendChild(r));
964
973
  }
@@ -969,10 +978,10 @@ const ne = Wr([
969
978
  this.render();
970
979
  }
971
980
  };
972
- it.observedAttributes = ["wallet-extension-loaded"], it.styles = ne;
973
- let It = it;
981
+ nt.observedAttributes = ["wallet-extension-loaded"], nt.styles = se;
982
+ let It = nt;
974
983
  customElements.define("swk-discovery", It);
975
- const se = g`
984
+ const le = g`
976
985
  <svg
977
986
  xmlns="http://www.w3.org/2000/svg"
978
987
  width="16"
@@ -986,7 +995,7 @@ const se = g`
986
995
  d="M0 8s3-5.5 8-5.5S16 8 16 8s-3 5.5-8 5.5S0 8 0 8m8 3.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7"
987
996
  />
988
997
  </svg>
989
- `, le = g`
998
+ `, de = g`
990
999
  <svg
991
1000
  xmlns="http://www.w3.org/2000/svg"
992
1001
  width="16"
@@ -1005,7 +1014,7 @@ const se = g`
1005
1014
  d="M3.35 5.47q-.27.24-.518.487A13 13 0 0 0 1.172 8l.195.288c.335.48.83 1.12 1.465 1.755C4.121 11.332 5.881 12.5 8 12.5c.716 0 1.39-.133 2.02-.36l.77.772A7 7 0 0 1 8 13.5C3 13.5 0 8 0 8s.939-1.721 2.641-3.238l.708.709zm10.296 8.884-12-12 .708-.708 12 12z"
1006
1015
  />
1007
1016
  </svg>
1008
- `, de = g` <svg
1017
+ `, ce = g` <svg
1009
1018
  xmlns="http://www.w3.org/2000/svg"
1010
1019
  width="16"
1011
1020
  height="16"
@@ -1017,12 +1026,12 @@ const se = g`
1017
1026
  d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16m.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2"
1018
1027
  />
1019
1028
  </svg>`;
1020
- var ce = Object.defineProperty, be = Object.getOwnPropertyDescriptor, F = (t, r, o, e) => {
1021
- for (var a = e > 1 ? void 0 : e ? be(r, o) : r, i = t.length - 1, n; i >= 0; i--)
1022
- (n = t[i]) && (a = (e ? n(r, o, a) : n(a)) || a);
1023
- return e && a && ce(r, o, a), a;
1029
+ var be = Object.defineProperty, pe = Object.getOwnPropertyDescriptor, F = (t, r, o, e) => {
1030
+ for (var a = e > 1 ? void 0 : e ? pe(r, o) : r, n = t.length - 1, i; n >= 0; n--)
1031
+ (i = t[n]) && (a = (e ? i(r, o, a) : i(a)) || a);
1032
+ return e && a && be(r, o, a), a;
1024
1033
  };
1025
- class pe extends Event {
1034
+ class me extends Event {
1026
1035
  constructor(r) {
1027
1036
  super("form-input-change", { bubbles: !0, composed: !0 }), this.value = r;
1028
1037
  }
@@ -1042,7 +1051,7 @@ let T = class extends f {
1042
1051
  type="button"
1043
1052
  id="button-addon2"
1044
1053
  >
1045
- ${this.hidden ? le : se}
1054
+ ${this.hidden ? de : le}
1046
1055
  </button>` : null}
1047
1056
  <input
1048
1057
  .value=${this.value}
@@ -1051,7 +1060,7 @@ let T = class extends f {
1051
1060
  @change=${(t) => {
1052
1061
  const r = t.target;
1053
1062
  this.value = r.value, this.dispatchEvent(
1054
- new pe(this.value)
1063
+ new me(this.value)
1055
1064
  );
1056
1065
  }}
1057
1066
  type="text"
@@ -1108,17 +1117,17 @@ const qr = I`
1108
1117
  word-break: break-all;
1109
1118
  }
1110
1119
  `;
1111
- var me = Object.defineProperty, ge = Object.getOwnPropertyDescriptor, Yr = (t, r, o, e) => {
1112
- for (var a = e > 1 ? void 0 : e ? ge(r, o) : r, i = t.length - 1, n; i >= 0; i--)
1113
- (n = t[i]) && (a = (e ? n(r, o, a) : n(a)) || a);
1114
- return e && a && me(r, o, a), a;
1120
+ var ge = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, Yr = (t, r, o, e) => {
1121
+ for (var a = e > 1 ? void 0 : e ? ue(r, o) : r, n = t.length - 1, i; n >= 0; n--)
1122
+ (i = t[n]) && (a = (e ? i(r, o, a) : i(a)) || a);
1123
+ return e && a && ge(r, o, a), a;
1115
1124
  };
1116
- class ue extends Event {
1125
+ class fe extends Event {
1117
1126
  constructor(r) {
1118
1127
  super("delete", { bubbles: !0, composed: !0 }), this.idp = r;
1119
1128
  }
1120
1129
  }
1121
- class fe extends Event {
1130
+ class he extends Event {
1122
1131
  constructor() {
1123
1132
  super("update", { bubbles: !0, composed: !0 });
1124
1133
  }
@@ -1144,14 +1153,14 @@ let Pt = class extends f {
1144
1153
  <div>
1145
1154
  <button
1146
1155
  class="btn btn-sm btn-secondary"
1147
- @click=${() => this.dispatchEvent(new fe())}
1156
+ @click=${() => this.dispatchEvent(new he())}
1148
1157
  >
1149
1158
  Update
1150
1159
  </button>
1151
1160
  <button
1152
1161
  class="btn btn-sm btn-danger"
1153
1162
  @click=${() => this.dispatchEvent(
1154
- new ue(this.idp)
1163
+ new fe(this.idp)
1155
1164
  )}
1156
1165
  >
1157
1166
  Delete
@@ -1203,14 +1212,14 @@ const Vr = I`
1203
1212
  }
1204
1213
  }
1205
1214
  `;
1206
- var he = Object.defineProperty, ve = Object.getOwnPropertyDescriptor, Kr = (t) => {
1215
+ var ve = Object.defineProperty, xe = Object.getOwnPropertyDescriptor, Kr = (t) => {
1207
1216
  throw TypeError(t);
1208
1217
  }, Bt = (t, r, o, e) => {
1209
- for (var a = e > 1 ? void 0 : e ? ve(r, o) : r, i = t.length - 1, n; i >= 0; i--)
1210
- (n = t[i]) && (a = (e ? n(r, o, a) : n(a)) || a);
1211
- return e && a && he(r, o, a), a;
1218
+ for (var a = e > 1 ? void 0 : e ? xe(r, o) : r, n = t.length - 1, i; n >= 0; n--)
1219
+ (i = t[n]) && (a = (e ? i(r, o, a) : i(a)) || a);
1220
+ return e && a && ve(r, o, a), a;
1212
1221
  }, Jr = (t, r, o) => r.has(t) || Kr("Cannot " + o), Vt = (t, r, o) => (Jr(t, r, "read from private field"), o ? o.call(t) : r.get(t)), Kt = (t, r, o) => r.has(t) ? Kr("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(t) : r.set(t, o), Jt = (t, r, o, e) => (Jr(t, r, "write to private field"), r.set(t, o), o), kt, _t, zt;
1213
- class xe extends Event {
1222
+ class we extends Event {
1214
1223
  constructor(r) {
1215
1224
  super("idp-add", { bubbles: !0, composed: !0 }), this.idp = r;
1216
1225
  }
@@ -1289,7 +1298,7 @@ let X = class extends f {
1289
1298
  <form
1290
1299
  @submit=${(t) => {
1291
1300
  t.preventDefault(), this.dispatchEvent(
1292
- new xe(this.modalIdp)
1301
+ new we(this.modalIdp)
1293
1302
  ), this.closeModal();
1294
1303
  }}
1295
1304
  >
@@ -1374,10 +1383,10 @@ Bt([
1374
1383
  X = Bt([
1375
1384
  S("wg-idps")
1376
1385
  ], X);
1377
- var we = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, Xr = (t, r, o, e) => {
1378
- for (var a = e > 1 ? void 0 : e ? ye(r, o) : r, i = t.length - 1, n; i >= 0; i--)
1379
- (n = t[i]) && (a = (e ? n(r, o, a) : n(a)) || a);
1380
- return e && a && we(r, o, a), a;
1386
+ var ye = Object.defineProperty, ke = Object.getOwnPropertyDescriptor, Xr = (t, r, o, e) => {
1387
+ for (var a = e > 1 ? void 0 : e ? ke(r, o) : r, n = t.length - 1, i; n >= 0; n--)
1388
+ (i = t[n]) && (a = (e ? i(r, o, a) : i(a)) || a);
1389
+ return e && a && ye(r, o, a), a;
1381
1390
  };
1382
1391
  let Ct = class extends f {
1383
1392
  constructor() {
@@ -1406,17 +1415,17 @@ Xr([
1406
1415
  Ct = Xr([
1407
1416
  S("network-table")
1408
1417
  ], Ct);
1409
- var ke = Object.defineProperty, _e = Object.getOwnPropertyDescriptor, sr = (t, r, o, e) => {
1410
- for (var a = e > 1 ? void 0 : e ? _e(r, o) : r, i = t.length - 1, n; i >= 0; i--)
1411
- (n = t[i]) && (a = (e ? n(r, o, a) : n(a)) || a);
1412
- return e && a && ke(r, o, a), a;
1418
+ var _e = Object.defineProperty, ze = Object.getOwnPropertyDescriptor, sr = (t, r, o, e) => {
1419
+ for (var a = e > 1 ? void 0 : e ? ze(r, o) : r, n = t.length - 1, i; n >= 0; n--)
1420
+ (i = t[n]) && (a = (e ? i(r, o, a) : i(a)) || a);
1421
+ return e && a && _e(r, o, a), a;
1413
1422
  };
1414
- class ze extends Event {
1423
+ class $e extends Event {
1415
1424
  constructor(r) {
1416
1425
  super("delete", { bubbles: !0, composed: !0 }), this.network = r;
1417
1426
  }
1418
1427
  }
1419
- class kl extends Event {
1428
+ class _l extends Event {
1420
1429
  constructor() {
1421
1430
  super("update", { bubbles: !0, composed: !0 });
1422
1431
  }
@@ -1452,7 +1461,7 @@ let st = class extends f {
1452
1461
  <button
1453
1462
  class="btn btn-sm btn-danger"
1454
1463
  @click=${() => this.dispatchEvent(
1455
- new ze(this.network)
1464
+ new $e(this.network)
1456
1465
  )}
1457
1466
  >
1458
1467
  Delete
@@ -1479,28 +1488,28 @@ function d(t, r, o) {
1479
1488
  value: s._zod ?? {},
1480
1489
  enumerable: !1
1481
1490
  }), (c = s._zod).traits ?? (c.traits = /* @__PURE__ */ new Set()), s._zod.traits.add(t), r(s, l);
1482
- for (const p in n.prototype)
1483
- p in s || Object.defineProperty(s, p, { value: n.prototype[p].bind(s) });
1484
- s._zod.constr = n, s._zod.def = l;
1491
+ for (const p in i.prototype)
1492
+ p in s || Object.defineProperty(s, p, { value: i.prototype[p].bind(s) });
1493
+ s._zod.constr = i, s._zod.def = l;
1485
1494
  }
1486
1495
  const a = (o == null ? void 0 : o.Parent) ?? Object;
1487
- class i extends a {
1496
+ class n extends a {
1488
1497
  }
1489
- Object.defineProperty(i, "name", { value: t });
1490
- function n(s) {
1498
+ Object.defineProperty(n, "name", { value: t });
1499
+ function i(s) {
1491
1500
  var l;
1492
- const c = o != null && o.Parent ? new i() : this;
1501
+ const c = o != null && o.Parent ? new n() : this;
1493
1502
  e(c, s), (l = c._zod).deferred ?? (l.deferred = []);
1494
1503
  for (const p of c._zod.deferred)
1495
1504
  p();
1496
1505
  return c;
1497
1506
  }
1498
- return Object.defineProperty(n, "init", { value: e }), Object.defineProperty(n, Symbol.hasInstance, {
1507
+ return Object.defineProperty(i, "init", { value: e }), Object.defineProperty(i, Symbol.hasInstance, {
1499
1508
  value: (s) => {
1500
1509
  var l, c;
1501
1510
  return o != null && o.Parent && s instanceof o.Parent ? !0 : (c = (l = s == null ? void 0 : s._zod) == null ? void 0 : l.traits) == null ? void 0 : c.has(t);
1502
1511
  }
1503
- }), Object.defineProperty(n, "name", { value: t }), n;
1512
+ }), Object.defineProperty(i, "name", { value: t }), i;
1504
1513
  }
1505
1514
  class K extends Error {
1506
1515
  constructor() {
@@ -1516,7 +1525,7 @@ const Qr = {};
1516
1525
  function M(t) {
1517
1526
  return Qr;
1518
1527
  }
1519
- function $e(t) {
1528
+ function Ee(t) {
1520
1529
  const r = Object.values(t).filter((e) => typeof e == "number");
1521
1530
  return Object.entries(t).filter(([e, a]) => r.indexOf(+e) === -1).map(([e, a]) => a);
1522
1531
  }
@@ -1540,15 +1549,15 @@ function dr(t) {
1540
1549
  const r = t.startsWith("^") ? 1 : 0, o = t.endsWith("$") ? t.length - 1 : t.length;
1541
1550
  return t.slice(r, o);
1542
1551
  }
1543
- function Ee(t, r) {
1552
+ function Ae(t, r) {
1544
1553
  const o = (t.toString().split(".")[1] || "").length, e = r.toString();
1545
1554
  let a = (e.split(".")[1] || "").length;
1546
1555
  if (a === 0 && /\d?e-\d?/.test(e)) {
1547
1556
  const l = e.match(/\d?e-(\d?)/);
1548
1557
  l != null && l[1] && (a = Number.parseInt(l[1]));
1549
1558
  }
1550
- const i = o > a ? o : a, n = Number.parseInt(t.toFixed(i).replace(".", "")), s = Number.parseInt(r.toFixed(i).replace(".", ""));
1551
- return n % s / 10 ** i;
1559
+ const n = o > a ? o : a, i = Number.parseInt(t.toFixed(n).replace(".", "")), s = Number.parseInt(r.toFixed(n).replace(".", ""));
1560
+ return i % s / 10 ** n;
1552
1561
  }
1553
1562
  const _r = Symbol("evaluating");
1554
1563
  function v(t, r, o) {
@@ -1591,7 +1600,7 @@ const to = "captureStackTrace" in Error ? Error.captureStackTrace : (...t) => {
1591
1600
  function lt(t) {
1592
1601
  return typeof t == "object" && t !== null && !Array.isArray(t);
1593
1602
  }
1594
- const Ae = Ft(() => {
1603
+ const je = Ft(() => {
1595
1604
  var t;
1596
1605
  if (typeof navigator < "u" && ((t = navigator == null ? void 0 : navigator.userAgent) != null && t.includes("Cloudflare")))
1597
1606
  return !1;
@@ -1614,7 +1623,7 @@ function H(t) {
1614
1623
  function ro(t) {
1615
1624
  return H(t) ? { ...t } : Array.isArray(t) ? [...t] : t;
1616
1625
  }
1617
- const je = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
1626
+ const Se = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
1618
1627
  function Q(t) {
1619
1628
  return t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1620
1629
  }
@@ -1635,24 +1644,24 @@ function b(t) {
1635
1644
  }
1636
1645
  return delete r.message, typeof r.error == "string" ? { ...r, error: () => r.error } : r;
1637
1646
  }
1638
- function Se(t) {
1647
+ function Ze(t) {
1639
1648
  return Object.keys(t).filter((r) => t[r]._zod.optin === "optional" && t[r]._zod.optout === "optional");
1640
1649
  }
1641
- const Ze = {
1650
+ const Ie = {
1642
1651
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
1643
1652
  int32: [-2147483648, 2147483647],
1644
1653
  uint32: [0, 4294967295],
1645
1654
  float32: [-34028234663852886e22, 34028234663852886e22],
1646
1655
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
1647
1656
  };
1648
- function Ie(t, r) {
1657
+ function Pe(t, r) {
1649
1658
  const o = t._zod.def, e = W(t._zod.def, {
1650
1659
  get shape() {
1651
1660
  const a = {};
1652
- for (const i in r) {
1653
- if (!(i in o.shape))
1654
- throw new Error(`Unrecognized key: "${i}"`);
1655
- r[i] && (a[i] = o.shape[i]);
1661
+ for (const n in r) {
1662
+ if (!(n in o.shape))
1663
+ throw new Error(`Unrecognized key: "${n}"`);
1664
+ r[n] && (a[n] = o.shape[n]);
1656
1665
  }
1657
1666
  return G(this, "shape", a), a;
1658
1667
  },
@@ -1660,14 +1669,14 @@ function Ie(t, r) {
1660
1669
  });
1661
1670
  return D(t, e);
1662
1671
  }
1663
- function Pe(t, r) {
1672
+ function Ce(t, r) {
1664
1673
  const o = t._zod.def, e = W(t._zod.def, {
1665
1674
  get shape() {
1666
1675
  const a = { ...t._zod.def.shape };
1667
- for (const i in r) {
1668
- if (!(i in o.shape))
1669
- throw new Error(`Unrecognized key: "${i}"`);
1670
- r[i] && delete a[i];
1676
+ for (const n in r) {
1677
+ if (!(n in o.shape))
1678
+ throw new Error(`Unrecognized key: "${n}"`);
1679
+ r[n] && delete a[n];
1671
1680
  }
1672
1681
  return G(this, "shape", a), a;
1673
1682
  },
@@ -1675,7 +1684,7 @@ function Pe(t, r) {
1675
1684
  });
1676
1685
  return D(t, e);
1677
1686
  }
1678
- function Ce(t, r) {
1687
+ function Te(t, r) {
1679
1688
  if (!H(r))
1680
1689
  throw new Error("Invalid input to extend: expected a plain object");
1681
1690
  const o = t._zod.def.checks;
@@ -1683,14 +1692,14 @@ function Ce(t, r) {
1683
1692
  throw new Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");
1684
1693
  const a = W(t._zod.def, {
1685
1694
  get shape() {
1686
- const i = { ...t._zod.def.shape, ...r };
1687
- return G(this, "shape", i), i;
1695
+ const n = { ...t._zod.def.shape, ...r };
1696
+ return G(this, "shape", n), n;
1688
1697
  },
1689
1698
  checks: []
1690
1699
  });
1691
1700
  return D(t, a);
1692
1701
  }
1693
- function Te(t, r) {
1702
+ function Oe(t, r) {
1694
1703
  if (!H(r))
1695
1704
  throw new Error("Invalid input to safeExtend: expected a plain object");
1696
1705
  const o = {
@@ -1703,7 +1712,7 @@ function Te(t, r) {
1703
1712
  };
1704
1713
  return D(t, o);
1705
1714
  }
1706
- function Oe(t, r) {
1715
+ function Re(t, r) {
1707
1716
  const o = W(t._zod.def, {
1708
1717
  get shape() {
1709
1718
  const e = { ...t._zod.def.shape, ...r._zod.def.shape };
@@ -1717,51 +1726,51 @@ function Oe(t, r) {
1717
1726
  });
1718
1727
  return D(t, o);
1719
1728
  }
1720
- function Re(t, r, o) {
1729
+ function Ue(t, r, o) {
1721
1730
  const e = W(r._zod.def, {
1722
1731
  get shape() {
1723
- const a = r._zod.def.shape, i = { ...a };
1732
+ const a = r._zod.def.shape, n = { ...a };
1724
1733
  if (o)
1725
- for (const n in o) {
1726
- if (!(n in a))
1727
- throw new Error(`Unrecognized key: "${n}"`);
1728
- o[n] && (i[n] = t ? new t({
1734
+ for (const i in o) {
1735
+ if (!(i in a))
1736
+ throw new Error(`Unrecognized key: "${i}"`);
1737
+ o[i] && (n[i] = t ? new t({
1729
1738
  type: "optional",
1730
- innerType: a[n]
1731
- }) : a[n]);
1739
+ innerType: a[i]
1740
+ }) : a[i]);
1732
1741
  }
1733
1742
  else
1734
- for (const n in a)
1735
- i[n] = t ? new t({
1743
+ for (const i in a)
1744
+ n[i] = t ? new t({
1736
1745
  type: "optional",
1737
- innerType: a[n]
1738
- }) : a[n];
1739
- return G(this, "shape", i), i;
1746
+ innerType: a[i]
1747
+ }) : a[i];
1748
+ return G(this, "shape", n), n;
1740
1749
  },
1741
1750
  checks: []
1742
1751
  });
1743
1752
  return D(r, e);
1744
1753
  }
1745
- function Ue(t, r, o) {
1754
+ function Me(t, r, o) {
1746
1755
  const e = W(r._zod.def, {
1747
1756
  get shape() {
1748
- const a = r._zod.def.shape, i = { ...a };
1757
+ const a = r._zod.def.shape, n = { ...a };
1749
1758
  if (o)
1750
- for (const n in o) {
1751
- if (!(n in i))
1752
- throw new Error(`Unrecognized key: "${n}"`);
1753
- o[n] && (i[n] = new t({
1759
+ for (const i in o) {
1760
+ if (!(i in n))
1761
+ throw new Error(`Unrecognized key: "${i}"`);
1762
+ o[i] && (n[i] = new t({
1754
1763
  type: "nonoptional",
1755
- innerType: a[n]
1764
+ innerType: a[i]
1756
1765
  }));
1757
1766
  }
1758
1767
  else
1759
- for (const n in a)
1760
- i[n] = new t({
1768
+ for (const i in a)
1769
+ n[i] = new t({
1761
1770
  type: "nonoptional",
1762
- innerType: a[n]
1771
+ innerType: a[i]
1763
1772
  });
1764
- return G(this, "shape", i), i;
1773
+ return G(this, "shape", n), n;
1765
1774
  },
1766
1775
  checks: []
1767
1776
  });
@@ -1786,10 +1795,10 @@ function gt(t) {
1786
1795
  return typeof t == "string" ? t : t == null ? void 0 : t.message;
1787
1796
  }
1788
1797
  function N(t, r, o) {
1789
- var a, i, n, s, l, c;
1798
+ var a, n, i, s, l, c;
1790
1799
  const e = { ...t, path: t.path ?? [] };
1791
1800
  if (!t.message) {
1792
- const p = gt((n = (i = (a = t.inst) == null ? void 0 : a._zod.def) == null ? void 0 : i.error) == null ? void 0 : n.call(i, t)) ?? gt((s = r == null ? void 0 : r.error) == null ? void 0 : s.call(r, t)) ?? gt((l = o.customError) == null ? void 0 : l.call(o, t)) ?? gt((c = o.localeError) == null ? void 0 : c.call(o, t)) ?? "Invalid input";
1801
+ const p = gt((i = (n = (a = t.inst) == null ? void 0 : a._zod.def) == null ? void 0 : n.error) == null ? void 0 : i.call(n, t)) ?? gt((s = r == null ? void 0 : r.error) == null ? void 0 : s.call(r, t)) ?? gt((l = o.customError) == null ? void 0 : l.call(o, t)) ?? gt((c = o.localeError) == null ? void 0 : c.call(o, t)) ?? "Invalid input";
1793
1802
  e.message = p;
1794
1803
  }
1795
1804
  return delete e.inst, delete e.continue, r != null && r.reportInput || delete e.input, e;
@@ -1818,99 +1827,99 @@ const oo = (t, r) => {
1818
1827
  enumerable: !1
1819
1828
  });
1820
1829
  }, eo = d("$ZodError", oo), ao = d("$ZodError", oo, { Parent: Error });
1821
- function Me(t, r = (o) => o.message) {
1830
+ function Ne(t, r = (o) => o.message) {
1822
1831
  const o = {}, e = [];
1823
1832
  for (const a of t.issues)
1824
1833
  a.path.length > 0 ? (o[a.path[0]] = o[a.path[0]] || [], o[a.path[0]].push(r(a))) : e.push(r(a));
1825
1834
  return { formErrors: e, fieldErrors: o };
1826
1835
  }
1827
- function Ne(t, r = (o) => o.message) {
1836
+ function De(t, r = (o) => o.message) {
1828
1837
  const o = { _errors: [] }, e = (a) => {
1829
- for (const i of a.issues)
1830
- if (i.code === "invalid_union" && i.errors.length)
1831
- i.errors.map((n) => e({ issues: n }));
1832
- else if (i.code === "invalid_key")
1833
- e({ issues: i.issues });
1834
- else if (i.code === "invalid_element")
1835
- e({ issues: i.issues });
1836
- else if (i.path.length === 0)
1837
- o._errors.push(r(i));
1838
+ for (const n of a.issues)
1839
+ if (n.code === "invalid_union" && n.errors.length)
1840
+ n.errors.map((i) => e({ issues: i }));
1841
+ else if (n.code === "invalid_key")
1842
+ e({ issues: n.issues });
1843
+ else if (n.code === "invalid_element")
1844
+ e({ issues: n.issues });
1845
+ else if (n.path.length === 0)
1846
+ o._errors.push(r(n));
1838
1847
  else {
1839
- let n = o, s = 0;
1840
- for (; s < i.path.length; ) {
1841
- const l = i.path[s];
1842
- s === i.path.length - 1 ? (n[l] = n[l] || { _errors: [] }, n[l]._errors.push(r(i))) : n[l] = n[l] || { _errors: [] }, n = n[l], s++;
1848
+ let i = o, s = 0;
1849
+ for (; s < n.path.length; ) {
1850
+ const l = n.path[s];
1851
+ s === n.path.length - 1 ? (i[l] = i[l] || { _errors: [] }, i[l]._errors.push(r(n))) : i[l] = i[l] || { _errors: [] }, i = i[l], s++;
1843
1852
  }
1844
1853
  }
1845
1854
  };
1846
1855
  return e(t), o;
1847
1856
  }
1848
1857
  const br = (t) => (r, o, e, a) => {
1849
- const i = e ? Object.assign(e, { async: !1 }) : { async: !1 }, n = r._zod.run({ value: o, issues: [] }, i);
1850
- if (n instanceof Promise)
1858
+ const n = e ? Object.assign(e, { async: !1 }) : { async: !1 }, i = r._zod.run({ value: o, issues: [] }, n);
1859
+ if (i instanceof Promise)
1851
1860
  throw new K();
1852
- if (n.issues.length) {
1853
- const s = new ((a == null ? void 0 : a.Err) ?? t)(n.issues.map((l) => N(l, i, M())));
1861
+ if (i.issues.length) {
1862
+ const s = new ((a == null ? void 0 : a.Err) ?? t)(i.issues.map((l) => N(l, n, M())));
1854
1863
  throw to(s, a == null ? void 0 : a.callee), s;
1855
1864
  }
1856
- return n.value;
1865
+ return i.value;
1857
1866
  }, pr = (t) => async (r, o, e, a) => {
1858
- const i = e ? Object.assign(e, { async: !0 }) : { async: !0 };
1859
- let n = r._zod.run({ value: o, issues: [] }, i);
1860
- if (n instanceof Promise && (n = await n), n.issues.length) {
1861
- const s = new ((a == null ? void 0 : a.Err) ?? t)(n.issues.map((l) => N(l, i, M())));
1867
+ const n = e ? Object.assign(e, { async: !0 }) : { async: !0 };
1868
+ let i = r._zod.run({ value: o, issues: [] }, n);
1869
+ if (i instanceof Promise && (i = await i), i.issues.length) {
1870
+ const s = new ((a == null ? void 0 : a.Err) ?? t)(i.issues.map((l) => N(l, n, M())));
1862
1871
  throw to(s, a == null ? void 0 : a.callee), s;
1863
1872
  }
1864
- return n.value;
1873
+ return i.value;
1865
1874
  }, Gt = (t) => (r, o, e) => {
1866
- const a = e ? { ...e, async: !1 } : { async: !1 }, i = r._zod.run({ value: o, issues: [] }, a);
1867
- if (i instanceof Promise)
1875
+ const a = e ? { ...e, async: !1 } : { async: !1 }, n = r._zod.run({ value: o, issues: [] }, a);
1876
+ if (n instanceof Promise)
1868
1877
  throw new K();
1869
- return i.issues.length ? {
1878
+ return n.issues.length ? {
1870
1879
  success: !1,
1871
- error: new (t ?? eo)(i.issues.map((n) => N(n, a, M())))
1872
- } : { success: !0, data: i.value };
1873
- }, De = /* @__PURE__ */ Gt(ao), Wt = (t) => async (r, o, e) => {
1880
+ error: new (t ?? eo)(n.issues.map((i) => N(i, a, M())))
1881
+ } : { success: !0, data: n.value };
1882
+ }, Le = /* @__PURE__ */ Gt(ao), Wt = (t) => async (r, o, e) => {
1874
1883
  const a = e ? Object.assign(e, { async: !0 }) : { async: !0 };
1875
- let i = r._zod.run({ value: o, issues: [] }, a);
1876
- return i instanceof Promise && (i = await i), i.issues.length ? {
1884
+ let n = r._zod.run({ value: o, issues: [] }, a);
1885
+ return n instanceof Promise && (n = await n), n.issues.length ? {
1877
1886
  success: !1,
1878
- error: new t(i.issues.map((n) => N(n, a, M())))
1879
- } : { success: !0, data: i.value };
1880
- }, Le = /* @__PURE__ */ Wt(ao), Be = (t) => (r, o, e) => {
1887
+ error: new t(n.issues.map((i) => N(i, a, M())))
1888
+ } : { success: !0, data: n.value };
1889
+ }, Be = /* @__PURE__ */ Wt(ao), Fe = (t) => (r, o, e) => {
1881
1890
  const a = e ? Object.assign(e, { direction: "backward" }) : { direction: "backward" };
1882
1891
  return br(t)(r, o, a);
1883
- }, Fe = (t) => (r, o, e) => br(t)(r, o, e), Ge = (t) => async (r, o, e) => {
1892
+ }, Ge = (t) => (r, o, e) => br(t)(r, o, e), We = (t) => async (r, o, e) => {
1884
1893
  const a = e ? Object.assign(e, { direction: "backward" }) : { direction: "backward" };
1885
1894
  return pr(t)(r, o, a);
1886
- }, We = (t) => async (r, o, e) => pr(t)(r, o, e), qe = (t) => (r, o, e) => {
1895
+ }, qe = (t) => async (r, o, e) => pr(t)(r, o, e), Ye = (t) => (r, o, e) => {
1887
1896
  const a = e ? Object.assign(e, { direction: "backward" }) : { direction: "backward" };
1888
1897
  return Gt(t)(r, o, a);
1889
- }, Ye = (t) => (r, o, e) => Gt(t)(r, o, e), Ve = (t) => async (r, o, e) => {
1898
+ }, Ve = (t) => (r, o, e) => Gt(t)(r, o, e), Ke = (t) => async (r, o, e) => {
1890
1899
  const a = e ? Object.assign(e, { direction: "backward" }) : { direction: "backward" };
1891
1900
  return Wt(t)(r, o, a);
1892
- }, Ke = (t) => async (r, o, e) => Wt(t)(r, o, e), Je = /^[cC][^\s-]{8,}$/, Xe = /^[0-9a-z]+$/, He = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Qe = /^[0-9a-vA-V]{20}$/, ta = /^[A-Za-z0-9]{27}$/, ra = /^[a-zA-Z0-9_-]{21}$/, oa = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, ea = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, $r = (t) => t ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, aa = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, ia = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1893
- function na() {
1901
+ }, Je = (t) => async (r, o, e) => Wt(t)(r, o, e), Xe = /^[cC][^\s-]{8,}$/, He = /^[0-9a-z]+$/, Qe = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, ta = /^[0-9a-vA-V]{20}$/, ra = /^[A-Za-z0-9]{27}$/, oa = /^[a-zA-Z0-9_-]{21}$/, ea = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, aa = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, $r = (t) => t ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, na = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, ia = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1902
+ function sa() {
1894
1903
  return new RegExp(ia, "u");
1895
1904
  }
1896
- const sa = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, la = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, da = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, ca = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, ba = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, io = /^[A-Za-z0-9_-]*$/, pa = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, ma = /^\+(?:[0-9]){6,14}[0-9]$/, no = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", ga = /* @__PURE__ */ new RegExp(`^${no}$`);
1905
+ const la = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, da = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, ca = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, ba = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, pa = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, no = /^[A-Za-z0-9_-]*$/, ma = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, ga = /^\+(?:[0-9]){6,14}[0-9]$/, io = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", ua = /* @__PURE__ */ new RegExp(`^${io}$`);
1897
1906
  function so(t) {
1898
1907
  const r = "(?:[01]\\d|2[0-3]):[0-5]\\d";
1899
1908
  return typeof t.precision == "number" ? t.precision === -1 ? `${r}` : t.precision === 0 ? `${r}:[0-5]\\d` : `${r}:[0-5]\\d\\.\\d{${t.precision}}` : `${r}(?::[0-5]\\d(?:\\.\\d+)?)?`;
1900
1909
  }
1901
- function ua(t) {
1910
+ function fa(t) {
1902
1911
  return new RegExp(`^${so(t)}$`);
1903
1912
  }
1904
- function fa(t) {
1913
+ function ha(t) {
1905
1914
  const r = so({ precision: t.precision }), o = ["Z"];
1906
1915
  t.local && o.push(""), t.offset && o.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
1907
1916
  const e = `${r}(?:${o.join("|")})`;
1908
- return new RegExp(`^${no}T(?:${e})$`);
1917
+ return new RegExp(`^${io}T(?:${e})$`);
1909
1918
  }
1910
- const ha = (t) => {
1919
+ const va = (t) => {
1911
1920
  const r = t ? `[\\s\\S]{${(t == null ? void 0 : t.minimum) ?? 0},${(t == null ? void 0 : t.maximum) ?? ""}}` : "[\\s\\S]*";
1912
1921
  return new RegExp(`^${r}$`);
1913
- }, va = /^-?\d+$/, xa = /^-?\d+(?:\.\d+)?/, wa = /^(?:true|false)$/i, ya = /^null$/i, ka = /^undefined$/i, _a = /^[^A-Z]*$/, za = /^[^a-z]*$/, j = /* @__PURE__ */ d("$ZodCheck", (t, r) => {
1922
+ }, xa = /^-?\d+$/, wa = /^-?\d+(?:\.\d+)?/, ya = /^(?:true|false)$/i, ka = /^null$/i, _a = /^undefined$/i, za = /^[^A-Z]*$/, $a = /^[^a-z]*$/, j = /* @__PURE__ */ d("$ZodCheck", (t, r) => {
1914
1923
  var o;
1915
1924
  t._zod ?? (t._zod = {}), t._zod.def = r, (o = t._zod).onattach ?? (o.onattach = []);
1916
1925
  }), lo = {
@@ -1921,8 +1930,8 @@ const ha = (t) => {
1921
1930
  j.init(t, r);
1922
1931
  const o = lo[typeof r.value];
1923
1932
  t._zod.onattach.push((e) => {
1924
- const a = e._zod.bag, i = (r.inclusive ? a.maximum : a.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
1925
- r.value < i && (r.inclusive ? a.maximum = r.value : a.exclusiveMaximum = r.value);
1933
+ const a = e._zod.bag, n = (r.inclusive ? a.maximum : a.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
1934
+ r.value < n && (r.inclusive ? a.maximum = r.value : a.exclusiveMaximum = r.value);
1926
1935
  }), t._zod.check = (e) => {
1927
1936
  (r.inclusive ? e.value <= r.value : e.value < r.value) || e.issues.push({
1928
1937
  origin: o,
@@ -1938,8 +1947,8 @@ const ha = (t) => {
1938
1947
  j.init(t, r);
1939
1948
  const o = lo[typeof r.value];
1940
1949
  t._zod.onattach.push((e) => {
1941
- const a = e._zod.bag, i = (r.inclusive ? a.minimum : a.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
1942
- r.value > i && (r.inclusive ? a.minimum = r.value : a.exclusiveMinimum = r.value);
1950
+ const a = e._zod.bag, n = (r.inclusive ? a.minimum : a.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
1951
+ r.value > n && (r.inclusive ? a.minimum = r.value : a.exclusiveMinimum = r.value);
1943
1952
  }), t._zod.check = (e) => {
1944
1953
  (r.inclusive ? e.value >= r.value : e.value > r.value) || e.issues.push({
1945
1954
  origin: o,
@@ -1951,14 +1960,14 @@ const ha = (t) => {
1951
1960
  continue: !r.abort
1952
1961
  });
1953
1962
  };
1954
- }), $a = /* @__PURE__ */ d("$ZodCheckMultipleOf", (t, r) => {
1963
+ }), Ea = /* @__PURE__ */ d("$ZodCheckMultipleOf", (t, r) => {
1955
1964
  j.init(t, r), t._zod.onattach.push((o) => {
1956
1965
  var e;
1957
1966
  (e = o._zod.bag).multipleOf ?? (e.multipleOf = r.value);
1958
1967
  }), t._zod.check = (o) => {
1959
1968
  if (typeof o.value != typeof r.value)
1960
1969
  throw new Error("Cannot mix number and bigint in multiple_of check.");
1961
- (typeof o.value == "bigint" ? o.value % r.value === BigInt(0) : Ee(o.value, r.value) === 0) || o.issues.push({
1970
+ (typeof o.value == "bigint" ? o.value % r.value === BigInt(0) : Ae(o.value, r.value) === 0) || o.issues.push({
1962
1971
  origin: typeof o.value,
1963
1972
  code: "not_multiple_of",
1964
1973
  divisor: r.value,
@@ -1967,13 +1976,13 @@ const ha = (t) => {
1967
1976
  continue: !r.abort
1968
1977
  });
1969
1978
  };
1970
- }), Ea = /* @__PURE__ */ d("$ZodCheckNumberFormat", (t, r) => {
1971
- var n;
1979
+ }), Aa = /* @__PURE__ */ d("$ZodCheckNumberFormat", (t, r) => {
1980
+ var i;
1972
1981
  j.init(t, r), r.format = r.format || "float64";
1973
- const o = (n = r.format) == null ? void 0 : n.includes("int"), e = o ? "int" : "number", [a, i] = Ze[r.format];
1982
+ const o = (i = r.format) == null ? void 0 : i.includes("int"), e = o ? "int" : "number", [a, n] = Ie[r.format];
1974
1983
  t._zod.onattach.push((s) => {
1975
1984
  const l = s._zod.bag;
1976
- l.format = r.format, l.minimum = a, l.maximum = i, o && (l.pattern = va);
1985
+ l.format = r.format, l.minimum = a, l.maximum = n, o && (l.pattern = xa);
1977
1986
  }), t._zod.check = (s) => {
1978
1987
  const l = s.value;
1979
1988
  if (o) {
@@ -2017,15 +2026,15 @@ const ha = (t) => {
2017
2026
  inclusive: !0,
2018
2027
  inst: t,
2019
2028
  continue: !r.abort
2020
- }), l > i && s.issues.push({
2029
+ }), l > n && s.issues.push({
2021
2030
  origin: "number",
2022
2031
  input: l,
2023
2032
  code: "too_big",
2024
- maximum: i,
2033
+ maximum: n,
2025
2034
  inst: t
2026
2035
  });
2027
2036
  };
2028
- }), Aa = /* @__PURE__ */ d("$ZodCheckMaxLength", (t, r) => {
2037
+ }), ja = /* @__PURE__ */ d("$ZodCheckMaxLength", (t, r) => {
2029
2038
  var o;
2030
2039
  j.init(t, r), (o = t._zod.def).when ?? (o.when = (e) => {
2031
2040
  const a = e.value;
@@ -2037,9 +2046,9 @@ const ha = (t) => {
2037
2046
  const a = e.value;
2038
2047
  if (a.length <= r.maximum)
2039
2048
  return;
2040
- const n = cr(a);
2049
+ const i = cr(a);
2041
2050
  e.issues.push({
2042
- origin: n,
2051
+ origin: i,
2043
2052
  code: "too_big",
2044
2053
  maximum: r.maximum,
2045
2054
  inclusive: !0,
@@ -2048,7 +2057,7 @@ const ha = (t) => {
2048
2057
  continue: !r.abort
2049
2058
  });
2050
2059
  };
2051
- }), ja = /* @__PURE__ */ d("$ZodCheckMinLength", (t, r) => {
2060
+ }), Sa = /* @__PURE__ */ d("$ZodCheckMinLength", (t, r) => {
2052
2061
  var o;
2053
2062
  j.init(t, r), (o = t._zod.def).when ?? (o.when = (e) => {
2054
2063
  const a = e.value;
@@ -2060,9 +2069,9 @@ const ha = (t) => {
2060
2069
  const a = e.value;
2061
2070
  if (a.length >= r.minimum)
2062
2071
  return;
2063
- const n = cr(a);
2072
+ const i = cr(a);
2064
2073
  e.issues.push({
2065
- origin: n,
2074
+ origin: i,
2066
2075
  code: "too_small",
2067
2076
  minimum: r.minimum,
2068
2077
  inclusive: !0,
@@ -2071,7 +2080,7 @@ const ha = (t) => {
2071
2080
  continue: !r.abort
2072
2081
  });
2073
2082
  };
2074
- }), Sa = /* @__PURE__ */ d("$ZodCheckLengthEquals", (t, r) => {
2083
+ }), Za = /* @__PURE__ */ d("$ZodCheckLengthEquals", (t, r) => {
2075
2084
  var o;
2076
2085
  j.init(t, r), (o = t._zod.def).when ?? (o.when = (e) => {
2077
2086
  const a = e.value;
@@ -2080,12 +2089,12 @@ const ha = (t) => {
2080
2089
  const a = e._zod.bag;
2081
2090
  a.minimum = r.length, a.maximum = r.length, a.length = r.length;
2082
2091
  }), t._zod.check = (e) => {
2083
- const a = e.value, i = a.length;
2084
- if (i === r.length)
2092
+ const a = e.value, n = a.length;
2093
+ if (n === r.length)
2085
2094
  return;
2086
- const n = cr(a), s = i > r.length;
2095
+ const i = cr(a), s = n > r.length;
2087
2096
  e.issues.push({
2088
- origin: n,
2097
+ origin: i,
2089
2098
  ...s ? { code: "too_big", maximum: r.length } : { code: "too_small", minimum: r.length },
2090
2099
  inclusive: !0,
2091
2100
  exact: !0,
@@ -2097,8 +2106,8 @@ const ha = (t) => {
2097
2106
  }), qt = /* @__PURE__ */ d("$ZodCheckStringFormat", (t, r) => {
2098
2107
  var o, e;
2099
2108
  j.init(t, r), t._zod.onattach.push((a) => {
2100
- const i = a._zod.bag;
2101
- i.format = r.format, r.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r.pattern));
2109
+ const n = a._zod.bag;
2110
+ n.format = r.format, r.pattern && (n.patterns ?? (n.patterns = /* @__PURE__ */ new Set()), n.patterns.add(r.pattern));
2102
2111
  }), r.pattern ? (o = t._zod).check ?? (o.check = (a) => {
2103
2112
  r.pattern.lastIndex = 0, !r.pattern.test(a.value) && a.issues.push({
2104
2113
  origin: "string",
@@ -2111,7 +2120,7 @@ const ha = (t) => {
2111
2120
  });
2112
2121
  }) : (e = t._zod).check ?? (e.check = () => {
2113
2122
  });
2114
- }), Za = /* @__PURE__ */ d("$ZodCheckRegex", (t, r) => {
2123
+ }), Ia = /* @__PURE__ */ d("$ZodCheckRegex", (t, r) => {
2115
2124
  qt.init(t, r), t._zod.check = (o) => {
2116
2125
  r.pattern.lastIndex = 0, !r.pattern.test(o.value) && o.issues.push({
2117
2126
  origin: "string",
@@ -2123,16 +2132,16 @@ const ha = (t) => {
2123
2132
  continue: !r.abort
2124
2133
  });
2125
2134
  };
2126
- }), Ia = /* @__PURE__ */ d("$ZodCheckLowerCase", (t, r) => {
2127
- r.pattern ?? (r.pattern = _a), qt.init(t, r);
2128
- }), Pa = /* @__PURE__ */ d("$ZodCheckUpperCase", (t, r) => {
2135
+ }), Pa = /* @__PURE__ */ d("$ZodCheckLowerCase", (t, r) => {
2129
2136
  r.pattern ?? (r.pattern = za), qt.init(t, r);
2130
- }), Ca = /* @__PURE__ */ d("$ZodCheckIncludes", (t, r) => {
2137
+ }), Ca = /* @__PURE__ */ d("$ZodCheckUpperCase", (t, r) => {
2138
+ r.pattern ?? (r.pattern = $a), qt.init(t, r);
2139
+ }), Ta = /* @__PURE__ */ d("$ZodCheckIncludes", (t, r) => {
2131
2140
  j.init(t, r);
2132
2141
  const o = Q(r.includes), e = new RegExp(typeof r.position == "number" ? `^.{${r.position}}${o}` : o);
2133
2142
  r.pattern = e, t._zod.onattach.push((a) => {
2134
- const i = a._zod.bag;
2135
- i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(e);
2143
+ const n = a._zod.bag;
2144
+ n.patterns ?? (n.patterns = /* @__PURE__ */ new Set()), n.patterns.add(e);
2136
2145
  }), t._zod.check = (a) => {
2137
2146
  a.value.includes(r.includes, r.position) || a.issues.push({
2138
2147
  origin: "string",
@@ -2144,7 +2153,7 @@ const ha = (t) => {
2144
2153
  continue: !r.abort
2145
2154
  });
2146
2155
  };
2147
- }), Ta = /* @__PURE__ */ d("$ZodCheckStartsWith", (t, r) => {
2156
+ }), Oa = /* @__PURE__ */ d("$ZodCheckStartsWith", (t, r) => {
2148
2157
  j.init(t, r);
2149
2158
  const o = new RegExp(`^${Q(r.prefix)}.*`);
2150
2159
  r.pattern ?? (r.pattern = o), t._zod.onattach.push((e) => {
@@ -2161,7 +2170,7 @@ const ha = (t) => {
2161
2170
  continue: !r.abort
2162
2171
  });
2163
2172
  };
2164
- }), Oa = /* @__PURE__ */ d("$ZodCheckEndsWith", (t, r) => {
2173
+ }), Ra = /* @__PURE__ */ d("$ZodCheckEndsWith", (t, r) => {
2165
2174
  j.init(t, r);
2166
2175
  const o = new RegExp(`.*${Q(r.suffix)}$`);
2167
2176
  r.pattern ?? (r.pattern = o), t._zod.onattach.push((e) => {
@@ -2178,12 +2187,12 @@ const ha = (t) => {
2178
2187
  continue: !r.abort
2179
2188
  });
2180
2189
  };
2181
- }), Ra = /* @__PURE__ */ d("$ZodCheckOverwrite", (t, r) => {
2190
+ }), Ua = /* @__PURE__ */ d("$ZodCheckOverwrite", (t, r) => {
2182
2191
  j.init(t, r), t._zod.check = (o) => {
2183
2192
  o.value = r.tx(o.value);
2184
2193
  };
2185
2194
  });
2186
- class Ua {
2195
+ class Ma {
2187
2196
  constructor(r = []) {
2188
2197
  this.content = [], this.indent = 0, this && (this.args = r);
2189
2198
  }
@@ -2196,35 +2205,35 @@ class Ua {
2196
2205
  return;
2197
2206
  }
2198
2207
  const e = r.split(`
2199
- `).filter((n) => n), a = Math.min(...e.map((n) => n.length - n.trimStart().length)), i = e.map((n) => n.slice(a)).map((n) => " ".repeat(this.indent * 2) + n);
2200
- for (const n of i)
2201
- this.content.push(n);
2208
+ `).filter((i) => i), a = Math.min(...e.map((i) => i.length - i.trimStart().length)), n = e.map((i) => i.slice(a)).map((i) => " ".repeat(this.indent * 2) + i);
2209
+ for (const i of n)
2210
+ this.content.push(i);
2202
2211
  }
2203
2212
  compile() {
2204
- const r = Function, o = this == null ? void 0 : this.args, a = [...((this == null ? void 0 : this.content) ?? [""]).map((i) => ` ${i}`)];
2213
+ const r = Function, o = this == null ? void 0 : this.args, a = [...((this == null ? void 0 : this.content) ?? [""]).map((n) => ` ${n}`)];
2205
2214
  return new r(...o, a.join(`
2206
2215
  `));
2207
2216
  }
2208
2217
  }
2209
- const Ma = {
2218
+ const Na = {
2210
2219
  major: 4,
2211
2220
  minor: 1,
2212
2221
  patch: 12
2213
2222
  }, w = /* @__PURE__ */ d("$ZodType", (t, r) => {
2214
2223
  var a;
2215
2224
  var o;
2216
- t ?? (t = {}), t._zod.def = r, t._zod.bag = t._zod.bag || {}, t._zod.version = Ma;
2225
+ t ?? (t = {}), t._zod.def = r, t._zod.bag = t._zod.bag || {}, t._zod.version = Na;
2217
2226
  const e = [...t._zod.def.checks ?? []];
2218
2227
  t._zod.traits.has("$ZodCheck") && e.unshift(t);
2219
- for (const i of e)
2220
- for (const n of i._zod.onattach)
2221
- n(t);
2228
+ for (const n of e)
2229
+ for (const i of n._zod.onattach)
2230
+ i(t);
2222
2231
  if (e.length === 0)
2223
2232
  (o = t._zod).deferred ?? (o.deferred = []), (a = t._zod.deferred) == null || a.push(() => {
2224
2233
  t._zod.run = t._zod.parse;
2225
2234
  });
2226
2235
  else {
2227
- const i = (s, l, c) => {
2236
+ const n = (s, l, c) => {
2228
2237
  let p = Y(s), u;
2229
2238
  for (const h of l) {
2230
2239
  if (h._zod.def.when) {
@@ -2246,10 +2255,10 @@ const Ma = {
2246
2255
  }
2247
2256
  }
2248
2257
  return u ? u.then(() => s) : s;
2249
- }, n = (s, l, c) => {
2258
+ }, i = (s, l, c) => {
2250
2259
  if (Y(s))
2251
2260
  return s.aborted = !0, s;
2252
- const p = i(l, e, c);
2261
+ const p = n(l, e, c);
2253
2262
  if (p instanceof Promise) {
2254
2263
  if (c.async === !1)
2255
2264
  throw new K();
@@ -2262,25 +2271,25 @@ const Ma = {
2262
2271
  return t._zod.parse(s, l);
2263
2272
  if (l.direction === "backward") {
2264
2273
  const p = t._zod.parse({ value: s.value, issues: [] }, { ...l, skipChecks: !0 });
2265
- return p instanceof Promise ? p.then((u) => n(u, s, l)) : n(p, s, l);
2274
+ return p instanceof Promise ? p.then((u) => i(u, s, l)) : i(p, s, l);
2266
2275
  }
2267
2276
  const c = t._zod.parse(s, l);
2268
2277
  if (c instanceof Promise) {
2269
2278
  if (l.async === !1)
2270
2279
  throw new K();
2271
- return c.then((p) => i(p, e, l));
2280
+ return c.then((p) => n(p, e, l));
2272
2281
  }
2273
- return i(c, e, l);
2282
+ return n(c, e, l);
2274
2283
  };
2275
2284
  }
2276
2285
  t["~standard"] = {
2277
- validate: (i) => {
2278
- var n;
2286
+ validate: (n) => {
2287
+ var i;
2279
2288
  try {
2280
- const s = De(t, i);
2281
- return s.success ? { value: s.data } : { issues: (n = s.error) == null ? void 0 : n.issues };
2289
+ const s = Le(t, n);
2290
+ return s.success ? { value: s.data } : { issues: (i = s.error) == null ? void 0 : i.issues };
2282
2291
  } catch {
2283
- return Le(t, i).then((l) => {
2292
+ return Be(t, n).then((l) => {
2284
2293
  var c;
2285
2294
  return l.success ? { value: l.data } : { issues: (c = l.error) == null ? void 0 : c.issues };
2286
2295
  });
@@ -2291,7 +2300,7 @@ const Ma = {
2291
2300
  };
2292
2301
  }), mr = /* @__PURE__ */ d("$ZodString", (t, r) => {
2293
2302
  var o;
2294
- w.init(t, r), t._zod.pattern = [...((o = t == null ? void 0 : t._zod.bag) == null ? void 0 : o.patterns) ?? []].pop() ?? ha(t._zod.bag), t._zod.parse = (e, a) => {
2303
+ w.init(t, r), t._zod.pattern = [...((o = t == null ? void 0 : t._zod.bag) == null ? void 0 : o.patterns) ?? []].pop() ?? va(t._zod.bag), t._zod.parse = (e, a) => {
2295
2304
  if (r.coerce)
2296
2305
  try {
2297
2306
  e.value = String(e.value);
@@ -2306,9 +2315,9 @@ const Ma = {
2306
2315
  };
2307
2316
  }), k = /* @__PURE__ */ d("$ZodStringFormat", (t, r) => {
2308
2317
  qt.init(t, r), mr.init(t, r);
2309
- }), Na = /* @__PURE__ */ d("$ZodGUID", (t, r) => {
2310
- r.pattern ?? (r.pattern = ea), k.init(t, r);
2311
- }), Da = /* @__PURE__ */ d("$ZodUUID", (t, r) => {
2318
+ }), Da = /* @__PURE__ */ d("$ZodGUID", (t, r) => {
2319
+ r.pattern ?? (r.pattern = aa), k.init(t, r);
2320
+ }), La = /* @__PURE__ */ d("$ZodUUID", (t, r) => {
2312
2321
  if (r.version) {
2313
2322
  const e = {
2314
2323
  v1: 1,
@@ -2326,9 +2335,9 @@ const Ma = {
2326
2335
  } else
2327
2336
  r.pattern ?? (r.pattern = $r());
2328
2337
  k.init(t, r);
2329
- }), La = /* @__PURE__ */ d("$ZodEmail", (t, r) => {
2330
- r.pattern ?? (r.pattern = aa), k.init(t, r);
2331
- }), Ba = /* @__PURE__ */ d("$ZodURL", (t, r) => {
2338
+ }), Ba = /* @__PURE__ */ d("$ZodEmail", (t, r) => {
2339
+ r.pattern ?? (r.pattern = na), k.init(t, r);
2340
+ }), Fa = /* @__PURE__ */ d("$ZodURL", (t, r) => {
2332
2341
  k.init(t, r), t._zod.check = (o) => {
2333
2342
  try {
2334
2343
  const e = o.value.trim(), a = new URL(e);
@@ -2336,7 +2345,7 @@ const Ma = {
2336
2345
  code: "invalid_format",
2337
2346
  format: "url",
2338
2347
  note: "Invalid hostname",
2339
- pattern: pa.source,
2348
+ pattern: ma.source,
2340
2349
  input: o.value,
2341
2350
  inst: t,
2342
2351
  continue: !r.abort
@@ -2360,35 +2369,35 @@ const Ma = {
2360
2369
  });
2361
2370
  }
2362
2371
  };
2363
- }), Fa = /* @__PURE__ */ d("$ZodEmoji", (t, r) => {
2364
- r.pattern ?? (r.pattern = na()), k.init(t, r);
2365
- }), Ga = /* @__PURE__ */ d("$ZodNanoID", (t, r) => {
2366
- r.pattern ?? (r.pattern = ra), k.init(t, r);
2367
- }), Wa = /* @__PURE__ */ d("$ZodCUID", (t, r) => {
2368
- r.pattern ?? (r.pattern = Je), k.init(t, r);
2369
- }), qa = /* @__PURE__ */ d("$ZodCUID2", (t, r) => {
2372
+ }), Ga = /* @__PURE__ */ d("$ZodEmoji", (t, r) => {
2373
+ r.pattern ?? (r.pattern = sa()), k.init(t, r);
2374
+ }), Wa = /* @__PURE__ */ d("$ZodNanoID", (t, r) => {
2375
+ r.pattern ?? (r.pattern = oa), k.init(t, r);
2376
+ }), qa = /* @__PURE__ */ d("$ZodCUID", (t, r) => {
2370
2377
  r.pattern ?? (r.pattern = Xe), k.init(t, r);
2371
- }), Ya = /* @__PURE__ */ d("$ZodULID", (t, r) => {
2378
+ }), Ya = /* @__PURE__ */ d("$ZodCUID2", (t, r) => {
2372
2379
  r.pattern ?? (r.pattern = He), k.init(t, r);
2373
- }), Va = /* @__PURE__ */ d("$ZodXID", (t, r) => {
2380
+ }), Va = /* @__PURE__ */ d("$ZodULID", (t, r) => {
2374
2381
  r.pattern ?? (r.pattern = Qe), k.init(t, r);
2375
- }), Ka = /* @__PURE__ */ d("$ZodKSUID", (t, r) => {
2382
+ }), Ka = /* @__PURE__ */ d("$ZodXID", (t, r) => {
2376
2383
  r.pattern ?? (r.pattern = ta), k.init(t, r);
2377
- }), Ja = /* @__PURE__ */ d("$ZodISODateTime", (t, r) => {
2384
+ }), Ja = /* @__PURE__ */ d("$ZodKSUID", (t, r) => {
2385
+ r.pattern ?? (r.pattern = ra), k.init(t, r);
2386
+ }), Xa = /* @__PURE__ */ d("$ZodISODateTime", (t, r) => {
2387
+ r.pattern ?? (r.pattern = ha(r)), k.init(t, r);
2388
+ }), Ha = /* @__PURE__ */ d("$ZodISODate", (t, r) => {
2389
+ r.pattern ?? (r.pattern = ua), k.init(t, r);
2390
+ }), Qa = /* @__PURE__ */ d("$ZodISOTime", (t, r) => {
2378
2391
  r.pattern ?? (r.pattern = fa(r)), k.init(t, r);
2379
- }), Xa = /* @__PURE__ */ d("$ZodISODate", (t, r) => {
2380
- r.pattern ?? (r.pattern = ga), k.init(t, r);
2381
- }), Ha = /* @__PURE__ */ d("$ZodISOTime", (t, r) => {
2382
- r.pattern ?? (r.pattern = ua(r)), k.init(t, r);
2383
- }), Qa = /* @__PURE__ */ d("$ZodISODuration", (t, r) => {
2384
- r.pattern ?? (r.pattern = oa), k.init(t, r);
2385
- }), ti = /* @__PURE__ */ d("$ZodIPv4", (t, r) => {
2386
- r.pattern ?? (r.pattern = sa), k.init(t, r), t._zod.onattach.push((o) => {
2392
+ }), tn = /* @__PURE__ */ d("$ZodISODuration", (t, r) => {
2393
+ r.pattern ?? (r.pattern = ea), k.init(t, r);
2394
+ }), rn = /* @__PURE__ */ d("$ZodIPv4", (t, r) => {
2395
+ r.pattern ?? (r.pattern = la), k.init(t, r), t._zod.onattach.push((o) => {
2387
2396
  const e = o._zod.bag;
2388
2397
  e.format = "ipv4";
2389
2398
  });
2390
- }), ri = /* @__PURE__ */ d("$ZodIPv6", (t, r) => {
2391
- r.pattern ?? (r.pattern = la), k.init(t, r), t._zod.onattach.push((o) => {
2399
+ }), on = /* @__PURE__ */ d("$ZodIPv6", (t, r) => {
2400
+ r.pattern ?? (r.pattern = da), k.init(t, r), t._zod.onattach.push((o) => {
2392
2401
  const e = o._zod.bag;
2393
2402
  e.format = "ipv6";
2394
2403
  }), t._zod.check = (o) => {
@@ -2404,21 +2413,21 @@ const Ma = {
2404
2413
  });
2405
2414
  }
2406
2415
  };
2407
- }), oi = /* @__PURE__ */ d("$ZodCIDRv4", (t, r) => {
2408
- r.pattern ?? (r.pattern = da), k.init(t, r);
2409
- }), ei = /* @__PURE__ */ d("$ZodCIDRv6", (t, r) => {
2410
- r.pattern ?? (r.pattern = ca), k.init(t, r), t._zod.check = (o) => {
2416
+ }), en = /* @__PURE__ */ d("$ZodCIDRv4", (t, r) => {
2417
+ r.pattern ?? (r.pattern = ca), k.init(t, r);
2418
+ }), an = /* @__PURE__ */ d("$ZodCIDRv6", (t, r) => {
2419
+ r.pattern ?? (r.pattern = ba), k.init(t, r), t._zod.check = (o) => {
2411
2420
  const e = o.value.split("/");
2412
2421
  try {
2413
2422
  if (e.length !== 2)
2414
2423
  throw new Error();
2415
- const [a, i] = e;
2416
- if (!i)
2424
+ const [a, n] = e;
2425
+ if (!n)
2417
2426
  throw new Error();
2418
- const n = Number(i);
2419
- if (`${n}` !== i)
2427
+ const i = Number(n);
2428
+ if (`${i}` !== n)
2420
2429
  throw new Error();
2421
- if (n < 0 || n > 128)
2430
+ if (i < 0 || i > 128)
2422
2431
  throw new Error();
2423
2432
  new URL(`http://[${a}]`);
2424
2433
  } catch {
@@ -2443,8 +2452,8 @@ function po(t) {
2443
2452
  return !1;
2444
2453
  }
2445
2454
  }
2446
- const ai = /* @__PURE__ */ d("$ZodBase64", (t, r) => {
2447
- r.pattern ?? (r.pattern = ba), k.init(t, r), t._zod.onattach.push((o) => {
2455
+ const nn = /* @__PURE__ */ d("$ZodBase64", (t, r) => {
2456
+ r.pattern ?? (r.pattern = pa), k.init(t, r), t._zod.onattach.push((o) => {
2448
2457
  o._zod.bag.contentEncoding = "base64";
2449
2458
  }), t._zod.check = (o) => {
2450
2459
  po(o.value) || o.issues.push({
@@ -2456,17 +2465,17 @@ const ai = /* @__PURE__ */ d("$ZodBase64", (t, r) => {
2456
2465
  });
2457
2466
  };
2458
2467
  });
2459
- function ii(t) {
2460
- if (!io.test(t))
2468
+ function sn(t) {
2469
+ if (!no.test(t))
2461
2470
  return !1;
2462
2471
  const r = t.replace(/[-_]/g, (e) => e === "-" ? "+" : "/"), o = r.padEnd(Math.ceil(r.length / 4) * 4, "=");
2463
2472
  return po(o);
2464
2473
  }
2465
- const ni = /* @__PURE__ */ d("$ZodBase64URL", (t, r) => {
2466
- r.pattern ?? (r.pattern = io), k.init(t, r), t._zod.onattach.push((o) => {
2474
+ const ln = /* @__PURE__ */ d("$ZodBase64URL", (t, r) => {
2475
+ r.pattern ?? (r.pattern = no), k.init(t, r), t._zod.onattach.push((o) => {
2467
2476
  o._zod.bag.contentEncoding = "base64url";
2468
2477
  }), t._zod.check = (o) => {
2469
- ii(o.value) || o.issues.push({
2478
+ sn(o.value) || o.issues.push({
2470
2479
  code: "invalid_format",
2471
2480
  format: "base64url",
2472
2481
  input: o.value,
@@ -2474,10 +2483,10 @@ const ni = /* @__PURE__ */ d("$ZodBase64URL", (t, r) => {
2474
2483
  continue: !r.abort
2475
2484
  });
2476
2485
  };
2477
- }), si = /* @__PURE__ */ d("$ZodE164", (t, r) => {
2478
- r.pattern ?? (r.pattern = ma), k.init(t, r);
2486
+ }), dn = /* @__PURE__ */ d("$ZodE164", (t, r) => {
2487
+ r.pattern ?? (r.pattern = ga), k.init(t, r);
2479
2488
  });
2480
- function li(t, r = null) {
2489
+ function cn(t, r = null) {
2481
2490
  try {
2482
2491
  const o = t.split(".");
2483
2492
  if (o.length !== 3)
@@ -2491,9 +2500,9 @@ function li(t, r = null) {
2491
2500
  return !1;
2492
2501
  }
2493
2502
  }
2494
- const di = /* @__PURE__ */ d("$ZodJWT", (t, r) => {
2503
+ const bn = /* @__PURE__ */ d("$ZodJWT", (t, r) => {
2495
2504
  k.init(t, r), t._zod.check = (o) => {
2496
- li(o.value, r.alg) || o.issues.push({
2505
+ cn(o.value, r.alg) || o.issues.push({
2497
2506
  code: "invalid_format",
2498
2507
  format: "jwt",
2499
2508
  input: o.value,
@@ -2502,7 +2511,7 @@ const di = /* @__PURE__ */ d("$ZodJWT", (t, r) => {
2502
2511
  });
2503
2512
  };
2504
2513
  }), mo = /* @__PURE__ */ d("$ZodNumber", (t, r) => {
2505
- w.init(t, r), t._zod.pattern = t._zod.bag.pattern ?? xa, t._zod.parse = (o, e) => {
2514
+ w.init(t, r), t._zod.pattern = t._zod.bag.pattern ?? wa, t._zod.parse = (o, e) => {
2506
2515
  if (r.coerce)
2507
2516
  try {
2508
2517
  o.value = Number(o.value);
@@ -2511,19 +2520,19 @@ const di = /* @__PURE__ */ d("$ZodJWT", (t, r) => {
2511
2520
  const a = o.value;
2512
2521
  if (typeof a == "number" && !Number.isNaN(a) && Number.isFinite(a))
2513
2522
  return o;
2514
- const i = typeof a == "number" ? Number.isNaN(a) ? "NaN" : Number.isFinite(a) ? void 0 : "Infinity" : void 0;
2523
+ const n = typeof a == "number" ? Number.isNaN(a) ? "NaN" : Number.isFinite(a) ? void 0 : "Infinity" : void 0;
2515
2524
  return o.issues.push({
2516
2525
  expected: "number",
2517
2526
  code: "invalid_type",
2518
2527
  input: a,
2519
2528
  inst: t,
2520
- ...i ? { received: i } : {}
2529
+ ...n ? { received: n } : {}
2521
2530
  }), o;
2522
2531
  };
2523
- }), ci = /* @__PURE__ */ d("$ZodNumber", (t, r) => {
2524
- Ea.init(t, r), mo.init(t, r);
2525
- }), bi = /* @__PURE__ */ d("$ZodBoolean", (t, r) => {
2526
- w.init(t, r), t._zod.pattern = wa, t._zod.parse = (o, e) => {
2532
+ }), pn = /* @__PURE__ */ d("$ZodNumber", (t, r) => {
2533
+ Aa.init(t, r), mo.init(t, r);
2534
+ }), mn = /* @__PURE__ */ d("$ZodBoolean", (t, r) => {
2535
+ w.init(t, r), t._zod.pattern = ya, t._zod.parse = (o, e) => {
2527
2536
  if (r.coerce)
2528
2537
  try {
2529
2538
  o.value = !!o.value;
@@ -2537,8 +2546,8 @@ const di = /* @__PURE__ */ d("$ZodJWT", (t, r) => {
2537
2546
  inst: t
2538
2547
  }), o;
2539
2548
  };
2540
- }), pi = /* @__PURE__ */ d("$ZodUndefined", (t, r) => {
2541
- w.init(t, r), t._zod.pattern = ka, t._zod.values = /* @__PURE__ */ new Set([void 0]), t._zod.optin = "optional", t._zod.optout = "optional", t._zod.parse = (o, e) => {
2549
+ }), gn = /* @__PURE__ */ d("$ZodUndefined", (t, r) => {
2550
+ w.init(t, r), t._zod.pattern = _a, t._zod.values = /* @__PURE__ */ new Set([void 0]), t._zod.optin = "optional", t._zod.optout = "optional", t._zod.parse = (o, e) => {
2542
2551
  const a = o.value;
2543
2552
  return typeof a > "u" || o.issues.push({
2544
2553
  expected: "undefined",
@@ -2547,8 +2556,8 @@ const di = /* @__PURE__ */ d("$ZodJWT", (t, r) => {
2547
2556
  inst: t
2548
2557
  }), o;
2549
2558
  };
2550
- }), mi = /* @__PURE__ */ d("$ZodNull", (t, r) => {
2551
- w.init(t, r), t._zod.pattern = ya, t._zod.values = /* @__PURE__ */ new Set([null]), t._zod.parse = (o, e) => {
2559
+ }), un = /* @__PURE__ */ d("$ZodNull", (t, r) => {
2560
+ w.init(t, r), t._zod.pattern = ka, t._zod.values = /* @__PURE__ */ new Set([null]), t._zod.parse = (o, e) => {
2552
2561
  const a = o.value;
2553
2562
  return a === null || o.issues.push({
2554
2563
  expected: "null",
@@ -2557,9 +2566,9 @@ const di = /* @__PURE__ */ d("$ZodJWT", (t, r) => {
2557
2566
  inst: t
2558
2567
  }), o;
2559
2568
  };
2560
- }), gi = /* @__PURE__ */ d("$ZodUnknown", (t, r) => {
2569
+ }), fn = /* @__PURE__ */ d("$ZodUnknown", (t, r) => {
2561
2570
  w.init(t, r), t._zod.parse = (o) => o;
2562
- }), ui = /* @__PURE__ */ d("$ZodNever", (t, r) => {
2571
+ }), hn = /* @__PURE__ */ d("$ZodNever", (t, r) => {
2563
2572
  w.init(t, r), t._zod.parse = (o, e) => (o.issues.push({
2564
2573
  expected: "never",
2565
2574
  code: "invalid_type",
@@ -2570,7 +2579,7 @@ const di = /* @__PURE__ */ d("$ZodJWT", (t, r) => {
2570
2579
  function Er(t, r, o) {
2571
2580
  t.issues.length && r.issues.push(...V(o, t.issues)), r.value[o] = t.value;
2572
2581
  }
2573
- const fi = /* @__PURE__ */ d("$ZodArray", (t, r) => {
2582
+ const vn = /* @__PURE__ */ d("$ZodArray", (t, r) => {
2574
2583
  w.init(t, r), t._zod.parse = (o, e) => {
2575
2584
  const a = o.value;
2576
2585
  if (!Array.isArray(a))
@@ -2581,27 +2590,27 @@ const fi = /* @__PURE__ */ d("$ZodArray", (t, r) => {
2581
2590
  inst: t
2582
2591
  }), o;
2583
2592
  o.value = Array(a.length);
2584
- const i = [];
2585
- for (let n = 0; n < a.length; n++) {
2586
- const s = a[n], l = r.element._zod.run({
2593
+ const n = [];
2594
+ for (let i = 0; i < a.length; i++) {
2595
+ const s = a[i], l = r.element._zod.run({
2587
2596
  value: s,
2588
2597
  issues: []
2589
2598
  }, e);
2590
- l instanceof Promise ? i.push(l.then((c) => Er(c, o, n))) : Er(l, o, n);
2599
+ l instanceof Promise ? n.push(l.then((c) => Er(c, o, i))) : Er(l, o, i);
2591
2600
  }
2592
- return i.length ? Promise.all(i).then(() => o) : o;
2601
+ return n.length ? Promise.all(n).then(() => o) : o;
2593
2602
  };
2594
2603
  });
2595
2604
  function Tt(t, r, o, e) {
2596
2605
  t.issues.length && r.issues.push(...V(o, t.issues)), t.value === void 0 ? o in e && (r.value[o] = void 0) : r.value[o] = t.value;
2597
2606
  }
2598
2607
  function go(t) {
2599
- var e, a, i, n;
2608
+ var e, a, n, i;
2600
2609
  const r = Object.keys(t.shape);
2601
2610
  for (const s of r)
2602
- if (!((n = (i = (a = (e = t.shape) == null ? void 0 : e[s]) == null ? void 0 : a._zod) == null ? void 0 : i.traits) != null && n.has("$ZodType")))
2611
+ if (!((i = (n = (a = (e = t.shape) == null ? void 0 : e[s]) == null ? void 0 : a._zod) == null ? void 0 : n.traits) != null && i.has("$ZodType")))
2603
2612
  throw new Error(`Invalid element at key "${s}": expected a Zod schema`);
2604
- const o = Se(t.shape);
2613
+ const o = Ze(t.shape);
2605
2614
  return {
2606
2615
  ...t,
2607
2616
  keys: r,
@@ -2610,26 +2619,26 @@ function go(t) {
2610
2619
  optionalKeys: new Set(o)
2611
2620
  };
2612
2621
  }
2613
- function uo(t, r, o, e, a, i) {
2614
- const n = [], s = a.keySet, l = a.catchall._zod, c = l.def.type;
2622
+ function uo(t, r, o, e, a, n) {
2623
+ const i = [], s = a.keySet, l = a.catchall._zod, c = l.def.type;
2615
2624
  for (const p of Object.keys(r)) {
2616
2625
  if (s.has(p))
2617
2626
  continue;
2618
2627
  if (c === "never") {
2619
- n.push(p);
2628
+ i.push(p);
2620
2629
  continue;
2621
2630
  }
2622
2631
  const u = l.run({ value: r[p], issues: [] }, e);
2623
2632
  u instanceof Promise ? t.push(u.then((h) => Tt(h, o, p, r))) : Tt(u, o, p, r);
2624
2633
  }
2625
- return n.length && o.issues.push({
2634
+ return i.length && o.issues.push({
2626
2635
  code: "unrecognized_keys",
2627
- keys: n,
2636
+ keys: i,
2628
2637
  input: r,
2629
- inst: i
2638
+ inst: n
2630
2639
  }), t.length ? Promise.all(t).then(() => o) : o;
2631
2640
  }
2632
- const hi = /* @__PURE__ */ d("$ZodObject", (t, r) => {
2641
+ const xn = /* @__PURE__ */ d("$ZodObject", (t, r) => {
2633
2642
  w.init(t, r);
2634
2643
  const o = Object.getOwnPropertyDescriptor(r, "shape");
2635
2644
  if (!(o != null && o.get)) {
@@ -2656,10 +2665,10 @@ const hi = /* @__PURE__ */ d("$ZodObject", (t, r) => {
2656
2665
  }
2657
2666
  return l;
2658
2667
  });
2659
- const a = lt, i = r.catchall;
2660
- let n;
2668
+ const a = lt, n = r.catchall;
2669
+ let i;
2661
2670
  t._zod.parse = (s, l) => {
2662
- n ?? (n = e.value);
2671
+ i ?? (i = e.value);
2663
2672
  const c = s.value;
2664
2673
  if (!a(c))
2665
2674
  return s.issues.push({
@@ -2669,17 +2678,17 @@ const hi = /* @__PURE__ */ d("$ZodObject", (t, r) => {
2669
2678
  inst: t
2670
2679
  }), s;
2671
2680
  s.value = {};
2672
- const p = [], u = n.shape;
2673
- for (const h of n.keys) {
2681
+ const p = [], u = i.shape;
2682
+ for (const h of i.keys) {
2674
2683
  const E = u[h]._zod.run({ value: c[h], issues: [] }, l);
2675
2684
  E instanceof Promise ? p.push(E.then((q) => Tt(q, s, h, c))) : Tt(E, s, h, c);
2676
2685
  }
2677
- return i ? uo(p, c, s, l, e.value, t) : p.length ? Promise.all(p).then(() => s) : s;
2686
+ return n ? uo(p, c, s, l, e.value, t) : p.length ? Promise.all(p).then(() => s) : s;
2678
2687
  };
2679
- }), vi = /* @__PURE__ */ d("$ZodObjectJIT", (t, r) => {
2680
- hi.init(t, r);
2688
+ }), wn = /* @__PURE__ */ d("$ZodObjectJIT", (t, r) => {
2689
+ xn.init(t, r);
2681
2690
  const o = t._zod.parse, e = Ft(() => go(r)), a = (h) => {
2682
- const z = new Ua(["shape", "payload", "ctx"]), E = e.value, q = (C) => {
2691
+ const z = new Ma(["shape", "payload", "ctx"]), E = e.value, q = (C) => {
2683
2692
  const P = zr(C);
2684
2693
  return `shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`;
2685
2694
  };
@@ -2714,13 +2723,13 @@ const hi = /* @__PURE__ */ d("$ZodObject", (t, r) => {
2714
2723
  const Ro = z.compile();
2715
2724
  return (C, P) => Ro(h, C, P);
2716
2725
  };
2717
- let i;
2718
- const n = lt, s = !Qr.jitless, c = s && Ae.value, p = r.catchall;
2726
+ let n;
2727
+ const i = lt, s = !Qr.jitless, c = s && je.value, p = r.catchall;
2719
2728
  let u;
2720
2729
  t._zod.parse = (h, z) => {
2721
2730
  u ?? (u = e.value);
2722
2731
  const E = h.value;
2723
- return n(E) ? s && c && (z == null ? void 0 : z.async) === !1 && z.jitless !== !0 ? (i || (i = a(r.shape)), h = i(h, z), p ? uo([], E, h, z, u, t) : h) : o(h, z) : (h.issues.push({
2732
+ return i(E) ? s && c && (z == null ? void 0 : z.async) === !1 && z.jitless !== !0 ? (n || (n = a(r.shape)), h = n(h, z), p ? uo([], E, h, z, u, t) : h) : o(h, z) : (h.issues.push({
2724
2733
  expected: "object",
2725
2734
  code: "invalid_type",
2726
2735
  input: E,
@@ -2729,15 +2738,15 @@ const hi = /* @__PURE__ */ d("$ZodObject", (t, r) => {
2729
2738
  };
2730
2739
  });
2731
2740
  function Ar(t, r, o, e) {
2732
- for (const i of t)
2733
- if (i.issues.length === 0)
2734
- return r.value = i.value, r;
2735
- const a = t.filter((i) => !Y(i));
2741
+ for (const n of t)
2742
+ if (n.issues.length === 0)
2743
+ return r.value = n.value, r;
2744
+ const a = t.filter((n) => !Y(n));
2736
2745
  return a.length === 1 ? (r.value = a[0].value, a[0]) : (r.issues.push({
2737
2746
  code: "invalid_union",
2738
2747
  input: r.value,
2739
2748
  inst: o,
2740
- errors: t.map((i) => i.issues.map((n) => N(n, e, M())))
2749
+ errors: t.map((n) => n.issues.map((i) => N(i, e, M())))
2741
2750
  }), r);
2742
2751
  }
2743
2752
  const fo = /* @__PURE__ */ d("$ZodUnion", (t, r) => {
@@ -2746,41 +2755,41 @@ const fo = /* @__PURE__ */ d("$ZodUnion", (t, r) => {
2746
2755
  return new Set(r.options.flatMap((a) => Array.from(a._zod.values)));
2747
2756
  }), v(t._zod, "pattern", () => {
2748
2757
  if (r.options.every((a) => a._zod.pattern)) {
2749
- const a = r.options.map((i) => i._zod.pattern);
2750
- return new RegExp(`^(${a.map((i) => dr(i.source)).join("|")})$`);
2758
+ const a = r.options.map((n) => n._zod.pattern);
2759
+ return new RegExp(`^(${a.map((n) => dr(n.source)).join("|")})$`);
2751
2760
  }
2752
2761
  });
2753
2762
  const o = r.options.length === 1, e = r.options[0]._zod.run;
2754
- t._zod.parse = (a, i) => {
2763
+ t._zod.parse = (a, n) => {
2755
2764
  if (o)
2756
- return e(a, i);
2757
- let n = !1;
2765
+ return e(a, n);
2766
+ let i = !1;
2758
2767
  const s = [];
2759
2768
  for (const l of r.options) {
2760
2769
  const c = l._zod.run({
2761
2770
  value: a.value,
2762
2771
  issues: []
2763
- }, i);
2772
+ }, n);
2764
2773
  if (c instanceof Promise)
2765
- s.push(c), n = !0;
2774
+ s.push(c), i = !0;
2766
2775
  else {
2767
2776
  if (c.issues.length === 0)
2768
2777
  return c;
2769
2778
  s.push(c);
2770
2779
  }
2771
2780
  }
2772
- return n ? Promise.all(s).then((l) => Ar(l, a, t, i)) : Ar(s, a, t, i);
2781
+ return i ? Promise.all(s).then((l) => Ar(l, a, t, n)) : Ar(s, a, t, n);
2773
2782
  };
2774
- }), xi = /* @__PURE__ */ d("$ZodDiscriminatedUnion", (t, r) => {
2783
+ }), yn = /* @__PURE__ */ d("$ZodDiscriminatedUnion", (t, r) => {
2775
2784
  fo.init(t, r);
2776
2785
  const o = t._zod.parse;
2777
2786
  v(t._zod, "propValues", () => {
2778
2787
  const a = {};
2779
- for (const i of r.options) {
2780
- const n = i._zod.propValues;
2781
- if (!n || Object.keys(n).length === 0)
2782
- throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(i)}"`);
2783
- for (const [s, l] of Object.entries(n)) {
2788
+ for (const n of r.options) {
2789
+ const i = n._zod.propValues;
2790
+ if (!i || Object.keys(i).length === 0)
2791
+ throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(n)}"`);
2792
+ for (const [s, l] of Object.entries(i)) {
2784
2793
  a[s] || (a[s] = /* @__PURE__ */ new Set());
2785
2794
  for (const c of l)
2786
2795
  a[s].add(c);
@@ -2789,44 +2798,44 @@ const fo = /* @__PURE__ */ d("$ZodUnion", (t, r) => {
2789
2798
  return a;
2790
2799
  });
2791
2800
  const e = Ft(() => {
2792
- var n;
2793
- const a = r.options, i = /* @__PURE__ */ new Map();
2801
+ var i;
2802
+ const a = r.options, n = /* @__PURE__ */ new Map();
2794
2803
  for (const s of a) {
2795
- const l = (n = s._zod.propValues) == null ? void 0 : n[r.discriminator];
2804
+ const l = (i = s._zod.propValues) == null ? void 0 : i[r.discriminator];
2796
2805
  if (!l || l.size === 0)
2797
2806
  throw new Error(`Invalid discriminated union option at index "${r.options.indexOf(s)}"`);
2798
2807
  for (const c of l) {
2799
- if (i.has(c))
2808
+ if (n.has(c))
2800
2809
  throw new Error(`Duplicate discriminator value "${String(c)}"`);
2801
- i.set(c, s);
2810
+ n.set(c, s);
2802
2811
  }
2803
2812
  }
2804
- return i;
2813
+ return n;
2805
2814
  });
2806
- t._zod.parse = (a, i) => {
2807
- const n = a.value;
2808
- if (!lt(n))
2815
+ t._zod.parse = (a, n) => {
2816
+ const i = a.value;
2817
+ if (!lt(i))
2809
2818
  return a.issues.push({
2810
2819
  code: "invalid_type",
2811
2820
  expected: "object",
2812
- input: n,
2821
+ input: i,
2813
2822
  inst: t
2814
2823
  }), a;
2815
- const s = e.value.get(n == null ? void 0 : n[r.discriminator]);
2816
- return s ? s._zod.run(a, i) : r.unionFallback ? o(a, i) : (a.issues.push({
2824
+ const s = e.value.get(i == null ? void 0 : i[r.discriminator]);
2825
+ return s ? s._zod.run(a, n) : r.unionFallback ? o(a, n) : (a.issues.push({
2817
2826
  code: "invalid_union",
2818
2827
  errors: [],
2819
2828
  note: "No matching discriminator",
2820
2829
  discriminator: r.discriminator,
2821
- input: n,
2830
+ input: i,
2822
2831
  path: [r.discriminator],
2823
2832
  inst: t
2824
2833
  }), a);
2825
2834
  };
2826
- }), wi = /* @__PURE__ */ d("$ZodIntersection", (t, r) => {
2835
+ }), kn = /* @__PURE__ */ d("$ZodIntersection", (t, r) => {
2827
2836
  w.init(t, r), t._zod.parse = (o, e) => {
2828
- const a = o.value, i = r.left._zod.run({ value: a, issues: [] }, e), n = r.right._zod.run({ value: a, issues: [] }, e);
2829
- return i instanceof Promise || n instanceof Promise ? Promise.all([i, n]).then(([l, c]) => jr(o, l, c)) : jr(o, i, n);
2837
+ const a = o.value, n = r.left._zod.run({ value: a, issues: [] }, e), i = r.right._zod.run({ value: a, issues: [] }, e);
2838
+ return n instanceof Promise || i instanceof Promise ? Promise.all([n, i]).then(([l, c]) => jr(o, l, c)) : jr(o, n, i);
2830
2839
  };
2831
2840
  });
2832
2841
  function rr(t, r) {
@@ -2835,15 +2844,15 @@ function rr(t, r) {
2835
2844
  if (t instanceof Date && r instanceof Date && +t == +r)
2836
2845
  return { valid: !0, data: t };
2837
2846
  if (H(t) && H(r)) {
2838
- const o = Object.keys(r), e = Object.keys(t).filter((i) => o.indexOf(i) !== -1), a = { ...t, ...r };
2839
- for (const i of e) {
2840
- const n = rr(t[i], r[i]);
2841
- if (!n.valid)
2847
+ const o = Object.keys(r), e = Object.keys(t).filter((n) => o.indexOf(n) !== -1), a = { ...t, ...r };
2848
+ for (const n of e) {
2849
+ const i = rr(t[n], r[n]);
2850
+ if (!i.valid)
2842
2851
  return {
2843
2852
  valid: !1,
2844
- mergeErrorPath: [i, ...n.mergeErrorPath]
2853
+ mergeErrorPath: [n, ...i.mergeErrorPath]
2845
2854
  };
2846
- a[i] = n.data;
2855
+ a[n] = i.data;
2847
2856
  }
2848
2857
  return { valid: !0, data: a };
2849
2858
  }
@@ -2852,13 +2861,13 @@ function rr(t, r) {
2852
2861
  return { valid: !1, mergeErrorPath: [] };
2853
2862
  const o = [];
2854
2863
  for (let e = 0; e < t.length; e++) {
2855
- const a = t[e], i = r[e], n = rr(a, i);
2856
- if (!n.valid)
2864
+ const a = t[e], n = r[e], i = rr(a, n);
2865
+ if (!i.valid)
2857
2866
  return {
2858
2867
  valid: !1,
2859
- mergeErrorPath: [e, ...n.mergeErrorPath]
2868
+ mergeErrorPath: [e, ...i.mergeErrorPath]
2860
2869
  };
2861
- o.push(n.data);
2870
+ o.push(i.data);
2862
2871
  }
2863
2872
  return { valid: !0, data: o };
2864
2873
  }
@@ -2872,7 +2881,7 @@ function jr(t, r, o) {
2872
2881
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(e.mergeErrorPath)}`);
2873
2882
  return t.value = e.data, t;
2874
2883
  }
2875
- const yi = /* @__PURE__ */ d("$ZodRecord", (t, r) => {
2884
+ const _n = /* @__PURE__ */ d("$ZodRecord", (t, r) => {
2876
2885
  w.init(t, r), t._zod.parse = (o, e) => {
2877
2886
  const a = o.value;
2878
2887
  if (!H(a))
@@ -2882,20 +2891,20 @@ const yi = /* @__PURE__ */ d("$ZodRecord", (t, r) => {
2882
2891
  input: a,
2883
2892
  inst: t
2884
2893
  }), o;
2885
- const i = [];
2894
+ const n = [];
2886
2895
  if (r.keyType._zod.values) {
2887
- const n = r.keyType._zod.values;
2896
+ const i = r.keyType._zod.values;
2888
2897
  o.value = {};
2889
- for (const l of n)
2898
+ for (const l of i)
2890
2899
  if (typeof l == "string" || typeof l == "number" || typeof l == "symbol") {
2891
2900
  const c = r.valueType._zod.run({ value: a[l], issues: [] }, e);
2892
- c instanceof Promise ? i.push(c.then((p) => {
2901
+ c instanceof Promise ? n.push(c.then((p) => {
2893
2902
  p.issues.length && o.issues.push(...V(l, p.issues)), o.value[l] = p.value;
2894
2903
  })) : (c.issues.length && o.issues.push(...V(l, c.issues)), o.value[l] = c.value);
2895
2904
  }
2896
2905
  let s;
2897
2906
  for (const l in a)
2898
- n.has(l) || (s = s ?? [], s.push(l));
2907
+ i.has(l) || (s = s ?? [], s.push(l));
2899
2908
  s && s.length > 0 && o.issues.push({
2900
2909
  code: "unrecognized_keys",
2901
2910
  input: a,
@@ -2904,10 +2913,10 @@ const yi = /* @__PURE__ */ d("$ZodRecord", (t, r) => {
2904
2913
  });
2905
2914
  } else {
2906
2915
  o.value = {};
2907
- for (const n of Reflect.ownKeys(a)) {
2908
- if (n === "__proto__")
2916
+ for (const i of Reflect.ownKeys(a)) {
2917
+ if (i === "__proto__")
2909
2918
  continue;
2910
- const s = r.keyType._zod.run({ value: n, issues: [] }, e);
2919
+ const s = r.keyType._zod.run({ value: i, issues: [] }, e);
2911
2920
  if (s instanceof Promise)
2912
2921
  throw new Error("Async schemas not supported in object keys currently");
2913
2922
  if (s.issues.length) {
@@ -2915,33 +2924,33 @@ const yi = /* @__PURE__ */ d("$ZodRecord", (t, r) => {
2915
2924
  code: "invalid_key",
2916
2925
  origin: "record",
2917
2926
  issues: s.issues.map((c) => N(c, e, M())),
2918
- input: n,
2919
- path: [n],
2927
+ input: i,
2928
+ path: [i],
2920
2929
  inst: t
2921
2930
  }), o.value[s.value] = s.value;
2922
2931
  continue;
2923
2932
  }
2924
- const l = r.valueType._zod.run({ value: a[n], issues: [] }, e);
2925
- l instanceof Promise ? i.push(l.then((c) => {
2926
- c.issues.length && o.issues.push(...V(n, c.issues)), o.value[s.value] = c.value;
2927
- })) : (l.issues.length && o.issues.push(...V(n, l.issues)), o.value[s.value] = l.value);
2933
+ const l = r.valueType._zod.run({ value: a[i], issues: [] }, e);
2934
+ l instanceof Promise ? n.push(l.then((c) => {
2935
+ c.issues.length && o.issues.push(...V(i, c.issues)), o.value[s.value] = c.value;
2936
+ })) : (l.issues.length && o.issues.push(...V(i, l.issues)), o.value[s.value] = l.value);
2928
2937
  }
2929
2938
  }
2930
- return i.length ? Promise.all(i).then(() => o) : o;
2939
+ return n.length ? Promise.all(n).then(() => o) : o;
2931
2940
  };
2932
- }), ki = /* @__PURE__ */ d("$ZodEnum", (t, r) => {
2941
+ }), zn = /* @__PURE__ */ d("$ZodEnum", (t, r) => {
2933
2942
  w.init(t, r);
2934
- const o = $e(r.entries), e = new Set(o);
2935
- t._zod.values = e, t._zod.pattern = new RegExp(`^(${o.filter((a) => je.has(typeof a)).map((a) => typeof a == "string" ? Q(a) : a.toString()).join("|")})$`), t._zod.parse = (a, i) => {
2936
- const n = a.value;
2937
- return e.has(n) || a.issues.push({
2943
+ const o = Ee(r.entries), e = new Set(o);
2944
+ t._zod.values = e, t._zod.pattern = new RegExp(`^(${o.filter((a) => Se.has(typeof a)).map((a) => typeof a == "string" ? Q(a) : a.toString()).join("|")})$`), t._zod.parse = (a, n) => {
2945
+ const i = a.value;
2946
+ return e.has(i) || a.issues.push({
2938
2947
  code: "invalid_value",
2939
2948
  values: o,
2940
- input: n,
2949
+ input: i,
2941
2950
  inst: t
2942
2951
  }), a;
2943
2952
  };
2944
- }), _i = /* @__PURE__ */ d("$ZodLiteral", (t, r) => {
2953
+ }), $n = /* @__PURE__ */ d("$ZodLiteral", (t, r) => {
2945
2954
  if (w.init(t, r), r.values.length === 0)
2946
2955
  throw new Error("Cannot create literal schema with no valid values");
2947
2956
  t._zod.values = new Set(r.values), t._zod.pattern = new RegExp(`^(${r.values.map((o) => typeof o == "string" ? Q(o) : o ? Q(o.toString()) : String(o)).join("|")})$`), t._zod.parse = (o, e) => {
@@ -2953,13 +2962,13 @@ const yi = /* @__PURE__ */ d("$ZodRecord", (t, r) => {
2953
2962
  inst: t
2954
2963
  }), o;
2955
2964
  };
2956
- }), zi = /* @__PURE__ */ d("$ZodTransform", (t, r) => {
2965
+ }), En = /* @__PURE__ */ d("$ZodTransform", (t, r) => {
2957
2966
  w.init(t, r), t._zod.parse = (o, e) => {
2958
2967
  if (e.direction === "backward")
2959
2968
  throw new Hr(t.constructor.name);
2960
2969
  const a = r.transform(o.value, o);
2961
2970
  if (e.async)
2962
- return (a instanceof Promise ? a : Promise.resolve(a)).then((n) => (o.value = n, o));
2971
+ return (a instanceof Promise ? a : Promise.resolve(a)).then((i) => (o.value = i, o));
2963
2972
  if (a instanceof Promise)
2964
2973
  throw new K();
2965
2974
  return o.value = a, o;
@@ -2968,44 +2977,44 @@ const yi = /* @__PURE__ */ d("$ZodRecord", (t, r) => {
2968
2977
  function Sr(t, r) {
2969
2978
  return t.issues.length && r === void 0 ? { issues: [], value: void 0 } : t;
2970
2979
  }
2971
- const $i = /* @__PURE__ */ d("$ZodOptional", (t, r) => {
2980
+ const An = /* @__PURE__ */ d("$ZodOptional", (t, r) => {
2972
2981
  w.init(t, r), t._zod.optin = "optional", t._zod.optout = "optional", v(t._zod, "values", () => r.innerType._zod.values ? /* @__PURE__ */ new Set([...r.innerType._zod.values, void 0]) : void 0), v(t._zod, "pattern", () => {
2973
2982
  const o = r.innerType._zod.pattern;
2974
2983
  return o ? new RegExp(`^(${dr(o.source)})?$`) : void 0;
2975
2984
  }), t._zod.parse = (o, e) => {
2976
2985
  if (r.innerType._zod.optin === "optional") {
2977
2986
  const a = r.innerType._zod.run(o, e);
2978
- return a instanceof Promise ? a.then((i) => Sr(i, o.value)) : Sr(a, o.value);
2987
+ return a instanceof Promise ? a.then((n) => Sr(n, o.value)) : Sr(a, o.value);
2979
2988
  }
2980
2989
  return o.value === void 0 ? o : r.innerType._zod.run(o, e);
2981
2990
  };
2982
- }), Ei = /* @__PURE__ */ d("$ZodNullable", (t, r) => {
2991
+ }), jn = /* @__PURE__ */ d("$ZodNullable", (t, r) => {
2983
2992
  w.init(t, r), v(t._zod, "optin", () => r.innerType._zod.optin), v(t._zod, "optout", () => r.innerType._zod.optout), v(t._zod, "pattern", () => {
2984
2993
  const o = r.innerType._zod.pattern;
2985
2994
  return o ? new RegExp(`^(${dr(o.source)}|null)$`) : void 0;
2986
2995
  }), v(t._zod, "values", () => r.innerType._zod.values ? /* @__PURE__ */ new Set([...r.innerType._zod.values, null]) : void 0), t._zod.parse = (o, e) => o.value === null ? o : r.innerType._zod.run(o, e);
2987
- }), Ai = /* @__PURE__ */ d("$ZodDefault", (t, r) => {
2996
+ }), Sn = /* @__PURE__ */ d("$ZodDefault", (t, r) => {
2988
2997
  w.init(t, r), t._zod.optin = "optional", v(t._zod, "values", () => r.innerType._zod.values), t._zod.parse = (o, e) => {
2989
2998
  if (e.direction === "backward")
2990
2999
  return r.innerType._zod.run(o, e);
2991
3000
  if (o.value === void 0)
2992
3001
  return o.value = r.defaultValue, o;
2993
3002
  const a = r.innerType._zod.run(o, e);
2994
- return a instanceof Promise ? a.then((i) => Zr(i, r)) : Zr(a, r);
3003
+ return a instanceof Promise ? a.then((n) => Zr(n, r)) : Zr(a, r);
2995
3004
  };
2996
3005
  });
2997
3006
  function Zr(t, r) {
2998
3007
  return t.value === void 0 && (t.value = r.defaultValue), t;
2999
3008
  }
3000
- const ji = /* @__PURE__ */ d("$ZodPrefault", (t, r) => {
3009
+ const Zn = /* @__PURE__ */ d("$ZodPrefault", (t, r) => {
3001
3010
  w.init(t, r), t._zod.optin = "optional", v(t._zod, "values", () => r.innerType._zod.values), t._zod.parse = (o, e) => (e.direction === "backward" || o.value === void 0 && (o.value = r.defaultValue), r.innerType._zod.run(o, e));
3002
- }), Si = /* @__PURE__ */ d("$ZodNonOptional", (t, r) => {
3011
+ }), In = /* @__PURE__ */ d("$ZodNonOptional", (t, r) => {
3003
3012
  w.init(t, r), v(t._zod, "values", () => {
3004
3013
  const o = r.innerType._zod.values;
3005
3014
  return o ? new Set([...o].filter((e) => e !== void 0)) : void 0;
3006
3015
  }), t._zod.parse = (o, e) => {
3007
3016
  const a = r.innerType._zod.run(o, e);
3008
- return a instanceof Promise ? a.then((i) => Ir(i, t)) : Ir(a, t);
3017
+ return a instanceof Promise ? a.then((n) => Ir(n, t)) : Ir(a, t);
3009
3018
  };
3010
3019
  });
3011
3020
  function Ir(t, r) {
@@ -3016,39 +3025,39 @@ function Ir(t, r) {
3016
3025
  inst: r
3017
3026
  }), t;
3018
3027
  }
3019
- const Zi = /* @__PURE__ */ d("$ZodCatch", (t, r) => {
3028
+ const Pn = /* @__PURE__ */ d("$ZodCatch", (t, r) => {
3020
3029
  w.init(t, r), v(t._zod, "optin", () => r.innerType._zod.optin), v(t._zod, "optout", () => r.innerType._zod.optout), v(t._zod, "values", () => r.innerType._zod.values), t._zod.parse = (o, e) => {
3021
3030
  if (e.direction === "backward")
3022
3031
  return r.innerType._zod.run(o, e);
3023
3032
  const a = r.innerType._zod.run(o, e);
3024
- return a instanceof Promise ? a.then((i) => (o.value = i.value, i.issues.length && (o.value = r.catchValue({
3033
+ return a instanceof Promise ? a.then((n) => (o.value = n.value, n.issues.length && (o.value = r.catchValue({
3025
3034
  ...o,
3026
3035
  error: {
3027
- issues: i.issues.map((n) => N(n, e, M()))
3036
+ issues: n.issues.map((i) => N(i, e, M()))
3028
3037
  },
3029
3038
  input: o.value
3030
3039
  }), o.issues = []), o)) : (o.value = a.value, a.issues.length && (o.value = r.catchValue({
3031
3040
  ...o,
3032
3041
  error: {
3033
- issues: a.issues.map((i) => N(i, e, M()))
3042
+ issues: a.issues.map((n) => N(n, e, M()))
3034
3043
  },
3035
3044
  input: o.value
3036
3045
  }), o.issues = []), o);
3037
3046
  };
3038
- }), Ii = /* @__PURE__ */ d("$ZodPipe", (t, r) => {
3047
+ }), Cn = /* @__PURE__ */ d("$ZodPipe", (t, r) => {
3039
3048
  w.init(t, r), v(t._zod, "values", () => r.in._zod.values), v(t._zod, "optin", () => r.in._zod.optin), v(t._zod, "optout", () => r.out._zod.optout), v(t._zod, "propValues", () => r.in._zod.propValues), t._zod.parse = (o, e) => {
3040
3049
  if (e.direction === "backward") {
3041
- const i = r.out._zod.run(o, e);
3042
- return i instanceof Promise ? i.then((n) => ut(n, r.in, e)) : ut(i, r.in, e);
3050
+ const n = r.out._zod.run(o, e);
3051
+ return n instanceof Promise ? n.then((i) => ut(i, r.in, e)) : ut(n, r.in, e);
3043
3052
  }
3044
3053
  const a = r.in._zod.run(o, e);
3045
- return a instanceof Promise ? a.then((i) => ut(i, r.out, e)) : ut(a, r.out, e);
3054
+ return a instanceof Promise ? a.then((n) => ut(n, r.out, e)) : ut(a, r.out, e);
3046
3055
  };
3047
3056
  });
3048
3057
  function ut(t, r, o) {
3049
3058
  return t.issues.length ? (t.aborted = !0, t) : r._zod.run({ value: t.value, issues: t.issues }, o);
3050
3059
  }
3051
- const Pi = /* @__PURE__ */ d("$ZodReadonly", (t, r) => {
3060
+ const Tn = /* @__PURE__ */ d("$ZodReadonly", (t, r) => {
3052
3061
  w.init(t, r), v(t._zod, "propValues", () => r.innerType._zod.propValues), v(t._zod, "values", () => r.innerType._zod.values), v(t._zod, "optin", () => r.innerType._zod.optin), v(t._zod, "optout", () => r.innerType._zod.optout), t._zod.parse = (o, e) => {
3053
3062
  if (e.direction === "backward")
3054
3063
  return r.innerType._zod.run(o, e);
@@ -3059,11 +3068,11 @@ const Pi = /* @__PURE__ */ d("$ZodReadonly", (t, r) => {
3059
3068
  function Pr(t) {
3060
3069
  return t.value = Object.freeze(t.value), t;
3061
3070
  }
3062
- const Ci = /* @__PURE__ */ d("$ZodCustom", (t, r) => {
3071
+ const On = /* @__PURE__ */ d("$ZodCustom", (t, r) => {
3063
3072
  j.init(t, r), w.init(t, r), t._zod.parse = (o, e) => o, t._zod.check = (o) => {
3064
3073
  const e = o.value, a = r.fn(e);
3065
3074
  if (a instanceof Promise)
3066
- return a.then((i) => Cr(i, o, e, t));
3075
+ return a.then((n) => Cr(n, o, e, t));
3067
3076
  Cr(a, o, e, t);
3068
3077
  };
3069
3078
  });
@@ -3082,7 +3091,7 @@ function Cr(t, r, o, e) {
3082
3091
  e._zod.def.params && (a.params = e._zod.def.params), r.issues.push(dt(a));
3083
3092
  }
3084
3093
  }
3085
- class Ti {
3094
+ class Rn {
3086
3095
  constructor() {
3087
3096
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
3088
3097
  }
@@ -3116,17 +3125,17 @@ class Ti {
3116
3125
  return this._map.has(r);
3117
3126
  }
3118
3127
  }
3119
- function Oi() {
3120
- return new Ti();
3128
+ function Un() {
3129
+ return new Rn();
3121
3130
  }
3122
- const ft = /* @__PURE__ */ Oi();
3123
- function Ri(t, r) {
3131
+ const ft = /* @__PURE__ */ Un();
3132
+ function Mn(t, r) {
3124
3133
  return new t({
3125
3134
  type: "string",
3126
3135
  ...b(r)
3127
3136
  });
3128
3137
  }
3129
- function Ui(t, r) {
3138
+ function Nn(t, r) {
3130
3139
  return new t({
3131
3140
  type: "string",
3132
3141
  format: "email",
@@ -3144,7 +3153,7 @@ function Tr(t, r) {
3144
3153
  ...b(r)
3145
3154
  });
3146
3155
  }
3147
- function Mi(t, r) {
3156
+ function Dn(t, r) {
3148
3157
  return new t({
3149
3158
  type: "string",
3150
3159
  format: "uuid",
@@ -3153,7 +3162,7 @@ function Mi(t, r) {
3153
3162
  ...b(r)
3154
3163
  });
3155
3164
  }
3156
- function Ni(t, r) {
3165
+ function Ln(t, r) {
3157
3166
  return new t({
3158
3167
  type: "string",
3159
3168
  format: "uuid",
@@ -3163,7 +3172,7 @@ function Ni(t, r) {
3163
3172
  ...b(r)
3164
3173
  });
3165
3174
  }
3166
- function Di(t, r) {
3175
+ function Bn(t, r) {
3167
3176
  return new t({
3168
3177
  type: "string",
3169
3178
  format: "uuid",
@@ -3173,7 +3182,7 @@ function Di(t, r) {
3173
3182
  ...b(r)
3174
3183
  });
3175
3184
  }
3176
- function Li(t, r) {
3185
+ function Fn(t, r) {
3177
3186
  return new t({
3178
3187
  type: "string",
3179
3188
  format: "uuid",
@@ -3183,7 +3192,7 @@ function Li(t, r) {
3183
3192
  ...b(r)
3184
3193
  });
3185
3194
  }
3186
- function Bi(t, r) {
3195
+ function Gn(t, r) {
3187
3196
  return new t({
3188
3197
  type: "string",
3189
3198
  format: "url",
@@ -3192,7 +3201,7 @@ function Bi(t, r) {
3192
3201
  ...b(r)
3193
3202
  });
3194
3203
  }
3195
- function Fi(t, r) {
3204
+ function Wn(t, r) {
3196
3205
  return new t({
3197
3206
  type: "string",
3198
3207
  format: "emoji",
@@ -3201,7 +3210,7 @@ function Fi(t, r) {
3201
3210
  ...b(r)
3202
3211
  });
3203
3212
  }
3204
- function Gi(t, r) {
3213
+ function qn(t, r) {
3205
3214
  return new t({
3206
3215
  type: "string",
3207
3216
  format: "nanoid",
@@ -3210,7 +3219,7 @@ function Gi(t, r) {
3210
3219
  ...b(r)
3211
3220
  });
3212
3221
  }
3213
- function Wi(t, r) {
3222
+ function Yn(t, r) {
3214
3223
  return new t({
3215
3224
  type: "string",
3216
3225
  format: "cuid",
@@ -3219,7 +3228,7 @@ function Wi(t, r) {
3219
3228
  ...b(r)
3220
3229
  });
3221
3230
  }
3222
- function qi(t, r) {
3231
+ function Vn(t, r) {
3223
3232
  return new t({
3224
3233
  type: "string",
3225
3234
  format: "cuid2",
@@ -3228,7 +3237,7 @@ function qi(t, r) {
3228
3237
  ...b(r)
3229
3238
  });
3230
3239
  }
3231
- function Yi(t, r) {
3240
+ function Kn(t, r) {
3232
3241
  return new t({
3233
3242
  type: "string",
3234
3243
  format: "ulid",
@@ -3237,7 +3246,7 @@ function Yi(t, r) {
3237
3246
  ...b(r)
3238
3247
  });
3239
3248
  }
3240
- function Vi(t, r) {
3249
+ function Jn(t, r) {
3241
3250
  return new t({
3242
3251
  type: "string",
3243
3252
  format: "xid",
@@ -3246,7 +3255,7 @@ function Vi(t, r) {
3246
3255
  ...b(r)
3247
3256
  });
3248
3257
  }
3249
- function Ki(t, r) {
3258
+ function Xn(t, r) {
3250
3259
  return new t({
3251
3260
  type: "string",
3252
3261
  format: "ksuid",
@@ -3255,7 +3264,7 @@ function Ki(t, r) {
3255
3264
  ...b(r)
3256
3265
  });
3257
3266
  }
3258
- function Ji(t, r) {
3267
+ function Hn(t, r) {
3259
3268
  return new t({
3260
3269
  type: "string",
3261
3270
  format: "ipv4",
@@ -3264,7 +3273,7 @@ function Ji(t, r) {
3264
3273
  ...b(r)
3265
3274
  });
3266
3275
  }
3267
- function Xi(t, r) {
3276
+ function Qn(t, r) {
3268
3277
  return new t({
3269
3278
  type: "string",
3270
3279
  format: "ipv6",
@@ -3273,7 +3282,7 @@ function Xi(t, r) {
3273
3282
  ...b(r)
3274
3283
  });
3275
3284
  }
3276
- function Hi(t, r) {
3285
+ function ti(t, r) {
3277
3286
  return new t({
3278
3287
  type: "string",
3279
3288
  format: "cidrv4",
@@ -3282,7 +3291,7 @@ function Hi(t, r) {
3282
3291
  ...b(r)
3283
3292
  });
3284
3293
  }
3285
- function Qi(t, r) {
3294
+ function ri(t, r) {
3286
3295
  return new t({
3287
3296
  type: "string",
3288
3297
  format: "cidrv6",
@@ -3291,7 +3300,7 @@ function Qi(t, r) {
3291
3300
  ...b(r)
3292
3301
  });
3293
3302
  }
3294
- function tn(t, r) {
3303
+ function oi(t, r) {
3295
3304
  return new t({
3296
3305
  type: "string",
3297
3306
  format: "base64",
@@ -3300,7 +3309,7 @@ function tn(t, r) {
3300
3309
  ...b(r)
3301
3310
  });
3302
3311
  }
3303
- function rn(t, r) {
3312
+ function ei(t, r) {
3304
3313
  return new t({
3305
3314
  type: "string",
3306
3315
  format: "base64url",
@@ -3309,7 +3318,7 @@ function rn(t, r) {
3309
3318
  ...b(r)
3310
3319
  });
3311
3320
  }
3312
- function on(t, r) {
3321
+ function ai(t, r) {
3313
3322
  return new t({
3314
3323
  type: "string",
3315
3324
  format: "e164",
@@ -3318,7 +3327,7 @@ function on(t, r) {
3318
3327
  ...b(r)
3319
3328
  });
3320
3329
  }
3321
- function en(t, r) {
3330
+ function ni(t, r) {
3322
3331
  return new t({
3323
3332
  type: "string",
3324
3333
  format: "jwt",
@@ -3327,7 +3336,7 @@ function en(t, r) {
3327
3336
  ...b(r)
3328
3337
  });
3329
3338
  }
3330
- function an(t, r) {
3339
+ function ii(t, r) {
3331
3340
  return new t({
3332
3341
  type: "string",
3333
3342
  format: "datetime",
@@ -3338,7 +3347,7 @@ function an(t, r) {
3338
3347
  ...b(r)
3339
3348
  });
3340
3349
  }
3341
- function nn(t, r) {
3350
+ function si(t, r) {
3342
3351
  return new t({
3343
3352
  type: "string",
3344
3353
  format: "date",
@@ -3346,7 +3355,7 @@ function nn(t, r) {
3346
3355
  ...b(r)
3347
3356
  });
3348
3357
  }
3349
- function sn(t, r) {
3358
+ function li(t, r) {
3350
3359
  return new t({
3351
3360
  type: "string",
3352
3361
  format: "time",
@@ -3355,7 +3364,7 @@ function sn(t, r) {
3355
3364
  ...b(r)
3356
3365
  });
3357
3366
  }
3358
- function ln(t, r) {
3367
+ function di(t, r) {
3359
3368
  return new t({
3360
3369
  type: "string",
3361
3370
  format: "duration",
@@ -3363,14 +3372,14 @@ function ln(t, r) {
3363
3372
  ...b(r)
3364
3373
  });
3365
3374
  }
3366
- function dn(t, r) {
3375
+ function ci(t, r) {
3367
3376
  return new t({
3368
3377
  type: "number",
3369
3378
  checks: [],
3370
3379
  ...b(r)
3371
3380
  });
3372
3381
  }
3373
- function cn(t, r) {
3382
+ function bi(t, r) {
3374
3383
  return new t({
3375
3384
  type: "number",
3376
3385
  check: "number_format",
@@ -3379,30 +3388,30 @@ function cn(t, r) {
3379
3388
  ...b(r)
3380
3389
  });
3381
3390
  }
3382
- function bn(t, r) {
3391
+ function pi(t, r) {
3383
3392
  return new t({
3384
3393
  type: "boolean",
3385
3394
  ...b(r)
3386
3395
  });
3387
3396
  }
3388
- function pn(t, r) {
3397
+ function mi(t, r) {
3389
3398
  return new t({
3390
3399
  type: "undefined",
3391
3400
  ...b(r)
3392
3401
  });
3393
3402
  }
3394
- function mn(t, r) {
3403
+ function gi(t, r) {
3395
3404
  return new t({
3396
3405
  type: "null",
3397
3406
  ...b(r)
3398
3407
  });
3399
3408
  }
3400
- function gn(t) {
3409
+ function ui(t) {
3401
3410
  return new t({
3402
3411
  type: "unknown"
3403
3412
  });
3404
3413
  }
3405
- function un(t, r) {
3414
+ function fi(t, r) {
3406
3415
  return new t({
3407
3416
  type: "never",
3408
3417
  ...b(r)
@@ -3441,73 +3450,73 @@ function Ht(t, r) {
3441
3450
  });
3442
3451
  }
3443
3452
  function Ur(t, r) {
3444
- return new $a({
3453
+ return new Ea({
3445
3454
  check: "multiple_of",
3446
3455
  ...b(r),
3447
3456
  value: t
3448
3457
  });
3449
3458
  }
3450
3459
  function ho(t, r) {
3451
- return new Aa({
3460
+ return new ja({
3452
3461
  check: "max_length",
3453
3462
  ...b(r),
3454
3463
  maximum: t
3455
3464
  });
3456
3465
  }
3457
3466
  function Ot(t, r) {
3458
- return new ja({
3467
+ return new Sa({
3459
3468
  check: "min_length",
3460
3469
  ...b(r),
3461
3470
  minimum: t
3462
3471
  });
3463
3472
  }
3464
3473
  function vo(t, r) {
3465
- return new Sa({
3474
+ return new Za({
3466
3475
  check: "length_equals",
3467
3476
  ...b(r),
3468
3477
  length: t
3469
3478
  });
3470
3479
  }
3471
- function fn(t, r) {
3472
- return new Za({
3480
+ function hi(t, r) {
3481
+ return new Ia({
3473
3482
  check: "string_format",
3474
3483
  format: "regex",
3475
3484
  ...b(r),
3476
3485
  pattern: t
3477
3486
  });
3478
3487
  }
3479
- function hn(t) {
3480
- return new Ia({
3488
+ function vi(t) {
3489
+ return new Pa({
3481
3490
  check: "string_format",
3482
3491
  format: "lowercase",
3483
3492
  ...b(t)
3484
3493
  });
3485
3494
  }
3486
- function vn(t) {
3487
- return new Pa({
3495
+ function xi(t) {
3496
+ return new Ca({
3488
3497
  check: "string_format",
3489
3498
  format: "uppercase",
3490
3499
  ...b(t)
3491
3500
  });
3492
3501
  }
3493
- function xn(t, r) {
3494
- return new Ca({
3502
+ function wi(t, r) {
3503
+ return new Ta({
3495
3504
  check: "string_format",
3496
3505
  format: "includes",
3497
3506
  ...b(r),
3498
3507
  includes: t
3499
3508
  });
3500
3509
  }
3501
- function wn(t, r) {
3502
- return new Ta({
3510
+ function yi(t, r) {
3511
+ return new Oa({
3503
3512
  check: "string_format",
3504
3513
  format: "starts_with",
3505
3514
  ...b(r),
3506
3515
  prefix: t
3507
3516
  });
3508
3517
  }
3509
- function yn(t, r) {
3510
- return new Oa({
3518
+ function ki(t, r) {
3519
+ return new Ra({
3511
3520
  check: "string_format",
3512
3521
  format: "ends_with",
3513
3522
  ...b(r),
@@ -3515,24 +3524,24 @@ function yn(t, r) {
3515
3524
  });
3516
3525
  }
3517
3526
  function bt(t) {
3518
- return new Ra({
3527
+ return new Ua({
3519
3528
  check: "overwrite",
3520
3529
  tx: t
3521
3530
  });
3522
3531
  }
3523
- function kn(t) {
3532
+ function _i(t) {
3524
3533
  return bt((r) => r.normalize(t));
3525
3534
  }
3526
- function _n() {
3535
+ function zi() {
3527
3536
  return bt((t) => t.trim());
3528
3537
  }
3529
- function zn() {
3538
+ function $i() {
3530
3539
  return bt((t) => t.toLowerCase());
3531
3540
  }
3532
- function $n() {
3541
+ function Ei() {
3533
3542
  return bt((t) => t.toUpperCase());
3534
3543
  }
3535
- function En(t, r, o) {
3544
+ function Ai(t, r, o) {
3536
3545
  return new t({
3537
3546
  type: "array",
3538
3547
  element: r,
@@ -3542,7 +3551,7 @@ function En(t, r, o) {
3542
3551
  ...b(o)
3543
3552
  });
3544
3553
  }
3545
- function An(t, r, o) {
3554
+ function ji(t, r, o) {
3546
3555
  return new t({
3547
3556
  type: "custom",
3548
3557
  check: "custom",
@@ -3550,8 +3559,8 @@ function An(t, r, o) {
3550
3559
  ...b(o)
3551
3560
  });
3552
3561
  }
3553
- function jn(t) {
3554
- const r = Sn((o) => (o.addIssue = (e) => {
3562
+ function Si(t) {
3563
+ const r = Zi((o) => (o.addIssue = (e) => {
3555
3564
  if (typeof e == "string")
3556
3565
  o.issues.push(dt(e, o.value, r._zod.def));
3557
3566
  else {
@@ -3561,45 +3570,45 @@ function jn(t) {
3561
3570
  }, t(o.value, o)));
3562
3571
  return r;
3563
3572
  }
3564
- function Sn(t, r) {
3573
+ function Zi(t, r) {
3565
3574
  const o = new j({
3566
3575
  check: "custom",
3567
3576
  ...b(r)
3568
3577
  });
3569
3578
  return o._zod.check = t, o;
3570
3579
  }
3571
- const Zn = /* @__PURE__ */ d("ZodISODateTime", (t, r) => {
3572
- Ja.init(t, r), $.init(t, r);
3573
- });
3574
- function In(t) {
3575
- return an(Zn, t);
3576
- }
3577
- const Pn = /* @__PURE__ */ d("ZodISODate", (t, r) => {
3580
+ const Ii = /* @__PURE__ */ d("ZodISODateTime", (t, r) => {
3578
3581
  Xa.init(t, r), $.init(t, r);
3579
3582
  });
3580
- function Cn(t) {
3581
- return nn(Pn, t);
3583
+ function Pi(t) {
3584
+ return ii(Ii, t);
3582
3585
  }
3583
- const Tn = /* @__PURE__ */ d("ZodISOTime", (t, r) => {
3586
+ const Ci = /* @__PURE__ */ d("ZodISODate", (t, r) => {
3584
3587
  Ha.init(t, r), $.init(t, r);
3585
3588
  });
3586
- function On(t) {
3587
- return sn(Tn, t);
3589
+ function Ti(t) {
3590
+ return si(Ci, t);
3588
3591
  }
3589
- const Rn = /* @__PURE__ */ d("ZodISODuration", (t, r) => {
3592
+ const Oi = /* @__PURE__ */ d("ZodISOTime", (t, r) => {
3590
3593
  Qa.init(t, r), $.init(t, r);
3591
3594
  });
3592
- function Un(t) {
3593
- return ln(Rn, t);
3595
+ function Ri(t) {
3596
+ return li(Oi, t);
3597
+ }
3598
+ const Ui = /* @__PURE__ */ d("ZodISODuration", (t, r) => {
3599
+ tn.init(t, r), $.init(t, r);
3600
+ });
3601
+ function Mi(t) {
3602
+ return di(Ui, t);
3594
3603
  }
3595
- const Mn = (t, r) => {
3604
+ const Ni = (t, r) => {
3596
3605
  eo.init(t, r), t.name = "ZodError", Object.defineProperties(t, {
3597
3606
  format: {
3598
- value: (o) => Ne(t, o)
3607
+ value: (o) => De(t, o)
3599
3608
  // enumerable: false,
3600
3609
  },
3601
3610
  flatten: {
3602
- value: (o) => Me(t, o)
3611
+ value: (o) => Ne(t, o)
3603
3612
  // enumerable: false,
3604
3613
  },
3605
3614
  addIssue: {
@@ -3621,14 +3630,14 @@ const Mn = (t, r) => {
3621
3630
  // enumerable: false,
3622
3631
  }
3623
3632
  });
3624
- }, Z = d("ZodError", Mn, {
3633
+ }, Z = d("ZodError", Ni, {
3625
3634
  Parent: Error
3626
- }), Nn = /* @__PURE__ */ br(Z), Dn = /* @__PURE__ */ pr(Z), Ln = /* @__PURE__ */ Gt(Z), Bn = /* @__PURE__ */ Wt(Z), Fn = /* @__PURE__ */ Be(Z), Gn = /* @__PURE__ */ Fe(Z), Wn = /* @__PURE__ */ Ge(Z), qn = /* @__PURE__ */ We(Z), Yn = /* @__PURE__ */ qe(Z), Vn = /* @__PURE__ */ Ye(Z), Kn = /* @__PURE__ */ Ve(Z), Jn = /* @__PURE__ */ Ke(Z), _ = /* @__PURE__ */ d("ZodType", (t, r) => (w.init(t, r), t.def = r, t.type = r.type, Object.defineProperty(t, "_def", { value: r }), t.check = (...o) => t.clone(W(r, {
3635
+ }), Di = /* @__PURE__ */ br(Z), Li = /* @__PURE__ */ pr(Z), Bi = /* @__PURE__ */ Gt(Z), Fi = /* @__PURE__ */ Wt(Z), Gi = /* @__PURE__ */ Fe(Z), Wi = /* @__PURE__ */ Ge(Z), qi = /* @__PURE__ */ We(Z), Yi = /* @__PURE__ */ qe(Z), Vi = /* @__PURE__ */ Ye(Z), Ki = /* @__PURE__ */ Ve(Z), Ji = /* @__PURE__ */ Ke(Z), Xi = /* @__PURE__ */ Je(Z), _ = /* @__PURE__ */ d("ZodType", (t, r) => (w.init(t, r), t.def = r, t.type = r.type, Object.defineProperty(t, "_def", { value: r }), t.check = (...o) => t.clone(W(r, {
3627
3636
  checks: [
3628
3637
  ...r.checks ?? [],
3629
3638
  ...o.map((e) => typeof e == "function" ? { _zod: { check: e, def: { check: "custom" }, onattach: [] } } : e)
3630
3639
  ]
3631
- })), t.clone = (o, e) => D(t, o, e), t.brand = () => t, t.register = ((o, e) => (o.add(t, e), t)), t.parse = (o, e) => Nn(t, o, e, { callee: t.parse }), t.safeParse = (o, e) => Ln(t, o, e), t.parseAsync = async (o, e) => Dn(t, o, e, { callee: t.parseAsync }), t.safeParseAsync = async (o, e) => Bn(t, o, e), t.spa = t.safeParseAsync, t.encode = (o, e) => Fn(t, o, e), t.decode = (o, e) => Gn(t, o, e), t.encodeAsync = async (o, e) => Wn(t, o, e), t.decodeAsync = async (o, e) => qn(t, o, e), t.safeEncode = (o, e) => Yn(t, o, e), t.safeDecode = (o, e) => Vn(t, o, e), t.safeEncodeAsync = async (o, e) => Kn(t, o, e), t.safeDecodeAsync = async (o, e) => Jn(t, o, e), t.refine = (o, e) => t.check(Ws(o, e)), t.superRefine = (o) => t.check(qs(o)), t.overwrite = (o) => t.check(bt(o)), t.optional = () => L(t), t.nullable = () => Dr(t), t.nullish = () => L(Dr(t)), t.nonoptional = (o) => Ms(t, o), t.array = () => Ut(t), t.or = (o) => gr([t, o]), t.and = (o) => ur(t, o), t.transform = (o) => Lr(t, Ps(o)), t.default = (o) => Os(t, o), t.prefault = (o) => Us(t, o), t.catch = (o) => Ds(t, o), t.pipe = (o) => Lr(t, o), t.readonly = () => Fs(t), t.describe = (o) => {
3640
+ })), t.clone = (o, e) => D(t, o, e), t.brand = () => t, t.register = ((o, e) => (o.add(t, e), t)), t.parse = (o, e) => Di(t, o, e, { callee: t.parse }), t.safeParse = (o, e) => Bi(t, o, e), t.parseAsync = async (o, e) => Li(t, o, e, { callee: t.parseAsync }), t.safeParseAsync = async (o, e) => Fi(t, o, e), t.spa = t.safeParseAsync, t.encode = (o, e) => Gi(t, o, e), t.decode = (o, e) => Wi(t, o, e), t.encodeAsync = async (o, e) => qi(t, o, e), t.decodeAsync = async (o, e) => Yi(t, o, e), t.safeEncode = (o, e) => Vi(t, o, e), t.safeDecode = (o, e) => Ki(t, o, e), t.safeEncodeAsync = async (o, e) => Ji(t, o, e), t.safeDecodeAsync = async (o, e) => Xi(t, o, e), t.refine = (o, e) => t.check(qs(o, e)), t.superRefine = (o) => t.check(Ys(o)), t.overwrite = (o) => t.check(bt(o)), t.optional = () => L(t), t.nullable = () => Dr(t), t.nullish = () => L(Dr(t)), t.nonoptional = (o) => Ns(t, o), t.array = () => Ut(t), t.or = (o) => gr([t, o]), t.and = (o) => ur(t, o), t.transform = (o) => Lr(t, Cs(o)), t.default = (o) => Rs(t, o), t.prefault = (o) => Ms(t, o), t.catch = (o) => Ls(t, o), t.pipe = (o) => Lr(t, o), t.readonly = () => Gs(t), t.describe = (o) => {
3632
3641
  const e = t.clone();
3633
3642
  return ft.add(e, { description: o }), e;
3634
3643
  }, Object.defineProperty(t, "description", {
@@ -3645,105 +3654,105 @@ const Mn = (t, r) => {
3645
3654
  }, t.isOptional = () => t.safeParse(void 0).success, t.isNullable = () => t.safeParse(null).success, t)), xo = /* @__PURE__ */ d("_ZodString", (t, r) => {
3646
3655
  mr.init(t, r), _.init(t, r);
3647
3656
  const o = t._zod.bag;
3648
- t.format = o.format ?? null, t.minLength = o.minimum ?? null, t.maxLength = o.maximum ?? null, t.regex = (...e) => t.check(fn(...e)), t.includes = (...e) => t.check(xn(...e)), t.startsWith = (...e) => t.check(wn(...e)), t.endsWith = (...e) => t.check(yn(...e)), t.min = (...e) => t.check(Ot(...e)), t.max = (...e) => t.check(ho(...e)), t.length = (...e) => t.check(vo(...e)), t.nonempty = (...e) => t.check(Ot(1, ...e)), t.lowercase = (e) => t.check(hn(e)), t.uppercase = (e) => t.check(vn(e)), t.trim = () => t.check(_n()), t.normalize = (...e) => t.check(kn(...e)), t.toLowerCase = () => t.check(zn()), t.toUpperCase = () => t.check($n());
3649
- }), Xn = /* @__PURE__ */ d("ZodString", (t, r) => {
3650
- mr.init(t, r), xo.init(t, r), t.email = (o) => t.check(Ui(Hn, o)), t.url = (o) => t.check(Bi(Qn, o)), t.jwt = (o) => t.check(en(gs, o)), t.emoji = (o) => t.check(Fi(ts, o)), t.guid = (o) => t.check(Tr(Mr, o)), t.uuid = (o) => t.check(Mi(ht, o)), t.uuidv4 = (o) => t.check(Ni(ht, o)), t.uuidv6 = (o) => t.check(Di(ht, o)), t.uuidv7 = (o) => t.check(Li(ht, o)), t.nanoid = (o) => t.check(Gi(rs, o)), t.guid = (o) => t.check(Tr(Mr, o)), t.cuid = (o) => t.check(Wi(os, o)), t.cuid2 = (o) => t.check(qi(es, o)), t.ulid = (o) => t.check(Yi(as, o)), t.base64 = (o) => t.check(tn(bs, o)), t.base64url = (o) => t.check(rn(ps, o)), t.xid = (o) => t.check(Vi(is, o)), t.ksuid = (o) => t.check(Ki(ns, o)), t.ipv4 = (o) => t.check(Ji(ss, o)), t.ipv6 = (o) => t.check(Xi(ls, o)), t.cidrv4 = (o) => t.check(Hi(ds, o)), t.cidrv6 = (o) => t.check(Qi(cs, o)), t.e164 = (o) => t.check(on(ms, o)), t.datetime = (o) => t.check(In(o)), t.date = (o) => t.check(Cn(o)), t.time = (o) => t.check(On(o)), t.duration = (o) => t.check(Un(o));
3657
+ t.format = o.format ?? null, t.minLength = o.minimum ?? null, t.maxLength = o.maximum ?? null, t.regex = (...e) => t.check(hi(...e)), t.includes = (...e) => t.check(wi(...e)), t.startsWith = (...e) => t.check(yi(...e)), t.endsWith = (...e) => t.check(ki(...e)), t.min = (...e) => t.check(Ot(...e)), t.max = (...e) => t.check(ho(...e)), t.length = (...e) => t.check(vo(...e)), t.nonempty = (...e) => t.check(Ot(1, ...e)), t.lowercase = (e) => t.check(vi(e)), t.uppercase = (e) => t.check(xi(e)), t.trim = () => t.check(zi()), t.normalize = (...e) => t.check(_i(...e)), t.toLowerCase = () => t.check($i()), t.toUpperCase = () => t.check(Ei());
3658
+ }), Hi = /* @__PURE__ */ d("ZodString", (t, r) => {
3659
+ mr.init(t, r), xo.init(t, r), t.email = (o) => t.check(Nn(Qi, o)), t.url = (o) => t.check(Gn(ts, o)), t.jwt = (o) => t.check(ni(us, o)), t.emoji = (o) => t.check(Wn(rs, o)), t.guid = (o) => t.check(Tr(Mr, o)), t.uuid = (o) => t.check(Dn(ht, o)), t.uuidv4 = (o) => t.check(Ln(ht, o)), t.uuidv6 = (o) => t.check(Bn(ht, o)), t.uuidv7 = (o) => t.check(Fn(ht, o)), t.nanoid = (o) => t.check(qn(os, o)), t.guid = (o) => t.check(Tr(Mr, o)), t.cuid = (o) => t.check(Yn(es, o)), t.cuid2 = (o) => t.check(Vn(as, o)), t.ulid = (o) => t.check(Kn(ns, o)), t.base64 = (o) => t.check(oi(ps, o)), t.base64url = (o) => t.check(ei(ms, o)), t.xid = (o) => t.check(Jn(is, o)), t.ksuid = (o) => t.check(Xn(ss, o)), t.ipv4 = (o) => t.check(Hn(ls, o)), t.ipv6 = (o) => t.check(Qn(ds, o)), t.cidrv4 = (o) => t.check(ti(cs, o)), t.cidrv6 = (o) => t.check(ri(bs, o)), t.e164 = (o) => t.check(ai(gs, o)), t.datetime = (o) => t.check(Pi(o)), t.date = (o) => t.check(Ti(o)), t.time = (o) => t.check(Ri(o)), t.duration = (o) => t.check(Mi(o));
3651
3660
  });
3652
3661
  function m(t) {
3653
- return Ri(Xn, t);
3662
+ return Mn(Hi, t);
3654
3663
  }
3655
3664
  const $ = /* @__PURE__ */ d("ZodStringFormat", (t, r) => {
3656
3665
  k.init(t, r), xo.init(t, r);
3657
- }), Hn = /* @__PURE__ */ d("ZodEmail", (t, r) => {
3658
- La.init(t, r), $.init(t, r);
3666
+ }), Qi = /* @__PURE__ */ d("ZodEmail", (t, r) => {
3667
+ Ba.init(t, r), $.init(t, r);
3659
3668
  }), Mr = /* @__PURE__ */ d("ZodGUID", (t, r) => {
3660
- Na.init(t, r), $.init(t, r);
3661
- }), ht = /* @__PURE__ */ d("ZodUUID", (t, r) => {
3662
3669
  Da.init(t, r), $.init(t, r);
3663
- }), Qn = /* @__PURE__ */ d("ZodURL", (t, r) => {
3664
- Ba.init(t, r), $.init(t, r);
3665
- }), ts = /* @__PURE__ */ d("ZodEmoji", (t, r) => {
3670
+ }), ht = /* @__PURE__ */ d("ZodUUID", (t, r) => {
3671
+ La.init(t, r), $.init(t, r);
3672
+ }), ts = /* @__PURE__ */ d("ZodURL", (t, r) => {
3666
3673
  Fa.init(t, r), $.init(t, r);
3667
- }), rs = /* @__PURE__ */ d("ZodNanoID", (t, r) => {
3674
+ }), rs = /* @__PURE__ */ d("ZodEmoji", (t, r) => {
3668
3675
  Ga.init(t, r), $.init(t, r);
3669
- }), os = /* @__PURE__ */ d("ZodCUID", (t, r) => {
3676
+ }), os = /* @__PURE__ */ d("ZodNanoID", (t, r) => {
3670
3677
  Wa.init(t, r), $.init(t, r);
3671
- }), es = /* @__PURE__ */ d("ZodCUID2", (t, r) => {
3678
+ }), es = /* @__PURE__ */ d("ZodCUID", (t, r) => {
3672
3679
  qa.init(t, r), $.init(t, r);
3673
- }), as = /* @__PURE__ */ d("ZodULID", (t, r) => {
3680
+ }), as = /* @__PURE__ */ d("ZodCUID2", (t, r) => {
3674
3681
  Ya.init(t, r), $.init(t, r);
3675
- }), is = /* @__PURE__ */ d("ZodXID", (t, r) => {
3682
+ }), ns = /* @__PURE__ */ d("ZodULID", (t, r) => {
3676
3683
  Va.init(t, r), $.init(t, r);
3677
- }), ns = /* @__PURE__ */ d("ZodKSUID", (t, r) => {
3684
+ }), is = /* @__PURE__ */ d("ZodXID", (t, r) => {
3678
3685
  Ka.init(t, r), $.init(t, r);
3679
- }), ss = /* @__PURE__ */ d("ZodIPv4", (t, r) => {
3680
- ti.init(t, r), $.init(t, r);
3681
- }), ls = /* @__PURE__ */ d("ZodIPv6", (t, r) => {
3682
- ri.init(t, r), $.init(t, r);
3683
- }), ds = /* @__PURE__ */ d("ZodCIDRv4", (t, r) => {
3684
- oi.init(t, r), $.init(t, r);
3685
- }), cs = /* @__PURE__ */ d("ZodCIDRv6", (t, r) => {
3686
- ei.init(t, r), $.init(t, r);
3687
- }), bs = /* @__PURE__ */ d("ZodBase64", (t, r) => {
3688
- ai.init(t, r), $.init(t, r);
3689
- }), ps = /* @__PURE__ */ d("ZodBase64URL", (t, r) => {
3690
- ni.init(t, r), $.init(t, r);
3691
- }), ms = /* @__PURE__ */ d("ZodE164", (t, r) => {
3692
- si.init(t, r), $.init(t, r);
3693
- }), gs = /* @__PURE__ */ d("ZodJWT", (t, r) => {
3694
- di.init(t, r), $.init(t, r);
3686
+ }), ss = /* @__PURE__ */ d("ZodKSUID", (t, r) => {
3687
+ Ja.init(t, r), $.init(t, r);
3688
+ }), ls = /* @__PURE__ */ d("ZodIPv4", (t, r) => {
3689
+ rn.init(t, r), $.init(t, r);
3690
+ }), ds = /* @__PURE__ */ d("ZodIPv6", (t, r) => {
3691
+ on.init(t, r), $.init(t, r);
3692
+ }), cs = /* @__PURE__ */ d("ZodCIDRv4", (t, r) => {
3693
+ en.init(t, r), $.init(t, r);
3694
+ }), bs = /* @__PURE__ */ d("ZodCIDRv6", (t, r) => {
3695
+ an.init(t, r), $.init(t, r);
3696
+ }), ps = /* @__PURE__ */ d("ZodBase64", (t, r) => {
3697
+ nn.init(t, r), $.init(t, r);
3698
+ }), ms = /* @__PURE__ */ d("ZodBase64URL", (t, r) => {
3699
+ ln.init(t, r), $.init(t, r);
3700
+ }), gs = /* @__PURE__ */ d("ZodE164", (t, r) => {
3701
+ dn.init(t, r), $.init(t, r);
3702
+ }), us = /* @__PURE__ */ d("ZodJWT", (t, r) => {
3703
+ bn.init(t, r), $.init(t, r);
3695
3704
  }), wo = /* @__PURE__ */ d("ZodNumber", (t, r) => {
3696
3705
  mo.init(t, r), _.init(t, r), t.gt = (e, a) => t.check(Rr(e, a)), t.gte = (e, a) => t.check(Ht(e, a)), t.min = (e, a) => t.check(Ht(e, a)), t.lt = (e, a) => t.check(Or(e, a)), t.lte = (e, a) => t.check(Xt(e, a)), t.max = (e, a) => t.check(Xt(e, a)), t.int = (e) => t.check(Nr(e)), t.safe = (e) => t.check(Nr(e)), t.positive = (e) => t.check(Rr(0, e)), t.nonnegative = (e) => t.check(Ht(0, e)), t.negative = (e) => t.check(Or(0, e)), t.nonpositive = (e) => t.check(Xt(0, e)), t.multipleOf = (e, a) => t.check(Ur(e, a)), t.step = (e, a) => t.check(Ur(e, a)), t.finite = () => t;
3697
3706
  const o = t._zod.bag;
3698
3707
  t.minValue = Math.max(o.minimum ?? Number.NEGATIVE_INFINITY, o.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, t.maxValue = Math.min(o.maximum ?? Number.POSITIVE_INFINITY, o.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, t.isInt = (o.format ?? "").includes("int") || Number.isSafeInteger(o.multipleOf ?? 0.5), t.isFinite = !0, t.format = o.format ?? null;
3699
3708
  });
3700
3709
  function Rt(t) {
3701
- return dn(wo, t);
3710
+ return ci(wo, t);
3702
3711
  }
3703
- const us = /* @__PURE__ */ d("ZodNumberFormat", (t, r) => {
3704
- ci.init(t, r), wo.init(t, r);
3712
+ const fs = /* @__PURE__ */ d("ZodNumberFormat", (t, r) => {
3713
+ pn.init(t, r), wo.init(t, r);
3705
3714
  });
3706
3715
  function Nr(t) {
3707
- return cn(us, t);
3716
+ return bi(fs, t);
3708
3717
  }
3709
- const fs = /* @__PURE__ */ d("ZodBoolean", (t, r) => {
3710
- bi.init(t, r), _.init(t, r);
3718
+ const hs = /* @__PURE__ */ d("ZodBoolean", (t, r) => {
3719
+ mn.init(t, r), _.init(t, r);
3711
3720
  });
3712
- function hs(t) {
3713
- return bn(fs, t);
3721
+ function vs(t) {
3722
+ return pi(hs, t);
3714
3723
  }
3715
- const vs = /* @__PURE__ */ d("ZodUndefined", (t, r) => {
3716
- pi.init(t, r), _.init(t, r);
3724
+ const xs = /* @__PURE__ */ d("ZodUndefined", (t, r) => {
3725
+ gn.init(t, r), _.init(t, r);
3717
3726
  });
3718
- function xs(t) {
3719
- return pn(vs, t);
3727
+ function ws(t) {
3728
+ return mi(xs, t);
3720
3729
  }
3721
- const ws = /* @__PURE__ */ d("ZodNull", (t, r) => {
3722
- mi.init(t, r), _.init(t, r);
3730
+ const ys = /* @__PURE__ */ d("ZodNull", (t, r) => {
3731
+ un.init(t, r), _.init(t, r);
3723
3732
  });
3724
3733
  function yo(t) {
3725
- return mn(ws, t);
3734
+ return gi(ys, t);
3726
3735
  }
3727
- const ys = /* @__PURE__ */ d("ZodUnknown", (t, r) => {
3728
- gi.init(t, r), _.init(t, r);
3736
+ const ks = /* @__PURE__ */ d("ZodUnknown", (t, r) => {
3737
+ fn.init(t, r), _.init(t, r);
3729
3738
  });
3730
3739
  function tt() {
3731
- return gn(ys);
3740
+ return ui(ks);
3732
3741
  }
3733
- const ks = /* @__PURE__ */ d("ZodNever", (t, r) => {
3734
- ui.init(t, r), _.init(t, r);
3742
+ const _s = /* @__PURE__ */ d("ZodNever", (t, r) => {
3743
+ hn.init(t, r), _.init(t, r);
3735
3744
  });
3736
3745
  function ko(t) {
3737
- return un(ks, t);
3746
+ return fi(_s, t);
3738
3747
  }
3739
- const _s = /* @__PURE__ */ d("ZodArray", (t, r) => {
3740
- fi.init(t, r), _.init(t, r), t.element = r.element, t.min = (o, e) => t.check(Ot(o, e)), t.nonempty = (o) => t.check(Ot(1, o)), t.max = (o, e) => t.check(ho(o, e)), t.length = (o, e) => t.check(vo(o, e)), t.unwrap = () => t.element;
3748
+ const zs = /* @__PURE__ */ d("ZodArray", (t, r) => {
3749
+ vn.init(t, r), _.init(t, r), t.element = r.element, t.min = (o, e) => t.check(Ot(o, e)), t.nonempty = (o) => t.check(Ot(1, o)), t.max = (o, e) => t.check(ho(o, e)), t.length = (o, e) => t.check(vo(o, e)), t.unwrap = () => t.element;
3741
3750
  });
3742
3751
  function Ut(t, r) {
3743
- return En(_s, t, r);
3752
+ return Ai(zs, t, r);
3744
3753
  }
3745
- const zs = /* @__PURE__ */ d("ZodObject", (t, r) => {
3746
- vi.init(t, r), _.init(t, r), v(t, "shape", () => r.shape), t.keyof = () => Ss(Object.keys(t._zod.def.shape)), t.catchall = (o) => t.clone({ ...t._zod.def, catchall: o }), t.passthrough = () => t.clone({ ...t._zod.def, catchall: tt() }), t.loose = () => t.clone({ ...t._zod.def, catchall: tt() }), t.strict = () => t.clone({ ...t._zod.def, catchall: ko() }), t.strip = () => t.clone({ ...t._zod.def, catchall: void 0 }), t.extend = (o) => Ce(t, o), t.safeExtend = (o) => Te(t, o), t.merge = (o) => Oe(t, o), t.pick = (o) => Ie(t, o), t.omit = (o) => Pe(t, o), t.partial = (...o) => Re(zo, t, o[0]), t.required = (...o) => Ue($o, t, o[0]);
3754
+ const $s = /* @__PURE__ */ d("ZodObject", (t, r) => {
3755
+ wn.init(t, r), _.init(t, r), v(t, "shape", () => r.shape), t.keyof = () => Zs(Object.keys(t._zod.def.shape)), t.catchall = (o) => t.clone({ ...t._zod.def, catchall: o }), t.passthrough = () => t.clone({ ...t._zod.def, catchall: tt() }), t.loose = () => t.clone({ ...t._zod.def, catchall: tt() }), t.strict = () => t.clone({ ...t._zod.def, catchall: ko() }), t.strip = () => t.clone({ ...t._zod.def, catchall: void 0 }), t.extend = (o) => Te(t, o), t.safeExtend = (o) => Oe(t, o), t.merge = (o) => Re(t, o), t.pick = (o) => Pe(t, o), t.omit = (o) => Ce(t, o), t.partial = (...o) => Ue(zo, t, o[0]), t.required = (...o) => Me($o, t, o[0]);
3747
3756
  });
3748
3757
  function x(t, r) {
3749
3758
  const o = {
@@ -3751,7 +3760,7 @@ function x(t, r) {
3751
3760
  shape: t ?? {},
3752
3761
  ...b(r)
3753
3762
  };
3754
- return new zs(o);
3763
+ return new $s(o);
3755
3764
  }
3756
3765
  const _o = /* @__PURE__ */ d("ZodUnion", (t, r) => {
3757
3766
  fo.init(t, r), _.init(t, r), t.options = r.options;
@@ -3763,32 +3772,32 @@ function gr(t, r) {
3763
3772
  ...b(r)
3764
3773
  });
3765
3774
  }
3766
- const $s = /* @__PURE__ */ d("ZodDiscriminatedUnion", (t, r) => {
3767
- _o.init(t, r), xi.init(t, r);
3775
+ const Es = /* @__PURE__ */ d("ZodDiscriminatedUnion", (t, r) => {
3776
+ _o.init(t, r), yn.init(t, r);
3768
3777
  });
3769
3778
  function pt(t, r, o) {
3770
- return new $s({
3779
+ return new Es({
3771
3780
  type: "union",
3772
3781
  options: r,
3773
3782
  discriminator: t,
3774
3783
  ...b(o)
3775
3784
  });
3776
3785
  }
3777
- const Es = /* @__PURE__ */ d("ZodIntersection", (t, r) => {
3778
- wi.init(t, r), _.init(t, r);
3786
+ const As = /* @__PURE__ */ d("ZodIntersection", (t, r) => {
3787
+ kn.init(t, r), _.init(t, r);
3779
3788
  });
3780
3789
  function ur(t, r) {
3781
- return new Es({
3790
+ return new As({
3782
3791
  type: "intersection",
3783
3792
  left: t,
3784
3793
  right: r
3785
3794
  });
3786
3795
  }
3787
- const As = /* @__PURE__ */ d("ZodRecord", (t, r) => {
3788
- yi.init(t, r), _.init(t, r), t.keyType = r.keyType, t.valueType = r.valueType;
3796
+ const js = /* @__PURE__ */ d("ZodRecord", (t, r) => {
3797
+ _n.init(t, r), _.init(t, r), t.keyType = r.keyType, t.valueType = r.valueType;
3789
3798
  });
3790
- function js(t, r, o) {
3791
- return new As({
3799
+ function Ss(t, r, o) {
3800
+ return new js({
3792
3801
  type: "record",
3793
3802
  keyType: t,
3794
3803
  valueType: r,
@@ -3796,37 +3805,37 @@ function js(t, r, o) {
3796
3805
  });
3797
3806
  }
3798
3807
  const or = /* @__PURE__ */ d("ZodEnum", (t, r) => {
3799
- ki.init(t, r), _.init(t, r), t.enum = r.entries, t.options = Object.values(r.entries);
3808
+ zn.init(t, r), _.init(t, r), t.enum = r.entries, t.options = Object.values(r.entries);
3800
3809
  const o = new Set(Object.keys(r.entries));
3801
3810
  t.extract = (e, a) => {
3802
- const i = {};
3803
- for (const n of e)
3804
- if (o.has(n))
3805
- i[n] = r.entries[n];
3811
+ const n = {};
3812
+ for (const i of e)
3813
+ if (o.has(i))
3814
+ n[i] = r.entries[i];
3806
3815
  else
3807
- throw new Error(`Key ${n} not found in enum`);
3816
+ throw new Error(`Key ${i} not found in enum`);
3808
3817
  return new or({
3809
3818
  ...r,
3810
3819
  checks: [],
3811
3820
  ...b(a),
3812
- entries: i
3821
+ entries: n
3813
3822
  });
3814
3823
  }, t.exclude = (e, a) => {
3815
- const i = { ...r.entries };
3816
- for (const n of e)
3817
- if (o.has(n))
3818
- delete i[n];
3824
+ const n = { ...r.entries };
3825
+ for (const i of e)
3826
+ if (o.has(i))
3827
+ delete n[i];
3819
3828
  else
3820
- throw new Error(`Key ${n} not found in enum`);
3829
+ throw new Error(`Key ${i} not found in enum`);
3821
3830
  return new or({
3822
3831
  ...r,
3823
3832
  checks: [],
3824
3833
  ...b(a),
3825
- entries: i
3834
+ entries: n
3826
3835
  });
3827
3836
  };
3828
3837
  });
3829
- function Ss(t, r) {
3838
+ function Zs(t, r) {
3830
3839
  const o = Array.isArray(t) ? Object.fromEntries(t.map((e) => [e, e])) : t;
3831
3840
  return new or({
3832
3841
  type: "enum",
@@ -3834,8 +3843,8 @@ function Ss(t, r) {
3834
3843
  ...b(r)
3835
3844
  });
3836
3845
  }
3837
- const Zs = /* @__PURE__ */ d("ZodLiteral", (t, r) => {
3838
- _i.init(t, r), _.init(t, r), t.values = new Set(r.values), Object.defineProperty(t, "value", {
3846
+ const Is = /* @__PURE__ */ d("ZodLiteral", (t, r) => {
3847
+ $n.init(t, r), _.init(t, r), t.values = new Set(r.values), Object.defineProperty(t, "value", {
3839
3848
  get() {
3840
3849
  if (r.values.length > 1)
3841
3850
  throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
@@ -3844,36 +3853,36 @@ const Zs = /* @__PURE__ */ d("ZodLiteral", (t, r) => {
3844
3853
  });
3845
3854
  });
3846
3855
  function A(t, r) {
3847
- return new Zs({
3856
+ return new Is({
3848
3857
  type: "literal",
3849
3858
  values: Array.isArray(t) ? t : [t],
3850
3859
  ...b(r)
3851
3860
  });
3852
3861
  }
3853
- const Is = /* @__PURE__ */ d("ZodTransform", (t, r) => {
3854
- zi.init(t, r), _.init(t, r), t._zod.parse = (o, e) => {
3862
+ const Ps = /* @__PURE__ */ d("ZodTransform", (t, r) => {
3863
+ En.init(t, r), _.init(t, r), t._zod.parse = (o, e) => {
3855
3864
  if (e.direction === "backward")
3856
3865
  throw new Hr(t.constructor.name);
3857
- o.addIssue = (i) => {
3858
- if (typeof i == "string")
3859
- o.issues.push(dt(i, o.value, r));
3866
+ o.addIssue = (n) => {
3867
+ if (typeof n == "string")
3868
+ o.issues.push(dt(n, o.value, r));
3860
3869
  else {
3861
- const n = i;
3862
- n.fatal && (n.continue = !1), n.code ?? (n.code = "custom"), n.input ?? (n.input = o.value), n.inst ?? (n.inst = t), o.issues.push(dt(n));
3870
+ const i = n;
3871
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = o.value), i.inst ?? (i.inst = t), o.issues.push(dt(i));
3863
3872
  }
3864
3873
  };
3865
3874
  const a = r.transform(o.value, o);
3866
- return a instanceof Promise ? a.then((i) => (o.value = i, o)) : (o.value = a, o);
3875
+ return a instanceof Promise ? a.then((n) => (o.value = n, o)) : (o.value = a, o);
3867
3876
  };
3868
3877
  });
3869
- function Ps(t) {
3870
- return new Is({
3878
+ function Cs(t) {
3879
+ return new Ps({
3871
3880
  type: "transform",
3872
3881
  transform: t
3873
3882
  });
3874
3883
  }
3875
3884
  const zo = /* @__PURE__ */ d("ZodOptional", (t, r) => {
3876
- $i.init(t, r), _.init(t, r), t.unwrap = () => t._zod.def.innerType;
3885
+ An.init(t, r), _.init(t, r), t.unwrap = () => t._zod.def.innerType;
3877
3886
  });
3878
3887
  function L(t) {
3879
3888
  return new zo({
@@ -3881,20 +3890,20 @@ function L(t) {
3881
3890
  innerType: t
3882
3891
  });
3883
3892
  }
3884
- const Cs = /* @__PURE__ */ d("ZodNullable", (t, r) => {
3885
- Ei.init(t, r), _.init(t, r), t.unwrap = () => t._zod.def.innerType;
3893
+ const Ts = /* @__PURE__ */ d("ZodNullable", (t, r) => {
3894
+ jn.init(t, r), _.init(t, r), t.unwrap = () => t._zod.def.innerType;
3886
3895
  });
3887
3896
  function Dr(t) {
3888
- return new Cs({
3897
+ return new Ts({
3889
3898
  type: "nullable",
3890
3899
  innerType: t
3891
3900
  });
3892
3901
  }
3893
- const Ts = /* @__PURE__ */ d("ZodDefault", (t, r) => {
3894
- Ai.init(t, r), _.init(t, r), t.unwrap = () => t._zod.def.innerType, t.removeDefault = t.unwrap;
3902
+ const Os = /* @__PURE__ */ d("ZodDefault", (t, r) => {
3903
+ Sn.init(t, r), _.init(t, r), t.unwrap = () => t._zod.def.innerType, t.removeDefault = t.unwrap;
3895
3904
  });
3896
- function Os(t, r) {
3897
- return new Ts({
3905
+ function Rs(t, r) {
3906
+ return new Os({
3898
3907
  type: "default",
3899
3908
  innerType: t,
3900
3909
  get defaultValue() {
@@ -3902,11 +3911,11 @@ function Os(t, r) {
3902
3911
  }
3903
3912
  });
3904
3913
  }
3905
- const Rs = /* @__PURE__ */ d("ZodPrefault", (t, r) => {
3906
- ji.init(t, r), _.init(t, r), t.unwrap = () => t._zod.def.innerType;
3914
+ const Us = /* @__PURE__ */ d("ZodPrefault", (t, r) => {
3915
+ Zn.init(t, r), _.init(t, r), t.unwrap = () => t._zod.def.innerType;
3907
3916
  });
3908
- function Us(t, r) {
3909
- return new Rs({
3917
+ function Ms(t, r) {
3918
+ return new Us({
3910
3919
  type: "prefault",
3911
3920
  innerType: t,
3912
3921
  get defaultValue() {
@@ -3915,66 +3924,66 @@ function Us(t, r) {
3915
3924
  });
3916
3925
  }
3917
3926
  const $o = /* @__PURE__ */ d("ZodNonOptional", (t, r) => {
3918
- Si.init(t, r), _.init(t, r), t.unwrap = () => t._zod.def.innerType;
3927
+ In.init(t, r), _.init(t, r), t.unwrap = () => t._zod.def.innerType;
3919
3928
  });
3920
- function Ms(t, r) {
3929
+ function Ns(t, r) {
3921
3930
  return new $o({
3922
3931
  type: "nonoptional",
3923
3932
  innerType: t,
3924
3933
  ...b(r)
3925
3934
  });
3926
3935
  }
3927
- const Ns = /* @__PURE__ */ d("ZodCatch", (t, r) => {
3928
- Zi.init(t, r), _.init(t, r), t.unwrap = () => t._zod.def.innerType, t.removeCatch = t.unwrap;
3936
+ const Ds = /* @__PURE__ */ d("ZodCatch", (t, r) => {
3937
+ Pn.init(t, r), _.init(t, r), t.unwrap = () => t._zod.def.innerType, t.removeCatch = t.unwrap;
3929
3938
  });
3930
- function Ds(t, r) {
3931
- return new Ns({
3939
+ function Ls(t, r) {
3940
+ return new Ds({
3932
3941
  type: "catch",
3933
3942
  innerType: t,
3934
3943
  catchValue: typeof r == "function" ? r : () => r
3935
3944
  });
3936
3945
  }
3937
- const Ls = /* @__PURE__ */ d("ZodPipe", (t, r) => {
3938
- Ii.init(t, r), _.init(t, r), t.in = r.in, t.out = r.out;
3946
+ const Bs = /* @__PURE__ */ d("ZodPipe", (t, r) => {
3947
+ Cn.init(t, r), _.init(t, r), t.in = r.in, t.out = r.out;
3939
3948
  });
3940
3949
  function Lr(t, r) {
3941
- return new Ls({
3950
+ return new Bs({
3942
3951
  type: "pipe",
3943
3952
  in: t,
3944
3953
  out: r
3945
3954
  // ...util.normalizeParams(params),
3946
3955
  });
3947
3956
  }
3948
- const Bs = /* @__PURE__ */ d("ZodReadonly", (t, r) => {
3949
- Pi.init(t, r), _.init(t, r), t.unwrap = () => t._zod.def.innerType;
3957
+ const Fs = /* @__PURE__ */ d("ZodReadonly", (t, r) => {
3958
+ Tn.init(t, r), _.init(t, r), t.unwrap = () => t._zod.def.innerType;
3950
3959
  });
3951
- function Fs(t) {
3952
- return new Bs({
3960
+ function Gs(t) {
3961
+ return new Fs({
3953
3962
  type: "readonly",
3954
3963
  innerType: t
3955
3964
  });
3956
3965
  }
3957
- const Gs = /* @__PURE__ */ d("ZodCustom", (t, r) => {
3958
- Ci.init(t, r), _.init(t, r);
3966
+ const Ws = /* @__PURE__ */ d("ZodCustom", (t, r) => {
3967
+ On.init(t, r), _.init(t, r);
3959
3968
  });
3960
- function Ws(t, r = {}) {
3961
- return An(Gs, t, r);
3969
+ function qs(t, r = {}) {
3970
+ return ji(Ws, t, r);
3962
3971
  }
3963
- function qs(t) {
3964
- return jn(t);
3972
+ function Ys(t) {
3973
+ return Si(t);
3965
3974
  }
3966
- var Ys = x({
3975
+ var Vs = x({
3967
3976
  method: A("authorization_code"),
3968
3977
  audience: m(),
3969
3978
  scope: m(),
3970
3979
  clientId: m()
3971
- }), Vs = x({
3980
+ }), Ks = x({
3972
3981
  method: A("client_credentials"),
3973
3982
  audience: m(),
3974
3983
  scope: m(),
3975
3984
  clientId: m(),
3976
3985
  clientSecret: m()
3977
- }), Ks = x({
3986
+ }), Js = x({
3978
3987
  method: A("self_signed"),
3979
3988
  issuer: m(),
3980
3989
  audience: m(),
@@ -3982,10 +3991,10 @@ var Ys = x({
3982
3991
  clientId: m(),
3983
3992
  clientSecret: m()
3984
3993
  }), Br = pt("method", [
3985
- Ys,
3986
3994
  Vs,
3987
- Ks
3988
- ]), Js = pt("type", [
3995
+ Ks,
3996
+ Js
3997
+ ]), Xs = pt("type", [
3989
3998
  x({
3990
3999
  id: m(),
3991
4000
  type: A("self_signed"),
@@ -3997,15 +4006,15 @@ var Ys = x({
3997
4006
  issuer: m(),
3998
4007
  configUrl: m().url()
3999
4008
  })
4000
- ]), Xs = x({
4009
+ ]), Hs = x({
4001
4010
  baseUrl: m().url()
4002
4011
  }), Eo = x({
4003
4012
  id: m(),
4004
4013
  name: m(),
4005
4014
  description: m(),
4006
- synchronizerId: m(),
4015
+ synchronizerId: m().optional(),
4007
4016
  identityProviderId: m(),
4008
- ledgerApi: Xs,
4017
+ ledgerApi: Hs,
4009
4018
  auth: Br,
4010
4019
  adminAuth: Br.optional()
4011
4020
  });
@@ -4027,38 +4036,38 @@ x({
4027
4036
  database: m()
4028
4037
  })
4029
4038
  ]),
4030
- idps: Ut(Js),
4039
+ idps: Ut(Xs),
4031
4040
  networks: Ut(Eo)
4032
4041
  });
4033
- var Hs = Object.defineProperty, Qs = Object.getOwnPropertyDescriptor, Ao = (t) => {
4042
+ var Qs = Object.defineProperty, tl = Object.getOwnPropertyDescriptor, Ao = (t) => {
4034
4043
  throw TypeError(t);
4035
4044
  }, fr = (t, r, o, e) => {
4036
- for (var a = e > 1 ? void 0 : e ? Qs(r, o) : r, i = t.length - 1, n; i >= 0; i--)
4037
- (n = t[i]) && (a = (e ? n(r, o, a) : n(a)) || a);
4038
- return e && a && Hs(r, o, a), a;
4039
- }, jo = (t, r, o) => r.has(t) || Ao("Cannot " + o), tl = (t, r, o) => (jo(t, r, "read from private field"), o ? o.call(t) : r.get(t)), rl = (t, r, o) => r.has(t) ? Ao("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(t) : r.set(t, o), ol = (t, r, o, e) => (jo(t, r, "write to private field"), r.set(t, o), o), $t;
4040
- class el extends Event {
4045
+ for (var a = e > 1 ? void 0 : e ? tl(r, o) : r, n = t.length - 1, i; n >= 0; n--)
4046
+ (i = t[n]) && (a = (e ? i(r, o, a) : i(a)) || a);
4047
+ return e && a && Qs(r, o, a), a;
4048
+ }, jo = (t, r, o) => r.has(t) || Ao("Cannot " + o), rl = (t, r, o) => (jo(t, r, "read from private field"), o ? o.call(t) : r.get(t)), ol = (t, r, o) => r.has(t) ? Ao("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(t) : r.set(t, o), el = (t, r, o, e) => (jo(t, r, "write to private field"), r.set(t, o), o), $t;
4049
+ class al extends Event {
4041
4050
  constructor() {
4042
4051
  super("network-edit-cancel", { bubbles: !0, composed: !0 });
4043
4052
  }
4044
4053
  }
4045
- class al extends Event {
4054
+ class nl extends Event {
4046
4055
  constructor(r) {
4047
4056
  super("network-edit-save", { bubbles: !0, composed: !0 }), this.network = r;
4048
4057
  }
4049
4058
  }
4050
4059
  let ct = class extends f {
4051
4060
  constructor() {
4052
- super(...arguments), rl(this, $t, {
4061
+ super(...arguments), ol(this, $t, {
4053
4062
  ledgerApi: {},
4054
4063
  auth: {}
4055
4064
  }), this._error = "";
4056
4065
  }
4057
4066
  get network() {
4058
- return tl(this, $t);
4067
+ return rl(this, $t);
4059
4068
  }
4060
4069
  set network(t) {
4061
- ol(this, $t, t);
4070
+ el(this, $t, t);
4062
4071
  }
4063
4072
  connectedCallback() {
4064
4073
  super.connectedCallback();
@@ -4067,7 +4076,7 @@ let ct = class extends f {
4067
4076
  t.preventDefault();
4068
4077
  const r = Eo.safeParse(this.network);
4069
4078
  if (r.success)
4070
- this.dispatchEvent(new al(this.network));
4079
+ this.dispatchEvent(new nl(this.network));
4071
4080
  else {
4072
4081
  this._error = "Invalid network data, please ensure all fields are set correctly", console.error("Error parsing network data: ", r.error);
4073
4082
  return;
@@ -4224,11 +4233,10 @@ let ct = class extends f {
4224
4233
  ></form-input>
4225
4234
 
4226
4235
  <form-input
4227
- required
4228
- label="Synchronizer Id"
4236
+ label="Synchronizer Id (Optional)"
4229
4237
  .value=${this.network.synchronizerId ?? ""}
4230
4238
  @form-input-change=${(t) => {
4231
- this.network.synchronizerId = t.value;
4239
+ this.network.synchronizerId = t.value === "" ? void 0 : t.value;
4232
4240
  }}
4233
4241
  ></form-input>
4234
4242
 
@@ -4300,7 +4308,7 @@ let ct = class extends f {
4300
4308
  <button
4301
4309
  class="btn btn-sm btn-secondary"
4302
4310
  type="button"
4303
- @click=${() => this.dispatchEvent(new el())}
4311
+ @click=${() => this.dispatchEvent(new al())}
4304
4312
  >
4305
4313
  Cancel
4306
4314
  </button>
@@ -4320,11 +4328,11 @@ fr([
4320
4328
  ct = fr([
4321
4329
  S("network-form")
4322
4330
  ], ct);
4323
- var il = Object.defineProperty, nl = Object.getOwnPropertyDescriptor, So = (t) => {
4331
+ var il = Object.defineProperty, sl = Object.getOwnPropertyDescriptor, So = (t) => {
4324
4332
  throw TypeError(t);
4325
4333
  }, mt = (t, r, o, e) => {
4326
- for (var a = e > 1 ? void 0 : e ? nl(r, o) : r, i = t.length - 1, n; i >= 0; i--)
4327
- (n = t[i]) && (a = (e ? n(r, o, a) : n(a)) || a);
4334
+ for (var a = e > 1 ? void 0 : e ? sl(r, o) : r, n = t.length - 1, i; n >= 0; n--)
4335
+ (i = t[n]) && (a = (e ? i(r, o, a) : i(a)) || a);
4328
4336
  return e && a && il(r, o, a), a;
4329
4337
  }, Zo = (t, r, o) => r.has(t) || So("Cannot " + o), vt = (t, r, o) => (Zo(t, r, "read from private field"), o ? o.call(t) : r.get(t)), xt = (t, r, o) => r.has(t) ? So("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(t) : r.set(t, o), wt = (t, r, o, e) => (Zo(t, r, "write to private field"), r.set(t, o), o), Et, At, jt, St;
4330
4338
  let B = class extends f {
@@ -4433,10 +4441,10 @@ mt([
4433
4441
  B = mt([
4434
4442
  S("wg-networks")
4435
4443
  ], B);
4436
- var sl = Object.defineProperty, ll = Object.getOwnPropertyDescriptor, Io = (t, r, o, e) => {
4437
- for (var a = e > 1 ? void 0 : e ? ll(r, o) : r, i = t.length - 1, n; i >= 0; i--)
4438
- (n = t[i]) && (a = (e ? n(r, o, a) : n(a)) || a);
4439
- return e && a && sl(r, o, a), a;
4444
+ var ll = Object.defineProperty, dl = Object.getOwnPropertyDescriptor, Io = (t, r, o, e) => {
4445
+ for (var a = e > 1 ? void 0 : e ? dl(r, o) : r, n = t.length - 1, i; n >= 0; n--)
4446
+ (i = t[n]) && (a = (e ? i(r, o, a) : i(a)) || a);
4447
+ return e && a && ll(r, o, a), a;
4440
4448
  };
4441
4449
  let Mt = class extends f {
4442
4450
  constructor() {
@@ -4491,10 +4499,10 @@ Io([
4491
4499
  Mt = Io([
4492
4500
  S("not-found")
4493
4501
  ], Mt);
4494
- var dl = Object.defineProperty, cl = Object.getOwnPropertyDescriptor, Po = (t, r, o, e) => {
4495
- for (var a = e > 1 ? void 0 : e ? cl(r, o) : r, i = t.length - 1, n; i >= 0; i--)
4496
- (n = t[i]) && (a = (e ? n(r, o, a) : n(a)) || a);
4497
- return e && a && dl(r, o, a), a;
4502
+ var cl = Object.defineProperty, bl = Object.getOwnPropertyDescriptor, Po = (t, r, o, e) => {
4503
+ for (var a = e > 1 ? void 0 : e ? bl(r, o) : r, n = t.length - 1, i; n >= 0; n--)
4504
+ (i = t[n]) && (a = (e ? i(r, o, a) : i(a)) || a);
4505
+ return e && a && cl(r, o, a), a;
4498
4506
  };
4499
4507
  let Nt = class extends f {
4500
4508
  constructor() {
@@ -4513,6 +4521,7 @@ let Nt = class extends f {
4513
4521
  <tr>
4514
4522
  <th>Network ID</th>
4515
4523
  <th>Status</th>
4524
+ <th>Reason</th>
4516
4525
  <th>Access Token</th>
4517
4526
  </tr>
4518
4527
  </thead>
@@ -4521,7 +4530,10 @@ let Nt = class extends f {
4521
4530
  (t) => g`
4522
4531
  <tr>
4523
4532
  <td>${t.network.id}</td>
4524
- <td>${t.status}</td>
4533
+ <td>
4534
+ ${t.status === "connected" ? "🟢" : "🔴"}
4535
+ </td>
4536
+ <td>${t.reason}</td>
4525
4537
  <td>
4526
4538
  <button
4527
4539
  type="button"
@@ -4580,40 +4592,40 @@ Nt = Po([
4580
4592
  S("wg-sessions")
4581
4593
  ], Nt);
4582
4594
  m().regex(/^[a-zA-Z0-9:_-]*::[a-z0-9]*/, "Invalid party ID format");
4583
- var bl = x({
4595
+ var pl = x({
4584
4596
  method: m(),
4585
4597
  params: L(
4586
- gr([Ut(tt()), js(m(), tt())])
4598
+ gr([Ut(tt()), Ss(m(), tt())])
4587
4599
  )
4588
- }), pl = x({
4600
+ }), ml = x({
4589
4601
  result: L(tt())
4590
4602
  }), er = x({
4591
4603
  error: x({
4592
4604
  code: Rt(),
4593
4605
  message: m(),
4594
4606
  data: L(
4595
- m().or(Rt()).or(hs()).or(yo()).or(tt())
4607
+ m().or(Rt()).or(vs()).or(yo()).or(tt())
4596
4608
  )
4597
4609
  })
4598
- }), ml = gr([pl, er]), Co = x({
4610
+ }), gl = gr([ml, er]), Co = x({
4599
4611
  jsonrpc: A("2.0"),
4600
4612
  // only support JSON-RPC 2.0
4601
- id: L(m().or(Rt()).or(xs()).or(yo()))
4602
- }), gl = ur(Co, bl), ul = ur(Co, ml);
4613
+ id: L(m().or(Rt()).or(ws()).or(yo()))
4614
+ }), ul = ur(Co, pl), fl = ur(Co, gl);
4603
4615
  pt("type", [
4604
4616
  x({
4605
4617
  type: A(
4606
4618
  "SPLICE_WALLET_REQUEST"
4607
4619
  /* SPLICE_WALLET_REQUEST */
4608
4620
  ),
4609
- request: gl
4621
+ request: ul
4610
4622
  }),
4611
4623
  x({
4612
4624
  type: A(
4613
4625
  "SPLICE_WALLET_RESPONSE"
4614
4626
  /* SPLICE_WALLET_RESPONSE */
4615
4627
  ),
4616
- response: ul
4628
+ response: fl
4617
4629
  }),
4618
4630
  x({ type: A(
4619
4631
  "SPLICE_WALLET_EXT_READY"
@@ -4652,12 +4664,12 @@ x({
4652
4664
  name: m(),
4653
4665
  rpcUrl: m()
4654
4666
  });
4655
- function fl(t, r) {
4667
+ function hl(t, r) {
4656
4668
  const o = document.createElement("custom-toast");
4657
4669
  let e = -1, a = "";
4658
4670
  if (er.safeParse(t).success) {
4659
- const i = er.parse(t);
4660
- e = i.error.code, a = i.error.message;
4671
+ const n = er.parse(t);
4672
+ e = n.error.code, a = n.error.message;
4661
4673
  }
4662
4674
  switch (e) {
4663
4675
  case -32600:
@@ -4678,10 +4690,10 @@ function fl(t, r) {
4678
4690
  }
4679
4691
  o.message = a || (r == null ? void 0 : r.message) || "Something went wrong. Please try again.", o.type = "error", o.buttonText = (r == null ? void 0 : r.buttonText) || "Dismiss", document.body.appendChild(o);
4680
4692
  }
4681
- var hl = Object.defineProperty, vl = Object.getOwnPropertyDescriptor, To = (t, r, o, e) => {
4682
- for (var a = e > 1 ? void 0 : e ? vl(r, o) : r, i = t.length - 1, n; i >= 0; i--)
4683
- (n = t[i]) && (a = (e ? n(r, o, a) : n(a)) || a);
4684
- return e && a && hl(r, o, a), a;
4693
+ var vl = Object.defineProperty, xl = Object.getOwnPropertyDescriptor, To = (t, r, o, e) => {
4694
+ for (var a = e > 1 ? void 0 : e ? xl(r, o) : r, n = t.length - 1, i; n >= 0; n--)
4695
+ (i = t[n]) && (a = (e ? i(r, o, a) : i(a)) || a);
4696
+ return e && a && vl(r, o, a), a;
4685
4697
  };
4686
4698
  let Dt = class extends f {
4687
4699
  constructor() {
@@ -4695,7 +4707,7 @@ let Dt = class extends f {
4695
4707
  ➖ ${r == null ? void 0 : r.removed.length} old wallets.`
4696
4708
  );
4697
4709
  } catch (r) {
4698
- fl(r);
4710
+ hl(r);
4699
4711
  }
4700
4712
  };
4701
4713
  }
@@ -4710,7 +4722,7 @@ let Dt = class extends f {
4710
4722
  class="alert alert-primary d-flex align-items-center py-2"
4711
4723
  role="alert"
4712
4724
  >
4713
- <span class="icon me-2">${de}</span>
4725
+ <span class="icon me-2">${ce}</span>
4714
4726
  Keep your wallets in sync with the connected network.
4715
4727
  </div>
4716
4728
  <button
@@ -4740,13 +4752,13 @@ To([
4740
4752
  Dt = To([
4741
4753
  S("wg-wallets-sync")
4742
4754
  ], Dt);
4743
- function xl(t, r) {
4755
+ function wl(t, r) {
4744
4756
  const {
4745
4757
  title: o = "Custom Popup",
4746
4758
  target: e = "wallet-popup",
4747
4759
  width: a = 400,
4748
- height: i = 500,
4749
- screenX: n = 200,
4760
+ height: n = 500,
4761
+ screenX: i = 200,
4750
4762
  screenY: s = 200
4751
4763
  } = r || {}, l = t.styles.replaceAll(`
4752
4764
  `, " ").replaceAll("'", "\\'").replaceAll('"', '\\"');
@@ -4791,32 +4803,32 @@ constructor() {`
4791
4803
  const E = window.open(
4792
4804
  u,
4793
4805
  e,
4794
- `width=${a},height=${i},screenX=${n},screenY=${s}`
4806
+ `width=${a},height=${n},screenX=${i},screenY=${s}`
4795
4807
  );
4796
4808
  E ? (E.addEventListener("beforeunload", () => {
4797
4809
  URL.revokeObjectURL(u);
4798
4810
  }), h(E)) : z(new Error("Failed to open popup window."));
4799
4811
  });
4800
4812
  }
4801
- function _l(t, r) {
4813
+ function zl(t, r) {
4802
4814
  const {
4803
4815
  target: o = "wallet-popup",
4804
4816
  width: e = 400,
4805
4817
  height: a = 500,
4806
- screenX: i = 200,
4807
- screenY: n = 200
4818
+ screenX: n = 200,
4819
+ screenY: i = 200
4808
4820
  } = r || {};
4809
4821
  return new Promise((s, l) => {
4810
4822
  const c = window.open(
4811
4823
  t,
4812
4824
  o,
4813
- `width=${e},height=${a},screenX=${i},screenY=${n}`
4825
+ `width=${e},height=${a},screenX=${n},screenY=${i}`
4814
4826
  );
4815
4827
  c ? (c.focus(), s(c)) : l(new Error("Failed to open popup window."));
4816
4828
  });
4817
4829
  }
4818
- async function zl(t) {
4819
- const r = await xl(It, {
4830
+ async function $l(t) {
4831
+ const r = await wl(It, {
4820
4832
  title: "Wallet Discovery",
4821
4833
  target: "wallet-discovery"
4822
4834
  });
@@ -4830,30 +4842,31 @@ async function zl(t) {
4830
4842
  r.addEventListener("beforeunload", () => {
4831
4843
  a === void 0 && (console.log("Wallet discovery window closed by user"), e("User closed the wallet discovery window"));
4832
4844
  });
4833
- const i = (n) => {
4834
- n.origin === window.location.origin && typeof n.data.walletType == "string" && (a = n.data, o({
4835
- url: n.data.url,
4836
- walletType: n.data.walletType
4837
- }), window.removeEventListener("message", i), r.close());
4845
+ const n = (i) => {
4846
+ i.origin === window.location.origin && typeof i.data.walletType == "string" && (a = i.data, o({
4847
+ url: i.data.url,
4848
+ walletType: i.data.walletType
4849
+ }), window.removeEventListener("message", n), r.close());
4838
4850
  };
4839
- window.addEventListener("message", i);
4851
+ window.addEventListener("message", n);
4840
4852
  });
4841
4853
  }
4842
4854
  export {
4843
4855
  J as AppHeader,
4844
- nt as AppLayout,
4856
+ it as AppLayout,
4845
4857
  It as Discovery,
4846
4858
  T as FormInput,
4847
- pe as FormInputChangedEvent,
4848
- xe as IdpAddEvent,
4859
+ me as FormInputChangedEvent,
4860
+ we as IdpAddEvent,
4849
4861
  Pt as IdpCard,
4850
- ue as IdpCardDeleteEvent,
4851
- fe as IdpCardUpdateEvent,
4862
+ fe as IdpCardDeleteEvent,
4863
+ he as IdpCardUpdateEvent,
4864
+ oe as LogoutEvent,
4852
4865
  st as NetworkCard,
4853
- ze as NetworkCardDeleteEvent,
4854
- kl as NetworkCardUpdateEvent,
4855
- el as NetworkEditCancelEvent,
4856
- al as NetworkEditSaveEvent,
4866
+ $e as NetworkCardDeleteEvent,
4867
+ _l as NetworkCardUpdateEvent,
4868
+ al as NetworkEditCancelEvent,
4869
+ nl as NetworkEditSaveEvent,
4857
4870
  ct as NetworkForm,
4858
4871
  Ct as NetworkTable,
4859
4872
  Mt as NotFound,
@@ -4862,9 +4875,9 @@ export {
4862
4875
  B as WgNetworks,
4863
4876
  Nt as WgSessions,
4864
4877
  Dt as WgWalletsSync,
4865
- zl as discover,
4866
- fl as handleErrorToast,
4867
- xl as popup,
4868
- _l as popupHref
4878
+ $l as discover,
4879
+ hl as handleErrorToast,
4880
+ wl as popup,
4881
+ zl as popupHref
4869
4882
  };
4870
4883
  //# sourceMappingURL=index.js.map