@geekmidas/cli 10.0.0-alpha.11 → 10.0.0-alpha.13

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 (242) hide show
  1. package/README.md +13 -40
  2. package/dist/{HostingerProvider-BcyFRbqV.mjs → HostingerProvider-BY26bWwB.mjs} +20 -21
  3. package/dist/HostingerProvider-BY26bWwB.mjs.map +1 -0
  4. package/dist/{HostingerProvider-BOvsgATO.cjs → HostingerProvider-BZFGYYVA.cjs} +21 -22
  5. package/dist/HostingerProvider-BZFGYYVA.cjs.map +1 -0
  6. package/dist/{LocalStateProvider-yjXZXZDM.cjs → LocalStateProvider-7HR6SS2t.cjs} +11 -6
  7. package/dist/LocalStateProvider-7HR6SS2t.cjs.map +1 -0
  8. package/dist/{LocalStateProvider-Bq-0C0sg.mjs → LocalStateProvider-D7QyJoLM.mjs} +10 -4
  9. package/dist/LocalStateProvider-D7QyJoLM.mjs.map +1 -0
  10. package/dist/{Route53Provider-C0xmer8U.mjs → Route53Provider-Cvj40A8I.mjs} +12 -12
  11. package/dist/Route53Provider-Cvj40A8I.mjs.map +1 -0
  12. package/dist/{Route53Provider-CH9XH7bz.cjs → Route53Provider-DVILBsvV.cjs} +20 -21
  13. package/dist/Route53Provider-DVILBsvV.cjs.map +1 -0
  14. package/dist/{SSMStateProvider-DOZifZfE.mjs → SSMStateProvider-B0Hu1MKZ.mjs} +13 -4
  15. package/dist/SSMStateProvider-B0Hu1MKZ.mjs.map +1 -0
  16. package/dist/{SSMStateProvider-CXtNgPfy.cjs → SSMStateProvider-VrQ-yeqd.cjs} +17 -9
  17. package/dist/SSMStateProvider-VrQ-yeqd.cjs.map +1 -0
  18. package/dist/{backup-provisioner-cE2PuCTb.cjs → backup-provisioner-BmhIO_Yr.cjs} +21 -19
  19. package/dist/backup-provisioner-BmhIO_Yr.cjs.map +1 -0
  20. package/dist/{backup-provisioner-DXXg6FIL.mjs → backup-provisioner-DIVCbfee.mjs} +10 -7
  21. package/dist/backup-provisioner-DIVCbfee.mjs.map +1 -0
  22. package/dist/{bundler-CaTGtiaO.cjs → bundler-BeNDZdHQ.cjs} +10 -28
  23. package/dist/bundler-BeNDZdHQ.cjs.map +1 -0
  24. package/dist/{bundler-S3ek7ea-.mjs → bundler-BodTL4kf.mjs} +9 -26
  25. package/dist/bundler-BodTL4kf.mjs.map +1 -0
  26. package/dist/{config-HhDpJmLO.cjs → config-Q1rvKHvw.cjs} +74 -69
  27. package/dist/config-Q1rvKHvw.cjs.map +1 -0
  28. package/dist/{config-B0L2tvvC.mjs → config-pqGD3hF9.mjs} +26 -14
  29. package/dist/config-pqGD3hF9.mjs.map +1 -0
  30. package/dist/config.cjs +4 -5
  31. package/dist/config.d.cts +14 -17
  32. package/dist/config.d.cts.map +1 -1
  33. package/dist/config.d.mts +14 -17
  34. package/dist/config.d.mts.map +1 -1
  35. package/dist/config.mjs +3 -5
  36. package/dist/{credentials-CZrys9C5.mjs → credentials-BekkKtY_.mjs} +1331 -1100
  37. package/dist/credentials-BekkKtY_.mjs.map +1 -0
  38. package/dist/{credentials-B2Pyh3bJ.cjs → credentials-Q6F0uqJq.cjs} +1468 -1232
  39. package/dist/credentials-Q6F0uqJq.cjs.map +1 -0
  40. package/dist/deploy/sniffer-envkit-patch.cjs +18 -10
  41. package/dist/deploy/sniffer-envkit-patch.cjs.map +1 -1
  42. package/dist/deploy/sniffer-envkit-patch.d.cts +0 -2
  43. package/dist/deploy/sniffer-envkit-patch.d.cts.map +1 -1
  44. package/dist/deploy/sniffer-envkit-patch.d.mts +0 -2
  45. package/dist/deploy/sniffer-envkit-patch.d.mts.map +1 -1
  46. package/dist/deploy/sniffer-envkit-patch.mjs +10 -2
  47. package/dist/deploy/sniffer-envkit-patch.mjs.map +1 -1
  48. package/dist/deploy/sniffer-hooks.cjs +13 -7
  49. package/dist/deploy/sniffer-hooks.cjs.map +1 -1
  50. package/dist/deploy/sniffer-hooks.d.cts +1 -2
  51. package/dist/deploy/sniffer-hooks.d.cts.map +1 -1
  52. package/dist/deploy/sniffer-hooks.d.mts +1 -2
  53. package/dist/deploy/sniffer-hooks.d.mts.map +1 -1
  54. package/dist/deploy/sniffer-hooks.mjs +9 -2
  55. package/dist/deploy/sniffer-hooks.mjs.map +1 -1
  56. package/dist/deploy/sniffer-loader.cjs +16 -7
  57. package/dist/deploy/sniffer-loader.cjs.map +1 -1
  58. package/dist/deploy/sniffer-loader.d.cts +1 -1
  59. package/dist/deploy/sniffer-loader.d.mts +1 -1
  60. package/dist/deploy/sniffer-loader.mjs +13 -2
  61. package/dist/deploy/sniffer-loader.mjs.map +1 -1
  62. package/dist/deploy/sniffer-routes-worker.cjs +11 -11
  63. package/dist/deploy/sniffer-routes-worker.cjs.map +1 -1
  64. package/dist/deploy/sniffer-routes-worker.d.cts +1 -1
  65. package/dist/deploy/sniffer-routes-worker.d.mts +1 -1
  66. package/dist/deploy/sniffer-routes-worker.mjs +2 -2
  67. package/dist/deploy/sniffer-routes-worker.mjs.map +1 -1
  68. package/dist/deploy/sniffer-worker.cjs +15 -6
  69. package/dist/deploy/sniffer-worker.cjs.map +1 -1
  70. package/dist/deploy/sniffer-worker.d.cts +1 -3
  71. package/dist/deploy/sniffer-worker.d.cts.map +1 -1
  72. package/dist/deploy/sniffer-worker.d.mts +1 -3
  73. package/dist/deploy/sniffer-worker.d.mts.map +1 -1
  74. package/dist/deploy/sniffer-worker.mjs +15 -4
  75. package/dist/deploy/sniffer-worker.mjs.map +1 -1
  76. package/dist/{discover-DTmFeloL.cjs → discover-BERGFg8v.cjs} +81 -64
  77. package/dist/discover-BERGFg8v.cjs.map +1 -0
  78. package/dist/{discover-CAlFgYec.mjs → discover-CK-n3w6b.mjs} +35 -20
  79. package/dist/discover-CK-n3w6b.mjs.map +1 -0
  80. package/dist/{emit-CUD1BWls.cjs → emit-BdoPFjZf.cjs} +53 -36
  81. package/dist/emit-BdoPFjZf.cjs.map +1 -0
  82. package/dist/{emit-CIlvnDvV.mjs → emit-Bzq7JsMP.mjs} +24 -6
  83. package/dist/emit-Bzq7JsMP.mjs.map +1 -0
  84. package/dist/{fullstack-secrets-METaRLS1.mjs → fullstack-secrets-BET8gqwK.mjs} +9 -15
  85. package/dist/fullstack-secrets-BET8gqwK.mjs.map +1 -0
  86. package/dist/{fullstack-secrets-D6MyHhQP.cjs → fullstack-secrets-DXsWO-5m.cjs} +19 -38
  87. package/dist/fullstack-secrets-DXsWO-5m.cjs.map +1 -0
  88. package/dist/{generator-VE2JrFlY.mjs → generator-LfZU7NlU.mjs} +8 -14
  89. package/dist/generator-LfZU7NlU.mjs.map +1 -0
  90. package/dist/{generator-CNzBw7g5.cjs → generator-Wdfp0jCS.cjs} +38 -45
  91. package/dist/generator-Wdfp0jCS.cjs.map +1 -0
  92. package/dist/{github-BrvaPkFf.cjs → github-BfflNPVe.cjs} +36 -30
  93. package/dist/{github-BrvaPkFf.cjs.map → github-BfflNPVe.cjs.map} +1 -1
  94. package/dist/{github-CrpsXSfV.mjs → github-CRwnxKmD.mjs} +27 -20
  95. package/dist/github-CRwnxKmD.mjs.map +1 -0
  96. package/dist/{index-CR5urhWX.d.cts → index-Cd-qeOam.d.mts} +3 -12
  97. package/dist/index-Cd-qeOam.d.mts.map +1 -0
  98. package/dist/{index-Ayxg_DQY.d.mts → index-D-iAVHx-.d.cts} +3 -12
  99. package/dist/index-D-iAVHx-.d.cts.map +1 -0
  100. package/dist/index.cjs +3320 -2961
  101. package/dist/index.cjs.map +1 -1
  102. package/dist/index.d.cts +1 -1
  103. package/dist/index.d.mts +1 -1
  104. package/dist/index.mjs +3200 -2858
  105. package/dist/index.mjs.map +1 -1
  106. package/dist/{keystore-TxeYM7an.mjs → keystore-B4PRlbgE.mjs} +5 -7
  107. package/dist/keystore-B4PRlbgE.mjs.map +1 -0
  108. package/dist/{keystore-C9rint2E.cjs → keystore-DgGRj2Yy.cjs} +23 -26
  109. package/dist/keystore-DgGRj2Yy.cjs.map +1 -0
  110. package/dist/{openapi-DaKlTKxz.cjs → openapi-Dcbme-Us.cjs} +134 -171
  111. package/dist/openapi-Dcbme-Us.cjs.map +1 -0
  112. package/dist/openapi-react-query.cjs +156 -2
  113. package/dist/openapi-react-query.cjs.map +1 -0
  114. package/dist/openapi-react-query.d.cts +1 -3
  115. package/dist/openapi-react-query.d.cts.map +1 -1
  116. package/dist/openapi-react-query.d.mts +1 -3
  117. package/dist/openapi-react-query.d.mts.map +1 -1
  118. package/dist/openapi-react-query.mjs +156 -2
  119. package/dist/openapi-react-query.mjs.map +1 -0
  120. package/dist/{openapi-y1d7Kalt.mjs → openapi-vy4JzhUv.mjs} +76 -106
  121. package/dist/openapi-vy4JzhUv.mjs.map +1 -0
  122. package/dist/openapi.cjs +3 -6
  123. package/dist/openapi.d.cts +8 -11
  124. package/dist/openapi.d.cts.map +1 -1
  125. package/dist/openapi.d.mts +8 -11
  126. package/dist/openapi.d.mts.map +1 -1
  127. package/dist/openapi.mjs +2 -6
  128. package/dist/reconcile/public.cjs +4 -4
  129. package/dist/reconcile/public.d.cts +8 -26
  130. package/dist/reconcile/public.d.cts.map +1 -1
  131. package/dist/reconcile/public.d.mts +8 -26
  132. package/dist/reconcile/public.d.mts.map +1 -1
  133. package/dist/reconcile/public.mjs +3 -4
  134. package/dist/{reconcile-CYMhFSYy.cjs → reconcile-Dd2iyILf.cjs} +4 -7
  135. package/dist/reconcile-Dd2iyILf.cjs.map +1 -0
  136. package/dist/{reconcile-C13ERt1U.mjs → reconcile-DhQ00DpU.mjs} +4 -7
  137. package/dist/reconcile-DhQ00DpU.mjs.map +1 -0
  138. package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
  139. package/dist/{chunk-CUT6urMc.cjs → rolldown-runtime-C0BPl7ul.cjs} +23 -10
  140. package/dist/{storage-CSNplaJn.cjs → storage-C-30BD1e.cjs} +59 -69
  141. package/dist/storage-C-30BD1e.cjs.map +1 -0
  142. package/dist/{storage-B020InPW.mjs → storage-P_b3w7uj.mjs} +22 -13
  143. package/dist/storage-P_b3w7uj.mjs.map +1 -0
  144. package/dist/{sync-CzHXiR9c.mjs → sync-B3xxXtJT.mjs} +18 -6
  145. package/dist/sync-B3xxXtJT.mjs.map +1 -0
  146. package/dist/{sync-0ILCb-1S.cjs → sync-D7uTIIEi.cjs} +43 -25
  147. package/dist/sync-D7uTIIEi.cjs.map +1 -0
  148. package/dist/types-BGo5TaNE.d.mts +6164 -0
  149. package/dist/types-BGo5TaNE.d.mts.map +1 -0
  150. package/dist/types-C5ZNpUad.d.cts +6165 -0
  151. package/dist/types-C5ZNpUad.d.cts.map +1 -0
  152. package/dist/workspace/index.cjs +3 -3
  153. package/dist/workspace/index.d.cts +3 -3
  154. package/dist/workspace/index.d.mts +3 -3
  155. package/dist/workspace/index.mjs +2 -3
  156. package/dist/{workspace-DaEX7FEg.mjs → workspace-CgwmXEtc.mjs} +725 -871
  157. package/dist/workspace-CgwmXEtc.mjs.map +1 -0
  158. package/dist/{workspace-C-a3G_U0.cjs → workspace-mFpI_ky_.cjs} +894 -1041
  159. package/dist/workspace-mFpI_ky_.cjs.map +1 -0
  160. package/package.json +14 -14
  161. package/dist/CachedStateProvider-BEBl2wQT.cjs +0 -60
  162. package/dist/CachedStateProvider-BEBl2wQT.cjs.map +0 -1
  163. package/dist/CachedStateProvider-C-8wtlto.mjs +0 -3
  164. package/dist/CachedStateProvider-Co4n5Wvs.mjs +0 -54
  165. package/dist/CachedStateProvider-Co4n5Wvs.mjs.map +0 -1
  166. package/dist/CachedStateProvider-DqhGpzsm.cjs +0 -3
  167. package/dist/HostingerProvider-BOvsgATO.cjs.map +0 -1
  168. package/dist/HostingerProvider-BcyFRbqV.mjs.map +0 -1
  169. package/dist/LocalStateProvider-Bq-0C0sg.mjs.map +0 -1
  170. package/dist/LocalStateProvider-yjXZXZDM.cjs.map +0 -1
  171. package/dist/Route53Provider-C0xmer8U.mjs.map +0 -1
  172. package/dist/Route53Provider-CH9XH7bz.cjs.map +0 -1
  173. package/dist/SSMStateProvider-CXtNgPfy.cjs.map +0 -1
  174. package/dist/SSMStateProvider-DOZifZfE.mjs.map +0 -1
  175. package/dist/backup-provisioner-DXXg6FIL.mjs.map +0 -1
  176. package/dist/backup-provisioner-cE2PuCTb.cjs.map +0 -1
  177. package/dist/bundler-CaTGtiaO.cjs.map +0 -1
  178. package/dist/bundler-S3ek7ea-.mjs.map +0 -1
  179. package/dist/chunk-Duj1WY3L.mjs +0 -7
  180. package/dist/config-B0L2tvvC.mjs.map +0 -1
  181. package/dist/config-HhDpJmLO.cjs.map +0 -1
  182. package/dist/credentials-B2Pyh3bJ.cjs.map +0 -1
  183. package/dist/credentials-B5zRHdAl.mjs +0 -141
  184. package/dist/credentials-B5zRHdAl.mjs.map +0 -1
  185. package/dist/credentials-BapzjyV5.cjs +0 -195
  186. package/dist/credentials-BapzjyV5.cjs.map +0 -1
  187. package/dist/credentials-CZrys9C5.mjs.map +0 -1
  188. package/dist/discover-CAlFgYec.mjs.map +0 -1
  189. package/dist/discover-DTmFeloL.cjs.map +0 -1
  190. package/dist/dokploy-api-5cK2InBm.cjs +0 -3
  191. package/dist/dokploy-api-D2Ny4Jrc.mjs +0 -3
  192. package/dist/dokploy-api-pdaBryoY.mjs +0 -706
  193. package/dist/dokploy-api-pdaBryoY.mjs.map +0 -1
  194. package/dist/dokploy-api-zqKe9lHH.cjs +0 -718
  195. package/dist/dokploy-api-zqKe9lHH.cjs.map +0 -1
  196. package/dist/emit-CIlvnDvV.mjs.map +0 -1
  197. package/dist/emit-CUD1BWls.cjs.map +0 -1
  198. package/dist/encryption-D2pL3tHH.cjs +0 -54
  199. package/dist/encryption-D2pL3tHH.cjs.map +0 -1
  200. package/dist/encryption-YDsXXi6w.mjs +0 -3
  201. package/dist/encryption-_4zwjOAR.mjs +0 -42
  202. package/dist/encryption-_4zwjOAR.mjs.map +0 -1
  203. package/dist/encryption-sQ2Oxx0d.cjs +0 -4
  204. package/dist/fullstack-secrets-D6MyHhQP.cjs.map +0 -1
  205. package/dist/fullstack-secrets-METaRLS1.mjs.map +0 -1
  206. package/dist/generator-CNzBw7g5.cjs.map +0 -1
  207. package/dist/generator-VE2JrFlY.mjs.map +0 -1
  208. package/dist/github-CrpsXSfV.mjs.map +0 -1
  209. package/dist/index-Ayxg_DQY.d.mts.map +0 -1
  210. package/dist/index-CR5urhWX.d.cts.map +0 -1
  211. package/dist/keystore-C9rint2E.cjs.map +0 -1
  212. package/dist/keystore-TxeYM7an.mjs.map +0 -1
  213. package/dist/openapi-DaKlTKxz.cjs.map +0 -1
  214. package/dist/openapi-react-query-BKH334Ug.cjs +0 -173
  215. package/dist/openapi-react-query-BKH334Ug.cjs.map +0 -1
  216. package/dist/openapi-react-query-DoR5CmzQ.mjs +0 -167
  217. package/dist/openapi-react-query-DoR5CmzQ.mjs.map +0 -1
  218. package/dist/openapi-y1d7Kalt.mjs.map +0 -1
  219. package/dist/reconcile-C13ERt1U.mjs.map +0 -1
  220. package/dist/reconcile-CYMhFSYy.cjs.map +0 -1
  221. package/dist/setup-BWgMs4gg.mjs +0 -12
  222. package/dist/setup-DOv92pIu.cjs +0 -473
  223. package/dist/setup-DOv92pIu.cjs.map +0 -1
  224. package/dist/setup-DQo_h_yK.mjs +0 -443
  225. package/dist/setup-DQo_h_yK.mjs.map +0 -1
  226. package/dist/setup-lCx_DcUo.cjs +0 -12
  227. package/dist/storage-B020InPW.mjs.map +0 -1
  228. package/dist/storage-CSNplaJn.cjs.map +0 -1
  229. package/dist/storage-DGBzMLZa.mjs +0 -4
  230. package/dist/storage-DlVol_oj.cjs +0 -8
  231. package/dist/sync-0ILCb-1S.cjs.map +0 -1
  232. package/dist/sync-CzHXiR9c.mjs.map +0 -1
  233. package/dist/sync-DYENfOt4.cjs +0 -4
  234. package/dist/sync-HAau6h_R.mjs +0 -3
  235. package/dist/types-CL7jPFM2.d.mts +0 -2220
  236. package/dist/types-CL7jPFM2.d.mts.map +0 -1
  237. package/dist/types-Y3fKQSAK.d.cts +0 -2220
  238. package/dist/types-Y3fKQSAK.d.cts.map +0 -1
  239. package/dist/workspace-C-a3G_U0.cjs.map +0 -1
  240. package/dist/workspace-DQxxs7Jk.cjs +0 -10
  241. package/dist/workspace-DaEX7FEg.mjs.map +0 -1
  242. package/dist/workspace-DbI580qS.mjs +0 -9
@@ -1,6 +1,4 @@
1
- const require_chunk = require('./chunk-CUT6urMc.cjs');
2
- const node_path = require_chunk.__toESM(require("node:path"));
3
-
1
+ let node_path = require("node:path");
4
2
  //#region src/workspace/publicEnv.ts
5
3
  /**
6
4
  * All public env-var prefixes the toolbox understands.
@@ -46,16 +44,14 @@ function stripPublicPrefix(name) {
46
44
  for (const prefix of PUBLIC_ENV_PREFIXES) if (prefix && name.startsWith(prefix)) return name.slice(prefix.length);
47
45
  return null;
48
46
  }
49
-
50
47
  //#endregion
51
48
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
52
49
  function getEnumValues(entries) {
53
50
  const numericValues = Object.values(entries).filter((v) => typeof v === "number");
54
- const values = Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
55
- return values;
51
+ return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
56
52
  }
57
- function joinValues(array$1, separator = "|") {
58
- return array$1.map((val) => stringifyPrimitive(val)).join(separator);
53
+ function joinValues(array, separator = "|") {
54
+ return array.map((val) => stringifyPrimitive(val)).join(separator);
59
55
  }
60
56
  function jsonStringifyReplacer(_, value) {
61
57
  if (typeof value === "bigint") return value.toString();
@@ -171,12 +167,11 @@ const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace
171
167
  function isObject(data) {
172
168
  return typeof data === "object" && data !== null && !Array.isArray(data);
173
169
  }
174
- const allowsEval = /* @__PURE__ */ cached(() => {
170
+ const allowsEval = /* @__PURE__*/ cached(() => {
175
171
  if (globalConfig.jitless) return false;
176
172
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) return false;
177
173
  try {
178
- const F = Function;
179
- new F("");
174
+ new Function("");
180
175
  return true;
181
176
  } catch (_) {
182
177
  return false;
@@ -199,7 +194,7 @@ function shallowClone(o) {
199
194
  if (o instanceof Set) return new Set(o);
200
195
  return o;
201
196
  }
202
- const propertyKeyTypes = /* @__PURE__ */ new Set([
197
+ const propertyKeyTypes = /* @__PURE__*/ new Set([
203
198
  "string",
204
199
  "number",
205
200
  "symbol"
@@ -237,7 +232,7 @@ function optionalKeys(shape) {
237
232
  return shape[k]._zod.optin !== void 0 && shape[k]._zod.optout === "optional";
238
233
  });
239
234
  }
240
- const NUMBER_FORMAT_RANGES = /* @__PURE__ */ (() => ({
235
+ const NUMBER_FORMAT_RANGES = /*@__PURE__*/ (() => ({
241
236
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
242
237
  int32: [-2147483648, 2147483647],
243
238
  uint32: [0, 4294967295],
@@ -245,14 +240,13 @@ const NUMBER_FORMAT_RANGES = /* @__PURE__ */ (() => ({
245
240
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
246
241
  }))();
247
242
  const BIGINT_FORMAT_RANGES = {
248
- int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
249
- uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
243
+ int64: [/* @__PURE__*/ BigInt("-9223372036854775808"), /* @__PURE__*/ BigInt("9223372036854775807")],
244
+ uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt("18446744073709551615")]
250
245
  };
251
246
  function pick(schema, mask) {
252
247
  const currDef = schema._zod.def;
253
248
  const checks = currDef.checks;
254
- const hasChecks = checks && checks.length > 0;
255
- if (hasChecks) throw new Error(".pick() cannot be used on object schemas containing refinements");
249
+ if (checks && checks.length > 0) throw new Error(".pick() cannot be used on object schemas containing refinements");
256
250
  const newShape = {};
257
251
  mirrorShape(newShape, schema, maskedKeys(schema, mask));
258
252
  return clone(schema, mergeDefs(currDef, {
@@ -272,8 +266,7 @@ function maskedKeys(schema, mask) {
272
266
  function omit(schema, mask) {
273
267
  const currDef = schema._zod.def;
274
268
  const checks = currDef.checks;
275
- const hasChecks = checks && checks.length > 0;
276
- if (hasChecks) throw new Error(".omit() cannot be used on object schemas containing refinements");
269
+ if (checks && checks.length > 0) throw new Error(".omit() cannot be used on object schemas containing refinements");
277
270
  const omitted = new Set(maskedKeys(schema, mask));
278
271
  const newShape = {};
279
272
  mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)).filter((key) => !omitted.has(key)));
@@ -285,8 +278,7 @@ function omit(schema, mask) {
285
278
  function extend(schema, shape) {
286
279
  if (!isPlainObject(shape)) throw new Error("Invalid input to extend: expected a plain object");
287
280
  const checks = schema._zod.def.checks;
288
- const hasChecks = checks && checks.length > 0;
289
- if (hasChecks) {
281
+ if (checks && checks.length > 0) {
290
282
  const existingShape = sourceShape(schema);
291
283
  for (const key of Reflect.ownKeys(shape)) if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
292
284
  }
@@ -308,20 +300,17 @@ function merge(a, b) {
308
300
  const newShape = {};
309
301
  mirrorShape(newShape, a, Reflect.ownKeys(sourceShape(a)));
310
302
  mirrorShape(newShape, b, Reflect.ownKeys(sourceShape(b)));
311
- const def = mergeDefs(a._zod.def, {
303
+ return clone(a, mergeDefs(a._zod.def, {
312
304
  shape: newShape,
313
305
  get catchall() {
314
306
  return b._zod.def.catchall;
315
307
  },
316
308
  checks: b._zod.def.checks ?? []
317
- });
318
- return clone(a, def);
309
+ }));
319
310
  }
320
311
  function partial(Class, schema, mask, name = "partial") {
321
- const currDef = schema._zod.def;
322
- const checks = currDef.checks;
323
- const hasChecks = checks && checks.length > 0;
324
- if (hasChecks) throw new Error(`.${name}() cannot be used on object schemas containing refinements`);
312
+ const checks = schema._zod.def.checks;
313
+ if (checks && checks.length > 0) throw new Error(`.${name}() cannot be used on object schemas containing refinements`);
325
314
  const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
326
315
  const newShape = {};
327
316
  mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), Class && ((value, key) => selected && !selected.has(key) ? value : new Class({
@@ -354,8 +343,8 @@ function explicitlyAborted(x, startIndex = 0) {
354
343
  }
355
344
  function prefixIssues(path, issues) {
356
345
  return issues.map((iss) => {
357
- var _a$2;
358
- (_a$2 = iss).path ?? (_a$2.path = []);
346
+ var _a;
347
+ (_a = iss).path ?? (_a.path = []);
359
348
  iss.path.unshift(path);
360
349
  return iss;
361
350
  });
@@ -364,16 +353,18 @@ function unwrapMessage(message) {
364
353
  return typeof message === "string" ? message : message?.message;
365
354
  }
366
355
  function attachSchema(issues, start, inst) {
367
- var _a$2;
368
- for (let i = start; i < issues.length; i++) (_a$2 = issues[i]).schema ?? (_a$2.schema = inst);
356
+ var _a;
357
+ for (let i = start; i < issues.length; i++) (_a = issues[i]).schema ?? (_a.schema = inst);
369
358
  }
370
- function finalizeIssue(iss, ctx, config$1) {
371
- var _a$2;
359
+ function finalizeIssue(iss, ctx, config) {
360
+ var _a;
372
361
  const traits = iss.inst?._zod?.traits;
373
- if (traits?.has("$ZodType")) if (traits.has("$ZodCheck")) (_a$2 = iss).schema ?? (_a$2.schema = iss.inst);
374
- else iss.schema = iss.inst;
362
+ if (traits?.has("$ZodType")) {
363
+ if (traits.has("$ZodCheck")) (_a = iss).schema ?? (_a.schema = iss.inst);
364
+ else iss.schema = iss.inst;
365
+ }
375
366
  const schemaError = iss.schema !== iss.inst ? iss.schema?._zod.def?.error : void 0;
376
- const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(schemaError?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config$1.customError?.(iss)) ?? unwrapMessage(config$1.localeError?.(iss)) ?? "Invalid input";
367
+ const message = iss.message ? iss.message : unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(schemaError?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config.customError?.(iss)) ?? unwrapMessage(config.localeError?.(iss)) ?? "Invalid input";
377
368
  const full = {};
378
369
  for (const k of Object.keys(iss)) {
379
370
  if (k === "inst" || k === "schema" || k === "continue" || k === "input" || k === "__proto__") continue;
@@ -491,7 +482,6 @@ const breaker = {
491
482
  configurable: true,
492
483
  get() {
493
484
  broke = true;
494
- return void 0;
495
485
  }
496
486
  };
497
487
  /**
@@ -577,7 +567,6 @@ function constantCatch(value) {
577
567
  fn[CONSTANT_CATCH] = true;
578
568
  return fn;
579
569
  }
580
-
581
570
  //#endregion
582
571
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/core.js
583
572
  var _a$1;
@@ -606,7 +595,7 @@ function newError(Definition) {
606
595
  }
607
596
  return new Definition();
608
597
  }
609
- function $constructor(name, initializer$2, proto, params) {
598
+ function $constructor(name, initializer, proto, params) {
610
599
  const zodProto = {};
611
600
  function Internals(def) {
612
601
  this.def = def;
@@ -626,22 +615,22 @@ function $constructor(name, initializer$2, proto, params) {
626
615
  }
627
616
  } else if (inst._zod.traits.has(name)) return;
628
617
  inst._zod.traits.add(name);
629
- initializer$2(inst, def);
618
+ initializer(inst, def);
630
619
  if (initialized) {
631
- const own$1 = Object.getPrototypeOf(inst);
620
+ const own = Object.getPrototypeOf(inst);
632
621
  const ctorProto = inst._zod.constr.prototype;
633
- let up = own$1;
622
+ let up = own;
634
623
  while (up && up !== ctorProto) up = Object.getPrototypeOf(up);
635
- const target = up ?? own$1;
624
+ const target = up ?? own;
636
625
  if (!initialized.has(target)) {
637
626
  initialized.add(target);
638
627
  members(target, protoMembers);
639
628
  }
640
629
  }
641
- const proto$1 = _.prototype;
642
- for (const k in proto$1) {
643
- if (!Object.prototype.hasOwnProperty.call(proto$1, k)) continue;
644
- if (!(k in inst)) inst[k] = proto$1[k].bind(inst);
630
+ const proto = _.prototype;
631
+ for (const k in proto) {
632
+ if (!Object.prototype.hasOwnProperty.call(proto, k)) continue;
633
+ if (!(k in inst)) inst[k] = proto[k].bind(inst);
645
634
  }
646
635
  }
647
636
  const Parent = params?.Parent ?? Object;
@@ -684,7 +673,6 @@ function config(newConfig) {
684
673
  if (newConfig) Object.assign(globalConfig, newConfig);
685
674
  return globalConfig;
686
675
  }
687
-
688
676
  //#endregion
689
677
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/errors.js
690
678
  function _getMessage() {
@@ -738,39 +726,41 @@ const initializer$1 = (inst, def) => {
738
726
  }
739
727
  };
740
728
  const $ZodError = $constructor("$ZodError", initializer$1);
741
- const $ZodRealError = $constructor("$ZodError", initializer$1, void 0, { Parent: Error });
729
+ $constructor("$ZodError", initializer$1, void 0, { Parent: Error });
742
730
  /** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member
743
731
  * ("toString", "constructor") would otherwise read through to the prototype, and assigning
744
732
  * "__proto__" would hit the setter instead of creating a key. */
745
733
  function node(obj, key, make) {
746
- if (!Object.prototype.hasOwnProperty.call(obj, key)) if (key === "__proto__") Object.defineProperty(obj, key, {
747
- value: make(),
748
- writable: true,
749
- enumerable: true,
750
- configurable: true
751
- });
752
- else obj[key] = make();
734
+ if (!Object.prototype.hasOwnProperty.call(obj, key)) {
735
+ if (key === "__proto__") Object.defineProperty(obj, key, {
736
+ value: make(),
737
+ writable: true,
738
+ enumerable: true,
739
+ configurable: true
740
+ });
741
+ else obj[key] = make();
742
+ }
753
743
  return obj[key];
754
744
  }
755
- function flattenError(error$1, mapper = (issue$1) => issue$1.message) {
745
+ function flattenError(error, mapper = (issue) => issue.message) {
756
746
  const fieldErrors = {};
757
747
  const formErrors = [];
758
- for (const sub of error$1.issues) if (sub.path.length > 0) node(fieldErrors, sub.path[0], () => []).push(mapper(sub));
748
+ for (const sub of error.issues) if (sub.path.length > 0) node(fieldErrors, sub.path[0], () => []).push(mapper(sub));
759
749
  else formErrors.push(mapper(sub));
760
750
  return {
761
751
  formErrors,
762
752
  fieldErrors
763
753
  };
764
754
  }
765
- function formatError(error$1, mapper = (issue$1) => issue$1.message) {
755
+ function formatError(error, mapper = (issue) => issue.message) {
766
756
  const fieldErrors = { _errors: [] };
767
- const processError = (error$2, path = []) => {
768
- for (const issue$1 of error$2.issues) if (issue$1.code === "invalid_union" && issue$1.errors.length) issue$1.errors.map((issues) => processError({ issues }, [...path, ...issue$1.path]));
769
- else if (issue$1.code === "invalid_key") processError({ issues: issue$1.issues }, [...path, ...issue$1.path]);
770
- else if (issue$1.code === "invalid_element") processError({ issues: issue$1.issues }, [...path, ...issue$1.path]);
757
+ const processError = (error, path = []) => {
758
+ for (const issue of error.issues) if (issue.code === "invalid_union" && issue.errors.length) issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));
759
+ else if (issue.code === "invalid_key") processError({ issues: issue.issues }, [...path, ...issue.path]);
760
+ else if (issue.code === "invalid_element") processError({ issues: issue.issues }, [...path, ...issue.path]);
771
761
  else {
772
- const fullpath = [...path, ...issue$1.path];
773
- if (fullpath.length === 0) fieldErrors._errors.push(mapper(issue$1));
762
+ const fullpath = [...path, ...issue.path];
763
+ if (fullpath.length === 0) fieldErrors._errors.push(mapper(issue));
774
764
  else {
775
765
  let curr = fieldErrors;
776
766
  let i = 0;
@@ -778,7 +768,7 @@ function formatError(error$1, mapper = (issue$1) => issue$1.message) {
778
768
  const el = fullpath[i];
779
769
  const terminal = i === fullpath.length - 1;
780
770
  if (el === "_errors") {
781
- if (terminal) curr._errors.push(mapper(issue$1));
771
+ if (terminal) curr._errors.push(mapper(issue));
782
772
  i++;
783
773
  continue;
784
774
  }
@@ -788,18 +778,17 @@ function formatError(error$1, mapper = (issue$1) => issue$1.message) {
788
778
  writable: true,
789
779
  configurable: true
790
780
  });
791
- const node$1 = curr[el];
792
- if (terminal) node$1._errors.push(mapper(issue$1));
793
- curr = node$1;
781
+ const node = curr[el];
782
+ if (terminal) node._errors.push(mapper(issue));
783
+ curr = node;
794
784
  i++;
795
785
  }
796
786
  }
797
787
  }
798
788
  };
799
- processError(error$1);
789
+ processError(error);
800
790
  return fieldErrors;
801
791
  }
802
-
803
792
  //#endregion
804
793
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/parse.js
805
794
  function finalizeParams(callee, params) {
@@ -820,7 +809,7 @@ const _parse = (_Err) => {
820
809
  }, ctx);
821
810
  if (result instanceof Promise) throw new $ZodAsyncError();
822
811
  if (result.issues.length) {
823
- const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
812
+ const e = new ((_params?.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
824
813
  captureStackTrace(e, _params?.callee ?? fn);
825
814
  throw e;
826
815
  }
@@ -828,7 +817,6 @@ const _parse = (_Err) => {
828
817
  };
829
818
  return fn;
830
819
  };
831
- const parse$1 = /* @__PURE__ */ _parse($ZodRealError);
832
820
  const _parseAsync = (_Err) => {
833
821
  const fn = async (schema, value, _ctx, params) => {
834
822
  const ctx = _ctx ? {
@@ -841,7 +829,7 @@ const _parseAsync = (_Err) => {
841
829
  }, ctx);
842
830
  if (result instanceof Promise) result = await result;
843
831
  if (result.issues.length) {
844
- const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
832
+ const e = new ((params?.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
845
833
  captureStackTrace(e, params?.callee ?? fn);
846
834
  throw e;
847
835
  }
@@ -849,7 +837,6 @@ const _parseAsync = (_Err) => {
849
837
  };
850
838
  return fn;
851
839
  };
852
- const parseAsync$1 = /* @__PURE__ */ _parseAsync($ZodRealError);
853
840
  const _safeParse = (_Err) => (schema, value, _ctx) => {
854
841
  const ctx = _ctx ? {
855
842
  ..._ctx,
@@ -865,21 +852,20 @@ const _safeParse = (_Err) => (schema, value, _ctx) => {
865
852
  data: result.value
866
853
  };
867
854
  };
868
- const safeParse$1 = /* @__PURE__ */ _safeParse($ZodRealError);
869
855
  function failure(Err, issues, ctx) {
870
- let error$1;
856
+ let error;
871
857
  return {
872
858
  success: false,
873
859
  get error() {
874
- if (!error$1) {
875
- error$1 = new Err(issues.map((iss) => finalizeIssue(iss, ctx, config())));
860
+ if (!error) {
861
+ error = new Err(issues.map((iss) => finalizeIssue(iss, ctx, config())));
876
862
  issues = void 0;
877
863
  ctx = void 0;
878
864
  }
879
- return error$1;
865
+ return error;
880
866
  },
881
867
  set error(e) {
882
- error$1 = e;
868
+ error = e;
883
869
  issues = void 0;
884
870
  ctx = void 0;
885
871
  }
@@ -900,17 +886,16 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
900
886
  data: result.value
901
887
  };
902
888
  };
903
- const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
904
889
  const COMPILE_INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
905
890
  const COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
906
- const validate = (schema, value, _ctx) => {
891
+ const validate = ((schema, value, _ctx) => {
907
892
  const validator = schema._zod.bag.validator;
908
893
  if (validator !== void 0) {
909
894
  if (validator(value) !== COMPILE_INVALID) return true;
910
895
  if (validator.definite === true && _ctx === void 0) return false;
911
896
  }
912
897
  return validateFallback(schema, value, _ctx);
913
- };
898
+ });
914
899
  function validateFallback(schema, value, _ctx) {
915
900
  const ctx = _ctx ? {
916
901
  ..._ctx,
@@ -935,7 +920,7 @@ function validateFallback(schema, value, _ctx) {
935
920
  if (result instanceof Promise) throw new $ZodAsyncError();
936
921
  return result.issues.length === 0;
937
922
  }
938
- const validateAsync = async (schema, value, _ctx) => {
923
+ const validateAsync$1 = async (schema, value, _ctx) => {
939
924
  const ctx = _ctx ? {
940
925
  ..._ctx,
941
926
  async: true,
@@ -952,45 +937,41 @@ const validateAsync = async (schema, value, _ctx) => {
952
937
  return result.issues.length === 0;
953
938
  };
954
939
  const _encode = (_Err) => {
955
- const parse$2 = _parse(_Err);
940
+ const parse = _parse(_Err);
956
941
  const fn = (schema, value, _ctx, _params) => {
957
942
  const ctx = _ctx ? {
958
943
  ..._ctx,
959
944
  direction: "backward"
960
945
  } : { direction: "backward" };
961
- return parse$2(schema, value, ctx, finalizeParams(fn, _params));
946
+ return parse(schema, value, ctx, finalizeParams(fn, _params));
962
947
  };
963
948
  return fn;
964
949
  };
965
- const encode$1 = /* @__PURE__ */ _encode($ZodRealError);
966
950
  const _decode = (_Err) => {
967
- const parse$2 = _parse(_Err);
951
+ const parse = _parse(_Err);
968
952
  const fn = (schema, value, _ctx, _params) => {
969
- return parse$2(schema, value, _ctx, finalizeParams(fn, _params));
953
+ return parse(schema, value, _ctx, finalizeParams(fn, _params));
970
954
  };
971
955
  return fn;
972
956
  };
973
- const decode$1 = /* @__PURE__ */ _decode($ZodRealError);
974
957
  const _encodeAsync = (_Err) => {
975
- const parseAsync$2 = _parseAsync(_Err);
958
+ const parseAsync = _parseAsync(_Err);
976
959
  const fn = async (schema, value, _ctx, _params) => {
977
960
  const ctx = _ctx ? {
978
961
  ..._ctx,
979
962
  direction: "backward"
980
963
  } : { direction: "backward" };
981
- return await parseAsync$2(schema, value, ctx, finalizeParams(fn, _params));
964
+ return await parseAsync(schema, value, ctx, finalizeParams(fn, _params));
982
965
  };
983
966
  return fn;
984
967
  };
985
- const encodeAsync$1 = /* @__PURE__ */ _encodeAsync($ZodRealError);
986
968
  const _decodeAsync = (_Err) => {
987
- const parseAsync$2 = _parseAsync(_Err);
969
+ const parseAsync = _parseAsync(_Err);
988
970
  const fn = async (schema, value, _ctx, _params) => {
989
- return await parseAsync$2(schema, value, _ctx, finalizeParams(fn, _params));
971
+ return await parseAsync(schema, value, _ctx, finalizeParams(fn, _params));
990
972
  };
991
973
  return fn;
992
974
  };
993
- const decodeAsync$1 = /* @__PURE__ */ _decodeAsync($ZodRealError);
994
975
  const _safeEncode = (_Err) => (schema, value, _ctx) => {
995
976
  const ctx = _ctx ? {
996
977
  ..._ctx,
@@ -998,11 +979,9 @@ const _safeEncode = (_Err) => (schema, value, _ctx) => {
998
979
  } : { direction: "backward" };
999
980
  return _safeParse(_Err)(schema, value, ctx);
1000
981
  };
1001
- const safeEncode$1 = /* @__PURE__ */ _safeEncode($ZodRealError);
1002
982
  const _safeDecode = (_Err) => (schema, value, _ctx) => {
1003
983
  return _safeParse(_Err)(schema, value, _ctx);
1004
984
  };
1005
- const safeDecode$1 = /* @__PURE__ */ _safeDecode($ZodRealError);
1006
985
  const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
1007
986
  const ctx = _ctx ? {
1008
987
  ..._ctx,
@@ -1010,12 +989,9 @@ const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
1010
989
  } : { direction: "backward" };
1011
990
  return _safeParseAsync(_Err)(schema, value, ctx);
1012
991
  };
1013
- const safeEncodeAsync$1 = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
1014
992
  const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
1015
993
  return _safeParseAsync(_Err)(schema, value, _ctx);
1016
994
  };
1017
- const safeDecodeAsync$1 = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
1018
-
1019
995
  //#endregion
1020
996
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js
1021
997
  /**
@@ -1039,9 +1015,9 @@ const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9
1039
1015
  /** Returns a regex for validating an RFC 9562/4122 UUID.
1040
1016
  *
1041
1017
  * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
1042
- const uuid = (version$1) => {
1043
- if (!version$1) return /^([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)$/;
1044
- return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version$1}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
1018
+ const uuid = (version) => {
1019
+ if (!version) return /^([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)$/;
1020
+ return new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${version}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`);
1045
1021
  };
1046
1022
  /** Practical email validation */
1047
1023
  const email = /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
@@ -1064,11 +1040,10 @@ const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468
1064
1040
  function anchor(source) {
1065
1041
  return new RegExp(`^${source}$`);
1066
1042
  }
1067
- const date = /* @__PURE__ */ anchor(dateSource);
1043
+ const date = /*@__PURE__*/ anchor(dateSource);
1068
1044
  function timeSource(args) {
1069
1045
  const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
1070
- const regex = typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : args.seconds ? `${hhmm}:[0-5]\\d(?:\\.\\d+)?` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
1071
- return regex;
1046
+ return typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : args.seconds ? `${hhmm}:[0-5]\\d(?:\\.\\d+)?` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
1072
1047
  }
1073
1048
  function time(args) {
1074
1049
  return new RegExp(`^${timeSource(args)}$`);
@@ -1089,14 +1064,13 @@ const number$1 = /^-?\d+(?:\.\d+)?$/;
1089
1064
  const boolean$1 = /^(?:true|false)$/i;
1090
1065
  const lowercase = /^[^A-Z]*$/;
1091
1066
  const uppercase = /^[^a-z]*$/;
1092
-
1093
1067
  //#endregion
1094
1068
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/checks.js
1095
- const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
1096
- var _a$2;
1069
+ const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
1070
+ var _a;
1097
1071
  inst._zod ?? (inst._zod = {});
1098
1072
  inst._zod.def = def;
1099
- (_a$2 = inst._zod).onattach ?? (_a$2.onattach = []);
1073
+ (_a = inst._zod).onattach ?? (_a.onattach = []);
1100
1074
  });
1101
1075
  /** Default `when` for length-based checks: run only on non-nullish values with a `length`. */
1102
1076
  const _whenHasLength = (payload) => {
@@ -1108,7 +1082,7 @@ const numericOriginMap = {
1108
1082
  bigint: "bigint",
1109
1083
  object: "date"
1110
1084
  };
1111
- const $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => {
1085
+ const $ZodCheckLessThan = /*@__PURE__*/ $constructor("$ZodCheckLessThan", (inst, def) => {
1112
1086
  $ZodCheck.init(inst, def);
1113
1087
  const origin = numericOriginMap[typeof def.value];
1114
1088
  inst._zod.check = (payload) => {
@@ -1124,7 +1098,7 @@ const $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (ins
1124
1098
  });
1125
1099
  };
1126
1100
  });
1127
- const $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
1101
+ const $ZodCheckGreaterThan = /*@__PURE__*/ $constructor("$ZodCheckGreaterThan", (inst, def) => {
1128
1102
  $ZodCheck.init(inst, def);
1129
1103
  const origin = numericOriginMap[typeof def.value];
1130
1104
  inst._zod.check = (payload) => {
@@ -1140,12 +1114,11 @@ const $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan"
1140
1114
  });
1141
1115
  };
1142
1116
  });
1143
- const $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
1117
+ const $ZodCheckMultipleOf = /*@__PURE__*/ $constructor("$ZodCheckMultipleOf", (inst, def) => {
1144
1118
  $ZodCheck.init(inst, def);
1145
1119
  inst._zod.check = (payload) => {
1146
1120
  if (typeof payload.value !== typeof def.value) throw new Error("Cannot mix number and bigint in multiple_of check.");
1147
- const isMultiple = typeof payload.value === "bigint" ? def.value !== BigInt(0) && payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0;
1148
- if (isMultiple) return;
1121
+ if (typeof payload.value === "bigint" ? def.value !== BigInt(0) && payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0) return;
1149
1122
  payload.issues.push({
1150
1123
  origin: typeof payload.value,
1151
1124
  code: "not_multiple_of",
@@ -1156,7 +1129,7 @@ const $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf",
1156
1129
  });
1157
1130
  };
1158
1131
  });
1159
- const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => {
1132
+ const $ZodCheckNumberFormat = /*@__PURE__*/ $constructor("$ZodCheckNumberFormat", (inst, def) => {
1160
1133
  $ZodCheck.init(inst, def);
1161
1134
  def.format = def.format || "float64";
1162
1135
  const isInt = def.format?.includes("int");
@@ -1220,15 +1193,14 @@ const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberForma
1220
1193
  });
1221
1194
  };
1222
1195
  });
1223
- const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
1224
- var _a$2;
1196
+ const $ZodCheckMaxLength = /*@__PURE__*/ $constructor("$ZodCheckMaxLength", (inst, def) => {
1197
+ var _a;
1225
1198
  $ZodCheck.init(inst, def);
1226
- (_a$2 = inst._zod.def).when ?? (_a$2.when = _whenHasLength);
1199
+ (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
1227
1200
  inst._zod.check = (payload) => {
1228
1201
  const input = payload.value;
1229
1202
  const units = input.length;
1230
- const length = typeof input === "string" && units > def.maximum ? codePointLength(input) : units;
1231
- if (length <= def.maximum) return;
1203
+ if ((typeof input === "string" && units > def.maximum ? codePointLength(input) : units) <= def.maximum) return;
1232
1204
  const origin = getLengthableOrigin(input);
1233
1205
  payload.issues.push({
1234
1206
  origin,
@@ -1241,15 +1213,14 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
1241
1213
  });
1242
1214
  };
1243
1215
  });
1244
- const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
1245
- var _a$2;
1216
+ const $ZodCheckMinLength = /*@__PURE__*/ $constructor("$ZodCheckMinLength", (inst, def) => {
1217
+ var _a;
1246
1218
  $ZodCheck.init(inst, def);
1247
- (_a$2 = inst._zod.def).when ?? (_a$2.when = _whenHasLength);
1219
+ (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
1248
1220
  inst._zod.check = (payload) => {
1249
1221
  const input = payload.value;
1250
1222
  const units = input.length;
1251
- const length = typeof input === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input) : units;
1252
- if (length >= def.minimum) return;
1223
+ if ((typeof input === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input) : units) >= def.minimum) return;
1253
1224
  const origin = getLengthableOrigin(input);
1254
1225
  payload.issues.push({
1255
1226
  origin,
@@ -1262,10 +1233,10 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
1262
1233
  });
1263
1234
  };
1264
1235
  });
1265
- const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
1266
- var _a$2;
1236
+ const $ZodCheckLengthEquals = /*@__PURE__*/ $constructor("$ZodCheckLengthEquals", (inst, def) => {
1237
+ var _a;
1267
1238
  $ZodCheck.init(inst, def);
1268
- (_a$2 = inst._zod.def).when ?? (_a$2.when = _whenHasLength);
1239
+ (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
1269
1240
  inst._zod.check = (payload) => {
1270
1241
  const input = payload.value;
1271
1242
  const units = input.length;
@@ -1290,10 +1261,10 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1290
1261
  });
1291
1262
  };
1292
1263
  });
1293
- const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
1294
- var _a$2, _b;
1264
+ const $ZodCheckStringFormat = /*@__PURE__*/ $constructor("$ZodCheckStringFormat", (inst, def) => {
1265
+ var _a, _b;
1295
1266
  $ZodCheck.init(inst, def);
1296
- if (def.pattern) (_a$2 = inst._zod).check ?? (_a$2.check = (payload) => {
1267
+ if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
1297
1268
  def.pattern.lastIndex = 0;
1298
1269
  if (def.pattern.test(payload.value)) return;
1299
1270
  payload.issues.push({
@@ -1308,7 +1279,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1308
1279
  });
1309
1280
  else (_b = inst._zod).check ?? (_b.check = () => {});
1310
1281
  });
1311
- const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
1282
+ const $ZodCheckRegex = /*@__PURE__*/ $constructor("$ZodCheckRegex", (inst, def) => {
1312
1283
  $ZodCheckStringFormat.init(inst, def);
1313
1284
  inst._zod.check = (payload) => {
1314
1285
  def.pattern.lastIndex = 0;
@@ -1324,19 +1295,18 @@ const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def
1324
1295
  });
1325
1296
  };
1326
1297
  });
1327
- const $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => {
1298
+ const $ZodCheckLowerCase = /*@__PURE__*/ $constructor("$ZodCheckLowerCase", (inst, def) => {
1328
1299
  def.pattern ?? (def.pattern = lowercase);
1329
1300
  $ZodCheckStringFormat.init(inst, def);
1330
1301
  });
1331
- const $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => {
1302
+ const $ZodCheckUpperCase = /*@__PURE__*/ $constructor("$ZodCheckUpperCase", (inst, def) => {
1332
1303
  def.pattern ?? (def.pattern = uppercase);
1333
1304
  $ZodCheckStringFormat.init(inst, def);
1334
1305
  });
1335
- const $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => {
1306
+ const $ZodCheckIncludes = /*@__PURE__*/ $constructor("$ZodCheckIncludes", (inst, def) => {
1336
1307
  $ZodCheck.init(inst, def);
1337
1308
  const escapedRegex = escapeRegex(def.includes);
1338
- const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);
1339
- def.pattern = pattern;
1309
+ def.pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);
1340
1310
  inst._zod.check = (payload) => {
1341
1311
  if (payload.value.includes(def.includes, def.position)) return;
1342
1312
  payload.issues.push({
@@ -1350,7 +1320,7 @@ const $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (ins
1350
1320
  });
1351
1321
  };
1352
1322
  });
1353
- const $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => {
1323
+ const $ZodCheckStartsWith = /*@__PURE__*/ $constructor("$ZodCheckStartsWith", (inst, def) => {
1354
1324
  $ZodCheck.init(inst, def);
1355
1325
  const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
1356
1326
  def.pattern ?? (def.pattern = pattern);
@@ -1367,7 +1337,7 @@ const $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith",
1367
1337
  });
1368
1338
  };
1369
1339
  });
1370
- const $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => {
1340
+ const $ZodCheckEndsWith = /*@__PURE__*/ $constructor("$ZodCheckEndsWith", (inst, def) => {
1371
1341
  $ZodCheck.init(inst, def);
1372
1342
  const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
1373
1343
  def.pattern ?? (def.pattern = pattern);
@@ -1384,13 +1354,12 @@ const $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (ins
1384
1354
  });
1385
1355
  };
1386
1356
  });
1387
- const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => {
1357
+ const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (inst, def) => {
1388
1358
  $ZodCheck.init(inst, def);
1389
1359
  inst._zod.check = (payload) => {
1390
1360
  payload.value = def.tx(payload.value);
1391
1361
  };
1392
1362
  });
1393
-
1394
1363
  //#endregion
1395
1364
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/doc.js
1396
1365
  var Doc = class {
@@ -1414,8 +1383,7 @@ var Doc = class {
1414
1383
  arg(this, { execution: "async" });
1415
1384
  return;
1416
1385
  }
1417
- const content = arg;
1418
- const lines = content.split("\n").filter((x) => x);
1386
+ const lines = arg.split("\n").filter((x) => x);
1419
1387
  const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
1420
1388
  const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
1421
1389
  for (const line of dedented) this.content.push(line);
@@ -1423,11 +1391,9 @@ var Doc = class {
1423
1391
  compile() {
1424
1392
  const F = Function;
1425
1393
  const content = this?.content ?? [``];
1426
- const factory = new F(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${content.join("\n")}\n};`);
1427
- return factory(...Object.values(this.closed));
1394
+ return new F(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${content.join("\n")}\n};`)(...Object.values(this.closed));
1428
1395
  }
1429
1396
  };
1430
-
1431
1397
  //#endregion
1432
1398
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/versions.js
1433
1399
  const version = {
@@ -1435,11 +1401,10 @@ const version = {
1435
1401
  minor: 6,
1436
1402
  patch: 5
1437
1403
  };
1438
-
1439
1404
  //#endregion
1440
1405
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/schemas.js
1441
- const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1442
- var _a$2;
1406
+ const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
1407
+ var _a;
1443
1408
  inst ?? (inst = {});
1444
1409
  inst._zod.def = def;
1445
1410
  inst._zod.bag = inst._zod.bag || {};
@@ -1448,34 +1413,31 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1448
1413
  const checks = inst._zod.traits.has("$ZodCheck") ? [inst, ...defChecks ?? []] : defChecks?.length ? [...defChecks] : [];
1449
1414
  for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
1450
1415
  if (checks.length === 0) {
1451
- (_a$2 = inst._zod).deferred ?? (_a$2.deferred = []);
1416
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
1452
1417
  inst._zod.deferred?.push(() => {
1453
1418
  inst._zod.run = inst._zod.parse;
1454
1419
  });
1455
1420
  } else {
1456
- const runChecks = (payload, checks$1, ctx) => {
1421
+ const runChecks = (payload, checks, ctx) => {
1457
1422
  if (payload.memo) return payload;
1458
1423
  let isAborted = aborted(payload);
1459
1424
  let asyncResult;
1460
- for (const ch of checks$1) {
1425
+ for (const ch of checks) {
1461
1426
  if (ch._zod.def.when) {
1462
1427
  if (explicitlyAborted(payload)) continue;
1463
- const shouldRun = ch._zod.def.when(payload);
1464
- if (!shouldRun) continue;
1428
+ if (!ch._zod.def.when(payload)) continue;
1465
1429
  } else if (isAborted) continue;
1466
1430
  const currLen = payload.issues.length;
1467
1431
  const _ = ch._zod.check(payload);
1468
1432
  if (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError();
1469
1433
  if (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
1470
1434
  await _;
1471
- const nextLen = payload.issues.length;
1472
- if (nextLen === currLen) return;
1435
+ if (payload.issues.length === currLen) return;
1473
1436
  attachSchema(payload.issues, currLen, inst);
1474
1437
  if (!isAborted) isAborted = aborted(payload, currLen);
1475
1438
  });
1476
1439
  else {
1477
- const nextLen = payload.issues.length;
1478
- if (nextLen === currLen) continue;
1440
+ if (payload.issues.length === currLen) continue;
1479
1441
  attachSchema(payload.issues, currLen, inst);
1480
1442
  if (!isAborted) isAborted = aborted(payload, currLen);
1481
1443
  }
@@ -1493,7 +1455,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1493
1455
  const checkResult = runChecks(payload, checks, ctx);
1494
1456
  if (checkResult instanceof Promise) {
1495
1457
  if (ctx.async === false) throw new $ZodAsyncError();
1496
- return checkResult.then((checkResult$1) => inst._zod.parse(checkResult$1, ctx));
1458
+ return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));
1497
1459
  }
1498
1460
  return inst._zod.parse(checkResult, ctx);
1499
1461
  };
@@ -1507,15 +1469,15 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1507
1469
  ...ctx,
1508
1470
  skipChecks: true
1509
1471
  });
1510
- if (canary instanceof Promise) return canary.then((canary$1) => {
1511
- return handleCanaryResult(canary$1, payload, ctx);
1472
+ if (canary instanceof Promise) return canary.then((canary) => {
1473
+ return handleCanaryResult(canary, payload, ctx);
1512
1474
  });
1513
1475
  return handleCanaryResult(canary, payload, ctx);
1514
1476
  }
1515
1477
  const result = inst._zod.parse(payload, ctx);
1516
1478
  if (result instanceof Promise) {
1517
1479
  if (ctx.async === false) throw new $ZodAsyncError();
1518
- return result.then((result$1) => runChecks(result$1, checks, ctx));
1480
+ return result.then((result) => runChecks(result, checks, ctx));
1519
1481
  }
1520
1482
  return runChecks(result, checks, ctx);
1521
1483
  };
@@ -1530,7 +1492,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1530
1492
  });
1531
1493
  /** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */
1532
1494
  const toStandardResult = (r, ctx) => r.issues.length ? { issues: r.issues.map((iss) => finalizeIssue(iss, ctx, config())) } : { value: r.value };
1533
- async function validateAsync$1(inst, value) {
1495
+ async function validateAsync(inst, value) {
1534
1496
  const ctx = { async: true };
1535
1497
  return toStandardResult(await inst._zod.run({
1536
1498
  value,
@@ -1548,19 +1510,19 @@ function standardProps(inst) {
1548
1510
  }, ctx);
1549
1511
  if (!(r instanceof Promise)) return toStandardResult(r, ctx);
1550
1512
  } catch (_) {}
1551
- return validateAsync$1(inst, value);
1513
+ return validateAsync(inst, value);
1552
1514
  },
1553
1515
  vendor: "zod",
1554
1516
  version: 1
1555
1517
  };
1556
1518
  }
1557
- const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
1519
+ const $ZodString = /*@__PURE__*/ $constructor("$ZodString", (inst, def) => {
1558
1520
  $ZodType.init(inst, def);
1559
1521
  inst._zod.pattern = def.pattern ?? anyString;
1560
1522
  inst._zod.parse = (payload, _) => {
1561
1523
  if (def.coerce) try {
1562
1524
  payload.value = String(payload.value);
1563
- } catch (_$1) {}
1525
+ } catch (_) {}
1564
1526
  if (typeof payload.value === "string") return payload;
1565
1527
  payload.issues.push({
1566
1528
  expected: "string",
@@ -1571,17 +1533,17 @@ const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
1571
1533
  return payload;
1572
1534
  };
1573
1535
  });
1574
- const $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => {
1536
+ const $ZodStringFormat = /*@__PURE__*/ $constructor("$ZodStringFormat", (inst, def) => {
1575
1537
  $ZodCheckStringFormat.init(inst, def);
1576
1538
  $ZodString.init(inst, def);
1577
1539
  });
1578
- const $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => {
1540
+ const $ZodGUID = /*@__PURE__*/ $constructor("$ZodGUID", (inst, def) => {
1579
1541
  def.pattern ?? (def.pattern = guid);
1580
1542
  $ZodStringFormat.init(inst, def);
1581
1543
  });
1582
- const $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
1544
+ const $ZodUUID = /*@__PURE__*/ $constructor("$ZodUUID", (inst, def) => {
1583
1545
  if (def.version) {
1584
- const versionMap = {
1546
+ const v = {
1585
1547
  v1: 1,
1586
1548
  v2: 2,
1587
1549
  v3: 3,
@@ -1590,21 +1552,16 @@ const $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
1590
1552
  v6: 6,
1591
1553
  v7: 7,
1592
1554
  v8: 8
1593
- };
1594
- const v = versionMap[def.version];
1555
+ }[def.version];
1595
1556
  if (v === void 0) throw new Error(`Invalid UUID version: "${def.version}"`);
1596
1557
  def.pattern ?? (def.pattern = uuid(v));
1597
1558
  } else def.pattern ?? (def.pattern = uuid());
1598
1559
  $ZodStringFormat.init(inst, def);
1599
1560
  });
1600
- const $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
1561
+ const $ZodEmail = /*@__PURE__*/ $constructor("$ZodEmail", (inst, def) => {
1601
1562
  def.pattern ?? (def.pattern = email);
1602
1563
  $ZodStringFormat.init(inst, def);
1603
1564
  });
1604
- /** The `://` guard rejected the input before the URL constructor saw it. */
1605
- const URL_BAD_FORMAT = 1;
1606
- /** The URL parser rejected the input. */
1607
- const URL_UNPARSEABLE = 2;
1608
1565
  function canParseURL(input) {
1609
1566
  try {
1610
1567
  if (typeof URL !== "undefined" && typeof URL.canParse === "function") return URL.canParse(input);
@@ -1615,20 +1572,20 @@ function canParseURL(input) {
1615
1572
  }
1616
1573
  }
1617
1574
  function validateURL(trimmed, def) {
1618
- if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) return canParseURL(trimmed) || URL_UNPARSEABLE;
1575
+ if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) return canParseURL(trimmed) || 2;
1619
1576
  return parseURLObject(trimmed, def);
1620
1577
  }
1621
1578
  /** Parses a URL while preserving the non-normalizing HTTP guard. */
1622
1579
  function parseURLObject(trimmed, def) {
1623
- if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) return URL_BAD_FORMAT;
1580
+ if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) return 1;
1624
1581
  try {
1625
1582
  if (typeof URL !== "undefined") {
1626
1583
  const URLStatic = URL;
1627
- if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ?? URL_UNPARSEABLE;
1584
+ if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ?? 2;
1628
1585
  }
1629
1586
  return new URL(trimmed);
1630
1587
  } catch {
1631
- return URL_UNPARSEABLE;
1588
+ return 2;
1632
1589
  }
1633
1590
  }
1634
1591
  const asciiTabOrNewline = /[\t\n\r]/g;
@@ -1636,21 +1593,21 @@ const asciiTabOrNewline = /[\t\n\r]/g;
1636
1593
  function stripTabAndNewline(value) {
1637
1594
  return value.replace(asciiTabOrNewline, "");
1638
1595
  }
1639
- function urlHostnameOk(url$1, hostname) {
1596
+ function urlHostnameOk(url, hostname) {
1640
1597
  hostname.lastIndex = 0;
1641
- return hostname.test(url$1.hostname);
1598
+ return hostname.test(url.hostname);
1642
1599
  }
1643
- function urlProtocolOk(url$1, protocol) {
1600
+ function urlProtocolOk(url, protocol) {
1644
1601
  protocol.lastIndex = 0;
1645
- return protocol.test(url$1.protocol.endsWith(":") ? url$1.protocol.slice(0, -1) : url$1.protocol);
1602
+ return protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol);
1646
1603
  }
1647
- const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1604
+ const $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
1648
1605
  $ZodStringFormat.init(inst, def);
1649
1606
  inst._zod.check = (payload) => {
1650
1607
  try {
1651
1608
  const trimmed = payload.value.trim();
1652
- const url$1 = validateURL(trimmed, def);
1653
- if (url$1 === URL_BAD_FORMAT) {
1609
+ const url = validateURL(trimmed, def);
1610
+ if (url === 1) {
1654
1611
  payload.issues.push({
1655
1612
  code: "invalid_format",
1656
1613
  format: "url",
@@ -1661,7 +1618,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1661
1618
  });
1662
1619
  return;
1663
1620
  }
1664
- if (url$1 === URL_UNPARSEABLE) {
1621
+ if (url === 2) {
1665
1622
  payload.issues.push({
1666
1623
  code: "invalid_format",
1667
1624
  format: "url",
@@ -1671,11 +1628,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1671
1628
  });
1672
1629
  return;
1673
1630
  }
1674
- if (url$1 === true) {
1631
+ if (url === true) {
1675
1632
  payload.value = stripTabAndNewline(trimmed);
1676
1633
  return;
1677
1634
  }
1678
- if (def.hostname && !urlHostnameOk(url$1, def.hostname)) payload.issues.push({
1635
+ if (def.hostname && !urlHostnameOk(url, def.hostname)) payload.issues.push({
1679
1636
  code: "invalid_format",
1680
1637
  format: "url",
1681
1638
  note: "Invalid hostname",
@@ -1684,7 +1641,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1684
1641
  inst,
1685
1642
  continue: !def.abort
1686
1643
  });
1687
- if (def.protocol && !urlProtocolOk(url$1, def.protocol)) payload.issues.push({
1644
+ if (def.protocol && !urlProtocolOk(url, def.protocol)) payload.issues.push({
1688
1645
  code: "invalid_format",
1689
1646
  format: "url",
1690
1647
  note: "Invalid protocol",
@@ -1693,7 +1650,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1693
1650
  inst,
1694
1651
  continue: !def.abort
1695
1652
  });
1696
- payload.value = def.normalize ? url$1.href : stripTabAndNewline(trimmed);
1653
+ payload.value = def.normalize ? url.href : stripTabAndNewline(trimmed);
1697
1654
  return;
1698
1655
  } catch (_) {
1699
1656
  payload.issues.push({
@@ -1706,11 +1663,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1706
1663
  }
1707
1664
  };
1708
1665
  });
1709
- const $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => {
1666
+ const $ZodEmoji = /*@__PURE__*/ $constructor("$ZodEmoji", (inst, def) => {
1710
1667
  def.pattern ?? (def.pattern = emoji());
1711
1668
  $ZodStringFormat.init(inst, def);
1712
1669
  });
1713
- const $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
1670
+ const $ZodNanoID = /*@__PURE__*/ $constructor("$ZodNanoID", (inst, def) => {
1714
1671
  if (def.length !== void 0 && (!Number.isInteger(def.length) || def.length < 1)) throw new Error(`Invalid nanoid length: ${def.length}`);
1715
1672
  def.pattern ?? (def.pattern = def.length === void 0 ? nanoid : nanoidOfLength(def.length));
1716
1673
  $ZodStringFormat.init(inst, def);
@@ -1720,43 +1677,43 @@ const $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
1720
1677
  * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
1721
1678
  * See https://github.com/paralleldrive/cuid.
1722
1679
  */
1723
- const $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => {
1680
+ const $ZodCUID = /*@__PURE__*/ $constructor("$ZodCUID", (inst, def) => {
1724
1681
  def.pattern ?? (def.pattern = cuid);
1725
1682
  $ZodStringFormat.init(inst, def);
1726
1683
  });
1727
- const $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => {
1684
+ const $ZodCUID2 = /*@__PURE__*/ $constructor("$ZodCUID2", (inst, def) => {
1728
1685
  def.pattern ?? (def.pattern = cuid2);
1729
1686
  $ZodStringFormat.init(inst, def);
1730
1687
  });
1731
- const $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => {
1688
+ const $ZodULID = /*@__PURE__*/ $constructor("$ZodULID", (inst, def) => {
1732
1689
  def.pattern ?? (def.pattern = ulid);
1733
1690
  $ZodStringFormat.init(inst, def);
1734
1691
  });
1735
- const $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => {
1692
+ const $ZodXID = /*@__PURE__*/ $constructor("$ZodXID", (inst, def) => {
1736
1693
  def.pattern ?? (def.pattern = xid);
1737
1694
  $ZodStringFormat.init(inst, def);
1738
1695
  });
1739
- const $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
1696
+ const $ZodKSUID = /*@__PURE__*/ $constructor("$ZodKSUID", (inst, def) => {
1740
1697
  def.pattern ?? (def.pattern = ksuid);
1741
1698
  $ZodStringFormat.init(inst, def);
1742
1699
  });
1743
- const $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
1700
+ const $ZodISODateTime = /*@__PURE__*/ $constructor("$ZodISODateTime", (inst, def) => {
1744
1701
  def.pattern ?? (def.pattern = datetime(def));
1745
1702
  $ZodStringFormat.init(inst, def);
1746
1703
  });
1747
- const $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
1704
+ const $ZodISODate = /*@__PURE__*/ $constructor("$ZodISODate", (inst, def) => {
1748
1705
  def.pattern ?? (def.pattern = date);
1749
1706
  $ZodStringFormat.init(inst, def);
1750
1707
  });
1751
- const $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
1708
+ const $ZodISOTime = /*@__PURE__*/ $constructor("$ZodISOTime", (inst, def) => {
1752
1709
  def.pattern ?? (def.pattern = time(def));
1753
1710
  $ZodStringFormat.init(inst, def);
1754
1711
  });
1755
- const $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => {
1712
+ const $ZodISODuration = /*@__PURE__*/ $constructor("$ZodISODuration", (inst, def) => {
1756
1713
  def.pattern ?? (def.pattern = duration);
1757
1714
  $ZodStringFormat.init(inst, def);
1758
1715
  });
1759
- const $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
1716
+ const $ZodIPv4 = /*@__PURE__*/ $constructor("$ZodIPv4", (inst, def) => {
1760
1717
  def.pattern ?? (def.pattern = ipv4);
1761
1718
  $ZodStringFormat.init(inst, def);
1762
1719
  });
@@ -1766,7 +1723,7 @@ function isValidIPv6(value) {
1766
1723
  if (!ipv6Alphabet.test(value)) return false;
1767
1724
  return canParseURL(`http://[${value}]`);
1768
1725
  }
1769
- const $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
1726
+ const $ZodIPv6 = /*@__PURE__*/ $constructor("$ZodIPv6", (inst, def) => {
1770
1727
  def.pattern ?? (def.pattern = ipv6);
1771
1728
  $ZodStringFormat.init(inst, def);
1772
1729
  inst._zod.check = (payload) => {
@@ -1779,7 +1736,7 @@ const $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
1779
1736
  });
1780
1737
  };
1781
1738
  });
1782
- const $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
1739
+ const $ZodCIDRv4 = /*@__PURE__*/ $constructor("$ZodCIDRv4", (inst, def) => {
1783
1740
  def.pattern ?? (def.pattern = cidrv4);
1784
1741
  $ZodStringFormat.init(inst, def);
1785
1742
  });
@@ -1793,7 +1750,7 @@ function isValidCIDRv6(value) {
1793
1750
  if (prefixNum < 0 || prefixNum > 128) return false;
1794
1751
  return isValidIPv6(address);
1795
1752
  }
1796
- const $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
1753
+ const $ZodCIDRv6 = /*@__PURE__*/ $constructor("$ZodCIDRv6", (inst, def) => {
1797
1754
  def.pattern ?? (def.pattern = cidrv6);
1798
1755
  $ZodStringFormat.init(inst, def);
1799
1756
  inst._zod.check = (payload) => {
@@ -1818,7 +1775,7 @@ function isValidBase64(data) {
1818
1775
  }
1819
1776
  }
1820
1777
  const base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/;
1821
- const $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
1778
+ const $ZodBase64 = /*@__PURE__*/ $constructor("$ZodBase64", (inst, def) => {
1822
1779
  def.pattern ?? (def.pattern = base64Charset);
1823
1780
  $ZodStringFormat.init(inst, def);
1824
1781
  inst._zod.check = (payload) => {
@@ -1835,11 +1792,10 @@ const $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
1835
1792
  const base64urlCharset = /^[A-Za-z0-9_-]*$/;
1836
1793
  function isValidBase64URL(data) {
1837
1794
  if (!base64urlCharset.test(data)) return false;
1838
- const base64$1 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
1839
- const padded = base64$1.padEnd(Math.ceil(base64$1.length / 4) * 4, "=");
1840
- return isValidBase64(padded);
1795
+ const base64 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
1796
+ return isValidBase64(base64.padEnd(Math.ceil(base64.length / 4) * 4, "="));
1841
1797
  }
1842
- const $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
1798
+ const $ZodBase64URL = /*@__PURE__*/ $constructor("$ZodBase64URL", (inst, def) => {
1843
1799
  def.pattern ?? (def.pattern = base64urlCharset);
1844
1800
  $ZodStringFormat.init(inst, def);
1845
1801
  inst._zod.check = (payload) => {
@@ -1853,7 +1809,7 @@ const $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def)
1853
1809
  });
1854
1810
  };
1855
1811
  });
1856
- const $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => {
1812
+ const $ZodE164 = /*@__PURE__*/ $constructor("$ZodE164", (inst, def) => {
1857
1813
  def.pattern ?? (def.pattern = e164);
1858
1814
  $ZodStringFormat.init(inst, def);
1859
1815
  });
@@ -1872,7 +1828,7 @@ function isValidJWT(token, algorithm = null) {
1872
1828
  return false;
1873
1829
  }
1874
1830
  }
1875
- const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
1831
+ const $ZodJWT = /*@__PURE__*/ $constructor("$ZodJWT", (inst, def) => {
1876
1832
  $ZodStringFormat.init(inst, def);
1877
1833
  inst._zod.check = (payload) => {
1878
1834
  if (isValidJWT(payload.value, def.alg)) return;
@@ -1885,7 +1841,7 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
1885
1841
  });
1886
1842
  };
1887
1843
  });
1888
- const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1844
+ const $ZodNumber = /*@__PURE__*/ $constructor("$ZodNumber", (inst, def) => {
1889
1845
  $ZodType.init(inst, def);
1890
1846
  inst._zod.pattern = number$1;
1891
1847
  inst._zod.parse = (payload, _ctx) => {
@@ -1905,11 +1861,11 @@ const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1905
1861
  return payload;
1906
1862
  };
1907
1863
  });
1908
- const $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => {
1864
+ const $ZodNumberFormat = /*@__PURE__*/ $constructor("$ZodNumberFormat", (inst, def) => {
1909
1865
  $ZodCheckNumberFormat.init(inst, def);
1910
1866
  $ZodNumber.init(inst, def);
1911
1867
  });
1912
- const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
1868
+ const $ZodBoolean = /*@__PURE__*/ $constructor("$ZodBoolean", (inst, def) => {
1913
1869
  $ZodType.init(inst, def);
1914
1870
  inst._zod.pattern = boolean$1;
1915
1871
  inst._zod.parse = (payload, _ctx) => {
@@ -1927,11 +1883,11 @@ const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
1927
1883
  return payload;
1928
1884
  };
1929
1885
  });
1930
- const $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
1886
+ const $ZodUnknown = /*@__PURE__*/ $constructor("$ZodUnknown", (inst, def) => {
1931
1887
  $ZodType.init(inst, def);
1932
1888
  inst._zod.parse = (payload) => payload;
1933
1889
  });
1934
- const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
1890
+ const $ZodNever = /*@__PURE__*/ $constructor("$ZodNever", (inst, def) => {
1935
1891
  $ZodType.init(inst, def);
1936
1892
  inst._zod.parse = (payload, _ctx) => {
1937
1893
  payload.issues.push({
@@ -1947,10 +1903,10 @@ function handleArrayResult(result, final, index) {
1947
1903
  if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
1948
1904
  final.value[index] = result.value;
1949
1905
  }
1950
- const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1906
+ const $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def) => {
1951
1907
  $ZodType.init(inst, def);
1952
- const memo$1 = globalConfig.memoizer;
1953
- memo$1?.attach(inst);
1908
+ const memo = globalConfig.memoizer;
1909
+ memo?.attach(inst);
1954
1910
  inst._zod.parse = (payload, ctx) => {
1955
1911
  const input = payload.value;
1956
1912
  if (!Array.isArray(input)) {
@@ -1962,7 +1918,7 @@ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1962
1918
  });
1963
1919
  return payload;
1964
1920
  }
1965
- payload.value = memo$1 ? memo$1.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);
1921
+ payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);
1966
1922
  const proms = [];
1967
1923
  const abortEarly = ctx?.abortEarly;
1968
1924
  for (let i = 0; i < input.length; i++) {
@@ -1971,7 +1927,7 @@ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1971
1927
  value: item,
1972
1928
  issues: []
1973
1929
  }, ctx);
1974
- if (result instanceof Promise) proms.push(result.then((result$1) => handleArrayResult(result$1, payload, i)));
1930
+ if (result instanceof Promise) proms.push(result.then((result) => handleArrayResult(result, payload, i)));
1975
1931
  else {
1976
1932
  handleArrayResult(result, payload, i);
1977
1933
  if (abortEarly && result.issues.length !== 0 && aborted(result)) break;
@@ -2045,7 +2001,7 @@ function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
2045
2001
  value: input[key],
2046
2002
  issues: []
2047
2003
  }, ctx);
2048
- if (r instanceof Promise) proms.push(r.then((r$1) => handlePropertyResult(r$1, payload, key, input, optin, optout)));
2004
+ if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));
2049
2005
  else handlePropertyResult(r, payload, key, input, optin, optout);
2050
2006
  }
2051
2007
  if (unrecognized.length) payload.issues.push({
@@ -2060,7 +2016,7 @@ function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
2060
2016
  return payload;
2061
2017
  });
2062
2018
  }
2063
- const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2019
+ const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
2064
2020
  $ZodType.init(inst, def);
2065
2021
  const desc = Object.getOwnPropertyDescriptor(def, "shape");
2066
2022
  const sh = desc?.get ? desc.get.raw : def.shape ?? {};
@@ -2088,15 +2044,15 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2088
2044
  }
2089
2045
  return propValues;
2090
2046
  });
2091
- const isObject$1 = isObject;
2047
+ const isObject$2 = isObject;
2092
2048
  const catchall = def.catchall;
2093
2049
  let value;
2094
- const memo$1 = globalConfig.memoizer;
2095
- memo$1?.attach(inst);
2050
+ const memo = globalConfig.memoizer;
2051
+ memo?.attach(inst);
2096
2052
  inst._zod.parse = (payload, ctx) => {
2097
2053
  value ?? (value = _normalized.value);
2098
2054
  const input = payload.value;
2099
- if (!isObject$1(input)) {
2055
+ if (!isObject$2(input)) {
2100
2056
  payload.issues.push({
2101
2057
  expected: "object",
2102
2058
  code: "invalid_type",
@@ -2105,7 +2061,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2105
2061
  });
2106
2062
  return payload;
2107
2063
  }
2108
- payload.value = memo$1 ? memo$1.alloc(inst, payload, {}, ctx) : {};
2064
+ payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
2109
2065
  const proms = [];
2110
2066
  const shape = value.shape;
2111
2067
  const abortEarly = ctx?.abortEarly;
@@ -2123,25 +2079,25 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2123
2079
  value: input[key],
2124
2080
  issues: []
2125
2081
  }, ctx);
2126
- if (r instanceof Promise) proms.push(r.then((r$1) => handlePropertyResult(r$1, payload, key, input, optin, optout)));
2082
+ if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));
2127
2083
  else handlePropertyResult(r, payload, key, input, optin, optout);
2128
2084
  }
2129
2085
  if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;
2130
2086
  return handleCatchall(proms, input, payload, ctx, _normalized.value, inst, abortEarly === true);
2131
2087
  };
2132
2088
  });
2133
- const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
2089
+ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) => {
2134
2090
  $ZodObject.init(inst, def);
2135
2091
  const superParse = inst._zod.parse;
2136
2092
  const _normalized = cached(() => normalizeDef(def));
2137
- const memo$1 = globalConfig.memoizer;
2093
+ const memo = globalConfig.memoizer;
2138
2094
  const generateFastpass = (shape) => {
2139
2095
  const normalized = _normalized.value;
2140
2096
  const syms = normalized.symbolKeys;
2141
2097
  const doc = new Doc(["payload", "ctx"], {
2142
2098
  shape,
2143
2099
  inst,
2144
- memo: memo$1,
2100
+ memo,
2145
2101
  syms
2146
2102
  });
2147
2103
  const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
@@ -2161,7 +2117,7 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
2161
2117
  const ids = Object.create(null);
2162
2118
  let counter = 0;
2163
2119
  for (const key of normalized.allKeys) ids[key] = `key_${counter++}`;
2164
- doc.write(memo$1 ? `const newResult = memo.alloc(inst, payload, {}, ctx);` : `const newResult = {};`);
2120
+ doc.write(memo ? `const newResult = memo.alloc(inst, payload, {}, ctx);` : `const newResult = {};`);
2165
2121
  for (const key of normalized.allKeys) {
2166
2122
  if (key === "__proto__") continue;
2167
2123
  const id = ids[key];
@@ -2228,8 +2184,7 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
2228
2184
  let fastpass;
2229
2185
  const isObject$1 = isObject;
2230
2186
  const jit = !globalConfig.jitless;
2231
- const allowsEval$1 = allowsEval;
2232
- const fastEnabled = jit && allowsEval$1.value;
2187
+ const fastEnabled = jit && allowsEval.value;
2233
2188
  const catchall = def.catchall;
2234
2189
  let value;
2235
2190
  inst._zod.parse = (payload, ctx) => {
@@ -2271,20 +2226,18 @@ function handleUnionResults(results, final, inst, ctx) {
2271
2226
  });
2272
2227
  return final;
2273
2228
  }
2274
- const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2229
+ const $ZodUnion = /*@__PURE__*/ $constructor("$ZodUnion", (inst, def) => {
2275
2230
  $ZodType.init(inst, def);
2276
2231
  defineLazyInternal(inst, "optin", (zod) => zod.def.options.some((o) => o._zod.optin === "defaulted") ? "defaulted" : zod.def.options.some((o) => o._zod.optin !== void 0) ? "optional" : void 0);
2277
2232
  defineLazyInternal(inst, "optout", (zod) => zod.def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
2278
2233
  defineLazyInternal(inst, "values", (zod) => {
2279
2234
  if (zod.def.options.every((o) => o._zod.values)) return new Set(zod.def.options.flatMap((option) => Array.from(option._zod.values)));
2280
- return void 0;
2281
2235
  });
2282
2236
  defineLazyInternal(inst, "pattern", (zod) => {
2283
2237
  if (zod.def.options.every((o) => o._zod.pattern)) {
2284
2238
  const patterns = zod.def.options.map((o) => o._zod.pattern);
2285
2239
  return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
2286
2240
  }
2287
- return void 0;
2288
2241
  });
2289
2242
  const first = def.options.length === 1 ? def.options[0]._zod.run : null;
2290
2243
  inst._zod.parse = (payload, ctx) => {
@@ -2305,8 +2258,8 @@ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2305
2258
  }
2306
2259
  }
2307
2260
  if (!async) return handleUnionResults(results, payload, inst, ctx);
2308
- return Promise.all(results).then((results$1) => {
2309
- return handleUnionResults(results$1, payload, inst, ctx);
2261
+ return Promise.all(results).then((results) => {
2262
+ return handleUnionResults(results, payload, inst, ctx);
2310
2263
  });
2311
2264
  };
2312
2265
  });
@@ -2322,7 +2275,7 @@ function discriminatorMap(def) {
2322
2275
  }
2323
2276
  return map;
2324
2277
  }
2325
- const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
2278
+ const $ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
2326
2279
  def.inclusive = false;
2327
2280
  $ZodUnion.init(inst, def);
2328
2281
  const _super = inst._zod.parse;
@@ -2366,7 +2319,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2366
2319
  errors: [],
2367
2320
  note: "No matching discriminator",
2368
2321
  discriminator: def.discriminator,
2369
- options: Array.from(disc.value.keys()).filter((value$1) => disc.value.get(value$1) !== null),
2322
+ options: Array.from(disc.value.keys()).filter((value) => disc.value.get(value) !== null),
2370
2323
  input,
2371
2324
  path: [def.discriminator],
2372
2325
  inst
@@ -2374,7 +2327,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2374
2327
  return payload;
2375
2328
  };
2376
2329
  });
2377
- const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
2330
+ const $ZodIntersection = /*@__PURE__*/ $constructor("$ZodIntersection", (inst, def) => {
2378
2331
  $ZodType.init(inst, def);
2379
2332
  inst._zod.parse = (payload, ctx) => {
2380
2333
  const input = payload.value;
@@ -2386,9 +2339,8 @@ const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst,
2386
2339
  value: input,
2387
2340
  issues: []
2388
2341
  }, ctx);
2389
- const async = left instanceof Promise || right instanceof Promise;
2390
- if (async) return Promise.all([left, right]).then(([left$1, right$1]) => {
2391
- return handleIntersectionResults(payload, left$1, right$1);
2342
+ if (left instanceof Promise || right instanceof Promise) return Promise.all([left, right]).then(([left, right]) => {
2343
+ return handleIntersectionResults(payload, left, right);
2392
2344
  });
2393
2345
  return handleIntersectionResults(payload, left, right);
2394
2346
  };
@@ -2489,10 +2441,10 @@ function handleIntersectionResults(result, left, right) {
2489
2441
  result.value = merged.data;
2490
2442
  return result;
2491
2443
  }
2492
- const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2444
+ const $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
2493
2445
  $ZodType.init(inst, def);
2494
- const memo$1 = globalConfig.memoizer;
2495
- memo$1?.attach(inst);
2446
+ const memo = globalConfig.memoizer;
2447
+ memo?.attach(inst);
2496
2448
  inst._zod.parse = (payload, ctx) => {
2497
2449
  const input = payload.value;
2498
2450
  if (!isPlainObject(input)) {
@@ -2507,7 +2459,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2507
2459
  const proms = [];
2508
2460
  const values = def.keyType._zod.values;
2509
2461
  if (values && !def.partial) {
2510
- payload.value = memo$1 ? memo$1.alloc(inst, payload, {}, ctx) : {};
2462
+ payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
2511
2463
  const recordKeys = /* @__PURE__ */ new Set();
2512
2464
  for (const key of values) if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
2513
2465
  recordKeys.add(typeof key === "number" ? key.toString() : key);
@@ -2534,9 +2486,9 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2534
2486
  value: input[key],
2535
2487
  issues: []
2536
2488
  }, ctx);
2537
- if (result instanceof Promise) proms.push(result.then((result$1) => {
2538
- if (result$1.issues.length) payload.issues.push(...prefixIssues(key, result$1.issues));
2539
- payload.value[outKey] = result$1.value;
2489
+ if (result instanceof Promise) proms.push(result.then((result) => {
2490
+ if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
2491
+ payload.value[outKey] = result.value;
2540
2492
  }));
2541
2493
  else {
2542
2494
  if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
@@ -2544,12 +2496,14 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2544
2496
  }
2545
2497
  }
2546
2498
  let unrecognized;
2547
- for (const key in input) if (!recordKeys.has(key)) if (def.mode === "loose") {
2548
- if (key === "__proto__") continue;
2549
- payload.value[key] = input[key];
2550
- } else {
2551
- unrecognized = unrecognized ?? [];
2552
- unrecognized.push(key);
2499
+ for (const key in input) if (!recordKeys.has(key)) {
2500
+ if (def.mode === "loose") {
2501
+ if (key === "__proto__") continue;
2502
+ payload.value[key] = input[key];
2503
+ } else {
2504
+ unrecognized = unrecognized ?? [];
2505
+ unrecognized.push(key);
2506
+ }
2553
2507
  }
2554
2508
  if (unrecognized && unrecognized.length > 0) payload.issues.push({
2555
2509
  code: "unrecognized_keys",
@@ -2559,7 +2513,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2559
2513
  continue: true
2560
2514
  });
2561
2515
  } else {
2562
- payload.value = memo$1 ? memo$1.alloc(inst, payload, {}, ctx) : {};
2516
+ payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
2563
2517
  let unrecognized;
2564
2518
  for (const key of Reflect.ownKeys(input)) {
2565
2519
  if (key === "__proto__") continue;
@@ -2569,8 +2523,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2569
2523
  issues: []
2570
2524
  }, ctx);
2571
2525
  if (keyResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
2572
- const checkNumericKey = typeof key === "string" && number$1.test(key) && keyResult.issues.length;
2573
- if (checkNumericKey) {
2526
+ if (typeof key === "string" && number$1.test(key) && keyResult.issues.length) {
2574
2527
  const retryResult = def.keyType._zod.run({
2575
2528
  value: Number(key),
2576
2529
  issues: []
@@ -2599,9 +2552,9 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2599
2552
  value: input[key],
2600
2553
  issues: []
2601
2554
  }, ctx);
2602
- if (result instanceof Promise) proms.push(result.then((result$1) => {
2603
- if (result$1.issues.length) payload.issues.push(...prefixIssues(key, result$1.issues));
2604
- payload.value[outKey] = result$1.value;
2555
+ if (result instanceof Promise) proms.push(result.then((result) => {
2556
+ if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
2557
+ payload.value[outKey] = result.value;
2605
2558
  }));
2606
2559
  else {
2607
2560
  if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
@@ -2620,7 +2573,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2620
2573
  return payload;
2621
2574
  };
2622
2575
  });
2623
- const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
2576
+ const $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
2624
2577
  $ZodType.init(inst, def);
2625
2578
  const values = getEnumValues(def.entries);
2626
2579
  const valuesSet = new Set(values);
@@ -2641,7 +2594,7 @@ const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
2641
2594
  return payload;
2642
2595
  };
2643
2596
  });
2644
- const $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
2597
+ const $ZodLiteral = /*@__PURE__*/ $constructor("$ZodLiteral", (inst, def) => {
2645
2598
  $ZodType.init(inst, def);
2646
2599
  const values = new Set(def.values);
2647
2600
  inst._zod.values = values;
@@ -2661,20 +2614,17 @@ const $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
2661
2614
  return payload;
2662
2615
  };
2663
2616
  });
2664
- const $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
2617
+ const $ZodTransform = /*@__PURE__*/ $constructor("$ZodTransform", (inst, def) => {
2665
2618
  $ZodType.init(inst, def);
2666
2619
  inst._zod.optin = "optional";
2667
- globalConfig.memoizer.guard(inst);
2620
+ globalConfig.memoizer?.guard(inst);
2668
2621
  inst._zod.parse = (payload, ctx) => {
2669
2622
  if (ctx.direction === "backward") throw new $ZodEncodeError(inst.constructor.name);
2670
2623
  const _out = def.transform(payload.value, payload);
2671
- if (ctx.async) {
2672
- const output = _out instanceof Promise ? _out : Promise.resolve(_out);
2673
- return output.then((output$1) => {
2674
- payload.value = output$1;
2675
- return payload;
2676
- });
2677
- }
2624
+ if (ctx.async) return (_out instanceof Promise ? _out : Promise.resolve(_out)).then((output) => {
2625
+ payload.value = output;
2626
+ return payload;
2627
+ });
2678
2628
  if (_out instanceof Promise) throw new $ZodAsyncError();
2679
2629
  payload.value = _out;
2680
2630
  return payload;
@@ -2684,13 +2634,13 @@ function handleOptionalResult(payload, result) {
2684
2634
  payload.value = result.issues.length ? void 0 : result.value;
2685
2635
  return payload;
2686
2636
  }
2687
- const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
2637
+ const $ZodOptional = /*@__PURE__*/ $constructor("$ZodOptional", (inst, def) => {
2688
2638
  $ZodType.init(inst, def);
2689
2639
  defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional");
2690
2640
  inst._zod.optout = "optional";
2691
2641
  defineLazyInternal(inst, "values", (zod) => {
2692
2642
  const values = zod.def.innerType._zod.values;
2693
- return values ? new Set([...values, void 0]) : void 0;
2643
+ return values ? /* @__PURE__ */ new Set([...values, void 0]) : void 0;
2694
2644
  });
2695
2645
  defineLazyInternal(inst, "pattern", (zod) => {
2696
2646
  const pattern = zod.def.innerType._zod.pattern;
@@ -2703,13 +2653,13 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
2703
2653
  value: payload.value,
2704
2654
  issues: []
2705
2655
  }, ctx);
2706
- if (result instanceof Promise) return result.then((result$1) => handleOptionalResult(payload, result$1));
2656
+ if (result instanceof Promise) return result.then((result) => handleOptionalResult(payload, result));
2707
2657
  return handleOptionalResult(payload, result);
2708
2658
  }
2709
2659
  return def.innerType._zod.run(payload, ctx);
2710
2660
  };
2711
2661
  });
2712
- const $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (inst, def) => {
2662
+ const $ZodExactOptional = /*@__PURE__*/ $constructor("$ZodExactOptional", (inst, def) => {
2713
2663
  $ZodOptional.init(inst, def);
2714
2664
  defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
2715
2665
  defineLazyInternal(inst, "pattern", (zod) => zod.def.innerType._zod.pattern);
@@ -2717,7 +2667,7 @@ const $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (ins
2717
2667
  return def.innerType._zod.run(payload, ctx);
2718
2668
  };
2719
2669
  });
2720
- const $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => {
2670
+ const $ZodNullable = /*@__PURE__*/ $constructor("$ZodNullable", (inst, def) => {
2721
2671
  $ZodType.init(inst, def);
2722
2672
  defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin);
2723
2673
  defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout);
@@ -2726,14 +2676,14 @@ const $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) =>
2726
2676
  return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
2727
2677
  });
2728
2678
  defineLazyInternal(inst, "values", (zod) => {
2729
- return zod.def.innerType._zod.values ? new Set([...zod.def.innerType._zod.values, null]) : void 0;
2679
+ return zod.def.innerType._zod.values ? /* @__PURE__ */ new Set([...zod.def.innerType._zod.values, null]) : void 0;
2730
2680
  });
2731
2681
  inst._zod.parse = (payload, ctx) => {
2732
2682
  if (payload.value === null) return payload;
2733
2683
  return def.innerType._zod.run(payload, ctx);
2734
2684
  };
2735
2685
  });
2736
- const $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
2686
+ const $ZodDefault = /*@__PURE__*/ $constructor("$ZodDefault", (inst, def) => {
2737
2687
  $ZodType.init(inst, def);
2738
2688
  inst._zod.optin = "defaulted";
2739
2689
  defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
@@ -2747,7 +2697,7 @@ const $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
2747
2697
  return payload;
2748
2698
  }
2749
2699
  const result = def.innerType._zod.run(payload, ctx);
2750
- if (result instanceof Promise) return result.then((result$1) => handleDefaultResult(result$1, def));
2700
+ if (result instanceof Promise) return result.then((result) => handleDefaultResult(result, def));
2751
2701
  return handleDefaultResult(result, def);
2752
2702
  };
2753
2703
  });
@@ -2755,7 +2705,7 @@ function handleDefaultResult(payload, def) {
2755
2705
  if (payload.value === void 0) payload.value = def.defaultValue;
2756
2706
  return payload;
2757
2707
  }
2758
- const $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
2708
+ const $ZodPrefault = /*@__PURE__*/ $constructor("$ZodPrefault", (inst, def) => {
2759
2709
  $ZodType.init(inst, def);
2760
2710
  inst._zod.optin = "defaulted";
2761
2711
  defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
@@ -2765,7 +2715,7 @@ const $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) =>
2765
2715
  return def.innerType._zod.run(payload, ctx);
2766
2716
  };
2767
2717
  });
2768
- const $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
2718
+ const $ZodNonOptional = /*@__PURE__*/ $constructor("$ZodNonOptional", (inst, def) => {
2769
2719
  $ZodType.init(inst, def);
2770
2720
  defineLazyInternal(inst, "values", (zod) => {
2771
2721
  const v = zod.def.innerType._zod.values;
@@ -2773,7 +2723,7 @@ const $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, d
2773
2723
  });
2774
2724
  inst._zod.parse = (payload, ctx) => {
2775
2725
  const result = def.innerType._zod.run(payload, ctx);
2776
- if (result instanceof Promise) return result.then((result$1) => handleNonOptionalResult(result$1, inst));
2726
+ if (result instanceof Promise) return result.then((result) => handleNonOptionalResult(result, inst));
2777
2727
  return handleNonOptionalResult(result, inst);
2778
2728
  };
2779
2729
  });
@@ -2800,7 +2750,7 @@ function handleCatchResult(payload, result, def, ctx) {
2800
2750
  });
2801
2751
  return payload;
2802
2752
  }
2803
- const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
2753
+ const $ZodCatch = /*@__PURE__*/ $constructor("$ZodCatch", (inst, def) => {
2804
2754
  $ZodType.init(inst, def);
2805
2755
  defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional");
2806
2756
  defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout);
@@ -2811,11 +2761,11 @@ const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
2811
2761
  value: payload.value,
2812
2762
  issues: []
2813
2763
  }, ctx);
2814
- if (result instanceof Promise) return result.then((result$1) => handleCatchResult(payload, result$1, def, ctx));
2764
+ if (result instanceof Promise) return result.then((result) => handleCatchResult(payload, result, def, ctx));
2815
2765
  return handleCatchResult(payload, result, def, ctx);
2816
2766
  };
2817
2767
  });
2818
- const $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
2768
+ const $ZodPipe = /*@__PURE__*/ $constructor("$ZodPipe", (inst, def) => {
2819
2769
  $ZodType.init(inst, def);
2820
2770
  defineLazyInternal(inst, "values", (zod) => zod.def.in._zod.values);
2821
2771
  defineLazyInternal(inst, "optin", (zod) => zod.def.in._zod.optin);
@@ -2824,11 +2774,11 @@ const $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
2824
2774
  inst._zod.parse = (payload, ctx) => {
2825
2775
  if (ctx.direction === "backward") {
2826
2776
  const right = def.out._zod.run(payload, ctx);
2827
- if (right instanceof Promise) return right.then((right$1) => handlePipeResult(right$1, def.in, ctx));
2777
+ if (right instanceof Promise) return right.then((right) => handlePipeResult(right, def.in, ctx));
2828
2778
  return handlePipeResult(right, def.in, ctx);
2829
2779
  }
2830
2780
  const left = def.in._zod.run(payload, ctx);
2831
- if (left instanceof Promise) return left.then((left$1) => handlePipeResult(left$1, def.out, ctx));
2781
+ if (left instanceof Promise) return left.then((left) => handlePipeResult(left, def.out, ctx));
2832
2782
  return handlePipeResult(left, def.out, ctx);
2833
2783
  };
2834
2784
  });
@@ -2842,7 +2792,7 @@ function handlePipeResult(left, next, ctx) {
2842
2792
  issues: left.issues
2843
2793
  }, ctx);
2844
2794
  }
2845
- const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
2795
+ const $ZodReadonly = /*@__PURE__*/ $constructor("$ZodReadonly", (inst, def) => {
2846
2796
  $ZodType.init(inst, def);
2847
2797
  defineLazyInternal(inst, "propValues", (zod) => zod.def.innerType._zod.propValues);
2848
2798
  defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
@@ -2859,7 +2809,7 @@ function handleReadonlyResult(payload) {
2859
2809
  if (!payload.memo) payload.value = Object.freeze(payload.value);
2860
2810
  return payload;
2861
2811
  }
2862
- const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
2812
+ const $ZodCustom = /*@__PURE__*/ $constructor("$ZodCustom", (inst, def) => {
2863
2813
  $ZodCheck.init(inst, def);
2864
2814
  $ZodType.init(inst, def);
2865
2815
  inst._zod.parse = (payload, _) => {
@@ -2868,9 +2818,8 @@ const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
2868
2818
  inst._zod.check = (payload) => {
2869
2819
  const input = payload.value;
2870
2820
  const r = def.fn(input);
2871
- if (r instanceof Promise) return r.then((r$1) => handleRefineResult(r$1, payload, input, inst));
2821
+ if (r instanceof Promise) return r.then((r) => handleRefineResult(r, payload, input, inst));
2872
2822
  handleRefineResult(r, payload, input, inst);
2873
- return;
2874
2823
  };
2875
2824
  });
2876
2825
  function handleRefineResult(result, payload, input, inst) {
@@ -2886,7 +2835,6 @@ function handleRefineResult(result, payload, input, inst) {
2886
2835
  payload.issues.push(issue(_iss));
2887
2836
  }
2888
2837
  }
2889
-
2890
2838
  //#endregion
2891
2839
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/memoizer.js
2892
2840
  var $ZodCyclicError = class extends Error {
@@ -2907,15 +2855,15 @@ function cloneIssues(issues) {
2907
2855
  path: iss.path.slice()
2908
2856
  } : { ...iss });
2909
2857
  }
2910
- const recursive = /* @__PURE__ */ new WeakMap();
2858
+ const recursive = /*@__PURE__*/ new WeakMap();
2911
2859
  /** What the walk established, in order of certainty: ordered so the strongest answer among children wins. */
2912
2860
  const NONE = 0;
2913
2861
  const ASSUMED = 1;
2914
2862
  const PROVEN = 2;
2915
2863
  /** Whether this schema's subtree contains a cycle, so one parse can re-enter it. */
2916
2864
  function isRecursive(inst, stack, resolve) {
2917
- const cached$1 = recursive.get(inst);
2918
- if (cached$1 !== void 0) return cached$1 ? PROVEN : NONE;
2865
+ const cached = recursive.get(inst);
2866
+ if (cached !== void 0) return cached ? PROVEN : NONE;
2919
2867
  if (stack.has(inst)) return PROVEN;
2920
2868
  stack.add(inst);
2921
2869
  let result = NONE;
@@ -2935,15 +2883,14 @@ function isRecursive(inst, stack, resolve) {
2935
2883
  }
2936
2884
  return answer;
2937
2885
  };
2938
- const merge$1 = (answer) => {
2886
+ const merge = (answer) => {
2939
2887
  if (answer > result) result = answer;
2940
2888
  };
2941
2889
  const def = inst._zod.def;
2942
- const kind = def.type;
2943
- switch (kind) {
2890
+ switch (def.type) {
2944
2891
  case "object": {
2945
2892
  const raw = rawShape(def);
2946
- merge$1(raw ? shape(raw, true) : ASSUMED);
2893
+ merge(raw ? shape(raw, true) : ASSUMED);
2947
2894
  check(def.catchall);
2948
2895
  break;
2949
2896
  }
@@ -2990,7 +2937,7 @@ function isRecursive(inst, stack, resolve) {
2990
2937
  break;
2991
2938
  case "lazy": {
2992
2939
  const inner = def._cachedInner ?? (resolve ? inst._zod.innerType : void 0);
2993
- merge$1(inner ? isRecursive(inner, stack, false) : ASSUMED);
2940
+ merge(inner ? isRecursive(inner, stack, false) : ASSUMED);
2994
2941
  break;
2995
2942
  }
2996
2943
  case "template_literal":
@@ -3054,8 +3001,8 @@ const memo = {
3054
3001
  return empty;
3055
3002
  },
3056
3003
  guard(inst) {
3057
- var _a$2;
3058
- (_a$2 = inst._zod).deferred ?? (_a$2.deferred = []);
3004
+ var _a;
3005
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
3059
3006
  inst._zod.deferred.push(() => {
3060
3007
  const base = inst._zod.parse;
3061
3008
  const wrapped = (payload, ctx) => {
@@ -3067,12 +3014,12 @@ const memo = {
3067
3014
  });
3068
3015
  },
3069
3016
  attach(inst) {
3070
- var _a$2;
3017
+ var _a;
3071
3018
  let isRecursiveInst;
3072
3019
  let rechecked = false;
3073
3020
  let lastCtx;
3074
3021
  let lastBucket;
3075
- (_a$2 = inst._zod).deferred ?? (_a$2.deferred = []);
3022
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
3076
3023
  inst._zod.deferred.push(() => {
3077
3024
  const base = inst._zod.parse;
3078
3025
  const wrapped = (payload, ctx) => {
@@ -3141,7 +3088,6 @@ function isBackEdge(ctx, value) {
3141
3088
  const backEdges = ctx[STATE]?.backEdges;
3142
3089
  return backEdges !== void 0 && isRef(value) && backEdges.has(value);
3143
3090
  }
3144
-
3145
3091
  //#endregion
3146
3092
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/en.js
3147
3093
  const error = () => {
@@ -3209,48 +3155,40 @@ const error = () => {
3209
3155
  if (type === "number" && typeof input === "number" && !Number.isFinite(input)) return String(input);
3210
3156
  return TypeDictionary[type] ?? type;
3211
3157
  }
3212
- return (issue$1) => {
3213
- switch (issue$1.code) {
3214
- case "invalid_type": {
3215
- const expected = getTypeName(issue$1.expected);
3216
- const receivedType = parsedType(issue$1.input);
3217
- const received = getTypeName(receivedType, issue$1.input);
3218
- return `Invalid input: expected ${expected}, received ${received}`;
3219
- }
3158
+ return (issue) => {
3159
+ switch (issue.code) {
3160
+ case "invalid_type": return `Invalid input: expected ${getTypeName(issue.expected)}, received ${getTypeName(parsedType(issue.input), issue.input)}`;
3220
3161
  case "invalid_value":
3221
- if (issue$1.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue$1.values[0])}`;
3222
- return `Invalid option: expected one of ${joinValues(issue$1.values, "|")}`;
3162
+ if (issue.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue.values[0])}`;
3163
+ return `Invalid option: expected one of ${joinValues(issue.values, "|")}`;
3223
3164
  case "too_big": {
3224
- const adj = issue$1.exact ? "exactly " : issue$1.inclusive ? "<=" : "<";
3225
- const sizing = getSizing(issue$1.origin);
3226
- if (sizing) return `Too big: expected ${issue$1.origin ?? "value"} to have ${adj}${issue$1.maximum.toString()} ${sizing.unit ?? "elements"}`;
3227
- return `Too big: expected ${issue$1.origin ?? "value"} to be ${adj}${issue$1.maximum.toString()}`;
3165
+ const adj = issue.exact ? "exactly " : issue.inclusive ? "<=" : "<";
3166
+ const sizing = getSizing(issue.origin);
3167
+ if (sizing) return `Too big: expected ${issue.origin ?? "value"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"}`;
3168
+ return `Too big: expected ${issue.origin ?? "value"} to be ${adj}${issue.maximum.toString()}`;
3228
3169
  }
3229
3170
  case "too_small": {
3230
- const adj = issue$1.exact ? "exactly " : issue$1.inclusive ? ">=" : ">";
3231
- const sizing = getSizing(issue$1.origin);
3232
- if (sizing) return `Too small: expected ${issue$1.origin} to have ${adj}${issue$1.minimum.toString()} ${sizing.unit}`;
3233
- return `Too small: expected ${issue$1.origin} to be ${adj}${issue$1.minimum.toString()}`;
3171
+ const adj = issue.exact ? "exactly " : issue.inclusive ? ">=" : ">";
3172
+ const sizing = getSizing(issue.origin);
3173
+ if (sizing) return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;
3174
+ return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;
3234
3175
  }
3235
3176
  case "invalid_format": {
3236
- const _issue = issue$1;
3177
+ const _issue = issue;
3237
3178
  if (_issue.format === "starts_with") return `Invalid string: must start with "${_issue.prefix}"`;
3238
3179
  if (_issue.format === "ends_with") return `Invalid string: must end with "${_issue.suffix}"`;
3239
3180
  if (_issue.format === "includes") return `Invalid string: must include "${_issue.includes}"`;
3240
3181
  if (_issue.format === "regex") return `Invalid string: must match pattern ${_issue.pattern}`;
3241
- return `Invalid ${FormatDictionary[_issue.format] ?? issue$1.format}`;
3182
+ return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;
3242
3183
  }
3243
- case "not_multiple_of": return `Invalid number: must be a multiple of ${issue$1.divisor}`;
3244
- case "unrecognized_keys": return `Unrecognized key${issue$1.keys.length > 1 ? "s" : ""}: ${joinValues(issue$1.keys, ", ")}`;
3245
- case "invalid_key": return `Invalid key in ${issue$1.origin}`;
3184
+ case "not_multiple_of": return `Invalid number: must be a multiple of ${issue.divisor}`;
3185
+ case "unrecognized_keys": return `Unrecognized key${issue.keys.length > 1 ? "s" : ""}: ${joinValues(issue.keys, ", ")}`;
3186
+ case "invalid_key": return `Invalid key in ${issue.origin}`;
3246
3187
  case "invalid_union":
3247
- if (issue$1.options && Array.isArray(issue$1.options) && issue$1.options.length > 0) {
3248
- const opts = issue$1.options.map((o) => `'${o}'`).join(" | ");
3249
- return `Invalid discriminator value. Expected ${opts}`;
3250
- }
3251
- if (issue$1.inclusive === false) return "Invalid input: more than one option matched";
3188
+ if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) return `Invalid discriminator value. Expected ${issue.options.map((o) => `'${o}'`).join(" | ")}`;
3189
+ if (issue.inclusive === false) return "Invalid input: more than one option matched";
3252
3190
  return "Invalid input";
3253
- case "invalid_element": return `Invalid value in ${issue$1.origin}`;
3191
+ case "invalid_element": return `Invalid value in ${issue.origin}`;
3254
3192
  default: return `Invalid input`;
3255
3193
  }
3256
3194
  };
@@ -3258,7 +3196,6 @@ const error = () => {
3258
3196
  function en_default() {
3259
3197
  return { localeError: error() };
3260
3198
  }
3261
-
3262
3199
  //#endregion
3263
3200
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/registries.js
3264
3201
  var _a;
@@ -3268,9 +3205,9 @@ var $ZodRegistry = class {
3268
3205
  this._idmap = /* @__PURE__ */ new Map();
3269
3206
  }
3270
3207
  add(schema, ..._meta) {
3271
- const meta$2 = _meta[0];
3272
- this._map.set(schema, meta$2);
3273
- if (meta$2 && typeof meta$2 === "object" && "id" in meta$2) this._idmap.set(meta$2.id, schema);
3208
+ const meta = _meta[0];
3209
+ this._map.set(schema, meta);
3210
+ if (meta && typeof meta === "object" && "id" in meta) this._idmap.set(meta.id, schema);
3274
3211
  return this;
3275
3212
  }
3276
3213
  clear() {
@@ -3279,8 +3216,8 @@ var $ZodRegistry = class {
3279
3216
  return this;
3280
3217
  }
3281
3218
  remove(schema) {
3282
- const meta$2 = this._map.get(schema);
3283
- if (meta$2 && typeof meta$2 === "object" && "id" in meta$2) this._idmap.delete(meta$2.id);
3219
+ const meta = this._map.get(schema);
3220
+ if (meta && typeof meta === "object" && "id" in meta) this._idmap.delete(meta.id);
3284
3221
  this._map.delete(schema);
3285
3222
  return this;
3286
3223
  }
@@ -3306,21 +3243,20 @@ function registry() {
3306
3243
  }
3307
3244
  (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
3308
3245
  const globalRegistry = globalThis.__zod_globalRegistry;
3309
-
3310
3246
  //#endregion
3311
3247
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/api.js
3312
3248
  function snapshotChecks(def) {
3313
3249
  if (def.checks) def.checks = [...def.checks];
3314
3250
  return def;
3315
3251
  }
3316
- /* @__NO_SIDE_EFFECTS__ */
3252
+ // @__NO_SIDE_EFFECTS__
3317
3253
  function _string(Class, params) {
3318
3254
  return new Class(snapshotChecks({
3319
3255
  type: "string",
3320
3256
  ...normalizeParams(params)
3321
3257
  }));
3322
3258
  }
3323
- /* @__NO_SIDE_EFFECTS__ */
3259
+ // @__NO_SIDE_EFFECTS__
3324
3260
  function _email(Class, params) {
3325
3261
  return new Class({
3326
3262
  type: "string",
@@ -3330,7 +3266,7 @@ function _email(Class, params) {
3330
3266
  ...normalizeParams(params)
3331
3267
  });
3332
3268
  }
3333
- /* @__NO_SIDE_EFFECTS__ */
3269
+ // @__NO_SIDE_EFFECTS__
3334
3270
  function _guid(Class, params) {
3335
3271
  return new Class({
3336
3272
  type: "string",
@@ -3340,7 +3276,7 @@ function _guid(Class, params) {
3340
3276
  ...normalizeParams(params)
3341
3277
  });
3342
3278
  }
3343
- /* @__NO_SIDE_EFFECTS__ */
3279
+ // @__NO_SIDE_EFFECTS__
3344
3280
  function _uuid(Class, params) {
3345
3281
  return new Class({
3346
3282
  type: "string",
@@ -3350,7 +3286,7 @@ function _uuid(Class, params) {
3350
3286
  ...normalizeParams(params)
3351
3287
  });
3352
3288
  }
3353
- /* @__NO_SIDE_EFFECTS__ */
3289
+ // @__NO_SIDE_EFFECTS__
3354
3290
  function _uuidv4(Class, params) {
3355
3291
  return new Class({
3356
3292
  type: "string",
@@ -3361,7 +3297,7 @@ function _uuidv4(Class, params) {
3361
3297
  ...normalizeParams(params)
3362
3298
  });
3363
3299
  }
3364
- /* @__NO_SIDE_EFFECTS__ */
3300
+ // @__NO_SIDE_EFFECTS__
3365
3301
  function _uuidv6(Class, params) {
3366
3302
  return new Class({
3367
3303
  type: "string",
@@ -3372,7 +3308,7 @@ function _uuidv6(Class, params) {
3372
3308
  ...normalizeParams(params)
3373
3309
  });
3374
3310
  }
3375
- /* @__NO_SIDE_EFFECTS__ */
3311
+ // @__NO_SIDE_EFFECTS__
3376
3312
  function _uuidv7(Class, params) {
3377
3313
  return new Class({
3378
3314
  type: "string",
@@ -3383,7 +3319,7 @@ function _uuidv7(Class, params) {
3383
3319
  ...normalizeParams(params)
3384
3320
  });
3385
3321
  }
3386
- /* @__NO_SIDE_EFFECTS__ */
3322
+ // @__NO_SIDE_EFFECTS__
3387
3323
  function _url(Class, params) {
3388
3324
  return new Class({
3389
3325
  type: "string",
@@ -3393,7 +3329,7 @@ function _url(Class, params) {
3393
3329
  ...normalizeParams(params)
3394
3330
  });
3395
3331
  }
3396
- /* @__NO_SIDE_EFFECTS__ */
3332
+ // @__NO_SIDE_EFFECTS__
3397
3333
  function _emoji(Class, params) {
3398
3334
  return new Class({
3399
3335
  type: "string",
@@ -3403,7 +3339,7 @@ function _emoji(Class, params) {
3403
3339
  ...normalizeParams(params)
3404
3340
  });
3405
3341
  }
3406
- /* @__NO_SIDE_EFFECTS__ */
3342
+ // @__NO_SIDE_EFFECTS__
3407
3343
  function _nanoid(Class, params) {
3408
3344
  return new Class({
3409
3345
  type: "string",
@@ -3418,7 +3354,7 @@ function _nanoid(Class, params) {
3418
3354
  * (timestamps embedded in the id). Use {@link _cuid2} instead.
3419
3355
  * See https://github.com/paralleldrive/cuid.
3420
3356
  */
3421
- /* @__NO_SIDE_EFFECTS__ */
3357
+ // @__NO_SIDE_EFFECTS__
3422
3358
  function _cuid(Class, params) {
3423
3359
  return new Class({
3424
3360
  type: "string",
@@ -3428,7 +3364,7 @@ function _cuid(Class, params) {
3428
3364
  ...normalizeParams(params)
3429
3365
  });
3430
3366
  }
3431
- /* @__NO_SIDE_EFFECTS__ */
3367
+ // @__NO_SIDE_EFFECTS__
3432
3368
  function _cuid2(Class, params) {
3433
3369
  return new Class({
3434
3370
  type: "string",
@@ -3438,7 +3374,7 @@ function _cuid2(Class, params) {
3438
3374
  ...normalizeParams(params)
3439
3375
  });
3440
3376
  }
3441
- /* @__NO_SIDE_EFFECTS__ */
3377
+ // @__NO_SIDE_EFFECTS__
3442
3378
  function _ulid(Class, params) {
3443
3379
  return new Class({
3444
3380
  type: "string",
@@ -3448,7 +3384,7 @@ function _ulid(Class, params) {
3448
3384
  ...normalizeParams(params)
3449
3385
  });
3450
3386
  }
3451
- /* @__NO_SIDE_EFFECTS__ */
3387
+ // @__NO_SIDE_EFFECTS__
3452
3388
  function _xid(Class, params) {
3453
3389
  return new Class({
3454
3390
  type: "string",
@@ -3458,7 +3394,7 @@ function _xid(Class, params) {
3458
3394
  ...normalizeParams(params)
3459
3395
  });
3460
3396
  }
3461
- /* @__NO_SIDE_EFFECTS__ */
3397
+ // @__NO_SIDE_EFFECTS__
3462
3398
  function _ksuid(Class, params) {
3463
3399
  return new Class({
3464
3400
  type: "string",
@@ -3468,7 +3404,7 @@ function _ksuid(Class, params) {
3468
3404
  ...normalizeParams(params)
3469
3405
  });
3470
3406
  }
3471
- /* @__NO_SIDE_EFFECTS__ */
3407
+ // @__NO_SIDE_EFFECTS__
3472
3408
  function _ipv4(Class, params) {
3473
3409
  return new Class({
3474
3410
  type: "string",
@@ -3478,7 +3414,7 @@ function _ipv4(Class, params) {
3478
3414
  ...normalizeParams(params)
3479
3415
  });
3480
3416
  }
3481
- /* @__NO_SIDE_EFFECTS__ */
3417
+ // @__NO_SIDE_EFFECTS__
3482
3418
  function _ipv6(Class, params) {
3483
3419
  return new Class({
3484
3420
  type: "string",
@@ -3488,7 +3424,7 @@ function _ipv6(Class, params) {
3488
3424
  ...normalizeParams(params)
3489
3425
  });
3490
3426
  }
3491
- /* @__NO_SIDE_EFFECTS__ */
3427
+ // @__NO_SIDE_EFFECTS__
3492
3428
  function _cidrv4(Class, params) {
3493
3429
  return new Class({
3494
3430
  type: "string",
@@ -3498,7 +3434,7 @@ function _cidrv4(Class, params) {
3498
3434
  ...normalizeParams(params)
3499
3435
  });
3500
3436
  }
3501
- /* @__NO_SIDE_EFFECTS__ */
3437
+ // @__NO_SIDE_EFFECTS__
3502
3438
  function _cidrv6(Class, params) {
3503
3439
  return new Class({
3504
3440
  type: "string",
@@ -3508,7 +3444,7 @@ function _cidrv6(Class, params) {
3508
3444
  ...normalizeParams(params)
3509
3445
  });
3510
3446
  }
3511
- /* @__NO_SIDE_EFFECTS__ */
3447
+ // @__NO_SIDE_EFFECTS__
3512
3448
  function _base64(Class, params) {
3513
3449
  return new Class({
3514
3450
  type: "string",
@@ -3518,7 +3454,7 @@ function _base64(Class, params) {
3518
3454
  ...normalizeParams(params)
3519
3455
  });
3520
3456
  }
3521
- /* @__NO_SIDE_EFFECTS__ */
3457
+ // @__NO_SIDE_EFFECTS__
3522
3458
  function _base64url(Class, params) {
3523
3459
  return new Class({
3524
3460
  type: "string",
@@ -3528,7 +3464,7 @@ function _base64url(Class, params) {
3528
3464
  ...normalizeParams(params)
3529
3465
  });
3530
3466
  }
3531
- /* @__NO_SIDE_EFFECTS__ */
3467
+ // @__NO_SIDE_EFFECTS__
3532
3468
  function _e164(Class, params) {
3533
3469
  return new Class({
3534
3470
  type: "string",
@@ -3538,7 +3474,7 @@ function _e164(Class, params) {
3538
3474
  ...normalizeParams(params)
3539
3475
  });
3540
3476
  }
3541
- /* @__NO_SIDE_EFFECTS__ */
3477
+ // @__NO_SIDE_EFFECTS__
3542
3478
  function _jwt(Class, params) {
3543
3479
  return new Class({
3544
3480
  type: "string",
@@ -3548,7 +3484,7 @@ function _jwt(Class, params) {
3548
3484
  ...normalizeParams(params)
3549
3485
  });
3550
3486
  }
3551
- /* @__NO_SIDE_EFFECTS__ */
3487
+ // @__NO_SIDE_EFFECTS__
3552
3488
  function _isoDateTime(Class, params) {
3553
3489
  return new Class({
3554
3490
  type: "string",
@@ -3560,7 +3496,7 @@ function _isoDateTime(Class, params) {
3560
3496
  ...normalizeParams(params)
3561
3497
  });
3562
3498
  }
3563
- /* @__NO_SIDE_EFFECTS__ */
3499
+ // @__NO_SIDE_EFFECTS__
3564
3500
  function _isoDate(Class, params) {
3565
3501
  return new Class({
3566
3502
  type: "string",
@@ -3569,7 +3505,7 @@ function _isoDate(Class, params) {
3569
3505
  ...normalizeParams(params)
3570
3506
  });
3571
3507
  }
3572
- /* @__NO_SIDE_EFFECTS__ */
3508
+ // @__NO_SIDE_EFFECTS__
3573
3509
  function _isoTime(Class, params) {
3574
3510
  return new Class({
3575
3511
  type: "string",
@@ -3579,7 +3515,7 @@ function _isoTime(Class, params) {
3579
3515
  ...normalizeParams(params)
3580
3516
  });
3581
3517
  }
3582
- /* @__NO_SIDE_EFFECTS__ */
3518
+ // @__NO_SIDE_EFFECTS__
3583
3519
  function _isoDuration(Class, params) {
3584
3520
  return new Class({
3585
3521
  type: "string",
@@ -3588,7 +3524,7 @@ function _isoDuration(Class, params) {
3588
3524
  ...normalizeParams(params)
3589
3525
  });
3590
3526
  }
3591
- /* @__NO_SIDE_EFFECTS__ */
3527
+ // @__NO_SIDE_EFFECTS__
3592
3528
  function _number(Class, params) {
3593
3529
  return new Class(snapshotChecks({
3594
3530
  type: "number",
@@ -3596,7 +3532,7 @@ function _number(Class, params) {
3596
3532
  ...normalizeParams(params)
3597
3533
  }));
3598
3534
  }
3599
- /* @__NO_SIDE_EFFECTS__ */
3535
+ // @__NO_SIDE_EFFECTS__
3600
3536
  function _int(Class, params) {
3601
3537
  return new Class({
3602
3538
  type: "number",
@@ -3606,25 +3542,25 @@ function _int(Class, params) {
3606
3542
  ...normalizeParams(params)
3607
3543
  });
3608
3544
  }
3609
- /* @__NO_SIDE_EFFECTS__ */
3545
+ // @__NO_SIDE_EFFECTS__
3610
3546
  function _boolean(Class, params) {
3611
3547
  return new Class({
3612
3548
  type: "boolean",
3613
3549
  ...normalizeParams(params)
3614
3550
  });
3615
3551
  }
3616
- /* @__NO_SIDE_EFFECTS__ */
3552
+ // @__NO_SIDE_EFFECTS__
3617
3553
  function _unknown(Class) {
3618
3554
  return new Class({ type: "unknown" });
3619
3555
  }
3620
- /* @__NO_SIDE_EFFECTS__ */
3556
+ // @__NO_SIDE_EFFECTS__
3621
3557
  function _never(Class, params) {
3622
3558
  return new Class({
3623
3559
  type: "never",
3624
3560
  ...normalizeParams(params)
3625
3561
  });
3626
3562
  }
3627
- /* @__NO_SIDE_EFFECTS__ */
3563
+ // @__NO_SIDE_EFFECTS__
3628
3564
  function _lt(value, params) {
3629
3565
  return new $ZodCheckLessThan({
3630
3566
  check: "less_than",
@@ -3633,7 +3569,7 @@ function _lt(value, params) {
3633
3569
  inclusive: false
3634
3570
  });
3635
3571
  }
3636
- /* @__NO_SIDE_EFFECTS__ */
3572
+ // @__NO_SIDE_EFFECTS__
3637
3573
  function _lte(value, params) {
3638
3574
  return new $ZodCheckLessThan({
3639
3575
  check: "less_than",
@@ -3642,7 +3578,7 @@ function _lte(value, params) {
3642
3578
  inclusive: true
3643
3579
  });
3644
3580
  }
3645
- /* @__NO_SIDE_EFFECTS__ */
3581
+ // @__NO_SIDE_EFFECTS__
3646
3582
  function _gt(value, params) {
3647
3583
  return new $ZodCheckGreaterThan({
3648
3584
  check: "greater_than",
@@ -3651,7 +3587,7 @@ function _gt(value, params) {
3651
3587
  inclusive: false
3652
3588
  });
3653
3589
  }
3654
- /* @__NO_SIDE_EFFECTS__ */
3590
+ // @__NO_SIDE_EFFECTS__
3655
3591
  function _gte(value, params) {
3656
3592
  return new $ZodCheckGreaterThan({
3657
3593
  check: "greater_than",
@@ -3660,7 +3596,7 @@ function _gte(value, params) {
3660
3596
  inclusive: true
3661
3597
  });
3662
3598
  }
3663
- /* @__NO_SIDE_EFFECTS__ */
3599
+ // @__NO_SIDE_EFFECTS__
3664
3600
  function _multipleOf(value, params) {
3665
3601
  return new $ZodCheckMultipleOf({
3666
3602
  check: "multiple_of",
@@ -3668,16 +3604,15 @@ function _multipleOf(value, params) {
3668
3604
  value
3669
3605
  });
3670
3606
  }
3671
- /* @__NO_SIDE_EFFECTS__ */
3607
+ // @__NO_SIDE_EFFECTS__
3672
3608
  function _maxLength(maximum, params) {
3673
- const ch = new $ZodCheckMaxLength({
3609
+ return new $ZodCheckMaxLength({
3674
3610
  check: "max_length",
3675
3611
  ...normalizeParams(params),
3676
3612
  maximum
3677
3613
  });
3678
- return ch;
3679
3614
  }
3680
- /* @__NO_SIDE_EFFECTS__ */
3615
+ // @__NO_SIDE_EFFECTS__
3681
3616
  function _minLength(minimum, params) {
3682
3617
  return new $ZodCheckMinLength({
3683
3618
  check: "min_length",
@@ -3685,7 +3620,7 @@ function _minLength(minimum, params) {
3685
3620
  minimum
3686
3621
  });
3687
3622
  }
3688
- /* @__NO_SIDE_EFFECTS__ */
3623
+ // @__NO_SIDE_EFFECTS__
3689
3624
  function _length(length, params) {
3690
3625
  return new $ZodCheckLengthEquals({
3691
3626
  check: "length_equals",
@@ -3693,7 +3628,7 @@ function _length(length, params) {
3693
3628
  length
3694
3629
  });
3695
3630
  }
3696
- /* @__NO_SIDE_EFFECTS__ */
3631
+ // @__NO_SIDE_EFFECTS__
3697
3632
  function _regex(pattern, params) {
3698
3633
  return new $ZodCheckRegex({
3699
3634
  check: "string_format",
@@ -3702,7 +3637,7 @@ function _regex(pattern, params) {
3702
3637
  pattern
3703
3638
  });
3704
3639
  }
3705
- /* @__NO_SIDE_EFFECTS__ */
3640
+ // @__NO_SIDE_EFFECTS__
3706
3641
  function _lowercase(params) {
3707
3642
  return new $ZodCheckLowerCase({
3708
3643
  check: "string_format",
@@ -3710,7 +3645,7 @@ function _lowercase(params) {
3710
3645
  ...normalizeParams(params)
3711
3646
  });
3712
3647
  }
3713
- /* @__NO_SIDE_EFFECTS__ */
3648
+ // @__NO_SIDE_EFFECTS__
3714
3649
  function _uppercase(params) {
3715
3650
  return new $ZodCheckUpperCase({
3716
3651
  check: "string_format",
@@ -3718,7 +3653,7 @@ function _uppercase(params) {
3718
3653
  ...normalizeParams(params)
3719
3654
  });
3720
3655
  }
3721
- /* @__NO_SIDE_EFFECTS__ */
3656
+ // @__NO_SIDE_EFFECTS__
3722
3657
  function _includes(includes, params) {
3723
3658
  return new $ZodCheckIncludes({
3724
3659
  check: "string_format",
@@ -3727,7 +3662,7 @@ function _includes(includes, params) {
3727
3662
  includes
3728
3663
  });
3729
3664
  }
3730
- /* @__NO_SIDE_EFFECTS__ */
3665
+ // @__NO_SIDE_EFFECTS__
3731
3666
  function _startsWith(prefix, params) {
3732
3667
  return new $ZodCheckStartsWith({
3733
3668
  check: "string_format",
@@ -3736,7 +3671,7 @@ function _startsWith(prefix, params) {
3736
3671
  prefix
3737
3672
  });
3738
3673
  }
3739
- /* @__NO_SIDE_EFFECTS__ */
3674
+ // @__NO_SIDE_EFFECTS__
3740
3675
  function _endsWith(suffix, params) {
3741
3676
  return new $ZodCheckEndsWith({
3742
3677
  check: "string_format",
@@ -3745,34 +3680,34 @@ function _endsWith(suffix, params) {
3745
3680
  suffix
3746
3681
  });
3747
3682
  }
3748
- /* @__NO_SIDE_EFFECTS__ */
3683
+ // @__NO_SIDE_EFFECTS__
3749
3684
  function _overwrite(tx) {
3750
3685
  return new $ZodCheckOverwrite({
3751
3686
  check: "overwrite",
3752
3687
  tx
3753
3688
  });
3754
3689
  }
3755
- /* @__NO_SIDE_EFFECTS__ */
3690
+ // @__NO_SIDE_EFFECTS__
3756
3691
  function _normalize(form) {
3757
3692
  return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
3758
3693
  }
3759
- /* @__NO_SIDE_EFFECTS__ */
3694
+ // @__NO_SIDE_EFFECTS__
3760
3695
  function _trim() {
3761
3696
  return /* @__PURE__ */ _overwrite((input) => input.trim());
3762
3697
  }
3763
- /* @__NO_SIDE_EFFECTS__ */
3698
+ // @__NO_SIDE_EFFECTS__
3764
3699
  function _toLowerCase() {
3765
3700
  return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
3766
3701
  }
3767
- /* @__NO_SIDE_EFFECTS__ */
3702
+ // @__NO_SIDE_EFFECTS__
3768
3703
  function _toUpperCase() {
3769
3704
  return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
3770
3705
  }
3771
- /* @__NO_SIDE_EFFECTS__ */
3706
+ // @__NO_SIDE_EFFECTS__
3772
3707
  function _slugify() {
3773
3708
  return /* @__PURE__ */ _overwrite((input) => slugify(input));
3774
3709
  }
3775
- /* @__NO_SIDE_EFFECTS__ */
3710
+ // @__NO_SIDE_EFFECTS__
3776
3711
  function _array(Class, element, params) {
3777
3712
  return new Class({
3778
3713
  type: "array",
@@ -3780,35 +3715,33 @@ function _array(Class, element, params) {
3780
3715
  ...normalizeParams(params)
3781
3716
  });
3782
3717
  }
3783
- /* @__NO_SIDE_EFFECTS__ */
3718
+ // @__NO_SIDE_EFFECTS__
3784
3719
  function _custom(Class, fn, _params) {
3785
3720
  const norm = normalizeParams(_params);
3786
3721
  norm.abort ?? (norm.abort = true);
3787
- const schema = new Class({
3722
+ return new Class({
3788
3723
  type: "custom",
3789
3724
  check: "custom",
3790
3725
  fn,
3791
3726
  ...norm
3792
3727
  });
3793
- return schema;
3794
3728
  }
3795
- /* @__NO_SIDE_EFFECTS__ */
3729
+ // @__NO_SIDE_EFFECTS__
3796
3730
  function _refine(Class, fn, _params) {
3797
- const schema = new Class({
3731
+ return new Class({
3798
3732
  type: "custom",
3799
3733
  check: "custom",
3800
3734
  fn,
3801
3735
  ...normalizeParams(_params)
3802
3736
  });
3803
- return schema;
3804
3737
  }
3805
- /* @__NO_SIDE_EFFECTS__ */
3738
+ // @__NO_SIDE_EFFECTS__
3806
3739
  function _superRefine(fn, params) {
3807
3740
  const ch = /* @__PURE__ */ _check((payload) => {
3808
- payload.addIssue = (issue$1) => {
3809
- if (typeof issue$1 === "string") payload.issues.push(issue(issue$1, payload.value, ch._zod.def));
3741
+ payload.addIssue = (issue$2) => {
3742
+ if (typeof issue$2 === "string") payload.issues.push(issue(issue$2, payload.value, ch._zod.def));
3810
3743
  else {
3811
- const _issue = issue$1;
3744
+ const _issue = issue$2;
3812
3745
  if (_issue.fatal) _issue.continue = false;
3813
3746
  _issue.code ?? (_issue.code = "custom");
3814
3747
  if (!("input" in _issue)) _issue.input = payload.value;
@@ -3821,7 +3754,7 @@ function _superRefine(fn, params) {
3821
3754
  }, params);
3822
3755
  return ch;
3823
3756
  }
3824
- /* @__NO_SIDE_EFFECTS__ */
3757
+ // @__NO_SIDE_EFFECTS__
3825
3758
  function _check(fn, params) {
3826
3759
  const ch = new $ZodCheck({
3827
3760
  check: "custom",
@@ -3830,33 +3763,6 @@ function _check(fn, params) {
3830
3763
  ch._zod.check = fn;
3831
3764
  return ch;
3832
3765
  }
3833
- /* @__NO_SIDE_EFFECTS__ */
3834
- function describe$1(description) {
3835
- const ch = new $ZodCheck({ check: "describe" });
3836
- ch._zod.onattach = [(inst) => {
3837
- const existing = globalRegistry.get(inst) ?? {};
3838
- globalRegistry.add(inst, {
3839
- ...existing,
3840
- description
3841
- });
3842
- }];
3843
- ch._zod.check = () => {};
3844
- return ch;
3845
- }
3846
- /* @__NO_SIDE_EFFECTS__ */
3847
- function meta$1(metadata) {
3848
- const ch = new $ZodCheck({ check: "meta" });
3849
- ch._zod.onattach = [(inst) => {
3850
- const existing = globalRegistry.get(inst) ?? {};
3851
- globalRegistry.add(inst, {
3852
- ...existing,
3853
- ...metadata
3854
- });
3855
- }];
3856
- ch._zod.check = () => {};
3857
- return ch;
3858
- }
3859
-
3860
3766
  //#endregion
3861
3767
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/to-json-schema.js
3862
3768
  function assignProps(target, ...sources) {
@@ -3905,13 +3811,12 @@ function processSchema(schema, ctx, _params = {
3905
3811
  path: [],
3906
3812
  schemaPath: []
3907
3813
  }) {
3908
- var _a$2;
3814
+ var _a;
3909
3815
  const def = schema._zod.def;
3910
3816
  const seen = ctx.seen.get(schema);
3911
3817
  if (seen) {
3912
3818
  seen.count++;
3913
- const isCycle = _params.schemaPath.includes(schema);
3914
- if (isCycle) seen.cycle = _params.path;
3819
+ if (_params.schemaPath.includes(schema)) seen.cycle = _params.path;
3915
3820
  return seen.schema;
3916
3821
  }
3917
3822
  const result = {
@@ -3945,16 +3850,15 @@ function processSchema(schema, ctx, _params = {
3945
3850
  ctx.seen.get(parent).isParent = true;
3946
3851
  }
3947
3852
  }
3948
- const meta$2 = ctx.metadataRegistry.get(schema);
3949
- if (meta$2) assignProps(result.schema, meta$2);
3853
+ const meta = ctx.metadataRegistry.get(schema);
3854
+ if (meta) assignProps(result.schema, meta);
3950
3855
  if (ctx.io === "input" && isTransforming(schema)) {
3951
3856
  delete result.schema.examples;
3952
3857
  delete result.schema.default;
3953
3858
  }
3954
- if (ctx.io === "input" && "_prefault" in result.schema) (_a$2 = result.schema).default ?? (_a$2.default = result.schema._prefault);
3859
+ if (ctx.io === "input" && "_prefault" in result.schema) (_a = result.schema).default ?? (_a.default = result.schema._prefault);
3955
3860
  delete result.schema._prefault;
3956
- const _result = ctx.seen.get(schema);
3957
- return _result.schema;
3861
+ return ctx.seen.get(schema).schema;
3958
3862
  }
3959
3863
  function encodeJSONPointerSegment(segment) {
3960
3864
  return segment.replace(/~/g, "~0").replace(/\//g, "~1");
@@ -3976,7 +3880,7 @@ function extractDefs(ctx, schema) {
3976
3880
  const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
3977
3881
  if (ctx.external) {
3978
3882
  const externalId = ctx.external.registry.get(entry[0])?.id;
3979
- const uriGenerator = ctx.external.uri ?? ((id$1) => id$1);
3883
+ const uriGenerator = ctx.external.uri ?? ((id) => id);
3980
3884
  if (externalId) return { ref: uriGenerator(externalId) };
3981
3885
  const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
3982
3886
  entry[1].defId = id;
@@ -4000,9 +3904,9 @@ function extractDefs(ctx, schema) {
4000
3904
  const { ref, defId } = makeURI(entry);
4001
3905
  seen.def = { ...seen.schema };
4002
3906
  if (defId) seen.defId = defId;
4003
- const schema$1 = seen.schema;
4004
- for (const key in schema$1) delete schema$1[key];
4005
- schema$1.$ref = ref;
3907
+ const schema = seen.schema;
3908
+ for (const key in schema) delete schema[key];
3909
+ schema.$ref = ref;
4006
3910
  };
4007
3911
  if (ctx.cycles === "throw") for (const entry of ctx.seen.entries()) {
4008
3912
  const seen = entry[1];
@@ -4023,8 +3927,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4023
3927
  continue;
4024
3928
  }
4025
3929
  }
4026
- const id = ctx.metadataRegistry.get(entry[0])?.id;
4027
- if (id) {
3930
+ if (ctx.metadataRegistry.get(entry[0])?.id) {
4028
3931
  extractToDef(entry);
4029
3932
  continue;
4030
3933
  }
@@ -4060,7 +3963,7 @@ function compactTypeUnion(schema) {
4060
3963
  /** Keywords `foldIntersection` knows how to combine. Anything else — `$ref`, `patternProperties`,
4061
3964
  * an annotation like `description` — makes a member unfoldable, so a constraint this does not
4062
3965
  * understand leaves the `allOf` alone instead of being silently dropped or misattributed. */
4063
- const FOLDABLE_KEYS = new Set([
3966
+ const FOLDABLE_KEYS = /* @__PURE__ */ new Set([
4064
3967
  "type",
4065
3968
  "properties",
4066
3969
  "required",
@@ -4074,17 +3977,17 @@ function undeclaredConstraint(member) {
4074
3977
  return Object.keys(extra).length ? extra : null;
4075
3978
  }
4076
3979
  /** Combines object members into the single object they describe together, or returns `null` if any of them carries a keyword outside {@link FOLDABLE_KEYS}. */
4077
- function foldObjects(members$1) {
3980
+ function foldObjects(members) {
4078
3981
  const objects = [];
4079
- for (const member of members$1) {
3982
+ for (const member of members) {
4080
3983
  if (typeof member !== "object" || member.type !== "object") return null;
4081
3984
  for (const key in member) if (!FOLDABLE_KEYS.has(key)) return null;
4082
3985
  objects.push(member);
4083
3986
  }
4084
3987
  const properties = {};
4085
- const required$1 = /* @__PURE__ */ new Set();
4086
- for (const object$1 of objects) {
4087
- for (const key in object$1.properties) {
3988
+ const required = /* @__PURE__ */ new Set();
3989
+ for (const object of objects) {
3990
+ for (const key in object.properties) {
4088
3991
  if (Object.prototype.hasOwnProperty.call(properties, key)) continue;
4089
3992
  const parts = [];
4090
3993
  for (const other of objects) {
@@ -4092,21 +3995,20 @@ function foldObjects(members$1) {
4092
3995
  if (part === null || part === void 0) continue;
4093
3996
  if (!parts.some((seen) => JSON.stringify(seen) === JSON.stringify(part))) parts.push(part);
4094
3997
  }
4095
- const merged = parts.length === 1 ? parts[0] : foldObjects(parts) ?? { allOf: parts };
4096
- assignProp(properties, key, merged);
3998
+ assignProp(properties, key, parts.length === 1 ? parts[0] : foldObjects(parts) ?? { allOf: parts });
4097
3999
  }
4098
- for (const key of object$1.required ?? []) required$1.add(key);
4000
+ for (const key of object.required ?? []) required.add(key);
4099
4001
  }
4100
4002
  const folded = {
4101
4003
  type: "object",
4102
4004
  properties
4103
4005
  };
4104
- if (required$1.size) folded.required = [...required$1];
4105
- if (objects.every((object$1) => object$1.additionalProperties === false)) folded.additionalProperties = false;
4006
+ if (required.size) folded.required = [...required];
4007
+ if (objects.every((object) => object.additionalProperties === false)) folded.additionalProperties = false;
4106
4008
  else {
4107
4009
  const constraints = [];
4108
- for (const object$1 of objects) {
4109
- const constraint = undeclaredConstraint(object$1);
4010
+ for (const object of objects) {
4011
+ const constraint = undeclaredConstraint(object);
4110
4012
  if (constraint && !constraints.some((seen) => JSON.stringify(seen) === JSON.stringify(constraint))) constraints.push(constraint);
4111
4013
  }
4112
4014
  if (constraints.length === 1) folded.additionalProperties = constraints[0];
@@ -4131,11 +4033,11 @@ function foldIntersection(json) {
4131
4033
  let folded = null;
4132
4034
  if (!unions.length) folded = foldObjects(allOf);
4133
4035
  else {
4134
- const union$1 = unions[0];
4135
- const keyword = UNION_KEYS.find((k) => Array.isArray(union$1[k]));
4136
- if (Object.keys(union$1).length !== 1) return;
4137
- const rest = allOf.filter((m) => m !== union$1);
4138
- const branches = union$1[keyword].map((branch) => foldObjects([...rest, branch]));
4036
+ const union = unions[0];
4037
+ const keyword = UNION_KEYS.find((k) => Array.isArray(union[k]));
4038
+ if (Object.keys(union).length !== 1) return;
4039
+ const rest = allOf.filter((m) => m !== union);
4040
+ const branches = union[keyword].map((branch) => foldObjects([...rest, branch]));
4139
4041
  if (branches.some((b) => !b)) return;
4140
4042
  folded = { [keyword]: branches };
4141
4043
  }
@@ -4149,8 +4051,8 @@ function finalize(ctx, schema) {
4149
4051
  const flattenRef = (zodSchema) => {
4150
4052
  const seen = ctx.seen.get(zodSchema);
4151
4053
  if (seen.ref === null) return;
4152
- const schema$1 = seen.def ?? seen.schema;
4153
- const _cached = { ...schema$1 };
4054
+ const schema = seen.def ?? seen.schema;
4055
+ const _cached = { ...schema };
4154
4056
  const ref = seen.ref;
4155
4057
  seen.ref = null;
4156
4058
  if (ref) {
@@ -4158,18 +4060,17 @@ function finalize(ctx, schema) {
4158
4060
  const refSeen = ctx.seen.get(ref);
4159
4061
  const refSchema = refSeen.schema;
4160
4062
  if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) {
4161
- schema$1.allOf = schema$1.allOf ?? [];
4162
- schema$1.allOf.push(refSchema);
4163
- } else assignProps(schema$1, refSchema);
4164
- assignProps(schema$1, _cached);
4165
- const isParentRef = zodSchema._zod.parent === ref;
4166
- if (isParentRef) for (const key in schema$1) {
4063
+ schema.allOf = schema.allOf ?? [];
4064
+ schema.allOf.push(refSchema);
4065
+ } else assignProps(schema, refSchema);
4066
+ assignProps(schema, _cached);
4067
+ if (zodSchema._zod.parent === ref) for (const key in schema) {
4167
4068
  if (key === "$ref" || key === "allOf") continue;
4168
- if (!(key in _cached)) delete schema$1[key];
4069
+ if (!(key in _cached)) delete schema[key];
4169
4070
  }
4170
- if (refSchema.$ref && refSeen.def) for (const key in schema$1) {
4071
+ if (refSchema.$ref && refSeen.def) for (const key in schema) {
4171
4072
  if (key === "$ref" || key === "allOf") continue;
4172
- if (key in refSeen.def && JSON.stringify(schema$1[key]) === JSON.stringify(refSeen.def[key])) delete schema$1[key];
4073
+ if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) delete schema[key];
4173
4074
  }
4174
4075
  }
4175
4076
  const parent = zodSchema._zod.parent;
@@ -4177,16 +4078,16 @@ function finalize(ctx, schema) {
4177
4078
  flattenRef(parent);
4178
4079
  const parentSeen = ctx.seen.get(parent);
4179
4080
  if (parentSeen?.schema.$ref) {
4180
- schema$1.$ref = parentSeen.schema.$ref;
4181
- if (parentSeen.def) for (const key in schema$1) {
4081
+ schema.$ref = parentSeen.schema.$ref;
4082
+ if (parentSeen.def) for (const key in schema) {
4182
4083
  if (key === "$ref" || key === "allOf") continue;
4183
- if (key in parentSeen.def && JSON.stringify(schema$1[key]) === JSON.stringify(parentSeen.def[key])) delete schema$1[key];
4084
+ if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) delete schema[key];
4184
4085
  }
4185
4086
  }
4186
4087
  }
4187
4088
  ctx.override({
4188
4089
  zodSchema,
4189
- jsonSchema: schema$1,
4090
+ jsonSchema: schema,
4190
4091
  path: seen.path ?? []
4191
4092
  });
4192
4093
  };
@@ -4228,8 +4129,10 @@ function finalize(ctx, schema) {
4228
4129
  }
4229
4130
  }
4230
4131
  if (ctx.external) ctx.sharedEmitDoneFor = ctx.external;
4231
- if (ctx.external) {} else if (Object.keys(defs).length > 0) if (ctx.target === "draft-2020-12") result.$defs = defs;
4232
- else result.definitions = defs;
4132
+ if (ctx.external) {} else if (Object.keys(defs).length > 0) {
4133
+ if (ctx.target === "draft-2020-12") result.$defs = defs;
4134
+ else result.definitions = defs;
4135
+ }
4233
4136
  try {
4234
4137
  const finalized = JSON.parse(JSON.stringify(result));
4235
4138
  Object.defineProperty(finalized, "~standard", {
@@ -4304,7 +4207,6 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
4304
4207
  extractDefs(ctx, schema);
4305
4208
  return finalize(ctx, schema);
4306
4209
  };
4307
-
4308
4210
  //#endregion
4309
4211
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema-processors.js
4310
4212
  const narrowMin = (agg, key, value) => {
@@ -4386,7 +4288,7 @@ const formatMap = {
4386
4288
  json_string: "json-string",
4387
4289
  regex: ""
4388
4290
  };
4389
- const exactPatterns = new Map([[base64Charset, base64], [base64urlCharset, base64url]]);
4291
+ const exactPatterns = /* @__PURE__ */ new Map([[base64Charset, base64], [base64urlCharset, base64url]]);
4390
4292
  const exactPattern = (p) => exactPatterns.get(p) ?? p;
4391
4293
  const stringProcessor = (schema, ctx, _json, _params) => {
4392
4294
  const json = _json;
@@ -4416,16 +4318,18 @@ const numberProcessor = (schema, ctx, _json, params) => {
4416
4318
  const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
4417
4319
  const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
4418
4320
  const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
4419
- if (exMin) if (legacy) {
4420
- json.minimum = exclusiveMinimum;
4421
- json.exclusiveMinimum = true;
4422
- } else json.exclusiveMinimum = exclusiveMinimum;
4423
- else if (typeof minimum === "number") json.minimum = minimum;
4424
- if (exMax) if (legacy) {
4425
- json.maximum = exclusiveMaximum;
4426
- json.exclusiveMaximum = true;
4427
- } else json.exclusiveMaximum = exclusiveMaximum;
4428
- else if (typeof maximum === "number") json.maximum = maximum;
4321
+ if (exMin) {
4322
+ if (legacy) {
4323
+ json.minimum = exclusiveMinimum;
4324
+ json.exclusiveMinimum = true;
4325
+ } else json.exclusiveMinimum = exclusiveMinimum;
4326
+ } else if (typeof minimum === "number") json.minimum = minimum;
4327
+ if (exMax) {
4328
+ if (legacy) {
4329
+ json.maximum = exclusiveMaximum;
4330
+ json.exclusiveMaximum = true;
4331
+ } else json.exclusiveMaximum = exclusiveMaximum;
4332
+ } else if (typeof maximum === "number") json.maximum = maximum;
4429
4333
  if (multipleOf) {
4430
4334
  const divisors = /* @__PURE__ */ new Set();
4431
4335
  for (const divisor of multipleOf) if (Number.isFinite(divisor) && divisor !== 0) divisors.add(Math.abs(divisor));
@@ -4441,7 +4345,6 @@ const booleanProcessor = (_schema, _ctx, json, _params) => {
4441
4345
  const neverProcessor = (_schema, _ctx, json, _params) => {
4442
4346
  json.not = {};
4443
4347
  };
4444
- const unknownProcessor = (_schema, _ctx, _json, _params) => {};
4445
4348
  const enumProcessor = (schema, _ctx, json, _params) => {
4446
4349
  const def = schema._zod.def;
4447
4350
  const values = getEnumValues(def.entries);
@@ -4507,8 +4410,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
4507
4410
  const json = _json;
4508
4411
  const def = schema._zod.def;
4509
4412
  const shape = def.shape;
4510
- const symbolKeys = Object.getOwnPropertySymbols(shape);
4511
- if (symbolKeys.length && handleUnrepresentable(schema, ctx, json, params, "Symbol keys cannot be represented in JSON Schema")) return;
4413
+ if (Object.getOwnPropertySymbols(shape).length && handleUnrepresentable(schema, ctx, json, params, "Symbol keys cannot be represented in JSON Schema")) return;
4512
4414
  json.type = "object";
4513
4415
  json.properties = {};
4514
4416
  for (const key in shape) assignProp(json.properties, key, processSchema(shape[key], ctx, {
@@ -4601,7 +4503,7 @@ function stringifyKeyNames(bySchema, json, visited) {
4601
4503
  const numericType = !types.includes("string") && types.some((t) => t === "number" || t === "integer");
4602
4504
  const values = json.enum ?? (json.const !== void 0 ? [json.const] : void 0);
4603
4505
  if (!numericType && !values?.some((v) => typeof v === "number")) return json;
4604
- const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id,...rest } = json;
4506
+ const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id, ...rest } = json;
4605
4507
  if (rest.enum) rest.enum = rest.enum.map((v) => typeof v === "number" ? String(v) : v);
4606
4508
  else if (typeof rest.const === "number") rest.const = String(rest.const);
4607
4509
  if (!numericType) return rest;
@@ -4615,8 +4517,8 @@ function rewriteKeyNames(ctx) {
4615
4517
  const bySchema = /* @__PURE__ */ new Map();
4616
4518
  for (const entry of ctx.seen.values()) if (entry.def && !bySchema.has(entry.schema)) bySchema.set(entry.schema, entry);
4617
4519
  const rewrites = /* @__PURE__ */ new Map();
4618
- for (const record$1 of pendingRecords.get(ctx) ?? []) {
4619
- const seen = ctx.seen.get(record$1);
4520
+ for (const record of pendingRecords.get(ctx) ?? []) {
4521
+ const seen = ctx.seen.get(record);
4620
4522
  const names = (seen?.def ?? seen?.schema)?.propertyNames;
4621
4523
  if (!names || names === true || rewrites.has(names)) continue;
4622
4524
  const rewritten = stringifyKeyNames(bySchema, names, /* @__PURE__ */ new Set());
@@ -4753,7 +4655,6 @@ const optionalProcessor = (schema, ctx, _json, params) => {
4753
4655
  const seen = ctx.seen.get(schema);
4754
4656
  seen.ref = def.innerType;
4755
4657
  };
4756
-
4757
4658
  //#endregion
4758
4659
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.js
4759
4660
  const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
@@ -4787,12 +4688,12 @@ const initializer = (inst, issues) => {
4787
4688
  _installedErrorProtos.add(proto);
4788
4689
  _lazyMethod(proto, "format", (self) => (mapper) => formatError(self, mapper));
4789
4690
  _lazyMethod(proto, "flatten", (self) => (mapper) => flattenError(self, mapper));
4790
- _lazyMethod(proto, "addIssue", (self) => (issue$1) => {
4791
- self.issues.push(issue$1);
4691
+ _lazyMethod(proto, "addIssue", (self) => (issue) => {
4692
+ self.issues.push(issue);
4792
4693
  self.message = JSON.stringify(self.issues, jsonStringifyReplacer, 2);
4793
4694
  });
4794
- _lazyMethod(proto, "addIssues", (self) => (issues$1) => {
4795
- self.issues.push(...issues$1);
4695
+ _lazyMethod(proto, "addIssues", (self) => (issues) => {
4696
+ self.issues.push(...issues);
4796
4697
  self.message = JSON.stringify(self.issues, jsonStringifyReplacer, 2);
4797
4698
  });
4798
4699
  Object.defineProperty(proto, "isEmpty", {
@@ -4803,8 +4704,7 @@ const initializer = (inst, issues) => {
4803
4704
  }
4804
4705
  });
4805
4706
  };
4806
- const ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer, void 0, { Parent: Error });
4807
-
4707
+ const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
4808
4708
  //#endregion
4809
4709
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/parse.js
4810
4710
  const parse = /* @__PURE__ */ _parse(ZodRealError);
@@ -4819,7 +4719,6 @@ const safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
4819
4719
  const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
4820
4720
  const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
4821
4721
  const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
4822
-
4823
4722
  //#endregion
4824
4723
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/schemas.js
4825
4724
  function _ensureDefaultLocale() {
@@ -4828,7 +4727,7 @@ function _ensureDefaultLocale() {
4828
4727
  function _ensureDefaultMemoizer() {
4829
4728
  if (!globalConfig.memoizer) config({ memoizer: memoizer() });
4830
4729
  }
4831
- const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
4730
+ const ZodType = /*@__PURE__*/ $constructor("ZodType", (inst, def) => {
4832
4731
  _ensureDefaultLocale();
4833
4732
  $ZodType.init(inst, def);
4834
4733
  inst.def = def;
@@ -4852,8 +4751,8 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
4852
4751
  brand() {
4853
4752
  return this;
4854
4753
  },
4855
- register(reg, meta$2) {
4856
- reg.add(this, meta$2);
4754
+ register(reg, meta) {
4755
+ reg.add(this, meta);
4857
4756
  return this;
4858
4757
  },
4859
4758
  refine(check, params) {
@@ -4863,7 +4762,7 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
4863
4762
  return this.check(superRefine(refinement, params));
4864
4763
  },
4865
4764
  overwrite(fn) {
4866
- return this.check(_overwrite(fn));
4765
+ return this.check(/* @__PURE__ */ _overwrite(fn));
4867
4766
  },
4868
4767
  optional() {
4869
4768
  return optional(this);
@@ -4939,11 +4838,11 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
4939
4838
  set "~standard"(value) {
4940
4839
  own(this, "~standard", value);
4941
4840
  },
4942
- parse: function _parse$1(data, params) {
4943
- return parse(this, data, params, { callee: _parse$1 });
4841
+ parse: function _parse(data, params) {
4842
+ return parse(this, data, params, { callee: _parse });
4944
4843
  },
4945
- parseAsync: async function _parseAsync$1(data, params) {
4946
- return await parseAsync(this, data, params, { callee: _parseAsync$1 });
4844
+ parseAsync: async function _parseAsync(data, params) {
4845
+ return await parseAsync(this, data, params, { callee: _parseAsync });
4947
4846
  },
4948
4847
  safeParse(data, params) {
4949
4848
  return safeParse(this, data, params);
@@ -4961,19 +4860,19 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
4961
4860
  return validate(this, data, params);
4962
4861
  },
4963
4862
  validateAsync(data, params) {
4964
- return validateAsync(this, data, params);
4863
+ return validateAsync$1(this, data, params);
4965
4864
  },
4966
- encode: function _encode$1(data, params) {
4967
- return encode(this, data, params, { callee: _encode$1 });
4865
+ encode: function _encode(data, params) {
4866
+ return encode(this, data, params, { callee: _encode });
4968
4867
  },
4969
- decode: function _decode$1(data, params) {
4970
- return decode(this, data, params, { callee: _decode$1 });
4868
+ decode: function _decode(data, params) {
4869
+ return decode(this, data, params, { callee: _decode });
4971
4870
  },
4972
- encodeAsync: async function _encodeAsync$1(data, params) {
4973
- return await encodeAsync(this, data, params, { callee: _encodeAsync$1 });
4871
+ encodeAsync: async function _encodeAsync(data, params) {
4872
+ return await encodeAsync(this, data, params, { callee: _encodeAsync });
4974
4873
  },
4975
- decodeAsync: async function _decodeAsync$1(data, params) {
4976
- return await decodeAsync(this, data, params, { callee: _decodeAsync$1 });
4874
+ decodeAsync: async function _decodeAsync(data, params) {
4875
+ return await decodeAsync(this, data, params, { callee: _decodeAsync });
4977
4876
  },
4978
4877
  safeEncode(data, params) {
4979
4878
  return safeEncode(this, data, params);
@@ -4998,191 +4897,191 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
4998
4897
  }
4999
4898
  });
5000
4899
  /** @internal */
5001
- const _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
4900
+ const _ZodString = /*@__PURE__*/ $constructor("_ZodString", (inst, def) => {
5002
4901
  $ZodString.init(inst, def);
5003
4902
  ZodType.init(inst, def);
5004
4903
  inst._zod.processJSONSchema = (ctx, json, params) => stringProcessor(inst, ctx, json, params);
5005
- }, /* @__PURE__ */ derived({
4904
+ }, /*@__PURE__*/ derived({
5006
4905
  format: (inst) => aggregateChecks(inst).format ?? null,
5007
4906
  minLength: (inst) => aggregateChecks(inst).minimum ?? null,
5008
4907
  maxLength: (inst) => aggregateChecks(inst).maximum ?? null
5009
4908
  }, {
5010
4909
  regex(...args) {
5011
- return this.check(_regex(...args));
4910
+ return this.check(/* @__PURE__ */ _regex(...args));
5012
4911
  },
5013
4912
  includes(...args) {
5014
- return this.check(_includes(...args));
4913
+ return this.check(/* @__PURE__ */ _includes(...args));
5015
4914
  },
5016
4915
  startsWith(...args) {
5017
- return this.check(_startsWith(...args));
4916
+ return this.check(/* @__PURE__ */ _startsWith(...args));
5018
4917
  },
5019
4918
  endsWith(...args) {
5020
- return this.check(_endsWith(...args));
4919
+ return this.check(/* @__PURE__ */ _endsWith(...args));
5021
4920
  },
5022
4921
  min(...args) {
5023
- return this.check(_minLength(...args));
4922
+ return this.check(/* @__PURE__ */ _minLength(...args));
5024
4923
  },
5025
4924
  max(...args) {
5026
- return this.check(_maxLength(...args));
4925
+ return this.check(/* @__PURE__ */ _maxLength(...args));
5027
4926
  },
5028
4927
  length(...args) {
5029
- return this.check(_length(...args));
4928
+ return this.check(/* @__PURE__ */ _length(...args));
5030
4929
  },
5031
4930
  nonempty(...args) {
5032
- return this.check(_minLength(1, ...args));
4931
+ return this.check(/* @__PURE__ */ _minLength(1, ...args));
5033
4932
  },
5034
4933
  lowercase(params) {
5035
- return this.check(_lowercase(params));
4934
+ return this.check(/* @__PURE__ */ _lowercase(params));
5036
4935
  },
5037
4936
  uppercase(params) {
5038
- return this.check(_uppercase(params));
4937
+ return this.check(/* @__PURE__ */ _uppercase(params));
5039
4938
  },
5040
4939
  trim() {
5041
- return this.check(_trim());
4940
+ return this.check(/* @__PURE__ */ _trim());
5042
4941
  },
5043
4942
  normalize(...args) {
5044
- return this.check(_normalize(...args));
4943
+ return this.check(/* @__PURE__ */ _normalize(...args));
5045
4944
  },
5046
4945
  toLowerCase() {
5047
- return this.check(_toLowerCase());
4946
+ return this.check(/* @__PURE__ */ _toLowerCase());
5048
4947
  },
5049
4948
  toUpperCase() {
5050
- return this.check(_toUpperCase());
4949
+ return this.check(/* @__PURE__ */ _toUpperCase());
5051
4950
  },
5052
4951
  slugify() {
5053
- return this.check(_slugify());
4952
+ return this.check(/* @__PURE__ */ _slugify());
5054
4953
  }
5055
4954
  }));
5056
- const ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
4955
+ const ZodString = /*@__PURE__*/ $constructor("ZodString", (inst, def) => {
5057
4956
  $ZodString.init(inst, def);
5058
4957
  _ZodString.init(inst, def);
5059
4958
  }, {
5060
4959
  email(params) {
5061
- return this.check(_email(ZodEmail, params));
4960
+ return this.check(/* @__PURE__ */ _email(ZodEmail, params));
5062
4961
  },
5063
4962
  url(params) {
5064
- return this.check(_url(ZodURL, params));
4963
+ return this.check(/* @__PURE__ */ _url(ZodURL, params));
5065
4964
  },
5066
4965
  jwt(params) {
5067
- return this.check(_jwt(ZodJWT, params));
4966
+ return this.check(/* @__PURE__ */ _jwt(ZodJWT, params));
5068
4967
  },
5069
4968
  emoji(params) {
5070
- return this.check(_emoji(ZodEmoji, params));
4969
+ return this.check(/* @__PURE__ */ _emoji(ZodEmoji, params));
5071
4970
  },
5072
4971
  guid(params) {
5073
- return this.check(_guid(ZodGUID, params));
4972
+ return this.check(/* @__PURE__ */ _guid(ZodGUID, params));
5074
4973
  },
5075
4974
  uuid(params) {
5076
- return this.check(_uuid(ZodUUID, params));
4975
+ return this.check(/* @__PURE__ */ _uuid(ZodUUID, params));
5077
4976
  },
5078
4977
  uuidv4(params) {
5079
- return this.check(_uuidv4(ZodUUID, params));
4978
+ return this.check(/* @__PURE__ */ _uuidv4(ZodUUID, params));
5080
4979
  },
5081
4980
  uuidv6(params) {
5082
- return this.check(_uuidv6(ZodUUID, params));
4981
+ return this.check(/* @__PURE__ */ _uuidv6(ZodUUID, params));
5083
4982
  },
5084
4983
  uuidv7(params) {
5085
- return this.check(_uuidv7(ZodUUID, params));
4984
+ return this.check(/* @__PURE__ */ _uuidv7(ZodUUID, params));
5086
4985
  },
5087
4986
  nanoid(params) {
5088
- return this.check(_nanoid(ZodNanoID, params));
4987
+ return this.check(/* @__PURE__ */ _nanoid(ZodNanoID, params));
5089
4988
  },
5090
4989
  cuid(params) {
5091
- return this.check(_cuid(ZodCUID, params));
4990
+ return this.check(/* @__PURE__ */ _cuid(ZodCUID, params));
5092
4991
  },
5093
4992
  cuid2(params) {
5094
- return this.check(_cuid2(ZodCUID2, params));
4993
+ return this.check(/* @__PURE__ */ _cuid2(ZodCUID2, params));
5095
4994
  },
5096
4995
  ulid(params) {
5097
- return this.check(_ulid(ZodULID, params));
4996
+ return this.check(/* @__PURE__ */ _ulid(ZodULID, params));
5098
4997
  },
5099
4998
  base64(params) {
5100
- return this.check(_base64(ZodBase64, params));
4999
+ return this.check(/* @__PURE__ */ _base64(ZodBase64, params));
5101
5000
  },
5102
5001
  base64url(params) {
5103
- return this.check(_base64url(ZodBase64URL, params));
5002
+ return this.check(/* @__PURE__ */ _base64url(ZodBase64URL, params));
5104
5003
  },
5105
5004
  xid(params) {
5106
- return this.check(_xid(ZodXID, params));
5005
+ return this.check(/* @__PURE__ */ _xid(ZodXID, params));
5107
5006
  },
5108
5007
  ksuid(params) {
5109
- return this.check(_ksuid(ZodKSUID, params));
5008
+ return this.check(/* @__PURE__ */ _ksuid(ZodKSUID, params));
5110
5009
  },
5111
5010
  ipv4(params) {
5112
- return this.check(_ipv4(ZodIPv4, params));
5011
+ return this.check(/* @__PURE__ */ _ipv4(ZodIPv4, params));
5113
5012
  },
5114
5013
  ipv6(params) {
5115
- return this.check(_ipv6(ZodIPv6, params));
5014
+ return this.check(/* @__PURE__ */ _ipv6(ZodIPv6, params));
5116
5015
  },
5117
5016
  cidrv4(params) {
5118
- return this.check(_cidrv4(ZodCIDRv4, params));
5017
+ return this.check(/* @__PURE__ */ _cidrv4(ZodCIDRv4, params));
5119
5018
  },
5120
5019
  cidrv6(params) {
5121
- return this.check(_cidrv6(ZodCIDRv6, params));
5020
+ return this.check(/* @__PURE__ */ _cidrv6(ZodCIDRv6, params));
5122
5021
  },
5123
5022
  e164(params) {
5124
- return this.check(_e164(ZodE164, params));
5023
+ return this.check(/* @__PURE__ */ _e164(ZodE164, params));
5125
5024
  },
5126
5025
  datetime(params) {
5127
- return this.check(_isoDateTime(ZodISODateTime, params));
5026
+ return this.check(/* @__PURE__ */ _isoDateTime(ZodISODateTime, params));
5128
5027
  },
5129
5028
  date(params) {
5130
- return this.check(_isoDate(ZodISODate, params));
5029
+ return this.check(/* @__PURE__ */ _isoDate(ZodISODate, params));
5131
5030
  },
5132
5031
  time(params) {
5133
- return this.check(_isoTime(ZodISOTime, params));
5032
+ return this.check(/* @__PURE__ */ _isoTime(ZodISOTime, params));
5134
5033
  },
5135
5034
  duration(params) {
5136
- return this.check(_isoDuration(ZodISODuration, params));
5035
+ return this.check(/* @__PURE__ */ _isoDuration(ZodISODuration, params));
5137
5036
  }
5138
5037
  });
5139
5038
  function string(params) {
5140
- return _string(ZodString, params);
5039
+ return /* @__PURE__ */ _string(ZodString, params);
5141
5040
  }
5142
- const ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => {
5041
+ const ZodStringFormat = /*@__PURE__*/ $constructor("ZodStringFormat", (inst, def) => {
5143
5042
  $ZodStringFormat.init(inst, def);
5144
5043
  _ZodString.init(inst, def);
5145
5044
  });
5146
- const ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
5045
+ const ZodISODateTime = /*@__PURE__*/ $constructor("ZodISODateTime", (inst, def) => {
5147
5046
  $ZodISODateTime.init(inst, def);
5148
5047
  ZodStringFormat.init(inst, def);
5149
5048
  });
5150
- const ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => {
5049
+ const ZodISODate = /*@__PURE__*/ $constructor("ZodISODate", (inst, def) => {
5151
5050
  $ZodISODate.init(inst, def);
5152
5051
  ZodStringFormat.init(inst, def);
5153
5052
  });
5154
- const ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => {
5053
+ const ZodISOTime = /*@__PURE__*/ $constructor("ZodISOTime", (inst, def) => {
5155
5054
  $ZodISOTime.init(inst, def);
5156
5055
  ZodStringFormat.init(inst, def);
5157
5056
  });
5158
- const ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => {
5057
+ const ZodISODuration = /*@__PURE__*/ $constructor("ZodISODuration", (inst, def) => {
5159
5058
  $ZodISODuration.init(inst, def);
5160
5059
  ZodStringFormat.init(inst, def);
5161
5060
  });
5162
- const ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => {
5061
+ const ZodEmail = /*@__PURE__*/ $constructor("ZodEmail", (inst, def) => {
5163
5062
  $ZodEmail.init(inst, def);
5164
5063
  ZodStringFormat.init(inst, def);
5165
5064
  });
5166
- const ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => {
5065
+ const ZodGUID = /*@__PURE__*/ $constructor("ZodGUID", (inst, def) => {
5167
5066
  $ZodGUID.init(inst, def);
5168
5067
  ZodStringFormat.init(inst, def);
5169
5068
  });
5170
- const ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => {
5069
+ const ZodUUID = /*@__PURE__*/ $constructor("ZodUUID", (inst, def) => {
5171
5070
  $ZodUUID.init(inst, def);
5172
5071
  ZodStringFormat.init(inst, def);
5173
5072
  });
5174
- const ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => {
5073
+ const ZodURL = /*@__PURE__*/ $constructor("ZodURL", (inst, def) => {
5175
5074
  $ZodURL.init(inst, def);
5176
5075
  ZodStringFormat.init(inst, def);
5177
5076
  });
5178
5077
  function url(params) {
5179
- return _url(ZodURL, params);
5078
+ return /* @__PURE__ */ _url(ZodURL, params);
5180
5079
  }
5181
- const ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
5080
+ const ZodEmoji = /*@__PURE__*/ $constructor("ZodEmoji", (inst, def) => {
5182
5081
  $ZodEmoji.init(inst, def);
5183
5082
  ZodStringFormat.init(inst, def);
5184
5083
  });
5185
- const ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
5084
+ const ZodNanoID = /*@__PURE__*/ $constructor("ZodNanoID", (inst, def) => {
5186
5085
  $ZodNanoID.init(inst, def);
5187
5086
  ZodStringFormat.init(inst, def);
5188
5087
  });
@@ -5191,64 +5090,64 @@ const ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
5191
5090
  * (timestamps embedded in the id). Use {@link ZodCUID2} instead.
5192
5091
  * See https://github.com/paralleldrive/cuid.
5193
5092
  */
5194
- const ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => {
5093
+ const ZodCUID = /*@__PURE__*/ $constructor("ZodCUID", (inst, def) => {
5195
5094
  $ZodCUID.init(inst, def);
5196
5095
  ZodStringFormat.init(inst, def);
5197
5096
  });
5198
- const ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => {
5097
+ const ZodCUID2 = /*@__PURE__*/ $constructor("ZodCUID2", (inst, def) => {
5199
5098
  $ZodCUID2.init(inst, def);
5200
5099
  ZodStringFormat.init(inst, def);
5201
5100
  });
5202
- const ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => {
5101
+ const ZodULID = /*@__PURE__*/ $constructor("ZodULID", (inst, def) => {
5203
5102
  $ZodULID.init(inst, def);
5204
5103
  ZodStringFormat.init(inst, def);
5205
5104
  });
5206
- const ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => {
5105
+ const ZodXID = /*@__PURE__*/ $constructor("ZodXID", (inst, def) => {
5207
5106
  $ZodXID.init(inst, def);
5208
5107
  ZodStringFormat.init(inst, def);
5209
5108
  });
5210
- const ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => {
5109
+ const ZodKSUID = /*@__PURE__*/ $constructor("ZodKSUID", (inst, def) => {
5211
5110
  $ZodKSUID.init(inst, def);
5212
5111
  ZodStringFormat.init(inst, def);
5213
5112
  });
5214
- const ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => {
5113
+ const ZodIPv4 = /*@__PURE__*/ $constructor("ZodIPv4", (inst, def) => {
5215
5114
  $ZodIPv4.init(inst, def);
5216
5115
  ZodStringFormat.init(inst, def);
5217
5116
  });
5218
- const ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
5117
+ const ZodIPv6 = /*@__PURE__*/ $constructor("ZodIPv6", (inst, def) => {
5219
5118
  $ZodIPv6.init(inst, def);
5220
5119
  ZodStringFormat.init(inst, def);
5221
5120
  });
5222
- const ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => {
5121
+ const ZodCIDRv4 = /*@__PURE__*/ $constructor("ZodCIDRv4", (inst, def) => {
5223
5122
  $ZodCIDRv4.init(inst, def);
5224
5123
  ZodStringFormat.init(inst, def);
5225
5124
  });
5226
- const ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => {
5125
+ const ZodCIDRv6 = /*@__PURE__*/ $constructor("ZodCIDRv6", (inst, def) => {
5227
5126
  $ZodCIDRv6.init(inst, def);
5228
5127
  ZodStringFormat.init(inst, def);
5229
5128
  });
5230
- const ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => {
5129
+ const ZodBase64 = /*@__PURE__*/ $constructor("ZodBase64", (inst, def) => {
5231
5130
  $ZodBase64.init(inst, def);
5232
5131
  ZodStringFormat.init(inst, def);
5233
5132
  });
5234
- const ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => {
5133
+ const ZodBase64URL = /*@__PURE__*/ $constructor("ZodBase64URL", (inst, def) => {
5235
5134
  $ZodBase64URL.init(inst, def);
5236
5135
  ZodStringFormat.init(inst, def);
5237
5136
  });
5238
- const ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => {
5137
+ const ZodE164 = /*@__PURE__*/ $constructor("ZodE164", (inst, def) => {
5239
5138
  $ZodE164.init(inst, def);
5240
5139
  ZodStringFormat.init(inst, def);
5241
5140
  });
5242
- const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
5141
+ const ZodJWT = /*@__PURE__*/ $constructor("ZodJWT", (inst, def) => {
5243
5142
  $ZodJWT.init(inst, def);
5244
5143
  ZodStringFormat.init(inst, def);
5245
5144
  });
5246
- const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
5145
+ const ZodNumber = /*@__PURE__*/ $constructor("ZodNumber", (inst, def) => {
5247
5146
  $ZodNumber.init(inst, def);
5248
5147
  ZodType.init(inst, def);
5249
5148
  inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
5250
5149
  inst.isFinite = true;
5251
- }, /* @__PURE__ */ derived({
5150
+ }, /*@__PURE__*/ derived({
5252
5151
  minValue: (inst) => {
5253
5152
  const { minimum, exclusiveMinimum } = aggregateChecks(inst);
5254
5153
  return Math.max(minimum ?? Number.NEGATIVE_INFINITY, exclusiveMinimum ?? Number.NEGATIVE_INFINITY);
@@ -5264,22 +5163,22 @@ const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
5264
5163
  format: (inst) => aggregateChecks(inst).format ?? null
5265
5164
  }, {
5266
5165
  gt(value, params) {
5267
- return this.check(_gt(value, params));
5166
+ return this.check(/* @__PURE__ */ _gt(value, params));
5268
5167
  },
5269
5168
  gte(value, params) {
5270
- return this.check(_gte(value, params));
5169
+ return this.check(/* @__PURE__ */ _gte(value, params));
5271
5170
  },
5272
5171
  min(value, params) {
5273
- return this.check(_gte(value, params));
5172
+ return this.check(/* @__PURE__ */ _gte(value, params));
5274
5173
  },
5275
5174
  lt(value, params) {
5276
- return this.check(_lt(value, params));
5175
+ return this.check(/* @__PURE__ */ _lt(value, params));
5277
5176
  },
5278
5177
  lte(value, params) {
5279
- return this.check(_lte(value, params));
5178
+ return this.check(/* @__PURE__ */ _lte(value, params));
5280
5179
  },
5281
5180
  max(value, params) {
5282
- return this.check(_lte(value, params));
5181
+ return this.check(/* @__PURE__ */ _lte(value, params));
5283
5182
  },
5284
5183
  int(params) {
5285
5184
  return this.check(int(params));
@@ -5288,62 +5187,62 @@ const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
5288
5187
  return this.check(int(params));
5289
5188
  },
5290
5189
  positive(params) {
5291
- return this.check(_gt(0, params));
5190
+ return this.check(/* @__PURE__ */ _gt(0, params));
5292
5191
  },
5293
5192
  nonnegative(params) {
5294
- return this.check(_gte(0, params));
5193
+ return this.check(/* @__PURE__ */ _gte(0, params));
5295
5194
  },
5296
5195
  negative(params) {
5297
- return this.check(_lt(0, params));
5196
+ return this.check(/* @__PURE__ */ _lt(0, params));
5298
5197
  },
5299
5198
  nonpositive(params) {
5300
- return this.check(_lte(0, params));
5199
+ return this.check(/* @__PURE__ */ _lte(0, params));
5301
5200
  },
5302
5201
  multipleOf(value, params) {
5303
- return this.check(_multipleOf(value, params));
5202
+ return this.check(/* @__PURE__ */ _multipleOf(value, params));
5304
5203
  },
5305
5204
  step(value, params) {
5306
- return this.check(_multipleOf(value, params));
5205
+ return this.check(/* @__PURE__ */ _multipleOf(value, params));
5307
5206
  },
5308
5207
  finite() {
5309
5208
  return this;
5310
5209
  }
5311
5210
  }));
5312
5211
  function number(params) {
5313
- return _number(ZodNumber, params);
5212
+ return /* @__PURE__ */ _number(ZodNumber, params);
5314
5213
  }
5315
- const ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => {
5214
+ const ZodNumberFormat = /*@__PURE__*/ $constructor("ZodNumberFormat", (inst, def) => {
5316
5215
  $ZodNumberFormat.init(inst, def);
5317
5216
  ZodNumber.init(inst, def);
5318
5217
  });
5319
5218
  function int(params) {
5320
- return _int(ZodNumberFormat, params);
5219
+ return /* @__PURE__ */ _int(ZodNumberFormat, params);
5321
5220
  }
5322
- const ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
5221
+ const ZodBoolean = /*@__PURE__*/ $constructor("ZodBoolean", (inst, def) => {
5323
5222
  $ZodBoolean.init(inst, def);
5324
5223
  ZodType.init(inst, def);
5325
5224
  inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
5326
5225
  });
5327
5226
  function boolean(params) {
5328
- return _boolean(ZodBoolean, params);
5227
+ return /* @__PURE__ */ _boolean(ZodBoolean, params);
5329
5228
  }
5330
- const ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
5229
+ const ZodUnknown = /*@__PURE__*/ $constructor("ZodUnknown", (inst, def) => {
5331
5230
  $ZodUnknown.init(inst, def);
5332
5231
  ZodType.init(inst, def);
5333
- inst._zod.processJSONSchema = (ctx, json, params) => unknownProcessor(inst, ctx, json, params);
5232
+ inst._zod.processJSONSchema = (ctx, json, params) => void 0;
5334
5233
  });
5335
5234
  function unknown() {
5336
- return _unknown(ZodUnknown);
5235
+ return /* @__PURE__ */ _unknown(ZodUnknown);
5337
5236
  }
5338
- const ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
5237
+ const ZodNever = /*@__PURE__*/ $constructor("ZodNever", (inst, def) => {
5339
5238
  $ZodNever.init(inst, def);
5340
5239
  ZodType.init(inst, def);
5341
5240
  inst._zod.processJSONSchema = (ctx, json, params) => neverProcessor(inst, ctx, json, params);
5342
5241
  });
5343
5242
  function never(params) {
5344
- return _never(ZodNever, params);
5243
+ return /* @__PURE__ */ _never(ZodNever, params);
5345
5244
  }
5346
- const ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
5245
+ const ZodArray = /*@__PURE__*/ $constructor("ZodArray", (inst, def) => {
5347
5246
  _ensureDefaultMemoizer();
5348
5247
  $ZodArray.init(inst, def);
5349
5248
  ZodType.init(inst, def);
@@ -5351,25 +5250,25 @@ const ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
5351
5250
  inst.element = def.element;
5352
5251
  }, {
5353
5252
  min(n, params) {
5354
- return this.check(_minLength(n, params));
5253
+ return this.check(/* @__PURE__ */ _minLength(n, params));
5355
5254
  },
5356
5255
  nonempty(params) {
5357
- return this.check(_minLength(1, params));
5256
+ return this.check(/* @__PURE__ */ _minLength(1, params));
5358
5257
  },
5359
5258
  max(n, params) {
5360
- return this.check(_maxLength(n, params));
5259
+ return this.check(/* @__PURE__ */ _maxLength(n, params));
5361
5260
  },
5362
5261
  length(n, params) {
5363
- return this.check(_length(n, params));
5262
+ return this.check(/* @__PURE__ */ _length(n, params));
5364
5263
  },
5365
5264
  unwrap() {
5366
5265
  return this.element;
5367
5266
  }
5368
5267
  });
5369
5268
  function array(element, params) {
5370
- return _array(ZodArray, element, params);
5269
+ return /* @__PURE__ */ _array(ZodArray, element, params);
5371
5270
  }
5372
- const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
5271
+ const ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
5373
5272
  _ensureDefaultMemoizer();
5374
5273
  $ZodObjectJIT.init(inst, def);
5375
5274
  ZodType.init(inst, def);
@@ -5427,7 +5326,7 @@ function object(shape, params) {
5427
5326
  };
5428
5327
  return new ZodObject(def);
5429
5328
  }
5430
- const ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
5329
+ const ZodUnion = /*@__PURE__*/ $constructor("ZodUnion", (inst, def) => {
5431
5330
  $ZodUnion.init(inst, def);
5432
5331
  ZodType.init(inst, def);
5433
5332
  inst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);
@@ -5440,7 +5339,7 @@ function union(options, params) {
5440
5339
  ...normalizeParams(params)
5441
5340
  });
5442
5341
  }
5443
- const ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => {
5342
+ const ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("ZodDiscriminatedUnion", (inst, def) => {
5444
5343
  ZodUnion.init(inst, def);
5445
5344
  $ZodDiscriminatedUnion.init(inst, def);
5446
5345
  });
@@ -5452,7 +5351,7 @@ function discriminatedUnion(discriminator, options, params) {
5452
5351
  ...normalizeParams(params)
5453
5352
  });
5454
5353
  }
5455
- const ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
5354
+ const ZodIntersection = /*@__PURE__*/ $constructor("ZodIntersection", (inst, def) => {
5456
5355
  $ZodIntersection.init(inst, def);
5457
5356
  ZodType.init(inst, def);
5458
5357
  inst._zod.processJSONSchema = (ctx, json, params) => intersectionProcessor(inst, ctx, json, params);
@@ -5464,7 +5363,7 @@ function intersection(left, right) {
5464
5363
  right
5465
5364
  });
5466
5365
  }
5467
- const ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
5366
+ const ZodRecord = /*@__PURE__*/ $constructor("ZodRecord", (inst, def) => {
5468
5367
  _ensureDefaultMemoizer();
5469
5368
  $ZodRecord.init(inst, def);
5470
5369
  ZodType.init(inst, def);
@@ -5486,7 +5385,7 @@ function record(keyType, valueType, params) {
5486
5385
  ...normalizeParams(params)
5487
5386
  });
5488
5387
  }
5489
- const ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
5388
+ const ZodEnum = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
5490
5389
  $ZodEnum.init(inst, def);
5491
5390
  ZodType.init(inst, def);
5492
5391
  inst._zod.processJSONSchema = (ctx, json, params) => enumProcessor(inst, ctx, json, params);
@@ -5524,7 +5423,7 @@ function _enum(values, params) {
5524
5423
  ...normalizeParams(params)
5525
5424
  });
5526
5425
  }
5527
- const ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
5426
+ const ZodLiteral = /*@__PURE__*/ $constructor("ZodLiteral", (inst, def) => {
5528
5427
  $ZodLiteral.init(inst, def);
5529
5428
  ZodType.init(inst, def);
5530
5429
  inst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);
@@ -5541,7 +5440,7 @@ function literal(value, params) {
5541
5440
  ...normalizeParams(params)
5542
5441
  });
5543
5442
  }
5544
- const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
5443
+ const ZodTransform = /*@__PURE__*/ $constructor("ZodTransform", (inst, def) => {
5545
5444
  _ensureDefaultMemoizer();
5546
5445
  $ZodTransform.init(inst, def);
5547
5446
  ZodType.init(inst, def);
@@ -5560,8 +5459,8 @@ const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) =>
5560
5459
  }
5561
5460
  };
5562
5461
  const output = def.transform(payload.value, payload);
5563
- if (output instanceof Promise) return output.then((output$1) => {
5564
- payload.value = output$1;
5462
+ if (output instanceof Promise) return output.then((output) => {
5463
+ payload.value = output;
5565
5464
  return payload;
5566
5465
  });
5567
5466
  payload.value = output;
@@ -5574,7 +5473,7 @@ function transform(fn) {
5574
5473
  transform: fn
5575
5474
  });
5576
5475
  }
5577
- const ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
5476
+ const ZodOptional = /*@__PURE__*/ $constructor("ZodOptional", (inst, def) => {
5578
5477
  $ZodOptional.init(inst, def);
5579
5478
  ZodType.init(inst, def);
5580
5479
  inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
@@ -5586,7 +5485,7 @@ function optional(innerType) {
5586
5485
  innerType
5587
5486
  });
5588
5487
  }
5589
- const ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => {
5488
+ const ZodExactOptional = /*@__PURE__*/ $constructor("ZodExactOptional", (inst, def) => {
5590
5489
  $ZodExactOptional.init(inst, def);
5591
5490
  ZodType.init(inst, def);
5592
5491
  inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
@@ -5598,7 +5497,7 @@ function exactOptional(innerType) {
5598
5497
  innerType
5599
5498
  });
5600
5499
  }
5601
- const ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
5500
+ const ZodNullable = /*@__PURE__*/ $constructor("ZodNullable", (inst, def) => {
5602
5501
  $ZodNullable.init(inst, def);
5603
5502
  ZodType.init(inst, def);
5604
5503
  inst._zod.processJSONSchema = (ctx, json, params) => nullableProcessor(inst, ctx, json, params);
@@ -5610,7 +5509,7 @@ function nullable(innerType) {
5610
5509
  innerType
5611
5510
  });
5612
5511
  }
5613
- const ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
5512
+ const ZodDefault = /*@__PURE__*/ $constructor("ZodDefault", (inst, def) => {
5614
5513
  $ZodDefault.init(inst, def);
5615
5514
  ZodType.init(inst, def);
5616
5515
  inst._zod.processJSONSchema = (ctx, json, params) => defaultProcessor(inst, ctx, json, params);
@@ -5626,7 +5525,7 @@ function _default(innerType, defaultValue) {
5626
5525
  }
5627
5526
  });
5628
5527
  }
5629
- const ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
5528
+ const ZodPrefault = /*@__PURE__*/ $constructor("ZodPrefault", (inst, def) => {
5630
5529
  $ZodPrefault.init(inst, def);
5631
5530
  ZodType.init(inst, def);
5632
5531
  inst._zod.processJSONSchema = (ctx, json, params) => prefaultProcessor(inst, ctx, json, params);
@@ -5641,7 +5540,7 @@ function prefault(innerType, defaultValue) {
5641
5540
  }
5642
5541
  });
5643
5542
  }
5644
- const ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
5543
+ const ZodNonOptional = /*@__PURE__*/ $constructor("ZodNonOptional", (inst, def) => {
5645
5544
  $ZodNonOptional.init(inst, def);
5646
5545
  ZodType.init(inst, def);
5647
5546
  inst._zod.processJSONSchema = (ctx, json, params) => nonoptionalProcessor(inst, ctx, json, params);
@@ -5654,7 +5553,7 @@ function nonoptional(innerType, params) {
5654
5553
  ...normalizeParams(params)
5655
5554
  });
5656
5555
  }
5657
- const ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
5556
+ const ZodCatch = /*@__PURE__*/ $constructor("ZodCatch", (inst, def) => {
5658
5557
  $ZodCatch.init(inst, def);
5659
5558
  ZodType.init(inst, def);
5660
5559
  inst._zod.processJSONSchema = (ctx, json, params) => catchProcessor(inst, ctx, json, params);
@@ -5668,7 +5567,7 @@ function _catch(innerType, catchValue) {
5668
5567
  catchValue: typeof catchValue === "function" ? catchValue : constantCatch(catchValue)
5669
5568
  });
5670
5569
  }
5671
- const ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
5570
+ const ZodPipe = /*@__PURE__*/ $constructor("ZodPipe", (inst, def) => {
5672
5571
  $ZodPipe.init(inst, def);
5673
5572
  ZodType.init(inst, def);
5674
5573
  inst._zod.processJSONSchema = (ctx, json, params) => pipeProcessor(inst, ctx, json, params);
@@ -5682,7 +5581,7 @@ function pipe(in_, out) {
5682
5581
  out
5683
5582
  });
5684
5583
  }
5685
- const ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
5584
+ const ZodReadonly = /*@__PURE__*/ $constructor("ZodReadonly", (inst, def) => {
5686
5585
  $ZodReadonly.init(inst, def);
5687
5586
  ZodType.init(inst, def);
5688
5587
  inst._zod.processJSONSchema = (ctx, json, params) => readonlyProcessor(inst, ctx, json, params);
@@ -5694,23 +5593,20 @@ function readonly(innerType) {
5694
5593
  innerType
5695
5594
  });
5696
5595
  }
5697
- const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
5596
+ const ZodCustom = /*@__PURE__*/ $constructor("ZodCustom", (inst, def) => {
5698
5597
  $ZodCustom.init(inst, def);
5699
5598
  ZodType.init(inst, def);
5700
5599
  inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
5701
5600
  });
5702
5601
  function custom(fn, _params) {
5703
- return _custom(ZodCustom, fn ?? (() => true), _params);
5602
+ return /* @__PURE__ */ _custom(ZodCustom, fn ?? (() => true), _params);
5704
5603
  }
5705
5604
  function refine(fn, _params = {}) {
5706
- return _refine(ZodCustom, fn, _params);
5605
+ return /* @__PURE__ */ _refine(ZodCustom, fn, _params);
5707
5606
  }
5708
5607
  function superRefine(fn, params) {
5709
- return _superRefine(fn, params);
5608
+ return /* @__PURE__ */ _superRefine(fn, params);
5710
5609
  }
5711
- const describe = describe$1;
5712
- const meta = meta$1;
5713
-
5714
5610
  //#endregion
5715
5611
  //#region src/workspace/stages.ts
5716
5612
  /**
@@ -5724,7 +5620,7 @@ const STAGE_NAME = /^[a-z][a-z0-9-]*$/;
5724
5620
  function nameProblems(name) {
5725
5621
  const problems = [];
5726
5622
  if (!STAGE_NAME.test(name)) problems.push(`stage "${name}" must be lowercase letters, digits and hyphens, starting with a letter`);
5727
- if (name === TEST_STAGE) problems.push(`stage "${TEST_STAGE}" is reserved for gkm test`);
5623
+ if (name === "test") problems.push(`stage "${TEST_STAGE}" is reserved for gkm test`);
5728
5624
  return problems;
5729
5625
  }
5730
5626
  /** Everything wrong with a list of deployed stages on its own. */
@@ -5758,6 +5654,7 @@ function assertDeployedStage(stages, stage) {
5758
5654
  }
5759
5655
  /** A stages block — in gkm.config.ts or from `gkm init`'s flags — that breaks a rule. */
5760
5656
  var InvalidStages = class extends Error {
5657
+ problems;
5761
5658
  constructor(problems) {
5762
5659
  super(`Invalid stages:\n ${problems.join("\n ")}`);
5763
5660
  this.problems = problems;
@@ -5769,6 +5666,8 @@ var InvalidStages = class extends Error {
5769
5666
  * provisioned, so a typo does not become a second environment.
5770
5667
  */
5771
5668
  var UndeclaredStage = class extends Error {
5669
+ stage;
5670
+ deployed;
5772
5671
  constructor(stage, deployed) {
5773
5672
  super(`"${stage}" is not a deployed stage. gkm.config.ts deploys to: ${deployed.join(", ") || "nothing yet"}.`);
5774
5673
  this.stage = stage;
@@ -5776,7 +5675,6 @@ var UndeclaredStage = class extends Error {
5776
5675
  this.name = "UndeclaredStage";
5777
5676
  }
5778
5677
  };
5779
-
5780
5678
  //#endregion
5781
5679
  //#region src/workspace/schema.ts
5782
5680
  /**
@@ -5825,34 +5723,22 @@ const OpenApiConfigSchema = object({
5825
5723
  */
5826
5724
  const HooksConfigSchema = object({ server: string().optional() });
5827
5725
  /**
5828
- * Backend framework schema for non-gkm apps.
5829
- */
5830
- const BackendFrameworkSchema = _enum([
5831
- "hono",
5832
- "better-auth",
5833
- "express",
5834
- "fastify"
5835
- ]);
5836
- /**
5837
- * Frontend framework schema.
5838
- */
5839
- const FrontendFrameworkSchema = _enum([
5840
- "nextjs",
5841
- "remix",
5842
- "vite",
5843
- "tanstack-start"
5844
- ]);
5845
- /**
5846
- * Mobile framework schema.
5847
- */
5848
- const MobileFrameworkSchema = _enum(["expo"]);
5849
- /**
5850
5726
  * Combined framework schema (backend, frontend, or mobile).
5851
5727
  */
5852
5728
  const FrameworkSchema = union([
5853
- BackendFrameworkSchema,
5854
- FrontendFrameworkSchema,
5855
- MobileFrameworkSchema
5729
+ _enum([
5730
+ "hono",
5731
+ "better-auth",
5732
+ "express",
5733
+ "fastify"
5734
+ ]),
5735
+ _enum([
5736
+ "nextjs",
5737
+ "remix",
5738
+ "vite",
5739
+ "tanstack-start"
5740
+ ]),
5741
+ _enum(["expo"])
5856
5742
  ]);
5857
5743
  /** Frontend framework values, kept in sync with FrontendFrameworkSchema. */
5858
5744
  const FRONTEND_FRAMEWORKS = [
@@ -5897,76 +5783,21 @@ function isPhase2DeployTarget(target) {
5897
5783
  * Get error message for unsupported deploy targets.
5898
5784
  */
5899
5785
  function getDeployTargetError(target, appName) {
5900
- if (isPhase2DeployTarget(target)) {
5901
- const context = appName ? ` for app "${appName}"` : "";
5902
- return `Deploy target "${target}"${context} is coming in Phase 2. Currently only "dokploy" is supported.`;
5903
- }
5786
+ if (isPhase2DeployTarget(target)) return `Deploy target "${target}"${appName ? ` for app "${appName}"` : ""} is coming in Phase 2. Currently only "dokploy" is supported.`;
5904
5787
  return `Unknown deploy target: ${target}. Supported: dokploy. Coming in Phase 2: vercel, cloudflare.`;
5905
5788
  }
5906
5789
  /**
5907
- * Service image configuration schema.
5908
- */
5909
- const ServiceImageConfigSchema = object({
5910
- version: string().optional(),
5911
- image: string().optional()
5912
- });
5913
- /**
5914
- * Mail service configuration schema.
5915
- */
5916
- const MailServiceConfigSchema = ServiceImageConfigSchema.extend({ smtp: object({
5917
- host: string(),
5918
- port: number(),
5919
- user: string().optional(),
5920
- pass: string().optional()
5921
- }).optional() });
5922
- /**
5923
- * Services configuration schema.
5924
- */
5925
- const ServicesConfigSchema = object({
5926
- db: union([boolean(), ServiceImageConfigSchema]).optional(),
5927
- cache: union([
5928
- boolean(),
5929
- ServiceImageConfigSchema,
5930
- _enum([
5931
- "upstash",
5932
- "elasticache",
5933
- "db"
5934
- ])
5935
- ]).optional(),
5936
- mail: union([
5937
- boolean(),
5938
- MailServiceConfigSchema,
5939
- _enum([
5940
- "resend",
5941
- "ses",
5942
- "smtp"
5943
- ])
5944
- ]).optional(),
5945
- storage: union([
5946
- boolean(),
5947
- ServiceImageConfigSchema,
5948
- _enum([
5949
- "minio",
5950
- "s3",
5951
- "r2"
5952
- ])
5953
- ]).optional(),
5954
- events: _enum([
5955
- "pgboss",
5956
- "sns",
5957
- "rabbitmq"
5958
- ]).optional(),
5959
- trustLocalCa: boolean().optional()
5960
- });
5961
- /**
5962
5790
  * Dokploy workspace configuration schema.
5963
5791
  * Supports either a single endpoint or per-stage endpoints.
5964
5792
  */
5965
5793
  const DokployWorkspaceConfigSchema = object({
5794
+ /** Single endpoint for all stages */
5966
5795
  endpoint: url("Dokploy endpoint must be a valid URL").optional(),
5796
+ /** Per-stage endpoints (stage name -> endpoint URL) */
5967
5797
  endpoints: record(string(), url("Endpoint must be a valid URL")).optional(),
5968
5798
  registry: string().optional(),
5969
5799
  registryId: string().optional(),
5800
+ /** Per-stage domain configuration (stage name -> base domain) */
5970
5801
  domains: record(string(), string()).optional()
5971
5802
  }).refine((data) => data.endpoint || data.endpoints, { message: "Either endpoint or endpoints must be provided" });
5972
5803
  /**
@@ -6014,30 +5845,31 @@ const DnsRecordTypeSchema = _enum([
6014
5845
  "SRV",
6015
5846
  "CAA"
6016
5847
  ]);
6017
- /**
6018
- * A DNS record as returned by the provider.
6019
- */
6020
- const DnsRecordSchema = object({
5848
+ object({
5849
+ /** Subdomain name (e.g., 'api' for api.example.com, '@' for root) */
6021
5850
  name: string(),
5851
+ /** Record type */
6022
5852
  type: DnsRecordTypeSchema,
5853
+ /** TTL in seconds */
6023
5854
  ttl: number().int().positive(),
5855
+ /** Record values */
6024
5856
  values: array(string())
6025
5857
  });
6026
- /**
6027
- * A DNS record to create or update.
6028
- */
6029
- const UpsertDnsRecordSchema = object({
6030
- name: string(),
6031
- type: DnsRecordTypeSchema,
6032
- ttl: number().int().positive(),
6033
- value: string()
6034
- });
6035
- /**
6036
- * Result of an upsert operation.
6037
- */
6038
- const UpsertResultSchema = object({
6039
- record: UpsertDnsRecordSchema,
5858
+ object({
5859
+ /** The record that was upserted */
5860
+ record: object({
5861
+ /** Subdomain name (e.g., 'api' for api.example.com, '@' for root) */
5862
+ name: string(),
5863
+ /** Record type */
5864
+ type: DnsRecordTypeSchema,
5865
+ /** TTL in seconds */
5866
+ ttl: number().int().positive(),
5867
+ /** Record value (IP address, hostname, etc.) */
5868
+ value: string()
5869
+ }),
5870
+ /** Whether the record was created (true) or updated (false) */
6040
5871
  created: boolean(),
5872
+ /** Whether the record already existed with the same value */
6041
5873
  unchanged: boolean()
6042
5874
  });
6043
5875
  /**
@@ -6045,6 +5877,7 @@ const UpsertResultSchema = object({
6045
5877
  */
6046
5878
  const HostingerDnsProviderSchema = object({
6047
5879
  provider: literal("hostinger"),
5880
+ /** TTL in seconds (default: 300) */
6048
5881
  ttl: number().int().positive().optional()
6049
5882
  });
6050
5883
  /**
@@ -6052,9 +5885,13 @@ const HostingerDnsProviderSchema = object({
6052
5885
  */
6053
5886
  const Route53DnsProviderSchema = object({
6054
5887
  provider: literal("route53"),
5888
+ /** AWS region (optional - uses AWS_REGION env var if not provided) */
6055
5889
  region: AwsRegionSchema.optional(),
5890
+ /** AWS profile name (optional - uses default credential chain if not provided) */
6056
5891
  profile: string().optional(),
5892
+ /** Hosted zone ID (optional - auto-detected from domain if not provided) */
6057
5893
  hostedZoneId: string().optional(),
5894
+ /** TTL in seconds (default: 300) */
6058
5895
  ttl: number().int().positive().optional()
6059
5896
  });
6060
5897
  /**
@@ -6062,6 +5899,7 @@ const Route53DnsProviderSchema = object({
6062
5899
  */
6063
5900
  const CloudflareDnsProviderSchema = object({
6064
5901
  provider: literal("cloudflare"),
5902
+ /** TTL in seconds (default: 300) */
6065
5903
  ttl: number().int().positive().optional()
6066
5904
  });
6067
5905
  /**
@@ -6072,22 +5910,20 @@ const ManualDnsProviderSchema = object({ provider: literal("manual") });
6072
5910
  * Custom DNS provider config (user-provided implementation).
6073
5911
  */
6074
5912
  const CustomDnsProviderSchema = object({
5913
+ /** Custom DnsProvider implementation */
6075
5914
  provider: custom((val) => typeof val === "object" && val !== null && typeof val.name === "string" && typeof val.getRecords === "function" && typeof val.upsertRecords === "function", { message: "Custom DNS provider must implement name, getRecords(), and upsertRecords() methods" }),
5915
+ /** TTL in seconds (default: 300) */
6076
5916
  ttl: number().int().positive().optional()
6077
5917
  });
6078
5918
  /**
6079
- * Built-in DNS provider config (discriminated union).
5919
+ * Single DNS provider config (for one domain).
6080
5920
  */
6081
- const BuiltInDnsProviderSchema = discriminatedUnion("provider", [
5921
+ const DnsProviderSchema = union([discriminatedUnion("provider", [
6082
5922
  HostingerDnsProviderSchema,
6083
5923
  Route53DnsProviderSchema,
6084
5924
  CloudflareDnsProviderSchema,
6085
5925
  ManualDnsProviderSchema
6086
- ]);
6087
- /**
6088
- * Single DNS provider config (for one domain).
6089
- */
6090
- const DnsProviderSchema = union([BuiltInDnsProviderSchema, CustomDnsProviderSchema]);
5926
+ ]), CustomDnsProviderSchema]);
6091
5927
  /**
6092
5928
  * DNS configuration schema.
6093
5929
  *
@@ -6113,17 +5949,15 @@ const Route53DnsConfigSchema = Route53DnsProviderSchema.extend({ domain: string(
6113
5949
  const CloudflareDnsConfigSchema = CloudflareDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
6114
5950
  const ManualDnsConfigSchema = ManualDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
6115
5951
  const CustomDnsConfigSchema = CustomDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
6116
- const BuiltInDnsConfigSchema = discriminatedUnion("provider", [
5952
+ /**
5953
+ * Combined DNS config that supports both new multi-domain and legacy single-domain formats.
5954
+ */
5955
+ const DnsConfigWithLegacySchema = union([DnsConfigSchema, union([discriminatedUnion("provider", [
6117
5956
  HostingerDnsConfigSchema,
6118
5957
  Route53DnsConfigSchema,
6119
5958
  CloudflareDnsConfigSchema,
6120
5959
  ManualDnsConfigSchema
6121
- ]);
6122
- const LegacyDnsConfigSchema = union([BuiltInDnsConfigSchema, CustomDnsConfigSchema]);
6123
- /**
6124
- * Combined DNS config that supports both new multi-domain and legacy single-domain formats.
6125
- */
6126
- const DnsConfigWithLegacySchema = union([DnsConfigSchema, LegacyDnsConfigSchema]);
5960
+ ]), CustomDnsConfigSchema])]);
6127
5961
  /**
6128
5962
  * Backups configuration schema.
6129
5963
  *
@@ -6131,10 +5965,15 @@ const DnsConfigWithLegacySchema = union([DnsConfigSchema, LegacyDnsConfigSchema]
6131
5965
  * On first deploy, creates S3 bucket with unique name and IAM credentials.
6132
5966
  */
6133
5967
  const BackupsConfigSchema = object({
5968
+ /** Backup storage type (currently only 's3' supported) */
6134
5969
  type: literal("s3"),
5970
+ /** AWS profile name for creating bucket/IAM resources */
6135
5971
  profile: string().optional(),
5972
+ /** AWS region for the backup bucket */
6136
5973
  region: AwsRegionSchema,
5974
+ /** Cron schedule for backups (default: '0 2 * * *' = 2 AM daily) */
6137
5975
  schedule: string().optional(),
5976
+ /** Number of backups to retain (default: 30) */
6138
5977
  retention: number().optional()
6139
5978
  });
6140
5979
  /**
@@ -6187,17 +6026,17 @@ const LocalStateConfigSchema = object({ provider: literal("local") });
6187
6026
  */
6188
6027
  const SSMStateConfigSchema = object({
6189
6028
  provider: literal("ssm"),
6029
+ /** AWS region (required for SSM provider) */
6190
6030
  region: AwsRegionSchema,
6031
+ /** AWS profile name (optional - uses default credential chain if not provided) */
6191
6032
  profile: string().optional()
6192
6033
  });
6193
6034
  /**
6194
6035
  * Custom state provider config (user-provided implementation).
6195
6036
  */
6196
- const CustomStateConfigSchema = object({ provider: custom((val) => typeof val === "object" && val !== null && typeof val.read === "function" && typeof val.write === "function", { message: "Custom provider must implement read() and write() methods" }) });
6197
- /**
6198
- * Built-in state provider config (discriminated union).
6199
- */
6200
- const BuiltInStateConfigSchema = discriminatedUnion("provider", [LocalStateConfigSchema, SSMStateConfigSchema]);
6037
+ const CustomStateConfigSchema = object({
6038
+ /** Custom StateProvider implementation */
6039
+ provider: custom((val) => typeof val === "object" && val !== null && typeof val.read === "function" && typeof val.write === "function", { message: "Custom provider must implement read() and write() methods" }) });
6201
6040
  /**
6202
6041
  * State configuration schema.
6203
6042
  *
@@ -6206,7 +6045,7 @@ const BuiltInStateConfigSchema = discriminatedUnion("provider", [LocalStateConfi
6206
6045
  * - 'ssm': Store in AWS SSM Parameter Store (requires region)
6207
6046
  * - Custom: Provide a StateProvider implementation with read/write methods
6208
6047
  */
6209
- const StateConfigSchema = union([BuiltInStateConfigSchema, CustomStateConfigSchema]);
6048
+ const StateConfigSchema = union([discriminatedUnion("provider", [LocalStateConfigSchema, SSMStateConfigSchema]), CustomStateConfigSchema]);
6210
6049
  /**
6211
6050
  * App configuration schema.
6212
6051
  */
@@ -6271,15 +6110,31 @@ const AppConfigSchema = object({
6271
6110
  */
6272
6111
  const WorkspaceConfigSchema = object({
6273
6112
  name: string().optional(),
6113
+ /**
6114
+ * Where the workspace's own constructs live, relative to its root.
6115
+ *
6116
+ * Infrastructure is a fact about the product, not about the process that
6117
+ * happens to import it — so a database two apps share is declared once,
6118
+ * at the top, and both find it. An app-level glob still works and is
6119
+ * additive, for something only one app uses.
6120
+ */
6274
6121
  constructs: RoutesSchema.optional(),
6122
+ /**
6123
+ * Apps that nothing declares.
6124
+ *
6125
+ * Optional, and normally absent: a `site` is an app and so is a
6126
+ * `rest-api` that named one, so the list is read off the graph. This is
6127
+ * the escape hatch for what no construct describes — a mobile app, a
6128
+ * process someone runs by hand — and for overriding one field of a
6129
+ * derived app without restating it.
6130
+ */
6275
6131
  apps: record(string(), AppConfigSchema).optional(),
6276
6132
  shared: SharedConfigSchema.optional(),
6277
6133
  deploy: DeployConfigSchema.optional(),
6278
- services: ServicesConfigSchema.optional(),
6279
6134
  stages: StagesConfigSchema,
6280
6135
  secrets: SecretsConfigSchema.optional(),
6281
6136
  state: StateConfigSchema.optional()
6282
- }).refine((data) => {
6137
+ }).strict().refine((data) => {
6283
6138
  const appNames = Object.keys(data.apps ?? {});
6284
6139
  for (const [appName, app] of Object.entries(data.apps ?? {})) for (const dep of app.dependencies ?? []) {
6285
6140
  if (!appNames.includes(dep)) return false;
@@ -6338,14 +6193,14 @@ const WorkspaceConfigSchema = object({
6338
6193
  * Validate workspace configuration.
6339
6194
  * Throws ZodError with detailed messages on validation failure.
6340
6195
  */
6341
- function validateWorkspaceConfig(config$1) {
6342
- return WorkspaceConfigSchema.parse(config$1);
6196
+ function validateWorkspaceConfig(config) {
6197
+ return WorkspaceConfigSchema.parse(config);
6343
6198
  }
6344
6199
  /**
6345
6200
  * Safe validation that returns result instead of throwing.
6346
6201
  */
6347
- function safeValidateWorkspaceConfig(config$1) {
6348
- const result = WorkspaceConfigSchema.safeParse(config$1);
6202
+ function safeValidateWorkspaceConfig(config) {
6203
+ const result = WorkspaceConfigSchema.safeParse(config);
6349
6204
  if (result.success) return {
6350
6205
  success: true,
6351
6206
  data: result.data
@@ -6358,14 +6213,12 @@ function safeValidateWorkspaceConfig(config$1) {
6358
6213
  /**
6359
6214
  * Format Zod errors into user-friendly messages.
6360
6215
  */
6361
- function formatValidationErrors(error$1) {
6362
- const messages = error$1.issues.map((issue$1) => {
6363
- const path = issue$1.path.join(".");
6364
- return path ? ` - ${path}: ${issue$1.message}` : ` - ${issue$1.message}`;
6365
- });
6366
- return `Workspace configuration validation failed:\n${messages.join("\n")}`;
6216
+ function formatValidationErrors(error) {
6217
+ return `Workspace configuration validation failed:\n${error.issues.map((issue) => {
6218
+ const path = issue.path.join(".");
6219
+ return path ? ` - ${path}: ${issue.message}` : ` - ${issue.message}`;
6220
+ }).join("\n")}`;
6367
6221
  }
6368
-
6369
6222
  //#endregion
6370
6223
  //#region src/workspace/types.ts
6371
6224
  /**
@@ -6380,12 +6233,22 @@ function formatValidationErrors(error$1) {
6380
6233
  * }
6381
6234
  * ```
6382
6235
  */
6383
- function isWorkspaceConfig(config$1) {
6384
- if (typeof config$1 !== "object" || config$1 === null) return false;
6385
- if ("apps" in config$1 && typeof config$1.apps === "object") return true;
6386
- return "constructs" in config$1 && !("routes" in config$1) && !("envParser" in config$1);
6387
- }
6388
-
6236
+ function isWorkspaceConfig(config) {
6237
+ if (typeof config !== "object" || config === null) return false;
6238
+ if ("apps" in config && typeof config.apps === "object") return true;
6239
+ return "constructs" in config && Object.keys(config).every((key) => WORKSPACE_KEYS.has(key));
6240
+ }
6241
+ /** Every top-level key a workspace config has — see `WorkspaceConfigSchema`. */
6242
+ const WORKSPACE_KEYS = /* @__PURE__ */ new Set([
6243
+ "name",
6244
+ "constructs",
6245
+ "apps",
6246
+ "shared",
6247
+ "deploy",
6248
+ "stages",
6249
+ "secrets",
6250
+ "state"
6251
+ ]);
6389
6252
  //#endregion
6390
6253
  //#region src/workspace/index.ts
6391
6254
  /**
@@ -6431,52 +6294,46 @@ function validateDependencies(apps) {
6431
6294
  * dependencies: ['api'], // <- autocomplete shows 'api' | 'web'
6432
6295
  * },
6433
6296
  * },
6434
- * services: {
6435
- * db: true,
6436
- * cache: true,
6437
- * },
6438
6297
  * });
6439
6298
  *
6440
6299
  * // config.apps.api <- full type inference
6441
6300
  * // config.apps.foo <- TypeScript error
6442
6301
  * ```
6443
6302
  */
6444
- function defineWorkspace(config$1) {
6445
- if (config$1.apps) validateDependencies(config$1.apps);
6446
- const result = safeValidateWorkspaceConfig(config$1);
6303
+ function defineWorkspace(config) {
6304
+ if (config.apps) validateDependencies(config.apps);
6305
+ const result = safeValidateWorkspaceConfig(config);
6447
6306
  if (!result.success && result.error) throw new Error(formatValidationErrors(result.error));
6448
- return config$1;
6307
+ return config;
6449
6308
  }
6450
6309
  /**
6451
6310
  * Get the package name from package.json in the given directory.
6452
6311
  */
6453
6312
  function getPackageName(cwd) {
6454
6313
  try {
6455
- const pkg = require(`${cwd}/package.json`);
6456
- return pkg.name?.replace(/^@[^/]+\//, "");
6314
+ return require(`${cwd}/package.json`).name?.replace(/^@[^/]+\//, "");
6457
6315
  } catch {
6458
- return void 0;
6316
+ return;
6459
6317
  }
6460
6318
  }
6461
6319
  /**
6462
6320
  * Normalize a workspace configuration with resolved defaults.
6463
6321
  */
6464
- function normalizeWorkspace(config$1, cwd) {
6465
- const name = config$1.name ?? getPackageName(cwd) ?? (0, node_path.basename)(cwd);
6466
- const defaultTarget = config$1.deploy?.default ?? "dokploy";
6322
+ function normalizeWorkspace(config, cwd) {
6323
+ const name = config.name ?? getPackageName(cwd) ?? (0, node_path.basename)(cwd);
6324
+ const defaultTarget = config.deploy?.default ?? "dokploy";
6467
6325
  const normalizedApps = {};
6468
- for (const [appName, app] of Object.entries(config$1.apps ?? {})) normalizedApps[appName] = normalizeAppConfig(app, defaultTarget);
6326
+ for (const [appName, app] of Object.entries(config.apps ?? {})) normalizedApps[appName] = normalizeAppConfig(app, defaultTarget);
6469
6327
  return {
6470
6328
  name,
6471
6329
  root: cwd,
6472
- ...config$1.constructs ? { constructs: config$1.constructs } : {},
6330
+ ...config.constructs ? { constructs: config.constructs } : {},
6473
6331
  apps: normalizedApps,
6474
- services: config$1.services ?? {},
6475
- deploy: config$1.deploy ?? { default: "dokploy" },
6476
- shared: config$1.shared ?? { packages: ["packages/*"] },
6477
- stages: validateStages(config$1.stages),
6478
- secrets: config$1.secrets ?? {},
6479
- state: config$1.state
6332
+ deploy: config.deploy ?? { default: "dokploy" },
6333
+ shared: config.shared ?? { packages: ["packages/*"] },
6334
+ stages: validateStages(config.stages),
6335
+ secrets: config.secrets ?? {},
6336
+ state: config.state
6480
6337
  };
6481
6338
  }
6482
6339
  /**
@@ -6498,35 +6355,31 @@ function normalizeAppConfig(app, defaultTarget) {
6498
6355
  * Wrap a single-app GkmConfig as a workspace.
6499
6356
  * This allows existing single-app configs to work seamlessly.
6500
6357
  */
6501
- function wrapSingleAppAsWorkspace(config$1, cwd) {
6502
- const name = config$1.name ?? getPackageName(cwd) ?? (0, node_path.basename)(cwd);
6503
- const normalizedServices = { ...config$1.services ?? {} };
6504
- const app = {
6505
- type: "backend",
6506
- path: ".",
6507
- port: (typeof config$1.providers?.server === "object" ? config$1.providers.server.port : void 0) ?? 3e3,
6508
- dependencies: [],
6509
- resolvedDeployTarget: config$1.deploy?.default ?? "dokploy",
6510
- constructs: config$1.constructs,
6511
- providers: config$1.providers,
6512
- hooks: config$1.hooks,
6513
- telescope: config$1.telescope,
6514
- studio: config$1.studio,
6515
- openapi: config$1.openapi,
6516
- runtime: config$1.runtime,
6517
- env: config$1.env
6518
- };
6358
+ function wrapSingleAppAsWorkspace(config, cwd) {
6519
6359
  return {
6520
- name,
6360
+ name: config.name ?? getPackageName(cwd) ?? (0, node_path.basename)(cwd),
6521
6361
  root: cwd,
6522
- apps: { api: app },
6523
- services: normalizedServices,
6362
+ apps: { api: {
6363
+ type: "backend",
6364
+ path: ".",
6365
+ port: (typeof config.providers?.server === "object" ? config.providers.server.port : void 0) ?? 3e3,
6366
+ dependencies: [],
6367
+ resolvedDeployTarget: config.deploy?.default ?? "dokploy",
6368
+ constructs: config.constructs,
6369
+ providers: config.providers,
6370
+ hooks: config.hooks,
6371
+ telescope: config.telescope,
6372
+ studio: config.studio,
6373
+ openapi: config.openapi,
6374
+ runtime: config.runtime,
6375
+ env: config.env
6376
+ } },
6524
6377
  deploy: {
6525
6378
  default: "dokploy",
6526
- ...config$1.deploy
6379
+ ...config.deploy
6527
6380
  },
6528
6381
  shared: { packages: [] },
6529
- stages: validateStages(config$1.stages),
6382
+ stages: validateStages(config.stages),
6530
6383
  secrets: {}
6531
6384
  };
6532
6385
  }
@@ -6534,20 +6387,20 @@ function wrapSingleAppAsWorkspace(config$1, cwd) {
6534
6387
  * Process a loaded configuration (either single-app or workspace).
6535
6388
  * Returns a normalized workspace in both cases.
6536
6389
  */
6537
- function processConfig(config$1, cwd) {
6538
- if (isWorkspaceConfig(config$1)) {
6539
- const result = safeValidateWorkspaceConfig(config$1);
6390
+ function processConfig(config, cwd) {
6391
+ if (isWorkspaceConfig(config)) {
6392
+ const result = safeValidateWorkspaceConfig(config);
6540
6393
  if (!result.success && result.error) throw new Error(formatValidationErrors(result.error));
6541
6394
  return {
6542
6395
  type: "workspace",
6543
- raw: config$1,
6544
- workspace: normalizeWorkspace(config$1, cwd)
6396
+ raw: config,
6397
+ workspace: normalizeWorkspace(config, cwd)
6545
6398
  };
6546
6399
  }
6547
6400
  return {
6548
6401
  type: "single",
6549
- raw: config$1,
6550
- workspace: wrapSingleAppAsWorkspace(config$1, cwd)
6402
+ raw: config,
6403
+ workspace: wrapSingleAppAsWorkspace(config, cwd)
6551
6404
  };
6552
6405
  }
6553
6406
  /**
@@ -6604,9 +6457,9 @@ function constructPatterns(routes) {
6604
6457
  */
6605
6458
  function getAppGkmConfig(workspace, appName) {
6606
6459
  const app = workspace.apps[appName];
6607
- if (!app || app.type !== "backend") return void 0;
6460
+ if (!app || app.type !== "backend") return;
6608
6461
  return {
6609
- services: workspace.services,
6462
+ ...workspace.deploy ? { deploy: workspace.deploy } : {},
6610
6463
  stages: workspace.stages,
6611
6464
  constructs: appConstructGlobs(workspace, appName),
6612
6465
  providers: app.providers,
@@ -6653,10 +6506,10 @@ function getDependencyEnvVars(workspace, appName, urlPrefix = "http://localhost"
6653
6506
  for (const depName of app.dependencies) {
6654
6507
  const dep = workspace.apps[depName];
6655
6508
  if (dep) {
6656
- const url$1 = `${urlPrefix}:${dep.port}`;
6509
+ const url = `${urlPrefix}:${dep.port}`;
6657
6510
  const envKey = `${depName.toUpperCase()}_URL`;
6658
- env[envKey] = url$1;
6659
- if (publicPrefix) env[`${publicPrefix}${envKey}`] = url$1;
6511
+ env[envKey] = url;
6512
+ if (publicPrefix) env[`${publicPrefix}${envKey}`] = url;
6660
6513
  }
6661
6514
  }
6662
6515
  return env;
@@ -6692,180 +6545,180 @@ function getEndpointForStage(dokployConfig, stage) {
6692
6545
  if (dokployConfig.endpoints?.[stage]) return dokployConfig.endpoints[stage];
6693
6546
  return dokployConfig.endpoint;
6694
6547
  }
6695
-
6696
6548
  //#endregion
6697
- Object.defineProperty(exports, 'InvalidStages', {
6698
- enumerable: true,
6699
- get: function () {
6700
- return InvalidStages;
6701
- }
6702
- });
6703
- Object.defineProperty(exports, 'PHASE_2_DEPLOY_TARGETS', {
6704
- enumerable: true,
6705
- get: function () {
6706
- return PHASE_2_DEPLOY_TARGETS;
6707
- }
6708
- });
6709
- Object.defineProperty(exports, 'PUBLIC_ENV_PREFIXES', {
6710
- enumerable: true,
6711
- get: function () {
6712
- return PUBLIC_ENV_PREFIXES;
6713
- }
6714
- });
6715
- Object.defineProperty(exports, 'SUPPORTED_DEPLOY_TARGETS', {
6716
- enumerable: true,
6717
- get: function () {
6718
- return SUPPORTED_DEPLOY_TARGETS;
6719
- }
6720
- });
6721
- Object.defineProperty(exports, 'WorkspaceConfigSchema', {
6722
- enumerable: true,
6723
- get: function () {
6724
- return WorkspaceConfigSchema;
6725
- }
6726
- });
6727
- Object.defineProperty(exports, 'allConstructGlobs', {
6728
- enumerable: true,
6729
- get: function () {
6730
- return allConstructGlobs;
6731
- }
6732
- });
6733
- Object.defineProperty(exports, 'appConstructGlobs', {
6734
- enumerable: true,
6735
- get: function () {
6736
- return appConstructGlobs;
6737
- }
6738
- });
6739
- Object.defineProperty(exports, 'assertDeployedStage', {
6740
- enumerable: true,
6741
- get: function () {
6742
- return assertDeployedStage;
6743
- }
6744
- });
6745
- Object.defineProperty(exports, 'constructPatterns', {
6746
- enumerable: true,
6747
- get: function () {
6748
- return constructPatterns;
6749
- }
6750
- });
6751
- Object.defineProperty(exports, 'defineWorkspace', {
6752
- enumerable: true,
6753
- get: function () {
6754
- return defineWorkspace;
6755
- }
6756
- });
6757
- Object.defineProperty(exports, 'deployedProblems', {
6758
- enumerable: true,
6759
- get: function () {
6760
- return deployedProblems;
6761
- }
6762
- });
6763
- Object.defineProperty(exports, 'formatValidationErrors', {
6764
- enumerable: true,
6765
- get: function () {
6766
- return formatValidationErrors;
6767
- }
6768
- });
6769
- Object.defineProperty(exports, 'getAppBuildOrder', {
6770
- enumerable: true,
6771
- get: function () {
6772
- return getAppBuildOrder;
6773
- }
6774
- });
6775
- Object.defineProperty(exports, 'getAppGkmConfig', {
6776
- enumerable: true,
6777
- get: function () {
6778
- return getAppGkmConfig;
6779
- }
6780
- });
6781
- Object.defineProperty(exports, 'getDependencyEnvVars', {
6782
- enumerable: true,
6783
- get: function () {
6784
- return getDependencyEnvVars;
6785
- }
6786
- });
6787
- Object.defineProperty(exports, 'getDeployTargetError', {
6788
- enumerable: true,
6789
- get: function () {
6790
- return getDeployTargetError;
6791
- }
6792
- });
6793
- Object.defineProperty(exports, 'getEndpointForStage', {
6794
- enumerable: true,
6795
- get: function () {
6796
- return getEndpointForStage;
6797
- }
6798
- });
6799
- Object.defineProperty(exports, 'getPublicEnvPrefix', {
6800
- enumerable: true,
6801
- get: function () {
6802
- return getPublicEnvPrefix;
6803
- }
6804
- });
6805
- Object.defineProperty(exports, 'isDeployTargetSupported', {
6806
- enumerable: true,
6807
- get: function () {
6808
- return isDeployTargetSupported;
6809
- }
6810
- });
6811
- Object.defineProperty(exports, 'isPhase2DeployTarget', {
6812
- enumerable: true,
6813
- get: function () {
6814
- return isPhase2DeployTarget;
6815
- }
6816
- });
6817
- Object.defineProperty(exports, 'isWorkspaceConfig', {
6818
- enumerable: true,
6819
- get: function () {
6820
- return isWorkspaceConfig;
6821
- }
6822
- });
6823
- Object.defineProperty(exports, 'normalizeWorkspace', {
6824
- enumerable: true,
6825
- get: function () {
6826
- return normalizeWorkspace;
6827
- }
6828
- });
6829
- Object.defineProperty(exports, 'processConfig', {
6830
- enumerable: true,
6831
- get: function () {
6832
- return processConfig;
6833
- }
6834
- });
6835
- Object.defineProperty(exports, 'safeValidateWorkspaceConfig', {
6836
- enumerable: true,
6837
- get: function () {
6838
- return safeValidateWorkspaceConfig;
6839
- }
6840
- });
6841
- Object.defineProperty(exports, 'stageProblems', {
6842
- enumerable: true,
6843
- get: function () {
6844
- return stageProblems;
6845
- }
6846
- });
6847
- Object.defineProperty(exports, 'stripPublicPrefix', {
6848
- enumerable: true,
6849
- get: function () {
6850
- return stripPublicPrefix;
6851
- }
6852
- });
6853
- Object.defineProperty(exports, 'validateWorkspaceConfig', {
6854
- enumerable: true,
6855
- get: function () {
6856
- return validateWorkspaceConfig;
6857
- }
6858
- });
6859
- Object.defineProperty(exports, 'workspaceConstructGlobs', {
6860
- enumerable: true,
6861
- get: function () {
6862
- return workspaceConstructGlobs;
6863
- }
6864
- });
6865
- Object.defineProperty(exports, 'wrapSingleAppAsWorkspace', {
6866
- enumerable: true,
6867
- get: function () {
6868
- return wrapSingleAppAsWorkspace;
6869
- }
6870
- });
6871
- //# sourceMappingURL=workspace-C-a3G_U0.cjs.map
6549
+ Object.defineProperty(exports, "InvalidStages", {
6550
+ enumerable: true,
6551
+ get: function() {
6552
+ return InvalidStages;
6553
+ }
6554
+ });
6555
+ Object.defineProperty(exports, "PHASE_2_DEPLOY_TARGETS", {
6556
+ enumerable: true,
6557
+ get: function() {
6558
+ return PHASE_2_DEPLOY_TARGETS;
6559
+ }
6560
+ });
6561
+ Object.defineProperty(exports, "PUBLIC_ENV_PREFIXES", {
6562
+ enumerable: true,
6563
+ get: function() {
6564
+ return PUBLIC_ENV_PREFIXES;
6565
+ }
6566
+ });
6567
+ Object.defineProperty(exports, "SUPPORTED_DEPLOY_TARGETS", {
6568
+ enumerable: true,
6569
+ get: function() {
6570
+ return SUPPORTED_DEPLOY_TARGETS;
6571
+ }
6572
+ });
6573
+ Object.defineProperty(exports, "WorkspaceConfigSchema", {
6574
+ enumerable: true,
6575
+ get: function() {
6576
+ return WorkspaceConfigSchema;
6577
+ }
6578
+ });
6579
+ Object.defineProperty(exports, "allConstructGlobs", {
6580
+ enumerable: true,
6581
+ get: function() {
6582
+ return allConstructGlobs;
6583
+ }
6584
+ });
6585
+ Object.defineProperty(exports, "appConstructGlobs", {
6586
+ enumerable: true,
6587
+ get: function() {
6588
+ return appConstructGlobs;
6589
+ }
6590
+ });
6591
+ Object.defineProperty(exports, "assertDeployedStage", {
6592
+ enumerable: true,
6593
+ get: function() {
6594
+ return assertDeployedStage;
6595
+ }
6596
+ });
6597
+ Object.defineProperty(exports, "constructPatterns", {
6598
+ enumerable: true,
6599
+ get: function() {
6600
+ return constructPatterns;
6601
+ }
6602
+ });
6603
+ Object.defineProperty(exports, "defineWorkspace", {
6604
+ enumerable: true,
6605
+ get: function() {
6606
+ return defineWorkspace;
6607
+ }
6608
+ });
6609
+ Object.defineProperty(exports, "deployedProblems", {
6610
+ enumerable: true,
6611
+ get: function() {
6612
+ return deployedProblems;
6613
+ }
6614
+ });
6615
+ Object.defineProperty(exports, "formatValidationErrors", {
6616
+ enumerable: true,
6617
+ get: function() {
6618
+ return formatValidationErrors;
6619
+ }
6620
+ });
6621
+ Object.defineProperty(exports, "getAppBuildOrder", {
6622
+ enumerable: true,
6623
+ get: function() {
6624
+ return getAppBuildOrder;
6625
+ }
6626
+ });
6627
+ Object.defineProperty(exports, "getAppGkmConfig", {
6628
+ enumerable: true,
6629
+ get: function() {
6630
+ return getAppGkmConfig;
6631
+ }
6632
+ });
6633
+ Object.defineProperty(exports, "getDependencyEnvVars", {
6634
+ enumerable: true,
6635
+ get: function() {
6636
+ return getDependencyEnvVars;
6637
+ }
6638
+ });
6639
+ Object.defineProperty(exports, "getDeployTargetError", {
6640
+ enumerable: true,
6641
+ get: function() {
6642
+ return getDeployTargetError;
6643
+ }
6644
+ });
6645
+ Object.defineProperty(exports, "getEndpointForStage", {
6646
+ enumerable: true,
6647
+ get: function() {
6648
+ return getEndpointForStage;
6649
+ }
6650
+ });
6651
+ Object.defineProperty(exports, "getPublicEnvPrefix", {
6652
+ enumerable: true,
6653
+ get: function() {
6654
+ return getPublicEnvPrefix;
6655
+ }
6656
+ });
6657
+ Object.defineProperty(exports, "isDeployTargetSupported", {
6658
+ enumerable: true,
6659
+ get: function() {
6660
+ return isDeployTargetSupported;
6661
+ }
6662
+ });
6663
+ Object.defineProperty(exports, "isPhase2DeployTarget", {
6664
+ enumerable: true,
6665
+ get: function() {
6666
+ return isPhase2DeployTarget;
6667
+ }
6668
+ });
6669
+ Object.defineProperty(exports, "isWorkspaceConfig", {
6670
+ enumerable: true,
6671
+ get: function() {
6672
+ return isWorkspaceConfig;
6673
+ }
6674
+ });
6675
+ Object.defineProperty(exports, "normalizeWorkspace", {
6676
+ enumerable: true,
6677
+ get: function() {
6678
+ return normalizeWorkspace;
6679
+ }
6680
+ });
6681
+ Object.defineProperty(exports, "processConfig", {
6682
+ enumerable: true,
6683
+ get: function() {
6684
+ return processConfig;
6685
+ }
6686
+ });
6687
+ Object.defineProperty(exports, "safeValidateWorkspaceConfig", {
6688
+ enumerable: true,
6689
+ get: function() {
6690
+ return safeValidateWorkspaceConfig;
6691
+ }
6692
+ });
6693
+ Object.defineProperty(exports, "stageProblems", {
6694
+ enumerable: true,
6695
+ get: function() {
6696
+ return stageProblems;
6697
+ }
6698
+ });
6699
+ Object.defineProperty(exports, "stripPublicPrefix", {
6700
+ enumerable: true,
6701
+ get: function() {
6702
+ return stripPublicPrefix;
6703
+ }
6704
+ });
6705
+ Object.defineProperty(exports, "validateWorkspaceConfig", {
6706
+ enumerable: true,
6707
+ get: function() {
6708
+ return validateWorkspaceConfig;
6709
+ }
6710
+ });
6711
+ Object.defineProperty(exports, "workspaceConstructGlobs", {
6712
+ enumerable: true,
6713
+ get: function() {
6714
+ return workspaceConstructGlobs;
6715
+ }
6716
+ });
6717
+ Object.defineProperty(exports, "wrapSingleAppAsWorkspace", {
6718
+ enumerable: true,
6719
+ get: function() {
6720
+ return wrapSingleAppAsWorkspace;
6721
+ }
6722
+ });
6723
+
6724
+ //# sourceMappingURL=workspace-mFpI_ky_.cjs.map