@cityofportland/components-react 1.0.0-alpha.5 → 1.0.0-alpha.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/alert/alert.lib.css +2 -0
  2. package/dist/alert/{alert.d.ts → alert.lib.d.ts} +29 -15
  3. package/dist/alert/alert.lib.es.js +64 -0
  4. package/dist/box/{box.css → box.lib.css} +1 -0
  5. package/dist/box/{box.d.ts → box.lib.d.ts} +17 -17
  6. package/dist/box/box.lib.es.js +4 -0
  7. package/dist/box-B8x1KDnE.js +45 -0
  8. package/dist/button/button.lib.css +2 -0
  9. package/dist/button/{button.d.ts → button.lib.d.ts} +15 -46
  10. package/dist/button/button.lib.es.js +4 -0
  11. package/dist/button-rc1SIqSI.js +16 -0
  12. package/dist/card/card.lib.css +2 -0
  13. package/dist/card/card.lib.d.ts +134 -0
  14. package/dist/card/card.lib.es.js +44 -0
  15. package/dist/city-seal/{city-seal.css → city-seal.lib.css} +1 -0
  16. package/dist/city-seal/city-seal.lib.es.js +4 -0
  17. package/dist/city-seal-7i9vWvJO.js +11 -0
  18. package/dist/collection/collection.lib.css +2 -0
  19. package/dist/collection/collection.lib.d.ts +81 -0
  20. package/dist/collection/collection.lib.es.js +25 -0
  21. package/dist/footer/footer.lib.css +2 -0
  22. package/dist/footer/{footer.d.ts → footer.lib.d.ts} +3 -3
  23. package/dist/footer/footer.lib.es.js +2615 -0
  24. package/dist/header/header.lib.css +2 -0
  25. package/dist/header/{header.d.ts → header.lib.d.ts} +23 -23
  26. package/dist/header/header.lib.es.js +44 -0
  27. package/dist/icon/icon.lib.css +2 -0
  28. package/dist/icon/icon.lib.es.js +4 -0
  29. package/dist/icon-Du3bCwWr.js +21 -0
  30. package/dist/input/input.lib.css +2 -0
  31. package/dist/input/input.lib.d.ts +142 -0
  32. package/dist/input/input.lib.es.js +46 -0
  33. package/dist/tag/tag.lib.css +2 -0
  34. package/dist/tag/tag.lib.es.js +17 -0
  35. package/dist/utilities/utilities.lib.css +2 -0
  36. package/dist/utils-D8EDUGI1.js +7 -0
  37. package/package.json +40 -38
  38. package/dist/alert/alert.css +0 -1
  39. package/dist/alert/alert.es.js +0 -88
  40. package/dist/box/box.es.js +0 -56
  41. package/dist/button/button.css +0 -1
  42. package/dist/button/button.es.js +0 -40
  43. package/dist/card/card.css +0 -1
  44. package/dist/card/card.d.ts +0 -66
  45. package/dist/card/card.es.js +0 -75
  46. package/dist/city-seal/city-seal.es.js +0 -17
  47. package/dist/footer/footer.css +0 -1
  48. package/dist/footer/footer.es.js +0 -10987
  49. package/dist/header/header.css +0 -1
  50. package/dist/header/header.es.js +0 -44
  51. package/dist/icon/icon.css +0 -1
  52. package/dist/icon/icon.es.js +0 -31
  53. package/dist/index-IqW719eK.js +0 -1484
  54. package/dist/tag/tag.css +0 -1
  55. package/dist/tag/tag.es.js +0 -17
  56. package/dist/utilities/utilities.css +0 -1
  57. package/dist/utils-DpTd6iI4.js +0 -7
  58. /package/dist/city-seal/{city-seal.d.ts → city-seal.lib.d.ts} +0 -0
  59. /package/dist/icon/{icon.d.ts → icon.lib.d.ts} +0 -0
  60. /package/dist/tag/{tag.d.ts → tag.lib.d.ts} +0 -0
@@ -0,0 +1,2615 @@
1
+ import { t as Zr } from "../box-B8x1KDnE.js";
2
+ import { t as Ar } from "../city-seal-7i9vWvJO.js";
3
+ import H, { createContext as jr, useContext as Cr, useId as Mr } from "react";
4
+ import { jsx as Z, jsxs as B } from "react/jsx-runtime";
5
+ function Se(e, r = "|") {
6
+ return e.map((t) => sr(t)).join(r);
7
+ }
8
+ function ce(e, r) {
9
+ return typeof r == "bigint" ? r.toString() : r;
10
+ }
11
+ function Rr(e) {
12
+ return e == null;
13
+ }
14
+ function ve(e) {
15
+ const r = e.startsWith("^") ? 1 : 0, t = e.endsWith("$") ? e.length - 1 : e.length;
16
+ return e.slice(r, t);
17
+ }
18
+ function Dr(e, r) {
19
+ const t = e / r, n = Math.round(t), o = 4 * Number.EPSILON * Math.max(Math.abs(t), 1);
20
+ return Math.abs(t - n) < o ? 0 : t - n;
21
+ }
22
+ function _e(e, r, t) {
23
+ Object.defineProperty(e, r, {
24
+ value: t,
25
+ writable: !0,
26
+ enumerable: !0,
27
+ configurable: !0
28
+ });
29
+ }
30
+ function Fr(e) {
31
+ const r = Object.getOwnPropertyDescriptor(e, "shape");
32
+ return r?.get ? r.get.raw : r?.value;
33
+ }
34
+ function Jr(...e) {
35
+ const r = {};
36
+ for (const t of e) {
37
+ const n = Object.getOwnPropertyDescriptors(t);
38
+ Object.assign(r, n);
39
+ }
40
+ return Object.defineProperties({}, r);
41
+ }
42
+ var or = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
43
+ };
44
+ function Ee(e) {
45
+ return typeof e == "object" && e !== null && !Array.isArray(e);
46
+ }
47
+ function fe(e) {
48
+ if (Ee(e) === !1) return !1;
49
+ const r = e.constructor;
50
+ if (r === void 0 || typeof r != "function") return !0;
51
+ const t = r.prototype;
52
+ return !(Ee(t) === !1 || Object.prototype.hasOwnProperty.call(t, "isPrototypeOf") === !1);
53
+ }
54
+ function ir(e) {
55
+ return fe(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
56
+ }
57
+ function Lr(e, r, t) {
58
+ const n = new e._zod.constr(r ?? e._zod.def);
59
+ return (!r || t?.parent) && (n._zod.parent = e), n;
60
+ }
61
+ function O(e) {
62
+ const r = e;
63
+ if (!r) return {};
64
+ if (typeof r == "string") return { error: () => r };
65
+ if (r?.message !== void 0) {
66
+ if (r?.error !== void 0) throw new Error("Cannot specify both `message` and `error` params");
67
+ r.error = r.message;
68
+ }
69
+ return delete r.message, typeof r.error == "string" ? {
70
+ ...r,
71
+ error: () => r.error
72
+ } : r;
73
+ }
74
+ function sr(e) {
75
+ return typeof e == "bigint" ? e.toString() + "n" : typeof e == "string" ? `"${e}"` : `${e}`;
76
+ }
77
+ var ar = {
78
+ safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
79
+ int32: [-2147483648, 2147483647],
80
+ uint32: [0, 4294967295],
81
+ float32: [-34028234663852886e22, 34028234663852886e22],
82
+ float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
83
+ }, Ur = {
84
+ int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
85
+ uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
86
+ };
87
+ function T(e, r = 0) {
88
+ if (e.aborted === !0) return !0;
89
+ for (let t = r; t < e.issues.length; t++) if (e.issues[t]?.continue !== !0) return !0;
90
+ return !1;
91
+ }
92
+ function Vr(e, r = 0) {
93
+ if (e.aborted === !0) return !0;
94
+ for (let t = r; t < e.issues.length; t++) if (e.issues[t]?.continue === !1) return !0;
95
+ return !1;
96
+ }
97
+ function xr(e, r) {
98
+ return r.map((t) => {
99
+ var n;
100
+ return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
101
+ });
102
+ }
103
+ function D(e) {
104
+ return typeof e == "string" ? e : e?.message;
105
+ }
106
+ function Ne(e) {
107
+ const r = [];
108
+ for (const t of e ?? []) {
109
+ const n = t._zod.def;
110
+ if (!/_(length|size)$|_equals$/.test(n.check)) break;
111
+ const o = n.maximum ?? n.length ?? n.size;
112
+ o >= 0 && r.push([o, t]);
113
+ }
114
+ return r;
115
+ }
116
+ function le(e, r, t) {
117
+ var n;
118
+ for (let o = r; o < e.length; o++) (n = e[o]).schema ?? (n.schema = t);
119
+ }
120
+ function R(e, r, t) {
121
+ var n;
122
+ const o = e.inst?._zod?.traits;
123
+ o?.has("$ZodType") && (o.has("$ZodCheck") ? (n = e).schema ?? (n.schema = e.inst) : e.schema = e.inst);
124
+ const i = e.schema !== e.inst ? e.schema?._zod.def?.error : void 0, s = e.message ? e.message : D(e.inst?._zod.def?.error?.(e)) ?? D(i?.(e)) ?? D(r?.error?.(e)) ?? D(t.customError?.(e)) ?? D(t.localeError?.(e)) ?? "Invalid input", a = {};
125
+ for (const u of Object.keys(e))
126
+ u === "inst" || u === "schema" || u === "continue" || u === "input" || u === "__proto__" || (a[u] = e[u]);
127
+ return a.path ?? (a.path = []), a.message = s, r?.reportInput && (a.input = e.input), a;
128
+ }
129
+ var Br = /[\uD800-\uDBFF]/;
130
+ function ge(e) {
131
+ const r = e.length;
132
+ if (!Br.test(e)) return r;
133
+ let t = r;
134
+ for (let n = 0; n < r - 1; n++) (e.charCodeAt(n) & 64512) === 55296 && (e.charCodeAt(n + 1) & 64512) === 56320 && (t--, n++);
135
+ return t;
136
+ }
137
+ function be(e) {
138
+ return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
139
+ }
140
+ function Gr(e) {
141
+ const r = typeof e;
142
+ switch (r) {
143
+ case "number":
144
+ return Number.isNaN(e) ? "nan" : "number";
145
+ case "object": {
146
+ if (e === null) return "null";
147
+ if (Array.isArray(e)) return "array";
148
+ const t = e;
149
+ if (t && Object.getPrototypeOf(t) !== Object.prototype && "constructor" in t && t.constructor) return t.constructor.name;
150
+ }
151
+ }
152
+ return r;
153
+ }
154
+ function V(...e) {
155
+ const [r, t, n] = e;
156
+ return typeof r == "string" ? {
157
+ message: r,
158
+ code: "custom",
159
+ input: t,
160
+ inst: n
161
+ } : { ...r };
162
+ }
163
+ function Wr(e, r) {
164
+ for (const t in r) {
165
+ const n = Object.getOwnPropertyDescriptor(r, t);
166
+ n.get ? Object.defineProperty(e, t, {
167
+ ...n,
168
+ enumerable: !1
169
+ }) : Kr(e, t, n.value);
170
+ }
171
+ }
172
+ function N(e, r, t, n = !0) {
173
+ return Object.defineProperty(e, r, {
174
+ configurable: !0,
175
+ writable: !0,
176
+ enumerable: n,
177
+ value: t
178
+ }), t;
179
+ }
180
+ function ur(e, r, t) {
181
+ return N(e, r, t, !1);
182
+ }
183
+ // @__NO_SIDE_EFFECTS__
184
+ function qr(e, r) {
185
+ for (const t in e) {
186
+ const n = e[t];
187
+ Object.defineProperty(r, t, {
188
+ configurable: !0,
189
+ enumerable: !0,
190
+ get() {
191
+ return N(this, t, n(this));
192
+ },
193
+ set(o) {
194
+ N(this, t, o);
195
+ }
196
+ });
197
+ }
198
+ return r;
199
+ }
200
+ function Kr(e, r, t) {
201
+ Object.defineProperty(e, r, {
202
+ configurable: !0,
203
+ get() {
204
+ return this == null ? t : N(this, r, t.bind(this));
205
+ },
206
+ set(n) {
207
+ N(this, r, n);
208
+ }
209
+ });
210
+ }
211
+ var ne, E = !1, Yr = {
212
+ configurable: !0,
213
+ get() {
214
+ E = !0;
215
+ }
216
+ };
217
+ function _(e, r, t) {
218
+ const n = Object.getPrototypeOf(e._zod);
219
+ if (r in n && ne !== e._zod) {
220
+ ne = void 0;
221
+ return;
222
+ }
223
+ ne = e._zod, Object.defineProperty(n, r, {
224
+ configurable: !0,
225
+ get() {
226
+ Object.defineProperty(this, r, Yr);
227
+ const o = E;
228
+ E = !1;
229
+ try {
230
+ const i = t(this);
231
+ return E ? delete this[r] : Object.defineProperty(this, r, {
232
+ configurable: !0,
233
+ writable: !0,
234
+ value: i
235
+ }), E = E || o, i;
236
+ } catch (i) {
237
+ throw delete this[r], E = E || o, i;
238
+ }
239
+ },
240
+ set(o) {
241
+ Object.defineProperty(this, r, {
242
+ configurable: !0,
243
+ writable: !0,
244
+ value: o
245
+ });
246
+ }
247
+ });
248
+ }
249
+ var Xr = "~constantCatch";
250
+ function Hr(e) {
251
+ const r = () => e;
252
+ return r[Xr] = !0, r;
253
+ }
254
+ var $e, oe = {
255
+ value: void 0,
256
+ enumerable: !1
257
+ }, Te = "captureStackTrace" in Error ? Error : null;
258
+ function Qr(e) {
259
+ const r = Te;
260
+ if (r) {
261
+ const t = r.stackTraceLimit;
262
+ if (typeof t == "number") {
263
+ try {
264
+ r.stackTraceLimit = 0;
265
+ } catch {
266
+ return Te = null, new e();
267
+ }
268
+ try {
269
+ return new e();
270
+ } finally {
271
+ r.stackTraceLimit = t;
272
+ }
273
+ }
274
+ }
275
+ return new e();
276
+ }
277
+ // @__NO_SIDE_EFFECTS__
278
+ function h(e, r, t, n) {
279
+ const o = {};
280
+ function i(d) {
281
+ this.def = d, this.constr = l, this.traits = /* @__PURE__ */ new Set();
282
+ }
283
+ i.prototype = o;
284
+ const s = t, a = s && /* @__PURE__ */ new WeakSet();
285
+ function u(d, p) {
286
+ if (d._zod) {
287
+ if (d._zod.traits.has(e)) return;
288
+ } else {
289
+ oe.value = new i(p);
290
+ try {
291
+ Object.defineProperty(d, "_zod", oe);
292
+ } finally {
293
+ oe.value = void 0;
294
+ }
295
+ }
296
+ if (d._zod.traits.add(e), r(d, p), a) {
297
+ const v = Object.getPrototypeOf(d), P = d._zod.constr.prototype;
298
+ let g = v;
299
+ for (; g && g !== P; ) g = Object.getPrototypeOf(g);
300
+ const te = g ?? v;
301
+ a.has(te) || (a.add(te), Wr(te, s));
302
+ }
303
+ const m = l.prototype;
304
+ for (const v in m)
305
+ Object.prototype.hasOwnProperty.call(m, v) && (v in d || (d[v] = m[v].bind(d)));
306
+ }
307
+ const c = n?.Parent ?? Object;
308
+ class f extends c {
309
+ }
310
+ Object.defineProperty(f, "name", { value: e });
311
+ function l(d) {
312
+ const p = n?.Parent ? Qr(f) : this;
313
+ u(p, d);
314
+ const m = p._zod.deferred;
315
+ if (m) {
316
+ for (const P of m) P();
317
+ p._zod.deferred = void 0;
318
+ }
319
+ const v = globalThis.__zod_globalConfig?.postProcessor;
320
+ return v && v(p), p;
321
+ }
322
+ return Object.defineProperty(l, "init", { value: u }), Object.defineProperty(l, Symbol.hasInstance, { value: (d) => n?.Parent && d instanceof n.Parent ? !0 : d?._zod?.traits?.has(e) }), Object.defineProperty(l, "name", { value: e }), l;
323
+ }
324
+ var I = class extends Error {
325
+ constructor() {
326
+ super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
327
+ }
328
+ }, cr = class extends Error {
329
+ constructor(e) {
330
+ super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
331
+ }
332
+ };
333
+ ($e = globalThis).__zod_globalConfig ?? ($e.__zod_globalConfig = {});
334
+ var j = globalThis.__zod_globalConfig;
335
+ function $(e) {
336
+ return e && Object.assign(j, e), j;
337
+ }
338
+ function et() {
339
+ const e = this._zod;
340
+ return e.message ?? (e.message = JSON.stringify(e.def, ce, 2)), e.message;
341
+ }
342
+ function rt(e) {
343
+ this._zod.message = e;
344
+ }
345
+ var tt = {
346
+ get: et,
347
+ set: rt,
348
+ enumerable: !0,
349
+ configurable: !0
350
+ }, ie = {
351
+ value: void 0,
352
+ enumerable: !1
353
+ }, Ie = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]), nt = (e, r) => {
354
+ e.name = "$ZodError", ie.value = r, Object.defineProperty(e, "issues", ie), ie.value = void 0, Object.defineProperty(e, "message", tt);
355
+ const t = Object.getPrototypeOf(e);
356
+ Ie.has(t) || (Ie.add(t), Object.defineProperty(t, "toString", {
357
+ configurable: !0,
358
+ enumerable: !1,
359
+ get() {
360
+ const n = () => this.message;
361
+ return Object.defineProperty(this, "toString", {
362
+ value: n,
363
+ configurable: !0,
364
+ writable: !0
365
+ }), n;
366
+ },
367
+ set(n) {
368
+ Object.defineProperty(this, "toString", {
369
+ value: n,
370
+ configurable: !0,
371
+ writable: !0
372
+ });
373
+ }
374
+ }));
375
+ }, ot = /* @__PURE__ */ h("$ZodError", nt);
376
+ function it(e, r, t) {
377
+ return Object.prototype.hasOwnProperty.call(e, r) || (r === "__proto__" ? Object.defineProperty(e, r, {
378
+ value: t(),
379
+ writable: !0,
380
+ enumerable: !0,
381
+ configurable: !0
382
+ }) : e[r] = t()), e[r];
383
+ }
384
+ function st(e, r = (t) => t.message) {
385
+ const t = {}, n = [];
386
+ for (const o of e.issues) o.path.length > 0 ? it(t, o.path[0], () => []).push(r(o)) : n.push(r(o));
387
+ return {
388
+ formErrors: n,
389
+ fieldErrors: t
390
+ };
391
+ }
392
+ function at(e, r = (t) => t.message) {
393
+ const t = { _errors: [] }, n = (o, i = []) => {
394
+ for (const s of o.issues) if (s.code === "invalid_union" && s.errors.length) s.errors.map((a) => n({ issues: a }, [...i, ...s.path]));
395
+ else if (s.code === "invalid_key") n({ issues: s.issues }, [...i, ...s.path]);
396
+ else if (s.code === "invalid_element") n({ issues: s.issues }, [...i, ...s.path]);
397
+ else {
398
+ const a = [...i, ...s.path];
399
+ if (a.length === 0) t._errors.push(r(s));
400
+ else {
401
+ let u = t, c = 0;
402
+ for (; c < a.length; ) {
403
+ const f = a[c], l = c === a.length - 1;
404
+ if (f === "_errors") {
405
+ l && u._errors.push(r(s)), c++;
406
+ continue;
407
+ }
408
+ Object.prototype.hasOwnProperty.call(u, f) || Object.defineProperty(u, f, {
409
+ value: { _errors: [] },
410
+ enumerable: !0,
411
+ writable: !0,
412
+ configurable: !0
413
+ });
414
+ const d = u[f];
415
+ l && d._errors.push(r(s)), u = d, c++;
416
+ }
417
+ }
418
+ }
419
+ };
420
+ return n(e), t;
421
+ }
422
+ function re(e, r) {
423
+ return {
424
+ callee: r?.callee ?? e,
425
+ Err: r?.Err
426
+ };
427
+ }
428
+ var ye = (e) => {
429
+ const r = (t, n, o, i) => {
430
+ const s = o ? {
431
+ ...o,
432
+ async: !1
433
+ } : { async: !1 }, a = t._zod.run({
434
+ value: n,
435
+ issues: []
436
+ }, s);
437
+ if (a instanceof Promise) throw new I();
438
+ if (a.issues.length) {
439
+ const u = new (i?.Err ?? e)(a.issues.map((c) => R(c, s, $())));
440
+ throw or(u, i?.callee ?? r), u;
441
+ }
442
+ return a.value;
443
+ };
444
+ return r;
445
+ }, ze = (e) => {
446
+ const r = async (t, n, o, i) => {
447
+ const s = o ? {
448
+ ...o,
449
+ async: !0
450
+ } : { async: !0 };
451
+ let a = t._zod.run({
452
+ value: n,
453
+ issues: []
454
+ }, s);
455
+ if (a instanceof Promise && (a = await a), a.issues.length) {
456
+ const u = new (i?.Err ?? e)(a.issues.map((c) => R(c, s, $())));
457
+ throw or(u, i?.callee ?? r), u;
458
+ }
459
+ return a.value;
460
+ };
461
+ return r;
462
+ }, we = (e) => (r, t, n) => {
463
+ const o = n ? {
464
+ ...n,
465
+ async: !1
466
+ } : { async: !1 }, i = r._zod.run({
467
+ value: t,
468
+ issues: []
469
+ }, o);
470
+ if (i instanceof Promise) throw new I();
471
+ return i.issues.length ? fr(e, i.issues, o) : {
472
+ success: !0,
473
+ data: i.value
474
+ };
475
+ };
476
+ function fr(e, r, t) {
477
+ let n;
478
+ return {
479
+ success: !1,
480
+ get error() {
481
+ return n || (n = new e(r.map((o) => R(o, t, $()))), r = void 0, t = void 0), n;
482
+ },
483
+ set error(o) {
484
+ n = o, r = void 0, t = void 0;
485
+ }
486
+ };
487
+ }
488
+ var Oe = (e) => async (r, t, n) => {
489
+ const o = n ? {
490
+ ...n,
491
+ async: !0
492
+ } : { async: !0 };
493
+ let i = r._zod.run({
494
+ value: t,
495
+ issues: []
496
+ }, o);
497
+ return i instanceof Promise && (i = await i), i.issues.length ? fr(e, i.issues, o) : {
498
+ success: !0,
499
+ data: i.value
500
+ };
501
+ }, ut = /* @__PURE__ */ Symbol.for("zod.compile.invalid"), ct = /* @__PURE__ */ Symbol.for("zod.compile.fallback"), ft = ((e, r, t) => {
502
+ const n = e._zod.bag.validator;
503
+ if (n !== void 0) {
504
+ if (n(r) !== ut) return !0;
505
+ if (n.definite === !0 && t === void 0) return !1;
506
+ }
507
+ return lt(e, r, t);
508
+ });
509
+ function lt(e, r, t) {
510
+ const n = t ? {
511
+ ...t,
512
+ async: !1,
513
+ abortEarly: !0
514
+ } : {
515
+ async: !1,
516
+ abortEarly: !0
517
+ }, o = e._zod.bag.fallbackRun;
518
+ let i;
519
+ if (o ? (n[ct] = !0, i = o({
520
+ value: r,
521
+ issues: []
522
+ }, n)) : i = e._zod.run({
523
+ value: r,
524
+ issues: []
525
+ }, n), i instanceof Promise) throw new I();
526
+ return i.issues.length === 0;
527
+ }
528
+ var dt = async (e, r, t) => {
529
+ const n = t ? {
530
+ ...t,
531
+ async: !0,
532
+ abortEarly: !0
533
+ } : {
534
+ async: !0,
535
+ abortEarly: !0
536
+ };
537
+ let o = e._zod.run({
538
+ value: r,
539
+ issues: []
540
+ }, n);
541
+ return o instanceof Promise && (o = await o), o.issues.length === 0;
542
+ }, pt = (e) => {
543
+ const r = ye(e), t = (n, o, i, s) => {
544
+ const a = i ? {
545
+ ...i,
546
+ direction: "backward"
547
+ } : { direction: "backward" };
548
+ return r(n, o, a, re(t, s));
549
+ };
550
+ return t;
551
+ }, ht = (e) => {
552
+ const r = ye(e), t = (n, o, i, s) => r(n, o, i, re(t, s));
553
+ return t;
554
+ }, mt = (e) => {
555
+ const r = ze(e), t = async (n, o, i, s) => {
556
+ const a = i ? {
557
+ ...i,
558
+ direction: "backward"
559
+ } : { direction: "backward" };
560
+ return await r(n, o, a, re(t, s));
561
+ };
562
+ return t;
563
+ }, vt = (e) => {
564
+ const r = ze(e), t = async (n, o, i, s) => await r(n, o, i, re(t, s));
565
+ return t;
566
+ }, _t = (e) => (r, t, n) => {
567
+ const o = n ? {
568
+ ...n,
569
+ direction: "backward"
570
+ } : { direction: "backward" };
571
+ return we(e)(r, t, o);
572
+ }, gt = (e) => (r, t, n) => we(e)(r, t, n), bt = (e) => async (r, t, n) => {
573
+ const o = n ? {
574
+ ...n,
575
+ direction: "backward"
576
+ } : { direction: "backward" };
577
+ return Oe(e)(r, t, o);
578
+ }, yt = (e) => async (r, t, n) => Oe(e)(r, t, n);
579
+ var zt = /^-?\d+(?:\.\d+)?$/, S = /* @__PURE__ */ h("$ZodCheck", (e, r) => {
580
+ var t;
581
+ e._zod ?? (e._zod = {}), e._zod.def = r, (t = e._zod).onattach ?? (t.onattach = []);
582
+ }), ke = (e) => {
583
+ const r = e.value;
584
+ return !Rr(r) && r.length !== void 0;
585
+ }, Q = {
586
+ number: "number",
587
+ bigint: "bigint",
588
+ object: "date"
589
+ }, lr = /* @__PURE__ */ h("$ZodCheckLessThan", (e, r) => {
590
+ S.init(e, r);
591
+ const t = Q[typeof r.value];
592
+ e._zod.check = (n) => {
593
+ (r.inclusive ? n.value <= r.value : n.value < r.value) || n.issues.push({
594
+ origin: Q[typeof n.value] ?? t,
595
+ code: "too_big",
596
+ maximum: typeof r.value == "object" ? r.value.getTime() : r.value,
597
+ input: n.value,
598
+ inclusive: r.inclusive,
599
+ inst: e,
600
+ continue: !r.abort
601
+ });
602
+ };
603
+ }), dr = /* @__PURE__ */ h("$ZodCheckGreaterThan", (e, r) => {
604
+ S.init(e, r);
605
+ const t = Q[typeof r.value];
606
+ e._zod.check = (n) => {
607
+ (r.inclusive ? n.value >= r.value : n.value > r.value) || n.issues.push({
608
+ origin: Q[typeof n.value] ?? t,
609
+ code: "too_small",
610
+ minimum: typeof r.value == "object" ? r.value.getTime() : r.value,
611
+ input: n.value,
612
+ inclusive: r.inclusive,
613
+ inst: e,
614
+ continue: !r.abort
615
+ });
616
+ };
617
+ }), wt = /* @__PURE__ */ h("$ZodCheckMultipleOf", (e, r) => {
618
+ S.init(e, r), e._zod.check = (t) => {
619
+ if (typeof t.value != typeof r.value) throw new Error("Cannot mix number and bigint in multiple_of check.");
620
+ (typeof t.value == "bigint" ? r.value !== BigInt(0) && t.value % r.value === BigInt(0) : Dr(t.value, r.value) === 0) || t.issues.push({
621
+ origin: typeof t.value,
622
+ code: "not_multiple_of",
623
+ divisor: r.value,
624
+ input: t.value,
625
+ inst: e,
626
+ continue: !r.abort
627
+ });
628
+ };
629
+ }), Ot = /* @__PURE__ */ h("$ZodCheckNumberFormat", (e, r) => {
630
+ S.init(e, r), r.format = r.format || "float64";
631
+ const t = r.format?.includes("int"), n = t ? "int" : "number", [o, i] = ar[r.format];
632
+ e._zod.check = (s) => {
633
+ const a = s.value;
634
+ if (t) {
635
+ if (!Number.isInteger(a)) {
636
+ s.issues.push({
637
+ expected: n,
638
+ format: r.format,
639
+ code: "invalid_type",
640
+ continue: !1,
641
+ input: a,
642
+ inst: e
643
+ });
644
+ return;
645
+ }
646
+ if (!Number.isSafeInteger(a)) {
647
+ a > 0 ? s.issues.push({
648
+ input: a,
649
+ code: "too_big",
650
+ maximum: Number.MAX_SAFE_INTEGER,
651
+ note: "Integers must be within the safe integer range.",
652
+ inst: e,
653
+ origin: n,
654
+ inclusive: !0,
655
+ continue: !r.abort
656
+ }) : s.issues.push({
657
+ input: a,
658
+ code: "too_small",
659
+ minimum: Number.MIN_SAFE_INTEGER,
660
+ note: "Integers must be within the safe integer range.",
661
+ inst: e,
662
+ origin: n,
663
+ inclusive: !0,
664
+ continue: !r.abort
665
+ });
666
+ return;
667
+ }
668
+ }
669
+ a < o && s.issues.push({
670
+ origin: "number",
671
+ input: a,
672
+ code: "too_small",
673
+ minimum: o,
674
+ inclusive: !0,
675
+ inst: e,
676
+ continue: !r.abort
677
+ }), a > i && s.issues.push({
678
+ origin: "number",
679
+ input: a,
680
+ code: "too_big",
681
+ maximum: i,
682
+ inclusive: !0,
683
+ inst: e,
684
+ continue: !r.abort
685
+ });
686
+ };
687
+ }), kt = /* @__PURE__ */ h("$ZodCheckMaxLength", (e, r) => {
688
+ var t;
689
+ S.init(e, r), (t = e._zod.def).when ?? (t.when = ke), e._zod.check = (n) => {
690
+ const o = n.value, i = o.length;
691
+ if ((typeof o == "string" && i > r.maximum ? ge(o) : i) <= r.maximum) return;
692
+ const s = be(o);
693
+ n.issues.push({
694
+ origin: s,
695
+ code: "too_big",
696
+ maximum: r.maximum,
697
+ inclusive: !0,
698
+ input: o,
699
+ inst: e,
700
+ continue: !r.abort
701
+ });
702
+ };
703
+ }), Pt = /* @__PURE__ */ h("$ZodCheckMinLength", (e, r) => {
704
+ var t;
705
+ S.init(e, r), (t = e._zod.def).when ?? (t.when = ke), e._zod.check = (n) => {
706
+ const o = n.value, i = o.length;
707
+ if ((typeof o == "string" && i >= r.minimum && i < r.minimum * 2 ? ge(o) : i) >= r.minimum) return;
708
+ const s = be(o);
709
+ n.issues.push({
710
+ origin: s,
711
+ code: "too_small",
712
+ minimum: r.minimum,
713
+ inclusive: !0,
714
+ input: o,
715
+ inst: e,
716
+ continue: !r.abort
717
+ });
718
+ };
719
+ }), St = /* @__PURE__ */ h("$ZodCheckLengthEquals", (e, r) => {
720
+ var t;
721
+ S.init(e, r), (t = e._zod.def).when ?? (t.when = ke), e._zod.check = (n) => {
722
+ const o = n.value, i = o.length, s = typeof o == "string" && i >= r.length && i <= r.length * 2 ? ge(o) : i;
723
+ if (s === r.length) return;
724
+ const a = be(o), u = s > r.length;
725
+ n.issues.push({
726
+ origin: a,
727
+ ...u ? {
728
+ code: "too_big",
729
+ maximum: r.length
730
+ } : {
731
+ code: "too_small",
732
+ minimum: r.length
733
+ },
734
+ inclusive: !0,
735
+ exact: !0,
736
+ input: n.value,
737
+ inst: e,
738
+ continue: !r.abort
739
+ });
740
+ };
741
+ }), Et = /* @__PURE__ */ h("$ZodCheckOverwrite", (e, r) => {
742
+ S.init(e, r), e._zod.check = (t) => {
743
+ t.value = r.tx(t.value);
744
+ };
745
+ }), Nt = {
746
+ major: 4,
747
+ minor: 6,
748
+ patch: 7
749
+ }, z = /* @__PURE__ */ h("$ZodType", (e, r) => {
750
+ var t;
751
+ e ?? (e = {}), e._zod.def = r, e._zod.bag = e._zod.bag || {}, e._zod.version = Nt;
752
+ const n = e._zod.def.checks, o = e._zod.traits.has("$ZodCheck") ? [e, ...n ?? []] : n?.length ? [...n] : [];
753
+ for (const i of o) for (const s of i._zod.onattach) s(e);
754
+ if (o.length === 0)
755
+ (t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred?.push(() => {
756
+ e._zod.run = e._zod.parse;
757
+ });
758
+ else {
759
+ const i = (a, u, c) => {
760
+ if (a.memo) return a;
761
+ let f = T(a), l;
762
+ for (const d of u) {
763
+ if (d._zod.def.when) {
764
+ if (Vr(a) || !d._zod.def.when(a)) continue;
765
+ } else if (f) continue;
766
+ const p = a.issues.length, m = d._zod.check(a);
767
+ if (m instanceof Promise && c?.async === !1) throw new I();
768
+ if (l || m instanceof Promise) l = (l ?? Promise.resolve()).then(async () => {
769
+ await m, a.issues.length !== p && (le(a.issues, p, e), f || (f = T(a, p)));
770
+ });
771
+ else {
772
+ if (a.issues.length === p) continue;
773
+ le(a.issues, p, e), f || (f = T(a, p));
774
+ }
775
+ }
776
+ return l ? l.then(() => a) : a;
777
+ }, s = (a, u, c) => {
778
+ if (T(a))
779
+ return a.aborted = !0, a;
780
+ const f = i(u, o, c);
781
+ if (f instanceof Promise) {
782
+ if (c.async === !1) throw new I();
783
+ return f.then((l) => e._zod.parse(l, c));
784
+ }
785
+ return e._zod.parse(f, c);
786
+ };
787
+ e._zod.run = (a, u) => {
788
+ if (u.skipChecks) return e._zod.parse(a, u);
789
+ if (u.direction === "backward") {
790
+ const f = e._zod.parse({
791
+ value: a.value,
792
+ issues: []
793
+ }, {
794
+ ...u,
795
+ skipChecks: !0
796
+ });
797
+ return f instanceof Promise ? f.then((l) => s(l, a, u)) : s(f, a, u);
798
+ }
799
+ const c = e._zod.parse(a, u);
800
+ if (c instanceof Promise) {
801
+ if (u.async === !1) throw new I();
802
+ return c.then((f) => i(f, o, u));
803
+ }
804
+ return i(c, o, u);
805
+ };
806
+ }
807
+ }, {
808
+ get "~standard"() {
809
+ return ur(this, "~standard", hr(this));
810
+ },
811
+ set "~standard"(e) {
812
+ N(this, "~standard", e);
813
+ }
814
+ }), pr = (e, r) => e.issues.length ? { issues: e.issues.map((t) => R(t, r, $())) } : { value: e.value };
815
+ async function $t(e, r) {
816
+ const t = { async: !0 };
817
+ return pr(await e._zod.run({
818
+ value: r,
819
+ issues: []
820
+ }, t), t);
821
+ }
822
+ function hr(e) {
823
+ return {
824
+ validate: (r) => {
825
+ const t = { async: !1 };
826
+ try {
827
+ const n = e._zod.run({
828
+ value: r,
829
+ issues: []
830
+ }, t);
831
+ if (!(n instanceof Promise)) return pr(n, t);
832
+ } catch {
833
+ }
834
+ return $t(e, r);
835
+ },
836
+ vendor: "zod",
837
+ version: 1
838
+ };
839
+ }
840
+ var mr = /* @__PURE__ */ h("$ZodNumber", (e, r) => {
841
+ z.init(e, r), e._zod.pattern = zt, e._zod.parse = (t, n) => {
842
+ if (r.coerce) try {
843
+ t.value = Number(t.value);
844
+ } catch {
845
+ }
846
+ const o = t.value;
847
+ if (typeof o == "number" && !Number.isNaN(o) && Number.isFinite(o)) return t;
848
+ const i = typeof o == "number" ? Number.isNaN(o) ? "NaN" : Number.isFinite(o) ? void 0 : String(o) : void 0;
849
+ return t.issues.push({
850
+ expected: "number",
851
+ code: "invalid_type",
852
+ input: o,
853
+ inst: e,
854
+ ...i ? { received: i } : {}
855
+ }), t;
856
+ };
857
+ }), Tt = /* @__PURE__ */ h("$ZodNumberFormat", (e, r) => {
858
+ Ot.init(e, r), mr.init(e, r);
859
+ });
860
+ function It(e, r) {
861
+ const t = Ne(e._zod.def.checks);
862
+ if (!t.length) return;
863
+ const n = Math.min(...t.map((i) => i[0])), o = e._zod.parse;
864
+ e._zod.parse = (i, s) => {
865
+ const a = r(i.value);
866
+ if (a > n && !s?.skipChecks && s?.direction !== "backward") {
867
+ for (const [u, c] of Ne(e._zod.def.checks)) if (a > u && c._zod.def.when(i)) {
868
+ const f = i.issues.length;
869
+ return c._zod.check(i), i.issues[f].continue = !1, le(i.issues, f, e), i;
870
+ }
871
+ }
872
+ return o(i, s);
873
+ };
874
+ }
875
+ var Zt = (e) => Array.isArray(e) ? e.length : -1;
876
+ function Ze(e, r, t) {
877
+ e.issues.length && r.issues.push(...xr(t, e.issues)), r.value[t] = e.value;
878
+ }
879
+ var At = /* @__PURE__ */ h("$ZodArray", (e, r) => {
880
+ z.init(e, r);
881
+ const t = j.memoizer;
882
+ t?.attach(e), e._zod.parse = (n, o) => {
883
+ const i = n.value;
884
+ if (!Array.isArray(i))
885
+ return n.issues.push({
886
+ expected: "array",
887
+ code: "invalid_type",
888
+ input: i,
889
+ inst: e
890
+ }), n;
891
+ n.value = t ? t.alloc(e, n, Array(i.length), o) : Array(i.length);
892
+ const s = [], a = o?.abortEarly;
893
+ for (let u = 0; u < i.length; u++) {
894
+ const c = i[u], f = r.element._zod.run({
895
+ value: c,
896
+ issues: []
897
+ }, o);
898
+ if (f instanceof Promise) s.push(f.then((l) => Ze(l, n, u)));
899
+ else if (Ze(f, n, u), a && f.issues.length !== 0 && T(f)) break;
900
+ }
901
+ return s.length ? Promise.all(s).then(() => n) : n;
902
+ }, It(e, Zt);
903
+ });
904
+ function Ae(e, r, t, n) {
905
+ for (const i of e) if (i.issues.length === 0)
906
+ return r.value = i.value, r;
907
+ const o = e.filter((i) => !T(i));
908
+ return o.length === 1 ? (r.value = o[0].value, o[0]) : (r.issues.push({
909
+ code: "invalid_union",
910
+ input: r.value,
911
+ inst: t,
912
+ errors: e.map((i) => i.issues.map((s) => R(s, n, $())))
913
+ }), r);
914
+ }
915
+ var jt = /* @__PURE__ */ h("$ZodUnion", (e, r) => {
916
+ z.init(e, r), _(e, "optin", (n) => n.def.options.some((o) => o._zod.optin === "defaulted") ? "defaulted" : n.def.options.some((o) => o._zod.optin !== void 0) ? "optional" : void 0), _(e, "optout", (n) => n.def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), _(e, "values", (n) => {
917
+ if (n.def.options.every((o) => o._zod.values)) return new Set(n.def.options.flatMap((o) => Array.from(o._zod.values)));
918
+ }), _(e, "pattern", (n) => {
919
+ if (n.def.options.every((o) => o._zod.pattern)) {
920
+ const o = n.def.options.map((i) => i._zod.pattern);
921
+ return new RegExp(`^(${o.map((i) => ve(i.source)).join("|")})$`);
922
+ }
923
+ });
924
+ const t = r.options.length === 1 ? r.options[0]._zod.run : null;
925
+ e._zod.parse = (n, o) => {
926
+ if (t) return t(n, o);
927
+ let i = !1;
928
+ const s = [];
929
+ for (const a of r.options) {
930
+ const u = a._zod.run({
931
+ value: n.value,
932
+ issues: []
933
+ }, o);
934
+ if (u instanceof Promise)
935
+ s.push(u), i = !0;
936
+ else {
937
+ if (u.issues.length === 0) return u;
938
+ s.push(u);
939
+ }
940
+ }
941
+ return i ? Promise.all(s).then((a) => Ae(a, n, e, o)) : Ae(s, n, e, o);
942
+ };
943
+ }), Ct = /* @__PURE__ */ h("$ZodIntersection", (e, r) => {
944
+ z.init(e, r), e._zod.parse = (t, n) => {
945
+ const o = t.value, i = r.left._zod.run({
946
+ value: o,
947
+ issues: []
948
+ }, n), s = r.right._zod.run({
949
+ value: o,
950
+ issues: []
951
+ }, n);
952
+ return i instanceof Promise || s instanceof Promise ? Promise.all([i, s]).then(([a, u]) => je(t, a, u)) : je(t, i, s);
953
+ };
954
+ });
955
+ function de(e, r) {
956
+ if (e === r) return {
957
+ valid: !0,
958
+ data: e
959
+ };
960
+ if (e instanceof Date && r instanceof Date && +e == +r) return {
961
+ valid: !0,
962
+ data: e
963
+ };
964
+ if (fe(e) && fe(r)) {
965
+ const t = Object.keys(r), n = Object.keys(e).filter((i) => t.indexOf(i) !== -1), o = {
966
+ ...e,
967
+ ...r
968
+ };
969
+ Object.prototype.hasOwnProperty.call(o, "__proto__") && delete o.__proto__;
970
+ for (const i of n) {
971
+ if (i === "__proto__") continue;
972
+ const s = de(e[i], r[i]);
973
+ if (!s.valid) return {
974
+ valid: !1,
975
+ mergeErrorPath: [i, ...s.mergeErrorPath]
976
+ };
977
+ o[i] = s.data;
978
+ }
979
+ return {
980
+ valid: !0,
981
+ data: o
982
+ };
983
+ }
984
+ if (Array.isArray(e) && Array.isArray(r)) {
985
+ if (e.length !== r.length) return {
986
+ valid: !1,
987
+ mergeErrorPath: []
988
+ };
989
+ const t = [];
990
+ for (let n = 0; n < e.length; n++) {
991
+ const o = e[n], i = r[n], s = de(o, i);
992
+ if (!s.valid) return {
993
+ valid: !1,
994
+ mergeErrorPath: [n, ...s.mergeErrorPath]
995
+ };
996
+ t.push(s.data);
997
+ }
998
+ return {
999
+ valid: !0,
1000
+ data: t
1001
+ };
1002
+ }
1003
+ return {
1004
+ valid: !1,
1005
+ mergeErrorPath: []
1006
+ };
1007
+ }
1008
+ function je(e, r, t) {
1009
+ const n = /* @__PURE__ */ new Map();
1010
+ let o;
1011
+ const i = /* @__PURE__ */ new Map(), s = (c, f) => {
1012
+ let l;
1013
+ if (c.code === "unrecognized_keys" && !c.path?.length)
1014
+ o ?? (o = c), l = c.keys;
1015
+ else if (c.code === "invalid_key" && c.origin === "record" && c.path?.length === 1) {
1016
+ const d = String(c.path[0]);
1017
+ i.has(d) || i.set(d, c), l = [d];
1018
+ } else return !1;
1019
+ for (const d of l)
1020
+ n.has(d) || n.set(d, {}), n.get(d)[f] = !0;
1021
+ return !0;
1022
+ };
1023
+ for (const c of r.issues) s(c, "l") || e.issues.push(c);
1024
+ for (const c of t.issues) s(c, "r") || e.issues.push(c);
1025
+ const a = [...n].filter(([, c]) => c.l && c.r).map(([c]) => c);
1026
+ if (a.length) {
1027
+ const c = o ? a.filter((f) => o.keys.includes(f)) : [];
1028
+ c.length && e.issues.push({
1029
+ ...o,
1030
+ keys: c
1031
+ });
1032
+ for (const f of a) !c.includes(f) && i.has(f) && e.issues.push(i.get(f));
1033
+ }
1034
+ const u = de(r.value, t.value);
1035
+ if (!u.valid) {
1036
+ if (T(e)) return e;
1037
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(u.mergeErrorPath)}`);
1038
+ }
1039
+ return e.value = u.data, e;
1040
+ }
1041
+ var Mt = /* @__PURE__ */ h("$ZodTransform", (e, r) => {
1042
+ z.init(e, r), e._zod.optin = "optional", j.memoizer?.guard(e), e._zod.parse = (t, n) => {
1043
+ if (n.direction === "backward") throw new cr(e.constructor.name);
1044
+ const o = r.transform(t.value, t);
1045
+ if (n.async) return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (t.value = i, t));
1046
+ if (o instanceof Promise) throw new I();
1047
+ return t.value = o, t;
1048
+ };
1049
+ });
1050
+ function Ce(e, r) {
1051
+ return e.value = r.issues.length ? void 0 : r.value, e;
1052
+ }
1053
+ var vr = /* @__PURE__ */ h("$ZodOptional", (e, r) => {
1054
+ z.init(e, r), _(e, "optin", (t) => t.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", _(e, "values", (t) => {
1055
+ const n = t.def.innerType._zod.values;
1056
+ return n ? /* @__PURE__ */ new Set([...n, void 0]) : void 0;
1057
+ }), _(e, "pattern", (t) => {
1058
+ const n = t.def.innerType._zod.pattern;
1059
+ return n ? new RegExp(`^(${ve(n.source)})?$`) : void 0;
1060
+ }), e._zod.parse = (t, n) => {
1061
+ if (t.value === void 0) {
1062
+ if (r.innerType._zod.optin !== "defaulted") return t;
1063
+ const o = r.innerType._zod.run({
1064
+ value: t.value,
1065
+ issues: []
1066
+ }, n);
1067
+ return o instanceof Promise ? o.then((i) => Ce(t, i)) : Ce(t, o);
1068
+ }
1069
+ return r.innerType._zod.run(t, n);
1070
+ };
1071
+ }), Rt = /* @__PURE__ */ h("$ZodExactOptional", (e, r) => {
1072
+ vr.init(e, r), _(e, "values", (t) => t.def.innerType._zod.values), _(e, "pattern", (t) => t.def.innerType._zod.pattern), e._zod.parse = (t, n) => r.innerType._zod.run(t, n);
1073
+ }), Dt = /* @__PURE__ */ h("$ZodNullable", (e, r) => {
1074
+ z.init(e, r), _(e, "optin", (t) => t.def.innerType._zod.optin), _(e, "optout", (t) => t.def.innerType._zod.optout), _(e, "pattern", (t) => {
1075
+ const n = t.def.innerType._zod.pattern;
1076
+ return n ? new RegExp(`^(${ve(n.source)}|null)$`) : void 0;
1077
+ }), _(e, "values", (t) => t.def.innerType._zod.values ? /* @__PURE__ */ new Set([...t.def.innerType._zod.values, null]) : void 0), e._zod.parse = (t, n) => t.value === null ? t : r.innerType._zod.run(t, n);
1078
+ }), Ft = /* @__PURE__ */ h("$ZodDefault", (e, r) => {
1079
+ z.init(e, r), e._zod.optin = "defaulted", _(e, "values", (t) => t.def.innerType._zod.values), e._zod.parse = (t, n) => {
1080
+ if (n.direction === "backward") return r.innerType._zod.run(t, n);
1081
+ if (t.value === void 0)
1082
+ return t.value = r.defaultValue, t;
1083
+ const o = r.innerType._zod.run(t, n);
1084
+ return o instanceof Promise ? o.then((i) => Me(i, r)) : Me(o, r);
1085
+ };
1086
+ });
1087
+ function Me(e, r) {
1088
+ return e.value === void 0 && (e.value = r.defaultValue), e;
1089
+ }
1090
+ var Jt = /* @__PURE__ */ h("$ZodPrefault", (e, r) => {
1091
+ z.init(e, r), e._zod.optin = "defaulted", _(e, "values", (t) => t.def.innerType._zod.values), e._zod.parse = (t, n) => (n.direction === "backward" || t.value === void 0 && (t.value = r.defaultValue), r.innerType._zod.run(t, n));
1092
+ }), Lt = /* @__PURE__ */ h("$ZodNonOptional", (e, r) => {
1093
+ z.init(e, r), _(e, "values", (t) => {
1094
+ const n = t.def.innerType._zod.values;
1095
+ return n ? new Set([...n].filter((o) => o !== void 0)) : void 0;
1096
+ }), e._zod.parse = (t, n) => {
1097
+ const o = r.innerType._zod.run(t, n);
1098
+ return o instanceof Promise ? o.then((i) => Re(i, e)) : Re(o, e);
1099
+ };
1100
+ });
1101
+ function Re(e, r) {
1102
+ return !e.issues.length && e.value === void 0 && e.issues.push({
1103
+ code: "invalid_type",
1104
+ expected: "nonoptional",
1105
+ input: e.value,
1106
+ inst: r
1107
+ }), e;
1108
+ }
1109
+ function De(e, r, t, n) {
1110
+ return r.issues.length ? (e.value = t.catchValue({
1111
+ ...r,
1112
+ value: e.value,
1113
+ error: { issues: r.issues.map((o) => R(o, n, $())) },
1114
+ input: e.value
1115
+ }), e) : (e.value = r.value, r.memo && (e.memo = !0), e);
1116
+ }
1117
+ var Ut = /* @__PURE__ */ h("$ZodCatch", (e, r) => {
1118
+ z.init(e, r), _(e, "optin", (t) => t.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), _(e, "optout", (t) => t.def.innerType._zod.optout), _(e, "values", (t) => t.def.innerType._zod.values), e._zod.parse = (t, n) => {
1119
+ if (n.direction === "backward") return r.innerType._zod.run(t, n);
1120
+ const o = r.innerType._zod.run({
1121
+ value: t.value,
1122
+ issues: []
1123
+ }, n);
1124
+ return o instanceof Promise ? o.then((i) => De(t, i, r, n)) : De(t, o, r, n);
1125
+ };
1126
+ }), Vt = /* @__PURE__ */ h("$ZodPipe", (e, r) => {
1127
+ z.init(e, r), _(e, "values", (t) => t.def.in._zod.values), _(e, "optin", (t) => t.def.in._zod.optin), _(e, "optout", (t) => t.def.out._zod.optout), _(e, "propValues", (t) => t.def.in._zod.propValues), e._zod.parse = (t, n) => {
1128
+ if (n.direction === "backward") {
1129
+ const i = r.out._zod.run(t, n);
1130
+ return i instanceof Promise ? i.then((s) => G(s, r.in, n)) : G(i, r.in, n);
1131
+ }
1132
+ const o = r.in._zod.run(t, n);
1133
+ return o instanceof Promise ? o.then((i) => G(i, r.out, n)) : G(o, r.out, n);
1134
+ };
1135
+ });
1136
+ function G(e, r, t) {
1137
+ return e.issues.some((n) => n.code !== "unrecognized_keys") ? (e.aborted = !0, e) : r._zod.run({
1138
+ value: e.value,
1139
+ issues: e.issues
1140
+ }, t);
1141
+ }
1142
+ var xt = /* @__PURE__ */ h("$ZodReadonly", (e, r) => {
1143
+ z.init(e, r), _(e, "propValues", (t) => t.def.innerType._zod.propValues), _(e, "values", (t) => t.def.innerType._zod.values), _(e, "optin", (t) => t.def.innerType?._zod?.optin), _(e, "optout", (t) => t.def.innerType?._zod?.optout), e._zod.parse = (t, n) => {
1144
+ if (n.direction === "backward") return r.innerType._zod.run(t, n);
1145
+ const o = r.innerType._zod.run(t, n);
1146
+ return o instanceof Promise ? o.then(Fe) : Fe(o);
1147
+ };
1148
+ });
1149
+ function Fe(e) {
1150
+ return e.memo || (e.value = Object.freeze(e.value)), e;
1151
+ }
1152
+ var Bt = /* @__PURE__ */ h("$ZodCustom", (e, r) => {
1153
+ S.init(e, r), z.init(e, r), e._zod.parse = (t, n) => t, e._zod.check = (t) => {
1154
+ const n = t.value, o = r.fn(n);
1155
+ if (o instanceof Promise) return o.then((i) => Je(i, t, n, e));
1156
+ Je(o, t, n, e);
1157
+ };
1158
+ });
1159
+ function Je(e, r, t, n) {
1160
+ if (!e) {
1161
+ const o = {
1162
+ code: "custom",
1163
+ input: t,
1164
+ inst: n,
1165
+ path: [...n._zod.def.path ?? []],
1166
+ continue: !n._zod.def.abort
1167
+ };
1168
+ n._zod.def.params && (o.params = n._zod.def.params), r.issues.push(V(o));
1169
+ }
1170
+ }
1171
+ var Gt = class extends Error {
1172
+ constructor() {
1173
+ super("Cannot parse a reference cycle that closes through a transform"), this.name = "ZodCyclicError";
1174
+ }
1175
+ }, pe = "~memo", Le = [];
1176
+ function _r(e) {
1177
+ return e !== null && typeof e == "object";
1178
+ }
1179
+ function se(e) {
1180
+ return e.map((r) => r.path ? {
1181
+ ...r,
1182
+ path: r.path.slice()
1183
+ } : { ...r });
1184
+ }
1185
+ var gr = /* @__PURE__ */ new WeakMap(), F = 0, Y = 1, L = 2;
1186
+ function X(e, r, t) {
1187
+ const n = gr.get(e);
1188
+ if (n !== void 0) return n ? L : F;
1189
+ if (r.has(e)) return L;
1190
+ r.add(e);
1191
+ let o = F;
1192
+ const i = (c) => {
1193
+ if (o !== L && c?._zod) {
1194
+ const f = X(c, r, t);
1195
+ f > o && (o = f);
1196
+ }
1197
+ }, s = (c, f) => {
1198
+ let l = F;
1199
+ for (const d of Reflect.ownKeys(c)) {
1200
+ const p = Object.getOwnPropertyDescriptor(c, d);
1201
+ if (f && !p.enumerable) continue;
1202
+ const m = p.get ? Y : p.value?._zod ? X(p.value, r, t) : F;
1203
+ m > l && (l = m);
1204
+ }
1205
+ return l;
1206
+ }, a = (c) => {
1207
+ c > o && (o = c);
1208
+ }, u = e._zod.def;
1209
+ switch (u.type) {
1210
+ case "object": {
1211
+ const c = Fr(u);
1212
+ a(c ? s(c, !0) : Y), i(u.catchall);
1213
+ break;
1214
+ }
1215
+ case "array":
1216
+ i(u.element);
1217
+ break;
1218
+ case "tuple":
1219
+ for (const c of u.items) i(c);
1220
+ i(u.rest);
1221
+ break;
1222
+ case "record":
1223
+ case "map":
1224
+ i(u.keyType), i(u.valueType);
1225
+ break;
1226
+ case "set":
1227
+ i(u.valueType);
1228
+ break;
1229
+ case "union":
1230
+ for (const c of u.options) i(c);
1231
+ break;
1232
+ case "intersection":
1233
+ i(u.left), i(u.right);
1234
+ break;
1235
+ case "optional":
1236
+ case "nullable":
1237
+ case "default":
1238
+ case "prefault":
1239
+ case "catch":
1240
+ case "readonly":
1241
+ case "nonoptional":
1242
+ case "promise":
1243
+ case "success":
1244
+ i(u.innerType);
1245
+ break;
1246
+ case "pipe":
1247
+ i(u.in), i(u.out);
1248
+ break;
1249
+ case "function":
1250
+ i(u.input), i(u.output);
1251
+ break;
1252
+ case "lazy": {
1253
+ const c = u._cachedInner ?? (t ? e._zod.innerType : void 0);
1254
+ a(c ? X(c, r, !1) : Y);
1255
+ break;
1256
+ }
1257
+ case "template_literal":
1258
+ case "string":
1259
+ case "number":
1260
+ case "int":
1261
+ case "boolean":
1262
+ case "bigint":
1263
+ case "symbol":
1264
+ case "undefined":
1265
+ case "null":
1266
+ case "void":
1267
+ case "never":
1268
+ case "any":
1269
+ case "unknown":
1270
+ case "date":
1271
+ case "nan":
1272
+ case "enum":
1273
+ case "literal":
1274
+ case "file":
1275
+ case "transform":
1276
+ case "custom":
1277
+ break;
1278
+ default:
1279
+ for (const c in u) {
1280
+ const f = Object.getOwnPropertyDescriptor(u, c);
1281
+ if (!f || f.get) continue;
1282
+ const l = f.value;
1283
+ if (!(!l || typeof l != "object")) {
1284
+ if (l._zod) i(l);
1285
+ else if (Array.isArray(l)) for (const d of l) i(d);
1286
+ }
1287
+ }
1288
+ }
1289
+ return r.delete(e), Wt(e, o);
1290
+ }
1291
+ function Wt(e, r) {
1292
+ return r !== Y && gr.set(e, r === L), r;
1293
+ }
1294
+ function qt(e, r) {
1295
+ let t = e.buckets.get(r);
1296
+ return t || (t = /* @__PURE__ */ new WeakMap(), e.buckets.set(r, t)), t;
1297
+ }
1298
+ var W, q = [], Kt = {
1299
+ alloc(e, r, t) {
1300
+ const n = W;
1301
+ if (!n) return t;
1302
+ W = void 0;
1303
+ const o = {
1304
+ value: t,
1305
+ issues: null
1306
+ };
1307
+ return n.set(r.value, o), q.push(o), t;
1308
+ },
1309
+ guard(e) {
1310
+ var r;
1311
+ (r = e._zod).deferred ?? (r.deferred = []), e._zod.deferred.push(() => {
1312
+ const t = e._zod.parse, n = (o, i) => {
1313
+ if (i.direction !== "backward" && Xt(i, o.value)) throw new Gt();
1314
+ return t(o, i);
1315
+ };
1316
+ e._zod.parse = n, e._zod.run === t && (e._zod.run = n);
1317
+ });
1318
+ },
1319
+ attach(e) {
1320
+ var r;
1321
+ let t, n = !1, o, i;
1322
+ (r = e._zod).deferred ?? (r.deferred = []), e._zod.deferred.push(() => {
1323
+ const s = e._zod.parse, a = (u, c) => {
1324
+ if (t === void 0) {
1325
+ const g = X(e, /* @__PURE__ */ new Set(), !1);
1326
+ if (g === F)
1327
+ return e._zod.parse = s, e._zod.run === a && (e._zod.run = s), s(u, c);
1328
+ g === L || n ? t = !0 : n = !0;
1329
+ }
1330
+ const f = u.value;
1331
+ if (!_r(f)) return s(u, c);
1332
+ let l = c[pe];
1333
+ l || (l = {
1334
+ buckets: /* @__PURE__ */ new WeakMap(),
1335
+ backEdges: void 0
1336
+ }, c[pe] = l);
1337
+ let d;
1338
+ o === c ? d = i : (d = qt(l, e), o = c, i = d);
1339
+ const p = d.get(f);
1340
+ if (p)
1341
+ return u.value = p.value, p.issues ? p.issues.length && u.issues.push(...se(p.issues)) : (u.memo = !0, l.backEdges ?? (l.backEdges = /* @__PURE__ */ new WeakSet()), l.backEdges.add(p.value)), u;
1342
+ W = d;
1343
+ const m = q.length, v = s(u, c);
1344
+ W = void 0;
1345
+ const P = q.length > m ? q.pop() : void 0;
1346
+ return v instanceof Promise ? v.then((g) => (P && (P.issues = g.issues.length ? se(g.issues) : Le), g)) : (P && (P.issues = v.issues.length ? se(v.issues) : Le), v);
1347
+ };
1348
+ e._zod.parse = a, e._zod.run === s && (e._zod.run = a);
1349
+ });
1350
+ }
1351
+ };
1352
+ function Yt() {
1353
+ return Kt;
1354
+ }
1355
+ function Xt(e, r) {
1356
+ const t = e[pe]?.backEdges;
1357
+ return t !== void 0 && _r(r) && t.has(r);
1358
+ }
1359
+ var Ht = () => {
1360
+ const e = {
1361
+ string: {
1362
+ unit: "characters",
1363
+ verb: "to have"
1364
+ },
1365
+ file: {
1366
+ unit: "bytes",
1367
+ verb: "to have"
1368
+ },
1369
+ array: {
1370
+ unit: "items",
1371
+ verb: "to have"
1372
+ },
1373
+ set: {
1374
+ unit: "items",
1375
+ verb: "to have"
1376
+ },
1377
+ map: {
1378
+ unit: "entries",
1379
+ verb: "to have"
1380
+ }
1381
+ };
1382
+ function r(i) {
1383
+ return e[i] ?? null;
1384
+ }
1385
+ const t = {
1386
+ regex: "input",
1387
+ email: "email address",
1388
+ url: "URL",
1389
+ emoji: "emoji",
1390
+ uuid: "UUID",
1391
+ uuidv4: "UUIDv4",
1392
+ uuidv6: "UUIDv6",
1393
+ nanoid: "nanoid",
1394
+ guid: "GUID",
1395
+ cuid: "cuid",
1396
+ cuid2: "cuid2",
1397
+ ulid: "ULID",
1398
+ xid: "XID",
1399
+ ksuid: "KSUID",
1400
+ datetime: "ISO datetime",
1401
+ date: "ISO date",
1402
+ time: "ISO time",
1403
+ duration: "ISO duration",
1404
+ ipv4: "IPv4 address",
1405
+ ipv6: "IPv6 address",
1406
+ mac: "MAC address",
1407
+ cidrv4: "IPv4 range",
1408
+ cidrv6: "IPv6 range",
1409
+ base64: "base64-encoded string",
1410
+ base64url: "base64url-encoded string",
1411
+ json_string: "JSON string",
1412
+ e164: "E.164 number",
1413
+ currency_code: "currency code",
1414
+ credit_card: "credit card number",
1415
+ iban: "IBAN",
1416
+ jwt: "JWT",
1417
+ template_literal: "input"
1418
+ }, n = { nan: "NaN" };
1419
+ function o(i, s) {
1420
+ return i === "number" && typeof s == "number" && !Number.isFinite(s) ? String(s) : n[i] ?? i;
1421
+ }
1422
+ return (i) => {
1423
+ switch (i.code) {
1424
+ case "invalid_type":
1425
+ return `Invalid input: expected ${o(i.expected)}, received ${o(Gr(i.input), i.input)}`;
1426
+ case "invalid_value":
1427
+ return i.values.length === 1 ? `Invalid input: expected ${sr(i.values[0])}` : `Invalid option: expected one of ${Se(i.values, "|")}`;
1428
+ case "too_big": {
1429
+ const s = i.exact ? "exactly " : i.inclusive ? "<=" : "<", a = r(i.origin);
1430
+ return a ? `Too big: expected ${i.origin ?? "value"} to have ${s}${i.maximum.toString()} ${a.unit ?? "elements"}` : `Too big: expected ${i.origin ?? "value"} to be ${s}${i.maximum.toString()}`;
1431
+ }
1432
+ case "too_small": {
1433
+ const s = i.exact ? "exactly " : i.inclusive ? ">=" : ">", a = r(i.origin);
1434
+ return a ? `Too small: expected ${i.origin} to have ${s}${i.minimum.toString()} ${a.unit}` : `Too small: expected ${i.origin} to be ${s}${i.minimum.toString()}`;
1435
+ }
1436
+ case "invalid_format": {
1437
+ const s = i;
1438
+ return s.format === "starts_with" ? `Invalid string: must start with "${s.prefix}"` : s.format === "ends_with" ? `Invalid string: must end with "${s.suffix}"` : s.format === "includes" ? `Invalid string: must include "${s.includes}"` : s.format === "regex" ? `Invalid string: must match pattern ${s.pattern}` : `Invalid ${t[s.format] ?? i.format}`;
1439
+ }
1440
+ case "not_multiple_of":
1441
+ return `Invalid number: must be a multiple of ${i.divisor}`;
1442
+ case "unrecognized_keys":
1443
+ return `Unrecognized key${i.keys.length > 1 ? "s" : ""}: ${Se(i.keys, ", ")}`;
1444
+ case "invalid_key":
1445
+ return `Invalid key in ${i.origin}`;
1446
+ case "invalid_union":
1447
+ return i.options && Array.isArray(i.options) && i.options.length > 0 ? `Invalid discriminator value. Expected ${i.options.map((s) => `'${s}'`).join(" | ")}` : i.inclusive === !1 ? "Invalid input: more than one option matched" : "Invalid input";
1448
+ case "invalid_element":
1449
+ return `Invalid value in ${i.origin}`;
1450
+ default:
1451
+ return "Invalid input";
1452
+ }
1453
+ };
1454
+ };
1455
+ function Qt() {
1456
+ return { localeError: Ht() };
1457
+ }
1458
+ var Ue, en = class {
1459
+ constructor() {
1460
+ this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1461
+ }
1462
+ add(e, ...r) {
1463
+ const t = r[0];
1464
+ return this._map.set(e, t), t && typeof t == "object" && "id" in t && this._idmap.set(t.id, e), this;
1465
+ }
1466
+ clear() {
1467
+ return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
1468
+ }
1469
+ remove(e) {
1470
+ const r = this._map.get(e);
1471
+ return r && typeof r == "object" && "id" in r && this._idmap.delete(r.id), this._map.delete(e), this;
1472
+ }
1473
+ get(e) {
1474
+ const r = e._zod.parent;
1475
+ if (r) {
1476
+ const t = { ...this.get(r) ?? {} };
1477
+ delete t.id;
1478
+ const n = {
1479
+ ...t,
1480
+ ...this._map.get(e)
1481
+ };
1482
+ return Object.keys(n).length ? n : void 0;
1483
+ }
1484
+ return this._map.get(e);
1485
+ }
1486
+ has(e) {
1487
+ return this._map.has(e);
1488
+ }
1489
+ };
1490
+ function rn() {
1491
+ return new en();
1492
+ }
1493
+ (Ue = globalThis).__zod_globalRegistry ?? (Ue.__zod_globalRegistry = rn());
1494
+ var J = globalThis.__zod_globalRegistry;
1495
+ // @__NO_SIDE_EFFECTS__
1496
+ function tn(e, r) {
1497
+ return new e({
1498
+ type: "number",
1499
+ check: "number_format",
1500
+ abort: !1,
1501
+ format: "safeint",
1502
+ ...O(r)
1503
+ });
1504
+ }
1505
+ // @__NO_SIDE_EFFECTS__
1506
+ function Ve(e, r) {
1507
+ return new lr({
1508
+ check: "less_than",
1509
+ ...O(r),
1510
+ value: e,
1511
+ inclusive: !1
1512
+ });
1513
+ }
1514
+ // @__NO_SIDE_EFFECTS__
1515
+ function ae(e, r) {
1516
+ return new lr({
1517
+ check: "less_than",
1518
+ ...O(r),
1519
+ value: e,
1520
+ inclusive: !0
1521
+ });
1522
+ }
1523
+ // @__NO_SIDE_EFFECTS__
1524
+ function xe(e, r) {
1525
+ return new dr({
1526
+ check: "greater_than",
1527
+ ...O(r),
1528
+ value: e,
1529
+ inclusive: !1
1530
+ });
1531
+ }
1532
+ // @__NO_SIDE_EFFECTS__
1533
+ function ue(e, r) {
1534
+ return new dr({
1535
+ check: "greater_than",
1536
+ ...O(r),
1537
+ value: e,
1538
+ inclusive: !0
1539
+ });
1540
+ }
1541
+ // @__NO_SIDE_EFFECTS__
1542
+ function Be(e, r) {
1543
+ return new wt({
1544
+ check: "multiple_of",
1545
+ ...O(r),
1546
+ value: e
1547
+ });
1548
+ }
1549
+ // @__NO_SIDE_EFFECTS__
1550
+ function nn(e, r) {
1551
+ return new kt({
1552
+ check: "max_length",
1553
+ ...O(r),
1554
+ maximum: e
1555
+ });
1556
+ }
1557
+ // @__NO_SIDE_EFFECTS__
1558
+ function Ge(e, r) {
1559
+ return new Pt({
1560
+ check: "min_length",
1561
+ ...O(r),
1562
+ minimum: e
1563
+ });
1564
+ }
1565
+ // @__NO_SIDE_EFFECTS__
1566
+ function on(e, r) {
1567
+ return new St({
1568
+ check: "length_equals",
1569
+ ...O(r),
1570
+ length: e
1571
+ });
1572
+ }
1573
+ // @__NO_SIDE_EFFECTS__
1574
+ function sn(e) {
1575
+ return new Et({
1576
+ check: "overwrite",
1577
+ tx: e
1578
+ });
1579
+ }
1580
+ // @__NO_SIDE_EFFECTS__
1581
+ function an(e, r, t) {
1582
+ return new e({
1583
+ type: "array",
1584
+ element: r,
1585
+ ...O(t)
1586
+ });
1587
+ }
1588
+ // @__NO_SIDE_EFFECTS__
1589
+ function un(e, r, t) {
1590
+ return new e({
1591
+ type: "custom",
1592
+ check: "custom",
1593
+ fn: r,
1594
+ ...O(t)
1595
+ });
1596
+ }
1597
+ // @__NO_SIDE_EFFECTS__
1598
+ function cn(e, r) {
1599
+ const t = /* @__PURE__ */ fn((n) => (n.addIssue = (o) => {
1600
+ if (typeof o == "string") n.issues.push(V(o, n.value, t._zod.def));
1601
+ else {
1602
+ const i = o;
1603
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), "input" in i || (i.input = n.value), i.inst ?? (i.inst = t), i.continue ?? (i.continue = !t._zod.def.abort), n.issues.push(V(i));
1604
+ }
1605
+ }, e(n.value, n)), r);
1606
+ return t;
1607
+ }
1608
+ // @__NO_SIDE_EFFECTS__
1609
+ function fn(e, r) {
1610
+ const t = new S({
1611
+ check: "custom",
1612
+ ...O(r)
1613
+ });
1614
+ return t._zod.check = e, t;
1615
+ }
1616
+ function U(e, ...r) {
1617
+ for (const t of r) for (const n of Reflect.ownKeys(t)) Object.prototype.propertyIsEnumerable.call(t, n) && _e(e, n, t[n]);
1618
+ return e;
1619
+ }
1620
+ function br(e) {
1621
+ let r = e?.target ?? "draft-2020-12";
1622
+ return r === "draft-4" && (r = "draft-04"), r === "draft-7" && (r = "draft-07"), {
1623
+ processors: e.processors ?? {},
1624
+ metadataRegistry: e?.metadata ?? J,
1625
+ target: r,
1626
+ unrepresentable: e?.unrepresentable ?? "throw",
1627
+ override: e?.override ?? (() => {
1628
+ }),
1629
+ io: e?.io ?? "output",
1630
+ counter: 0,
1631
+ seen: /* @__PURE__ */ new Map(),
1632
+ sharedDefsExtractedFor: void 0,
1633
+ sharedEmitDoneFor: void 0,
1634
+ cycles: e?.cycles ?? "ref",
1635
+ reused: e?.reused ?? "inline",
1636
+ intersections: [],
1637
+ deferred: [],
1638
+ external: e?.external ?? void 0
1639
+ };
1640
+ }
1641
+ function x(e, r, t, n, o) {
1642
+ const i = typeof r.unrepresentable == "function" ? r.unrepresentable({
1643
+ zodSchema: e,
1644
+ path: n.path,
1645
+ message: o
1646
+ }) : r.unrepresentable;
1647
+ if (i === "any") return !1;
1648
+ if (i === void 0 || i === "throw") throw new Error(o);
1649
+ return Object.assign(t, i), !0;
1650
+ }
1651
+ function y(e, r, t = {
1652
+ path: [],
1653
+ schemaPath: []
1654
+ }) {
1655
+ var n;
1656
+ const o = e._zod.def, i = r.seen.get(e);
1657
+ if (i)
1658
+ return i.count++, t.schemaPath.includes(e) && (i.cycle = t.path), i.schema;
1659
+ const s = {
1660
+ schema: {},
1661
+ count: 1,
1662
+ cycle: void 0,
1663
+ path: t.path
1664
+ };
1665
+ r.seen.set(e, s), r.sharedDefsExtractedFor = void 0, r.sharedEmitDoneFor = void 0;
1666
+ const a = e._zod.toJSONSchema?.();
1667
+ if (a) s.schema = a;
1668
+ else {
1669
+ const c = {
1670
+ ...t,
1671
+ schemaPath: [...t.schemaPath, e],
1672
+ path: t.path
1673
+ };
1674
+ if (e._zod.processJSONSchema) e._zod.processJSONSchema(r, s.schema, c);
1675
+ else {
1676
+ const l = s.schema, d = r.processors[o.type];
1677
+ if (!d) throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
1678
+ d(e, r, l, c);
1679
+ }
1680
+ const f = e._zod.parent;
1681
+ f && (s.ref || (s.ref = f), y(f, r, c), r.seen.get(f).isParent = !0);
1682
+ }
1683
+ const u = r.metadataRegistry.get(e);
1684
+ return u && U(s.schema, u), r.io === "input" && b(e) && (delete s.schema.examples, delete s.schema.default), r.io === "input" && "_prefault" in s.schema && ((n = s.schema).default ?? (n.default = s.schema._prefault)), delete s.schema._prefault, r.seen.get(e).schema;
1685
+ }
1686
+ function We(e) {
1687
+ return e.replace(/~/g, "~0").replace(/\//g, "~1");
1688
+ }
1689
+ function yr(e, r) {
1690
+ const t = e.seen.get(r);
1691
+ if (!t) throw new Error("Unprocessed schema. This is a bug in Zod.");
1692
+ if (e.external && e.sharedDefsExtractedFor === e.external) return;
1693
+ const n = /* @__PURE__ */ new Map();
1694
+ for (const s of e.seen.entries()) {
1695
+ const a = e.metadataRegistry.get(s[0])?.id;
1696
+ if (a) {
1697
+ const u = n.get(a);
1698
+ if (u && u !== s[0]) throw new Error(`Duplicate schema id "${a}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
1699
+ n.set(a, s[0]);
1700
+ }
1701
+ }
1702
+ const o = (s) => {
1703
+ const a = e.target === "draft-2020-12" ? "$defs" : "definitions";
1704
+ if (e.external) {
1705
+ const l = e.external.registry.get(s[0])?.id, d = e.external.uri ?? ((m) => m);
1706
+ if (l) return { ref: d(l) };
1707
+ const p = s[1].defId ?? s[1].schema.id ?? `schema${e.counter++}`;
1708
+ return s[1].defId = p, {
1709
+ defId: p,
1710
+ ref: `${d("__shared")}#/${a}/${We(p)}`
1711
+ };
1712
+ }
1713
+ const u = "#", c = `${u}/${a}/`;
1714
+ if (s[1] === t && !s[1].schema.id) return { ref: u };
1715
+ const f = s[1].schema.id ?? `__schema${e.counter++}`;
1716
+ return {
1717
+ defId: f,
1718
+ ref: c + We(f)
1719
+ };
1720
+ }, i = (s) => {
1721
+ if (s[1].schema.$ref) return;
1722
+ const a = s[1], { ref: u, defId: c } = o(s);
1723
+ a.def = { ...a.schema }, c && (a.defId = c);
1724
+ const f = a.schema;
1725
+ for (const l in f) delete f[l];
1726
+ f.$ref = u;
1727
+ };
1728
+ if (e.cycles === "throw") for (const s of e.seen.entries()) {
1729
+ const a = s[1];
1730
+ if (a.cycle) throw new Error(`Cycle detected: #/${a.cycle?.join("/")}/<root>
1731
+
1732
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
1733
+ }
1734
+ for (const s of e.seen.entries()) {
1735
+ const a = s[1];
1736
+ if (r === s[0]) {
1737
+ i(s);
1738
+ continue;
1739
+ }
1740
+ if (e.external) {
1741
+ const u = e.external.registry.get(s[0])?.id;
1742
+ if (r !== s[0] && u) {
1743
+ i(s);
1744
+ continue;
1745
+ }
1746
+ }
1747
+ if (e.metadataRegistry.get(s[0])?.id) {
1748
+ i(s);
1749
+ continue;
1750
+ }
1751
+ if (a.cycle) {
1752
+ i(s);
1753
+ continue;
1754
+ }
1755
+ a.count > 1 && e.reused === "ref" && i(s);
1756
+ }
1757
+ e.external && (e.sharedDefsExtractedFor = e.external);
1758
+ }
1759
+ function zr(e) {
1760
+ const r = e.anyOf;
1761
+ if (!Array.isArray(r) || r.length === 0 || e.type !== void 0) return;
1762
+ const t = [];
1763
+ for (const n of r) {
1764
+ if (!n || typeof n != "object") return;
1765
+ zr(n);
1766
+ const o = Object.keys(n);
1767
+ if (o.length !== 1 || o[0] !== "type") return;
1768
+ const i = n.type;
1769
+ for (const s of Array.isArray(i) ? i : [i]) {
1770
+ if (typeof s != "string") return;
1771
+ t.includes(s) || t.push(s);
1772
+ }
1773
+ }
1774
+ delete e.anyOf, e.type = t.length === 1 ? t[0] : t;
1775
+ }
1776
+ var wr = /* @__PURE__ */ new Set([
1777
+ "type",
1778
+ "properties",
1779
+ "required",
1780
+ "additionalProperties"
1781
+ ]), qe = ["oneOf", "anyOf"];
1782
+ function Ke(e) {
1783
+ const r = e.additionalProperties;
1784
+ return r === void 0 || r === !1 || typeof r != "object" || r === null ? null : Object.keys(r).length ? r : null;
1785
+ }
1786
+ function he(e) {
1787
+ const r = [];
1788
+ for (const i of e) {
1789
+ if (typeof i != "object" || i.type !== "object") return null;
1790
+ for (const s in i) if (!wr.has(s)) return null;
1791
+ r.push(i);
1792
+ }
1793
+ const t = {}, n = /* @__PURE__ */ new Set();
1794
+ for (const i of r) {
1795
+ for (const s in i.properties) {
1796
+ if (Object.prototype.hasOwnProperty.call(t, s)) continue;
1797
+ const a = [];
1798
+ for (const c of r) {
1799
+ const f = c.properties?.[s] ?? Ke(c);
1800
+ f != null && (a.some((l) => JSON.stringify(l) === JSON.stringify(f)) || a.push(f));
1801
+ }
1802
+ const u = a.length === 1 ? a[0] : he(a) ?? { allOf: a };
1803
+ _e(t, s, u);
1804
+ }
1805
+ for (const s of i.required ?? []) n.add(s);
1806
+ }
1807
+ const o = {
1808
+ type: "object",
1809
+ properties: t
1810
+ };
1811
+ if (n.size && (o.required = [...n]), r.every((i) => i.additionalProperties === !1)) o.additionalProperties = !1;
1812
+ else {
1813
+ const i = [];
1814
+ for (const s of r) {
1815
+ const a = Ke(s);
1816
+ a && !i.some((u) => JSON.stringify(u) === JSON.stringify(a)) && i.push(a);
1817
+ }
1818
+ i.length === 1 ? o.additionalProperties = i[0] : i.length > 1 && (o.additionalProperties = { allOf: i });
1819
+ }
1820
+ return o;
1821
+ }
1822
+ function ln(e) {
1823
+ const r = e.allOf;
1824
+ if (!Array.isArray(r) || r.length < 2) return;
1825
+ for (const o of wr) if (o in e) return;
1826
+ const t = r.filter((o) => qe.some((i) => Array.isArray(o[i])));
1827
+ let n = null;
1828
+ if (!t.length) n = he(r);
1829
+ else {
1830
+ const o = t[0], i = qe.find((u) => Array.isArray(o[u]));
1831
+ if (Object.keys(o).length !== 1) return;
1832
+ const s = r.filter((u) => u !== o), a = o[i].map((u) => he([...s, u]));
1833
+ if (a.some((u) => !u)) return;
1834
+ n = { [i]: a };
1835
+ }
1836
+ n && (delete e.allOf, U(e, n));
1837
+ }
1838
+ function Or(e, r) {
1839
+ const t = e.seen.get(r);
1840
+ if (!t) throw new Error("Unprocessed schema. This is a bug in Zod.");
1841
+ const n = (a) => {
1842
+ const u = e.seen.get(a);
1843
+ if (u.ref === null) return;
1844
+ const c = u.def ?? u.schema, f = { ...c }, l = u.ref;
1845
+ if (u.ref = null, l) {
1846
+ n(l);
1847
+ const p = e.seen.get(l), m = p.schema;
1848
+ if (m.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (c.allOf = c.allOf ?? [], c.allOf.push(m)) : U(c, m), U(c, f), a._zod.parent === l) for (const v in c)
1849
+ v === "$ref" || v === "allOf" || v in f || delete c[v];
1850
+ if (m.$ref && p.def) for (const v in c)
1851
+ v === "$ref" || v === "allOf" || v in p.def && JSON.stringify(c[v]) === JSON.stringify(p.def[v]) && delete c[v];
1852
+ }
1853
+ const d = a._zod.parent;
1854
+ if (d && d !== l) {
1855
+ n(d);
1856
+ const p = e.seen.get(d);
1857
+ if (p?.schema.$ref && (c.$ref = p.schema.$ref, p.def))
1858
+ for (const m in c)
1859
+ m === "$ref" || m === "allOf" || m in p.def && JSON.stringify(c[m]) === JSON.stringify(p.def[m]) && delete c[m];
1860
+ }
1861
+ e.override({
1862
+ zodSchema: a,
1863
+ jsonSchema: c,
1864
+ path: u.path ?? []
1865
+ });
1866
+ };
1867
+ if (!e.external || e.sharedEmitDoneFor !== e.external) {
1868
+ for (const a of [...e.seen.entries()].reverse()) n(a[0]);
1869
+ if (e.target !== "openapi-3.0") for (const a of e.seen.entries()) zr(a[1].def ?? a[1].schema);
1870
+ for (const a of e.deferred) a();
1871
+ if (e.intersections.length) {
1872
+ const a = /* @__PURE__ */ new Map();
1873
+ for (const u of e.seen.values()) for (const c of [u.schema, u.def]) {
1874
+ const f = c?.allOf;
1875
+ if (!Array.isArray(f)) continue;
1876
+ const l = a.get(f);
1877
+ l ? l.push(c) : a.set(f, [c]);
1878
+ }
1879
+ for (const u of e.intersections) for (const c of a.get(u) ?? []) ln(c);
1880
+ }
1881
+ }
1882
+ const o = {};
1883
+ if (e.target === "draft-2020-12" ? o.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? o.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? o.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
1884
+ const a = e.external.registry.get(r)?.id;
1885
+ if (!a) throw new Error("Schema is missing an `id` property");
1886
+ o.$id = e.external.uri(a);
1887
+ }
1888
+ U(o, t.defId ? t.schema : t.def ?? t.schema);
1889
+ const i = e.metadataRegistry.get(r)?.id;
1890
+ i !== void 0 && o.id === i && delete o.id;
1891
+ const s = e.external?.defs ?? {};
1892
+ if (!e.external || e.sharedEmitDoneFor !== e.external) for (const a of e.seen.entries()) {
1893
+ const u = a[1];
1894
+ u.def && u.defId && (u.def.id === u.defId && delete u.def.id, _e(s, u.defId, u.def));
1895
+ }
1896
+ e.external && (e.sharedEmitDoneFor = e.external), e.external || Object.keys(s).length > 0 && (e.target === "draft-2020-12" ? o.$defs = s : o.definitions = s);
1897
+ try {
1898
+ const a = JSON.parse(JSON.stringify(o));
1899
+ return Object.defineProperty(a, "~standard", {
1900
+ value: {
1901
+ ...r["~standard"],
1902
+ jsonSchema: {
1903
+ input: ee(r, "input", e.processors),
1904
+ output: ee(r, "output", e.processors)
1905
+ }
1906
+ },
1907
+ enumerable: !1,
1908
+ writable: !1
1909
+ }), a;
1910
+ } catch {
1911
+ throw new Error("Error converting schema to JSON.");
1912
+ }
1913
+ }
1914
+ function b(e, r) {
1915
+ const t = r ?? { seen: /* @__PURE__ */ new Set() };
1916
+ if (t.seen.has(e)) return !1;
1917
+ t.seen.add(e);
1918
+ const n = e._zod.def;
1919
+ if (n.type === "transform") return !0;
1920
+ if (n.type === "array") return b(n.element, t);
1921
+ if (n.type === "set") return b(n.valueType, t);
1922
+ if (n.type === "lazy") return b(n.getter(), t);
1923
+ if (n.type === "promise" || n.type === "optional" || n.type === "nonoptional" || n.type === "nullable" || n.type === "readonly" || n.type === "default" || n.type === "prefault" || n.type === "catch") return b(n.innerType, t);
1924
+ if (n.type === "intersection") return b(n.left, t) || b(n.right, t);
1925
+ if (n.type === "record" || n.type === "map") return b(n.keyType, t) || b(n.valueType, t);
1926
+ if (n.type === "pipe")
1927
+ return e._zod.traits.has("$ZodCodec") ? !0 : b(n.in, t) || b(n.out, t);
1928
+ if (n.type === "object") {
1929
+ for (const o in n.shape) if (b(n.shape[o], t)) return !0;
1930
+ return !1;
1931
+ }
1932
+ if (n.type === "union") {
1933
+ for (const o of n.options) if (b(o, t)) return !0;
1934
+ return !1;
1935
+ }
1936
+ if (n.type === "tuple") {
1937
+ for (const o of n.items) if (b(o, t)) return !0;
1938
+ return !!(n.rest && b(n.rest, t));
1939
+ }
1940
+ return !1;
1941
+ }
1942
+ var dn = (e, r = {}) => (t) => {
1943
+ const n = br({
1944
+ ...t,
1945
+ processors: r
1946
+ });
1947
+ return y(e, n), yr(n, e), Or(n, e);
1948
+ }, ee = (e, r, t = {}) => (n) => {
1949
+ const { libraryOptions: o, target: i } = n ?? {}, s = br({
1950
+ ...o ?? {},
1951
+ target: i,
1952
+ io: r,
1953
+ processors: t
1954
+ });
1955
+ return y(e, s), yr(s, e), Or(s, e);
1956
+ }, C = (e, r, t) => {
1957
+ (e[r] === void 0 || t > e[r]) && (e[r] = t);
1958
+ }, M = (e, r, t) => {
1959
+ (e[r] === void 0 || t < e[r]) && (e[r] = t);
1960
+ }, Ye = (e, r) => {
1961
+ C(e, "minimum", r), M(e, "maximum", r);
1962
+ }, kr = (e, r) => {
1963
+ e.multipleOf ?? (e.multipleOf = []), e.multipleOf.includes(r) || e.multipleOf.push(r);
1964
+ }, Pr = (e, r) => {
1965
+ e.patterns ?? (e.patterns = /* @__PURE__ */ new Set()), e.patterns.add(r);
1966
+ }, Sr = (e, r) => {
1967
+ e.mime = e.mime ? e.mime.filter((t) => r.includes(t)) : [...r];
1968
+ }, Er = (e, r) => {
1969
+ e.format = r, r.includes("int") && (e.isInt = !0);
1970
+ }, Xe = (e, r) => C(e, "minimum", r.minimum), He = (e, r) => M(e, "maximum", r.maximum), Qe = (e) => (r, t) => {
1971
+ Er(r, t.format);
1972
+ const [n, o] = e[t.format];
1973
+ C(r, "minimum", n), M(r, "maximum", o);
1974
+ }, pn = {
1975
+ greater_than: (e, r) => C(e, r.inclusive ? "minimum" : "exclusiveMinimum", r.value),
1976
+ less_than: (e, r) => M(e, r.inclusive ? "maximum" : "exclusiveMaximum", r.value),
1977
+ multiple_of: (e, r) => kr(e, r.value),
1978
+ number_format: Qe(ar),
1979
+ bigint_format: Qe(Ur),
1980
+ min_length: Xe,
1981
+ max_length: He,
1982
+ length_equals: (e, r) => Ye(e, r.length),
1983
+ min_size: Xe,
1984
+ max_size: He,
1985
+ size_equals: (e, r) => Ye(e, r.size),
1986
+ string_format: (e, r) => {
1987
+ Er(e, r.format), r.pattern && Pr(e, r.pattern), (r.format === "base64" || r.format === "base64url") && (e.contentEncoding = r.format), (r.local || r.precision === -1) && (e.laxFormat = !0);
1988
+ },
1989
+ mime_type: (e, r) => Sr(e, r.mime)
1990
+ };
1991
+ function A(e) {
1992
+ const r = {}, t = e._zod.def, n = e._zod.traits.has("$ZodCheck") ? [e, ...t.checks ?? []] : t.checks ?? [];
1993
+ for (const i of n) pn[i._zod.def.check]?.(r, i._zod.def);
1994
+ const o = e._zod.bag;
1995
+ o.minimum !== void 0 && C(r, "minimum", o.minimum), o.exclusiveMinimum !== void 0 && C(r, "exclusiveMinimum", o.exclusiveMinimum), o.maximum !== void 0 && M(r, "maximum", o.maximum), o.exclusiveMaximum !== void 0 && M(r, "exclusiveMaximum", o.exclusiveMaximum), o.multipleOf !== void 0 && kr(r, o.multipleOf), o.format !== void 0 && (r.format ?? (r.format = o.format), o.format.includes("int") && (r.isInt = !0)), o.mime && Sr(r, o.mime);
1996
+ for (const i of o.patterns ?? []) Pr(r, i);
1997
+ return r;
1998
+ }
1999
+ var hn = (e, r, t, n) => {
2000
+ const o = t, { minimum: i, maximum: s, multipleOf: a, exclusiveMaximum: u, exclusiveMinimum: c, isInt: f } = A(e);
2001
+ o.type = f ? "integer" : "number";
2002
+ const l = typeof c == "number" && c >= (i ?? Number.NEGATIVE_INFINITY), d = typeof u == "number" && u <= (s ?? Number.POSITIVE_INFINITY), p = r.target === "draft-04" || r.target === "openapi-3.0";
2003
+ if (l ? p ? (o.minimum = c, o.exclusiveMinimum = !0) : o.exclusiveMinimum = c : typeof i == "number" && (o.minimum = i), d ? p ? (o.maximum = u, o.exclusiveMaximum = !0) : o.exclusiveMaximum = u : typeof s == "number" && (o.maximum = s), a) {
2004
+ const m = /* @__PURE__ */ new Set();
2005
+ for (const g of a) Number.isFinite(g) && g !== 0 ? m.add(Math.abs(g)) : x(e, r, o, n, `A multipleOf divisor of ${g} cannot be represented in JSON Schema`);
2006
+ const [v, ...P] = m;
2007
+ v !== void 0 && (o.multipleOf = v), P.length && (o.allOf = [...o.allOf ?? [], ...P.map((g) => ({ multipleOf: g }))]);
2008
+ }
2009
+ }, mn = (e, r, t, n) => {
2010
+ x(e, r, t, n, "Custom types cannot be represented in JSON Schema");
2011
+ }, vn = (e, r, t, n) => {
2012
+ x(e, r, t, n, "Transforms cannot be represented in JSON Schema");
2013
+ }, _n = (e, r, t, n) => {
2014
+ const o = t, i = e._zod.def, { minimum: s, maximum: a } = A(e);
2015
+ typeof s == "number" && (o.minItems = s), typeof a == "number" && (o.maxItems = a), o.type = "array", o.items = y(i.element, r, {
2016
+ ...n,
2017
+ path: [...n.path, "items"]
2018
+ });
2019
+ }, gn = (e, r, t, n) => {
2020
+ const o = e._zod.def, i = o.inclusive === !1, s = o.options.map((a, u) => y(a, r, {
2021
+ ...n,
2022
+ path: [
2023
+ ...n.path,
2024
+ i ? "oneOf" : "anyOf",
2025
+ u
2026
+ ]
2027
+ }));
2028
+ i ? t.oneOf = s : t.anyOf = s;
2029
+ }, bn = (e, r, t, n) => {
2030
+ const o = e._zod.def, i = y(o.left, r, {
2031
+ ...n,
2032
+ path: [
2033
+ ...n.path,
2034
+ "allOf",
2035
+ 0
2036
+ ]
2037
+ }), s = y(o.right, r, {
2038
+ ...n,
2039
+ path: [
2040
+ ...n.path,
2041
+ "allOf",
2042
+ 1
2043
+ ]
2044
+ }), a = (c) => "allOf" in c && Object.keys(c).length === 1, u = [...a(i) ? i.allOf : [i], ...a(s) ? s.allOf : [s]];
2045
+ t.allOf = u, r.intersections.push(u);
2046
+ }, yn = (e, r, t, n) => {
2047
+ const o = e._zod.def, i = y(o.innerType, r, n), s = r.seen.get(e);
2048
+ r.target === "openapi-3.0" ? (s.ref = o.innerType, t.nullable = !0) : t.anyOf = [i, { type: "null" }];
2049
+ }, zn = (e, r, t, n) => {
2050
+ const o = e._zod.def;
2051
+ y(o.innerType, r, n);
2052
+ const i = r.seen.get(e);
2053
+ i.ref = o.innerType;
2054
+ }, Pe = /* @__PURE__ */ Symbol();
2055
+ function Nr(e, r, t, n, o) {
2056
+ let i = !1;
2057
+ const s = JSON.stringify(e, (a, u) => typeof u != "bigint" ? u : (i = !0, null));
2058
+ return i ? (x(r, t, n, o, "BigInt defaults cannot be represented in JSON Schema"), Pe) : JSON.parse(s);
2059
+ }
2060
+ var wn = (e, r, t, n) => {
2061
+ const o = e._zod.def;
2062
+ y(o.innerType, r, n);
2063
+ const i = r.seen.get(e);
2064
+ i.ref = o.innerType;
2065
+ const s = Nr(o.defaultValue, e, r, t, n);
2066
+ s !== Pe && (t.default = s);
2067
+ }, On = (e, r, t, n) => {
2068
+ const o = e._zod.def;
2069
+ y(o.innerType, r, n);
2070
+ const i = r.seen.get(e);
2071
+ if (i.ref = o.innerType, r.io !== "input") return;
2072
+ const s = Nr(o.defaultValue, e, r, t, n);
2073
+ s !== Pe && (t._prefault = s);
2074
+ }, kn = (e, r, t, n) => {
2075
+ const o = e._zod.def;
2076
+ y(o.innerType, r, n);
2077
+ const i = r.seen.get(e);
2078
+ i.ref = o.innerType;
2079
+ let s;
2080
+ try {
2081
+ s = o.catchValue(void 0);
2082
+ } catch {
2083
+ x(e, r, t, n, "Dynamic catch values are not supported in JSON Schema");
2084
+ return;
2085
+ }
2086
+ t.default = s;
2087
+ }, Pn = (e, r, t, n) => {
2088
+ const o = e._zod.def, i = o.in._zod.traits.has("$ZodTransform"), s = r.io === "input" ? i ? o.out : o.in : o.out;
2089
+ y(s, r, n);
2090
+ const a = r.seen.get(e);
2091
+ a.ref = s;
2092
+ }, Sn = (e, r, t, n) => {
2093
+ const o = e._zod.def;
2094
+ y(o.innerType, r, n);
2095
+ const i = r.seen.get(e);
2096
+ i.ref = o.innerType, t.readOnly = !0;
2097
+ }, $r = (e, r, t, n) => {
2098
+ const o = e._zod.def;
2099
+ y(o.innerType, r, n);
2100
+ const i = r.seen.get(e);
2101
+ i.ref = o.innerType;
2102
+ }, er = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
2103
+ function K(e, r, t) {
2104
+ Object.defineProperty(e, r, {
2105
+ configurable: !0,
2106
+ enumerable: !1,
2107
+ get() {
2108
+ const n = t(this);
2109
+ return Object.defineProperty(this, r, {
2110
+ value: n,
2111
+ configurable: !0,
2112
+ writable: !0
2113
+ }), n;
2114
+ },
2115
+ set(n) {
2116
+ Object.defineProperty(this, r, {
2117
+ value: n,
2118
+ configurable: !0,
2119
+ writable: !0
2120
+ });
2121
+ }
2122
+ });
2123
+ }
2124
+ var En = (e, r) => {
2125
+ ot.init(e, r), e.name = "ZodError";
2126
+ const t = Object.getPrototypeOf(e);
2127
+ er.has(t) || (er.add(t), K(t, "format", (n) => (o) => at(n, o)), K(t, "flatten", (n) => (o) => st(n, o)), K(t, "addIssue", (n) => (o) => {
2128
+ n.issues.push(o), n.message = JSON.stringify(n.issues, ce, 2);
2129
+ }), K(t, "addIssues", (n) => (o) => {
2130
+ n.issues.push(...o), n.message = JSON.stringify(n.issues, ce, 2);
2131
+ }), Object.defineProperty(t, "isEmpty", {
2132
+ configurable: !0,
2133
+ enumerable: !1,
2134
+ get() {
2135
+ return this.issues.length === 0;
2136
+ }
2137
+ }));
2138
+ }, k = /* @__PURE__ */ h("ZodError", En, void 0, { Parent: Error }), Nn = /* @__PURE__ */ ye(k), $n = /* @__PURE__ */ ze(k), Tn = /* @__PURE__ */ we(k), In = /* @__PURE__ */ Oe(k), Zn = /* @__PURE__ */ pt(k), An = /* @__PURE__ */ ht(k), jn = /* @__PURE__ */ mt(k), Cn = /* @__PURE__ */ vt(k), Mn = /* @__PURE__ */ _t(k), Rn = /* @__PURE__ */ gt(k), Dn = /* @__PURE__ */ bt(k), Fn = /* @__PURE__ */ yt(k);
2139
+ function Jn() {
2140
+ j.localeError || $(Qt());
2141
+ }
2142
+ function Tr() {
2143
+ j.memoizer || $({ memoizer: Yt() });
2144
+ }
2145
+ var w = /* @__PURE__ */ h("ZodType", (e, r) => (Jn(), z.init(e, r), e.def = r, e.type = r.type, e), {
2146
+ check(...e) {
2147
+ const r = this.def;
2148
+ return this.clone(Jr(r, { checks: [...r.checks ?? [], ...e.map((t) => typeof t == "function" ? { _zod: {
2149
+ check: t,
2150
+ def: { check: "custom" },
2151
+ onattach: []
2152
+ } } : t)] }), { parent: !0 });
2153
+ },
2154
+ with(...e) {
2155
+ return this.check(...e);
2156
+ },
2157
+ clone(e, r) {
2158
+ return Lr(this, e, r);
2159
+ },
2160
+ brand() {
2161
+ return this;
2162
+ },
2163
+ register(e, r) {
2164
+ return e.add(this, r), this;
2165
+ },
2166
+ refine(e, r) {
2167
+ return this.check(ho(e, r));
2168
+ },
2169
+ superRefine(e, r) {
2170
+ return this.check(mo(e, r));
2171
+ },
2172
+ overwrite(e) {
2173
+ return this.check(/* @__PURE__ */ sn(e));
2174
+ },
2175
+ optional() {
2176
+ return rr(this);
2177
+ },
2178
+ exactOptional() {
2179
+ return Qn(this);
2180
+ },
2181
+ nullable() {
2182
+ return tr(this);
2183
+ },
2184
+ nullish() {
2185
+ return rr(tr(this));
2186
+ },
2187
+ nonoptional(e) {
2188
+ return so(this, e);
2189
+ },
2190
+ array() {
2191
+ return xn(this);
2192
+ },
2193
+ or(e) {
2194
+ return Gn([this, e]);
2195
+ },
2196
+ and(e) {
2197
+ return qn(this, e);
2198
+ },
2199
+ transform(e) {
2200
+ return nr(this, Yn(e));
2201
+ },
2202
+ default(e) {
2203
+ return to(this, e);
2204
+ },
2205
+ prefault(e) {
2206
+ return oo(this, e);
2207
+ },
2208
+ catch(e) {
2209
+ return uo(this, e);
2210
+ },
2211
+ pipe(e) {
2212
+ return nr(this, e);
2213
+ },
2214
+ readonly() {
2215
+ return lo(this);
2216
+ },
2217
+ describe(e) {
2218
+ const r = this.clone();
2219
+ return J.add(r, { description: e }), r;
2220
+ },
2221
+ meta(...e) {
2222
+ if (e.length === 0) return J.get(this);
2223
+ const r = this.clone();
2224
+ return J.add(r, e[0]), r;
2225
+ },
2226
+ isOptional() {
2227
+ return this.safeParse(void 0).success;
2228
+ },
2229
+ isNullable() {
2230
+ return this.safeParse(null).success;
2231
+ },
2232
+ apply(e, ...r) {
2233
+ return r.length === 0 ? e(this) : e(this, ...r);
2234
+ },
2235
+ get "~standard"() {
2236
+ return ur(this, "~standard", {
2237
+ ...hr(this),
2238
+ jsonSchema: {
2239
+ input: ee(this, "input"),
2240
+ output: ee(this, "output")
2241
+ }
2242
+ });
2243
+ },
2244
+ set "~standard"(e) {
2245
+ N(this, "~standard", e);
2246
+ },
2247
+ parse: function e(r, t) {
2248
+ return Nn(this, r, t, { callee: e });
2249
+ },
2250
+ parseAsync: async function e(r, t) {
2251
+ return await $n(this, r, t, { callee: e });
2252
+ },
2253
+ safeParse(e, r) {
2254
+ return Tn(this, e, r);
2255
+ },
2256
+ async safeParseAsync(e, r) {
2257
+ return In(this, e, r);
2258
+ },
2259
+ get spa() {
2260
+ return this?.safeParseAsync;
2261
+ },
2262
+ set spa(e) {
2263
+ N(this, "spa", e);
2264
+ },
2265
+ validate(e, r) {
2266
+ return ft(this, e, r);
2267
+ },
2268
+ validateAsync(e, r) {
2269
+ return dt(this, e, r);
2270
+ },
2271
+ encode: function e(r, t) {
2272
+ return Zn(this, r, t, { callee: e });
2273
+ },
2274
+ decode: function e(r, t) {
2275
+ return An(this, r, t, { callee: e });
2276
+ },
2277
+ encodeAsync: async function e(r, t) {
2278
+ return await jn(this, r, t, { callee: e });
2279
+ },
2280
+ decodeAsync: async function e(r, t) {
2281
+ return await Cn(this, r, t, { callee: e });
2282
+ },
2283
+ safeEncode(e, r) {
2284
+ return Mn(this, e, r);
2285
+ },
2286
+ safeDecode(e, r) {
2287
+ return Rn(this, e, r);
2288
+ },
2289
+ async safeEncodeAsync(e, r) {
2290
+ return Dn(this, e, r);
2291
+ },
2292
+ async safeDecodeAsync(e, r) {
2293
+ return Fn(this, e, r);
2294
+ },
2295
+ toJSONSchema(e) {
2296
+ return dn(this, {})(e);
2297
+ },
2298
+ get description() {
2299
+ return J.get(this)?.description;
2300
+ },
2301
+ get _def() {
2302
+ return this._zod.def;
2303
+ }
2304
+ }), Ln = /* @__PURE__ */ h("ZodNumber", (e, r) => {
2305
+ mr.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => hn(e, t, n, o), e.isFinite = !0;
2306
+ }, /* @__PURE__ */ qr({
2307
+ minValue: (e) => {
2308
+ const { minimum: r, exclusiveMinimum: t } = A(e);
2309
+ return Math.max(r ?? Number.NEGATIVE_INFINITY, t ?? Number.NEGATIVE_INFINITY);
2310
+ },
2311
+ maxValue: (e) => {
2312
+ const { maximum: r, exclusiveMaximum: t } = A(e);
2313
+ return Math.min(r ?? Number.POSITIVE_INFINITY, t ?? Number.POSITIVE_INFINITY);
2314
+ },
2315
+ isInt: (e) => {
2316
+ const { isInt: r, multipleOf: t } = A(e);
2317
+ return !!r || !!t?.some(Number.isSafeInteger);
2318
+ },
2319
+ format: (e) => A(e).format ?? null
2320
+ }, {
2321
+ gt(e, r) {
2322
+ return this.check(/* @__PURE__ */ xe(e, r));
2323
+ },
2324
+ gte(e, r) {
2325
+ return this.check(/* @__PURE__ */ ue(e, r));
2326
+ },
2327
+ min(e, r) {
2328
+ return this.check(/* @__PURE__ */ ue(e, r));
2329
+ },
2330
+ lt(e, r) {
2331
+ return this.check(/* @__PURE__ */ Ve(e, r));
2332
+ },
2333
+ lte(e, r) {
2334
+ return this.check(/* @__PURE__ */ ae(e, r));
2335
+ },
2336
+ max(e, r) {
2337
+ return this.check(/* @__PURE__ */ ae(e, r));
2338
+ },
2339
+ int(e) {
2340
+ return this.check(me(e));
2341
+ },
2342
+ safe(e) {
2343
+ return this.check(me(e));
2344
+ },
2345
+ positive(e) {
2346
+ return this.check(/* @__PURE__ */ xe(0, e));
2347
+ },
2348
+ nonnegative(e) {
2349
+ return this.check(/* @__PURE__ */ ue(0, e));
2350
+ },
2351
+ negative(e) {
2352
+ return this.check(/* @__PURE__ */ Ve(0, e));
2353
+ },
2354
+ nonpositive(e) {
2355
+ return this.check(/* @__PURE__ */ ae(0, e));
2356
+ },
2357
+ multipleOf(e, r) {
2358
+ return this.check(/* @__PURE__ */ Be(e, r));
2359
+ },
2360
+ step(e, r) {
2361
+ return this.check(/* @__PURE__ */ Be(e, r));
2362
+ },
2363
+ finite() {
2364
+ return this;
2365
+ }
2366
+ })), Un = /* @__PURE__ */ h("ZodNumberFormat", (e, r) => {
2367
+ Tt.init(e, r), Ln.init(e, r);
2368
+ });
2369
+ function me(e) {
2370
+ return /* @__PURE__ */ tn(Un, e);
2371
+ }
2372
+ var Vn = /* @__PURE__ */ h("ZodArray", (e, r) => {
2373
+ Tr(), At.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => _n(e, t, n, o), e.element = r.element;
2374
+ }, {
2375
+ min(e, r) {
2376
+ return this.check(/* @__PURE__ */ Ge(e, r));
2377
+ },
2378
+ nonempty(e) {
2379
+ return this.check(/* @__PURE__ */ Ge(1, e));
2380
+ },
2381
+ max(e, r) {
2382
+ return this.check(/* @__PURE__ */ nn(e, r));
2383
+ },
2384
+ length(e, r) {
2385
+ return this.check(/* @__PURE__ */ on(e, r));
2386
+ },
2387
+ unwrap() {
2388
+ return this.element;
2389
+ }
2390
+ });
2391
+ function xn(e, r) {
2392
+ return /* @__PURE__ */ an(Vn, e, r);
2393
+ }
2394
+ var Bn = /* @__PURE__ */ h("ZodUnion", (e, r) => {
2395
+ jt.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => gn(e, t, n, o), e.options = r.options;
2396
+ });
2397
+ function Gn(e, r) {
2398
+ return new Bn({
2399
+ type: "union",
2400
+ options: e,
2401
+ ...O(r)
2402
+ });
2403
+ }
2404
+ var Wn = /* @__PURE__ */ h("ZodIntersection", (e, r) => {
2405
+ Ct.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => bn(e, t, n, o);
2406
+ });
2407
+ function qn(e, r) {
2408
+ return new Wn({
2409
+ type: "intersection",
2410
+ left: e,
2411
+ right: r
2412
+ });
2413
+ }
2414
+ var Kn = /* @__PURE__ */ h("ZodTransform", (e, r) => {
2415
+ Tr(), Mt.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => vn(e, t, n, o), e._zod.parse = (t, n) => {
2416
+ if (n.direction === "backward") throw new cr(e.constructor.name);
2417
+ t.addIssue = (i) => {
2418
+ if (typeof i == "string") t.issues.push(V(i, t.value, r));
2419
+ else {
2420
+ const s = i;
2421
+ s.fatal && (s.continue = !1), s.code ?? (s.code = "custom"), "input" in s || (s.input = t.value), s.inst ?? (s.inst = e), t.issues.push(V(s));
2422
+ }
2423
+ };
2424
+ const o = r.transform(t.value, t);
2425
+ return o instanceof Promise ? o.then((i) => (t.value = i, t)) : (t.value = o, t);
2426
+ };
2427
+ });
2428
+ function Yn(e) {
2429
+ return new Kn({
2430
+ type: "transform",
2431
+ transform: e
2432
+ });
2433
+ }
2434
+ var Xn = /* @__PURE__ */ h("ZodOptional", (e, r) => {
2435
+ vr.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => $r(e, t, n, o), e.unwrap = () => e._zod.def.innerType;
2436
+ });
2437
+ function rr(e) {
2438
+ return new Xn({
2439
+ type: "optional",
2440
+ innerType: e
2441
+ });
2442
+ }
2443
+ var Hn = /* @__PURE__ */ h("ZodExactOptional", (e, r) => {
2444
+ Rt.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => $r(e, t, n, o), e.unwrap = () => e._zod.def.innerType;
2445
+ });
2446
+ function Qn(e) {
2447
+ return new Hn({
2448
+ type: "optional",
2449
+ innerType: e
2450
+ });
2451
+ }
2452
+ var eo = /* @__PURE__ */ h("ZodNullable", (e, r) => {
2453
+ Dt.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => yn(e, t, n, o), e.unwrap = () => e._zod.def.innerType;
2454
+ });
2455
+ function tr(e) {
2456
+ return new eo({
2457
+ type: "nullable",
2458
+ innerType: e
2459
+ });
2460
+ }
2461
+ var ro = /* @__PURE__ */ h("ZodDefault", (e, r) => {
2462
+ Ft.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => wn(e, t, n, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
2463
+ });
2464
+ function to(e, r) {
2465
+ return new ro({
2466
+ type: "default",
2467
+ innerType: e,
2468
+ get defaultValue() {
2469
+ return typeof r == "function" ? r() : ir(r);
2470
+ }
2471
+ });
2472
+ }
2473
+ var no = /* @__PURE__ */ h("ZodPrefault", (e, r) => {
2474
+ Jt.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => On(e, t, n, o), e.unwrap = () => e._zod.def.innerType;
2475
+ });
2476
+ function oo(e, r) {
2477
+ return new no({
2478
+ type: "prefault",
2479
+ innerType: e,
2480
+ get defaultValue() {
2481
+ return typeof r == "function" ? r() : ir(r);
2482
+ }
2483
+ });
2484
+ }
2485
+ var io = /* @__PURE__ */ h("ZodNonOptional", (e, r) => {
2486
+ Lt.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => zn(e, t, n, o), e.unwrap = () => e._zod.def.innerType;
2487
+ });
2488
+ function so(e, r) {
2489
+ return new io({
2490
+ type: "nonoptional",
2491
+ innerType: e,
2492
+ ...O(r)
2493
+ });
2494
+ }
2495
+ var ao = /* @__PURE__ */ h("ZodCatch", (e, r) => {
2496
+ Ut.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => kn(e, t, n, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
2497
+ });
2498
+ function uo(e, r) {
2499
+ return new ao({
2500
+ type: "catch",
2501
+ innerType: e,
2502
+ catchValue: typeof r == "function" ? r : Hr(r)
2503
+ });
2504
+ }
2505
+ var co = /* @__PURE__ */ h("ZodPipe", (e, r) => {
2506
+ Vt.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => Pn(e, t, n, o), e.in = r.in, e.out = r.out;
2507
+ });
2508
+ function nr(e, r) {
2509
+ return new co({
2510
+ type: "pipe",
2511
+ in: e,
2512
+ out: r
2513
+ });
2514
+ }
2515
+ var fo = /* @__PURE__ */ h("ZodReadonly", (e, r) => {
2516
+ xt.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => Sn(e, t, n, o), e.unwrap = () => e._zod.def.innerType;
2517
+ });
2518
+ function lo(e) {
2519
+ return new fo({
2520
+ type: "readonly",
2521
+ innerType: e
2522
+ });
2523
+ }
2524
+ var po = /* @__PURE__ */ h("ZodCustom", (e, r) => {
2525
+ Bt.init(e, r), w.init(e, r), e._zod.processJSONSchema = (t, n, o) => mn(e, t, n, o);
2526
+ });
2527
+ function ho(e, r = {}) {
2528
+ return /* @__PURE__ */ un(po, e, r);
2529
+ }
2530
+ function mo(e, r) {
2531
+ return /* @__PURE__ */ cn(e, r);
2532
+ }
2533
+ var wo = ({ children: e, className: r, ...t }) => {
2534
+ H.Children.forEach(e, (o) => {
2535
+ H.isValidElement(o) && o.type;
2536
+ });
2537
+ function n() {
2538
+ const o = ["footer__navigation"];
2539
+ return r && o.push(r), o.join(" ");
2540
+ }
2541
+ return /* @__PURE__ */ Z("section", {
2542
+ className: n(),
2543
+ ...t,
2544
+ children: e
2545
+ });
2546
+ }, Ir = jr({}), vo = ({ children: e, className: r, ...t }) => {
2547
+ const n = Mr();
2548
+ H.Children.forEach(e, (i) => {
2549
+ H.isValidElement(i) && i.type;
2550
+ });
2551
+ function o() {
2552
+ const i = ["footer__menu"];
2553
+ return r && i.push(r), i.join(" ");
2554
+ }
2555
+ return /* @__PURE__ */ Z(Ir.Provider, {
2556
+ value: { id: n },
2557
+ children: /* @__PURE__ */ Z("nav", {
2558
+ "aria-labelledby": n,
2559
+ className: o(),
2560
+ ...t,
2561
+ children: e
2562
+ })
2563
+ });
2564
+ }, _o = ({ children: e, className: r, ...t }) => {
2565
+ const { id: n } = Cr(Ir);
2566
+ function o() {
2567
+ const i = ["footer__menu-title"];
2568
+ return r && i.push(r), i.join(" ");
2569
+ }
2570
+ return /* @__PURE__ */ Z("h2", {
2571
+ id: n,
2572
+ className: o(),
2573
+ ...t,
2574
+ children: e
2575
+ });
2576
+ }, Oo = ({ children: e, className: r, ...t }) => {
2577
+ function n() {
2578
+ const o = ["footer__menu-item"];
2579
+ return r && o.push(r), o.join(" ");
2580
+ }
2581
+ return /* @__PURE__ */ Z("div", {
2582
+ className: n(),
2583
+ ...t,
2584
+ children: e
2585
+ });
2586
+ }, ko = ({ children: e, className: r, copyrightStart: t, color: n = "default", variant: o = "moderate", ...i }) => {
2587
+ function s() {
2588
+ const c = ["footer"];
2589
+ return r && c.push(r), c.join(" ");
2590
+ }
2591
+ const a = (/* @__PURE__ */ new Date()).getFullYear();
2592
+ t = me().nonnegative().catch(() => (console.warn("Invalid copyright start year. Setting to current year."), 0)).parse(t);
2593
+ const u = t >= a || !t ? `Copyright ${a}` : `Copyright ${t}-${a}`;
2594
+ return /* @__PURE__ */ B(Zr, {
2595
+ as: "footer",
2596
+ color: n,
2597
+ variant: o,
2598
+ className: s(),
2599
+ ...i,
2600
+ children: [e, /* @__PURE__ */ B("section", {
2601
+ className: "footer__copyright",
2602
+ children: [/* @__PURE__ */ Z(Ar, { size: "sm" }), /* @__PURE__ */ B("span", {
2603
+ className: "footer__copyright-text",
2604
+ children: [/* @__PURE__ */ Z("h2", { children: "City of Portland, Oregon" }), /* @__PURE__ */ B("p", { children: ["© ", u] })]
2605
+ })]
2606
+ })]
2607
+ });
2608
+ };
2609
+ export {
2610
+ ko as Footer,
2611
+ vo as FooterMenu,
2612
+ Oo as FooterMenuItem,
2613
+ _o as FooterMenuTitle,
2614
+ wo as FooterNavigation
2615
+ };