@highstate/designer 0.9.16 → 0.9.19

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 (571) hide show
  1. package/.output/nitro.json +15 -0
  2. package/.output/public/_nuxt/00PavPNr.js +1 -0
  3. package/.output/public/_nuxt/0A0GXgOL.js +13 -0
  4. package/.output/public/_nuxt/1DNp92w6.js +1 -0
  5. package/.output/public/_nuxt/24pzIZRr.js +1 -0
  6. package/.output/public/_nuxt/2EtD6e53.js +1 -0
  7. package/.output/public/_nuxt/2UxHyX5q.js +1 -0
  8. package/.output/public/_nuxt/3e1v2bzS.js +1 -0
  9. package/.output/public/_nuxt/4A_iFExJ.js +1 -0
  10. package/.output/public/_nuxt/5bLW0GMw.js +1 -0
  11. package/.output/public/_nuxt/5i3qLPDT.js +1 -0
  12. package/.output/public/_nuxt/6nHXG8SA.js +1 -0
  13. package/.output/public/_nuxt/85-TOEBH.js +1 -0
  14. package/.output/public/_nuxt/9ZFiTIhr.js +1 -0
  15. package/.output/public/_nuxt/B-hkwWGT.js +1 -0
  16. package/.output/public/_nuxt/B0m2ddpp.js +1 -0
  17. package/.output/public/_nuxt/B1dDrJ26.js +1 -0
  18. package/.output/public/_nuxt/B1yitclQ.js +1 -0
  19. package/.output/public/_nuxt/B2umP1rN.js +1 -0
  20. package/.output/public/_nuxt/B5ZR69Tn.js +1 -0
  21. package/.output/public/_nuxt/B6aJPvgy.js +1 -0
  22. package/.output/public/_nuxt/B7mTdjB0.js +1 -0
  23. package/.output/public/_nuxt/B8z64P5r.js +1 -0
  24. package/.output/public/_nuxt/BBGuKPBd.js +1 -0
  25. package/.output/public/_nuxt/BDzgwa52.js +1 -0
  26. package/.output/public/_nuxt/BE2KfCdU.js +1 -0
  27. package/.output/public/_nuxt/BEDo0Tqx.js +1 -0
  28. package/.output/public/_nuxt/BEFlL3Zb.js +1 -0
  29. package/.output/public/_nuxt/BERRCDM3.js +1 -0
  30. package/.output/public/_nuxt/BETggiCN.js +1 -0
  31. package/.output/public/_nuxt/BEwlwnbL.js +1 -0
  32. package/.output/public/_nuxt/BFfxhgS-.js +1 -0
  33. package/.output/public/_nuxt/BGHREFWD.js +1 -0
  34. package/.output/public/_nuxt/BGJmEYvX.js +1 -0
  35. package/.output/public/_nuxt/BH2j9ZdL.js +2 -0
  36. package/.output/public/_nuxt/BHrmToEH.js +1 -0
  37. package/.output/public/_nuxt/BIAuTxu3.js +1 -0
  38. package/.output/public/_nuxt/BIGW1oBm.js +1 -0
  39. package/.output/public/_nuxt/BIHI7g3E.js +1 -0
  40. package/.output/public/_nuxt/BLIjXRbp.js +1 -0
  41. package/.output/public/_nuxt/BLPLmiCg.js +1 -0
  42. package/.output/public/_nuxt/BLtJtn59.js +1 -0
  43. package/.output/public/_nuxt/BLxL40Jp.js +1 -0
  44. package/.output/public/_nuxt/BM1_JUlF.js +1 -0
  45. package/.output/public/_nuxt/BMMyXqK5.js +1 -0
  46. package/.output/public/_nuxt/BMWR74SV.js +1 -0
  47. package/.output/public/_nuxt/BODfYi5x.js +1 -0
  48. package/.output/public/_nuxt/BPzJO5Oe.js +1 -0
  49. package/.output/public/_nuxt/BQ8w6xss.js +1 -0
  50. package/.output/public/_nuxt/BQvybpQq.js +1 -0
  51. package/.output/public/_nuxt/BR7mELCv.js +1 -0
  52. package/.output/public/_nuxt/BRHolxvo.js +1 -0
  53. package/.output/public/_nuxt/BRZ36xJF.js +1 -0
  54. package/.output/public/_nuxt/BSVaCi82.js +1 -0
  55. package/.output/public/_nuxt/BTJTHyun.js +1 -0
  56. package/.output/public/_nuxt/BU7Cl-8B.js +1 -0
  57. package/.output/public/_nuxt/BV7otONQ.js +1 -0
  58. package/.output/public/_nuxt/BWvSN4gD.js +1 -0
  59. package/.output/public/_nuxt/BXY8tDGw.js +1 -0
  60. package/.output/public/_nuxt/BXkSAIEj.js +1 -0
  61. package/.output/public/_nuxt/BYunw83y.js +1 -0
  62. package/.output/public/_nuxt/B_HjzqPZ.js +1 -0
  63. package/.output/public/_nuxt/B_m7g4N7.js +1 -0
  64. package/.output/public/_nuxt/BbcW6ACK.js +1 -0
  65. package/.output/public/_nuxt/BcOcwvcX.js +1 -0
  66. package/.output/public/_nuxt/BdImnpbu.js +1 -0
  67. package/.output/public/_nuxt/BdnUsdx6.js +1 -0
  68. package/.output/public/_nuxt/BeBKEPaV.js +1 -0
  69. package/.output/public/_nuxt/BepWV7mh.js +1 -0
  70. package/.output/public/_nuxt/BfHTSMKl.js +1 -0
  71. package/.output/public/_nuxt/BfjtVDDH.js +1 -0
  72. package/.output/public/_nuxt/BgDCqdQA.js +1 -0
  73. package/.output/public/_nuxt/BhOHFoWU.js +1 -0
  74. package/.output/public/_nuxt/BhWccYlK.js +276 -0
  75. package/.output/public/_nuxt/Bj2v5zwu.js +6 -0
  76. package/.output/public/_nuxt/BjQbGaFu.js +1 -0
  77. package/.output/public/_nuxt/Bk5OV074.js +1 -0
  78. package/.output/public/_nuxt/BkPM1oy1.js +1 -0
  79. package/.output/public/_nuxt/BkhU0P2a.js +1 -0
  80. package/.output/public/_nuxt/BkioyH1T.js +1 -0
  81. package/.output/public/_nuxt/Bkuqu6BP.js +1 -0
  82. package/.output/public/_nuxt/Bl2oy6fF.js +1 -0
  83. package/.output/public/_nuxt/BmXAJ9_W.js +1 -0
  84. package/.output/public/_nuxt/BoKiGodi.js +1 -0
  85. package/.output/public/_nuxt/Bp3cYrEr.js +1 -0
  86. package/.output/public/_nuxt/Bp6g37R7.js +1 -0
  87. package/.output/public/_nuxt/Bq9zGKGH.js +1 -0
  88. package/.output/public/_nuxt/BqTXFGrv.js +1 -0
  89. package/.output/public/_nuxt/BqYA7rlc.js +1 -0
  90. package/.output/public/_nuxt/BsS91CYL.js +1 -0
  91. package/.output/public/_nuxt/BspZqrRM.js +1 -0
  92. package/.output/public/_nuxt/BtCnVYZw.js +1 -0
  93. package/.output/public/_nuxt/BtOb2qkB.js +1 -0
  94. package/.output/public/_nuxt/BthQWCQV.js +1 -0
  95. package/.output/public/_nuxt/BtqSS_iP.js +1 -0
  96. package/.output/public/_nuxt/BtsDLbAf.js +1 -0
  97. package/.output/public/_nuxt/Btyk0a-E.js +1 -0
  98. package/.output/public/_nuxt/Buea-lGh.js +1 -0
  99. package/.output/public/_nuxt/BuidTy5i.js +1 -0
  100. package/.output/public/_nuxt/BvAqAH-y.js +1 -0
  101. package/.output/public/_nuxt/Bw305WKR.js +1 -0
  102. package/.output/public/_nuxt/Bwy6lXZI.js +1 -0
  103. package/.output/public/_nuxt/BzJJZx-M.js +1 -0
  104. package/.output/public/_nuxt/C-SQnVFl.js +1 -0
  105. package/.output/public/_nuxt/C0HS_06l.js +1 -0
  106. package/.output/public/_nuxt/C0hk2d4L.js +1 -0
  107. package/.output/public/_nuxt/C151Ov-r.js +1 -0
  108. package/.output/public/_nuxt/C28Ky4mM.js +5 -0
  109. package/.output/public/_nuxt/C2t-YnRu.js +1 -0
  110. package/.output/public/_nuxt/C39BiMTA.js +1 -0
  111. package/.output/public/_nuxt/C39wRh4i.js +1 -0
  112. package/.output/public/_nuxt/C3B-1QV4.js +1 -0
  113. package/.output/public/_nuxt/C3khCPGq.js +1 -0
  114. package/.output/public/_nuxt/C3mMm8J8.js +1 -0
  115. package/.output/public/_nuxt/C4IJs8-o.js +1 -0
  116. package/.output/public/_nuxt/C7Pw0Ztw.js +1 -0
  117. package/.output/public/_nuxt/C8-UwF3o.js +1 -0
  118. package/.output/public/_nuxt/C8M2exoo.js +1 -0
  119. package/.output/public/_nuxt/C8j9CRIf.js +1 -0
  120. package/.output/public/_nuxt/C8lEn-DE.js +1 -0
  121. package/.output/public/_nuxt/C98Dy4si.js +1 -0
  122. package/.output/public/_nuxt/C9XAeP06.js +1 -0
  123. package/.output/public/_nuxt/C9tS-k6U.js +1 -0
  124. package/.output/public/_nuxt/CA7CTBwS.js +1 -0
  125. package/.output/public/_nuxt/CAEVHbCq.js +1 -0
  126. package/.output/public/_nuxt/CBdGpnmw.js +1 -0
  127. package/.output/public/_nuxt/CDVJQ6XC.js +1 -0
  128. package/.output/public/_nuxt/CDx5xZoG.js +1 -0
  129. package/.output/public/_nuxt/CEL-wOlO.js +1 -0
  130. package/.output/public/_nuxt/CEu0bR-o.js +1 -0
  131. package/.output/public/_nuxt/CF10PKvl.js +1 -0
  132. package/.output/public/_nuxt/CF5B4EM_.js +1 -0
  133. package/.output/public/_nuxt/CG8Ifv2g.js +1 -0
  134. package/.output/public/_nuxt/CGqH5EJj.js +1 -0
  135. package/.output/public/_nuxt/CHLpvVh8.js +1 -0
  136. package/.output/public/_nuxt/CHM0blh-.js +1 -0
  137. package/.output/public/_nuxt/CHadp7IV.js +1 -0
  138. package/.output/public/_nuxt/CHdpI9cE.js +1 -0
  139. package/.output/public/_nuxt/CHh-QcGE.js +1 -0
  140. package/.output/public/_nuxt/CIv7p5Hd.js +16 -0
  141. package/.output/public/_nuxt/CJc9bBzg.js +1 -0
  142. package/.output/public/_nuxt/CKIfxQSi.js +1 -0
  143. package/.output/public/_nuxt/CLvts2aQ.js +1 -0
  144. package/.output/public/_nuxt/CLxacb5B.js +1 -0
  145. package/.output/public/_nuxt/CND6o3oI.js +1 -0
  146. package/.output/public/_nuxt/CO1LY3CK.js +1 -0
  147. package/.output/public/_nuxt/COCm9MC_.js +1 -0
  148. package/.output/public/_nuxt/COEtLSDF.js +1 -0
  149. package/.output/public/_nuxt/COI20M4I.js +1 -0
  150. package/.output/public/_nuxt/COkxafJQ.js +1 -0
  151. package/.output/public/_nuxt/COt5Ahok.js +1 -0
  152. package/.output/public/_nuxt/CPtXGFXV.js +1 -0
  153. package/.output/public/_nuxt/CS3Unz2-.js +1 -0
  154. package/.output/public/_nuxt/CSXwinHm.js +1 -0
  155. package/.output/public/_nuxt/CTIxkRwW.js +1 -0
  156. package/.output/public/_nuxt/CTRr51gU.js +1 -0
  157. package/.output/public/_nuxt/CTUD0bHN.js +1 -0
  158. package/.output/public/_nuxt/CTWiQX6C.js +1 -0
  159. package/.output/public/_nuxt/CU1B2r8a.js +1 -0
  160. package/.output/public/_nuxt/CU27uY9n.js +1 -0
  161. package/.output/public/_nuxt/CVO1_9PV.js +1 -0
  162. package/.output/public/_nuxt/CXtECtnM.js +1 -0
  163. package/.output/public/_nuxt/CZlF05X6.js +1 -0
  164. package/.output/public/_nuxt/CafNBF8u.js +1 -0
  165. package/.output/public/_nuxt/CasefD2V.js +1 -0
  166. package/.output/public/_nuxt/Cb0HU5_O.js +1 -0
  167. package/.output/public/_nuxt/CbFg5uaA.js +1 -0
  168. package/.output/public/_nuxt/CbfX1IO0.js +1 -0
  169. package/.output/public/_nuxt/CcyOm34o.js +1 -0
  170. package/.output/public/_nuxt/CdggvHu8.js +1 -0
  171. package/.output/public/_nuxt/CeAyd5Ju.js +1 -0
  172. package/.output/public/_nuxt/CeZK1NFH.js +1 -0
  173. package/.output/public/_nuxt/CfQXZHmo.js +1 -0
  174. package/.output/public/_nuxt/CfeIJUat.js +1 -0
  175. package/.output/public/_nuxt/Cg-RD9OK.js +1 -0
  176. package/.output/public/_nuxt/ChMvpjG-.js +1 -0
  177. package/.output/public/_nuxt/Cj5Yp3dK.js +1 -0
  178. package/.output/public/_nuxt/Ck1nftBx.js +1 -0
  179. package/.output/public/_nuxt/CkByrt1z.js +1 -0
  180. package/.output/public/_nuxt/CkXjmgJE.js +1 -0
  181. package/.output/public/_nuxt/Cmh6b_Ma.js +1 -0
  182. package/.output/public/_nuxt/CnK8MTSM.js +1 -0
  183. package/.output/public/_nuxt/CnnmHF94.js +1 -0
  184. package/.output/public/_nuxt/Co6uUVPk.js +1 -0
  185. package/.output/public/_nuxt/Cp-IABpG.js +1 -0
  186. package/.output/public/_nuxt/Cq5zzVJU.js +1 -0
  187. package/.output/public/_nuxt/CquLrc37.js +1 -0
  188. package/.output/public/_nuxt/CsfeWuGM.js +1 -0
  189. package/.output/public/_nuxt/Csfq5Kiy.js +1 -0
  190. package/.output/public/_nuxt/CtrldY6v.js +1 -0
  191. package/.output/public/_nuxt/Cuk6v7N8.js +1 -0
  192. package/.output/public/_nuxt/Cv9koXgw.js +1 -0
  193. package/.output/public/_nuxt/CxGSJlkm.js +1 -0
  194. package/.output/public/_nuxt/CyktbL80.js +1 -0
  195. package/.output/public/_nuxt/CylS5w8V.js +1 -0
  196. package/.output/public/_nuxt/CzTSHFRz.js +1 -0
  197. package/.output/public/_nuxt/CzVLS6f1.js +2 -0
  198. package/.output/public/_nuxt/D-2ljcwZ.js +1 -0
  199. package/.output/public/_nuxt/D08WgyRC.js +1 -0
  200. package/.output/public/_nuxt/D0YGMca9.js +1 -0
  201. package/.output/public/_nuxt/D0r3Knsf.js +1 -0
  202. package/.output/public/_nuxt/D17OF-Vu.js +1 -0
  203. package/.output/public/_nuxt/D1TquUAQ.js +1 -0
  204. package/.output/public/_nuxt/D1j8_8rp.js +1 -0
  205. package/.output/public/_nuxt/D1uDOp7C.js +1 -0
  206. package/.output/public/_nuxt/D22FLkUw.js +1 -0
  207. package/.output/public/_nuxt/D2AD0cA7.js +1 -0
  208. package/.output/public/_nuxt/D2CYqzqI.js +1 -0
  209. package/.output/public/_nuxt/D32k8WzR.js +1 -0
  210. package/.output/public/_nuxt/D3lLCCz7.js +1 -0
  211. package/.output/public/_nuxt/D4h5O-jR.js +1 -0
  212. package/.output/public/_nuxt/D5-asLiD.js +1 -0
  213. package/.output/public/_nuxt/D5KoaKCx.js +1 -0
  214. package/.output/public/_nuxt/D7ScPSBf.js +1 -0
  215. package/.output/public/_nuxt/D7o27uSR.js +1 -0
  216. package/.output/public/_nuxt/D7oLnXFd.js +1 -0
  217. package/.output/public/_nuxt/D82EKSYY.js +1 -0
  218. package/.output/public/_nuxt/D93ZcfNL.js +1 -0
  219. package/.output/public/_nuxt/D97Zzqfu.js +1 -0
  220. package/.output/public/_nuxt/D9qQxcz2.js +1 -0
  221. package/.output/public/_nuxt/D9rAj-Tm.js +1 -0
  222. package/.output/public/_nuxt/DAi9KRSo.js +1 -0
  223. package/.output/public/_nuxt/DDCXd-ua.js +1 -0
  224. package/.output/public/_nuxt/DEKgA0CD.js +1 -0
  225. package/.output/public/_nuxt/DFPGdAue.js +1 -0
  226. package/.output/public/_nuxt/DFQXde-d.js +1 -0
  227. package/.output/public/_nuxt/DFXneXwc.js +1 -0
  228. package/.output/public/_nuxt/DGztddWO.js +1 -0
  229. package/.output/public/_nuxt/DH5Ifo-i.js +1 -0
  230. package/.output/public/_nuxt/DHCkPAjA.js +1 -0
  231. package/.output/public/_nuxt/DHJKELXO.js +1 -0
  232. package/.output/public/_nuxt/DInZfUJa.js +1 -0
  233. package/.output/public/_nuxt/DIpLW5D5.js +1 -0
  234. package/.output/public/_nuxt/DKYwYmdq.js +1 -0
  235. package/.output/public/_nuxt/DKzvysjW.js +1 -0
  236. package/.output/public/_nuxt/DLQCiJf0.js +1 -0
  237. package/.output/public/_nuxt/DLaRxjQz.js +1 -0
  238. package/.output/public/_nuxt/DM8c43g1.js +1 -0
  239. package/.output/public/_nuxt/DMDPKkZ0.js +1 -0
  240. package/.output/public/_nuxt/DMzUqQB5.js +1 -0
  241. package/.output/public/_nuxt/DNrj_gVY.js +1 -0
  242. package/.output/public/_nuxt/DO3LUuFM.js +12 -0
  243. package/.output/public/_nuxt/DP4clH6m.js +1 -0
  244. package/.output/public/_nuxt/DPWtH2b9.js +1 -0
  245. package/.output/public/_nuxt/DPcUKYIF.js +1 -0
  246. package/.output/public/_nuxt/DPfMkruS.js +1 -0
  247. package/.output/public/_nuxt/DRg8JJMk.js +1 -0
  248. package/.output/public/_nuxt/DRprw4p4.js +1 -0
  249. package/.output/public/_nuxt/DS1LvVMU.js +1 -0
  250. package/.output/public/_nuxt/DTnN7l_n.js +1 -0
  251. package/.output/public/_nuxt/DU1UobuO.js +1 -0
  252. package/.output/public/_nuxt/DUSGQflk.js +1 -0
  253. package/.output/public/_nuxt/DUszq2jm.js +1 -0
  254. package/.output/public/_nuxt/DVFEvuxE.js +1 -0
  255. package/.output/public/_nuxt/DVMEJ2y_.js +1 -0
  256. package/.output/public/_nuxt/DVxCFoDh.js +1 -0
  257. package/.output/public/_nuxt/DWedfzmr.js +1 -0
  258. package/.output/public/_nuxt/DWrx1Km3.js +1 -0
  259. package/.output/public/_nuxt/DXbdFlpD.js +1 -0
  260. package/.output/public/_nuxt/DXmwc3jG.js +1 -0
  261. package/.output/public/_nuxt/DXvB9xmW.js +1 -0
  262. package/.output/public/_nuxt/DYtuF1mO.js +1 -0
  263. package/.output/public/_nuxt/DZxFcAj9.js +1 -0
  264. package/.output/public/_nuxt/D_Q5rh1f.js +1 -0
  265. package/.output/public/_nuxt/Da5cRb03.js +1 -0
  266. package/.output/public/_nuxt/DarxiN41.js +1 -0
  267. package/.output/public/_nuxt/DbnWrFmt.js +1 -0
  268. package/.output/public/_nuxt/DcaNXYhu.js +1 -0
  269. package/.output/public/_nuxt/DcrT2YVS.js +1 -0
  270. package/.output/public/_nuxt/Dd19v3D-.js +1 -0
  271. package/.output/public/_nuxt/DdkO51Og.js +1 -0
  272. package/.output/public/_nuxt/Ddv68eIx.js +1 -0
  273. package/.output/public/_nuxt/DeWFVDHI.js +1 -0
  274. package/.output/public/_nuxt/Des-eS-w.js +1 -0
  275. package/.output/public/_nuxt/Df68jz8_.js +1 -0
  276. package/.output/public/_nuxt/Df6bDoY_.js +1 -0
  277. package/.output/public/_nuxt/DiinP2Uv.js +1 -0
  278. package/.output/public/_nuxt/DjVGtenp.js +2 -0
  279. package/.output/public/_nuxt/DkFqJrB1.js +1 -0
  280. package/.output/public/_nuxt/DkhsQLT2.js +1 -0
  281. package/.output/public/_nuxt/DkwncUOv.js +1 -0
  282. package/.output/public/_nuxt/DlfHMoPT.js +1 -0
  283. package/.output/public/_nuxt/DljmTZ5-.js +1 -0
  284. package/.output/public/_nuxt/Dn2_MT6a.js +1 -0
  285. package/.output/public/_nuxt/DnULxvSX.js +1 -0
  286. package/.output/public/_nuxt/DoLmvh98.js +1 -0
  287. package/.output/public/_nuxt/Dpen1YoG.js +1 -0
  288. package/.output/public/_nuxt/DqwNpetd.js +1 -0
  289. package/.output/public/_nuxt/Dr8Zlu6v.js +1 -0
  290. package/.output/public/_nuxt/DrZfEa88.js +1 -0
  291. package/.output/public/_nuxt/Drp5UXmf.js +1 -0
  292. package/.output/public/_nuxt/DsOJ9woJ.js +1 -0
  293. package/.output/public/_nuxt/Dtc2v4kS.js +1 -0
  294. package/.output/public/_nuxt/DuztTtWK.js +1 -0
  295. package/.output/public/_nuxt/DwmUhPpj.js +1 -0
  296. package/.output/public/_nuxt/Dx-B1_4e.js +1 -0
  297. package/.output/public/_nuxt/DxOL29Up.js +1 -0
  298. package/.output/public/_nuxt/Dy4MTz6g.js +1 -0
  299. package/.output/public/_nuxt/DyJlTyXw.js +1 -0
  300. package/.output/public/_nuxt/DyxjwDmM.js +1 -0
  301. package/.output/public/_nuxt/E3gJ1_iC.js +1 -0
  302. package/.output/public/_nuxt/ETK3OkTL.js +1 -0
  303. package/.output/public/_nuxt/HgwTqqUo.js +1 -0
  304. package/.output/public/_nuxt/I3RK9BU8.js +1 -0
  305. package/.output/public/_nuxt/IeuSbFQv.js +1 -0
  306. package/.output/public/_nuxt/IvJ92aGK.js +1 -0
  307. package/.output/public/_nuxt/JJ2MHRK2.js +1 -0
  308. package/.output/public/_nuxt/JhPuU2gP.js +1 -0
  309. package/.output/public/_nuxt/JokPmHXv.js +1 -0
  310. package/.output/public/_nuxt/L9t79GZl.js +1 -0
  311. package/.output/public/_nuxt/MzD3tlZU.js +1 -0
  312. package/.output/public/_nuxt/N0qQ3IYs.js +2 -0
  313. package/.output/public/_nuxt/NleAzG8P.js +1 -0
  314. package/.output/public/_nuxt/O074qcLn.js +1 -0
  315. package/.output/public/_nuxt/P80f7IUj.js +1 -0
  316. package/.output/public/_nuxt/Pmp26Uib.js +1 -0
  317. package/.output/public/_nuxt/PoHY5YXO.js +1 -0
  318. package/.output/public/_nuxt/QIJgUcNo.js +1 -0
  319. package/.output/public/_nuxt/SQImb3Xm.js +1513 -0
  320. package/.output/public/_nuxt/SecretValueField.SMGlmIfE.css +1 -0
  321. package/.output/public/_nuxt/T7hNoCXG.js +1 -0
  322. package/.output/public/_nuxt/UInuXPgp.js +1 -0
  323. package/.output/public/_nuxt/UczlX-c9.js +1 -0
  324. package/.output/public/_nuxt/VOosw3JB.js +1 -0
  325. package/.output/public/_nuxt/Xi2tawMN.js +1 -0
  326. package/.output/public/_nuxt/Yzrsuije.js +1 -0
  327. package/.output/public/_nuxt/ZwEiOJEn.js +1 -0
  328. package/.output/public/_nuxt/_d0M4KuU.js +1 -0
  329. package/.output/public/_nuxt/_pageId_.Be9XJqQA.css +1 -0
  330. package/.output/public/_nuxt/_ykCGR6B.js +1 -0
  331. package/.output/public/_nuxt/bCR0ucgS.js +1 -0
  332. package/.output/public/_nuxt/bN70gL4F.js +1 -0
  333. package/.output/public/_nuxt/brDaU2vB.js +1 -0
  334. package/.output/public/_nuxt/builds/latest.json +1 -0
  335. package/.output/public/_nuxt/builds/meta/c89eb61d-80e1-4ca1-b13e-521c420f664e.json +1 -0
  336. package/.output/public/_nuxt/codicon.DCmgc-ay.ttf +0 -0
  337. package/.output/public/_nuxt/components.CIe9upZ4.css +1 -0
  338. package/.output/public/_nuxt/dglhsJpM.js +1 -0
  339. package/.output/public/_nuxt/dwOrl1Do.js +1 -0
  340. package/.output/public/_nuxt/edge-router-Cceh9XsC.js +4 -0
  341. package/.output/public/_nuxt/editor.worker-7Ic39DJY.js +12 -0
  342. package/.output/public/_nuxt/entry.B__IA1SB.css +1 -0
  343. package/.output/public/_nuxt/error-404.Ctkhr_Pq.css +1 -0
  344. package/.output/public/_nuxt/error-500.BsWzRwYo.css +1 -0
  345. package/.output/public/_nuxt/f7oK2omx.js +1 -0
  346. package/.output/public/_nuxt/fqUPtzRv.js +1 -0
  347. package/.output/public/_nuxt/fuZLfV_i.js +1 -0
  348. package/.output/public/_nuxt/fve9TYiY.js +1 -0
  349. package/.output/public/_nuxt/g9-lgVsj.js +1 -0
  350. package/.output/public/_nuxt/gcz8RCvz.js +1 -0
  351. package/.output/public/_nuxt/graph-layout-CFj469YF.js +1 -0
  352. package/.output/public/_nuxt/graph-resolver-DwBTX8MB.js +175 -0
  353. package/.output/public/_nuxt/gt3opOQe.js +1 -0
  354. package/.output/public/_nuxt/hegEt444.js +1 -0
  355. package/.output/public/_nuxt/hira-1.DuDDiA5P.png +0 -0
  356. package/.output/public/_nuxt/hira-unlock-impossible.B5Pl3pvF.png +0 -0
  357. package/.output/public/_nuxt/i3Pf1NPu.js +2 -0
  358. package/.output/public/_nuxt/index.CdaM9XKS.css +1 -0
  359. package/.output/public/_nuxt/index.cU4FhqMM.css +1 -0
  360. package/.output/public/_nuxt/irsrSlf-.js +1 -0
  361. package/.output/public/_nuxt/kFPB2rqp.js +1 -0
  362. package/.output/public/_nuxt/koatKMQr.js +26 -0
  363. package/.output/public/_nuxt/lXgVvXCa.js +1 -0
  364. package/.output/public/_nuxt/materialdesignicons-webfont.B6OSyW2I.woff2 +0 -0
  365. package/.output/public/_nuxt/materialdesignicons-webfont.BpRar1d5.ttf +0 -0
  366. package/.output/public/_nuxt/materialdesignicons-webfont.Bvl3VxMs.woff +0 -0
  367. package/.output/public/_nuxt/materialdesignicons-webfont.TEmAk13K.eot +0 -0
  368. package/.output/public/_nuxt/monaco-editor.D_J4ItrK.css +1 -0
  369. package/.output/public/_nuxt/mwDqsUrW.js +1 -0
  370. package/.output/public/_nuxt/oZs8U75K.js +1 -0
  371. package/.output/public/_nuxt/operations.3bVU1gWl.css +1 -0
  372. package/.output/public/_nuxt/pkIJ47B4.js +1 -0
  373. package/.output/public/_nuxt/q-j0iyEw.js +1 -0
  374. package/.output/public/_nuxt/qliWkHmV.js +1 -0
  375. package/.output/public/_nuxt/settings.DE1a_g5Y.css +1 -0
  376. package/.output/public/_nuxt/ttev5MDP.js +1 -0
  377. package/.output/public/_nuxt/uMbE6_td.js +1 -0
  378. package/.output/public/_nuxt/v9bSWb7m.js +1 -0
  379. package/.output/public/_nuxt/vGWfd6FD.js +1 -0
  380. package/.output/public/_nuxt/vuetify.uXRHzFBB.css +5 -0
  381. package/.output/public/_nuxt/yaml.worker-DLQcEOxU.js +410 -0
  382. package/.output/public/_nuxt/yv6CvBhz.js +1 -0
  383. package/.output/public/favicon.ico +0 -0
  384. package/.output/public/libavoid.wasm +0 -0
  385. package/.output/public/robots.txt +1 -0
  386. package/.output/server/index.mjs +19869 -0
  387. package/.output/server/index.mjs.map +1 -0
  388. package/.output/server/node_modules/@babel/parser/lib/index.js +14591 -0
  389. package/.output/server/node_modules/@babel/parser/package.json +50 -0
  390. package/.output/server/node_modules/@trpc/server/dist/adapters/fetch/index.mjs +58 -0
  391. package/.output/server/node_modules/@trpc/server/dist/adapters/ws.mjs +15 -0
  392. package/.output/server/node_modules/@trpc/server/dist/contentTypeParsers-SN4WL9ze.mjs +13 -0
  393. package/.output/server/node_modules/@trpc/server/dist/getErrorShape-Uhlrl4Bk.mjs +263 -0
  394. package/.output/server/node_modules/@trpc/server/dist/http-CWyjOa1l.mjs +0 -0
  395. package/.output/server/node_modules/@trpc/server/dist/index.mjs +6 -0
  396. package/.output/server/node_modules/@trpc/server/dist/initTRPC-IT_6ZYJd.mjs +358 -0
  397. package/.output/server/node_modules/@trpc/server/dist/node-http-ZvZKxPic.mjs +222 -0
  398. package/.output/server/node_modules/@trpc/server/dist/observable-CUiPknO-.mjs +158 -0
  399. package/.output/server/node_modules/@trpc/server/dist/observable-UMO3vUa_.mjs +158 -0
  400. package/.output/server/node_modules/@trpc/server/dist/parseTRPCMessage-ByIHyFRz.mjs +63 -0
  401. package/.output/server/node_modules/@trpc/server/dist/resolveResponse-CzlbRpCI.mjs +2183 -0
  402. package/.output/server/node_modules/@trpc/server/dist/tracked-gU3ttYjg.mjs +371 -0
  403. package/.output/server/node_modules/@trpc/server/dist/unstable-core-do-not-import-D89CaGtL.mjs +29 -0
  404. package/.output/server/node_modules/@trpc/server/dist/utils-DdbbrDku.mjs +137 -0
  405. package/.output/server/node_modules/@trpc/server/dist/ws-DsZkVWpZ.mjs +420 -0
  406. package/.output/server/node_modules/@trpc/server/package.json +232 -0
  407. package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6704 -0
  408. package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
  409. package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +686 -0
  410. package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
  411. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1402 -0
  412. package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  413. package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1806 -0
  414. package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
  415. package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6700 -0
  416. package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
  417. package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1679 -0
  418. package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
  419. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +879 -0
  420. package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
  421. package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +605 -0
  422. package/.output/server/node_modules/@vue/shared/package.json +47 -0
  423. package/.output/server/node_modules/copy-anything/dist/index.js +36 -0
  424. package/.output/server/node_modules/copy-anything/package.json +108 -0
  425. package/.output/server/node_modules/devalue/index.js +3 -0
  426. package/.output/server/node_modules/devalue/package.json +34 -0
  427. package/.output/server/node_modules/devalue/src/base64.js +110 -0
  428. package/.output/server/node_modules/devalue/src/constants.js +6 -0
  429. package/.output/server/node_modules/devalue/src/parse.js +160 -0
  430. package/.output/server/node_modules/devalue/src/stringify.js +232 -0
  431. package/.output/server/node_modules/devalue/src/uneval.js +351 -0
  432. package/.output/server/node_modules/devalue/src/utils.js +113 -0
  433. package/.output/server/node_modules/entities/lib/decode.js +536 -0
  434. package/.output/server/node_modules/entities/lib/decode_codepoint.js +76 -0
  435. package/.output/server/node_modules/entities/lib/generated/decode-data-html.js +9 -0
  436. package/.output/server/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
  437. package/.output/server/node_modules/entities/package.json +90 -0
  438. package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  439. package/.output/server/node_modules/estree-walker/package.json +37 -0
  440. package/.output/server/node_modules/hookable/dist/index.mjs +290 -0
  441. package/.output/server/node_modules/hookable/package.json +49 -0
  442. package/.output/server/node_modules/is-what/dist/index.js +171 -0
  443. package/.output/server/node_modules/is-what/package.json +128 -0
  444. package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
  445. package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  446. package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
  447. package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  448. package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  449. package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  450. package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  451. package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  452. package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
  453. package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
  454. package/.output/server/node_modules/source-map-js/package.json +71 -0
  455. package/.output/server/node_modules/source-map-js/source-map.js +8 -0
  456. package/.output/server/node_modules/superjson/dist/accessDeep.js +123 -0
  457. package/.output/server/node_modules/superjson/dist/class-registry.js +22 -0
  458. package/.output/server/node_modules/superjson/dist/custom-transformer-registry.js +16 -0
  459. package/.output/server/node_modules/superjson/dist/double-indexed-kv.js +21 -0
  460. package/.output/server/node_modules/superjson/dist/index.js +89 -0
  461. package/.output/server/node_modules/superjson/dist/is.js +35 -0
  462. package/.output/server/node_modules/superjson/dist/pathstringifier.js +29 -0
  463. package/.output/server/node_modules/superjson/dist/plainer.js +173 -0
  464. package/.output/server/node_modules/superjson/dist/registry.js +26 -0
  465. package/.output/server/node_modules/superjson/dist/transformer.js +197 -0
  466. package/.output/server/node_modules/superjson/dist/util.js +45 -0
  467. package/.output/server/node_modules/superjson/package.json +79 -0
  468. package/.output/server/node_modules/ufo/dist/index.mjs +638 -0
  469. package/.output/server/node_modules/ufo/package.json +47 -0
  470. package/.output/server/node_modules/unhead/dist/plugins.mjs +101 -0
  471. package/.output/server/node_modules/unhead/dist/server.mjs +219 -0
  472. package/.output/server/node_modules/unhead/dist/shared/unhead.BYvz9V1x.mjs +43 -0
  473. package/.output/server/node_modules/unhead/dist/shared/unhead.BpRRHAhY.mjs +194 -0
  474. package/.output/server/node_modules/unhead/dist/shared/unhead.CApf5sj3.mjs +148 -0
  475. package/.output/server/node_modules/unhead/dist/shared/unhead.DH45uomy.mjs +180 -0
  476. package/.output/server/node_modules/unhead/dist/shared/unhead.DQc16pHI.mjs +196 -0
  477. package/.output/server/node_modules/unhead/dist/shared/unhead.DZbvapt-.mjs +70 -0
  478. package/.output/server/node_modules/unhead/dist/shared/unhead.Djo8ep_Y.mjs +166 -0
  479. package/.output/server/node_modules/unhead/dist/shared/unhead.yem5I2v_.mjs +38 -0
  480. package/.output/server/node_modules/unhead/dist/utils.mjs +5 -0
  481. package/.output/server/node_modules/unhead/package.json +101 -0
  482. package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
  483. package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  484. package/.output/server/node_modules/vue/index.js +7 -0
  485. package/.output/server/node_modules/vue/index.mjs +1 -0
  486. package/.output/server/node_modules/vue/package.json +112 -0
  487. package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
  488. package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +196 -0
  489. package/.output/server/node_modules/vue-bundle-renderer/package.json +50 -0
  490. package/.output/server/node_modules/ws/lib/buffer-util.js +131 -0
  491. package/.output/server/node_modules/ws/lib/constants.js +18 -0
  492. package/.output/server/node_modules/ws/lib/event-target.js +292 -0
  493. package/.output/server/node_modules/ws/lib/extension.js +203 -0
  494. package/.output/server/node_modules/ws/lib/limiter.js +55 -0
  495. package/.output/server/node_modules/ws/lib/permessage-deflate.js +528 -0
  496. package/.output/server/node_modules/ws/lib/receiver.js +706 -0
  497. package/.output/server/node_modules/ws/lib/sender.js +602 -0
  498. package/.output/server/node_modules/ws/lib/stream.js +161 -0
  499. package/.output/server/node_modules/ws/lib/subprotocol.js +62 -0
  500. package/.output/server/node_modules/ws/lib/validation.js +152 -0
  501. package/.output/server/node_modules/ws/lib/websocket-server.js +550 -0
  502. package/.output/server/node_modules/ws/lib/websocket.js +1388 -0
  503. package/.output/server/node_modules/ws/package.json +69 -0
  504. package/.output/server/node_modules/ws/wrapper.mjs +8 -0
  505. package/.output/server/node_modules/zod/index.js +4 -0
  506. package/.output/server/node_modules/zod/package.json +131 -0
  507. package/.output/server/node_modules/zod/v4/classic/checks.js +1 -0
  508. package/.output/server/node_modules/zod/v4/classic/coerce.js +17 -0
  509. package/.output/server/node_modules/zod/v4/classic/compat.js +31 -0
  510. package/.output/server/node_modules/zod/v4/classic/errors.js +41 -0
  511. package/.output/server/node_modules/zod/v4/classic/external.js +18 -0
  512. package/.output/server/node_modules/zod/v4/classic/iso.js +30 -0
  513. package/.output/server/node_modules/zod/v4/classic/parse.js +6 -0
  514. package/.output/server/node_modules/zod/v4/classic/schemas.js +1006 -0
  515. package/.output/server/node_modules/zod/v4/core/api.js +906 -0
  516. package/.output/server/node_modules/zod/v4/core/checks.js +565 -0
  517. package/.output/server/node_modules/zod/v4/core/core.js +61 -0
  518. package/.output/server/node_modules/zod/v4/core/doc.js +35 -0
  519. package/.output/server/node_modules/zod/v4/core/errors.js +195 -0
  520. package/.output/server/node_modules/zod/v4/core/function.js +75 -0
  521. package/.output/server/node_modules/zod/v4/core/index.js +15 -0
  522. package/.output/server/node_modules/zod/v4/core/json-schema.js +1 -0
  523. package/.output/server/node_modules/zod/v4/core/parse.js +57 -0
  524. package/.output/server/node_modules/zod/v4/core/regexes.js +95 -0
  525. package/.output/server/node_modules/zod/v4/core/registries.js +51 -0
  526. package/.output/server/node_modules/zod/v4/core/schemas.js +1718 -0
  527. package/.output/server/node_modules/zod/v4/core/to-json-schema.js +849 -0
  528. package/.output/server/node_modules/zod/v4/core/util.js +493 -0
  529. package/.output/server/node_modules/zod/v4/core/versions.js +5 -0
  530. package/.output/server/node_modules/zod/v4/locales/ar.js +116 -0
  531. package/.output/server/node_modules/zod/v4/locales/az.js +115 -0
  532. package/.output/server/node_modules/zod/v4/locales/be.js +164 -0
  533. package/.output/server/node_modules/zod/v4/locales/ca.js +118 -0
  534. package/.output/server/node_modules/zod/v4/locales/cs.js +135 -0
  535. package/.output/server/node_modules/zod/v4/locales/de.js +116 -0
  536. package/.output/server/node_modules/zod/v4/locales/en.js +117 -0
  537. package/.output/server/node_modules/zod/v4/locales/eo.js +116 -0
  538. package/.output/server/node_modules/zod/v4/locales/es.js +117 -0
  539. package/.output/server/node_modules/zod/v4/locales/fa.js +122 -0
  540. package/.output/server/node_modules/zod/v4/locales/fi.js +122 -0
  541. package/.output/server/node_modules/zod/v4/locales/fr-CA.js +117 -0
  542. package/.output/server/node_modules/zod/v4/locales/fr.js +116 -0
  543. package/.output/server/node_modules/zod/v4/locales/he.js +117 -0
  544. package/.output/server/node_modules/zod/v4/locales/hu.js +117 -0
  545. package/.output/server/node_modules/zod/v4/locales/id.js +116 -0
  546. package/.output/server/node_modules/zod/v4/locales/index.js +39 -0
  547. package/.output/server/node_modules/zod/v4/locales/it.js +117 -0
  548. package/.output/server/node_modules/zod/v4/locales/ja.js +115 -0
  549. package/.output/server/node_modules/zod/v4/locales/kh.js +117 -0
  550. package/.output/server/node_modules/zod/v4/locales/ko.js +121 -0
  551. package/.output/server/node_modules/zod/v4/locales/mk.js +118 -0
  552. package/.output/server/node_modules/zod/v4/locales/ms.js +116 -0
  553. package/.output/server/node_modules/zod/v4/locales/nl.js +117 -0
  554. package/.output/server/node_modules/zod/v4/locales/no.js +116 -0
  555. package/.output/server/node_modules/zod/v4/locales/ota.js +117 -0
  556. package/.output/server/node_modules/zod/v4/locales/pl.js +117 -0
  557. package/.output/server/node_modules/zod/v4/locales/ps.js +122 -0
  558. package/.output/server/node_modules/zod/v4/locales/pt.js +116 -0
  559. package/.output/server/node_modules/zod/v4/locales/ru.js +164 -0
  560. package/.output/server/node_modules/zod/v4/locales/sl.js +117 -0
  561. package/.output/server/node_modules/zod/v4/locales/sv.js +118 -0
  562. package/.output/server/node_modules/zod/v4/locales/ta.js +117 -0
  563. package/.output/server/node_modules/zod/v4/locales/th.js +117 -0
  564. package/.output/server/node_modules/zod/v4/locales/tr.js +115 -0
  565. package/.output/server/node_modules/zod/v4/locales/ua.js +117 -0
  566. package/.output/server/node_modules/zod/v4/locales/ur.js +117 -0
  567. package/.output/server/node_modules/zod/v4/locales/vi.js +116 -0
  568. package/.output/server/node_modules/zod/v4/locales/zh-CN.js +116 -0
  569. package/.output/server/node_modules/zod/v4/locales/zh-TW.js +117 -0
  570. package/.output/server/package.json +32 -0
  571. package/package.json +16 -12
@@ -0,0 +1,1718 @@
1
+ import * as checks from "./checks.js";
2
+ import * as core from "./core.js";
3
+ import { Doc } from "./doc.js";
4
+ import { safeParse, safeParseAsync } from "./parse.js";
5
+ import * as regexes from "./regexes.js";
6
+ import * as util from "./util.js";
7
+ import { version } from "./versions.js";
8
+ export const $ZodType = /*@__PURE__*/ core.$constructor("$ZodType", (inst, def) => {
9
+ var _a;
10
+ inst ?? (inst = {});
11
+ inst._zod.def = def; // set _def property
12
+ inst._zod.bag = inst._zod.bag || {}; // initialize _bag object
13
+ inst._zod.version = version;
14
+ const checks = [...(inst._zod.def.checks ?? [])];
15
+ // if inst is itself a checks.$ZodCheck, run it as a check
16
+ if (inst._zod.traits.has("$ZodCheck")) {
17
+ checks.unshift(inst);
18
+ }
19
+ //
20
+ for (const ch of checks) {
21
+ for (const fn of ch._zod.onattach) {
22
+ fn(inst);
23
+ }
24
+ }
25
+ if (checks.length === 0) {
26
+ // deferred initializer
27
+ // inst._zod.parse is not yet defined
28
+ (_a = inst._zod).deferred ?? (_a.deferred = []);
29
+ inst._zod.deferred?.push(() => {
30
+ inst._zod.run = inst._zod.parse;
31
+ });
32
+ }
33
+ else {
34
+ const runChecks = (payload, checks, ctx) => {
35
+ let isAborted = util.aborted(payload);
36
+ let asyncResult;
37
+ for (const ch of checks) {
38
+ if (ch._zod.def.when) {
39
+ const shouldRun = ch._zod.def.when(payload);
40
+ if (!shouldRun)
41
+ continue;
42
+ }
43
+ else if (isAborted) {
44
+ continue;
45
+ }
46
+ const currLen = payload.issues.length;
47
+ const _ = ch._zod.check(payload);
48
+ if (_ instanceof Promise && ctx?.async === false) {
49
+ throw new core.$ZodAsyncError();
50
+ }
51
+ if (asyncResult || _ instanceof Promise) {
52
+ asyncResult = (asyncResult ?? Promise.resolve()).then(async () => {
53
+ await _;
54
+ const nextLen = payload.issues.length;
55
+ if (nextLen === currLen)
56
+ return;
57
+ if (!isAborted)
58
+ isAborted = util.aborted(payload, currLen);
59
+ });
60
+ }
61
+ else {
62
+ const nextLen = payload.issues.length;
63
+ if (nextLen === currLen)
64
+ continue;
65
+ if (!isAborted)
66
+ isAborted = util.aborted(payload, currLen);
67
+ }
68
+ }
69
+ if (asyncResult) {
70
+ return asyncResult.then(() => {
71
+ return payload;
72
+ });
73
+ }
74
+ return payload;
75
+ };
76
+ inst._zod.run = (payload, ctx) => {
77
+ const result = inst._zod.parse(payload, ctx);
78
+ if (result instanceof Promise) {
79
+ if (ctx.async === false)
80
+ throw new core.$ZodAsyncError();
81
+ return result.then((result) => runChecks(result, checks, ctx));
82
+ }
83
+ return runChecks(result, checks, ctx);
84
+ };
85
+ }
86
+ inst["~standard"] = {
87
+ validate: (value) => {
88
+ try {
89
+ const r = safeParse(inst, value);
90
+ return r.success ? { value: r.data } : { issues: r.error?.issues };
91
+ }
92
+ catch (_) {
93
+ return safeParseAsync(inst, value).then((r) => (r.success ? { value: r.data } : { issues: r.error?.issues }));
94
+ }
95
+ },
96
+ vendor: "zod",
97
+ version: 1,
98
+ };
99
+ });
100
+ export { clone } from "./util.js";
101
+ export const $ZodString = /*@__PURE__*/ core.$constructor("$ZodString", (inst, def) => {
102
+ $ZodType.init(inst, def);
103
+ inst._zod.pattern = [...(inst?._zod.bag?.patterns ?? [])].pop() ?? regexes.string(inst._zod.bag);
104
+ inst._zod.parse = (payload, _) => {
105
+ if (def.coerce)
106
+ try {
107
+ payload.value = String(payload.value);
108
+ }
109
+ catch (_) { }
110
+ if (typeof payload.value === "string")
111
+ return payload;
112
+ payload.issues.push({
113
+ expected: "string",
114
+ code: "invalid_type",
115
+ input: payload.value,
116
+ inst,
117
+ });
118
+ return payload;
119
+ };
120
+ });
121
+ export const $ZodStringFormat = /*@__PURE__*/ core.$constructor("$ZodStringFormat", (inst, def) => {
122
+ // check initialization must come first
123
+ checks.$ZodCheckStringFormat.init(inst, def);
124
+ $ZodString.init(inst, def);
125
+ });
126
+ export const $ZodGUID = /*@__PURE__*/ core.$constructor("$ZodGUID", (inst, def) => {
127
+ def.pattern ?? (def.pattern = regexes.guid);
128
+ $ZodStringFormat.init(inst, def);
129
+ });
130
+ export const $ZodUUID = /*@__PURE__*/ core.$constructor("$ZodUUID", (inst, def) => {
131
+ if (def.version) {
132
+ const versionMap = {
133
+ v1: 1,
134
+ v2: 2,
135
+ v3: 3,
136
+ v4: 4,
137
+ v5: 5,
138
+ v6: 6,
139
+ v7: 7,
140
+ v8: 8,
141
+ };
142
+ const v = versionMap[def.version];
143
+ if (v === undefined)
144
+ throw new Error(`Invalid UUID version: "${def.version}"`);
145
+ def.pattern ?? (def.pattern = regexes.uuid(v));
146
+ }
147
+ else
148
+ def.pattern ?? (def.pattern = regexes.uuid());
149
+ $ZodStringFormat.init(inst, def);
150
+ });
151
+ export const $ZodEmail = /*@__PURE__*/ core.$constructor("$ZodEmail", (inst, def) => {
152
+ def.pattern ?? (def.pattern = regexes.email);
153
+ $ZodStringFormat.init(inst, def);
154
+ });
155
+ export const $ZodURL = /*@__PURE__*/ core.$constructor("$ZodURL", (inst, def) => {
156
+ $ZodStringFormat.init(inst, def);
157
+ inst._zod.check = (payload) => {
158
+ try {
159
+ const orig = payload.value;
160
+ const url = new URL(orig);
161
+ const href = url.href;
162
+ if (def.hostname) {
163
+ def.hostname.lastIndex = 0;
164
+ if (!def.hostname.test(url.hostname)) {
165
+ payload.issues.push({
166
+ code: "invalid_format",
167
+ format: "url",
168
+ note: "Invalid hostname",
169
+ pattern: regexes.hostname.source,
170
+ input: payload.value,
171
+ inst,
172
+ continue: !def.abort,
173
+ });
174
+ }
175
+ }
176
+ if (def.protocol) {
177
+ def.protocol.lastIndex = 0;
178
+ if (!def.protocol.test(url.protocol.endsWith(":") ? url.protocol.slice(0, -1) : url.protocol)) {
179
+ payload.issues.push({
180
+ code: "invalid_format",
181
+ format: "url",
182
+ note: "Invalid protocol",
183
+ pattern: def.protocol.source,
184
+ input: payload.value,
185
+ inst,
186
+ continue: !def.abort,
187
+ });
188
+ }
189
+ }
190
+ // payload.value = url.href;
191
+ if (!orig.endsWith("/") && href.endsWith("/")) {
192
+ payload.value = href.slice(0, -1);
193
+ }
194
+ else {
195
+ payload.value = href;
196
+ }
197
+ return;
198
+ }
199
+ catch (_) {
200
+ payload.issues.push({
201
+ code: "invalid_format",
202
+ format: "url",
203
+ input: payload.value,
204
+ inst,
205
+ continue: !def.abort,
206
+ });
207
+ }
208
+ };
209
+ });
210
+ export const $ZodEmoji = /*@__PURE__*/ core.$constructor("$ZodEmoji", (inst, def) => {
211
+ def.pattern ?? (def.pattern = regexes.emoji());
212
+ $ZodStringFormat.init(inst, def);
213
+ });
214
+ export const $ZodNanoID = /*@__PURE__*/ core.$constructor("$ZodNanoID", (inst, def) => {
215
+ def.pattern ?? (def.pattern = regexes.nanoid);
216
+ $ZodStringFormat.init(inst, def);
217
+ });
218
+ export const $ZodCUID = /*@__PURE__*/ core.$constructor("$ZodCUID", (inst, def) => {
219
+ def.pattern ?? (def.pattern = regexes.cuid);
220
+ $ZodStringFormat.init(inst, def);
221
+ });
222
+ export const $ZodCUID2 = /*@__PURE__*/ core.$constructor("$ZodCUID2", (inst, def) => {
223
+ def.pattern ?? (def.pattern = regexes.cuid2);
224
+ $ZodStringFormat.init(inst, def);
225
+ });
226
+ export const $ZodULID = /*@__PURE__*/ core.$constructor("$ZodULID", (inst, def) => {
227
+ def.pattern ?? (def.pattern = regexes.ulid);
228
+ $ZodStringFormat.init(inst, def);
229
+ });
230
+ export const $ZodXID = /*@__PURE__*/ core.$constructor("$ZodXID", (inst, def) => {
231
+ def.pattern ?? (def.pattern = regexes.xid);
232
+ $ZodStringFormat.init(inst, def);
233
+ });
234
+ export const $ZodKSUID = /*@__PURE__*/ core.$constructor("$ZodKSUID", (inst, def) => {
235
+ def.pattern ?? (def.pattern = regexes.ksuid);
236
+ $ZodStringFormat.init(inst, def);
237
+ });
238
+ export const $ZodISODateTime = /*@__PURE__*/ core.$constructor("$ZodISODateTime", (inst, def) => {
239
+ def.pattern ?? (def.pattern = regexes.datetime(def));
240
+ $ZodStringFormat.init(inst, def);
241
+ });
242
+ export const $ZodISODate = /*@__PURE__*/ core.$constructor("$ZodISODate", (inst, def) => {
243
+ def.pattern ?? (def.pattern = regexes.date);
244
+ $ZodStringFormat.init(inst, def);
245
+ });
246
+ export const $ZodISOTime = /*@__PURE__*/ core.$constructor("$ZodISOTime", (inst, def) => {
247
+ def.pattern ?? (def.pattern = regexes.time(def));
248
+ $ZodStringFormat.init(inst, def);
249
+ });
250
+ export const $ZodISODuration = /*@__PURE__*/ core.$constructor("$ZodISODuration", (inst, def) => {
251
+ def.pattern ?? (def.pattern = regexes.duration);
252
+ $ZodStringFormat.init(inst, def);
253
+ });
254
+ export const $ZodIPv4 = /*@__PURE__*/ core.$constructor("$ZodIPv4", (inst, def) => {
255
+ def.pattern ?? (def.pattern = regexes.ipv4);
256
+ $ZodStringFormat.init(inst, def);
257
+ inst._zod.onattach.push((inst) => {
258
+ const bag = inst._zod.bag;
259
+ bag.format = `ipv4`;
260
+ });
261
+ });
262
+ export const $ZodIPv6 = /*@__PURE__*/ core.$constructor("$ZodIPv6", (inst, def) => {
263
+ def.pattern ?? (def.pattern = regexes.ipv6);
264
+ $ZodStringFormat.init(inst, def);
265
+ inst._zod.onattach.push((inst) => {
266
+ const bag = inst._zod.bag;
267
+ bag.format = `ipv6`;
268
+ });
269
+ inst._zod.check = (payload) => {
270
+ try {
271
+ new URL(`http://[${payload.value}]`);
272
+ // return;
273
+ }
274
+ catch {
275
+ payload.issues.push({
276
+ code: "invalid_format",
277
+ format: "ipv6",
278
+ input: payload.value,
279
+ inst,
280
+ continue: !def.abort,
281
+ });
282
+ }
283
+ };
284
+ });
285
+ export const $ZodCIDRv4 = /*@__PURE__*/ core.$constructor("$ZodCIDRv4", (inst, def) => {
286
+ def.pattern ?? (def.pattern = regexes.cidrv4);
287
+ $ZodStringFormat.init(inst, def);
288
+ });
289
+ export const $ZodCIDRv6 = /*@__PURE__*/ core.$constructor("$ZodCIDRv6", (inst, def) => {
290
+ def.pattern ?? (def.pattern = regexes.cidrv6); // not used for validation
291
+ $ZodStringFormat.init(inst, def);
292
+ inst._zod.check = (payload) => {
293
+ const [address, prefix] = payload.value.split("/");
294
+ try {
295
+ if (!prefix)
296
+ throw new Error();
297
+ const prefixNum = Number(prefix);
298
+ if (`${prefixNum}` !== prefix)
299
+ throw new Error();
300
+ if (prefixNum < 0 || prefixNum > 128)
301
+ throw new Error();
302
+ new URL(`http://[${address}]`);
303
+ }
304
+ catch {
305
+ payload.issues.push({
306
+ code: "invalid_format",
307
+ format: "cidrv6",
308
+ input: payload.value,
309
+ inst,
310
+ continue: !def.abort,
311
+ });
312
+ }
313
+ };
314
+ });
315
+ ////////////////////////////// ZodBase64 //////////////////////////////
316
+ export function isValidBase64(data) {
317
+ if (data === "")
318
+ return true;
319
+ if (data.length % 4 !== 0)
320
+ return false;
321
+ try {
322
+ atob(data);
323
+ return true;
324
+ }
325
+ catch {
326
+ return false;
327
+ }
328
+ }
329
+ export const $ZodBase64 = /*@__PURE__*/ core.$constructor("$ZodBase64", (inst, def) => {
330
+ def.pattern ?? (def.pattern = regexes.base64);
331
+ $ZodStringFormat.init(inst, def);
332
+ inst._zod.onattach.push((inst) => {
333
+ inst._zod.bag.contentEncoding = "base64";
334
+ });
335
+ inst._zod.check = (payload) => {
336
+ if (isValidBase64(payload.value))
337
+ return;
338
+ payload.issues.push({
339
+ code: "invalid_format",
340
+ format: "base64",
341
+ input: payload.value,
342
+ inst,
343
+ continue: !def.abort,
344
+ });
345
+ };
346
+ });
347
+ ////////////////////////////// ZodBase64 //////////////////////////////
348
+ export function isValidBase64URL(data) {
349
+ if (!regexes.base64url.test(data))
350
+ return false;
351
+ const base64 = data.replace(/[-_]/g, (c) => (c === "-" ? "+" : "/"));
352
+ const padded = base64.padEnd(Math.ceil(base64.length / 4) * 4, "=");
353
+ return isValidBase64(padded);
354
+ }
355
+ export const $ZodBase64URL = /*@__PURE__*/ core.$constructor("$ZodBase64URL", (inst, def) => {
356
+ def.pattern ?? (def.pattern = regexes.base64url);
357
+ $ZodStringFormat.init(inst, def);
358
+ inst._zod.onattach.push((inst) => {
359
+ inst._zod.bag.contentEncoding = "base64url";
360
+ });
361
+ inst._zod.check = (payload) => {
362
+ if (isValidBase64URL(payload.value))
363
+ return;
364
+ payload.issues.push({
365
+ code: "invalid_format",
366
+ format: "base64url",
367
+ input: payload.value,
368
+ inst,
369
+ continue: !def.abort,
370
+ });
371
+ };
372
+ });
373
+ export const $ZodE164 = /*@__PURE__*/ core.$constructor("$ZodE164", (inst, def) => {
374
+ def.pattern ?? (def.pattern = regexes.e164);
375
+ $ZodStringFormat.init(inst, def);
376
+ });
377
+ ////////////////////////////// ZodJWT //////////////////////////////
378
+ export function isValidJWT(token, algorithm = null) {
379
+ try {
380
+ const tokensParts = token.split(".");
381
+ if (tokensParts.length !== 3)
382
+ return false;
383
+ const [header] = tokensParts;
384
+ if (!header)
385
+ return false;
386
+ const parsedHeader = JSON.parse(atob(header));
387
+ if ("typ" in parsedHeader && parsedHeader?.typ !== "JWT")
388
+ return false;
389
+ if (!parsedHeader.alg)
390
+ return false;
391
+ if (algorithm && (!("alg" in parsedHeader) || parsedHeader.alg !== algorithm))
392
+ return false;
393
+ return true;
394
+ }
395
+ catch {
396
+ return false;
397
+ }
398
+ }
399
+ export const $ZodJWT = /*@__PURE__*/ core.$constructor("$ZodJWT", (inst, def) => {
400
+ $ZodStringFormat.init(inst, def);
401
+ inst._zod.check = (payload) => {
402
+ if (isValidJWT(payload.value, def.alg))
403
+ return;
404
+ payload.issues.push({
405
+ code: "invalid_format",
406
+ format: "jwt",
407
+ input: payload.value,
408
+ inst,
409
+ continue: !def.abort,
410
+ });
411
+ };
412
+ });
413
+ export const $ZodCustomStringFormat = /*@__PURE__*/ core.$constructor("$ZodCustomStringFormat", (inst, def) => {
414
+ $ZodStringFormat.init(inst, def);
415
+ inst._zod.check = (payload) => {
416
+ if (def.fn(payload.value))
417
+ return;
418
+ payload.issues.push({
419
+ code: "invalid_format",
420
+ format: def.format,
421
+ input: payload.value,
422
+ inst,
423
+ continue: !def.abort,
424
+ });
425
+ };
426
+ });
427
+ export const $ZodNumber = /*@__PURE__*/ core.$constructor("$ZodNumber", (inst, def) => {
428
+ $ZodType.init(inst, def);
429
+ inst._zod.pattern = inst._zod.bag.pattern ?? regexes.number;
430
+ inst._zod.parse = (payload, _ctx) => {
431
+ if (def.coerce)
432
+ try {
433
+ payload.value = Number(payload.value);
434
+ }
435
+ catch (_) { }
436
+ const input = payload.value;
437
+ if (typeof input === "number" && !Number.isNaN(input) && Number.isFinite(input)) {
438
+ return payload;
439
+ }
440
+ const received = typeof input === "number"
441
+ ? Number.isNaN(input)
442
+ ? "NaN"
443
+ : !Number.isFinite(input)
444
+ ? "Infinity"
445
+ : undefined
446
+ : undefined;
447
+ payload.issues.push({
448
+ expected: "number",
449
+ code: "invalid_type",
450
+ input,
451
+ inst,
452
+ ...(received ? { received } : {}),
453
+ });
454
+ return payload;
455
+ };
456
+ });
457
+ export const $ZodNumberFormat = /*@__PURE__*/ core.$constructor("$ZodNumber", (inst, def) => {
458
+ checks.$ZodCheckNumberFormat.init(inst, def);
459
+ $ZodNumber.init(inst, def); // no format checksp
460
+ });
461
+ export const $ZodBoolean = /*@__PURE__*/ core.$constructor("$ZodBoolean", (inst, def) => {
462
+ $ZodType.init(inst, def);
463
+ inst._zod.pattern = regexes.boolean;
464
+ inst._zod.parse = (payload, _ctx) => {
465
+ if (def.coerce)
466
+ try {
467
+ payload.value = Boolean(payload.value);
468
+ }
469
+ catch (_) { }
470
+ const input = payload.value;
471
+ if (typeof input === "boolean")
472
+ return payload;
473
+ payload.issues.push({
474
+ expected: "boolean",
475
+ code: "invalid_type",
476
+ input,
477
+ inst,
478
+ });
479
+ return payload;
480
+ };
481
+ });
482
+ export const $ZodBigInt = /*@__PURE__*/ core.$constructor("$ZodBigInt", (inst, def) => {
483
+ $ZodType.init(inst, def);
484
+ inst._zod.pattern = regexes.bigint;
485
+ inst._zod.parse = (payload, _ctx) => {
486
+ if (def.coerce)
487
+ try {
488
+ payload.value = BigInt(payload.value);
489
+ }
490
+ catch (_) { }
491
+ if (typeof payload.value === "bigint")
492
+ return payload;
493
+ payload.issues.push({
494
+ expected: "bigint",
495
+ code: "invalid_type",
496
+ input: payload.value,
497
+ inst,
498
+ });
499
+ return payload;
500
+ };
501
+ });
502
+ export const $ZodBigIntFormat = /*@__PURE__*/ core.$constructor("$ZodBigInt", (inst, def) => {
503
+ checks.$ZodCheckBigIntFormat.init(inst, def);
504
+ $ZodBigInt.init(inst, def); // no format checks
505
+ });
506
+ export const $ZodSymbol = /*@__PURE__*/ core.$constructor("$ZodSymbol", (inst, def) => {
507
+ $ZodType.init(inst, def);
508
+ inst._zod.parse = (payload, _ctx) => {
509
+ const input = payload.value;
510
+ if (typeof input === "symbol")
511
+ return payload;
512
+ payload.issues.push({
513
+ expected: "symbol",
514
+ code: "invalid_type",
515
+ input,
516
+ inst,
517
+ });
518
+ return payload;
519
+ };
520
+ });
521
+ export const $ZodUndefined = /*@__PURE__*/ core.$constructor("$ZodUndefined", (inst, def) => {
522
+ $ZodType.init(inst, def);
523
+ inst._zod.pattern = regexes.undefined;
524
+ inst._zod.values = new Set([undefined]);
525
+ inst._zod.optin = "optional";
526
+ inst._zod.optout = "optional";
527
+ inst._zod.parse = (payload, _ctx) => {
528
+ const input = payload.value;
529
+ if (typeof input === "undefined")
530
+ return payload;
531
+ payload.issues.push({
532
+ expected: "undefined",
533
+ code: "invalid_type",
534
+ input,
535
+ inst,
536
+ });
537
+ return payload;
538
+ };
539
+ });
540
+ export const $ZodNull = /*@__PURE__*/ core.$constructor("$ZodNull", (inst, def) => {
541
+ $ZodType.init(inst, def);
542
+ inst._zod.pattern = regexes.null;
543
+ inst._zod.values = new Set([null]);
544
+ inst._zod.parse = (payload, _ctx) => {
545
+ const input = payload.value;
546
+ if (input === null)
547
+ return payload;
548
+ payload.issues.push({
549
+ expected: "null",
550
+ code: "invalid_type",
551
+ input,
552
+ inst,
553
+ });
554
+ return payload;
555
+ };
556
+ });
557
+ export const $ZodAny = /*@__PURE__*/ core.$constructor("$ZodAny", (inst, def) => {
558
+ $ZodType.init(inst, def);
559
+ inst._zod.parse = (payload) => payload;
560
+ });
561
+ export const $ZodUnknown = /*@__PURE__*/ core.$constructor("$ZodUnknown", (inst, def) => {
562
+ $ZodType.init(inst, def);
563
+ inst._zod.parse = (payload) => payload;
564
+ });
565
+ export const $ZodNever = /*@__PURE__*/ core.$constructor("$ZodNever", (inst, def) => {
566
+ $ZodType.init(inst, def);
567
+ inst._zod.parse = (payload, _ctx) => {
568
+ payload.issues.push({
569
+ expected: "never",
570
+ code: "invalid_type",
571
+ input: payload.value,
572
+ inst,
573
+ });
574
+ return payload;
575
+ };
576
+ });
577
+ export const $ZodVoid = /*@__PURE__*/ core.$constructor("$ZodVoid", (inst, def) => {
578
+ $ZodType.init(inst, def);
579
+ inst._zod.parse = (payload, _ctx) => {
580
+ const input = payload.value;
581
+ if (typeof input === "undefined")
582
+ return payload;
583
+ payload.issues.push({
584
+ expected: "void",
585
+ code: "invalid_type",
586
+ input,
587
+ inst,
588
+ });
589
+ return payload;
590
+ };
591
+ });
592
+ export const $ZodDate = /*@__PURE__*/ core.$constructor("$ZodDate", (inst, def) => {
593
+ $ZodType.init(inst, def);
594
+ inst._zod.parse = (payload, _ctx) => {
595
+ if (def.coerce) {
596
+ try {
597
+ payload.value = new Date(payload.value);
598
+ }
599
+ catch (_err) { }
600
+ }
601
+ const input = payload.value;
602
+ const isDate = input instanceof Date;
603
+ const isValidDate = isDate && !Number.isNaN(input.getTime());
604
+ if (isValidDate)
605
+ return payload;
606
+ payload.issues.push({
607
+ expected: "date",
608
+ code: "invalid_type",
609
+ input,
610
+ ...(isDate ? { received: "Invalid Date" } : {}),
611
+ inst,
612
+ });
613
+ return payload;
614
+ };
615
+ });
616
+ function handleArrayResult(result, final, index) {
617
+ if (result.issues.length) {
618
+ final.issues.push(...util.prefixIssues(index, result.issues));
619
+ }
620
+ final.value[index] = result.value;
621
+ }
622
+ export const $ZodArray = /*@__PURE__*/ core.$constructor("$ZodArray", (inst, def) => {
623
+ $ZodType.init(inst, def);
624
+ inst._zod.parse = (payload, ctx) => {
625
+ const input = payload.value;
626
+ if (!Array.isArray(input)) {
627
+ payload.issues.push({
628
+ expected: "array",
629
+ code: "invalid_type",
630
+ input,
631
+ inst,
632
+ });
633
+ return payload;
634
+ }
635
+ payload.value = Array(input.length);
636
+ const proms = [];
637
+ for (let i = 0; i < input.length; i++) {
638
+ const item = input[i];
639
+ const result = def.element._zod.run({
640
+ value: item,
641
+ issues: [],
642
+ }, ctx);
643
+ if (result instanceof Promise) {
644
+ proms.push(result.then((result) => handleArrayResult(result, payload, i)));
645
+ }
646
+ else {
647
+ handleArrayResult(result, payload, i);
648
+ }
649
+ }
650
+ if (proms.length) {
651
+ return Promise.all(proms).then(() => payload);
652
+ }
653
+ return payload; //handleArrayResultsAsync(parseResults, final);
654
+ };
655
+ });
656
+ function handleObjectResult(result, final, key) {
657
+ // if(isOptional)
658
+ if (result.issues.length) {
659
+ final.issues.push(...util.prefixIssues(key, result.issues));
660
+ }
661
+ final.value[key] = result.value;
662
+ }
663
+ function handleOptionalObjectResult(result, final, key, input) {
664
+ if (result.issues.length) {
665
+ // validation failed against value schema
666
+ if (input[key] === undefined) {
667
+ // if input was undefined, ignore the error
668
+ if (key in input) {
669
+ final.value[key] = undefined;
670
+ }
671
+ else {
672
+ final.value[key] = result.value;
673
+ }
674
+ }
675
+ else {
676
+ final.issues.push(...util.prefixIssues(key, result.issues));
677
+ }
678
+ }
679
+ else if (result.value === undefined) {
680
+ // validation returned `undefined`
681
+ if (key in input)
682
+ final.value[key] = undefined;
683
+ }
684
+ else {
685
+ // non-undefined value
686
+ final.value[key] = result.value;
687
+ }
688
+ }
689
+ export const $ZodObject = /*@__PURE__*/ core.$constructor("$ZodObject", (inst, def) => {
690
+ // requires cast because technically $ZodObject doesn't extend
691
+ $ZodType.init(inst, def);
692
+ const _normalized = util.cached(() => {
693
+ const keys = Object.keys(def.shape);
694
+ for (const k of keys) {
695
+ if (!(def.shape[k] instanceof $ZodType)) {
696
+ throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
697
+ }
698
+ }
699
+ const okeys = util.optionalKeys(def.shape);
700
+ return {
701
+ shape: def.shape,
702
+ keys,
703
+ keySet: new Set(keys),
704
+ numKeys: keys.length,
705
+ optionalKeys: new Set(okeys),
706
+ };
707
+ });
708
+ util.defineLazy(inst._zod, "propValues", () => {
709
+ const shape = def.shape;
710
+ const propValues = {};
711
+ for (const key in shape) {
712
+ const field = shape[key]._zod;
713
+ if (field.values) {
714
+ propValues[key] ?? (propValues[key] = new Set());
715
+ for (const v of field.values)
716
+ propValues[key].add(v);
717
+ }
718
+ }
719
+ return propValues;
720
+ });
721
+ const generateFastpass = (shape) => {
722
+ const doc = new Doc(["shape", "payload", "ctx"]);
723
+ const normalized = _normalized.value;
724
+ const parseStr = (key) => {
725
+ const k = util.esc(key);
726
+ return `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
727
+ };
728
+ doc.write(`const input = payload.value;`);
729
+ const ids = Object.create(null);
730
+ let counter = 0;
731
+ for (const key of normalized.keys) {
732
+ ids[key] = `key_${counter++}`;
733
+ }
734
+ // A: preserve key order {
735
+ doc.write(`const newResult = {}`);
736
+ for (const key of normalized.keys) {
737
+ if (normalized.optionalKeys.has(key)) {
738
+ const id = ids[key];
739
+ doc.write(`const ${id} = ${parseStr(key)};`);
740
+ const k = util.esc(key);
741
+ doc.write(`
742
+ if (${id}.issues.length) {
743
+ if (input[${k}] === undefined) {
744
+ if (${k} in input) {
745
+ newResult[${k}] = undefined;
746
+ }
747
+ } else {
748
+ payload.issues = payload.issues.concat(
749
+ ${id}.issues.map((iss) => ({
750
+ ...iss,
751
+ path: iss.path ? [${k}, ...iss.path] : [${k}],
752
+ }))
753
+ );
754
+ }
755
+ } else if (${id}.value === undefined) {
756
+ if (${k} in input) newResult[${k}] = undefined;
757
+ } else {
758
+ newResult[${k}] = ${id}.value;
759
+ }
760
+ `);
761
+ }
762
+ else {
763
+ const id = ids[key];
764
+ // const id = ids[key];
765
+ doc.write(`const ${id} = ${parseStr(key)};`);
766
+ doc.write(`
767
+ if (${id}.issues.length) payload.issues = payload.issues.concat(${id}.issues.map(iss => ({
768
+ ...iss,
769
+ path: iss.path ? [${util.esc(key)}, ...iss.path] : [${util.esc(key)}]
770
+ })));`);
771
+ doc.write(`newResult[${util.esc(key)}] = ${id}.value`);
772
+ }
773
+ }
774
+ doc.write(`payload.value = newResult;`);
775
+ doc.write(`return payload;`);
776
+ const fn = doc.compile();
777
+ return (payload, ctx) => fn(shape, payload, ctx);
778
+ };
779
+ let fastpass;
780
+ const isObject = util.isObject;
781
+ const jit = !core.globalConfig.jitless;
782
+ const allowsEval = util.allowsEval;
783
+ const fastEnabled = jit && allowsEval.value; // && !def.catchall;
784
+ const catchall = def.catchall;
785
+ let value;
786
+ inst._zod.parse = (payload, ctx) => {
787
+ value ?? (value = _normalized.value);
788
+ const input = payload.value;
789
+ if (!isObject(input)) {
790
+ payload.issues.push({
791
+ expected: "object",
792
+ code: "invalid_type",
793
+ input,
794
+ inst,
795
+ });
796
+ return payload;
797
+ }
798
+ const proms = [];
799
+ if (jit && fastEnabled && ctx?.async === false && ctx.jitless !== true) {
800
+ // always synchronous
801
+ if (!fastpass)
802
+ fastpass = generateFastpass(def.shape);
803
+ payload = fastpass(payload, ctx);
804
+ }
805
+ else {
806
+ payload.value = {};
807
+ const shape = value.shape;
808
+ for (const key of value.keys) {
809
+ const el = shape[key];
810
+ // do not add omitted optional keys
811
+ // if (!(key in input)) {
812
+ // if (optionalKeys.has(key)) continue;
813
+ // payload.issues.push({
814
+ // code: "invalid_type",
815
+ // path: [key],
816
+ // expected: "nonoptional",
817
+ // note: `Missing required key: "${key}"`,
818
+ // input,
819
+ // inst,
820
+ // });
821
+ // }
822
+ const r = el._zod.run({ value: input[key], issues: [] }, ctx);
823
+ const isOptional = el._zod.optin === "optional" && el._zod.optout === "optional";
824
+ if (r instanceof Promise) {
825
+ proms.push(r.then((r) => isOptional ? handleOptionalObjectResult(r, payload, key, input) : handleObjectResult(r, payload, key)));
826
+ }
827
+ else if (isOptional) {
828
+ handleOptionalObjectResult(r, payload, key, input);
829
+ }
830
+ else {
831
+ handleObjectResult(r, payload, key);
832
+ }
833
+ }
834
+ }
835
+ if (!catchall) {
836
+ // return payload;
837
+ return proms.length ? Promise.all(proms).then(() => payload) : payload;
838
+ }
839
+ const unrecognized = [];
840
+ // iterate over input keys
841
+ const keySet = value.keySet;
842
+ const _catchall = catchall._zod;
843
+ const t = _catchall.def.type;
844
+ for (const key of Object.keys(input)) {
845
+ if (keySet.has(key))
846
+ continue;
847
+ if (t === "never") {
848
+ unrecognized.push(key);
849
+ continue;
850
+ }
851
+ const r = _catchall.run({ value: input[key], issues: [] }, ctx);
852
+ if (r instanceof Promise) {
853
+ proms.push(r.then((r) => handleObjectResult(r, payload, key)));
854
+ }
855
+ else {
856
+ handleObjectResult(r, payload, key);
857
+ }
858
+ }
859
+ if (unrecognized.length) {
860
+ payload.issues.push({
861
+ code: "unrecognized_keys",
862
+ keys: unrecognized,
863
+ input,
864
+ inst,
865
+ });
866
+ }
867
+ if (!proms.length)
868
+ return payload;
869
+ return Promise.all(proms).then(() => {
870
+ return payload;
871
+ });
872
+ };
873
+ });
874
+ function handleUnionResults(results, final, inst, ctx) {
875
+ for (const result of results) {
876
+ if (result.issues.length === 0) {
877
+ final.value = result.value;
878
+ return final;
879
+ }
880
+ }
881
+ final.issues.push({
882
+ code: "invalid_union",
883
+ input: final.value,
884
+ inst,
885
+ errors: results.map((result) => result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config()))),
886
+ });
887
+ return final;
888
+ }
889
+ export const $ZodUnion = /*@__PURE__*/ core.$constructor("$ZodUnion", (inst, def) => {
890
+ $ZodType.init(inst, def);
891
+ util.defineLazy(inst._zod, "optin", () => def.options.some((o) => o._zod.optin === "optional") ? "optional" : undefined);
892
+ util.defineLazy(inst._zod, "optout", () => def.options.some((o) => o._zod.optout === "optional") ? "optional" : undefined);
893
+ util.defineLazy(inst._zod, "values", () => {
894
+ if (def.options.every((o) => o._zod.values)) {
895
+ return new Set(def.options.flatMap((option) => Array.from(option._zod.values)));
896
+ }
897
+ return undefined;
898
+ });
899
+ util.defineLazy(inst._zod, "pattern", () => {
900
+ if (def.options.every((o) => o._zod.pattern)) {
901
+ const patterns = def.options.map((o) => o._zod.pattern);
902
+ return new RegExp(`^(${patterns.map((p) => util.cleanRegex(p.source)).join("|")})$`);
903
+ }
904
+ return undefined;
905
+ });
906
+ inst._zod.parse = (payload, ctx) => {
907
+ let async = false;
908
+ const results = [];
909
+ for (const option of def.options) {
910
+ const result = option._zod.run({
911
+ value: payload.value,
912
+ issues: [],
913
+ }, ctx);
914
+ if (result instanceof Promise) {
915
+ results.push(result);
916
+ async = true;
917
+ }
918
+ else {
919
+ if (result.issues.length === 0)
920
+ return result;
921
+ results.push(result);
922
+ }
923
+ }
924
+ if (!async)
925
+ return handleUnionResults(results, payload, inst, ctx);
926
+ return Promise.all(results).then((results) => {
927
+ return handleUnionResults(results, payload, inst, ctx);
928
+ });
929
+ };
930
+ });
931
+ export const $ZodDiscriminatedUnion =
932
+ /*@__PURE__*/
933
+ core.$constructor("$ZodDiscriminatedUnion", (inst, def) => {
934
+ $ZodUnion.init(inst, def);
935
+ const _super = inst._zod.parse;
936
+ util.defineLazy(inst._zod, "propValues", () => {
937
+ const propValues = {};
938
+ for (const option of def.options) {
939
+ const pv = option._zod.propValues;
940
+ if (!pv || Object.keys(pv).length === 0)
941
+ throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(option)}"`);
942
+ for (const [k, v] of Object.entries(pv)) {
943
+ if (!propValues[k])
944
+ propValues[k] = new Set();
945
+ for (const val of v) {
946
+ propValues[k].add(val);
947
+ }
948
+ }
949
+ }
950
+ return propValues;
951
+ });
952
+ const disc = util.cached(() => {
953
+ const opts = def.options;
954
+ const map = new Map();
955
+ for (const o of opts) {
956
+ const values = o._zod.propValues?.[def.discriminator];
957
+ if (!values || values.size === 0)
958
+ throw new Error(`Invalid discriminated union option at index "${def.options.indexOf(o)}"`);
959
+ for (const v of values) {
960
+ if (map.has(v)) {
961
+ throw new Error(`Duplicate discriminator value "${String(v)}"`);
962
+ }
963
+ map.set(v, o);
964
+ }
965
+ }
966
+ return map;
967
+ });
968
+ inst._zod.parse = (payload, ctx) => {
969
+ const input = payload.value;
970
+ if (!util.isObject(input)) {
971
+ payload.issues.push({
972
+ code: "invalid_type",
973
+ expected: "object",
974
+ input,
975
+ inst,
976
+ });
977
+ return payload;
978
+ }
979
+ const opt = disc.value.get(input?.[def.discriminator]);
980
+ if (opt) {
981
+ return opt._zod.run(payload, ctx);
982
+ }
983
+ if (def.unionFallback) {
984
+ return _super(payload, ctx);
985
+ }
986
+ // no matching discriminator
987
+ payload.issues.push({
988
+ code: "invalid_union",
989
+ errors: [],
990
+ note: "No matching discriminator",
991
+ input,
992
+ path: [def.discriminator],
993
+ inst,
994
+ });
995
+ return payload;
996
+ };
997
+ });
998
+ export const $ZodIntersection = /*@__PURE__*/ core.$constructor("$ZodIntersection", (inst, def) => {
999
+ $ZodType.init(inst, def);
1000
+ inst._zod.parse = (payload, ctx) => {
1001
+ const input = payload.value;
1002
+ const left = def.left._zod.run({ value: input, issues: [] }, ctx);
1003
+ const right = def.right._zod.run({ value: input, issues: [] }, ctx);
1004
+ const async = left instanceof Promise || right instanceof Promise;
1005
+ if (async) {
1006
+ return Promise.all([left, right]).then(([left, right]) => {
1007
+ return handleIntersectionResults(payload, left, right);
1008
+ });
1009
+ }
1010
+ return handleIntersectionResults(payload, left, right);
1011
+ };
1012
+ });
1013
+ function mergeValues(a, b) {
1014
+ // const aType = parse.t(a);
1015
+ // const bType = parse.t(b);
1016
+ if (a === b) {
1017
+ return { valid: true, data: a };
1018
+ }
1019
+ if (a instanceof Date && b instanceof Date && +a === +b) {
1020
+ return { valid: true, data: a };
1021
+ }
1022
+ if (util.isPlainObject(a) && util.isPlainObject(b)) {
1023
+ const bKeys = Object.keys(b);
1024
+ const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
1025
+ const newObj = { ...a, ...b };
1026
+ for (const key of sharedKeys) {
1027
+ const sharedValue = mergeValues(a[key], b[key]);
1028
+ if (!sharedValue.valid) {
1029
+ return {
1030
+ valid: false,
1031
+ mergeErrorPath: [key, ...sharedValue.mergeErrorPath],
1032
+ };
1033
+ }
1034
+ newObj[key] = sharedValue.data;
1035
+ }
1036
+ return { valid: true, data: newObj };
1037
+ }
1038
+ if (Array.isArray(a) && Array.isArray(b)) {
1039
+ if (a.length !== b.length) {
1040
+ return { valid: false, mergeErrorPath: [] };
1041
+ }
1042
+ const newArray = [];
1043
+ for (let index = 0; index < a.length; index++) {
1044
+ const itemA = a[index];
1045
+ const itemB = b[index];
1046
+ const sharedValue = mergeValues(itemA, itemB);
1047
+ if (!sharedValue.valid) {
1048
+ return {
1049
+ valid: false,
1050
+ mergeErrorPath: [index, ...sharedValue.mergeErrorPath],
1051
+ };
1052
+ }
1053
+ newArray.push(sharedValue.data);
1054
+ }
1055
+ return { valid: true, data: newArray };
1056
+ }
1057
+ return { valid: false, mergeErrorPath: [] };
1058
+ }
1059
+ function handleIntersectionResults(result, left, right) {
1060
+ if (left.issues.length) {
1061
+ result.issues.push(...left.issues);
1062
+ }
1063
+ if (right.issues.length) {
1064
+ result.issues.push(...right.issues);
1065
+ }
1066
+ if (util.aborted(result))
1067
+ return result;
1068
+ const merged = mergeValues(left.value, right.value);
1069
+ if (!merged.valid) {
1070
+ throw new Error(`Unmergable intersection. Error path: ` + `${JSON.stringify(merged.mergeErrorPath)}`);
1071
+ }
1072
+ result.value = merged.data;
1073
+ return result;
1074
+ }
1075
+ export const $ZodTuple = /*@__PURE__*/ core.$constructor("$ZodTuple", (inst, def) => {
1076
+ $ZodType.init(inst, def);
1077
+ const items = def.items;
1078
+ const optStart = items.length - [...items].reverse().findIndex((item) => item._zod.optin !== "optional");
1079
+ inst._zod.parse = (payload, ctx) => {
1080
+ const input = payload.value;
1081
+ if (!Array.isArray(input)) {
1082
+ payload.issues.push({
1083
+ input,
1084
+ inst,
1085
+ expected: "tuple",
1086
+ code: "invalid_type",
1087
+ });
1088
+ return payload;
1089
+ }
1090
+ payload.value = [];
1091
+ const proms = [];
1092
+ if (!def.rest) {
1093
+ const tooBig = input.length > items.length;
1094
+ const tooSmall = input.length < optStart - 1;
1095
+ if (tooBig || tooSmall) {
1096
+ payload.issues.push({
1097
+ input,
1098
+ inst,
1099
+ origin: "array",
1100
+ ...(tooBig ? { code: "too_big", maximum: items.length } : { code: "too_small", minimum: items.length }),
1101
+ });
1102
+ return payload;
1103
+ }
1104
+ }
1105
+ let i = -1;
1106
+ for (const item of items) {
1107
+ i++;
1108
+ if (i >= input.length)
1109
+ if (i >= optStart)
1110
+ continue;
1111
+ const result = item._zod.run({
1112
+ value: input[i],
1113
+ issues: [],
1114
+ }, ctx);
1115
+ if (result instanceof Promise) {
1116
+ proms.push(result.then((result) => handleTupleResult(result, payload, i)));
1117
+ }
1118
+ else {
1119
+ handleTupleResult(result, payload, i);
1120
+ }
1121
+ }
1122
+ if (def.rest) {
1123
+ const rest = input.slice(items.length);
1124
+ for (const el of rest) {
1125
+ i++;
1126
+ const result = def.rest._zod.run({
1127
+ value: el,
1128
+ issues: [],
1129
+ }, ctx);
1130
+ if (result instanceof Promise) {
1131
+ proms.push(result.then((result) => handleTupleResult(result, payload, i)));
1132
+ }
1133
+ else {
1134
+ handleTupleResult(result, payload, i);
1135
+ }
1136
+ }
1137
+ }
1138
+ if (proms.length)
1139
+ return Promise.all(proms).then(() => payload);
1140
+ return payload;
1141
+ };
1142
+ });
1143
+ function handleTupleResult(result, final, index) {
1144
+ if (result.issues.length) {
1145
+ final.issues.push(...util.prefixIssues(index, result.issues));
1146
+ }
1147
+ final.value[index] = result.value;
1148
+ }
1149
+ export const $ZodRecord = /*@__PURE__*/ core.$constructor("$ZodRecord", (inst, def) => {
1150
+ $ZodType.init(inst, def);
1151
+ inst._zod.parse = (payload, ctx) => {
1152
+ const input = payload.value;
1153
+ if (!util.isPlainObject(input)) {
1154
+ payload.issues.push({
1155
+ expected: "record",
1156
+ code: "invalid_type",
1157
+ input,
1158
+ inst,
1159
+ });
1160
+ return payload;
1161
+ }
1162
+ const proms = [];
1163
+ if (def.keyType._zod.values) {
1164
+ const values = def.keyType._zod.values;
1165
+ payload.value = {};
1166
+ for (const key of values) {
1167
+ if (typeof key === "string" || typeof key === "number" || typeof key === "symbol") {
1168
+ const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
1169
+ if (result instanceof Promise) {
1170
+ proms.push(result.then((result) => {
1171
+ if (result.issues.length) {
1172
+ payload.issues.push(...util.prefixIssues(key, result.issues));
1173
+ }
1174
+ payload.value[key] = result.value;
1175
+ }));
1176
+ }
1177
+ else {
1178
+ if (result.issues.length) {
1179
+ payload.issues.push(...util.prefixIssues(key, result.issues));
1180
+ }
1181
+ payload.value[key] = result.value;
1182
+ }
1183
+ }
1184
+ }
1185
+ let unrecognized;
1186
+ for (const key in input) {
1187
+ if (!values.has(key)) {
1188
+ unrecognized = unrecognized ?? [];
1189
+ unrecognized.push(key);
1190
+ }
1191
+ }
1192
+ if (unrecognized && unrecognized.length > 0) {
1193
+ payload.issues.push({
1194
+ code: "unrecognized_keys",
1195
+ input,
1196
+ inst,
1197
+ keys: unrecognized,
1198
+ });
1199
+ }
1200
+ }
1201
+ else {
1202
+ payload.value = {};
1203
+ for (const key of Reflect.ownKeys(input)) {
1204
+ if (key === "__proto__")
1205
+ continue;
1206
+ const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
1207
+ if (keyResult instanceof Promise) {
1208
+ throw new Error("Async schemas not supported in object keys currently");
1209
+ }
1210
+ if (keyResult.issues.length) {
1211
+ payload.issues.push({
1212
+ origin: "record",
1213
+ code: "invalid_key",
1214
+ issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1215
+ input: key,
1216
+ path: [key],
1217
+ inst,
1218
+ });
1219
+ payload.value[keyResult.value] = keyResult.value;
1220
+ continue;
1221
+ }
1222
+ const result = def.valueType._zod.run({ value: input[key], issues: [] }, ctx);
1223
+ if (result instanceof Promise) {
1224
+ proms.push(result.then((result) => {
1225
+ if (result.issues.length) {
1226
+ payload.issues.push(...util.prefixIssues(key, result.issues));
1227
+ }
1228
+ payload.value[keyResult.value] = result.value;
1229
+ }));
1230
+ }
1231
+ else {
1232
+ if (result.issues.length) {
1233
+ payload.issues.push(...util.prefixIssues(key, result.issues));
1234
+ }
1235
+ payload.value[keyResult.value] = result.value;
1236
+ }
1237
+ }
1238
+ }
1239
+ if (proms.length) {
1240
+ return Promise.all(proms).then(() => payload);
1241
+ }
1242
+ return payload;
1243
+ };
1244
+ });
1245
+ export const $ZodMap = /*@__PURE__*/ core.$constructor("$ZodMap", (inst, def) => {
1246
+ $ZodType.init(inst, def);
1247
+ inst._zod.parse = (payload, ctx) => {
1248
+ const input = payload.value;
1249
+ if (!(input instanceof Map)) {
1250
+ payload.issues.push({
1251
+ expected: "map",
1252
+ code: "invalid_type",
1253
+ input,
1254
+ inst,
1255
+ });
1256
+ return payload;
1257
+ }
1258
+ const proms = [];
1259
+ payload.value = new Map();
1260
+ for (const [key, value] of input) {
1261
+ const keyResult = def.keyType._zod.run({ value: key, issues: [] }, ctx);
1262
+ const valueResult = def.valueType._zod.run({ value: value, issues: [] }, ctx);
1263
+ if (keyResult instanceof Promise || valueResult instanceof Promise) {
1264
+ proms.push(Promise.all([keyResult, valueResult]).then(([keyResult, valueResult]) => {
1265
+ handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
1266
+ }));
1267
+ }
1268
+ else {
1269
+ handleMapResult(keyResult, valueResult, payload, key, input, inst, ctx);
1270
+ }
1271
+ }
1272
+ if (proms.length)
1273
+ return Promise.all(proms).then(() => payload);
1274
+ return payload;
1275
+ };
1276
+ });
1277
+ function handleMapResult(keyResult, valueResult, final, key, input, inst, ctx) {
1278
+ if (keyResult.issues.length) {
1279
+ if (util.propertyKeyTypes.has(typeof key)) {
1280
+ final.issues.push(...util.prefixIssues(key, keyResult.issues));
1281
+ }
1282
+ else {
1283
+ final.issues.push({
1284
+ origin: "map",
1285
+ code: "invalid_key",
1286
+ input,
1287
+ inst,
1288
+ issues: keyResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1289
+ });
1290
+ }
1291
+ }
1292
+ if (valueResult.issues.length) {
1293
+ if (util.propertyKeyTypes.has(typeof key)) {
1294
+ final.issues.push(...util.prefixIssues(key, valueResult.issues));
1295
+ }
1296
+ else {
1297
+ final.issues.push({
1298
+ origin: "map",
1299
+ code: "invalid_element",
1300
+ input,
1301
+ inst,
1302
+ key: key,
1303
+ issues: valueResult.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1304
+ });
1305
+ }
1306
+ }
1307
+ final.value.set(keyResult.value, valueResult.value);
1308
+ }
1309
+ export const $ZodSet = /*@__PURE__*/ core.$constructor("$ZodSet", (inst, def) => {
1310
+ $ZodType.init(inst, def);
1311
+ inst._zod.parse = (payload, ctx) => {
1312
+ const input = payload.value;
1313
+ if (!(input instanceof Set)) {
1314
+ payload.issues.push({
1315
+ input,
1316
+ inst,
1317
+ expected: "set",
1318
+ code: "invalid_type",
1319
+ });
1320
+ return payload;
1321
+ }
1322
+ const proms = [];
1323
+ payload.value = new Set();
1324
+ for (const item of input) {
1325
+ const result = def.valueType._zod.run({ value: item, issues: [] }, ctx);
1326
+ if (result instanceof Promise) {
1327
+ proms.push(result.then((result) => handleSetResult(result, payload)));
1328
+ }
1329
+ else
1330
+ handleSetResult(result, payload);
1331
+ }
1332
+ if (proms.length)
1333
+ return Promise.all(proms).then(() => payload);
1334
+ return payload;
1335
+ };
1336
+ });
1337
+ function handleSetResult(result, final) {
1338
+ if (result.issues.length) {
1339
+ final.issues.push(...result.issues);
1340
+ }
1341
+ final.value.add(result.value);
1342
+ }
1343
+ export const $ZodEnum = /*@__PURE__*/ core.$constructor("$ZodEnum", (inst, def) => {
1344
+ $ZodType.init(inst, def);
1345
+ const values = util.getEnumValues(def.entries);
1346
+ inst._zod.values = new Set(values);
1347
+ inst._zod.pattern = new RegExp(`^(${values
1348
+ .filter((k) => util.propertyKeyTypes.has(typeof k))
1349
+ .map((o) => (typeof o === "string" ? util.escapeRegex(o) : o.toString()))
1350
+ .join("|")})$`);
1351
+ inst._zod.parse = (payload, _ctx) => {
1352
+ const input = payload.value;
1353
+ if (inst._zod.values.has(input)) {
1354
+ return payload;
1355
+ }
1356
+ payload.issues.push({
1357
+ code: "invalid_value",
1358
+ values,
1359
+ input,
1360
+ inst,
1361
+ });
1362
+ return payload;
1363
+ };
1364
+ });
1365
+ export const $ZodLiteral = /*@__PURE__*/ core.$constructor("$ZodLiteral", (inst, def) => {
1366
+ $ZodType.init(inst, def);
1367
+ inst._zod.values = new Set(def.values);
1368
+ inst._zod.pattern = new RegExp(`^(${def.values
1369
+ .map((o) => (typeof o === "string" ? util.escapeRegex(o) : o ? o.toString() : String(o)))
1370
+ .join("|")})$`);
1371
+ inst._zod.parse = (payload, _ctx) => {
1372
+ const input = payload.value;
1373
+ if (inst._zod.values.has(input)) {
1374
+ return payload;
1375
+ }
1376
+ payload.issues.push({
1377
+ code: "invalid_value",
1378
+ values: def.values,
1379
+ input,
1380
+ inst,
1381
+ });
1382
+ return payload;
1383
+ };
1384
+ });
1385
+ export const $ZodFile = /*@__PURE__*/ core.$constructor("$ZodFile", (inst, def) => {
1386
+ $ZodType.init(inst, def);
1387
+ inst._zod.parse = (payload, _ctx) => {
1388
+ const input = payload.value;
1389
+ if (input instanceof File)
1390
+ return payload;
1391
+ payload.issues.push({
1392
+ expected: "file",
1393
+ code: "invalid_type",
1394
+ input,
1395
+ inst,
1396
+ });
1397
+ return payload;
1398
+ };
1399
+ });
1400
+ export const $ZodTransform = /*@__PURE__*/ core.$constructor("$ZodTransform", (inst, def) => {
1401
+ $ZodType.init(inst, def);
1402
+ inst._zod.parse = (payload, _ctx) => {
1403
+ const _out = def.transform(payload.value, payload);
1404
+ if (_ctx.async) {
1405
+ const output = _out instanceof Promise ? _out : Promise.resolve(_out);
1406
+ return output.then((output) => {
1407
+ payload.value = output;
1408
+ return payload;
1409
+ });
1410
+ }
1411
+ if (_out instanceof Promise) {
1412
+ throw new core.$ZodAsyncError();
1413
+ }
1414
+ payload.value = _out;
1415
+ return payload;
1416
+ };
1417
+ });
1418
+ export const $ZodOptional = /*@__PURE__*/ core.$constructor("$ZodOptional", (inst, def) => {
1419
+ $ZodType.init(inst, def);
1420
+ inst._zod.optin = "optional";
1421
+ inst._zod.optout = "optional";
1422
+ util.defineLazy(inst._zod, "values", () => {
1423
+ return def.innerType._zod.values ? new Set([...def.innerType._zod.values, undefined]) : undefined;
1424
+ });
1425
+ util.defineLazy(inst._zod, "pattern", () => {
1426
+ const pattern = def.innerType._zod.pattern;
1427
+ return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)})?$`) : undefined;
1428
+ });
1429
+ inst._zod.parse = (payload, ctx) => {
1430
+ if (def.innerType._zod.optin === "optional") {
1431
+ return def.innerType._zod.run(payload, ctx);
1432
+ }
1433
+ if (payload.value === undefined) {
1434
+ return payload;
1435
+ }
1436
+ return def.innerType._zod.run(payload, ctx);
1437
+ };
1438
+ });
1439
+ export const $ZodNullable = /*@__PURE__*/ core.$constructor("$ZodNullable", (inst, def) => {
1440
+ $ZodType.init(inst, def);
1441
+ util.defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
1442
+ util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
1443
+ util.defineLazy(inst._zod, "pattern", () => {
1444
+ const pattern = def.innerType._zod.pattern;
1445
+ return pattern ? new RegExp(`^(${util.cleanRegex(pattern.source)}|null)$`) : undefined;
1446
+ });
1447
+ util.defineLazy(inst._zod, "values", () => {
1448
+ return def.innerType._zod.values ? new Set([...def.innerType._zod.values, null]) : undefined;
1449
+ });
1450
+ inst._zod.parse = (payload, ctx) => {
1451
+ if (payload.value === null)
1452
+ return payload;
1453
+ return def.innerType._zod.run(payload, ctx);
1454
+ };
1455
+ });
1456
+ export const $ZodDefault = /*@__PURE__*/ core.$constructor("$ZodDefault", (inst, def) => {
1457
+ $ZodType.init(inst, def);
1458
+ // inst._zod.qin = "true";
1459
+ inst._zod.optin = "optional";
1460
+ util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1461
+ inst._zod.parse = (payload, ctx) => {
1462
+ if (payload.value === undefined) {
1463
+ payload.value = def.defaultValue;
1464
+ /**
1465
+ * $ZodDefault always returns the default value immediately.
1466
+ * 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. */
1467
+ return payload;
1468
+ }
1469
+ const result = def.innerType._zod.run(payload, ctx);
1470
+ if (result instanceof Promise) {
1471
+ return result.then((result) => handleDefaultResult(result, def));
1472
+ }
1473
+ return handleDefaultResult(result, def);
1474
+ };
1475
+ });
1476
+ function handleDefaultResult(payload, def) {
1477
+ if (payload.value === undefined) {
1478
+ payload.value = def.defaultValue;
1479
+ }
1480
+ return payload;
1481
+ }
1482
+ export const $ZodPrefault = /*@__PURE__*/ core.$constructor("$ZodPrefault", (inst, def) => {
1483
+ $ZodType.init(inst, def);
1484
+ inst._zod.optin = "optional";
1485
+ util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1486
+ inst._zod.parse = (payload, ctx) => {
1487
+ if (payload.value === undefined) {
1488
+ payload.value = def.defaultValue;
1489
+ }
1490
+ return def.innerType._zod.run(payload, ctx);
1491
+ };
1492
+ });
1493
+ export const $ZodNonOptional = /*@__PURE__*/ core.$constructor("$ZodNonOptional", (inst, def) => {
1494
+ $ZodType.init(inst, def);
1495
+ util.defineLazy(inst._zod, "values", () => {
1496
+ const v = def.innerType._zod.values;
1497
+ return v ? new Set([...v].filter((x) => x !== undefined)) : undefined;
1498
+ });
1499
+ inst._zod.parse = (payload, ctx) => {
1500
+ const result = def.innerType._zod.run(payload, ctx);
1501
+ if (result instanceof Promise) {
1502
+ return result.then((result) => handleNonOptionalResult(result, inst));
1503
+ }
1504
+ return handleNonOptionalResult(result, inst);
1505
+ };
1506
+ });
1507
+ function handleNonOptionalResult(payload, inst) {
1508
+ if (!payload.issues.length && payload.value === undefined) {
1509
+ payload.issues.push({
1510
+ code: "invalid_type",
1511
+ expected: "nonoptional",
1512
+ input: payload.value,
1513
+ inst,
1514
+ });
1515
+ }
1516
+ return payload;
1517
+ }
1518
+ export const $ZodSuccess = /*@__PURE__*/ core.$constructor("$ZodSuccess", (inst, def) => {
1519
+ $ZodType.init(inst, def);
1520
+ inst._zod.parse = (payload, ctx) => {
1521
+ const result = def.innerType._zod.run(payload, ctx);
1522
+ if (result instanceof Promise) {
1523
+ return result.then((result) => {
1524
+ payload.value = result.issues.length === 0;
1525
+ return payload;
1526
+ });
1527
+ }
1528
+ payload.value = result.issues.length === 0;
1529
+ return payload;
1530
+ };
1531
+ });
1532
+ export const $ZodCatch = /*@__PURE__*/ core.$constructor("$ZodCatch", (inst, def) => {
1533
+ $ZodType.init(inst, def);
1534
+ inst._zod.optin = "optional";
1535
+ util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
1536
+ util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1537
+ inst._zod.parse = (payload, ctx) => {
1538
+ const result = def.innerType._zod.run(payload, ctx);
1539
+ if (result instanceof Promise) {
1540
+ return result.then((result) => {
1541
+ payload.value = result.value;
1542
+ if (result.issues.length) {
1543
+ payload.value = def.catchValue({
1544
+ ...payload,
1545
+ error: {
1546
+ issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1547
+ },
1548
+ input: payload.value,
1549
+ });
1550
+ payload.issues = [];
1551
+ }
1552
+ return payload;
1553
+ });
1554
+ }
1555
+ payload.value = result.value;
1556
+ if (result.issues.length) {
1557
+ payload.value = def.catchValue({
1558
+ ...payload,
1559
+ error: {
1560
+ issues: result.issues.map((iss) => util.finalizeIssue(iss, ctx, core.config())),
1561
+ },
1562
+ input: payload.value,
1563
+ });
1564
+ payload.issues = [];
1565
+ }
1566
+ return payload;
1567
+ };
1568
+ });
1569
+ export const $ZodNaN = /*@__PURE__*/ core.$constructor("$ZodNaN", (inst, def) => {
1570
+ $ZodType.init(inst, def);
1571
+ inst._zod.parse = (payload, _ctx) => {
1572
+ if (typeof payload.value !== "number" || !Number.isNaN(payload.value)) {
1573
+ payload.issues.push({
1574
+ input: payload.value,
1575
+ inst,
1576
+ expected: "nan",
1577
+ code: "invalid_type",
1578
+ });
1579
+ return payload;
1580
+ }
1581
+ return payload;
1582
+ };
1583
+ });
1584
+ export const $ZodPipe = /*@__PURE__*/ core.$constructor("$ZodPipe", (inst, def) => {
1585
+ $ZodType.init(inst, def);
1586
+ util.defineLazy(inst._zod, "values", () => def.in._zod.values);
1587
+ util.defineLazy(inst._zod, "optin", () => def.in._zod.optin);
1588
+ util.defineLazy(inst._zod, "optout", () => def.out._zod.optout);
1589
+ util.defineLazy(inst._zod, "propValues", () => def.in._zod.propValues);
1590
+ inst._zod.parse = (payload, ctx) => {
1591
+ const left = def.in._zod.run(payload, ctx);
1592
+ if (left instanceof Promise) {
1593
+ return left.then((left) => handlePipeResult(left, def, ctx));
1594
+ }
1595
+ return handlePipeResult(left, def, ctx);
1596
+ };
1597
+ });
1598
+ function handlePipeResult(left, def, ctx) {
1599
+ if (util.aborted(left)) {
1600
+ return left;
1601
+ }
1602
+ return def.out._zod.run({ value: left.value, issues: left.issues }, ctx);
1603
+ }
1604
+ export const $ZodReadonly = /*@__PURE__*/ core.$constructor("$ZodReadonly", (inst, def) => {
1605
+ $ZodType.init(inst, def);
1606
+ util.defineLazy(inst._zod, "propValues", () => def.innerType._zod.propValues);
1607
+ util.defineLazy(inst._zod, "values", () => def.innerType._zod.values);
1608
+ util.defineLazy(inst._zod, "optin", () => def.innerType._zod.optin);
1609
+ util.defineLazy(inst._zod, "optout", () => def.innerType._zod.optout);
1610
+ inst._zod.parse = (payload, ctx) => {
1611
+ const result = def.innerType._zod.run(payload, ctx);
1612
+ if (result instanceof Promise) {
1613
+ return result.then(handleReadonlyResult);
1614
+ }
1615
+ return handleReadonlyResult(result);
1616
+ };
1617
+ });
1618
+ function handleReadonlyResult(payload) {
1619
+ payload.value = Object.freeze(payload.value);
1620
+ return payload;
1621
+ }
1622
+ export const $ZodTemplateLiteral = /*@__PURE__*/ core.$constructor("$ZodTemplateLiteral", (inst, def) => {
1623
+ $ZodType.init(inst, def);
1624
+ const regexParts = [];
1625
+ for (const part of def.parts) {
1626
+ if (part instanceof $ZodType) {
1627
+ if (!part._zod.pattern) {
1628
+ // if (!source)
1629
+ throw new Error(`Invalid template literal part, no pattern found: ${[...part._zod.traits].shift()}`);
1630
+ }
1631
+ const source = part._zod.pattern instanceof RegExp ? part._zod.pattern.source : part._zod.pattern;
1632
+ if (!source)
1633
+ throw new Error(`Invalid template literal part: ${part._zod.traits}`);
1634
+ const start = source.startsWith("^") ? 1 : 0;
1635
+ const end = source.endsWith("$") ? source.length - 1 : source.length;
1636
+ regexParts.push(source.slice(start, end));
1637
+ }
1638
+ else if (part === null || util.primitiveTypes.has(typeof part)) {
1639
+ regexParts.push(util.escapeRegex(`${part}`));
1640
+ }
1641
+ else {
1642
+ throw new Error(`Invalid template literal part: ${part}`);
1643
+ }
1644
+ }
1645
+ inst._zod.pattern = new RegExp(`^${regexParts.join("")}$`);
1646
+ inst._zod.parse = (payload, _ctx) => {
1647
+ if (typeof payload.value !== "string") {
1648
+ payload.issues.push({
1649
+ input: payload.value,
1650
+ inst,
1651
+ expected: "template_literal",
1652
+ code: "invalid_type",
1653
+ });
1654
+ return payload;
1655
+ }
1656
+ inst._zod.pattern.lastIndex = 0;
1657
+ if (!inst._zod.pattern.test(payload.value)) {
1658
+ payload.issues.push({
1659
+ input: payload.value,
1660
+ inst,
1661
+ code: "invalid_format",
1662
+ format: def.format ?? "template_literal",
1663
+ pattern: inst._zod.pattern.source,
1664
+ });
1665
+ return payload;
1666
+ }
1667
+ return payload;
1668
+ };
1669
+ });
1670
+ export const $ZodPromise = /*@__PURE__*/ core.$constructor("$ZodPromise", (inst, def) => {
1671
+ $ZodType.init(inst, def);
1672
+ inst._zod.parse = (payload, ctx) => {
1673
+ return Promise.resolve(payload.value).then((inner) => def.innerType._zod.run({ value: inner, issues: [] }, ctx));
1674
+ };
1675
+ });
1676
+ export const $ZodLazy = /*@__PURE__*/ core.$constructor("$ZodLazy", (inst, def) => {
1677
+ $ZodType.init(inst, def);
1678
+ util.defineLazy(inst._zod, "innerType", () => def.getter());
1679
+ util.defineLazy(inst._zod, "pattern", () => inst._zod.innerType._zod.pattern);
1680
+ util.defineLazy(inst._zod, "propValues", () => inst._zod.innerType._zod.propValues);
1681
+ util.defineLazy(inst._zod, "optin", () => inst._zod.innerType._zod.optin);
1682
+ util.defineLazy(inst._zod, "optout", () => inst._zod.innerType._zod.optout);
1683
+ inst._zod.parse = (payload, ctx) => {
1684
+ const inner = inst._zod.innerType;
1685
+ return inner._zod.run(payload, ctx);
1686
+ };
1687
+ });
1688
+ export const $ZodCustom = /*@__PURE__*/ core.$constructor("$ZodCustom", (inst, def) => {
1689
+ checks.$ZodCheck.init(inst, def);
1690
+ $ZodType.init(inst, def);
1691
+ inst._zod.parse = (payload, _) => {
1692
+ return payload;
1693
+ };
1694
+ inst._zod.check = (payload) => {
1695
+ const input = payload.value;
1696
+ const r = def.fn(input);
1697
+ if (r instanceof Promise) {
1698
+ return r.then((r) => handleRefineResult(r, payload, input, inst));
1699
+ }
1700
+ handleRefineResult(r, payload, input, inst);
1701
+ return;
1702
+ };
1703
+ });
1704
+ function handleRefineResult(result, payload, input, inst) {
1705
+ if (!result) {
1706
+ const _iss = {
1707
+ code: "custom",
1708
+ input,
1709
+ inst, // incorporates params.error into issue reporting
1710
+ path: [...(inst._zod.def.path ?? [])], // incorporates params.error into issue reporting
1711
+ continue: !inst._zod.def.abort,
1712
+ // params: inst._zod.def.params,
1713
+ };
1714
+ if (inst._zod.def.params)
1715
+ _iss.params = inst._zod.def.params;
1716
+ payload.issues.push(util.issue(_iss));
1717
+ }
1718
+ }