likec4 1.57.0 → 1.59.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/__app__/codegen/react.mjs +7 -8
  2. package/__app__/codegen/webcomponent.mjs +78 -889
  3. package/__app__/src/aichat/index.mjs +8 -1
  4. package/__app__/src/chunks/AIChat.mjs +956 -0
  5. package/__app__/src/chunks/LikeC4Styles.mjs +2164 -0
  6. package/__app__/src/chunks/ProjectsOverview.mjs +537 -0
  7. package/__app__/src/chunks/es.mjs +439 -0
  8. package/__app__/src/chunks/hooks.mjs +458 -0
  9. package/__app__/src/chunks/libs/@floating-ui.mjs +2218 -0
  10. package/__app__/src/chunks/libs/@mantine.mjs +12974 -0
  11. package/__app__/src/chunks/libs/@tanstack-ai.mjs +1768 -0
  12. package/__app__/src/chunks/libs/@tanstack.mjs +2693 -0
  13. package/__app__/src/chunks/libs/@xstate/react.mjs +1996 -0
  14. package/__app__/src/chunks/libs/@xyflow/react.mjs +5280 -0
  15. package/__app__/src/chunks/libs/bezier-js.mjs +1006 -0
  16. package/__app__/src/chunks/libs/d3.mjs +2842 -0
  17. package/__app__/src/chunks/libs/fast-equals.mjs +268 -0
  18. package/__app__/src/chunks/libs/framer.mjs +5905 -0
  19. package/__app__/src/chunks/libs/zod.mjs +3173 -0
  20. package/__app__/src/chunks/rolldown-runtime.mjs +30 -0
  21. package/__app__/src/chunks/styled-system.mjs +1047 -0
  22. package/__app__/src/fonts.css +1 -1
  23. package/__app__/src/main.mjs +27659 -14
  24. package/__app__/src/style.css +1 -1
  25. package/dist/chunks/dist.mjs +10 -0
  26. package/dist/chunks/enableServer.mjs +1 -1
  27. package/dist/chunks/filenames.mjs +2 -2
  28. package/dist/chunks/index.d.mts +9 -9
  29. package/dist/chunks/index2.d.mts +2167 -867
  30. package/dist/chunks/libs/@chevrotain/gast.mjs +1 -1
  31. package/dist/chunks/libs/@chevrotain/regexp-to-ast.mjs +1 -1
  32. package/dist/chunks/libs/@logtape/logtape.mjs +4 -3
  33. package/dist/chunks/libs/@ts-graphviz/common.d.mts +1 -2
  34. package/dist/chunks/libs/@ts-graphviz/core.mjs +1 -1
  35. package/dist/chunks/libs/chevrotain-allstar.mjs +2 -2
  36. package/dist/chunks/libs/chevrotain.mjs +25 -25
  37. package/dist/chunks/libs/json5.mjs +1 -1
  38. package/dist/chunks/libs/langium.d.mts +2940 -2914
  39. package/dist/chunks/libs/langium.mjs +9 -9
  40. package/dist/chunks/libs/merge-error-cause.mjs +1 -1
  41. package/dist/chunks/libs/p-queue.mjs +1 -1
  42. package/dist/chunks/libs/package-manager-detector.mjs +1 -1
  43. package/dist/chunks/libs/pako.mjs +1 -1
  44. package/dist/chunks/libs/picomatch.mjs +1 -1
  45. package/dist/chunks/libs/pretty-ms.mjs +1 -1
  46. package/dist/chunks/libs/remeda.mjs +1 -1
  47. package/dist/chunks/libs/ufo.mjs +1 -1
  48. package/dist/chunks/libs/unstorage.d.mts +1 -0
  49. package/dist/chunks/libs/unstorage.mjs +1 -1
  50. package/dist/chunks/libs/which.mjs +1 -1
  51. package/dist/chunks/libs/zod.d.mts +48 -36
  52. package/dist/chunks/libs/zod.mjs +65 -0
  53. package/dist/chunks/logger.mjs +1 -0
  54. package/dist/chunks/node.mjs +65 -63
  55. package/dist/chunks/rolldown-runtime.mjs +1 -1
  56. package/dist/chunks/sequence-view.mjs +1 -1
  57. package/dist/chunks/{plugin.mjs → vite-plugin.mjs} +41 -41
  58. package/dist/cli/index.mjs +186 -144
  59. package/dist/index.d.mts +3 -4
  60. package/dist/index.mjs +1 -1
  61. package/dist/model/index.d.mts +6 -5
  62. package/dist/vite-plugin/index.d.mts +6 -9
  63. package/dist/vite-plugin/index.mjs +1 -1
  64. package/dist/vite-plugin/internal/index.d.mts +64 -64
  65. package/dist/vite-plugin/internal/index.mjs +946 -1
  66. package/package.json +51 -52
  67. package/react/index.d.mts +853 -134
  68. package/react/index.mjs +49718 -44030
  69. package/__app__/chunks/AIChat2.mjs +0 -2
  70. package/__app__/chunks/DiagramActorProvider.mjs +0 -10
  71. package/__app__/chunks/EmbedPage.mjs +0 -1
  72. package/__app__/chunks/ExportPage.mjs +0 -2
  73. package/__app__/chunks/LikeC4Diagram.mjs +0 -19
  74. package/__app__/chunks/LikeC4Styles.mjs +0 -48
  75. package/__app__/chunks/Markdown.mjs +0 -1
  76. package/__app__/chunks/NavigationPanel.mjs +0 -1
  77. package/__app__/chunks/ViewReact.mjs +0 -1
  78. package/__app__/chunks/adhoc-editor.mjs +0 -1
  79. package/__app__/chunks/aichat.mjs +0 -1
  80. package/__app__/chunks/box.mjs +0 -1
  81. package/__app__/chunks/create-style-context.mjs +0 -1
  82. package/__app__/chunks/css.mjs +0 -1
  83. package/__app__/chunks/factory.mjs +0 -1
  84. package/__app__/chunks/hooks.mjs +0 -1
  85. package/__app__/chunks/hstack.mjs +0 -1
  86. package/__app__/chunks/libs/@dagrejs/dagre.mjs +0 -1
  87. package/__app__/chunks/libs/@floating-ui/core.mjs +0 -1
  88. package/__app__/chunks/libs/@floating-ui/dom.mjs +0 -1
  89. package/__app__/chunks/libs/@floating-ui/react.mjs +0 -1
  90. package/__app__/chunks/libs/@mantine/core.mjs +0 -41
  91. package/__app__/chunks/libs/@mantine/hooks.mjs +0 -1
  92. package/__app__/chunks/libs/@nanostores/react.mjs +0 -1
  93. package/__app__/chunks/libs/@react-hookz/web.mjs +0 -1
  94. package/__app__/chunks/libs/@tabler/icons-react.mjs +0 -358
  95. package/__app__/chunks/libs/@tanstack/ai-client.mjs +0 -2
  96. package/__app__/chunks/libs/@tanstack/ai-react-ui.mjs +0 -1
  97. package/__app__/chunks/libs/@tanstack/ai-react.mjs +0 -1
  98. package/__app__/chunks/libs/@tanstack/ai.mjs +0 -2
  99. package/__app__/chunks/libs/@tanstack/history.mjs +0 -1
  100. package/__app__/chunks/libs/@tanstack/react-router.mjs +0 -3
  101. package/__app__/chunks/libs/@tanstack/router-core.mjs +0 -1
  102. package/__app__/chunks/libs/@xstate/react.mjs +0 -1
  103. package/__app__/chunks/libs/@xstate/store.mjs +0 -1
  104. package/__app__/chunks/libs/@xyflow/react.mjs +0 -7
  105. package/__app__/chunks/libs/@zag-js/anatomy.mjs +0 -1
  106. package/__app__/chunks/libs/@zag-js/collection.mjs +0 -1
  107. package/__app__/chunks/libs/@zag-js/core.mjs +0 -1
  108. package/__app__/chunks/libs/@zag-js/react.mjs +0 -1
  109. package/__app__/chunks/libs/@zag-js/tree-view.mjs +0 -1
  110. package/__app__/chunks/libs/bezier-js.mjs +0 -1
  111. package/__app__/chunks/libs/copy-anything.mjs +0 -1
  112. package/__app__/chunks/libs/d3-path.mjs +0 -1
  113. package/__app__/chunks/libs/d3-shape.mjs +0 -1
  114. package/__app__/chunks/libs/fast-equals.mjs +0 -1
  115. package/__app__/chunks/libs/framer-motion.mjs +0 -9
  116. package/__app__/chunks/libs/html-to-image.mjs +0 -2
  117. package/__app__/chunks/libs/motion-dom.mjs +0 -1
  118. package/__app__/chunks/libs/nanostores.mjs +0 -1
  119. package/__app__/chunks/libs/react-error-boundary.mjs +0 -1
  120. package/__app__/chunks/libs/react-resizable-panels.mjs +0 -1
  121. package/__app__/chunks/libs/remeda.mjs +0 -1
  122. package/__app__/chunks/libs/superjson.mjs +0 -1
  123. package/__app__/chunks/libs/zod.mjs +0 -64
  124. package/__app__/chunks/rolldown-runtime.mjs +0 -1
  125. package/__app__/chunks/styles.css.mjs +0 -1
  126. package/__app__/chunks/txt.mjs +0 -1
  127. package/__app__/chunks/useLikeC4Project.mjs +0 -1
  128. package/__app__/src/pages/AdHocViewEditor.mjs +0 -1
  129. package/__app__/src/pages/EmbedPage.mjs +0 -1
  130. package/__app__/src/pages/ExportPage.mjs +0 -1
  131. package/__app__/src/pages/ProjectsOverview.mjs +0 -1
  132. package/__app__/src/pages/ViewAsD2.mjs +0 -1
  133. package/__app__/src/pages/ViewAsDot.mjs +0 -1
  134. package/__app__/src/pages/ViewAsMmd.mjs +0 -1
  135. package/__app__/src/pages/ViewAsPuml.mjs +0 -1
  136. package/__app__/src/pages/ViewEditor.mjs +0 -1
  137. package/__app__/src/pages/ViewReact.mjs +0 -1
  138. package/dist/chunks/libs/@chevrotain/utils.mjs +0 -1
  139. package/dist/chunks/libs/@hono/mcp.mjs +0 -70
  140. package/dist/chunks/libs/@hono/node-server.mjs +0 -1
  141. package/dist/chunks/libs/@logtape/logtape.d.mts +0 -1023
  142. package/dist/chunks/libs/@modelcontextprotocol/sdk.mjs +0 -12
  143. package/dist/chunks/libs/ajv.mjs +0 -1
  144. package/dist/chunks/libs/ansi-align.mjs +0 -2
  145. package/dist/chunks/libs/ansi-regex.mjs +0 -1
  146. package/dist/chunks/libs/ansi-styles.mjs +0 -1
  147. package/dist/chunks/libs/atomically.mjs +0 -1
  148. package/dist/chunks/libs/boxen.mjs +0 -22
  149. package/dist/chunks/libs/conf.mjs +0 -1
  150. package/dist/chunks/libs/defu.mjs +0 -1
  151. package/dist/chunks/libs/destr.mjs +0 -1
  152. package/dist/chunks/libs/find-up-simple.mjs +0 -1
  153. package/dist/chunks/libs/get-port.mjs +0 -1
  154. package/dist/chunks/libs/hono.mjs +0 -1
  155. package/dist/chunks/libs/is-docker.mjs +0 -1
  156. package/dist/chunks/libs/is-error-instance.mjs +0 -1
  157. package/dist/chunks/libs/is-inside-container.mjs +0 -1
  158. package/dist/chunks/libs/is-plain-obj.mjs +0 -1
  159. package/dist/chunks/libs/isexe.mjs +0 -1
  160. package/dist/chunks/libs/ky.mjs +0 -3
  161. package/dist/chunks/libs/p-debounce.mjs +0 -1
  162. package/dist/chunks/libs/p-limit.mjs +0 -1
  163. package/dist/chunks/libs/p-timeout.mjs +0 -1
  164. package/dist/chunks/libs/package-up.mjs +0 -1
  165. package/dist/chunks/libs/parse-ms.mjs +0 -1
  166. package/dist/chunks/libs/safe-stringify.mjs +0 -1
  167. package/dist/chunks/libs/strip-indent.mjs +0 -1
  168. package/dist/chunks/libs/tinyrainbow.mjs +0 -1
  169. package/dist/chunks/libs/ts-graphviz.mjs +0 -1
  170. package/dist/chunks/libs/unctx.mjs +0 -1
  171. package/dist/chunks/libs/vscode-languageserver.mjs +0 -1
  172. package/dist/chunks/libs/word-wrap.mjs +0 -12
  173. package/dist/vite-plugin/internal/chunks/libs/@nanostores/react.mjs +0 -1
  174. package/dist/vite-plugin/internal/chunks/libs/birpc.mjs +0 -1
  175. package/dist/vite-plugin/internal/chunks/libs/fast-equals.mjs +0 -1
  176. package/dist/vite-plugin/internal/chunks/libs/nanostores.mjs +0 -1
  177. package/dist/vite-plugin/internal/chunks/libs/remeda.mjs +0 -1
  178. package/dist/vite-plugin/internal/chunks/rolldown-runtime.mjs +0 -1
@@ -0,0 +1,3173 @@
1
+ import { i as e } from "../rolldown-runtime.mjs";
2
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/core.js
3
+ var t;
4
+ function $constructor(e, t, n) {
5
+ function init(n, r) {
6
+ if (n._zod || Object.defineProperty(n, "_zod", {
7
+ value: {
8
+ def: r,
9
+ constr: _,
10
+ traits: /* @__PURE__ */ new Set()
11
+ },
12
+ enumerable: !1
13
+ }), n._zod.traits.has(e)) return;
14
+ n._zod.traits.add(e), t(n, r);
15
+ let i = _.prototype, a = Object.keys(i);
16
+ for (let e = 0; e < a.length; e++) {
17
+ let t = a[e];
18
+ t in n || (n[t] = i[t].bind(n));
19
+ }
20
+ }
21
+ let r = n?.Parent ?? Object;
22
+ class Definition extends r {}
23
+ Object.defineProperty(Definition, "name", { value: e });
24
+ function _(e) {
25
+ var t;
26
+ let r = n?.Parent ? new Definition() : this;
27
+ init(r, e), (t = r._zod).deferred ?? (t.deferred = []);
28
+ for (let e of r._zod.deferred) e();
29
+ return r;
30
+ }
31
+ return Object.defineProperty(_, "init", { value: init }), Object.defineProperty(_, Symbol.hasInstance, { value: (t) => n?.Parent && t instanceof n.Parent ? !0 : t?._zod?.traits?.has(e) }), Object.defineProperty(_, "name", { value: e }), _;
32
+ }
33
+ var $ZodAsyncError = class extends Error {
34
+ constructor() {
35
+ super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
36
+ }
37
+ }, $ZodEncodeError = class extends Error {
38
+ constructor(e) {
39
+ super(`Encountered unidirectional transform during encode: ${e}`), this.name = "ZodEncodeError";
40
+ }
41
+ };
42
+ (t = globalThis).__zod_globalConfig ?? (t.__zod_globalConfig = {});
43
+ var n = globalThis.__zod_globalConfig;
44
+ function config(e) {
45
+ return e && Object.assign(n, e), n;
46
+ }
47
+ //#endregion
48
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/util.js
49
+ function getEnumValues(e) {
50
+ let t = Object.values(e).filter((e) => typeof e == "number");
51
+ return Object.entries(e).filter(([e, n]) => t.indexOf(+e) === -1).map(([e, t]) => t);
52
+ }
53
+ function jsonStringifyReplacer(e, t) {
54
+ return typeof t == "bigint" ? t.toString() : t;
55
+ }
56
+ function cached(e) {
57
+ return { get value() {
58
+ {
59
+ let t = e();
60
+ return Object.defineProperty(this, "value", { value: t }), t;
61
+ }
62
+ throw Error("cached value already set");
63
+ } };
64
+ }
65
+ function nullish(e) {
66
+ return e == null;
67
+ }
68
+ function cleanRegex(e) {
69
+ let t = +!!e.startsWith("^"), n = e.endsWith("$") ? e.length - 1 : e.length;
70
+ return e.slice(t, n);
71
+ }
72
+ function floatSafeRemainder(e, t) {
73
+ let n = e / t, r = Math.round(n), i = 2 ** -52 * Math.max(Math.abs(n), 1);
74
+ return Math.abs(n - r) < i ? 0 : n - r;
75
+ }
76
+ var r = /* @__PURE__*/ Symbol("evaluating");
77
+ function defineLazy(e, t, n) {
78
+ let i;
79
+ Object.defineProperty(e, t, {
80
+ get() {
81
+ if (i !== r) return i === void 0 && (i = r, i = n()), i;
82
+ },
83
+ set(n) {
84
+ Object.defineProperty(e, t, { value: n });
85
+ },
86
+ configurable: !0
87
+ });
88
+ }
89
+ function assignProp(e, t, n) {
90
+ Object.defineProperty(e, t, {
91
+ value: n,
92
+ writable: !0,
93
+ enumerable: !0,
94
+ configurable: !0
95
+ });
96
+ }
97
+ function mergeDefs(...e) {
98
+ let t = {};
99
+ for (let n of e) {
100
+ let e = Object.getOwnPropertyDescriptors(n);
101
+ Object.assign(t, e);
102
+ }
103
+ return Object.defineProperties({}, t);
104
+ }
105
+ function esc(e) {
106
+ return JSON.stringify(e);
107
+ }
108
+ function slugify(e) {
109
+ return e.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
110
+ }
111
+ var i = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {};
112
+ function isObject(e) {
113
+ return typeof e == "object" && !!e && !Array.isArray(e);
114
+ }
115
+ var a = /* @__PURE__*/ cached(() => {
116
+ if (n.jitless || typeof navigator < "u" && navigator?.userAgent?.includes("Cloudflare")) return !1;
117
+ try {
118
+ return Function(""), !0;
119
+ } catch {
120
+ return !1;
121
+ }
122
+ });
123
+ function isPlainObject(e) {
124
+ if (isObject(e) === !1) return !1;
125
+ let t = e.constructor;
126
+ if (t === void 0 || typeof t != "function") return !0;
127
+ let n = t.prototype;
128
+ return !(isObject(n) === !1 || Object.prototype.hasOwnProperty.call(n, "isPrototypeOf") === !1);
129
+ }
130
+ function shallowClone(e) {
131
+ return isPlainObject(e) ? { ...e } : Array.isArray(e) ? [...e] : e instanceof Map ? new Map(e) : e instanceof Set ? new Set(e) : e;
132
+ }
133
+ var o = /* @__PURE__*/ new Set([
134
+ "string",
135
+ "number",
136
+ "symbol"
137
+ ]);
138
+ function escapeRegex(e) {
139
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
140
+ }
141
+ function clone(e, t, n) {
142
+ let r = new e._zod.constr(t ?? e._zod.def);
143
+ return (!t || n?.parent) && (r._zod.parent = e), r;
144
+ }
145
+ function normalizeParams(e) {
146
+ let t = e;
147
+ if (!t) return {};
148
+ if (typeof t == "string") return { error: () => t };
149
+ if (t?.message !== void 0) {
150
+ if (t?.error !== void 0) throw Error("Cannot specify both `message` and `error` params");
151
+ t.error = t.message;
152
+ }
153
+ return delete t.message, typeof t.error == "string" ? {
154
+ ...t,
155
+ error: () => t.error
156
+ } : t;
157
+ }
158
+ function optionalKeys(e) {
159
+ return Object.keys(e).filter((t) => e[t]._zod.optin === "optional" && e[t]._zod.optout === "optional");
160
+ }
161
+ var s = {
162
+ safeint: [-(2 ** 53 - 1), 2 ** 53 - 1],
163
+ int32: [-2147483648, 2147483647],
164
+ uint32: [0, 4294967295],
165
+ float32: [-34028234663852886e22, 34028234663852886e22],
166
+ float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
167
+ };
168
+ function pick(e, t) {
169
+ let n = e._zod.def, r = n.checks;
170
+ if (r && r.length > 0) throw Error(".pick() cannot be used on object schemas containing refinements");
171
+ return clone(e, mergeDefs(e._zod.def, {
172
+ get shape() {
173
+ let e = {};
174
+ for (let r in t) {
175
+ if (!(r in n.shape)) throw Error(`Unrecognized key: "${r}"`);
176
+ t[r] && (e[r] = n.shape[r]);
177
+ }
178
+ return assignProp(this, "shape", e), e;
179
+ },
180
+ checks: []
181
+ }));
182
+ }
183
+ function omit(e, t) {
184
+ let n = e._zod.def, r = n.checks;
185
+ if (r && r.length > 0) throw Error(".omit() cannot be used on object schemas containing refinements");
186
+ return clone(e, mergeDefs(e._zod.def, {
187
+ get shape() {
188
+ let r = { ...e._zod.def.shape };
189
+ for (let e in t) {
190
+ if (!(e in n.shape)) throw Error(`Unrecognized key: "${e}"`);
191
+ t[e] && delete r[e];
192
+ }
193
+ return assignProp(this, "shape", r), r;
194
+ },
195
+ checks: []
196
+ }));
197
+ }
198
+ function extend(e, t) {
199
+ if (!isPlainObject(t)) throw Error("Invalid input to extend: expected a plain object");
200
+ let n = e._zod.def.checks;
201
+ if (n && n.length > 0) {
202
+ let n = e._zod.def.shape;
203
+ for (let e in t) if (Object.getOwnPropertyDescriptor(n, e) !== void 0) throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
204
+ }
205
+ return clone(e, mergeDefs(e._zod.def, { get shape() {
206
+ let n = {
207
+ ...e._zod.def.shape,
208
+ ...t
209
+ };
210
+ return assignProp(this, "shape", n), n;
211
+ } }));
212
+ }
213
+ function safeExtend(e, t) {
214
+ if (!isPlainObject(t)) throw Error("Invalid input to safeExtend: expected a plain object");
215
+ return clone(e, mergeDefs(e._zod.def, { get shape() {
216
+ let n = {
217
+ ...e._zod.def.shape,
218
+ ...t
219
+ };
220
+ return assignProp(this, "shape", n), n;
221
+ } }));
222
+ }
223
+ function merge(e, t) {
224
+ if (e._zod.def.checks?.length) throw Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");
225
+ return clone(e, mergeDefs(e._zod.def, {
226
+ get shape() {
227
+ let n = {
228
+ ...e._zod.def.shape,
229
+ ...t._zod.def.shape
230
+ };
231
+ return assignProp(this, "shape", n), n;
232
+ },
233
+ get catchall() {
234
+ return t._zod.def.catchall;
235
+ },
236
+ checks: t._zod.def.checks ?? []
237
+ }));
238
+ }
239
+ function partial(e, t, n) {
240
+ let r = t._zod.def.checks;
241
+ if (r && r.length > 0) throw Error(".partial() cannot be used on object schemas containing refinements");
242
+ return clone(t, mergeDefs(t._zod.def, {
243
+ get shape() {
244
+ let r = t._zod.def.shape, i = { ...r };
245
+ if (n) for (let t in n) {
246
+ if (!(t in r)) throw Error(`Unrecognized key: "${t}"`);
247
+ n[t] && (i[t] = e ? new e({
248
+ type: "optional",
249
+ innerType: r[t]
250
+ }) : r[t]);
251
+ }
252
+ else for (let t in r) i[t] = e ? new e({
253
+ type: "optional",
254
+ innerType: r[t]
255
+ }) : r[t];
256
+ return assignProp(this, "shape", i), i;
257
+ },
258
+ checks: []
259
+ }));
260
+ }
261
+ function required(e, t, n) {
262
+ return clone(t, mergeDefs(t._zod.def, { get shape() {
263
+ let r = t._zod.def.shape, i = { ...r };
264
+ if (n) for (let t in n) {
265
+ if (!(t in i)) throw Error(`Unrecognized key: "${t}"`);
266
+ n[t] && (i[t] = new e({
267
+ type: "nonoptional",
268
+ innerType: r[t]
269
+ }));
270
+ }
271
+ else for (let t in r) i[t] = new e({
272
+ type: "nonoptional",
273
+ innerType: r[t]
274
+ });
275
+ return assignProp(this, "shape", i), i;
276
+ } }));
277
+ }
278
+ function aborted(e, t = 0) {
279
+ if (e.aborted === !0) return !0;
280
+ for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue !== !0) return !0;
281
+ return !1;
282
+ }
283
+ function explicitlyAborted(e, t = 0) {
284
+ if (e.aborted === !0) return !0;
285
+ for (let n = t; n < e.issues.length; n++) if (e.issues[n]?.continue === !1) return !0;
286
+ return !1;
287
+ }
288
+ function prefixIssues(e, t) {
289
+ return t.map((t) => {
290
+ var n;
291
+ return (n = t).path ?? (n.path = []), t.path.unshift(e), t;
292
+ });
293
+ }
294
+ function unwrapMessage(e) {
295
+ return typeof e == "string" ? e : e?.message;
296
+ }
297
+ function finalizeIssue(e, t, n) {
298
+ let r = e.message ? e.message : unwrapMessage(e.inst?._zod.def?.error?.(e)) ?? unwrapMessage(t?.error?.(e)) ?? unwrapMessage(n.customError?.(e)) ?? unwrapMessage(n.localeError?.(e)) ?? "Invalid input", { inst: i, continue: a, input: o, ...s } = e;
299
+ return s.path ??= [], s.message = r, t?.reportInput && (s.input = o), s;
300
+ }
301
+ function getLengthableOrigin(e) {
302
+ return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
303
+ }
304
+ function issue(...e) {
305
+ let [t, n, r] = e;
306
+ return typeof t == "string" ? {
307
+ message: t,
308
+ code: "custom",
309
+ input: n,
310
+ inst: r
311
+ } : { ...t };
312
+ }
313
+ //#endregion
314
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/errors.js
315
+ var c = /* @__PURE__ */ e((e, t) => {
316
+ e.name = "$ZodError", Object.defineProperty(e, "_zod", {
317
+ value: e._zod,
318
+ enumerable: !1
319
+ }), Object.defineProperty(e, "issues", {
320
+ value: t,
321
+ enumerable: !1
322
+ }), e.message = JSON.stringify(t, jsonStringifyReplacer, 2), Object.defineProperty(e, "toString", {
323
+ value: () => e.message,
324
+ enumerable: !1
325
+ });
326
+ }, "initializer"), l = $constructor("$ZodError", c), u = $constructor("$ZodError", c, { Parent: Error });
327
+ function flattenError(e, t = (e) => e.message) {
328
+ let n = {}, r = [];
329
+ for (let i of e.issues) i.path.length > 0 ? (n[i.path[0]] = n[i.path[0]] || [], n[i.path[0]].push(t(i))) : r.push(t(i));
330
+ return {
331
+ formErrors: r,
332
+ fieldErrors: n
333
+ };
334
+ }
335
+ function formatError(e, t = (e) => e.message) {
336
+ let n = { _errors: [] }, processError = (e, r = []) => {
337
+ for (let i of e.issues) if (i.code === "invalid_union" && i.errors.length) i.errors.map((e) => processError({ issues: e }, [...r, ...i.path]));
338
+ else if (i.code === "invalid_key") processError({ issues: i.issues }, [...r, ...i.path]);
339
+ else if (i.code === "invalid_element") processError({ issues: i.issues }, [...r, ...i.path]);
340
+ else {
341
+ let e = [...r, ...i.path];
342
+ if (e.length === 0) n._errors.push(t(i));
343
+ else {
344
+ let r = n, a = 0;
345
+ for (; a < e.length;) {
346
+ let n = e[a];
347
+ a === e.length - 1 ? (r[n] = r[n] || { _errors: [] }, r[n]._errors.push(t(i))) : r[n] = r[n] || { _errors: [] }, r = r[n], a++;
348
+ }
349
+ }
350
+ }
351
+ };
352
+ return processError(e), n;
353
+ }
354
+ //#endregion
355
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/parse.js
356
+ var _parse = (e) => (t, n, r, a) => {
357
+ let o = r ? {
358
+ ...r,
359
+ async: !1
360
+ } : { async: !1 }, s = t._zod.run({
361
+ value: n,
362
+ issues: []
363
+ }, o);
364
+ if (s instanceof Promise) throw new $ZodAsyncError();
365
+ if (s.issues.length) {
366
+ let t = new ((a?.Err) ?? e)(s.issues.map((e) => finalizeIssue(e, o, config())));
367
+ throw i(t, a?.callee), t;
368
+ }
369
+ return s.value;
370
+ }, d = /* @__PURE__*/ _parse(u), _parseAsync = (e) => async (t, n, r, a) => {
371
+ let o = r ? {
372
+ ...r,
373
+ async: !0
374
+ } : { async: !0 }, s = t._zod.run({
375
+ value: n,
376
+ issues: []
377
+ }, o);
378
+ if (s instanceof Promise && (s = await s), s.issues.length) {
379
+ let t = new ((a?.Err) ?? e)(s.issues.map((e) => finalizeIssue(e, o, config())));
380
+ throw i(t, a?.callee), t;
381
+ }
382
+ return s.value;
383
+ }, f = /* @__PURE__*/ _parseAsync(u), _safeParse = (e) => (t, n, r) => {
384
+ let i = r ? {
385
+ ...r,
386
+ async: !1
387
+ } : { async: !1 }, a = t._zod.run({
388
+ value: n,
389
+ issues: []
390
+ }, i);
391
+ if (a instanceof Promise) throw new $ZodAsyncError();
392
+ return a.issues.length ? {
393
+ success: !1,
394
+ error: new (e ?? l)(a.issues.map((e) => finalizeIssue(e, i, config())))
395
+ } : {
396
+ success: !0,
397
+ data: a.value
398
+ };
399
+ }, p = /* @__PURE__*/ _safeParse(u), _safeParseAsync = (e) => async (t, n, r) => {
400
+ let i = r ? {
401
+ ...r,
402
+ async: !0
403
+ } : { async: !0 }, a = t._zod.run({
404
+ value: n,
405
+ issues: []
406
+ }, i);
407
+ return a instanceof Promise && (a = await a), a.issues.length ? {
408
+ success: !1,
409
+ error: new e(a.issues.map((e) => finalizeIssue(e, i, config())))
410
+ } : {
411
+ success: !0,
412
+ data: a.value
413
+ };
414
+ }, m = /* @__PURE__*/ _safeParseAsync(u), _encode = (e) => (t, n, r) => {
415
+ let i = r ? {
416
+ ...r,
417
+ direction: "backward"
418
+ } : { direction: "backward" };
419
+ return _parse(e)(t, n, i);
420
+ }, _decode = (e) => (t, n, r) => _parse(e)(t, n, r), _encodeAsync = (e) => async (t, n, r) => {
421
+ let i = r ? {
422
+ ...r,
423
+ direction: "backward"
424
+ } : { direction: "backward" };
425
+ return _parseAsync(e)(t, n, i);
426
+ }, _decodeAsync = (e) => async (t, n, r) => _parseAsync(e)(t, n, r), _safeEncode = (e) => (t, n, r) => {
427
+ let i = r ? {
428
+ ...r,
429
+ direction: "backward"
430
+ } : { direction: "backward" };
431
+ return _safeParse(e)(t, n, i);
432
+ }, _safeDecode = (e) => (t, n, r) => _safeParse(e)(t, n, r), _safeEncodeAsync = (e) => async (t, n, r) => {
433
+ let i = r ? {
434
+ ...r,
435
+ direction: "backward"
436
+ } : { direction: "backward" };
437
+ return _safeParseAsync(e)(t, n, i);
438
+ }, _safeDecodeAsync = (e) => async (t, n, r) => _safeParseAsync(e)(t, n, r), ee = /^[cC][0-9a-z]{6,}$/, te = /^[0-9a-z]+$/, ne = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/, re = /^[0-9a-vA-V]{20}$/, ie = /^[A-Za-z0-9]{27}$/, ae = /^[a-zA-Z0-9_-]{21}$/, h = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/, oe = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/, uuid = (e) => e ? RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`) : /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/, se = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/, ce = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
439
+ function emoji() {
440
+ return new RegExp(ce, "u");
441
+ }
442
+ var le = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ue = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/, de = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/, fe = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/, pe = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/, g = /^[A-Za-z0-9_-]*$/, me = /^https?$/, he = /^\+[1-9]\d{6,14}$/, v = "(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))", ge = /*@__PURE__*/ RegExp(`^${v}$`);
443
+ function timeSource(e) {
444
+ let t = "(?:[01]\\d|2[0-3]):[0-5]\\d";
445
+ return typeof e.precision == "number" ? e.precision === -1 ? `${t}` : e.precision === 0 ? `${t}:[0-5]\\d` : `${t}:[0-5]\\d\\.\\d{${e.precision}}` : `${t}(?::[0-5]\\d(?:\\.\\d+)?)?`;
446
+ }
447
+ function time$1(e) {
448
+ return RegExp(`^${timeSource(e)}$`);
449
+ }
450
+ e(time$1, "time");
451
+ function datetime$1(e) {
452
+ let t = timeSource({ precision: e.precision }), n = ["Z"];
453
+ e.local && n.push(""), e.offset && n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");
454
+ let r = `${t}(?:${n.join("|")})`;
455
+ return RegExp(`^${v}T(?:${r})$`);
456
+ }
457
+ e(datetime$1, "datetime");
458
+ var _e = /* @__PURE__ */ e((e) => {
459
+ let t = e ? `[\\s\\S]{${e?.minimum ?? 0},${e?.maximum ?? ""}}` : "[\\s\\S]*";
460
+ return RegExp(`^${t}$`);
461
+ }, "string"), ve = /^-?\d+$/, ye = /^-?\d+(?:\.\d+)?$/, be = /^(?:true|false)$/i, xe = /^[^A-Z]*$/, Se = /^[^a-z]*$/, y = /*@__PURE__*/ $constructor("$ZodCheck", (e, t) => {
462
+ var n;
463
+ e._zod ??= {}, e._zod.def = t, (n = e._zod).onattach ?? (n.onattach = []);
464
+ }), b = {
465
+ number: "number",
466
+ bigint: "bigint",
467
+ object: "date"
468
+ }, x = /*@__PURE__*/ $constructor("$ZodCheckLessThan", (e, t) => {
469
+ y.init(e, t);
470
+ let n = b[typeof t.value];
471
+ e._zod.onattach.push((e) => {
472
+ let n = e._zod.bag, r = (t.inclusive ? n.maximum : n.exclusiveMaximum) ?? Infinity;
473
+ t.value < r && (t.inclusive ? n.maximum = t.value : n.exclusiveMaximum = t.value);
474
+ }), e._zod.check = (r) => {
475
+ (t.inclusive ? r.value <= t.value : r.value < t.value) || r.issues.push({
476
+ origin: n,
477
+ code: "too_big",
478
+ maximum: typeof t.value == "object" ? t.value.getTime() : t.value,
479
+ input: r.value,
480
+ inclusive: t.inclusive,
481
+ inst: e,
482
+ continue: !t.abort
483
+ });
484
+ };
485
+ }), S = /*@__PURE__*/ $constructor("$ZodCheckGreaterThan", (e, t) => {
486
+ y.init(e, t);
487
+ let n = b[typeof t.value];
488
+ e._zod.onattach.push((e) => {
489
+ let n = e._zod.bag, r = (t.inclusive ? n.minimum : n.exclusiveMinimum) ?? -Infinity;
490
+ t.value > r && (t.inclusive ? n.minimum = t.value : n.exclusiveMinimum = t.value);
491
+ }), e._zod.check = (r) => {
492
+ (t.inclusive ? r.value >= t.value : r.value > t.value) || r.issues.push({
493
+ origin: n,
494
+ code: "too_small",
495
+ minimum: typeof t.value == "object" ? t.value.getTime() : t.value,
496
+ input: r.value,
497
+ inclusive: t.inclusive,
498
+ inst: e,
499
+ continue: !t.abort
500
+ });
501
+ };
502
+ }), Ce = /*@__PURE__*/ $constructor("$ZodCheckMultipleOf", (e, t) => {
503
+ y.init(e, t), e._zod.onattach.push((e) => {
504
+ var n;
505
+ (n = e._zod.bag).multipleOf ?? (n.multipleOf = t.value);
506
+ }), e._zod.check = (n) => {
507
+ if (typeof n.value != typeof t.value) throw Error("Cannot mix number and bigint in multiple_of check.");
508
+ (typeof n.value == "bigint" ? n.value % t.value === BigInt(0) : floatSafeRemainder(n.value, t.value) === 0) || n.issues.push({
509
+ origin: typeof n.value,
510
+ code: "not_multiple_of",
511
+ divisor: t.value,
512
+ input: n.value,
513
+ inst: e,
514
+ continue: !t.abort
515
+ });
516
+ };
517
+ }), we = /*@__PURE__*/ $constructor("$ZodCheckNumberFormat", (e, t) => {
518
+ y.init(e, t), t.format = t.format || "float64";
519
+ let n = t.format?.includes("int"), r = n ? "int" : "number", [i, a] = s[t.format];
520
+ e._zod.onattach.push((e) => {
521
+ let r = e._zod.bag;
522
+ r.format = t.format, r.minimum = i, r.maximum = a, n && (r.pattern = ve);
523
+ }), e._zod.check = (o) => {
524
+ let s = o.value;
525
+ if (n) {
526
+ if (!Number.isInteger(s)) {
527
+ o.issues.push({
528
+ expected: r,
529
+ format: t.format,
530
+ code: "invalid_type",
531
+ continue: !1,
532
+ input: s,
533
+ inst: e
534
+ });
535
+ return;
536
+ }
537
+ if (!Number.isSafeInteger(s)) {
538
+ s > 0 ? o.issues.push({
539
+ input: s,
540
+ code: "too_big",
541
+ maximum: 2 ** 53 - 1,
542
+ note: "Integers must be within the safe integer range.",
543
+ inst: e,
544
+ origin: r,
545
+ inclusive: !0,
546
+ continue: !t.abort
547
+ }) : o.issues.push({
548
+ input: s,
549
+ code: "too_small",
550
+ minimum: -(2 ** 53 - 1),
551
+ note: "Integers must be within the safe integer range.",
552
+ inst: e,
553
+ origin: r,
554
+ inclusive: !0,
555
+ continue: !t.abort
556
+ });
557
+ return;
558
+ }
559
+ }
560
+ s < i && o.issues.push({
561
+ origin: "number",
562
+ input: s,
563
+ code: "too_small",
564
+ minimum: i,
565
+ inclusive: !0,
566
+ inst: e,
567
+ continue: !t.abort
568
+ }), s > a && o.issues.push({
569
+ origin: "number",
570
+ input: s,
571
+ code: "too_big",
572
+ maximum: a,
573
+ inclusive: !0,
574
+ inst: e,
575
+ continue: !t.abort
576
+ });
577
+ };
578
+ }), Te = /*@__PURE__*/ $constructor("$ZodCheckMaxLength", (e, t) => {
579
+ var n;
580
+ y.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
581
+ let t = e.value;
582
+ return !nullish(t) && t.length !== void 0;
583
+ }), e._zod.onattach.push((e) => {
584
+ let n = e._zod.bag.maximum ?? Infinity;
585
+ t.maximum < n && (e._zod.bag.maximum = t.maximum);
586
+ }), e._zod.check = (n) => {
587
+ let r = n.value;
588
+ if (r.length <= t.maximum) return;
589
+ let i = getLengthableOrigin(r);
590
+ n.issues.push({
591
+ origin: i,
592
+ code: "too_big",
593
+ maximum: t.maximum,
594
+ inclusive: !0,
595
+ input: r,
596
+ inst: e,
597
+ continue: !t.abort
598
+ });
599
+ };
600
+ }), Ee = /*@__PURE__*/ $constructor("$ZodCheckMinLength", (e, t) => {
601
+ var n;
602
+ y.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
603
+ let t = e.value;
604
+ return !nullish(t) && t.length !== void 0;
605
+ }), e._zod.onattach.push((e) => {
606
+ let n = e._zod.bag.minimum ?? -Infinity;
607
+ t.minimum > n && (e._zod.bag.minimum = t.minimum);
608
+ }), e._zod.check = (n) => {
609
+ let r = n.value;
610
+ if (r.length >= t.minimum) return;
611
+ let i = getLengthableOrigin(r);
612
+ n.issues.push({
613
+ origin: i,
614
+ code: "too_small",
615
+ minimum: t.minimum,
616
+ inclusive: !0,
617
+ input: r,
618
+ inst: e,
619
+ continue: !t.abort
620
+ });
621
+ };
622
+ }), De = /*@__PURE__*/ $constructor("$ZodCheckLengthEquals", (e, t) => {
623
+ var n;
624
+ y.init(e, t), (n = e._zod.def).when ?? (n.when = (e) => {
625
+ let t = e.value;
626
+ return !nullish(t) && t.length !== void 0;
627
+ }), e._zod.onattach.push((e) => {
628
+ let n = e._zod.bag;
629
+ n.minimum = t.length, n.maximum = t.length, n.length = t.length;
630
+ }), e._zod.check = (n) => {
631
+ let r = n.value, i = r.length;
632
+ if (i === t.length) return;
633
+ let a = getLengthableOrigin(r), o = i > t.length;
634
+ n.issues.push({
635
+ origin: a,
636
+ ...o ? {
637
+ code: "too_big",
638
+ maximum: t.length
639
+ } : {
640
+ code: "too_small",
641
+ minimum: t.length
642
+ },
643
+ inclusive: !0,
644
+ exact: !0,
645
+ input: n.value,
646
+ inst: e,
647
+ continue: !t.abort
648
+ });
649
+ };
650
+ }), C = /*@__PURE__*/ $constructor("$ZodCheckStringFormat", (e, t) => {
651
+ var n, r;
652
+ y.init(e, t), e._zod.onattach.push((e) => {
653
+ let n = e._zod.bag;
654
+ n.format = t.format, t.pattern && (n.patterns ??= /* @__PURE__ */ new Set(), n.patterns.add(t.pattern));
655
+ }), t.pattern ? (n = e._zod).check ?? (n.check = (n) => {
656
+ t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
657
+ origin: "string",
658
+ code: "invalid_format",
659
+ format: t.format,
660
+ input: n.value,
661
+ ...t.pattern ? { pattern: t.pattern.toString() } : {},
662
+ inst: e,
663
+ continue: !t.abort
664
+ });
665
+ }) : (r = e._zod).check ?? (r.check = () => {});
666
+ }), w = /*@__PURE__*/ $constructor("$ZodCheckRegex", (e, t) => {
667
+ C.init(e, t), e._zod.check = (n) => {
668
+ t.pattern.lastIndex = 0, !t.pattern.test(n.value) && n.issues.push({
669
+ origin: "string",
670
+ code: "invalid_format",
671
+ format: "regex",
672
+ input: n.value,
673
+ pattern: t.pattern.toString(),
674
+ inst: e,
675
+ continue: !t.abort
676
+ });
677
+ };
678
+ }), T = /*@__PURE__*/ $constructor("$ZodCheckLowerCase", (e, t) => {
679
+ t.pattern ??= xe, C.init(e, t);
680
+ }), E = /*@__PURE__*/ $constructor("$ZodCheckUpperCase", (e, t) => {
681
+ t.pattern ??= Se, C.init(e, t);
682
+ }), Oe = /*@__PURE__*/ $constructor("$ZodCheckIncludes", (e, t) => {
683
+ y.init(e, t);
684
+ let n = escapeRegex(t.includes), r = new RegExp(typeof t.position == "number" ? `^.{${t.position}}${n}` : n);
685
+ t.pattern = r, e._zod.onattach.push((e) => {
686
+ let t = e._zod.bag;
687
+ t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(r);
688
+ }), e._zod.check = (n) => {
689
+ n.value.includes(t.includes, t.position) || n.issues.push({
690
+ origin: "string",
691
+ code: "invalid_format",
692
+ format: "includes",
693
+ includes: t.includes,
694
+ input: n.value,
695
+ inst: e,
696
+ continue: !t.abort
697
+ });
698
+ };
699
+ }), ke = /*@__PURE__*/ $constructor("$ZodCheckStartsWith", (e, t) => {
700
+ y.init(e, t);
701
+ let n = RegExp(`^${escapeRegex(t.prefix)}.*`);
702
+ t.pattern ??= n, e._zod.onattach.push((e) => {
703
+ let t = e._zod.bag;
704
+ t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
705
+ }), e._zod.check = (n) => {
706
+ n.value.startsWith(t.prefix) || n.issues.push({
707
+ origin: "string",
708
+ code: "invalid_format",
709
+ format: "starts_with",
710
+ prefix: t.prefix,
711
+ input: n.value,
712
+ inst: e,
713
+ continue: !t.abort
714
+ });
715
+ };
716
+ }), Ae = /*@__PURE__*/ $constructor("$ZodCheckEndsWith", (e, t) => {
717
+ y.init(e, t);
718
+ let n = RegExp(`.*${escapeRegex(t.suffix)}$`);
719
+ t.pattern ??= n, e._zod.onattach.push((e) => {
720
+ let t = e._zod.bag;
721
+ t.patterns ??= /* @__PURE__ */ new Set(), t.patterns.add(n);
722
+ }), e._zod.check = (n) => {
723
+ n.value.endsWith(t.suffix) || n.issues.push({
724
+ origin: "string",
725
+ code: "invalid_format",
726
+ format: "ends_with",
727
+ suffix: t.suffix,
728
+ input: n.value,
729
+ inst: e,
730
+ continue: !t.abort
731
+ });
732
+ };
733
+ }), je = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (e, t) => {
734
+ y.init(e, t), e._zod.check = (e) => {
735
+ e.value = t.tx(e.value);
736
+ };
737
+ }), Doc = class {
738
+ constructor(e = []) {
739
+ this.content = [], this.indent = 0, this && (this.args = e);
740
+ }
741
+ indented(e) {
742
+ this.indent += 1, e(this), --this.indent;
743
+ }
744
+ write(e) {
745
+ if (typeof e == "function") {
746
+ e(this, { execution: "sync" }), e(this, { execution: "async" });
747
+ return;
748
+ }
749
+ let t = e.split("\n").filter((e) => e), n = Math.min(...t.map((e) => e.length - e.trimStart().length)), r = t.map((e) => e.slice(n)).map((e) => " ".repeat(this.indent * 2) + e);
750
+ for (let e of r) this.content.push(e);
751
+ }
752
+ compile() {
753
+ let e = Function, t = this?.args, n = [...(this?.content ?? [""]).map((e) => ` ${e}`)];
754
+ return new e(...t, n.join("\n"));
755
+ }
756
+ }, Me = {
757
+ major: 4,
758
+ minor: 4,
759
+ patch: 3
760
+ }, D = /*@__PURE__*/ $constructor("$ZodType", (e, t) => {
761
+ var n;
762
+ e ??= {}, e._zod.def = t, e._zod.bag = e._zod.bag || {}, e._zod.version = Me;
763
+ let r = [...e._zod.def.checks ?? []];
764
+ e._zod.traits.has("$ZodCheck") && r.unshift(e);
765
+ for (let t of r) for (let n of t._zod.onattach) n(e);
766
+ if (r.length === 0) (n = e._zod).deferred ?? (n.deferred = []), e._zod.deferred?.push(() => {
767
+ e._zod.run = e._zod.parse;
768
+ });
769
+ else {
770
+ let runChecks = (e, t, n) => {
771
+ let r = aborted(e), i;
772
+ for (let a of t) {
773
+ if (a._zod.def.when) {
774
+ if (explicitlyAborted(e) || !a._zod.def.when(e)) continue;
775
+ } else if (r) continue;
776
+ let t = e.issues.length, o = a._zod.check(e);
777
+ if (o instanceof Promise && n?.async === !1) throw new $ZodAsyncError();
778
+ if (i || o instanceof Promise) i = (i ?? Promise.resolve()).then(async () => {
779
+ await o, e.issues.length !== t && (r ||= aborted(e, t));
780
+ });
781
+ else {
782
+ if (e.issues.length === t) continue;
783
+ r ||= aborted(e, t);
784
+ }
785
+ }
786
+ return i ? i.then(() => e) : e;
787
+ }, handleCanaryResult = (t, n, i) => {
788
+ if (aborted(t)) return t.aborted = !0, t;
789
+ let a = runChecks(n, r, i);
790
+ if (a instanceof Promise) {
791
+ if (i.async === !1) throw new $ZodAsyncError();
792
+ return a.then((t) => e._zod.parse(t, i));
793
+ }
794
+ return e._zod.parse(a, i);
795
+ };
796
+ e._zod.run = (t, n) => {
797
+ if (n.skipChecks) return e._zod.parse(t, n);
798
+ if (n.direction === "backward") {
799
+ let r = e._zod.parse({
800
+ value: t.value,
801
+ issues: []
802
+ }, {
803
+ ...n,
804
+ skipChecks: !0
805
+ });
806
+ return r instanceof Promise ? r.then((e) => handleCanaryResult(e, t, n)) : handleCanaryResult(r, t, n);
807
+ }
808
+ let i = e._zod.parse(t, n);
809
+ if (i instanceof Promise) {
810
+ if (n.async === !1) throw new $ZodAsyncError();
811
+ return i.then((e) => runChecks(e, r, n));
812
+ }
813
+ return runChecks(i, r, n);
814
+ };
815
+ }
816
+ defineLazy(e, "~standard", () => ({
817
+ validate: (t) => {
818
+ try {
819
+ let n = p(e, t);
820
+ return n.success ? { value: n.data } : { issues: n.error?.issues };
821
+ } catch {
822
+ return m(e, t).then((e) => e.success ? { value: e.data } : { issues: e.error?.issues });
823
+ }
824
+ },
825
+ vendor: "zod",
826
+ version: 1
827
+ }));
828
+ }), O = /*@__PURE__*/ $constructor("$ZodString", (e, t) => {
829
+ D.init(e, t), e._zod.pattern = [...e?._zod.bag?.patterns ?? []].pop() ?? _e(e._zod.bag), e._zod.parse = (n, r) => {
830
+ if (t.coerce) try {
831
+ n.value = String(n.value);
832
+ } catch {}
833
+ return typeof n.value == "string" || n.issues.push({
834
+ expected: "string",
835
+ code: "invalid_type",
836
+ input: n.value,
837
+ inst: e
838
+ }), n;
839
+ };
840
+ }), k = /*@__PURE__*/ $constructor("$ZodStringFormat", (e, t) => {
841
+ C.init(e, t), O.init(e, t);
842
+ }), Ne = /*@__PURE__*/ $constructor("$ZodGUID", (e, t) => {
843
+ t.pattern ??= oe, k.init(e, t);
844
+ }), Pe = /*@__PURE__*/ $constructor("$ZodUUID", (e, t) => {
845
+ if (t.version) {
846
+ let e = {
847
+ v1: 1,
848
+ v2: 2,
849
+ v3: 3,
850
+ v4: 4,
851
+ v5: 5,
852
+ v6: 6,
853
+ v7: 7,
854
+ v8: 8
855
+ }[t.version];
856
+ if (e === void 0) throw Error(`Invalid UUID version: "${t.version}"`);
857
+ t.pattern ??= uuid(e);
858
+ } else t.pattern ??= uuid();
859
+ k.init(e, t);
860
+ }), Fe = /*@__PURE__*/ $constructor("$ZodEmail", (e, t) => {
861
+ t.pattern ??= se, k.init(e, t);
862
+ }), Ie = /*@__PURE__*/ $constructor("$ZodURL", (e, t) => {
863
+ k.init(e, t), e._zod.check = (n) => {
864
+ try {
865
+ let r = n.value.trim();
866
+ if (!t.normalize && t.protocol?.source === me.source && !/^https?:\/\//i.test(r)) {
867
+ n.issues.push({
868
+ code: "invalid_format",
869
+ format: "url",
870
+ note: "Invalid URL format",
871
+ input: n.value,
872
+ inst: e,
873
+ continue: !t.abort
874
+ });
875
+ return;
876
+ }
877
+ let i = new URL(r);
878
+ t.hostname && (t.hostname.lastIndex = 0, t.hostname.test(i.hostname) || n.issues.push({
879
+ code: "invalid_format",
880
+ format: "url",
881
+ note: "Invalid hostname",
882
+ pattern: t.hostname.source,
883
+ input: n.value,
884
+ inst: e,
885
+ continue: !t.abort
886
+ })), t.protocol && (t.protocol.lastIndex = 0, t.protocol.test(i.protocol.endsWith(":") ? i.protocol.slice(0, -1) : i.protocol) || n.issues.push({
887
+ code: "invalid_format",
888
+ format: "url",
889
+ note: "Invalid protocol",
890
+ pattern: t.protocol.source,
891
+ input: n.value,
892
+ inst: e,
893
+ continue: !t.abort
894
+ })), t.normalize ? n.value = i.href : n.value = r;
895
+ return;
896
+ } catch {
897
+ n.issues.push({
898
+ code: "invalid_format",
899
+ format: "url",
900
+ input: n.value,
901
+ inst: e,
902
+ continue: !t.abort
903
+ });
904
+ }
905
+ };
906
+ }), Le = /*@__PURE__*/ $constructor("$ZodEmoji", (e, t) => {
907
+ t.pattern ??= emoji(), k.init(e, t);
908
+ }), Re = /*@__PURE__*/ $constructor("$ZodNanoID", (e, t) => {
909
+ t.pattern ??= ae, k.init(e, t);
910
+ }), ze = /*@__PURE__*/ $constructor("$ZodCUID", (e, t) => {
911
+ t.pattern ??= ee, k.init(e, t);
912
+ }), Be = /*@__PURE__*/ $constructor("$ZodCUID2", (e, t) => {
913
+ t.pattern ??= te, k.init(e, t);
914
+ }), Ve = /*@__PURE__*/ $constructor("$ZodULID", (e, t) => {
915
+ t.pattern ??= ne, k.init(e, t);
916
+ }), He = /*@__PURE__*/ $constructor("$ZodXID", (e, t) => {
917
+ t.pattern ??= re, k.init(e, t);
918
+ }), Ue = /*@__PURE__*/ $constructor("$ZodKSUID", (e, t) => {
919
+ t.pattern ??= ie, k.init(e, t);
920
+ }), We = /*@__PURE__*/ $constructor("$ZodISODateTime", (e, t) => {
921
+ t.pattern ??= datetime$1(t), k.init(e, t);
922
+ }), Ge = /*@__PURE__*/ $constructor("$ZodISODate", (e, t) => {
923
+ t.pattern ??= ge, k.init(e, t);
924
+ }), Ke = /*@__PURE__*/ $constructor("$ZodISOTime", (e, t) => {
925
+ t.pattern ??= time$1(t), k.init(e, t);
926
+ }), qe = /*@__PURE__*/ $constructor("$ZodISODuration", (e, t) => {
927
+ t.pattern ??= h, k.init(e, t);
928
+ }), Je = /*@__PURE__*/ $constructor("$ZodIPv4", (e, t) => {
929
+ t.pattern ??= le, k.init(e, t), e._zod.bag.format = "ipv4";
930
+ }), Ye = /*@__PURE__*/ $constructor("$ZodIPv6", (e, t) => {
931
+ t.pattern ??= ue, k.init(e, t), e._zod.bag.format = "ipv6", e._zod.check = (n) => {
932
+ try {
933
+ new URL(`http://[${n.value}]`);
934
+ } catch {
935
+ n.issues.push({
936
+ code: "invalid_format",
937
+ format: "ipv6",
938
+ input: n.value,
939
+ inst: e,
940
+ continue: !t.abort
941
+ });
942
+ }
943
+ };
944
+ }), Xe = /*@__PURE__*/ $constructor("$ZodCIDRv4", (e, t) => {
945
+ t.pattern ??= de, k.init(e, t);
946
+ }), Ze = /*@__PURE__*/ $constructor("$ZodCIDRv6", (e, t) => {
947
+ t.pattern ??= fe, k.init(e, t), e._zod.check = (n) => {
948
+ let r = n.value.split("/");
949
+ try {
950
+ if (r.length !== 2) throw Error();
951
+ let [e, t] = r;
952
+ if (!t) throw Error();
953
+ let n = Number(t);
954
+ if (`${n}` !== t || n < 0 || n > 128) throw Error();
955
+ new URL(`http://[${e}]`);
956
+ } catch {
957
+ n.issues.push({
958
+ code: "invalid_format",
959
+ format: "cidrv6",
960
+ input: n.value,
961
+ inst: e,
962
+ continue: !t.abort
963
+ });
964
+ }
965
+ };
966
+ });
967
+ function isValidBase64(e) {
968
+ if (e === "") return !0;
969
+ if (/\s/.test(e) || e.length % 4 != 0) return !1;
970
+ try {
971
+ return atob(e), !0;
972
+ } catch {
973
+ return !1;
974
+ }
975
+ }
976
+ var Qe = /*@__PURE__*/ $constructor("$ZodBase64", (e, t) => {
977
+ t.pattern ??= pe, k.init(e, t), e._zod.bag.contentEncoding = "base64", e._zod.check = (n) => {
978
+ isValidBase64(n.value) || n.issues.push({
979
+ code: "invalid_format",
980
+ format: "base64",
981
+ input: n.value,
982
+ inst: e,
983
+ continue: !t.abort
984
+ });
985
+ };
986
+ });
987
+ function isValidBase64URL(e) {
988
+ if (!g.test(e)) return !1;
989
+ let t = e.replace(/[-_]/g, (e) => e === "-" ? "+" : "/");
990
+ return isValidBase64(t.padEnd(Math.ceil(t.length / 4) * 4, "="));
991
+ }
992
+ var $e = /*@__PURE__*/ $constructor("$ZodBase64URL", (e, t) => {
993
+ t.pattern ??= g, k.init(e, t), e._zod.bag.contentEncoding = "base64url", e._zod.check = (n) => {
994
+ isValidBase64URL(n.value) || n.issues.push({
995
+ code: "invalid_format",
996
+ format: "base64url",
997
+ input: n.value,
998
+ inst: e,
999
+ continue: !t.abort
1000
+ });
1001
+ };
1002
+ }), et = /*@__PURE__*/ $constructor("$ZodE164", (e, t) => {
1003
+ t.pattern ??= he, k.init(e, t);
1004
+ });
1005
+ function isValidJWT(e, t = null) {
1006
+ try {
1007
+ let n = e.split(".");
1008
+ if (n.length !== 3) return !1;
1009
+ let [r] = n;
1010
+ if (!r) return !1;
1011
+ let i = JSON.parse(atob(r));
1012
+ return !("typ" in i && i?.typ !== "JWT" || !i.alg || t && (!("alg" in i) || i.alg !== t));
1013
+ } catch {
1014
+ return !1;
1015
+ }
1016
+ }
1017
+ var tt = /*@__PURE__*/ $constructor("$ZodJWT", (e, t) => {
1018
+ k.init(e, t), e._zod.check = (n) => {
1019
+ isValidJWT(n.value, t.alg) || n.issues.push({
1020
+ code: "invalid_format",
1021
+ format: "jwt",
1022
+ input: n.value,
1023
+ inst: e,
1024
+ continue: !t.abort
1025
+ });
1026
+ };
1027
+ }), A = /*@__PURE__*/ $constructor("$ZodNumber", (e, t) => {
1028
+ D.init(e, t), e._zod.pattern = e._zod.bag.pattern ?? ye, e._zod.parse = (n, r) => {
1029
+ if (t.coerce) try {
1030
+ n.value = Number(n.value);
1031
+ } catch {}
1032
+ let i = n.value;
1033
+ if (typeof i == "number" && !Number.isNaN(i) && Number.isFinite(i)) return n;
1034
+ let a = typeof i == "number" ? Number.isNaN(i) ? "NaN" : Number.isFinite(i) ? void 0 : "Infinity" : void 0;
1035
+ return n.issues.push({
1036
+ expected: "number",
1037
+ code: "invalid_type",
1038
+ input: i,
1039
+ inst: e,
1040
+ ...a ? { received: a } : {}
1041
+ }), n;
1042
+ };
1043
+ }), nt = /*@__PURE__*/ $constructor("$ZodNumberFormat", (e, t) => {
1044
+ we.init(e, t), A.init(e, t);
1045
+ }), j = /*@__PURE__*/ $constructor("$ZodBoolean", (e, t) => {
1046
+ D.init(e, t), e._zod.pattern = be, e._zod.parse = (n, r) => {
1047
+ if (t.coerce) try {
1048
+ n.value = !!n.value;
1049
+ } catch {}
1050
+ let i = n.value;
1051
+ return typeof i == "boolean" || n.issues.push({
1052
+ expected: "boolean",
1053
+ code: "invalid_type",
1054
+ input: i,
1055
+ inst: e
1056
+ }), n;
1057
+ };
1058
+ }), rt = /*@__PURE__*/ $constructor("$ZodUnknown", (e, t) => {
1059
+ D.init(e, t), e._zod.parse = (e) => e;
1060
+ }), it = /*@__PURE__*/ $constructor("$ZodNever", (e, t) => {
1061
+ D.init(e, t), e._zod.parse = (t, n) => (t.issues.push({
1062
+ expected: "never",
1063
+ code: "invalid_type",
1064
+ input: t.value,
1065
+ inst: e
1066
+ }), t);
1067
+ });
1068
+ function handleArrayResult(e, t, n) {
1069
+ e.issues.length && t.issues.push(...prefixIssues(n, e.issues)), t.value[n] = e.value;
1070
+ }
1071
+ var at = /*@__PURE__*/ $constructor("$ZodArray", (e, t) => {
1072
+ D.init(e, t), e._zod.parse = (n, r) => {
1073
+ let i = n.value;
1074
+ if (!Array.isArray(i)) return n.issues.push({
1075
+ expected: "array",
1076
+ code: "invalid_type",
1077
+ input: i,
1078
+ inst: e
1079
+ }), n;
1080
+ n.value = Array(i.length);
1081
+ let a = [];
1082
+ for (let e = 0; e < i.length; e++) {
1083
+ let o = i[e], s = t.element._zod.run({
1084
+ value: o,
1085
+ issues: []
1086
+ }, r);
1087
+ s instanceof Promise ? a.push(s.then((t) => handleArrayResult(t, n, e))) : handleArrayResult(s, n, e);
1088
+ }
1089
+ return a.length ? Promise.all(a).then(() => n) : n;
1090
+ };
1091
+ });
1092
+ function handlePropertyResult(e, t, n, r, i, a) {
1093
+ let o = n in r;
1094
+ if (e.issues.length) {
1095
+ if (i && a && !o) return;
1096
+ t.issues.push(...prefixIssues(n, e.issues));
1097
+ }
1098
+ if (!o && !i) {
1099
+ e.issues.length || t.issues.push({
1100
+ code: "invalid_type",
1101
+ expected: "nonoptional",
1102
+ input: void 0,
1103
+ path: [n]
1104
+ });
1105
+ return;
1106
+ }
1107
+ e.value === void 0 ? o && (t.value[n] = void 0) : t.value[n] = e.value;
1108
+ }
1109
+ function normalizeDef(e) {
1110
+ let t = Object.keys(e.shape);
1111
+ for (let n of t) if (!e.shape?.[n]?._zod?.traits?.has("$ZodType")) throw Error(`Invalid element at key "${n}": expected a Zod schema`);
1112
+ let n = optionalKeys(e.shape);
1113
+ return {
1114
+ ...e,
1115
+ keys: t,
1116
+ keySet: new Set(t),
1117
+ numKeys: t.length,
1118
+ optionalKeys: new Set(n)
1119
+ };
1120
+ }
1121
+ function handleCatchall(e, t, n, r, i, a) {
1122
+ let o = [], s = i.keySet, c = i.catchall._zod, l = c.def.type, u = c.optin === "optional", d = c.optout === "optional";
1123
+ for (let i in t) {
1124
+ if (i === "__proto__" || s.has(i)) continue;
1125
+ if (l === "never") {
1126
+ o.push(i);
1127
+ continue;
1128
+ }
1129
+ let a = c.run({
1130
+ value: t[i],
1131
+ issues: []
1132
+ }, r);
1133
+ a instanceof Promise ? e.push(a.then((e) => handlePropertyResult(e, n, i, t, u, d))) : handlePropertyResult(a, n, i, t, u, d);
1134
+ }
1135
+ return o.length && n.issues.push({
1136
+ code: "unrecognized_keys",
1137
+ keys: o,
1138
+ input: t,
1139
+ inst: a
1140
+ }), e.length ? Promise.all(e).then(() => n) : n;
1141
+ }
1142
+ var M = /*@__PURE__*/ $constructor("$ZodObject", (e, t) => {
1143
+ if (D.init(e, t), !Object.getOwnPropertyDescriptor(t, "shape")?.get) {
1144
+ let e = t.shape;
1145
+ Object.defineProperty(t, "shape", { get: () => {
1146
+ let n = { ...e };
1147
+ return Object.defineProperty(t, "shape", { value: n }), n;
1148
+ } });
1149
+ }
1150
+ let n = cached(() => normalizeDef(t));
1151
+ defineLazy(e._zod, "propValues", () => {
1152
+ let e = t.shape, n = {};
1153
+ for (let t in e) {
1154
+ let r = e[t]._zod;
1155
+ if (r.values) {
1156
+ n[t] ?? (n[t] = /* @__PURE__ */ new Set());
1157
+ for (let e of r.values) n[t].add(e);
1158
+ }
1159
+ }
1160
+ return n;
1161
+ });
1162
+ let r = isObject, i = t.catchall, a;
1163
+ e._zod.parse = (t, o) => {
1164
+ a ??= n.value;
1165
+ let s = t.value;
1166
+ if (!r(s)) return t.issues.push({
1167
+ expected: "object",
1168
+ code: "invalid_type",
1169
+ input: s,
1170
+ inst: e
1171
+ }), t;
1172
+ t.value = {};
1173
+ let c = [], l = a.shape;
1174
+ for (let e of a.keys) {
1175
+ let n = l[e], r = n._zod.optin === "optional", i = n._zod.optout === "optional", a = n._zod.run({
1176
+ value: s[e],
1177
+ issues: []
1178
+ }, o);
1179
+ a instanceof Promise ? c.push(a.then((n) => handlePropertyResult(n, t, e, s, r, i))) : handlePropertyResult(a, t, e, s, r, i);
1180
+ }
1181
+ return i ? handleCatchall(c, s, t, o, n.value, e) : c.length ? Promise.all(c).then(() => t) : t;
1182
+ };
1183
+ }), ot = /*@__PURE__*/ $constructor("$ZodObjectJIT", (e, t) => {
1184
+ M.init(e, t);
1185
+ let r = e._zod.parse, i = cached(() => normalizeDef(t)), generateFastpass = (e) => {
1186
+ let t = new Doc([
1187
+ "shape",
1188
+ "payload",
1189
+ "ctx"
1190
+ ]), n = i.value, parseStr = (e) => {
1191
+ let t = esc(e);
1192
+ return `shape[${t}]._zod.run({ value: input[${t}], issues: [] }, ctx)`;
1193
+ };
1194
+ t.write("const input = payload.value;");
1195
+ let r = Object.create(null), a = 0;
1196
+ for (let e of n.keys) r[e] = `key_${a++}`;
1197
+ t.write("const newResult = {};");
1198
+ for (let i of n.keys) {
1199
+ let n = r[i], a = esc(i), o = e[i], s = o?._zod?.optin === "optional", c = o?._zod?.optout === "optional";
1200
+ t.write(`const ${n} = ${parseStr(i)};`), s && c ? t.write(`
1201
+ if (${n}.issues.length) {
1202
+ if (${a} in input) {
1203
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
1204
+ ...iss,
1205
+ path: iss.path ? [${a}, ...iss.path] : [${a}]
1206
+ })));
1207
+ }
1208
+ }
1209
+
1210
+ if (${n}.value === undefined) {
1211
+ if (${a} in input) {
1212
+ newResult[${a}] = undefined;
1213
+ }
1214
+ } else {
1215
+ newResult[${a}] = ${n}.value;
1216
+ }
1217
+
1218
+ `) : s ? t.write(`
1219
+ if (${n}.issues.length) {
1220
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
1221
+ ...iss,
1222
+ path: iss.path ? [${a}, ...iss.path] : [${a}]
1223
+ })));
1224
+ }
1225
+
1226
+ if (${n}.value === undefined) {
1227
+ if (${a} in input) {
1228
+ newResult[${a}] = undefined;
1229
+ }
1230
+ } else {
1231
+ newResult[${a}] = ${n}.value;
1232
+ }
1233
+
1234
+ `) : t.write(`
1235
+ const ${n}_present = ${a} in input;
1236
+ if (${n}.issues.length) {
1237
+ payload.issues = payload.issues.concat(${n}.issues.map(iss => ({
1238
+ ...iss,
1239
+ path: iss.path ? [${a}, ...iss.path] : [${a}]
1240
+ })));
1241
+ }
1242
+ if (!${n}_present && !${n}.issues.length) {
1243
+ payload.issues.push({
1244
+ code: "invalid_type",
1245
+ expected: "nonoptional",
1246
+ input: undefined,
1247
+ path: [${a}]
1248
+ });
1249
+ }
1250
+
1251
+ if (${n}_present) {
1252
+ if (${n}.value === undefined) {
1253
+ newResult[${a}] = undefined;
1254
+ } else {
1255
+ newResult[${a}] = ${n}.value;
1256
+ }
1257
+ }
1258
+
1259
+ `);
1260
+ }
1261
+ t.write("payload.value = newResult;"), t.write("return payload;");
1262
+ let o = t.compile();
1263
+ return (t, n) => o(e, t, n);
1264
+ }, o, s = isObject, c = !n.jitless, l = c && a.value, u = t.catchall, d;
1265
+ e._zod.parse = (n, a) => {
1266
+ d ??= i.value;
1267
+ let f = n.value;
1268
+ return s(f) ? c && l && a?.async === !1 && a.jitless !== !0 ? (o ||= generateFastpass(t.shape), n = o(n, a), u ? handleCatchall([], f, n, a, d, e) : n) : r(n, a) : (n.issues.push({
1269
+ expected: "object",
1270
+ code: "invalid_type",
1271
+ input: f,
1272
+ inst: e
1273
+ }), n);
1274
+ };
1275
+ });
1276
+ function handleUnionResults(e, t, n, r) {
1277
+ for (let n of e) if (n.issues.length === 0) return t.value = n.value, t;
1278
+ let i = e.filter((e) => !aborted(e));
1279
+ return i.length === 1 ? (t.value = i[0].value, i[0]) : (t.issues.push({
1280
+ code: "invalid_union",
1281
+ input: t.value,
1282
+ inst: n,
1283
+ errors: e.map((e) => e.issues.map((e) => finalizeIssue(e, r, config())))
1284
+ }), t);
1285
+ }
1286
+ var N = /*@__PURE__*/ $constructor("$ZodUnion", (e, t) => {
1287
+ D.init(e, t), defineLazy(e._zod, "optin", () => t.options.some((e) => e._zod.optin === "optional") ? "optional" : void 0), defineLazy(e._zod, "optout", () => t.options.some((e) => e._zod.optout === "optional") ? "optional" : void 0), defineLazy(e._zod, "values", () => {
1288
+ if (t.options.every((e) => e._zod.values)) return new Set(t.options.flatMap((e) => Array.from(e._zod.values)));
1289
+ }), defineLazy(e._zod, "pattern", () => {
1290
+ if (t.options.every((e) => e._zod.pattern)) {
1291
+ let e = t.options.map((e) => e._zod.pattern);
1292
+ return RegExp(`^(${e.map((e) => cleanRegex(e.source)).join("|")})$`);
1293
+ }
1294
+ });
1295
+ let n = t.options.length === 1 ? t.options[0]._zod.run : null;
1296
+ e._zod.parse = (r, i) => {
1297
+ if (n) return n(r, i);
1298
+ let a = !1, o = [];
1299
+ for (let e of t.options) {
1300
+ let t = e._zod.run({
1301
+ value: r.value,
1302
+ issues: []
1303
+ }, i);
1304
+ if (t instanceof Promise) o.push(t), a = !0;
1305
+ else {
1306
+ if (t.issues.length === 0) return t;
1307
+ o.push(t);
1308
+ }
1309
+ }
1310
+ return a ? Promise.all(o).then((t) => handleUnionResults(t, r, e, i)) : handleUnionResults(o, r, e, i);
1311
+ };
1312
+ }), st = /*@__PURE__*/ $constructor("$ZodDiscriminatedUnion", (e, t) => {
1313
+ t.inclusive = !1, N.init(e, t);
1314
+ let n = e._zod.parse;
1315
+ defineLazy(e._zod, "propValues", () => {
1316
+ let e = {};
1317
+ for (let n of t.options) {
1318
+ let r = n._zod.propValues;
1319
+ if (!r || Object.keys(r).length === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(n)}"`);
1320
+ for (let [t, n] of Object.entries(r)) {
1321
+ e[t] || (e[t] = /* @__PURE__ */ new Set());
1322
+ for (let r of n) e[t].add(r);
1323
+ }
1324
+ }
1325
+ return e;
1326
+ });
1327
+ let r = cached(() => {
1328
+ let e = t.options, n = /* @__PURE__ */ new Map();
1329
+ for (let r of e) {
1330
+ let e = r._zod.propValues?.[t.discriminator];
1331
+ if (!e || e.size === 0) throw Error(`Invalid discriminated union option at index "${t.options.indexOf(r)}"`);
1332
+ for (let t of e) {
1333
+ if (n.has(t)) throw Error(`Duplicate discriminator value "${String(t)}"`);
1334
+ n.set(t, r);
1335
+ }
1336
+ }
1337
+ return n;
1338
+ });
1339
+ e._zod.parse = (i, a) => {
1340
+ let o = i.value;
1341
+ if (!isObject(o)) return i.issues.push({
1342
+ code: "invalid_type",
1343
+ expected: "object",
1344
+ input: o,
1345
+ inst: e
1346
+ }), i;
1347
+ let s = r.value.get(o?.[t.discriminator]);
1348
+ return s ? s._zod.run(i, a) : t.unionFallback || a.direction === "backward" ? n(i, a) : (i.issues.push({
1349
+ code: "invalid_union",
1350
+ errors: [],
1351
+ note: "No matching discriminator",
1352
+ discriminator: t.discriminator,
1353
+ options: Array.from(r.value.keys()),
1354
+ input: o,
1355
+ path: [t.discriminator],
1356
+ inst: e
1357
+ }), i);
1358
+ };
1359
+ }), ct = /*@__PURE__*/ $constructor("$ZodIntersection", (e, t) => {
1360
+ D.init(e, t), e._zod.parse = (e, n) => {
1361
+ let r = e.value, i = t.left._zod.run({
1362
+ value: r,
1363
+ issues: []
1364
+ }, n), a = t.right._zod.run({
1365
+ value: r,
1366
+ issues: []
1367
+ }, n);
1368
+ return i instanceof Promise || a instanceof Promise ? Promise.all([i, a]).then(([t, n]) => handleIntersectionResults(e, t, n)) : handleIntersectionResults(e, i, a);
1369
+ };
1370
+ });
1371
+ function mergeValues(e, t) {
1372
+ if (e === t || e instanceof Date && t instanceof Date && +e == +t) return {
1373
+ valid: !0,
1374
+ data: e
1375
+ };
1376
+ if (isPlainObject(e) && isPlainObject(t)) {
1377
+ let n = Object.keys(t), r = Object.keys(e).filter((e) => n.indexOf(e) !== -1), i = {
1378
+ ...e,
1379
+ ...t
1380
+ };
1381
+ for (let n of r) {
1382
+ let r = mergeValues(e[n], t[n]);
1383
+ if (!r.valid) return {
1384
+ valid: !1,
1385
+ mergeErrorPath: [n, ...r.mergeErrorPath]
1386
+ };
1387
+ i[n] = r.data;
1388
+ }
1389
+ return {
1390
+ valid: !0,
1391
+ data: i
1392
+ };
1393
+ }
1394
+ if (Array.isArray(e) && Array.isArray(t)) {
1395
+ if (e.length !== t.length) return {
1396
+ valid: !1,
1397
+ mergeErrorPath: []
1398
+ };
1399
+ let n = [];
1400
+ for (let r = 0; r < e.length; r++) {
1401
+ let i = e[r], a = t[r], o = mergeValues(i, a);
1402
+ if (!o.valid) return {
1403
+ valid: !1,
1404
+ mergeErrorPath: [r, ...o.mergeErrorPath]
1405
+ };
1406
+ n.push(o.data);
1407
+ }
1408
+ return {
1409
+ valid: !0,
1410
+ data: n
1411
+ };
1412
+ }
1413
+ return {
1414
+ valid: !1,
1415
+ mergeErrorPath: []
1416
+ };
1417
+ }
1418
+ function handleIntersectionResults(e, t, n) {
1419
+ let r = /* @__PURE__ */ new Map(), i;
1420
+ for (let n of t.issues) if (n.code === "unrecognized_keys") {
1421
+ i ??= n;
1422
+ for (let e of n.keys) r.has(e) || r.set(e, {}), r.get(e).l = !0;
1423
+ } else e.issues.push(n);
1424
+ for (let t of n.issues) if (t.code === "unrecognized_keys") for (let e of t.keys) r.has(e) || r.set(e, {}), r.get(e).r = !0;
1425
+ else e.issues.push(t);
1426
+ let a = [...r].filter(([, e]) => e.l && e.r).map(([e]) => e);
1427
+ if (a.length && i && e.issues.push({
1428
+ ...i,
1429
+ keys: a
1430
+ }), aborted(e)) return e;
1431
+ let o = mergeValues(t.value, n.value);
1432
+ if (!o.valid) throw Error(`Unmergable intersection. Error path: ${JSON.stringify(o.mergeErrorPath)}`);
1433
+ return e.value = o.data, e;
1434
+ }
1435
+ var lt = /*@__PURE__*/ $constructor("$ZodEnum", (e, t) => {
1436
+ D.init(e, t);
1437
+ let n = getEnumValues(t.entries), r = new Set(n);
1438
+ e._zod.values = r, e._zod.pattern = RegExp(`^(${n.filter((e) => o.has(typeof e)).map((e) => typeof e == "string" ? escapeRegex(e) : e.toString()).join("|")})$`), e._zod.parse = (t, i) => {
1439
+ let a = t.value;
1440
+ return r.has(a) || t.issues.push({
1441
+ code: "invalid_value",
1442
+ values: n,
1443
+ input: a,
1444
+ inst: e
1445
+ }), t;
1446
+ };
1447
+ }), P = /*@__PURE__*/ $constructor("$ZodLiteral", (e, t) => {
1448
+ if (D.init(e, t), t.values.length === 0) throw Error("Cannot create literal schema with no valid values");
1449
+ let n = new Set(t.values);
1450
+ e._zod.values = n, e._zod.pattern = RegExp(`^(${t.values.map((e) => typeof e == "string" ? escapeRegex(e) : e ? escapeRegex(e.toString()) : String(e)).join("|")})$`), e._zod.parse = (r, i) => {
1451
+ let a = r.value;
1452
+ return n.has(a) || r.issues.push({
1453
+ code: "invalid_value",
1454
+ values: t.values,
1455
+ input: a,
1456
+ inst: e
1457
+ }), r;
1458
+ };
1459
+ }), ut = /*@__PURE__*/ $constructor("$ZodTransform", (e, t) => {
1460
+ D.init(e, t), e._zod.optin = "optional", e._zod.parse = (n, r) => {
1461
+ if (r.direction === "backward") throw new $ZodEncodeError(e.constructor.name);
1462
+ let i = t.transform(n.value, n);
1463
+ if (r.async) return (i instanceof Promise ? i : Promise.resolve(i)).then((e) => (n.value = e, n.fallback = !0, n));
1464
+ if (i instanceof Promise) throw new $ZodAsyncError();
1465
+ return n.value = i, n.fallback = !0, n;
1466
+ };
1467
+ });
1468
+ function handleOptionalResult(e, t) {
1469
+ return t === void 0 && (e.issues.length || e.fallback) ? {
1470
+ issues: [],
1471
+ value: void 0
1472
+ } : e;
1473
+ }
1474
+ var F = /*@__PURE__*/ $constructor("$ZodOptional", (e, t) => {
1475
+ D.init(e, t), e._zod.optin = "optional", e._zod.optout = "optional", defineLazy(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, void 0]) : void 0), defineLazy(e._zod, "pattern", () => {
1476
+ let e = t.innerType._zod.pattern;
1477
+ return e ? RegExp(`^(${cleanRegex(e.source)})?$`) : void 0;
1478
+ }), e._zod.parse = (e, n) => {
1479
+ if (t.innerType._zod.optin === "optional") {
1480
+ let r = e.value, i = t.innerType._zod.run(e, n);
1481
+ return i instanceof Promise ? i.then((e) => handleOptionalResult(e, r)) : handleOptionalResult(i, r);
1482
+ }
1483
+ return e.value === void 0 ? e : t.innerType._zod.run(e, n);
1484
+ };
1485
+ }), dt = /*@__PURE__*/ $constructor("$ZodExactOptional", (e, t) => {
1486
+ F.init(e, t), defineLazy(e._zod, "values", () => t.innerType._zod.values), defineLazy(e._zod, "pattern", () => t.innerType._zod.pattern), e._zod.parse = (e, n) => t.innerType._zod.run(e, n);
1487
+ }), ft = /*@__PURE__*/ $constructor("$ZodNullable", (e, t) => {
1488
+ D.init(e, t), defineLazy(e._zod, "optin", () => t.innerType._zod.optin), defineLazy(e._zod, "optout", () => t.innerType._zod.optout), defineLazy(e._zod, "pattern", () => {
1489
+ let e = t.innerType._zod.pattern;
1490
+ return e ? RegExp(`^(${cleanRegex(e.source)}|null)$`) : void 0;
1491
+ }), defineLazy(e._zod, "values", () => t.innerType._zod.values ? /* @__PURE__ */ new Set([...t.innerType._zod.values, null]) : void 0), e._zod.parse = (e, n) => e.value === null ? e : t.innerType._zod.run(e, n);
1492
+ }), I = /*@__PURE__*/ $constructor("$ZodDefault", (e, t) => {
1493
+ D.init(e, t), e._zod.optin = "optional", defineLazy(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
1494
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
1495
+ if (e.value === void 0) return e.value = t.defaultValue, e;
1496
+ let r = t.innerType._zod.run(e, n);
1497
+ return r instanceof Promise ? r.then((e) => handleDefaultResult(e, t)) : handleDefaultResult(r, t);
1498
+ };
1499
+ });
1500
+ function handleDefaultResult(e, t) {
1501
+ return e.value === void 0 && (e.value = t.defaultValue), e;
1502
+ }
1503
+ var pt = /*@__PURE__*/ $constructor("$ZodPrefault", (e, t) => {
1504
+ D.init(e, t), e._zod.optin = "optional", defineLazy(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => (n.direction === "backward" || e.value === void 0 && (e.value = t.defaultValue), t.innerType._zod.run(e, n));
1505
+ }), mt = /*@__PURE__*/ $constructor("$ZodNonOptional", (e, t) => {
1506
+ D.init(e, t), defineLazy(e._zod, "values", () => {
1507
+ let e = t.innerType._zod.values;
1508
+ return e ? new Set([...e].filter((e) => e !== void 0)) : void 0;
1509
+ }), e._zod.parse = (n, r) => {
1510
+ let i = t.innerType._zod.run(n, r);
1511
+ return i instanceof Promise ? i.then((t) => handleNonOptionalResult(t, e)) : handleNonOptionalResult(i, e);
1512
+ };
1513
+ });
1514
+ function handleNonOptionalResult(e, t) {
1515
+ return !e.issues.length && e.value === void 0 && e.issues.push({
1516
+ code: "invalid_type",
1517
+ expected: "nonoptional",
1518
+ input: e.value,
1519
+ inst: t
1520
+ }), e;
1521
+ }
1522
+ var ht = /*@__PURE__*/ $constructor("$ZodCatch", (e, t) => {
1523
+ D.init(e, t), e._zod.optin = "optional", defineLazy(e._zod, "optout", () => t.innerType._zod.optout), defineLazy(e._zod, "values", () => t.innerType._zod.values), e._zod.parse = (e, n) => {
1524
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
1525
+ let r = t.innerType._zod.run(e, n);
1526
+ return r instanceof Promise ? r.then((r) => (e.value = r.value, r.issues.length && (e.value = t.catchValue({
1527
+ ...e,
1528
+ error: { issues: r.issues.map((e) => finalizeIssue(e, n, config())) },
1529
+ input: e.value
1530
+ }), e.issues = [], e.fallback = !0), e)) : (e.value = r.value, r.issues.length && (e.value = t.catchValue({
1531
+ ...e,
1532
+ error: { issues: r.issues.map((e) => finalizeIssue(e, n, config())) },
1533
+ input: e.value
1534
+ }), e.issues = [], e.fallback = !0), e);
1535
+ };
1536
+ }), L = /*@__PURE__*/ $constructor("$ZodPipe", (e, t) => {
1537
+ D.init(e, t), defineLazy(e._zod, "values", () => t.in._zod.values), defineLazy(e._zod, "optin", () => t.in._zod.optin), defineLazy(e._zod, "optout", () => t.out._zod.optout), defineLazy(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (e, n) => {
1538
+ if (n.direction === "backward") {
1539
+ let r = t.out._zod.run(e, n);
1540
+ return r instanceof Promise ? r.then((e) => handlePipeResult(e, t.in, n)) : handlePipeResult(r, t.in, n);
1541
+ }
1542
+ let r = t.in._zod.run(e, n);
1543
+ return r instanceof Promise ? r.then((e) => handlePipeResult(e, t.out, n)) : handlePipeResult(r, t.out, n);
1544
+ };
1545
+ });
1546
+ function handlePipeResult(e, t, n) {
1547
+ return e.issues.length ? (e.aborted = !0, e) : t._zod.run({
1548
+ value: e.value,
1549
+ issues: e.issues,
1550
+ fallback: e.fallback
1551
+ }, n);
1552
+ }
1553
+ var R = /*@__PURE__*/ $constructor("$ZodCodec", (e, t) => {
1554
+ D.init(e, t), defineLazy(e._zod, "values", () => t.in._zod.values), defineLazy(e._zod, "optin", () => t.in._zod.optin), defineLazy(e._zod, "optout", () => t.out._zod.optout), defineLazy(e._zod, "propValues", () => t.in._zod.propValues), e._zod.parse = (e, n) => {
1555
+ if ((n.direction || "forward") === "forward") {
1556
+ let r = t.in._zod.run(e, n);
1557
+ return r instanceof Promise ? r.then((e) => handleCodecAResult(e, t, n)) : handleCodecAResult(r, t, n);
1558
+ } else {
1559
+ let r = t.out._zod.run(e, n);
1560
+ return r instanceof Promise ? r.then((e) => handleCodecAResult(e, t, n)) : handleCodecAResult(r, t, n);
1561
+ }
1562
+ };
1563
+ });
1564
+ function handleCodecAResult(e, t, n) {
1565
+ if (e.issues.length) return e.aborted = !0, e;
1566
+ if ((n.direction || "forward") === "forward") {
1567
+ let r = t.transform(e.value, e);
1568
+ return r instanceof Promise ? r.then((r) => handleCodecTxResult(e, r, t.out, n)) : handleCodecTxResult(e, r, t.out, n);
1569
+ } else {
1570
+ let r = t.reverseTransform(e.value, e);
1571
+ return r instanceof Promise ? r.then((r) => handleCodecTxResult(e, r, t.in, n)) : handleCodecTxResult(e, r, t.in, n);
1572
+ }
1573
+ }
1574
+ function handleCodecTxResult(e, t, n, r) {
1575
+ return e.issues.length ? (e.aborted = !0, e) : n._zod.run({
1576
+ value: t,
1577
+ issues: e.issues
1578
+ }, r);
1579
+ }
1580
+ var gt = /*@__PURE__*/ $constructor("$ZodReadonly", (e, t) => {
1581
+ D.init(e, t), defineLazy(e._zod, "propValues", () => t.innerType._zod.propValues), defineLazy(e._zod, "values", () => t.innerType._zod.values), defineLazy(e._zod, "optin", () => t.innerType?._zod?.optin), defineLazy(e._zod, "optout", () => t.innerType?._zod?.optout), e._zod.parse = (e, n) => {
1582
+ if (n.direction === "backward") return t.innerType._zod.run(e, n);
1583
+ let r = t.innerType._zod.run(e, n);
1584
+ return r instanceof Promise ? r.then(handleReadonlyResult) : handleReadonlyResult(r);
1585
+ };
1586
+ });
1587
+ function handleReadonlyResult(e) {
1588
+ return e.value = Object.freeze(e.value), e;
1589
+ }
1590
+ var _t = /*@__PURE__*/ $constructor("$ZodCustom", (e, t) => {
1591
+ y.init(e, t), D.init(e, t), e._zod.parse = (e, t) => e, e._zod.check = (n) => {
1592
+ let r = n.value, i = t.fn(r);
1593
+ if (i instanceof Promise) return i.then((t) => handleRefineResult(t, n, r, e));
1594
+ handleRefineResult(i, n, r, e);
1595
+ };
1596
+ });
1597
+ function handleRefineResult(e, t, n, r) {
1598
+ if (!e) {
1599
+ let e = {
1600
+ code: "custom",
1601
+ input: n,
1602
+ inst: r,
1603
+ path: [...r._zod.def.path ?? []],
1604
+ continue: !r._zod.def.abort
1605
+ };
1606
+ r._zod.def.params && (e.params = r._zod.def.params), t.issues.push(issue(e));
1607
+ }
1608
+ }
1609
+ //#endregion
1610
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/registries.js
1611
+ var z, $ZodRegistry = class {
1612
+ constructor() {
1613
+ this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1614
+ }
1615
+ add(e, ...t) {
1616
+ let n = t[0];
1617
+ return this._map.set(e, n), n && typeof n == "object" && "id" in n && this._idmap.set(n.id, e), this;
1618
+ }
1619
+ clear() {
1620
+ return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
1621
+ }
1622
+ remove(e) {
1623
+ let t = this._map.get(e);
1624
+ return t && typeof t == "object" && "id" in t && this._idmap.delete(t.id), this._map.delete(e), this;
1625
+ }
1626
+ get(e) {
1627
+ let t = e._zod.parent;
1628
+ if (t) {
1629
+ let n = { ...this.get(t) ?? {} };
1630
+ delete n.id;
1631
+ let r = {
1632
+ ...n,
1633
+ ...this._map.get(e)
1634
+ };
1635
+ return Object.keys(r).length ? r : void 0;
1636
+ }
1637
+ return this._map.get(e);
1638
+ }
1639
+ has(e) {
1640
+ return this._map.has(e);
1641
+ }
1642
+ };
1643
+ function registry() {
1644
+ return new $ZodRegistry();
1645
+ }
1646
+ (z = globalThis).__zod_globalRegistry ?? (z.__zod_globalRegistry = registry());
1647
+ var B = globalThis.__zod_globalRegistry;
1648
+ //#endregion
1649
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/api.js
1650
+ // @__NO_SIDE_EFFECTS__
1651
+ function _string(e, t) {
1652
+ return new e({
1653
+ type: "string",
1654
+ ...normalizeParams(t)
1655
+ });
1656
+ }
1657
+ // @__NO_SIDE_EFFECTS__
1658
+ function _email(e, t) {
1659
+ return new e({
1660
+ type: "string",
1661
+ format: "email",
1662
+ check: "string_format",
1663
+ abort: !1,
1664
+ ...normalizeParams(t)
1665
+ });
1666
+ }
1667
+ // @__NO_SIDE_EFFECTS__
1668
+ function _guid(e, t) {
1669
+ return new e({
1670
+ type: "string",
1671
+ format: "guid",
1672
+ check: "string_format",
1673
+ abort: !1,
1674
+ ...normalizeParams(t)
1675
+ });
1676
+ }
1677
+ // @__NO_SIDE_EFFECTS__
1678
+ function _uuid(e, t) {
1679
+ return new e({
1680
+ type: "string",
1681
+ format: "uuid",
1682
+ check: "string_format",
1683
+ abort: !1,
1684
+ ...normalizeParams(t)
1685
+ });
1686
+ }
1687
+ // @__NO_SIDE_EFFECTS__
1688
+ function _uuidv4(e, t) {
1689
+ return new e({
1690
+ type: "string",
1691
+ format: "uuid",
1692
+ check: "string_format",
1693
+ abort: !1,
1694
+ version: "v4",
1695
+ ...normalizeParams(t)
1696
+ });
1697
+ }
1698
+ // @__NO_SIDE_EFFECTS__
1699
+ function _uuidv6(e, t) {
1700
+ return new e({
1701
+ type: "string",
1702
+ format: "uuid",
1703
+ check: "string_format",
1704
+ abort: !1,
1705
+ version: "v6",
1706
+ ...normalizeParams(t)
1707
+ });
1708
+ }
1709
+ // @__NO_SIDE_EFFECTS__
1710
+ function _uuidv7(e, t) {
1711
+ return new e({
1712
+ type: "string",
1713
+ format: "uuid",
1714
+ check: "string_format",
1715
+ abort: !1,
1716
+ version: "v7",
1717
+ ...normalizeParams(t)
1718
+ });
1719
+ }
1720
+ // @__NO_SIDE_EFFECTS__
1721
+ function _url(e, t) {
1722
+ return new e({
1723
+ type: "string",
1724
+ format: "url",
1725
+ check: "string_format",
1726
+ abort: !1,
1727
+ ...normalizeParams(t)
1728
+ });
1729
+ }
1730
+ // @__NO_SIDE_EFFECTS__
1731
+ function _emoji(e, t) {
1732
+ return new e({
1733
+ type: "string",
1734
+ format: "emoji",
1735
+ check: "string_format",
1736
+ abort: !1,
1737
+ ...normalizeParams(t)
1738
+ });
1739
+ }
1740
+ // @__NO_SIDE_EFFECTS__
1741
+ function _nanoid(e, t) {
1742
+ return new e({
1743
+ type: "string",
1744
+ format: "nanoid",
1745
+ check: "string_format",
1746
+ abort: !1,
1747
+ ...normalizeParams(t)
1748
+ });
1749
+ }
1750
+ // @__NO_SIDE_EFFECTS__
1751
+ function _cuid(e, t) {
1752
+ return new e({
1753
+ type: "string",
1754
+ format: "cuid",
1755
+ check: "string_format",
1756
+ abort: !1,
1757
+ ...normalizeParams(t)
1758
+ });
1759
+ }
1760
+ // @__NO_SIDE_EFFECTS__
1761
+ function _cuid2(e, t) {
1762
+ return new e({
1763
+ type: "string",
1764
+ format: "cuid2",
1765
+ check: "string_format",
1766
+ abort: !1,
1767
+ ...normalizeParams(t)
1768
+ });
1769
+ }
1770
+ // @__NO_SIDE_EFFECTS__
1771
+ function _ulid(e, t) {
1772
+ return new e({
1773
+ type: "string",
1774
+ format: "ulid",
1775
+ check: "string_format",
1776
+ abort: !1,
1777
+ ...normalizeParams(t)
1778
+ });
1779
+ }
1780
+ // @__NO_SIDE_EFFECTS__
1781
+ function _xid(e, t) {
1782
+ return new e({
1783
+ type: "string",
1784
+ format: "xid",
1785
+ check: "string_format",
1786
+ abort: !1,
1787
+ ...normalizeParams(t)
1788
+ });
1789
+ }
1790
+ // @__NO_SIDE_EFFECTS__
1791
+ function _ksuid(e, t) {
1792
+ return new e({
1793
+ type: "string",
1794
+ format: "ksuid",
1795
+ check: "string_format",
1796
+ abort: !1,
1797
+ ...normalizeParams(t)
1798
+ });
1799
+ }
1800
+ // @__NO_SIDE_EFFECTS__
1801
+ function _ipv4(e, t) {
1802
+ return new e({
1803
+ type: "string",
1804
+ format: "ipv4",
1805
+ check: "string_format",
1806
+ abort: !1,
1807
+ ...normalizeParams(t)
1808
+ });
1809
+ }
1810
+ // @__NO_SIDE_EFFECTS__
1811
+ function _ipv6(e, t) {
1812
+ return new e({
1813
+ type: "string",
1814
+ format: "ipv6",
1815
+ check: "string_format",
1816
+ abort: !1,
1817
+ ...normalizeParams(t)
1818
+ });
1819
+ }
1820
+ // @__NO_SIDE_EFFECTS__
1821
+ function _cidrv4(e, t) {
1822
+ return new e({
1823
+ type: "string",
1824
+ format: "cidrv4",
1825
+ check: "string_format",
1826
+ abort: !1,
1827
+ ...normalizeParams(t)
1828
+ });
1829
+ }
1830
+ // @__NO_SIDE_EFFECTS__
1831
+ function _cidrv6(e, t) {
1832
+ return new e({
1833
+ type: "string",
1834
+ format: "cidrv6",
1835
+ check: "string_format",
1836
+ abort: !1,
1837
+ ...normalizeParams(t)
1838
+ });
1839
+ }
1840
+ // @__NO_SIDE_EFFECTS__
1841
+ function _base64(e, t) {
1842
+ return new e({
1843
+ type: "string",
1844
+ format: "base64",
1845
+ check: "string_format",
1846
+ abort: !1,
1847
+ ...normalizeParams(t)
1848
+ });
1849
+ }
1850
+ // @__NO_SIDE_EFFECTS__
1851
+ function _base64url(e, t) {
1852
+ return new e({
1853
+ type: "string",
1854
+ format: "base64url",
1855
+ check: "string_format",
1856
+ abort: !1,
1857
+ ...normalizeParams(t)
1858
+ });
1859
+ }
1860
+ // @__NO_SIDE_EFFECTS__
1861
+ function _e164(e, t) {
1862
+ return new e({
1863
+ type: "string",
1864
+ format: "e164",
1865
+ check: "string_format",
1866
+ abort: !1,
1867
+ ...normalizeParams(t)
1868
+ });
1869
+ }
1870
+ // @__NO_SIDE_EFFECTS__
1871
+ function _jwt(e, t) {
1872
+ return new e({
1873
+ type: "string",
1874
+ format: "jwt",
1875
+ check: "string_format",
1876
+ abort: !1,
1877
+ ...normalizeParams(t)
1878
+ });
1879
+ }
1880
+ // @__NO_SIDE_EFFECTS__
1881
+ function _isoDateTime(e, t) {
1882
+ return new e({
1883
+ type: "string",
1884
+ format: "datetime",
1885
+ check: "string_format",
1886
+ offset: !1,
1887
+ local: !1,
1888
+ precision: null,
1889
+ ...normalizeParams(t)
1890
+ });
1891
+ }
1892
+ // @__NO_SIDE_EFFECTS__
1893
+ function _isoDate(e, t) {
1894
+ return new e({
1895
+ type: "string",
1896
+ format: "date",
1897
+ check: "string_format",
1898
+ ...normalizeParams(t)
1899
+ });
1900
+ }
1901
+ // @__NO_SIDE_EFFECTS__
1902
+ function _isoTime(e, t) {
1903
+ return new e({
1904
+ type: "string",
1905
+ format: "time",
1906
+ check: "string_format",
1907
+ precision: null,
1908
+ ...normalizeParams(t)
1909
+ });
1910
+ }
1911
+ // @__NO_SIDE_EFFECTS__
1912
+ function _isoDuration(e, t) {
1913
+ return new e({
1914
+ type: "string",
1915
+ format: "duration",
1916
+ check: "string_format",
1917
+ ...normalizeParams(t)
1918
+ });
1919
+ }
1920
+ // @__NO_SIDE_EFFECTS__
1921
+ function _number(e, t) {
1922
+ return new e({
1923
+ type: "number",
1924
+ checks: [],
1925
+ ...normalizeParams(t)
1926
+ });
1927
+ }
1928
+ // @__NO_SIDE_EFFECTS__
1929
+ function _int(e, t) {
1930
+ return new e({
1931
+ type: "number",
1932
+ check: "number_format",
1933
+ abort: !1,
1934
+ format: "safeint",
1935
+ ...normalizeParams(t)
1936
+ });
1937
+ }
1938
+ // @__NO_SIDE_EFFECTS__
1939
+ function _boolean(e, t) {
1940
+ return new e({
1941
+ type: "boolean",
1942
+ ...normalizeParams(t)
1943
+ });
1944
+ }
1945
+ // @__NO_SIDE_EFFECTS__
1946
+ function _unknown(e) {
1947
+ return new e({ type: "unknown" });
1948
+ }
1949
+ // @__NO_SIDE_EFFECTS__
1950
+ function _never(e, t) {
1951
+ return new e({
1952
+ type: "never",
1953
+ ...normalizeParams(t)
1954
+ });
1955
+ }
1956
+ // @__NO_SIDE_EFFECTS__
1957
+ function _lt(e, t) {
1958
+ return new x({
1959
+ check: "less_than",
1960
+ ...normalizeParams(t),
1961
+ value: e,
1962
+ inclusive: !1
1963
+ });
1964
+ }
1965
+ // @__NO_SIDE_EFFECTS__
1966
+ function _lte(e, t) {
1967
+ return new x({
1968
+ check: "less_than",
1969
+ ...normalizeParams(t),
1970
+ value: e,
1971
+ inclusive: !0
1972
+ });
1973
+ }
1974
+ // @__NO_SIDE_EFFECTS__
1975
+ function _gt(e, t) {
1976
+ return new S({
1977
+ check: "greater_than",
1978
+ ...normalizeParams(t),
1979
+ value: e,
1980
+ inclusive: !1
1981
+ });
1982
+ }
1983
+ // @__NO_SIDE_EFFECTS__
1984
+ function _gte(e, t) {
1985
+ return new S({
1986
+ check: "greater_than",
1987
+ ...normalizeParams(t),
1988
+ value: e,
1989
+ inclusive: !0
1990
+ });
1991
+ }
1992
+ // @__NO_SIDE_EFFECTS__
1993
+ function _multipleOf(e, t) {
1994
+ return new Ce({
1995
+ check: "multiple_of",
1996
+ ...normalizeParams(t),
1997
+ value: e
1998
+ });
1999
+ }
2000
+ // @__NO_SIDE_EFFECTS__
2001
+ function _maxLength(e, t) {
2002
+ return new Te({
2003
+ check: "max_length",
2004
+ ...normalizeParams(t),
2005
+ maximum: e
2006
+ });
2007
+ }
2008
+ // @__NO_SIDE_EFFECTS__
2009
+ function _minLength(e, t) {
2010
+ return new Ee({
2011
+ check: "min_length",
2012
+ ...normalizeParams(t),
2013
+ minimum: e
2014
+ });
2015
+ }
2016
+ // @__NO_SIDE_EFFECTS__
2017
+ function _length(e, t) {
2018
+ return new De({
2019
+ check: "length_equals",
2020
+ ...normalizeParams(t),
2021
+ length: e
2022
+ });
2023
+ }
2024
+ // @__NO_SIDE_EFFECTS__
2025
+ function _regex(e, t) {
2026
+ return new w({
2027
+ check: "string_format",
2028
+ format: "regex",
2029
+ ...normalizeParams(t),
2030
+ pattern: e
2031
+ });
2032
+ }
2033
+ // @__NO_SIDE_EFFECTS__
2034
+ function _lowercase(e) {
2035
+ return new T({
2036
+ check: "string_format",
2037
+ format: "lowercase",
2038
+ ...normalizeParams(e)
2039
+ });
2040
+ }
2041
+ // @__NO_SIDE_EFFECTS__
2042
+ function _uppercase(e) {
2043
+ return new E({
2044
+ check: "string_format",
2045
+ format: "uppercase",
2046
+ ...normalizeParams(e)
2047
+ });
2048
+ }
2049
+ // @__NO_SIDE_EFFECTS__
2050
+ function _includes(e, t) {
2051
+ return new Oe({
2052
+ check: "string_format",
2053
+ format: "includes",
2054
+ ...normalizeParams(t),
2055
+ includes: e
2056
+ });
2057
+ }
2058
+ // @__NO_SIDE_EFFECTS__
2059
+ function _startsWith(e, t) {
2060
+ return new ke({
2061
+ check: "string_format",
2062
+ format: "starts_with",
2063
+ ...normalizeParams(t),
2064
+ prefix: e
2065
+ });
2066
+ }
2067
+ // @__NO_SIDE_EFFECTS__
2068
+ function _endsWith(e, t) {
2069
+ return new Ae({
2070
+ check: "string_format",
2071
+ format: "ends_with",
2072
+ ...normalizeParams(t),
2073
+ suffix: e
2074
+ });
2075
+ }
2076
+ // @__NO_SIDE_EFFECTS__
2077
+ function _overwrite(e) {
2078
+ return new je({
2079
+ check: "overwrite",
2080
+ tx: e
2081
+ });
2082
+ }
2083
+ // @__NO_SIDE_EFFECTS__
2084
+ function _normalize(e) {
2085
+ return /* @__PURE__ */ _overwrite((t) => t.normalize(e));
2086
+ }
2087
+ // @__NO_SIDE_EFFECTS__
2088
+ function _trim() {
2089
+ return /* @__PURE__ */ _overwrite((e) => e.trim());
2090
+ }
2091
+ // @__NO_SIDE_EFFECTS__
2092
+ function _toLowerCase() {
2093
+ return /* @__PURE__ */ _overwrite((e) => e.toLowerCase());
2094
+ }
2095
+ // @__NO_SIDE_EFFECTS__
2096
+ function _toUpperCase() {
2097
+ return /* @__PURE__ */ _overwrite((e) => e.toUpperCase());
2098
+ }
2099
+ // @__NO_SIDE_EFFECTS__
2100
+ function _slugify() {
2101
+ return /* @__PURE__ */ _overwrite((e) => slugify(e));
2102
+ }
2103
+ // @__NO_SIDE_EFFECTS__
2104
+ function _array(e, t, n) {
2105
+ return new e({
2106
+ type: "array",
2107
+ element: t,
2108
+ ...normalizeParams(n)
2109
+ });
2110
+ }
2111
+ // @__NO_SIDE_EFFECTS__
2112
+ function _refine(e, t, n) {
2113
+ return new e({
2114
+ type: "custom",
2115
+ check: "custom",
2116
+ fn: t,
2117
+ ...normalizeParams(n)
2118
+ });
2119
+ }
2120
+ // @__NO_SIDE_EFFECTS__
2121
+ function _superRefine(e, t) {
2122
+ let n = /* @__PURE__ */ _check((t) => (t.addIssue = (e) => {
2123
+ if (typeof e == "string") t.issues.push(issue(e, t.value, n._zod.def));
2124
+ else {
2125
+ let r = e;
2126
+ r.fatal && (r.continue = !1), r.code ??= "custom", r.input ??= t.value, r.inst ??= n, r.continue ??= !n._zod.def.abort, t.issues.push(issue(r));
2127
+ }
2128
+ }, e(t.value, t)), t);
2129
+ return n;
2130
+ }
2131
+ // @__NO_SIDE_EFFECTS__
2132
+ function _check(e, t) {
2133
+ let n = new y({
2134
+ check: "custom",
2135
+ ...normalizeParams(t)
2136
+ });
2137
+ return n._zod.check = e, n;
2138
+ }
2139
+ // @__NO_SIDE_EFFECTS__
2140
+ function _stringbool(e, t) {
2141
+ let n = normalizeParams(t), r = n.truthy ?? [
2142
+ "true",
2143
+ "1",
2144
+ "yes",
2145
+ "on",
2146
+ "y",
2147
+ "enabled"
2148
+ ], i = n.falsy ?? [
2149
+ "false",
2150
+ "0",
2151
+ "no",
2152
+ "off",
2153
+ "n",
2154
+ "disabled"
2155
+ ];
2156
+ n.case !== "sensitive" && (r = r.map((e) => typeof e == "string" ? e.toLowerCase() : e), i = i.map((e) => typeof e == "string" ? e.toLowerCase() : e));
2157
+ let a = new Set(r), o = new Set(i), s = e.Codec ?? R, c = e.Boolean ?? j, l = new s({
2158
+ type: "pipe",
2159
+ in: new (e.String ?? O)({
2160
+ type: "string",
2161
+ error: n.error
2162
+ }),
2163
+ out: new c({
2164
+ type: "boolean",
2165
+ error: n.error
2166
+ }),
2167
+ transform: ((e, t) => {
2168
+ let r = e;
2169
+ return n.case !== "sensitive" && (r = r.toLowerCase()), a.has(r) ? !0 : o.has(r) ? !1 : (t.issues.push({
2170
+ code: "invalid_value",
2171
+ expected: "stringbool",
2172
+ values: [...a, ...o],
2173
+ input: t.value,
2174
+ inst: l,
2175
+ continue: !1
2176
+ }), {});
2177
+ }),
2178
+ reverseTransform: ((e, t) => e === !0 ? r[0] || "true" : i[0] || "false"),
2179
+ error: n.error
2180
+ });
2181
+ return l;
2182
+ }
2183
+ //#endregion
2184
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/core/to-json-schema.js
2185
+ function initializeContext(e) {
2186
+ let t = e?.target ?? "draft-2020-12";
2187
+ return t === "draft-4" && (t = "draft-04"), t === "draft-7" && (t = "draft-07"), {
2188
+ processors: e.processors ?? {},
2189
+ metadataRegistry: e?.metadata ?? B,
2190
+ target: t,
2191
+ unrepresentable: e?.unrepresentable ?? "throw",
2192
+ override: e?.override ?? (() => {}),
2193
+ io: e?.io ?? "output",
2194
+ counter: 0,
2195
+ seen: /* @__PURE__ */ new Map(),
2196
+ cycles: e?.cycles ?? "ref",
2197
+ reused: e?.reused ?? "inline",
2198
+ external: e?.external ?? void 0
2199
+ };
2200
+ }
2201
+ function process(e, t, n = {
2202
+ path: [],
2203
+ schemaPath: []
2204
+ }) {
2205
+ var r;
2206
+ let i = e._zod.def, a = t.seen.get(e);
2207
+ if (a) return a.count++, n.schemaPath.includes(e) && (a.cycle = n.path), a.schema;
2208
+ let o = {
2209
+ schema: {},
2210
+ count: 1,
2211
+ cycle: void 0,
2212
+ path: n.path
2213
+ };
2214
+ t.seen.set(e, o);
2215
+ let s = e._zod.toJSONSchema?.();
2216
+ if (s) o.schema = s;
2217
+ else {
2218
+ let r = {
2219
+ ...n,
2220
+ schemaPath: [...n.schemaPath, e],
2221
+ path: n.path
2222
+ };
2223
+ if (e._zod.processJSONSchema) e._zod.processJSONSchema(t, o.schema, r);
2224
+ else {
2225
+ let n = o.schema, a = t.processors[i.type];
2226
+ if (!a) throw Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);
2227
+ a(e, t, n, r);
2228
+ }
2229
+ let a = e._zod.parent;
2230
+ a && (o.ref ||= a, process(a, t, r), t.seen.get(a).isParent = !0);
2231
+ }
2232
+ let c = t.metadataRegistry.get(e);
2233
+ return c && Object.assign(o.schema, c), t.io === "input" && isTransforming(e) && (delete o.schema.examples, delete o.schema.default), t.io === "input" && "_prefault" in o.schema && ((r = o.schema).default ?? (r.default = o.schema._prefault)), delete o.schema._prefault, t.seen.get(e).schema;
2234
+ }
2235
+ function extractDefs(e, t) {
2236
+ let n = e.seen.get(t);
2237
+ if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
2238
+ let r = /* @__PURE__ */ new Map();
2239
+ for (let t of e.seen.entries()) {
2240
+ let n = e.metadataRegistry.get(t[0])?.id;
2241
+ if (n) {
2242
+ let e = r.get(n);
2243
+ if (e && e !== t[0]) throw Error(`Duplicate schema id "${n}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
2244
+ r.set(n, t[0]);
2245
+ }
2246
+ }
2247
+ let makeURI = (t) => {
2248
+ let r = e.target === "draft-2020-12" ? "$defs" : "definitions";
2249
+ if (e.external) {
2250
+ let n = e.external.registry.get(t[0])?.id, i = e.external.uri ?? ((e) => e);
2251
+ if (n) return { ref: i(n) };
2252
+ let a = t[1].defId ?? t[1].schema.id ?? `schema${e.counter++}`;
2253
+ return t[1].defId = a, {
2254
+ defId: a,
2255
+ ref: `${i("__shared")}#/${r}/${a}`
2256
+ };
2257
+ }
2258
+ if (t[1] === n) return { ref: "#" };
2259
+ let i = `#/${r}/`, a = t[1].schema.id ?? `__schema${e.counter++}`;
2260
+ return {
2261
+ defId: a,
2262
+ ref: i + a
2263
+ };
2264
+ }, extractToDef = (e) => {
2265
+ if (e[1].schema.$ref) return;
2266
+ let t = e[1], { ref: n, defId: r } = makeURI(e);
2267
+ t.def = { ...t.schema }, r && (t.defId = r);
2268
+ let i = t.schema;
2269
+ for (let e in i) delete i[e];
2270
+ i.$ref = n;
2271
+ };
2272
+ if (e.cycles === "throw") for (let t of e.seen.entries()) {
2273
+ let e = t[1];
2274
+ if (e.cycle) throw Error(`Cycle detected: #/${e.cycle?.join("/")}/<root>
2275
+
2276
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
2277
+ }
2278
+ for (let n of e.seen.entries()) {
2279
+ let r = n[1];
2280
+ if (t === n[0]) {
2281
+ extractToDef(n);
2282
+ continue;
2283
+ }
2284
+ if (e.external) {
2285
+ let r = e.external.registry.get(n[0])?.id;
2286
+ if (t !== n[0] && r) {
2287
+ extractToDef(n);
2288
+ continue;
2289
+ }
2290
+ }
2291
+ if (e.metadataRegistry.get(n[0])?.id) {
2292
+ extractToDef(n);
2293
+ continue;
2294
+ }
2295
+ if (r.cycle) {
2296
+ extractToDef(n);
2297
+ continue;
2298
+ }
2299
+ if (r.count > 1 && e.reused === "ref") {
2300
+ extractToDef(n);
2301
+ continue;
2302
+ }
2303
+ }
2304
+ }
2305
+ function finalize(e, t) {
2306
+ let n = e.seen.get(t);
2307
+ if (!n) throw Error("Unprocessed schema. This is a bug in Zod.");
2308
+ let flattenRef = (t) => {
2309
+ let n = e.seen.get(t);
2310
+ if (n.ref === null) return;
2311
+ let r = n.def ?? n.schema, i = { ...r }, a = n.ref;
2312
+ if (n.ref = null, a) {
2313
+ flattenRef(a);
2314
+ let n = e.seen.get(a), o = n.schema;
2315
+ if (o.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (r.allOf = r.allOf ?? [], r.allOf.push(o)) : Object.assign(r, o), Object.assign(r, i), t._zod.parent === a) for (let e in r) e === "$ref" || e === "allOf" || e in i || delete r[e];
2316
+ if (o.$ref && n.def) for (let e in r) e === "$ref" || e === "allOf" || e in n.def && JSON.stringify(r[e]) === JSON.stringify(n.def[e]) && delete r[e];
2317
+ }
2318
+ let o = t._zod.parent;
2319
+ if (o && o !== a) {
2320
+ flattenRef(o);
2321
+ let t = e.seen.get(o);
2322
+ if (t?.schema.$ref && (r.$ref = t.schema.$ref, t.def)) for (let e in r) e === "$ref" || e === "allOf" || e in t.def && JSON.stringify(r[e]) === JSON.stringify(t.def[e]) && delete r[e];
2323
+ }
2324
+ e.override({
2325
+ zodSchema: t,
2326
+ jsonSchema: r,
2327
+ path: n.path ?? []
2328
+ });
2329
+ };
2330
+ for (let t of [...e.seen.entries()].reverse()) flattenRef(t[0]);
2331
+ let r = {};
2332
+ if (e.target === "draft-2020-12" ? r.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? r.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? r.$schema = "http://json-schema.org/draft-04/schema#" : e.target, e.external?.uri) {
2333
+ let n = e.external.registry.get(t)?.id;
2334
+ if (!n) throw Error("Schema is missing an `id` property");
2335
+ r.$id = e.external.uri(n);
2336
+ }
2337
+ Object.assign(r, n.def ?? n.schema);
2338
+ let i = e.metadataRegistry.get(t)?.id;
2339
+ i !== void 0 && r.id === i && delete r.id;
2340
+ let a = e.external?.defs ?? {};
2341
+ for (let t of e.seen.entries()) {
2342
+ let e = t[1];
2343
+ e.def && e.defId && (e.def.id === e.defId && delete e.def.id, a[e.defId] = e.def);
2344
+ }
2345
+ e.external || Object.keys(a).length > 0 && (e.target === "draft-2020-12" ? r.$defs = a : r.definitions = a);
2346
+ try {
2347
+ let n = JSON.parse(JSON.stringify(r));
2348
+ return Object.defineProperty(n, "~standard", {
2349
+ value: {
2350
+ ...t["~standard"],
2351
+ jsonSchema: {
2352
+ input: createStandardJSONSchemaMethod(t, "input", e.processors),
2353
+ output: createStandardJSONSchemaMethod(t, "output", e.processors)
2354
+ }
2355
+ },
2356
+ enumerable: !1,
2357
+ writable: !1
2358
+ }), n;
2359
+ } catch {
2360
+ throw Error("Error converting schema to JSON.");
2361
+ }
2362
+ }
2363
+ function isTransforming(e, t) {
2364
+ let n = t ?? { seen: /* @__PURE__ */ new Set() };
2365
+ if (n.seen.has(e)) return !1;
2366
+ n.seen.add(e);
2367
+ let r = e._zod.def;
2368
+ if (r.type === "transform") return !0;
2369
+ if (r.type === "array") return isTransforming(r.element, n);
2370
+ if (r.type === "set") return isTransforming(r.valueType, n);
2371
+ if (r.type === "lazy") return isTransforming(r.getter(), n);
2372
+ if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault") return isTransforming(r.innerType, n);
2373
+ if (r.type === "intersection") return isTransforming(r.left, n) || isTransforming(r.right, n);
2374
+ if (r.type === "record" || r.type === "map") return isTransforming(r.keyType, n) || isTransforming(r.valueType, n);
2375
+ if (r.type === "pipe") return e._zod.traits.has("$ZodCodec") ? !0 : isTransforming(r.in, n) || isTransforming(r.out, n);
2376
+ if (r.type === "object") {
2377
+ for (let e in r.shape) if (isTransforming(r.shape[e], n)) return !0;
2378
+ return !1;
2379
+ }
2380
+ if (r.type === "union") {
2381
+ for (let e of r.options) if (isTransforming(e, n)) return !0;
2382
+ return !1;
2383
+ }
2384
+ if (r.type === "tuple") {
2385
+ for (let e of r.items) if (isTransforming(e, n)) return !0;
2386
+ return !!(r.rest && isTransforming(r.rest, n));
2387
+ }
2388
+ return !1;
2389
+ }
2390
+ var createToJSONSchemaMethod = (e, t = {}) => (n) => {
2391
+ let r = initializeContext({
2392
+ ...n,
2393
+ processors: t
2394
+ });
2395
+ return process(e, r), extractDefs(r, e), finalize(r, e);
2396
+ }, createStandardJSONSchemaMethod = (e, t, n = {}) => (r) => {
2397
+ let { libraryOptions: i, target: a } = r ?? {}, o = initializeContext({
2398
+ ...i ?? {},
2399
+ target: a,
2400
+ io: t,
2401
+ processors: n
2402
+ });
2403
+ return process(e, o), extractDefs(o, e), finalize(o, e);
2404
+ }, vt = {
2405
+ guid: "uuid",
2406
+ url: "uri",
2407
+ datetime: "date-time",
2408
+ json_string: "json-string",
2409
+ regex: ""
2410
+ }, stringProcessor = (e, t, n, r) => {
2411
+ let i = n;
2412
+ i.type = "string";
2413
+ let { minimum: a, maximum: o, format: s, patterns: c, contentEncoding: l } = e._zod.bag;
2414
+ if (typeof a == "number" && (i.minLength = a), typeof o == "number" && (i.maxLength = o), s && (i.format = vt[s] ?? s, i.format === "" && delete i.format, s === "time" && delete i.format), l && (i.contentEncoding = l), c && c.size > 0) {
2415
+ let e = [...c];
2416
+ e.length === 1 ? i.pattern = e[0].source : e.length > 1 && (i.allOf = [...e.map((e) => ({
2417
+ ...t.target === "draft-07" || t.target === "draft-04" || t.target === "openapi-3.0" ? { type: "string" } : {},
2418
+ pattern: e.source
2419
+ }))]);
2420
+ }
2421
+ }, numberProcessor = (e, t, n, r) => {
2422
+ let i = n, { minimum: a, maximum: o, format: s, multipleOf: c, exclusiveMaximum: l, exclusiveMinimum: u } = e._zod.bag;
2423
+ typeof s == "string" && s.includes("int") ? i.type = "integer" : i.type = "number";
2424
+ let d = typeof u == "number" && u >= (a ?? -Infinity), f = typeof l == "number" && l <= (o ?? Infinity), p = t.target === "draft-04" || t.target === "openapi-3.0";
2425
+ d ? p ? (i.minimum = u, i.exclusiveMinimum = !0) : i.exclusiveMinimum = u : typeof a == "number" && (i.minimum = a), f ? p ? (i.maximum = l, i.exclusiveMaximum = !0) : i.exclusiveMaximum = l : typeof o == "number" && (i.maximum = o), typeof c == "number" && (i.multipleOf = c);
2426
+ }, booleanProcessor = (e, t, n, r) => {
2427
+ n.type = "boolean";
2428
+ }, neverProcessor = (e, t, n, r) => {
2429
+ n.not = {};
2430
+ }, enumProcessor = (e, t, n, r) => {
2431
+ let i = e._zod.def, a = getEnumValues(i.entries);
2432
+ a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), n.enum = a;
2433
+ }, literalProcessor = (e, t, n, r) => {
2434
+ let i = e._zod.def, a = [];
2435
+ for (let e of i.values) if (e === void 0) {
2436
+ if (t.unrepresentable === "throw") throw Error("Literal `undefined` cannot be represented in JSON Schema");
2437
+ } else if (typeof e == "bigint") {
2438
+ if (t.unrepresentable === "throw") throw Error("BigInt literals cannot be represented in JSON Schema");
2439
+ a.push(Number(e));
2440
+ } else a.push(e);
2441
+ if (a.length !== 0) if (a.length === 1) {
2442
+ let e = a[0];
2443
+ n.type = e === null ? "null" : typeof e, t.target === "draft-04" || t.target === "openapi-3.0" ? n.enum = [e] : n.const = e;
2444
+ } else a.every((e) => typeof e == "number") && (n.type = "number"), a.every((e) => typeof e == "string") && (n.type = "string"), a.every((e) => typeof e == "boolean") && (n.type = "boolean"), a.every((e) => e === null) && (n.type = "null"), n.enum = a;
2445
+ }, customProcessor = (e, t, n, r) => {
2446
+ if (t.unrepresentable === "throw") throw Error("Custom types cannot be represented in JSON Schema");
2447
+ }, transformProcessor = (e, t, n, r) => {
2448
+ if (t.unrepresentable === "throw") throw Error("Transforms cannot be represented in JSON Schema");
2449
+ }, arrayProcessor = (e, t, n, r) => {
2450
+ let i = n, a = e._zod.def, { minimum: o, maximum: s } = e._zod.bag;
2451
+ typeof o == "number" && (i.minItems = o), typeof s == "number" && (i.maxItems = s), i.type = "array", i.items = process(a.element, t, {
2452
+ ...r,
2453
+ path: [...r.path, "items"]
2454
+ });
2455
+ }, objectProcessor = (e, t, n, r) => {
2456
+ let i = n, a = e._zod.def;
2457
+ i.type = "object", i.properties = {};
2458
+ let o = a.shape;
2459
+ for (let e in o) i.properties[e] = process(o[e], t, {
2460
+ ...r,
2461
+ path: [
2462
+ ...r.path,
2463
+ "properties",
2464
+ e
2465
+ ]
2466
+ });
2467
+ let s = new Set(Object.keys(o)), c = new Set([...s].filter((e) => {
2468
+ let n = a.shape[e]._zod;
2469
+ return t.io === "input" ? n.optin === void 0 : n.optout === void 0;
2470
+ }));
2471
+ c.size > 0 && (i.required = Array.from(c)), a.catchall?._zod.def.type === "never" ? i.additionalProperties = !1 : a.catchall ? a.catchall && (i.additionalProperties = process(a.catchall, t, {
2472
+ ...r,
2473
+ path: [...r.path, "additionalProperties"]
2474
+ })) : t.io === "output" && (i.additionalProperties = !1);
2475
+ }, unionProcessor = (e, t, n, r) => {
2476
+ let i = e._zod.def, a = i.inclusive === !1, o = i.options.map((e, n) => process(e, t, {
2477
+ ...r,
2478
+ path: [
2479
+ ...r.path,
2480
+ a ? "oneOf" : "anyOf",
2481
+ n
2482
+ ]
2483
+ }));
2484
+ a ? n.oneOf = o : n.anyOf = o;
2485
+ }, intersectionProcessor = (e, t, n, r) => {
2486
+ let i = e._zod.def, a = process(i.left, t, {
2487
+ ...r,
2488
+ path: [
2489
+ ...r.path,
2490
+ "allOf",
2491
+ 0
2492
+ ]
2493
+ }), o = process(i.right, t, {
2494
+ ...r,
2495
+ path: [
2496
+ ...r.path,
2497
+ "allOf",
2498
+ 1
2499
+ ]
2500
+ }), isSimpleIntersection = (e) => "allOf" in e && Object.keys(e).length === 1;
2501
+ n.allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(o) ? o.allOf : [o]];
2502
+ }, nullableProcessor = (e, t, n, r) => {
2503
+ let i = e._zod.def, a = process(i.innerType, t, r), o = t.seen.get(e);
2504
+ t.target === "openapi-3.0" ? (o.ref = i.innerType, n.nullable = !0) : n.anyOf = [a, { type: "null" }];
2505
+ }, nonoptionalProcessor = (e, t, n, r) => {
2506
+ let i = e._zod.def;
2507
+ process(i.innerType, t, r);
2508
+ let a = t.seen.get(e);
2509
+ a.ref = i.innerType;
2510
+ }, defaultProcessor = (e, t, n, r) => {
2511
+ let i = e._zod.def;
2512
+ process(i.innerType, t, r);
2513
+ let a = t.seen.get(e);
2514
+ a.ref = i.innerType, n.default = JSON.parse(JSON.stringify(i.defaultValue));
2515
+ }, prefaultProcessor = (e, t, n, r) => {
2516
+ let i = e._zod.def;
2517
+ process(i.innerType, t, r);
2518
+ let a = t.seen.get(e);
2519
+ a.ref = i.innerType, t.io === "input" && (n._prefault = JSON.parse(JSON.stringify(i.defaultValue)));
2520
+ }, catchProcessor = (e, t, n, r) => {
2521
+ let i = e._zod.def;
2522
+ process(i.innerType, t, r);
2523
+ let a = t.seen.get(e);
2524
+ a.ref = i.innerType;
2525
+ let o;
2526
+ try {
2527
+ o = i.catchValue(void 0);
2528
+ } catch {
2529
+ throw Error("Dynamic catch values are not supported in JSON Schema");
2530
+ }
2531
+ n.default = o;
2532
+ }, pipeProcessor = (e, t, n, r) => {
2533
+ let i = e._zod.def, a = i.in._zod.traits.has("$ZodTransform"), o = t.io === "input" ? a ? i.out : i.in : i.out;
2534
+ process(o, t, r);
2535
+ let s = t.seen.get(e);
2536
+ s.ref = o;
2537
+ }, readonlyProcessor = (e, t, n, r) => {
2538
+ let i = e._zod.def;
2539
+ process(i.innerType, t, r);
2540
+ let a = t.seen.get(e);
2541
+ a.ref = i.innerType, n.readOnly = !0;
2542
+ }, optionalProcessor = (e, t, n, r) => {
2543
+ let i = e._zod.def;
2544
+ process(i.innerType, t, r);
2545
+ let a = t.seen.get(e);
2546
+ a.ref = i.innerType;
2547
+ }, yt = /*@__PURE__*/ $constructor("ZodISODateTime", (e, t) => {
2548
+ We.init(e, t), G.init(e, t);
2549
+ });
2550
+ function datetime(e) {
2551
+ return /* @__PURE__ */ _isoDateTime(yt, e);
2552
+ }
2553
+ var bt = /*@__PURE__*/ $constructor("ZodISODate", (e, t) => {
2554
+ Ge.init(e, t), G.init(e, t);
2555
+ });
2556
+ function date(e) {
2557
+ return /* @__PURE__ */ _isoDate(bt, e);
2558
+ }
2559
+ var xt = /*@__PURE__*/ $constructor("ZodISOTime", (e, t) => {
2560
+ Ke.init(e, t), G.init(e, t);
2561
+ });
2562
+ function time(e) {
2563
+ return /* @__PURE__ */ _isoTime(xt, e);
2564
+ }
2565
+ var St = /*@__PURE__*/ $constructor("ZodISODuration", (e, t) => {
2566
+ qe.init(e, t), G.init(e, t);
2567
+ });
2568
+ function duration(e) {
2569
+ return /* @__PURE__ */ _isoDuration(St, e);
2570
+ }
2571
+ //#endregion
2572
+ //#region ../../node_modules/.pnpm/zod@4.4.3/node_modules/zod/v4/classic/errors.js
2573
+ var initializer = (e, t) => {
2574
+ l.init(e, t), e.name = "ZodError", Object.defineProperties(e, {
2575
+ format: { value: (t) => formatError(e, t) },
2576
+ flatten: { value: (t) => flattenError(e, t) },
2577
+ addIssue: { value: (t) => {
2578
+ e.issues.push(t), e.message = JSON.stringify(e.issues, jsonStringifyReplacer, 2);
2579
+ } },
2580
+ addIssues: { value: (t) => {
2581
+ e.issues.push(...t), e.message = JSON.stringify(e.issues, jsonStringifyReplacer, 2);
2582
+ } },
2583
+ isEmpty: { get() {
2584
+ return e.issues.length === 0;
2585
+ } }
2586
+ });
2587
+ }, V = /*@__PURE__*/ $constructor("ZodError", initializer, { Parent: Error }), Ct = /* @__PURE__ */ _parse(V), wt = /* @__PURE__ */ _parseAsync(V), Tt = /* @__PURE__ */ _safeParse(V), Et = /* @__PURE__ */ _safeParseAsync(V), Dt = /* @__PURE__ */ _encode(V), Ot = /* @__PURE__ */ _decode(V), kt = /* @__PURE__ */ _encodeAsync(V), At = /* @__PURE__ */ _decodeAsync(V), jt = /* @__PURE__ */ _safeEncode(V), Mt = /* @__PURE__ */ _safeDecode(V), Nt = /* @__PURE__ */ _safeEncodeAsync(V), Pt = /* @__PURE__ */ _safeDecodeAsync(V), H = /* @__PURE__ */ new WeakMap();
2588
+ function _installLazyMethods(e, t, n) {
2589
+ let r = Object.getPrototypeOf(e), i = H.get(r);
2590
+ if (i || (i = /* @__PURE__ */ new Set(), H.set(r, i)), !i.has(t)) {
2591
+ i.add(t);
2592
+ for (let e in n) {
2593
+ let t = n[e];
2594
+ Object.defineProperty(r, e, {
2595
+ configurable: !0,
2596
+ enumerable: !1,
2597
+ get() {
2598
+ let n = t.bind(this);
2599
+ return Object.defineProperty(this, e, {
2600
+ configurable: !0,
2601
+ writable: !0,
2602
+ enumerable: !0,
2603
+ value: n
2604
+ }), n;
2605
+ },
2606
+ set(t) {
2607
+ Object.defineProperty(this, e, {
2608
+ configurable: !0,
2609
+ writable: !0,
2610
+ enumerable: !0,
2611
+ value: t
2612
+ });
2613
+ }
2614
+ });
2615
+ }
2616
+ }
2617
+ }
2618
+ var U = /*@__PURE__*/ $constructor("ZodType", (e, t) => (D.init(e, t), Object.assign(e["~standard"], { jsonSchema: {
2619
+ input: createStandardJSONSchemaMethod(e, "input"),
2620
+ output: createStandardJSONSchemaMethod(e, "output")
2621
+ } }), e.toJSONSchema = createToJSONSchemaMethod(e, {}), e.def = t, e.type = t.type, Object.defineProperty(e, "_def", { value: t }), e.parse = (t, n) => Ct(e, t, n, { callee: e.parse }), e.safeParse = (t, n) => Tt(e, t, n), e.parseAsync = async (t, n) => wt(e, t, n, { callee: e.parseAsync }), e.safeParseAsync = async (t, n) => Et(e, t, n), e.spa = e.safeParseAsync, e.encode = (t, n) => Dt(e, t, n), e.decode = (t, n) => Ot(e, t, n), e.encodeAsync = async (t, n) => kt(e, t, n), e.decodeAsync = async (t, n) => At(e, t, n), e.safeEncode = (t, n) => jt(e, t, n), e.safeDecode = (t, n) => Mt(e, t, n), e.safeEncodeAsync = async (t, n) => Nt(e, t, n), e.safeDecodeAsync = async (t, n) => Pt(e, t, n), _installLazyMethods(e, "ZodType", {
2622
+ check(...e) {
2623
+ let t = this.def;
2624
+ return this.clone(mergeDefs(t, { checks: [...t.checks ?? [], ...e.map((e) => typeof e == "function" ? { _zod: {
2625
+ check: e,
2626
+ def: { check: "custom" },
2627
+ onattach: []
2628
+ } } : e)] }), { parent: !0 });
2629
+ },
2630
+ with(...e) {
2631
+ return this.check(...e);
2632
+ },
2633
+ clone(e, t) {
2634
+ return clone(this, e, t);
2635
+ },
2636
+ brand() {
2637
+ return this;
2638
+ },
2639
+ register(e, t) {
2640
+ return e.add(this, t), this;
2641
+ },
2642
+ refine(e, t) {
2643
+ return this.check(refine(e, t));
2644
+ },
2645
+ superRefine(e, t) {
2646
+ return this.check(superRefine(e, t));
2647
+ },
2648
+ overwrite(e) {
2649
+ return this.check(/* @__PURE__ */ _overwrite(e));
2650
+ },
2651
+ optional() {
2652
+ return optional(this);
2653
+ },
2654
+ exactOptional() {
2655
+ return exactOptional(this);
2656
+ },
2657
+ nullable() {
2658
+ return nullable(this);
2659
+ },
2660
+ nullish() {
2661
+ return optional(nullable(this));
2662
+ },
2663
+ nonoptional(e) {
2664
+ return nonoptional(this, e);
2665
+ },
2666
+ array() {
2667
+ return array(this);
2668
+ },
2669
+ or(e) {
2670
+ return union([this, e]);
2671
+ },
2672
+ and(e) {
2673
+ return intersection(this, e);
2674
+ },
2675
+ transform(e) {
2676
+ return pipe(this, transform(e));
2677
+ },
2678
+ default(e) {
2679
+ return _default(this, e);
2680
+ },
2681
+ prefault(e) {
2682
+ return prefault(this, e);
2683
+ },
2684
+ catch(e) {
2685
+ return _catch(this, e);
2686
+ },
2687
+ pipe(e) {
2688
+ return pipe(this, e);
2689
+ },
2690
+ readonly() {
2691
+ return readonly(this);
2692
+ },
2693
+ describe(e) {
2694
+ let t = this.clone();
2695
+ return B.add(t, { description: e }), t;
2696
+ },
2697
+ meta(...e) {
2698
+ if (e.length === 0) return B.get(this);
2699
+ let t = this.clone();
2700
+ return B.add(t, e[0]), t;
2701
+ },
2702
+ isOptional() {
2703
+ return this.safeParse(void 0).success;
2704
+ },
2705
+ isNullable() {
2706
+ return this.safeParse(null).success;
2707
+ },
2708
+ apply(e) {
2709
+ return e(this);
2710
+ }
2711
+ }), Object.defineProperty(e, "description", {
2712
+ get() {
2713
+ return B.get(e)?.description;
2714
+ },
2715
+ configurable: !0
2716
+ }), e)), W = /*@__PURE__*/ $constructor("_ZodString", (e, t) => {
2717
+ O.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => stringProcessor(e, t, n, r);
2718
+ let n = e._zod.bag;
2719
+ e.format = n.format ?? null, e.minLength = n.minimum ?? null, e.maxLength = n.maximum ?? null, _installLazyMethods(e, "_ZodString", {
2720
+ regex(...e) {
2721
+ return this.check(/* @__PURE__ */ _regex(...e));
2722
+ },
2723
+ includes(...e) {
2724
+ return this.check(/* @__PURE__ */ _includes(...e));
2725
+ },
2726
+ startsWith(...e) {
2727
+ return this.check(/* @__PURE__ */ _startsWith(...e));
2728
+ },
2729
+ endsWith(...e) {
2730
+ return this.check(/* @__PURE__ */ _endsWith(...e));
2731
+ },
2732
+ min(...e) {
2733
+ return this.check(/* @__PURE__ */ _minLength(...e));
2734
+ },
2735
+ max(...e) {
2736
+ return this.check(/* @__PURE__ */ _maxLength(...e));
2737
+ },
2738
+ length(...e) {
2739
+ return this.check(/* @__PURE__ */ _length(...e));
2740
+ },
2741
+ nonempty(...e) {
2742
+ return this.check(/* @__PURE__ */ _minLength(1, ...e));
2743
+ },
2744
+ lowercase(e) {
2745
+ return this.check(/* @__PURE__ */ _lowercase(e));
2746
+ },
2747
+ uppercase(e) {
2748
+ return this.check(/* @__PURE__ */ _uppercase(e));
2749
+ },
2750
+ trim() {
2751
+ return this.check(/* @__PURE__ */ _trim());
2752
+ },
2753
+ normalize(...e) {
2754
+ return this.check(/* @__PURE__ */ _normalize(...e));
2755
+ },
2756
+ toLowerCase() {
2757
+ return this.check(/* @__PURE__ */ _toLowerCase());
2758
+ },
2759
+ toUpperCase() {
2760
+ return this.check(/* @__PURE__ */ _toUpperCase());
2761
+ },
2762
+ slugify() {
2763
+ return this.check(/* @__PURE__ */ _slugify());
2764
+ }
2765
+ });
2766
+ }), Ft = /*@__PURE__*/ $constructor("ZodString", (e, t) => {
2767
+ O.init(e, t), W.init(e, t), e.email = (t) => e.check(/* @__PURE__ */ _email(It, t)), e.url = (t) => e.check(/* @__PURE__ */ _url(Lt, t)), e.jwt = (t) => e.check(/* @__PURE__ */ _jwt(Qt, t)), e.emoji = (t) => e.check(/* @__PURE__ */ _emoji(Rt, t)), e.guid = (t) => e.check(/* @__PURE__ */ _guid(K, t)), e.uuid = (t) => e.check(/* @__PURE__ */ _uuid(q, t)), e.uuidv4 = (t) => e.check(/* @__PURE__ */ _uuidv4(q, t)), e.uuidv6 = (t) => e.check(/* @__PURE__ */ _uuidv6(q, t)), e.uuidv7 = (t) => e.check(/* @__PURE__ */ _uuidv7(q, t)), e.nanoid = (t) => e.check(/* @__PURE__ */ _nanoid(zt, t)), e.guid = (t) => e.check(/* @__PURE__ */ _guid(K, t)), e.cuid = (t) => e.check(/* @__PURE__ */ _cuid(Bt, t)), e.cuid2 = (t) => e.check(/* @__PURE__ */ _cuid2(Vt, t)), e.ulid = (t) => e.check(/* @__PURE__ */ _ulid(Ht, t)), e.base64 = (t) => e.check(/* @__PURE__ */ _base64(Yt, t)), e.base64url = (t) => e.check(/* @__PURE__ */ _base64url(Xt, t)), e.xid = (t) => e.check(/* @__PURE__ */ _xid(Ut, t)), e.ksuid = (t) => e.check(/* @__PURE__ */ _ksuid(Wt, t)), e.ipv4 = (t) => e.check(/* @__PURE__ */ _ipv4(Gt, t)), e.ipv6 = (t) => e.check(/* @__PURE__ */ _ipv6(Kt, t)), e.cidrv4 = (t) => e.check(/* @__PURE__ */ _cidrv4(qt, t)), e.cidrv6 = (t) => e.check(/* @__PURE__ */ _cidrv6(Jt, t)), e.e164 = (t) => e.check(/* @__PURE__ */ _e164(Zt, t)), e.datetime = (t) => e.check(datetime(t)), e.date = (t) => e.check(date(t)), e.time = (t) => e.check(time(t)), e.duration = (t) => e.check(duration(t));
2768
+ });
2769
+ function string(e) {
2770
+ return /* @__PURE__ */ _string(Ft, e);
2771
+ }
2772
+ var G = /*@__PURE__*/ $constructor("ZodStringFormat", (e, t) => {
2773
+ k.init(e, t), W.init(e, t);
2774
+ }), It = /*@__PURE__*/ $constructor("ZodEmail", (e, t) => {
2775
+ Fe.init(e, t), G.init(e, t);
2776
+ }), K = /*@__PURE__*/ $constructor("ZodGUID", (e, t) => {
2777
+ Ne.init(e, t), G.init(e, t);
2778
+ }), q = /*@__PURE__*/ $constructor("ZodUUID", (e, t) => {
2779
+ Pe.init(e, t), G.init(e, t);
2780
+ }), Lt = /*@__PURE__*/ $constructor("ZodURL", (e, t) => {
2781
+ Ie.init(e, t), G.init(e, t);
2782
+ }), Rt = /*@__PURE__*/ $constructor("ZodEmoji", (e, t) => {
2783
+ Le.init(e, t), G.init(e, t);
2784
+ }), zt = /*@__PURE__*/ $constructor("ZodNanoID", (e, t) => {
2785
+ Re.init(e, t), G.init(e, t);
2786
+ }), Bt = /*@__PURE__*/ $constructor("ZodCUID", (e, t) => {
2787
+ ze.init(e, t), G.init(e, t);
2788
+ }), Vt = /*@__PURE__*/ $constructor("ZodCUID2", (e, t) => {
2789
+ Be.init(e, t), G.init(e, t);
2790
+ }), Ht = /*@__PURE__*/ $constructor("ZodULID", (e, t) => {
2791
+ Ve.init(e, t), G.init(e, t);
2792
+ }), Ut = /*@__PURE__*/ $constructor("ZodXID", (e, t) => {
2793
+ He.init(e, t), G.init(e, t);
2794
+ }), Wt = /*@__PURE__*/ $constructor("ZodKSUID", (e, t) => {
2795
+ Ue.init(e, t), G.init(e, t);
2796
+ }), Gt = /*@__PURE__*/ $constructor("ZodIPv4", (e, t) => {
2797
+ Je.init(e, t), G.init(e, t);
2798
+ }), Kt = /*@__PURE__*/ $constructor("ZodIPv6", (e, t) => {
2799
+ Ye.init(e, t), G.init(e, t);
2800
+ }), qt = /*@__PURE__*/ $constructor("ZodCIDRv4", (e, t) => {
2801
+ Xe.init(e, t), G.init(e, t);
2802
+ }), Jt = /*@__PURE__*/ $constructor("ZodCIDRv6", (e, t) => {
2803
+ Ze.init(e, t), G.init(e, t);
2804
+ }), Yt = /*@__PURE__*/ $constructor("ZodBase64", (e, t) => {
2805
+ Qe.init(e, t), G.init(e, t);
2806
+ }), Xt = /*@__PURE__*/ $constructor("ZodBase64URL", (e, t) => {
2807
+ $e.init(e, t), G.init(e, t);
2808
+ }), Zt = /*@__PURE__*/ $constructor("ZodE164", (e, t) => {
2809
+ et.init(e, t), G.init(e, t);
2810
+ }), Qt = /*@__PURE__*/ $constructor("ZodJWT", (e, t) => {
2811
+ tt.init(e, t), G.init(e, t);
2812
+ }), J = /*@__PURE__*/ $constructor("ZodNumber", (e, t) => {
2813
+ A.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => numberProcessor(e, t, n, r), _installLazyMethods(e, "ZodNumber", {
2814
+ gt(e, t) {
2815
+ return this.check(/* @__PURE__ */ _gt(e, t));
2816
+ },
2817
+ gte(e, t) {
2818
+ return this.check(/* @__PURE__ */ _gte(e, t));
2819
+ },
2820
+ min(e, t) {
2821
+ return this.check(/* @__PURE__ */ _gte(e, t));
2822
+ },
2823
+ lt(e, t) {
2824
+ return this.check(/* @__PURE__ */ _lt(e, t));
2825
+ },
2826
+ lte(e, t) {
2827
+ return this.check(/* @__PURE__ */ _lte(e, t));
2828
+ },
2829
+ max(e, t) {
2830
+ return this.check(/* @__PURE__ */ _lte(e, t));
2831
+ },
2832
+ int(e) {
2833
+ return this.check(int(e));
2834
+ },
2835
+ safe(e) {
2836
+ return this.check(int(e));
2837
+ },
2838
+ positive(e) {
2839
+ return this.check(/* @__PURE__ */ _gt(0, e));
2840
+ },
2841
+ nonnegative(e) {
2842
+ return this.check(/* @__PURE__ */ _gte(0, e));
2843
+ },
2844
+ negative(e) {
2845
+ return this.check(/* @__PURE__ */ _lt(0, e));
2846
+ },
2847
+ nonpositive(e) {
2848
+ return this.check(/* @__PURE__ */ _lte(0, e));
2849
+ },
2850
+ multipleOf(e, t) {
2851
+ return this.check(/* @__PURE__ */ _multipleOf(e, t));
2852
+ },
2853
+ step(e, t) {
2854
+ return this.check(/* @__PURE__ */ _multipleOf(e, t));
2855
+ },
2856
+ finite() {
2857
+ return this;
2858
+ }
2859
+ });
2860
+ let n = e._zod.bag;
2861
+ e.minValue = Math.max(n.minimum ?? -Infinity, n.exclusiveMinimum ?? -Infinity) ?? null, e.maxValue = Math.min(n.maximum ?? Infinity, n.exclusiveMaximum ?? Infinity) ?? null, e.isInt = (n.format ?? "").includes("int") || Number.isSafeInteger(n.multipleOf ?? .5), e.isFinite = !0, e.format = n.format ?? null;
2862
+ });
2863
+ function number(e) {
2864
+ return /* @__PURE__ */ _number(J, e);
2865
+ }
2866
+ var $t = /*@__PURE__*/ $constructor("ZodNumberFormat", (e, t) => {
2867
+ nt.init(e, t), J.init(e, t);
2868
+ });
2869
+ function int(e) {
2870
+ return /* @__PURE__ */ _int($t, e);
2871
+ }
2872
+ var en = /*@__PURE__*/ $constructor("ZodBoolean", (e, t) => {
2873
+ j.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => booleanProcessor(e, t, n, r);
2874
+ });
2875
+ function boolean(e) {
2876
+ return /* @__PURE__ */ _boolean(en, e);
2877
+ }
2878
+ var tn = /*@__PURE__*/ $constructor("ZodUnknown", (e, t) => {
2879
+ rt.init(e, t), U.init(e, t), e._zod.processJSONSchema = (e, t, n) => void 0;
2880
+ });
2881
+ function unknown() {
2882
+ return /* @__PURE__ */ _unknown(tn);
2883
+ }
2884
+ var nn = /*@__PURE__*/ $constructor("ZodNever", (e, t) => {
2885
+ it.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => neverProcessor(e, t, n, r);
2886
+ });
2887
+ function never(e) {
2888
+ return /* @__PURE__ */ _never(nn, e);
2889
+ }
2890
+ var rn = /*@__PURE__*/ $constructor("ZodArray", (e, t) => {
2891
+ at.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => arrayProcessor(e, t, n, r), e.element = t.element, _installLazyMethods(e, "ZodArray", {
2892
+ min(e, t) {
2893
+ return this.check(/* @__PURE__ */ _minLength(e, t));
2894
+ },
2895
+ nonempty(e) {
2896
+ return this.check(/* @__PURE__ */ _minLength(1, e));
2897
+ },
2898
+ max(e, t) {
2899
+ return this.check(/* @__PURE__ */ _maxLength(e, t));
2900
+ },
2901
+ length(e, t) {
2902
+ return this.check(/* @__PURE__ */ _length(e, t));
2903
+ },
2904
+ unwrap() {
2905
+ return this.element;
2906
+ }
2907
+ });
2908
+ });
2909
+ function array(e, t) {
2910
+ return /* @__PURE__ */ _array(rn, e, t);
2911
+ }
2912
+ var an = /*@__PURE__*/ $constructor("ZodObject", (e, t) => {
2913
+ ot.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => objectProcessor(e, t, n, r), defineLazy(e, "shape", () => t.shape), _installLazyMethods(e, "ZodObject", {
2914
+ keyof() {
2915
+ return _enum(Object.keys(this._zod.def.shape));
2916
+ },
2917
+ catchall(e) {
2918
+ return this.clone({
2919
+ ...this._zod.def,
2920
+ catchall: e
2921
+ });
2922
+ },
2923
+ passthrough() {
2924
+ return this.clone({
2925
+ ...this._zod.def,
2926
+ catchall: unknown()
2927
+ });
2928
+ },
2929
+ loose() {
2930
+ return this.clone({
2931
+ ...this._zod.def,
2932
+ catchall: unknown()
2933
+ });
2934
+ },
2935
+ strict() {
2936
+ return this.clone({
2937
+ ...this._zod.def,
2938
+ catchall: never()
2939
+ });
2940
+ },
2941
+ strip() {
2942
+ return this.clone({
2943
+ ...this._zod.def,
2944
+ catchall: void 0
2945
+ });
2946
+ },
2947
+ extend(e) {
2948
+ return extend(this, e);
2949
+ },
2950
+ safeExtend(e) {
2951
+ return safeExtend(this, e);
2952
+ },
2953
+ merge(e) {
2954
+ return merge(this, e);
2955
+ },
2956
+ pick(e) {
2957
+ return pick(this, e);
2958
+ },
2959
+ omit(e) {
2960
+ return omit(this, e);
2961
+ },
2962
+ partial(...e) {
2963
+ return partial(Z, this, e[0]);
2964
+ },
2965
+ required(...e) {
2966
+ return required($, this, e[0]);
2967
+ }
2968
+ });
2969
+ });
2970
+ function object(e, t) {
2971
+ return new an({
2972
+ type: "object",
2973
+ shape: e ?? {},
2974
+ ...normalizeParams(t)
2975
+ });
2976
+ }
2977
+ var Y = /*@__PURE__*/ $constructor("ZodUnion", (e, t) => {
2978
+ N.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => unionProcessor(e, t, n, r), e.options = t.options;
2979
+ });
2980
+ function union(e, t) {
2981
+ return new Y({
2982
+ type: "union",
2983
+ options: e,
2984
+ ...normalizeParams(t)
2985
+ });
2986
+ }
2987
+ var on = /*@__PURE__*/ $constructor("ZodDiscriminatedUnion", (e, t) => {
2988
+ Y.init(e, t), st.init(e, t);
2989
+ });
2990
+ function discriminatedUnion(e, t, n) {
2991
+ return new on({
2992
+ type: "union",
2993
+ options: t,
2994
+ discriminator: e,
2995
+ ...normalizeParams(n)
2996
+ });
2997
+ }
2998
+ var sn = /*@__PURE__*/ $constructor("ZodIntersection", (e, t) => {
2999
+ ct.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => intersectionProcessor(e, t, n, r);
3000
+ });
3001
+ function intersection(e, t) {
3002
+ return new sn({
3003
+ type: "intersection",
3004
+ left: e,
3005
+ right: t
3006
+ });
3007
+ }
3008
+ var X = /*@__PURE__*/ $constructor("ZodEnum", (e, t) => {
3009
+ lt.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => enumProcessor(e, t, n, r), e.enum = t.entries, e.options = Object.values(t.entries);
3010
+ let n = new Set(Object.keys(t.entries));
3011
+ e.extract = (e, r) => {
3012
+ let i = {};
3013
+ for (let r of e) if (n.has(r)) i[r] = t.entries[r];
3014
+ else throw Error(`Key ${r} not found in enum`);
3015
+ return new X({
3016
+ ...t,
3017
+ checks: [],
3018
+ ...normalizeParams(r),
3019
+ entries: i
3020
+ });
3021
+ }, e.exclude = (e, r) => {
3022
+ let i = { ...t.entries };
3023
+ for (let t of e) if (n.has(t)) delete i[t];
3024
+ else throw Error(`Key ${t} not found in enum`);
3025
+ return new X({
3026
+ ...t,
3027
+ checks: [],
3028
+ ...normalizeParams(r),
3029
+ entries: i
3030
+ });
3031
+ };
3032
+ });
3033
+ function _enum(e, t) {
3034
+ return new X({
3035
+ type: "enum",
3036
+ entries: Array.isArray(e) ? Object.fromEntries(e.map((e) => [e, e])) : e,
3037
+ ...normalizeParams(t)
3038
+ });
3039
+ }
3040
+ var cn = /*@__PURE__*/ $constructor("ZodLiteral", (e, t) => {
3041
+ P.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => literalProcessor(e, t, n, r), e.values = new Set(t.values), Object.defineProperty(e, "value", { get() {
3042
+ if (t.values.length > 1) throw Error("This schema contains multiple valid literal values. Use `.values` instead.");
3043
+ return t.values[0];
3044
+ } });
3045
+ });
3046
+ function literal(e, t) {
3047
+ return new cn({
3048
+ type: "literal",
3049
+ values: Array.isArray(e) ? e : [e],
3050
+ ...normalizeParams(t)
3051
+ });
3052
+ }
3053
+ var ln = /*@__PURE__*/ $constructor("ZodTransform", (e, t) => {
3054
+ ut.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => transformProcessor(e, t, n, r), e._zod.parse = (n, r) => {
3055
+ if (r.direction === "backward") throw new $ZodEncodeError(e.constructor.name);
3056
+ n.addIssue = (r) => {
3057
+ if (typeof r == "string") n.issues.push(issue(r, n.value, t));
3058
+ else {
3059
+ let t = r;
3060
+ t.fatal && (t.continue = !1), t.code ??= "custom", t.input ??= n.value, t.inst ??= e, n.issues.push(issue(t));
3061
+ }
3062
+ };
3063
+ let i = t.transform(n.value, n);
3064
+ return i instanceof Promise ? i.then((e) => (n.value = e, n.fallback = !0, n)) : (n.value = i, n.fallback = !0, n);
3065
+ };
3066
+ });
3067
+ function transform(e) {
3068
+ return new ln({
3069
+ type: "transform",
3070
+ transform: e
3071
+ });
3072
+ }
3073
+ var Z = /*@__PURE__*/ $constructor("ZodOptional", (e, t) => {
3074
+ F.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => optionalProcessor(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3075
+ });
3076
+ function optional(e) {
3077
+ return new Z({
3078
+ type: "optional",
3079
+ innerType: e
3080
+ });
3081
+ }
3082
+ var Q = /*@__PURE__*/ $constructor("ZodExactOptional", (e, t) => {
3083
+ dt.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => optionalProcessor(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3084
+ });
3085
+ function exactOptional(e) {
3086
+ return new Q({
3087
+ type: "optional",
3088
+ innerType: e
3089
+ });
3090
+ }
3091
+ var un = /*@__PURE__*/ $constructor("ZodNullable", (e, t) => {
3092
+ ft.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => nullableProcessor(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3093
+ });
3094
+ function nullable(e) {
3095
+ return new un({
3096
+ type: "nullable",
3097
+ innerType: e
3098
+ });
3099
+ }
3100
+ var dn = /*@__PURE__*/ $constructor("ZodDefault", (e, t) => {
3101
+ I.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => defaultProcessor(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
3102
+ });
3103
+ function _default(e, t) {
3104
+ return new dn({
3105
+ type: "default",
3106
+ innerType: e,
3107
+ get defaultValue() {
3108
+ return typeof t == "function" ? t() : shallowClone(t);
3109
+ }
3110
+ });
3111
+ }
3112
+ var fn = /*@__PURE__*/ $constructor("ZodPrefault", (e, t) => {
3113
+ pt.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => prefaultProcessor(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3114
+ });
3115
+ function prefault(e, t) {
3116
+ return new fn({
3117
+ type: "prefault",
3118
+ innerType: e,
3119
+ get defaultValue() {
3120
+ return typeof t == "function" ? t() : shallowClone(t);
3121
+ }
3122
+ });
3123
+ }
3124
+ var $ = /*@__PURE__*/ $constructor("ZodNonOptional", (e, t) => {
3125
+ mt.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => nonoptionalProcessor(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3126
+ });
3127
+ function nonoptional(e, t) {
3128
+ return new $({
3129
+ type: "nonoptional",
3130
+ innerType: e,
3131
+ ...normalizeParams(t)
3132
+ });
3133
+ }
3134
+ var pn = /*@__PURE__*/ $constructor("ZodCatch", (e, t) => {
3135
+ ht.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => catchProcessor(e, t, n, r), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
3136
+ });
3137
+ function _catch(e, t) {
3138
+ return new pn({
3139
+ type: "catch",
3140
+ innerType: e,
3141
+ catchValue: typeof t == "function" ? t : () => t
3142
+ });
3143
+ }
3144
+ var mn = /*@__PURE__*/ $constructor("ZodPipe", (e, t) => {
3145
+ L.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => pipeProcessor(e, t, n, r), e.in = t.in, e.out = t.out;
3146
+ });
3147
+ function pipe(e, t) {
3148
+ return new mn({
3149
+ type: "pipe",
3150
+ in: e,
3151
+ out: t
3152
+ });
3153
+ }
3154
+ var hn = /*@__PURE__*/ $constructor("ZodReadonly", (e, t) => {
3155
+ gt.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => readonlyProcessor(e, t, n, r), e.unwrap = () => e._zod.def.innerType;
3156
+ });
3157
+ function readonly(e) {
3158
+ return new hn({
3159
+ type: "readonly",
3160
+ innerType: e
3161
+ });
3162
+ }
3163
+ var gn = /*@__PURE__*/ $constructor("ZodCustom", (e, t) => {
3164
+ _t.init(e, t), U.init(e, t), e._zod.processJSONSchema = (t, n, r) => customProcessor(e, t, n, r);
3165
+ });
3166
+ function refine(e, t = {}) {
3167
+ return /* @__PURE__ */ _refine(gn, e, t);
3168
+ }
3169
+ function superRefine(e, t) {
3170
+ return /* @__PURE__ */ _superRefine(e, t);
3171
+ }
3172
+ //#endregion
3173
+ export { m as C, shallowClone as D, normalizeParams as E, $constructor as O, p as S, defineLazy as T, L as _, literal as a, d as b, string as c, j as d, R as f, F as g, M as h, discriminatedUnion as i, _string as l, P as m, array as n, number as o, I as p, boolean as r, object as s, _enum as t, _stringbool as u, O as v, clone as w, f as x, D as y };