@opencloud-eu/web-client 7.3.0 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/{axios-DvF8YTlk.js → axios-ULsDSF3p.js} +842 -626
  2. package/dist/dist-WdVfmT0d.js +4 -0
  3. package/dist/{generated-FCm3SbzB.js → generated-CkfYRFme.js} +395 -239
  4. package/dist/{graph-CppzmKYd.js → graph-D3q1149Y.js} +101 -97
  5. package/dist/{helpers-MRfkPTnV.js → helpers-C_9em2wB.js} +236 -224
  6. package/dist/{ocs-gQyxMolJ.js → ocs-CGD-4vGl.js} +1454 -563
  7. package/dist/ox-D1FgExd1.js +3849 -0
  8. package/dist/src/graph/generated/api.d.ts +461 -122
  9. package/dist/src/graph/users/types.d.ts +2 -1
  10. package/dist/src/helpers/resource/types.d.ts +2 -1
  11. package/dist/src/helpers/space/types.d.ts +6 -0
  12. package/dist/src/sse/index.d.ts +2 -0
  13. package/dist/src/webdav/client/builders.d.ts +3 -2
  14. package/dist/src/webdav/client/dav.d.ts +8 -2
  15. package/dist/src/webdav/constants/dav.d.ts +17 -1
  16. package/dist/src/webdav/listFiles.d.ts +10 -1
  17. package/dist/src/webdav/restoreFileVersion.d.ts +2 -1
  18. package/dist/src/webdav/setProperties.d.ts +19 -0
  19. package/dist/src/webdav/types.d.ts +2 -0
  20. package/dist/{toString-B4UEwRgf.js → toString-DfgrQ1mh.js} +2 -2
  21. package/dist/web-client/graph/generated.js +2 -2
  22. package/dist/web-client/graph.js +1 -1
  23. package/dist/web-client/ocs.js +1 -1
  24. package/dist/web-client/ox.js +1 -1
  25. package/dist/web-client/sse.js +1 -1
  26. package/dist/web-client/webdav.js +3 -3
  27. package/dist/web-client.js +6 -6
  28. package/dist/{webdav-BMoGCm4T.js → webdav-BxsiETq0.js} +997 -963
  29. package/package.json +4 -4
  30. package/dist/dist-CeGfU4rJ.js +0 -810
  31. package/dist/ox-DIaYdpxw.js +0 -3045
@@ -0,0 +1,3849 @@
1
+ import { t as e } from "./urlJoin-_pUL1TUx.js";
2
+ //#region ../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/util.js
3
+ function t(e) {
4
+ let t = Object.values(e).filter((e) => typeof e == "number");
5
+ return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
6
+ }
7
+ function n(e, t = "|") {
8
+ return e.map((e) => ne(e)).join(t);
9
+ }
10
+ function r(e, t) {
11
+ return typeof t == "bigint" ? t.toString() : t;
12
+ }
13
+ function i(e) {
14
+ return { get value() {
15
+ {
16
+ let t = e();
17
+ return Object.defineProperty(this, "value", { value: t }), t;
18
+ }
19
+ } };
20
+ }
21
+ function a(e) {
22
+ return e == null;
23
+ }
24
+ function o(e) {
25
+ let t = +!!e.startsWith("^"), n = e.endsWith("$") ? e.length - 1 : e.length;
26
+ return e.slice(t, n);
27
+ }
28
+ function s(e, t) {
29
+ let n = e / t, r = Math.round(n), i = 4 * 2 ** -52 * Math.max(Math.abs(n), 1);
30
+ return Math.abs(n - r) < i ? 0 : n - r;
31
+ }
32
+ function c(e, t, n) {
33
+ Object.defineProperty(e, t, {
34
+ value: n,
35
+ writable: !0,
36
+ enumerable: !0,
37
+ configurable: !0
38
+ });
39
+ }
40
+ function l(...e) {
41
+ let t = {};
42
+ for (let n of e) {
43
+ let e = Object.getOwnPropertyDescriptors(n);
44
+ Object.assign(t, e);
45
+ }
46
+ return Object.defineProperties({}, t);
47
+ }
48
+ function u(e) {
49
+ return JSON.stringify(e);
50
+ }
51
+ function d(e) {
52
+ return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
53
+ }
54
+ var f = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
55
+ function p(e) {
56
+ return typeof e == "object" && !!e && !Array.isArray(e);
57
+ }
58
+ var m = /* @__PURE__*/ i(() => {
59
+ if (O.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
60
+ try {
61
+ return Function(""), !0;
62
+ } catch {
63
+ return !1;
64
+ }
65
+ });
66
+ function h(e) {
67
+ if (p(e) === !1) return !1;
68
+ let t = e.constructor;
69
+ if (t === void 0 || typeof t != "function") return !0;
70
+ let n = t.prototype;
71
+ return p(n) !== !1 && Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") !== !1;
72
+ }
73
+ function ee(e) {
74
+ return h(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
75
+ }
76
+ var te = /* @__PURE__*/ new Set([
77
+ "string",
78
+ "number",
79
+ "symbol"
80
+ ]);
81
+ function g(e) {
82
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
83
+ }
84
+ function _(e, t, n) {
85
+ let r = new e._zod.constr(t ?? e._zod.def);
86
+ return (!t || n?.parent) && (r._zod.parent = e), r;
87
+ }
88
+ function v(e) {
89
+ let t = e;
90
+ if (!t) return {};
91
+ if (typeof t == "string") return { error: () => t };
92
+ if (t?.message !== void 0) {
93
+ if (t?.error !== void 0) throw Error("Cannot specify both `message` and `error` params");
94
+ t.error = t.message;
95
+ }
96
+ return delete t.message, typeof t.error == "string" ? {
97
+ ...t,
98
+ error: () => t.error
99
+ } : t;
100
+ }
101
+ function ne(e) {
102
+ return typeof e == "bigint" ? e.toString() + "n" : typeof e == "string" ? `"${e}"` : `${e}`;
103
+ }
104
+ function re(e) {
105
+ return Object.keys(e).filter((t) => e[t]._zod.optin !== void 0 && e[t]._zod.optout === "optional");
106
+ }
107
+ var ie = {
108
+ safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
109
+ int32: [-2147483648, 2147483647],
110
+ uint32: [0, 4294967295],
111
+ float32: [-34028234663852886e22, 34028234663852886e22],
112
+ float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
113
+ };
114
+ function ae(e, t) {
115
+ let n = e._zod.def, r = n.checks;
116
+ if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
117
+ return _(e, l(e._zod.def, {
118
+ get shape() {
119
+ let e = {};
120
+ for (let r of Reflect.ownKeys(t)) {
121
+ if (!Object.prototype.hasOwnProperty.call(n.shape, r)) throw Error(`Unrecognized key: "${String(r)}"`);
122
+ t[r] && c(e, r, n.shape[r]);
123
+ }
124
+ return c(this, "shape", e), e;
125
+ },
126
+ checks: []
127
+ }));
128
+ }
129
+ function oe(e, t) {
130
+ let n = e._zod.def, r = n.checks;
131
+ if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
132
+ return _(e, l(e._zod.def, {
133
+ get shape() {
134
+ let r = { ...e._zod.def.shape };
135
+ for (let e of Reflect.ownKeys(t)) {
136
+ if (!Object.prototype.hasOwnProperty.call(n.shape, e)) throw Error(`Unrecognized key: "${String(e)}"`);
137
+ t[e] && delete r[e];
138
+ }
139
+ return c(this, "shape", r), r;
140
+ },
141
+ checks: []
142
+ }));
143
+ }
144
+ function se(e, t) {
145
+ if (!h(t)) throw Error("Invalid input to extend: expected a plain object");
146
+ let n = e._zod.def.checks;
147
+ if (n && n.length > 0) {
148
+ let n = e._zod.def.shape;
149
+ for (let e of Reflect.ownKeys(t)) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
150
+ }
151
+ return _(e, l(e._zod.def, { get shape() {
152
+ let n = {
153
+ ...e._zod.def.shape,
154
+ ...t
155
+ };
156
+ return c(this, "shape", n), n;
157
+ } }));
158
+ }
159
+ function ce(e, t) {
160
+ if (!h(t)) throw Error("Invalid input to safeExtend: expected a plain object");
161
+ return _(e, l(e._zod.def, { get shape() {
162
+ let n = {
163
+ ...e._zod.def.shape,
164
+ ...t
165
+ };
166
+ return c(this, "shape", n), n;
167
+ } }));
168
+ }
169
+ function le(e, t) {
170
+ if (!t?._zod?.def) throw Error("Invalid input to merge: expected an object schema. To merge a plain shape, use `.extend()`.");
171
+ if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
172
+ return _(e, l(e._zod.def, {
173
+ get shape() {
174
+ let n = {
175
+ ...e._zod.def.shape,
176
+ ...t._zod.def.shape
177
+ };
178
+ return c(this, "shape", n), n;
179
+ },
180
+ get catchall() {
181
+ return t._zod.def.catchall;
182
+ },
183
+ checks: t._zod.def.checks ?? []
184
+ }));
185
+ }
186
+ function ue(e, t, n, r = "partial") {
187
+ let i = t._zod.def.checks;
188
+ if (i && i.length > 0) throw Error(`.${r}() cannot be used on object schemas containing refinements`);
189
+ return _(t, l(t._zod.def, {
190
+ get shape() {
191
+ let r = t._zod.def.shape, i = { ...r };
192
+ if (n) for (let t of Reflect.ownKeys(n)) {
193
+ if (!Object.prototype.hasOwnProperty.call(r, t)) throw Error(`Unrecognized key: "${String(t)}"`);
194
+ n[t] && (i[t] = e ? new e({
195
+ type: "optional",
196
+ innerType: r[t]
197
+ }) : r[t]);
198
+ }
199
+ else for (let t of Reflect.ownKeys(r)) i[t] = e ? new e({
200
+ type: "optional",
201
+ innerType: r[t]
202
+ }) : r[t];
203
+ return c(this, "shape", i), i;
204
+ },
205
+ checks: []
206
+ }));
207
+ }
208
+ function de(e, t, n) {
209
+ return _(t, l(t._zod.def, { get shape() {
210
+ let r = t._zod.def.shape, i = { ...r };
211
+ if (n) for (let t of Reflect.ownKeys(n)) {
212
+ if (!Object.prototype.hasOwnProperty.call(i, t)) throw Error(`Unrecognized key: "${String(t)}"`);
213
+ n[t] && (i[t] = new e({
214
+ type: "nonoptional",
215
+ innerType: r[t]
216
+ }));
217
+ }
218
+ else for (let t of Reflect.ownKeys(r)) i[t] = new e({
219
+ type: "nonoptional",
220
+ innerType: r[t]
221
+ });
222
+ return c(this, "shape", i), i;
223
+ } }));
224
+ }
225
+ function y(e, t = 0) {
226
+ if (e.aborted === !0) return !0;
227
+ for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
228
+ return !1;
229
+ }
230
+ function fe(e, t = 0) {
231
+ if (e.aborted === !0) return !0;
232
+ for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
233
+ return !1;
234
+ }
235
+ function pe(e, t) {
236
+ return t.map((t) => {
237
+ var n;
238
+ return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
239
+ });
240
+ }
241
+ function b(e) {
242
+ return typeof e == "string" ? e : e?.message;
243
+ }
244
+ function me(e, t, n) {
245
+ var r;
246
+ for (let i = t; i < e.length; i++) (r = e[i]).schema ?? (r.schema = n);
247
+ }
248
+ function x(e, t, n) {
249
+ var r;
250
+ let i = e.inst?._zod?.traits;
251
+ i?.has("$ZodType") && (i.has("$ZodCheck") ? (r = e).schema ?? (r.schema = e.inst) : e.schema = e.inst);
252
+ let a = e.schema === e.inst ? void 0 : e.schema?._zod.def?.error, o = e.message ? e.message : b(e.inst?._zod.def?.error?.(e)) ?? b(a?.(e)) ?? b(t?.error?.(e)) ?? b(n.customError?.(e)) ?? b(n.localeError?.(e)) ?? "Invalid input", { inst: s, schema: c, continue: l, input: u, ...d } = e;
253
+ return d.path ??= [], d.message = o, t?.reportInput && (d.input = u), d;
254
+ }
255
+ var he = /[\uD800-\uDBFF]/;
256
+ function ge(e) {
257
+ let t = e.length;
258
+ if (!he.test(e)) return t;
259
+ let n = t;
260
+ for (let r = 0; r < t - 1; r++) (e.charCodeAt(r) & 64512) == 55296 && (e.charCodeAt(r + 1) & 64512) == 56320 && (n--, r++);
261
+ return n;
262
+ }
263
+ function _e(e) {
264
+ return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
265
+ }
266
+ function ve(e) {
267
+ let t = typeof e;
268
+ switch (t) {
269
+ case "number": return Number.isNaN(e) ? "nan" : "number";
270
+ case "object": {
271
+ if (e === null) return "null";
272
+ if (Array.isArray(e)) return "array";
273
+ let t = e;
274
+ if (t && Object.getPrototypeOf(t) !== Object.prototype && "constructor" in t && t.constructor) return t.constructor.name;
275
+ }
276
+ }
277
+ return t;
278
+ }
279
+ function S(...e) {
280
+ let [t, n, r] = e;
281
+ return typeof t == "string" ? {
282
+ message: t,
283
+ code: "custom",
284
+ input: n,
285
+ inst: r
286
+ } : { ...t };
287
+ }
288
+ function ye(e, t) {
289
+ for (let n in t) {
290
+ let r = Object.getOwnPropertyDescriptor(t, n);
291
+ r.get ? Object.defineProperty(e, n, {
292
+ ...r,
293
+ enumerable: !1
294
+ }) : xe(e, n, r.value);
295
+ }
296
+ }
297
+ function C(e, t, n, r = !0) {
298
+ return Object.defineProperty(e, t, {
299
+ configurable: !0,
300
+ writable: !0,
301
+ enumerable: r,
302
+ value: n
303
+ }), n;
304
+ }
305
+ function be(e, t, n) {
306
+ return C(e, t, n, !1);
307
+ }
308
+ function xe(e, t, n) {
309
+ Object.defineProperty(e, t, {
310
+ configurable: !0,
311
+ get() {
312
+ return this == null ? n : C(this, t, n.bind(this));
313
+ },
314
+ set(e) {
315
+ C(this, t, e);
316
+ }
317
+ });
318
+ }
319
+ function Se(e, t) {
320
+ let n = Object.getPrototypeOf(e);
321
+ return t in n ? void 0 : n;
322
+ }
323
+ var Ce, w = !1, we = {
324
+ configurable: !0,
325
+ get() {
326
+ w = !0;
327
+ }
328
+ };
329
+ function T(e, t, n) {
330
+ let r = Object.getPrototypeOf(e._zod);
331
+ if (t in r && Ce !== e._zod) {
332
+ Ce = void 0;
333
+ return;
334
+ }
335
+ Ce = e._zod, Object.defineProperty(r, t, {
336
+ configurable: !0,
337
+ get() {
338
+ Object.defineProperty(this, t, we);
339
+ let e = w;
340
+ w = !1;
341
+ try {
342
+ let r = n(this);
343
+ return w ? delete this[t] : Object.defineProperty(this, t, {
344
+ configurable: !0,
345
+ writable: !0,
346
+ value: r
347
+ }), w ||= e, r;
348
+ } catch (n) {
349
+ throw delete this[t], w ||= e, n;
350
+ }
351
+ },
352
+ set(e) {
353
+ Object.defineProperty(this, t, {
354
+ configurable: !0,
355
+ writable: !0,
356
+ value: e
357
+ });
358
+ }
359
+ });
360
+ }
361
+ function Te(e, t, n, r) {
362
+ let i = Se(e, t);
363
+ i && Object.defineProperty(i, t, {
364
+ configurable: !0,
365
+ get() {
366
+ let e = {
367
+ configurable: !0,
368
+ writable: !0,
369
+ enumerable: r,
370
+ value: void 0
371
+ };
372
+ return Object.defineProperty(this, t, e), e.value = n(this), Object.defineProperty(this, t, e), e.value;
373
+ },
374
+ set(e) {
375
+ Object.defineProperty(this, t, {
376
+ configurable: !0,
377
+ writable: !0,
378
+ enumerable: r,
379
+ value: e
380
+ });
381
+ }
382
+ });
383
+ }
384
+ var Ee = "~constantCatch";
385
+ function De(e) {
386
+ let t = () => e;
387
+ return t[Ee] = !0, t;
388
+ }
389
+ //#endregion
390
+ //#region ../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/core.js
391
+ var Oe, ke = {
392
+ value: void 0,
393
+ enumerable: !1
394
+ }, Ae = "captureStackTrace" in Error ? Error : null;
395
+ function je(e) {
396
+ let t = Ae;
397
+ if (t) {
398
+ let n = t.stackTraceLimit;
399
+ if (typeof n == "number") {
400
+ try {
401
+ t.stackTraceLimit = 0;
402
+ } catch {
403
+ return Ae = null, new e();
404
+ }
405
+ try {
406
+ return new e();
407
+ } finally {
408
+ t.stackTraceLimit = n;
409
+ }
410
+ }
411
+ }
412
+ return new e();
413
+ }
414
+ function E(e, t, n, r) {
415
+ let i = {};
416
+ function a(e) {
417
+ this.def = e, this.constr = d, this.traits = /* @__PURE__ */ new Set();
418
+ }
419
+ a.prototype = i;
420
+ let o = n, s = o && /* @__PURE__ */ new WeakSet();
421
+ function c(n, r) {
422
+ if (!n._zod) {
423
+ ke.value = new a(r);
424
+ try {
425
+ Object.defineProperty(n, "_zod", ke);
426
+ } finally {
427
+ ke.value = void 0;
428
+ }
429
+ }
430
+ if (n._zod.traits.has(e)) return;
431
+ if (n._zod.traits.add(e), t(n, r), s) {
432
+ let e = Object.getPrototypeOf(n), t = n._zod.constr.prototype, r = e;
433
+ for (; r && r !== t;) r = Object.getPrototypeOf(r);
434
+ let i = r ?? e;
435
+ s.has(i) || (s.add(i), ye(i, o));
436
+ }
437
+ let i = d.prototype;
438
+ for (let e in i) Object.prototype.hasOwnProperty.call(i, e) && (e in n || (n[e] = i[e].bind(n)));
439
+ }
440
+ let l = r?.Parent ?? Object;
441
+ class u extends l {}
442
+ Object.defineProperty(u, "name", { value: e });
443
+ function d(e) {
444
+ let t = r?.Parent ? je(u) : this;
445
+ c(t, e);
446
+ let n = t._zod.deferred;
447
+ if (n) {
448
+ for (let e of n) e();
449
+ t._zod.deferred = void 0;
450
+ }
451
+ let i = globalThis.__zod_globalConfig?.postProcessor;
452
+ return i && i(t), t;
453
+ }
454
+ return Object.defineProperty(d, "init", { value: c }), Object.defineProperty(d, Symbol.hasInstance, { value: (t) => r?.Parent && t instanceof r.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(d, "name", { value: e }), d;
455
+ }
456
+ var D = class extends Error {
457
+ constructor() {
458
+ super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
459
+ }
460
+ }, Me = class extends Error {
461
+ constructor(e) {
462
+ super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
463
+ }
464
+ };
465
+ (Oe = globalThis).__zod_globalConfig ?? (Oe.__zod_globalConfig = {});
466
+ var O = globalThis.__zod_globalConfig;
467
+ function k(e) {
468
+ return e && Object.assign(O, e), O;
469
+ }
470
+ //#endregion
471
+ //#region ../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/errors.js
472
+ function Ne() {
473
+ let e = this._zod;
474
+ return e.message ??= JSON.stringify(e.def, r, 2), e.message;
475
+ }
476
+ function Pe(e) {
477
+ this._zod.message = e;
478
+ }
479
+ var Fe = {
480
+ get: Ne,
481
+ set: Pe,
482
+ enumerable: !0,
483
+ configurable: !0
484
+ }, Ie = {
485
+ value: void 0,
486
+ enumerable: !1
487
+ }, Le = {
488
+ value: void 0,
489
+ enumerable: !1
490
+ }, Re = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]), ze = (e, t) => {
491
+ e.name = "$ZodError", Ie.value = e._zod, Object.defineProperty(e, "_zod", Ie), Le.value = t, Object.defineProperty(e, "issues", Le), Ie.value = void 0, Le.value = void 0, Object.defineProperty(e, "message", Fe);
492
+ let n = Object.getPrototypeOf(e);
493
+ Re.has(n) || (Re.add(n), Object.defineProperty(n, "toString", {
494
+ configurable: !0,
495
+ enumerable: !1,
496
+ get() {
497
+ let e = () => this.message;
498
+ return Object.defineProperty(this, "toString", {
499
+ value: e,
500
+ configurable: !0,
501
+ writable: !0
502
+ }), e;
503
+ },
504
+ set(e) {
505
+ Object.defineProperty(this, "toString", {
506
+ value: e,
507
+ configurable: !0,
508
+ writable: !0
509
+ });
510
+ }
511
+ }));
512
+ }, Be = E("$ZodError", ze), Ve = E("$ZodError", ze, void 0, { Parent: Error });
513
+ function He(e, t, n) {
514
+ return Object.prototype.hasOwnProperty.call(e, t) || (t === "__proto__" ? Object.defineProperty(e, t, {
515
+ value: n(),
516
+ writable: !0,
517
+ enumerable: !0,
518
+ configurable: !0
519
+ }) : e[t] = n()), e[t];
520
+ }
521
+ function Ue(e, t = (e) => e.message) {
522
+ let n = {}, r = [];
523
+ for (let i of e.issues) i.path.length > 0 ? He(n, i.path[0], () => []).push(t(i)) : r.push(t(i));
524
+ return {
525
+ formErrors: r,
526
+ fieldErrors: n
527
+ };
528
+ }
529
+ function We(e, t = (e) => e.message) {
530
+ let n = { _errors: [] }, r = (e, i = []) => {
531
+ for (let a of e.issues) if (a.code === "invalid_union" && a.errors.length) a.errors.map((e) => r({ issues: e }, [...i, ...a.path]));
532
+ else if (a.code === "invalid_key") r({ issues: a.issues }, [...i, ...a.path]);
533
+ else if (a.code === "invalid_element") r({ issues: a.issues }, [...i, ...a.path]);
534
+ else {
535
+ let e = [...i, ...a.path];
536
+ if (e.length === 0) n._errors.push(t(a));
537
+ else {
538
+ let r = n, i = 0;
539
+ for (; i < e.length;) {
540
+ let n = e[i], o = i === e.length - 1;
541
+ if (n === "_errors") {
542
+ o && r._errors.push(t(a)), i++;
543
+ continue;
544
+ }
545
+ Object.prototype.hasOwnProperty.call(r, n) || Object.defineProperty(r, n, {
546
+ value: { _errors: [] },
547
+ enumerable: !0,
548
+ writable: !0,
549
+ configurable: !0
550
+ });
551
+ let s = r[n];
552
+ o && s._errors.push(t(a)), r = s, i++;
553
+ }
554
+ }
555
+ }
556
+ };
557
+ return r(e), n;
558
+ }
559
+ //#endregion
560
+ //#region ../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/parse.js
561
+ function A(e, t) {
562
+ return {
563
+ callee: t?.callee ?? e,
564
+ Err: t?.Err
565
+ };
566
+ }
567
+ var Ge = (e) => {
568
+ let t = (n, r, i, a) => {
569
+ let o = i ? {
570
+ ...i,
571
+ async: !1
572
+ } : { async: !1 }, s = n._zod.run({
573
+ value: r,
574
+ issues: []
575
+ }, o);
576
+ if (s instanceof Promise) throw new D();
577
+ if (s.issues.length) {
578
+ let n = new ((a?.Err) ?? e)(s.issues.map((e) => x(e, o, k())));
579
+ throw f(n, a?.callee ?? t), n;
580
+ }
581
+ return s.value;
582
+ };
583
+ return t;
584
+ }, Ke = (e) => {
585
+ let t = async (n, r, i, a) => {
586
+ let o = i ? {
587
+ ...i,
588
+ async: !0
589
+ } : { async: !0 }, s = n._zod.run({
590
+ value: r,
591
+ issues: []
592
+ }, o);
593
+ if (s instanceof Promise && (s = await s), s.issues.length) {
594
+ let n = new ((a?.Err) ?? e)(s.issues.map((e) => x(e, o, k())));
595
+ throw f(n, a?.callee ?? t), n;
596
+ }
597
+ return s.value;
598
+ };
599
+ return t;
600
+ }, j = (e) => (t, n, r) => {
601
+ let i = r ? {
602
+ ...r,
603
+ async: !1
604
+ } : { async: !1 }, a = t._zod.run({
605
+ value: n,
606
+ issues: []
607
+ }, i);
608
+ if (a instanceof Promise) throw new D();
609
+ return a.issues.length ? {
610
+ success: !1,
611
+ error: new (e ?? Be)(a.issues.map((e) => x(e, i, k())))
612
+ } : {
613
+ success: !0,
614
+ data: a.value
615
+ };
616
+ }, qe = /* @__PURE__*/ j(Ve), Je = (e) => async (t, n, r) => {
617
+ let i = r ? {
618
+ ...r,
619
+ async: !0
620
+ } : { async: !0 }, a = t._zod.run({
621
+ value: n,
622
+ issues: []
623
+ }, i);
624
+ return a instanceof Promise && (a = await a), a.issues.length ? {
625
+ success: !1,
626
+ error: new e(a.issues.map((e) => x(e, i, k())))
627
+ } : {
628
+ success: !0,
629
+ data: a.value
630
+ };
631
+ }, Ye = /* @__PURE__*/ Je(Ve), Xe = (e) => {
632
+ let t = Ge(e), n = (e, r, i, a) => {
633
+ let o = i ? {
634
+ ...i,
635
+ direction: "backward"
636
+ } : { direction: "backward" };
637
+ return t(e, r, o, A(n, a));
638
+ };
639
+ return n;
640
+ }, Ze = (e) => {
641
+ let t = Ge(e), n = (e, r, i, a) => t(e, r, i, A(n, a));
642
+ return n;
643
+ }, Qe = (e) => {
644
+ let t = Ke(e), n = async (e, r, i, a) => {
645
+ let o = i ? {
646
+ ...i,
647
+ direction: "backward"
648
+ } : { direction: "backward" };
649
+ return await t(e, r, o, A(n, a));
650
+ };
651
+ return n;
652
+ }, $e = (e) => {
653
+ let t = Ke(e), n = async (e, r, i, a) => await t(e, r, i, A(n, a));
654
+ return n;
655
+ }, et = (e) => (t, n, r) => {
656
+ let i = r ? {
657
+ ...r,
658
+ direction: "backward"
659
+ } : { direction: "backward" };
660
+ return j(e)(t, n, i);
661
+ }, tt = (e) => (t, n, r) => j(e)(t, n, r), nt = (e) => async (t, n, r) => {
662
+ let i = r ? {
663
+ ...r,
664
+ direction: "backward"
665
+ } : { direction: "backward" };
666
+ return Je(e)(t, n, i);
667
+ }, rt = (e) => async (t, n, r) => Je(e)(t, n, r), it = /^[cC][0-9a-z]{6,}$/, at = /^[0-9a-z]+$/, ot = /^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$/, st = /^[0-9a-vA-V]{20}$/, ct = /^[A-Za-z0-9]{27}$/, lt = /^[a-zA-Z0-9_-]{21}$/;
668
+ function ut(e) {
669
+ return RegExp(`^[a-zA-Z0-9_-]{${e}}$`);
670
+ }
671
+ var dt = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, ft = /^([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})$/, pt = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, mt = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, ht = "^[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$";
672
+ function gt() {
673
+ return new RegExp(ht, "u");
674
+ }
675
+ var _t = /^(?:(?: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])$/, vt = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, yt = /^((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])$/, bt = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, xt = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, St = /^[A-Za-z0-9_-]*$/, Ct = /^https?$/, wt = /^\+[1-9]\d{6,14}$/, 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])))";
676
+ function Et(e) {
677
+ return RegExp(`^${e}$`);
678
+ }
679
+ var Dt = /*@__PURE__*/ Et(Tt);
680
+ function Ot(e) {
681
+ let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
682
+ return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : e.seconds ? `${t}:[0-5]\\d(?:\\.\\d+)?` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
683
+ }
684
+ function kt(e) {
685
+ return RegExp(`^${Ot(e)}$`);
686
+ }
687
+ function At(e) {
688
+ let t = ["Z"];
689
+ e.offset && t.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
690
+ let n = `${Ot({
691
+ precision: e.precision,
692
+ seconds: !0
693
+ })}(?:${t.join("|")})`, r = e.local ? `${n}|${Ot({ precision: e.precision })}` : n;
694
+ return RegExp(`^${Tt}T(?:${r})$`);
695
+ }
696
+ var jt = (e) => {
697
+ let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
698
+ return RegExp(`^${t}$`);
699
+ }, Mt = /^-?\d+$/, Nt = /^-?\d+(?:\.\d+)?$/, Pt = /^null$/i, Ft = /^[^A-Z]*$/, It = /^[^a-z]*$/, M = /*@__PURE__*/ E("$ZodCheck", (e, t) => {
700
+ var n;
701
+ e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
702
+ }), Lt = (e) => {
703
+ let t = e.value;
704
+ return !a(t) && t.length !== void 0;
705
+ }, N = {
706
+ number: "number",
707
+ bigint: "bigint",
708
+ object: "date"
709
+ }, Rt = /*@__PURE__*/ E("$ZodCheckLessThan", (e, t) => {
710
+ M.init(e, t);
711
+ let n = N[typeof t.value];
712
+ e._zod.onattach.push((e) => {
713
+ let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity;
714
+ t.value < r && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value);
715
+ }), e._zod.check = (r) => {
716
+ (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
717
+ origin: N[typeof r.value] ?? n,
718
+ code: "too_big",
719
+ maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
720
+ input: r.value,
721
+ inclusive: t.inclusive,
722
+ inst: e,
723
+ continue: !t.abort
724
+ });
725
+ };
726
+ }), zt = /*@__PURE__*/ E("$ZodCheckGreaterThan", (e, t) => {
727
+ M.init(e, t);
728
+ let n = N[typeof t.value];
729
+ e._zod.onattach.push((e) => {
730
+ let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity;
731
+ t.value > r && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value);
732
+ }), e._zod.check = (r) => {
733
+ (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
734
+ origin: N[typeof r.value] ?? n,
735
+ code: "too_small",
736
+ minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
737
+ input: r.value,
738
+ inclusive: t.inclusive,
739
+ inst: e,
740
+ continue: !t.abort
741
+ });
742
+ };
743
+ }), Bt = /*@__PURE__*/ E("$ZodCheckMultipleOf", (e, t) => {
744
+ M.init(e, t), e._zod.onattach.push((e) => {
745
+ var n;
746
+ (n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
747
+ }), e._zod.check = (n) => {
748
+ if (typeof n.value != typeof t.value) throw Error("Cannot mix number and bigint in multiple_of check.");
749
+ (typeof n.value == "bigint" ? t.value !== BigInt(0) && n.value % t.value === BigInt(0) : s(n.value, t.value) === 0) || n.issues.push({
750
+ origin: typeof n.value,
751
+ code: "not_multiple_of",
752
+ divisor: t.value,
753
+ input: n.value,
754
+ inst: e,
755
+ continue: !t.abort
756
+ });
757
+ };
758
+ }), Vt = /*@__PURE__*/ E("$ZodCheckNumberFormat", (e, t) => {
759
+ M.init(e, t), t.format = t.format || "float64";
760
+ let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = ie[t.format];
761
+ e._zod.onattach.push((e) => {
762
+ let r = e._zod.bag;
763
+ r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = Mt);
764
+ }), e._zod.check = (o) => {
765
+ let s = o.value;
766
+ if (n) {
767
+ if (!Number.isInteger(s)) {
768
+ o.issues.push({
769
+ expected: r,
770
+ format: t.format,
771
+ code: "invalid_type",
772
+ continue: !1,
773
+ input: s,
774
+ inst: e
775
+ });
776
+ return;
777
+ }
778
+ if (!Number.isSafeInteger(s)) {
779
+ s > 0 ? o.issues.push({
780
+ input: s,
781
+ code: "too_big",
782
+ maximum: 2 ** 53 - 1,
783
+ note: "Integers must be within the safe integer range.",
784
+ inst: e,
785
+ origin: r,
786
+ inclusive: !0,
787
+ continue: !t.abort
788
+ }) : o.issues.push({
789
+ input: s,
790
+ code: "too_small",
791
+ minimum: -(2 ** 53 - 1),
792
+ note: "Integers must be within the safe integer range.",
793
+ inst: e,
794
+ origin: r,
795
+ inclusive: !0,
796
+ continue: !t.abort
797
+ });
798
+ return;
799
+ }
800
+ }
801
+ s < i && o.issues.push({
802
+ origin: "number",
803
+ input: s,
804
+ code: "too_small",
805
+ minimum: i,
806
+ inclusive: !0,
807
+ inst: e,
808
+ continue: !t.abort
809
+ }), s > a && o.issues.push({
810
+ origin: "number",
811
+ input: s,
812
+ code: "too_big",
813
+ maximum: a,
814
+ inclusive: !0,
815
+ inst: e,
816
+ continue: !t.abort
817
+ });
818
+ };
819
+ }), Ht = /*@__PURE__*/ E("$ZodCheckMaxLength", (e, t) => {
820
+ var n;
821
+ M.init(e, t), (n = e._zod.def).when ?? (n.when = Lt), e._zod.onattach.push((e) => {
822
+ let n = e._zod.bag.maximum ?? Infinity;
823
+ t.maximum < n && (e._zod.bag.maximum = t.maximum);
824
+ }), e._zod.check = (n) => {
825
+ let r = n.value, i = r.length;
826
+ if ((typeof r == "string" && i > t.maximum ? ge(r) : i) <= t.maximum) return;
827
+ let a = _e(r);
828
+ n.issues.push({
829
+ origin: a,
830
+ code: "too_big",
831
+ maximum: t.maximum,
832
+ inclusive: !0,
833
+ input: r,
834
+ inst: e,
835
+ continue: !t.abort
836
+ });
837
+ };
838
+ }), Ut = /*@__PURE__*/ E("$ZodCheckMinLength", (e, t) => {
839
+ var n;
840
+ M.init(e, t), (n = e._zod.def).when ?? (n.when = Lt), e._zod.onattach.push((e) => {
841
+ let n = e._zod.bag.minimum ?? -Infinity;
842
+ t.minimum > n && (e._zod.bag.minimum = t.minimum);
843
+ }), e._zod.check = (n) => {
844
+ let r = n.value, i = r.length;
845
+ if ((typeof r == "string" && i >= t.minimum && i < t.minimum * 2 ? ge(r) : i) >= t.minimum) return;
846
+ let a = _e(r);
847
+ n.issues.push({
848
+ origin: a,
849
+ code: "too_small",
850
+ minimum: t.minimum,
851
+ inclusive: !0,
852
+ input: r,
853
+ inst: e,
854
+ continue: !t.abort
855
+ });
856
+ };
857
+ }), Wt = /*@__PURE__*/ E("$ZodCheckLengthEquals", (e, t) => {
858
+ var n;
859
+ M.init(e, t), (n = e._zod.def).when ?? (n.when = Lt), e._zod.onattach.push((e) => {
860
+ let n = e._zod.bag;
861
+ n.minimum = t.length, n.maximum = t.length, n.length = t.length;
862
+ }), e._zod.check = (n) => {
863
+ let r = n.value, i = r.length, a = typeof r == "string" && i >= t.length && i <= t.length * 2 ? ge(r) : i;
864
+ if (a === t.length) return;
865
+ let o = _e(r), s = a > t.length;
866
+ n.issues.push({
867
+ origin: o,
868
+ ...s ? {
869
+ code: "too_big",
870
+ maximum: t.length
871
+ } : {
872
+ code: "too_small",
873
+ minimum: t.length
874
+ },
875
+ inclusive: !0,
876
+ exact: !0,
877
+ input: n.value,
878
+ inst: e,
879
+ continue: !t.abort
880
+ });
881
+ };
882
+ }), P = /*@__PURE__*/ E("$ZodCheckStringFormat", (e, t) => {
883
+ var n, r;
884
+ M.init(e, t), e._zod.onattach.push((e) => {
885
+ let n = e._zod.bag;
886
+ n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern));
887
+ }), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
888
+ t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
889
+ origin: "string",
890
+ code: "invalid_format",
891
+ format: t.format,
892
+ input: n.value,
893
+ ...t.pattern ? { pattern: t.pattern.toString() } : {},
894
+ inst: e,
895
+ continue: !t.abort
896
+ });
897
+ }) : (r = e._zod).check ?? (r.check = () => {});
898
+ }), Gt = /*@__PURE__*/ E("$ZodCheckRegex", (e, t) => {
899
+ P.init(e, t), e._zod.check = (n) => {
900
+ t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
901
+ origin: "string",
902
+ code: "invalid_format",
903
+ format: "regex",
904
+ input: n.value,
905
+ pattern: t.pattern.toString(),
906
+ inst: e,
907
+ continue: !t.abort
908
+ });
909
+ };
910
+ }), Kt = /*@__PURE__*/ E("$ZodCheckLowerCase", (e, t) => {
911
+ t.pattern ??= Ft, P.init(e, t);
912
+ }), qt = /*@__PURE__*/ E("$ZodCheckUpperCase", (e, t) => {
913
+ t.pattern ??= It, P.init(e, t);
914
+ }), Jt = /*@__PURE__*/ E("$ZodCheckIncludes", (e, t) => {
915
+ M.init(e, t);
916
+ let n = g(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position},}${n}` : n);
917
+ t.pattern = r, e._zod.onattach.push((e) => {
918
+ let t = e._zod.bag;
919
+ t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
920
+ }), e._zod.check = (n) => {
921
+ n.value.includes(t.includes, t.position) || n.issues.push({
922
+ origin: "string",
923
+ code: "invalid_format",
924
+ format: "includes",
925
+ includes: t.includes,
926
+ input: n.value,
927
+ inst: e,
928
+ continue: !t.abort
929
+ });
930
+ };
931
+ }), Yt = /*@__PURE__*/ E("$ZodCheckStartsWith", (e, t) => {
932
+ M.init(e, t);
933
+ let n = RegExp(`^${g(t.prefix)}.*`);
934
+ t.pattern ??= n, e._zod.onattach.push((e) => {
935
+ let t = e._zod.bag;
936
+ t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
937
+ }), e._zod.check = (n) => {
938
+ n.value.startsWith(t.prefix) || n.issues.push({
939
+ origin: "string",
940
+ code: "invalid_format",
941
+ format: "starts_with",
942
+ prefix: t.prefix,
943
+ input: n.value,
944
+ inst: e,
945
+ continue: !t.abort
946
+ });
947
+ };
948
+ }), Xt = /*@__PURE__*/ E("$ZodCheckEndsWith", (e, t) => {
949
+ M.init(e, t);
950
+ let n = RegExp(`.*${g(t.suffix)}$`);
951
+ t.pattern ??= n, e._zod.onattach.push((e) => {
952
+ let t = e._zod.bag;
953
+ t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
954
+ }), e._zod.check = (n) => {
955
+ n.value.endsWith(t.suffix) || n.issues.push({
956
+ origin: "string",
957
+ code: "invalid_format",
958
+ format: "ends_with",
959
+ suffix: t.suffix,
960
+ input: n.value,
961
+ inst: e,
962
+ continue: !t.abort
963
+ });
964
+ };
965
+ }), Zt = /*@__PURE__*/ E("$ZodCheckOverwrite", (e, t) => {
966
+ M.init(e, t), e._zod.check = (e) => {
967
+ e.value = t.tx(e.value);
968
+ };
969
+ }), Qt = class {
970
+ constructor(e = [], t = {}) {
971
+ this.content = [], this.indent = 0, this.args = e, this.closed = t;
972
+ }
973
+ indented(e) {
974
+ this.indent += 1, e(this), --this.indent;
975
+ }
976
+ write(e) {
977
+ if (typeof e == "function") {
978
+ e(this, { execution: "sync" }), e(this, { execution: "async" });
979
+ return;
980
+ }
981
+ let t = e.split("\n").filter((e) => e), n = Math.min(...t.map((e) => e.length - e.trimStart().length)), r = t.map((e) => e.slice(n)).map((e) => " ".repeat(this.indent * 2) + e);
982
+ for (let e of r) this.content.push(e);
983
+ }
984
+ compile() {
985
+ let e = Function, t = this?.content ?? [""];
986
+ return new e(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${t.join("\n")}\n};`)(...Object.values(this.closed));
987
+ }
988
+ }, $t = {
989
+ major: 4,
990
+ minor: 5,
991
+ patch: 4
992
+ }, F = /*@__PURE__*/ E("$ZodType", (e, t) => {
993
+ var n;
994
+ e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = $t;
995
+ let r = e._zod.def.checks, i = e._zod.traits.has("$ZodCheck") ? [e, ...r ?? []] : r?.length ? [...r] : [];
996
+ for (let t of i) for (let n of t._zod.onattach) n(e);
997
+ if (i.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
998
+ e._zod.run = e._zod.parse;
999
+ });
1000
+ else {
1001
+ let t = (t, n, r) => {
1002
+ if (t.memo) return t;
1003
+ let i = y(t), a;
1004
+ for (let o of n) {
1005
+ if (o._zod.def.when) {
1006
+ if (fe(t) || !o._zod.def.when(t)) continue;
1007
+ } else if (i) continue;
1008
+ let n = t.issues.length, s = o._zod.check(t);
1009
+ if (s instanceof Promise && r?.async === !1) throw new D();
1010
+ if (a || s instanceof Promise) a = (a ?? Promise.resolve()).then(async () => {
1011
+ await s, t.issues.length !== n && (me(t.issues, n, e), i ||= y(t, n));
1012
+ });
1013
+ else {
1014
+ if (t.issues.length === n) continue;
1015
+ me(t.issues, n, e), i ||= y(t, n);
1016
+ }
1017
+ }
1018
+ return a ? a.then(() => t) : t;
1019
+ }, n = (n, r, a) => {
1020
+ if (y(n)) return n.aborted = !0, n;
1021
+ let o = t(r, i, a);
1022
+ if (o instanceof Promise) {
1023
+ if (a.async === !1) throw new D();
1024
+ return o.then((t) => e._zod.parse(t, a));
1025
+ }
1026
+ return e._zod.parse(o, a);
1027
+ };
1028
+ e._zod.run = (r, a) => {
1029
+ if (a.skipChecks) return e._zod.parse(r, a);
1030
+ if (a.direction === "backward") {
1031
+ let t = e._zod.parse({
1032
+ value: r.value,
1033
+ issues: []
1034
+ }, {
1035
+ ...a,
1036
+ skipChecks: !0
1037
+ });
1038
+ return t instanceof Promise ? t.then((e) => n(e, r, a)) : n(t, r, a);
1039
+ }
1040
+ let o = e._zod.parse(r, a);
1041
+ if (o instanceof Promise) {
1042
+ if (a.async === !1) throw new D();
1043
+ return o.then((e) => t(e, i, a));
1044
+ }
1045
+ return t(o, i, a);
1046
+ };
1047
+ }
1048
+ }, {
1049
+ get "~standard"() {
1050
+ return be(this, "~standard", tn(this));
1051
+ },
1052
+ set "~standard"(e) {
1053
+ C(this, "~standard", e);
1054
+ }
1055
+ }), en = (e) => e.success ? { value: e.data } : { issues: e.error?.issues };
1056
+ function tn(e) {
1057
+ return {
1058
+ validate: (t) => {
1059
+ try {
1060
+ return en(qe(e, t));
1061
+ } catch {
1062
+ return Ye(e, t).then(en);
1063
+ }
1064
+ },
1065
+ vendor: "zod",
1066
+ version: 1
1067
+ };
1068
+ }
1069
+ var nn = /*@__PURE__*/ E("$ZodString", (e, t) => {
1070
+ F.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? jt(e._zod.bag), e._zod.parse = (n, r) => {
1071
+ if (t.coerce) try {
1072
+ n.value = String(n.value);
1073
+ } catch {}
1074
+ return typeof n.value == "string" || n.issues.push({
1075
+ expected: "string",
1076
+ code: "invalid_type",
1077
+ input: n.value,
1078
+ inst: e
1079
+ }), n;
1080
+ };
1081
+ }), I = /*@__PURE__*/ E("$ZodStringFormat", (e, t) => {
1082
+ P.init(e, t), nn.init(e, t);
1083
+ }), rn = /*@__PURE__*/ E("$ZodGUID", (e, t) => {
1084
+ t.pattern ??= ft, I.init(e, t);
1085
+ }), an = /*@__PURE__*/ E("$ZodUUID", (e, t) => {
1086
+ if (t.version) {
1087
+ let e = {
1088
+ v1: 1,
1089
+ v2: 2,
1090
+ v3: 3,
1091
+ v4: 4,
1092
+ v5: 5,
1093
+ v6: 6,
1094
+ v7: 7,
1095
+ v8: 8
1096
+ }[t.version];
1097
+ if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
1098
+ t.pattern ??= pt(e);
1099
+ } else t.pattern ??= pt();
1100
+ I.init(e, t);
1101
+ }), on = /*@__PURE__*/ E("$ZodEmail", (e, t) => {
1102
+ t.pattern ??= mt, I.init(e, t);
1103
+ });
1104
+ function sn(e, t) {
1105
+ if (!t.normalize && t.protocol?.source === Ct.source && !/^https?:\/\//i.test(e)) return 1;
1106
+ try {
1107
+ return new URL(e);
1108
+ } catch {
1109
+ return 2;
1110
+ }
1111
+ }
1112
+ var cn = /[\t\n\r]/g;
1113
+ function ln(e) {
1114
+ return e.replace(cn, "");
1115
+ }
1116
+ function un(e, t) {
1117
+ return t.lastIndex = 0, t.test(e.hostname);
1118
+ }
1119
+ function dn(e, t) {
1120
+ return t.lastIndex = 0, t.test(e.protocol.endsWith(":") ? e.protocol.slice(0, -1) : e.protocol);
1121
+ }
1122
+ var fn = /*@__PURE__*/ E("$ZodURL", (e, t) => {
1123
+ I.init(e, t), e._zod.check = (n) => {
1124
+ try {
1125
+ let r = n.value.trim(), i = sn(r, t);
1126
+ if (i === 1) {
1127
+ n.issues.push({
1128
+ code: "invalid_format",
1129
+ format: "url",
1130
+ note: "Invalid URL format",
1131
+ input: n.value,
1132
+ inst: e,
1133
+ continue: !t.abort
1134
+ });
1135
+ return;
1136
+ }
1137
+ if (i === 2) {
1138
+ n.issues.push({
1139
+ code: "invalid_format",
1140
+ format: "url",
1141
+ input: n.value,
1142
+ inst: e,
1143
+ continue: !t.abort
1144
+ });
1145
+ return;
1146
+ }
1147
+ t.hostname && !un(i, t.hostname) && n.issues.push({
1148
+ code: "invalid_format",
1149
+ format: "url",
1150
+ note: "Invalid hostname",
1151
+ pattern: t.hostname.source,
1152
+ input: n.value,
1153
+ inst: e,
1154
+ continue: !t.abort
1155
+ }), t.protocol && !dn(i, t.protocol) && n.issues.push({
1156
+ code: "invalid_format",
1157
+ format: "url",
1158
+ note: "Invalid protocol",
1159
+ pattern: t.protocol.source,
1160
+ input: n.value,
1161
+ inst: e,
1162
+ continue: !t.abort
1163
+ }), n.value = t.normalize ? i.href : ln(r);
1164
+ return;
1165
+ } catch {
1166
+ n.issues.push({
1167
+ code: "invalid_format",
1168
+ format: "url",
1169
+ input: n.value,
1170
+ inst: e,
1171
+ continue: !t.abort
1172
+ });
1173
+ }
1174
+ };
1175
+ }), pn = /*@__PURE__*/ E("$ZodEmoji", (e, t) => {
1176
+ t.pattern ??= gt(), I.init(e, t);
1177
+ }), mn = /*@__PURE__*/ E("$ZodNanoID", (e, t) => {
1178
+ if (t.length !== void 0 && (!Number.isInteger(t.length) || t.length < 1)) throw Error(`Invalid nanoid length: ${t.length}`);
1179
+ t.pattern ??= t.length === void 0 ? lt : ut(t.length), I.init(e, t);
1180
+ }), hn = /*@__PURE__*/ E("$ZodCUID", (e, t) => {
1181
+ t.pattern ??= it, I.init(e, t);
1182
+ }), gn = /*@__PURE__*/ E("$ZodCUID2", (e, t) => {
1183
+ t.pattern ??= at, I.init(e, t);
1184
+ }), _n = /*@__PURE__*/ E("$ZodULID", (e, t) => {
1185
+ t.pattern ??= ot, I.init(e, t);
1186
+ }), vn = /*@__PURE__*/ E("$ZodXID", (e, t) => {
1187
+ t.pattern ??= st, I.init(e, t);
1188
+ }), yn = /*@__PURE__*/ E("$ZodKSUID", (e, t) => {
1189
+ t.pattern ??= ct, I.init(e, t);
1190
+ }), bn = /*@__PURE__*/ E("$ZodISODateTime", (e, t) => {
1191
+ t.pattern ??= At(t), I.init(e, t), (t.local || t.precision === -1) && (e._zod.bag.laxFormat = !0, e._zod.onattach.push((e) => {
1192
+ e._zod.bag.laxFormat = !0;
1193
+ }));
1194
+ }), xn = /*@__PURE__*/ E("$ZodISODate", (e, t) => {
1195
+ t.pattern ??= Dt, I.init(e, t);
1196
+ }), Sn = /*@__PURE__*/ E("$ZodISOTime", (e, t) => {
1197
+ t.pattern ??= kt(t), I.init(e, t);
1198
+ }), Cn = /*@__PURE__*/ E("$ZodISODuration", (e, t) => {
1199
+ t.pattern ??= dt, I.init(e, t);
1200
+ }), wn = /*@__PURE__*/ E("$ZodIPv4", (e, t) => {
1201
+ t.pattern ??= _t, I.init(e, t), e._zod.bag.format = "ipv4";
1202
+ }), Tn = /^[0-9a-fA-F:.]+$/;
1203
+ function En(e) {
1204
+ if (!Tn.test(e)) return !1;
1205
+ try {
1206
+ return new URL(`http://[${e}]`), !0;
1207
+ } catch {
1208
+ return !1;
1209
+ }
1210
+ }
1211
+ var Dn = /*@__PURE__*/ E("$ZodIPv6", (e, t) => {
1212
+ t.pattern ??= vt, I.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
1213
+ En(n.value) || n.issues.push({
1214
+ code: "invalid_format",
1215
+ format: "ipv6",
1216
+ input: n.value,
1217
+ inst: e,
1218
+ continue: !t.abort
1219
+ });
1220
+ };
1221
+ }), On = /*@__PURE__*/ E("$ZodCIDRv4", (e, t) => {
1222
+ t.pattern ??= yt, I.init(e, t);
1223
+ });
1224
+ function kn(e) {
1225
+ let t = e.split("/");
1226
+ if (t.length !== 2) return !1;
1227
+ let [n, r] = t;
1228
+ if (!r) return !1;
1229
+ let i = Number(r);
1230
+ return `${i}` !== r || i < 0 || i > 128 ? !1 : En(n);
1231
+ }
1232
+ var An = /*@__PURE__*/ E("$ZodCIDRv6", (e, t) => {
1233
+ t.pattern ??= bt, I.init(e, t), e._zod.check = (n) => {
1234
+ kn(n.value) || n.issues.push({
1235
+ code: "invalid_format",
1236
+ format: "cidrv6",
1237
+ input: n.value,
1238
+ inst: e,
1239
+ continue: !t.abort
1240
+ });
1241
+ };
1242
+ });
1243
+ function jn(e) {
1244
+ if (e === "") return !0;
1245
+ if (/\s/.test(e) || e.length % 4 != 0) return !1;
1246
+ try {
1247
+ return atob(e), !0;
1248
+ } catch {
1249
+ return !1;
1250
+ }
1251
+ }
1252
+ var Mn = /*@__PURE__*/ E("$ZodBase64", (e, t) => {
1253
+ t.pattern ??= xt, I.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
1254
+ jn(n.value) || n.issues.push({
1255
+ code: "invalid_format",
1256
+ format: "base64",
1257
+ input: n.value,
1258
+ inst: e,
1259
+ continue: !t.abort
1260
+ });
1261
+ };
1262
+ });
1263
+ function Nn(e) {
1264
+ if (!St.test(e)) return !1;
1265
+ let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
1266
+ return jn(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
1267
+ }
1268
+ var Pn = /*@__PURE__*/ E("$ZodBase64URL", (e, t) => {
1269
+ t.pattern ??= St, I.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
1270
+ Nn(n.value) || n.issues.push({
1271
+ code: "invalid_format",
1272
+ format: "base64url",
1273
+ input: n.value,
1274
+ inst: e,
1275
+ continue: !t.abort
1276
+ });
1277
+ };
1278
+ }), Fn = /*@__PURE__*/ E("$ZodE164", (e, t) => {
1279
+ t.pattern ??= wt, I.init(e, t);
1280
+ });
1281
+ function In(e, t = null) {
1282
+ try {
1283
+ let n = e.split(".");
1284
+ if (n.length !== 3) return !1;
1285
+ let [r] = n;
1286
+ if (!r) return !1;
1287
+ let i = JSON.parse(atob(r));
1288
+ return !("typ" in i && i?.typ !== "JWT" || !i.alg || t && (!("alg" in i) || i.alg !== t));
1289
+ } catch {
1290
+ return !1;
1291
+ }
1292
+ }
1293
+ var Ln = /*@__PURE__*/ E("$ZodJWT", (e, t) => {
1294
+ I.init(e, t), e._zod.check = (n) => {
1295
+ In(n.value, t.alg) || n.issues.push({
1296
+ code: "invalid_format",
1297
+ format: "jwt",
1298
+ input: n.value,
1299
+ inst: e,
1300
+ continue: !t.abort
1301
+ });
1302
+ };
1303
+ }), Rn = /*@__PURE__*/ E("$ZodNumber", (e, t) => {
1304
+ F.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? Nt, e._zod.parse = (n, r) => {
1305
+ if (t.coerce) try {
1306
+ n.value = Number(n.value);
1307
+ } catch {}
1308
+ let i = n.value;
1309
+ if (typeof i == "number" && !Number.isNaN(i) && Number.isFinite(i)) return n;
1310
+ let a = typeof i == "number" ? Number.isNaN(i) ? "NaN" : Number.isFinite(i) ? void 0 : String(i) : void 0;
1311
+ return n.issues.push({
1312
+ expected: "number",
1313
+ code: "invalid_type",
1314
+ input: i,
1315
+ inst: e,
1316
+ ...a ? { received: a } : {}
1317
+ }), n;
1318
+ };
1319
+ }), zn = /*@__PURE__*/ E("$ZodNumberFormat", (e, t) => {
1320
+ Vt.init(e, t), Rn.init(e, t);
1321
+ }), Bn = /*@__PURE__*/ E("$ZodNull", (e, t) => {
1322
+ F.init(e, t), e._zod.pattern = Pt, e._zod.values = /* @__PURE__ */ new Set([null]), e._zod.parse = (t, n) => {
1323
+ let r = t.value;
1324
+ return r === null || t.issues.push({
1325
+ expected: "null",
1326
+ code: "invalid_type",
1327
+ input: r,
1328
+ inst: e
1329
+ }), t;
1330
+ };
1331
+ }), Vn = /*@__PURE__*/ E("$ZodUnknown", (e, t) => {
1332
+ F.init(e, t), e._zod.parse = (e) => e;
1333
+ }), Hn = /*@__PURE__*/ E("$ZodNever", (e, t) => {
1334
+ F.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
1335
+ expected: "never",
1336
+ code: "invalid_type",
1337
+ input: t.value,
1338
+ inst: e
1339
+ }), t);
1340
+ });
1341
+ function Un(e, t, n) {
1342
+ e.issues.length && t.issues.push(...pe(n, e.issues)), t.value[n] = e.value;
1343
+ }
1344
+ var Wn = /*@__PURE__*/ E("$ZodArray", (e, t) => {
1345
+ F.init(e, t);
1346
+ let n = O.memoizer;
1347
+ n?.attach(e), e._zod.parse = (r, i) => {
1348
+ let a = r.value;
1349
+ if (!Array.isArray(a)) return r.issues.push({
1350
+ expected: "array",
1351
+ code: "invalid_type",
1352
+ input: a,
1353
+ inst: e
1354
+ }), r;
1355
+ r.value = n ? n.alloc(e, r, Array(a.length), i) : Array(a.length);
1356
+ let o = [];
1357
+ for (let e = 0; e < a.length; e++) {
1358
+ let n = a[e], s = t.element._zod.run({
1359
+ value: n,
1360
+ issues: []
1361
+ }, i);
1362
+ s instanceof Promise ? o.push(s.then((t) => Un(t, r, e))) : Un(s, r, e);
1363
+ }
1364
+ return o.length ? Promise.all(o).then(() => r) : r;
1365
+ };
1366
+ });
1367
+ function L(e, t, n, r, i, a) {
1368
+ let o = n in r, s = a === "optional";
1369
+ if (o || !s || i !== "optional") {
1370
+ if (e.issues.length) {
1371
+ if (i !== void 0 && s && !o) return;
1372
+ t.issues.push(...pe(n, e.issues));
1373
+ }
1374
+ if (!o && i === void 0) {
1375
+ e.issues.length || t.issues.push({
1376
+ code: "invalid_type",
1377
+ expected: "nonoptional",
1378
+ input: void 0,
1379
+ path: [n]
1380
+ });
1381
+ return;
1382
+ }
1383
+ e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value;
1384
+ }
1385
+ }
1386
+ var Gn = [];
1387
+ function Kn(e) {
1388
+ let t = Object.keys(e.shape), n = Object.getOwnPropertySymbols(e.shape), r = n.length ? n : Gn, i = r.length ? [...t, ...r] : t;
1389
+ for (let t of i) if (!e.shape?.[t]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${String(t)}": expected a Zod schema`);
1390
+ let a = re(e.shape);
1391
+ return {
1392
+ ...e,
1393
+ allKeys: i,
1394
+ symbolKeys: r,
1395
+ keySet: new Set(t),
1396
+ numKeys: t.length,
1397
+ optionalKeys: new Set(a)
1398
+ };
1399
+ }
1400
+ function qn(e, t, n, r, i, a) {
1401
+ let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin, d = c.optout;
1402
+ for (let i in t) {
1403
+ if (s.has(i)) continue;
1404
+ if (i === "__proto__") {
1405
+ l === "never" && o.push(i);
1406
+ continue;
1407
+ }
1408
+ if (l === "never") {
1409
+ o.push(i);
1410
+ continue;
1411
+ }
1412
+ let a = c.run({
1413
+ value: t[i],
1414
+ issues: []
1415
+ }, r);
1416
+ a instanceof Promise ? e.push(a.then((e) => L(e, n, i, t, u, d))) : L(a, n, i, t, u, d);
1417
+ }
1418
+ return o.length && n.issues.push({
1419
+ code: "unrecognized_keys",
1420
+ keys: o,
1421
+ input: t,
1422
+ inst: a,
1423
+ continue: !0
1424
+ }), e.length ? Promise.all(e).then(() => n) : n;
1425
+ }
1426
+ var Jn = /* @__PURE__ */ new WeakMap(), Yn = /*@__PURE__*/ E("$ZodObject", (e, t) => {
1427
+ if (F.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1428
+ let e = t.shape;
1429
+ Jn.set(t, e), Object.defineProperty(t, "shape", { get: () => {
1430
+ let n = { ...e };
1431
+ return Object.defineProperty(t, "shape", { value: n }), Jn.set(t, n), n;
1432
+ } });
1433
+ }
1434
+ let n = i(() => Kn(t));
1435
+ T(e, "propValues", (e) => {
1436
+ let t = e.def.shape, n = {};
1437
+ for (let e in t) {
1438
+ let r = t[e]._zod;
1439
+ if (r.values) {
1440
+ Object.prototype.hasOwnProperty.call(n, e) || c(n, e, /* @__PURE__ */ new Set());
1441
+ for (let t of r.values) n[e].add(t);
1442
+ r.optin !== void 0 && n[e].add(void 0);
1443
+ }
1444
+ }
1445
+ return n;
1446
+ });
1447
+ let r = p, a = t.catchall, o, s = O.memoizer;
1448
+ s?.attach(e), e._zod.parse = (t, i) => {
1449
+ o ??= n.value;
1450
+ let c = t.value;
1451
+ if (!r(c)) return t.issues.push({
1452
+ expected: "object",
1453
+ code: "invalid_type",
1454
+ input: c,
1455
+ inst: e
1456
+ }), t;
1457
+ t.value = s ? s.alloc(e, t, {}, i) : {};
1458
+ let l = [], u = o.shape;
1459
+ for (let e of o.allKeys) {
1460
+ if (e === "__proto__") continue;
1461
+ let n = u[e], r = n._zod.optin, a = n._zod.optout, o = n._zod.run({
1462
+ value: c[e],
1463
+ issues: []
1464
+ }, i);
1465
+ o instanceof Promise ? l.push(o.then((n) => L(n, t, e, c, r, a))) : L(o, t, e, c, r, a);
1466
+ }
1467
+ return a ? qn(l, c, t, i, n.value, e) : l.length ? Promise.all(l).then(() => t) : t;
1468
+ };
1469
+ }), Xn = /*@__PURE__*/ E("$ZodObjectJIT", (e, t) => {
1470
+ Yn.init(e, t);
1471
+ let n = e._zod.parse, r = i(() => Kn(t)), a = O.memoizer, o = (t) => {
1472
+ let n = r.value, i = n.symbolKeys, o = new Qt(["payload", "ctx"], {
1473
+ shape: t,
1474
+ inst: e,
1475
+ memo: a,
1476
+ syms: i
1477
+ }), s = (e) => `shape[${e}]._zod.run({ value: input[${e}], issues: [] }, ctx)`, c = (e, t) => `
1478
+ for (let i = 0; i < ${e}.issues.length; i++) {
1479
+ const iss = ${e}.issues[i];
1480
+ iss.path = iss.path ? [${t}, ...iss.path] : [${t}];
1481
+ payload.issues.push(iss);
1482
+ }`;
1483
+ o.write("const input = payload.value;");
1484
+ let l = Object.create(null), d = 0;
1485
+ for (let e of n.allKeys) l[e] = `key_${d++}`;
1486
+ o.write(a ? "const newResult = memo.alloc(inst, payload, {}, ctx);" : "const newResult = {};");
1487
+ for (let e of n.allKeys) {
1488
+ if (e === "__proto__") continue;
1489
+ let n = l[e], r = typeof e == "symbol" ? `syms[${i.indexOf(e)}]` : u(e), a = `${r} in input`, d = t[e], f = d?._zod?.optin, p = f !== void 0, m = d?._zod?.optout === "optional";
1490
+ if (o.write(`const ${n} = ${s(r)};`), p && m) {
1491
+ let e = f === "optional" ? `${n}_present` : `${n}.value !== undefined || ${n}_present`;
1492
+ o.write(`
1493
+ const ${n}_present = ${a};
1494
+ if (!${n}.issues.length || ${n}_present) {
1495
+ if (${n}.issues.length) {${c(n, r)}
1496
+ }
1497
+
1498
+ if (${e}) {
1499
+ newResult[${r}] = ${n}.value;
1500
+ }
1501
+ }
1502
+
1503
+ `);
1504
+ } else p ? o.write(`
1505
+ if (${n}.issues.length) {${c(n, r)}
1506
+ }
1507
+
1508
+ if (${n}.value === undefined) {
1509
+ if (${a}) {
1510
+ newResult[${r}] = undefined;
1511
+ }
1512
+ } else {
1513
+ newResult[${r}] = ${n}.value;
1514
+ }
1515
+
1516
+ `) : o.write(`
1517
+ const ${n}_present = ${a};
1518
+ if (${n}.issues.length) {${c(n, r)}
1519
+ }
1520
+ if (!${n}_present && !${n}.issues.length) {
1521
+ payload.issues.push({
1522
+ code: "invalid_type",
1523
+ expected: "nonoptional",
1524
+ input: undefined,
1525
+ path: [${r}]
1526
+ });
1527
+ }
1528
+
1529
+ if (${n}_present) {
1530
+ newResult[${r}] = ${n}.value;
1531
+ }
1532
+
1533
+ `);
1534
+ }
1535
+ return o.write("payload.value = newResult;"), o.write("return payload;"), o.compile();
1536
+ }, s, c = p, l = !O.jitless, d = l && m.value, f = t.catchall, h;
1537
+ e._zod.parse = (i, a) => {
1538
+ h ??= r.value;
1539
+ let u = i.value;
1540
+ return c(u) ? l && d && a?.async === !1 && a.jitless !== !0 ? (s ||= o(t.shape), i = s(i, a), f ? qn([], u, i, a, h, e) : i) : n(i, a) : (i.issues.push({
1541
+ expected: "object",
1542
+ code: "invalid_type",
1543
+ input: u,
1544
+ inst: e
1545
+ }), i);
1546
+ };
1547
+ });
1548
+ function Zn(e, t, n, r) {
1549
+ for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
1550
+ let i = e.filter((e) => !y(e));
1551
+ return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
1552
+ code: "invalid_union",
1553
+ input: t.value,
1554
+ inst: n,
1555
+ errors: e.map((e) => e.issues.map((e) => x(e, r, k())))
1556
+ }), t);
1557
+ }
1558
+ var Qn = /*@__PURE__*/ E("$ZodUnion", (e, t) => {
1559
+ F.init(e, t), T(e, "optin", (e) => e.def.options.some((e) => e._zod.optin === "defaulted") ? "defaulted" : e.def.options.some((e) => e._zod.optin !== void 0) ? "optional" : void 0), T(e, "optout", (e) => e.def.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), T(e, "values", (e) => {
1560
+ if (e.def.options.every((e) => e._zod.values)) return new Set(e.def.options.flatMap((e) => Array.from(e._zod.values)));
1561
+ }), T(e, "pattern", (e) => {
1562
+ if (e.def.options.every((e) => e._zod.pattern)) {
1563
+ let t = e.def.options.map((e) => e._zod.pattern);
1564
+ return RegExp(`^(${t.map((e) => o(e.source)).join("|")})$`);
1565
+ }
1566
+ });
1567
+ let n = t.options.length === 1 ? t.options[0]._zod.run : null;
1568
+ e._zod.parse = (r, i) => {
1569
+ if (n) return n(r, i);
1570
+ let a = !1, o = [];
1571
+ for (let e of t.options) {
1572
+ let t = e._zod.run({
1573
+ value: r.value,
1574
+ issues: []
1575
+ }, i);
1576
+ if (t instanceof Promise) o.push(t), a = !0;
1577
+ else {
1578
+ if (t.issues.length === 0) return t;
1579
+ o.push(t);
1580
+ }
1581
+ }
1582
+ return a ? Promise.all(o).then((t) => Zn(t, r, e, i)) : Zn(o, r, e, i);
1583
+ };
1584
+ }), $n = /*@__PURE__*/ E("$ZodIntersection", (e, t) => {
1585
+ F.init(e, t), e._zod.parse = (e, n) => {
1586
+ let r = e.value, i = t.left._zod.run({
1587
+ value: r,
1588
+ issues: []
1589
+ }, n), a = t.right._zod.run({
1590
+ value: r,
1591
+ issues: []
1592
+ }, n);
1593
+ return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => tr(e, t, n)) : tr(e, i, a);
1594
+ };
1595
+ });
1596
+ function er(e, t) {
1597
+ if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
1598
+ valid: !0,
1599
+ data: e
1600
+ };
1601
+ if (h(e) && h(t)) {
1602
+ let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
1603
+ ...e,
1604
+ ...t
1605
+ };
1606
+ Object.prototype.hasOwnProperty.call(i, "__proto__") && delete i.__proto__;
1607
+ for (let n of r) {
1608
+ if (n === "__proto__") continue;
1609
+ let r = er(e[n], t[n]);
1610
+ if (!r.valid) return {
1611
+ valid: !1,
1612
+ mergeErrorPath: [n, ...r.mergeErrorPath]
1613
+ };
1614
+ i[n] = r.data;
1615
+ }
1616
+ return {
1617
+ valid: !0,
1618
+ data: i
1619
+ };
1620
+ }
1621
+ if (Array.isArray(e) && Array.isArray(t)) {
1622
+ if (e.length !== t.length) return {
1623
+ valid: !1,
1624
+ mergeErrorPath: []
1625
+ };
1626
+ let n = [];
1627
+ for (let r = 0; r < e.length; r++) {
1628
+ let i = e[r], a = t[r], o = er(i, a);
1629
+ if (!o.valid) return {
1630
+ valid: !1,
1631
+ mergeErrorPath: [r, ...o.mergeErrorPath]
1632
+ };
1633
+ n.push(o.data);
1634
+ }
1635
+ return {
1636
+ valid: !0,
1637
+ data: n
1638
+ };
1639
+ }
1640
+ return {
1641
+ valid: !1,
1642
+ mergeErrorPath: []
1643
+ };
1644
+ }
1645
+ function tr(e, t, n) {
1646
+ let r = /* @__PURE__ */ new Map(), i, a = /* @__PURE__ */ new Map(), o = (e, t) => {
1647
+ let n;
1648
+ if (e.code === "unrecognized_keys" && !e.path?.length) i ??= e, n = e.keys;
1649
+ else if (e.code === "invalid_key" && e.origin === "record" && e.path?.length === 1) {
1650
+ let t = String(e.path[0]);
1651
+ a.has(t) || a.set(t, e), n = [t];
1652
+ } else return !1;
1653
+ for (let e of n) r.has(e) || r.set(e, {}), r.get(e)[t] = !0;
1654
+ return !0;
1655
+ };
1656
+ for (let n of t.issues) o(n, "l") || e.issues.push(n);
1657
+ for (let t of n.issues) o(t, "r") || e.issues.push(t);
1658
+ let s = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e);
1659
+ if (s.length) {
1660
+ let t = i ? s.filter((e) => i.keys.includes(e)) : [];
1661
+ t.length && e.issues.push({
1662
+ ...i,
1663
+ keys: t
1664
+ });
1665
+ for (let n of s) !t.includes(n) && a.has(n) && e.issues.push(a.get(n));
1666
+ }
1667
+ let c = er(t.value, n.value);
1668
+ if (!c.valid) {
1669
+ if (y(e)) return e;
1670
+ throw Error(`Unmergable intersection. Error path: ${JSON.stringify(c.mergeErrorPath)}`);
1671
+ }
1672
+ return e.value = c.data, e;
1673
+ }
1674
+ var nr = /*@__PURE__*/ E("$ZodEnum", (e, n) => {
1675
+ F.init(e, n);
1676
+ let r = t(n.entries), i = new Set(r);
1677
+ e._zod.values = i;
1678
+ let a = r.filter((e) => te.has(typeof e));
1679
+ e._zod.pattern = RegExp(a.length ? `^(${a.map((e) => g(e.toString())).join("|")})$` : "^[^\\s\\S]$"), e._zod.parse = (t, n) => {
1680
+ let a = t.value;
1681
+ return i.has(a) || t.issues.push({
1682
+ code: "invalid_value",
1683
+ values: r,
1684
+ input: a,
1685
+ inst: e
1686
+ }), t;
1687
+ };
1688
+ }), rr = /*@__PURE__*/ E("$ZodTransform", (e, t) => {
1689
+ F.init(e, t), e._zod.optin = "optional", O.memoizer?.guard(e), e._zod.parse = (n, r) => {
1690
+ if (r.direction === "backward") throw new Me(e.constructor.name);
1691
+ let i = t.transform(n.value, n);
1692
+ if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n));
1693
+ if (i instanceof Promise) throw new D();
1694
+ return n.value = i, n;
1695
+ };
1696
+ });
1697
+ function ir(e, t) {
1698
+ return e.value = t.issues.length ? void 0 : t.value, e;
1699
+ }
1700
+ var ar = /*@__PURE__*/ E("$ZodOptional", (e, t) => {
1701
+ F.init(e, t), T(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", T(e, "values", (e) => {
1702
+ let t = e.def.innerType._zod.values;
1703
+ return t ? /* @__PURE__ */ new Set([...t, void 0]) : void 0;
1704
+ }), T(e, "pattern", (e) => {
1705
+ let t = e.def.innerType._zod.pattern;
1706
+ return t ? RegExp(`^(${o(t.source)})?$`) : void 0;
1707
+ }), e._zod.parse = (e, n) => {
1708
+ if (e.value === void 0) {
1709
+ if (t.innerType._zod.optin !== "defaulted") return e;
1710
+ let r = t.innerType._zod.run({
1711
+ value: e.value,
1712
+ issues: []
1713
+ }, n);
1714
+ return r instanceof Promise ? r.then((t) => ir(e, t)) : ir(e, r);
1715
+ }
1716
+ return t.innerType._zod.run(e, n);
1717
+ };
1718
+ }), or = /*@__PURE__*/ E("$ZodExactOptional", (e, t) => {
1719
+ ar.init(e, t), T(e, "values", (e) => e.def.innerType._zod.values), T(e, "pattern", (e) => e.def.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
1720
+ }), sr = /*@__PURE__*/ E("$ZodNullable", (e, t) => {
1721
+ F.init(e, t), T(e, "optin", (e) => e.def.innerType._zod.optin), T(e, "optout", (e) => e.def.innerType._zod.optout), T(e, "pattern", (e) => {
1722
+ let t = e.def.innerType._zod.pattern;
1723
+ return t ? RegExp(`^(${o(t.source)}|null)$`) : void 0;
1724
+ }), T(e, "values", (e) => e.def.innerType._zod.values ? /* @__PURE__ */ new Set([...e.def.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
1725
+ }), cr = /*@__PURE__*/ E("$ZodDefault", (e, t) => {
1726
+ F.init(e, t), e._zod.optin = "defaulted", T(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
1727
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
1728
+ if (e.value === void 0) return e.value = t.defaultValue, e;
1729
+ let r = t.innerType._zod.run(e, n);
1730
+ return r instanceof Promise ? r.then((e) => lr(e, t)) : lr(r, t);
1731
+ };
1732
+ });
1733
+ function lr(e, t) {
1734
+ return e.value === void 0 && (e.value = t.defaultValue), e;
1735
+ }
1736
+ var ur = /*@__PURE__*/ E("$ZodPrefault", (e, t) => {
1737
+ F.init(e, t), e._zod.optin = "defaulted", T(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
1738
+ }), dr = /*@__PURE__*/ E("$ZodNonOptional", (e, t) => {
1739
+ F.init(e, t), T(e, "values", (e) => {
1740
+ let t = e.def.innerType._zod.values;
1741
+ return t ? new Set([...t].filter((e) => e !== void 0)) : void 0;
1742
+ }), e._zod.parse = (n, r) => {
1743
+ let i = t.innerType._zod.run(n, r);
1744
+ return i instanceof Promise ? i.then((t) => fr(t, e)) : fr(i, e);
1745
+ };
1746
+ });
1747
+ function fr(e, t) {
1748
+ return !e.issues.length && e.value === void 0 && e.issues.push({
1749
+ code: "invalid_type",
1750
+ expected: "nonoptional",
1751
+ input: e.value,
1752
+ inst: t
1753
+ }), e;
1754
+ }
1755
+ function pr(e, t, n, r) {
1756
+ return t.issues.length ? (e.value = n.catchValue({
1757
+ ...t,
1758
+ value: e.value,
1759
+ error: { issues: t.issues.map((e) => x(e, r, k())) },
1760
+ input: e.value
1761
+ }), e) : (e.value = t.value, t.memo && (e.memo = !0), e);
1762
+ }
1763
+ var mr = /*@__PURE__*/ E("$ZodCatch", (e, t) => {
1764
+ F.init(e, t), T(e, "optin", (e) => e.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), T(e, "optout", (e) => e.def.innerType._zod.optout), T(e, "values", (e) => e.def.innerType._zod.values), e._zod.parse = (e, n) => {
1765
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
1766
+ let r = t.innerType._zod.run({
1767
+ value: e.value,
1768
+ issues: []
1769
+ }, n);
1770
+ return r instanceof Promise ? r.then((r) => pr(e, r, t, n)) : pr(e, r, t, n);
1771
+ };
1772
+ }), hr = /*@__PURE__*/ E("$ZodPipe", (e, t) => {
1773
+ F.init(e, t), T(e, "values", (e) => e.def.in._zod.values), T(e, "optin", (e) => e.def.in._zod.optin), T(e, "optout", (e) => e.def.out._zod.optout), T(e, "propValues", (e) => e.def.in._zod.propValues), e._zod.parse = (e, n) => {
1774
+ if (n.direction === "backward") {
1775
+ let r = t.out._zod.run(e, n);
1776
+ return r instanceof Promise ? r.then((e) => R(e, t.in, n)) : R(r, t.in, n);
1777
+ }
1778
+ let r = t.in._zod.run(e, n);
1779
+ return r instanceof Promise ? r.then((e) => R(e, t.out, n)) : R(r, t.out, n);
1780
+ };
1781
+ });
1782
+ function R(e, t, n) {
1783
+ return e.issues.some((e) => e.code !== "unrecognized_keys") ? (e.aborted = !0, e) : t._zod.run({
1784
+ value: e.value,
1785
+ issues: e.issues
1786
+ }, n);
1787
+ }
1788
+ var gr = /*@__PURE__*/ E("$ZodReadonly", (e, t) => {
1789
+ F.init(e, t), T(e, "propValues", (e) => e.def.innerType._zod.propValues), T(e, "values", (e) => e.def.innerType._zod.values), T(e, "optin", (e) => e.def.innerType?._zod?.optin), T(e, "optout", (e) => e.def.innerType?._zod?.optout), e._zod.parse = (e, n) => {
1790
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
1791
+ let r = t.innerType._zod.run(e, n);
1792
+ return r instanceof Promise ? r.then(_r) : _r(r);
1793
+ };
1794
+ });
1795
+ function _r(e) {
1796
+ return e.memo || (e.value = Object.freeze(e.value)), e;
1797
+ }
1798
+ var vr = /*@__PURE__*/ E("$ZodCustom", (e, t) => {
1799
+ M.init(e, t), F.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
1800
+ let r = n.value, i = t.fn(r);
1801
+ if (i instanceof Promise) return i.then((t) => yr(t, n, r, e));
1802
+ yr(i, n, r, e);
1803
+ };
1804
+ });
1805
+ function yr(e, t, n, r) {
1806
+ if (!e) {
1807
+ let e = {
1808
+ code: "custom",
1809
+ input: n,
1810
+ inst: r,
1811
+ path: [...r._zod.def.path ?? []],
1812
+ continue: !r._zod.def.abort
1813
+ };
1814
+ r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(S(e));
1815
+ }
1816
+ }
1817
+ //#endregion
1818
+ //#region ../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/memoizer.js
1819
+ var br = class extends Error {
1820
+ constructor() {
1821
+ super("Cannot parse a reference cycle that closes through a transform"), this.name = "ZodCyclicError";
1822
+ }
1823
+ }, xr = "~memo", Sr = [];
1824
+ function Cr(e) {
1825
+ return e.map((e) => e.path ? {
1826
+ ...e,
1827
+ path: e.path.slice()
1828
+ } : { ...e });
1829
+ }
1830
+ var wr = /*@__PURE__*/ new WeakMap();
1831
+ function Tr(e, t) {
1832
+ let n = wr.get(e);
1833
+ if (n !== void 0) return n;
1834
+ if (t.has(e)) return !0;
1835
+ t.add(e);
1836
+ let r = !1, i = (e) => {
1837
+ !r && e?._zod && Tr(e, t) && (r = !0);
1838
+ }, a = e._zod.def;
1839
+ switch (a.type) {
1840
+ case "object":
1841
+ for (let e of Reflect.ownKeys(a.shape)) i(a.shape[e]);
1842
+ i(a.catchall);
1843
+ break;
1844
+ case "array":
1845
+ i(a.element);
1846
+ break;
1847
+ case "tuple":
1848
+ for (let e of a.items) i(e);
1849
+ i(a.rest);
1850
+ break;
1851
+ case "record":
1852
+ case "map":
1853
+ i(a.keyType), i(a.valueType);
1854
+ break;
1855
+ case "set":
1856
+ i(a.valueType);
1857
+ break;
1858
+ case "union":
1859
+ for (let e of a.options) i(e);
1860
+ break;
1861
+ case "intersection":
1862
+ i(a.left), i(a.right);
1863
+ break;
1864
+ case "optional":
1865
+ case "nullable":
1866
+ case "default":
1867
+ case "prefault":
1868
+ case "catch":
1869
+ case "readonly":
1870
+ case "nonoptional":
1871
+ case "promise":
1872
+ case "success":
1873
+ i(a.innerType);
1874
+ break;
1875
+ case "pipe":
1876
+ i(a.in), i(a.out);
1877
+ break;
1878
+ case "function":
1879
+ i(a.input), i(a.output);
1880
+ break;
1881
+ case "lazy":
1882
+ i(e._zod.innerType);
1883
+ break;
1884
+ case "template_literal":
1885
+ case "string":
1886
+ case "number":
1887
+ case "int":
1888
+ case "boolean":
1889
+ case "bigint":
1890
+ case "symbol":
1891
+ case "undefined":
1892
+ case "null":
1893
+ case "void":
1894
+ case "never":
1895
+ case "any":
1896
+ case "unknown":
1897
+ case "date":
1898
+ case "nan":
1899
+ case "enum":
1900
+ case "literal":
1901
+ case "file":
1902
+ case "transform":
1903
+ case "custom": break;
1904
+ default: for (let e in a) {
1905
+ let t = Object.getOwnPropertyDescriptor(a, e);
1906
+ if (!t || t.get) continue;
1907
+ let n = t.value;
1908
+ if (n && typeof n == "object") {
1909
+ if (n._zod) i(n);
1910
+ else if (Array.isArray(n)) for (let e of n) i(e);
1911
+ }
1912
+ }
1913
+ }
1914
+ return t.delete(e), wr.set(e, r), r;
1915
+ }
1916
+ function Er(e, t) {
1917
+ let n = e.buckets.get(t);
1918
+ return n || (n = /* @__PURE__ */ new Map(), e.buckets.set(t, n)), n;
1919
+ }
1920
+ var z, B = [], Dr = {
1921
+ alloc(e, t, n) {
1922
+ let r = z;
1923
+ if (!r) return n;
1924
+ z = void 0;
1925
+ let i = {
1926
+ value: n,
1927
+ issues: null
1928
+ };
1929
+ return r.set(t.value, i), B.push(i), n;
1930
+ },
1931
+ guard(e) {
1932
+ var t;
1933
+ (t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
1934
+ let t = e._zod.parse, n = (e, n) => {
1935
+ if (n.direction !== "backward" && kr(n, e.value)) throw new br();
1936
+ return t(e, n);
1937
+ };
1938
+ e._zod.parse = n, e._zod.run === t && (e._zod.run = n);
1939
+ });
1940
+ },
1941
+ attach(e) {
1942
+ var t;
1943
+ let n, r, i;
1944
+ (t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred.push(() => {
1945
+ let t = e._zod.parse, a = (o, s) => {
1946
+ if (n === void 0 && (n = Tr(e, /* @__PURE__ */ new Set()), !n)) return e._zod.parse = t, e._zod.run === a && (e._zod.run = t), t(o, s);
1947
+ let c = o.value;
1948
+ if (typeof c != "object" || !c) return t(o, s);
1949
+ let l = s[xr];
1950
+ l || (l = {
1951
+ buckets: /* @__PURE__ */ new Map(),
1952
+ backEdges: void 0
1953
+ }, s[xr] = l);
1954
+ let u;
1955
+ r === s ? u = i : (u = Er(l, e), r = s, i = u);
1956
+ let d = u.get(c);
1957
+ if (d) return o.value = d.value, d.issues ? d.issues.length && o.issues.push(...Cr(d.issues)) : (o.memo = !0, l.backEdges ?? (l.backEdges = /* @__PURE__ */ new Set()), l.backEdges.add(d.value)), o;
1958
+ z = u;
1959
+ let f = B.length, p = t(o, s);
1960
+ z = void 0;
1961
+ let m = B.length > f ? B.pop() : void 0;
1962
+ return p instanceof Promise ? p.then((e) => (m && (m.issues = e.issues.length ? Cr(e.issues) : Sr), e)) : (m && (m.issues = p.issues.length ? Cr(p.issues) : Sr), p);
1963
+ };
1964
+ e._zod.parse = a, e._zod.run === t && (e._zod.run = a);
1965
+ });
1966
+ }
1967
+ };
1968
+ function Or() {
1969
+ return Dr;
1970
+ }
1971
+ function kr(e, t) {
1972
+ let n = e[xr]?.backEdges;
1973
+ return n !== void 0 && typeof t == "object" && !!t && n.has(t);
1974
+ }
1975
+ //#endregion
1976
+ //#region ../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/locales/en.js
1977
+ var Ar = () => {
1978
+ let e = {
1979
+ string: {
1980
+ unit: "characters",
1981
+ verb: "to have"
1982
+ },
1983
+ file: {
1984
+ unit: "bytes",
1985
+ verb: "to have"
1986
+ },
1987
+ array: {
1988
+ unit: "items",
1989
+ verb: "to have"
1990
+ },
1991
+ set: {
1992
+ unit: "items",
1993
+ verb: "to have"
1994
+ },
1995
+ map: {
1996
+ unit: "entries",
1997
+ verb: "to have"
1998
+ }
1999
+ };
2000
+ function t(t) {
2001
+ return e[t] ?? null;
2002
+ }
2003
+ let r = {
2004
+ regex: "input",
2005
+ email: "email address",
2006
+ url: "URL",
2007
+ emoji: "emoji",
2008
+ uuid: "UUID",
2009
+ uuidv4: "UUIDv4",
2010
+ uuidv6: "UUIDv6",
2011
+ nanoid: "nanoid",
2012
+ guid: "GUID",
2013
+ cuid: "cuid",
2014
+ cuid2: "cuid2",
2015
+ ulid: "ULID",
2016
+ xid: "XID",
2017
+ ksuid: "KSUID",
2018
+ datetime: "ISO datetime",
2019
+ date: "ISO date",
2020
+ time: "ISO time",
2021
+ duration: "ISO duration",
2022
+ ipv4: "IPv4 address",
2023
+ ipv6: "IPv6 address",
2024
+ mac: "MAC address",
2025
+ cidrv4: "IPv4 range",
2026
+ cidrv6: "IPv6 range",
2027
+ base64: "base64-encoded string",
2028
+ base64url: "base64url-encoded string",
2029
+ json_string: "JSON string",
2030
+ e164: "E.164 number",
2031
+ credit_card: "credit card number",
2032
+ jwt: "JWT",
2033
+ template_literal: "input"
2034
+ }, i = { nan: "NaN" };
2035
+ function a(e, t) {
2036
+ return e === "number" && typeof t == "number" && !Number.isFinite(t) ? String(t) : i[e] ?? e;
2037
+ }
2038
+ return (e) => {
2039
+ switch (e.code) {
2040
+ case "invalid_type": return `Invalid input: expected ${a(e.expected)}, received ${a(ve(e.input), e.input)}`;
2041
+ case "invalid_value": return e.values.length === 1 ? `Invalid input: expected ${ne(e.values[0])}` : `Invalid option: expected one of ${n(e.values, "|")}`;
2042
+ case "too_big": {
2043
+ let n = e.exact ? "exactly " : e.inclusive ? "<=" : "<", r = t(e.origin);
2044
+ return r ? `Too big: expected ${e.origin ?? "value"} to have ${n}${e.maximum.toString()} ${r.unit ?? "elements"}` : `Too big: expected ${e.origin ?? "value"} to be ${n}${e.maximum.toString()}`;
2045
+ }
2046
+ case "too_small": {
2047
+ let n = e.exact ? "exactly " : e.inclusive ? ">=" : ">", r = t(e.origin);
2048
+ return r ? `Too small: expected ${e.origin} to have ${n}${e.minimum.toString()} ${r.unit}` : `Too small: expected ${e.origin} to be ${n}${e.minimum.toString()}`;
2049
+ }
2050
+ case "invalid_format": {
2051
+ let t = e;
2052
+ return t.format === "starts_with" ? `Invalid string: must start with "${t.prefix}"` : t.format === "ends_with" ? `Invalid string: must end with "${t.suffix}"` : t.format === "includes" ? `Invalid string: must include "${t.includes}"` : t.format === "regex" ? `Invalid string: must match pattern ${t.pattern}` : `Invalid ${r[t.format] ?? e.format}`;
2053
+ }
2054
+ case "not_multiple_of": return `Invalid number: must be a multiple of ${e.divisor}`;
2055
+ case "unrecognized_keys": return `Unrecognized key${e.keys.length > 1 ? "s" : ""}: ${n(e.keys, ", ")}`;
2056
+ case "invalid_key": return `Invalid key in ${e.origin}`;
2057
+ case "invalid_union": return e.options && Array.isArray(e.options) && e.options.length > 0 ? `Invalid discriminator value. Expected ${e.options.map((e) => `'${e}'`).join(" | ")}` : e.inclusive === !1 ? "Invalid input: more than one option matched" : "Invalid input";
2058
+ case "invalid_element": return `Invalid value in ${e.origin}`;
2059
+ default: return "Invalid input";
2060
+ }
2061
+ };
2062
+ };
2063
+ function jr() {
2064
+ return { localeError: Ar() };
2065
+ }
2066
+ //#endregion
2067
+ //#region ../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/registries.js
2068
+ var Mr, Nr = class {
2069
+ constructor() {
2070
+ this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
2071
+ }
2072
+ add(e, ...t) {
2073
+ let n = t[0];
2074
+ return this._map.set(e, n), n && typeof n == "object" && "id" in n && this._idmap.set(n.id, e), this;
2075
+ }
2076
+ clear() {
2077
+ return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
2078
+ }
2079
+ remove(e) {
2080
+ let t = this._map.get(e);
2081
+ return t && typeof t == "object" && "id" in t && this._idmap.delete(t.id), this._map.delete(e), this;
2082
+ }
2083
+ get(e) {
2084
+ let t = e._zod.parent;
2085
+ if (t) {
2086
+ let n = { ...this.get(t) ?? {} };
2087
+ delete n.id;
2088
+ let r = {
2089
+ ...n,
2090
+ ...this._map.get(e)
2091
+ };
2092
+ return Object.keys(r).length ? r : void 0;
2093
+ }
2094
+ return this._map.get(e);
2095
+ }
2096
+ has(e) {
2097
+ return this._map.has(e);
2098
+ }
2099
+ };
2100
+ function Pr() {
2101
+ return new Nr();
2102
+ }
2103
+ (Mr = globalThis).__zod_globalRegistry ?? (Mr.__zod_globalRegistry = Pr());
2104
+ var V = globalThis.__zod_globalRegistry;
2105
+ //#endregion
2106
+ //#region ../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/api.js
2107
+ // @__NO_SIDE_EFFECTS__
2108
+ function Fr(e, t) {
2109
+ return new e({
2110
+ type: "string",
2111
+ ...v(t)
2112
+ });
2113
+ }
2114
+ // @__NO_SIDE_EFFECTS__
2115
+ function Ir(e, t) {
2116
+ return new e({
2117
+ type: "string",
2118
+ format: "email",
2119
+ check: "string_format",
2120
+ abort: !1,
2121
+ ...v(t)
2122
+ });
2123
+ }
2124
+ // @__NO_SIDE_EFFECTS__
2125
+ function Lr(e, t) {
2126
+ return new e({
2127
+ type: "string",
2128
+ format: "guid",
2129
+ check: "string_format",
2130
+ abort: !1,
2131
+ ...v(t)
2132
+ });
2133
+ }
2134
+ // @__NO_SIDE_EFFECTS__
2135
+ function Rr(e, t) {
2136
+ return new e({
2137
+ type: "string",
2138
+ format: "uuid",
2139
+ check: "string_format",
2140
+ abort: !1,
2141
+ ...v(t)
2142
+ });
2143
+ }
2144
+ // @__NO_SIDE_EFFECTS__
2145
+ function zr(e, t) {
2146
+ return new e({
2147
+ type: "string",
2148
+ format: "uuid",
2149
+ check: "string_format",
2150
+ abort: !1,
2151
+ version: "v4",
2152
+ ...v(t)
2153
+ });
2154
+ }
2155
+ // @__NO_SIDE_EFFECTS__
2156
+ function Br(e, t) {
2157
+ return new e({
2158
+ type: "string",
2159
+ format: "uuid",
2160
+ check: "string_format",
2161
+ abort: !1,
2162
+ version: "v6",
2163
+ ...v(t)
2164
+ });
2165
+ }
2166
+ // @__NO_SIDE_EFFECTS__
2167
+ function Vr(e, t) {
2168
+ return new e({
2169
+ type: "string",
2170
+ format: "uuid",
2171
+ check: "string_format",
2172
+ abort: !1,
2173
+ version: "v7",
2174
+ ...v(t)
2175
+ });
2176
+ }
2177
+ // @__NO_SIDE_EFFECTS__
2178
+ function Hr(e, t) {
2179
+ return new e({
2180
+ type: "string",
2181
+ format: "url",
2182
+ check: "string_format",
2183
+ abort: !1,
2184
+ ...v(t)
2185
+ });
2186
+ }
2187
+ // @__NO_SIDE_EFFECTS__
2188
+ function Ur(e, t) {
2189
+ return new e({
2190
+ type: "string",
2191
+ format: "emoji",
2192
+ check: "string_format",
2193
+ abort: !1,
2194
+ ...v(t)
2195
+ });
2196
+ }
2197
+ // @__NO_SIDE_EFFECTS__
2198
+ function Wr(e, t) {
2199
+ return new e({
2200
+ type: "string",
2201
+ format: "nanoid",
2202
+ check: "string_format",
2203
+ abort: !1,
2204
+ ...v(t)
2205
+ });
2206
+ }
2207
+ // @__NO_SIDE_EFFECTS__
2208
+ function Gr(e, t) {
2209
+ return new e({
2210
+ type: "string",
2211
+ format: "cuid",
2212
+ check: "string_format",
2213
+ abort: !1,
2214
+ ...v(t)
2215
+ });
2216
+ }
2217
+ // @__NO_SIDE_EFFECTS__
2218
+ function Kr(e, t) {
2219
+ return new e({
2220
+ type: "string",
2221
+ format: "cuid2",
2222
+ check: "string_format",
2223
+ abort: !1,
2224
+ ...v(t)
2225
+ });
2226
+ }
2227
+ // @__NO_SIDE_EFFECTS__
2228
+ function qr(e, t) {
2229
+ return new e({
2230
+ type: "string",
2231
+ format: "ulid",
2232
+ check: "string_format",
2233
+ abort: !1,
2234
+ ...v(t)
2235
+ });
2236
+ }
2237
+ // @__NO_SIDE_EFFECTS__
2238
+ function Jr(e, t) {
2239
+ return new e({
2240
+ type: "string",
2241
+ format: "xid",
2242
+ check: "string_format",
2243
+ abort: !1,
2244
+ ...v(t)
2245
+ });
2246
+ }
2247
+ // @__NO_SIDE_EFFECTS__
2248
+ function Yr(e, t) {
2249
+ return new e({
2250
+ type: "string",
2251
+ format: "ksuid",
2252
+ check: "string_format",
2253
+ abort: !1,
2254
+ ...v(t)
2255
+ });
2256
+ }
2257
+ // @__NO_SIDE_EFFECTS__
2258
+ function Xr(e, t) {
2259
+ return new e({
2260
+ type: "string",
2261
+ format: "ipv4",
2262
+ check: "string_format",
2263
+ abort: !1,
2264
+ ...v(t)
2265
+ });
2266
+ }
2267
+ // @__NO_SIDE_EFFECTS__
2268
+ function Zr(e, t) {
2269
+ return new e({
2270
+ type: "string",
2271
+ format: "ipv6",
2272
+ check: "string_format",
2273
+ abort: !1,
2274
+ ...v(t)
2275
+ });
2276
+ }
2277
+ // @__NO_SIDE_EFFECTS__
2278
+ function Qr(e, t) {
2279
+ return new e({
2280
+ type: "string",
2281
+ format: "cidrv4",
2282
+ check: "string_format",
2283
+ abort: !1,
2284
+ ...v(t)
2285
+ });
2286
+ }
2287
+ // @__NO_SIDE_EFFECTS__
2288
+ function $r(e, t) {
2289
+ return new e({
2290
+ type: "string",
2291
+ format: "cidrv6",
2292
+ check: "string_format",
2293
+ abort: !1,
2294
+ ...v(t)
2295
+ });
2296
+ }
2297
+ // @__NO_SIDE_EFFECTS__
2298
+ function ei(e, t) {
2299
+ return new e({
2300
+ type: "string",
2301
+ format: "base64",
2302
+ check: "string_format",
2303
+ abort: !1,
2304
+ ...v(t)
2305
+ });
2306
+ }
2307
+ // @__NO_SIDE_EFFECTS__
2308
+ function ti(e, t) {
2309
+ return new e({
2310
+ type: "string",
2311
+ format: "base64url",
2312
+ check: "string_format",
2313
+ abort: !1,
2314
+ ...v(t)
2315
+ });
2316
+ }
2317
+ // @__NO_SIDE_EFFECTS__
2318
+ function ni(e, t) {
2319
+ return new e({
2320
+ type: "string",
2321
+ format: "e164",
2322
+ check: "string_format",
2323
+ abort: !1,
2324
+ ...v(t)
2325
+ });
2326
+ }
2327
+ // @__NO_SIDE_EFFECTS__
2328
+ function ri(e, t) {
2329
+ return new e({
2330
+ type: "string",
2331
+ format: "jwt",
2332
+ check: "string_format",
2333
+ abort: !1,
2334
+ ...v(t)
2335
+ });
2336
+ }
2337
+ // @__NO_SIDE_EFFECTS__
2338
+ function ii(e, t) {
2339
+ return new e({
2340
+ type: "string",
2341
+ format: "datetime",
2342
+ check: "string_format",
2343
+ offset: !1,
2344
+ local: !1,
2345
+ precision: null,
2346
+ ...v(t)
2347
+ });
2348
+ }
2349
+ // @__NO_SIDE_EFFECTS__
2350
+ function ai(e, t) {
2351
+ return new e({
2352
+ type: "string",
2353
+ format: "date",
2354
+ check: "string_format",
2355
+ ...v(t)
2356
+ });
2357
+ }
2358
+ // @__NO_SIDE_EFFECTS__
2359
+ function oi(e, t) {
2360
+ return new e({
2361
+ type: "string",
2362
+ format: "time",
2363
+ check: "string_format",
2364
+ precision: null,
2365
+ ...v(t)
2366
+ });
2367
+ }
2368
+ // @__NO_SIDE_EFFECTS__
2369
+ function si(e, t) {
2370
+ return new e({
2371
+ type: "string",
2372
+ format: "duration",
2373
+ check: "string_format",
2374
+ ...v(t)
2375
+ });
2376
+ }
2377
+ // @__NO_SIDE_EFFECTS__
2378
+ function ci(e, t) {
2379
+ return new e({
2380
+ type: "number",
2381
+ checks: [],
2382
+ ...v(t)
2383
+ });
2384
+ }
2385
+ // @__NO_SIDE_EFFECTS__
2386
+ function li(e, t) {
2387
+ return new e({
2388
+ type: "number",
2389
+ check: "number_format",
2390
+ abort: !1,
2391
+ format: "safeint",
2392
+ ...v(t)
2393
+ });
2394
+ }
2395
+ // @__NO_SIDE_EFFECTS__
2396
+ function ui(e, t) {
2397
+ return new e({
2398
+ type: "null",
2399
+ ...v(t)
2400
+ });
2401
+ }
2402
+ // @__NO_SIDE_EFFECTS__
2403
+ function di(e) {
2404
+ return new e({ type: "unknown" });
2405
+ }
2406
+ // @__NO_SIDE_EFFECTS__
2407
+ function fi(e, t) {
2408
+ return new e({
2409
+ type: "never",
2410
+ ...v(t)
2411
+ });
2412
+ }
2413
+ // @__NO_SIDE_EFFECTS__
2414
+ function pi(e, t) {
2415
+ return new Rt({
2416
+ check: "less_than",
2417
+ ...v(t),
2418
+ value: e,
2419
+ inclusive: !1
2420
+ });
2421
+ }
2422
+ // @__NO_SIDE_EFFECTS__
2423
+ function mi(e, t) {
2424
+ return new Rt({
2425
+ check: "less_than",
2426
+ ...v(t),
2427
+ value: e,
2428
+ inclusive: !0
2429
+ });
2430
+ }
2431
+ // @__NO_SIDE_EFFECTS__
2432
+ function hi(e, t) {
2433
+ return new zt({
2434
+ check: "greater_than",
2435
+ ...v(t),
2436
+ value: e,
2437
+ inclusive: !1
2438
+ });
2439
+ }
2440
+ // @__NO_SIDE_EFFECTS__
2441
+ function gi(e, t) {
2442
+ return new zt({
2443
+ check: "greater_than",
2444
+ ...v(t),
2445
+ value: e,
2446
+ inclusive: !0
2447
+ });
2448
+ }
2449
+ // @__NO_SIDE_EFFECTS__
2450
+ function _i(e, t) {
2451
+ return new Bt({
2452
+ check: "multiple_of",
2453
+ ...v(t),
2454
+ value: e
2455
+ });
2456
+ }
2457
+ // @__NO_SIDE_EFFECTS__
2458
+ function vi(e, t) {
2459
+ return new Ht({
2460
+ check: "max_length",
2461
+ ...v(t),
2462
+ maximum: e
2463
+ });
2464
+ }
2465
+ // @__NO_SIDE_EFFECTS__
2466
+ function H(e, t) {
2467
+ return new Ut({
2468
+ check: "min_length",
2469
+ ...v(t),
2470
+ minimum: e
2471
+ });
2472
+ }
2473
+ // @__NO_SIDE_EFFECTS__
2474
+ function yi(e, t) {
2475
+ return new Wt({
2476
+ check: "length_equals",
2477
+ ...v(t),
2478
+ length: e
2479
+ });
2480
+ }
2481
+ // @__NO_SIDE_EFFECTS__
2482
+ function bi(e, t) {
2483
+ return new Gt({
2484
+ check: "string_format",
2485
+ format: "regex",
2486
+ ...v(t),
2487
+ pattern: e
2488
+ });
2489
+ }
2490
+ // @__NO_SIDE_EFFECTS__
2491
+ function xi(e) {
2492
+ return new Kt({
2493
+ check: "string_format",
2494
+ format: "lowercase",
2495
+ ...v(e)
2496
+ });
2497
+ }
2498
+ // @__NO_SIDE_EFFECTS__
2499
+ function Si(e) {
2500
+ return new qt({
2501
+ check: "string_format",
2502
+ format: "uppercase",
2503
+ ...v(e)
2504
+ });
2505
+ }
2506
+ // @__NO_SIDE_EFFECTS__
2507
+ function Ci(e, t) {
2508
+ return new Jt({
2509
+ check: "string_format",
2510
+ format: "includes",
2511
+ ...v(t),
2512
+ includes: e
2513
+ });
2514
+ }
2515
+ // @__NO_SIDE_EFFECTS__
2516
+ function wi(e, t) {
2517
+ return new Yt({
2518
+ check: "string_format",
2519
+ format: "starts_with",
2520
+ ...v(t),
2521
+ prefix: e
2522
+ });
2523
+ }
2524
+ // @__NO_SIDE_EFFECTS__
2525
+ function Ti(e, t) {
2526
+ return new Xt({
2527
+ check: "string_format",
2528
+ format: "ends_with",
2529
+ ...v(t),
2530
+ suffix: e
2531
+ });
2532
+ }
2533
+ // @__NO_SIDE_EFFECTS__
2534
+ function U(e) {
2535
+ return new Zt({
2536
+ check: "overwrite",
2537
+ tx: e
2538
+ });
2539
+ }
2540
+ // @__NO_SIDE_EFFECTS__
2541
+ function Ei(e) {
2542
+ return /* @__PURE__ */ U((t) => t.normalize(e));
2543
+ }
2544
+ // @__NO_SIDE_EFFECTS__
2545
+ function Di() {
2546
+ return /* @__PURE__ */ U((e) => e.trim());
2547
+ }
2548
+ // @__NO_SIDE_EFFECTS__
2549
+ function Oi() {
2550
+ return /* @__PURE__ */ U((e) => e.toLowerCase());
2551
+ }
2552
+ // @__NO_SIDE_EFFECTS__
2553
+ function ki() {
2554
+ return /* @__PURE__ */ U((e) => e.toUpperCase());
2555
+ }
2556
+ // @__NO_SIDE_EFFECTS__
2557
+ function Ai() {
2558
+ return /* @__PURE__ */ U((e) => d(e));
2559
+ }
2560
+ // @__NO_SIDE_EFFECTS__
2561
+ function ji(e, t, n) {
2562
+ return new e({
2563
+ type: "array",
2564
+ element: t,
2565
+ ...v(n)
2566
+ });
2567
+ }
2568
+ // @__NO_SIDE_EFFECTS__
2569
+ function Mi(e, t, n) {
2570
+ return new e({
2571
+ type: "custom",
2572
+ check: "custom",
2573
+ fn: t,
2574
+ ...v(n)
2575
+ });
2576
+ }
2577
+ // @__NO_SIDE_EFFECTS__
2578
+ function Ni(e, t) {
2579
+ let n = /* @__PURE__ */ Pi((t) => (t.addIssue = (e) => {
2580
+ if (typeof e == "string") t.issues.push(S(e, t.value, n._zod.def));
2581
+ else {
2582
+ let r = e;
2583
+ r.fatal && (r.continue = !1), r.code ??= "custom", "input" in r || (r.input = t.value), r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(S(r));
2584
+ }
2585
+ }, e(t.value, t)), t);
2586
+ return n;
2587
+ }
2588
+ // @__NO_SIDE_EFFECTS__
2589
+ function Pi(e, t) {
2590
+ let n = new M({
2591
+ check: "custom",
2592
+ ...v(t)
2593
+ });
2594
+ return n._zod.check = e, n;
2595
+ }
2596
+ //#endregion
2597
+ //#region ../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/core/to-json-schema.js
2598
+ function W(e, ...t) {
2599
+ for (let n of t) for (let t of Reflect.ownKeys(n)) Object.prototype.propertyIsEnumerable.call(n, t) && c(e, t, n[t]);
2600
+ return e;
2601
+ }
2602
+ function Fi(e) {
2603
+ let t = e?.target ?? "draft-2020-12";
2604
+ return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2605
+ processors: e.processors ?? {},
2606
+ metadataRegistry: e?.metadata ?? V,
2607
+ target: t,
2608
+ unrepresentable: e?.unrepresentable ?? "throw",
2609
+ override: e?.override ?? (() => {}),
2610
+ io: e?.io ?? "output",
2611
+ counter: 0,
2612
+ seen: /* @__PURE__ */ new Map(),
2613
+ sharedDefsExtractedFor: void 0,
2614
+ sharedEmitDoneFor: void 0,
2615
+ cycles: e?.cycles ?? "ref",
2616
+ reused: e?.reused ?? "inline",
2617
+ intersections: [],
2618
+ deferred: [],
2619
+ external: e?.external ?? void 0
2620
+ };
2621
+ }
2622
+ function G(e, t, n, r, i) {
2623
+ let a = typeof t.unrepresentable == "function" ? t.unrepresentable({
2624
+ zodSchema: e,
2625
+ path: r.path,
2626
+ message: i
2627
+ }) : t.unrepresentable;
2628
+ if (a === "any") return !1;
2629
+ if (a === void 0 || a === "throw") throw Error(i);
2630
+ return Object.assign(n, a), !0;
2631
+ }
2632
+ function K(e, t, n = {
2633
+ path: [],
2634
+ schemaPath: []
2635
+ }) {
2636
+ var r;
2637
+ let i = e._zod.def, a = t.seen.get(e);
2638
+ if (a) return a.count++, n.schemaPath.includes(e) && (a.cycle = n.path), a.schema;
2639
+ let o = {
2640
+ schema: {},
2641
+ count: 1,
2642
+ cycle: void 0,
2643
+ path: n.path
2644
+ };
2645
+ t.seen.set(e, o), t.sharedDefsExtractedFor = void 0, t.sharedEmitDoneFor = void 0;
2646
+ let s = e._zod.toJSONSchema?.();
2647
+ if (s) o.schema = s;
2648
+ else {
2649
+ let r = {
2650
+ ...n,
2651
+ schemaPath: [...n.schemaPath, e],
2652
+ path: n.path
2653
+ };
2654
+ if (e._zod.processJSONSchema) e._zod.processJSONSchema(t, o.schema, r);
2655
+ else {
2656
+ let n = o.schema, a = t.processors[i.type];
2657
+ if (!a) throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);
2658
+ a(e, t, n, r);
2659
+ }
2660
+ let a = e._zod.parent;
2661
+ a && (o.ref ||= a, K(a, t, r), t.seen.get(a).isParent = !0);
2662
+ }
2663
+ let c = t.metadataRegistry.get(e);
2664
+ return c && W(o.schema, c), t.io === "input" && q(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
2665
+ }
2666
+ function Ii(e) {
2667
+ return e.replace(/~/g, "~0").replace(/\//g, "~1");
2668
+ }
2669
+ function Li(e, t) {
2670
+ let n = e.seen.get(t);
2671
+ if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
2672
+ if (e.external && e.sharedDefsExtractedFor === e.external) return;
2673
+ let r = /* @__PURE__ */ new Map();
2674
+ for (let t of e.seen.entries()) {
2675
+ let n = e.metadataRegistry.get(t[0])?.id;
2676
+ if (n) {
2677
+ let e = r.get(n);
2678
+ if (e && e !== t[0]) throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
2679
+ r.set(n, t[0]);
2680
+ }
2681
+ }
2682
+ let i = (t) => {
2683
+ let r = e.target === "draft-2020-12" ? "$defs" : "definitions";
2684
+ if (e.external) {
2685
+ let n = e.external.registry.get(t[0])?.id, i = e.external.uri ?? ((e) => e);
2686
+ if (n) return { ref: i(n) };
2687
+ let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
2688
+ return t[1].defId = a, {
2689
+ defId: a,
2690
+ ref: `${i("__shared")}#/${r}/${Ii(a)}`
2691
+ };
2692
+ }
2693
+ let i = `#/${r}/`;
2694
+ if (t[1] === n && !t[1].schema.id) return { ref: "#" };
2695
+ let a = t[1].schema.id ?? `__schema${e.counter++}`;
2696
+ return {
2697
+ defId: a,
2698
+ ref: i + Ii(a)
2699
+ };
2700
+ }, a = (e) => {
2701
+ if (e[1].schema.$ref) return;
2702
+ let t = e[1], { ref: n, defId: r } = i(e);
2703
+ t.def = { ...t.schema }, r && (t.defId = r);
2704
+ let a = t.schema;
2705
+ for (let e in a) delete a[e];
2706
+ a.$ref = n;
2707
+ };
2708
+ if (e.cycles === "throw") for (let t of e.seen.entries()) {
2709
+ let e = t[1];
2710
+ if (e.cycle) throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
2711
+
2712
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
2713
+ }
2714
+ for (let n of e.seen.entries()) {
2715
+ let r = n[1];
2716
+ if (t === n[0]) {
2717
+ a(n);
2718
+ continue;
2719
+ }
2720
+ if (e.external) {
2721
+ let r = e.external.registry.get(n[0])?.id;
2722
+ if (t !== n[0] && r) {
2723
+ a(n);
2724
+ continue;
2725
+ }
2726
+ }
2727
+ if (e.metadataRegistry.get(n[0])?.id) {
2728
+ a(n);
2729
+ continue;
2730
+ }
2731
+ if (r.cycle) {
2732
+ a(n);
2733
+ continue;
2734
+ }
2735
+ if (r.count > 1 && e.reused === "ref") {
2736
+ a(n);
2737
+ continue;
2738
+ }
2739
+ }
2740
+ e.external && (e.sharedDefsExtractedFor = e.external);
2741
+ }
2742
+ function Ri(e) {
2743
+ let t = e.anyOf;
2744
+ if (!Array.isArray(t) || t.length === 0 || e.type !== void 0) return;
2745
+ let n = [];
2746
+ for (let e of t) {
2747
+ if (!e || typeof e != "object") return;
2748
+ Ri(e);
2749
+ let t = Object.keys(e);
2750
+ if (t.length !== 1 || t[0] !== "type") return;
2751
+ let r = e.type;
2752
+ for (let e of Array.isArray(r) ? r : [r]) {
2753
+ if (typeof e != "string") return;
2754
+ n.includes(e) || n.push(e);
2755
+ }
2756
+ }
2757
+ delete e.anyOf, e.type = n.length === 1 ? n[0] : n;
2758
+ }
2759
+ var zi = /* @__PURE__ */ new Set([
2760
+ "type",
2761
+ "properties",
2762
+ "required",
2763
+ "additionalProperties"
2764
+ ]), Bi = ["oneOf", "anyOf"];
2765
+ function Vi(e) {
2766
+ let t = e.additionalProperties;
2767
+ return t === void 0 || t === !1 || typeof t != "object" || !t ? null : Object.keys(t).length ? t : null;
2768
+ }
2769
+ function Hi(e) {
2770
+ let t = [];
2771
+ for (let n of e) {
2772
+ if (typeof n != "object" || n.type !== "object") return null;
2773
+ for (let e in n) if (!zi.has(e)) return null;
2774
+ t.push(n);
2775
+ }
2776
+ let n = {}, r = /* @__PURE__ */ new Set();
2777
+ for (let e of t) {
2778
+ for (let r in e.properties) {
2779
+ if (Object.prototype.hasOwnProperty.call(n, r)) continue;
2780
+ let e = [];
2781
+ for (let n of t) {
2782
+ let t = n.properties?.[r] ?? Vi(n);
2783
+ t != null && (e.some((e) => JSON.stringify(e) === JSON.stringify(t)) || e.push(t));
2784
+ }
2785
+ c(n, r, e.length === 1 ? e[0] : Hi(e) ?? { allOf: e });
2786
+ }
2787
+ for (let t of e.required ?? []) r.add(t);
2788
+ }
2789
+ let i = {
2790
+ type: "object",
2791
+ properties: n
2792
+ };
2793
+ if (r.size && (i.required = [...r]), t.every((e) => e.additionalProperties === !1)) i.additionalProperties = !1;
2794
+ else {
2795
+ let e = [];
2796
+ for (let n of t) {
2797
+ let t = Vi(n);
2798
+ t && !e.some((e) => JSON.stringify(e) === JSON.stringify(t)) && e.push(t);
2799
+ }
2800
+ e.length === 1 ? i.additionalProperties = e[0] : e.length > 1 && (i.additionalProperties = { allOf: e });
2801
+ }
2802
+ return i;
2803
+ }
2804
+ function Ui(e) {
2805
+ let t = e.allOf;
2806
+ if (!Array.isArray(t) || t.length < 2) return;
2807
+ for (let t of zi) if (t in e) return;
2808
+ let n = t.filter((e) => Bi.some((t) => Array.isArray(e[t]))), r = null;
2809
+ if (!n.length) r = Hi(t);
2810
+ else {
2811
+ let e = n[0], i = Bi.find((t) => Array.isArray(e[t]));
2812
+ if (Object.keys(e).length !== 1) return;
2813
+ let a = t.filter((t) => t !== e), o = e[i].map((e) => Hi([...a, e]));
2814
+ if (o.some((e) => !e)) return;
2815
+ r = { [i]: o };
2816
+ }
2817
+ r && (delete e.allOf, W(e, r));
2818
+ }
2819
+ function Wi(e, t) {
2820
+ let n = e.seen.get(t);
2821
+ if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
2822
+ let r = (t) => {
2823
+ let n = e.seen.get(t);
2824
+ if (n.ref === null) return;
2825
+ let i = n.def ?? n.schema, a = { ...i }, o = n.ref;
2826
+ if (n.ref = null, o) {
2827
+ r(o);
2828
+ let n = e.seen.get(o), s = n.schema;
2829
+ if (s.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (i.allOf = i.allOf ?? [], i.allOf.push(s)) : W(i, s), W(i, a), t._zod.parent === o) for (let e in i) e !== "$ref" && e !== "allOf" && (e in a || delete i[e]);
2830
+ if (s.$ref && n.def) for (let e in i) e !== "$ref" && e !== "allOf" && e in n.def && JSON.stringify(i[e]) === JSON.stringify(n.def[e]) && delete i[e];
2831
+ }
2832
+ let s = t._zod.parent;
2833
+ if (s && s !== o) {
2834
+ r(s);
2835
+ let t = e.seen.get(s);
2836
+ if (t?.schema.$ref && (i.$ref = t.schema.$ref, t.def)) for (let e in i) e !== "$ref" && e !== "allOf" && e in t.def && JSON.stringify(i[e]) === JSON.stringify(t.def[e]) && delete i[e];
2837
+ }
2838
+ e.override({
2839
+ zodSchema: t,
2840
+ jsonSchema: i,
2841
+ path: n.path ?? []
2842
+ });
2843
+ };
2844
+ if (!e.external || e.sharedEmitDoneFor !== e.external) {
2845
+ for (let t of [...e.seen.entries()].reverse()) r(t[0]);
2846
+ if (e.target !== "openapi-3.0") for (let t of e.seen.entries()) Ri(t[1].def ?? t[1].schema);
2847
+ for (let t of e.deferred) t();
2848
+ if (e.intersections.length) {
2849
+ let t = /* @__PURE__ */ new Map();
2850
+ for (let n of e.seen.values()) for (let e of [n.schema, n.def]) {
2851
+ let n = e?.allOf;
2852
+ if (!Array.isArray(n)) continue;
2853
+ let r = t.get(n);
2854
+ r ? r.push(e) : t.set(n, [e]);
2855
+ }
2856
+ for (let n of e.intersections) for (let e of t.get(n) ?? []) Ui(e);
2857
+ }
2858
+ }
2859
+ let i = {};
2860
+ if (e.target === "draft-2020-12" ? i.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? i.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? i.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
2861
+ let n = e.external.registry.get(t)?.id;
2862
+ if (!n) throw Error("Schema is missing an `id` property");
2863
+ i.$id = e.external.uri(n);
2864
+ }
2865
+ W(i, n.defId ? n.schema : n.def ?? n.schema);
2866
+ let a = e.metadataRegistry.get(t)?.id;
2867
+ a !== void 0 && i.id === a && delete i.id;
2868
+ let o = e.external?.defs ?? {};
2869
+ if (!e.external || e.sharedEmitDoneFor !== e.external) for (let t of e.seen.entries()) {
2870
+ let e = t[1];
2871
+ e.def && e.defId && (e.def.id === e.defId && delete e.def.id, c(o, e.defId, e.def));
2872
+ }
2873
+ e.external && (e.sharedEmitDoneFor = e.external), e.external || Object.keys(o).length > 0 && (e.target === "draft-2020-12" ? i.$defs = o : i.definitions = o);
2874
+ try {
2875
+ let n = JSON.parse(JSON.stringify(i));
2876
+ return Object.defineProperty(n, "~standard", {
2877
+ value: {
2878
+ ...t["~standard"],
2879
+ jsonSchema: {
2880
+ input: J(t, "input", e.processors),
2881
+ output: J(t, "output", e.processors)
2882
+ }
2883
+ },
2884
+ enumerable: !1,
2885
+ writable: !1
2886
+ }), n;
2887
+ } catch {
2888
+ throw Error("Error converting schema to JSON.");
2889
+ }
2890
+ }
2891
+ function q(e, t) {
2892
+ let n = t ?? { seen: /* @__PURE__ */ new Set() };
2893
+ if (n.seen.has(e)) return !1;
2894
+ n.seen.add(e);
2895
+ let r = e._zod.def;
2896
+ if (r.type === "transform") return !0;
2897
+ if (r.type === "array") return q(r.element, n);
2898
+ if (r.type === "set") return q(r.valueType, n);
2899
+ if (r.type === "lazy") return q(r.getter(), n);
2900
+ if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault" || r.type === "catch") return q(r.innerType, n);
2901
+ if (r.type === "intersection") return q(r.left, n) || q(r.right, n);
2902
+ if (r.type === "record" || r.type === "map") return q(r.keyType, n) || q(r.valueType, n);
2903
+ if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : q(r.in, n) || q(r.out, n);
2904
+ if (r.type === "object") {
2905
+ for (let e in r.shape) if (q(r.shape[e], n)) return !0;
2906
+ return !1;
2907
+ }
2908
+ if (r.type === "union") {
2909
+ for (let e of r.options) if (q(e, n)) return !0;
2910
+ return !1;
2911
+ }
2912
+ if (r.type === "tuple") {
2913
+ for (let e of r.items) if (q(e, n)) return !0;
2914
+ return !!(r.rest && q(r.rest, n));
2915
+ }
2916
+ return !1;
2917
+ }
2918
+ var Gi = (e, t = {}) => (n) => {
2919
+ let r = Fi({
2920
+ ...n,
2921
+ processors: t
2922
+ });
2923
+ return K(e, r), Li(r, e), Wi(r, e);
2924
+ }, J = (e, t, n = {}) => (r) => {
2925
+ let { libraryOptions: i, target: a } = r ?? {}, o = Fi({
2926
+ ...i ?? {},
2927
+ target: a,
2928
+ io: t,
2929
+ processors: n
2930
+ });
2931
+ return K(e, o), Li(o, e), Wi(o, e);
2932
+ }, Ki = {
2933
+ guid: "uuid",
2934
+ url: "uri",
2935
+ datetime: "date-time",
2936
+ json_string: "json-string",
2937
+ regex: ""
2938
+ }, qi = (e, t, n, r) => {
2939
+ let i = n;
2940
+ i.type = "string";
2941
+ let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l, laxFormat: u } = e._zod.bag;
2942
+ if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = Ki[s] ?? s, i.format === "" && delete i.format, (s === "time" || u) && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
2943
+ let e = [...c];
2944
+ e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
2945
+ ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
2946
+ pattern: e.source
2947
+ }))]);
2948
+ }
2949
+ }, Ji = (e, t, n, r) => {
2950
+ let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
2951
+ i.type = typeof s == "string" && s.includes("int") ? "integer" : "number";
2952
+ let d = typeof u == "number" && u >= (a ?? -Infinity), f = typeof l == "number" && l <= (o ?? Infinity), p = t.target === "draft-04" || t.target === "openapi-3.0";
2953
+ d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (Number.isFinite(c) && c !== 0 ? i.multipleOf = Math.abs(c) : G(e, t, i, r, `A multipleOf divisor of ${c} cannot be represented in JSON Schema`));
2954
+ }, Yi = (e, t, n, r) => {
2955
+ t.target === "openapi-3.0" ? (n.type = "string", n.nullable = !0, n.enum = [null]) : n.type = "null";
2956
+ }, Xi = (e, t, n, r) => {
2957
+ n.not = {};
2958
+ }, Zi = (e, n, r, i) => {
2959
+ let a = e._zod.def, o = t(a.entries);
2960
+ if (o.length === 0) {
2961
+ r.not = {};
2962
+ return;
2963
+ }
2964
+ o.every((e) => typeof e == "number") && (r.type = "number"), o.every((e) => typeof e == "string") && (r.type = "string"), r.enum = o;
2965
+ }, Qi = (e, t, n, r) => {
2966
+ G(e, t, n, r, "Custom types cannot be represented in JSON Schema");
2967
+ }, $i = (e, t, n, r) => {
2968
+ G(e, t, n, r, "Transforms cannot be represented in JSON Schema");
2969
+ }, ea = (e, t, n, r) => {
2970
+ let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
2971
+ typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = K(a.element, t, {
2972
+ ...r,
2973
+ path: [...r.path, "items"]
2974
+ });
2975
+ };
2976
+ function ta(e) {
2977
+ let t = e._zod.def;
2978
+ return t.type === "pipe" && t.in._zod.traits.has("$ZodTransform") ? ta(t.out) : t.type === "catch" ? ta(t.innerType) : e._zod.optin;
2979
+ }
2980
+ var na = (e, t, n, r) => {
2981
+ let i = n, a = e._zod.def, o = a.shape;
2982
+ if (Object.getOwnPropertySymbols(o).length && G(e, t, i, r, "Symbol keys cannot be represented in JSON Schema")) return;
2983
+ i.type = "object", i.properties = {};
2984
+ for (let e in o) c(i.properties, e, K(o[e], t, {
2985
+ ...r,
2986
+ path: [
2987
+ ...r.path,
2988
+ "properties",
2989
+ e
2990
+ ]
2991
+ }));
2992
+ let s = new Set(Object.keys(o)), l = new Set([...s].filter((e) => {
2993
+ let n = a.shape[e];
2994
+ return t.io === "input" ? ta(n) === void 0 : n._zod.optout === void 0;
2995
+ }));
2996
+ l.size > 0 && (i.required = Array.from(l)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = K(a.catchall, t, {
2997
+ ...r,
2998
+ path: [...r.path, "additionalProperties"]
2999
+ })) : t.io === "output" && (i.additionalProperties = !1);
3000
+ }, ra = (e, t, n, r) => {
3001
+ let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => K(e, t, {
3002
+ ...r,
3003
+ path: [
3004
+ ...r.path,
3005
+ a ? "oneOf" : "anyOf",
3006
+ n
3007
+ ]
3008
+ }));
3009
+ a ? n.oneOf = o : n.anyOf = o;
3010
+ }, ia = (e, t, n, r) => {
3011
+ let i = e._zod.def, a = K(i.left, t, {
3012
+ ...r,
3013
+ path: [
3014
+ ...r.path,
3015
+ "allOf",
3016
+ 0
3017
+ ]
3018
+ }), o = K(i.right, t, {
3019
+ ...r,
3020
+ path: [
3021
+ ...r.path,
3022
+ "allOf",
3023
+ 1
3024
+ ]
3025
+ }), s = (e) => "allOf" in e && Object.keys(e).length === 1, c = [...s(a) ? a.allOf : [a], ...s(o) ? o.allOf : [o]];
3026
+ n.allOf = c, t.intersections.push(c);
3027
+ }, aa = (e, t, n, r) => {
3028
+ let i = e._zod.def, a = K(i.innerType, t, r), o = t.seen.get(e);
3029
+ t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
3030
+ }, oa = (e, t, n, r) => {
3031
+ let i = e._zod.def;
3032
+ K(i.innerType, t, r);
3033
+ let a = t.seen.get(e);
3034
+ a.ref = i.innerType;
3035
+ }, sa = Symbol();
3036
+ function ca(e, t, n, r, i) {
3037
+ let a = !1, o = JSON.stringify(e, (e, t) => typeof t == "bigint" ? (a = !0, null) : t);
3038
+ return a ? (G(t, n, r, i, "BigInt defaults cannot be represented in JSON Schema"), sa) : JSON.parse(o);
3039
+ }
3040
+ var la = (e, t, n, r) => {
3041
+ let i = e._zod.def;
3042
+ K(i.innerType, t, r);
3043
+ let a = t.seen.get(e);
3044
+ a.ref = i.innerType;
3045
+ let o = ca(i.defaultValue, e, t, n, r);
3046
+ o !== sa && (n.default = o);
3047
+ }, ua = (e, t, n, r) => {
3048
+ let i = e._zod.def;
3049
+ K(i.innerType, t, r);
3050
+ let a = t.seen.get(e);
3051
+ if (a.ref = i.innerType, t.io !== "input") return;
3052
+ let o = ca(i.defaultValue, e, t, n, r);
3053
+ o !== sa && (n._prefault = o);
3054
+ }, da = (e, t, n, r) => {
3055
+ let i = e._zod.def;
3056
+ K(i.innerType, t, r);
3057
+ let a = t.seen.get(e);
3058
+ a.ref = i.innerType;
3059
+ let o;
3060
+ try {
3061
+ o = i.catchValue(void 0);
3062
+ } catch {
3063
+ G(e, t, n, r, "Dynamic catch values are not supported in JSON Schema");
3064
+ return;
3065
+ }
3066
+ n.default = o;
3067
+ }, fa = (e, t, n, r) => {
3068
+ let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
3069
+ K(o, t, r);
3070
+ let s = t.seen.get(e);
3071
+ s.ref = o;
3072
+ }, pa = (e, t, n, r) => {
3073
+ let i = e._zod.def;
3074
+ K(i.innerType, t, r);
3075
+ let a = t.seen.get(e);
3076
+ a.ref = i.innerType, n.readOnly = !0;
3077
+ }, ma = (e, t, n, r) => {
3078
+ let i = e._zod.def;
3079
+ K(i.innerType, t, r);
3080
+ let a = t.seen.get(e);
3081
+ a.ref = i.innerType;
3082
+ }, ha = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
3083
+ function Y(e, t, n) {
3084
+ Object.defineProperty(e, t, {
3085
+ configurable: !0,
3086
+ enumerable: !1,
3087
+ get() {
3088
+ let e = n(this);
3089
+ return Object.defineProperty(this, t, {
3090
+ value: e,
3091
+ configurable: !0,
3092
+ writable: !0
3093
+ }), e;
3094
+ },
3095
+ set(e) {
3096
+ Object.defineProperty(this, t, {
3097
+ value: e,
3098
+ configurable: !0,
3099
+ writable: !0
3100
+ });
3101
+ }
3102
+ });
3103
+ }
3104
+ var X = /*@__PURE__*/ E("ZodError", (e, t) => {
3105
+ Be.init(e, t), e.name = "ZodError";
3106
+ let n = Object.getPrototypeOf(e);
3107
+ ha.has(n) || (ha.add(n), Y(n, "format", (e) => (t) => We(e, t)), Y(n, "flatten", (e) => (t) => Ue(e, t)), Y(n, "addIssue", (e) => (t) => {
3108
+ e.issues.push(t), e.message = JSON.stringify(e.issues, r, 2);
3109
+ }), Y(n, "addIssues", (e) => (t) => {
3110
+ e.issues.push(...t), e.message = JSON.stringify(e.issues, r, 2);
3111
+ }), Object.defineProperty(n, "isEmpty", {
3112
+ configurable: !0,
3113
+ enumerable: !1,
3114
+ get() {
3115
+ return this.issues.length === 0;
3116
+ }
3117
+ }));
3118
+ }, void 0, { Parent: Error }), ga = /* @__PURE__ */ Ge(X), _a = /* @__PURE__ */ Ke(X), va = /* @__PURE__ */ j(X), ya = /* @__PURE__ */ Je(X), ba = /* @__PURE__ */ Xe(X), xa = /* @__PURE__ */ Ze(X), Sa = /* @__PURE__ */ Qe(X), Ca = /* @__PURE__ */ $e(X), wa = /* @__PURE__ */ et(X), Ta = /* @__PURE__ */ tt(X), Ea = /* @__PURE__ */ nt(X), Da = /* @__PURE__ */ rt(X);
3119
+ //#endregion
3120
+ //#region ../../node_modules/.pnpm/zod@4.5.4/node_modules/zod/v4/classic/schemas.js
3121
+ function Oa() {
3122
+ O.localeError || k(jr());
3123
+ }
3124
+ function ka() {
3125
+ O.memoizer || k({ memoizer: Or() });
3126
+ }
3127
+ var Z = /*@__PURE__*/ E("ZodType", (e, t) => (Oa(), F.init(e, t), e.def = t, e.type = t.type, e), {
3128
+ check(...e) {
3129
+ let t = this.def;
3130
+ return this.clone(l(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
3131
+ check: e,
3132
+ def: { check: "custom" },
3133
+ onattach: []
3134
+ } } : e)] }), { parent: !0 });
3135
+ },
3136
+ with(...e) {
3137
+ return this.check(...e);
3138
+ },
3139
+ clone(e, t) {
3140
+ return _(this, e, t);
3141
+ },
3142
+ brand() {
3143
+ return this;
3144
+ },
3145
+ register(e, t) {
3146
+ return e.add(this, t), this;
3147
+ },
3148
+ refine(e, t) {
3149
+ return this.check(Uo(e, t));
3150
+ },
3151
+ superRefine(e, t) {
3152
+ return this.check(Wo(e, t));
3153
+ },
3154
+ overwrite(e) {
3155
+ return this.check(/* @__PURE__ */ U(e));
3156
+ },
3157
+ optional() {
3158
+ return To(this);
3159
+ },
3160
+ exactOptional() {
3161
+ return Do(this);
3162
+ },
3163
+ nullable() {
3164
+ return ko(this);
3165
+ },
3166
+ nullish() {
3167
+ return To(ko(this));
3168
+ },
3169
+ nonoptional(e) {
3170
+ return Fo(this, e);
3171
+ },
3172
+ array() {
3173
+ return po(this);
3174
+ },
3175
+ or(e) {
3176
+ return _o([this, e]);
3177
+ },
3178
+ and(e) {
3179
+ return yo(this, e);
3180
+ },
3181
+ transform(e) {
3182
+ return zo(this, Co(e));
3183
+ },
3184
+ default(e) {
3185
+ return jo(this, e);
3186
+ },
3187
+ prefault(e) {
3188
+ return No(this, e);
3189
+ },
3190
+ catch(e) {
3191
+ return Lo(this, e);
3192
+ },
3193
+ pipe(e) {
3194
+ return zo(this, e);
3195
+ },
3196
+ readonly() {
3197
+ return Vo(this);
3198
+ },
3199
+ describe(e) {
3200
+ let t = this.clone();
3201
+ return V.add(t, { description: e }), t;
3202
+ },
3203
+ meta(...e) {
3204
+ if (e.length === 0) return V.get(this);
3205
+ let t = this.clone();
3206
+ return V.add(t, e[0]), t;
3207
+ },
3208
+ isOptional() {
3209
+ return this.safeParse(void 0).success;
3210
+ },
3211
+ isNullable() {
3212
+ return this.safeParse(null).success;
3213
+ },
3214
+ apply(e, ...t) {
3215
+ return t.length === 0 ? e(this) : e(this, ...t);
3216
+ },
3217
+ get "~standard"() {
3218
+ return be(this, "~standard", {
3219
+ ...tn(this),
3220
+ jsonSchema: {
3221
+ input: J(this, "input"),
3222
+ output: J(this, "output")
3223
+ }
3224
+ });
3225
+ },
3226
+ set "~standard"(e) {
3227
+ C(this, "~standard", e);
3228
+ },
3229
+ parse: function e(t, n) {
3230
+ return ga(this, t, n, { callee: e });
3231
+ },
3232
+ parseAsync: async function e(t, n) {
3233
+ return await _a(this, t, n, { callee: e });
3234
+ },
3235
+ safeParse(e, t) {
3236
+ return va(this, e, t);
3237
+ },
3238
+ async safeParseAsync(e, t) {
3239
+ return ya(this, e, t);
3240
+ },
3241
+ get spa() {
3242
+ return this?.safeParseAsync;
3243
+ },
3244
+ set spa(e) {
3245
+ C(this, "spa", e);
3246
+ },
3247
+ encode: function e(t, n) {
3248
+ return ba(this, t, n, { callee: e });
3249
+ },
3250
+ decode: function e(t, n) {
3251
+ return xa(this, t, n, { callee: e });
3252
+ },
3253
+ encodeAsync: async function e(t, n) {
3254
+ return await Sa(this, t, n, { callee: e });
3255
+ },
3256
+ decodeAsync: async function e(t, n) {
3257
+ return await Ca(this, t, n, { callee: e });
3258
+ },
3259
+ safeEncode(e, t) {
3260
+ return wa(this, e, t);
3261
+ },
3262
+ safeDecode(e, t) {
3263
+ return Ta(this, e, t);
3264
+ },
3265
+ async safeEncodeAsync(e, t) {
3266
+ return Ea(this, e, t);
3267
+ },
3268
+ async safeDecodeAsync(e, t) {
3269
+ return Da(this, e, t);
3270
+ },
3271
+ toJSONSchema(e) {
3272
+ return Gi(this, {})(e);
3273
+ },
3274
+ get description() {
3275
+ return V.get(this)?.description;
3276
+ },
3277
+ get _def() {
3278
+ return this._zod.def;
3279
+ }
3280
+ }), Aa = /*@__PURE__*/ E("_ZodString", (e, t) => {
3281
+ nn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => qi(e, t, n, r);
3282
+ let n = e._zod.bag;
3283
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null;
3284
+ }, {
3285
+ regex(...e) {
3286
+ return this.check(/* @__PURE__ */ bi(...e));
3287
+ },
3288
+ includes(...e) {
3289
+ return this.check(/* @__PURE__ */ Ci(...e));
3290
+ },
3291
+ startsWith(...e) {
3292
+ return this.check(/* @__PURE__ */ wi(...e));
3293
+ },
3294
+ endsWith(...e) {
3295
+ return this.check(/* @__PURE__ */ Ti(...e));
3296
+ },
3297
+ min(...e) {
3298
+ return this.check(/* @__PURE__ */ H(...e));
3299
+ },
3300
+ max(...e) {
3301
+ return this.check(/* @__PURE__ */ vi(...e));
3302
+ },
3303
+ length(...e) {
3304
+ return this.check(/* @__PURE__ */ yi(...e));
3305
+ },
3306
+ nonempty(...e) {
3307
+ return this.check(/* @__PURE__ */ H(1, ...e));
3308
+ },
3309
+ lowercase(e) {
3310
+ return this.check(/* @__PURE__ */ xi(e));
3311
+ },
3312
+ uppercase(e) {
3313
+ return this.check(/* @__PURE__ */ Si(e));
3314
+ },
3315
+ trim() {
3316
+ return this.check(/* @__PURE__ */ Di());
3317
+ },
3318
+ normalize(...e) {
3319
+ return this.check(/* @__PURE__ */ Ei(...e));
3320
+ },
3321
+ toLowerCase() {
3322
+ return this.check(/* @__PURE__ */ Oi());
3323
+ },
3324
+ toUpperCase() {
3325
+ return this.check(/* @__PURE__ */ ki());
3326
+ },
3327
+ slugify() {
3328
+ return this.check(/* @__PURE__ */ Ai());
3329
+ }
3330
+ }), ja = /*@__PURE__*/ E("ZodString", (e, t) => {
3331
+ nn.init(e, t), Aa.init(e, t);
3332
+ }, {
3333
+ email(e) {
3334
+ return this.check(/* @__PURE__ */ Ir(Ia, e));
3335
+ },
3336
+ url(e) {
3337
+ return this.check(/* @__PURE__ */ Hr(za, e));
3338
+ },
3339
+ jwt(e) {
3340
+ return this.check(/* @__PURE__ */ ri(eo, e));
3341
+ },
3342
+ emoji(e) {
3343
+ return this.check(/* @__PURE__ */ Ur(Ba, e));
3344
+ },
3345
+ guid(e) {
3346
+ return this.check(/* @__PURE__ */ Lr(La, e));
3347
+ },
3348
+ uuid(e) {
3349
+ return this.check(/* @__PURE__ */ Rr(Ra, e));
3350
+ },
3351
+ uuidv4(e) {
3352
+ return this.check(/* @__PURE__ */ zr(Ra, e));
3353
+ },
3354
+ uuidv6(e) {
3355
+ return this.check(/* @__PURE__ */ Br(Ra, e));
3356
+ },
3357
+ uuidv7(e) {
3358
+ return this.check(/* @__PURE__ */ Vr(Ra, e));
3359
+ },
3360
+ nanoid(e) {
3361
+ return this.check(/* @__PURE__ */ Wr(Va, e));
3362
+ },
3363
+ cuid(e) {
3364
+ return this.check(/* @__PURE__ */ Gr(Ha, e));
3365
+ },
3366
+ cuid2(e) {
3367
+ return this.check(/* @__PURE__ */ Kr(Ua, e));
3368
+ },
3369
+ ulid(e) {
3370
+ return this.check(/* @__PURE__ */ qr(Wa, e));
3371
+ },
3372
+ base64(e) {
3373
+ return this.check(/* @__PURE__ */ ei(Za, e));
3374
+ },
3375
+ base64url(e) {
3376
+ return this.check(/* @__PURE__ */ ti(Qa, e));
3377
+ },
3378
+ xid(e) {
3379
+ return this.check(/* @__PURE__ */ Jr(Ga, e));
3380
+ },
3381
+ ksuid(e) {
3382
+ return this.check(/* @__PURE__ */ Yr(Ka, e));
3383
+ },
3384
+ ipv4(e) {
3385
+ return this.check(/* @__PURE__ */ Xr(qa, e));
3386
+ },
3387
+ ipv6(e) {
3388
+ return this.check(/* @__PURE__ */ Zr(Ja, e));
3389
+ },
3390
+ cidrv4(e) {
3391
+ return this.check(/* @__PURE__ */ Qr(Ya, e));
3392
+ },
3393
+ cidrv6(e) {
3394
+ return this.check(/* @__PURE__ */ $r(Xa, e));
3395
+ },
3396
+ e164(e) {
3397
+ return this.check(/* @__PURE__ */ ni($a, e));
3398
+ },
3399
+ datetime(e) {
3400
+ return this.check(/* @__PURE__ */ ii(Ma, e));
3401
+ },
3402
+ date(e) {
3403
+ return this.check(/* @__PURE__ */ ai(Na, e));
3404
+ },
3405
+ time(e) {
3406
+ return this.check(/* @__PURE__ */ oi(Pa, e));
3407
+ },
3408
+ duration(e) {
3409
+ return this.check(/* @__PURE__ */ si(Fa, e));
3410
+ }
3411
+ });
3412
+ function Q(e) {
3413
+ return /* @__PURE__ */ Fr(ja, e);
3414
+ }
3415
+ var $ = /*@__PURE__*/ E("ZodStringFormat", (e, t) => {
3416
+ I.init(e, t), Aa.init(e, t);
3417
+ }), Ma = /*@__PURE__*/ E("ZodISODateTime", (e, t) => {
3418
+ bn.init(e, t), $.init(e, t);
3419
+ }), Na = /*@__PURE__*/ E("ZodISODate", (e, t) => {
3420
+ xn.init(e, t), $.init(e, t);
3421
+ }), Pa = /*@__PURE__*/ E("ZodISOTime", (e, t) => {
3422
+ Sn.init(e, t), $.init(e, t);
3423
+ }), Fa = /*@__PURE__*/ E("ZodISODuration", (e, t) => {
3424
+ Cn.init(e, t), $.init(e, t);
3425
+ }), Ia = /*@__PURE__*/ E("ZodEmail", (e, t) => {
3426
+ on.init(e, t), $.init(e, t);
3427
+ }), La = /*@__PURE__*/ E("ZodGUID", (e, t) => {
3428
+ rn.init(e, t), $.init(e, t);
3429
+ }), Ra = /*@__PURE__*/ E("ZodUUID", (e, t) => {
3430
+ an.init(e, t), $.init(e, t);
3431
+ }), za = /*@__PURE__*/ E("ZodURL", (e, t) => {
3432
+ fn.init(e, t), $.init(e, t);
3433
+ }), Ba = /*@__PURE__*/ E("ZodEmoji", (e, t) => {
3434
+ pn.init(e, t), $.init(e, t);
3435
+ }), Va = /*@__PURE__*/ E("ZodNanoID", (e, t) => {
3436
+ mn.init(e, t), $.init(e, t);
3437
+ }), Ha = /*@__PURE__*/ E("ZodCUID", (e, t) => {
3438
+ hn.init(e, t), $.init(e, t);
3439
+ }), Ua = /*@__PURE__*/ E("ZodCUID2", (e, t) => {
3440
+ gn.init(e, t), $.init(e, t);
3441
+ }), Wa = /*@__PURE__*/ E("ZodULID", (e, t) => {
3442
+ _n.init(e, t), $.init(e, t);
3443
+ }), Ga = /*@__PURE__*/ E("ZodXID", (e, t) => {
3444
+ vn.init(e, t), $.init(e, t);
3445
+ }), Ka = /*@__PURE__*/ E("ZodKSUID", (e, t) => {
3446
+ yn.init(e, t), $.init(e, t);
3447
+ }), qa = /*@__PURE__*/ E("ZodIPv4", (e, t) => {
3448
+ wn.init(e, t), $.init(e, t);
3449
+ }), Ja = /*@__PURE__*/ E("ZodIPv6", (e, t) => {
3450
+ Dn.init(e, t), $.init(e, t);
3451
+ }), Ya = /*@__PURE__*/ E("ZodCIDRv4", (e, t) => {
3452
+ On.init(e, t), $.init(e, t);
3453
+ }), Xa = /*@__PURE__*/ E("ZodCIDRv6", (e, t) => {
3454
+ An.init(e, t), $.init(e, t);
3455
+ }), Za = /*@__PURE__*/ E("ZodBase64", (e, t) => {
3456
+ Mn.init(e, t), $.init(e, t);
3457
+ }), Qa = /*@__PURE__*/ E("ZodBase64URL", (e, t) => {
3458
+ Pn.init(e, t), $.init(e, t);
3459
+ }), $a = /*@__PURE__*/ E("ZodE164", (e, t) => {
3460
+ Fn.init(e, t), $.init(e, t);
3461
+ }), eo = /*@__PURE__*/ E("ZodJWT", (e, t) => {
3462
+ Ln.init(e, t), $.init(e, t);
3463
+ }), to = /*@__PURE__*/ E("ZodNumber", (e, t) => {
3464
+ Rn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Ji(e, t, n, r);
3465
+ let n = e._zod.bag;
3466
+ e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null;
3467
+ }, {
3468
+ gt(e, t) {
3469
+ return this.check(/* @__PURE__ */ hi(e, t));
3470
+ },
3471
+ gte(e, t) {
3472
+ return this.check(/* @__PURE__ */ gi(e, t));
3473
+ },
3474
+ min(e, t) {
3475
+ return this.check(/* @__PURE__ */ gi(e, t));
3476
+ },
3477
+ lt(e, t) {
3478
+ return this.check(/* @__PURE__ */ pi(e, t));
3479
+ },
3480
+ lte(e, t) {
3481
+ return this.check(/* @__PURE__ */ mi(e, t));
3482
+ },
3483
+ max(e, t) {
3484
+ return this.check(/* @__PURE__ */ mi(e, t));
3485
+ },
3486
+ int(e) {
3487
+ return this.check(io(e));
3488
+ },
3489
+ safe(e) {
3490
+ return this.check(io(e));
3491
+ },
3492
+ positive(e) {
3493
+ return this.check(/* @__PURE__ */ hi(0, e));
3494
+ },
3495
+ nonnegative(e) {
3496
+ return this.check(/* @__PURE__ */ gi(0, e));
3497
+ },
3498
+ negative(e) {
3499
+ return this.check(/* @__PURE__ */ pi(0, e));
3500
+ },
3501
+ nonpositive(e) {
3502
+ return this.check(/* @__PURE__ */ mi(0, e));
3503
+ },
3504
+ multipleOf(e, t) {
3505
+ return this.check(/* @__PURE__ */ _i(e, t));
3506
+ },
3507
+ step(e, t) {
3508
+ return this.check(/* @__PURE__ */ _i(e, t));
3509
+ },
3510
+ finite() {
3511
+ return this;
3512
+ }
3513
+ });
3514
+ function no(e) {
3515
+ return /* @__PURE__ */ ci(to, e);
3516
+ }
3517
+ var ro = /*@__PURE__*/ E("ZodNumberFormat", (e, t) => {
3518
+ zn.init(e, t), to.init(e, t);
3519
+ });
3520
+ function io(e) {
3521
+ return /* @__PURE__ */ li(ro, e);
3522
+ }
3523
+ var ao = /*@__PURE__*/ E("ZodNull", (e, t) => {
3524
+ Bn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Yi(e, t, n, r);
3525
+ });
3526
+ function oo(e) {
3527
+ return /* @__PURE__ */ ui(ao, e);
3528
+ }
3529
+ var so = /*@__PURE__*/ E("ZodUnknown", (e, t) => {
3530
+ Vn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
3531
+ });
3532
+ function co() {
3533
+ return /* @__PURE__ */ di(so);
3534
+ }
3535
+ var lo = /*@__PURE__*/ E("ZodNever", (e, t) => {
3536
+ Hn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Xi(e, t, n, r);
3537
+ });
3538
+ function uo(e) {
3539
+ return /* @__PURE__ */ fi(lo, e);
3540
+ }
3541
+ var fo = /*@__PURE__*/ E("ZodArray", (e, t) => {
3542
+ ka(), Wn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ea(e, t, n, r), e.element = t.element;
3543
+ }, {
3544
+ min(e, t) {
3545
+ return this.check(/* @__PURE__ */ H(e, t));
3546
+ },
3547
+ nonempty(e) {
3548
+ return this.check(/* @__PURE__ */ H(1, e));
3549
+ },
3550
+ max(e, t) {
3551
+ return this.check(/* @__PURE__ */ vi(e, t));
3552
+ },
3553
+ length(e, t) {
3554
+ return this.check(/* @__PURE__ */ yi(e, t));
3555
+ },
3556
+ unwrap() {
3557
+ return this.element;
3558
+ }
3559
+ });
3560
+ function po(e, t) {
3561
+ return /* @__PURE__ */ ji(fo, e, t);
3562
+ }
3563
+ var mo = /*@__PURE__*/ E("ZodObject", (e, t) => {
3564
+ ka(), Xn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => na(e, t, n, r), Te(e, "shape", (e) => e._zod.def.shape, !1);
3565
+ }, {
3566
+ keyof() {
3567
+ return xo(Object.keys(this._zod.def.shape));
3568
+ },
3569
+ catchall(e) {
3570
+ return this.clone({
3571
+ ...this._zod.def,
3572
+ catchall: e
3573
+ });
3574
+ },
3575
+ passthrough() {
3576
+ return this.clone({
3577
+ ...this._zod.def,
3578
+ catchall: co()
3579
+ });
3580
+ },
3581
+ loose() {
3582
+ return this.clone({
3583
+ ...this._zod.def,
3584
+ catchall: co()
3585
+ });
3586
+ },
3587
+ strict() {
3588
+ return this.clone({
3589
+ ...this._zod.def,
3590
+ catchall: uo()
3591
+ });
3592
+ },
3593
+ strip() {
3594
+ return this.clone({
3595
+ ...this._zod.def,
3596
+ catchall: void 0
3597
+ });
3598
+ },
3599
+ extend(e) {
3600
+ return se(this, e);
3601
+ },
3602
+ safeExtend(e) {
3603
+ return ce(this, e);
3604
+ },
3605
+ merge(e) {
3606
+ return le(this, e);
3607
+ },
3608
+ pick(e) {
3609
+ return ae(this, e);
3610
+ },
3611
+ omit(e) {
3612
+ return oe(this, e);
3613
+ },
3614
+ partial(...e) {
3615
+ return ue(wo, this, e[0]);
3616
+ },
3617
+ exactPartial(...e) {
3618
+ return ue(Eo, this, e[0], "exactPartial");
3619
+ },
3620
+ required(...e) {
3621
+ return de(Po, this, e[0]);
3622
+ }
3623
+ });
3624
+ function ho(e, t) {
3625
+ return new mo({
3626
+ type: "object",
3627
+ shape: e ?? {},
3628
+ ...v(t)
3629
+ });
3630
+ }
3631
+ var go = /*@__PURE__*/ E("ZodUnion", (e, t) => {
3632
+ Qn.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ra(e, t, n, r), e.options = t.options;
3633
+ });
3634
+ function _o(e, t) {
3635
+ return new go({
3636
+ type: "union",
3637
+ options: e,
3638
+ ...v(t)
3639
+ });
3640
+ }
3641
+ var vo = /*@__PURE__*/ E("ZodIntersection", (e, t) => {
3642
+ $n.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ia(e, t, n, r);
3643
+ });
3644
+ function yo(e, t) {
3645
+ return new vo({
3646
+ type: "intersection",
3647
+ left: e,
3648
+ right: t
3649
+ });
3650
+ }
3651
+ var bo = /*@__PURE__*/ E("ZodEnum", (e, t) => {
3652
+ nr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Zi(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
3653
+ let n = new Set(Object.keys(t.entries));
3654
+ e.extract = (e, r) => {
3655
+ let i = {};
3656
+ for (let r of e) if (n.has(r)) i[r] = t.entries[r];
3657
+ else throw Error(`Key ${r} not found in enum`);
3658
+ return new bo({
3659
+ ...t,
3660
+ checks: [],
3661
+ ...v(r),
3662
+ entries: i
3663
+ });
3664
+ }, e.exclude = (e, r) => {
3665
+ let i = { ...t.entries };
3666
+ for (let t of e) if (n.has(t)) delete i[t];
3667
+ else throw Error(`Key ${t} not found in enum`);
3668
+ return new bo({
3669
+ ...t,
3670
+ checks: [],
3671
+ ...v(r),
3672
+ entries: i
3673
+ });
3674
+ };
3675
+ });
3676
+ function xo(e, t) {
3677
+ return new bo({
3678
+ type: "enum",
3679
+ entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
3680
+ ...v(t)
3681
+ });
3682
+ }
3683
+ var So = /*@__PURE__*/ E("ZodTransform", (e, t) => {
3684
+ ka(), rr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => $i(e, t, n, r), e._zod.parse = (n, r) => {
3685
+ if (r.direction === "backward") throw new Me(e.constructor.name);
3686
+ n.addIssue = (r) => {
3687
+ if (typeof r == "string") n.issues.push(S(r, n.value, t));
3688
+ else {
3689
+ let t = r;
3690
+ t.fatal && (t.continue = !1), t.code ??= "custom", "input" in t || (t.input = n.value), t.inst ??= e, n.issues.push(S(t));
3691
+ }
3692
+ };
3693
+ let i = t.transform(n.value, n);
3694
+ return i instanceof Promise ? i.then((e) => (n.value = e, n)) : (n.value = i, n);
3695
+ };
3696
+ });
3697
+ function Co(e) {
3698
+ return new So({
3699
+ type: "transform",
3700
+ transform: e
3701
+ });
3702
+ }
3703
+ var wo = /*@__PURE__*/ E("ZodOptional", (e, t) => {
3704
+ ar.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ma(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3705
+ });
3706
+ function To(e) {
3707
+ return new wo({
3708
+ type: "optional",
3709
+ innerType: e
3710
+ });
3711
+ }
3712
+ var Eo = /*@__PURE__*/ E("ZodExactOptional", (e, t) => {
3713
+ or.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ma(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3714
+ });
3715
+ function Do(e) {
3716
+ return new Eo({
3717
+ type: "optional",
3718
+ innerType: e
3719
+ });
3720
+ }
3721
+ var Oo = /*@__PURE__*/ E("ZodNullable", (e, t) => {
3722
+ sr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => aa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3723
+ });
3724
+ function ko(e) {
3725
+ return new Oo({
3726
+ type: "nullable",
3727
+ innerType: e
3728
+ });
3729
+ }
3730
+ var Ao = /*@__PURE__*/ E("ZodDefault", (e, t) => {
3731
+ cr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => la(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3732
+ });
3733
+ function jo(e, t) {
3734
+ return new Ao({
3735
+ type: "default",
3736
+ innerType: e,
3737
+ get defaultValue() {
3738
+ return typeof t == "function" ? t() : ee(t);
3739
+ }
3740
+ });
3741
+ }
3742
+ var Mo = /*@__PURE__*/ E("ZodPrefault", (e, t) => {
3743
+ ur.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => ua(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3744
+ });
3745
+ function No(e, t) {
3746
+ return new Mo({
3747
+ type: "prefault",
3748
+ innerType: e,
3749
+ get defaultValue() {
3750
+ return typeof t == "function" ? t() : ee(t);
3751
+ }
3752
+ });
3753
+ }
3754
+ var Po = /*@__PURE__*/ E("ZodNonOptional", (e, t) => {
3755
+ dr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => oa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3756
+ });
3757
+ function Fo(e, t) {
3758
+ return new Po({
3759
+ type: "nonoptional",
3760
+ innerType: e,
3761
+ ...v(t)
3762
+ });
3763
+ }
3764
+ var Io = /*@__PURE__*/ E("ZodCatch", (e, t) => {
3765
+ mr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => da(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3766
+ });
3767
+ function Lo(e, t) {
3768
+ return new Io({
3769
+ type: "catch",
3770
+ innerType: e,
3771
+ catchValue: typeof t == "function" ? t : De(t)
3772
+ });
3773
+ }
3774
+ var Ro = /*@__PURE__*/ E("ZodPipe", (e, t) => {
3775
+ hr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => fa(e, t, n, r), e.in = t.in, e.out = t.out;
3776
+ });
3777
+ function zo(e, t) {
3778
+ return new Ro({
3779
+ type: "pipe",
3780
+ in: e,
3781
+ out: t
3782
+ });
3783
+ }
3784
+ var Bo = /*@__PURE__*/ E("ZodReadonly", (e, t) => {
3785
+ gr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => pa(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3786
+ });
3787
+ function Vo(e) {
3788
+ return new Bo({
3789
+ type: "readonly",
3790
+ innerType: e
3791
+ });
3792
+ }
3793
+ var Ho = /*@__PURE__*/ E("ZodCustom", (e, t) => {
3794
+ vr.init(e, t), Z.init(e, t), e._zod.processJSONSchema = (t, n, r) => Qi(e, t, n, r);
3795
+ });
3796
+ function Uo(e, t = {}) {
3797
+ return /* @__PURE__ */ Mi(Ho, e, t);
3798
+ }
3799
+ function Wo(e, t) {
3800
+ return /* @__PURE__ */ Ni(e, t);
3801
+ }
3802
+ //#endregion
3803
+ //#region src/ox/types.ts
3804
+ var Go = ho({
3805
+ id: Q(),
3806
+ displayName: Q(),
3807
+ email: Q()
3808
+ }), Ko = ho({ data: po(po(_o([
3809
+ Q(),
3810
+ no(),
3811
+ oo()
3812
+ ]))) }), qo = ho({ data: ho({ id: Q() }) }), Jo = "1,500,555,556,557", Yo = (t, n) => ({
3813
+ async autocompleteContacts({ query: r, signal: i }) {
3814
+ let a = n();
3815
+ if (!a) return [];
3816
+ let { data: o } = await t.get(e(a, "addressbooks"), {
3817
+ params: {
3818
+ action: "autocomplete",
3819
+ query: r,
3820
+ columns: Jo,
3821
+ email: !0
3822
+ },
3823
+ signal: i
3824
+ }), { data: s } = Ko.parse(o), c = s.map(([e, t, n, r, i]) => ({
3825
+ id: String(e ?? ""),
3826
+ displayName: String(t ?? ""),
3827
+ email: String(n || r || i || "")
3828
+ })).filter((e) => !!e.email);
3829
+ return po(Go).parse(c);
3830
+ },
3831
+ async sendMail({ from: r, to: i, subject: a, htmlContent: o, signal: s }) {
3832
+ let c = n();
3833
+ if (!c) throw Error("Open-Xchange API url is not configured");
3834
+ let { data: l } = await t.post(e(c, "mail", "compose"), [], {
3835
+ params: { type: "new" },
3836
+ signal: s
3837
+ }), { data: u } = qo.parse(l), d = [r.name ?? "", r.email], f = new FormData();
3838
+ f.append("JSON", JSON.stringify({
3839
+ from: d,
3840
+ sender: d,
3841
+ to: [[i.name ?? "", i.email]],
3842
+ subject: a,
3843
+ content: o,
3844
+ contentType: "text/html"
3845
+ })), await t.post(e(c, "mail", "compose", u.id, "send"), f, { signal: s });
3846
+ }
3847
+ });
3848
+ //#endregion
3849
+ export { qo as i, Go as n, Ko as r, Yo as t };