@satoshibits/react-json-schema-builder 1.0.0 → 1.0.1

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 (285) hide show
  1. package/README.md +142 -37
  2. package/dist/index.cjs100.js.map +1 -1
  3. package/dist/index.cjs101.js.map +1 -1
  4. package/dist/index.cjs102.js.map +1 -1
  5. package/dist/index.cjs103.js.map +1 -1
  6. package/dist/index.cjs104.js.map +1 -1
  7. package/dist/index.cjs105.js.map +1 -1
  8. package/dist/index.cjs106.js.map +1 -1
  9. package/dist/index.cjs107.js.map +1 -1
  10. package/dist/index.cjs108.js.map +1 -1
  11. package/dist/index.cjs109.js.map +1 -1
  12. package/dist/index.cjs11.js +1 -1
  13. package/dist/index.cjs12.js +1 -1
  14. package/dist/index.cjs13.js +1 -1
  15. package/dist/index.cjs14.js +1 -1
  16. package/dist/index.cjs15.js +1 -1
  17. package/dist/index.cjs16.js +1 -1
  18. package/dist/index.cjs17.js +1 -1
  19. package/dist/index.cjs18.js +1 -1
  20. package/dist/index.cjs20.js +1 -1
  21. package/dist/index.cjs21.js +1 -1
  22. package/dist/index.cjs22.js +1 -6
  23. package/dist/index.cjs22.js.map +1 -1
  24. package/dist/index.cjs23.js +1 -1
  25. package/dist/index.cjs23.js.map +1 -1
  26. package/dist/index.cjs24.js +1 -1
  27. package/dist/index.cjs24.js.map +1 -1
  28. package/dist/index.cjs25.js +1 -1
  29. package/dist/index.cjs25.js.map +1 -1
  30. package/dist/index.cjs26.js +1 -1
  31. package/dist/index.cjs26.js.map +1 -1
  32. package/dist/index.cjs27.js +6 -1
  33. package/dist/index.cjs27.js.map +1 -1
  34. package/dist/index.cjs28.js +1 -1
  35. package/dist/index.cjs28.js.map +1 -1
  36. package/dist/index.cjs29.js +1 -1
  37. package/dist/index.cjs29.js.map +1 -1
  38. package/dist/index.cjs3.js +1 -1
  39. package/dist/index.cjs3.js.map +1 -1
  40. package/dist/index.cjs30.js.map +1 -1
  41. package/dist/index.cjs31.js +1 -1
  42. package/dist/index.cjs31.js.map +1 -1
  43. package/dist/index.cjs33.js +4 -4
  44. package/dist/index.cjs33.js.map +1 -1
  45. package/dist/index.cjs34.js +12 -13
  46. package/dist/index.cjs34.js.map +1 -1
  47. package/dist/index.cjs35.js +1 -1
  48. package/dist/index.cjs35.js.map +1 -1
  49. package/dist/index.cjs38.js +1 -1
  50. package/dist/index.cjs38.js.map +1 -1
  51. package/dist/index.cjs40.js +1 -1
  52. package/dist/index.cjs40.js.map +1 -1
  53. package/dist/index.cjs41.js +1 -1
  54. package/dist/index.cjs41.js.map +1 -1
  55. package/dist/index.cjs42.js +6 -1
  56. package/dist/index.cjs42.js.map +1 -1
  57. package/dist/index.cjs43.js +6 -1
  58. package/dist/index.cjs43.js.map +1 -1
  59. package/dist/index.cjs44.js +6 -1
  60. package/dist/index.cjs44.js.map +1 -1
  61. package/dist/index.cjs45.js +1 -1
  62. package/dist/index.cjs45.js.map +1 -1
  63. package/dist/index.cjs46.js +1 -1
  64. package/dist/index.cjs46.js.map +1 -1
  65. package/dist/index.cjs47.js +1 -1
  66. package/dist/index.cjs47.js.map +1 -1
  67. package/dist/index.cjs48.js +1 -6
  68. package/dist/index.cjs48.js.map +1 -1
  69. package/dist/index.cjs49.js +1 -6
  70. package/dist/index.cjs49.js.map +1 -1
  71. package/dist/index.cjs5.js +1 -1
  72. package/dist/index.cjs50.js +1 -6
  73. package/dist/index.cjs50.js.map +1 -1
  74. package/dist/index.cjs51.js +1 -1
  75. package/dist/index.cjs51.js.map +1 -1
  76. package/dist/index.cjs52.js.map +1 -1
  77. package/dist/index.cjs55.js.map +1 -1
  78. package/dist/index.cjs56.js.map +1 -1
  79. package/dist/index.cjs57.js.map +1 -1
  80. package/dist/index.cjs58.js.map +1 -1
  81. package/dist/index.cjs6.js +1 -1
  82. package/dist/index.cjs61.js +1 -1
  83. package/dist/index.cjs61.js.map +1 -1
  84. package/dist/index.cjs62.js +1 -1
  85. package/dist/index.cjs62.js.map +1 -1
  86. package/dist/index.cjs63.js +1 -1
  87. package/dist/index.cjs63.js.map +1 -1
  88. package/dist/index.cjs65.js +1 -1
  89. package/dist/index.cjs65.js.map +1 -1
  90. package/dist/index.cjs66.js +1 -1
  91. package/dist/index.cjs66.js.map +1 -1
  92. package/dist/index.cjs67.js +1 -1
  93. package/dist/index.cjs67.js.map +1 -1
  94. package/dist/index.cjs68.js +1 -1
  95. package/dist/index.cjs68.js.map +1 -1
  96. package/dist/index.cjs69.js +1 -1
  97. package/dist/index.cjs69.js.map +1 -1
  98. package/dist/index.cjs7.js +1 -1
  99. package/dist/index.cjs70.js +1 -1
  100. package/dist/index.cjs70.js.map +1 -1
  101. package/dist/index.cjs71.js +1 -1
  102. package/dist/index.cjs71.js.map +1 -1
  103. package/dist/index.cjs72.js +1 -1
  104. package/dist/index.cjs72.js.map +1 -1
  105. package/dist/index.cjs73.js +1 -1
  106. package/dist/index.cjs73.js.map +1 -1
  107. package/dist/index.cjs74.js +1 -1
  108. package/dist/index.cjs74.js.map +1 -1
  109. package/dist/index.cjs75.js +1 -1
  110. package/dist/index.cjs75.js.map +1 -1
  111. package/dist/index.cjs76.js +1 -1
  112. package/dist/index.cjs76.js.map +1 -1
  113. package/dist/index.cjs77.js +1 -1
  114. package/dist/index.cjs77.js.map +1 -1
  115. package/dist/index.cjs78.js +1 -1
  116. package/dist/index.cjs78.js.map +1 -1
  117. package/dist/index.cjs79.js +1 -1
  118. package/dist/index.cjs79.js.map +1 -1
  119. package/dist/index.cjs8.js +1 -1
  120. package/dist/index.cjs80.js +1 -1
  121. package/dist/index.cjs80.js.map +1 -1
  122. package/dist/index.cjs81.js +1 -1
  123. package/dist/index.cjs81.js.map +1 -1
  124. package/dist/index.cjs82.js +1 -1
  125. package/dist/index.cjs82.js.map +1 -1
  126. package/dist/index.cjs83.js +1 -1
  127. package/dist/index.cjs83.js.map +1 -1
  128. package/dist/index.cjs84.js +1 -1
  129. package/dist/index.cjs84.js.map +1 -1
  130. package/dist/index.cjs85.js +1 -1
  131. package/dist/index.cjs85.js.map +1 -1
  132. package/dist/index.cjs86.js.map +1 -1
  133. package/dist/index.cjs87.js +1 -1
  134. package/dist/index.cjs87.js.map +1 -1
  135. package/dist/index.cjs90.js.map +1 -1
  136. package/dist/index.cjs91.js.map +1 -1
  137. package/dist/index.cjs92.js.map +1 -1
  138. package/dist/index.cjs93.js.map +1 -1
  139. package/dist/index.cjs94.js.map +1 -1
  140. package/dist/index.cjs95.js.map +1 -1
  141. package/dist/index.cjs96.js.map +1 -1
  142. package/dist/index.es100.js.map +1 -1
  143. package/dist/index.es101.js.map +1 -1
  144. package/dist/index.es102.js.map +1 -1
  145. package/dist/index.es103.js.map +1 -1
  146. package/dist/index.es104.js.map +1 -1
  147. package/dist/index.es105.js.map +1 -1
  148. package/dist/index.es106.js.map +1 -1
  149. package/dist/index.es107.js.map +1 -1
  150. package/dist/index.es108.js.map +1 -1
  151. package/dist/index.es109.js.map +1 -1
  152. package/dist/index.es11.js +1 -1
  153. package/dist/index.es12.js +2 -2
  154. package/dist/index.es13.js +1 -1
  155. package/dist/index.es14.js +5 -5
  156. package/dist/index.es15.js +1 -1
  157. package/dist/index.es16.js +5 -5
  158. package/dist/index.es17.js +1 -1
  159. package/dist/index.es18.js +1 -1
  160. package/dist/index.es20.js +1 -1
  161. package/dist/index.es21.js +7 -7
  162. package/dist/index.es22.js +6 -13
  163. package/dist/index.es22.js.map +1 -1
  164. package/dist/index.es23.js +6 -9
  165. package/dist/index.es23.js.map +1 -1
  166. package/dist/index.es24.js +9 -6
  167. package/dist/index.es24.js.map +1 -1
  168. package/dist/index.es25.js +6 -12
  169. package/dist/index.es25.js.map +1 -1
  170. package/dist/index.es26.js +13 -4
  171. package/dist/index.es26.js.map +1 -1
  172. package/dist/index.es27.js +10 -19
  173. package/dist/index.es27.js.map +1 -1
  174. package/dist/index.es28.js +17 -21
  175. package/dist/index.es28.js.map +1 -1
  176. package/dist/index.es29.js +22 -5
  177. package/dist/index.es29.js.map +1 -1
  178. package/dist/index.es3.js +212 -185
  179. package/dist/index.es3.js.map +1 -1
  180. package/dist/index.es30.js.map +1 -1
  181. package/dist/index.es31.js +3 -3
  182. package/dist/index.es31.js.map +1 -1
  183. package/dist/index.es33.js +17 -24
  184. package/dist/index.es33.js.map +1 -1
  185. package/dist/index.es34.js +527 -331
  186. package/dist/index.es34.js.map +1 -1
  187. package/dist/index.es35.js +1 -1
  188. package/dist/index.es35.js.map +1 -1
  189. package/dist/index.es38.js +1 -1
  190. package/dist/index.es38.js.map +1 -1
  191. package/dist/index.es40.js +6 -6
  192. package/dist/index.es40.js.map +1 -1
  193. package/dist/index.es41.js +815 -97
  194. package/dist/index.es41.js.map +1 -1
  195. package/dist/index.es42.js +10 -56
  196. package/dist/index.es42.js.map +1 -1
  197. package/dist/index.es43.js +10 -24
  198. package/dist/index.es43.js.map +1 -1
  199. package/dist/index.es44.js +10 -45
  200. package/dist/index.es44.js.map +1 -1
  201. package/dist/index.es45.js +97 -69
  202. package/dist/index.es45.js.map +1 -1
  203. package/dist/index.es46.js +52 -56
  204. package/dist/index.es46.js.map +1 -1
  205. package/dist/index.es47.js +19 -827
  206. package/dist/index.es47.js.map +1 -1
  207. package/dist/index.es48.js +45 -10
  208. package/dist/index.es48.js.map +1 -1
  209. package/dist/index.es49.js +86 -10
  210. package/dist/index.es49.js.map +1 -1
  211. package/dist/index.es5.js +3 -3
  212. package/dist/index.es50.js +60 -10
  213. package/dist/index.es50.js.map +1 -1
  214. package/dist/index.es51.js +2 -2
  215. package/dist/index.es51.js.map +1 -1
  216. package/dist/index.es52.js.map +1 -1
  217. package/dist/index.es55.js.map +1 -1
  218. package/dist/index.es56.js.map +1 -1
  219. package/dist/index.es57.js.map +1 -1
  220. package/dist/index.es58.js.map +1 -1
  221. package/dist/index.es6.js +3 -3
  222. package/dist/index.es61.js +11 -11
  223. package/dist/index.es61.js.map +1 -1
  224. package/dist/index.es62.js +1 -1
  225. package/dist/index.es62.js.map +1 -1
  226. package/dist/index.es63.js +26 -3
  227. package/dist/index.es63.js.map +1 -1
  228. package/dist/index.es65.js +62 -42
  229. package/dist/index.es65.js.map +1 -1
  230. package/dist/index.es66.js +28 -25
  231. package/dist/index.es66.js.map +1 -1
  232. package/dist/index.es67.js +4 -64
  233. package/dist/index.es67.js.map +1 -1
  234. package/dist/index.es68.js +24 -7
  235. package/dist/index.es68.js.map +1 -1
  236. package/dist/index.es69.js +31 -123
  237. package/dist/index.es69.js.map +1 -1
  238. package/dist/index.es7.js +3 -3
  239. package/dist/index.es70.js +3 -14
  240. package/dist/index.es70.js.map +1 -1
  241. package/dist/index.es71.js +41 -129
  242. package/dist/index.es71.js.map +1 -1
  243. package/dist/index.es72.js +7 -10
  244. package/dist/index.es72.js.map +1 -1
  245. package/dist/index.es73.js +112 -203
  246. package/dist/index.es73.js.map +1 -1
  247. package/dist/index.es74.js +15 -13
  248. package/dist/index.es74.js.map +1 -1
  249. package/dist/index.es75.js +132 -31
  250. package/dist/index.es75.js.map +1 -1
  251. package/dist/index.es76.js +10 -7
  252. package/dist/index.es76.js.map +1 -1
  253. package/dist/index.es77.js +212 -26
  254. package/dist/index.es77.js.map +1 -1
  255. package/dist/index.es78.js +13 -4
  256. package/dist/index.es78.js.map +1 -1
  257. package/dist/index.es79.js +7 -5
  258. package/dist/index.es79.js.map +1 -1
  259. package/dist/index.es8.js +3 -3
  260. package/dist/index.es80.js +3 -27
  261. package/dist/index.es80.js.map +1 -1
  262. package/dist/index.es81.js +28 -50
  263. package/dist/index.es81.js.map +1 -1
  264. package/dist/index.es82.js +50 -9
  265. package/dist/index.es82.js.map +1 -1
  266. package/dist/index.es83.js +9 -25
  267. package/dist/index.es83.js.map +1 -1
  268. package/dist/index.es84.js +2 -2
  269. package/dist/index.es84.js.map +1 -1
  270. package/dist/index.es85.js +1 -1
  271. package/dist/index.es85.js.map +1 -1
  272. package/dist/index.es86.js.map +1 -1
  273. package/dist/index.es87.js +1 -1
  274. package/dist/index.es87.js.map +1 -1
  275. package/dist/index.es90.js.map +1 -1
  276. package/dist/index.es91.js.map +1 -1
  277. package/dist/index.es92.js.map +1 -1
  278. package/dist/index.es93.js.map +1 -1
  279. package/dist/index.es94.js.map +1 -1
  280. package/dist/index.es95.js.map +1 -1
  281. package/dist/index.es96.js.map +1 -1
  282. package/dist/packages/builder/schema-builder.d.ts +20 -1
  283. package/dist/packages/builder/schema-builder.d.ts.map +1 -1
  284. package/dist/style.css +0 -3
  285. package/package.json +5 -3
@@ -1,7 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./index.cjs55.js");/**
2
- * @license lucide-react v0.477.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const e=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],o=t.default("Plus",e);exports.__iconNode=e;exports.default=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index.cjs36.js"),t=require("./index.cjs37.js");function n(...e){return t.twMerge(r.clsx(e))}exports.cn=n;
7
2
  //# sourceMappingURL=index.cjs22.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs22.js","sources":["../../../node_modules/.pnpm/lucide-react@0.477.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/plus.js"],"sourcesContent":["/**\n * @license lucide-react v0.477.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }],\n [\"path\", { d: \"M12 5v14\", key: \"s699le\" }]\n];\nconst Plus = createLucideIcon(\"Plus\", __iconNode);\n\nexport { __iconNode, Plus as default };\n//# sourceMappingURL=plus.js.map\n"],"names":["__iconNode","Plus","createLucideIcon"],"mappings":"gJAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CACjB,CAAC,OAAQ,CAAE,EAAG,WAAY,IAAK,QAAQ,CAAE,EACzC,CAAC,OAAQ,CAAE,EAAG,WAAY,IAAK,QAAU,CAAA,CAC3C,EACMC,EAAOC,EAAAA,QAAiB,OAAQF,CAAU","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs22.js","sources":["../src/lib/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"names":["cn","inputs","twMerge","clsx"],"mappings":"kJAGO,SAASA,KAAMC,EAAsB,CACnC,OAAAC,EAAA,QAAQC,OAAKF,CAAM,CAAC,CAC7B"}
@@ -3,5 +3,5 @@
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const e=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],c=t.default("Trash2",e);exports.__iconNode=e;exports.default=c;
6
+ */const e=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],o=t.default("Plus",e);exports.__iconNode=e;exports.default=o;
7
7
  //# sourceMappingURL=index.cjs23.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs23.js","sources":["../../../node_modules/.pnpm/lucide-react@0.477.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/trash-2.js"],"sourcesContent":["/**\n * @license lucide-react v0.477.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M3 6h18\", key: \"d0wm0j\" }],\n [\"path\", { d: \"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6\", key: \"4alrt4\" }],\n [\"path\", { d: \"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2\", key: \"v07s0e\" }],\n [\"line\", { x1: \"10\", x2: \"10\", y1: \"11\", y2: \"17\", key: \"1uufr5\" }],\n [\"line\", { x1: \"14\", x2: \"14\", y1: \"11\", y2: \"17\", key: \"xtxkd\" }]\n];\nconst Trash2 = createLucideIcon(\"Trash2\", __iconNode);\n\nexport { __iconNode, Trash2 as default };\n//# sourceMappingURL=trash-2.js.map\n"],"names":["__iconNode","Trash2","createLucideIcon"],"mappings":"gJAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CACjB,CAAC,OAAQ,CAAE,EAAG,UAAW,IAAK,QAAQ,CAAE,EACxC,CAAC,OAAQ,CAAE,EAAG,wCAAyC,IAAK,QAAQ,CAAE,EACtE,CAAC,OAAQ,CAAE,EAAG,qCAAsC,IAAK,QAAQ,CAAE,EACnE,CAAC,OAAQ,CAAE,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,IAAK,QAAQ,CAAE,EAClE,CAAC,OAAQ,CAAE,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,IAAK,OAAS,CAAA,CACnE,EACMC,EAASC,EAAAA,QAAiB,SAAUF,CAAU","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs23.js","sources":["../../../node_modules/.pnpm/lucide-react@0.477.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/plus.js"],"sourcesContent":["/**\n * @license lucide-react v0.477.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M5 12h14\", key: \"1ays0h\" }],\n [\"path\", { d: \"M12 5v14\", key: \"s699le\" }]\n];\nconst Plus = createLucideIcon(\"Plus\", __iconNode);\n\nexport { __iconNode, Plus as default };\n//# sourceMappingURL=plus.js.map\n"],"names":["__iconNode","Plus","createLucideIcon"],"mappings":"gJAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CACjB,CAAC,OAAQ,CAAE,EAAG,WAAY,IAAK,QAAQ,CAAE,EACzC,CAAC,OAAQ,CAAE,EAAG,WAAY,IAAK,QAAU,CAAA,CAC3C,EACMC,EAAOC,EAAAA,QAAiB,OAAQF,CAAU","x_google_ignoreList":[0]}
@@ -3,5 +3,5 @@
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const e=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],o=t.default("Copy",e);exports.__iconNode=e;exports.default=o;
6
+ */const e=[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]],c=t.default("Trash2",e);exports.__iconNode=e;exports.default=c;
7
7
  //# sourceMappingURL=index.cjs24.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs24.js","sources":["../../../node_modules/.pnpm/lucide-react@0.477.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/copy.js"],"sourcesContent":["/**\n * @license lucide-react v0.477.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"rect\", { width: \"14\", height: \"14\", x: \"8\", y: \"8\", rx: \"2\", ry: \"2\", key: \"17jyea\" }],\n [\"path\", { d: \"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\", key: \"zix9uf\" }]\n];\nconst Copy = createLucideIcon(\"Copy\", __iconNode);\n\nexport { __iconNode, Copy as default };\n//# sourceMappingURL=copy.js.map\n"],"names":["__iconNode","Copy","createLucideIcon"],"mappings":"gJAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CACjB,CAAC,OAAQ,CAAE,MAAO,KAAM,OAAQ,KAAM,EAAG,IAAK,EAAG,IAAK,GAAI,IAAK,GAAI,IAAK,IAAK,SAAU,EACvF,CAAC,OAAQ,CAAE,EAAG,0DAA2D,IAAK,QAAU,CAAA,CAC1F,EACMC,EAAOC,EAAAA,QAAiB,OAAQF,CAAU","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs24.js","sources":["../../../node_modules/.pnpm/lucide-react@0.477.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/trash-2.js"],"sourcesContent":["/**\n * @license lucide-react v0.477.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M3 6h18\", key: \"d0wm0j\" }],\n [\"path\", { d: \"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6\", key: \"4alrt4\" }],\n [\"path\", { d: \"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2\", key: \"v07s0e\" }],\n [\"line\", { x1: \"10\", x2: \"10\", y1: \"11\", y2: \"17\", key: \"1uufr5\" }],\n [\"line\", { x1: \"14\", x2: \"14\", y1: \"11\", y2: \"17\", key: \"xtxkd\" }]\n];\nconst Trash2 = createLucideIcon(\"Trash2\", __iconNode);\n\nexport { __iconNode, Trash2 as default };\n//# sourceMappingURL=trash-2.js.map\n"],"names":["__iconNode","Trash2","createLucideIcon"],"mappings":"gJAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CACjB,CAAC,OAAQ,CAAE,EAAG,UAAW,IAAK,QAAQ,CAAE,EACxC,CAAC,OAAQ,CAAE,EAAG,wCAAyC,IAAK,QAAQ,CAAE,EACtE,CAAC,OAAQ,CAAE,EAAG,qCAAsC,IAAK,QAAQ,CAAE,EACnE,CAAC,OAAQ,CAAE,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,IAAK,QAAQ,CAAE,EAClE,CAAC,OAAQ,CAAE,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,GAAI,KAAM,IAAK,OAAS,CAAA,CACnE,EACMC,EAASC,EAAAA,QAAiB,SAAUF,CAAU","x_google_ignoreList":[0]}
@@ -3,5 +3,5 @@
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const e=[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]],o=t.default("Bolt",e);exports.__iconNode=e;exports.default=o;
6
+ */const e=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],o=t.default("Copy",e);exports.__iconNode=e;exports.default=o;
7
7
  //# sourceMappingURL=index.cjs25.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs25.js","sources":["../../../node_modules/.pnpm/lucide-react@0.477.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/bolt.js"],"sourcesContent":["/**\n * @license lucide-react v0.477.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z\",\n key: \"yt0hxn\"\n }\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"4\", key: \"4exip2\" }]\n];\nconst Bolt = createLucideIcon(\"Bolt\", __iconNode);\n\nexport { __iconNode, Bolt as default };\n//# sourceMappingURL=bolt.js.map\n"],"names":["__iconNode","Bolt","createLucideIcon"],"mappings":"gJAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CACjB,CACE,OACA,CACE,EAAG,4HACH,IAAK,QACX,CACG,EACD,CAAC,SAAU,CAAE,GAAI,KAAM,GAAI,KAAM,EAAG,IAAK,IAAK,QAAU,CAAA,CAC1D,EACMC,EAAOC,EAAAA,QAAiB,OAAQF,CAAU","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs25.js","sources":["../../../node_modules/.pnpm/lucide-react@0.477.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/copy.js"],"sourcesContent":["/**\n * @license lucide-react v0.477.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"rect\", { width: \"14\", height: \"14\", x: \"8\", y: \"8\", rx: \"2\", ry: \"2\", key: \"17jyea\" }],\n [\"path\", { d: \"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\", key: \"zix9uf\" }]\n];\nconst Copy = createLucideIcon(\"Copy\", __iconNode);\n\nexport { __iconNode, Copy as default };\n//# sourceMappingURL=copy.js.map\n"],"names":["__iconNode","Copy","createLucideIcon"],"mappings":"gJAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CACjB,CAAC,OAAQ,CAAE,MAAO,KAAM,OAAQ,KAAM,EAAG,IAAK,EAAG,IAAK,GAAI,IAAK,GAAI,IAAK,IAAK,SAAU,EACvF,CAAC,OAAQ,CAAE,EAAG,0DAA2D,IAAK,QAAU,CAAA,CAC1F,EACMC,EAAOC,EAAAA,QAAiB,OAAQF,CAAU","x_google_ignoreList":[0]}
@@ -3,5 +3,5 @@
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const e=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],o=t.default("ChevronRight",e);exports.__iconNode=e;exports.default=o;
6
+ */const e=[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}],["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}]],o=t.default("Bolt",e);exports.__iconNode=e;exports.default=o;
7
7
  //# sourceMappingURL=index.cjs26.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs26.js","sources":["../../../node_modules/.pnpm/lucide-react@0.477.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/chevron-right.js"],"sourcesContent":["/**\n * @license lucide-react v0.477.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"m9 18 6-6-6-6\", key: \"mthhwq\" }]];\nconst ChevronRight = createLucideIcon(\"ChevronRight\", __iconNode);\n\nexport { __iconNode, ChevronRight as default };\n//# sourceMappingURL=chevron-right.js.map\n"],"names":["__iconNode","ChevronRight","createLucideIcon"],"mappings":"gJAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CAAC,CAAC,OAAQ,CAAE,EAAG,gBAAiB,IAAK,SAAU,CAAC,EAC7DC,EAAeC,EAAAA,QAAiB,eAAgBF,CAAU","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs26.js","sources":["../../../node_modules/.pnpm/lucide-react@0.477.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/bolt.js"],"sourcesContent":["/**\n * @license lucide-react v0.477.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\n \"path\",\n {\n d: \"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z\",\n key: \"yt0hxn\"\n }\n ],\n [\"circle\", { cx: \"12\", cy: \"12\", r: \"4\", key: \"4exip2\" }]\n];\nconst Bolt = createLucideIcon(\"Bolt\", __iconNode);\n\nexport { __iconNode, Bolt as default };\n//# sourceMappingURL=bolt.js.map\n"],"names":["__iconNode","Bolt","createLucideIcon"],"mappings":"gJAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CACjB,CACE,OACA,CACE,EAAG,4HACH,IAAK,QACX,CACG,EACD,CAAC,SAAU,CAAE,GAAI,KAAM,GAAI,KAAM,EAAG,IAAK,IAAK,QAAU,CAAA,CAC1D,EACMC,EAAOC,EAAAA,QAAiB,OAAQF,CAAU","x_google_ignoreList":[0]}
@@ -1,2 +1,7 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index.cjs9.js"),n=require("./index.cjs29.js");function o({className:e,type:i,...r}){return t.jsxRuntimeExports.jsx("input",{type:i,"data-slot":"input",className:n.cn("border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}exports.Input=o;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("./index.cjs55.js");/**
2
+ * @license lucide-react v0.477.0 - ISC
3
+ *
4
+ * This source code is licensed under the ISC license.
5
+ * See the LICENSE file in the root directory of this source tree.
6
+ */const e=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],o=t.default("ChevronRight",e);exports.__iconNode=e;exports.default=o;
2
7
  //# sourceMappingURL=index.cjs27.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs27.js","sources":["../src/components/ui/input.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n \"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"names":["Input","className","type","props","jsx","cn"],"mappings":"iJAIA,SAASA,EAAM,CAAE,UAAAC,EAAW,KAAAC,EAAM,GAAGC,GAAwC,CAEzE,OAAAC,EAAA,kBAAA,IAAC,QAAA,CACC,KAAAF,EACA,YAAU,QACV,UAAWG,EAAA,GACT,ibACA,gFACA,yGACAJ,CACF,EACC,GAAGE,CAAA,CACN,CAEJ"}
1
+ {"version":3,"file":"index.cjs27.js","sources":["../../../node_modules/.pnpm/lucide-react@0.477.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/chevron-right.js"],"sourcesContent":["/**\n * @license lucide-react v0.477.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [[\"path\", { d: \"m9 18 6-6-6-6\", key: \"mthhwq\" }]];\nconst ChevronRight = createLucideIcon(\"ChevronRight\", __iconNode);\n\nexport { __iconNode, ChevronRight as default };\n//# sourceMappingURL=chevron-right.js.map\n"],"names":["__iconNode","ChevronRight","createLucideIcon"],"mappings":"gJAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CAAC,CAAC,OAAQ,CAAE,EAAG,gBAAiB,IAAK,SAAU,CAAC,EAC7DC,EAAeC,EAAAA,QAAiB,eAAgBF,CAAU","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs9.js"),u=require("./index.cjs29.js");function a({children:r,errorCode:t,errorDescription:s,showError:i=!1,className:n}){return e.jsxRuntimeExports.jsxs("div",{className:u.cn("space-y-2",n),children:[i&&t&&e.jsxRuntimeExports.jsx("div",{className:"text-sm font-medium text-destructive","aria-live":"polite",children:t}),r,i&&s&&e.jsxRuntimeExports.jsx("div",{className:"text-sm text-destructive","aria-live":"polite",children:s})]})}exports.InputErrorWrapper=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index.cjs9.js"),n=require("./index.cjs22.js");function o({className:e,type:i,...r}){return t.jsxRuntimeExports.jsx("input",{type:i,"data-slot":"input",className:n.cn("border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm","focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]","aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",e),...r})}exports.Input=o;
2
2
  //# sourceMappingURL=index.cjs28.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs28.js","sources":["../src/components/input-error.tsx"],"sourcesContent":["import type React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\ninterface InputErrorWrapperProps {\n children: React.ReactNode;\n errorCode?: string;\n errorDescription?: string;\n showError?: boolean;\n className?: string;\n}\n\nexport function InputErrorWrapper({\n children,\n errorCode,\n errorDescription,\n showError = false,\n className,\n}: InputErrorWrapperProps) {\n return (\n <div className={cn(\"space-y-2\", className)}>\n {showError && errorCode && (\n <div\n className=\"text-sm font-medium text-destructive\"\n aria-live=\"polite\"\n >\n {errorCode}\n </div>\n )}\n\n {children}\n\n {showError && errorDescription && (\n <div className=\"text-sm text-destructive\" aria-live=\"polite\">\n {errorDescription}\n </div>\n )}\n </div>\n );\n}\n"],"names":["InputErrorWrapper","children","errorCode","errorDescription","showError","className","cn","jsx"],"mappings":"iJAWO,SAASA,EAAkB,CAChC,SAAAC,EACA,UAAAC,EACA,iBAAAC,EACA,UAAAC,EAAY,GACZ,UAAAC,CACF,EAA2B,CACzB,gCACG,MAAI,CAAA,UAAWC,EAAG,GAAA,YAAaD,CAAS,EACtC,SAAA,CAAAD,GAAaF,GACZK,EAAA,kBAAA,IAAC,MAAA,CACC,UAAU,uCACV,YAAU,SAET,SAAAL,CAAA,CACH,EAGDD,EAEAG,GAAaD,GACXI,wBAAA,MAAA,CAAI,UAAU,2BAA2B,YAAU,SACjD,SACHJ,CAAA,CAAA,CAAA,EAEJ,CAEJ"}
1
+ {"version":3,"file":"index.cjs28.js","sources":["../src/components/ui/input.tsx"],"sourcesContent":["import * as React from \"react\"\n\nimport { cn } from \"@/lib/utils\"\n\nfunction Input({ className, type, ...props }: React.ComponentProps<\"input\">) {\n return (\n <input\n type={type}\n data-slot=\"input\"\n className={cn(\n \"border-input file:text-foreground placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground flex h-9 w-full min-w-0 rounded-md border bg-transparent px-3 py-1 text-base shadow-xs transition-[color,box-shadow] outline-none file:inline-flex file:h-7 file:border-0 file:bg-transparent file:text-sm file:font-medium disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm\",\n \"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]\",\n \"aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Input }\n"],"names":["Input","className","type","props","jsx","cn"],"mappings":"iJAIA,SAASA,EAAM,CAAE,UAAAC,EAAW,KAAAC,EAAM,GAAGC,GAAwC,CAEzE,OAAAC,EAAA,kBAAA,IAAC,QAAA,CACC,KAAAF,EACA,YAAU,QACV,UAAWG,EAAA,GACT,ibACA,gFACA,yGACAJ,CACF,EACC,GAAGE,CAAA,CACN,CAEJ"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./index.cjs36.js"),t=require("./index.cjs37.js");function n(...e){return t.twMerge(r.clsx(e))}exports.cn=n;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs9.js"),u=require("./index.cjs22.js");function a({children:r,errorCode:t,errorDescription:s,showError:i=!1,className:n}){return e.jsxRuntimeExports.jsxs("div",{className:u.cn("space-y-2",n),children:[i&&t&&e.jsxRuntimeExports.jsx("div",{className:"text-sm font-medium text-destructive","aria-live":"polite",children:t}),r,i&&s&&e.jsxRuntimeExports.jsx("div",{className:"text-sm text-destructive","aria-live":"polite",children:s})]})}exports.InputErrorWrapper=a;
2
2
  //# sourceMappingURL=index.cjs29.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs29.js","sources":["../src/lib/utils.ts"],"sourcesContent":["import { clsx, type ClassValue } from \"clsx\"\nimport { twMerge } from \"tailwind-merge\"\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n"],"names":["cn","inputs","twMerge","clsx"],"mappings":"kJAGO,SAASA,KAAMC,EAAsB,CACnC,OAAAC,EAAA,QAAQC,OAAKF,CAAM,CAAC,CAC7B"}
1
+ {"version":3,"file":"index.cjs29.js","sources":["../src/components/input-error.tsx"],"sourcesContent":["import type React from \"react\";\nimport { cn } from \"@/lib/utils\";\n\ninterface InputErrorWrapperProps {\n children: React.ReactNode;\n errorCode?: string;\n errorDescription?: string;\n showError?: boolean;\n className?: string;\n}\n\nexport function InputErrorWrapper({\n children,\n errorCode,\n errorDescription,\n showError = false,\n className,\n}: InputErrorWrapperProps) {\n return (\n <div className={cn(\"space-y-2\", className)}>\n {showError && errorCode && (\n <div\n className=\"text-sm font-medium text-destructive\"\n aria-live=\"polite\"\n >\n {errorCode}\n </div>\n )}\n\n {children}\n\n {showError && errorDescription && (\n <div className=\"text-sm text-destructive\" aria-live=\"polite\">\n {errorDescription}\n </div>\n )}\n </div>\n );\n}\n"],"names":["InputErrorWrapper","children","errorCode","errorDescription","showError","className","cn","jsx"],"mappings":"iJAWO,SAASA,EAAkB,CAChC,SAAAC,EACA,UAAAC,EACA,iBAAAC,EACA,UAAAC,EAAY,GACZ,UAAAC,CACF,EAA2B,CACzB,gCACG,MAAI,CAAA,UAAWC,EAAG,GAAA,YAAaD,CAAS,EACtC,SAAA,CAAAD,GAAaF,GACZK,EAAA,kBAAA,IAAC,MAAA,CACC,UAAU,uCACV,YAAU,SAET,SAAAL,CAAA,CACH,EAGDD,EAEAG,GAAaD,GACXI,wBAAA,MAAA,CAAI,UAAU,2BAA2B,YAAU,SACjD,SACHJ,CAAA,CAAA,CAAA,EAEJ,CAEJ"}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs9.js"),o=require("react"),re=require("./index.cjs2.js"),x=require("./index.cjs11.js"),u=require("./index.cjs12.js"),ne=require("./index.cjs13.js"),r=require("./index.cjs14.js"),O=require("./index.cjs15.js"),L=require("./index.cjs10.js"),F=require("./index.cjs4.js"),ie=require("./index.cjs16.js"),l=require("./index.cjs17.js"),S=require("./index.cjs18.js"),oe=require("./index.cjs19.js"),le=require("ajv"),D=require("./index.cjs20.js"),ae=require("./index.cjs21.js"),ce=require("./index.cjs22.js"),ue=require("./index.cjs23.js"),xe=require("./index.cjs24.js"),me=require("./index.cjs25.js"),de=require("./index.cjs26.js"),je=i=>{const[Q,b]=o.useState(!1),[U,f]=o.useState(!1),[_,j]=o.useState(!1),[h,v]=o.useState(),[C,A]=o.useState(),[P,q]=o.useState(),[p,E]=o.useState(null);F.usePluginSystem(i.plugins??[]);const{getCurrentSchema:I,setPath:R,path:m,schema:N,handleAddProperty:B,handlePropertyChange:a,handleKeyChange:w,handleDeleteProperty:H,setSchema:M,isPropertyRequired:y}=re.useSchema(),{getConstraintDefinitionsForType:G}=F.useConstraints();o.useEffect(()=>{if(i.schema)try{oe.validateSchema(i.schema),M(L.a(i.schema)),E(null)}catch(t){t instanceof Error?E(t.message):t instanceof le.ValidationError?E(`Schema validation error: ${t.message}`):E("Unknown schema validation error")}},[i.schema]),o.useEffect(()=>{!p&&i.onSchemaChange&&i.onSchemaChange(N)},[N,p,i.onSchemaChange]);const J=I(),T=t=>{R([...m,t])},W=()=>{R(m.slice(0,-1))},X=(t,s)=>{A(t),q(s),f(!0)},z=t=>{v(t),j(!0)},Y=()=>{h&&(H(h),v(void 0)),j(!1)},Z=()=>{v(void 0),j(!1)},K=t=>{const s=I().properties;if(!s||typeof s[t]=="boolean")return;const n=s[t],d=`${t}_copy`,g=L.a(n),c=B(d,g,y(t));c.status==="error"?i.onPropertyAddError?.(c):i.onPropertyAddSuccess?.(c)},k=(...t)=>{const s=B(...t);s.status==="error"?i.onPropertyAddError?.(s):s.status==="success"&&i.onPropertyAddSuccess?.(s),b(!1)},V=i.propertyComponent,ee=(t,s)=>V?e.jsxRuntimeExports.jsx(V,{property:{key:t,schema:s,isRequired:y(t)},onPropertyChange:a,onKeyChange:w,onDelete:z,onDuplicate:K,onNavigate:s.type==="object"||s.type==="array"&&typeof s.items=="object"&&s.items.type==="object"?T:void 0},t):e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col md:grid grid-cols-(--my-autofit-grid) gap-4 md:items-center border p-2 rounded-md mb-2",children:[e.jsxRuntimeExports.jsx("div",{className:"",children:e.jsxRuntimeExports.jsx(D.DebouncedInput,{value:t,onDebounce:n=>w(t,n),placeholder:"Property Key","aria-label":`Property key for ${t}`,delay:500})}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxRuntimeExports.jsx(ne.Switch,{checked:y(t),onCheckedChange:n=>a(t,{isRequired:n}),"aria-label":"Required"}),e.jsxRuntimeExports.jsx(O.Label,{htmlFor:`required-${t}`,children:"Required"})]}),e.jsxRuntimeExports.jsx("div",{className:"",children:e.jsxRuntimeExports.jsxs(r.Select,{value:typeof s=="object"&&!Array.isArray(s.type)?s.type:void 0,onValueChange:n=>a(t,{type:n}),"aria-label":"Type",children:[e.jsxRuntimeExports.jsx(r.SelectTrigger,{className:"w-full","aria-label":"Select type",children:e.jsxRuntimeExports.jsx(r.SelectValue,{})}),e.jsxRuntimeExports.jsxs(r.SelectContent,{children:[e.jsxRuntimeExports.jsx(r.SelectItem,{value:"string",children:"string"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"number",children:"number"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"integer",children:"integer"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"boolean",children:"boolean"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"object",children:"object"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"array",children:"array"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"null",children:"null"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"enum",children:"enum"})]})]})}),e.jsxRuntimeExports.jsx("div",{className:"",children:e.jsxRuntimeExports.jsx(D.DebouncedInput,{value:typeof s=="object"?s.title:void 0,onDebounce:n=>a(t,{title:n}),placeholder:"Title"})}),e.jsxRuntimeExports.jsx("div",{className:"",children:e.jsxRuntimeExports.jsx(D.DebouncedInput,{value:typeof s=="object"?s.description:void 0,onDebounce:n=>a(t,{description:n}),placeholder:"Description"})}),e.jsxRuntimeExports.jsxs("div",{className:"order-last md:order-none flex gap-2",children:[e.jsxRuntimeExports.jsx(x.Button,{variant:"outline",size:"sm",onClick:()=>z(t),"aria-label":"Delete",className:"block!",children:e.jsxRuntimeExports.jsx(ue.default,{size:16,className:"text-destructive"})}),e.jsxRuntimeExports.jsx(x.Button,{variant:"outline",size:"sm",onClick:()=>K(t),"aria-label":"Duplicate",className:"block!",children:e.jsxRuntimeExports.jsx(xe.default,{size:16})}),se(t,s),$(t,s)]}),te(t,s)]},t),te=(t,s)=>{if(typeof s!="object"||s.type!=="array")return null;const n=s.items,d=!Array.isArray(n)&&typeof n=="object"&&typeof n.type=="string"?n?.type:"string";return e.jsxRuntimeExports.jsxs("div",{className:"col-span-full flex items-center gap-4 pl-8 mt-2 bg-gray-50 p-2 rounded-md",children:[e.jsxRuntimeExports.jsx(O.Label,{children:"Items of type:"}),e.jsxRuntimeExports.jsxs(r.Select,{value:d,onValueChange:g=>{const c={...typeof n=="object"?n:{},type:g};g==="object"&&(c.properties=c.properties??{}),a(t,{items:c})},children:[e.jsxRuntimeExports.jsx(r.SelectTrigger,{className:"w-[200px]","aria-label":"Select items of type",children:e.jsxRuntimeExports.jsx(r.SelectValue,{})}),e.jsxRuntimeExports.jsxs(r.SelectContent,{children:[e.jsxRuntimeExports.jsx(r.SelectItem,{value:"string",children:"string"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"number",children:"number"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"integer",children:"integer"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"boolean",children:"boolean"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"object",children:"object"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"array",children:"array"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"null",children:"null"})]})]}),$(t,n)]})},se=(t,s)=>{if(typeof s!="object")return null;const n=G(typeof s.type=="string"?s.type:""),d=Array.isArray(s?.enum);return n.length||d?e.jsxRuntimeExports.jsx(x.Button,{variant:"outline",size:"sm",onClick:()=>X(t,s),"aria-label":"Edit constraints",children:e.jsxRuntimeExports.jsx(me.default,{size:16})}):null},$=(t,s)=>!Array.isArray(s)&&typeof s=="object"&&s?.type==="object"?e.jsxRuntimeExports.jsxs(x.Button,{variant:"outline",size:"sm",onClick:()=>T(t),"aria-label":"Navigate",children:[e.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Navigate"}),e.jsxRuntimeExports.jsx(de.default,{size:16})]}):null;return e.jsxRuntimeExports.jsxs("div",{children:[p&&e.jsxRuntimeExports.jsxs(S.Alert,{variant:"destructive",children:[e.jsxRuntimeExports.jsx(S.AlertTitle,{children:"Schema Error"}),e.jsxRuntimeExports.jsx(S.AlertDescription,{children:p})]}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsxRuntimeExports.jsx(x.Button,{variant:"outline",size:"sm",onClick:W,disabled:m.length===0,children:"Back"}),e.jsxRuntimeExports.jsx(u.Breadcrumb,{children:e.jsxRuntimeExports.jsxs(u.BreadcrumbList,{children:[e.jsxRuntimeExports.jsx(u.BreadcrumbItem,{children:e.jsxRuntimeExports.jsx(u.BreadcrumbLink,{href:"#",onClick:()=>R([]),children:"Root"})}),m.map((t,s)=>e.jsxRuntimeExports.jsxs(o.Fragment,{children:[e.jsxRuntimeExports.jsx(u.BreadcrumbSeparator,{}),e.jsxRuntimeExports.jsx(u.BreadcrumbItem,{children:e.jsxRuntimeExports.jsx(u.BreadcrumbLink,{href:"#",onClick:()=>R(m.slice(0,s+1)),children:t})})]},`path-${s}`))]})})]}),e.jsxRuntimeExports.jsx("div",{className:"mt-6 overflow-x-hidden min-w-dvw",children:Object.entries(J.properties??{}).map(([t,s])=>typeof s=="boolean"?null:ee(t,s))}),e.jsxRuntimeExports.jsxs(x.Button,{className:"self-center",onClick:()=>{b(!0)},children:[e.jsxRuntimeExports.jsx(ce.default,{className:"h-4 w-4 mr-2"}),"Add Property"]}),e.jsxRuntimeExports.jsx(ae.AddPropertyDialog,{open:Q,onOpenChange:b,onSubmit:k}),C&&P&&e.jsxRuntimeExports.jsx(ie.EditPropertyDialog,{propertyKey:C,property:P,open:U,onOpenChange:f,onSubmit:t=>{a(...t),A(void 0),q(void 0),f(!1)}}),e.jsxRuntimeExports.jsx(l.AlertDialog,{open:_,onOpenChange:j,children:e.jsxRuntimeExports.jsxs(l.AlertDialogContent,{children:[e.jsxRuntimeExports.jsxs(l.AlertDialogHeader,{children:[e.jsxRuntimeExports.jsx(l.AlertDialogTitle,{children:"Are you sure?"}),e.jsxRuntimeExports.jsxs(l.AlertDialogDescription,{children:["This action cannot be undone. This will permanently delete the property",h?` "${h}"`:""," from the schema."]})]}),e.jsxRuntimeExports.jsxs(l.AlertDialogFooter,{children:[e.jsxRuntimeExports.jsx(l.AlertDialogCancel,{onClick:Z,children:"Cancel"}),e.jsxRuntimeExports.jsx(l.AlertDialogAction,{onClick:Y,children:"Delete"})]})]})})]})};exports.SchemaBuilder=je;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs9.js"),o=require("react"),oe=require("./index.cjs2.js"),m=require("./index.cjs11.js"),x=require("./index.cjs12.js"),le=require("./index.cjs13.js"),r=require("./index.cjs14.js"),F=require("./index.cjs15.js"),U=require("./index.cjs10.js"),Q=require("./index.cjs4.js"),ae=require("./index.cjs16.js"),l=require("./index.cjs17.js"),S=require("./index.cjs18.js"),ce=require("./index.cjs19.js"),ue=require("ajv"),C=require("./index.cjs20.js"),xe=require("./index.cjs21.js"),D=require("./index.cjs22.js"),me=require("./index.cjs23.js"),de=require("./index.cjs24.js"),je=require("./index.cjs25.js"),he=require("./index.cjs26.js"),pe=require("./index.cjs27.js"),Ee=i=>{const[_,h]=o.useState(!1),[k,f]=o.useState(!1),[H,p]=o.useState(!1),[E,v]=o.useState(),[P,A]=o.useState(),[N,q]=o.useState(),[R,g]=o.useState(null);Q.usePluginSystem(i.plugins??[]);const{getCurrentSchema:B,setPath:d,path:a,schema:I,handleAddProperty:w,handlePropertyChange:c,handleKeyChange:T,handleDeleteProperty:M,setSchema:G,isPropertyRequired:y}=oe.useSchema(),{getConstraintDefinitionsForType:J}=Q.useConstraints();o.useEffect(()=>{if(i.initialSchema)try{ce.validateSchema(i.initialSchema),G(U.a(i.initialSchema)),g(null)}catch(t){t instanceof Error?g(t.message):t instanceof ue.ValidationError?g(`Schema validation error: ${t.message}`):g("Unknown schema validation error")}},[i.initialSchema]),o.useEffect(()=>{!R&&i.onSchemaChange&&i.onSchemaChange(I)},[I,R,i.onSchemaChange]);const W=B(),z=t=>{d([...a,t])},K=()=>{d(a.slice(0,-1))},X=(t,s)=>{A(t),q(s),f(!0)},V=t=>{v(t),p(!0)},Y=()=>{E&&(M(E),v(void 0)),p(!1)},Z=()=>{v(void 0),p(!1)},$=t=>{const s=B().properties;if(!s||typeof s[t]=="boolean")return;const n=s[t],j=`${t}_copy`,b=U.a(n),u=w(j,b,y(t));u.status==="error"?i.onPropertyAddError?.(u):i.onPropertyAddSuccess?.(u)},ee=(...t)=>{const s=w(...t);s.status==="error"?i.onPropertyAddError?.(s):s.status==="success"&&i.onPropertyAddSuccess?.(s),h(!1)},L=i.propertyComponent,te=(t,s)=>L?e.jsxRuntimeExports.jsx(L,{property:{key:t,schema:s,isRequired:y(t)},onPropertyChange:c,onKeyChange:T,onDelete:V,onDuplicate:$,onNavigate:s.type==="object"||s.type==="array"&&typeof s.items=="object"&&s.items.type==="object"?z:void 0},t):e.jsxRuntimeExports.jsxs("div",{className:"flex flex-col md:grid grid-cols-(--my-autofit-grid) gap-4 md:items-center border p-2 rounded-md mb-2",children:[e.jsxRuntimeExports.jsx("div",{className:"",children:e.jsxRuntimeExports.jsx(C.DebouncedInput,{value:t,onDebounce:n=>T(t,n),placeholder:"Property Key","aria-label":`Property key for ${t}`,delay:500})}),e.jsxRuntimeExports.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxRuntimeExports.jsx(le.Switch,{checked:y(t),onCheckedChange:n=>c(t,{isRequired:n}),"aria-label":"Required"}),e.jsxRuntimeExports.jsx(F.Label,{htmlFor:`required-${t}`,children:"Required"})]}),e.jsxRuntimeExports.jsx("div",{className:"",children:e.jsxRuntimeExports.jsxs(r.Select,{value:typeof s=="object"&&!Array.isArray(s.type)?s.type:void 0,onValueChange:n=>c(t,{type:n}),"aria-label":"Type",children:[e.jsxRuntimeExports.jsx(r.SelectTrigger,{className:"w-full","aria-label":"Select type",children:e.jsxRuntimeExports.jsx(r.SelectValue,{})}),e.jsxRuntimeExports.jsxs(r.SelectContent,{children:[e.jsxRuntimeExports.jsx(r.SelectItem,{value:"string",children:"string"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"number",children:"number"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"integer",children:"integer"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"boolean",children:"boolean"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"object",children:"object"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"array",children:"array"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"null",children:"null"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"enum",children:"enum"})]})]})}),e.jsxRuntimeExports.jsx("div",{className:"",children:e.jsxRuntimeExports.jsx(C.DebouncedInput,{value:typeof s=="object"?s.title:void 0,onDebounce:n=>c(t,{title:n}),placeholder:"Title"})}),e.jsxRuntimeExports.jsx("div",{className:"",children:e.jsxRuntimeExports.jsx(C.DebouncedInput,{value:typeof s=="object"?s.description:void 0,onDebounce:n=>c(t,{description:n}),placeholder:"Description"})}),e.jsxRuntimeExports.jsxs("div",{className:"order-last md:order-none flex gap-2",children:[e.jsxRuntimeExports.jsx(m.Button,{variant:"outline",size:"sm",onClick:()=>V(t),"aria-label":"Delete",className:"block!",children:e.jsxRuntimeExports.jsx(de.default,{size:16,className:"text-destructive"})}),e.jsxRuntimeExports.jsx(m.Button,{variant:"outline",size:"sm",onClick:()=>$(t),"aria-label":"Duplicate",className:"block!",children:e.jsxRuntimeExports.jsx(je.default,{size:16})}),ne(t,s),O(t,s)]}),se(t,s)]},t),se=(t,s)=>{if(typeof s!="object"||s.type!=="array")return null;const n=s.items,j=!Array.isArray(n)&&typeof n=="object"&&typeof n.type=="string"?n?.type:"string";return e.jsxRuntimeExports.jsxs("div",{className:"col-span-full flex items-center gap-4 pl-8 mt-2 bg-gray-50 p-2 rounded-md",children:[e.jsxRuntimeExports.jsx(F.Label,{children:"Items of type:"}),e.jsxRuntimeExports.jsxs(r.Select,{value:j,onValueChange:b=>{const u={...typeof n=="object"?n:{},type:b};b==="object"&&(u.properties=u.properties??{}),c(t,{items:u})},children:[e.jsxRuntimeExports.jsx(r.SelectTrigger,{className:"w-[200px]","aria-label":"Select items of type",children:e.jsxRuntimeExports.jsx(r.SelectValue,{})}),e.jsxRuntimeExports.jsxs(r.SelectContent,{children:[e.jsxRuntimeExports.jsx(r.SelectItem,{value:"string",children:"string"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"number",children:"number"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"integer",children:"integer"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"boolean",children:"boolean"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"object",children:"object"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"array",children:"array"}),e.jsxRuntimeExports.jsx(r.SelectItem,{value:"null",children:"null"})]})]}),O(t,n)]})},ne=(t,s)=>{if(typeof s!="object")return null;const n=J(typeof s.type=="string"?s.type:""),j=Array.isArray(s?.enum);return n.length||j?e.jsxRuntimeExports.jsx(m.Button,{variant:"outline",size:"sm",onClick:()=>X(t,s),"aria-label":"Edit constraints",children:e.jsxRuntimeExports.jsx(he.default,{size:16})}):null},O=(t,s)=>!Array.isArray(s)&&typeof s=="object"&&s?.type==="object"?e.jsxRuntimeExports.jsxs(m.Button,{variant:"outline",size:"sm",onClick:()=>z(t),"aria-label":"Navigate",children:[e.jsxRuntimeExports.jsx("span",{className:"sr-only",children:"Navigate"}),e.jsxRuntimeExports.jsx(pe.default,{size:16})]}):null,re=()=>{const t=i.navigationComponent;return t?e.jsxRuntimeExports.jsx(t,{currentPath:a,onNavigateUp:K,onNavigateTo:d,isRootPath:a.length===0}):e.jsxRuntimeExports.jsxs("div",{className:"flex items-center space-x-4",children:[e.jsxRuntimeExports.jsx(m.Button,{variant:"outline",size:"sm",onClick:K,disabled:a.length===0,className:D.cn(i.backButtonClassName),children:"Back"}),e.jsxRuntimeExports.jsx(x.Breadcrumb,{children:e.jsxRuntimeExports.jsxs(x.BreadcrumbList,{children:[e.jsxRuntimeExports.jsx(x.BreadcrumbItem,{children:e.jsxRuntimeExports.jsx(x.BreadcrumbLink,{href:"#",onClick:()=>d([]),children:"Root"})}),a.map((s,n)=>e.jsxRuntimeExports.jsxs(o.Fragment,{children:[e.jsxRuntimeExports.jsx(x.BreadcrumbSeparator,{}),e.jsxRuntimeExports.jsx(x.BreadcrumbItem,{children:e.jsxRuntimeExports.jsx(x.BreadcrumbLink,{href:"#",onClick:()=>d(a.slice(0,n+1)),children:s})})]},`path-${n}`))]})})]})},ie=()=>{const t=i.addPropertyButtonComponent;return t?e.jsxRuntimeExports.jsx(t,{onClick:()=>h(!0)}):e.jsxRuntimeExports.jsxs(m.Button,{className:D.cn("self-center",i.addPropertyButtonClassName),onClick:()=>{h(!0)},children:[e.jsxRuntimeExports.jsx(me.default,{className:"h-4 w-4 mr-2"}),"Add Property"]})};return e.jsxRuntimeExports.jsxs("div",{children:[R&&e.jsxRuntimeExports.jsxs(S.Alert,{variant:"destructive",children:[e.jsxRuntimeExports.jsx(S.AlertTitle,{children:"Schema Error"}),e.jsxRuntimeExports.jsx(S.AlertDescription,{children:R})]}),re(),e.jsxRuntimeExports.jsx("div",{className:D.cn("mt-6 overflow-x-hidden",i.propertiesListClassName),children:Object.entries(W.properties??{}).map(([t,s])=>typeof s=="boolean"?null:te(t,s))}),ie(),e.jsxRuntimeExports.jsx(xe.AddPropertyDialog,{open:_,onOpenChange:h,onSubmit:ee}),P&&N&&e.jsxRuntimeExports.jsx(ae.EditPropertyDialog,{propertyKey:P,property:N,open:k,onOpenChange:f,onSubmit:t=>{c(...t),A(void 0),q(void 0),f(!1)}}),e.jsxRuntimeExports.jsx(l.AlertDialog,{open:H,onOpenChange:p,children:e.jsxRuntimeExports.jsxs(l.AlertDialogContent,{children:[e.jsxRuntimeExports.jsxs(l.AlertDialogHeader,{children:[e.jsxRuntimeExports.jsx(l.AlertDialogTitle,{children:"Are you sure?"}),e.jsxRuntimeExports.jsxs(l.AlertDialogDescription,{children:["This action cannot be undone. This will permanently delete the property",E?` "${E}"`:""," from the schema."]})]}),e.jsxRuntimeExports.jsxs(l.AlertDialogFooter,{children:[e.jsxRuntimeExports.jsx(l.AlertDialogCancel,{onClick:Z,children:"Cancel"}),e.jsxRuntimeExports.jsx(l.AlertDialogAction,{onClick:Y,children:"Delete"})]})]})})]})};exports.SchemaBuilder=Ee;
2
2
  //# sourceMappingURL=index.cjs3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs3.js","sources":["../src/packages/builder/schema-builder.tsx"],"sourcesContent":["import { useEffect, useState, Fragment } from \"react\";\nimport { PropertyAddError, PropertyAddSuccess, useSchema } from \"./context\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n Breadcrumb,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { Bolt, ChevronRight, Copy, Plus, Trash2 } from \"lucide-react\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/components/ui/select\";\nimport { Label } from \"@/components/ui/label\";\nimport type { JSONSchema7 } from \"json-schema\";\nimport { clone } from \"remeda\";\nimport {\n BaseJSONSchemaPlugin,\n useConstraints,\n usePluginSystem,\n} from \"@/packages/constraints/context\";\nimport { EditPropertyDialog } from \"./edit-dialog\";\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from \"@/components/ui/alert-dialog\";\nimport { Alert, AlertDescription, AlertTitle } from \"@/components/ui/alert\";\nimport { validateSchema } from \"./utils\";\nimport Ajv from \"ajv\";\nimport { DebouncedInput } from \"@/components/depounced-input\";\nimport { AddPropertyDialog, type AddPropertyDialogProps } from \"./add-dialog\";\n\n// PropertyComponent type definition for custom property components\nexport interface PropertyComponentProps {\n property: {\n key: string;\n schema: JSONSchema7;\n isRequired: boolean;\n };\n onPropertyChange: (key: string, changes: Partial<JSONSchema7>) => void;\n onKeyChange: (oldKey: string, newKey: string) => void;\n onDelete: (key: string) => void;\n onDuplicate?: (key: string) => void;\n onNavigate?: (key: string) => void;\n}\n\ninterface SchemaBuilderProps {\n /** The schema to edit */\n schema?: JSONSchema7;\n /** Constraint plugins to use */\n plugins?: BaseJSONSchemaPlugin[];\n /** Custom component to render properties */\n propertyComponent?: React.ComponentType<PropertyComponentProps>;\n /** Called when the schema changes */\n onSchemaChange?: (schema: JSONSchema7) => void;\n /** Called when a property is successfully added */\n onPropertyAddSuccess?: (props: PropertyAddSuccess) => void;\n /** Called when there's an error adding a property */\n onPropertyAddError?: (props: PropertyAddError) => void;\n /** Called when there's an error changing a property */\n onPropertyChangeError?: (prop: Error) => void;\n /** Called when a property is successfully changed */\n onPropertyChangeSuccess?: () => void;\n}\n\nexport const SchemaBuilder = (props: SchemaBuilderProps) => {\n // State\n const [showPropertyDialog, setShowPropertyDialog] = useState(false);\n const [showEditDialog, setShowEditDialog] = useState(false);\n const [showDeleteDialog, setShowDeleteDialog] = useState(false);\n const [deleteKey, setDeleteKey] = useState<string | undefined>();\n const [editingKey, setEditingKey] = useState<string | undefined>();\n const [editingProperty, setEditingProperty] = useState<\n JSONSchema7 | undefined\n >();\n const [schemaValidationError, setSchemaValidationError] = useState<\n string | null\n >(null);\n\n // Initialize the plugin system\n usePluginSystem(props.plugins ?? []);\n\n // Get schema context\n const {\n getCurrentSchema,\n setPath,\n path,\n schema,\n handleAddProperty,\n handlePropertyChange,\n handleKeyChange,\n handleDeleteProperty,\n setSchema,\n isPropertyRequired,\n } = useSchema();\n\n // Get constraints context\n const { getConstraintDefinitionsForType } = useConstraints();\n\n // Set schema from props\n useEffect(() => {\n if (props.schema) {\n try {\n // Validate the schema before setting it\n validateSchema(props.schema);\n setSchema(clone(props.schema));\n setSchemaValidationError(null);\n } catch (error) {\n if (error instanceof Error) {\n setSchemaValidationError(error.message);\n } else if (error instanceof Ajv.ValidationError) {\n setSchemaValidationError(`Schema validation error: ${error.message}`);\n } else {\n setSchemaValidationError(\"Unknown schema validation error\");\n }\n }\n }\n }, [props.schema]);\n\n // Notify schema changes\n useEffect(() => {\n if (!schemaValidationError && props.onSchemaChange) {\n props.onSchemaChange(schema);\n }\n }, [schema, schemaValidationError, props.onSchemaChange]);\n\n const currentSchema = getCurrentSchema();\n\n // Navigation handlers\n const handleNavigateToProperty = (name: string) => {\n setPath([...path, name]);\n };\n\n const handleNavigateUp = () => {\n setPath(path.slice(0, -1));\n };\n\n // Property management handlers\n const handleEditProperty = (key: string, property: JSONSchema7) => {\n setEditingKey(key);\n setEditingProperty(property);\n setShowEditDialog(true);\n };\n\n const handleInitiateDelete = (key: string) => {\n setDeleteKey(key);\n setShowDeleteDialog(true);\n };\n\n const handleConfirmDelete = () => {\n if (deleteKey) {\n handleDeleteProperty(deleteKey);\n setDeleteKey(undefined);\n }\n setShowDeleteDialog(false);\n };\n\n const handleCancelDelete = () => {\n setDeleteKey(undefined);\n setShowDeleteDialog(false);\n };\n\n const handleDuplicateProperty = (key: string) => {\n const currentProperties = getCurrentSchema().properties;\n if (!currentProperties || typeof currentProperties[key] === \"boolean\") {\n return;\n }\n\n const propertyToDuplicate = currentProperties[key]!;\n const newKey = `${key}_copy`;\n const newProperty = clone(propertyToDuplicate);\n\n // Add the duplicated property\n const result = handleAddProperty(\n newKey,\n newProperty,\n isPropertyRequired(key),\n );\n\n // Notify if needed\n if (result.status === \"error\") {\n props.onPropertyAddError?.(result);\n } else {\n props.onPropertyAddSuccess?.(result);\n }\n };\n\n const onAddProperty: AddPropertyDialogProps[\"onSubmit\"] = (...vals) => {\n const result = handleAddProperty(...vals);\n\n if (result.status === \"error\") {\n props.onPropertyAddError?.(result);\n } else if (result.status === \"success\") {\n props.onPropertyAddSuccess?.(result);\n }\n setShowPropertyDialog(false);\n };\n\n // Custom property component or default renderer\n const PropertyComponent = props.propertyComponent;\n\n const renderProperty = (key: string, property: JSONSchema7) => {\n if (PropertyComponent) {\n return (\n <PropertyComponent\n key={key}\n property={{\n key,\n schema: property,\n isRequired: isPropertyRequired(key),\n }}\n onPropertyChange={handlePropertyChange}\n onKeyChange={handleKeyChange}\n onDelete={handleInitiateDelete}\n onDuplicate={handleDuplicateProperty}\n onNavigate={\n property.type === \"object\" ||\n (property.type === \"array\" &&\n typeof property.items === \"object\" &&\n (property.items as JSONSchema7).type === \"object\")\n ? handleNavigateToProperty\n : undefined\n }\n />\n );\n }\n\n // Default property renderer\n return (\n <div\n key={key}\n className=\"flex flex-col md:grid grid-cols-(--my-autofit-grid) gap-4 md:items-center border p-2 rounded-md mb-2\"\n >\n <div className=\"\">\n <DebouncedInput\n value={key}\n onDebounce={(newVal) => handleKeyChange(key, newVal)}\n placeholder=\"Property Key\"\n aria-label={`Property key for ${key}`}\n delay={500}\n />\n </div>\n\n <div className=\"flex items-center gap-2\">\n <Switch\n checked={isPropertyRequired(key)}\n onCheckedChange={(checked) =>\n handlePropertyChange(key, { isRequired: checked })\n }\n aria-label=\"Required\"\n />\n <Label htmlFor={`required-${key}`}>Required</Label>\n </div>\n\n <div className=\"\">\n <Select\n value={\n typeof property === \"object\" && !Array.isArray(property.type)\n ? property.type\n : undefined\n }\n onValueChange={(value) =>\n handlePropertyChange(key, {\n type: value as JSONSchema7[\"type\"],\n })\n }\n aria-label=\"Type\"\n >\n <SelectTrigger className=\"w-full\" aria-label=\"Select type\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value={\"string\" satisfies JSONSchema7[\"type\"]}>\n string\n </SelectItem>\n <SelectItem value={\"number\" satisfies JSONSchema7[\"type\"]}>\n number\n </SelectItem>\n <SelectItem value={\"integer\" satisfies JSONSchema7[\"type\"]}>\n integer\n </SelectItem>\n <SelectItem value={\"boolean\" satisfies JSONSchema7[\"type\"]}>\n boolean\n </SelectItem>\n <SelectItem value={\"object\" satisfies JSONSchema7[\"type\"]}>\n object\n </SelectItem>\n <SelectItem value={\"array\" satisfies JSONSchema7[\"type\"]}>\n array\n </SelectItem>\n <SelectItem value={\"null\" satisfies JSONSchema7[\"type\"]}>\n null\n </SelectItem>\n <SelectItem value={\"enum\"}>enum</SelectItem>\n </SelectContent>\n </Select>\n </div>\n\n <div className=\"\">\n <DebouncedInput\n value={typeof property === \"object\" ? property.title : undefined}\n onDebounce={(newVal) =>\n handlePropertyChange(key, { title: newVal })\n }\n placeholder=\"Title\"\n />\n </div>\n\n <div className=\"\">\n <DebouncedInput\n value={\n typeof property === \"object\" ? property.description : undefined\n }\n onDebounce={(newVal) =>\n handlePropertyChange(key, { description: newVal })\n }\n placeholder=\"Description\"\n />\n </div>\n\n <div className=\"order-last md:order-none flex gap-2\">\n {/* Delete button */}\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => handleInitiateDelete(key)}\n aria-label=\"Delete\"\n className=\"block!\"\n >\n <Trash2 size={16} className=\"text-destructive\" />\n </Button>\n\n {/* Duplicate button */}\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => handleDuplicateProperty(key)}\n aria-label=\"Duplicate\"\n className=\"block!\"\n >\n <Copy size={16} />\n </Button>\n\n {/* Edit button if applicable */}\n {renderEditButton(key, property)}\n\n {/* Navigate button for objects/array items */}\n {renderNavigateButton(key, property)}\n </div>\n\n {/* Render array items configuration if needed */}\n {renderArrayItemsConfig(key, property)}\n </div>\n );\n };\n\n // Helper to render array items configuration\n const renderArrayItemsConfig = (key: string, property: JSONSchema7) => {\n if (typeof property !== \"object\" || property.type !== \"array\") {\n return null;\n }\n\n const items = property.items;\n const itemType =\n !Array.isArray(items) &&\n typeof items === \"object\" &&\n typeof items.type === \"string\"\n ? items?.type\n : \"string\";\n\n return (\n <div className=\"col-span-full flex items-center gap-4 pl-8 mt-2 bg-gray-50 p-2 rounded-md\">\n <Label>Items of type:</Label>\n <Select\n value={itemType as string}\n onValueChange={(value) => {\n const newItems: JSONSchema7 = {\n ...(typeof items === \"object\" ? items : {}),\n type: value as JSONSchema7[\"type\"],\n };\n\n if (value === \"object\") {\n // Initialize empty properties for object type\n newItems.properties = newItems.properties ?? {};\n }\n\n handlePropertyChange(key, { items: newItems });\n }}\n >\n <SelectTrigger\n className=\"w-[200px]\"\n aria-label=\"Select items of type\"\n >\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value={\"string\" satisfies JSONSchema7[\"type\"]}>\n string\n </SelectItem>\n <SelectItem value={\"number\" satisfies JSONSchema7[\"type\"]}>\n number\n </SelectItem>\n <SelectItem value={\"integer\" satisfies JSONSchema7[\"type\"]}>\n integer\n </SelectItem>\n <SelectItem value={\"boolean\" satisfies JSONSchema7[\"type\"]}>\n boolean\n </SelectItem>\n <SelectItem value={\"object\" satisfies JSONSchema7[\"type\"]}>\n object\n </SelectItem>\n <SelectItem value={\"array\" satisfies JSONSchema7[\"type\"]}>\n array\n </SelectItem>\n <SelectItem value={\"null\" satisfies JSONSchema7[\"type\"]}>\n null\n </SelectItem>\n </SelectContent>\n </Select>\n\n {/* Configure object button for array items of type object */}\n {renderNavigateButton(key, items)}\n </div>\n );\n };\n\n // Helper to render the edit constraint button when needed\n const renderEditButton = (key: string, property: JSONSchema7) => {\n if (typeof property !== \"object\") return null;\n\n // Check for constraints\n const availableConstraints = getConstraintDefinitionsForType(\n typeof property.type === \"string\" ? property.type : \"\",\n );\n\n // Check for enum\n const hasEnum = Array.isArray(property?.enum);\n\n if (availableConstraints.length || hasEnum) {\n return (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => handleEditProperty(key, property)}\n aria-label=\"Edit constraints\"\n >\n <Bolt size={16} />\n </Button>\n );\n }\n\n return null;\n };\n\n const renderNavigateButton = (key: string, items: JSONSchema7[\"items\"]) => {\n if (\n !Array.isArray(items) &&\n typeof items === \"object\" &&\n items?.type === \"object\"\n ) {\n return (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => handleNavigateToProperty(key)}\n aria-label=\"Navigate\"\n >\n <span className=\"sr-only\">Navigate</span>\n <ChevronRight size={16} />\n </Button>\n );\n }\n\n return null;\n };\n\n return (\n <div>\n {/* Schema validation error */}\n {schemaValidationError && (\n <Alert variant=\"destructive\">\n <AlertTitle>Schema Error</AlertTitle>\n <AlertDescription>{schemaValidationError}</AlertDescription>\n </Alert>\n )}\n\n {/* Navigation bar */}\n <div className=\"flex items-center space-x-4\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={handleNavigateUp}\n disabled={path.length === 0}\n >\n Back\n </Button>\n <Breadcrumb>\n <BreadcrumbList>\n <BreadcrumbItem>\n <BreadcrumbLink href=\"#\" onClick={() => setPath([])}>\n Root\n </BreadcrumbLink>\n </BreadcrumbItem>\n {path.map((item, index) => (\n <Fragment key={`path-${index}`}>\n <BreadcrumbSeparator />\n <BreadcrumbItem>\n <BreadcrumbLink\n href=\"#\"\n onClick={() => setPath(path.slice(0, index + 1))}\n >\n {item}\n </BreadcrumbLink>\n </BreadcrumbItem>\n </Fragment>\n ))}\n </BreadcrumbList>\n </Breadcrumb>\n </div>\n\n {/* Properties list */}\n <div className=\"mt-6 overflow-x-hidden min-w-dvw\">\n {Object.entries(currentSchema.properties ?? {}).map(\n ([key, property]) => {\n if (typeof property === \"boolean\") {\n // We don't support editing boolean properties\n return null;\n }\n\n return renderProperty(key, property);\n },\n )}\n </div>\n\n {/* Add property button */}\n <Button\n className=\"self-center\"\n onClick={() => {\n setShowPropertyDialog(true);\n }}\n >\n <Plus className=\"h-4 w-4 mr-2\" />\n Add Property\n </Button>\n\n {/* Add property dialog */}\n <AddPropertyDialog\n open={showPropertyDialog}\n onOpenChange={setShowPropertyDialog}\n onSubmit={onAddProperty}\n />\n\n {/* Edit property dialog */}\n {editingKey && editingProperty && (\n <EditPropertyDialog\n propertyKey={editingKey}\n property={editingProperty}\n open={showEditDialog}\n onOpenChange={setShowEditDialog}\n onSubmit={(params) => {\n handlePropertyChange(...params);\n setEditingKey(undefined);\n setEditingProperty(undefined);\n setShowEditDialog(false);\n }}\n />\n )}\n\n {/* Delete confirmation dialog */}\n <AlertDialog open={showDeleteDialog} onOpenChange={setShowDeleteDialog}>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Are you sure?</AlertDialogTitle>\n <AlertDialogDescription>\n This action cannot be undone. This will permanently delete the\n property\n {deleteKey ? ` \"${deleteKey}\"` : \"\"} from the schema.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel onClick={handleCancelDelete}>\n Cancel\n </AlertDialogCancel>\n <AlertDialogAction onClick={handleConfirmDelete}>\n Delete\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </div>\n );\n};\n"],"names":["SchemaBuilder","props","showPropertyDialog","setShowPropertyDialog","useState","showEditDialog","setShowEditDialog","showDeleteDialog","setShowDeleteDialog","deleteKey","setDeleteKey","editingKey","setEditingKey","editingProperty","setEditingProperty","schemaValidationError","setSchemaValidationError","usePluginSystem","getCurrentSchema","setPath","path","schema","handleAddProperty","handlePropertyChange","handleKeyChange","handleDeleteProperty","setSchema","isPropertyRequired","useSchema","getConstraintDefinitionsForType","useConstraints","useEffect","validateSchema","clone","error","Ajv","currentSchema","handleNavigateToProperty","name","handleNavigateUp","handleEditProperty","key","property","handleInitiateDelete","handleConfirmDelete","handleCancelDelete","handleDuplicateProperty","currentProperties","propertyToDuplicate","newKey","newProperty","result","onAddProperty","vals","PropertyComponent","renderProperty","jsx","jsxs","DebouncedInput","newVal","Switch","checked","Label","Select","value","SelectTrigger","SelectValue","SelectContent","SelectItem","Button","Trash2","Copy","renderEditButton","renderNavigateButton","renderArrayItemsConfig","items","itemType","newItems","availableConstraints","hasEnum","Bolt","ChevronRight","Alert","AlertTitle","AlertDescription","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","item","index","Fragment","BreadcrumbSeparator","Plus","AddPropertyDialog","EditPropertyDialog","params","AlertDialog","AlertDialogContent","AlertDialogHeader","AlertDialogTitle","AlertDialogDescription","AlertDialogFooter","AlertDialogCancel","AlertDialogAction"],"mappings":"0tBA6EaA,GAAiBC,GAA8B,CAE1D,KAAM,CAACC,EAAoBC,CAAqB,EAAIC,EAAAA,SAAS,EAAK,EAC5D,CAACC,EAAgBC,CAAiB,EAAIF,EAAAA,S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AA,CAACqD,EAAAA,kBAAAA,IAAAqC,GAAA,QAAA,CAAK,UAAU,cAAe,CAAA,EAAE,cAAA,CAAA,CAEnC,EAGArC,EAAA,kBAAA,IAACsC,GAAA,kBAAA,CACC,KAAM5F,EACN,aAAcC,EACd,SAAUiD,CAAA,CACZ,EAGCzC,GAAcE,GACb2C,EAAA,kBAAA,IAACuC,GAAA,mBAAA,CACC,YAAapF,EACb,SAAUE,EACV,KAAMR,EACN,aAAcC,EACd,SAAW0F,GAAW,CACpBzE,EAAqB,GAAGyE,CAAM,EAC9BpF,EAAc,MAAS,EACvBE,EAAmB,MAAS,EAC5BR,EAAkB,EAAK,CAAA,CACzB,CACF,0BAID2F,EAAY,YAAA,CAAA,KAAM1F,EAAkB,aAAcC,EACjD,kCAAC0F,EACC,mBAAA,CAAA,SAAA,CAAAzC,yBAAC0C,EAAAA,kBACC,CAAA,SAAA,CAAA3C,EAAAA,kBAAAA,IAAC4C,oBAAiB,SAAa,eAAA,CAAA,2BAC9BC,EAAAA,uBAAuB,CAAA,SAAA,CAAA,0EAGrB5F,EAAY,KAAKA,CAAS,IAAM,GAAG,mBAAA,CACtC,CAAA,CAAA,EACF,2BACC6F,EAAAA,kBACC,CAAA,SAAA,CAAC9C,EAAA,kBAAA,IAAA+C,EAAA,kBAAA,CAAkB,QAAS1D,EAAoB,SAEhD,SAAA,EACCW,EAAA,kBAAA,IAAAgD,EAAA,kBAAA,CAAkB,QAAS5D,EAAqB,SAEjD,QAAA,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CACF,CACF,CAAA,CAAA,EACF,CAEJ"}
1
+ {"version":3,"file":"index.cjs3.js","sources":["../src/packages/builder/schema-builder.tsx"],"sourcesContent":["import { useEffect, useState, Fragment } from \"react\";\nimport { PropertyAddError, PropertyAddSuccess, useSchema } from \"./context\";\nimport { Button } from \"@/components/ui/button\";\nimport {\n Breadcrumb,\n BreadcrumbItem,\n BreadcrumbLink,\n BreadcrumbList,\n BreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\nimport { Switch } from \"@/components/ui/switch\";\nimport { Bolt, ChevronRight, Copy, Plus, Trash2 } from \"lucide-react\";\nimport {\n Select,\n SelectContent,\n SelectItem,\n SelectTrigger,\n SelectValue,\n} from \"@/components/ui/select\";\nimport { Label } from \"@/components/ui/label\";\nimport type { JSONSchema7 } from \"json-schema\";\nimport { clone } from \"remeda\";\nimport {\n BaseJSONSchemaPlugin,\n useConstraints,\n usePluginSystem,\n} from \"@/packages/constraints/context\";\nimport { EditPropertyDialog } from \"./edit-dialog\";\nimport {\n AlertDialog,\n AlertDialogAction,\n AlertDialogCancel,\n AlertDialogContent,\n AlertDialogDescription,\n AlertDialogFooter,\n AlertDialogHeader,\n AlertDialogTitle,\n} from \"@/components/ui/alert-dialog\";\nimport { Alert, AlertDescription, AlertTitle } from \"@/components/ui/alert\";\nimport { validateSchema } from \"./utils\";\nimport Ajv from \"ajv\";\nimport { DebouncedInput } from \"@/components/depounced-input\";\nimport { AddPropertyDialog, type AddPropertyDialogProps } from \"./add-dialog\";\nimport { cn } from \"@/lib/utils\";\n\n// PropertyComponent type definition for custom property components\nexport interface PropertyComponentProps {\n property: {\n key: string;\n schema: JSONSchema7;\n isRequired: boolean;\n };\n onPropertyChange: (key: string, changes: Partial<JSONSchema7>) => void;\n onKeyChange: (oldKey: string, newKey: string) => void;\n onDelete: (key: string) => void;\n onDuplicate?: (key: string) => void;\n onNavigate?: (key: string) => void;\n}\n\n// NavigationProps for custom navigation component\nexport interface NavigationProps {\n currentPath: string[];\n onNavigateUp: () => void;\n onNavigateTo: (newPath: string[]) => void;\n isRootPath: boolean;\n}\n\n// AddPropertyButtonProps for custom add property button\nexport interface AddPropertyButtonProps {\n onClick: () => void;\n}\n\ninterface SchemaBuilderProps {\n /** The schema to edit */\n initialSchema?: JSONSchema7;\n /** Constraint plugins to use */\n plugins?: BaseJSONSchemaPlugin[];\n /** Custom component to render properties */\n propertyComponent?: React.ComponentType<PropertyComponentProps>;\n /** Called when the schema changes */\n onSchemaChange?: (schema: JSONSchema7) => void;\n /** Called when a property is successfully added */\n onPropertyAddSuccess?: (props: PropertyAddSuccess) => void;\n /** Called when there's an error adding a property */\n onPropertyAddError?: (props: PropertyAddError) => void;\n /** Called when there's an error changing a property */\n onPropertyChangeError?: (prop: Error) => void;\n /** Called when a property is successfully changed */\n onPropertyChangeSuccess?: () => void;\n /** Class name for the navigation bar back button */\n backButtonClassName?: string;\n /** Class name for the properties list container */\n propertiesListClassName?: string;\n /** Class name for the add property button */\n addPropertyButtonClassName?: string;\n /** Custom navigation component */\n navigationComponent?: React.ComponentType<NavigationProps>;\n /** Custom add property button component */\n addPropertyButtonComponent?: React.ComponentType<AddPropertyButtonProps>;\n}\n\nexport const SchemaBuilder = (props: SchemaBuilderProps) => {\n // State\n const [showPropertyDialog, setShowPropertyDialog] = useState(false);\n const [showEditDialog, setShowEditDialog] = useState(false);\n const [showDeleteDialog, setShowDeleteDialog] = useState(false);\n const [deleteKey, setDeleteKey] = useState<string | undefined>();\n const [editingKey, setEditingKey] = useState<string | undefined>();\n const [editingProperty, setEditingProperty] = useState<\n JSONSchema7 | undefined\n >();\n const [schemaValidationError, setSchemaValidationError] = useState<\n string | null\n >(null);\n\n // Initialize the plugin system\n usePluginSystem(props.plugins ?? []);\n\n // Get schema context\n const {\n getCurrentSchema,\n setPath,\n path,\n schema,\n handleAddProperty,\n handlePropertyChange,\n handleKeyChange,\n handleDeleteProperty,\n setSchema,\n isPropertyRequired,\n } = useSchema();\n\n // Get constraints context\n const { getConstraintDefinitionsForType } = useConstraints();\n\n // Set schema from props\n useEffect(() => {\n if (props.initialSchema) {\n try {\n // Validate the schema before setting it\n validateSchema(props.initialSchema);\n setSchema(clone(props.initialSchema));\n setSchemaValidationError(null);\n } catch (error) {\n if (error instanceof Error) {\n setSchemaValidationError(error.message);\n } else if (error instanceof Ajv.ValidationError) {\n setSchemaValidationError(`Schema validation error: ${error.message}`);\n } else {\n setSchemaValidationError(\"Unknown schema validation error\");\n }\n }\n }\n }, [props.initialSchema]);\n\n // Notify schema changes\n useEffect(() => {\n if (!schemaValidationError && props.onSchemaChange) {\n props.onSchemaChange(schema);\n }\n }, [schema, schemaValidationError, props.onSchemaChange]);\n\n const currentSchema = getCurrentSchema();\n\n // Navigation handlers\n const handleNavigateToProperty = (name: string) => {\n setPath([...path, name]);\n };\n\n const handleNavigateUp = () => {\n setPath(path.slice(0, -1));\n };\n\n // Property management handlers\n const handleEditProperty = (key: string, property: JSONSchema7) => {\n setEditingKey(key);\n setEditingProperty(property);\n setShowEditDialog(true);\n };\n\n const handleInitiateDelete = (key: string) => {\n setDeleteKey(key);\n setShowDeleteDialog(true);\n };\n\n const handleConfirmDelete = () => {\n if (deleteKey) {\n handleDeleteProperty(deleteKey);\n setDeleteKey(undefined);\n }\n setShowDeleteDialog(false);\n };\n\n const handleCancelDelete = () => {\n setDeleteKey(undefined);\n setShowDeleteDialog(false);\n };\n\n const handleDuplicateProperty = (key: string) => {\n const currentProperties = getCurrentSchema().properties;\n if (!currentProperties || typeof currentProperties[key] === \"boolean\") {\n return;\n }\n\n const propertyToDuplicate = currentProperties[key]!;\n const newKey = `${key}_copy`;\n const newProperty = clone(propertyToDuplicate);\n\n // Add the duplicated property\n const result = handleAddProperty(\n newKey,\n newProperty,\n isPropertyRequired(key),\n );\n\n // Notify if needed\n if (result.status === \"error\") {\n props.onPropertyAddError?.(result);\n } else {\n props.onPropertyAddSuccess?.(result);\n }\n };\n\n const onAddProperty: AddPropertyDialogProps[\"onSubmit\"] = (...vals) => {\n const result = handleAddProperty(...vals);\n\n if (result.status === \"error\") {\n props.onPropertyAddError?.(result);\n } else if (result.status === \"success\") {\n props.onPropertyAddSuccess?.(result);\n }\n setShowPropertyDialog(false);\n };\n\n // Custom property component or default renderer\n const PropertyComponent = props.propertyComponent;\n\n const renderProperty = (key: string, property: JSONSchema7) => {\n if (PropertyComponent) {\n return (\n <PropertyComponent\n key={key}\n property={{\n key,\n schema: property,\n isRequired: isPropertyRequired(key),\n }}\n onPropertyChange={handlePropertyChange}\n onKeyChange={handleKeyChange}\n onDelete={handleInitiateDelete}\n onDuplicate={handleDuplicateProperty}\n onNavigate={\n property.type === \"object\" ||\n (property.type === \"array\" &&\n typeof property.items === \"object\" &&\n (property.items as JSONSchema7).type === \"object\")\n ? handleNavigateToProperty\n : undefined\n }\n />\n );\n }\n\n // Default property renderer\n return (\n <div\n key={key}\n className=\"flex flex-col md:grid grid-cols-(--my-autofit-grid) gap-4 md:items-center border p-2 rounded-md mb-2\"\n >\n <div className=\"\">\n <DebouncedInput\n value={key}\n onDebounce={(newVal) => handleKeyChange(key, newVal)}\n placeholder=\"Property Key\"\n aria-label={`Property key for ${key}`}\n delay={500}\n />\n </div>\n\n <div className=\"flex items-center gap-2\">\n <Switch\n checked={isPropertyRequired(key)}\n onCheckedChange={(checked) =>\n handlePropertyChange(key, { isRequired: checked })\n }\n aria-label=\"Required\"\n />\n <Label htmlFor={`required-${key}`}>Required</Label>\n </div>\n\n <div className=\"\">\n <Select\n value={\n typeof property === \"object\" && !Array.isArray(property.type)\n ? property.type\n : undefined\n }\n onValueChange={(value) =>\n handlePropertyChange(key, {\n type: value as JSONSchema7[\"type\"],\n })\n }\n aria-label=\"Type\"\n >\n <SelectTrigger className=\"w-full\" aria-label=\"Select type\">\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value={\"string\" satisfies JSONSchema7[\"type\"]}>\n string\n </SelectItem>\n <SelectItem value={\"number\" satisfies JSONSchema7[\"type\"]}>\n number\n </SelectItem>\n <SelectItem value={\"integer\" satisfies JSONSchema7[\"type\"]}>\n integer\n </SelectItem>\n <SelectItem value={\"boolean\" satisfies JSONSchema7[\"type\"]}>\n boolean\n </SelectItem>\n <SelectItem value={\"object\" satisfies JSONSchema7[\"type\"]}>\n object\n </SelectItem>\n <SelectItem value={\"array\" satisfies JSONSchema7[\"type\"]}>\n array\n </SelectItem>\n <SelectItem value={\"null\" satisfies JSONSchema7[\"type\"]}>\n null\n </SelectItem>\n <SelectItem value={\"enum\"}>enum</SelectItem>\n </SelectContent>\n </Select>\n </div>\n\n <div className=\"\">\n <DebouncedInput\n value={typeof property === \"object\" ? property.title : undefined}\n onDebounce={(newVal) =>\n handlePropertyChange(key, { title: newVal })\n }\n placeholder=\"Title\"\n />\n </div>\n\n <div className=\"\">\n <DebouncedInput\n value={\n typeof property === \"object\" ? property.description : undefined\n }\n onDebounce={(newVal) =>\n handlePropertyChange(key, { description: newVal })\n }\n placeholder=\"Description\"\n />\n </div>\n\n <div className=\"order-last md:order-none flex gap-2\">\n {/* Delete button */}\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => handleInitiateDelete(key)}\n aria-label=\"Delete\"\n className=\"block!\"\n >\n <Trash2 size={16} className=\"text-destructive\" />\n </Button>\n\n {/* Duplicate button */}\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => handleDuplicateProperty(key)}\n aria-label=\"Duplicate\"\n className=\"block!\"\n >\n <Copy size={16} />\n </Button>\n\n {/* Edit button if applicable */}\n {renderEditButton(key, property)}\n\n {/* Navigate button for objects/array items */}\n {renderNavigateButton(key, property)}\n </div>\n\n {/* Render array items configuration if needed */}\n {renderArrayItemsConfig(key, property)}\n </div>\n );\n };\n\n // Helper to render array items configuration\n const renderArrayItemsConfig = (key: string, property: JSONSchema7) => {\n if (typeof property !== \"object\" || property.type !== \"array\") {\n return null;\n }\n\n const items = property.items;\n const itemType =\n !Array.isArray(items) &&\n typeof items === \"object\" &&\n typeof items.type === \"string\"\n ? items?.type\n : \"string\";\n\n return (\n <div className=\"col-span-full flex items-center gap-4 pl-8 mt-2 bg-gray-50 p-2 rounded-md\">\n <Label>Items of type:</Label>\n <Select\n value={itemType as string}\n onValueChange={(value) => {\n const newItems: JSONSchema7 = {\n ...(typeof items === \"object\" ? items : {}),\n type: value as JSONSchema7[\"type\"],\n };\n\n if (value === \"object\") {\n // Initialize empty properties for object type\n newItems.properties = newItems.properties ?? {};\n }\n\n handlePropertyChange(key, { items: newItems });\n }}\n >\n <SelectTrigger\n className=\"w-[200px]\"\n aria-label=\"Select items of type\"\n >\n <SelectValue />\n </SelectTrigger>\n <SelectContent>\n <SelectItem value={\"string\" satisfies JSONSchema7[\"type\"]}>\n string\n </SelectItem>\n <SelectItem value={\"number\" satisfies JSONSchema7[\"type\"]}>\n number\n </SelectItem>\n <SelectItem value={\"integer\" satisfies JSONSchema7[\"type\"]}>\n integer\n </SelectItem>\n <SelectItem value={\"boolean\" satisfies JSONSchema7[\"type\"]}>\n boolean\n </SelectItem>\n <SelectItem value={\"object\" satisfies JSONSchema7[\"type\"]}>\n object\n </SelectItem>\n <SelectItem value={\"array\" satisfies JSONSchema7[\"type\"]}>\n array\n </SelectItem>\n <SelectItem value={\"null\" satisfies JSONSchema7[\"type\"]}>\n null\n </SelectItem>\n </SelectContent>\n </Select>\n\n {/* Configure object button for array items of type object */}\n {renderNavigateButton(key, items)}\n </div>\n );\n };\n\n // Helper to render the edit constraint button when needed\n const renderEditButton = (key: string, property: JSONSchema7) => {\n if (typeof property !== \"object\") return null;\n\n // Check for constraints\n const availableConstraints = getConstraintDefinitionsForType(\n typeof property.type === \"string\" ? property.type : \"\",\n );\n\n // Check for enum\n const hasEnum = Array.isArray(property?.enum);\n\n if (availableConstraints.length || hasEnum) {\n return (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => handleEditProperty(key, property)}\n aria-label=\"Edit constraints\"\n >\n <Bolt size={16} />\n </Button>\n );\n }\n\n return null;\n };\n\n const renderNavigateButton = (key: string, items: JSONSchema7[\"items\"]) => {\n if (\n !Array.isArray(items) &&\n typeof items === \"object\" &&\n items?.type === \"object\"\n ) {\n return (\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={() => handleNavigateToProperty(key)}\n aria-label=\"Navigate\"\n >\n <span className=\"sr-only\">Navigate</span>\n <ChevronRight size={16} />\n </Button>\n );\n }\n\n return null;\n };\n\n // Render navigation component\n const renderNavigation = () => {\n const NavigationComponent = props.navigationComponent;\n\n if (NavigationComponent) {\n return (\n <NavigationComponent\n currentPath={path}\n onNavigateUp={handleNavigateUp}\n onNavigateTo={setPath}\n isRootPath={path.length === 0}\n />\n );\n }\n\n return (\n <div className=\"flex items-center space-x-4\">\n <Button\n variant=\"outline\"\n size=\"sm\"\n onClick={handleNavigateUp}\n disabled={path.length === 0}\n className={cn(props.backButtonClassName)}\n >\n Back\n </Button>\n <Breadcrumb>\n <BreadcrumbList>\n <BreadcrumbItem>\n <BreadcrumbLink href=\"#\" onClick={() => setPath([])}>\n Root\n </BreadcrumbLink>\n </BreadcrumbItem>\n {path.map((item, index) => (\n <Fragment key={`path-${index}`}>\n <BreadcrumbSeparator />\n <BreadcrumbItem>\n <BreadcrumbLink\n href=\"#\"\n onClick={() => setPath(path.slice(0, index + 1))}\n >\n {item}\n </BreadcrumbLink>\n </BreadcrumbItem>\n </Fragment>\n ))}\n </BreadcrumbList>\n </Breadcrumb>\n </div>\n );\n };\n\n // Render add property button\n const renderAddPropertyButton = () => {\n const AddPropertyButtonComponent = props.addPropertyButtonComponent;\n\n if (AddPropertyButtonComponent) {\n return (\n <AddPropertyButtonComponent\n onClick={() => setShowPropertyDialog(true)}\n />\n );\n }\n\n return (\n <Button\n className={cn(\"self-center\", props.addPropertyButtonClassName)}\n onClick={() => {\n setShowPropertyDialog(true);\n }}\n >\n <Plus className=\"h-4 w-4 mr-2\" />\n Add Property\n </Button>\n );\n };\n\n return (\n <div>\n {/* Schema validation error */}\n {schemaValidationError && (\n <Alert variant=\"destructive\">\n <AlertTitle>Schema Error</AlertTitle>\n <AlertDescription>{schemaValidationError}</AlertDescription>\n </Alert>\n )}\n\n {/* Navigation bar */}\n {renderNavigation()}\n\n {/* Properties list */}\n <div\n className={cn(\"mt-6 overflow-x-hidden\", props.propertiesListClassName)}\n >\n {Object.entries(currentSchema.properties ?? {}).map(\n ([key, property]) => {\n if (typeof property === \"boolean\") {\n // We don't support editing boolean properties\n return null;\n }\n\n return renderProperty(key, property);\n },\n )}\n </div>\n\n {/* Add property button */}\n {renderAddPropertyButton()}\n\n {/* Add property dialog */}\n <AddPropertyDialog\n open={showPropertyDialog}\n onOpenChange={setShowPropertyDialog}\n onSubmit={onAddProperty}\n />\n\n {/* Edit property dialog */}\n {editingKey && editingProperty && (\n <EditPropertyDialog\n propertyKey={editingKey}\n property={editingProperty}\n open={showEditDialog}\n onOpenChange={setShowEditDialog}\n onSubmit={(params) => {\n handlePropertyChange(...params);\n setEditingKey(undefined);\n setEditingProperty(undefined);\n setShowEditDialog(false);\n }}\n />\n )}\n\n {/* Delete confirmation dialog */}\n <AlertDialog open={showDeleteDialog} onOpenChange={setShowDeleteDialog}>\n <AlertDialogContent>\n <AlertDialogHeader>\n <AlertDialogTitle>Are you sure?</AlertDialogTitle>\n <AlertDialogDescription>\n This action cannot be undone. This will permanently delete the\n property\n {deleteKey ? ` \"${deleteKey}\"` : \"\"} from the schema.\n </AlertDialogDescription>\n </AlertDialogHeader>\n <AlertDialogFooter>\n <AlertDialogCancel onClick={handleCancelDelete}>\n Cancel\n </AlertDialogCancel>\n <AlertDialogAction onClick={handleConfirmDelete}>\n Delete\n </AlertDialogAction>\n </AlertDialogFooter>\n </AlertDialogContent>\n </AlertDialog>\n </div>\n );\n};\n"],"names":["SchemaBuilder","props","showPropertyDialog","setShowPropertyDialog","useState","showEditDialog","setShowEditDialog","showDeleteDialog","setShowDeleteDialog","deleteKey","setDeleteKey","editingKey","setEditingKey","editingProperty","setEditingProperty","schemaValidationError","setSchemaValidationError","usePluginSystem","getCurrentSchema","setPath","path","schema","handleAddProperty","handlePropertyChange","handleKeyChange","handleDeleteProperty","setSchema","isPropertyRequired","useSchema","getConstraintDefinitionsForType","useConstraints","useEffect","validateSchema","clone","error","Ajv","currentSchema","handleNavigateToProperty","name","handleNavigateUp","handleEditProperty","key","property","handleInitiateDelete","handleConfirmDelete","handleCancelDelete","handleDuplicateProperty","currentProperties","propertyToDuplicate","newKey","newProperty","result","onAddProperty","vals","PropertyComponent","renderProperty","jsx","jsxs","DebouncedInput","newVal","Switch","checked","Label","Select","value","SelectTrigger","SelectValue","SelectContent","SelectItem","Button","Trash2","Copy","renderEditButton","renderNavigateButton","renderArrayItemsConfig","items","itemType","newItems","availableConstraints","hasEnum","Bolt","ChevronRight","renderNavigation","NavigationComponent","cn","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","item","index","Fragment","BreadcrumbSeparator","renderAddPropertyButton","AddPropertyButtonComponent","Plus","Alert","AlertTitle","AlertDescription","AddPropertyDialog","EditPropertyDialog","params","AlertDialog","AlertDialogContent","AlertDialogHeader","AlertDialogTitle","AlertDialogDescription","AlertDialogFooter","AlertDialogCancel","AlertDialogAction"],"mappings":"wvBAqGaA,GAAiBC,GAA8B,CAE1D,KAAM,CAACC,EAAoBC,CAAqB,EAAIC,EAAAA,SAAS,EAAK,EAC5D,CAACC,EAAgBC,CAAiB,EAAIF,EAAAA,SAAS,EAAK,EACpD,CAACG,EAAkBC,CAAmB,EAAIJ,EAAAA,SAAS,EAAK,EACxD,CAACK,EAAWC,CAAY,EAAIN,WAA6B,EACzD,CAACO,EAAYC,CAAa,EAAIR,WAA6B,EAC3D,CAACS,EAAiBC,CAAkB,EAAIV,WAE5C,EACI,CAACW,EAAuBC,CAAwB,EAAIZ,EAAAA,SAExD,IAAI,EAGUa,kBAAAhB,EAAM,SAAW,EAAE,EAG7B,KAAA,CACJ,iBAAAiB,EACA,QAAAC,EACA,KAAAC,EACA,OAAAC,EACA,kBAAAC,EACA,qBAAAC,EACA,gBAAAC,EACA,qBAAAC,EACA,UAAAC,EACA,mBAAAC,GACEC,aAAU,EAGR,CAAE,gCAAAC,CAAgC,EAAIC,iBAAe,EAG3DC,EAAAA,UAAU,IAAM,CACd,GAAI9B,EAAM,cACJ,GAAA,CAEF+B,GAAA,eAAe/B,EAAM,aAAa,EACxByB,EAAAO,EAAA,EAAMhC,EAAM,aAAa,CAAC,EACpCe,EAAyB,IAAI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jG,EACN,aAAcC,EACd,SAAUiD,EAAA,CACZ,EAGCzC,GAAcE,GACb2C,EAAA,kBAAA,IAAC4C,GAAA,mBAAA,CACC,YAAazF,EACb,SAAUE,EACV,KAAMR,EACN,aAAcC,EACd,SAAW+F,GAAW,CACpB9E,EAAqB,GAAG8E,CAAM,EAC9BzF,EAAc,MAAS,EACvBE,EAAmB,MAAS,EAC5BR,EAAkB,EAAK,CAAA,CACzB,CACF,0BAIDgG,EAAY,YAAA,CAAA,KAAM/F,EAAkB,aAAcC,EACjD,kCAAC+F,EACC,mBAAA,CAAA,SAAA,CAAA9C,yBAAC+C,EAAAA,kBACC,CAAA,SAAA,CAAAhD,EAAAA,kBAAAA,IAACiD,oBAAiB,SAAa,eAAA,CAAA,2BAC9BC,EAAAA,uBAAuB,CAAA,SAAA,CAAA,0EAGrBjG,EAAY,KAAKA,CAAS,IAAM,GAAG,mBAAA,CACtC,CAAA,CAAA,EACF,2BACCkG,EAAAA,kBACC,CAAA,SAAA,CAACnD,EAAA,kBAAA,IAAAoD,EAAA,kBAAA,CAAkB,QAAS/D,EAAoB,SAEhD,SAAA,EACCW,EAAA,kBAAA,IAAAqD,EAAA,kBAAA,CAAkB,QAASjE,EAAqB,SAEjD,QAAA,CAAA,CAAA,CACF,CAAA,CAAA,CAAA,CACF,CACF,CAAA,CAAA,EACF,CAEJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs30.js","sources":["../../../node_modules/.pnpm/lucide-react@0.477.0_react@19.0.0/node_modules/lucide-react/dist/esm/icons/x.js"],"sourcesContent":["/**\n * @license lucide-react v0.477.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }]\n];\nconst X = createLucideIcon(\"X\", __iconNode);\n\nexport { __iconNode, X as default };\n//# sourceMappingURL=x.js.map\n"],"names":["__iconNode","X","createLucideIcon"],"mappings":"gJAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CACjB,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,QAAQ,CAAE,EAC3C,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,QAAU,CAAA,CAC7C,EACMC,EAAIC,EAAAA,QAAiB,IAAKF,CAAU","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs30.js","sources":["../../../node_modules/.pnpm/lucide-react@0.477.0_react@18.3.1/node_modules/lucide-react/dist/esm/icons/x.js"],"sourcesContent":["/**\n * @license lucide-react v0.477.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"M18 6 6 18\", key: \"1bl5f8\" }],\n [\"path\", { d: \"m6 6 12 12\", key: \"d8bk6v\" }]\n];\nconst X = createLucideIcon(\"X\", __iconNode);\n\nexport { __iconNode, X as default };\n//# sourceMappingURL=x.js.map\n"],"names":["__iconNode","X","createLucideIcon"],"mappings":"gJAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CACjB,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,QAAQ,CAAE,EAC3C,CAAC,OAAQ,CAAE,EAAG,aAAc,IAAK,QAAU,CAAA,CAC7C,EACMC,EAAIC,EAAAA,QAAiB,IAAKF,CAAU","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs32.js"),t=require("./index.cjs33.js"),u=require("./index.cjs34.js");var r;function o(){return r||(r=1,process.env.NODE_ENV==="production"?e.__module.exports=t.__require():e.__module.exports=u.__require()),e.__module.exports}exports.__require=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs32.js"),t=require("./index.cjs33.js"),u=require("./index.cjs34.js");var r;function i(){return r||(r=1,process.env.NODE_ENV==="production"?e.__module.exports=t.__require():e.__module.exports=u.__require()),e.__module.exports}exports.__require=i;
2
2
  //# sourceMappingURL=index.cjs31.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs31.js","sources":["../../../node_modules/.pnpm/react@19.0.0/node_modules/react/jsx-runtime.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n"],"names":["jsxRuntimeModule","require$$0","require$$1"],"mappings":"kNAEI,QAAQ,IAAI,WAAa,aAC3BA,EAAA,SAAA,QAAiBC,YAAgD,EAEjED,EAAA,SAAA,QAAiBE,YAAiD","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs31.js","sources":["../../../node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n"],"names":["jsxRuntimeModule","require$$0","require$$1"],"mappings":"kNAEI,QAAQ,IAAI,WAAa,aAC3BA,EAAA,SAAA,QAAiBC,YAAoD,EAErED,EAAA,SAAA,QAAiBE,YAAiD","x_google_ignoreList":[0]}
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index.cjs53.js");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./index.cjs53.js"),R=require("react");/**
2
2
  * @license React
3
- * react-jsx-runtime.production.js
3
+ * react-jsx-runtime.production.min.js
4
4
  *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var _;function x(){if(_)return e.__exports;_=1;var n=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function s(l,r,t){var o=null;if(t!==void 0&&(o=""+t),r.key!==void 0&&(o=""+r.key),"key"in r){t={};for(var u in r)u!=="key"&&(t[u]=r[u])}else t=r;return r=t.ref,{$$typeof:n,type:l,key:o,ref:r!==void 0?r:null,props:t}}return e.__exports.Fragment=i,e.__exports.jsx=s,e.__exports.jsxs=s,e.__exports}exports.__require=x;
9
+ */var p;function a(){if(p)return t.__exports;p=1;var f=R,c=Symbol.for("react.element"),l=Symbol.for("react.fragment"),d=Object.prototype.hasOwnProperty,m=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,y={key:!0,ref:!0,__self:!0,__source:!0};function u(o,e,i){var r,n={},_=null,s=null;i!==void 0&&(_=""+i),e.key!==void 0&&(_=""+e.key),e.ref!==void 0&&(s=e.ref);for(r in e)d.call(e,r)&&!y.hasOwnProperty(r)&&(n[r]=e[r]);if(o&&o.defaultProps)for(r in e=o.defaultProps,e)n[r]===void 0&&(n[r]=e[r]);return{$$typeof:c,type:o,key:_,ref:s,props:n,_owner:m.current}}return t.__exports.Fragment=l,t.__exports.jsx=u,t.__exports.jsxs=u,t.__exports}exports.__require=a;
10
10
  //# sourceMappingURL=index.cjs33.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs33.js","sources":["../../../node_modules/.pnpm/react@19.0.0/node_modules/react/cjs/react-jsx-runtime.production.js"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n"],"names":["REACT_ELEMENT_TYPE","REACT_FRAGMENT_TYPE","jsxProd","type","config","maybeKey","key","propName","reactJsxRuntime_production"],"mappings":";;;;;;;;kDAWA,IAAIA,EAAqB,OAAO,IAAI,4BAA4B,EAC9DC,EAAsB,OAAO,IAAI,gBAAgB,EACnD,SAASC,EAAQC,EAAMC,EAAQC,EAAU,CACvC,IAAIC,EAAM,KAGV,GAFWD,IAAX,SAAwBC,EAAM,GAAKD,GACxBD,EAAO,MAAlB,SAA0BE,EAAM,GAAKF,EAAO,KACxC,QAASA,EAAQ,CACnBC,EAAW,CAAE,EACb,QAASE,KAAYH,EACTG,IAAV,QAAuBF,EAASE,CAAQ,EAAIH,EAAOG,CAAQ,EAC9D,MAAMF,EAAWD,EAClB,OAAAA,EAASC,EAAS,IACX,CACL,SAAUL,EACV,KAAMG,EACN,IAAKG,EACL,IAAgBF,IAAX,OAAoBA,EAAS,KAClC,MAAOC,CACR,CACH,CACAG,OAAAA,EAAA,UAAA,SAAmBP,EACnBO,EAAA,UAAA,IAAcN,EACdM,EAAA,UAAA,KAAeN","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs33.js","sources":["../../../node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.production.min.js"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var f=require(\"react\"),k=Symbol.for(\"react.element\"),l=Symbol.for(\"react.fragment\"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};\nfunction q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=\"\"+g);void 0!==a.key&&(e=\"\"+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;\n"],"names":["require$$0","k","m","n","p","q","c","a","g","b","d","e","h","reactJsxRuntime_production_min"],"mappings":";;;;;;;;kDASa,IAAI,EAAEA,EAAiBC,EAAE,OAAO,IAAI,eAAe,EAAE,EAAE,OAAO,IAAI,gBAAgB,EAAEC,EAAE,OAAO,UAAU,eAAeC,EAAE,EAAE,mDAAmD,kBAAkBC,EAAE,CAAC,IAAI,GAAG,IAAI,GAAG,OAAO,GAAG,SAAS,EAAE,EAClP,SAASC,EAAEC,EAAEC,EAAEC,EAAE,CAAC,IAAIC,EAAEC,EAAE,CAAE,EAACC,EAAE,KAAKC,EAAE,KAAcJ,IAAT,SAAaG,EAAE,GAAGH,GAAYD,EAAE,MAAX,SAAiBI,EAAE,GAAGJ,EAAE,KAAcA,EAAE,MAAX,SAAiBK,EAAEL,EAAE,KAAK,IAAIE,KAAKF,EAAEL,EAAE,KAAKK,EAAEE,CAAC,GAAG,CAACL,EAAE,eAAeK,CAAC,IAAIC,EAAED,CAAC,EAAEF,EAAEE,CAAC,GAAG,GAAGH,GAAGA,EAAE,aAAa,IAAIG,KAAKF,EAAED,EAAE,aAAaC,EAAWG,EAAED,CAAC,IAAZ,SAAgBC,EAAED,CAAC,EAAEF,EAAEE,CAAC,GAAG,MAAM,CAAC,SAASR,EAAE,KAAKK,EAAE,IAAIK,EAAE,IAAIC,EAAE,MAAMF,EAAE,OAAOP,EAAE,OAAO,CAAC,CAACU,OAAAA,qBAAiB,EAAEA,YAAW,IAACR,EAAEQ,YAAA,KAAaR","x_google_ignoreList":[0]}
@@ -1,24 +1,23 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const _=require("./index.cjs54.js"),Te=require("react");/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("./index.cjs54.js"),ir=require("react");/**
2
2
  * @license React
3
3
  * react-jsx-runtime.development.js
4
4
  *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
6
  *
7
7
  * This source code is licensed under the MIT license found in the
8
8
  * LICENSE file in the root directory of this source tree.
9
- */var ue;function we(){return ue||(ue=1,process.env.NODE_ENV!=="production"&&function(){function s(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===me?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case h:return"Fragment";case de:return"Portal";case H:return"Profiler";case G:return"StrictMode";case p:return"Suspense";case x:return"SuspenseList"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case X:return(e.displayName||"Context")+".Provider";case K:return(e._context.displayName||"Context")+".Consumer";case j:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case A:return r=e.displayName||null,r!==null?r:s(e.type)||"Memo";case R:r=e._payload,e=e._init;try{return s(e(r))}catch{}}return null}function M(e){return""+e}function W(e){try{M(e);var r=!1}catch{r=!0}if(r){r=console;var o=r.error,n=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return o.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",n),M(e)}}function $(){}function le(){if(g===0){Z=console.log,F=console.info,I=console.warn,L=console.error,Q=console.group,D=console.groupCollapsed,ee=console.groupEnd;var e={configurable:!0,enumerable:!0,value:$,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}g++}function fe(){if(g--,g===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:v({},e,{value:Z}),info:v({},e,{value:F}),warn:v({},e,{value:I}),error:v({},e,{value:L}),group:v({},e,{value:Q}),groupCollapsed:v({},e,{value:D}),groupEnd:v({},e,{value:ee})})}0>g&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function y(e){if(N===void 0)try{throw Error()}catch(o){var r=o.stack.trim().match(/\n( *(at )?)/);N=r&&r[1]||"",re=-1<o.stack.indexOf(`
10
- at`)?" (<anonymous>)":-1<o.stack.indexOf("@")?"@unknown:0:0":""}return`
11
- `+N+e+re}function U(e,r){if(!e||P)return"";var o=Y.get(e);if(o!==void 0)return o;P=!0,o=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var n=null;n=E.H,E.H=null,le();try{var u={DetermineComponentFrameRoot:function(){try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(c){var T=c}Reflect.construct(e,[],i)}else{try{i.call()}catch(c){T=c}e.call(i.prototype)}}else{try{throw Error()}catch(c){T=c}(i=e())&&typeof i.catch=="function"&&i.catch(function(){})}}catch(c){if(c&&T&&typeof c.stack=="string")return[c.stack,T.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var a=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");a&&a.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var t=u.DetermineComponentFrameRoot(),f=t[0],d=t[1];if(f&&d){var l=f.split(`
12
- `),b=d.split(`
13
- `);for(t=a=0;a<l.length&&!l[a].includes("DetermineComponentFrameRoot");)a++;for(;t<b.length&&!b[t].includes("DetermineComponentFrameRoot");)t++;if(a===l.length||t===b.length)for(a=l.length-1,t=b.length-1;1<=a&&0<=t&&l[a]!==b[t];)t--;for(;1<=a&&0<=t;a--,t--)if(l[a]!==b[t]){if(a!==1||t!==1)do if(a--,t--,0>t||l[a]!==b[t]){var m=`
14
- `+l[a].replace(" at new "," at ");return e.displayName&&m.includes("<anonymous>")&&(m=m.replace("<anonymous>",e.displayName)),typeof e=="function"&&Y.set(e,m),m}while(1<=a&&0<=t);break}}}finally{P=!1,E.H=n,fe(),Error.prepareStackTrace=o}return l=(l=e?e.displayName||e.name:"")?y(l):"",typeof e=="function"&&Y.set(e,l),l}function w(e){if(e==null)return"";if(typeof e=="function"){var r=e.prototype;return U(e,!(!r||!r.isReactComponent))}if(typeof e=="string")return y(e);switch(e){case p:return y("Suspense");case x:return y("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case j:return e=U(e.render,!1),e;case A:return w(e.type);case R:r=e._payload,e=e._init;try{return w(e(r))}catch{}}return""}function C(){var e=E.A;return e===null?null:e.getOwner()}function ce(e){if(J.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function se(e,r){function o(){oe||(oe=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",r))}o.isReactWarning=!0,Object.defineProperty(e,"key",{get:o,configurable:!0})}function ie(){var e=s(this.type);return te[e]||(te[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function Ee(e,r,o,n,u,a){return o=a.ref,e={$$typeof:S,type:e,key:r,props:a,_owner:u},(o!==void 0?o:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:ie}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function z(e,r,o,n,u,a){if(typeof e=="string"||typeof e=="function"||e===h||e===H||e===G||e===p||e===x||e===ge||typeof e=="object"&&e!==null&&(e.$$typeof===R||e.$$typeof===A||e.$$typeof===X||e.$$typeof===K||e.$$typeof===j||e.$$typeof===_e||e.getModuleId!==void 0)){var t=r.children;if(t!==void 0)if(n)if(k(t)){for(n=0;n<t.length;n++)q(t[n],e);Object.freeze&&Object.freeze(t)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else q(t,e)}else t="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(t+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?n="null":k(e)?n="array":e!==void 0&&e.$$typeof===S?(n="<"+(s(e.type)||"Unknown")+" />",t=" Did you accidentally export a JSX literal instead of a component?"):n=typeof e,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",n,t);if(J.call(r,"key")){t=s(e);var f=Object.keys(r).filter(function(l){return l!=="key"});n=0<f.length?"{key: someKey, "+f.join(": ..., ")+": ...}":"{key: someKey}",ne[t+n]||(f=0<f.length?"{"+f.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
9
+ */var Ee;function or(){return Ee||(Ee=1,process.env.NODE_ENV!=="production"&&function(){var ye=ir,x=Symbol.for("react.element"),_e=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),U=Symbol.for("react.strict_mode"),B=Symbol.for("react.profiler"),K=Symbol.for("react.provider"),N=Symbol.for("react.context"),S=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),C=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),Re=Symbol.for("react.offscreen"),q=Symbol.iterator,me="@@iterator";function Te(e){if(e===null||typeof e!="object")return null;var r=q&&e[q]||e[me];return typeof r=="function"?r:null}var h=ye.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n<r;n++)t[n-1]=arguments[n];Se("error",e,t)}}function Se(e,r,t){{var n=h.ReactDebugCurrentFrame,o=n.getStackAddendum();o!==""&&(r+="%s",t=t.concat([o]));var u=t.map(function(i){return String(i)});u.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,u)}}var Ce=!1,Oe=!1,Pe=!1,we=!1,je=!1,G;G=Symbol.for("react.module.reference");function xe(e){return!!(typeof e=="string"||typeof e=="function"||e===T||e===B||je||e===U||e===k||e===D||we||e===Re||Ce||Oe||Pe||typeof e=="object"&&e!==null&&(e.$$typeof===F||e.$$typeof===C||e.$$typeof===K||e.$$typeof===N||e.$$typeof===S||e.$$typeof===G||e.getModuleId!==void 0))}function ke(e,r,t){var n=e.displayName;if(n)return n;var o=r.displayName||r.name||"";return o!==""?t+"("+o+")":t}function J(e){return e.displayName||"Context"}function p(e){if(e==null)return null;if(typeof e.tag=="number"&&f("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case _e:return"Portal";case B:return"Profiler";case U:return"StrictMode";case k:return"Suspense";case D:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case N:var r=e;return J(r)+".Consumer";case K:var t=e;return J(t._context)+".Provider";case S:return ke(e,e.render,"ForwardRef");case C:var n=e.displayName||null;return n!==null?n:p(e.type)||"Memo";case F:{var o=e,u=o._payload,i=o._init;try{return p(i(u))}catch{return null}}}return null}var g=Object.assign,_=0,z,X,H,Z,Q,ee,re;function te(){}te.__reactDisabledLog=!0;function De(){{if(_===0){z=console.log,X=console.info,H=console.warn,Z=console.error,Q=console.group,ee=console.groupCollapsed,re=console.groupEnd;var e={configurable:!0,enumerable:!0,value:te,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}_++}}function Fe(){{if(_--,_===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:g({},e,{value:z}),info:g({},e,{value:X}),warn:g({},e,{value:H}),error:g({},e,{value:Z}),group:g({},e,{value:Q}),groupCollapsed:g({},e,{value:ee}),groupEnd:g({},e,{value:re})})}_<0&&f("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var A=h.ReactCurrentDispatcher,I;function O(e,r,t){{if(I===void 0)try{throw Error()}catch(o){var n=o.stack.trim().match(/\n( *(at )?)/);I=n&&n[1]||""}return`
10
+ `+I+e}}var W=!1,P;{var Ae=typeof WeakMap=="function"?WeakMap:Map;P=new Ae}function ne(e,r){if(!e||W)return"";{var t=P.get(e);if(t!==void 0)return t}var n;W=!0;var o=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var u;u=A.current,A.current=null,De();try{if(r){var i=function(){throw Error()};if(Object.defineProperty(i.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(i,[])}catch(v){n=v}Reflect.construct(e,[],i)}else{try{i.call()}catch(v){n=v}e.call(i.prototype)}}else{try{throw Error()}catch(v){n=v}e()}}catch(v){if(v&&n&&typeof v.stack=="string"){for(var a=v.stack.split(`
11
+ `),c=n.stack.split(`
12
+ `),s=a.length-1,l=c.length-1;s>=1&&l>=0&&a[s]!==c[l];)l--;for(;s>=1&&l>=0;s--,l--)if(a[s]!==c[l]){if(s!==1||l!==1)do if(s--,l--,l<0||a[s]!==c[l]){var d=`
13
+ `+a[s].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),typeof e=="function"&&P.set(e,d),d}while(s>=1&&l>=0);break}}}finally{W=!1,A.current=u,Fe(),Error.prepareStackTrace=o}var y=e?e.displayName||e.name:"",b=y?O(y):"";return typeof e=="function"&&P.set(e,b),b}function Ie(e,r,t){return ne(e,!1)}function We(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function w(e,r,t){if(e==null)return"";if(typeof e=="function")return ne(e,We(e));if(typeof e=="string")return O(e);switch(e){case k:return O("Suspense");case D:return O("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case S:return Ie(e.render);case C:return w(e.type,r,t);case F:{var n=e,o=n._payload,u=n._init;try{return w(u(o),r,t)}catch{}}}return""}var R=Object.prototype.hasOwnProperty,ae={},ie=h.ReactDebugCurrentFrame;function j(e){if(e){var r=e._owner,t=w(e.type,e._source,r?r.type:null);ie.setExtraStackFrame(t)}else ie.setExtraStackFrame(null)}function Ye(e,r,t,n,o){{var u=Function.call.bind(R);for(var i in e)if(u(e,i)){var a=void 0;try{if(typeof e[i]!="function"){var c=Error((n||"React class")+": "+t+" type `"+i+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[i]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw c.name="Invariant Violation",c}a=e[i](r,i,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(s){a=s}a&&!(a instanceof Error)&&(j(o),f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,i,typeof a),j(null)),a instanceof Error&&!(a.message in ae)&&(ae[a.message]=!0,j(o),f("Failed %s type: %s",t,a.message),j(null))}}}var $e=Array.isArray;function Y(e){return $e(e)}function Me(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ve(e){try{return oe(e),!1}catch{return!0}}function oe(e){return""+e}function ue(e){if(Ve(e))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Me(e)),oe(e)}var se=h.ReactCurrentOwner,Le={key:!0,ref:!0,__self:!0,__source:!0},le,fe;function Ue(e){if(R.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Be(e){if(R.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function Ke(e,r){typeof e.ref=="string"&&se.current}function Ne(e,r){{var t=function(){le||(le=!0,f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function qe(e,r){{var t=function(){fe||(fe=!0,f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var Ge=function(e,r,t,n,o,u,i){var a={$$typeof:x,type:e,key:r,ref:t,props:i,_owner:u};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:o}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function Je(e,r,t,n,o){{var u,i={},a=null,c=null;t!==void 0&&(ue(t),a=""+t),Be(r)&&(ue(r.key),a=""+r.key),Ue(r)&&(c=r.ref,Ke(r,o));for(u in r)R.call(r,u)&&!Le.hasOwnProperty(u)&&(i[u]=r[u]);if(e&&e.defaultProps){var s=e.defaultProps;for(u in s)i[u]===void 0&&(i[u]=s[u])}if(a||c){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&Ne(i,l),c&&qe(i,l)}return Ge(e,a,c,o,n,se.current,i)}}var $=h.ReactCurrentOwner,ce=h.ReactDebugCurrentFrame;function E(e){if(e){var r=e._owner,t=w(e.type,e._source,r?r.type:null);ce.setExtraStackFrame(t)}else ce.setExtraStackFrame(null)}var M;M=!1;function V(e){return typeof e=="object"&&e!==null&&e.$$typeof===x}function ve(){{if($.current){var e=p($.current.type);if(e)return`
14
+
15
+ Check the render method of \``+e+"`."}return""}}function ze(e){return""}var de={};function Xe(e){{var r=ve();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
16
+
17
+ Check the top-level render call using <`+t+">.")}return r}}function pe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=Xe(r);if(de[t])return;de[t]=!0;var n="";e&&e._owner&&e._owner!==$.current&&(n=" It was passed a child from "+p(e._owner.type)+"."),E(e),f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),E(null)}}function ge(e,r){{if(typeof e!="object")return;if(Y(e))for(var t=0;t<e.length;t++){var n=e[t];V(n)&&pe(n,r)}else if(V(e))e._store&&(e._store.validated=!0);else if(e){var o=Te(e);if(typeof o=="function"&&o!==e.entries)for(var u=o.call(e),i;!(i=u.next()).done;)V(i.value)&&pe(i.value,r)}}}function He(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===S||r.$$typeof===C))t=r.propTypes;else return;if(t){var n=p(r);Ye(t,e.props,"prop",n,e)}else if(r.PropTypes!==void 0&&!M){M=!0;var o=p(r);f("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",o||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&f("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function Ze(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var n=r[t];if(n!=="children"&&n!=="key"){E(e),f("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",n),E(null);break}}e.ref!==null&&(E(e),f("Invalid attribute `ref` supplied to `React.Fragment`."),E(null))}}var be={};function he(e,r,t,n,o,u){{var i=xe(e);if(!i){var a="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(a+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var c=ze();c?a+=c:a+=ve();var s;e===null?s="null":Y(e)?s="array":e!==void 0&&e.$$typeof===x?(s="<"+(p(e.type)||"Unknown")+" />",a=" Did you accidentally export a JSX literal instead of a component?"):s=typeof e,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",s,a)}var l=Je(e,r,t,o,u);if(l==null)return l;if(i){var d=r.children;if(d!==void 0)if(n)if(Y(d)){for(var y=0;y<d.length;y++)ge(d[y],e);Object.freeze&&Object.freeze(d)}else f("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else ge(d,e)}if(R.call(r,"key")){var b=p(e),v=Object.keys(r).filter(function(ar){return ar!=="key"}),L=v.length>0?"{key: someKey, "+v.join(": ..., ")+": ...}":"{key: someKey}";if(!be[b+L]){var nr=v.length>0?"{"+v.join(": ..., ")+": ...}":"{}";f(`A props object containing a "key" prop is being spread into JSX:
15
18
  let props = %s;
16
19
  <%s {...props} />
17
20
  React keys must be passed directly to JSX without using spread:
18
21
  let props = %s;
19
- <%s key={someKey} {...props} />`,n,t,f,t),ne[t+n]=!0)}if(t=null,o!==void 0&&(W(o),t=""+o),ce(r)&&(W(r.key),t=""+r.key),"key"in r){o={};for(var d in r)d!=="key"&&(o[d]=r[d])}else o=r;return t&&se(o,typeof e=="function"?e.displayName||e.name||"Unknown":e),Ee(e,t,a,u,C(),o)}function q(e,r){if(typeof e=="object"&&e&&e.$$typeof!==ye){if(k(e))for(var o=0;o<e.length;o++){var n=e[o];O(n)&&V(n,r)}else if(O(e))e._store&&(e._store.validated=1);else if(e===null||typeof e!="object"?o=null:(o=B&&e[B]||e["@@iterator"],o=typeof o=="function"?o:null),typeof o=="function"&&o!==e.entries&&(o=o.call(e),o!==e))for(;!(e=o.next()).done;)O(e.value)&&V(e.value,r)}}function O(e){return typeof e=="object"&&e!==null&&e.$$typeof===S}function V(e,r){if(e._store&&!e._store.validated&&e.key==null&&(e._store.validated=1,r=ve(r),!ae[r])){ae[r]=!0;var o="";e&&e._owner!=null&&e._owner!==C()&&(o=null,typeof e._owner.tag=="number"?o=s(e._owner.type):typeof e._owner.name=="string"&&(o=e._owner.name),o=" It was passed a child from "+o+".");var n=E.getCurrentStack;E.getCurrentStack=function(){var u=w(e.type);return n&&(u+=n()||""),u},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',r,o),E.getCurrentStack=n}}function ve(e){var r="",o=C();return o&&(o=s(o.type))&&(r=`
20
-
21
- Check the render method of \``+o+"`."),r||(e=s(e))&&(r=`
22
-
23
- Check the top-level render call using <`+e+">."),r}var be=Te,S=Symbol.for("react.transitional.element"),de=Symbol.for("react.portal"),h=Symbol.for("react.fragment"),G=Symbol.for("react.strict_mode"),H=Symbol.for("react.profiler"),K=Symbol.for("react.consumer"),X=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),R=Symbol.for("react.lazy"),ge=Symbol.for("react.offscreen"),B=Symbol.iterator,me=Symbol.for("react.client.reference"),E=be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,J=Object.prototype.hasOwnProperty,v=Object.assign,_e=Symbol.for("react.client.reference"),k=Array.isArray,g=0,Z,F,I,L,Q,D,ee;$.__reactDisabledLog=!0;var N,re,P=!1,Y=new(typeof WeakMap=="function"?WeakMap:Map),ye=Symbol.for("react.client.reference"),oe,te={},ne={},ae={};_.__exports.Fragment=h,_.__exports.jsx=function(e,r,o,n,u){return z(e,r,o,!1,n,u)},_.__exports.jsxs=function(e,r,o,n,u){return z(e,r,o,!0,n,u)}}()),_.__exports}exports.__require=we;
22
+ <%s key={someKey} {...props} />`,L,b,nr,b),be[b+L]=!0}}return e===T?Ze(l):He(l),l}}function Qe(e,r,t){return he(e,r,t,!0)}function er(e,r,t){return he(e,r,t,!1)}var rr=er,tr=Qe;m.__exports.Fragment=T,m.__exports.jsx=rr,m.__exports.jsxs=tr}()),m.__exports}exports.__require=or;
24
23
  //# sourceMappingURL=index.cjs34.js.map