@golemui/gui-lit 1.0.0-rc.2 → 1.0.0-rc.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -1,13 +1,13 @@
1
- import { filterTap as Tt, standardValidate as Be, isStandardValidateSuccess as Ye } from "@golemui/core";
1
+ import { filterTap as zt, standardValidate as Ge, isStandardValidateSuccess as Ke } from "@golemui/core";
2
2
  import "@golemui/gui-shared";
3
3
  import "@golemui/lit";
4
- import { LitElement as At, html as St } from "lit";
5
- import { property as Ge, query as zt, customElement as Et } from "lit/decorators.js";
6
- const Ke = {
4
+ import { LitElement as Et, html as $t } from "lit";
5
+ import { property as me, query as Ot, customElement as Zt } from "lit/decorators.js";
6
+ const qe = {
7
7
  LAYOUTS: "LAYOUTS",
8
8
  DISPLAYS: "DISPLAYS"
9
9
  };
10
- function $t(e) {
10
+ function Pt(e) {
11
11
  return function(t, n = () => !0) {
12
12
  return {
13
13
  kind: "leaf",
@@ -20,27 +20,27 @@ function $t(e) {
20
20
  function w(e, t) {
21
21
  return typeof e == "function" ? e : { type: t, ...e ?? {} };
22
22
  }
23
- const Ot = (e, t) => ({
23
+ const Ct = (e, t) => ({
24
24
  type: "ITEMS",
25
- itemType: Ke.DISPLAYS,
25
+ itemType: qe.DISPLAYS,
26
26
  items: [{ render: e }],
27
27
  tags: t ?? []
28
- }), K = /* @__PURE__ */ new Map();
29
- function qe(e, t) {
30
- if (K.has(e))
28
+ }), q = /* @__PURE__ */ new Map();
29
+ function Xe(e, t) {
30
+ if (q.has(e))
31
31
  throw new Error(`Item type "${e}" is already registered.`);
32
- K.set(e, t);
32
+ q.set(e, t);
33
33
  }
34
- function q(e) {
35
- const t = K.get(e);
34
+ function X(e) {
35
+ const t = q.get(e);
36
36
  if (!t)
37
37
  throw new Error(
38
38
  `No handler registered for item type "${e}". Did you forget to import the registration module?`
39
39
  );
40
40
  return t;
41
41
  }
42
- function Xe(e) {
43
- return K.has(e);
42
+ function He(e) {
43
+ return q.has(e);
44
44
  }
45
45
  function h(e) {
46
46
  const t = (a) => {
@@ -49,8 +49,8 @@ function h(e) {
49
49
  let u = { ...e.sensibleDefaults.base };
50
50
  for (const c of a) {
51
51
  const p = c.config;
52
- for (const m of e.sensibleDefaults.fields) {
53
- const f = m;
52
+ for (const d of e.sensibleDefaults.fields) {
53
+ const f = d;
54
54
  p[f] != null && (u = { ...u, [f]: p[f] });
55
55
  }
56
56
  }
@@ -77,8 +77,8 @@ function h(e) {
77
77
  ...e.buildCustomWidget ? { buildCustomWidget: e.buildCustomWidget } : {},
78
78
  ...e.getChildren ? { getChildren: e.getChildren } : {}
79
79
  };
80
- qe(e.itemType, o);
81
- const s = $t(e.itemType);
80
+ Xe(e.itemType, o);
81
+ const s = Pt(e.itemType);
82
82
  return { gsl: s, gslByUid: (a, u) => s(u, ((c) => c.uid === a)) };
83
83
  }
84
84
  function y(e) {
@@ -93,39 +93,39 @@ function y(e) {
93
93
  type: u,
94
94
  size: c,
95
95
  onLoad: p,
96
- onChange: m,
96
+ onChange: d,
97
97
  onFilter: f,
98
98
  on: z,
99
99
  states: P,
100
- include: V,
101
- exclude: _e,
102
- validator: ve,
100
+ include: B,
101
+ exclude: ve,
102
+ validator: ke,
103
103
  ...C
104
104
  } = e;
105
105
  return C;
106
106
  }
107
- function Zt(e) {
107
+ function It(e) {
108
108
  return e ? e.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim().replace(/\b\w/g, (t) => t.toUpperCase()) : "";
109
109
  }
110
110
  function v(e, t) {
111
- return e.label != null || t.suppressAutomaticLabels || !e.path ? e : { ...e, label: Zt(e.path) };
111
+ return e.label != null || t.suppressAutomaticLabels || !e.path ? e : { ...e, label: It(e.path) };
112
112
  }
113
113
  function Z(e, t) {
114
114
  return e.placeholder != null || t.suppressAutomaticPlaceholders || !e.path ? e : { ...e, placeholder: e.path };
115
115
  }
116
- function Pt(e) {
116
+ function Lt(e) {
117
117
  switch (e.type) {
118
118
  case "text":
119
- return It(e);
119
+ return Mt(e);
120
120
  case "number":
121
- return Lt(e);
121
+ return Nt(e);
122
122
  case "boolean":
123
- return Ct(e);
123
+ return Dt(e);
124
124
  default:
125
125
  throw new Error(`Unsupported field type "${e.type}"`);
126
126
  }
127
127
  }
128
- function Ct(e) {
128
+ function Dt(e) {
129
129
  const t = y(e);
130
130
  return {
131
131
  uid: e.uid ?? "",
@@ -139,7 +139,7 @@ function Ct(e) {
139
139
  props: t
140
140
  };
141
141
  }
142
- function It(e) {
142
+ function Mt(e) {
143
143
  const t = y(e);
144
144
  return {
145
145
  uid: e.uid ?? "",
@@ -156,7 +156,7 @@ function It(e) {
156
156
  validator: w(e.validator, "string")
157
157
  };
158
158
  }
159
- function Lt(e) {
159
+ function Nt(e) {
160
160
  const t = y(e);
161
161
  return {
162
162
  uid: e.uid ?? "",
@@ -187,7 +187,7 @@ h({
187
187
  return n = Z(n, t), n;
188
188
  }
189
189
  },
190
- mapToWidget: Pt
190
+ mapToWidget: Lt
191
191
  });
192
192
  h({
193
193
  itemType: "SELECT",
@@ -498,11 +498,11 @@ h({
498
498
  props: y(e)
499
499
  })
500
500
  });
501
- function Dt(e) {
501
+ function xt(e) {
502
502
  const t = {};
503
503
  return e.addLabel != null && (t.addLabel = e.addLabel), e.removeLabel != null && (t.removeLabel = e.removeLabel), e.limit != null && (t.limit = e.limit), e.title != null && (t.title = e.title), e.addButtonIcon != null && (t.addButtonIcon = e.addButtonIcon), e.removeButtonIcon != null && (t.removeButtonIcon = e.removeButtonIcon), t;
504
504
  }
505
- function Mt(e) {
505
+ function Rt(e) {
506
506
  return {
507
507
  uid: e.uid ?? "",
508
508
  kind: "input",
@@ -513,7 +513,7 @@ function Mt(e) {
513
513
  ...e.readonly != null ? { readonly: e.readonly } : {},
514
514
  ...e.validator != null ? { validator: w(e.validator, "array") } : {},
515
515
  props: {
516
- ...Dt(e),
516
+ ...xt(e),
517
517
  template: { kind: "layout", type: "flex", children: [], props: { direction: "column" } }
518
518
  }
519
519
  };
@@ -522,12 +522,12 @@ function ae(e, t) {
522
522
  for (const n of e) {
523
523
  if (typeof n == "function") continue;
524
524
  const r = n;
525
- typeof r.path == "string" && r.path && (r.path = t + r.path), "children" in r && Array.isArray(r.children) && ae(r.children, t);
525
+ typeof r.path == "string" && r.path && !r.path.startsWith(t) && (r.path = t + r.path), "children" in r && Array.isArray(r.children) && ae(r.children, t);
526
526
  const o = r.props;
527
527
  o?.template?.children && Array.isArray(o.template.children) && ae(o.template.children, t);
528
528
  }
529
529
  }
530
- function Nt(e, t) {
530
+ function Ft(e, t) {
531
531
  const n = t.walkChildren(t.children ?? []), r = e.kind === "static" ? e.def.path ?? "" : e.fn({})?.path ?? "";
532
532
  r && ae(n, r + ".items.");
533
533
  const o = {
@@ -553,32 +553,42 @@ function Nt(e, t) {
553
553
  };
554
554
  });
555
555
  }
556
- function xt(e) {
556
+ function Wt(e) {
557
557
  return {
558
558
  baseDef: e.def,
559
559
  path: e.key,
560
560
  children: e.children
561
561
  };
562
562
  }
563
- function Rt(e) {
563
+ function Ut(e) {
564
564
  return e.children;
565
565
  }
566
- const Ft = {
567
- parseEntry: xt,
566
+ const jt = {
567
+ parseEntry: Wt,
568
568
  rollUpSensibleDefaults: () => ({}),
569
569
  applySensibleDefaults: (e) => e,
570
- mapToWidget: Mt,
571
- buildCustomWidget: Nt,
572
- getChildren: Rt
570
+ mapToWidget: Rt,
571
+ buildCustomWidget: Ft,
572
+ getChildren: Ut
573
573
  };
574
- qe("REPEATER", Ft);
575
- const He = {
574
+ Xe("REPEATER", jt);
575
+ const Je = {
576
576
  onLoad: "load",
577
577
  onChange: "change",
578
578
  onFilter: "filter",
579
579
  onBlur: "blur"
580
- }, Wt = Object.keys(He);
581
- class Ut {
580
+ }, Vt = Object.keys(Je);
581
+ function Qe(e) {
582
+ if (e.length > 0)
583
+ return null;
584
+ try {
585
+ const t = e();
586
+ return typeof t == "string" ? t : null;
587
+ } catch {
588
+ return null;
589
+ }
590
+ }
591
+ class Bt {
582
592
  // ── Action-specific: onClick ───────────────────────────────────
583
593
  extractOnClickFromMergeResult(t, n, r) {
584
594
  if (t.kind === "dynamic") {
@@ -614,21 +624,27 @@ class Ut {
614
624
  const o = { ...t.on || {} };
615
625
  let s = !1;
616
626
  const i = { ...t };
617
- for (const a of Wt) {
627
+ for (const a of Vt) {
618
628
  const u = t[a];
619
629
  if (u == null) continue;
620
- const c = He[a];
630
+ const c = Je[a];
621
631
  if (typeof u == "function") {
622
- const p = r.next();
623
- n.set(p, u), o[c] = p, s = !0;
632
+ const p = Qe(u);
633
+ if (p != null)
634
+ o[c] = p;
635
+ else {
636
+ const d = r.next();
637
+ n.set(d, u), o[c] = d;
638
+ }
639
+ s = !0;
624
640
  } else typeof u == "string" && (o[c] = u, s = !0);
625
641
  delete i[a];
626
642
  }
627
643
  return s && (i.on = o), i;
628
644
  }
629
645
  }
630
- const me = new Ut();
631
- function jt(e) {
646
+ const he = new Bt();
647
+ function Yt(e) {
632
648
  const {
633
649
  uid: t,
634
650
  label: n,
@@ -640,7 +656,7 @@ function jt(e) {
640
656
  type: u,
641
657
  tags: c,
642
658
  size: p,
643
- include: m,
659
+ include: d,
644
660
  exclude: f,
645
661
  states: z,
646
662
  ...P
@@ -659,14 +675,14 @@ function jt(e) {
659
675
  h({
660
676
  itemType: "ACTIONS",
661
677
  entryShape: "bare",
662
- mapToWidget: jt,
663
- afterMerge: (e, t) => me.extractOnClickFromMergeResult(
678
+ mapToWidget: Yt,
679
+ afterMerge: (e, t) => he.extractOnClickFromMergeResult(
664
680
  e,
665
681
  t.eventRegistry,
666
682
  t.eventIdGenerator
667
683
  )
668
684
  });
669
- function Vt(e) {
685
+ function Gt(e) {
670
686
  const {
671
687
  uid: t,
672
688
  widgetName: n,
@@ -688,7 +704,7 @@ function Vt(e) {
688
704
  children: []
689
705
  };
690
706
  }
691
- function Bt(e, t) {
707
+ function Kt(e, t) {
692
708
  const n = t.walkChildren(t.children ?? []);
693
709
  if (e.kind === "static")
694
710
  return { ...t.mapStaticDef(e.def, "LAYOUTS"), children: n };
@@ -698,17 +714,26 @@ function Bt(e, t) {
698
714
  return { ...t.mapStaticDef(s, "LAYOUTS"), children: n };
699
715
  });
700
716
  }
701
- function Yt(e) {
717
+ function qt(e) {
702
718
  return e.children;
703
719
  }
704
720
  h({
705
721
  itemType: "LAYOUTS",
706
722
  entryShape: "compound",
707
- mapToWidget: Vt,
708
- buildCustomWidget: Bt,
709
- getChildren: Yt
723
+ mapToWidget: Gt,
724
+ buildCustomWidget: Kt,
725
+ getChildren: qt
710
726
  });
711
- function Gt(e) {
727
+ function Te(e) {
728
+ return {
729
+ errors: void 0,
730
+ touched: void 0,
731
+ translate: void 0,
732
+ ...e ?? {},
733
+ $form: e?.$form ?? {}
734
+ };
735
+ }
736
+ function Xt(e) {
712
737
  return {
713
738
  uid: "",
714
739
  kind: "display",
@@ -716,7 +741,7 @@ function Gt(e) {
716
741
  props: { render: e.render }
717
742
  };
718
743
  }
719
- function Kt(e, t) {
744
+ function Ht(e, t) {
720
745
  if (e.kind === "static") {
721
746
  const r = e.def;
722
747
  return ((o) => ({
@@ -725,7 +750,7 @@ function Kt(e, t) {
725
750
  type: "renderer",
726
751
  ...r.include != null ? { include: r.include } : {},
727
752
  ...r.exclude != null ? { exclude: r.exclude } : {},
728
- props: { render: r.render(o ?? {}) }
753
+ props: { render: r.render(Te(o)) }
729
754
  }));
730
755
  }
731
756
  const n = e.fn;
@@ -737,15 +762,15 @@ function Kt(e, t) {
737
762
  type: "renderer",
738
763
  ...o.include != null ? { include: o.include } : {},
739
764
  ...o.exclude != null ? { exclude: o.exclude } : {},
740
- props: { render: o.render(r ?? {}) }
765
+ props: { render: o.render(Te(r)) }
741
766
  };
742
767
  });
743
768
  }
744
769
  h({
745
770
  itemType: "DISPLAYS",
746
771
  entryShape: "bare",
747
- mapToWidget: Gt,
748
- buildCustomWidget: Kt
772
+ mapToWidget: Xt,
773
+ buildCustomWidget: Ht
749
774
  });
750
775
  h({
751
776
  itemType: "ALERTS",
@@ -772,7 +797,7 @@ h({
772
797
  }
773
798
  })
774
799
  });
775
- function qt(e) {
800
+ function Jt(e) {
776
801
  return {
777
802
  uid: e.uid ?? "",
778
803
  kind: "layout",
@@ -785,7 +810,7 @@ function qt(e) {
785
810
  children: []
786
811
  };
787
812
  }
788
- function Xt(e, t) {
813
+ function Qt(e, t) {
789
814
  const n = t.walkChildren(t.children ?? []);
790
815
  if (e.kind === "static")
791
816
  return { ...t.mapStaticDef(e.def, "TABS"), children: n };
@@ -795,17 +820,17 @@ function Xt(e, t) {
795
820
  return { ...t.mapStaticDef(s, "TABS"), children: n };
796
821
  });
797
822
  }
798
- function Ht(e) {
823
+ function en(e) {
799
824
  return e.children;
800
825
  }
801
826
  h({
802
827
  itemType: "TABS",
803
828
  entryShape: "compound",
804
- mapToWidget: qt,
805
- buildCustomWidget: Xt,
806
- getChildren: Ht
829
+ mapToWidget: Jt,
830
+ buildCustomWidget: Qt,
831
+ getChildren: en
807
832
  });
808
- function Jt(e) {
833
+ function tn(e) {
809
834
  return {
810
835
  uid: e.uid ?? "",
811
836
  kind: "layout",
@@ -819,7 +844,7 @@ function Jt(e) {
819
844
  children: []
820
845
  };
821
846
  }
822
- function Qt(e, t) {
847
+ function nn(e, t) {
823
848
  const n = t.walkChildren(t.children ?? []);
824
849
  if (e.kind === "static")
825
850
  return { ...t.mapStaticDef(e.def, "ACCORDION"), children: n };
@@ -829,15 +854,15 @@ function Qt(e, t) {
829
854
  return { ...t.mapStaticDef(s, "ACCORDION"), children: n };
830
855
  });
831
856
  }
832
- function en(e) {
857
+ function rn(e) {
833
858
  return e.children;
834
859
  }
835
860
  h({
836
861
  itemType: "ACCORDION",
837
862
  entryShape: "compound",
838
- mapToWidget: Jt,
839
- buildCustomWidget: Qt,
840
- getChildren: en
863
+ mapToWidget: tn,
864
+ buildCustomWidget: nn,
865
+ getChildren: rn
841
866
  });
842
867
  h({
843
868
  itemType: "CUSTOM_INPUT",
@@ -877,7 +902,7 @@ h({
877
902
  tags: u,
878
903
  size: c,
879
904
  include: p,
880
- exclude: m,
905
+ exclude: d,
881
906
  states: f,
882
907
  props: z,
883
908
  ...P
@@ -892,7 +917,7 @@ h({
892
917
  props: { ...z, ...P }
893
918
  };
894
919
  },
895
- afterMerge: (e, t) => me.extractOnClickFromMergeResult(
920
+ afterMerge: (e, t) => he.extractOnClickFromMergeResult(
896
921
  e,
897
922
  t.eventRegistry,
898
923
  t.eventIdGenerator
@@ -908,7 +933,7 @@ h({
908
933
  props: e.props ?? {}
909
934
  })
910
935
  });
911
- function tn(e) {
936
+ function on(e) {
912
937
  return {
913
938
  uid: e.uid ?? "",
914
939
  kind: "layout",
@@ -917,7 +942,7 @@ function tn(e) {
917
942
  children: []
918
943
  };
919
944
  }
920
- function nn(e, t) {
945
+ function sn(e, t) {
921
946
  const n = t.walkChildren(t.children ?? []);
922
947
  if (e.kind === "static")
923
948
  return { ...t.mapStaticDef(e.def, "CUSTOM_LAYOUT"), children: n };
@@ -927,15 +952,15 @@ function nn(e, t) {
927
952
  return { ...t.mapStaticDef(s, "CUSTOM_LAYOUT"), children: n };
928
953
  });
929
954
  }
930
- function rn(e) {
955
+ function an(e) {
931
956
  return e.children;
932
957
  }
933
958
  h({
934
959
  itemType: "CUSTOM_LAYOUT",
935
960
  entryShape: "compound",
936
- mapToWidget: tn,
937
- buildCustomWidget: nn,
938
- getChildren: rn
961
+ mapToWidget: on,
962
+ buildCustomWidget: sn,
963
+ getChildren: an
939
964
  });
940
965
  h({
941
966
  itemType: "TAGS",
@@ -957,7 +982,7 @@ h({
957
982
  props: y(e)
958
983
  })
959
984
  });
960
- const Je = {
985
+ const et = {
961
986
  INPUTS: /* @__PURE__ */ new Set([
962
987
  "INPUTS",
963
988
  "TEXTAREA",
@@ -983,11 +1008,11 @@ const Je = {
983
1008
  DISPLAYS: /* @__PURE__ */ new Set(["DISPLAYS", "ALERTS", "MARKDOWN_TEXTS", "CUSTOM_DISPLAY"]),
984
1009
  LAYOUTS: /* @__PURE__ */ new Set(["LAYOUTS", "TABS", "ACCORDION", "CUSTOM_LAYOUT"])
985
1010
  };
986
- function on(e, t) {
987
- const n = Je[e];
1011
+ function un(e, t) {
1012
+ const n = et[e];
988
1013
  return n ? n.has(t) : e === t;
989
1014
  }
990
- class sn {
1015
+ class cn {
991
1016
  resolve(t, n) {
992
1017
  const r = [];
993
1018
  for (const s of n)
@@ -1004,7 +1029,7 @@ class sn {
1004
1029
  this.collectFromLeaf(o, n, r);
1005
1030
  }
1006
1031
  collectFromLeaf(t, n, r) {
1007
- on(t.selectorType, n.itemType ?? "") && t.matcher(n) && r.push(t);
1032
+ un(t.selectorType, n.itemType ?? "") && t.matcher(n) && r.push(t);
1008
1033
  }
1009
1034
  rollUpSensibleDefaults(t) {
1010
1035
  const n = /* @__PURE__ */ new Map(), r = (s, i) => {
@@ -1012,7 +1037,7 @@ class sn {
1012
1037
  a.push(i), n.set(s, a);
1013
1038
  };
1014
1039
  for (const s of t) {
1015
- const i = Je[s.selectorType];
1040
+ const i = et[s.selectorType];
1016
1041
  if (i)
1017
1042
  for (const a of i) r(a, s);
1018
1043
  else
@@ -1020,12 +1045,12 @@ class sn {
1020
1045
  }
1021
1046
  const o = {};
1022
1047
  for (const [s, i] of n)
1023
- Xe(s) && (o[s] = q(s).rollUpSensibleDefaults(i));
1048
+ He(s) && (o[s] = X(s).rollUpSensibleDefaults(i));
1024
1049
  return o;
1025
1050
  }
1026
1051
  }
1027
- const an = new sn();
1028
- class un {
1052
+ const ln = new cn();
1053
+ class pn {
1029
1054
  /**
1030
1055
  * Deep merges two objects, with right taking precedence over left when properties conflict.
1031
1056
  * Arrays are replaced, not merged.
@@ -1044,8 +1069,8 @@ class un {
1044
1069
  return r;
1045
1070
  }
1046
1071
  }
1047
- const cn = new un();
1048
- class ln {
1072
+ const dn = new pn();
1073
+ class mn {
1049
1074
  constructor(t) {
1050
1075
  this.objectUtils = t;
1051
1076
  }
@@ -1096,9 +1121,9 @@ class ln {
1096
1121
  }
1097
1122
  // ── Apply sensible defaults via registry ──
1098
1123
  applySensibleDefaults(t, n, r) {
1099
- if (!Xe(n)) return t;
1124
+ if (!He(n)) return t;
1100
1125
  const o = r.sensibleDefaults[n] ?? {};
1101
- return q(n).applySensibleDefaults(t, o);
1126
+ return X(n).applySensibleDefaults(t, o);
1102
1127
  }
1103
1128
  // ── Create promoted FunctionWidget ──
1104
1129
  createPromotedFunction(t, n, r, o, s) {
@@ -1126,8 +1151,8 @@ class ln {
1126
1151
  };
1127
1152
  }
1128
1153
  }
1129
- const pn = new ln(cn);
1130
- class dn {
1154
+ const hn = new mn(dn);
1155
+ class fn {
1131
1156
  mapToWidget(t, n) {
1132
1157
  if (t.kind === "dynamic") {
1133
1158
  const r = t.fn;
@@ -1139,7 +1164,7 @@ class dn {
1139
1164
  return this.mapStaticDef(t.def, n);
1140
1165
  }
1141
1166
  mapStaticDef(t, n) {
1142
- const r = q(n).mapToWidget(t);
1167
+ const r = X(n).mapToWidget(t);
1143
1168
  return this.applyBaseWidgetFields(r, t);
1144
1169
  }
1145
1170
  /**
@@ -1150,8 +1175,8 @@ class dn {
1150
1175
  return n.size != null && (t.size = n.size), n.defaultValue != null && t.kind === "input" && (t.defaultValue = n.defaultValue), n.on != null && (t.on = n.on), n.include != null && (t.include = n.include), n.exclude != null && (t.exclude = n.exclude), t;
1151
1176
  }
1152
1177
  }
1153
- const mn = new dn();
1154
- class hn {
1178
+ const gn = new fn();
1179
+ class bn {
1155
1180
  /**
1156
1181
  * Ensures the output is always a uniform GslSelector[] of aggregated selectors.
1157
1182
  *
@@ -1176,18 +1201,18 @@ class hn {
1176
1201
  };
1177
1202
  }
1178
1203
  }
1179
- const fn = new hn(), bn = {
1204
+ const yn = new bn(), _n = {
1180
1205
  input: /* @__PURE__ */ new Set(["disabled", "readonly", "label", "validator", "size"]),
1181
1206
  action: /* @__PURE__ */ new Set(["disabled", "label", "size"]),
1182
1207
  layout: /* @__PURE__ */ new Set(["size"]),
1183
1208
  display: /* @__PURE__ */ new Set([])
1184
- }, we = {
1209
+ }, Ae = {
1185
1210
  onChange: "change",
1186
1211
  onLoad: "load",
1187
1212
  onFilter: "filter",
1188
1213
  onClick: "click"
1189
1214
  };
1190
- class gn {
1215
+ class vn {
1191
1216
  /**
1192
1217
  * Extracts `states` from a merge result, combining with state-targeted
1193
1218
  * GSL leaf selectors from `_gslStates`.
@@ -1207,7 +1232,7 @@ class gn {
1207
1232
  const a = t.fn;
1208
1233
  return {
1209
1234
  cleanedResult: { kind: "dynamic", fn: (c) => {
1210
- const p = a(c), { states: m, ...f } = p;
1235
+ const p = a(c), { states: d, ...f } = p;
1211
1236
  return f;
1212
1237
  } },
1213
1238
  stateData: { stateOverrides: r }
@@ -1237,11 +1262,11 @@ class gn {
1237
1262
  const { stateOverrides: s } = n;
1238
1263
  if (Object.keys(s).length === 0)
1239
1264
  return t;
1240
- const i = { ...t }, a = t.kind, u = bn[a] || /* @__PURE__ */ new Set();
1265
+ const i = { ...t }, a = t.kind, u = _n[a] || /* @__PURE__ */ new Set();
1241
1266
  t.props && (i.props = { ...t.props }), t.on && (i.on = { ...t.on });
1242
1267
  for (const [c, p] of Object.entries(s))
1243
- for (const [m, f] of Object.entries(p))
1244
- m === "visible" ? this.applyVisibility(i, c, f) : we[m] ? this.applyStateEvent(i, c, m, f, r, o) : u.has(m) ? i[`${m}.${c}`] = f : (i.props || (i.props = {}), i.props[`${m}.${c}`] = f);
1268
+ for (const [d, f] of Object.entries(p))
1269
+ d === "visible" ? this.applyVisibility(i, c, f) : Ae[d] ? this.applyStateEvent(i, c, d, f, r, o) : u.has(d) ? i[`${d}.${c}`] = f : (i.props || (i.props = {}), i.props[`${d}.${c}`] = f);
1245
1270
  return i;
1246
1271
  }
1247
1272
  hasStateData(t) {
@@ -1259,24 +1284,29 @@ class gn {
1259
1284
  }
1260
1285
  // ── State-suffixed event helpers ──
1261
1286
  applyStateEvent(t, n, r, o, s, i) {
1262
- const a = we[r];
1287
+ const a = Ae[r];
1263
1288
  if (t.on || (t.on = {}), typeof o == "function") {
1264
- const u = i.next();
1265
- s.set(u, o), t.on[`${a}.${n}`] = u;
1289
+ const u = Qe(o);
1290
+ if (u != null)
1291
+ t.on[`${a}.${n}`] = u;
1292
+ else {
1293
+ const c = i.next();
1294
+ s.set(c, o), t.on[`${a}.${n}`] = c;
1295
+ }
1266
1296
  } else typeof o == "string" && (t.on[`${a}.${n}`] = o);
1267
1297
  }
1268
1298
  }
1269
- const yn = new gn();
1270
- function _n() {
1299
+ const kn = new vn();
1300
+ function wn() {
1271
1301
  let e = 0;
1272
1302
  return { next: () => `event_${e++}` };
1273
1303
  }
1274
- class vn {
1304
+ class Tn {
1275
1305
  constructor(t, n, r, o, s) {
1276
1306
  this.resolver = t, this.merger = n, this.mapper = r, this.eventWiring = o, this.stateExpansion = s;
1277
1307
  }
1278
1308
  walkAndMap(t, n, r) {
1279
- const o = /* @__PURE__ */ new Map(), s = _n(), i = { value: 0 }, a = /* @__PURE__ */ new Set();
1309
+ const o = /* @__PURE__ */ new Map(), s = wn(), i = { value: 0 }, a = /* @__PURE__ */ new Set();
1280
1310
  return { widgets: this.walkItems(
1281
1311
  t,
1282
1312
  n,
@@ -1305,12 +1335,12 @@ class vn {
1305
1335
  });
1306
1336
  }
1307
1337
  processItem(t, n, r, o, s, i, a, u, c) {
1308
- const p = n, m = q(n), f = m.parseEntry(t), z = this.buildBaseDef(f), P = this.buildDecoratorForMatching(z, p, r), V = this.resolver.resolve(P, o), _e = V.leafSelectors.filter((T) => T.targetState != null), ve = {
1309
- leafSelectors: V.leafSelectors.filter((T) => T.targetState == null),
1310
- sensibleDefaults: V.sensibleDefaults
1338
+ const p = n, d = X(n), f = d.parseEntry(t), z = this.buildBaseDef(f), P = this.buildDecoratorForMatching(z, p, r), B = this.resolver.resolve(P, o), ve = B.leafSelectors.filter((T) => T.targetState != null), ke = {
1339
+ leafSelectors: B.leafSelectors.filter((T) => T.targetState == null),
1340
+ sensibleDefaults: B.sensibleDefaults
1311
1341
  };
1312
- let C = this.merger.merge(z, p, ve);
1313
- m.afterMerge && (C = m.afterMerge(C, {
1342
+ let C = this.merger.merge(z, p, ke);
1343
+ d.afterMerge && (C = d.afterMerge(C, {
1314
1344
  eventRegistry: s,
1315
1345
  formConfig: i,
1316
1346
  eventIdGenerator: a
@@ -1319,12 +1349,12 @@ class vn {
1319
1349
  s,
1320
1350
  a
1321
1351
  );
1322
- const { cleanedResult: ke, stateData: se } = this.stateExpansion.extractFromMergeResult(
1352
+ const { cleanedResult: we, stateData: se } = this.stateExpansion.extractFromMergeResult(
1323
1353
  C,
1324
- _e
1354
+ ve
1325
1355
  );
1326
1356
  let O;
1327
- if (m.buildCustomWidget) {
1357
+ if (d.buildCustomWidget) {
1328
1358
  const T = this.buildCustomWidgetContext(
1329
1359
  f.children,
1330
1360
  o,
@@ -1334,9 +1364,9 @@ class vn {
1334
1364
  u,
1335
1365
  c
1336
1366
  );
1337
- O = this.buildCustomWidget(m, ke, T);
1367
+ O = this.buildCustomWidget(d, we, T);
1338
1368
  } else
1339
- O = this.mapper.mapToWidget(ke, p);
1369
+ O = this.mapper.mapToWidget(we, p);
1340
1370
  if (typeof O != "function") {
1341
1371
  const T = O;
1342
1372
  T.uid || (T.path && !c.has(T.path) ? (T.uid = T.path, c.add(T.path)) : T.uid = `dx_${u.value++}`);
@@ -1344,10 +1374,10 @@ class vn {
1344
1374
  if (this.stateExpansion.hasStateData(se))
1345
1375
  if (typeof O == "function") {
1346
1376
  const T = O;
1347
- O = ((kt) => {
1348
- const wt = T(kt);
1377
+ O = ((At) => {
1378
+ const St = T(At);
1349
1379
  return this.stateExpansion.applyToWidget(
1350
- wt,
1380
+ St,
1351
1381
  se,
1352
1382
  s,
1353
1383
  a
@@ -1398,7 +1428,7 @@ class vn {
1398
1428
  return { itemType: n, tags: o, uid: s, type: i };
1399
1429
  }
1400
1430
  }
1401
- class kn {
1431
+ class An {
1402
1432
  constructor(t, n) {
1403
1433
  this.selectorNormalizer = t, this.walker = n;
1404
1434
  }
@@ -1426,7 +1456,7 @@ class kn {
1426
1456
  */
1427
1457
  prepareForm(t, n, r) {
1428
1458
  const s = (Array.isArray(t) ? [...t] : [t]).map(
1429
- (u) => typeof u == "function" ? Ot(u) : u
1459
+ (u) => typeof u == "function" ? Ct(u) : u
1430
1460
  ), i = this.selectorNormalizer.normalizeSelectors(n), a = {
1431
1461
  ...this.selectorNormalizer.extractFormConfig(),
1432
1462
  ...r
@@ -1437,7 +1467,7 @@ class kn {
1437
1467
  children: s
1438
1468
  };
1439
1469
  return {
1440
- defs: [{ type: "ITEMS", itemType: Ke.LAYOUTS, items: [u], tags: [] }],
1470
+ defs: [{ type: "ITEMS", itemType: qe.LAYOUTS, items: [u], tags: [] }],
1441
1471
  gslSelectors: i,
1442
1472
  formConfig: a
1443
1473
  };
@@ -1465,8 +1495,8 @@ class kn {
1465
1495
  if (i) {
1466
1496
  const a = (c) => {
1467
1497
  if (c && typeof c == "object" && "path" in c && !("type" in c)) {
1468
- const { path: p, ...m } = c;
1469
- for (const [f, z] of Object.entries(m))
1498
+ const { path: p, ...d } = c;
1499
+ for (const [f, z] of Object.entries(d))
1470
1500
  s.callback({
1471
1501
  type: "OVERRIDE_WIDGET_PROP",
1472
1502
  payload: { path: p, prop: f, value: z }
@@ -1483,37 +1513,46 @@ class kn {
1483
1513
  }), r.dependencies && (o.dependencies = r.dependencies), r.widgetLoaders && (o.widgetLoaders = r.widgetLoaders), r.validateOn && (o.validateOn = r.validateOn), r.itemRenderers && (o.itemRenderers = r.itemRenderers), o;
1484
1514
  }
1485
1515
  }
1486
- const wn = new vn(
1487
- an,
1488
- pn,
1489
- mn,
1490
- me,
1491
- yn
1492
- ), Tn = new kn(fn, wn);
1493
- function An(e) {
1494
- return typeof e == "function" ? !0 : Array.isArray(e) ? e.length === 0 || e.every(Te) : Te(e);
1516
+ const Sn = new Tn(
1517
+ ln,
1518
+ hn,
1519
+ gn,
1520
+ he,
1521
+ kn
1522
+ ), zn = new An(yn, Sn);
1523
+ function tt(e) {
1524
+ return typeof e == "function" ? !0 : Array.isArray(e) ? e.length === 0 || e.every(Se) : Se(e);
1495
1525
  }
1496
- function Te(e) {
1526
+ function Se(e) {
1497
1527
  if (typeof e == "function") return !0;
1498
1528
  if (e === null || typeof e != "object") return !1;
1499
1529
  const t = e;
1500
1530
  return t.type === "ITEMS" && typeof t.itemType == "string";
1501
1531
  }
1502
- const Ae = Object.freeze({}), Sn = Object.freeze({}), Se = /* @__PURE__ */ new WeakMap();
1532
+ function En(e) {
1533
+ if (!e || typeof e != "object" || Array.isArray(e))
1534
+ return;
1535
+ const t = e.form;
1536
+ if (tt(t))
1537
+ throw new Error(
1538
+ "[GolemUI] The gui.* form definition was wrapped in an extra `{ form: ... }` object, so its fields were never resolved. Pass the gui.* array DIRECTLY as formDef (`config={{ formDef: form }}`) and put any named `states` in `formConfig`: `config={{ formDef: form, formConfig: { states } }}`. Do NOT wrap them as a `{ form: [...] }` object."
1539
+ );
1540
+ }
1541
+ const ze = Object.freeze({}), $n = Object.freeze({}), Ee = /* @__PURE__ */ new WeakMap();
1503
1542
  function ie(e, t) {
1504
1543
  return e == null ? t : typeof e == "object" ? e : {};
1505
1544
  }
1506
- function zn(e, t, n) {
1507
- if (!An(e))
1508
- return { formDef: e };
1509
- const r = ie(e, Ae), o = ie(t, Ae), s = ie(n, Sn);
1510
- let i = Se.get(r);
1511
- i || (i = /* @__PURE__ */ new WeakMap(), Se.set(r, i));
1545
+ function On(e, t, n) {
1546
+ if (!tt(e))
1547
+ return En(e), { formDef: e };
1548
+ const r = ie(e, ze), o = ie(t, ze), s = ie(n, $n);
1549
+ let i = Ee.get(r);
1550
+ i || (i = /* @__PURE__ */ new WeakMap(), Ee.set(r, i));
1512
1551
  let a = i.get(o);
1513
1552
  a || (a = /* @__PURE__ */ new WeakMap(), i.set(o, a));
1514
1553
  const u = a.get(s);
1515
1554
  if (u) return u;
1516
- const c = Tn.processDxFacade(
1555
+ const c = zn.processDxFacade(
1517
1556
  e,
1518
1557
  t,
1519
1558
  n
@@ -1540,8 +1579,8 @@ function l(e, t, n) {
1540
1579
  return;
1541
1580
  a._zod.traits.add(e), t(a, u);
1542
1581
  const c = i.prototype, p = Object.keys(c);
1543
- for (let m = 0; m < p.length; m++) {
1544
- const f = p[m];
1582
+ for (let d = 0; d < p.length; d++) {
1583
+ const f = p[d];
1545
1584
  f in a || (a[f] = c[f].bind(a));
1546
1585
  }
1547
1586
  }
@@ -1566,32 +1605,32 @@ class N extends Error {
1566
1605
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
1567
1606
  }
1568
1607
  }
1569
- class Qe extends Error {
1608
+ class nt extends Error {
1570
1609
  constructor(t) {
1571
1610
  super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
1572
1611
  }
1573
1612
  }
1574
- const En = {};
1613
+ const Zn = {};
1575
1614
  function I(e) {
1576
- return En;
1615
+ return Zn;
1577
1616
  }
1578
1617
  function ue(e, t) {
1579
1618
  return typeof t == "bigint" ? t.toString() : t;
1580
1619
  }
1581
- function he(e) {
1620
+ function fe(e) {
1582
1621
  return e == null;
1583
1622
  }
1584
- function fe(e) {
1623
+ function ge(e) {
1585
1624
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
1586
1625
  return e.slice(t, n);
1587
1626
  }
1588
- const ze = /* @__PURE__ */ Symbol("evaluating");
1589
- function b(e, t, n) {
1627
+ const $e = /* @__PURE__ */ Symbol("evaluating");
1628
+ function g(e, t, n) {
1590
1629
  let r;
1591
1630
  Object.defineProperty(e, t, {
1592
1631
  get() {
1593
- if (r !== ze)
1594
- return r === void 0 && (r = ze, r = n()), r;
1632
+ if (r !== $e)
1633
+ return r === void 0 && (r = $e, r = n()), r;
1595
1634
  },
1596
1635
  set(o) {
1597
1636
  Object.defineProperty(e, t, {
@@ -1602,7 +1641,7 @@ function b(e, t, n) {
1602
1641
  configurable: !0
1603
1642
  });
1604
1643
  }
1605
- function $n(...e) {
1644
+ function Pn(...e) {
1606
1645
  const t = {};
1607
1646
  for (const n of e) {
1608
1647
  const r = Object.getOwnPropertyDescriptors(n);
@@ -1610,34 +1649,34 @@ function $n(...e) {
1610
1649
  }
1611
1650
  return Object.defineProperties({}, t);
1612
1651
  }
1613
- function On(e) {
1652
+ function Cn(e) {
1614
1653
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
1615
1654
  }
1616
- const et = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
1655
+ const rt = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
1617
1656
  };
1618
- function Ee(e) {
1657
+ function Oe(e) {
1619
1658
  return typeof e == "object" && e !== null && !Array.isArray(e);
1620
1659
  }
1621
1660
  function ce(e) {
1622
- if (Ee(e) === !1)
1661
+ if (Oe(e) === !1)
1623
1662
  return !1;
1624
1663
  const t = e.constructor;
1625
1664
  if (t === void 0 || typeof t != "function")
1626
1665
  return !0;
1627
1666
  const n = t.prototype;
1628
- return !(Ee(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
1667
+ return !(Oe(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
1629
1668
  }
1630
- function tt(e) {
1669
+ function ot(e) {
1631
1670
  return ce(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
1632
1671
  }
1633
1672
  function be(e) {
1634
1673
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
1635
1674
  }
1636
- function nt(e, t, n) {
1675
+ function st(e, t, n) {
1637
1676
  const r = new e._zod.constr(t ?? e._zod.def);
1638
1677
  return (!t || n?.parent) && (r._zod.parent = e), r;
1639
1678
  }
1640
- function d(e) {
1679
+ function m(e) {
1641
1680
  const t = e;
1642
1681
  if (!t)
1643
1682
  return {};
@@ -1650,7 +1689,7 @@ function d(e) {
1650
1689
  }
1651
1690
  return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
1652
1691
  }
1653
- const Zn = {
1692
+ const In = {
1654
1693
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
1655
1694
  int32: [-2147483648, 2147483647],
1656
1695
  uint32: [0, 4294967295],
@@ -1665,27 +1704,27 @@ function M(e, t = 0) {
1665
1704
  return !0;
1666
1705
  return !1;
1667
1706
  }
1668
- function Pn(e, t) {
1707
+ function Ln(e, t) {
1669
1708
  return t.map((n) => {
1670
1709
  var r;
1671
1710
  return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
1672
1711
  });
1673
1712
  }
1674
- function B(e) {
1713
+ function Y(e) {
1675
1714
  return typeof e == "string" ? e : e?.message;
1676
1715
  }
1677
1716
  function L(e, t, n) {
1678
1717
  const r = { ...e, path: e.path ?? [] };
1679
1718
  if (!e.message) {
1680
- const o = B(e.inst?._zod.def?.error?.(e)) ?? B(t?.error?.(e)) ?? B(n.customError?.(e)) ?? B(n.localeError?.(e)) ?? "Invalid input";
1719
+ const o = Y(e.inst?._zod.def?.error?.(e)) ?? Y(t?.error?.(e)) ?? Y(n.customError?.(e)) ?? Y(n.localeError?.(e)) ?? "Invalid input";
1681
1720
  r.message = o;
1682
1721
  }
1683
1722
  return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
1684
1723
  }
1685
- function ge(e) {
1724
+ function ye(e) {
1686
1725
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
1687
1726
  }
1688
- function W(...e) {
1727
+ function U(...e) {
1689
1728
  const [t, n, r] = e;
1690
1729
  return typeof t == "string" ? {
1691
1730
  message: t,
@@ -1694,7 +1733,7 @@ function W(...e) {
1694
1733
  inst: r
1695
1734
  } : { ...t };
1696
1735
  }
1697
- const rt = (e, t) => {
1736
+ const it = (e, t) => {
1698
1737
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
1699
1738
  value: e._zod,
1700
1739
  enumerable: !1
@@ -1705,14 +1744,14 @@ const rt = (e, t) => {
1705
1744
  value: () => e.message,
1706
1745
  enumerable: !1
1707
1746
  });
1708
- }, ot = l("$ZodError", rt), X = l("$ZodError", rt, { Parent: Error });
1709
- function Cn(e, t = (n) => n.message) {
1747
+ }, at = l("$ZodError", it), H = l("$ZodError", it, { Parent: Error });
1748
+ function Dn(e, t = (n) => n.message) {
1710
1749
  const n = {}, r = [];
1711
1750
  for (const o of e.issues)
1712
1751
  o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
1713
1752
  return { formErrors: r, fieldErrors: n };
1714
1753
  }
1715
- function In(e, t = (n) => n.message) {
1754
+ function Mn(e, t = (n) => n.message) {
1716
1755
  const n = { _errors: [] }, r = (o) => {
1717
1756
  for (const s of o.issues)
1718
1757
  if (s.code === "invalid_union" && s.errors.length)
@@ -1733,77 +1772,77 @@ function In(e, t = (n) => n.message) {
1733
1772
  };
1734
1773
  return r(e), n;
1735
1774
  }
1736
- const H = (e) => (t, n, r, o) => {
1775
+ const J = (e) => (t, n, r, o) => {
1737
1776
  const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, s);
1738
1777
  if (i instanceof Promise)
1739
1778
  throw new N();
1740
1779
  if (i.issues.length) {
1741
1780
  const a = new (o?.Err ?? e)(i.issues.map((u) => L(u, s, I())));
1742
- throw et(a, o?.callee), a;
1781
+ throw rt(a, o?.callee), a;
1743
1782
  }
1744
1783
  return i.value;
1745
- }, Ln = /* @__PURE__ */ H(X), J = (e) => async (t, n, r, o) => {
1784
+ }, Nn = /* @__PURE__ */ J(H), Q = (e) => async (t, n, r, o) => {
1746
1785
  const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
1747
1786
  let i = t._zod.run({ value: n, issues: [] }, s);
1748
1787
  if (i instanceof Promise && (i = await i), i.issues.length) {
1749
1788
  const a = new (o?.Err ?? e)(i.issues.map((u) => L(u, s, I())));
1750
- throw et(a, o?.callee), a;
1789
+ throw rt(a, o?.callee), a;
1751
1790
  }
1752
1791
  return i.value;
1753
- }, Dn = /* @__PURE__ */ J(X), Q = (e) => (t, n, r) => {
1792
+ }, xn = /* @__PURE__ */ Q(H), ee = (e) => (t, n, r) => {
1754
1793
  const o = r ? { ...r, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, o);
1755
1794
  if (s instanceof Promise)
1756
1795
  throw new N();
1757
1796
  return s.issues.length ? {
1758
1797
  success: !1,
1759
- error: new (e ?? ot)(s.issues.map((i) => L(i, o, I())))
1798
+ error: new (e ?? at)(s.issues.map((i) => L(i, o, I())))
1760
1799
  } : { success: !0, data: s.value };
1761
- }, st = /* @__PURE__ */ Q(X), ee = (e) => async (t, n, r) => {
1800
+ }, ut = /* @__PURE__ */ ee(H), te = (e) => async (t, n, r) => {
1762
1801
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
1763
1802
  let s = t._zod.run({ value: n, issues: [] }, o);
1764
1803
  return s instanceof Promise && (s = await s), s.issues.length ? {
1765
1804
  success: !1,
1766
1805
  error: new e(s.issues.map((i) => L(i, o, I())))
1767
1806
  } : { success: !0, data: s.value };
1768
- }, it = /* @__PURE__ */ ee(X), Mn = (e) => (t, n, r) => {
1769
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1770
- return H(e)(t, n, o);
1771
- }, Nn = (e) => (t, n, r) => H(e)(t, n, r), xn = (e) => async (t, n, r) => {
1807
+ }, ct = /* @__PURE__ */ te(H), Rn = (e) => (t, n, r) => {
1772
1808
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1773
1809
  return J(e)(t, n, o);
1774
- }, Rn = (e) => async (t, n, r) => J(e)(t, n, r), Fn = (e) => (t, n, r) => {
1810
+ }, Fn = (e) => (t, n, r) => J(e)(t, n, r), Wn = (e) => async (t, n, r) => {
1775
1811
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1776
1812
  return Q(e)(t, n, o);
1777
- }, Wn = (e) => (t, n, r) => Q(e)(t, n, r), Un = (e) => async (t, n, r) => {
1813
+ }, Un = (e) => async (t, n, r) => Q(e)(t, n, r), jn = (e) => (t, n, r) => {
1778
1814
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1779
1815
  return ee(e)(t, n, o);
1780
- }, jn = (e) => async (t, n, r) => ee(e)(t, n, r), Vn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, $e = (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)$/, Bn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Yn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Gn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, Kn = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, at = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", qn = /* @__PURE__ */ new RegExp(`^${at}$`);
1781
- function ut(e) {
1816
+ }, Vn = (e) => (t, n, r) => ee(e)(t, n, r), Bn = (e) => async (t, n, r) => {
1817
+ const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
1818
+ return te(e)(t, n, o);
1819
+ }, Yn = (e) => async (t, n, r) => te(e)(t, n, r), Gn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Ze = (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)$/, Kn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, qn = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, Xn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, Hn = /^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/, lt = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", Jn = /* @__PURE__ */ new RegExp(`^${lt}$`);
1820
+ function pt(e) {
1782
1821
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
1783
1822
  return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
1784
1823
  }
1785
- function Xn(e) {
1786
- return new RegExp(`^${ut(e)}$`);
1824
+ function Qn(e) {
1825
+ return new RegExp(`^${pt(e)}$`);
1787
1826
  }
1788
- function Hn(e) {
1789
- const t = ut({ precision: e.precision }), n = ["Z"];
1827
+ function er(e) {
1828
+ const t = pt({ precision: e.precision }), n = ["Z"];
1790
1829
  e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
1791
1830
  const r = `${t}(?:${n.join("|")})`;
1792
- return new RegExp(`^${at}T(?:${r})$`);
1831
+ return new RegExp(`^${lt}T(?:${r})$`);
1793
1832
  }
1794
- const Jn = (e) => {
1833
+ const tr = (e) => {
1795
1834
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
1796
1835
  return new RegExp(`^${t}$`);
1797
- }, Qn = /^-?\d+$/, er = /^-?\d+(?:\.\d+)?/, tr = /^(?:true|false)$/i, nr = /^[^A-Z]*$/, rr = /^[^a-z]*$/, S = /* @__PURE__ */ l("$ZodCheck", (e, t) => {
1836
+ }, nr = /^-?\d+$/, rr = /^-?\d+(?:\.\d+)?/, or = /^(?:true|false)$/i, sr = /^[^A-Z]*$/, ir = /^[^a-z]*$/, S = /* @__PURE__ */ l("$ZodCheck", (e, t) => {
1798
1837
  var n;
1799
1838
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
1800
- }), ct = {
1839
+ }), dt = {
1801
1840
  number: "number",
1802
1841
  bigint: "bigint",
1803
1842
  object: "date"
1804
- }, or = /* @__PURE__ */ l("$ZodCheckLessThan", (e, t) => {
1843
+ }, ar = /* @__PURE__ */ l("$ZodCheckLessThan", (e, t) => {
1805
1844
  S.init(e, t);
1806
- const n = ct[typeof t.value];
1845
+ const n = dt[typeof t.value];
1807
1846
  e._zod.onattach.push((r) => {
1808
1847
  const o = r._zod.bag, s = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
1809
1848
  t.value < s && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
@@ -1818,9 +1857,9 @@ const Jn = (e) => {
1818
1857
  continue: !t.abort
1819
1858
  });
1820
1859
  };
1821
- }), sr = /* @__PURE__ */ l("$ZodCheckGreaterThan", (e, t) => {
1860
+ }), ur = /* @__PURE__ */ l("$ZodCheckGreaterThan", (e, t) => {
1822
1861
  S.init(e, t);
1823
- const n = ct[typeof t.value];
1862
+ const n = dt[typeof t.value];
1824
1863
  e._zod.onattach.push((r) => {
1825
1864
  const o = r._zod.bag, s = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
1826
1865
  t.value > s && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
@@ -1835,12 +1874,12 @@ const Jn = (e) => {
1835
1874
  continue: !t.abort
1836
1875
  });
1837
1876
  };
1838
- }), ir = /* @__PURE__ */ l("$ZodCheckNumberFormat", (e, t) => {
1877
+ }), cr = /* @__PURE__ */ l("$ZodCheckNumberFormat", (e, t) => {
1839
1878
  S.init(e, t), t.format = t.format || "float64";
1840
- const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] = Zn[t.format];
1879
+ const n = t.format?.includes("int"), r = n ? "int" : "number", [o, s] = In[t.format];
1841
1880
  e._zod.onattach.push((i) => {
1842
1881
  const a = i._zod.bag;
1843
- a.format = t.format, a.minimum = o, a.maximum = s, n && (a.pattern = Qn);
1882
+ a.format = t.format, a.minimum = o, a.maximum = s, n && (a.pattern = nr);
1844
1883
  }), e._zod.check = (i) => {
1845
1884
  const a = i.value;
1846
1885
  if (n) {
@@ -1892,11 +1931,11 @@ const Jn = (e) => {
1892
1931
  inst: e
1893
1932
  });
1894
1933
  };
1895
- }), ar = /* @__PURE__ */ l("$ZodCheckMaxLength", (e, t) => {
1934
+ }), lr = /* @__PURE__ */ l("$ZodCheckMaxLength", (e, t) => {
1896
1935
  var n;
1897
1936
  S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1898
1937
  const o = r.value;
1899
- return !he(o) && o.length !== void 0;
1938
+ return !fe(o) && o.length !== void 0;
1900
1939
  }), e._zod.onattach.push((r) => {
1901
1940
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1902
1941
  t.maximum < o && (r._zod.bag.maximum = t.maximum);
@@ -1904,7 +1943,7 @@ const Jn = (e) => {
1904
1943
  const o = r.value;
1905
1944
  if (o.length <= t.maximum)
1906
1945
  return;
1907
- const i = ge(o);
1946
+ const i = ye(o);
1908
1947
  r.issues.push({
1909
1948
  origin: i,
1910
1949
  code: "too_big",
@@ -1915,11 +1954,11 @@ const Jn = (e) => {
1915
1954
  continue: !t.abort
1916
1955
  });
1917
1956
  };
1918
- }), ur = /* @__PURE__ */ l("$ZodCheckMinLength", (e, t) => {
1957
+ }), pr = /* @__PURE__ */ l("$ZodCheckMinLength", (e, t) => {
1919
1958
  var n;
1920
1959
  S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1921
1960
  const o = r.value;
1922
- return !he(o) && o.length !== void 0;
1961
+ return !fe(o) && o.length !== void 0;
1923
1962
  }), e._zod.onattach.push((r) => {
1924
1963
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1925
1964
  t.minimum > o && (r._zod.bag.minimum = t.minimum);
@@ -1927,7 +1966,7 @@ const Jn = (e) => {
1927
1966
  const o = r.value;
1928
1967
  if (o.length >= t.minimum)
1929
1968
  return;
1930
- const i = ge(o);
1969
+ const i = ye(o);
1931
1970
  r.issues.push({
1932
1971
  origin: i,
1933
1972
  code: "too_small",
@@ -1938,11 +1977,11 @@ const Jn = (e) => {
1938
1977
  continue: !t.abort
1939
1978
  });
1940
1979
  };
1941
- }), cr = /* @__PURE__ */ l("$ZodCheckLengthEquals", (e, t) => {
1980
+ }), dr = /* @__PURE__ */ l("$ZodCheckLengthEquals", (e, t) => {
1942
1981
  var n;
1943
1982
  S.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1944
1983
  const o = r.value;
1945
- return !he(o) && o.length !== void 0;
1984
+ return !fe(o) && o.length !== void 0;
1946
1985
  }), e._zod.onattach.push((r) => {
1947
1986
  const o = r._zod.bag;
1948
1987
  o.minimum = t.length, o.maximum = t.length, o.length = t.length;
@@ -1950,7 +1989,7 @@ const Jn = (e) => {
1950
1989
  const o = r.value, s = o.length;
1951
1990
  if (s === t.length)
1952
1991
  return;
1953
- const i = ge(o), a = s > t.length;
1992
+ const i = ye(o), a = s > t.length;
1954
1993
  r.issues.push({
1955
1994
  origin: i,
1956
1995
  ...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
@@ -1961,7 +2000,7 @@ const Jn = (e) => {
1961
2000
  continue: !t.abort
1962
2001
  });
1963
2002
  };
1964
- }), te = /* @__PURE__ */ l("$ZodCheckStringFormat", (e, t) => {
2003
+ }), ne = /* @__PURE__ */ l("$ZodCheckStringFormat", (e, t) => {
1965
2004
  var n, r;
1966
2005
  S.init(e, t), e._zod.onattach.push((o) => {
1967
2006
  const s = o._zod.bag;
@@ -1978,8 +2017,8 @@ const Jn = (e) => {
1978
2017
  });
1979
2018
  }) : (r = e._zod).check ?? (r.check = () => {
1980
2019
  });
1981
- }), lr = /* @__PURE__ */ l("$ZodCheckRegex", (e, t) => {
1982
- te.init(e, t), e._zod.check = (n) => {
2020
+ }), mr = /* @__PURE__ */ l("$ZodCheckRegex", (e, t) => {
2021
+ ne.init(e, t), e._zod.check = (n) => {
1983
2022
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
1984
2023
  origin: "string",
1985
2024
  code: "invalid_format",
@@ -1990,11 +2029,11 @@ const Jn = (e) => {
1990
2029
  continue: !t.abort
1991
2030
  });
1992
2031
  };
1993
- }), pr = /* @__PURE__ */ l("$ZodCheckLowerCase", (e, t) => {
1994
- t.pattern ?? (t.pattern = nr), te.init(e, t);
1995
- }), dr = /* @__PURE__ */ l("$ZodCheckUpperCase", (e, t) => {
1996
- t.pattern ?? (t.pattern = rr), te.init(e, t);
1997
- }), mr = /* @__PURE__ */ l("$ZodCheckIncludes", (e, t) => {
2032
+ }), hr = /* @__PURE__ */ l("$ZodCheckLowerCase", (e, t) => {
2033
+ t.pattern ?? (t.pattern = sr), ne.init(e, t);
2034
+ }), fr = /* @__PURE__ */ l("$ZodCheckUpperCase", (e, t) => {
2035
+ t.pattern ?? (t.pattern = ir), ne.init(e, t);
2036
+ }), gr = /* @__PURE__ */ l("$ZodCheckIncludes", (e, t) => {
1998
2037
  S.init(e, t);
1999
2038
  const n = be(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
2000
2039
  t.pattern = r, e._zod.onattach.push((o) => {
@@ -2011,7 +2050,7 @@ const Jn = (e) => {
2011
2050
  continue: !t.abort
2012
2051
  });
2013
2052
  };
2014
- }), hr = /* @__PURE__ */ l("$ZodCheckStartsWith", (e, t) => {
2053
+ }), br = /* @__PURE__ */ l("$ZodCheckStartsWith", (e, t) => {
2015
2054
  S.init(e, t);
2016
2055
  const n = new RegExp(`^${be(t.prefix)}.*`);
2017
2056
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
@@ -2028,7 +2067,7 @@ const Jn = (e) => {
2028
2067
  continue: !t.abort
2029
2068
  });
2030
2069
  };
2031
- }), fr = /* @__PURE__ */ l("$ZodCheckEndsWith", (e, t) => {
2070
+ }), yr = /* @__PURE__ */ l("$ZodCheckEndsWith", (e, t) => {
2032
2071
  S.init(e, t);
2033
2072
  const n = new RegExp(`.*${be(t.suffix)}$`);
2034
2073
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
@@ -2045,17 +2084,17 @@ const Jn = (e) => {
2045
2084
  continue: !t.abort
2046
2085
  });
2047
2086
  };
2048
- }), br = /* @__PURE__ */ l("$ZodCheckOverwrite", (e, t) => {
2087
+ }), _r = /* @__PURE__ */ l("$ZodCheckOverwrite", (e, t) => {
2049
2088
  S.init(e, t), e._zod.check = (n) => {
2050
2089
  n.value = t.tx(n.value);
2051
2090
  };
2052
- }), gr = {
2091
+ }), vr = {
2053
2092
  major: 4,
2054
2093
  minor: 1,
2055
2094
  patch: 13
2056
2095
  }, _ = /* @__PURE__ */ l("$ZodType", (e, t) => {
2057
2096
  var n;
2058
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = gr;
2097
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = vr;
2059
2098
  const r = [...e._zod.def.checks ?? []];
2060
2099
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
2061
2100
  for (const o of r)
@@ -2068,13 +2107,13 @@ const Jn = (e) => {
2068
2107
  else {
2069
2108
  const o = (i, a, u) => {
2070
2109
  let c = M(i), p;
2071
- for (const m of a) {
2072
- if (m._zod.def.when) {
2073
- if (!m._zod.def.when(i))
2110
+ for (const d of a) {
2111
+ if (d._zod.def.when) {
2112
+ if (!d._zod.def.when(i))
2074
2113
  continue;
2075
2114
  } else if (c)
2076
2115
  continue;
2077
- const f = i.issues.length, z = m._zod.check(i);
2116
+ const f = i.issues.length, z = d._zod.check(i);
2078
2117
  if (z instanceof Promise && u?.async === !1)
2079
2118
  throw new N();
2080
2119
  if (p || z instanceof Promise)
@@ -2118,17 +2157,17 @@ const Jn = (e) => {
2118
2157
  e["~standard"] = {
2119
2158
  validate: (o) => {
2120
2159
  try {
2121
- const s = st(e, o);
2160
+ const s = ut(e, o);
2122
2161
  return s.success ? { value: s.data } : { issues: s.error?.issues };
2123
2162
  } catch {
2124
- return it(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
2163
+ return ct(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
2125
2164
  }
2126
2165
  },
2127
2166
  vendor: "zod",
2128
2167
  version: 1
2129
2168
  };
2130
- }), ye = /* @__PURE__ */ l("$ZodString", (e, t) => {
2131
- _.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Jn(e._zod.bag), e._zod.parse = (n, r) => {
2169
+ }), _e = /* @__PURE__ */ l("$ZodString", (e, t) => {
2170
+ _.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? tr(e._zod.bag), e._zod.parse = (n, r) => {
2132
2171
  if (t.coerce)
2133
2172
  try {
2134
2173
  n.value = String(n.value);
@@ -2142,8 +2181,8 @@ const Jn = (e) => {
2142
2181
  }), n;
2143
2182
  };
2144
2183
  }), E = /* @__PURE__ */ l("$ZodStringFormat", (e, t) => {
2145
- te.init(e, t), ye.init(e, t);
2146
- }), yr = /* @__PURE__ */ l("$ZodUUID", (e, t) => {
2184
+ ne.init(e, t), _e.init(e, t);
2185
+ }), kr = /* @__PURE__ */ l("$ZodUUID", (e, t) => {
2147
2186
  if (t.version) {
2148
2187
  const r = {
2149
2188
  v1: 1,
@@ -2157,13 +2196,13 @@ const Jn = (e) => {
2157
2196
  }[t.version];
2158
2197
  if (r === void 0)
2159
2198
  throw new Error(`Invalid UUID version: "${t.version}"`);
2160
- t.pattern ?? (t.pattern = $e(r));
2199
+ t.pattern ?? (t.pattern = Ze(r));
2161
2200
  } else
2162
- t.pattern ?? (t.pattern = $e());
2201
+ t.pattern ?? (t.pattern = Ze());
2163
2202
  E.init(e, t);
2164
- }), _r = /* @__PURE__ */ l("$ZodEmail", (e, t) => {
2165
- t.pattern ?? (t.pattern = Bn), E.init(e, t);
2166
- }), vr = /* @__PURE__ */ l("$ZodURL", (e, t) => {
2203
+ }), wr = /* @__PURE__ */ l("$ZodEmail", (e, t) => {
2204
+ t.pattern ?? (t.pattern = Kn), E.init(e, t);
2205
+ }), Tr = /* @__PURE__ */ l("$ZodURL", (e, t) => {
2167
2206
  E.init(e, t), e._zod.check = (n) => {
2168
2207
  try {
2169
2208
  const r = n.value.trim(), o = new URL(r);
@@ -2195,18 +2234,18 @@ const Jn = (e) => {
2195
2234
  });
2196
2235
  }
2197
2236
  };
2198
- }), kr = /* @__PURE__ */ l("$ZodISODateTime", (e, t) => {
2199
- t.pattern ?? (t.pattern = Hn(t)), E.init(e, t);
2200
- }), wr = /* @__PURE__ */ l("$ZodISODate", (e, t) => {
2201
- t.pattern ?? (t.pattern = qn), E.init(e, t);
2202
- }), Tr = /* @__PURE__ */ l("$ZodISOTime", (e, t) => {
2203
- t.pattern ?? (t.pattern = Xn(t)), E.init(e, t);
2204
- }), Ar = /* @__PURE__ */ l("$ZodISODuration", (e, t) => {
2205
- t.pattern ?? (t.pattern = Vn), E.init(e, t);
2206
- }), Sr = /* @__PURE__ */ l("$ZodIPv4", (e, t) => {
2207
- t.pattern ?? (t.pattern = Yn), E.init(e, t), e._zod.bag.format = "ipv4";
2208
- }), zr = /* @__PURE__ */ l("$ZodIPv6", (e, t) => {
2209
- t.pattern ?? (t.pattern = Gn), E.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
2237
+ }), Ar = /* @__PURE__ */ l("$ZodISODateTime", (e, t) => {
2238
+ t.pattern ?? (t.pattern = er(t)), E.init(e, t);
2239
+ }), Sr = /* @__PURE__ */ l("$ZodISODate", (e, t) => {
2240
+ t.pattern ?? (t.pattern = Jn), E.init(e, t);
2241
+ }), zr = /* @__PURE__ */ l("$ZodISOTime", (e, t) => {
2242
+ t.pattern ?? (t.pattern = Qn(t)), E.init(e, t);
2243
+ }), Er = /* @__PURE__ */ l("$ZodISODuration", (e, t) => {
2244
+ t.pattern ?? (t.pattern = Gn), E.init(e, t);
2245
+ }), $r = /* @__PURE__ */ l("$ZodIPv4", (e, t) => {
2246
+ t.pattern ?? (t.pattern = qn), E.init(e, t), e._zod.bag.format = "ipv4";
2247
+ }), Or = /* @__PURE__ */ l("$ZodIPv6", (e, t) => {
2248
+ t.pattern ?? (t.pattern = Xn), E.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
2210
2249
  try {
2211
2250
  new URL(`http://[${n.value}]`);
2212
2251
  } catch {
@@ -2219,7 +2258,7 @@ const Jn = (e) => {
2219
2258
  });
2220
2259
  }
2221
2260
  };
2222
- }), Er = /* @__PURE__ */ l("$ZodCustomStringFormat", (e, t) => {
2261
+ }), Zr = /* @__PURE__ */ l("$ZodCustomStringFormat", (e, t) => {
2223
2262
  E.init(e, t), e._zod.check = (n) => {
2224
2263
  t.fn(n.value) || n.issues.push({
2225
2264
  code: "invalid_format",
@@ -2229,8 +2268,8 @@ const Jn = (e) => {
2229
2268
  continue: !t.abort
2230
2269
  });
2231
2270
  };
2232
- }), lt = /* @__PURE__ */ l("$ZodNumber", (e, t) => {
2233
- _.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? er, e._zod.parse = (n, r) => {
2271
+ }), mt = /* @__PURE__ */ l("$ZodNumber", (e, t) => {
2272
+ _.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? rr, e._zod.parse = (n, r) => {
2234
2273
  if (t.coerce)
2235
2274
  try {
2236
2275
  n.value = Number(n.value);
@@ -2248,10 +2287,10 @@ const Jn = (e) => {
2248
2287
  ...s ? { received: s } : {}
2249
2288
  }), n;
2250
2289
  };
2251
- }), $r = /* @__PURE__ */ l("$ZodNumberFormat", (e, t) => {
2252
- ir.init(e, t), lt.init(e, t);
2253
- }), Or = /* @__PURE__ */ l("$ZodBoolean", (e, t) => {
2254
- _.init(e, t), e._zod.pattern = tr, e._zod.parse = (n, r) => {
2290
+ }), Pr = /* @__PURE__ */ l("$ZodNumberFormat", (e, t) => {
2291
+ cr.init(e, t), mt.init(e, t);
2292
+ }), Cr = /* @__PURE__ */ l("$ZodBoolean", (e, t) => {
2293
+ _.init(e, t), e._zod.pattern = or, e._zod.parse = (n, r) => {
2255
2294
  if (t.coerce)
2256
2295
  try {
2257
2296
  n.value = !!n.value;
@@ -2265,13 +2304,13 @@ const Jn = (e) => {
2265
2304
  inst: e
2266
2305
  }), n;
2267
2306
  };
2268
- }), Zr = /* @__PURE__ */ l("$ZodAny", (e, t) => {
2307
+ }), Ir = /* @__PURE__ */ l("$ZodAny", (e, t) => {
2269
2308
  _.init(e, t), e._zod.parse = (n) => n;
2270
2309
  });
2271
- function Oe(e, t, n) {
2272
- e.issues.length && t.issues.push(...Pn(n, e.issues)), t.value[n] = e.value;
2310
+ function Pe(e, t, n) {
2311
+ e.issues.length && t.issues.push(...Ln(n, e.issues)), t.value[n] = e.value;
2273
2312
  }
2274
- const pt = /* @__PURE__ */ l("$ZodArray", (e, t) => {
2313
+ const ht = /* @__PURE__ */ l("$ZodArray", (e, t) => {
2275
2314
  _.init(e, t), e._zod.parse = (n, r) => {
2276
2315
  const o = n.value;
2277
2316
  if (!Array.isArray(o))
@@ -2288,12 +2327,12 @@ const pt = /* @__PURE__ */ l("$ZodArray", (e, t) => {
2288
2327
  value: a,
2289
2328
  issues: []
2290
2329
  }, r);
2291
- u instanceof Promise ? s.push(u.then((c) => Oe(c, n, i))) : Oe(u, n, i);
2330
+ u instanceof Promise ? s.push(u.then((c) => Pe(c, n, i))) : Pe(u, n, i);
2292
2331
  }
2293
2332
  return s.length ? Promise.all(s).then(() => n) : n;
2294
2333
  };
2295
2334
  });
2296
- function Ze(e, t, n, r) {
2335
+ function Ce(e, t, n, r) {
2297
2336
  for (const s of e)
2298
2337
  if (s.issues.length === 0)
2299
2338
  return t.value = s.value, t;
@@ -2305,14 +2344,14 @@ function Ze(e, t, n, r) {
2305
2344
  errors: e.map((s) => s.issues.map((i) => L(i, r, I())))
2306
2345
  }), t);
2307
2346
  }
2308
- const Pr = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
2309
- _.init(e, t), b(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), b(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), b(e._zod, "values", () => {
2347
+ const Lr = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
2348
+ _.init(e, t), g(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), g(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), g(e._zod, "values", () => {
2310
2349
  if (t.options.every((o) => o._zod.values))
2311
2350
  return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
2312
- }), b(e._zod, "pattern", () => {
2351
+ }), g(e._zod, "pattern", () => {
2313
2352
  if (t.options.every((o) => o._zod.pattern)) {
2314
2353
  const o = t.options.map((s) => s._zod.pattern);
2315
- return new RegExp(`^(${o.map((s) => fe(s.source)).join("|")})$`);
2354
+ return new RegExp(`^(${o.map((s) => ge(s.source)).join("|")})$`);
2316
2355
  }
2317
2356
  });
2318
2357
  const n = t.options.length === 1, r = t.options[0]._zod.run;
@@ -2334,12 +2373,12 @@ const Pr = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
2334
2373
  a.push(c);
2335
2374
  }
2336
2375
  }
2337
- return i ? Promise.all(a).then((u) => Ze(u, o, e, s)) : Ze(a, o, e, s);
2376
+ return i ? Promise.all(a).then((u) => Ce(u, o, e, s)) : Ce(a, o, e, s);
2338
2377
  };
2339
- }), Cr = /* @__PURE__ */ l("$ZodIntersection", (e, t) => {
2378
+ }), Dr = /* @__PURE__ */ l("$ZodIntersection", (e, t) => {
2340
2379
  _.init(e, t), e._zod.parse = (n, r) => {
2341
2380
  const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
2342
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([u, c]) => Pe(n, u, c)) : Pe(n, s, i);
2381
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([u, c]) => Ie(n, u, c)) : Ie(n, s, i);
2343
2382
  };
2344
2383
  });
2345
2384
  function le(e, t) {
@@ -2377,7 +2416,7 @@ function le(e, t) {
2377
2416
  }
2378
2417
  return { valid: !1, mergeErrorPath: [] };
2379
2418
  }
2380
- function Pe(e, t, n) {
2419
+ function Ie(e, t, n) {
2381
2420
  if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), M(e))
2382
2421
  return e;
2383
2422
  const r = le(t.value, n.value);
@@ -2385,10 +2424,10 @@ function Pe(e, t, n) {
2385
2424
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
2386
2425
  return e.value = r.data, e;
2387
2426
  }
2388
- const Ir = /* @__PURE__ */ l("$ZodTransform", (e, t) => {
2427
+ const Mr = /* @__PURE__ */ l("$ZodTransform", (e, t) => {
2389
2428
  _.init(e, t), e._zod.parse = (n, r) => {
2390
2429
  if (r.direction === "backward")
2391
- throw new Qe(e.constructor.name);
2430
+ throw new nt(e.constructor.name);
2392
2431
  const o = t.transform(n.value, n);
2393
2432
  if (r.async)
2394
2433
  return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (n.value = i, n));
@@ -2397,50 +2436,50 @@ const Ir = /* @__PURE__ */ l("$ZodTransform", (e, t) => {
2397
2436
  return n.value = o, n;
2398
2437
  };
2399
2438
  });
2400
- function Ce(e, t) {
2439
+ function Le(e, t) {
2401
2440
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
2402
2441
  }
2403
- const dt = /* @__PURE__ */ l("$ZodOptional", (e, t) => {
2404
- _.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", b(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), b(e._zod, "pattern", () => {
2442
+ const ft = /* @__PURE__ */ l("$ZodOptional", (e, t) => {
2443
+ _.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), g(e._zod, "pattern", () => {
2405
2444
  const n = t.innerType._zod.pattern;
2406
- return n ? new RegExp(`^(${fe(n.source)})?$`) : void 0;
2445
+ return n ? new RegExp(`^(${ge(n.source)})?$`) : void 0;
2407
2446
  }), e._zod.parse = (n, r) => {
2408
2447
  if (t.innerType._zod.optin === "optional") {
2409
2448
  const o = t.innerType._zod.run(n, r);
2410
- return o instanceof Promise ? o.then((s) => Ce(s, n.value)) : Ce(o, n.value);
2449
+ return o instanceof Promise ? o.then((s) => Le(s, n.value)) : Le(o, n.value);
2411
2450
  }
2412
2451
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
2413
2452
  };
2414
- }), Lr = /* @__PURE__ */ l("$ZodNullable", (e, t) => {
2415
- _.init(e, t), b(e._zod, "optin", () => t.innerType._zod.optin), b(e._zod, "optout", () => t.innerType._zod.optout), b(e._zod, "pattern", () => {
2453
+ }), Nr = /* @__PURE__ */ l("$ZodNullable", (e, t) => {
2454
+ _.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "pattern", () => {
2416
2455
  const n = t.innerType._zod.pattern;
2417
- return n ? new RegExp(`^(${fe(n.source)}|null)$`) : void 0;
2418
- }), b(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
2419
- }), Dr = /* @__PURE__ */ l("$ZodDefault", (e, t) => {
2420
- _.init(e, t), e._zod.optin = "optional", b(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2456
+ return n ? new RegExp(`^(${ge(n.source)}|null)$`) : void 0;
2457
+ }), g(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (n, r) => n.value === null ? n : t.innerType._zod.run(n, r);
2458
+ }), xr = /* @__PURE__ */ l("$ZodDefault", (e, t) => {
2459
+ _.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2421
2460
  if (r.direction === "backward")
2422
2461
  return t.innerType._zod.run(n, r);
2423
2462
  if (n.value === void 0)
2424
2463
  return n.value = t.defaultValue, n;
2425
2464
  const o = t.innerType._zod.run(n, r);
2426
- return o instanceof Promise ? o.then((s) => Ie(s, t)) : Ie(o, t);
2465
+ return o instanceof Promise ? o.then((s) => De(s, t)) : De(o, t);
2427
2466
  };
2428
2467
  });
2429
- function Ie(e, t) {
2468
+ function De(e, t) {
2430
2469
  return e.value === void 0 && (e.value = t.defaultValue), e;
2431
2470
  }
2432
- const Mr = /* @__PURE__ */ l("$ZodPrefault", (e, t) => {
2433
- _.init(e, t), e._zod.optin = "optional", b(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
2434
- }), Nr = /* @__PURE__ */ l("$ZodNonOptional", (e, t) => {
2435
- _.init(e, t), b(e._zod, "values", () => {
2471
+ const Rr = /* @__PURE__ */ l("$ZodPrefault", (e, t) => {
2472
+ _.init(e, t), e._zod.optin = "optional", g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (r.direction === "backward" || n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
2473
+ }), Fr = /* @__PURE__ */ l("$ZodNonOptional", (e, t) => {
2474
+ _.init(e, t), g(e._zod, "values", () => {
2436
2475
  const n = t.innerType._zod.values;
2437
2476
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
2438
2477
  }), e._zod.parse = (n, r) => {
2439
2478
  const o = t.innerType._zod.run(n, r);
2440
- return o instanceof Promise ? o.then((s) => Le(s, e)) : Le(o, e);
2479
+ return o instanceof Promise ? o.then((s) => Me(s, e)) : Me(o, e);
2441
2480
  };
2442
2481
  });
2443
- function Le(e, t) {
2482
+ function Me(e, t) {
2444
2483
  return !e.issues.length && e.value === void 0 && e.issues.push({
2445
2484
  code: "invalid_type",
2446
2485
  expected: "nonoptional",
@@ -2448,8 +2487,8 @@ function Le(e, t) {
2448
2487
  inst: t
2449
2488
  }), e;
2450
2489
  }
2451
- const xr = /* @__PURE__ */ l("$ZodCatch", (e, t) => {
2452
- _.init(e, t), b(e._zod, "optin", () => t.innerType._zod.optin), b(e._zod, "optout", () => t.innerType._zod.optout), b(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2490
+ const Wr = /* @__PURE__ */ l("$ZodCatch", (e, t) => {
2491
+ _.init(e, t), g(e._zod, "optin", () => t.innerType._zod.optin), g(e._zod, "optout", () => t.innerType._zod.optout), g(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
2453
2492
  if (r.direction === "backward")
2454
2493
  return t.innerType._zod.run(n, r);
2455
2494
  const o = t.innerType._zod.run(n, r);
@@ -2467,39 +2506,39 @@ const xr = /* @__PURE__ */ l("$ZodCatch", (e, t) => {
2467
2506
  input: n.value
2468
2507
  }), n.issues = []), n);
2469
2508
  };
2470
- }), Rr = /* @__PURE__ */ l("$ZodPipe", (e, t) => {
2471
- _.init(e, t), b(e._zod, "values", () => t.in._zod.values), b(e._zod, "optin", () => t.in._zod.optin), b(e._zod, "optout", () => t.out._zod.optout), b(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
2509
+ }), Ur = /* @__PURE__ */ l("$ZodPipe", (e, t) => {
2510
+ _.init(e, t), g(e._zod, "values", () => t.in._zod.values), g(e._zod, "optin", () => t.in._zod.optin), g(e._zod, "optout", () => t.out._zod.optout), g(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
2472
2511
  if (r.direction === "backward") {
2473
2512
  const s = t.out._zod.run(n, r);
2474
- return s instanceof Promise ? s.then((i) => Y(i, t.in, r)) : Y(s, t.in, r);
2513
+ return s instanceof Promise ? s.then((i) => G(i, t.in, r)) : G(s, t.in, r);
2475
2514
  }
2476
2515
  const o = t.in._zod.run(n, r);
2477
- return o instanceof Promise ? o.then((s) => Y(s, t.out, r)) : Y(o, t.out, r);
2516
+ return o instanceof Promise ? o.then((s) => G(s, t.out, r)) : G(o, t.out, r);
2478
2517
  };
2479
2518
  });
2480
- function Y(e, t, n) {
2519
+ function G(e, t, n) {
2481
2520
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
2482
2521
  }
2483
- const Fr = /* @__PURE__ */ l("$ZodReadonly", (e, t) => {
2484
- _.init(e, t), b(e._zod, "propValues", () => t.innerType._zod.propValues), b(e._zod, "values", () => t.innerType._zod.values), b(e._zod, "optin", () => t.innerType?._zod?.optin), b(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
2522
+ const jr = /* @__PURE__ */ l("$ZodReadonly", (e, t) => {
2523
+ _.init(e, t), g(e._zod, "propValues", () => t.innerType._zod.propValues), g(e._zod, "values", () => t.innerType._zod.values), g(e._zod, "optin", () => t.innerType?._zod?.optin), g(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
2485
2524
  if (r.direction === "backward")
2486
2525
  return t.innerType._zod.run(n, r);
2487
2526
  const o = t.innerType._zod.run(n, r);
2488
- return o instanceof Promise ? o.then(De) : De(o);
2527
+ return o instanceof Promise ? o.then(Ne) : Ne(o);
2489
2528
  };
2490
2529
  });
2491
- function De(e) {
2530
+ function Ne(e) {
2492
2531
  return e.value = Object.freeze(e.value), e;
2493
2532
  }
2494
- const mt = /* @__PURE__ */ l("$ZodCustom", (e, t) => {
2533
+ const gt = /* @__PURE__ */ l("$ZodCustom", (e, t) => {
2495
2534
  S.init(e, t), _.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
2496
2535
  const r = n.value, o = t.fn(r);
2497
2536
  if (o instanceof Promise)
2498
- return o.then((s) => Me(s, n, r, e));
2499
- Me(o, n, r, e);
2537
+ return o.then((s) => xe(s, n, r, e));
2538
+ xe(o, n, r, e);
2500
2539
  };
2501
2540
  });
2502
- function Me(e, t, n, r) {
2541
+ function xe(e, t, n, r) {
2503
2542
  if (!e) {
2504
2543
  const o = {
2505
2544
  code: "custom",
@@ -2511,11 +2550,11 @@ function Me(e, t, n, r) {
2511
2550
  continue: !r._zod.def.abort
2512
2551
  // params: inst._zod.def.params,
2513
2552
  };
2514
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(W(o));
2553
+ r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(U(o));
2515
2554
  }
2516
2555
  }
2517
- var Ne;
2518
- class Wr {
2556
+ var Re;
2557
+ class Vr {
2519
2558
  constructor() {
2520
2559
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
2521
2560
  }
@@ -2549,63 +2588,63 @@ class Wr {
2549
2588
  return this._map.has(t);
2550
2589
  }
2551
2590
  }
2552
- function Ur() {
2553
- return new Wr();
2591
+ function Br() {
2592
+ return new Vr();
2554
2593
  }
2555
- (Ne = globalThis).__zod_globalRegistry ?? (Ne.__zod_globalRegistry = Ur());
2556
- const G = globalThis.__zod_globalRegistry;
2557
- function jr(e, t) {
2594
+ (Re = globalThis).__zod_globalRegistry ?? (Re.__zod_globalRegistry = Br());
2595
+ const K = globalThis.__zod_globalRegistry;
2596
+ function Yr(e, t) {
2558
2597
  return new e({
2559
2598
  type: "string",
2560
- ...d(t)
2599
+ ...m(t)
2561
2600
  });
2562
2601
  }
2563
- function Vr(e, t) {
2602
+ function Gr(e, t) {
2564
2603
  return new e({
2565
2604
  type: "string",
2566
2605
  format: "email",
2567
2606
  check: "string_format",
2568
2607
  abort: !1,
2569
- ...d(t)
2608
+ ...m(t)
2570
2609
  });
2571
2610
  }
2572
- function Br(e, t) {
2611
+ function Kr(e, t) {
2573
2612
  return new e({
2574
2613
  type: "string",
2575
2614
  format: "uuid",
2576
2615
  check: "string_format",
2577
2616
  abort: !1,
2578
- ...d(t)
2617
+ ...m(t)
2579
2618
  });
2580
2619
  }
2581
- function Yr(e, t) {
2620
+ function qr(e, t) {
2582
2621
  return new e({
2583
2622
  type: "string",
2584
2623
  format: "url",
2585
2624
  check: "string_format",
2586
2625
  abort: !1,
2587
- ...d(t)
2626
+ ...m(t)
2588
2627
  });
2589
2628
  }
2590
- function Gr(e, t) {
2629
+ function Xr(e, t) {
2591
2630
  return new e({
2592
2631
  type: "string",
2593
2632
  format: "ipv4",
2594
2633
  check: "string_format",
2595
2634
  abort: !1,
2596
- ...d(t)
2635
+ ...m(t)
2597
2636
  });
2598
2637
  }
2599
- function Kr(e, t) {
2638
+ function Hr(e, t) {
2600
2639
  return new e({
2601
2640
  type: "string",
2602
2641
  format: "ipv6",
2603
2642
  check: "string_format",
2604
2643
  abort: !1,
2605
- ...d(t)
2644
+ ...m(t)
2606
2645
  });
2607
2646
  }
2608
- function qr(e, t) {
2647
+ function Jr(e, t) {
2609
2648
  return new e({
2610
2649
  type: "string",
2611
2650
  format: "datetime",
@@ -2613,204 +2652,204 @@ function qr(e, t) {
2613
2652
  offset: !1,
2614
2653
  local: !1,
2615
2654
  precision: null,
2616
- ...d(t)
2655
+ ...m(t)
2617
2656
  });
2618
2657
  }
2619
- function Xr(e, t) {
2658
+ function Qr(e, t) {
2620
2659
  return new e({
2621
2660
  type: "string",
2622
2661
  format: "date",
2623
2662
  check: "string_format",
2624
- ...d(t)
2663
+ ...m(t)
2625
2664
  });
2626
2665
  }
2627
- function Hr(e, t) {
2666
+ function eo(e, t) {
2628
2667
  return new e({
2629
2668
  type: "string",
2630
2669
  format: "time",
2631
2670
  check: "string_format",
2632
2671
  precision: null,
2633
- ...d(t)
2672
+ ...m(t)
2634
2673
  });
2635
2674
  }
2636
- function Jr(e, t) {
2675
+ function to(e, t) {
2637
2676
  return new e({
2638
2677
  type: "string",
2639
2678
  format: "duration",
2640
2679
  check: "string_format",
2641
- ...d(t)
2680
+ ...m(t)
2642
2681
  });
2643
2682
  }
2644
- function Qr(e, t) {
2683
+ function no(e, t) {
2645
2684
  return new e({
2646
2685
  type: "number",
2647
2686
  checks: [],
2648
- ...d(t)
2687
+ ...m(t)
2649
2688
  });
2650
2689
  }
2651
- function eo(e, t) {
2690
+ function ro(e, t) {
2652
2691
  return new e({
2653
2692
  type: "number",
2654
2693
  check: "number_format",
2655
2694
  abort: !1,
2656
2695
  format: "safeint",
2657
- ...d(t)
2696
+ ...m(t)
2658
2697
  });
2659
2698
  }
2660
- function to(e, t) {
2699
+ function oo(e, t) {
2661
2700
  return new e({
2662
2701
  type: "boolean",
2663
- ...d(t)
2702
+ ...m(t)
2664
2703
  });
2665
2704
  }
2666
- function no(e) {
2705
+ function so(e) {
2667
2706
  return new e({
2668
2707
  type: "any"
2669
2708
  });
2670
2709
  }
2671
- function ro(e, t) {
2672
- return new or({
2710
+ function io(e, t) {
2711
+ return new ar({
2673
2712
  check: "less_than",
2674
- ...d(t),
2713
+ ...m(t),
2675
2714
  value: e,
2676
2715
  inclusive: !0
2677
2716
  });
2678
2717
  }
2679
- function oo(e, t) {
2680
- return new sr({
2718
+ function ao(e, t) {
2719
+ return new ur({
2681
2720
  check: "greater_than",
2682
- ...d(t),
2721
+ ...m(t),
2683
2722
  value: e,
2684
2723
  inclusive: !0
2685
2724
  });
2686
2725
  }
2687
- function ne(e, t) {
2688
- return new ar({
2726
+ function re(e, t) {
2727
+ return new lr({
2689
2728
  check: "max_length",
2690
- ...d(t),
2729
+ ...m(t),
2691
2730
  maximum: e
2692
2731
  });
2693
2732
  }
2694
2733
  function x(e, t) {
2695
- return new ur({
2734
+ return new pr({
2696
2735
  check: "min_length",
2697
- ...d(t),
2736
+ ...m(t),
2698
2737
  minimum: e
2699
2738
  });
2700
2739
  }
2701
- function ht(e, t) {
2702
- return new cr({
2740
+ function bt(e, t) {
2741
+ return new dr({
2703
2742
  check: "length_equals",
2704
- ...d(t),
2743
+ ...m(t),
2705
2744
  length: e
2706
2745
  });
2707
2746
  }
2708
- function ft(e, t) {
2709
- return new lr({
2747
+ function yt(e, t) {
2748
+ return new mr({
2710
2749
  check: "string_format",
2711
2750
  format: "regex",
2712
- ...d(t),
2751
+ ...m(t),
2713
2752
  pattern: e
2714
2753
  });
2715
2754
  }
2716
- function so(e) {
2717
- return new pr({
2755
+ function uo(e) {
2756
+ return new hr({
2718
2757
  check: "string_format",
2719
2758
  format: "lowercase",
2720
- ...d(e)
2759
+ ...m(e)
2721
2760
  });
2722
2761
  }
2723
- function io(e) {
2724
- return new dr({
2762
+ function co(e) {
2763
+ return new fr({
2725
2764
  check: "string_format",
2726
2765
  format: "uppercase",
2727
- ...d(e)
2766
+ ...m(e)
2728
2767
  });
2729
2768
  }
2730
- function ao(e, t) {
2731
- return new mr({
2769
+ function lo(e, t) {
2770
+ return new gr({
2732
2771
  check: "string_format",
2733
2772
  format: "includes",
2734
- ...d(t),
2773
+ ...m(t),
2735
2774
  includes: e
2736
2775
  });
2737
2776
  }
2738
- function uo(e, t) {
2739
- return new hr({
2777
+ function po(e, t) {
2778
+ return new br({
2740
2779
  check: "string_format",
2741
2780
  format: "starts_with",
2742
- ...d(t),
2781
+ ...m(t),
2743
2782
  prefix: e
2744
2783
  });
2745
2784
  }
2746
- function co(e, t) {
2747
- return new fr({
2785
+ function mo(e, t) {
2786
+ return new yr({
2748
2787
  check: "string_format",
2749
2788
  format: "ends_with",
2750
- ...d(t),
2789
+ ...m(t),
2751
2790
  suffix: e
2752
2791
  });
2753
2792
  }
2754
- function R(e) {
2755
- return new br({
2793
+ function F(e) {
2794
+ return new _r({
2756
2795
  check: "overwrite",
2757
2796
  tx: e
2758
2797
  });
2759
2798
  }
2760
- function lo(e) {
2761
- return R((t) => t.normalize(e));
2799
+ function ho(e) {
2800
+ return F((t) => t.normalize(e));
2762
2801
  }
2763
- function po() {
2764
- return R((e) => e.trim());
2802
+ function fo() {
2803
+ return F((e) => e.trim());
2765
2804
  }
2766
- function mo() {
2767
- return R((e) => e.toLowerCase());
2805
+ function go() {
2806
+ return F((e) => e.toLowerCase());
2768
2807
  }
2769
- function ho() {
2770
- return R((e) => e.toUpperCase());
2808
+ function bo() {
2809
+ return F((e) => e.toUpperCase());
2771
2810
  }
2772
- function fo() {
2773
- return R((e) => On(e));
2811
+ function yo() {
2812
+ return F((e) => Cn(e));
2774
2813
  }
2775
- function bo(e, t, n) {
2814
+ function _o(e, t, n) {
2776
2815
  return new e({
2777
2816
  type: "array",
2778
2817
  element: t,
2779
2818
  // get element() {
2780
2819
  // return element;
2781
2820
  // },
2782
- ...d(n)
2821
+ ...m(n)
2783
2822
  });
2784
2823
  }
2785
- function bt(e, t, n) {
2824
+ function _t(e, t, n) {
2786
2825
  return new e({
2787
2826
  type: "custom",
2788
2827
  check: "custom",
2789
2828
  fn: t,
2790
- ...d(n)
2829
+ ...m(n)
2791
2830
  });
2792
2831
  }
2793
- function gt(e) {
2794
- const t = go((n) => (n.addIssue = (r) => {
2832
+ function vt(e) {
2833
+ const t = vo((n) => (n.addIssue = (r) => {
2795
2834
  if (typeof r == "string")
2796
- n.issues.push(W(r, n.value, t._zod.def));
2835
+ n.issues.push(U(r, n.value, t._zod.def));
2797
2836
  else {
2798
2837
  const o = r;
2799
- o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(W(o));
2838
+ o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(U(o));
2800
2839
  }
2801
2840
  }, e(n.value, n)));
2802
2841
  return t;
2803
2842
  }
2804
- function go(e, t) {
2843
+ function vo(e, t) {
2805
2844
  const n = new S({
2806
2845
  check: "custom",
2807
- ...d(t)
2846
+ ...m(t)
2808
2847
  });
2809
2848
  return n._zod.check = e, n;
2810
2849
  }
2811
- function yo(e, t, n, r = {}) {
2812
- const o = d(r), s = {
2813
- ...d(r),
2850
+ function ko(e, t, n, r = {}) {
2851
+ const o = m(r), s = {
2852
+ ...m(r),
2814
2853
  check: "string_format",
2815
2854
  type: "string",
2816
2855
  format: t,
@@ -2819,38 +2858,38 @@ function yo(e, t, n, r = {}) {
2819
2858
  };
2820
2859
  return n instanceof RegExp && (s.pattern = n), new e(s);
2821
2860
  }
2822
- const _o = /* @__PURE__ */ l("ZodISODateTime", (e, t) => {
2823
- kr.init(e, t), re.init(e, t);
2861
+ const wo = /* @__PURE__ */ l("ZodISODateTime", (e, t) => {
2862
+ Ar.init(e, t), oe.init(e, t);
2824
2863
  });
2825
- function vo(e) {
2826
- return qr(_o, e);
2864
+ function To(e) {
2865
+ return Jr(wo, e);
2827
2866
  }
2828
- const ko = /* @__PURE__ */ l("ZodISODate", (e, t) => {
2829
- wr.init(e, t), re.init(e, t);
2867
+ const Ao = /* @__PURE__ */ l("ZodISODate", (e, t) => {
2868
+ Sr.init(e, t), oe.init(e, t);
2830
2869
  });
2831
- function wo(e) {
2832
- return Xr(ko, e);
2870
+ function So(e) {
2871
+ return Qr(Ao, e);
2833
2872
  }
2834
- const To = /* @__PURE__ */ l("ZodISOTime", (e, t) => {
2835
- Tr.init(e, t), re.init(e, t);
2873
+ const zo = /* @__PURE__ */ l("ZodISOTime", (e, t) => {
2874
+ zr.init(e, t), oe.init(e, t);
2836
2875
  });
2837
- function Ao(e) {
2838
- return Hr(To, e);
2876
+ function Eo(e) {
2877
+ return eo(zo, e);
2839
2878
  }
2840
- const So = /* @__PURE__ */ l("ZodISODuration", (e, t) => {
2841
- Ar.init(e, t), re.init(e, t);
2879
+ const $o = /* @__PURE__ */ l("ZodISODuration", (e, t) => {
2880
+ Er.init(e, t), oe.init(e, t);
2842
2881
  });
2843
- function zo(e) {
2844
- return Jr(So, e);
2882
+ function Oo(e) {
2883
+ return to($o, e);
2845
2884
  }
2846
- const Eo = (e, t) => {
2847
- ot.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2885
+ const Zo = (e, t) => {
2886
+ at.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2848
2887
  format: {
2849
- value: (n) => In(e, n)
2888
+ value: (n) => Mn(e, n)
2850
2889
  // enumerable: false,
2851
2890
  },
2852
2891
  flatten: {
2853
- value: (n) => Cn(e, n)
2892
+ value: (n) => Dn(e, n)
2854
2893
  // enumerable: false,
2855
2894
  },
2856
2895
  addIssue: {
@@ -2872,175 +2911,175 @@ const Eo = (e, t) => {
2872
2911
  // enumerable: false,
2873
2912
  }
2874
2913
  });
2875
- }, $ = l("ZodError", Eo, {
2914
+ }, $ = l("ZodError", Zo, {
2876
2915
  Parent: Error
2877
- }), $o = /* @__PURE__ */ H($), Oo = /* @__PURE__ */ J($), Zo = /* @__PURE__ */ Q($), Po = /* @__PURE__ */ ee($), Co = /* @__PURE__ */ Mn($), Io = /* @__PURE__ */ Nn($), Lo = /* @__PURE__ */ xn($), Do = /* @__PURE__ */ Rn($), Mo = /* @__PURE__ */ Fn($), No = /* @__PURE__ */ Wn($), xo = /* @__PURE__ */ Un($), Ro = /* @__PURE__ */ jn($), A = /* @__PURE__ */ l("ZodType", (e, t) => (_.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone($n(t, {
2916
+ }), Po = /* @__PURE__ */ J($), Co = /* @__PURE__ */ Q($), Io = /* @__PURE__ */ ee($), Lo = /* @__PURE__ */ te($), Do = /* @__PURE__ */ Rn($), Mo = /* @__PURE__ */ Fn($), No = /* @__PURE__ */ Wn($), xo = /* @__PURE__ */ Un($), Ro = /* @__PURE__ */ jn($), Fo = /* @__PURE__ */ Vn($), Wo = /* @__PURE__ */ Bn($), Uo = /* @__PURE__ */ Yn($), A = /* @__PURE__ */ l("ZodType", (e, t) => (_.init(e, t), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(Pn(t, {
2878
2917
  checks: [
2879
2918
  ...t.checks ?? [],
2880
2919
  ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
2881
2920
  ]
2882
- })), e.clone = (n, r) => nt(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => $o(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Zo(e, n, r), e.parseAsync = async (n, r) => Oo(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Po(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Co(e, n, r), e.decode = (n, r) => Io(e, n, r), e.encodeAsync = async (n, r) => Lo(e, n, r), e.decodeAsync = async (n, r) => Do(e, n, r), e.safeEncode = (n, r) => Mo(e, n, r), e.safeDecode = (n, r) => No(e, n, r), e.safeEncodeAsync = async (n, r) => xo(e, n, r), e.safeDecodeAsync = async (n, r) => Ro(e, n, r), e.refine = (n, r) => e.check(cs(n, r)), e.superRefine = (n) => e.check(ls(n)), e.overwrite = (n) => e.check(R(n)), e.optional = () => xe(e), e.nullable = () => Re(e), e.nullish = () => xe(Re(e)), e.nonoptional = (n) => ns(e, n), e.array = () => Uo(e), e.or = (n) => Vo([e, n]), e.and = (n) => Yo(e, n), e.transform = (n) => Fe(e, Ko(n)), e.default = (n) => Jo(e, n), e.prefault = (n) => es(e, n), e.catch = (n) => os(e, n), e.pipe = (n) => Fe(e, n), e.readonly = () => as(e), e.describe = (n) => {
2921
+ })), e.clone = (n, r) => st(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Po(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Io(e, n, r), e.parseAsync = async (n, r) => Co(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Lo(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Do(e, n, r), e.decode = (n, r) => Mo(e, n, r), e.encodeAsync = async (n, r) => No(e, n, r), e.decodeAsync = async (n, r) => xo(e, n, r), e.safeEncode = (n, r) => Ro(e, n, r), e.safeDecode = (n, r) => Fo(e, n, r), e.safeEncodeAsync = async (n, r) => Wo(e, n, r), e.safeDecodeAsync = async (n, r) => Uo(e, n, r), e.refine = (n, r) => e.check(ds(n, r)), e.superRefine = (n) => e.check(ms(n)), e.overwrite = (n) => e.check(F(n)), e.optional = () => Fe(e), e.nullable = () => We(e), e.nullish = () => Fe(We(e)), e.nonoptional = (n) => ss(e, n), e.array = () => Bo(e), e.or = (n) => Go([e, n]), e.and = (n) => qo(e, n), e.transform = (n) => Ue(e, Ho(n)), e.default = (n) => ts(e, n), e.prefault = (n) => rs(e, n), e.catch = (n) => as(e, n), e.pipe = (n) => Ue(e, n), e.readonly = () => ls(e), e.describe = (n) => {
2883
2922
  const r = e.clone();
2884
- return G.add(r, { description: n }), r;
2923
+ return K.add(r, { description: n }), r;
2885
2924
  }, Object.defineProperty(e, "description", {
2886
2925
  get() {
2887
- return G.get(e)?.description;
2926
+ return K.get(e)?.description;
2888
2927
  },
2889
2928
  configurable: !0
2890
2929
  }), e.meta = (...n) => {
2891
2930
  if (n.length === 0)
2892
- return G.get(e);
2931
+ return K.get(e);
2893
2932
  const r = e.clone();
2894
- return G.add(r, n[0]), r;
2895
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Fo = /* @__PURE__ */ l("_ZodString", (e, t) => {
2896
- ye.init(e, t), A.init(e, t);
2933
+ return K.add(r, n[0]), r;
2934
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), jo = /* @__PURE__ */ l("_ZodString", (e, t) => {
2935
+ _e.init(e, t), A.init(e, t);
2897
2936
  const n = e._zod.bag;
2898
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(ft(...r)), e.includes = (...r) => e.check(ao(...r)), e.startsWith = (...r) => e.check(uo(...r)), e.endsWith = (...r) => e.check(co(...r)), e.min = (...r) => e.check(x(...r)), e.max = (...r) => e.check(ne(...r)), e.length = (...r) => e.check(ht(...r)), e.nonempty = (...r) => e.check(x(1, ...r)), e.lowercase = (r) => e.check(so(r)), e.uppercase = (r) => e.check(io(r)), e.trim = () => e.check(po()), e.normalize = (...r) => e.check(lo(...r)), e.toLowerCase = () => e.check(mo()), e.toUpperCase = () => e.check(ho()), e.slugify = () => e.check(fo());
2899
- }), re = /* @__PURE__ */ l("ZodStringFormat", (e, t) => {
2900
- E.init(e, t), Fo.init(e, t);
2901
- }), Wo = /* @__PURE__ */ l("ZodArray", (e, t) => {
2902
- pt.init(e, t), A.init(e, t), e.element = t.element, e.min = (n, r) => e.check(x(n, r)), e.nonempty = (n) => e.check(x(1, n)), e.max = (n, r) => e.check(ne(n, r)), e.length = (n, r) => e.check(ht(n, r)), e.unwrap = () => e.element;
2937
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(yt(...r)), e.includes = (...r) => e.check(lo(...r)), e.startsWith = (...r) => e.check(po(...r)), e.endsWith = (...r) => e.check(mo(...r)), e.min = (...r) => e.check(x(...r)), e.max = (...r) => e.check(re(...r)), e.length = (...r) => e.check(bt(...r)), e.nonempty = (...r) => e.check(x(1, ...r)), e.lowercase = (r) => e.check(uo(r)), e.uppercase = (r) => e.check(co(r)), e.trim = () => e.check(fo()), e.normalize = (...r) => e.check(ho(...r)), e.toLowerCase = () => e.check(go()), e.toUpperCase = () => e.check(bo()), e.slugify = () => e.check(yo());
2938
+ }), oe = /* @__PURE__ */ l("ZodStringFormat", (e, t) => {
2939
+ E.init(e, t), jo.init(e, t);
2940
+ }), Vo = /* @__PURE__ */ l("ZodArray", (e, t) => {
2941
+ ht.init(e, t), A.init(e, t), e.element = t.element, e.min = (n, r) => e.check(x(n, r)), e.nonempty = (n) => e.check(x(1, n)), e.max = (n, r) => e.check(re(n, r)), e.length = (n, r) => e.check(bt(n, r)), e.unwrap = () => e.element;
2903
2942
  });
2904
- function Uo(e, t) {
2905
- return bo(Wo, e, t);
2943
+ function Bo(e, t) {
2944
+ return _o(Vo, e, t);
2906
2945
  }
2907
- const jo = /* @__PURE__ */ l("ZodUnion", (e, t) => {
2908
- Pr.init(e, t), A.init(e, t), e.options = t.options;
2946
+ const Yo = /* @__PURE__ */ l("ZodUnion", (e, t) => {
2947
+ Lr.init(e, t), A.init(e, t), e.options = t.options;
2909
2948
  });
2910
- function Vo(e, t) {
2911
- return new jo({
2949
+ function Go(e, t) {
2950
+ return new Yo({
2912
2951
  type: "union",
2913
2952
  options: e,
2914
- ...d(t)
2953
+ ...m(t)
2915
2954
  });
2916
2955
  }
2917
- const Bo = /* @__PURE__ */ l("ZodIntersection", (e, t) => {
2918
- Cr.init(e, t), A.init(e, t);
2956
+ const Ko = /* @__PURE__ */ l("ZodIntersection", (e, t) => {
2957
+ Dr.init(e, t), A.init(e, t);
2919
2958
  });
2920
- function Yo(e, t) {
2921
- return new Bo({
2959
+ function qo(e, t) {
2960
+ return new Ko({
2922
2961
  type: "intersection",
2923
2962
  left: e,
2924
2963
  right: t
2925
2964
  });
2926
2965
  }
2927
- const Go = /* @__PURE__ */ l("ZodTransform", (e, t) => {
2928
- Ir.init(e, t), A.init(e, t), e._zod.parse = (n, r) => {
2966
+ const Xo = /* @__PURE__ */ l("ZodTransform", (e, t) => {
2967
+ Mr.init(e, t), A.init(e, t), e._zod.parse = (n, r) => {
2929
2968
  if (r.direction === "backward")
2930
- throw new Qe(e.constructor.name);
2969
+ throw new nt(e.constructor.name);
2931
2970
  n.addIssue = (s) => {
2932
2971
  if (typeof s == "string")
2933
- n.issues.push(W(s, n.value, t));
2972
+ n.issues.push(U(s, n.value, t));
2934
2973
  else {
2935
2974
  const i = s;
2936
- i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(W(i));
2975
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(U(i));
2937
2976
  }
2938
2977
  };
2939
2978
  const o = t.transform(n.value, n);
2940
2979
  return o instanceof Promise ? o.then((s) => (n.value = s, n)) : (n.value = o, n);
2941
2980
  };
2942
2981
  });
2943
- function Ko(e) {
2944
- return new Go({
2982
+ function Ho(e) {
2983
+ return new Xo({
2945
2984
  type: "transform",
2946
2985
  transform: e
2947
2986
  });
2948
2987
  }
2949
- const qo = /* @__PURE__ */ l("ZodOptional", (e, t) => {
2950
- dt.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
2988
+ const Jo = /* @__PURE__ */ l("ZodOptional", (e, t) => {
2989
+ ft.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
2951
2990
  });
2952
- function xe(e) {
2953
- return new qo({
2991
+ function Fe(e) {
2992
+ return new Jo({
2954
2993
  type: "optional",
2955
2994
  innerType: e
2956
2995
  });
2957
2996
  }
2958
- const Xo = /* @__PURE__ */ l("ZodNullable", (e, t) => {
2959
- Lr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
2997
+ const Qo = /* @__PURE__ */ l("ZodNullable", (e, t) => {
2998
+ Nr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
2960
2999
  });
2961
- function Re(e) {
2962
- return new Xo({
3000
+ function We(e) {
3001
+ return new Qo({
2963
3002
  type: "nullable",
2964
3003
  innerType: e
2965
3004
  });
2966
3005
  }
2967
- const Ho = /* @__PURE__ */ l("ZodDefault", (e, t) => {
2968
- Dr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3006
+ const es = /* @__PURE__ */ l("ZodDefault", (e, t) => {
3007
+ xr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2969
3008
  });
2970
- function Jo(e, t) {
2971
- return new Ho({
3009
+ function ts(e, t) {
3010
+ return new es({
2972
3011
  type: "default",
2973
3012
  innerType: e,
2974
3013
  get defaultValue() {
2975
- return typeof t == "function" ? t() : tt(t);
3014
+ return typeof t == "function" ? t() : ot(t);
2976
3015
  }
2977
3016
  });
2978
3017
  }
2979
- const Qo = /* @__PURE__ */ l("ZodPrefault", (e, t) => {
2980
- Mr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
3018
+ const ns = /* @__PURE__ */ l("ZodPrefault", (e, t) => {
3019
+ Rr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
2981
3020
  });
2982
- function es(e, t) {
2983
- return new Qo({
3021
+ function rs(e, t) {
3022
+ return new ns({
2984
3023
  type: "prefault",
2985
3024
  innerType: e,
2986
3025
  get defaultValue() {
2987
- return typeof t == "function" ? t() : tt(t);
3026
+ return typeof t == "function" ? t() : ot(t);
2988
3027
  }
2989
3028
  });
2990
3029
  }
2991
- const ts = /* @__PURE__ */ l("ZodNonOptional", (e, t) => {
2992
- Nr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
3030
+ const os = /* @__PURE__ */ l("ZodNonOptional", (e, t) => {
3031
+ Fr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
2993
3032
  });
2994
- function ns(e, t) {
2995
- return new ts({
3033
+ function ss(e, t) {
3034
+ return new os({
2996
3035
  type: "nonoptional",
2997
3036
  innerType: e,
2998
- ...d(t)
3037
+ ...m(t)
2999
3038
  });
3000
3039
  }
3001
- const rs = /* @__PURE__ */ l("ZodCatch", (e, t) => {
3002
- xr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3040
+ const is = /* @__PURE__ */ l("ZodCatch", (e, t) => {
3041
+ Wr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3003
3042
  });
3004
- function os(e, t) {
3005
- return new rs({
3043
+ function as(e, t) {
3044
+ return new is({
3006
3045
  type: "catch",
3007
3046
  innerType: e,
3008
3047
  catchValue: typeof t == "function" ? t : () => t
3009
3048
  });
3010
3049
  }
3011
- const ss = /* @__PURE__ */ l("ZodPipe", (e, t) => {
3012
- Rr.init(e, t), A.init(e, t), e.in = t.in, e.out = t.out;
3050
+ const us = /* @__PURE__ */ l("ZodPipe", (e, t) => {
3051
+ Ur.init(e, t), A.init(e, t), e.in = t.in, e.out = t.out;
3013
3052
  });
3014
- function Fe(e, t) {
3015
- return new ss({
3053
+ function Ue(e, t) {
3054
+ return new us({
3016
3055
  type: "pipe",
3017
3056
  in: e,
3018
3057
  out: t
3019
3058
  // ...util.normalizeParams(params),
3020
3059
  });
3021
3060
  }
3022
- const is = /* @__PURE__ */ l("ZodReadonly", (e, t) => {
3023
- Fr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
3061
+ const cs = /* @__PURE__ */ l("ZodReadonly", (e, t) => {
3062
+ jr.init(e, t), A.init(e, t), e.unwrap = () => e._zod.def.innerType;
3024
3063
  });
3025
- function as(e) {
3026
- return new is({
3064
+ function ls(e) {
3065
+ return new cs({
3027
3066
  type: "readonly",
3028
3067
  innerType: e
3029
3068
  });
3030
3069
  }
3031
- const us = /* @__PURE__ */ l("ZodCustom", (e, t) => {
3032
- mt.init(e, t), A.init(e, t);
3070
+ const ps = /* @__PURE__ */ l("ZodCustom", (e, t) => {
3071
+ gt.init(e, t), A.init(e, t);
3033
3072
  });
3034
- function cs(e, t = {}) {
3035
- return bt(us, e, t);
3073
+ function ds(e, t = {}) {
3074
+ return _t(ps, e, t);
3036
3075
  }
3037
- function ls(e) {
3038
- return gt(e);
3076
+ function ms(e) {
3077
+ return vt(e);
3039
3078
  }
3040
3079
  const D = /* @__PURE__ */ l("ZodMiniType", (e, t) => {
3041
3080
  if (!e._zod)
3042
3081
  throw new Error("Uninitialized schema in ZodMiniType.");
3043
- _.init(e, t), e.def = t, e.type = t.type, e.parse = (n, r) => Ln(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => st(e, n, r), e.parseAsync = async (n, r) => Dn(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => it(e, n, r), e.check = (...n) => e.clone(
3082
+ _.init(e, t), e.def = t, e.type = t.type, e.parse = (n, r) => Nn(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => ut(e, n, r), e.parseAsync = async (n, r) => xn(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => ct(e, n, r), e.check = (...n) => e.clone(
3044
3083
  {
3045
3084
  ...t,
3046
3085
  checks: [
@@ -3049,182 +3088,182 @@ const D = /* @__PURE__ */ l("ZodMiniType", (e, t) => {
3049
3088
  ]
3050
3089
  }
3051
3090
  // { parent: true }
3052
- ), e.clone = (n, r) => nt(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e));
3053
- }), yt = /* @__PURE__ */ l("ZodMiniString", (e, t) => {
3054
- ye.init(e, t), D.init(e, t);
3091
+ ), e.clone = (n, r) => st(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e));
3092
+ }), kt = /* @__PURE__ */ l("ZodMiniString", (e, t) => {
3093
+ _e.init(e, t), D.init(e, t);
3055
3094
  });
3056
- function We(e) {
3057
- return jr(yt, e);
3095
+ function je(e) {
3096
+ return Yr(kt, e);
3058
3097
  }
3059
- const F = /* @__PURE__ */ l("ZodMiniStringFormat", (e, t) => {
3060
- E.init(e, t), yt.init(e, t);
3061
- }), ps = /* @__PURE__ */ l("ZodMiniEmail", (e, t) => {
3062
- _r.init(e, t), F.init(e, t);
3098
+ const W = /* @__PURE__ */ l("ZodMiniStringFormat", (e, t) => {
3099
+ E.init(e, t), kt.init(e, t);
3100
+ }), hs = /* @__PURE__ */ l("ZodMiniEmail", (e, t) => {
3101
+ wr.init(e, t), W.init(e, t);
3063
3102
  });
3064
- function ds(e) {
3065
- return Vr(ps, e);
3103
+ function fs(e) {
3104
+ return Gr(hs, e);
3066
3105
  }
3067
- const ms = /* @__PURE__ */ l("ZodMiniUUID", (e, t) => {
3068
- yr.init(e, t), F.init(e, t);
3106
+ const gs = /* @__PURE__ */ l("ZodMiniUUID", (e, t) => {
3107
+ kr.init(e, t), W.init(e, t);
3069
3108
  });
3070
- function hs(e) {
3071
- return Br(ms, e);
3109
+ function bs(e) {
3110
+ return Kr(gs, e);
3072
3111
  }
3073
- const fs = /* @__PURE__ */ l("ZodMiniURL", (e, t) => {
3074
- vr.init(e, t), F.init(e, t);
3112
+ const ys = /* @__PURE__ */ l("ZodMiniURL", (e, t) => {
3113
+ Tr.init(e, t), W.init(e, t);
3075
3114
  });
3076
- function bs(e) {
3077
- return Yr(fs, e);
3115
+ function _s(e) {
3116
+ return qr(ys, e);
3078
3117
  }
3079
- const gs = /* @__PURE__ */ l("ZodMiniIPv4", (e, t) => {
3080
- Sr.init(e, t), F.init(e, t);
3118
+ const vs = /* @__PURE__ */ l("ZodMiniIPv4", (e, t) => {
3119
+ $r.init(e, t), W.init(e, t);
3081
3120
  });
3082
- function ys(e) {
3083
- return Gr(gs, e);
3121
+ function ks(e) {
3122
+ return Xr(vs, e);
3084
3123
  }
3085
- const _s = /* @__PURE__ */ l("ZodMiniIPv6", (e, t) => {
3086
- zr.init(e, t), F.init(e, t);
3124
+ const ws = /* @__PURE__ */ l("ZodMiniIPv6", (e, t) => {
3125
+ Or.init(e, t), W.init(e, t);
3087
3126
  });
3088
- function vs(e) {
3089
- return Kr(_s, e);
3127
+ function Ts(e) {
3128
+ return Hr(ws, e);
3090
3129
  }
3091
- const ks = /* @__PURE__ */ l("ZodMiniCustomStringFormat", (e, t) => {
3092
- Er.init(e, t), F.init(e, t);
3130
+ const As = /* @__PURE__ */ l("ZodMiniCustomStringFormat", (e, t) => {
3131
+ Zr.init(e, t), W.init(e, t);
3093
3132
  });
3094
- function ws(e) {
3095
- return yo(ks, "hostname", Kn, e);
3133
+ function Ss(e) {
3134
+ return ko(As, "hostname", Hn, e);
3096
3135
  }
3097
- const _t = /* @__PURE__ */ l("ZodMiniNumber", (e, t) => {
3098
- lt.init(e, t), D.init(e, t);
3136
+ const wt = /* @__PURE__ */ l("ZodMiniNumber", (e, t) => {
3137
+ mt.init(e, t), D.init(e, t);
3099
3138
  });
3100
- function Ue(e) {
3101
- return Qr(_t, e);
3139
+ function Ve(e) {
3140
+ return no(wt, e);
3102
3141
  }
3103
- const Ts = /* @__PURE__ */ l("ZodMiniNumberFormat", (e, t) => {
3104
- $r.init(e, t), _t.init(e, t);
3142
+ const zs = /* @__PURE__ */ l("ZodMiniNumberFormat", (e, t) => {
3143
+ Pr.init(e, t), wt.init(e, t);
3105
3144
  });
3106
- function As(e) {
3107
- return eo(Ts, e);
3145
+ function Es(e) {
3146
+ return ro(zs, e);
3108
3147
  }
3109
- const Ss = /* @__PURE__ */ l("ZodMiniBoolean", (e, t) => {
3110
- Or.init(e, t), D.init(e, t);
3148
+ const $s = /* @__PURE__ */ l("ZodMiniBoolean", (e, t) => {
3149
+ Cr.init(e, t), D.init(e, t);
3111
3150
  });
3112
- function je(e) {
3113
- return to(Ss, e);
3151
+ function Be(e) {
3152
+ return oo($s, e);
3114
3153
  }
3115
- const zs = /* @__PURE__ */ l("ZodMiniAny", (e, t) => {
3116
- Zr.init(e, t), D.init(e, t);
3154
+ const Os = /* @__PURE__ */ l("ZodMiniAny", (e, t) => {
3155
+ Ir.init(e, t), D.init(e, t);
3117
3156
  });
3118
3157
  function pe() {
3119
- return no(zs);
3158
+ return so(Os);
3120
3159
  }
3121
- const Es = /* @__PURE__ */ l("ZodMiniArray", (e, t) => {
3122
- pt.init(e, t), D.init(e, t);
3160
+ const Zs = /* @__PURE__ */ l("ZodMiniArray", (e, t) => {
3161
+ ht.init(e, t), D.init(e, t);
3123
3162
  });
3124
- function Ve(e, t) {
3125
- return new Es({
3163
+ function Ye(e, t) {
3164
+ return new Zs({
3126
3165
  type: "array",
3127
3166
  element: e,
3128
- ...d(t)
3167
+ ...m(t)
3129
3168
  });
3130
3169
  }
3131
- const $s = /* @__PURE__ */ l("ZodMiniOptional", (e, t) => {
3132
- dt.init(e, t), D.init(e, t);
3170
+ const Ps = /* @__PURE__ */ l("ZodMiniOptional", (e, t) => {
3171
+ ft.init(e, t), D.init(e, t);
3133
3172
  });
3134
- function Os(e) {
3135
- return new $s({
3173
+ function Cs(e) {
3174
+ return new Ps({
3136
3175
  type: "optional",
3137
3176
  innerType: e
3138
3177
  });
3139
3178
  }
3140
- const Zs = /* @__PURE__ */ l("ZodMiniCustom", (e, t) => {
3141
- mt.init(e, t), D.init(e, t);
3179
+ const Is = /* @__PURE__ */ l("ZodMiniCustom", (e, t) => {
3180
+ gt.init(e, t), D.init(e, t);
3142
3181
  });
3143
3182
  function k(e, t = {}) {
3144
- return bt(Zs, e, t);
3183
+ return _t(Is, e, t);
3145
3184
  }
3146
- function vt(e) {
3147
- return gt(e);
3185
+ function Tt(e) {
3186
+ return vt(e);
3148
3187
  }
3149
3188
  const de = {
3150
- email: { schema: ds() },
3151
- hostname: { schema: ws() },
3152
- ipv4: { schema: ys() },
3153
- ipv6: { schema: vs() },
3154
- url: { schema: bs() },
3155
- uuid: { schema: hs() },
3156
- date: { schema: wo() },
3157
- time: { schema: Ao() },
3158
- "date-time": { schema: vo() },
3159
- duration: { schema: zo() }
3160
- }, Ps = Object.keys(de), Cs = (e) => (t, n) => {
3189
+ email: { schema: fs() },
3190
+ hostname: { schema: Ss() },
3191
+ ipv4: { schema: ks() },
3192
+ ipv6: { schema: Ts() },
3193
+ url: { schema: _s() },
3194
+ uuid: { schema: bs() },
3195
+ date: { schema: So() },
3196
+ time: { schema: Eo() },
3197
+ "date-time": { schema: To() },
3198
+ duration: { schema: Oo() }
3199
+ }, Ls = Object.keys(de), Ds = (e) => (t, n) => {
3161
3200
  switch (t.type) {
3162
3201
  case "string":
3163
- return Is(t, n);
3202
+ return Ms(t, n);
3164
3203
  case "integer":
3165
3204
  case "number":
3166
- return Ds(t, n);
3205
+ return xs(t, n);
3167
3206
  case "boolean":
3168
- return Ms(t, n);
3207
+ return Rs(t, n);
3169
3208
  case "array":
3170
- return Ns(t, n);
3209
+ return Fs(t, n);
3171
3210
  case "custom": {
3172
3211
  if (!e)
3173
3212
  throw new Error(
3174
3213
  'Validator type "custom" requires a customValidators object, but it was not supplied.'
3175
3214
  );
3176
- return xs(t, e);
3215
+ return Ws(t, e);
3177
3216
  }
3178
3217
  }
3179
3218
  };
3180
- function g(e, t) {
3219
+ function b(e, t) {
3181
3220
  if (e !== void 0)
3182
3221
  return typeof e == "string" ? e : t?.translate(e.key, e.params, e.default) ?? e.default;
3183
3222
  }
3184
- function Is(e, t) {
3223
+ function Ms(e, t) {
3185
3224
  return j(e, (n) => {
3186
- const r = g(n.messages?.invalid, t);
3187
- let o = r ? We(r) : We();
3225
+ const r = b(n.messages?.invalid, t);
3226
+ let o = r ? je(r) : je();
3188
3227
  if (n.required === !0) {
3189
- const s = g(n.messages?.required, t) ?? "This field is required";
3228
+ const s = b(n.messages?.required, t) ?? "This field is required";
3190
3229
  o = o.check(k((i) => i.length > 0, { error: s }));
3191
3230
  }
3192
3231
  if (typeof n.minLength == "number") {
3193
- const s = g(n.messages?.minLength, t), i = n.minLength;
3232
+ const s = b(n.messages?.minLength, t), i = n.minLength;
3194
3233
  o = o.check(
3195
3234
  s ? k((a) => a.length >= i, { error: s }) : x(i)
3196
3235
  );
3197
3236
  }
3198
3237
  if (typeof n.maxLength == "number") {
3199
- const s = g(n.messages?.maxLength, t), i = n.maxLength;
3238
+ const s = b(n.messages?.maxLength, t), i = n.maxLength;
3200
3239
  o = o.check(
3201
- s ? k((a) => a.length <= i, { error: s }) : ne(i)
3240
+ s ? k((a) => a.length <= i, { error: s }) : re(i)
3202
3241
  );
3203
3242
  }
3204
3243
  if (typeof n.pattern == "string") {
3205
- const s = g(n.messages?.pattern, t), i = new RegExp(n.pattern);
3244
+ const s = b(n.messages?.pattern, t), i = new RegExp(n.pattern);
3206
3245
  o = o.check(
3207
- s ? k((a) => i.test(a), { error: s }) : ft(i)
3246
+ s ? k((a) => i.test(a), { error: s }) : yt(i)
3208
3247
  );
3209
3248
  }
3210
3249
  if (n.enum) {
3211
- const s = n.enum, i = g(n.messages?.enum, t);
3250
+ const s = n.enum, i = b(n.messages?.enum, t);
3212
3251
  o = o.check(k((a) => s.includes(a), i ? { error: i } : void 0));
3213
3252
  }
3214
3253
  if (n.const !== void 0) {
3215
- const s = g(n.messages?.const, t);
3254
+ const s = b(n.messages?.const, t);
3216
3255
  o = o.check(k((i) => i === n.const, s ? { error: s } : void 0));
3217
3256
  }
3218
3257
  if (n.format !== void 0)
3219
- if (Ps.includes(n.format)) {
3220
- const s = g(n.messages?.format, t);
3258
+ if (Ls.includes(n.format)) {
3259
+ const s = b(n.messages?.format, t);
3221
3260
  o = o.check(
3222
- s ? vt((i, a) => {
3223
- const u = Be(
3261
+ s ? Tt((i, a) => {
3262
+ const u = Ge(
3224
3263
  de[n.format].schema,
3225
3264
  i
3226
3265
  );
3227
- Ye(u) || a.addIssue({ code: "custom", path: [], message: s });
3266
+ Ke(u) || a.addIssue({ code: "custom", path: [], message: s });
3228
3267
  }) : de[n.format].schema
3229
3268
  );
3230
3269
  } else
@@ -3232,104 +3271,104 @@ function Is(e, t) {
3232
3271
  return o;
3233
3272
  });
3234
3273
  }
3235
- const Ls = (e, t) => {
3274
+ const Ns = (e, t) => {
3236
3275
  if (t === 0)
3237
3276
  return !1;
3238
3277
  const n = e / t;
3239
3278
  return Math.abs(n - Math.round(n)) < 1e-10;
3240
3279
  };
3241
- function Ds(e, t) {
3280
+ function xs(e, t) {
3242
3281
  return j(e, (n) => {
3243
- const r = g(n.messages?.invalid, t);
3244
- let o = r ? Ue(r) : Ue();
3245
- if (n.type === "integer" && (o = o.check(As())), n.minimum !== void 0) {
3246
- const s = g(n.messages?.minimum, t), i = n.minimum;
3247
- o = o.check(s ? k((a) => a >= i, { error: s }) : oo(i));
3282
+ const r = b(n.messages?.invalid, t);
3283
+ let o = r ? Ve(r) : Ve();
3284
+ if (n.type === "integer" && (o = o.check(Es())), n.minimum !== void 0) {
3285
+ const s = b(n.messages?.minimum, t), i = n.minimum;
3286
+ o = o.check(s ? k((a) => a >= i, { error: s }) : ao(i));
3248
3287
  }
3249
3288
  if (n.maximum !== void 0) {
3250
- const s = g(n.messages?.maximum, t), i = n.maximum;
3251
- o = o.check(s ? k((a) => a <= i, { error: s }) : ro(i));
3289
+ const s = b(n.messages?.maximum, t), i = n.maximum;
3290
+ o = o.check(s ? k((a) => a <= i, { error: s }) : io(i));
3252
3291
  }
3253
3292
  if (n.exclusiveMinimum !== void 0) {
3254
- const s = g(n.messages?.exclusiveMinimum, t), i = n.exclusiveMinimum;
3293
+ const s = b(n.messages?.exclusiveMinimum, t), i = n.exclusiveMinimum;
3255
3294
  o = o.check(k((a) => a > i, s ? { error: s } : void 0));
3256
3295
  }
3257
3296
  if (n.exclusiveMaximum !== void 0) {
3258
- const s = g(n.messages?.exclusiveMaximum, t), i = n.exclusiveMaximum;
3297
+ const s = b(n.messages?.exclusiveMaximum, t), i = n.exclusiveMaximum;
3259
3298
  o = o.check(k((a) => a < i, s ? { error: s } : void 0));
3260
3299
  }
3261
3300
  if (n.multipleOf !== void 0) {
3262
- const s = g(n.messages?.multipleOf, t), i = n.multipleOf;
3301
+ const s = b(n.messages?.multipleOf, t), i = n.multipleOf;
3263
3302
  o = o.check(
3264
- k((a) => Ls(a, i), s ? { error: s } : void 0)
3303
+ k((a) => Ns(a, i), s ? { error: s } : void 0)
3265
3304
  );
3266
3305
  }
3267
3306
  if (n.enum) {
3268
- const s = n.enum, i = g(n.messages?.enum, t);
3307
+ const s = n.enum, i = b(n.messages?.enum, t);
3269
3308
  o = o.check(k((a) => s.includes(a), i ? { error: i } : void 0));
3270
3309
  }
3271
3310
  if (n.const !== void 0) {
3272
- const s = g(n.messages?.const, t);
3311
+ const s = b(n.messages?.const, t);
3273
3312
  o = o.check(k((i) => i === n.const, s ? { error: s } : void 0));
3274
3313
  }
3275
3314
  return o;
3276
3315
  });
3277
3316
  }
3278
- function Ms(e, t) {
3317
+ function Rs(e, t) {
3279
3318
  return j(e, (n) => {
3280
- const r = g(n.messages?.invalid, t);
3281
- let o = r ? je(r) : je();
3319
+ const r = b(n.messages?.invalid, t);
3320
+ let o = r ? Be(r) : Be();
3282
3321
  if (n.const !== void 0) {
3283
- const s = g(n.messages?.const, t);
3322
+ const s = b(n.messages?.const, t);
3284
3323
  o = o.check(k((i) => i === n.const, s ? { error: s } : void 0));
3285
3324
  }
3286
3325
  return o;
3287
3326
  });
3288
3327
  }
3289
- function Ns(e, t) {
3328
+ function Fs(e, t) {
3290
3329
  return j(e, (n) => {
3291
- const r = g(n.messages?.invalid, t);
3292
- let o = r ? Ve(pe(), r) : Ve(pe());
3330
+ const r = b(n.messages?.invalid, t);
3331
+ let o = r ? Ye(pe(), r) : Ye(pe());
3293
3332
  if (n.required === !0) {
3294
- const s = g(n.messages?.required, t) ?? "This field is required";
3333
+ const s = b(n.messages?.required, t) ?? "This field is required";
3295
3334
  o = o.check(k((i) => i.length > 0, { error: s }));
3296
3335
  }
3297
3336
  if (typeof n.minItems == "number") {
3298
- const s = g(n.messages?.minItems, t), i = n.minItems;
3337
+ const s = b(n.messages?.minItems, t), i = n.minItems;
3299
3338
  o = o.check(
3300
3339
  s ? k((a) => a.length >= i, { error: s }) : x(i)
3301
3340
  );
3302
3341
  }
3303
3342
  if (typeof n.maxItems == "number") {
3304
- const s = g(n.messages?.maxItems, t), i = n.maxItems;
3343
+ const s = b(n.messages?.maxItems, t), i = n.maxItems;
3305
3344
  o = o.check(
3306
- s ? k((a) => a.length <= i, { error: s }) : ne(i)
3345
+ s ? k((a) => a.length <= i, { error: s }) : re(i)
3307
3346
  );
3308
3347
  }
3309
3348
  return o;
3310
3349
  });
3311
3350
  }
3312
- function xs(e, t) {
3351
+ function Ws(e, t) {
3313
3352
  return j(e, (n) => {
3314
3353
  let r = pe();
3315
- return Tt(
3354
+ return zt(
3316
3355
  Object.keys(n),
3317
3356
  // filter non-custom validator keys
3318
3357
  (o) => o !== "type" && o !== "required",
3319
3358
  (o) => {
3320
3359
  const s = n[o], i = t[o], a = i(s);
3321
3360
  r = r.check(
3322
- vt((u, c) => {
3323
- const p = Be(
3361
+ Tt((u, c) => {
3362
+ const p = Ge(
3324
3363
  a,
3325
3364
  u
3326
3365
  );
3327
- if (!Ye(p)) {
3328
- const m = p.issues[0];
3366
+ if (!Ke(p)) {
3367
+ const d = p.issues[0];
3329
3368
  c.addIssue({
3330
3369
  code: "custom",
3331
3370
  path: [],
3332
- message: m?.message || `Validation failed for ${o}`
3371
+ message: d?.message || `Validation failed for ${o}`
3333
3372
  });
3334
3373
  }
3335
3374
  })
@@ -3340,9 +3379,9 @@ function xs(e, t) {
3340
3379
  }
3341
3380
  function j(e, t) {
3342
3381
  const n = t(e);
3343
- return e.required ? n : Os(n);
3382
+ return e.required ? n : Cs(n);
3344
3383
  }
3345
- const Rs = {
3384
+ const Us = {
3346
3385
  // ACTION
3347
3386
  button: async () => (await import("./button.element-3a7rRHbA.js")).ButtonElement,
3348
3387
  // INPUTS
@@ -3377,12 +3416,12 @@ const Rs = {
3377
3416
  markdownText: async () => (await import("./markdown-text.element-B8TfVLIO.js")).MarkdownTextElement,
3378
3417
  renderer: async () => (await import("./renderer.element-CNyMn2Lu.js")).RendererElement
3379
3418
  };
3380
- var Fs = Object.defineProperty, Ws = Object.getOwnPropertyDescriptor, oe = (e, t, n, r) => {
3381
- for (var o = r > 1 ? void 0 : r ? Ws(t, n) : t, s = e.length - 1, i; s >= 0; s--)
3419
+ var js = Object.defineProperty, Vs = Object.getOwnPropertyDescriptor, V = (e, t, n, r) => {
3420
+ for (var o = r > 1 ? void 0 : r ? Vs(t, n) : t, s = e.length - 1, i; s >= 0; s--)
3382
3421
  (i = e[s]) && (o = (r ? i(t, n, o) : i(o)) || o);
3383
- return r && o && Fs(t, n, o), o;
3422
+ return r && o && js(t, n, o), o;
3384
3423
  };
3385
- let U = class extends At {
3424
+ let R = class extends Et {
3386
3425
  constructor() {
3387
3426
  super(...arguments), this.autocomplete = void 0;
3388
3427
  }
@@ -3396,10 +3435,10 @@ let U = class extends At {
3396
3435
  return this;
3397
3436
  }
3398
3437
  render() {
3399
- const e = this.config, t = zn(e.formDef, e.formSelectors, e.formConfig), n = {
3438
+ const e = this.config, t = On(e.formDef, e.formSelectors, e.formConfig), n = {
3400
3439
  formDef: t.formDef,
3401
3440
  widgetLoaders: {
3402
- ...Rs,
3441
+ ...Us,
3403
3442
  ...t.widgetLoaders,
3404
3443
  ...e.customWidgetLoaders ?? {}
3405
3444
  },
@@ -3414,32 +3453,36 @@ let U = class extends At {
3414
3453
  data: e.data,
3415
3454
  meta: e.meta,
3416
3455
  formName: e.formName
3417
- }, r = Cs({
3456
+ }, r = Ds({
3418
3457
  ...e.customValidators ?? {}
3419
3458
  }), o = t.formEvent, s = o ? (i) => o(i.detail) : void 0;
3420
- return St`
3459
+ return $t`
3421
3460
  <gui-core-form
3422
3461
  .config=${n}
3423
3462
  .validators=${r}
3424
3463
  .autocomplete=${this.autocomplete}
3464
+ .formHealthBoundary=${this.formHealthBoundary}
3425
3465
  @formEvent=${s}
3426
3466
  ></gui-core-form>
3427
3467
  `;
3428
3468
  }
3429
3469
  };
3430
- oe([
3431
- Ge({ attribute: !1 })
3432
- ], U.prototype, "config", 2);
3433
- oe([
3434
- Ge({ type: String })
3435
- ], U.prototype, "autocomplete", 2);
3436
- oe([
3437
- zt("gui-core-form")
3438
- ], U.prototype, "coreForm", 2);
3439
- U = oe([
3440
- Et("gui-form")
3441
- ], U);
3470
+ V([
3471
+ me({ attribute: !1 })
3472
+ ], R.prototype, "config", 2);
3473
+ V([
3474
+ me({ type: String })
3475
+ ], R.prototype, "autocomplete", 2);
3476
+ V([
3477
+ me({ attribute: !1 })
3478
+ ], R.prototype, "formHealthBoundary", 2);
3479
+ V([
3480
+ Ot("gui-core-form")
3481
+ ], R.prototype, "coreForm", 2);
3482
+ R = V([
3483
+ Zt("gui-form")
3484
+ ], R);
3442
3485
  export {
3443
- U as FormElement,
3444
- Rs as widgetLoaders
3486
+ R as FormElement,
3487
+ Us as widgetLoaders
3445
3488
  };