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