@wrdagency/blockout 0.1.9 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (487) hide show
  1. package/dist/2NBKRL7C-DHf-2xkD.js +85 -0
  2. package/dist/{2RSXSRCN-qt84MtKs.js → 2RSXSRCN-bkYY_QT6.js} +23 -23
  3. package/dist/{4CMBR7SL-BAGv8IL2.js → 4CMBR7SL-BkCeHgv2.js} +31 -31
  4. package/dist/{5JTVDSTH-CG1NL6Fw.js → 5JTVDSTH-BiHTUReD.js} +27 -27
  5. package/dist/{5VQZOHHZ-CscZGerP.js → 5VQZOHHZ-BpLDJOFs.js} +1 -1
  6. package/dist/{6VRAQV3D-2rb_aClP.js → 6VRAQV3D-DIdyGLyW.js} +26 -26
  7. package/dist/A3WPL2ZJ-SF-cbtmp.js +11 -0
  8. package/dist/ArrowBendDownRight.es-mejk84um.js +32 -0
  9. package/dist/BM6PGYQY-D4-MwCVB.js +17 -0
  10. package/dist/{CaretDown.es-eySGHzTJ.js → CaretDown.es-BKFnosGJ.js} +3 -5
  11. package/dist/CaretDown.es-eyr5AnCc.js +8 -0
  12. package/dist/CaretLeft.es-C1wX08tw.js +32 -0
  13. package/dist/CaretRight.es-vnr78BGI.js +32 -0
  14. package/dist/DG5U6ZEL-u5QgMA8f.js +17 -0
  15. package/dist/DotsSixVertical.es-Ixbhxg7Z.js +38 -0
  16. package/dist/DotsThreeVertical.es-uadrGk3y.js +36 -0
  17. package/dist/EM5CXX6A-iTR0FDQv.js +14 -0
  18. package/dist/F5MUBM3I-Cv5aLv5o.js +54 -0
  19. package/dist/G7GW6PWC-FbNigUHQ.js +1236 -0
  20. package/dist/J2LQO3EC-DIOM09Y6.js +39 -0
  21. package/dist/KFH4SEIX-BuapSU1b.js +120 -0
  22. package/dist/{LMDWO4NN--KEvZePp.js → LMDWO4NN-DyBcLLfK.js} +60 -60
  23. package/dist/MR26YJYP-BdwVX8xi.js +283 -0
  24. package/dist/MTZPJQMC-DMklE0XE.js +12 -0
  25. package/dist/MagnifyingGlass.es-CLstwG_v.js +32 -0
  26. package/dist/O2PQ2652-CRn371N3.js +51 -0
  27. package/dist/P7GR5CS5-Btbh4-Mw.js +24 -0
  28. package/dist/{PFRGBC2K-BEg8ahbY.js → PFRGBC2K-DobANx7W.js} +93 -93
  29. package/dist/{RS7LB2H4-D0fWv5qu.js → RS7LB2H4-lmOMNc4h.js} +3 -3
  30. package/dist/RZ4GPYOB-1GOhO1-l.js +37 -0
  31. package/dist/RadioButton.es-D3QVjfF9.js +36 -0
  32. package/dist/{S43UC3DV-Dn8EFLaT.js → S43UC3DV-C5JWPIhF.js} +5 -5
  33. package/dist/{T7VMP3TM-DeRMoW8g.js → T7VMP3TM-DRNGQJpZ.js} +17 -17
  34. package/dist/{TP7N7UIH-BHb1rEeb.js → TP7N7UIH-DlW_S-4B.js} +13 -13
  35. package/dist/{UQQRIHDV-Bu8e1bYU.js → UQQRIHDV-eF2M9Cz2.js} +16 -16
  36. package/dist/{UYGDZTLQ-DcCmv5SE.js → UYGDZTLQ-DRLNvYE6.js} +4 -4
  37. package/dist/VIIRIBF3-DX-Wjw1-.js +18 -0
  38. package/dist/WMYDSCNQ-YGSwAHQE.js +62 -0
  39. package/dist/WYCIER3C-DndYR0iO.js +59 -0
  40. package/dist/X.es-TbGOnXOO.js +38 -0
  41. package/dist/{YV4JVR4I-kvospPUa.js → YV4JVR4I-DOlaib2E.js} +33 -33
  42. package/dist/assets/button.css +1 -1
  43. package/dist/assets/index.css +1 -1
  44. package/dist/assets/index10.css +1 -1
  45. package/dist/assets/index11.css +1 -1
  46. package/dist/assets/index12.css +1 -1
  47. package/dist/assets/index13.css +1 -1
  48. package/dist/assets/index14.css +1 -1
  49. package/dist/assets/index15.css +1 -1
  50. package/dist/assets/index16.css +1 -1
  51. package/dist/assets/index17.css +1 -1
  52. package/dist/assets/index18.css +1 -1
  53. package/dist/assets/index19.css +1 -1
  54. package/dist/assets/index2.css +1 -1
  55. package/dist/assets/index20.css +1 -1
  56. package/dist/assets/index3.css +1 -1
  57. package/dist/assets/index4.css +1 -1
  58. package/dist/assets/index5.css +1 -1
  59. package/dist/assets/index6.css +1 -1
  60. package/dist/assets/index7.css +1 -1
  61. package/dist/assets/index8.css +1 -1
  62. package/dist/assets/index9.css +1 -1
  63. package/dist/assets/prosemirror.css +1 -0
  64. package/dist/assets/root.css +1 -0
  65. package/dist/assets/style.css +1 -1
  66. package/dist/assets/style10.css +1 -0
  67. package/dist/assets/style11.css +1 -0
  68. package/dist/assets/style12.css +1 -0
  69. package/dist/assets/style13.css +1 -0
  70. package/dist/assets/style14.css +1 -0
  71. package/dist/assets/style15.css +1 -0
  72. package/dist/assets/style16.css +1 -0
  73. package/dist/assets/style17.css +1 -0
  74. package/dist/assets/style18.css +1 -0
  75. package/dist/assets/style19.css +1 -0
  76. package/dist/assets/style2.css +1 -1
  77. package/dist/assets/style20.css +1 -0
  78. package/dist/assets/style21.css +1 -0
  79. package/dist/assets/style22.css +1 -0
  80. package/dist/assets/style23.css +1 -0
  81. package/dist/assets/style24.css +1 -0
  82. package/dist/assets/style25.css +1 -0
  83. package/dist/assets/style3.css +1 -1
  84. package/dist/assets/style4.css +1 -1
  85. package/dist/assets/style5.css +1 -0
  86. package/dist/assets/style6.css +1 -0
  87. package/dist/assets/style7.css +1 -0
  88. package/dist/assets/style8.css +1 -0
  89. package/dist/assets/style9.css +1 -0
  90. package/dist/assets/styles2.css +1 -0
  91. package/dist/assets/styles3.css +1 -0
  92. package/dist/assets/styles4.css +1 -0
  93. package/dist/assets/styles5.css +1 -0
  94. package/dist/base-jB1DIMnz.js +559 -0
  95. package/dist/commands-IQnqt4xL.js +5937 -0
  96. package/dist/components/avatar/index.d.ts +10 -0
  97. package/dist/components/avatar/index.js +42 -0
  98. package/dist/components/badge/index.d.ts +7 -0
  99. package/dist/components/badge/index.js +24 -0
  100. package/dist/components/breadcrumbs/index.d.ts +2 -1
  101. package/dist/components/breadcrumbs/index.js +31 -63
  102. package/dist/components/breadcrumbs/types.d.ts +2 -1
  103. package/dist/components/button/button.d.ts +1 -0
  104. package/dist/components/button/icon.js +31 -10
  105. package/dist/components/controls/base-control/affix.d.ts +1 -1
  106. package/dist/components/controls/base-control/index.js +35 -23
  107. package/dist/components/controls/base-control/props.d.ts +9 -1
  108. package/dist/components/controls/base-control/props.js +31 -12
  109. package/dist/components/controls/base-popover-control/index.js +41 -27
  110. package/dist/components/controls/card-number-control/cards/index.d.ts +0 -1
  111. package/dist/components/controls/card-number-control/cards/index.js +6 -8
  112. package/dist/components/controls/card-number-control/index.js +39 -435
  113. package/dist/components/controls/checkbox-control/index.d.ts +2 -0
  114. package/dist/components/controls/checkbox-control/index.js +80 -46
  115. package/dist/components/controls/choice-control/choice.js +30 -23
  116. package/dist/components/controls/choice-control/index.js +6 -5
  117. package/dist/components/controls/date-control/component.d.ts +8 -7
  118. package/dist/components/controls/date-control/component.js +27 -28
  119. package/dist/components/controls/date-control/index.d.ts +5 -9
  120. package/dist/components/controls/date-control/index.js +131 -35
  121. package/dist/components/controls/date-control/picker.d.ts +8 -0
  122. package/dist/components/controls/date-control/picker.js +18 -0
  123. package/dist/components/controls/date-control/types.d.ts +10 -13
  124. package/dist/components/controls/date-control/types.js +75 -52
  125. package/dist/components/controls/date-control/util.d.ts +1 -0
  126. package/dist/components/controls/date-control/util.js +1608 -0
  127. package/dist/components/controls/index.d.ts +3 -1
  128. package/dist/components/controls/index.js +32 -27
  129. package/dist/components/controls/list-control/index.d.ts +9 -0
  130. package/dist/components/controls/list-control/index.js +42 -0
  131. package/dist/components/controls/list-control/item.d.ts +10 -0
  132. package/dist/components/controls/list-control/item.js +108 -0
  133. package/dist/components/controls/list-control/list.d.ts +10 -0
  134. package/dist/components/controls/list-control/list.js +89 -0
  135. package/dist/components/controls/list-control/types.d.ts +6 -0
  136. package/dist/components/controls/markdown-control/commands.d.ts +1 -0
  137. package/dist/components/controls/markdown-control/commands.js +5 -0
  138. package/dist/components/controls/markdown-control/editor.d.ts +8 -0
  139. package/dist/components/controls/markdown-control/editor.js +807 -0
  140. package/dist/components/controls/markdown-control/index.d.ts +7 -0
  141. package/dist/components/controls/markdown-control/index.js +20 -0
  142. package/dist/components/controls/markdown-control/slash/base.d.ts +14 -0
  143. package/dist/components/controls/markdown-control/slash/base.js +9 -0
  144. package/dist/components/controls/markdown-control/slash/mentions.d.ts +6 -0
  145. package/dist/components/controls/markdown-control/slash/mentions.js +14 -0
  146. package/dist/components/controls/markdown-control/toolbar.d.ts +6 -0
  147. package/dist/components/controls/markdown-control/toolbar.js +10 -0
  148. package/dist/components/controls/number-control/index.js +8 -7
  149. package/dist/components/controls/password-control/index.js +4 -3
  150. package/dist/components/controls/recurrence-control/index.js +81 -100
  151. package/dist/components/controls/select-control/control.d.ts +3 -0
  152. package/dist/components/controls/select-control/control.js +53 -0
  153. package/dist/components/controls/select-control/index.d.ts +2 -1
  154. package/dist/components/controls/select-control/index.js +6 -5
  155. package/dist/components/controls/select-control/props.d.ts +14 -0
  156. package/dist/components/controls/select-control/props.js +1 -0
  157. package/dist/components/controls/select-control/select.d.ts +3 -0
  158. package/dist/components/controls/select-control/select.js +1186 -0
  159. package/dist/components/controls/text-control/index.js +11 -10
  160. package/dist/components/controls/textarea-control/index.js +7 -6
  161. package/dist/components/controls/toggle-control/index.d.ts +4 -3
  162. package/dist/components/controls/toggle-control/index.js +73 -53
  163. package/dist/components/controls/toggle-group-control/index.d.ts +1 -0
  164. package/dist/components/controls/toggle-group-control/index.js +35 -26
  165. package/dist/components/data-form/api.d.ts +2 -0
  166. package/dist/components/data-form/api.js +1826 -0
  167. package/dist/components/data-form/autosave.d.ts +4 -0
  168. package/dist/components/data-form/autosave.js +12 -0
  169. package/dist/components/data-form/context.d.ts +10 -0
  170. package/dist/components/data-form/context.js +10 -0
  171. package/dist/components/data-form/form.d.ts +11 -0
  172. package/dist/components/data-form/form.js +30 -0
  173. package/dist/components/data-form/index.js +14 -0
  174. package/dist/components/data-form/row.d.ts +7 -0
  175. package/dist/components/data-form/row.js +16 -0
  176. package/dist/components/data-form/status.d.ts +6 -0
  177. package/dist/components/data-form/status.js +37 -0
  178. package/dist/components/data-form/submit.d.ts +10 -0
  179. package/dist/components/data-form/submit.js +37 -0
  180. package/dist/components/data-form/types.d.ts +37 -0
  181. package/dist/components/data-form/types.js +1 -0
  182. package/dist/components/data-view/api.d.ts +24 -0
  183. package/dist/components/data-view/api.js +31 -0
  184. package/dist/components/data-view/data/apply.d.ts +10 -0
  185. package/dist/components/data-view/data/apply.js +346 -0
  186. package/dist/components/data-view/data/fields.d.ts +4 -0
  187. package/dist/components/data-view/data/fields.js +26 -0
  188. package/dist/components/data-view/data/filter.d.ts +8 -0
  189. package/dist/components/data-view/data/filter.js +48 -0
  190. package/dist/components/data-view/data/layout.d.ts +2 -0
  191. package/dist/components/data-view/data/layout.js +19 -0
  192. package/dist/components/data-view/data/normalize.d.ts +5 -0
  193. package/dist/components/data-view/data/normalize.js +80 -0
  194. package/dist/components/data-view/data/options.d.ts +10 -0
  195. package/dist/components/data-view/data/options.js +297 -0
  196. package/dist/components/data-view/index.d.ts +5 -0
  197. package/dist/components/data-view/index.js +9 -0
  198. package/dist/components/data-view/layouts/grid/empty.d.ts +2 -0
  199. package/dist/components/data-view/layouts/grid/empty.js +6 -0
  200. package/dist/components/data-view/layouts/grid/group.d.ts +2 -0
  201. package/dist/components/data-view/layouts/grid/group.js +57 -0
  202. package/dist/components/data-view/layouts/grid/index.d.ts +3 -0
  203. package/dist/components/data-view/layouts/grid/index.js +8 -0
  204. package/dist/components/data-view/layouts/grid/item.d.ts +2 -0
  205. package/dist/components/data-view/layouts/grid/item.js +98 -0
  206. package/dist/components/data-view/layouts/grid/root.d.ts +2 -0
  207. package/dist/components/data-view/layouts/grid/root.js +6 -0
  208. package/dist/components/data-view/layouts/kanban/empty.d.ts +2 -0
  209. package/dist/components/data-view/layouts/kanban/empty.js +6 -0
  210. package/dist/components/data-view/layouts/kanban/group.d.ts +2 -0
  211. package/dist/components/data-view/layouts/kanban/group.js +57 -0
  212. package/dist/components/data-view/layouts/kanban/index.d.ts +3 -0
  213. package/dist/components/data-view/layouts/kanban/index.js +8 -0
  214. package/dist/components/data-view/layouts/kanban/item.d.ts +2 -0
  215. package/dist/components/data-view/layouts/kanban/item.js +98 -0
  216. package/dist/components/data-view/layouts/kanban/root.d.ts +2 -0
  217. package/dist/components/data-view/layouts/kanban/root.js +18 -0
  218. package/dist/components/data-view/layouts/list/empty.d.ts +2 -0
  219. package/dist/components/data-view/layouts/list/empty.js +6 -0
  220. package/dist/components/data-view/layouts/list/group.d.ts +2 -0
  221. package/dist/components/data-view/layouts/list/group.js +57 -0
  222. package/dist/components/data-view/layouts/list/index.d.ts +3 -0
  223. package/dist/components/data-view/layouts/list/index.js +8 -0
  224. package/dist/components/data-view/layouts/list/item.d.ts +2 -0
  225. package/dist/components/data-view/layouts/list/item.js +77 -0
  226. package/dist/components/data-view/layouts/list/root.d.ts +2 -0
  227. package/dist/components/data-view/layouts/list/root.js +6 -0
  228. package/dist/components/data-view/layouts/table/empty.d.ts +2 -0
  229. package/dist/components/data-view/layouts/table/empty.js +54 -0
  230. package/dist/components/data-view/layouts/table/group.d.ts +2 -0
  231. package/dist/components/data-view/layouts/table/group.js +67 -0
  232. package/dist/components/data-view/layouts/table/index.d.ts +3 -0
  233. package/dist/components/data-view/layouts/table/index.js +8 -0
  234. package/dist/components/data-view/layouts/table/item.d.ts +2 -0
  235. package/dist/components/data-view/layouts/table/item.js +77 -0
  236. package/dist/components/data-view/layouts/table/root.d.ts +2 -0
  237. package/dist/components/data-view/layouts/table/root.js +134 -0
  238. package/dist/components/data-view/parts/body/empty.d.ts +2 -0
  239. package/dist/components/data-view/parts/body/empty.js +50 -0
  240. package/dist/components/data-view/parts/body/index.d.ts +2 -0
  241. package/dist/components/data-view/parts/body/index.js +64 -0
  242. package/dist/components/data-view/parts/controls/index.d.ts +5 -0
  243. package/dist/components/data-view/parts/controls/index.js +139 -0
  244. package/dist/components/data-view/parts/controls/search.d.ts +5 -0
  245. package/dist/components/data-view/parts/controls/search.js +77 -0
  246. package/dist/components/data-view/parts/filters/chip.d.ts +13 -0
  247. package/dist/components/data-view/parts/filters/chip.js +53 -0
  248. package/dist/components/data-view/parts/filters/editor.d.ts +10 -0
  249. package/dist/components/data-view/parts/filters/editor.js +89 -0
  250. package/dist/components/data-view/parts/filters/index.js +9 -0
  251. package/dist/components/data-view/parts/filters/list.d.ts +11 -0
  252. package/dist/components/data-view/parts/filters/list.js +108 -0
  253. package/dist/components/data-view/parts/filters/utils.d.ts +2 -0
  254. package/dist/components/data-view/parts/filters/utils.js +13 -0
  255. package/dist/components/data-view/parts/footer/actions.d.ts +2 -0
  256. package/dist/components/data-view/parts/footer/actions.js +104 -0
  257. package/dist/components/data-view/parts/footer/index.js +68 -0
  258. package/dist/components/data-view/parts/footer/selection.d.ts +2 -0
  259. package/dist/components/data-view/parts/footer/selection.js +61 -0
  260. package/dist/components/data-view/parts/index.d.ts +5 -0
  261. package/dist/components/data-view/parts/index.js +12 -0
  262. package/dist/components/data-view/parts/view-control/index.d.ts +6 -0
  263. package/dist/components/data-view/parts/view-control/index.js +215 -0
  264. package/dist/components/data-view/root.d.ts +18 -0
  265. package/dist/components/data-view/root.js +105 -0
  266. package/dist/components/data-view/slots/group/checkbox.d.ts +7 -0
  267. package/dist/components/data-view/slots/group/checkbox.js +41 -0
  268. package/dist/components/data-view/slots/group/context.d.ts +12 -0
  269. package/dist/components/data-view/slots/group/context.js +23 -0
  270. package/dist/components/data-view/slots/group/icon.d.ts +1 -0
  271. package/dist/components/data-view/slots/group/icon.js +4 -0
  272. package/dist/components/data-view/slots/group/index.js +5 -0
  273. package/dist/components/data-view/slots/group/label.d.ts +3 -0
  274. package/dist/components/data-view/slots/group/label.js +5 -0
  275. package/dist/components/data-view/slots/index.d.ts +4 -0
  276. package/dist/components/data-view/slots/index.js +9 -0
  277. package/dist/components/data-view/slots/item/actions.d.ts +6 -0
  278. package/dist/components/data-view/slots/item/actions.js +44 -0
  279. package/dist/components/data-view/slots/item/checkbox.d.ts +7 -0
  280. package/dist/components/data-view/slots/item/checkbox.js +87 -0
  281. package/dist/components/data-view/slots/item/context.d.ts +8 -0
  282. package/dist/components/data-view/slots/item/context.js +10 -0
  283. package/dist/components/data-view/slots/item/depth.d.ts +3 -0
  284. package/dist/components/data-view/slots/item/depth.js +9 -0
  285. package/dist/components/data-view/slots/item/description.d.ts +3 -0
  286. package/dist/components/data-view/slots/item/description.js +6 -0
  287. package/dist/components/data-view/slots/item/index.js +8 -0
  288. package/dist/components/data-view/slots/item/properties.d.ts +13 -0
  289. package/dist/components/data-view/slots/item/properties.js +8 -0
  290. package/dist/components/data-view/slots/item/relations.d.ts +7 -0
  291. package/dist/components/data-view/slots/item/relations.js +21 -0
  292. package/dist/components/data-view/slots/item/tags.d.ts +6 -0
  293. package/dist/components/data-view/slots/item/tags.js +7 -0
  294. package/dist/components/data-view/slots/item/thumbnail.d.ts +6 -0
  295. package/dist/components/data-view/slots/item/thumbnail.js +6 -0
  296. package/dist/components/data-view/slots/item/title.d.ts +3 -0
  297. package/dist/components/data-view/slots/item/title.js +17 -0
  298. package/dist/components/data-view/slots/item/util.d.ts +6 -0
  299. package/dist/components/data-view/slots/item/util.js +6 -0
  300. package/dist/components/data-view/slots/property/context.d.ts +8 -0
  301. package/dist/components/data-view/slots/property/context.js +10 -0
  302. package/dist/components/data-view/slots/property/field/editable.d.ts +3 -0
  303. package/dist/components/data-view/slots/property/field/editable.js +42 -0
  304. package/dist/components/data-view/slots/property/field/index.d.ts +3 -0
  305. package/dist/components/data-view/slots/property/field/index.js +7 -0
  306. package/dist/components/data-view/slots/property/field/static.d.ts +8 -0
  307. package/dist/components/data-view/slots/property/field/static.js +7 -0
  308. package/dist/components/data-view/slots/property/field/types.d.ts +5 -0
  309. package/dist/components/data-view/slots/property/field/types.js +1 -0
  310. package/dist/components/data-view/slots/property/index.js +5 -0
  311. package/dist/components/data-view/slots/property/label.d.ts +7 -0
  312. package/dist/components/data-view/slots/property/label.js +5 -0
  313. package/dist/components/data-view/slots/root/checkbox.d.ts +7 -0
  314. package/dist/components/data-view/slots/root/checkbox.js +40 -0
  315. package/dist/components/data-view/slots/root/context.d.ts +25 -0
  316. package/dist/components/data-view/slots/root/context.js +11 -0
  317. package/dist/components/data-view/slots/root/index.js +5 -0
  318. package/dist/components/data-view/types/actions.d.ts +15 -0
  319. package/dist/components/data-view/types/actions.js +1 -0
  320. package/dist/components/data-view/types/fields.d.ts +69 -0
  321. package/dist/components/data-view/types/fields.js +1 -0
  322. package/dist/components/data-view/types/filters.d.ts +19 -0
  323. package/dist/components/data-view/types/filters.js +1 -0
  324. package/dist/components/data-view/types/hierarchy.d.ts +13 -0
  325. package/dist/components/data-view/types/hierarchy.js +1 -0
  326. package/dist/components/data-view/types/index.d.ts +3 -0
  327. package/dist/components/data-view/types/index.js +1 -0
  328. package/dist/components/data-view/types/view.d.ts +47 -0
  329. package/dist/components/data-view/types/view.js +1 -0
  330. package/dist/components/filesystem/file.js +1 -1
  331. package/dist/components/filesystem/folder.js +46 -45
  332. package/dist/components/filesystem/index.js +1 -1
  333. package/dist/components/filesystem/list.js +1 -1
  334. package/dist/components/filesystem/root.js +1 -1
  335. package/dist/components/form/components/pagination.js +72 -17
  336. package/dist/components/index.d.ts +7 -2
  337. package/dist/components/index.js +69 -50
  338. package/dist/components/menu/index.d.ts +4 -0
  339. package/dist/components/menu/index.js +40 -129
  340. package/dist/components/menu/item.js +1 -1
  341. package/dist/components/menu/items/action.js +2 -1
  342. package/dist/components/menu/items/spacer.js +5 -5
  343. package/dist/components/menu/items/submenu.js +4 -3
  344. package/dist/components/menu/items/toggle.js +11 -10
  345. package/dist/components/menu/types.d.ts +1 -0
  346. package/dist/components/pagination/index.d.ts +10 -0
  347. package/dist/components/pagination/index.js +63 -0
  348. package/dist/components/progress/index.d.ts +2 -1
  349. package/dist/components/progress/index.js +29 -20
  350. package/dist/components/shell/index.js +8 -0
  351. package/dist/components/shell/pane.d.ts +9 -0
  352. package/dist/components/shell/pane.js +38 -0
  353. package/dist/components/shell/root.d.ts +6 -0
  354. package/dist/components/shell/root.js +18 -0
  355. package/dist/components/tabs/index.js +1 -1
  356. package/dist/components/tabs/list.js +6 -6
  357. package/dist/components/tabs/panel.js +36 -35
  358. package/dist/components/tabs/root.js +42 -42
  359. package/dist/components/tabs/tab.js +15 -15
  360. package/dist/components/tag/index.js +8 -0
  361. package/dist/components/tag/list.d.ts +8 -0
  362. package/dist/components/tag/list.js +10 -0
  363. package/dist/components/tag/tag.d.ts +8 -0
  364. package/dist/components/tag/tag.js +26 -0
  365. package/dist/components/tag/types.d.ts +6 -0
  366. package/dist/components/tag/types.js +1 -0
  367. package/dist/components/toolbar/divider.d.ts +6 -0
  368. package/dist/components/toolbar/divider.js +24 -0
  369. package/dist/components/toolbar/index.js +19 -15
  370. package/dist/components/toolbar/root.js +67 -4
  371. package/dist/components/window/index.d.ts +8 -0
  372. package/dist/components/window/index.js +54 -0
  373. package/dist/{composite-provider-DNftbE5U.js → composite-provider-cs4korvf.js} +4 -4
  374. package/dist/filter-HYEwffYa.js +133 -0
  375. package/dist/floating-ui.dom-2MezWvgs.js +1070 -0
  376. package/dist/hooks/index.d.ts +4 -1
  377. package/dist/hooks/index.js +10 -4
  378. package/dist/hooks/input.js +13 -13
  379. package/dist/hooks/keyboard.d.ts +7 -0
  380. package/dist/hooks/keyboard.js +40 -0
  381. package/dist/hooks/selection.d.ts +19 -0
  382. package/dist/hooks/selection.js +57 -0
  383. package/dist/hooks/state.js +3 -3
  384. package/dist/hooks/temporary.d.ts +7 -0
  385. package/dist/hooks/temporary.js +12 -0
  386. package/dist/index-C2R91pmO.js +251 -0
  387. package/dist/index-CwFPDtaz.js +172 -0
  388. package/dist/index-D7vLJIGX.js +90 -0
  389. package/dist/index-DgyEPQBp.js +55 -0
  390. package/dist/index-EPj3dCzl.js +16324 -0
  391. package/dist/index-EQOyE9yF.js +73 -0
  392. package/dist/index.js +112 -63
  393. package/dist/item-B72AQ4I4.js +470 -0
  394. package/dist/picker-D0DleQso.js +858 -0
  395. package/dist/primitives/colourway/index.d.ts +9 -0
  396. package/dist/primitives/colourway/index.js +26 -0
  397. package/dist/primitives/colourway/util.d.ts +2 -0
  398. package/dist/primitives/colourway/util.js +146 -0
  399. package/dist/primitives/icon-label/index.d.ts +8 -0
  400. package/dist/primitives/icon-label/index.js +23 -0
  401. package/dist/primitives/index.d.ts +7 -0
  402. package/dist/primitives/index.js +34 -10
  403. package/dist/primitives/link/index.d.ts +5 -0
  404. package/dist/primitives/link/index.js +24 -0
  405. package/dist/primitives/popover/index.js +10 -0
  406. package/dist/primitives/popover/root.d.ts +10 -0
  407. package/dist/primitives/popover/root.js +5 -0
  408. package/dist/primitives/popover/target.d.ts +7 -0
  409. package/dist/primitives/popover/target.js +18 -0
  410. package/dist/primitives/popover/window.d.ts +6 -0
  411. package/dist/primitives/popover/window.js +38 -0
  412. package/dist/primitives/resizable/index.js +43 -32
  413. package/dist/primitives/scroll-area/index.js +4 -5
  414. package/dist/primitives/symbol/danger.d.ts +6 -0
  415. package/dist/primitives/symbol/danger.js +83 -0
  416. package/dist/primitives/symbol/index.d.ts +5 -0
  417. package/dist/primitives/symbol/index.js +12 -0
  418. package/dist/primitives/symbol/progress.d.ts +6 -0
  419. package/dist/primitives/symbol/progress.js +162 -0
  420. package/dist/primitives/symbol/types.d.ts +5 -0
  421. package/dist/primitives/symbol/types.js +1 -0
  422. package/dist/primitives/tooltip/index.d.ts +7 -0
  423. package/dist/primitives/tooltip/index.js +178 -0
  424. package/dist/primitives/truncate/index.js +14 -13
  425. package/dist/primitives/typography/heading.d.ts +16 -0
  426. package/dist/primitives/typography/heading.js +50 -0
  427. package/dist/primitives/typography/index.d.ts +2 -0
  428. package/dist/primitives/typography/index.js +12 -0
  429. package/dist/primitives/typography/paragraph.d.ts +9 -0
  430. package/dist/primitives/typography/paragraph.js +25 -0
  431. package/dist/protectedTokens-DdjZoCxO.js +587 -0
  432. package/dist/root-j6NM_Xfo.js +20 -0
  433. package/dist/sortable.esm-De3H-_AA.js +3009 -0
  434. package/dist/style-A7_0w2WD.js +397 -0
  435. package/dist/style-Bp4uISf6.js +670 -0
  436. package/dist/toolbar-j1SJvq8D.js +6283 -0
  437. package/dist/types/component.d.ts +1 -0
  438. package/dist/types/options.d.ts +1 -0
  439. package/dist/types/options.js +8 -2
  440. package/dist/types/util.d.ts +1 -0
  441. package/dist/types/util.js +1 -0
  442. package/dist/utils/array.d.ts +1 -0
  443. package/dist/utils/array.js +9 -0
  444. package/dist/utils/components.d.ts +2 -1
  445. package/dist/utils/components.js +11 -7
  446. package/dist/utils/object.d.ts +1 -0
  447. package/dist/utils/object.js +8 -0
  448. package/dist/utils/url.d.ts +1 -0
  449. package/dist/utils/url.js +6 -0
  450. package/package.json +23 -3
  451. package/dist/2NBKRL7C-BAzCMGOw.js +0 -85
  452. package/dist/ArrowRight.es-xyNbtVOa.js +0 -60
  453. package/dist/DG5U6ZEL-CVj-Czp2.js +0 -17
  454. package/dist/F5MUBM3I-87B2_4WK.js +0 -54
  455. package/dist/MTZPJQMC-DyCWBG18.js +0 -14
  456. package/dist/P7GR5CS5-BoOYUfSQ.js +0 -19
  457. package/dist/RZ4GPYOB-13-5LlEb.js +0 -37
  458. package/dist/VIIRIBF3-D5DmZNtI.js +0 -26
  459. package/dist/WMYDSCNQ-Dy1O-Kdl.js +0 -2405
  460. package/dist/WYCIER3C-DRn904Gy.js +0 -175
  461. package/dist/components/block-editor/editor.d.ts +0 -5
  462. package/dist/components/block-editor/editor.js +0 -6
  463. package/dist/components/block-editor/index.d.ts +0 -1
  464. package/dist/components/block-editor/index.js +0 -4
  465. package/dist/components/controls/card-number-control/cards/generic.d.ts +0 -2
  466. package/dist/components/controls/card-number-control/cards/generic.js +0 -19
  467. package/dist/components/controls/select-control/component.d.ts +0 -12
  468. package/dist/components/controls/select-control/component.js +0 -1892
  469. package/dist/components/data-table/column.d.ts +0 -4
  470. package/dist/components/data-table/column.js +0 -874
  471. package/dist/components/data-table/context.d.ts +0 -7
  472. package/dist/components/data-table/context.js +0 -36
  473. package/dist/components/data-table/example.d.ts +0 -1
  474. package/dist/components/data-table/example.js +0 -5
  475. package/dist/components/data-table/footer.js +0 -23
  476. package/dist/components/data-table/header.d.ts +0 -7
  477. package/dist/components/data-table/header.js +0 -358
  478. package/dist/components/data-table/index.d.ts +0 -10
  479. package/dist/components/data-table/index.js +0 -86
  480. package/dist/components/data-table/types.d.ts +0 -75
  481. package/dist/hooks/theme.d.ts +0 -8
  482. package/dist/hooks/theme.js +0 -14
  483. package/dist/index-1AjPIqTN.js +0 -73
  484. package/dist/item-B1ugJ7YQ.js +0 -764
  485. package/dist/root-CaKPdqzv.js +0 -73
  486. /package/dist/components/{data-table → controls/list-control}/types.js +0 -0
  487. /package/dist/components/{data-table/footer.d.ts → data-view/parts/footer/index.d.ts} +0 -0
@@ -0,0 +1,1826 @@
1
+ import { useState as H } from "react";
2
+ import { useObjectState as Ke } from "../../hooks/state.js";
3
+ function h(e, n, t) {
4
+ function r(c, u) {
5
+ if (c._zod || Object.defineProperty(c, "_zod", {
6
+ value: {
7
+ def: u,
8
+ constr: i,
9
+ traits: /* @__PURE__ */ new Set()
10
+ },
11
+ enumerable: !1
12
+ }), c._zod.traits.has(e))
13
+ return;
14
+ c._zod.traits.add(e), n(c, u);
15
+ const a = i.prototype, f = Object.keys(a);
16
+ for (let l = 0; l < f.length; l++) {
17
+ const p = f[l];
18
+ p in c || (c[p] = a[p].bind(c));
19
+ }
20
+ }
21
+ const o = (t == null ? void 0 : t.Parent) ?? Object;
22
+ class s extends o {
23
+ }
24
+ Object.defineProperty(s, "name", { value: e });
25
+ function i(c) {
26
+ var u;
27
+ const a = t != null && t.Parent ? new s() : this;
28
+ r(a, c), (u = a._zod).deferred ?? (u.deferred = []);
29
+ for (const f of a._zod.deferred)
30
+ f();
31
+ return a;
32
+ }
33
+ return Object.defineProperty(i, "init", { value: r }), Object.defineProperty(i, Symbol.hasInstance, {
34
+ value: (c) => {
35
+ var u, a;
36
+ return t != null && t.Parent && c instanceof t.Parent ? !0 : (a = (u = c == null ? void 0 : c._zod) == null ? void 0 : u.traits) == null ? void 0 : a.has(e);
37
+ }
38
+ }), Object.defineProperty(i, "name", { value: e }), i;
39
+ }
40
+ class C extends Error {
41
+ constructor() {
42
+ super("Encountered Promise during synchronous parse. Use .parseAsync() instead.");
43
+ }
44
+ }
45
+ class ke extends Error {
46
+ constructor(n) {
47
+ super(`Encountered unidirectional transform during encode: ${n}`), this.name = "ZodEncodeError";
48
+ }
49
+ }
50
+ const $e = {};
51
+ function A(e) {
52
+ return $e;
53
+ }
54
+ function Pe(e) {
55
+ const n = Object.values(e).filter((r) => typeof r == "number");
56
+ return Object.entries(e).filter(([r, o]) => n.indexOf(+r) === -1).map(([r, o]) => o);
57
+ }
58
+ function Q(e, n) {
59
+ return typeof n == "bigint" ? n.toString() : n;
60
+ }
61
+ function ne(e) {
62
+ return {
63
+ get value() {
64
+ {
65
+ const n = e();
66
+ return Object.defineProperty(this, "value", { value: n }), n;
67
+ }
68
+ }
69
+ };
70
+ }
71
+ function te(e) {
72
+ return e == null;
73
+ }
74
+ function re(e) {
75
+ const n = e.startsWith("^") ? 1 : 0, t = e.endsWith("$") ? e.length - 1 : e.length;
76
+ return e.slice(n, t);
77
+ }
78
+ const ce = Symbol("evaluating");
79
+ function z(e, n, t) {
80
+ let r;
81
+ Object.defineProperty(e, n, {
82
+ get() {
83
+ if (r !== ce)
84
+ return r === void 0 && (r = ce, r = t()), r;
85
+ },
86
+ set(o) {
87
+ Object.defineProperty(e, n, {
88
+ value: o
89
+ // configurable: true,
90
+ });
91
+ },
92
+ configurable: !0
93
+ });
94
+ }
95
+ function J(e, n, t) {
96
+ Object.defineProperty(e, n, {
97
+ value: t,
98
+ writable: !0,
99
+ enumerable: !0,
100
+ configurable: !0
101
+ });
102
+ }
103
+ function Z(...e) {
104
+ const n = {};
105
+ for (const t of e) {
106
+ const r = Object.getOwnPropertyDescriptors(t);
107
+ Object.assign(n, r);
108
+ }
109
+ return Object.defineProperties({}, n);
110
+ }
111
+ function ue(e) {
112
+ return JSON.stringify(e);
113
+ }
114
+ const Se = "captureStackTrace" in Error ? Error.captureStackTrace : (...e) => {
115
+ };
116
+ function F(e) {
117
+ return typeof e == "object" && e !== null && !Array.isArray(e);
118
+ }
119
+ const Fe = ne(() => {
120
+ var e;
121
+ if (typeof navigator < "u" && ((e = navigator == null ? void 0 : navigator.userAgent) != null && e.includes("Cloudflare")))
122
+ return !1;
123
+ try {
124
+ const n = Function;
125
+ return new n(""), !0;
126
+ } catch {
127
+ return !1;
128
+ }
129
+ });
130
+ function U(e) {
131
+ if (F(e) === !1)
132
+ return !1;
133
+ const n = e.constructor;
134
+ if (n === void 0 || typeof n != "function")
135
+ return !0;
136
+ const t = n.prototype;
137
+ return !(F(t) === !1 || Object.prototype.hasOwnProperty.call(t, "isPrototypeOf") === !1);
138
+ }
139
+ function Ee(e) {
140
+ return U(e) ? { ...e } : Array.isArray(e) ? [...e] : e;
141
+ }
142
+ const qe = /* @__PURE__ */ new Set(["string", "number", "symbol"]);
143
+ function We(e) {
144
+ return e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
145
+ }
146
+ function T(e, n, t) {
147
+ const r = new e._zod.constr(n ?? e._zod.def);
148
+ return (!n || t != null && t.parent) && (r._zod.parent = e), r;
149
+ }
150
+ function P(e) {
151
+ const n = e;
152
+ if (!n)
153
+ return {};
154
+ if (typeof n == "string")
155
+ return { error: () => n };
156
+ if ((n == null ? void 0 : n.message) !== void 0) {
157
+ if ((n == null ? void 0 : n.error) !== void 0)
158
+ throw new Error("Cannot specify both `message` and `error` params");
159
+ n.error = n.message;
160
+ }
161
+ return delete n.message, typeof n.error == "string" ? { ...n, error: () => n.error } : n;
162
+ }
163
+ function Be(e) {
164
+ return Object.keys(e).filter((n) => e[n]._zod.optin === "optional" && e[n]._zod.optout === "optional");
165
+ }
166
+ function Ge(e, n) {
167
+ const t = e._zod.def, r = t.checks;
168
+ if (r && r.length > 0)
169
+ throw new Error(".pick() cannot be used on object schemas containing refinements");
170
+ const s = Z(e._zod.def, {
171
+ get shape() {
172
+ const i = {};
173
+ for (const c in n) {
174
+ if (!(c in t.shape))
175
+ throw new Error(`Unrecognized key: "${c}"`);
176
+ n[c] && (i[c] = t.shape[c]);
177
+ }
178
+ return J(this, "shape", i), i;
179
+ },
180
+ checks: []
181
+ });
182
+ return T(e, s);
183
+ }
184
+ function Ye(e, n) {
185
+ const t = e._zod.def, r = t.checks;
186
+ if (r && r.length > 0)
187
+ throw new Error(".omit() cannot be used on object schemas containing refinements");
188
+ const s = Z(e._zod.def, {
189
+ get shape() {
190
+ const i = { ...e._zod.def.shape };
191
+ for (const c in n) {
192
+ if (!(c in t.shape))
193
+ throw new Error(`Unrecognized key: "${c}"`);
194
+ n[c] && delete i[c];
195
+ }
196
+ return J(this, "shape", i), i;
197
+ },
198
+ checks: []
199
+ });
200
+ return T(e, s);
201
+ }
202
+ function He(e, n) {
203
+ if (!U(n))
204
+ throw new Error("Invalid input to extend: expected a plain object");
205
+ const t = e._zod.def.checks;
206
+ if (t && t.length > 0) {
207
+ const s = e._zod.def.shape;
208
+ for (const i in n)
209
+ if (Object.getOwnPropertyDescriptor(s, i) !== void 0)
210
+ throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.");
211
+ }
212
+ const o = Z(e._zod.def, {
213
+ get shape() {
214
+ const s = { ...e._zod.def.shape, ...n };
215
+ return J(this, "shape", s), s;
216
+ }
217
+ });
218
+ return T(e, o);
219
+ }
220
+ function Qe(e, n) {
221
+ if (!U(n))
222
+ throw new Error("Invalid input to safeExtend: expected a plain object");
223
+ const t = Z(e._zod.def, {
224
+ get shape() {
225
+ const r = { ...e._zod.def.shape, ...n };
226
+ return J(this, "shape", r), r;
227
+ }
228
+ });
229
+ return T(e, t);
230
+ }
231
+ function Xe(e, n) {
232
+ const t = Z(e._zod.def, {
233
+ get shape() {
234
+ const r = { ...e._zod.def.shape, ...n._zod.def.shape };
235
+ return J(this, "shape", r), r;
236
+ },
237
+ get catchall() {
238
+ return n._zod.def.catchall;
239
+ },
240
+ checks: []
241
+ // delete existing checks
242
+ });
243
+ return T(e, t);
244
+ }
245
+ function xe(e, n, t) {
246
+ const o = n._zod.def.checks;
247
+ if (o && o.length > 0)
248
+ throw new Error(".partial() cannot be used on object schemas containing refinements");
249
+ const i = Z(n._zod.def, {
250
+ get shape() {
251
+ const c = n._zod.def.shape, u = { ...c };
252
+ if (t)
253
+ for (const a in t) {
254
+ if (!(a in c))
255
+ throw new Error(`Unrecognized key: "${a}"`);
256
+ t[a] && (u[a] = e ? new e({
257
+ type: "optional",
258
+ innerType: c[a]
259
+ }) : c[a]);
260
+ }
261
+ else
262
+ for (const a in c)
263
+ u[a] = e ? new e({
264
+ type: "optional",
265
+ innerType: c[a]
266
+ }) : c[a];
267
+ return J(this, "shape", u), u;
268
+ },
269
+ checks: []
270
+ });
271
+ return T(n, i);
272
+ }
273
+ function en(e, n, t) {
274
+ const r = Z(n._zod.def, {
275
+ get shape() {
276
+ const o = n._zod.def.shape, s = { ...o };
277
+ if (t)
278
+ for (const i in t) {
279
+ if (!(i in s))
280
+ throw new Error(`Unrecognized key: "${i}"`);
281
+ t[i] && (s[i] = new e({
282
+ type: "nonoptional",
283
+ innerType: o[i]
284
+ }));
285
+ }
286
+ else
287
+ for (const i in o)
288
+ s[i] = new e({
289
+ type: "nonoptional",
290
+ innerType: o[i]
291
+ });
292
+ return J(this, "shape", s), s;
293
+ }
294
+ });
295
+ return T(n, r);
296
+ }
297
+ function I(e, n = 0) {
298
+ var t;
299
+ if (e.aborted === !0)
300
+ return !0;
301
+ for (let r = n; r < e.issues.length; r++)
302
+ if (((t = e.issues[r]) == null ? void 0 : t.continue) !== !0)
303
+ return !0;
304
+ return !1;
305
+ }
306
+ function je(e, n) {
307
+ return n.map((t) => {
308
+ var r;
309
+ return (r = t).path ?? (r.path = []), t.path.unshift(e), t;
310
+ });
311
+ }
312
+ function M(e) {
313
+ return typeof e == "string" ? e : e == null ? void 0 : e.message;
314
+ }
315
+ function R(e, n, t) {
316
+ var o, s, i, c, u, a;
317
+ const r = { ...e, path: e.path ?? [] };
318
+ if (!e.message) {
319
+ const f = M((i = (s = (o = e.inst) == null ? void 0 : o._zod.def) == null ? void 0 : s.error) == null ? void 0 : i.call(s, e)) ?? M((c = n == null ? void 0 : n.error) == null ? void 0 : c.call(n, e)) ?? M((u = t.customError) == null ? void 0 : u.call(t, e)) ?? M((a = t.localeError) == null ? void 0 : a.call(t, e)) ?? "Invalid input";
320
+ r.message = f;
321
+ }
322
+ return delete r.inst, delete r.continue, n != null && n.reportInput || delete r.input, r;
323
+ }
324
+ function oe(e) {
325
+ return Array.isArray(e) ? "array" : typeof e == "string" ? "string" : "unknown";
326
+ }
327
+ function L(...e) {
328
+ const [n, t, r] = e;
329
+ return typeof n == "string" ? {
330
+ message: n,
331
+ code: "custom",
332
+ input: t,
333
+ inst: r
334
+ } : { ...n };
335
+ }
336
+ const Ze = (e, n) => {
337
+ e.name = "$ZodError", Object.defineProperty(e, "_zod", {
338
+ value: e._zod,
339
+ enumerable: !1
340
+ }), Object.defineProperty(e, "issues", {
341
+ value: n,
342
+ enumerable: !1
343
+ }), e.message = JSON.stringify(n, Q, 2), Object.defineProperty(e, "toString", {
344
+ value: () => e.message,
345
+ enumerable: !1
346
+ });
347
+ }, Te = h("$ZodError", Ze), Ne = h("$ZodError", Ze, { Parent: Error });
348
+ function X(e, n = (t) => t.message) {
349
+ const t = {}, r = [];
350
+ for (const o of e.issues)
351
+ o.path.length > 0 ? (t[o.path[0]] = t[o.path[0]] || [], t[o.path[0]].push(n(o))) : r.push(n(o));
352
+ return { formErrors: r, fieldErrors: t };
353
+ }
354
+ function nn(e, n = (t) => t.message) {
355
+ const t = { _errors: [] }, r = (o) => {
356
+ for (const s of o.issues)
357
+ if (s.code === "invalid_union" && s.errors.length)
358
+ s.errors.map((i) => r({ issues: i }));
359
+ else if (s.code === "invalid_key")
360
+ r({ issues: s.issues });
361
+ else if (s.code === "invalid_element")
362
+ r({ issues: s.issues });
363
+ else if (s.path.length === 0)
364
+ t._errors.push(n(s));
365
+ else {
366
+ let i = t, c = 0;
367
+ for (; c < s.path.length; ) {
368
+ const u = s.path[c];
369
+ c === s.path.length - 1 ? (i[u] = i[u] || { _errors: [] }, i[u]._errors.push(n(s))) : i[u] = i[u] || { _errors: [] }, i = i[u], c++;
370
+ }
371
+ }
372
+ };
373
+ return r(e), t;
374
+ }
375
+ const se = (e) => (n, t, r, o) => {
376
+ const s = r ? Object.assign(r, { async: !1 }) : { async: !1 }, i = n._zod.run({ value: t, issues: [] }, s);
377
+ if (i instanceof Promise)
378
+ throw new C();
379
+ if (i.issues.length) {
380
+ const c = new ((o == null ? void 0 : o.Err) ?? e)(i.issues.map((u) => R(u, s, A())));
381
+ throw Se(c, o == null ? void 0 : o.callee), c;
382
+ }
383
+ return i.value;
384
+ }, ie = (e) => async (n, t, r, o) => {
385
+ const s = r ? Object.assign(r, { async: !0 }) : { async: !0 };
386
+ let i = n._zod.run({ value: t, issues: [] }, s);
387
+ if (i instanceof Promise && (i = await i), i.issues.length) {
388
+ const c = new ((o == null ? void 0 : o.Err) ?? e)(i.issues.map((u) => R(u, s, A())));
389
+ throw Se(c, o == null ? void 0 : o.callee), c;
390
+ }
391
+ return i.value;
392
+ }, B = (e) => (n, t, r) => {
393
+ const o = r ? { ...r, async: !1 } : { async: !1 }, s = n._zod.run({ value: t, issues: [] }, o);
394
+ if (s instanceof Promise)
395
+ throw new C();
396
+ return s.issues.length ? {
397
+ success: !1,
398
+ error: new (e ?? Te)(s.issues.map((i) => R(i, o, A())))
399
+ } : { success: !0, data: s.value };
400
+ }, tn = /* @__PURE__ */ B(Ne), G = (e) => async (n, t, r) => {
401
+ const o = r ? Object.assign(r, { async: !0 }) : { async: !0 };
402
+ let s = n._zod.run({ value: t, issues: [] }, o);
403
+ return s instanceof Promise && (s = await s), s.issues.length ? {
404
+ success: !1,
405
+ error: new e(s.issues.map((i) => R(i, o, A())))
406
+ } : { success: !0, data: s.value };
407
+ }, rn = /* @__PURE__ */ G(Ne), on = (e) => (n, t, r) => {
408
+ const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
409
+ return se(e)(n, t, o);
410
+ }, sn = (e) => (n, t, r) => se(e)(n, t, r), cn = (e) => async (n, t, r) => {
411
+ const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
412
+ return ie(e)(n, t, o);
413
+ }, un = (e) => async (n, t, r) => ie(e)(n, t, r), an = (e) => (n, t, r) => {
414
+ const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
415
+ return B(e)(n, t, o);
416
+ }, fn = (e) => (n, t, r) => B(e)(n, t, r), ln = (e) => async (n, t, r) => {
417
+ const o = r ? Object.assign(r, { direction: "backward" }) : { direction: "backward" };
418
+ return G(e)(n, t, o);
419
+ }, dn = (e) => async (n, t, r) => G(e)(n, t, r), D = /* @__PURE__ */ h("$ZodCheck", (e, n) => {
420
+ var t;
421
+ e._zod ?? (e._zod = {}), e._zod.def = n, (t = e._zod).onattach ?? (t.onattach = []);
422
+ }), hn = /* @__PURE__ */ h("$ZodCheckMaxLength", (e, n) => {
423
+ var t;
424
+ D.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
425
+ const o = r.value;
426
+ return !te(o) && o.length !== void 0;
427
+ }), e._zod.onattach.push((r) => {
428
+ const o = r._zod.bag.maximum ?? Number.POSITIVE_INFINITY;
429
+ n.maximum < o && (r._zod.bag.maximum = n.maximum);
430
+ }), e._zod.check = (r) => {
431
+ const o = r.value;
432
+ if (o.length <= n.maximum)
433
+ return;
434
+ const i = oe(o);
435
+ r.issues.push({
436
+ origin: i,
437
+ code: "too_big",
438
+ maximum: n.maximum,
439
+ inclusive: !0,
440
+ input: o,
441
+ inst: e,
442
+ continue: !n.abort
443
+ });
444
+ };
445
+ }), pn = /* @__PURE__ */ h("$ZodCheckMinLength", (e, n) => {
446
+ var t;
447
+ D.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
448
+ const o = r.value;
449
+ return !te(o) && o.length !== void 0;
450
+ }), e._zod.onattach.push((r) => {
451
+ const o = r._zod.bag.minimum ?? Number.NEGATIVE_INFINITY;
452
+ n.minimum > o && (r._zod.bag.minimum = n.minimum);
453
+ }), e._zod.check = (r) => {
454
+ const o = r.value;
455
+ if (o.length >= n.minimum)
456
+ return;
457
+ const i = oe(o);
458
+ r.issues.push({
459
+ origin: i,
460
+ code: "too_small",
461
+ minimum: n.minimum,
462
+ inclusive: !0,
463
+ input: o,
464
+ inst: e,
465
+ continue: !n.abort
466
+ });
467
+ };
468
+ }), _n = /* @__PURE__ */ h("$ZodCheckLengthEquals", (e, n) => {
469
+ var t;
470
+ D.init(e, n), (t = e._zod.def).when ?? (t.when = (r) => {
471
+ const o = r.value;
472
+ return !te(o) && o.length !== void 0;
473
+ }), e._zod.onattach.push((r) => {
474
+ const o = r._zod.bag;
475
+ o.minimum = n.length, o.maximum = n.length, o.length = n.length;
476
+ }), e._zod.check = (r) => {
477
+ const o = r.value, s = o.length;
478
+ if (s === n.length)
479
+ return;
480
+ const i = oe(o), c = s > n.length;
481
+ r.issues.push({
482
+ origin: i,
483
+ ...c ? { code: "too_big", maximum: n.length } : { code: "too_small", minimum: n.length },
484
+ inclusive: !0,
485
+ exact: !0,
486
+ input: r.value,
487
+ inst: e,
488
+ continue: !n.abort
489
+ });
490
+ };
491
+ }), gn = /* @__PURE__ */ h("$ZodCheckOverwrite", (e, n) => {
492
+ D.init(e, n), e._zod.check = (t) => {
493
+ t.value = n.tx(t.value);
494
+ };
495
+ });
496
+ class yn {
497
+ constructor(n = []) {
498
+ this.content = [], this.indent = 0, this && (this.args = n);
499
+ }
500
+ indented(n) {
501
+ this.indent += 1, n(this), this.indent -= 1;
502
+ }
503
+ write(n) {
504
+ if (typeof n == "function") {
505
+ n(this, { execution: "sync" }), n(this, { execution: "async" });
506
+ return;
507
+ }
508
+ const r = n.split(`
509
+ `).filter((i) => i), o = Math.min(...r.map((i) => i.length - i.trimStart().length)), s = r.map((i) => i.slice(o)).map((i) => " ".repeat(this.indent * 2) + i);
510
+ for (const i of s)
511
+ this.content.push(i);
512
+ }
513
+ compile() {
514
+ const n = Function, t = this == null ? void 0 : this.args, o = [...((this == null ? void 0 : this.content) ?? [""]).map((s) => ` ${s}`)];
515
+ return new n(...t, o.join(`
516
+ `));
517
+ }
518
+ }
519
+ const zn = {
520
+ major: 4,
521
+ minor: 3,
522
+ patch: 6
523
+ }, w = /* @__PURE__ */ h("$ZodType", (e, n) => {
524
+ var o;
525
+ var t;
526
+ e ?? (e = {}), e._zod.def = n, e._zod.bag = e._zod.bag || {}, e._zod.version = zn;
527
+ const r = [...e._zod.def.checks ?? []];
528
+ e._zod.traits.has("$ZodCheck") && r.unshift(e);
529
+ for (const s of r)
530
+ for (const i of s._zod.onattach)
531
+ i(e);
532
+ if (r.length === 0)
533
+ (t = e._zod).deferred ?? (t.deferred = []), (o = e._zod.deferred) == null || o.push(() => {
534
+ e._zod.run = e._zod.parse;
535
+ });
536
+ else {
537
+ const s = (c, u, a) => {
538
+ let f = I(c), l;
539
+ for (const p of u) {
540
+ if (p._zod.def.when) {
541
+ if (!p._zod.def.when(c))
542
+ continue;
543
+ } else if (f)
544
+ continue;
545
+ const d = c.issues.length, y = p._zod.check(c);
546
+ if (y instanceof Promise && (a == null ? void 0 : a.async) === !1)
547
+ throw new C();
548
+ if (l || y instanceof Promise)
549
+ l = (l ?? Promise.resolve()).then(async () => {
550
+ await y, c.issues.length !== d && (f || (f = I(c, d)));
551
+ });
552
+ else {
553
+ if (c.issues.length === d)
554
+ continue;
555
+ f || (f = I(c, d));
556
+ }
557
+ }
558
+ return l ? l.then(() => c) : c;
559
+ }, i = (c, u, a) => {
560
+ if (I(c))
561
+ return c.aborted = !0, c;
562
+ const f = s(u, r, a);
563
+ if (f instanceof Promise) {
564
+ if (a.async === !1)
565
+ throw new C();
566
+ return f.then((l) => e._zod.parse(l, a));
567
+ }
568
+ return e._zod.parse(f, a);
569
+ };
570
+ e._zod.run = (c, u) => {
571
+ if (u.skipChecks)
572
+ return e._zod.parse(c, u);
573
+ if (u.direction === "backward") {
574
+ const f = e._zod.parse({ value: c.value, issues: [] }, { ...u, skipChecks: !0 });
575
+ return f instanceof Promise ? f.then((l) => i(l, c, u)) : i(f, c, u);
576
+ }
577
+ const a = e._zod.parse(c, u);
578
+ if (a instanceof Promise) {
579
+ if (u.async === !1)
580
+ throw new C();
581
+ return a.then((f) => s(f, r, u));
582
+ }
583
+ return s(a, r, u);
584
+ };
585
+ }
586
+ z(e, "~standard", () => ({
587
+ validate: (s) => {
588
+ var i;
589
+ try {
590
+ const c = tn(e, s);
591
+ return c.success ? { value: c.data } : { issues: (i = c.error) == null ? void 0 : i.issues };
592
+ } catch {
593
+ return rn(e, s).then((u) => {
594
+ var a;
595
+ return u.success ? { value: u.data } : { issues: (a = u.error) == null ? void 0 : a.issues };
596
+ });
597
+ }
598
+ },
599
+ vendor: "zod",
600
+ version: 1
601
+ }));
602
+ }), mn = /* @__PURE__ */ h("$ZodUnknown", (e, n) => {
603
+ w.init(e, n), e._zod.parse = (t) => t;
604
+ }), vn = /* @__PURE__ */ h("$ZodNever", (e, n) => {
605
+ w.init(e, n), e._zod.parse = (t, r) => (t.issues.push({
606
+ expected: "never",
607
+ code: "invalid_type",
608
+ input: t.value,
609
+ inst: e
610
+ }), t);
611
+ });
612
+ function ae(e, n, t) {
613
+ e.issues.length && n.issues.push(...je(t, e.issues)), n.value[t] = e.value;
614
+ }
615
+ const wn = /* @__PURE__ */ h("$ZodArray", (e, n) => {
616
+ w.init(e, n), e._zod.parse = (t, r) => {
617
+ const o = t.value;
618
+ if (!Array.isArray(o))
619
+ return t.issues.push({
620
+ expected: "array",
621
+ code: "invalid_type",
622
+ input: o,
623
+ inst: e
624
+ }), t;
625
+ t.value = Array(o.length);
626
+ const s = [];
627
+ for (let i = 0; i < o.length; i++) {
628
+ const c = o[i], u = n.element._zod.run({
629
+ value: c,
630
+ issues: []
631
+ }, r);
632
+ u instanceof Promise ? s.push(u.then((a) => ae(a, t, i))) : ae(u, t, i);
633
+ }
634
+ return s.length ? Promise.all(s).then(() => t) : t;
635
+ };
636
+ });
637
+ function q(e, n, t, r, o) {
638
+ if (e.issues.length) {
639
+ if (o && !(t in r))
640
+ return;
641
+ n.issues.push(...je(t, e.issues));
642
+ }
643
+ e.value === void 0 ? t in r && (n.value[t] = void 0) : n.value[t] = e.value;
644
+ }
645
+ function Ae(e) {
646
+ var r, o, s, i;
647
+ const n = Object.keys(e.shape);
648
+ for (const c of n)
649
+ if (!((i = (s = (o = (r = e.shape) == null ? void 0 : r[c]) == null ? void 0 : o._zod) == null ? void 0 : s.traits) != null && i.has("$ZodType")))
650
+ throw new Error(`Invalid element at key "${c}": expected a Zod schema`);
651
+ const t = Be(e.shape);
652
+ return {
653
+ ...e,
654
+ keys: n,
655
+ keySet: new Set(n),
656
+ numKeys: n.length,
657
+ optionalKeys: new Set(t)
658
+ };
659
+ }
660
+ function Re(e, n, t, r, o, s) {
661
+ const i = [], c = o.keySet, u = o.catchall._zod, a = u.def.type, f = u.optout === "optional";
662
+ for (const l in n) {
663
+ if (c.has(l))
664
+ continue;
665
+ if (a === "never") {
666
+ i.push(l);
667
+ continue;
668
+ }
669
+ const p = u.run({ value: n[l], issues: [] }, r);
670
+ p instanceof Promise ? e.push(p.then((d) => q(d, t, l, n, f))) : q(p, t, l, n, f);
671
+ }
672
+ return i.length && t.issues.push({
673
+ code: "unrecognized_keys",
674
+ keys: i,
675
+ input: n,
676
+ inst: s
677
+ }), e.length ? Promise.all(e).then(() => t) : t;
678
+ }
679
+ const bn = /* @__PURE__ */ h("$ZodObject", (e, n) => {
680
+ w.init(e, n);
681
+ const t = Object.getOwnPropertyDescriptor(n, "shape");
682
+ if (!(t != null && t.get)) {
683
+ const c = n.shape;
684
+ Object.defineProperty(n, "shape", {
685
+ get: () => {
686
+ const u = { ...c };
687
+ return Object.defineProperty(n, "shape", {
688
+ value: u
689
+ }), u;
690
+ }
691
+ });
692
+ }
693
+ const r = ne(() => Ae(n));
694
+ z(e._zod, "propValues", () => {
695
+ const c = n.shape, u = {};
696
+ for (const a in c) {
697
+ const f = c[a]._zod;
698
+ if (f.values) {
699
+ u[a] ?? (u[a] = /* @__PURE__ */ new Set());
700
+ for (const l of f.values)
701
+ u[a].add(l);
702
+ }
703
+ }
704
+ return u;
705
+ });
706
+ const o = F, s = n.catchall;
707
+ let i;
708
+ e._zod.parse = (c, u) => {
709
+ i ?? (i = r.value);
710
+ const a = c.value;
711
+ if (!o(a))
712
+ return c.issues.push({
713
+ expected: "object",
714
+ code: "invalid_type",
715
+ input: a,
716
+ inst: e
717
+ }), c;
718
+ c.value = {};
719
+ const f = [], l = i.shape;
720
+ for (const p of i.keys) {
721
+ const d = l[p], y = d._zod.optout === "optional", g = d._zod.run({ value: a[p], issues: [] }, u);
722
+ g instanceof Promise ? f.push(g.then((_) => q(_, c, p, a, y))) : q(g, c, p, a, y);
723
+ }
724
+ return s ? Re(f, a, c, u, r.value, e) : f.length ? Promise.all(f).then(() => c) : c;
725
+ };
726
+ }), On = /* @__PURE__ */ h("$ZodObjectJIT", (e, n) => {
727
+ bn.init(e, n);
728
+ const t = e._zod.parse, r = ne(() => Ae(n)), o = (p) => {
729
+ var N;
730
+ const d = new yn(["shape", "payload", "ctx"]), y = r.value, g = (j) => {
731
+ const $ = ue(j);
732
+ return `shape[${$}]._zod.run({ value: input[${$}], issues: [] }, ctx)`;
733
+ };
734
+ d.write("const input = payload.value;");
735
+ const _ = /* @__PURE__ */ Object.create(null);
736
+ let v = 0;
737
+ for (const j of y.keys)
738
+ _[j] = `key_${v++}`;
739
+ d.write("const newResult = {};");
740
+ for (const j of y.keys) {
741
+ const $ = _[j], E = ue(j), Y = p[j], Me = ((N = Y == null ? void 0 : Y._zod) == null ? void 0 : N.optout) === "optional";
742
+ d.write(`const ${$} = ${g(j)};`), Me ? d.write(`
743
+ if (${$}.issues.length) {
744
+ if (${E} in input) {
745
+ payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
746
+ ...iss,
747
+ path: iss.path ? [${E}, ...iss.path] : [${E}]
748
+ })));
749
+ }
750
+ }
751
+
752
+ if (${$}.value === undefined) {
753
+ if (${E} in input) {
754
+ newResult[${E}] = undefined;
755
+ }
756
+ } else {
757
+ newResult[${E}] = ${$}.value;
758
+ }
759
+
760
+ `) : d.write(`
761
+ if (${$}.issues.length) {
762
+ payload.issues = payload.issues.concat(${$}.issues.map(iss => ({
763
+ ...iss,
764
+ path: iss.path ? [${E}, ...iss.path] : [${E}]
765
+ })));
766
+ }
767
+
768
+ if (${$}.value === undefined) {
769
+ if (${E} in input) {
770
+ newResult[${E}] = undefined;
771
+ }
772
+ } else {
773
+ newResult[${E}] = ${$}.value;
774
+ }
775
+
776
+ `);
777
+ }
778
+ d.write("payload.value = newResult;"), d.write("return payload;");
779
+ const m = d.compile();
780
+ return (j, $) => m(p, j, $);
781
+ };
782
+ let s;
783
+ const i = F, c = !$e.jitless, a = c && Fe.value, f = n.catchall;
784
+ let l;
785
+ e._zod.parse = (p, d) => {
786
+ l ?? (l = r.value);
787
+ const y = p.value;
788
+ return i(y) ? c && a && (d == null ? void 0 : d.async) === !1 && d.jitless !== !0 ? (s || (s = o(n.shape)), p = s(p, d), f ? Re([], y, p, d, l, e) : p) : t(p, d) : (p.issues.push({
789
+ expected: "object",
790
+ code: "invalid_type",
791
+ input: y,
792
+ inst: e
793
+ }), p);
794
+ };
795
+ });
796
+ function fe(e, n, t, r) {
797
+ for (const s of e)
798
+ if (s.issues.length === 0)
799
+ return n.value = s.value, n;
800
+ const o = e.filter((s) => !I(s));
801
+ return o.length === 1 ? (n.value = o[0].value, o[0]) : (n.issues.push({
802
+ code: "invalid_union",
803
+ input: n.value,
804
+ inst: t,
805
+ errors: e.map((s) => s.issues.map((i) => R(i, r, A())))
806
+ }), n);
807
+ }
808
+ const kn = /* @__PURE__ */ h("$ZodUnion", (e, n) => {
809
+ w.init(e, n), z(e._zod, "optin", () => n.options.some((o) => o._zod.optin === "optional") ? "optional" : void 0), z(e._zod, "optout", () => n.options.some((o) => o._zod.optout === "optional") ? "optional" : void 0), z(e._zod, "values", () => {
810
+ if (n.options.every((o) => o._zod.values))
811
+ return new Set(n.options.flatMap((o) => Array.from(o._zod.values)));
812
+ }), z(e._zod, "pattern", () => {
813
+ if (n.options.every((o) => o._zod.pattern)) {
814
+ const o = n.options.map((s) => s._zod.pattern);
815
+ return new RegExp(`^(${o.map((s) => re(s.source)).join("|")})$`);
816
+ }
817
+ });
818
+ const t = n.options.length === 1, r = n.options[0]._zod.run;
819
+ e._zod.parse = (o, s) => {
820
+ if (t)
821
+ return r(o, s);
822
+ let i = !1;
823
+ const c = [];
824
+ for (const u of n.options) {
825
+ const a = u._zod.run({
826
+ value: o.value,
827
+ issues: []
828
+ }, s);
829
+ if (a instanceof Promise)
830
+ c.push(a), i = !0;
831
+ else {
832
+ if (a.issues.length === 0)
833
+ return a;
834
+ c.push(a);
835
+ }
836
+ }
837
+ return i ? Promise.all(c).then((u) => fe(u, o, e, s)) : fe(c, o, e, s);
838
+ };
839
+ }), $n = /* @__PURE__ */ h("$ZodIntersection", (e, n) => {
840
+ w.init(e, n), e._zod.parse = (t, r) => {
841
+ const o = t.value, s = n.left._zod.run({ value: o, issues: [] }, r), i = n.right._zod.run({ value: o, issues: [] }, r);
842
+ return s instanceof Promise || i instanceof Promise ? Promise.all([s, i]).then(([u, a]) => le(t, u, a)) : le(t, s, i);
843
+ };
844
+ });
845
+ function x(e, n) {
846
+ if (e === n)
847
+ return { valid: !0, data: e };
848
+ if (e instanceof Date && n instanceof Date && +e == +n)
849
+ return { valid: !0, data: e };
850
+ if (U(e) && U(n)) {
851
+ const t = Object.keys(n), r = Object.keys(e).filter((s) => t.indexOf(s) !== -1), o = { ...e, ...n };
852
+ for (const s of r) {
853
+ const i = x(e[s], n[s]);
854
+ if (!i.valid)
855
+ return {
856
+ valid: !1,
857
+ mergeErrorPath: [s, ...i.mergeErrorPath]
858
+ };
859
+ o[s] = i.data;
860
+ }
861
+ return { valid: !0, data: o };
862
+ }
863
+ if (Array.isArray(e) && Array.isArray(n)) {
864
+ if (e.length !== n.length)
865
+ return { valid: !1, mergeErrorPath: [] };
866
+ const t = [];
867
+ for (let r = 0; r < e.length; r++) {
868
+ const o = e[r], s = n[r], i = x(o, s);
869
+ if (!i.valid)
870
+ return {
871
+ valid: !1,
872
+ mergeErrorPath: [r, ...i.mergeErrorPath]
873
+ };
874
+ t.push(i.data);
875
+ }
876
+ return { valid: !0, data: t };
877
+ }
878
+ return { valid: !1, mergeErrorPath: [] };
879
+ }
880
+ function le(e, n, t) {
881
+ const r = /* @__PURE__ */ new Map();
882
+ let o;
883
+ for (const c of n.issues)
884
+ if (c.code === "unrecognized_keys") {
885
+ o ?? (o = c);
886
+ for (const u of c.keys)
887
+ r.has(u) || r.set(u, {}), r.get(u).l = !0;
888
+ } else
889
+ e.issues.push(c);
890
+ for (const c of t.issues)
891
+ if (c.code === "unrecognized_keys")
892
+ for (const u of c.keys)
893
+ r.has(u) || r.set(u, {}), r.get(u).r = !0;
894
+ else
895
+ e.issues.push(c);
896
+ const s = [...r].filter(([, c]) => c.l && c.r).map(([c]) => c);
897
+ if (s.length && o && e.issues.push({ ...o, keys: s }), I(e))
898
+ return e;
899
+ const i = x(n.value, t.value);
900
+ if (!i.valid)
901
+ throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(i.mergeErrorPath)}`);
902
+ return e.value = i.data, e;
903
+ }
904
+ const Pn = /* @__PURE__ */ h("$ZodEnum", (e, n) => {
905
+ w.init(e, n);
906
+ const t = Pe(n.entries), r = new Set(t);
907
+ e._zod.values = r, e._zod.pattern = new RegExp(`^(${t.filter((o) => qe.has(typeof o)).map((o) => typeof o == "string" ? We(o) : o.toString()).join("|")})$`), e._zod.parse = (o, s) => {
908
+ const i = o.value;
909
+ return r.has(i) || o.issues.push({
910
+ code: "invalid_value",
911
+ values: t,
912
+ input: i,
913
+ inst: e
914
+ }), o;
915
+ };
916
+ }), Sn = /* @__PURE__ */ h("$ZodTransform", (e, n) => {
917
+ w.init(e, n), e._zod.parse = (t, r) => {
918
+ if (r.direction === "backward")
919
+ throw new ke(e.constructor.name);
920
+ const o = n.transform(t.value, t);
921
+ if (r.async)
922
+ return (o instanceof Promise ? o : Promise.resolve(o)).then((i) => (t.value = i, t));
923
+ if (o instanceof Promise)
924
+ throw new C();
925
+ return t.value = o, t;
926
+ };
927
+ });
928
+ function de(e, n) {
929
+ return e.issues.length && n === void 0 ? { issues: [], value: void 0 } : e;
930
+ }
931
+ const Je = /* @__PURE__ */ h("$ZodOptional", (e, n) => {
932
+ w.init(e, n), e._zod.optin = "optional", e._zod.optout = "optional", z(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, void 0]) : void 0), z(e._zod, "pattern", () => {
933
+ const t = n.innerType._zod.pattern;
934
+ return t ? new RegExp(`^(${re(t.source)})?$`) : void 0;
935
+ }), e._zod.parse = (t, r) => {
936
+ if (n.innerType._zod.optin === "optional") {
937
+ const o = n.innerType._zod.run(t, r);
938
+ return o instanceof Promise ? o.then((s) => de(s, t.value)) : de(o, t.value);
939
+ }
940
+ return t.value === void 0 ? t : n.innerType._zod.run(t, r);
941
+ };
942
+ }), En = /* @__PURE__ */ h("$ZodExactOptional", (e, n) => {
943
+ Je.init(e, n), z(e._zod, "values", () => n.innerType._zod.values), z(e._zod, "pattern", () => n.innerType._zod.pattern), e._zod.parse = (t, r) => n.innerType._zod.run(t, r);
944
+ }), jn = /* @__PURE__ */ h("$ZodNullable", (e, n) => {
945
+ w.init(e, n), z(e._zod, "optin", () => n.innerType._zod.optin), z(e._zod, "optout", () => n.innerType._zod.optout), z(e._zod, "pattern", () => {
946
+ const t = n.innerType._zod.pattern;
947
+ return t ? new RegExp(`^(${re(t.source)}|null)$`) : void 0;
948
+ }), z(e._zod, "values", () => n.innerType._zod.values ? /* @__PURE__ */ new Set([...n.innerType._zod.values, null]) : void 0), e._zod.parse = (t, r) => t.value === null ? t : n.innerType._zod.run(t, r);
949
+ }), Zn = /* @__PURE__ */ h("$ZodDefault", (e, n) => {
950
+ w.init(e, n), e._zod.optin = "optional", z(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
951
+ if (r.direction === "backward")
952
+ return n.innerType._zod.run(t, r);
953
+ if (t.value === void 0)
954
+ return t.value = n.defaultValue, t;
955
+ const o = n.innerType._zod.run(t, r);
956
+ return o instanceof Promise ? o.then((s) => he(s, n)) : he(o, n);
957
+ };
958
+ });
959
+ function he(e, n) {
960
+ return e.value === void 0 && (e.value = n.defaultValue), e;
961
+ }
962
+ const Tn = /* @__PURE__ */ h("$ZodPrefault", (e, n) => {
963
+ w.init(e, n), e._zod.optin = "optional", z(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => (r.direction === "backward" || t.value === void 0 && (t.value = n.defaultValue), n.innerType._zod.run(t, r));
964
+ }), Nn = /* @__PURE__ */ h("$ZodNonOptional", (e, n) => {
965
+ w.init(e, n), z(e._zod, "values", () => {
966
+ const t = n.innerType._zod.values;
967
+ return t ? new Set([...t].filter((r) => r !== void 0)) : void 0;
968
+ }), e._zod.parse = (t, r) => {
969
+ const o = n.innerType._zod.run(t, r);
970
+ return o instanceof Promise ? o.then((s) => pe(s, e)) : pe(o, e);
971
+ };
972
+ });
973
+ function pe(e, n) {
974
+ return !e.issues.length && e.value === void 0 && e.issues.push({
975
+ code: "invalid_type",
976
+ expected: "nonoptional",
977
+ input: e.value,
978
+ inst: n
979
+ }), e;
980
+ }
981
+ const An = /* @__PURE__ */ h("$ZodCatch", (e, n) => {
982
+ w.init(e, n), z(e._zod, "optin", () => n.innerType._zod.optin), z(e._zod, "optout", () => n.innerType._zod.optout), z(e._zod, "values", () => n.innerType._zod.values), e._zod.parse = (t, r) => {
983
+ if (r.direction === "backward")
984
+ return n.innerType._zod.run(t, r);
985
+ const o = n.innerType._zod.run(t, r);
986
+ return o instanceof Promise ? o.then((s) => (t.value = s.value, s.issues.length && (t.value = n.catchValue({
987
+ ...t,
988
+ error: {
989
+ issues: s.issues.map((i) => R(i, r, A()))
990
+ },
991
+ input: t.value
992
+ }), t.issues = []), t)) : (t.value = o.value, o.issues.length && (t.value = n.catchValue({
993
+ ...t,
994
+ error: {
995
+ issues: o.issues.map((s) => R(s, r, A()))
996
+ },
997
+ input: t.value
998
+ }), t.issues = []), t);
999
+ };
1000
+ }), Rn = /* @__PURE__ */ h("$ZodPipe", (e, n) => {
1001
+ w.init(e, n), z(e._zod, "values", () => n.in._zod.values), z(e._zod, "optin", () => n.in._zod.optin), z(e._zod, "optout", () => n.out._zod.optout), z(e._zod, "propValues", () => n.in._zod.propValues), e._zod.parse = (t, r) => {
1002
+ if (r.direction === "backward") {
1003
+ const s = n.out._zod.run(t, r);
1004
+ return s instanceof Promise ? s.then((i) => K(i, n.in, r)) : K(s, n.in, r);
1005
+ }
1006
+ const o = n.in._zod.run(t, r);
1007
+ return o instanceof Promise ? o.then((s) => K(s, n.out, r)) : K(o, n.out, r);
1008
+ };
1009
+ });
1010
+ function K(e, n, t) {
1011
+ return e.issues.length ? (e.aborted = !0, e) : n._zod.run({ value: e.value, issues: e.issues }, t);
1012
+ }
1013
+ const Jn = /* @__PURE__ */ h("$ZodReadonly", (e, n) => {
1014
+ w.init(e, n), z(e._zod, "propValues", () => n.innerType._zod.propValues), z(e._zod, "values", () => n.innerType._zod.values), z(e._zod, "optin", () => {
1015
+ var t, r;
1016
+ return (r = (t = n.innerType) == null ? void 0 : t._zod) == null ? void 0 : r.optin;
1017
+ }), z(e._zod, "optout", () => {
1018
+ var t, r;
1019
+ return (r = (t = n.innerType) == null ? void 0 : t._zod) == null ? void 0 : r.optout;
1020
+ }), e._zod.parse = (t, r) => {
1021
+ if (r.direction === "backward")
1022
+ return n.innerType._zod.run(t, r);
1023
+ const o = n.innerType._zod.run(t, r);
1024
+ return o instanceof Promise ? o.then(_e) : _e(o);
1025
+ };
1026
+ });
1027
+ function _e(e) {
1028
+ return e.value = Object.freeze(e.value), e;
1029
+ }
1030
+ const In = /* @__PURE__ */ h("$ZodCustom", (e, n) => {
1031
+ D.init(e, n), w.init(e, n), e._zod.parse = (t, r) => t, e._zod.check = (t) => {
1032
+ const r = t.value, o = n.fn(r);
1033
+ if (o instanceof Promise)
1034
+ return o.then((s) => ge(s, t, r, e));
1035
+ ge(o, t, r, e);
1036
+ };
1037
+ });
1038
+ function ge(e, n, t, r) {
1039
+ if (!e) {
1040
+ const o = {
1041
+ code: "custom",
1042
+ input: t,
1043
+ inst: r,
1044
+ // incorporates params.error into issue reporting
1045
+ path: [...r._zod.def.path ?? []],
1046
+ // incorporates params.error into issue reporting
1047
+ continue: !r._zod.def.abort
1048
+ // params: inst._zod.def.params,
1049
+ };
1050
+ r._zod.def.params && (o.params = r._zod.def.params), n.issues.push(L(o));
1051
+ }
1052
+ }
1053
+ var ye;
1054
+ class Cn {
1055
+ constructor() {
1056
+ this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map();
1057
+ }
1058
+ add(n, ...t) {
1059
+ const r = t[0];
1060
+ return this._map.set(n, r), r && typeof r == "object" && "id" in r && this._idmap.set(r.id, n), this;
1061
+ }
1062
+ clear() {
1063
+ return this._map = /* @__PURE__ */ new WeakMap(), this._idmap = /* @__PURE__ */ new Map(), this;
1064
+ }
1065
+ remove(n) {
1066
+ const t = this._map.get(n);
1067
+ return t && typeof t == "object" && "id" in t && this._idmap.delete(t.id), this._map.delete(n), this;
1068
+ }
1069
+ get(n) {
1070
+ const t = n._zod.parent;
1071
+ if (t) {
1072
+ const r = { ...this.get(t) ?? {} };
1073
+ delete r.id;
1074
+ const o = { ...r, ...this._map.get(n) };
1075
+ return Object.keys(o).length ? o : void 0;
1076
+ }
1077
+ return this._map.get(n);
1078
+ }
1079
+ has(n) {
1080
+ return this._map.has(n);
1081
+ }
1082
+ }
1083
+ function Dn() {
1084
+ return new Cn();
1085
+ }
1086
+ (ye = globalThis).__zod_globalRegistry ?? (ye.__zod_globalRegistry = Dn());
1087
+ const V = globalThis.__zod_globalRegistry;
1088
+ // @__NO_SIDE_EFFECTS__
1089
+ function Vn(e) {
1090
+ return new e({
1091
+ type: "unknown"
1092
+ });
1093
+ }
1094
+ // @__NO_SIDE_EFFECTS__
1095
+ function Un(e, n) {
1096
+ return new e({
1097
+ type: "never",
1098
+ ...P(n)
1099
+ });
1100
+ }
1101
+ // @__NO_SIDE_EFFECTS__
1102
+ function Ln(e, n) {
1103
+ return new hn({
1104
+ check: "max_length",
1105
+ ...P(n),
1106
+ maximum: e
1107
+ });
1108
+ }
1109
+ // @__NO_SIDE_EFFECTS__
1110
+ function ze(e, n) {
1111
+ return new pn({
1112
+ check: "min_length",
1113
+ ...P(n),
1114
+ minimum: e
1115
+ });
1116
+ }
1117
+ // @__NO_SIDE_EFFECTS__
1118
+ function Mn(e, n) {
1119
+ return new _n({
1120
+ check: "length_equals",
1121
+ ...P(n),
1122
+ length: e
1123
+ });
1124
+ }
1125
+ // @__NO_SIDE_EFFECTS__
1126
+ function Kn(e) {
1127
+ return new gn({
1128
+ check: "overwrite",
1129
+ tx: e
1130
+ });
1131
+ }
1132
+ // @__NO_SIDE_EFFECTS__
1133
+ function Fn(e, n, t) {
1134
+ return new e({
1135
+ type: "array",
1136
+ element: n,
1137
+ // get element() {
1138
+ // return element;
1139
+ // },
1140
+ ...P(t)
1141
+ });
1142
+ }
1143
+ // @__NO_SIDE_EFFECTS__
1144
+ function qn(e, n, t) {
1145
+ return new e({
1146
+ type: "custom",
1147
+ check: "custom",
1148
+ fn: n,
1149
+ ...P(t)
1150
+ });
1151
+ }
1152
+ // @__NO_SIDE_EFFECTS__
1153
+ function Wn(e) {
1154
+ const n = /* @__PURE__ */ Bn((t) => (t.addIssue = (r) => {
1155
+ if (typeof r == "string")
1156
+ t.issues.push(L(r, t.value, n._zod.def));
1157
+ else {
1158
+ const o = r;
1159
+ o.fatal && (o.continue = !1), o.code ?? (o.code = "custom"), o.input ?? (o.input = t.value), o.inst ?? (o.inst = n), o.continue ?? (o.continue = !n._zod.def.abort), t.issues.push(L(o));
1160
+ }
1161
+ }, e(t.value, t)));
1162
+ return n;
1163
+ }
1164
+ // @__NO_SIDE_EFFECTS__
1165
+ function Bn(e, n) {
1166
+ const t = new D({
1167
+ check: "custom",
1168
+ ...P(n)
1169
+ });
1170
+ return t._zod.check = e, t;
1171
+ }
1172
+ function Ie(e) {
1173
+ let n = (e == null ? void 0 : e.target) ?? "draft-2020-12";
1174
+ return n === "draft-4" && (n = "draft-04"), n === "draft-7" && (n = "draft-07"), {
1175
+ processors: e.processors ?? {},
1176
+ metadataRegistry: (e == null ? void 0 : e.metadata) ?? V,
1177
+ target: n,
1178
+ unrepresentable: (e == null ? void 0 : e.unrepresentable) ?? "throw",
1179
+ override: (e == null ? void 0 : e.override) ?? (() => {
1180
+ }),
1181
+ io: (e == null ? void 0 : e.io) ?? "output",
1182
+ counter: 0,
1183
+ seen: /* @__PURE__ */ new Map(),
1184
+ cycles: (e == null ? void 0 : e.cycles) ?? "ref",
1185
+ reused: (e == null ? void 0 : e.reused) ?? "inline",
1186
+ external: (e == null ? void 0 : e.external) ?? void 0
1187
+ };
1188
+ }
1189
+ function O(e, n, t = { path: [], schemaPath: [] }) {
1190
+ var f, l;
1191
+ var r;
1192
+ const o = e._zod.def, s = n.seen.get(e);
1193
+ if (s)
1194
+ return s.count++, t.schemaPath.includes(e) && (s.cycle = t.path), s.schema;
1195
+ const i = { schema: {}, count: 1, cycle: void 0, path: t.path };
1196
+ n.seen.set(e, i);
1197
+ const c = (l = (f = e._zod).toJSONSchema) == null ? void 0 : l.call(f);
1198
+ if (c)
1199
+ i.schema = c;
1200
+ else {
1201
+ const p = {
1202
+ ...t,
1203
+ schemaPath: [...t.schemaPath, e],
1204
+ path: t.path
1205
+ };
1206
+ if (e._zod.processJSONSchema)
1207
+ e._zod.processJSONSchema(n, i.schema, p);
1208
+ else {
1209
+ const y = i.schema, g = n.processors[o.type];
1210
+ if (!g)
1211
+ throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);
1212
+ g(e, n, y, p);
1213
+ }
1214
+ const d = e._zod.parent;
1215
+ d && (i.ref || (i.ref = d), O(d, n, p), n.seen.get(d).isParent = !0);
1216
+ }
1217
+ const u = n.metadataRegistry.get(e);
1218
+ return u && Object.assign(i.schema, u), n.io === "input" && k(e) && (delete i.schema.examples, delete i.schema.default), n.io === "input" && i.schema._prefault && ((r = i.schema).default ?? (r.default = i.schema._prefault)), delete i.schema._prefault, n.seen.get(e).schema;
1219
+ }
1220
+ function Ce(e, n) {
1221
+ var i, c, u, a;
1222
+ const t = e.seen.get(n);
1223
+ if (!t)
1224
+ throw new Error("Unprocessed schema. This is a bug in Zod.");
1225
+ const r = /* @__PURE__ */ new Map();
1226
+ for (const f of e.seen.entries()) {
1227
+ const l = (i = e.metadataRegistry.get(f[0])) == null ? void 0 : i.id;
1228
+ if (l) {
1229
+ const p = r.get(l);
1230
+ if (p && p !== f[0])
1231
+ throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
1232
+ r.set(l, f[0]);
1233
+ }
1234
+ }
1235
+ const o = (f) => {
1236
+ var g;
1237
+ const l = e.target === "draft-2020-12" ? "$defs" : "definitions";
1238
+ if (e.external) {
1239
+ const _ = (g = e.external.registry.get(f[0])) == null ? void 0 : g.id, v = e.external.uri ?? ((N) => N);
1240
+ if (_)
1241
+ return { ref: v(_) };
1242
+ const m = f[1].defId ?? f[1].schema.id ?? `schema${e.counter++}`;
1243
+ return f[1].defId = m, { defId: m, ref: `${v("__shared")}#/${l}/${m}` };
1244
+ }
1245
+ if (f[1] === t)
1246
+ return { ref: "#" };
1247
+ const d = `#/${l}/`, y = f[1].schema.id ?? `__schema${e.counter++}`;
1248
+ return { defId: y, ref: d + y };
1249
+ }, s = (f) => {
1250
+ if (f[1].schema.$ref)
1251
+ return;
1252
+ const l = f[1], { ref: p, defId: d } = o(f);
1253
+ l.def = { ...l.schema }, d && (l.defId = d);
1254
+ const y = l.schema;
1255
+ for (const g in y)
1256
+ delete y[g];
1257
+ y.$ref = p;
1258
+ };
1259
+ if (e.cycles === "throw")
1260
+ for (const f of e.seen.entries()) {
1261
+ const l = f[1];
1262
+ if (l.cycle)
1263
+ throw new Error(`Cycle detected: #/${(c = l.cycle) == null ? void 0 : c.join("/")}/<root>
1264
+
1265
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`);
1266
+ }
1267
+ for (const f of e.seen.entries()) {
1268
+ const l = f[1];
1269
+ if (n === f[0]) {
1270
+ s(f);
1271
+ continue;
1272
+ }
1273
+ if (e.external) {
1274
+ const d = (u = e.external.registry.get(f[0])) == null ? void 0 : u.id;
1275
+ if (n !== f[0] && d) {
1276
+ s(f);
1277
+ continue;
1278
+ }
1279
+ }
1280
+ if ((a = e.metadataRegistry.get(f[0])) == null ? void 0 : a.id) {
1281
+ s(f);
1282
+ continue;
1283
+ }
1284
+ if (l.cycle) {
1285
+ s(f);
1286
+ continue;
1287
+ }
1288
+ if (l.count > 1 && e.reused === "ref") {
1289
+ s(f);
1290
+ continue;
1291
+ }
1292
+ }
1293
+ }
1294
+ function De(e, n) {
1295
+ var i, c, u;
1296
+ const t = e.seen.get(n);
1297
+ if (!t)
1298
+ throw new Error("Unprocessed schema. This is a bug in Zod.");
1299
+ const r = (a) => {
1300
+ const f = e.seen.get(a);
1301
+ if (f.ref === null)
1302
+ return;
1303
+ const l = f.def ?? f.schema, p = { ...l }, d = f.ref;
1304
+ if (f.ref = null, d) {
1305
+ r(d);
1306
+ const g = e.seen.get(d), _ = g.schema;
1307
+ if (_.$ref && (e.target === "draft-07" || e.target === "draft-04" || e.target === "openapi-3.0") ? (l.allOf = l.allOf ?? [], l.allOf.push(_)) : Object.assign(l, _), Object.assign(l, p), a._zod.parent === d)
1308
+ for (const m in l)
1309
+ m === "$ref" || m === "allOf" || m in p || delete l[m];
1310
+ if (_.$ref && g.def)
1311
+ for (const m in l)
1312
+ m === "$ref" || m === "allOf" || m in g.def && JSON.stringify(l[m]) === JSON.stringify(g.def[m]) && delete l[m];
1313
+ }
1314
+ const y = a._zod.parent;
1315
+ if (y && y !== d) {
1316
+ r(y);
1317
+ const g = e.seen.get(y);
1318
+ if (g != null && g.schema.$ref && (l.$ref = g.schema.$ref, g.def))
1319
+ for (const _ in l)
1320
+ _ === "$ref" || _ === "allOf" || _ in g.def && JSON.stringify(l[_]) === JSON.stringify(g.def[_]) && delete l[_];
1321
+ }
1322
+ e.override({
1323
+ zodSchema: a,
1324
+ jsonSchema: l,
1325
+ path: f.path ?? []
1326
+ });
1327
+ };
1328
+ for (const a of [...e.seen.entries()].reverse())
1329
+ r(a[0]);
1330
+ const o = {};
1331
+ if (e.target === "draft-2020-12" ? o.$schema = "https://json-schema.org/draft/2020-12/schema" : e.target === "draft-07" ? o.$schema = "http://json-schema.org/draft-07/schema#" : e.target === "draft-04" ? o.$schema = "http://json-schema.org/draft-04/schema#" : e.target, (i = e.external) != null && i.uri) {
1332
+ const a = (c = e.external.registry.get(n)) == null ? void 0 : c.id;
1333
+ if (!a)
1334
+ throw new Error("Schema is missing an `id` property");
1335
+ o.$id = e.external.uri(a);
1336
+ }
1337
+ Object.assign(o, t.def ?? t.schema);
1338
+ const s = ((u = e.external) == null ? void 0 : u.defs) ?? {};
1339
+ for (const a of e.seen.entries()) {
1340
+ const f = a[1];
1341
+ f.def && f.defId && (s[f.defId] = f.def);
1342
+ }
1343
+ e.external || Object.keys(s).length > 0 && (e.target === "draft-2020-12" ? o.$defs = s : o.definitions = s);
1344
+ try {
1345
+ const a = JSON.parse(JSON.stringify(o));
1346
+ return Object.defineProperty(a, "~standard", {
1347
+ value: {
1348
+ ...n["~standard"],
1349
+ jsonSchema: {
1350
+ input: W(n, "input", e.processors),
1351
+ output: W(n, "output", e.processors)
1352
+ }
1353
+ },
1354
+ enumerable: !1,
1355
+ writable: !1
1356
+ }), a;
1357
+ } catch {
1358
+ throw new Error("Error converting schema to JSON.");
1359
+ }
1360
+ }
1361
+ function k(e, n) {
1362
+ const t = n ?? { seen: /* @__PURE__ */ new Set() };
1363
+ if (t.seen.has(e))
1364
+ return !1;
1365
+ t.seen.add(e);
1366
+ const r = e._zod.def;
1367
+ if (r.type === "transform")
1368
+ return !0;
1369
+ if (r.type === "array")
1370
+ return k(r.element, t);
1371
+ if (r.type === "set")
1372
+ return k(r.valueType, t);
1373
+ if (r.type === "lazy")
1374
+ return k(r.getter(), t);
1375
+ if (r.type === "promise" || r.type === "optional" || r.type === "nonoptional" || r.type === "nullable" || r.type === "readonly" || r.type === "default" || r.type === "prefault")
1376
+ return k(r.innerType, t);
1377
+ if (r.type === "intersection")
1378
+ return k(r.left, t) || k(r.right, t);
1379
+ if (r.type === "record" || r.type === "map")
1380
+ return k(r.keyType, t) || k(r.valueType, t);
1381
+ if (r.type === "pipe")
1382
+ return k(r.in, t) || k(r.out, t);
1383
+ if (r.type === "object") {
1384
+ for (const o in r.shape)
1385
+ if (k(r.shape[o], t))
1386
+ return !0;
1387
+ return !1;
1388
+ }
1389
+ if (r.type === "union") {
1390
+ for (const o of r.options)
1391
+ if (k(o, t))
1392
+ return !0;
1393
+ return !1;
1394
+ }
1395
+ if (r.type === "tuple") {
1396
+ for (const o of r.items)
1397
+ if (k(o, t))
1398
+ return !0;
1399
+ return !!(r.rest && k(r.rest, t));
1400
+ }
1401
+ return !1;
1402
+ }
1403
+ const Gn = (e, n = {}) => (t) => {
1404
+ const r = Ie({ ...t, processors: n });
1405
+ return O(e, r), Ce(r, e), De(r, e);
1406
+ }, W = (e, n, t = {}) => (r) => {
1407
+ const { libraryOptions: o, target: s } = r ?? {}, i = Ie({ ...o ?? {}, target: s, io: n, processors: t });
1408
+ return O(e, i), Ce(i, e), De(i, e);
1409
+ }, Yn = (e, n, t, r) => {
1410
+ t.not = {};
1411
+ }, Hn = (e, n, t, r) => {
1412
+ }, Qn = (e, n, t, r) => {
1413
+ const o = e._zod.def, s = Pe(o.entries);
1414
+ s.every((i) => typeof i == "number") && (t.type = "number"), s.every((i) => typeof i == "string") && (t.type = "string"), t.enum = s;
1415
+ }, Xn = (e, n, t, r) => {
1416
+ if (n.unrepresentable === "throw")
1417
+ throw new Error("Custom types cannot be represented in JSON Schema");
1418
+ }, xn = (e, n, t, r) => {
1419
+ if (n.unrepresentable === "throw")
1420
+ throw new Error("Transforms cannot be represented in JSON Schema");
1421
+ }, et = (e, n, t, r) => {
1422
+ const o = t, s = e._zod.def, { minimum: i, maximum: c } = e._zod.bag;
1423
+ typeof i == "number" && (o.minItems = i), typeof c == "number" && (o.maxItems = c), o.type = "array", o.items = O(s.element, n, { ...r, path: [...r.path, "items"] });
1424
+ }, nt = (e, n, t, r) => {
1425
+ var a;
1426
+ const o = t, s = e._zod.def;
1427
+ o.type = "object", o.properties = {};
1428
+ const i = s.shape;
1429
+ for (const f in i)
1430
+ o.properties[f] = O(i[f], n, {
1431
+ ...r,
1432
+ path: [...r.path, "properties", f]
1433
+ });
1434
+ const c = new Set(Object.keys(i)), u = new Set([...c].filter((f) => {
1435
+ const l = s.shape[f]._zod;
1436
+ return n.io === "input" ? l.optin === void 0 : l.optout === void 0;
1437
+ }));
1438
+ u.size > 0 && (o.required = Array.from(u)), ((a = s.catchall) == null ? void 0 : a._zod.def.type) === "never" ? o.additionalProperties = !1 : s.catchall ? s.catchall && (o.additionalProperties = O(s.catchall, n, {
1439
+ ...r,
1440
+ path: [...r.path, "additionalProperties"]
1441
+ })) : n.io === "output" && (o.additionalProperties = !1);
1442
+ }, tt = (e, n, t, r) => {
1443
+ const o = e._zod.def, s = o.inclusive === !1, i = o.options.map((c, u) => O(c, n, {
1444
+ ...r,
1445
+ path: [...r.path, s ? "oneOf" : "anyOf", u]
1446
+ }));
1447
+ s ? t.oneOf = i : t.anyOf = i;
1448
+ }, rt = (e, n, t, r) => {
1449
+ const o = e._zod.def, s = O(o.left, n, {
1450
+ ...r,
1451
+ path: [...r.path, "allOf", 0]
1452
+ }), i = O(o.right, n, {
1453
+ ...r,
1454
+ path: [...r.path, "allOf", 1]
1455
+ }), c = (a) => "allOf" in a && Object.keys(a).length === 1, u = [
1456
+ ...c(s) ? s.allOf : [s],
1457
+ ...c(i) ? i.allOf : [i]
1458
+ ];
1459
+ t.allOf = u;
1460
+ }, ot = (e, n, t, r) => {
1461
+ const o = e._zod.def, s = O(o.innerType, n, r), i = n.seen.get(e);
1462
+ n.target === "openapi-3.0" ? (i.ref = o.innerType, t.nullable = !0) : t.anyOf = [s, { type: "null" }];
1463
+ }, st = (e, n, t, r) => {
1464
+ const o = e._zod.def;
1465
+ O(o.innerType, n, r);
1466
+ const s = n.seen.get(e);
1467
+ s.ref = o.innerType;
1468
+ }, it = (e, n, t, r) => {
1469
+ const o = e._zod.def;
1470
+ O(o.innerType, n, r);
1471
+ const s = n.seen.get(e);
1472
+ s.ref = o.innerType, t.default = JSON.parse(JSON.stringify(o.defaultValue));
1473
+ }, ct = (e, n, t, r) => {
1474
+ const o = e._zod.def;
1475
+ O(o.innerType, n, r);
1476
+ const s = n.seen.get(e);
1477
+ s.ref = o.innerType, n.io === "input" && (t._prefault = JSON.parse(JSON.stringify(o.defaultValue)));
1478
+ }, ut = (e, n, t, r) => {
1479
+ const o = e._zod.def;
1480
+ O(o.innerType, n, r);
1481
+ const s = n.seen.get(e);
1482
+ s.ref = o.innerType;
1483
+ let i;
1484
+ try {
1485
+ i = o.catchValue(void 0);
1486
+ } catch {
1487
+ throw new Error("Dynamic catch values are not supported in JSON Schema");
1488
+ }
1489
+ t.default = i;
1490
+ }, at = (e, n, t, r) => {
1491
+ const o = e._zod.def, s = n.io === "input" ? o.in._zod.def.type === "transform" ? o.out : o.in : o.out;
1492
+ O(s, n, r);
1493
+ const i = n.seen.get(e);
1494
+ i.ref = s;
1495
+ }, ft = (e, n, t, r) => {
1496
+ const o = e._zod.def;
1497
+ O(o.innerType, n, r);
1498
+ const s = n.seen.get(e);
1499
+ s.ref = o.innerType, t.readOnly = !0;
1500
+ }, Ve = (e, n, t, r) => {
1501
+ const o = e._zod.def;
1502
+ O(o.innerType, n, r);
1503
+ const s = n.seen.get(e);
1504
+ s.ref = o.innerType;
1505
+ }, lt = (e, n) => {
1506
+ Te.init(e, n), e.name = "ZodError", Object.defineProperties(e, {
1507
+ format: {
1508
+ value: (t) => nn(e, t)
1509
+ // enumerable: false,
1510
+ },
1511
+ flatten: {
1512
+ value: (t) => X(e, t)
1513
+ // enumerable: false,
1514
+ },
1515
+ addIssue: {
1516
+ value: (t) => {
1517
+ e.issues.push(t), e.message = JSON.stringify(e.issues, Q, 2);
1518
+ }
1519
+ // enumerable: false,
1520
+ },
1521
+ addIssues: {
1522
+ value: (t) => {
1523
+ e.issues.push(...t), e.message = JSON.stringify(e.issues, Q, 2);
1524
+ }
1525
+ // enumerable: false,
1526
+ },
1527
+ isEmpty: {
1528
+ get() {
1529
+ return e.issues.length === 0;
1530
+ }
1531
+ // enumerable: false,
1532
+ }
1533
+ });
1534
+ }, S = h("ZodError", lt, {
1535
+ Parent: Error
1536
+ }), dt = /* @__PURE__ */ se(S), ht = /* @__PURE__ */ ie(S), pt = /* @__PURE__ */ B(S), _t = /* @__PURE__ */ G(S), gt = /* @__PURE__ */ on(S), yt = /* @__PURE__ */ sn(S), zt = /* @__PURE__ */ cn(S), mt = /* @__PURE__ */ un(S), vt = /* @__PURE__ */ an(S), wt = /* @__PURE__ */ fn(S), bt = /* @__PURE__ */ ln(S), Ot = /* @__PURE__ */ dn(S), b = /* @__PURE__ */ h("ZodType", (e, n) => (w.init(e, n), Object.assign(e["~standard"], {
1537
+ jsonSchema: {
1538
+ input: W(e, "input"),
1539
+ output: W(e, "output")
1540
+ }
1541
+ }), e.toJSONSchema = Gn(e, {}), e.def = n, e.type = n.type, Object.defineProperty(e, "_def", { value: n }), e.check = (...t) => e.clone(Z(n, {
1542
+ checks: [
1543
+ ...n.checks ?? [],
1544
+ ...t.map((r) => typeof r == "function" ? { _zod: { check: r, def: { check: "custom" }, onattach: [] } } : r)
1545
+ ]
1546
+ }), {
1547
+ parent: !0
1548
+ }), e.with = e.check, e.clone = (t, r) => T(e, t, r), e.brand = () => e, e.register = (t, r) => (t.add(e, r), e), e.parse = (t, r) => dt(e, t, r, { callee: e.parse }), e.safeParse = (t, r) => pt(e, t, r), e.parseAsync = async (t, r) => ht(e, t, r, { callee: e.parseAsync }), e.safeParseAsync = async (t, r) => _t(e, t, r), e.spa = e.safeParseAsync, e.encode = (t, r) => gt(e, t, r), e.decode = (t, r) => yt(e, t, r), e.encodeAsync = async (t, r) => zt(e, t, r), e.decodeAsync = async (t, r) => mt(e, t, r), e.safeEncode = (t, r) => vt(e, t, r), e.safeDecode = (t, r) => wt(e, t, r), e.safeEncodeAsync = async (t, r) => bt(e, t, r), e.safeDecodeAsync = async (t, r) => Ot(e, t, r), e.refine = (t, r) => e.check(Qt(t, r)), e.superRefine = (t) => e.check(Xt(t)), e.overwrite = (t) => e.check(/* @__PURE__ */ Kn(t)), e.optional = () => we(e), e.exactOptional = () => Dt(e), e.nullable = () => be(e), e.nullish = () => we(be(e)), e.nonoptional = (t) => Ft(e, t), e.array = () => Et(e), e.or = (t) => Tt([e, t]), e.and = (t) => At(e, t), e.transform = (t) => Oe(e, It(t)), e.default = (t) => Lt(e, t), e.prefault = (t) => Kt(e, t), e.catch = (t) => Wt(e, t), e.pipe = (t) => Oe(e, t), e.readonly = () => Yt(e), e.describe = (t) => {
1549
+ const r = e.clone();
1550
+ return V.add(r, { description: t }), r;
1551
+ }, Object.defineProperty(e, "description", {
1552
+ get() {
1553
+ var t;
1554
+ return (t = V.get(e)) == null ? void 0 : t.description;
1555
+ },
1556
+ configurable: !0
1557
+ }), e.meta = (...t) => {
1558
+ if (t.length === 0)
1559
+ return V.get(e);
1560
+ const r = e.clone();
1561
+ return V.add(r, t[0]), r;
1562
+ }, e.isOptional = () => e.safeParse(void 0).success, e.isNullable = () => e.safeParse(null).success, e.apply = (t) => t(e), e)), kt = /* @__PURE__ */ h("ZodUnknown", (e, n) => {
1563
+ mn.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => Hn();
1564
+ });
1565
+ function me() {
1566
+ return /* @__PURE__ */ Vn(kt);
1567
+ }
1568
+ const $t = /* @__PURE__ */ h("ZodNever", (e, n) => {
1569
+ vn.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => Yn(e, t, r);
1570
+ });
1571
+ function Pt(e) {
1572
+ return /* @__PURE__ */ Un($t, e);
1573
+ }
1574
+ const St = /* @__PURE__ */ h("ZodArray", (e, n) => {
1575
+ wn.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => et(e, t, r, o), e.element = n.element, e.min = (t, r) => e.check(/* @__PURE__ */ ze(t, r)), e.nonempty = (t) => e.check(/* @__PURE__ */ ze(1, t)), e.max = (t, r) => e.check(/* @__PURE__ */ Ln(t, r)), e.length = (t, r) => e.check(/* @__PURE__ */ Mn(t, r)), e.unwrap = () => e.element;
1576
+ });
1577
+ function Et(e, n) {
1578
+ return /* @__PURE__ */ Fn(St, e, n);
1579
+ }
1580
+ const jt = /* @__PURE__ */ h("ZodObject", (e, n) => {
1581
+ On.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => nt(e, t, r, o), z(e, "shape", () => n.shape), e.keyof = () => Rt(Object.keys(e._zod.def.shape)), e.catchall = (t) => e.clone({ ...e._zod.def, catchall: t }), e.passthrough = () => e.clone({ ...e._zod.def, catchall: me() }), e.loose = () => e.clone({ ...e._zod.def, catchall: me() }), e.strict = () => e.clone({ ...e._zod.def, catchall: Pt() }), e.strip = () => e.clone({ ...e._zod.def, catchall: void 0 }), e.extend = (t) => He(e, t), e.safeExtend = (t) => Qe(e, t), e.merge = (t) => Xe(e, t), e.pick = (t) => Ge(e, t), e.omit = (t) => Ye(e, t), e.partial = (...t) => xe(Ue, e, t[0]), e.required = (...t) => en(Le, e, t[0]);
1582
+ });
1583
+ function ve(e, n) {
1584
+ const t = {
1585
+ type: "object",
1586
+ shape: e ?? {},
1587
+ ...P(n)
1588
+ };
1589
+ return new jt(t);
1590
+ }
1591
+ const Zt = /* @__PURE__ */ h("ZodUnion", (e, n) => {
1592
+ kn.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => tt(e, t, r, o), e.options = n.options;
1593
+ });
1594
+ function Tt(e, n) {
1595
+ return new Zt({
1596
+ type: "union",
1597
+ options: e,
1598
+ ...P(n)
1599
+ });
1600
+ }
1601
+ const Nt = /* @__PURE__ */ h("ZodIntersection", (e, n) => {
1602
+ $n.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => rt(e, t, r, o);
1603
+ });
1604
+ function At(e, n) {
1605
+ return new Nt({
1606
+ type: "intersection",
1607
+ left: e,
1608
+ right: n
1609
+ });
1610
+ }
1611
+ const ee = /* @__PURE__ */ h("ZodEnum", (e, n) => {
1612
+ Pn.init(e, n), b.init(e, n), e._zod.processJSONSchema = (r, o, s) => Qn(e, r, o), e.enum = n.entries, e.options = Object.values(n.entries);
1613
+ const t = new Set(Object.keys(n.entries));
1614
+ e.extract = (r, o) => {
1615
+ const s = {};
1616
+ for (const i of r)
1617
+ if (t.has(i))
1618
+ s[i] = n.entries[i];
1619
+ else
1620
+ throw new Error(`Key ${i} not found in enum`);
1621
+ return new ee({
1622
+ ...n,
1623
+ checks: [],
1624
+ ...P(o),
1625
+ entries: s
1626
+ });
1627
+ }, e.exclude = (r, o) => {
1628
+ const s = { ...n.entries };
1629
+ for (const i of r)
1630
+ if (t.has(i))
1631
+ delete s[i];
1632
+ else
1633
+ throw new Error(`Key ${i} not found in enum`);
1634
+ return new ee({
1635
+ ...n,
1636
+ checks: [],
1637
+ ...P(o),
1638
+ entries: s
1639
+ });
1640
+ };
1641
+ });
1642
+ function Rt(e, n) {
1643
+ const t = Array.isArray(e) ? Object.fromEntries(e.map((r) => [r, r])) : e;
1644
+ return new ee({
1645
+ type: "enum",
1646
+ entries: t,
1647
+ ...P(n)
1648
+ });
1649
+ }
1650
+ const Jt = /* @__PURE__ */ h("ZodTransform", (e, n) => {
1651
+ Sn.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => xn(e, t), e._zod.parse = (t, r) => {
1652
+ if (r.direction === "backward")
1653
+ throw new ke(e.constructor.name);
1654
+ t.addIssue = (s) => {
1655
+ if (typeof s == "string")
1656
+ t.issues.push(L(s, t.value, n));
1657
+ else {
1658
+ const i = s;
1659
+ i.fatal && (i.continue = !1), i.code ?? (i.code = "custom"), i.input ?? (i.input = t.value), i.inst ?? (i.inst = e), t.issues.push(L(i));
1660
+ }
1661
+ };
1662
+ const o = n.transform(t.value, t);
1663
+ return o instanceof Promise ? o.then((s) => (t.value = s, t)) : (t.value = o, t);
1664
+ };
1665
+ });
1666
+ function It(e) {
1667
+ return new Jt({
1668
+ type: "transform",
1669
+ transform: e
1670
+ });
1671
+ }
1672
+ const Ue = /* @__PURE__ */ h("ZodOptional", (e, n) => {
1673
+ Je.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => Ve(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1674
+ });
1675
+ function we(e) {
1676
+ return new Ue({
1677
+ type: "optional",
1678
+ innerType: e
1679
+ });
1680
+ }
1681
+ const Ct = /* @__PURE__ */ h("ZodExactOptional", (e, n) => {
1682
+ En.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => Ve(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1683
+ });
1684
+ function Dt(e) {
1685
+ return new Ct({
1686
+ type: "optional",
1687
+ innerType: e
1688
+ });
1689
+ }
1690
+ const Vt = /* @__PURE__ */ h("ZodNullable", (e, n) => {
1691
+ jn.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => ot(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1692
+ });
1693
+ function be(e) {
1694
+ return new Vt({
1695
+ type: "nullable",
1696
+ innerType: e
1697
+ });
1698
+ }
1699
+ const Ut = /* @__PURE__ */ h("ZodDefault", (e, n) => {
1700
+ Zn.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => it(e, t, r, o), e.unwrap = () => e._zod.def.innerType, e.removeDefault = e.unwrap;
1701
+ });
1702
+ function Lt(e, n) {
1703
+ return new Ut({
1704
+ type: "default",
1705
+ innerType: e,
1706
+ get defaultValue() {
1707
+ return typeof n == "function" ? n() : Ee(n);
1708
+ }
1709
+ });
1710
+ }
1711
+ const Mt = /* @__PURE__ */ h("ZodPrefault", (e, n) => {
1712
+ Tn.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => ct(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1713
+ });
1714
+ function Kt(e, n) {
1715
+ return new Mt({
1716
+ type: "prefault",
1717
+ innerType: e,
1718
+ get defaultValue() {
1719
+ return typeof n == "function" ? n() : Ee(n);
1720
+ }
1721
+ });
1722
+ }
1723
+ const Le = /* @__PURE__ */ h("ZodNonOptional", (e, n) => {
1724
+ Nn.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => st(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1725
+ });
1726
+ function Ft(e, n) {
1727
+ return new Le({
1728
+ type: "nonoptional",
1729
+ innerType: e,
1730
+ ...P(n)
1731
+ });
1732
+ }
1733
+ const qt = /* @__PURE__ */ h("ZodCatch", (e, n) => {
1734
+ An.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => ut(e, t, r, o), e.unwrap = () => e._zod.def.innerType, e.removeCatch = e.unwrap;
1735
+ });
1736
+ function Wt(e, n) {
1737
+ return new qt({
1738
+ type: "catch",
1739
+ innerType: e,
1740
+ catchValue: typeof n == "function" ? n : () => n
1741
+ });
1742
+ }
1743
+ const Bt = /* @__PURE__ */ h("ZodPipe", (e, n) => {
1744
+ Rn.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => at(e, t, r, o), e.in = n.in, e.out = n.out;
1745
+ });
1746
+ function Oe(e, n) {
1747
+ return new Bt({
1748
+ type: "pipe",
1749
+ in: e,
1750
+ out: n
1751
+ // ...util.normalizeParams(params),
1752
+ });
1753
+ }
1754
+ const Gt = /* @__PURE__ */ h("ZodReadonly", (e, n) => {
1755
+ Jn.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => ft(e, t, r, o), e.unwrap = () => e._zod.def.innerType;
1756
+ });
1757
+ function Yt(e) {
1758
+ return new Gt({
1759
+ type: "readonly",
1760
+ innerType: e
1761
+ });
1762
+ }
1763
+ const Ht = /* @__PURE__ */ h("ZodCustom", (e, n) => {
1764
+ In.init(e, n), b.init(e, n), e._zod.processJSONSchema = (t, r, o) => Xn(e, t);
1765
+ });
1766
+ function Qt(e, n = {}) {
1767
+ return /* @__PURE__ */ qn(Ht, e, n);
1768
+ }
1769
+ function Xt(e) {
1770
+ return /* @__PURE__ */ Wn(e);
1771
+ }
1772
+ function nr(e) {
1773
+ const { defaults: n, validation: t } = e, [r, o] = H("clean"), [s, i] = Ke(n), [c, u] = H({}), [a, f] = H(null), l = (_) => ({
1774
+ value: s[_],
1775
+ onChangeValue: (v) => {
1776
+ o("dirty"), i({ [_]: v }), t[_].safeParse(v).success && d(_, void 0);
1777
+ },
1778
+ onBlur: () => {
1779
+ const v = t[_].safeParse(s[_]);
1780
+ if (v.success)
1781
+ d(_, void 0);
1782
+ else {
1783
+ const m = X(v.error);
1784
+ d(_, m.formErrors[0]);
1785
+ }
1786
+ },
1787
+ help: c[_],
1788
+ "aria-invalid": !!c[_]
1789
+ }), p = async (_) => {
1790
+ o("saving"), await _(s), o("clean"), f(/* @__PURE__ */ new Date());
1791
+ }, d = (_, v) => {
1792
+ u(v ? (m) => ({ ...m, [_]: v }) : (m) => {
1793
+ const { ...N } = m;
1794
+ return delete N[_], N;
1795
+ });
1796
+ }, y = () => ve(t).safeParse(s).success, g = () => {
1797
+ const v = ve(t).safeParse(s);
1798
+ if (v.success)
1799
+ u({});
1800
+ else {
1801
+ const m = X(v.error);
1802
+ u(m.fieldErrors);
1803
+ }
1804
+ return v.success;
1805
+ };
1806
+ return {
1807
+ status: r,
1808
+ save: p,
1809
+ lastSaved: a,
1810
+ isDirty: r === "dirty",
1811
+ isClean: r === "clean",
1812
+ isSaving: r === "saving",
1813
+ values: s,
1814
+ setValues: i,
1815
+ defaults: n,
1816
+ errors: c,
1817
+ hasErrors: Object.keys(c).length > 0,
1818
+ checkValidity: y,
1819
+ reportValidity: g,
1820
+ validation: t,
1821
+ control: l
1822
+ };
1823
+ }
1824
+ export {
1825
+ nr as createFormStore
1826
+ };