@object-ui/plugin-map 3.0.3 → 3.1.1

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,14 +1,14 @@
1
- import * as ie from "react";
2
- import yn, { useLayoutEffect as bn, useEffect as R, useContext as Ie, useState as oe, useRef as me, useImperativeHandle as Re, useMemo as B, memo as G, forwardRef as He } from "react";
3
- import { ComponentRegistry as Ft } from "@object-ui/core";
4
- import { useNavigationOverlay as wn, useSchemaContext as zn } from "@object-ui/react";
5
- import { NavigationOverlay as kn } from "@object-ui/components";
6
- import { createPortal as Mt } from "react-dom";
1
+ import * as oe from "react";
2
+ import wn, { useLayoutEffect as zn, useEffect as I, useContext as Ie, useState as ee, useRef as de, useImperativeHandle as Re, useMemo as V, memo as q, forwardRef as Ke } from "react";
3
+ import { buildExpandFields as kn, extractRecords as Sn, ComponentRegistry as Lt } from "@object-ui/core";
4
+ import { useNavigationOverlay as $n, useSchemaContext as En } from "@object-ui/react";
5
+ import { cn as Ve, NavigationOverlay as On } from "@object-ui/components";
6
+ import { createPortal as Dt } from "react-dom";
7
7
  var Ee = { exports: {} }, ve = {};
8
- var it;
9
- function Sn() {
10
- if (it) return ve;
11
- it = 1;
8
+ var st;
9
+ function Zn() {
10
+ if (st) return ve;
11
+ st = 1;
12
12
  var e = /* @__PURE__ */ Symbol.for("react.transitional.element"), t = /* @__PURE__ */ Symbol.for("react.fragment");
13
13
  function n(r, o, i) {
14
14
  var s = null;
@@ -28,243 +28,243 @@ function Sn() {
28
28
  return ve.Fragment = t, ve.jsx = n, ve.jsxs = n, ve;
29
29
  }
30
30
  var ye = {};
31
- var st;
32
- function $n() {
33
- return st || (st = 1, process.env.NODE_ENV !== "production" && (function() {
34
- function e(f) {
35
- if (f == null) return null;
36
- if (typeof f == "function")
37
- return f.$$typeof === _e ? null : f.displayName || f.name || null;
38
- if (typeof f == "string") return f;
39
- switch (f) {
40
- case F:
31
+ var at;
32
+ function jn() {
33
+ return at || (at = 1, process.env.NODE_ENV !== "production" && (function() {
34
+ function e(l) {
35
+ if (l == null) return null;
36
+ if (typeof l == "function")
37
+ return l.$$typeof === ge ? null : l.displayName || l.name || null;
38
+ if (typeof l == "string") return l;
39
+ switch (l) {
40
+ case A:
41
41
  return "Fragment";
42
- case V:
42
+ case H:
43
43
  return "Profiler";
44
- case U:
44
+ case W:
45
45
  return "StrictMode";
46
- case M:
46
+ case he:
47
47
  return "Suspense";
48
- case K:
48
+ case M:
49
49
  return "SuspenseList";
50
- case W:
50
+ case X:
51
51
  return "Activity";
52
52
  }
53
- if (typeof f == "object")
54
- switch (typeof f.tag == "number" && console.error(
53
+ if (typeof l == "object")
54
+ switch (typeof l.tag == "number" && console.error(
55
55
  "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
56
- ), f.$$typeof) {
57
- case E:
56
+ ), l.$$typeof) {
57
+ case Z:
58
58
  return "Portal";
59
59
  case b:
60
- return f.displayName || "Context";
61
- case T:
62
- return (f._context.displayName || "Context") + ".Consumer";
63
- case v:
64
- var _ = f.render;
65
- return f = f.displayName, f || (f = _.displayName || _.name || "", f = f !== "" ? "ForwardRef(" + f + ")" : "ForwardRef"), f;
66
- case X:
67
- return _ = f.displayName || null, _ !== null ? _ : e(f.type) || "Memo";
68
- case ne:
69
- _ = f._payload, f = f._init;
60
+ return l.displayName || "Context";
61
+ case j:
62
+ return (l._context.displayName || "Context") + ".Consumer";
63
+ case $:
64
+ var _ = l.render;
65
+ return l = l.displayName, l || (l = _.displayName || _.name || "", l = l !== "" ? "ForwardRef(" + l + ")" : "ForwardRef"), l;
66
+ case F:
67
+ return _ = l.displayName || null, _ !== null ? _ : e(l.type) || "Memo";
68
+ case K:
69
+ _ = l._payload, l = l._init;
70
70
  try {
71
- return e(f(_));
71
+ return e(l(_));
72
72
  } catch {
73
73
  }
74
74
  }
75
75
  return null;
76
76
  }
77
- function t(f) {
78
- return "" + f;
77
+ function t(l) {
78
+ return "" + l;
79
79
  }
80
- function n(f) {
80
+ function n(l) {
81
81
  try {
82
- t(f);
82
+ t(l);
83
83
  var _ = !1;
84
84
  } catch {
85
85
  _ = !0;
86
86
  }
87
87
  if (_) {
88
88
  _ = console;
89
- var j = _.error, x = typeof Symbol == "function" && Symbol.toStringTag && f[Symbol.toStringTag] || f.constructor.name || "Object";
90
- return j.call(
89
+ var z = _.error, T = typeof Symbol == "function" && Symbol.toStringTag && l[Symbol.toStringTag] || l.constructor.name || "Object";
90
+ return z.call(
91
91
  _,
92
92
  "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
93
- x
94
- ), t(f);
93
+ T
94
+ ), t(l);
95
95
  }
96
96
  }
97
- function r(f) {
98
- if (f === F) return "<>";
99
- if (typeof f == "object" && f !== null && f.$$typeof === ne)
97
+ function r(l) {
98
+ if (l === A) return "<>";
99
+ if (typeof l == "object" && l !== null && l.$$typeof === K)
100
100
  return "<...>";
101
101
  try {
102
- var _ = e(f);
102
+ var _ = e(l);
103
103
  return _ ? "<" + _ + ">" : "<...>";
104
104
  } catch {
105
105
  return "<...>";
106
106
  }
107
107
  }
108
108
  function o() {
109
- var f = q.A;
110
- return f === null ? null : f.getOwner();
109
+ var l = D.A;
110
+ return l === null ? null : l.getOwner();
111
111
  }
112
112
  function i() {
113
113
  return Error("react-stack-top-frame");
114
114
  }
115
- function s(f) {
116
- if (Se.call(f, "key")) {
117
- var _ = Object.getOwnPropertyDescriptor(f, "key").get;
115
+ function s(l) {
116
+ if (_e.call(l, "key")) {
117
+ var _ = Object.getOwnPropertyDescriptor(l, "key").get;
118
118
  if (_ && _.isReactWarning) return !1;
119
119
  }
120
- return f.key !== void 0;
120
+ return l.key !== void 0;
121
121
  }
122
- function a(f, _) {
123
- function j() {
124
- S || (S = !0, console.error(
122
+ function a(l, _) {
123
+ function z() {
124
+ J || (J = !0, console.error(
125
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)",
126
126
  _
127
127
  ));
128
128
  }
129
- j.isReactWarning = !0, Object.defineProperty(f, "key", {
130
- get: j,
129
+ z.isReactWarning = !0, Object.defineProperty(l, "key", {
130
+ get: z,
131
131
  configurable: !0
132
132
  });
133
133
  }
134
134
  function c() {
135
- var f = e(this.type);
136
- return J[f] || (J[f] = !0, console.error(
135
+ var l = e(this.type);
136
+ return Se[l] || (Se[l] = !0, console.error(
137
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."
138
- )), f = this.props.ref, f !== void 0 ? f : null;
138
+ )), l = this.props.ref, l !== void 0 ? l : null;
139
139
  }
140
- function u(f, _, j, x, $e, Ue) {
141
- var C = j.ref;
142
- return f = {
143
- $$typeof: Z,
144
- type: f,
140
+ function u(l, _, z, T, Y, Q) {
141
+ var E = z.ref;
142
+ return l = {
143
+ $$typeof: S,
144
+ type: l,
145
145
  key: _,
146
- props: j,
147
- _owner: x
148
- }, (C !== void 0 ? C : null) !== null ? Object.defineProperty(f, "ref", {
146
+ props: z,
147
+ _owner: T
148
+ }, (E !== void 0 ? E : null) !== null ? Object.defineProperty(l, "ref", {
149
149
  enumerable: !1,
150
150
  get: c
151
- }) : Object.defineProperty(f, "ref", { enumerable: !1, value: null }), f._store = {}, Object.defineProperty(f._store, "validated", {
151
+ }) : Object.defineProperty(l, "ref", { enumerable: !1, value: null }), l._store = {}, Object.defineProperty(l._store, "validated", {
152
152
  configurable: !1,
153
153
  enumerable: !1,
154
154
  writable: !0,
155
155
  value: 0
156
- }), Object.defineProperty(f, "_debugInfo", {
156
+ }), Object.defineProperty(l, "_debugInfo", {
157
157
  configurable: !1,
158
158
  enumerable: !1,
159
159
  writable: !0,
160
160
  value: null
161
- }), Object.defineProperty(f, "_debugStack", {
161
+ }), Object.defineProperty(l, "_debugStack", {
162
162
  configurable: !1,
163
163
  enumerable: !1,
164
164
  writable: !0,
165
- value: $e
166
- }), Object.defineProperty(f, "_debugTask", {
165
+ value: Y
166
+ }), Object.defineProperty(l, "_debugTask", {
167
167
  configurable: !1,
168
168
  enumerable: !1,
169
169
  writable: !0,
170
- value: Ue
171
- }), Object.freeze && (Object.freeze(f.props), Object.freeze(f)), f;
172
- }
173
- function d(f, _, j, x, $e, Ue) {
174
- var C = _.children;
175
- if (C !== void 0)
176
- if (x)
177
- if (k(C)) {
178
- for (x = 0; x < C.length; x++)
179
- m(C[x]);
180
- Object.freeze && Object.freeze(C);
170
+ value: Q
171
+ }), Object.freeze && (Object.freeze(l.props), Object.freeze(l)), l;
172
+ }
173
+ function d(l, _, z, T, Y, Q) {
174
+ var E = _.children;
175
+ if (E !== void 0)
176
+ if (T)
177
+ if (Ue(E)) {
178
+ for (T = 0; T < E.length; T++)
179
+ p(E[T]);
180
+ Object.freeze && Object.freeze(E);
181
181
  } else
182
182
  console.error(
183
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."
184
184
  );
185
- else m(C);
186
- if (Se.call(_, "key")) {
187
- C = e(f);
188
- var fe = Object.keys(_).filter(function(vn) {
189
- return vn !== "key";
185
+ else p(E);
186
+ if (_e.call(_, "key")) {
187
+ E = e(l);
188
+ var ue = Object.keys(_).filter(function(bn) {
189
+ return bn !== "key";
190
190
  });
191
- x = 0 < fe.length ? "{key: someKey, " + fe.join(": ..., ") + ": ...}" : "{key: someKey}", Q[C + x] || (fe = 0 < fe.length ? "{" + fe.join(": ..., ") + ": ...}" : "{}", console.error(
191
+ T = 0 < ue.length ? "{key: someKey, " + ue.join(": ..., ") + ": ...}" : "{key: someKey}", y[E + T] || (ue = 0 < ue.length ? "{" + ue.join(": ..., ") + ": ...}" : "{}", console.error(
192
192
  `A props object containing a "key" prop is being spread into JSX:
193
193
  let props = %s;
194
194
  <%s {...props} />
195
195
  React keys must be passed directly to JSX without using spread:
196
196
  let props = %s;
197
197
  <%s key={someKey} {...props} />`,
198
- x,
199
- C,
200
- fe,
201
- C
202
- ), Q[C + x] = !0);
198
+ T,
199
+ E,
200
+ ue,
201
+ E
202
+ ), y[E + T] = !0);
203
203
  }
204
- if (C = null, j !== void 0 && (n(j), C = "" + j), s(_) && (n(_.key), C = "" + _.key), "key" in _) {
205
- j = {};
204
+ if (E = null, z !== void 0 && (n(z), E = "" + z), s(_) && (n(_.key), E = "" + _.key), "key" in _) {
205
+ z = {};
206
206
  for (var Je in _)
207
- Je !== "key" && (j[Je] = _[Je]);
208
- } else j = _;
209
- return C && a(
210
- j,
211
- typeof f == "function" ? f.displayName || f.name || "Unknown" : f
207
+ Je !== "key" && (z[Je] = _[Je]);
208
+ } else z = _;
209
+ return E && a(
210
+ z,
211
+ typeof l == "function" ? l.displayName || l.name || "Unknown" : l
212
212
  ), u(
213
- f,
214
- C,
215
- j,
213
+ l,
214
+ E,
215
+ z,
216
216
  o(),
217
- $e,
218
- Ue
217
+ Y,
218
+ Q
219
219
  );
220
220
  }
221
- function m(f) {
222
- p(f) ? f._store && (f._store.validated = 1) : typeof f == "object" && f !== null && f.$$typeof === ne && (f._payload.status === "fulfilled" ? p(f._payload.value) && f._payload.value._store && (f._payload.value._store.validated = 1) : f._store && (f._store.validated = 1));
221
+ function p(l) {
222
+ m(l) ? l._store && (l._store.validated = 1) : typeof l == "object" && l !== null && l.$$typeof === K && (l._payload.status === "fulfilled" ? m(l._payload.value) && l._payload.value._store && (l._payload.value._store.validated = 1) : l._store && (l._store.validated = 1));
223
223
  }
224
- function p(f) {
225
- return typeof f == "object" && f !== null && f.$$typeof === Z;
224
+ function m(l) {
225
+ return typeof l == "object" && l !== null && l.$$typeof === S;
226
226
  }
227
- var h = yn, Z = /* @__PURE__ */ Symbol.for("react.transitional.element"), E = /* @__PURE__ */ Symbol.for("react.portal"), F = /* @__PURE__ */ Symbol.for("react.fragment"), U = /* @__PURE__ */ Symbol.for("react.strict_mode"), V = /* @__PURE__ */ Symbol.for("react.profiler"), T = /* @__PURE__ */ Symbol.for("react.consumer"), b = /* @__PURE__ */ Symbol.for("react.context"), v = /* @__PURE__ */ Symbol.for("react.forward_ref"), M = /* @__PURE__ */ Symbol.for("react.suspense"), K = /* @__PURE__ */ Symbol.for("react.suspense_list"), X = /* @__PURE__ */ Symbol.for("react.memo"), ne = /* @__PURE__ */ Symbol.for("react.lazy"), W = /* @__PURE__ */ Symbol.for("react.activity"), _e = /* @__PURE__ */ Symbol.for("react.client.reference"), q = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, Se = Object.prototype.hasOwnProperty, k = Array.isArray, y = console.createTask ? console.createTask : function() {
227
+ var h = wn, S = /* @__PURE__ */ Symbol.for("react.transitional.element"), Z = /* @__PURE__ */ Symbol.for("react.portal"), A = /* @__PURE__ */ Symbol.for("react.fragment"), W = /* @__PURE__ */ Symbol.for("react.strict_mode"), H = /* @__PURE__ */ Symbol.for("react.profiler"), j = /* @__PURE__ */ Symbol.for("react.consumer"), b = /* @__PURE__ */ Symbol.for("react.context"), $ = /* @__PURE__ */ Symbol.for("react.forward_ref"), he = /* @__PURE__ */ Symbol.for("react.suspense"), M = /* @__PURE__ */ Symbol.for("react.suspense_list"), F = /* @__PURE__ */ Symbol.for("react.memo"), K = /* @__PURE__ */ Symbol.for("react.lazy"), X = /* @__PURE__ */ Symbol.for("react.activity"), ge = /* @__PURE__ */ Symbol.for("react.client.reference"), D = h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, _e = Object.prototype.hasOwnProperty, Ue = Array.isArray, re = console.createTask ? console.createTask : function() {
228
228
  return null;
229
229
  };
230
230
  h = {
231
- react_stack_bottom_frame: function(f) {
232
- return f();
231
+ react_stack_bottom_frame: function(l) {
232
+ return l();
233
233
  }
234
234
  };
235
- var S, J = {}, re = h.react_stack_bottom_frame.bind(
235
+ var J, Se = {}, $e = h.react_stack_bottom_frame.bind(
236
236
  h,
237
237
  i
238
- )(), le = y(r(i)), Q = {};
239
- ye.Fragment = F, ye.jsx = function(f, _, j) {
240
- var x = 1e4 > q.recentlyCreatedOwnerStacks++;
238
+ )(), v = re(r(i)), y = {};
239
+ ye.Fragment = A, ye.jsx = function(l, _, z) {
240
+ var T = 1e4 > D.recentlyCreatedOwnerStacks++;
241
241
  return d(
242
- f,
242
+ l,
243
243
  _,
244
- j,
244
+ z,
245
245
  !1,
246
- x ? Error("react-stack-top-frame") : re,
247
- x ? y(r(f)) : le
246
+ T ? Error("react-stack-top-frame") : $e,
247
+ T ? re(r(l)) : v
248
248
  );
249
- }, ye.jsxs = function(f, _, j) {
250
- var x = 1e4 > q.recentlyCreatedOwnerStacks++;
249
+ }, ye.jsxs = function(l, _, z) {
250
+ var T = 1e4 > D.recentlyCreatedOwnerStacks++;
251
251
  return d(
252
- f,
252
+ l,
253
253
  _,
254
- j,
254
+ z,
255
255
  !0,
256
- x ? Error("react-stack-top-frame") : re,
257
- x ? y(r(f)) : le
256
+ T ? Error("react-stack-top-frame") : $e,
257
+ T ? re(r(l)) : v
258
258
  );
259
259
  };
260
260
  })()), ye;
261
261
  }
262
- var at;
263
- function En() {
264
- return at || (at = 1, process.env.NODE_ENV === "production" ? Ee.exports = Sn() : Ee.exports = $n()), Ee.exports;
262
+ var ct;
263
+ function Tn() {
264
+ return ct || (ct = 1, process.env.NODE_ENV === "production" ? Ee.exports = Zn() : Ee.exports = jn()), Ee.exports;
265
265
  }
266
- var z = En();
267
- function l(e, t, n) {
266
+ var w = Tn();
267
+ function f(e, t, n) {
268
268
  function r(a, c) {
269
269
  if (a._zod || Object.defineProperty(a, "_zod", {
270
270
  value: {
@@ -277,9 +277,9 @@ function l(e, t, n) {
277
277
  return;
278
278
  a._zod.traits.add(e), t(a, c);
279
279
  const u = s.prototype, d = Object.keys(u);
280
- for (let m = 0; m < d.length; m++) {
281
- const p = d[m];
282
- p in a || (a[p] = u[p].bind(a));
280
+ for (let p = 0; p < d.length; p++) {
281
+ const m = d[p];
282
+ m in a || (a[m] = u[m].bind(a));
283
283
  }
284
284
  }
285
285
  const o = n?.Parent ?? Object;
@@ -298,28 +298,28 @@ function l(e, t, n) {
298
298
  value: (a) => n?.Parent && a instanceof n.Parent ? !0 : a?._zod?.traits?.has(e)
299
299
  }), Object.defineProperty(s, "name", { value: e }), s;
300
300
  }
301
- class pe extends Error {
301
+ class fe extends Error {
302
302
  constructor() {
303
303
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
304
304
  }
305
305
  }
306
- class Lt extends Error {
306
+ class Ut extends Error {
307
307
  constructor(t) {
308
308
  super(`Encountered unidirectional transform during encode: ${t}`), this.name = "ZodEncodeError";
309
309
  }
310
310
  }
311
- const Dt = {};
312
- function se(e) {
313
- return Dt;
311
+ const Jt = {};
312
+ function ie(e) {
313
+ return Jt;
314
314
  }
315
- function Ut(e) {
315
+ function Vt(e) {
316
316
  const t = Object.values(e).filter((r) => typeof r == "number");
317
317
  return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
318
318
  }
319
- function Be(e, t) {
319
+ function qe(e, t) {
320
320
  return typeof t == "bigint" ? t.toString() : t;
321
321
  }
322
- function Ke(e) {
322
+ function Xe(e) {
323
323
  return {
324
324
  get value() {
325
325
  {
@@ -329,14 +329,14 @@ function Ke(e) {
329
329
  }
330
330
  };
331
331
  }
332
- function Xe(e) {
332
+ function Qe(e) {
333
333
  return e == null;
334
334
  }
335
- function Qe(e) {
335
+ function et(e) {
336
336
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
337
337
  return e.slice(t, n);
338
338
  }
339
- function On(e, t) {
339
+ function Nn(e, t) {
340
340
  const n = (e.toString().split(".")[1] || "").length, r = t.toString();
341
341
  let o = (r.split(".")[1] || "").length;
342
342
  if (o === 0 && /\d?e-\d?/.test(r)) {
@@ -346,13 +346,13 @@ function On(e, t) {
346
346
  const i = n > o ? n : o, s = Number.parseInt(e.toFixed(i).replace(".", "")), a = Number.parseInt(t.toFixed(i).replace(".", ""));
347
347
  return s % a / 10 ** i;
348
348
  }
349
- const ct = /* @__PURE__ */ Symbol("evaluating");
350
- function w(e, t, n) {
349
+ const ut = /* @__PURE__ */ Symbol("evaluating");
350
+ function k(e, t, n) {
351
351
  let r;
352
352
  Object.defineProperty(e, t, {
353
353
  get() {
354
- if (r !== ct)
355
- return r === void 0 && (r = ct, r = n()), r;
354
+ if (r !== ut)
355
+ return r === void 0 && (r = ut, r = n()), r;
356
356
  },
357
357
  set(o) {
358
358
  Object.defineProperty(e, t, {
@@ -363,7 +363,7 @@ function w(e, t, n) {
363
363
  configurable: !0
364
364
  });
365
365
  }
366
- function ce(e, t, n) {
366
+ function ae(e, t, n) {
367
367
  Object.defineProperty(e, t, {
368
368
  value: n,
369
369
  writable: !0,
@@ -371,7 +371,7 @@ function ce(e, t, n) {
371
371
  configurable: !0
372
372
  });
373
373
  }
374
- function ee(...e) {
374
+ function te(...e) {
375
375
  const t = {};
376
376
  for (const n of e) {
377
377
  const r = Object.getOwnPropertyDescriptors(n);
@@ -379,18 +379,18 @@ function ee(...e) {
379
379
  }
380
380
  return Object.defineProperties({}, t);
381
381
  }
382
- function ut(e) {
382
+ function lt(e) {
383
383
  return JSON.stringify(e);
384
384
  }
385
- function Zn(e) {
385
+ function xn(e) {
386
386
  return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
387
387
  }
388
- const Jt = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
388
+ const Wt = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
389
389
  };
390
390
  function Ne(e) {
391
391
  return typeof e == "object" && e !== null && !Array.isArray(e);
392
392
  }
393
- const Tn = Ke(() => {
393
+ const Pn = Xe(() => {
394
394
  if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
395
395
  return !1;
396
396
  try {
@@ -409,14 +409,14 @@ function ze(e) {
409
409
  const n = t.prototype;
410
410
  return !(Ne(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
411
411
  }
412
- function Vt(e) {
412
+ function Yt(e) {
413
413
  return ze(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
414
414
  }
415
- const jn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
415
+ const Cn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
416
416
  function Ae(e) {
417
417
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
418
418
  }
419
- function te(e, t, n) {
419
+ function ne(e, t, n) {
420
420
  const r = new e._zod.constr(t ?? e._zod.def);
421
421
  return (!t || n?.parent) && (r._zod.parent = e), r;
422
422
  }
@@ -433,21 +433,21 @@ function g(e) {
433
433
  }
434
434
  return delete t.message, typeof t.error == "string" ? { ...t, error: () => t.error } : t;
435
435
  }
436
- function Nn(e) {
436
+ function In(e) {
437
437
  return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
438
438
  }
439
- const Pn = {
439
+ const Rn = {
440
440
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
441
441
  int32: [-2147483648, 2147483647],
442
442
  uint32: [0, 4294967295],
443
443
  float32: [-34028234663852886e22, 34028234663852886e22],
444
444
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
445
445
  };
446
- function xn(e, t) {
446
+ function An(e, t) {
447
447
  const n = e._zod.def, r = n.checks;
448
448
  if (r && r.length > 0)
449
449
  throw new Error(".pick() cannot be used on object schemas containing refinements");
450
- const i = ee(e._zod.def, {
450
+ const i = te(e._zod.def, {
451
451
  get shape() {
452
452
  const s = {};
453
453
  for (const a in t) {
@@ -455,17 +455,17 @@ function xn(e, t) {
455
455
  throw new Error(`Unrecognized key: "${a}"`);
456
456
  t[a] && (s[a] = n.shape[a]);
457
457
  }
458
- return ce(this, "shape", s), s;
458
+ return ae(this, "shape", s), s;
459
459
  },
460
460
  checks: []
461
461
  });
462
- return te(e, i);
462
+ return ne(e, i);
463
463
  }
464
- function Cn(e, t) {
464
+ function Mn(e, t) {
465
465
  const n = e._zod.def, r = n.checks;
466
466
  if (r && r.length > 0)
467
467
  throw new Error(".omit() cannot be used on object schemas containing refinements");
468
- const i = ee(e._zod.def, {
468
+ const i = te(e._zod.def, {
469
469
  get shape() {
470
470
  const s = { ...e._zod.def.shape };
471
471
  for (const a in t) {
@@ -473,13 +473,13 @@ function Cn(e, t) {
473
473
  throw new Error(`Unrecognized key: "${a}"`);
474
474
  t[a] && delete s[a];
475
475
  }
476
- return ce(this, "shape", s), s;
476
+ return ae(this, "shape", s), s;
477
477
  },
478
478
  checks: []
479
479
  });
480
- return te(e, i);
480
+ return ne(e, i);
481
481
  }
482
- function In(e, t) {
482
+ function Fn(e, t) {
483
483
  if (!ze(t))
484
484
  throw new Error("Invalid input to extend: expected a plain object");
485
485
  const n = e._zod.def.checks;
@@ -489,30 +489,30 @@ function In(e, t) {
489
489
  if (Object.getOwnPropertyDescriptor(i, s) !== void 0)
490
490
  throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
491
491
  }
492
- const o = ee(e._zod.def, {
492
+ const o = te(e._zod.def, {
493
493
  get shape() {
494
494
  const i = { ...e._zod.def.shape, ...t };
495
- return ce(this, "shape", i), i;
495
+ return ae(this, "shape", i), i;
496
496
  }
497
497
  });
498
- return te(e, o);
498
+ return ne(e, o);
499
499
  }
500
- function Rn(e, t) {
500
+ function Ln(e, t) {
501
501
  if (!ze(t))
502
502
  throw new Error("Invalid input to safeExtend: expected a plain object");
503
- const n = ee(e._zod.def, {
503
+ const n = te(e._zod.def, {
504
504
  get shape() {
505
505
  const r = { ...e._zod.def.shape, ...t };
506
- return ce(this, "shape", r), r;
506
+ return ae(this, "shape", r), r;
507
507
  }
508
508
  });
509
- return te(e, n);
509
+ return ne(e, n);
510
510
  }
511
- function An(e, t) {
512
- const n = ee(e._zod.def, {
511
+ function Dn(e, t) {
512
+ const n = te(e._zod.def, {
513
513
  get shape() {
514
514
  const r = { ...e._zod.def.shape, ...t._zod.def.shape };
515
- return ce(this, "shape", r), r;
515
+ return ae(this, "shape", r), r;
516
516
  },
517
517
  get catchall() {
518
518
  return t._zod.def.catchall;
@@ -520,13 +520,13 @@ function An(e, t) {
520
520
  checks: []
521
521
  // delete existing checks
522
522
  });
523
- return te(e, n);
523
+ return ne(e, n);
524
524
  }
525
- function Fn(e, t, n) {
525
+ function Un(e, t, n) {
526
526
  const o = t._zod.def.checks;
527
527
  if (o && o.length > 0)
528
528
  throw new Error(".partial() cannot be used on object schemas containing refinements");
529
- const s = ee(t._zod.def, {
529
+ const s = te(t._zod.def, {
530
530
  get shape() {
531
531
  const a = t._zod.def.shape, c = { ...a };
532
532
  if (n)
@@ -544,14 +544,14 @@ function Fn(e, t, n) {
544
544
  type: "optional",
545
545
  innerType: a[u]
546
546
  }) : a[u];
547
- return ce(this, "shape", c), c;
547
+ return ae(this, "shape", c), c;
548
548
  },
549
549
  checks: []
550
550
  });
551
- return te(t, s);
551
+ return ne(t, s);
552
552
  }
553
- function Mn(e, t, n) {
554
- const r = ee(t._zod.def, {
553
+ function Jn(e, t, n) {
554
+ const r = te(t._zod.def, {
555
555
  get shape() {
556
556
  const o = t._zod.def.shape, i = { ...o };
557
557
  if (n)
@@ -569,12 +569,12 @@ function Mn(e, t, n) {
569
569
  type: "nonoptional",
570
570
  innerType: o[s]
571
571
  });
572
- return ce(this, "shape", i), i;
572
+ return ae(this, "shape", i), i;
573
573
  }
574
574
  });
575
- return te(t, r);
575
+ return ne(t, r);
576
576
  }
577
- function de(e, t = 0) {
577
+ function le(e, t = 0) {
578
578
  if (e.aborted === !0)
579
579
  return !0;
580
580
  for (let n = t; n < e.issues.length; n++)
@@ -582,7 +582,7 @@ function de(e, t = 0) {
582
582
  return !0;
583
583
  return !1;
584
584
  }
585
- function et(e, t) {
585
+ function tt(e, t) {
586
586
  return t.map((n) => {
587
587
  var r;
588
588
  return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
@@ -591,7 +591,7 @@ function et(e, t) {
591
591
  function Oe(e) {
592
592
  return typeof e == "string" ? e : e?.message;
593
593
  }
594
- function ae(e, t, n) {
594
+ function se(e, t, n) {
595
595
  const r = { ...e, path: e.path ?? [] };
596
596
  if (!e.message) {
597
597
  const o = Oe(e.inst?._zod.def?.error?.(e)) ?? Oe(t?.error?.(e)) ?? Oe(n.customError?.(e)) ?? Oe(n.localeError?.(e)) ?? "Invalid input";
@@ -599,7 +599,7 @@ function ae(e, t, n) {
599
599
  }
600
600
  return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
601
601
  }
602
- function tt(e) {
602
+ function nt(e) {
603
603
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
604
604
  }
605
605
  function ke(...e) {
@@ -611,25 +611,25 @@ function ke(...e) {
611
611
  inst: r
612
612
  } : { ...t };
613
613
  }
614
- const Wt = (e, t) => {
614
+ const Bt = (e, t) => {
615
615
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
616
616
  value: e._zod,
617
617
  enumerable: !1
618
618
  }), Object.defineProperty(e, "issues", {
619
619
  value: t,
620
620
  enumerable: !1
621
- }), e.message = JSON.stringify(t, Be, 2), Object.defineProperty(e, "toString", {
621
+ }), e.message = JSON.stringify(t, qe, 2), Object.defineProperty(e, "toString", {
622
622
  value: () => e.message,
623
623
  enumerable: !1
624
624
  });
625
- }, Yt = l("$ZodError", Wt), Bt = l("$ZodError", Wt, { Parent: Error });
626
- function Ln(e, t = (n) => n.message) {
625
+ }, qt = f("$ZodError", Bt), Gt = f("$ZodError", Bt, { Parent: Error });
626
+ function Vn(e, t = (n) => n.message) {
627
627
  const n = {}, r = [];
628
628
  for (const o of e.issues)
629
629
  o.path.length > 0 ? (n[o.path[0]] = n[o.path[0]] || [], n[o.path[0]].push(t(o))) : r.push(t(o));
630
630
  return { formErrors: r, fieldErrors: n };
631
631
  }
632
- function Dn(e, t = (n) => n.message) {
632
+ function Wn(e, t = (n) => n.message) {
633
633
  const n = { _errors: [] }, r = (o) => {
634
634
  for (const i of o.issues)
635
635
  if (i.code === "invalid_union" && i.errors.length)
@@ -650,81 +650,81 @@ function Dn(e, t = (n) => n.message) {
650
650
  };
651
651
  return r(e), n;
652
652
  }
653
- const nt = (e) => (t, n, r, o) => {
653
+ const rt = (e) => (t, n, r, o) => {
654
654
  const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, i);
655
655
  if (s instanceof Promise)
656
- throw new pe();
656
+ throw new fe();
657
657
  if (s.issues.length) {
658
- const a = new (o?.Err ?? e)(s.issues.map((c) => ae(c, i, se())));
659
- throw Jt(a, o?.callee), a;
658
+ const a = new (o?.Err ?? e)(s.issues.map((c) => se(c, i, ie())));
659
+ throw Wt(a, o?.callee), a;
660
660
  }
661
661
  return s.value;
662
- }, rt = (e) => async (t, n, r, o) => {
662
+ }, ot = (e) => async (t, n, r, o) => {
663
663
  const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
664
664
  let s = t._zod.run({ value: n, issues: [] }, i);
665
665
  if (s instanceof Promise && (s = await s), s.issues.length) {
666
- const a = new (o?.Err ?? e)(s.issues.map((c) => ae(c, i, se())));
667
- throw Jt(a, o?.callee), a;
666
+ const a = new (o?.Err ?? e)(s.issues.map((c) => se(c, i, ie())));
667
+ throw Wt(a, o?.callee), a;
668
668
  }
669
669
  return s.value;
670
- }, Fe = (e) => (t, n, r) => {
670
+ }, Me = (e) => (t, n, r) => {
671
671
  const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
672
672
  if (i instanceof Promise)
673
- throw new pe();
673
+ throw new fe();
674
674
  return i.issues.length ? {
675
675
  success: !1,
676
- error: new (e ?? Yt)(i.issues.map((s) => ae(s, o, se())))
676
+ error: new (e ?? qt)(i.issues.map((s) => se(s, o, ie())))
677
677
  } : { success: !0, data: i.value };
678
- }, Un = /* @__PURE__ */ Fe(Bt), Me = (e) => async (t, n, r) => {
678
+ }, Yn = /* @__PURE__ */ Me(Gt), Fe = (e) => async (t, n, r) => {
679
679
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
680
680
  let i = t._zod.run({ value: n, issues: [] }, o);
681
681
  return i instanceof Promise && (i = await i), i.issues.length ? {
682
682
  success: !1,
683
- error: new e(i.issues.map((s) => ae(s, o, se())))
683
+ error: new e(i.issues.map((s) => se(s, o, ie())))
684
684
  } : { success: !0, data: i.value };
685
- }, Jn = /* @__PURE__ */ Me(Bt), Vn = (e) => (t, n, r) => {
686
- const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
687
- return nt(e)(t, n, o);
688
- }, Wn = (e) => (t, n, r) => nt(e)(t, n, r), Yn = (e) => async (t, n, r) => {
685
+ }, Bn = /* @__PURE__ */ Fe(Gt), qn = (e) => (t, n, r) => {
689
686
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
690
687
  return rt(e)(t, n, o);
691
- }, Bn = (e) => async (t, n, r) => rt(e)(t, n, r), qn = (e) => (t, n, r) => {
688
+ }, Gn = (e) => (t, n, r) => rt(e)(t, n, r), Hn = (e) => async (t, n, r) => {
692
689
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
693
- return Fe(e)(t, n, o);
694
- }, Gn = (e) => (t, n, r) => Fe(e)(t, n, r), Hn = (e) => async (t, n, r) => {
690
+ return ot(e)(t, n, o);
691
+ }, Kn = (e) => async (t, n, r) => ot(e)(t, n, r), Xn = (e) => (t, n, r) => {
695
692
  const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
696
693
  return Me(e)(t, n, o);
697
- }, Kn = (e) => async (t, n, r) => Me(e)(t, n, r), Xn = /^[cC][^\s-]{8,}$/, Qn = /^[0-9a-z]+$/, er = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, tr = /^[0-9a-vA-V]{20}$/, nr = /^[A-Za-z0-9]{27}$/, rr = /^[a-zA-Z0-9_-]{21}$/, or = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, ir = /^([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})$/, lt = (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)$/, sr = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, ar = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
698
- function cr() {
699
- return new RegExp(ar, "u");
694
+ }, Qn = (e) => (t, n, r) => Me(e)(t, n, r), er = (e) => async (t, n, r) => {
695
+ const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
696
+ return Fe(e)(t, n, o);
697
+ }, tr = (e) => async (t, n, r) => Fe(e)(t, n, r), nr = /^[cC][^\s-]{8,}$/, rr = /^[0-9a-z]+$/, or = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, ir = /^[0-9a-vA-V]{20}$/, sr = /^[A-Za-z0-9]{27}$/, ar = /^[a-zA-Z0-9_-]{21}$/, cr = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, ur = /^([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})$/, ft = (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)$/, lr = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, fr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
698
+ function dr() {
699
+ return new RegExp(fr, "u");
700
700
  }
701
- const ur = /^(?:(?: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])$/, lr = /^(([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}|:))$/, fr = /^((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])$/, dr = /^(([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])$/, pr = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, qt = /^[A-Za-z0-9_-]*$/, mr = /^\+[1-9]\d{6,14}$/, Gt = "(?:(?:\\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])))", hr = /* @__PURE__ */ new RegExp(`^${Gt}$`);
702
- function Ht(e) {
701
+ const pr = /^(?:(?: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])$/, mr = /^(([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}|:))$/, hr = /^((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])$/, gr = /^(([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])$/, _r = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Ht = /^[A-Za-z0-9_-]*$/, vr = /^\+[1-9]\d{6,14}$/, Kt = "(?:(?:\\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])))", yr = /* @__PURE__ */ new RegExp(`^${Kt}$`);
702
+ function Xt(e) {
703
703
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
704
704
  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+)?)?`;
705
705
  }
706
- function gr(e) {
707
- return new RegExp(`^${Ht(e)}$`);
706
+ function br(e) {
707
+ return new RegExp(`^${Xt(e)}$`);
708
708
  }
709
- function _r(e) {
710
- const t = Ht({ precision: e.precision }), n = ["Z"];
709
+ function wr(e) {
710
+ const t = Xt({ precision: e.precision }), n = ["Z"];
711
711
  e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
712
712
  const r = `${t}(?:${n.join("|")})`;
713
- return new RegExp(`^${Gt}T(?:${r})$`);
713
+ return new RegExp(`^${Kt}T(?:${r})$`);
714
714
  }
715
- const vr = (e) => {
715
+ const zr = (e) => {
716
716
  const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
717
717
  return new RegExp(`^${t}$`);
718
- }, yr = /^-?\d+$/, br = /^-?\d+(?:\.\d+)?$/, wr = /^[^A-Z]*$/, zr = /^[^a-z]*$/, L = /* @__PURE__ */ l("$ZodCheck", (e, t) => {
718
+ }, kr = /^-?\d+$/, Sr = /^-?\d+(?:\.\d+)?$/, $r = /^[^A-Z]*$/, Er = /^[^a-z]*$/, L = /* @__PURE__ */ f("$ZodCheck", (e, t) => {
719
719
  var n;
720
720
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
721
- }), Kt = {
721
+ }), Qt = {
722
722
  number: "number",
723
723
  bigint: "bigint",
724
724
  object: "date"
725
- }, Xt = /* @__PURE__ */ l("$ZodCheckLessThan", (e, t) => {
725
+ }, en = /* @__PURE__ */ f("$ZodCheckLessThan", (e, t) => {
726
726
  L.init(e, t);
727
- const n = Kt[typeof t.value];
727
+ const n = Qt[typeof t.value];
728
728
  e._zod.onattach.push((r) => {
729
729
  const o = r._zod.bag, i = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
730
730
  t.value < i && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
@@ -739,9 +739,9 @@ const vr = (e) => {
739
739
  continue: !t.abort
740
740
  });
741
741
  };
742
- }), Qt = /* @__PURE__ */ l("$ZodCheckGreaterThan", (e, t) => {
742
+ }), tn = /* @__PURE__ */ f("$ZodCheckGreaterThan", (e, t) => {
743
743
  L.init(e, t);
744
- const n = Kt[typeof t.value];
744
+ const n = Qt[typeof t.value];
745
745
  e._zod.onattach.push((r) => {
746
746
  const o = r._zod.bag, i = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
747
747
  t.value > i && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
@@ -756,14 +756,14 @@ const vr = (e) => {
756
756
  continue: !t.abort
757
757
  });
758
758
  };
759
- }), kr = /* @__PURE__ */ l("$ZodCheckMultipleOf", (e, t) => {
759
+ }), Or = /* @__PURE__ */ f("$ZodCheckMultipleOf", (e, t) => {
760
760
  L.init(e, t), e._zod.onattach.push((n) => {
761
761
  var r;
762
762
  (r = n._zod.bag).multipleOf ?? (r.multipleOf = t.value);
763
763
  }), e._zod.check = (n) => {
764
764
  if (typeof n.value != typeof t.value)
765
765
  throw new Error("Cannot mix number and bigint in multiple_of check.");
766
- (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : On(n.value, t.value) === 0) || n.issues.push({
766
+ (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : Nn(n.value, t.value) === 0) || n.issues.push({
767
767
  origin: typeof n.value,
768
768
  code: "not_multiple_of",
769
769
  divisor: t.value,
@@ -772,12 +772,12 @@ const vr = (e) => {
772
772
  continue: !t.abort
773
773
  });
774
774
  };
775
- }), Sr = /* @__PURE__ */ l("$ZodCheckNumberFormat", (e, t) => {
775
+ }), Zr = /* @__PURE__ */ f("$ZodCheckNumberFormat", (e, t) => {
776
776
  L.init(e, t), t.format = t.format || "float64";
777
- const n = t.format?.includes("int"), r = n ? "int" : "number", [o, i] = Pn[t.format];
777
+ const n = t.format?.includes("int"), r = n ? "int" : "number", [o, i] = Rn[t.format];
778
778
  e._zod.onattach.push((s) => {
779
779
  const a = s._zod.bag;
780
- a.format = t.format, a.minimum = o, a.maximum = i, n && (a.pattern = yr);
780
+ a.format = t.format, a.minimum = o, a.maximum = i, n && (a.pattern = kr);
781
781
  }), e._zod.check = (s) => {
782
782
  const a = s.value;
783
783
  if (n) {
@@ -833,11 +833,11 @@ const vr = (e) => {
833
833
  continue: !t.abort
834
834
  });
835
835
  };
836
- }), $r = /* @__PURE__ */ l("$ZodCheckMaxLength", (e, t) => {
836
+ }), jr = /* @__PURE__ */ f("$ZodCheckMaxLength", (e, t) => {
837
837
  var n;
838
838
  L.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
839
839
  const o = r.value;
840
- return !Xe(o) && o.length !== void 0;
840
+ return !Qe(o) && o.length !== void 0;
841
841
  }), e._zod.onattach.push((r) => {
842
842
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
843
843
  t.maximum < o && (r._zod.bag.maximum = t.maximum);
@@ -845,7 +845,7 @@ const vr = (e) => {
845
845
  const o = r.value;
846
846
  if (o.length <= t.maximum)
847
847
  return;
848
- const s = tt(o);
848
+ const s = nt(o);
849
849
  r.issues.push({
850
850
  origin: s,
851
851
  code: "too_big",
@@ -856,11 +856,11 @@ const vr = (e) => {
856
856
  continue: !t.abort
857
857
  });
858
858
  };
859
- }), Er = /* @__PURE__ */ l("$ZodCheckMinLength", (e, t) => {
859
+ }), Tr = /* @__PURE__ */ f("$ZodCheckMinLength", (e, t) => {
860
860
  var n;
861
861
  L.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
862
862
  const o = r.value;
863
- return !Xe(o) && o.length !== void 0;
863
+ return !Qe(o) && o.length !== void 0;
864
864
  }), e._zod.onattach.push((r) => {
865
865
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
866
866
  t.minimum > o && (r._zod.bag.minimum = t.minimum);
@@ -868,7 +868,7 @@ const vr = (e) => {
868
868
  const o = r.value;
869
869
  if (o.length >= t.minimum)
870
870
  return;
871
- const s = tt(o);
871
+ const s = nt(o);
872
872
  r.issues.push({
873
873
  origin: s,
874
874
  code: "too_small",
@@ -879,11 +879,11 @@ const vr = (e) => {
879
879
  continue: !t.abort
880
880
  });
881
881
  };
882
- }), Or = /* @__PURE__ */ l("$ZodCheckLengthEquals", (e, t) => {
882
+ }), Nr = /* @__PURE__ */ f("$ZodCheckLengthEquals", (e, t) => {
883
883
  var n;
884
884
  L.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
885
885
  const o = r.value;
886
- return !Xe(o) && o.length !== void 0;
886
+ return !Qe(o) && o.length !== void 0;
887
887
  }), e._zod.onattach.push((r) => {
888
888
  const o = r._zod.bag;
889
889
  o.minimum = t.length, o.maximum = t.length, o.length = t.length;
@@ -891,7 +891,7 @@ const vr = (e) => {
891
891
  const o = r.value, i = o.length;
892
892
  if (i === t.length)
893
893
  return;
894
- const s = tt(o), a = i > t.length;
894
+ const s = nt(o), a = i > t.length;
895
895
  r.issues.push({
896
896
  origin: s,
897
897
  ...a ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
@@ -902,7 +902,7 @@ const vr = (e) => {
902
902
  continue: !t.abort
903
903
  });
904
904
  };
905
- }), Le = /* @__PURE__ */ l("$ZodCheckStringFormat", (e, t) => {
905
+ }), Le = /* @__PURE__ */ f("$ZodCheckStringFormat", (e, t) => {
906
906
  var n, r;
907
907
  L.init(e, t), e._zod.onattach.push((o) => {
908
908
  const i = o._zod.bag;
@@ -919,7 +919,7 @@ const vr = (e) => {
919
919
  });
920
920
  }) : (r = e._zod).check ?? (r.check = () => {
921
921
  });
922
- }), Zr = /* @__PURE__ */ l("$ZodCheckRegex", (e, t) => {
922
+ }), xr = /* @__PURE__ */ f("$ZodCheckRegex", (e, t) => {
923
923
  Le.init(e, t), e._zod.check = (n) => {
924
924
  t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
925
925
  origin: "string",
@@ -931,11 +931,11 @@ const vr = (e) => {
931
931
  continue: !t.abort
932
932
  });
933
933
  };
934
- }), Tr = /* @__PURE__ */ l("$ZodCheckLowerCase", (e, t) => {
935
- t.pattern ?? (t.pattern = wr), Le.init(e, t);
936
- }), jr = /* @__PURE__ */ l("$ZodCheckUpperCase", (e, t) => {
937
- t.pattern ?? (t.pattern = zr), Le.init(e, t);
938
- }), Nr = /* @__PURE__ */ l("$ZodCheckIncludes", (e, t) => {
934
+ }), Pr = /* @__PURE__ */ f("$ZodCheckLowerCase", (e, t) => {
935
+ t.pattern ?? (t.pattern = $r), Le.init(e, t);
936
+ }), Cr = /* @__PURE__ */ f("$ZodCheckUpperCase", (e, t) => {
937
+ t.pattern ?? (t.pattern = Er), Le.init(e, t);
938
+ }), Ir = /* @__PURE__ */ f("$ZodCheckIncludes", (e, t) => {
939
939
  L.init(e, t);
940
940
  const n = Ae(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
941
941
  t.pattern = r, e._zod.onattach.push((o) => {
@@ -952,7 +952,7 @@ const vr = (e) => {
952
952
  continue: !t.abort
953
953
  });
954
954
  };
955
- }), Pr = /* @__PURE__ */ l("$ZodCheckStartsWith", (e, t) => {
955
+ }), Rr = /* @__PURE__ */ f("$ZodCheckStartsWith", (e, t) => {
956
956
  L.init(e, t);
957
957
  const n = new RegExp(`^${Ae(t.prefix)}.*`);
958
958
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
@@ -969,7 +969,7 @@ const vr = (e) => {
969
969
  continue: !t.abort
970
970
  });
971
971
  };
972
- }), xr = /* @__PURE__ */ l("$ZodCheckEndsWith", (e, t) => {
972
+ }), Ar = /* @__PURE__ */ f("$ZodCheckEndsWith", (e, t) => {
973
973
  L.init(e, t);
974
974
  const n = new RegExp(`.*${Ae(t.suffix)}$`);
975
975
  t.pattern ?? (t.pattern = n), e._zod.onattach.push((r) => {
@@ -986,12 +986,12 @@ const vr = (e) => {
986
986
  continue: !t.abort
987
987
  });
988
988
  };
989
- }), Cr = /* @__PURE__ */ l("$ZodCheckOverwrite", (e, t) => {
989
+ }), Mr = /* @__PURE__ */ f("$ZodCheckOverwrite", (e, t) => {
990
990
  L.init(e, t), e._zod.check = (n) => {
991
991
  n.value = t.tx(n.value);
992
992
  };
993
993
  });
994
- class Ir {
994
+ class Fr {
995
995
  constructor(t = []) {
996
996
  this.content = [], this.indent = 0, this && (this.args = t);
997
997
  }
@@ -1014,13 +1014,13 @@ class Ir {
1014
1014
  `));
1015
1015
  }
1016
1016
  }
1017
- const Rr = {
1017
+ const Lr = {
1018
1018
  major: 4,
1019
1019
  minor: 3,
1020
1020
  patch: 6
1021
- }, N = /* @__PURE__ */ l("$ZodType", (e, t) => {
1021
+ }, x = /* @__PURE__ */ f("$ZodType", (e, t) => {
1022
1022
  var n;
1023
- e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Rr;
1023
+ e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Lr;
1024
1024
  const r = [...e._zod.def.checks ?? []];
1025
1025
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
1026
1026
  for (const o of r)
@@ -1032,34 +1032,34 @@ const Rr = {
1032
1032
  });
1033
1033
  else {
1034
1034
  const o = (s, a, c) => {
1035
- let u = de(s), d;
1036
- for (const m of a) {
1037
- if (m._zod.def.when) {
1038
- if (!m._zod.def.when(s))
1035
+ let u = le(s), d;
1036
+ for (const p of a) {
1037
+ if (p._zod.def.when) {
1038
+ if (!p._zod.def.when(s))
1039
1039
  continue;
1040
1040
  } else if (u)
1041
1041
  continue;
1042
- const p = s.issues.length, h = m._zod.check(s);
1042
+ const m = s.issues.length, h = p._zod.check(s);
1043
1043
  if (h instanceof Promise && c?.async === !1)
1044
- throw new pe();
1044
+ throw new fe();
1045
1045
  if (d || h instanceof Promise)
1046
1046
  d = (d ?? Promise.resolve()).then(async () => {
1047
- await h, s.issues.length !== p && (u || (u = de(s, p)));
1047
+ await h, s.issues.length !== m && (u || (u = le(s, m)));
1048
1048
  });
1049
1049
  else {
1050
- if (s.issues.length === p)
1050
+ if (s.issues.length === m)
1051
1051
  continue;
1052
- u || (u = de(s, p));
1052
+ u || (u = le(s, m));
1053
1053
  }
1054
1054
  }
1055
1055
  return d ? d.then(() => s) : s;
1056
1056
  }, i = (s, a, c) => {
1057
- if (de(s))
1057
+ if (le(s))
1058
1058
  return s.aborted = !0, s;
1059
1059
  const u = o(a, r, c);
1060
1060
  if (u instanceof Promise) {
1061
1061
  if (c.async === !1)
1062
- throw new pe();
1062
+ throw new fe();
1063
1063
  return u.then((d) => e._zod.parse(d, c));
1064
1064
  }
1065
1065
  return e._zod.parse(u, c);
@@ -1074,26 +1074,26 @@ const Rr = {
1074
1074
  const c = e._zod.parse(s, a);
1075
1075
  if (c instanceof Promise) {
1076
1076
  if (a.async === !1)
1077
- throw new pe();
1077
+ throw new fe();
1078
1078
  return c.then((u) => o(u, r, a));
1079
1079
  }
1080
1080
  return o(c, r, a);
1081
1081
  };
1082
1082
  }
1083
- w(e, "~standard", () => ({
1083
+ k(e, "~standard", () => ({
1084
1084
  validate: (o) => {
1085
1085
  try {
1086
- const i = Un(e, o);
1086
+ const i = Yn(e, o);
1087
1087
  return i.success ? { value: i.data } : { issues: i.error?.issues };
1088
1088
  } catch {
1089
- return Jn(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
1089
+ return Bn(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
1090
1090
  }
1091
1091
  },
1092
1092
  vendor: "zod",
1093
1093
  version: 1
1094
1094
  }));
1095
- }), ot = /* @__PURE__ */ l("$ZodString", (e, t) => {
1096
- N.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? vr(e._zod.bag), e._zod.parse = (n, r) => {
1095
+ }), it = /* @__PURE__ */ f("$ZodString", (e, t) => {
1096
+ x.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? zr(e._zod.bag), e._zod.parse = (n, r) => {
1097
1097
  if (t.coerce)
1098
1098
  try {
1099
1099
  n.value = String(n.value);
@@ -1106,11 +1106,11 @@ const Rr = {
1106
1106
  inst: e
1107
1107
  }), n;
1108
1108
  };
1109
- }), $ = /* @__PURE__ */ l("$ZodStringFormat", (e, t) => {
1110
- Le.init(e, t), ot.init(e, t);
1111
- }), Ar = /* @__PURE__ */ l("$ZodGUID", (e, t) => {
1112
- t.pattern ?? (t.pattern = ir), $.init(e, t);
1113
- }), Fr = /* @__PURE__ */ l("$ZodUUID", (e, t) => {
1109
+ }), O = /* @__PURE__ */ f("$ZodStringFormat", (e, t) => {
1110
+ Le.init(e, t), it.init(e, t);
1111
+ }), Dr = /* @__PURE__ */ f("$ZodGUID", (e, t) => {
1112
+ t.pattern ?? (t.pattern = ur), O.init(e, t);
1113
+ }), Ur = /* @__PURE__ */ f("$ZodUUID", (e, t) => {
1114
1114
  if (t.version) {
1115
1115
  const r = {
1116
1116
  v1: 1,
@@ -1124,14 +1124,14 @@ const Rr = {
1124
1124
  }[t.version];
1125
1125
  if (r === void 0)
1126
1126
  throw new Error(`Invalid UUID version: "${t.version}"`);
1127
- t.pattern ?? (t.pattern = lt(r));
1127
+ t.pattern ?? (t.pattern = ft(r));
1128
1128
  } else
1129
- t.pattern ?? (t.pattern = lt());
1130
- $.init(e, t);
1131
- }), Mr = /* @__PURE__ */ l("$ZodEmail", (e, t) => {
1132
- t.pattern ?? (t.pattern = sr), $.init(e, t);
1133
- }), Lr = /* @__PURE__ */ l("$ZodURL", (e, t) => {
1134
- $.init(e, t), e._zod.check = (n) => {
1129
+ t.pattern ?? (t.pattern = ft());
1130
+ O.init(e, t);
1131
+ }), Jr = /* @__PURE__ */ f("$ZodEmail", (e, t) => {
1132
+ t.pattern ?? (t.pattern = lr), O.init(e, t);
1133
+ }), Vr = /* @__PURE__ */ f("$ZodURL", (e, t) => {
1134
+ O.init(e, t), e._zod.check = (n) => {
1135
1135
  try {
1136
1136
  const r = n.value.trim(), o = new URL(r);
1137
1137
  t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
@@ -1162,32 +1162,32 @@ const Rr = {
1162
1162
  });
1163
1163
  }
1164
1164
  };
1165
- }), Dr = /* @__PURE__ */ l("$ZodEmoji", (e, t) => {
1166
- t.pattern ?? (t.pattern = cr()), $.init(e, t);
1167
- }), Ur = /* @__PURE__ */ l("$ZodNanoID", (e, t) => {
1168
- t.pattern ?? (t.pattern = rr), $.init(e, t);
1169
- }), Jr = /* @__PURE__ */ l("$ZodCUID", (e, t) => {
1170
- t.pattern ?? (t.pattern = Xn), $.init(e, t);
1171
- }), Vr = /* @__PURE__ */ l("$ZodCUID2", (e, t) => {
1172
- t.pattern ?? (t.pattern = Qn), $.init(e, t);
1173
- }), Wr = /* @__PURE__ */ l("$ZodULID", (e, t) => {
1174
- t.pattern ?? (t.pattern = er), $.init(e, t);
1175
- }), Yr = /* @__PURE__ */ l("$ZodXID", (e, t) => {
1176
- t.pattern ?? (t.pattern = tr), $.init(e, t);
1177
- }), Br = /* @__PURE__ */ l("$ZodKSUID", (e, t) => {
1178
- t.pattern ?? (t.pattern = nr), $.init(e, t);
1179
- }), qr = /* @__PURE__ */ l("$ZodISODateTime", (e, t) => {
1180
- t.pattern ?? (t.pattern = _r(t)), $.init(e, t);
1181
- }), Gr = /* @__PURE__ */ l("$ZodISODate", (e, t) => {
1182
- t.pattern ?? (t.pattern = hr), $.init(e, t);
1183
- }), Hr = /* @__PURE__ */ l("$ZodISOTime", (e, t) => {
1184
- t.pattern ?? (t.pattern = gr(t)), $.init(e, t);
1185
- }), Kr = /* @__PURE__ */ l("$ZodISODuration", (e, t) => {
1186
- t.pattern ?? (t.pattern = or), $.init(e, t);
1187
- }), Xr = /* @__PURE__ */ l("$ZodIPv4", (e, t) => {
1188
- t.pattern ?? (t.pattern = ur), $.init(e, t), e._zod.bag.format = "ipv4";
1189
- }), Qr = /* @__PURE__ */ l("$ZodIPv6", (e, t) => {
1190
- t.pattern ?? (t.pattern = lr), $.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1165
+ }), Wr = /* @__PURE__ */ f("$ZodEmoji", (e, t) => {
1166
+ t.pattern ?? (t.pattern = dr()), O.init(e, t);
1167
+ }), Yr = /* @__PURE__ */ f("$ZodNanoID", (e, t) => {
1168
+ t.pattern ?? (t.pattern = ar), O.init(e, t);
1169
+ }), Br = /* @__PURE__ */ f("$ZodCUID", (e, t) => {
1170
+ t.pattern ?? (t.pattern = nr), O.init(e, t);
1171
+ }), qr = /* @__PURE__ */ f("$ZodCUID2", (e, t) => {
1172
+ t.pattern ?? (t.pattern = rr), O.init(e, t);
1173
+ }), Gr = /* @__PURE__ */ f("$ZodULID", (e, t) => {
1174
+ t.pattern ?? (t.pattern = or), O.init(e, t);
1175
+ }), Hr = /* @__PURE__ */ f("$ZodXID", (e, t) => {
1176
+ t.pattern ?? (t.pattern = ir), O.init(e, t);
1177
+ }), Kr = /* @__PURE__ */ f("$ZodKSUID", (e, t) => {
1178
+ t.pattern ?? (t.pattern = sr), O.init(e, t);
1179
+ }), Xr = /* @__PURE__ */ f("$ZodISODateTime", (e, t) => {
1180
+ t.pattern ?? (t.pattern = wr(t)), O.init(e, t);
1181
+ }), Qr = /* @__PURE__ */ f("$ZodISODate", (e, t) => {
1182
+ t.pattern ?? (t.pattern = yr), O.init(e, t);
1183
+ }), eo = /* @__PURE__ */ f("$ZodISOTime", (e, t) => {
1184
+ t.pattern ?? (t.pattern = br(t)), O.init(e, t);
1185
+ }), to = /* @__PURE__ */ f("$ZodISODuration", (e, t) => {
1186
+ t.pattern ?? (t.pattern = cr), O.init(e, t);
1187
+ }), no = /* @__PURE__ */ f("$ZodIPv4", (e, t) => {
1188
+ t.pattern ?? (t.pattern = pr), O.init(e, t), e._zod.bag.format = "ipv4";
1189
+ }), ro = /* @__PURE__ */ f("$ZodIPv6", (e, t) => {
1190
+ t.pattern ?? (t.pattern = mr), O.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1191
1191
  try {
1192
1192
  new URL(`http://[${n.value}]`);
1193
1193
  } catch {
@@ -1200,10 +1200,10 @@ const Rr = {
1200
1200
  });
1201
1201
  }
1202
1202
  };
1203
- }), eo = /* @__PURE__ */ l("$ZodCIDRv4", (e, t) => {
1204
- t.pattern ?? (t.pattern = fr), $.init(e, t);
1205
- }), to = /* @__PURE__ */ l("$ZodCIDRv6", (e, t) => {
1206
- t.pattern ?? (t.pattern = dr), $.init(e, t), e._zod.check = (n) => {
1203
+ }), oo = /* @__PURE__ */ f("$ZodCIDRv4", (e, t) => {
1204
+ t.pattern ?? (t.pattern = hr), O.init(e, t);
1205
+ }), io = /* @__PURE__ */ f("$ZodCIDRv6", (e, t) => {
1206
+ t.pattern ?? (t.pattern = gr), O.init(e, t), e._zod.check = (n) => {
1207
1207
  const r = n.value.split("/");
1208
1208
  try {
1209
1209
  if (r.length !== 2)
@@ -1228,7 +1228,7 @@ const Rr = {
1228
1228
  }
1229
1229
  };
1230
1230
  });
1231
- function en(e) {
1231
+ function nn(e) {
1232
1232
  if (e === "")
1233
1233
  return !0;
1234
1234
  if (e.length % 4 !== 0)
@@ -1239,9 +1239,9 @@ function en(e) {
1239
1239
  return !1;
1240
1240
  }
1241
1241
  }
1242
- const no = /* @__PURE__ */ l("$ZodBase64", (e, t) => {
1243
- t.pattern ?? (t.pattern = pr), $.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
1244
- en(n.value) || n.issues.push({
1242
+ const so = /* @__PURE__ */ f("$ZodBase64", (e, t) => {
1243
+ t.pattern ?? (t.pattern = _r), O.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
1244
+ nn(n.value) || n.issues.push({
1245
1245
  code: "invalid_format",
1246
1246
  format: "base64",
1247
1247
  input: n.value,
@@ -1250,15 +1250,15 @@ const no = /* @__PURE__ */ l("$ZodBase64", (e, t) => {
1250
1250
  });
1251
1251
  };
1252
1252
  });
1253
- function ro(e) {
1254
- if (!qt.test(e))
1253
+ function ao(e) {
1254
+ if (!Ht.test(e))
1255
1255
  return !1;
1256
1256
  const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
1257
- return en(n);
1257
+ return nn(n);
1258
1258
  }
1259
- const oo = /* @__PURE__ */ l("$ZodBase64URL", (e, t) => {
1260
- t.pattern ?? (t.pattern = qt), $.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1261
- ro(n.value) || n.issues.push({
1259
+ const co = /* @__PURE__ */ f("$ZodBase64URL", (e, t) => {
1260
+ t.pattern ?? (t.pattern = Ht), O.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1261
+ ao(n.value) || n.issues.push({
1262
1262
  code: "invalid_format",
1263
1263
  format: "base64url",
1264
1264
  input: n.value,
@@ -1266,10 +1266,10 @@ const oo = /* @__PURE__ */ l("$ZodBase64URL", (e, t) => {
1266
1266
  continue: !t.abort
1267
1267
  });
1268
1268
  };
1269
- }), io = /* @__PURE__ */ l("$ZodE164", (e, t) => {
1270
- t.pattern ?? (t.pattern = mr), $.init(e, t);
1269
+ }), uo = /* @__PURE__ */ f("$ZodE164", (e, t) => {
1270
+ t.pattern ?? (t.pattern = vr), O.init(e, t);
1271
1271
  });
1272
- function so(e, t = null) {
1272
+ function lo(e, t = null) {
1273
1273
  try {
1274
1274
  const n = e.split(".");
1275
1275
  if (n.length !== 3)
@@ -1283,9 +1283,9 @@ function so(e, t = null) {
1283
1283
  return !1;
1284
1284
  }
1285
1285
  }
1286
- const ao = /* @__PURE__ */ l("$ZodJWT", (e, t) => {
1287
- $.init(e, t), e._zod.check = (n) => {
1288
- so(n.value, t.alg) || n.issues.push({
1286
+ const fo = /* @__PURE__ */ f("$ZodJWT", (e, t) => {
1287
+ O.init(e, t), e._zod.check = (n) => {
1288
+ lo(n.value, t.alg) || n.issues.push({
1289
1289
  code: "invalid_format",
1290
1290
  format: "jwt",
1291
1291
  input: n.value,
@@ -1293,8 +1293,8 @@ const ao = /* @__PURE__ */ l("$ZodJWT", (e, t) => {
1293
1293
  continue: !t.abort
1294
1294
  });
1295
1295
  };
1296
- }), tn = /* @__PURE__ */ l("$ZodNumber", (e, t) => {
1297
- N.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? br, e._zod.parse = (n, r) => {
1296
+ }), rn = /* @__PURE__ */ f("$ZodNumber", (e, t) => {
1297
+ x.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Sr, e._zod.parse = (n, r) => {
1298
1298
  if (t.coerce)
1299
1299
  try {
1300
1300
  n.value = Number(n.value);
@@ -1312,23 +1312,23 @@ const ao = /* @__PURE__ */ l("$ZodJWT", (e, t) => {
1312
1312
  ...i ? { received: i } : {}
1313
1313
  }), n;
1314
1314
  };
1315
- }), co = /* @__PURE__ */ l("$ZodNumberFormat", (e, t) => {
1316
- Sr.init(e, t), tn.init(e, t);
1317
- }), uo = /* @__PURE__ */ l("$ZodUnknown", (e, t) => {
1318
- N.init(e, t), e._zod.parse = (n) => n;
1319
- }), lo = /* @__PURE__ */ l("$ZodNever", (e, t) => {
1320
- N.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1315
+ }), po = /* @__PURE__ */ f("$ZodNumberFormat", (e, t) => {
1316
+ Zr.init(e, t), rn.init(e, t);
1317
+ }), mo = /* @__PURE__ */ f("$ZodUnknown", (e, t) => {
1318
+ x.init(e, t), e._zod.parse = (n) => n;
1319
+ }), ho = /* @__PURE__ */ f("$ZodNever", (e, t) => {
1320
+ x.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1321
1321
  expected: "never",
1322
1322
  code: "invalid_type",
1323
1323
  input: n.value,
1324
1324
  inst: e
1325
1325
  }), n);
1326
1326
  });
1327
- function ft(e, t, n) {
1328
- e.issues.length && t.issues.push(...et(n, e.issues)), t.value[n] = e.value;
1327
+ function dt(e, t, n) {
1328
+ e.issues.length && t.issues.push(...tt(n, e.issues)), t.value[n] = e.value;
1329
1329
  }
1330
- const fo = /* @__PURE__ */ l("$ZodArray", (e, t) => {
1331
- N.init(e, t), e._zod.parse = (n, r) => {
1330
+ const go = /* @__PURE__ */ f("$ZodArray", (e, t) => {
1331
+ x.init(e, t), e._zod.parse = (n, r) => {
1332
1332
  const o = n.value;
1333
1333
  if (!Array.isArray(o))
1334
1334
  return n.issues.push({
@@ -1344,25 +1344,25 @@ const fo = /* @__PURE__ */ l("$ZodArray", (e, t) => {
1344
1344
  value: a,
1345
1345
  issues: []
1346
1346
  }, r);
1347
- c instanceof Promise ? i.push(c.then((u) => ft(u, n, s))) : ft(c, n, s);
1347
+ c instanceof Promise ? i.push(c.then((u) => dt(u, n, s))) : dt(c, n, s);
1348
1348
  }
1349
1349
  return i.length ? Promise.all(i).then(() => n) : n;
1350
1350
  };
1351
1351
  });
1352
- function Pe(e, t, n, r, o) {
1352
+ function xe(e, t, n, r, o) {
1353
1353
  if (e.issues.length) {
1354
1354
  if (o && !(n in r))
1355
1355
  return;
1356
- t.issues.push(...et(n, e.issues));
1356
+ t.issues.push(...tt(n, e.issues));
1357
1357
  }
1358
1358
  e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
1359
1359
  }
1360
- function nn(e) {
1360
+ function on(e) {
1361
1361
  const t = Object.keys(e.shape);
1362
1362
  for (const r of t)
1363
1363
  if (!e.shape?.[r]?._zod?.traits?.has("$ZodType"))
1364
1364
  throw new Error(`Invalid element at key "${r}": expected a Zod schema`);
1365
- const n = Nn(e.shape);
1365
+ const n = In(e.shape);
1366
1366
  return {
1367
1367
  ...e,
1368
1368
  keys: t,
@@ -1371,17 +1371,17 @@ function nn(e) {
1371
1371
  optionalKeys: new Set(n)
1372
1372
  };
1373
1373
  }
1374
- function rn(e, t, n, r, o, i) {
1374
+ function sn(e, t, n, r, o, i) {
1375
1375
  const s = [], a = o.keySet, c = o.catchall._zod, u = c.def.type, d = c.optout === "optional";
1376
- for (const m in t) {
1377
- if (a.has(m))
1376
+ for (const p in t) {
1377
+ if (a.has(p))
1378
1378
  continue;
1379
1379
  if (u === "never") {
1380
- s.push(m);
1380
+ s.push(p);
1381
1381
  continue;
1382
1382
  }
1383
- const p = c.run({ value: t[m], issues: [] }, r);
1384
- p instanceof Promise ? e.push(p.then((h) => Pe(h, n, m, t, d))) : Pe(p, n, m, t, d);
1383
+ const m = c.run({ value: t[p], issues: [] }, r);
1384
+ m instanceof Promise ? e.push(m.then((h) => xe(h, n, p, t, d))) : xe(m, n, p, t, d);
1385
1385
  }
1386
1386
  return s.length && n.issues.push({
1387
1387
  code: "unrecognized_keys",
@@ -1390,8 +1390,8 @@ function rn(e, t, n, r, o, i) {
1390
1390
  inst: i
1391
1391
  }), e.length ? Promise.all(e).then(() => n) : n;
1392
1392
  }
1393
- const po = /* @__PURE__ */ l("$ZodObject", (e, t) => {
1394
- if (N.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1393
+ const _o = /* @__PURE__ */ f("$ZodObject", (e, t) => {
1394
+ if (x.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1395
1395
  const a = t.shape;
1396
1396
  Object.defineProperty(t, "shape", {
1397
1397
  get: () => {
@@ -1402,15 +1402,15 @@ const po = /* @__PURE__ */ l("$ZodObject", (e, t) => {
1402
1402
  }
1403
1403
  });
1404
1404
  }
1405
- const r = Ke(() => nn(t));
1406
- w(e._zod, "propValues", () => {
1405
+ const r = Xe(() => on(t));
1406
+ k(e._zod, "propValues", () => {
1407
1407
  const a = t.shape, c = {};
1408
1408
  for (const u in a) {
1409
1409
  const d = a[u]._zod;
1410
1410
  if (d.values) {
1411
1411
  c[u] ?? (c[u] = /* @__PURE__ */ new Set());
1412
- for (const m of d.values)
1413
- c[u].add(m);
1412
+ for (const p of d.values)
1413
+ c[u].add(p);
1414
1414
  }
1415
1415
  }
1416
1416
  return c;
@@ -1428,102 +1428,102 @@ const po = /* @__PURE__ */ l("$ZodObject", (e, t) => {
1428
1428
  inst: e
1429
1429
  }), a;
1430
1430
  a.value = {};
1431
- const d = [], m = s.shape;
1432
- for (const p of s.keys) {
1433
- const h = m[p], Z = h._zod.optout === "optional", E = h._zod.run({ value: u[p], issues: [] }, c);
1434
- E instanceof Promise ? d.push(E.then((F) => Pe(F, a, p, u, Z))) : Pe(E, a, p, u, Z);
1431
+ const d = [], p = s.shape;
1432
+ for (const m of s.keys) {
1433
+ const h = p[m], S = h._zod.optout === "optional", Z = h._zod.run({ value: u[m], issues: [] }, c);
1434
+ Z instanceof Promise ? d.push(Z.then((A) => xe(A, a, m, u, S))) : xe(Z, a, m, u, S);
1435
1435
  }
1436
- return i ? rn(d, u, a, c, r.value, e) : d.length ? Promise.all(d).then(() => a) : a;
1436
+ return i ? sn(d, u, a, c, r.value, e) : d.length ? Promise.all(d).then(() => a) : a;
1437
1437
  };
1438
- }), mo = /* @__PURE__ */ l("$ZodObjectJIT", (e, t) => {
1439
- po.init(e, t);
1440
- const n = e._zod.parse, r = Ke(() => nn(t)), o = (p) => {
1441
- const h = new Ir(["shape", "payload", "ctx"]), Z = r.value, E = (T) => {
1442
- const b = ut(T);
1438
+ }), vo = /* @__PURE__ */ f("$ZodObjectJIT", (e, t) => {
1439
+ _o.init(e, t);
1440
+ const n = e._zod.parse, r = Xe(() => on(t)), o = (m) => {
1441
+ const h = new Fr(["shape", "payload", "ctx"]), S = r.value, Z = (j) => {
1442
+ const b = lt(j);
1443
1443
  return `shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`;
1444
1444
  };
1445
1445
  h.write("const input = payload.value;");
1446
- const F = /* @__PURE__ */ Object.create(null);
1447
- let U = 0;
1448
- for (const T of Z.keys)
1449
- F[T] = `key_${U++}`;
1446
+ const A = /* @__PURE__ */ Object.create(null);
1447
+ let W = 0;
1448
+ for (const j of S.keys)
1449
+ A[j] = `key_${W++}`;
1450
1450
  h.write("const newResult = {};");
1451
- for (const T of Z.keys) {
1452
- const b = F[T], v = ut(T), K = p[T]?._zod?.optout === "optional";
1453
- h.write(`const ${b} = ${E(T)};`), K ? h.write(`
1451
+ for (const j of S.keys) {
1452
+ const b = A[j], $ = lt(j), M = m[j]?._zod?.optout === "optional";
1453
+ h.write(`const ${b} = ${Z(j)};`), M ? h.write(`
1454
1454
  if (${b}.issues.length) {
1455
- if (${v} in input) {
1455
+ if (${$} in input) {
1456
1456
  payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
1457
1457
  ...iss,
1458
- path: iss.path ? [${v}, ...iss.path] : [${v}]
1458
+ path: iss.path ? [${$}, ...iss.path] : [${$}]
1459
1459
  })));
1460
1460
  }
1461
1461
  }
1462
1462
 
1463
1463
  if (${b}.value === undefined) {
1464
- if (${v} in input) {
1465
- newResult[${v}] = undefined;
1464
+ if (${$} in input) {
1465
+ newResult[${$}] = undefined;
1466
1466
  }
1467
1467
  } else {
1468
- newResult[${v}] = ${b}.value;
1468
+ newResult[${$}] = ${b}.value;
1469
1469
  }
1470
1470
 
1471
1471
  `) : h.write(`
1472
1472
  if (${b}.issues.length) {
1473
1473
  payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
1474
1474
  ...iss,
1475
- path: iss.path ? [${v}, ...iss.path] : [${v}]
1475
+ path: iss.path ? [${$}, ...iss.path] : [${$}]
1476
1476
  })));
1477
1477
  }
1478
1478
 
1479
1479
  if (${b}.value === undefined) {
1480
- if (${v} in input) {
1481
- newResult[${v}] = undefined;
1480
+ if (${$} in input) {
1481
+ newResult[${$}] = undefined;
1482
1482
  }
1483
1483
  } else {
1484
- newResult[${v}] = ${b}.value;
1484
+ newResult[${$}] = ${b}.value;
1485
1485
  }
1486
1486
 
1487
1487
  `);
1488
1488
  }
1489
1489
  h.write("payload.value = newResult;"), h.write("return payload;");
1490
- const V = h.compile();
1491
- return (T, b) => V(p, T, b);
1490
+ const H = h.compile();
1491
+ return (j, b) => H(m, j, b);
1492
1492
  };
1493
1493
  let i;
1494
- const s = Ne, a = !Dt.jitless, u = a && Tn.value, d = t.catchall;
1495
- let m;
1496
- e._zod.parse = (p, h) => {
1497
- m ?? (m = r.value);
1498
- const Z = p.value;
1499
- return s(Z) ? a && u && h?.async === !1 && h.jitless !== !0 ? (i || (i = o(t.shape)), p = i(p, h), d ? rn([], Z, p, h, m, e) : p) : n(p, h) : (p.issues.push({
1494
+ const s = Ne, a = !Jt.jitless, u = a && Pn.value, d = t.catchall;
1495
+ let p;
1496
+ e._zod.parse = (m, h) => {
1497
+ p ?? (p = r.value);
1498
+ const S = m.value;
1499
+ return s(S) ? a && u && h?.async === !1 && h.jitless !== !0 ? (i || (i = o(t.shape)), m = i(m, h), d ? sn([], S, m, h, p, e) : m) : n(m, h) : (m.issues.push({
1500
1500
  expected: "object",
1501
1501
  code: "invalid_type",
1502
- input: Z,
1502
+ input: S,
1503
1503
  inst: e
1504
- }), p);
1504
+ }), m);
1505
1505
  };
1506
1506
  });
1507
- function dt(e, t, n, r) {
1507
+ function pt(e, t, n, r) {
1508
1508
  for (const i of e)
1509
1509
  if (i.issues.length === 0)
1510
1510
  return t.value = i.value, t;
1511
- const o = e.filter((i) => !de(i));
1511
+ const o = e.filter((i) => !le(i));
1512
1512
  return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
1513
1513
  code: "invalid_union",
1514
1514
  input: t.value,
1515
1515
  inst: n,
1516
- errors: e.map((i) => i.issues.map((s) => ae(s, r, se())))
1516
+ errors: e.map((i) => i.issues.map((s) => se(s, r, ie())))
1517
1517
  }), t);
1518
1518
  }
1519
- const ho = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
1520
- N.init(e, t), w(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), w(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), w(e._zod, "values", () => {
1519
+ const yo = /* @__PURE__ */ f("$ZodUnion", (e, t) => {
1520
+ x.init(e, t), k(e._zod, "optin", () => t.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), k(e._zod, "optout", () => t.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), k(e._zod, "values", () => {
1521
1521
  if (t.options.every((o) => o._zod.values))
1522
1522
  return new Set(t.options.flatMap((o) => Array.from(o._zod.values)));
1523
- }), w(e._zod, "pattern", () => {
1523
+ }), k(e._zod, "pattern", () => {
1524
1524
  if (t.options.every((o) => o._zod.pattern)) {
1525
1525
  const o = t.options.map((i) => i._zod.pattern);
1526
- return new RegExp(`^(${o.map((i) => Qe(i.source)).join("|")})$`);
1526
+ return new RegExp(`^(${o.map((i) => et(i.source)).join("|")})$`);
1527
1527
  }
1528
1528
  });
1529
1529
  const n = t.options.length === 1, r = t.options[0]._zod.run;
@@ -1545,15 +1545,15 @@ const ho = /* @__PURE__ */ l("$ZodUnion", (e, t) => {
1545
1545
  a.push(u);
1546
1546
  }
1547
1547
  }
1548
- return s ? Promise.all(a).then((c) => dt(c, o, e, i)) : dt(a, o, e, i);
1548
+ return s ? Promise.all(a).then((c) => pt(c, o, e, i)) : pt(a, o, e, i);
1549
1549
  };
1550
- }), go = /* @__PURE__ */ l("$ZodIntersection", (e, t) => {
1551
- N.init(e, t), e._zod.parse = (n, r) => {
1550
+ }), bo = /* @__PURE__ */ f("$ZodIntersection", (e, t) => {
1551
+ x.init(e, t), e._zod.parse = (n, r) => {
1552
1552
  const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), s = t.right._zod.run({ value: o, issues: [] }, r);
1553
- return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([c, u]) => pt(n, c, u)) : pt(n, i, s);
1553
+ return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([c, u]) => mt(n, c, u)) : mt(n, i, s);
1554
1554
  };
1555
1555
  });
1556
- function qe(e, t) {
1556
+ function Ge(e, t) {
1557
1557
  if (e === t)
1558
1558
  return { valid: !0, data: e };
1559
1559
  if (e instanceof Date && t instanceof Date && +e == +t)
@@ -1561,7 +1561,7 @@ function qe(e, t) {
1561
1561
  if (ze(e) && ze(t)) {
1562
1562
  const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
1563
1563
  for (const i of r) {
1564
- const s = qe(e[i], t[i]);
1564
+ const s = Ge(e[i], t[i]);
1565
1565
  if (!s.valid)
1566
1566
  return {
1567
1567
  valid: !1,
@@ -1576,7 +1576,7 @@ function qe(e, t) {
1576
1576
  return { valid: !1, mergeErrorPath: [] };
1577
1577
  const n = [];
1578
1578
  for (let r = 0; r < e.length; r++) {
1579
- const o = e[r], i = t[r], s = qe(o, i);
1579
+ const o = e[r], i = t[r], s = Ge(o, i);
1580
1580
  if (!s.valid)
1581
1581
  return {
1582
1582
  valid: !1,
@@ -1588,7 +1588,7 @@ function qe(e, t) {
1588
1588
  }
1589
1589
  return { valid: !1, mergeErrorPath: [] };
1590
1590
  }
1591
- function pt(e, t, n) {
1591
+ function mt(e, t, n) {
1592
1592
  const r = /* @__PURE__ */ new Map();
1593
1593
  let o;
1594
1594
  for (const a of t.issues)
@@ -1605,15 +1605,15 @@ function pt(e, t, n) {
1605
1605
  else
1606
1606
  e.issues.push(a);
1607
1607
  const i = [...r].filter(([, a]) => a.l && a.r).map(([a]) => a);
1608
- if (i.length && o && e.issues.push({ ...o, keys: i }), de(e))
1608
+ if (i.length && o && e.issues.push({ ...o, keys: i }), le(e))
1609
1609
  return e;
1610
- const s = qe(t.value, n.value);
1610
+ const s = Ge(t.value, n.value);
1611
1611
  if (!s.valid)
1612
1612
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(s.mergeErrorPath)}`);
1613
1613
  return e.value = s.data, e;
1614
1614
  }
1615
- const _o = /* @__PURE__ */ l("$ZodTuple", (e, t) => {
1616
- N.init(e, t);
1615
+ const wo = /* @__PURE__ */ f("$ZodTuple", (e, t) => {
1616
+ x.init(e, t);
1617
1617
  const n = t.items;
1618
1618
  e._zod.parse = (r, o) => {
1619
1619
  const i = r.value;
@@ -1627,8 +1627,8 @@ const _o = /* @__PURE__ */ l("$ZodTuple", (e, t) => {
1627
1627
  r.value = [];
1628
1628
  const s = [], a = [...n].reverse().findIndex((d) => d._zod.optin !== "optional"), c = a === -1 ? 0 : n.length - a;
1629
1629
  if (!t.rest) {
1630
- const d = i.length > n.length, m = i.length < c - 1;
1631
- if (d || m)
1630
+ const d = i.length > n.length, p = i.length < c - 1;
1631
+ if (d || p)
1632
1632
  return r.issues.push({
1633
1633
  ...d ? { code: "too_big", maximum: n.length, inclusive: !0 } : { code: "too_small", minimum: n.length },
1634
1634
  input: i,
@@ -1640,33 +1640,33 @@ const _o = /* @__PURE__ */ l("$ZodTuple", (e, t) => {
1640
1640
  for (const d of n) {
1641
1641
  if (u++, u >= i.length && u >= c)
1642
1642
  continue;
1643
- const m = d._zod.run({
1643
+ const p = d._zod.run({
1644
1644
  value: i[u],
1645
1645
  issues: []
1646
1646
  }, o);
1647
- m instanceof Promise ? s.push(m.then((p) => Ze(p, r, u))) : Ze(m, r, u);
1647
+ p instanceof Promise ? s.push(p.then((m) => Ze(m, r, u))) : Ze(p, r, u);
1648
1648
  }
1649
1649
  if (t.rest) {
1650
1650
  const d = i.slice(n.length);
1651
- for (const m of d) {
1651
+ for (const p of d) {
1652
1652
  u++;
1653
- const p = t.rest._zod.run({
1654
- value: m,
1653
+ const m = t.rest._zod.run({
1654
+ value: p,
1655
1655
  issues: []
1656
1656
  }, o);
1657
- p instanceof Promise ? s.push(p.then((h) => Ze(h, r, u))) : Ze(p, r, u);
1657
+ m instanceof Promise ? s.push(m.then((h) => Ze(h, r, u))) : Ze(m, r, u);
1658
1658
  }
1659
1659
  }
1660
1660
  return s.length ? Promise.all(s).then(() => r) : r;
1661
1661
  };
1662
1662
  });
1663
1663
  function Ze(e, t, n) {
1664
- e.issues.length && t.issues.push(...et(n, e.issues)), t.value[n] = e.value;
1664
+ e.issues.length && t.issues.push(...tt(n, e.issues)), t.value[n] = e.value;
1665
1665
  }
1666
- const vo = /* @__PURE__ */ l("$ZodEnum", (e, t) => {
1667
- N.init(e, t);
1668
- const n = Ut(t.entries), r = new Set(n);
1669
- e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => jn.has(typeof o)).map((o) => typeof o == "string" ? Ae(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
1666
+ const zo = /* @__PURE__ */ f("$ZodEnum", (e, t) => {
1667
+ x.init(e, t);
1668
+ const n = Vt(t.entries), r = new Set(n);
1669
+ e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => Cn.has(typeof o)).map((o) => typeof o == "string" ? Ae(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
1670
1670
  const s = o.value;
1671
1671
  return r.has(s) || o.issues.push({
1672
1672
  code: "invalid_value",
@@ -1675,64 +1675,64 @@ const vo = /* @__PURE__ */ l("$ZodEnum", (e, t) => {
1675
1675
  inst: e
1676
1676
  }), o;
1677
1677
  };
1678
- }), yo = /* @__PURE__ */ l("$ZodTransform", (e, t) => {
1679
- N.init(e, t), e._zod.parse = (n, r) => {
1678
+ }), ko = /* @__PURE__ */ f("$ZodTransform", (e, t) => {
1679
+ x.init(e, t), e._zod.parse = (n, r) => {
1680
1680
  if (r.direction === "backward")
1681
- throw new Lt(e.constructor.name);
1681
+ throw new Ut(e.constructor.name);
1682
1682
  const o = t.transform(n.value, n);
1683
1683
  if (r.async)
1684
1684
  return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (n.value = s, n));
1685
1685
  if (o instanceof Promise)
1686
- throw new pe();
1686
+ throw new fe();
1687
1687
  return n.value = o, n;
1688
1688
  };
1689
1689
  });
1690
- function mt(e, t) {
1690
+ function ht(e, t) {
1691
1691
  return e.issues.length && t === void 0 ? { issues: [], value: void 0 } : e;
1692
1692
  }
1693
- const on = /* @__PURE__ */ l("$ZodOptional", (e, t) => {
1694
- N.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", w(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), w(e._zod, "pattern", () => {
1693
+ const an = /* @__PURE__ */ f("$ZodOptional", (e, t) => {
1694
+ x.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", k(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), k(e._zod, "pattern", () => {
1695
1695
  const n = t.innerType._zod.pattern;
1696
- return n ? new RegExp(`^(${Qe(n.source)})?$`) : void 0;
1696
+ return n ? new RegExp(`^(${et(n.source)})?$`) : void 0;
1697
1697
  }), e._zod.parse = (n, r) => {
1698
1698
  if (t.innerType._zod.optin === "optional") {
1699
1699
  const o = t.innerType._zod.run(n, r);
1700
- return o instanceof Promise ? o.then((i) => mt(i, n.value)) : mt(o, n.value);
1700
+ return o instanceof Promise ? o.then((i) => ht(i, n.value)) : ht(o, n.value);
1701
1701
  }
1702
1702
  return n.value === void 0 ? n : t.innerType._zod.run(n, r);
1703
1703
  };
1704
- }), bo = /* @__PURE__ */ l("$ZodExactOptional", (e, t) => {
1705
- on.init(e, t), w(e._zod, "values", () => t.innerType._zod.values), w(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
1706
- }), wo = /* @__PURE__ */ l("$ZodNullable", (e, t) => {
1707
- N.init(e, t), w(e._zod, "optin", () => t.innerType._zod.optin), w(e._zod, "optout", () => t.innerType._zod.optout), w(e._zod, "pattern", () => {
1704
+ }), So = /* @__PURE__ */ f("$ZodExactOptional", (e, t) => {
1705
+ an.init(e, t), k(e._zod, "values", () => t.innerType._zod.values), k(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (n, r) => t.innerType._zod.run(n, r);
1706
+ }), $o = /* @__PURE__ */ f("$ZodNullable", (e, t) => {
1707
+ x.init(e, t), k(e._zod, "optin", () => t.innerType._zod.optin), k(e._zod, "optout", () => t.innerType._zod.optout), k(e._zod, "pattern", () => {
1708
1708
  const n = t.innerType._zod.pattern;
1709
- return n ? new RegExp(`^(${Qe(n.source)}|null)$`) : void 0;
1710
- }), w(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);
1711
- }), zo = /* @__PURE__ */ l("$ZodDefault", (e, t) => {
1712
- N.init(e, t), e._zod.optin = "optional", w(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1709
+ return n ? new RegExp(`^(${et(n.source)}|null)$`) : void 0;
1710
+ }), k(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);
1711
+ }), Eo = /* @__PURE__ */ f("$ZodDefault", (e, t) => {
1712
+ x.init(e, t), e._zod.optin = "optional", k(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1713
1713
  if (r.direction === "backward")
1714
1714
  return t.innerType._zod.run(n, r);
1715
1715
  if (n.value === void 0)
1716
1716
  return n.value = t.defaultValue, n;
1717
1717
  const o = t.innerType._zod.run(n, r);
1718
- return o instanceof Promise ? o.then((i) => ht(i, t)) : ht(o, t);
1718
+ return o instanceof Promise ? o.then((i) => gt(i, t)) : gt(o, t);
1719
1719
  };
1720
1720
  });
1721
- function ht(e, t) {
1721
+ function gt(e, t) {
1722
1722
  return e.value === void 0 && (e.value = t.defaultValue), e;
1723
1723
  }
1724
- const ko = /* @__PURE__ */ l("$ZodPrefault", (e, t) => {
1725
- N.init(e, t), e._zod.optin = "optional", w(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));
1726
- }), So = /* @__PURE__ */ l("$ZodNonOptional", (e, t) => {
1727
- N.init(e, t), w(e._zod, "values", () => {
1724
+ const Oo = /* @__PURE__ */ f("$ZodPrefault", (e, t) => {
1725
+ x.init(e, t), e._zod.optin = "optional", k(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));
1726
+ }), Zo = /* @__PURE__ */ f("$ZodNonOptional", (e, t) => {
1727
+ x.init(e, t), k(e._zod, "values", () => {
1728
1728
  const n = t.innerType._zod.values;
1729
1729
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
1730
1730
  }), e._zod.parse = (n, r) => {
1731
1731
  const o = t.innerType._zod.run(n, r);
1732
- return o instanceof Promise ? o.then((i) => gt(i, e)) : gt(o, e);
1732
+ return o instanceof Promise ? o.then((i) => _t(i, e)) : _t(o, e);
1733
1733
  };
1734
1734
  });
1735
- function gt(e, t) {
1735
+ function _t(e, t) {
1736
1736
  return !e.issues.length && e.value === void 0 && e.issues.push({
1737
1737
  code: "invalid_type",
1738
1738
  expected: "nonoptional",
@@ -1740,58 +1740,58 @@ function gt(e, t) {
1740
1740
  inst: t
1741
1741
  }), e;
1742
1742
  }
1743
- const $o = /* @__PURE__ */ l("$ZodCatch", (e, t) => {
1744
- N.init(e, t), w(e._zod, "optin", () => t.innerType._zod.optin), w(e._zod, "optout", () => t.innerType._zod.optout), w(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1743
+ const jo = /* @__PURE__ */ f("$ZodCatch", (e, t) => {
1744
+ x.init(e, t), k(e._zod, "optin", () => t.innerType._zod.optin), k(e._zod, "optout", () => t.innerType._zod.optout), k(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1745
1745
  if (r.direction === "backward")
1746
1746
  return t.innerType._zod.run(n, r);
1747
1747
  const o = t.innerType._zod.run(n, r);
1748
1748
  return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
1749
1749
  ...n,
1750
1750
  error: {
1751
- issues: i.issues.map((s) => ae(s, r, se()))
1751
+ issues: i.issues.map((s) => se(s, r, ie()))
1752
1752
  },
1753
1753
  input: n.value
1754
1754
  }), n.issues = []), n)) : (n.value = o.value, o.issues.length && (n.value = t.catchValue({
1755
1755
  ...n,
1756
1756
  error: {
1757
- issues: o.issues.map((i) => ae(i, r, se()))
1757
+ issues: o.issues.map((i) => se(i, r, ie()))
1758
1758
  },
1759
1759
  input: n.value
1760
1760
  }), n.issues = []), n);
1761
1761
  };
1762
- }), Eo = /* @__PURE__ */ l("$ZodPipe", (e, t) => {
1763
- N.init(e, t), w(e._zod, "values", () => t.in._zod.values), w(e._zod, "optin", () => t.in._zod.optin), w(e._zod, "optout", () => t.out._zod.optout), w(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1762
+ }), To = /* @__PURE__ */ f("$ZodPipe", (e, t) => {
1763
+ x.init(e, t), k(e._zod, "values", () => t.in._zod.values), k(e._zod, "optin", () => t.in._zod.optin), k(e._zod, "optout", () => t.out._zod.optout), k(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1764
1764
  if (r.direction === "backward") {
1765
1765
  const i = t.out._zod.run(n, r);
1766
- return i instanceof Promise ? i.then((s) => Te(s, t.in, r)) : Te(i, t.in, r);
1766
+ return i instanceof Promise ? i.then((s) => je(s, t.in, r)) : je(i, t.in, r);
1767
1767
  }
1768
1768
  const o = t.in._zod.run(n, r);
1769
- return o instanceof Promise ? o.then((i) => Te(i, t.out, r)) : Te(o, t.out, r);
1769
+ return o instanceof Promise ? o.then((i) => je(i, t.out, r)) : je(o, t.out, r);
1770
1770
  };
1771
1771
  });
1772
- function Te(e, t, n) {
1772
+ function je(e, t, n) {
1773
1773
  return e.issues.length ? (e.aborted = !0, e) : t._zod.run({ value: e.value, issues: e.issues }, n);
1774
1774
  }
1775
- const Oo = /* @__PURE__ */ l("$ZodReadonly", (e, t) => {
1776
- N.init(e, t), w(e._zod, "propValues", () => t.innerType._zod.propValues), w(e._zod, "values", () => t.innerType._zod.values), w(e._zod, "optin", () => t.innerType?._zod?.optin), w(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
1775
+ const No = /* @__PURE__ */ f("$ZodReadonly", (e, t) => {
1776
+ x.init(e, t), k(e._zod, "propValues", () => t.innerType._zod.propValues), k(e._zod, "values", () => t.innerType._zod.values), k(e._zod, "optin", () => t.innerType?._zod?.optin), k(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (n, r) => {
1777
1777
  if (r.direction === "backward")
1778
1778
  return t.innerType._zod.run(n, r);
1779
1779
  const o = t.innerType._zod.run(n, r);
1780
- return o instanceof Promise ? o.then(_t) : _t(o);
1780
+ return o instanceof Promise ? o.then(vt) : vt(o);
1781
1781
  };
1782
1782
  });
1783
- function _t(e) {
1783
+ function vt(e) {
1784
1784
  return e.value = Object.freeze(e.value), e;
1785
1785
  }
1786
- const Zo = /* @__PURE__ */ l("$ZodCustom", (e, t) => {
1787
- L.init(e, t), N.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1786
+ const xo = /* @__PURE__ */ f("$ZodCustom", (e, t) => {
1787
+ L.init(e, t), x.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1788
1788
  const r = n.value, o = t.fn(r);
1789
1789
  if (o instanceof Promise)
1790
- return o.then((i) => vt(i, n, r, e));
1791
- vt(o, n, r, e);
1790
+ return o.then((i) => yt(i, n, r, e));
1791
+ yt(o, n, r, e);
1792
1792
  };
1793
1793
  });
1794
- function vt(e, t, n, r) {
1794
+ function yt(e, t, n, r) {
1795
1795
  if (!e) {
1796
1796
  const o = {
1797
1797
  code: "custom",
@@ -1806,8 +1806,8 @@ function vt(e, t, n, r) {
1806
1806
  r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(ke(o));
1807
1807
  }
1808
1808
  }
1809
- var yt;
1810
- class To {
1809
+ var bt;
1810
+ class Po {
1811
1811
  constructor() {
1812
1812
  this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1813
1813
  }
@@ -1836,20 +1836,20 @@ class To {
1836
1836
  return this._map.has(t);
1837
1837
  }
1838
1838
  }
1839
- function jo() {
1840
- return new To();
1839
+ function Co() {
1840
+ return new Po();
1841
1841
  }
1842
- (yt = globalThis).__zod_globalRegistry ?? (yt.__zod_globalRegistry = jo());
1842
+ (bt = globalThis).__zod_globalRegistry ?? (bt.__zod_globalRegistry = Co());
1843
1843
  const we = globalThis.__zod_globalRegistry;
1844
1844
  // @__NO_SIDE_EFFECTS__
1845
- function No(e, t) {
1845
+ function Io(e, t) {
1846
1846
  return new e({
1847
1847
  type: "string",
1848
1848
  ...g(t)
1849
1849
  });
1850
1850
  }
1851
1851
  // @__NO_SIDE_EFFECTS__
1852
- function Po(e, t) {
1852
+ function Ro(e, t) {
1853
1853
  return new e({
1854
1854
  type: "string",
1855
1855
  format: "email",
@@ -1859,7 +1859,7 @@ function Po(e, t) {
1859
1859
  });
1860
1860
  }
1861
1861
  // @__NO_SIDE_EFFECTS__
1862
- function bt(e, t) {
1862
+ function wt(e, t) {
1863
1863
  return new e({
1864
1864
  type: "string",
1865
1865
  format: "guid",
@@ -1869,7 +1869,7 @@ function bt(e, t) {
1869
1869
  });
1870
1870
  }
1871
1871
  // @__NO_SIDE_EFFECTS__
1872
- function xo(e, t) {
1872
+ function Ao(e, t) {
1873
1873
  return new e({
1874
1874
  type: "string",
1875
1875
  format: "uuid",
@@ -1879,7 +1879,7 @@ function xo(e, t) {
1879
1879
  });
1880
1880
  }
1881
1881
  // @__NO_SIDE_EFFECTS__
1882
- function Co(e, t) {
1882
+ function Mo(e, t) {
1883
1883
  return new e({
1884
1884
  type: "string",
1885
1885
  format: "uuid",
@@ -1890,7 +1890,7 @@ function Co(e, t) {
1890
1890
  });
1891
1891
  }
1892
1892
  // @__NO_SIDE_EFFECTS__
1893
- function Io(e, t) {
1893
+ function Fo(e, t) {
1894
1894
  return new e({
1895
1895
  type: "string",
1896
1896
  format: "uuid",
@@ -1901,7 +1901,7 @@ function Io(e, t) {
1901
1901
  });
1902
1902
  }
1903
1903
  // @__NO_SIDE_EFFECTS__
1904
- function Ro(e, t) {
1904
+ function Lo(e, t) {
1905
1905
  return new e({
1906
1906
  type: "string",
1907
1907
  format: "uuid",
@@ -1912,7 +1912,7 @@ function Ro(e, t) {
1912
1912
  });
1913
1913
  }
1914
1914
  // @__NO_SIDE_EFFECTS__
1915
- function Ao(e, t) {
1915
+ function Do(e, t) {
1916
1916
  return new e({
1917
1917
  type: "string",
1918
1918
  format: "url",
@@ -1922,7 +1922,7 @@ function Ao(e, t) {
1922
1922
  });
1923
1923
  }
1924
1924
  // @__NO_SIDE_EFFECTS__
1925
- function Fo(e, t) {
1925
+ function Uo(e, t) {
1926
1926
  return new e({
1927
1927
  type: "string",
1928
1928
  format: "emoji",
@@ -1932,7 +1932,7 @@ function Fo(e, t) {
1932
1932
  });
1933
1933
  }
1934
1934
  // @__NO_SIDE_EFFECTS__
1935
- function Mo(e, t) {
1935
+ function Jo(e, t) {
1936
1936
  return new e({
1937
1937
  type: "string",
1938
1938
  format: "nanoid",
@@ -1942,7 +1942,7 @@ function Mo(e, t) {
1942
1942
  });
1943
1943
  }
1944
1944
  // @__NO_SIDE_EFFECTS__
1945
- function Lo(e, t) {
1945
+ function Vo(e, t) {
1946
1946
  return new e({
1947
1947
  type: "string",
1948
1948
  format: "cuid",
@@ -1952,7 +1952,7 @@ function Lo(e, t) {
1952
1952
  });
1953
1953
  }
1954
1954
  // @__NO_SIDE_EFFECTS__
1955
- function Do(e, t) {
1955
+ function Wo(e, t) {
1956
1956
  return new e({
1957
1957
  type: "string",
1958
1958
  format: "cuid2",
@@ -1962,7 +1962,7 @@ function Do(e, t) {
1962
1962
  });
1963
1963
  }
1964
1964
  // @__NO_SIDE_EFFECTS__
1965
- function Uo(e, t) {
1965
+ function Yo(e, t) {
1966
1966
  return new e({
1967
1967
  type: "string",
1968
1968
  format: "ulid",
@@ -1972,7 +1972,7 @@ function Uo(e, t) {
1972
1972
  });
1973
1973
  }
1974
1974
  // @__NO_SIDE_EFFECTS__
1975
- function Jo(e, t) {
1975
+ function Bo(e, t) {
1976
1976
  return new e({
1977
1977
  type: "string",
1978
1978
  format: "xid",
@@ -1982,7 +1982,7 @@ function Jo(e, t) {
1982
1982
  });
1983
1983
  }
1984
1984
  // @__NO_SIDE_EFFECTS__
1985
- function Vo(e, t) {
1985
+ function qo(e, t) {
1986
1986
  return new e({
1987
1987
  type: "string",
1988
1988
  format: "ksuid",
@@ -1992,7 +1992,7 @@ function Vo(e, t) {
1992
1992
  });
1993
1993
  }
1994
1994
  // @__NO_SIDE_EFFECTS__
1995
- function Wo(e, t) {
1995
+ function Go(e, t) {
1996
1996
  return new e({
1997
1997
  type: "string",
1998
1998
  format: "ipv4",
@@ -2002,7 +2002,7 @@ function Wo(e, t) {
2002
2002
  });
2003
2003
  }
2004
2004
  // @__NO_SIDE_EFFECTS__
2005
- function Yo(e, t) {
2005
+ function Ho(e, t) {
2006
2006
  return new e({
2007
2007
  type: "string",
2008
2008
  format: "ipv6",
@@ -2012,7 +2012,7 @@ function Yo(e, t) {
2012
2012
  });
2013
2013
  }
2014
2014
  // @__NO_SIDE_EFFECTS__
2015
- function Bo(e, t) {
2015
+ function Ko(e, t) {
2016
2016
  return new e({
2017
2017
  type: "string",
2018
2018
  format: "cidrv4",
@@ -2022,7 +2022,7 @@ function Bo(e, t) {
2022
2022
  });
2023
2023
  }
2024
2024
  // @__NO_SIDE_EFFECTS__
2025
- function qo(e, t) {
2025
+ function Xo(e, t) {
2026
2026
  return new e({
2027
2027
  type: "string",
2028
2028
  format: "cidrv6",
@@ -2032,7 +2032,7 @@ function qo(e, t) {
2032
2032
  });
2033
2033
  }
2034
2034
  // @__NO_SIDE_EFFECTS__
2035
- function Go(e, t) {
2035
+ function Qo(e, t) {
2036
2036
  return new e({
2037
2037
  type: "string",
2038
2038
  format: "base64",
@@ -2042,7 +2042,7 @@ function Go(e, t) {
2042
2042
  });
2043
2043
  }
2044
2044
  // @__NO_SIDE_EFFECTS__
2045
- function Ho(e, t) {
2045
+ function ei(e, t) {
2046
2046
  return new e({
2047
2047
  type: "string",
2048
2048
  format: "base64url",
@@ -2052,7 +2052,7 @@ function Ho(e, t) {
2052
2052
  });
2053
2053
  }
2054
2054
  // @__NO_SIDE_EFFECTS__
2055
- function Ko(e, t) {
2055
+ function ti(e, t) {
2056
2056
  return new e({
2057
2057
  type: "string",
2058
2058
  format: "e164",
@@ -2062,7 +2062,7 @@ function Ko(e, t) {
2062
2062
  });
2063
2063
  }
2064
2064
  // @__NO_SIDE_EFFECTS__
2065
- function Xo(e, t) {
2065
+ function ni(e, t) {
2066
2066
  return new e({
2067
2067
  type: "string",
2068
2068
  format: "jwt",
@@ -2072,7 +2072,7 @@ function Xo(e, t) {
2072
2072
  });
2073
2073
  }
2074
2074
  // @__NO_SIDE_EFFECTS__
2075
- function Qo(e, t) {
2075
+ function ri(e, t) {
2076
2076
  return new e({
2077
2077
  type: "string",
2078
2078
  format: "datetime",
@@ -2084,7 +2084,7 @@ function Qo(e, t) {
2084
2084
  });
2085
2085
  }
2086
2086
  // @__NO_SIDE_EFFECTS__
2087
- function ei(e, t) {
2087
+ function oi(e, t) {
2088
2088
  return new e({
2089
2089
  type: "string",
2090
2090
  format: "date",
@@ -2093,7 +2093,7 @@ function ei(e, t) {
2093
2093
  });
2094
2094
  }
2095
2095
  // @__NO_SIDE_EFFECTS__
2096
- function ti(e, t) {
2096
+ function ii(e, t) {
2097
2097
  return new e({
2098
2098
  type: "string",
2099
2099
  format: "time",
@@ -2103,7 +2103,7 @@ function ti(e, t) {
2103
2103
  });
2104
2104
  }
2105
2105
  // @__NO_SIDE_EFFECTS__
2106
- function ni(e, t) {
2106
+ function si(e, t) {
2107
2107
  return new e({
2108
2108
  type: "string",
2109
2109
  format: "duration",
@@ -2112,7 +2112,7 @@ function ni(e, t) {
2112
2112
  });
2113
2113
  }
2114
2114
  // @__NO_SIDE_EFFECTS__
2115
- function ri(e, t) {
2115
+ function ai(e, t) {
2116
2116
  return new e({
2117
2117
  type: "number",
2118
2118
  checks: [],
@@ -2120,7 +2120,7 @@ function ri(e, t) {
2120
2120
  });
2121
2121
  }
2122
2122
  // @__NO_SIDE_EFFECTS__
2123
- function oi(e, t) {
2123
+ function ci(e, t) {
2124
2124
  return new e({
2125
2125
  type: "number",
2126
2126
  check: "number_format",
@@ -2130,21 +2130,21 @@ function oi(e, t) {
2130
2130
  });
2131
2131
  }
2132
2132
  // @__NO_SIDE_EFFECTS__
2133
- function ii(e) {
2133
+ function ui(e) {
2134
2134
  return new e({
2135
2135
  type: "unknown"
2136
2136
  });
2137
2137
  }
2138
2138
  // @__NO_SIDE_EFFECTS__
2139
- function si(e, t) {
2139
+ function li(e, t) {
2140
2140
  return new e({
2141
2141
  type: "never",
2142
2142
  ...g(t)
2143
2143
  });
2144
2144
  }
2145
2145
  // @__NO_SIDE_EFFECTS__
2146
- function wt(e, t) {
2147
- return new Xt({
2146
+ function zt(e, t) {
2147
+ return new en({
2148
2148
  check: "less_than",
2149
2149
  ...g(t),
2150
2150
  value: e,
@@ -2152,8 +2152,8 @@ function wt(e, t) {
2152
2152
  });
2153
2153
  }
2154
2154
  // @__NO_SIDE_EFFECTS__
2155
- function Ve(e, t) {
2156
- return new Xt({
2155
+ function We(e, t) {
2156
+ return new en({
2157
2157
  check: "less_than",
2158
2158
  ...g(t),
2159
2159
  value: e,
@@ -2161,8 +2161,8 @@ function Ve(e, t) {
2161
2161
  });
2162
2162
  }
2163
2163
  // @__NO_SIDE_EFFECTS__
2164
- function zt(e, t) {
2165
- return new Qt({
2164
+ function kt(e, t) {
2165
+ return new tn({
2166
2166
  check: "greater_than",
2167
2167
  ...g(t),
2168
2168
  value: e,
@@ -2170,8 +2170,8 @@ function zt(e, t) {
2170
2170
  });
2171
2171
  }
2172
2172
  // @__NO_SIDE_EFFECTS__
2173
- function We(e, t) {
2174
- return new Qt({
2173
+ function Ye(e, t) {
2174
+ return new tn({
2175
2175
  check: "greater_than",
2176
2176
  ...g(t),
2177
2177
  value: e,
@@ -2179,40 +2179,40 @@ function We(e, t) {
2179
2179
  });
2180
2180
  }
2181
2181
  // @__NO_SIDE_EFFECTS__
2182
- function kt(e, t) {
2183
- return new kr({
2182
+ function St(e, t) {
2183
+ return new Or({
2184
2184
  check: "multiple_of",
2185
2185
  ...g(t),
2186
2186
  value: e
2187
2187
  });
2188
2188
  }
2189
2189
  // @__NO_SIDE_EFFECTS__
2190
- function sn(e, t) {
2191
- return new $r({
2190
+ function cn(e, t) {
2191
+ return new jr({
2192
2192
  check: "max_length",
2193
2193
  ...g(t),
2194
2194
  maximum: e
2195
2195
  });
2196
2196
  }
2197
2197
  // @__NO_SIDE_EFFECTS__
2198
- function xe(e, t) {
2199
- return new Er({
2198
+ function Pe(e, t) {
2199
+ return new Tr({
2200
2200
  check: "min_length",
2201
2201
  ...g(t),
2202
2202
  minimum: e
2203
2203
  });
2204
2204
  }
2205
2205
  // @__NO_SIDE_EFFECTS__
2206
- function an(e, t) {
2207
- return new Or({
2206
+ function un(e, t) {
2207
+ return new Nr({
2208
2208
  check: "length_equals",
2209
2209
  ...g(t),
2210
2210
  length: e
2211
2211
  });
2212
2212
  }
2213
2213
  // @__NO_SIDE_EFFECTS__
2214
- function ai(e, t) {
2215
- return new Zr({
2214
+ function fi(e, t) {
2215
+ return new xr({
2216
2216
  check: "string_format",
2217
2217
  format: "regex",
2218
2218
  ...g(t),
@@ -2220,24 +2220,24 @@ function ai(e, t) {
2220
2220
  });
2221
2221
  }
2222
2222
  // @__NO_SIDE_EFFECTS__
2223
- function ci(e) {
2224
- return new Tr({
2223
+ function di(e) {
2224
+ return new Pr({
2225
2225
  check: "string_format",
2226
2226
  format: "lowercase",
2227
2227
  ...g(e)
2228
2228
  });
2229
2229
  }
2230
2230
  // @__NO_SIDE_EFFECTS__
2231
- function ui(e) {
2232
- return new jr({
2231
+ function pi(e) {
2232
+ return new Cr({
2233
2233
  check: "string_format",
2234
2234
  format: "uppercase",
2235
2235
  ...g(e)
2236
2236
  });
2237
2237
  }
2238
2238
  // @__NO_SIDE_EFFECTS__
2239
- function li(e, t) {
2240
- return new Nr({
2239
+ function mi(e, t) {
2240
+ return new Ir({
2241
2241
  check: "string_format",
2242
2242
  format: "includes",
2243
2243
  ...g(t),
@@ -2245,8 +2245,8 @@ function li(e, t) {
2245
2245
  });
2246
2246
  }
2247
2247
  // @__NO_SIDE_EFFECTS__
2248
- function fi(e, t) {
2249
- return new Pr({
2248
+ function hi(e, t) {
2249
+ return new Rr({
2250
2250
  check: "string_format",
2251
2251
  format: "starts_with",
2252
2252
  ...g(t),
@@ -2254,8 +2254,8 @@ function fi(e, t) {
2254
2254
  });
2255
2255
  }
2256
2256
  // @__NO_SIDE_EFFECTS__
2257
- function di(e, t) {
2258
- return new xr({
2257
+ function gi(e, t) {
2258
+ return new Ar({
2259
2259
  check: "string_format",
2260
2260
  format: "ends_with",
2261
2261
  ...g(t),
@@ -2263,34 +2263,34 @@ function di(e, t) {
2263
2263
  });
2264
2264
  }
2265
2265
  // @__NO_SIDE_EFFECTS__
2266
- function ge(e) {
2267
- return new Cr({
2266
+ function me(e) {
2267
+ return new Mr({
2268
2268
  check: "overwrite",
2269
2269
  tx: e
2270
2270
  });
2271
2271
  }
2272
2272
  // @__NO_SIDE_EFFECTS__
2273
- function pi(e) {
2274
- return /* @__PURE__ */ ge((t) => t.normalize(e));
2273
+ function _i(e) {
2274
+ return /* @__PURE__ */ me((t) => t.normalize(e));
2275
2275
  }
2276
2276
  // @__NO_SIDE_EFFECTS__
2277
- function mi() {
2278
- return /* @__PURE__ */ ge((e) => e.trim());
2277
+ function vi() {
2278
+ return /* @__PURE__ */ me((e) => e.trim());
2279
2279
  }
2280
2280
  // @__NO_SIDE_EFFECTS__
2281
- function hi() {
2282
- return /* @__PURE__ */ ge((e) => e.toLowerCase());
2281
+ function yi() {
2282
+ return /* @__PURE__ */ me((e) => e.toLowerCase());
2283
2283
  }
2284
2284
  // @__NO_SIDE_EFFECTS__
2285
- function gi() {
2286
- return /* @__PURE__ */ ge((e) => e.toUpperCase());
2285
+ function bi() {
2286
+ return /* @__PURE__ */ me((e) => e.toUpperCase());
2287
2287
  }
2288
2288
  // @__NO_SIDE_EFFECTS__
2289
- function _i() {
2290
- return /* @__PURE__ */ ge((e) => Zn(e));
2289
+ function wi() {
2290
+ return /* @__PURE__ */ me((e) => xn(e));
2291
2291
  }
2292
2292
  // @__NO_SIDE_EFFECTS__
2293
- function vi(e, t, n) {
2293
+ function zi(e, t, n) {
2294
2294
  return new e({
2295
2295
  type: "array",
2296
2296
  element: t,
@@ -2301,7 +2301,7 @@ function vi(e, t, n) {
2301
2301
  });
2302
2302
  }
2303
2303
  // @__NO_SIDE_EFFECTS__
2304
- function yi(e, t, n) {
2304
+ function ki(e, t, n) {
2305
2305
  return new e({
2306
2306
  type: "custom",
2307
2307
  check: "custom",
@@ -2310,8 +2310,8 @@ function yi(e, t, n) {
2310
2310
  });
2311
2311
  }
2312
2312
  // @__NO_SIDE_EFFECTS__
2313
- function bi(e) {
2314
- const t = /* @__PURE__ */ wi((n) => (n.addIssue = (r) => {
2313
+ function Si(e) {
2314
+ const t = /* @__PURE__ */ $i((n) => (n.addIssue = (r) => {
2315
2315
  if (typeof r == "string")
2316
2316
  n.issues.push(ke(r, n.value, t._zod.def));
2317
2317
  else {
@@ -2322,14 +2322,14 @@ function bi(e) {
2322
2322
  return t;
2323
2323
  }
2324
2324
  // @__NO_SIDE_EFFECTS__
2325
- function wi(e, t) {
2325
+ function $i(e, t) {
2326
2326
  const n = new L({
2327
2327
  check: "custom",
2328
2328
  ...g(t)
2329
2329
  });
2330
2330
  return n._zod.check = e, n;
2331
2331
  }
2332
- function cn(e) {
2332
+ function ln(e) {
2333
2333
  let t = e?.target ?? "draft-2020-12";
2334
2334
  return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2335
2335
  processors: e.processors ?? {},
@@ -2346,7 +2346,7 @@ function cn(e) {
2346
2346
  external: e?.external ?? void 0
2347
2347
  };
2348
2348
  }
2349
- function I(e, t, n = { path: [], schemaPath: [] }) {
2349
+ function C(e, t, n = { path: [], schemaPath: [] }) {
2350
2350
  var r;
2351
2351
  const o = e._zod.def, i = t.seen.get(e);
2352
2352
  if (i)
@@ -2365,18 +2365,18 @@ function I(e, t, n = { path: [], schemaPath: [] }) {
2365
2365
  if (e._zod.processJSONSchema)
2366
2366
  e._zod.processJSONSchema(t, s.schema, d);
2367
2367
  else {
2368
- const p = s.schema, h = t.processors[o.type];
2368
+ const m = s.schema, h = t.processors[o.type];
2369
2369
  if (!h)
2370
2370
  throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
2371
- h(e, t, p, d);
2371
+ h(e, t, m, d);
2372
2372
  }
2373
- const m = e._zod.parent;
2374
- m && (s.ref || (s.ref = m), I(m, t, d), t.seen.get(m).isParent = !0);
2373
+ const p = e._zod.parent;
2374
+ p && (s.ref || (s.ref = p), C(p, t, d), t.seen.get(p).isParent = !0);
2375
2375
  }
2376
2376
  const c = t.metadataRegistry.get(e);
2377
- return c && Object.assign(s.schema, c), t.io === "input" && A(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;
2377
+ return c && Object.assign(s.schema, c), t.io === "input" && R(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;
2378
2378
  }
2379
- function un(e, t) {
2379
+ function fn(e, t) {
2380
2380
  const n = e.seen.get(t);
2381
2381
  if (!n)
2382
2382
  throw new Error("Unprocessed schema. This is a bug in Zod.");
@@ -2393,11 +2393,11 @@ function un(e, t) {
2393
2393
  const o = (s) => {
2394
2394
  const a = e.target === "draft-2020-12" ? "$defs" : "definitions";
2395
2395
  if (e.external) {
2396
- const m = e.external.registry.get(s[0])?.id, p = e.external.uri ?? ((Z) => Z);
2397
- if (m)
2398
- return { ref: p(m) };
2396
+ const p = e.external.registry.get(s[0])?.id, m = e.external.uri ?? ((S) => S);
2397
+ if (p)
2398
+ return { ref: m(p) };
2399
2399
  const h = s[1].defId ?? s[1].schema.id ?? `schema${e.counter++}`;
2400
- return s[1].defId = h, { defId: h, ref: `${p("__shared")}#/${a}/${h}` };
2400
+ return s[1].defId = h, { defId: h, ref: `${m("__shared")}#/${a}/${h}` };
2401
2401
  }
2402
2402
  if (s[1] === n)
2403
2403
  return { ref: "#" };
@@ -2409,8 +2409,8 @@ function un(e, t) {
2409
2409
  const a = s[1], { ref: c, defId: u } = o(s);
2410
2410
  a.def = { ...a.schema }, u && (a.defId = u);
2411
2411
  const d = a.schema;
2412
- for (const m in d)
2413
- delete d[m];
2412
+ for (const p in d)
2413
+ delete d[p];
2414
2414
  d.$ref = c;
2415
2415
  };
2416
2416
  if (e.cycles === "throw")
@@ -2448,7 +2448,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
2448
2448
  }
2449
2449
  }
2450
2450
  }
2451
- function ln(e, t) {
2451
+ function dn(e, t) {
2452
2452
  const n = e.seen.get(t);
2453
2453
  if (!n)
2454
2454
  throw new Error("Unprocessed schema. This is a bug in Zod.");
@@ -2459,21 +2459,21 @@ function ln(e, t) {
2459
2459
  const c = a.def ?? a.schema, u = { ...c }, d = a.ref;
2460
2460
  if (a.ref = null, d) {
2461
2461
  r(d);
2462
- const p = e.seen.get(d), h = p.schema;
2462
+ const m = e.seen.get(d), h = m.schema;
2463
2463
  if (h.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (c.allOf = c.allOf ?? [], c.allOf.push(h)) : Object.assign(c, h), Object.assign(c, u), s._zod.parent === d)
2464
- for (const E in c)
2465
- E === "$ref" || E === "allOf" || E in u || delete c[E];
2466
- if (h.$ref && p.def)
2467
- for (const E in c)
2468
- E === "$ref" || E === "allOf" || E in p.def && JSON.stringify(c[E]) === JSON.stringify(p.def[E]) && delete c[E];
2469
- }
2470
- const m = s._zod.parent;
2471
- if (m && m !== d) {
2472
- r(m);
2473
- const p = e.seen.get(m);
2474
- if (p?.schema.$ref && (c.$ref = p.schema.$ref, p.def))
2464
+ for (const Z in c)
2465
+ Z === "$ref" || Z === "allOf" || Z in u || delete c[Z];
2466
+ if (h.$ref && m.def)
2467
+ for (const Z in c)
2468
+ Z === "$ref" || Z === "allOf" || Z in m.def && JSON.stringify(c[Z]) === JSON.stringify(m.def[Z]) && delete c[Z];
2469
+ }
2470
+ const p = s._zod.parent;
2471
+ if (p && p !== d) {
2472
+ r(p);
2473
+ const m = e.seen.get(p);
2474
+ if (m?.schema.$ref && (c.$ref = m.schema.$ref, m.def))
2475
2475
  for (const h in c)
2476
- h === "$ref" || h === "allOf" || h in p.def && JSON.stringify(c[h]) === JSON.stringify(p.def[h]) && delete c[h];
2476
+ h === "$ref" || h === "allOf" || h in m.def && JSON.stringify(c[h]) === JSON.stringify(m.def[h]) && delete c[h];
2477
2477
  }
2478
2478
  e.override({
2479
2479
  zodSchema: s,
@@ -2514,7 +2514,7 @@ function ln(e, t) {
2514
2514
  throw new Error("Error converting schema to JSON.");
2515
2515
  }
2516
2516
  }
2517
- function A(e, t) {
2517
+ function R(e, t) {
2518
2518
  const n = t ?? { seen: /* @__PURE__ */ new Set() };
2519
2519
  if (n.seen.has(e))
2520
2520
  return !1;
@@ -2523,89 +2523,89 @@ function A(e, t) {
2523
2523
  if (r.type === "transform")
2524
2524
  return !0;
2525
2525
  if (r.type === "array")
2526
- return A(r.element, n);
2526
+ return R(r.element, n);
2527
2527
  if (r.type === "set")
2528
- return A(r.valueType, n);
2528
+ return R(r.valueType, n);
2529
2529
  if (r.type === "lazy")
2530
- return A(r.getter(), n);
2530
+ return R(r.getter(), n);
2531
2531
  if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
2532
- return A(r.innerType, n);
2532
+ return R(r.innerType, n);
2533
2533
  if (r.type === "intersection")
2534
- return A(r.left, n) || A(r.right, n);
2534
+ return R(r.left, n) || R(r.right, n);
2535
2535
  if (r.type === "record" || r.type === "map")
2536
- return A(r.keyType, n) || A(r.valueType, n);
2536
+ return R(r.keyType, n) || R(r.valueType, n);
2537
2537
  if (r.type === "pipe")
2538
- return A(r.in, n) || A(r.out, n);
2538
+ return R(r.in, n) || R(r.out, n);
2539
2539
  if (r.type === "object") {
2540
2540
  for (const o in r.shape)
2541
- if (A(r.shape[o], n))
2541
+ if (R(r.shape[o], n))
2542
2542
  return !0;
2543
2543
  return !1;
2544
2544
  }
2545
2545
  if (r.type === "union") {
2546
2546
  for (const o of r.options)
2547
- if (A(o, n))
2547
+ if (R(o, n))
2548
2548
  return !0;
2549
2549
  return !1;
2550
2550
  }
2551
2551
  if (r.type === "tuple") {
2552
2552
  for (const o of r.items)
2553
- if (A(o, n))
2553
+ if (R(o, n))
2554
2554
  return !0;
2555
- return !!(r.rest && A(r.rest, n));
2555
+ return !!(r.rest && R(r.rest, n));
2556
2556
  }
2557
2557
  return !1;
2558
2558
  }
2559
- const zi = (e, t = {}) => (n) => {
2560
- const r = cn({ ...n, processors: t });
2561
- return I(e, r), un(r, e), ln(r, e);
2559
+ const Ei = (e, t = {}) => (n) => {
2560
+ const r = ln({ ...n, processors: t });
2561
+ return C(e, r), fn(r, e), dn(r, e);
2562
2562
  }, Ce = (e, t, n = {}) => (r) => {
2563
- const { libraryOptions: o, target: i } = r ?? {}, s = cn({ ...o ?? {}, target: i, io: t, processors: n });
2564
- return I(e, s), un(s, e), ln(s, e);
2565
- }, ki = {
2563
+ const { libraryOptions: o, target: i } = r ?? {}, s = ln({ ...o ?? {}, target: i, io: t, processors: n });
2564
+ return C(e, s), fn(s, e), dn(s, e);
2565
+ }, Oi = {
2566
2566
  guid: "uuid",
2567
2567
  url: "uri",
2568
2568
  datetime: "date-time",
2569
2569
  json_string: "json-string",
2570
2570
  regex: ""
2571
2571
  // do not set
2572
- }, Si = (e, t, n, r) => {
2572
+ }, Zi = (e, t, n, r) => {
2573
2573
  const o = n;
2574
2574
  o.type = "string";
2575
2575
  const { minimum: i, maximum: s, format: a, patterns: c, contentEncoding: u } = e._zod.bag;
2576
- if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), a && (o.format = ki[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), u && (o.contentEncoding = u), c && c.size > 0) {
2576
+ if (typeof i == "number" && (o.minLength = i), typeof s == "number" && (o.maxLength = s), a && (o.format = Oi[a] ?? a, o.format === "" && delete o.format, a === "time" && delete o.format), u && (o.contentEncoding = u), c && c.size > 0) {
2577
2577
  const d = [...c];
2578
2578
  d.length === 1 ? o.pattern = d[0].source : d.length > 1 && (o.allOf = [
2579
- ...d.map((m) => ({
2579
+ ...d.map((p) => ({
2580
2580
  ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
2581
- pattern: m.source
2581
+ pattern: p.source
2582
2582
  }))
2583
2583
  ]);
2584
2584
  }
2585
- }, $i = (e, t, n, r) => {
2585
+ }, ji = (e, t, n, r) => {
2586
2586
  const o = n, { minimum: i, maximum: s, format: a, multipleOf: c, exclusiveMaximum: u, exclusiveMinimum: d } = e._zod.bag;
2587
2587
  typeof a == "string" && a.includes("int") ? o.type = "integer" : o.type = "number", typeof d == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.minimum = d, o.exclusiveMinimum = !0) : o.exclusiveMinimum = d), typeof i == "number" && (o.minimum = i, typeof d == "number" && t.target !== "draft-04" && (d >= i ? delete o.minimum : delete o.exclusiveMinimum)), typeof u == "number" && (t.target === "draft-04" || t.target === "openapi-3.0" ? (o.maximum = u, o.exclusiveMaximum = !0) : o.exclusiveMaximum = u), typeof s == "number" && (o.maximum = s, typeof u == "number" && t.target !== "draft-04" && (u <= s ? delete o.maximum : delete o.exclusiveMaximum)), typeof c == "number" && (o.multipleOf = c);
2588
- }, Ei = (e, t, n, r) => {
2588
+ }, Ti = (e, t, n, r) => {
2589
2589
  n.not = {};
2590
- }, Oi = (e, t, n, r) => {
2591
- }, Zi = (e, t, n, r) => {
2592
- const o = e._zod.def, i = Ut(o.entries);
2590
+ }, Ni = (e, t, n, r) => {
2591
+ }, xi = (e, t, n, r) => {
2592
+ const o = e._zod.def, i = Vt(o.entries);
2593
2593
  i.every((s) => typeof s == "number") && (n.type = "number"), i.every((s) => typeof s == "string") && (n.type = "string"), n.enum = i;
2594
- }, Ti = (e, t, n, r) => {
2594
+ }, Pi = (e, t, n, r) => {
2595
2595
  if (t.unrepresentable === "throw")
2596
2596
  throw new Error("Custom types cannot be represented in JSON Schema");
2597
- }, ji = (e, t, n, r) => {
2597
+ }, Ci = (e, t, n, r) => {
2598
2598
  if (t.unrepresentable === "throw")
2599
2599
  throw new Error("Transforms cannot be represented in JSON Schema");
2600
- }, Ni = (e, t, n, r) => {
2600
+ }, Ii = (e, t, n, r) => {
2601
2601
  const o = n, i = e._zod.def, { minimum: s, maximum: a } = e._zod.bag;
2602
- typeof s == "number" && (o.minItems = s), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = I(i.element, t, { ...r, path: [...r.path, "items"] });
2603
- }, Pi = (e, t, n, r) => {
2602
+ typeof s == "number" && (o.minItems = s), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = C(i.element, t, { ...r, path: [...r.path, "items"] });
2603
+ }, Ri = (e, t, n, r) => {
2604
2604
  const o = n, i = e._zod.def;
2605
2605
  o.type = "object", o.properties = {};
2606
2606
  const s = i.shape;
2607
2607
  for (const u in s)
2608
- o.properties[u] = I(s[u], t, {
2608
+ o.properties[u] = C(s[u], t, {
2609
2609
  ...r,
2610
2610
  path: [...r.path, "properties", u]
2611
2611
  });
@@ -2613,21 +2613,21 @@ const zi = (e, t = {}) => (n) => {
2613
2613
  const d = i.shape[u]._zod;
2614
2614
  return t.io === "input" ? d.optin === void 0 : d.optout === void 0;
2615
2615
  }));
2616
- c.size > 0 && (o.required = Array.from(c)), i.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = I(i.catchall, t, {
2616
+ c.size > 0 && (o.required = Array.from(c)), i.catchall?._zod.def.type === "never" ? o.additionalProperties = !1 : i.catchall ? i.catchall && (o.additionalProperties = C(i.catchall, t, {
2617
2617
  ...r,
2618
2618
  path: [...r.path, "additionalProperties"]
2619
2619
  })) : t.io === "output" && (o.additionalProperties = !1);
2620
- }, xi = (e, t, n, r) => {
2621
- const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((a, c) => I(a, t, {
2620
+ }, Ai = (e, t, n, r) => {
2621
+ const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((a, c) => C(a, t, {
2622
2622
  ...r,
2623
2623
  path: [...r.path, i ? "oneOf" : "anyOf", c]
2624
2624
  }));
2625
2625
  i ? n.oneOf = s : n.anyOf = s;
2626
- }, Ci = (e, t, n, r) => {
2627
- const o = e._zod.def, i = I(o.left, t, {
2626
+ }, Mi = (e, t, n, r) => {
2627
+ const o = e._zod.def, i = C(o.left, t, {
2628
2628
  ...r,
2629
2629
  path: [...r.path, "allOf", 0]
2630
- }), s = I(o.right, t, {
2630
+ }), s = C(o.right, t, {
2631
2631
  ...r,
2632
2632
  path: [...r.path, "allOf", 1]
2633
2633
  }), a = (u) => "allOf" in u && Object.keys(u).length === 1, c = [
@@ -2635,42 +2635,42 @@ const zi = (e, t = {}) => (n) => {
2635
2635
  ...a(s) ? s.allOf : [s]
2636
2636
  ];
2637
2637
  n.allOf = c;
2638
- }, Ii = (e, t, n, r) => {
2638
+ }, Fi = (e, t, n, r) => {
2639
2639
  const o = n, i = e._zod.def;
2640
2640
  o.type = "array";
2641
- const s = t.target === "draft-2020-12" ? "prefixItems" : "items", a = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = i.items.map((p, h) => I(p, t, {
2641
+ const s = t.target === "draft-2020-12" ? "prefixItems" : "items", a = t.target === "draft-2020-12" || t.target === "openapi-3.0" ? "items" : "additionalItems", c = i.items.map((m, h) => C(m, t, {
2642
2642
  ...r,
2643
2643
  path: [...r.path, s, h]
2644
- })), u = i.rest ? I(i.rest, t, {
2644
+ })), u = i.rest ? C(i.rest, t, {
2645
2645
  ...r,
2646
2646
  path: [...r.path, a, ...t.target === "openapi-3.0" ? [i.items.length] : []]
2647
2647
  }) : null;
2648
2648
  t.target === "draft-2020-12" ? (o.prefixItems = c, u && (o.items = u)) : t.target === "openapi-3.0" ? (o.items = {
2649
2649
  anyOf: c
2650
2650
  }, u && o.items.anyOf.push(u), o.minItems = c.length, u || (o.maxItems = c.length)) : (o.items = c, u && (o.additionalItems = u));
2651
- const { minimum: d, maximum: m } = e._zod.bag;
2652
- typeof d == "number" && (o.minItems = d), typeof m == "number" && (o.maxItems = m);
2653
- }, Ri = (e, t, n, r) => {
2654
- const o = e._zod.def, i = I(o.innerType, t, r), s = t.seen.get(e);
2651
+ const { minimum: d, maximum: p } = e._zod.bag;
2652
+ typeof d == "number" && (o.minItems = d), typeof p == "number" && (o.maxItems = p);
2653
+ }, Li = (e, t, n, r) => {
2654
+ const o = e._zod.def, i = C(o.innerType, t, r), s = t.seen.get(e);
2655
2655
  t.target === "openapi-3.0" ? (s.ref = o.innerType, n.nullable = !0) : n.anyOf = [i, { type: "null" }];
2656
- }, Ai = (e, t, n, r) => {
2656
+ }, Di = (e, t, n, r) => {
2657
2657
  const o = e._zod.def;
2658
- I(o.innerType, t, r);
2658
+ C(o.innerType, t, r);
2659
2659
  const i = t.seen.get(e);
2660
2660
  i.ref = o.innerType;
2661
- }, Fi = (e, t, n, r) => {
2661
+ }, Ui = (e, t, n, r) => {
2662
2662
  const o = e._zod.def;
2663
- I(o.innerType, t, r);
2663
+ C(o.innerType, t, r);
2664
2664
  const i = t.seen.get(e);
2665
2665
  i.ref = o.innerType, n.default = JSON.parse(JSON.stringify(o.defaultValue));
2666
- }, Mi = (e, t, n, r) => {
2666
+ }, Ji = (e, t, n, r) => {
2667
2667
  const o = e._zod.def;
2668
- I(o.innerType, t, r);
2668
+ C(o.innerType, t, r);
2669
2669
  const i = t.seen.get(e);
2670
2670
  i.ref = o.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
2671
- }, Li = (e, t, n, r) => {
2671
+ }, Vi = (e, t, n, r) => {
2672
2672
  const o = e._zod.def;
2673
- I(o.innerType, t, r);
2673
+ C(o.innerType, t, r);
2674
2674
  const i = t.seen.get(e);
2675
2675
  i.ref = o.innerType;
2676
2676
  let s;
@@ -2680,64 +2680,64 @@ const zi = (e, t = {}) => (n) => {
2680
2680
  throw new Error("Dynamic catch values are not supported in JSON Schema");
2681
2681
  }
2682
2682
  n.default = s;
2683
- }, Di = (e, t, n, r) => {
2683
+ }, Wi = (e, t, n, r) => {
2684
2684
  const o = e._zod.def, i = t.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
2685
- I(i, t, r);
2685
+ C(i, t, r);
2686
2686
  const s = t.seen.get(e);
2687
2687
  s.ref = i;
2688
- }, Ui = (e, t, n, r) => {
2688
+ }, Yi = (e, t, n, r) => {
2689
2689
  const o = e._zod.def;
2690
- I(o.innerType, t, r);
2690
+ C(o.innerType, t, r);
2691
2691
  const i = t.seen.get(e);
2692
2692
  i.ref = o.innerType, n.readOnly = !0;
2693
- }, fn = (e, t, n, r) => {
2693
+ }, pn = (e, t, n, r) => {
2694
2694
  const o = e._zod.def;
2695
- I(o.innerType, t, r);
2695
+ C(o.innerType, t, r);
2696
2696
  const i = t.seen.get(e);
2697
2697
  i.ref = o.innerType;
2698
- }, Ji = /* @__PURE__ */ l("ZodISODateTime", (e, t) => {
2699
- qr.init(e, t), O.init(e, t);
2698
+ }, Bi = /* @__PURE__ */ f("ZodISODateTime", (e, t) => {
2699
+ Xr.init(e, t), N.init(e, t);
2700
2700
  });
2701
- function Vi(e) {
2702
- return /* @__PURE__ */ Qo(Ji, e);
2701
+ function qi(e) {
2702
+ return /* @__PURE__ */ ri(Bi, e);
2703
2703
  }
2704
- const Wi = /* @__PURE__ */ l("ZodISODate", (e, t) => {
2705
- Gr.init(e, t), O.init(e, t);
2704
+ const Gi = /* @__PURE__ */ f("ZodISODate", (e, t) => {
2705
+ Qr.init(e, t), N.init(e, t);
2706
2706
  });
2707
- function Yi(e) {
2708
- return /* @__PURE__ */ ei(Wi, e);
2707
+ function Hi(e) {
2708
+ return /* @__PURE__ */ oi(Gi, e);
2709
2709
  }
2710
- const Bi = /* @__PURE__ */ l("ZodISOTime", (e, t) => {
2711
- Hr.init(e, t), O.init(e, t);
2710
+ const Ki = /* @__PURE__ */ f("ZodISOTime", (e, t) => {
2711
+ eo.init(e, t), N.init(e, t);
2712
2712
  });
2713
- function qi(e) {
2714
- return /* @__PURE__ */ ti(Bi, e);
2713
+ function Xi(e) {
2714
+ return /* @__PURE__ */ ii(Ki, e);
2715
2715
  }
2716
- const Gi = /* @__PURE__ */ l("ZodISODuration", (e, t) => {
2717
- Kr.init(e, t), O.init(e, t);
2716
+ const Qi = /* @__PURE__ */ f("ZodISODuration", (e, t) => {
2717
+ to.init(e, t), N.init(e, t);
2718
2718
  });
2719
- function Hi(e) {
2720
- return /* @__PURE__ */ ni(Gi, e);
2719
+ function es(e) {
2720
+ return /* @__PURE__ */ si(Qi, e);
2721
2721
  }
2722
- const Ki = (e, t) => {
2723
- Yt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2722
+ const ts = (e, t) => {
2723
+ qt.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2724
2724
  format: {
2725
- value: (n) => Dn(e, n)
2725
+ value: (n) => Wn(e, n)
2726
2726
  // enumerable: false,
2727
2727
  },
2728
2728
  flatten: {
2729
- value: (n) => Ln(e, n)
2729
+ value: (n) => Vn(e, n)
2730
2730
  // enumerable: false,
2731
2731
  },
2732
2732
  addIssue: {
2733
2733
  value: (n) => {
2734
- e.issues.push(n), e.message = JSON.stringify(e.issues, Be, 2);
2734
+ e.issues.push(n), e.message = JSON.stringify(e.issues, qe, 2);
2735
2735
  }
2736
2736
  // enumerable: false,
2737
2737
  },
2738
2738
  addIssues: {
2739
2739
  value: (n) => {
2740
- e.issues.push(...n), e.message = JSON.stringify(e.issues, Be, 2);
2740
+ e.issues.push(...n), e.message = JSON.stringify(e.issues, qe, 2);
2741
2741
  }
2742
2742
  // enumerable: false,
2743
2743
  },
@@ -2748,21 +2748,21 @@ const Ki = (e, t) => {
2748
2748
  // enumerable: false,
2749
2749
  }
2750
2750
  });
2751
- }, D = l("ZodError", Ki, {
2751
+ }, U = f("ZodError", ts, {
2752
2752
  Parent: Error
2753
- }), Xi = /* @__PURE__ */ nt(D), Qi = /* @__PURE__ */ rt(D), es = /* @__PURE__ */ Fe(D), ts = /* @__PURE__ */ Me(D), ns = /* @__PURE__ */ Vn(D), rs = /* @__PURE__ */ Wn(D), os = /* @__PURE__ */ Yn(D), is = /* @__PURE__ */ Bn(D), ss = /* @__PURE__ */ qn(D), as = /* @__PURE__ */ Gn(D), cs = /* @__PURE__ */ Hn(D), us = /* @__PURE__ */ Kn(D), P = /* @__PURE__ */ l("ZodType", (e, t) => (N.init(e, t), Object.assign(e["~standard"], {
2753
+ }), ns = /* @__PURE__ */ rt(U), rs = /* @__PURE__ */ ot(U), os = /* @__PURE__ */ Me(U), is = /* @__PURE__ */ Fe(U), ss = /* @__PURE__ */ qn(U), as = /* @__PURE__ */ Gn(U), cs = /* @__PURE__ */ Hn(U), us = /* @__PURE__ */ Kn(U), ls = /* @__PURE__ */ Xn(U), fs = /* @__PURE__ */ Qn(U), ds = /* @__PURE__ */ er(U), ps = /* @__PURE__ */ tr(U), P = /* @__PURE__ */ f("ZodType", (e, t) => (x.init(e, t), Object.assign(e["~standard"], {
2754
2754
  jsonSchema: {
2755
2755
  input: Ce(e, "input"),
2756
2756
  output: Ce(e, "output")
2757
2757
  }
2758
- }), e.toJSONSchema = zi(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(ee(t, {
2758
+ }), e.toJSONSchema = Ei(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(te(t, {
2759
2759
  checks: [
2760
2760
  ...t.checks ?? [],
2761
2761
  ...n.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
2762
2762
  ]
2763
2763
  }), {
2764
2764
  parent: !0
2765
- }), e.with = e.check, e.clone = (n, r) => te(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => Xi(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => es(e, n, r), e.parseAsync = async (n, r) => Qi(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => ts(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => ns(e, n, r), e.decode = (n, r) => rs(e, n, r), e.encodeAsync = async (n, r) => os(e, n, r), e.decodeAsync = async (n, r) => is(e, n, r), e.safeEncode = (n, r) => ss(e, n, r), e.safeDecode = (n, r) => as(e, n, r), e.safeEncodeAsync = async (n, r) => cs(e, n, r), e.safeDecodeAsync = async (n, r) => us(e, n, r), e.refine = (n, r) => e.check(ia(n, r)), e.superRefine = (n) => e.check(sa(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ ge(n)), e.optional = () => Ot(e), e.exactOptional = () => Ys(e), e.nullable = () => Zt(e), e.nullish = () => Ot(Zt(e)), e.nonoptional = (n) => Xs(e, n), e.array = () => xs(e), e.or = (n) => As([e, n]), e.and = (n) => Ms(e, n), e.transform = (n) => Tt(e, Vs(n)), e.default = (n) => Gs(e, n), e.prefault = (n) => Ks(e, n), e.catch = (n) => ea(e, n), e.pipe = (n) => Tt(e, n), e.readonly = () => ra(e), e.describe = (n) => {
2765
+ }), e.with = e.check, e.clone = (n, r) => ne(e, n, r), e.brand = () => e, e.register = ((n, r) => (n.add(e, r), e)), e.parse = (n, r) => ns(e, n, r, { callee: e.parse }), e.safeParse = (n, r) => os(e, n, r), e.parseAsync = async (n, r) => rs(e, n, r, { callee: e.parseAsync }), e.safeParseAsync = async (n, r) => is(e, n, r), e.spa = e.safeParseAsync, e.encode = (n, r) => ss(e, n, r), e.decode = (n, r) => as(e, n, r), e.encodeAsync = async (n, r) => cs(e, n, r), e.decodeAsync = async (n, r) => us(e, n, r), e.safeEncode = (n, r) => ls(e, n, r), e.safeDecode = (n, r) => fs(e, n, r), e.safeEncodeAsync = async (n, r) => ds(e, n, r), e.safeDecodeAsync = async (n, r) => ps(e, n, r), e.refine = (n, r) => e.check(ua(n, r)), e.superRefine = (n) => e.check(la(n)), e.overwrite = (n) => e.check(/* @__PURE__ */ me(n)), e.optional = () => Zt(e), e.exactOptional = () => Hs(e), e.nullable = () => jt(e), e.nullish = () => Zt(jt(e)), e.nonoptional = (n) => na(e, n), e.array = () => As(e), e.or = (n) => Ds([e, n]), e.and = (n) => Js(e, n), e.transform = (n) => Tt(e, qs(n)), e.default = (n) => Qs(e, n), e.prefault = (n) => ta(e, n), e.catch = (n) => oa(e, n), e.pipe = (n) => Tt(e, n), e.readonly = () => aa(e), e.describe = (n) => {
2766
2766
  const r = e.clone();
2767
2767
  return we.add(r, { description: n }), r;
2768
2768
  }, Object.defineProperty(e, "description", {
@@ -2775,136 +2775,136 @@ const Ki = (e, t) => {
2775
2775
  return we.get(e);
2776
2776
  const r = e.clone();
2777
2777
  return we.add(r, n[0]), r;
2778
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), dn = /* @__PURE__ */ l("_ZodString", (e, t) => {
2779
- ot.init(e, t), P.init(e, t), e._zod.processJSONSchema = (r, o, i) => Si(e, r, o);
2778
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (n) => n(e), e)), mn = /* @__PURE__ */ f("_ZodString", (e, t) => {
2779
+ it.init(e, t), P.init(e, t), e._zod.processJSONSchema = (r, o, i) => Zi(e, r, o);
2780
2780
  const n = e._zod.bag;
2781
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ ai(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ li(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ fi(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ di(...r)), e.min = (...r) => e.check(/* @__PURE__ */ xe(...r)), e.max = (...r) => e.check(/* @__PURE__ */ sn(...r)), e.length = (...r) => e.check(/* @__PURE__ */ an(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ xe(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ ci(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ ui(r)), e.trim = () => e.check(/* @__PURE__ */ mi()), e.normalize = (...r) => e.check(/* @__PURE__ */ pi(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ hi()), e.toUpperCase = () => e.check(/* @__PURE__ */ gi()), e.slugify = () => e.check(/* @__PURE__ */ _i());
2782
- }), ls = /* @__PURE__ */ l("ZodString", (e, t) => {
2783
- ot.init(e, t), dn.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Po(fs, n)), e.url = (n) => e.check(/* @__PURE__ */ Ao(ds, n)), e.jwt = (n) => e.check(/* @__PURE__ */ Xo(Os, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Fo(ps, n)), e.guid = (n) => e.check(/* @__PURE__ */ bt(St, n)), e.uuid = (n) => e.check(/* @__PURE__ */ xo(je, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Co(je, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Io(je, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Ro(je, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Mo(ms, n)), e.guid = (n) => e.check(/* @__PURE__ */ bt(St, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Lo(hs, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Do(gs, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Uo(_s, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Go(Ss, n)), e.base64url = (n) => e.check(/* @__PURE__ */ Ho($s, n)), e.xid = (n) => e.check(/* @__PURE__ */ Jo(vs, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ Vo(ys, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Wo(bs, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Yo(ws, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Bo(zs, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ qo(ks, n)), e.e164 = (n) => e.check(/* @__PURE__ */ Ko(Es, n)), e.datetime = (n) => e.check(Vi(n)), e.date = (n) => e.check(Yi(n)), e.time = (n) => e.check(qi(n)), e.duration = (n) => e.check(Hi(n));
2781
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(/* @__PURE__ */ fi(...r)), e.includes = (...r) => e.check(/* @__PURE__ */ mi(...r)), e.startsWith = (...r) => e.check(/* @__PURE__ */ hi(...r)), e.endsWith = (...r) => e.check(/* @__PURE__ */ gi(...r)), e.min = (...r) => e.check(/* @__PURE__ */ Pe(...r)), e.max = (...r) => e.check(/* @__PURE__ */ cn(...r)), e.length = (...r) => e.check(/* @__PURE__ */ un(...r)), e.nonempty = (...r) => e.check(/* @__PURE__ */ Pe(1, ...r)), e.lowercase = (r) => e.check(/* @__PURE__ */ di(r)), e.uppercase = (r) => e.check(/* @__PURE__ */ pi(r)), e.trim = () => e.check(/* @__PURE__ */ vi()), e.normalize = (...r) => e.check(/* @__PURE__ */ _i(...r)), e.toLowerCase = () => e.check(/* @__PURE__ */ yi()), e.toUpperCase = () => e.check(/* @__PURE__ */ bi()), e.slugify = () => e.check(/* @__PURE__ */ wi());
2782
+ }), ms = /* @__PURE__ */ f("ZodString", (e, t) => {
2783
+ it.init(e, t), mn.init(e, t), e.email = (n) => e.check(/* @__PURE__ */ Ro(hs, n)), e.url = (n) => e.check(/* @__PURE__ */ Do(gs, n)), e.jwt = (n) => e.check(/* @__PURE__ */ ni(Ns, n)), e.emoji = (n) => e.check(/* @__PURE__ */ Uo(_s, n)), e.guid = (n) => e.check(/* @__PURE__ */ wt($t, n)), e.uuid = (n) => e.check(/* @__PURE__ */ Ao(Te, n)), e.uuidv4 = (n) => e.check(/* @__PURE__ */ Mo(Te, n)), e.uuidv6 = (n) => e.check(/* @__PURE__ */ Fo(Te, n)), e.uuidv7 = (n) => e.check(/* @__PURE__ */ Lo(Te, n)), e.nanoid = (n) => e.check(/* @__PURE__ */ Jo(vs, n)), e.guid = (n) => e.check(/* @__PURE__ */ wt($t, n)), e.cuid = (n) => e.check(/* @__PURE__ */ Vo(ys, n)), e.cuid2 = (n) => e.check(/* @__PURE__ */ Wo(bs, n)), e.ulid = (n) => e.check(/* @__PURE__ */ Yo(ws, n)), e.base64 = (n) => e.check(/* @__PURE__ */ Qo(Zs, n)), e.base64url = (n) => e.check(/* @__PURE__ */ ei(js, n)), e.xid = (n) => e.check(/* @__PURE__ */ Bo(zs, n)), e.ksuid = (n) => e.check(/* @__PURE__ */ qo(ks, n)), e.ipv4 = (n) => e.check(/* @__PURE__ */ Go(Ss, n)), e.ipv6 = (n) => e.check(/* @__PURE__ */ Ho($s, n)), e.cidrv4 = (n) => e.check(/* @__PURE__ */ Ko(Es, n)), e.cidrv6 = (n) => e.check(/* @__PURE__ */ Xo(Os, n)), e.e164 = (n) => e.check(/* @__PURE__ */ ti(Ts, n)), e.datetime = (n) => e.check(qi(n)), e.date = (n) => e.check(Hi(n)), e.time = (n) => e.check(Xi(n)), e.duration = (n) => e.check(es(n));
2784
2784
  });
2785
2785
  function be(e) {
2786
- return /* @__PURE__ */ No(ls, e);
2787
- }
2788
- const O = /* @__PURE__ */ l("ZodStringFormat", (e, t) => {
2789
- $.init(e, t), dn.init(e, t);
2790
- }), fs = /* @__PURE__ */ l("ZodEmail", (e, t) => {
2791
- Mr.init(e, t), O.init(e, t);
2792
- }), St = /* @__PURE__ */ l("ZodGUID", (e, t) => {
2793
- Ar.init(e, t), O.init(e, t);
2794
- }), je = /* @__PURE__ */ l("ZodUUID", (e, t) => {
2795
- Fr.init(e, t), O.init(e, t);
2796
- }), ds = /* @__PURE__ */ l("ZodURL", (e, t) => {
2797
- Lr.init(e, t), O.init(e, t);
2798
- }), ps = /* @__PURE__ */ l("ZodEmoji", (e, t) => {
2799
- Dr.init(e, t), O.init(e, t);
2800
- }), ms = /* @__PURE__ */ l("ZodNanoID", (e, t) => {
2801
- Ur.init(e, t), O.init(e, t);
2802
- }), hs = /* @__PURE__ */ l("ZodCUID", (e, t) => {
2803
- Jr.init(e, t), O.init(e, t);
2804
- }), gs = /* @__PURE__ */ l("ZodCUID2", (e, t) => {
2805
- Vr.init(e, t), O.init(e, t);
2806
- }), _s = /* @__PURE__ */ l("ZodULID", (e, t) => {
2807
- Wr.init(e, t), O.init(e, t);
2808
- }), vs = /* @__PURE__ */ l("ZodXID", (e, t) => {
2809
- Yr.init(e, t), O.init(e, t);
2810
- }), ys = /* @__PURE__ */ l("ZodKSUID", (e, t) => {
2811
- Br.init(e, t), O.init(e, t);
2812
- }), bs = /* @__PURE__ */ l("ZodIPv4", (e, t) => {
2813
- Xr.init(e, t), O.init(e, t);
2814
- }), ws = /* @__PURE__ */ l("ZodIPv6", (e, t) => {
2815
- Qr.init(e, t), O.init(e, t);
2816
- }), zs = /* @__PURE__ */ l("ZodCIDRv4", (e, t) => {
2817
- eo.init(e, t), O.init(e, t);
2818
- }), ks = /* @__PURE__ */ l("ZodCIDRv6", (e, t) => {
2819
- to.init(e, t), O.init(e, t);
2820
- }), Ss = /* @__PURE__ */ l("ZodBase64", (e, t) => {
2821
- no.init(e, t), O.init(e, t);
2822
- }), $s = /* @__PURE__ */ l("ZodBase64URL", (e, t) => {
2823
- oo.init(e, t), O.init(e, t);
2824
- }), Es = /* @__PURE__ */ l("ZodE164", (e, t) => {
2825
- io.init(e, t), O.init(e, t);
2826
- }), Os = /* @__PURE__ */ l("ZodJWT", (e, t) => {
2827
- ao.init(e, t), O.init(e, t);
2828
- }), pn = /* @__PURE__ */ l("ZodNumber", (e, t) => {
2829
- tn.init(e, t), P.init(e, t), e._zod.processJSONSchema = (r, o, i) => $i(e, r, o), e.gt = (r, o) => e.check(/* @__PURE__ */ zt(r, o)), e.gte = (r, o) => e.check(/* @__PURE__ */ We(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ We(r, o)), e.lt = (r, o) => e.check(/* @__PURE__ */ wt(r, o)), e.lte = (r, o) => e.check(/* @__PURE__ */ Ve(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ Ve(r, o)), e.int = (r) => e.check($t(r)), e.safe = (r) => e.check($t(r)), e.positive = (r) => e.check(/* @__PURE__ */ zt(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ We(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ wt(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ Ve(0, r)), e.multipleOf = (r, o) => e.check(/* @__PURE__ */ kt(r, o)), e.step = (r, o) => e.check(/* @__PURE__ */ kt(r, o)), e.finite = () => e;
2786
+ return /* @__PURE__ */ Io(ms, e);
2787
+ }
2788
+ const N = /* @__PURE__ */ f("ZodStringFormat", (e, t) => {
2789
+ O.init(e, t), mn.init(e, t);
2790
+ }), hs = /* @__PURE__ */ f("ZodEmail", (e, t) => {
2791
+ Jr.init(e, t), N.init(e, t);
2792
+ }), $t = /* @__PURE__ */ f("ZodGUID", (e, t) => {
2793
+ Dr.init(e, t), N.init(e, t);
2794
+ }), Te = /* @__PURE__ */ f("ZodUUID", (e, t) => {
2795
+ Ur.init(e, t), N.init(e, t);
2796
+ }), gs = /* @__PURE__ */ f("ZodURL", (e, t) => {
2797
+ Vr.init(e, t), N.init(e, t);
2798
+ }), _s = /* @__PURE__ */ f("ZodEmoji", (e, t) => {
2799
+ Wr.init(e, t), N.init(e, t);
2800
+ }), vs = /* @__PURE__ */ f("ZodNanoID", (e, t) => {
2801
+ Yr.init(e, t), N.init(e, t);
2802
+ }), ys = /* @__PURE__ */ f("ZodCUID", (e, t) => {
2803
+ Br.init(e, t), N.init(e, t);
2804
+ }), bs = /* @__PURE__ */ f("ZodCUID2", (e, t) => {
2805
+ qr.init(e, t), N.init(e, t);
2806
+ }), ws = /* @__PURE__ */ f("ZodULID", (e, t) => {
2807
+ Gr.init(e, t), N.init(e, t);
2808
+ }), zs = /* @__PURE__ */ f("ZodXID", (e, t) => {
2809
+ Hr.init(e, t), N.init(e, t);
2810
+ }), ks = /* @__PURE__ */ f("ZodKSUID", (e, t) => {
2811
+ Kr.init(e, t), N.init(e, t);
2812
+ }), Ss = /* @__PURE__ */ f("ZodIPv4", (e, t) => {
2813
+ no.init(e, t), N.init(e, t);
2814
+ }), $s = /* @__PURE__ */ f("ZodIPv6", (e, t) => {
2815
+ ro.init(e, t), N.init(e, t);
2816
+ }), Es = /* @__PURE__ */ f("ZodCIDRv4", (e, t) => {
2817
+ oo.init(e, t), N.init(e, t);
2818
+ }), Os = /* @__PURE__ */ f("ZodCIDRv6", (e, t) => {
2819
+ io.init(e, t), N.init(e, t);
2820
+ }), Zs = /* @__PURE__ */ f("ZodBase64", (e, t) => {
2821
+ so.init(e, t), N.init(e, t);
2822
+ }), js = /* @__PURE__ */ f("ZodBase64URL", (e, t) => {
2823
+ co.init(e, t), N.init(e, t);
2824
+ }), Ts = /* @__PURE__ */ f("ZodE164", (e, t) => {
2825
+ uo.init(e, t), N.init(e, t);
2826
+ }), Ns = /* @__PURE__ */ f("ZodJWT", (e, t) => {
2827
+ fo.init(e, t), N.init(e, t);
2828
+ }), hn = /* @__PURE__ */ f("ZodNumber", (e, t) => {
2829
+ rn.init(e, t), P.init(e, t), e._zod.processJSONSchema = (r, o, i) => ji(e, r, o), e.gt = (r, o) => e.check(/* @__PURE__ */ kt(r, o)), e.gte = (r, o) => e.check(/* @__PURE__ */ Ye(r, o)), e.min = (r, o) => e.check(/* @__PURE__ */ Ye(r, o)), e.lt = (r, o) => e.check(/* @__PURE__ */ zt(r, o)), e.lte = (r, o) => e.check(/* @__PURE__ */ We(r, o)), e.max = (r, o) => e.check(/* @__PURE__ */ We(r, o)), e.int = (r) => e.check(Et(r)), e.safe = (r) => e.check(Et(r)), e.positive = (r) => e.check(/* @__PURE__ */ kt(0, r)), e.nonnegative = (r) => e.check(/* @__PURE__ */ Ye(0, r)), e.negative = (r) => e.check(/* @__PURE__ */ zt(0, r)), e.nonpositive = (r) => e.check(/* @__PURE__ */ We(0, r)), e.multipleOf = (r, o) => e.check(/* @__PURE__ */ St(r, o)), e.step = (r, o) => e.check(/* @__PURE__ */ St(r, o)), e.finite = () => e;
2830
2830
  const n = e._zod.bag;
2831
2831
  e.minValue = Math.max(n.minimum ?? Number.NEGATIVE_INFINITY, n.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null, e.maxValue = Math.min(n.maximum ?? Number.POSITIVE_INFINITY, n.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? 0.5), e.isFinite = !0, e.format = n.format ?? null;
2832
2832
  });
2833
- function Ye(e) {
2834
- return /* @__PURE__ */ ri(pn, e);
2833
+ function Be(e) {
2834
+ return /* @__PURE__ */ ai(hn, e);
2835
2835
  }
2836
- const Zs = /* @__PURE__ */ l("ZodNumberFormat", (e, t) => {
2837
- co.init(e, t), pn.init(e, t);
2836
+ const xs = /* @__PURE__ */ f("ZodNumberFormat", (e, t) => {
2837
+ po.init(e, t), hn.init(e, t);
2838
2838
  });
2839
- function $t(e) {
2840
- return /* @__PURE__ */ oi(Zs, e);
2839
+ function Et(e) {
2840
+ return /* @__PURE__ */ ci(xs, e);
2841
2841
  }
2842
- const Ts = /* @__PURE__ */ l("ZodUnknown", (e, t) => {
2843
- uo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Oi();
2842
+ const Ps = /* @__PURE__ */ f("ZodUnknown", (e, t) => {
2843
+ mo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ni();
2844
2844
  });
2845
- function Et() {
2846
- return /* @__PURE__ */ ii(Ts);
2845
+ function Ot() {
2846
+ return /* @__PURE__ */ ui(Ps);
2847
2847
  }
2848
- const js = /* @__PURE__ */ l("ZodNever", (e, t) => {
2849
- lo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ei(e, n, r);
2848
+ const Cs = /* @__PURE__ */ f("ZodNever", (e, t) => {
2849
+ ho.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ti(e, n, r);
2850
2850
  });
2851
- function Ns(e) {
2852
- return /* @__PURE__ */ si(js, e);
2851
+ function Is(e) {
2852
+ return /* @__PURE__ */ li(Cs, e);
2853
2853
  }
2854
- const Ps = /* @__PURE__ */ l("ZodArray", (e, t) => {
2855
- fo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ni(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ xe(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ xe(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ sn(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ an(n, r)), e.unwrap = () => e.element;
2854
+ const Rs = /* @__PURE__ */ f("ZodArray", (e, t) => {
2855
+ go.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ii(e, n, r, o), e.element = t.element, e.min = (n, r) => e.check(/* @__PURE__ */ Pe(n, r)), e.nonempty = (n) => e.check(/* @__PURE__ */ Pe(1, n)), e.max = (n, r) => e.check(/* @__PURE__ */ cn(n, r)), e.length = (n, r) => e.check(/* @__PURE__ */ un(n, r)), e.unwrap = () => e.element;
2856
2856
  });
2857
- function xs(e, t) {
2858
- return /* @__PURE__ */ vi(Ps, e, t);
2857
+ function As(e, t) {
2858
+ return /* @__PURE__ */ zi(Rs, e, t);
2859
2859
  }
2860
- const Cs = /* @__PURE__ */ l("ZodObject", (e, t) => {
2861
- mo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Pi(e, n, r, o), w(e, "shape", () => t.shape), e.keyof = () => Us(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Et() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Et() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Ns() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => In(e, n), e.safeExtend = (n) => Rn(e, n), e.merge = (n) => An(e, n), e.pick = (n) => xn(e, n), e.omit = (n) => Cn(e, n), e.partial = (...n) => Fn(mn, e, n[0]), e.required = (...n) => Mn(hn, e, n[0]);
2860
+ const Ms = /* @__PURE__ */ f("ZodObject", (e, t) => {
2861
+ vo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ri(e, n, r, o), k(e, "shape", () => t.shape), e.keyof = () => Ys(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Ot() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Ot() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Is() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => Fn(e, n), e.safeExtend = (n) => Ln(e, n), e.merge = (n) => Dn(e, n), e.pick = (n) => An(e, n), e.omit = (n) => Mn(e, n), e.partial = (...n) => Un(gn, e, n[0]), e.required = (...n) => Jn(_n, e, n[0]);
2862
2862
  });
2863
- function Is(e, t) {
2863
+ function Fs(e, t) {
2864
2864
  const n = {
2865
2865
  type: "object",
2866
2866
  shape: e ?? {},
2867
2867
  ...g(t)
2868
2868
  };
2869
- return new Cs(n);
2869
+ return new Ms(n);
2870
2870
  }
2871
- const Rs = /* @__PURE__ */ l("ZodUnion", (e, t) => {
2872
- ho.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => xi(e, n, r, o), e.options = t.options;
2871
+ const Ls = /* @__PURE__ */ f("ZodUnion", (e, t) => {
2872
+ yo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ai(e, n, r, o), e.options = t.options;
2873
2873
  });
2874
- function As(e, t) {
2875
- return new Rs({
2874
+ function Ds(e, t) {
2875
+ return new Ls({
2876
2876
  type: "union",
2877
2877
  options: e,
2878
2878
  ...g(t)
2879
2879
  });
2880
2880
  }
2881
- const Fs = /* @__PURE__ */ l("ZodIntersection", (e, t) => {
2882
- go.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ci(e, n, r, o);
2881
+ const Us = /* @__PURE__ */ f("ZodIntersection", (e, t) => {
2882
+ bo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mi(e, n, r, o);
2883
2883
  });
2884
- function Ms(e, t) {
2885
- return new Fs({
2884
+ function Js(e, t) {
2885
+ return new Us({
2886
2886
  type: "intersection",
2887
2887
  left: e,
2888
2888
  right: t
2889
2889
  });
2890
2890
  }
2891
- const Ls = /* @__PURE__ */ l("ZodTuple", (e, t) => {
2892
- _o.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ii(e, n, r, o), e.rest = (n) => e.clone({
2891
+ const Vs = /* @__PURE__ */ f("ZodTuple", (e, t) => {
2892
+ wo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Fi(e, n, r, o), e.rest = (n) => e.clone({
2893
2893
  ...e._zod.def,
2894
2894
  rest: n
2895
2895
  });
2896
2896
  });
2897
- function Ds(e, t, n) {
2898
- const r = t instanceof N, o = r ? n : t, i = r ? t : null;
2899
- return new Ls({
2897
+ function Ws(e, t, n) {
2898
+ const r = t instanceof x, o = r ? n : t, i = r ? t : null;
2899
+ return new Vs({
2900
2900
  type: "tuple",
2901
2901
  items: e,
2902
2902
  rest: i,
2903
2903
  ...g(o)
2904
2904
  });
2905
2905
  }
2906
- const Ge = /* @__PURE__ */ l("ZodEnum", (e, t) => {
2907
- vo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (r, o, i) => Zi(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
2906
+ const He = /* @__PURE__ */ f("ZodEnum", (e, t) => {
2907
+ zo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (r, o, i) => xi(e, r, o), e.enum = t.entries, e.options = Object.values(t.entries);
2908
2908
  const n = new Set(Object.keys(t.entries));
2909
2909
  e.extract = (r, o) => {
2910
2910
  const i = {};
@@ -2913,7 +2913,7 @@ const Ge = /* @__PURE__ */ l("ZodEnum", (e, t) => {
2913
2913
  i[s] = t.entries[s];
2914
2914
  else
2915
2915
  throw new Error(`Key ${s} not found in enum`);
2916
- return new Ge({
2916
+ return new He({
2917
2917
  ...t,
2918
2918
  checks: [],
2919
2919
  ...g(o),
@@ -2926,7 +2926,7 @@ const Ge = /* @__PURE__ */ l("ZodEnum", (e, t) => {
2926
2926
  delete i[s];
2927
2927
  else
2928
2928
  throw new Error(`Key ${s} not found in enum`);
2929
- return new Ge({
2929
+ return new He({
2930
2930
  ...t,
2931
2931
  checks: [],
2932
2932
  ...g(o),
@@ -2934,18 +2934,18 @@ const Ge = /* @__PURE__ */ l("ZodEnum", (e, t) => {
2934
2934
  });
2935
2935
  };
2936
2936
  });
2937
- function Us(e, t) {
2937
+ function Ys(e, t) {
2938
2938
  const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
2939
- return new Ge({
2939
+ return new He({
2940
2940
  type: "enum",
2941
2941
  entries: n,
2942
2942
  ...g(t)
2943
2943
  });
2944
2944
  }
2945
- const Js = /* @__PURE__ */ l("ZodTransform", (e, t) => {
2946
- yo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => ji(e, n), e._zod.parse = (n, r) => {
2945
+ const Bs = /* @__PURE__ */ f("ZodTransform", (e, t) => {
2946
+ ko.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ci(e, n), e._zod.parse = (n, r) => {
2947
2947
  if (r.direction === "backward")
2948
- throw new Lt(e.constructor.name);
2948
+ throw new Ut(e.constructor.name);
2949
2949
  n.addIssue = (i) => {
2950
2950
  if (typeof i == "string")
2951
2951
  n.issues.push(ke(i, n.value, t));
@@ -2958,118 +2958,118 @@ const Js = /* @__PURE__ */ l("ZodTransform", (e, t) => {
2958
2958
  return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
2959
2959
  };
2960
2960
  });
2961
- function Vs(e) {
2962
- return new Js({
2961
+ function qs(e) {
2962
+ return new Bs({
2963
2963
  type: "transform",
2964
2964
  transform: e
2965
2965
  });
2966
2966
  }
2967
- const mn = /* @__PURE__ */ l("ZodOptional", (e, t) => {
2968
- on.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => fn(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2967
+ const gn = /* @__PURE__ */ f("ZodOptional", (e, t) => {
2968
+ an.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => pn(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2969
2969
  });
2970
- function Ot(e) {
2971
- return new mn({
2970
+ function Zt(e) {
2971
+ return new gn({
2972
2972
  type: "optional",
2973
2973
  innerType: e
2974
2974
  });
2975
2975
  }
2976
- const Ws = /* @__PURE__ */ l("ZodExactOptional", (e, t) => {
2977
- bo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => fn(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2976
+ const Gs = /* @__PURE__ */ f("ZodExactOptional", (e, t) => {
2977
+ So.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => pn(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2978
2978
  });
2979
- function Ys(e) {
2980
- return new Ws({
2979
+ function Hs(e) {
2980
+ return new Gs({
2981
2981
  type: "optional",
2982
2982
  innerType: e
2983
2983
  });
2984
2984
  }
2985
- const Bs = /* @__PURE__ */ l("ZodNullable", (e, t) => {
2986
- wo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ri(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2985
+ const Ks = /* @__PURE__ */ f("ZodNullable", (e, t) => {
2986
+ $o.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Li(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
2987
2987
  });
2988
- function Zt(e) {
2989
- return new Bs({
2988
+ function jt(e) {
2989
+ return new Ks({
2990
2990
  type: "nullable",
2991
2991
  innerType: e
2992
2992
  });
2993
2993
  }
2994
- const qs = /* @__PURE__ */ l("ZodDefault", (e, t) => {
2995
- zo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Fi(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2994
+ const Xs = /* @__PURE__ */ f("ZodDefault", (e, t) => {
2995
+ Eo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ui(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2996
2996
  });
2997
- function Gs(e, t) {
2998
- return new qs({
2997
+ function Qs(e, t) {
2998
+ return new Xs({
2999
2999
  type: "default",
3000
3000
  innerType: e,
3001
3001
  get defaultValue() {
3002
- return typeof t == "function" ? t() : Vt(t);
3002
+ return typeof t == "function" ? t() : Yt(t);
3003
3003
  }
3004
3004
  });
3005
3005
  }
3006
- const Hs = /* @__PURE__ */ l("ZodPrefault", (e, t) => {
3007
- ko.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Mi(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3006
+ const ea = /* @__PURE__ */ f("ZodPrefault", (e, t) => {
3007
+ Oo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ji(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3008
3008
  });
3009
- function Ks(e, t) {
3010
- return new Hs({
3009
+ function ta(e, t) {
3010
+ return new ea({
3011
3011
  type: "prefault",
3012
3012
  innerType: e,
3013
3013
  get defaultValue() {
3014
- return typeof t == "function" ? t() : Vt(t);
3014
+ return typeof t == "function" ? t() : Yt(t);
3015
3015
  }
3016
3016
  });
3017
3017
  }
3018
- const hn = /* @__PURE__ */ l("ZodNonOptional", (e, t) => {
3019
- So.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ai(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3018
+ const _n = /* @__PURE__ */ f("ZodNonOptional", (e, t) => {
3019
+ Zo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Di(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3020
3020
  });
3021
- function Xs(e, t) {
3022
- return new hn({
3021
+ function na(e, t) {
3022
+ return new _n({
3023
3023
  type: "nonoptional",
3024
3024
  innerType: e,
3025
3025
  ...g(t)
3026
3026
  });
3027
3027
  }
3028
- const Qs = /* @__PURE__ */ l("ZodCatch", (e, t) => {
3029
- $o.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Li(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3028
+ const ra = /* @__PURE__ */ f("ZodCatch", (e, t) => {
3029
+ jo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Vi(e, n, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3030
3030
  });
3031
- function ea(e, t) {
3032
- return new Qs({
3031
+ function oa(e, t) {
3032
+ return new ra({
3033
3033
  type: "catch",
3034
3034
  innerType: e,
3035
3035
  catchValue: typeof t == "function" ? t : () => t
3036
3036
  });
3037
3037
  }
3038
- const ta = /* @__PURE__ */ l("ZodPipe", (e, t) => {
3039
- Eo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Di(e, n, r, o), e.in = t.in, e.out = t.out;
3038
+ const ia = /* @__PURE__ */ f("ZodPipe", (e, t) => {
3039
+ To.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Wi(e, n, r, o), e.in = t.in, e.out = t.out;
3040
3040
  });
3041
3041
  function Tt(e, t) {
3042
- return new ta({
3042
+ return new ia({
3043
3043
  type: "pipe",
3044
3044
  in: e,
3045
3045
  out: t
3046
3046
  // ...util.normalizeParams(params),
3047
3047
  });
3048
3048
  }
3049
- const na = /* @__PURE__ */ l("ZodReadonly", (e, t) => {
3050
- Oo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ui(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3049
+ const sa = /* @__PURE__ */ f("ZodReadonly", (e, t) => {
3050
+ No.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Yi(e, n, r, o), e.unwrap = () => e._zod.def.innerType;
3051
3051
  });
3052
- function ra(e) {
3053
- return new na({
3052
+ function aa(e) {
3053
+ return new sa({
3054
3054
  type: "readonly",
3055
3055
  innerType: e
3056
3056
  });
3057
3057
  }
3058
- const oa = /* @__PURE__ */ l("ZodCustom", (e, t) => {
3059
- Zo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Ti(e, n);
3058
+ const ca = /* @__PURE__ */ f("ZodCustom", (e, t) => {
3059
+ xo.init(e, t), P.init(e, t), e._zod.processJSONSchema = (n, r, o) => Pi(e, n);
3060
3060
  });
3061
- function ia(e, t = {}) {
3062
- return /* @__PURE__ */ yi(oa, e, t);
3061
+ function ua(e, t = {}) {
3062
+ return /* @__PURE__ */ ki(ca, e, t);
3063
3063
  }
3064
- function sa(e) {
3065
- return /* @__PURE__ */ bi(e);
3064
+ function la(e) {
3065
+ return /* @__PURE__ */ Si(e);
3066
3066
  }
3067
- const aa = ie.createContext(null);
3068
- function ca(e, t) {
3067
+ const fa = oe.createContext(null);
3068
+ function da(e, t) {
3069
3069
  const n = Array.isArray(e) ? e[0] : e ? e.x : 0, r = Array.isArray(e) ? e[1] : e ? e.y : 0, o = Array.isArray(t) ? t[0] : t ? t.x : 0, i = Array.isArray(t) ? t[1] : t ? t.y : 0;
3070
3070
  return n === o && r === i;
3071
3071
  }
3072
- function Y(e, t) {
3072
+ function B(e, t) {
3073
3073
  if (e === t)
3074
3074
  return !0;
3075
3075
  if (!e || !t)
@@ -3078,7 +3078,7 @@ function Y(e, t) {
3078
3078
  if (!Array.isArray(t) || e.length !== t.length)
3079
3079
  return !1;
3080
3080
  for (let n = 0; n < e.length; n++)
3081
- if (!Y(e[n], t[n]))
3081
+ if (!B(e[n], t[n]))
3082
3082
  return !1;
3083
3083
  return !0;
3084
3084
  } else if (Array.isArray(t))
@@ -3088,13 +3088,13 @@ function Y(e, t) {
3088
3088
  if (n.length !== r.length)
3089
3089
  return !1;
3090
3090
  for (const o of n)
3091
- if (!t.hasOwnProperty(o) || !Y(e[o], t[o]))
3091
+ if (!t.hasOwnProperty(o) || !B(e[o], t[o]))
3092
3092
  return !1;
3093
3093
  return !0;
3094
3094
  }
3095
3095
  return !1;
3096
3096
  }
3097
- function jt(e) {
3097
+ function Nt(e) {
3098
3098
  return {
3099
3099
  longitude: e.center.lng,
3100
3100
  latitude: e.center.lat,
@@ -3104,15 +3104,15 @@ function jt(e) {
3104
3104
  padding: e.padding
3105
3105
  };
3106
3106
  }
3107
- function Nt(e, t) {
3107
+ function xt(e, t) {
3108
3108
  const n = t.viewState || t, r = {};
3109
3109
  if ("longitude" in n && "latitude" in n && (n.longitude !== e.center.lng || n.latitude !== e.center.lat)) {
3110
3110
  const o = e.center.constructor;
3111
3111
  r.center = new o(n.longitude, n.latitude);
3112
3112
  }
3113
- return "zoom" in n && n.zoom !== e.zoom && (r.zoom = n.zoom), "bearing" in n && n.bearing !== e.bearing && (r.bearing = n.bearing), "pitch" in n && n.pitch !== e.pitch && (r.pitch = n.pitch), n.padding && e.padding && !Y(n.padding, e.padding) && (r.padding = n.padding), r;
3113
+ return "zoom" in n && n.zoom !== e.zoom && (r.zoom = n.zoom), "bearing" in n && n.bearing !== e.bearing && (r.bearing = n.bearing), "pitch" in n && n.pitch !== e.pitch && (r.pitch = n.pitch), n.padding && e.padding && !B(n.padding, e.padding) && (r.padding = n.padding), r;
3114
3114
  }
3115
- const ua = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"];
3115
+ const pa = ["type", "source", "source-layer", "minzoom", "maxzoom", "filter", "layout"];
3116
3116
  function Pt(e) {
3117
3117
  if (!e)
3118
3118
  return null;
@@ -3127,14 +3127,14 @@ function Pt(e) {
3127
3127
  const i = t[r.ref];
3128
3128
  if (i) {
3129
3129
  o = o || Object.assign({}, r), delete o.ref;
3130
- for (const s of ua)
3130
+ for (const s of pa)
3131
3131
  s in i && (o[s] = i[s]);
3132
3132
  }
3133
3133
  return o || r;
3134
3134
  });
3135
3135
  return { ...e, layers: n };
3136
3136
  }
3137
- const xt = { version: 8, sources: {}, layers: [] }, Ct = {
3137
+ const Ct = { version: 8, sources: {}, layers: [] }, It = {
3138
3138
  mousedown: "onMouseDown",
3139
3139
  mouseup: "onMouseUp",
3140
3140
  mouseover: "onMouseOver",
@@ -3149,7 +3149,7 @@ const xt = { version: 8, sources: {}, layers: [] }, Ct = {
3149
3149
  touchend: "onTouchEnd",
3150
3150
  touchmove: "onTouchMove",
3151
3151
  touchcancel: "onTouchCancel"
3152
- }, It = {
3152
+ }, Rt = {
3153
3153
  movestart: "onMoveStart",
3154
3154
  move: "onMove",
3155
3155
  moveend: "onMoveEnd",
@@ -3165,7 +3165,7 @@ const xt = { version: 8, sources: {}, layers: [] }, Ct = {
3165
3165
  pitchstart: "onPitchStart",
3166
3166
  pitch: "onPitch",
3167
3167
  pitchend: "onPitchEnd"
3168
- }, Rt = {
3168
+ }, At = {
3169
3169
  wheel: "onWheel",
3170
3170
  boxzoomstart: "onBoxZoomStart",
3171
3171
  boxzoomend: "onBoxZoomEnd",
@@ -3179,7 +3179,7 @@ const xt = { version: 8, sources: {}, layers: [] }, Ct = {
3179
3179
  styledata: "onStyleData",
3180
3180
  sourcedata: "onSourceData",
3181
3181
  error: "onError"
3182
- }, la = [
3182
+ }, ma = [
3183
3183
  "minZoom",
3184
3184
  "maxZoom",
3185
3185
  "minPitch",
@@ -3187,7 +3187,7 @@ const xt = { version: 8, sources: {}, layers: [] }, Ct = {
3187
3187
  "maxBounds",
3188
3188
  "projection",
3189
3189
  "renderWorldCopies"
3190
- ], fa = [
3190
+ ], ha = [
3191
3191
  "scrollZoom",
3192
3192
  "boxZoom",
3193
3193
  "dragRotate",
@@ -3197,20 +3197,20 @@ const xt = { version: 8, sources: {}, layers: [] }, Ct = {
3197
3197
  "touchZoomRotate",
3198
3198
  "touchPitch"
3199
3199
  ];
3200
- class he {
3200
+ class pe {
3201
3201
  constructor(t, n, r) {
3202
3202
  this._map = null, this._internalUpdate = !1, this._hoveredFeatures = null, this._propsedCameraUpdate = null, this._styleComponents = {}, this._onEvent = (o) => {
3203
- const i = this.props[Rt[o.type]];
3203
+ const i = this.props[At[o.type]];
3204
3204
  i ? i(o) : o.type === "error" && console.error(o.error);
3205
3205
  }, this._onCameraEvent = (o) => {
3206
3206
  if (this._internalUpdate)
3207
3207
  return;
3208
- o.viewState = this._propsedCameraUpdate || jt(this._map.transform);
3209
- const i = this.props[It[o.type]];
3208
+ o.viewState = this._propsedCameraUpdate || Nt(this._map.transform);
3209
+ const i = this.props[Rt[o.type]];
3210
3210
  i && i(o);
3211
- }, this._onCameraUpdate = (o) => this._internalUpdate ? o : (this._propsedCameraUpdate = jt(o), Nt(o, this.props)), this._onPointerEvent = (o) => {
3211
+ }, this._onCameraUpdate = (o) => this._internalUpdate ? o : (this._propsedCameraUpdate = Nt(o), xt(o, this.props)), this._onPointerEvent = (o) => {
3212
3212
  (o.type === "mousemove" || o.type === "mouseout") && this._updateHover(o);
3213
- const i = this.props[Ct[o.type]];
3213
+ const i = this.props[It[o.type]];
3214
3214
  i && (this.props.interactiveLayerIds && o.type !== "mouseover" && o.type !== "mouseout" && (o.features = this._hoveredFeatures || this._queryRenderedFeatures(o.point)), i(o), delete o.features);
3215
3215
  }, this._MapClass = t, this.props = n, this._initialize(r);
3216
3216
  }
@@ -3224,7 +3224,7 @@ class he {
3224
3224
  this._updateStyle(t, n), this._updateStyleComponents(t), this._updateHandlers(t, n), (r || o || i && !this._map.isMoving()) && this.redraw();
3225
3225
  }
3226
3226
  static reuse(t, n) {
3227
- const r = he.savedMaps.pop();
3227
+ const r = pe.savedMaps.pop();
3228
3228
  if (!r)
3229
3229
  return null;
3230
3230
  const o = r.map, i = o.getContainer();
@@ -3238,7 +3238,7 @@ class he {
3238
3238
  }
3239
3239
  /* eslint-disable complexity,max-statements */
3240
3240
  _initialize(t) {
3241
- const { props: n } = this, { mapStyle: r = xt } = n, o = {
3241
+ const { props: n } = this, { mapStyle: r = Ct } = n, o = {
3242
3242
  ...n,
3243
3243
  ...n.initialViewState,
3244
3244
  container: t,
@@ -3265,17 +3265,17 @@ class he {
3265
3265
  }), s.on("sourcedata", () => {
3266
3266
  this._updateStyleComponents(this.props);
3267
3267
  });
3268
- for (const a in Ct)
3269
- s.on(a, this._onPointerEvent);
3270
3268
  for (const a in It)
3271
- s.on(a, this._onCameraEvent);
3269
+ s.on(a, this._onPointerEvent);
3272
3270
  for (const a in Rt)
3271
+ s.on(a, this._onCameraEvent);
3272
+ for (const a in At)
3273
3273
  s.on(a, this._onEvent);
3274
3274
  this._map = s;
3275
3275
  }
3276
3276
  /* eslint-enable complexity,max-statements */
3277
3277
  recycle() {
3278
- this.map.getContainer().querySelector("[mapboxgl-children]")?.remove(), he.savedMaps.push(this);
3278
+ this.map.getContainer().querySelector("[mapboxgl-children]")?.remove(), pe.savedMaps.push(this);
3279
3279
  }
3280
3280
  destroy() {
3281
3281
  this._map.remove();
@@ -3309,7 +3309,7 @@ class he {
3309
3309
  _updateViewState(t) {
3310
3310
  const n = this._map, r = n.transform;
3311
3311
  if (!n.isMoving()) {
3312
- const i = Nt(r, t);
3312
+ const i = xt(r, t);
3313
3313
  if (Object.keys(i).length > 0)
3314
3314
  return this._internalUpdate = !0, n.jumpTo(i), this._internalUpdate = !1, !0;
3315
3315
  }
@@ -3323,14 +3323,14 @@ class he {
3323
3323
  _updateSettings(t, n) {
3324
3324
  const r = this._map;
3325
3325
  let o = !1;
3326
- for (const i of la)
3327
- i in t && !Y(t[i], n[i]) && (o = !0, r[`set${i[0].toUpperCase()}${i.slice(1)}`]?.call(r, t[i]));
3326
+ for (const i of ma)
3327
+ i in t && !B(t[i], n[i]) && (o = !0, r[`set${i[0].toUpperCase()}${i.slice(1)}`]?.call(r, t[i]));
3328
3328
  return o;
3329
3329
  }
3330
3330
  /* Update map style to match props */
3331
3331
  _updateStyle(t, n) {
3332
3332
  if (t.cursor !== n.cursor && (this._map.getCanvas().style.cursor = t.cursor || ""), t.mapStyle !== n.mapStyle) {
3333
- const { mapStyle: r = xt, styleDiffing: o = !0 } = t, i = {
3333
+ const { mapStyle: r = Ct, styleDiffing: o = !0 } = t, i = {
3334
3334
  diff: o
3335
3335
  };
3336
3336
  "localIdeographFontFamily" in t && (i.localIdeographFontFamily = t.localIdeographFontFamily), this._map.setStyle(Pt(r), i);
@@ -3343,14 +3343,14 @@ class he {
3343
3343
  */
3344
3344
  _updateStyleComponents({ light: t, projection: n, sky: r, terrain: o }) {
3345
3345
  const i = this._map, s = this._styleComponents;
3346
- i.style._loaded && (t && !Y(t, s.light) && (s.light = t, i.setLight(t)), n && !Y(n, s.projection) && n !== s.projection?.type && (s.projection = typeof n == "string" ? { type: n } : n, i.setProjection?.(s.projection)), r && !Y(r, s.sky) && (s.sky = r, i.setSky(r)), o !== void 0 && !Y(o, s.terrain) && (!o || i.getSource(o.source)) && (s.terrain = o, i.setTerrain(o)));
3346
+ i.style._loaded && (t && !B(t, s.light) && (s.light = t, i.setLight(t)), n && !B(n, s.projection) && n !== s.projection?.type && (s.projection = typeof n == "string" ? { type: n } : n, i.setProjection?.(s.projection)), r && !B(r, s.sky) && (s.sky = r, i.setSky(r)), o !== void 0 && !B(o, s.terrain) && (!o || i.getSource(o.source)) && (s.terrain = o, i.setTerrain(o)));
3347
3347
  }
3348
3348
  /* Update interaction handlers to match props */
3349
3349
  _updateHandlers(t, n) {
3350
3350
  const r = this._map;
3351
- for (const o of fa) {
3351
+ for (const o of ha) {
3352
3352
  const i = t[o] ?? !0, s = n[o] ?? !0;
3353
- Y(i, s) || (i ? r[o].enable(i) : r[o].disable());
3353
+ B(i, s) || (i ? r[o].enable(i) : r[o].disable());
3354
3354
  }
3355
3355
  }
3356
3356
  _queryRenderedFeatures(t) {
@@ -3372,8 +3372,8 @@ class he {
3372
3372
  this._hoveredFeatures = null;
3373
3373
  }
3374
3374
  }
3375
- he.savedMaps = [];
3376
- const da = [
3375
+ pe.savedMaps = [];
3376
+ const ga = [
3377
3377
  "setMaxBounds",
3378
3378
  "setMinZoom",
3379
3379
  "setMaxZoom",
@@ -3395,17 +3395,17 @@ const da = [
3395
3395
  "setFog",
3396
3396
  "remove"
3397
3397
  ];
3398
- function pa(e) {
3398
+ function _a(e) {
3399
3399
  if (!e)
3400
3400
  return null;
3401
3401
  const t = e.map, n = {
3402
3402
  getMap: () => t
3403
3403
  };
3404
- for (const r of ma(t))
3405
- !(r in n) && !da.includes(r) && (n[r] = t[r].bind(t));
3404
+ for (const r of va(t))
3405
+ !(r in n) && !ga.includes(r) && (n[r] = t[r].bind(t));
3406
3406
  return n;
3407
3407
  }
3408
- function ma(e) {
3408
+ function va(e) {
3409
3409
  const t = /* @__PURE__ */ new Set();
3410
3410
  let n = e;
3411
3411
  for (; n; ) {
@@ -3415,8 +3415,8 @@ function ma(e) {
3415
3415
  }
3416
3416
  return Array.from(t);
3417
3417
  }
3418
- const ha = typeof document < "u" ? bn : R;
3419
- function ga(e, t) {
3418
+ const ya = typeof document < "u" ? zn : I;
3419
+ function ba(e, t) {
3420
3420
  const { RTLTextPlugin: n, maxParallelImageRequests: r, workerCount: o, workerUrl: i } = t;
3421
3421
  if (n && e.getRTLTextPluginStatus && e.getRTLTextPluginStatus() === "unavailable") {
3422
3422
  const { pluginUrl: s, lazy: a = !0 } = typeof n == "string" ? { pluginUrl: n } : n;
@@ -3426,36 +3426,36 @@ function ga(e, t) {
3426
3426
  }
3427
3427
  r !== void 0 && e.setMaxParallelImageRequests(r), o !== void 0 && e.setWorkerCount(o), i !== void 0 && e.setWorkerUrl(i);
3428
3428
  }
3429
- const De = ie.createContext(null);
3430
- function _a(e, t) {
3431
- const n = Ie(aa), [r, o] = oe(null), i = me(), { current: s } = me({ mapLib: null, map: null });
3432
- R(() => {
3429
+ const De = oe.createContext(null);
3430
+ function wa(e, t) {
3431
+ const n = Ie(fa), [r, o] = ee(null), i = de(), { current: s } = de({ mapLib: null, map: null });
3432
+ I(() => {
3433
3433
  const u = e.mapLib;
3434
- let d = !0, m;
3435
- return Promise.resolve(u || import("./maplibre-gl-DSpYxujd.js").then((p) => p.m)).then((p) => {
3434
+ let d = !0, p;
3435
+ return Promise.resolve(u || import("./maplibre-gl-D7mIxaE5.js").then((m) => m.m)).then((m) => {
3436
3436
  if (!d)
3437
3437
  return;
3438
- if (!p)
3438
+ if (!m)
3439
3439
  throw new Error("Invalid mapLib");
3440
- const h = "Map" in p ? p : p.default;
3440
+ const h = "Map" in m ? m : m.default;
3441
3441
  if (!h.Map)
3442
3442
  throw new Error("Invalid mapLib");
3443
- ga(h, e), e.reuseMaps && (m = he.reuse(e, i.current)), m || (m = new he(h.Map, e, i.current)), s.map = pa(m), s.mapLib = h, o(m), n?.onMapMount(s.map, e.id);
3444
- }).catch((p) => {
3443
+ ba(h, e), e.reuseMaps && (p = pe.reuse(e, i.current)), p || (p = new pe(h.Map, e, i.current)), s.map = _a(p), s.mapLib = h, o(p), n?.onMapMount(s.map, e.id);
3444
+ }).catch((m) => {
3445
3445
  const { onError: h } = e;
3446
3446
  h ? h({
3447
3447
  type: "error",
3448
3448
  target: null,
3449
3449
  originalEvent: null,
3450
- error: p
3451
- }) : console.error(p);
3450
+ error: m
3451
+ }) : console.error(m);
3452
3452
  }), () => {
3453
- d = !1, m && (n?.onMapUnmount(e.id), e.reuseMaps ? m.recycle() : m.destroy());
3453
+ d = !1, p && (n?.onMapUnmount(e.id), e.reuseMaps ? p.recycle() : p.destroy());
3454
3454
  };
3455
- }, []), ha(() => {
3455
+ }, []), ya(() => {
3456
3456
  r && r.setProps(e);
3457
3457
  }), Re(t, () => s.map, [r]);
3458
- const a = B(() => ({
3458
+ const a = V(() => ({
3459
3459
  position: "relative",
3460
3460
  width: "100%",
3461
3461
  height: "100%",
@@ -3463,132 +3463,132 @@ function _a(e, t) {
3463
3463
  }), [e.style]), c = {
3464
3464
  height: "100%"
3465
3465
  };
3466
- return ie.createElement("div", { id: e.id, ref: i, style: a }, r && ie.createElement(
3466
+ return oe.createElement("div", { id: e.id, ref: i, style: a }, r && oe.createElement(
3467
3467
  De.Provider,
3468
3468
  { value: s },
3469
- ie.createElement("div", { "mapboxgl-children": "", style: c }, e.children)
3469
+ oe.createElement("div", { "mapboxgl-children": "", style: c }, e.children)
3470
3470
  ));
3471
3471
  }
3472
- const va = ie.forwardRef(_a), ya = /box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;
3473
- function H(e, t) {
3472
+ const za = oe.forwardRef(wa), ka = /box|flex|grid|column|lineHeight|fontWeight|opacity|order|tabSize|zIndex/;
3473
+ function G(e, t) {
3474
3474
  if (!e || !t)
3475
3475
  return;
3476
3476
  const n = e.style;
3477
3477
  for (const r in t) {
3478
3478
  const o = t[r];
3479
- Number.isFinite(o) && !ya.test(r) ? n[r] = `${o}px` : n[r] = o;
3479
+ Number.isFinite(o) && !ka.test(r) ? n[r] = `${o}px` : n[r] = o;
3480
3480
  }
3481
3481
  }
3482
- function gn(e, t) {
3482
+ function vn(e, t) {
3483
3483
  if (e === t)
3484
3484
  return null;
3485
- const n = At(e), r = At(t), o = [];
3485
+ const n = Mt(e), r = Mt(t), o = [];
3486
3486
  for (const i of r)
3487
3487
  n.has(i) || o.push(i);
3488
3488
  for (const i of n)
3489
3489
  r.has(i) || o.push(i);
3490
3490
  return o.length === 0 ? null : o;
3491
3491
  }
3492
- function At(e) {
3492
+ function Mt(e) {
3493
3493
  return new Set(e ? e.trim().split(/\s+/) : []);
3494
3494
  }
3495
- const ba = G(He((e, t) => {
3496
- const { map: n, mapLib: r } = Ie(De), o = me({ props: e }), i = B(() => {
3497
- let U = !1;
3498
- ie.Children.forEach(e.children, (b) => {
3499
- b && (U = !0);
3495
+ const Ft = q(Ke((e, t) => {
3496
+ const { map: n, mapLib: r } = Ie(De), o = de({ props: e }), i = V(() => {
3497
+ let W = !1;
3498
+ oe.Children.forEach(e.children, (b) => {
3499
+ b && (W = !0);
3500
3500
  });
3501
- const V = {
3501
+ const H = {
3502
3502
  ...e,
3503
- element: U ? document.createElement("div") : void 0
3504
- }, T = new r.Marker(V);
3505
- return T.setLngLat([e.longitude, e.latitude]), T.getElement().addEventListener("click", (b) => {
3503
+ element: W ? document.createElement("div") : void 0
3504
+ }, j = new r.Marker(H);
3505
+ return j.setLngLat([e.longitude, e.latitude]), j.getElement().addEventListener("click", (b) => {
3506
3506
  o.current.props.onClick?.({
3507
3507
  type: "click",
3508
- target: T,
3508
+ target: j,
3509
3509
  originalEvent: b
3510
3510
  });
3511
- }), T.on("dragstart", (b) => {
3512
- const v = b;
3513
- v.lngLat = i.getLngLat(), o.current.props.onDragStart?.(v);
3514
- }), T.on("drag", (b) => {
3515
- const v = b;
3516
- v.lngLat = i.getLngLat(), o.current.props.onDrag?.(v);
3517
- }), T.on("dragend", (b) => {
3518
- const v = b;
3519
- v.lngLat = i.getLngLat(), o.current.props.onDragEnd?.(v);
3520
- }), T;
3511
+ }), j.on("dragstart", (b) => {
3512
+ const $ = b;
3513
+ $.lngLat = i.getLngLat(), o.current.props.onDragStart?.($);
3514
+ }), j.on("drag", (b) => {
3515
+ const $ = b;
3516
+ $.lngLat = i.getLngLat(), o.current.props.onDrag?.($);
3517
+ }), j.on("dragend", (b) => {
3518
+ const $ = b;
3519
+ $.lngLat = i.getLngLat(), o.current.props.onDragEnd?.($);
3520
+ }), j;
3521
3521
  }, []);
3522
- R(() => (i.addTo(n.getMap()), () => {
3522
+ I(() => (i.addTo(n.getMap()), () => {
3523
3523
  i.remove();
3524
3524
  }), []);
3525
- const { longitude: s, latitude: a, offset: c, style: u, draggable: d = !1, popup: m = null, rotation: p = 0, rotationAlignment: h = "auto", pitchAlignment: Z = "auto" } = e;
3526
- R(() => {
3527
- H(i.getElement(), u);
3525
+ const { longitude: s, latitude: a, offset: c, style: u, draggable: d = !1, popup: p = null, rotation: m = 0, rotationAlignment: h = "auto", pitchAlignment: S = "auto" } = e;
3526
+ I(() => {
3527
+ G(i.getElement(), u);
3528
3528
  }, [u]), Re(t, () => i, []);
3529
- const E = o.current.props;
3530
- (i.getLngLat().lng !== s || i.getLngLat().lat !== a) && i.setLngLat([s, a]), c && !ca(i.getOffset(), c) && i.setOffset(c), i.isDraggable() !== d && i.setDraggable(d), i.getRotation() !== p && i.setRotation(p), i.getRotationAlignment() !== h && i.setRotationAlignment(h), i.getPitchAlignment() !== Z && i.setPitchAlignment(Z), i.getPopup() !== m && i.setPopup(m);
3531
- const F = gn(E.className, e.className);
3532
- if (F)
3533
- for (const U of F)
3534
- i.toggleClassName(U);
3535
- return o.current.props = e, Mt(e.children, i.getElement());
3536
- })), wa = G(He((e, t) => {
3537
- const { map: n, mapLib: r } = Ie(De), o = B(() => document.createElement("div"), []), i = me({ props: e }), s = B(() => {
3529
+ const Z = o.current.props;
3530
+ (i.getLngLat().lng !== s || i.getLngLat().lat !== a) && i.setLngLat([s, a]), c && !da(i.getOffset(), c) && i.setOffset(c), i.isDraggable() !== d && i.setDraggable(d), i.getRotation() !== m && i.setRotation(m), i.getRotationAlignment() !== h && i.setRotationAlignment(h), i.getPitchAlignment() !== S && i.setPitchAlignment(S), i.getPopup() !== p && i.setPopup(p);
3531
+ const A = vn(Z.className, e.className);
3532
+ if (A)
3533
+ for (const W of A)
3534
+ i.toggleClassName(W);
3535
+ return o.current.props = e, Dt(e.children, i.getElement());
3536
+ })), Sa = q(Ke((e, t) => {
3537
+ const { map: n, mapLib: r } = Ie(De), o = V(() => document.createElement("div"), []), i = de({ props: e }), s = V(() => {
3538
3538
  const a = { ...e }, c = new r.Popup(a);
3539
3539
  return c.setLngLat([e.longitude, e.latitude]), c.once("open", (u) => {
3540
3540
  i.current.props.onOpen?.(u);
3541
3541
  }), c;
3542
3542
  }, []);
3543
- if (R(() => {
3543
+ if (I(() => {
3544
3544
  const a = (c) => {
3545
3545
  i.current.props.onClose?.(c);
3546
3546
  };
3547
3547
  return s.on("close", a), s.setDOMContent(o).addTo(n.getMap()), () => {
3548
3548
  s.off("close", a), s.isOpen() && s.remove();
3549
3549
  };
3550
- }, []), R(() => {
3551
- H(s.getElement(), e.style);
3550
+ }, []), I(() => {
3551
+ G(s.getElement(), e.style);
3552
3552
  }, [e.style]), Re(t, () => s, []), s.isOpen()) {
3553
3553
  const a = i.current.props;
3554
- (s.getLngLat().lng !== e.longitude || s.getLngLat().lat !== e.latitude) && s.setLngLat([e.longitude, e.latitude]), e.offset && !Y(a.offset, e.offset) && s.setOffset(e.offset), (a.anchor !== e.anchor || a.maxWidth !== e.maxWidth) && (s.options.anchor = e.anchor, s.setMaxWidth(e.maxWidth));
3555
- const c = gn(a.className, e.className);
3554
+ (s.getLngLat().lng !== e.longitude || s.getLngLat().lat !== e.latitude) && s.setLngLat([e.longitude, e.latitude]), e.offset && !B(a.offset, e.offset) && s.setOffset(e.offset), (a.anchor !== e.anchor || a.maxWidth !== e.maxWidth) && (s.options.anchor = e.anchor, s.setMaxWidth(e.maxWidth));
3555
+ const c = vn(a.className, e.className);
3556
3556
  if (c)
3557
3557
  for (const u of c)
3558
3558
  s.toggleClassName(u);
3559
3559
  i.current.props = e;
3560
3560
  }
3561
- return Mt(e.children, o);
3561
+ return Dt(e.children, o);
3562
3562
  }));
3563
- function ue(e, t, n, r) {
3564
- const o = Ie(De), i = B(() => e(o), []);
3565
- return R(() => {
3563
+ function ce(e, t, n, r) {
3564
+ const o = Ie(De), i = V(() => e(o), []);
3565
+ return I(() => {
3566
3566
  const s = t, a = null, c = typeof t == "function" ? t : null, { map: u } = o;
3567
3567
  return u.hasControl(i) || (u.addControl(i, s?.position), a && a(o)), () => {
3568
3568
  c && c(o), u.hasControl(i) && u.removeControl(i);
3569
3569
  };
3570
3570
  }, []), i;
3571
3571
  }
3572
- function za(e) {
3573
- const t = ue(({ mapLib: n }) => new n.AttributionControl(e), {
3572
+ function $a(e) {
3573
+ const t = ce(({ mapLib: n }) => new n.AttributionControl(e), {
3574
3574
  position: e.position
3575
3575
  });
3576
- return R(() => {
3577
- H(t._container, e.style);
3576
+ return I(() => {
3577
+ G(t._container, e.style);
3578
3578
  }, [e.style]), null;
3579
3579
  }
3580
- G(za);
3581
- function ka(e) {
3582
- const t = ue(({ mapLib: n }) => new n.FullscreenControl({
3580
+ q($a);
3581
+ function Ea(e) {
3582
+ const t = ce(({ mapLib: n }) => new n.FullscreenControl({
3583
3583
  container: e.containerId && document.getElementById(e.containerId)
3584
3584
  }), { position: e.position });
3585
- return R(() => {
3586
- H(t._controlContainer, e.style);
3585
+ return I(() => {
3586
+ G(t._controlContainer, e.style);
3587
3587
  }, [e.style]), null;
3588
3588
  }
3589
- G(ka);
3590
- function Sa(e, t) {
3591
- const n = me({ props: e }), r = ue(({ mapLib: o }) => {
3589
+ q(Ea);
3590
+ function Oa(e, t) {
3591
+ const n = de({ props: e }), r = ce(({ mapLib: o }) => {
3592
3592
  const i = new o.GeolocateControl(e), s = i._setupUI;
3593
3593
  return i._setupUI = () => {
3594
3594
  i._container.hasChildNodes() || s();
@@ -3604,57 +3604,57 @@ function Sa(e, t) {
3604
3604
  n.current.props.onTrackUserLocationEnd?.(a);
3605
3605
  }), i;
3606
3606
  }, { position: e.position });
3607
- return n.current.props = e, Re(t, () => r, []), R(() => {
3608
- H(r._container, e.style);
3607
+ return n.current.props = e, Re(t, () => r, []), I(() => {
3608
+ G(r._container, e.style);
3609
3609
  }, [e.style]), null;
3610
3610
  }
3611
- G(He(Sa));
3612
- function $a(e) {
3613
- const t = ue(({ mapLib: n }) => new n.NavigationControl(e), {
3611
+ q(Ke(Oa));
3612
+ function Za(e) {
3613
+ const t = ce(({ mapLib: n }) => new n.NavigationControl(e), {
3614
3614
  position: e.position
3615
3615
  });
3616
- return R(() => {
3617
- H(t._container, e.style);
3616
+ return I(() => {
3617
+ G(t._container, e.style);
3618
3618
  }, [e.style]), null;
3619
3619
  }
3620
- const Ea = G($a);
3621
- function Oa(e) {
3622
- const t = ue(({ mapLib: i }) => new i.ScaleControl(e), {
3620
+ const ja = q(Za);
3621
+ function Ta(e) {
3622
+ const t = ce(({ mapLib: i }) => new i.ScaleControl(e), {
3623
3623
  position: e.position
3624
- }), n = me(e), r = n.current;
3624
+ }), n = de(e), r = n.current;
3625
3625
  n.current = e;
3626
3626
  const { style: o } = e;
3627
- return e.maxWidth !== void 0 && e.maxWidth !== r.maxWidth && (t.options.maxWidth = e.maxWidth), e.unit !== void 0 && e.unit !== r.unit && t.setUnit(e.unit), R(() => {
3628
- H(t._container, o);
3627
+ return e.maxWidth !== void 0 && e.maxWidth !== r.maxWidth && (t.options.maxWidth = e.maxWidth), e.unit !== void 0 && e.unit !== r.unit && t.setUnit(e.unit), I(() => {
3628
+ G(t._container, o);
3629
3629
  }, [o]), null;
3630
3630
  }
3631
- G(Oa);
3632
- function Za(e) {
3633
- const t = ue(({ mapLib: n }) => new n.TerrainControl(e), {
3631
+ q(Ta);
3632
+ function Na(e) {
3633
+ const t = ce(({ mapLib: n }) => new n.TerrainControl(e), {
3634
3634
  position: e.position
3635
3635
  });
3636
- return R(() => {
3637
- H(t._container, e.style);
3636
+ return I(() => {
3637
+ G(t._container, e.style);
3638
3638
  }, [e.style]), null;
3639
3639
  }
3640
- G(Za);
3641
- function Ta(e) {
3642
- const t = ue(({ mapLib: n }) => new n.LogoControl(e), { position: e.position });
3643
- return R(() => {
3644
- H(t._container, e.style);
3640
+ q(Na);
3641
+ function xa(e) {
3642
+ const t = ce(({ mapLib: n }) => new n.LogoControl(e), { position: e.position });
3643
+ return I(() => {
3644
+ G(t._container, e.style);
3645
3645
  }, [e.style]), null;
3646
3646
  }
3647
- G(Ta);
3648
- const ja = Is({
3647
+ q(xa);
3648
+ const Pa = Fs({
3649
3649
  latitudeField: be().optional(),
3650
3650
  longitudeField: be().optional(),
3651
3651
  locationField: be().optional(),
3652
3652
  titleField: be().optional(),
3653
3653
  descriptionField: be().optional(),
3654
- zoom: Ye().optional(),
3655
- center: Ds([Ye(), Ye()]).optional()
3654
+ zoom: Be().optional(),
3655
+ center: Ws([Be(), Be()]).optional()
3656
3656
  });
3657
- function Na(e) {
3657
+ function Ca(e) {
3658
3658
  return e.data ? e.data : e.staticData ? {
3659
3659
  provider: "value",
3660
3660
  items: e.staticData
@@ -3663,7 +3663,7 @@ function Na(e) {
3663
3663
  object: e.objectName
3664
3664
  } : null;
3665
3665
  }
3666
- function Pa(e) {
3666
+ function Ia(e) {
3667
3667
  if (e) {
3668
3668
  if (typeof e == "string") {
3669
3669
  const t = e.split(" "), n = t[0], r = t[1]?.toLowerCase() === "desc" ? "desc" : "asc";
@@ -3673,7 +3673,7 @@ function Pa(e) {
3673
3673
  return e.reduce((t, n) => (n.field && n.order && (t[n.field] = n.order), t), {});
3674
3674
  }
3675
3675
  }
3676
- function xa(e) {
3676
+ function Ra(e) {
3677
3677
  if (e.locationField || e.latitudeField)
3678
3678
  return {
3679
3679
  locationField: e.locationField,
@@ -3686,7 +3686,7 @@ function xa(e) {
3686
3686
  };
3687
3687
  let t = null;
3688
3688
  if (e.filter && typeof e.filter == "object" && "map" in e.filter ? t = e.filter.map : e.map && (t = e.map), t) {
3689
- const n = ja.safeParse(t);
3689
+ const n = Pa.safeParse(t);
3690
3690
  return n.success || console.warn("[ObjectMap] Invalid map configuration:", n.error.format()), t;
3691
3691
  }
3692
3692
  return {
@@ -3699,7 +3699,7 @@ function xa(e) {
3699
3699
  center: [0, 0]
3700
3700
  };
3701
3701
  }
3702
- function Ca(e, t) {
3702
+ function Aa(e, t) {
3703
3703
  if (t.latitudeField && t.longitudeField) {
3704
3704
  const n = e[t.latitudeField], r = e[t.longitudeField];
3705
3705
  if (typeof n == "number" && typeof r == "number")
@@ -3725,7 +3725,40 @@ function Ca(e, t) {
3725
3725
  }
3726
3726
  return null;
3727
3727
  }
3728
- const Ia = ({
3728
+ function Ma(e, t, n = 50) {
3729
+ if (e.length <= 1 || t >= 15)
3730
+ return e.map((s) => ({
3731
+ id: s.id,
3732
+ coordinates: s.coordinates,
3733
+ markers: [s],
3734
+ isCluster: !1
3735
+ }));
3736
+ const r = n / Math.pow(2, t), o = /* @__PURE__ */ new Map();
3737
+ e.forEach((s) => {
3738
+ const a = Math.floor(s.coordinates[0] / r), c = Math.floor(s.coordinates[1] / r), u = `${a}:${c}`;
3739
+ o.has(u) || o.set(u, []), o.get(u).push(s);
3740
+ });
3741
+ const i = [];
3742
+ return o.forEach((s, a) => {
3743
+ if (s.length === 1)
3744
+ i.push({
3745
+ id: s[0].id,
3746
+ coordinates: s[0].coordinates,
3747
+ markers: s,
3748
+ isCluster: !1
3749
+ });
3750
+ else {
3751
+ const c = s.reduce((d, p) => d + p.coordinates[0], 0) / s.length, u = s.reduce((d, p) => d + p.coordinates[1], 0) / s.length;
3752
+ i.push({
3753
+ id: `cluster-${a}`,
3754
+ coordinates: [c, u],
3755
+ markers: s,
3756
+ isCluster: !0
3757
+ });
3758
+ }
3759
+ }), i;
3760
+ }
3761
+ const Fa = ({
3729
3762
  schema: e,
3730
3763
  dataSource: t,
3731
3764
  className: n,
@@ -3733,155 +3766,186 @@ const Ia = ({
3733
3766
  onRowClick: o,
3734
3767
  onEdit: i,
3735
3768
  onDelete: s,
3736
- ...a
3769
+ enableClustering: a,
3770
+ clusterRadius: c = 50,
3771
+ ...u
3737
3772
  }) => {
3738
- const [c, u] = oe([]), [d, m] = oe(!0), [p, h] = oe(null), [Z, E] = oe(null), [F, U] = oe(null), [V, T] = oe(""), b = Na(e), v = B(() => b, [JSON.stringify(b)]), M = xa(e), K = v?.provider === "value";
3739
- R(() => {
3773
+ const [d, p] = ee([]), [m, h] = ee(!0), [S, Z] = ee(null), [A, W] = ee(null), [H, j] = ee(null), [b, $] = ee(""), he = Ca(e), M = V(() => he, [JSON.stringify(he)]), F = Ra(e), K = M?.provider === "value";
3774
+ I(() => {
3740
3775
  (async () => {
3741
3776
  try {
3742
- if (m(!0), a.data) {
3743
- const y = a.data;
3777
+ if (h(!0), u.data) {
3778
+ const y = u.data;
3744
3779
  if (Array.isArray(y)) {
3745
- u(y), m(!1);
3780
+ p(y), h(!1);
3746
3781
  return;
3747
3782
  }
3748
3783
  }
3749
3784
  if (e.data) {
3750
3785
  const y = e.data;
3751
3786
  if (Array.isArray(y)) {
3752
- u(y), m(!1);
3787
+ p(y), h(!1);
3753
3788
  return;
3754
3789
  }
3755
3790
  }
3756
- if (K && v?.provider === "value") {
3757
- u(v.items), m(!1);
3791
+ if (K && M?.provider === "value") {
3792
+ p(M.items), h(!1);
3758
3793
  return;
3759
3794
  }
3760
- if (!t)
3795
+ if (!t || typeof t.find != "function")
3761
3796
  throw new Error("DataSource required for object/api providers");
3762
- if (v?.provider === "object") {
3763
- const y = v.object, S = await t.find(y, {
3797
+ if (M?.provider === "object") {
3798
+ const y = M.object, l = kn(A?.fields), _ = await t.find(y, {
3764
3799
  $filter: e.filter,
3765
- $orderby: Pa(e.sort)
3800
+ $orderby: Ia(e.sort),
3801
+ ...l.length > 0 ? { $expand: l } : {}
3766
3802
  });
3767
- let J = [];
3768
- Array.isArray(S) ? J = S : S && typeof S == "object" && (Array.isArray(S.data) ? J = S.data : Array.isArray(S.records) && (J = S.records)), u(J);
3769
- } else v?.provider === "api" && (console.warn("API provider not yet implemented for ObjectMap"), u([]));
3770
- m(!1);
3803
+ let z = Sn(_);
3804
+ p(z);
3805
+ } else M?.provider === "api" && (console.warn("API provider not yet implemented for ObjectMap"), p([]));
3806
+ h(!1);
3771
3807
  } catch (y) {
3772
- h(y), m(!1);
3808
+ Z(y), h(!1);
3773
3809
  }
3774
3810
  })();
3775
- }, [v, t, K, e.filter, e.sort]), R(() => {
3811
+ }, [M, t, K, e.filter, e.sort, A]), I(() => {
3776
3812
  !K && t && (async () => {
3777
3813
  try {
3778
3814
  if (!t) return;
3779
- const y = v?.provider === "object" ? v.object : e.objectName;
3815
+ const y = M?.provider === "object" ? M.object : e.objectName;
3780
3816
  if (!y) return;
3781
- const S = await t.getObjectSchema(y);
3782
- E(S);
3817
+ const l = await t.getObjectSchema(y);
3818
+ W(l);
3783
3819
  } catch (y) {
3784
3820
  console.error("Failed to fetch object schema:", y);
3785
3821
  }
3786
3822
  })();
3787
- }, [e.objectName, t, K, v]);
3788
- const { markers: X, invalidCount: ne } = B(() => {
3789
- let k = 0;
3790
- return { markers: c.map((S, J) => {
3791
- const re = Ca(S, M);
3792
- if (!re)
3793
- return k++, null;
3794
- const le = M.titleField ? S[M.titleField] : "Marker", Q = M.descriptionField ? S[M.descriptionField] : void 0, [f, _] = re;
3795
- return !isFinite(f) || !isFinite(_) || f < -90 || f > 90 || _ < -180 || _ > 180 ? (k++, null) : {
3796
- id: S.id || S._id || `marker-${J}`,
3797
- title: le,
3798
- description: Q,
3799
- coordinates: [_, f],
3823
+ }, [e.objectName, t, K, M]);
3824
+ const { markers: X, invalidCount: ge } = V(() => {
3825
+ let v = 0;
3826
+ return { markers: d.map((l, _) => {
3827
+ const z = Aa(l, F);
3828
+ if (!z)
3829
+ return v++, null;
3830
+ const T = F.titleField ? l[F.titleField] : "Marker", Y = F.descriptionField ? l[F.descriptionField] : void 0, [Q, E] = z;
3831
+ return !isFinite(Q) || !isFinite(E) || Q < -90 || Q > 90 || E < -180 || E > 180 ? (v++, null) : {
3832
+ id: l.id || l._id || `marker-${_}`,
3833
+ title: T,
3834
+ description: Y,
3835
+ coordinates: [E, Q],
3800
3836
  // maplibre uses [lng, lat]
3801
- data: S
3837
+ data: l
3802
3838
  };
3803
- }).filter((S) => S !== null), invalidCount: k };
3804
- }, [c, M]), W = B(
3805
- () => X.find((k) => k.id === F),
3806
- [X, F]
3807
- ), _e = wn({
3839
+ }).filter((l) => l !== null), invalidCount: v };
3840
+ }, [d, F]), D = V(
3841
+ () => X.find((v) => v.id === H),
3842
+ [X, H]
3843
+ ), [_e, Ue] = ee(F.zoom || 3), re = $n({
3808
3844
  navigation: e.navigation,
3809
3845
  objectName: e.objectName,
3810
3846
  onRowClick: o
3811
- }), q = B(() => {
3812
- if (!V.trim()) return X;
3813
- const k = V.toLowerCase();
3847
+ }), J = V(() => {
3848
+ if (!b.trim()) return X;
3849
+ const v = b.toLowerCase();
3814
3850
  return X.filter(
3815
- (y) => y.title?.toLowerCase().includes(k) || y.description?.toLowerCase().includes(k)
3851
+ (y) => y.title?.toLowerCase().includes(v) || y.description?.toLowerCase().includes(v)
3816
3852
  );
3817
- }, [X, V]), Se = B(() => {
3818
- if (!q.length)
3853
+ }, [X, b]), Se = V(() => a ?? (e.enableClustering || J.length > 100) ? Ma(J, _e, c) : J.map((y) => ({
3854
+ id: y.id,
3855
+ coordinates: y.coordinates,
3856
+ markers: [y],
3857
+ isCluster: !1
3858
+ })), [J, _e, a, c, e]), $e = V(() => {
3859
+ if (!J.length)
3819
3860
  return {
3820
- longitude: M.center?.[1] || 0,
3821
- latitude: M.center?.[0] || 0,
3822
- zoom: M.zoom || 2
3861
+ longitude: F.center?.[1] || 0,
3862
+ latitude: F.center?.[0] || 0,
3863
+ zoom: F.zoom || 2
3823
3864
  };
3824
- const k = q.map((Q) => Q.coordinates[0]), y = q.map((Q) => Q.coordinates[1]), S = Math.min(...k), J = Math.max(...k), re = Math.min(...y), le = Math.max(...y);
3865
+ const v = J.map((Y) => Y.coordinates[0]), y = J.map((Y) => Y.coordinates[1]), l = Math.min(...v), _ = Math.max(...v), z = Math.min(...y), T = Math.max(...y);
3825
3866
  return {
3826
- longitude: (S + J) / 2,
3827
- latitude: (re + le) / 2,
3828
- zoom: M.zoom || 3
3867
+ longitude: (l + _) / 2,
3868
+ latitude: (z + T) / 2,
3869
+ zoom: F.zoom || 3
3829
3870
  // Auto-zoom logic could be improved here
3830
3871
  };
3831
- }, [q, M]);
3832
- return d ? /* @__PURE__ */ z.jsx("div", { className: n, children: /* @__PURE__ */ z.jsx("div", { className: "flex items-center justify-center h-96 bg-muted rounded-lg border", children: /* @__PURE__ */ z.jsx("div", { className: "text-muted-foreground", children: "Loading map..." }) }) }) : p ? /* @__PURE__ */ z.jsx("div", { className: n, children: /* @__PURE__ */ z.jsx("div", { className: "flex items-center justify-center h-96 bg-muted rounded-lg border", children: /* @__PURE__ */ z.jsxs("div", { className: "text-destructive", children: [
3872
+ }, [J, F]);
3873
+ return m ? /* @__PURE__ */ w.jsx("div", { className: Ve("min-w-0 overflow-hidden", n), children: /* @__PURE__ */ w.jsx("div", { className: "flex items-center justify-center h-96 bg-muted rounded-lg border", children: /* @__PURE__ */ w.jsx("div", { className: "text-muted-foreground", children: "Loading map..." }) }) }) : S ? /* @__PURE__ */ w.jsx("div", { className: Ve("min-w-0 overflow-hidden", n), children: /* @__PURE__ */ w.jsx("div", { className: "flex items-center justify-center h-96 bg-muted rounded-lg border", children: /* @__PURE__ */ w.jsxs("div", { className: "text-destructive", children: [
3833
3874
  "Error: ",
3834
- p.message
3835
- ] }) }) }) : /* @__PURE__ */ z.jsxs("div", { className: n, children: [
3836
- ne > 0 && /* @__PURE__ */ z.jsx("div", { className: "mb-2 p-2 text-sm text-yellow-800 bg-yellow-50 border border-yellow-200 rounded", children: `${ne} record${ne !== 1 ? "s" : ""} with missing or invalid coordinates excluded from the map.` }),
3837
- X.length > 0 && /* @__PURE__ */ z.jsx("div", { className: "mb-2", children: /* @__PURE__ */ z.jsx(
3875
+ S.message
3876
+ ] }) }) }) : /* @__PURE__ */ w.jsxs("div", { className: Ve("min-w-0 overflow-hidden", n), children: [
3877
+ ge > 0 && /* @__PURE__ */ w.jsx("div", { className: "mb-2 p-2 text-sm text-yellow-800 bg-yellow-50 border border-yellow-200 rounded", children: `${ge} record${ge !== 1 ? "s" : ""} with missing or invalid coordinates excluded from the map.` }),
3878
+ X.length > 0 && /* @__PURE__ */ w.jsx("div", { className: "mb-2", children: /* @__PURE__ */ w.jsx(
3838
3879
  "input",
3839
3880
  {
3840
3881
  type: "text",
3841
- value: V,
3842
- onChange: (k) => T(k.target.value),
3882
+ value: b,
3883
+ onChange: (v) => $(v.target.value),
3843
3884
  placeholder: "Search locations…",
3844
3885
  className: "w-full px-3 py-2 text-sm border rounded-md bg-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring"
3845
3886
  }
3846
3887
  ) }),
3847
- /* @__PURE__ */ z.jsx("div", { className: "relative border rounded-lg overflow-hidden bg-muted h-[300px] sm:h-[400px] md:h-[500px] lg:h-[600px] w-full", children: /* @__PURE__ */ z.jsxs(
3848
- va,
3888
+ /* @__PURE__ */ w.jsx("div", { className: "relative border rounded-lg overflow-hidden bg-muted h-[300px] sm:h-[400px] md:h-[500px] lg:h-[600px] w-full", children: /* @__PURE__ */ w.jsxs(
3889
+ za,
3849
3890
  {
3850
- initialViewState: Se,
3891
+ initialViewState: $e,
3851
3892
  style: { width: "100%", height: "100%" },
3852
3893
  mapStyle: "https://demotiles.maplibre.org/style.json",
3853
3894
  touchZoomRotate: !0,
3854
3895
  dragRotate: !0,
3855
3896
  touchPitch: !0,
3897
+ onZoom: (v) => Ue(Math.round(v.viewState.zoom)),
3856
3898
  children: [
3857
- /* @__PURE__ */ z.jsx(Ea, { position: "top-right", showCompass: !0, showZoom: !0 }),
3858
- q.map((k) => /* @__PURE__ */ z.jsx(
3859
- ba,
3899
+ /* @__PURE__ */ w.jsx(ja, { position: "top-right", showCompass: !0, showZoom: !0 }),
3900
+ Se.map((v) => v.isCluster ? /* @__PURE__ */ w.jsx(
3901
+ Ft,
3902
+ {
3903
+ longitude: v.coordinates[0],
3904
+ latitude: v.coordinates[1],
3905
+ anchor: "center",
3906
+ children: /* @__PURE__ */ w.jsx(
3907
+ "div",
3908
+ {
3909
+ className: "flex items-center justify-center rounded-full bg-primary text-primary-foreground font-bold text-xs cursor-pointer hover:scale-110 transition-transform shadow-md",
3910
+ style: {
3911
+ width: Math.min(48, 24 + v.markers.length * 2),
3912
+ height: Math.min(48, 24 + v.markers.length * 2)
3913
+ },
3914
+ title: `${v.markers.length} markers`,
3915
+ children: v.markers.length
3916
+ }
3917
+ )
3918
+ },
3919
+ v.id
3920
+ ) : /* @__PURE__ */ w.jsx(
3921
+ Ft,
3860
3922
  {
3861
- longitude: k.coordinates[0],
3862
- latitude: k.coordinates[1],
3923
+ longitude: v.coordinates[0],
3924
+ latitude: v.coordinates[1],
3863
3925
  anchor: "bottom",
3864
3926
  onClick: (y) => {
3865
- y.originalEvent.stopPropagation(), U(k.id), _e.handleClick(k.data), r?.(k.data);
3927
+ y.originalEvent.stopPropagation();
3928
+ const l = v.markers[0];
3929
+ j(l.id), re.handleClick(l.data), r?.(l.data);
3866
3930
  },
3867
- children: /* @__PURE__ */ z.jsx("div", { className: "text-2xl cursor-pointer hover:scale-110 transition-transform", children: "📍" })
3931
+ children: /* @__PURE__ */ w.jsx("div", { className: "text-2xl cursor-pointer hover:scale-110 transition-transform", children: "📍" })
3868
3932
  },
3869
- k.id
3933
+ v.id
3870
3934
  )),
3871
- W && /* @__PURE__ */ z.jsx(
3872
- wa,
3935
+ D && /* @__PURE__ */ w.jsx(
3936
+ Sa,
3873
3937
  {
3874
- longitude: W.coordinates[0],
3875
- latitude: W.coordinates[1],
3938
+ longitude: D.coordinates[0],
3939
+ latitude: D.coordinates[1],
3876
3940
  anchor: "top",
3877
- onClose: () => U(null),
3941
+ onClose: () => j(null),
3878
3942
  closeOnClick: !1,
3879
- children: /* @__PURE__ */ z.jsxs("div", { className: "p-2 min-w-[150px] sm:min-w-[200px]", children: [
3880
- /* @__PURE__ */ z.jsx("h3", { className: "font-bold text-sm mb-1", children: W.title }),
3881
- W.description && /* @__PURE__ */ z.jsx("p", { className: "text-xs text-muted-foreground", children: W.description }),
3882
- /* @__PURE__ */ z.jsxs("div", { className: "mt-2 text-xs flex gap-2", children: [
3883
- i && /* @__PURE__ */ z.jsx("button", { className: "text-blue-500 hover:underline", onClick: () => i(W.data), children: "Edit" }),
3884
- s && /* @__PURE__ */ z.jsx("button", { className: "text-red-500 hover:underline", onClick: () => s(W.data), children: "Delete" })
3943
+ children: /* @__PURE__ */ w.jsxs("div", { className: "p-2 min-w-[150px] sm:min-w-[200px]", children: [
3944
+ /* @__PURE__ */ w.jsx("h3", { className: "font-bold text-sm mb-1", children: D.title }),
3945
+ D.description && /* @__PURE__ */ w.jsx("p", { className: "text-xs text-muted-foreground", children: D.description }),
3946
+ /* @__PURE__ */ w.jsxs("div", { className: "mt-2 text-xs flex gap-2", children: [
3947
+ i && /* @__PURE__ */ w.jsx("button", { className: "text-blue-500 hover:underline", onClick: () => i(D.data), children: "Edit" }),
3948
+ s && /* @__PURE__ */ w.jsx("button", { className: "text-red-500 hover:underline", onClick: () => s(D.data), children: "Delete" })
3885
3949
  ] })
3886
3950
  ] })
3887
3951
  }
@@ -3889,17 +3953,17 @@ const Ia = ({
3889
3953
  ]
3890
3954
  }
3891
3955
  ) }),
3892
- _e.isOverlay && /* @__PURE__ */ z.jsx(kn, { ..._e, title: "Location Details", children: (k) => /* @__PURE__ */ z.jsx("div", { className: "space-y-3", children: Object.entries(k).map(([y, S]) => /* @__PURE__ */ z.jsxs("div", { className: "flex flex-col", children: [
3893
- /* @__PURE__ */ z.jsx("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide", children: y.replace(/_/g, " ") }),
3894
- /* @__PURE__ */ z.jsx("span", { className: "text-sm", children: String(S ?? "—") })
3956
+ re.isOverlay && /* @__PURE__ */ w.jsx(On, { ...re, title: "Location Details", children: (v) => /* @__PURE__ */ w.jsx("div", { className: "space-y-3", children: Object.entries(v).map(([y, l]) => /* @__PURE__ */ w.jsxs("div", { className: "flex flex-col", children: [
3957
+ /* @__PURE__ */ w.jsx("span", { className: "text-xs font-medium text-muted-foreground uppercase tracking-wide", children: y.replace(/_/g, " ") }),
3958
+ /* @__PURE__ */ w.jsx("span", { className: "text-sm", children: String(l ?? "—") })
3895
3959
  ] }, y)) }) })
3896
3960
  ] });
3897
- }, _n = ({ schema: e, ...t }) => {
3898
- const { dataSource: n } = zn();
3899
- return /* @__PURE__ */ z.jsx(Ia, { schema: e, dataSource: n, ...t });
3961
+ }, yn = ({ schema: e, ...t }) => {
3962
+ const { dataSource: n } = En() || {};
3963
+ return /* @__PURE__ */ w.jsx(Fa, { schema: e, dataSource: n, ...t });
3900
3964
  };
3901
3965
  console.log("Registering object-map...");
3902
- Ft.register("object-map", _n, {
3966
+ Lt.register("object-map", yn, {
3903
3967
  namespace: "plugin-map",
3904
3968
  label: "Object Map",
3905
3969
  category: "view",
@@ -3908,7 +3972,7 @@ Ft.register("object-map", _n, {
3908
3972
  { name: "map", type: "object", label: "Map Config", description: "latitudeField, longitudeField, titleField" }
3909
3973
  ]
3910
3974
  });
3911
- Ft.register("map", _n, {
3975
+ Lt.register("map", yn, {
3912
3976
  namespace: "view",
3913
3977
  label: "Map View",
3914
3978
  category: "view",
@@ -3918,6 +3982,6 @@ Ft.register("map", _n, {
3918
3982
  ]
3919
3983
  });
3920
3984
  export {
3921
- Ia as ObjectMap,
3922
- _n as ObjectMapRenderer
3985
+ Fa as ObjectMap,
3986
+ yn as ObjectMapRenderer
3923
3987
  };