@reforma/components 0.1.6 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/dist/Scrollable/Scrollable.d.ts +1 -2
  2. package/dist/Scrollable/Scrollable.d.ts.map +1 -1
  3. package/dist/Scrollable/Scrollable.js +45 -38
  4. package/dist/Scrollable/Scrollable.js.map +1 -1
  5. package/dist/Scrollable/useScrollChrome.d.ts +1 -2
  6. package/dist/Scrollable/useScrollChrome.d.ts.map +1 -1
  7. package/dist/Scrollable/useScrollChrome.js +125 -110
  8. package/dist/Scrollable/useScrollChrome.js.map +1 -1
  9. package/dist/chat/ComposerBanner/ComposerBanner.d.ts +2 -1
  10. package/dist/chat/ComposerBanner/ComposerBanner.d.ts.map +1 -1
  11. package/dist/chat/ComposerBanner/ComposerBanner.js +37 -29
  12. package/dist/chat/ComposerBanner/ComposerBanner.js.map +1 -1
  13. package/dist/chat/ComposerBanner/ComposerBanner.module.css +1 -1
  14. package/dist/chat/ComposerBanner/ComposerBanner.module.css.js +5 -3
  15. package/dist/chat/ComposerBanner/ComposerBanner.module.css.js.map +1 -1
  16. package/dist/chat/Tool/agent/AgentTool.d.ts.map +1 -1
  17. package/dist/chat/Tool/agent/AgentTool.js +89 -90
  18. package/dist/chat/Tool/agent/AgentTool.js.map +1 -1
  19. package/dist/chat/Tool/edit/EditTool.js +1 -1
  20. package/dist/chat/Tool/edit/EditTool.js.map +1 -1
  21. package/dist/node_modules/zod/v4/classic/errors.js +38 -0
  22. package/dist/node_modules/zod/v4/classic/errors.js.map +1 -0
  23. package/dist/node_modules/zod/v4/classic/parse.js +21 -0
  24. package/dist/node_modules/zod/v4/classic/parse.js.map +1 -0
  25. package/dist/node_modules/zod/v4/classic/schemas.js +822 -0
  26. package/dist/node_modules/zod/v4/classic/schemas.js.map +1 -0
  27. package/dist/node_modules/zod/v4/core/api.js +561 -0
  28. package/dist/node_modules/zod/v4/core/api.js.map +1 -0
  29. package/dist/node_modules/zod/v4/core/checks.js +262 -0
  30. package/dist/node_modules/zod/v4/core/checks.js.map +1 -0
  31. package/dist/node_modules/zod/v4/core/core.js +97 -0
  32. package/dist/node_modules/zod/v4/core/core.js.map +1 -0
  33. package/dist/node_modules/zod/v4/core/doc.js +35 -0
  34. package/dist/node_modules/zod/v4/core/doc.js.map +1 -0
  35. package/dist/node_modules/zod/v4/core/errors.js +79 -0
  36. package/dist/node_modules/zod/v4/core/errors.js.map +1 -0
  37. package/dist/node_modules/zod/v4/core/json-schema-processors.js +308 -0
  38. package/dist/node_modules/zod/v4/core/json-schema-processors.js.map +1 -0
  39. package/dist/node_modules/zod/v4/core/memoizer.js +203 -0
  40. package/dist/node_modules/zod/v4/core/memoizer.js.map +1 -0
  41. package/dist/node_modules/zod/v4/core/parse.js +113 -0
  42. package/dist/node_modules/zod/v4/core/parse.js.map +1 -0
  43. package/dist/node_modules/zod/v4/core/regexes.js +59 -0
  44. package/dist/node_modules/zod/v4/core/regexes.js.map +1 -0
  45. package/dist/node_modules/zod/v4/core/registries.js +41 -0
  46. package/dist/node_modules/zod/v4/core/registries.js.map +1 -0
  47. package/dist/node_modules/zod/v4/core/schemas.js +1104 -0
  48. package/dist/node_modules/zod/v4/core/schemas.js.map +1 -0
  49. package/dist/node_modules/zod/v4/core/to-json-schema.js +380 -0
  50. package/dist/node_modules/zod/v4/core/to-json-schema.js.map +1 -0
  51. package/dist/node_modules/zod/v4/core/util.js +465 -0
  52. package/dist/node_modules/zod/v4/core/util.js.map +1 -0
  53. package/dist/node_modules/zod/v4/core/versions.js +9 -0
  54. package/dist/node_modules/zod/v4/core/versions.js.map +1 -0
  55. package/dist/node_modules/zod/v4/locales/en.js +97 -0
  56. package/dist/node_modules/zod/v4/locales/en.js.map +1 -0
  57. package/dist/openui/actions.d.ts +16 -0
  58. package/dist/openui/actions.d.ts.map +1 -0
  59. package/dist/openui/actions.js +58 -0
  60. package/dist/openui/actions.js.map +1 -0
  61. package/dist/openui/components/controls.d.ts +34 -0
  62. package/dist/openui/components/controls.d.ts.map +1 -0
  63. package/dist/openui/components/controls.js +40 -0
  64. package/dist/openui/components/controls.js.map +1 -0
  65. package/dist/openui/components/layout.d.ts +74 -0
  66. package/dist/openui/components/layout.d.ts.map +1 -0
  67. package/dist/openui/components/layout.js +154 -0
  68. package/dist/openui/components/layout.js.map +1 -0
  69. package/dist/openui/components/list.d.ts +17 -0
  70. package/dist/openui/components/list.d.ts.map +1 -0
  71. package/dist/openui/components/list.js +96 -0
  72. package/dist/openui/components/list.js.map +1 -0
  73. package/dist/openui/components/svg.d.ts +100 -0
  74. package/dist/openui/components/svg.d.ts.map +1 -0
  75. package/dist/openui/components/svg.js +246 -0
  76. package/dist/openui/components/svg.js.map +1 -0
  77. package/dist/openui/components/table.d.ts +6 -0
  78. package/dist/openui/components/table.d.ts.map +1 -0
  79. package/dist/openui/components/table.js +54 -0
  80. package/dist/openui/components/table.js.map +1 -0
  81. package/dist/openui/components/text.d.ts +89 -0
  82. package/dist/openui/components/text.d.ts.map +1 -0
  83. package/dist/openui/components/text.js +181 -0
  84. package/dist/openui/components/text.js.map +1 -0
  85. package/dist/openui/functions/colors.d.ts +12 -0
  86. package/dist/openui/functions/colors.d.ts.map +1 -0
  87. package/dist/openui/functions/colors.js +32 -0
  88. package/dist/openui/functions/colors.js.map +1 -0
  89. package/dist/openui/functions/data.d.ts +170 -0
  90. package/dist/openui/functions/data.d.ts.map +1 -0
  91. package/dist/openui/functions/data.js +308 -0
  92. package/dist/openui/functions/data.js.map +1 -0
  93. package/dist/openui/functions/dates.d.ts +57 -0
  94. package/dist/openui/functions/dates.d.ts.map +1 -0
  95. package/dist/openui/functions/dates.js +184 -0
  96. package/dist/openui/functions/dates.js.map +1 -0
  97. package/dist/openui/functions/index.d.ts +136 -0
  98. package/dist/openui/functions/index.d.ts.map +1 -0
  99. package/dist/openui/functions/index.js +11 -0
  100. package/dist/openui/functions/index.js.map +1 -0
  101. package/dist/openui/functions/lists.d.ts +102 -0
  102. package/dist/openui/functions/lists.d.ts.map +1 -0
  103. package/dist/openui/functions/lists.js +305 -0
  104. package/dist/openui/functions/lists.js.map +1 -0
  105. package/dist/openui/functions/numbers.d.ts +72 -0
  106. package/dist/openui/functions/numbers.d.ts.map +1 -0
  107. package/dist/openui/functions/numbers.js +201 -0
  108. package/dist/openui/functions/numbers.js.map +1 -0
  109. package/dist/openui/functions/shared.d.ts +28 -0
  110. package/dist/openui/functions/shared.d.ts.map +1 -0
  111. package/dist/openui/functions/shared.js +69 -0
  112. package/dist/openui/functions/shared.js.map +1 -0
  113. package/dist/openui/functions/text.d.ts +97 -0
  114. package/dist/openui/functions/text.d.ts.map +1 -0
  115. package/dist/openui/functions/text.js +223 -0
  116. package/dist/openui/functions/text.js.map +1 -0
  117. package/dist/openui/index.d.ts +5 -0
  118. package/dist/openui/index.d.ts.map +1 -0
  119. package/dist/openui/index.js +14 -0
  120. package/dist/openui/index.js.map +1 -0
  121. package/dist/openui/library.d.ts +8 -0
  122. package/dist/openui/library.d.ts.map +1 -0
  123. package/dist/openui/library.js +37 -0
  124. package/dist/openui/library.js.map +1 -0
  125. package/dist/openui/schema.d.ts +36 -0
  126. package/dist/openui/schema.d.ts.map +1 -0
  127. package/dist/openui/schema.js +24 -0
  128. package/dist/openui/schema.js.map +1 -0
  129. package/package.json +4 -2
@@ -0,0 +1,1104 @@
1
+ import { $ZodCheckStringFormat as me, $ZodCheck as $e, $ZodCheckNumberFormat as ze } from "./checks.js";
2
+ import { $constructor as f, globalConfig as T, config as S, $ZodAsyncError as D, $ZodEncodeError as ge } from "./core.js";
3
+ import { Doc as Ze } from "./doc.js";
4
+ import { number as oe, anyString as be, boolean as we, datetime as ke, date as Pe, time as Re, duration as Te, email as ye, guid as Oe, uuid as J, emoji as Ie, nanoid as Se, nanoidOfLength as Ee, cuid as Ue, cuid2 as De, ulid as Ne, xid as je, ksuid as Ae, ipv4 as Le, ipv6 as Ce, cidrv4 as Ke, cidrv6 as Ve, e164 as Be, httpProtocol as Fe } from "./regexes.js";
5
+ import { allowsEval as Me, cached as se, esc as Je, isObject as ie, defineLazyInternal as _, isPlainObject as C, finalizeIssue as E, prefixIssues as R, getEnumValues as W, aborted as k, own as We, hide as Ge, explicitlyAborted as He, attachSchema as K, sizeCaps as G, optionalKeys as Xe, cleanRegex as B, assignProp as Ye, propertyKeyTypes as qe, escapeRegex as Qe, issue as xe } from "./util.js";
6
+ import { clone as zt } from "./util.js";
7
+ import { version as en } from "./versions.js";
8
+ const z = /* @__PURE__ */ f("$ZodType", (e, n) => {
9
+ var t;
10
+ e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = en;
11
+ const r = e._zod.def.checks, o = e._zod.traits.has("$ZodCheck") ? [e, ...r ?? []] : r?.length ? [...r] : [];
12
+ for (const s of o)
13
+ for (const c of s._zod.onattach)
14
+ c(e);
15
+ if (o.length === 0)
16
+ (t = e._zod).deferred ?? (t.deferred = []), e._zod.deferred?.push(() => {
17
+ e._zod.run = e._zod.parse;
18
+ });
19
+ else {
20
+ const s = (a, l, i) => {
21
+ if (a.memo)
22
+ return a;
23
+ let u = k(a), h;
24
+ for (const v of l) {
25
+ if (v._zod.def.when) {
26
+ if (He(a) || !v._zod.def.when(a))
27
+ continue;
28
+ } else if (u)
29
+ continue;
30
+ const d = a.issues.length, p = v._zod.check(a);
31
+ if (p instanceof Promise && i?.async === !1)
32
+ throw new D();
33
+ if (h || p instanceof Promise)
34
+ h = (h ?? Promise.resolve()).then(async () => {
35
+ await p, a.issues.length !== d && (K(a.issues, d, e), u || (u = k(a, d)));
36
+ });
37
+ else {
38
+ if (a.issues.length === d)
39
+ continue;
40
+ K(a.issues, d, e), u || (u = k(a, d));
41
+ }
42
+ }
43
+ return h ? h.then(() => a) : a;
44
+ }, c = (a, l, i) => {
45
+ if (k(a))
46
+ return a.aborted = !0, a;
47
+ const u = s(l, o, i);
48
+ if (u instanceof Promise) {
49
+ if (i.async === !1)
50
+ throw new D();
51
+ return u.then((h) => e._zod.parse(h, i));
52
+ }
53
+ return e._zod.parse(u, i);
54
+ };
55
+ e._zod.run = (a, l) => {
56
+ if (l.skipChecks)
57
+ return e._zod.parse(a, l);
58
+ if (l.direction === "backward") {
59
+ const u = e._zod.parse({ value: a.value, issues: [] }, { ...l, skipChecks: !0 });
60
+ return u instanceof Promise ? u.then((h) => c(h, a, l)) : c(u, a, l);
61
+ }
62
+ const i = e._zod.parse(a, l);
63
+ if (i instanceof Promise) {
64
+ if (l.async === !1)
65
+ throw new D();
66
+ return i.then((u) => s(u, o, l));
67
+ }
68
+ return s(i, o, l);
69
+ };
70
+ }
71
+ }, {
72
+ // Wrappers extend this by installing a richer factory over it; reading it eagerly would defeat the laziness.
73
+ get "~standard"() {
74
+ return Ge(this, "~standard", tn(this));
75
+ },
76
+ set "~standard"(e) {
77
+ We(this, "~standard", e);
78
+ }
79
+ }), ue = (e, n) => e.issues.length ? { issues: e.issues.map((t) => E(t, n, S())) } : { value: e.value };
80
+ async function nn(e, n) {
81
+ const t = { async: !0 };
82
+ return ue(await e._zod.run({ value: n, issues: [] }, t), t);
83
+ }
84
+ function tn(e) {
85
+ return {
86
+ validate: (n) => {
87
+ const t = { async: !1 };
88
+ try {
89
+ const r = e._zod.run({ value: n, issues: [] }, t);
90
+ if (!(r instanceof Promise))
91
+ return ue(r, t);
92
+ } catch {
93
+ }
94
+ return nn(e, n);
95
+ },
96
+ vendor: "zod",
97
+ version: 1
98
+ };
99
+ }
100
+ const rn = /* @__PURE__ */ f("$ZodString", (e, n) => {
101
+ z.init(e, n), e._zod.pattern = n.pattern ?? be, e._zod.parse = (t, r) => {
102
+ if (n.coerce)
103
+ try {
104
+ t.value = String(t.value);
105
+ } catch {
106
+ }
107
+ return typeof t.value == "string" || t.issues.push({
108
+ expected: "string",
109
+ code: "invalid_type",
110
+ input: t.value,
111
+ inst: e
112
+ }), t;
113
+ };
114
+ }), $ = /* @__PURE__ */ f("$ZodStringFormat", (e, n) => {
115
+ me.init(e, n), rn.init(e, n);
116
+ }), Tn = /* @__PURE__ */ f("$ZodGUID", (e, n) => {
117
+ n.pattern ?? (n.pattern = Oe), $.init(e, n);
118
+ }), yn = /* @__PURE__ */ f("$ZodUUID", (e, n) => {
119
+ if (n.version) {
120
+ const r = {
121
+ v1: 1,
122
+ v2: 2,
123
+ v3: 3,
124
+ v4: 4,
125
+ v5: 5,
126
+ v6: 6,
127
+ v7: 7,
128
+ v8: 8
129
+ }[n.version];
130
+ if (r === void 0)
131
+ throw new Error(`Invalid UUID version: "${n.version}"`);
132
+ n.pattern ?? (n.pattern = J(r));
133
+ } else
134
+ n.pattern ?? (n.pattern = J());
135
+ $.init(e, n);
136
+ }), On = /* @__PURE__ */ f("$ZodEmail", (e, n) => {
137
+ n.pattern ?? (n.pattern = ye), $.init(e, n);
138
+ }), ce = 1, N = 2;
139
+ function ae(e) {
140
+ try {
141
+ return typeof URL < "u" && typeof URL.canParse == "function" ? URL.canParse(e) : (new URL(e), !0);
142
+ } catch {
143
+ return !1;
144
+ }
145
+ }
146
+ function on(e, n) {
147
+ return !("normalize" in n) && !("hostname" in n) && !("protocol" in n) ? ae(e) || N : sn(e, n);
148
+ }
149
+ function sn(e, n) {
150
+ if (!n.normalize && n.protocol?.source === Fe.source && !/^https?:\/\//i.test(e))
151
+ return ce;
152
+ try {
153
+ if (typeof URL < "u") {
154
+ const t = URL;
155
+ if (typeof t.parse == "function")
156
+ return t.parse(e) ?? N;
157
+ }
158
+ return new URL(e);
159
+ } catch {
160
+ return N;
161
+ }
162
+ }
163
+ const un = /[\t\n\r]/g;
164
+ function H(e) {
165
+ return e.replace(un, "");
166
+ }
167
+ function cn(e, n) {
168
+ return n.lastIndex = 0, n.test(e.hostname);
169
+ }
170
+ function an(e, n) {
171
+ return n.lastIndex = 0, n.test(e.protocol.endsWith(":") ? e.protocol.slice(0, -1) : e.protocol);
172
+ }
173
+ const In = /* @__PURE__ */ f("$ZodURL", (e, n) => {
174
+ $.init(e, n), e._zod.check = (t) => {
175
+ try {
176
+ const r = t.value.trim(), o = on(r, n);
177
+ if (o === ce) {
178
+ t.issues.push({
179
+ code: "invalid_format",
180
+ format: "url",
181
+ note: "Invalid URL format",
182
+ input: t.value,
183
+ inst: e,
184
+ continue: !n.abort
185
+ });
186
+ return;
187
+ }
188
+ if (o === N) {
189
+ t.issues.push({
190
+ code: "invalid_format",
191
+ format: "url",
192
+ input: t.value,
193
+ inst: e,
194
+ continue: !n.abort
195
+ });
196
+ return;
197
+ }
198
+ if (o === !0) {
199
+ t.value = H(r);
200
+ return;
201
+ }
202
+ n.hostname && !cn(o, n.hostname) && t.issues.push({
203
+ code: "invalid_format",
204
+ format: "url",
205
+ note: "Invalid hostname",
206
+ pattern: n.hostname.source,
207
+ input: t.value,
208
+ inst: e,
209
+ continue: !n.abort
210
+ }), n.protocol && !an(o, n.protocol) && t.issues.push({
211
+ code: "invalid_format",
212
+ format: "url",
213
+ note: "Invalid protocol",
214
+ pattern: n.protocol.source,
215
+ input: t.value,
216
+ inst: e,
217
+ continue: !n.abort
218
+ }), t.value = n.normalize ? o.href : H(r);
219
+ return;
220
+ } catch {
221
+ t.issues.push({
222
+ code: "invalid_format",
223
+ format: "url",
224
+ input: t.value,
225
+ inst: e,
226
+ continue: !n.abort
227
+ });
228
+ }
229
+ };
230
+ }), Sn = /* @__PURE__ */ f("$ZodEmoji", (e, n) => {
231
+ n.pattern ?? (n.pattern = Ie()), $.init(e, n);
232
+ }), En = /* @__PURE__ */ f("$ZodNanoID", (e, n) => {
233
+ if (n.length !== void 0 && (!Number.isInteger(n.length) || n.length < 1))
234
+ throw new Error(`Invalid nanoid length: ${n.length}`);
235
+ n.pattern ?? (n.pattern = n.length === void 0 ? Se : Ee(n.length)), $.init(e, n);
236
+ }), Un = /* @__PURE__ */ f("$ZodCUID", (e, n) => {
237
+ n.pattern ?? (n.pattern = Ue), $.init(e, n);
238
+ }), Dn = /* @__PURE__ */ f("$ZodCUID2", (e, n) => {
239
+ n.pattern ?? (n.pattern = De), $.init(e, n);
240
+ }), Nn = /* @__PURE__ */ f("$ZodULID", (e, n) => {
241
+ n.pattern ?? (n.pattern = Ne), $.init(e, n);
242
+ }), jn = /* @__PURE__ */ f("$ZodXID", (e, n) => {
243
+ n.pattern ?? (n.pattern = je), $.init(e, n);
244
+ }), An = /* @__PURE__ */ f("$ZodKSUID", (e, n) => {
245
+ n.pattern ?? (n.pattern = Ae), $.init(e, n);
246
+ }), Ln = /* @__PURE__ */ f("$ZodISODateTime", (e, n) => {
247
+ n.pattern ?? (n.pattern = ke(n)), $.init(e, n);
248
+ }), Cn = /* @__PURE__ */ f("$ZodISODate", (e, n) => {
249
+ n.pattern ?? (n.pattern = Pe), $.init(e, n);
250
+ }), Kn = /* @__PURE__ */ f("$ZodISOTime", (e, n) => {
251
+ n.pattern ?? (n.pattern = Re(n)), $.init(e, n);
252
+ }), Vn = /* @__PURE__ */ f("$ZodISODuration", (e, n) => {
253
+ n.pattern ?? (n.pattern = Te), $.init(e, n);
254
+ }), Bn = /* @__PURE__ */ f("$ZodIPv4", (e, n) => {
255
+ n.pattern ?? (n.pattern = Le), $.init(e, n);
256
+ }), ln = /^[0-9a-fA-F:.]+$/;
257
+ function le(e) {
258
+ return ln.test(e) ? ae(`http://[${e}]`) : !1;
259
+ }
260
+ const Fn = /* @__PURE__ */ f("$ZodIPv6", (e, n) => {
261
+ n.pattern ?? (n.pattern = Ce), $.init(e, n), e._zod.check = (t) => {
262
+ le(t.value) || t.issues.push({
263
+ code: "invalid_format",
264
+ format: "ipv6",
265
+ input: t.value,
266
+ inst: e,
267
+ continue: !n.abort
268
+ });
269
+ };
270
+ }), Mn = /* @__PURE__ */ f("$ZodCIDRv4", (e, n) => {
271
+ n.pattern ?? (n.pattern = Ke), $.init(e, n);
272
+ });
273
+ function fn(e) {
274
+ const n = e.split("/");
275
+ if (n.length !== 2)
276
+ return !1;
277
+ const [t, r] = n;
278
+ if (!r)
279
+ return !1;
280
+ const o = Number(r);
281
+ return `${o}` !== r || o < 0 || o > 128 ? !1 : le(t);
282
+ }
283
+ const Jn = /* @__PURE__ */ f("$ZodCIDRv6", (e, n) => {
284
+ n.pattern ?? (n.pattern = Ve), $.init(e, n), e._zod.check = (t) => {
285
+ fn(t.value) || t.issues.push({
286
+ code: "invalid_format",
287
+ format: "cidrv6",
288
+ input: t.value,
289
+ inst: e,
290
+ continue: !n.abort
291
+ });
292
+ };
293
+ });
294
+ function fe(e) {
295
+ if (e === "")
296
+ return !0;
297
+ if (/\s/.test(e) || e.length % 4 !== 0)
298
+ return !1;
299
+ try {
300
+ return atob(e), !0;
301
+ } catch {
302
+ return !1;
303
+ }
304
+ }
305
+ const pn = /^[0-9a-zA-Z+/]*={0,2}$/, Wn = /* @__PURE__ */ f("$ZodBase64", (e, n) => {
306
+ n.pattern ?? (n.pattern = pn), $.init(e, n), e._zod.check = (t) => {
307
+ fe(t.value) || t.issues.push({
308
+ code: "invalid_format",
309
+ format: "base64",
310
+ input: t.value,
311
+ inst: e,
312
+ continue: !n.abort
313
+ });
314
+ };
315
+ }), pe = /^[A-Za-z0-9_-]*$/;
316
+ function dn(e) {
317
+ if (!pe.test(e))
318
+ return !1;
319
+ const n = e.replace(/[-_]/g, (r) => r === "-" ? "+" : "/"), t = n.padEnd(Math.ceil(n.length / 4) * 4, "=");
320
+ return fe(t);
321
+ }
322
+ const Gn = /* @__PURE__ */ f("$ZodBase64URL", (e, n) => {
323
+ n.pattern ?? (n.pattern = pe), $.init(e, n), e._zod.check = (t) => {
324
+ dn(t.value) || t.issues.push({
325
+ code: "invalid_format",
326
+ format: "base64url",
327
+ input: t.value,
328
+ inst: e,
329
+ continue: !n.abort
330
+ });
331
+ };
332
+ }), Hn = /* @__PURE__ */ f("$ZodE164", (e, n) => {
333
+ n.pattern ?? (n.pattern = Be), $.init(e, n);
334
+ });
335
+ function hn(e, n = null) {
336
+ try {
337
+ const t = e.split(".");
338
+ if (t.length !== 3)
339
+ return !1;
340
+ const [r] = t;
341
+ if (!r)
342
+ return !1;
343
+ const o = JSON.parse(atob(r));
344
+ return !("typ" in o && o?.typ !== "JWT" || !o.alg || n && (!("alg" in o) || o.alg !== n));
345
+ } catch {
346
+ return !1;
347
+ }
348
+ }
349
+ const Xn = /* @__PURE__ */ f("$ZodJWT", (e, n) => {
350
+ $.init(e, n), e._zod.check = (t) => {
351
+ hn(t.value, n.alg) || t.issues.push({
352
+ code: "invalid_format",
353
+ format: "jwt",
354
+ input: t.value,
355
+ inst: e,
356
+ continue: !n.abort
357
+ });
358
+ };
359
+ }), vn = /* @__PURE__ */ f("$ZodNumber", (e, n) => {
360
+ z.init(e, n), e._zod.pattern = oe, e._zod.parse = (t, r) => {
361
+ if (n.coerce)
362
+ try {
363
+ t.value = Number(t.value);
364
+ } catch {
365
+ }
366
+ const o = t.value;
367
+ if (typeof o == "number" && !Number.isNaN(o) && Number.isFinite(o))
368
+ return t;
369
+ const s = typeof o == "number" ? Number.isNaN(o) ? "NaN" : Number.isFinite(o) ? void 0 : String(o) : void 0;
370
+ return t.issues.push({
371
+ expected: "number",
372
+ code: "invalid_type",
373
+ input: o,
374
+ inst: e,
375
+ ...s ? { received: s } : {}
376
+ }), t;
377
+ };
378
+ }), Yn = /* @__PURE__ */ f("$ZodNumberFormat", (e, n) => {
379
+ ze.init(e, n), vn.init(e, n);
380
+ }), qn = /* @__PURE__ */ f("$ZodBoolean", (e, n) => {
381
+ z.init(e, n), e._zod.pattern = we, e._zod.parse = (t, r) => {
382
+ if (n.coerce)
383
+ try {
384
+ t.value = !!t.value;
385
+ } catch {
386
+ }
387
+ const o = t.value;
388
+ return typeof o == "boolean" || t.issues.push({
389
+ expected: "boolean",
390
+ code: "invalid_type",
391
+ input: o,
392
+ inst: e
393
+ }), t;
394
+ };
395
+ }), Qn = /* @__PURE__ */ f("$ZodAny", (e, n) => {
396
+ z.init(e, n), e._zod.parse = (t) => t;
397
+ }), xn = /* @__PURE__ */ f("$ZodUnknown", (e, n) => {
398
+ z.init(e, n), e._zod.parse = (t) => t;
399
+ }), et = /* @__PURE__ */ f("$ZodNever", (e, n) => {
400
+ z.init(e, n), e._zod.parse = (t, r) => (t.issues.push({
401
+ expected: "never",
402
+ code: "invalid_type",
403
+ input: t.value,
404
+ inst: e
405
+ }), t);
406
+ });
407
+ function _n(e, n) {
408
+ const t = G(e._zod.def.checks);
409
+ if (!t.length)
410
+ return;
411
+ const r = Math.min(...t.map((s) => s[0])), o = e._zod.parse;
412
+ e._zod.parse = (s, c) => {
413
+ const a = n(s.value);
414
+ if (a > r && !c?.skipChecks && c?.direction !== "backward") {
415
+ for (const [l, i] of G(e._zod.def.checks))
416
+ if (a > l && i._zod.def.when(s)) {
417
+ const u = s.issues.length;
418
+ return i._zod.check(s), s.issues[u].continue = !1, K(s.issues, u, e), s;
419
+ }
420
+ }
421
+ return o(s, c);
422
+ };
423
+ }
424
+ const mn = (e) => Array.isArray(e) ? e.length : -1;
425
+ function X(e, n, t) {
426
+ e.issues.length && n.issues.push(...R(t, e.issues)), n.value[t] = e.value;
427
+ }
428
+ const nt = /* @__PURE__ */ f("$ZodArray", (e, n) => {
429
+ z.init(e, n);
430
+ const t = T.memoizer;
431
+ t?.attach(e), e._zod.parse = (r, o) => {
432
+ const s = r.value;
433
+ if (!Array.isArray(s))
434
+ return r.issues.push({
435
+ expected: "array",
436
+ code: "invalid_type",
437
+ input: s,
438
+ inst: e
439
+ }), r;
440
+ r.value = t ? t.alloc(e, r, Array(s.length), o) : Array(s.length);
441
+ const c = [], a = o?.abortEarly;
442
+ for (let l = 0; l < s.length; l++) {
443
+ const i = s[l], u = n.element._zod.run({
444
+ value: i,
445
+ issues: []
446
+ }, o);
447
+ if (u instanceof Promise)
448
+ c.push(u.then((h) => X(h, r, l)));
449
+ else if (X(u, r, l), a && u.issues.length !== 0 && k(u))
450
+ break;
451
+ }
452
+ return c.length ? Promise.all(c).then(() => r) : r;
453
+ }, _n(e, mn);
454
+ });
455
+ function j(e, n, t, r, o, s) {
456
+ const c = t in r, a = s === "optional";
457
+ if (!(!c && a && o === "optional")) {
458
+ if (e.issues.length) {
459
+ if (o !== void 0 && a && !c)
460
+ return;
461
+ n.issues.push(...R(t, e.issues));
462
+ }
463
+ if (!c && o === void 0) {
464
+ e.issues.length || n.issues.push({
465
+ code: "invalid_type",
466
+ expected: "nonoptional",
467
+ input: void 0,
468
+ path: [t]
469
+ });
470
+ return;
471
+ }
472
+ e.value === void 0 ? (c || o === "defaulted" && !a) && (n.value[t] = void 0) : n.value[t] = e.value;
473
+ }
474
+ }
475
+ const $n = [];
476
+ function de(e) {
477
+ const n = Object.keys(e.shape), t = Object.getOwnPropertySymbols(e.shape), r = t.length ? t : $n, o = r.length ? [...n, ...r] : n;
478
+ for (const c of o)
479
+ if (!e.shape?.[c]?._zod?.traits?.has("$ZodType"))
480
+ throw new Error(`Invalid element at key "${String(c)}": expected a Zod schema`);
481
+ const s = Xe(e.shape);
482
+ return {
483
+ ...e,
484
+ allKeys: o,
485
+ symbolKeys: r,
486
+ // string-only: handleCatchall matches it against `for...in`, which never yields a symbol
487
+ keySet: new Set(n),
488
+ numKeys: n.length,
489
+ optionalKeys: new Set(s)
490
+ };
491
+ }
492
+ function he(e, n, t, r, o, s, c) {
493
+ const a = [], l = o.keySet, i = o.catchall._zod, u = i.def.type, h = i.optin, v = i.optout;
494
+ let d = 0;
495
+ for (const p in n) {
496
+ if (c && t.issues.length !== d) {
497
+ if (k(t, d))
498
+ break;
499
+ d = t.issues.length;
500
+ }
501
+ if (l.has(p))
502
+ continue;
503
+ if (p === "__proto__") {
504
+ u === "never" && a.push(p);
505
+ continue;
506
+ }
507
+ if (u === "never") {
508
+ a.push(p);
509
+ continue;
510
+ }
511
+ const b = i.run({ value: n[p], issues: [] }, r);
512
+ b instanceof Promise ? e.push(b.then((g) => j(g, t, p, n, h, v))) : j(b, t, p, n, h, v);
513
+ }
514
+ return a.length && t.issues.push({
515
+ code: "unrecognized_keys",
516
+ keys: a,
517
+ input: n,
518
+ inst: s,
519
+ // Describes the shape of the input, not the validity of the parsed value, so it never aborts. The parse still fails; the schema's own checks just get to run first, and an enclosing intersection can reconcile the key against a sibling operand.
520
+ continue: !0
521
+ }), e.length ? Promise.all(e).then(() => t) : t;
522
+ }
523
+ const zn = /* @__PURE__ */ f("$ZodObject", (e, n) => {
524
+ z.init(e, n);
525
+ const t = Object.getOwnPropertyDescriptor(n, "shape"), r = t?.get ? t.get.raw : n.shape ?? {};
526
+ if (r) {
527
+ const i = () => {
528
+ const u = { ...r };
529
+ return Object.defineProperty(n, "shape", { value: u }), i.raw = u, u;
530
+ };
531
+ i.raw = r, Object.defineProperty(n, "shape", { get: i });
532
+ }
533
+ const o = se(() => de(n));
534
+ _(e, "propValues", (i) => {
535
+ const u = i.def.shape, h = {};
536
+ for (const v in u) {
537
+ const d = u[v]._zod;
538
+ if (d.values) {
539
+ Object.prototype.hasOwnProperty.call(h, v) || Ye(h, v, /* @__PURE__ */ new Set());
540
+ for (const p of d.values)
541
+ h[v].add(p);
542
+ d.optin !== void 0 && h[v].add(void 0);
543
+ }
544
+ }
545
+ return h;
546
+ });
547
+ const s = ie, c = n.catchall;
548
+ let a;
549
+ const l = T.memoizer;
550
+ l?.attach(e), e._zod.parse = (i, u) => {
551
+ a ?? (a = o.value);
552
+ const h = i.value;
553
+ if (!s(h))
554
+ return i.issues.push({
555
+ expected: "object",
556
+ code: "invalid_type",
557
+ input: h,
558
+ inst: e
559
+ }), i;
560
+ i.value = l ? l.alloc(e, i, {}, u) : {};
561
+ const v = [], d = a.shape, p = u?.abortEarly;
562
+ let b = i.issues.length;
563
+ for (const g of a.allKeys) {
564
+ if (p && i.issues.length !== b) {
565
+ if (k(i, b))
566
+ break;
567
+ b = i.issues.length;
568
+ }
569
+ if (g === "__proto__")
570
+ continue;
571
+ const y = d[g], P = y._zod.optin, O = y._zod.optout, I = y._zod.run({ value: h[g], issues: [] }, u);
572
+ I instanceof Promise ? v.push(I.then((Z) => j(Z, i, g, h, P, O))) : j(I, i, g, h, P, O);
573
+ }
574
+ return c ? he(v, h, i, u, o.value, e, p === !0) : v.length ? Promise.all(v).then(() => i) : i;
575
+ };
576
+ }), tt = /* @__PURE__ */ f("$ZodObjectJIT", (e, n) => {
577
+ zn.init(e, n);
578
+ const t = e._zod.parse, r = se(() => de(n)), o = T.memoizer, s = (d) => {
579
+ const p = r.value, b = p.symbolKeys, g = new Ze(["payload", "ctx"], { shape: d, inst: e, memo: o, syms: b }), y = (Z) => `shape[${Z}]._zod.run({ value: input[${Z}], issues: [] }, ctx)`, P = (Z, m) => `
580
+ let ${Z}_ab = false;
581
+ for (let i = 0; i < ${Z}.issues.length; i++) {
582
+ const iss = ${Z}.issues[i];
583
+ iss.path = iss.path ? [${m}, ...iss.path] : [${m}];
584
+ payload.issues.push(iss);
585
+ if (iss.continue !== true) ${Z}_ab = true;
586
+ }
587
+ if (${Z}_ab && ctx && ctx.abortEarly) {
588
+ payload.value = newResult;
589
+ return payload;
590
+ }`;
591
+ g.write("const input = payload.value;");
592
+ const O = /* @__PURE__ */ Object.create(null);
593
+ let I = 0;
594
+ for (const Z of p.allKeys)
595
+ O[Z] = `key_${I++}`;
596
+ g.write(o ? "const newResult = memo.alloc(inst, payload, {}, ctx);" : "const newResult = {};");
597
+ for (const Z of p.allKeys) {
598
+ if (Z === "__proto__")
599
+ continue;
600
+ const m = O[Z], w = typeof Z == "symbol" ? `syms[${b.indexOf(Z)}]` : Je(Z), A = `${w} in input`, F = d[Z], L = F?._zod?.optin, M = L !== void 0, ve = F?._zod?.optout === "optional";
601
+ if (g.write(`const ${m} = ${y(w)};`), M && ve) {
602
+ const _e = L === "optional" ? `${m}_present` : `${m}.value !== undefined || ${m}_present`;
603
+ g.write(`
604
+ const ${m}_present = ${A};
605
+ if (!${m}.issues.length || ${m}_present) {
606
+ if (${m}.issues.length) {${P(m, w)}
607
+ }
608
+
609
+ if (${_e}) {
610
+ newResult[${w}] = ${m}.value;
611
+ }
612
+ }
613
+
614
+ `);
615
+ } else M ? (g.write(`
616
+ if (${m}.issues.length) {${P(m, w)}
617
+ }
618
+ `), L === "defaulted" ? g.write(`newResult[${w}] = ${m}.value;`) : g.write(`
619
+ if (${m}.value !== undefined || ${A}) {
620
+ newResult[${w}] = ${m}.value;
621
+ }
622
+ `)) : g.write(`
623
+ const ${m}_present = ${A};
624
+ if (${m}.issues.length) {${P(m, w)}
625
+ }
626
+ if (!${m}_present && !${m}.issues.length) {
627
+ payload.issues.push({
628
+ code: "invalid_type",
629
+ expected: "nonoptional",
630
+ input: undefined,
631
+ path: [${w}]
632
+ });
633
+ if (ctx && ctx.abortEarly) {
634
+ payload.value = newResult;
635
+ return payload;
636
+ }
637
+ }
638
+
639
+ if (${m}_present) {
640
+ newResult[${w}] = ${m}.value;
641
+ }
642
+
643
+ `);
644
+ }
645
+ return g.write("payload.value = newResult;"), g.write("return payload;"), g.compile();
646
+ };
647
+ let c;
648
+ const a = ie, l = !T.jitless, u = l && Me.value, h = n.catchall;
649
+ let v;
650
+ e._zod.parse = (d, p) => {
651
+ v ?? (v = r.value);
652
+ const b = d.value;
653
+ return a(b) ? l && u && p?.async === !1 && p.jitless !== !0 ? (c || (c = s(n.shape)), d = c(d, p), h ? he([], b, d, p, v, e, p?.abortEarly === !0) : d) : t(d, p) : (d.issues.push({
654
+ expected: "object",
655
+ code: "invalid_type",
656
+ input: b,
657
+ inst: e
658
+ }), d);
659
+ };
660
+ });
661
+ function Y(e, n, t, r) {
662
+ for (const s of e)
663
+ if (s.issues.length === 0)
664
+ return n.value = s.value, n;
665
+ const o = e.filter((s) => !k(s));
666
+ return o.length === 1 ? (n.value = o[0].value, o[0]) : (n.issues.push({
667
+ code: "invalid_union",
668
+ input: n.value,
669
+ inst: t,
670
+ errors: e.map((s) => s.issues.map((c) => E(c, r, S())))
671
+ }), n);
672
+ }
673
+ const rt = /* @__PURE__ */ f("$ZodUnion", (e, n) => {
674
+ z.init(e, n), _(e, "optin", (r) => r.def.options.some((o) => o._zod.optin === "defaulted") ? "defaulted" : r.def.options.some((o) => o._zod.optin !== void 0) ? "optional" : void 0), _(e, "optout", (r) => r.def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), _(e, "values", (r) => {
675
+ if (r.def.options.every((o) => o._zod.values))
676
+ return new Set(r.def.options.flatMap((o) => Array.from(o._zod.values)));
677
+ }), _(e, "pattern", (r) => {
678
+ if (r.def.options.every((o) => o._zod.pattern)) {
679
+ const o = r.def.options.map((s) => s._zod.pattern);
680
+ return new RegExp(`^(${o.map((s) => B(s.source)).join("|")})$`);
681
+ }
682
+ });
683
+ const t = n.options.length === 1 ? n.options[0]._zod.run : null;
684
+ e._zod.parse = (r, o) => {
685
+ if (t)
686
+ return t(r, o);
687
+ let s = !1;
688
+ const c = [];
689
+ for (const a of n.options) {
690
+ const l = a._zod.run({
691
+ value: r.value,
692
+ issues: []
693
+ }, o);
694
+ if (l instanceof Promise)
695
+ c.push(l), s = !0;
696
+ else {
697
+ if (l.issues.length === 0)
698
+ return l;
699
+ c.push(l);
700
+ }
701
+ }
702
+ return s ? Promise.all(c).then((a) => Y(a, r, e, o)) : Y(c, r, e, o);
703
+ };
704
+ }), ot = /* @__PURE__ */ f("$ZodIntersection", (e, n) => {
705
+ z.init(e, n), e._zod.parse = (t, r) => {
706
+ const o = t.value, s = n.left._zod.run({ value: o, issues: [] }, r), c = n.right._zod.run({ value: o, issues: [] }, r);
707
+ return s instanceof Promise || c instanceof Promise ? Promise.all([s, c]).then(([l, i]) => q(t, l, i)) : q(t, s, c);
708
+ };
709
+ });
710
+ function V(e, n) {
711
+ if (e === n)
712
+ return { valid: !0, data: e };
713
+ if (e instanceof Date && n instanceof Date && +e == +n)
714
+ return { valid: !0, data: e };
715
+ if (C(e) && C(n)) {
716
+ const t = Object.keys(n), r = Object.keys(e).filter((s) => t.indexOf(s) !== -1), o = { ...e, ...n };
717
+ Object.prototype.hasOwnProperty.call(o, "__proto__") && delete o.__proto__;
718
+ for (const s of r) {
719
+ if (s === "__proto__")
720
+ continue;
721
+ const c = V(e[s], n[s]);
722
+ if (!c.valid)
723
+ return {
724
+ valid: !1,
725
+ mergeErrorPath: [s, ...c.mergeErrorPath]
726
+ };
727
+ o[s] = c.data;
728
+ }
729
+ return { valid: !0, data: o };
730
+ }
731
+ if (Array.isArray(e) && Array.isArray(n)) {
732
+ if (e.length !== n.length)
733
+ return { valid: !1, mergeErrorPath: [] };
734
+ const t = [];
735
+ for (let r = 0; r < e.length; r++) {
736
+ const o = e[r], s = n[r], c = V(o, s);
737
+ if (!c.valid)
738
+ return {
739
+ valid: !1,
740
+ mergeErrorPath: [r, ...c.mergeErrorPath]
741
+ };
742
+ t.push(c.data);
743
+ }
744
+ return { valid: !0, data: t };
745
+ }
746
+ return { valid: !1, mergeErrorPath: [] };
747
+ }
748
+ function q(e, n, t) {
749
+ const r = /* @__PURE__ */ new Map();
750
+ let o;
751
+ const s = /* @__PURE__ */ new Map(), c = (i, u) => {
752
+ let h;
753
+ if (i.code === "unrecognized_keys" && !i.path?.length)
754
+ o ?? (o = i), h = i.keys;
755
+ else if (i.code === "invalid_key" && i.origin === "record" && i.path?.length === 1) {
756
+ const v = String(i.path[0]);
757
+ s.has(v) || s.set(v, i), h = [v];
758
+ } else
759
+ return !1;
760
+ for (const v of h)
761
+ r.has(v) || r.set(v, {}), r.get(v)[u] = !0;
762
+ return !0;
763
+ };
764
+ for (const i of n.issues)
765
+ c(i, "l") || e.issues.push(i);
766
+ for (const i of t.issues)
767
+ c(i, "r") || e.issues.push(i);
768
+ const a = [...r].filter(([, i]) => i.l && i.r).map(([i]) => i);
769
+ if (a.length) {
770
+ const i = o ? a.filter((u) => o.keys.includes(u)) : [];
771
+ i.length && e.issues.push({ ...o, keys: i });
772
+ for (const u of a)
773
+ !i.includes(u) && s.has(u) && e.issues.push(s.get(u));
774
+ }
775
+ const l = V(n.value, t.value);
776
+ if (!l.valid) {
777
+ if (k(e))
778
+ return e;
779
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(l.mergeErrorPath)}`);
780
+ }
781
+ return e.value = l.data, e;
782
+ }
783
+ const st = /* @__PURE__ */ f("$ZodRecord", (e, n) => {
784
+ z.init(e, n);
785
+ const t = T.memoizer;
786
+ t?.attach(e), e._zod.parse = (r, o) => {
787
+ const s = r.value;
788
+ if (!C(s))
789
+ return r.issues.push({
790
+ expected: "record",
791
+ code: "invalid_type",
792
+ input: s,
793
+ inst: e
794
+ }), r;
795
+ const c = [], a = n.keyType._zod.values;
796
+ if (a && !n.partial) {
797
+ r.value = t ? t.alloc(e, r, {}, o) : {};
798
+ const l = /* @__PURE__ */ new Set();
799
+ for (const u of a)
800
+ if (typeof u == "string" || typeof u == "number" || typeof u == "symbol") {
801
+ if (l.add(typeof u == "number" ? u.toString() : u), u === "__proto__")
802
+ continue;
803
+ const h = n.keyType._zod.run({ value: u, issues: [] }, o);
804
+ if (h instanceof Promise)
805
+ throw new Error("Async schemas not supported in object keys currently");
806
+ if (h.issues.length) {
807
+ r.issues.push({
808
+ code: "invalid_key",
809
+ origin: "record",
810
+ issues: h.issues.map((p) => E(p, o, S())),
811
+ input: u,
812
+ path: [u],
813
+ inst: e
814
+ });
815
+ continue;
816
+ }
817
+ const v = h.value;
818
+ if (v === "__proto__")
819
+ continue;
820
+ const d = n.valueType._zod.run({ value: s[u], issues: [] }, o);
821
+ d instanceof Promise ? c.push(d.then((p) => {
822
+ p.issues.length && r.issues.push(...R(u, p.issues)), r.value[v] = p.value;
823
+ })) : (d.issues.length && r.issues.push(...R(u, d.issues)), r.value[v] = d.value);
824
+ }
825
+ let i;
826
+ for (const u in s)
827
+ if (!l.has(u))
828
+ if (n.mode === "loose") {
829
+ if (u === "__proto__")
830
+ continue;
831
+ r.value[u] = s[u];
832
+ } else
833
+ i = i ?? [], i.push(u);
834
+ i && i.length > 0 && r.issues.push({
835
+ code: "unrecognized_keys",
836
+ input: s,
837
+ inst: e,
838
+ keys: i,
839
+ continue: !0
840
+ });
841
+ } else {
842
+ r.value = t ? t.alloc(e, r, {}, o) : {};
843
+ let l;
844
+ for (const i of Reflect.ownKeys(s)) {
845
+ if (i === "__proto__" || !Object.prototype.propertyIsEnumerable.call(s, i))
846
+ continue;
847
+ let u = n.keyType._zod.run({ value: i, issues: [] }, o);
848
+ if (u instanceof Promise)
849
+ throw new Error("Async schemas not supported in object keys currently");
850
+ if (typeof i == "string" && oe.test(i) && u.issues.length) {
851
+ const p = n.keyType._zod.run({ value: Number(i), issues: [] }, o);
852
+ if (p instanceof Promise)
853
+ throw new Error("Async schemas not supported in object keys currently");
854
+ p.issues.length === 0 && (u = p);
855
+ }
856
+ if (u.issues.length) {
857
+ n.mode === "loose" ? r.value[i] = s[i] : a ? (l = l ?? [], l.push(i)) : r.issues.push({
858
+ code: "invalid_key",
859
+ origin: "record",
860
+ issues: u.issues.map((p) => E(p, o, S())),
861
+ input: i,
862
+ path: [i],
863
+ inst: e
864
+ });
865
+ continue;
866
+ }
867
+ const v = u.value;
868
+ if (v === "__proto__")
869
+ continue;
870
+ const d = n.valueType._zod.run({ value: s[i], issues: [] }, o);
871
+ d instanceof Promise ? c.push(d.then((p) => {
872
+ p.issues.length && r.issues.push(...R(i, p.issues)), r.value[v] = p.value;
873
+ })) : (d.issues.length && r.issues.push(...R(i, d.issues)), r.value[v] = d.value);
874
+ }
875
+ l && l.length > 0 && r.issues.push({
876
+ code: "unrecognized_keys",
877
+ input: s,
878
+ inst: e,
879
+ keys: l,
880
+ continue: !0
881
+ });
882
+ }
883
+ return c.length ? Promise.all(c).then(() => r) : r;
884
+ };
885
+ }), it = /* @__PURE__ */ f("$ZodEnum", (e, n) => {
886
+ z.init(e, n);
887
+ const t = W(n.entries), r = new Set(t);
888
+ e._zod.values = r, _(e, "pattern", (o) => {
889
+ const s = W(o.def.entries).filter((c) => qe.has(typeof c));
890
+ return new RegExp(s.length ? `^(${s.map((c) => Qe(c.toString())).join("|")})$` : "^[^\\s\\S]$");
891
+ }), e._zod.parse = (o, s) => {
892
+ const c = o.value;
893
+ return r.has(c) || o.issues.push({
894
+ code: "invalid_value",
895
+ values: t,
896
+ input: c,
897
+ inst: e
898
+ }), o;
899
+ };
900
+ }), ut = /* @__PURE__ */ f("$ZodTransform", (e, n) => {
901
+ z.init(e, n), e._zod.optin = "optional", T.memoizer?.guard(e), e._zod.parse = (t, r) => {
902
+ if (r.direction === "backward")
903
+ throw new ge(e.constructor.name);
904
+ const o = n.transform(t.value, t);
905
+ if (r.async)
906
+ return (o instanceof Promise ? o : Promise.resolve(o)).then((c) => (t.value = c, t));
907
+ if (o instanceof Promise)
908
+ throw new D();
909
+ return t.value = o, t;
910
+ };
911
+ });
912
+ function Q(e, n) {
913
+ return e.value = n.issues.length ? void 0 : n.value, e;
914
+ }
915
+ const gn = /* @__PURE__ */ f("$ZodOptional", (e, n) => {
916
+ z.init(e, n), _(e, "optin", (t) => t.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional"), e._zod.optout = "optional", _(e, "values", (t) => {
917
+ const r = t.def.innerType._zod.values;
918
+ return r ? /* @__PURE__ */ new Set([...r, void 0]) : void 0;
919
+ }), _(e, "pattern", (t) => {
920
+ const r = t.def.innerType._zod.pattern;
921
+ return r ? new RegExp(`^(${B(r.source)})?$`) : void 0;
922
+ }), e._zod.parse = (t, r) => {
923
+ if (t.value === void 0) {
924
+ if (n.innerType._zod.optin !== "defaulted")
925
+ return t;
926
+ const o = n.innerType._zod.run({ value: t.value, issues: [] }, r);
927
+ return o instanceof Promise ? o.then((s) => Q(t, s)) : Q(t, o);
928
+ }
929
+ return n.innerType._zod.run(t, r);
930
+ };
931
+ }), ct = /* @__PURE__ */ f("$ZodExactOptional", (e, n) => {
932
+ gn.init(e, n), _(e, "values", (t) => t.def.innerType._zod.values), _(e, "pattern", (t) => t.def.innerType._zod.pattern), e._zod.parse = (t, r) => n.innerType._zod.run(t, r);
933
+ }), at = /* @__PURE__ */ f("$ZodNullable", (e, n) => {
934
+ z.init(e, n), _(e, "optin", (t) => t.def.innerType._zod.optin), _(e, "optout", (t) => t.def.innerType._zod.optout), _(e, "pattern", (t) => {
935
+ const r = t.def.innerType._zod.pattern;
936
+ return r ? new RegExp(`^(${B(r.source)}|null)$`) : void 0;
937
+ }), _(e, "values", (t) => t.def.innerType._zod.values ? /* @__PURE__ */ new Set([...t.def.innerType._zod.values, null]) : void 0), e._zod.parse = (t, r) => t.value === null ? t : n.innerType._zod.run(t, r);
938
+ }), lt = /* @__PURE__ */ f("$ZodDefault", (e, n) => {
939
+ z.init(e, n), e._zod.optin = "defaulted", _(e, "values", (t) => t.def.innerType._zod.values), e._zod.parse = (t, r) => {
940
+ if (r.direction === "backward")
941
+ return n.innerType._zod.run(t, r);
942
+ if (t.value === void 0)
943
+ return t.value = n.defaultValue, t;
944
+ const o = n.innerType._zod.run(t, r);
945
+ return o instanceof Promise ? o.then((s) => x(s, n)) : x(o, n);
946
+ };
947
+ });
948
+ function x(e, n) {
949
+ return e.value === void 0 && (e.value = n.defaultValue), e;
950
+ }
951
+ const ft = /* @__PURE__ */ f("$ZodPrefault", (e, n) => {
952
+ z.init(e, n), e._zod.optin = "defaulted", _(e, "values", (t) => t.def.innerType._zod.values), e._zod.parse = (t, r) => (r.direction === "backward" || t.value === void 0 && (t.value = n.defaultValue), n.innerType._zod.run(t, r));
953
+ }), pt = /* @__PURE__ */ f("$ZodNonOptional", (e, n) => {
954
+ z.init(e, n), _(e, "values", (t) => {
955
+ const r = t.def.innerType._zod.values;
956
+ return r ? new Set([...r].filter((o) => o !== void 0)) : void 0;
957
+ }), e._zod.parse = (t, r) => {
958
+ const o = n.innerType._zod.run(t, r);
959
+ return o instanceof Promise ? o.then((s) => ee(s, e)) : ee(o, e);
960
+ };
961
+ });
962
+ function ee(e, n) {
963
+ return !e.issues.length && e.value === void 0 && e.issues.push({
964
+ code: "invalid_type",
965
+ expected: "nonoptional",
966
+ input: e.value,
967
+ inst: n
968
+ }), e;
969
+ }
970
+ function ne(e, n, t, r) {
971
+ return n.issues.length ? (e.value = t.catchValue({
972
+ ...n,
973
+ value: e.value,
974
+ error: {
975
+ issues: n.issues.map((o) => E(o, r, S()))
976
+ },
977
+ input: e.value
978
+ }), e) : (e.value = n.value, n.memo && (e.memo = !0), e);
979
+ }
980
+ const dt = /* @__PURE__ */ f("$ZodCatch", (e, n) => {
981
+ z.init(e, n), _(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, r) => {
982
+ if (r.direction === "backward")
983
+ return n.innerType._zod.run(t, r);
984
+ const o = n.innerType._zod.run({ value: t.value, issues: [] }, r);
985
+ return o instanceof Promise ? o.then((s) => ne(t, s, n, r)) : ne(t, o, n, r);
986
+ };
987
+ }), ht = /* @__PURE__ */ f("$ZodPipe", (e, n) => {
988
+ z.init(e, n), _(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, r) => {
989
+ if (r.direction === "backward") {
990
+ const s = n.out._zod.run(t, r);
991
+ return s instanceof Promise ? s.then((c) => U(c, n.in, r)) : U(s, n.in, r);
992
+ }
993
+ const o = n.in._zod.run(t, r);
994
+ return o instanceof Promise ? o.then((s) => U(s, n.out, r)) : U(o, n.out, r);
995
+ };
996
+ });
997
+ function U(e, n, t) {
998
+ return e.issues.some((r) => r.code !== "unrecognized_keys") ? (e.aborted = !0, e) : n._zod.run({ value: e.value, issues: e.issues }, t);
999
+ }
1000
+ const vt = /* @__PURE__ */ f("$ZodReadonly", (e, n) => {
1001
+ z.init(e, n), _(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, r) => {
1002
+ if (r.direction === "backward")
1003
+ return n.innerType._zod.run(t, r);
1004
+ const o = n.innerType._zod.run(t, r);
1005
+ return o instanceof Promise ? o.then(te) : te(o);
1006
+ };
1007
+ });
1008
+ function te(e) {
1009
+ return e.memo || (e.value = Object.freeze(e.value)), e;
1010
+ }
1011
+ const _t = /* @__PURE__ */ f("$ZodCustom", (e, n) => {
1012
+ $e.init(e, n), z.init(e, n), e._zod.parse = (t, r) => t, e._zod.check = (t) => {
1013
+ const r = t.value, o = n.fn(r);
1014
+ if (o instanceof Promise)
1015
+ return o.then((s) => re(s, t, r, e));
1016
+ re(o, t, r, e);
1017
+ };
1018
+ });
1019
+ function re(e, n, t, r) {
1020
+ if (!e) {
1021
+ const o = {
1022
+ code: "custom",
1023
+ input: t,
1024
+ inst: r,
1025
+ // incorporates params.error into issue reporting
1026
+ path: [...r._zod.def.path ?? []],
1027
+ // incorporates params.error into issue reporting
1028
+ continue: !r._zod.def.abort
1029
+ // params: inst._zod.def.params,
1030
+ };
1031
+ r._zod.def.params && (o.params = r._zod.def.params), n.issues.push(xe(o));
1032
+ }
1033
+ }
1034
+ export {
1035
+ Qn as $ZodAny,
1036
+ nt as $ZodArray,
1037
+ Wn as $ZodBase64,
1038
+ Gn as $ZodBase64URL,
1039
+ qn as $ZodBoolean,
1040
+ Mn as $ZodCIDRv4,
1041
+ Jn as $ZodCIDRv6,
1042
+ Un as $ZodCUID,
1043
+ Dn as $ZodCUID2,
1044
+ dt as $ZodCatch,
1045
+ _t as $ZodCustom,
1046
+ lt as $ZodDefault,
1047
+ Hn as $ZodE164,
1048
+ On as $ZodEmail,
1049
+ Sn as $ZodEmoji,
1050
+ it as $ZodEnum,
1051
+ ct as $ZodExactOptional,
1052
+ Tn as $ZodGUID,
1053
+ Bn as $ZodIPv4,
1054
+ Fn as $ZodIPv6,
1055
+ Cn as $ZodISODate,
1056
+ Ln as $ZodISODateTime,
1057
+ Vn as $ZodISODuration,
1058
+ Kn as $ZodISOTime,
1059
+ ot as $ZodIntersection,
1060
+ Xn as $ZodJWT,
1061
+ An as $ZodKSUID,
1062
+ En as $ZodNanoID,
1063
+ et as $ZodNever,
1064
+ pt as $ZodNonOptional,
1065
+ at as $ZodNullable,
1066
+ vn as $ZodNumber,
1067
+ Yn as $ZodNumberFormat,
1068
+ zn as $ZodObject,
1069
+ tt as $ZodObjectJIT,
1070
+ gn as $ZodOptional,
1071
+ ht as $ZodPipe,
1072
+ ft as $ZodPrefault,
1073
+ vt as $ZodReadonly,
1074
+ st as $ZodRecord,
1075
+ rn as $ZodString,
1076
+ $ as $ZodStringFormat,
1077
+ ut as $ZodTransform,
1078
+ z as $ZodType,
1079
+ Nn as $ZodULID,
1080
+ In as $ZodURL,
1081
+ yn as $ZodUUID,
1082
+ rt as $ZodUnion,
1083
+ xn as $ZodUnknown,
1084
+ jn as $ZodXID,
1085
+ ce as URL_BAD_FORMAT,
1086
+ N as URL_UNPARSEABLE,
1087
+ pn as base64Charset,
1088
+ pe as base64urlCharset,
1089
+ ae as canParseURL,
1090
+ zt as clone,
1091
+ fe as isValidBase64,
1092
+ dn as isValidBase64URL,
1093
+ fn as isValidCIDRv6,
1094
+ le as isValidIPv6,
1095
+ hn as isValidJWT,
1096
+ V as mergeValues,
1097
+ sn as parseURLObject,
1098
+ tn as standardProps,
1099
+ H as stripTabAndNewline,
1100
+ cn as urlHostnameOk,
1101
+ an as urlProtocolOk,
1102
+ on as validateURL
1103
+ };
1104
+ //# sourceMappingURL=schemas.js.map