@pagesmith/docs 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (655) hide show
  1. package/README.md +374 -0
  2. package/dist/abap-DriO5VG6.mjs +5 -0
  3. package/dist/abap-DriO5VG6.mjs.map +1 -0
  4. package/dist/actionscript-3-G6toewHp.mjs +5 -0
  5. package/dist/actionscript-3-G6toewHp.mjs.map +1 -0
  6. package/dist/ada-C_QiJ0Pq.mjs +5 -0
  7. package/dist/ada-C_QiJ0Pq.mjs.map +1 -0
  8. package/dist/andromeeda-CoIEPgYR.mjs +6 -0
  9. package/dist/andromeeda-CoIEPgYR.mjs.map +1 -0
  10. package/dist/angular-html-D9wIlok7.mjs +35 -0
  11. package/dist/angular-html-D9wIlok7.mjs.map +1 -0
  12. package/dist/angular-ts-Dxk7hl9Z.mjs +29 -0
  13. package/dist/angular-ts-Dxk7hl9Z.mjs.map +1 -0
  14. package/dist/apache-B1aRGcgY.mjs +5 -0
  15. package/dist/apache-B1aRGcgY.mjs.map +1 -0
  16. package/dist/apex-FoK4UgwA.mjs +5 -0
  17. package/dist/apex-FoK4UgwA.mjs.map +1 -0
  18. package/dist/apl-DwmTqCJs.mjs +19 -0
  19. package/dist/apl-DwmTqCJs.mjs.map +1 -0
  20. package/dist/applescript-eBeY0Hp4.mjs +5 -0
  21. package/dist/applescript-eBeY0Hp4.mjs.map +1 -0
  22. package/dist/ara-CkIucGv1.mjs +5 -0
  23. package/dist/ara-CkIucGv1.mjs.map +1 -0
  24. package/dist/asciidoc-AIdrECCR.mjs +5 -0
  25. package/dist/asciidoc-AIdrECCR.mjs.map +1 -0
  26. package/dist/asm-CflFLM6a.mjs +5 -0
  27. package/dist/asm-CflFLM6a.mjs.map +1 -0
  28. package/dist/astro-DLt5gl0n.mjs +21 -0
  29. package/dist/astro-DLt5gl0n.mjs.map +1 -0
  30. package/dist/aurora-x-DbqEqkUT.mjs +6 -0
  31. package/dist/aurora-x-DbqEqkUT.mjs.map +1 -0
  32. package/dist/awk-Br_61sCS.mjs +5 -0
  33. package/dist/awk-Br_61sCS.mjs.map +1 -0
  34. package/dist/ayu-dark-DdJXJf7U.mjs +6 -0
  35. package/dist/ayu-dark-DdJXJf7U.mjs.map +1 -0
  36. package/dist/ayu-light-Bg-9Hujp.mjs +6 -0
  37. package/dist/ayu-light-Bg-9Hujp.mjs.map +1 -0
  38. package/dist/ayu-mirage-7v6-qMvl.mjs +6 -0
  39. package/dist/ayu-mirage-7v6-qMvl.mjs.map +1 -0
  40. package/dist/ballerina-D-8GYl8R.mjs +5 -0
  41. package/dist/ballerina-D-8GYl8R.mjs.map +1 -0
  42. package/dist/bat-CJ4nIaxw.mjs +5 -0
  43. package/dist/bat-CJ4nIaxw.mjs.map +1 -0
  44. package/dist/beancount-DFPOglwN.mjs +5 -0
  45. package/dist/beancount-DFPOglwN.mjs.map +1 -0
  46. package/dist/berry-DiM_rwEt.mjs +5 -0
  47. package/dist/berry-DiM_rwEt.mjs.map +1 -0
  48. package/dist/bibtex-ryU9pJLB.mjs +5 -0
  49. package/dist/bibtex-ryU9pJLB.mjs.map +1 -0
  50. package/dist/bicep-DFoNCrG3.mjs +5 -0
  51. package/dist/bicep-DFoNCrG3.mjs.map +1 -0
  52. package/dist/bird2-C3EaFiUY.mjs +5 -0
  53. package/dist/bird2-C3EaFiUY.mjs.map +1 -0
  54. package/dist/blade-Cwq7FVfH.mjs +23 -0
  55. package/dist/blade-Cwq7FVfH.mjs.map +1 -0
  56. package/dist/bsl-Ci4vkNj8.mjs +8 -0
  57. package/dist/bsl-Ci4vkNj8.mjs.map +1 -0
  58. package/dist/c-D7oHDxxD.mjs +8 -0
  59. package/dist/c-D7oHDxxD.mjs.map +1 -0
  60. package/dist/c3-D5hU-x2t.mjs +5 -0
  61. package/dist/c3-D5hU-x2t.mjs.map +1 -0
  62. package/dist/cadence-B-Z42oTz.mjs +5 -0
  63. package/dist/cadence-B-Z42oTz.mjs.map +1 -0
  64. package/dist/cairo-BpET0YK1.mjs +8 -0
  65. package/dist/cairo-BpET0YK1.mjs.map +1 -0
  66. package/dist/catppuccin-frappe-0BRWFMtJ.mjs +6 -0
  67. package/dist/catppuccin-frappe-0BRWFMtJ.mjs.map +1 -0
  68. package/dist/catppuccin-latte-VaqpfzxV.mjs +6 -0
  69. package/dist/catppuccin-latte-VaqpfzxV.mjs.map +1 -0
  70. package/dist/catppuccin-macchiato-qrypRbXk.mjs +6 -0
  71. package/dist/catppuccin-macchiato-qrypRbXk.mjs.map +1 -0
  72. package/dist/catppuccin-mocha-Dvb6gv4O.mjs +6 -0
  73. package/dist/catppuccin-mocha-Dvb6gv4O.mjs.map +1 -0
  74. package/dist/clarity-egx-5RLz.mjs +5 -0
  75. package/dist/clarity-egx-5RLz.mjs.map +1 -0
  76. package/dist/cli/bin.d.mts +1 -0
  77. package/dist/cli/bin.mjs +115 -0
  78. package/dist/cli/bin.mjs.map +1 -0
  79. package/dist/clojure-N5xIuTbG.mjs +5 -0
  80. package/dist/clojure-N5xIuTbG.mjs.map +1 -0
  81. package/dist/cmake-CYzXNVI_.mjs +5 -0
  82. package/dist/cmake-CYzXNVI_.mjs.map +1 -0
  83. package/dist/cobol-DuznKErk.mjs +13 -0
  84. package/dist/cobol-DuznKErk.mjs.map +1 -0
  85. package/dist/codeowners-BaallJaj.mjs +5 -0
  86. package/dist/codeowners-BaallJaj.mjs.map +1 -0
  87. package/dist/codeql-BIahF8Ga.mjs +5 -0
  88. package/dist/codeql-BIahF8Ga.mjs.map +1 -0
  89. package/dist/coffee-t6lXzaXy.mjs +8 -0
  90. package/dist/coffee-t6lXzaXy.mjs.map +1 -0
  91. package/dist/common-lisp-bLMBDFt9.mjs +5 -0
  92. package/dist/common-lisp-bLMBDFt9.mjs.map +1 -0
  93. package/dist/coq-h9z5p2Ui.mjs +5 -0
  94. package/dist/coq-h9z5p2Ui.mjs.map +1 -0
  95. package/dist/cpp-D6_V2gI1.mjs +27 -0
  96. package/dist/cpp-D6_V2gI1.mjs.map +1 -0
  97. package/dist/crystal-BH-Qv6Rl.mjs +21 -0
  98. package/dist/crystal-BH-Qv6Rl.mjs.map +1 -0
  99. package/dist/csharp-BbHR3YVQ.mjs +5 -0
  100. package/dist/csharp-BbHR3YVQ.mjs.map +1 -0
  101. package/dist/css-Wu--EEs5.mjs +8 -0
  102. package/dist/css-Wu--EEs5.mjs.map +1 -0
  103. package/dist/csv-CRvIpAc5.mjs +5 -0
  104. package/dist/csv-CRvIpAc5.mjs.map +1 -0
  105. package/dist/cue-B8A_h-kS.mjs +5 -0
  106. package/dist/cue-B8A_h-kS.mjs.map +1 -0
  107. package/dist/cypher-B8mmimml.mjs +5 -0
  108. package/dist/cypher-B8mmimml.mjs.map +1 -0
  109. package/dist/d-Ddz3GmKc.mjs +5 -0
  110. package/dist/d-Ddz3GmKc.mjs.map +1 -0
  111. package/dist/dark-plus-BjClkp3W.mjs +6 -0
  112. package/dist/dark-plus-BjClkp3W.mjs.map +1 -0
  113. package/dist/dart-BOQAkR91.mjs +5 -0
  114. package/dist/dart-BOQAkR91.mjs.map +1 -0
  115. package/dist/dax-D3YKmfop.mjs +5 -0
  116. package/dist/dax-D3YKmfop.mjs.map +1 -0
  117. package/dist/desktop-wo52vLHj.mjs +5 -0
  118. package/dist/desktop-wo52vLHj.mjs.map +1 -0
  119. package/dist/diff-nA9OrLiI.mjs +5 -0
  120. package/dist/diff-nA9OrLiI.mjs.map +1 -0
  121. package/dist/docker-BgWkJ5L9.mjs +5 -0
  122. package/dist/docker-BgWkJ5L9.mjs.map +1 -0
  123. package/dist/dotenv-90bAk1yC.mjs +5 -0
  124. package/dist/dotenv-90bAk1yC.mjs.map +1 -0
  125. package/dist/dracula-EYPvHKFq.mjs +6 -0
  126. package/dist/dracula-EYPvHKFq.mjs.map +1 -0
  127. package/dist/dracula-soft-Bb4JppaT.mjs +6 -0
  128. package/dist/dracula-soft-Bb4JppaT.mjs.map +1 -0
  129. package/dist/dream-maker-DbEH6ABX.mjs +5 -0
  130. package/dist/dream-maker-DbEH6ABX.mjs.map +1 -0
  131. package/dist/edge-CiNxTnJq.mjs +15 -0
  132. package/dist/edge-CiNxTnJq.mjs.map +1 -0
  133. package/dist/elixir-M-tyUuPQ.mjs +8 -0
  134. package/dist/elixir-M-tyUuPQ.mjs.map +1 -0
  135. package/dist/elm-CPy7ntV_.mjs +8 -0
  136. package/dist/elm-CPy7ntV_.mjs.map +1 -0
  137. package/dist/emacs-lisp-Brxx0Sbt.mjs +5 -0
  138. package/dist/emacs-lisp-Brxx0Sbt.mjs.map +1 -0
  139. package/dist/engine-javascript-CjxD84Z_.mjs +3058 -0
  140. package/dist/engine-javascript-CjxD84Z_.mjs.map +1 -0
  141. package/dist/engine-oniguruma-B2buYh9y.mjs +389 -0
  142. package/dist/engine-oniguruma-B2buYh9y.mjs.map +1 -0
  143. package/dist/erb-CP0kP8S1.mjs +13 -0
  144. package/dist/erb-CP0kP8S1.mjs.map +1 -0
  145. package/dist/erlang-Ji96SB8L.mjs +8 -0
  146. package/dist/erlang-Ji96SB8L.mjs.map +1 -0
  147. package/dist/everforest-dark-mXu75VmU.mjs +6 -0
  148. package/dist/everforest-dark-mXu75VmU.mjs.map +1 -0
  149. package/dist/everforest-light-B0xAPlUp.mjs +6 -0
  150. package/dist/everforest-light-B0xAPlUp.mjs.map +1 -0
  151. package/dist/fennel-DZeZiT-Z.mjs +5 -0
  152. package/dist/fennel-DZeZiT-Z.mjs.map +1 -0
  153. package/dist/fish-BW_XyVWl.mjs +5 -0
  154. package/dist/fish-BW_XyVWl.mjs.map +1 -0
  155. package/dist/fluent-D5wjIx4S.mjs +5 -0
  156. package/dist/fluent-D5wjIx4S.mjs.map +1 -0
  157. package/dist/fortran-fixed-form-pFDq8aul.mjs +8 -0
  158. package/dist/fortran-fixed-form-pFDq8aul.mjs.map +1 -0
  159. package/dist/fortran-free-form-B6T0euh-.mjs +5 -0
  160. package/dist/fortran-free-form-B6T0euh-.mjs.map +1 -0
  161. package/dist/fsharp-DFzfL_uZ.mjs +8 -0
  162. package/dist/fsharp-DFzfL_uZ.mjs.map +1 -0
  163. package/dist/gdresource-DZkMKM9Q.mjs +13 -0
  164. package/dist/gdresource-DZkMKM9Q.mjs.map +1 -0
  165. package/dist/gdscript-DwtQqEcX.mjs +5 -0
  166. package/dist/gdscript-DwtQqEcX.mjs.map +1 -0
  167. package/dist/gdshader-rDwkUCaa.mjs +5 -0
  168. package/dist/gdshader-rDwkUCaa.mjs.map +1 -0
  169. package/dist/genie-BfhM6kGv.mjs +5 -0
  170. package/dist/genie-BfhM6kGv.mjs.map +1 -0
  171. package/dist/gherkin-G-JA03FJ.mjs +5 -0
  172. package/dist/gherkin-G-JA03FJ.mjs.map +1 -0
  173. package/dist/git-commit-drj2jjWh.mjs +8 -0
  174. package/dist/git-commit-drj2jjWh.mjs.map +1 -0
  175. package/dist/git-rebase-CaohyQnS.mjs +8 -0
  176. package/dist/git-rebase-CaohyQnS.mjs.map +1 -0
  177. package/dist/github-dark-CTenoRQ8.mjs +6 -0
  178. package/dist/github-dark-CTenoRQ8.mjs.map +1 -0
  179. package/dist/github-dark-default-Con6b1h-.mjs +6 -0
  180. package/dist/github-dark-default-Con6b1h-.mjs.map +1 -0
  181. package/dist/github-dark-dimmed-CaAnvWw3.mjs +6 -0
  182. package/dist/github-dark-dimmed-CaAnvWw3.mjs.map +1 -0
  183. package/dist/github-dark-high-contrast-COm7y1Rv.mjs +6 -0
  184. package/dist/github-dark-high-contrast-COm7y1Rv.mjs.map +1 -0
  185. package/dist/github-light-D74aa4dO.mjs +6 -0
  186. package/dist/github-light-D74aa4dO.mjs.map +1 -0
  187. package/dist/github-light-default-BBVzuVUz.mjs +6 -0
  188. package/dist/github-light-default-BBVzuVUz.mjs.map +1 -0
  189. package/dist/github-light-high-contrast-CqxSzsLD.mjs +6 -0
  190. package/dist/github-light-high-contrast-CqxSzsLD.mjs.map +1 -0
  191. package/dist/gleam-DzWkrReo.mjs +5 -0
  192. package/dist/gleam-DzWkrReo.mjs.map +1 -0
  193. package/dist/glimmer-js-BNQY0kPX.mjs +17 -0
  194. package/dist/glimmer-js-BNQY0kPX.mjs.map +1 -0
  195. package/dist/glimmer-ts-DO-qafJY.mjs +17 -0
  196. package/dist/glimmer-ts-DO-qafJY.mjs.map +1 -0
  197. package/dist/glsl-wU4MxvvQ.mjs +10 -0
  198. package/dist/glsl-wU4MxvvQ.mjs.map +1 -0
  199. package/dist/gn-DVz3m6tN.mjs +5 -0
  200. package/dist/gn-DVz3m6tN.mjs.map +1 -0
  201. package/dist/gnuplot-D4teOAbn.mjs +5 -0
  202. package/dist/gnuplot-D4teOAbn.mjs.map +1 -0
  203. package/dist/go-DcqYXZDE.mjs +5 -0
  204. package/dist/go-DcqYXZDE.mjs.map +1 -0
  205. package/dist/graphql-CAmmtGyG.mjs +19 -0
  206. package/dist/graphql-CAmmtGyG.mjs.map +1 -0
  207. package/dist/groovy-BdsJaZey.mjs +5 -0
  208. package/dist/groovy-BdsJaZey.mjs.map +1 -0
  209. package/dist/gruvbox-dark-hard-CGsJkBU-.mjs +6 -0
  210. package/dist/gruvbox-dark-hard-CGsJkBU-.mjs.map +1 -0
  211. package/dist/gruvbox-dark-medium-uVadnpDA.mjs +6 -0
  212. package/dist/gruvbox-dark-medium-uVadnpDA.mjs.map +1 -0
  213. package/dist/gruvbox-dark-soft-CGpZgcKq.mjs +6 -0
  214. package/dist/gruvbox-dark-soft-CGpZgcKq.mjs.map +1 -0
  215. package/dist/gruvbox-light-hard-BXZeSfoD.mjs +6 -0
  216. package/dist/gruvbox-light-hard-BXZeSfoD.mjs.map +1 -0
  217. package/dist/gruvbox-light-medium-D7mAxe90.mjs +6 -0
  218. package/dist/gruvbox-light-medium-D7mAxe90.mjs.map +1 -0
  219. package/dist/gruvbox-light-soft-enFNSJ1V.mjs +6 -0
  220. package/dist/gruvbox-light-soft-enFNSJ1V.mjs.map +1 -0
  221. package/dist/hack-DgaC5QUw.mjs +13 -0
  222. package/dist/hack-DgaC5QUw.mjs.map +1 -0
  223. package/dist/haml-1vrxYPQe.mjs +15 -0
  224. package/dist/haml-1vrxYPQe.mjs.map +1 -0
  225. package/dist/handlebars-BOf036w9.mjs +17 -0
  226. package/dist/handlebars-BOf036w9.mjs.map +1 -0
  227. package/dist/haskell-BgXObw3Z.mjs +5 -0
  228. package/dist/haskell-BgXObw3Z.mjs.map +1 -0
  229. package/dist/haxe-SN6gQnv7.mjs +5 -0
  230. package/dist/haxe-SN6gQnv7.mjs.map +1 -0
  231. package/dist/hcl-DfQ78ybU.mjs +5 -0
  232. package/dist/hcl-DfQ78ybU.mjs.map +1 -0
  233. package/dist/hjson-DsbHj1Vu.mjs +5 -0
  234. package/dist/hjson-DsbHj1Vu.mjs.map +1 -0
  235. package/dist/hlsl-DErhWTj4.mjs +5 -0
  236. package/dist/hlsl-DErhWTj4.mjs.map +1 -0
  237. package/dist/horizon-bright-BLpSmqnO.mjs +6 -0
  238. package/dist/horizon-bright-BLpSmqnO.mjs.map +1 -0
  239. package/dist/horizon-mHk0xSKw.mjs +6 -0
  240. package/dist/horizon-mHk0xSKw.mjs.map +1 -0
  241. package/dist/houston-CJWIjsF-.mjs +6 -0
  242. package/dist/houston-CJWIjsF-.mjs.map +1 -0
  243. package/dist/html-derivative-CoKpUZPA.mjs +8 -0
  244. package/dist/html-derivative-CoKpUZPA.mjs.map +1 -0
  245. package/dist/html-hLCdjm8s.mjs +15 -0
  246. package/dist/html-hLCdjm8s.mjs.map +1 -0
  247. package/dist/http-Cu2vb2m1.mjs +17 -0
  248. package/dist/http-Cu2vb2m1.mjs.map +1 -0
  249. package/dist/hurl-DXLUiPe9.mjs +15 -0
  250. package/dist/hurl-DXLUiPe9.mjs.map +1 -0
  251. package/dist/hxml-D53ff3CT.mjs +8 -0
  252. package/dist/hxml-D53ff3CT.mjs.map +1 -0
  253. package/dist/hy-V5YDnsp0.mjs +5 -0
  254. package/dist/hy-V5YDnsp0.mjs.map +1 -0
  255. package/dist/imba-Dj8CXVx-.mjs +5 -0
  256. package/dist/imba-Dj8CXVx-.mjs.map +1 -0
  257. package/dist/index.d.mts +102 -0
  258. package/dist/index.d.mts.map +1 -0
  259. package/dist/index.mjs +3 -0
  260. package/dist/ini-BBJUwrOG.mjs +5 -0
  261. package/dist/ini-BBJUwrOG.mjs.map +1 -0
  262. package/dist/java-YvKbK6tX.mjs +8 -0
  263. package/dist/java-YvKbK6tX.mjs.map +1 -0
  264. package/dist/javascript-YIAaXWRu.mjs +8 -0
  265. package/dist/javascript-YIAaXWRu.mjs.map +1 -0
  266. package/dist/jinja-ENyZ39OR.mjs +12 -0
  267. package/dist/jinja-ENyZ39OR.mjs.map +1 -0
  268. package/dist/jison-a-QW5GR4.mjs +8 -0
  269. package/dist/jison-a-QW5GR4.mjs.map +1 -0
  270. package/dist/json-D_p_sVuw.mjs +8 -0
  271. package/dist/json-D_p_sVuw.mjs.map +1 -0
  272. package/dist/json5-DC6Kkd4p.mjs +5 -0
  273. package/dist/json5-DC6Kkd4p.mjs.map +1 -0
  274. package/dist/jsonc-CXqrxP7Z.mjs +5 -0
  275. package/dist/jsonc-CXqrxP7Z.mjs.map +1 -0
  276. package/dist/jsonl-CzqgMhZd.mjs +5 -0
  277. package/dist/jsonl-CzqgMhZd.mjs.map +1 -0
  278. package/dist/jsonnet-Hvy31yDW.mjs +5 -0
  279. package/dist/jsonnet-Hvy31yDW.mjs.map +1 -0
  280. package/dist/jssm-CKXXM0Nd.mjs +5 -0
  281. package/dist/jssm-CKXXM0Nd.mjs.map +1 -0
  282. package/dist/jsx-Cmr67-nO.mjs +8 -0
  283. package/dist/jsx-Cmr67-nO.mjs.map +1 -0
  284. package/dist/julia-apY6-EoT.mjs +19 -0
  285. package/dist/julia-apY6-EoT.mjs.map +1 -0
  286. package/dist/just-DPxowZX-.mjs +21 -0
  287. package/dist/just-DPxowZX-.mjs.map +1 -0
  288. package/dist/kanagawa-dragon-bgbtpXkX.mjs +6 -0
  289. package/dist/kanagawa-dragon-bgbtpXkX.mjs.map +1 -0
  290. package/dist/kanagawa-lotus-CAjM2aBD.mjs +6 -0
  291. package/dist/kanagawa-lotus-CAjM2aBD.mjs.map +1 -0
  292. package/dist/kanagawa-wave-gUF-XydY.mjs +6 -0
  293. package/dist/kanagawa-wave-gUF-XydY.mjs.map +1 -0
  294. package/dist/kdl-DakeRkny.mjs +5 -0
  295. package/dist/kdl-DakeRkny.mjs.map +1 -0
  296. package/dist/kotlin-Cy2z7uIJ.mjs +5 -0
  297. package/dist/kotlin-Cy2z7uIJ.mjs.map +1 -0
  298. package/dist/kusto-8vFexomq.mjs +5 -0
  299. package/dist/kusto-8vFexomq.mjs.map +1 -0
  300. package/dist/laserwave-afq0Xxwk.mjs +6 -0
  301. package/dist/laserwave-afq0Xxwk.mjs.map +1 -0
  302. package/dist/latex-D_F2h8-H.mjs +8 -0
  303. package/dist/latex-D_F2h8-H.mjs.map +1 -0
  304. package/dist/lean-IHm98qhW.mjs +5 -0
  305. package/dist/lean-IHm98qhW.mjs.map +1 -0
  306. package/dist/less-D6RfQ6-S.mjs +5 -0
  307. package/dist/less-D6RfQ6-S.mjs.map +1 -0
  308. package/dist/light-plus-Dwa6Dmsm.mjs +6 -0
  309. package/dist/light-plus-Dwa6Dmsm.mjs.map +1 -0
  310. package/dist/liquid-DK7BdQ-d.mjs +17 -0
  311. package/dist/liquid-DK7BdQ-d.mjs.map +1 -0
  312. package/dist/llvm-CbsqsAF1.mjs +5 -0
  313. package/dist/llvm-CbsqsAF1.mjs.map +1 -0
  314. package/dist/log-CutLVNLV.mjs +5 -0
  315. package/dist/log-CutLVNLV.mjs.map +1 -0
  316. package/dist/logo-DNTC5lxi.mjs +5 -0
  317. package/dist/logo-DNTC5lxi.mjs.map +1 -0
  318. package/dist/lua-NCVDi2Y_.mjs +10 -0
  319. package/dist/lua-NCVDi2Y_.mjs.map +1 -0
  320. package/dist/luau-Z-b9t2YR.mjs +5 -0
  321. package/dist/luau-Z-b9t2YR.mjs.map +1 -0
  322. package/dist/make-D7o-TjTO.mjs +5 -0
  323. package/dist/make-D7o-TjTO.mjs.map +1 -0
  324. package/dist/markdown-CEvLuIE_.mjs +5 -0
  325. package/dist/markdown-CEvLuIE_.mjs.map +1 -0
  326. package/dist/markdown-config-BGDiDMhB.d.mts +2094 -0
  327. package/dist/markdown-config-BGDiDMhB.d.mts.map +1 -0
  328. package/dist/marko-DyPWMVoi.mjs +17 -0
  329. package/dist/marko-DyPWMVoi.mjs.map +1 -0
  330. package/dist/material-theme-BMSwLkhz.mjs +6 -0
  331. package/dist/material-theme-BMSwLkhz.mjs.map +1 -0
  332. package/dist/material-theme-darker-DREhSOvw.mjs +6 -0
  333. package/dist/material-theme-darker-DREhSOvw.mjs.map +1 -0
  334. package/dist/material-theme-lighter-egkNOF68.mjs +6 -0
  335. package/dist/material-theme-lighter-egkNOF68.mjs.map +1 -0
  336. package/dist/material-theme-ocean-CNqBAXQm.mjs +6 -0
  337. package/dist/material-theme-ocean-CNqBAXQm.mjs.map +1 -0
  338. package/dist/material-theme-palenight-DtcONgpr.mjs +6 -0
  339. package/dist/material-theme-palenight-DtcONgpr.mjs.map +1 -0
  340. package/dist/matlab-DHZHeFXY.mjs +5 -0
  341. package/dist/matlab-DHZHeFXY.mjs.map +1 -0
  342. package/dist/mdc-MKPEEsGA.mjs +15 -0
  343. package/dist/mdc-MKPEEsGA.mjs.map +1 -0
  344. package/dist/mdx-ClLOyMcG.mjs +5 -0
  345. package/dist/mdx-ClLOyMcG.mjs.map +1 -0
  346. package/dist/mermaid-CfX58h2h.mjs +5 -0
  347. package/dist/mermaid-CfX58h2h.mjs.map +1 -0
  348. package/dist/min-dark-CvIB8xOx.mjs +6 -0
  349. package/dist/min-dark-CvIB8xOx.mjs.map +1 -0
  350. package/dist/min-light-DnoFQoeu.mjs +6 -0
  351. package/dist/min-light-DnoFQoeu.mjs.map +1 -0
  352. package/dist/mipsasm-BPlrYcYb.mjs +5 -0
  353. package/dist/mipsasm-BPlrYcYb.mjs.map +1 -0
  354. package/dist/mojo-C5Qzk_lA.mjs +5 -0
  355. package/dist/mojo-C5Qzk_lA.mjs.map +1 -0
  356. package/dist/monokai-CmoRmG4x.mjs +6 -0
  357. package/dist/monokai-CmoRmG4x.mjs.map +1 -0
  358. package/dist/moonbit-BzaO7bLo.mjs +5 -0
  359. package/dist/moonbit-BzaO7bLo.mjs.map +1 -0
  360. package/dist/move-CAZmkwHx.mjs +5 -0
  361. package/dist/move-CAZmkwHx.mjs.map +1 -0
  362. package/dist/narrat-DN2gLj7A.mjs +5 -0
  363. package/dist/narrat-DN2gLj7A.mjs.map +1 -0
  364. package/dist/nextflow-DhVPPjdW.mjs +8 -0
  365. package/dist/nextflow-DhVPPjdW.mjs.map +1 -0
  366. package/dist/nextflow-groovy-DJq82mRo.mjs +5 -0
  367. package/dist/nextflow-groovy-DJq82mRo.mjs.map +1 -0
  368. package/dist/nginx-CU-DGOv1.mjs +8 -0
  369. package/dist/nginx-CU-DGOv1.mjs.map +1 -0
  370. package/dist/night-owl-Cs13ScSs.mjs +6 -0
  371. package/dist/night-owl-Cs13ScSs.mjs.map +1 -0
  372. package/dist/night-owl-light--HbEFF7Y.mjs +6 -0
  373. package/dist/night-owl-light--HbEFF7Y.mjs.map +1 -0
  374. package/dist/nim-3UbGj8cc.mjs +23 -0
  375. package/dist/nim-3UbGj8cc.mjs.map +1 -0
  376. package/dist/nix-CjXcUl9k.mjs +9 -0
  377. package/dist/nix-CjXcUl9k.mjs.map +1 -0
  378. package/dist/nord-C9GqXk2p.mjs +6 -0
  379. package/dist/nord-C9GqXk2p.mjs.map +1 -0
  380. package/dist/nushell-C4iFdrTc.mjs +5 -0
  381. package/dist/nushell-C4iFdrTc.mjs.map +1 -0
  382. package/dist/objective-c-CXuDGuMm.mjs +5 -0
  383. package/dist/objective-c-CXuDGuMm.mjs.map +1 -0
  384. package/dist/objective-cpp-V9yvCIRm.mjs +5 -0
  385. package/dist/objective-cpp-V9yvCIRm.mjs.map +1 -0
  386. package/dist/ocaml-D9fCj6sT.mjs +5 -0
  387. package/dist/ocaml-D9fCj6sT.mjs.map +1 -0
  388. package/dist/odin-CAKGLqrj.mjs +5 -0
  389. package/dist/odin-CAKGLqrj.mjs.map +1 -0
  390. package/dist/one-dark-pro-DW7BmY6Q.mjs +6 -0
  391. package/dist/one-dark-pro-DW7BmY6Q.mjs.map +1 -0
  392. package/dist/one-light-DCu0Wv9N.mjs +6 -0
  393. package/dist/one-light-DCu0Wv9N.mjs.map +1 -0
  394. package/dist/openscad-BdLZBBab.mjs +5 -0
  395. package/dist/openscad-BdLZBBab.mjs.map +1 -0
  396. package/dist/pascal-nsk9MKFb.mjs +5 -0
  397. package/dist/pascal-nsk9MKFb.mjs.map +1 -0
  398. package/dist/perl-DI9oLKmv.mjs +19 -0
  399. package/dist/perl-DI9oLKmv.mjs.map +1 -0
  400. package/dist/php-DJjzFdsM.mjs +21 -0
  401. package/dist/php-DJjzFdsM.mjs.map +1 -0
  402. package/dist/pkl-BVtC2QFe.mjs +5 -0
  403. package/dist/pkl-BVtC2QFe.mjs.map +1 -0
  404. package/dist/plastic-qUgYNoeW.mjs +6 -0
  405. package/dist/plastic-qUgYNoeW.mjs.map +1 -0
  406. package/dist/plsql-BwM0DOLE.mjs +5 -0
  407. package/dist/plsql-BwM0DOLE.mjs.map +1 -0
  408. package/dist/po-D39EqRsl.mjs +5 -0
  409. package/dist/po-D39EqRsl.mjs.map +1 -0
  410. package/dist/poimandres-DPRzGPvx.mjs +6 -0
  411. package/dist/poimandres-DPRzGPvx.mjs.map +1 -0
  412. package/dist/polar-DCBzWT3J.mjs +5 -0
  413. package/dist/polar-DCBzWT3J.mjs.map +1 -0
  414. package/dist/postcss-L6y-bzEw.mjs +5 -0
  415. package/dist/postcss-L6y-bzEw.mjs.map +1 -0
  416. package/dist/powerquery-BHkUTyux.mjs +5 -0
  417. package/dist/powerquery-BHkUTyux.mjs.map +1 -0
  418. package/dist/powershell-C80dlfD8.mjs +5 -0
  419. package/dist/powershell-C80dlfD8.mjs.map +1 -0
  420. package/dist/preset.d.mts +15 -0
  421. package/dist/preset.d.mts.map +1 -0
  422. package/dist/preset.mjs +19 -0
  423. package/dist/preset.mjs.map +1 -0
  424. package/dist/prisma-D407qtUw.mjs +5 -0
  425. package/dist/prisma-D407qtUw.mjs.map +1 -0
  426. package/dist/prolog-CSrn8-6K.mjs +5 -0
  427. package/dist/prolog-CSrn8-6K.mjs.map +1 -0
  428. package/dist/proto-ClvDy0H0.mjs +5 -0
  429. package/dist/proto-ClvDy0H0.mjs.map +1 -0
  430. package/dist/pug-Cyyu0V2y.mjs +15 -0
  431. package/dist/pug-Cyyu0V2y.mjs.map +1 -0
  432. package/dist/puppet-D5ZQtSNi.mjs +5 -0
  433. package/dist/puppet-D5ZQtSNi.mjs.map +1 -0
  434. package/dist/purescript-30PxZSjT.mjs +5 -0
  435. package/dist/purescript-30PxZSjT.mjs.map +1 -0
  436. package/dist/python-CpiNX4Ip.mjs +5 -0
  437. package/dist/python-CpiNX4Ip.mjs.map +1 -0
  438. package/dist/qml-PuKhTmY-.mjs +8 -0
  439. package/dist/qml-PuKhTmY-.mjs.map +1 -0
  440. package/dist/qmldir-BTwcIF6g.mjs +5 -0
  441. package/dist/qmldir-BTwcIF6g.mjs.map +1 -0
  442. package/dist/qss-DcpQyHuk.mjs +5 -0
  443. package/dist/qss-DcpQyHuk.mjs.map +1 -0
  444. package/dist/r-DcW8EcF5.mjs +8 -0
  445. package/dist/r-DcW8EcF5.mjs.map +1 -0
  446. package/dist/racket-D-BwrG5z.mjs +5 -0
  447. package/dist/racket-D-BwrG5z.mjs.map +1 -0
  448. package/dist/raku-CM1N1WTp.mjs +5 -0
  449. package/dist/raku-CM1N1WTp.mjs.map +1 -0
  450. package/dist/razor-C912Hs6M.mjs +13 -0
  451. package/dist/razor-C912Hs6M.mjs.map +1 -0
  452. package/dist/red-DhGHw_i_.mjs +6 -0
  453. package/dist/red-DhGHw_i_.mjs.map +1 -0
  454. package/dist/reg-MlBfIgTN.mjs +5 -0
  455. package/dist/reg-MlBfIgTN.mjs.map +1 -0
  456. package/dist/regexp-CEVpExph.mjs +8 -0
  457. package/dist/regexp-CEVpExph.mjs.map +1 -0
  458. package/dist/rel-Dg_W2E_N.mjs +5 -0
  459. package/dist/rel-Dg_W2E_N.mjs.map +1 -0
  460. package/dist/riscv-BoH7mqNI.mjs +5 -0
  461. package/dist/riscv-BoH7mqNI.mjs.map +1 -0
  462. package/dist/ron-DbOWX1T7.mjs +5 -0
  463. package/dist/ron-DbOWX1T7.mjs.map +1 -0
  464. package/dist/rose-pine-78rugKGO.mjs +6 -0
  465. package/dist/rose-pine-78rugKGO.mjs.map +1 -0
  466. package/dist/rose-pine-dawn-C_mYSEtu.mjs +6 -0
  467. package/dist/rose-pine-dawn-C_mYSEtu.mjs.map +1 -0
  468. package/dist/rose-pine-moon-Cz7-JQvG.mjs +6 -0
  469. package/dist/rose-pine-moon-Cz7-JQvG.mjs.map +1 -0
  470. package/dist/rosmsg-Ca1BpyBh.mjs +5 -0
  471. package/dist/rosmsg-Ca1BpyBh.mjs.map +1 -0
  472. package/dist/rst-DbIJV67W.mjs +25 -0
  473. package/dist/rst-DbIJV67W.mjs.map +1 -0
  474. package/dist/ruby-D-Lps7Dp.mjs +33 -0
  475. package/dist/ruby-D-Lps7Dp.mjs.map +1 -0
  476. package/dist/rust-Dk6HN1uF.mjs +5 -0
  477. package/dist/rust-Dk6HN1uF.mjs.map +1 -0
  478. package/dist/sas-QckC_qvJ.mjs +8 -0
  479. package/dist/sas-QckC_qvJ.mjs.map +1 -0
  480. package/dist/sass-BWOQVuIy.mjs +5 -0
  481. package/dist/sass-BWOQVuIy.mjs.map +1 -0
  482. package/dist/scala-BoffQEnY.mjs +5 -0
  483. package/dist/scala-BoffQEnY.mjs.map +1 -0
  484. package/dist/schemas/index.d.mts +1615 -0
  485. package/dist/schemas/index.d.mts.map +1 -0
  486. package/dist/schemas/index.mjs +263 -0
  487. package/dist/schemas/index.mjs.map +1 -0
  488. package/dist/schemas-By1qE0sQ.mjs +3881 -0
  489. package/dist/schemas-By1qE0sQ.mjs.map +1 -0
  490. package/dist/scheme-C2D8wvUe.mjs +5 -0
  491. package/dist/scheme-C2D8wvUe.mjs.map +1 -0
  492. package/dist/scss-D1vWunvk.mjs +10 -0
  493. package/dist/scss-D1vWunvk.mjs.map +1 -0
  494. package/dist/sdbl-DkThjfrg.mjs +5 -0
  495. package/dist/sdbl-DkThjfrg.mjs.map +1 -0
  496. package/dist/shaderlab-D0NLokaw.mjs +8 -0
  497. package/dist/shaderlab-D0NLokaw.mjs.map +1 -0
  498. package/dist/shellscript-BHpEag8P.mjs +8 -0
  499. package/dist/shellscript-BHpEag8P.mjs.map +1 -0
  500. package/dist/shellsession-CSdmCfg4.mjs +8 -0
  501. package/dist/shellsession-CSdmCfg4.mjs.map +1 -0
  502. package/dist/site-D8l4ghX0.mjs +71441 -0
  503. package/dist/site-D8l4ghX0.mjs.map +1 -0
  504. package/dist/slack-dark-Cj8kL6BM.mjs +6 -0
  505. package/dist/slack-dark-Cj8kL6BM.mjs.map +1 -0
  506. package/dist/slack-ochin-B4Rna-gD.mjs +6 -0
  507. package/dist/slack-ochin-B4Rna-gD.mjs.map +1 -0
  508. package/dist/smalltalk-ZNQAnLNC.mjs +5 -0
  509. package/dist/smalltalk-ZNQAnLNC.mjs.map +1 -0
  510. package/dist/snazzy-light-CF7MTUt6.mjs +6 -0
  511. package/dist/snazzy-light-CF7MTUt6.mjs.map +1 -0
  512. package/dist/solarized-dark-DBFHIE1d.mjs +6 -0
  513. package/dist/solarized-dark-DBFHIE1d.mjs.map +1 -0
  514. package/dist/solarized-light-Del516-O.mjs +6 -0
  515. package/dist/solarized-light-Del516-O.mjs.map +1 -0
  516. package/dist/solidity-Ddf3MOD2.mjs +5 -0
  517. package/dist/solidity-Ddf3MOD2.mjs.map +1 -0
  518. package/dist/soy-PW0jpJKW.mjs +8 -0
  519. package/dist/soy-PW0jpJKW.mjs.map +1 -0
  520. package/dist/sparql-rX-q1CB9.mjs +8 -0
  521. package/dist/sparql-rX-q1CB9.mjs.map +1 -0
  522. package/dist/splunk-DcREbx5k.mjs +5 -0
  523. package/dist/splunk-DcREbx5k.mjs.map +1 -0
  524. package/dist/sql-Cq_hpY16.mjs +8 -0
  525. package/dist/sql-Cq_hpY16.mjs.map +1 -0
  526. package/dist/ssh-config-DIv0Kb8E.mjs +5 -0
  527. package/dist/ssh-config-DIv0Kb8E.mjs.map +1 -0
  528. package/dist/stata-rEmfzZT7.mjs +8 -0
  529. package/dist/stata-rEmfzZT7.mjs.map +1 -0
  530. package/dist/stylus-DHanz1Kd.mjs +5 -0
  531. package/dist/stylus-DHanz1Kd.mjs.map +1 -0
  532. package/dist/surrealql-BdfgI90j.mjs +8 -0
  533. package/dist/surrealql-BdfgI90j.mjs.map +1 -0
  534. package/dist/svelte-DFFWgqCr.mjs +17 -0
  535. package/dist/svelte-DFFWgqCr.mjs.map +1 -0
  536. package/dist/swift-Ci7klDIa.mjs +5 -0
  537. package/dist/swift-Ci7klDIa.mjs.map +1 -0
  538. package/dist/synthwave-84-T5fF9-Op.mjs +6 -0
  539. package/dist/synthwave-84-T5fF9-Op.mjs.map +1 -0
  540. package/dist/system-verilog-tLSd9PYh.mjs +5 -0
  541. package/dist/system-verilog-tLSd9PYh.mjs.map +1 -0
  542. package/dist/systemd-C_LIvN4y.mjs +5 -0
  543. package/dist/systemd-C_LIvN4y.mjs.map +1 -0
  544. package/dist/talonscript-2cIfb9F4.mjs +5 -0
  545. package/dist/talonscript-2cIfb9F4.mjs.map +1 -0
  546. package/dist/tasl-iwLzpKVu.mjs +5 -0
  547. package/dist/tasl-iwLzpKVu.mjs.map +1 -0
  548. package/dist/tcl-DR2zhegR.mjs +5 -0
  549. package/dist/tcl-DR2zhegR.mjs.map +1 -0
  550. package/dist/templ-BDCp727o.mjs +15 -0
  551. package/dist/templ-BDCp727o.mjs.map +1 -0
  552. package/dist/terraform-BH4YC6Zk.mjs +5 -0
  553. package/dist/terraform-BH4YC6Zk.mjs.map +1 -0
  554. package/dist/tex-DGRDr7pd.mjs +8 -0
  555. package/dist/tex-DGRDr7pd.mjs.map +1 -0
  556. package/dist/tokyo-night-YpyXNs_N.mjs +6 -0
  557. package/dist/tokyo-night-YpyXNs_N.mjs.map +1 -0
  558. package/dist/toml-CECsyL8x.mjs +5 -0
  559. package/dist/toml-CECsyL8x.mjs.map +1 -0
  560. package/dist/ts-tags-BsG9I5cd.mjs +61 -0
  561. package/dist/ts-tags-BsG9I5cd.mjs.map +1 -0
  562. package/dist/tsv-BwwAUdIn.mjs +5 -0
  563. package/dist/tsv-BwwAUdIn.mjs.map +1 -0
  564. package/dist/tsx-qx39NaGS.mjs +8 -0
  565. package/dist/tsx-qx39NaGS.mjs.map +1 -0
  566. package/dist/turtle-D8n7HFvE.mjs +5 -0
  567. package/dist/turtle-D8n7HFvE.mjs.map +1 -0
  568. package/dist/twig-DsMUiWk8.mjs +21 -0
  569. package/dist/twig-DsMUiWk8.mjs.map +1 -0
  570. package/dist/typescript-BZXFn-rd.mjs +8 -0
  571. package/dist/typescript-BZXFn-rd.mjs.map +1 -0
  572. package/dist/typespec-ClgDzShT.mjs +5 -0
  573. package/dist/typespec-ClgDzShT.mjs.map +1 -0
  574. package/dist/typst-CMN2lhh3.mjs +5 -0
  575. package/dist/typst-CMN2lhh3.mjs.map +1 -0
  576. package/dist/v-CA1cYsER.mjs +5 -0
  577. package/dist/v-CA1cYsER.mjs.map +1 -0
  578. package/dist/vala-DuBY1WKl.mjs +5 -0
  579. package/dist/vala-DuBY1WKl.mjs.map +1 -0
  580. package/dist/vb-XQBHWfW8.mjs +5 -0
  581. package/dist/vb-XQBHWfW8.mjs.map +1 -0
  582. package/dist/verilog-CWqhvrSz.mjs +5 -0
  583. package/dist/verilog-CWqhvrSz.mjs.map +1 -0
  584. package/dist/vesper-CigfTEKg.mjs +6 -0
  585. package/dist/vesper-CigfTEKg.mjs.map +1 -0
  586. package/dist/vhdl-C67Bhzjr.mjs +5 -0
  587. package/dist/vhdl-C67Bhzjr.mjs.map +1 -0
  588. package/dist/viml-C26cD_wa.mjs +5 -0
  589. package/dist/viml-C26cD_wa.mjs.map +1 -0
  590. package/dist/vitesse-black-DYCj3nJd.mjs +6 -0
  591. package/dist/vitesse-black-DYCj3nJd.mjs.map +1 -0
  592. package/dist/vitesse-dark-BMGIMsRz.mjs +6 -0
  593. package/dist/vitesse-dark-BMGIMsRz.mjs.map +1 -0
  594. package/dist/vitesse-light-SKJOp9ZR.mjs +6 -0
  595. package/dist/vitesse-light-SKJOp9ZR.mjs.map +1 -0
  596. package/dist/vue-bb5YUHg6.mjs +33 -0
  597. package/dist/vue-bb5YUHg6.mjs.map +1 -0
  598. package/dist/vue-html-ypB-H6rb.mjs +8 -0
  599. package/dist/vue-html-ypB-H6rb.mjs.map +1 -0
  600. package/dist/vue-vine-Cl_j-Bb5.mjs +21 -0
  601. package/dist/vue-vine-Cl_j-Bb5.mjs.map +1 -0
  602. package/dist/vyper-gBkdcGC5.mjs +5 -0
  603. package/dist/vyper-gBkdcGC5.mjs.map +1 -0
  604. package/dist/wasm-B1KmdQo5.mjs +9 -0
  605. package/dist/wasm-B1KmdQo5.mjs.map +1 -0
  606. package/dist/wasm-D4mFcPzE.mjs +5 -0
  607. package/dist/wasm-D4mFcPzE.mjs.map +1 -0
  608. package/dist/wenyan-D1TI9OZw.mjs +5 -0
  609. package/dist/wenyan-D1TI9OZw.mjs.map +1 -0
  610. package/dist/wgsl-DzVADIua.mjs +5 -0
  611. package/dist/wgsl-DzVADIua.mjs.map +1 -0
  612. package/dist/wikitext-DPnM1XoL.mjs +5 -0
  613. package/dist/wikitext-DPnM1XoL.mjs.map +1 -0
  614. package/dist/wit-Bewokpy8.mjs +5 -0
  615. package/dist/wit-Bewokpy8.mjs.map +1 -0
  616. package/dist/wolfram-DVQXO29Z.mjs +5 -0
  617. package/dist/wolfram-DVQXO29Z.mjs.map +1 -0
  618. package/dist/xml-TYYGqgP3.mjs +10 -0
  619. package/dist/xml-TYYGqgP3.mjs.map +1 -0
  620. package/dist/xsl-BOev1i40.mjs +8 -0
  621. package/dist/xsl-BOev1i40.mjs.map +1 -0
  622. package/dist/yaml-Xue9e-YO.mjs +8 -0
  623. package/dist/yaml-Xue9e-YO.mjs.map +1 -0
  624. package/dist/zenscript-CwrU69w6.mjs +5 -0
  625. package/dist/zenscript-CwrU69w6.mjs.map +1 -0
  626. package/dist/zig-NT9tMYQ2.mjs +5 -0
  627. package/dist/zig-NT9tMYQ2.mjs.map +1 -0
  628. package/package.json +78 -0
  629. package/theme/components/DocFooter.tsx +59 -0
  630. package/theme/components/DocHeader.tsx +72 -0
  631. package/theme/components/DocSidebar.tsx +90 -0
  632. package/theme/components/DocTOC.tsx +25 -0
  633. package/theme/components/Html.tsx +107 -0
  634. package/theme/layouts/DocHome.tsx +212 -0
  635. package/theme/layouts/DocNotFound.tsx +55 -0
  636. package/theme/layouts/DocPage.tsx +74 -0
  637. package/theme/runtime/main.ts +16 -0
  638. package/theme/runtime/search.ts +65 -0
  639. package/theme/runtime/sidebar.ts +135 -0
  640. package/theme/runtime/toc-highlight.ts +73 -0
  641. package/theme/styles/code/inline.css +26 -0
  642. package/theme/styles/components/not-found.css +85 -0
  643. package/theme/styles/components/search.css +300 -0
  644. package/theme/styles/content/alerts.css +87 -0
  645. package/theme/styles/content/prose.css +225 -0
  646. package/theme/styles/content/toc.css +90 -0
  647. package/theme/styles/foundations/fonts.css +37 -0
  648. package/theme/styles/foundations/reset.css +49 -0
  649. package/theme/styles/foundations/tokens.css +66 -0
  650. package/theme/styles/layout/footer.css +119 -0
  651. package/theme/styles/layout/grid.css +98 -0
  652. package/theme/styles/layout/header.css +153 -0
  653. package/theme/styles/layout/home.css +449 -0
  654. package/theme/styles/layout/sidebar.css +239 -0
  655. package/theme/styles/main.css +19 -0
@@ -0,0 +1,3881 @@
1
+ Object.freeze({ status: "aborted" });
2
+ function $constructor(name, initializer, params) {
3
+ function init(inst, def) {
4
+ if (!inst._zod) Object.defineProperty(inst, "_zod", {
5
+ value: {
6
+ def,
7
+ constr: _,
8
+ traits: /* @__PURE__ */ new Set()
9
+ },
10
+ enumerable: false
11
+ });
12
+ if (inst._zod.traits.has(name)) return;
13
+ inst._zod.traits.add(name);
14
+ initializer(inst, def);
15
+ const proto = _.prototype;
16
+ const keys = Object.keys(proto);
17
+ for (let i = 0; i < keys.length; i++) {
18
+ const k = keys[i];
19
+ if (!(k in inst)) inst[k] = proto[k].bind(inst);
20
+ }
21
+ }
22
+ const Parent = params?.Parent ?? Object;
23
+ class Definition extends Parent {}
24
+ Object.defineProperty(Definition, "name", { value: name });
25
+ function _(def) {
26
+ var _a;
27
+ const inst = params?.Parent ? new Definition() : this;
28
+ init(inst, def);
29
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
30
+ for (const fn of inst._zod.deferred) fn();
31
+ return inst;
32
+ }
33
+ Object.defineProperty(_, "init", { value: init });
34
+ Object.defineProperty(_, Symbol.hasInstance, { value: (inst) => {
35
+ if (params?.Parent && inst instanceof params.Parent) return true;
36
+ return inst?._zod?.traits?.has(name);
37
+ } });
38
+ Object.defineProperty(_, "name", { value: name });
39
+ return _;
40
+ }
41
+ var $ZodAsyncError = class extends Error {
42
+ constructor() {
43
+ super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`);
44
+ }
45
+ };
46
+ var $ZodEncodeError = class extends Error {
47
+ constructor(name) {
48
+ super(`Encountered unidirectional transform during encode: ${name}`);
49
+ this.name = "ZodEncodeError";
50
+ }
51
+ };
52
+ const globalConfig = {};
53
+ function config(newConfig) {
54
+ if (newConfig) Object.assign(globalConfig, newConfig);
55
+ return globalConfig;
56
+ }
57
+ //#endregion
58
+ //#region ../../node_modules/zod/v4/core/util.js
59
+ function getEnumValues(entries) {
60
+ const numericValues = Object.values(entries).filter((v) => typeof v === "number");
61
+ return Object.entries(entries).filter(([k, _]) => numericValues.indexOf(+k) === -1).map(([_, v]) => v);
62
+ }
63
+ function jsonStringifyReplacer(_, value) {
64
+ if (typeof value === "bigint") return value.toString();
65
+ return value;
66
+ }
67
+ function cached(getter) {
68
+ return { get value() {
69
+ {
70
+ const value = getter();
71
+ Object.defineProperty(this, "value", { value });
72
+ return value;
73
+ }
74
+ throw new Error("cached value already set");
75
+ } };
76
+ }
77
+ function nullish(input) {
78
+ return input === null || input === void 0;
79
+ }
80
+ function cleanRegex(source) {
81
+ const start = source.startsWith("^") ? 1 : 0;
82
+ const end = source.endsWith("$") ? source.length - 1 : source.length;
83
+ return source.slice(start, end);
84
+ }
85
+ function floatSafeRemainder(val, step) {
86
+ const valDecCount = (val.toString().split(".")[1] || "").length;
87
+ const stepString = step.toString();
88
+ let stepDecCount = (stepString.split(".")[1] || "").length;
89
+ if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
90
+ const match = stepString.match(/\d?e-(\d?)/);
91
+ if (match?.[1]) stepDecCount = Number.parseInt(match[1]);
92
+ }
93
+ const decCount = valDecCount > stepDecCount ? valDecCount : stepDecCount;
94
+ return Number.parseInt(val.toFixed(decCount).replace(".", "")) % Number.parseInt(step.toFixed(decCount).replace(".", "")) / 10 ** decCount;
95
+ }
96
+ const EVALUATING = Symbol("evaluating");
97
+ function defineLazy(object, key, getter) {
98
+ let value = void 0;
99
+ Object.defineProperty(object, key, {
100
+ get() {
101
+ if (value === EVALUATING) return;
102
+ if (value === void 0) {
103
+ value = EVALUATING;
104
+ value = getter();
105
+ }
106
+ return value;
107
+ },
108
+ set(v) {
109
+ Object.defineProperty(object, key, { value: v });
110
+ },
111
+ configurable: true
112
+ });
113
+ }
114
+ function assignProp(target, prop, value) {
115
+ Object.defineProperty(target, prop, {
116
+ value,
117
+ writable: true,
118
+ enumerable: true,
119
+ configurable: true
120
+ });
121
+ }
122
+ function mergeDefs(...defs) {
123
+ const mergedDescriptors = {};
124
+ for (const def of defs) Object.assign(mergedDescriptors, Object.getOwnPropertyDescriptors(def));
125
+ return Object.defineProperties({}, mergedDescriptors);
126
+ }
127
+ function esc(str) {
128
+ return JSON.stringify(str);
129
+ }
130
+ function slugify(input) {
131
+ return input.toLowerCase().trim().replace(/[^\w\s-]/g, "").replace(/[\s_-]+/g, "-").replace(/^-+|-+$/g, "");
132
+ }
133
+ const captureStackTrace = "captureStackTrace" in Error ? Error.captureStackTrace : (..._args) => {};
134
+ function isObject(data) {
135
+ return typeof data === "object" && data !== null && !Array.isArray(data);
136
+ }
137
+ const allowsEval = cached(() => {
138
+ if (typeof navigator !== "undefined" && navigator?.userAgent?.includes("Cloudflare")) return false;
139
+ try {
140
+ new Function("");
141
+ return true;
142
+ } catch (_) {
143
+ return false;
144
+ }
145
+ });
146
+ function isPlainObject(o) {
147
+ if (isObject(o) === false) return false;
148
+ const ctor = o.constructor;
149
+ if (ctor === void 0) return true;
150
+ if (typeof ctor !== "function") return true;
151
+ const prot = ctor.prototype;
152
+ if (isObject(prot) === false) return false;
153
+ if (Object.prototype.hasOwnProperty.call(prot, "isPrototypeOf") === false) return false;
154
+ return true;
155
+ }
156
+ function shallowClone(o) {
157
+ if (isPlainObject(o)) return { ...o };
158
+ if (Array.isArray(o)) return [...o];
159
+ return o;
160
+ }
161
+ const propertyKeyTypes = new Set([
162
+ "string",
163
+ "number",
164
+ "symbol"
165
+ ]);
166
+ function escapeRegex(str) {
167
+ return str.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
168
+ }
169
+ function clone(inst, def, params) {
170
+ const cl = new inst._zod.constr(def ?? inst._zod.def);
171
+ if (!def || params?.parent) cl._zod.parent = inst;
172
+ return cl;
173
+ }
174
+ function normalizeParams(_params) {
175
+ const params = _params;
176
+ if (!params) return {};
177
+ if (typeof params === "string") return { error: () => params };
178
+ if (params?.message !== void 0) {
179
+ if (params?.error !== void 0) throw new Error("Cannot specify both `message` and `error` params");
180
+ params.error = params.message;
181
+ }
182
+ delete params.message;
183
+ if (typeof params.error === "string") return {
184
+ ...params,
185
+ error: () => params.error
186
+ };
187
+ return params;
188
+ }
189
+ function optionalKeys(shape) {
190
+ return Object.keys(shape).filter((k) => {
191
+ return shape[k]._zod.optin === "optional" && shape[k]._zod.optout === "optional";
192
+ });
193
+ }
194
+ const NUMBER_FORMAT_RANGES = {
195
+ safeint: [Number.MIN_SAFE_INTEGER, Number.MAX_SAFE_INTEGER],
196
+ int32: [-2147483648, 2147483647],
197
+ uint32: [0, 4294967295],
198
+ float32: [-34028234663852886e22, 34028234663852886e22],
199
+ float64: [-Number.MAX_VALUE, Number.MAX_VALUE]
200
+ };
201
+ function pick(schema, mask) {
202
+ const currDef = schema._zod.def;
203
+ const checks = currDef.checks;
204
+ if (checks && checks.length > 0) throw new Error(".pick() cannot be used on object schemas containing refinements");
205
+ return clone(schema, mergeDefs(schema._zod.def, {
206
+ get shape() {
207
+ const newShape = {};
208
+ for (const key in mask) {
209
+ if (!(key in currDef.shape)) throw new Error(`Unrecognized key: "${key}"`);
210
+ if (!mask[key]) continue;
211
+ newShape[key] = currDef.shape[key];
212
+ }
213
+ assignProp(this, "shape", newShape);
214
+ return newShape;
215
+ },
216
+ checks: []
217
+ }));
218
+ }
219
+ function omit(schema, mask) {
220
+ const currDef = schema._zod.def;
221
+ const checks = currDef.checks;
222
+ if (checks && checks.length > 0) throw new Error(".omit() cannot be used on object schemas containing refinements");
223
+ return clone(schema, mergeDefs(schema._zod.def, {
224
+ get shape() {
225
+ const newShape = { ...schema._zod.def.shape };
226
+ for (const key in mask) {
227
+ if (!(key in currDef.shape)) throw new Error(`Unrecognized key: "${key}"`);
228
+ if (!mask[key]) continue;
229
+ delete newShape[key];
230
+ }
231
+ assignProp(this, "shape", newShape);
232
+ return newShape;
233
+ },
234
+ checks: []
235
+ }));
236
+ }
237
+ function extend(schema, shape) {
238
+ if (!isPlainObject(shape)) throw new Error("Invalid input to extend: expected a plain object");
239
+ const checks = schema._zod.def.checks;
240
+ if (checks && checks.length > 0) {
241
+ const existingShape = schema._zod.def.shape;
242
+ for (const key in shape) if (Object.getOwnPropertyDescriptor(existingShape, key) !== void 0) throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
243
+ }
244
+ return clone(schema, mergeDefs(schema._zod.def, { get shape() {
245
+ const _shape = {
246
+ ...schema._zod.def.shape,
247
+ ...shape
248
+ };
249
+ assignProp(this, "shape", _shape);
250
+ return _shape;
251
+ } }));
252
+ }
253
+ function safeExtend(schema, shape) {
254
+ if (!isPlainObject(shape)) throw new Error("Invalid input to safeExtend: expected a plain object");
255
+ return clone(schema, mergeDefs(schema._zod.def, { get shape() {
256
+ const _shape = {
257
+ ...schema._zod.def.shape,
258
+ ...shape
259
+ };
260
+ assignProp(this, "shape", _shape);
261
+ return _shape;
262
+ } }));
263
+ }
264
+ function merge(a, b) {
265
+ return clone(a, mergeDefs(a._zod.def, {
266
+ get shape() {
267
+ const _shape = {
268
+ ...a._zod.def.shape,
269
+ ...b._zod.def.shape
270
+ };
271
+ assignProp(this, "shape", _shape);
272
+ return _shape;
273
+ },
274
+ get catchall() {
275
+ return b._zod.def.catchall;
276
+ },
277
+ checks: []
278
+ }));
279
+ }
280
+ function partial(Class, schema, mask) {
281
+ const checks = schema._zod.def.checks;
282
+ if (checks && checks.length > 0) throw new Error(".partial() cannot be used on object schemas containing refinements");
283
+ return clone(schema, mergeDefs(schema._zod.def, {
284
+ get shape() {
285
+ const oldShape = schema._zod.def.shape;
286
+ const shape = { ...oldShape };
287
+ if (mask) for (const key in mask) {
288
+ if (!(key in oldShape)) throw new Error(`Unrecognized key: "${key}"`);
289
+ if (!mask[key]) continue;
290
+ shape[key] = Class ? new Class({
291
+ type: "optional",
292
+ innerType: oldShape[key]
293
+ }) : oldShape[key];
294
+ }
295
+ else for (const key in oldShape) shape[key] = Class ? new Class({
296
+ type: "optional",
297
+ innerType: oldShape[key]
298
+ }) : oldShape[key];
299
+ assignProp(this, "shape", shape);
300
+ return shape;
301
+ },
302
+ checks: []
303
+ }));
304
+ }
305
+ function required(Class, schema, mask) {
306
+ return clone(schema, mergeDefs(schema._zod.def, { get shape() {
307
+ const oldShape = schema._zod.def.shape;
308
+ const shape = { ...oldShape };
309
+ if (mask) for (const key in mask) {
310
+ if (!(key in shape)) throw new Error(`Unrecognized key: "${key}"`);
311
+ if (!mask[key]) continue;
312
+ shape[key] = new Class({
313
+ type: "nonoptional",
314
+ innerType: oldShape[key]
315
+ });
316
+ }
317
+ else for (const key in oldShape) shape[key] = new Class({
318
+ type: "nonoptional",
319
+ innerType: oldShape[key]
320
+ });
321
+ assignProp(this, "shape", shape);
322
+ return shape;
323
+ } }));
324
+ }
325
+ function aborted(x, startIndex = 0) {
326
+ if (x.aborted === true) return true;
327
+ for (let i = startIndex; i < x.issues.length; i++) if (x.issues[i]?.continue !== true) return true;
328
+ return false;
329
+ }
330
+ function prefixIssues(path, issues) {
331
+ return issues.map((iss) => {
332
+ var _a;
333
+ (_a = iss).path ?? (_a.path = []);
334
+ iss.path.unshift(path);
335
+ return iss;
336
+ });
337
+ }
338
+ function unwrapMessage(message) {
339
+ return typeof message === "string" ? message : message?.message;
340
+ }
341
+ function finalizeIssue(iss, ctx, config) {
342
+ const full = {
343
+ ...iss,
344
+ path: iss.path ?? []
345
+ };
346
+ if (!iss.message) full.message = unwrapMessage(iss.inst?._zod.def?.error?.(iss)) ?? unwrapMessage(ctx?.error?.(iss)) ?? unwrapMessage(config.customError?.(iss)) ?? unwrapMessage(config.localeError?.(iss)) ?? "Invalid input";
347
+ delete full.inst;
348
+ delete full.continue;
349
+ if (!ctx?.reportInput) delete full.input;
350
+ return full;
351
+ }
352
+ function getLengthableOrigin(input) {
353
+ if (Array.isArray(input)) return "array";
354
+ if (typeof input === "string") return "string";
355
+ return "unknown";
356
+ }
357
+ function issue(...args) {
358
+ const [iss, input, inst] = args;
359
+ if (typeof iss === "string") return {
360
+ message: iss,
361
+ code: "custom",
362
+ input,
363
+ inst
364
+ };
365
+ return { ...iss };
366
+ }
367
+ //#endregion
368
+ //#region ../../node_modules/zod/v4/core/errors.js
369
+ const initializer$1 = (inst, def) => {
370
+ inst.name = "$ZodError";
371
+ Object.defineProperty(inst, "_zod", {
372
+ value: inst._zod,
373
+ enumerable: false
374
+ });
375
+ Object.defineProperty(inst, "issues", {
376
+ value: def,
377
+ enumerable: false
378
+ });
379
+ inst.message = JSON.stringify(def, jsonStringifyReplacer, 2);
380
+ Object.defineProperty(inst, "toString", {
381
+ value: () => inst.message,
382
+ enumerable: false
383
+ });
384
+ };
385
+ const $ZodError = $constructor("$ZodError", initializer$1);
386
+ const $ZodRealError = $constructor("$ZodError", initializer$1, { Parent: Error });
387
+ function flattenError(error, mapper = (issue) => issue.message) {
388
+ const fieldErrors = {};
389
+ const formErrors = [];
390
+ for (const sub of error.issues) if (sub.path.length > 0) {
391
+ fieldErrors[sub.path[0]] = fieldErrors[sub.path[0]] || [];
392
+ fieldErrors[sub.path[0]].push(mapper(sub));
393
+ } else formErrors.push(mapper(sub));
394
+ return {
395
+ formErrors,
396
+ fieldErrors
397
+ };
398
+ }
399
+ function formatError(error, mapper = (issue) => issue.message) {
400
+ const fieldErrors = { _errors: [] };
401
+ const processError = (error) => {
402
+ for (const issue of error.issues) if (issue.code === "invalid_union" && issue.errors.length) issue.errors.map((issues) => processError({ issues }));
403
+ else if (issue.code === "invalid_key") processError({ issues: issue.issues });
404
+ else if (issue.code === "invalid_element") processError({ issues: issue.issues });
405
+ else if (issue.path.length === 0) fieldErrors._errors.push(mapper(issue));
406
+ else {
407
+ let curr = fieldErrors;
408
+ let i = 0;
409
+ while (i < issue.path.length) {
410
+ const el = issue.path[i];
411
+ if (!(i === issue.path.length - 1)) curr[el] = curr[el] || { _errors: [] };
412
+ else {
413
+ curr[el] = curr[el] || { _errors: [] };
414
+ curr[el]._errors.push(mapper(issue));
415
+ }
416
+ curr = curr[el];
417
+ i++;
418
+ }
419
+ }
420
+ };
421
+ processError(error);
422
+ return fieldErrors;
423
+ }
424
+ //#endregion
425
+ //#region ../../node_modules/zod/v4/core/parse.js
426
+ const _parse = (_Err) => (schema, value, _ctx, _params) => {
427
+ const ctx = _ctx ? Object.assign(_ctx, { async: false }) : { async: false };
428
+ const result = schema._zod.run({
429
+ value,
430
+ issues: []
431
+ }, ctx);
432
+ if (result instanceof Promise) throw new $ZodAsyncError();
433
+ if (result.issues.length) {
434
+ const e = new (_params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
435
+ captureStackTrace(e, _params?.callee);
436
+ throw e;
437
+ }
438
+ return result.value;
439
+ };
440
+ const _parseAsync = (_Err) => async (schema, value, _ctx, params) => {
441
+ const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
442
+ let result = schema._zod.run({
443
+ value,
444
+ issues: []
445
+ }, ctx);
446
+ if (result instanceof Promise) result = await result;
447
+ if (result.issues.length) {
448
+ const e = new (params?.Err ?? _Err)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
449
+ captureStackTrace(e, params?.callee);
450
+ throw e;
451
+ }
452
+ return result.value;
453
+ };
454
+ const _safeParse = (_Err) => (schema, value, _ctx) => {
455
+ const ctx = _ctx ? {
456
+ ..._ctx,
457
+ async: false
458
+ } : { async: false };
459
+ const result = schema._zod.run({
460
+ value,
461
+ issues: []
462
+ }, ctx);
463
+ if (result instanceof Promise) throw new $ZodAsyncError();
464
+ return result.issues.length ? {
465
+ success: false,
466
+ error: new (_Err ?? $ZodError)(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
467
+ } : {
468
+ success: true,
469
+ data: result.value
470
+ };
471
+ };
472
+ const safeParse$1 = /* @__PURE__ */ _safeParse($ZodRealError);
473
+ const _safeParseAsync = (_Err) => async (schema, value, _ctx) => {
474
+ const ctx = _ctx ? Object.assign(_ctx, { async: true }) : { async: true };
475
+ let result = schema._zod.run({
476
+ value,
477
+ issues: []
478
+ }, ctx);
479
+ if (result instanceof Promise) result = await result;
480
+ return result.issues.length ? {
481
+ success: false,
482
+ error: new _Err(result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
483
+ } : {
484
+ success: true,
485
+ data: result.value
486
+ };
487
+ };
488
+ const safeParseAsync$1 = /* @__PURE__ */ _safeParseAsync($ZodRealError);
489
+ const _encode = (_Err) => (schema, value, _ctx) => {
490
+ const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
491
+ return _parse(_Err)(schema, value, ctx);
492
+ };
493
+ const _decode = (_Err) => (schema, value, _ctx) => {
494
+ return _parse(_Err)(schema, value, _ctx);
495
+ };
496
+ const _encodeAsync = (_Err) => async (schema, value, _ctx) => {
497
+ const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
498
+ return _parseAsync(_Err)(schema, value, ctx);
499
+ };
500
+ const _decodeAsync = (_Err) => async (schema, value, _ctx) => {
501
+ return _parseAsync(_Err)(schema, value, _ctx);
502
+ };
503
+ const _safeEncode = (_Err) => (schema, value, _ctx) => {
504
+ const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
505
+ return _safeParse(_Err)(schema, value, ctx);
506
+ };
507
+ const _safeDecode = (_Err) => (schema, value, _ctx) => {
508
+ return _safeParse(_Err)(schema, value, _ctx);
509
+ };
510
+ const _safeEncodeAsync = (_Err) => async (schema, value, _ctx) => {
511
+ const ctx = _ctx ? Object.assign(_ctx, { direction: "backward" }) : { direction: "backward" };
512
+ return _safeParseAsync(_Err)(schema, value, ctx);
513
+ };
514
+ const _safeDecodeAsync = (_Err) => async (schema, value, _ctx) => {
515
+ return _safeParseAsync(_Err)(schema, value, _ctx);
516
+ };
517
+ //#endregion
518
+ //#region ../../node_modules/zod/v4/core/regexes.js
519
+ const cuid = /^[cC][^\s-]{8,}$/;
520
+ const cuid2 = /^[0-9a-z]+$/;
521
+ const ulid = /^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/;
522
+ const xid = /^[0-9a-vA-V]{20}$/;
523
+ const ksuid = /^[A-Za-z0-9]{27}$/;
524
+ const nanoid = /^[a-zA-Z0-9_-]{21}$/;
525
+ /** ISO 8601-1 duration regex. Does not support the 8601-2 extensions like negative durations or fractional/negative components. */
526
+ const duration$1 = /^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/;
527
+ /** A regex for any UUID-like identifier: 8-4-4-4-12 hex pattern */
528
+ const guid = /^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/;
529
+ /** Returns a regex for validating an RFC 9562/4122 UUID.
530
+ *
531
+ * @param version Optionally specify a version 1-8. If no version is specified, all versions are supported. */
532
+ const uuid = (version) => {
533
+ 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)$/;
534
+ 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})$`);
535
+ };
536
+ /** Practical email validation */
537
+ const email = /^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/;
538
+ const _emoji$1 = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
539
+ function emoji() {
540
+ return new RegExp(_emoji$1, "u");
541
+ }
542
+ const ipv4 = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
543
+ const ipv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/;
544
+ const cidrv4 = /^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/;
545
+ const cidrv6 = /^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
546
+ const base64 = /^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/;
547
+ const base64url = /^[A-Za-z0-9_-]*$/;
548
+ const e164 = /^\+[1-9]\d{6,14}$/;
549
+ const dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
550
+ const date$1 = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
551
+ function timeSource(args) {
552
+ const hhmm = `(?:[01]\\d|2[0-3]):[0-5]\\d`;
553
+ return typeof args.precision === "number" ? args.precision === -1 ? `${hhmm}` : args.precision === 0 ? `${hhmm}:[0-5]\\d` : `${hhmm}:[0-5]\\d\\.\\d{${args.precision}}` : `${hhmm}(?::[0-5]\\d(?:\\.\\d+)?)?`;
554
+ }
555
+ function time$1(args) {
556
+ return new RegExp(`^${timeSource(args)}$`);
557
+ }
558
+ function datetime$1(args) {
559
+ const time = timeSource({ precision: args.precision });
560
+ const opts = ["Z"];
561
+ if (args.local) opts.push("");
562
+ if (args.offset) opts.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);
563
+ const timeRegex = `${time}(?:${opts.join("|")})`;
564
+ return new RegExp(`^${dateSource}T(?:${timeRegex})$`);
565
+ }
566
+ const string$1 = (params) => {
567
+ const regex = params ? `[\\s\\S]{${params?.minimum ?? 0},${params?.maximum ?? ""}}` : `[\\s\\S]*`;
568
+ return new RegExp(`^${regex}$`);
569
+ };
570
+ const integer = /^-?\d+$/;
571
+ const number$1 = /^-?\d+(?:\.\d+)?$/;
572
+ const boolean$1 = /^(?:true|false)$/i;
573
+ const lowercase = /^[^A-Z]*$/;
574
+ const uppercase = /^[^a-z]*$/;
575
+ //#endregion
576
+ //#region ../../node_modules/zod/v4/core/checks.js
577
+ const $ZodCheck = /* @__PURE__ */ $constructor("$ZodCheck", (inst, def) => {
578
+ var _a;
579
+ inst._zod ?? (inst._zod = {});
580
+ inst._zod.def = def;
581
+ (_a = inst._zod).onattach ?? (_a.onattach = []);
582
+ });
583
+ const numericOriginMap = {
584
+ number: "number",
585
+ bigint: "bigint",
586
+ object: "date"
587
+ };
588
+ const $ZodCheckLessThan = /* @__PURE__ */ $constructor("$ZodCheckLessThan", (inst, def) => {
589
+ $ZodCheck.init(inst, def);
590
+ const origin = numericOriginMap[typeof def.value];
591
+ inst._zod.onattach.push((inst) => {
592
+ const bag = inst._zod.bag;
593
+ const curr = (def.inclusive ? bag.maximum : bag.exclusiveMaximum) ?? Number.POSITIVE_INFINITY;
594
+ if (def.value < curr) if (def.inclusive) bag.maximum = def.value;
595
+ else bag.exclusiveMaximum = def.value;
596
+ });
597
+ inst._zod.check = (payload) => {
598
+ if (def.inclusive ? payload.value <= def.value : payload.value < def.value) return;
599
+ payload.issues.push({
600
+ origin,
601
+ code: "too_big",
602
+ maximum: typeof def.value === "object" ? def.value.getTime() : def.value,
603
+ input: payload.value,
604
+ inclusive: def.inclusive,
605
+ inst,
606
+ continue: !def.abort
607
+ });
608
+ };
609
+ });
610
+ const $ZodCheckGreaterThan = /* @__PURE__ */ $constructor("$ZodCheckGreaterThan", (inst, def) => {
611
+ $ZodCheck.init(inst, def);
612
+ const origin = numericOriginMap[typeof def.value];
613
+ inst._zod.onattach.push((inst) => {
614
+ const bag = inst._zod.bag;
615
+ const curr = (def.inclusive ? bag.minimum : bag.exclusiveMinimum) ?? Number.NEGATIVE_INFINITY;
616
+ if (def.value > curr) if (def.inclusive) bag.minimum = def.value;
617
+ else bag.exclusiveMinimum = def.value;
618
+ });
619
+ inst._zod.check = (payload) => {
620
+ if (def.inclusive ? payload.value >= def.value : payload.value > def.value) return;
621
+ payload.issues.push({
622
+ origin,
623
+ code: "too_small",
624
+ minimum: typeof def.value === "object" ? def.value.getTime() : def.value,
625
+ input: payload.value,
626
+ inclusive: def.inclusive,
627
+ inst,
628
+ continue: !def.abort
629
+ });
630
+ };
631
+ });
632
+ const $ZodCheckMultipleOf = /* @__PURE__ */ $constructor("$ZodCheckMultipleOf", (inst, def) => {
633
+ $ZodCheck.init(inst, def);
634
+ inst._zod.onattach.push((inst) => {
635
+ var _a;
636
+ (_a = inst._zod.bag).multipleOf ?? (_a.multipleOf = def.value);
637
+ });
638
+ inst._zod.check = (payload) => {
639
+ if (typeof payload.value !== typeof def.value) throw new Error("Cannot mix number and bigint in multiple_of check.");
640
+ if (typeof payload.value === "bigint" ? payload.value % def.value === BigInt(0) : floatSafeRemainder(payload.value, def.value) === 0) return;
641
+ payload.issues.push({
642
+ origin: typeof payload.value,
643
+ code: "not_multiple_of",
644
+ divisor: def.value,
645
+ input: payload.value,
646
+ inst,
647
+ continue: !def.abort
648
+ });
649
+ };
650
+ });
651
+ const $ZodCheckNumberFormat = /* @__PURE__ */ $constructor("$ZodCheckNumberFormat", (inst, def) => {
652
+ $ZodCheck.init(inst, def);
653
+ def.format = def.format || "float64";
654
+ const isInt = def.format?.includes("int");
655
+ const origin = isInt ? "int" : "number";
656
+ const [minimum, maximum] = NUMBER_FORMAT_RANGES[def.format];
657
+ inst._zod.onattach.push((inst) => {
658
+ const bag = inst._zod.bag;
659
+ bag.format = def.format;
660
+ bag.minimum = minimum;
661
+ bag.maximum = maximum;
662
+ if (isInt) bag.pattern = integer;
663
+ });
664
+ inst._zod.check = (payload) => {
665
+ const input = payload.value;
666
+ if (isInt) {
667
+ if (!Number.isInteger(input)) {
668
+ payload.issues.push({
669
+ expected: origin,
670
+ format: def.format,
671
+ code: "invalid_type",
672
+ continue: false,
673
+ input,
674
+ inst
675
+ });
676
+ return;
677
+ }
678
+ if (!Number.isSafeInteger(input)) {
679
+ if (input > 0) payload.issues.push({
680
+ input,
681
+ code: "too_big",
682
+ maximum: Number.MAX_SAFE_INTEGER,
683
+ note: "Integers must be within the safe integer range.",
684
+ inst,
685
+ origin,
686
+ inclusive: true,
687
+ continue: !def.abort
688
+ });
689
+ else payload.issues.push({
690
+ input,
691
+ code: "too_small",
692
+ minimum: Number.MIN_SAFE_INTEGER,
693
+ note: "Integers must be within the safe integer range.",
694
+ inst,
695
+ origin,
696
+ inclusive: true,
697
+ continue: !def.abort
698
+ });
699
+ return;
700
+ }
701
+ }
702
+ if (input < minimum) payload.issues.push({
703
+ origin: "number",
704
+ input,
705
+ code: "too_small",
706
+ minimum,
707
+ inclusive: true,
708
+ inst,
709
+ continue: !def.abort
710
+ });
711
+ if (input > maximum) payload.issues.push({
712
+ origin: "number",
713
+ input,
714
+ code: "too_big",
715
+ maximum,
716
+ inclusive: true,
717
+ inst,
718
+ continue: !def.abort
719
+ });
720
+ };
721
+ });
722
+ const $ZodCheckMaxLength = /* @__PURE__ */ $constructor("$ZodCheckMaxLength", (inst, def) => {
723
+ var _a;
724
+ $ZodCheck.init(inst, def);
725
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
726
+ const val = payload.value;
727
+ return !nullish(val) && val.length !== void 0;
728
+ });
729
+ inst._zod.onattach.push((inst) => {
730
+ const curr = inst._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
731
+ if (def.maximum < curr) inst._zod.bag.maximum = def.maximum;
732
+ });
733
+ inst._zod.check = (payload) => {
734
+ const input = payload.value;
735
+ if (input.length <= def.maximum) return;
736
+ const origin = getLengthableOrigin(input);
737
+ payload.issues.push({
738
+ origin,
739
+ code: "too_big",
740
+ maximum: def.maximum,
741
+ inclusive: true,
742
+ input,
743
+ inst,
744
+ continue: !def.abort
745
+ });
746
+ };
747
+ });
748
+ const $ZodCheckMinLength = /* @__PURE__ */ $constructor("$ZodCheckMinLength", (inst, def) => {
749
+ var _a;
750
+ $ZodCheck.init(inst, def);
751
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
752
+ const val = payload.value;
753
+ return !nullish(val) && val.length !== void 0;
754
+ });
755
+ inst._zod.onattach.push((inst) => {
756
+ const curr = inst._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
757
+ if (def.minimum > curr) inst._zod.bag.minimum = def.minimum;
758
+ });
759
+ inst._zod.check = (payload) => {
760
+ const input = payload.value;
761
+ if (input.length >= def.minimum) return;
762
+ const origin = getLengthableOrigin(input);
763
+ payload.issues.push({
764
+ origin,
765
+ code: "too_small",
766
+ minimum: def.minimum,
767
+ inclusive: true,
768
+ input,
769
+ inst,
770
+ continue: !def.abort
771
+ });
772
+ };
773
+ });
774
+ const $ZodCheckLengthEquals = /* @__PURE__ */ $constructor("$ZodCheckLengthEquals", (inst, def) => {
775
+ var _a;
776
+ $ZodCheck.init(inst, def);
777
+ (_a = inst._zod.def).when ?? (_a.when = (payload) => {
778
+ const val = payload.value;
779
+ return !nullish(val) && val.length !== void 0;
780
+ });
781
+ inst._zod.onattach.push((inst) => {
782
+ const bag = inst._zod.bag;
783
+ bag.minimum = def.length;
784
+ bag.maximum = def.length;
785
+ bag.length = def.length;
786
+ });
787
+ inst._zod.check = (payload) => {
788
+ const input = payload.value;
789
+ const length = input.length;
790
+ if (length === def.length) return;
791
+ const origin = getLengthableOrigin(input);
792
+ const tooBig = length > def.length;
793
+ payload.issues.push({
794
+ origin,
795
+ ...tooBig ? {
796
+ code: "too_big",
797
+ maximum: def.length
798
+ } : {
799
+ code: "too_small",
800
+ minimum: def.length
801
+ },
802
+ inclusive: true,
803
+ exact: true,
804
+ input: payload.value,
805
+ inst,
806
+ continue: !def.abort
807
+ });
808
+ };
809
+ });
810
+ const $ZodCheckStringFormat = /* @__PURE__ */ $constructor("$ZodCheckStringFormat", (inst, def) => {
811
+ var _a, _b;
812
+ $ZodCheck.init(inst, def);
813
+ inst._zod.onattach.push((inst) => {
814
+ const bag = inst._zod.bag;
815
+ bag.format = def.format;
816
+ if (def.pattern) {
817
+ bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
818
+ bag.patterns.add(def.pattern);
819
+ }
820
+ });
821
+ if (def.pattern) (_a = inst._zod).check ?? (_a.check = (payload) => {
822
+ def.pattern.lastIndex = 0;
823
+ if (def.pattern.test(payload.value)) return;
824
+ payload.issues.push({
825
+ origin: "string",
826
+ code: "invalid_format",
827
+ format: def.format,
828
+ input: payload.value,
829
+ ...def.pattern ? { pattern: def.pattern.toString() } : {},
830
+ inst,
831
+ continue: !def.abort
832
+ });
833
+ });
834
+ else (_b = inst._zod).check ?? (_b.check = () => {});
835
+ });
836
+ const $ZodCheckRegex = /* @__PURE__ */ $constructor("$ZodCheckRegex", (inst, def) => {
837
+ $ZodCheckStringFormat.init(inst, def);
838
+ inst._zod.check = (payload) => {
839
+ def.pattern.lastIndex = 0;
840
+ if (def.pattern.test(payload.value)) return;
841
+ payload.issues.push({
842
+ origin: "string",
843
+ code: "invalid_format",
844
+ format: "regex",
845
+ input: payload.value,
846
+ pattern: def.pattern.toString(),
847
+ inst,
848
+ continue: !def.abort
849
+ });
850
+ };
851
+ });
852
+ const $ZodCheckLowerCase = /* @__PURE__ */ $constructor("$ZodCheckLowerCase", (inst, def) => {
853
+ def.pattern ?? (def.pattern = lowercase);
854
+ $ZodCheckStringFormat.init(inst, def);
855
+ });
856
+ const $ZodCheckUpperCase = /* @__PURE__ */ $constructor("$ZodCheckUpperCase", (inst, def) => {
857
+ def.pattern ?? (def.pattern = uppercase);
858
+ $ZodCheckStringFormat.init(inst, def);
859
+ });
860
+ const $ZodCheckIncludes = /* @__PURE__ */ $constructor("$ZodCheckIncludes", (inst, def) => {
861
+ $ZodCheck.init(inst, def);
862
+ const escapedRegex = escapeRegex(def.includes);
863
+ const pattern = new RegExp(typeof def.position === "number" ? `^.{${def.position}}${escapedRegex}` : escapedRegex);
864
+ def.pattern = pattern;
865
+ inst._zod.onattach.push((inst) => {
866
+ const bag = inst._zod.bag;
867
+ bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
868
+ bag.patterns.add(pattern);
869
+ });
870
+ inst._zod.check = (payload) => {
871
+ if (payload.value.includes(def.includes, def.position)) return;
872
+ payload.issues.push({
873
+ origin: "string",
874
+ code: "invalid_format",
875
+ format: "includes",
876
+ includes: def.includes,
877
+ input: payload.value,
878
+ inst,
879
+ continue: !def.abort
880
+ });
881
+ };
882
+ });
883
+ const $ZodCheckStartsWith = /* @__PURE__ */ $constructor("$ZodCheckStartsWith", (inst, def) => {
884
+ $ZodCheck.init(inst, def);
885
+ const pattern = new RegExp(`^${escapeRegex(def.prefix)}.*`);
886
+ def.pattern ?? (def.pattern = pattern);
887
+ inst._zod.onattach.push((inst) => {
888
+ const bag = inst._zod.bag;
889
+ bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
890
+ bag.patterns.add(pattern);
891
+ });
892
+ inst._zod.check = (payload) => {
893
+ if (payload.value.startsWith(def.prefix)) return;
894
+ payload.issues.push({
895
+ origin: "string",
896
+ code: "invalid_format",
897
+ format: "starts_with",
898
+ prefix: def.prefix,
899
+ input: payload.value,
900
+ inst,
901
+ continue: !def.abort
902
+ });
903
+ };
904
+ });
905
+ const $ZodCheckEndsWith = /* @__PURE__ */ $constructor("$ZodCheckEndsWith", (inst, def) => {
906
+ $ZodCheck.init(inst, def);
907
+ const pattern = new RegExp(`.*${escapeRegex(def.suffix)}$`);
908
+ def.pattern ?? (def.pattern = pattern);
909
+ inst._zod.onattach.push((inst) => {
910
+ const bag = inst._zod.bag;
911
+ bag.patterns ?? (bag.patterns = /* @__PURE__ */ new Set());
912
+ bag.patterns.add(pattern);
913
+ });
914
+ inst._zod.check = (payload) => {
915
+ if (payload.value.endsWith(def.suffix)) return;
916
+ payload.issues.push({
917
+ origin: "string",
918
+ code: "invalid_format",
919
+ format: "ends_with",
920
+ suffix: def.suffix,
921
+ input: payload.value,
922
+ inst,
923
+ continue: !def.abort
924
+ });
925
+ };
926
+ });
927
+ const $ZodCheckOverwrite = /* @__PURE__ */ $constructor("$ZodCheckOverwrite", (inst, def) => {
928
+ $ZodCheck.init(inst, def);
929
+ inst._zod.check = (payload) => {
930
+ payload.value = def.tx(payload.value);
931
+ };
932
+ });
933
+ //#endregion
934
+ //#region ../../node_modules/zod/v4/core/doc.js
935
+ var Doc = class {
936
+ constructor(args = []) {
937
+ this.content = [];
938
+ this.indent = 0;
939
+ if (this) this.args = args;
940
+ }
941
+ indented(fn) {
942
+ this.indent += 1;
943
+ fn(this);
944
+ this.indent -= 1;
945
+ }
946
+ write(arg) {
947
+ if (typeof arg === "function") {
948
+ arg(this, { execution: "sync" });
949
+ arg(this, { execution: "async" });
950
+ return;
951
+ }
952
+ const lines = arg.split("\n").filter((x) => x);
953
+ const minIndent = Math.min(...lines.map((x) => x.length - x.trimStart().length));
954
+ const dedented = lines.map((x) => x.slice(minIndent)).map((x) => " ".repeat(this.indent * 2) + x);
955
+ for (const line of dedented) this.content.push(line);
956
+ }
957
+ compile() {
958
+ const F = Function;
959
+ const args = this?.args;
960
+ const lines = [...(this?.content ?? [``]).map((x) => ` ${x}`)];
961
+ return new F(...args, lines.join("\n"));
962
+ }
963
+ };
964
+ //#endregion
965
+ //#region ../../node_modules/zod/v4/core/versions.js
966
+ const version = {
967
+ major: 4,
968
+ minor: 3,
969
+ patch: 6
970
+ };
971
+ //#endregion
972
+ //#region ../../node_modules/zod/v4/core/schemas.js
973
+ const $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
974
+ var _a;
975
+ inst ?? (inst = {});
976
+ inst._zod.def = def;
977
+ inst._zod.bag = inst._zod.bag || {};
978
+ inst._zod.version = version;
979
+ const checks = [...inst._zod.def.checks ?? []];
980
+ if (inst._zod.traits.has("$ZodCheck")) checks.unshift(inst);
981
+ for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
982
+ if (checks.length === 0) {
983
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
984
+ inst._zod.deferred?.push(() => {
985
+ inst._zod.run = inst._zod.parse;
986
+ });
987
+ } else {
988
+ const runChecks = (payload, checks, ctx) => {
989
+ let isAborted = aborted(payload);
990
+ let asyncResult;
991
+ for (const ch of checks) {
992
+ if (ch._zod.def.when) {
993
+ if (!ch._zod.def.when(payload)) continue;
994
+ } else if (isAborted) continue;
995
+ const currLen = payload.issues.length;
996
+ const _ = ch._zod.check(payload);
997
+ if (_ instanceof Promise && ctx?.async === false) throw new $ZodAsyncError();
998
+ if (asyncResult || _ instanceof Promise) asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
999
+ await _;
1000
+ if (payload.issues.length === currLen) return;
1001
+ if (!isAborted) isAborted = aborted(payload, currLen);
1002
+ });
1003
+ else {
1004
+ if (payload.issues.length === currLen) continue;
1005
+ if (!isAborted) isAborted = aborted(payload, currLen);
1006
+ }
1007
+ }
1008
+ if (asyncResult) return asyncResult.then(() => {
1009
+ return payload;
1010
+ });
1011
+ return payload;
1012
+ };
1013
+ const handleCanaryResult = (canary, payload, ctx) => {
1014
+ if (aborted(canary)) {
1015
+ canary.aborted = true;
1016
+ return canary;
1017
+ }
1018
+ const checkResult = runChecks(payload, checks, ctx);
1019
+ if (checkResult instanceof Promise) {
1020
+ if (ctx.async === false) throw new $ZodAsyncError();
1021
+ return checkResult.then((checkResult) => inst._zod.parse(checkResult, ctx));
1022
+ }
1023
+ return inst._zod.parse(checkResult, ctx);
1024
+ };
1025
+ inst._zod.run = (payload, ctx) => {
1026
+ if (ctx.skipChecks) return inst._zod.parse(payload, ctx);
1027
+ if (ctx.direction === "backward") {
1028
+ const canary = inst._zod.parse({
1029
+ value: payload.value,
1030
+ issues: []
1031
+ }, {
1032
+ ...ctx,
1033
+ skipChecks: true
1034
+ });
1035
+ if (canary instanceof Promise) return canary.then((canary) => {
1036
+ return handleCanaryResult(canary, payload, ctx);
1037
+ });
1038
+ return handleCanaryResult(canary, payload, ctx);
1039
+ }
1040
+ const result = inst._zod.parse(payload, ctx);
1041
+ if (result instanceof Promise) {
1042
+ if (ctx.async === false) throw new $ZodAsyncError();
1043
+ return result.then((result) => runChecks(result, checks, ctx));
1044
+ }
1045
+ return runChecks(result, checks, ctx);
1046
+ };
1047
+ }
1048
+ defineLazy(inst, "~standard", () => ({
1049
+ validate: (value) => {
1050
+ try {
1051
+ const r = safeParse$1(inst, value);
1052
+ return r.success ? { value: r.data } : { issues: r.error?.issues };
1053
+ } catch (_) {
1054
+ return safeParseAsync$1(inst, value).then((r) => r.success ? { value: r.data } : { issues: r.error?.issues });
1055
+ }
1056
+ },
1057
+ vendor: "zod",
1058
+ version: 1
1059
+ }));
1060
+ });
1061
+ const $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
1062
+ $ZodType.init(inst, def);
1063
+ inst._zod.pattern = [...inst?._zod.bag?.patterns ?? []].pop() ?? string$1(inst._zod.bag);
1064
+ inst._zod.parse = (payload, _) => {
1065
+ if (def.coerce) try {
1066
+ payload.value = String(payload.value);
1067
+ } catch (_) {}
1068
+ if (typeof payload.value === "string") return payload;
1069
+ payload.issues.push({
1070
+ expected: "string",
1071
+ code: "invalid_type",
1072
+ input: payload.value,
1073
+ inst
1074
+ });
1075
+ return payload;
1076
+ };
1077
+ });
1078
+ const $ZodStringFormat = /* @__PURE__ */ $constructor("$ZodStringFormat", (inst, def) => {
1079
+ $ZodCheckStringFormat.init(inst, def);
1080
+ $ZodString.init(inst, def);
1081
+ });
1082
+ const $ZodGUID = /* @__PURE__ */ $constructor("$ZodGUID", (inst, def) => {
1083
+ def.pattern ?? (def.pattern = guid);
1084
+ $ZodStringFormat.init(inst, def);
1085
+ });
1086
+ const $ZodUUID = /* @__PURE__ */ $constructor("$ZodUUID", (inst, def) => {
1087
+ if (def.version) {
1088
+ const v = {
1089
+ v1: 1,
1090
+ v2: 2,
1091
+ v3: 3,
1092
+ v4: 4,
1093
+ v5: 5,
1094
+ v6: 6,
1095
+ v7: 7,
1096
+ v8: 8
1097
+ }[def.version];
1098
+ if (v === void 0) throw new Error(`Invalid UUID version: "${def.version}"`);
1099
+ def.pattern ?? (def.pattern = uuid(v));
1100
+ } else def.pattern ?? (def.pattern = uuid());
1101
+ $ZodStringFormat.init(inst, def);
1102
+ });
1103
+ const $ZodEmail = /* @__PURE__ */ $constructor("$ZodEmail", (inst, def) => {
1104
+ def.pattern ?? (def.pattern = email);
1105
+ $ZodStringFormat.init(inst, def);
1106
+ });
1107
+ const $ZodURL = /* @__PURE__ */ $constructor("$ZodURL", (inst, def) => {
1108
+ $ZodStringFormat.init(inst, def);
1109
+ inst._zod.check = (payload) => {
1110
+ try {
1111
+ const trimmed = payload.value.trim();
1112
+ const url = new URL(trimmed);
1113
+ if (def.hostname) {
1114
+ def.hostname.lastIndex = 0;
1115
+ if (!def.hostname.test(url.hostname)) payload.issues.push({
1116
+ code: "invalid_format",
1117
+ format: "url",
1118
+ note: "Invalid hostname",
1119
+ pattern: def.hostname.source,
1120
+ input: payload.value,
1121
+ inst,
1122
+ continue: !def.abort
1123
+ });
1124
+ }
1125
+ if (def.protocol) {
1126
+ def.protocol.lastIndex = 0;
1127
+ if (!def.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) payload.issues.push({
1128
+ code: "invalid_format",
1129
+ format: "url",
1130
+ note: "Invalid protocol",
1131
+ pattern: def.protocol.source,
1132
+ input: payload.value,
1133
+ inst,
1134
+ continue: !def.abort
1135
+ });
1136
+ }
1137
+ if (def.normalize) payload.value = url.href;
1138
+ else payload.value = trimmed;
1139
+ return;
1140
+ } catch (_) {
1141
+ payload.issues.push({
1142
+ code: "invalid_format",
1143
+ format: "url",
1144
+ input: payload.value,
1145
+ inst,
1146
+ continue: !def.abort
1147
+ });
1148
+ }
1149
+ };
1150
+ });
1151
+ const $ZodEmoji = /* @__PURE__ */ $constructor("$ZodEmoji", (inst, def) => {
1152
+ def.pattern ?? (def.pattern = emoji());
1153
+ $ZodStringFormat.init(inst, def);
1154
+ });
1155
+ const $ZodNanoID = /* @__PURE__ */ $constructor("$ZodNanoID", (inst, def) => {
1156
+ def.pattern ?? (def.pattern = nanoid);
1157
+ $ZodStringFormat.init(inst, def);
1158
+ });
1159
+ const $ZodCUID = /* @__PURE__ */ $constructor("$ZodCUID", (inst, def) => {
1160
+ def.pattern ?? (def.pattern = cuid);
1161
+ $ZodStringFormat.init(inst, def);
1162
+ });
1163
+ const $ZodCUID2 = /* @__PURE__ */ $constructor("$ZodCUID2", (inst, def) => {
1164
+ def.pattern ?? (def.pattern = cuid2);
1165
+ $ZodStringFormat.init(inst, def);
1166
+ });
1167
+ const $ZodULID = /* @__PURE__ */ $constructor("$ZodULID", (inst, def) => {
1168
+ def.pattern ?? (def.pattern = ulid);
1169
+ $ZodStringFormat.init(inst, def);
1170
+ });
1171
+ const $ZodXID = /* @__PURE__ */ $constructor("$ZodXID", (inst, def) => {
1172
+ def.pattern ?? (def.pattern = xid);
1173
+ $ZodStringFormat.init(inst, def);
1174
+ });
1175
+ const $ZodKSUID = /* @__PURE__ */ $constructor("$ZodKSUID", (inst, def) => {
1176
+ def.pattern ?? (def.pattern = ksuid);
1177
+ $ZodStringFormat.init(inst, def);
1178
+ });
1179
+ const $ZodISODateTime = /* @__PURE__ */ $constructor("$ZodISODateTime", (inst, def) => {
1180
+ def.pattern ?? (def.pattern = datetime$1(def));
1181
+ $ZodStringFormat.init(inst, def);
1182
+ });
1183
+ const $ZodISODate = /* @__PURE__ */ $constructor("$ZodISODate", (inst, def) => {
1184
+ def.pattern ?? (def.pattern = date$1);
1185
+ $ZodStringFormat.init(inst, def);
1186
+ });
1187
+ const $ZodISOTime = /* @__PURE__ */ $constructor("$ZodISOTime", (inst, def) => {
1188
+ def.pattern ?? (def.pattern = time$1(def));
1189
+ $ZodStringFormat.init(inst, def);
1190
+ });
1191
+ const $ZodISODuration = /* @__PURE__ */ $constructor("$ZodISODuration", (inst, def) => {
1192
+ def.pattern ?? (def.pattern = duration$1);
1193
+ $ZodStringFormat.init(inst, def);
1194
+ });
1195
+ const $ZodIPv4 = /* @__PURE__ */ $constructor("$ZodIPv4", (inst, def) => {
1196
+ def.pattern ?? (def.pattern = ipv4);
1197
+ $ZodStringFormat.init(inst, def);
1198
+ inst._zod.bag.format = `ipv4`;
1199
+ });
1200
+ const $ZodIPv6 = /* @__PURE__ */ $constructor("$ZodIPv6", (inst, def) => {
1201
+ def.pattern ?? (def.pattern = ipv6);
1202
+ $ZodStringFormat.init(inst, def);
1203
+ inst._zod.bag.format = `ipv6`;
1204
+ inst._zod.check = (payload) => {
1205
+ try {
1206
+ new URL(`http://[${payload.value}]`);
1207
+ } catch {
1208
+ payload.issues.push({
1209
+ code: "invalid_format",
1210
+ format: "ipv6",
1211
+ input: payload.value,
1212
+ inst,
1213
+ continue: !def.abort
1214
+ });
1215
+ }
1216
+ };
1217
+ });
1218
+ const $ZodCIDRv4 = /* @__PURE__ */ $constructor("$ZodCIDRv4", (inst, def) => {
1219
+ def.pattern ?? (def.pattern = cidrv4);
1220
+ $ZodStringFormat.init(inst, def);
1221
+ });
1222
+ const $ZodCIDRv6 = /* @__PURE__ */ $constructor("$ZodCIDRv6", (inst, def) => {
1223
+ def.pattern ?? (def.pattern = cidrv6);
1224
+ $ZodStringFormat.init(inst, def);
1225
+ inst._zod.check = (payload) => {
1226
+ const parts = payload.value.split("/");
1227
+ try {
1228
+ if (parts.length !== 2) throw new Error();
1229
+ const [address, prefix] = parts;
1230
+ if (!prefix) throw new Error();
1231
+ const prefixNum = Number(prefix);
1232
+ if (`${prefixNum}` !== prefix) throw new Error();
1233
+ if (prefixNum < 0 || prefixNum > 128) throw new Error();
1234
+ new URL(`http://[${address}]`);
1235
+ } catch {
1236
+ payload.issues.push({
1237
+ code: "invalid_format",
1238
+ format: "cidrv6",
1239
+ input: payload.value,
1240
+ inst,
1241
+ continue: !def.abort
1242
+ });
1243
+ }
1244
+ };
1245
+ });
1246
+ function isValidBase64(data) {
1247
+ if (data === "") return true;
1248
+ if (data.length % 4 !== 0) return false;
1249
+ try {
1250
+ atob(data);
1251
+ return true;
1252
+ } catch {
1253
+ return false;
1254
+ }
1255
+ }
1256
+ const $ZodBase64 = /* @__PURE__ */ $constructor("$ZodBase64", (inst, def) => {
1257
+ def.pattern ?? (def.pattern = base64);
1258
+ $ZodStringFormat.init(inst, def);
1259
+ inst._zod.bag.contentEncoding = "base64";
1260
+ inst._zod.check = (payload) => {
1261
+ if (isValidBase64(payload.value)) return;
1262
+ payload.issues.push({
1263
+ code: "invalid_format",
1264
+ format: "base64",
1265
+ input: payload.value,
1266
+ inst,
1267
+ continue: !def.abort
1268
+ });
1269
+ };
1270
+ });
1271
+ function isValidBase64URL(data) {
1272
+ if (!base64url.test(data)) return false;
1273
+ const base64 = data.replace(/[-_]/g, (c) => c === "-" ? "+" : "/");
1274
+ return isValidBase64(base64.padEnd(Math.ceil(base64.length / 4) * 4, "="));
1275
+ }
1276
+ const $ZodBase64URL = /* @__PURE__ */ $constructor("$ZodBase64URL", (inst, def) => {
1277
+ def.pattern ?? (def.pattern = base64url);
1278
+ $ZodStringFormat.init(inst, def);
1279
+ inst._zod.bag.contentEncoding = "base64url";
1280
+ inst._zod.check = (payload) => {
1281
+ if (isValidBase64URL(payload.value)) return;
1282
+ payload.issues.push({
1283
+ code: "invalid_format",
1284
+ format: "base64url",
1285
+ input: payload.value,
1286
+ inst,
1287
+ continue: !def.abort
1288
+ });
1289
+ };
1290
+ });
1291
+ const $ZodE164 = /* @__PURE__ */ $constructor("$ZodE164", (inst, def) => {
1292
+ def.pattern ?? (def.pattern = e164);
1293
+ $ZodStringFormat.init(inst, def);
1294
+ });
1295
+ function isValidJWT(token, algorithm = null) {
1296
+ try {
1297
+ const tokensParts = token.split(".");
1298
+ if (tokensParts.length !== 3) return false;
1299
+ const [header] = tokensParts;
1300
+ if (!header) return false;
1301
+ const parsedHeader = JSON.parse(atob(header));
1302
+ if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT") return false;
1303
+ if (!parsedHeader.alg) return false;
1304
+ if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm)) return false;
1305
+ return true;
1306
+ } catch {
1307
+ return false;
1308
+ }
1309
+ }
1310
+ const $ZodJWT = /* @__PURE__ */ $constructor("$ZodJWT", (inst, def) => {
1311
+ $ZodStringFormat.init(inst, def);
1312
+ inst._zod.check = (payload) => {
1313
+ if (isValidJWT(payload.value, def.alg)) return;
1314
+ payload.issues.push({
1315
+ code: "invalid_format",
1316
+ format: "jwt",
1317
+ input: payload.value,
1318
+ inst,
1319
+ continue: !def.abort
1320
+ });
1321
+ };
1322
+ });
1323
+ const $ZodNumber = /* @__PURE__ */ $constructor("$ZodNumber", (inst, def) => {
1324
+ $ZodType.init(inst, def);
1325
+ inst._zod.pattern = inst._zod.bag.pattern ?? number$1;
1326
+ inst._zod.parse = (payload, _ctx) => {
1327
+ if (def.coerce) try {
1328
+ payload.value = Number(payload.value);
1329
+ } catch (_) {}
1330
+ const input = payload.value;
1331
+ if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) return payload;
1332
+ const received = typeof input === "number" ? Number.isNaN(input) ? "NaN" : !Number.isFinite(input) ? "Infinity" : void 0 : void 0;
1333
+ payload.issues.push({
1334
+ expected: "number",
1335
+ code: "invalid_type",
1336
+ input,
1337
+ inst,
1338
+ ...received ? { received } : {}
1339
+ });
1340
+ return payload;
1341
+ };
1342
+ });
1343
+ const $ZodNumberFormat = /* @__PURE__ */ $constructor("$ZodNumberFormat", (inst, def) => {
1344
+ $ZodCheckNumberFormat.init(inst, def);
1345
+ $ZodNumber.init(inst, def);
1346
+ });
1347
+ const $ZodBoolean = /* @__PURE__ */ $constructor("$ZodBoolean", (inst, def) => {
1348
+ $ZodType.init(inst, def);
1349
+ inst._zod.pattern = boolean$1;
1350
+ inst._zod.parse = (payload, _ctx) => {
1351
+ if (def.coerce) try {
1352
+ payload.value = Boolean(payload.value);
1353
+ } catch (_) {}
1354
+ const input = payload.value;
1355
+ if (typeof input === "boolean") return payload;
1356
+ payload.issues.push({
1357
+ expected: "boolean",
1358
+ code: "invalid_type",
1359
+ input,
1360
+ inst
1361
+ });
1362
+ return payload;
1363
+ };
1364
+ });
1365
+ const $ZodAny = /* @__PURE__ */ $constructor("$ZodAny", (inst, def) => {
1366
+ $ZodType.init(inst, def);
1367
+ inst._zod.parse = (payload) => payload;
1368
+ });
1369
+ const $ZodUnknown = /* @__PURE__ */ $constructor("$ZodUnknown", (inst, def) => {
1370
+ $ZodType.init(inst, def);
1371
+ inst._zod.parse = (payload) => payload;
1372
+ });
1373
+ const $ZodNever = /* @__PURE__ */ $constructor("$ZodNever", (inst, def) => {
1374
+ $ZodType.init(inst, def);
1375
+ inst._zod.parse = (payload, _ctx) => {
1376
+ payload.issues.push({
1377
+ expected: "never",
1378
+ code: "invalid_type",
1379
+ input: payload.value,
1380
+ inst
1381
+ });
1382
+ return payload;
1383
+ };
1384
+ });
1385
+ const $ZodDate = /* @__PURE__ */ $constructor("$ZodDate", (inst, def) => {
1386
+ $ZodType.init(inst, def);
1387
+ inst._zod.parse = (payload, _ctx) => {
1388
+ if (def.coerce) try {
1389
+ payload.value = new Date(payload.value);
1390
+ } catch (_err) {}
1391
+ const input = payload.value;
1392
+ const isDate = input instanceof Date;
1393
+ if (isDate && !Number.isNaN(input.getTime())) return payload;
1394
+ payload.issues.push({
1395
+ expected: "date",
1396
+ code: "invalid_type",
1397
+ input,
1398
+ ...isDate ? { received: "Invalid Date" } : {},
1399
+ inst
1400
+ });
1401
+ return payload;
1402
+ };
1403
+ });
1404
+ function handleArrayResult(result, final, index) {
1405
+ if (result.issues.length) final.issues.push(...prefixIssues(index, result.issues));
1406
+ final.value[index] = result.value;
1407
+ }
1408
+ const $ZodArray = /* @__PURE__ */ $constructor("$ZodArray", (inst, def) => {
1409
+ $ZodType.init(inst, def);
1410
+ inst._zod.parse = (payload, ctx) => {
1411
+ const input = payload.value;
1412
+ if (!Array.isArray(input)) {
1413
+ payload.issues.push({
1414
+ expected: "array",
1415
+ code: "invalid_type",
1416
+ input,
1417
+ inst
1418
+ });
1419
+ return payload;
1420
+ }
1421
+ payload.value = Array(input.length);
1422
+ const proms = [];
1423
+ for (let i = 0; i < input.length; i++) {
1424
+ const item = input[i];
1425
+ const result = def.element._zod.run({
1426
+ value: item,
1427
+ issues: []
1428
+ }, ctx);
1429
+ if (result instanceof Promise) proms.push(result.then((result) => handleArrayResult(result, payload, i)));
1430
+ else handleArrayResult(result, payload, i);
1431
+ }
1432
+ if (proms.length) return Promise.all(proms).then(() => payload);
1433
+ return payload;
1434
+ };
1435
+ });
1436
+ function handlePropertyResult(result, final, key, input, isOptionalOut) {
1437
+ if (result.issues.length) {
1438
+ if (isOptionalOut && !(key in input)) return;
1439
+ final.issues.push(...prefixIssues(key, result.issues));
1440
+ }
1441
+ if (result.value === void 0) {
1442
+ if (key in input) final.value[key] = void 0;
1443
+ } else final.value[key] = result.value;
1444
+ }
1445
+ function normalizeDef(def) {
1446
+ const keys = Object.keys(def.shape);
1447
+ for (const k of keys) if (!def.shape?.[k]?._zod?.traits?.has("$ZodType")) throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
1448
+ const okeys = optionalKeys(def.shape);
1449
+ return {
1450
+ ...def,
1451
+ keys,
1452
+ keySet: new Set(keys),
1453
+ numKeys: keys.length,
1454
+ optionalKeys: new Set(okeys)
1455
+ };
1456
+ }
1457
+ function handleCatchall(proms, input, payload, ctx, def, inst) {
1458
+ const unrecognized = [];
1459
+ const keySet = def.keySet;
1460
+ const _catchall = def.catchall._zod;
1461
+ const t = _catchall.def.type;
1462
+ const isOptionalOut = _catchall.optout === "optional";
1463
+ for (const key in input) {
1464
+ if (keySet.has(key)) continue;
1465
+ if (t === "never") {
1466
+ unrecognized.push(key);
1467
+ continue;
1468
+ }
1469
+ const r = _catchall.run({
1470
+ value: input[key],
1471
+ issues: []
1472
+ }, ctx);
1473
+ if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));
1474
+ else handlePropertyResult(r, payload, key, input, isOptionalOut);
1475
+ }
1476
+ if (unrecognized.length) payload.issues.push({
1477
+ code: "unrecognized_keys",
1478
+ keys: unrecognized,
1479
+ input,
1480
+ inst
1481
+ });
1482
+ if (!proms.length) return payload;
1483
+ return Promise.all(proms).then(() => {
1484
+ return payload;
1485
+ });
1486
+ }
1487
+ const $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
1488
+ $ZodType.init(inst, def);
1489
+ if (!Object.getOwnPropertyDescriptor(def, "shape")?.get) {
1490
+ const sh = def.shape;
1491
+ Object.defineProperty(def, "shape", { get: () => {
1492
+ const newSh = { ...sh };
1493
+ Object.defineProperty(def, "shape", { value: newSh });
1494
+ return newSh;
1495
+ } });
1496
+ }
1497
+ const _normalized = cached(() => normalizeDef(def));
1498
+ defineLazy(inst._zod, "propValues", () => {
1499
+ const shape = def.shape;
1500
+ const propValues = {};
1501
+ for (const key in shape) {
1502
+ const field = shape[key]._zod;
1503
+ if (field.values) {
1504
+ propValues[key] ?? (propValues[key] = /* @__PURE__ */ new Set());
1505
+ for (const v of field.values) propValues[key].add(v);
1506
+ }
1507
+ }
1508
+ return propValues;
1509
+ });
1510
+ const isObject$2 = isObject;
1511
+ const catchall = def.catchall;
1512
+ let value;
1513
+ inst._zod.parse = (payload, ctx) => {
1514
+ value ?? (value = _normalized.value);
1515
+ const input = payload.value;
1516
+ if (!isObject$2(input)) {
1517
+ payload.issues.push({
1518
+ expected: "object",
1519
+ code: "invalid_type",
1520
+ input,
1521
+ inst
1522
+ });
1523
+ return payload;
1524
+ }
1525
+ payload.value = {};
1526
+ const proms = [];
1527
+ const shape = value.shape;
1528
+ for (const key of value.keys) {
1529
+ const el = shape[key];
1530
+ const isOptionalOut = el._zod.optout === "optional";
1531
+ const r = el._zod.run({
1532
+ value: input[key],
1533
+ issues: []
1534
+ }, ctx);
1535
+ if (r instanceof Promise) proms.push(r.then((r) => handlePropertyResult(r, payload, key, input, isOptionalOut)));
1536
+ else handlePropertyResult(r, payload, key, input, isOptionalOut);
1537
+ }
1538
+ if (!catchall) return proms.length ? Promise.all(proms).then(() => payload) : payload;
1539
+ return handleCatchall(proms, input, payload, ctx, _normalized.value, inst);
1540
+ };
1541
+ });
1542
+ const $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) => {
1543
+ $ZodObject.init(inst, def);
1544
+ const superParse = inst._zod.parse;
1545
+ const _normalized = cached(() => normalizeDef(def));
1546
+ const generateFastpass = (shape) => {
1547
+ const doc = new Doc([
1548
+ "shape",
1549
+ "payload",
1550
+ "ctx"
1551
+ ]);
1552
+ const normalized = _normalized.value;
1553
+ const parseStr = (key) => {
1554
+ const k = esc(key);
1555
+ return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
1556
+ };
1557
+ doc.write(`const input = payload.value;`);
1558
+ const ids = Object.create(null);
1559
+ let counter = 0;
1560
+ for (const key of normalized.keys) ids[key] = `key_${counter++}`;
1561
+ doc.write(`const newResult = {};`);
1562
+ for (const key of normalized.keys) {
1563
+ const id = ids[key];
1564
+ const k = esc(key);
1565
+ const isOptionalOut = shape[key]?._zod?.optout === "optional";
1566
+ doc.write(`const ${id} = ${parseStr(key)};`);
1567
+ if (isOptionalOut) doc.write(`
1568
+ if (${id}.issues.length) {
1569
+ if (${k} in input) {
1570
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
1571
+ ...iss,
1572
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
1573
+ })));
1574
+ }
1575
+ }
1576
+
1577
+ if (${id}.value === undefined) {
1578
+ if (${k} in input) {
1579
+ newResult[${k}] = undefined;
1580
+ }
1581
+ } else {
1582
+ newResult[${k}] = ${id}.value;
1583
+ }
1584
+
1585
+ `);
1586
+ else doc.write(`
1587
+ if (${id}.issues.length) {
1588
+ payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
1589
+ ...iss,
1590
+ path: iss.path ? [${k}, ...iss.path] : [${k}]
1591
+ })));
1592
+ }
1593
+
1594
+ if (${id}.value === undefined) {
1595
+ if (${k} in input) {
1596
+ newResult[${k}] = undefined;
1597
+ }
1598
+ } else {
1599
+ newResult[${k}] = ${id}.value;
1600
+ }
1601
+
1602
+ `);
1603
+ }
1604
+ doc.write(`payload.value = newResult;`);
1605
+ doc.write(`return payload;`);
1606
+ const fn = doc.compile();
1607
+ return (payload, ctx) => fn(shape, payload, ctx);
1608
+ };
1609
+ let fastpass;
1610
+ const isObject$1 = isObject;
1611
+ const jit = !globalConfig.jitless;
1612
+ const fastEnabled = jit && allowsEval.value;
1613
+ const catchall = def.catchall;
1614
+ let value;
1615
+ inst._zod.parse = (payload, ctx) => {
1616
+ value ?? (value = _normalized.value);
1617
+ const input = payload.value;
1618
+ if (!isObject$1(input)) {
1619
+ payload.issues.push({
1620
+ expected: "object",
1621
+ code: "invalid_type",
1622
+ input,
1623
+ inst
1624
+ });
1625
+ return payload;
1626
+ }
1627
+ if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
1628
+ if (!fastpass) fastpass = generateFastpass(def.shape);
1629
+ payload = fastpass(payload, ctx);
1630
+ if (!catchall) return payload;
1631
+ return handleCatchall([], input, payload, ctx, value, inst);
1632
+ }
1633
+ return superParse(payload, ctx);
1634
+ };
1635
+ });
1636
+ function handleUnionResults(results, final, inst, ctx) {
1637
+ for (const result of results) if (result.issues.length === 0) {
1638
+ final.value = result.value;
1639
+ return final;
1640
+ }
1641
+ const nonaborted = results.filter((r) => !aborted(r));
1642
+ if (nonaborted.length === 1) {
1643
+ final.value = nonaborted[0].value;
1644
+ return nonaborted[0];
1645
+ }
1646
+ final.issues.push({
1647
+ code: "invalid_union",
1648
+ input: final.value,
1649
+ inst,
1650
+ errors: results.map((result) => result.issues.map((iss) => finalizeIssue(iss, ctx, config())))
1651
+ });
1652
+ return final;
1653
+ }
1654
+ const $ZodUnion = /* @__PURE__ */ $constructor("$ZodUnion", (inst, def) => {
1655
+ $ZodType.init(inst, def);
1656
+ defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0);
1657
+ defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0);
1658
+ defineLazy(inst._zod, "values", () => {
1659
+ if (def.options.every((o) => o._zod.values)) return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
1660
+ });
1661
+ defineLazy(inst._zod, "pattern", () => {
1662
+ if (def.options.every((o) => o._zod.pattern)) {
1663
+ const patterns = def.options.map((o) => o._zod.pattern);
1664
+ return new RegExp(`^(${patterns.map((p) => cleanRegex(p.source)).join("|")})$`);
1665
+ }
1666
+ });
1667
+ const single = def.options.length === 1;
1668
+ const first = def.options[0]._zod.run;
1669
+ inst._zod.parse = (payload, ctx) => {
1670
+ if (single) return first(payload, ctx);
1671
+ let async = false;
1672
+ const results = [];
1673
+ for (const option of def.options) {
1674
+ const result = option._zod.run({
1675
+ value: payload.value,
1676
+ issues: []
1677
+ }, ctx);
1678
+ if (result instanceof Promise) {
1679
+ results.push(result);
1680
+ async = true;
1681
+ } else {
1682
+ if (result.issues.length === 0) return result;
1683
+ results.push(result);
1684
+ }
1685
+ }
1686
+ if (!async) return handleUnionResults(results, payload, inst, ctx);
1687
+ return Promise.all(results).then((results) => {
1688
+ return handleUnionResults(results, payload, inst, ctx);
1689
+ });
1690
+ };
1691
+ });
1692
+ const $ZodIntersection = /* @__PURE__ */ $constructor("$ZodIntersection", (inst, def) => {
1693
+ $ZodType.init(inst, def);
1694
+ inst._zod.parse = (payload, ctx) => {
1695
+ const input = payload.value;
1696
+ const left = def.left._zod.run({
1697
+ value: input,
1698
+ issues: []
1699
+ }, ctx);
1700
+ const right = def.right._zod.run({
1701
+ value: input,
1702
+ issues: []
1703
+ }, ctx);
1704
+ if (left instanceof Promise || right instanceof Promise) return Promise.all([left, right]).then(([left, right]) => {
1705
+ return handleIntersectionResults(payload, left, right);
1706
+ });
1707
+ return handleIntersectionResults(payload, left, right);
1708
+ };
1709
+ });
1710
+ function mergeValues(a, b) {
1711
+ if (a === b) return {
1712
+ valid: true,
1713
+ data: a
1714
+ };
1715
+ if (a instanceof Date && b instanceof Date && +a === +b) return {
1716
+ valid: true,
1717
+ data: a
1718
+ };
1719
+ if (isPlainObject(a) && isPlainObject(b)) {
1720
+ const bKeys = Object.keys(b);
1721
+ const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
1722
+ const newObj = {
1723
+ ...a,
1724
+ ...b
1725
+ };
1726
+ for (const key of sharedKeys) {
1727
+ const sharedValue = mergeValues(a[key], b[key]);
1728
+ if (!sharedValue.valid) return {
1729
+ valid: false,
1730
+ mergeErrorPath: [key, ...sharedValue.mergeErrorPath]
1731
+ };
1732
+ newObj[key] = sharedValue.data;
1733
+ }
1734
+ return {
1735
+ valid: true,
1736
+ data: newObj
1737
+ };
1738
+ }
1739
+ if (Array.isArray(a) && Array.isArray(b)) {
1740
+ if (a.length !== b.length) return {
1741
+ valid: false,
1742
+ mergeErrorPath: []
1743
+ };
1744
+ const newArray = [];
1745
+ for (let index = 0; index < a.length; index++) {
1746
+ const itemA = a[index];
1747
+ const itemB = b[index];
1748
+ const sharedValue = mergeValues(itemA, itemB);
1749
+ if (!sharedValue.valid) return {
1750
+ valid: false,
1751
+ mergeErrorPath: [index, ...sharedValue.mergeErrorPath]
1752
+ };
1753
+ newArray.push(sharedValue.data);
1754
+ }
1755
+ return {
1756
+ valid: true,
1757
+ data: newArray
1758
+ };
1759
+ }
1760
+ return {
1761
+ valid: false,
1762
+ mergeErrorPath: []
1763
+ };
1764
+ }
1765
+ function handleIntersectionResults(result, left, right) {
1766
+ const unrecKeys = /* @__PURE__ */ new Map();
1767
+ let unrecIssue;
1768
+ for (const iss of left.issues) if (iss.code === "unrecognized_keys") {
1769
+ unrecIssue ?? (unrecIssue = iss);
1770
+ for (const k of iss.keys) {
1771
+ if (!unrecKeys.has(k)) unrecKeys.set(k, {});
1772
+ unrecKeys.get(k).l = true;
1773
+ }
1774
+ } else result.issues.push(iss);
1775
+ for (const iss of right.issues) if (iss.code === "unrecognized_keys") for (const k of iss.keys) {
1776
+ if (!unrecKeys.has(k)) unrecKeys.set(k, {});
1777
+ unrecKeys.get(k).r = true;
1778
+ }
1779
+ else result.issues.push(iss);
1780
+ const bothKeys = [...unrecKeys].filter(([, f]) => f.l && f.r).map(([k]) => k);
1781
+ if (bothKeys.length && unrecIssue) result.issues.push({
1782
+ ...unrecIssue,
1783
+ keys: bothKeys
1784
+ });
1785
+ if (aborted(result)) return result;
1786
+ const merged = mergeValues(left.value, right.value);
1787
+ if (!merged.valid) throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(merged.mergeErrorPath)}`);
1788
+ result.value = merged.data;
1789
+ return result;
1790
+ }
1791
+ const $ZodRecord = /* @__PURE__ */ $constructor("$ZodRecord", (inst, def) => {
1792
+ $ZodType.init(inst, def);
1793
+ inst._zod.parse = (payload, ctx) => {
1794
+ const input = payload.value;
1795
+ if (!isPlainObject(input)) {
1796
+ payload.issues.push({
1797
+ expected: "record",
1798
+ code: "invalid_type",
1799
+ input,
1800
+ inst
1801
+ });
1802
+ return payload;
1803
+ }
1804
+ const proms = [];
1805
+ const values = def.keyType._zod.values;
1806
+ if (values) {
1807
+ payload.value = {};
1808
+ const recordKeys = /* @__PURE__ */ new Set();
1809
+ for (const key of values) if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
1810
+ recordKeys.add(typeof key === "number" ? key.toString() : key);
1811
+ const result = def.valueType._zod.run({
1812
+ value: input[key],
1813
+ issues: []
1814
+ }, ctx);
1815
+ if (result instanceof Promise) proms.push(result.then((result) => {
1816
+ if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
1817
+ payload.value[key] = result.value;
1818
+ }));
1819
+ else {
1820
+ if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
1821
+ payload.value[key] = result.value;
1822
+ }
1823
+ }
1824
+ let unrecognized;
1825
+ for (const key in input) if (!recordKeys.has(key)) {
1826
+ unrecognized = unrecognized ?? [];
1827
+ unrecognized.push(key);
1828
+ }
1829
+ if (unrecognized && unrecognized.length > 0) payload.issues.push({
1830
+ code: "unrecognized_keys",
1831
+ input,
1832
+ inst,
1833
+ keys: unrecognized
1834
+ });
1835
+ } else {
1836
+ payload.value = {};
1837
+ for (const key of Reflect.ownKeys(input)) {
1838
+ if (key === "__proto__") continue;
1839
+ let keyResult = def.keyType._zod.run({
1840
+ value: key,
1841
+ issues: []
1842
+ }, ctx);
1843
+ if (keyResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
1844
+ if (typeof key === "string" && number$1.test(key) && keyResult.issues.length) {
1845
+ const retryResult = def.keyType._zod.run({
1846
+ value: Number(key),
1847
+ issues: []
1848
+ }, ctx);
1849
+ if (retryResult instanceof Promise) throw new Error("Async schemas not supported in object keys currently");
1850
+ if (retryResult.issues.length === 0) keyResult = retryResult;
1851
+ }
1852
+ if (keyResult.issues.length) {
1853
+ if (def.mode === "loose") payload.value[key] = input[key];
1854
+ else payload.issues.push({
1855
+ code: "invalid_key",
1856
+ origin: "record",
1857
+ issues: keyResult.issues.map((iss) => finalizeIssue(iss, ctx, config())),
1858
+ input: key,
1859
+ path: [key],
1860
+ inst
1861
+ });
1862
+ continue;
1863
+ }
1864
+ const result = def.valueType._zod.run({
1865
+ value: input[key],
1866
+ issues: []
1867
+ }, ctx);
1868
+ if (result instanceof Promise) proms.push(result.then((result) => {
1869
+ if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
1870
+ payload.value[keyResult.value] = result.value;
1871
+ }));
1872
+ else {
1873
+ if (result.issues.length) payload.issues.push(...prefixIssues(key, result.issues));
1874
+ payload.value[keyResult.value] = result.value;
1875
+ }
1876
+ }
1877
+ }
1878
+ if (proms.length) return Promise.all(proms).then(() => payload);
1879
+ return payload;
1880
+ };
1881
+ });
1882
+ const $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
1883
+ $ZodType.init(inst, def);
1884
+ const values = getEnumValues(def.entries);
1885
+ const valuesSet = new Set(values);
1886
+ inst._zod.values = valuesSet;
1887
+ inst._zod.pattern = new RegExp(`^(${values.filter((k) => propertyKeyTypes.has(typeof k)).map((o) => typeof o === "string" ? escapeRegex(o) : o.toString()).join("|")})$`);
1888
+ inst._zod.parse = (payload, _ctx) => {
1889
+ const input = payload.value;
1890
+ if (valuesSet.has(input)) return payload;
1891
+ payload.issues.push({
1892
+ code: "invalid_value",
1893
+ values,
1894
+ input,
1895
+ inst
1896
+ });
1897
+ return payload;
1898
+ };
1899
+ });
1900
+ const $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
1901
+ $ZodType.init(inst, def);
1902
+ inst._zod.parse = (payload, ctx) => {
1903
+ if (ctx.direction === "backward") throw new $ZodEncodeError(inst.constructor.name);
1904
+ const _out = def.transform(payload.value, payload);
1905
+ if (ctx.async) return (_out instanceof Promise ? _out : Promise.resolve(_out)).then((output) => {
1906
+ payload.value = output;
1907
+ return payload;
1908
+ });
1909
+ if (_out instanceof Promise) throw new $ZodAsyncError();
1910
+ payload.value = _out;
1911
+ return payload;
1912
+ };
1913
+ });
1914
+ function handleOptionalResult(result, input) {
1915
+ if (result.issues.length && input === void 0) return {
1916
+ issues: [],
1917
+ value: void 0
1918
+ };
1919
+ return result;
1920
+ }
1921
+ const $ZodOptional = /* @__PURE__ */ $constructor("$ZodOptional", (inst, def) => {
1922
+ $ZodType.init(inst, def);
1923
+ inst._zod.optin = "optional";
1924
+ inst._zod.optout = "optional";
1925
+ defineLazy(inst._zod, "values", () => {
1926
+ return def.innerType._zod.values ? new Set([...def.innerType._zod.values, void 0]) : void 0;
1927
+ });
1928
+ defineLazy(inst._zod, "pattern", () => {
1929
+ const pattern = def.innerType._zod.pattern;
1930
+ return pattern ? new RegExp(`^(${cleanRegex(pattern.source)})?$`) : void 0;
1931
+ });
1932
+ inst._zod.parse = (payload, ctx) => {
1933
+ if (def.innerType._zod.optin === "optional") {
1934
+ const result = def.innerType._zod.run(payload, ctx);
1935
+ if (result instanceof Promise) return result.then((r) => handleOptionalResult(r, payload.value));
1936
+ return handleOptionalResult(result, payload.value);
1937
+ }
1938
+ if (payload.value === void 0) return payload;
1939
+ return def.innerType._zod.run(payload, ctx);
1940
+ };
1941
+ });
1942
+ const $ZodExactOptional = /* @__PURE__ */ $constructor("$ZodExactOptional", (inst, def) => {
1943
+ $ZodOptional.init(inst, def);
1944
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1945
+ defineLazy(inst._zod, "pattern", () => def.innerType._zod.pattern);
1946
+ inst._zod.parse = (payload, ctx) => {
1947
+ return def.innerType._zod.run(payload, ctx);
1948
+ };
1949
+ });
1950
+ const $ZodNullable = /* @__PURE__ */ $constructor("$ZodNullable", (inst, def) => {
1951
+ $ZodType.init(inst, def);
1952
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
1953
+ defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
1954
+ defineLazy(inst._zod, "pattern", () => {
1955
+ const pattern = def.innerType._zod.pattern;
1956
+ return pattern ? new RegExp(`^(${cleanRegex(pattern.source)}|null)$`) : void 0;
1957
+ });
1958
+ defineLazy(inst._zod, "values", () => {
1959
+ return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : void 0;
1960
+ });
1961
+ inst._zod.parse = (payload, ctx) => {
1962
+ if (payload.value === null) return payload;
1963
+ return def.innerType._zod.run(payload, ctx);
1964
+ };
1965
+ });
1966
+ const $ZodDefault = /* @__PURE__ */ $constructor("$ZodDefault", (inst, def) => {
1967
+ $ZodType.init(inst, def);
1968
+ inst._zod.optin = "optional";
1969
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1970
+ inst._zod.parse = (payload, ctx) => {
1971
+ if (ctx.direction === "backward") return def.innerType._zod.run(payload, ctx);
1972
+ if (payload.value === void 0) {
1973
+ payload.value = def.defaultValue;
1974
+ /**
1975
+ * $ZodDefault returns the default value immediately in forward direction.
1976
+ * It doesn't pass the default value into the validator ("prefault"). There's no reason to pass the default value through validation. The validity of the default is enforced by TypeScript statically. Otherwise, it's the responsibility of the user to ensure the default is valid. In the case of pipes with divergent in/out types, you can specify the default on the `in` schema of your ZodPipe to set a "prefault" for the pipe. */
1977
+ return payload;
1978
+ }
1979
+ const result = def.innerType._zod.run(payload, ctx);
1980
+ if (result instanceof Promise) return result.then((result) => handleDefaultResult(result, def));
1981
+ return handleDefaultResult(result, def);
1982
+ };
1983
+ });
1984
+ function handleDefaultResult(payload, def) {
1985
+ if (payload.value === void 0) payload.value = def.defaultValue;
1986
+ return payload;
1987
+ }
1988
+ const $ZodPrefault = /* @__PURE__ */ $constructor("$ZodPrefault", (inst, def) => {
1989
+ $ZodType.init(inst, def);
1990
+ inst._zod.optin = "optional";
1991
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1992
+ inst._zod.parse = (payload, ctx) => {
1993
+ if (ctx.direction === "backward") return def.innerType._zod.run(payload, ctx);
1994
+ if (payload.value === void 0) payload.value = def.defaultValue;
1995
+ return def.innerType._zod.run(payload, ctx);
1996
+ };
1997
+ });
1998
+ const $ZodNonOptional = /* @__PURE__ */ $constructor("$ZodNonOptional", (inst, def) => {
1999
+ $ZodType.init(inst, def);
2000
+ defineLazy(inst._zod, "values", () => {
2001
+ const v = def.innerType._zod.values;
2002
+ return v ? new Set([...v].filter((x) => x !== void 0)) : void 0;
2003
+ });
2004
+ inst._zod.parse = (payload, ctx) => {
2005
+ const result = def.innerType._zod.run(payload, ctx);
2006
+ if (result instanceof Promise) return result.then((result) => handleNonOptionalResult(result, inst));
2007
+ return handleNonOptionalResult(result, inst);
2008
+ };
2009
+ });
2010
+ function handleNonOptionalResult(payload, inst) {
2011
+ if (!payload.issues.length && payload.value === void 0) payload.issues.push({
2012
+ code: "invalid_type",
2013
+ expected: "nonoptional",
2014
+ input: payload.value,
2015
+ inst
2016
+ });
2017
+ return payload;
2018
+ }
2019
+ const $ZodCatch = /* @__PURE__ */ $constructor("$ZodCatch", (inst, def) => {
2020
+ $ZodType.init(inst, def);
2021
+ defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
2022
+ defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
2023
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
2024
+ inst._zod.parse = (payload, ctx) => {
2025
+ if (ctx.direction === "backward") return def.innerType._zod.run(payload, ctx);
2026
+ const result = def.innerType._zod.run(payload, ctx);
2027
+ if (result instanceof Promise) return result.then((result) => {
2028
+ payload.value = result.value;
2029
+ if (result.issues.length) {
2030
+ payload.value = def.catchValue({
2031
+ ...payload,
2032
+ error: { issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) },
2033
+ input: payload.value
2034
+ });
2035
+ payload.issues = [];
2036
+ }
2037
+ return payload;
2038
+ });
2039
+ payload.value = result.value;
2040
+ if (result.issues.length) {
2041
+ payload.value = def.catchValue({
2042
+ ...payload,
2043
+ error: { issues: result.issues.map((iss) => finalizeIssue(iss, ctx, config())) },
2044
+ input: payload.value
2045
+ });
2046
+ payload.issues = [];
2047
+ }
2048
+ return payload;
2049
+ };
2050
+ });
2051
+ const $ZodPipe = /* @__PURE__ */ $constructor("$ZodPipe", (inst, def) => {
2052
+ $ZodType.init(inst, def);
2053
+ defineLazy(inst._zod, "values", () => def.in._zod.values);
2054
+ defineLazy(inst._zod, "optin", () => def.in._zod.optin);
2055
+ defineLazy(inst._zod, "optout", () => def.out._zod.optout);
2056
+ defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
2057
+ inst._zod.parse = (payload, ctx) => {
2058
+ if (ctx.direction === "backward") {
2059
+ const right = def.out._zod.run(payload, ctx);
2060
+ if (right instanceof Promise) return right.then((right) => handlePipeResult(right, def.in, ctx));
2061
+ return handlePipeResult(right, def.in, ctx);
2062
+ }
2063
+ const left = def.in._zod.run(payload, ctx);
2064
+ if (left instanceof Promise) return left.then((left) => handlePipeResult(left, def.out, ctx));
2065
+ return handlePipeResult(left, def.out, ctx);
2066
+ };
2067
+ });
2068
+ function handlePipeResult(left, next, ctx) {
2069
+ if (left.issues.length) {
2070
+ left.aborted = true;
2071
+ return left;
2072
+ }
2073
+ return next._zod.run({
2074
+ value: left.value,
2075
+ issues: left.issues
2076
+ }, ctx);
2077
+ }
2078
+ const $ZodReadonly = /* @__PURE__ */ $constructor("$ZodReadonly", (inst, def) => {
2079
+ $ZodType.init(inst, def);
2080
+ defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
2081
+ defineLazy(inst._zod, "values", () => def.innerType._zod.values);
2082
+ defineLazy(inst._zod, "optin", () => def.innerType?._zod?.optin);
2083
+ defineLazy(inst._zod, "optout", () => def.innerType?._zod?.optout);
2084
+ inst._zod.parse = (payload, ctx) => {
2085
+ if (ctx.direction === "backward") return def.innerType._zod.run(payload, ctx);
2086
+ const result = def.innerType._zod.run(payload, ctx);
2087
+ if (result instanceof Promise) return result.then(handleReadonlyResult);
2088
+ return handleReadonlyResult(result);
2089
+ };
2090
+ });
2091
+ function handleReadonlyResult(payload) {
2092
+ payload.value = Object.freeze(payload.value);
2093
+ return payload;
2094
+ }
2095
+ const $ZodCustom = /* @__PURE__ */ $constructor("$ZodCustom", (inst, def) => {
2096
+ $ZodCheck.init(inst, def);
2097
+ $ZodType.init(inst, def);
2098
+ inst._zod.parse = (payload, _) => {
2099
+ return payload;
2100
+ };
2101
+ inst._zod.check = (payload) => {
2102
+ const input = payload.value;
2103
+ const r = def.fn(input);
2104
+ if (r instanceof Promise) return r.then((r) => handleRefineResult(r, payload, input, inst));
2105
+ handleRefineResult(r, payload, input, inst);
2106
+ };
2107
+ });
2108
+ function handleRefineResult(result, payload, input, inst) {
2109
+ if (!result) {
2110
+ const _iss = {
2111
+ code: "custom",
2112
+ input,
2113
+ inst,
2114
+ path: [...inst._zod.def.path ?? []],
2115
+ continue: !inst._zod.def.abort
2116
+ };
2117
+ if (inst._zod.def.params) _iss.params = inst._zod.def.params;
2118
+ payload.issues.push(issue(_iss));
2119
+ }
2120
+ }
2121
+ //#endregion
2122
+ //#region ../../node_modules/zod/v4/core/registries.js
2123
+ var _a;
2124
+ var $ZodRegistry = class {
2125
+ constructor() {
2126
+ this._map = /* @__PURE__ */ new WeakMap();
2127
+ this._idmap = /* @__PURE__ */ new Map();
2128
+ }
2129
+ add(schema, ..._meta) {
2130
+ const meta = _meta[0];
2131
+ this._map.set(schema, meta);
2132
+ if (meta && typeof meta === "object" && "id" in meta) this._idmap.set(meta.id, schema);
2133
+ return this;
2134
+ }
2135
+ clear() {
2136
+ this._map = /* @__PURE__ */ new WeakMap();
2137
+ this._idmap = /* @__PURE__ */ new Map();
2138
+ return this;
2139
+ }
2140
+ remove(schema) {
2141
+ const meta = this._map.get(schema);
2142
+ if (meta && typeof meta === "object" && "id" in meta) this._idmap.delete(meta.id);
2143
+ this._map.delete(schema);
2144
+ return this;
2145
+ }
2146
+ get(schema) {
2147
+ const p = schema._zod.parent;
2148
+ if (p) {
2149
+ const pm = { ...this.get(p) ?? {} };
2150
+ delete pm.id;
2151
+ const f = {
2152
+ ...pm,
2153
+ ...this._map.get(schema)
2154
+ };
2155
+ return Object.keys(f).length ? f : void 0;
2156
+ }
2157
+ return this._map.get(schema);
2158
+ }
2159
+ has(schema) {
2160
+ return this._map.has(schema);
2161
+ }
2162
+ };
2163
+ function registry() {
2164
+ return new $ZodRegistry();
2165
+ }
2166
+ (_a = globalThis).__zod_globalRegistry ?? (_a.__zod_globalRegistry = registry());
2167
+ const globalRegistry = globalThis.__zod_globalRegistry;
2168
+ //#endregion
2169
+ //#region ../../node_modules/zod/v4/core/api.js
2170
+ /* @__NO_SIDE_EFFECTS__ */
2171
+ function _string(Class, params) {
2172
+ return new Class({
2173
+ type: "string",
2174
+ ...normalizeParams(params)
2175
+ });
2176
+ }
2177
+ /* @__NO_SIDE_EFFECTS__ */
2178
+ function _email(Class, params) {
2179
+ return new Class({
2180
+ type: "string",
2181
+ format: "email",
2182
+ check: "string_format",
2183
+ abort: false,
2184
+ ...normalizeParams(params)
2185
+ });
2186
+ }
2187
+ /* @__NO_SIDE_EFFECTS__ */
2188
+ function _guid(Class, params) {
2189
+ return new Class({
2190
+ type: "string",
2191
+ format: "guid",
2192
+ check: "string_format",
2193
+ abort: false,
2194
+ ...normalizeParams(params)
2195
+ });
2196
+ }
2197
+ /* @__NO_SIDE_EFFECTS__ */
2198
+ function _uuid(Class, params) {
2199
+ return new Class({
2200
+ type: "string",
2201
+ format: "uuid",
2202
+ check: "string_format",
2203
+ abort: false,
2204
+ ...normalizeParams(params)
2205
+ });
2206
+ }
2207
+ /* @__NO_SIDE_EFFECTS__ */
2208
+ function _uuidv4(Class, params) {
2209
+ return new Class({
2210
+ type: "string",
2211
+ format: "uuid",
2212
+ check: "string_format",
2213
+ abort: false,
2214
+ version: "v4",
2215
+ ...normalizeParams(params)
2216
+ });
2217
+ }
2218
+ /* @__NO_SIDE_EFFECTS__ */
2219
+ function _uuidv6(Class, params) {
2220
+ return new Class({
2221
+ type: "string",
2222
+ format: "uuid",
2223
+ check: "string_format",
2224
+ abort: false,
2225
+ version: "v6",
2226
+ ...normalizeParams(params)
2227
+ });
2228
+ }
2229
+ /* @__NO_SIDE_EFFECTS__ */
2230
+ function _uuidv7(Class, params) {
2231
+ return new Class({
2232
+ type: "string",
2233
+ format: "uuid",
2234
+ check: "string_format",
2235
+ abort: false,
2236
+ version: "v7",
2237
+ ...normalizeParams(params)
2238
+ });
2239
+ }
2240
+ /* @__NO_SIDE_EFFECTS__ */
2241
+ function _url(Class, params) {
2242
+ return new Class({
2243
+ type: "string",
2244
+ format: "url",
2245
+ check: "string_format",
2246
+ abort: false,
2247
+ ...normalizeParams(params)
2248
+ });
2249
+ }
2250
+ /* @__NO_SIDE_EFFECTS__ */
2251
+ function _emoji(Class, params) {
2252
+ return new Class({
2253
+ type: "string",
2254
+ format: "emoji",
2255
+ check: "string_format",
2256
+ abort: false,
2257
+ ...normalizeParams(params)
2258
+ });
2259
+ }
2260
+ /* @__NO_SIDE_EFFECTS__ */
2261
+ function _nanoid(Class, params) {
2262
+ return new Class({
2263
+ type: "string",
2264
+ format: "nanoid",
2265
+ check: "string_format",
2266
+ abort: false,
2267
+ ...normalizeParams(params)
2268
+ });
2269
+ }
2270
+ /* @__NO_SIDE_EFFECTS__ */
2271
+ function _cuid(Class, params) {
2272
+ return new Class({
2273
+ type: "string",
2274
+ format: "cuid",
2275
+ check: "string_format",
2276
+ abort: false,
2277
+ ...normalizeParams(params)
2278
+ });
2279
+ }
2280
+ /* @__NO_SIDE_EFFECTS__ */
2281
+ function _cuid2(Class, params) {
2282
+ return new Class({
2283
+ type: "string",
2284
+ format: "cuid2",
2285
+ check: "string_format",
2286
+ abort: false,
2287
+ ...normalizeParams(params)
2288
+ });
2289
+ }
2290
+ /* @__NO_SIDE_EFFECTS__ */
2291
+ function _ulid(Class, params) {
2292
+ return new Class({
2293
+ type: "string",
2294
+ format: "ulid",
2295
+ check: "string_format",
2296
+ abort: false,
2297
+ ...normalizeParams(params)
2298
+ });
2299
+ }
2300
+ /* @__NO_SIDE_EFFECTS__ */
2301
+ function _xid(Class, params) {
2302
+ return new Class({
2303
+ type: "string",
2304
+ format: "xid",
2305
+ check: "string_format",
2306
+ abort: false,
2307
+ ...normalizeParams(params)
2308
+ });
2309
+ }
2310
+ /* @__NO_SIDE_EFFECTS__ */
2311
+ function _ksuid(Class, params) {
2312
+ return new Class({
2313
+ type: "string",
2314
+ format: "ksuid",
2315
+ check: "string_format",
2316
+ abort: false,
2317
+ ...normalizeParams(params)
2318
+ });
2319
+ }
2320
+ /* @__NO_SIDE_EFFECTS__ */
2321
+ function _ipv4(Class, params) {
2322
+ return new Class({
2323
+ type: "string",
2324
+ format: "ipv4",
2325
+ check: "string_format",
2326
+ abort: false,
2327
+ ...normalizeParams(params)
2328
+ });
2329
+ }
2330
+ /* @__NO_SIDE_EFFECTS__ */
2331
+ function _ipv6(Class, params) {
2332
+ return new Class({
2333
+ type: "string",
2334
+ format: "ipv6",
2335
+ check: "string_format",
2336
+ abort: false,
2337
+ ...normalizeParams(params)
2338
+ });
2339
+ }
2340
+ /* @__NO_SIDE_EFFECTS__ */
2341
+ function _cidrv4(Class, params) {
2342
+ return new Class({
2343
+ type: "string",
2344
+ format: "cidrv4",
2345
+ check: "string_format",
2346
+ abort: false,
2347
+ ...normalizeParams(params)
2348
+ });
2349
+ }
2350
+ /* @__NO_SIDE_EFFECTS__ */
2351
+ function _cidrv6(Class, params) {
2352
+ return new Class({
2353
+ type: "string",
2354
+ format: "cidrv6",
2355
+ check: "string_format",
2356
+ abort: false,
2357
+ ...normalizeParams(params)
2358
+ });
2359
+ }
2360
+ /* @__NO_SIDE_EFFECTS__ */
2361
+ function _base64(Class, params) {
2362
+ return new Class({
2363
+ type: "string",
2364
+ format: "base64",
2365
+ check: "string_format",
2366
+ abort: false,
2367
+ ...normalizeParams(params)
2368
+ });
2369
+ }
2370
+ /* @__NO_SIDE_EFFECTS__ */
2371
+ function _base64url(Class, params) {
2372
+ return new Class({
2373
+ type: "string",
2374
+ format: "base64url",
2375
+ check: "string_format",
2376
+ abort: false,
2377
+ ...normalizeParams(params)
2378
+ });
2379
+ }
2380
+ /* @__NO_SIDE_EFFECTS__ */
2381
+ function _e164(Class, params) {
2382
+ return new Class({
2383
+ type: "string",
2384
+ format: "e164",
2385
+ check: "string_format",
2386
+ abort: false,
2387
+ ...normalizeParams(params)
2388
+ });
2389
+ }
2390
+ /* @__NO_SIDE_EFFECTS__ */
2391
+ function _jwt(Class, params) {
2392
+ return new Class({
2393
+ type: "string",
2394
+ format: "jwt",
2395
+ check: "string_format",
2396
+ abort: false,
2397
+ ...normalizeParams(params)
2398
+ });
2399
+ }
2400
+ /* @__NO_SIDE_EFFECTS__ */
2401
+ function _isoDateTime(Class, params) {
2402
+ return new Class({
2403
+ type: "string",
2404
+ format: "datetime",
2405
+ check: "string_format",
2406
+ offset: false,
2407
+ local: false,
2408
+ precision: null,
2409
+ ...normalizeParams(params)
2410
+ });
2411
+ }
2412
+ /* @__NO_SIDE_EFFECTS__ */
2413
+ function _isoDate(Class, params) {
2414
+ return new Class({
2415
+ type: "string",
2416
+ format: "date",
2417
+ check: "string_format",
2418
+ ...normalizeParams(params)
2419
+ });
2420
+ }
2421
+ /* @__NO_SIDE_EFFECTS__ */
2422
+ function _isoTime(Class, params) {
2423
+ return new Class({
2424
+ type: "string",
2425
+ format: "time",
2426
+ check: "string_format",
2427
+ precision: null,
2428
+ ...normalizeParams(params)
2429
+ });
2430
+ }
2431
+ /* @__NO_SIDE_EFFECTS__ */
2432
+ function _isoDuration(Class, params) {
2433
+ return new Class({
2434
+ type: "string",
2435
+ format: "duration",
2436
+ check: "string_format",
2437
+ ...normalizeParams(params)
2438
+ });
2439
+ }
2440
+ /* @__NO_SIDE_EFFECTS__ */
2441
+ function _number(Class, params) {
2442
+ return new Class({
2443
+ type: "number",
2444
+ checks: [],
2445
+ ...normalizeParams(params)
2446
+ });
2447
+ }
2448
+ /* @__NO_SIDE_EFFECTS__ */
2449
+ function _int(Class, params) {
2450
+ return new Class({
2451
+ type: "number",
2452
+ check: "number_format",
2453
+ abort: false,
2454
+ format: "safeint",
2455
+ ...normalizeParams(params)
2456
+ });
2457
+ }
2458
+ /* @__NO_SIDE_EFFECTS__ */
2459
+ function _boolean(Class, params) {
2460
+ return new Class({
2461
+ type: "boolean",
2462
+ ...normalizeParams(params)
2463
+ });
2464
+ }
2465
+ /* @__NO_SIDE_EFFECTS__ */
2466
+ function _any(Class) {
2467
+ return new Class({ type: "any" });
2468
+ }
2469
+ /* @__NO_SIDE_EFFECTS__ */
2470
+ function _unknown(Class) {
2471
+ return new Class({ type: "unknown" });
2472
+ }
2473
+ /* @__NO_SIDE_EFFECTS__ */
2474
+ function _never(Class, params) {
2475
+ return new Class({
2476
+ type: "never",
2477
+ ...normalizeParams(params)
2478
+ });
2479
+ }
2480
+ /* @__NO_SIDE_EFFECTS__ */
2481
+ function _coercedDate(Class, params) {
2482
+ return new Class({
2483
+ type: "date",
2484
+ coerce: true,
2485
+ ...normalizeParams(params)
2486
+ });
2487
+ }
2488
+ /* @__NO_SIDE_EFFECTS__ */
2489
+ function _lt(value, params) {
2490
+ return new $ZodCheckLessThan({
2491
+ check: "less_than",
2492
+ ...normalizeParams(params),
2493
+ value,
2494
+ inclusive: false
2495
+ });
2496
+ }
2497
+ /* @__NO_SIDE_EFFECTS__ */
2498
+ function _lte(value, params) {
2499
+ return new $ZodCheckLessThan({
2500
+ check: "less_than",
2501
+ ...normalizeParams(params),
2502
+ value,
2503
+ inclusive: true
2504
+ });
2505
+ }
2506
+ /* @__NO_SIDE_EFFECTS__ */
2507
+ function _gt(value, params) {
2508
+ return new $ZodCheckGreaterThan({
2509
+ check: "greater_than",
2510
+ ...normalizeParams(params),
2511
+ value,
2512
+ inclusive: false
2513
+ });
2514
+ }
2515
+ /* @__NO_SIDE_EFFECTS__ */
2516
+ function _gte(value, params) {
2517
+ return new $ZodCheckGreaterThan({
2518
+ check: "greater_than",
2519
+ ...normalizeParams(params),
2520
+ value,
2521
+ inclusive: true
2522
+ });
2523
+ }
2524
+ /* @__NO_SIDE_EFFECTS__ */
2525
+ function _multipleOf(value, params) {
2526
+ return new $ZodCheckMultipleOf({
2527
+ check: "multiple_of",
2528
+ ...normalizeParams(params),
2529
+ value
2530
+ });
2531
+ }
2532
+ /* @__NO_SIDE_EFFECTS__ */
2533
+ function _maxLength(maximum, params) {
2534
+ return new $ZodCheckMaxLength({
2535
+ check: "max_length",
2536
+ ...normalizeParams(params),
2537
+ maximum
2538
+ });
2539
+ }
2540
+ /* @__NO_SIDE_EFFECTS__ */
2541
+ function _minLength(minimum, params) {
2542
+ return new $ZodCheckMinLength({
2543
+ check: "min_length",
2544
+ ...normalizeParams(params),
2545
+ minimum
2546
+ });
2547
+ }
2548
+ /* @__NO_SIDE_EFFECTS__ */
2549
+ function _length(length, params) {
2550
+ return new $ZodCheckLengthEquals({
2551
+ check: "length_equals",
2552
+ ...normalizeParams(params),
2553
+ length
2554
+ });
2555
+ }
2556
+ /* @__NO_SIDE_EFFECTS__ */
2557
+ function _regex(pattern, params) {
2558
+ return new $ZodCheckRegex({
2559
+ check: "string_format",
2560
+ format: "regex",
2561
+ ...normalizeParams(params),
2562
+ pattern
2563
+ });
2564
+ }
2565
+ /* @__NO_SIDE_EFFECTS__ */
2566
+ function _lowercase(params) {
2567
+ return new $ZodCheckLowerCase({
2568
+ check: "string_format",
2569
+ format: "lowercase",
2570
+ ...normalizeParams(params)
2571
+ });
2572
+ }
2573
+ /* @__NO_SIDE_EFFECTS__ */
2574
+ function _uppercase(params) {
2575
+ return new $ZodCheckUpperCase({
2576
+ check: "string_format",
2577
+ format: "uppercase",
2578
+ ...normalizeParams(params)
2579
+ });
2580
+ }
2581
+ /* @__NO_SIDE_EFFECTS__ */
2582
+ function _includes(includes, params) {
2583
+ return new $ZodCheckIncludes({
2584
+ check: "string_format",
2585
+ format: "includes",
2586
+ ...normalizeParams(params),
2587
+ includes
2588
+ });
2589
+ }
2590
+ /* @__NO_SIDE_EFFECTS__ */
2591
+ function _startsWith(prefix, params) {
2592
+ return new $ZodCheckStartsWith({
2593
+ check: "string_format",
2594
+ format: "starts_with",
2595
+ ...normalizeParams(params),
2596
+ prefix
2597
+ });
2598
+ }
2599
+ /* @__NO_SIDE_EFFECTS__ */
2600
+ function _endsWith(suffix, params) {
2601
+ return new $ZodCheckEndsWith({
2602
+ check: "string_format",
2603
+ format: "ends_with",
2604
+ ...normalizeParams(params),
2605
+ suffix
2606
+ });
2607
+ }
2608
+ /* @__NO_SIDE_EFFECTS__ */
2609
+ function _overwrite(tx) {
2610
+ return new $ZodCheckOverwrite({
2611
+ check: "overwrite",
2612
+ tx
2613
+ });
2614
+ }
2615
+ /* @__NO_SIDE_EFFECTS__ */
2616
+ function _normalize(form) {
2617
+ return /* @__PURE__ */ _overwrite((input) => input.normalize(form));
2618
+ }
2619
+ /* @__NO_SIDE_EFFECTS__ */
2620
+ function _trim() {
2621
+ return /* @__PURE__ */ _overwrite((input) => input.trim());
2622
+ }
2623
+ /* @__NO_SIDE_EFFECTS__ */
2624
+ function _toLowerCase() {
2625
+ return /* @__PURE__ */ _overwrite((input) => input.toLowerCase());
2626
+ }
2627
+ /* @__NO_SIDE_EFFECTS__ */
2628
+ function _toUpperCase() {
2629
+ return /* @__PURE__ */ _overwrite((input) => input.toUpperCase());
2630
+ }
2631
+ /* @__NO_SIDE_EFFECTS__ */
2632
+ function _slugify() {
2633
+ return /* @__PURE__ */ _overwrite((input) => slugify(input));
2634
+ }
2635
+ /* @__NO_SIDE_EFFECTS__ */
2636
+ function _array(Class, element, params) {
2637
+ return new Class({
2638
+ type: "array",
2639
+ element,
2640
+ ...normalizeParams(params)
2641
+ });
2642
+ }
2643
+ /* @__NO_SIDE_EFFECTS__ */
2644
+ function _refine(Class, fn, _params) {
2645
+ return new Class({
2646
+ type: "custom",
2647
+ check: "custom",
2648
+ fn,
2649
+ ...normalizeParams(_params)
2650
+ });
2651
+ }
2652
+ /* @__NO_SIDE_EFFECTS__ */
2653
+ function _superRefine(fn) {
2654
+ const ch = /* @__PURE__ */ _check((payload) => {
2655
+ payload.addIssue = (issue$2) => {
2656
+ if (typeof issue$2 === "string") payload.issues.push(issue(issue$2, payload.value, ch._zod.def));
2657
+ else {
2658
+ const _issue = issue$2;
2659
+ if (_issue.fatal) _issue.continue = false;
2660
+ _issue.code ?? (_issue.code = "custom");
2661
+ _issue.input ?? (_issue.input = payload.value);
2662
+ _issue.inst ?? (_issue.inst = ch);
2663
+ _issue.continue ?? (_issue.continue = !ch._zod.def.abort);
2664
+ payload.issues.push(issue(_issue));
2665
+ }
2666
+ };
2667
+ return fn(payload.value, payload);
2668
+ });
2669
+ return ch;
2670
+ }
2671
+ /* @__NO_SIDE_EFFECTS__ */
2672
+ function _check(fn, params) {
2673
+ const ch = new $ZodCheck({
2674
+ check: "custom",
2675
+ ...normalizeParams(params)
2676
+ });
2677
+ ch._zod.check = fn;
2678
+ return ch;
2679
+ }
2680
+ //#endregion
2681
+ //#region ../../node_modules/zod/v4/core/to-json-schema.js
2682
+ function initializeContext(params) {
2683
+ let target = params?.target ?? "draft-2020-12";
2684
+ if (target === "draft-4") target = "draft-04";
2685
+ if (target === "draft-7") target = "draft-07";
2686
+ return {
2687
+ processors: params.processors ?? {},
2688
+ metadataRegistry: params?.metadata ?? globalRegistry,
2689
+ target,
2690
+ unrepresentable: params?.unrepresentable ?? "throw",
2691
+ override: params?.override ?? (() => {}),
2692
+ io: params?.io ?? "output",
2693
+ counter: 0,
2694
+ seen: /* @__PURE__ */ new Map(),
2695
+ cycles: params?.cycles ?? "ref",
2696
+ reused: params?.reused ?? "inline",
2697
+ external: params?.external ?? void 0
2698
+ };
2699
+ }
2700
+ function process(schema, ctx, _params = {
2701
+ path: [],
2702
+ schemaPath: []
2703
+ }) {
2704
+ var _a;
2705
+ const def = schema._zod.def;
2706
+ const seen = ctx.seen.get(schema);
2707
+ if (seen) {
2708
+ seen.count++;
2709
+ if (_params.schemaPath.includes(schema)) seen.cycle = _params.path;
2710
+ return seen.schema;
2711
+ }
2712
+ const result = {
2713
+ schema: {},
2714
+ count: 1,
2715
+ cycle: void 0,
2716
+ path: _params.path
2717
+ };
2718
+ ctx.seen.set(schema, result);
2719
+ const overrideSchema = schema._zod.toJSONSchema?.();
2720
+ if (overrideSchema) result.schema = overrideSchema;
2721
+ else {
2722
+ const params = {
2723
+ ..._params,
2724
+ schemaPath: [..._params.schemaPath, schema],
2725
+ path: _params.path
2726
+ };
2727
+ if (schema._zod.processJSONSchema) schema._zod.processJSONSchema(ctx, result.schema, params);
2728
+ else {
2729
+ const _json = result.schema;
2730
+ const processor = ctx.processors[def.type];
2731
+ if (!processor) throw new Error(`[toJSONSchema]: Non-representable type encountered: ${def.type}`);
2732
+ processor(schema, ctx, _json, params);
2733
+ }
2734
+ const parent = schema._zod.parent;
2735
+ if (parent) {
2736
+ if (!result.ref) result.ref = parent;
2737
+ process(parent, ctx, params);
2738
+ ctx.seen.get(parent).isParent = true;
2739
+ }
2740
+ }
2741
+ const meta = ctx.metadataRegistry.get(schema);
2742
+ if (meta) Object.assign(result.schema, meta);
2743
+ if (ctx.io === "input" && isTransforming(schema)) {
2744
+ delete result.schema.examples;
2745
+ delete result.schema.default;
2746
+ }
2747
+ if (ctx.io === "input" && result.schema._prefault) (_a = result.schema).default ?? (_a.default = result.schema._prefault);
2748
+ delete result.schema._prefault;
2749
+ return ctx.seen.get(schema).schema;
2750
+ }
2751
+ function extractDefs(ctx, schema) {
2752
+ const root = ctx.seen.get(schema);
2753
+ if (!root) throw new Error("Unprocessed schema. This is a bug in Zod.");
2754
+ const idToSchema = /* @__PURE__ */ new Map();
2755
+ for (const entry of ctx.seen.entries()) {
2756
+ const id = ctx.metadataRegistry.get(entry[0])?.id;
2757
+ if (id) {
2758
+ const existing = idToSchema.get(id);
2759
+ if (existing && existing !== entry[0]) throw new Error(`Duplicate schema id "${id}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
2760
+ idToSchema.set(id, entry[0]);
2761
+ }
2762
+ }
2763
+ const makeURI = (entry) => {
2764
+ const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
2765
+ if (ctx.external) {
2766
+ const externalId = ctx.external.registry.get(entry[0])?.id;
2767
+ const uriGenerator = ctx.external.uri ?? ((id) => id);
2768
+ if (externalId) return { ref: uriGenerator(externalId) };
2769
+ const id = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
2770
+ entry[1].defId = id;
2771
+ return {
2772
+ defId: id,
2773
+ ref: `${uriGenerator("__shared")}#/${defsSegment}/${id}`
2774
+ };
2775
+ }
2776
+ if (entry[1] === root) return { ref: "#" };
2777
+ const defUriPrefix = `#/${defsSegment}/`;
2778
+ const defId = entry[1].schema.id ?? `__schema${ctx.counter++}`;
2779
+ return {
2780
+ defId,
2781
+ ref: defUriPrefix + defId
2782
+ };
2783
+ };
2784
+ const extractToDef = (entry) => {
2785
+ if (entry[1].schema.$ref) return;
2786
+ const seen = entry[1];
2787
+ const { ref, defId } = makeURI(entry);
2788
+ seen.def = { ...seen.schema };
2789
+ if (defId) seen.defId = defId;
2790
+ const schema = seen.schema;
2791
+ for (const key in schema) delete schema[key];
2792
+ schema.$ref = ref;
2793
+ };
2794
+ if (ctx.cycles === "throw") for (const entry of ctx.seen.entries()) {
2795
+ const seen = entry[1];
2796
+ if (seen.cycle) throw new Error(`Cycle detected: #/${seen.cycle?.join("/")}/<root>
2797
+
2798
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
2799
+ }
2800
+ for (const entry of ctx.seen.entries()) {
2801
+ const seen = entry[1];
2802
+ if (schema === entry[0]) {
2803
+ extractToDef(entry);
2804
+ continue;
2805
+ }
2806
+ if (ctx.external) {
2807
+ const ext = ctx.external.registry.get(entry[0])?.id;
2808
+ if (schema !== entry[0] && ext) {
2809
+ extractToDef(entry);
2810
+ continue;
2811
+ }
2812
+ }
2813
+ if (ctx.metadataRegistry.get(entry[0])?.id) {
2814
+ extractToDef(entry);
2815
+ continue;
2816
+ }
2817
+ if (seen.cycle) {
2818
+ extractToDef(entry);
2819
+ continue;
2820
+ }
2821
+ if (seen.count > 1) {
2822
+ if (ctx.reused === "ref") {
2823
+ extractToDef(entry);
2824
+ continue;
2825
+ }
2826
+ }
2827
+ }
2828
+ }
2829
+ function finalize(ctx, schema) {
2830
+ const root = ctx.seen.get(schema);
2831
+ if (!root) throw new Error("Unprocessed schema. This is a bug in Zod.");
2832
+ const flattenRef = (zodSchema) => {
2833
+ const seen = ctx.seen.get(zodSchema);
2834
+ if (seen.ref === null) return;
2835
+ const schema = seen.def ?? seen.schema;
2836
+ const _cached = { ...schema };
2837
+ const ref = seen.ref;
2838
+ seen.ref = null;
2839
+ if (ref) {
2840
+ flattenRef(ref);
2841
+ const refSeen = ctx.seen.get(ref);
2842
+ const refSchema = refSeen.schema;
2843
+ if (refSchema.$ref && (ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0")) {
2844
+ schema.allOf = schema.allOf ?? [];
2845
+ schema.allOf.push(refSchema);
2846
+ } else Object.assign(schema, refSchema);
2847
+ Object.assign(schema, _cached);
2848
+ if (zodSchema._zod.parent === ref) for (const key in schema) {
2849
+ if (key === "$ref" || key === "allOf") continue;
2850
+ if (!(key in _cached)) delete schema[key];
2851
+ }
2852
+ if (refSchema.$ref && refSeen.def) for (const key in schema) {
2853
+ if (key === "$ref" || key === "allOf") continue;
2854
+ if (key in refSeen.def && JSON.stringify(schema[key]) === JSON.stringify(refSeen.def[key])) delete schema[key];
2855
+ }
2856
+ }
2857
+ const parent = zodSchema._zod.parent;
2858
+ if (parent && parent !== ref) {
2859
+ flattenRef(parent);
2860
+ const parentSeen = ctx.seen.get(parent);
2861
+ if (parentSeen?.schema.$ref) {
2862
+ schema.$ref = parentSeen.schema.$ref;
2863
+ if (parentSeen.def) for (const key in schema) {
2864
+ if (key === "$ref" || key === "allOf") continue;
2865
+ if (key in parentSeen.def && JSON.stringify(schema[key]) === JSON.stringify(parentSeen.def[key])) delete schema[key];
2866
+ }
2867
+ }
2868
+ }
2869
+ ctx.override({
2870
+ zodSchema,
2871
+ jsonSchema: schema,
2872
+ path: seen.path ?? []
2873
+ });
2874
+ };
2875
+ for (const entry of [...ctx.seen.entries()].reverse()) flattenRef(entry[0]);
2876
+ const result = {};
2877
+ if (ctx.target === "draft-2020-12") result.$schema = "https://json-schema.org/draft/2020-12/schema";
2878
+ else if (ctx.target === "draft-07") result.$schema = "http://json-schema.org/draft-07/schema#";
2879
+ else if (ctx.target === "draft-04") result.$schema = "http://json-schema.org/draft-04/schema#";
2880
+ else if (ctx.target === "openapi-3.0") {}
2881
+ if (ctx.external?.uri) {
2882
+ const id = ctx.external.registry.get(schema)?.id;
2883
+ if (!id) throw new Error("Schema is missing an `id` property");
2884
+ result.$id = ctx.external.uri(id);
2885
+ }
2886
+ Object.assign(result, root.def ?? root.schema);
2887
+ const defs = ctx.external?.defs ?? {};
2888
+ for (const entry of ctx.seen.entries()) {
2889
+ const seen = entry[1];
2890
+ if (seen.def && seen.defId) defs[seen.defId] = seen.def;
2891
+ }
2892
+ if (ctx.external) {} else if (Object.keys(defs).length > 0) if (ctx.target === "draft-2020-12") result.$defs = defs;
2893
+ else result.definitions = defs;
2894
+ try {
2895
+ const finalized = JSON.parse(JSON.stringify(result));
2896
+ Object.defineProperty(finalized, "~standard", {
2897
+ value: {
2898
+ ...schema["~standard"],
2899
+ jsonSchema: {
2900
+ input: createStandardJSONSchemaMethod(schema, "input", ctx.processors),
2901
+ output: createStandardJSONSchemaMethod(schema, "output", ctx.processors)
2902
+ }
2903
+ },
2904
+ enumerable: false,
2905
+ writable: false
2906
+ });
2907
+ return finalized;
2908
+ } catch (_err) {
2909
+ throw new Error("Error converting schema to JSON.");
2910
+ }
2911
+ }
2912
+ function isTransforming(_schema, _ctx) {
2913
+ const ctx = _ctx ?? { seen: /* @__PURE__ */ new Set() };
2914
+ if (ctx.seen.has(_schema)) return false;
2915
+ ctx.seen.add(_schema);
2916
+ const def = _schema._zod.def;
2917
+ if (def.type === "transform") return true;
2918
+ if (def.type === "array") return isTransforming(def.element, ctx);
2919
+ if (def.type === "set") return isTransforming(def.valueType, ctx);
2920
+ if (def.type === "lazy") return isTransforming(def.getter(), ctx);
2921
+ if (def.type === "promise" || def.type === "optional" || def.type === "nonoptional" || def.type === "nullable" || def.type === "readonly" || def.type === "default" || def.type === "prefault") return isTransforming(def.innerType, ctx);
2922
+ if (def.type === "intersection") return isTransforming(def.left, ctx) || isTransforming(def.right, ctx);
2923
+ if (def.type === "record" || def.type === "map") return isTransforming(def.keyType, ctx) || isTransforming(def.valueType, ctx);
2924
+ if (def.type === "pipe") return isTransforming(def.in, ctx) || isTransforming(def.out, ctx);
2925
+ if (def.type === "object") {
2926
+ for (const key in def.shape) if (isTransforming(def.shape[key], ctx)) return true;
2927
+ return false;
2928
+ }
2929
+ if (def.type === "union") {
2930
+ for (const option of def.options) if (isTransforming(option, ctx)) return true;
2931
+ return false;
2932
+ }
2933
+ if (def.type === "tuple") {
2934
+ for (const item of def.items) if (isTransforming(item, ctx)) return true;
2935
+ if (def.rest && isTransforming(def.rest, ctx)) return true;
2936
+ return false;
2937
+ }
2938
+ return false;
2939
+ }
2940
+ /**
2941
+ * Creates a toJSONSchema method for a schema instance.
2942
+ * This encapsulates the logic of initializing context, processing, extracting defs, and finalizing.
2943
+ */
2944
+ const createToJSONSchemaMethod = (schema, processors = {}) => (params) => {
2945
+ const ctx = initializeContext({
2946
+ ...params,
2947
+ processors
2948
+ });
2949
+ process(schema, ctx);
2950
+ extractDefs(ctx, schema);
2951
+ return finalize(ctx, schema);
2952
+ };
2953
+ const createStandardJSONSchemaMethod = (schema, io, processors = {}) => (params) => {
2954
+ const { libraryOptions, target } = params ?? {};
2955
+ const ctx = initializeContext({
2956
+ ...libraryOptions ?? {},
2957
+ target,
2958
+ io,
2959
+ processors
2960
+ });
2961
+ process(schema, ctx);
2962
+ extractDefs(ctx, schema);
2963
+ return finalize(ctx, schema);
2964
+ };
2965
+ //#endregion
2966
+ //#region ../../node_modules/zod/v4/core/json-schema-processors.js
2967
+ const formatMap = {
2968
+ guid: "uuid",
2969
+ url: "uri",
2970
+ datetime: "date-time",
2971
+ json_string: "json-string",
2972
+ regex: ""
2973
+ };
2974
+ const stringProcessor = (schema, ctx, _json, _params) => {
2975
+ const json = _json;
2976
+ json.type = "string";
2977
+ const { minimum, maximum, format, patterns, contentEncoding } = schema._zod.bag;
2978
+ if (typeof minimum === "number") json.minLength = minimum;
2979
+ if (typeof maximum === "number") json.maxLength = maximum;
2980
+ if (format) {
2981
+ json.format = formatMap[format] ?? format;
2982
+ if (json.format === "") delete json.format;
2983
+ if (format === "time") delete json.format;
2984
+ }
2985
+ if (contentEncoding) json.contentEncoding = contentEncoding;
2986
+ if (patterns && patterns.size > 0) {
2987
+ const regexes = [...patterns];
2988
+ if (regexes.length === 1) json.pattern = regexes[0].source;
2989
+ else if (regexes.length > 1) json.allOf = [...regexes.map((regex) => ({
2990
+ ...ctx.target === "draft-07" || ctx.target === "draft-04" || ctx.target === "openapi-3.0" ? { type: "string" } : {},
2991
+ pattern: regex.source
2992
+ }))];
2993
+ }
2994
+ };
2995
+ const numberProcessor = (schema, ctx, _json, _params) => {
2996
+ const json = _json;
2997
+ const { minimum, maximum, format, multipleOf, exclusiveMaximum, exclusiveMinimum } = schema._zod.bag;
2998
+ if (typeof format === "string" && format.includes("int")) json.type = "integer";
2999
+ else json.type = "number";
3000
+ if (typeof exclusiveMinimum === "number") if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
3001
+ json.minimum = exclusiveMinimum;
3002
+ json.exclusiveMinimum = true;
3003
+ } else json.exclusiveMinimum = exclusiveMinimum;
3004
+ if (typeof minimum === "number") {
3005
+ json.minimum = minimum;
3006
+ if (typeof exclusiveMinimum === "number" && ctx.target !== "draft-04") if (exclusiveMinimum >= minimum) delete json.minimum;
3007
+ else delete json.exclusiveMinimum;
3008
+ }
3009
+ if (typeof exclusiveMaximum === "number") if (ctx.target === "draft-04" || ctx.target === "openapi-3.0") {
3010
+ json.maximum = exclusiveMaximum;
3011
+ json.exclusiveMaximum = true;
3012
+ } else json.exclusiveMaximum = exclusiveMaximum;
3013
+ if (typeof maximum === "number") {
3014
+ json.maximum = maximum;
3015
+ if (typeof exclusiveMaximum === "number" && ctx.target !== "draft-04") if (exclusiveMaximum <= maximum) delete json.maximum;
3016
+ else delete json.exclusiveMaximum;
3017
+ }
3018
+ if (typeof multipleOf === "number") json.multipleOf = multipleOf;
3019
+ };
3020
+ const booleanProcessor = (_schema, _ctx, json, _params) => {
3021
+ json.type = "boolean";
3022
+ };
3023
+ const neverProcessor = (_schema, _ctx, json, _params) => {
3024
+ json.not = {};
3025
+ };
3026
+ const anyProcessor = (_schema, _ctx, _json, _params) => {};
3027
+ const unknownProcessor = (_schema, _ctx, _json, _params) => {};
3028
+ const dateProcessor = (_schema, ctx, _json, _params) => {
3029
+ if (ctx.unrepresentable === "throw") throw new Error("Date cannot be represented in JSON Schema");
3030
+ };
3031
+ const enumProcessor = (schema, _ctx, json, _params) => {
3032
+ const def = schema._zod.def;
3033
+ const values = getEnumValues(def.entries);
3034
+ if (values.every((v) => typeof v === "number")) json.type = "number";
3035
+ if (values.every((v) => typeof v === "string")) json.type = "string";
3036
+ json.enum = values;
3037
+ };
3038
+ const customProcessor = (_schema, ctx, _json, _params) => {
3039
+ if (ctx.unrepresentable === "throw") throw new Error("Custom types cannot be represented in JSON Schema");
3040
+ };
3041
+ const transformProcessor = (_schema, ctx, _json, _params) => {
3042
+ if (ctx.unrepresentable === "throw") throw new Error("Transforms cannot be represented in JSON Schema");
3043
+ };
3044
+ const arrayProcessor = (schema, ctx, _json, params) => {
3045
+ const json = _json;
3046
+ const def = schema._zod.def;
3047
+ const { minimum, maximum } = schema._zod.bag;
3048
+ if (typeof minimum === "number") json.minItems = minimum;
3049
+ if (typeof maximum === "number") json.maxItems = maximum;
3050
+ json.type = "array";
3051
+ json.items = process(def.element, ctx, {
3052
+ ...params,
3053
+ path: [...params.path, "items"]
3054
+ });
3055
+ };
3056
+ const objectProcessor = (schema, ctx, _json, params) => {
3057
+ const json = _json;
3058
+ const def = schema._zod.def;
3059
+ json.type = "object";
3060
+ json.properties = {};
3061
+ const shape = def.shape;
3062
+ for (const key in shape) json.properties[key] = process(shape[key], ctx, {
3063
+ ...params,
3064
+ path: [
3065
+ ...params.path,
3066
+ "properties",
3067
+ key
3068
+ ]
3069
+ });
3070
+ const allKeys = new Set(Object.keys(shape));
3071
+ const requiredKeys = new Set([...allKeys].filter((key) => {
3072
+ const v = def.shape[key]._zod;
3073
+ if (ctx.io === "input") return v.optin === void 0;
3074
+ else return v.optout === void 0;
3075
+ }));
3076
+ if (requiredKeys.size > 0) json.required = Array.from(requiredKeys);
3077
+ if (def.catchall?._zod.def.type === "never") json.additionalProperties = false;
3078
+ else if (!def.catchall) {
3079
+ if (ctx.io === "output") json.additionalProperties = false;
3080
+ } else if (def.catchall) json.additionalProperties = process(def.catchall, ctx, {
3081
+ ...params,
3082
+ path: [...params.path, "additionalProperties"]
3083
+ });
3084
+ };
3085
+ const unionProcessor = (schema, ctx, json, params) => {
3086
+ const def = schema._zod.def;
3087
+ const isExclusive = def.inclusive === false;
3088
+ const options = def.options.map((x, i) => process(x, ctx, {
3089
+ ...params,
3090
+ path: [
3091
+ ...params.path,
3092
+ isExclusive ? "oneOf" : "anyOf",
3093
+ i
3094
+ ]
3095
+ }));
3096
+ if (isExclusive) json.oneOf = options;
3097
+ else json.anyOf = options;
3098
+ };
3099
+ const intersectionProcessor = (schema, ctx, json, params) => {
3100
+ const def = schema._zod.def;
3101
+ const a = process(def.left, ctx, {
3102
+ ...params,
3103
+ path: [
3104
+ ...params.path,
3105
+ "allOf",
3106
+ 0
3107
+ ]
3108
+ });
3109
+ const b = process(def.right, ctx, {
3110
+ ...params,
3111
+ path: [
3112
+ ...params.path,
3113
+ "allOf",
3114
+ 1
3115
+ ]
3116
+ });
3117
+ const isSimpleIntersection = (val) => "allOf" in val && Object.keys(val).length === 1;
3118
+ json.allOf = [...isSimpleIntersection(a) ? a.allOf : [a], ...isSimpleIntersection(b) ? b.allOf : [b]];
3119
+ };
3120
+ const recordProcessor = (schema, ctx, _json, params) => {
3121
+ const json = _json;
3122
+ const def = schema._zod.def;
3123
+ json.type = "object";
3124
+ const keyType = def.keyType;
3125
+ const patterns = keyType._zod.bag?.patterns;
3126
+ if (def.mode === "loose" && patterns && patterns.size > 0) {
3127
+ const valueSchema = process(def.valueType, ctx, {
3128
+ ...params,
3129
+ path: [
3130
+ ...params.path,
3131
+ "patternProperties",
3132
+ "*"
3133
+ ]
3134
+ });
3135
+ json.patternProperties = {};
3136
+ for (const pattern of patterns) json.patternProperties[pattern.source] = valueSchema;
3137
+ } else {
3138
+ if (ctx.target === "draft-07" || ctx.target === "draft-2020-12") json.propertyNames = process(def.keyType, ctx, {
3139
+ ...params,
3140
+ path: [...params.path, "propertyNames"]
3141
+ });
3142
+ json.additionalProperties = process(def.valueType, ctx, {
3143
+ ...params,
3144
+ path: [...params.path, "additionalProperties"]
3145
+ });
3146
+ }
3147
+ const keyValues = keyType._zod.values;
3148
+ if (keyValues) {
3149
+ const validKeyValues = [...keyValues].filter((v) => typeof v === "string" || typeof v === "number");
3150
+ if (validKeyValues.length > 0) json.required = validKeyValues;
3151
+ }
3152
+ };
3153
+ const nullableProcessor = (schema, ctx, json, params) => {
3154
+ const def = schema._zod.def;
3155
+ const inner = process(def.innerType, ctx, params);
3156
+ const seen = ctx.seen.get(schema);
3157
+ if (ctx.target === "openapi-3.0") {
3158
+ seen.ref = def.innerType;
3159
+ json.nullable = true;
3160
+ } else json.anyOf = [inner, { type: "null" }];
3161
+ };
3162
+ const nonoptionalProcessor = (schema, ctx, _json, params) => {
3163
+ const def = schema._zod.def;
3164
+ process(def.innerType, ctx, params);
3165
+ const seen = ctx.seen.get(schema);
3166
+ seen.ref = def.innerType;
3167
+ };
3168
+ const defaultProcessor = (schema, ctx, json, params) => {
3169
+ const def = schema._zod.def;
3170
+ process(def.innerType, ctx, params);
3171
+ const seen = ctx.seen.get(schema);
3172
+ seen.ref = def.innerType;
3173
+ json.default = JSON.parse(JSON.stringify(def.defaultValue));
3174
+ };
3175
+ const prefaultProcessor = (schema, ctx, json, params) => {
3176
+ const def = schema._zod.def;
3177
+ process(def.innerType, ctx, params);
3178
+ const seen = ctx.seen.get(schema);
3179
+ seen.ref = def.innerType;
3180
+ if (ctx.io === "input") json._prefault = JSON.parse(JSON.stringify(def.defaultValue));
3181
+ };
3182
+ const catchProcessor = (schema, ctx, json, params) => {
3183
+ const def = schema._zod.def;
3184
+ process(def.innerType, ctx, params);
3185
+ const seen = ctx.seen.get(schema);
3186
+ seen.ref = def.innerType;
3187
+ let catchValue;
3188
+ try {
3189
+ catchValue = def.catchValue(void 0);
3190
+ } catch {
3191
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
3192
+ }
3193
+ json.default = catchValue;
3194
+ };
3195
+ const pipeProcessor = (schema, ctx, _json, params) => {
3196
+ const def = schema._zod.def;
3197
+ const innerType = ctx.io === "input" ? def.in._zod.def.type === "transform" ? def.out : def.in : def.out;
3198
+ process(innerType, ctx, params);
3199
+ const seen = ctx.seen.get(schema);
3200
+ seen.ref = innerType;
3201
+ };
3202
+ const readonlyProcessor = (schema, ctx, json, params) => {
3203
+ const def = schema._zod.def;
3204
+ process(def.innerType, ctx, params);
3205
+ const seen = ctx.seen.get(schema);
3206
+ seen.ref = def.innerType;
3207
+ json.readOnly = true;
3208
+ };
3209
+ const optionalProcessor = (schema, ctx, _json, params) => {
3210
+ const def = schema._zod.def;
3211
+ process(def.innerType, ctx, params);
3212
+ const seen = ctx.seen.get(schema);
3213
+ seen.ref = def.innerType;
3214
+ };
3215
+ //#endregion
3216
+ //#region ../../node_modules/zod/v4/classic/iso.js
3217
+ const ZodISODateTime = /* @__PURE__ */ $constructor("ZodISODateTime", (inst, def) => {
3218
+ $ZodISODateTime.init(inst, def);
3219
+ ZodStringFormat.init(inst, def);
3220
+ });
3221
+ function datetime(params) {
3222
+ return /* @__PURE__ */ _isoDateTime(ZodISODateTime, params);
3223
+ }
3224
+ const ZodISODate = /* @__PURE__ */ $constructor("ZodISODate", (inst, def) => {
3225
+ $ZodISODate.init(inst, def);
3226
+ ZodStringFormat.init(inst, def);
3227
+ });
3228
+ function date(params) {
3229
+ return /* @__PURE__ */ _isoDate(ZodISODate, params);
3230
+ }
3231
+ const ZodISOTime = /* @__PURE__ */ $constructor("ZodISOTime", (inst, def) => {
3232
+ $ZodISOTime.init(inst, def);
3233
+ ZodStringFormat.init(inst, def);
3234
+ });
3235
+ function time(params) {
3236
+ return /* @__PURE__ */ _isoTime(ZodISOTime, params);
3237
+ }
3238
+ const ZodISODuration = /* @__PURE__ */ $constructor("ZodISODuration", (inst, def) => {
3239
+ $ZodISODuration.init(inst, def);
3240
+ ZodStringFormat.init(inst, def);
3241
+ });
3242
+ function duration(params) {
3243
+ return /* @__PURE__ */ _isoDuration(ZodISODuration, params);
3244
+ }
3245
+ //#endregion
3246
+ //#region ../../node_modules/zod/v4/classic/errors.js
3247
+ const initializer = (inst, issues) => {
3248
+ $ZodError.init(inst, issues);
3249
+ inst.name = "ZodError";
3250
+ Object.defineProperties(inst, {
3251
+ format: { value: (mapper) => formatError(inst, mapper) },
3252
+ flatten: { value: (mapper) => flattenError(inst, mapper) },
3253
+ addIssue: { value: (issue) => {
3254
+ inst.issues.push(issue);
3255
+ inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
3256
+ } },
3257
+ addIssues: { value: (issues) => {
3258
+ inst.issues.push(...issues);
3259
+ inst.message = JSON.stringify(inst.issues, jsonStringifyReplacer, 2);
3260
+ } },
3261
+ isEmpty: { get() {
3262
+ return inst.issues.length === 0;
3263
+ } }
3264
+ });
3265
+ };
3266
+ $constructor("ZodError", initializer);
3267
+ const ZodRealError = $constructor("ZodError", initializer, { Parent: Error });
3268
+ //#endregion
3269
+ //#region ../../node_modules/zod/v4/classic/parse.js
3270
+ const parse = /* @__PURE__ */ _parse(ZodRealError);
3271
+ const parseAsync = /* @__PURE__ */ _parseAsync(ZodRealError);
3272
+ const safeParse = /* @__PURE__ */ _safeParse(ZodRealError);
3273
+ const safeParseAsync = /* @__PURE__ */ _safeParseAsync(ZodRealError);
3274
+ const encode = /* @__PURE__ */ _encode(ZodRealError);
3275
+ const decode = /* @__PURE__ */ _decode(ZodRealError);
3276
+ const encodeAsync = /* @__PURE__ */ _encodeAsync(ZodRealError);
3277
+ const decodeAsync = /* @__PURE__ */ _decodeAsync(ZodRealError);
3278
+ const safeEncode = /* @__PURE__ */ _safeEncode(ZodRealError);
3279
+ const safeDecode = /* @__PURE__ */ _safeDecode(ZodRealError);
3280
+ const safeEncodeAsync = /* @__PURE__ */ _safeEncodeAsync(ZodRealError);
3281
+ const safeDecodeAsync = /* @__PURE__ */ _safeDecodeAsync(ZodRealError);
3282
+ //#endregion
3283
+ //#region ../../node_modules/zod/v4/classic/schemas.js
3284
+ const ZodType = /* @__PURE__ */ $constructor("ZodType", (inst, def) => {
3285
+ $ZodType.init(inst, def);
3286
+ Object.assign(inst["~standard"], { jsonSchema: {
3287
+ input: createStandardJSONSchemaMethod(inst, "input"),
3288
+ output: createStandardJSONSchemaMethod(inst, "output")
3289
+ } });
3290
+ inst.toJSONSchema = createToJSONSchemaMethod(inst, {});
3291
+ inst.def = def;
3292
+ inst.type = def.type;
3293
+ Object.defineProperty(inst, "_def", { value: def });
3294
+ inst.check = (...checks) => {
3295
+ return inst.clone(mergeDefs(def, { checks: [...def.checks ?? [], ...checks.map((ch) => typeof ch === "function" ? { _zod: {
3296
+ check: ch,
3297
+ def: { check: "custom" },
3298
+ onattach: []
3299
+ } } : ch)] }), { parent: true });
3300
+ };
3301
+ inst.with = inst.check;
3302
+ inst.clone = (def, params) => clone(inst, def, params);
3303
+ inst.brand = () => inst;
3304
+ inst.register = ((reg, meta) => {
3305
+ reg.add(inst, meta);
3306
+ return inst;
3307
+ });
3308
+ inst.parse = (data, params) => parse(inst, data, params, { callee: inst.parse });
3309
+ inst.safeParse = (data, params) => safeParse(inst, data, params);
3310
+ inst.parseAsync = async (data, params) => parseAsync(inst, data, params, { callee: inst.parseAsync });
3311
+ inst.safeParseAsync = async (data, params) => safeParseAsync(inst, data, params);
3312
+ inst.spa = inst.safeParseAsync;
3313
+ inst.encode = (data, params) => encode(inst, data, params);
3314
+ inst.decode = (data, params) => decode(inst, data, params);
3315
+ inst.encodeAsync = async (data, params) => encodeAsync(inst, data, params);
3316
+ inst.decodeAsync = async (data, params) => decodeAsync(inst, data, params);
3317
+ inst.safeEncode = (data, params) => safeEncode(inst, data, params);
3318
+ inst.safeDecode = (data, params) => safeDecode(inst, data, params);
3319
+ inst.safeEncodeAsync = async (data, params) => safeEncodeAsync(inst, data, params);
3320
+ inst.safeDecodeAsync = async (data, params) => safeDecodeAsync(inst, data, params);
3321
+ inst.refine = (check, params) => inst.check(refine(check, params));
3322
+ inst.superRefine = (refinement) => inst.check(superRefine(refinement));
3323
+ inst.overwrite = (fn) => inst.check(/* @__PURE__ */ _overwrite(fn));
3324
+ inst.optional = () => optional(inst);
3325
+ inst.exactOptional = () => exactOptional(inst);
3326
+ inst.nullable = () => nullable(inst);
3327
+ inst.nullish = () => optional(nullable(inst));
3328
+ inst.nonoptional = (params) => nonoptional(inst, params);
3329
+ inst.array = () => array(inst);
3330
+ inst.or = (arg) => union([inst, arg]);
3331
+ inst.and = (arg) => intersection(inst, arg);
3332
+ inst.transform = (tx) => pipe(inst, transform(tx));
3333
+ inst.default = (def) => _default(inst, def);
3334
+ inst.prefault = (def) => prefault(inst, def);
3335
+ inst.catch = (params) => _catch(inst, params);
3336
+ inst.pipe = (target) => pipe(inst, target);
3337
+ inst.readonly = () => readonly(inst);
3338
+ inst.describe = (description) => {
3339
+ const cl = inst.clone();
3340
+ globalRegistry.add(cl, { description });
3341
+ return cl;
3342
+ };
3343
+ Object.defineProperty(inst, "description", {
3344
+ get() {
3345
+ return globalRegistry.get(inst)?.description;
3346
+ },
3347
+ configurable: true
3348
+ });
3349
+ inst.meta = (...args) => {
3350
+ if (args.length === 0) return globalRegistry.get(inst);
3351
+ const cl = inst.clone();
3352
+ globalRegistry.add(cl, args[0]);
3353
+ return cl;
3354
+ };
3355
+ inst.isOptional = () => inst.safeParse(void 0).success;
3356
+ inst.isNullable = () => inst.safeParse(null).success;
3357
+ inst.apply = (fn) => fn(inst);
3358
+ return inst;
3359
+ });
3360
+ /** @internal */
3361
+ const _ZodString = /* @__PURE__ */ $constructor("_ZodString", (inst, def) => {
3362
+ $ZodString.init(inst, def);
3363
+ ZodType.init(inst, def);
3364
+ inst._zod.processJSONSchema = (ctx, json, params) => stringProcessor(inst, ctx, json, params);
3365
+ const bag = inst._zod.bag;
3366
+ inst.format = bag.format ?? null;
3367
+ inst.minLength = bag.minimum ?? null;
3368
+ inst.maxLength = bag.maximum ?? null;
3369
+ inst.regex = (...args) => inst.check(/* @__PURE__ */ _regex(...args));
3370
+ inst.includes = (...args) => inst.check(/* @__PURE__ */ _includes(...args));
3371
+ inst.startsWith = (...args) => inst.check(/* @__PURE__ */ _startsWith(...args));
3372
+ inst.endsWith = (...args) => inst.check(/* @__PURE__ */ _endsWith(...args));
3373
+ inst.min = (...args) => inst.check(/* @__PURE__ */ _minLength(...args));
3374
+ inst.max = (...args) => inst.check(/* @__PURE__ */ _maxLength(...args));
3375
+ inst.length = (...args) => inst.check(/* @__PURE__ */ _length(...args));
3376
+ inst.nonempty = (...args) => inst.check(/* @__PURE__ */ _minLength(1, ...args));
3377
+ inst.lowercase = (params) => inst.check(/* @__PURE__ */ _lowercase(params));
3378
+ inst.uppercase = (params) => inst.check(/* @__PURE__ */ _uppercase(params));
3379
+ inst.trim = () => inst.check(/* @__PURE__ */ _trim());
3380
+ inst.normalize = (...args) => inst.check(/* @__PURE__ */ _normalize(...args));
3381
+ inst.toLowerCase = () => inst.check(/* @__PURE__ */ _toLowerCase());
3382
+ inst.toUpperCase = () => inst.check(/* @__PURE__ */ _toUpperCase());
3383
+ inst.slugify = () => inst.check(/* @__PURE__ */ _slugify());
3384
+ });
3385
+ const ZodString = /* @__PURE__ */ $constructor("ZodString", (inst, def) => {
3386
+ $ZodString.init(inst, def);
3387
+ _ZodString.init(inst, def);
3388
+ inst.email = (params) => inst.check(/* @__PURE__ */ _email(ZodEmail, params));
3389
+ inst.url = (params) => inst.check(/* @__PURE__ */ _url(ZodURL, params));
3390
+ inst.jwt = (params) => inst.check(/* @__PURE__ */ _jwt(ZodJWT, params));
3391
+ inst.emoji = (params) => inst.check(/* @__PURE__ */ _emoji(ZodEmoji, params));
3392
+ inst.guid = (params) => inst.check(/* @__PURE__ */ _guid(ZodGUID, params));
3393
+ inst.uuid = (params) => inst.check(/* @__PURE__ */ _uuid(ZodUUID, params));
3394
+ inst.uuidv4 = (params) => inst.check(/* @__PURE__ */ _uuidv4(ZodUUID, params));
3395
+ inst.uuidv6 = (params) => inst.check(/* @__PURE__ */ _uuidv6(ZodUUID, params));
3396
+ inst.uuidv7 = (params) => inst.check(/* @__PURE__ */ _uuidv7(ZodUUID, params));
3397
+ inst.nanoid = (params) => inst.check(/* @__PURE__ */ _nanoid(ZodNanoID, params));
3398
+ inst.guid = (params) => inst.check(/* @__PURE__ */ _guid(ZodGUID, params));
3399
+ inst.cuid = (params) => inst.check(/* @__PURE__ */ _cuid(ZodCUID, params));
3400
+ inst.cuid2 = (params) => inst.check(/* @__PURE__ */ _cuid2(ZodCUID2, params));
3401
+ inst.ulid = (params) => inst.check(/* @__PURE__ */ _ulid(ZodULID, params));
3402
+ inst.base64 = (params) => inst.check(/* @__PURE__ */ _base64(ZodBase64, params));
3403
+ inst.base64url = (params) => inst.check(/* @__PURE__ */ _base64url(ZodBase64URL, params));
3404
+ inst.xid = (params) => inst.check(/* @__PURE__ */ _xid(ZodXID, params));
3405
+ inst.ksuid = (params) => inst.check(/* @__PURE__ */ _ksuid(ZodKSUID, params));
3406
+ inst.ipv4 = (params) => inst.check(/* @__PURE__ */ _ipv4(ZodIPv4, params));
3407
+ inst.ipv6 = (params) => inst.check(/* @__PURE__ */ _ipv6(ZodIPv6, params));
3408
+ inst.cidrv4 = (params) => inst.check(/* @__PURE__ */ _cidrv4(ZodCIDRv4, params));
3409
+ inst.cidrv6 = (params) => inst.check(/* @__PURE__ */ _cidrv6(ZodCIDRv6, params));
3410
+ inst.e164 = (params) => inst.check(/* @__PURE__ */ _e164(ZodE164, params));
3411
+ inst.datetime = (params) => inst.check(datetime(params));
3412
+ inst.date = (params) => inst.check(date(params));
3413
+ inst.time = (params) => inst.check(time(params));
3414
+ inst.duration = (params) => inst.check(duration(params));
3415
+ });
3416
+ function string(params) {
3417
+ return /* @__PURE__ */ _string(ZodString, params);
3418
+ }
3419
+ const ZodStringFormat = /* @__PURE__ */ $constructor("ZodStringFormat", (inst, def) => {
3420
+ $ZodStringFormat.init(inst, def);
3421
+ _ZodString.init(inst, def);
3422
+ });
3423
+ const ZodEmail = /* @__PURE__ */ $constructor("ZodEmail", (inst, def) => {
3424
+ $ZodEmail.init(inst, def);
3425
+ ZodStringFormat.init(inst, def);
3426
+ });
3427
+ const ZodGUID = /* @__PURE__ */ $constructor("ZodGUID", (inst, def) => {
3428
+ $ZodGUID.init(inst, def);
3429
+ ZodStringFormat.init(inst, def);
3430
+ });
3431
+ const ZodUUID = /* @__PURE__ */ $constructor("ZodUUID", (inst, def) => {
3432
+ $ZodUUID.init(inst, def);
3433
+ ZodStringFormat.init(inst, def);
3434
+ });
3435
+ const ZodURL = /* @__PURE__ */ $constructor("ZodURL", (inst, def) => {
3436
+ $ZodURL.init(inst, def);
3437
+ ZodStringFormat.init(inst, def);
3438
+ });
3439
+ const ZodEmoji = /* @__PURE__ */ $constructor("ZodEmoji", (inst, def) => {
3440
+ $ZodEmoji.init(inst, def);
3441
+ ZodStringFormat.init(inst, def);
3442
+ });
3443
+ const ZodNanoID = /* @__PURE__ */ $constructor("ZodNanoID", (inst, def) => {
3444
+ $ZodNanoID.init(inst, def);
3445
+ ZodStringFormat.init(inst, def);
3446
+ });
3447
+ const ZodCUID = /* @__PURE__ */ $constructor("ZodCUID", (inst, def) => {
3448
+ $ZodCUID.init(inst, def);
3449
+ ZodStringFormat.init(inst, def);
3450
+ });
3451
+ const ZodCUID2 = /* @__PURE__ */ $constructor("ZodCUID2", (inst, def) => {
3452
+ $ZodCUID2.init(inst, def);
3453
+ ZodStringFormat.init(inst, def);
3454
+ });
3455
+ const ZodULID = /* @__PURE__ */ $constructor("ZodULID", (inst, def) => {
3456
+ $ZodULID.init(inst, def);
3457
+ ZodStringFormat.init(inst, def);
3458
+ });
3459
+ const ZodXID = /* @__PURE__ */ $constructor("ZodXID", (inst, def) => {
3460
+ $ZodXID.init(inst, def);
3461
+ ZodStringFormat.init(inst, def);
3462
+ });
3463
+ const ZodKSUID = /* @__PURE__ */ $constructor("ZodKSUID", (inst, def) => {
3464
+ $ZodKSUID.init(inst, def);
3465
+ ZodStringFormat.init(inst, def);
3466
+ });
3467
+ const ZodIPv4 = /* @__PURE__ */ $constructor("ZodIPv4", (inst, def) => {
3468
+ $ZodIPv4.init(inst, def);
3469
+ ZodStringFormat.init(inst, def);
3470
+ });
3471
+ const ZodIPv6 = /* @__PURE__ */ $constructor("ZodIPv6", (inst, def) => {
3472
+ $ZodIPv6.init(inst, def);
3473
+ ZodStringFormat.init(inst, def);
3474
+ });
3475
+ const ZodCIDRv4 = /* @__PURE__ */ $constructor("ZodCIDRv4", (inst, def) => {
3476
+ $ZodCIDRv4.init(inst, def);
3477
+ ZodStringFormat.init(inst, def);
3478
+ });
3479
+ const ZodCIDRv6 = /* @__PURE__ */ $constructor("ZodCIDRv6", (inst, def) => {
3480
+ $ZodCIDRv6.init(inst, def);
3481
+ ZodStringFormat.init(inst, def);
3482
+ });
3483
+ const ZodBase64 = /* @__PURE__ */ $constructor("ZodBase64", (inst, def) => {
3484
+ $ZodBase64.init(inst, def);
3485
+ ZodStringFormat.init(inst, def);
3486
+ });
3487
+ const ZodBase64URL = /* @__PURE__ */ $constructor("ZodBase64URL", (inst, def) => {
3488
+ $ZodBase64URL.init(inst, def);
3489
+ ZodStringFormat.init(inst, def);
3490
+ });
3491
+ const ZodE164 = /* @__PURE__ */ $constructor("ZodE164", (inst, def) => {
3492
+ $ZodE164.init(inst, def);
3493
+ ZodStringFormat.init(inst, def);
3494
+ });
3495
+ const ZodJWT = /* @__PURE__ */ $constructor("ZodJWT", (inst, def) => {
3496
+ $ZodJWT.init(inst, def);
3497
+ ZodStringFormat.init(inst, def);
3498
+ });
3499
+ const ZodNumber = /* @__PURE__ */ $constructor("ZodNumber", (inst, def) => {
3500
+ $ZodNumber.init(inst, def);
3501
+ ZodType.init(inst, def);
3502
+ inst._zod.processJSONSchema = (ctx, json, params) => numberProcessor(inst, ctx, json, params);
3503
+ inst.gt = (value, params) => inst.check(/* @__PURE__ */ _gt(value, params));
3504
+ inst.gte = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
3505
+ inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
3506
+ inst.lt = (value, params) => inst.check(/* @__PURE__ */ _lt(value, params));
3507
+ inst.lte = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
3508
+ inst.max = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
3509
+ inst.int = (params) => inst.check(int(params));
3510
+ inst.safe = (params) => inst.check(int(params));
3511
+ inst.positive = (params) => inst.check(/* @__PURE__ */ _gt(0, params));
3512
+ inst.nonnegative = (params) => inst.check(/* @__PURE__ */ _gte(0, params));
3513
+ inst.negative = (params) => inst.check(/* @__PURE__ */ _lt(0, params));
3514
+ inst.nonpositive = (params) => inst.check(/* @__PURE__ */ _lte(0, params));
3515
+ inst.multipleOf = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));
3516
+ inst.step = (value, params) => inst.check(/* @__PURE__ */ _multipleOf(value, params));
3517
+ inst.finite = () => inst;
3518
+ const bag = inst._zod.bag;
3519
+ inst.minValue = Math.max(bag.minimum ?? Number.NEGATIVE_INFINITY, bag.exclusiveMinimum ?? Number.NEGATIVE_INFINITY) ?? null;
3520
+ inst.maxValue = Math.min(bag.maximum ?? Number.POSITIVE_INFINITY, bag.exclusiveMaximum ?? Number.POSITIVE_INFINITY) ?? null;
3521
+ inst.isInt = (bag.format ?? "").includes("int") || Number.isSafeInteger(bag.multipleOf ?? .5);
3522
+ inst.isFinite = true;
3523
+ inst.format = bag.format ?? null;
3524
+ });
3525
+ function number(params) {
3526
+ return /* @__PURE__ */ _number(ZodNumber, params);
3527
+ }
3528
+ const ZodNumberFormat = /* @__PURE__ */ $constructor("ZodNumberFormat", (inst, def) => {
3529
+ $ZodNumberFormat.init(inst, def);
3530
+ ZodNumber.init(inst, def);
3531
+ });
3532
+ function int(params) {
3533
+ return /* @__PURE__ */ _int(ZodNumberFormat, params);
3534
+ }
3535
+ const ZodBoolean = /* @__PURE__ */ $constructor("ZodBoolean", (inst, def) => {
3536
+ $ZodBoolean.init(inst, def);
3537
+ ZodType.init(inst, def);
3538
+ inst._zod.processJSONSchema = (ctx, json, params) => booleanProcessor(inst, ctx, json, params);
3539
+ });
3540
+ function boolean(params) {
3541
+ return /* @__PURE__ */ _boolean(ZodBoolean, params);
3542
+ }
3543
+ const ZodAny = /* @__PURE__ */ $constructor("ZodAny", (inst, def) => {
3544
+ $ZodAny.init(inst, def);
3545
+ ZodType.init(inst, def);
3546
+ inst._zod.processJSONSchema = (ctx, json, params) => anyProcessor(inst, ctx, json, params);
3547
+ });
3548
+ function any() {
3549
+ return /* @__PURE__ */ _any(ZodAny);
3550
+ }
3551
+ const ZodUnknown = /* @__PURE__ */ $constructor("ZodUnknown", (inst, def) => {
3552
+ $ZodUnknown.init(inst, def);
3553
+ ZodType.init(inst, def);
3554
+ inst._zod.processJSONSchema = (ctx, json, params) => unknownProcessor(inst, ctx, json, params);
3555
+ });
3556
+ function unknown() {
3557
+ return /* @__PURE__ */ _unknown(ZodUnknown);
3558
+ }
3559
+ const ZodNever = /* @__PURE__ */ $constructor("ZodNever", (inst, def) => {
3560
+ $ZodNever.init(inst, def);
3561
+ ZodType.init(inst, def);
3562
+ inst._zod.processJSONSchema = (ctx, json, params) => neverProcessor(inst, ctx, json, params);
3563
+ });
3564
+ function never(params) {
3565
+ return /* @__PURE__ */ _never(ZodNever, params);
3566
+ }
3567
+ const ZodDate = /* @__PURE__ */ $constructor("ZodDate", (inst, def) => {
3568
+ $ZodDate.init(inst, def);
3569
+ ZodType.init(inst, def);
3570
+ inst._zod.processJSONSchema = (ctx, json, params) => dateProcessor(inst, ctx, json, params);
3571
+ inst.min = (value, params) => inst.check(/* @__PURE__ */ _gte(value, params));
3572
+ inst.max = (value, params) => inst.check(/* @__PURE__ */ _lte(value, params));
3573
+ const c = inst._zod.bag;
3574
+ inst.minDate = c.minimum ? new Date(c.minimum) : null;
3575
+ inst.maxDate = c.maximum ? new Date(c.maximum) : null;
3576
+ });
3577
+ const ZodArray = /* @__PURE__ */ $constructor("ZodArray", (inst, def) => {
3578
+ $ZodArray.init(inst, def);
3579
+ ZodType.init(inst, def);
3580
+ inst._zod.processJSONSchema = (ctx, json, params) => arrayProcessor(inst, ctx, json, params);
3581
+ inst.element = def.element;
3582
+ inst.min = (minLength, params) => inst.check(/* @__PURE__ */ _minLength(minLength, params));
3583
+ inst.nonempty = (params) => inst.check(/* @__PURE__ */ _minLength(1, params));
3584
+ inst.max = (maxLength, params) => inst.check(/* @__PURE__ */ _maxLength(maxLength, params));
3585
+ inst.length = (len, params) => inst.check(/* @__PURE__ */ _length(len, params));
3586
+ inst.unwrap = () => inst.element;
3587
+ });
3588
+ function array(element, params) {
3589
+ return /* @__PURE__ */ _array(ZodArray, element, params);
3590
+ }
3591
+ const ZodObject = /* @__PURE__ */ $constructor("ZodObject", (inst, def) => {
3592
+ $ZodObjectJIT.init(inst, def);
3593
+ ZodType.init(inst, def);
3594
+ inst._zod.processJSONSchema = (ctx, json, params) => objectProcessor(inst, ctx, json, params);
3595
+ defineLazy(inst, "shape", () => {
3596
+ return def.shape;
3597
+ });
3598
+ inst.keyof = () => _enum(Object.keys(inst._zod.def.shape));
3599
+ inst.catchall = (catchall) => inst.clone({
3600
+ ...inst._zod.def,
3601
+ catchall
3602
+ });
3603
+ inst.passthrough = () => inst.clone({
3604
+ ...inst._zod.def,
3605
+ catchall: unknown()
3606
+ });
3607
+ inst.loose = () => inst.clone({
3608
+ ...inst._zod.def,
3609
+ catchall: unknown()
3610
+ });
3611
+ inst.strict = () => inst.clone({
3612
+ ...inst._zod.def,
3613
+ catchall: never()
3614
+ });
3615
+ inst.strip = () => inst.clone({
3616
+ ...inst._zod.def,
3617
+ catchall: void 0
3618
+ });
3619
+ inst.extend = (incoming) => {
3620
+ return extend(inst, incoming);
3621
+ };
3622
+ inst.safeExtend = (incoming) => {
3623
+ return safeExtend(inst, incoming);
3624
+ };
3625
+ inst.merge = (other) => merge(inst, other);
3626
+ inst.pick = (mask) => pick(inst, mask);
3627
+ inst.omit = (mask) => omit(inst, mask);
3628
+ inst.partial = (...args) => partial(ZodOptional, inst, args[0]);
3629
+ inst.required = (...args) => required(ZodNonOptional, inst, args[0]);
3630
+ });
3631
+ function object(shape, params) {
3632
+ return new ZodObject({
3633
+ type: "object",
3634
+ shape: shape ?? {},
3635
+ ...normalizeParams(params)
3636
+ });
3637
+ }
3638
+ const ZodUnion = /* @__PURE__ */ $constructor("ZodUnion", (inst, def) => {
3639
+ $ZodUnion.init(inst, def);
3640
+ ZodType.init(inst, def);
3641
+ inst._zod.processJSONSchema = (ctx, json, params) => unionProcessor(inst, ctx, json, params);
3642
+ inst.options = def.options;
3643
+ });
3644
+ function union(options, params) {
3645
+ return new ZodUnion({
3646
+ type: "union",
3647
+ options,
3648
+ ...normalizeParams(params)
3649
+ });
3650
+ }
3651
+ const ZodIntersection = /* @__PURE__ */ $constructor("ZodIntersection", (inst, def) => {
3652
+ $ZodIntersection.init(inst, def);
3653
+ ZodType.init(inst, def);
3654
+ inst._zod.processJSONSchema = (ctx, json, params) => intersectionProcessor(inst, ctx, json, params);
3655
+ });
3656
+ function intersection(left, right) {
3657
+ return new ZodIntersection({
3658
+ type: "intersection",
3659
+ left,
3660
+ right
3661
+ });
3662
+ }
3663
+ const ZodRecord = /* @__PURE__ */ $constructor("ZodRecord", (inst, def) => {
3664
+ $ZodRecord.init(inst, def);
3665
+ ZodType.init(inst, def);
3666
+ inst._zod.processJSONSchema = (ctx, json, params) => recordProcessor(inst, ctx, json, params);
3667
+ inst.keyType = def.keyType;
3668
+ inst.valueType = def.valueType;
3669
+ });
3670
+ function record(keyType, valueType, params) {
3671
+ return new ZodRecord({
3672
+ type: "record",
3673
+ keyType,
3674
+ valueType,
3675
+ ...normalizeParams(params)
3676
+ });
3677
+ }
3678
+ const ZodEnum = /* @__PURE__ */ $constructor("ZodEnum", (inst, def) => {
3679
+ $ZodEnum.init(inst, def);
3680
+ ZodType.init(inst, def);
3681
+ inst._zod.processJSONSchema = (ctx, json, params) => enumProcessor(inst, ctx, json, params);
3682
+ inst.enum = def.entries;
3683
+ inst.options = Object.values(def.entries);
3684
+ const keys = new Set(Object.keys(def.entries));
3685
+ inst.extract = (values, params) => {
3686
+ const newEntries = {};
3687
+ for (const value of values) if (keys.has(value)) newEntries[value] = def.entries[value];
3688
+ else throw new Error(`Key ${value} not found in enum`);
3689
+ return new ZodEnum({
3690
+ ...def,
3691
+ checks: [],
3692
+ ...normalizeParams(params),
3693
+ entries: newEntries
3694
+ });
3695
+ };
3696
+ inst.exclude = (values, params) => {
3697
+ const newEntries = { ...def.entries };
3698
+ for (const value of values) if (keys.has(value)) delete newEntries[value];
3699
+ else throw new Error(`Key ${value} not found in enum`);
3700
+ return new ZodEnum({
3701
+ ...def,
3702
+ checks: [],
3703
+ ...normalizeParams(params),
3704
+ entries: newEntries
3705
+ });
3706
+ };
3707
+ });
3708
+ function _enum(values, params) {
3709
+ return new ZodEnum({
3710
+ type: "enum",
3711
+ entries: Array.isArray(values) ? Object.fromEntries(values.map((v) => [v, v])) : values,
3712
+ ...normalizeParams(params)
3713
+ });
3714
+ }
3715
+ const ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
3716
+ $ZodTransform.init(inst, def);
3717
+ ZodType.init(inst, def);
3718
+ inst._zod.processJSONSchema = (ctx, json, params) => transformProcessor(inst, ctx, json, params);
3719
+ inst._zod.parse = (payload, _ctx) => {
3720
+ if (_ctx.direction === "backward") throw new $ZodEncodeError(inst.constructor.name);
3721
+ payload.addIssue = (issue$1) => {
3722
+ if (typeof issue$1 === "string") payload.issues.push(issue(issue$1, payload.value, def));
3723
+ else {
3724
+ const _issue = issue$1;
3725
+ if (_issue.fatal) _issue.continue = false;
3726
+ _issue.code ?? (_issue.code = "custom");
3727
+ _issue.input ?? (_issue.input = payload.value);
3728
+ _issue.inst ?? (_issue.inst = inst);
3729
+ payload.issues.push(issue(_issue));
3730
+ }
3731
+ };
3732
+ const output = def.transform(payload.value, payload);
3733
+ if (output instanceof Promise) return output.then((output) => {
3734
+ payload.value = output;
3735
+ return payload;
3736
+ });
3737
+ payload.value = output;
3738
+ return payload;
3739
+ };
3740
+ });
3741
+ function transform(fn) {
3742
+ return new ZodTransform({
3743
+ type: "transform",
3744
+ transform: fn
3745
+ });
3746
+ }
3747
+ const ZodOptional = /* @__PURE__ */ $constructor("ZodOptional", (inst, def) => {
3748
+ $ZodOptional.init(inst, def);
3749
+ ZodType.init(inst, def);
3750
+ inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
3751
+ inst.unwrap = () => inst._zod.def.innerType;
3752
+ });
3753
+ function optional(innerType) {
3754
+ return new ZodOptional({
3755
+ type: "optional",
3756
+ innerType
3757
+ });
3758
+ }
3759
+ const ZodExactOptional = /* @__PURE__ */ $constructor("ZodExactOptional", (inst, def) => {
3760
+ $ZodExactOptional.init(inst, def);
3761
+ ZodType.init(inst, def);
3762
+ inst._zod.processJSONSchema = (ctx, json, params) => optionalProcessor(inst, ctx, json, params);
3763
+ inst.unwrap = () => inst._zod.def.innerType;
3764
+ });
3765
+ function exactOptional(innerType) {
3766
+ return new ZodExactOptional({
3767
+ type: "optional",
3768
+ innerType
3769
+ });
3770
+ }
3771
+ const ZodNullable = /* @__PURE__ */ $constructor("ZodNullable", (inst, def) => {
3772
+ $ZodNullable.init(inst, def);
3773
+ ZodType.init(inst, def);
3774
+ inst._zod.processJSONSchema = (ctx, json, params) => nullableProcessor(inst, ctx, json, params);
3775
+ inst.unwrap = () => inst._zod.def.innerType;
3776
+ });
3777
+ function nullable(innerType) {
3778
+ return new ZodNullable({
3779
+ type: "nullable",
3780
+ innerType
3781
+ });
3782
+ }
3783
+ const ZodDefault = /* @__PURE__ */ $constructor("ZodDefault", (inst, def) => {
3784
+ $ZodDefault.init(inst, def);
3785
+ ZodType.init(inst, def);
3786
+ inst._zod.processJSONSchema = (ctx, json, params) => defaultProcessor(inst, ctx, json, params);
3787
+ inst.unwrap = () => inst._zod.def.innerType;
3788
+ inst.removeDefault = inst.unwrap;
3789
+ });
3790
+ function _default(innerType, defaultValue) {
3791
+ return new ZodDefault({
3792
+ type: "default",
3793
+ innerType,
3794
+ get defaultValue() {
3795
+ return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue);
3796
+ }
3797
+ });
3798
+ }
3799
+ const ZodPrefault = /* @__PURE__ */ $constructor("ZodPrefault", (inst, def) => {
3800
+ $ZodPrefault.init(inst, def);
3801
+ ZodType.init(inst, def);
3802
+ inst._zod.processJSONSchema = (ctx, json, params) => prefaultProcessor(inst, ctx, json, params);
3803
+ inst.unwrap = () => inst._zod.def.innerType;
3804
+ });
3805
+ function prefault(innerType, defaultValue) {
3806
+ return new ZodPrefault({
3807
+ type: "prefault",
3808
+ innerType,
3809
+ get defaultValue() {
3810
+ return typeof defaultValue === "function" ? defaultValue() : shallowClone(defaultValue);
3811
+ }
3812
+ });
3813
+ }
3814
+ const ZodNonOptional = /* @__PURE__ */ $constructor("ZodNonOptional", (inst, def) => {
3815
+ $ZodNonOptional.init(inst, def);
3816
+ ZodType.init(inst, def);
3817
+ inst._zod.processJSONSchema = (ctx, json, params) => nonoptionalProcessor(inst, ctx, json, params);
3818
+ inst.unwrap = () => inst._zod.def.innerType;
3819
+ });
3820
+ function nonoptional(innerType, params) {
3821
+ return new ZodNonOptional({
3822
+ type: "nonoptional",
3823
+ innerType,
3824
+ ...normalizeParams(params)
3825
+ });
3826
+ }
3827
+ const ZodCatch = /* @__PURE__ */ $constructor("ZodCatch", (inst, def) => {
3828
+ $ZodCatch.init(inst, def);
3829
+ ZodType.init(inst, def);
3830
+ inst._zod.processJSONSchema = (ctx, json, params) => catchProcessor(inst, ctx, json, params);
3831
+ inst.unwrap = () => inst._zod.def.innerType;
3832
+ inst.removeCatch = inst.unwrap;
3833
+ });
3834
+ function _catch(innerType, catchValue) {
3835
+ return new ZodCatch({
3836
+ type: "catch",
3837
+ innerType,
3838
+ catchValue: typeof catchValue === "function" ? catchValue : () => catchValue
3839
+ });
3840
+ }
3841
+ const ZodPipe = /* @__PURE__ */ $constructor("ZodPipe", (inst, def) => {
3842
+ $ZodPipe.init(inst, def);
3843
+ ZodType.init(inst, def);
3844
+ inst._zod.processJSONSchema = (ctx, json, params) => pipeProcessor(inst, ctx, json, params);
3845
+ inst.in = def.in;
3846
+ inst.out = def.out;
3847
+ });
3848
+ function pipe(in_, out) {
3849
+ return new ZodPipe({
3850
+ type: "pipe",
3851
+ in: in_,
3852
+ out
3853
+ });
3854
+ }
3855
+ const ZodReadonly = /* @__PURE__ */ $constructor("ZodReadonly", (inst, def) => {
3856
+ $ZodReadonly.init(inst, def);
3857
+ ZodType.init(inst, def);
3858
+ inst._zod.processJSONSchema = (ctx, json, params) => readonlyProcessor(inst, ctx, json, params);
3859
+ inst.unwrap = () => inst._zod.def.innerType;
3860
+ });
3861
+ function readonly(innerType) {
3862
+ return new ZodReadonly({
3863
+ type: "readonly",
3864
+ innerType
3865
+ });
3866
+ }
3867
+ const ZodCustom = /* @__PURE__ */ $constructor("ZodCustom", (inst, def) => {
3868
+ $ZodCustom.init(inst, def);
3869
+ ZodType.init(inst, def);
3870
+ inst._zod.processJSONSchema = (ctx, json, params) => customProcessor(inst, ctx, json, params);
3871
+ });
3872
+ function refine(fn, _params = {}) {
3873
+ return /* @__PURE__ */ _refine(ZodCustom, fn, _params);
3874
+ }
3875
+ function superRefine(fn) {
3876
+ return /* @__PURE__ */ _superRefine(fn);
3877
+ }
3878
+ //#endregion
3879
+ export { boolean as a, record as c, array as i, string as l, _enum as n, number as o, any as r, object as s, ZodDate as t, _coercedDate as u };
3880
+
3881
+ //# sourceMappingURL=schemas-By1qE0sQ.mjs.map