@noxickon/onyx 0.0.3 → 0.0.4-dev.2

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.
Files changed (40) hide show
  1. package/dist/chunks/Button-D-v4l8ZE.js +20 -0
  2. package/dist/chunks/{Button-BV4_pmoH.js → Button-bARrxYyo.js} +120 -121
  3. package/dist/chunks/Input-CLi1H63d.js +1 -0
  4. package/dist/chunks/{Input-BraK4lDE.js → Input-dfvmdIHi.js} +38 -38
  5. package/dist/chunks/errorHelper--G-SWQzN.js +18 -0
  6. package/dist/chunks/errorHelper-DaP_XxEx.js +1 -0
  7. package/dist/chunks/formatTimestamp-CMxOnPo1.js +12 -0
  8. package/dist/chunks/formatTimestamp-TTsNcy7u.js +1 -0
  9. package/dist/chunks/{index-DnVdNmco.js → useAuth-DDRXztKj.js} +240 -178
  10. package/dist/chunks/{index-DGjVEo0G.js → useAuth-DPnpY3XC.js} +18 -9
  11. package/dist/chunks/{useForm-BAbY8X4X.js → useForm-D4co95Vn.js} +785 -801
  12. package/dist/chunks/useForm-DUviJ7xS.js +18 -0
  13. package/dist/chunks/useQuery-BvCyJMae.js +2065 -0
  14. package/dist/chunks/useQuery-DTNHO7so.js +3 -0
  15. package/dist/context/context.cjs.js +1 -1
  16. package/dist/context/context.es.js +1 -1
  17. package/dist/context.d.ts +1 -0
  18. package/dist/hooks/hooks.cjs.js +6 -6
  19. package/dist/hooks/hooks.es.js +117 -118
  20. package/dist/index.css +1 -1
  21. package/dist/index.d.ts +18 -0
  22. package/dist/layout/layout.cjs.js +1 -1
  23. package/dist/layout/layout.es.js +1 -1
  24. package/dist/onyx.cjs.js +1 -1
  25. package/dist/onyx.es.js +425 -386
  26. package/dist/pages/pages.cjs.js +8 -2
  27. package/dist/pages/pages.es.js +34 -24
  28. package/dist/utils/utils.cjs.js +1 -0
  29. package/dist/utils/utils.es.js +8 -0
  30. package/dist/utils.d.ts +29 -0
  31. package/package.json +31 -26
  32. package/dist/chunks/Button-CU-zvMVL.js +0 -20
  33. package/dist/chunks/Input-C5dK8VSu.js +0 -1
  34. package/dist/chunks/index-Dgwp7JKP.js +0 -601
  35. package/dist/chunks/index-rUH_mzKt.js +0 -2
  36. package/dist/chunks/useAuth-BwjRd05B.js +0 -10
  37. package/dist/chunks/useAuth-CR3bAGqp.js +0 -61
  38. package/dist/chunks/useForm-cxgyAiOs.js +0 -26
  39. package/dist/chunks/useQuery--6GP2-dN.js +0 -2
  40. package/dist/chunks/useQuery-mFRa2XuW.js +0 -1481
@@ -1,13 +1,13 @@
1
- import { useState as Ee, useMemo as Ae, useCallback as P, useRef as fn } from "react";
2
- import { i as Oe } from "./isObject-vmP43YLW.js";
3
- import { k as N, p as ln, u as dn, v as hn, D as pn, _ as pe, o as mn, j as gn, e as Se } from "./index-Dgwp7JKP.js";
4
- function _n(e) {
1
+ import { useState as Ee, useMemo as Ae, useCallback as S, useRef as ln } from "react";
2
+ import { i as xe } from "./isObject-vmP43YLW.js";
3
+ import { r as N, d as pn, e as mn, v as hn, D as dn, _ as he, m as gn, A as _n, f as Oe } from "./useQuery-BvCyJMae.js";
4
+ function vn(e) {
5
5
  return Number.isSafeInteger(e) && e >= 0;
6
6
  }
7
- function vn(e) {
8
- return e != null && typeof e != "function" && _n(e.length);
7
+ function bn(e) {
8
+ return e != null && typeof e != "function" && vn(e.length);
9
9
  }
10
- function ue(e) {
10
+ function ce(e) {
11
11
  return e === "__proto__";
12
12
  }
13
13
  function nt(e) {
@@ -20,10 +20,9 @@ function nt(e) {
20
20
  }
21
21
  }
22
22
  function rt(e) {
23
- var t;
24
- return typeof e == "string" || typeof e == "symbol" ? e : Object.is((t = e == null ? void 0 : e.valueOf) == null ? void 0 : t.call(e), -0) ? "-0" : String(e);
23
+ return typeof e == "string" || typeof e == "symbol" ? e : Object.is(e?.valueOf?.(), -0) ? "-0" : String(e);
25
24
  }
26
- function ze(e) {
25
+ function we(e) {
27
26
  const t = [], n = e.length;
28
27
  if (n === 0)
29
28
  return t;
@@ -39,10 +38,10 @@ function ot(e, t, n) {
39
38
  return n;
40
39
  switch (typeof t) {
41
40
  case "string": {
42
- if (ue(t))
41
+ if (ce(t))
43
42
  return n;
44
43
  const r = e[t];
45
- return r === void 0 ? nt(t) ? ot(e, ze(t), n) : n : r;
44
+ return r === void 0 ? nt(t) ? ot(e, we(t), n) : n : r;
46
45
  }
47
46
  case "number":
48
47
  case "symbol": {
@@ -52,46 +51,46 @@ function ot(e, t, n) {
52
51
  }
53
52
  default: {
54
53
  if (Array.isArray(t))
55
- return bn(e, t, n);
56
- if (Object.is(t == null ? void 0 : t.valueOf(), -0) ? t = "-0" : t = String(t), ue(t))
54
+ return yn(e, t, n);
55
+ if (Object.is(t?.valueOf(), -0) ? t = "-0" : t = String(t), ce(t))
57
56
  return n;
58
57
  const r = e[t];
59
58
  return r === void 0 ? n : r;
60
59
  }
61
60
  }
62
61
  }
63
- function bn(e, t, n) {
62
+ function yn(e, t, n) {
64
63
  if (t.length === 0)
65
64
  return n;
66
65
  let r = e;
67
66
  for (let o = 0; o < t.length; o++) {
68
- if (r == null || ue(t[o]))
67
+ if (r == null || ce(t[o]))
69
68
  return n;
70
69
  r = r[t[o]];
71
70
  }
72
71
  return r === void 0 ? n : r;
73
72
  }
74
- function yn(e) {
73
+ function zn(e) {
75
74
  return e == null || typeof e != "object" && typeof e != "function";
76
75
  }
77
76
  function it(e, t) {
78
77
  return e === t || Number.isNaN(e) && Number.isNaN(t);
79
78
  }
80
- function me(e) {
79
+ function de(e) {
81
80
  return Object.getOwnPropertySymbols(e).filter((t) => Object.prototype.propertyIsEnumerable.call(e, t));
82
81
  }
83
- function ce(e) {
82
+ function ue(e) {
84
83
  return e == null ? e === void 0 ? "[object Undefined]" : "[object Null]" : Object.prototype.toString.call(e);
85
84
  }
86
- const st = "[object RegExp]", ut = "[object String]", ct = "[object Number]", at = "[object Boolean]", ge = "[object Arguments]", ft = "[object Symbol]", lt = "[object Date]", dt = "[object Map]", ht = "[object Set]", pt = "[object Array]", zn = "[object Function]", mt = "[object ArrayBuffer]", oe = "[object Object]", wn = "[object Error]", gt = "[object DataView]", _t = "[object Uint8Array]", vt = "[object Uint8ClampedArray]", bt = "[object Uint16Array]", yt = "[object Uint32Array]", $n = "[object BigUint64Array]", zt = "[object Int8Array]", wt = "[object Int16Array]", $t = "[object Int32Array]", Zn = "[object BigInt64Array]", Zt = "[object Float32Array]", kt = "[object Float64Array]";
85
+ const st = "[object RegExp]", ct = "[object String]", ut = "[object Number]", at = "[object Boolean]", ge = "[object Arguments]", ft = "[object Symbol]", lt = "[object Date]", pt = "[object Map]", mt = "[object Set]", ht = "[object Array]", wn = "[object Function]", dt = "[object ArrayBuffer]", oe = "[object Object]", $n = "[object Error]", gt = "[object DataView]", _t = "[object Uint8Array]", vt = "[object Uint8ClampedArray]", bt = "[object Uint16Array]", yt = "[object Uint32Array]", Zn = "[object BigUint64Array]", zt = "[object Int8Array]", wt = "[object Int16Array]", $t = "[object Int32Array]", kn = "[object BigInt64Array]", Zt = "[object Float32Array]", kt = "[object Float64Array]";
87
86
  function It(e) {
88
87
  return ArrayBuffer.isView(e) && !(e instanceof DataView);
89
88
  }
90
- function L(e, t, n, r = /* @__PURE__ */ new Map(), o = void 0) {
91
- const i = o == null ? void 0 : o(e, t, n, r);
89
+ function B(e, t, n, r = /* @__PURE__ */ new Map(), o = void 0) {
90
+ const i = o?.(e, t, n, r);
92
91
  if (i != null)
93
92
  return i;
94
- if (yn(e))
93
+ if (zn(e))
95
94
  return e;
96
95
  if (r.has(e))
97
96
  return r.get(e);
@@ -99,7 +98,7 @@ function L(e, t, n, r = /* @__PURE__ */ new Map(), o = void 0) {
99
98
  const s = new Array(e.length);
100
99
  r.set(e, s);
101
100
  for (let u = 0; u < e.length; u++)
102
- s[u] = L(e[u], u, n, r, o);
101
+ s[u] = B(e[u], u, n, r, o);
103
102
  return Object.hasOwn(e, "index") && (s.index = e.index), Object.hasOwn(e, "input") && (s.input = e.input), s;
104
103
  }
105
104
  if (e instanceof Date)
@@ -111,15 +110,15 @@ function L(e, t, n, r = /* @__PURE__ */ new Map(), o = void 0) {
111
110
  if (e instanceof Map) {
112
111
  const s = /* @__PURE__ */ new Map();
113
112
  r.set(e, s);
114
- for (const [u, a] of e)
115
- s.set(u, L(a, u, n, r, o));
113
+ for (const [u, f] of e)
114
+ s.set(u, B(f, u, n, r, o));
116
115
  return s;
117
116
  }
118
117
  if (e instanceof Set) {
119
118
  const s = /* @__PURE__ */ new Set();
120
119
  r.set(e, s);
121
120
  for (const u of e)
122
- s.add(L(u, void 0, n, r, o));
121
+ s.add(B(u, void 0, n, r, o));
123
122
  return s;
124
123
  }
125
124
  if (typeof Buffer < "u" && Buffer.isBuffer(e))
@@ -128,7 +127,7 @@ function L(e, t, n, r = /* @__PURE__ */ new Map(), o = void 0) {
128
127
  const s = new (Object.getPrototypeOf(e)).constructor(e.length);
129
128
  r.set(e, s);
130
129
  for (let u = 0; u < e.length; u++)
131
- s[u] = L(e[u], u, n, r, o);
130
+ s[u] = B(e[u], u, n, r, o);
132
131
  return s;
133
132
  }
134
133
  if (e instanceof ArrayBuffer || typeof SharedArrayBuffer < "u" && e instanceof SharedArrayBuffer)
@@ -151,24 +150,24 @@ function L(e, t, n, r = /* @__PURE__ */ new Map(), o = void 0) {
151
150
  const s = new e.constructor();
152
151
  return r.set(e, s), s.message = e.message, s.name = e.name, s.stack = e.stack, s.cause = e.cause, V(s, e, n, r, o), s;
153
152
  }
154
- if (typeof e == "object" && kn(e)) {
153
+ if (typeof e == "object" && In(e)) {
155
154
  const s = Object.create(Object.getPrototypeOf(e));
156
155
  return r.set(e, s), V(s, e, n, r, o), s;
157
156
  }
158
157
  return e;
159
158
  }
160
159
  function V(e, t, n = e, r, o) {
161
- const i = [...Object.keys(t), ...me(t)];
160
+ const i = [...Object.keys(t), ...de(t)];
162
161
  for (let s = 0; s < i.length; s++) {
163
- const u = i[s], a = Object.getOwnPropertyDescriptor(e, u);
164
- (a == null || a.writable) && (e[u] = L(t[u], u, n, r, o));
162
+ const u = i[s], f = Object.getOwnPropertyDescriptor(e, u);
163
+ (f == null || f.writable) && (e[u] = B(t[u], u, n, r, o));
165
164
  }
166
165
  }
167
- function kn(e) {
168
- switch (ce(e)) {
166
+ function In(e) {
167
+ switch (ue(e)) {
169
168
  case ge:
170
- case pt:
171
- case mt:
169
+ case ht:
170
+ case dt:
172
171
  case gt:
173
172
  case at:
174
173
  case lt:
@@ -177,12 +176,12 @@ function kn(e) {
177
176
  case zt:
178
177
  case wt:
179
178
  case $t:
180
- case dt:
181
- case ct:
179
+ case pt:
180
+ case ut:
182
181
  case oe:
183
182
  case st:
184
- case ht:
185
- case ut:
183
+ case mt:
184
+ case ct:
186
185
  case ft:
187
186
  case _t:
188
187
  case vt:
@@ -193,10 +192,10 @@ function kn(e) {
193
192
  return !1;
194
193
  }
195
194
  }
196
- function In(e) {
197
- return L(e, void 0, e, /* @__PURE__ */ new Map(), void 0);
195
+ function En(e) {
196
+ return B(e, void 0, e, /* @__PURE__ */ new Map(), void 0);
198
197
  }
199
- const En = /^(?:0|[1-9]\d*)$/;
198
+ const An = /^(?:0|[1-9]\d*)$/;
200
199
  function Et(e, t = Number.MAX_SAFE_INTEGER) {
201
200
  switch (typeof e) {
202
201
  case "number":
@@ -204,15 +203,15 @@ function Et(e, t = Number.MAX_SAFE_INTEGER) {
204
203
  case "symbol":
205
204
  return !1;
206
205
  case "string":
207
- return En.test(e);
206
+ return An.test(e);
208
207
  }
209
208
  }
210
209
  function At(e) {
211
- return e !== null && typeof e == "object" && ce(e) === "[object Arguments]";
210
+ return e !== null && typeof e == "object" && ue(e) === "[object Arguments]";
212
211
  }
213
212
  function Q(e, t) {
214
213
  let n;
215
- if (Array.isArray(t) ? n = t : typeof t == "string" && nt(t) && (e == null ? void 0 : e[t]) == null ? n = ze(t) : n = [t], n.length === 0)
214
+ if (Array.isArray(t) ? n = t : typeof t == "string" && nt(t) && e?.[t] == null ? n = we(t) : n = [t], n.length === 0)
216
215
  return !1;
217
216
  let r = e;
218
217
  for (let o = 0; o < n.length; o++) {
@@ -223,51 +222,51 @@ function Q(e, t) {
223
222
  }
224
223
  return !0;
225
224
  }
226
- function An(e) {
225
+ function xn(e) {
227
226
  return typeof e == "symbol" || e instanceof Symbol;
228
227
  }
229
228
  const On = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Sn = /^\w*$/;
230
- function xn(e, t) {
231
- return Array.isArray(e) ? !1 : typeof e == "number" || typeof e == "boolean" || e == null || An(e) ? !0 : typeof e == "string" && (Sn.test(e) || !On.test(e)) || t != null && Object.hasOwn(t, e);
229
+ function Pn(e, t) {
230
+ return Array.isArray(e) ? !1 : typeof e == "number" || typeof e == "boolean" || e == null || xn(e) ? !0 : typeof e == "string" && (Sn.test(e) || !On.test(e)) || t != null && Object.hasOwn(t, e);
232
231
  }
233
- const Pn = (e, t, n) => {
232
+ const jn = (e, t, n) => {
234
233
  const r = e[t];
235
234
  (!(Object.hasOwn(e, t) && it(r, n)) || n === void 0 && !(t in e)) && (e[t] = n);
236
235
  };
237
- function jn(e, t, n, r) {
238
- if (e == null && !Oe(e))
236
+ function Nn(e, t, n, r) {
237
+ if (e == null && !xe(e))
239
238
  return e;
240
- const o = xn(t, e) ? [t] : Array.isArray(t) ? t : typeof t == "string" ? ze(t) : [t];
239
+ const o = Pn(t, e) ? [t] : Array.isArray(t) ? t : typeof t == "string" ? we(t) : [t];
241
240
  let i = e;
242
241
  for (let s = 0; s < o.length && i != null; s++) {
243
242
  const u = rt(o[s]);
244
- if (ue(u))
243
+ if (ce(u))
245
244
  continue;
246
- let a;
245
+ let f;
247
246
  if (s === o.length - 1)
248
- a = n(i[u]);
247
+ f = n(i[u]);
249
248
  else {
250
- const f = i[u], g = r == null ? void 0 : r(f, u, e);
251
- a = g !== void 0 ? g : Oe(f) ? f : Et(o[s + 1]) ? [] : {};
249
+ const a = i[u], g = r?.(a, u, e);
250
+ f = g !== void 0 ? g : xe(a) ? a : Et(o[s + 1]) ? [] : {};
252
251
  }
253
- Pn(i, u, a), i = i[u];
252
+ jn(i, u, f), i = i[u];
254
253
  }
255
254
  return e;
256
255
  }
257
- function Nn(e, t, n) {
258
- return jn(e, t, () => n, () => {
256
+ function Dn(e, t, n) {
257
+ return Nn(e, t, () => n, () => {
259
258
  });
260
259
  }
261
- function xe(e) {
260
+ function Se(e) {
262
261
  if (!e || typeof e != "object")
263
262
  return !1;
264
263
  const t = Object.getPrototypeOf(e);
265
264
  return t === null || t === Object.prototype || Object.getPrototypeOf(t) === null ? Object.prototype.toString.call(e) === "[object Object]" : !1;
266
265
  }
267
266
  function Rn(e, t, n) {
268
- return K(e, t, void 0, void 0, void 0, void 0, n);
267
+ return G(e, t, void 0, void 0, void 0, void 0, n);
269
268
  }
270
- function K(e, t, n, r, o, i, s) {
269
+ function G(e, t, n, r, o, i, s) {
271
270
  const u = s(e, t, n, r, o, i);
272
271
  if (u !== void 0)
273
272
  return u;
@@ -291,15 +290,15 @@ function K(e, t, n, r, o, i, s) {
291
290
  function C(e, t, n, r) {
292
291
  if (Object.is(e, t))
293
292
  return !0;
294
- let o = ce(e), i = ce(t);
293
+ let o = ue(e), i = ue(t);
295
294
  if (o === ge && (o = oe), i === ge && (i = oe), o !== i)
296
295
  return !1;
297
296
  switch (o) {
298
- case ut:
297
+ case ct:
299
298
  return e.toString() === t.toString();
300
- case ct: {
301
- const a = e.valueOf(), f = t.valueOf();
302
- return it(a, f);
299
+ case ut: {
300
+ const f = e.valueOf(), a = t.valueOf();
301
+ return it(f, a);
303
302
  }
304
303
  case at:
305
304
  case lt:
@@ -307,7 +306,7 @@ function C(e, t, n, r) {
307
306
  return Object.is(e.valueOf(), t.valueOf());
308
307
  case st:
309
308
  return e.source === t.source && e.flags === t.flags;
310
- case zn:
309
+ case wn:
311
310
  return e === t;
312
311
  }
313
312
  n = n ?? /* @__PURE__ */ new Map();
@@ -317,63 +316,63 @@ function C(e, t, n, r) {
317
316
  n.set(e, t), n.set(t, e);
318
317
  try {
319
318
  switch (o) {
320
- case dt: {
319
+ case pt: {
321
320
  if (e.size !== t.size)
322
321
  return !1;
323
- for (const [a, f] of e.entries())
324
- if (!t.has(a) || !K(f, t.get(a), a, e, t, n, r))
322
+ for (const [f, a] of e.entries())
323
+ if (!t.has(f) || !G(a, t.get(f), f, e, t, n, r))
325
324
  return !1;
326
325
  return !0;
327
326
  }
328
- case ht: {
327
+ case mt: {
329
328
  if (e.size !== t.size)
330
329
  return !1;
331
- const a = Array.from(e.values()), f = Array.from(t.values());
332
- for (let g = 0; g < a.length; g++) {
333
- const d = a[g], h = f.findIndex((m) => K(d, m, void 0, e, t, n, r));
334
- if (h === -1)
330
+ const f = Array.from(e.values()), a = Array.from(t.values());
331
+ for (let g = 0; g < f.length; g++) {
332
+ const p = f[g], m = a.findIndex((h) => G(p, h, void 0, e, t, n, r));
333
+ if (m === -1)
335
334
  return !1;
336
- f.splice(h, 1);
335
+ a.splice(m, 1);
337
336
  }
338
337
  return !0;
339
338
  }
340
- case pt:
339
+ case ht:
341
340
  case _t:
342
341
  case vt:
343
342
  case bt:
344
343
  case yt:
345
- case $n:
344
+ case Zn:
346
345
  case zt:
347
346
  case wt:
348
347
  case $t:
349
- case Zn:
348
+ case kn:
350
349
  case Zt:
351
350
  case kt: {
352
351
  if (typeof Buffer < "u" && Buffer.isBuffer(e) !== Buffer.isBuffer(t) || e.length !== t.length)
353
352
  return !1;
354
- for (let a = 0; a < e.length; a++)
355
- if (!K(e[a], t[a], a, e, t, n, r))
353
+ for (let f = 0; f < e.length; f++)
354
+ if (!G(e[f], t[f], f, e, t, n, r))
356
355
  return !1;
357
356
  return !0;
358
357
  }
359
- case mt:
358
+ case dt:
360
359
  return e.byteLength !== t.byteLength ? !1 : C(new Uint8Array(e), new Uint8Array(t), n, r);
361
360
  case gt:
362
361
  return e.byteLength !== t.byteLength || e.byteOffset !== t.byteOffset ? !1 : C(new Uint8Array(e), new Uint8Array(t), n, r);
363
- case wn:
362
+ case $n:
364
363
  return e.name === t.name && e.message === t.message;
365
364
  case oe: {
366
- if (!(C(e.constructor, t.constructor, n, r) || xe(e) && xe(t)))
365
+ if (!(C(e.constructor, t.constructor, n, r) || Se(e) && Se(t)))
367
366
  return !1;
368
- const f = [...Object.keys(e), ...me(e)], g = [...Object.keys(t), ...me(t)];
369
- if (f.length !== g.length)
367
+ const a = [...Object.keys(e), ...de(e)], g = [...Object.keys(t), ...de(t)];
368
+ if (a.length !== g.length)
370
369
  return !1;
371
- for (let d = 0; d < f.length; d++) {
372
- const h = f[d], m = e[h];
373
- if (!Object.hasOwn(t, h))
370
+ for (let p = 0; p < a.length; p++) {
371
+ const m = a[p], h = e[m];
372
+ if (!Object.hasOwn(t, m))
374
373
  return !1;
375
- const b = t[h];
376
- if (!K(m, b, h, e, t, n, r))
374
+ const I = t[m];
375
+ if (!G(h, I, m, e, t, n, r))
377
376
  return !1;
378
377
  }
379
378
  return !0;
@@ -385,19 +384,19 @@ function C(e, t, n, r) {
385
384
  n.delete(e), n.delete(t);
386
385
  }
387
386
  }
388
- function Dn() {
387
+ function Mn() {
389
388
  }
390
- function Mn(e, t) {
391
- return Rn(e, t, Dn);
389
+ function Un(e, t) {
390
+ return Rn(e, t, Mn);
392
391
  }
393
- function Un(e) {
394
- const t = e == null ? void 0 : e.constructor, n = typeof t == "function" ? t.prototype : Object.prototype;
392
+ function Fn(e) {
393
+ const t = e?.constructor, n = typeof t == "function" ? t.prototype : Object.prototype;
395
394
  return e === n;
396
395
  }
397
- function Fn(e) {
396
+ function Tn(e) {
398
397
  return It(e);
399
398
  }
400
- function Tn(e, t) {
399
+ function Ln(e, t) {
401
400
  const n = {}, r = Object.keys(e);
402
401
  for (let o = 0; o < r.length; o++) {
403
402
  const i = r[o], s = e[i];
@@ -405,23 +404,23 @@ function Tn(e, t) {
405
404
  }
406
405
  return n;
407
406
  }
408
- function Ot(e) {
407
+ function xt(e) {
409
408
  if (e == null)
410
409
  return !0;
411
- if (vn(e))
412
- return typeof e.splice != "function" && typeof e != "string" && (typeof Buffer > "u" || !Buffer.isBuffer(e)) && !Fn(e) && !At(e) ? !1 : e.length === 0;
410
+ if (bn(e))
411
+ return typeof e.splice != "function" && typeof e != "string" && (typeof Buffer > "u" || !Buffer.isBuffer(e)) && !Tn(e) && !At(e) ? !1 : e.length === 0;
413
412
  if (typeof e == "object") {
414
413
  if (e instanceof Map || e instanceof Set)
415
414
  return e.size === 0;
416
415
  const t = Object.keys(e);
417
- return Un(e) ? t.filter((n) => n !== "constructor").length === 0 : t.length === 0;
416
+ return Fn(e) ? t.filter((n) => n !== "constructor").length === 0 : t.length === 0;
418
417
  }
419
418
  return !0;
420
419
  }
421
- var Ln = ln ? N.useLayoutEffect : N.useEffect;
422
- function Bn(e, t) {
423
- var n = dn(t == null ? void 0 : t.client);
424
- hn(e, pn.Mutation);
420
+ var Bn = pn ? N.useLayoutEffect : N.useEffect;
421
+ function Wn(e, t) {
422
+ var n = mn(t?.client);
423
+ hn(e, dn.Mutation);
425
424
  var r = N.useState({
426
425
  called: !1,
427
426
  loading: !1,
@@ -434,69 +433,69 @@ function Bn(e, t) {
434
433
  mutation: e,
435
434
  options: t
436
435
  });
437
- Ln(function() {
436
+ Bn(function() {
438
437
  Object.assign(s.current, { client: n, options: t, mutation: e });
439
438
  });
440
- var u = N.useCallback(function(f) {
441
- f === void 0 && (f = {});
442
- var g = s.current, d = g.options, h = g.mutation, m = pe(pe({}, d), { mutation: h }), b = f.client || s.current.client;
443
- !s.current.result.loading && !m.ignoreResults && s.current.isMounted && i(s.current.result = {
439
+ var u = N.useCallback(function(a) {
440
+ a === void 0 && (a = {});
441
+ var g = s.current, p = g.options, m = g.mutation, h = he(he({}, p), { mutation: m }), I = a.client || s.current.client;
442
+ !s.current.result.loading && !h.ignoreResults && s.current.isMounted && i(s.current.result = {
444
443
  loading: !0,
445
444
  error: void 0,
446
445
  data: void 0,
447
446
  called: !0,
448
- client: b
447
+ client: I
449
448
  });
450
- var p = ++s.current.mutationId, E = mn(m, f);
451
- return b.mutate(E).then(function(z) {
452
- var _, v, y = z.data, S = z.errors, x = S && S.length > 0 ? new gn({ graphQLErrors: S }) : void 0, B = f.onError || ((_ = s.current.options) === null || _ === void 0 ? void 0 : _.onError);
453
- if (x && B && B(x, E), p === s.current.mutationId && !E.ignoreResults) {
454
- var W = {
449
+ var d = ++s.current.mutationId, E = gn(h, a);
450
+ return I.mutate(E).then(function(v) {
451
+ var _, b, $ = v.data, P = v.errors, O = P && P.length > 0 ? new _n({ graphQLErrors: P }) : void 0, H = a.onError || ((_ = s.current.options) === null || _ === void 0 ? void 0 : _.onError);
452
+ if (O && H && H(O, E), d === s.current.mutationId && !E.ignoreResults) {
453
+ var Ie = {
455
454
  called: !0,
456
455
  loading: !1,
457
- data: y,
458
- error: x,
459
- client: b
456
+ data: $,
457
+ error: O,
458
+ client: I
460
459
  };
461
- s.current.isMounted && !Se(s.current.result, W) && i(s.current.result = W);
460
+ s.current.isMounted && !Oe(s.current.result, Ie) && i(s.current.result = Ie);
462
461
  }
463
- var he = f.onCompleted || ((v = s.current.options) === null || v === void 0 ? void 0 : v.onCompleted);
464
- return x || he == null || he(z.data, E), z;
465
- }, function(z) {
462
+ var me = a.onCompleted || ((b = s.current.options) === null || b === void 0 ? void 0 : b.onCompleted);
463
+ return O || me?.(v.data, E), v;
464
+ }, function(v) {
466
465
  var _;
467
- if (p === s.current.mutationId && s.current.isMounted) {
468
- var v = {
466
+ if (d === s.current.mutationId && s.current.isMounted) {
467
+ var b = {
469
468
  loading: !1,
470
- error: z,
469
+ error: v,
471
470
  data: void 0,
472
471
  called: !0,
473
- client: b
472
+ client: I
474
473
  };
475
- Se(s.current.result, v) || i(s.current.result = v);
474
+ Oe(s.current.result, b) || i(s.current.result = b);
476
475
  }
477
- var y = f.onError || ((_ = s.current.options) === null || _ === void 0 ? void 0 : _.onError);
478
- if (y)
479
- return y(z, E), { data: void 0, errors: z };
480
- throw z;
476
+ var $ = a.onError || ((_ = s.current.options) === null || _ === void 0 ? void 0 : _.onError);
477
+ if ($)
478
+ return $(v, E), { data: void 0, errors: v };
479
+ throw v;
481
480
  });
482
- }, []), a = N.useCallback(function() {
481
+ }, []), f = N.useCallback(function() {
483
482
  if (s.current.isMounted) {
484
- var f = {
483
+ var a = {
485
484
  called: !1,
486
485
  loading: !1,
487
486
  client: s.current.client
488
487
  };
489
- Object.assign(s.current, { mutationId: 0, result: f }), i(f);
488
+ Object.assign(s.current, { mutationId: 0, result: a }), i(a);
490
489
  }
491
490
  }, []);
492
491
  return N.useEffect(function() {
493
- var f = s.current;
494
- return f.isMounted = !0, function() {
495
- f.isMounted = !1;
492
+ var a = s.current;
493
+ return a.isMounted = !0, function() {
494
+ a.isMounted = !1;
496
495
  };
497
- }, []), [u, pe({ reset: a }, o)];
496
+ }, []), [u, he({ reset: f }, o)];
498
497
  }
499
- function Wn(e, t) {
498
+ function Vn(e, t) {
500
499
  const n = [], r = [];
501
500
  for (let o = 0; o < e.length; o++) {
502
501
  const i = e[o];
@@ -504,7 +503,7 @@ function Wn(e, t) {
504
503
  }
505
504
  return [n, r];
506
505
  }
507
- function Vn(e, t) {
506
+ function Gn(e, t) {
508
507
  const n = { ...e };
509
508
  for (let r = 0; r < t.length; r++) {
510
509
  const o = t[r];
@@ -512,56 +511,53 @@ function Vn(e, t) {
512
511
  }
513
512
  return n;
514
513
  }
515
- function Gn(e) {
514
+ function Cn(e) {
516
515
  return typeof e == "string";
517
516
  }
518
517
  function c(e, t, n) {
519
- function r(u, a) {
520
- var f;
518
+ function r(u, f) {
519
+ var a;
521
520
  Object.defineProperty(u, "_zod", {
522
521
  value: u._zod ?? {},
523
522
  enumerable: !1
524
- }), (f = u._zod).traits ?? (f.traits = /* @__PURE__ */ new Set()), u._zod.traits.add(e), t(u, a);
523
+ }), (a = u._zod).traits ?? (a.traits = /* @__PURE__ */ new Set()), u._zod.traits.add(e), t(u, f);
525
524
  for (const g in s.prototype)
526
525
  g in u || Object.defineProperty(u, g, { value: s.prototype[g].bind(u) });
527
- u._zod.constr = s, u._zod.def = a;
526
+ u._zod.constr = s, u._zod.def = f;
528
527
  }
529
- const o = (n == null ? void 0 : n.Parent) ?? Object;
528
+ const o = n?.Parent ?? Object;
530
529
  class i extends o {
531
530
  }
532
531
  Object.defineProperty(i, "name", { value: e });
533
532
  function s(u) {
534
- var a;
535
- const f = n != null && n.Parent ? new i() : this;
536
- r(f, u), (a = f._zod).deferred ?? (a.deferred = []);
537
- for (const g of f._zod.deferred)
533
+ var f;
534
+ const a = n?.Parent ? new i() : this;
535
+ r(a, u), (f = a._zod).deferred ?? (f.deferred = []);
536
+ for (const g of a._zod.deferred)
538
537
  g();
539
- return f;
538
+ return a;
540
539
  }
541
540
  return Object.defineProperty(s, "init", { value: r }), Object.defineProperty(s, Symbol.hasInstance, {
542
- value: (u) => {
543
- var a, f;
544
- return n != null && n.Parent && u instanceof n.Parent ? !0 : (f = (a = u == null ? void 0 : u._zod) == null ? void 0 : a.traits) == null ? void 0 : f.has(e);
545
- }
541
+ value: (u) => n?.Parent && u instanceof n.Parent ? !0 : u?._zod?.traits?.has(e)
546
542
  }), Object.defineProperty(s, "name", { value: e }), s;
547
543
  }
548
- class Y extends Error {
544
+ class J extends Error {
549
545
  constructor() {
550
546
  super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
551
547
  }
552
548
  }
553
- const St = {};
549
+ const Ot = {};
554
550
  function U(e) {
555
- return St;
551
+ return Ot;
556
552
  }
557
553
  function Kn(e) {
558
554
  const t = Object.values(e).filter((r) => typeof r == "number");
559
555
  return Object.entries(e).filter(([r, o]) => t.indexOf(+r) === -1).map(([r, o]) => o);
560
556
  }
561
- function Cn(e, t) {
557
+ function _e(e, t) {
562
558
  return typeof t == "bigint" ? t.toString() : t;
563
559
  }
564
- function xt(e) {
560
+ function St(e) {
565
561
  return {
566
562
  get value() {
567
563
  {
@@ -571,10 +567,10 @@ function xt(e) {
571
567
  }
572
568
  };
573
569
  }
574
- function X(e) {
570
+ function q(e) {
575
571
  return e == null;
576
572
  }
577
- function we(e) {
573
+ function $e(e) {
578
574
  const t = e.startsWith("^") ? 1 : 0, n = e.endsWith("$") ? e.length - 1 : e.length;
579
575
  return e.slice(t, n);
580
576
  }
@@ -582,7 +578,7 @@ function Jn(e, t) {
582
578
  const n = (e.toString().split(".")[1] || "").length, r = (t.toString().split(".")[1] || "").length, o = n > r ? n : r, i = Number.parseInt(e.toFixed(o).replace(".", "")), s = Number.parseInt(t.toFixed(o).replace(".", ""));
583
579
  return i % s / 10 ** o;
584
580
  }
585
- function $(e, t, n) {
581
+ function y(e, t, n) {
586
582
  Object.defineProperty(e, t, {
587
583
  get() {
588
584
  {
@@ -599,7 +595,7 @@ function $(e, t, n) {
599
595
  configurable: !0
600
596
  });
601
597
  }
602
- function $e(e, t, n) {
598
+ function T(e, t, n) {
603
599
  Object.defineProperty(e, t, {
604
600
  value: n,
605
601
  writable: !0,
@@ -607,41 +603,48 @@ function $e(e, t, n) {
607
603
  configurable: !0
608
604
  });
609
605
  }
610
- function G(e) {
606
+ function W(...e) {
607
+ const t = {};
608
+ for (const n of e) {
609
+ const r = Object.getOwnPropertyDescriptors(n);
610
+ Object.assign(t, r);
611
+ }
612
+ return Object.defineProperties({}, t);
613
+ }
614
+ function Pe(e) {
611
615
  return JSON.stringify(e);
612
616
  }
613
- const Pt = Error.captureStackTrace ? Error.captureStackTrace : (...e) => {
617
+ const Pt = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
614
618
  };
615
- function _e(e) {
619
+ function ve(e) {
616
620
  return typeof e == "object" && e !== null && !Array.isArray(e);
617
621
  }
618
- const Yn = xt(() => {
619
- var e;
620
- if (typeof navigator < "u" && ((e = navigator == null ? void 0 : navigator.userAgent) != null && e.includes("Cloudflare")))
622
+ const Yn = St(() => {
623
+ if (typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare"))
621
624
  return !1;
622
625
  try {
623
- const t = Function;
624
- return new t(""), !0;
626
+ const e = Function;
627
+ return new e(""), !0;
625
628
  } catch {
626
629
  return !1;
627
630
  }
628
631
  });
629
- function ve(e) {
630
- if (_e(e) === !1)
632
+ function be(e) {
633
+ if (ve(e) === !1)
631
634
  return !1;
632
635
  const t = e.constructor;
633
636
  if (t === void 0)
634
637
  return !0;
635
638
  const n = t.prototype;
636
- return !(_e(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
639
+ return !(ve(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
637
640
  }
638
641
  const qn = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
639
642
  function fe(e) {
640
643
  return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
641
644
  }
642
- function T(e, t, n) {
645
+ function L(e, t, n) {
643
646
  const r = new e._zod.constr(t ?? e._zod.def);
644
- return (!t || n != null && n.parent) && (r._zod.parent = e), r;
647
+ return (!t || n?.parent) && (r._zod.parent = e), r;
645
648
  }
646
649
  function l(e) {
647
650
  const t = e;
@@ -649,8 +652,8 @@ function l(e) {
649
652
  return {};
650
653
  if (typeof t == "string")
651
654
  return { error: () => t };
652
- if ((t == null ? void 0 : t.message) !== void 0) {
653
- if ((t == null ? void 0 : t.error) !== void 0)
655
+ if (t?.message !== void 0) {
656
+ if (t?.error !== void 0)
654
657
  throw new Error("Cannot specify both `message` and `error` params");
655
658
  t.error = t.message;
656
659
  }
@@ -667,136 +670,141 @@ const Hn = {
667
670
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
668
671
  };
669
672
  function Qn(e, t) {
670
- const n = {}, r = e._zod.def;
671
- for (const o in t) {
672
- if (!(o in r.shape))
673
- throw new Error(`Unrecognized key: "${o}"`);
674
- t[o] && (n[o] = r.shape[o]);
675
- }
676
- return T(e, {
677
- ...e._zod.def,
678
- shape: n,
673
+ const n = e._zod.def, r = W(e._zod.def, {
674
+ get shape() {
675
+ const o = {};
676
+ for (const i in t) {
677
+ if (!(i in n.shape))
678
+ throw new Error(`Unrecognized key: "${i}"`);
679
+ t[i] && (o[i] = n.shape[i]);
680
+ }
681
+ return T(this, "shape", o), o;
682
+ },
679
683
  checks: []
680
684
  });
685
+ return L(e, r);
681
686
  }
682
687
  function er(e, t) {
683
- const n = { ...e._zod.def.shape }, r = e._zod.def;
684
- for (const o in t) {
685
- if (!(o in r.shape))
686
- throw new Error(`Unrecognized key: "${o}"`);
687
- t[o] && delete n[o];
688
- }
689
- return T(e, {
690
- ...e._zod.def,
691
- shape: n,
688
+ const n = e._zod.def, r = W(e._zod.def, {
689
+ get shape() {
690
+ const o = { ...e._zod.def.shape };
691
+ for (const i in t) {
692
+ if (!(i in n.shape))
693
+ throw new Error(`Unrecognized key: "${i}"`);
694
+ t[i] && delete o[i];
695
+ }
696
+ return T(this, "shape", o), o;
697
+ },
692
698
  checks: []
693
699
  });
700
+ return L(e, r);
694
701
  }
695
702
  function tr(e, t) {
696
- if (!ve(t))
703
+ if (!be(t))
697
704
  throw new Error("Invalid input to extend: expected a plain object");
698
- const n = {
699
- ...e._zod.def,
705
+ const n = W(e._zod.def, {
700
706
  get shape() {
701
707
  const r = { ...e._zod.def.shape, ...t };
702
- return $e(this, "shape", r), r;
708
+ return T(this, "shape", r), r;
703
709
  },
704
710
  checks: []
705
- // delete existing checks
706
- };
707
- return T(e, n);
711
+ });
712
+ return L(e, n);
708
713
  }
709
714
  function nr(e, t) {
710
- return T(e, {
711
- ...e._zod.def,
715
+ const n = W(e._zod.def, {
712
716
  get shape() {
713
- const n = { ...e._zod.def.shape, ...t._zod.def.shape };
714
- return $e(this, "shape", n), n;
717
+ const r = { ...e._zod.def.shape, ...t._zod.def.shape };
718
+ return T(this, "shape", r), r;
719
+ },
720
+ get catchall() {
721
+ return t._zod.def.catchall;
715
722
  },
716
- catchall: t._zod.def.catchall,
717
723
  checks: []
718
724
  // delete existing checks
719
725
  });
726
+ return L(e, n);
720
727
  }
721
728
  function rr(e, t, n) {
722
- const r = t._zod.def.shape, o = { ...r };
723
- if (n)
724
- for (const i in n) {
725
- if (!(i in r))
726
- throw new Error(`Unrecognized key: "${i}"`);
727
- n[i] && (o[i] = e ? new e({
728
- type: "optional",
729
- innerType: r[i]
730
- }) : r[i]);
731
- }
732
- else
733
- for (const i in r)
734
- o[i] = e ? new e({
735
- type: "optional",
736
- innerType: r[i]
737
- }) : r[i];
738
- return T(t, {
739
- ...t._zod.def,
740
- shape: o,
729
+ const r = W(t._zod.def, {
730
+ get shape() {
731
+ const o = t._zod.def.shape, i = { ...o };
732
+ if (n)
733
+ for (const s in n) {
734
+ if (!(s in o))
735
+ throw new Error(`Unrecognized key: "${s}"`);
736
+ n[s] && (i[s] = e ? new e({
737
+ type: "optional",
738
+ innerType: o[s]
739
+ }) : o[s]);
740
+ }
741
+ else
742
+ for (const s in o)
743
+ i[s] = e ? new e({
744
+ type: "optional",
745
+ innerType: o[s]
746
+ }) : o[s];
747
+ return T(this, "shape", i), i;
748
+ },
741
749
  checks: []
742
750
  });
751
+ return L(t, r);
743
752
  }
744
753
  function or(e, t, n) {
745
- const r = t._zod.def.shape, o = { ...r };
746
- if (n)
747
- for (const i in n) {
748
- if (!(i in o))
749
- throw new Error(`Unrecognized key: "${i}"`);
750
- n[i] && (o[i] = new e({
751
- type: "nonoptional",
752
- innerType: r[i]
753
- }));
754
- }
755
- else
756
- for (const i in r)
757
- o[i] = new e({
758
- type: "nonoptional",
759
- innerType: r[i]
760
- });
761
- return T(t, {
762
- ...t._zod.def,
763
- shape: o,
764
- // optional: [],
754
+ const r = W(t._zod.def, {
755
+ get shape() {
756
+ const o = t._zod.def.shape, i = { ...o };
757
+ if (n)
758
+ for (const s in n) {
759
+ if (!(s in i))
760
+ throw new Error(`Unrecognized key: "${s}"`);
761
+ n[s] && (i[s] = new e({
762
+ type: "nonoptional",
763
+ innerType: o[s]
764
+ }));
765
+ }
766
+ else
767
+ for (const s in o)
768
+ i[s] = new e({
769
+ type: "nonoptional",
770
+ innerType: o[s]
771
+ });
772
+ return T(this, "shape", i), i;
773
+ },
765
774
  checks: []
766
775
  });
776
+ return L(t, r);
767
777
  }
768
- function J(e, t = 0) {
769
- var n;
770
- for (let r = t; r < e.issues.length; r++)
771
- if (((n = e.issues[r]) == null ? void 0 : n.continue) !== !0)
778
+ function K(e, t = 0) {
779
+ for (let n = t; n < e.issues.length; n++)
780
+ if (e.issues[n]?.continue !== !0)
772
781
  return !0;
773
782
  return !1;
774
783
  }
775
- function Ze(e, t) {
784
+ function jt(e, t) {
776
785
  return t.map((n) => {
777
786
  var r;
778
787
  return (r = n).path ?? (r.path = []), n.path.unshift(e), n;
779
788
  });
780
789
  }
781
790
  function ee(e) {
782
- return typeof e == "string" ? e : e == null ? void 0 : e.message;
791
+ return typeof e == "string" ? e : e?.message;
783
792
  }
784
793
  function F(e, t, n) {
785
- var o, i, s, u, a, f;
786
794
  const r = { ...e, path: e.path ?? [] };
787
795
  if (!e.message) {
788
- const g = ee((s = (i = (o = e.inst) == null ? void 0 : o._zod.def) == null ? void 0 : i.error) == null ? void 0 : s.call(i, e)) ?? ee((u = t == null ? void 0 : t.error) == null ? void 0 : u.call(t, e)) ?? ee((a = n.customError) == null ? void 0 : a.call(n, e)) ?? ee((f = n.localeError) == null ? void 0 : f.call(n, e)) ?? "Invalid input";
789
- r.message = g;
796
+ const o = ee(e.inst?._zod.def?.error?.(e)) ?? ee(t?.error?.(e)) ?? ee(n.customError?.(e)) ?? ee(n.localeError?.(e)) ?? "Invalid input";
797
+ r.message = o;
790
798
  }
791
- return delete r.inst, delete r.continue, t != null && t.reportInput || delete r.input, r;
799
+ return delete r.inst, delete r.continue, t?.reportInput || delete r.input, r;
792
800
  }
793
- function jt(e) {
801
+ function Nt(e) {
794
802
  return e instanceof Set ? "set" : e instanceof Map ? "map" : e instanceof File ? "file" : "unknown";
795
803
  }
796
- function ke(e) {
804
+ function Ze(e) {
797
805
  return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
798
806
  }
799
- function q(...e) {
807
+ function Y(...e) {
800
808
  const [t, n, r] = e;
801
809
  return typeof t == "string" ? {
802
810
  message: t,
@@ -805,24 +813,18 @@ function q(...e) {
805
813
  inst: r
806
814
  } : { ...t };
807
815
  }
808
- const Nt = (e, t) => {
816
+ const Dt = (e, t) => {
809
817
  e.name = "$ZodError", Object.defineProperty(e, "_zod", {
810
818
  value: e._zod,
811
819
  enumerable: !1
812
820
  }), Object.defineProperty(e, "issues", {
813
821
  value: t,
814
822
  enumerable: !1
815
- }), Object.defineProperty(e, "message", {
816
- get() {
817
- return JSON.stringify(t, Cn, 2);
818
- },
819
- enumerable: !0
820
- // configurable: false,
821
- }), Object.defineProperty(e, "toString", {
823
+ }), e.message = JSON.stringify(t, _e, 2), Object.defineProperty(e, "toString", {
822
824
  value: () => e.message,
823
825
  enumerable: !1
824
826
  });
825
- }, Rt = c("$ZodError", Nt), Dt = c("$ZodError", Nt, { Parent: Error });
827
+ }, Rt = c("$ZodError", Dt), Mt = c("$ZodError", Dt, { Parent: Error });
826
828
  function ir(e, t = (n) => n.message) {
827
829
  const n = {}, r = [];
828
830
  for (const o of e.issues)
@@ -843,78 +845,78 @@ function sr(e, t) {
843
845
  else if (s.path.length === 0)
844
846
  r._errors.push(n(s));
845
847
  else {
846
- let u = r, a = 0;
847
- for (; a < s.path.length; ) {
848
- const f = s.path[a];
849
- a === s.path.length - 1 ? (u[f] = u[f] || { _errors: [] }, u[f]._errors.push(n(s))) : u[f] = u[f] || { _errors: [] }, u = u[f], a++;
848
+ let u = r, f = 0;
849
+ for (; f < s.path.length; ) {
850
+ const a = s.path[f];
851
+ f === s.path.length - 1 ? (u[a] = u[a] || { _errors: [] }, u[a]._errors.push(n(s))) : u[a] = u[a] || { _errors: [] }, u = u[a], f++;
850
852
  }
851
853
  }
852
854
  };
853
855
  return o(e), r;
854
856
  }
855
- const ur = (e) => (t, n, r, o) => {
857
+ const cr = (e) => (t, n, r, o) => {
856
858
  const i = r ? Object.assign(r, { async: !1 }) : { async: !1 }, s = t._zod.run({ value: n, issues: [] }, i);
857
859
  if (s instanceof Promise)
858
- throw new Y();
860
+ throw new J();
859
861
  if (s.issues.length) {
860
- const u = new ((o == null ? void 0 : o.Err) ?? e)(s.issues.map((a) => F(a, i, U())));
861
- throw Pt(u, o == null ? void 0 : o.callee), u;
862
+ const u = new (o?.Err ?? e)(s.issues.map((f) => F(f, i, U())));
863
+ throw Pt(u, o?.callee), u;
862
864
  }
863
865
  return s.value;
864
- }, cr = (e) => async (t, n, r, o) => {
866
+ }, ur = (e) => async (t, n, r, o) => {
865
867
  const i = r ? Object.assign(r, { async: !0 }) : { async: !0 };
866
868
  let s = t._zod.run({ value: n, issues: [] }, i);
867
869
  if (s instanceof Promise && (s = await s), s.issues.length) {
868
- const u = new ((o == null ? void 0 : o.Err) ?? e)(s.issues.map((a) => F(a, i, U())));
869
- throw Pt(u, o == null ? void 0 : o.callee), u;
870
+ const u = new (o?.Err ?? e)(s.issues.map((f) => F(f, i, U())));
871
+ throw Pt(u, o?.callee), u;
870
872
  }
871
873
  return s.value;
872
- }, Mt = (e) => (t, n, r) => {
874
+ }, Ut = (e) => (t, n, r) => {
873
875
  const o = r ? { ...r, async: !1 } : { async: !1 }, i = t._zod.run({ value: n, issues: [] }, o);
874
876
  if (i instanceof Promise)
875
- throw new Y();
877
+ throw new J();
876
878
  return i.issues.length ? {
877
879
  success: !1,
878
880
  error: new (e ?? Rt)(i.issues.map((s) => F(s, o, U())))
879
881
  } : { success: !0, data: i.value };
880
- }, ar = /* @__PURE__ */ Mt(Dt), Ut = (e) => async (t, n, r) => {
882
+ }, ar = /* @__PURE__ */ Ut(Mt), Ft = (e) => async (t, n, r) => {
881
883
  const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
882
884
  let i = t._zod.run({ value: n, issues: [] }, o);
883
885
  return i instanceof Promise && (i = await i), i.issues.length ? {
884
886
  success: !1,
885
887
  error: new e(i.issues.map((s) => F(s, o, U())))
886
888
  } : { success: !0, data: i.value };
887
- }, fr = /* @__PURE__ */ Ut(Dt), lr = /^[cC][^\s-]{8,}$/, dr = /^[0-9a-z]+$/, hr = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, pr = /^[0-9a-vA-V]{20}$/, mr = /^[A-Za-z0-9]{27}$/, gr = /^[a-zA-Z0-9_-]{21}$/, _r = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, vr = /^([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})$/, Pe = (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)$/, br = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, yr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
889
+ }, fr = /* @__PURE__ */ Ft(Mt), lr = /^[cC][^\s-]{8,}$/, pr = /^[0-9a-z]+$/, mr = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, hr = /^[0-9a-vA-V]{20}$/, dr = /^[A-Za-z0-9]{27}$/, gr = /^[a-zA-Z0-9_-]{21}$/, _r = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, vr = /^([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})$/, je = (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)$/, br = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, yr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
888
890
  function zr() {
889
891
  return new RegExp(yr, "u");
890
892
  }
891
- const wr = /^(?:(?: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])$/, $r = /^(([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})$/, Zr = /^((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])$/, kr = /^(([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])$/, Ir = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Ft = /^[A-Za-z0-9_-]*$/, Er = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/, Ar = /^\+(?:[0-9]){6,14}[0-9]$/, Tt = "(?:(?:\\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])))", Or = /* @__PURE__ */ new RegExp(`^${Tt}$`);
892
- function Lt(e) {
893
+ const wr = /^(?:(?: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])$/, $r = /^(([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})$/, Zr = /^((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])$/, kr = /^(([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])$/, Ir = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, Tt = /^[A-Za-z0-9_-]*$/, Er = /^([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+$/, Ar = /^\+(?:[0-9]){6,14}[0-9]$/, Lt = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", xr = /* @__PURE__ */ new RegExp(`^${Lt}$`);
894
+ function Bt(e) {
893
895
  const t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
894
896
  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+)?)?`;
895
897
  }
896
- function Sr(e) {
897
- return new RegExp(`^${Lt(e)}$`);
898
+ function Or(e) {
899
+ return new RegExp(`^${Bt(e)}$`);
898
900
  }
899
- function xr(e) {
900
- const t = Lt({ precision: e.precision }), n = ["Z"];
901
+ function Sr(e) {
902
+ const t = Bt({ precision: e.precision }), n = ["Z"];
901
903
  e.local && n.push(""), e.offset && n.push("([+-]\\d{2}:\\d{2})");
902
904
  const r = `${t}(?:${n.join("|")})`;
903
- return new RegExp(`^${Tt}T(?:${r})$`);
905
+ return new RegExp(`^${Lt}T(?:${r})$`);
904
906
  }
905
907
  const Pr = (e) => {
906
- const t = e ? `[\\s\\S]{${(e == null ? void 0 : e.minimum) ?? 0},${(e == null ? void 0 : e.maximum) ?? ""}}` : "[\\s\\S]*";
908
+ const t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
907
909
  return new RegExp(`^${t}$`);
908
- }, jr = /^\d+$/, Nr = /^-?\d+(?:\.\d+)?/i, Rr = /true|false/i, Dr = /^[^A-Z]*$/, Mr = /^[^a-z]*$/, A = /* @__PURE__ */ c("$ZodCheck", (e, t) => {
910
+ }, jr = /^\d+$/, Nr = /^-?\d+(?:\.\d+)?/i, Dr = /true|false/i, Rr = /^[^A-Z]*$/, Mr = /^[^a-z]*$/, A = /* @__PURE__ */ c("$ZodCheck", (e, t) => {
909
911
  var n;
910
912
  e._zod ?? (e._zod = {}), e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
911
- }), Bt = {
913
+ }), Wt = {
912
914
  number: "number",
913
915
  bigint: "bigint",
914
916
  object: "date"
915
- }, Wt = /* @__PURE__ */ c("$ZodCheckLessThan", (e, t) => {
917
+ }, Vt = /* @__PURE__ */ c("$ZodCheckLessThan", (e, t) => {
916
918
  A.init(e, t);
917
- const n = Bt[typeof t.value];
919
+ const n = Wt[typeof t.value];
918
920
  e._zod.onattach.push((r) => {
919
921
  const o = r._zod.bag, i = (t.inclusive ? o.maximum : o.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
920
922
  t.value < i && (t.inclusive ? o.maximum = t.value : o.exclusiveMaximum = t.value);
@@ -929,9 +931,9 @@ const Pr = (e) => {
929
931
  continue: !t.abort
930
932
  });
931
933
  };
932
- }), Vt = /* @__PURE__ */ c("$ZodCheckGreaterThan", (e, t) => {
934
+ }), Gt = /* @__PURE__ */ c("$ZodCheckGreaterThan", (e, t) => {
933
935
  A.init(e, t);
934
- const n = Bt[typeof t.value];
936
+ const n = Wt[typeof t.value];
935
937
  e._zod.onattach.push((r) => {
936
938
  const o = r._zod.bag, i = (t.inclusive ? o.minimum : o.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
937
939
  t.value > i && (t.inclusive ? o.minimum = t.value : o.exclusiveMinimum = t.value);
@@ -963,36 +965,35 @@ const Pr = (e) => {
963
965
  });
964
966
  };
965
967
  }), Fr = /* @__PURE__ */ c("$ZodCheckNumberFormat", (e, t) => {
966
- var s;
967
968
  A.init(e, t), t.format = t.format || "float64";
968
- const n = (s = t.format) == null ? void 0 : s.includes("int"), r = n ? "int" : "number", [o, i] = Hn[t.format];
969
- e._zod.onattach.push((u) => {
970
- const a = u._zod.bag;
971
- a.format = t.format, a.minimum = o, a.maximum = i, n && (a.pattern = jr);
972
- }), e._zod.check = (u) => {
973
- const a = u.value;
969
+ const n = t.format?.includes("int"), r = n ? "int" : "number", [o, i] = Hn[t.format];
970
+ e._zod.onattach.push((s) => {
971
+ const u = s._zod.bag;
972
+ u.format = t.format, u.minimum = o, u.maximum = i, n && (u.pattern = jr);
973
+ }), e._zod.check = (s) => {
974
+ const u = s.value;
974
975
  if (n) {
975
- if (!Number.isInteger(a)) {
976
- u.issues.push({
976
+ if (!Number.isInteger(u)) {
977
+ s.issues.push({
977
978
  expected: r,
978
979
  format: t.format,
979
980
  code: "invalid_type",
980
- input: a,
981
+ input: u,
981
982
  inst: e
982
983
  });
983
984
  return;
984
985
  }
985
- if (!Number.isSafeInteger(a)) {
986
- a > 0 ? u.issues.push({
987
- input: a,
986
+ if (!Number.isSafeInteger(u)) {
987
+ u > 0 ? s.issues.push({
988
+ input: u,
988
989
  code: "too_big",
989
990
  maximum: Number.MAX_SAFE_INTEGER,
990
991
  note: "Integers must be within the safe integer range.",
991
992
  inst: e,
992
993
  origin: r,
993
994
  continue: !t.abort
994
- }) : u.issues.push({
995
- input: a,
995
+ }) : s.issues.push({
996
+ input: u,
996
997
  code: "too_small",
997
998
  minimum: Number.MIN_SAFE_INTEGER,
998
999
  note: "Integers must be within the safe integer range.",
@@ -1003,17 +1004,17 @@ const Pr = (e) => {
1003
1004
  return;
1004
1005
  }
1005
1006
  }
1006
- a < o && u.issues.push({
1007
+ u < o && s.issues.push({
1007
1008
  origin: "number",
1008
- input: a,
1009
+ input: u,
1009
1010
  code: "too_small",
1010
1011
  minimum: o,
1011
1012
  inclusive: !0,
1012
1013
  inst: e,
1013
1014
  continue: !t.abort
1014
- }), a > i && u.issues.push({
1015
+ }), u > i && s.issues.push({
1015
1016
  origin: "number",
1016
- input: a,
1017
+ input: u,
1017
1018
  code: "too_big",
1018
1019
  maximum: i,
1019
1020
  inst: e
@@ -1023,14 +1024,14 @@ const Pr = (e) => {
1023
1024
  var n;
1024
1025
  A.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1025
1026
  const o = r.value;
1026
- return !X(o) && o.size !== void 0;
1027
+ return !q(o) && o.size !== void 0;
1027
1028
  }), e._zod.onattach.push((r) => {
1028
1029
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1029
1030
  t.maximum < o && (r._zod.bag.maximum = t.maximum);
1030
1031
  }), e._zod.check = (r) => {
1031
1032
  const o = r.value;
1032
1033
  o.size <= t.maximum || r.issues.push({
1033
- origin: jt(o),
1034
+ origin: Nt(o),
1034
1035
  code: "too_big",
1035
1036
  maximum: t.maximum,
1036
1037
  input: o,
@@ -1042,14 +1043,14 @@ const Pr = (e) => {
1042
1043
  var n;
1043
1044
  A.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1044
1045
  const o = r.value;
1045
- return !X(o) && o.size !== void 0;
1046
+ return !q(o) && o.size !== void 0;
1046
1047
  }), e._zod.onattach.push((r) => {
1047
1048
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1048
1049
  t.minimum > o && (r._zod.bag.minimum = t.minimum);
1049
1050
  }), e._zod.check = (r) => {
1050
1051
  const o = r.value;
1051
1052
  o.size >= t.minimum || r.issues.push({
1052
- origin: jt(o),
1053
+ origin: Nt(o),
1053
1054
  code: "too_small",
1054
1055
  minimum: t.minimum,
1055
1056
  input: o,
@@ -1061,7 +1062,7 @@ const Pr = (e) => {
1061
1062
  var n;
1062
1063
  A.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1063
1064
  const o = r.value;
1064
- return !X(o) && o.length !== void 0;
1065
+ return !q(o) && o.length !== void 0;
1065
1066
  }), e._zod.onattach.push((r) => {
1066
1067
  const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
1067
1068
  t.maximum < o && (r._zod.bag.maximum = t.maximum);
@@ -1069,7 +1070,7 @@ const Pr = (e) => {
1069
1070
  const o = r.value;
1070
1071
  if (o.length <= t.maximum)
1071
1072
  return;
1072
- const s = ke(o);
1073
+ const s = Ze(o);
1073
1074
  r.issues.push({
1074
1075
  origin: s,
1075
1076
  code: "too_big",
@@ -1084,7 +1085,7 @@ const Pr = (e) => {
1084
1085
  var n;
1085
1086
  A.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1086
1087
  const o = r.value;
1087
- return !X(o) && o.length !== void 0;
1088
+ return !q(o) && o.length !== void 0;
1088
1089
  }), e._zod.onattach.push((r) => {
1089
1090
  const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
1090
1091
  t.minimum > o && (r._zod.bag.minimum = t.minimum);
@@ -1092,7 +1093,7 @@ const Pr = (e) => {
1092
1093
  const o = r.value;
1093
1094
  if (o.length >= t.minimum)
1094
1095
  return;
1095
- const s = ke(o);
1096
+ const s = Ze(o);
1096
1097
  r.issues.push({
1097
1098
  origin: s,
1098
1099
  code: "too_small",
@@ -1107,7 +1108,7 @@ const Pr = (e) => {
1107
1108
  var n;
1108
1109
  A.init(e, t), (n = e._zod.def).when ?? (n.when = (r) => {
1109
1110
  const o = r.value;
1110
- return !X(o) && o.length !== void 0;
1111
+ return !q(o) && o.length !== void 0;
1111
1112
  }), e._zod.onattach.push((r) => {
1112
1113
  const o = r._zod.bag;
1113
1114
  o.minimum = t.length, o.maximum = t.length, o.length = t.length;
@@ -1115,7 +1116,7 @@ const Pr = (e) => {
1115
1116
  const o = r.value, i = o.length;
1116
1117
  if (i === t.length)
1117
1118
  return;
1118
- const s = ke(o), u = i > t.length;
1119
+ const s = Ze(o), u = i > t.length;
1119
1120
  r.issues.push({
1120
1121
  origin: s,
1121
1122
  ...u ? { code: "too_big", maximum: t.length } : { code: "too_small", minimum: t.length },
@@ -1155,9 +1156,9 @@ const Pr = (e) => {
1155
1156
  continue: !t.abort
1156
1157
  });
1157
1158
  };
1158
- }), Kr = /* @__PURE__ */ c("$ZodCheckLowerCase", (e, t) => {
1159
- t.pattern ?? (t.pattern = Dr), le.init(e, t);
1160
- }), Cr = /* @__PURE__ */ c("$ZodCheckUpperCase", (e, t) => {
1159
+ }), Cr = /* @__PURE__ */ c("$ZodCheckLowerCase", (e, t) => {
1160
+ t.pattern ?? (t.pattern = Rr), le.init(e, t);
1161
+ }), Kr = /* @__PURE__ */ c("$ZodCheckUpperCase", (e, t) => {
1161
1162
  t.pattern ?? (t.pattern = Mr), le.init(e, t);
1162
1163
  }), Jr = /* @__PURE__ */ c("$ZodCheckIncludes", (e, t) => {
1163
1164
  A.init(e, t);
@@ -1246,7 +1247,7 @@ class Qr {
1246
1247
  this.content.push(s);
1247
1248
  }
1248
1249
  compile() {
1249
- const t = Function, n = this == null ? void 0 : this.args, o = [...((this == null ? void 0 : this.content) ?? [""]).map((i) => ` ${i}`)];
1250
+ const t = Function, n = this?.args, o = [...(this?.content ?? [""]).map((i) => ` ${i}`)];
1250
1251
  return new t(...n, o.join(`
1251
1252
  `));
1252
1253
  }
@@ -1254,89 +1255,83 @@ class Qr {
1254
1255
  const eo = {
1255
1256
  major: 4,
1256
1257
  minor: 0,
1257
- patch: 0
1258
- }, w = /* @__PURE__ */ c("$ZodType", (e, t) => {
1259
- var o;
1258
+ patch: 10
1259
+ }, z = /* @__PURE__ */ c("$ZodType", (e, t) => {
1260
1260
  var n;
1261
1261
  e ?? (e = {}), e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = eo;
1262
1262
  const r = [...e._zod.def.checks ?? []];
1263
1263
  e._zod.traits.has("$ZodCheck") && r.unshift(e);
1264
- for (const i of r)
1265
- for (const s of i._zod.onattach)
1266
- s(e);
1264
+ for (const o of r)
1265
+ for (const i of o._zod.onattach)
1266
+ i(e);
1267
1267
  if (r.length === 0)
1268
- (n = e._zod).deferred ?? (n.deferred = []), (o = e._zod.deferred) == null || o.push(() => {
1268
+ (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
1269
1269
  e._zod.run = e._zod.parse;
1270
1270
  });
1271
1271
  else {
1272
- const i = (s, u, a) => {
1273
- let f = J(s), g;
1274
- for (const d of u) {
1275
- if (d._zod.def.when) {
1276
- if (!d._zod.def.when(s))
1272
+ const o = (i, s, u) => {
1273
+ let f = K(i), a;
1274
+ for (const g of s) {
1275
+ if (g._zod.def.when) {
1276
+ if (!g._zod.def.when(i))
1277
1277
  continue;
1278
1278
  } else if (f)
1279
1279
  continue;
1280
- const h = s.issues.length, m = d._zod.check(s);
1281
- if (m instanceof Promise && (a == null ? void 0 : a.async) === !1)
1282
- throw new Y();
1283
- if (g || m instanceof Promise)
1284
- g = (g ?? Promise.resolve()).then(async () => {
1285
- await m, s.issues.length !== h && (f || (f = J(s, h)));
1280
+ const p = i.issues.length, m = g._zod.check(i);
1281
+ if (m instanceof Promise && u?.async === !1)
1282
+ throw new J();
1283
+ if (a || m instanceof Promise)
1284
+ a = (a ?? Promise.resolve()).then(async () => {
1285
+ await m, i.issues.length !== p && (f || (f = K(i, p)));
1286
1286
  });
1287
1287
  else {
1288
- if (s.issues.length === h)
1288
+ if (i.issues.length === p)
1289
1289
  continue;
1290
- f || (f = J(s, h));
1290
+ f || (f = K(i, p));
1291
1291
  }
1292
1292
  }
1293
- return g ? g.then(() => s) : s;
1293
+ return a ? a.then(() => i) : i;
1294
1294
  };
1295
- e._zod.run = (s, u) => {
1296
- const a = e._zod.parse(s, u);
1297
- if (a instanceof Promise) {
1298
- if (u.async === !1)
1299
- throw new Y();
1300
- return a.then((f) => i(f, r, u));
1295
+ e._zod.run = (i, s) => {
1296
+ const u = e._zod.parse(i, s);
1297
+ if (u instanceof Promise) {
1298
+ if (s.async === !1)
1299
+ throw new J();
1300
+ return u.then((f) => o(f, r, s));
1301
1301
  }
1302
- return i(a, r, u);
1302
+ return o(u, r, s);
1303
1303
  };
1304
1304
  }
1305
1305
  e["~standard"] = {
1306
- validate: (i) => {
1307
- var s;
1306
+ validate: (o) => {
1308
1307
  try {
1309
- const u = ar(e, i);
1310
- return u.success ? { value: u.data } : { issues: (s = u.error) == null ? void 0 : s.issues };
1308
+ const i = ar(e, o);
1309
+ return i.success ? { value: i.data } : { issues: i.error?.issues };
1311
1310
  } catch {
1312
- return fr(e, i).then((a) => {
1313
- var f;
1314
- return a.success ? { value: a.data } : { issues: (f = a.error) == null ? void 0 : f.issues };
1315
- });
1311
+ return fr(e, o).then((s) => s.success ? { value: s.data } : { issues: s.error?.issues });
1316
1312
  }
1317
1313
  },
1318
1314
  vendor: "zod",
1319
1315
  version: 1
1320
1316
  };
1321
- }), Ie = /* @__PURE__ */ c("$ZodString", (e, t) => {
1322
- var n;
1323
- w.init(e, t), e._zod.pattern = [...((n = e == null ? void 0 : e._zod.bag) == null ? void 0 : n.patterns) ?? []].pop() ?? Pr(e._zod.bag), e._zod.parse = (r, o) => {
1317
+ }), ke = /* @__PURE__ */ c("$ZodString", (e, t) => {
1318
+ z.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? Pr(e._zod.bag), e._zod.parse = (n, r) => {
1324
1319
  if (t.coerce)
1325
1320
  try {
1326
- r.value = String(r.value);
1321
+ n.value = String(n.value);
1327
1322
  } catch {
1328
1323
  }
1329
- return typeof r.value == "string" || r.issues.push({
1324
+ return typeof n.value == "string" || n.issues.push({
1330
1325
  expected: "string",
1331
1326
  code: "invalid_type",
1332
- input: r.value,
1327
+ input: n.value,
1333
1328
  inst: e
1334
- }), r;
1329
+ }), n;
1335
1330
  };
1336
- }), Z = /* @__PURE__ */ c("$ZodStringFormat", (e, t) => {
1337
- le.init(e, t), Ie.init(e, t);
1331
+ }), w = /* @__PURE__ */ c("$ZodStringFormat", (e, t) => {
1332
+ le.init(e, t), ke.init(e, t);
1338
1333
  }), to = /* @__PURE__ */ c("$ZodGUID", (e, t) => {
1339
- t.pattern ?? (t.pattern = vr), Z.init(e, t);
1334
+ t.pattern ?? (t.pattern = vr), w.init(e, t);
1340
1335
  }), no = /* @__PURE__ */ c("$ZodUUID", (e, t) => {
1341
1336
  if (t.version) {
1342
1337
  const r = {
@@ -1351,16 +1346,16 @@ const eo = {
1351
1346
  }[t.version];
1352
1347
  if (r === void 0)
1353
1348
  throw new Error(`Invalid UUID version: "${t.version}"`);
1354
- t.pattern ?? (t.pattern = Pe(r));
1349
+ t.pattern ?? (t.pattern = je(r));
1355
1350
  } else
1356
- t.pattern ?? (t.pattern = Pe());
1357
- Z.init(e, t);
1351
+ t.pattern ?? (t.pattern = je());
1352
+ w.init(e, t);
1358
1353
  }), ro = /* @__PURE__ */ c("$ZodEmail", (e, t) => {
1359
- t.pattern ?? (t.pattern = br), Z.init(e, t);
1354
+ t.pattern ?? (t.pattern = br), w.init(e, t);
1360
1355
  }), oo = /* @__PURE__ */ c("$ZodURL", (e, t) => {
1361
- Z.init(e, t), e._zod.check = (n) => {
1356
+ w.init(e, t), e._zod.check = (n) => {
1362
1357
  try {
1363
- const r = n.value, o = new URL(r), i = o.href;
1358
+ const r = n.value.trim(), o = new URL(r);
1364
1359
  t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(o.hostname) || n.issues.push({
1365
1360
  code: "invalid_format",
1366
1361
  format: "url",
@@ -1377,7 +1372,7 @@ const eo = {
1377
1372
  input: n.value,
1378
1373
  inst: e,
1379
1374
  continue: !t.abort
1380
- })), !r.endsWith("/") && i.endsWith("/") ? n.value = i.slice(0, -1) : n.value = i;
1375
+ })), t.normalize ? n.value = o.href : n.value = r;
1381
1376
  return;
1382
1377
  } catch {
1383
1378
  n.issues.push({
@@ -1390,34 +1385,34 @@ const eo = {
1390
1385
  }
1391
1386
  };
1392
1387
  }), io = /* @__PURE__ */ c("$ZodEmoji", (e, t) => {
1393
- t.pattern ?? (t.pattern = zr()), Z.init(e, t);
1388
+ t.pattern ?? (t.pattern = zr()), w.init(e, t);
1394
1389
  }), so = /* @__PURE__ */ c("$ZodNanoID", (e, t) => {
1395
- t.pattern ?? (t.pattern = gr), Z.init(e, t);
1396
- }), uo = /* @__PURE__ */ c("$ZodCUID", (e, t) => {
1397
- t.pattern ?? (t.pattern = lr), Z.init(e, t);
1398
- }), co = /* @__PURE__ */ c("$ZodCUID2", (e, t) => {
1399
- t.pattern ?? (t.pattern = dr), Z.init(e, t);
1390
+ t.pattern ?? (t.pattern = gr), w.init(e, t);
1391
+ }), co = /* @__PURE__ */ c("$ZodCUID", (e, t) => {
1392
+ t.pattern ?? (t.pattern = lr), w.init(e, t);
1393
+ }), uo = /* @__PURE__ */ c("$ZodCUID2", (e, t) => {
1394
+ t.pattern ?? (t.pattern = pr), w.init(e, t);
1400
1395
  }), ao = /* @__PURE__ */ c("$ZodULID", (e, t) => {
1401
- t.pattern ?? (t.pattern = hr), Z.init(e, t);
1396
+ t.pattern ?? (t.pattern = mr), w.init(e, t);
1402
1397
  }), fo = /* @__PURE__ */ c("$ZodXID", (e, t) => {
1403
- t.pattern ?? (t.pattern = pr), Z.init(e, t);
1398
+ t.pattern ?? (t.pattern = hr), w.init(e, t);
1404
1399
  }), lo = /* @__PURE__ */ c("$ZodKSUID", (e, t) => {
1405
- t.pattern ?? (t.pattern = mr), Z.init(e, t);
1406
- }), ho = /* @__PURE__ */ c("$ZodISODateTime", (e, t) => {
1407
- t.pattern ?? (t.pattern = xr(t)), Z.init(e, t);
1408
- }), po = /* @__PURE__ */ c("$ZodISODate", (e, t) => {
1409
- t.pattern ?? (t.pattern = Or), Z.init(e, t);
1410
- }), mo = /* @__PURE__ */ c("$ZodISOTime", (e, t) => {
1411
- t.pattern ?? (t.pattern = Sr(t)), Z.init(e, t);
1400
+ t.pattern ?? (t.pattern = dr), w.init(e, t);
1401
+ }), po = /* @__PURE__ */ c("$ZodISODateTime", (e, t) => {
1402
+ t.pattern ?? (t.pattern = Sr(t)), w.init(e, t);
1403
+ }), mo = /* @__PURE__ */ c("$ZodISODate", (e, t) => {
1404
+ t.pattern ?? (t.pattern = xr), w.init(e, t);
1405
+ }), ho = /* @__PURE__ */ c("$ZodISOTime", (e, t) => {
1406
+ t.pattern ?? (t.pattern = Or(t)), w.init(e, t);
1412
1407
  }), go = /* @__PURE__ */ c("$ZodISODuration", (e, t) => {
1413
- t.pattern ?? (t.pattern = _r), Z.init(e, t);
1408
+ t.pattern ?? (t.pattern = _r), w.init(e, t);
1414
1409
  }), _o = /* @__PURE__ */ c("$ZodIPv4", (e, t) => {
1415
- t.pattern ?? (t.pattern = wr), Z.init(e, t), e._zod.onattach.push((n) => {
1410
+ t.pattern ?? (t.pattern = wr), w.init(e, t), e._zod.onattach.push((n) => {
1416
1411
  const r = n._zod.bag;
1417
1412
  r.format = "ipv4";
1418
1413
  });
1419
1414
  }), vo = /* @__PURE__ */ c("$ZodIPv6", (e, t) => {
1420
- t.pattern ?? (t.pattern = $r), Z.init(e, t), e._zod.onattach.push((n) => {
1415
+ t.pattern ?? (t.pattern = $r), w.init(e, t), e._zod.onattach.push((n) => {
1421
1416
  const r = n._zod.bag;
1422
1417
  r.format = "ipv6";
1423
1418
  }), e._zod.check = (n) => {
@@ -1434,9 +1429,9 @@ const eo = {
1434
1429
  }
1435
1430
  };
1436
1431
  }), bo = /* @__PURE__ */ c("$ZodCIDRv4", (e, t) => {
1437
- t.pattern ?? (t.pattern = Zr), Z.init(e, t);
1432
+ t.pattern ?? (t.pattern = Zr), w.init(e, t);
1438
1433
  }), yo = /* @__PURE__ */ c("$ZodCIDRv6", (e, t) => {
1439
- t.pattern ?? (t.pattern = kr), Z.init(e, t), e._zod.check = (n) => {
1434
+ t.pattern ?? (t.pattern = kr), w.init(e, t), e._zod.check = (n) => {
1440
1435
  const [r, o] = n.value.split("/");
1441
1436
  try {
1442
1437
  if (!o)
@@ -1458,7 +1453,7 @@ const eo = {
1458
1453
  }
1459
1454
  };
1460
1455
  });
1461
- function Gt(e) {
1456
+ function Ct(e) {
1462
1457
  if (e === "")
1463
1458
  return !0;
1464
1459
  if (e.length % 4 !== 0)
@@ -1470,10 +1465,10 @@ function Gt(e) {
1470
1465
  }
1471
1466
  }
1472
1467
  const zo = /* @__PURE__ */ c("$ZodBase64", (e, t) => {
1473
- t.pattern ?? (t.pattern = Ir), Z.init(e, t), e._zod.onattach.push((n) => {
1468
+ t.pattern ?? (t.pattern = Ir), w.init(e, t), e._zod.onattach.push((n) => {
1474
1469
  n._zod.bag.contentEncoding = "base64";
1475
1470
  }), e._zod.check = (n) => {
1476
- Gt(n.value) || n.issues.push({
1471
+ Ct(n.value) || n.issues.push({
1477
1472
  code: "invalid_format",
1478
1473
  format: "base64",
1479
1474
  input: n.value,
@@ -1483,13 +1478,13 @@ const zo = /* @__PURE__ */ c("$ZodBase64", (e, t) => {
1483
1478
  };
1484
1479
  });
1485
1480
  function wo(e) {
1486
- if (!Ft.test(e))
1481
+ if (!Tt.test(e))
1487
1482
  return !1;
1488
1483
  const t = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), n = t.padEnd(Math.ceil(t.length / 4) * 4, "=");
1489
- return Gt(n);
1484
+ return Ct(n);
1490
1485
  }
1491
1486
  const $o = /* @__PURE__ */ c("$ZodBase64URL", (e, t) => {
1492
- t.pattern ?? (t.pattern = Ft), Z.init(e, t), e._zod.onattach.push((n) => {
1487
+ t.pattern ?? (t.pattern = Tt), w.init(e, t), e._zod.onattach.push((n) => {
1493
1488
  n._zod.bag.contentEncoding = "base64url";
1494
1489
  }), e._zod.check = (n) => {
1495
1490
  wo(n.value) || n.issues.push({
@@ -1501,7 +1496,7 @@ const $o = /* @__PURE__ */ c("$ZodBase64URL", (e, t) => {
1501
1496
  });
1502
1497
  };
1503
1498
  }), Zo = /* @__PURE__ */ c("$ZodE164", (e, t) => {
1504
- t.pattern ?? (t.pattern = Ar), Z.init(e, t);
1499
+ t.pattern ?? (t.pattern = Ar), w.init(e, t);
1505
1500
  });
1506
1501
  function ko(e, t = null) {
1507
1502
  try {
@@ -1512,13 +1507,13 @@ function ko(e, t = null) {
1512
1507
  if (!r)
1513
1508
  return !1;
1514
1509
  const o = JSON.parse(atob(r));
1515
- return !("typ" in o && (o == null ? void 0 : o.typ) !== "JWT" || !o.alg || t && (!("alg" in o) || o.alg !== t));
1510
+ return !("typ" in o && o?.typ !== "JWT" || !o.alg || t && (!("alg" in o) || o.alg !== t));
1516
1511
  } catch {
1517
1512
  return !1;
1518
1513
  }
1519
1514
  }
1520
1515
  const Io = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
1521
- Z.init(e, t), e._zod.check = (n) => {
1516
+ w.init(e, t), e._zod.check = (n) => {
1522
1517
  ko(n.value, t.alg) || n.issues.push({
1523
1518
  code: "invalid_format",
1524
1519
  format: "jwt",
@@ -1528,7 +1523,7 @@ const Io = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
1528
1523
  });
1529
1524
  };
1530
1525
  }), Kt = /* @__PURE__ */ c("$ZodNumber", (e, t) => {
1531
- w.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Nr, e._zod.parse = (n, r) => {
1526
+ z.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Nr, e._zod.parse = (n, r) => {
1532
1527
  if (t.coerce)
1533
1528
  try {
1534
1529
  n.value = Number(n.value);
@@ -1549,7 +1544,7 @@ const Io = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
1549
1544
  }), Eo = /* @__PURE__ */ c("$ZodNumber", (e, t) => {
1550
1545
  Fr.init(e, t), Kt.init(e, t);
1551
1546
  }), Ao = /* @__PURE__ */ c("$ZodBoolean", (e, t) => {
1552
- w.init(e, t), e._zod.pattern = Rr, e._zod.parse = (n, r) => {
1547
+ z.init(e, t), e._zod.pattern = Dr, e._zod.parse = (n, r) => {
1553
1548
  if (t.coerce)
1554
1549
  try {
1555
1550
  n.value = !!n.value;
@@ -1563,19 +1558,19 @@ const Io = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
1563
1558
  inst: e
1564
1559
  }), n;
1565
1560
  };
1566
- }), Oo = /* @__PURE__ */ c("$ZodAny", (e, t) => {
1567
- w.init(e, t), e._zod.parse = (n) => n;
1568
- }), So = /* @__PURE__ */ c("$ZodUnknown", (e, t) => {
1569
- w.init(e, t), e._zod.parse = (n) => n;
1570
- }), xo = /* @__PURE__ */ c("$ZodNever", (e, t) => {
1571
- w.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1561
+ }), xo = /* @__PURE__ */ c("$ZodAny", (e, t) => {
1562
+ z.init(e, t), e._zod.parse = (n) => n;
1563
+ }), Oo = /* @__PURE__ */ c("$ZodUnknown", (e, t) => {
1564
+ z.init(e, t), e._zod.parse = (n) => n;
1565
+ }), So = /* @__PURE__ */ c("$ZodNever", (e, t) => {
1566
+ z.init(e, t), e._zod.parse = (n, r) => (n.issues.push({
1572
1567
  expected: "never",
1573
1568
  code: "invalid_type",
1574
1569
  input: n.value,
1575
1570
  inst: e
1576
1571
  }), n);
1577
1572
  }), Po = /* @__PURE__ */ c("$ZodDate", (e, t) => {
1578
- w.init(e, t), e._zod.parse = (n, r) => {
1573
+ z.init(e, t), e._zod.parse = (n, r) => {
1579
1574
  if (t.coerce)
1580
1575
  try {
1581
1576
  n.value = new Date(n.value);
@@ -1591,11 +1586,11 @@ const Io = /* @__PURE__ */ c("$ZodJWT", (e, t) => {
1591
1586
  }), n;
1592
1587
  };
1593
1588
  });
1594
- function je(e, t, n) {
1595
- e.issues.length && t.issues.push(...Ze(n, e.issues)), t.value[n] = e.value;
1589
+ function Ne(e, t, n) {
1590
+ e.issues.length && t.issues.push(...jt(n, e.issues)), t.value[n] = e.value;
1596
1591
  }
1597
1592
  const jo = /* @__PURE__ */ c("$ZodArray", (e, t) => {
1598
- w.init(e, t), e._zod.parse = (n, r) => {
1593
+ z.init(e, t), e._zod.parse = (n, r) => {
1599
1594
  const o = n.value;
1600
1595
  if (!Array.isArray(o))
1601
1596
  return n.issues.push({
@@ -1607,161 +1602,145 @@ const jo = /* @__PURE__ */ c("$ZodArray", (e, t) => {
1607
1602
  n.value = Array(o.length);
1608
1603
  const i = [];
1609
1604
  for (let s = 0; s < o.length; s++) {
1610
- const u = o[s], a = t.element._zod.run({
1605
+ const u = o[s], f = t.element._zod.run({
1611
1606
  value: u,
1612
1607
  issues: []
1613
1608
  }, r);
1614
- a instanceof Promise ? i.push(a.then((f) => je(f, n, s))) : je(a, n, s);
1609
+ f instanceof Promise ? i.push(f.then((a) => Ne(a, n, s))) : Ne(f, n, s);
1615
1610
  }
1616
1611
  return i.length ? Promise.all(i).then(() => n) : n;
1617
1612
  };
1618
1613
  });
1619
- function te(e, t, n) {
1620
- e.issues.length && t.issues.push(...Ze(n, e.issues)), t.value[n] = e.value;
1621
- }
1622
- function Ne(e, t, n, r) {
1623
- e.issues.length ? r[n] === void 0 ? n in r ? t.value[n] = void 0 : t.value[n] = e.value : t.issues.push(...Ze(n, e.issues)) : e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
1614
+ function te(e, t, n, r) {
1615
+ e.issues.length && t.issues.push(...jt(n, e.issues)), e.value === void 0 ? n in r && (t.value[n] = void 0) : t.value[n] = e.value;
1624
1616
  }
1625
1617
  const No = /* @__PURE__ */ c("$ZodObject", (e, t) => {
1626
- w.init(e, t);
1627
- const n = xt(() => {
1628
- const d = Object.keys(t.shape);
1629
- for (const m of d)
1630
- if (!(t.shape[m] instanceof w))
1631
- throw new Error(`Invalid element at key "${m}": expected a Zod schema`);
1632
- const h = Xn(t.shape);
1618
+ z.init(e, t);
1619
+ const n = St(() => {
1620
+ const p = Object.keys(t.shape);
1621
+ for (const h of p)
1622
+ if (!(t.shape[h] instanceof z))
1623
+ throw new Error(`Invalid element at key "${h}": expected a Zod schema`);
1624
+ const m = Xn(t.shape);
1633
1625
  return {
1634
1626
  shape: t.shape,
1635
- keys: d,
1636
- keySet: new Set(d),
1637
- numKeys: d.length,
1638
- optionalKeys: new Set(h)
1627
+ keys: p,
1628
+ keySet: new Set(p),
1629
+ numKeys: p.length,
1630
+ optionalKeys: new Set(m)
1639
1631
  };
1640
1632
  });
1641
- $(e._zod, "propValues", () => {
1642
- const d = t.shape, h = {};
1643
- for (const m in d) {
1644
- const b = d[m]._zod;
1645
- if (b.values) {
1646
- h[m] ?? (h[m] = /* @__PURE__ */ new Set());
1647
- for (const p of b.values)
1648
- h[m].add(p);
1633
+ y(e._zod, "propValues", () => {
1634
+ const p = t.shape, m = {};
1635
+ for (const h in p) {
1636
+ const I = p[h]._zod;
1637
+ if (I.values) {
1638
+ m[h] ?? (m[h] = /* @__PURE__ */ new Set());
1639
+ for (const d of I.values)
1640
+ m[h].add(d);
1649
1641
  }
1650
1642
  }
1651
- return h;
1643
+ return m;
1652
1644
  });
1653
- const r = (d) => {
1654
- const h = new Qr(["shape", "payload", "ctx"]), m = n.value, b = (_) => {
1655
- const v = G(_);
1656
- return `shape[${v}]._zod.run({ value: input[${v}], issues: [] }, ctx)`;
1645
+ const r = (p) => {
1646
+ const m = new Qr(["shape", "payload", "ctx"]), h = n.value, I = (_) => {
1647
+ const b = Pe(_);
1648
+ return `shape[${b}]._zod.run({ value: input[${b}], issues: [] }, ctx)`;
1657
1649
  };
1658
- h.write("const input = payload.value;");
1659
- const p = /* @__PURE__ */ Object.create(null);
1650
+ m.write("const input = payload.value;");
1651
+ const d = /* @__PURE__ */ Object.create(null);
1660
1652
  let E = 0;
1661
- for (const _ of m.keys)
1662
- p[_] = `key_${E++}`;
1663
- h.write("const newResult = {}");
1664
- for (const _ of m.keys)
1665
- if (m.optionalKeys.has(_)) {
1666
- const v = p[_];
1667
- h.write(`const ${v} = ${b(_)};`);
1668
- const y = G(_);
1669
- h.write(`
1670
- if (${v}.issues.length) {
1671
- if (input[${y}] === undefined) {
1672
- if (${y} in input) {
1673
- newResult[${y}] = undefined;
1674
- }
1675
- } else {
1676
- payload.issues = payload.issues.concat(
1677
- ${v}.issues.map((iss) => ({
1678
- ...iss,
1679
- path: iss.path ? [${y}, ...iss.path] : [${y}],
1680
- }))
1681
- );
1653
+ for (const _ of h.keys)
1654
+ d[_] = `key_${E++}`;
1655
+ m.write("const newResult = {}");
1656
+ for (const _ of h.keys) {
1657
+ const b = d[_], $ = Pe(_);
1658
+ m.write(`const ${b} = ${I(_)};`), m.write(`
1659
+ if (${b}.issues.length) {
1660
+ payload.issues = payload.issues.concat(${b}.issues.map(iss => ({
1661
+ ...iss,
1662
+ path: iss.path ? [${$}, ...iss.path] : [${$}]
1663
+ })));
1664
+ }
1665
+
1666
+ if (${b}.value === undefined) {
1667
+ if (${$} in input) {
1668
+ newResult[${$}] = undefined;
1682
1669
  }
1683
- } else if (${v}.value === undefined) {
1684
- if (${y} in input) newResult[${y}] = undefined;
1685
1670
  } else {
1686
- newResult[${y}] = ${v}.value;
1671
+ newResult[${$}] = ${b}.value;
1687
1672
  }
1688
- `);
1689
- } else {
1690
- const v = p[_];
1691
- h.write(`const ${v} = ${b(_)};`), h.write(`
1692
- if (${v}.issues.length) payload.issues = payload.issues.concat(${v}.issues.map(iss => ({
1693
- ...iss,
1694
- path: iss.path ? [${G(_)}, ...iss.path] : [${G(_)}]
1695
- })));`), h.write(`newResult[${G(_)}] = ${v}.value`);
1696
- }
1697
- h.write("payload.value = newResult;"), h.write("return payload;");
1698
- const z = h.compile();
1699
- return (_, v) => z(d, _, v);
1673
+ `);
1674
+ }
1675
+ m.write("payload.value = newResult;"), m.write("return payload;");
1676
+ const v = m.compile();
1677
+ return (_, b) => v(p, _, b);
1700
1678
  };
1701
1679
  let o;
1702
- const i = _e, s = !St.jitless, a = s && Yn.value, f = t.catchall;
1680
+ const i = ve, s = !Ot.jitless, f = s && Yn.value, a = t.catchall;
1703
1681
  let g;
1704
- e._zod.parse = (d, h) => {
1682
+ e._zod.parse = (p, m) => {
1705
1683
  g ?? (g = n.value);
1706
- const m = d.value;
1707
- if (!i(m))
1708
- return d.issues.push({
1684
+ const h = p.value;
1685
+ if (!i(h))
1686
+ return p.issues.push({
1709
1687
  expected: "object",
1710
1688
  code: "invalid_type",
1711
- input: m,
1689
+ input: h,
1712
1690
  inst: e
1713
- }), d;
1714
- const b = [];
1715
- if (s && a && (h == null ? void 0 : h.async) === !1 && h.jitless !== !0)
1716
- o || (o = r(t.shape)), d = o(d, h);
1691
+ }), p;
1692
+ const I = [];
1693
+ if (s && f && m?.async === !1 && m.jitless !== !0)
1694
+ o || (o = r(t.shape)), p = o(p, m);
1717
1695
  else {
1718
- d.value = {};
1719
- const v = g.shape;
1720
- for (const y of g.keys) {
1721
- const S = v[y], x = S._zod.run({ value: m[y], issues: [] }, h), B = S._zod.optin === "optional" && S._zod.optout === "optional";
1722
- x instanceof Promise ? b.push(x.then((W) => B ? Ne(W, d, y, m) : te(W, d, y))) : B ? Ne(x, d, y, m) : te(x, d, y);
1696
+ p.value = {};
1697
+ const b = g.shape;
1698
+ for (const $ of g.keys) {
1699
+ const O = b[$]._zod.run({ value: h[$], issues: [] }, m);
1700
+ O instanceof Promise ? I.push(O.then((H) => te(H, p, $, h))) : te(O, p, $, h);
1723
1701
  }
1724
1702
  }
1725
- if (!f)
1726
- return b.length ? Promise.all(b).then(() => d) : d;
1727
- const p = [], E = g.keySet, z = f._zod, _ = z.def.type;
1728
- for (const v of Object.keys(m)) {
1729
- if (E.has(v))
1703
+ if (!a)
1704
+ return I.length ? Promise.all(I).then(() => p) : p;
1705
+ const d = [], E = g.keySet, v = a._zod, _ = v.def.type;
1706
+ for (const b of Object.keys(h)) {
1707
+ if (E.has(b))
1730
1708
  continue;
1731
1709
  if (_ === "never") {
1732
- p.push(v);
1710
+ d.push(b);
1733
1711
  continue;
1734
1712
  }
1735
- const y = z.run({ value: m[v], issues: [] }, h);
1736
- y instanceof Promise ? b.push(y.then((S) => te(S, d, v))) : te(y, d, v);
1713
+ const $ = v.run({ value: h[b], issues: [] }, m);
1714
+ $ instanceof Promise ? I.push($.then((P) => te(P, p, b, h))) : te($, p, b, h);
1737
1715
  }
1738
- return p.length && d.issues.push({
1716
+ return d.length && p.issues.push({
1739
1717
  code: "unrecognized_keys",
1740
- keys: p,
1741
- input: m,
1718
+ keys: d,
1719
+ input: h,
1742
1720
  inst: e
1743
- }), b.length ? Promise.all(b).then(() => d) : d;
1721
+ }), I.length ? Promise.all(I).then(() => p) : p;
1744
1722
  };
1745
1723
  });
1746
- function Re(e, t, n, r) {
1747
- for (const o of e)
1748
- if (o.issues.length === 0)
1749
- return t.value = o.value, t;
1750
- return t.issues.push({
1724
+ function De(e, t, n, r) {
1725
+ for (const i of e)
1726
+ if (i.issues.length === 0)
1727
+ return t.value = i.value, t;
1728
+ const o = e.filter((i) => !K(i));
1729
+ return o.length === 1 ? (t.value = o[0].value, o[0]) : (t.issues.push({
1751
1730
  code: "invalid_union",
1752
1731
  input: t.value,
1753
1732
  inst: n,
1754
- errors: e.map((o) => o.issues.map((i) => F(i, r, U())))
1755
- }), t;
1733
+ errors: e.map((i) => i.issues.map((s) => F(s, r, U())))
1734
+ }), t);
1756
1735
  }
1757
- const Ro = /* @__PURE__ */ c("$ZodUnion", (e, t) => {
1758
- w.init(e, t), $(e._zod, "optin", () => t.options.some((n) => n._zod.optin === "optional") ? "optional" : void 0), $(e._zod, "optout", () => t.options.some((n) => n._zod.optout === "optional") ? "optional" : void 0), $(e._zod, "values", () => {
1736
+ const Do = /* @__PURE__ */ c("$ZodUnion", (e, t) => {
1737
+ z.init(e, t), y(e._zod, "optin", () => t.options.some((n) => n._zod.optin === "optional") ? "optional" : void 0), y(e._zod, "optout", () => t.options.some((n) => n._zod.optout === "optional") ? "optional" : void 0), y(e._zod, "values", () => {
1759
1738
  if (t.options.every((n) => n._zod.values))
1760
1739
  return new Set(t.options.flatMap((n) => Array.from(n._zod.values)));
1761
- }), $(e._zod, "pattern", () => {
1740
+ }), y(e._zod, "pattern", () => {
1762
1741
  if (t.options.every((n) => n._zod.pattern)) {
1763
1742
  const n = t.options.map((r) => r._zod.pattern);
1764
- return new RegExp(`^(${n.map((r) => we(r.source)).join("|")})$`);
1743
+ return new RegExp(`^(${n.map((r) => $e(r.source)).join("|")})$`);
1765
1744
  }
1766
1745
  }), e._zod.parse = (n, r) => {
1767
1746
  let o = !1;
@@ -1779,23 +1758,23 @@ const Ro = /* @__PURE__ */ c("$ZodUnion", (e, t) => {
1779
1758
  i.push(u);
1780
1759
  }
1781
1760
  }
1782
- return o ? Promise.all(i).then((s) => Re(s, n, e, r)) : Re(i, n, e, r);
1761
+ return o ? Promise.all(i).then((s) => De(s, n, e, r)) : De(i, n, e, r);
1783
1762
  };
1784
- }), Do = /* @__PURE__ */ c("$ZodIntersection", (e, t) => {
1785
- w.init(e, t), e._zod.parse = (n, r) => {
1763
+ }), Ro = /* @__PURE__ */ c("$ZodIntersection", (e, t) => {
1764
+ z.init(e, t), e._zod.parse = (n, r) => {
1786
1765
  const o = n.value, i = t.left._zod.run({ value: o, issues: [] }, r), s = t.right._zod.run({ value: o, issues: [] }, r);
1787
- return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([a, f]) => De(n, a, f)) : De(n, i, s);
1766
+ return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([f, a]) => Re(n, f, a)) : Re(n, i, s);
1788
1767
  };
1789
1768
  });
1790
- function be(e, t) {
1769
+ function ye(e, t) {
1791
1770
  if (e === t)
1792
1771
  return { valid: !0, data: e };
1793
1772
  if (e instanceof Date && t instanceof Date && +e == +t)
1794
1773
  return { valid: !0, data: e };
1795
- if (ve(e) && ve(t)) {
1774
+ if (be(e) && be(t)) {
1796
1775
  const n = Object.keys(t), r = Object.keys(e).filter((i) => n.indexOf(i) !== -1), o = { ...e, ...t };
1797
1776
  for (const i of r) {
1798
- const s = be(e[i], t[i]);
1777
+ const s = ye(e[i], t[i]);
1799
1778
  if (!s.valid)
1800
1779
  return {
1801
1780
  valid: !1,
@@ -1810,7 +1789,7 @@ function be(e, t) {
1810
1789
  return { valid: !1, mergeErrorPath: [] };
1811
1790
  const n = [];
1812
1791
  for (let r = 0; r < e.length; r++) {
1813
- const o = e[r], i = t[r], s = be(o, i);
1792
+ const o = e[r], i = t[r], s = ye(o, i);
1814
1793
  if (!s.valid)
1815
1794
  return {
1816
1795
  valid: !1,
@@ -1822,28 +1801,28 @@ function be(e, t) {
1822
1801
  }
1823
1802
  return { valid: !1, mergeErrorPath: [] };
1824
1803
  }
1825
- function De(e, t, n) {
1826
- if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), J(e))
1804
+ function Re(e, t, n) {
1805
+ if (t.issues.length && e.issues.push(...t.issues), n.issues.length && e.issues.push(...n.issues), K(e))
1827
1806
  return e;
1828
- const r = be(t.value, n.value);
1807
+ const r = ye(t.value, n.value);
1829
1808
  if (!r.valid)
1830
1809
  throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(r.mergeErrorPath)}`);
1831
1810
  return e.value = r.data, e;
1832
1811
  }
1833
1812
  const Mo = /* @__PURE__ */ c("$ZodEnum", (e, t) => {
1834
- w.init(e, t);
1835
- const n = Kn(t.entries);
1836
- e._zod.values = new Set(n), e._zod.pattern = new RegExp(`^(${n.filter((r) => qn.has(typeof r)).map((r) => typeof r == "string" ? fe(r) : r.toString()).join("|")})$`), e._zod.parse = (r, o) => {
1837
- const i = r.value;
1838
- return e._zod.values.has(i) || r.issues.push({
1813
+ z.init(e, t);
1814
+ const n = Kn(t.entries), r = new Set(n);
1815
+ e._zod.values = r, e._zod.pattern = new RegExp(`^(${n.filter((o) => qn.has(typeof o)).map((o) => typeof o == "string" ? fe(o) : o.toString()).join("|")})$`), e._zod.parse = (o, i) => {
1816
+ const s = o.value;
1817
+ return r.has(s) || o.issues.push({
1839
1818
  code: "invalid_value",
1840
1819
  values: n,
1841
- input: i,
1820
+ input: s,
1842
1821
  inst: e
1843
- }), r;
1822
+ }), o;
1844
1823
  };
1845
1824
  }), Uo = /* @__PURE__ */ c("$ZodFile", (e, t) => {
1846
- w.init(e, t), e._zod.parse = (n, r) => {
1825
+ z.init(e, t), e._zod.parse = (n, r) => {
1847
1826
  const o = n.value;
1848
1827
  return o instanceof File || n.issues.push({
1849
1828
  expected: "file",
@@ -1853,26 +1832,26 @@ const Mo = /* @__PURE__ */ c("$ZodEnum", (e, t) => {
1853
1832
  }), n;
1854
1833
  };
1855
1834
  }), Fo = /* @__PURE__ */ c("$ZodTransform", (e, t) => {
1856
- w.init(e, t), e._zod.parse = (n, r) => {
1835
+ z.init(e, t), e._zod.parse = (n, r) => {
1857
1836
  const o = t.transform(n.value, n);
1858
1837
  if (r.async)
1859
1838
  return (o instanceof Promise ? o : Promise.resolve(o)).then((s) => (n.value = s, n));
1860
1839
  if (o instanceof Promise)
1861
- throw new Y();
1840
+ throw new J();
1862
1841
  return n.value = o, n;
1863
1842
  };
1864
1843
  }), To = /* @__PURE__ */ c("$ZodOptional", (e, t) => {
1865
- w.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", $(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), $(e._zod, "pattern", () => {
1844
+ z.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", y(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), y(e._zod, "pattern", () => {
1866
1845
  const n = t.innerType._zod.pattern;
1867
- return n ? new RegExp(`^(${we(n.source)})?$`) : void 0;
1846
+ return n ? new RegExp(`^(${$e(n.source)})?$`) : void 0;
1868
1847
  }), e._zod.parse = (n, r) => t.innerType._zod.optin === "optional" ? t.innerType._zod.run(n, r) : n.value === void 0 ? n : t.innerType._zod.run(n, r);
1869
1848
  }), Lo = /* @__PURE__ */ c("$ZodNullable", (e, t) => {
1870
- w.init(e, t), $(e._zod, "optin", () => t.innerType._zod.optin), $(e._zod, "optout", () => t.innerType._zod.optout), $(e._zod, "pattern", () => {
1849
+ z.init(e, t), y(e._zod, "optin", () => t.innerType._zod.optin), y(e._zod, "optout", () => t.innerType._zod.optout), y(e._zod, "pattern", () => {
1871
1850
  const n = t.innerType._zod.pattern;
1872
- return n ? new RegExp(`^(${we(n.source)}|null)$`) : void 0;
1873
- }), $(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);
1851
+ return n ? new RegExp(`^(${$e(n.source)}|null)$`) : void 0;
1852
+ }), y(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);
1874
1853
  }), Bo = /* @__PURE__ */ c("$ZodDefault", (e, t) => {
1875
- w.init(e, t), e._zod.optin = "optional", $(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1854
+ z.init(e, t), e._zod.optin = "optional", y(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1876
1855
  if (n.value === void 0)
1877
1856
  return n.value = t.defaultValue, n;
1878
1857
  const o = t.innerType._zod.run(n, r);
@@ -1883,9 +1862,9 @@ function Me(e, t) {
1883
1862
  return e.value === void 0 && (e.value = t.defaultValue), e;
1884
1863
  }
1885
1864
  const Wo = /* @__PURE__ */ c("$ZodPrefault", (e, t) => {
1886
- w.init(e, t), e._zod.optin = "optional", $(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
1865
+ z.init(e, t), e._zod.optin = "optional", y(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => (n.value === void 0 && (n.value = t.defaultValue), t.innerType._zod.run(n, r));
1887
1866
  }), Vo = /* @__PURE__ */ c("$ZodNonOptional", (e, t) => {
1888
- w.init(e, t), $(e._zod, "values", () => {
1867
+ z.init(e, t), y(e._zod, "values", () => {
1889
1868
  const n = t.innerType._zod.values;
1890
1869
  return n ? new Set([...n].filter((r) => r !== void 0)) : void 0;
1891
1870
  }), e._zod.parse = (n, r) => {
@@ -1902,7 +1881,7 @@ function Ue(e, t) {
1902
1881
  }), e;
1903
1882
  }
1904
1883
  const Go = /* @__PURE__ */ c("$ZodCatch", (e, t) => {
1905
- w.init(e, t), e._zod.optin = "optional", $(e._zod, "optout", () => t.innerType._zod.optout), $(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1884
+ z.init(e, t), y(e._zod, "optin", () => t.innerType._zod.optin), y(e._zod, "optout", () => t.innerType._zod.optout), y(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (n, r) => {
1906
1885
  const o = t.innerType._zod.run(n, r);
1907
1886
  return o instanceof Promise ? o.then((i) => (n.value = i.value, i.issues.length && (n.value = t.catchValue({
1908
1887
  ...n,
@@ -1918,17 +1897,17 @@ const Go = /* @__PURE__ */ c("$ZodCatch", (e, t) => {
1918
1897
  input: n.value
1919
1898
  }), n.issues = []), n);
1920
1899
  };
1921
- }), Ko = /* @__PURE__ */ c("$ZodPipe", (e, t) => {
1922
- w.init(e, t), $(e._zod, "values", () => t.in._zod.values), $(e._zod, "optin", () => t.in._zod.optin), $(e._zod, "optout", () => t.out._zod.optout), e._zod.parse = (n, r) => {
1900
+ }), Co = /* @__PURE__ */ c("$ZodPipe", (e, t) => {
1901
+ z.init(e, t), y(e._zod, "values", () => t.in._zod.values), y(e._zod, "optin", () => t.in._zod.optin), y(e._zod, "optout", () => t.out._zod.optout), y(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (n, r) => {
1923
1902
  const o = t.in._zod.run(n, r);
1924
1903
  return o instanceof Promise ? o.then((i) => Fe(i, t, r)) : Fe(o, t, r);
1925
1904
  };
1926
1905
  });
1927
1906
  function Fe(e, t, n) {
1928
- return J(e) ? e : t.out._zod.run({ value: e.value, issues: e.issues }, n);
1907
+ return e.issues.length ? e : t.out._zod.run({ value: e.value, issues: e.issues }, n);
1929
1908
  }
1930
- const Co = /* @__PURE__ */ c("$ZodReadonly", (e, t) => {
1931
- w.init(e, t), $(e._zod, "propValues", () => t.innerType._zod.propValues), $(e._zod, "values", () => t.innerType._zod.values), $(e._zod, "optin", () => t.innerType._zod.optin), $(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (n, r) => {
1909
+ const Ko = /* @__PURE__ */ c("$ZodReadonly", (e, t) => {
1910
+ z.init(e, t), y(e._zod, "propValues", () => t.innerType._zod.propValues), y(e._zod, "values", () => t.innerType._zod.values), y(e._zod, "optin", () => t.innerType._zod.optin), y(e._zod, "optout", () => t.innerType._zod.optout), e._zod.parse = (n, r) => {
1932
1911
  const o = t.innerType._zod.run(n, r);
1933
1912
  return o instanceof Promise ? o.then(Te) : Te(o);
1934
1913
  };
@@ -1937,7 +1916,7 @@ function Te(e) {
1937
1916
  return e.value = Object.freeze(e.value), e;
1938
1917
  }
1939
1918
  const Jo = /* @__PURE__ */ c("$ZodCustom", (e, t) => {
1940
- A.init(e, t), w.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1919
+ A.init(e, t), z.init(e, t), e._zod.parse = (n, r) => n, e._zod.check = (n) => {
1941
1920
  const r = n.value, o = t.fn(r);
1942
1921
  if (o instanceof Promise)
1943
1922
  return o.then((i) => Le(i, n, r, e));
@@ -1956,7 +1935,7 @@ function Le(e, t, n, r) {
1956
1935
  continue: !r._zod.def.abort
1957
1936
  // params: inst._zod.def.params,
1958
1937
  };
1959
- r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(q(o));
1938
+ r._zod.def.params && (o.params = r._zod.def.params), t.issues.push(Y(o));
1960
1939
  }
1961
1940
  }
1962
1941
  class Yo {
@@ -1983,7 +1962,9 @@ class Yo {
1983
1962
  const n = t._zod.parent;
1984
1963
  if (n) {
1985
1964
  const r = { ...this.get(n) ?? {} };
1986
- return delete r.id, { ...r, ...this._map.get(t) };
1965
+ delete r.id;
1966
+ const o = { ...r, ...this._map.get(t) };
1967
+ return Object.keys(o).length ? o : void 0;
1987
1968
  }
1988
1969
  return this._map.get(t);
1989
1970
  }
@@ -2001,7 +1982,7 @@ function Xo(e, t) {
2001
1982
  ...l(t)
2002
1983
  });
2003
1984
  }
2004
- function Ct(e, t) {
1985
+ function Jt(e, t) {
2005
1986
  return new e({
2006
1987
  type: "string",
2007
1988
  format: "email",
@@ -2058,7 +2039,7 @@ function ti(e, t) {
2058
2039
  ...l(t)
2059
2040
  });
2060
2041
  }
2061
- function Jt(e, t) {
2042
+ function Yt(e, t) {
2062
2043
  return new e({
2063
2044
  type: "string",
2064
2045
  format: "url",
@@ -2112,7 +2093,7 @@ function si(e, t) {
2112
2093
  ...l(t)
2113
2094
  });
2114
2095
  }
2115
- function ui(e, t) {
2096
+ function ci(e, t) {
2116
2097
  return new e({
2117
2098
  type: "string",
2118
2099
  format: "xid",
@@ -2121,7 +2102,7 @@ function ui(e, t) {
2121
2102
  ...l(t)
2122
2103
  });
2123
2104
  }
2124
- function ci(e, t) {
2105
+ function ui(e, t) {
2125
2106
  return new e({
2126
2107
  type: "string",
2127
2108
  format: "ksuid",
@@ -2130,7 +2111,7 @@ function ci(e, t) {
2130
2111
  ...l(t)
2131
2112
  });
2132
2113
  }
2133
- function Yt(e, t) {
2114
+ function qt(e, t) {
2134
2115
  return new e({
2135
2116
  type: "string",
2136
2117
  format: "ipv4",
@@ -2166,7 +2147,7 @@ function li(e, t) {
2166
2147
  ...l(t)
2167
2148
  });
2168
2149
  }
2169
- function di(e, t) {
2150
+ function pi(e, t) {
2170
2151
  return new e({
2171
2152
  type: "string",
2172
2153
  format: "base64",
@@ -2175,7 +2156,7 @@ function di(e, t) {
2175
2156
  ...l(t)
2176
2157
  });
2177
2158
  }
2178
- function hi(e, t) {
2159
+ function mi(e, t) {
2179
2160
  return new e({
2180
2161
  type: "string",
2181
2162
  format: "base64url",
@@ -2184,7 +2165,7 @@ function hi(e, t) {
2184
2165
  ...l(t)
2185
2166
  });
2186
2167
  }
2187
- function pi(e, t) {
2168
+ function hi(e, t) {
2188
2169
  return new e({
2189
2170
  type: "string",
2190
2171
  format: "e164",
@@ -2193,7 +2174,7 @@ function pi(e, t) {
2193
2174
  ...l(t)
2194
2175
  });
2195
2176
  }
2196
- function mi(e, t) {
2177
+ function di(e, t) {
2197
2178
  return new e({
2198
2179
  type: "string",
2199
2180
  format: "jwt",
@@ -2283,7 +2264,7 @@ function Ii(e, t) {
2283
2264
  });
2284
2265
  }
2285
2266
  function We(e, t) {
2286
- return new Wt({
2267
+ return new Vt({
2287
2268
  check: "less_than",
2288
2269
  ...l(t),
2289
2270
  value: e,
@@ -2291,7 +2272,7 @@ function We(e, t) {
2291
2272
  });
2292
2273
  }
2293
2274
  function ie(e, t) {
2294
- return new Wt({
2275
+ return new Vt({
2295
2276
  check: "less_than",
2296
2277
  ...l(t),
2297
2278
  value: e,
@@ -2299,7 +2280,7 @@ function ie(e, t) {
2299
2280
  });
2300
2281
  }
2301
2282
  function Ve(e, t) {
2302
- return new Vt({
2283
+ return new Gt({
2303
2284
  check: "greater_than",
2304
2285
  ...l(t),
2305
2286
  value: e,
@@ -2307,7 +2288,7 @@ function Ve(e, t) {
2307
2288
  });
2308
2289
  }
2309
2290
  function se(e, t) {
2310
- return new Vt({
2291
+ return new Gt({
2311
2292
  check: "greater_than",
2312
2293
  ...l(t),
2313
2294
  value: e,
@@ -2335,7 +2316,7 @@ function Ai(e, t) {
2335
2316
  minimum: e
2336
2317
  });
2337
2318
  }
2338
- function qt(e, t) {
2319
+ function Xt(e, t) {
2339
2320
  return new Br({
2340
2321
  check: "max_length",
2341
2322
  ...l(t),
@@ -2349,14 +2330,14 @@ function ae(e, t) {
2349
2330
  minimum: e
2350
2331
  });
2351
2332
  }
2352
- function Xt(e, t) {
2333
+ function Ht(e, t) {
2353
2334
  return new Vr({
2354
2335
  check: "length_equals",
2355
2336
  ...l(t),
2356
2337
  length: e
2357
2338
  });
2358
2339
  }
2359
- function Oi(e, t) {
2340
+ function xi(e, t) {
2360
2341
  return new Gr({
2361
2342
  check: "string_format",
2362
2343
  format: "regex",
@@ -2364,15 +2345,15 @@ function Oi(e, t) {
2364
2345
  pattern: e
2365
2346
  });
2366
2347
  }
2367
- function Si(e) {
2368
- return new Kr({
2348
+ function Oi(e) {
2349
+ return new Cr({
2369
2350
  check: "string_format",
2370
2351
  format: "lowercase",
2371
2352
  ...l(e)
2372
2353
  });
2373
2354
  }
2374
- function xi(e) {
2375
- return new Cr({
2355
+ function Si(e) {
2356
+ return new Kr({
2376
2357
  check: "string_format",
2377
2358
  format: "uppercase",
2378
2359
  ...l(e)
@@ -2402,30 +2383,30 @@ function Ni(e, t) {
2402
2383
  suffix: e
2403
2384
  });
2404
2385
  }
2405
- function Ri(e, t) {
2386
+ function Di(e, t) {
2406
2387
  return new Xr({
2407
2388
  check: "mime_type",
2408
2389
  mime: e,
2409
2390
  ...l(t)
2410
2391
  });
2411
2392
  }
2412
- function H(e) {
2393
+ function X(e) {
2413
2394
  return new Hr({
2414
2395
  check: "overwrite",
2415
2396
  tx: e
2416
2397
  });
2417
2398
  }
2418
- function Di(e) {
2419
- return H((t) => t.normalize(e));
2399
+ function Ri(e) {
2400
+ return X((t) => t.normalize(e));
2420
2401
  }
2421
2402
  function Mi() {
2422
- return H((e) => e.trim());
2403
+ return X((e) => e.trim());
2423
2404
  }
2424
2405
  function Ui() {
2425
- return H((e) => e.toLowerCase());
2406
+ return X((e) => e.toLowerCase());
2426
2407
  }
2427
2408
  function Fi() {
2428
- return H((e) => e.toUpperCase());
2409
+ return X((e) => e.toUpperCase());
2429
2410
  }
2430
2411
  function Ti(e, t, n) {
2431
2412
  return new e({
@@ -2452,25 +2433,25 @@ function Bi(e, t, n) {
2452
2433
  });
2453
2434
  }
2454
2435
  const Wi = /* @__PURE__ */ c("ZodISODateTime", (e, t) => {
2455
- ho.init(e, t), I.init(e, t);
2436
+ po.init(e, t), k.init(e, t);
2456
2437
  });
2457
2438
  function Vi(e) {
2458
2439
  return gi(Wi, e);
2459
2440
  }
2460
2441
  const Gi = /* @__PURE__ */ c("ZodISODate", (e, t) => {
2461
- po.init(e, t), I.init(e, t);
2442
+ mo.init(e, t), k.init(e, t);
2462
2443
  });
2463
- function Ki(e) {
2444
+ function Ci(e) {
2464
2445
  return _i(Gi, e);
2465
2446
  }
2466
- const Ci = /* @__PURE__ */ c("ZodISOTime", (e, t) => {
2467
- mo.init(e, t), I.init(e, t);
2447
+ const Ki = /* @__PURE__ */ c("ZodISOTime", (e, t) => {
2448
+ ho.init(e, t), k.init(e, t);
2468
2449
  });
2469
2450
  function Ji(e) {
2470
- return vi(Ci, e);
2451
+ return vi(Ki, e);
2471
2452
  }
2472
2453
  const Yi = /* @__PURE__ */ c("ZodISODuration", (e, t) => {
2473
- go.init(e, t), I.init(e, t);
2454
+ go.init(e, t), k.init(e, t);
2474
2455
  });
2475
2456
  function qi(e) {
2476
2457
  return bi(Yi, e);
@@ -2486,11 +2467,15 @@ const Xi = (e, t) => {
2486
2467
  // enumerable: false,
2487
2468
  },
2488
2469
  addIssue: {
2489
- value: (n) => e.issues.push(n)
2470
+ value: (n) => {
2471
+ e.issues.push(n), e.message = JSON.stringify(e.issues, _e, 2);
2472
+ }
2490
2473
  // enumerable: false,
2491
2474
  },
2492
2475
  addIssues: {
2493
- value: (n) => e.issues.push(...n)
2476
+ value: (n) => {
2477
+ e.issues.push(...n), e.message = JSON.stringify(e.issues, _e, 2);
2478
+ }
2494
2479
  // enumerable: false,
2495
2480
  },
2496
2481
  isEmpty: {
@@ -2500,9 +2485,9 @@ const Xi = (e, t) => {
2500
2485
  // enumerable: false,
2501
2486
  }
2502
2487
  });
2503
- }, de = c("ZodError", Xi, {
2488
+ }, pe = c("ZodError", Xi, {
2504
2489
  Parent: Error
2505
- }), Hi = /* @__PURE__ */ ur(de), Qi = /* @__PURE__ */ cr(de), es = /* @__PURE__ */ Mt(de), ts = /* @__PURE__ */ Ut(de), k = /* @__PURE__ */ c("ZodType", (e, t) => (w.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(
2490
+ }), Hi = /* @__PURE__ */ cr(pe), Qi = /* @__PURE__ */ ur(pe), es = /* @__PURE__ */ Ut(pe), ts = /* @__PURE__ */ Ft(pe), Z = /* @__PURE__ */ c("ZodType", (e, t) => (z.init(e, t), e.def = t, Object.defineProperty(e, "_def", { value: t }), e.check = (...n) => e.clone(
2506
2491
  {
2507
2492
  ...t,
2508
2493
  checks: [
@@ -2511,13 +2496,12 @@ const Xi = (e, t) => {
2511
2496
  ]
2512
2497
  }
2513
2498
  // { parent: true }
2514
- ), e.clone = (n, r) => T(e, n, r), e.brand = () => e, e.register = (n, r) => (n.add(e, r), e), e.parse = (n, r) => Hi(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.refine = (n, r) => e.check(Ys(n, r)), e.superRefine = (n) => e.check(qs(n)), e.overwrite = (n) => e.check(H(n)), e.optional = () => Ye(e), e.nullable = () => qe(e), e.nullish = () => Ye(qe(e)), e.nonoptional = (n) => Ls(e, n), e.array = () => O(e), e.or = (n) => sn([e, n]), e.and = (n) => un(e, n), e.transform = (n) => Xe(e, Rs(n)), e.default = (n) => Us(e, n), e.prefault = (n) => Ts(e, n), e.catch = (n) => Ws(e, n), e.pipe = (n) => Xe(e, n), e.readonly = () => Ks(e), e.describe = (n) => {
2499
+ ), e.clone = (n, r) => L(e, n, r), e.brand = () => e, e.register = (n, r) => (n.add(e, r), e), e.parse = (n, r) => Hi(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.refine = (n, r) => e.check(Ys(n, r)), e.superRefine = (n) => e.check(qs(n)), e.overwrite = (n) => e.check(X(n)), e.optional = () => Ye(e), e.nullable = () => qe(e), e.nullish = () => Ye(qe(e)), e.nonoptional = (n) => Ls(e, n), e.array = () => x(e), e.or = (n) => cn([e, n]), e.and = (n) => un(e, n), e.transform = (n) => Xe(e, Ds(n)), e.default = (n) => Us(e, n), e.prefault = (n) => Ts(e, n), e.catch = (n) => Ws(e, n), e.pipe = (n) => Xe(e, n), e.readonly = () => Cs(e), e.describe = (n) => {
2515
2500
  const r = e.clone();
2516
2501
  return ne.add(r, { description: n }), r;
2517
2502
  }, Object.defineProperty(e, "description", {
2518
2503
  get() {
2519
- var n;
2520
- return (n = ne.get(e)) == null ? void 0 : n.description;
2504
+ return ne.get(e)?.description;
2521
2505
  },
2522
2506
  configurable: !0
2523
2507
  }), e.meta = (...n) => {
@@ -2525,108 +2509,108 @@ const Xi = (e, t) => {
2525
2509
  return ne.get(e);
2526
2510
  const r = e.clone();
2527
2511
  return ne.add(r, n[0]), r;
2528
- }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Ht = /* @__PURE__ */ c("_ZodString", (e, t) => {
2529
- Ie.init(e, t), k.init(e, t);
2512
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e)), Qt = /* @__PURE__ */ c("_ZodString", (e, t) => {
2513
+ ke.init(e, t), Z.init(e, t);
2530
2514
  const n = e._zod.bag;
2531
- e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(Oi(...r)), e.includes = (...r) => e.check(Pi(...r)), e.startsWith = (...r) => e.check(ji(...r)), e.endsWith = (...r) => e.check(Ni(...r)), e.min = (...r) => e.check(ae(...r)), e.max = (...r) => e.check(qt(...r)), e.length = (...r) => e.check(Xt(...r)), e.nonempty = (...r) => e.check(ae(1, ...r)), e.lowercase = (r) => e.check(Si(r)), e.uppercase = (r) => e.check(xi(r)), e.trim = () => e.check(Mi()), e.normalize = (...r) => e.check(Di(...r)), e.toLowerCase = () => e.check(Ui()), e.toUpperCase = () => e.check(Fi());
2515
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, e.regex = (...r) => e.check(xi(...r)), e.includes = (...r) => e.check(Pi(...r)), e.startsWith = (...r) => e.check(ji(...r)), e.endsWith = (...r) => e.check(Ni(...r)), e.min = (...r) => e.check(ae(...r)), e.max = (...r) => e.check(Xt(...r)), e.length = (...r) => e.check(Ht(...r)), e.nonempty = (...r) => e.check(ae(1, ...r)), e.lowercase = (r) => e.check(Oi(r)), e.uppercase = (r) => e.check(Si(r)), e.trim = () => e.check(Mi()), e.normalize = (...r) => e.check(Ri(...r)), e.toLowerCase = () => e.check(Ui()), e.toUpperCase = () => e.check(Fi());
2532
2516
  }), ns = /* @__PURE__ */ c("ZodString", (e, t) => {
2533
- Ie.init(e, t), Ht.init(e, t), e.email = (n) => e.check(Ct(Qt, n)), e.url = (n) => e.check(Jt(tn, n)), e.jwt = (n) => e.check(mi(_s, n)), e.emoji = (n) => e.check(ni(rs, n)), e.guid = (n) => e.check(Be(Ke, n)), e.uuid = (n) => e.check(Ho(re, n)), e.uuidv4 = (n) => e.check(Qo(re, n)), e.uuidv6 = (n) => e.check(ei(re, n)), e.uuidv7 = (n) => e.check(ti(re, n)), e.nanoid = (n) => e.check(ri(os, n)), e.guid = (n) => e.check(Be(Ke, n)), e.cuid = (n) => e.check(oi(is, n)), e.cuid2 = (n) => e.check(ii(ss, n)), e.ulid = (n) => e.check(si(us, n)), e.base64 = (n) => e.check(di(ps, n)), e.base64url = (n) => e.check(hi(ms, n)), e.xid = (n) => e.check(ui(cs, n)), e.ksuid = (n) => e.check(ci(as, n)), e.ipv4 = (n) => e.check(Yt(rn, n)), e.ipv6 = (n) => e.check(ai(ls, n)), e.cidrv4 = (n) => e.check(fi(ds, n)), e.cidrv6 = (n) => e.check(li(hs, n)), e.e164 = (n) => e.check(pi(gs, n)), e.datetime = (n) => e.check(Vi(n)), e.date = (n) => e.check(Ki(n)), e.time = (n) => e.check(Ji(n)), e.duration = (n) => e.check(qi(n));
2517
+ ke.init(e, t), Qt.init(e, t), e.email = (n) => e.check(Jt(en, n)), e.url = (n) => e.check(Yt(nn, n)), e.jwt = (n) => e.check(di(_s, n)), e.emoji = (n) => e.check(ni(rs, n)), e.guid = (n) => e.check(Be(Ce, n)), e.uuid = (n) => e.check(Ho(re, n)), e.uuidv4 = (n) => e.check(Qo(re, n)), e.uuidv6 = (n) => e.check(ei(re, n)), e.uuidv7 = (n) => e.check(ti(re, n)), e.nanoid = (n) => e.check(ri(os, n)), e.guid = (n) => e.check(Be(Ce, n)), e.cuid = (n) => e.check(oi(is, n)), e.cuid2 = (n) => e.check(ii(ss, n)), e.ulid = (n) => e.check(si(cs, n)), e.base64 = (n) => e.check(pi(hs, n)), e.base64url = (n) => e.check(mi(ds, n)), e.xid = (n) => e.check(ci(us, n)), e.ksuid = (n) => e.check(ui(as, n)), e.ipv4 = (n) => e.check(qt(on, n)), e.ipv6 = (n) => e.check(ai(ls, n)), e.cidrv4 = (n) => e.check(fi(ps, n)), e.cidrv6 = (n) => e.check(li(ms, n)), e.e164 = (n) => e.check(hi(gs, n)), e.datetime = (n) => e.check(Vi(n)), e.date = (n) => e.check(Ci(n)), e.time = (n) => e.check(Ji(n)), e.duration = (n) => e.check(qi(n));
2534
2518
  });
2535
2519
  function M(e) {
2536
2520
  return Xo(ns, e);
2537
2521
  }
2538
- const I = /* @__PURE__ */ c("ZodStringFormat", (e, t) => {
2539
- Z.init(e, t), Ht.init(e, t);
2540
- }), Qt = /* @__PURE__ */ c("ZodEmail", (e, t) => {
2541
- ro.init(e, t), I.init(e, t);
2522
+ const k = /* @__PURE__ */ c("ZodStringFormat", (e, t) => {
2523
+ w.init(e, t), Qt.init(e, t);
2524
+ }), en = /* @__PURE__ */ c("ZodEmail", (e, t) => {
2525
+ ro.init(e, t), k.init(e, t);
2542
2526
  });
2543
- function en(e) {
2544
- return Ct(Qt, e);
2527
+ function tn(e) {
2528
+ return Jt(en, e);
2545
2529
  }
2546
- const Ke = /* @__PURE__ */ c("ZodGUID", (e, t) => {
2547
- to.init(e, t), I.init(e, t);
2530
+ const Ce = /* @__PURE__ */ c("ZodGUID", (e, t) => {
2531
+ to.init(e, t), k.init(e, t);
2548
2532
  }), re = /* @__PURE__ */ c("ZodUUID", (e, t) => {
2549
- no.init(e, t), I.init(e, t);
2550
- }), tn = /* @__PURE__ */ c("ZodURL", (e, t) => {
2551
- oo.init(e, t), I.init(e, t);
2533
+ no.init(e, t), k.init(e, t);
2534
+ }), nn = /* @__PURE__ */ c("ZodURL", (e, t) => {
2535
+ oo.init(e, t), k.init(e, t);
2552
2536
  });
2553
- function nn(e) {
2554
- return Jt(tn, e);
2537
+ function rn(e) {
2538
+ return Yt(nn, e);
2555
2539
  }
2556
2540
  const rs = /* @__PURE__ */ c("ZodEmoji", (e, t) => {
2557
- io.init(e, t), I.init(e, t);
2541
+ io.init(e, t), k.init(e, t);
2558
2542
  }), os = /* @__PURE__ */ c("ZodNanoID", (e, t) => {
2559
- so.init(e, t), I.init(e, t);
2543
+ so.init(e, t), k.init(e, t);
2560
2544
  }), is = /* @__PURE__ */ c("ZodCUID", (e, t) => {
2561
- uo.init(e, t), I.init(e, t);
2545
+ co.init(e, t), k.init(e, t);
2562
2546
  }), ss = /* @__PURE__ */ c("ZodCUID2", (e, t) => {
2563
- co.init(e, t), I.init(e, t);
2564
- }), us = /* @__PURE__ */ c("ZodULID", (e, t) => {
2565
- ao.init(e, t), I.init(e, t);
2566
- }), cs = /* @__PURE__ */ c("ZodXID", (e, t) => {
2567
- fo.init(e, t), I.init(e, t);
2547
+ uo.init(e, t), k.init(e, t);
2548
+ }), cs = /* @__PURE__ */ c("ZodULID", (e, t) => {
2549
+ ao.init(e, t), k.init(e, t);
2550
+ }), us = /* @__PURE__ */ c("ZodXID", (e, t) => {
2551
+ fo.init(e, t), k.init(e, t);
2568
2552
  }), as = /* @__PURE__ */ c("ZodKSUID", (e, t) => {
2569
- lo.init(e, t), I.init(e, t);
2570
- }), rn = /* @__PURE__ */ c("ZodIPv4", (e, t) => {
2571
- _o.init(e, t), I.init(e, t);
2553
+ lo.init(e, t), k.init(e, t);
2554
+ }), on = /* @__PURE__ */ c("ZodIPv4", (e, t) => {
2555
+ _o.init(e, t), k.init(e, t);
2572
2556
  });
2573
2557
  function fs(e) {
2574
- return Yt(rn, e);
2558
+ return qt(on, e);
2575
2559
  }
2576
2560
  const ls = /* @__PURE__ */ c("ZodIPv6", (e, t) => {
2577
- vo.init(e, t), I.init(e, t);
2578
- }), ds = /* @__PURE__ */ c("ZodCIDRv4", (e, t) => {
2579
- bo.init(e, t), I.init(e, t);
2580
- }), hs = /* @__PURE__ */ c("ZodCIDRv6", (e, t) => {
2581
- yo.init(e, t), I.init(e, t);
2582
- }), ps = /* @__PURE__ */ c("ZodBase64", (e, t) => {
2583
- zo.init(e, t), I.init(e, t);
2584
- }), ms = /* @__PURE__ */ c("ZodBase64URL", (e, t) => {
2585
- $o.init(e, t), I.init(e, t);
2561
+ vo.init(e, t), k.init(e, t);
2562
+ }), ps = /* @__PURE__ */ c("ZodCIDRv4", (e, t) => {
2563
+ bo.init(e, t), k.init(e, t);
2564
+ }), ms = /* @__PURE__ */ c("ZodCIDRv6", (e, t) => {
2565
+ yo.init(e, t), k.init(e, t);
2566
+ }), hs = /* @__PURE__ */ c("ZodBase64", (e, t) => {
2567
+ zo.init(e, t), k.init(e, t);
2568
+ }), ds = /* @__PURE__ */ c("ZodBase64URL", (e, t) => {
2569
+ $o.init(e, t), k.init(e, t);
2586
2570
  }), gs = /* @__PURE__ */ c("ZodE164", (e, t) => {
2587
- Zo.init(e, t), I.init(e, t);
2571
+ Zo.init(e, t), k.init(e, t);
2588
2572
  }), _s = /* @__PURE__ */ c("ZodJWT", (e, t) => {
2589
- Io.init(e, t), I.init(e, t);
2590
- }), on = /* @__PURE__ */ c("ZodNumber", (e, t) => {
2591
- Kt.init(e, t), k.init(e, t), e.gt = (r, o) => e.check(Ve(r, o)), e.gte = (r, o) => e.check(se(r, o)), e.min = (r, o) => e.check(se(r, o)), e.lt = (r, o) => e.check(We(r, o)), e.lte = (r, o) => e.check(ie(r, o)), e.max = (r, o) => e.check(ie(r, o)), e.int = (r) => e.check(Ce(r)), e.safe = (r) => e.check(Ce(r)), e.positive = (r) => e.check(Ve(0, r)), e.nonnegative = (r) => e.check(se(0, r)), e.negative = (r) => e.check(We(0, r)), e.nonpositive = (r) => e.check(ie(0, r)), e.multipleOf = (r, o) => e.check(Ge(r, o)), e.step = (r, o) => e.check(Ge(r, o)), e.finite = () => e;
2573
+ Io.init(e, t), k.init(e, t);
2574
+ }), sn = /* @__PURE__ */ c("ZodNumber", (e, t) => {
2575
+ Kt.init(e, t), Z.init(e, t), e.gt = (r, o) => e.check(Ve(r, o)), e.gte = (r, o) => e.check(se(r, o)), e.min = (r, o) => e.check(se(r, o)), e.lt = (r, o) => e.check(We(r, o)), e.lte = (r, o) => e.check(ie(r, o)), e.max = (r, o) => e.check(ie(r, o)), e.int = (r) => e.check(Ke(r)), e.safe = (r) => e.check(Ke(r)), e.positive = (r) => e.check(Ve(0, r)), e.nonnegative = (r) => e.check(se(0, r)), e.negative = (r) => e.check(We(0, r)), e.nonpositive = (r) => e.check(ie(0, r)), e.multipleOf = (r, o) => e.check(Ge(r, o)), e.step = (r, o) => e.check(Ge(r, o)), e.finite = () => e;
2592
2576
  const n = e._zod.bag;
2593
2577
  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;
2594
2578
  });
2595
- function D(e) {
2596
- return yi(on, e);
2579
+ function R(e) {
2580
+ return yi(sn, e);
2597
2581
  }
2598
2582
  const vs = /* @__PURE__ */ c("ZodNumberFormat", (e, t) => {
2599
- Eo.init(e, t), on.init(e, t);
2583
+ Eo.init(e, t), sn.init(e, t);
2600
2584
  });
2601
- function Ce(e) {
2585
+ function Ke(e) {
2602
2586
  return zi(vs, e);
2603
2587
  }
2604
2588
  const bs = /* @__PURE__ */ c("ZodBoolean", (e, t) => {
2605
- Ao.init(e, t), k.init(e, t);
2589
+ Ao.init(e, t), Z.init(e, t);
2606
2590
  });
2607
2591
  function ys(e) {
2608
2592
  return wi(bs, e);
2609
2593
  }
2610
2594
  const zs = /* @__PURE__ */ c("ZodAny", (e, t) => {
2611
- Oo.init(e, t), k.init(e, t);
2595
+ xo.init(e, t), Z.init(e, t);
2612
2596
  });
2613
- function R() {
2597
+ function D() {
2614
2598
  return $i(zs);
2615
2599
  }
2616
2600
  const ws = /* @__PURE__ */ c("ZodUnknown", (e, t) => {
2617
- So.init(e, t), k.init(e, t);
2601
+ Oo.init(e, t), Z.init(e, t);
2618
2602
  });
2619
2603
  function Je() {
2620
2604
  return Zi(ws);
2621
2605
  }
2622
2606
  const $s = /* @__PURE__ */ c("ZodNever", (e, t) => {
2623
- xo.init(e, t), k.init(e, t);
2607
+ So.init(e, t), Z.init(e, t);
2624
2608
  });
2625
2609
  function Zs(e) {
2626
2610
  return ki($s, e);
2627
2611
  }
2628
2612
  const ks = /* @__PURE__ */ c("ZodDate", (e, t) => {
2629
- Po.init(e, t), k.init(e, t), e.min = (r, o) => e.check(se(r, o)), e.max = (r, o) => e.check(ie(r, o));
2613
+ Po.init(e, t), Z.init(e, t), e.min = (r, o) => e.check(se(r, o)), e.max = (r, o) => e.check(ie(r, o));
2630
2614
  const n = e._zod.bag;
2631
2615
  e.minDate = n.minimum ? new Date(n.minimum) : null, e.maxDate = n.maximum ? new Date(n.maximum) : null;
2632
2616
  });
@@ -2634,46 +2618,46 @@ function Is(e) {
2634
2618
  return Ii(ks, e);
2635
2619
  }
2636
2620
  const Es = /* @__PURE__ */ c("ZodArray", (e, t) => {
2637
- jo.init(e, t), k.init(e, t), e.element = t.element, e.min = (n, r) => e.check(ae(n, r)), e.nonempty = (n) => e.check(ae(1, n)), e.max = (n, r) => e.check(qt(n, r)), e.length = (n, r) => e.check(Xt(n, r)), e.unwrap = () => e.element;
2621
+ jo.init(e, t), Z.init(e, t), e.element = t.element, e.min = (n, r) => e.check(ae(n, r)), e.nonempty = (n) => e.check(ae(1, n)), e.max = (n, r) => e.check(Xt(n, r)), e.length = (n, r) => e.check(Ht(n, r)), e.unwrap = () => e.element;
2638
2622
  });
2639
- function O(e, t) {
2623
+ function x(e, t) {
2640
2624
  return Ti(Es, e, t);
2641
2625
  }
2642
2626
  const As = /* @__PURE__ */ c("ZodObject", (e, t) => {
2643
- No.init(e, t), k.init(e, t), $(e, "shape", () => t.shape), e.keyof = () => Ps(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Je() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Je() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Zs() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => tr(e, n), e.merge = (n) => nr(e, n), e.pick = (n) => Qn(e, n), e.omit = (n) => er(e, n), e.partial = (...n) => rr(cn, e, n[0]), e.required = (...n) => or(an, e, n[0]);
2627
+ No.init(e, t), Z.init(e, t), y(e, "shape", () => t.shape), e.keyof = () => Ps(Object.keys(e._zod.def.shape)), e.catchall = (n) => e.clone({ ...e._zod.def, catchall: n }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: Je() }), e.loose = () => e.clone({ ...e._zod.def, catchall: Je() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Zs() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (n) => tr(e, n), e.merge = (n) => nr(e, n), e.pick = (n) => Qn(e, n), e.omit = (n) => er(e, n), e.partial = (...n) => rr(an, e, n[0]), e.required = (...n) => or(fn, e, n[0]);
2644
2628
  });
2645
- function Os(e, t) {
2629
+ function xs(e, t) {
2646
2630
  const n = {
2647
2631
  type: "object",
2648
2632
  get shape() {
2649
- return $e(this, "shape", { ...e }), this.shape;
2633
+ return T(this, "shape", { ...e }), this.shape;
2650
2634
  },
2651
2635
  ...l(t)
2652
2636
  };
2653
2637
  return new As(n);
2654
2638
  }
2655
- const Ss = /* @__PURE__ */ c("ZodUnion", (e, t) => {
2656
- Ro.init(e, t), k.init(e, t), e.options = t.options;
2639
+ const Os = /* @__PURE__ */ c("ZodUnion", (e, t) => {
2640
+ Do.init(e, t), Z.init(e, t), e.options = t.options;
2657
2641
  });
2658
- function sn(e, t) {
2659
- return new Ss({
2642
+ function cn(e, t) {
2643
+ return new Os({
2660
2644
  type: "union",
2661
2645
  options: e,
2662
2646
  ...l(t)
2663
2647
  });
2664
2648
  }
2665
- const xs = /* @__PURE__ */ c("ZodIntersection", (e, t) => {
2666
- Do.init(e, t), k.init(e, t);
2649
+ const Ss = /* @__PURE__ */ c("ZodIntersection", (e, t) => {
2650
+ Ro.init(e, t), Z.init(e, t);
2667
2651
  });
2668
2652
  function un(e, t) {
2669
- return new xs({
2653
+ return new Ss({
2670
2654
  type: "intersection",
2671
2655
  left: e,
2672
2656
  right: t
2673
2657
  });
2674
2658
  }
2675
- const ye = /* @__PURE__ */ c("ZodEnum", (e, t) => {
2676
- Mo.init(e, t), k.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
2659
+ const ze = /* @__PURE__ */ c("ZodEnum", (e, t) => {
2660
+ Mo.init(e, t), Z.init(e, t), e.enum = t.entries, e.options = Object.values(t.entries);
2677
2661
  const n = new Set(Object.keys(t.entries));
2678
2662
  e.extract = (r, o) => {
2679
2663
  const i = {};
@@ -2682,7 +2666,7 @@ const ye = /* @__PURE__ */ c("ZodEnum", (e, t) => {
2682
2666
  i[s] = t.entries[s];
2683
2667
  else
2684
2668
  throw new Error(`Key ${s} not found in enum`);
2685
- return new ye({
2669
+ return new ze({
2686
2670
  ...t,
2687
2671
  checks: [],
2688
2672
  ...l(o),
@@ -2695,7 +2679,7 @@ const ye = /* @__PURE__ */ c("ZodEnum", (e, t) => {
2695
2679
  delete i[s];
2696
2680
  else
2697
2681
  throw new Error(`Key ${s} not found in enum`);
2698
- return new ye({
2682
+ return new ze({
2699
2683
  ...t,
2700
2684
  checks: [],
2701
2685
  ...l(o),
@@ -2705,58 +2689,58 @@ const ye = /* @__PURE__ */ c("ZodEnum", (e, t) => {
2705
2689
  });
2706
2690
  function Ps(e, t) {
2707
2691
  const n = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
2708
- return new ye({
2692
+ return new ze({
2709
2693
  type: "enum",
2710
2694
  entries: n,
2711
2695
  ...l(t)
2712
2696
  });
2713
2697
  }
2714
2698
  const js = /* @__PURE__ */ c("ZodFile", (e, t) => {
2715
- Uo.init(e, t), k.init(e, t), e.min = (n, r) => e.check(Ai(n, r)), e.max = (n, r) => e.check(Ei(n, r)), e.mime = (n, r) => e.check(Ri(Array.isArray(n) ? n : [n], r));
2699
+ Uo.init(e, t), Z.init(e, t), e.min = (n, r) => e.check(Ai(n, r)), e.max = (n, r) => e.check(Ei(n, r)), e.mime = (n, r) => e.check(Di(Array.isArray(n) ? n : [n], r));
2716
2700
  });
2717
2701
  function j(e) {
2718
2702
  return Li(js, e);
2719
2703
  }
2720
2704
  const Ns = /* @__PURE__ */ c("ZodTransform", (e, t) => {
2721
- Fo.init(e, t), k.init(e, t), e._zod.parse = (n, r) => {
2705
+ Fo.init(e, t), Z.init(e, t), e._zod.parse = (n, r) => {
2722
2706
  n.addIssue = (i) => {
2723
2707
  if (typeof i == "string")
2724
- n.issues.push(q(i, n.value, t));
2708
+ n.issues.push(Y(i, n.value, t));
2725
2709
  else {
2726
2710
  const s = i;
2727
- s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = n.value), s.inst ?? (s.inst = e), s.continue ?? (s.continue = !0), n.issues.push(q(s));
2711
+ s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), s.input ?? (s.input = n.value), s.inst ?? (s.inst = e), n.issues.push(Y(s));
2728
2712
  }
2729
2713
  };
2730
2714
  const o = t.transform(n.value, n);
2731
2715
  return o instanceof Promise ? o.then((i) => (n.value = i, n)) : (n.value = o, n);
2732
2716
  };
2733
2717
  });
2734
- function Rs(e) {
2718
+ function Ds(e) {
2735
2719
  return new Ns({
2736
2720
  type: "transform",
2737
2721
  transform: e
2738
2722
  });
2739
2723
  }
2740
- const cn = /* @__PURE__ */ c("ZodOptional", (e, t) => {
2741
- To.init(e, t), k.init(e, t), e.unwrap = () => e._zod.def.innerType;
2724
+ const an = /* @__PURE__ */ c("ZodOptional", (e, t) => {
2725
+ To.init(e, t), Z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2742
2726
  });
2743
2727
  function Ye(e) {
2744
- return new cn({
2728
+ return new an({
2745
2729
  type: "optional",
2746
2730
  innerType: e
2747
2731
  });
2748
2732
  }
2749
- const Ds = /* @__PURE__ */ c("ZodNullable", (e, t) => {
2750
- Lo.init(e, t), k.init(e, t), e.unwrap = () => e._zod.def.innerType;
2733
+ const Rs = /* @__PURE__ */ c("ZodNullable", (e, t) => {
2734
+ Lo.init(e, t), Z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2751
2735
  });
2752
2736
  function qe(e) {
2753
- return new Ds({
2737
+ return new Rs({
2754
2738
  type: "nullable",
2755
2739
  innerType: e
2756
2740
  });
2757
2741
  }
2758
2742
  const Ms = /* @__PURE__ */ c("ZodDefault", (e, t) => {
2759
- Bo.init(e, t), k.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2743
+ Bo.init(e, t), Z.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2760
2744
  });
2761
2745
  function Us(e, t) {
2762
2746
  return new Ms({
@@ -2768,7 +2752,7 @@ function Us(e, t) {
2768
2752
  });
2769
2753
  }
2770
2754
  const Fs = /* @__PURE__ */ c("ZodPrefault", (e, t) => {
2771
- Wo.init(e, t), k.init(e, t), e.unwrap = () => e._zod.def.innerType;
2755
+ Wo.init(e, t), Z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2772
2756
  });
2773
2757
  function Ts(e, t) {
2774
2758
  return new Fs({
@@ -2779,18 +2763,18 @@ function Ts(e, t) {
2779
2763
  }
2780
2764
  });
2781
2765
  }
2782
- const an = /* @__PURE__ */ c("ZodNonOptional", (e, t) => {
2783
- Vo.init(e, t), k.init(e, t), e.unwrap = () => e._zod.def.innerType;
2766
+ const fn = /* @__PURE__ */ c("ZodNonOptional", (e, t) => {
2767
+ Vo.init(e, t), Z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2784
2768
  });
2785
2769
  function Ls(e, t) {
2786
- return new an({
2770
+ return new fn({
2787
2771
  type: "nonoptional",
2788
2772
  innerType: e,
2789
2773
  ...l(t)
2790
2774
  });
2791
2775
  }
2792
2776
  const Bs = /* @__PURE__ */ c("ZodCatch", (e, t) => {
2793
- Go.init(e, t), k.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2777
+ Go.init(e, t), Z.init(e, t), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2794
2778
  });
2795
2779
  function Ws(e, t) {
2796
2780
  return new Bs({
@@ -2800,7 +2784,7 @@ function Ws(e, t) {
2800
2784
  });
2801
2785
  }
2802
2786
  const Vs = /* @__PURE__ */ c("ZodPipe", (e, t) => {
2803
- Ko.init(e, t), k.init(e, t), e.in = t.in, e.out = t.out;
2787
+ Co.init(e, t), Z.init(e, t), e.in = t.in, e.out = t.out;
2804
2788
  });
2805
2789
  function Xe(e, t) {
2806
2790
  return new Vs({
@@ -2811,16 +2795,16 @@ function Xe(e, t) {
2811
2795
  });
2812
2796
  }
2813
2797
  const Gs = /* @__PURE__ */ c("ZodReadonly", (e, t) => {
2814
- Co.init(e, t), k.init(e, t);
2798
+ Ko.init(e, t), Z.init(e, t), e.unwrap = () => e._zod.def.innerType;
2815
2799
  });
2816
- function Ks(e) {
2800
+ function Cs(e) {
2817
2801
  return new Gs({
2818
2802
  type: "readonly",
2819
2803
  innerType: e
2820
2804
  });
2821
2805
  }
2822
- const Cs = /* @__PURE__ */ c("ZodCustom", (e, t) => {
2823
- Jo.init(e, t), k.init(e, t);
2806
+ const Ks = /* @__PURE__ */ c("ZodCustom", (e, t) => {
2807
+ Jo.init(e, t), Z.init(e, t);
2824
2808
  });
2825
2809
  function Js(e) {
2826
2810
  const t = new A({
@@ -2830,44 +2814,44 @@ function Js(e) {
2830
2814
  return t._zod.check = e, t;
2831
2815
  }
2832
2816
  function Ys(e, t = {}) {
2833
- return Bi(Cs, e, t);
2817
+ return Bi(Ks, e, t);
2834
2818
  }
2835
2819
  function qs(e) {
2836
2820
  const t = Js((n) => (n.addIssue = (r) => {
2837
2821
  if (typeof r == "string")
2838
- n.issues.push(q(r, n.value, t._zod.def));
2822
+ n.issues.push(Y(r, n.value, t._zod.def));
2839
2823
  else {
2840
2824
  const o = r;
2841
- o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(q(o));
2825
+ o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = n.value), o.inst ?? (o.inst = t), o.continue ?? (o.continue = !t._zod.def.abort), n.issues.push(Y(o));
2842
2826
  }
2843
2827
  }, e(n.value, n)));
2844
2828
  return t;
2845
2829
  }
2846
2830
  const He = {
2847
- "arrayEach:string": () => O(M({ error: "Each item must be a string" })),
2848
- "arrayEach:number": () => O(D({ error: "Each item must be a number" })),
2849
- "arrayEach:email": () => O(en({ error: "Each item must be a valid email" })),
2850
- "arrayEach:url": () => O(nn({ error: "Each item must be a valid URL" })),
2851
- "arrayEach:file": () => O(j({ error: "Each item must be a file" }))
2831
+ "arrayEach:string": () => x(M({ error: "Each item must be a string" })),
2832
+ "arrayEach:number": () => x(R({ error: "Each item must be a number" })),
2833
+ "arrayEach:email": () => x(tn({ error: "Each item must be a valid email" })),
2834
+ "arrayEach:url": () => x(rn({ error: "Each item must be a valid URL" })),
2835
+ "arrayEach:file": () => x(j({ error: "Each item must be a file" }))
2852
2836
  }, Qe = {
2853
2837
  nullable: () => M().nullable().optional(),
2854
- required: () => sn([
2838
+ required: () => cn([
2855
2839
  M().min(1, { error: "This field is required" }),
2856
2840
  j({ error: "This field is required" }),
2857
- O(R()).min(1, { error: "This field is required" })
2841
+ x(D()).min(1, { error: "This field is required" })
2858
2842
  ]),
2859
2843
  string: () => M({ error: "Must be a string" }),
2860
- email: () => en({ error: "Invalid email format" }),
2861
- url: () => nn({ error: "Invalid URL format" }),
2862
- number: () => D({ error: "Must be a number" }),
2863
- integer: () => D().int({ error: "Must be an integer" }),
2864
- positive: () => D().positive({ error: "Must be positive" }),
2865
- negative: () => D().negative({ error: "Must be negative" }),
2844
+ email: () => tn({ error: "Invalid email format" }),
2845
+ url: () => rn({ error: "Invalid URL format" }),
2846
+ number: () => R({ error: "Must be a number" }),
2847
+ integer: () => R().int({ error: "Must be an integer" }),
2848
+ positive: () => R().positive({ error: "Must be positive" }),
2849
+ negative: () => R().negative({ error: "Must be negative" }),
2866
2850
  ipv4: () => fs({ error: "Must be valid IPv4" }),
2867
2851
  boolean: () => ys({ error: "Must be a boolean" }),
2868
2852
  date: () => Is({ error: "Must be a valid date" }),
2869
- array: () => O(R(), { error: "Must be an array" }),
2870
- object: () => Os({}, { error: "Must be an object" }),
2853
+ array: () => x(D(), { error: "Must be an array" }),
2854
+ object: () => xs({}, { error: "Must be an object" }),
2871
2855
  file: () => j({ error: "Must be a file" })
2872
2856
  }, et = (e) => {
2873
2857
  const t = { B: 1, KB: 1024, MB: 1048576, GB: 1073741824, TB: 1099511627776 }, n = e.match(/^(\d+(?:\.\d+)?)\s*(B|KB|MB|GB|TB)$/i);
@@ -2893,30 +2877,30 @@ const He = {
2893
2877
  error: `Must be ${e} file`
2894
2878
  });
2895
2879
  }, Xs = (e) => {
2896
- const [t, n] = Wn(
2880
+ const [t, n] = Vn(
2897
2881
  e,
2898
2882
  (o) => typeof o == "function"
2899
2883
  );
2900
2884
  return [
2901
2885
  ...t.map((o) => {
2902
2886
  const i = o;
2903
- return R().refine(o, {
2887
+ return D().refine(o, {
2904
2888
  message: i.message || "Validation failed"
2905
2889
  });
2906
2890
  }),
2907
2891
  ...n.map((o) => {
2908
- if (!Gn(o)) return R();
2892
+ if (!Cn(o)) return D();
2909
2893
  if (o in Qe)
2910
2894
  return Qe[o]();
2911
2895
  if (o in He)
2912
2896
  return He[o]();
2913
2897
  if (o.startsWith("min:")) {
2914
2898
  const i = parseInt(o.split(":")[1]);
2915
- return D().min(i, { error: `Must be at least ${i}` });
2899
+ return R().min(i, { error: `Must be at least ${i}` });
2916
2900
  }
2917
2901
  if (o.startsWith("max:")) {
2918
2902
  const i = parseInt(o.split(":")[1]);
2919
- return D().max(i, { error: `Must be at most ${i}` });
2903
+ return R().max(i, { error: `Must be at most ${i}` });
2920
2904
  }
2921
2905
  if (o.startsWith("minLength:")) {
2922
2906
  const i = parseInt(o.split(":")[1]);
@@ -2928,11 +2912,11 @@ const He = {
2928
2912
  }
2929
2913
  if (o.startsWith("arrayMinLength:")) {
2930
2914
  const i = parseInt(o.split(":")[1]);
2931
- return O(R()).min(i, { error: `Must have at least ${i} items` });
2915
+ return x(D()).min(i, { error: `Must have at least ${i} items` });
2932
2916
  }
2933
2917
  if (o.startsWith("arrayMaxLength:")) {
2934
2918
  const i = parseInt(o.split(":")[1]);
2935
- return O(R()).max(i, { error: `Must have at most ${i} items` });
2919
+ return x(D()).max(i, { error: `Must have at most ${i} items` });
2936
2920
  }
2937
2921
  if (o.startsWith("pattern:")) {
2938
2922
  const i = o.split(":")[1];
@@ -2944,7 +2928,7 @@ const He = {
2944
2928
  }
2945
2929
  if (o.startsWith("arrayEach:fileSize:")) {
2946
2930
  const i = o.split(":")[2], s = et(i);
2947
- return O(j().max(s, { error: `Each file must be smaller than ${i}` }));
2931
+ return x(j().max(s, { error: `Each file must be smaller than ${i}` }));
2948
2932
  }
2949
2933
  if (o.startsWith("fileType:")) {
2950
2934
  const i = o.split(":")[1];
@@ -2952,134 +2936,134 @@ const He = {
2952
2936
  }
2953
2937
  if (o.startsWith("arrayEach:fileType:")) {
2954
2938
  const i = o.split(":")[2], s = tt(i);
2955
- return O(s);
2939
+ return x(s);
2956
2940
  }
2957
- return R();
2941
+ return D();
2958
2942
  })
2959
2943
  ].reduce((o, i) => un(o, i));
2960
2944
  }, Hs = ({
2961
2945
  initialData: e,
2962
2946
  validationRules: t
2963
2947
  }) => {
2964
- const [n, r] = Ee(e), [o, i] = Ee({}), s = Ae(() => !Ot(o), [o]), u = Ae(() => !Mn(n, e), [n, e]), a = P(
2965
- (p, E) => {
2966
- if (typeof p == "string") {
2967
- if (!Q(e, p))
2968
- throw new Error(`Invalid path: '${p}'`);
2969
- r((z) => Nn(In(z), p, E));
2948
+ const [n, r] = Ee(e), [o, i] = Ee({}), s = Ae(() => !xt(o), [o]), u = Ae(() => !Un(n, e), [n, e]), f = S(
2949
+ (d, E) => {
2950
+ if (typeof d == "string") {
2951
+ if (!Q(e, d))
2952
+ throw new Error(`Invalid path: '${d}'`);
2953
+ r((v) => Dn(En(v), d, E));
2970
2954
  } else
2971
- r((z) => ({ ...z, ...p }));
2955
+ r((v) => ({ ...v, ...d }));
2972
2956
  },
2973
2957
  [e]
2974
- ), f = P(
2975
- (p, E) => {
2976
- if (!Q(e, p))
2977
- throw new Error(`Invalid path: '${p}'`);
2978
- i((z) => ({
2979
- ...z,
2980
- [p]: E
2958
+ ), a = S(
2959
+ (d, E) => {
2960
+ if (!Q(e, d))
2961
+ throw new Error(`Invalid path: '${d}'`);
2962
+ i((v) => ({
2963
+ ...v,
2964
+ [d]: E
2981
2965
  }));
2982
2966
  },
2983
2967
  [e]
2984
- ), g = P(
2985
- (p) => {
2986
- if (!Q(e, p))
2987
- throw new Error(`Invalid path: '${p}'`);
2988
- return !!o[p];
2968
+ ), g = S(
2969
+ (d) => {
2970
+ if (!Q(e, d))
2971
+ throw new Error(`Invalid path: '${d}'`);
2972
+ return !!o[d];
2989
2973
  },
2990
2974
  [o, e]
2991
- ), d = P(
2992
- (p) => {
2993
- if (!Q(e, p))
2994
- throw new Error(`Invalid path: '${p}'`);
2995
- i((E) => Vn(E, [p]));
2975
+ ), p = S(
2976
+ (d) => {
2977
+ if (!Q(e, d))
2978
+ throw new Error(`Invalid path: '${d}'`);
2979
+ i((E) => Gn(E, [d]));
2996
2980
  },
2997
2981
  [e]
2998
- ), h = P(
2982
+ ), m = S(
2999
2983
  () => {
3000
2984
  i({});
3001
2985
  },
3002
2986
  []
3003
- ), m = P(
2987
+ ), h = S(
3004
2988
  () => {
3005
2989
  r(e), i({});
3006
2990
  },
3007
2991
  [e]
3008
- ), b = P(() => {
3009
- let p = !0;
3010
- return t && Tn(t, (E, z) => {
3011
- const _ = ot(n, z), y = Xs(E).safeParse(_);
3012
- if (y.success)
3013
- d(z);
2992
+ ), I = S(() => {
2993
+ let d = !0;
2994
+ return t && Ln(t, (E, v) => {
2995
+ const _ = ot(n, v), $ = Xs(E).safeParse(_);
2996
+ if ($.success)
2997
+ p(v);
3014
2998
  else {
3015
- const S = y.error.issues.map((x) => x.message);
3016
- f(z, S), p = y.success;
2999
+ const P = $.error.issues.map((O) => O.message);
3000
+ a(v, P), d = $.success;
3017
3001
  }
3018
- }), p;
3019
- }, [n, t, d, f]);
3002
+ }), d;
3003
+ }, [n, t, p, a]);
3020
3004
  return {
3021
3005
  data: n,
3022
- setData: a,
3006
+ setData: f,
3023
3007
  errors: o,
3024
3008
  hasErrors: s,
3025
- clearErrors: h,
3026
- clearError: d,
3027
- setError: f,
3009
+ clearErrors: m,
3010
+ clearError: p,
3011
+ setError: a,
3028
3012
  hasError: g,
3029
- reset: m,
3013
+ reset: h,
3030
3014
  isDirty: u,
3031
- validate: b
3015
+ validate: I
3032
3016
  };
3033
- }, nu = ({
3017
+ }, nc = ({
3034
3018
  headers: e = {},
3035
3019
  initialData: t,
3036
3020
  operation: n,
3037
3021
  options: r = {},
3038
3022
  validationRules: o
3039
3023
  }) => {
3040
- const i = Hs({ initialData: t, validationRules: o }), s = fn(null), [u, { loading: a }] = Bn(n, { errorPolicy: "all", ...r }), f = P(
3041
- (d = {}) => {
3024
+ const i = Hs({ initialData: t, validationRules: o }), s = ln(null), [u, { loading: f }] = Wn(n, { errorPolicy: "all", ...r }), a = S(
3025
+ (p = {}) => {
3042
3026
  const {
3043
- onBefore: h = () => {
3027
+ onBefore: m = () => {
3044
3028
  },
3045
- onError: m = () => {
3029
+ onError: h = () => {
3046
3030
  },
3047
- onFinish: b = () => {
3031
+ onFinish: I = () => {
3048
3032
  },
3049
- onSuccess: p = () => {
3033
+ onSuccess: d = () => {
3050
3034
  },
3051
3035
  skipValidation: E = !1
3052
- } = d;
3036
+ } = p;
3053
3037
  if (!E && !i.validate())
3054
3038
  return;
3055
- const z = s.current ? s.current(i.data) : i.data;
3056
- h == null || h(), u({
3057
- variables: { input: z },
3058
- ...!Ot(e) && { context: { headers: e } }
3039
+ const v = s.current ? s.current(i.data) : i.data;
3040
+ m?.(), u({
3041
+ variables: { input: v },
3042
+ ...!xt(e) && { context: { headers: e } }
3059
3043
  }).then((_) => {
3060
- p == null || p(_);
3044
+ _.errors && _.errors.length > 0 ? h?.(_.errors) : d?.(_);
3061
3045
  }).catch((_) => {
3062
- m == null || m(_);
3046
+ h?.(_);
3063
3047
  }).finally(() => {
3064
- b == null || b();
3048
+ I?.();
3065
3049
  });
3066
3050
  },
3067
3051
  [i, u, e]
3068
- ), g = P(
3069
- (d) => (s.current = d, { ...i, isLoading: a, submit: f }),
3070
- [a, i, f]
3052
+ ), g = S(
3053
+ (p) => (s.current = p, { ...i, isLoading: f, submit: a }),
3054
+ [f, i, a]
3071
3055
  );
3072
3056
  return {
3073
3057
  ...i,
3074
- isLoading: a,
3075
- submit: f,
3058
+ isLoading: f,
3059
+ submit: a,
3076
3060
  transform: g
3077
3061
  };
3078
3062
  };
3079
3063
  export {
3080
- Ln as a,
3064
+ Bn as a,
3081
3065
  Hs as b,
3082
3066
  Xs as h,
3083
- Ot as i,
3084
- nu as u
3067
+ xt as i,
3068
+ nc as u
3085
3069
  };