@object-ui/plugin-timeline 0.5.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,73 +1,74 @@
1
- import * as P from "react";
2
- import sn, { useState as ze, useEffect as Ye } from "react";
3
- import { renderChildren as Be, cn as D } from "@object-ui/components";
4
- import { ComponentRegistry as gt } from "@object-ui/core";
5
- import { useDataScope as an, useSchemaContext as cn } from "@object-ui/react";
6
- var re = { exports: {} }, H = {};
7
- var qe;
8
- function un() {
9
- if (qe) return H;
10
- qe = 1;
1
+ import * as A from "react";
2
+ import an, { useState as ce, useEffect as He, useCallback as cn } from "react";
3
+ import { renderChildren as Xe, cn as j, NavigationOverlay as un } from "@object-ui/components";
4
+ import { ComponentRegistry as Ie } from "@object-ui/core";
5
+ import { useDataScope as ln, useNavigationOverlay as fn, useSchemaContext as dn } from "@object-ui/react";
6
+ import { usePullToRefresh as pn } from "@object-ui/mobile";
7
+ var ue = { exports: {} }, te = {};
8
+ var Qe;
9
+ function hn() {
10
+ if (Qe) return te;
11
+ Qe = 1;
11
12
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
12
- function n(r, o, s) {
13
- var i = null;
14
- if (s !== void 0 && (i = "" + s), o.key !== void 0 && (i = "" + o.key), "key" in o) {
15
- s = {};
13
+ function n(r, o, i) {
14
+ var s = null;
15
+ if (i !== void 0 && (s = "" + i), o.key !== void 0 && (s = "" + o.key), "key" in o) {
16
+ i = {};
16
17
  for (var a in o)
17
- a !== "key" && (s[a] = o[a]);
18
- } else s = o;
19
- return o = s.ref, {
18
+ a !== "key" && (i[a] = o[a]);
19
+ } else i = o;
20
+ return o = i.ref, {
20
21
  $$typeof: e,
21
22
  type: r,
22
- key: i,
23
+ key: s,
23
24
  ref: o !== void 0 ? o : null,
24
- props: s
25
+ props: i
25
26
  };
26
27
  }
27
- return H.Fragment = t, H.jsx = n, H.jsxs = n, H;
28
+ return te.Fragment = t, te.jsx = n, te.jsxs = n, te;
28
29
  }
29
- var X = {};
30
- var Ke;
31
- function ln() {
32
- return Ke || (Ke = 1, process.env.NODE_ENV !== "production" && (function() {
30
+ var ne = {};
31
+ var et;
32
+ function mn() {
33
+ return et || (et = 1, process.env.NODE_ENV !== "production" && (function() {
33
34
  function e(l) {
34
35
  if (l == null) return null;
35
36
  if (typeof l == "function")
36
- return l.$$typeof === nn ? null : l.displayName || l.name || null;
37
+ return l.$$typeof === J ? null : l.displayName || l.name || null;
37
38
  if (typeof l == "string") return l;
38
39
  switch (l) {
39
40
  case b:
40
41
  return "Fragment";
41
- case C:
42
+ case ee:
42
43
  return "Profiler";
43
- case U:
44
+ case M:
44
45
  return "StrictMode";
45
- case Ue:
46
+ case ie:
46
47
  return "Suspense";
47
- case ge:
48
+ case N:
48
49
  return "SuspenseList";
49
- case tn:
50
+ case ze:
50
51
  return "Activity";
51
52
  }
52
53
  if (typeof l == "object")
53
54
  switch (typeof l.tag == "number" && console.error(
54
55
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
55
56
  ), l.$$typeof) {
56
- case v:
57
+ case y:
57
58
  return "Portal";
58
- case R:
59
+ case S:
59
60
  return l.displayName || "Context";
60
- case A:
61
+ case C:
61
62
  return (l._context.displayName || "Context") + ".Consumer";
62
- case N:
63
- var y = l.render;
64
- return l = l.displayName, l || (l = y.displayName || y.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
65
- case en:
66
- return y = l.displayName || null, y !== null ? y : e(l.type) || "Memo";
67
- case _e:
68
- y = l._payload, l = l._init;
63
+ case P:
64
+ var v = l.render;
65
+ return l = l.displayName, l || (l = v.displayName || v.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
66
+ case O:
67
+ return v = l.displayName || null, v !== null ? v : e(l.type) || "Memo";
68
+ case F:
69
+ v = l._payload, l = l._init;
69
70
  try {
70
- return e(l(y));
71
+ return e(l(v));
71
72
  } catch {
72
73
  }
73
74
  }
@@ -79,50 +80,50 @@ function ln() {
79
80
  function n(l) {
80
81
  try {
81
82
  t(l);
82
- var y = !1;
83
+ var v = !1;
83
84
  } catch {
84
- y = !0;
85
+ v = !0;
85
86
  }
86
- if (y) {
87
- y = console;
88
- var T = y.error, S = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
87
+ if (v) {
88
+ v = console;
89
+ var T = v.error, Z = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
89
90
  return T.call(
90
- y,
91
+ v,
91
92
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
92
- S
93
+ Z
93
94
  ), t(l);
94
95
  }
95
96
  }
96
97
  function r(l) {
97
98
  if (l === b) return "<>";
98
- if (typeof l == "object" && l !== null && l.$$typeof === _e)
99
+ if (typeof l == "object" && l !== null && l.$$typeof === F)
99
100
  return "<...>";
100
101
  try {
101
- var y = e(l);
102
- return y ? "<" + y + ">" : "<...>";
102
+ var v = e(l);
103
+ return v ? "<" + v + ">" : "<...>";
103
104
  } catch {
104
105
  return "<...>";
105
106
  }
106
107
  }
107
108
  function o() {
108
- var l = ve.A;
109
+ var l = ke.A;
109
110
  return l === null ? null : l.getOwner();
110
111
  }
111
- function s() {
112
+ function i() {
112
113
  return Error("react-stack-top-frame");
113
114
  }
114
- function i(l) {
115
- if (Le.call(l, "key")) {
116
- var y = Object.getOwnPropertyDescriptor(l, "key").get;
117
- if (y && y.isReactWarning) return !1;
115
+ function s(l) {
116
+ if (We.call(l, "key")) {
117
+ var v = Object.getOwnPropertyDescriptor(l, "key").get;
118
+ if (v && v.isReactWarning) return !1;
118
119
  }
119
120
  return l.key !== void 0;
120
121
  }
121
- function a(l, y) {
122
+ function a(l, v) {
122
123
  function T() {
123
- Je || (Je = !0, console.error(
124
+ Ge || (Ge = !0, console.error(
124
125
  "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
125
- y
126
+ v
126
127
  ));
127
128
  }
128
129
  T.isReactWarning = !0, Object.defineProperty(l, "key", {
@@ -132,19 +133,19 @@ function ln() {
132
133
  }
133
134
  function c() {
134
135
  var l = e(this.type);
135
- return Me[l] || (Me[l] = !0, console.error(
136
+ return Ye[l] || (Ye[l] = !0, console.error(
136
137
  "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
137
138
  )), l = this.props.ref, l !== void 0 ? l : null;
138
139
  }
139
- function f(l, y, T, S, ne, we) {
140
- var O = T.ref;
140
+ function f(l, v, T, Z, ae, Te) {
141
+ var E = T.ref;
141
142
  return l = {
142
143
  $$typeof: w,
143
144
  type: l,
144
- key: y,
145
+ key: v,
145
146
  props: T,
146
- _owner: S
147
- }, (O !== void 0 ? O : null) !== null ? Object.defineProperty(l, "ref", {
147
+ _owner: Z
148
+ }, (E !== void 0 ? E : null) !== null ? Object.defineProperty(l, "ref", {
148
149
  enumerable: !1,
149
150
  get: c
150
151
  }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
@@ -161,69 +162,69 @@ function ln() {
161
162
  configurable: !1,
162
163
  enumerable: !1,
163
164
  writable: !0,
164
- value: ne
165
+ value: ae
165
166
  }), Object.defineProperty(l, "_debugTask", {
166
167
  configurable: !1,
167
168
  enumerable: !1,
168
169
  writable: !0,
169
- value: we
170
+ value: Te
170
171
  }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
171
172
  }
172
- function d(l, y, T, S, ne, we) {
173
- var O = y.children;
174
- if (O !== void 0)
175
- if (S)
176
- if (rn(O)) {
177
- for (S = 0; S < O.length; S++)
178
- g(O[S]);
179
- Object.freeze && Object.freeze(O);
173
+ function d(l, v, T, Z, ae, Te) {
174
+ var E = v.children;
175
+ if (E !== void 0)
176
+ if (Z)
177
+ if (on(E)) {
178
+ for (Z = 0; Z < E.length; Z++)
179
+ _(E[Z]);
180
+ Object.freeze && Object.freeze(E);
180
181
  } else
181
182
  console.error(
182
183
  "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
183
184
  );
184
- else g(O);
185
- if (Le.call(y, "key")) {
186
- O = e(l);
187
- var Y = Object.keys(y).filter(function(on) {
188
- return on !== "key";
185
+ else _(E);
186
+ if (We.call(v, "key")) {
187
+ E = e(l);
188
+ var K = Object.keys(v).filter(function(sn) {
189
+ return sn !== "key";
189
190
  });
190
- S = 0 < Y.length ? "{key: someKey, " + Y.join(": ..., ") + ": ...}" : "{key: someKey}", Ge[O + S] || (Y = 0 < Y.length ? "{" + Y.join(": ..., ") + ": ...}" : "{}", console.error(
191
+ Z = 0 < K.length ? "{key: someKey, " + K.join(": ..., ") + ": ...}" : "{key: someKey}", Ke[E + Z] || (K = 0 < K.length ? "{" + K.join(": ..., ") + ": ...}" : "{}", console.error(
191
192
  `A props object containing a "key" prop is being spread into JSX:
192
193
  let props = %s;
193
194
  <%s {...props} />
194
195
  React keys must be passed directly to JSX without using spread:
195
196
  let props = %s;
196
197
  <%s key={someKey} {...props} />`,
197
- S,
198
- O,
199
- Y,
200
- O
201
- ), Ge[O + S] = !0);
198
+ Z,
199
+ E,
200
+ K,
201
+ E
202
+ ), Ke[E + Z] = !0);
202
203
  }
203
- if (O = null, T !== void 0 && (n(T), O = "" + T), i(y) && (n(y.key), O = "" + y.key), "key" in y) {
204
+ if (E = null, T !== void 0 && (n(T), E = "" + T), s(v) && (n(v.key), E = "" + v.key), "key" in v) {
204
205
  T = {};
205
- for (var be in y)
206
- be !== "key" && (T[be] = y[be]);
207
- } else T = y;
208
- return O && a(
206
+ for (var Oe in v)
207
+ Oe !== "key" && (T[Oe] = v[Oe]);
208
+ } else T = v;
209
+ return E && a(
209
210
  T,
210
211
  typeof l == "function" ? l.displayName || l.name || "Unknown" : l
211
212
  ), f(
212
213
  l,
213
- O,
214
+ E,
214
215
  T,
215
216
  o(),
216
- ne,
217
- we
217
+ ae,
218
+ Te
218
219
  );
219
220
  }
220
- function g(l) {
221
- h(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === _e && (l._payload.status === "fulfilled" ? h(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
221
+ function _(l) {
222
+ m(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === F && (l._payload.status === "fulfilled" ? m(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
222
223
  }
223
- function h(l) {
224
+ function m(l) {
224
225
  return typeof l == "object" && l !== null && l.$$typeof === w;
225
226
  }
226
- var p = sn, w = /* @__PURE__ */ Symbol.for("react.transitional.element"), v = /* @__PURE__ */ Symbol.for("react.portal"), b = /* @__PURE__ */ Symbol.for("react.fragment"), U = /* @__PURE__ */ Symbol.for("react.strict_mode"), C = /* @__PURE__ */ Symbol.for("react.profiler"), A = /* @__PURE__ */ Symbol.for("react.consumer"), R = /* @__PURE__ */ Symbol.for("react.context"), N = /* @__PURE__ */ Symbol.for("react.forward_ref"), Ue = /* @__PURE__ */ Symbol.for("react.suspense"), ge = /* @__PURE__ */ Symbol.for("react.suspense_list"), en = /* @__PURE__ */ Symbol.for("react.memo"), _e = /* @__PURE__ */ Symbol.for("react.lazy"), tn = /* @__PURE__ */ Symbol.for("react.activity"), nn = /* @__PURE__ */ Symbol.for("react.client.reference"), ve = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Le = Object.prototype.hasOwnProperty, rn = Array.isArray, ye = console.createTask ? console.createTask : function() {
227
+ var p = an, w = /* @__PURE__ */ Symbol.for("react.transitional.element"), y = /* @__PURE__ */ Symbol.for("react.portal"), b = /* @__PURE__ */ Symbol.for("react.fragment"), M = /* @__PURE__ */ Symbol.for("react.strict_mode"), ee = /* @__PURE__ */ Symbol.for("react.profiler"), C = /* @__PURE__ */ Symbol.for("react.consumer"), S = /* @__PURE__ */ Symbol.for("react.context"), P = /* @__PURE__ */ Symbol.for("react.forward_ref"), ie = /* @__PURE__ */ Symbol.for("react.suspense"), N = /* @__PURE__ */ Symbol.for("react.suspense_list"), O = /* @__PURE__ */ Symbol.for("react.memo"), F = /* @__PURE__ */ Symbol.for("react.lazy"), ze = /* @__PURE__ */ Symbol.for("react.activity"), J = /* @__PURE__ */ Symbol.for("react.client.reference"), ke = p.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, We = Object.prototype.hasOwnProperty, on = Array.isArray, $e = console.createTask ? console.createTask : function() {
227
228
  return null;
228
229
  };
229
230
  p = {
@@ -231,56 +232,56 @@ React keys must be passed directly to JSX without using spread:
231
232
  return l();
232
233
  }
233
234
  };
234
- var Je, Me = {}, Ve = p.react_stack_bottom_frame.bind(
235
+ var Ge, Ye = {}, Be = p.react_stack_bottom_frame.bind(
235
236
  p,
236
- s
237
- )(), We = ye(r(s)), Ge = {};
238
- X.Fragment = b, X.jsx = function(l, y, T) {
239
- var S = 1e4 > ve.recentlyCreatedOwnerStacks++;
237
+ i
238
+ )(), qe = $e(r(i)), Ke = {};
239
+ ne.Fragment = b, ne.jsx = function(l, v, T) {
240
+ var Z = 1e4 > ke.recentlyCreatedOwnerStacks++;
240
241
  return d(
241
242
  l,
242
- y,
243
+ v,
243
244
  T,
244
245
  !1,
245
- S ? Error("react-stack-top-frame") : Ve,
246
- S ? ye(r(l)) : We
246
+ Z ? Error("react-stack-top-frame") : Be,
247
+ Z ? $e(r(l)) : qe
247
248
  );
248
- }, X.jsxs = function(l, y, T) {
249
- var S = 1e4 > ve.recentlyCreatedOwnerStacks++;
249
+ }, ne.jsxs = function(l, v, T) {
250
+ var Z = 1e4 > ke.recentlyCreatedOwnerStacks++;
250
251
  return d(
251
252
  l,
252
- y,
253
+ v,
253
254
  T,
254
255
  !0,
255
- S ? Error("react-stack-top-frame") : Ve,
256
- S ? ye(r(l)) : We
256
+ Z ? Error("react-stack-top-frame") : Be,
257
+ Z ? $e(r(l)) : qe
257
258
  );
258
259
  };
259
- })()), X;
260
+ })()), ne;
260
261
  }
261
- var He;
262
- function fn() {
263
- return He || (He = 1, process.env.NODE_ENV === "production" ? re.exports = un() : re.exports = ln()), re.exports;
262
+ var tt;
263
+ function gn() {
264
+ return tt || (tt = 1, process.env.NODE_ENV === "production" ? ue.exports = hn() : ue.exports = mn()), ue.exports;
264
265
  }
265
- var m = fn();
266
- const dn = 10080 * 60 * 1e3;
267
- function pn(e) {
266
+ var h = gn();
267
+ const _n = 10080 * 60 * 1e3;
268
+ function vn(e) {
268
269
  const t = e.flatMap(
269
- (o) => (o.items || []).flatMap((s) => [s.startDate, s.endDate])
270
+ (o) => (o.items || []).flatMap((i) => [i.startDate, i.endDate])
270
271
  ), n = Math.min(...t.map((o) => new Date(o).getTime())), r = Math.max(...t.map((o) => new Date(o).getTime()));
271
272
  return {
272
273
  minDate: new Date(n).toISOString().split("T")[0],
273
274
  maxDate: new Date(r).toISOString().split("T")[0]
274
275
  };
275
276
  }
276
- function hn(e, t, n, r) {
277
- const o = new Date(e).getTime(), s = new Date(t).getTime(), i = new Date(n).getTime(), c = new Date(r).getTime() - i, f = o - i, d = s - o;
277
+ function yn(e, t, n, r) {
278
+ const o = new Date(e).getTime(), i = new Date(t).getTime(), s = new Date(n).getTime(), c = new Date(r).getTime() - s, f = o - s, d = i - o;
278
279
  return {
279
280
  start: f / c * 100,
280
281
  width: d / c * 100
281
282
  };
282
283
  }
283
- function oe(e, t) {
284
+ function le(e, t) {
284
285
  const n = new Date(e);
285
286
  return t === "short" ? n.toLocaleDateString() : t === "long" ? n.toLocaleDateString("en-US", {
286
287
  year: "numeric",
@@ -288,42 +289,42 @@ function oe(e, t) {
288
289
  day: "numeric"
289
290
  }) : n.toISOString().split("T")[0];
290
291
  }
291
- const _t = ({ schema: e, className: t, ...n }) => {
292
+ const wt = ({ schema: e, className: t, ...n }) => {
292
293
  const {
293
294
  variant: r = "vertical",
294
295
  items: o = [],
295
- dateFormat: s = "short",
296
- onItemClick: i
296
+ dateFormat: i = "short",
297
+ onItemClick: s
297
298
  } = e;
298
299
  if (r === "vertical")
299
- return /* @__PURE__ */ m.jsx(Vt, { className: t, ...n, children: o.map((a, c) => /* @__PURE__ */ m.jsxs(Wt, { className: a.className, children: [
300
- /* @__PURE__ */ m.jsx(Se, { variant: a.variant || "default", children: a.icon && /* @__PURE__ */ m.jsx("span", { className: "text-xs", children: a.icon }) }),
301
- /* @__PURE__ */ m.jsxs(Gt, { children: [
302
- a.time && /* @__PURE__ */ m.jsx(Ze, { dateTime: a.time, children: oe(a.time, s) }),
303
- a.title && /* @__PURE__ */ m.jsx(Oe, { children: a.title }),
304
- a.description && /* @__PURE__ */ m.jsx(je, { children: a.description }),
305
- a.content && Be(a.content)
300
+ return /* @__PURE__ */ h.jsx(Yt, { className: t, ...n, children: o.map((a, c) => /* @__PURE__ */ h.jsxs(Bt, { className: j(a.className, s && "cursor-pointer"), onClick: () => s?.(a), children: [
301
+ /* @__PURE__ */ h.jsx(Ee, { variant: a.variant || "default", children: a.icon && /* @__PURE__ */ h.jsx("span", { className: "text-xs", children: a.icon }) }),
302
+ /* @__PURE__ */ h.jsxs(qt, { children: [
303
+ a.time && /* @__PURE__ */ h.jsx(Re, { dateTime: a.time, children: le(a.time, i) }),
304
+ a.title && /* @__PURE__ */ h.jsx(xe, { children: a.title }),
305
+ a.description && /* @__PURE__ */ h.jsx(Pe, { className: "line-clamp-2 sm:line-clamp-none", children: a.description }),
306
+ a.content && Xe(a.content)
306
307
  ] })
307
308
  ] }, c)) });
308
309
  if (r === "horizontal")
309
- return /* @__PURE__ */ m.jsx(Yt, { className: t, ...n, children: o.map((a, c) => /* @__PURE__ */ m.jsxs(Bt, { className: a.className, children: [
310
- /* @__PURE__ */ m.jsxs("div", { className: "flex flex-col items-center", children: [
311
- /* @__PURE__ */ m.jsx(Se, { variant: a.variant || "default", children: a.icon && /* @__PURE__ */ m.jsx("span", { className: "text-xs", children: a.icon }) }),
312
- /* @__PURE__ */ m.jsxs("div", { className: "mt-4 text-center", children: [
313
- a.time && /* @__PURE__ */ m.jsx(Ze, { dateTime: a.time, children: oe(a.time, s) }),
314
- a.title && /* @__PURE__ */ m.jsx(Oe, { children: a.title }),
315
- a.description && /* @__PURE__ */ m.jsx(je, { className: "text-center", children: a.description }),
316
- a.content && Be(a.content)
310
+ return /* @__PURE__ */ h.jsx(Kt, { className: j("overflow-x-auto [-webkit-overflow-scrolling:touch]", t), ...n, children: o.map((a, c) => /* @__PURE__ */ h.jsxs(Ht, { className: j(a.className, s && "cursor-pointer"), onClick: () => s?.(a), children: [
311
+ /* @__PURE__ */ h.jsxs("div", { className: "flex flex-col items-center", children: [
312
+ /* @__PURE__ */ h.jsx(Ee, { variant: a.variant || "default", children: a.icon && /* @__PURE__ */ h.jsx("span", { className: "text-xs", children: a.icon }) }),
313
+ /* @__PURE__ */ h.jsxs("div", { className: "mt-4 text-center", children: [
314
+ a.time && /* @__PURE__ */ h.jsx(Re, { dateTime: a.time, children: le(a.time, i) }),
315
+ a.title && /* @__PURE__ */ h.jsx(xe, { children: a.title }),
316
+ a.description && /* @__PURE__ */ h.jsx(Pe, { className: "text-center line-clamp-2 sm:line-clamp-none", children: a.description }),
317
+ a.content && Xe(a.content)
317
318
  ] })
318
319
  ] }),
319
- c < o.length - 1 && /* @__PURE__ */ m.jsx("div", { className: "absolute left-full w-16 border-t-2 border-gray-200 top-3" })
320
+ c < o.length - 1 && /* @__PURE__ */ h.jsx("div", { className: "absolute left-full w-16 border-t-2 border-gray-200 top-3" })
320
321
  ] }, c)) });
321
322
  if (r === "gantt") {
322
- const a = pn(o), c = e.minDate || a.minDate, f = e.maxDate || a.maxDate, d = e.timeScale || "month", h = (() => {
323
- const p = [], w = new Date(c), v = new Date(f);
323
+ const a = vn(o), c = e.minDate || a.minDate, f = e.maxDate || a.maxDate, d = e.timeScale || "month", m = (() => {
324
+ const p = [], w = new Date(c), y = new Date(f);
324
325
  if (d === "month") {
325
326
  const b = new Date(w);
326
- for (; b <= v; )
327
+ for (; b <= y; )
327
328
  p.push(
328
329
  b.toLocaleDateString("en-US", {
329
330
  month: "short",
@@ -332,15 +333,15 @@ const _t = ({ schema: e, className: t, ...n }) => {
332
333
  ), b.setMonth(b.getMonth() + 1);
333
334
  } else if (d === "week") {
334
335
  const b = new Date(w);
335
- for (; b <= v; )
336
+ for (; b <= y; )
336
337
  p.push(
337
338
  `Week ${Math.ceil(
338
- (b.getTime() - w.getTime()) / dn
339
+ (b.getTime() - w.getTime()) / _n
339
340
  ) + 1}`
340
341
  ), b.setDate(b.getDate() + 7);
341
342
  } else if (d === "day") {
342
343
  const b = new Date(w);
343
- for (; b <= v; )
344
+ for (; b <= y; )
344
345
  p.push(
345
346
  b.toLocaleDateString("en-US", {
346
347
  month: "short",
@@ -350,37 +351,37 @@ const _t = ({ schema: e, className: t, ...n }) => {
350
351
  }
351
352
  return p;
352
353
  })();
353
- return /* @__PURE__ */ m.jsxs(qt, { className: t, ...n, children: [
354
- /* @__PURE__ */ m.jsxs(Kt, { children: [
355
- /* @__PURE__ */ m.jsx(Ee, { className: "flex items-center px-4 py-3", children: /* @__PURE__ */ m.jsx("span", { className: "font-semibold text-sm", children: e.rowLabel || "Items" }) }),
356
- /* @__PURE__ */ m.jsx(Pe, { children: /* @__PURE__ */ m.jsx("div", { className: "flex h-full", children: h.map((p, w) => /* @__PURE__ */ m.jsx(
354
+ return /* @__PURE__ */ h.jsxs(Xt, { className: j("overflow-x-auto [-webkit-overflow-scrolling:touch]", t), ...n, children: [
355
+ /* @__PURE__ */ h.jsxs(Qt, { children: [
356
+ /* @__PURE__ */ h.jsx(Ne, { className: "flex items-center px-2 sm:px-4 py-2 sm:py-3", children: /* @__PURE__ */ h.jsx("span", { className: "font-semibold text-xs sm:text-sm", children: e.rowLabel || "Items" }) }),
357
+ /* @__PURE__ */ h.jsx(De, { children: /* @__PURE__ */ h.jsx("div", { className: "flex h-full", children: m.map((p, w) => /* @__PURE__ */ h.jsx(
357
358
  "div",
358
359
  {
359
- className: "flex-1 px-2 py-3 border-r text-xs font-medium text-center",
360
+ className: "flex-1 px-1 sm:px-2 py-2 sm:py-3 border-r text-xs font-medium text-center",
360
361
  children: p
361
362
  },
362
363
  w
363
364
  )) }) })
364
365
  ] }),
365
- /* @__PURE__ */ m.jsx("div", { children: /* @__PURE__ */ m.jsxs("div", { className: "flex", children: [
366
- /* @__PURE__ */ m.jsx(Ee, { children: o.map((p, w) => /* @__PURE__ */ m.jsx(Re, { children: /* @__PURE__ */ m.jsx(Ht, { title: p.label, children: p.label }) }, w)) }),
367
- /* @__PURE__ */ m.jsx(Pe, { className: "relative", children: o.map((p, w) => /* @__PURE__ */ m.jsx(Re, { className: "relative", children: (p.items || []).map((v, b) => {
368
- const U = hn(
369
- v.startDate,
370
- v.endDate,
366
+ /* @__PURE__ */ h.jsx("div", { children: /* @__PURE__ */ h.jsxs("div", { className: "flex", children: [
367
+ /* @__PURE__ */ h.jsx(Ne, { children: o.map((p, w) => /* @__PURE__ */ h.jsx(Ae, { children: /* @__PURE__ */ h.jsx(en, { title: p.label, className: "truncate", children: p.label }) }, w)) }),
368
+ /* @__PURE__ */ h.jsx(De, { className: "relative", children: o.map((p, w) => /* @__PURE__ */ h.jsx(Ae, { className: "relative", children: (p.items || []).map((y, b) => {
369
+ const M = yn(
370
+ y.startDate,
371
+ y.endDate,
371
372
  c,
372
373
  f
373
374
  );
374
- return /* @__PURE__ */ m.jsx(
375
- Xt,
375
+ return /* @__PURE__ */ h.jsx(
376
+ tn,
376
377
  {
377
- start: U.start,
378
- width: U.width,
379
- variant: v.variant || "default",
380
- onClick: () => i?.(v, p, w, b),
381
- title: `${v.title || ""}
382
- ${oe(v.startDate, s)} - ${oe(v.endDate, s)}`,
383
- children: /* @__PURE__ */ m.jsx(Qt, { children: v.title })
378
+ start: M.start,
379
+ width: M.width,
380
+ variant: y.variant || "default",
381
+ onClick: () => s?.(y, p, w, b),
382
+ title: `${y.title || ""}
383
+ ${le(y.startDate, i)} - ${le(y.endDate, i)}`,
384
+ children: /* @__PURE__ */ h.jsx(nn, { children: y.title })
384
385
  },
385
386
  b
386
387
  );
@@ -390,9 +391,9 @@ ${oe(v.startDate, s)} - ${oe(v.endDate, s)}`,
390
391
  }
391
392
  return null;
392
393
  };
393
- gt.register(
394
+ Ie.register(
394
395
  "timeline",
395
- _t,
396
+ wt,
396
397
  {
397
398
  namespace: "plugin-timeline",
398
399
  label: "Timeline",
@@ -589,57 +590,57 @@ function u(e, t, n) {
589
590
  if (a._zod || Object.defineProperty(a, "_zod", {
590
591
  value: {
591
592
  def: c,
592
- constr: i,
593
+ constr: s,
593
594
  traits: /* @__PURE__ */ new Set()
594
595
  },
595
596
  enumerable: !1
596
597
  }), a._zod.traits.has(e))
597
598
  return;
598
599
  a._zod.traits.add(e), t(a, c);
599
- const f = i.prototype, d = Object.keys(f);
600
- for (let g = 0; g < d.length; g++) {
601
- const h = d[g];
602
- h in a || (a[h] = f[h].bind(a));
600
+ const f = s.prototype, d = Object.keys(f);
601
+ for (let _ = 0; _ < d.length; _++) {
602
+ const m = d[_];
603
+ m in a || (a[m] = f[m].bind(a));
603
604
  }
604
605
  }
605
606
  const o = n?.Parent ?? Object;
606
- class s extends o {
607
+ class i extends o {
607
608
  }
608
- Object.defineProperty(s, "name", { value: e });
609
- function i(a) {
609
+ Object.defineProperty(i, "name", { value: e });
610
+ function s(a) {
610
611
  var c;
611
- const f = n?.Parent ? new s() : this;
612
+ const f = n?.Parent ? new i() : this;
612
613
  r(f, a), (c = f._zod).deferred ?? (c.deferred = []);
613
614
  for (const d of f._zod.deferred)
614
615
  d();
615
616
  return f;
616
617
  }
617
- return Object.defineProperty(i, "init", { value: r }), Object.defineProperty(i, Symbol.hasInstance, {
618
+ return Object.defineProperty(s, "init", { value: r }), Object.defineProperty(s, Symbol.hasInstance, {
618
619
  value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(e)
619
- }), Object.defineProperty(i, "name", { value: e }), i;
620
+ }), Object.defineProperty(s, "name", { value: e }), s;
620
621
  }
621
- class q extends Error {
622
+ class X extends Error {
622
623
  constructor() {
623
624
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
624
625
  }
625
626
  }
626
- class vt extends Error {
627
+ class bt extends Error {
627
628
  constructor(t) {
628
629
  super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
629
630
  }
630
631
  }
631
- const yt = {};
632
- function V(e) {
633
- return yt;
632
+ const zt = {};
633
+ function Y(e) {
634
+ return zt;
634
635
  }
635
- function wt(e) {
636
+ function kt(e) {
636
637
  const t = Object.values(e).filter((r) => typeof r == "number");
637
638
  return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
638
639
  }
639
- function ke(e, t) {
640
+ function je(e, t) {
640
641
  return typeof t == "bigint" ? t.toString() : t;
641
642
  }
642
- function De(e) {
643
+ function Ce(e) {
643
644
  return {
644
645
  get value() {
645
646
  {
@@ -649,20 +650,20 @@ function De(e) {
649
650
  }
650
651
  };
651
652
  }
652
- function xe(e) {
653
+ function Fe(e) {
653
654
  return e == null;
654
655
  }
655
- function Ne(e) {
656
+ function Ue(e) {
656
657
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
657
658
  return e.slice(t, n);
658
659
  }
659
- const Xe = /* @__PURE__ */ Symbol("evaluating");
660
+ const nt = /* @__PURE__ */ Symbol("evaluating");
660
661
  function z(e, t, n) {
661
662
  let r;
662
663
  Object.defineProperty(e, t, {
663
664
  get() {
664
- if (r !== Xe)
665
- return r === void 0 && (r = Xe, r = n()), r;
665
+ if (r !== nt)
666
+ return r === void 0 && (r = nt, r = n()), r;
666
667
  },
667
668
  set(o) {
668
669
  Object.defineProperty(e, t, {
@@ -673,7 +674,7 @@ function z(e, t, n) {
673
674
  configurable: !0
674
675
  });
675
676
  }
676
- function G(e, t, n) {
677
+ function q(e, t, n) {
677
678
  Object.defineProperty(e, t, {
678
679
  value: n,
679
680
  writable: !0,
@@ -681,7 +682,7 @@ function G(e, t, n) {
681
682
  configurable: !0
682
683
  });
683
684
  }
684
- function J(...e) {
685
+ function W(...e) {
685
686
  const t = {};
686
687
  for (const n of e) {
687
688
  const r = Object.getOwnPropertyDescriptors(n);
@@ -689,18 +690,18 @@ function J(...e) {
689
690
  }
690
691
  return Object.defineProperties({}, t);
691
692
  }
692
- function Qe(e) {
693
+ function rt(e) {
693
694
  return JSON.stringify(e);
694
695
  }
695
- function mn(e) {
696
+ function wn(e) {
696
697
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
697
698
  }
698
- const bt = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
699
+ const $t = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
699
700
  };
700
- function ce(e) {
701
+ function he(e) {
701
702
  return typeof e == "object" && e !== null && !Array.isArray(e);
702
703
  }
703
- const gn = De(() => {
704
+ const bn = Ce(() => {
704
705
  if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
705
706
  return !1;
706
707
  try {
@@ -710,27 +711,27 @@ const gn = De(() => {
710
711
  return !1;
711
712
  }
712
713
  });
713
- function ee(e) {
714
- if (ce(e) === !1)
714
+ function oe(e) {
715
+ if (he(e) === !1)
715
716
  return !1;
716
717
  const t = e.constructor;
717
718
  if (t === void 0 || typeof t != "function")
718
719
  return !0;
719
720
  const n = t.prototype;
720
- return !(ce(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
721
+ return !(he(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
721
722
  }
722
- function zt(e) {
723
- return ee(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
723
+ function Tt(e) {
724
+ return oe(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
724
725
  }
725
- const _n = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
726
- function de(e) {
726
+ const zn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
727
+ function ve(e) {
727
728
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
728
729
  }
729
- function M(e, t, n) {
730
+ function G(e, t, n) {
730
731
  const r = new e._zod.constr(t ?? e._zod.def);
731
732
  return (!t || n?.parent) && (r._zod.parent = e), r;
732
733
  }
733
- function _(e) {
734
+ function g(e) {
734
735
  const t = e;
735
736
  if (!t)
736
737
  return {};
@@ -743,79 +744,79 @@ function _(e) {
743
744
  }
744
745
  return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
745
746
  }
746
- function vn(e) {
747
+ function kn(e) {
747
748
  return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
748
749
  }
749
- function yn(e, t) {
750
+ function $n(e, t) {
750
751
  const n = e._zod.def, r = n.checks;
751
752
  if (r && r.length > 0)
752
753
  throw new Error(".pick() cannot be used on object schemas containing refinements");
753
- const s = J(e._zod.def, {
754
+ const i = W(e._zod.def, {
754
755
  get shape() {
755
- const i = {};
756
+ const s = {};
756
757
  for (const a in t) {
757
758
  if (!(a in n.shape))
758
759
  throw new Error(`Unrecognized key: "${a}"`);
759
- t[a] && (i[a] = n.shape[a]);
760
+ t[a] && (s[a] = n.shape[a]);
760
761
  }
761
- return G(this, "shape", i), i;
762
+ return q(this, "shape", s), s;
762
763
  },
763
764
  checks: []
764
765
  });
765
- return M(e, s);
766
+ return G(e, i);
766
767
  }
767
- function wn(e, t) {
768
+ function Tn(e, t) {
768
769
  const n = e._zod.def, r = n.checks;
769
770
  if (r && r.length > 0)
770
771
  throw new Error(".omit() cannot be used on object schemas containing refinements");
771
- const s = J(e._zod.def, {
772
+ const i = W(e._zod.def, {
772
773
  get shape() {
773
- const i = { ...e._zod.def.shape };
774
+ const s = { ...e._zod.def.shape };
774
775
  for (const a in t) {
775
776
  if (!(a in n.shape))
776
777
  throw new Error(`Unrecognized key: "${a}"`);
777
- t[a] && delete i[a];
778
+ t[a] && delete s[a];
778
779
  }
779
- return G(this, "shape", i), i;
780
+ return q(this, "shape", s), s;
780
781
  },
781
782
  checks: []
782
783
  });
783
- return M(e, s);
784
+ return G(e, i);
784
785
  }
785
- function bn(e, t) {
786
- if (!ee(t))
786
+ function On(e, t) {
787
+ if (!oe(t))
787
788
  throw new Error("Invalid input to extend: expected a plain object");
788
789
  const n = e._zod.def.checks;
789
790
  if (n && n.length > 0) {
790
- const s = e._zod.def.shape;
791
- for (const i in t)
792
- if (Object.getOwnPropertyDescriptor(s, i) !== void 0)
791
+ const i = e._zod.def.shape;
792
+ for (const s in t)
793
+ if (Object.getOwnPropertyDescriptor(i, s) !== void 0)
793
794
  throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
794
795
  }
795
- const o = J(e._zod.def, {
796
+ const o = W(e._zod.def, {
796
797
  get shape() {
797
- const s = { ...e._zod.def.shape, ...t };
798
- return G(this, "shape", s), s;
798
+ const i = { ...e._zod.def.shape, ...t };
799
+ return q(this, "shape", i), i;
799
800
  }
800
801
  });
801
- return M(e, o);
802
+ return G(e, o);
802
803
  }
803
- function zn(e, t) {
804
- if (!ee(t))
804
+ function jn(e, t) {
805
+ if (!oe(t))
805
806
  throw new Error("Invalid input to safeExtend: expected a plain object");
806
- const n = J(e._zod.def, {
807
+ const n = W(e._zod.def, {
807
808
  get shape() {
808
809
  const r = { ...e._zod.def.shape, ...t };
809
- return G(this, "shape", r), r;
810
+ return q(this, "shape", r), r;
810
811
  }
811
812
  });
812
- return M(e, n);
813
+ return G(e, n);
813
814
  }
814
- function kn(e, t) {
815
- const n = J(e._zod.def, {
815
+ function Sn(e, t) {
816
+ const n = W(e._zod.def, {
816
817
  get shape() {
817
818
  const r = { ...e._zod.def.shape, ...t._zod.def.shape };
818
- return G(this, "shape", r), r;
819
+ return q(this, "shape", r), r;
819
820
  },
820
821
  get catchall() {
821
822
  return t._zod.def.catchall;
@@ -823,13 +824,13 @@ function kn(e, t) {
823
824
  checks: []
824
825
  // delete existing checks
825
826
  });
826
- return M(e, n);
827
+ return G(e, n);
827
828
  }
828
- function $n(e, t, n) {
829
+ function Zn(e, t, n) {
829
830
  const o = t._zod.def.checks;
830
831
  if (o && o.length > 0)
831
832
  throw new Error(".partial() cannot be used on object schemas containing refinements");
832
- const i = J(t._zod.def, {
833
+ const s = W(t._zod.def, {
833
834
  get shape() {
834
835
  const a = t._zod.def.shape, c = { ...a };
835
836
  if (n)
@@ -847,37 +848,37 @@ function $n(e, t, n) {
847
848
  type: "optional",
848
849
  innerType: a[f]
849
850
  }) : a[f];
850
- return G(this, "shape", c), c;
851
+ return q(this, "shape", c), c;
851
852
  },
852
853
  checks: []
853
854
  });
854
- return M(t, i);
855
+ return G(t, s);
855
856
  }
856
- function Tn(e, t, n) {
857
- const r = J(t._zod.def, {
857
+ function En(e, t, n) {
858
+ const r = W(t._zod.def, {
858
859
  get shape() {
859
- const o = t._zod.def.shape, s = { ...o };
860
+ const o = t._zod.def.shape, i = { ...o };
860
861
  if (n)
861
- for (const i in n) {
862
- if (!(i in s))
863
- throw new Error(`Unrecognized key: "${i}"`);
864
- n[i] && (s[i] = new e({
862
+ for (const s in n) {
863
+ if (!(s in i))
864
+ throw new Error(`Unrecognized key: "${s}"`);
865
+ n[s] && (i[s] = new e({
865
866
  type: "nonoptional",
866
- innerType: o[i]
867
+ innerType: o[s]
867
868
  }));
868
869
  }
869
870
  else
870
- for (const i in o)
871
- s[i] = new e({
871
+ for (const s in o)
872
+ i[s] = new e({
872
873
  type: "nonoptional",
873
- innerType: o[i]
874
+ innerType: o[s]
874
875
  });
875
- return G(this, "shape", s), s;
876
+ return q(this, "shape", i), i;
876
877
  }
877
878
  });
878
- return M(t, r);
879
+ return G(t, r);
879
880
  }
880
- function B(e, t = 0) {
881
+ function H(e, t = 0) {
881
882
  if (e.aborted === !0)
882
883
  return !0;
883
884
  for (let n = t; n < e.issues.length; n++)
@@ -885,27 +886,27 @@ function B(e, t = 0) {
885
886
  return !0;
886
887
  return !1;
887
888
  }
888
- function kt(e, t) {
889
+ function Ot(e, t) {
889
890
  return t.map((n) => {
890
891
  var r;
891
892
  return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
892
893
  });
893
894
  }
894
- function ie(e) {
895
+ function fe(e) {
895
896
  return typeof e == "string" ? e : e?.message;
896
897
  }
897
- function W(e, t, n) {
898
+ function B(e, t, n) {
898
899
  const r = { ...e, path: e.path ?? [] };
899
900
  if (!e.message) {
900
- const o = ie(e.inst?._zod.def?.error?.(e)) ?? ie(t?.error?.(e)) ?? ie(n.customError?.(e)) ?? ie(n.localeError?.(e)) ?? "Invalid input";
901
+ const o = fe(e.inst?._zod.def?.error?.(e)) ?? fe(t?.error?.(e)) ?? fe(n.customError?.(e)) ?? fe(n.localeError?.(e)) ?? "Invalid input";
901
902
  r.message = o;
902
903
  }
903
904
  return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
904
905
  }
905
- function Ae(e) {
906
+ function Le(e) {
906
907
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
907
908
  }
908
- function te(...e) {
909
+ function se(...e) {
909
910
  const [t, n, r] = e;
910
911
  return typeof t == "string" ? {
911
912
  message: t,
@@ -914,118 +915,118 @@ function te(...e) {
914
915
  inst: r
915
916
  } : { ...t };
916
917
  }
917
- const $t = (e, t) => {
918
+ const jt = (e, t) => {
918
919
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
919
920
  value: e._zod,
920
921
  enumerable: !1
921
922
  }), Object.defineProperty(e, "issues", {
922
923
  value: t,
923
924
  enumerable: !1
924
- }), e.message = JSON.stringify(t, ke, 2), Object.defineProperty(e, "toString", {
925
+ }), e.message = JSON.stringify(t, je, 2), Object.defineProperty(e, "toString", {
925
926
  value: () => e.message,
926
927
  enumerable: !1
927
928
  });
928
- }, Tt = u("$ZodError", $t), St = u("$ZodError", $t, { Parent: Error });
929
- function Sn(e, t = (n) => n.message) {
929
+ }, St = u("$ZodError", jt), Zt = u("$ZodError", jt, { Parent: Error });
930
+ function xn(e, t = (n) => n.message) {
930
931
  const n = {}, r = [];
931
932
  for (const o of e.issues)
932
933
  o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
933
934
  return { formErrors: r, fieldErrors: n };
934
935
  }
935
- function On(e, t = (n) => n.message) {
936
+ function Rn(e, t = (n) => n.message) {
936
937
  const n = { _errors: [] }, r = (o) => {
937
- for (const s of o.issues)
938
- if (s.code === "invalid_union" && s.errors.length)
939
- s.errors.map((i) => r({ issues: i }));
940
- else if (s.code === "invalid_key")
941
- r({ issues: s.issues });
942
- else if (s.code === "invalid_element")
943
- r({ issues: s.issues });
944
- else if (s.path.length === 0)
945
- n._errors.push(t(s));
938
+ for (const i of o.issues)
939
+ if (i.code === "invalid_union" && i.errors.length)
940
+ i.errors.map((s) => r({ issues: s }));
941
+ else if (i.code === "invalid_key")
942
+ r({ issues: i.issues });
943
+ else if (i.code === "invalid_element")
944
+ r({ issues: i.issues });
945
+ else if (i.path.length === 0)
946
+ n._errors.push(t(i));
946
947
  else {
947
- let i = n, a = 0;
948
- for (; a < s.path.length; ) {
949
- const c = s.path[a];
950
- a === s.path.length - 1 ? (i[c] = i[c] || { _errors: [] }, i[c]._errors.push(t(s))) : i[c] = i[c] || { _errors: [] }, i = i[c], a++;
948
+ let s = n, a = 0;
949
+ for (; a < i.path.length; ) {
950
+ const c = i.path[a];
951
+ a === i.path.length - 1 ? (s[c] = s[c] || { _errors: [] }, s[c]._errors.push(t(i))) : s[c] = s[c] || { _errors: [] }, s = s[c], a++;
951
952
  }
952
953
  }
953
954
  };
954
955
  return r(e), n;
955
956
  }
956
- const Ie = (e) => (t, n, r, o) => {
957
- const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, s);
958
- if (i instanceof Promise)
959
- throw new q();
960
- if (i.issues.length) {
961
- const a = new (o?.Err ?? e)(i.issues.map((c) => W(c, s, V())));
962
- throw bt(a, o?.callee), a;
957
+ const Je = (e) => (t, n, r, o) => {
958
+ const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, i);
959
+ if (s instanceof Promise)
960
+ throw new X();
961
+ if (s.issues.length) {
962
+ const a = new (o?.Err ?? e)(s.issues.map((c) => B(c, i, Y())));
963
+ throw $t(a, o?.callee), a;
963
964
  }
964
- return i.value;
965
- }, Ce = (e) => async (t, n, r, o) => {
966
- const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
967
- let i = t._zod.run({ value: n, issues: [] }, s);
968
- if (i instanceof Promise && (i = await i), i.issues.length) {
969
- const a = new (o?.Err ?? e)(i.issues.map((c) => W(c, s, V())));
970
- throw bt(a, o?.callee), a;
965
+ return s.value;
966
+ }, Me = (e) => async (t, n, r, o) => {
967
+ const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
968
+ let s = t._zod.run({ value: n, issues: [] }, i);
969
+ if (s instanceof Promise && (s = await s), s.issues.length) {
970
+ const a = new (o?.Err ?? e)(s.issues.map((c) => B(c, i, Y())));
971
+ throw $t(a, o?.callee), a;
971
972
  }
972
- return i.value;
973
- }, pe = (e) => (t, n, r) => {
974
- const o = r ? { ...r, async: !1 } : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, o);
975
- if (s instanceof Promise)
976
- throw new q();
977
- return s.issues.length ? {
973
+ return s.value;
974
+ }, ye = (e) => (t, n, r) => {
975
+ const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
976
+ if (i instanceof Promise)
977
+ throw new X();
978
+ return i.issues.length ? {
978
979
  success: !1,
979
- error: new (e ?? Tt)(s.issues.map((i) => W(i, o, V())))
980
- } : { success: !0, data: s.value };
981
- }, Zn = /* @__PURE__ */ pe(St), he = (e) => async (t, n, r) => {
980
+ error: new (e ?? St)(i.issues.map((s) => B(s, o, Y())))
981
+ } : { success: !0, data: i.value };
982
+ }, Pn = /* @__PURE__ */ ye(Zt), we = (e) => async (t, n, r) => {
982
983
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
983
- let s = t._zod.run({ value: n, issues: [] }, o);
984
- return s instanceof Promise && (s = await s), s.issues.length ? {
984
+ let i = t._zod.run({ value: n, issues: [] }, o);
985
+ return i instanceof Promise && (i = await i), i.issues.length ? {
985
986
  success: !1,
986
- error: new e(s.issues.map((i) => W(i, o, V())))
987
- } : { success: !0, data: s.value };
988
- }, jn = /* @__PURE__ */ he(St), En = (e) => (t, n, r) => {
987
+ error: new e(i.issues.map((s) => B(s, o, Y())))
988
+ } : { success: !0, data: i.value };
989
+ }, Nn = /* @__PURE__ */ we(Zt), Dn = (e) => (t, n, r) => {
989
990
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
990
- return Ie(e)(t, n, o);
991
- }, Pn = (e) => (t, n, r) => Ie(e)(t, n, r), Rn = (e) => async (t, n, r) => {
991
+ return Je(e)(t, n, o);
992
+ }, An = (e) => (t, n, r) => Je(e)(t, n, r), In = (e) => async (t, n, r) => {
992
993
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
993
- return Ce(e)(t, n, o);
994
- }, Dn = (e) => async (t, n, r) => Ce(e)(t, n, r), xn = (e) => (t, n, r) => {
994
+ return Me(e)(t, n, o);
995
+ }, Cn = (e) => async (t, n, r) => Me(e)(t, n, r), Fn = (e) => (t, n, r) => {
995
996
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
996
- return pe(e)(t, n, o);
997
- }, Nn = (e) => (t, n, r) => pe(e)(t, n, r), An = (e) => async (t, n, r) => {
997
+ return ye(e)(t, n, o);
998
+ }, Un = (e) => (t, n, r) => ye(e)(t, n, r), Ln = (e) => async (t, n, r) => {
998
999
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
999
- return he(e)(t, n, o);
1000
- }, In = (e) => async (t, n, r) => he(e)(t, n, r), Cn = /^[cC][^\s-]{8,}$/, Fn = /^[0-9a-z]+$/, Un = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Ln = /^[0-9a-vA-V]{20}$/, Jn = /^[A-Za-z0-9]{27}$/, Mn = /^[a-zA-Z0-9_-]{21}$/, Vn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Wn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, et = (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)$/, Gn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Yn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1001
- function Bn() {
1002
- return new RegExp(Yn, "u");
1000
+ return we(e)(t, n, o);
1001
+ }, Jn = (e) => async (t, n, r) => we(e)(t, n, r), Mn = /^[cC][^\s-]{8,}$/, Vn = /^[0-9a-z]+$/, Wn = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, Gn = /^[0-9a-vA-V]{20}$/, Yn = /^[A-Za-z0-9]{27}$/, Bn = /^[a-zA-Z0-9_-]{21}$/, qn = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, Kn = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, ot = (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)$/, Hn = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, Xn = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
1002
+ function Qn() {
1003
+ return new RegExp(Xn, "u");
1003
1004
  }
1004
- const 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])$/, Kn = /^(([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 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, Xn = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, Qn = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Ot = /^[A-Za-z0-9_-]*$/, er = /^\+[1-9]\d{6,14}$/, Zt = "(?:(?:\\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])))", tr = /* @__PURE__ */ new RegExp(`^${Zt}$`);
1005
- function jt(e) {
1005
+ const er = /^(?:(?: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])$/, tr = /^(([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}|:))$/, nr = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, rr = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, or = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Et = /^[A-Za-z0-9_-]*$/, sr = /^\+[1-9]\d{6,14}$/, xt = "(?:(?:\\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])))", ir = /* @__PURE__ */ new RegExp(`^${xt}$`);
1006
+ function Rt(e) {
1006
1007
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
1007
1008
  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+)?)?`;
1008
1009
  }
1009
- function nr(e) {
1010
- return new RegExp(`^${jt(e)}$`);
1010
+ function ar(e) {
1011
+ return new RegExp(`^${Rt(e)}$`);
1011
1012
  }
1012
- function rr(e) {
1013
- const t = jt({ precision: e.precision }), n = ["Z"];
1013
+ function cr(e) {
1014
+ const t = Rt({ precision: e.precision }), n = ["Z"];
1014
1015
  e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
1015
1016
  const r = `${t}(?:${n.join("|")})`;
1016
- return new RegExp(`^${Zt}T(?:${r})$`);
1017
+ return new RegExp(`^${xt}T(?:${r})$`);
1017
1018
  }
1018
- const or = (e) => {
1019
+ const ur = (e) => {
1019
1020
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
1020
1021
  return new RegExp(`^${t}$`);
1021
- }, ir = /^[^A-Z]*$/, sr = /^[^a-z]*$/, F = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
1022
+ }, lr = /^[^A-Z]*$/, fr = /^[^a-z]*$/, L = /* @__PURE__ */ u("$ZodCheck", (e, t) => {
1022
1023
  var n;
1023
1024
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
1024
- }), ar = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
1025
+ }), dr = /* @__PURE__ */ u("$ZodCheckMaxLength", (e, t) => {
1025
1026
  var n;
1026
- F.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1027
+ L.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1027
1028
  const o = r.value;
1028
- return !xe(o) && o.length !== void 0;
1029
+ return !Fe(o) && o.length !== void 0;
1029
1030
  }), e._zod.onattach.push((r) => {
1030
1031
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1031
1032
  t.maximum < o && (r._zod.bag.maximum = t.maximum);
@@ -1033,9 +1034,9 @@ const or = (e) => {
1033
1034
  const o = r.value;
1034
1035
  if (o.length <= t.maximum)
1035
1036
  return;
1036
- const i = Ae(o);
1037
+ const s = Le(o);
1037
1038
  r.issues.push({
1038
- origin: i,
1039
+ origin: s,
1039
1040
  code: "too_big",
1040
1041
  maximum: t.maximum,
1041
1042
  inclusive: !0,
@@ -1044,11 +1045,11 @@ const or = (e) => {
1044
1045
  continue: !t.abort
1045
1046
  });
1046
1047
  };
1047
- }), cr = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
1048
+ }), pr = /* @__PURE__ */ u("$ZodCheckMinLength", (e, t) => {
1048
1049
  var n;
1049
- F.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1050
+ L.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1050
1051
  const o = r.value;
1051
- return !xe(o) && o.length !== void 0;
1052
+ return !Fe(o) && o.length !== void 0;
1052
1053
  }), e._zod.onattach.push((r) => {
1053
1054
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1054
1055
  t.minimum > o && (r._zod.bag.minimum = t.minimum);
@@ -1056,9 +1057,9 @@ const or = (e) => {
1056
1057
  const o = r.value;
1057
1058
  if (o.length >= t.minimum)
1058
1059
  return;
1059
- const i = Ae(o);
1060
+ const s = Le(o);
1060
1061
  r.issues.push({
1061
- origin: i,
1062
+ origin: s,
1062
1063
  code: "too_small",
1063
1064
  minimum: t.minimum,
1064
1065
  inclusive: !0,
@@ -1067,21 +1068,21 @@ const or = (e) => {
1067
1068
  continue: !t.abort
1068
1069
  });
1069
1070
  };
1070
- }), ur = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
1071
+ }), hr = /* @__PURE__ */ u("$ZodCheckLengthEquals", (e, t) => {
1071
1072
  var n;
1072
- F.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1073
+ L.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1073
1074
  const o = r.value;
1074
- return !xe(o) && o.length !== void 0;
1075
+ return !Fe(o) && o.length !== void 0;
1075
1076
  }), e._zod.onattach.push((r) => {
1076
1077
  const o = r._zod.bag;
1077
1078
  o.minimum = t.length, o.maximum = t.length, o.length = t.length;
1078
1079
  }), e._zod.check = (r) => {
1079
- const o = r.value, s = o.length;
1080
- if (s === t.length)
1080
+ const o = r.value, i = o.length;
1081
+ if (i === t.length)
1081
1082
  return;
1082
- const i = Ae(o), a = s > t.length;
1083
+ const s = Le(o), a = i > t.length;
1083
1084
  r.issues.push({
1084
- origin: i,
1085
+ origin: s,
1085
1086
  ...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
1086
1087
  inclusive: !0,
1087
1088
  exact: !0,
@@ -1090,11 +1091,11 @@ const or = (e) => {
1090
1091
  continue: !t.abort
1091
1092
  });
1092
1093
  };
1093
- }), me = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
1094
+ }), be = /* @__PURE__ */ u("$ZodCheckStringFormat", (e, t) => {
1094
1095
  var n, r;
1095
- F.init(e, t), e._zod.onattach.push((o) => {
1096
- const s = o._zod.bag;
1097
- s.format = t.format, t.pattern && (s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(t.pattern));
1096
+ L.init(e, t), e._zod.onattach.push((o) => {
1097
+ const i = o._zod.bag;
1098
+ i.format = t.format, t.pattern && (i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(t.pattern));
1098
1099
  }), t.pattern ? (n = e._zod).check ?? (n.check = (o) => {
1099
1100
  t.pattern.lastIndex = 0, !t.pattern.test(o.value) && o.issues.push({
1100
1101
  origin: "string",
@@ -1107,8 +1108,8 @@ const or = (e) => {
1107
1108
  });
1108
1109
  }) : (r = e._zod).check ?? (r.check = () => {
1109
1110
  });
1110
- }), lr = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
1111
- me.init(e, t), e._zod.check = (n) => {
1111
+ }), mr = /* @__PURE__ */ u("$ZodCheckRegex", (e, t) => {
1112
+ be.init(e, t), e._zod.check = (n) => {
1112
1113
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
1113
1114
  origin: "string",
1114
1115
  code: "invalid_format",
@@ -1119,16 +1120,16 @@ const or = (e) => {
1119
1120
  continue: !t.abort
1120
1121
  });
1121
1122
  };
1122
- }), fr = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
1123
- t.pattern ?? (t.pattern = ir), me.init(e, t);
1124
- }), dr = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
1125
- t.pattern ?? (t.pattern = sr), me.init(e, t);
1126
- }), pr = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
1127
- F.init(e, t);
1128
- const n = de(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
1123
+ }), gr = /* @__PURE__ */ u("$ZodCheckLowerCase", (e, t) => {
1124
+ t.pattern ?? (t.pattern = lr), be.init(e, t);
1125
+ }), _r = /* @__PURE__ */ u("$ZodCheckUpperCase", (e, t) => {
1126
+ t.pattern ?? (t.pattern = fr), be.init(e, t);
1127
+ }), vr = /* @__PURE__ */ u("$ZodCheckIncludes", (e, t) => {
1128
+ L.init(e, t);
1129
+ const n = ve(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
1129
1130
  t.pattern = r, e._zod.onattach.push((o) => {
1130
- const s = o._zod.bag;
1131
- s.patterns ?? (s.patterns = /* @__PURE__ */ new Set()), s.patterns.add(r);
1131
+ const i = o._zod.bag;
1132
+ i.patterns ?? (i.patterns = /* @__PURE__ */ new Set()), i.patterns.add(r);
1132
1133
  }), e._zod.check = (o) => {
1133
1134
  o.value.includes(t.includes, t.position) || o.issues.push({
1134
1135
  origin: "string",
@@ -1140,9 +1141,9 @@ const or = (e) => {
1140
1141
  continue: !t.abort
1141
1142
  });
1142
1143
  };
1143
- }), hr = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
1144
- F.init(e, t);
1145
- const n = new RegExp(`^${de(t.prefix)}.*`);
1144
+ }), yr = /* @__PURE__ */ u("$ZodCheckStartsWith", (e, t) => {
1145
+ L.init(e, t);
1146
+ const n = new RegExp(`^${ve(t.prefix)}.*`);
1146
1147
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
1147
1148
  const o = r._zod.bag;
1148
1149
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
@@ -1157,9 +1158,9 @@ const or = (e) => {
1157
1158
  continue: !t.abort
1158
1159
  });
1159
1160
  };
1160
- }), mr = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
1161
- F.init(e, t);
1162
- const n = new RegExp(`.*${de(t.suffix)}$`);
1161
+ }), wr = /* @__PURE__ */ u("$ZodCheckEndsWith", (e, t) => {
1162
+ L.init(e, t);
1163
+ const n = new RegExp(`.*${ve(t.suffix)}$`);
1163
1164
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
1164
1165
  const o = r._zod.bag;
1165
1166
  o.patterns ?? (o.patterns = /* @__PURE__ */ new Set()), o.patterns.add(n);
@@ -1174,12 +1175,12 @@ const or = (e) => {
1174
1175
  continue: !t.abort
1175
1176
  });
1176
1177
  };
1177
- }), gr = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
1178
- F.init(e, t), e._zod.check = (n) => {
1178
+ }), br = /* @__PURE__ */ u("$ZodCheckOverwrite", (e, t) => {
1179
+ L.init(e, t), e._zod.check = (n) => {
1179
1180
  n.value = t.tx(n.value);
1180
1181
  };
1181
1182
  });
1182
- class _r {
1183
+ class zr {
1183
1184
  constructor(t = []) {
1184
1185
  this.content = [], this.indent = 0, this && (this.args = t);
1185
1186
  }
@@ -1192,77 +1193,77 @@ class _r {
1192
1193
  return;
1193
1194
  }
1194
1195
  const r = t.split(`
1195
- `).filter((i) => i), o = Math.min(...r.map((i) => i.length - i.trimStart().length)), s = r.map((i) => i.slice(o)).map((i) => " ".repeat(this.indent * 2) + i);
1196
- for (const i of s)
1197
- this.content.push(i);
1196
+ `).filter((s) => s), o = Math.min(...r.map((s) => s.length - s.trimStart().length)), i = r.map((s) => s.slice(o)).map((s) => " ".repeat(this.indent * 2) + s);
1197
+ for (const s of i)
1198
+ this.content.push(s);
1198
1199
  }
1199
1200
  compile() {
1200
- const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((s) => ` ${s}`)];
1201
+ const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((i) => ` ${i}`)];
1201
1202
  return new t(...n, o.join(`
1202
1203
  `));
1203
1204
  }
1204
1205
  }
1205
- const vr = {
1206
+ const kr = {
1206
1207
  major: 4,
1207
1208
  minor: 3,
1208
1209
  patch: 6
1209
- }, Z = /* @__PURE__ */ u("$ZodType", (e, t) => {
1210
+ }, x = /* @__PURE__ */ u("$ZodType", (e, t) => {
1210
1211
  var n;
1211
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = vr;
1212
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = kr;
1212
1213
  const r = [...e._zod.def.checks ?? []];
1213
1214
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
1214
1215
  for (const o of r)
1215
- for (const s of o._zod.onattach)
1216
- s(e);
1216
+ for (const i of o._zod.onattach)
1217
+ i(e);
1217
1218
  if (r.length === 0)
1218
1219
  (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
1219
1220
  e._zod.run = e._zod.parse;
1220
1221
  });
1221
1222
  else {
1222
- const o = (i, a, c) => {
1223
- let f = B(i), d;
1224
- for (const g of a) {
1225
- if (g._zod.def.when) {
1226
- if (!g._zod.def.when(i))
1223
+ const o = (s, a, c) => {
1224
+ let f = H(s), d;
1225
+ for (const _ of a) {
1226
+ if (_._zod.def.when) {
1227
+ if (!_._zod.def.when(s))
1227
1228
  continue;
1228
1229
  } else if (f)
1229
1230
  continue;
1230
- const h = i.issues.length, p = g._zod.check(i);
1231
+ const m = s.issues.length, p = _._zod.check(s);
1231
1232
  if (p instanceof Promise && c?.async === !1)
1232
- throw new q();
1233
+ throw new X();
1233
1234
  if (d || p instanceof Promise)
1234
1235
  d = (d ?? Promise.resolve()).then(async () => {
1235
- await p, i.issues.length !== h && (f || (f = B(i, h)));
1236
+ await p, s.issues.length !== m && (f || (f = H(s, m)));
1236
1237
  });
1237
1238
  else {
1238
- if (i.issues.length === h)
1239
+ if (s.issues.length === m)
1239
1240
  continue;
1240
- f || (f = B(i, h));
1241
+ f || (f = H(s, m));
1241
1242
  }
1242
1243
  }
1243
- return d ? d.then(() => i) : i;
1244
- }, s = (i, a, c) => {
1245
- if (B(i))
1246
- return i.aborted = !0, i;
1244
+ return d ? d.then(() => s) : s;
1245
+ }, i = (s, a, c) => {
1246
+ if (H(s))
1247
+ return s.aborted = !0, s;
1247
1248
  const f = o(a, r, c);
1248
1249
  if (f instanceof Promise) {
1249
1250
  if (c.async === !1)
1250
- throw new q();
1251
+ throw new X();
1251
1252
  return f.then((d) => e._zod.parse(d, c));
1252
1253
  }
1253
1254
  return e._zod.parse(f, c);
1254
1255
  };
1255
- e._zod.run = (i, a) => {
1256
+ e._zod.run = (s, a) => {
1256
1257
  if (a.skipChecks)
1257
- return e._zod.parse(i, a);
1258
+ return e._zod.parse(s, a);
1258
1259
  if (a.direction === "backward") {
1259
- const f = e._zod.parse({ value: i.value, issues: [] }, { ...a, skipChecks: !0 });
1260
- return f instanceof Promise ? f.then((d) => s(d, i, a)) : s(f, i, a);
1260
+ const f = e._zod.parse({ value: s.value, issues: [] }, { ...a, skipChecks: !0 });
1261
+ return f instanceof Promise ? f.then((d) => i(d, s, a)) : i(f, s, a);
1261
1262
  }
1262
- const c = e._zod.parse(i, a);
1263
+ const c = e._zod.parse(s, a);
1263
1264
  if (c instanceof Promise) {
1264
1265
  if (a.async === !1)
1265
- throw new q();
1266
+ throw new X();
1266
1267
  return c.then((f) => o(f, r, a));
1267
1268
  }
1268
1269
  return o(c, r, a);
@@ -1271,17 +1272,17 @@ const vr = {
1271
1272
  z(e, "~standard", () => ({
1272
1273
  validate: (o) => {
1273
1274
  try {
1274
- const s = Zn(e, o);
1275
- return s.success ? { value: s.data } : { issues: s.error?.issues };
1275
+ const i = Pn(e, o);
1276
+ return i.success ? { value: i.data } : { issues: i.error?.issues };
1276
1277
  } catch {
1277
- return jn(e, o).then((i) => i.success ? { value: i.data } : { issues: i.error?.issues });
1278
+ return Nn(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
1278
1279
  }
1279
1280
  },
1280
1281
  vendor: "zod",
1281
1282
  version: 1
1282
1283
  }));
1283
- }), Fe = /* @__PURE__ */ u("$ZodString", (e, t) => {
1284
- Z.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? or(e._zod.bag), e._zod.parse = (n, r) => {
1284
+ }), Ve = /* @__PURE__ */ u("$ZodString", (e, t) => {
1285
+ x.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? ur(e._zod.bag), e._zod.parse = (n, r) => {
1285
1286
  if (t.coerce)
1286
1287
  try {
1287
1288
  n.value = String(n.value);
@@ -1295,10 +1296,10 @@ const vr = {
1295
1296
  }), n;
1296
1297
  };
1297
1298
  }), k = /* @__PURE__ */ u("$ZodStringFormat", (e, t) => {
1298
- me.init(e, t), Fe.init(e, t);
1299
- }), yr = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
1300
- t.pattern ?? (t.pattern = Wn), k.init(e, t);
1301
- }), wr = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
1299
+ be.init(e, t), Ve.init(e, t);
1300
+ }), $r = /* @__PURE__ */ u("$ZodGUID", (e, t) => {
1301
+ t.pattern ?? (t.pattern = Kn), k.init(e, t);
1302
+ }), Tr = /* @__PURE__ */ u("$ZodUUID", (e, t) => {
1302
1303
  if (t.version) {
1303
1304
  const r = {
1304
1305
  v1: 1,
@@ -1312,13 +1313,13 @@ const vr = {
1312
1313
  }[t.version];
1313
1314
  if (r === void 0)
1314
1315
  throw new Error(`Invalid UUID version: "${t.version}"`);
1315
- t.pattern ?? (t.pattern = et(r));
1316
+ t.pattern ?? (t.pattern = ot(r));
1316
1317
  } else
1317
- t.pattern ?? (t.pattern = et());
1318
+ t.pattern ?? (t.pattern = ot());
1318
1319
  k.init(e, t);
1319
- }), br = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
1320
- t.pattern ?? (t.pattern = Gn), k.init(e, t);
1321
- }), zr = /* @__PURE__ */ u("$ZodURL", (e, t) => {
1320
+ }), Or = /* @__PURE__ */ u("$ZodEmail", (e, t) => {
1321
+ t.pattern ?? (t.pattern = Hn), k.init(e, t);
1322
+ }), jr = /* @__PURE__ */ u("$ZodURL", (e, t) => {
1322
1323
  k.init(e, t), e._zod.check = (n) => {
1323
1324
  try {
1324
1325
  const r = n.value.trim(), o = new URL(r);
@@ -1350,32 +1351,32 @@ const vr = {
1350
1351
  });
1351
1352
  }
1352
1353
  };
1353
- }), kr = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
1354
- t.pattern ?? (t.pattern = Bn()), k.init(e, t);
1355
- }), $r = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
1354
+ }), Sr = /* @__PURE__ */ u("$ZodEmoji", (e, t) => {
1355
+ t.pattern ?? (t.pattern = Qn()), k.init(e, t);
1356
+ }), Zr = /* @__PURE__ */ u("$ZodNanoID", (e, t) => {
1357
+ t.pattern ?? (t.pattern = Bn), k.init(e, t);
1358
+ }), Er = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
1356
1359
  t.pattern ?? (t.pattern = Mn), k.init(e, t);
1357
- }), Tr = /* @__PURE__ */ u("$ZodCUID", (e, t) => {
1358
- t.pattern ?? (t.pattern = Cn), k.init(e, t);
1359
- }), Sr = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
1360
- t.pattern ?? (t.pattern = Fn), k.init(e, t);
1361
- }), Or = /* @__PURE__ */ u("$ZodULID", (e, t) => {
1362
- t.pattern ?? (t.pattern = Un), k.init(e, t);
1363
- }), Zr = /* @__PURE__ */ u("$ZodXID", (e, t) => {
1364
- t.pattern ?? (t.pattern = Ln), k.init(e, t);
1365
- }), jr = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
1366
- t.pattern ?? (t.pattern = Jn), k.init(e, t);
1367
- }), Er = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
1368
- t.pattern ?? (t.pattern = rr(t)), k.init(e, t);
1369
- }), Pr = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
1370
- t.pattern ?? (t.pattern = tr), k.init(e, t);
1371
- }), Rr = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
1372
- t.pattern ?? (t.pattern = nr(t)), k.init(e, t);
1373
- }), Dr = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
1360
+ }), xr = /* @__PURE__ */ u("$ZodCUID2", (e, t) => {
1374
1361
  t.pattern ?? (t.pattern = Vn), k.init(e, t);
1375
- }), xr = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
1376
- t.pattern ?? (t.pattern = qn), k.init(e, t), e._zod.bag.format = "ipv4";
1377
- }), Nr = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
1378
- t.pattern ?? (t.pattern = Kn), k.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1362
+ }), Rr = /* @__PURE__ */ u("$ZodULID", (e, t) => {
1363
+ t.pattern ?? (t.pattern = Wn), k.init(e, t);
1364
+ }), Pr = /* @__PURE__ */ u("$ZodXID", (e, t) => {
1365
+ t.pattern ?? (t.pattern = Gn), k.init(e, t);
1366
+ }), Nr = /* @__PURE__ */ u("$ZodKSUID", (e, t) => {
1367
+ t.pattern ?? (t.pattern = Yn), k.init(e, t);
1368
+ }), Dr = /* @__PURE__ */ u("$ZodISODateTime", (e, t) => {
1369
+ t.pattern ?? (t.pattern = cr(t)), k.init(e, t);
1370
+ }), Ar = /* @__PURE__ */ u("$ZodISODate", (e, t) => {
1371
+ t.pattern ?? (t.pattern = ir), k.init(e, t);
1372
+ }), Ir = /* @__PURE__ */ u("$ZodISOTime", (e, t) => {
1373
+ t.pattern ?? (t.pattern = ar(t)), k.init(e, t);
1374
+ }), Cr = /* @__PURE__ */ u("$ZodISODuration", (e, t) => {
1375
+ t.pattern ?? (t.pattern = qn), k.init(e, t);
1376
+ }), Fr = /* @__PURE__ */ u("$ZodIPv4", (e, t) => {
1377
+ t.pattern ?? (t.pattern = er), k.init(e, t), e._zod.bag.format = "ipv4";
1378
+ }), Ur = /* @__PURE__ */ u("$ZodIPv6", (e, t) => {
1379
+ t.pattern ?? (t.pattern = tr), k.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1379
1380
  try {
1380
1381
  new URL(`http://[${n.value}]`);
1381
1382
  } catch {
@@ -1388,21 +1389,21 @@ const vr = {
1388
1389
  });
1389
1390
  }
1390
1391
  };
1391
- }), Ar = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
1392
- t.pattern ?? (t.pattern = Hn), k.init(e, t);
1393
- }), Ir = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
1394
- t.pattern ?? (t.pattern = Xn), k.init(e, t), e._zod.check = (n) => {
1392
+ }), Lr = /* @__PURE__ */ u("$ZodCIDRv4", (e, t) => {
1393
+ t.pattern ?? (t.pattern = nr), k.init(e, t);
1394
+ }), Jr = /* @__PURE__ */ u("$ZodCIDRv6", (e, t) => {
1395
+ t.pattern ?? (t.pattern = rr), k.init(e, t), e._zod.check = (n) => {
1395
1396
  const r = n.value.split("/");
1396
1397
  try {
1397
1398
  if (r.length !== 2)
1398
1399
  throw new Error();
1399
- const [o, s] = r;
1400
- if (!s)
1400
+ const [o, i] = r;
1401
+ if (!i)
1401
1402
  throw new Error();
1402
- const i = Number(s);
1403
- if (`${i}` !== s)
1403
+ const s = Number(i);
1404
+ if (`${s}` !== i)
1404
1405
  throw new Error();
1405
- if (i < 0 || i > 128)
1406
+ if (s < 0 || s > 128)
1406
1407
  throw new Error();
1407
1408
  new URL(`http://[${o}]`);
1408
1409
  } catch {
@@ -1416,7 +1417,7 @@ const vr = {
1416
1417
  }
1417
1418
  };
1418
1419
  });
1419
- function Et(e) {
1420
+ function Pt(e) {
1420
1421
  if (e === "")
1421
1422
  return !0;
1422
1423
  if (e.length % 4 !== 0)
@@ -1427,9 +1428,9 @@ function Et(e) {
1427
1428
  return !1;
1428
1429
  }
1429
1430
  }
1430
- const Cr = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
1431
- t.pattern ?? (t.pattern = Qn), k.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
1432
- Et(n.value) || n.issues.push({
1431
+ const Mr = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
1432
+ t.pattern ?? (t.pattern = or), k.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
1433
+ Pt(n.value) || n.issues.push({
1433
1434
  code: "invalid_format",
1434
1435
  format: "base64",
1435
1436
  input: n.value,
@@ -1438,15 +1439,15 @@ const Cr = /* @__PURE__ */ u("$ZodBase64", (e, t) => {
1438
1439
  });
1439
1440
  };
1440
1441
  });
1441
- function Fr(e) {
1442
- if (!Ot.test(e))
1442
+ function Vr(e) {
1443
+ if (!Et.test(e))
1443
1444
  return !1;
1444
1445
  const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
1445
- return Et(n);
1446
+ return Pt(n);
1446
1447
  }
1447
- const Ur = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
1448
- t.pattern ?? (t.pattern = Ot), k.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1449
- Fr(n.value) || n.issues.push({
1448
+ const Wr = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
1449
+ t.pattern ?? (t.pattern = Et), k.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1450
+ Vr(n.value) || n.issues.push({
1450
1451
  code: "invalid_format",
1451
1452
  format: "base64url",
1452
1453
  input: n.value,
@@ -1454,10 +1455,10 @@ const Ur = /* @__PURE__ */ u("$ZodBase64URL", (e, t) => {
1454
1455
  continue: !t.abort
1455
1456
  });
1456
1457
  };
1457
- }), Lr = /* @__PURE__ */ u("$ZodE164", (e, t) => {
1458
- t.pattern ?? (t.pattern = er), k.init(e, t);
1458
+ }), Gr = /* @__PURE__ */ u("$ZodE164", (e, t) => {
1459
+ t.pattern ?? (t.pattern = sr), k.init(e, t);
1459
1460
  });
1460
- function Jr(e, t = null) {
1461
+ function Yr(e, t = null) {
1461
1462
  try {
1462
1463
  const n = e.split(".");
1463
1464
  if (n.length !== 3)
@@ -1471,9 +1472,9 @@ function Jr(e, t = null) {
1471
1472
  return !1;
1472
1473
  }
1473
1474
  }
1474
- const Mr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1475
+ const Br = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1475
1476
  k.init(e, t), e._zod.check = (n) => {
1476
- Jr(n.value, t.alg) || n.issues.push({
1477
+ Yr(n.value, t.alg) || n.issues.push({
1477
1478
  code: "invalid_format",
1478
1479
  format: "jwt",
1479
1480
  input: n.value,
@@ -1481,21 +1482,21 @@ const Mr = /* @__PURE__ */ u("$ZodJWT", (e, t) => {
1481
1482
  continue: !t.abort
1482
1483
  });
1483
1484
  };
1484
- }), Vr = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
1485
- Z.init(e, t), e._zod.parse = (n) => n;
1486
- }), Wr = /* @__PURE__ */ u("$ZodNever", (e, t) => {
1487
- Z.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1485
+ }), qr = /* @__PURE__ */ u("$ZodUnknown", (e, t) => {
1486
+ x.init(e, t), e._zod.parse = (n) => n;
1487
+ }), Kr = /* @__PURE__ */ u("$ZodNever", (e, t) => {
1488
+ x.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1488
1489
  expected: "never",
1489
1490
  code: "invalid_type",
1490
1491
  input: n.value,
1491
1492
  inst: e
1492
1493
  }), n);
1493
1494
  });
1494
- function tt(e, t, n) {
1495
- e.issues.length && t.issues.push(...kt(n, e.issues)), t.value[n] = e.value;
1495
+ function st(e, t, n) {
1496
+ e.issues.length && t.issues.push(...Ot(n, e.issues)), t.value[n] = e.value;
1496
1497
  }
1497
- const Gr = /* @__PURE__ */ u("$ZodArray", (e, t) => {
1498
- Z.init(e, t), e._zod.parse = (n, r) => {
1498
+ const Hr = /* @__PURE__ */ u("$ZodArray", (e, t) => {
1499
+ x.init(e, t), e._zod.parse = (n, r) => {
1499
1500
  const o = n.value;
1500
1501
  if (!Array.isArray(o))
1501
1502
  return n.issues.push({
@@ -1505,31 +1506,31 @@ const Gr = /* @__PURE__ */ u("$ZodArray", (e, t) => {
1505
1506
  inst: e
1506
1507
  }), n;
1507
1508
  n.value = Array(o.length);
1508
- const s = [];
1509
- for (let i = 0; i < o.length; i++) {
1510
- const a = o[i], c = t.element._zod.run({
1509
+ const i = [];
1510
+ for (let s = 0; s < o.length; s++) {
1511
+ const a = o[s], c = t.element._zod.run({
1511
1512
  value: a,
1512
1513
  issues: []
1513
1514
  }, r);
1514
- c instanceof Promise ? s.push(c.then((f) => tt(f, n, i))) : tt(c, n, i);
1515
+ c instanceof Promise ? i.push(c.then((f) => st(f, n, s))) : st(c, n, s);
1515
1516
  }
1516
- return s.length ? Promise.all(s).then(() => n) : n;
1517
+ return i.length ? Promise.all(i).then(() => n) : n;
1517
1518
  };
1518
1519
  });
1519
- function ue(e, t, n, r, o) {
1520
+ function me(e, t, n, r, o) {
1520
1521
  if (e.issues.length) {
1521
1522
  if (o && !(n in r))
1522
1523
  return;
1523
- t.issues.push(...kt(n, e.issues));
1524
+ t.issues.push(...Ot(n, e.issues));
1524
1525
  }
1525
1526
  e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
1526
1527
  }
1527
- function Pt(e) {
1528
+ function Nt(e) {
1528
1529
  const t = Object.keys(e.shape);
1529
1530
  for (const r of t)
1530
1531
  if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
1531
1532
  throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
1532
- const n = vn(e.shape);
1533
+ const n = kn(e.shape);
1533
1534
  return {
1534
1535
  ...e,
1535
1536
  keys: t,
@@ -1538,27 +1539,27 @@ function Pt(e) {
1538
1539
  optionalKeys: new Set(n)
1539
1540
  };
1540
1541
  }
1541
- function Rt(e, t, n, r, o, s) {
1542
- const i = [], a = o.keySet, c = o.catchall._zod, f = c.def.type, d = c.optout === "optional";
1543
- for (const g in t) {
1544
- if (a.has(g))
1542
+ function Dt(e, t, n, r, o, i) {
1543
+ const s = [], a = o.keySet, c = o.catchall._zod, f = c.def.type, d = c.optout === "optional";
1544
+ for (const _ in t) {
1545
+ if (a.has(_))
1545
1546
  continue;
1546
1547
  if (f === "never") {
1547
- i.push(g);
1548
+ s.push(_);
1548
1549
  continue;
1549
1550
  }
1550
- const h = c.run({ value: t[g], issues: [] }, r);
1551
- h instanceof Promise ? e.push(h.then((p) => ue(p, n, g, t, d))) : ue(h, n, g, t, d);
1551
+ const m = c.run({ value: t[_], issues: [] }, r);
1552
+ m instanceof Promise ? e.push(m.then((p) => me(p, n, _, t, d))) : me(m, n, _, t, d);
1552
1553
  }
1553
- return i.length && n.issues.push({
1554
+ return s.length && n.issues.push({
1554
1555
  code: "unrecognized_keys",
1555
- keys: i,
1556
+ keys: s,
1556
1557
  input: t,
1557
- inst: s
1558
+ inst: i
1558
1559
  }), e.length ? Promise.all(e).then(() => n) : n;
1559
1560
  }
1560
- const Yr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1561
- if (Z.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1561
+ const Xr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1562
+ if (x.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1562
1563
  const a = t.shape;
1563
1564
  Object.defineProperty(t, "shape", {
1564
1565
  get: () => {
@@ -1569,23 +1570,23 @@ const Yr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1569
1570
  }
1570
1571
  });
1571
1572
  }
1572
- const r = De(() => Pt(t));
1573
+ const r = Ce(() => Nt(t));
1573
1574
  z(e._zod, "propValues", () => {
1574
1575
  const a = t.shape, c = {};
1575
1576
  for (const f in a) {
1576
1577
  const d = a[f]._zod;
1577
1578
  if (d.values) {
1578
1579
  c[f] ?? (c[f] = /* @__PURE__ */ new Set());
1579
- for (const g of d.values)
1580
- c[f].add(g);
1580
+ for (const _ of d.values)
1581
+ c[f].add(_);
1581
1582
  }
1582
1583
  }
1583
1584
  return c;
1584
1585
  });
1585
- const o = ce, s = t.catchall;
1586
- let i;
1586
+ const o = he, i = t.catchall;
1587
+ let s;
1587
1588
  e._zod.parse = (a, c) => {
1588
- i ?? (i = r.value);
1589
+ s ?? (s = r.value);
1589
1590
  const f = a.value;
1590
1591
  if (!o(f))
1591
1592
  return a.issues.push({
@@ -1595,146 +1596,146 @@ const Yr = /* @__PURE__ */ u("$ZodObject", (e, t) => {
1595
1596
  inst: e
1596
1597
  }), a;
1597
1598
  a.value = {};
1598
- const d = [], g = i.shape;
1599
- for (const h of i.keys) {
1600
- const p = g[h], w = p._zod.optout === "optional", v = p._zod.run({ value: f[h], issues: [] }, c);
1601
- v instanceof Promise ? d.push(v.then((b) => ue(b, a, h, f, w))) : ue(v, a, h, f, w);
1599
+ const d = [], _ = s.shape;
1600
+ for (const m of s.keys) {
1601
+ const p = _[m], w = p._zod.optout === "optional", y = p._zod.run({ value: f[m], issues: [] }, c);
1602
+ y instanceof Promise ? d.push(y.then((b) => me(b, a, m, f, w))) : me(y, a, m, f, w);
1602
1603
  }
1603
- return s ? Rt(d, f, a, c, r.value, e) : d.length ? Promise.all(d).then(() => a) : a;
1604
+ return i ? Dt(d, f, a, c, r.value, e) : d.length ? Promise.all(d).then(() => a) : a;
1604
1605
  };
1605
- }), Br = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
1606
- Yr.init(e, t);
1607
- const n = e._zod.parse, r = De(() => Pt(t)), o = (h) => {
1608
- const p = new _r(["shape", "payload", "ctx"]), w = r.value, v = (A) => {
1609
- const R = Qe(A);
1610
- return `shape[${R}]._zod.run({ value: input[${R}], issues: [] }, ctx)`;
1606
+ }), Qr = /* @__PURE__ */ u("$ZodObjectJIT", (e, t) => {
1607
+ Xr.init(e, t);
1608
+ const n = e._zod.parse, r = Ce(() => Nt(t)), o = (m) => {
1609
+ const p = new zr(["shape", "payload", "ctx"]), w = r.value, y = (C) => {
1610
+ const S = rt(C);
1611
+ return `shape[${S}]._zod.run({ value: input[${S}], issues: [] }, ctx)`;
1611
1612
  };
1612
1613
  p.write("const input = payload.value;");
1613
1614
  const b = /* @__PURE__ */ Object.create(null);
1614
- let U = 0;
1615
- for (const A of w.keys)
1616
- b[A] = `key_${U++}`;
1615
+ let M = 0;
1616
+ for (const C of w.keys)
1617
+ b[C] = `key_${M++}`;
1617
1618
  p.write("const newResult = {};");
1618
- for (const A of w.keys) {
1619
- const R = b[A], N = Qe(A), ge = h[A]?._zod?.optout === "optional";
1620
- p.write(`const ${R} = ${v(A)};`), ge ? p.write(`
1621
- if (${R}.issues.length) {
1622
- if (${N} in input) {
1623
- payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
1619
+ for (const C of w.keys) {
1620
+ const S = b[C], P = rt(C), N = m[C]?._zod?.optout === "optional";
1621
+ p.write(`const ${S} = ${y(C)};`), N ? p.write(`
1622
+ if (${S}.issues.length) {
1623
+ if (${P} in input) {
1624
+ payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
1624
1625
  ...iss,
1625
- path: iss.path ? [${N}, ...iss.path] : [${N}]
1626
+ path: iss.path ? [${P}, ...iss.path] : [${P}]
1626
1627
  })));
1627
1628
  }
1628
1629
  }
1629
1630
 
1630
- if (${R}.value === undefined) {
1631
- if (${N} in input) {
1632
- newResult[${N}] = undefined;
1631
+ if (${S}.value === undefined) {
1632
+ if (${P} in input) {
1633
+ newResult[${P}] = undefined;
1633
1634
  }
1634
1635
  } else {
1635
- newResult[${N}] = ${R}.value;
1636
+ newResult[${P}] = ${S}.value;
1636
1637
  }
1637
1638
 
1638
1639
  `) : p.write(`
1639
- if (${R}.issues.length) {
1640
- payload.issues = payload.issues.concat(${R}.issues.map(iss => ({
1640
+ if (${S}.issues.length) {
1641
+ payload.issues = payload.issues.concat(${S}.issues.map(iss => ({
1641
1642
  ...iss,
1642
- path: iss.path ? [${N}, ...iss.path] : [${N}]
1643
+ path: iss.path ? [${P}, ...iss.path] : [${P}]
1643
1644
  })));
1644
1645
  }
1645
1646
 
1646
- if (${R}.value === undefined) {
1647
- if (${N} in input) {
1648
- newResult[${N}] = undefined;
1647
+ if (${S}.value === undefined) {
1648
+ if (${P} in input) {
1649
+ newResult[${P}] = undefined;
1649
1650
  }
1650
1651
  } else {
1651
- newResult[${N}] = ${R}.value;
1652
+ newResult[${P}] = ${S}.value;
1652
1653
  }
1653
1654
 
1654
1655
  `);
1655
1656
  }
1656
1657
  p.write("payload.value = newResult;"), p.write("return payload;");
1657
- const C = p.compile();
1658
- return (A, R) => C(h, A, R);
1658
+ const ee = p.compile();
1659
+ return (C, S) => ee(m, C, S);
1659
1660
  };
1660
- let s;
1661
- const i = ce, a = !yt.jitless, f = a && gn.value, d = t.catchall;
1662
- let g;
1663
- e._zod.parse = (h, p) => {
1664
- g ?? (g = r.value);
1665
- const w = h.value;
1666
- return i(w) ? a && f && p?.async === !1 && p.jitless !== !0 ? (s || (s = o(t.shape)), h = s(h, p), d ? Rt([], w, h, p, g, e) : h) : n(h, p) : (h.issues.push({
1661
+ let i;
1662
+ const s = he, a = !zt.jitless, f = a && bn.value, d = t.catchall;
1663
+ let _;
1664
+ e._zod.parse = (m, p) => {
1665
+ _ ?? (_ = r.value);
1666
+ const w = m.value;
1667
+ return s(w) ? a && f && p?.async === !1 && p.jitless !== !0 ? (i || (i = o(t.shape)), m = i(m, p), d ? Dt([], w, m, p, _, e) : m) : n(m, p) : (m.issues.push({
1667
1668
  expected: "object",
1668
1669
  code: "invalid_type",
1669
1670
  input: w,
1670
1671
  inst: e
1671
- }), h);
1672
+ }), m);
1672
1673
  };
1673
1674
  });
1674
- function nt(e, t, n, r) {
1675
- for (const s of e)
1676
- if (s.issues.length === 0)
1677
- return t.value = s.value, t;
1678
- const o = e.filter((s) => !B(s));
1675
+ function it(e, t, n, r) {
1676
+ for (const i of e)
1677
+ if (i.issues.length === 0)
1678
+ return t.value = i.value, t;
1679
+ const o = e.filter((i) => !H(i));
1679
1680
  return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
1680
1681
  code: "invalid_union",
1681
1682
  input: t.value,
1682
1683
  inst: n,
1683
- errors: e.map((s) => s.issues.map((i) => W(i, r, V())))
1684
+ errors: e.map((i) => i.issues.map((s) => B(s, r, Y())))
1684
1685
  }), t);
1685
1686
  }
1686
- const qr = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
1687
- Z.init(e, t), z(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), z(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), z(e._zod, "values", () => {
1687
+ const eo = /* @__PURE__ */ u("$ZodUnion", (e, t) => {
1688
+ x.init(e, t), z(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), z(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), z(e._zod, "values", () => {
1688
1689
  if (t.options.every((o) => o._zod.values))
1689
1690
  return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
1690
1691
  }), z(e._zod, "pattern", () => {
1691
1692
  if (t.options.every((o) => o._zod.pattern)) {
1692
- const o = t.options.map((s) => s._zod.pattern);
1693
- return new RegExp(`^(${o.map((s) => Ne(s.source)).join("|")})$`);
1693
+ const o = t.options.map((i) => i._zod.pattern);
1694
+ return new RegExp(`^(${o.map((i) => Ue(i.source)).join("|")})$`);
1694
1695
  }
1695
1696
  });
1696
1697
  const n = t.options.length === 1, r = t.options[0]._zod.run;
1697
- e._zod.parse = (o, s) => {
1698
+ e._zod.parse = (o, i) => {
1698
1699
  if (n)
1699
- return r(o, s);
1700
- let i = !1;
1700
+ return r(o, i);
1701
+ let s = !1;
1701
1702
  const a = [];
1702
1703
  for (const c of t.options) {
1703
1704
  const f = c._zod.run({
1704
1705
  value: o.value,
1705
1706
  issues: []
1706
- }, s);
1707
+ }, i);
1707
1708
  if (f instanceof Promise)
1708
- a.push(f), i = !0;
1709
+ a.push(f), s = !0;
1709
1710
  else {
1710
1711
  if (f.issues.length === 0)
1711
1712
  return f;
1712
1713
  a.push(f);
1713
1714
  }
1714
1715
  }
1715
- return i ? Promise.all(a).then((c) => nt(c, o, e, s)) : nt(a, o, e, s);
1716
+ return s ? Promise.all(a).then((c) => it(c, o, e, i)) : it(a, o, e, i);
1716
1717
  };
1717
- }), Kr = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
1718
- Z.init(e, t), e._zod.parse = (n, r) => {
1719
- const o = n.value, s = t.left._zod.run({ value: o, issues: [] }, r), i = t.right._zod.run({ value: o, issues: [] }, r);
1720
- return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([c, f]) => rt(n, c, f)) : rt(n, s, i);
1718
+ }), to = /* @__PURE__ */ u("$ZodIntersection", (e, t) => {
1719
+ x.init(e, t), e._zod.parse = (n, r) => {
1720
+ const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), s = t.right._zod.run({ value: o, issues: [] }, r);
1721
+ return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([c, f]) => at(n, c, f)) : at(n, i, s);
1721
1722
  };
1722
1723
  });
1723
- function $e(e, t) {
1724
+ function Se(e, t) {
1724
1725
  if (e === t)
1725
1726
  return { valid: !0, data: e };
1726
1727
  if (e instanceof Date && t instanceof Date && +e == +t)
1727
1728
  return { valid: !0, data: e };
1728
- if (ee(e) && ee(t)) {
1729
- const n = Object.keys(t), r = Object.keys(e).filter((s) => n.indexOf(s) !== -1), o = { ...e, ...t };
1730
- for (const s of r) {
1731
- const i = $e(e[s], t[s]);
1732
- if (!i.valid)
1729
+ if (oe(e) && oe(t)) {
1730
+ const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
1731
+ for (const i of r) {
1732
+ const s = Se(e[i], t[i]);
1733
+ if (!s.valid)
1733
1734
  return {
1734
1735
  valid: !1,
1735
- mergeErrorPath: [s, ...i.mergeErrorPath]
1736
+ mergeErrorPath: [i, ...s.mergeErrorPath]
1736
1737
  };
1737
- o[s] = i.data;
1738
+ o[i] = s.data;
1738
1739
  }
1739
1740
  return { valid: !0, data: o };
1740
1741
  }
@@ -1743,19 +1744,19 @@ function $e(e, t) {
1743
1744
  return { valid: !1, mergeErrorPath: [] };
1744
1745
  const n = [];
1745
1746
  for (let r = 0; r < e.length; r++) {
1746
- const o = e[r], s = t[r], i = $e(o, s);
1747
- if (!i.valid)
1747
+ const o = e[r], i = t[r], s = Se(o, i);
1748
+ if (!s.valid)
1748
1749
  return {
1749
1750
  valid: !1,
1750
- mergeErrorPath: [r, ...i.mergeErrorPath]
1751
+ mergeErrorPath: [r, ...s.mergeErrorPath]
1751
1752
  };
1752
- n.push(i.data);
1753
+ n.push(s.data);
1753
1754
  }
1754
1755
  return { valid: !0, data: n };
1755
1756
  }
1756
1757
  return { valid: !1, mergeErrorPath: [] };
1757
1758
  }
1758
- function rt(e, t, n) {
1759
+ function at(e, t, n) {
1759
1760
  const r = /* @__PURE__ */ new Map();
1760
1761
  let o;
1761
1762
  for (const a of t.issues)
@@ -1771,84 +1772,84 @@ function rt(e, t, n) {
1771
1772
  r.has(c) || r.set(c, {}), r.get(c).r = !0;
1772
1773
  else
1773
1774
  e.issues.push(a);
1774
- const s = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
1775
- if (s.length && o && e.issues.push({ ...o, keys: s }), B(e))
1775
+ const i = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
1776
+ if (i.length && o && e.issues.push({ ...o, keys: i }), H(e))
1776
1777
  return e;
1777
- const i = $e(t.value, n.value);
1778
- if (!i.valid)
1779
- throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
1780
- return e.value = i.data, e;
1781
- }
1782
- const Hr = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
1783
- Z.init(e, t);
1784
- const n = wt(t.entries), r = new Set(n);
1785
- e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => _n.has(typeof o)).map((o) => typeof o == "string" ? de(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
1786
- const i = o.value;
1787
- return r.has(i) || o.issues.push({
1778
+ const s = Se(t.value, n.value);
1779
+ if (!s.valid)
1780
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
1781
+ return e.value = s.data, e;
1782
+ }
1783
+ const no = /* @__PURE__ */ u("$ZodEnum", (e, t) => {
1784
+ x.init(e, t);
1785
+ const n = kt(t.entries), r = new Set(n);
1786
+ e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => zn.has(typeof o)).map((o) => typeof o == "string" ? ve(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
1787
+ const s = o.value;
1788
+ return r.has(s) || o.issues.push({
1788
1789
  code: "invalid_value",
1789
1790
  values: n,
1790
- input: i,
1791
+ input: s,
1791
1792
  inst: e
1792
1793
  }), o;
1793
1794
  };
1794
- }), Xr = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
1795
- Z.init(e, t), e._zod.parse = (n, r) => {
1795
+ }), ro = /* @__PURE__ */ u("$ZodTransform", (e, t) => {
1796
+ x.init(e, t), e._zod.parse = (n, r) => {
1796
1797
  if (r.direction === "backward")
1797
- throw new vt(e.constructor.name);
1798
+ throw new bt(e.constructor.name);
1798
1799
  const o = t.transform(n.value, n);
1799
1800
  if (r.async)
1800
- return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (n.value = i, n));
1801
+ return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (n.value = s, n));
1801
1802
  if (o instanceof Promise)
1802
- throw new q();
1803
+ throw new X();
1803
1804
  return n.value = o, n;
1804
1805
  };
1805
1806
  });
1806
- function ot(e, t) {
1807
+ function ct(e, t) {
1807
1808
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
1808
1809
  }
1809
- const Dt = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
1810
- Z.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", z(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), z(e._zod, "pattern", () => {
1810
+ const At = /* @__PURE__ */ u("$ZodOptional", (e, t) => {
1811
+ x.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", z(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), z(e._zod, "pattern", () => {
1811
1812
  const n = t.innerType._zod.pattern;
1812
- return n ? new RegExp(`^(${Ne(n.source)})?$`) : void 0;
1813
+ return n ? new RegExp(`^(${Ue(n.source)})?$`) : void 0;
1813
1814
  }), e._zod.parse = (n, r) => {
1814
1815
  if (t.innerType._zod.optin === "optional") {
1815
1816
  const o = t.innerType._zod.run(n, r);
1816
- return o instanceof Promise ? o.then((s) => ot(s, n.value)) : ot(o, n.value);
1817
+ return o instanceof Promise ? o.then((i) => ct(i, n.value)) : ct(o, n.value);
1817
1818
  }
1818
1819
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
1819
1820
  };
1820
- }), Qr = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
1821
- Dt.init(e, t), z(e._zod, "values", () => t.innerType._zod.values), z(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
1822
- }), eo = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
1823
- Z.init(e, t), z(e._zod, "optin", () => t.innerType._zod.optin), z(e._zod, "optout", () => t.innerType._zod.optout), z(e._zod, "pattern", () => {
1821
+ }), oo = /* @__PURE__ */ u("$ZodExactOptional", (e, t) => {
1822
+ At.init(e, t), z(e._zod, "values", () => t.innerType._zod.values), z(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
1823
+ }), so = /* @__PURE__ */ u("$ZodNullable", (e, t) => {
1824
+ x.init(e, t), z(e._zod, "optin", () => t.innerType._zod.optin), z(e._zod, "optout", () => t.innerType._zod.optout), z(e._zod, "pattern", () => {
1824
1825
  const n = t.innerType._zod.pattern;
1825
- return n ? new RegExp(`^(${Ne(n.source)}|null)$`) : void 0;
1826
+ return n ? new RegExp(`^(${Ue(n.source)}|null)$`) : void 0;
1826
1827
  }), z(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);
1827
- }), to = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
1828
- Z.init(e, t), e._zod.optin = "optional", z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1828
+ }), io = /* @__PURE__ */ u("$ZodDefault", (e, t) => {
1829
+ x.init(e, t), e._zod.optin = "optional", z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1829
1830
  if (r.direction === "backward")
1830
1831
  return t.innerType._zod.run(n, r);
1831
1832
  if (n.value === void 0)
1832
1833
  return n.value = t.defaultValue, n;
1833
1834
  const o = t.innerType._zod.run(n, r);
1834
- return o instanceof Promise ? o.then((s) => it(s, t)) : it(o, t);
1835
+ return o instanceof Promise ? o.then((i) => ut(i, t)) : ut(o, t);
1835
1836
  };
1836
1837
  });
1837
- function it(e, t) {
1838
+ function ut(e, t) {
1838
1839
  return e.value === void 0 && (e.value = t.defaultValue), e;
1839
1840
  }
1840
- const no = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
1841
- Z.init(e, t), e._zod.optin = "optional", z(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));
1842
- }), ro = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
1843
- Z.init(e, t), z(e._zod, "values", () => {
1841
+ const ao = /* @__PURE__ */ u("$ZodPrefault", (e, t) => {
1842
+ x.init(e, t), e._zod.optin = "optional", z(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));
1843
+ }), co = /* @__PURE__ */ u("$ZodNonOptional", (e, t) => {
1844
+ x.init(e, t), z(e._zod, "values", () => {
1844
1845
  const n = t.innerType._zod.values;
1845
1846
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
1846
1847
  }), e._zod.parse = (n, r) => {
1847
1848
  const o = t.innerType._zod.run(n, r);
1848
- return o instanceof Promise ? o.then((s) => st(s, e)) : st(o, e);
1849
+ return o instanceof Promise ? o.then((i) => lt(i, e)) : lt(o, e);
1849
1850
  };
1850
1851
  });
1851
- function st(e, t) {
1852
+ function lt(e, t) {
1852
1853
  return !e.issues.length && e.value === void 0 && e.issues.push({
1853
1854
  code: "invalid_type",
1854
1855
  expected: "nonoptional",
@@ -1856,58 +1857,58 @@ function st(e, t) {
1856
1857
  inst: t
1857
1858
  }), e;
1858
1859
  }
1859
- const oo = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
1860
- Z.init(e, t), z(e._zod, "optin", () => t.innerType._zod.optin), z(e._zod, "optout", () => t.innerType._zod.optout), z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1860
+ const uo = /* @__PURE__ */ u("$ZodCatch", (e, t) => {
1861
+ x.init(e, t), z(e._zod, "optin", () => t.innerType._zod.optin), z(e._zod, "optout", () => t.innerType._zod.optout), z(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1861
1862
  if (r.direction === "backward")
1862
1863
  return t.innerType._zod.run(n, r);
1863
1864
  const o = t.innerType._zod.run(n, r);
1864
- return o instanceof Promise ? o.then((s) => (n.value = s.value, s.issues.length && (n.value = t.catchValue({
1865
+ return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
1865
1866
  ...n,
1866
1867
  error: {
1867
- issues: s.issues.map((i) => W(i, r, V()))
1868
+ issues: i.issues.map((s) => B(s, r, Y()))
1868
1869
  },
1869
1870
  input: n.value
1870
1871
  }), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
1871
1872
  ...n,
1872
1873
  error: {
1873
- issues: o.issues.map((s) => W(s, r, V()))
1874
+ issues: o.issues.map((i) => B(i, r, Y()))
1874
1875
  },
1875
1876
  input: n.value
1876
1877
  }), n.issues = []), n);
1877
1878
  };
1878
- }), io = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
1879
- Z.init(e, t), z(e._zod, "values", () => t.in._zod.values), z(e._zod, "optin", () => t.in._zod.optin), z(e._zod, "optout", () => t.out._zod.optout), z(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1879
+ }), lo = /* @__PURE__ */ u("$ZodPipe", (e, t) => {
1880
+ x.init(e, t), z(e._zod, "values", () => t.in._zod.values), z(e._zod, "optin", () => t.in._zod.optin), z(e._zod, "optout", () => t.out._zod.optout), z(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1880
1881
  if (r.direction === "backward") {
1881
- const s = t.out._zod.run(n, r);
1882
- return s instanceof Promise ? s.then((i) => se(i, t.in, r)) : se(s, t.in, r);
1882
+ const i = t.out._zod.run(n, r);
1883
+ return i instanceof Promise ? i.then((s) => de(s, t.in, r)) : de(i, t.in, r);
1883
1884
  }
1884
1885
  const o = t.in._zod.run(n, r);
1885
- return o instanceof Promise ? o.then((s) => se(s, t.out, r)) : se(o, t.out, r);
1886
+ return o instanceof Promise ? o.then((i) => de(i, t.out, r)) : de(o, t.out, r);
1886
1887
  };
1887
1888
  });
1888
- function se(e, t, n) {
1889
+ function de(e, t, n) {
1889
1890
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
1890
1891
  }
1891
- const so = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
1892
- Z.init(e, t), z(e._zod, "propValues", () => t.innerType._zod.propValues), z(e._zod, "values", () => t.innerType._zod.values), z(e._zod, "optin", () => t.innerType?._zod?.optin), z(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
1892
+ const fo = /* @__PURE__ */ u("$ZodReadonly", (e, t) => {
1893
+ x.init(e, t), z(e._zod, "propValues", () => t.innerType._zod.propValues), z(e._zod, "values", () => t.innerType._zod.values), z(e._zod, "optin", () => t.innerType?._zod?.optin), z(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
1893
1894
  if (r.direction === "backward")
1894
1895
  return t.innerType._zod.run(n, r);
1895
1896
  const o = t.innerType._zod.run(n, r);
1896
- return o instanceof Promise ? o.then(at) : at(o);
1897
+ return o instanceof Promise ? o.then(ft) : ft(o);
1897
1898
  };
1898
1899
  });
1899
- function at(e) {
1900
+ function ft(e) {
1900
1901
  return e.value = Object.freeze(e.value), e;
1901
1902
  }
1902
- const ao = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
1903
- F.init(e, t), Z.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1903
+ const po = /* @__PURE__ */ u("$ZodCustom", (e, t) => {
1904
+ L.init(e, t), x.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1904
1905
  const r = n.value, o = t.fn(r);
1905
1906
  if (o instanceof Promise)
1906
- return o.then((s) => ct(s, n, r, e));
1907
- ct(o, n, r, e);
1907
+ return o.then((i) => dt(i, n, r, e));
1908
+ dt(o, n, r, e);
1908
1909
  };
1909
1910
  });
1910
- function ct(e, t, n, r) {
1911
+ function dt(e, t, n, r) {
1911
1912
  if (!e) {
1912
1913
  const o = {
1913
1914
  code: "custom",
@@ -1919,11 +1920,11 @@ function ct(e, t, n, r) {
1919
1920
  continue: !r._zod.def.abort
1920
1921
  // params: inst._zod.def.params,
1921
1922
  };
1922
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(te(o));
1923
+ r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(se(o));
1923
1924
  }
1924
1925
  }
1925
- var ut;
1926
- class co {
1926
+ var pt;
1927
+ class ho {
1927
1928
  constructor() {
1928
1929
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1929
1930
  }
@@ -1952,243 +1953,243 @@ class co {
1952
1953
  return this._map.has(t);
1953
1954
  }
1954
1955
  }
1955
- function uo() {
1956
- return new co();
1956
+ function mo() {
1957
+ return new ho();
1957
1958
  }
1958
- (ut = globalThis).__zod_globalRegistry ?? (ut.__zod_globalRegistry = uo());
1959
- const Q = globalThis.__zod_globalRegistry;
1959
+ (pt = globalThis).__zod_globalRegistry ?? (pt.__zod_globalRegistry = mo());
1960
+ const re = globalThis.__zod_globalRegistry;
1960
1961
  // @__NO_SIDE_EFFECTS__
1961
- function lo(e, t) {
1962
+ function go(e, t) {
1962
1963
  return new e({
1963
1964
  type: "string",
1964
- ..._(t)
1965
+ ...g(t)
1965
1966
  });
1966
1967
  }
1967
1968
  // @__NO_SIDE_EFFECTS__
1968
- function fo(e, t) {
1969
+ function _o(e, t) {
1969
1970
  return new e({
1970
1971
  type: "string",
1971
1972
  format: "email",
1972
1973
  check: "string_format",
1973
1974
  abort: !1,
1974
- ..._(t)
1975
+ ...g(t)
1975
1976
  });
1976
1977
  }
1977
1978
  // @__NO_SIDE_EFFECTS__
1978
- function lt(e, t) {
1979
+ function ht(e, t) {
1979
1980
  return new e({
1980
1981
  type: "string",
1981
1982
  format: "guid",
1982
1983
  check: "string_format",
1983
1984
  abort: !1,
1984
- ..._(t)
1985
+ ...g(t)
1985
1986
  });
1986
1987
  }
1987
1988
  // @__NO_SIDE_EFFECTS__
1988
- function po(e, t) {
1989
+ function vo(e, t) {
1989
1990
  return new e({
1990
1991
  type: "string",
1991
1992
  format: "uuid",
1992
1993
  check: "string_format",
1993
1994
  abort: !1,
1994
- ..._(t)
1995
+ ...g(t)
1995
1996
  });
1996
1997
  }
1997
1998
  // @__NO_SIDE_EFFECTS__
1998
- function ho(e, t) {
1999
+ function yo(e, t) {
1999
2000
  return new e({
2000
2001
  type: "string",
2001
2002
  format: "uuid",
2002
2003
  check: "string_format",
2003
2004
  abort: !1,
2004
2005
  version: "v4",
2005
- ..._(t)
2006
+ ...g(t)
2006
2007
  });
2007
2008
  }
2008
2009
  // @__NO_SIDE_EFFECTS__
2009
- function mo(e, t) {
2010
+ function wo(e, t) {
2010
2011
  return new e({
2011
2012
  type: "string",
2012
2013
  format: "uuid",
2013
2014
  check: "string_format",
2014
2015
  abort: !1,
2015
2016
  version: "v6",
2016
- ..._(t)
2017
+ ...g(t)
2017
2018
  });
2018
2019
  }
2019
2020
  // @__NO_SIDE_EFFECTS__
2020
- function go(e, t) {
2021
+ function bo(e, t) {
2021
2022
  return new e({
2022
2023
  type: "string",
2023
2024
  format: "uuid",
2024
2025
  check: "string_format",
2025
2026
  abort: !1,
2026
2027
  version: "v7",
2027
- ..._(t)
2028
+ ...g(t)
2028
2029
  });
2029
2030
  }
2030
2031
  // @__NO_SIDE_EFFECTS__
2031
- function _o(e, t) {
2032
+ function zo(e, t) {
2032
2033
  return new e({
2033
2034
  type: "string",
2034
2035
  format: "url",
2035
2036
  check: "string_format",
2036
2037
  abort: !1,
2037
- ..._(t)
2038
+ ...g(t)
2038
2039
  });
2039
2040
  }
2040
2041
  // @__NO_SIDE_EFFECTS__
2041
- function vo(e, t) {
2042
+ function ko(e, t) {
2042
2043
  return new e({
2043
2044
  type: "string",
2044
2045
  format: "emoji",
2045
2046
  check: "string_format",
2046
2047
  abort: !1,
2047
- ..._(t)
2048
+ ...g(t)
2048
2049
  });
2049
2050
  }
2050
2051
  // @__NO_SIDE_EFFECTS__
2051
- function yo(e, t) {
2052
+ function $o(e, t) {
2052
2053
  return new e({
2053
2054
  type: "string",
2054
2055
  format: "nanoid",
2055
2056
  check: "string_format",
2056
2057
  abort: !1,
2057
- ..._(t)
2058
+ ...g(t)
2058
2059
  });
2059
2060
  }
2060
2061
  // @__NO_SIDE_EFFECTS__
2061
- function wo(e, t) {
2062
+ function To(e, t) {
2062
2063
  return new e({
2063
2064
  type: "string",
2064
2065
  format: "cuid",
2065
2066
  check: "string_format",
2066
2067
  abort: !1,
2067
- ..._(t)
2068
+ ...g(t)
2068
2069
  });
2069
2070
  }
2070
2071
  // @__NO_SIDE_EFFECTS__
2071
- function bo(e, t) {
2072
+ function Oo(e, t) {
2072
2073
  return new e({
2073
2074
  type: "string",
2074
2075
  format: "cuid2",
2075
2076
  check: "string_format",
2076
2077
  abort: !1,
2077
- ..._(t)
2078
+ ...g(t)
2078
2079
  });
2079
2080
  }
2080
2081
  // @__NO_SIDE_EFFECTS__
2081
- function zo(e, t) {
2082
+ function jo(e, t) {
2082
2083
  return new e({
2083
2084
  type: "string",
2084
2085
  format: "ulid",
2085
2086
  check: "string_format",
2086
2087
  abort: !1,
2087
- ..._(t)
2088
+ ...g(t)
2088
2089
  });
2089
2090
  }
2090
2091
  // @__NO_SIDE_EFFECTS__
2091
- function ko(e, t) {
2092
+ function So(e, t) {
2092
2093
  return new e({
2093
2094
  type: "string",
2094
2095
  format: "xid",
2095
2096
  check: "string_format",
2096
2097
  abort: !1,
2097
- ..._(t)
2098
+ ...g(t)
2098
2099
  });
2099
2100
  }
2100
2101
  // @__NO_SIDE_EFFECTS__
2101
- function $o(e, t) {
2102
+ function Zo(e, t) {
2102
2103
  return new e({
2103
2104
  type: "string",
2104
2105
  format: "ksuid",
2105
2106
  check: "string_format",
2106
2107
  abort: !1,
2107
- ..._(t)
2108
+ ...g(t)
2108
2109
  });
2109
2110
  }
2110
2111
  // @__NO_SIDE_EFFECTS__
2111
- function To(e, t) {
2112
+ function Eo(e, t) {
2112
2113
  return new e({
2113
2114
  type: "string",
2114
2115
  format: "ipv4",
2115
2116
  check: "string_format",
2116
2117
  abort: !1,
2117
- ..._(t)
2118
+ ...g(t)
2118
2119
  });
2119
2120
  }
2120
2121
  // @__NO_SIDE_EFFECTS__
2121
- function So(e, t) {
2122
+ function xo(e, t) {
2122
2123
  return new e({
2123
2124
  type: "string",
2124
2125
  format: "ipv6",
2125
2126
  check: "string_format",
2126
2127
  abort: !1,
2127
- ..._(t)
2128
+ ...g(t)
2128
2129
  });
2129
2130
  }
2130
2131
  // @__NO_SIDE_EFFECTS__
2131
- function Oo(e, t) {
2132
+ function Ro(e, t) {
2132
2133
  return new e({
2133
2134
  type: "string",
2134
2135
  format: "cidrv4",
2135
2136
  check: "string_format",
2136
2137
  abort: !1,
2137
- ..._(t)
2138
+ ...g(t)
2138
2139
  });
2139
2140
  }
2140
2141
  // @__NO_SIDE_EFFECTS__
2141
- function Zo(e, t) {
2142
+ function Po(e, t) {
2142
2143
  return new e({
2143
2144
  type: "string",
2144
2145
  format: "cidrv6",
2145
2146
  check: "string_format",
2146
2147
  abort: !1,
2147
- ..._(t)
2148
+ ...g(t)
2148
2149
  });
2149
2150
  }
2150
2151
  // @__NO_SIDE_EFFECTS__
2151
- function jo(e, t) {
2152
+ function No(e, t) {
2152
2153
  return new e({
2153
2154
  type: "string",
2154
2155
  format: "base64",
2155
2156
  check: "string_format",
2156
2157
  abort: !1,
2157
- ..._(t)
2158
+ ...g(t)
2158
2159
  });
2159
2160
  }
2160
2161
  // @__NO_SIDE_EFFECTS__
2161
- function Eo(e, t) {
2162
+ function Do(e, t) {
2162
2163
  return new e({
2163
2164
  type: "string",
2164
2165
  format: "base64url",
2165
2166
  check: "string_format",
2166
2167
  abort: !1,
2167
- ..._(t)
2168
+ ...g(t)
2168
2169
  });
2169
2170
  }
2170
2171
  // @__NO_SIDE_EFFECTS__
2171
- function Po(e, t) {
2172
+ function Ao(e, t) {
2172
2173
  return new e({
2173
2174
  type: "string",
2174
2175
  format: "e164",
2175
2176
  check: "string_format",
2176
2177
  abort: !1,
2177
- ..._(t)
2178
+ ...g(t)
2178
2179
  });
2179
2180
  }
2180
2181
  // @__NO_SIDE_EFFECTS__
2181
- function Ro(e, t) {
2182
+ function Io(e, t) {
2182
2183
  return new e({
2183
2184
  type: "string",
2184
2185
  format: "jwt",
2185
2186
  check: "string_format",
2186
2187
  abort: !1,
2187
- ..._(t)
2188
+ ...g(t)
2188
2189
  });
2189
2190
  }
2190
2191
  // @__NO_SIDE_EFFECTS__
2191
- function Do(e, t) {
2192
+ function Co(e, t) {
2192
2193
  return new e({
2193
2194
  type: "string",
2194
2195
  format: "datetime",
@@ -2196,198 +2197,198 @@ function Do(e, t) {
2196
2197
  offset: !1,
2197
2198
  local: !1,
2198
2199
  precision: null,
2199
- ..._(t)
2200
+ ...g(t)
2200
2201
  });
2201
2202
  }
2202
2203
  // @__NO_SIDE_EFFECTS__
2203
- function xo(e, t) {
2204
+ function Fo(e, t) {
2204
2205
  return new e({
2205
2206
  type: "string",
2206
2207
  format: "date",
2207
2208
  check: "string_format",
2208
- ..._(t)
2209
+ ...g(t)
2209
2210
  });
2210
2211
  }
2211
2212
  // @__NO_SIDE_EFFECTS__
2212
- function No(e, t) {
2213
+ function Uo(e, t) {
2213
2214
  return new e({
2214
2215
  type: "string",
2215
2216
  format: "time",
2216
2217
  check: "string_format",
2217
2218
  precision: null,
2218
- ..._(t)
2219
+ ...g(t)
2219
2220
  });
2220
2221
  }
2221
2222
  // @__NO_SIDE_EFFECTS__
2222
- function Ao(e, t) {
2223
+ function Lo(e, t) {
2223
2224
  return new e({
2224
2225
  type: "string",
2225
2226
  format: "duration",
2226
2227
  check: "string_format",
2227
- ..._(t)
2228
+ ...g(t)
2228
2229
  });
2229
2230
  }
2230
2231
  // @__NO_SIDE_EFFECTS__
2231
- function Io(e) {
2232
+ function Jo(e) {
2232
2233
  return new e({
2233
2234
  type: "unknown"
2234
2235
  });
2235
2236
  }
2236
2237
  // @__NO_SIDE_EFFECTS__
2237
- function Co(e, t) {
2238
+ function Mo(e, t) {
2238
2239
  return new e({
2239
2240
  type: "never",
2240
- ..._(t)
2241
+ ...g(t)
2241
2242
  });
2242
2243
  }
2243
2244
  // @__NO_SIDE_EFFECTS__
2244
- function xt(e, t) {
2245
- return new ar({
2245
+ function It(e, t) {
2246
+ return new dr({
2246
2247
  check: "max_length",
2247
- ..._(t),
2248
+ ...g(t),
2248
2249
  maximum: e
2249
2250
  });
2250
2251
  }
2251
2252
  // @__NO_SIDE_EFFECTS__
2252
- function le(e, t) {
2253
- return new cr({
2253
+ function ge(e, t) {
2254
+ return new pr({
2254
2255
  check: "min_length",
2255
- ..._(t),
2256
+ ...g(t),
2256
2257
  minimum: e
2257
2258
  });
2258
2259
  }
2259
2260
  // @__NO_SIDE_EFFECTS__
2260
- function Nt(e, t) {
2261
- return new ur({
2261
+ function Ct(e, t) {
2262
+ return new hr({
2262
2263
  check: "length_equals",
2263
- ..._(t),
2264
+ ...g(t),
2264
2265
  length: e
2265
2266
  });
2266
2267
  }
2267
2268
  // @__NO_SIDE_EFFECTS__
2268
- function Fo(e, t) {
2269
- return new lr({
2269
+ function Vo(e, t) {
2270
+ return new mr({
2270
2271
  check: "string_format",
2271
2272
  format: "regex",
2272
- ..._(t),
2273
+ ...g(t),
2273
2274
  pattern: e
2274
2275
  });
2275
2276
  }
2276
2277
  // @__NO_SIDE_EFFECTS__
2277
- function Uo(e) {
2278
- return new fr({
2278
+ function Wo(e) {
2279
+ return new gr({
2279
2280
  check: "string_format",
2280
2281
  format: "lowercase",
2281
- ..._(e)
2282
+ ...g(e)
2282
2283
  });
2283
2284
  }
2284
2285
  // @__NO_SIDE_EFFECTS__
2285
- function Lo(e) {
2286
- return new dr({
2286
+ function Go(e) {
2287
+ return new _r({
2287
2288
  check: "string_format",
2288
2289
  format: "uppercase",
2289
- ..._(e)
2290
+ ...g(e)
2290
2291
  });
2291
2292
  }
2292
2293
  // @__NO_SIDE_EFFECTS__
2293
- function Jo(e, t) {
2294
- return new pr({
2294
+ function Yo(e, t) {
2295
+ return new vr({
2295
2296
  check: "string_format",
2296
2297
  format: "includes",
2297
- ..._(t),
2298
+ ...g(t),
2298
2299
  includes: e
2299
2300
  });
2300
2301
  }
2301
2302
  // @__NO_SIDE_EFFECTS__
2302
- function Mo(e, t) {
2303
- return new hr({
2303
+ function Bo(e, t) {
2304
+ return new yr({
2304
2305
  check: "string_format",
2305
2306
  format: "starts_with",
2306
- ..._(t),
2307
+ ...g(t),
2307
2308
  prefix: e
2308
2309
  });
2309
2310
  }
2310
2311
  // @__NO_SIDE_EFFECTS__
2311
- function Vo(e, t) {
2312
- return new mr({
2312
+ function qo(e, t) {
2313
+ return new wr({
2313
2314
  check: "string_format",
2314
2315
  format: "ends_with",
2315
- ..._(t),
2316
+ ...g(t),
2316
2317
  suffix: e
2317
2318
  });
2318
2319
  }
2319
2320
  // @__NO_SIDE_EFFECTS__
2320
- function K(e) {
2321
- return new gr({
2321
+ function Q(e) {
2322
+ return new br({
2322
2323
  check: "overwrite",
2323
2324
  tx: e
2324
2325
  });
2325
2326
  }
2326
2327
  // @__NO_SIDE_EFFECTS__
2327
- function Wo(e) {
2328
- return /* @__PURE__ */ K((t) => t.normalize(e));
2328
+ function Ko(e) {
2329
+ return /* @__PURE__ */ Q((t) => t.normalize(e));
2329
2330
  }
2330
2331
  // @__NO_SIDE_EFFECTS__
2331
- function Go() {
2332
- return /* @__PURE__ */ K((e) => e.trim());
2332
+ function Ho() {
2333
+ return /* @__PURE__ */ Q((e) => e.trim());
2333
2334
  }
2334
2335
  // @__NO_SIDE_EFFECTS__
2335
- function Yo() {
2336
- return /* @__PURE__ */ K((e) => e.toLowerCase());
2336
+ function Xo() {
2337
+ return /* @__PURE__ */ Q((e) => e.toLowerCase());
2337
2338
  }
2338
2339
  // @__NO_SIDE_EFFECTS__
2339
- function Bo() {
2340
- return /* @__PURE__ */ K((e) => e.toUpperCase());
2340
+ function Qo() {
2341
+ return /* @__PURE__ */ Q((e) => e.toUpperCase());
2341
2342
  }
2342
2343
  // @__NO_SIDE_EFFECTS__
2343
- function qo() {
2344
- return /* @__PURE__ */ K((e) => mn(e));
2344
+ function es() {
2345
+ return /* @__PURE__ */ Q((e) => wn(e));
2345
2346
  }
2346
2347
  // @__NO_SIDE_EFFECTS__
2347
- function Ko(e, t, n) {
2348
+ function ts(e, t, n) {
2348
2349
  return new e({
2349
2350
  type: "array",
2350
2351
  element: t,
2351
2352
  // get element() {
2352
2353
  // return element;
2353
2354
  // },
2354
- ..._(n)
2355
+ ...g(n)
2355
2356
  });
2356
2357
  }
2357
2358
  // @__NO_SIDE_EFFECTS__
2358
- function Ho(e, t, n) {
2359
+ function ns(e, t, n) {
2359
2360
  return new e({
2360
2361
  type: "custom",
2361
2362
  check: "custom",
2362
2363
  fn: t,
2363
- ..._(n)
2364
+ ...g(n)
2364
2365
  });
2365
2366
  }
2366
2367
  // @__NO_SIDE_EFFECTS__
2367
- function Xo(e) {
2368
- const t = /* @__PURE__ */ Qo((n) => (n.addIssue = (r) => {
2368
+ function rs(e) {
2369
+ const t = /* @__PURE__ */ os((n) => (n.addIssue = (r) => {
2369
2370
  if (typeof r == "string")
2370
- n.issues.push(te(r, n.value, t._zod.def));
2371
+ n.issues.push(se(r, n.value, t._zod.def));
2371
2372
  else {
2372
2373
  const o = r;
2373
- 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(te(o));
2374
+ 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(se(o));
2374
2375
  }
2375
2376
  }, e(n.value, n)));
2376
2377
  return t;
2377
2378
  }
2378
2379
  // @__NO_SIDE_EFFECTS__
2379
- function Qo(e, t) {
2380
- const n = new F({
2380
+ function os(e, t) {
2381
+ const n = new L({
2381
2382
  check: "custom",
2382
- ..._(t)
2383
+ ...g(t)
2383
2384
  });
2384
2385
  return n._zod.check = e, n;
2385
2386
  }
2386
- function At(e) {
2387
+ function Ft(e) {
2387
2388
  let t = e?.target ?? "draft-2020-12";
2388
2389
  return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2389
2390
  processors: e.processors ?? {},
2390
- metadataRegistry: e?.metadata ?? Q,
2391
+ metadataRegistry: e?.metadata ?? re,
2391
2392
  target: t,
2392
2393
  unrepresentable: e?.unrepresentable ?? "throw",
2393
2394
  override: e?.override ?? (() => {
@@ -2400,16 +2401,16 @@ function At(e) {
2400
2401
  external: e?.external ?? void 0
2401
2402
  };
2402
2403
  }
2403
- function E(e, t, n = { path: [], schemaPath: [] }) {
2404
+ function D(e, t, n = { path: [], schemaPath: [] }) {
2404
2405
  var r;
2405
- const o = e._zod.def, s = t.seen.get(e);
2406
- if (s)
2407
- return s.count++, n.schemaPath.includes(e) && (s.cycle = n.path), s.schema;
2408
- const i = { schema: {}, count: 1, cycle: void 0, path: n.path };
2409
- t.seen.set(e, i);
2406
+ const o = e._zod.def, i = t.seen.get(e);
2407
+ if (i)
2408
+ return i.count++, n.schemaPath.includes(e) && (i.cycle = n.path), i.schema;
2409
+ const s = { schema: {}, count: 1, cycle: void 0, path: n.path };
2410
+ t.seen.set(e, s);
2410
2411
  const a = e._zod.toJSONSchema?.();
2411
2412
  if (a)
2412
- i.schema = a;
2413
+ s.schema = a;
2413
2414
  else {
2414
2415
  const d = {
2415
2416
  ...n,
@@ -2417,158 +2418,158 @@ function E(e, t, n = { path: [], schemaPath: [] }) {
2417
2418
  path: n.path
2418
2419
  };
2419
2420
  if (e._zod.processJSONSchema)
2420
- e._zod.processJSONSchema(t, i.schema, d);
2421
+ e._zod.processJSONSchema(t, s.schema, d);
2421
2422
  else {
2422
- const h = i.schema, p = t.processors[o.type];
2423
+ const m = s.schema, p = t.processors[o.type];
2423
2424
  if (!p)
2424
2425
  throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
2425
- p(e, t, h, d);
2426
+ p(e, t, m, d);
2426
2427
  }
2427
- const g = e._zod.parent;
2428
- g && (i.ref || (i.ref = g), E(g, t, d), t.seen.get(g).isParent = !0);
2428
+ const _ = e._zod.parent;
2429
+ _ && (s.ref || (s.ref = _), D(_, t, d), t.seen.get(_).isParent = !0);
2429
2430
  }
2430
2431
  const c = t.metadataRegistry.get(e);
2431
- return c && Object.assign(i.schema, c), t.io === "input" && x(e) && (delete i.schema.examples, delete i.schema.default), t.io === "input" && i.schema._prefault && ((r = i.schema).default ?? (r.default = i.schema._prefault)), delete i.schema._prefault, t.seen.get(e).schema;
2432
+ return c && Object.assign(s.schema, c), t.io === "input" && I(e) && (delete s.schema.examples, delete s.schema.default), t.io === "input" && s.schema._prefault && ((r = s.schema).default ?? (r.default = s.schema._prefault)), delete s.schema._prefault, t.seen.get(e).schema;
2432
2433
  }
2433
- function It(e, t) {
2434
+ function Ut(e, t) {
2434
2435
  const n = e.seen.get(t);
2435
2436
  if (!n)
2436
2437
  throw new Error("Unprocessed schema. This is a bug in Zod.");
2437
2438
  const r = /* @__PURE__ */ new Map();
2438
- for (const i of e.seen.entries()) {
2439
- const a = e.metadataRegistry.get(i[0])?.id;
2439
+ for (const s of e.seen.entries()) {
2440
+ const a = e.metadataRegistry.get(s[0])?.id;
2440
2441
  if (a) {
2441
2442
  const c = r.get(a);
2442
- if (c && c !== i[0])
2443
+ if (c && c !== s[0])
2443
2444
  throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
2444
- r.set(a, i[0]);
2445
+ r.set(a, s[0]);
2445
2446
  }
2446
2447
  }
2447
- const o = (i) => {
2448
+ const o = (s) => {
2448
2449
  const a = e.target === "draft-2020-12" ? "$defs" : "definitions";
2449
2450
  if (e.external) {
2450
- const g = e.external.registry.get(i[0])?.id, h = e.external.uri ?? ((w) => w);
2451
- if (g)
2452
- return { ref: h(g) };
2453
- const p = i[1].defId ?? i[1].schema.id ?? `schema${e.counter++}`;
2454
- return i[1].defId = p, { defId: p, ref: `${h("__shared")}#/${a}/${p}` };
2451
+ const _ = e.external.registry.get(s[0])?.id, m = e.external.uri ?? ((w) => w);
2452
+ if (_)
2453
+ return { ref: m(_) };
2454
+ const p = s[1].defId ?? s[1].schema.id ?? `schema${e.counter++}`;
2455
+ return s[1].defId = p, { defId: p, ref: `${m("__shared")}#/${a}/${p}` };
2455
2456
  }
2456
- if (i[1] === n)
2457
+ if (s[1] === n)
2457
2458
  return { ref: "#" };
2458
- const f = `#/${a}/`, d = i[1].schema.id ?? `__schema${e.counter++}`;
2459
+ const f = `#/${a}/`, d = s[1].schema.id ?? `__schema${e.counter++}`;
2459
2460
  return { defId: d, ref: f + d };
2460
- }, s = (i) => {
2461
- if (i[1].schema.$ref)
2461
+ }, i = (s) => {
2462
+ if (s[1].schema.$ref)
2462
2463
  return;
2463
- const a = i[1], { ref: c, defId: f } = o(i);
2464
+ const a = s[1], { ref: c, defId: f } = o(s);
2464
2465
  a.def = { ...a.schema }, f && (a.defId = f);
2465
2466
  const d = a.schema;
2466
- for (const g in d)
2467
- delete d[g];
2467
+ for (const _ in d)
2468
+ delete d[_];
2468
2469
  d.$ref = c;
2469
2470
  };
2470
2471
  if (e.cycles === "throw")
2471
- for (const i of e.seen.entries()) {
2472
- const a = i[1];
2472
+ for (const s of e.seen.entries()) {
2473
+ const a = s[1];
2473
2474
  if (a.cycle)
2474
2475
  throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
2475
2476
 
2476
2477
  Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
2477
2478
  }
2478
- for (const i of e.seen.entries()) {
2479
- const a = i[1];
2480
- if (t === i[0]) {
2481
- s(i);
2479
+ for (const s of e.seen.entries()) {
2480
+ const a = s[1];
2481
+ if (t === s[0]) {
2482
+ i(s);
2482
2483
  continue;
2483
2484
  }
2484
2485
  if (e.external) {
2485
- const f = e.external.registry.get(i[0])?.id;
2486
- if (t !== i[0] && f) {
2487
- s(i);
2486
+ const f = e.external.registry.get(s[0])?.id;
2487
+ if (t !== s[0] && f) {
2488
+ i(s);
2488
2489
  continue;
2489
2490
  }
2490
2491
  }
2491
- if (e.metadataRegistry.get(i[0])?.id) {
2492
- s(i);
2492
+ if (e.metadataRegistry.get(s[0])?.id) {
2493
+ i(s);
2493
2494
  continue;
2494
2495
  }
2495
2496
  if (a.cycle) {
2496
- s(i);
2497
+ i(s);
2497
2498
  continue;
2498
2499
  }
2499
2500
  if (a.count > 1 && e.reused === "ref") {
2500
- s(i);
2501
+ i(s);
2501
2502
  continue;
2502
2503
  }
2503
2504
  }
2504
2505
  }
2505
- function Ct(e, t) {
2506
+ function Lt(e, t) {
2506
2507
  const n = e.seen.get(t);
2507
2508
  if (!n)
2508
2509
  throw new Error("Unprocessed schema. This is a bug in Zod.");
2509
- const r = (i) => {
2510
- const a = e.seen.get(i);
2510
+ const r = (s) => {
2511
+ const a = e.seen.get(s);
2511
2512
  if (a.ref === null)
2512
2513
  return;
2513
2514
  const c = a.def ?? a.schema, f = { ...c }, d = a.ref;
2514
2515
  if (a.ref = null, d) {
2515
2516
  r(d);
2516
- const h = e.seen.get(d), p = h.schema;
2517
- if (p.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (c.allOf = c.allOf ?? [], c.allOf.push(p)) : Object.assign(c, p), Object.assign(c, f), i._zod.parent === d)
2518
- for (const v in c)
2519
- v === "$ref" || v === "allOf" || v in f || delete c[v];
2520
- if (p.$ref && h.def)
2521
- for (const v in c)
2522
- v === "$ref" || v === "allOf" || v in h.def && JSON.stringify(c[v]) === JSON.stringify(h.def[v]) && delete c[v];
2517
+ const m = e.seen.get(d), p = m.schema;
2518
+ if (p.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (c.allOf = c.allOf ?? [], c.allOf.push(p)) : Object.assign(c, p), Object.assign(c, f), s._zod.parent === d)
2519
+ for (const y in c)
2520
+ y === "$ref" || y === "allOf" || y in f || delete c[y];
2521
+ if (p.$ref && m.def)
2522
+ for (const y in c)
2523
+ y === "$ref" || y === "allOf" || y in m.def && JSON.stringify(c[y]) === JSON.stringify(m.def[y]) && delete c[y];
2523
2524
  }
2524
- const g = i._zod.parent;
2525
- if (g && g !== d) {
2526
- r(g);
2527
- const h = e.seen.get(g);
2528
- if (h?.schema.$ref && (c.$ref = h.schema.$ref, h.def))
2525
+ const _ = s._zod.parent;
2526
+ if (_ && _ !== d) {
2527
+ r(_);
2528
+ const m = e.seen.get(_);
2529
+ if (m?.schema.$ref && (c.$ref = m.schema.$ref, m.def))
2529
2530
  for (const p in c)
2530
- p === "$ref" || p === "allOf" || p in h.def && JSON.stringify(c[p]) === JSON.stringify(h.def[p]) && delete c[p];
2531
+ p === "$ref" || p === "allOf" || p in m.def && JSON.stringify(c[p]) === JSON.stringify(m.def[p]) && delete c[p];
2531
2532
  }
2532
2533
  e.override({
2533
- zodSchema: i,
2534
+ zodSchema: s,
2534
2535
  jsonSchema: c,
2535
2536
  path: a.path ?? []
2536
2537
  });
2537
2538
  };
2538
- for (const i of [...e.seen.entries()].reverse())
2539
- r(i[0]);
2539
+ for (const s of [...e.seen.entries()].reverse())
2540
+ r(s[0]);
2540
2541
  const o = {};
2541
2542
  if (e.target === "draft-2020-12" ? o.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? o.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? o.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
2542
- const i = e.external.registry.get(t)?.id;
2543
- if (!i)
2543
+ const s = e.external.registry.get(t)?.id;
2544
+ if (!s)
2544
2545
  throw new Error("Schema is missing an `id` property");
2545
- o.$id = e.external.uri(i);
2546
+ o.$id = e.external.uri(s);
2546
2547
  }
2547
2548
  Object.assign(o, n.def ?? n.schema);
2548
- const s = e.external?.defs ?? {};
2549
- for (const i of e.seen.entries()) {
2550
- const a = i[1];
2551
- a.def && a.defId && (s[a.defId] = a.def);
2549
+ const i = e.external?.defs ?? {};
2550
+ for (const s of e.seen.entries()) {
2551
+ const a = s[1];
2552
+ a.def && a.defId && (i[a.defId] = a.def);
2552
2553
  }
2553
- e.external || Object.keys(s).length > 0 && (e.target === "draft-2020-12" ? o.$defs = s : o.definitions = s);
2554
+ e.external || Object.keys(i).length > 0 && (e.target === "draft-2020-12" ? o.$defs = i : o.definitions = i);
2554
2555
  try {
2555
- const i = JSON.parse(JSON.stringify(o));
2556
- return Object.defineProperty(i, "~standard", {
2556
+ const s = JSON.parse(JSON.stringify(o));
2557
+ return Object.defineProperty(s, "~standard", {
2557
2558
  value: {
2558
2559
  ...t["~standard"],
2559
2560
  jsonSchema: {
2560
- input: fe(t, "input", e.processors),
2561
- output: fe(t, "output", e.processors)
2561
+ input: _e(t, "input", e.processors),
2562
+ output: _e(t, "output", e.processors)
2562
2563
  }
2563
2564
  },
2564
2565
  enumerable: !1,
2565
2566
  writable: !1
2566
- }), i;
2567
+ }), s;
2567
2568
  } catch {
2568
2569
  throw new Error("Error converting schema to JSON.");
2569
2570
  }
2570
2571
  }
2571
- function x(e, t) {
2572
+ function I(e, t) {
2572
2573
  const n = t ?? { seen: /* @__PURE__ */ new Set() };
2573
2574
  if (n.seen.has(e))
2574
2575
  return !1;
@@ -2577,203 +2578,203 @@ function x(e, t) {
2577
2578
  if (r.type === "transform")
2578
2579
  return !0;
2579
2580
  if (r.type === "array")
2580
- return x(r.element, n);
2581
+ return I(r.element, n);
2581
2582
  if (r.type === "set")
2582
- return x(r.valueType, n);
2583
+ return I(r.valueType, n);
2583
2584
  if (r.type === "lazy")
2584
- return x(r.getter(), n);
2585
+ return I(r.getter(), n);
2585
2586
  if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
2586
- return x(r.innerType, n);
2587
+ return I(r.innerType, n);
2587
2588
  if (r.type === "intersection")
2588
- return x(r.left, n) || x(r.right, n);
2589
+ return I(r.left, n) || I(r.right, n);
2589
2590
  if (r.type === "record" || r.type === "map")
2590
- return x(r.keyType, n) || x(r.valueType, n);
2591
+ return I(r.keyType, n) || I(r.valueType, n);
2591
2592
  if (r.type === "pipe")
2592
- return x(r.in, n) || x(r.out, n);
2593
+ return I(r.in, n) || I(r.out, n);
2593
2594
  if (r.type === "object") {
2594
2595
  for (const o in r.shape)
2595
- if (x(r.shape[o], n))
2596
+ if (I(r.shape[o], n))
2596
2597
  return !0;
2597
2598
  return !1;
2598
2599
  }
2599
2600
  if (r.type === "union") {
2600
2601
  for (const o of r.options)
2601
- if (x(o, n))
2602
+ if (I(o, n))
2602
2603
  return !0;
2603
2604
  return !1;
2604
2605
  }
2605
2606
  if (r.type === "tuple") {
2606
2607
  for (const o of r.items)
2607
- if (x(o, n))
2608
+ if (I(o, n))
2608
2609
  return !0;
2609
- return !!(r.rest && x(r.rest, n));
2610
+ return !!(r.rest && I(r.rest, n));
2610
2611
  }
2611
2612
  return !1;
2612
2613
  }
2613
- const ei = (e, t = {}) => (n) => {
2614
- const r = At({ ...n, processors: t });
2615
- return E(e, r), It(r, e), Ct(r, e);
2616
- }, fe = (e, t, n = {}) => (r) => {
2617
- const { libraryOptions: o, target: s } = r ?? {}, i = At({ ...o ?? {}, target: s, io: t, processors: n });
2618
- return E(e, i), It(i, e), Ct(i, e);
2619
- }, ti = {
2614
+ const ss = (e, t = {}) => (n) => {
2615
+ const r = Ft({ ...n, processors: t });
2616
+ return D(e, r), Ut(r, e), Lt(r, e);
2617
+ }, _e = (e, t, n = {}) => (r) => {
2618
+ const { libraryOptions: o, target: i } = r ?? {}, s = Ft({ ...o ?? {}, target: i, io: t, processors: n });
2619
+ return D(e, s), Ut(s, e), Lt(s, e);
2620
+ }, is = {
2620
2621
  guid: "uuid",
2621
2622
  url: "uri",
2622
2623
  datetime: "date-time",
2623
2624
  json_string: "json-string",
2624
2625
  regex: ""
2625
2626
  // do not set
2626
- }, ni = (e, t, n, r) => {
2627
+ }, as = (e, t, n, r) => {
2627
2628
  const o = n;
2628
2629
  o.type = "string";
2629
- const { minimum: s, maximum: i, format: a, patterns: c, contentEncoding: f } = e._zod.bag;
2630
- if (typeof s == "number" && (o.minLength = s), typeof i == "number" && (o.maxLength = i), a && (o.format = ti[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), f && (o.contentEncoding = f), c && c.size > 0) {
2630
+ const { minimum: i, maximum: s, format: a, patterns: c, contentEncoding: f } = e._zod.bag;
2631
+ if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), a && (o.format = is[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), f && (o.contentEncoding = f), c && c.size > 0) {
2631
2632
  const d = [...c];
2632
2633
  d.length === 1 ? o.pattern = d[0].source : d.length > 1 && (o.allOf = [
2633
- ...d.map((g) => ({
2634
+ ...d.map((_) => ({
2634
2635
  ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
2635
- pattern: g.source
2636
+ pattern: _.source
2636
2637
  }))
2637
2638
  ]);
2638
2639
  }
2639
- }, ri = (e, t, n, r) => {
2640
+ }, cs = (e, t, n, r) => {
2640
2641
  n.not = {};
2641
- }, oi = (e, t, n, r) => {
2642
- }, ii = (e, t, n, r) => {
2643
- const o = e._zod.def, s = wt(o.entries);
2644
- s.every((i) => typeof i == "number") && (n.type = "number"), s.every((i) => typeof i == "string") && (n.type = "string"), n.enum = s;
2645
- }, si = (e, t, n, r) => {
2642
+ }, us = (e, t, n, r) => {
2643
+ }, ls = (e, t, n, r) => {
2644
+ const o = e._zod.def, i = kt(o.entries);
2645
+ i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), n.enum = i;
2646
+ }, fs = (e, t, n, r) => {
2646
2647
  if (t.unrepresentable === "throw")
2647
2648
  throw new Error("Custom types cannot be represented in JSON Schema");
2648
- }, ai = (e, t, n, r) => {
2649
+ }, ds = (e, t, n, r) => {
2649
2650
  if (t.unrepresentable === "throw")
2650
2651
  throw new Error("Transforms cannot be represented in JSON Schema");
2651
- }, ci = (e, t, n, r) => {
2652
- const o = n, s = e._zod.def, { minimum: i, maximum: a } = e._zod.bag;
2653
- typeof i == "number" && (o.minItems = i), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = E(s.element, t, { ...r, path: [...r.path, "items"] });
2654
- }, ui = (e, t, n, r) => {
2655
- const o = n, s = e._zod.def;
2652
+ }, ps = (e, t, n, r) => {
2653
+ const o = n, i = e._zod.def, { minimum: s, maximum: a } = e._zod.bag;
2654
+ typeof s == "number" && (o.minItems = s), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = D(i.element, t, { ...r, path: [...r.path, "items"] });
2655
+ }, hs = (e, t, n, r) => {
2656
+ const o = n, i = e._zod.def;
2656
2657
  o.type = "object", o.properties = {};
2657
- const i = s.shape;
2658
- for (const f in i)
2659
- o.properties[f] = E(i[f], t, {
2658
+ const s = i.shape;
2659
+ for (const f in s)
2660
+ o.properties[f] = D(s[f], t, {
2660
2661
  ...r,
2661
2662
  path: [...r.path, "properties", f]
2662
2663
  });
2663
- const a = new Set(Object.keys(i)), c = new Set([...a].filter((f) => {
2664
- const d = s.shape[f]._zod;
2664
+ const a = new Set(Object.keys(s)), c = new Set([...a].filter((f) => {
2665
+ const d = i.shape[f]._zod;
2665
2666
  return t.io === "input" ? d.optin === void 0 : d.optout === void 0;
2666
2667
  }));
2667
- c.size > 0 && (o.required = Array.from(c)), s.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : s.catchall ? s.catchall && (o.additionalProperties = E(s.catchall, t, {
2668
+ c.size > 0 && (o.required = Array.from(c)), i.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = D(i.catchall, t, {
2668
2669
  ...r,
2669
2670
  path: [...r.path, "additionalProperties"]
2670
2671
  })) : t.io === "output" && (o.additionalProperties = !1);
2671
- }, li = (e, t, n, r) => {
2672
- const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((a, c) => E(a, t, {
2672
+ }, ms = (e, t, n, r) => {
2673
+ const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((a, c) => D(a, t, {
2673
2674
  ...r,
2674
- path: [...r.path, s ? "oneOf" : "anyOf", c]
2675
+ path: [...r.path, i ? "oneOf" : "anyOf", c]
2675
2676
  }));
2676
- s ? n.oneOf = i : n.anyOf = i;
2677
- }, fi = (e, t, n, r) => {
2678
- const o = e._zod.def, s = E(o.left, t, {
2677
+ i ? n.oneOf = s : n.anyOf = s;
2678
+ }, gs = (e, t, n, r) => {
2679
+ const o = e._zod.def, i = D(o.left, t, {
2679
2680
  ...r,
2680
2681
  path: [...r.path, "allOf", 0]
2681
- }), i = E(o.right, t, {
2682
+ }), s = D(o.right, t, {
2682
2683
  ...r,
2683
2684
  path: [...r.path, "allOf", 1]
2684
2685
  }), a = (f) => "allOf" in f && Object.keys(f).length === 1, c = [
2685
- ...a(s) ? s.allOf : [s],
2686
- ...a(i) ? i.allOf : [i]
2686
+ ...a(i) ? i.allOf : [i],
2687
+ ...a(s) ? s.allOf : [s]
2687
2688
  ];
2688
2689
  n.allOf = c;
2689
- }, di = (e, t, n, r) => {
2690
- const o = e._zod.def, s = E(o.innerType, t, r), i = t.seen.get(e);
2691
- t.target === "openapi-3.0" ? (i.ref = o.innerType, n.nullable = !0) : n.anyOf = [s, { type: "null" }];
2692
- }, pi = (e, t, n, r) => {
2690
+ }, _s = (e, t, n, r) => {
2691
+ const o = e._zod.def, i = D(o.innerType, t, r), s = t.seen.get(e);
2692
+ t.target === "openapi-3.0" ? (s.ref = o.innerType, n.nullable = !0) : n.anyOf = [i, { type: "null" }];
2693
+ }, vs = (e, t, n, r) => {
2693
2694
  const o = e._zod.def;
2694
- E(o.innerType, t, r);
2695
- const s = t.seen.get(e);
2696
- s.ref = o.innerType;
2697
- }, hi = (e, t, n, r) => {
2695
+ D(o.innerType, t, r);
2696
+ const i = t.seen.get(e);
2697
+ i.ref = o.innerType;
2698
+ }, ys = (e, t, n, r) => {
2698
2699
  const o = e._zod.def;
2699
- E(o.innerType, t, r);
2700
- const s = t.seen.get(e);
2701
- s.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
2702
- }, mi = (e, t, n, r) => {
2700
+ D(o.innerType, t, r);
2701
+ const i = t.seen.get(e);
2702
+ i.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
2703
+ }, ws = (e, t, n, r) => {
2703
2704
  const o = e._zod.def;
2704
- E(o.innerType, t, r);
2705
- const s = t.seen.get(e);
2706
- s.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
2707
- }, gi = (e, t, n, r) => {
2705
+ D(o.innerType, t, r);
2706
+ const i = t.seen.get(e);
2707
+ i.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
2708
+ }, bs = (e, t, n, r) => {
2708
2709
  const o = e._zod.def;
2709
- E(o.innerType, t, r);
2710
- const s = t.seen.get(e);
2711
- s.ref = o.innerType;
2712
- let i;
2710
+ D(o.innerType, t, r);
2711
+ const i = t.seen.get(e);
2712
+ i.ref = o.innerType;
2713
+ let s;
2713
2714
  try {
2714
- i = o.catchValue(void 0);
2715
+ s = o.catchValue(void 0);
2715
2716
  } catch {
2716
2717
  throw new Error("Dynamic catch values are not supported in JSON Schema");
2717
2718
  }
2718
- n.default = i;
2719
- }, _i = (e, t, n, r) => {
2720
- const o = e._zod.def, s = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
2721
- E(s, t, r);
2722
- const i = t.seen.get(e);
2723
- i.ref = s;
2724
- }, vi = (e, t, n, r) => {
2725
- const o = e._zod.def;
2726
- E(o.innerType, t, r);
2719
+ n.default = s;
2720
+ }, zs = (e, t, n, r) => {
2721
+ const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
2722
+ D(i, t, r);
2727
2723
  const s = t.seen.get(e);
2728
- s.ref = o.innerType, n.readOnly = !0;
2729
- }, Ft = (e, t, n, r) => {
2724
+ s.ref = i;
2725
+ }, ks = (e, t, n, r) => {
2730
2726
  const o = e._zod.def;
2731
- E(o.innerType, t, r);
2732
- const s = t.seen.get(e);
2733
- s.ref = o.innerType;
2734
- }, yi = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
2735
- Er.init(e, t), $.init(e, t);
2727
+ D(o.innerType, t, r);
2728
+ const i = t.seen.get(e);
2729
+ i.ref = o.innerType, n.readOnly = !0;
2730
+ }, Jt = (e, t, n, r) => {
2731
+ const o = e._zod.def;
2732
+ D(o.innerType, t, r);
2733
+ const i = t.seen.get(e);
2734
+ i.ref = o.innerType;
2735
+ }, $s = /* @__PURE__ */ u("ZodISODateTime", (e, t) => {
2736
+ Dr.init(e, t), $.init(e, t);
2736
2737
  });
2737
- function wi(e) {
2738
- return /* @__PURE__ */ Do(yi, e);
2738
+ function Ts(e) {
2739
+ return /* @__PURE__ */ Co($s, e);
2739
2740
  }
2740
- const bi = /* @__PURE__ */ u("ZodISODate", (e, t) => {
2741
- Pr.init(e, t), $.init(e, t);
2741
+ const Os = /* @__PURE__ */ u("ZodISODate", (e, t) => {
2742
+ Ar.init(e, t), $.init(e, t);
2742
2743
  });
2743
- function zi(e) {
2744
- return /* @__PURE__ */ xo(bi, e);
2744
+ function js(e) {
2745
+ return /* @__PURE__ */ Fo(Os, e);
2745
2746
  }
2746
- const ki = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
2747
- Rr.init(e, t), $.init(e, t);
2747
+ const Ss = /* @__PURE__ */ u("ZodISOTime", (e, t) => {
2748
+ Ir.init(e, t), $.init(e, t);
2748
2749
  });
2749
- function $i(e) {
2750
- return /* @__PURE__ */ No(ki, e);
2750
+ function Zs(e) {
2751
+ return /* @__PURE__ */ Uo(Ss, e);
2751
2752
  }
2752
- const Ti = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
2753
- Dr.init(e, t), $.init(e, t);
2753
+ const Es = /* @__PURE__ */ u("ZodISODuration", (e, t) => {
2754
+ Cr.init(e, t), $.init(e, t);
2754
2755
  });
2755
- function Si(e) {
2756
- return /* @__PURE__ */ Ao(Ti, e);
2756
+ function xs(e) {
2757
+ return /* @__PURE__ */ Lo(Es, e);
2757
2758
  }
2758
- const Oi = (e, t) => {
2759
- Tt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2759
+ const Rs = (e, t) => {
2760
+ St.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2760
2761
  format: {
2761
- value: (n) => On(e, n)
2762
+ value: (n) => Rn(e, n)
2762
2763
  // enumerable: false,
2763
2764
  },
2764
2765
  flatten: {
2765
- value: (n) => Sn(e, n)
2766
+ value: (n) => xn(e, n)
2766
2767
  // enumerable: false,
2767
2768
  },
2768
2769
  addIssue: {
2769
2770
  value: (n) => {
2770
- e.issues.push(n), e.message = JSON.stringify(e.issues, ke, 2);
2771
+ e.issues.push(n), e.message = JSON.stringify(e.issues, je, 2);
2771
2772
  }
2772
2773
  // enumerable: false,
2773
2774
  },
2774
2775
  addIssues: {
2775
2776
  value: (n) => {
2776
- e.issues.push(...n), e.message = JSON.stringify(e.issues, ke, 2);
2777
+ e.issues.push(...n), e.message = JSON.stringify(e.issues, je, 2);
2777
2778
  }
2778
2779
  // enumerable: false,
2779
2780
  },
@@ -2784,380 +2785,409 @@ const Oi = (e, t) => {
2784
2785
  // enumerable: false,
2785
2786
  }
2786
2787
  });
2787
- }, I = u("ZodError", Oi, {
2788
+ }, U = u("ZodError", Rs, {
2788
2789
  Parent: Error
2789
- }), Zi = /* @__PURE__ */ Ie(I), ji = /* @__PURE__ */ Ce(I), Ei = /* @__PURE__ */ pe(I), Pi = /* @__PURE__ */ he(I), Ri = /* @__PURE__ */ En(I), Di = /* @__PURE__ */ Pn(I), xi = /* @__PURE__ */ Rn(I), Ni = /* @__PURE__ */ Dn(I), Ai = /* @__PURE__ */ xn(I), Ii = /* @__PURE__ */ Nn(I), Ci = /* @__PURE__ */ An(I), Fi = /* @__PURE__ */ In(I), j = /* @__PURE__ */ u("ZodType", (e, t) => (Z.init(e, t), Object.assign(e["~standard"], {
2790
+ }), Ps = /* @__PURE__ */ Je(U), Ns = /* @__PURE__ */ Me(U), Ds = /* @__PURE__ */ ye(U), As = /* @__PURE__ */ we(U), Is = /* @__PURE__ */ Dn(U), Cs = /* @__PURE__ */ An(U), Fs = /* @__PURE__ */ In(U), Us = /* @__PURE__ */ Cn(U), Ls = /* @__PURE__ */ Fn(U), Js = /* @__PURE__ */ Un(U), Ms = /* @__PURE__ */ Ln(U), Vs = /* @__PURE__ */ Jn(U), R = /* @__PURE__ */ u("ZodType", (e, t) => (x.init(e, t), Object.assign(e["~standard"], {
2790
2791
  jsonSchema: {
2791
- input: fe(e, "input"),
2792
- output: fe(e, "output")
2792
+ input: _e(e, "input"),
2793
+ output: _e(e, "output")
2793
2794
  }
2794
- }), e.toJSONSchema = ei(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(J(t, {
2795
+ }), e.toJSONSchema = ss(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(W(t, {
2795
2796
  checks: [
2796
2797
  ...t.checks ?? [],
2797
2798
  ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
2798
2799
  ]
2799
2800
  }), {
2800
2801
  parent: !0
2801
- }), e.with = e.check, e.clone = (n, r) => M(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Zi(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Ei(e, n, r), e.parseAsync = async (n, r) => ji(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => Pi(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Ri(e, n, r), e.decode = (n, r) => Di(e, n, r), e.encodeAsync = async (n, r) => xi(e, n, r), e.decodeAsync = async (n, r) => Ni(e, n, r), e.safeEncode = (n, r) => Ai(e, n, r), e.safeDecode = (n, r) => Ii(e, n, r), e.safeEncodeAsync = async (n, r) => Ci(e, n, r), e.safeDecodeAsync = async (n, r) => Fi(e, n, r), e.refine = (n, r) => e.check(Ps(n, r)), e.superRefine = (n) => e.check(Rs(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ K(n)), e.optional = () => pt(e), e.exactOptional = () => vs(e), e.nullable = () => ht(e), e.nullish = () => pt(ht(e)), e.nonoptional = (n) => $s(e, n), e.array = () => cs(e), e.or = (n) => fs([e, n]), e.and = (n) => ps(e, n), e.transform = (n) => mt(e, gs(n)), e.default = (n) => bs(e, n), e.prefault = (n) => ks(e, n), e.catch = (n) => Ss(e, n), e.pipe = (n) => mt(e, n), e.readonly = () => js(e), e.describe = (n) => {
2802
+ }), e.with = e.check, e.clone = (n, r) => G(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Ps(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => Ds(e, n, r), e.parseAsync = async (n, r) => Ns(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => As(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => Is(e, n, r), e.decode = (n, r) => Cs(e, n, r), e.encodeAsync = async (n, r) => Fs(e, n, r), e.decodeAsync = async (n, r) => Us(e, n, r), e.safeEncode = (n, r) => Ls(e, n, r), e.safeDecode = (n, r) => Js(e, n, r), e.safeEncodeAsync = async (n, r) => Ms(e, n, r), e.safeDecodeAsync = async (n, r) => Vs(e, n, r), e.refine = (n, r) => e.check(Ai(n, r)), e.superRefine = (n) => e.check(Ii(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ Q(n)), e.optional = () => _t(e), e.exactOptional = () => ki(e), e.nullable = () => vt(e), e.nullish = () => _t(vt(e)), e.nonoptional = (n) => Zi(e, n), e.array = () => pi(e), e.or = (n) => gi([e, n]), e.and = (n) => vi(e, n), e.transform = (n) => yt(e, bi(n)), e.default = (n) => Oi(e, n), e.prefault = (n) => Si(e, n), e.catch = (n) => xi(e, n), e.pipe = (n) => yt(e, n), e.readonly = () => Ni(e), e.describe = (n) => {
2802
2803
  const r = e.clone();
2803
- return Q.add(r, { description: n }), r;
2804
+ return re.add(r, { description: n }), r;
2804
2805
  }, Object.defineProperty(e, "description", {
2805
2806
  get() {
2806
- return Q.get(e)?.description;
2807
+ return re.get(e)?.description;
2807
2808
  },
2808
2809
  configurable: !0
2809
2810
  }), e.meta = (...n) => {
2810
2811
  if (n.length === 0)
2811
- return Q.get(e);
2812
+ return re.get(e);
2812
2813
  const r = e.clone();
2813
- return Q.add(r, n[0]), r;
2814
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), Ut = /* @__PURE__ */ u("_ZodString", (e, t) => {
2815
- Fe.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, o, s) => ni(e, r, o);
2814
+ return re.add(r, n[0]), r;
2815
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), Mt = /* @__PURE__ */ u("_ZodString", (e, t) => {
2816
+ Ve.init(e, t), R.init(e, t), e._zod.processJSONSchema = (r, o, i) => as(e, r, o);
2816
2817
  const n = e._zod.bag;
2817
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ Fo(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ Jo(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Mo(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ Vo(...r)), e.min = (...r) => e.check(/* @__PURE__ */ le(...r)), e.max = (...r) => e.check(/* @__PURE__ */ xt(...r)), e.length = (...r) => e.check(/* @__PURE__ */ Nt(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ le(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ Uo(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Lo(r)), e.trim = () => e.check(/* @__PURE__ */ Go()), e.normalize = (...r) => e.check(/* @__PURE__ */ Wo(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Yo()), e.toUpperCase = () => e.check(/* @__PURE__ */ Bo()), e.slugify = () => e.check(/* @__PURE__ */ qo());
2818
- }), Ui = /* @__PURE__ */ u("ZodString", (e, t) => {
2819
- Fe.init(e, t), Ut.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ fo(Li, n)), e.url = (n) => e.check(/* @__PURE__ */ _o(Ji, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Ro(rs, n)), e.emoji = (n) => e.check(/* @__PURE__ */ vo(Mi, n)), e.guid = (n) => e.check(/* @__PURE__ */ lt(ft, n)), e.uuid = (n) => e.check(/* @__PURE__ */ po(ae, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ ho(ae, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ mo(ae, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ go(ae, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ yo(Vi, n)), e.guid = (n) => e.check(/* @__PURE__ */ lt(ft, n)), e.cuid = (n) => e.check(/* @__PURE__ */ wo(Wi, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ bo(Gi, n)), e.ulid = (n) => e.check(/* @__PURE__ */ zo(Yi, n)), e.base64 = (n) => e.check(/* @__PURE__ */ jo(es, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Eo(ts, n)), e.xid = (n) => e.check(/* @__PURE__ */ ko(Bi, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ $o(qi, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ To(Ki, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ So(Hi, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Oo(Xi, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Zo(Qi, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Po(ns, n)), e.datetime = (n) => e.check(wi(n)), e.date = (n) => e.check(zi(n)), e.time = (n) => e.check($i(n)), e.duration = (n) => e.check(Si(n));
2818
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ Vo(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ Yo(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ Bo(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ qo(...r)), e.min = (...r) => e.check(/* @__PURE__ */ ge(...r)), e.max = (...r) => e.check(/* @__PURE__ */ It(...r)), e.length = (...r) => e.check(/* @__PURE__ */ Ct(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ ge(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ Wo(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ Go(r)), e.trim = () => e.check(/* @__PURE__ */ Ho()), e.normalize = (...r) => e.check(/* @__PURE__ */ Ko(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ Xo()), e.toUpperCase = () => e.check(/* @__PURE__ */ Qo()), e.slugify = () => e.check(/* @__PURE__ */ es());
2819
+ }), Ws = /* @__PURE__ */ u("ZodString", (e, t) => {
2820
+ Ve.init(e, t), Mt.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ _o(Gs, n)), e.url = (n) => e.check(/* @__PURE__ */ zo(Ys, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Io(ci, n)), e.emoji = (n) => e.check(/* @__PURE__ */ ko(Bs, n)), e.guid = (n) => e.check(/* @__PURE__ */ ht(mt, n)), e.uuid = (n) => e.check(/* @__PURE__ */ vo(pe, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ yo(pe, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ wo(pe, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ bo(pe, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ $o(qs, n)), e.guid = (n) => e.check(/* @__PURE__ */ ht(mt, n)), e.cuid = (n) => e.check(/* @__PURE__ */ To(Ks, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Oo(Hs, n)), e.ulid = (n) => e.check(/* @__PURE__ */ jo(Xs, n)), e.base64 = (n) => e.check(/* @__PURE__ */ No(si, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Do(ii, n)), e.xid = (n) => e.check(/* @__PURE__ */ So(Qs, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Zo(ei, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Eo(ti, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ xo(ni, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Ro(ri, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Po(oi, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Ao(ai, n)), e.datetime = (n) => e.check(Ts(n)), e.date = (n) => e.check(js(n)), e.time = (n) => e.check(Zs(n)), e.duration = (n) => e.check(xs(n));
2820
2821
  });
2821
- function L(e) {
2822
- return /* @__PURE__ */ lo(Ui, e);
2822
+ function V(e) {
2823
+ return /* @__PURE__ */ go(Ws, e);
2823
2824
  }
2824
2825
  const $ = /* @__PURE__ */ u("ZodStringFormat", (e, t) => {
2825
- k.init(e, t), Ut.init(e, t);
2826
- }), Li = /* @__PURE__ */ u("ZodEmail", (e, t) => {
2827
- br.init(e, t), $.init(e, t);
2828
- }), ft = /* @__PURE__ */ u("ZodGUID", (e, t) => {
2829
- yr.init(e, t), $.init(e, t);
2830
- }), ae = /* @__PURE__ */ u("ZodUUID", (e, t) => {
2831
- wr.init(e, t), $.init(e, t);
2832
- }), Ji = /* @__PURE__ */ u("ZodURL", (e, t) => {
2833
- zr.init(e, t), $.init(e, t);
2834
- }), Mi = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
2835
- kr.init(e, t), $.init(e, t);
2836
- }), Vi = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
2826
+ k.init(e, t), Mt.init(e, t);
2827
+ }), Gs = /* @__PURE__ */ u("ZodEmail", (e, t) => {
2828
+ Or.init(e, t), $.init(e, t);
2829
+ }), mt = /* @__PURE__ */ u("ZodGUID", (e, t) => {
2837
2830
  $r.init(e, t), $.init(e, t);
2838
- }), Wi = /* @__PURE__ */ u("ZodCUID", (e, t) => {
2831
+ }), pe = /* @__PURE__ */ u("ZodUUID", (e, t) => {
2839
2832
  Tr.init(e, t), $.init(e, t);
2840
- }), Gi = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
2833
+ }), Ys = /* @__PURE__ */ u("ZodURL", (e, t) => {
2834
+ jr.init(e, t), $.init(e, t);
2835
+ }), Bs = /* @__PURE__ */ u("ZodEmoji", (e, t) => {
2841
2836
  Sr.init(e, t), $.init(e, t);
2842
- }), Yi = /* @__PURE__ */ u("ZodULID", (e, t) => {
2843
- Or.init(e, t), $.init(e, t);
2844
- }), Bi = /* @__PURE__ */ u("ZodXID", (e, t) => {
2837
+ }), qs = /* @__PURE__ */ u("ZodNanoID", (e, t) => {
2845
2838
  Zr.init(e, t), $.init(e, t);
2846
- }), qi = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
2847
- jr.init(e, t), $.init(e, t);
2848
- }), Ki = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
2839
+ }), Ks = /* @__PURE__ */ u("ZodCUID", (e, t) => {
2840
+ Er.init(e, t), $.init(e, t);
2841
+ }), Hs = /* @__PURE__ */ u("ZodCUID2", (e, t) => {
2849
2842
  xr.init(e, t), $.init(e, t);
2850
- }), Hi = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
2843
+ }), Xs = /* @__PURE__ */ u("ZodULID", (e, t) => {
2844
+ Rr.init(e, t), $.init(e, t);
2845
+ }), Qs = /* @__PURE__ */ u("ZodXID", (e, t) => {
2846
+ Pr.init(e, t), $.init(e, t);
2847
+ }), ei = /* @__PURE__ */ u("ZodKSUID", (e, t) => {
2851
2848
  Nr.init(e, t), $.init(e, t);
2852
- }), Xi = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
2853
- Ar.init(e, t), $.init(e, t);
2854
- }), Qi = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
2855
- Ir.init(e, t), $.init(e, t);
2856
- }), es = /* @__PURE__ */ u("ZodBase64", (e, t) => {
2857
- Cr.init(e, t), $.init(e, t);
2858
- }), ts = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
2849
+ }), ti = /* @__PURE__ */ u("ZodIPv4", (e, t) => {
2850
+ Fr.init(e, t), $.init(e, t);
2851
+ }), ni = /* @__PURE__ */ u("ZodIPv6", (e, t) => {
2859
2852
  Ur.init(e, t), $.init(e, t);
2860
- }), ns = /* @__PURE__ */ u("ZodE164", (e, t) => {
2853
+ }), ri = /* @__PURE__ */ u("ZodCIDRv4", (e, t) => {
2861
2854
  Lr.init(e, t), $.init(e, t);
2862
- }), rs = /* @__PURE__ */ u("ZodJWT", (e, t) => {
2855
+ }), oi = /* @__PURE__ */ u("ZodCIDRv6", (e, t) => {
2856
+ Jr.init(e, t), $.init(e, t);
2857
+ }), si = /* @__PURE__ */ u("ZodBase64", (e, t) => {
2863
2858
  Mr.init(e, t), $.init(e, t);
2864
- }), os = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
2865
- Vr.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => oi();
2859
+ }), ii = /* @__PURE__ */ u("ZodBase64URL", (e, t) => {
2860
+ Wr.init(e, t), $.init(e, t);
2861
+ }), ai = /* @__PURE__ */ u("ZodE164", (e, t) => {
2862
+ Gr.init(e, t), $.init(e, t);
2863
+ }), ci = /* @__PURE__ */ u("ZodJWT", (e, t) => {
2864
+ Br.init(e, t), $.init(e, t);
2865
+ }), ui = /* @__PURE__ */ u("ZodUnknown", (e, t) => {
2866
+ qr.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => us();
2866
2867
  });
2867
- function dt() {
2868
- return /* @__PURE__ */ Io(os);
2868
+ function gt() {
2869
+ return /* @__PURE__ */ Jo(ui);
2869
2870
  }
2870
- const is = /* @__PURE__ */ u("ZodNever", (e, t) => {
2871
- Wr.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => ri(e, n, r);
2871
+ const li = /* @__PURE__ */ u("ZodNever", (e, t) => {
2872
+ Kr.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => cs(e, n, r);
2872
2873
  });
2873
- function ss(e) {
2874
- return /* @__PURE__ */ Co(is, e);
2874
+ function fi(e) {
2875
+ return /* @__PURE__ */ Mo(li, e);
2875
2876
  }
2876
- const as = /* @__PURE__ */ u("ZodArray", (e, t) => {
2877
- Gr.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => ci(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ le(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ le(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ xt(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ Nt(n, r)), e.unwrap = () => e.element;
2877
+ const di = /* @__PURE__ */ u("ZodArray", (e, t) => {
2878
+ Hr.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => ps(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ ge(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ ge(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ It(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ Ct(n, r)), e.unwrap = () => e.element;
2878
2879
  });
2879
- function cs(e, t) {
2880
- return /* @__PURE__ */ Ko(as, e, t);
2880
+ function pi(e, t) {
2881
+ return /* @__PURE__ */ ts(di, e, t);
2881
2882
  }
2882
- const us = /* @__PURE__ */ u("ZodObject", (e, t) => {
2883
- Br.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => ui(e, n, r, o), z(e, "shape", () => t.shape), e.keyof = () => hs(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: dt() }), e.loose = () => e.clone({ ...e._zod.def, catchall: dt() }), e.strict = () => e.clone({ ...e._zod.def, catchall: ss() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => bn(e, n), e.safeExtend = (n) => zn(e, n), e.merge = (n) => kn(e, n), e.pick = (n) => yn(e, n), e.omit = (n) => wn(e, n), e.partial = (...n) => $n(Jt, e, n[0]), e.required = (...n) => Tn(Mt, e, n[0]);
2883
+ const hi = /* @__PURE__ */ u("ZodObject", (e, t) => {
2884
+ Qr.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => hs(e, n, r, o), z(e, "shape", () => t.shape), e.keyof = () => yi(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: gt() }), e.loose = () => e.clone({ ...e._zod.def, catchall: gt() }), e.strict = () => e.clone({ ...e._zod.def, catchall: fi() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => On(e, n), e.safeExtend = (n) => jn(e, n), e.merge = (n) => Sn(e, n), e.pick = (n) => $n(e, n), e.omit = (n) => Tn(e, n), e.partial = (...n) => Zn(Wt, e, n[0]), e.required = (...n) => En(Gt, e, n[0]);
2884
2885
  });
2885
- function Lt(e, t) {
2886
+ function Vt(e, t) {
2886
2887
  const n = {
2887
2888
  type: "object",
2888
2889
  shape: e ?? {},
2889
- ..._(t)
2890
+ ...g(t)
2890
2891
  };
2891
- return new us(n);
2892
+ return new hi(n);
2892
2893
  }
2893
- const ls = /* @__PURE__ */ u("ZodUnion", (e, t) => {
2894
- qr.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => li(e, n, r, o), e.options = t.options;
2894
+ const mi = /* @__PURE__ */ u("ZodUnion", (e, t) => {
2895
+ eo.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => ms(e, n, r, o), e.options = t.options;
2895
2896
  });
2896
- function fs(e, t) {
2897
- return new ls({
2897
+ function gi(e, t) {
2898
+ return new mi({
2898
2899
  type: "union",
2899
2900
  options: e,
2900
- ..._(t)
2901
+ ...g(t)
2901
2902
  });
2902
2903
  }
2903
- const ds = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
2904
- Kr.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => fi(e, n, r, o);
2904
+ const _i = /* @__PURE__ */ u("ZodIntersection", (e, t) => {
2905
+ to.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => gs(e, n, r, o);
2905
2906
  });
2906
- function ps(e, t) {
2907
- return new ds({
2907
+ function vi(e, t) {
2908
+ return new _i({
2908
2909
  type: "intersection",
2909
2910
  left: e,
2910
2911
  right: t
2911
2912
  });
2912
2913
  }
2913
- const Te = /* @__PURE__ */ u("ZodEnum", (e, t) => {
2914
- Hr.init(e, t), j.init(e, t), e._zod.processJSONSchema = (r, o, s) => ii(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
2914
+ const Ze = /* @__PURE__ */ u("ZodEnum", (e, t) => {
2915
+ no.init(e, t), R.init(e, t), e._zod.processJSONSchema = (r, o, i) => ls(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
2915
2916
  const n = new Set(Object.keys(t.entries));
2916
2917
  e.extract = (r, o) => {
2917
- const s = {};
2918
- for (const i of r)
2919
- if (n.has(i))
2920
- s[i] = t.entries[i];
2918
+ const i = {};
2919
+ for (const s of r)
2920
+ if (n.has(s))
2921
+ i[s] = t.entries[s];
2921
2922
  else
2922
- throw new Error(`Key ${i} not found in enum`);
2923
- return new Te({
2923
+ throw new Error(`Key ${s} not found in enum`);
2924
+ return new Ze({
2924
2925
  ...t,
2925
2926
  checks: [],
2926
- ..._(o),
2927
- entries: s
2927
+ ...g(o),
2928
+ entries: i
2928
2929
  });
2929
2930
  }, e.exclude = (r, o) => {
2930
- const s = { ...t.entries };
2931
- for (const i of r)
2932
- if (n.has(i))
2933
- delete s[i];
2931
+ const i = { ...t.entries };
2932
+ for (const s of r)
2933
+ if (n.has(s))
2934
+ delete i[s];
2934
2935
  else
2935
- throw new Error(`Key ${i} not found in enum`);
2936
- return new Te({
2936
+ throw new Error(`Key ${s} not found in enum`);
2937
+ return new Ze({
2937
2938
  ...t,
2938
2939
  checks: [],
2939
- ..._(o),
2940
- entries: s
2940
+ ...g(o),
2941
+ entries: i
2941
2942
  });
2942
2943
  };
2943
2944
  });
2944
- function hs(e, t) {
2945
+ function yi(e, t) {
2945
2946
  const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
2946
- return new Te({
2947
+ return new Ze({
2947
2948
  type: "enum",
2948
2949
  entries: n,
2949
- ..._(t)
2950
+ ...g(t)
2950
2951
  });
2951
2952
  }
2952
- const ms = /* @__PURE__ */ u("ZodTransform", (e, t) => {
2953
- Xr.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => ai(e, n), e._zod.parse = (n, r) => {
2953
+ const wi = /* @__PURE__ */ u("ZodTransform", (e, t) => {
2954
+ ro.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => ds(e, n), e._zod.parse = (n, r) => {
2954
2955
  if (r.direction === "backward")
2955
- throw new vt(e.constructor.name);
2956
- n.addIssue = (s) => {
2957
- if (typeof s == "string")
2958
- n.issues.push(te(s, n.value, t));
2956
+ throw new bt(e.constructor.name);
2957
+ n.addIssue = (i) => {
2958
+ if (typeof i == "string")
2959
+ n.issues.push(se(i, n.value, t));
2959
2960
  else {
2960
- const i = s;
2961
- i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = n.value), i.inst ?? (i.inst = e), n.issues.push(te(i));
2961
+ const s = i;
2962
+ s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = n.value), s.inst ?? (s.inst = e), n.issues.push(se(s));
2962
2963
  }
2963
2964
  };
2964
2965
  const o = t.transform(n.value, n);
2965
- return o instanceof Promise ? o.then((s) => (n.value = s, n)) : (n.value = o, n);
2966
+ return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
2966
2967
  };
2967
2968
  });
2968
- function gs(e) {
2969
- return new ms({
2969
+ function bi(e) {
2970
+ return new wi({
2970
2971
  type: "transform",
2971
2972
  transform: e
2972
2973
  });
2973
2974
  }
2974
- const Jt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
2975
- Dt.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ft(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2975
+ const Wt = /* @__PURE__ */ u("ZodOptional", (e, t) => {
2976
+ At.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => Jt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2976
2977
  });
2977
- function pt(e) {
2978
- return new Jt({
2978
+ function _t(e) {
2979
+ return new Wt({
2979
2980
  type: "optional",
2980
2981
  innerType: e
2981
2982
  });
2982
2983
  }
2983
- const _s = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
2984
- Qr.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ft(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2984
+ const zi = /* @__PURE__ */ u("ZodExactOptional", (e, t) => {
2985
+ oo.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => Jt(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2985
2986
  });
2986
- function vs(e) {
2987
- return new _s({
2987
+ function ki(e) {
2988
+ return new zi({
2988
2989
  type: "optional",
2989
2990
  innerType: e
2990
2991
  });
2991
2992
  }
2992
- const ys = /* @__PURE__ */ u("ZodNullable", (e, t) => {
2993
- eo.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => di(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2993
+ const $i = /* @__PURE__ */ u("ZodNullable", (e, t) => {
2994
+ so.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => _s(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2994
2995
  });
2995
- function ht(e) {
2996
- return new ys({
2996
+ function vt(e) {
2997
+ return new $i({
2997
2998
  type: "nullable",
2998
2999
  innerType: e
2999
3000
  });
3000
3001
  }
3001
- const ws = /* @__PURE__ */ u("ZodDefault", (e, t) => {
3002
- to.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => hi(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3002
+ const Ti = /* @__PURE__ */ u("ZodDefault", (e, t) => {
3003
+ io.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => ys(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3003
3004
  });
3004
- function bs(e, t) {
3005
- return new ws({
3005
+ function Oi(e, t) {
3006
+ return new Ti({
3006
3007
  type: "default",
3007
3008
  innerType: e,
3008
3009
  get defaultValue() {
3009
- return typeof t == "function" ? t() : zt(t);
3010
+ return typeof t == "function" ? t() : Tt(t);
3010
3011
  }
3011
3012
  });
3012
3013
  }
3013
- const zs = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
3014
- no.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => mi(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3014
+ const ji = /* @__PURE__ */ u("ZodPrefault", (e, t) => {
3015
+ ao.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => ws(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3015
3016
  });
3016
- function ks(e, t) {
3017
- return new zs({
3017
+ function Si(e, t) {
3018
+ return new ji({
3018
3019
  type: "prefault",
3019
3020
  innerType: e,
3020
3021
  get defaultValue() {
3021
- return typeof t == "function" ? t() : zt(t);
3022
+ return typeof t == "function" ? t() : Tt(t);
3022
3023
  }
3023
3024
  });
3024
3025
  }
3025
- const Mt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
3026
- ro.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => pi(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3026
+ const Gt = /* @__PURE__ */ u("ZodNonOptional", (e, t) => {
3027
+ co.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => vs(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3027
3028
  });
3028
- function $s(e, t) {
3029
- return new Mt({
3029
+ function Zi(e, t) {
3030
+ return new Gt({
3030
3031
  type: "nonoptional",
3031
3032
  innerType: e,
3032
- ..._(t)
3033
+ ...g(t)
3033
3034
  });
3034
3035
  }
3035
- const Ts = /* @__PURE__ */ u("ZodCatch", (e, t) => {
3036
- oo.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => gi(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3036
+ const Ei = /* @__PURE__ */ u("ZodCatch", (e, t) => {
3037
+ uo.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => bs(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3037
3038
  });
3038
- function Ss(e, t) {
3039
- return new Ts({
3039
+ function xi(e, t) {
3040
+ return new Ei({
3040
3041
  type: "catch",
3041
3042
  innerType: e,
3042
3043
  catchValue: typeof t == "function" ? t : () => t
3043
3044
  });
3044
3045
  }
3045
- const Os = /* @__PURE__ */ u("ZodPipe", (e, t) => {
3046
- io.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => _i(e, n, r, o), e.in = t.in, e.out = t.out;
3046
+ const Ri = /* @__PURE__ */ u("ZodPipe", (e, t) => {
3047
+ lo.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => zs(e, n, r, o), e.in = t.in, e.out = t.out;
3047
3048
  });
3048
- function mt(e, t) {
3049
- return new Os({
3049
+ function yt(e, t) {
3050
+ return new Ri({
3050
3051
  type: "pipe",
3051
3052
  in: e,
3052
3053
  out: t
3053
3054
  // ...util.normalizeParams(params),
3054
3055
  });
3055
3056
  }
3056
- const Zs = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
3057
- so.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => vi(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3057
+ const Pi = /* @__PURE__ */ u("ZodReadonly", (e, t) => {
3058
+ fo.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => ks(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3058
3059
  });
3059
- function js(e) {
3060
- return new Zs({
3060
+ function Ni(e) {
3061
+ return new Pi({
3061
3062
  type: "readonly",
3062
3063
  innerType: e
3063
3064
  });
3064
3065
  }
3065
- const Es = /* @__PURE__ */ u("ZodCustom", (e, t) => {
3066
- ao.init(e, t), j.init(e, t), e._zod.processJSONSchema = (n, r, o) => si(e, n);
3066
+ const Di = /* @__PURE__ */ u("ZodCustom", (e, t) => {
3067
+ po.init(e, t), R.init(e, t), e._zod.processJSONSchema = (n, r, o) => fs(e, n);
3067
3068
  });
3068
- function Ps(e, t = {}) {
3069
- return /* @__PURE__ */ Ho(Es, e, t);
3070
- }
3071
- function Rs(e) {
3072
- return /* @__PURE__ */ Xo(e);
3073
- }
3074
- const Ds = Lt({
3075
- title: L().optional(),
3076
- date: L().optional(),
3077
- description: L().optional(),
3078
- variant: L().optional()
3079
- }), xs = Lt({
3080
- mapping: Ds.optional(),
3081
- objectName: L().optional(),
3082
- titleField: L().optional(),
3083
- dateField: L().optional(),
3084
- descriptionField: L().optional()
3085
- }), Ns = ({
3069
+ function Ai(e, t = {}) {
3070
+ return /* @__PURE__ */ ns(Di, e, t);
3071
+ }
3072
+ function Ii(e) {
3073
+ return /* @__PURE__ */ rs(e);
3074
+ }
3075
+ const Ci = Vt({
3076
+ title: V().optional(),
3077
+ date: V().optional(),
3078
+ description: V().optional(),
3079
+ variant: V().optional()
3080
+ }), Fi = Vt({
3081
+ mapping: Ci.optional(),
3082
+ objectName: V().optional(),
3083
+ titleField: V().optional(),
3084
+ dateField: V().optional(),
3085
+ descriptionField: V().optional()
3086
+ }), Ui = ({
3086
3087
  schema: e,
3087
3088
  dataSource: t,
3088
3089
  className: n,
3089
- ...r
3090
+ onRowClick: r,
3091
+ onItemClick: o,
3092
+ ...i
3090
3093
  }) => {
3091
- const [o, s] = ze([]), [i, a] = ze(!1), [c, f] = ze(null);
3092
- Ye(() => {
3093
- const w = xs.safeParse(e);
3094
- w.success || console.warn("[ObjectTimeline] Invalid timeline configuration:", w.error.format());
3094
+ const [s, a] = ce([]), [c, f] = ce(!1), [d, _] = ce(null), [m, p] = ce(0);
3095
+ He(() => {
3096
+ const N = Fi.safeParse(e);
3097
+ N.success || console.warn("[ObjectTimeline] Invalid timeline configuration:", N.error.format());
3095
3098
  }, [e]);
3096
- const d = an(e.bind);
3097
- Ye(() => {
3098
- const w = async () => {
3099
+ const w = ln(e.bind);
3100
+ He(() => {
3101
+ const N = async () => {
3099
3102
  if (!(!t || !e.objectName)) {
3100
- a(!0);
3103
+ f(!0);
3101
3104
  try {
3102
- const v = await t.find(e.objectName, {
3105
+ const O = await t.find(e.objectName, {
3103
3106
  options: { $top: 100 }
3104
3107
  });
3105
- let b = v;
3106
- v.value ? b = v.value : v.data && (b = v.data), Array.isArray(b) && s(b);
3107
- } catch (v) {
3108
- console.error(v), f(v);
3108
+ let F = O;
3109
+ O.records ? F = O.records : O.data && (F = O.data), Array.isArray(F) && a(F);
3110
+ } catch (O) {
3111
+ console.error(O), _(O);
3109
3112
  } finally {
3110
- a(!1);
3113
+ f(!1);
3111
3114
  }
3112
3115
  }
3113
3116
  };
3114
- e.objectName && !d && !e.items && !r.data && w();
3115
- }, [e.objectName, t, d, e.items, r.data]);
3116
- const g = r.data || d || o;
3117
- let h = e.items;
3118
- if (!h && g && Array.isArray(g)) {
3119
- const w = e.mapping?.title || e.titleField || "name", v = e.mapping?.date || e.dateField || "date", b = e.mapping?.description || e.descriptionField || "description", U = e.mapping?.variant || "variant";
3120
- h = g.map((C) => ({
3121
- title: C[w],
3117
+ e.objectName && !w && !e.items && !i.data && N();
3118
+ }, [e.objectName, t, w, e.items, i.data, m]);
3119
+ const y = i.data || w || s;
3120
+ let b = e.items;
3121
+ if (!b && y && Array.isArray(y)) {
3122
+ const N = e.mapping?.title || e.titleField || "name", O = e.mapping?.date || e.dateField || "date", F = e.mapping?.description || e.descriptionField || "description", ze = e.mapping?.variant || "variant";
3123
+ b = y.map((J) => ({
3124
+ title: J[N],
3122
3125
  // Support both 'time' (vertical) and 'startDate' (gantt)
3123
- time: C[v],
3124
- startDate: C[v],
3125
- endDate: C[v],
3126
+ time: J[O],
3127
+ startDate: J[O],
3128
+ endDate: J[O],
3126
3129
  // Default single point
3127
- description: C[b],
3128
- variant: C[U] || "default",
3130
+ description: J[F],
3131
+ variant: J[ze] || "default",
3129
3132
  // Pass original item for click handlers
3130
- _data: C
3133
+ _data: J
3131
3134
  }));
3132
3135
  }
3133
- const p = {
3136
+ const M = cn(async () => {
3137
+ p((N) => N + 1);
3138
+ }, []), { ref: ee, isRefreshing: C, pullDistance: S } = pn({
3139
+ onRefresh: M,
3140
+ enabled: !!e.objectName && !!t
3141
+ }), P = fn({
3142
+ navigation: e.navigation,
3143
+ objectName: e.objectName,
3144
+ onRowClick: r ?? o
3145
+ }), ie = {
3134
3146
  ...e,
3135
- items: h || [],
3136
- className: n || e.className
3147
+ items: b || [],
3148
+ className: n || e.className,
3149
+ onItemClick: (N) => {
3150
+ const O = N._data || N;
3151
+ P.handleClick(O), o?.(O);
3152
+ }
3137
3153
  };
3138
- return c ? /* @__PURE__ */ m.jsxs("div", { className: "p-4 text-red-500", children: [
3154
+ return d ? /* @__PURE__ */ h.jsxs("div", { className: "p-4 text-red-500", children: [
3139
3155
  "Error loading timeline: ",
3140
- c.message
3141
- ] }) : /* @__PURE__ */ m.jsx(_t, { schema: p });
3142
- }, Vt = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3156
+ d.message
3157
+ ] }) : /* @__PURE__ */ h.jsxs("div", { ref: ee, className: "relative overflow-auto h-full", children: [
3158
+ S > 0 && /* @__PURE__ */ h.jsx(
3159
+ "div",
3160
+ {
3161
+ className: "flex items-center justify-center text-xs text-muted-foreground",
3162
+ style: { height: S },
3163
+ children: C ? "Refreshing…" : "Pull to refresh"
3164
+ }
3165
+ ),
3166
+ /* @__PURE__ */ h.jsx(wt, { schema: ie }),
3167
+ P.isOverlay && /* @__PURE__ */ h.jsx(un, { ...P, title: "Timeline Item", children: (N) => /* @__PURE__ */ h.jsx("div", { className: "space-y-3", children: Object.entries(N).map(([O, F]) => /* @__PURE__ */ h.jsxs("div", { className: "flex flex-col", children: [
3168
+ /* @__PURE__ */ h.jsx("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide", children: O.replace(/_/g, " ") }),
3169
+ /* @__PURE__ */ h.jsx("span", { className: "text-sm", children: String(F ?? "—") })
3170
+ ] }, O)) }) })
3171
+ ] });
3172
+ }, Yt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3143
3173
  "ol",
3144
3174
  {
3145
3175
  ref: n,
3146
- className: D("relative border-l border-gray-200", e),
3176
+ className: j("relative border-l border-gray-200", e),
3147
3177
  ...t
3148
3178
  }
3149
3179
  ));
3150
- Vt.displayName = "Timeline";
3151
- const Wt = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3180
+ Yt.displayName = "Timeline";
3181
+ const Bt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3152
3182
  "li",
3153
3183
  {
3154
3184
  ref: n,
3155
- className: D("mb-10 ml-6", e),
3185
+ className: j("mb-10 ml-6", e),
3156
3186
  ...t
3157
3187
  }
3158
3188
  ));
3159
- Wt.displayName = "TimelineItem";
3160
- const Se = P.forwardRef(({ className: e, variant: t = "default", ...n }, r) => {
3189
+ Bt.displayName = "TimelineItem";
3190
+ const Ee = A.forwardRef(({ className: e, variant: t = "default", ...n }, r) => {
3161
3191
  const o = {
3162
3192
  default: "bg-gray-200 border-gray-300",
3163
3193
  success: "bg-green-200 border-green-500",
@@ -3165,11 +3195,11 @@ const Se = P.forwardRef(({ className: e, variant: t = "default", ...n }, r) => {
3165
3195
  danger: "bg-red-200 border-red-500",
3166
3196
  info: "bg-blue-200 border-blue-500"
3167
3197
  };
3168
- return /* @__PURE__ */ m.jsx(
3198
+ return /* @__PURE__ */ h.jsx(
3169
3199
  "div",
3170
3200
  {
3171
3201
  ref: r,
3172
- className: D(
3202
+ className: j(
3173
3203
  "absolute -left-3 w-6 h-6 rounded-full border-2 flex items-center justify-center",
3174
3204
  o[t],
3175
3205
  e
@@ -3178,8 +3208,8 @@ const Se = P.forwardRef(({ className: e, variant: t = "default", ...n }, r) => {
3178
3208
  }
3179
3209
  );
3180
3210
  });
3181
- Se.displayName = "TimelineMarker";
3182
- const Gt = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3211
+ Ee.displayName = "TimelineMarker";
3212
+ const qt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3183
3213
  "div",
3184
3214
  {
3185
3215
  ref: n,
@@ -3187,121 +3217,121 @@ const Gt = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3187
3217
  ...t
3188
3218
  }
3189
3219
  ));
3190
- Gt.displayName = "TimelineContent";
3191
- const Oe = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3220
+ qt.displayName = "TimelineContent";
3221
+ const xe = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3192
3222
  "h3",
3193
3223
  {
3194
3224
  ref: n,
3195
- className: D("font-semibold text-lg mb-1", e),
3225
+ className: j("font-semibold text-lg mb-1", e),
3196
3226
  ...t
3197
3227
  }
3198
3228
  ));
3199
- Oe.displayName = "TimelineTitle";
3200
- const Ze = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3229
+ xe.displayName = "TimelineTitle";
3230
+ const Re = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3201
3231
  "time",
3202
3232
  {
3203
3233
  ref: n,
3204
- className: D("text-sm font-normal text-gray-500 mb-2 block", e),
3234
+ className: j("text-sm font-normal text-gray-500 mb-2 block", e),
3205
3235
  ...t
3206
3236
  }
3207
3237
  ));
3208
- Ze.displayName = "TimelineTime";
3209
- const je = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3238
+ Re.displayName = "TimelineTime";
3239
+ const Pe = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3210
3240
  "p",
3211
3241
  {
3212
3242
  ref: n,
3213
- className: D("text-base text-gray-700", e),
3243
+ className: j("text-base text-gray-700", e),
3214
3244
  ...t
3215
3245
  }
3216
3246
  ));
3217
- je.displayName = "TimelineDescription";
3218
- const Yt = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3247
+ Pe.displayName = "TimelineDescription";
3248
+ const Kt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3219
3249
  "div",
3220
3250
  {
3221
3251
  ref: n,
3222
- className: D("relative flex overflow-x-auto py-8", e),
3252
+ className: j("relative flex overflow-x-auto py-8", e),
3223
3253
  ...t
3224
3254
  }
3225
3255
  ));
3226
- Yt.displayName = "TimelineHorizontal";
3227
- const Bt = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3256
+ Kt.displayName = "TimelineHorizontal";
3257
+ const Ht = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3228
3258
  "div",
3229
3259
  {
3230
3260
  ref: n,
3231
- className: D("flex-shrink-0 w-64 relative", e),
3261
+ className: j("flex-shrink-0 w-64 relative", e),
3232
3262
  ...t
3233
3263
  }
3234
3264
  ));
3235
- Bt.displayName = "TimelineHorizontalItem";
3236
- const qt = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3265
+ Ht.displayName = "TimelineHorizontalItem";
3266
+ const Xt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3237
3267
  "div",
3238
3268
  {
3239
3269
  ref: n,
3240
- className: D("relative w-full border rounded-lg overflow-hidden", e),
3270
+ className: j("relative w-full border rounded-lg overflow-hidden", e),
3241
3271
  ...t
3242
3272
  }
3243
3273
  ));
3244
- qt.displayName = "TimelineGantt";
3245
- const Kt = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3274
+ Xt.displayName = "TimelineGantt";
3275
+ const Qt = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3246
3276
  "div",
3247
3277
  {
3248
3278
  ref: n,
3249
- className: D("flex border-b bg-gray-50", e),
3279
+ className: j("flex border-b bg-gray-50", e),
3250
3280
  ...t
3251
3281
  }
3252
3282
  ));
3253
- Kt.displayName = "TimelineGanttHeader";
3254
- const Ee = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3283
+ Qt.displayName = "TimelineGanttHeader";
3284
+ const Ne = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3255
3285
  "div",
3256
3286
  {
3257
3287
  ref: n,
3258
- className: D("w-48 border-r bg-white", e),
3288
+ className: j("w-48 border-r bg-white", e),
3259
3289
  ...t
3260
3290
  }
3261
3291
  ));
3262
- Ee.displayName = "TimelineGanttRowLabels";
3263
- const Pe = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3292
+ Ne.displayName = "TimelineGanttRowLabels";
3293
+ const De = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3264
3294
  "div",
3265
3295
  {
3266
3296
  ref: n,
3267
- className: D("flex-1 overflow-x-auto", e),
3297
+ className: j("flex-1 overflow-x-auto", e),
3268
3298
  ...t
3269
3299
  }
3270
3300
  ));
3271
- Pe.displayName = "TimelineGanttGrid";
3272
- const Re = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3301
+ De.displayName = "TimelineGanttGrid";
3302
+ const Ae = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3273
3303
  "div",
3274
3304
  {
3275
3305
  ref: n,
3276
- className: D("flex items-center border-b min-h-12", e),
3306
+ className: j("flex items-center border-b min-h-12", e),
3277
3307
  ...t
3278
3308
  }
3279
3309
  ));
3280
- Re.displayName = "TimelineGanttRow";
3281
- const Ht = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3310
+ Ae.displayName = "TimelineGanttRow";
3311
+ const en = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3282
3312
  "div",
3283
3313
  {
3284
3314
  ref: n,
3285
- className: D("px-4 py-2 font-medium text-sm truncate", e),
3315
+ className: j("px-4 py-2 font-medium text-sm truncate", e),
3286
3316
  ...t
3287
3317
  }
3288
3318
  ));
3289
- Ht.displayName = "TimelineGanttLabel";
3290
- const Xt = P.forwardRef(({ className: e, start: t = 0, width: n = 100, variant: r = "default", ...o }, s) => {
3291
- const i = {
3319
+ en.displayName = "TimelineGanttLabel";
3320
+ const tn = A.forwardRef(({ className: e, start: t = 0, width: n = 100, variant: r = "default", ...o }, i) => {
3321
+ const s = {
3292
3322
  default: "bg-blue-500 hover:bg-blue-600",
3293
3323
  success: "bg-green-500 hover:bg-green-600",
3294
3324
  warning: "bg-yellow-500 hover:bg-yellow-600",
3295
3325
  danger: "bg-red-500 hover:bg-red-600",
3296
3326
  info: "bg-purple-500 hover:bg-purple-600"
3297
3327
  };
3298
- return /* @__PURE__ */ m.jsx(
3328
+ return /* @__PURE__ */ h.jsx(
3299
3329
  "div",
3300
3330
  {
3301
- ref: s,
3302
- className: D(
3331
+ ref: i,
3332
+ className: j(
3303
3333
  "absolute h-8 rounded-md transition-colors cursor-pointer",
3304
- i[r],
3334
+ s[r],
3305
3335
  e
3306
3336
  ),
3307
3337
  style: {
@@ -3312,48 +3342,57 @@ const Xt = P.forwardRef(({ className: e, start: t = 0, width: n = 100, variant:
3312
3342
  }
3313
3343
  );
3314
3344
  });
3315
- Xt.displayName = "TimelineGanttBar";
3316
- const Qt = P.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ m.jsx(
3345
+ tn.displayName = "TimelineGanttBar";
3346
+ const nn = A.forwardRef(({ className: e, ...t }, n) => /* @__PURE__ */ h.jsx(
3317
3347
  "div",
3318
3348
  {
3319
3349
  ref: n,
3320
- className: D("px-2 py-1 text-white text-xs font-medium truncate", e),
3350
+ className: j("px-2 py-1 text-white text-xs font-medium truncate", e),
3321
3351
  ...t
3322
3352
  }
3323
3353
  ));
3324
- Qt.displayName = "TimelineGanttBarContent";
3325
- const As = ({ schema: e, ...t }) => {
3326
- const { dataSource: n } = cn();
3327
- return /* @__PURE__ */ m.jsx(Ns, { schema: e, dataSource: n, ...t });
3354
+ nn.displayName = "TimelineGanttBarContent";
3355
+ const rn = ({ schema: e, ...t }) => {
3356
+ const { dataSource: n } = dn();
3357
+ return /* @__PURE__ */ h.jsx(Ui, { schema: e, dataSource: n, ...t });
3328
3358
  };
3329
- gt.register("object-timeline", As, {
3359
+ Ie.register("object-timeline", rn, {
3330
3360
  namespace: "plugin-timeline",
3331
3361
  label: "Object Timeline",
3332
- category: "plugin",
3362
+ category: "view",
3363
+ inputs: [
3364
+ { name: "objectName", type: "string", label: "Object Name", required: !0 },
3365
+ { name: "variant", type: "enum", enum: ["vertical", "horizontal", "gantt"], defaultValue: "vertical" }
3366
+ ]
3367
+ });
3368
+ Ie.register("timeline", rn, {
3369
+ namespace: "view",
3370
+ label: "Timeline View",
3371
+ category: "view",
3333
3372
  inputs: [
3334
3373
  { name: "objectName", type: "string", label: "Object Name", required: !0 },
3335
3374
  { name: "variant", type: "enum", enum: ["vertical", "horizontal", "gantt"], defaultValue: "vertical" }
3336
3375
  ]
3337
3376
  });
3338
3377
  export {
3339
- Ns as ObjectTimeline,
3340
- As as ObjectTimelineRenderer,
3341
- Vt as Timeline,
3342
- Gt as TimelineContent,
3343
- je as TimelineDescription,
3344
- qt as TimelineGantt,
3345
- Xt as TimelineGanttBar,
3346
- Qt as TimelineGanttBarContent,
3347
- Pe as TimelineGanttGrid,
3348
- Kt as TimelineGanttHeader,
3349
- Ht as TimelineGanttLabel,
3350
- Re as TimelineGanttRow,
3351
- Ee as TimelineGanttRowLabels,
3352
- Yt as TimelineHorizontal,
3353
- Bt as TimelineHorizontalItem,
3354
- Wt as TimelineItem,
3355
- Se as TimelineMarker,
3356
- _t as TimelineRenderer,
3357
- Ze as TimelineTime,
3358
- Oe as TimelineTitle
3378
+ Ui as ObjectTimeline,
3379
+ rn as ObjectTimelineRenderer,
3380
+ Yt as Timeline,
3381
+ qt as TimelineContent,
3382
+ Pe as TimelineDescription,
3383
+ Xt as TimelineGantt,
3384
+ tn as TimelineGanttBar,
3385
+ nn as TimelineGanttBarContent,
3386
+ De as TimelineGanttGrid,
3387
+ Qt as TimelineGanttHeader,
3388
+ en as TimelineGanttLabel,
3389
+ Ae as TimelineGanttRow,
3390
+ Ne as TimelineGanttRowLabels,
3391
+ Kt as TimelineHorizontal,
3392
+ Ht as TimelineHorizontalItem,
3393
+ Bt as TimelineItem,
3394
+ Ee as TimelineMarker,
3395
+ wt as TimelineRenderer,
3396
+ Re as TimelineTime,
3397
+ xe as TimelineTitle
3359
3398
  };