@moq/publish 0.2.1 → 0.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import * as ln from "@moq/lite";
1
+ import * as Se from "@moq/lite";
2
2
  import { Time as L } from "@moq/lite";
3
3
  import { Signal as f, Effect as P } from "@moq/signals";
4
4
  function d(e, n, t) {
@@ -15,8 +15,8 @@ function d(e, n, t) {
15
15
  a._zod.traits.add(e), n(a, c);
16
16
  const u = o.prototype, l = Object.keys(u);
17
17
  for (let h = 0; h < l.length; h++) {
18
- const w = l[h];
19
- w in a || (a[w] = u[w].bind(a));
18
+ const p = l[h];
19
+ p in a || (a[p] = u[p].bind(a));
20
20
  }
21
21
  }
22
22
  const s = t?.Parent ?? Object;
@@ -53,7 +53,7 @@ function pn(e) {
53
53
  const n = Object.values(e).filter((r) => typeof r == "number");
54
54
  return Object.entries(e).filter(([r, s]) => n.indexOf(+r) === -1).map(([r, s]) => s);
55
55
  }
56
- function Se(e, n) {
56
+ function Ee(e, n) {
57
57
  return typeof n == "bigint" ? n.toString() : n;
58
58
  }
59
59
  function me(e) {
@@ -66,10 +66,10 @@ function me(e) {
66
66
  }
67
67
  };
68
68
  }
69
- function Oe(e) {
69
+ function Re(e) {
70
70
  return e == null;
71
71
  }
72
- function Re(e) {
72
+ function Ae(e) {
73
73
  const n = e.startsWith("^") ? 1 : 0, t = e.endsWith("$") ? e.length - 1 : e.length;
74
74
  return e.slice(n, t);
75
75
  }
@@ -83,13 +83,13 @@ function nt(e, n) {
83
83
  const i = t > s ? t : s, o = Number.parseInt(e.toFixed(i).replace(".", "")), a = Number.parseInt(n.toFixed(i).replace(".", ""));
84
84
  return o % a / 10 ** i;
85
85
  }
86
- const De = /* @__PURE__ */ Symbol("evaluating");
87
- function v(e, n, t) {
86
+ const qe = /* @__PURE__ */ Symbol("evaluating");
87
+ function g(e, n, t) {
88
88
  let r;
89
89
  Object.defineProperty(e, n, {
90
90
  get() {
91
- if (r !== De)
92
- return r === void 0 && (r = De, r = t()), r;
91
+ if (r !== qe)
92
+ return r === void 0 && (r = qe, r = t()), r;
93
93
  },
94
94
  set(s) {
95
95
  Object.defineProperty(e, n, {
@@ -116,7 +116,7 @@ function F(...e) {
116
116
  }
117
117
  return Object.defineProperties({}, n);
118
118
  }
119
- function qe(e) {
119
+ function Me(e) {
120
120
  return JSON.stringify(e);
121
121
  }
122
122
  function tt(e) {
@@ -157,7 +157,7 @@ function j(e, n, t) {
157
157
  const r = new e._zod.constr(n ?? e._zod.def);
158
158
  return (!n || t?.parent) && (r._zod.parent = e), r;
159
159
  }
160
- function p(e) {
160
+ function m(e) {
161
161
  const n = e;
162
162
  if (!n)
163
163
  return {};
@@ -336,7 +336,7 @@ function x(e, n, t) {
336
336
  }
337
337
  return delete r.inst, delete r.continue, n?.reportInput || delete r.input, r;
338
338
  }
339
- function Ae(e) {
339
+ function Te(e) {
340
340
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
341
341
  }
342
342
  function te(...e) {
@@ -355,7 +355,7 @@ const vn = (e, n) => {
355
355
  }), Object.defineProperty(e, "issues", {
356
356
  value: n,
357
357
  enumerable: !1
358
- }), e.message = JSON.stringify(n, Se, 2), Object.defineProperty(e, "toString", {
358
+ }), e.message = JSON.stringify(n, Ee, 2), Object.defineProperty(e, "toString", {
359
359
  value: () => e.message,
360
360
  enumerable: !1
361
361
  });
@@ -387,7 +387,7 @@ function mt(e, n = (t) => t.message) {
387
387
  };
388
388
  return r(e), t;
389
389
  }
390
- const Te = (e) => (n, t, r, s) => {
390
+ const Ne = (e) => (n, t, r, s) => {
391
391
  const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, o = n._zod.run({ value: t, issues: [] }, i);
392
392
  if (o instanceof Promise)
393
393
  throw new X();
@@ -396,7 +396,7 @@ const Te = (e) => (n, t, r, s) => {
396
396
  throw mn(a, s?.callee), a;
397
397
  }
398
398
  return o.value;
399
- }, Ne = (e) => async (n, t, r, s) => {
399
+ }, $e = (e) => async (n, t, r, s) => {
400
400
  const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
401
401
  let o = n._zod.run({ value: t, issues: [] }, i);
402
402
  if (o instanceof Promise && (o = await o), o.issues.length) {
@@ -420,18 +420,18 @@ const Te = (e) => (n, t, r, s) => {
420
420
  error: new e(i.issues.map((o) => x(o, s, U())))
421
421
  } : { success: !0, data: i.value };
422
422
  }, vt = /* @__PURE__ */ ve(bn), gt = (e) => (n, t, r) => {
423
- const s = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
424
- return Te(e)(n, t, s);
425
- }, bt = (e) => (n, t, r) => Te(e)(n, t, r), _t = (e) => async (n, t, r) => {
426
423
  const s = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
427
424
  return Ne(e)(n, t, s);
428
- }, yt = (e) => async (n, t, r) => Ne(e)(n, t, r), kt = (e) => (n, t, r) => {
425
+ }, bt = (e) => (n, t, r) => Ne(e)(n, t, r), _t = (e) => async (n, t, r) => {
426
+ const s = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
427
+ return $e(e)(n, t, s);
428
+ }, yt = (e) => async (n, t, r) => $e(e)(n, t, r), kt = (e) => (n, t, r) => {
429
429
  const s = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
430
430
  return we(e)(n, t, s);
431
431
  }, It = (e) => (n, t, r) => we(e)(n, t, r), St = (e) => async (n, t, r) => {
432
432
  const s = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
433
433
  return ve(e)(n, t, s);
434
- }, Et = (e) => async (n, t, r) => ve(e)(n, t, r), zt = /^[cC][^\s-]{8,}$/, Pt = /^[0-9a-z]+$/, Ot = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Rt = /^[0-9a-vA-V]{20}$/, At = /^[A-Za-z0-9]{27}$/, Tt = /^[a-zA-Z0-9_-]{21}$/, Nt = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, $t = /^([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})$/, Me = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[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)$/, Ct = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Zt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
434
+ }, Et = (e) => async (n, t, r) => ve(e)(n, t, r), zt = /^[cC][^\s-]{8,}$/, Pt = /^[0-9a-z]+$/, Ot = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Rt = /^[0-9a-vA-V]{20}$/, At = /^[A-Za-z0-9]{27}$/, Tt = /^[a-zA-Z0-9_-]{21}$/, Nt = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, $t = /^([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})$/, Ue = (e) => e ? new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[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)$/, Ct = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Zt = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
435
435
  function Dt() {
436
436
  return new RegExp(Zt, "u");
437
437
  }
@@ -574,7 +574,7 @@ const Gt = (e) => {
574
574
  var t;
575
575
  T.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
576
576
  const s = r.value;
577
- return !Oe(s) && s.length !== void 0;
577
+ return !Re(s) && s.length !== void 0;
578
578
  }), e._zod.onattach.push((r) => {
579
579
  const s = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
580
580
  n.maximum < s && (r._zod.bag.maximum = n.maximum);
@@ -582,7 +582,7 @@ const Gt = (e) => {
582
582
  const s = r.value;
583
583
  if (s.length <= n.maximum)
584
584
  return;
585
- const o = Ae(s);
585
+ const o = Te(s);
586
586
  r.issues.push({
587
587
  origin: o,
588
588
  code: "too_big",
@@ -597,7 +597,7 @@ const Gt = (e) => {
597
597
  var t;
598
598
  T.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
599
599
  const s = r.value;
600
- return !Oe(s) && s.length !== void 0;
600
+ return !Re(s) && s.length !== void 0;
601
601
  }), e._zod.onattach.push((r) => {
602
602
  const s = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
603
603
  n.minimum > s && (r._zod.bag.minimum = n.minimum);
@@ -605,7 +605,7 @@ const Gt = (e) => {
605
605
  const s = r.value;
606
606
  if (s.length >= n.minimum)
607
607
  return;
608
- const o = Ae(s);
608
+ const o = Te(s);
609
609
  r.issues.push({
610
610
  origin: o,
611
611
  code: "too_small",
@@ -620,7 +620,7 @@ const Gt = (e) => {
620
620
  var t;
621
621
  T.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
622
622
  const s = r.value;
623
- return !Oe(s) && s.length !== void 0;
623
+ return !Re(s) && s.length !== void 0;
624
624
  }), e._zod.onattach.push((r) => {
625
625
  const s = r._zod.bag;
626
626
  s.minimum = n.length, s.maximum = n.length, s.length = n.length;
@@ -628,7 +628,7 @@ const Gt = (e) => {
628
628
  const s = r.value, i = s.length;
629
629
  if (i === n.length)
630
630
  return;
631
- const o = Ae(s), a = i > n.length;
631
+ const o = Te(s), a = i > n.length;
632
632
  r.issues.push({
633
633
  origin: o,
634
634
  ...a ? { code: "too_big", maximum: n.length } : { code: "too_small", minimum: n.length },
@@ -755,7 +755,7 @@ const dr = {
755
755
  major: 4,
756
756
  minor: 3,
757
757
  patch: 6
758
- }, _ = /* @__PURE__ */ d("$ZodType", (e, n) => {
758
+ }, y = /* @__PURE__ */ d("$ZodType", (e, n) => {
759
759
  var t;
760
760
  e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = dr;
761
761
  const r = [...e._zod.def.checks ?? []];
@@ -776,17 +776,17 @@ const dr = {
776
776
  continue;
777
777
  } else if (u)
778
778
  continue;
779
- const w = o.issues.length, m = h._zod.check(o);
780
- if (m instanceof Promise && c?.async === !1)
779
+ const p = o.issues.length, w = h._zod.check(o);
780
+ if (w instanceof Promise && c?.async === !1)
781
781
  throw new X();
782
- if (l || m instanceof Promise)
782
+ if (l || w instanceof Promise)
783
783
  l = (l ?? Promise.resolve()).then(async () => {
784
- await m, o.issues.length !== w && (u || (u = W(o, w)));
784
+ await w, o.issues.length !== p && (u || (u = W(o, p)));
785
785
  });
786
786
  else {
787
- if (o.issues.length === w)
787
+ if (o.issues.length === p)
788
788
  continue;
789
- u || (u = W(o, w));
789
+ u || (u = W(o, p));
790
790
  }
791
791
  }
792
792
  return l ? l.then(() => o) : o;
@@ -817,7 +817,7 @@ const dr = {
817
817
  return s(c, r, a);
818
818
  };
819
819
  }
820
- v(e, "~standard", () => ({
820
+ g(e, "~standard", () => ({
821
821
  validate: (s) => {
822
822
  try {
823
823
  const i = wt(e, s);
@@ -829,8 +829,8 @@ const dr = {
829
829
  vendor: "zod",
830
830
  version: 1
831
831
  }));
832
- }), $e = /* @__PURE__ */ d("$ZodString", (e, n) => {
833
- _.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Gt(e._zod.bag), e._zod.parse = (t, r) => {
832
+ }), Ce = /* @__PURE__ */ d("$ZodString", (e, n) => {
833
+ y.init(e, n), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Gt(e._zod.bag), e._zod.parse = (t, r) => {
834
834
  if (n.coerce)
835
835
  try {
836
836
  t.value = String(t.value);
@@ -843,10 +843,10 @@ const dr = {
843
843
  inst: e
844
844
  }), t;
845
845
  };
846
- }), g = /* @__PURE__ */ d("$ZodStringFormat", (e, n) => {
847
- ge.init(e, n), $e.init(e, n);
846
+ }), b = /* @__PURE__ */ d("$ZodStringFormat", (e, n) => {
847
+ ge.init(e, n), Ce.init(e, n);
848
848
  }), lr = /* @__PURE__ */ d("$ZodGUID", (e, n) => {
849
- n.pattern ?? (n.pattern = $t), g.init(e, n);
849
+ n.pattern ?? (n.pattern = $t), b.init(e, n);
850
850
  }), hr = /* @__PURE__ */ d("$ZodUUID", (e, n) => {
851
851
  if (n.version) {
852
852
  const r = {
@@ -861,14 +861,14 @@ const dr = {
861
861
  }[n.version];
862
862
  if (r === void 0)
863
863
  throw new Error(`Invalid UUID version: "${n.version}"`);
864
- n.pattern ?? (n.pattern = Me(r));
864
+ n.pattern ?? (n.pattern = Ue(r));
865
865
  } else
866
- n.pattern ?? (n.pattern = Me());
867
- g.init(e, n);
866
+ n.pattern ?? (n.pattern = Ue());
867
+ b.init(e, n);
868
868
  }), fr = /* @__PURE__ */ d("$ZodEmail", (e, n) => {
869
- n.pattern ?? (n.pattern = Ct), g.init(e, n);
869
+ n.pattern ?? (n.pattern = Ct), b.init(e, n);
870
870
  }), pr = /* @__PURE__ */ d("$ZodURL", (e, n) => {
871
- g.init(e, n), e._zod.check = (t) => {
871
+ b.init(e, n), e._zod.check = (t) => {
872
872
  try {
873
873
  const r = t.value.trim(), s = new URL(r);
874
874
  n.hostname && (n.hostname.lastIndex = 0, n.hostname.test(s.hostname) || t.issues.push({
@@ -900,31 +900,31 @@ const dr = {
900
900
  }
901
901
  };
902
902
  }), mr = /* @__PURE__ */ d("$ZodEmoji", (e, n) => {
903
- n.pattern ?? (n.pattern = Dt()), g.init(e, n);
903
+ n.pattern ?? (n.pattern = Dt()), b.init(e, n);
904
904
  }), wr = /* @__PURE__ */ d("$ZodNanoID", (e, n) => {
905
- n.pattern ?? (n.pattern = Tt), g.init(e, n);
905
+ n.pattern ?? (n.pattern = Tt), b.init(e, n);
906
906
  }), vr = /* @__PURE__ */ d("$ZodCUID", (e, n) => {
907
- n.pattern ?? (n.pattern = zt), g.init(e, n);
907
+ n.pattern ?? (n.pattern = zt), b.init(e, n);
908
908
  }), gr = /* @__PURE__ */ d("$ZodCUID2", (e, n) => {
909
- n.pattern ?? (n.pattern = Pt), g.init(e, n);
909
+ n.pattern ?? (n.pattern = Pt), b.init(e, n);
910
910
  }), br = /* @__PURE__ */ d("$ZodULID", (e, n) => {
911
- n.pattern ?? (n.pattern = Ot), g.init(e, n);
911
+ n.pattern ?? (n.pattern = Ot), b.init(e, n);
912
912
  }), _r = /* @__PURE__ */ d("$ZodXID", (e, n) => {
913
- n.pattern ?? (n.pattern = Rt), g.init(e, n);
913
+ n.pattern ?? (n.pattern = Rt), b.init(e, n);
914
914
  }), yr = /* @__PURE__ */ d("$ZodKSUID", (e, n) => {
915
- n.pattern ?? (n.pattern = At), g.init(e, n);
915
+ n.pattern ?? (n.pattern = At), b.init(e, n);
916
916
  }), kr = /* @__PURE__ */ d("$ZodISODateTime", (e, n) => {
917
- n.pattern ?? (n.pattern = Bt(n)), g.init(e, n);
917
+ n.pattern ?? (n.pattern = Bt(n)), b.init(e, n);
918
918
  }), Ir = /* @__PURE__ */ d("$ZodISODate", (e, n) => {
919
- n.pattern ?? (n.pattern = Vt), g.init(e, n);
919
+ n.pattern ?? (n.pattern = Vt), b.init(e, n);
920
920
  }), Sr = /* @__PURE__ */ d("$ZodISOTime", (e, n) => {
921
- n.pattern ?? (n.pattern = Lt(n)), g.init(e, n);
921
+ n.pattern ?? (n.pattern = Lt(n)), b.init(e, n);
922
922
  }), Er = /* @__PURE__ */ d("$ZodISODuration", (e, n) => {
923
- n.pattern ?? (n.pattern = Nt), g.init(e, n);
923
+ n.pattern ?? (n.pattern = Nt), b.init(e, n);
924
924
  }), zr = /* @__PURE__ */ d("$ZodIPv4", (e, n) => {
925
- n.pattern ?? (n.pattern = qt), g.init(e, n), e._zod.bag.format = "ipv4";
925
+ n.pattern ?? (n.pattern = qt), b.init(e, n), e._zod.bag.format = "ipv4";
926
926
  }), Pr = /* @__PURE__ */ d("$ZodIPv6", (e, n) => {
927
- n.pattern ?? (n.pattern = Mt), g.init(e, n), e._zod.bag.format = "ipv6", e._zod.check = (t) => {
927
+ n.pattern ?? (n.pattern = Mt), b.init(e, n), e._zod.bag.format = "ipv6", e._zod.check = (t) => {
928
928
  try {
929
929
  new URL(`http://[${t.value}]`);
930
930
  } catch {
@@ -938,9 +938,9 @@ const dr = {
938
938
  }
939
939
  };
940
940
  }), Or = /* @__PURE__ */ d("$ZodCIDRv4", (e, n) => {
941
- n.pattern ?? (n.pattern = Ut), g.init(e, n);
941
+ n.pattern ?? (n.pattern = Ut), b.init(e, n);
942
942
  }), Rr = /* @__PURE__ */ d("$ZodCIDRv6", (e, n) => {
943
- n.pattern ?? (n.pattern = xt), g.init(e, n), e._zod.check = (t) => {
943
+ n.pattern ?? (n.pattern = xt), b.init(e, n), e._zod.check = (t) => {
944
944
  const r = t.value.split("/");
945
945
  try {
946
946
  if (r.length !== 2)
@@ -977,7 +977,7 @@ function Pn(e) {
977
977
  }
978
978
  }
979
979
  const Ar = /* @__PURE__ */ d("$ZodBase64", (e, n) => {
980
- n.pattern ?? (n.pattern = Ft), g.init(e, n), e._zod.bag.contentEncoding = "base64", e._zod.check = (t) => {
980
+ n.pattern ?? (n.pattern = Ft), b.init(e, n), e._zod.bag.contentEncoding = "base64", e._zod.check = (t) => {
981
981
  Pn(t.value) || t.issues.push({
982
982
  code: "invalid_format",
983
983
  format: "base64",
@@ -994,7 +994,7 @@ function Tr(e) {
994
994
  return Pn(t);
995
995
  }
996
996
  const Nr = /* @__PURE__ */ d("$ZodBase64URL", (e, n) => {
997
- n.pattern ?? (n.pattern = _n), g.init(e, n), e._zod.bag.contentEncoding = "base64url", e._zod.check = (t) => {
997
+ n.pattern ?? (n.pattern = _n), b.init(e, n), e._zod.bag.contentEncoding = "base64url", e._zod.check = (t) => {
998
998
  Tr(t.value) || t.issues.push({
999
999
  code: "invalid_format",
1000
1000
  format: "base64url",
@@ -1004,7 +1004,7 @@ const Nr = /* @__PURE__ */ d("$ZodBase64URL", (e, n) => {
1004
1004
  });
1005
1005
  };
1006
1006
  }), $r = /* @__PURE__ */ d("$ZodE164", (e, n) => {
1007
- n.pattern ?? (n.pattern = jt), g.init(e, n);
1007
+ n.pattern ?? (n.pattern = jt), b.init(e, n);
1008
1008
  });
1009
1009
  function Cr(e, n = null) {
1010
1010
  try {
@@ -1021,7 +1021,7 @@ function Cr(e, n = null) {
1021
1021
  }
1022
1022
  }
1023
1023
  const Zr = /* @__PURE__ */ d("$ZodJWT", (e, n) => {
1024
- g.init(e, n), e._zod.check = (t) => {
1024
+ b.init(e, n), e._zod.check = (t) => {
1025
1025
  Cr(t.value, n.alg) || t.issues.push({
1026
1026
  code: "invalid_format",
1027
1027
  format: "jwt",
@@ -1031,7 +1031,7 @@ const Zr = /* @__PURE__ */ d("$ZodJWT", (e, n) => {
1031
1031
  });
1032
1032
  };
1033
1033
  }), On = /* @__PURE__ */ d("$ZodNumber", (e, n) => {
1034
- _.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? In, e._zod.parse = (t, r) => {
1034
+ y.init(e, n), e._zod.pattern = e._zod.bag.pattern ?? In, e._zod.parse = (t, r) => {
1035
1035
  if (n.coerce)
1036
1036
  try {
1037
1037
  t.value = Number(t.value);
@@ -1052,7 +1052,7 @@ const Zr = /* @__PURE__ */ d("$ZodJWT", (e, n) => {
1052
1052
  }), Dr = /* @__PURE__ */ d("$ZodNumberFormat", (e, n) => {
1053
1053
  Yt.init(e, n), On.init(e, n);
1054
1054
  }), qr = /* @__PURE__ */ d("$ZodBoolean", (e, n) => {
1055
- _.init(e, n), e._zod.pattern = Wt, e._zod.parse = (t, r) => {
1055
+ y.init(e, n), e._zod.pattern = Wt, e._zod.parse = (t, r) => {
1056
1056
  if (n.coerce)
1057
1057
  try {
1058
1058
  t.value = !!t.value;
@@ -1067,20 +1067,20 @@ const Zr = /* @__PURE__ */ d("$ZodJWT", (e, n) => {
1067
1067
  }), t;
1068
1068
  };
1069
1069
  }), Mr = /* @__PURE__ */ d("$ZodUnknown", (e, n) => {
1070
- _.init(e, n), e._zod.parse = (t) => t;
1070
+ y.init(e, n), e._zod.parse = (t) => t;
1071
1071
  }), Ur = /* @__PURE__ */ d("$ZodNever", (e, n) => {
1072
- _.init(e, n), e._zod.parse = (t, r) => (t.issues.push({
1072
+ y.init(e, n), e._zod.parse = (t, r) => (t.issues.push({
1073
1073
  expected: "never",
1074
1074
  code: "invalid_type",
1075
1075
  input: t.value,
1076
1076
  inst: e
1077
1077
  }), t);
1078
1078
  });
1079
- function Ue(e, n, t) {
1079
+ function xe(e, n, t) {
1080
1080
  e.issues.length && n.issues.push(...K(t, e.issues)), n.value[t] = e.value;
1081
1081
  }
1082
1082
  const xr = /* @__PURE__ */ d("$ZodArray", (e, n) => {
1083
- _.init(e, n), e._zod.parse = (t, r) => {
1083
+ y.init(e, n), e._zod.parse = (t, r) => {
1084
1084
  const s = t.value;
1085
1085
  if (!Array.isArray(s))
1086
1086
  return t.issues.push({
@@ -1096,7 +1096,7 @@ const xr = /* @__PURE__ */ d("$ZodArray", (e, n) => {
1096
1096
  value: a,
1097
1097
  issues: []
1098
1098
  }, r);
1099
- c instanceof Promise ? i.push(c.then((u) => Ue(u, t, o))) : Ue(c, t, o);
1099
+ c instanceof Promise ? i.push(c.then((u) => xe(u, t, o))) : xe(c, t, o);
1100
1100
  }
1101
1101
  return i.length ? Promise.all(i).then(() => t) : t;
1102
1102
  };
@@ -1132,8 +1132,8 @@ function An(e, n, t, r, s, i) {
1132
1132
  o.push(h);
1133
1133
  continue;
1134
1134
  }
1135
- const w = c.run({ value: n[h], issues: [] }, r);
1136
- w instanceof Promise ? e.push(w.then((m) => le(m, t, h, n, l))) : le(w, t, h, n, l);
1135
+ const p = c.run({ value: n[h], issues: [] }, r);
1136
+ p instanceof Promise ? e.push(p.then((w) => le(w, t, h, n, l))) : le(p, t, h, n, l);
1137
1137
  }
1138
1138
  return o.length && t.issues.push({
1139
1139
  code: "unrecognized_keys",
@@ -1143,7 +1143,7 @@ function An(e, n, t, r, s, i) {
1143
1143
  }), e.length ? Promise.all(e).then(() => t) : t;
1144
1144
  }
1145
1145
  const Fr = /* @__PURE__ */ d("$ZodObject", (e, n) => {
1146
- if (_.init(e, n), !Object.getOwnPropertyDescriptor(n, "shape")?.get) {
1146
+ if (y.init(e, n), !Object.getOwnPropertyDescriptor(n, "shape")?.get) {
1147
1147
  const a = n.shape;
1148
1148
  Object.defineProperty(n, "shape", {
1149
1149
  get: () => {
@@ -1155,7 +1155,7 @@ const Fr = /* @__PURE__ */ d("$ZodObject", (e, n) => {
1155
1155
  });
1156
1156
  }
1157
1157
  const r = me(() => Rn(n));
1158
- v(e._zod, "propValues", () => {
1158
+ g(e._zod, "propValues", () => {
1159
1159
  const a = n.shape, c = {};
1160
1160
  for (const u in a) {
1161
1161
  const l = a[u]._zod;
@@ -1181,82 +1181,82 @@ const Fr = /* @__PURE__ */ d("$ZodObject", (e, n) => {
1181
1181
  }), a;
1182
1182
  a.value = {};
1183
1183
  const l = [], h = o.shape;
1184
- for (const w of o.keys) {
1185
- const m = h[w], E = m._zod.optout === "optional", I = m._zod.run({ value: u[w], issues: [] }, c);
1186
- I instanceof Promise ? l.push(I.then((Z) => le(Z, a, w, u, E))) : le(I, a, w, u, E);
1184
+ for (const p of o.keys) {
1185
+ const w = h[p], E = w._zod.optout === "optional", v = w._zod.run({ value: u[p], issues: [] }, c);
1186
+ v instanceof Promise ? l.push(v.then(($) => le($, a, p, u, E))) : le(v, a, p, u, E);
1187
1187
  }
1188
1188
  return i ? An(l, u, a, c, r.value, e) : l.length ? Promise.all(l).then(() => a) : a;
1189
1189
  };
1190
1190
  }), jr = /* @__PURE__ */ d("$ZodObjectJIT", (e, n) => {
1191
1191
  Fr.init(e, n);
1192
- const t = e._zod.parse, r = me(() => Rn(n)), s = (w) => {
1193
- const m = new ur(["shape", "payload", "ctx"]), E = r.value, I = (C) => {
1194
- const A = qe(C);
1192
+ const t = e._zod.parse, r = me(() => Rn(n)), s = (p) => {
1193
+ const w = new ur(["shape", "payload", "ctx"]), E = r.value, v = (Z) => {
1194
+ const A = Me(Z);
1195
1195
  return `shape[${A}]._zod.run({ value: input[${A}], issues: [] }, ctx)`;
1196
1196
  };
1197
- m.write("const input = payload.value;");
1198
- const Z = /* @__PURE__ */ Object.create(null);
1197
+ w.write("const input = payload.value;");
1198
+ const $ = /* @__PURE__ */ Object.create(null);
1199
1199
  let Yn = 0;
1200
- for (const C of E.keys)
1201
- Z[C] = `key_${Yn++}`;
1202
- m.write("const newResult = {};");
1203
- for (const C of E.keys) {
1204
- const A = Z[C], $ = qe(C), et = w[C]?._zod?.optout === "optional";
1205
- m.write(`const ${A} = ${I(C)};`), et ? m.write(`
1200
+ for (const Z of E.keys)
1201
+ $[Z] = `key_${Yn++}`;
1202
+ w.write("const newResult = {};");
1203
+ for (const Z of E.keys) {
1204
+ const A = $[Z], C = Me(Z), et = p[Z]?._zod?.optout === "optional";
1205
+ w.write(`const ${A} = ${v(Z)};`), et ? w.write(`
1206
1206
  if (${A}.issues.length) {
1207
- if (${$} in input) {
1207
+ if (${C} in input) {
1208
1208
  payload.issues = payload.issues.concat(${A}.issues.map(iss => ({
1209
1209
  ...iss,
1210
- path: iss.path ? [${$}, ...iss.path] : [${$}]
1210
+ path: iss.path ? [${C}, ...iss.path] : [${C}]
1211
1211
  })));
1212
1212
  }
1213
1213
  }
1214
1214
 
1215
1215
  if (${A}.value === undefined) {
1216
- if (${$} in input) {
1217
- newResult[${$}] = undefined;
1216
+ if (${C} in input) {
1217
+ newResult[${C}] = undefined;
1218
1218
  }
1219
1219
  } else {
1220
- newResult[${$}] = ${A}.value;
1220
+ newResult[${C}] = ${A}.value;
1221
1221
  }
1222
1222
 
1223
- `) : m.write(`
1223
+ `) : w.write(`
1224
1224
  if (${A}.issues.length) {
1225
1225
  payload.issues = payload.issues.concat(${A}.issues.map(iss => ({
1226
1226
  ...iss,
1227
- path: iss.path ? [${$}, ...iss.path] : [${$}]
1227
+ path: iss.path ? [${C}, ...iss.path] : [${C}]
1228
1228
  })));
1229
1229
  }
1230
1230
 
1231
1231
  if (${A}.value === undefined) {
1232
- if (${$} in input) {
1233
- newResult[${$}] = undefined;
1232
+ if (${C} in input) {
1233
+ newResult[${C}] = undefined;
1234
1234
  }
1235
1235
  } else {
1236
- newResult[${$}] = ${A}.value;
1236
+ newResult[${C}] = ${A}.value;
1237
1237
  }
1238
1238
 
1239
1239
  `);
1240
1240
  }
1241
- m.write("payload.value = newResult;"), m.write("return payload;");
1242
- const Qn = m.compile();
1243
- return (C, A) => Qn(w, C, A);
1241
+ w.write("payload.value = newResult;"), w.write("return payload;");
1242
+ const Qn = w.compile();
1243
+ return (Z, A) => Qn(p, Z, A);
1244
1244
  };
1245
1245
  let i;
1246
1246
  const o = ne, a = !fn.jitless, u = a && rt.value, l = n.catchall;
1247
1247
  let h;
1248
- e._zod.parse = (w, m) => {
1248
+ e._zod.parse = (p, w) => {
1249
1249
  h ?? (h = r.value);
1250
- const E = w.value;
1251
- return o(E) ? a && u && m?.async === !1 && m.jitless !== !0 ? (i || (i = s(n.shape)), w = i(w, m), l ? An([], E, w, m, h, e) : w) : t(w, m) : (w.issues.push({
1250
+ const E = p.value;
1251
+ return o(E) ? a && u && w?.async === !1 && w.jitless !== !0 ? (i || (i = s(n.shape)), p = i(p, w), l ? An([], E, p, w, h, e) : p) : t(p, w) : (p.issues.push({
1252
1252
  expected: "object",
1253
1253
  code: "invalid_type",
1254
1254
  input: E,
1255
1255
  inst: e
1256
- }), w);
1256
+ }), p);
1257
1257
  };
1258
1258
  });
1259
- function xe(e, n, t, r) {
1259
+ function Fe(e, n, t, r) {
1260
1260
  for (const i of e)
1261
1261
  if (i.issues.length === 0)
1262
1262
  return n.value = i.value, n;
@@ -1269,13 +1269,13 @@ function xe(e, n, t, r) {
1269
1269
  }), n);
1270
1270
  }
1271
1271
  const Tn = /* @__PURE__ */ d("$ZodUnion", (e, n) => {
1272
- _.init(e, n), v(e._zod, "optin", () => n.options.some((s) => s._zod.optin === "optional") ? "optional" : void 0), v(e._zod, "optout", () => n.options.some((s) => s._zod.optout === "optional") ? "optional" : void 0), v(e._zod, "values", () => {
1272
+ y.init(e, n), g(e._zod, "optin", () => n.options.some((s) => s._zod.optin === "optional") ? "optional" : void 0), g(e._zod, "optout", () => n.options.some((s) => s._zod.optout === "optional") ? "optional" : void 0), g(e._zod, "values", () => {
1273
1273
  if (n.options.every((s) => s._zod.values))
1274
1274
  return new Set(n.options.flatMap((s) => Array.from(s._zod.values)));
1275
- }), v(e._zod, "pattern", () => {
1275
+ }), g(e._zod, "pattern", () => {
1276
1276
  if (n.options.every((s) => s._zod.pattern)) {
1277
1277
  const s = n.options.map((i) => i._zod.pattern);
1278
- return new RegExp(`^(${s.map((i) => Re(i.source)).join("|")})$`);
1278
+ return new RegExp(`^(${s.map((i) => Ae(i.source)).join("|")})$`);
1279
1279
  }
1280
1280
  });
1281
1281
  const t = n.options.length === 1, r = n.options[0]._zod.run;
@@ -1297,12 +1297,12 @@ const Tn = /* @__PURE__ */ d("$ZodUnion", (e, n) => {
1297
1297
  a.push(u);
1298
1298
  }
1299
1299
  }
1300
- return o ? Promise.all(a).then((c) => xe(c, s, e, i)) : xe(a, s, e, i);
1300
+ return o ? Promise.all(a).then((c) => Fe(c, s, e, i)) : Fe(a, s, e, i);
1301
1301
  };
1302
1302
  }), Vr = /* @__PURE__ */ d("$ZodDiscriminatedUnion", (e, n) => {
1303
1303
  n.inclusive = !1, Tn.init(e, n);
1304
1304
  const t = e._zod.parse;
1305
- v(e._zod, "propValues", () => {
1305
+ g(e._zod, "propValues", () => {
1306
1306
  const s = {};
1307
1307
  for (const i of n.options) {
1308
1308
  const o = i._zod.propValues;
@@ -1351,12 +1351,12 @@ const Tn = /* @__PURE__ */ d("$ZodUnion", (e, n) => {
1351
1351
  }), s);
1352
1352
  };
1353
1353
  }), Lr = /* @__PURE__ */ d("$ZodIntersection", (e, n) => {
1354
- _.init(e, n), e._zod.parse = (t, r) => {
1354
+ y.init(e, n), e._zod.parse = (t, r) => {
1355
1355
  const s = t.value, i = n.left._zod.run({ value: s, issues: [] }, r), o = n.right._zod.run({ value: s, issues: [] }, r);
1356
- return i instanceof Promise || o instanceof Promise ? Promise.all([i, o]).then(([c, u]) => Fe(t, c, u)) : Fe(t, i, o);
1356
+ return i instanceof Promise || o instanceof Promise ? Promise.all([i, o]).then(([c, u]) => je(t, c, u)) : je(t, i, o);
1357
1357
  };
1358
1358
  });
1359
- function Ee(e, n) {
1359
+ function ze(e, n) {
1360
1360
  if (e === n)
1361
1361
  return { valid: !0, data: e };
1362
1362
  if (e instanceof Date && n instanceof Date && +e == +n)
@@ -1364,7 +1364,7 @@ function Ee(e, n) {
1364
1364
  if (H(e) && H(n)) {
1365
1365
  const t = Object.keys(n), r = Object.keys(e).filter((i) => t.indexOf(i) !== -1), s = { ...e, ...n };
1366
1366
  for (const i of r) {
1367
- const o = Ee(e[i], n[i]);
1367
+ const o = ze(e[i], n[i]);
1368
1368
  if (!o.valid)
1369
1369
  return {
1370
1370
  valid: !1,
@@ -1379,7 +1379,7 @@ function Ee(e, n) {
1379
1379
  return { valid: !1, mergeErrorPath: [] };
1380
1380
  const t = [];
1381
1381
  for (let r = 0; r < e.length; r++) {
1382
- const s = e[r], i = n[r], o = Ee(s, i);
1382
+ const s = e[r], i = n[r], o = ze(s, i);
1383
1383
  if (!o.valid)
1384
1384
  return {
1385
1385
  valid: !1,
@@ -1391,7 +1391,7 @@ function Ee(e, n) {
1391
1391
  }
1392
1392
  return { valid: !1, mergeErrorPath: [] };
1393
1393
  }
1394
- function Fe(e, n, t) {
1394
+ function je(e, n, t) {
1395
1395
  const r = /* @__PURE__ */ new Map();
1396
1396
  let s;
1397
1397
  for (const a of n.issues)
@@ -1410,13 +1410,13 @@ function Fe(e, n, t) {
1410
1410
  const i = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
1411
1411
  if (i.length && s && e.issues.push({ ...s, keys: i }), W(e))
1412
1412
  return e;
1413
- const o = Ee(n.value, t.value);
1413
+ const o = ze(n.value, t.value);
1414
1414
  if (!o.valid)
1415
1415
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
1416
1416
  return e.value = o.data, e;
1417
1417
  }
1418
1418
  const Br = /* @__PURE__ */ d("$ZodRecord", (e, n) => {
1419
- _.init(e, n), e._zod.parse = (t, r) => {
1419
+ y.init(e, n), e._zod.parse = (t, r) => {
1420
1420
  const s = t.value;
1421
1421
  if (!H(s))
1422
1422
  return t.issues.push({
@@ -1480,7 +1480,7 @@ const Br = /* @__PURE__ */ d("$ZodRecord", (e, n) => {
1480
1480
  return i.length ? Promise.all(i).then(() => t) : t;
1481
1481
  };
1482
1482
  }), Gr = /* @__PURE__ */ d("$ZodEnum", (e, n) => {
1483
- _.init(e, n);
1483
+ y.init(e, n);
1484
1484
  const t = pn(n.entries), r = new Set(t);
1485
1485
  e._zod.values = r, e._zod.pattern = new RegExp(`^(${t.filter((s) => st.has(typeof s)).map((s) => typeof s == "string" ? Y(s) : s.toString()).join("|")})$`), e._zod.parse = (s, i) => {
1486
1486
  const o = s.value;
@@ -1492,7 +1492,7 @@ const Br = /* @__PURE__ */ d("$ZodRecord", (e, n) => {
1492
1492
  }), s;
1493
1493
  };
1494
1494
  }), Jr = /* @__PURE__ */ d("$ZodLiteral", (e, n) => {
1495
- if (_.init(e, n), n.values.length === 0)
1495
+ if (y.init(e, n), n.values.length === 0)
1496
1496
  throw new Error("Cannot create literal schema with no valid values");
1497
1497
  const t = new Set(n.values);
1498
1498
  e._zod.values = t, e._zod.pattern = new RegExp(`^(${n.values.map((r) => typeof r == "string" ? Y(r) : r ? Y(r.toString()) : String(r)).join("|")})$`), e._zod.parse = (r, s) => {
@@ -1505,7 +1505,7 @@ const Br = /* @__PURE__ */ d("$ZodRecord", (e, n) => {
1505
1505
  }), r;
1506
1506
  };
1507
1507
  }), Wr = /* @__PURE__ */ d("$ZodTransform", (e, n) => {
1508
- _.init(e, n), e._zod.parse = (t, r) => {
1508
+ y.init(e, n), e._zod.parse = (t, r) => {
1509
1509
  if (r.direction === "backward")
1510
1510
  throw new hn(e.constructor.name);
1511
1511
  const s = n.transform(t.value, t);
@@ -1516,52 +1516,52 @@ const Br = /* @__PURE__ */ d("$ZodRecord", (e, n) => {
1516
1516
  return t.value = s, t;
1517
1517
  };
1518
1518
  });
1519
- function je(e, n) {
1519
+ function Ve(e, n) {
1520
1520
  return e.issues.length && n === void 0 ? { issues: [], value: void 0 } : e;
1521
1521
  }
1522
1522
  const Nn = /* @__PURE__ */ d("$ZodOptional", (e, n) => {
1523
- _.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", v(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), v(e._zod, "pattern", () => {
1523
+ y.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", g(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), g(e._zod, "pattern", () => {
1524
1524
  const t = n.innerType._zod.pattern;
1525
- return t ? new RegExp(`^(${Re(t.source)})?$`) : void 0;
1525
+ return t ? new RegExp(`^(${Ae(t.source)})?$`) : void 0;
1526
1526
  }), e._zod.parse = (t, r) => {
1527
1527
  if (n.innerType._zod.optin === "optional") {
1528
1528
  const s = n.innerType._zod.run(t, r);
1529
- return s instanceof Promise ? s.then((i) => je(i, t.value)) : je(s, t.value);
1529
+ return s instanceof Promise ? s.then((i) => Ve(i, t.value)) : Ve(s, t.value);
1530
1530
  }
1531
1531
  return t.value === void 0 ? t : n.innerType._zod.run(t, r);
1532
1532
  };
1533
1533
  }), Kr = /* @__PURE__ */ d("$ZodExactOptional", (e, n) => {
1534
- Nn.init(e, n), v(e._zod, "values", () => n.innerType._zod.values), v(e._zod, "pattern", () => n.innerType._zod.pattern), e._zod.parse = (t, r) => n.innerType._zod.run(t, r);
1534
+ Nn.init(e, n), g(e._zod, "values", () => n.innerType._zod.values), g(e._zod, "pattern", () => n.innerType._zod.pattern), e._zod.parse = (t, r) => n.innerType._zod.run(t, r);
1535
1535
  }), Xr = /* @__PURE__ */ d("$ZodNullable", (e, n) => {
1536
- _.init(e, n), v(e._zod, "optin", () => n.innerType._zod.optin), v(e._zod, "optout", () => n.innerType._zod.optout), v(e._zod, "pattern", () => {
1536
+ y.init(e, n), g(e._zod, "optin", () => n.innerType._zod.optin), g(e._zod, "optout", () => n.innerType._zod.optout), g(e._zod, "pattern", () => {
1537
1537
  const t = n.innerType._zod.pattern;
1538
- return t ? new RegExp(`^(${Re(t.source)}|null)$`) : void 0;
1539
- }), v(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, null]) : void 0), e._zod.parse = (t, r) => t.value === null ? t : n.innerType._zod.run(t, r);
1538
+ return t ? new RegExp(`^(${Ae(t.source)}|null)$`) : void 0;
1539
+ }), g(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, null]) : void 0), e._zod.parse = (t, r) => t.value === null ? t : n.innerType._zod.run(t, r);
1540
1540
  }), Hr = /* @__PURE__ */ d("$ZodDefault", (e, n) => {
1541
- _.init(e, n), e._zod.optin = "optional", v(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
1541
+ y.init(e, n), e._zod.optin = "optional", g(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
1542
1542
  if (r.direction === "backward")
1543
1543
  return n.innerType._zod.run(t, r);
1544
1544
  if (t.value === void 0)
1545
1545
  return t.value = n.defaultValue, t;
1546
1546
  const s = n.innerType._zod.run(t, r);
1547
- return s instanceof Promise ? s.then((i) => Ve(i, n)) : Ve(s, n);
1547
+ return s instanceof Promise ? s.then((i) => Le(i, n)) : Le(s, n);
1548
1548
  };
1549
1549
  });
1550
- function Ve(e, n) {
1550
+ function Le(e, n) {
1551
1551
  return e.value === void 0 && (e.value = n.defaultValue), e;
1552
1552
  }
1553
1553
  const Yr = /* @__PURE__ */ d("$ZodPrefault", (e, n) => {
1554
- _.init(e, n), e._zod.optin = "optional", v(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => (r.direction === "backward" || t.value === void 0 && (t.value = n.defaultValue), n.innerType._zod.run(t, r));
1554
+ y.init(e, n), e._zod.optin = "optional", g(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => (r.direction === "backward" || t.value === void 0 && (t.value = n.defaultValue), n.innerType._zod.run(t, r));
1555
1555
  }), Qr = /* @__PURE__ */ d("$ZodNonOptional", (e, n) => {
1556
- _.init(e, n), v(e._zod, "values", () => {
1556
+ y.init(e, n), g(e._zod, "values", () => {
1557
1557
  const t = n.innerType._zod.values;
1558
1558
  return t ? new Set([...t].filter((r) => r !== void 0)) : void 0;
1559
1559
  }), e._zod.parse = (t, r) => {
1560
1560
  const s = n.innerType._zod.run(t, r);
1561
- return s instanceof Promise ? s.then((i) => Le(i, e)) : Le(s, e);
1561
+ return s instanceof Promise ? s.then((i) => Be(i, e)) : Be(s, e);
1562
1562
  };
1563
1563
  });
1564
- function Le(e, n) {
1564
+ function Be(e, n) {
1565
1565
  return !e.issues.length && e.value === void 0 && e.issues.push({
1566
1566
  code: "invalid_type",
1567
1567
  expected: "nonoptional",
@@ -1570,7 +1570,7 @@ function Le(e, n) {
1570
1570
  }), e;
1571
1571
  }
1572
1572
  const es = /* @__PURE__ */ d("$ZodCatch", (e, n) => {
1573
- _.init(e, n), v(e._zod, "optin", () => n.innerType._zod.optin), v(e._zod, "optout", () => n.innerType._zod.optout), v(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
1573
+ y.init(e, n), g(e._zod, "optin", () => n.innerType._zod.optin), g(e._zod, "optout", () => n.innerType._zod.optout), g(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
1574
1574
  if (r.direction === "backward")
1575
1575
  return n.innerType._zod.run(t, r);
1576
1576
  const s = n.innerType._zod.run(t, r);
@@ -1589,7 +1589,7 @@ const es = /* @__PURE__ */ d("$ZodCatch", (e, n) => {
1589
1589
  }), t.issues = []), t);
1590
1590
  };
1591
1591
  }), ns = /* @__PURE__ */ d("$ZodPipe", (e, n) => {
1592
- _.init(e, n), v(e._zod, "values", () => n.in._zod.values), v(e._zod, "optin", () => n.in._zod.optin), v(e._zod, "optout", () => n.out._zod.optout), v(e._zod, "propValues", () => n.in._zod.propValues), e._zod.parse = (t, r) => {
1592
+ y.init(e, n), g(e._zod, "values", () => n.in._zod.values), g(e._zod, "optin", () => n.in._zod.optin), g(e._zod, "optout", () => n.out._zod.optout), g(e._zod, "propValues", () => n.in._zod.propValues), e._zod.parse = (t, r) => {
1593
1593
  if (r.direction === "backward") {
1594
1594
  const i = n.out._zod.run(t, r);
1595
1595
  return i instanceof Promise ? i.then((o) => ue(o, n.in, r)) : ue(i, n.in, r);
@@ -1602,25 +1602,25 @@ function ue(e, n, t) {
1602
1602
  return e.issues.length ? (e.aborted = !0, e) : n._zod.run({ value: e.value, issues: e.issues }, t);
1603
1603
  }
1604
1604
  const ts = /* @__PURE__ */ d("$ZodReadonly", (e, n) => {
1605
- _.init(e, n), v(e._zod, "propValues", () => n.innerType._zod.propValues), v(e._zod, "values", () => n.innerType._zod.values), v(e._zod, "optin", () => n.innerType?._zod?.optin), v(e._zod, "optout", () => n.innerType?._zod?.optout), e._zod.parse = (t, r) => {
1605
+ y.init(e, n), g(e._zod, "propValues", () => n.innerType._zod.propValues), g(e._zod, "values", () => n.innerType._zod.values), g(e._zod, "optin", () => n.innerType?._zod?.optin), g(e._zod, "optout", () => n.innerType?._zod?.optout), e._zod.parse = (t, r) => {
1606
1606
  if (r.direction === "backward")
1607
1607
  return n.innerType._zod.run(t, r);
1608
1608
  const s = n.innerType._zod.run(t, r);
1609
- return s instanceof Promise ? s.then(Be) : Be(s);
1609
+ return s instanceof Promise ? s.then(Ge) : Ge(s);
1610
1610
  };
1611
1611
  });
1612
- function Be(e) {
1612
+ function Ge(e) {
1613
1613
  return e.value = Object.freeze(e.value), e;
1614
1614
  }
1615
1615
  const rs = /* @__PURE__ */ d("$ZodCustom", (e, n) => {
1616
- T.init(e, n), _.init(e, n), e._zod.parse = (t, r) => t, e._zod.check = (t) => {
1616
+ T.init(e, n), y.init(e, n), e._zod.parse = (t, r) => t, e._zod.check = (t) => {
1617
1617
  const r = t.value, s = n.fn(r);
1618
1618
  if (s instanceof Promise)
1619
- return s.then((i) => Ge(i, t, r, e));
1620
- Ge(s, t, r, e);
1619
+ return s.then((i) => Je(i, t, r, e));
1620
+ Je(s, t, r, e);
1621
1621
  };
1622
1622
  });
1623
- function Ge(e, n, t, r) {
1623
+ function Je(e, n, t, r) {
1624
1624
  if (!e) {
1625
1625
  const s = {
1626
1626
  code: "custom",
@@ -1635,7 +1635,7 @@ function Ge(e, n, t, r) {
1635
1635
  r._zod.def.params && (s.params = r._zod.def.params), n.issues.push(te(s));
1636
1636
  }
1637
1637
  }
1638
- var Je;
1638
+ var We;
1639
1639
  class ss {
1640
1640
  constructor() {
1641
1641
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
@@ -1668,13 +1668,13 @@ class ss {
1668
1668
  function os() {
1669
1669
  return new ss();
1670
1670
  }
1671
- (Je = globalThis).__zod_globalRegistry ?? (Je.__zod_globalRegistry = os());
1671
+ (We = globalThis).__zod_globalRegistry ?? (We.__zod_globalRegistry = os());
1672
1672
  const ee = globalThis.__zod_globalRegistry;
1673
1673
  // @__NO_SIDE_EFFECTS__
1674
1674
  function is(e, n) {
1675
1675
  return new e({
1676
1676
  type: "string",
1677
- ...p(n)
1677
+ ...m(n)
1678
1678
  });
1679
1679
  }
1680
1680
  // @__NO_SIDE_EFFECTS__
@@ -1684,17 +1684,17 @@ function as(e, n) {
1684
1684
  format: "email",
1685
1685
  check: "string_format",
1686
1686
  abort: !1,
1687
- ...p(n)
1687
+ ...m(n)
1688
1688
  });
1689
1689
  }
1690
1690
  // @__NO_SIDE_EFFECTS__
1691
- function We(e, n) {
1691
+ function Ke(e, n) {
1692
1692
  return new e({
1693
1693
  type: "string",
1694
1694
  format: "guid",
1695
1695
  check: "string_format",
1696
1696
  abort: !1,
1697
- ...p(n)
1697
+ ...m(n)
1698
1698
  });
1699
1699
  }
1700
1700
  // @__NO_SIDE_EFFECTS__
@@ -1704,7 +1704,7 @@ function cs(e, n) {
1704
1704
  format: "uuid",
1705
1705
  check: "string_format",
1706
1706
  abort: !1,
1707
- ...p(n)
1707
+ ...m(n)
1708
1708
  });
1709
1709
  }
1710
1710
  // @__NO_SIDE_EFFECTS__
@@ -1715,7 +1715,7 @@ function us(e, n) {
1715
1715
  check: "string_format",
1716
1716
  abort: !1,
1717
1717
  version: "v4",
1718
- ...p(n)
1718
+ ...m(n)
1719
1719
  });
1720
1720
  }
1721
1721
  // @__NO_SIDE_EFFECTS__
@@ -1726,7 +1726,7 @@ function ds(e, n) {
1726
1726
  check: "string_format",
1727
1727
  abort: !1,
1728
1728
  version: "v6",
1729
- ...p(n)
1729
+ ...m(n)
1730
1730
  });
1731
1731
  }
1732
1732
  // @__NO_SIDE_EFFECTS__
@@ -1737,7 +1737,7 @@ function ls(e, n) {
1737
1737
  check: "string_format",
1738
1738
  abort: !1,
1739
1739
  version: "v7",
1740
- ...p(n)
1740
+ ...m(n)
1741
1741
  });
1742
1742
  }
1743
1743
  // @__NO_SIDE_EFFECTS__
@@ -1747,7 +1747,7 @@ function hs(e, n) {
1747
1747
  format: "url",
1748
1748
  check: "string_format",
1749
1749
  abort: !1,
1750
- ...p(n)
1750
+ ...m(n)
1751
1751
  });
1752
1752
  }
1753
1753
  // @__NO_SIDE_EFFECTS__
@@ -1757,7 +1757,7 @@ function fs(e, n) {
1757
1757
  format: "emoji",
1758
1758
  check: "string_format",
1759
1759
  abort: !1,
1760
- ...p(n)
1760
+ ...m(n)
1761
1761
  });
1762
1762
  }
1763
1763
  // @__NO_SIDE_EFFECTS__
@@ -1767,7 +1767,7 @@ function ps(e, n) {
1767
1767
  format: "nanoid",
1768
1768
  check: "string_format",
1769
1769
  abort: !1,
1770
- ...p(n)
1770
+ ...m(n)
1771
1771
  });
1772
1772
  }
1773
1773
  // @__NO_SIDE_EFFECTS__
@@ -1777,7 +1777,7 @@ function ms(e, n) {
1777
1777
  format: "cuid",
1778
1778
  check: "string_format",
1779
1779
  abort: !1,
1780
- ...p(n)
1780
+ ...m(n)
1781
1781
  });
1782
1782
  }
1783
1783
  // @__NO_SIDE_EFFECTS__
@@ -1787,7 +1787,7 @@ function ws(e, n) {
1787
1787
  format: "cuid2",
1788
1788
  check: "string_format",
1789
1789
  abort: !1,
1790
- ...p(n)
1790
+ ...m(n)
1791
1791
  });
1792
1792
  }
1793
1793
  // @__NO_SIDE_EFFECTS__
@@ -1797,7 +1797,7 @@ function vs(e, n) {
1797
1797
  format: "ulid",
1798
1798
  check: "string_format",
1799
1799
  abort: !1,
1800
- ...p(n)
1800
+ ...m(n)
1801
1801
  });
1802
1802
  }
1803
1803
  // @__NO_SIDE_EFFECTS__
@@ -1807,7 +1807,7 @@ function gs(e, n) {
1807
1807
  format: "xid",
1808
1808
  check: "string_format",
1809
1809
  abort: !1,
1810
- ...p(n)
1810
+ ...m(n)
1811
1811
  });
1812
1812
  }
1813
1813
  // @__NO_SIDE_EFFECTS__
@@ -1817,7 +1817,7 @@ function bs(e, n) {
1817
1817
  format: "ksuid",
1818
1818
  check: "string_format",
1819
1819
  abort: !1,
1820
- ...p(n)
1820
+ ...m(n)
1821
1821
  });
1822
1822
  }
1823
1823
  // @__NO_SIDE_EFFECTS__
@@ -1827,7 +1827,7 @@ function _s(e, n) {
1827
1827
  format: "ipv4",
1828
1828
  check: "string_format",
1829
1829
  abort: !1,
1830
- ...p(n)
1830
+ ...m(n)
1831
1831
  });
1832
1832
  }
1833
1833
  // @__NO_SIDE_EFFECTS__
@@ -1837,7 +1837,7 @@ function ys(e, n) {
1837
1837
  format: "ipv6",
1838
1838
  check: "string_format",
1839
1839
  abort: !1,
1840
- ...p(n)
1840
+ ...m(n)
1841
1841
  });
1842
1842
  }
1843
1843
  // @__NO_SIDE_EFFECTS__
@@ -1847,7 +1847,7 @@ function ks(e, n) {
1847
1847
  format: "cidrv4",
1848
1848
  check: "string_format",
1849
1849
  abort: !1,
1850
- ...p(n)
1850
+ ...m(n)
1851
1851
  });
1852
1852
  }
1853
1853
  // @__NO_SIDE_EFFECTS__
@@ -1857,7 +1857,7 @@ function Is(e, n) {
1857
1857
  format: "cidrv6",
1858
1858
  check: "string_format",
1859
1859
  abort: !1,
1860
- ...p(n)
1860
+ ...m(n)
1861
1861
  });
1862
1862
  }
1863
1863
  // @__NO_SIDE_EFFECTS__
@@ -1867,7 +1867,7 @@ function Ss(e, n) {
1867
1867
  format: "base64",
1868
1868
  check: "string_format",
1869
1869
  abort: !1,
1870
- ...p(n)
1870
+ ...m(n)
1871
1871
  });
1872
1872
  }
1873
1873
  // @__NO_SIDE_EFFECTS__
@@ -1877,7 +1877,7 @@ function Es(e, n) {
1877
1877
  format: "base64url",
1878
1878
  check: "string_format",
1879
1879
  abort: !1,
1880
- ...p(n)
1880
+ ...m(n)
1881
1881
  });
1882
1882
  }
1883
1883
  // @__NO_SIDE_EFFECTS__
@@ -1887,7 +1887,7 @@ function zs(e, n) {
1887
1887
  format: "e164",
1888
1888
  check: "string_format",
1889
1889
  abort: !1,
1890
- ...p(n)
1890
+ ...m(n)
1891
1891
  });
1892
1892
  }
1893
1893
  // @__NO_SIDE_EFFECTS__
@@ -1897,7 +1897,7 @@ function Ps(e, n) {
1897
1897
  format: "jwt",
1898
1898
  check: "string_format",
1899
1899
  abort: !1,
1900
- ...p(n)
1900
+ ...m(n)
1901
1901
  });
1902
1902
  }
1903
1903
  // @__NO_SIDE_EFFECTS__
@@ -1909,7 +1909,7 @@ function Os(e, n) {
1909
1909
  offset: !1,
1910
1910
  local: !1,
1911
1911
  precision: null,
1912
- ...p(n)
1912
+ ...m(n)
1913
1913
  });
1914
1914
  }
1915
1915
  // @__NO_SIDE_EFFECTS__
@@ -1918,7 +1918,7 @@ function Rs(e, n) {
1918
1918
  type: "string",
1919
1919
  format: "date",
1920
1920
  check: "string_format",
1921
- ...p(n)
1921
+ ...m(n)
1922
1922
  });
1923
1923
  }
1924
1924
  // @__NO_SIDE_EFFECTS__
@@ -1928,7 +1928,7 @@ function As(e, n) {
1928
1928
  format: "time",
1929
1929
  check: "string_format",
1930
1930
  precision: null,
1931
- ...p(n)
1931
+ ...m(n)
1932
1932
  });
1933
1933
  }
1934
1934
  // @__NO_SIDE_EFFECTS__
@@ -1937,7 +1937,7 @@ function Ts(e, n) {
1937
1937
  type: "string",
1938
1938
  format: "duration",
1939
1939
  check: "string_format",
1940
- ...p(n)
1940
+ ...m(n)
1941
1941
  });
1942
1942
  }
1943
1943
  // @__NO_SIDE_EFFECTS__
@@ -1945,7 +1945,7 @@ function Ns(e, n) {
1945
1945
  return new e({
1946
1946
  type: "number",
1947
1947
  checks: [],
1948
- ...p(n)
1948
+ ...m(n)
1949
1949
  });
1950
1950
  }
1951
1951
  // @__NO_SIDE_EFFECTS__
@@ -1955,14 +1955,14 @@ function $s(e, n) {
1955
1955
  check: "number_format",
1956
1956
  abort: !1,
1957
1957
  format: "safeint",
1958
- ...p(n)
1958
+ ...m(n)
1959
1959
  });
1960
1960
  }
1961
1961
  // @__NO_SIDE_EFFECTS__
1962
1962
  function Cs(e, n) {
1963
1963
  return new e({
1964
1964
  type: "boolean",
1965
- ...p(n)
1965
+ ...m(n)
1966
1966
  });
1967
1967
  }
1968
1968
  // @__NO_SIDE_EFFECTS__
@@ -1975,14 +1975,14 @@ function Zs(e) {
1975
1975
  function Ds(e, n) {
1976
1976
  return new e({
1977
1977
  type: "never",
1978
- ...p(n)
1978
+ ...m(n)
1979
1979
  });
1980
1980
  }
1981
1981
  // @__NO_SIDE_EFFECTS__
1982
- function Ke(e, n) {
1982
+ function Xe(e, n) {
1983
1983
  return new En({
1984
1984
  check: "less_than",
1985
- ...p(n),
1985
+ ...m(n),
1986
1986
  value: e,
1987
1987
  inclusive: !1
1988
1988
  });
@@ -1991,16 +1991,16 @@ function Ke(e, n) {
1991
1991
  function _e(e, n) {
1992
1992
  return new En({
1993
1993
  check: "less_than",
1994
- ...p(n),
1994
+ ...m(n),
1995
1995
  value: e,
1996
1996
  inclusive: !0
1997
1997
  });
1998
1998
  }
1999
1999
  // @__NO_SIDE_EFFECTS__
2000
- function Xe(e, n) {
2000
+ function He(e, n) {
2001
2001
  return new zn({
2002
2002
  check: "greater_than",
2003
- ...p(n),
2003
+ ...m(n),
2004
2004
  value: e,
2005
2005
  inclusive: !1
2006
2006
  });
@@ -2009,16 +2009,16 @@ function Xe(e, n) {
2009
2009
  function ye(e, n) {
2010
2010
  return new zn({
2011
2011
  check: "greater_than",
2012
- ...p(n),
2012
+ ...m(n),
2013
2013
  value: e,
2014
2014
  inclusive: !0
2015
2015
  });
2016
2016
  }
2017
2017
  // @__NO_SIDE_EFFECTS__
2018
- function He(e, n) {
2018
+ function Ye(e, n) {
2019
2019
  return new Ht({
2020
2020
  check: "multiple_of",
2021
- ...p(n),
2021
+ ...m(n),
2022
2022
  value: e
2023
2023
  });
2024
2024
  }
@@ -2026,7 +2026,7 @@ function He(e, n) {
2026
2026
  function $n(e, n) {
2027
2027
  return new Qt({
2028
2028
  check: "max_length",
2029
- ...p(n),
2029
+ ...m(n),
2030
2030
  maximum: e
2031
2031
  });
2032
2032
  }
@@ -2034,7 +2034,7 @@ function $n(e, n) {
2034
2034
  function he(e, n) {
2035
2035
  return new er({
2036
2036
  check: "min_length",
2037
- ...p(n),
2037
+ ...m(n),
2038
2038
  minimum: e
2039
2039
  });
2040
2040
  }
@@ -2042,7 +2042,7 @@ function he(e, n) {
2042
2042
  function Cn(e, n) {
2043
2043
  return new nr({
2044
2044
  check: "length_equals",
2045
- ...p(n),
2045
+ ...m(n),
2046
2046
  length: e
2047
2047
  });
2048
2048
  }
@@ -2051,7 +2051,7 @@ function qs(e, n) {
2051
2051
  return new tr({
2052
2052
  check: "string_format",
2053
2053
  format: "regex",
2054
- ...p(n),
2054
+ ...m(n),
2055
2055
  pattern: e
2056
2056
  });
2057
2057
  }
@@ -2060,7 +2060,7 @@ function Ms(e) {
2060
2060
  return new rr({
2061
2061
  check: "string_format",
2062
2062
  format: "lowercase",
2063
- ...p(e)
2063
+ ...m(e)
2064
2064
  });
2065
2065
  }
2066
2066
  // @__NO_SIDE_EFFECTS__
@@ -2068,7 +2068,7 @@ function Us(e) {
2068
2068
  return new sr({
2069
2069
  check: "string_format",
2070
2070
  format: "uppercase",
2071
- ...p(e)
2071
+ ...m(e)
2072
2072
  });
2073
2073
  }
2074
2074
  // @__NO_SIDE_EFFECTS__
@@ -2076,7 +2076,7 @@ function xs(e, n) {
2076
2076
  return new or({
2077
2077
  check: "string_format",
2078
2078
  format: "includes",
2079
- ...p(n),
2079
+ ...m(n),
2080
2080
  includes: e
2081
2081
  });
2082
2082
  }
@@ -2085,7 +2085,7 @@ function Fs(e, n) {
2085
2085
  return new ir({
2086
2086
  check: "string_format",
2087
2087
  format: "starts_with",
2088
- ...p(n),
2088
+ ...m(n),
2089
2089
  prefix: e
2090
2090
  });
2091
2091
  }
@@ -2094,7 +2094,7 @@ function js(e, n) {
2094
2094
  return new ar({
2095
2095
  check: "string_format",
2096
2096
  format: "ends_with",
2097
- ...p(n),
2097
+ ...m(n),
2098
2098
  suffix: e
2099
2099
  });
2100
2100
  }
@@ -2133,7 +2133,7 @@ function Ws(e, n, t) {
2133
2133
  // get element() {
2134
2134
  // return element;
2135
2135
  // },
2136
- ...p(t)
2136
+ ...m(t)
2137
2137
  });
2138
2138
  }
2139
2139
  // @__NO_SIDE_EFFECTS__
@@ -2142,7 +2142,7 @@ function Ks(e, n, t) {
2142
2142
  type: "custom",
2143
2143
  check: "custom",
2144
2144
  fn: n,
2145
- ...p(t)
2145
+ ...m(t)
2146
2146
  });
2147
2147
  }
2148
2148
  // @__NO_SIDE_EFFECTS__
@@ -2161,7 +2161,7 @@ function Xs(e) {
2161
2161
  function Hs(e, n) {
2162
2162
  const t = new T({
2163
2163
  check: "custom",
2164
- ...p(n)
2164
+ ...m(n)
2165
2165
  });
2166
2166
  return t._zod.check = e, t;
2167
2167
  }
@@ -2201,10 +2201,10 @@ function z(e, n, t = { path: [], schemaPath: [] }) {
2201
2201
  if (e._zod.processJSONSchema)
2202
2202
  e._zod.processJSONSchema(n, o.schema, l);
2203
2203
  else {
2204
- const w = o.schema, m = n.processors[s.type];
2205
- if (!m)
2204
+ const p = o.schema, w = n.processors[s.type];
2205
+ if (!w)
2206
2206
  throw new Error(`[toJSONSchema]: Non-representable type encountered: ${s.type}`);
2207
- m(e, n, w, l);
2207
+ w(e, n, p, l);
2208
2208
  }
2209
2209
  const h = e._zod.parent;
2210
2210
  h && (o.ref || (o.ref = h), z(h, n, l), n.seen.get(h).isParent = !0);
@@ -2229,11 +2229,11 @@ function Dn(e, n) {
2229
2229
  const s = (o) => {
2230
2230
  const a = e.target === "draft-2020-12" ? "$defs" : "definitions";
2231
2231
  if (e.external) {
2232
- const h = e.external.registry.get(o[0])?.id, w = e.external.uri ?? ((E) => E);
2232
+ const h = e.external.registry.get(o[0])?.id, p = e.external.uri ?? ((E) => E);
2233
2233
  if (h)
2234
- return { ref: w(h) };
2235
- const m = o[1].defId ?? o[1].schema.id ?? `schema${e.counter++}`;
2236
- return o[1].defId = m, { defId: m, ref: `${w("__shared")}#/${a}/${m}` };
2234
+ return { ref: p(h) };
2235
+ const w = o[1].defId ?? o[1].schema.id ?? `schema${e.counter++}`;
2236
+ return o[1].defId = w, { defId: w, ref: `${p("__shared")}#/${a}/${w}` };
2237
2237
  }
2238
2238
  if (o[1] === t)
2239
2239
  return { ref: "#" };
@@ -2295,21 +2295,21 @@ function qn(e, n) {
2295
2295
  const c = a.def ?? a.schema, u = { ...c }, l = a.ref;
2296
2296
  if (a.ref = null, l) {
2297
2297
  r(l);
2298
- const w = e.seen.get(l), m = w.schema;
2299
- if (m.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (c.allOf = c.allOf ?? [], c.allOf.push(m)) : Object.assign(c, m), Object.assign(c, u), o._zod.parent === l)
2300
- for (const I in c)
2301
- I === "$ref" || I === "allOf" || I in u || delete c[I];
2302
- if (m.$ref && w.def)
2303
- for (const I in c)
2304
- I === "$ref" || I === "allOf" || I in w.def && JSON.stringify(c[I]) === JSON.stringify(w.def[I]) && delete c[I];
2298
+ const p = e.seen.get(l), w = p.schema;
2299
+ if (w.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (c.allOf = c.allOf ?? [], c.allOf.push(w)) : Object.assign(c, w), Object.assign(c, u), o._zod.parent === l)
2300
+ for (const v in c)
2301
+ v === "$ref" || v === "allOf" || v in u || delete c[v];
2302
+ if (w.$ref && p.def)
2303
+ for (const v in c)
2304
+ v === "$ref" || v === "allOf" || v in p.def && JSON.stringify(c[v]) === JSON.stringify(p.def[v]) && delete c[v];
2305
2305
  }
2306
2306
  const h = o._zod.parent;
2307
2307
  if (h && h !== l) {
2308
2308
  r(h);
2309
- const w = e.seen.get(h);
2310
- if (w?.schema.$ref && (c.$ref = w.schema.$ref, w.def))
2311
- for (const m in c)
2312
- m === "$ref" || m === "allOf" || m in w.def && JSON.stringify(c[m]) === JSON.stringify(w.def[m]) && delete c[m];
2309
+ const p = e.seen.get(h);
2310
+ if (p?.schema.$ref && (c.$ref = p.schema.$ref, p.def))
2311
+ for (const w in c)
2312
+ w === "$ref" || w === "allOf" || w in p.def && JSON.stringify(c[w]) === JSON.stringify(p.def[w]) && delete c[w];
2313
2313
  }
2314
2314
  e.override({
2315
2315
  zodSchema: o,
@@ -2561,25 +2561,25 @@ const Ys = (e, n = {}) => (t) => {
2561
2561
  const i = n.seen.get(e);
2562
2562
  i.ref = s.innerType;
2563
2563
  }, ko = /* @__PURE__ */ d("ZodISODateTime", (e, n) => {
2564
- kr.init(e, n), k.init(e, n);
2564
+ kr.init(e, n), I.init(e, n);
2565
2565
  });
2566
2566
  function Io(e) {
2567
2567
  return /* @__PURE__ */ Os(ko, e);
2568
2568
  }
2569
2569
  const So = /* @__PURE__ */ d("ZodISODate", (e, n) => {
2570
- Ir.init(e, n), k.init(e, n);
2570
+ Ir.init(e, n), I.init(e, n);
2571
2571
  });
2572
2572
  function Eo(e) {
2573
2573
  return /* @__PURE__ */ Rs(So, e);
2574
2574
  }
2575
2575
  const zo = /* @__PURE__ */ d("ZodISOTime", (e, n) => {
2576
- Sr.init(e, n), k.init(e, n);
2576
+ Sr.init(e, n), I.init(e, n);
2577
2577
  });
2578
2578
  function Po(e) {
2579
2579
  return /* @__PURE__ */ As(zo, e);
2580
2580
  }
2581
2581
  const Oo = /* @__PURE__ */ d("ZodISODuration", (e, n) => {
2582
- Er.init(e, n), k.init(e, n);
2582
+ Er.init(e, n), I.init(e, n);
2583
2583
  });
2584
2584
  function Ro(e) {
2585
2585
  return /* @__PURE__ */ Ts(Oo, e);
@@ -2596,13 +2596,13 @@ const Ao = (e, n) => {
2596
2596
  },
2597
2597
  addIssue: {
2598
2598
  value: (t) => {
2599
- e.issues.push(t), e.message = JSON.stringify(e.issues, Se, 2);
2599
+ e.issues.push(t), e.message = JSON.stringify(e.issues, Ee, 2);
2600
2600
  }
2601
2601
  // enumerable: false,
2602
2602
  },
2603
2603
  addIssues: {
2604
2604
  value: (t) => {
2605
- e.issues.push(...t), e.message = JSON.stringify(e.issues, Se, 2);
2605
+ e.issues.push(...t), e.message = JSON.stringify(e.issues, Ee, 2);
2606
2606
  }
2607
2607
  // enumerable: false,
2608
2608
  },
@@ -2615,7 +2615,7 @@ const Ao = (e, n) => {
2615
2615
  });
2616
2616
  }, N = d("ZodError", Ao, {
2617
2617
  Parent: Error
2618
- }), To = /* @__PURE__ */ Te(N), No = /* @__PURE__ */ Ne(N), $o = /* @__PURE__ */ we(N), Co = /* @__PURE__ */ ve(N), Zo = /* @__PURE__ */ gt(N), Do = /* @__PURE__ */ bt(N), qo = /* @__PURE__ */ _t(N), Mo = /* @__PURE__ */ yt(N), Uo = /* @__PURE__ */ kt(N), xo = /* @__PURE__ */ It(N), Fo = /* @__PURE__ */ St(N), jo = /* @__PURE__ */ Et(N), y = /* @__PURE__ */ d("ZodType", (e, n) => (_.init(e, n), Object.assign(e["~standard"], {
2618
+ }), To = /* @__PURE__ */ Ne(N), No = /* @__PURE__ */ $e(N), $o = /* @__PURE__ */ we(N), Co = /* @__PURE__ */ ve(N), Zo = /* @__PURE__ */ gt(N), Do = /* @__PURE__ */ bt(N), qo = /* @__PURE__ */ _t(N), Mo = /* @__PURE__ */ yt(N), Uo = /* @__PURE__ */ kt(N), xo = /* @__PURE__ */ It(N), Fo = /* @__PURE__ */ St(N), jo = /* @__PURE__ */ Et(N), k = /* @__PURE__ */ d("ZodType", (e, n) => (y.init(e, n), Object.assign(e["~standard"], {
2619
2619
  jsonSchema: {
2620
2620
  input: fe(e, "input"),
2621
2621
  output: fe(e, "output")
@@ -2627,7 +2627,7 @@ const Ao = (e, n) => {
2627
2627
  ]
2628
2628
  }), {
2629
2629
  parent: !0
2630
- }), e.with = e.check, e.clone = (t, r) => j(e, t, r), e.brand = () => e, e.register = ((t, r) => (t.add(e, r), e)), e.parse = (t, r) => To(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => $o(e, t, r), e.parseAsync = async (t, r) => No(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => Co(e, t, r), e.spa = e.safeParseAsync, e.encode = (t, r) => Zo(e, t, r), e.decode = (t, r) => Do(e, t, r), e.encodeAsync = async (t, r) => qo(e, t, r), e.decodeAsync = async (t, r) => Mo(e, t, r), e.safeEncode = (t, r) => Uo(e, t, r), e.safeDecode = (t, r) => xo(e, t, r), e.safeEncodeAsync = async (t, r) => Fo(e, t, r), e.safeDecodeAsync = async (t, r) => jo(e, t, r), e.refine = (t, r) => e.check(Mi(t, r)), e.superRefine = (t) => e.check(Ui(t)), e.overwrite = (t) => e.check(/* @__PURE__ */ Q(t)), e.optional = () => tn(e), e.exactOptional = () => Ei(e), e.nullable = () => rn(e), e.nullish = () => tn(rn(e)), e.nonoptional = (t) => Ti(e, t), e.array = () => q(e), e.or = (t) => pi([e, t]), e.and = (t) => gi(e, t), e.transform = (t) => sn(e, Ii(t)), e.default = (t) => Oi(e, t), e.prefault = (t) => Ai(e, t), e.catch = (t) => $i(e, t), e.pipe = (t) => sn(e, t), e.readonly = () => Di(e), e.describe = (t) => {
2630
+ }), e.with = e.check, e.clone = (t, r) => j(e, t, r), e.brand = () => e, e.register = ((t, r) => (t.add(e, r), e)), e.parse = (t, r) => To(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => $o(e, t, r), e.parseAsync = async (t, r) => No(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => Co(e, t, r), e.spa = e.safeParseAsync, e.encode = (t, r) => Zo(e, t, r), e.decode = (t, r) => Do(e, t, r), e.encodeAsync = async (t, r) => qo(e, t, r), e.decodeAsync = async (t, r) => Mo(e, t, r), e.safeEncode = (t, r) => Uo(e, t, r), e.safeDecode = (t, r) => xo(e, t, r), e.safeEncodeAsync = async (t, r) => Fo(e, t, r), e.safeDecodeAsync = async (t, r) => jo(e, t, r), e.refine = (t, r) => e.check(Mi(t, r)), e.superRefine = (t) => e.check(Ui(t)), e.overwrite = (t) => e.check(/* @__PURE__ */ Q(t)), e.optional = () => rn(e), e.exactOptional = () => Ei(e), e.nullable = () => sn(e), e.nullish = () => rn(sn(e)), e.nonoptional = (t) => Ti(e, t), e.array = () => q(e), e.or = (t) => pi([e, t]), e.and = (t) => gi(e, t), e.transform = (t) => on(e, Ii(t)), e.default = (t) => Oi(e, t), e.prefault = (t) => Ai(e, t), e.catch = (t) => $i(e, t), e.pipe = (t) => on(e, t), e.readonly = () => Di(e), e.describe = (t) => {
2631
2631
  const r = e.clone();
2632
2632
  return ee.add(r, { description: t }), r;
2633
2633
  }, Object.defineProperty(e, "description", {
@@ -2641,57 +2641,57 @@ const Ao = (e, n) => {
2641
2641
  const r = e.clone();
2642
2642
  return ee.add(r, t[0]), r;
2643
2643
  }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)), Un = /* @__PURE__ */ d("_ZodString", (e, n) => {
2644
- $e.init(e, n), y.init(e, n), e._zod.processJSONSchema = (r, s, i) => eo(e, r, s);
2644
+ Ce.init(e, n), k.init(e, n), e._zod.processJSONSchema = (r, s, i) => eo(e, r, s);
2645
2645
  const t = e._zod.bag;
2646
2646
  e.format = t.format ?? null, e.minLength = t.minimum ?? null, e.maxLength = t.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ qs(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ xs(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Fs(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ js(...r)), e.min = (...r) => e.check(/* @__PURE__ */ he(...r)), e.max = (...r) => e.check(/* @__PURE__ */ $n(...r)), e.length = (...r) => e.check(/* @__PURE__ */ Cn(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ he(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ Ms(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Us(r)), e.trim = () => e.check(/* @__PURE__ */ Ls()), e.normalize = (...r) => e.check(/* @__PURE__ */ Vs(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Bs()), e.toUpperCase = () => e.check(/* @__PURE__ */ Gs()), e.slugify = () => e.check(/* @__PURE__ */ Js());
2647
2647
  }), Vo = /* @__PURE__ */ d("ZodString", (e, n) => {
2648
- $e.init(e, n), Un.init(e, n), e.email = (t) => e.check(/* @__PURE__ */ as(Lo, t)), e.url = (t) => e.check(/* @__PURE__ */ hs(Bo, t)), e.jwt = (t) => e.check(/* @__PURE__ */ Ps(ii, t)), e.emoji = (t) => e.check(/* @__PURE__ */ fs(Go, t)), e.guid = (t) => e.check(/* @__PURE__ */ We(Ye, t)), e.uuid = (t) => e.check(/* @__PURE__ */ cs(de, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ us(de, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ ds(de, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ ls(de, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ ps(Jo, t)), e.guid = (t) => e.check(/* @__PURE__ */ We(Ye, t)), e.cuid = (t) => e.check(/* @__PURE__ */ ms(Wo, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ ws(Ko, t)), e.ulid = (t) => e.check(/* @__PURE__ */ vs(Xo, t)), e.base64 = (t) => e.check(/* @__PURE__ */ Ss(ri, t)), e.base64url = (t) => e.check(/* @__PURE__ */ Es(si, t)), e.xid = (t) => e.check(/* @__PURE__ */ gs(Ho, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ bs(Yo, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ _s(Qo, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ ys(ei, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ ks(ni, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ Is(ti, t)), e.e164 = (t) => e.check(/* @__PURE__ */ zs(oi, t)), e.datetime = (t) => e.check(Io(t)), e.date = (t) => e.check(Eo(t)), e.time = (t) => e.check(Po(t)), e.duration = (t) => e.check(Ro(t));
2648
+ Ce.init(e, n), Un.init(e, n), e.email = (t) => e.check(/* @__PURE__ */ as(Lo, t)), e.url = (t) => e.check(/* @__PURE__ */ hs(Bo, t)), e.jwt = (t) => e.check(/* @__PURE__ */ Ps(ii, t)), e.emoji = (t) => e.check(/* @__PURE__ */ fs(Go, t)), e.guid = (t) => e.check(/* @__PURE__ */ Ke(Qe, t)), e.uuid = (t) => e.check(/* @__PURE__ */ cs(de, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ us(de, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ ds(de, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ ls(de, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ ps(Jo, t)), e.guid = (t) => e.check(/* @__PURE__ */ Ke(Qe, t)), e.cuid = (t) => e.check(/* @__PURE__ */ ms(Wo, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ ws(Ko, t)), e.ulid = (t) => e.check(/* @__PURE__ */ vs(Xo, t)), e.base64 = (t) => e.check(/* @__PURE__ */ Ss(ri, t)), e.base64url = (t) => e.check(/* @__PURE__ */ Es(si, t)), e.xid = (t) => e.check(/* @__PURE__ */ gs(Ho, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ bs(Yo, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ _s(Qo, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ ys(ei, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ ks(ni, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ Is(ti, t)), e.e164 = (t) => e.check(/* @__PURE__ */ zs(oi, t)), e.datetime = (t) => e.check(Io(t)), e.date = (t) => e.check(Eo(t)), e.time = (t) => e.check(Po(t)), e.duration = (t) => e.check(Ro(t));
2649
2649
  });
2650
- function b(e) {
2650
+ function _(e) {
2651
2651
  return /* @__PURE__ */ is(Vo, e);
2652
2652
  }
2653
- const k = /* @__PURE__ */ d("ZodStringFormat", (e, n) => {
2654
- g.init(e, n), Un.init(e, n);
2653
+ const I = /* @__PURE__ */ d("ZodStringFormat", (e, n) => {
2654
+ b.init(e, n), Un.init(e, n);
2655
2655
  }), Lo = /* @__PURE__ */ d("ZodEmail", (e, n) => {
2656
- fr.init(e, n), k.init(e, n);
2657
- }), Ye = /* @__PURE__ */ d("ZodGUID", (e, n) => {
2658
- lr.init(e, n), k.init(e, n);
2656
+ fr.init(e, n), I.init(e, n);
2657
+ }), Qe = /* @__PURE__ */ d("ZodGUID", (e, n) => {
2658
+ lr.init(e, n), I.init(e, n);
2659
2659
  }), de = /* @__PURE__ */ d("ZodUUID", (e, n) => {
2660
- hr.init(e, n), k.init(e, n);
2660
+ hr.init(e, n), I.init(e, n);
2661
2661
  }), Bo = /* @__PURE__ */ d("ZodURL", (e, n) => {
2662
- pr.init(e, n), k.init(e, n);
2662
+ pr.init(e, n), I.init(e, n);
2663
2663
  }), Go = /* @__PURE__ */ d("ZodEmoji", (e, n) => {
2664
- mr.init(e, n), k.init(e, n);
2664
+ mr.init(e, n), I.init(e, n);
2665
2665
  }), Jo = /* @__PURE__ */ d("ZodNanoID", (e, n) => {
2666
- wr.init(e, n), k.init(e, n);
2666
+ wr.init(e, n), I.init(e, n);
2667
2667
  }), Wo = /* @__PURE__ */ d("ZodCUID", (e, n) => {
2668
- vr.init(e, n), k.init(e, n);
2668
+ vr.init(e, n), I.init(e, n);
2669
2669
  }), Ko = /* @__PURE__ */ d("ZodCUID2", (e, n) => {
2670
- gr.init(e, n), k.init(e, n);
2670
+ gr.init(e, n), I.init(e, n);
2671
2671
  }), Xo = /* @__PURE__ */ d("ZodULID", (e, n) => {
2672
- br.init(e, n), k.init(e, n);
2672
+ br.init(e, n), I.init(e, n);
2673
2673
  }), Ho = /* @__PURE__ */ d("ZodXID", (e, n) => {
2674
- _r.init(e, n), k.init(e, n);
2674
+ _r.init(e, n), I.init(e, n);
2675
2675
  }), Yo = /* @__PURE__ */ d("ZodKSUID", (e, n) => {
2676
- yr.init(e, n), k.init(e, n);
2676
+ yr.init(e, n), I.init(e, n);
2677
2677
  }), Qo = /* @__PURE__ */ d("ZodIPv4", (e, n) => {
2678
- zr.init(e, n), k.init(e, n);
2678
+ zr.init(e, n), I.init(e, n);
2679
2679
  }), ei = /* @__PURE__ */ d("ZodIPv6", (e, n) => {
2680
- Pr.init(e, n), k.init(e, n);
2680
+ Pr.init(e, n), I.init(e, n);
2681
2681
  }), ni = /* @__PURE__ */ d("ZodCIDRv4", (e, n) => {
2682
- Or.init(e, n), k.init(e, n);
2682
+ Or.init(e, n), I.init(e, n);
2683
2683
  }), ti = /* @__PURE__ */ d("ZodCIDRv6", (e, n) => {
2684
- Rr.init(e, n), k.init(e, n);
2684
+ Rr.init(e, n), I.init(e, n);
2685
2685
  }), ri = /* @__PURE__ */ d("ZodBase64", (e, n) => {
2686
- Ar.init(e, n), k.init(e, n);
2686
+ Ar.init(e, n), I.init(e, n);
2687
2687
  }), si = /* @__PURE__ */ d("ZodBase64URL", (e, n) => {
2688
- Nr.init(e, n), k.init(e, n);
2688
+ Nr.init(e, n), I.init(e, n);
2689
2689
  }), oi = /* @__PURE__ */ d("ZodE164", (e, n) => {
2690
- $r.init(e, n), k.init(e, n);
2690
+ $r.init(e, n), I.init(e, n);
2691
2691
  }), ii = /* @__PURE__ */ d("ZodJWT", (e, n) => {
2692
- Zr.init(e, n), k.init(e, n);
2692
+ Zr.init(e, n), I.init(e, n);
2693
2693
  }), xn = /* @__PURE__ */ d("ZodNumber", (e, n) => {
2694
- On.init(e, n), y.init(e, n), e._zod.processJSONSchema = (r, s, i) => no(e, r, s), e.gt = (r, s) => e.check(/* @__PURE__ */ Xe(r, s)), e.gte = (r, s) => e.check(/* @__PURE__ */ ye(r, s)), e.min = (r, s) => e.check(/* @__PURE__ */ ye(r, s)), e.lt = (r, s) => e.check(/* @__PURE__ */ Ke(r, s)), e.lte = (r, s) => e.check(/* @__PURE__ */ _e(r, s)), e.max = (r, s) => e.check(/* @__PURE__ */ _e(r, s)), e.int = (r) => e.check(Qe(r)), e.safe = (r) => e.check(Qe(r)), e.positive = (r) => e.check(/* @__PURE__ */ Xe(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ ye(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ Ke(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ _e(0, r)), e.multipleOf = (r, s) => e.check(/* @__PURE__ */ He(r, s)), e.step = (r, s) => e.check(/* @__PURE__ */ He(r, s)), e.finite = () => e;
2694
+ On.init(e, n), k.init(e, n), e._zod.processJSONSchema = (r, s, i) => no(e, r, s), e.gt = (r, s) => e.check(/* @__PURE__ */ He(r, s)), e.gte = (r, s) => e.check(/* @__PURE__ */ ye(r, s)), e.min = (r, s) => e.check(/* @__PURE__ */ ye(r, s)), e.lt = (r, s) => e.check(/* @__PURE__ */ Xe(r, s)), e.lte = (r, s) => e.check(/* @__PURE__ */ _e(r, s)), e.max = (r, s) => e.check(/* @__PURE__ */ _e(r, s)), e.int = (r) => e.check(en(r)), e.safe = (r) => e.check(en(r)), e.positive = (r) => e.check(/* @__PURE__ */ He(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ ye(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ Xe(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ _e(0, r)), e.multipleOf = (r, s) => e.check(/* @__PURE__ */ Ye(r, s)), e.step = (r, s) => e.check(/* @__PURE__ */ Ye(r, s)), e.finite = () => e;
2695
2695
  const t = e._zod.bag;
2696
2696
  e.minValue = Math.max(t.minimum ?? Number.NEGATIVE_INFINITY, t.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(t.maximum ?? Number.POSITIVE_INFINITY, t.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (t.format ?? "").includes("int") || Number.isSafeInteger(t.multipleOf ?? 0.5), e.isFinite = !0, e.format = t.format ?? null;
2697
2697
  });
@@ -2701,52 +2701,52 @@ function D(e) {
2701
2701
  const ai = /* @__PURE__ */ d("ZodNumberFormat", (e, n) => {
2702
2702
  Dr.init(e, n), xn.init(e, n);
2703
2703
  });
2704
- function Qe(e) {
2704
+ function en(e) {
2705
2705
  return /* @__PURE__ */ $s(ai, e);
2706
2706
  }
2707
2707
  const ci = /* @__PURE__ */ d("ZodBoolean", (e, n) => {
2708
- qr.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => to(e, t, r);
2708
+ qr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => to(e, t, r);
2709
2709
  });
2710
2710
  function V(e) {
2711
2711
  return /* @__PURE__ */ Cs(ci, e);
2712
2712
  }
2713
2713
  const ui = /* @__PURE__ */ d("ZodUnknown", (e, n) => {
2714
- Mr.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => so();
2714
+ Mr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => so();
2715
2715
  });
2716
- function en() {
2716
+ function nn() {
2717
2717
  return /* @__PURE__ */ Zs(ui);
2718
2718
  }
2719
2719
  const di = /* @__PURE__ */ d("ZodNever", (e, n) => {
2720
- Ur.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => ro(e, t, r);
2720
+ Ur.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => ro(e, t, r);
2721
2721
  });
2722
2722
  function li(e) {
2723
2723
  return /* @__PURE__ */ Ds(di, e);
2724
2724
  }
2725
2725
  const hi = /* @__PURE__ */ d("ZodArray", (e, n) => {
2726
- xr.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => uo(e, t, r, s), e.element = n.element, e.min = (t, r) => e.check(/* @__PURE__ */ he(t, r)), e.nonempty = (t) => e.check(/* @__PURE__ */ he(1, t)), e.max = (t, r) => e.check(/* @__PURE__ */ $n(t, r)), e.length = (t, r) => e.check(/* @__PURE__ */ Cn(t, r)), e.unwrap = () => e.element;
2726
+ xr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => uo(e, t, r, s), e.element = n.element, e.min = (t, r) => e.check(/* @__PURE__ */ he(t, r)), e.nonempty = (t) => e.check(/* @__PURE__ */ he(1, t)), e.max = (t, r) => e.check(/* @__PURE__ */ $n(t, r)), e.length = (t, r) => e.check(/* @__PURE__ */ Cn(t, r)), e.unwrap = () => e.element;
2727
2727
  });
2728
2728
  function q(e, n) {
2729
2729
  return /* @__PURE__ */ Ws(hi, e, n);
2730
2730
  }
2731
2731
  const fi = /* @__PURE__ */ d("ZodObject", (e, n) => {
2732
- jr.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => lo(e, t, r, s), v(e, "shape", () => n.shape), e.keyof = () => _i(Object.keys(e._zod.def.shape)), e.catchall = (t) => e.clone({ ...e._zod.def, catchall: t }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: en() }), e.loose = () => e.clone({ ...e._zod.def, catchall: en() }), e.strict = () => e.clone({ ...e._zod.def, catchall: li() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (t) => ut(e, t), e.safeExtend = (t) => dt(e, t), e.merge = (t) => lt(e, t), e.pick = (t) => at(e, t), e.omit = (t) => ct(e, t), e.partial = (...t) => ht(jn, e, t[0]), e.required = (...t) => ft(Vn, e, t[0]);
2732
+ jr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => lo(e, t, r, s), g(e, "shape", () => n.shape), e.keyof = () => _i(Object.keys(e._zod.def.shape)), e.catchall = (t) => e.clone({ ...e._zod.def, catchall: t }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: nn() }), e.loose = () => e.clone({ ...e._zod.def, catchall: nn() }), e.strict = () => e.clone({ ...e._zod.def, catchall: li() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (t) => ut(e, t), e.safeExtend = (t) => dt(e, t), e.merge = (t) => lt(e, t), e.pick = (t) => at(e, t), e.omit = (t) => ct(e, t), e.partial = (...t) => ht(jn, e, t[0]), e.required = (...t) => ft(Vn, e, t[0]);
2733
2733
  });
2734
2734
  function S(e, n) {
2735
2735
  const t = {
2736
2736
  type: "object",
2737
2737
  shape: e ?? {},
2738
- ...p(n)
2738
+ ...m(n)
2739
2739
  };
2740
2740
  return new fi(t);
2741
2741
  }
2742
2742
  const Fn = /* @__PURE__ */ d("ZodUnion", (e, n) => {
2743
- Tn.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => ho(e, t, r, s), e.options = n.options;
2743
+ Tn.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => ho(e, t, r, s), e.options = n.options;
2744
2744
  });
2745
2745
  function pi(e, n) {
2746
2746
  return new Fn({
2747
2747
  type: "union",
2748
2748
  options: e,
2749
- ...p(n)
2749
+ ...m(n)
2750
2750
  });
2751
2751
  }
2752
2752
  const mi = /* @__PURE__ */ d("ZodDiscriminatedUnion", (e, n) => {
@@ -2757,11 +2757,11 @@ function wi(e, n, t) {
2757
2757
  type: "union",
2758
2758
  options: n,
2759
2759
  discriminator: e,
2760
- ...p(t)
2760
+ ...m(t)
2761
2761
  });
2762
2762
  }
2763
2763
  const vi = /* @__PURE__ */ d("ZodIntersection", (e, n) => {
2764
- Lr.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => fo(e, t, r, s);
2764
+ Lr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => fo(e, t, r, s);
2765
2765
  });
2766
2766
  function gi(e, n) {
2767
2767
  return new vi({
@@ -2771,18 +2771,18 @@ function gi(e, n) {
2771
2771
  });
2772
2772
  }
2773
2773
  const bi = /* @__PURE__ */ d("ZodRecord", (e, n) => {
2774
- Br.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => po(e, t, r, s), e.keyType = n.keyType, e.valueType = n.valueType;
2774
+ Br.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => po(e, t, r, s), e.keyType = n.keyType, e.valueType = n.valueType;
2775
2775
  });
2776
- function Ce(e, n, t) {
2776
+ function Ze(e, n, t) {
2777
2777
  return new bi({
2778
2778
  type: "record",
2779
2779
  keyType: e,
2780
2780
  valueType: n,
2781
- ...p(t)
2781
+ ...m(t)
2782
2782
  });
2783
2783
  }
2784
- const ze = /* @__PURE__ */ d("ZodEnum", (e, n) => {
2785
- Gr.init(e, n), y.init(e, n), e._zod.processJSONSchema = (r, s, i) => oo(e, r, s), e.enum = n.entries, e.options = Object.values(n.entries);
2784
+ const Pe = /* @__PURE__ */ d("ZodEnum", (e, n) => {
2785
+ Gr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (r, s, i) => oo(e, r, s), e.enum = n.entries, e.options = Object.values(n.entries);
2786
2786
  const t = new Set(Object.keys(n.entries));
2787
2787
  e.extract = (r, s) => {
2788
2788
  const i = {};
@@ -2791,10 +2791,10 @@ const ze = /* @__PURE__ */ d("ZodEnum", (e, n) => {
2791
2791
  i[o] = n.entries[o];
2792
2792
  else
2793
2793
  throw new Error(`Key ${o} not found in enum`);
2794
- return new ze({
2794
+ return new Pe({
2795
2795
  ...n,
2796
2796
  checks: [],
2797
- ...p(s),
2797
+ ...m(s),
2798
2798
  entries: i
2799
2799
  });
2800
2800
  }, e.exclude = (r, s) => {
@@ -2804,24 +2804,24 @@ const ze = /* @__PURE__ */ d("ZodEnum", (e, n) => {
2804
2804
  delete i[o];
2805
2805
  else
2806
2806
  throw new Error(`Key ${o} not found in enum`);
2807
- return new ze({
2807
+ return new Pe({
2808
2808
  ...n,
2809
2809
  checks: [],
2810
- ...p(s),
2810
+ ...m(s),
2811
2811
  entries: i
2812
2812
  });
2813
2813
  };
2814
2814
  });
2815
2815
  function _i(e, n) {
2816
2816
  const t = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
2817
- return new ze({
2817
+ return new Pe({
2818
2818
  type: "enum",
2819
2819
  entries: t,
2820
- ...p(n)
2820
+ ...m(n)
2821
2821
  });
2822
2822
  }
2823
2823
  const yi = /* @__PURE__ */ d("ZodLiteral", (e, n) => {
2824
- Jr.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => io(e, t, r), e.values = new Set(n.values), Object.defineProperty(e, "value", {
2824
+ Jr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => io(e, t, r), e.values = new Set(n.values), Object.defineProperty(e, "value", {
2825
2825
  get() {
2826
2826
  if (n.values.length > 1)
2827
2827
  throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
@@ -2829,15 +2829,15 @@ const yi = /* @__PURE__ */ d("ZodLiteral", (e, n) => {
2829
2829
  }
2830
2830
  });
2831
2831
  });
2832
- function nn(e, n) {
2832
+ function tn(e, n) {
2833
2833
  return new yi({
2834
2834
  type: "literal",
2835
2835
  values: Array.isArray(e) ? e : [e],
2836
- ...p(n)
2836
+ ...m(n)
2837
2837
  });
2838
2838
  }
2839
2839
  const ki = /* @__PURE__ */ d("ZodTransform", (e, n) => {
2840
- Wr.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => co(e, t), e._zod.parse = (t, r) => {
2840
+ Wr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => co(e, t), e._zod.parse = (t, r) => {
2841
2841
  if (r.direction === "backward")
2842
2842
  throw new hn(e.constructor.name);
2843
2843
  t.addIssue = (i) => {
@@ -2859,16 +2859,16 @@ function Ii(e) {
2859
2859
  });
2860
2860
  }
2861
2861
  const jn = /* @__PURE__ */ d("ZodOptional", (e, n) => {
2862
- Nn.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => Mn(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2862
+ Nn.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => Mn(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2863
2863
  });
2864
- function tn(e) {
2864
+ function rn(e) {
2865
2865
  return new jn({
2866
2866
  type: "optional",
2867
2867
  innerType: e
2868
2868
  });
2869
2869
  }
2870
2870
  const Si = /* @__PURE__ */ d("ZodExactOptional", (e, n) => {
2871
- Kr.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => Mn(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2871
+ Kr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => Mn(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2872
2872
  });
2873
2873
  function Ei(e) {
2874
2874
  return new Si({
@@ -2877,16 +2877,16 @@ function Ei(e) {
2877
2877
  });
2878
2878
  }
2879
2879
  const zi = /* @__PURE__ */ d("ZodNullable", (e, n) => {
2880
- Xr.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => mo(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2880
+ Xr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => mo(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2881
2881
  });
2882
- function rn(e) {
2882
+ function sn(e) {
2883
2883
  return new zi({
2884
2884
  type: "nullable",
2885
2885
  innerType: e
2886
2886
  });
2887
2887
  }
2888
2888
  const Pi = /* @__PURE__ */ d("ZodDefault", (e, n) => {
2889
- Hr.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => vo(e, t, r, s), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2889
+ Hr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => vo(e, t, r, s), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2890
2890
  });
2891
2891
  function Oi(e, n) {
2892
2892
  return new Pi({
@@ -2898,7 +2898,7 @@ function Oi(e, n) {
2898
2898
  });
2899
2899
  }
2900
2900
  const Ri = /* @__PURE__ */ d("ZodPrefault", (e, n) => {
2901
- Yr.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => go(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2901
+ Yr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => go(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2902
2902
  });
2903
2903
  function Ai(e, n) {
2904
2904
  return new Ri({
@@ -2910,17 +2910,17 @@ function Ai(e, n) {
2910
2910
  });
2911
2911
  }
2912
2912
  const Vn = /* @__PURE__ */ d("ZodNonOptional", (e, n) => {
2913
- Qr.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => wo(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2913
+ Qr.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => wo(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2914
2914
  });
2915
2915
  function Ti(e, n) {
2916
2916
  return new Vn({
2917
2917
  type: "nonoptional",
2918
2918
  innerType: e,
2919
- ...p(n)
2919
+ ...m(n)
2920
2920
  });
2921
2921
  }
2922
2922
  const Ni = /* @__PURE__ */ d("ZodCatch", (e, n) => {
2923
- es.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => bo(e, t, r, s), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2923
+ es.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => bo(e, t, r, s), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2924
2924
  });
2925
2925
  function $i(e, n) {
2926
2926
  return new Ni({
@@ -2930,9 +2930,9 @@ function $i(e, n) {
2930
2930
  });
2931
2931
  }
2932
2932
  const Ci = /* @__PURE__ */ d("ZodPipe", (e, n) => {
2933
- ns.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => _o(e, t, r, s), e.in = n.in, e.out = n.out;
2933
+ ns.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => _o(e, t, r, s), e.in = n.in, e.out = n.out;
2934
2934
  });
2935
- function sn(e, n) {
2935
+ function on(e, n) {
2936
2936
  return new Ci({
2937
2937
  type: "pipe",
2938
2938
  in: e,
@@ -2941,7 +2941,7 @@ function sn(e, n) {
2941
2941
  });
2942
2942
  }
2943
2943
  const Zi = /* @__PURE__ */ d("ZodReadonly", (e, n) => {
2944
- ts.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => yo(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2944
+ ts.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => yo(e, t, r, s), e.unwrap = () => e._zod.def.innerType;
2945
2945
  });
2946
2946
  function Di(e) {
2947
2947
  return new Zi({
@@ -2950,7 +2950,7 @@ function Di(e) {
2950
2950
  });
2951
2951
  }
2952
2952
  const qi = /* @__PURE__ */ d("ZodCustom", (e, n) => {
2953
- rs.init(e, n), y.init(e, n), e._zod.processJSONSchema = (t, r, s) => ao(e, t);
2953
+ rs.init(e, n), k.init(e, n), e._zod.processJSONSchema = (t, r, s) => ao(e, t);
2954
2954
  });
2955
2955
  function Mi(e, n = {}) {
2956
2956
  return /* @__PURE__ */ Ks(qi, e, n);
@@ -2965,26 +2965,26 @@ function M(e) {
2965
2965
  }
2966
2966
  const Ln = wi("kind", [
2967
2967
  // The default hang container
2968
- S({ kind: nn("legacy") }),
2968
+ S({ kind: tn("legacy") }),
2969
2969
  // CMAF container with timescale for timestamp conversion
2970
2970
  S({
2971
- kind: nn("cmaf"),
2971
+ kind: tn("cmaf"),
2972
2972
  // Time units per second
2973
2973
  timescale: R,
2974
2974
  // Track ID used in the moof/mdat fragments
2975
2975
  trackId: R
2976
2976
  })
2977
2977
  ]).default({ kind: "legacy" }), xi = S({
2978
- name: b()
2979
- }), on = S({
2978
+ name: _()
2979
+ }), an = S({
2980
2980
  // See: https://w3c.github.io/webcodecs/codec_registry.html
2981
- codec: b(),
2981
+ codec: _(),
2982
2982
  // The container format, used to decode the timestamp and more.
2983
2983
  container: Ln,
2984
2984
  // The description is used for some codecs.
2985
2985
  // If provided, we can initialize the decoder based on the catalog alone.
2986
2986
  // Otherwise, the initialization information is in-band.
2987
- description: b().optional(),
2987
+ description: _().optional(),
2988
2988
  // hex encoded TODO use base64
2989
2989
  // The sample rate of the audio in Hz
2990
2990
  sampleRate: R,
@@ -3003,32 +3003,32 @@ const Ln = wi("kind", [
3003
3003
  }), Fi = S({
3004
3004
  // A map of track name to rendition configuration.
3005
3005
  // This is not an array so it will work with JSON Merge Patch.
3006
- renditions: Ce(b(), on)
3006
+ renditions: Ze(_(), an)
3007
3007
  }).or(
3008
3008
  // Backwards compatibility: transform old {track, config} format to new object format
3009
3009
  S({
3010
3010
  track: xi,
3011
- config: on
3011
+ config: an
3012
3012
  }).transform((e) => ({
3013
3013
  renditions: { [e.track.name]: e.config }
3014
3014
  }))
3015
3015
  ), ji = S({
3016
- hardware: q(b()).optional(),
3017
- software: q(b()).optional(),
3018
- unsupported: q(b()).optional()
3016
+ hardware: q(_()).optional(),
3017
+ software: q(_()).optional(),
3018
+ unsupported: q(_()).optional()
3019
3019
  }), Vi = S({
3020
- hardware: q(b()).optional(),
3021
- software: q(b()).optional(),
3022
- unsupported: q(b()).optional()
3020
+ hardware: q(_()).optional(),
3021
+ software: q(_()).optional(),
3022
+ unsupported: q(_()).optional()
3023
3023
  }), Li = S({
3024
3024
  video: ji.optional(),
3025
3025
  audio: Vi.optional()
3026
3026
  }), re = S({
3027
- name: b()
3027
+ name: _()
3028
3028
  }), Bi = S({
3029
3029
  message: re.optional(),
3030
3030
  typing: re.optional()
3031
- }), Ze = S({
3031
+ }), De = S({
3032
3032
  // The relative X position of the broadcast, from -1 to +1.
3033
3033
  // This should be used for audio panning but can also be used for video positioning.
3034
3034
  x: D().optional(),
@@ -3044,22 +3044,22 @@ const Ln = wi("kind", [
3044
3044
  // The initial position of the broadcaster, from -1 to +1 in both dimensions.
3045
3045
  // If not provided, then the broadcaster is assumed to be at (0,0)
3046
3046
  // This should be used for audio panning but can also be used for video positioning.
3047
- initial: Ze.optional(),
3047
+ initial: De.optional(),
3048
3048
  // If provided, then updates to the position are done via a separate Moq track.
3049
3049
  // This is used to avoid a full catalog update every time we want to update a few bytes.
3050
3050
  // TODO: These updates currently use JSON for simplicity, but we should use a binary format.
3051
3051
  track: re.optional(),
3052
3052
  // If set, then this broadcaster allows other peers to request position updates via this handle.
3053
3053
  // We will have to discover and subscribe to their position updates.
3054
- handle: b().optional(),
3054
+ handle: _().optional(),
3055
3055
  // If provided, this broadcaster is signaling the location of other peers.
3056
3056
  // The payload is a JSON blob keyed by handle for each peer.
3057
3057
  peers: re.optional()
3058
- }), Ji = Ce(b(), Ze);
3058
+ }), Ji = Ze(_(), De);
3059
3059
  S({
3060
- name: b().optional(),
3060
+ name: _().optional(),
3061
3061
  // name
3062
- avatar: b().optional(),
3062
+ avatar: _().optional(),
3063
3063
  // avatar
3064
3064
  audio: V().optional(),
3065
3065
  // audio enabled
@@ -3080,22 +3080,22 @@ const J = {
3080
3080
  location: 20,
3081
3081
  preview: 10
3082
3082
  }, Wi = S({
3083
- id: b().optional(),
3084
- name: b().optional(),
3085
- avatar: b().optional(),
3083
+ id: _().optional(),
3084
+ name: _().optional(),
3085
+ avatar: _().optional(),
3086
3086
  // TODO allow using a track instead of a URL?
3087
- color: b().optional()
3087
+ color: _().optional()
3088
3088
  }), Ki = S({
3089
- name: b()
3090
- }), an = S({
3089
+ name: _()
3090
+ }), cn = S({
3091
3091
  // See: https://w3c.github.io/webcodecs/codec_registry.html
3092
- codec: b(),
3092
+ codec: _(),
3093
3093
  // The container format, used to decode the timestamp and more.
3094
3094
  container: Ln,
3095
3095
  // The description is used for some codecs.
3096
3096
  // If provided, we can initialize the decoder based on the catalog alone.
3097
3097
  // Otherwise, the initialization information is (repeated) before each key-frame.
3098
- description: b().optional(),
3098
+ description: _().optional(),
3099
3099
  // hex encoded TODO use base64
3100
3100
  // The width and height of the video in pixels.
3101
3101
  // NOTE: formats that don't use a description can adjust these values in-band.
@@ -3126,7 +3126,7 @@ const J = {
3126
3126
  }), Xi = S({
3127
3127
  // A map of track name to rendition configuration.
3128
3128
  // This is not an array in order for it to work with JSON Merge Patch.
3129
- renditions: Ce(b(), an),
3129
+ renditions: Ze(_(), cn),
3130
3130
  // Render the video at this size in pixels.
3131
3131
  // This is separate from the display aspect ratio because it does not require reinitialization.
3132
3132
  display: S({
@@ -3144,7 +3144,7 @@ const J = {
3144
3144
  q(
3145
3145
  S({
3146
3146
  track: Ki,
3147
- config: an
3147
+ config: cn
3148
3148
  })
3149
3149
  ).transform((e) => {
3150
3150
  const n = e[0]?.config;
@@ -3165,7 +3165,7 @@ S({
3165
3165
  capabilities: Li.optional(),
3166
3166
  preview: re.optional()
3167
3167
  });
3168
- function cn(e) {
3168
+ function un(e) {
3169
3169
  return new TextEncoder().encode(JSON.stringify(e));
3170
3170
  }
3171
3171
  class be {
@@ -3182,7 +3182,7 @@ class be {
3182
3182
  this.#n?.writeFrame(be.#t(n, t));
3183
3183
  }
3184
3184
  static #t(n, t) {
3185
- const r = ln.Varint.encode(t), s = (n instanceof Uint8Array, n.byteLength), i = new Uint8Array(r.byteLength + s);
3185
+ const r = Se.Varint.encode(t), s = (n instanceof Uint8Array, n.byteLength), i = new Uint8Array(r.byteLength + s);
3186
3186
  return i.set(r, 0), n instanceof Uint8Array ? i.set(n, r.byteLength) : n.copyTo(i.subarray(r.byteLength)), i;
3187
3187
  }
3188
3188
  close(n) {
@@ -5636,14 +5636,14 @@ var Capture = class extends AudioWorkletProcessor {
5636
5636
  }
5637
5637
  };
5638
5638
  registerProcessor("capture", Capture);
5639
- `, ea = new Blob([Qi], { type: "application/javascript" }), na = URL.createObjectURL(ea), un = 1e-3, Ie = 0.2;
5640
- let dn = class Bn {
5639
+ `, ea = new Blob([Qi], { type: "application/javascript" }), na = URL.createObjectURL(ea), dn = 1e-3, Ie = 0.2;
5640
+ let ln = class Bn {
5641
5641
  static TRACK = "audio/data";
5642
5642
  static PRIORITY = J.audio;
5643
5643
  enabled;
5644
5644
  muted;
5645
5645
  volume;
5646
- maxLatency;
5646
+ groupDuration;
5647
5647
  source;
5648
5648
  #e = new f(void 0);
5649
5649
  catalog = this.#e;
@@ -5655,7 +5655,7 @@ let dn = class Bn {
5655
5655
  active = new f(!1);
5656
5656
  #s = new P();
5657
5657
  constructor(n) {
5658
- this.source = f.from(n?.source), this.enabled = f.from(n?.enabled ?? !1), this.muted = f.from(n?.muted ?? !1), this.volume = f.from(n?.volume ?? 1), this.maxLatency = n?.maxLatency ?? 100, this.#s.run(this.#o.bind(this)), this.#s.run(this.#i.bind(this)), this.#s.run(this.#a.bind(this)), this.#s.run(this.#c.bind(this));
5658
+ this.source = f.from(n?.source), this.enabled = f.from(n?.enabled ?? !1), this.muted = f.from(n?.muted ?? !1), this.volume = f.from(n?.volume ?? 1), this.groupDuration = n?.groupDuration ?? 100, this.#s.run(this.#o.bind(this)), this.#s.run(this.#i.bind(this)), this.#s.run(this.#a.bind(this)), this.#s.run(this.#c.bind(this));
5659
5659
  }
5660
5660
  #o(n) {
5661
5661
  const t = n.getAll([this.enabled, this.source]);
@@ -5699,7 +5699,7 @@ let dn = class Bn {
5699
5699
  if (!t) return;
5700
5700
  n.cleanup(() => t.gain.cancelScheduledValues(t.context.currentTime));
5701
5701
  const r = n.get(this.muted) ? 0 : n.get(this.volume);
5702
- r < un ? (t.gain.exponentialRampToValueAtTime(un, t.context.currentTime + Ie), t.gain.setValueAtTime(0, t.context.currentTime + Ie + 0.01)) : t.gain.exponentialRampToValueAtTime(r, t.context.currentTime + Ie);
5702
+ r < dn ? (t.gain.exponentialRampToValueAtTime(dn, t.context.currentTime + Ie), t.gain.setValueAtTime(0, t.context.currentTime + Ie + 0.01)) : t.gain.exponentialRampToValueAtTime(r, t.context.currentTime + Ie);
5703
5703
  }
5704
5704
  serve(n, t) {
5705
5705
  const r = t.getAll([this.enabled, this.#t, this.#n]);
@@ -5716,23 +5716,23 @@ let dn = class Bn {
5716
5716
  if (l.type !== "key")
5717
5717
  throw new Error("only key frames are supported");
5718
5718
  let h = !1;
5719
- (!c || c + L.Micro.fromMilli(this.maxLatency) <= l.timestamp) && (c = l.timestamp, h = !0), a.encode(l, l.timestamp, h);
5719
+ (!c || c + L.Micro.fromMilli(this.groupDuration) <= l.timestamp) && (c = l.timestamp, h = !0), a.encode(l, l.timestamp, h);
5720
5720
  },
5721
5721
  error: (l) => {
5722
5722
  console.error("encoder error", l), a.close(l), i.port.onmessage = null;
5723
5723
  }
5724
5724
  });
5725
5725
  t.cleanup(() => u.close()), console.debug("encoding audio", o), u.configure(o), i.port.onmessage = ({ data: l }) => {
5726
- const h = l.channels.slice(0, i.channelCount), w = h.reduce((I, Z) => I + Z.length, 0), m = new Float32Array(w);
5727
- h.reduce((I, Z) => (m.set(Z, I), I + Z.length), 0);
5726
+ const h = l.channels.slice(0, i.channelCount), p = h.reduce((v, $) => v + $.length, 0), w = new Float32Array(p);
5727
+ h.reduce((v, $) => (w.set($, v), v + $.length), 0);
5728
5728
  const E = new AudioData({
5729
5729
  format: "f32-planar",
5730
5730
  sampleRate: i.context.sampleRate,
5731
5731
  numberOfFrames: h[0].length,
5732
5732
  numberOfChannels: h.length,
5733
5733
  timestamp: l.timestamp,
5734
- data: m,
5735
- transfer: [m.buffer]
5734
+ data: w,
5735
+ transfer: [w.buffer]
5736
5736
  });
5737
5737
  u.encode(E), E.close();
5738
5738
  }, t.cleanup(() => {
@@ -5868,7 +5868,7 @@ class ae {
5868
5868
  const r = t.getAll([this.enabled, this.position]);
5869
5869
  if (!r) return;
5870
5870
  const [s, i] = r;
5871
- Jn(n, i, Ze);
5871
+ Jn(n, i, De);
5872
5872
  }
5873
5873
  close() {
5874
5874
  this.signals.close();
@@ -5947,7 +5947,7 @@ const da = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5947
5947
  __proto__: null,
5948
5948
  Info: Kn
5949
5949
  }, Symbol.toStringTag, { value: "Module" }));
5950
- class Pe {
5950
+ class Oe {
5951
5951
  enabled;
5952
5952
  source;
5953
5953
  frame;
@@ -6012,34 +6012,34 @@ class Pe {
6012
6012
  n.spawn(async () => {
6013
6013
  const h = await this.#a(n);
6014
6014
  if (!h) return;
6015
- const w = 30 + (a - 30) / 2;
6016
- let m = Math.round(u * l * w);
6017
- if (h.startsWith("avc1"))
6018
- m *= 1;
6019
- else if (h.startsWith("hev1"))
6020
- m *= 0.7;
6021
- else if (h.startsWith("vp09"))
6022
- m *= 0.8;
6023
- else if (h.startsWith("av01"))
6024
- m *= 0.6;
6025
- else if (h === "vp8")
6026
- m *= 1.1;
6015
+ const { codec: p, hardwareAcceleration: w } = h, E = 30 + (a - 30) / 2;
6016
+ let v = Math.round(u * l * E);
6017
+ if (p.startsWith("avc1"))
6018
+ v *= 1;
6019
+ else if (p.startsWith("hev1"))
6020
+ v *= 0.7;
6021
+ else if (p.startsWith("vp09"))
6022
+ v *= 0.8;
6023
+ else if (p.startsWith("av01"))
6024
+ v *= 0.6;
6025
+ else if (p === "vp8")
6026
+ v *= 1.1;
6027
6027
  else
6028
- throw new Error(`unknown codec: ${h}`);
6029
- m = Math.round(Math.min(m, c.maxBitrate || m));
6030
- const E = {
6031
- codec: h,
6028
+ throw new Error(`unknown codec: ${p}`);
6029
+ v = Math.round(Math.min(v, c.maxBitrate || v));
6030
+ const $ = {
6031
+ codec: p,
6032
6032
  width: i.width,
6033
6033
  height: i.height,
6034
6034
  framerate: a,
6035
- bitrate: m,
6036
- avc: h.startsWith("avc1") ? { format: "annexb" } : void 0,
6035
+ bitrate: v,
6036
+ avc: p.startsWith("avc1") ? { format: "annexb" } : void 0,
6037
6037
  // @ts-expect-error Typescript needs to be updated.
6038
- hevc: h.startsWith("hev1") ? { format: "annexb" } : void 0,
6038
+ hevc: p.startsWith("hev1") ? { format: "annexb" } : void 0,
6039
6039
  latencyMode: "realtime",
6040
- hardwareAcceleration: "prefer-hardware"
6040
+ hardwareAcceleration: w
6041
6041
  };
6042
- n.set(this.#r, E);
6042
+ n.set(this.#r, $);
6043
6043
  });
6044
6044
  }
6045
6045
  #i(n) {
@@ -6106,31 +6106,31 @@ class Pe {
6106
6106
  if (!Hi)
6107
6107
  for (const a of i) {
6108
6108
  if (!a.startsWith(r)) continue;
6109
- const c = {
6109
+ const c = "prefer-hardware", u = {
6110
6110
  codec: a,
6111
6111
  width: s.width,
6112
6112
  height: s.height,
6113
6113
  latencyMode: "realtime",
6114
- hardwareAcceleration: "prefer-hardware",
6114
+ hardwareAcceleration: c,
6115
6115
  avc: a.startsWith("avc1") ? { format: "annexb" } : void 0,
6116
6116
  // @ts-expect-error Typescript needs to be updated.
6117
6117
  hevc: a.startsWith("hev1") ? { format: "annexb" } : void 0
6118
- }, { supported: u } = await VideoEncoder.isConfigSupported(c);
6119
- if (u) return a;
6118
+ }, { supported: l } = await VideoEncoder.isConfigSupported(u);
6119
+ if (l) return { codec: a, hardwareAcceleration: c };
6120
6120
  }
6121
6121
  for (const a of o) {
6122
6122
  if (!a.startsWith(r)) continue;
6123
- const c = {
6123
+ const c = "prefer-software", u = {
6124
6124
  codec: a,
6125
6125
  width: s.width,
6126
6126
  height: s.height,
6127
6127
  latencyMode: "realtime",
6128
- hardwareAcceleration: "prefer-software",
6128
+ hardwareAcceleration: c,
6129
6129
  avc: a.startsWith("avc1") ? { format: "annexb" } : void 0,
6130
6130
  // @ts-expect-error Typescript needs to be updated.
6131
6131
  hevc: a.startsWith("hev1") ? { format: "annexb" } : void 0
6132
- }, { supported: u } = await VideoEncoder.isConfigSupported(c);
6133
- if (u) return a;
6132
+ }, { supported: l } = await VideoEncoder.isConfigSupported(u);
6133
+ if (l) return { codec: a, hardwareAcceleration: c };
6134
6134
  }
6135
6135
  throw new Error("no supported codec");
6136
6136
  }
@@ -6188,7 +6188,7 @@ class B {
6188
6188
  flip = new f(!1);
6189
6189
  signals = new P();
6190
6190
  constructor(n) {
6191
- this.source = f.from(n?.source), this.hd = new Pe(this.frame, this.source, n?.hd), this.sd = new Pe(this.frame, this.source, n?.sd), this.flip = f.from(n?.flip ?? !1), this.signals.run(this.#n.bind(this)), this.signals.run(this.#e.bind(this));
6191
+ this.source = f.from(n?.source), this.hd = new Oe(this.frame, this.source, n?.hd), this.sd = new Oe(this.frame, this.source, n?.sd), this.flip = f.from(n?.flip ?? !1), this.signals.run(this.#n.bind(this)), this.signals.run(this.#e.bind(this));
6192
6192
  }
6193
6193
  #e(n) {
6194
6194
  const t = n.get(this.source);
@@ -6230,7 +6230,7 @@ class B {
6230
6230
  }
6231
6231
  const la = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6232
6232
  __proto__: null,
6233
- Encoder: Pe,
6233
+ Encoder: Oe,
6234
6234
  Root: B
6235
6235
  }, Symbol.toStringTag, { value: "Module" }));
6236
6236
  class Xn {
@@ -6246,14 +6246,12 @@ class Xn {
6246
6246
  user;
6247
6247
  signals = new P();
6248
6248
  constructor(n) {
6249
- this.connection = f.from(n?.connection), this.enabled = f.from(n?.enabled ?? !1), this.name = f.from(n?.name), this.audio = new dn(n?.audio), this.video = new B(n?.video), this.location = new Wn(n?.location), this.chat = new Gn(n?.chat), this.preview = new pe(n?.preview), this.user = new Kn(n?.user), this.signals.run(this.#e.bind(this));
6249
+ this.connection = f.from(n?.connection), this.enabled = f.from(n?.enabled ?? !1), this.name = f.from(n?.name ?? Se.Path.empty()), this.audio = new ln(n?.audio), this.video = new B(n?.video), this.location = new Wn(n?.location), this.chat = new Gn(n?.chat), this.preview = new pe(n?.preview), this.user = new Kn(n?.user), this.signals.run(this.#e.bind(this));
6250
6250
  }
6251
6251
  #e(n) {
6252
6252
  const t = n.getAll([this.enabled, this.connection]);
6253
6253
  if (!t) return;
6254
- const [r, s] = t, i = n.get(this.name);
6255
- if (i === void 0) return;
6256
- const o = new ln.Broadcast();
6254
+ const [r, s] = t, i = n.get(this.name), o = new Se.Broadcast();
6257
6255
  n.cleanup(() => o.close()), s.publish(i, o), n.spawn(this.#n.bind(this, o, n));
6258
6256
  }
6259
6257
  async #n(n, t) {
@@ -6281,7 +6279,7 @@ class Xn {
6281
6279
  case se.TRACK:
6282
6280
  this.chat.message.serve(r.track, s);
6283
6281
  break;
6284
- case dn.TRACK:
6282
+ case ln.TRACK:
6285
6283
  this.audio.serve(r.track, s);
6286
6284
  break;
6287
6285
  case B.TRACK_HD:
@@ -6299,7 +6297,7 @@ class Xn {
6299
6297
  }
6300
6298
  #t(n, t) {
6301
6299
  if (!t.get(this.enabled)) {
6302
- n.writeFrame(cn({}));
6300
+ n.writeFrame(un({}));
6303
6301
  return;
6304
6302
  }
6305
6303
  const r = {
@@ -6309,7 +6307,7 @@ class Xn {
6309
6307
  user: t.get(this.user.catalog),
6310
6308
  chat: t.get(this.chat.catalog),
6311
6309
  preview: t.get(this.preview.catalog)
6312
- }, s = cn(r);
6310
+ }, s = un(r);
6313
6311
  n.writeFrame(s);
6314
6312
  }
6315
6313
  close() {
@@ -6565,7 +6563,7 @@ export {
6565
6563
  Xn as B,
6566
6564
  ha as C,
6567
6565
  Hn as D,
6568
- dn as E,
6566
+ ln as E,
6569
6567
  fa as F,
6570
6568
  ma as M,
6571
6569
  pe as P,
@@ -6575,4 +6573,4 @@ export {
6575
6573
  aa as i,
6576
6574
  da as u
6577
6575
  };
6578
- //# sourceMappingURL=screen-BORpmf_D.js.map
6576
+ //# sourceMappingURL=screen-B680RFft.js.map