@geekmidas/cli 10.0.0-alpha.10 → 10.0.0-alpha.101

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 (489) hide show
  1. package/README.md +315 -414
  2. package/bin/adjacent-tsconfig.mjs +46 -8
  3. package/bin/gkm.mjs +11 -3
  4. package/bin/owning-tsconfig-jsx-register.mjs +18 -0
  5. package/bin/owning-tsconfig-jsx.mjs +108 -0
  6. package/dist/EndpointGenerator-Br97xgs_.mjs +1031 -0
  7. package/dist/EndpointGenerator-Br97xgs_.mjs.map +1 -0
  8. package/dist/EndpointGenerator-By5_tYE9.cjs +1090 -0
  9. package/dist/EndpointGenerator-By5_tYE9.cjs.map +1 -0
  10. package/dist/GoDaddyProvider-BOuLf_Py.cjs +388 -0
  11. package/dist/GoDaddyProvider-BOuLf_Py.cjs.map +1 -0
  12. package/dist/GoDaddyProvider-u9MF-Dqk.mjs +388 -0
  13. package/dist/GoDaddyProvider-u9MF-Dqk.mjs.map +1 -0
  14. package/dist/{HostingerProvider-Cft7lEYr.mjs → HostingerProvider-BNpS9aRJ.mjs} +29 -25
  15. package/dist/HostingerProvider-BNpS9aRJ.mjs.map +1 -0
  16. package/dist/{HostingerProvider-h3EbEp-Z.cjs → HostingerProvider-DR1iws1P.cjs} +29 -25
  17. package/dist/HostingerProvider-DR1iws1P.cjs.map +1 -0
  18. package/dist/LegacyStateStore-DWmHGNgH.cjs +124 -0
  19. package/dist/LegacyStateStore-DWmHGNgH.cjs.map +1 -0
  20. package/dist/LegacyStateStore-vhkx7Bbq.mjs +124 -0
  21. package/dist/LegacyStateStore-vhkx7Bbq.mjs.map +1 -0
  22. package/dist/LocalStateStore-BVKDADoG.cjs +178 -0
  23. package/dist/LocalStateStore-BVKDADoG.cjs.map +1 -0
  24. package/dist/LocalStateStore-FVsg0UoM.mjs +167 -0
  25. package/dist/LocalStateStore-FVsg0UoM.mjs.map +1 -0
  26. package/dist/OpenApiTsGenerator-BgSX_Z-e.cjs +541 -0
  27. package/dist/OpenApiTsGenerator-BgSX_Z-e.cjs.map +1 -0
  28. package/dist/OpenApiTsGenerator-C8aTX--y.mjs +536 -0
  29. package/dist/OpenApiTsGenerator-C8aTX--y.mjs.map +1 -0
  30. package/dist/{Route53Provider-di2fMM5N.cjs → Route53Provider-Bllus2NR.cjs} +21 -22
  31. package/dist/Route53Provider-Bllus2NR.cjs.map +1 -0
  32. package/dist/{Route53Provider-RdpUDJQk.mjs → Route53Provider-QXxjkZO1.mjs} +13 -13
  33. package/dist/Route53Provider-QXxjkZO1.mjs.map +1 -0
  34. package/dist/S3StateStore-B8seZUsw.mjs +223 -0
  35. package/dist/S3StateStore-B8seZUsw.mjs.map +1 -0
  36. package/dist/S3StateStore-B_2gE9Un.cjs +222 -0
  37. package/dist/S3StateStore-B_2gE9Un.cjs.map +1 -0
  38. package/dist/SSMStateStore-CTDEI5Bi.cjs +204 -0
  39. package/dist/SSMStateStore-CTDEI5Bi.cjs.map +1 -0
  40. package/dist/SSMStateStore-DGTbBomw.mjs +205 -0
  41. package/dist/SSMStateStore-DGTbBomw.mjs.map +1 -0
  42. package/dist/SubscriberGenerator-1-IsjIwF.mjs +449 -0
  43. package/dist/SubscriberGenerator-1-IsjIwF.mjs.map +1 -0
  44. package/dist/SubscriberGenerator-BlIOdbi-.cjs +490 -0
  45. package/dist/SubscriberGenerator-BlIOdbi-.cjs.map +1 -0
  46. package/dist/add-BB2tLVc2.cjs +720 -0
  47. package/dist/add-BB2tLVc2.cjs.map +1 -0
  48. package/dist/add-CIbhGE5v.mjs +718 -0
  49. package/dist/add-CIbhGE5v.mjs.map +1 -0
  50. package/dist/appPorts-C9z9Pzn9.mjs +223 -0
  51. package/dist/appPorts-C9z9Pzn9.mjs.map +1 -0
  52. package/dist/appPorts-Cu79hJF6.cjs +264 -0
  53. package/dist/appPorts-Cu79hJF6.cjs.map +1 -0
  54. package/dist/aws-8QQ8n-t6.mjs +89 -0
  55. package/dist/aws-8QQ8n-t6.mjs.map +1 -0
  56. package/dist/aws-DY9NqQIT.cjs +100 -0
  57. package/dist/aws-DY9NqQIT.cjs.map +1 -0
  58. package/dist/awsStore-Bx5nCFnS.mjs +121 -0
  59. package/dist/awsStore-Bx5nCFnS.mjs.map +1 -0
  60. package/dist/awsStore-u3ehhMoY.cjs +138 -0
  61. package/dist/awsStore-u3ehhMoY.cjs.map +1 -0
  62. package/dist/{backup-provisioner-Bgj5Vi_L.mjs → backup-provisioner-C8DnCmxK.mjs} +11 -8
  63. package/dist/backup-provisioner-C8DnCmxK.mjs.map +1 -0
  64. package/dist/{backup-provisioner-BrsHwYG0.cjs → backup-provisioner-oDEsPj02.cjs} +22 -20
  65. package/dist/backup-provisioner-oDEsPj02.cjs.map +1 -0
  66. package/dist/backups/runner.cjs +519 -0
  67. package/dist/backups/runner.cjs.map +1 -0
  68. package/dist/backups/runner.d.cts +102 -0
  69. package/dist/backups/runner.d.cts.map +1 -0
  70. package/dist/backups/runner.d.mts +102 -0
  71. package/dist/backups/runner.d.mts.map +1 -0
  72. package/dist/backups/runner.mjs +506 -0
  73. package/dist/backups/runner.mjs.map +1 -0
  74. package/dist/{bundler-BY1OmV1e.cjs → bundler-Ba6BER3w.cjs} +38 -35
  75. package/dist/bundler-Ba6BER3w.cjs.map +1 -0
  76. package/dist/{bundler-Be8Zg4Wd.mjs → bundler-CHjRYVKh.mjs} +36 -32
  77. package/dist/bundler-CHjRYVKh.mjs.map +1 -0
  78. package/dist/cli-CtlqYRlN.cjs +71 -0
  79. package/dist/cli-CtlqYRlN.cjs.map +1 -0
  80. package/dist/cli-DOlkhrsh.mjs +71 -0
  81. package/dist/cli-DOlkhrsh.mjs.map +1 -0
  82. package/dist/compose-FDP_TaFt.mjs +3154 -0
  83. package/dist/compose-FDP_TaFt.mjs.map +1 -0
  84. package/dist/compose-uAWLy-nR.cjs +3267 -0
  85. package/dist/compose-uAWLy-nR.cjs.map +1 -0
  86. package/dist/config-D48erO2j.d.mts +269 -0
  87. package/dist/config-D48erO2j.d.mts.map +1 -0
  88. package/dist/config-DHDtsQrB.d.cts +269 -0
  89. package/dist/config-DHDtsQrB.d.cts.map +1 -0
  90. package/dist/config.cjs +421 -11
  91. package/dist/config.cjs.map +1 -0
  92. package/dist/config.d.cts +4 -120
  93. package/dist/config.d.mts +4 -120
  94. package/dist/config.mjs +405 -4
  95. package/dist/config.mjs.map +1 -0
  96. package/dist/credentialSchemas-DDda4Mmm.cjs +272 -0
  97. package/dist/credentialSchemas-DDda4Mmm.cjs.map +1 -0
  98. package/dist/credentialSchemas-DvitraL-.mjs +237 -0
  99. package/dist/credentialSchemas-DvitraL-.mjs.map +1 -0
  100. package/dist/credentials-B5N5yKk6.mjs +267 -0
  101. package/dist/credentials-B5N5yKk6.mjs.map +1 -0
  102. package/dist/credentials-Zqr3QQYB.cjs +350 -0
  103. package/dist/credentials-Zqr3QQYB.cjs.map +1 -0
  104. package/dist/databases-BeGP5eDh.mjs +495 -0
  105. package/dist/databases-BeGP5eDh.mjs.map +1 -0
  106. package/dist/databases-DGALFDG3.cjs +598 -0
  107. package/dist/databases-DGALFDG3.cjs.map +1 -0
  108. package/dist/define-6poNqm5O.mjs +106 -0
  109. package/dist/define-6poNqm5O.mjs.map +1 -0
  110. package/dist/define-crmMcXFS.cjs +153 -0
  111. package/dist/define-crmMcXFS.cjs.map +1 -0
  112. package/dist/deploy/public.cjs +212 -0
  113. package/dist/deploy/public.cjs.map +1 -0
  114. package/dist/deploy/public.d.cts +653 -0
  115. package/dist/deploy/public.d.cts.map +1 -0
  116. package/dist/deploy/public.d.mts +653 -0
  117. package/dist/deploy/public.d.mts.map +1 -0
  118. package/dist/deploy/public.mjs +145 -0
  119. package/dist/deploy/public.mjs.map +1 -0
  120. package/dist/deploy/sniffer-envkit-patch.cjs +18 -10
  121. package/dist/deploy/sniffer-envkit-patch.cjs.map +1 -1
  122. package/dist/deploy/sniffer-envkit-patch.d.cts +0 -2
  123. package/dist/deploy/sniffer-envkit-patch.d.cts.map +1 -1
  124. package/dist/deploy/sniffer-envkit-patch.d.mts +0 -2
  125. package/dist/deploy/sniffer-envkit-patch.d.mts.map +1 -1
  126. package/dist/deploy/sniffer-envkit-patch.mjs +10 -2
  127. package/dist/deploy/sniffer-envkit-patch.mjs.map +1 -1
  128. package/dist/deploy/sniffer-envparser-worker.cjs +54 -0
  129. package/dist/deploy/sniffer-envparser-worker.cjs.map +1 -0
  130. package/dist/deploy/sniffer-envparser-worker.d.cts +1 -0
  131. package/dist/deploy/sniffer-envparser-worker.d.mts +1 -0
  132. package/dist/deploy/sniffer-envparser-worker.mjs +55 -0
  133. package/dist/deploy/sniffer-envparser-worker.mjs.map +1 -0
  134. package/dist/deploy/sniffer-hooks.cjs +13 -7
  135. package/dist/deploy/sniffer-hooks.cjs.map +1 -1
  136. package/dist/deploy/sniffer-hooks.d.cts +1 -2
  137. package/dist/deploy/sniffer-hooks.d.cts.map +1 -1
  138. package/dist/deploy/sniffer-hooks.d.mts +1 -2
  139. package/dist/deploy/sniffer-hooks.d.mts.map +1 -1
  140. package/dist/deploy/sniffer-hooks.mjs +10 -3
  141. package/dist/deploy/sniffer-hooks.mjs.map +1 -1
  142. package/dist/deploy/sniffer-loader.cjs +16 -7
  143. package/dist/deploy/sniffer-loader.cjs.map +1 -1
  144. package/dist/deploy/sniffer-loader.d.cts +1 -1
  145. package/dist/deploy/sniffer-loader.d.mts +1 -1
  146. package/dist/deploy/sniffer-loader.mjs +14 -3
  147. package/dist/deploy/sniffer-loader.mjs.map +1 -1
  148. package/dist/deploy/sniffer-routes-worker.cjs +11 -11
  149. package/dist/deploy/sniffer-routes-worker.cjs.map +1 -1
  150. package/dist/deploy/sniffer-routes-worker.d.cts +1 -1
  151. package/dist/deploy/sniffer-routes-worker.d.mts +1 -1
  152. package/dist/deploy/sniffer-routes-worker.mjs +4 -4
  153. package/dist/deploy/sniffer-routes-worker.mjs.map +1 -1
  154. package/dist/deploy/sniffer-worker.cjs +15 -6
  155. package/dist/deploy/sniffer-worker.cjs.map +1 -1
  156. package/dist/deploy/sniffer-worker.d.cts +1 -3
  157. package/dist/deploy/sniffer-worker.d.cts.map +1 -1
  158. package/dist/deploy/sniffer-worker.d.mts +1 -3
  159. package/dist/deploy/sniffer-worker.d.mts.map +1 -1
  160. package/dist/deploy/sniffer-worker.mjs +15 -4
  161. package/dist/deploy/sniffer-worker.mjs.map +1 -1
  162. package/dist/deploy-DUUc3jV9.cjs +2390 -0
  163. package/dist/deploy-DUUc3jV9.cjs.map +1 -0
  164. package/dist/deploy-DgZxTnGS.mjs +2317 -0
  165. package/dist/deploy-DgZxTnGS.mjs.map +1 -0
  166. package/dist/derive-B4vDpzgP.mjs +150 -0
  167. package/dist/derive-B4vDpzgP.mjs.map +1 -0
  168. package/dist/derive-DAbo49sm.cjs +161 -0
  169. package/dist/derive-DAbo49sm.cjs.map +1 -0
  170. package/dist/discover-BfhVW_kT.cjs +600 -0
  171. package/dist/discover-BfhVW_kT.cjs.map +1 -0
  172. package/dist/discover-CvTtV5ZD.d.cts +108 -0
  173. package/dist/discover-CvTtV5ZD.d.cts.map +1 -0
  174. package/dist/discover-W2kab9Lc.d.mts +108 -0
  175. package/dist/discover-W2kab9Lc.d.mts.map +1 -0
  176. package/dist/discover-kziEht4W.mjs +527 -0
  177. package/dist/discover-kziEht4W.mjs.map +1 -0
  178. package/dist/dns-DDDCfj75.mjs +926 -0
  179. package/dist/dns-DDDCfj75.mjs.map +1 -0
  180. package/dist/dns-DnE_02tB.cjs +1057 -0
  181. package/dist/dns-DnE_02tB.cjs.map +1 -0
  182. package/dist/dokploy-BrfdeVEu.cjs +38 -0
  183. package/dist/dokploy-BrfdeVEu.cjs.map +1 -0
  184. package/dist/dokploy-DBlGSdnb.mjs +38 -0
  185. package/dist/dokploy-DBlGSdnb.mjs.map +1 -0
  186. package/dist/drivers-BLU1fNs_.cjs +200 -0
  187. package/dist/drivers-BLU1fNs_.cjs.map +1 -0
  188. package/dist/drivers-C08LL4E8.mjs +177 -0
  189. package/dist/drivers-C08LL4E8.mjs.map +1 -0
  190. package/dist/{emit-CiZS_5Ub.mjs → emit-C1e8qD08.mjs} +13 -26
  191. package/dist/emit-C1e8qD08.mjs.map +1 -0
  192. package/dist/{emit-CbcRolsa.cjs → emit-Dmc1nvdS.cjs} +31 -57
  193. package/dist/emit-Dmc1nvdS.cjs.map +1 -0
  194. package/dist/encryption-CeW3xpE1.cjs +90 -0
  195. package/dist/encryption-CeW3xpE1.cjs.map +1 -0
  196. package/dist/encryption-DC8zsh2s.mjs +89 -0
  197. package/dist/encryption-DC8zsh2s.mjs.map +1 -0
  198. package/dist/engine-BXxvcxVq.cjs +3195 -0
  199. package/dist/engine-BXxvcxVq.cjs.map +1 -0
  200. package/dist/engine-z0UClzE9.mjs +3082 -0
  201. package/dist/engine-z0UClzE9.mjs.map +1 -0
  202. package/dist/errors-D8Gwp5kU.mjs +23 -0
  203. package/dist/errors-D8Gwp5kU.mjs.map +1 -0
  204. package/dist/errors-DMC4Umsb.cjs +34 -0
  205. package/dist/errors-DMC4Umsb.cjs.map +1 -0
  206. package/dist/github-DJgO5z37.mjs +829 -0
  207. package/dist/github-DJgO5z37.mjs.map +1 -0
  208. package/dist/github-DWoFgxtl.cjs +829 -0
  209. package/dist/github-DWoFgxtl.cjs.map +1 -0
  210. package/dist/identity-CBXr4wNi.mjs +129 -0
  211. package/dist/identity-CBXr4wNi.mjs.map +1 -0
  212. package/dist/identity-CbLfgQNT.cjs +182 -0
  213. package/dist/identity-CbLfgQNT.cjs.map +1 -0
  214. package/dist/{index-C6e-ULLx.d.mts → index-8OfpOtSI.d.cts} +39 -24
  215. package/dist/index-8OfpOtSI.d.cts.map +1 -0
  216. package/dist/{index-CR5urhWX.d.cts → index-Dpji6Bxq.d.mts} +39 -24
  217. package/dist/index-Dpji6Bxq.d.mts.map +1 -0
  218. package/dist/index.cjs +10022 -12718
  219. package/dist/index.cjs.map +1 -1
  220. package/dist/index.d.cts +1 -1
  221. package/dist/index.d.mts +1 -1
  222. package/dist/index.mjs +10648 -13356
  223. package/dist/index.mjs.map +1 -1
  224. package/dist/local-BwC2v2Y8.mjs +224 -0
  225. package/dist/local-BwC2v2Y8.mjs.map +1 -0
  226. package/dist/local-DNhnkugT.cjs +241 -0
  227. package/dist/local-DNhnkugT.cjs.map +1 -0
  228. package/dist/migrate-B1OjPwUY.cjs +181 -0
  229. package/dist/migrate-B1OjPwUY.cjs.map +1 -0
  230. package/dist/migrate-CWSCkzu3.cjs +271 -0
  231. package/dist/migrate-CWSCkzu3.cjs.map +1 -0
  232. package/dist/migrate-DIVxoju6.mjs +266 -0
  233. package/dist/migrate-DIVxoju6.mjs.map +1 -0
  234. package/dist/migrate-DoI2hWNH.mjs +181 -0
  235. package/dist/migrate-DoI2hWNH.mjs.map +1 -0
  236. package/dist/openapi.cjs +214 -10
  237. package/dist/openapi.cjs.map +1 -0
  238. package/dist/openapi.d.cts +38 -17
  239. package/dist/openapi.d.cts.map +1 -1
  240. package/dist/openapi.d.mts +38 -17
  241. package/dist/openapi.d.mts.map +1 -1
  242. package/dist/openapi.mjs +208 -5
  243. package/dist/openapi.mjs.map +1 -0
  244. package/dist/projectBucket-BBbQ1lHF.cjs +263 -0
  245. package/dist/projectBucket-BBbQ1lHF.cjs.map +1 -0
  246. package/dist/projectBucket-C_DN4WzF.mjs +222 -0
  247. package/dist/projectBucket-C_DN4WzF.mjs.map +1 -0
  248. package/dist/provider-BqpjG9QM.cjs +57 -0
  249. package/dist/provider-BqpjG9QM.cjs.map +1 -0
  250. package/dist/provider-CEOKk8NS.mjs +46 -0
  251. package/dist/provider-CEOKk8NS.mjs.map +1 -0
  252. package/dist/ready-BtxiI7Qb.cjs +403 -0
  253. package/dist/ready-BtxiI7Qb.cjs.map +1 -0
  254. package/dist/ready-CzHNHhI6.mjs +374 -0
  255. package/dist/ready-CzHNHhI6.mjs.map +1 -0
  256. package/dist/reconcile/public.cjs +3 -5
  257. package/dist/reconcile/public.d.cts +11 -87
  258. package/dist/reconcile/public.d.cts.map +1 -1
  259. package/dist/reconcile/public.d.mts +11 -87
  260. package/dist/reconcile/public.d.mts.map +1 -1
  261. package/dist/reconcile/public.mjs +3 -4
  262. package/dist/{reconcile-CFs8C_1a.mjs → reconcile--I7V4Klj.mjs} +4 -7
  263. package/dist/reconcile--I7V4Klj.mjs.map +1 -0
  264. package/dist/{reconcile-D0pimNiy.cjs → reconcile-CuCQBa5-.cjs} +5 -8
  265. package/dist/reconcile-CuCQBa5-.cjs.map +1 -0
  266. package/dist/resolve-WAwYMN6q.cjs +316 -0
  267. package/dist/resolve-WAwYMN6q.cjs.map +1 -0
  268. package/dist/resolve-pmXIdi9j.mjs +263 -0
  269. package/dist/resolve-pmXIdi9j.mjs.map +1 -0
  270. package/dist/rollback-CLtwbByg.mjs +136 -0
  271. package/dist/rollback-CLtwbByg.mjs.map +1 -0
  272. package/dist/rollback-Cz8F9xSB.cjs +165 -0
  273. package/dist/rollback-Cz8F9xSB.cjs.map +1 -0
  274. package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
  275. package/dist/{chunk-CUT6urMc.cjs → rolldown-runtime-C0BPl7ul.cjs} +23 -10
  276. package/dist/run-BJLIerMM.mjs +133 -0
  277. package/dist/run-BJLIerMM.mjs.map +1 -0
  278. package/dist/run-fVZ-rLnc.cjs +174 -0
  279. package/dist/run-fVZ-rLnc.cjs.map +1 -0
  280. package/dist/runtime-ACdfK59n.d.cts +82 -0
  281. package/dist/runtime-ACdfK59n.d.cts.map +1 -0
  282. package/dist/runtime-YyQuekxi.d.mts +82 -0
  283. package/dist/runtime-YyQuekxi.d.mts.map +1 -0
  284. package/dist/s3-CrPoA89T.cjs +215 -0
  285. package/dist/s3-CrPoA89T.cjs.map +1 -0
  286. package/dist/s3-DQXZdmCM.mjs +215 -0
  287. package/dist/s3-DQXZdmCM.mjs.map +1 -0
  288. package/dist/sandbox/config-worker.cjs +43 -0
  289. package/dist/sandbox/config-worker.cjs.map +1 -0
  290. package/dist/sandbox/config-worker.d.cts +1 -0
  291. package/dist/sandbox/config-worker.d.mts +1 -0
  292. package/dist/sandbox/config-worker.mjs +44 -0
  293. package/dist/sandbox/config-worker.mjs.map +1 -0
  294. package/dist/sandbox/credentials-worker.cjs +54 -0
  295. package/dist/sandbox/credentials-worker.cjs.map +1 -0
  296. package/dist/sandbox/credentials-worker.d.cts +1 -0
  297. package/dist/sandbox/credentials-worker.d.mts +1 -0
  298. package/dist/sandbox/credentials-worker.mjs +55 -0
  299. package/dist/sandbox/credentials-worker.mjs.map +1 -0
  300. package/dist/sandbox/discover-worker.cjs +47 -0
  301. package/dist/sandbox/discover-worker.cjs.map +1 -0
  302. package/dist/sandbox/discover-worker.d.cts +1 -0
  303. package/dist/sandbox/discover-worker.d.mts +1 -0
  304. package/dist/sandbox/discover-worker.mjs +48 -0
  305. package/dist/sandbox/discover-worker.mjs.map +1 -0
  306. package/dist/sandbox/migrate-worker.cjs +75 -0
  307. package/dist/sandbox/migrate-worker.cjs.map +1 -0
  308. package/dist/sandbox/migrate-worker.d.cts +1 -0
  309. package/dist/sandbox/migrate-worker.d.mts +1 -0
  310. package/dist/sandbox/migrate-worker.mjs +76 -0
  311. package/dist/sandbox/migrate-worker.mjs.map +1 -0
  312. package/dist/sandbox-C4g1eG31.d.mts +104 -0
  313. package/dist/sandbox-C4g1eG31.d.mts.map +1 -0
  314. package/dist/sandbox-CHv3OYXg.cjs +165 -0
  315. package/dist/sandbox-CHv3OYXg.cjs.map +1 -0
  316. package/dist/sandbox-CbVB7uOD.mjs +118 -0
  317. package/dist/sandbox-CbVB7uOD.mjs.map +1 -0
  318. package/dist/sandbox-CdKgQ3XU.d.cts +104 -0
  319. package/dist/sandbox-CdKgQ3XU.d.cts.map +1 -0
  320. package/dist/{workspace-C6VJQVtG.cjs → schemas-BCwKKA42.mjs} +958 -1842
  321. package/dist/schemas-BCwKKA42.mjs.map +1 -0
  322. package/dist/{workspace-zoqRbihZ.mjs → schemas-BQ_v0lEX.cjs} +1048 -1658
  323. package/dist/schemas-BQ_v0lEX.cjs.map +1 -0
  324. package/dist/secretsManager-CQORubp9.mjs +97 -0
  325. package/dist/secretsManager-CQORubp9.mjs.map +1 -0
  326. package/dist/secretsManager-RAGcEDX1.cjs +108 -0
  327. package/dist/secretsManager-RAGcEDX1.cjs.map +1 -0
  328. package/dist/seeds-BHKUAExH.mjs +8148 -0
  329. package/dist/seeds-BHKUAExH.mjs.map +1 -0
  330. package/dist/seeds-Dk4WHhjU.cjs +9115 -0
  331. package/dist/seeds-Dk4WHhjU.cjs.map +1 -0
  332. package/dist/sniffer-BjBZ01PE.cjs +1998 -0
  333. package/dist/sniffer-BjBZ01PE.cjs.map +1 -0
  334. package/dist/sniffer-CaXl51vO.mjs +1825 -0
  335. package/dist/sniffer-CaXl51vO.mjs.map +1 -0
  336. package/dist/sst-B-Uz4cvm.cjs +464 -0
  337. package/dist/sst-B-Uz4cvm.cjs.map +1 -0
  338. package/dist/sst-C1pxbFEd.mjs +441 -0
  339. package/dist/sst-C1pxbFEd.mjs.map +1 -0
  340. package/dist/stages-DJrOYLZ-.mjs +176 -0
  341. package/dist/stages-DJrOYLZ-.mjs.map +1 -0
  342. package/dist/stages-_3RVNG83.cjs +176 -0
  343. package/dist/stages-_3RVNG83.cjs.map +1 -0
  344. package/dist/target/public.cjs +15 -0
  345. package/dist/target/public.d.cts +28 -0
  346. package/dist/target/public.d.cts.map +1 -0
  347. package/dist/target/public.d.mts +28 -0
  348. package/dist/target/public.d.mts.map +1 -0
  349. package/dist/target/public.mjs +4 -0
  350. package/dist/terminal-Bs_lNQhL.mjs +85 -0
  351. package/dist/terminal-Bs_lNQhL.mjs.map +1 -0
  352. package/dist/terminal-CsQz4oT0.cjs +85 -0
  353. package/dist/terminal-CsQz4oT0.cjs.map +1 -0
  354. package/dist/types-B6UXlEkf.d.cts +7650 -0
  355. package/dist/types-B6UXlEkf.d.cts.map +1 -0
  356. package/dist/types-HqVPddRK.d.mts +7649 -0
  357. package/dist/types-HqVPddRK.d.mts.map +1 -0
  358. package/dist/utils-D2Nk1Nv2.cjs +205 -0
  359. package/dist/utils-D2Nk1Nv2.cjs.map +1 -0
  360. package/dist/utils-D_fxUqvU.mjs +156 -0
  361. package/dist/utils-D_fxUqvU.mjs.map +1 -0
  362. package/dist/vitest.cjs +65 -0
  363. package/dist/vitest.cjs.map +1 -0
  364. package/dist/vitest.d.cts +29 -0
  365. package/dist/vitest.d.cts.map +1 -0
  366. package/dist/vitest.d.mts +29 -0
  367. package/dist/vitest.d.mts.map +1 -0
  368. package/dist/vitest.mjs +65 -0
  369. package/dist/vitest.mjs.map +1 -0
  370. package/dist/workerRuntime-BXfhbe13.cjs +108 -0
  371. package/dist/workerRuntime-BXfhbe13.cjs.map +1 -0
  372. package/dist/workerRuntime-CsOyBRx2.mjs +79 -0
  373. package/dist/workerRuntime-CsOyBRx2.mjs.map +1 -0
  374. package/dist/workspace/index.cjs +8 -4
  375. package/dist/workspace/index.d.cts +3 -3
  376. package/dist/workspace/index.d.mts +3 -3
  377. package/dist/workspace/index.mjs +2 -3
  378. package/dist/workspace-BwqQnool.cjs +2806 -0
  379. package/dist/workspace-BwqQnool.cjs.map +1 -0
  380. package/dist/workspace-D1QbNd55.mjs +2394 -0
  381. package/dist/workspace-D1QbNd55.mjs.map +1 -0
  382. package/package.json +54 -22
  383. package/dist/CachedStateProvider-BLo7zv7S.cjs +0 -3
  384. package/dist/CachedStateProvider-BxoAm-B2.mjs +0 -3
  385. package/dist/CachedStateProvider-CqPdW7CB.cjs +0 -60
  386. package/dist/CachedStateProvider-CqPdW7CB.cjs.map +0 -1
  387. package/dist/CachedStateProvider-DTniehMP.mjs +0 -54
  388. package/dist/CachedStateProvider-DTniehMP.mjs.map +0 -1
  389. package/dist/HostingerProvider-Cft7lEYr.mjs.map +0 -1
  390. package/dist/HostingerProvider-h3EbEp-Z.cjs.map +0 -1
  391. package/dist/LocalStateProvider-Bn6tS-oL.mjs +0 -42
  392. package/dist/LocalStateProvider-Bn6tS-oL.mjs.map +0 -1
  393. package/dist/LocalStateProvider-Db9SEjyH.cjs +0 -43
  394. package/dist/LocalStateProvider-Db9SEjyH.cjs.map +0 -1
  395. package/dist/Route53Provider-RdpUDJQk.mjs.map +0 -1
  396. package/dist/Route53Provider-di2fMM5N.cjs.map +0 -1
  397. package/dist/SSMStateProvider-BRt2py-A.mjs +0 -66
  398. package/dist/SSMStateProvider-BRt2py-A.mjs.map +0 -1
  399. package/dist/SSMStateProvider-DyX8s9HI.cjs +0 -66
  400. package/dist/SSMStateProvider-DyX8s9HI.cjs.map +0 -1
  401. package/dist/backup-provisioner-Bgj5Vi_L.mjs.map +0 -1
  402. package/dist/backup-provisioner-BrsHwYG0.cjs.map +0 -1
  403. package/dist/bundler-BY1OmV1e.cjs.map +0 -1
  404. package/dist/bundler-Be8Zg4Wd.mjs.map +0 -1
  405. package/dist/chunk-Duj1WY3L.mjs +0 -7
  406. package/dist/config-BZ1F0WuA.cjs +0 -462
  407. package/dist/config-BZ1F0WuA.cjs.map +0 -1
  408. package/dist/config-DVVph9yz.mjs +0 -402
  409. package/dist/config-DVVph9yz.mjs.map +0 -1
  410. package/dist/config.d.cts.map +0 -1
  411. package/dist/config.d.mts.map +0 -1
  412. package/dist/credentials-B5zRHdAl.mjs +0 -141
  413. package/dist/credentials-B5zRHdAl.mjs.map +0 -1
  414. package/dist/credentials-BapzjyV5.cjs +0 -195
  415. package/dist/credentials-BapzjyV5.cjs.map +0 -1
  416. package/dist/credentials-Xamqe_NJ.cjs +0 -2681
  417. package/dist/credentials-Xamqe_NJ.cjs.map +0 -1
  418. package/dist/credentials-dP8vRVRv.mjs +0 -2549
  419. package/dist/credentials-dP8vRVRv.mjs.map +0 -1
  420. package/dist/discover-CAlFgYec.mjs +0 -229
  421. package/dist/discover-CAlFgYec.mjs.map +0 -1
  422. package/dist/discover-DTmFeloL.cjs +0 -271
  423. package/dist/discover-DTmFeloL.cjs.map +0 -1
  424. package/dist/dokploy-api-BS2xnJLZ.mjs +0 -3
  425. package/dist/dokploy-api-BsVH0y_s.cjs +0 -718
  426. package/dist/dokploy-api-BsVH0y_s.cjs.map +0 -1
  427. package/dist/dokploy-api-BuxDRo3l.cjs +0 -3
  428. package/dist/dokploy-api-aTFPz7_4.mjs +0 -706
  429. package/dist/dokploy-api-aTFPz7_4.mjs.map +0 -1
  430. package/dist/emit-CbcRolsa.cjs.map +0 -1
  431. package/dist/emit-CiZS_5Ub.mjs.map +0 -1
  432. package/dist/encryption-C6jaU0hE.cjs +0 -54
  433. package/dist/encryption-C6jaU0hE.cjs.map +0 -1
  434. package/dist/encryption-CHzzeR8a.cjs +0 -4
  435. package/dist/encryption-CQUncu7v.mjs +0 -3
  436. package/dist/encryption-D-abyhZx.mjs +0 -42
  437. package/dist/encryption-D-abyhZx.mjs.map +0 -1
  438. package/dist/fullstack-secrets-C-GGohke.cjs +0 -111
  439. package/dist/fullstack-secrets-C-GGohke.cjs.map +0 -1
  440. package/dist/fullstack-secrets-D1o9-G5l.mjs +0 -87
  441. package/dist/fullstack-secrets-D1o9-G5l.mjs.map +0 -1
  442. package/dist/generator-CNzBw7g5.cjs +0 -289
  443. package/dist/generator-CNzBw7g5.cjs.map +0 -1
  444. package/dist/generator-VE2JrFlY.mjs +0 -253
  445. package/dist/generator-VE2JrFlY.mjs.map +0 -1
  446. package/dist/index-C6e-ULLx.d.mts.map +0 -1
  447. package/dist/index-CR5urhWX.d.cts.map +0 -1
  448. package/dist/openapi-SjsgARie.cjs +0 -2075
  449. package/dist/openapi-SjsgARie.cjs.map +0 -1
  450. package/dist/openapi-Xx0A7Wg0.mjs +0 -2021
  451. package/dist/openapi-Xx0A7Wg0.mjs.map +0 -1
  452. package/dist/openapi-react-query-Byltvm_7.mjs +0 -167
  453. package/dist/openapi-react-query-Byltvm_7.mjs.map +0 -1
  454. package/dist/openapi-react-query-CmJ1xDbn.cjs +0 -173
  455. package/dist/openapi-react-query-CmJ1xDbn.cjs.map +0 -1
  456. package/dist/openapi-react-query.cjs +0 -4
  457. package/dist/openapi-react-query.d.cts +0 -11
  458. package/dist/openapi-react-query.d.cts.map +0 -1
  459. package/dist/openapi-react-query.d.mts +0 -11
  460. package/dist/openapi-react-query.d.mts.map +0 -1
  461. package/dist/openapi-react-query.mjs +0 -4
  462. package/dist/reconcile-CFs8C_1a.mjs.map +0 -1
  463. package/dist/reconcile-D0pimNiy.cjs.map +0 -1
  464. package/dist/setup-BA8ciTPU.mjs +0 -11
  465. package/dist/setup-BsZvZP6f.cjs +0 -11
  466. package/dist/setup-C8KOx8_8.mjs +0 -443
  467. package/dist/setup-C8KOx8_8.mjs.map +0 -1
  468. package/dist/setup-hC6hI86f.cjs +0 -473
  469. package/dist/setup-hC6hI86f.cjs.map +0 -1
  470. package/dist/storage-BJmzYxt8.cjs +0 -363
  471. package/dist/storage-BJmzYxt8.cjs.map +0 -1
  472. package/dist/storage-BM9hGpgv.cjs +0 -7
  473. package/dist/storage-Bi24WfoW.mjs +0 -297
  474. package/dist/storage-Bi24WfoW.mjs.map +0 -1
  475. package/dist/storage-CYlGwWTj.mjs +0 -3
  476. package/dist/sync-CmEuNZsB.mjs +0 -76
  477. package/dist/sync-CmEuNZsB.mjs.map +0 -1
  478. package/dist/sync-D306yOWu.cjs +0 -4
  479. package/dist/sync-SizaChmC.cjs +0 -93
  480. package/dist/sync-SizaChmC.cjs.map +0 -1
  481. package/dist/sync-hOqAWHR6.mjs +0 -3
  482. package/dist/types-6pkp2RRj.d.mts +0 -2220
  483. package/dist/types-6pkp2RRj.d.mts.map +0 -1
  484. package/dist/types-Y3fKQSAK.d.cts +0 -2220
  485. package/dist/types-Y3fKQSAK.d.cts.map +0 -1
  486. package/dist/workspace-BzrG_2SI.mjs +0 -8
  487. package/dist/workspace-C6VJQVtG.cjs.map +0 -1
  488. package/dist/workspace-XXtNhqJl.cjs +0 -9
  489. package/dist/workspace-zoqRbihZ.mjs.map +0 -1
@@ -1,61 +1,10 @@
1
- const require_chunk = require('./chunk-CUT6urMc.cjs');
2
- const node_path = require_chunk.__toESM(require("node:path"));
3
-
4
- //#region src/workspace/publicEnv.ts
5
- /**
6
- * All public env-var prefixes the toolbox understands.
7
- *
8
- * Used when resolving incoming var names back to a dependency
9
- * (e.g. `VITE_AUTH_URL` → `auth`). A var matching any of these
10
- * is considered safe to inline into a client bundle.
11
- */
12
- const PUBLIC_ENV_PREFIXES = [
13
- "NEXT_PUBLIC_",
14
- "VITE_",
15
- "EXPO_PUBLIC_"
16
- ];
17
- /**
18
- * Resolve the public env-var prefix that a frontend framework's bundler
19
- * inlines into client code at build time:
20
- *
21
- * - `nextjs` → `NEXT_PUBLIC_`
22
- * - `vite` → `VITE_`
23
- * - `tanstack-start` → `VITE_` (uses Vite under the hood)
24
- * - `expo` → `EXPO_PUBLIC_`
25
- * - `remix` → `''` (Remix exposes via loaders, no prefix convention)
26
- *
27
- * For backend frameworks or unspecified, falls back to `NEXT_PUBLIC_` to
28
- * preserve the historical default. Backend apps never read these vars
29
- * from a bundle, so the prefix only affects scaffolding/symmetry.
30
- */
31
- function getPublicEnvPrefix(framework) {
32
- switch (framework) {
33
- case "vite":
34
- case "tanstack-start": return "VITE_";
35
- case "expo": return "EXPO_PUBLIC_";
36
- case "remix": return "";
37
- case "nextjs": return "NEXT_PUBLIC_";
38
- default: return "NEXT_PUBLIC_";
39
- }
40
- }
41
- /**
42
- * Strip a known public prefix from a var name.
43
- * Returns the un-prefixed name, or `null` if no prefix matched.
44
- */
45
- function stripPublicPrefix(name) {
46
- for (const prefix of PUBLIC_ENV_PREFIXES) if (prefix && name.startsWith(prefix)) return name.slice(prefix.length);
47
- return null;
48
- }
49
-
50
- //#endregion
51
1
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/util.js
52
2
  function getEnumValues(entries) {
53
3
  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;
4
+ return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
56
5
  }
57
- function joinValues(array$1, separator = "|") {
58
- return array$1.map((val) => stringifyPrimitive(val)).join(separator);
6
+ function joinValues(array, separator = "|") {
7
+ return array.map((val) => stringifyPrimitive(val)).join(separator);
59
8
  }
60
9
  function jsonStringifyReplacer(_, value) {
61
10
  if (typeof value === "bigint") return value.toString();
@@ -93,6 +42,24 @@ function floatSafeRemainder(val, step) {
93
42
  if (Math.abs(ratio - roundedRatio) < tolerance) return 0;
94
43
  return ratio - roundedRatio;
95
44
  }
45
+ const EVALUATING = /* @__PURE__*/ Symbol("evaluating");
46
+ function defineLazy(object, key, getter) {
47
+ let value = void 0;
48
+ Object.defineProperty(object, key, {
49
+ get() {
50
+ if (value === EVALUATING) return;
51
+ if (value === void 0) {
52
+ value = EVALUATING;
53
+ value = getter();
54
+ }
55
+ return value;
56
+ },
57
+ set(v) {
58
+ Object.defineProperty(object, key, { value: v });
59
+ },
60
+ configurable: true
61
+ });
62
+ }
96
63
  function assignProp(target, prop, value) {
97
64
  Object.defineProperty(target, prop, {
98
65
  value,
@@ -171,12 +138,11 @@ const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace
171
138
  function isObject(data) {
172
139
  return typeof data === "object" && data !== null && !Array.isArray(data);
173
140
  }
174
- const allowsEval = /* @__PURE__ */ cached(() => {
141
+ const allowsEval = /* @__PURE__*/ cached(() => {
175
142
  if (globalConfig.jitless) return false;
176
143
  if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) return false;
177
144
  try {
178
- const F = Function;
179
- new F("");
145
+ new Function("");
180
146
  return true;
181
147
  } catch (_) {
182
148
  return false;
@@ -199,7 +165,7 @@ function shallowClone(o) {
199
165
  if (o instanceof Set) return new Set(o);
200
166
  return o;
201
167
  }
202
- const propertyKeyTypes = /* @__PURE__ */ new Set([
168
+ const propertyKeyTypes = /* @__PURE__*/ new Set([
203
169
  "string",
204
170
  "number",
205
171
  "symbol"
@@ -237,7 +203,7 @@ function optionalKeys(shape) {
237
203
  return shape[k]._zod.optin !== void 0 && shape[k]._zod.optout === "optional";
238
204
  });
239
205
  }
240
- const NUMBER_FORMAT_RANGES = /* @__PURE__ */ (() => ({
206
+ const NUMBER_FORMAT_RANGES = /*@__PURE__*/ (() => ({
241
207
  safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
242
208
  int32: [-2147483648, 2147483647],
243
209
  uint32: [0, 4294967295],
@@ -245,14 +211,13 @@ const NUMBER_FORMAT_RANGES = /* @__PURE__ */ (() => ({
245
211
  float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
246
212
  }))();
247
213
  const BIGINT_FORMAT_RANGES = {
248
- int64: [/* @__PURE__ */ BigInt("-9223372036854775808"), /* @__PURE__ */ BigInt("9223372036854775807")],
249
- uint64: [/* @__PURE__ */ BigInt(0), /* @__PURE__ */ BigInt("18446744073709551615")]
214
+ int64: [/* @__PURE__*/ BigInt("-9223372036854775808"), /* @__PURE__*/ BigInt("9223372036854775807")],
215
+ uint64: [/* @__PURE__*/ BigInt(0), /* @__PURE__*/ BigInt("18446744073709551615")]
250
216
  };
251
217
  function pick(schema, mask) {
252
218
  const currDef = schema._zod.def;
253
219
  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");
220
+ if (checks && checks.length > 0) throw new Error(".pick() cannot be used on object schemas containing refinements");
256
221
  const newShape = {};
257
222
  mirrorShape(newShape, schema, maskedKeys(schema, mask));
258
223
  return clone(schema, mergeDefs(currDef, {
@@ -272,8 +237,7 @@ function maskedKeys(schema, mask) {
272
237
  function omit(schema, mask) {
273
238
  const currDef = schema._zod.def;
274
239
  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");
240
+ if (checks && checks.length > 0) throw new Error(".omit() cannot be used on object schemas containing refinements");
277
241
  const omitted = new Set(maskedKeys(schema, mask));
278
242
  const newShape = {};
279
243
  mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)).filter((key) => !omitted.has(key)));
@@ -285,8 +249,7 @@ function omit(schema, mask) {
285
249
  function extend(schema, shape) {
286
250
  if (!isPlainObject(shape)) throw new Error("Invalid input to extend: expected a plain object");
287
251
  const checks = schema._zod.def.checks;
288
- const hasChecks = checks && checks.length > 0;
289
- if (hasChecks) {
252
+ if (checks && checks.length > 0) {
290
253
  const existingShape = sourceShape(schema);
291
254
  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
255
  }
@@ -308,20 +271,17 @@ function merge(a, b) {
308
271
  const newShape = {};
309
272
  mirrorShape(newShape, a, Reflect.ownKeys(sourceShape(a)));
310
273
  mirrorShape(newShape, b, Reflect.ownKeys(sourceShape(b)));
311
- const def = mergeDefs(a._zod.def, {
274
+ return clone(a, mergeDefs(a._zod.def, {
312
275
  shape: newShape,
313
276
  get catchall() {
314
277
  return b._zod.def.catchall;
315
278
  },
316
279
  checks: b._zod.def.checks ?? []
317
- });
318
- return clone(a, def);
280
+ }));
319
281
  }
320
282
  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`);
283
+ const checks = schema._zod.def.checks;
284
+ if (checks && checks.length > 0) throw new Error(`.${name}() cannot be used on object schemas containing refinements`);
325
285
  const selected = mask ? new Set(maskedKeys(schema, mask)) : void 0;
326
286
  const newShape = {};
327
287
  mirrorShape(newShape, schema, Reflect.ownKeys(sourceShape(schema)), Class && ((value, key) => selected && !selected.has(key) ? value : new Class({
@@ -354,8 +314,8 @@ function explicitlyAborted(x, startIndex = 0) {
354
314
  }
355
315
  function prefixIssues(path, issues) {
356
316
  return issues.map((iss) => {
357
- var _a$2;
358
- (_a$2 = iss).path ?? (_a$2.path = []);
317
+ var _a;
318
+ (_a = iss).path ?? (_a.path = []);
359
319
  iss.path.unshift(path);
360
320
  return iss;
361
321
  });
@@ -364,16 +324,18 @@ function unwrapMessage(message) {
364
324
  return typeof message === "string" ? message : message?.message;
365
325
  }
366
326
  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);
327
+ var _a;
328
+ for (let i = start; i < issues.length; i++) (_a = issues[i]).schema ?? (_a.schema = inst);
369
329
  }
370
- function finalizeIssue(iss, ctx, config$1) {
371
- var _a$2;
330
+ function finalizeIssue(iss, ctx, config) {
331
+ var _a;
372
332
  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;
333
+ if (traits?.has("$ZodType")) {
334
+ if (traits.has("$ZodCheck")) (_a = iss).schema ?? (_a.schema = iss.inst);
335
+ else iss.schema = iss.inst;
336
+ }
375
337
  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";
338
+ 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
339
  const full = {};
378
340
  for (const k of Object.keys(iss)) {
379
341
  if (k === "inst" || k === "schema" || k === "continue" || k === "input" || k === "__proto__") continue;
@@ -491,7 +453,6 @@ const breaker = {
491
453
  configurable: true,
492
454
  get() {
493
455
  broke = true;
494
- return void 0;
495
456
  }
496
457
  };
497
458
  /**
@@ -577,7 +538,6 @@ function constantCatch(value) {
577
538
  fn[CONSTANT_CATCH] = true;
578
539
  return fn;
579
540
  }
580
-
581
541
  //#endregion
582
542
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/core.js
583
543
  var _a$1;
@@ -606,7 +566,7 @@ function newError(Definition) {
606
566
  }
607
567
  return new Definition();
608
568
  }
609
- function $constructor(name, initializer$2, proto, params) {
569
+ function $constructor(name, initializer, proto, params) {
610
570
  const zodProto = {};
611
571
  function Internals(def) {
612
572
  this.def = def;
@@ -626,22 +586,22 @@ function $constructor(name, initializer$2, proto, params) {
626
586
  }
627
587
  } else if (inst._zod.traits.has(name)) return;
628
588
  inst._zod.traits.add(name);
629
- initializer$2(inst, def);
589
+ initializer(inst, def);
630
590
  if (initialized) {
631
- const own$1 = Object.getPrototypeOf(inst);
591
+ const own = Object.getPrototypeOf(inst);
632
592
  const ctorProto = inst._zod.constr.prototype;
633
- let up = own$1;
593
+ let up = own;
634
594
  while (up && up !== ctorProto) up = Object.getPrototypeOf(up);
635
- const target = up ?? own$1;
595
+ const target = up ?? own;
636
596
  if (!initialized.has(target)) {
637
597
  initialized.add(target);
638
598
  members(target, protoMembers);
639
599
  }
640
600
  }
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);
601
+ const proto = _.prototype;
602
+ for (const k in proto) {
603
+ if (!Object.prototype.hasOwnProperty.call(proto, k)) continue;
604
+ if (!(k in inst)) inst[k] = proto[k].bind(inst);
645
605
  }
646
606
  }
647
607
  const Parent = params?.Parent ?? Object;
@@ -684,7 +644,6 @@ function config(newConfig) {
684
644
  if (newConfig) Object.assign(globalConfig, newConfig);
685
645
  return globalConfig;
686
646
  }
687
-
688
647
  //#endregion
689
648
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/errors.js
690
649
  function _getMessage() {
@@ -738,39 +697,41 @@ const initializer$1 = (inst, def) => {
738
697
  }
739
698
  };
740
699
  const $ZodError = $constructor("$ZodError", initializer$1);
741
- const $ZodRealError = $constructor("$ZodError", initializer$1, void 0, { Parent: Error });
700
+ $constructor("$ZodError", initializer$1, void 0, { Parent: Error });
742
701
  /** Get-or-create `obj[key]` as an own data property. A path segment naming an inherited member
743
702
  * ("toString", "constructor") would otherwise read through to the prototype, and assigning
744
703
  * "__proto__" would hit the setter instead of creating a key. */
745
704
  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();
705
+ if (!Object.prototype.hasOwnProperty.call(obj, key)) {
706
+ if (key === "__proto__") Object.defineProperty(obj, key, {
707
+ value: make(),
708
+ writable: true,
709
+ enumerable: true,
710
+ configurable: true
711
+ });
712
+ else obj[key] = make();
713
+ }
753
714
  return obj[key];
754
715
  }
755
- function flattenError(error$1, mapper = (issue$1) => issue$1.message) {
716
+ function flattenError(error, mapper = (issue) => issue.message) {
756
717
  const fieldErrors = {};
757
718
  const formErrors = [];
758
- for (const sub of error$1.issues) if (sub.path.length > 0) node(fieldErrors, sub.path[0], () => []).push(mapper(sub));
719
+ for (const sub of error.issues) if (sub.path.length > 0) node(fieldErrors, sub.path[0], () => []).push(mapper(sub));
759
720
  else formErrors.push(mapper(sub));
760
721
  return {
761
722
  formErrors,
762
723
  fieldErrors
763
724
  };
764
725
  }
765
- function formatError(error$1, mapper = (issue$1) => issue$1.message) {
726
+ function formatError(error, mapper = (issue) => issue.message) {
766
727
  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]);
728
+ const processError = (error, path = []) => {
729
+ for (const issue of error.issues) if (issue.code === "invalid_union" && issue.errors.length) issue.errors.map((issues) => processError({ issues }, [...path, ...issue.path]));
730
+ else if (issue.code === "invalid_key") processError({ issues: issue.issues }, [...path, ...issue.path]);
731
+ else if (issue.code === "invalid_element") processError({ issues: issue.issues }, [...path, ...issue.path]);
771
732
  else {
772
- const fullpath = [...path, ...issue$1.path];
773
- if (fullpath.length === 0) fieldErrors._errors.push(mapper(issue$1));
733
+ const fullpath = [...path, ...issue.path];
734
+ if (fullpath.length === 0) fieldErrors._errors.push(mapper(issue));
774
735
  else {
775
736
  let curr = fieldErrors;
776
737
  let i = 0;
@@ -778,7 +739,7 @@ function formatError(error$1, mapper = (issue$1) => issue$1.message) {
778
739
  const el = fullpath[i];
779
740
  const terminal = i === fullpath.length - 1;
780
741
  if (el === "_errors") {
781
- if (terminal) curr._errors.push(mapper(issue$1));
742
+ if (terminal) curr._errors.push(mapper(issue));
782
743
  i++;
783
744
  continue;
784
745
  }
@@ -788,18 +749,17 @@ function formatError(error$1, mapper = (issue$1) => issue$1.message) {
788
749
  writable: true,
789
750
  configurable: true
790
751
  });
791
- const node$1 = curr[el];
792
- if (terminal) node$1._errors.push(mapper(issue$1));
793
- curr = node$1;
752
+ const node = curr[el];
753
+ if (terminal) node._errors.push(mapper(issue));
754
+ curr = node;
794
755
  i++;
795
756
  }
796
757
  }
797
758
  }
798
759
  };
799
- processError(error$1);
760
+ processError(error);
800
761
  return fieldErrors;
801
762
  }
802
-
803
763
  //#endregion
804
764
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/parse.js
805
765
  function finalizeParams(callee, params) {
@@ -820,7 +780,7 @@ const _parse = (_Err) => {
820
780
  }, ctx);
821
781
  if (result instanceof Promise) throw new $ZodAsyncError();
822
782
  if (result.issues.length) {
823
- const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
783
+ const e = new ((_params?.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
824
784
  captureStackTrace(e, _params?.callee ?? fn);
825
785
  throw e;
826
786
  }
@@ -828,7 +788,6 @@ const _parse = (_Err) => {
828
788
  };
829
789
  return fn;
830
790
  };
831
- const parse$1 = /* @__PURE__ */ _parse($ZodRealError);
832
791
  const _parseAsync = (_Err) => {
833
792
  const fn = async (schema, value, _ctx, params) => {
834
793
  const ctx = _ctx ? {
@@ -841,7 +800,7 @@ const _parseAsync = (_Err) => {
841
800
  }, ctx);
842
801
  if (result instanceof Promise) result = await result;
843
802
  if (result.issues.length) {
844
- const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
803
+ const e = new ((params?.Err) ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
845
804
  captureStackTrace(e, params?.callee ?? fn);
846
805
  throw e;
847
806
  }
@@ -849,7 +808,6 @@ const _parseAsync = (_Err) => {
849
808
  };
850
809
  return fn;
851
810
  };
852
- const parseAsync$1 = /* @__PURE__ */ _parseAsync($ZodRealError);
853
811
  const _safeParse = (_Err) => (schema, value, _ctx) => {
854
812
  const ctx = _ctx ? {
855
813
  ..._ctx,
@@ -865,21 +823,20 @@ const _safeParse = (_Err) => (schema, value, _ctx) => {
865
823
  data: result.value
866
824
  };
867
825
  };
868
- const safeParse$1 = /* @__PURE__ */ _safeParse($ZodRealError);
869
826
  function failure(Err, issues, ctx) {
870
- let error$1;
827
+ let error;
871
828
  return {
872
829
  success: false,
873
830
  get error() {
874
- if (!error$1) {
875
- error$1 = new Err(issues.map((iss) => finalizeIssue(iss, ctx, config())));
831
+ if (!error) {
832
+ error = new Err(issues.map((iss) => finalizeIssue(iss, ctx, config())));
876
833
  issues = void 0;
877
834
  ctx = void 0;
878
835
  }
879
- return error$1;
836
+ return error;
880
837
  },
881
838
  set error(e) {
882
- error$1 = e;
839
+ error = e;
883
840
  issues = void 0;
884
841
  ctx = void 0;
885
842
  }
@@ -900,17 +857,16 @@ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
900
857
  data: result.value
901
858
  };
902
859
  };
903
- const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
904
860
  const COMPILE_INVALID = /* @__PURE__ */ Symbol.for("zod.compile.invalid");
905
861
  const COMPILE_FALLBACK = /* @__PURE__ */ Symbol.for("zod.compile.fallback");
906
- const validate = (schema, value, _ctx) => {
862
+ const validate = ((schema, value, _ctx) => {
907
863
  const validator = schema._zod.bag.validator;
908
864
  if (validator !== void 0) {
909
865
  if (validator(value) !== COMPILE_INVALID) return true;
910
866
  if (validator.definite === true && _ctx === void 0) return false;
911
867
  }
912
868
  return validateFallback(schema, value, _ctx);
913
- };
869
+ });
914
870
  function validateFallback(schema, value, _ctx) {
915
871
  const ctx = _ctx ? {
916
872
  ..._ctx,
@@ -935,7 +891,7 @@ function validateFallback(schema, value, _ctx) {
935
891
  if (result instanceof Promise) throw new $ZodAsyncError();
936
892
  return result.issues.length === 0;
937
893
  }
938
- const validateAsync = async (schema, value, _ctx) => {
894
+ const validateAsync$1 = async (schema, value, _ctx) => {
939
895
  const ctx = _ctx ? {
940
896
  ..._ctx,
941
897
  async: true,
@@ -952,45 +908,41 @@ const validateAsync = async (schema, value, _ctx) => {
952
908
  return result.issues.length === 0;
953
909
  };
954
910
  const _encode = (_Err) => {
955
- const parse$2 = _parse(_Err);
911
+ const parse = _parse(_Err);
956
912
  const fn = (schema, value, _ctx, _params) => {
957
913
  const ctx = _ctx ? {
958
914
  ..._ctx,
959
915
  direction: "backward"
960
916
  } : { direction: "backward" };
961
- return parse$2(schema, value, ctx, finalizeParams(fn, _params));
917
+ return parse(schema, value, ctx, finalizeParams(fn, _params));
962
918
  };
963
919
  return fn;
964
920
  };
965
- const encode$1 = /* @__PURE__ */ _encode($ZodRealError);
966
921
  const _decode = (_Err) => {
967
- const parse$2 = _parse(_Err);
922
+ const parse = _parse(_Err);
968
923
  const fn = (schema, value, _ctx, _params) => {
969
- return parse$2(schema, value, _ctx, finalizeParams(fn, _params));
924
+ return parse(schema, value, _ctx, finalizeParams(fn, _params));
970
925
  };
971
926
  return fn;
972
927
  };
973
- const decode$1 = /* @__PURE__ */ _decode($ZodRealError);
974
928
  const _encodeAsync = (_Err) => {
975
- const parseAsync$2 = _parseAsync(_Err);
929
+ const parseAsync = _parseAsync(_Err);
976
930
  const fn = async (schema, value, _ctx, _params) => {
977
931
  const ctx = _ctx ? {
978
932
  ..._ctx,
979
933
  direction: "backward"
980
934
  } : { direction: "backward" };
981
- return await parseAsync$2(schema, value, ctx, finalizeParams(fn, _params));
935
+ return await parseAsync(schema, value, ctx, finalizeParams(fn, _params));
982
936
  };
983
937
  return fn;
984
938
  };
985
- const encodeAsync$1 = /* @__PURE__ */ _encodeAsync($ZodRealError);
986
939
  const _decodeAsync = (_Err) => {
987
- const parseAsync$2 = _parseAsync(_Err);
940
+ const parseAsync = _parseAsync(_Err);
988
941
  const fn = async (schema, value, _ctx, _params) => {
989
- return await parseAsync$2(schema, value, _ctx, finalizeParams(fn, _params));
942
+ return await parseAsync(schema, value, _ctx, finalizeParams(fn, _params));
990
943
  };
991
944
  return fn;
992
945
  };
993
- const decodeAsync$1 = /* @__PURE__ */ _decodeAsync($ZodRealError);
994
946
  const _safeEncode = (_Err) => (schema, value, _ctx) => {
995
947
  const ctx = _ctx ? {
996
948
  ..._ctx,
@@ -998,11 +950,9 @@ const _safeEncode = (_Err) => (schema, value, _ctx) => {
998
950
  } : { direction: "backward" };
999
951
  return _safeParse(_Err)(schema, value, ctx);
1000
952
  };
1001
- const safeEncode$1 = /* @__PURE__ */ _safeEncode($ZodRealError);
1002
953
  const _safeDecode = (_Err) => (schema, value, _ctx) => {
1003
954
  return _safeParse(_Err)(schema, value, _ctx);
1004
955
  };
1005
- const safeDecode$1 = /* @__PURE__ */ _safeDecode($ZodRealError);
1006
956
  const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
1007
957
  const ctx = _ctx ? {
1008
958
  ..._ctx,
@@ -1010,12 +960,9 @@ const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
1010
960
  } : { direction: "backward" };
1011
961
  return _safeParseAsync(_Err)(schema, value, ctx);
1012
962
  };
1013
- const safeEncodeAsync$1 = /* @__PURE__ */ _safeEncodeAsync($ZodRealError);
1014
963
  const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
1015
964
  return _safeParseAsync(_Err)(schema, value, _ctx);
1016
965
  };
1017
- const safeDecodeAsync$1 = /* @__PURE__ */ _safeDecodeAsync($ZodRealError);
1018
-
1019
966
  //#endregion
1020
967
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/regexes.js
1021
968
  /**
@@ -1039,12 +986,12 @@ 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
986
  /** Returns a regex for validating an RFC 9562/4122 UUID.
1040
987
  *
1041
988
  * @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})$`);
989
+ const uuid = (version) => {
990
+ 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)$/;
991
+ 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
992
  };
1046
993
  /** Practical email validation */
1047
- 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,}$/;
994
+ const email$1 = /^(?:[A-Za-z0-9_'+\-]+\.)*[A-Za-z0-9_'+\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
1048
995
  const _emoji$1 = `^(?=[\\s\\S]*[\\p{Extended_Pictographic}\\p{Regional_Indicator}\\u20E3])[\\p{Extended_Pictographic}\\p{Emoji_Component}]+$`;
1049
996
  function emoji() {
1050
997
  return new RegExp(_emoji$1, "u");
@@ -1064,11 +1011,10 @@ const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468
1064
1011
  function anchor(source) {
1065
1012
  return new RegExp(`^${source}$`);
1066
1013
  }
1067
- const date = /* @__PURE__ */ anchor(dateSource);
1014
+ const date = /*@__PURE__*/ anchor(dateSource);
1068
1015
  function timeSource(args) {
1069
1016
  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;
1017
+ 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
1018
  }
1073
1019
  function time(args) {
1074
1020
  return new RegExp(`^${timeSource(args)}$`);
@@ -1089,14 +1035,13 @@ const number$1 = /^-?\d+(?:\.\d+)?$/;
1089
1035
  const boolean$1 = /^(?:true|false)$/i;
1090
1036
  const lowercase = /^[^A-Z]*$/;
1091
1037
  const uppercase = /^[^a-z]*$/;
1092
-
1093
1038
  //#endregion
1094
1039
  //#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;
1040
+ const $ZodCheck = /*@__PURE__*/ $constructor("$ZodCheck", (inst, def) => {
1041
+ var _a;
1097
1042
  inst._zod ?? (inst._zod = {});
1098
1043
  inst._zod.def = def;
1099
- (_a$2 = inst._zod).onattach ?? (_a$2.onattach = []);
1044
+ (_a = inst._zod).onattach ?? (_a.onattach = []);
1100
1045
  });
1101
1046
  /** Default `when` for length-based checks: run only on non-nullish values with a `length`. */
1102
1047
  const _whenHasLength = (payload) => {
@@ -1108,7 +1053,7 @@ const numericOriginMap = {
1108
1053
  bigint: "bigint",
1109
1054
  object: "date"
1110
1055
  };
1111
- const $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => {
1056
+ const $ZodCheckLessThan = /*@__PURE__*/ $constructor("$ZodCheckLessThan", (inst, def) => {
1112
1057
  $ZodCheck.init(inst, def);
1113
1058
  const origin = numericOriginMap[typeof def.value];
1114
1059
  inst._zod.check = (payload) => {
@@ -1124,7 +1069,7 @@ const $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (ins
1124
1069
  });
1125
1070
  };
1126
1071
  });
1127
- const $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
1072
+ const $ZodCheckGreaterThan = /*@__PURE__*/ $constructor("$ZodCheckGreaterThan", (inst, def) => {
1128
1073
  $ZodCheck.init(inst, def);
1129
1074
  const origin = numericOriginMap[typeof def.value];
1130
1075
  inst._zod.check = (payload) => {
@@ -1140,12 +1085,11 @@ const $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan"
1140
1085
  });
1141
1086
  };
1142
1087
  });
1143
- const $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
1088
+ const $ZodCheckMultipleOf = /*@__PURE__*/ $constructor("$ZodCheckMultipleOf", (inst, def) => {
1144
1089
  $ZodCheck.init(inst, def);
1145
1090
  inst._zod.check = (payload) => {
1146
1091
  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;
1092
+ if (typeof payload.value === "bigint" ? def.value !== BigInt(0) && payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0) return;
1149
1093
  payload.issues.push({
1150
1094
  origin: typeof payload.value,
1151
1095
  code: "not_multiple_of",
@@ -1156,7 +1100,7 @@ const $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf",
1156
1100
  });
1157
1101
  };
1158
1102
  });
1159
- const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => {
1103
+ const $ZodCheckNumberFormat = /*@__PURE__*/ $constructor("$ZodCheckNumberFormat", (inst, def) => {
1160
1104
  $ZodCheck.init(inst, def);
1161
1105
  def.format = def.format || "float64";
1162
1106
  const isInt = def.format?.includes("int");
@@ -1220,15 +1164,14 @@ const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberForma
1220
1164
  });
1221
1165
  };
1222
1166
  });
1223
- const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
1224
- var _a$2;
1167
+ const $ZodCheckMaxLength = /*@__PURE__*/ $constructor("$ZodCheckMaxLength", (inst, def) => {
1168
+ var _a;
1225
1169
  $ZodCheck.init(inst, def);
1226
- (_a$2 = inst._zod.def).when ?? (_a$2.when = _whenHasLength);
1170
+ (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
1227
1171
  inst._zod.check = (payload) => {
1228
1172
  const input = payload.value;
1229
1173
  const units = input.length;
1230
- const length = typeof input === "string" && units > def.maximum ? codePointLength(input) : units;
1231
- if (length <= def.maximum) return;
1174
+ if ((typeof input === "string" && units > def.maximum ? codePointLength(input) : units) <= def.maximum) return;
1232
1175
  const origin = getLengthableOrigin(input);
1233
1176
  payload.issues.push({
1234
1177
  origin,
@@ -1241,15 +1184,14 @@ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (i
1241
1184
  });
1242
1185
  };
1243
1186
  });
1244
- const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
1245
- var _a$2;
1187
+ const $ZodCheckMinLength = /*@__PURE__*/ $constructor("$ZodCheckMinLength", (inst, def) => {
1188
+ var _a;
1246
1189
  $ZodCheck.init(inst, def);
1247
- (_a$2 = inst._zod.def).when ?? (_a$2.when = _whenHasLength);
1190
+ (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
1248
1191
  inst._zod.check = (payload) => {
1249
1192
  const input = payload.value;
1250
1193
  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;
1194
+ if ((typeof input === "string" && units >= def.minimum && units < def.minimum * 2 ? codePointLength(input) : units) >= def.minimum) return;
1253
1195
  const origin = getLengthableOrigin(input);
1254
1196
  payload.issues.push({
1255
1197
  origin,
@@ -1262,10 +1204,10 @@ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (i
1262
1204
  });
1263
1205
  };
1264
1206
  });
1265
- const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
1266
- var _a$2;
1207
+ const $ZodCheckLengthEquals = /*@__PURE__*/ $constructor("$ZodCheckLengthEquals", (inst, def) => {
1208
+ var _a;
1267
1209
  $ZodCheck.init(inst, def);
1268
- (_a$2 = inst._zod.def).when ?? (_a$2.when = _whenHasLength);
1210
+ (_a = inst._zod.def).when ?? (_a.when = _whenHasLength);
1269
1211
  inst._zod.check = (payload) => {
1270
1212
  const input = payload.value;
1271
1213
  const units = input.length;
@@ -1290,10 +1232,10 @@ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEqual
1290
1232
  });
1291
1233
  };
1292
1234
  });
1293
- const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
1294
- var _a$2, _b;
1235
+ const $ZodCheckStringFormat = /*@__PURE__*/ $constructor("$ZodCheckStringFormat", (inst, def) => {
1236
+ var _a, _b;
1295
1237
  $ZodCheck.init(inst, def);
1296
- if (def.pattern) (_a$2 = inst._zod).check ?? (_a$2.check = (payload) => {
1238
+ if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
1297
1239
  def.pattern.lastIndex = 0;
1298
1240
  if (def.pattern.test(payload.value)) return;
1299
1241
  payload.issues.push({
@@ -1308,7 +1250,7 @@ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringForma
1308
1250
  });
1309
1251
  else (_b = inst._zod).check ?? (_b.check = () => {});
1310
1252
  });
1311
- const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
1253
+ const $ZodCheckRegex = /*@__PURE__*/ $constructor("$ZodCheckRegex", (inst, def) => {
1312
1254
  $ZodCheckStringFormat.init(inst, def);
1313
1255
  inst._zod.check = (payload) => {
1314
1256
  def.pattern.lastIndex = 0;
@@ -1324,19 +1266,18 @@ const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def
1324
1266
  });
1325
1267
  };
1326
1268
  });
1327
- const $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => {
1269
+ const $ZodCheckLowerCase = /*@__PURE__*/ $constructor("$ZodCheckLowerCase", (inst, def) => {
1328
1270
  def.pattern ?? (def.pattern = lowercase);
1329
1271
  $ZodCheckStringFormat.init(inst, def);
1330
1272
  });
1331
- const $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => {
1273
+ const $ZodCheckUpperCase = /*@__PURE__*/ $constructor("$ZodCheckUpperCase", (inst, def) => {
1332
1274
  def.pattern ?? (def.pattern = uppercase);
1333
1275
  $ZodCheckStringFormat.init(inst, def);
1334
1276
  });
1335
- const $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => {
1277
+ const $ZodCheckIncludes = /*@__PURE__*/ $constructor("$ZodCheckIncludes", (inst, def) => {
1336
1278
  $ZodCheck.init(inst, def);
1337
1279
  const escapedRegex = escapeRegex(def.includes);
1338
- const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);
1339
- def.pattern = pattern;
1280
+ def.pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position},}${escapedRegex}` : escapedRegex);
1340
1281
  inst._zod.check = (payload) => {
1341
1282
  if (payload.value.includes(def.includes, def.position)) return;
1342
1283
  payload.issues.push({
@@ -1350,7 +1291,7 @@ const $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (ins
1350
1291
  });
1351
1292
  };
1352
1293
  });
1353
- const $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => {
1294
+ const $ZodCheckStartsWith = /*@__PURE__*/ $constructor("$ZodCheckStartsWith", (inst, def) => {
1354
1295
  $ZodCheck.init(inst, def);
1355
1296
  const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
1356
1297
  def.pattern ?? (def.pattern = pattern);
@@ -1367,7 +1308,7 @@ const $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith",
1367
1308
  });
1368
1309
  };
1369
1310
  });
1370
- const $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => {
1311
+ const $ZodCheckEndsWith = /*@__PURE__*/ $constructor("$ZodCheckEndsWith", (inst, def) => {
1371
1312
  $ZodCheck.init(inst, def);
1372
1313
  const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
1373
1314
  def.pattern ?? (def.pattern = pattern);
@@ -1384,13 +1325,12 @@ const $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (ins
1384
1325
  });
1385
1326
  };
1386
1327
  });
1387
- const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => {
1328
+ const $ZodCheckOverwrite = /*@__PURE__*/ $constructor("$ZodCheckOverwrite", (inst, def) => {
1388
1329
  $ZodCheck.init(inst, def);
1389
1330
  inst._zod.check = (payload) => {
1390
1331
  payload.value = def.tx(payload.value);
1391
1332
  };
1392
1333
  });
1393
-
1394
1334
  //#endregion
1395
1335
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/doc.js
1396
1336
  var Doc = class {
@@ -1414,8 +1354,7 @@ var Doc = class {
1414
1354
  arg(this, { execution: "async" });
1415
1355
  return;
1416
1356
  }
1417
- const content = arg;
1418
- const lines = content.split("\n").filter((x) => x);
1357
+ const lines = arg.split("\n").filter((x) => x);
1419
1358
  const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
1420
1359
  const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
1421
1360
  for (const line of dedented) this.content.push(line);
@@ -1423,11 +1362,9 @@ var Doc = class {
1423
1362
  compile() {
1424
1363
  const F = Function;
1425
1364
  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));
1365
+ return new F(...Object.keys(this.closed), `return function (${this.args.join(", ")}) {\n${content.join("\n")}\n};`)(...Object.values(this.closed));
1428
1366
  }
1429
1367
  };
1430
-
1431
1368
  //#endregion
1432
1369
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/versions.js
1433
1370
  const version = {
@@ -1435,11 +1372,10 @@ const version = {
1435
1372
  minor: 6,
1436
1373
  patch: 5
1437
1374
  };
1438
-
1439
1375
  //#endregion
1440
1376
  //#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;
1377
+ const $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
1378
+ var _a;
1443
1379
  inst ?? (inst = {});
1444
1380
  inst._zod.def = def;
1445
1381
  inst._zod.bag = inst._zod.bag || {};
@@ -1448,34 +1384,31 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1448
1384
  const checks = inst._zod.traits.has("$ZodCheck") ? [inst, ...defChecks ?? []] : defChecks?.length ? [...defChecks] : [];
1449
1385
  for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
1450
1386
  if (checks.length === 0) {
1451
- (_a$2 = inst._zod).deferred ?? (_a$2.deferred = []);
1387
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
1452
1388
  inst._zod.deferred?.push(() => {
1453
1389
  inst._zod.run = inst._zod.parse;
1454
1390
  });
1455
1391
  } else {
1456
- const runChecks = (payload, checks$1, ctx) => {
1392
+ const runChecks = (payload, checks, ctx) => {
1457
1393
  if (payload.memo) return payload;
1458
1394
  let isAborted = aborted(payload);
1459
1395
  let asyncResult;
1460
- for (const ch of checks$1) {
1396
+ for (const ch of checks) {
1461
1397
  if (ch._zod.def.when) {
1462
1398
  if (explicitlyAborted(payload)) continue;
1463
- const shouldRun = ch._zod.def.when(payload);
1464
- if (!shouldRun) continue;
1399
+ if (!ch._zod.def.when(payload)) continue;
1465
1400
  } else if (isAborted) continue;
1466
1401
  const currLen = payload.issues.length;
1467
1402
  const _ = ch._zod.check(payload);
1468
1403
  if (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError();
1469
1404
  if (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
1470
1405
  await _;
1471
- const nextLen = payload.issues.length;
1472
- if (nextLen === currLen) return;
1406
+ if (payload.issues.length === currLen) return;
1473
1407
  attachSchema(payload.issues, currLen, inst);
1474
1408
  if (!isAborted) isAborted = aborted(payload, currLen);
1475
1409
  });
1476
1410
  else {
1477
- const nextLen = payload.issues.length;
1478
- if (nextLen === currLen) continue;
1411
+ if (payload.issues.length === currLen) continue;
1479
1412
  attachSchema(payload.issues, currLen, inst);
1480
1413
  if (!isAborted) isAborted = aborted(payload, currLen);
1481
1414
  }
@@ -1493,7 +1426,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1493
1426
  const checkResult = runChecks(payload, checks, ctx);
1494
1427
  if (checkResult instanceof Promise) {
1495
1428
  if (ctx.async === false) throw new $ZodAsyncError();
1496
- return checkResult.then((checkResult$1) => inst._zod.parse(checkResult$1, ctx));
1429
+ return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));
1497
1430
  }
1498
1431
  return inst._zod.parse(checkResult, ctx);
1499
1432
  };
@@ -1507,15 +1440,15 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1507
1440
  ...ctx,
1508
1441
  skipChecks: true
1509
1442
  });
1510
- if (canary instanceof Promise) return canary.then((canary$1) => {
1511
- return handleCanaryResult(canary$1, payload, ctx);
1443
+ if (canary instanceof Promise) return canary.then((canary) => {
1444
+ return handleCanaryResult(canary, payload, ctx);
1512
1445
  });
1513
1446
  return handleCanaryResult(canary, payload, ctx);
1514
1447
  }
1515
1448
  const result = inst._zod.parse(payload, ctx);
1516
1449
  if (result instanceof Promise) {
1517
1450
  if (ctx.async === false) throw new $ZodAsyncError();
1518
- return result.then((result$1) => runChecks(result$1, checks, ctx));
1451
+ return result.then((result) => runChecks(result, checks, ctx));
1519
1452
  }
1520
1453
  return runChecks(result, checks, ctx);
1521
1454
  };
@@ -1530,7 +1463,7 @@ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
1530
1463
  });
1531
1464
  /** The Standard Schema surface for `inst`. Shared so wrappers can extend it without forcing it. */
1532
1465
  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) {
1466
+ async function validateAsync(inst, value) {
1534
1467
  const ctx = { async: true };
1535
1468
  return toStandardResult(await inst._zod.run({
1536
1469
  value,
@@ -1548,19 +1481,19 @@ function standardProps(inst) {
1548
1481
  }, ctx);
1549
1482
  if (!(r instanceof Promise)) return toStandardResult(r, ctx);
1550
1483
  } catch (_) {}
1551
- return validateAsync$1(inst, value);
1484
+ return validateAsync(inst, value);
1552
1485
  },
1553
1486
  vendor: "zod",
1554
1487
  version: 1
1555
1488
  };
1556
1489
  }
1557
- const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
1490
+ const $ZodString = /*@__PURE__*/ $constructor("$ZodString", (inst, def) => {
1558
1491
  $ZodType.init(inst, def);
1559
1492
  inst._zod.pattern = def.pattern ?? anyString;
1560
1493
  inst._zod.parse = (payload, _) => {
1561
1494
  if (def.coerce) try {
1562
1495
  payload.value = String(payload.value);
1563
- } catch (_$1) {}
1496
+ } catch (_) {}
1564
1497
  if (typeof payload.value === "string") return payload;
1565
1498
  payload.issues.push({
1566
1499
  expected: "string",
@@ -1571,17 +1504,17 @@ const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
1571
1504
  return payload;
1572
1505
  };
1573
1506
  });
1574
- const $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => {
1507
+ const $ZodStringFormat = /*@__PURE__*/ $constructor("$ZodStringFormat", (inst, def) => {
1575
1508
  $ZodCheckStringFormat.init(inst, def);
1576
1509
  $ZodString.init(inst, def);
1577
1510
  });
1578
- const $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => {
1511
+ const $ZodGUID = /*@__PURE__*/ $constructor("$ZodGUID", (inst, def) => {
1579
1512
  def.pattern ?? (def.pattern = guid);
1580
1513
  $ZodStringFormat.init(inst, def);
1581
1514
  });
1582
- const $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
1515
+ const $ZodUUID = /*@__PURE__*/ $constructor("$ZodUUID", (inst, def) => {
1583
1516
  if (def.version) {
1584
- const versionMap = {
1517
+ const v = {
1585
1518
  v1: 1,
1586
1519
  v2: 2,
1587
1520
  v3: 3,
@@ -1590,21 +1523,16 @@ const $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
1590
1523
  v6: 6,
1591
1524
  v7: 7,
1592
1525
  v8: 8
1593
- };
1594
- const v = versionMap[def.version];
1526
+ }[def.version];
1595
1527
  if (v === void 0) throw new Error(`Invalid UUID version: "${def.version}"`);
1596
1528
  def.pattern ?? (def.pattern = uuid(v));
1597
1529
  } else def.pattern ?? (def.pattern = uuid());
1598
1530
  $ZodStringFormat.init(inst, def);
1599
1531
  });
1600
- const $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
1601
- def.pattern ?? (def.pattern = email);
1532
+ const $ZodEmail = /*@__PURE__*/ $constructor("$ZodEmail", (inst, def) => {
1533
+ def.pattern ?? (def.pattern = email$1);
1602
1534
  $ZodStringFormat.init(inst, def);
1603
1535
  });
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
1536
  function canParseURL(input) {
1609
1537
  try {
1610
1538
  if (typeof URL !== "undefined" && typeof URL.canParse === "function") return URL.canParse(input);
@@ -1615,20 +1543,20 @@ function canParseURL(input) {
1615
1543
  }
1616
1544
  }
1617
1545
  function validateURL(trimmed, def) {
1618
- if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) return canParseURL(trimmed) || URL_UNPARSEABLE;
1546
+ if (!("normalize" in def) && !("hostname" in def) && !("protocol" in def)) return canParseURL(trimmed) || 2;
1619
1547
  return parseURLObject(trimmed, def);
1620
1548
  }
1621
1549
  /** Parses a URL while preserving the non-normalizing HTTP guard. */
1622
1550
  function parseURLObject(trimmed, def) {
1623
- if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) return URL_BAD_FORMAT;
1551
+ if (!def.normalize && def.protocol?.source === httpProtocol.source && !/^https?:\/\//i.test(trimmed)) return 1;
1624
1552
  try {
1625
1553
  if (typeof URL !== "undefined") {
1626
1554
  const URLStatic = URL;
1627
- if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ?? URL_UNPARSEABLE;
1555
+ if (typeof URLStatic.parse === "function") return URLStatic.parse(trimmed) ?? 2;
1628
1556
  }
1629
1557
  return new URL(trimmed);
1630
1558
  } catch {
1631
- return URL_UNPARSEABLE;
1559
+ return 2;
1632
1560
  }
1633
1561
  }
1634
1562
  const asciiTabOrNewline = /[\t\n\r]/g;
@@ -1636,21 +1564,21 @@ const asciiTabOrNewline = /[\t\n\r]/g;
1636
1564
  function stripTabAndNewline(value) {
1637
1565
  return value.replace(asciiTabOrNewline, "");
1638
1566
  }
1639
- function urlHostnameOk(url$1, hostname) {
1567
+ function urlHostnameOk(url, hostname) {
1640
1568
  hostname.lastIndex = 0;
1641
- return hostname.test(url$1.hostname);
1569
+ return hostname.test(url.hostname);
1642
1570
  }
1643
- function urlProtocolOk(url$1, protocol) {
1571
+ function urlProtocolOk(url, protocol) {
1644
1572
  protocol.lastIndex = 0;
1645
- return protocol.test(url$1.protocol.endsWith(":") ? url$1.protocol.slice(0, -1) : url$1.protocol);
1573
+ return protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol);
1646
1574
  }
1647
- const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1575
+ const $ZodURL = /*@__PURE__*/ $constructor("$ZodURL", (inst, def) => {
1648
1576
  $ZodStringFormat.init(inst, def);
1649
1577
  inst._zod.check = (payload) => {
1650
1578
  try {
1651
1579
  const trimmed = payload.value.trim();
1652
- const url$1 = validateURL(trimmed, def);
1653
- if (url$1 === URL_BAD_FORMAT) {
1580
+ const url = validateURL(trimmed, def);
1581
+ if (url === 1) {
1654
1582
  payload.issues.push({
1655
1583
  code: "invalid_format",
1656
1584
  format: "url",
@@ -1661,7 +1589,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1661
1589
  });
1662
1590
  return;
1663
1591
  }
1664
- if (url$1 === URL_UNPARSEABLE) {
1592
+ if (url === 2) {
1665
1593
  payload.issues.push({
1666
1594
  code: "invalid_format",
1667
1595
  format: "url",
@@ -1671,11 +1599,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1671
1599
  });
1672
1600
  return;
1673
1601
  }
1674
- if (url$1 === true) {
1602
+ if (url === true) {
1675
1603
  payload.value = stripTabAndNewline(trimmed);
1676
1604
  return;
1677
1605
  }
1678
- if (def.hostname && !urlHostnameOk(url$1, def.hostname)) payload.issues.push({
1606
+ if (def.hostname && !urlHostnameOk(url, def.hostname)) payload.issues.push({
1679
1607
  code: "invalid_format",
1680
1608
  format: "url",
1681
1609
  note: "Invalid hostname",
@@ -1684,7 +1612,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1684
1612
  inst,
1685
1613
  continue: !def.abort
1686
1614
  });
1687
- if (def.protocol && !urlProtocolOk(url$1, def.protocol)) payload.issues.push({
1615
+ if (def.protocol && !urlProtocolOk(url, def.protocol)) payload.issues.push({
1688
1616
  code: "invalid_format",
1689
1617
  format: "url",
1690
1618
  note: "Invalid protocol",
@@ -1693,7 +1621,7 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1693
1621
  inst,
1694
1622
  continue: !def.abort
1695
1623
  });
1696
- payload.value = def.normalize ? url$1.href : stripTabAndNewline(trimmed);
1624
+ payload.value = def.normalize ? url.href : stripTabAndNewline(trimmed);
1697
1625
  return;
1698
1626
  } catch (_) {
1699
1627
  payload.issues.push({
@@ -1706,11 +1634,11 @@ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1706
1634
  }
1707
1635
  };
1708
1636
  });
1709
- const $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => {
1637
+ const $ZodEmoji = /*@__PURE__*/ $constructor("$ZodEmoji", (inst, def) => {
1710
1638
  def.pattern ?? (def.pattern = emoji());
1711
1639
  $ZodStringFormat.init(inst, def);
1712
1640
  });
1713
- const $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
1641
+ const $ZodNanoID = /*@__PURE__*/ $constructor("$ZodNanoID", (inst, def) => {
1714
1642
  if (def.length !== void 0 && (!Number.isInteger(def.length) || def.length < 1)) throw new Error(`Invalid nanoid length: ${def.length}`);
1715
1643
  def.pattern ?? (def.pattern = def.length === void 0 ? nanoid : nanoidOfLength(def.length));
1716
1644
  $ZodStringFormat.init(inst, def);
@@ -1720,43 +1648,43 @@ const $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
1720
1648
  * (timestamps embedded in the id). Use {@link $ZodCUID2} instead.
1721
1649
  * See https://github.com/paralleldrive/cuid.
1722
1650
  */
1723
- const $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => {
1651
+ const $ZodCUID = /*@__PURE__*/ $constructor("$ZodCUID", (inst, def) => {
1724
1652
  def.pattern ?? (def.pattern = cuid);
1725
1653
  $ZodStringFormat.init(inst, def);
1726
1654
  });
1727
- const $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => {
1655
+ const $ZodCUID2 = /*@__PURE__*/ $constructor("$ZodCUID2", (inst, def) => {
1728
1656
  def.pattern ?? (def.pattern = cuid2);
1729
1657
  $ZodStringFormat.init(inst, def);
1730
1658
  });
1731
- const $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => {
1659
+ const $ZodULID = /*@__PURE__*/ $constructor("$ZodULID", (inst, def) => {
1732
1660
  def.pattern ?? (def.pattern = ulid);
1733
1661
  $ZodStringFormat.init(inst, def);
1734
1662
  });
1735
- const $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => {
1663
+ const $ZodXID = /*@__PURE__*/ $constructor("$ZodXID", (inst, def) => {
1736
1664
  def.pattern ?? (def.pattern = xid);
1737
1665
  $ZodStringFormat.init(inst, def);
1738
1666
  });
1739
- const $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
1667
+ const $ZodKSUID = /*@__PURE__*/ $constructor("$ZodKSUID", (inst, def) => {
1740
1668
  def.pattern ?? (def.pattern = ksuid);
1741
1669
  $ZodStringFormat.init(inst, def);
1742
1670
  });
1743
- const $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
1671
+ const $ZodISODateTime = /*@__PURE__*/ $constructor("$ZodISODateTime", (inst, def) => {
1744
1672
  def.pattern ?? (def.pattern = datetime(def));
1745
1673
  $ZodStringFormat.init(inst, def);
1746
1674
  });
1747
- const $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
1675
+ const $ZodISODate = /*@__PURE__*/ $constructor("$ZodISODate", (inst, def) => {
1748
1676
  def.pattern ?? (def.pattern = date);
1749
1677
  $ZodStringFormat.init(inst, def);
1750
1678
  });
1751
- const $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
1679
+ const $ZodISOTime = /*@__PURE__*/ $constructor("$ZodISOTime", (inst, def) => {
1752
1680
  def.pattern ?? (def.pattern = time(def));
1753
1681
  $ZodStringFormat.init(inst, def);
1754
1682
  });
1755
- const $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => {
1683
+ const $ZodISODuration = /*@__PURE__*/ $constructor("$ZodISODuration", (inst, def) => {
1756
1684
  def.pattern ?? (def.pattern = duration);
1757
1685
  $ZodStringFormat.init(inst, def);
1758
1686
  });
1759
- const $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
1687
+ const $ZodIPv4 = /*@__PURE__*/ $constructor("$ZodIPv4", (inst, def) => {
1760
1688
  def.pattern ?? (def.pattern = ipv4);
1761
1689
  $ZodStringFormat.init(inst, def);
1762
1690
  });
@@ -1766,7 +1694,7 @@ function isValidIPv6(value) {
1766
1694
  if (!ipv6Alphabet.test(value)) return false;
1767
1695
  return canParseURL(`http://[${value}]`);
1768
1696
  }
1769
- const $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
1697
+ const $ZodIPv6 = /*@__PURE__*/ $constructor("$ZodIPv6", (inst, def) => {
1770
1698
  def.pattern ?? (def.pattern = ipv6);
1771
1699
  $ZodStringFormat.init(inst, def);
1772
1700
  inst._zod.check = (payload) => {
@@ -1779,7 +1707,7 @@ const $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
1779
1707
  });
1780
1708
  };
1781
1709
  });
1782
- const $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
1710
+ const $ZodCIDRv4 = /*@__PURE__*/ $constructor("$ZodCIDRv4", (inst, def) => {
1783
1711
  def.pattern ?? (def.pattern = cidrv4);
1784
1712
  $ZodStringFormat.init(inst, def);
1785
1713
  });
@@ -1793,7 +1721,7 @@ function isValidCIDRv6(value) {
1793
1721
  if (prefixNum < 0 || prefixNum > 128) return false;
1794
1722
  return isValidIPv6(address);
1795
1723
  }
1796
- const $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
1724
+ const $ZodCIDRv6 = /*@__PURE__*/ $constructor("$ZodCIDRv6", (inst, def) => {
1797
1725
  def.pattern ?? (def.pattern = cidrv6);
1798
1726
  $ZodStringFormat.init(inst, def);
1799
1727
  inst._zod.check = (payload) => {
@@ -1818,7 +1746,7 @@ function isValidBase64(data) {
1818
1746
  }
1819
1747
  }
1820
1748
  const base64Charset = /^[0-9a-zA-Z+/]*={0,2}$/;
1821
- const $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
1749
+ const $ZodBase64 = /*@__PURE__*/ $constructor("$ZodBase64", (inst, def) => {
1822
1750
  def.pattern ?? (def.pattern = base64Charset);
1823
1751
  $ZodStringFormat.init(inst, def);
1824
1752
  inst._zod.check = (payload) => {
@@ -1835,11 +1763,10 @@ const $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
1835
1763
  const base64urlCharset = /^[A-Za-z0-9_-]*$/;
1836
1764
  function isValidBase64URL(data) {
1837
1765
  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);
1766
+ const base64 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
1767
+ return isValidBase64(base64.padEnd(Math.ceil(base64.length / 4) * 4, "="));
1841
1768
  }
1842
- const $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
1769
+ const $ZodBase64URL = /*@__PURE__*/ $constructor("$ZodBase64URL", (inst, def) => {
1843
1770
  def.pattern ?? (def.pattern = base64urlCharset);
1844
1771
  $ZodStringFormat.init(inst, def);
1845
1772
  inst._zod.check = (payload) => {
@@ -1853,7 +1780,7 @@ const $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def)
1853
1780
  });
1854
1781
  };
1855
1782
  });
1856
- const $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => {
1783
+ const $ZodE164 = /*@__PURE__*/ $constructor("$ZodE164", (inst, def) => {
1857
1784
  def.pattern ?? (def.pattern = e164);
1858
1785
  $ZodStringFormat.init(inst, def);
1859
1786
  });
@@ -1872,7 +1799,7 @@ function isValidJWT(token, algorithm = null) {
1872
1799
  return false;
1873
1800
  }
1874
1801
  }
1875
- const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
1802
+ const $ZodJWT = /*@__PURE__*/ $constructor("$ZodJWT", (inst, def) => {
1876
1803
  $ZodStringFormat.init(inst, def);
1877
1804
  inst._zod.check = (payload) => {
1878
1805
  if (isValidJWT(payload.value, def.alg)) return;
@@ -1885,7 +1812,7 @@ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
1885
1812
  });
1886
1813
  };
1887
1814
  });
1888
- const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1815
+ const $ZodNumber = /*@__PURE__*/ $constructor("$ZodNumber", (inst, def) => {
1889
1816
  $ZodType.init(inst, def);
1890
1817
  inst._zod.pattern = number$1;
1891
1818
  inst._zod.parse = (payload, _ctx) => {
@@ -1905,11 +1832,11 @@ const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1905
1832
  return payload;
1906
1833
  };
1907
1834
  });
1908
- const $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => {
1835
+ const $ZodNumberFormat = /*@__PURE__*/ $constructor("$ZodNumberFormat", (inst, def) => {
1909
1836
  $ZodCheckNumberFormat.init(inst, def);
1910
1837
  $ZodNumber.init(inst, def);
1911
1838
  });
1912
- const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
1839
+ const $ZodBoolean = /*@__PURE__*/ $constructor("$ZodBoolean", (inst, def) => {
1913
1840
  $ZodType.init(inst, def);
1914
1841
  inst._zod.pattern = boolean$1;
1915
1842
  inst._zod.parse = (payload, _ctx) => {
@@ -1927,11 +1854,11 @@ const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
1927
1854
  return payload;
1928
1855
  };
1929
1856
  });
1930
- const $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
1857
+ const $ZodUnknown = /*@__PURE__*/ $constructor("$ZodUnknown", (inst, def) => {
1931
1858
  $ZodType.init(inst, def);
1932
1859
  inst._zod.parse = (payload) => payload;
1933
1860
  });
1934
- const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
1861
+ const $ZodNever = /*@__PURE__*/ $constructor("$ZodNever", (inst, def) => {
1935
1862
  $ZodType.init(inst, def);
1936
1863
  inst._zod.parse = (payload, _ctx) => {
1937
1864
  payload.issues.push({
@@ -1947,10 +1874,10 @@ function handleArrayResult(result, final, index) {
1947
1874
  if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
1948
1875
  final.value[index] = result.value;
1949
1876
  }
1950
- const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1877
+ const $ZodArray = /*@__PURE__*/ $constructor("$ZodArray", (inst, def) => {
1951
1878
  $ZodType.init(inst, def);
1952
- const memo$1 = globalConfig.memoizer;
1953
- memo$1?.attach(inst);
1879
+ const memo = globalConfig.memoizer;
1880
+ memo?.attach(inst);
1954
1881
  inst._zod.parse = (payload, ctx) => {
1955
1882
  const input = payload.value;
1956
1883
  if (!Array.isArray(input)) {
@@ -1962,7 +1889,7 @@ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1962
1889
  });
1963
1890
  return payload;
1964
1891
  }
1965
- payload.value = memo$1 ? memo$1.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);
1892
+ payload.value = memo ? memo.alloc(inst, payload, Array(input.length), ctx) : Array(input.length);
1966
1893
  const proms = [];
1967
1894
  const abortEarly = ctx?.abortEarly;
1968
1895
  for (let i = 0; i < input.length; i++) {
@@ -1971,7 +1898,7 @@ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1971
1898
  value: item,
1972
1899
  issues: []
1973
1900
  }, ctx);
1974
- if (result instanceof Promise) proms.push(result.then((result$1) => handleArrayResult(result$1, payload, i)));
1901
+ if (result instanceof Promise) proms.push(result.then((result) => handleArrayResult(result, payload, i)));
1975
1902
  else {
1976
1903
  handleArrayResult(result, payload, i);
1977
1904
  if (abortEarly && result.issues.length !== 0 && aborted(result)) break;
@@ -2045,7 +1972,7 @@ function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
2045
1972
  value: input[key],
2046
1973
  issues: []
2047
1974
  }, ctx);
2048
- if (r instanceof Promise) proms.push(r.then((r$1) => handlePropertyResult(r$1, payload, key, input, optin, optout)));
1975
+ if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));
2049
1976
  else handlePropertyResult(r, payload, key, input, optin, optout);
2050
1977
  }
2051
1978
  if (unrecognized.length) payload.issues.push({
@@ -2060,7 +1987,7 @@ function handleCatchall(proms, input, payload, ctx, def, inst, abortEarly) {
2060
1987
  return payload;
2061
1988
  });
2062
1989
  }
2063
- const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
1990
+ const $ZodObject = /*@__PURE__*/ $constructor("$ZodObject", (inst, def) => {
2064
1991
  $ZodType.init(inst, def);
2065
1992
  const desc = Object.getOwnPropertyDescriptor(def, "shape");
2066
1993
  const sh = desc?.get ? desc.get.raw : def.shape ?? {};
@@ -2088,15 +2015,15 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2088
2015
  }
2089
2016
  return propValues;
2090
2017
  });
2091
- const isObject$1 = isObject;
2018
+ const isObject$2 = isObject;
2092
2019
  const catchall = def.catchall;
2093
2020
  let value;
2094
- const memo$1 = globalConfig.memoizer;
2095
- memo$1?.attach(inst);
2021
+ const memo = globalConfig.memoizer;
2022
+ memo?.attach(inst);
2096
2023
  inst._zod.parse = (payload, ctx) => {
2097
2024
  value ?? (value = _normalized.value);
2098
2025
  const input = payload.value;
2099
- if (!isObject$1(input)) {
2026
+ if (!isObject$2(input)) {
2100
2027
  payload.issues.push({
2101
2028
  expected: "object",
2102
2029
  code: "invalid_type",
@@ -2105,7 +2032,7 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2105
2032
  });
2106
2033
  return payload;
2107
2034
  }
2108
- payload.value = memo$1 ? memo$1.alloc(inst, payload, {}, ctx) : {};
2035
+ payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
2109
2036
  const proms = [];
2110
2037
  const shape = value.shape;
2111
2038
  const abortEarly = ctx?.abortEarly;
@@ -2123,25 +2050,25 @@ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
2123
2050
  value: input[key],
2124
2051
  issues: []
2125
2052
  }, ctx);
2126
- if (r instanceof Promise) proms.push(r.then((r$1) => handlePropertyResult(r$1, payload, key, input, optin, optout)));
2053
+ if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, optin, optout)));
2127
2054
  else handlePropertyResult(r, payload, key, input, optin, optout);
2128
2055
  }
2129
2056
  if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;
2130
2057
  return handleCatchall(proms, input, payload, ctx, _normalized.value, inst, abortEarly === true);
2131
2058
  };
2132
2059
  });
2133
- const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
2060
+ const $ZodObjectJIT = /*@__PURE__*/ $constructor("$ZodObjectJIT", (inst, def) => {
2134
2061
  $ZodObject.init(inst, def);
2135
2062
  const superParse = inst._zod.parse;
2136
2063
  const _normalized = cached(() => normalizeDef(def));
2137
- const memo$1 = globalConfig.memoizer;
2064
+ const memo = globalConfig.memoizer;
2138
2065
  const generateFastpass = (shape) => {
2139
2066
  const normalized = _normalized.value;
2140
2067
  const syms = normalized.symbolKeys;
2141
2068
  const doc = new Doc(["payload", "ctx"], {
2142
2069
  shape,
2143
2070
  inst,
2144
- memo: memo$1,
2071
+ memo,
2145
2072
  syms
2146
2073
  });
2147
2074
  const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
@@ -2161,7 +2088,7 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
2161
2088
  const ids = Object.create(null);
2162
2089
  let counter = 0;
2163
2090
  for (const key of normalized.allKeys) ids[key] = `key_${counter++}`;
2164
- doc.write(memo$1 ? `const newResult = memo.alloc(inst, payload, {}, ctx);` : `const newResult = {};`);
2091
+ doc.write(memo ? `const newResult = memo.alloc(inst, payload, {}, ctx);` : `const newResult = {};`);
2165
2092
  for (const key of normalized.allKeys) {
2166
2093
  if (key === "__proto__") continue;
2167
2094
  const id = ids[key];
@@ -2228,8 +2155,7 @@ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def)
2228
2155
  let fastpass;
2229
2156
  const isObject$1 = isObject;
2230
2157
  const jit = !globalConfig.jitless;
2231
- const allowsEval$1 = allowsEval;
2232
- const fastEnabled = jit && allowsEval$1.value;
2158
+ const fastEnabled = jit && allowsEval.value;
2233
2159
  const catchall = def.catchall;
2234
2160
  let value;
2235
2161
  inst._zod.parse = (payload, ctx) => {
@@ -2271,20 +2197,18 @@ function handleUnionResults(results, final, inst, ctx) {
2271
2197
  });
2272
2198
  return final;
2273
2199
  }
2274
- const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2200
+ const $ZodUnion = /*@__PURE__*/ $constructor("$ZodUnion", (inst, def) => {
2275
2201
  $ZodType.init(inst, def);
2276
2202
  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
2203
  defineLazyInternal(inst, "optout", (zod) => zod.def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
2278
2204
  defineLazyInternal(inst, "values", (zod) => {
2279
2205
  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
2206
  });
2282
2207
  defineLazyInternal(inst, "pattern", (zod) => {
2283
2208
  if (zod.def.options.every((o) => o._zod.pattern)) {
2284
2209
  const patterns = zod.def.options.map((o) => o._zod.pattern);
2285
2210
  return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
2286
2211
  }
2287
- return void 0;
2288
2212
  });
2289
2213
  const first = def.options.length === 1 ? def.options[0]._zod.run : null;
2290
2214
  inst._zod.parse = (payload, ctx) => {
@@ -2305,8 +2229,8 @@ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
2305
2229
  }
2306
2230
  }
2307
2231
  if (!async) return handleUnionResults(results, payload, inst, ctx);
2308
- return Promise.all(results).then((results$1) => {
2309
- return handleUnionResults(results$1, payload, inst, ctx);
2232
+ return Promise.all(results).then((results) => {
2233
+ return handleUnionResults(results, payload, inst, ctx);
2310
2234
  });
2311
2235
  };
2312
2236
  });
@@ -2322,7 +2246,7 @@ function discriminatorMap(def) {
2322
2246
  }
2323
2247
  return map;
2324
2248
  }
2325
- const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
2249
+ const $ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("$ZodDiscriminatedUnion", (inst, def) => {
2326
2250
  def.inclusive = false;
2327
2251
  $ZodUnion.init(inst, def);
2328
2252
  const _super = inst._zod.parse;
@@ -2366,7 +2290,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2366
2290
  errors: [],
2367
2291
  note: "No matching discriminator",
2368
2292
  discriminator: def.discriminator,
2369
- options: Array.from(disc.value.keys()).filter((value$1) => disc.value.get(value$1) !== null),
2293
+ options: Array.from(disc.value.keys()).filter((value) => disc.value.get(value) !== null),
2370
2294
  input,
2371
2295
  path: [def.discriminator],
2372
2296
  inst
@@ -2374,7 +2298,7 @@ const $ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("$ZodDiscriminatedUn
2374
2298
  return payload;
2375
2299
  };
2376
2300
  });
2377
- const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
2301
+ const $ZodIntersection = /*@__PURE__*/ $constructor("$ZodIntersection", (inst, def) => {
2378
2302
  $ZodType.init(inst, def);
2379
2303
  inst._zod.parse = (payload, ctx) => {
2380
2304
  const input = payload.value;
@@ -2386,9 +2310,8 @@ const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst,
2386
2310
  value: input,
2387
2311
  issues: []
2388
2312
  }, 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);
2313
+ if (left instanceof Promise || right instanceof Promise) return Promise.all([left, right]).then(([left, right]) => {
2314
+ return handleIntersectionResults(payload, left, right);
2392
2315
  });
2393
2316
  return handleIntersectionResults(payload, left, right);
2394
2317
  };
@@ -2489,10 +2412,118 @@ function handleIntersectionResults(result, left, right) {
2489
2412
  result.value = merged.data;
2490
2413
  return result;
2491
2414
  }
2492
- const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2415
+ const $ZodTuple = /*@__PURE__*/ $constructor("$ZodTuple", (inst, def) => {
2416
+ $ZodType.init(inst, def);
2417
+ const items = def.items;
2418
+ const memo = globalConfig.memoizer;
2419
+ memo?.attach(inst);
2420
+ inst._zod.parse = (payload, ctx) => {
2421
+ const input = payload.value;
2422
+ if (!Array.isArray(input)) {
2423
+ payload.issues.push({
2424
+ input,
2425
+ inst,
2426
+ expected: "tuple",
2427
+ code: "invalid_type"
2428
+ });
2429
+ return payload;
2430
+ }
2431
+ payload.value = memo ? memo.alloc(inst, payload, [], ctx) : [];
2432
+ const proms = [];
2433
+ const optinStart = getTupleOptStart(items, "optin");
2434
+ const optoutStart = getTupleOptStart(items, "optout");
2435
+ if (!def.rest) {
2436
+ if (input.length < optinStart) {
2437
+ payload.issues.push({
2438
+ code: "too_small",
2439
+ minimum: optinStart,
2440
+ inclusive: true,
2441
+ input,
2442
+ inst,
2443
+ origin: "array"
2444
+ });
2445
+ return payload;
2446
+ }
2447
+ if (input.length > items.length) payload.issues.push({
2448
+ code: "too_big",
2449
+ maximum: items.length,
2450
+ inclusive: true,
2451
+ input,
2452
+ inst,
2453
+ origin: "array"
2454
+ });
2455
+ }
2456
+ const itemResults = new Array(items.length);
2457
+ const abortEarly = def.rest ? ctx?.abortEarly : void 0;
2458
+ let itemAborted = false;
2459
+ for (let i = 0; i < items.length; i++) {
2460
+ const r = items[i]._zod.run({
2461
+ value: input[i],
2462
+ issues: []
2463
+ }, ctx);
2464
+ if (r instanceof Promise) proms.push(r.then((rr) => {
2465
+ itemResults[i] = rr;
2466
+ }));
2467
+ else {
2468
+ itemResults[i] = r;
2469
+ if (abortEarly && !itemAborted && r.issues.length) itemAborted = aborted(r);
2470
+ }
2471
+ }
2472
+ if (def.rest && !itemAborted) {
2473
+ let i = items.length - 1;
2474
+ const rest = input.slice(items.length);
2475
+ let seen = payload.issues.length;
2476
+ for (const el of rest) {
2477
+ if (abortEarly && payload.issues.length !== seen) {
2478
+ if (aborted(payload, seen)) break;
2479
+ seen = payload.issues.length;
2480
+ }
2481
+ i++;
2482
+ const result = def.rest._zod.run({
2483
+ value: el,
2484
+ issues: []
2485
+ }, ctx);
2486
+ if (result instanceof Promise) proms.push(result.then((r) => handleTupleResult(r, payload, i)));
2487
+ else handleTupleResult(result, payload, i);
2488
+ }
2489
+ }
2490
+ if (proms.length) return Promise.all(proms).then(() => handleTupleResults(itemResults, payload, items, input, optoutStart));
2491
+ return handleTupleResults(itemResults, payload, items, input, optoutStart);
2492
+ };
2493
+ });
2494
+ function getTupleOptStart(items, key) {
2495
+ for (let i = items.length - 1; i >= 0; i--) if (!(key === "optin" ? items[i]._zod.optin !== void 0 : items[i]._zod.optout === "optional")) return i + 1;
2496
+ return 0;
2497
+ }
2498
+ function handleTupleResult(result, final, index) {
2499
+ if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
2500
+ final.value[index] = result.value;
2501
+ }
2502
+ function handleTupleResults(itemResults, final, items, input, optoutStart) {
2503
+ for (let i = 0; i < items.length; i++) {
2504
+ const r = itemResults[i];
2505
+ const isPresent = i < input.length;
2506
+ if (!isPresent && i >= optoutStart && items[i]._zod.optin === "optional") {
2507
+ final.value.length = i;
2508
+ break;
2509
+ }
2510
+ if (r.issues.length) {
2511
+ if (!isPresent && i >= optoutStart) {
2512
+ final.value.length = i;
2513
+ break;
2514
+ }
2515
+ final.issues.push(...prefixIssues(i, r.issues));
2516
+ }
2517
+ final.value[i] = r.value;
2518
+ }
2519
+ for (let i = final.value.length - 1; i >= input.length; i--) if (items[i]._zod.optout === "optional" && final.value[i] === void 0) final.value.length = i;
2520
+ else break;
2521
+ return final;
2522
+ }
2523
+ const $ZodRecord = /*@__PURE__*/ $constructor("$ZodRecord", (inst, def) => {
2493
2524
  $ZodType.init(inst, def);
2494
- const memo$1 = globalConfig.memoizer;
2495
- memo$1?.attach(inst);
2525
+ const memo = globalConfig.memoizer;
2526
+ memo?.attach(inst);
2496
2527
  inst._zod.parse = (payload, ctx) => {
2497
2528
  const input = payload.value;
2498
2529
  if (!isPlainObject(input)) {
@@ -2507,7 +2538,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2507
2538
  const proms = [];
2508
2539
  const values = def.keyType._zod.values;
2509
2540
  if (values && !def.partial) {
2510
- payload.value = memo$1 ? memo$1.alloc(inst, payload, {}, ctx) : {};
2541
+ payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
2511
2542
  const recordKeys = /* @__PURE__ */ new Set();
2512
2543
  for (const key of values) if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
2513
2544
  recordKeys.add(typeof key === "number" ? key.toString() : key);
@@ -2534,9 +2565,9 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2534
2565
  value: input[key],
2535
2566
  issues: []
2536
2567
  }, 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;
2568
+ if (result instanceof Promise) proms.push(result.then((result) => {
2569
+ if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
2570
+ payload.value[outKey] = result.value;
2540
2571
  }));
2541
2572
  else {
2542
2573
  if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
@@ -2544,12 +2575,14 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2544
2575
  }
2545
2576
  }
2546
2577
  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);
2578
+ for (const key in input) if (!recordKeys.has(key)) {
2579
+ if (def.mode === "loose") {
2580
+ if (key === "__proto__") continue;
2581
+ payload.value[key] = input[key];
2582
+ } else {
2583
+ unrecognized = unrecognized ?? [];
2584
+ unrecognized.push(key);
2585
+ }
2553
2586
  }
2554
2587
  if (unrecognized && unrecognized.length > 0) payload.issues.push({
2555
2588
  code: "unrecognized_keys",
@@ -2559,7 +2592,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2559
2592
  continue: true
2560
2593
  });
2561
2594
  } else {
2562
- payload.value = memo$1 ? memo$1.alloc(inst, payload, {}, ctx) : {};
2595
+ payload.value = memo ? memo.alloc(inst, payload, {}, ctx) : {};
2563
2596
  let unrecognized;
2564
2597
  for (const key of Reflect.ownKeys(input)) {
2565
2598
  if (key === "__proto__") continue;
@@ -2569,8 +2602,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2569
2602
  issues: []
2570
2603
  }, ctx);
2571
2604
  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) {
2605
+ if (typeof key === "string" && number$1.test(key) && keyResult.issues.length) {
2574
2606
  const retryResult = def.keyType._zod.run({
2575
2607
  value: Number(key),
2576
2608
  issues: []
@@ -2599,9 +2631,9 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2599
2631
  value: input[key],
2600
2632
  issues: []
2601
2633
  }, 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;
2634
+ if (result instanceof Promise) proms.push(result.then((result) => {
2635
+ if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
2636
+ payload.value[outKey] = result.value;
2605
2637
  }));
2606
2638
  else {
2607
2639
  if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
@@ -2620,7 +2652,7 @@ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
2620
2652
  return payload;
2621
2653
  };
2622
2654
  });
2623
- const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
2655
+ const $ZodEnum = /*@__PURE__*/ $constructor("$ZodEnum", (inst, def) => {
2624
2656
  $ZodType.init(inst, def);
2625
2657
  const values = getEnumValues(def.entries);
2626
2658
  const valuesSet = new Set(values);
@@ -2641,7 +2673,7 @@ const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
2641
2673
  return payload;
2642
2674
  };
2643
2675
  });
2644
- const $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
2676
+ const $ZodLiteral = /*@__PURE__*/ $constructor("$ZodLiteral", (inst, def) => {
2645
2677
  $ZodType.init(inst, def);
2646
2678
  const values = new Set(def.values);
2647
2679
  inst._zod.values = values;
@@ -2661,20 +2693,17 @@ const $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
2661
2693
  return payload;
2662
2694
  };
2663
2695
  });
2664
- const $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
2696
+ const $ZodTransform = /*@__PURE__*/ $constructor("$ZodTransform", (inst, def) => {
2665
2697
  $ZodType.init(inst, def);
2666
2698
  inst._zod.optin = "optional";
2667
- globalConfig.memoizer.guard(inst);
2699
+ globalConfig.memoizer?.guard(inst);
2668
2700
  inst._zod.parse = (payload, ctx) => {
2669
2701
  if (ctx.direction === "backward") throw new $ZodEncodeError(inst.constructor.name);
2670
2702
  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
- }
2703
+ if (ctx.async) return (_out instanceof Promise ? _out : Promise.resolve(_out)).then((output) => {
2704
+ payload.value = output;
2705
+ return payload;
2706
+ });
2678
2707
  if (_out instanceof Promise) throw new $ZodAsyncError();
2679
2708
  payload.value = _out;
2680
2709
  return payload;
@@ -2684,13 +2713,13 @@ function handleOptionalResult(payload, result) {
2684
2713
  payload.value = result.issues.length ? void 0 : result.value;
2685
2714
  return payload;
2686
2715
  }
2687
- const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
2716
+ const $ZodOptional = /*@__PURE__*/ $constructor("$ZodOptional", (inst, def) => {
2688
2717
  $ZodType.init(inst, def);
2689
2718
  defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional");
2690
2719
  inst._zod.optout = "optional";
2691
2720
  defineLazyInternal(inst, "values", (zod) => {
2692
2721
  const values = zod.def.innerType._zod.values;
2693
- return values ? new Set([...values, void 0]) : void 0;
2722
+ return values ? /* @__PURE__ */ new Set([...values, void 0]) : void 0;
2694
2723
  });
2695
2724
  defineLazyInternal(inst, "pattern", (zod) => {
2696
2725
  const pattern = zod.def.innerType._zod.pattern;
@@ -2703,13 +2732,13 @@ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) =>
2703
2732
  value: payload.value,
2704
2733
  issues: []
2705
2734
  }, ctx);
2706
- if (result instanceof Promise) return result.then((result$1) => handleOptionalResult(payload, result$1));
2735
+ if (result instanceof Promise) return result.then((result) => handleOptionalResult(payload, result));
2707
2736
  return handleOptionalResult(payload, result);
2708
2737
  }
2709
2738
  return def.innerType._zod.run(payload, ctx);
2710
2739
  };
2711
2740
  });
2712
- const $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (inst, def) => {
2741
+ const $ZodExactOptional = /*@__PURE__*/ $constructor("$ZodExactOptional", (inst, def) => {
2713
2742
  $ZodOptional.init(inst, def);
2714
2743
  defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
2715
2744
  defineLazyInternal(inst, "pattern", (zod) => zod.def.innerType._zod.pattern);
@@ -2717,7 +2746,7 @@ const $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (ins
2717
2746
  return def.innerType._zod.run(payload, ctx);
2718
2747
  };
2719
2748
  });
2720
- const $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => {
2749
+ const $ZodNullable = /*@__PURE__*/ $constructor("$ZodNullable", (inst, def) => {
2721
2750
  $ZodType.init(inst, def);
2722
2751
  defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin);
2723
2752
  defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout);
@@ -2726,14 +2755,14 @@ const $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) =>
2726
2755
  return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
2727
2756
  });
2728
2757
  defineLazyInternal(inst, "values", (zod) => {
2729
- return zod.def.innerType._zod.values ? new Set([...zod.def.innerType._zod.values, null]) : void 0;
2758
+ return zod.def.innerType._zod.values ? /* @__PURE__ */ new Set([...zod.def.innerType._zod.values, null]) : void 0;
2730
2759
  });
2731
2760
  inst._zod.parse = (payload, ctx) => {
2732
2761
  if (payload.value === null) return payload;
2733
2762
  return def.innerType._zod.run(payload, ctx);
2734
2763
  };
2735
2764
  });
2736
- const $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
2765
+ const $ZodDefault = /*@__PURE__*/ $constructor("$ZodDefault", (inst, def) => {
2737
2766
  $ZodType.init(inst, def);
2738
2767
  inst._zod.optin = "defaulted";
2739
2768
  defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
@@ -2747,7 +2776,7 @@ const $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
2747
2776
  return payload;
2748
2777
  }
2749
2778
  const result = def.innerType._zod.run(payload, ctx);
2750
- if (result instanceof Promise) return result.then((result$1) => handleDefaultResult(result$1, def));
2779
+ if (result instanceof Promise) return result.then((result) => handleDefaultResult(result, def));
2751
2780
  return handleDefaultResult(result, def);
2752
2781
  };
2753
2782
  });
@@ -2755,7 +2784,7 @@ function handleDefaultResult(payload, def) {
2755
2784
  if (payload.value === void 0) payload.value = def.defaultValue;
2756
2785
  return payload;
2757
2786
  }
2758
- const $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
2787
+ const $ZodPrefault = /*@__PURE__*/ $constructor("$ZodPrefault", (inst, def) => {
2759
2788
  $ZodType.init(inst, def);
2760
2789
  inst._zod.optin = "defaulted";
2761
2790
  defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
@@ -2765,7 +2794,7 @@ const $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) =>
2765
2794
  return def.innerType._zod.run(payload, ctx);
2766
2795
  };
2767
2796
  });
2768
- const $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
2797
+ const $ZodNonOptional = /*@__PURE__*/ $constructor("$ZodNonOptional", (inst, def) => {
2769
2798
  $ZodType.init(inst, def);
2770
2799
  defineLazyInternal(inst, "values", (zod) => {
2771
2800
  const v = zod.def.innerType._zod.values;
@@ -2773,7 +2802,7 @@ const $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, d
2773
2802
  });
2774
2803
  inst._zod.parse = (payload, ctx) => {
2775
2804
  const result = def.innerType._zod.run(payload, ctx);
2776
- if (result instanceof Promise) return result.then((result$1) => handleNonOptionalResult(result$1, inst));
2805
+ if (result instanceof Promise) return result.then((result) => handleNonOptionalResult(result, inst));
2777
2806
  return handleNonOptionalResult(result, inst);
2778
2807
  };
2779
2808
  });
@@ -2800,7 +2829,7 @@ function handleCatchResult(payload, result, def, ctx) {
2800
2829
  });
2801
2830
  return payload;
2802
2831
  }
2803
- const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
2832
+ const $ZodCatch = /*@__PURE__*/ $constructor("$ZodCatch", (inst, def) => {
2804
2833
  $ZodType.init(inst, def);
2805
2834
  defineLazyInternal(inst, "optin", (zod) => zod.def.innerType._zod.optin === "defaulted" ? "defaulted" : "optional");
2806
2835
  defineLazyInternal(inst, "optout", (zod) => zod.def.innerType._zod.optout);
@@ -2811,11 +2840,11 @@ const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
2811
2840
  value: payload.value,
2812
2841
  issues: []
2813
2842
  }, ctx);
2814
- if (result instanceof Promise) return result.then((result$1) => handleCatchResult(payload, result$1, def, ctx));
2843
+ if (result instanceof Promise) return result.then((result) => handleCatchResult(payload, result, def, ctx));
2815
2844
  return handleCatchResult(payload, result, def, ctx);
2816
2845
  };
2817
2846
  });
2818
- const $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
2847
+ const $ZodPipe = /*@__PURE__*/ $constructor("$ZodPipe", (inst, def) => {
2819
2848
  $ZodType.init(inst, def);
2820
2849
  defineLazyInternal(inst, "values", (zod) => zod.def.in._zod.values);
2821
2850
  defineLazyInternal(inst, "optin", (zod) => zod.def.in._zod.optin);
@@ -2824,11 +2853,11 @@ const $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
2824
2853
  inst._zod.parse = (payload, ctx) => {
2825
2854
  if (ctx.direction === "backward") {
2826
2855
  const right = def.out._zod.run(payload, ctx);
2827
- if (right instanceof Promise) return right.then((right$1) => handlePipeResult(right$1, def.in, ctx));
2856
+ if (right instanceof Promise) return right.then((right) => handlePipeResult(right, def.in, ctx));
2828
2857
  return handlePipeResult(right, def.in, ctx);
2829
2858
  }
2830
2859
  const left = def.in._zod.run(payload, ctx);
2831
- if (left instanceof Promise) return left.then((left$1) => handlePipeResult(left$1, def.out, ctx));
2860
+ if (left instanceof Promise) return left.then((left) => handlePipeResult(left, def.out, ctx));
2832
2861
  return handlePipeResult(left, def.out, ctx);
2833
2862
  };
2834
2863
  });
@@ -2842,7 +2871,7 @@ function handlePipeResult(left, next, ctx) {
2842
2871
  issues: left.issues
2843
2872
  }, ctx);
2844
2873
  }
2845
- const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
2874
+ const $ZodReadonly = /*@__PURE__*/ $constructor("$ZodReadonly", (inst, def) => {
2846
2875
  $ZodType.init(inst, def);
2847
2876
  defineLazyInternal(inst, "propValues", (zod) => zod.def.innerType._zod.propValues);
2848
2877
  defineLazyInternal(inst, "values", (zod) => zod.def.innerType._zod.values);
@@ -2859,7 +2888,22 @@ function handleReadonlyResult(payload) {
2859
2888
  if (!payload.memo) payload.value = Object.freeze(payload.value);
2860
2889
  return payload;
2861
2890
  }
2862
- const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
2891
+ const $ZodLazy = /*@__PURE__*/ $constructor("$ZodLazy", (inst, def) => {
2892
+ $ZodType.init(inst, def);
2893
+ defineLazy(inst._zod, "innerType", () => {
2894
+ const d = def;
2895
+ if (!d._cachedInner) d._cachedInner = def.getter();
2896
+ return d._cachedInner;
2897
+ });
2898
+ defineLazyInternal(inst, "pattern", (zod) => zod.innerType?._zod?.pattern);
2899
+ defineLazyInternal(inst, "propValues", (zod) => zod.innerType?._zod?.propValues);
2900
+ defineLazyInternal(inst, "optin", (zod) => zod.innerType?._zod?.optin ?? void 0);
2901
+ defineLazyInternal(inst, "optout", (zod) => zod.innerType?._zod?.optout ?? void 0);
2902
+ inst._zod.parse = (payload, ctx) => {
2903
+ return inst._zod.innerType._zod.run(payload, ctx);
2904
+ };
2905
+ });
2906
+ const $ZodCustom = /*@__PURE__*/ $constructor("$ZodCustom", (inst, def) => {
2863
2907
  $ZodCheck.init(inst, def);
2864
2908
  $ZodType.init(inst, def);
2865
2909
  inst._zod.parse = (payload, _) => {
@@ -2868,9 +2912,8 @@ const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
2868
2912
  inst._zod.check = (payload) => {
2869
2913
  const input = payload.value;
2870
2914
  const r = def.fn(input);
2871
- if (r instanceof Promise) return r.then((r$1) => handleRefineResult(r$1, payload, input, inst));
2915
+ if (r instanceof Promise) return r.then((r) => handleRefineResult(r, payload, input, inst));
2872
2916
  handleRefineResult(r, payload, input, inst);
2873
- return;
2874
2917
  };
2875
2918
  });
2876
2919
  function handleRefineResult(result, payload, input, inst) {
@@ -2886,7 +2929,6 @@ function handleRefineResult(result, payload, input, inst) {
2886
2929
  payload.issues.push(issue(_iss));
2887
2930
  }
2888
2931
  }
2889
-
2890
2932
  //#endregion
2891
2933
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/memoizer.js
2892
2934
  var $ZodCyclicError = class extends Error {
@@ -2907,15 +2949,15 @@ function cloneIssues(issues) {
2907
2949
  path: iss.path.slice()
2908
2950
  } : { ...iss });
2909
2951
  }
2910
- const recursive = /* @__PURE__ */ new WeakMap();
2952
+ const recursive = /*@__PURE__*/ new WeakMap();
2911
2953
  /** What the walk established, in order of certainty: ordered so the strongest answer among children wins. */
2912
2954
  const NONE = 0;
2913
2955
  const ASSUMED = 1;
2914
2956
  const PROVEN = 2;
2915
2957
  /** Whether this schema's subtree contains a cycle, so one parse can re-enter it. */
2916
2958
  function isRecursive(inst, stack, resolve) {
2917
- const cached$1 = recursive.get(inst);
2918
- if (cached$1 !== void 0) return cached$1 ? PROVEN : NONE;
2959
+ const cached = recursive.get(inst);
2960
+ if (cached !== void 0) return cached ? PROVEN : NONE;
2919
2961
  if (stack.has(inst)) return PROVEN;
2920
2962
  stack.add(inst);
2921
2963
  let result = NONE;
@@ -2935,15 +2977,14 @@ function isRecursive(inst, stack, resolve) {
2935
2977
  }
2936
2978
  return answer;
2937
2979
  };
2938
- const merge$1 = (answer) => {
2980
+ const merge = (answer) => {
2939
2981
  if (answer > result) result = answer;
2940
2982
  };
2941
2983
  const def = inst._zod.def;
2942
- const kind = def.type;
2943
- switch (kind) {
2984
+ switch (def.type) {
2944
2985
  case "object": {
2945
2986
  const raw = rawShape(def);
2946
- merge$1(raw ? shape(raw, true) : ASSUMED);
2987
+ merge(raw ? shape(raw, true) : ASSUMED);
2947
2988
  check(def.catchall);
2948
2989
  break;
2949
2990
  }
@@ -2990,7 +3031,7 @@ function isRecursive(inst, stack, resolve) {
2990
3031
  break;
2991
3032
  case "lazy": {
2992
3033
  const inner = def._cachedInner ?? (resolve ? inst._zod.innerType : void 0);
2993
- merge$1(inner ? isRecursive(inner, stack, false) : ASSUMED);
3034
+ merge(inner ? isRecursive(inner, stack, false) : ASSUMED);
2994
3035
  break;
2995
3036
  }
2996
3037
  case "template_literal":
@@ -3054,8 +3095,8 @@ const memo = {
3054
3095
  return empty;
3055
3096
  },
3056
3097
  guard(inst) {
3057
- var _a$2;
3058
- (_a$2 = inst._zod).deferred ?? (_a$2.deferred = []);
3098
+ var _a;
3099
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
3059
3100
  inst._zod.deferred.push(() => {
3060
3101
  const base = inst._zod.parse;
3061
3102
  const wrapped = (payload, ctx) => {
@@ -3067,12 +3108,12 @@ const memo = {
3067
3108
  });
3068
3109
  },
3069
3110
  attach(inst) {
3070
- var _a$2;
3111
+ var _a;
3071
3112
  let isRecursiveInst;
3072
3113
  let rechecked = false;
3073
3114
  let lastCtx;
3074
3115
  let lastBucket;
3075
- (_a$2 = inst._zod).deferred ?? (_a$2.deferred = []);
3116
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
3076
3117
  inst._zod.deferred.push(() => {
3077
3118
  const base = inst._zod.parse;
3078
3119
  const wrapped = (payload, ctx) => {
@@ -3141,7 +3182,6 @@ function isBackEdge(ctx, value) {
3141
3182
  const backEdges = ctx[STATE]?.backEdges;
3142
3183
  return backEdges !== void 0 && isRef(value) && backEdges.has(value);
3143
3184
  }
3144
-
3145
3185
  //#endregion
3146
3186
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/locales/en.js
3147
3187
  const error = () => {
@@ -3209,48 +3249,40 @@ const error = () => {
3209
3249
  if (type === "number" && typeof input === "number" && !Number.isFinite(input)) return String(input);
3210
3250
  return TypeDictionary[type] ?? type;
3211
3251
  }
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
- }
3252
+ return (issue) => {
3253
+ switch (issue.code) {
3254
+ case "invalid_type": return `Invalid input: expected ${getTypeName(issue.expected)}, received ${getTypeName(parsedType(issue.input), issue.input)}`;
3220
3255
  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, "|")}`;
3256
+ if (issue.values.length === 1) return `Invalid input: expected ${stringifyPrimitive(issue.values[0])}`;
3257
+ return `Invalid option: expected one of ${joinValues(issue.values, "|")}`;
3223
3258
  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()}`;
3259
+ const adj = issue.exact ? "exactly " : issue.inclusive ? "<=" : "<";
3260
+ const sizing = getSizing(issue.origin);
3261
+ if (sizing) return `Too big: expected ${issue.origin ?? "value"} to have ${adj}${issue.maximum.toString()} ${sizing.unit ?? "elements"}`;
3262
+ return `Too big: expected ${issue.origin ?? "value"} to be ${adj}${issue.maximum.toString()}`;
3228
3263
  }
3229
3264
  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()}`;
3265
+ const adj = issue.exact ? "exactly " : issue.inclusive ? ">=" : ">";
3266
+ const sizing = getSizing(issue.origin);
3267
+ if (sizing) return `Too small: expected ${issue.origin} to have ${adj}${issue.minimum.toString()} ${sizing.unit}`;
3268
+ return `Too small: expected ${issue.origin} to be ${adj}${issue.minimum.toString()}`;
3234
3269
  }
3235
3270
  case "invalid_format": {
3236
- const _issue = issue$1;
3271
+ const _issue = issue;
3237
3272
  if (_issue.format === "starts_with") return `Invalid string: must start with "${_issue.prefix}"`;
3238
3273
  if (_issue.format === "ends_with") return `Invalid string: must end with "${_issue.suffix}"`;
3239
3274
  if (_issue.format === "includes") return `Invalid string: must include "${_issue.includes}"`;
3240
3275
  if (_issue.format === "regex") return `Invalid string: must match pattern ${_issue.pattern}`;
3241
- return `Invalid ${FormatDictionary[_issue.format] ?? issue$1.format}`;
3276
+ return `Invalid ${FormatDictionary[_issue.format] ?? issue.format}`;
3242
3277
  }
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}`;
3278
+ case "not_multiple_of": return `Invalid number: must be a multiple of ${issue.divisor}`;
3279
+ case "unrecognized_keys": return `Unrecognized key${issue.keys.length > 1 ? "s" : ""}: ${joinValues(issue.keys, ", ")}`;
3280
+ case "invalid_key": return `Invalid key in ${issue.origin}`;
3246
3281
  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";
3282
+ if (issue.options && Array.isArray(issue.options) && issue.options.length > 0) return `Invalid discriminator value. Expected ${issue.options.map((o) => `'${o}'`).join(" | ")}`;
3283
+ if (issue.inclusive === false) return "Invalid input: more than one option matched";
3252
3284
  return "Invalid input";
3253
- case "invalid_element": return `Invalid value in ${issue$1.origin}`;
3285
+ case "invalid_element": return `Invalid value in ${issue.origin}`;
3254
3286
  default: return `Invalid input`;
3255
3287
  }
3256
3288
  };
@@ -3258,7 +3290,6 @@ const error = () => {
3258
3290
  function en_default() {
3259
3291
  return { localeError: error() };
3260
3292
  }
3261
-
3262
3293
  //#endregion
3263
3294
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/registries.js
3264
3295
  var _a;
@@ -3268,9 +3299,9 @@ var $ZodRegistry = class {
3268
3299
  this._idmap = /* @__PURE__ */ new Map();
3269
3300
  }
3270
3301
  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);
3302
+ const meta = _meta[0];
3303
+ this._map.set(schema, meta);
3304
+ if (meta && typeof meta === "object" && "id" in meta) this._idmap.set(meta.id, schema);
3274
3305
  return this;
3275
3306
  }
3276
3307
  clear() {
@@ -3279,8 +3310,8 @@ var $ZodRegistry = class {
3279
3310
  return this;
3280
3311
  }
3281
3312
  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);
3313
+ const meta = this._map.get(schema);
3314
+ if (meta && typeof meta === "object" && "id" in meta) this._idmap.delete(meta.id);
3284
3315
  this._map.delete(schema);
3285
3316
  return this;
3286
3317
  }
@@ -3306,21 +3337,20 @@ function registry() {
3306
3337
  }
3307
3338
  (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
3308
3339
  const globalRegistry = globalThis.__zod_globalRegistry;
3309
-
3310
3340
  //#endregion
3311
3341
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/api.js
3312
3342
  function snapshotChecks(def) {
3313
3343
  if (def.checks) def.checks = [...def.checks];
3314
3344
  return def;
3315
3345
  }
3316
- /* @__NO_SIDE_EFFECTS__ */
3346
+ // @__NO_SIDE_EFFECTS__
3317
3347
  function _string(Class, params) {
3318
3348
  return new Class(snapshotChecks({
3319
3349
  type: "string",
3320
3350
  ...normalizeParams(params)
3321
3351
  }));
3322
3352
  }
3323
- /* @__NO_SIDE_EFFECTS__ */
3353
+ // @__NO_SIDE_EFFECTS__
3324
3354
  function _email(Class, params) {
3325
3355
  return new Class({
3326
3356
  type: "string",
@@ -3330,7 +3360,7 @@ function _email(Class, params) {
3330
3360
  ...normalizeParams(params)
3331
3361
  });
3332
3362
  }
3333
- /* @__NO_SIDE_EFFECTS__ */
3363
+ // @__NO_SIDE_EFFECTS__
3334
3364
  function _guid(Class, params) {
3335
3365
  return new Class({
3336
3366
  type: "string",
@@ -3340,7 +3370,7 @@ function _guid(Class, params) {
3340
3370
  ...normalizeParams(params)
3341
3371
  });
3342
3372
  }
3343
- /* @__NO_SIDE_EFFECTS__ */
3373
+ // @__NO_SIDE_EFFECTS__
3344
3374
  function _uuid(Class, params) {
3345
3375
  return new Class({
3346
3376
  type: "string",
@@ -3350,7 +3380,7 @@ function _uuid(Class, params) {
3350
3380
  ...normalizeParams(params)
3351
3381
  });
3352
3382
  }
3353
- /* @__NO_SIDE_EFFECTS__ */
3383
+ // @__NO_SIDE_EFFECTS__
3354
3384
  function _uuidv4(Class, params) {
3355
3385
  return new Class({
3356
3386
  type: "string",
@@ -3361,7 +3391,7 @@ function _uuidv4(Class, params) {
3361
3391
  ...normalizeParams(params)
3362
3392
  });
3363
3393
  }
3364
- /* @__NO_SIDE_EFFECTS__ */
3394
+ // @__NO_SIDE_EFFECTS__
3365
3395
  function _uuidv6(Class, params) {
3366
3396
  return new Class({
3367
3397
  type: "string",
@@ -3372,7 +3402,7 @@ function _uuidv6(Class, params) {
3372
3402
  ...normalizeParams(params)
3373
3403
  });
3374
3404
  }
3375
- /* @__NO_SIDE_EFFECTS__ */
3405
+ // @__NO_SIDE_EFFECTS__
3376
3406
  function _uuidv7(Class, params) {
3377
3407
  return new Class({
3378
3408
  type: "string",
@@ -3383,7 +3413,7 @@ function _uuidv7(Class, params) {
3383
3413
  ...normalizeParams(params)
3384
3414
  });
3385
3415
  }
3386
- /* @__NO_SIDE_EFFECTS__ */
3416
+ // @__NO_SIDE_EFFECTS__
3387
3417
  function _url(Class, params) {
3388
3418
  return new Class({
3389
3419
  type: "string",
@@ -3393,7 +3423,7 @@ function _url(Class, params) {
3393
3423
  ...normalizeParams(params)
3394
3424
  });
3395
3425
  }
3396
- /* @__NO_SIDE_EFFECTS__ */
3426
+ // @__NO_SIDE_EFFECTS__
3397
3427
  function _emoji(Class, params) {
3398
3428
  return new Class({
3399
3429
  type: "string",
@@ -3403,7 +3433,7 @@ function _emoji(Class, params) {
3403
3433
  ...normalizeParams(params)
3404
3434
  });
3405
3435
  }
3406
- /* @__NO_SIDE_EFFECTS__ */
3436
+ // @__NO_SIDE_EFFECTS__
3407
3437
  function _nanoid(Class, params) {
3408
3438
  return new Class({
3409
3439
  type: "string",
@@ -3418,7 +3448,7 @@ function _nanoid(Class, params) {
3418
3448
  * (timestamps embedded in the id). Use {@link _cuid2} instead.
3419
3449
  * See https://github.com/paralleldrive/cuid.
3420
3450
  */
3421
- /* @__NO_SIDE_EFFECTS__ */
3451
+ // @__NO_SIDE_EFFECTS__
3422
3452
  function _cuid(Class, params) {
3423
3453
  return new Class({
3424
3454
  type: "string",
@@ -3428,7 +3458,7 @@ function _cuid(Class, params) {
3428
3458
  ...normalizeParams(params)
3429
3459
  });
3430
3460
  }
3431
- /* @__NO_SIDE_EFFECTS__ */
3461
+ // @__NO_SIDE_EFFECTS__
3432
3462
  function _cuid2(Class, params) {
3433
3463
  return new Class({
3434
3464
  type: "string",
@@ -3438,7 +3468,7 @@ function _cuid2(Class, params) {
3438
3468
  ...normalizeParams(params)
3439
3469
  });
3440
3470
  }
3441
- /* @__NO_SIDE_EFFECTS__ */
3471
+ // @__NO_SIDE_EFFECTS__
3442
3472
  function _ulid(Class, params) {
3443
3473
  return new Class({
3444
3474
  type: "string",
@@ -3448,7 +3478,7 @@ function _ulid(Class, params) {
3448
3478
  ...normalizeParams(params)
3449
3479
  });
3450
3480
  }
3451
- /* @__NO_SIDE_EFFECTS__ */
3481
+ // @__NO_SIDE_EFFECTS__
3452
3482
  function _xid(Class, params) {
3453
3483
  return new Class({
3454
3484
  type: "string",
@@ -3458,7 +3488,7 @@ function _xid(Class, params) {
3458
3488
  ...normalizeParams(params)
3459
3489
  });
3460
3490
  }
3461
- /* @__NO_SIDE_EFFECTS__ */
3491
+ // @__NO_SIDE_EFFECTS__
3462
3492
  function _ksuid(Class, params) {
3463
3493
  return new Class({
3464
3494
  type: "string",
@@ -3468,7 +3498,7 @@ function _ksuid(Class, params) {
3468
3498
  ...normalizeParams(params)
3469
3499
  });
3470
3500
  }
3471
- /* @__NO_SIDE_EFFECTS__ */
3501
+ // @__NO_SIDE_EFFECTS__
3472
3502
  function _ipv4(Class, params) {
3473
3503
  return new Class({
3474
3504
  type: "string",
@@ -3478,7 +3508,7 @@ function _ipv4(Class, params) {
3478
3508
  ...normalizeParams(params)
3479
3509
  });
3480
3510
  }
3481
- /* @__NO_SIDE_EFFECTS__ */
3511
+ // @__NO_SIDE_EFFECTS__
3482
3512
  function _ipv6(Class, params) {
3483
3513
  return new Class({
3484
3514
  type: "string",
@@ -3488,7 +3518,7 @@ function _ipv6(Class, params) {
3488
3518
  ...normalizeParams(params)
3489
3519
  });
3490
3520
  }
3491
- /* @__NO_SIDE_EFFECTS__ */
3521
+ // @__NO_SIDE_EFFECTS__
3492
3522
  function _cidrv4(Class, params) {
3493
3523
  return new Class({
3494
3524
  type: "string",
@@ -3498,7 +3528,7 @@ function _cidrv4(Class, params) {
3498
3528
  ...normalizeParams(params)
3499
3529
  });
3500
3530
  }
3501
- /* @__NO_SIDE_EFFECTS__ */
3531
+ // @__NO_SIDE_EFFECTS__
3502
3532
  function _cidrv6(Class, params) {
3503
3533
  return new Class({
3504
3534
  type: "string",
@@ -3508,7 +3538,7 @@ function _cidrv6(Class, params) {
3508
3538
  ...normalizeParams(params)
3509
3539
  });
3510
3540
  }
3511
- /* @__NO_SIDE_EFFECTS__ */
3541
+ // @__NO_SIDE_EFFECTS__
3512
3542
  function _base64(Class, params) {
3513
3543
  return new Class({
3514
3544
  type: "string",
@@ -3518,7 +3548,7 @@ function _base64(Class, params) {
3518
3548
  ...normalizeParams(params)
3519
3549
  });
3520
3550
  }
3521
- /* @__NO_SIDE_EFFECTS__ */
3551
+ // @__NO_SIDE_EFFECTS__
3522
3552
  function _base64url(Class, params) {
3523
3553
  return new Class({
3524
3554
  type: "string",
@@ -3528,7 +3558,7 @@ function _base64url(Class, params) {
3528
3558
  ...normalizeParams(params)
3529
3559
  });
3530
3560
  }
3531
- /* @__NO_SIDE_EFFECTS__ */
3561
+ // @__NO_SIDE_EFFECTS__
3532
3562
  function _e164(Class, params) {
3533
3563
  return new Class({
3534
3564
  type: "string",
@@ -3538,7 +3568,7 @@ function _e164(Class, params) {
3538
3568
  ...normalizeParams(params)
3539
3569
  });
3540
3570
  }
3541
- /* @__NO_SIDE_EFFECTS__ */
3571
+ // @__NO_SIDE_EFFECTS__
3542
3572
  function _jwt(Class, params) {
3543
3573
  return new Class({
3544
3574
  type: "string",
@@ -3548,7 +3578,7 @@ function _jwt(Class, params) {
3548
3578
  ...normalizeParams(params)
3549
3579
  });
3550
3580
  }
3551
- /* @__NO_SIDE_EFFECTS__ */
3581
+ // @__NO_SIDE_EFFECTS__
3552
3582
  function _isoDateTime(Class, params) {
3553
3583
  return new Class({
3554
3584
  type: "string",
@@ -3560,7 +3590,7 @@ function _isoDateTime(Class, params) {
3560
3590
  ...normalizeParams(params)
3561
3591
  });
3562
3592
  }
3563
- /* @__NO_SIDE_EFFECTS__ */
3593
+ // @__NO_SIDE_EFFECTS__
3564
3594
  function _isoDate(Class, params) {
3565
3595
  return new Class({
3566
3596
  type: "string",
@@ -3569,7 +3599,7 @@ function _isoDate(Class, params) {
3569
3599
  ...normalizeParams(params)
3570
3600
  });
3571
3601
  }
3572
- /* @__NO_SIDE_EFFECTS__ */
3602
+ // @__NO_SIDE_EFFECTS__
3573
3603
  function _isoTime(Class, params) {
3574
3604
  return new Class({
3575
3605
  type: "string",
@@ -3579,7 +3609,7 @@ function _isoTime(Class, params) {
3579
3609
  ...normalizeParams(params)
3580
3610
  });
3581
3611
  }
3582
- /* @__NO_SIDE_EFFECTS__ */
3612
+ // @__NO_SIDE_EFFECTS__
3583
3613
  function _isoDuration(Class, params) {
3584
3614
  return new Class({
3585
3615
  type: "string",
@@ -3588,7 +3618,7 @@ function _isoDuration(Class, params) {
3588
3618
  ...normalizeParams(params)
3589
3619
  });
3590
3620
  }
3591
- /* @__NO_SIDE_EFFECTS__ */
3621
+ // @__NO_SIDE_EFFECTS__
3592
3622
  function _number(Class, params) {
3593
3623
  return new Class(snapshotChecks({
3594
3624
  type: "number",
@@ -3596,7 +3626,7 @@ function _number(Class, params) {
3596
3626
  ...normalizeParams(params)
3597
3627
  }));
3598
3628
  }
3599
- /* @__NO_SIDE_EFFECTS__ */
3629
+ // @__NO_SIDE_EFFECTS__
3600
3630
  function _int(Class, params) {
3601
3631
  return new Class({
3602
3632
  type: "number",
@@ -3606,25 +3636,25 @@ function _int(Class, params) {
3606
3636
  ...normalizeParams(params)
3607
3637
  });
3608
3638
  }
3609
- /* @__NO_SIDE_EFFECTS__ */
3639
+ // @__NO_SIDE_EFFECTS__
3610
3640
  function _boolean(Class, params) {
3611
3641
  return new Class({
3612
3642
  type: "boolean",
3613
3643
  ...normalizeParams(params)
3614
3644
  });
3615
3645
  }
3616
- /* @__NO_SIDE_EFFECTS__ */
3646
+ // @__NO_SIDE_EFFECTS__
3617
3647
  function _unknown(Class) {
3618
3648
  return new Class({ type: "unknown" });
3619
3649
  }
3620
- /* @__NO_SIDE_EFFECTS__ */
3650
+ // @__NO_SIDE_EFFECTS__
3621
3651
  function _never(Class, params) {
3622
3652
  return new Class({
3623
3653
  type: "never",
3624
3654
  ...normalizeParams(params)
3625
3655
  });
3626
3656
  }
3627
- /* @__NO_SIDE_EFFECTS__ */
3657
+ // @__NO_SIDE_EFFECTS__
3628
3658
  function _lt(value, params) {
3629
3659
  return new $ZodCheckLessThan({
3630
3660
  check: "less_than",
@@ -3633,7 +3663,7 @@ function _lt(value, params) {
3633
3663
  inclusive: false
3634
3664
  });
3635
3665
  }
3636
- /* @__NO_SIDE_EFFECTS__ */
3666
+ // @__NO_SIDE_EFFECTS__
3637
3667
  function _lte(value, params) {
3638
3668
  return new $ZodCheckLessThan({
3639
3669
  check: "less_than",
@@ -3642,7 +3672,7 @@ function _lte(value, params) {
3642
3672
  inclusive: true
3643
3673
  });
3644
3674
  }
3645
- /* @__NO_SIDE_EFFECTS__ */
3675
+ // @__NO_SIDE_EFFECTS__
3646
3676
  function _gt(value, params) {
3647
3677
  return new $ZodCheckGreaterThan({
3648
3678
  check: "greater_than",
@@ -3651,7 +3681,7 @@ function _gt(value, params) {
3651
3681
  inclusive: false
3652
3682
  });
3653
3683
  }
3654
- /* @__NO_SIDE_EFFECTS__ */
3684
+ // @__NO_SIDE_EFFECTS__
3655
3685
  function _gte(value, params) {
3656
3686
  return new $ZodCheckGreaterThan({
3657
3687
  check: "greater_than",
@@ -3660,7 +3690,7 @@ function _gte(value, params) {
3660
3690
  inclusive: true
3661
3691
  });
3662
3692
  }
3663
- /* @__NO_SIDE_EFFECTS__ */
3693
+ // @__NO_SIDE_EFFECTS__
3664
3694
  function _multipleOf(value, params) {
3665
3695
  return new $ZodCheckMultipleOf({
3666
3696
  check: "multiple_of",
@@ -3668,16 +3698,15 @@ function _multipleOf(value, params) {
3668
3698
  value
3669
3699
  });
3670
3700
  }
3671
- /* @__NO_SIDE_EFFECTS__ */
3701
+ // @__NO_SIDE_EFFECTS__
3672
3702
  function _maxLength(maximum, params) {
3673
- const ch = new $ZodCheckMaxLength({
3703
+ return new $ZodCheckMaxLength({
3674
3704
  check: "max_length",
3675
3705
  ...normalizeParams(params),
3676
3706
  maximum
3677
3707
  });
3678
- return ch;
3679
3708
  }
3680
- /* @__NO_SIDE_EFFECTS__ */
3709
+ // @__NO_SIDE_EFFECTS__
3681
3710
  function _minLength(minimum, params) {
3682
3711
  return new $ZodCheckMinLength({
3683
3712
  check: "min_length",
@@ -3685,7 +3714,7 @@ function _minLength(minimum, params) {
3685
3714
  minimum
3686
3715
  });
3687
3716
  }
3688
- /* @__NO_SIDE_EFFECTS__ */
3717
+ // @__NO_SIDE_EFFECTS__
3689
3718
  function _length(length, params) {
3690
3719
  return new $ZodCheckLengthEquals({
3691
3720
  check: "length_equals",
@@ -3693,7 +3722,7 @@ function _length(length, params) {
3693
3722
  length
3694
3723
  });
3695
3724
  }
3696
- /* @__NO_SIDE_EFFECTS__ */
3725
+ // @__NO_SIDE_EFFECTS__
3697
3726
  function _regex(pattern, params) {
3698
3727
  return new $ZodCheckRegex({
3699
3728
  check: "string_format",
@@ -3702,7 +3731,7 @@ function _regex(pattern, params) {
3702
3731
  pattern
3703
3732
  });
3704
3733
  }
3705
- /* @__NO_SIDE_EFFECTS__ */
3734
+ // @__NO_SIDE_EFFECTS__
3706
3735
  function _lowercase(params) {
3707
3736
  return new $ZodCheckLowerCase({
3708
3737
  check: "string_format",
@@ -3710,7 +3739,7 @@ function _lowercase(params) {
3710
3739
  ...normalizeParams(params)
3711
3740
  });
3712
3741
  }
3713
- /* @__NO_SIDE_EFFECTS__ */
3742
+ // @__NO_SIDE_EFFECTS__
3714
3743
  function _uppercase(params) {
3715
3744
  return new $ZodCheckUpperCase({
3716
3745
  check: "string_format",
@@ -3718,7 +3747,7 @@ function _uppercase(params) {
3718
3747
  ...normalizeParams(params)
3719
3748
  });
3720
3749
  }
3721
- /* @__NO_SIDE_EFFECTS__ */
3750
+ // @__NO_SIDE_EFFECTS__
3722
3751
  function _includes(includes, params) {
3723
3752
  return new $ZodCheckIncludes({
3724
3753
  check: "string_format",
@@ -3727,7 +3756,7 @@ function _includes(includes, params) {
3727
3756
  includes
3728
3757
  });
3729
3758
  }
3730
- /* @__NO_SIDE_EFFECTS__ */
3759
+ // @__NO_SIDE_EFFECTS__
3731
3760
  function _startsWith(prefix, params) {
3732
3761
  return new $ZodCheckStartsWith({
3733
3762
  check: "string_format",
@@ -3736,7 +3765,7 @@ function _startsWith(prefix, params) {
3736
3765
  prefix
3737
3766
  });
3738
3767
  }
3739
- /* @__NO_SIDE_EFFECTS__ */
3768
+ // @__NO_SIDE_EFFECTS__
3740
3769
  function _endsWith(suffix, params) {
3741
3770
  return new $ZodCheckEndsWith({
3742
3771
  check: "string_format",
@@ -3745,34 +3774,34 @@ function _endsWith(suffix, params) {
3745
3774
  suffix
3746
3775
  });
3747
3776
  }
3748
- /* @__NO_SIDE_EFFECTS__ */
3777
+ // @__NO_SIDE_EFFECTS__
3749
3778
  function _overwrite(tx) {
3750
3779
  return new $ZodCheckOverwrite({
3751
3780
  check: "overwrite",
3752
3781
  tx
3753
3782
  });
3754
3783
  }
3755
- /* @__NO_SIDE_EFFECTS__ */
3784
+ // @__NO_SIDE_EFFECTS__
3756
3785
  function _normalize(form) {
3757
3786
  return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
3758
3787
  }
3759
- /* @__NO_SIDE_EFFECTS__ */
3788
+ // @__NO_SIDE_EFFECTS__
3760
3789
  function _trim() {
3761
3790
  return /* @__PURE__ */ _overwrite((input) => input.trim());
3762
3791
  }
3763
- /* @__NO_SIDE_EFFECTS__ */
3792
+ // @__NO_SIDE_EFFECTS__
3764
3793
  function _toLowerCase() {
3765
3794
  return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
3766
3795
  }
3767
- /* @__NO_SIDE_EFFECTS__ */
3796
+ // @__NO_SIDE_EFFECTS__
3768
3797
  function _toUpperCase() {
3769
3798
  return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
3770
3799
  }
3771
- /* @__NO_SIDE_EFFECTS__ */
3800
+ // @__NO_SIDE_EFFECTS__
3772
3801
  function _slugify() {
3773
3802
  return /* @__PURE__ */ _overwrite((input) => slugify(input));
3774
3803
  }
3775
- /* @__NO_SIDE_EFFECTS__ */
3804
+ // @__NO_SIDE_EFFECTS__
3776
3805
  function _array(Class, element, params) {
3777
3806
  return new Class({
3778
3807
  type: "array",
@@ -3780,35 +3809,33 @@ function _array(Class, element, params) {
3780
3809
  ...normalizeParams(params)
3781
3810
  });
3782
3811
  }
3783
- /* @__NO_SIDE_EFFECTS__ */
3812
+ // @__NO_SIDE_EFFECTS__
3784
3813
  function _custom(Class, fn, _params) {
3785
3814
  const norm = normalizeParams(_params);
3786
3815
  norm.abort ?? (norm.abort = true);
3787
- const schema = new Class({
3816
+ return new Class({
3788
3817
  type: "custom",
3789
3818
  check: "custom",
3790
3819
  fn,
3791
3820
  ...norm
3792
3821
  });
3793
- return schema;
3794
3822
  }
3795
- /* @__NO_SIDE_EFFECTS__ */
3823
+ // @__NO_SIDE_EFFECTS__
3796
3824
  function _refine(Class, fn, _params) {
3797
- const schema = new Class({
3825
+ return new Class({
3798
3826
  type: "custom",
3799
3827
  check: "custom",
3800
3828
  fn,
3801
3829
  ...normalizeParams(_params)
3802
3830
  });
3803
- return schema;
3804
3831
  }
3805
- /* @__NO_SIDE_EFFECTS__ */
3832
+ // @__NO_SIDE_EFFECTS__
3806
3833
  function _superRefine(fn, params) {
3807
3834
  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));
3835
+ payload.addIssue = (issue$2) => {
3836
+ if (typeof issue$2 === "string") payload.issues.push(issue(issue$2, payload.value, ch._zod.def));
3810
3837
  else {
3811
- const _issue = issue$1;
3838
+ const _issue = issue$2;
3812
3839
  if (_issue.fatal) _issue.continue = false;
3813
3840
  _issue.code ?? (_issue.code = "custom");
3814
3841
  if (!("input" in _issue)) _issue.input = payload.value;
@@ -3821,7 +3848,7 @@ function _superRefine(fn, params) {
3821
3848
  }, params);
3822
3849
  return ch;
3823
3850
  }
3824
- /* @__NO_SIDE_EFFECTS__ */
3851
+ // @__NO_SIDE_EFFECTS__
3825
3852
  function _check(fn, params) {
3826
3853
  const ch = new $ZodCheck({
3827
3854
  check: "custom",
@@ -3830,33 +3857,6 @@ function _check(fn, params) {
3830
3857
  ch._zod.check = fn;
3831
3858
  return ch;
3832
3859
  }
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
3860
  //#endregion
3861
3861
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/to-json-schema.js
3862
3862
  function assignProps(target, ...sources) {
@@ -3905,13 +3905,12 @@ function processSchema(schema, ctx, _params = {
3905
3905
  path: [],
3906
3906
  schemaPath: []
3907
3907
  }) {
3908
- var _a$2;
3908
+ var _a;
3909
3909
  const def = schema._zod.def;
3910
3910
  const seen = ctx.seen.get(schema);
3911
3911
  if (seen) {
3912
3912
  seen.count++;
3913
- const isCycle = _params.schemaPath.includes(schema);
3914
- if (isCycle) seen.cycle = _params.path;
3913
+ if (_params.schemaPath.includes(schema)) seen.cycle = _params.path;
3915
3914
  return seen.schema;
3916
3915
  }
3917
3916
  const result = {
@@ -3945,16 +3944,15 @@ function processSchema(schema, ctx, _params = {
3945
3944
  ctx.seen.get(parent).isParent = true;
3946
3945
  }
3947
3946
  }
3948
- const meta$2 = ctx.metadataRegistry.get(schema);
3949
- if (meta$2) assignProps(result.schema, meta$2);
3947
+ const meta = ctx.metadataRegistry.get(schema);
3948
+ if (meta) assignProps(result.schema, meta);
3950
3949
  if (ctx.io === "input" && isTransforming(schema)) {
3951
3950
  delete result.schema.examples;
3952
3951
  delete result.schema.default;
3953
3952
  }
3954
- if (ctx.io === "input" && "_prefault" in result.schema) (_a$2 = result.schema).default ?? (_a$2.default = result.schema._prefault);
3953
+ if (ctx.io === "input" && "_prefault" in result.schema) (_a = result.schema).default ?? (_a.default = result.schema._prefault);
3955
3954
  delete result.schema._prefault;
3956
- const _result = ctx.seen.get(schema);
3957
- return _result.schema;
3955
+ return ctx.seen.get(schema).schema;
3958
3956
  }
3959
3957
  function encodeJSONPointerSegment(segment) {
3960
3958
  return segment.replace(/~/g, "~0").replace(/\//g, "~1");
@@ -3976,7 +3974,7 @@ function extractDefs(ctx, schema) {
3976
3974
  const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
3977
3975
  if (ctx.external) {
3978
3976
  const externalId = ctx.external.registry.get(entry[0])?.id;
3979
- const uriGenerator = ctx.external.uri ?? ((id$1) => id$1);
3977
+ const uriGenerator = ctx.external.uri ?? ((id) => id);
3980
3978
  if (externalId) return { ref: uriGenerator(externalId) };
3981
3979
  const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
3982
3980
  entry[1].defId = id;
@@ -4000,9 +3998,9 @@ function extractDefs(ctx, schema) {
4000
3998
  const { ref, defId } = makeURI(entry);
4001
3999
  seen.def = { ...seen.schema };
4002
4000
  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;
4001
+ const schema = seen.schema;
4002
+ for (const key in schema) delete schema[key];
4003
+ schema.$ref = ref;
4006
4004
  };
4007
4005
  if (ctx.cycles === "throw") for (const entry of ctx.seen.entries()) {
4008
4006
  const seen = entry[1];
@@ -4023,8 +4021,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
4023
4021
  continue;
4024
4022
  }
4025
4023
  }
4026
- const id = ctx.metadataRegistry.get(entry[0])?.id;
4027
- if (id) {
4024
+ if (ctx.metadataRegistry.get(entry[0])?.id) {
4028
4025
  extractToDef(entry);
4029
4026
  continue;
4030
4027
  }
@@ -4060,7 +4057,7 @@ function compactTypeUnion(schema) {
4060
4057
  /** Keywords `foldIntersection` knows how to combine. Anything else — `$ref`, `patternProperties`,
4061
4058
  * an annotation like `description` — makes a member unfoldable, so a constraint this does not
4062
4059
  * understand leaves the `allOf` alone instead of being silently dropped or misattributed. */
4063
- const FOLDABLE_KEYS = new Set([
4060
+ const FOLDABLE_KEYS = /* @__PURE__ */ new Set([
4064
4061
  "type",
4065
4062
  "properties",
4066
4063
  "required",
@@ -4074,17 +4071,17 @@ function undeclaredConstraint(member) {
4074
4071
  return Object.keys(extra).length ? extra : null;
4075
4072
  }
4076
4073
  /** 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) {
4074
+ function foldObjects(members) {
4078
4075
  const objects = [];
4079
- for (const member of members$1) {
4076
+ for (const member of members) {
4080
4077
  if (typeof member !== "object" || member.type !== "object") return null;
4081
4078
  for (const key in member) if (!FOLDABLE_KEYS.has(key)) return null;
4082
4079
  objects.push(member);
4083
4080
  }
4084
4081
  const properties = {};
4085
- const required$1 = /* @__PURE__ */ new Set();
4086
- for (const object$1 of objects) {
4087
- for (const key in object$1.properties) {
4082
+ const required = /* @__PURE__ */ new Set();
4083
+ for (const object of objects) {
4084
+ for (const key in object.properties) {
4088
4085
  if (Object.prototype.hasOwnProperty.call(properties, key)) continue;
4089
4086
  const parts = [];
4090
4087
  for (const other of objects) {
@@ -4092,21 +4089,20 @@ function foldObjects(members$1) {
4092
4089
  if (part === null || part === void 0) continue;
4093
4090
  if (!parts.some((seen) => JSON.stringify(seen) === JSON.stringify(part))) parts.push(part);
4094
4091
  }
4095
- const merged = parts.length === 1 ? parts[0] : foldObjects(parts) ?? { allOf: parts };
4096
- assignProp(properties, key, merged);
4092
+ assignProp(properties, key, parts.length === 1 ? parts[0] : foldObjects(parts) ?? { allOf: parts });
4097
4093
  }
4098
- for (const key of object$1.required ?? []) required$1.add(key);
4094
+ for (const key of object.required ?? []) required.add(key);
4099
4095
  }
4100
4096
  const folded = {
4101
4097
  type: "object",
4102
4098
  properties
4103
4099
  };
4104
- if (required$1.size) folded.required = [...required$1];
4105
- if (objects.every((object$1) => object$1.additionalProperties === false)) folded.additionalProperties = false;
4100
+ if (required.size) folded.required = [...required];
4101
+ if (objects.every((object) => object.additionalProperties === false)) folded.additionalProperties = false;
4106
4102
  else {
4107
4103
  const constraints = [];
4108
- for (const object$1 of objects) {
4109
- const constraint = undeclaredConstraint(object$1);
4104
+ for (const object of objects) {
4105
+ const constraint = undeclaredConstraint(object);
4110
4106
  if (constraint && !constraints.some((seen) => JSON.stringify(seen) === JSON.stringify(constraint))) constraints.push(constraint);
4111
4107
  }
4112
4108
  if (constraints.length === 1) folded.additionalProperties = constraints[0];
@@ -4131,11 +4127,11 @@ function foldIntersection(json) {
4131
4127
  let folded = null;
4132
4128
  if (!unions.length) folded = foldObjects(allOf);
4133
4129
  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]));
4130
+ const union = unions[0];
4131
+ const keyword = UNION_KEYS.find((k) => Array.isArray(union[k]));
4132
+ if (Object.keys(union).length !== 1) return;
4133
+ const rest = allOf.filter((m) => m !== union);
4134
+ const branches = union[keyword].map((branch) => foldObjects([...rest, branch]));
4139
4135
  if (branches.some((b) => !b)) return;
4140
4136
  folded = { [keyword]: branches };
4141
4137
  }
@@ -4149,8 +4145,8 @@ function finalize(ctx, schema) {
4149
4145
  const flattenRef = (zodSchema) => {
4150
4146
  const seen = ctx.seen.get(zodSchema);
4151
4147
  if (seen.ref === null) return;
4152
- const schema$1 = seen.def ?? seen.schema;
4153
- const _cached = { ...schema$1 };
4148
+ const schema = seen.def ?? seen.schema;
4149
+ const _cached = { ...schema };
4154
4150
  const ref = seen.ref;
4155
4151
  seen.ref = null;
4156
4152
  if (ref) {
@@ -4158,18 +4154,17 @@ function finalize(ctx, schema) {
4158
4154
  const refSeen = ctx.seen.get(ref);
4159
4155
  const refSchema = refSeen.schema;
4160
4156
  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) {
4157
+ schema.allOf = schema.allOf ?? [];
4158
+ schema.allOf.push(refSchema);
4159
+ } else assignProps(schema, refSchema);
4160
+ assignProps(schema, _cached);
4161
+ if (zodSchema._zod.parent === ref) for (const key in schema) {
4167
4162
  if (key === "$ref" || key === "allOf") continue;
4168
- if (!(key in _cached)) delete schema$1[key];
4163
+ if (!(key in _cached)) delete schema[key];
4169
4164
  }
4170
- if (refSchema.$ref && refSeen.def) for (const key in schema$1) {
4165
+ if (refSchema.$ref && refSeen.def) for (const key in schema) {
4171
4166
  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];
4167
+ if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) delete schema[key];
4173
4168
  }
4174
4169
  }
4175
4170
  const parent = zodSchema._zod.parent;
@@ -4177,16 +4172,16 @@ function finalize(ctx, schema) {
4177
4172
  flattenRef(parent);
4178
4173
  const parentSeen = ctx.seen.get(parent);
4179
4174
  if (parentSeen?.schema.$ref) {
4180
- schema$1.$ref = parentSeen.schema.$ref;
4181
- if (parentSeen.def) for (const key in schema$1) {
4175
+ schema.$ref = parentSeen.schema.$ref;
4176
+ if (parentSeen.def) for (const key in schema) {
4182
4177
  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];
4178
+ if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) delete schema[key];
4184
4179
  }
4185
4180
  }
4186
4181
  }
4187
4182
  ctx.override({
4188
4183
  zodSchema,
4189
- jsonSchema: schema$1,
4184
+ jsonSchema: schema,
4190
4185
  path: seen.path ?? []
4191
4186
  });
4192
4187
  };
@@ -4228,8 +4223,10 @@ function finalize(ctx, schema) {
4228
4223
  }
4229
4224
  }
4230
4225
  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;
4226
+ if (ctx.external) {} else if (Object.keys(defs).length > 0) {
4227
+ if (ctx.target === "draft-2020-12") result.$defs = defs;
4228
+ else result.definitions = defs;
4229
+ }
4233
4230
  try {
4234
4231
  const finalized = JSON.parse(JSON.stringify(result));
4235
4232
  Object.defineProperty(finalized, "~standard", {
@@ -4304,7 +4301,6 @@ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params)
4304
4301
  extractDefs(ctx, schema);
4305
4302
  return finalize(ctx, schema);
4306
4303
  };
4307
-
4308
4304
  //#endregion
4309
4305
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/core/json-schema-processors.js
4310
4306
  const narrowMin = (agg, key, value) => {
@@ -4386,7 +4382,7 @@ const formatMap = {
4386
4382
  json_string: "json-string",
4387
4383
  regex: ""
4388
4384
  };
4389
- const exactPatterns = new Map([[base64Charset, base64], [base64urlCharset, base64url]]);
4385
+ const exactPatterns = /* @__PURE__ */ new Map([[base64Charset, base64], [base64urlCharset, base64url]]);
4390
4386
  const exactPattern = (p) => exactPatterns.get(p) ?? p;
4391
4387
  const stringProcessor = (schema, ctx, _json, _params) => {
4392
4388
  const json = _json;
@@ -4416,16 +4412,18 @@ const numberProcessor = (schema, ctx, _json, params) => {
4416
4412
  const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
4417
4413
  const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
4418
4414
  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;
4415
+ if (exMin) {
4416
+ if (legacy) {
4417
+ json.minimum = exclusiveMinimum;
4418
+ json.exclusiveMinimum = true;
4419
+ } else json.exclusiveMinimum = exclusiveMinimum;
4420
+ } else if (typeof minimum === "number") json.minimum = minimum;
4421
+ if (exMax) {
4422
+ if (legacy) {
4423
+ json.maximum = exclusiveMaximum;
4424
+ json.exclusiveMaximum = true;
4425
+ } else json.exclusiveMaximum = exclusiveMaximum;
4426
+ } else if (typeof maximum === "number") json.maximum = maximum;
4429
4427
  if (multipleOf) {
4430
4428
  const divisors = /* @__PURE__ */ new Set();
4431
4429
  for (const divisor of multipleOf) if (Number.isFinite(divisor) && divisor !== 0) divisors.add(Math.abs(divisor));
@@ -4438,10 +4436,33 @@ const numberProcessor = (schema, ctx, _json, params) => {
4438
4436
  const booleanProcessor = (_schema, _ctx, json, _params) => {
4439
4437
  json.type = "boolean";
4440
4438
  };
4439
+ const bigintProcessor = (schema, ctx, json, params) => {
4440
+ handleUnrepresentable(schema, ctx, json, params, "BigInt cannot be represented in JSON Schema");
4441
+ };
4442
+ const symbolProcessor = (schema, ctx, json, params) => {
4443
+ handleUnrepresentable(schema, ctx, json, params, "Symbols cannot be represented in JSON Schema");
4444
+ };
4445
+ const nullProcessor = (_schema, ctx, json, _params) => {
4446
+ if (ctx.target === "openapi-3.0") {
4447
+ json.type = "string";
4448
+ json.nullable = true;
4449
+ json.enum = [null];
4450
+ } else json.type = "null";
4451
+ };
4452
+ const undefinedProcessor = (schema, ctx, json, params) => {
4453
+ handleUnrepresentable(schema, ctx, json, params, "Undefined cannot be represented in JSON Schema");
4454
+ };
4455
+ const voidProcessor = (schema, ctx, json, params) => {
4456
+ handleUnrepresentable(schema, ctx, json, params, "Void cannot be represented in JSON Schema");
4457
+ };
4441
4458
  const neverProcessor = (_schema, _ctx, json, _params) => {
4442
4459
  json.not = {};
4443
4460
  };
4461
+ const anyProcessor = (_schema, _ctx, _json, _params) => {};
4444
4462
  const unknownProcessor = (_schema, _ctx, _json, _params) => {};
4463
+ const dateProcessor = (schema, ctx, json, params) => {
4464
+ handleUnrepresentable(schema, ctx, json, params, "Date cannot be represented in JSON Schema");
4465
+ };
4445
4466
  const enumProcessor = (schema, _ctx, json, _params) => {
4446
4467
  const def = schema._zod.def;
4447
4468
  const values = getEnumValues(def.entries);
@@ -4479,12 +4500,47 @@ const literalProcessor = (schema, ctx, json, params) => {
4479
4500
  json.enum = vals;
4480
4501
  }
4481
4502
  };
4503
+ const nanProcessor = (schema, ctx, json, params) => {
4504
+ handleUnrepresentable(schema, ctx, json, params, "NaN cannot be represented in JSON Schema");
4505
+ };
4506
+ const templateLiteralProcessor = (schema, _ctx, json, _params) => {
4507
+ const _json = json;
4508
+ const pattern = schema._zod.pattern;
4509
+ if (!pattern) throw new Error("Pattern not found in template literal");
4510
+ _json.type = "string";
4511
+ _json.pattern = pattern.source;
4512
+ };
4513
+ const fileProcessor = (schema, _ctx, json, _params) => {
4514
+ const _json = json;
4515
+ _json.type = "string";
4516
+ _json.format = "binary";
4517
+ _json.contentEncoding = "binary";
4518
+ const { minimum, maximum, mime } = aggregateChecks(schema);
4519
+ if (minimum !== void 0) _json.minLength = minimum;
4520
+ if (maximum !== void 0) _json.maxLength = maximum;
4521
+ if (!mime) return;
4522
+ if (mime.length === 0) _json.not = {};
4523
+ else if (mime.length === 1) _json.contentMediaType = mime[0];
4524
+ else _json.anyOf = mime.map((m) => ({ contentMediaType: m }));
4525
+ };
4526
+ const successProcessor = (_schema, _ctx, json, _params) => {
4527
+ json.type = "boolean";
4528
+ };
4482
4529
  const customProcessor = (schema, ctx, json, params) => {
4483
4530
  handleUnrepresentable(schema, ctx, json, params, "Custom types cannot be represented in JSON Schema");
4484
4531
  };
4532
+ const functionProcessor = (schema, ctx, json, params) => {
4533
+ handleUnrepresentable(schema, ctx, json, params, "Function types cannot be represented in JSON Schema");
4534
+ };
4485
4535
  const transformProcessor = (schema, ctx, json, params) => {
4486
4536
  handleUnrepresentable(schema, ctx, json, params, "Transforms cannot be represented in JSON Schema");
4487
4537
  };
4538
+ const mapProcessor = (schema, ctx, json, params) => {
4539
+ handleUnrepresentable(schema, ctx, json, params, "Map cannot be represented in JSON Schema");
4540
+ };
4541
+ const setProcessor = (schema, ctx, json, params) => {
4542
+ handleUnrepresentable(schema, ctx, json, params, "Set cannot be represented in JSON Schema");
4543
+ };
4488
4544
  const arrayProcessor = (schema, ctx, _json, params) => {
4489
4545
  const json = _json;
4490
4546
  const def = schema._zod.def;
@@ -4507,8 +4563,7 @@ const objectProcessor = (schema, ctx, _json, params) => {
4507
4563
  const json = _json;
4508
4564
  const def = schema._zod.def;
4509
4565
  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;
4566
+ if (Object.getOwnPropertySymbols(shape).length && handleUnrepresentable(schema, ctx, json, params, "Symbol keys cannot be represented in JSON Schema")) return;
4512
4567
  json.type = "object";
4513
4568
  json.properties = {};
4514
4569
  for (const key in shape) assignProp(json.properties, key, processSchema(shape[key], ctx, {
@@ -4570,6 +4625,58 @@ const intersectionProcessor = (schema, ctx, json, params) => {
4570
4625
  json.allOf = allOf;
4571
4626
  ctx.intersections.push(allOf);
4572
4627
  };
4628
+ const tupleProcessor = (schema, ctx, _json, params) => {
4629
+ const json = _json;
4630
+ const def = schema._zod.def;
4631
+ json.type = "array";
4632
+ const prefixPath = ctx.target === "draft-2020-12" ? "prefixItems" : "items";
4633
+ const restPath = ctx.target === "draft-2020-12" ? "items" : ctx.target === "openapi-3.0" ? "items" : "additionalItems";
4634
+ const prefixItems = def.items.map((x, i) => processSchema(x, ctx, {
4635
+ ...params,
4636
+ path: [
4637
+ ...params.path,
4638
+ prefixPath,
4639
+ i
4640
+ ]
4641
+ }));
4642
+ const rest = def.rest ? processSchema(def.rest, ctx, {
4643
+ ...params,
4644
+ path: [
4645
+ ...params.path,
4646
+ restPath,
4647
+ ...ctx.target === "openapi-3.0" ? [def.items.length] : []
4648
+ ]
4649
+ }) : null;
4650
+ let minItems = def.items.length;
4651
+ while (minItems > 0) {
4652
+ const item = def.items[minItems - 1];
4653
+ if (!(ctx.io === "input" ? inputOptin(item) !== void 0 : item._zod.optout === "optional")) break;
4654
+ minItems--;
4655
+ }
4656
+ const maxItems = def.items.length;
4657
+ const isClosed = !def.rest;
4658
+ if (ctx.target === "draft-2020-12") {
4659
+ json.prefixItems = prefixItems;
4660
+ if (isClosed) json.items = false;
4661
+ else if (rest) json.items = rest;
4662
+ if (minItems > 0) json.minItems = minItems;
4663
+ if (isClosed) json.maxItems = maxItems;
4664
+ } else if (ctx.target === "openapi-3.0") {
4665
+ json.items = { anyOf: prefixItems };
4666
+ if (rest) json.items.anyOf.push(rest);
4667
+ if (minItems > 0) json.minItems = minItems;
4668
+ if (isClosed) json.maxItems = maxItems;
4669
+ } else {
4670
+ json.items = prefixItems;
4671
+ if (isClosed) json.additionalItems = false;
4672
+ else if (rest) json.additionalItems = rest;
4673
+ if (minItems > 0) json.minItems = minItems;
4674
+ if (isClosed) json.maxItems = maxItems;
4675
+ }
4676
+ const { minimum, maximum } = aggregateChecks(schema);
4677
+ if (typeof minimum === "number") json.minItems = minimum;
4678
+ if (typeof maximum === "number") json.maxItems = maximum;
4679
+ };
4573
4680
  /** JSON object keys are always strings, so a numeric record key schema is re-expressed over the
4574
4681
  * numeric-string form the record parser matches. Deferred to `finalize`, after the flatten: a key
4575
4682
  * behind a wrapper only carries its own `type` before then, and a union key only has its branches.
@@ -4601,7 +4708,7 @@ function stringifyKeyNames(bySchema, json, visited) {
4601
4708
  const numericType = !types.includes("string") && types.some((t) => t === "number" || t === "integer");
4602
4709
  const values = json.enum ?? (json.const !== void 0 ? [json.const] : void 0);
4603
4710
  if (!numericType && !values?.some((v) => typeof v === "number")) return json;
4604
- const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id,...rest } = json;
4711
+ const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id, ...rest } = json;
4605
4712
  if (rest.enum) rest.enum = rest.enum.map((v) => typeof v === "number" ? String(v) : v);
4606
4713
  else if (typeof rest.const === "number") rest.const = String(rest.const);
4607
4714
  if (!numericType) return rest;
@@ -4615,8 +4722,8 @@ function rewriteKeyNames(ctx) {
4615
4722
  const bySchema = /* @__PURE__ */ new Map();
4616
4723
  for (const entry of ctx.seen.values()) if (entry.def && !bySchema.has(entry.schema)) bySchema.set(entry.schema, entry);
4617
4724
  const rewrites = /* @__PURE__ */ new Map();
4618
- for (const record$1 of pendingRecords.get(ctx) ?? []) {
4619
- const seen = ctx.seen.get(record$1);
4725
+ for (const record of pendingRecords.get(ctx) ?? []) {
4726
+ const seen = ctx.seen.get(record);
4620
4727
  const names = (seen?.def ?? seen?.schema)?.propertyNames;
4621
4728
  if (!names || names === true || rewrites.has(names)) continue;
4622
4729
  const rewritten = stringifyKeyNames(bySchema, names, /* @__PURE__ */ new Set());
@@ -4747,13 +4854,99 @@ const readonlyProcessor = (schema, ctx, json, params) => {
4747
4854
  seen.ref = def.innerType;
4748
4855
  json.readOnly = true;
4749
4856
  };
4857
+ const promiseProcessor = (schema, ctx, _json, params) => {
4858
+ const def = schema._zod.def;
4859
+ processSchema(def.innerType, ctx, params);
4860
+ const seen = ctx.seen.get(schema);
4861
+ seen.ref = def.innerType;
4862
+ };
4750
4863
  const optionalProcessor = (schema, ctx, _json, params) => {
4751
4864
  const def = schema._zod.def;
4752
4865
  processSchema(def.innerType, ctx, params);
4753
4866
  const seen = ctx.seen.get(schema);
4754
4867
  seen.ref = def.innerType;
4755
4868
  };
4756
-
4869
+ const lazyProcessor = (schema, ctx, _json, params) => {
4870
+ const innerType = schema._zod.innerType;
4871
+ processSchema(innerType, ctx, params);
4872
+ const seen = ctx.seen.get(schema);
4873
+ seen.ref = innerType;
4874
+ };
4875
+ const allProcessors = {
4876
+ string: stringProcessor,
4877
+ number: numberProcessor,
4878
+ boolean: booleanProcessor,
4879
+ bigint: bigintProcessor,
4880
+ symbol: symbolProcessor,
4881
+ null: nullProcessor,
4882
+ undefined: undefinedProcessor,
4883
+ void: voidProcessor,
4884
+ never: neverProcessor,
4885
+ any: anyProcessor,
4886
+ unknown: unknownProcessor,
4887
+ date: dateProcessor,
4888
+ enum: enumProcessor,
4889
+ literal: literalProcessor,
4890
+ nan: nanProcessor,
4891
+ template_literal: templateLiteralProcessor,
4892
+ file: fileProcessor,
4893
+ success: successProcessor,
4894
+ custom: customProcessor,
4895
+ function: functionProcessor,
4896
+ transform: transformProcessor,
4897
+ map: mapProcessor,
4898
+ set: setProcessor,
4899
+ array: arrayProcessor,
4900
+ object: objectProcessor,
4901
+ union: unionProcessor,
4902
+ intersection: intersectionProcessor,
4903
+ tuple: tupleProcessor,
4904
+ record: recordProcessor,
4905
+ nullable: nullableProcessor,
4906
+ nonoptional: nonoptionalProcessor,
4907
+ default: defaultProcessor,
4908
+ prefault: prefaultProcessor,
4909
+ catch: catchProcessor,
4910
+ pipe: pipeProcessor,
4911
+ readonly: readonlyProcessor,
4912
+ promise: promiseProcessor,
4913
+ optional: optionalProcessor,
4914
+ lazy: lazyProcessor
4915
+ };
4916
+ function toJSONSchema(input, params) {
4917
+ if ("_idmap" in input) {
4918
+ const registry = input;
4919
+ const ctx = initializeContext({
4920
+ ...params,
4921
+ processors: allProcessors
4922
+ });
4923
+ const defs = {};
4924
+ for (const entry of registry._idmap.entries()) {
4925
+ const [_, schema] = entry;
4926
+ processSchema(schema, ctx);
4927
+ }
4928
+ const schemas = {};
4929
+ ctx.external = {
4930
+ registry,
4931
+ uri: params?.uri,
4932
+ defs
4933
+ };
4934
+ for (const entry of registry._idmap.entries()) {
4935
+ const [key, schema] = entry;
4936
+ extractDefs(ctx, schema);
4937
+ assignProp(schemas, key, finalize(ctx, schema));
4938
+ }
4939
+ if (Object.keys(defs).length > 0) schemas.__shared = { [ctx.target === "draft-2020-12" ? "$defs" : "definitions"]: defs };
4940
+ return { schemas };
4941
+ }
4942
+ const ctx = initializeContext({
4943
+ ...params,
4944
+ processors: allProcessors
4945
+ });
4946
+ processSchema(input, ctx);
4947
+ extractDefs(ctx, input);
4948
+ return finalize(ctx, input);
4949
+ }
4757
4950
  //#endregion
4758
4951
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/errors.js
4759
4952
  const _installedErrorProtos = /* @__PURE__ */ new WeakSet([Object.prototype, Error.prototype]);
@@ -4787,12 +4980,12 @@ const initializer = (inst, issues) => {
4787
4980
  _installedErrorProtos.add(proto);
4788
4981
  _lazyMethod(proto, "format", (self) => (mapper) => formatError(self, mapper));
4789
4982
  _lazyMethod(proto, "flatten", (self) => (mapper) => flattenError(self, mapper));
4790
- _lazyMethod(proto, "addIssue", (self) => (issue$1) => {
4791
- self.issues.push(issue$1);
4983
+ _lazyMethod(proto, "addIssue", (self) => (issue) => {
4984
+ self.issues.push(issue);
4792
4985
  self.message = JSON.stringify(self.issues, jsonStringifyReplacer, 2);
4793
4986
  });
4794
- _lazyMethod(proto, "addIssues", (self) => (issues$1) => {
4795
- self.issues.push(...issues$1);
4987
+ _lazyMethod(proto, "addIssues", (self) => (issues) => {
4988
+ self.issues.push(...issues);
4796
4989
  self.message = JSON.stringify(self.issues, jsonStringifyReplacer, 2);
4797
4990
  });
4798
4991
  Object.defineProperty(proto, "isEmpty", {
@@ -4803,8 +4996,7 @@ const initializer = (inst, issues) => {
4803
4996
  }
4804
4997
  });
4805
4998
  };
4806
- const ZodRealError = /* @__PURE__ */ $constructor("ZodError", initializer, void 0, { Parent: Error });
4807
-
4999
+ const ZodRealError = /*@__PURE__*/ $constructor("ZodError", initializer, void 0, { Parent: Error });
4808
5000
  //#endregion
4809
5001
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/parse.js
4810
5002
  const parse = /* @__PURE__ */ _parse(ZodRealError);
@@ -4819,7 +5011,6 @@ const safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
4819
5011
  const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
4820
5012
  const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
4821
5013
  const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
4822
-
4823
5014
  //#endregion
4824
5015
  //#region ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/schemas.js
4825
5016
  function _ensureDefaultLocale() {
@@ -4828,7 +5019,7 @@ function _ensureDefaultLocale() {
4828
5019
  function _ensureDefaultMemoizer() {
4829
5020
  if (!globalConfig.memoizer) config({ memoizer: memoizer() });
4830
5021
  }
4831
- const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
5022
+ const ZodType = /*@__PURE__*/ $constructor("ZodType", (inst, def) => {
4832
5023
  _ensureDefaultLocale();
4833
5024
  $ZodType.init(inst, def);
4834
5025
  inst.def = def;
@@ -4852,8 +5043,8 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
4852
5043
  brand() {
4853
5044
  return this;
4854
5045
  },
4855
- register(reg, meta$2) {
4856
- reg.add(this, meta$2);
5046
+ register(reg, meta) {
5047
+ reg.add(this, meta);
4857
5048
  return this;
4858
5049
  },
4859
5050
  refine(check, params) {
@@ -4863,7 +5054,7 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
4863
5054
  return this.check(superRefine(refinement, params));
4864
5055
  },
4865
5056
  overwrite(fn) {
4866
- return this.check(_overwrite(fn));
5057
+ return this.check(/* @__PURE__ */ _overwrite(fn));
4867
5058
  },
4868
5059
  optional() {
4869
5060
  return optional(this);
@@ -4939,11 +5130,11 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
4939
5130
  set "~standard"(value) {
4940
5131
  own(this, "~standard", value);
4941
5132
  },
4942
- parse: function _parse$1(data, params) {
4943
- return parse(this, data, params, { callee: _parse$1 });
5133
+ parse: function _parse(data, params) {
5134
+ return parse(this, data, params, { callee: _parse });
4944
5135
  },
4945
- parseAsync: async function _parseAsync$1(data, params) {
4946
- return await parseAsync(this, data, params, { callee: _parseAsync$1 });
5136
+ parseAsync: async function _parseAsync(data, params) {
5137
+ return await parseAsync(this, data, params, { callee: _parseAsync });
4947
5138
  },
4948
5139
  safeParse(data, params) {
4949
5140
  return safeParse(this, data, params);
@@ -4961,19 +5152,19 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
4961
5152
  return validate(this, data, params);
4962
5153
  },
4963
5154
  validateAsync(data, params) {
4964
- return validateAsync(this, data, params);
5155
+ return validateAsync$1(this, data, params);
4965
5156
  },
4966
- encode: function _encode$1(data, params) {
4967
- return encode(this, data, params, { callee: _encode$1 });
5157
+ encode: function _encode(data, params) {
5158
+ return encode(this, data, params, { callee: _encode });
4968
5159
  },
4969
- decode: function _decode$1(data, params) {
4970
- return decode(this, data, params, { callee: _decode$1 });
5160
+ decode: function _decode(data, params) {
5161
+ return decode(this, data, params, { callee: _decode });
4971
5162
  },
4972
- encodeAsync: async function _encodeAsync$1(data, params) {
4973
- return await encodeAsync(this, data, params, { callee: _encodeAsync$1 });
5163
+ encodeAsync: async function _encodeAsync(data, params) {
5164
+ return await encodeAsync(this, data, params, { callee: _encodeAsync });
4974
5165
  },
4975
- decodeAsync: async function _decodeAsync$1(data, params) {
4976
- return await decodeAsync(this, data, params, { callee: _decodeAsync$1 });
5166
+ decodeAsync: async function _decodeAsync(data, params) {
5167
+ return await decodeAsync(this, data, params, { callee: _decodeAsync });
4977
5168
  },
4978
5169
  safeEncode(data, params) {
4979
5170
  return safeEncode(this, data, params);
@@ -4998,191 +5189,194 @@ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
4998
5189
  }
4999
5190
  });
5000
5191
  /** @internal */
5001
- const _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
5192
+ const _ZodString = /*@__PURE__*/ $constructor("_ZodString", (inst, def) => {
5002
5193
  $ZodString.init(inst, def);
5003
5194
  ZodType.init(inst, def);
5004
5195
  inst._zod.processJSONSchema = (ctx, json, params) => stringProcessor(inst, ctx, json, params);
5005
- }, /* @__PURE__ */ derived({
5196
+ }, /*@__PURE__*/ derived({
5006
5197
  format: (inst) => aggregateChecks(inst).format ?? null,
5007
5198
  minLength: (inst) => aggregateChecks(inst).minimum ?? null,
5008
5199
  maxLength: (inst) => aggregateChecks(inst).maximum ?? null
5009
5200
  }, {
5010
5201
  regex(...args) {
5011
- return this.check(_regex(...args));
5202
+ return this.check(/* @__PURE__ */ _regex(...args));
5012
5203
  },
5013
5204
  includes(...args) {
5014
- return this.check(_includes(...args));
5205
+ return this.check(/* @__PURE__ */ _includes(...args));
5015
5206
  },
5016
5207
  startsWith(...args) {
5017
- return this.check(_startsWith(...args));
5208
+ return this.check(/* @__PURE__ */ _startsWith(...args));
5018
5209
  },
5019
5210
  endsWith(...args) {
5020
- return this.check(_endsWith(...args));
5211
+ return this.check(/* @__PURE__ */ _endsWith(...args));
5021
5212
  },
5022
5213
  min(...args) {
5023
- return this.check(_minLength(...args));
5214
+ return this.check(/* @__PURE__ */ _minLength(...args));
5024
5215
  },
5025
5216
  max(...args) {
5026
- return this.check(_maxLength(...args));
5217
+ return this.check(/* @__PURE__ */ _maxLength(...args));
5027
5218
  },
5028
5219
  length(...args) {
5029
- return this.check(_length(...args));
5220
+ return this.check(/* @__PURE__ */ _length(...args));
5030
5221
  },
5031
5222
  nonempty(...args) {
5032
- return this.check(_minLength(1, ...args));
5223
+ return this.check(/* @__PURE__ */ _minLength(1, ...args));
5033
5224
  },
5034
5225
  lowercase(params) {
5035
- return this.check(_lowercase(params));
5226
+ return this.check(/* @__PURE__ */ _lowercase(params));
5036
5227
  },
5037
5228
  uppercase(params) {
5038
- return this.check(_uppercase(params));
5229
+ return this.check(/* @__PURE__ */ _uppercase(params));
5039
5230
  },
5040
5231
  trim() {
5041
- return this.check(_trim());
5232
+ return this.check(/* @__PURE__ */ _trim());
5042
5233
  },
5043
5234
  normalize(...args) {
5044
- return this.check(_normalize(...args));
5235
+ return this.check(/* @__PURE__ */ _normalize(...args));
5045
5236
  },
5046
5237
  toLowerCase() {
5047
- return this.check(_toLowerCase());
5238
+ return this.check(/* @__PURE__ */ _toLowerCase());
5048
5239
  },
5049
5240
  toUpperCase() {
5050
- return this.check(_toUpperCase());
5241
+ return this.check(/* @__PURE__ */ _toUpperCase());
5051
5242
  },
5052
5243
  slugify() {
5053
- return this.check(_slugify());
5244
+ return this.check(/* @__PURE__ */ _slugify());
5054
5245
  }
5055
5246
  }));
5056
- const ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
5247
+ const ZodString = /*@__PURE__*/ $constructor("ZodString", (inst, def) => {
5057
5248
  $ZodString.init(inst, def);
5058
5249
  _ZodString.init(inst, def);
5059
5250
  }, {
5060
5251
  email(params) {
5061
- return this.check(_email(ZodEmail, params));
5252
+ return this.check(/* @__PURE__ */ _email(ZodEmail, params));
5062
5253
  },
5063
5254
  url(params) {
5064
- return this.check(_url(ZodURL, params));
5255
+ return this.check(/* @__PURE__ */ _url(ZodURL, params));
5065
5256
  },
5066
5257
  jwt(params) {
5067
- return this.check(_jwt(ZodJWT, params));
5258
+ return this.check(/* @__PURE__ */ _jwt(ZodJWT, params));
5068
5259
  },
5069
5260
  emoji(params) {
5070
- return this.check(_emoji(ZodEmoji, params));
5261
+ return this.check(/* @__PURE__ */ _emoji(ZodEmoji, params));
5071
5262
  },
5072
5263
  guid(params) {
5073
- return this.check(_guid(ZodGUID, params));
5264
+ return this.check(/* @__PURE__ */ _guid(ZodGUID, params));
5074
5265
  },
5075
5266
  uuid(params) {
5076
- return this.check(_uuid(ZodUUID, params));
5267
+ return this.check(/* @__PURE__ */ _uuid(ZodUUID, params));
5077
5268
  },
5078
5269
  uuidv4(params) {
5079
- return this.check(_uuidv4(ZodUUID, params));
5270
+ return this.check(/* @__PURE__ */ _uuidv4(ZodUUID, params));
5080
5271
  },
5081
5272
  uuidv6(params) {
5082
- return this.check(_uuidv6(ZodUUID, params));
5273
+ return this.check(/* @__PURE__ */ _uuidv6(ZodUUID, params));
5083
5274
  },
5084
5275
  uuidv7(params) {
5085
- return this.check(_uuidv7(ZodUUID, params));
5276
+ return this.check(/* @__PURE__ */ _uuidv7(ZodUUID, params));
5086
5277
  },
5087
5278
  nanoid(params) {
5088
- return this.check(_nanoid(ZodNanoID, params));
5279
+ return this.check(/* @__PURE__ */ _nanoid(ZodNanoID, params));
5089
5280
  },
5090
5281
  cuid(params) {
5091
- return this.check(_cuid(ZodCUID, params));
5282
+ return this.check(/* @__PURE__ */ _cuid(ZodCUID, params));
5092
5283
  },
5093
5284
  cuid2(params) {
5094
- return this.check(_cuid2(ZodCUID2, params));
5285
+ return this.check(/* @__PURE__ */ _cuid2(ZodCUID2, params));
5095
5286
  },
5096
5287
  ulid(params) {
5097
- return this.check(_ulid(ZodULID, params));
5288
+ return this.check(/* @__PURE__ */ _ulid(ZodULID, params));
5098
5289
  },
5099
5290
  base64(params) {
5100
- return this.check(_base64(ZodBase64, params));
5291
+ return this.check(/* @__PURE__ */ _base64(ZodBase64, params));
5101
5292
  },
5102
5293
  base64url(params) {
5103
- return this.check(_base64url(ZodBase64URL, params));
5294
+ return this.check(/* @__PURE__ */ _base64url(ZodBase64URL, params));
5104
5295
  },
5105
5296
  xid(params) {
5106
- return this.check(_xid(ZodXID, params));
5297
+ return this.check(/* @__PURE__ */ _xid(ZodXID, params));
5107
5298
  },
5108
5299
  ksuid(params) {
5109
- return this.check(_ksuid(ZodKSUID, params));
5300
+ return this.check(/* @__PURE__ */ _ksuid(ZodKSUID, params));
5110
5301
  },
5111
5302
  ipv4(params) {
5112
- return this.check(_ipv4(ZodIPv4, params));
5303
+ return this.check(/* @__PURE__ */ _ipv4(ZodIPv4, params));
5113
5304
  },
5114
5305
  ipv6(params) {
5115
- return this.check(_ipv6(ZodIPv6, params));
5306
+ return this.check(/* @__PURE__ */ _ipv6(ZodIPv6, params));
5116
5307
  },
5117
5308
  cidrv4(params) {
5118
- return this.check(_cidrv4(ZodCIDRv4, params));
5309
+ return this.check(/* @__PURE__ */ _cidrv4(ZodCIDRv4, params));
5119
5310
  },
5120
5311
  cidrv6(params) {
5121
- return this.check(_cidrv6(ZodCIDRv6, params));
5312
+ return this.check(/* @__PURE__ */ _cidrv6(ZodCIDRv6, params));
5122
5313
  },
5123
5314
  e164(params) {
5124
- return this.check(_e164(ZodE164, params));
5315
+ return this.check(/* @__PURE__ */ _e164(ZodE164, params));
5125
5316
  },
5126
5317
  datetime(params) {
5127
- return this.check(_isoDateTime(ZodISODateTime, params));
5318
+ return this.check(/* @__PURE__ */ _isoDateTime(ZodISODateTime, params));
5128
5319
  },
5129
5320
  date(params) {
5130
- return this.check(_isoDate(ZodISODate, params));
5321
+ return this.check(/* @__PURE__ */ _isoDate(ZodISODate, params));
5131
5322
  },
5132
5323
  time(params) {
5133
- return this.check(_isoTime(ZodISOTime, params));
5324
+ return this.check(/* @__PURE__ */ _isoTime(ZodISOTime, params));
5134
5325
  },
5135
5326
  duration(params) {
5136
- return this.check(_isoDuration(ZodISODuration, params));
5327
+ return this.check(/* @__PURE__ */ _isoDuration(ZodISODuration, params));
5137
5328
  }
5138
5329
  });
5139
5330
  function string(params) {
5140
- return _string(ZodString, params);
5331
+ return /* @__PURE__ */ _string(ZodString, params);
5141
5332
  }
5142
- const ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => {
5333
+ const ZodStringFormat = /*@__PURE__*/ $constructor("ZodStringFormat", (inst, def) => {
5143
5334
  $ZodStringFormat.init(inst, def);
5144
5335
  _ZodString.init(inst, def);
5145
5336
  });
5146
- const ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
5337
+ const ZodISODateTime = /*@__PURE__*/ $constructor("ZodISODateTime", (inst, def) => {
5147
5338
  $ZodISODateTime.init(inst, def);
5148
5339
  ZodStringFormat.init(inst, def);
5149
5340
  });
5150
- const ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => {
5341
+ const ZodISODate = /*@__PURE__*/ $constructor("ZodISODate", (inst, def) => {
5151
5342
  $ZodISODate.init(inst, def);
5152
5343
  ZodStringFormat.init(inst, def);
5153
5344
  });
5154
- const ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => {
5345
+ const ZodISOTime = /*@__PURE__*/ $constructor("ZodISOTime", (inst, def) => {
5155
5346
  $ZodISOTime.init(inst, def);
5156
5347
  ZodStringFormat.init(inst, def);
5157
5348
  });
5158
- const ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => {
5349
+ const ZodISODuration = /*@__PURE__*/ $constructor("ZodISODuration", (inst, def) => {
5159
5350
  $ZodISODuration.init(inst, def);
5160
5351
  ZodStringFormat.init(inst, def);
5161
5352
  });
5162
- const ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => {
5353
+ const ZodEmail = /*@__PURE__*/ $constructor("ZodEmail", (inst, def) => {
5163
5354
  $ZodEmail.init(inst, def);
5164
5355
  ZodStringFormat.init(inst, def);
5165
5356
  });
5166
- const ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => {
5357
+ function email(params) {
5358
+ return /* @__PURE__ */ _email(ZodEmail, params);
5359
+ }
5360
+ const ZodGUID = /*@__PURE__*/ $constructor("ZodGUID", (inst, def) => {
5167
5361
  $ZodGUID.init(inst, def);
5168
5362
  ZodStringFormat.init(inst, def);
5169
5363
  });
5170
- const ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => {
5364
+ const ZodUUID = /*@__PURE__*/ $constructor("ZodUUID", (inst, def) => {
5171
5365
  $ZodUUID.init(inst, def);
5172
5366
  ZodStringFormat.init(inst, def);
5173
5367
  });
5174
- const ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => {
5368
+ const ZodURL = /*@__PURE__*/ $constructor("ZodURL", (inst, def) => {
5175
5369
  $ZodURL.init(inst, def);
5176
5370
  ZodStringFormat.init(inst, def);
5177
5371
  });
5178
5372
  function url(params) {
5179
- return _url(ZodURL, params);
5373
+ return /* @__PURE__ */ _url(ZodURL, params);
5180
5374
  }
5181
- const ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
5375
+ const ZodEmoji = /*@__PURE__*/ $constructor("ZodEmoji", (inst, def) => {
5182
5376
  $ZodEmoji.init(inst, def);
5183
5377
  ZodStringFormat.init(inst, def);
5184
5378
  });
5185
- const ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
5379
+ const ZodNanoID = /*@__PURE__*/ $constructor("ZodNanoID", (inst, def) => {
5186
5380
  $ZodNanoID.init(inst, def);
5187
5381
  ZodStringFormat.init(inst, def);
5188
5382
  });
@@ -5191,64 +5385,64 @@ const ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
5191
5385
  * (timestamps embedded in the id). Use {@link ZodCUID2} instead.
5192
5386
  * See https://github.com/paralleldrive/cuid.
5193
5387
  */
5194
- const ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => {
5388
+ const ZodCUID = /*@__PURE__*/ $constructor("ZodCUID", (inst, def) => {
5195
5389
  $ZodCUID.init(inst, def);
5196
5390
  ZodStringFormat.init(inst, def);
5197
5391
  });
5198
- const ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => {
5392
+ const ZodCUID2 = /*@__PURE__*/ $constructor("ZodCUID2", (inst, def) => {
5199
5393
  $ZodCUID2.init(inst, def);
5200
5394
  ZodStringFormat.init(inst, def);
5201
5395
  });
5202
- const ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => {
5396
+ const ZodULID = /*@__PURE__*/ $constructor("ZodULID", (inst, def) => {
5203
5397
  $ZodULID.init(inst, def);
5204
5398
  ZodStringFormat.init(inst, def);
5205
5399
  });
5206
- const ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => {
5400
+ const ZodXID = /*@__PURE__*/ $constructor("ZodXID", (inst, def) => {
5207
5401
  $ZodXID.init(inst, def);
5208
5402
  ZodStringFormat.init(inst, def);
5209
5403
  });
5210
- const ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => {
5404
+ const ZodKSUID = /*@__PURE__*/ $constructor("ZodKSUID", (inst, def) => {
5211
5405
  $ZodKSUID.init(inst, def);
5212
5406
  ZodStringFormat.init(inst, def);
5213
5407
  });
5214
- const ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => {
5408
+ const ZodIPv4 = /*@__PURE__*/ $constructor("ZodIPv4", (inst, def) => {
5215
5409
  $ZodIPv4.init(inst, def);
5216
5410
  ZodStringFormat.init(inst, def);
5217
5411
  });
5218
- const ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
5412
+ const ZodIPv6 = /*@__PURE__*/ $constructor("ZodIPv6", (inst, def) => {
5219
5413
  $ZodIPv6.init(inst, def);
5220
5414
  ZodStringFormat.init(inst, def);
5221
5415
  });
5222
- const ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => {
5416
+ const ZodCIDRv4 = /*@__PURE__*/ $constructor("ZodCIDRv4", (inst, def) => {
5223
5417
  $ZodCIDRv4.init(inst, def);
5224
5418
  ZodStringFormat.init(inst, def);
5225
5419
  });
5226
- const ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => {
5420
+ const ZodCIDRv6 = /*@__PURE__*/ $constructor("ZodCIDRv6", (inst, def) => {
5227
5421
  $ZodCIDRv6.init(inst, def);
5228
5422
  ZodStringFormat.init(inst, def);
5229
5423
  });
5230
- const ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => {
5424
+ const ZodBase64 = /*@__PURE__*/ $constructor("ZodBase64", (inst, def) => {
5231
5425
  $ZodBase64.init(inst, def);
5232
5426
  ZodStringFormat.init(inst, def);
5233
5427
  });
5234
- const ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => {
5428
+ const ZodBase64URL = /*@__PURE__*/ $constructor("ZodBase64URL", (inst, def) => {
5235
5429
  $ZodBase64URL.init(inst, def);
5236
5430
  ZodStringFormat.init(inst, def);
5237
5431
  });
5238
- const ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => {
5432
+ const ZodE164 = /*@__PURE__*/ $constructor("ZodE164", (inst, def) => {
5239
5433
  $ZodE164.init(inst, def);
5240
5434
  ZodStringFormat.init(inst, def);
5241
5435
  });
5242
- const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
5436
+ const ZodJWT = /*@__PURE__*/ $constructor("ZodJWT", (inst, def) => {
5243
5437
  $ZodJWT.init(inst, def);
5244
5438
  ZodStringFormat.init(inst, def);
5245
5439
  });
5246
- const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
5440
+ const ZodNumber = /*@__PURE__*/ $constructor("ZodNumber", (inst, def) => {
5247
5441
  $ZodNumber.init(inst, def);
5248
5442
  ZodType.init(inst, def);
5249
5443
  inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
5250
5444
  inst.isFinite = true;
5251
- }, /* @__PURE__ */ derived({
5445
+ }, /*@__PURE__*/ derived({
5252
5446
  minValue: (inst) => {
5253
5447
  const { minimum, exclusiveMinimum } = aggregateChecks(inst);
5254
5448
  return Math.max(minimum ?? Number.NEGATIVE_INFINITY, exclusiveMinimum ?? Number.NEGATIVE_INFINITY);
@@ -5264,22 +5458,22 @@ const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
5264
5458
  format: (inst) => aggregateChecks(inst).format ?? null
5265
5459
  }, {
5266
5460
  gt(value, params) {
5267
- return this.check(_gt(value, params));
5461
+ return this.check(/* @__PURE__ */ _gt(value, params));
5268
5462
  },
5269
5463
  gte(value, params) {
5270
- return this.check(_gte(value, params));
5464
+ return this.check(/* @__PURE__ */ _gte(value, params));
5271
5465
  },
5272
5466
  min(value, params) {
5273
- return this.check(_gte(value, params));
5467
+ return this.check(/* @__PURE__ */ _gte(value, params));
5274
5468
  },
5275
5469
  lt(value, params) {
5276
- return this.check(_lt(value, params));
5470
+ return this.check(/* @__PURE__ */ _lt(value, params));
5277
5471
  },
5278
5472
  lte(value, params) {
5279
- return this.check(_lte(value, params));
5473
+ return this.check(/* @__PURE__ */ _lte(value, params));
5280
5474
  },
5281
5475
  max(value, params) {
5282
- return this.check(_lte(value, params));
5476
+ return this.check(/* @__PURE__ */ _lte(value, params));
5283
5477
  },
5284
5478
  int(params) {
5285
5479
  return this.check(int(params));
@@ -5288,62 +5482,62 @@ const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
5288
5482
  return this.check(int(params));
5289
5483
  },
5290
5484
  positive(params) {
5291
- return this.check(_gt(0, params));
5485
+ return this.check(/* @__PURE__ */ _gt(0, params));
5292
5486
  },
5293
5487
  nonnegative(params) {
5294
- return this.check(_gte(0, params));
5488
+ return this.check(/* @__PURE__ */ _gte(0, params));
5295
5489
  },
5296
5490
  negative(params) {
5297
- return this.check(_lt(0, params));
5491
+ return this.check(/* @__PURE__ */ _lt(0, params));
5298
5492
  },
5299
5493
  nonpositive(params) {
5300
- return this.check(_lte(0, params));
5494
+ return this.check(/* @__PURE__ */ _lte(0, params));
5301
5495
  },
5302
5496
  multipleOf(value, params) {
5303
- return this.check(_multipleOf(value, params));
5497
+ return this.check(/* @__PURE__ */ _multipleOf(value, params));
5304
5498
  },
5305
5499
  step(value, params) {
5306
- return this.check(_multipleOf(value, params));
5500
+ return this.check(/* @__PURE__ */ _multipleOf(value, params));
5307
5501
  },
5308
5502
  finite() {
5309
5503
  return this;
5310
5504
  }
5311
5505
  }));
5312
5506
  function number(params) {
5313
- return _number(ZodNumber, params);
5507
+ return /* @__PURE__ */ _number(ZodNumber, params);
5314
5508
  }
5315
- const ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => {
5509
+ const ZodNumberFormat = /*@__PURE__*/ $constructor("ZodNumberFormat", (inst, def) => {
5316
5510
  $ZodNumberFormat.init(inst, def);
5317
5511
  ZodNumber.init(inst, def);
5318
5512
  });
5319
5513
  function int(params) {
5320
- return _int(ZodNumberFormat, params);
5514
+ return /* @__PURE__ */ _int(ZodNumberFormat, params);
5321
5515
  }
5322
- const ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
5516
+ const ZodBoolean = /*@__PURE__*/ $constructor("ZodBoolean", (inst, def) => {
5323
5517
  $ZodBoolean.init(inst, def);
5324
5518
  ZodType.init(inst, def);
5325
5519
  inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
5326
5520
  });
5327
5521
  function boolean(params) {
5328
- return _boolean(ZodBoolean, params);
5522
+ return /* @__PURE__ */ _boolean(ZodBoolean, params);
5329
5523
  }
5330
- const ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
5524
+ const ZodUnknown = /*@__PURE__*/ $constructor("ZodUnknown", (inst, def) => {
5331
5525
  $ZodUnknown.init(inst, def);
5332
5526
  ZodType.init(inst, def);
5333
- inst._zod.processJSONSchema = (ctx, json, params) => unknownProcessor(inst, ctx, json, params);
5527
+ inst._zod.processJSONSchema = (ctx, json, params) => void 0;
5334
5528
  });
5335
5529
  function unknown() {
5336
- return _unknown(ZodUnknown);
5530
+ return /* @__PURE__ */ _unknown(ZodUnknown);
5337
5531
  }
5338
- const ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
5532
+ const ZodNever = /*@__PURE__*/ $constructor("ZodNever", (inst, def) => {
5339
5533
  $ZodNever.init(inst, def);
5340
5534
  ZodType.init(inst, def);
5341
5535
  inst._zod.processJSONSchema = (ctx, json, params) => neverProcessor(inst, ctx, json, params);
5342
5536
  });
5343
5537
  function never(params) {
5344
- return _never(ZodNever, params);
5538
+ return /* @__PURE__ */ _never(ZodNever, params);
5345
5539
  }
5346
- const ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
5540
+ const ZodArray = /*@__PURE__*/ $constructor("ZodArray", (inst, def) => {
5347
5541
  _ensureDefaultMemoizer();
5348
5542
  $ZodArray.init(inst, def);
5349
5543
  ZodType.init(inst, def);
@@ -5351,25 +5545,25 @@ const ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
5351
5545
  inst.element = def.element;
5352
5546
  }, {
5353
5547
  min(n, params) {
5354
- return this.check(_minLength(n, params));
5548
+ return this.check(/* @__PURE__ */ _minLength(n, params));
5355
5549
  },
5356
5550
  nonempty(params) {
5357
- return this.check(_minLength(1, params));
5551
+ return this.check(/* @__PURE__ */ _minLength(1, params));
5358
5552
  },
5359
5553
  max(n, params) {
5360
- return this.check(_maxLength(n, params));
5554
+ return this.check(/* @__PURE__ */ _maxLength(n, params));
5361
5555
  },
5362
5556
  length(n, params) {
5363
- return this.check(_length(n, params));
5557
+ return this.check(/* @__PURE__ */ _length(n, params));
5364
5558
  },
5365
5559
  unwrap() {
5366
5560
  return this.element;
5367
5561
  }
5368
5562
  });
5369
5563
  function array(element, params) {
5370
- return _array(ZodArray, element, params);
5564
+ return /* @__PURE__ */ _array(ZodArray, element, params);
5371
5565
  }
5372
- const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
5566
+ const ZodObject = /*@__PURE__*/ $constructor("ZodObject", (inst, def) => {
5373
5567
  _ensureDefaultMemoizer();
5374
5568
  $ZodObjectJIT.init(inst, def);
5375
5569
  ZodType.init(inst, def);
@@ -5427,7 +5621,15 @@ function object(shape, params) {
5427
5621
  };
5428
5622
  return new ZodObject(def);
5429
5623
  }
5430
- const ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
5624
+ function looseObject(shape, params) {
5625
+ return new ZodObject({
5626
+ type: "object",
5627
+ shape,
5628
+ catchall: unknown(),
5629
+ ...normalizeParams(params)
5630
+ });
5631
+ }
5632
+ const ZodUnion = /*@__PURE__*/ $constructor("ZodUnion", (inst, def) => {
5431
5633
  $ZodUnion.init(inst, def);
5432
5634
  ZodType.init(inst, def);
5433
5635
  inst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);
@@ -5440,7 +5642,7 @@ function union(options, params) {
5440
5642
  ...normalizeParams(params)
5441
5643
  });
5442
5644
  }
5443
- const ZodDiscriminatedUnion = /* @__PURE__ */ $constructor("ZodDiscriminatedUnion", (inst, def) => {
5645
+ const ZodDiscriminatedUnion = /*@__PURE__*/ $constructor("ZodDiscriminatedUnion", (inst, def) => {
5444
5646
  ZodUnion.init(inst, def);
5445
5647
  $ZodDiscriminatedUnion.init(inst, def);
5446
5648
  });
@@ -5452,7 +5654,7 @@ function discriminatedUnion(discriminator, options, params) {
5452
5654
  ...normalizeParams(params)
5453
5655
  });
5454
5656
  }
5455
- const ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
5657
+ const ZodIntersection = /*@__PURE__*/ $constructor("ZodIntersection", (inst, def) => {
5456
5658
  $ZodIntersection.init(inst, def);
5457
5659
  ZodType.init(inst, def);
5458
5660
  inst._zod.processJSONSchema = (ctx, json, params) => intersectionProcessor(inst, ctx, json, params);
@@ -5464,7 +5666,40 @@ function intersection(left, right) {
5464
5666
  right
5465
5667
  });
5466
5668
  }
5467
- const ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
5669
+ const ZodTuple = /*@__PURE__*/ $constructor("ZodTuple", (inst, def) => {
5670
+ _ensureDefaultMemoizer();
5671
+ $ZodTuple.init(inst, def);
5672
+ ZodType.init(inst, def);
5673
+ inst._zod.processJSONSchema = (ctx, json, params) => tupleProcessor(inst, ctx, json, params);
5674
+ }, {
5675
+ rest(rest) {
5676
+ return this.clone({
5677
+ ...this._zod.def,
5678
+ rest
5679
+ });
5680
+ },
5681
+ partial() {
5682
+ const def = this._zod.def;
5683
+ if (def.checks?.length) throw new Error(".partial() cannot be used on tuple schemas containing refinements");
5684
+ return this.clone({
5685
+ ...def,
5686
+ items: def.items.map((item) => new ZodOptional({
5687
+ type: "optional",
5688
+ innerType: item
5689
+ }))
5690
+ });
5691
+ }
5692
+ });
5693
+ function tuple(items, _paramsOrRest, _params) {
5694
+ const hasRest = _paramsOrRest instanceof $ZodType;
5695
+ return new ZodTuple({
5696
+ type: "tuple",
5697
+ items,
5698
+ rest: hasRest ? _paramsOrRest : null,
5699
+ ...normalizeParams(hasRest ? _params : _paramsOrRest)
5700
+ });
5701
+ }
5702
+ const ZodRecord = /*@__PURE__*/ $constructor("ZodRecord", (inst, def) => {
5468
5703
  _ensureDefaultMemoizer();
5469
5704
  $ZodRecord.init(inst, def);
5470
5705
  ZodType.init(inst, def);
@@ -5486,7 +5721,7 @@ function record(keyType, valueType, params) {
5486
5721
  ...normalizeParams(params)
5487
5722
  });
5488
5723
  }
5489
- const ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
5724
+ const ZodEnum = /*@__PURE__*/ $constructor("ZodEnum", (inst, def) => {
5490
5725
  $ZodEnum.init(inst, def);
5491
5726
  ZodType.init(inst, def);
5492
5727
  inst._zod.processJSONSchema = (ctx, json, params) => enumProcessor(inst, ctx, json, params);
@@ -5524,7 +5759,7 @@ function _enum(values, params) {
5524
5759
  ...normalizeParams(params)
5525
5760
  });
5526
5761
  }
5527
- const ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
5762
+ const ZodLiteral = /*@__PURE__*/ $constructor("ZodLiteral", (inst, def) => {
5528
5763
  $ZodLiteral.init(inst, def);
5529
5764
  ZodType.init(inst, def);
5530
5765
  inst._zod.processJSONSchema = (ctx, json, params) => literalProcessor(inst, ctx, json, params);
@@ -5541,7 +5776,7 @@ function literal(value, params) {
5541
5776
  ...normalizeParams(params)
5542
5777
  });
5543
5778
  }
5544
- const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
5779
+ const ZodTransform = /*@__PURE__*/ $constructor("ZodTransform", (inst, def) => {
5545
5780
  _ensureDefaultMemoizer();
5546
5781
  $ZodTransform.init(inst, def);
5547
5782
  ZodType.init(inst, def);
@@ -5560,8 +5795,8 @@ const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) =>
5560
5795
  }
5561
5796
  };
5562
5797
  const output = def.transform(payload.value, payload);
5563
- if (output instanceof Promise) return output.then((output$1) => {
5564
- payload.value = output$1;
5798
+ if (output instanceof Promise) return output.then((output) => {
5799
+ payload.value = output;
5565
5800
  return payload;
5566
5801
  });
5567
5802
  payload.value = output;
@@ -5574,7 +5809,7 @@ function transform(fn) {
5574
5809
  transform: fn
5575
5810
  });
5576
5811
  }
5577
- const ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
5812
+ const ZodOptional = /*@__PURE__*/ $constructor("ZodOptional", (inst, def) => {
5578
5813
  $ZodOptional.init(inst, def);
5579
5814
  ZodType.init(inst, def);
5580
5815
  inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
@@ -5586,7 +5821,7 @@ function optional(innerType) {
5586
5821
  innerType
5587
5822
  });
5588
5823
  }
5589
- const ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => {
5824
+ const ZodExactOptional = /*@__PURE__*/ $constructor("ZodExactOptional", (inst, def) => {
5590
5825
  $ZodExactOptional.init(inst, def);
5591
5826
  ZodType.init(inst, def);
5592
5827
  inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
@@ -5598,7 +5833,7 @@ function exactOptional(innerType) {
5598
5833
  innerType
5599
5834
  });
5600
5835
  }
5601
- const ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
5836
+ const ZodNullable = /*@__PURE__*/ $constructor("ZodNullable", (inst, def) => {
5602
5837
  $ZodNullable.init(inst, def);
5603
5838
  ZodType.init(inst, def);
5604
5839
  inst._zod.processJSONSchema = (ctx, json, params) => nullableProcessor(inst, ctx, json, params);
@@ -5610,7 +5845,7 @@ function nullable(innerType) {
5610
5845
  innerType
5611
5846
  });
5612
5847
  }
5613
- const ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
5848
+ const ZodDefault = /*@__PURE__*/ $constructor("ZodDefault", (inst, def) => {
5614
5849
  $ZodDefault.init(inst, def);
5615
5850
  ZodType.init(inst, def);
5616
5851
  inst._zod.processJSONSchema = (ctx, json, params) => defaultProcessor(inst, ctx, json, params);
@@ -5626,7 +5861,7 @@ function _default(innerType, defaultValue) {
5626
5861
  }
5627
5862
  });
5628
5863
  }
5629
- const ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
5864
+ const ZodPrefault = /*@__PURE__*/ $constructor("ZodPrefault", (inst, def) => {
5630
5865
  $ZodPrefault.init(inst, def);
5631
5866
  ZodType.init(inst, def);
5632
5867
  inst._zod.processJSONSchema = (ctx, json, params) => prefaultProcessor(inst, ctx, json, params);
@@ -5641,7 +5876,7 @@ function prefault(innerType, defaultValue) {
5641
5876
  }
5642
5877
  });
5643
5878
  }
5644
- const ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
5879
+ const ZodNonOptional = /*@__PURE__*/ $constructor("ZodNonOptional", (inst, def) => {
5645
5880
  $ZodNonOptional.init(inst, def);
5646
5881
  ZodType.init(inst, def);
5647
5882
  inst._zod.processJSONSchema = (ctx, json, params) => nonoptionalProcessor(inst, ctx, json, params);
@@ -5654,7 +5889,7 @@ function nonoptional(innerType, params) {
5654
5889
  ...normalizeParams(params)
5655
5890
  });
5656
5891
  }
5657
- const ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
5892
+ const ZodCatch = /*@__PURE__*/ $constructor("ZodCatch", (inst, def) => {
5658
5893
  $ZodCatch.init(inst, def);
5659
5894
  ZodType.init(inst, def);
5660
5895
  inst._zod.processJSONSchema = (ctx, json, params) => catchProcessor(inst, ctx, json, params);
@@ -5668,7 +5903,7 @@ function _catch(innerType, catchValue) {
5668
5903
  catchValue: typeof catchValue === "function" ? catchValue : constantCatch(catchValue)
5669
5904
  });
5670
5905
  }
5671
- const ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
5906
+ const ZodPipe = /*@__PURE__*/ $constructor("ZodPipe", (inst, def) => {
5672
5907
  $ZodPipe.init(inst, def);
5673
5908
  ZodType.init(inst, def);
5674
5909
  inst._zod.processJSONSchema = (ctx, json, params) => pipeProcessor(inst, ctx, json, params);
@@ -5682,7 +5917,7 @@ function pipe(in_, out) {
5682
5917
  out
5683
5918
  });
5684
5919
  }
5685
- const ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
5920
+ const ZodReadonly = /*@__PURE__*/ $constructor("ZodReadonly", (inst, def) => {
5686
5921
  $ZodReadonly.init(inst, def);
5687
5922
  ZodType.init(inst, def);
5688
5923
  inst._zod.processJSONSchema = (ctx, json, params) => readonlyProcessor(inst, ctx, json, params);
@@ -5694,1152 +5929,33 @@ function readonly(innerType) {
5694
5929
  innerType
5695
5930
  });
5696
5931
  }
5697
- const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
5932
+ const ZodLazy = /*@__PURE__*/ $constructor("ZodLazy", (inst, def) => {
5933
+ $ZodLazy.init(inst, def);
5934
+ ZodType.init(inst, def);
5935
+ inst._zod.processJSONSchema = (ctx, json, params) => lazyProcessor(inst, ctx, json, params);
5936
+ inst.unwrap = () => inst._zod.def.getter();
5937
+ });
5938
+ function lazy(getter) {
5939
+ return new ZodLazy({
5940
+ type: "lazy",
5941
+ getter
5942
+ });
5943
+ }
5944
+ const ZodCustom = /*@__PURE__*/ $constructor("ZodCustom", (inst, def) => {
5698
5945
  $ZodCustom.init(inst, def);
5699
5946
  ZodType.init(inst, def);
5700
5947
  inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
5701
5948
  });
5702
5949
  function custom(fn, _params) {
5703
- return _custom(ZodCustom, fn ?? (() => true), _params);
5950
+ return /* @__PURE__ */ _custom(ZodCustom, fn ?? (() => true), _params);
5704
5951
  }
5705
5952
  function refine(fn, _params = {}) {
5706
- return _refine(ZodCustom, fn, _params);
5953
+ return /* @__PURE__ */ _refine(ZodCustom, fn, _params);
5707
5954
  }
5708
5955
  function superRefine(fn, params) {
5709
- return _superRefine(fn, params);
5956
+ return /* @__PURE__ */ _superRefine(fn, params);
5710
5957
  }
5711
- const describe = describe$1;
5712
- const meta = meta$1;
5713
-
5714
5958
  //#endregion
5715
- //#region src/workspace/stages.ts
5716
- /**
5717
- * What `gkm test` runs as. The CLI's own, so no project stage may take it:
5718
- * its containers are torn down and rebuilt between runs.
5719
- */
5720
- const TEST_STAGE = "test";
5721
- /** A stage becomes part of every physical name, so it has to fit in one. */
5722
- const STAGE_NAME = /^[a-z][a-z0-9-]*$/;
5723
- /** Everything wrong with one stage name, or nothing. */
5724
- function nameProblems(name) {
5725
- const problems = [];
5726
- 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`);
5728
- return problems;
5729
- }
5730
- /** Everything wrong with a list of deployed stages on its own. */
5731
- function deployedProblems(deployed) {
5732
- const problems = deployed.flatMap(nameProblems);
5733
- const seen = /* @__PURE__ */ new Set();
5734
- for (const name of deployed) {
5735
- if (seen.has(name)) problems.push(`stage "${name}" is listed twice`);
5736
- seen.add(name);
5737
- }
5738
- return problems;
5739
- }
5740
- /** Everything wrong with a stages block, or nothing. */
5741
- function stageProblems(stages) {
5742
- if (!stages) return ["`stages` is required, e.g. stages: { local: 'dev', deployed: ['prod'] }"];
5743
- const { local, deployed, protected: kept = [] } = stages;
5744
- const problems = [...nameProblems(local), ...deployedProblems(deployed)];
5745
- if (deployed.includes(local)) problems.push(`"${local}" is both the local stage and a deployed one; they would share secrets`);
5746
- for (const name of kept) if (!deployed.includes(name)) problems.push(`protected stage "${name}" is not a deployed stage`);
5747
- return problems;
5748
- }
5749
- /** The stages block, or an error naming everything wrong with it. */
5750
- function validateStages(stages) {
5751
- const problems = stageProblems(stages);
5752
- if (problems.length) throw new Error(`Invalid stages in gkm.config.ts:\n ${problems.join("\n ")}`);
5753
- return stages;
5754
- }
5755
- /** Refuses a stage the project does not deploy to. */
5756
- function assertDeployedStage(stages, stage) {
5757
- if (!stages.deployed.includes(stage)) throw new Error(`"${stage}" is not a deployed stage. gkm.config.ts deploys to: ${stages.deployed.join(", ") || "nothing yet"}.`);
5758
- }
5959
+ export { url as _, discriminatedUnion as a, literal as c, object as d, record as f, unknown as g, union as h, custom as i, looseObject as l, tuple as m, array as n, email as o, string as p, boolean as r, lazy as s, _enum as t, number as u, toJSONSchema as v };
5759
5960
 
5760
- //#endregion
5761
- //#region src/workspace/schema.ts
5762
- /**
5763
- * Routes can be a string glob, array of globs, or a partitioned config
5764
- * with glob paths and a partition function.
5765
- */
5766
- const RoutesSchema = union([
5767
- string(),
5768
- array(string()),
5769
- object({
5770
- paths: union([string(), array(string())]),
5771
- partition: custom((val) => typeof val === "function")
5772
- })
5773
- ]);
5774
- /**
5775
- * Telescope configuration schema.
5776
- */
5777
- const TelescopeConfigSchema = object({
5778
- enabled: boolean().optional(),
5779
- port: number().optional(),
5780
- path: string().optional(),
5781
- ignore: array(string()).optional(),
5782
- recordBody: boolean().optional(),
5783
- maxEntries: number().optional(),
5784
- websocket: boolean().optional()
5785
- });
5786
- /**
5787
- * Studio configuration schema.
5788
- */
5789
- const StudioConfigSchema = object({
5790
- enabled: boolean().optional(),
5791
- path: string().optional(),
5792
- schema: string().optional()
5793
- });
5794
- /**
5795
- * OpenAPI configuration schema.
5796
- */
5797
- const OpenApiConfigSchema = object({
5798
- enabled: boolean().optional(),
5799
- title: string().optional(),
5800
- version: string().optional(),
5801
- description: string().optional()
5802
- });
5803
- /**
5804
- * Hooks configuration schema.
5805
- */
5806
- const HooksConfigSchema = object({ server: string().optional() });
5807
- /**
5808
- * Backend framework schema for non-gkm apps.
5809
- */
5810
- const BackendFrameworkSchema = _enum([
5811
- "hono",
5812
- "better-auth",
5813
- "express",
5814
- "fastify"
5815
- ]);
5816
- /**
5817
- * Frontend framework schema.
5818
- */
5819
- const FrontendFrameworkSchema = _enum([
5820
- "nextjs",
5821
- "remix",
5822
- "vite",
5823
- "tanstack-start"
5824
- ]);
5825
- /**
5826
- * Mobile framework schema.
5827
- */
5828
- const MobileFrameworkSchema = _enum(["expo"]);
5829
- /**
5830
- * Combined framework schema (backend, frontend, or mobile).
5831
- */
5832
- const FrameworkSchema = union([
5833
- BackendFrameworkSchema,
5834
- FrontendFrameworkSchema,
5835
- MobileFrameworkSchema
5836
- ]);
5837
- /** Frontend framework values, kept in sync with FrontendFrameworkSchema. */
5838
- const FRONTEND_FRAMEWORKS = [
5839
- "nextjs",
5840
- "remix",
5841
- "vite",
5842
- "tanstack-start"
5843
- ];
5844
- /** Mobile framework values, kept in sync with MobileFrameworkSchema. */
5845
- const MOBILE_FRAMEWORKS = ["expo"];
5846
- /**
5847
- * Deploy target schema.
5848
- * Currently only 'dokploy' is supported.
5849
- * 'vercel' and 'cloudflare' are planned for Phase 2.
5850
- */
5851
- const DeployTargetSchema = _enum([
5852
- "dokploy",
5853
- "vercel",
5854
- "cloudflare"
5855
- ]);
5856
- /**
5857
- * Supported deploy targets (Phase 1).
5858
- */
5859
- const SUPPORTED_DEPLOY_TARGETS = ["dokploy"];
5860
- /**
5861
- * Phase 2 deploy targets (not yet implemented).
5862
- */
5863
- const PHASE_2_DEPLOY_TARGETS = ["vercel", "cloudflare"];
5864
- /**
5865
- * Check if a deploy target is supported.
5866
- */
5867
- function isDeployTargetSupported(target) {
5868
- return SUPPORTED_DEPLOY_TARGETS.includes(target);
5869
- }
5870
- /**
5871
- * Check if a deploy target is planned for Phase 2.
5872
- */
5873
- function isPhase2DeployTarget(target) {
5874
- return PHASE_2_DEPLOY_TARGETS.includes(target);
5875
- }
5876
- /**
5877
- * Get error message for unsupported deploy targets.
5878
- */
5879
- function getDeployTargetError(target, appName) {
5880
- if (isPhase2DeployTarget(target)) {
5881
- const context = appName ? ` for app "${appName}"` : "";
5882
- return `Deploy target "${target}"${context} is coming in Phase 2. Currently only "dokploy" is supported.`;
5883
- }
5884
- return `Unknown deploy target: ${target}. Supported: dokploy. Coming in Phase 2: vercel, cloudflare.`;
5885
- }
5886
- /**
5887
- * Service image configuration schema.
5888
- */
5889
- const ServiceImageConfigSchema = object({
5890
- version: string().optional(),
5891
- image: string().optional()
5892
- });
5893
- /**
5894
- * Mail service configuration schema.
5895
- */
5896
- const MailServiceConfigSchema = ServiceImageConfigSchema.extend({ smtp: object({
5897
- host: string(),
5898
- port: number(),
5899
- user: string().optional(),
5900
- pass: string().optional()
5901
- }).optional() });
5902
- /**
5903
- * Services configuration schema.
5904
- */
5905
- const ServicesConfigSchema = object({
5906
- db: union([boolean(), ServiceImageConfigSchema]).optional(),
5907
- cache: union([
5908
- boolean(),
5909
- ServiceImageConfigSchema,
5910
- _enum([
5911
- "upstash",
5912
- "elasticache",
5913
- "db"
5914
- ])
5915
- ]).optional(),
5916
- mail: union([
5917
- boolean(),
5918
- MailServiceConfigSchema,
5919
- _enum([
5920
- "resend",
5921
- "ses",
5922
- "smtp"
5923
- ])
5924
- ]).optional(),
5925
- storage: union([
5926
- boolean(),
5927
- ServiceImageConfigSchema,
5928
- _enum([
5929
- "minio",
5930
- "s3",
5931
- "r2"
5932
- ])
5933
- ]).optional(),
5934
- events: _enum([
5935
- "pgboss",
5936
- "sns",
5937
- "rabbitmq"
5938
- ]).optional(),
5939
- trustLocalCa: boolean().optional()
5940
- });
5941
- /**
5942
- * Dokploy workspace configuration schema.
5943
- * Supports either a single endpoint or per-stage endpoints.
5944
- */
5945
- const DokployWorkspaceConfigSchema = object({
5946
- endpoint: url("Dokploy endpoint must be a valid URL").optional(),
5947
- endpoints: record(string(), url("Endpoint must be a valid URL")).optional(),
5948
- registry: string().optional(),
5949
- registryId: string().optional(),
5950
- domains: record(string(), string()).optional()
5951
- }).refine((data) => data.endpoint || data.endpoints, { message: "Either endpoint or endpoints must be provided" });
5952
- /**
5953
- * Valid AWS regions.
5954
- */
5955
- const AwsRegionSchema = _enum([
5956
- "us-east-1",
5957
- "us-east-2",
5958
- "us-west-1",
5959
- "us-west-2",
5960
- "af-south-1",
5961
- "ap-east-1",
5962
- "ap-south-1",
5963
- "ap-south-2",
5964
- "ap-southeast-1",
5965
- "ap-southeast-2",
5966
- "ap-southeast-3",
5967
- "ap-southeast-4",
5968
- "ap-northeast-1",
5969
- "ap-northeast-2",
5970
- "ap-northeast-3",
5971
- "ca-central-1",
5972
- "eu-central-1",
5973
- "eu-central-2",
5974
- "eu-west-1",
5975
- "eu-west-2",
5976
- "eu-west-3",
5977
- "eu-south-1",
5978
- "eu-south-2",
5979
- "eu-north-1",
5980
- "me-south-1",
5981
- "me-central-1",
5982
- "sa-east-1"
5983
- ]);
5984
- /**
5985
- * DNS record types supported across providers.
5986
- */
5987
- const DnsRecordTypeSchema = _enum([
5988
- "A",
5989
- "AAAA",
5990
- "CNAME",
5991
- "MX",
5992
- "TXT",
5993
- "NS",
5994
- "SRV",
5995
- "CAA"
5996
- ]);
5997
- /**
5998
- * A DNS record as returned by the provider.
5999
- */
6000
- const DnsRecordSchema = object({
6001
- name: string(),
6002
- type: DnsRecordTypeSchema,
6003
- ttl: number().int().positive(),
6004
- values: array(string())
6005
- });
6006
- /**
6007
- * A DNS record to create or update.
6008
- */
6009
- const UpsertDnsRecordSchema = object({
6010
- name: string(),
6011
- type: DnsRecordTypeSchema,
6012
- ttl: number().int().positive(),
6013
- value: string()
6014
- });
6015
- /**
6016
- * Result of an upsert operation.
6017
- */
6018
- const UpsertResultSchema = object({
6019
- record: UpsertDnsRecordSchema,
6020
- created: boolean(),
6021
- unchanged: boolean()
6022
- });
6023
- /**
6024
- * Hostinger DNS provider config (without domain - domain is the record key).
6025
- */
6026
- const HostingerDnsProviderSchema = object({
6027
- provider: literal("hostinger"),
6028
- ttl: number().int().positive().optional()
6029
- });
6030
- /**
6031
- * Route53 DNS provider config (without domain - domain is the record key).
6032
- */
6033
- const Route53DnsProviderSchema = object({
6034
- provider: literal("route53"),
6035
- region: AwsRegionSchema.optional(),
6036
- profile: string().optional(),
6037
- hostedZoneId: string().optional(),
6038
- ttl: number().int().positive().optional()
6039
- });
6040
- /**
6041
- * Cloudflare DNS provider config (placeholder for future).
6042
- */
6043
- const CloudflareDnsProviderSchema = object({
6044
- provider: literal("cloudflare"),
6045
- ttl: number().int().positive().optional()
6046
- });
6047
- /**
6048
- * Manual DNS configuration (user handles DNS themselves).
6049
- */
6050
- const ManualDnsProviderSchema = object({ provider: literal("manual") });
6051
- /**
6052
- * Custom DNS provider config (user-provided implementation).
6053
- */
6054
- const CustomDnsProviderSchema = object({
6055
- 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" }),
6056
- ttl: number().int().positive().optional()
6057
- });
6058
- /**
6059
- * Built-in DNS provider config (discriminated union).
6060
- */
6061
- const BuiltInDnsProviderSchema = discriminatedUnion("provider", [
6062
- HostingerDnsProviderSchema,
6063
- Route53DnsProviderSchema,
6064
- CloudflareDnsProviderSchema,
6065
- ManualDnsProviderSchema
6066
- ]);
6067
- /**
6068
- * Single DNS provider config (for one domain).
6069
- */
6070
- const DnsProviderSchema = union([BuiltInDnsProviderSchema, CustomDnsProviderSchema]);
6071
- /**
6072
- * DNS configuration schema.
6073
- *
6074
- * Maps root domains to their DNS provider configuration.
6075
- * Example:
6076
- * ```
6077
- * dns: {
6078
- * 'geekmidas.dev': { provider: 'hostinger' },
6079
- * 'geekmidas.com': { provider: 'route53' },
6080
- * }
6081
- * ```
6082
- *
6083
- * Supported providers:
6084
- * - 'hostinger': Use Hostinger DNS API
6085
- * - 'route53': Use AWS Route53
6086
- * - 'cloudflare': Use Cloudflare DNS API (future)
6087
- * - 'manual': Don't create records, just print required records
6088
- * - Custom: Provide a DnsProvider implementation
6089
- */
6090
- const DnsConfigSchema = record(string(), DnsProviderSchema);
6091
- const HostingerDnsConfigSchema = HostingerDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
6092
- const Route53DnsConfigSchema = Route53DnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
6093
- const CloudflareDnsConfigSchema = CloudflareDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
6094
- const ManualDnsConfigSchema = ManualDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
6095
- const CustomDnsConfigSchema = CustomDnsProviderSchema.extend({ domain: string().min(1, "Domain is required") });
6096
- const BuiltInDnsConfigSchema = discriminatedUnion("provider", [
6097
- HostingerDnsConfigSchema,
6098
- Route53DnsConfigSchema,
6099
- CloudflareDnsConfigSchema,
6100
- ManualDnsConfigSchema
6101
- ]);
6102
- const LegacyDnsConfigSchema = union([BuiltInDnsConfigSchema, CustomDnsConfigSchema]);
6103
- /**
6104
- * Combined DNS config that supports both new multi-domain and legacy single-domain formats.
6105
- */
6106
- const DnsConfigWithLegacySchema = union([DnsConfigSchema, LegacyDnsConfigSchema]);
6107
- /**
6108
- * Backups configuration schema.
6109
- *
6110
- * Configures automatic backup destinations for database services.
6111
- * On first deploy, creates S3 bucket with unique name and IAM credentials.
6112
- */
6113
- const BackupsConfigSchema = object({
6114
- type: literal("s3"),
6115
- profile: string().optional(),
6116
- region: AwsRegionSchema,
6117
- schedule: string().optional(),
6118
- retention: number().optional()
6119
- });
6120
- /**
6121
- * Deploy configuration schema.
6122
- */
6123
- const DeployConfigSchema = object({
6124
- default: DeployTargetSchema.optional(),
6125
- dokploy: DokployWorkspaceConfigSchema.optional(),
6126
- dns: DnsConfigWithLegacySchema.optional(),
6127
- backups: BackupsConfigSchema.optional()
6128
- });
6129
- /**
6130
- * Models configuration schema.
6131
- */
6132
- const ModelsConfigSchema = object({
6133
- path: string().optional(),
6134
- schema: _enum(["zod"]).optional()
6135
- });
6136
- /**
6137
- * Shared configuration schema.
6138
- */
6139
- const SharedConfigSchema = object({
6140
- packages: array(string()).optional(),
6141
- models: ModelsConfigSchema.optional()
6142
- });
6143
- /**
6144
- * Secrets configuration schema.
6145
- */
6146
- const StagesConfigSchema = object({
6147
- local: string(),
6148
- deployed: array(string()),
6149
- protected: array(string()).optional()
6150
- }).superRefine((stages, ctx) => {
6151
- for (const message of stageProblems(stages)) ctx.addIssue({
6152
- code: "custom",
6153
- message
6154
- });
6155
- });
6156
- const SecretsConfigSchema = object({
6157
- enabled: boolean().optional(),
6158
- algorithm: string().optional(),
6159
- kdf: _enum(["scrypt", "pbkdf2"]).optional()
6160
- });
6161
- /**
6162
- * Local state provider config.
6163
- */
6164
- const LocalStateConfigSchema = object({ provider: literal("local") });
6165
- /**
6166
- * SSM state provider config (requires region).
6167
- */
6168
- const SSMStateConfigSchema = object({
6169
- provider: literal("ssm"),
6170
- region: AwsRegionSchema,
6171
- profile: string().optional()
6172
- });
6173
- /**
6174
- * Custom state provider config (user-provided implementation).
6175
- */
6176
- 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" }) });
6177
- /**
6178
- * Built-in state provider config (discriminated union).
6179
- */
6180
- const BuiltInStateConfigSchema = discriminatedUnion("provider", [LocalStateConfigSchema, SSMStateConfigSchema]);
6181
- /**
6182
- * State configuration schema.
6183
- *
6184
- * Configures how deployment state is stored.
6185
- * - 'local': Store in .gkm/deploy-{stage}.json (default)
6186
- * - 'ssm': Store in AWS SSM Parameter Store (requires region)
6187
- * - Custom: Provide a StateProvider implementation with read/write methods
6188
- */
6189
- const StateConfigSchema = union([BuiltInStateConfigSchema, CustomStateConfigSchema]);
6190
- /**
6191
- * App configuration schema.
6192
- */
6193
- const AppConfigSchema = object({
6194
- type: _enum([
6195
- "backend",
6196
- "web",
6197
- "mobile"
6198
- ]).optional().default("backend"),
6199
- path: string().min(1, "App path is required"),
6200
- port: number().int().positive("Port must be a positive integer"),
6201
- dependencies: array(string()).optional(),
6202
- deploy: DeployTargetSchema.optional(),
6203
- constructs: RoutesSchema.optional(),
6204
- routes: RoutesSchema.optional(),
6205
- functions: RoutesSchema.optional(),
6206
- crons: RoutesSchema.optional(),
6207
- queues: RoutesSchema.optional(),
6208
- topics: RoutesSchema.optional(),
6209
- subscribers: RoutesSchema.optional(),
6210
- envParser: string().optional(),
6211
- logger: string().optional(),
6212
- hooks: HooksConfigSchema.optional(),
6213
- telescope: union([
6214
- string(),
6215
- boolean(),
6216
- TelescopeConfigSchema
6217
- ]).optional(),
6218
- studio: union([
6219
- string(),
6220
- boolean(),
6221
- StudioConfigSchema
6222
- ]).optional(),
6223
- openapi: union([boolean(), OpenApiConfigSchema]).optional(),
6224
- runtime: _enum(["node", "bun"]).optional(),
6225
- env: union([string(), array(string())]).optional(),
6226
- entry: string().optional(),
6227
- framework: FrameworkSchema.optional(),
6228
- config: object({
6229
- client: string().optional(),
6230
- server: string().optional()
6231
- }).optional()
6232
- }).refine((data) => {
6233
- if (data.type === "web") {
6234
- if (!data.framework || !FRONTEND_FRAMEWORKS.includes(data.framework)) return false;
6235
- }
6236
- return true;
6237
- }, {
6238
- message: `Web apps must have a valid web framework (${FRONTEND_FRAMEWORKS.join(", ")})`,
6239
- path: ["framework"]
6240
- }).refine((data) => {
6241
- if (data.type === "mobile") {
6242
- if (!data.framework || !MOBILE_FRAMEWORKS.includes(data.framework)) return false;
6243
- }
6244
- return true;
6245
- }, {
6246
- message: `Mobile apps must have a valid mobile framework (${MOBILE_FRAMEWORKS.join(", ")})`,
6247
- path: ["framework"]
6248
- });
6249
- /**
6250
- * Workspace configuration schema.
6251
- */
6252
- const WorkspaceConfigSchema = object({
6253
- name: string().optional(),
6254
- constructs: RoutesSchema.optional(),
6255
- apps: record(string(), AppConfigSchema).optional(),
6256
- shared: SharedConfigSchema.optional(),
6257
- deploy: DeployConfigSchema.optional(),
6258
- services: ServicesConfigSchema.optional(),
6259
- stages: StagesConfigSchema,
6260
- secrets: SecretsConfigSchema.optional(),
6261
- state: StateConfigSchema.optional()
6262
- }).refine((data) => {
6263
- const appNames = Object.keys(data.apps ?? {});
6264
- for (const [appName, app] of Object.entries(data.apps ?? {})) for (const dep of app.dependencies ?? []) {
6265
- if (!appNames.includes(dep)) return false;
6266
- if (dep === appName) return false;
6267
- }
6268
- return true;
6269
- }, { message: "App dependencies must reference existing apps and cannot be self-referential" }).refine((data) => {
6270
- const appNames = Object.keys(data.apps ?? {});
6271
- const visited = /* @__PURE__ */ new Set();
6272
- const recStack = /* @__PURE__ */ new Set();
6273
- function hasCycle(app) {
6274
- if (recStack.has(app)) return true;
6275
- if (visited.has(app)) return false;
6276
- visited.add(app);
6277
- recStack.add(app);
6278
- const deps = data.apps?.[app]?.dependencies ?? [];
6279
- for (const dep of deps) if (hasCycle(dep)) return true;
6280
- recStack.delete(app);
6281
- return false;
6282
- }
6283
- for (const app of appNames) {
6284
- visited.clear();
6285
- recStack.clear();
6286
- if (hasCycle(app)) return false;
6287
- }
6288
- return true;
6289
- }, { message: "Circular dependencies detected between apps" }).superRefine((data, ctx) => {
6290
- const defaultTarget = data.deploy?.default;
6291
- if (defaultTarget && !isDeployTargetSupported(defaultTarget)) {
6292
- ctx.addIssue({
6293
- code: "custom",
6294
- message: getDeployTargetError(defaultTarget),
6295
- path: ["deploy", "default"]
6296
- });
6297
- return;
6298
- }
6299
- for (const [appName, app] of Object.entries(data.apps ?? {})) if (app.deploy && !isDeployTargetSupported(app.deploy)) {
6300
- ctx.addIssue({
6301
- code: "custom",
6302
- message: getDeployTargetError(app.deploy, appName),
6303
- path: [
6304
- "apps",
6305
- appName,
6306
- "deploy"
6307
- ]
6308
- });
6309
- return;
6310
- }
6311
- if (data.state?.provider === "ssm" && !data.name) ctx.addIssue({
6312
- code: "custom",
6313
- message: "Workspace name is required when using SSM state provider. Add \"name\" to your gkm.config.ts.",
6314
- path: ["name"]
6315
- });
6316
- });
6317
- /**
6318
- * Validate workspace configuration.
6319
- * Throws ZodError with detailed messages on validation failure.
6320
- */
6321
- function validateWorkspaceConfig(config$1) {
6322
- return WorkspaceConfigSchema.parse(config$1);
6323
- }
6324
- /**
6325
- * Safe validation that returns result instead of throwing.
6326
- */
6327
- function safeValidateWorkspaceConfig(config$1) {
6328
- const result = WorkspaceConfigSchema.safeParse(config$1);
6329
- if (result.success) return {
6330
- success: true,
6331
- data: result.data
6332
- };
6333
- return {
6334
- success: false,
6335
- error: result.error
6336
- };
6337
- }
6338
- /**
6339
- * Format Zod errors into user-friendly messages.
6340
- */
6341
- function formatValidationErrors(error$1) {
6342
- const messages = error$1.issues.map((issue$1) => {
6343
- const path = issue$1.path.join(".");
6344
- return path ? ` - ${path}: ${issue$1.message}` : ` - ${issue$1.message}`;
6345
- });
6346
- return `Workspace configuration validation failed:\n${messages.join("\n")}`;
6347
- }
6348
-
6349
- //#endregion
6350
- //#region src/workspace/types.ts
6351
- /**
6352
- * Type guard to check if a config is a WorkspaceConfig.
6353
- *
6354
- * @example
6355
- * ```ts
6356
- * const config = await loadConfig();
6357
- * if (isWorkspaceConfig(config)) {
6358
- * // config.apps is available
6359
- * console.log(Object.keys(config.apps));
6360
- * }
6361
- * ```
6362
- */
6363
- function isWorkspaceConfig(config$1) {
6364
- if (typeof config$1 !== "object" || config$1 === null) return false;
6365
- if ("apps" in config$1 && typeof config$1.apps === "object") return true;
6366
- return "constructs" in config$1 && !("routes" in config$1) && !("envParser" in config$1);
6367
- }
6368
-
6369
- //#endregion
6370
- //#region src/workspace/index.ts
6371
- /**
6372
- * Validate that all dependencies reference existing apps.
6373
- * Returns the config if valid, throws otherwise.
6374
- */
6375
- function validateDependencies(apps) {
6376
- const appNames = new Set(Object.keys(apps));
6377
- for (const [appName, app] of Object.entries(apps)) for (const dep of app.dependencies ?? []) {
6378
- if (!appNames.has(dep)) throw new Error(`Invalid dependency: App "${appName}" depends on "${dep}" which does not exist. Valid apps are: ${[...appNames].join(", ")}`);
6379
- if (dep === appName) throw new Error(`Invalid dependency: App "${appName}" cannot depend on itself.`);
6380
- }
6381
- }
6382
- /**
6383
- * Define workspace configuration with full TypeScript support and type inference.
6384
- *
6385
- * Uses `const` type parameter to infer literal app names, providing:
6386
- * - Autocomplete for app names in dependencies
6387
- * - Type errors for invalid dependency references
6388
- * - Full type inference for the returned config
6389
- *
6390
- * @example
6391
- * ```ts
6392
- * // gkm.config.ts
6393
- * import { defineWorkspace } from '@geekmidas/cli';
6394
- *
6395
- * export default defineWorkspace({
6396
- * name: 'my-saas',
6397
- * apps: {
6398
- * api: {
6399
- * type: 'backend',
6400
- * path: 'apps/api',
6401
- * port: 3000,
6402
- * routes: './src/endpoints/**\/*.ts',
6403
- * envParser: './src/config/env',
6404
- * logger: './src/logger',
6405
- * },
6406
- * web: {
6407
- * type: 'web',
6408
- * framework: 'nextjs',
6409
- * path: 'apps/web',
6410
- * port: 3001,
6411
- * dependencies: ['api'], // <- autocomplete shows 'api' | 'web'
6412
- * },
6413
- * },
6414
- * services: {
6415
- * db: true,
6416
- * cache: true,
6417
- * },
6418
- * });
6419
- *
6420
- * // config.apps.api <- full type inference
6421
- * // config.apps.foo <- TypeScript error
6422
- * ```
6423
- */
6424
- function defineWorkspace(config$1) {
6425
- if (config$1.apps) validateDependencies(config$1.apps);
6426
- const result = safeValidateWorkspaceConfig(config$1);
6427
- if (!result.success && result.error) throw new Error(formatValidationErrors(result.error));
6428
- return config$1;
6429
- }
6430
- /**
6431
- * Get the package name from package.json in the given directory.
6432
- */
6433
- function getPackageName(cwd) {
6434
- try {
6435
- const pkg = require(`${cwd}/package.json`);
6436
- return pkg.name?.replace(/^@[^/]+\//, "");
6437
- } catch {
6438
- return void 0;
6439
- }
6440
- }
6441
- /**
6442
- * Normalize a workspace configuration with resolved defaults.
6443
- */
6444
- function normalizeWorkspace(config$1, cwd) {
6445
- const name = config$1.name ?? getPackageName(cwd) ?? (0, node_path.basename)(cwd);
6446
- const defaultTarget = config$1.deploy?.default ?? "dokploy";
6447
- const normalizedApps = {};
6448
- for (const [appName, app] of Object.entries(config$1.apps ?? {})) normalizedApps[appName] = normalizeAppConfig(app, defaultTarget);
6449
- return {
6450
- name,
6451
- root: cwd,
6452
- ...config$1.constructs ? { constructs: config$1.constructs } : {},
6453
- apps: normalizedApps,
6454
- services: config$1.services ?? {},
6455
- deploy: config$1.deploy ?? { default: "dokploy" },
6456
- shared: config$1.shared ?? { packages: ["packages/*"] },
6457
- stages: validateStages(config$1.stages),
6458
- secrets: config$1.secrets ?? {},
6459
- state: config$1.state
6460
- };
6461
- }
6462
- /**
6463
- * Normalize an app configuration with resolved defaults.
6464
- * @param app - App configuration
6465
- * @param defaultTarget - Default deploy target from workspace config
6466
- */
6467
- function normalizeAppConfig(app, defaultTarget) {
6468
- return {
6469
- ...app,
6470
- type: app.type ?? "backend",
6471
- port: app.port,
6472
- path: app.path,
6473
- dependencies: app.dependencies ?? [],
6474
- resolvedDeployTarget: app.deploy ?? defaultTarget
6475
- };
6476
- }
6477
- /**
6478
- * Wrap a single-app GkmConfig as a workspace.
6479
- * This allows existing single-app configs to work seamlessly.
6480
- */
6481
- function wrapSingleAppAsWorkspace(config$1, cwd) {
6482
- const name = config$1.name ?? getPackageName(cwd) ?? (0, node_path.basename)(cwd);
6483
- const normalizedServices = { ...config$1.services ?? {} };
6484
- const app = {
6485
- type: "backend",
6486
- path: ".",
6487
- port: (typeof config$1.providers?.server === "object" ? config$1.providers.server.port : void 0) ?? 3e3,
6488
- dependencies: [],
6489
- resolvedDeployTarget: config$1.deploy?.default ?? "dokploy",
6490
- constructs: config$1.constructs,
6491
- providers: config$1.providers,
6492
- hooks: config$1.hooks,
6493
- telescope: config$1.telescope,
6494
- studio: config$1.studio,
6495
- openapi: config$1.openapi,
6496
- runtime: config$1.runtime,
6497
- env: config$1.env
6498
- };
6499
- return {
6500
- name,
6501
- root: cwd,
6502
- apps: { api: app },
6503
- services: normalizedServices,
6504
- deploy: {
6505
- default: "dokploy",
6506
- ...config$1.deploy
6507
- },
6508
- shared: { packages: [] },
6509
- stages: validateStages(config$1.stages),
6510
- secrets: {}
6511
- };
6512
- }
6513
- /**
6514
- * Process a loaded configuration (either single-app or workspace).
6515
- * Returns a normalized workspace in both cases.
6516
- */
6517
- function processConfig(config$1, cwd) {
6518
- if (isWorkspaceConfig(config$1)) {
6519
- const result = safeValidateWorkspaceConfig(config$1);
6520
- if (!result.success && result.error) throw new Error(formatValidationErrors(result.error));
6521
- return {
6522
- type: "workspace",
6523
- raw: config$1,
6524
- workspace: normalizeWorkspace(config$1, cwd)
6525
- };
6526
- }
6527
- return {
6528
- type: "single",
6529
- raw: config$1,
6530
- workspace: wrapSingleAppAsWorkspace(config$1, cwd)
6531
- };
6532
- }
6533
- /**
6534
- * The workspace's own constructs globs, absolute.
6535
- *
6536
- * Infrastructure two apps share is a fact about the product, and declaring it
6537
- * inside one of them makes moving that app a change to the other's database.
6538
- */
6539
- function workspaceConstructGlobs(workspace) {
6540
- return constructPatterns(workspace.constructs).map((pattern) => (0, node_path.isAbsolute)(pattern) ? pattern : (0, node_path.join)(workspace.root, pattern));
6541
- }
6542
- /**
6543
- * Every constructs glob an app can see, absolute.
6544
- *
6545
- * The workspace's own first, then the app's. Absolute because the app builds
6546
- * from its own directory while the workspace's constructs live above it —
6547
- * a relative glob resolved from the app would look for the product's
6548
- * infrastructure inside one of its consumers and find nothing.
6549
- *
6550
- * Additive, not overriding: an app that declares its own constructs still sees
6551
- * the ones the workspace declared for everybody.
6552
- */
6553
- function appConstructGlobs(workspace, appName) {
6554
- const globs = workspaceConstructGlobs(workspace);
6555
- const app = workspace.apps[appName];
6556
- if (app) {
6557
- const root = (0, node_path.isAbsolute)(app.path) ? app.path : (0, node_path.join)(workspace.root, app.path);
6558
- for (const pattern of constructPatterns(app.constructs)) globs.push((0, node_path.isAbsolute)(pattern) ? pattern : (0, node_path.join)(root, pattern));
6559
- }
6560
- return globs;
6561
- }
6562
- /**
6563
- * Every constructs glob in the workspace: its own, plus each app's.
6564
- *
6565
- * One list, so what a deploy provisions and what an app's entry point
6566
- * registers drivers for are read off the same globs.
6567
- */
6568
- function allConstructGlobs(workspace) {
6569
- const globs = [...workspaceConstructGlobs(workspace), ...Object.keys(workspace.apps).flatMap((appName) => appConstructGlobs(workspace, appName))];
6570
- return [...new Set(globs)];
6571
- }
6572
- /** A `Routes` in any of its accepted shapes, as a flat list of patterns. */
6573
- function constructPatterns(routes) {
6574
- if (!routes) return [];
6575
- if (typeof routes === "string") return [routes];
6576
- if (Array.isArray(routes)) return routes;
6577
- const paths = routes.paths;
6578
- if (!paths) return [];
6579
- return Array.isArray(paths) ? paths : [paths];
6580
- }
6581
- /**
6582
- * Get the GkmConfig for a specific app in a workspace.
6583
- * Useful for running existing single-app commands on a specific app.
6584
- */
6585
- function getAppGkmConfig(workspace, appName) {
6586
- const app = workspace.apps[appName];
6587
- if (!app || app.type !== "backend") return void 0;
6588
- return {
6589
- services: workspace.services,
6590
- stages: workspace.stages,
6591
- constructs: appConstructGlobs(workspace, appName),
6592
- providers: app.providers,
6593
- hooks: app.hooks,
6594
- telescope: app.telescope,
6595
- studio: app.studio,
6596
- openapi: app.openapi,
6597
- runtime: app.runtime,
6598
- env: app.env
6599
- };
6600
- }
6601
- /**
6602
- * Get topologically sorted app names based on dependencies.
6603
- * Apps with no dependencies come first, then apps that depend on them.
6604
- */
6605
- function getAppBuildOrder(workspace) {
6606
- const appNames = Object.keys(workspace.apps);
6607
- const visited = /* @__PURE__ */ new Set();
6608
- const result = [];
6609
- function visit(name) {
6610
- if (visited.has(name)) return;
6611
- visited.add(name);
6612
- const app = workspace.apps[name];
6613
- if (app) for (const dep of app.dependencies) visit(dep);
6614
- result.push(name);
6615
- }
6616
- for (const name of appNames) visit(name);
6617
- return result;
6618
- }
6619
- /**
6620
- * Generate environment variables for app dependencies.
6621
- *
6622
- * Each dependency gets the un-prefixed `{DEP}_URL` (for server-side use) and,
6623
- * when the consuming app's framework supports a public-var prefix, also the
6624
- * prefixed form (e.g. `NEXT_PUBLIC_{DEP}_URL` for Next.js, `VITE_{DEP}_URL`
6625
- * for Vite/TanStack Start). The prefixed form is what gets bundled into the
6626
- * client at build time.
6627
- */
6628
- function getDependencyEnvVars(workspace, appName, urlPrefix = "http://localhost") {
6629
- const app = workspace.apps[appName];
6630
- if (!app) return {};
6631
- const env = {};
6632
- const publicPrefix = getPublicEnvPrefix(app.framework);
6633
- for (const depName of app.dependencies) {
6634
- const dep = workspace.apps[depName];
6635
- if (dep) {
6636
- const url$1 = `${urlPrefix}:${dep.port}`;
6637
- const envKey = `${depName.toUpperCase()}_URL`;
6638
- env[envKey] = url$1;
6639
- if (publicPrefix) env[`${publicPrefix}${envKey}`] = url$1;
6640
- }
6641
- }
6642
- return env;
6643
- }
6644
- /**
6645
- * Resolve the Dokploy endpoint for a specific stage.
6646
- *
6647
- * Uses per-stage endpoint from `endpoints` if available,
6648
- * otherwise falls back to the global `endpoint`.
6649
- *
6650
- * @param dokployConfig - Dokploy workspace configuration
6651
- * @param stage - Deployment stage (e.g., 'development', 'production')
6652
- * @returns The endpoint URL for the stage, or undefined if not configured
6653
- *
6654
- * @example
6655
- * ```ts
6656
- * // With per-stage endpoints
6657
- * const config = {
6658
- * endpoints: {
6659
- * development: 'https://dev.dokploy.example.com:3000',
6660
- * production: 'https://prod.dokploy.example.com:3000',
6661
- * },
6662
- * };
6663
- * getEndpointForStage(config, 'production'); // => 'https://prod.dokploy.example.com:3000'
6664
- *
6665
- * // With single endpoint
6666
- * const config = { endpoint: 'https://dokploy.example.com:3000' };
6667
- * getEndpointForStage(config, 'production'); // => 'https://dokploy.example.com:3000'
6668
- * ```
6669
- */
6670
- function getEndpointForStage(dokployConfig, stage) {
6671
- if (!dokployConfig) return void 0;
6672
- if (dokployConfig.endpoints?.[stage]) return dokployConfig.endpoints[stage];
6673
- return dokployConfig.endpoint;
6674
- }
6675
-
6676
- //#endregion
6677
- Object.defineProperty(exports, 'PHASE_2_DEPLOY_TARGETS', {
6678
- enumerable: true,
6679
- get: function () {
6680
- return PHASE_2_DEPLOY_TARGETS;
6681
- }
6682
- });
6683
- Object.defineProperty(exports, 'PUBLIC_ENV_PREFIXES', {
6684
- enumerable: true,
6685
- get: function () {
6686
- return PUBLIC_ENV_PREFIXES;
6687
- }
6688
- });
6689
- Object.defineProperty(exports, 'SUPPORTED_DEPLOY_TARGETS', {
6690
- enumerable: true,
6691
- get: function () {
6692
- return SUPPORTED_DEPLOY_TARGETS;
6693
- }
6694
- });
6695
- Object.defineProperty(exports, 'WorkspaceConfigSchema', {
6696
- enumerable: true,
6697
- get: function () {
6698
- return WorkspaceConfigSchema;
6699
- }
6700
- });
6701
- Object.defineProperty(exports, 'allConstructGlobs', {
6702
- enumerable: true,
6703
- get: function () {
6704
- return allConstructGlobs;
6705
- }
6706
- });
6707
- Object.defineProperty(exports, 'appConstructGlobs', {
6708
- enumerable: true,
6709
- get: function () {
6710
- return appConstructGlobs;
6711
- }
6712
- });
6713
- Object.defineProperty(exports, 'assertDeployedStage', {
6714
- enumerable: true,
6715
- get: function () {
6716
- return assertDeployedStage;
6717
- }
6718
- });
6719
- Object.defineProperty(exports, 'constructPatterns', {
6720
- enumerable: true,
6721
- get: function () {
6722
- return constructPatterns;
6723
- }
6724
- });
6725
- Object.defineProperty(exports, 'defineWorkspace', {
6726
- enumerable: true,
6727
- get: function () {
6728
- return defineWorkspace;
6729
- }
6730
- });
6731
- Object.defineProperty(exports, 'deployedProblems', {
6732
- enumerable: true,
6733
- get: function () {
6734
- return deployedProblems;
6735
- }
6736
- });
6737
- Object.defineProperty(exports, 'formatValidationErrors', {
6738
- enumerable: true,
6739
- get: function () {
6740
- return formatValidationErrors;
6741
- }
6742
- });
6743
- Object.defineProperty(exports, 'getAppBuildOrder', {
6744
- enumerable: true,
6745
- get: function () {
6746
- return getAppBuildOrder;
6747
- }
6748
- });
6749
- Object.defineProperty(exports, 'getAppGkmConfig', {
6750
- enumerable: true,
6751
- get: function () {
6752
- return getAppGkmConfig;
6753
- }
6754
- });
6755
- Object.defineProperty(exports, 'getDependencyEnvVars', {
6756
- enumerable: true,
6757
- get: function () {
6758
- return getDependencyEnvVars;
6759
- }
6760
- });
6761
- Object.defineProperty(exports, 'getDeployTargetError', {
6762
- enumerable: true,
6763
- get: function () {
6764
- return getDeployTargetError;
6765
- }
6766
- });
6767
- Object.defineProperty(exports, 'getEndpointForStage', {
6768
- enumerable: true,
6769
- get: function () {
6770
- return getEndpointForStage;
6771
- }
6772
- });
6773
- Object.defineProperty(exports, 'getPublicEnvPrefix', {
6774
- enumerable: true,
6775
- get: function () {
6776
- return getPublicEnvPrefix;
6777
- }
6778
- });
6779
- Object.defineProperty(exports, 'isDeployTargetSupported', {
6780
- enumerable: true,
6781
- get: function () {
6782
- return isDeployTargetSupported;
6783
- }
6784
- });
6785
- Object.defineProperty(exports, 'isPhase2DeployTarget', {
6786
- enumerable: true,
6787
- get: function () {
6788
- return isPhase2DeployTarget;
6789
- }
6790
- });
6791
- Object.defineProperty(exports, 'isWorkspaceConfig', {
6792
- enumerable: true,
6793
- get: function () {
6794
- return isWorkspaceConfig;
6795
- }
6796
- });
6797
- Object.defineProperty(exports, 'normalizeWorkspace', {
6798
- enumerable: true,
6799
- get: function () {
6800
- return normalizeWorkspace;
6801
- }
6802
- });
6803
- Object.defineProperty(exports, 'processConfig', {
6804
- enumerable: true,
6805
- get: function () {
6806
- return processConfig;
6807
- }
6808
- });
6809
- Object.defineProperty(exports, 'safeValidateWorkspaceConfig', {
6810
- enumerable: true,
6811
- get: function () {
6812
- return safeValidateWorkspaceConfig;
6813
- }
6814
- });
6815
- Object.defineProperty(exports, 'stageProblems', {
6816
- enumerable: true,
6817
- get: function () {
6818
- return stageProblems;
6819
- }
6820
- });
6821
- Object.defineProperty(exports, 'stripPublicPrefix', {
6822
- enumerable: true,
6823
- get: function () {
6824
- return stripPublicPrefix;
6825
- }
6826
- });
6827
- Object.defineProperty(exports, 'validateWorkspaceConfig', {
6828
- enumerable: true,
6829
- get: function () {
6830
- return validateWorkspaceConfig;
6831
- }
6832
- });
6833
- Object.defineProperty(exports, 'workspaceConstructGlobs', {
6834
- enumerable: true,
6835
- get: function () {
6836
- return workspaceConstructGlobs;
6837
- }
6838
- });
6839
- Object.defineProperty(exports, 'wrapSingleAppAsWorkspace', {
6840
- enumerable: true,
6841
- get: function () {
6842
- return wrapSingleAppAsWorkspace;
6843
- }
6844
- });
6845
- //# sourceMappingURL=workspace-C6VJQVtG.cjs.map
5961
+ //# sourceMappingURL=schemas-BCwKKA42.mjs.map