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