@app-studio/components 0.11.13 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1033) hide show
  1. package/README.md +8 -1
  2. package/compiler/vite.d.mts +5 -0
  3. package/compiler/vite.mjs +190 -0
  4. package/dist/alert.cjs.js +2 -0
  5. package/dist/alert.cjs.js.map +1 -0
  6. package/dist/alert.esm.d.mts +1 -0
  7. package/dist/alert.esm.mjs +5 -0
  8. package/dist/alert.esm.mjs.map +1 -0
  9. package/dist/avatar.cjs.js +2 -0
  10. package/dist/avatar.cjs.js.map +1 -0
  11. package/dist/avatar.esm.d.mts +1 -0
  12. package/dist/avatar.esm.mjs +5 -0
  13. package/dist/avatar.esm.mjs.map +1 -0
  14. package/dist/button.cjs.js +2 -0
  15. package/dist/button.cjs.js.map +1 -0
  16. package/dist/button.esm.d.mts +1 -0
  17. package/dist/button.esm.mjs +5 -0
  18. package/dist/button.esm.mjs.map +1 -0
  19. package/dist/card.cjs.js +2 -0
  20. package/dist/card.cjs.js.map +1 -0
  21. package/dist/card.esm.d.mts +1 -0
  22. package/dist/card.esm.mjs +5 -0
  23. package/dist/card.esm.mjs.map +1 -0
  24. package/dist/checkbox.cjs.js +2 -0
  25. package/dist/checkbox.cjs.js.map +1 -0
  26. package/dist/checkbox.esm.d.mts +1 -0
  27. package/dist/checkbox.esm.mjs +5 -0
  28. package/dist/checkbox.esm.mjs.map +1 -0
  29. package/dist/chunks/Alert-Bjl40k3x.cjs +2 -0
  30. package/dist/chunks/Alert-Bjl40k3x.cjs.map +1 -0
  31. package/dist/chunks/Alert-Q1HlVX8f.mjs +179 -0
  32. package/dist/chunks/Alert-Q1HlVX8f.mjs.map +1 -0
  33. package/dist/chunks/AttachmentPreview-8d8gZ5kk.mjs +7777 -0
  34. package/dist/chunks/AttachmentPreview-8d8gZ5kk.mjs.map +1 -0
  35. package/dist/chunks/AttachmentPreview-Bwrz5TJh.cjs +2 -0
  36. package/dist/chunks/AttachmentPreview-Bwrz5TJh.cjs.map +1 -0
  37. package/dist/chunks/Avatar-BB0DeN9j.cjs +2 -0
  38. package/dist/chunks/Avatar-BB0DeN9j.cjs.map +1 -0
  39. package/dist/chunks/Avatar-D-GkyL2c.mjs +103 -0
  40. package/dist/chunks/Avatar-D-GkyL2c.mjs.map +1 -0
  41. package/dist/chunks/Button.core-Bc5cSn_z.mjs +717 -0
  42. package/dist/chunks/Button.core-Bc5cSn_z.mjs.map +1 -0
  43. package/dist/chunks/Button.core-BhtOm8ak.cjs +7 -0
  44. package/dist/chunks/Button.core-BhtOm8ak.cjs.map +1 -0
  45. package/dist/chunks/Button.pilot-C4BIb08S.mjs +6 -0
  46. package/dist/chunks/Button.pilot-C4BIb08S.mjs.map +1 -0
  47. package/dist/chunks/Button.pilot-JmR2DCSE.cjs +2 -0
  48. package/dist/chunks/Button.pilot-JmR2DCSE.cjs.map +1 -0
  49. package/dist/chunks/Card-CNSl9fD5.cjs +2 -0
  50. package/dist/chunks/Card-CNSl9fD5.cjs.map +1 -0
  51. package/dist/chunks/Card-DMhV_NTt.mjs +200 -0
  52. package/dist/chunks/Card-DMhV_NTt.mjs.map +1 -0
  53. package/dist/chunks/Checkbox-Bo7IRVRE.mjs +11 -0
  54. package/dist/chunks/Checkbox-Bo7IRVRE.mjs.map +1 -0
  55. package/dist/chunks/Checkbox-CAI6RtuO.cjs +2 -0
  56. package/dist/chunks/Checkbox-CAI6RtuO.cjs.map +1 -0
  57. package/dist/chunks/Checkbox.view-DGdNPlF9.cjs +2 -0
  58. package/dist/chunks/Checkbox.view-DGdNPlF9.cjs.map +1 -0
  59. package/dist/chunks/Checkbox.view-dhc-rfEX.mjs +308 -0
  60. package/dist/chunks/Checkbox.view-dhc-rfEX.mjs.map +1 -0
  61. package/dist/chunks/FieldWrapper-Bb0j8Iog.mjs +252 -0
  62. package/dist/chunks/FieldWrapper-Bb0j8Iog.mjs.map +1 -0
  63. package/dist/chunks/FieldWrapper-DRCn7BLi.cjs +2 -0
  64. package/dist/chunks/FieldWrapper-DRCn7BLi.cjs.map +1 -0
  65. package/dist/chunks/FixedIcons-Dz_f-yDL.cjs +2 -0
  66. package/dist/chunks/FixedIcons-Dz_f-yDL.cjs.map +1 -0
  67. package/dist/chunks/FixedIcons-fxASFYew.mjs +37 -0
  68. package/dist/chunks/FixedIcons-fxASFYew.mjs.map +1 -0
  69. package/dist/chunks/Formik.Uploader-D0nzjyau.cjs +22 -0
  70. package/dist/chunks/Formik.Uploader-D0nzjyau.cjs.map +1 -0
  71. package/dist/chunks/Formik.Uploader-DRIyxMI0.mjs +6962 -0
  72. package/dist/chunks/Formik.Uploader-DRIyxMI0.mjs.map +1 -0
  73. package/dist/chunks/Icon-C37alecH.cjs +2 -0
  74. package/dist/chunks/Icon-C37alecH.cjs.map +1 -0
  75. package/dist/chunks/Icon-DrAZswNH.mjs +148 -0
  76. package/dist/chunks/Icon-DrAZswNH.mjs.map +1 -0
  77. package/dist/chunks/Icon.frame-COrb0u94.mjs +29 -0
  78. package/dist/chunks/Icon.frame-COrb0u94.mjs.map +1 -0
  79. package/dist/chunks/Icon.frame-DD6ycsWD.cjs +2 -0
  80. package/dist/chunks/Icon.frame-DD6ycsWD.cjs.map +1 -0
  81. package/dist/chunks/Label-BVEAujj2.mjs +83 -0
  82. package/dist/chunks/Label-BVEAujj2.mjs.map +1 -0
  83. package/dist/chunks/Label-Bd0TpfkG.cjs +2 -0
  84. package/dist/chunks/Label-Bd0TpfkG.cjs.map +1 -0
  85. package/dist/chunks/Loader-4V81BN95.cjs +2 -0
  86. package/dist/chunks/Loader-4V81BN95.cjs.map +1 -0
  87. package/dist/chunks/Loader-DMLQky1k.mjs +171 -0
  88. package/dist/chunks/Loader-DMLQky1k.mjs.map +1 -0
  89. package/dist/chunks/Modal-DkckCT8-.mjs +339 -0
  90. package/dist/chunks/Modal-DkckCT8-.mjs.map +1 -0
  91. package/dist/chunks/Modal-zok954As.cjs +2 -0
  92. package/dist/chunks/Modal-zok954As.cjs.map +1 -0
  93. package/dist/chunks/Router-DjmVh9pK.cjs +2 -0
  94. package/dist/chunks/Router-DjmVh9pK.cjs.map +1 -0
  95. package/dist/chunks/Router-Dtb8HvI0.mjs +76 -0
  96. package/dist/chunks/Router-Dtb8HvI0.mjs.map +1 -0
  97. package/dist/chunks/Router.store-Bxe2uZWk.cjs +2 -0
  98. package/dist/chunks/Router.store-Bxe2uZWk.cjs.map +1 -0
  99. package/dist/chunks/Router.store-C0zWd45T.mjs +27 -0
  100. package/dist/chunks/Router.store-C0zWd45T.mjs.map +1 -0
  101. package/dist/chunks/Select-C6R0Tei-.cjs +2 -0
  102. package/dist/chunks/Select-C6R0Tei-.cjs.map +1 -0
  103. package/dist/chunks/Select-C7IBNyjR.mjs +24 -0
  104. package/dist/chunks/Select-C7IBNyjR.mjs.map +1 -0
  105. package/dist/chunks/Select.view-CPMqT8pn.mjs +659 -0
  106. package/dist/chunks/Select.view-CPMqT8pn.mjs.map +1 -0
  107. package/dist/chunks/Select.view-Pq1yAcMm.cjs +2 -0
  108. package/dist/chunks/Select.view-Pq1yAcMm.cjs.map +1 -0
  109. package/dist/chunks/Switch-D80yPNFV.cjs +2 -0
  110. package/dist/chunks/Switch-D80yPNFV.cjs.map +1 -0
  111. package/dist/chunks/Switch-DWx1g3jT.mjs +11 -0
  112. package/dist/chunks/Switch-DWx1g3jT.mjs.map +1 -0
  113. package/dist/chunks/Switch.view-CQZO_Js7.cjs +2 -0
  114. package/dist/chunks/Switch.view-CQZO_Js7.cjs.map +1 -0
  115. package/dist/chunks/Switch.view-QLZ7O5Z7.mjs +315 -0
  116. package/dist/chunks/Switch.view-QLZ7O5Z7.mjs.map +1 -0
  117. package/dist/chunks/Tabs-D5chMrkE.mjs +403 -0
  118. package/dist/chunks/Tabs-D5chMrkE.mjs.map +1 -0
  119. package/dist/chunks/Tabs-DQeBJwkz.cjs +2 -0
  120. package/dist/chunks/Tabs-DQeBJwkz.cjs.map +1 -0
  121. package/dist/chunks/TextField-DOU2CL5J.mjs +266 -0
  122. package/dist/chunks/TextField-DOU2CL5J.mjs.map +1 -0
  123. package/dist/chunks/TextField-Da4JCcAU.cjs +2 -0
  124. package/dist/chunks/TextField-Da4JCcAU.cjs.map +1 -0
  125. package/dist/chunks/default-D7ePSMKP.cjs +2 -0
  126. package/dist/chunks/default-D7ePSMKP.cjs.map +1 -0
  127. package/dist/chunks/default-nRKhMTzF.mjs +610 -0
  128. package/dist/chunks/default-nRKhMTzF.mjs.map +1 -0
  129. package/dist/chunks/designSystem.page-B74Vm2Dt.cjs +11 -0
  130. package/dist/chunks/designSystem.page-B74Vm2Dt.cjs.map +1 -0
  131. package/dist/chunks/designSystem.page-K0ajTvy7.mjs +13119 -0
  132. package/dist/chunks/designSystem.page-K0ajTvy7.mjs.map +1 -0
  133. package/dist/design-system-preview.cjs.js +2 -0
  134. package/dist/design-system-preview.cjs.js.map +1 -0
  135. package/dist/design-system-preview.esm.d.mts +1 -0
  136. package/dist/design-system-preview.esm.mjs +30 -0
  137. package/dist/design-system-preview.esm.mjs.map +1 -0
  138. package/dist/formik.cjs.js +2 -0
  139. package/dist/formik.cjs.js.map +1 -0
  140. package/dist/formik.esm.d.mts +1 -0
  141. package/dist/formik.esm.mjs +28 -0
  142. package/dist/formik.esm.mjs.map +1 -0
  143. package/dist/link.cjs.js +2 -0
  144. package/dist/link.cjs.js.map +1 -0
  145. package/dist/link.esm.d.mts +1 -0
  146. package/dist/link.esm.mjs +78 -0
  147. package/dist/link.esm.mjs.map +1 -0
  148. package/dist/modal.cjs.js +2 -0
  149. package/dist/modal.cjs.js.map +1 -0
  150. package/dist/modal.esm.d.mts +1 -0
  151. package/dist/modal.esm.mjs +10 -0
  152. package/dist/modal.esm.mjs.map +1 -0
  153. package/dist/native/components/Accordion/Accordion/Accordion.view.js +1 -1
  154. package/dist/native/components/Accordion/Accordion/Accordion.view.js.map +1 -1
  155. package/dist/native/components/Accordion/Accordion/Accordion.view.native.js +1 -1
  156. package/dist/native/components/Accordion/Accordion/Accordion.view.native.js.map +1 -1
  157. package/dist/native/components/Accordion/Accordion.js +1 -1
  158. package/dist/native/components/Accordion/Accordion.js.map +1 -1
  159. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.native.js +1 -1
  160. package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.native.js.map +1 -1
  161. package/dist/native/components/Alert/Alert/Alert.view.js +1 -1
  162. package/dist/native/components/Alert/Alert/Alert.view.js.map +1 -1
  163. package/dist/native/components/Alert/Alert/Alert.view.native.js +9 -2
  164. package/dist/native/components/Alert/Alert/Alert.view.native.js.map +1 -1
  165. package/dist/native/components/Alert/Alert.js +1 -1
  166. package/dist/native/components/Alert/Alert.js.map +1 -1
  167. package/dist/native/components/Avatar/Avatar.js +1 -1
  168. package/dist/native/components/Avatar/Avatar.js.map +1 -1
  169. package/dist/native/components/Badge/Badge.js +1 -1
  170. package/dist/native/components/Badge/Badge.js.map +1 -1
  171. package/dist/native/components/Button/Button/Button.style.js.map +1 -1
  172. package/dist/native/components/Button/Button/Button.view.d.ts +4 -1
  173. package/dist/native/components/Button/Button/Button.view.js +7 -5
  174. package/dist/native/components/Button/Button/Button.view.js.map +1 -1
  175. package/dist/native/components/Button/Button/Button.view.native.d.ts +4 -1
  176. package/dist/native/components/Button/Button/Button.view.native.js +14 -4
  177. package/dist/native/components/Button/Button/Button.view.native.js.map +1 -1
  178. package/dist/native/components/Button/Button.core.d.ts +4 -0
  179. package/dist/native/components/Button/Button.core.js +39 -0
  180. package/dist/native/components/Button/Button.core.js.map +1 -0
  181. package/dist/native/components/Button/Button.d.ts +1 -3
  182. package/dist/native/components/Button/Button.js +3 -36
  183. package/dist/native/components/Button/Button.js.map +1 -1
  184. package/dist/native/components/Button/Button.pilot.d.ts +2 -0
  185. package/dist/native/components/Button/Button.pilot.js +3 -0
  186. package/dist/native/components/Button/Button.pilot.js.map +1 -0
  187. package/dist/native/components/Card/Card.js +1 -1
  188. package/dist/native/components/Card/Card.js.map +1 -1
  189. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.js +1 -1
  190. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.js.map +1 -1
  191. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.native.js +1 -1
  192. package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.native.js.map +1 -1
  193. package/dist/native/components/Form/Checkbox/Checkbox.js +1 -1
  194. package/dist/native/components/Form/Checkbox/Checkbox.js.map +1 -1
  195. package/dist/native/components/Form/Radio/Radio.js +1 -1
  196. package/dist/native/components/Form/Radio/Radio.js.map +1 -1
  197. package/dist/native/components/Form/Select/Select/Select.view.js +1 -1
  198. package/dist/native/components/Form/Select/Select/Select.view.js.map +1 -1
  199. package/dist/native/components/Form/Select/Select/Select.view.native.js +2 -2
  200. package/dist/native/components/Form/Select/Select/Select.view.native.js.map +1 -1
  201. package/dist/native/components/Form/Select/Select.js +1 -1
  202. package/dist/native/components/Form/Select/Select.js.map +1 -1
  203. package/dist/native/components/Form/Switch/Switch.js +1 -1
  204. package/dist/native/components/Form/Switch/Switch.js.map +1 -1
  205. package/dist/native/components/Form/TextArea/TextArea.js +1 -1
  206. package/dist/native/components/Form/TextArea/TextArea.js.map +1 -1
  207. package/dist/native/components/Form/TextField/TextField/TextField.view.js +1 -1
  208. package/dist/native/components/Form/TextField/TextField/TextField.view.js.map +1 -1
  209. package/dist/native/components/Form/TextField/TextField/TextField.view.native.js +5 -9
  210. package/dist/native/components/Form/TextField/TextField/TextField.view.native.js.map +1 -1
  211. package/dist/native/components/Form/TextField/TextField.js +1 -1
  212. package/dist/native/components/Form/TextField/TextField.js.map +1 -1
  213. package/dist/native/components/Icon/FixedIcons.d.ts +10 -0
  214. package/dist/native/components/Icon/FixedIcons.js +23 -0
  215. package/dist/native/components/Icon/FixedIcons.js.map +1 -0
  216. package/dist/native/components/Icon/FixedIcons.native.d.ts +17 -0
  217. package/dist/native/components/Icon/FixedIcons.native.js +30 -0
  218. package/dist/native/components/Icon/FixedIcons.native.js.map +1 -0
  219. package/dist/native/components/Icon/Icon.d.ts +2 -12
  220. package/dist/native/components/Icon/Icon.frame.d.ts +14 -0
  221. package/dist/native/components/Icon/Icon.frame.js +17 -0
  222. package/dist/native/components/Icon/Icon.frame.js.map +1 -0
  223. package/dist/native/components/Icon/Icon.js +11 -23
  224. package/dist/native/components/Icon/Icon.js.map +1 -1
  225. package/dist/native/components/Loader/Loader.js +1 -1
  226. package/dist/native/components/Loader/Loader.js.map +1 -1
  227. package/dist/native/components/Modal/Modal/Modal.props.d.ts +3 -0
  228. package/dist/native/components/Modal/Modal/Modal.view.js +45 -14
  229. package/dist/native/components/Modal/Modal/Modal.view.js.map +1 -1
  230. package/dist/native/components/Modal/Modal/Modal.view.native.js +2 -2
  231. package/dist/native/components/Modal/Modal/Modal.view.native.js.map +1 -1
  232. package/dist/native/components/NavigationMenu/NavigationMenu.js +1 -1
  233. package/dist/native/components/NavigationMenu/NavigationMenu.js.map +1 -1
  234. package/dist/native/components/PageHeader/PageHeader.js +1 -1
  235. package/dist/native/components/PageHeader/PageHeader.js.map +1 -1
  236. package/dist/native/components/ProgressBar/ProgressBar.js +1 -1
  237. package/dist/native/components/ProgressBar/ProgressBar.js.map +1 -1
  238. package/dist/native/components/Separator/Separator.js +1 -1
  239. package/dist/native/components/Separator/Separator.js.map +1 -1
  240. package/dist/native/components/Slider/Slider.js +1 -1
  241. package/dist/native/components/Slider/Slider.js.map +1 -1
  242. package/dist/native/components/StatePanel/StatePanel.js +1 -1
  243. package/dist/native/components/StatePanel/StatePanel.js.map +1 -1
  244. package/dist/native/components/StatusIndicator/StatusIndicator.js +1 -1
  245. package/dist/native/components/StatusIndicator/StatusIndicator.js.map +1 -1
  246. package/dist/native/components/Table/Table.js +1 -1
  247. package/dist/native/components/Table/Table.js.map +1 -1
  248. package/dist/native/components/Tabs/Tabs/Tabs.view.js +1 -1
  249. package/dist/native/components/Tabs/Tabs/Tabs.view.js.map +1 -1
  250. package/dist/native/components/Tabs/Tabs/Tabs.view.native.js +1 -1
  251. package/dist/native/components/Tabs/Tabs/Tabs.view.native.js.map +1 -1
  252. package/dist/native/components/Tabs/Tabs.js +1 -1
  253. package/dist/native/components/Tabs/Tabs.js.map +1 -1
  254. package/dist/native/components/pilot/alert.d.ts +2 -0
  255. package/dist/native/components/pilot/alert.js +2 -0
  256. package/dist/native/components/pilot/alert.js.map +1 -0
  257. package/dist/native/components/pilot/avatar.d.ts +2 -0
  258. package/dist/native/components/pilot/avatar.js +2 -0
  259. package/dist/native/components/pilot/avatar.js.map +1 -0
  260. package/dist/native/components/pilot/blocks/SettingsPanel.d.ts +8 -0
  261. package/dist/native/components/pilot/blocks/SettingsPanel.js +24 -0
  262. package/dist/native/components/pilot/blocks/SettingsPanel.js.map +1 -0
  263. package/dist/native/components/pilot/blocks/SignIn.d.ts +8 -0
  264. package/dist/native/components/pilot/blocks/SignIn.js +55 -0
  265. package/dist/native/components/pilot/blocks/SignIn.js.map +1 -0
  266. package/dist/native/components/pilot/button.d.ts +1 -0
  267. package/dist/native/components/pilot/button.js +2 -0
  268. package/dist/native/components/pilot/button.js.map +1 -0
  269. package/dist/native/components/pilot/card.d.ts +2 -0
  270. package/dist/native/components/pilot/card.js +2 -0
  271. package/dist/native/components/pilot/card.js.map +1 -0
  272. package/dist/native/components/pilot/checkbox.d.ts +2 -0
  273. package/dist/native/components/pilot/checkbox.js +2 -0
  274. package/dist/native/components/pilot/checkbox.js.map +1 -0
  275. package/dist/native/components/pilot/modal.d.ts +2 -0
  276. package/dist/native/components/pilot/modal.js +2 -0
  277. package/dist/native/components/pilot/modal.js.map +1 -0
  278. package/dist/native/components/pilot/select.d.ts +2 -0
  279. package/dist/native/components/pilot/select.js +2 -0
  280. package/dist/native/components/pilot/select.js.map +1 -0
  281. package/dist/native/components/pilot/settings-panel.d.ts +1 -0
  282. package/dist/native/components/pilot/settings-panel.js +2 -0
  283. package/dist/native/components/pilot/settings-panel.js.map +1 -0
  284. package/dist/native/components/pilot/sign-in.d.ts +1 -0
  285. package/dist/native/components/pilot/sign-in.js +2 -0
  286. package/dist/native/components/pilot/sign-in.js.map +1 -0
  287. package/dist/native/components/pilot/switch.d.ts +2 -0
  288. package/dist/native/components/pilot/switch.js +2 -0
  289. package/dist/native/components/pilot/switch.js.map +1 -0
  290. package/dist/native/components/pilot/tabs.d.ts +2 -0
  291. package/dist/native/components/pilot/tabs.js +2 -0
  292. package/dist/native/components/pilot/tabs.js.map +1 -0
  293. package/dist/native/components/pilot/text-field.d.ts +2 -0
  294. package/dist/native/components/pilot/text-field.js +2 -0
  295. package/dist/native/components/pilot/text-field.js.map +1 -0
  296. package/dist/native/design-system/DesignSystemProvider.d.ts +4 -24
  297. package/dist/native/design-system/DesignSystemProvider.js +5 -53
  298. package/dist/native/design-system/DesignSystemProvider.js.map +1 -1
  299. package/dist/native/design-system/theme.d.ts +28 -0
  300. package/dist/native/design-system/theme.js +54 -0
  301. package/dist/native/design-system/theme.js.map +1 -0
  302. package/dist/native/design-system/types.d.ts +8 -2
  303. package/dist/presets.cjs.js +2 -0
  304. package/dist/presets.cjs.js.map +1 -0
  305. package/dist/presets.esm.d.mts +1 -0
  306. package/dist/presets.esm.mjs +10816 -0
  307. package/dist/presets.esm.mjs.map +1 -0
  308. package/dist/registry/alert.json +89 -0
  309. package/dist/registry/avatar.json +78 -0
  310. package/dist/registry/button.json +145 -0
  311. package/dist/registry/card.json +78 -0
  312. package/dist/registry/checkbox.json +131 -0
  313. package/dist/registry/modal.json +111 -0
  314. package/dist/registry/registry.json +1207 -0
  315. package/dist/registry/select.json +246 -0
  316. package/dist/registry/settings-panel.json +51 -0
  317. package/dist/registry/sign-in.json +52 -0
  318. package/dist/registry/switch.json +113 -0
  319. package/dist/registry/tabs.json +83 -0
  320. package/dist/registry/text-field.json +206 -0
  321. package/dist/router.cjs.js +2 -0
  322. package/dist/router.cjs.js.map +1 -0
  323. package/dist/router.esm.d.mts +1 -0
  324. package/dist/router.esm.mjs +11 -0
  325. package/dist/router.esm.mjs.map +1 -0
  326. package/dist/select.cjs.js +2 -0
  327. package/dist/select.cjs.js.map +1 -0
  328. package/dist/select.esm.d.mts +1 -0
  329. package/dist/select.esm.mjs +5 -0
  330. package/dist/select.esm.mjs.map +1 -0
  331. package/dist/settings-panel.cjs.js +2 -0
  332. package/dist/settings-panel.cjs.js.map +1 -0
  333. package/dist/settings-panel.esm.d.mts +1 -0
  334. package/dist/settings-panel.esm.mjs +43 -0
  335. package/dist/settings-panel.esm.mjs.map +1 -0
  336. package/dist/sign-in.cjs.js +2 -0
  337. package/dist/sign-in.cjs.js.map +1 -0
  338. package/dist/sign-in.esm.d.mts +1 -0
  339. package/dist/sign-in.esm.mjs +83 -0
  340. package/dist/sign-in.esm.mjs.map +1 -0
  341. package/dist/switch.cjs.js +2 -0
  342. package/dist/switch.cjs.js.map +1 -0
  343. package/dist/switch.esm.d.mts +1 -0
  344. package/dist/switch.esm.mjs +5 -0
  345. package/dist/switch.esm.mjs.map +1 -0
  346. package/dist/tabs.cjs.js +2 -0
  347. package/dist/tabs.cjs.js.map +1 -0
  348. package/dist/tabs.esm.d.mts +1 -0
  349. package/dist/tabs.esm.mjs +5 -0
  350. package/dist/tabs.esm.mjs.map +1 -0
  351. package/dist/text-field.cjs.js +2 -0
  352. package/dist/text-field.cjs.js.map +1 -0
  353. package/dist/text-field.esm.d.mts +1 -0
  354. package/dist/text-field.esm.mjs +5 -0
  355. package/dist/text-field.esm.mjs.map +1 -0
  356. package/dist/theme.cjs.js +2 -0
  357. package/dist/theme.cjs.js.map +1 -0
  358. package/dist/theme.esm.d.mts +1 -0
  359. package/dist/theme.esm.mjs +116 -0
  360. package/dist/theme.esm.mjs.map +1 -0
  361. package/dist/types/components/Accordion/Accordion/Accordion.props.d.ts +50 -0
  362. package/dist/types/components/Accordion/Accordion/Accordion.state.d.ts +9 -0
  363. package/dist/types/components/Accordion/Accordion/Accordion.style.d.ts +6 -0
  364. package/dist/types/components/Accordion/Accordion/Accordion.type.d.ts +20 -0
  365. package/dist/types/components/Accordion/Accordion/Accordion.view.d.ts +32 -0
  366. package/dist/types/components/Accordion/Accordion.d.ts +2 -0
  367. package/dist/types/components/ActionSheet/ActionSheet/ActionSheet.props.d.ts +36 -0
  368. package/dist/types/components/ActionSheet/ActionSheet/ActionSheet.state.d.ts +8 -0
  369. package/dist/types/components/ActionSheet/ActionSheet/ActionSheet.style.d.ts +17 -0
  370. package/dist/types/components/ActionSheet/ActionSheet/ActionSheet.type.d.ts +37 -0
  371. package/dist/types/components/ActionSheet/ActionSheet/ActionSheet.view.d.ts +4 -0
  372. package/dist/types/components/ActionSheet/ActionSheet.d.ts +3 -0
  373. package/dist/types/components/ActionSheet/index.d.ts +3 -0
  374. package/dist/types/components/Alert/Alert/Alert.props.d.ts +14 -0
  375. package/dist/types/components/Alert/Alert/Alert.state.d.ts +5 -0
  376. package/dist/types/components/Alert/Alert/Alert.style.d.ts +18 -0
  377. package/dist/types/components/Alert/Alert/Alert.type.d.ts +8 -0
  378. package/dist/types/components/Alert/Alert/Alert.view.d.ts +6 -0
  379. package/dist/types/components/Alert/Alert.d.ts +3 -0
  380. package/dist/types/components/AppRoot/AppRoot.d.ts +17 -0
  381. package/dist/types/components/AppRoot/AppRoot.types.d.ts +22 -0
  382. package/dist/types/components/AppRoot/index.d.ts +2 -0
  383. package/dist/types/components/AspectRatio/AspectRatio/AspectRatio.props.d.ts +9 -0
  384. package/dist/types/components/AspectRatio/AspectRatio/AspectRatio.view.d.ts +3 -0
  385. package/dist/types/components/AspectRatio/AspectRatio.d.ts +3 -0
  386. package/dist/types/components/AttachmentGroup/AttachmentGroup/AttachmentGroup.d.ts +18 -0
  387. package/dist/types/components/AttachmentGroup/AttachmentGroup.d.ts +2 -0
  388. package/dist/types/components/AudioInput/AudioInput/AudioInput.props.d.ts +18 -0
  389. package/dist/types/components/AudioInput/AudioInput/AudioInput.state.d.ts +15 -0
  390. package/dist/types/components/AudioInput/AudioInput/AudioInput.view.d.ts +4 -0
  391. package/dist/types/components/AudioInput/AudioInput.d.ts +4 -0
  392. package/dist/types/components/AudioInput/AudioWaveform/AudioWaveform.d.ts +3 -0
  393. package/dist/types/components/AudioInput/AudioWaveform/AudioWaveform.props.d.ts +9 -0
  394. package/dist/types/components/AudioInput/AudioWaveform/AudioWaveform.view.d.ts +4 -0
  395. package/dist/types/components/AudioInput/useAudioRecording.d.ts +13 -0
  396. package/dist/types/components/Avatar/Avatar/Avatar.props.d.ts +14 -0
  397. package/dist/types/components/Avatar/Avatar/Avatar.state.d.ts +4 -0
  398. package/dist/types/components/Avatar/Avatar/Avatar.style.d.ts +14 -0
  399. package/dist/types/components/Avatar/Avatar/Avatar.type.d.ts +7 -0
  400. package/dist/types/components/Avatar/Avatar/Avatar.view.d.ts +3 -0
  401. package/dist/types/components/Avatar/Avatar.d.ts +3 -0
  402. package/dist/types/components/Background/Background/Background.props.d.ts +97 -0
  403. package/dist/types/components/Background/Background/Background.style.d.ts +24 -0
  404. package/dist/types/components/Background/Background/Background.type.d.ts +28 -0
  405. package/dist/types/components/Background/Background/Background.view.d.ts +18 -0
  406. package/dist/types/components/Background/Background.d.ts +15 -0
  407. package/dist/types/components/Background/index.d.ts +3 -0
  408. package/dist/types/components/Badge/Badge/Badge.props.d.ts +23 -0
  409. package/dist/types/components/Badge/Badge/Badge.style.d.ts +41 -0
  410. package/dist/types/components/Badge/Badge/Badge.type.d.ts +13 -0
  411. package/dist/types/components/Badge/Badge/Badge.view.d.ts +7 -0
  412. package/dist/types/components/Badge/Badge.d.ts +3 -0
  413. package/dist/types/components/BlockEditor/BlockEditor/BlockEditor.content.d.ts +19 -0
  414. package/dist/types/components/BlockEditor/BlockEditor/BlockEditor.controls.d.ts +15 -0
  415. package/dist/types/components/BlockEditor/BlockEditor/BlockEditor.dom.d.ts +9 -0
  416. package/dist/types/components/BlockEditor/BlockEditor/BlockEditor.keyboard.d.ts +16 -0
  417. package/dist/types/components/BlockEditor/BlockEditor/BlockEditor.model.d.ts +58 -0
  418. package/dist/types/components/BlockEditor/BlockEditor/BlockEditor.navigation.d.ts +6 -0
  419. package/dist/types/components/BlockEditor/BlockEditor/BlockEditor.props.d.ts +105 -0
  420. package/dist/types/components/BlockEditor/BlockEditor/BlockEditor.selection.d.ts +13 -0
  421. package/dist/types/components/BlockEditor/BlockEditor/BlockEditor.state.d.ts +149 -0
  422. package/dist/types/components/BlockEditor/BlockEditor/BlockEditor.transactions.d.ts +8 -0
  423. package/dist/types/components/BlockEditor/BlockEditor/BlockEditor.upload.d.ts +6 -0
  424. package/dist/types/components/BlockEditor/BlockEditor/BlockEditor.view.d.ts +6 -0
  425. package/dist/types/components/BlockEditor/BlockEditor.d.ts +3 -0
  426. package/dist/types/components/Button/Button/Button.element.d.ts +1 -0
  427. package/dist/types/components/Button/Button/Button.props.d.ts +50 -0
  428. package/dist/types/components/Button/Button/Button.state.d.ts +5 -0
  429. package/dist/types/components/Button/Button/Button.style.d.ts +37 -0
  430. package/dist/types/components/Button/Button/Button.type.d.ts +9 -0
  431. package/dist/types/components/Button/Button/Button.view.d.ts +7 -0
  432. package/dist/types/components/Button/Button.core.d.ts +4 -0
  433. package/dist/types/components/Button/Button.d.ts +1 -0
  434. package/dist/types/components/Button/Button.pilot.d.ts +2 -0
  435. package/dist/types/components/Card/Card/Card.context.d.ts +6 -0
  436. package/dist/types/components/Card/Card/Card.props.d.ts +30 -0
  437. package/dist/types/components/Card/Card/Card.state.d.ts +4 -0
  438. package/dist/types/components/Card/Card/Card.style.d.ts +6 -0
  439. package/dist/types/components/Card/Card/Card.type.d.ts +10 -0
  440. package/dist/types/components/Card/Card/Card.view.d.ts +6 -0
  441. package/dist/types/components/Card/Card.d.ts +2 -0
  442. package/dist/types/components/Carousel/Carousel/Carousel.context.d.ts +3 -0
  443. package/dist/types/components/Carousel/Carousel/Carousel.props.d.ts +51 -0
  444. package/dist/types/components/Carousel/Carousel/Carousel.state.d.ts +29 -0
  445. package/dist/types/components/Carousel/Carousel/Carousel.style.d.ts +6 -0
  446. package/dist/types/components/Carousel/Carousel/Carousel.type.d.ts +32 -0
  447. package/dist/types/components/Carousel/Carousel/Carousel.view.d.ts +8 -0
  448. package/dist/types/components/Carousel/Carousel.d.ts +2 -0
  449. package/dist/types/components/Chart/Chart/BarChart.d.ts +15 -0
  450. package/dist/types/components/Chart/Chart/Chart.props.d.ts +28 -0
  451. package/dist/types/components/Chart/Chart/Chart.state.d.ts +40 -0
  452. package/dist/types/components/Chart/Chart/Chart.style.d.ts +20 -0
  453. package/dist/types/components/Chart/Chart/Chart.type.d.ts +36 -0
  454. package/dist/types/components/Chart/Chart/Chart.view.d.ts +3 -0
  455. package/dist/types/components/Chart/Chart/ChartColors.d.ts +13 -0
  456. package/dist/types/components/Chart/Chart/ChartTooltip.d.ts +14 -0
  457. package/dist/types/components/Chart/Chart/LineChart.d.ts +15 -0
  458. package/dist/types/components/Chart/Chart/PieChart.d.ts +15 -0
  459. package/dist/types/components/Chart/Chart.d.ts +3 -0
  460. package/dist/types/components/ChatInput/AttachmentGroup.d.ts +18 -0
  461. package/dist/types/components/ChatInput/AudioRecorder.d.ts +10 -0
  462. package/dist/types/components/ChatInput/ChatInput/ChatInput.props.d.ts +374 -0
  463. package/dist/types/components/ChatInput/ChatInput/ChatInput.state.d.ts +45 -0
  464. package/dist/types/components/ChatInput/ChatInput/ChatInput.style.d.ts +164 -0
  465. package/dist/types/components/ChatInput/ChatInput/ChatInput.type.d.ts +57 -0
  466. package/dist/types/components/ChatInput/ChatInput/ChatInput.view.d.ts +4 -0
  467. package/dist/types/components/ChatInput/ChatInput.d.ts +3 -0
  468. package/dist/types/components/ChatInput/ChatUploader.d.ts +20 -0
  469. package/dist/types/components/ChatInput/EditableInput.d.ts +44 -0
  470. package/dist/types/components/ChatInput/GuideTip.d.ts +12 -0
  471. package/dist/types/components/ChatInput/MessageInput.d.ts +36 -0
  472. package/dist/types/components/ChatInput/PromptExamples.d.ts +13 -0
  473. package/dist/types/components/ChatInput/index.d.ts +7 -0
  474. package/dist/types/components/ChatWidget/ChatWidget/ChatWidget.props.d.ts +32 -0
  475. package/dist/types/components/ChatWidget/ChatWidget/ChatWidget.state.d.ts +8 -0
  476. package/dist/types/components/ChatWidget/ChatWidget/ChatWidget.style.d.ts +81 -0
  477. package/dist/types/components/ChatWidget/ChatWidget/ChatWidget.type.d.ts +47 -0
  478. package/dist/types/components/ChatWidget/ChatWidget/ChatWidget.view.d.ts +4 -0
  479. package/dist/types/components/ChatWidget/ChatWidget.d.ts +4 -0
  480. package/dist/types/components/ChatWidget/Widget/ChatWidgetWidget.d.ts +14 -0
  481. package/dist/types/components/ChatWidget/Widget/index.d.ts +2 -0
  482. package/dist/types/components/ChatWidget/Widget/useContextSelector.d.ts +22 -0
  483. package/dist/types/components/ColorPicker/ColorPicker/ColorPicker.props.d.ts +44 -0
  484. package/dist/types/components/ColorPicker/ColorPicker/ColorPicker.state.d.ts +14 -0
  485. package/dist/types/components/ColorPicker/ColorPicker/ColorPicker.style.d.ts +19 -0
  486. package/dist/types/components/ColorPicker/ColorPicker/ColorPicker.type.d.ts +34 -0
  487. package/dist/types/components/ColorPicker/ColorPicker/ColorPicker.view.d.ts +4 -0
  488. package/dist/types/components/ColorPicker/ColorPicker.d.ts +3 -0
  489. package/dist/types/components/Command/Command/Command.props.d.ts +66 -0
  490. package/dist/types/components/Command/Command/Command.state.d.ts +17 -0
  491. package/dist/types/components/Command/Command/Command.style.d.ts +19 -0
  492. package/dist/types/components/Command/Command/Command.type.d.ts +42 -0
  493. package/dist/types/components/Command/Command/Command.view.d.ts +31 -0
  494. package/dist/types/components/Command/Command/CommandOverlay.d.ts +10 -0
  495. package/dist/types/components/Command/Command/CommandTextInput.d.ts +8 -0
  496. package/dist/types/components/Command/Command.d.ts +2 -0
  497. package/dist/types/components/Command/index.d.ts +1 -0
  498. package/dist/types/components/ContextMenu/ContextMenu/ContextMenu.props.d.ts +72 -0
  499. package/dist/types/components/ContextMenu/ContextMenu/ContextMenu.state.d.ts +27 -0
  500. package/dist/types/components/ContextMenu/ContextMenu/ContextMenu.style.d.ts +16 -0
  501. package/dist/types/components/ContextMenu/ContextMenu/ContextMenu.type.d.ts +52 -0
  502. package/dist/types/components/ContextMenu/ContextMenu/ContextMenu.view.d.ts +23 -0
  503. package/dist/types/components/ContextMenu/ContextMenu.d.ts +2 -0
  504. package/dist/types/components/CookieConsent/CookieConsent/CookieConsent.props.d.ts +15 -0
  505. package/dist/types/components/CookieConsent/CookieConsent/CookieConsent.state.d.ts +7 -0
  506. package/dist/types/components/CookieConsent/CookieConsent/CookieConsent.style.d.ts +65 -0
  507. package/dist/types/components/CookieConsent/CookieConsent/CookieConsent.type.d.ts +10 -0
  508. package/dist/types/components/CookieConsent/CookieConsent/CookieConsent.view.d.ts +3 -0
  509. package/dist/types/components/CookieConsent/CookieConsent.d.ts +3 -0
  510. package/dist/types/components/DataState/DataState/DataState.props.d.ts +14 -0
  511. package/dist/types/components/DataState/DataState/DataState.state.d.ts +13 -0
  512. package/dist/types/components/DataState/DataState/DataState.type.d.ts +33 -0
  513. package/dist/types/components/DataState/DataState/DataState.view.d.ts +6 -0
  514. package/dist/types/components/DataState/DataState.d.ts +3 -0
  515. package/dist/types/components/DragAndDrop/DragAndDrop/DragAndDrop.props.d.ts +18 -0
  516. package/dist/types/components/DragAndDrop/DragAndDrop/DragAndDrop.state.d.ts +8 -0
  517. package/dist/types/components/DragAndDrop/DragAndDrop/DragAndDrop.view.d.ts +3 -0
  518. package/dist/types/components/DragAndDrop/DragAndDrop.d.ts +4 -0
  519. package/dist/types/components/Drawer/Drawer/Drawer.layout.d.ts +3 -0
  520. package/dist/types/components/Drawer/Drawer/Drawer.props.d.ts +51 -0
  521. package/dist/types/components/Drawer/Drawer/Drawer.store.d.ts +19 -0
  522. package/dist/types/components/Drawer/Drawer/Drawer.style.d.ts +4 -0
  523. package/dist/types/components/Drawer/Drawer/Drawer.type.d.ts +3 -0
  524. package/dist/types/components/Drawer/Drawer/Drawer.view.d.ts +7 -0
  525. package/dist/types/components/Drawer/Drawer.d.ts +3 -0
  526. package/dist/types/components/DropZone/DropZone/DropZone.props.d.ts +24 -0
  527. package/dist/types/components/DropZone/DropZone/DropZone.state.d.ts +2 -0
  528. package/dist/types/components/DropZone/DropZone/DropZone.view.d.ts +3 -0
  529. package/dist/types/components/DropZone/DropZone.d.ts +3 -0
  530. package/dist/types/components/DropdownMenu/DropdownMenu/DropdownMenu.props.d.ts +51 -0
  531. package/dist/types/components/DropdownMenu/DropdownMenu/DropdownMenu.state.d.ts +6 -0
  532. package/dist/types/components/DropdownMenu/DropdownMenu/DropdownMenu.style.d.ts +17 -0
  533. package/dist/types/components/DropdownMenu/DropdownMenu/DropdownMenu.type.d.ts +35 -0
  534. package/dist/types/components/DropdownMenu/DropdownMenu/DropdownMenu.view.d.ts +20 -0
  535. package/dist/types/components/DropdownMenu/DropdownMenu.d.ts +2 -0
  536. package/dist/types/components/EditComponent/EditComponent.d.ts +14 -0
  537. package/dist/types/components/EditComponent/EditPanel.d.ts +7 -0
  538. package/dist/types/components/EditComponent/EditToolbar.d.ts +16 -0
  539. package/dist/types/components/EditComponent/index.d.ts +3 -0
  540. package/dist/types/components/EmojiPicker/EmojiPicker/EmojiPicker.data.d.ts +3 -0
  541. package/dist/types/components/EmojiPicker/EmojiPicker/EmojiPicker.props.d.ts +75 -0
  542. package/dist/types/components/EmojiPicker/EmojiPicker/EmojiPicker.state.d.ts +38 -0
  543. package/dist/types/components/EmojiPicker/EmojiPicker/EmojiPicker.style.d.ts +18 -0
  544. package/dist/types/components/EmojiPicker/EmojiPicker/EmojiPicker.type.d.ts +28 -0
  545. package/dist/types/components/EmojiPicker/EmojiPicker/EmojiPicker.view.d.ts +4 -0
  546. package/dist/types/components/EmojiPicker/EmojiPicker.d.ts +3 -0
  547. package/dist/types/components/File/File.d.ts +14 -0
  548. package/dist/types/components/Form/Checkbox/Checkbox/Checkbox.props.d.ts +30 -0
  549. package/dist/types/components/Form/Checkbox/Checkbox/Checkbox.state.d.ts +8 -0
  550. package/dist/types/components/Form/Checkbox/Checkbox/Checkbox.style.d.ts +79 -0
  551. package/dist/types/components/Form/Checkbox/Checkbox/Checkbox.type.d.ts +8 -0
  552. package/dist/types/components/Form/Checkbox/Checkbox/Checkbox.view.d.ts +4 -0
  553. package/dist/types/components/Form/Checkbox/Checkbox.d.ts +6 -0
  554. package/dist/types/components/Form/ColorInput/ColorInput/ColorInput.props.d.ts +54 -0
  555. package/dist/types/components/Form/ColorInput/ColorInput/ColorInput.state.d.ts +19 -0
  556. package/dist/types/components/Form/ColorInput/ColorInput/ColorInput.style.d.ts +16 -0
  557. package/dist/types/components/Form/ColorInput/ColorInput/ColorInput.type.d.ts +37 -0
  558. package/dist/types/components/Form/ColorInput/ColorInput/ColorInput.view.d.ts +4 -0
  559. package/dist/types/components/Form/ColorInput/ColorInput/colorFormat.d.ts +7 -0
  560. package/dist/types/components/Form/ColorInput/ColorInput.d.ts +3 -0
  561. package/dist/types/components/Form/ComboBox/ComboBox/ComboBox.context.d.ts +8 -0
  562. package/dist/types/components/Form/ComboBox/ComboBox/ComboBox.props.d.ts +46 -0
  563. package/dist/types/components/Form/ComboBox/ComboBox/ComboBox.provider.d.ts +2 -0
  564. package/dist/types/components/Form/ComboBox/ComboBox/ComboBox.state.d.ts +2 -0
  565. package/dist/types/components/Form/ComboBox/ComboBox/ComboBox.style.d.ts +105 -0
  566. package/dist/types/components/Form/ComboBox/ComboBox/ComboBox.type.d.ts +11 -0
  567. package/dist/types/components/Form/ComboBox/ComboBox/ComboBox.view.d.ts +4 -0
  568. package/dist/types/components/Form/ComboBox/ComboBox.d.ts +3 -0
  569. package/dist/types/components/Form/CountryPicker/CountryPicker/CountryPicker.props.d.ts +56 -0
  570. package/dist/types/components/Form/CountryPicker/CountryPicker/CountryPicker.state.d.ts +15 -0
  571. package/dist/types/components/Form/CountryPicker/CountryPicker/CountryPicker.style.d.ts +3 -0
  572. package/dist/types/components/Form/CountryPicker/CountryPicker/CountryPicker.type.d.ts +19 -0
  573. package/dist/types/components/Form/CountryPicker/CountryPicker/CountryPicker.view.d.ts +5 -0
  574. package/dist/types/components/Form/CountryPicker/CountryPicker.d.ts +3 -0
  575. package/dist/types/components/Form/CountryPicker/countries.json.d.ts +1455 -0
  576. package/dist/types/components/Form/DatePicker/DatePicker/DatePicker.props.d.ts +92 -0
  577. package/dist/types/components/Form/DatePicker/DatePicker/DatePicker.state.d.ts +10 -0
  578. package/dist/types/components/Form/DatePicker/DatePicker/DatePicker.style.d.ts +3 -0
  579. package/dist/types/components/Form/DatePicker/DatePicker/DatePicker.type.d.ts +12 -0
  580. package/dist/types/components/Form/DatePicker/DatePicker/DatePicker.view.d.ts +4 -0
  581. package/dist/types/components/Form/DatePicker/DatePicker.d.ts +6 -0
  582. package/dist/types/components/Form/Form.d.ts +12 -0
  583. package/dist/types/components/Form/Label/Label/Label.props.d.ts +17 -0
  584. package/dist/types/components/Form/Label/Label/Label.style.d.ts +2 -0
  585. package/dist/types/components/Form/Label/Label/Label.type.d.ts +3 -0
  586. package/dist/types/components/Form/Label/Label/Label.view.d.ts +4 -0
  587. package/dist/types/components/Form/Label/Label.d.ts +3 -0
  588. package/dist/types/components/Form/Password/Password/Password.props.d.ts +37 -0
  589. package/dist/types/components/Form/Password/Password/Password.state.d.ts +7 -0
  590. package/dist/types/components/Form/Password/Password/Password.type.d.ts +10 -0
  591. package/dist/types/components/Form/Password/Password.d.ts +6 -0
  592. package/dist/types/components/Form/Password/example/Default.d.ts +2 -0
  593. package/dist/types/components/Form/Password/example/DisabledInput.d.ts +2 -0
  594. package/dist/types/components/Form/Password/example/ErrorInput.d.ts +2 -0
  595. package/dist/types/components/Form/Password/example/HelperText.d.ts +2 -0
  596. package/dist/types/components/Form/Radio/Radio/Radio.props.d.ts +29 -0
  597. package/dist/types/components/Form/Radio/Radio/Radio.state.d.ts +8 -0
  598. package/dist/types/components/Form/Radio/Radio/Radio.style.d.ts +68 -0
  599. package/dist/types/components/Form/Radio/Radio/Radio.type.d.ts +8 -0
  600. package/dist/types/components/Form/Radio/Radio/Radio.view.d.ts +4 -0
  601. package/dist/types/components/Form/Radio/Radio.d.ts +3 -0
  602. package/dist/types/components/Form/Radio/RadioGroup/RadioGroup.props.d.ts +22 -0
  603. package/dist/types/components/Form/Radio/RadioGroup/RadioGroup.state.d.ts +5 -0
  604. package/dist/types/components/Form/Radio/RadioGroup/RadioGroup.type.d.ts +7 -0
  605. package/dist/types/components/Form/Radio/RadioGroup/RadioGroup.view.d.ts +4 -0
  606. package/dist/types/components/Form/Radio/RadioGroup.d.ts +3 -0
  607. package/dist/types/components/Form/Radio/index.d.ts +2 -0
  608. package/dist/types/components/Form/Select/Select/Select.props.d.ts +96 -0
  609. package/dist/types/components/Form/Select/Select/Select.state.d.ts +19 -0
  610. package/dist/types/components/Form/Select/Select/Select.style.d.ts +80 -0
  611. package/dist/types/components/Form/Select/Select/Select.type.d.ts +19 -0
  612. package/dist/types/components/Form/Select/Select/Select.view.d.ts +10 -0
  613. package/dist/types/components/Form/Select/Select.d.ts +3 -0
  614. package/dist/types/components/Form/Selector/Selector/Selector.props.d.ts +66 -0
  615. package/dist/types/components/Form/Selector/Selector/Selector.state.d.ts +17 -0
  616. package/dist/types/components/Form/Selector/Selector/Selector.style.d.ts +6 -0
  617. package/dist/types/components/Form/Selector/Selector/Selector.type.d.ts +19 -0
  618. package/dist/types/components/Form/Selector/Selector/Selector.view.d.ts +4 -0
  619. package/dist/types/components/Form/Selector/Selector.d.ts +3 -0
  620. package/dist/types/components/Form/Switch/Switch/Switch.props.d.ts +27 -0
  621. package/dist/types/components/Form/Switch/Switch/Switch.state.d.ts +10 -0
  622. package/dist/types/components/Form/Switch/Switch/Switch.style.d.ts +66 -0
  623. package/dist/types/components/Form/Switch/Switch/Switch.type.d.ts +7 -0
  624. package/dist/types/components/Form/Switch/Switch/Switch.view.d.ts +4 -0
  625. package/dist/types/components/Form/Switch/Switch.d.ts +3 -0
  626. package/dist/types/components/Form/TagInput/TagInput/TagInput.props.d.ts +54 -0
  627. package/dist/types/components/Form/TagInput/TagInput/TagInput.state.d.ts +19 -0
  628. package/dist/types/components/Form/TagInput/TagInput/TagInput.type.d.ts +25 -0
  629. package/dist/types/components/Form/TagInput/TagInput/TagInput.view.d.ts +4 -0
  630. package/dist/types/components/Form/TagInput/TagInput/index.d.ts +4 -0
  631. package/dist/types/components/Form/TagInput/TagInput.d.ts +3 -0
  632. package/dist/types/components/Form/TagInput/index.d.ts +2 -0
  633. package/dist/types/components/Form/TextArea/TextArea/TextArea.props.d.ts +62 -0
  634. package/dist/types/components/Form/TextArea/TextArea/TextArea.state.d.ts +11 -0
  635. package/dist/types/components/Form/TextArea/TextArea/TextArea.type.d.ts +13 -0
  636. package/dist/types/components/Form/TextArea/TextArea/TextArea.view.d.ts +4 -0
  637. package/dist/types/components/Form/TextArea/TextArea.d.ts +3 -0
  638. package/dist/types/components/Form/TextField/TextField/TextField.props.d.ts +69 -0
  639. package/dist/types/components/Form/TextField/TextField/TextField.state.d.ts +11 -0
  640. package/dist/types/components/Form/TextField/TextField/TextField.type.d.ts +12 -0
  641. package/dist/types/components/Form/TextField/TextField/TextField.view.d.ts +4 -0
  642. package/dist/types/components/Form/TextField/TextField.d.ts +3 -0
  643. package/dist/types/components/Formik/AttachmentPreview.d.ts +19 -0
  644. package/dist/types/components/Formik/Formik.ChatInput.d.ts +12 -0
  645. package/dist/types/components/Formik/Formik.Checkbox.d.ts +6 -0
  646. package/dist/types/components/Formik/Formik.ColorInput.d.ts +6 -0
  647. package/dist/types/components/Formik/Formik.ComboBox.d.ts +6 -0
  648. package/dist/types/components/Formik/Formik.CountryPicker.d.ts +6 -0
  649. package/dist/types/components/Formik/Formik.DatePicker.d.ts +6 -0
  650. package/dist/types/components/Formik/Formik.EmojiPicker.d.ts +6 -0
  651. package/dist/types/components/Formik/Formik.Form.d.ts +20 -0
  652. package/dist/types/components/Formik/Formik.Hook.d.ts +5 -0
  653. package/dist/types/components/Formik/Formik.IconPicker.d.ts +6 -0
  654. package/dist/types/components/Formik/Formik.OTPInput.d.ts +8 -0
  655. package/dist/types/components/Formik/Formik.Password.d.ts +6 -0
  656. package/dist/types/components/Formik/Formik.Radio.d.ts +6 -0
  657. package/dist/types/components/Formik/Formik.Select.d.ts +6 -0
  658. package/dist/types/components/Formik/Formik.Selector.d.ts +6 -0
  659. package/dist/types/components/Formik/Formik.Slider.d.ts +7 -0
  660. package/dist/types/components/Formik/Formik.Switch.d.ts +3 -0
  661. package/dist/types/components/Formik/Formik.TagInput.d.ts +9 -0
  662. package/dist/types/components/Formik/Formik.TextArea.d.ts +6 -0
  663. package/dist/types/components/Formik/Formik.TextField.d.ts +6 -0
  664. package/dist/types/components/Formik/Formik.Toggle.d.ts +6 -0
  665. package/dist/types/components/Formik/Formik.ToggleGroup.d.ts +6 -0
  666. package/dist/types/components/Formik/Formik.Uploader.d.ts +38 -0
  667. package/dist/types/components/Formik/index.d.ts +23 -0
  668. package/dist/types/components/Gradient/Gradient/Gradient.props.d.ts +15 -0
  669. package/dist/types/components/Gradient/Gradient/Gradient.style.d.ts +55 -0
  670. package/dist/types/components/Gradient/Gradient/Gradient.type.d.ts +13 -0
  671. package/dist/types/components/Gradient/Gradient/Gradient.view.d.ts +3 -0
  672. package/dist/types/components/Gradient/Gradient.d.ts +3 -0
  673. package/dist/types/components/Gradient/index.d.ts +1 -0
  674. package/dist/types/components/HoverCard/HoverCard/HoverCard.props.d.ts +33 -0
  675. package/dist/types/components/HoverCard/HoverCard/HoverCard.state.d.ts +11 -0
  676. package/dist/types/components/HoverCard/HoverCard/HoverCard.style.d.ts +5 -0
  677. package/dist/types/components/HoverCard/HoverCard/HoverCard.type.d.ts +12 -0
  678. package/dist/types/components/HoverCard/HoverCard/HoverCard.view.d.ts +10 -0
  679. package/dist/types/components/HoverCard/HoverCard.d.ts +2 -0
  680. package/dist/types/components/Icon/FixedIcons.d.ts +10 -0
  681. package/dist/types/components/Icon/Icon.d.ts +100 -0
  682. package/dist/types/components/Icon/Icon.frame.d.ts +14 -0
  683. package/dist/types/components/IconPicker/IconPicker/IconPicker.constants.d.ts +2 -0
  684. package/dist/types/components/IconPicker/IconPicker/IconPicker.props.d.ts +37 -0
  685. package/dist/types/components/IconPicker/IconPicker/IconPicker.state.d.ts +14 -0
  686. package/dist/types/components/IconPicker/IconPicker/IconPicker.style.d.ts +13 -0
  687. package/dist/types/components/IconPicker/IconPicker/IconPicker.type.d.ts +14 -0
  688. package/dist/types/components/IconPicker/IconPicker/IconPicker.view.d.ts +4 -0
  689. package/dist/types/components/IconPicker/IconPicker.d.ts +3 -0
  690. package/dist/types/components/Input/FieldContainer/FieldContainer/FieldContainer.props.d.ts +27 -0
  691. package/dist/types/components/Input/FieldContainer/FieldContainer.d.ts +3 -0
  692. package/dist/types/components/Input/FieldContent/FieldContent/FieldContent.props.d.ts +70 -0
  693. package/dist/types/components/Input/FieldContent/FieldContent.d.ts +3 -0
  694. package/dist/types/components/Input/FieldIcons/FieldIcons/FieldIcons.props.d.ts +3 -0
  695. package/dist/types/components/Input/FieldIcons/FieldIcons.d.ts +3 -0
  696. package/dist/types/components/Input/FieldLabel/FieldLabel/FieldLabel.props.d.ts +31 -0
  697. package/dist/types/components/Input/FieldLabel/FieldLabel.d.ts +3 -0
  698. package/dist/types/components/Input/FieldLayout/FieldLayout/FieldLayout.props.d.ts +25 -0
  699. package/dist/types/components/Input/FieldLayout/FieldLayout.d.ts +3 -0
  700. package/dist/types/components/Input/FieldWrapper/FieldWrapper.d.ts +3 -0
  701. package/dist/types/components/Input/FieldWrapper/FieldWrapper.props.d.ts +3 -0
  702. package/dist/types/components/Input/HelperText/HelperText.d.ts +3 -0
  703. package/dist/types/components/Input/HelperText/HelperText.props.d.ts +17 -0
  704. package/dist/types/components/Input/Input.style.d.ts +18 -0
  705. package/dist/types/components/Input/Input.type.d.ts +13 -0
  706. package/dist/types/components/Input/fieldSizes.d.ts +15 -0
  707. package/dist/types/components/Input/index.d.ts +7 -0
  708. package/dist/types/components/KeyboardAvoidingView/KeyboardAvoidingView.d.ts +3 -0
  709. package/dist/types/components/KeyboardAvoidingView/KeyboardAvoidingView.types.d.ts +24 -0
  710. package/dist/types/components/KeyboardAvoidingView/index.d.ts +2 -0
  711. package/dist/types/components/Link/Link/Link.props.d.ts +18 -0
  712. package/dist/types/components/Link/Link/Link.state.d.ts +4 -0
  713. package/dist/types/components/Link/Link/Link.style.d.ts +11 -0
  714. package/dist/types/components/Link/Link/Link.type.d.ts +8 -0
  715. package/dist/types/components/Link/Link/Link.view.d.ts +4 -0
  716. package/dist/types/components/Link/Link.d.ts +3 -0
  717. package/dist/types/components/Loader/Loader/Loader.props.d.ts +27 -0
  718. package/dist/types/components/Loader/Loader/Loader.style.d.ts +4 -0
  719. package/dist/types/components/Loader/Loader/Loader.type.d.ts +4 -0
  720. package/dist/types/components/Loader/Loader/Loader.view.d.ts +11 -0
  721. package/dist/types/components/Loader/Loader.d.ts +3 -0
  722. package/dist/types/components/Markdown/Markdown/Markdown.content.d.ts +6 -0
  723. package/dist/types/components/Markdown/Markdown/Markdown.motion.d.ts +1 -0
  724. package/dist/types/components/Markdown/Markdown/Markdown.props.d.ts +34 -0
  725. package/dist/types/components/Markdown/Markdown/Markdown.view.d.ts +1 -0
  726. package/dist/types/components/Markdown/Markdown/useMarkdownTyping.d.ts +6 -0
  727. package/dist/types/components/Markdown/Markdown.d.ts +3 -0
  728. package/dist/types/components/MediaPreview.d.ts +14 -0
  729. package/dist/types/components/Menubar/Menubar/Menubar.props.d.ts +74 -0
  730. package/dist/types/components/Menubar/Menubar/Menubar.state.d.ts +8 -0
  731. package/dist/types/components/Menubar/Menubar/Menubar.style.d.ts +19 -0
  732. package/dist/types/components/Menubar/Menubar/Menubar.type.d.ts +36 -0
  733. package/dist/types/components/Menubar/Menubar/Menubar.view.d.ts +22 -0
  734. package/dist/types/components/Menubar/Menubar.d.ts +2 -0
  735. package/dist/types/components/Menubar/index.d.ts +1 -0
  736. package/dist/types/components/Message/Message/Message.layout.d.ts +3 -0
  737. package/dist/types/components/Message/Message/Message.props.d.ts +36 -0
  738. package/dist/types/components/Message/Message/Message.store.d.ts +5 -0
  739. package/dist/types/components/Message/Message/Message.style.d.ts +5 -0
  740. package/dist/types/components/Message/Message/Message.type.d.ts +48 -0
  741. package/dist/types/components/Message/Message/Message.view.d.ts +3 -0
  742. package/dist/types/components/Message/Message.d.ts +5 -0
  743. package/dist/types/components/Modal/Modal/Modal.layout.d.ts +3 -0
  744. package/dist/types/components/Modal/Modal/Modal.props.d.ts +90 -0
  745. package/dist/types/components/Modal/Modal/Modal.store.d.ts +19 -0
  746. package/dist/types/components/Modal/Modal/Modal.style.d.ts +33 -0
  747. package/dist/types/components/Modal/Modal/Modal.type.d.ts +4 -0
  748. package/dist/types/components/Modal/Modal/Modal.view.d.ts +21 -0
  749. package/dist/types/components/Modal/Modal.d.ts +5 -0
  750. package/dist/types/components/NavigationMenu/NavigationMenu/NavigationMenu.props.d.ts +68 -0
  751. package/dist/types/components/NavigationMenu/NavigationMenu/NavigationMenu.state.d.ts +8 -0
  752. package/dist/types/components/NavigationMenu/NavigationMenu/NavigationMenu.style.d.ts +32 -0
  753. package/dist/types/components/NavigationMenu/NavigationMenu/NavigationMenu.type.d.ts +35 -0
  754. package/dist/types/components/NavigationMenu/NavigationMenu/NavigationMenu.view.d.ts +25 -0
  755. package/dist/types/components/NavigationMenu/NavigationMenu.d.ts +2 -0
  756. package/dist/types/components/OTPInput/OTPInput/OTPInput.props.d.ts +43 -0
  757. package/dist/types/components/OTPInput/OTPInput/OTPInput.state.d.ts +23 -0
  758. package/dist/types/components/OTPInput/OTPInput/OTPInput.type.d.ts +9 -0
  759. package/dist/types/components/OTPInput/OTPInput/OTPInput.view.d.ts +29 -0
  760. package/dist/types/components/OTPInput/OTPInput/sync-timeouts.d.ts +1 -0
  761. package/dist/types/components/OTPInput/OTPInput.d.ts +3 -0
  762. package/dist/types/components/PageHeader/PageHeader/PageHeader.props.d.ts +9 -0
  763. package/dist/types/components/PageHeader/PageHeader/PageHeader.style.d.ts +4 -0
  764. package/dist/types/components/PageHeader/PageHeader/PageHeader.type.d.ts +7 -0
  765. package/dist/types/components/PageHeader/PageHeader/PageHeader.view.d.ts +4 -0
  766. package/dist/types/components/PageHeader/PageHeader.d.ts +3 -0
  767. package/dist/types/components/PageLayout/PageLayout.d.ts +3 -0
  768. package/dist/types/components/PageLayout/PageLayout.types.d.ts +30 -0
  769. package/dist/types/components/PageLayout/index.d.ts +2 -0
  770. package/dist/types/components/Pagination/Pagination/Pagination.props.d.ts +19 -0
  771. package/dist/types/components/Pagination/Pagination/Pagination.state.d.ts +3 -0
  772. package/dist/types/components/Pagination/Pagination/Pagination.style.d.ts +7 -0
  773. package/dist/types/components/Pagination/Pagination/Pagination.type.d.ts +17 -0
  774. package/dist/types/components/Pagination/Pagination/Pagination.view.d.ts +3 -0
  775. package/dist/types/components/Pagination/Pagination.d.ts +3 -0
  776. package/dist/types/components/Pagination/index.d.ts +1 -0
  777. package/dist/types/components/Portal/Portal.d.ts +7 -0
  778. package/dist/types/components/ProgressBar/ProgressBar/ProgressBar.props.d.ts +24 -0
  779. package/dist/types/components/ProgressBar/ProgressBar/ProgressBar.view.d.ts +4 -0
  780. package/dist/types/components/ProgressBar/ProgressBar.d.ts +4 -0
  781. package/dist/types/components/Resizable/Resizable/Resizable.props.d.ts +52 -0
  782. package/dist/types/components/Resizable/Resizable/Resizable.state.d.ts +16 -0
  783. package/dist/types/components/Resizable/Resizable/Resizable.style.d.ts +7 -0
  784. package/dist/types/components/Resizable/Resizable/Resizable.type.d.ts +44 -0
  785. package/dist/types/components/Resizable/Resizable/Resizable.view.d.ts +13 -0
  786. package/dist/types/components/Resizable/Resizable.d.ts +2 -0
  787. package/dist/types/components/Resizable/index.d.ts +1 -0
  788. package/dist/types/components/Router/Router.d.ts +3 -0
  789. package/dist/types/components/Router/Router.match.d.ts +15 -0
  790. package/dist/types/components/Router/Router.store.d.ts +28 -0
  791. package/dist/types/components/Router/Router.types.d.ts +16 -0
  792. package/dist/types/components/Router/index.d.ts +5 -0
  793. package/dist/types/components/Router/useHistory.d.ts +21 -0
  794. package/dist/types/components/Separator/Separator/Separator.props.d.ts +12 -0
  795. package/dist/types/components/Separator/Separator/Separator.style.d.ts +23 -0
  796. package/dist/types/components/Separator/Separator/Separator.type.d.ts +8 -0
  797. package/dist/types/components/Separator/Separator/Separator.view.d.ts +3 -0
  798. package/dist/types/components/Separator/Separator.d.ts +4 -0
  799. package/dist/types/components/Separator/index.d.ts +1 -0
  800. package/dist/types/components/ShareButton/ShareButton/ShareButton.props.d.ts +19 -0
  801. package/dist/types/components/ShareButton/ShareButton/ShareButton.state.d.ts +6 -0
  802. package/dist/types/components/ShareButton/ShareButton/ShareButton.view.d.ts +4 -0
  803. package/dist/types/components/ShareButton/ShareButton.d.ts +3 -0
  804. package/dist/types/components/Sidebar/Sidebar/Sidebar.props.d.ts +54 -0
  805. package/dist/types/components/Sidebar/Sidebar/Sidebar.state.d.ts +7 -0
  806. package/dist/types/components/Sidebar/Sidebar/Sidebar.style.d.ts +13 -0
  807. package/dist/types/components/Sidebar/Sidebar/Sidebar.type.d.ts +32 -0
  808. package/dist/types/components/Sidebar/Sidebar/Sidebar.view.d.ts +21 -0
  809. package/dist/types/components/Sidebar/Sidebar.d.ts +2 -0
  810. package/dist/types/components/Sidebar/index.d.ts +1 -0
  811. package/dist/types/components/Slider/Slider/Slider.props.d.ts +36 -0
  812. package/dist/types/components/Slider/Slider/Slider.state.d.ts +14 -0
  813. package/dist/types/components/Slider/Slider/Slider.style.d.ts +15 -0
  814. package/dist/types/components/Slider/Slider/Slider.type.d.ts +18 -0
  815. package/dist/types/components/Slider/Slider/Slider.view.d.ts +3 -0
  816. package/dist/types/components/Slider/Slider.d.ts +3 -0
  817. package/dist/types/components/Slider/index.d.ts +1 -0
  818. package/dist/types/components/SplashScreen/SplashScreen.d.ts +3 -0
  819. package/dist/types/components/SplashScreen/SplashScreen.store.d.ts +18 -0
  820. package/dist/types/components/SplashScreen/SplashScreen.types.d.ts +23 -0
  821. package/dist/types/components/SplashScreen/index.d.ts +3 -0
  822. package/dist/types/components/StatePanel/StatePanel/StatePanel.props.d.ts +10 -0
  823. package/dist/types/components/StatePanel/StatePanel/StatePanel.style.d.ts +4 -0
  824. package/dist/types/components/StatePanel/StatePanel/StatePanel.type.d.ts +8 -0
  825. package/dist/types/components/StatePanel/StatePanel/StatePanel.view.d.ts +4 -0
  826. package/dist/types/components/StatePanel/StatePanel.d.ts +3 -0
  827. package/dist/types/components/StatusIndicator/StatusIndicator/StatusIndicator.props.d.ts +8 -0
  828. package/dist/types/components/StatusIndicator/StatusIndicator/StatusIndicator.style.d.ts +10 -0
  829. package/dist/types/components/StatusIndicator/StatusIndicator/StatusIndicator.type.d.ts +7 -0
  830. package/dist/types/components/StatusIndicator/StatusIndicator/StatusIndicator.view.d.ts +3 -0
  831. package/dist/types/components/StatusIndicator/StatusIndicator.d.ts +3 -0
  832. package/dist/types/components/Table/Table/Table.context.d.ts +23 -0
  833. package/dist/types/components/Table/Table/Table.props.d.ts +24 -0
  834. package/dist/types/components/Table/Table/Table.state.d.ts +5 -0
  835. package/dist/types/components/Table/Table/Table.style.d.ts +22 -0
  836. package/dist/types/components/Table/Table/Table.type.d.ts +19 -0
  837. package/dist/types/components/Table/Table/Table.view.d.ts +14 -0
  838. package/dist/types/components/Table/Table/TableScroll.d.ts +8 -0
  839. package/dist/types/components/Table/Table.d.ts +16 -0
  840. package/dist/types/components/Tabs/Tabs/TabHeader.d.ts +22 -0
  841. package/dist/types/components/Tabs/Tabs/Tabs.props.d.ts +114 -0
  842. package/dist/types/components/Tabs/Tabs/Tabs.state.d.ts +22 -0
  843. package/dist/types/components/Tabs/Tabs/Tabs.type.d.ts +53 -0
  844. package/dist/types/components/Tabs/Tabs/Tabs.view.d.ts +12 -0
  845. package/dist/types/components/Tabs/Tabs.d.ts +10 -0
  846. package/dist/types/components/TextArea/TextArea.d.ts +17 -0
  847. package/dist/types/components/Title/Title/SlideEffect.d.ts +16 -0
  848. package/dist/types/components/Title/Title/Title.props.d.ts +28 -0
  849. package/dist/types/components/Title/Title/Title.state.d.ts +10 -0
  850. package/dist/types/components/Title/Title/Title.style.d.ts +29 -0
  851. package/dist/types/components/Title/Title/Title.type.d.ts +8 -0
  852. package/dist/types/components/Title/Title/Title.view.d.ts +4 -0
  853. package/dist/types/components/Title/Title/TypewriterEffect.d.ts +15 -0
  854. package/dist/types/components/Title/Title.d.ts +3 -0
  855. package/dist/types/components/Title/index.d.ts +1 -0
  856. package/dist/types/components/Toast/Toast/Toast.hook.d.ts +10 -0
  857. package/dist/types/components/Toast/Toast/Toast.props.d.ts +34 -0
  858. package/dist/types/components/Toast/Toast/Toast.store.d.ts +10 -0
  859. package/dist/types/components/Toast/Toast/Toast.style.d.ts +17 -0
  860. package/dist/types/components/Toast/Toast/Toast.type.d.ts +53 -0
  861. package/dist/types/components/Toast/Toast/Toast.view.d.ts +4 -0
  862. package/dist/types/components/Toast/Toast.d.ts +23 -0
  863. package/dist/types/components/Toast/index.d.ts +1 -0
  864. package/dist/types/components/Toggle/Toggle/Toggle.props.d.ts +17 -0
  865. package/dist/types/components/Toggle/Toggle/Toggle.state.d.ts +6 -0
  866. package/dist/types/components/Toggle/Toggle/Toggle.style.d.ts +8 -0
  867. package/dist/types/components/Toggle/Toggle/Toggle.type.d.ts +2 -0
  868. package/dist/types/components/Toggle/Toggle/Toggle.view.d.ts +12 -0
  869. package/dist/types/components/Toggle/Toggle.d.ts +3 -0
  870. package/dist/types/components/ToggleGroup/ToggleGroup/ToggleGroup.props.d.ts +19 -0
  871. package/dist/types/components/ToggleGroup/ToggleGroup/ToggleGroup.state.d.ts +4 -0
  872. package/dist/types/components/ToggleGroup/ToggleGroup/ToggleGroup.style.d.ts +2 -0
  873. package/dist/types/components/ToggleGroup/ToggleGroup/ToggleGroup.type.d.ts +9 -0
  874. package/dist/types/components/ToggleGroup/ToggleGroup/ToggleGroup.view.d.ts +3 -0
  875. package/dist/types/components/ToggleGroup/ToggleGroup.d.ts +3 -0
  876. package/dist/types/components/Tooltip/Tooltip/Tooltip.props.d.ts +38 -0
  877. package/dist/types/components/Tooltip/Tooltip/Tooltip.state.d.ts +17 -0
  878. package/dist/types/components/Tooltip/Tooltip/Tooltip.style.d.ts +7 -0
  879. package/dist/types/components/Tooltip/Tooltip/Tooltip.type.d.ts +20 -0
  880. package/dist/types/components/Tooltip/Tooltip/Tooltip.view.d.ts +21 -0
  881. package/dist/types/components/Tooltip/Tooltip.d.ts +2 -0
  882. package/dist/types/components/Tooltip/index.d.ts +1 -0
  883. package/dist/types/components/Uploader/Uploader/Uploader.props.d.ts +59 -0
  884. package/dist/types/components/Uploader/Uploader/Uploader.state.d.ts +14 -0
  885. package/dist/types/components/Uploader/Uploader/Uploader.view.d.ts +3 -0
  886. package/dist/types/components/Uploader/Uploader.d.ts +3 -0
  887. package/dist/types/components/index.d.ts +13 -0
  888. package/dist/types/components/index.shared.d.ts +143 -0
  889. package/dist/types/components/pilot/alert.d.ts +2 -0
  890. package/dist/types/components/pilot/avatar.d.ts +2 -0
  891. package/dist/types/components/pilot/blocks/SettingsPanel.d.ts +8 -0
  892. package/dist/types/components/pilot/blocks/SignIn.d.ts +8 -0
  893. package/dist/types/components/pilot/button.d.ts +1 -0
  894. package/dist/types/components/pilot/card.d.ts +2 -0
  895. package/dist/types/components/pilot/checkbox.d.ts +2 -0
  896. package/dist/types/components/pilot/modal.d.ts +2 -0
  897. package/dist/types/components/pilot/select.d.ts +2 -0
  898. package/dist/types/components/pilot/settings-panel.d.ts +1 -0
  899. package/dist/types/components/pilot/sign-in.d.ts +1 -0
  900. package/dist/types/components/pilot/switch.d.ts +2 -0
  901. package/dist/types/components/pilot/tabs.d.ts +2 -0
  902. package/dist/types/components/pilot/text-field.d.ts +2 -0
  903. package/dist/types/design-system/DesignSystemProvider.d.ts +8 -0
  904. package/dist/types/design-system/DesignSystemScope.d.ts +8 -0
  905. package/dist/types/design-system/configs/airbnb.json.d.ts +715 -0
  906. package/dist/types/design-system/configs/apple.json.d.ts +733 -0
  907. package/dist/types/design-system/configs/coinbase.json.d.ts +726 -0
  908. package/dist/types/design-system/configs/default.json.d.ts +547 -0
  909. package/dist/types/design-system/configs/figma.json.d.ts +712 -0
  910. package/dist/types/design-system/configs/index.d.ts +27 -0
  911. package/dist/types/design-system/configs/linear.json.d.ts +705 -0
  912. package/dist/types/design-system/configs/nike.json.d.ts +733 -0
  913. package/dist/types/design-system/configs/notion.json.d.ts +838 -0
  914. package/dist/types/design-system/configs/revolut.json.d.ts +798 -0
  915. package/dist/types/design-system/configs/shopify.json.d.ts +701 -0
  916. package/dist/types/design-system/configs/spacex.json.d.ts +618 -0
  917. package/dist/types/design-system/configs/spotify.json.d.ts +701 -0
  918. package/dist/types/design-system/configs/stripe.json.d.ts +768 -0
  919. package/dist/types/design-system/configs/tesla.json.d.ts +660 -0
  920. package/dist/types/design-system/configs/uber.json.d.ts +716 -0
  921. package/dist/types/design-system/configs/vercel.json.d.ts +728 -0
  922. package/dist/types/design-system/index.d.ts +4 -0
  923. package/dist/types/design-system/theme.d.ts +28 -0
  924. package/dist/types/design-system/types.d.ts +138 -0
  925. package/dist/types/design-system/utils.d.ts +5 -0
  926. package/dist/types/pages/designSystem.page.d.ts +7 -0
  927. package/dist/types/types/global.d.ts +66 -0
  928. package/dist/types/types/module.d.ts +7 -0
  929. package/dist/types/types/refractor.d.ts +16 -0
  930. package/dist/types/utils/apiConfig.d.ts +28 -0
  931. package/dist/types/utils/colors.d.ts +31 -0
  932. package/dist/types/utils/elevation.d.ts +3 -0
  933. package/dist/types/utils/env.d.ts +15 -0
  934. package/dist/types/utils/file.d.ts +4 -0
  935. package/dist/types/utils/generateId.d.ts +5 -0
  936. package/dist/types/utils/id.d.ts +6 -0
  937. package/dist/types/utils/index.d.ts +7 -0
  938. package/dist/types/utils/localstorage.d.ts +5 -0
  939. package/dist/types/utils/request.d.ts +38 -0
  940. package/dist/types/utils/scriptTypography.d.ts +4 -0
  941. package/dist/types/utils/store.d.ts +7 -0
  942. package/dist/types/utils/typography.d.ts +23 -0
  943. package/dist/web.cjs.js +38 -72
  944. package/dist/web.cjs.js.map +1 -1
  945. package/dist/web.esm.d.mts +1 -0
  946. package/dist/web.esm.mjs +6888 -0
  947. package/dist/web.esm.mjs.map +1 -0
  948. package/dist/web.umd.js +22 -22
  949. package/dist/web.umd.js.map +1 -1
  950. package/docs/guides/registry-guide.mdx +81 -0
  951. package/package.json +312 -18
  952. package/dist/apple-touch-icon.png +0 -0
  953. package/dist/assets/apple-logo.png +0 -0
  954. package/dist/assets/maskable_icon.png +0 -0
  955. package/dist/assets/orange.png +0 -0
  956. package/dist/favicon.ico +0 -0
  957. package/dist/favicon.svg +0 -4
  958. package/dist/files/media/Accordion.mdx +0 -333
  959. package/dist/files/media/Alert.mdx +0 -353
  960. package/dist/files/media/AspectRatio.mdx +0 -64
  961. package/dist/files/media/AudioInput.mdx +0 -78
  962. package/dist/files/media/AudioWaveform.mdx +0 -9
  963. package/dist/files/media/Avatar.mdx +0 -301
  964. package/dist/files/media/Background.mdx +0 -610
  965. package/dist/files/media/Badge.mdx +0 -503
  966. package/dist/files/media/BlockEditor-drag-and-drop.md +0 -61
  967. package/dist/files/media/BlockEditor.mdx +0 -106
  968. package/dist/files/media/Button.mdx +0 -688
  969. package/dist/files/media/Card.mdx +0 -560
  970. package/dist/files/media/Carousel.mdx +0 -605
  971. package/dist/files/media/Chart.mdx +0 -871
  972. package/dist/files/media/ChatInput.mdx +0 -540
  973. package/dist/files/media/ChatWidget.mdx +0 -403
  974. package/dist/files/media/Checkbox.mdx +0 -463
  975. package/dist/files/media/ColorInput.mdx +0 -217
  976. package/dist/files/media/ColorPicker.mdx +0 -259
  977. package/dist/files/media/ComboBox.mdx +0 -376
  978. package/dist/files/media/Command.mdx +0 -496
  979. package/dist/files/media/ContextMenu.mdx +0 -411
  980. package/dist/files/media/CookieConsent.mdx +0 -263
  981. package/dist/files/media/CountryPicker.mdx +0 -349
  982. package/dist/files/media/DatePicker.mdx +0 -217
  983. package/dist/files/media/DragAndDrop.mdx +0 -34
  984. package/dist/files/media/Drawer.mdx +0 -233
  985. package/dist/files/media/DropZone.mdx +0 -9
  986. package/dist/files/media/DropdownMenu.mdx +0 -403
  987. package/dist/files/media/EmojiPicker.mdx +0 -335
  988. package/dist/files/media/Gradient.mdx +0 -604
  989. package/dist/files/media/HoverCard.mdx +0 -144
  990. package/dist/files/media/IconPicker.mdx +0 -9
  991. package/dist/files/media/Label.mdx +0 -9
  992. package/dist/files/media/Link.mdx +0 -142
  993. package/dist/files/media/Loader.mdx +0 -161
  994. package/dist/files/media/Markdown.mdx +0 -99
  995. package/dist/files/media/Menubar.mdx +0 -496
  996. package/dist/files/media/Message.mdx +0 -299
  997. package/dist/files/media/Modal.mdx +0 -795
  998. package/dist/files/media/NavigationMenu.mdx +0 -728
  999. package/dist/files/media/OTPInput.mdx +0 -450
  1000. package/dist/files/media/Pagination.mdx +0 -356
  1001. package/dist/files/media/ProgressBar.mdx +0 -119
  1002. package/dist/files/media/Radio.mdx +0 -314
  1003. package/dist/files/media/RadioGroup.mdx +0 -9
  1004. package/dist/files/media/Resizable.mdx +0 -873
  1005. package/dist/files/media/Select.mdx +0 -689
  1006. package/dist/files/media/Selector.mdx +0 -9
  1007. package/dist/files/media/Separator.mdx +0 -741
  1008. package/dist/files/media/ShareButton.mdx +0 -29
  1009. package/dist/files/media/Sidebar.mdx +0 -1237
  1010. package/dist/files/media/Slider.mdx +0 -513
  1011. package/dist/files/media/StatusIndicator.mdx +0 -43
  1012. package/dist/files/media/Switch.mdx +0 -521
  1013. package/dist/files/media/Table.mdx +0 -827
  1014. package/dist/files/media/Tabs.mdx +0 -524
  1015. package/dist/files/media/TagInput.mdx +0 -372
  1016. package/dist/files/media/TextArea.mdx +0 -724
  1017. package/dist/files/media/TextField.mdx +0 -830
  1018. package/dist/files/media/Title.mdx +0 -1081
  1019. package/dist/files/media/Toast.mdx +0 -802
  1020. package/dist/files/media/Toggle.mdx +0 -159
  1021. package/dist/files/media/ToggleGroup.mdx +0 -180
  1022. package/dist/files/media/Tooltip.mdx +0 -307
  1023. package/dist/files/media/Uploader.mdx +0 -9
  1024. package/dist/fonts/mulish-subset.woff2 +0 -0
  1025. package/dist/icon-512.png +0 -0
  1026. package/dist/illustrations/cross-platform.svg +0 -37
  1027. package/dist/index.d.ts +0 -5516
  1028. package/dist/indexnow-key.txt +0 -1
  1029. package/dist/manifest.json +0 -22
  1030. package/dist/orange.webp +0 -0
  1031. package/dist/robots.txt +0 -8
  1032. package/dist/web.esm.js +0 -49919
  1033. package/dist/web.esm.js.map +0 -1
package/dist/web.cjs.js CHANGED
@@ -1,92 +1,58 @@
1
- "use strict";var Mc=Object.create;var Pr=Object.defineProperty;var zc=Object.getOwnPropertyDescriptor;var Wc=Object.getOwnPropertyNames;var Ec=Object.getPrototypeOf,Ac=Object.prototype.hasOwnProperty;var Hc=(e,o,r)=>o in e?Pr(e,o,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[o]=r;var Vc=(e,o,r,n)=>{if(o&&typeof o=="object"||typeof o=="function")for(let a of Wc(o))!Ac.call(e,a)&&a!==r&&Pr(e,a,{get:()=>o[a],enumerable:!(n=zc(o,a))||n.enumerable});return e};var Pc=(e,o,r)=>(r=e!=null?Mc(Ec(e)):{},Vc(o||!e||!e.__esModule?Pr(r,"default",{value:e,enumerable:!0}):r,e));var lo=(e,o,r)=>Hc(e,typeof o!="symbol"?o+"":o,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),p=require("react"),s=require("app-studio"),Dc=require("react-dom"),tn=require("react-router-dom"),st=require("zustand"),Je=require("formik"),Zo=(e="id")=>`${e}-${Math.random().toString(36).substring(2,9)}`,$c=({type:e="single",value:o,defaultValue:r,onValueChange:n,collapsible:a=!1})=>{const i=o!==void 0,l=o??r,u=()=>e==="multiple"?Array.isArray(l)?l:l?[l]:[]:Array.isArray(l)?l[0]:l,[c,d]=p.useState(u()),g=p.useMemo(()=>Zo("accordion"),[]),m=i?o:c,h=p.useMemo(()=>m===void 0?[]:Array.isArray(m)?m:[m],[m]);p.useEffect(()=>{i&&(e==="multiple"&&!Array.isArray(o)?(console.warn('Accordion with type="multiple" received non-array value:',o),d(o?[String(o)]:[])):e==="single"&&Array.isArray(o)?(console.warn('Accordion with type="single" received array value:',o),d(o.length>0?o[0]:void 0)):d(o))},[o,i,e]);const f=p.useCallback(k=>{let b;if(e==="single")m===k&&a?b=void 0:m!==k?b=k:b=m;else{const j=Array.isArray(m)?m:[];j.includes(k)?b=j.filter(x=>x!==k):b=[...j,k],Array.isArray(b)&&b.length===0&&(b=[])}i||d(b),n&&n(b)},[e,m,a,i,n]),y=p.useCallback(k=>h.includes(k),[h]);return{expandedItems:h,toggleItem:f,isItemExpanded:y,type:e,collapsible:a,baseId:g}},Lc={square:{borderRadius:0},rounded:{borderRadius:8}},Bc={default:{borderWidth:0,style:{backgroundColor:"transparent"},transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.15s ease, background-color 0.15s ease",_hover:{borderColor:"color-gray-300"}},filled:{backgroundColor:"color-gray-50",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-100"}}},_c={id:"default",label:"Default",sourcePath:"",sourceTitle:"Default adaptive design system (light + dark)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},Oc={primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626",onPrimary:"#ffffff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200"},Nc={rawCssVars:{primary:"#2563eb",secondary:"#7c3aed",success:"#16a34a",warning:"#d97706",error:"#dc2626"},colors:[{name:"primary",value:"#2563eb",role:"primary"},{name:"secondary",value:"#7c3aed",role:"secondary"},{name:"success",value:"#16a34a",role:"success"},{name:"warning",value:"#d97706",role:"warning"},{name:"error",value:"#dc2626",role:"error"}],typography:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, 'SF Mono', Menlo, Monaco, Consolas, monospace",fontSizes:["12px","13px","14px","16px","18px","22px","28px","36px","48px","64px"],fontWeights:["400","500","600","700","800"],lineHeights:["1.0","1.1","1.2","1.4","1.5","1.6"]},spacing:["2px","4px","8px","12px","16px","24px","32px","48px","64px"],radii:["2px","4px","6px","8px","12px","16px","9999px"],shadows:["0 1px 2px rgba(0,0,0,0.04)","0 4px 12px rgba(0,0,0,0.08)","0 12px 32px rgba(0,0,0,0.12)"]},qc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:8,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:600,fontStyle:"normal"},text:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 2px rgba(0,0,0,0.04)"},header:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid"},field:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{borderRadius:12},title:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},status:{views:{label:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"9999px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Uc={cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral-clear"},Gc={metadata:_c,theme:Oc,tokens:Nc,components:qc,personality:Uc},Yc={id:"airbnb",label:"Airbnb",sourcePath:"design.md/html/airbnb.html",sourceTitle:"Design System Inspiration of Airbnb",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},Kc={primary:"#ff385c",secondary:"#222222",success:"#428bff",warning:"#460479",error:"#c13515",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Xc={rawCssVars:{primary:"#ff385c","primary-active":"#e00b41","primary-disabled":"#ffd1da",error:"#c13515",luxe:"#460479",plus:"#92174d",ink:"#222222",body:"#3f3f3f",muted:"#6a6a6a","muted-soft":"#929292",hairline:"#dddddd","hairline-soft":"#ebebeb","border-strong":"#c1c1c1",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#f2f2f2","on-primary":"#ffffff","legal-link":"#428bff",shadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",display:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",text:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, sans-serif"},colors:[{name:"primary",value:"#ff385c",role:"primary"},{name:"primary-active",value:"#e00b41",role:"primary active"},{name:"primary-disabled",value:"#ffd1da",role:"primary disabled"},{name:"error",value:"#c13515",role:"error"},{name:"luxe",value:"#460479",role:"luxe"},{name:"plus",value:"#92174d",role:"plus"},{name:"ink",value:"#222222",role:"ink"},{name:"body",value:"#3f3f3f",role:"body"},{name:"muted",value:"#6a6a6a",role:"muted"},{name:"muted-soft",value:"#929292",role:"muted soft"},{name:"hairline",value:"#dddddd",role:"hairline"},{name:"hairline-soft",value:"#ebebeb",role:"hairline soft"},{name:"border-strong",value:"#c1c1c1",role:"border strong"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#f2f2f2",role:"surface strong"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"legal-link",value:"#428bff",role:"legal link"},{name:"shadow",value:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0",role:"shadow"}],typography:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","48px","18px","20px","11px","28px","13px","12px","8px","64px","21px","10px","24px","36px","15px"],fontWeights:["400","600","700","500"],lineHeights:["1.5","1.1","1.43","1.25","2","1","1.2","1.35","1.4"]},spacing:["2px","4px","5px","6px","7px","8px","10px","11px","12px","13px","14px","16px","20px","23px","24px","28px","32px","40px","48px","56px"],radii:["9999px","8px","14px","4px","6px","3px"],shadows:["rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0","var(--shadow)"]},Jc={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:null,color:null,borderColor:null,borderRadius:6,fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},header:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.02) 0 0 0 1px, rgba(0, 0, 0, 0.04) 0 2px 6px 0, rgba(0, 0, 0, 0.1) 0 4px 8px 0"},field:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"14px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:16},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},alert:{views:{container:{borderRadius:16},title:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},status:{views:{label:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"14px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"14px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Qc={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:16,pillRadius:9999,badgeRadius:6,voice:"warm-welcoming"},Zc={metadata:Yc,theme:Kc,tokens:Xc,components:Jc,personality:Qc},ed={id:"apple",label:"Apple",sourcePath:"design.md/html/apple.html",sourceTitle:"Design System Inspiration of Apple",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},od={primary:"#0071E3",secondary:"#1d1d1f",success:"#0071e3",warning:"#272729",error:"#2997ff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},td={rawCssVars:{primary:"#0066cc","primary-focus":"#0071e3","primary-on-dark":"#2997ff",ink:"#1d1d1f",body:"#1d1d1f","body-on-dark":"#ffffff","body-muted":"#cccccc","ink-muted-80":"#333333","ink-muted-48":"#7a7a7a","divider-soft":"#f0f0f0",hairline:"#e0e0e0",canvas:"#ffffff","canvas-parchment":"#f5f5f7","surface-pearl":"#fafafc","surface-tile-1":"#272729","surface-tile-2":"#2a2a2c","surface-tile-3":"#252527","surface-black":"#000000","surface-chip-translucent":"rgba(210, 210, 215, 0.64)","on-primary":"#ffffff","on-dark":"#ffffff",display:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",text:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#0071E3",role:"primary"},{name:"primary-focus",value:"#0071e3",role:"primary focus"},{name:"primary-on-dark",value:"#2997ff",role:"primary on dark"},{name:"ink",value:"#1d1d1f",role:"ink"},{name:"body",value:"#1d1d1f",role:"body"},{name:"body-on-dark",value:"#ffffff",role:"body on dark"},{name:"body-muted",value:"#cccccc",role:"body muted"},{name:"ink-muted-80",value:"#333333",role:"ink muted 80"},{name:"ink-muted-48",value:"#7a7a7a",role:"ink muted 48"},{name:"divider-soft",value:"#f0f0f0",role:"divider soft"},{name:"hairline",value:"#e0e0e0",role:"hairline"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"canvas-parchment",value:"#f5f5f7",role:"canvas parchment"},{name:"surface-pearl",value:"#fafafc",role:"surface pearl"},{name:"surface-tile-1",value:"#272729",role:"surface tile 1"},{name:"surface-tile-2",value:"#2a2a2c",role:"surface tile 2"},{name:"surface-tile-3",value:"#252527",role:"surface tile 3"},{name:"surface-black",value:"#000000",role:"surface black"},{name:"surface-chip-translucent",value:"rgba(210, 210, 215, 0.64)",role:"surface chip translucent"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"}],typography:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["17px","14px","56px","21px","12px","40px","24px","13px","18px","28px","11px","34px","44px","32px","19px"],fontWeights:["400","600","300","700"],lineHeights:["1.47","1.07","1.19","1.1","1.43","1.5","1","1.14","2.0","2.41","1.2","1.35"]},spacing:["5px","6px","7px","8px","10px","11px","12px","14px","15px","16px","18px","20px","21px","22px","24px","28px","32px","44px","48px","50px"],radii:["9999px","18px","28px","24px","8px","11px","50%","12px","4px","6px","3px"],shadows:["0 5px 30px rgba(0, 0, 0, 0.22)"]},rd={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:8,fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:18,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 5px 30px rgba(0, 0, 0, 0.22)"},header:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"18px"},trigger:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:18},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},alert:{views:{container:{borderRadius:18},title:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},status:{views:{label:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"18px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"18px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},nd={cornerStyle:"soft",typeWeight:"light",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"flat",signatureMotif:"◯",density:"spacious",surfaceTone:"paper",cardRadius:18,pillRadius:9999,badgeRadius:8,voice:"minimal-precise"},ad={metadata:ed,theme:od,tokens:td,components:rd,personality:nd},id={id:"coinbase",label:"Coinbase",sourcePath:"design.md/html/coinbase.html",sourceTitle:"Design System Inspiration of Coinbase",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@500&display=swap"]},ld={primary:"#0052ff",secondary:"#0a0b0d",success:"#16a34a",warning:"#003ecc",error:"#dc2626",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},sd={rawCssVars:{primary:"#0052ff","primary-active":"#003ecc","primary-disabled":"#a8b8cc",ink:"#0a0b0d",body:"#5b616e",muted:"#7c828a","muted-soft":"#a8acb3",hairline:"#dee1e6","hairline-soft":"#eef0f3",canvas:"#ffffff","surface-soft":"#f7f7f7","surface-strong":"#eef0f3","surface-dark":"#0a0b0d","surface-dark-elevated":"#16181c","on-primary":"#ffffff","on-dark":"#ffffff","on-dark-soft":"#a8acb3","semantic-up":"#05b169","semantic-down":"#cf202f","accent-yellow":"#f4b000",display:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",text:"'Inter', 'Coinbase Sans', sans-serif",mono:"'JetBrains Mono', 'Coinbase Mono', monospace"},colors:[{name:"primary",value:"#0052ff",role:"primary"},{name:"primary-active",value:"#003ecc",role:"primary active"},{name:"primary-disabled",value:"#a8b8cc",role:"primary disabled"},{name:"ink",value:"#0a0b0d",role:"ink"},{name:"body",value:"#5b616e",role:"body"},{name:"muted",value:"#7c828a",role:"muted"},{name:"muted-soft",value:"#a8acb3",role:"muted soft"},{name:"hairline",value:"#dee1e6",role:"hairline"},{name:"hairline-soft",value:"#eef0f3",role:"hairline soft"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface-soft",value:"#f7f7f7",role:"surface soft"},{name:"surface-strong",value:"#eef0f3",role:"surface strong"},{name:"surface-dark",value:"#0a0b0d",role:"surface dark"},{name:"surface-dark-elevated",value:"#16181c",role:"surface dark elevated"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-soft",value:"#a8acb3",role:"on dark soft"},{name:"semantic-up",value:"#05b169",role:"semantic up"},{name:"semantic-down",value:"#cf202f",role:"semantic down"},{name:"accent-yellow",value:"#f4b000",role:"accent yellow"}],typography:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",monoFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontSizes:["16px","14px","72px","18px","13px","36px","12px","44px","11px","52px","28px","40px","32px","48px","26px"],fontWeights:["500","600","400","700"],lineHeights:["1.5","1.2","1.05","1.15","1.0","1.09","1","1.35","1.4"]},spacing:["4px","5px","6px","8px","10px","11px","12px","13px","14px","15px","16px","19px","20px","24px","28px","32px","40px","44px","48px","56px"],radii:["100px","24px","20px","16px","9999px","14px","12px","8px","6px","3px"],shadows:["0 16px 40px rgba(0,0,0,0.5)","0 16px 40px rgba(0,0,0,0.4)","0 4px 12px rgba(0,0,0,0.04)"]},cd={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 16px 40px rgba(0,0,0,0.5)"},header:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"16px"},trigger:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'Coinbase Mono', monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{borderRadius:12},title:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},status:{views:{label:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"16px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},dd={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"◆",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"trustworthy-financial"},ud={metadata:id,theme:ld,tokens:sd,components:cd,personality:dd},pd={id:"figma",label:"Figma",sourcePath:"design.md/html/figma.html",sourceTitle:"Design System Inspiration of Figma",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300..700&family=JetBrains+Mono:wght@400;500&display=swap"]},md={primary:"#F24E1E",secondary:"#A259FF",success:"#0ACF83",warning:"#FFC700",error:"#FF7262",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},gd={rawCssVars:{primary:"#000000","on-primary":"#ffffff",ink:"#000000",canvas:"#ffffff","inverse-canvas":"#000000","inverse-ink":"#ffffff",hairline:"#e6e6e6","hairline-soft":"#f1f1f1","surface-soft":"#f7f7f5","block-lime":"#dceeb1","block-lilac":"#c5b0f4","block-cream":"#f4ecd6","block-pink":"#efd4d4","block-mint":"#c8e6cd","block-coral":"#f3c9b6","block-navy":"#1f1d3d","accent-magenta":"#ff3d8b","semantic-success":"#1ea64a",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",mono:"'JetBrains Mono', 'SF Mono', Menlo, monospace"},colors:[{name:"primary",value:"#F24E1E",role:"primary"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#000000",role:"ink"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"inverse-canvas",value:"#000000",role:"inverse canvas"},{name:"inverse-ink",value:"#ffffff",role:"inverse ink"},{name:"hairline",value:"#e6e6e6",role:"hairline"},{name:"hairline-soft",value:"#f1f1f1",role:"hairline soft"},{name:"surface-soft",value:"#f7f7f5",role:"surface soft"},{name:"block-lime",value:"#dceeb1",role:"block lime"},{name:"block-lilac",value:"#c5b0f4",role:"block lilac"},{name:"block-cream",value:"#f4ecd6",role:"block cream"},{name:"block-pink",value:"#efd4d4",role:"block pink"},{name:"block-mint",value:"#c8e6cd",role:"block mint"},{name:"block-coral",value:"#f3c9b6",role:"block coral"},{name:"block-navy",value:"#1f1d3d",role:"block navy"},{name:"accent-magenta",value:"#ff3d8b",role:"accent magenta"},{name:"semantic-success",value:"#1ea64a",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",monoFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontSizes:["18px","16px","80px","20px","12px","40px","14px","11px","26px","24px","32px","13px","10px","56px","36px"],fontWeights:["320","330","480","600","500","700"],lineHeights:["1.45","1.0","1.4","1.1","1.6","1.35","1","1.2"]},spacing:["5px","6px","8px","10px","12px","14px","16px","20px","22px","24px","28px","32px","36px","40px","44px","48px","56px","64px","96px","100px"],radii:["50px","8px","9999px","24px","6px","2px","3px"],shadows:["0 0 0 2px rgba(0,0,0,0.08)","none","0 4px 16px rgba(0,0,0,0.06)","0 12px 32px rgba(0,0,0,0.18)"]},hd={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 2px rgba(0,0,0,0.08)"},header:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"12px"},trigger:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', 'SF Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},alert:{views:{container:{borderRadius:8},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},status:{views:{label:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},fd={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"✦",density:"comfortable",surfaceTone:"paper",cardRadius:8,pillRadius:9999,badgeRadius:4,voice:"playful-creative"},yd={metadata:pd,theme:md,tokens:gd,components:hd,personality:fd},xd={id:"linear",label:"Linear",sourcePath:"design.md/html/linear.html",sourceTitle:"Design System Inspiration of Linear",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400&display=swap"]},bd={primary:"#5e6ad2",secondary:"#828fff",success:"#27a644",warning:"#5e69d1",error:"#828fff",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},kd={rawCssVars:{primary:"#5e6ad2","primary-hover":"#828fff","primary-focus":"#5e69d1","on-primary":"#ffffff",ink:"#f7f8f8","ink-muted":"#d0d6e0","ink-subtle":"#8a8f98","ink-tertiary":"#62666d",canvas:"#010102","surface-1":"#0f1011","surface-2":"#141516","surface-3":"#18191a","surface-4":"#191a1b",hairline:"#23252a","hairline-strong":"#34343a","hairline-tertiary":"#3e3e44","semantic-success":"#27a644",sans:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",mono:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace"},colors:[{name:"primary",value:"#5e6ad2",role:"primary"},{name:"primary-hover",value:"#828fff",role:"primary hover"},{name:"primary-focus",value:"#5e69d1",role:"primary focus"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#f7f8f8",role:"ink"},{name:"ink-muted",value:"#d0d6e0",role:"ink muted"},{name:"ink-subtle",value:"#8a8f98",role:"ink subtle"},{name:"ink-tertiary",value:"#62666d",role:"ink tertiary"},{name:"canvas",value:"#08090A",role:"canvas"},{name:"surface-1",value:"#0f1011",role:"surface 1"},{name:"surface-2",value:"#141516",role:"surface 2"},{name:"surface-3",value:"#18191a",role:"surface 3"},{name:"surface-4",value:"#191a1b",role:"surface 4"},{name:"hairline",value:"#23252a",role:"hairline"},{name:"hairline-strong",value:"#34343a",role:"hairline strong"},{name:"hairline-tertiary",value:"#3e3e44",role:"hairline tertiary"},{name:"semantic-success",value:"#27a644",role:"semantic success"}],typography:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",monoFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontSizes:["16px","14px","80px","18px","13px","56px","15px","12px","11px","28px","40px","22px","10px","36px"],fontWeights:["400","500","600","700"],lineHeights:["1.50","1.05","1.20","1.10","1.5","1.6","1.25","1","1.2","1.35","1.4"]},spacing:["2px","5px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","48px","56px","64px","80px","96px","120px"],radii:["8px","12px","9999px","16px","4px","2px","6px","3px"],shadows:["rgba(255,255,255,0.05) 0 0.5px 0 0.5px","0 0 0 2px rgba(94,105,209,0.25)"]},Cd={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-on-primary",views:{container:{borderRadius:9999,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"theme-on-primary",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",letterSpacing:"-0.025em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(255,255,255,0.05) 0 0.5px 0 0.5px"},header:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.025em"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.025em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'JetBrains Mono', ui-monospace, 'SF Mono', menlo, monospace",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.025em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.025em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{borderRadius:12},title:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},description:{fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},status:{views:{label:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Sd={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.025em",accentTreatment:"gradient",signatureMotif:"↗",density:"tight",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"speed-clarity"},wd={metadata:xd,theme:bd,tokens:kd,components:Cd,personality:Sd},jd={id:"nike",label:"Nike",sourcePath:"design.md/html/nike.html",sourceTitle:"Design System Inspiration of Nike",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},vd={primary:"color-black",secondary:"#FA5400",success:"#76E0B5",warning:"#1151ff",error:"#d30005",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},Td={rawCssVars:{ink:"#111111","on-primary":"#ffffff",canvas:"#ffffff","soft-cloud":"#f5f5f5",charcoal:"#39393b",ash:"#4b4b4d",mute:"#707072",stone:"#9e9ea0",hairline:"#cacacb","hairline-soft":"#e5e5e5",sale:"#d30005","sale-deep":"#780700",success:"#007d48","success-bright":"#1eaa52",info:"#1151ff","info-deep":"#0034e3","accent-pink":"#ed1aa0","accent-pink-soft":"#ffb0dd","accent-purple-soft":"#beaffd","accent-purple-pale":"#d6d1ff","accent-teal":"#0a7281","accent-pink-deep":"#4c012d","font-display":"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif","font-ui":"'Inter', 'Helvetica Now Text Medium', Helvetica, Arial, sans-serif","font-body":"'Inter', 'Helvetica Now Text', Helvetica, Arial, sans-serif"},colors:[{name:"ink",value:"#111111",role:"ink"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"soft-cloud",value:"#f5f5f5",role:"soft cloud"},{name:"charcoal",value:"#39393b",role:"charcoal"},{name:"ash",value:"#4b4b4d",role:"ash"},{name:"mute",value:"#707072",role:"mute"},{name:"stone",value:"#9e9ea0",role:"stone"},{name:"hairline",value:"#cacacb",role:"hairline"},{name:"hairline-soft",value:"#e5e5e5",role:"hairline soft"},{name:"sale",value:"#d30005",role:"sale"},{name:"sale-deep",value:"#780700",role:"sale deep"},{name:"success",value:"#76E0B5",role:"success"},{name:"success-bright",value:"#1eaa52",role:"success bright"},{name:"info",value:"#1151ff",role:"info"},{name:"info-deep",value:"#0034e3",role:"info deep"},{name:"accent-pink",value:"#ed1aa0",role:"accent pink"},{name:"accent-pink-soft",value:"#ffb0dd",role:"accent pink soft"},{name:"accent-purple-soft",value:"#beaffd",role:"accent purple soft"},{name:"accent-purple-pale",value:"#d6d1ff",role:"accent purple pale"},{name:"accent-teal",value:"#0a7281",role:"accent teal"},{name:"accent-pink-deep",value:"#4c012d",role:"accent pink deep"}],typography:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","15px","14px","96px","18px","12px","56px","13px","11px","24px","40px","64px","48px","32px"],fontWeights:["700","500","600"],lineHeights:["1.5","0.92","1","1.4","1.6","0.9","1.2","1.75","1.7","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","12px","14px","16px","18px","20px","24px","28px","30px","32px","36px","40px","44px","48px","56px"],radii:["9999px","24px","14px","6px","3px"],shadows:["0 0 0 12px var(--soft-cloud)","0 20px 30px -10px rgba(0,0,0,0.18)","0 0 0 2px var(--canvas), 0 0 0 4px var(--ink)","inset 0 -1px 0 var(--hairline-soft)"]},Id={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"},content:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"italic"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"italic"},text:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 12px var(--soft-cloud)"},header:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontStyle:"italic",letterSpacing:"0.02em"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"italic"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"theme-secondary",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"theme-secondary",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"italic"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{borderRadius:4},title:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},description:{fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},status:{views:{label:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",color:"theme-primary"}}}},Rd={cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"italic",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"athletic-bold"},Fd={metadata:jd,theme:vd,tokens:Td,components:Id,personality:Rd},Md={id:"notion",label:"Notion",sourcePath:"design.md/html/notion.html",sourceTitle:"Design System Inspiration of Notion",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap"]},zd={primary:"#5645d4",secondary:"#ff64c8",success:"#1aae39",warning:"#dd5b00",error:"#ff64c8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Wd={rawCssVars:{primary:"#5645d4","primary-pressed":"#4534b3","primary-deep":"#3a2a99","on-primary":"#ffffff","brand-navy":"#0a1530","brand-navy-deep":"#070f24","link-blue":"#0075de","brand-pink":"#ff64c8","brand-orange":"#dd5b00","brand-purple":"#7b3ff2","brand-purple-800":"#391c57","brand-orange-deep":"#793400","brand-green":"#1aae39","brand-yellow":"#f5d75e","brand-teal":"#2a9d99","tint-peach":"#ffe8d4","tint-rose":"#fde0ec","tint-mint":"#d9f3e1","tint-lavender":"#e6e0f5","tint-sky":"#dcecfa","tint-yellow":"#fef7d6","tint-yellow-bold":"#f9e79f","tint-cream":"#f8f5e8",canvas:"#ffffff",surface:"#f6f5f4","surface-soft":"#fafaf9",hairline:"#e5e3df","hairline-soft":"#ede9e4","hairline-strong":"#c8c4be","hairline-dark":"rgba(255,255,255,0.16)","ink-deep":"#000000",ink:"#1a1a1a",charcoal:"#37352f",slate:"#5d5b54",steel:"#787671",stone:"#a4a097",muted:"#bbb8b1","on-dark":"#ffffff","on-dark-muted":"#a4a097"},colors:[{name:"primary",value:"#5645d4",role:"primary"},{name:"primary-pressed",value:"#4534b3",role:"primary pressed"},{name:"primary-deep",value:"#3a2a99",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"brand-navy",value:"#0a1530",role:"brand navy"},{name:"brand-navy-deep",value:"#070f24",role:"brand navy deep"},{name:"link-blue",value:"#0075de",role:"link blue"},{name:"brand-pink",value:"#ff64c8",role:"brand pink"},{name:"brand-orange",value:"#dd5b00",role:"brand orange"},{name:"brand-purple",value:"#7b3ff2",role:"brand purple"},{name:"brand-purple-800",value:"#391c57",role:"brand purple 800"},{name:"brand-orange-deep",value:"#793400",role:"brand orange deep"},{name:"brand-green",value:"#1aae39",role:"brand green"},{name:"brand-yellow",value:"#f5d75e",role:"brand yellow"},{name:"brand-teal",value:"#2a9d99",role:"brand teal"},{name:"tint-peach",value:"#ffe8d4",role:"tint peach"},{name:"tint-rose",value:"#fde0ec",role:"tint rose"},{name:"tint-mint",value:"#d9f3e1",role:"tint mint"},{name:"tint-lavender",value:"#e6e0f5",role:"tint lavender"},{name:"tint-sky",value:"#dcecfa",role:"tint sky"},{name:"tint-yellow",value:"#fef7d6",role:"tint yellow"},{name:"tint-yellow-bold",value:"#f9e79f",role:"tint yellow bold"},{name:"tint-cream",value:"#f8f5e8",role:"tint cream"},{name:"canvas",value:"#ffffff",role:"canvas"},{name:"surface",value:"#f6f5f4",role:"surface"},{name:"surface-soft",value:"#fafaf9",role:"surface soft"},{name:"hairline",value:"#e5e3df",role:"hairline"},{name:"hairline-soft",value:"#ede9e4",role:"hairline soft"},{name:"hairline-strong",value:"#c8c4be",role:"hairline strong"},{name:"hairline-dark",value:"rgba(255,255,255,0.16)",role:"hairline dark"},{name:"ink-deep",value:"#000000",role:"ink deep"},{name:"ink",value:"#1a1a1a",role:"ink"},{name:"charcoal",value:"#37352f",role:"charcoal"},{name:"slate",value:"#5d5b54",role:"slate"},{name:"steel",value:"#787671",role:"steel"},{name:"stone",value:"#a4a097",role:"stone"},{name:"muted",value:"#bbb8b1",role:"muted"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-muted",value:"#a4a097",role:"on dark muted"}],typography:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","15px","12px","80px","18px","48px","16px","13px","22px","11px","56px","36px","10px","20px","28px"],fontWeights:["500","600","400","700"],lineHeights:["1.55","1","1.05","1.15","1.4","1.3","1.5","1.1","1.2","1.35"]},spacing:["2px","4px","5px","6px","8px","10px","11px","12px","14px","15px","16px","18px","20px","24px","31px","32px","40px","44px","48px","56px"],radii:["6px","8px","16px","50%","12px","9999px","4px","3px"],shadows:["rgba(15, 15, 15, 0.20) 0px 24px 48px -8px","rgba(15,15,15,0.04) 0px 1px 2px 0px","rgba(15,15,15,0.08) 0px 4px 12px 0px","rgba(15,15,15,0.20) 0px 24px 48px -8px","rgba(15,15,15,0.16) 0px 16px 48px -8px"]},Ed={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",letterSpacing:"0em",textTransform:"none",fontWeight:400,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(15, 15, 15, 0.20) 0px 24px 48px -8px"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontStyle:"normal",letterSpacing:"0em"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"8px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"12px"},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:10},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"0em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},alert:{views:{container:{borderRadius:10},title:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},description:{fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},status:{views:{label:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"8px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"12px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Ad={cornerStyle:"soft",typeWeight:"regular",typeCase:"normal",typeStyle:"normal",letterSpacing:"0em",accentTreatment:"flat",signatureMotif:"◇",density:"comfortable",surfaceTone:"paper",cardRadius:10,pillRadius:9999,badgeRadius:4,voice:"thoughtful-quiet"},Hd={metadata:Md,theme:zd,tokens:Wd,components:Ed,personality:Ad},Vd={id:"revolut",label:"Revolut",sourcePath:"design.md/html/revolut.html",sourceTitle:"Design System Inspiration of Revolut",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap"]},Pd={primary:"#1361F0",secondary:"#101D31",success:"#16a34a",warning:"#d97706",error:"#e61e49",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},Dd={rawCssVars:{primary:"#494fdf","primary-bright":"#4f55f1","primary-deep":"#3a40c4","on-primary":"#ffffff",ink:"#191c1f",body:"#1f2226",charcoal:"#3a3d40",mute:"#505a63",ash:"#5c5e60",stone:"#8d969e",faint:"#c9c9cd","on-dark":"#ffffff","on-dark-mute":"rgba(255,255,255,0.72)","canvas-light":"#ffffff","canvas-dark":"#000000","surface-soft":"#f4f4f4","surface-card":"#ffffff","surface-deep":"#0a0a0a","surface-elevated":"#16181a","hairline-light":"#e2e2e7","hairline-dark":"rgba(255,255,255,0.12)","hairline-strong":"#191c1f","divider-soft":"rgba(255,255,255,0.06)",teal:"#00a87e","light-blue":"#007bc2","blue-link":"#376cd5","light-green":"#428619","green-text":"#006400",yellow:"#b09000",warning:"#ec7e00",pink:"#e61e49",danger:"#e23b4a","deep-red":"#8b0000",brown:"#936d62","font-display":"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif","font-ui":"'Inter', system-ui, sans-serif"},colors:[{name:"primary",value:"#1361F0",role:"primary"},{name:"primary-bright",value:"#4f55f1",role:"primary bright"},{name:"primary-deep",value:"#3a40c4",role:"primary deep"},{name:"on-primary",value:"#ffffff",role:"on primary"},{name:"ink",value:"#191c1f",role:"ink"},{name:"body",value:"#1f2226",role:"body"},{name:"charcoal",value:"#3a3d40",role:"charcoal"},{name:"mute",value:"#505a63",role:"mute"},{name:"ash",value:"#5c5e60",role:"ash"},{name:"stone",value:"#8d969e",role:"stone"},{name:"faint",value:"#c9c9cd",role:"faint"},{name:"on-dark",value:"#ffffff",role:"on dark"},{name:"on-dark-mute",value:"rgba(255,255,255,0.72)",role:"on dark mute"},{name:"canvas-light",value:"#ffffff",role:"canvas light"},{name:"canvas-dark",value:"#000000",role:"canvas dark"},{name:"surface-soft",value:"#f4f4f4",role:"surface soft"},{name:"surface-card",value:"#ffffff",role:"surface card"},{name:"surface-deep",value:"#0a0a0a",role:"surface deep"},{name:"surface-elevated",value:"#16181a",role:"surface elevated"},{name:"hairline-light",value:"#e2e2e7",role:"hairline light"},{name:"hairline-dark",value:"rgba(255,255,255,0.12)",role:"hairline dark"},{name:"hairline-strong",value:"#191c1f",role:"hairline strong"},{name:"divider-soft",value:"rgba(255,255,255,0.06)",role:"divider soft"},{name:"teal",value:"#00a87e",role:"teal"},{name:"light-blue",value:"#007bc2",role:"light blue"},{name:"blue-link",value:"#376cd5",role:"blue link"},{name:"light-green",value:"#428619",role:"light green"},{name:"green-text",value:"#006400",role:"green text"},{name:"yellow",value:"#b09000",role:"yellow"},{name:"warning",value:"#d97706",role:"warning"},{name:"pink",value:"#e61e49",role:"pink"},{name:"danger",value:"#e23b4a",role:"danger"},{name:"deep-red",value:"#8b0000",role:"deep red"},{name:"brown",value:"#936d62",role:"brown"}],typography:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","14px","18px","12px","96px","56px","24px","13px","32px","11px","64px","44px"],fontWeights:["600","500","700"],lineHeights:["1.5","1.0","1.56","1.4","1.33","1.19","1.6","1.2","1.35"]},spacing:["4px","6px","8px","10px","12px","13px","14px","16px","20px","24px","27px","28px","32px","36px","40px","48px","56px","64px","80px","88px"],radii:["9999px","20px","28px","36px","24px","12px","3px"],shadows:[]},$d={button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:20,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:20},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},alert:{views:{container:{borderRadius:20},title:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},status:{views:{label:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"24px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},Ld={cornerStyle:"pill",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"gradient",signatureMotif:"★",density:"comfortable",surfaceTone:"glass",cardRadius:20,pillRadius:9999,badgeRadius:9999,voice:"bold-fintech"},Bd={metadata:Vd,theme:Pd,tokens:Dd,components:$d,personality:Ld},_d={id:"shopify",label:"Shopify",sourcePath:"design.md/html/shopify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},Od={primary:"#008060",secondary:"#202223",success:"#008060",warning:"#FFC453",error:"#D72C0D",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},Nd={rawCssVars:{white:"#FFFFFF",black:"#000000","neon-green":"#36F4A4",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"neon-green",value:"#36F4A4",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},qd={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"color-aloe",color:"color-white",borderColor:"color-aloe",borderRadius:6,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-muted"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-muted"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-muted",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-muted"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-muted",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-muted",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{borderRadius:12},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},status:{views:{label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-muted"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-muted"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-muted"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},Ud={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"commerce-friendly"},Gd={metadata:_d,theme:Od,tokens:Nd,components:qd,personality:Ud},Yd={id:"spacex",label:"SpaceX",sourcePath:"design.md/html/spaceX.html",sourceTitle:"Design System Preview: SpaceX (Light)",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Share+Tech&display=swap"]},Kd={primary:"color-black",secondary:"#a3a3a3",success:"#4ade80",warning:"#fbbf24",error:"#ef4444",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},Xd={rawCssVars:{black:"#000000",spectral:"#f0f0fa","ghost-bg":"rgba(240,240,250,0.1)","ghost-border":"rgba(240,240,250,0.35)",overlay:"rgba(0,0,0,0.5)",font:"'Share Tech', Arial, Verdana, sans-serif"},colors:[{name:"black",value:"#000000",role:"black"},{name:"spectral",value:"#f0f0fa",role:"spectral"},{name:"ghost-bg",value:"rgba(240,240,250,0.1)",role:"ghost bg"},{name:"ghost-border",value:"rgba(240,240,250,0.35)",role:"ghost border"},{name:"overlay",value:"rgba(0,0,0,0.5)",role:"overlay"}],typography:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","13px","12px","48px","10px","32px","11px","9px","14px"],fontWeights:["700","400","600"],lineHeights:["1.50","1.00","1.70","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","18px","20px","24px","28px","32px","48px","60px","64px","72px","80px","120px"],radii:["32px","4px","2px","3px"],shadows:[]},Jd={button:{config:{variants:{ghost:{backgroundColor:"color-gray-50",borderColor:"color-gray-200"}}},variant:"ghost",size:"md",shape:"square",color:"theme-primary",textColor:"theme-primary",views:{container:{borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",color:"color-white",borderColor:"color-gray-50",borderRadius:0,fontFamily:"'Share Tech', Arial, Verdana, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)"},header:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontStyle:"normal",letterSpacing:"0.06em"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.06em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"color-gray-200"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-200"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-200",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"32px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},content:{color:"color-gray-200"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:2},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-200",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"0.06em",fontStyle:"normal"},caption:{color:"color-gray-200",fontStyle:"italic",letterSpacing:"0.06em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},alert:{views:{container:{borderRadius:2},title:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},description:{fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},status:{views:{label:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:0,views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:0},item:{color:"color-gray-200"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},eyebrow:{color:"color-gray-200"},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},description:{color:"color-gray-200"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},Qd={cornerStyle:"sharp",typeWeight:"black",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.06em",accentTreatment:"glow",signatureMotif:"⚡",density:"tight",surfaceTone:"mono",cardRadius:2,pillRadius:0,badgeRadius:0,voice:"technical-mission"},Zd={metadata:Yd,theme:Kd,tokens:Xd,components:Jd,personality:Qd},eu={id:"spotify",label:"Spotify",sourcePath:"design.md/html/spotify.html",sourceTitle:"Design System Inspired by Shopify",defaultAppearance:"dark",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"]},ou={primary:"#1DB954",secondary:"#C1FBD4",success:"#1DB954",warning:"#D4F9E0",error:"#D4D4D8",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#000000"},tu={rawCssVars:{white:"#FFFFFF",black:"#000000","spotify-green":"#1DB954",aloe:"#C1FBD4",pistachio:"#D4F9E0","deep-teal":"#02090A","dark-forest":"#061A1C",forest:"#102620","card-border":"#1E2C31","shade-30":"#D4D4D8",muted:"#A1A1AA","shade-50":"#71717A","shade-60":"#52525B","shade-70":"#3F3F46","light-border":"#E4E4E7","link-muted":"#9797A2","shadow-card":"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},colors:[{name:"white",value:"#FFFFFF",role:"white"},{name:"black",value:"#000000",role:"black"},{name:"spotify-green",value:"#1DB954",role:"neon green"},{name:"aloe",value:"#C1FBD4",role:"aloe"},{name:"pistachio",value:"#D4F9E0",role:"pistachio"},{name:"deep-teal",value:"#02090A",role:"deep teal"},{name:"dark-forest",value:"#061A1C",role:"dark forest"},{name:"forest",value:"#102620",role:"forest"},{name:"card-border",value:"#1E2C31",role:"card border"},{name:"shade-30",value:"#D4D4D8",role:"shade 30"},{name:"muted",value:"#A1A1AA",role:"muted"},{name:"shade-50",value:"#71717A",role:"shade 50"},{name:"shade-60",value:"#52525B",role:"shade 60"},{name:"shade-70",value:"#3F3F46",role:"shade 70"},{name:"light-border",value:"#E4E4E7",role:"light border"},{name:"link-muted",value:"#9797A2",role:"link muted"},{name:"shadow-card",value:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset",role:"shadow card"}],typography:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["20px","16px","14px","80px","48px","18px","12px","13px","11px","55px","32px","28px","24px","36px"],fontWeights:["400","600","500","330","360","550","700"],lineHeights:["1.5","0.96","1.14","1.56","1.16","1.28","1.4","1.49","1.2","1.35"]},spacing:["4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","40px","48px","64px","72px","80px","100px"],radii:["9999px","8px","4px","12px","2px","3px"],shadows:["rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset","0 0 0 2px var(--neon-green)","var(--shadow-card)","rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"]},ru={button:{variant:"filled",size:"md",shape:"pill",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:9999,fontFamily:"'Inter', Helvetica, Arial, sans-serif",letterSpacing:"-0.02em",textTransform:"none",fontWeight:800,fontStyle:"normal"},text:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:8,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},header:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.02em"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:16,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.1) 0px 0px 0px 1px, rgba(0,0,0,0.1) 0px 2px 2px 0px, rgba(0,0,0,0.1) 0px 4px 4px 0px, rgba(0,0,0,0.1) 0px 8px 8px 0px, rgba(255,255,255,0.03) 0px 1px 0px 0px inset"},field:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:9999},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:9999}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"color-black"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:"24px"},trigger:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:8},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.02em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{borderRadius:8},title:{fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},status:{views:{label:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"16px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"24px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},nu={cornerStyle:"pill",typeWeight:"black",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.02em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"matte",cardRadius:8,pillRadius:9999,badgeRadius:9999,voice:"rhythmic-vibrant"},au={metadata:eu,theme:ou,tokens:tu,components:ru,personality:nu},iu={id:"stripe",label:"Stripe",sourcePath:"design.md/html/stripe.html",sourceTitle:"Design System Preview: Stripe (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Source+Code+Pro:wght@400;500;700&display=swap"]},lu={primary:"#635BFF",secondary:"#f96bee",success:"#15be53",warning:"#9b6829",error:"#ea2261",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#ffffff"},su={rawCssVars:{purple:"#533afd","purple-hover":"#4434d4","purple-deep":"#2e2b8c","purple-light":"#b9b9f9","purple-mid":"#665efd",navy:"#061b31","dark-navy":"#0d253d","brand-dark":"#1c1e54",white:"#ffffff",ruby:"#ea2261",magenta:"#f96bee","magenta-light":"#ffd7ef",success:"#15be53","success-text":"#108c3d",lemon:"#9b6829",slate:"#64748d","dark-slate":"#273951",border:"#e5edf5","border-purple":"#b9b9f9","border-soft":"#d6d9fc","shadow-blue":"rgba(50,50,93,0.25)","shadow-dark-blue":"rgba(3,3,39,0.25)","shadow-black":"rgba(0,0,0,0.1)","shadow-ambient":"rgba(23,23,23,0.08)","shadow-soft":"rgba(23,23,23,0.06)","shadow-card":"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","shadow-ambient-card":"rgba(23,23,23,0.08) 0px 15px 35px 0px","shadow-subtle":"rgba(23,23,23,0.06) 0px 3px 6px 0px","font-primary":"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif","font-mono":"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace"},colors:[{name:"purple",value:"#533afd",role:"purple"},{name:"purple-hover",value:"#4434d4",role:"purple hover"},{name:"purple-deep",value:"#2e2b8c",role:"purple deep"},{name:"purple-light",value:"#b9b9f9",role:"purple light"},{name:"purple-mid",value:"#665efd",role:"purple mid"},{name:"navy",value:"#061b31",role:"navy"},{name:"dark-navy",value:"#0d253d",role:"dark navy"},{name:"brand-dark",value:"#1c1e54",role:"brand dark"},{name:"white",value:"#ffffff",role:"white"},{name:"ruby",value:"#ea2261",role:"ruby"},{name:"magenta",value:"#f96bee",role:"magenta"},{name:"magenta-light",value:"#ffd7ef",role:"magenta light"},{name:"success",value:"#15be53",role:"success"},{name:"success-text",value:"#108c3d",role:"success text"},{name:"lemon",value:"#9b6829",role:"lemon"},{name:"slate",value:"#64748d",role:"slate"},{name:"dark-slate",value:"#273951",role:"dark slate"},{name:"border",value:"#e5edf5",role:"border"},{name:"border-purple",value:"#b9b9f9",role:"border purple"},{name:"border-soft",value:"#d6d9fc",role:"border soft"},{name:"shadow-blue",value:"rgba(50,50,93,0.25)",role:"shadow blue"},{name:"shadow-dark-blue",value:"rgba(3,3,39,0.25)",role:"shadow dark blue"},{name:"shadow-black",value:"rgba(0,0,0,0.1)",role:"shadow black"},{name:"shadow-ambient",value:"rgba(23,23,23,0.08)",role:"shadow ambient"},{name:"shadow-soft",value:"rgba(23,23,23,0.06)",role:"shadow soft"},{name:"shadow-card",value:"rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px",role:"shadow card"},{name:"shadow-ambient-card",value:"rgba(23,23,23,0.08) 0px 15px 35px 0px",role:"shadow ambient card"},{name:"shadow-subtle",value:"rgba(23,23,23,0.06) 0px 3px 6px 0px",role:"shadow subtle"}],typography:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",monoFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontSizes:["16px","14px","48px","18px","12px","32px","13px","11px","10px","22px"],fontWeights:["100 900","300","400","500","700","600"],lineHeights:["1.40","1.15","1.10","1.50","1.2","1.35","1.4"]},spacing:["1px","6px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["0 0 6px 6px","4px","6px","2px","3px"],shadows:["rgba(50,50,93,0.25)","rgba(3,3,39,0.25)","rgba(0,0,0,0.1)","rgba(23,23,23,0.08)","rgba(23,23,23,0.06)","rgba(50,50,93,0.25) 0px 30px 45px -30px, rgba(0,0,0,0.1) 0px 18px 36px -18px","rgba(23,23,23,0.08) 0px 15px 35px 0px","rgba(23,23,23,0.06) 0px 3px 6px 0px","var(--shadow-subtle)","var(--shadow-card)","0 0 0 1px theme-primary","0 0 0 1px var(--ruby)"]},cu={button:{variant:"filled",size:"md",shape:"rounded",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:9999,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:6,fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",letterSpacing:"-0.022em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:12,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(23,23,23,0.06) 0px 3px 6px 0px"},header:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontStyle:"normal",letterSpacing:"-0.022em"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:10,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px theme-primary"},field:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.022em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:4},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:4}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-white",color:"color-black",borderRadius:"6px"},trigger:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:12},thead:{backgroundColor:"color-white",color:"color-black"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Source Code Pro', SFMono-Regular, ui-monospace, Menlo, monospace",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"-0.022em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.022em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},alert:{views:{container:{borderRadius:12},title:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},status:{views:{label:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black"}}}},du={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.022em",accentTreatment:"gradient",signatureMotif:"↗",density:"comfortable",surfaceTone:"glass",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"refined-fintech"},uu={metadata:iu,theme:lu,tokens:su,components:cu,personality:du},pu={id:"tesla",label:"Tesla",sourcePath:"design.md/html/tesla.html",sourceTitle:"Design System Inspired by Tesla",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Inter:wght@400;500&display=swap"]},mu={primary:"#3E6AE1",secondary:"#171A20",success:"#3E6AE1",warning:"#5C5E62",error:"#171A20",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"#FFFFFF"},gu={rawCssVars:{"electric-blue":"#3E6AE1","pure-white":"#FFFFFF","carbon-dark":"#171A20",graphite:"#393C41",pewter:"#5C5E62","silver-fog":"#8E8E8E","cloud-gray":"#EEEEEE","pale-silver":"#D0D1D2","light-ash":"#F4F4F4","frosted-glass":"rgba(255,255,255,0.75)",overlay:"rgba(128,128,128,0.65)","subtle-shadow":"rgba(0,0,0,0.05)","font-display":"'Inter', -apple-system, Arial, sans-serif","font-text":"'Inter', -apple-system, Arial, sans-serif"},colors:[{name:"electric-blue",value:"#3E6AE1",role:"electric blue"},{name:"pure-white",value:"#FFFFFF",role:"pure white"},{name:"carbon-dark",value:"#171A20",role:"carbon dark"},{name:"graphite",value:"#393C41",role:"graphite"},{name:"pewter",value:"#5C5E62",role:"pewter"},{name:"silver-fog",value:"#8E8E8E",role:"silver fog"},{name:"cloud-gray",value:"#EEEEEE",role:"cloud gray"},{name:"pale-silver",value:"#D0D1D2",role:"pale silver"},{name:"light-ash",value:"#F4F4F4",role:"light ash"},{name:"frosted-glass",value:"rgba(255,255,255,0.75)",role:"frosted glass"},{name:"overlay",value:"rgba(128,128,128,0.65)",role:"overlay"},{name:"subtle-shadow",value:"rgba(0,0,0,0.05)",role:"subtle shadow"}],typography:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["14px","40px","28px","13px","12px","11px","17px","16px"],fontWeights:["400","500","700","600"],lineHeights:["1.43","48px","20px","1.2","1.3","36px","1.35","1.4"]},spacing:["4px","6px","8px","10px","12px","14px","16px","20px","24px","32px","40px","48px","56px","60px","64px","80px","100px"],radii:["4px","4px 4px 0 0","0 0 4px 4px","12px","3px"],shadows:["rgba(0,0,0,0.05)","0 1px 0 var(--pewter)"]},hu={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"},content:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.08em",textTransform:"uppercase",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'Inter', -apple-system, Arial, sans-serif",letterSpacing:"0.08em",textTransform:"uppercase",fontWeight:300,fontStyle:"normal"},text:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:0,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.05)"},header:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:600,borderColor:"color-gray-200"},content:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontStyle:"normal",letterSpacing:"0.02em"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"none"},field:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},helperText:{},text:{letterSpacing:"0.02em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},infoText:{color:"theme-warning"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"color-black"},valueLabel:{color:"theme-warning"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"theme-warning",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"'Inter', -apple-system, Arial, sans-serif"},activeText:{color:"theme-primary"},content:{color:"color-black"},container:{borderRadius:"4px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"color-black",borderRadius:0},trigger:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},content:{color:"theme-warning"}}},table:{views:{table:{backgroundColor:"color-white",color:"color-black",borderColor:"color-gray-200",borderRadius:0},thead:{backgroundColor:"color-gray-50",color:"color-black"},th:{color:"theme-warning",borderColor:"color-gray-200",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"color-black",borderColor:"color-gray-200",letterSpacing:"0.02em",fontStyle:"normal"},caption:{color:"theme-warning",fontStyle:"italic",letterSpacing:"0.02em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black",borderRadius:"50%"},fallback:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},alert:{views:{container:{borderRadius:0},title:{fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},description:{fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},status:{views:{label:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"4px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"color-black"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",borderRadius:0},item:{color:"theme-warning"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},eyebrow:{color:"theme-warning"},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},description:{color:"theme-warning"}}},page:{views:{container:{backgroundColor:"color-white",color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"color-black"}}}},fu={cornerStyle:"sharp",typeWeight:"light",typeCase:"uppercase",typeStyle:"normal",letterSpacing:"0.02em",accentTreatment:"flat",signatureMotif:"▲",density:"spacious",surfaceTone:"mono",cardRadius:0,pillRadius:0,badgeRadius:0,voice:"futurist-clean"},yu={metadata:pu,theme:mu,tokens:gu,components:hu,personality:fu},xu={id:"uber",label:"Uber",sourcePath:"design.md/html/uber.html",sourceTitle:"Design System Preview: Uber (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,700&display=swap"]},bu={primary:"color-black",secondary:"#efefef",success:"#06C167",warning:"#e2e2e2",error:"#000000",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},ku={rawCssVars:{"color-black":"#000000","color-white":"#ffffff","color-hover-gray":"#e2e2e2","color-hover-light":"#f3f3f3","color-chip-gray":"#efefef","color-body-gray":"#4b4b4b","color-muted-gray":"#afafaf","shadow-card":"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","shadow-medium":"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","shadow-float":"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","shadow-press":"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","font-display":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","font-body":"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif","bg-page":"#ffffff","bg-card":"#ffffff","bg-nav":"rgba(255,255,255,0.92)","text-primary":"#000000","text-secondary":"#4b4b4b","text-tertiary":"#afafaf","border-color":"#efefef","section-label-color":"#000000"},colors:[{name:"color-black",value:"#000000",role:"color black"},{name:"color-white",value:"#ffffff",role:"color white"},{name:"color-hover-gray",value:"#e2e2e2",role:"color hover gray"},{name:"color-hover-light",value:"#f3f3f3",role:"color hover light"},{name:"color-chip-gray",value:"#efefef",role:"color chip gray"},{name:"color-body-gray",value:"#4b4b4b",role:"color body gray"},{name:"color-muted-gray",value:"#afafaf",role:"color muted gray"},{name:"shadow-card",value:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px",role:"shadow card"},{name:"shadow-medium",value:"rgba(0, 0, 0, 0.16) 0px 4px 16px 0px",role:"shadow medium"},{name:"shadow-float",value:"rgba(0, 0, 0, 0.16) 0px 2px 8px 0px",role:"shadow float"},{name:"shadow-press",value:"rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset",role:"shadow press"},{name:"bg-page",value:"#ffffff",role:"bg page"},{name:"bg-card",value:"#ffffff",role:"bg card"},{name:"bg-nav",value:"rgba(255,255,255,0.92)",role:"bg nav"},{name:"text-primary",value:"#000000",role:"text primary"},{name:"text-secondary",value:"#4b4b4b",role:"text secondary"},{name:"text-tertiary",value:"#afafaf",role:"text tertiary"},{name:"border-color",value:"#efefef",role:"border color"},{name:"section-label-color",value:"#000000",role:"section label color"}],typography:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",monoFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSizes:["16px","18px","14px","64px","20px","12px","36px","13px","24px","28px"],fontWeights:["700","500","400","600"],lineHeights:["1.50","1.10","1.22","1.33","2.0","1.2","1.35","1.4"]},spacing:["8px","10px","12px","14px","16px","20px","24px","28px","32px","36px","40px","50px","60px","64px","80px","100px","120px","140px"],radii:["8px","999px","12px","16px","4px","3px"],shadows:["rgba(0, 0, 0, 0.12) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 4px 16px 0px","rgba(0, 0, 0, 0.16) 0px 2px 8px 0px","rgba(0, 0, 0, 0.08) 0px 0px 0px 999px inset","var(--shadow-card)","var(--shadow-float)","var(--shadow-medium)","0 0 0 1px color-black","rgba(0,0,0,0.12) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 4px 16px 0px","rgba(0,0,0,0.16) 0px 2px 8px 0px","rgba(0,0,0,0.08) 0px 0px 0px 999px inset"]},Cu={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"pill",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:0,fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",letterSpacing:"-0.01em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"square",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0, 0, 0, 0.12) 0px 4px 16px 0px"},header:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:600,borderColor:"theme-warning"},content:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},footer:{borderColor:"theme-warning"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontStyle:"normal",letterSpacing:"-0.01em"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"0 0 0 1px color-black"},field:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.01em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"theme-warning",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"theme-warning",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"theme-warning"},circle:{backgroundColor:"color-white"},label:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"theme-warning"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"pill",views:{headerTabs:{borderColor:"theme-warning"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"theme-primary"},title:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},activeText:{color:"color-white"},content:{color:"theme-primary"},container:{borderRadius:"9999px"}}},accordion:{views:{container:{borderColor:"theme-warning",backgroundColor:"color-white",color:"theme-primary",borderRadius:0},trigger:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"theme-warning",borderRadius:4},thead:{backgroundColor:"color-white",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"theme-warning",fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"theme-warning"},td:{color:"theme-primary",borderColor:"theme-warning",letterSpacing:"-0.01em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.01em"}}},avatar:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},alert:{views:{container:{borderRadius:4},title:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},status:{views:{label:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},progress:{color:"theme-primary",backgroundColor:"theme-warning",radius:"8px",views:{container:{backgroundColor:"theme-warning",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"theme-warning",views:{container:{borderColor:"theme-warning"},label:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary",borderRadius:0},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},section:{backgroundColor:"color-white",borderColor:"theme-warning"},surface:{backgroundColor:"color-white",borderColor:"theme-warning",color:"theme-primary"}}}},Su={cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"▶",density:"tight",surfaceTone:"mono",cardRadius:4,pillRadius:0,badgeRadius:0,voice:"motion-utility"},wu={metadata:xu,theme:bu,tokens:ku,components:Cu,personality:Su},ju={id:"vercel",label:"Vercel",sourcePath:"design.md/html/vercel.html",sourceTitle:"Design System Preview: Vercel (Light)",defaultAppearance:"light",googleFontLinks:["https://fonts.googleapis.com/css2?family=Geist:wght@400;500;600;700&family=Geist+Mono:wght@400;500;600&display=swap"]},vu={primary:"color-black",secondary:"#0072f5",success:"#0a72ef",warning:"#de1d8d",error:"#ff5b4f",canvas:"color-white",surface:"color-gray-50",text:"color-black",muted:"color-gray-500",border:"color-gray-200",onPrimary:"color-white"},Tu={rawCssVars:{black:"#171717",white:"#ffffff","gray-50":"#fafafa","gray-100":"#ebebeb","gray-400":"#808080","gray-500":"#666666","gray-600":"#4d4d4d","link-blue":"#0072f5","focus-blue":"hsl(212,100%,48%)","ship-red":"#ff5b4f","preview-pink":"#de1d8d","develop-blue":"#0a72ef","console-blue":"#0070f3","console-purple":"#7928ca","console-pink":"#eb367f","badge-bg":"#ebf5ff","badge-text":"#0068d6","shadow-ring":"rgba(0,0,0,0.08) 0px 0px 0px 1px","shadow-ring-light":"rgb(235,235,235) 0px 0px 0px 1px","shadow-subtle":"rgba(0,0,0,0.04) 0px 2px 2px 0px","shadow-card":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","shadow-card-full":"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","font-sans":"'Geist', system-ui, -apple-system, Arial, sans-serif","font-mono":"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace"},colors:[{name:"black",value:"#171717",role:"black"},{name:"white",value:"#ffffff",role:"white"},{name:"gray-50",value:"#fafafa",role:"gray 50"},{name:"gray-100",value:"#ebebeb",role:"gray 100"},{name:"gray-400",value:"#808080",role:"gray 400"},{name:"gray-500",value:"#666666",role:"gray 500"},{name:"gray-600",value:"#4d4d4d",role:"gray 600"},{name:"link-blue",value:"#0072f5",role:"link blue"},{name:"focus-blue",value:"hsl(212,100%,48%)",role:"focus blue"},{name:"ship-red",value:"#ff5b4f",role:"ship red"},{name:"preview-pink",value:"#de1d8d",role:"preview pink"},{name:"develop-blue",value:"#0a72ef",role:"develop blue"},{name:"console-blue",value:"#0070f3",role:"console blue"},{name:"console-purple",value:"#7928ca",role:"console purple"},{name:"console-pink",value:"#eb367f",role:"console pink"},{name:"badge-bg",value:"#ebf5ff",role:"badge bg"},{name:"badge-text",value:"#0068d6",role:"badge text"},{name:"shadow-ring",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px",role:"shadow ring"},{name:"shadow-ring-light",value:"rgb(235,235,235) 0px 0px 0px 1px",role:"shadow ring light"},{name:"shadow-subtle",value:"rgba(0,0,0,0.04) 0px 2px 2px 0px",role:"shadow subtle"},{name:"shadow-card",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card"},{name:"shadow-card-full",value:"rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px",role:"shadow card full"}],typography:{fontFamily:"var(--font-sans)",monoFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontSizes:["16px","14px","48px","20px","12px","32px","13px","11px","10px","36px"],fontWeights:["400","600","500","700"],lineHeights:["1.50","1.00","1.80","1.25","1.2","1.35","1.4"]},spacing:["2px","4px","8px","10px","12px","14px","16px","20px","24px","28px","32px","48px","64px","72px","80px","96px"],radii:["6px","8px","9999px","3px"],shadows:["rgba(0,0,0,0.08) 0px 0px 0px 1px","rgb(235,235,235) 0px 0px 0px 1px","rgba(0,0,0,0.04) 0px 2px 2px 0px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgb(250,250,250) 0px 0px 0px 1px","rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, rgb(250,250,250) 0px 0px 0px 1px","var(--shadow-ring)","var(--shadow-ring-light)","var(--shadow-card)","var(--shadow-card-full)","0 0 0 2px var(--focus-blue)","0 0 0 2px var(--ship-red)"]},Iu={button:{variant:"filled",size:"md",shape:"square",color:"theme-primary",textColor:"theme-onPrimary",views:{container:{borderRadius:4,fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},content:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"}}},badge:{variant:"filled",size:"sm",shape:"rounded",views:{container:{backgroundColor:"theme-secondary",color:"color-white",borderColor:"theme-secondary",borderRadius:4,fontFamily:"var(--font-sans)",letterSpacing:"-0.04em",textTransform:"none",fontWeight:700,fontStyle:"normal"},text:{fontFamily:"var(--font-sans)",fontWeight:600}}},card:{variant:"outlined",size:"md",shape:"rounded",views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:4,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},header:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:600,borderColor:"color-gray-200"},content:{color:"color-gray-500",fontFamily:"var(--font-sans)"},footer:{borderColor:"color-gray-200"}}},input:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},textarea:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)",fontStyle:"normal",letterSpacing:"-0.04em"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{}}},select:{size:"md",shape:"default",variant:"default",views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:2,borderWidth:"1px",borderStyle:"solid",boxShadow:"rgba(0,0,0,0.08) 0px 0px 0px 1px"},field:{color:"theme-primary",fontFamily:"var(--font-sans)"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},helperText:{},text:{letterSpacing:"-0.04em",fontStyle:"normal"}}},checkbox:{size:"md",views:{checkbox:{borderColor:"color-gray-200",backgroundColor:"color-white",_checked:{backgroundColor:"theme-primary",borderColor:"theme-primary"},borderRadius:0},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:0}}},radio:{size:"md",views:{radio:{borderColor:"color-gray-200",backgroundColor:"color-white"},dot:{backgroundColor:"theme-primary"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},infoText:{color:"color-gray-500"},container:{borderRadius:"50%"}}},switch:{size:"sm",views:{slider:{backgroundColor:"color-gray-200"},circle:{backgroundColor:"color-white"},label:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},container:{borderRadius:"9999px"}}},slider:{backgroundColor:"theme-primary",views:{track:{backgroundColor:"color-gray-200"},progress:{backgroundColor:"theme-primary"},filledTrack:{backgroundColor:"theme-primary"},thumb:{borderColor:"theme-primary",backgroundColor:"color-white"},label:{color:"theme-primary"},valueLabel:{color:"color-gray-500"}}},tabs:{variant:"underline",views:{headerTabs:{borderColor:"color-gray-200"},tab:{color:"color-gray-500",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},activeTab:{color:"theme-primary",borderColor:"theme-primary",backgroundColor:"transparent"},title:{fontFamily:"var(--font-sans)"},activeText:{color:"theme-primary"},content:{color:"theme-primary"},container:{borderRadius:"6px"}}},accordion:{views:{container:{borderColor:"color-gray-200",backgroundColor:"color-gray-50",color:"theme-primary",borderRadius:"6px"},trigger:{color:"theme-primary",fontFamily:"var(--font-sans)"},content:{color:"color-gray-500"}}},table:{views:{table:{backgroundColor:"color-white",color:"theme-primary",borderColor:"color-gray-200",borderRadius:4},thead:{backgroundColor:"color-gray-50",color:"theme-primary"},th:{color:"color-gray-500",borderColor:"color-gray-200",fontFamily:"'Geist Mono', ui-monospace, SFMono-Regular, 'Roboto Mono', Menlo, monospace",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},tr:{borderColor:"color-gray-200"},td:{color:"theme-primary",borderColor:"color-gray-200",letterSpacing:"-0.04em",fontStyle:"normal"},caption:{color:"color-gray-500",fontStyle:"italic",letterSpacing:"-0.04em"}}},avatar:{views:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"50%"},fallback:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},alert:{views:{container:{borderRadius:4},title:{fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},description:{fontFamily:"var(--font-sans)"}}},status:{views:{label:{color:"theme-primary",fontFamily:"var(--font-sans)"}}},progress:{color:"theme-primary",backgroundColor:"color-gray-200",radius:"6px",views:{container:{backgroundColor:"color-gray-200",borderRadius:"9999px"},bar:{backgroundColor:"theme-primary"},text:{color:"theme-primary"}}},loader:{color:"theme-primary"},separator:{color:"color-gray-200",views:{container:{borderColor:"color-gray-200"},label:{color:"color-gray-500",fontFamily:"var(--font-sans)"}}},navigation:{views:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",color:"theme-primary",borderRadius:"6px"},item:{color:"color-gray-500"},activeItem:{color:"theme-primary",borderColor:"theme-primary"}}},hero:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},eyebrow:{color:"color-gray-500"},title:{color:"theme-primary",fontFamily:"var(--font-sans)"},description:{color:"color-gray-500"}}},page:{views:{container:{backgroundColor:"color-white",color:"theme-primary",fontFamily:"var(--font-sans)"},section:{backgroundColor:"color-white",borderColor:"color-gray-200"},surface:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",color:"theme-primary"}}}},Ru={cornerStyle:"sharp",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.04em",accentTreatment:"flat",signatureMotif:"▲",density:"comfortable",surfaceTone:"mono",cardRadius:4,pillRadius:4,badgeRadius:4,voice:"deploy-geometric"},Fu={metadata:ju,theme:vu,tokens:Tu,components:Iu,personality:Ru},vn={airbnb:Zc,apple:ad,coinbase:ud,figma:yd,linear:wd,nike:Fd,notion:Hd,revolut:Bd,shopify:Gd,spacex:Zd,spotify:au,stripe:uu,tesla:yu,uber:wu,vercel:Fu},Mu=Object.values(vn),Ci=Gc,zu=({children:e,id:o,appearance:r})=>t.jsx("div",{"data-design-system":o,"data-appearance":r,style:{display:"contents"},children:e}),et=e=>!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.toString.call(e)==="[object Object]",Tn=e=>e,no=(...e)=>{const o={};return e.forEach(r=>{et(r)&&Object.entries(r).forEach(([n,a])=>{if(a!=null){if(et(a)&&et(o[n])){o[n]=no(o[n],a);return}o[n]=a}})}),o},Si=e=>{if(Array.isArray(e)||!et(e))return e;const o={};for(const[r,n]of Object.entries(e))n!==null&&(o[r]=et(n)?Si(n):n);return o},Wu=new Set(["button"]),Eu=["backgroundColor","background","borderColor","color"],ma=new Set,Au=(e,o)=>{if(process.env.NODE_ENV!=="production"&&!(!o||!Wu.has(e))&&!ma.has(e))for(const[r,n]of Object.entries(o)){if(!et(n))continue;const a=Eu.filter(i=>n[i]!=null);if(a.length>0){ma.add(e),console.warn(`[design-system] components.${e}.views.${r} sets ${a.join(", ")} — view styles apply above every variant, so this flattens ghost/outline/subtle into solid blocks. Move colors to components.${e}.config.variants.<variant> (merged under each variant); keep views to shape and typography.`);return}}},In=(e,o)=>{if(!o)return{};const r=o.components[e]||{},n=Tn(Si(r));return Au(e,n.views),n},wi=(e,o,r)=>{const{config:n,...a}=o,i=In(e,r),l=no(i,n||{});return Tn(no(l,a))},rn=p.createContext({isEnabled:!1}),Rn=({children:e,config:o,configId:r,mode:n,targetWindow:a,inheritTheme:i=!1})=>{const l=o||(r?vn[r]:null)||Ci,{themeMode:u}=s.useTheme(),c=n??u??l.metadata.defaultAppearance,d=p.useMemo(()=>({config:l,configId:l.metadata.id,isEnabled:!0}),[l]),g=t.jsx(zu,{id:l.metadata.id,appearance:c,children:e});return i?t.jsx(rn.Provider,{value:d,children:g}):t.jsx(rn.Provider,{value:d,children:t.jsx(s.ThemeProvider,{theme:l.theme,mode:c,targetWindow:a,transparentWrapper:!0,children:g})})},Sr=()=>p.useContext(rn),ct=e=>{const{config:o}=Sr();return In(e,o)},ve=(e,o)=>{const{config:r}=Sr();return wi(e,o,r)},ji=p.createContext({expandedItems:[],toggleItem:()=>{},isItemExpanded:()=>!1,type:"single",collapsible:!1,baseId:""}),Hu=({children:e,value:o})=>t.jsx(ji.Provider,{value:o,children:e}),vi=()=>{const e=p.useContext(ji);if(!e)throw new Error("useAccordionContext must be used within an AccordionProvider");return e},Vu=({value:e,children:o,isDisabled:r=!1,views:n,...a})=>{var h;const{isItemExpanded:i,baseId:l}=vi(),u=ct("accordion"),c=no({item:(h=u.views)==null?void 0:h.container},n),d=i(e),g=`${l}-trigger-${e}`,m=`${l}-content-${e}`;return t.jsx(s.View,{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",overflow:"hidden",opacity:r?.5:1,pointerEvents:r?"none":"auto","data-state":d?"open":"closed","data-disabled":r?"":void 0,...c==null?void 0:c.item,...a,children:p.Children.map(o,f=>p.isValidElement(f)?p.cloneElement(f,{...f.props,value:e,isExpanded:d,isDisabled:r,triggerId:g,contentId:m}):f)})},Pu=({children:e,value:o,isExpanded:r,isDisabled:n,triggerId:a,contentId:i,views:l,asChild:u=!1,...c})=>{var y;const{toggleItem:d}=vi(),g=ct("accordion"),m=no({container:(y=g.views)==null?void 0:y.trigger},l),f={id:a,"aria-expanded":r,"aria-controls":i,"aria-disabled":n,"data-state":r?"open":"closed","data-disabled":n?"":void 0,onClick:()=>{o&&!n&&d(o)},padding:16,cursor:n?"not-allowed":"pointer",alignItems:"center",justifyContent:"space-between",width:"100%",style:{backgroundColor:"transparent"},...m==null?void 0:m.container,...c};if(u&&p.isValidElement(e)){const k=p.Children.only(e);return p.cloneElement(k,{...f,...k.props})}return t.jsxs(s.Horizontal,{...f,children:[e,t.jsx(s.View,{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:r?"rotate(180deg)":"rotate(0deg)",...m==null?void 0:m.icon,children:t.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M16.59 8.59L12 13.17L7.41 8.59L6 10L12 16L18 10L16.59 8.59Z",fill:"currentColor"})})})]})},Du=({children:e,isExpanded:o,isDisabled:r,triggerId:n,contentId:a,views:i,...l})=>{var x;const u=ct("accordion"),c=no({container:(x=u.views)==null?void 0:x.content},i),d=260,g=p.useRef(null),m=p.useRef(null),[h,f]=p.useState(!!o),[y,k]=p.useState(o?"none":"0px"),[b,j]=p.useState(o?1:0);return p.useEffect(()=>()=>{m.current&&clearTimeout(m.current)},[]),p.useEffect(()=>{var v;if(m.current&&(clearTimeout(m.current),m.current=null),o){f(!0),requestAnimationFrame(()=>{var I;const S=((I=g.current)==null?void 0:I.scrollHeight)??0;k(`${S}px`),j(1)});return}const C=((v=g.current)==null?void 0:v.scrollHeight)??0;k(`${C}px`),j(1),requestAnimationFrame(()=>{k("0px"),j(0)}),m.current=setTimeout(()=>{f(!1)},d)},[o,e]),p.useEffect(()=>{var v;if(!o||!h)return;const C=((v=g.current)==null?void 0:v.scrollHeight)??0;k(`${C}px`)},[e,o,h]),h?t.jsx(s.View,{id:a,role:"region","aria-labelledby":n,overflow:"hidden",maxHeight:y,opacity:b,transition:`max-height ${d}ms cubic-bezier(0.22, 1, 0.36, 1), opacity ${d}ms ease`,"data-state":o?"open":"closed","data-disabled":r?"":void 0,style:{backgroundColor:"transparent"},...c==null?void 0:c.container,...l,children:t.jsx(s.View,{ref:g,padding:16,children:e})}):null},$u=({children:e,shape:o="rounded",variant:r="default",views:n,baseId:a,type:i,collapsible:l,themeMode:u,...c})=>t.jsx(s.Vertical,{width:"100%","data-orientation":"vertical",...Lc[o],...Bc[r],...n==null?void 0:n.container,...c,children:e}),Lu=e=>{const o=ve("accordion",e),{children:r,type:n="single",value:a,defaultValue:i,onValueChange:l,collapsible:u=!1,shape:c="rounded",variant:d="default",views:g,...m}=o,h=Array.isArray(i)?i:i?[i]:void 0,f=$c({type:n,value:a,defaultValue:i??h,onValueChange:l,collapsible:u});return t.jsx(Hu,{value:{expandedItems:f.expandedItems,toggleItem:f.toggleItem,isItemExpanded:f.isItemExpanded,type:f.type,collapsible:f.collapsible,baseId:f.baseId},children:t.jsx($u,{shape:c,variant:d,views:g,baseId:f.baseId,type:f.type,collapsible:f.collapsible,...m,children:r})})},Ke=Lu;Ke.Item=Vu;Ke.Trigger=Pu;Ke.Content=Du;const Bu=({isOpen:e,defaultOpen:o=!1,value:r,defaultValue:n,isMulti:a=!1,onOpenChange:i,onClose:l})=>{const u=typeof e=="boolean",c=r!==void 0,d=n??(a?[]:""),[g,m]=p.useState(o),[h,f]=p.useState(d),y=u?!!e:g,k=c?r:h,b=p.useCallback(C=>{u||m(C),i==null||i(C),C||l==null||l()},[u,l,i]),j=p.useCallback(()=>{b(!1)},[b]),x=p.useCallback(C=>{c||f(C)},[c]);return{isSheetOpen:y,selectedValue:k,setSelectedValue:x,closeSheet:j}},At=({children:e,containerId:o="portal-root"})=>{const[r,n]=p.useState(null);return p.useEffect(()=>{let a=document.getElementById(o),i=!1;return a||(i=!0,a=document.createElement("div"),a.setAttribute("id",o),document.body.appendChild(a)),n(a),()=>{i&&a&&a.parentNode&&a.childNodes.length===0&&a.parentNode.removeChild(a)}},[o]),r?Dc.createPortal(e,r):null},Dr=new Map,_u=(e,o,r)=>(Dr.has(e)||Dr.set(e,p.lazy(()=>import("lucide-react/dynamicIconImports").then(n=>{const a=n.default[e];return a?a():{default:()=>t.jsx(t.Fragment,{children:o||r})}}))),Dr.get(e)),ga=p.memo(({widthHeight:e,color:o="currentColor",transform:r,orientation:n="up",children:a,...i})=>t.jsx(s.View,{widthHeight:e,color:o,display:"flex",alignItems:"center",justifyContent:"center",transform:r||(n==="left"?"rotate(-90deg)":n==="right"?"rotate(90deg)":n==="up"?"rotate(0deg)":n==="down"?"rotate(180deg)":"none"),...i,children:a})),zt=p.memo(({name:e="circle",widthHeight:o=24,color:r="currentColor",filled:n=!1,strokeWidth:a=1,size:i,children:l,fallback:u,...c})=>{const{getColor:d}=s.useTheme(),g=i||o,m=p.useMemo(()=>{const y=d(r);return{fill:n?y:"none",stroke:y,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round"}},[n,r,a,d]);if(!e)return t.jsx(ga,{widthHeight:o,color:r,...c,children:l});const h=e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),f=_u(h,u,l);return t.jsx(ga,{widthHeight:g,color:r,...c,children:t.jsx(p.Suspense,{fallback:u||null,children:t.jsx(f,{size:g,...m})})})}),Z=(e,o={})=>{const r=n=>t.jsx(zt,{name:e,...o,...n});return r.displayName=`${e}Icon`,r},Ou=Z("user",{filled:!1}),Nu=Z("circle-help",{filled:!1}),qu=Z("folder",{filled:!1}),je=Z("chevron-up",{filled:!1}),Ti=Z("grip-vertical",{filled:!1}),Mo=Z("file",{filled:!1}),Uu=Z("video",{filled:!1}),Gu=Z("image",{filled:!1}),nt=Z("volume",{filled:!1}),Yu=Z("twitter",{filled:!1}),Ku=Z("x",{filled:!1}),Xu=Z("twitch",{filled:!1}),Ue=Z("x",{filled:!1,strokeWidth:2}),Ju=Z("instagram",{filled:!1}),Qu=Z("youtube",{filled:!1}),Zu=Z("facebook",{filled:!1}),ep=Z("linkedin",{filled:!1}),op=Z("at-sign",{filled:!1}),Ii=Z("minus",{filled:!1}),xo=Z("info",{filled:!1}),Ri=Z("play",{filled:!1}),tp=Z("pause",{filled:!1}),rp=Z("heart",{filled:!1}),np=Z("star",{filled:!1}),ap=Z("save",{filled:!1}),Fn=Z("triangle-alert",{filled:!1}),ip=Z("battery",{filled:!1}),lp=Z("bookmark",{filled:!1}),sp=Z("cloud",{filled:!1}),cp=Z("copy",{filled:!1}),wr=Z("trash",{filled:!1}),dp=wr,up=Z("edit",{filled:!1}),Mn=Z("mic",{filled:!1}),jr=Z("square",{filled:!1}),zn=Z("send",{filled:!1}),Wn=Z("loader",{filled:!1}),Ht=Z("paperclip",{filled:!1}),dr=Z("search",{filled:!1}),pp=Z("home",{filled:!1}),Fi=Z("settings",{filled:!1}),mp=Z("download",{filled:!1}),Mi=Z("share",{filled:!1}),Vt=Z("check",{filled:!1}),gp=Z("plus",{filled:!1}),En=Z("eye-off",{filled:!1}),An=Z("eye",{filled:!1}),hp=Z("lock",{filled:!1}),fp=Z("user",{filled:!1}),zi=Z("external-link",{filled:!1}),Hn=Z("check-circle",{filled:!1}),vr=Z("alert-circle",{filled:!1}),yp=Z("bell",{filled:!1}),xp=Z("file-text",{filled:!1}),bp=Z("bar-chart",{filled:!1}),kp=Z("moon",{filled:!1}),Wi=Z("panel-left",{filled:!1}),Vn=Z("upload",{filled:!1}),Cp=Vt,Sp=e=>t.jsx(je,{orientation:"left",...e}),wp=Z("zoom-out",{filled:!1}),jp=Z("type",{filled:!1}),vp=Z("shapes",{filled:!1}),Tp=Z("rotate-cw",{filled:!1}),Ip=Z("gift",{filled:!1}),Rp=Z("shield",{filled:!1}),Fp=Z("log-out",{filled:!1}),Mp=Z("power",{filled:!1}),zp=Z("link",{filled:!1}),Wp=Z("layout",{filled:!1}),Ep=Z("zap",{filled:!1}),Ap=Z("credit-card",{filled:!1}),Hp=Z("more-horizontal",{filled:!1}),Vp=wr,Pp=Z("filter",{filled:!1}),Dp=Z("calendar",{filled:!1}),$p=Z("clock",{filled:!1}),Lp=Z("map-pin",{filled:!1}),Bp=Z("menu",{filled:!1}),_p=Z("refresh-cw",{filled:!1}),Op=Z("printer",{filled:!1}),Np=Z("wand",{filled:!1}),qp=Z("thumbs-down",{filled:!1}),Up=Z("thumbs-up",{filled:!1}),Gp=Z("camera",{filled:!1}),Yp=Z("bluetooth",{filled:!1}),Kp=Z("unlock",{filled:!1}),Xp=Z("wifi",{filled:!1}),Jp=Z("arrow-right",{filled:!1}),Qp=Z("arrow-up",{filled:!1}),Zp=Z("loader",{filled:!1}),em=Z("sliders-horizontal",{filled:!1}),om=Z("crop",{filled:!1}),tm=Z("zoom-in",{filled:!1}),rm=Z("grip-horizontal",{filled:!1}),Ei=Z("mouse-pointer-2",{filled:!1}),nm={sm:{minHeight:44,paddingVertical:10,paddingHorizontal:16},md:{minHeight:52,paddingVertical:12,paddingHorizontal:18},lg:{minHeight:60,paddingVertical:14,paddingHorizontal:20}},_o={sm:{label:14,description:12},md:{label:16,description:13},lg:{label:18,description:14}},ha=(e,o)=>e.id??e.value??`action-sheet-item-${o}`,Ai=e=>e.value??e.id,fa=e=>e.disabled||e.isDisabled||e.divider,am=(e,o)=>{if(typeof e.selected=="boolean")return e.selected;const r=Ai(e);return r?Array.isArray(o)?o.includes(r):o===r:!1},im=({isSheetOpen:e,closeSheet:o,selectedValue:r,setSelectedValue:n,isClosePrevented:a=!1,dismissOnBackdropPress:i=!0,title:l,description:u,header:c,children:d,items:g=[],isMulti:m=!1,closeOnSelect:h,onSelect:f,onChange:y,showCancel:k=!1,cancelLabel:b="Cancel",onCancel:j,showHandle:x=!0,size:C="md",maxHeight:v="88vh",views:S,animationType:I,...w})=>{if(!e)return null;const T=()=>{a||o()},R=()=>{i&&T()},E=()=>{j==null||j(),T()},F=W=>{var V;if(fa(W))return;const M=Ai(W);let z=r;if(M){if(m){const P=Array.isArray(r)?r:r?[r]:[];z=P.includes(M)?P.filter(L=>L!==M):[...P,M]}else z=M;n(z),f==null||f(M,W),y==null||y(z,W)}(V=W.onPress)==null||V.call(W,W),(W.closeOnSelect??h??!m)&&T()};return t.jsx(At,{children:t.jsx(s.View,{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999,backgroundColor:"color-dark-50-360",display:"flex",justifyContent:"flex-end",onClick:R,...S==null?void 0:S.overlay,children:t.jsxs(s.Vertical,{width:"100%",maxWidth:520,maxHeight:v,marginHorizontal:"auto",backgroundColor:"color-white",borderTopLeftRadius:24,borderTopRightRadius:24,paddingTop:8,paddingBottom:12,overflow:"hidden",boxShadow:"0 -18px 48px rgba(15, 23, 42, 0.18)",onClick:W=>W.stopPropagation(),...S==null?void 0:S.container,...S==null?void 0:S.sheet,...w,children:[x&&t.jsx(s.View,{width:36,height:4,borderRadius:999,backgroundColor:"color-gray-300",alignSelf:"center",marginTop:4,marginBottom:8,...S==null?void 0:S.handle}),(l||u)&&t.jsxs(s.Vertical,{paddingHorizontal:20,paddingTop:6,paddingBottom:12,gap:4,...S==null?void 0:S.header,children:[l&&t.jsx(s.Text,{fontSize:18,lineHeight:24,fontWeight:"600",color:"color-gray-900",...S==null?void 0:S.title,children:l}),u&&t.jsx(s.Text,{fontSize:13,lineHeight:18,color:"color-gray-500",...S==null?void 0:S.description,children:u})]}),c,t.jsxs(s.Vertical,{overflowY:"auto",paddingBottom:4,...S==null?void 0:S.content,children:[g.map((W,M)=>{if(W.divider)return t.jsx(s.View,{height:1,backgroundColor:"color-gray-200",marginVertical:6,...S==null?void 0:S.divider},ha(W,M));const z=am(W,r),H=fa(W),V=H?"color-gray-400":W.destructive?"color-red-600":z?"theme-primary":"color-gray-900";return t.jsxs(s.Horizontal,{alignItems:"center",gap:12,opacity:H?.5:1,cursor:H?"not-allowed":"pointer",onClick:()=>F(W),...nm[C],...S==null?void 0:S.item,children:[W.icon&&t.jsx(s.View,{flexShrink:0,...S==null?void 0:S.itemIcon,children:W.icon}),t.jsxs(s.Vertical,{flex:1,gap:2,children:[typeof W.label=="string"?t.jsx(s.Text,{fontSize:_o[C].label,lineHeight:_o[C].label+6,fontWeight:z?"600":"400",color:V,...S==null?void 0:S.itemLabel,children:W.label}):W.label,W.description&&t.jsx(s.Text,{fontSize:_o[C].description,lineHeight:_o[C].description+5,color:"color-gray-500",...S==null?void 0:S.itemDescription,children:W.description})]}),z&&t.jsx(Vt,{widthHeight:18,color:"theme-primary",...S==null?void 0:S.itemIndicator})]},ha(W,M))}),d]}),k&&t.jsx(s.View,{marginTop:8,paddingHorizontal:12,paddingTop:8,borderTopWidth:1,borderTopColor:"color-gray-200",children:t.jsx(s.Horizontal,{minHeight:52,alignItems:"center",justifyContent:"center",borderRadius:14,backgroundColor:"color-gray-100",cursor:"pointer",onClick:E,...S==null?void 0:S.cancelButton,children:t.jsx(s.Text,{fontSize:_o[C].label,lineHeight:_o[C].label+6,fontWeight:"600",color:"color-gray-900",...S==null?void 0:S.cancelLabel,children:b})})})]})})})},lm=e=>{const o=Bu(e);return t.jsx(im,{...e,...o})},sm=lm,cm=e=>{const o=e==="dark";return{default:{container:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",boxShadow:o?"0 1px 3px rgba(0, 0, 0, 0.3)":"0 1px 2px rgba(0, 0, 0, 0.05)"},content:{color:"color-gray-700"},icon:{color:"color-gray-500"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:o?"0 1px 3px rgba(29, 78, 216, 0.25)":"0 1px 2px rgba(59, 130, 246, 0.05)"},content:{color:"color-blue-700"},icon:{color:"color-blue-600"}},success:{container:{backgroundColor:"color-green-50",borderColor:"color-green-200",boxShadow:o?"0 1px 3px rgba(34, 197, 94, 0.2)":"0 1px 2px rgba(34, 197, 94, 0.05)"},content:{color:"color-green-700"},icon:{color:"color-green-600"}},error:{container:{backgroundColor:"color-red-50",borderColor:"color-red-200",boxShadow:o?"0 1px 3px rgba(239, 68, 68, 0.2)":"0 1px 2px rgba(239, 68, 68, 0.05)"},content:{color:"color-red-700"},icon:{color:"color-red-600"}},warning:{container:{backgroundColor:"color-orange-50",borderColor:"color-orange-200",boxShadow:o?"0 1px 3px rgba(249, 115, 22, 0.2)":"0 1px 2px rgba(249, 115, 22, 0.05)"},content:{color:"color-orange-700"},icon:{color:"color-orange-600"}}}},dm={default:"alert",info:"status",success:"status",error:"alert",warning:"alert"},um=p.memo(({icon:e,title:o="",views:r,description:n="",variant:a="default",themeMode:i,children:l,...u})=>{var f;const{themeMode:c}=s.useTheme(),d=i||c,g=p.useMemo(()=>cm(d),[d]),m=((f=r==null?void 0:r.icon)==null?void 0:f.color)??g[a].icon.color,h=()=>{if(e)return e;const y={size:20,color:"currentColor"};switch(a){case"info":return t.jsx(xo,{...y});case"success":return t.jsx(Hn,{...y});case"error":return t.jsx(vr,{...y});case"warning":default:return t.jsx(Fn,{...y})}};return t.jsxs(s.Horizontal,{role:dm[a],gap:12,padding:"12px 16px",flexWrap:"nowrap",alignItems:"flex-start",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:g[a].container.borderColor,backgroundColor:g[a].container.backgroundColor,boxShadow:g[a].container.boxShadow,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...r==null?void 0:r.container,...u,children:[t.jsx(s.View,{alignSelf:"flex-start",marginTop:"2px",color:m,...r==null?void 0:r.icon,children:h()}),t.jsxs(s.Vertical,{gap:4,children:[o?t.jsx(s.Text,{fontSize:"14px",fontWeight:"600",lineHeight:"20px",color:g[a].content.color,...r==null?void 0:r.title,children:o}):null,t.jsx(s.Text,{fontSize:"12px",fontWeight:"400",lineHeight:"16px",color:g[a].content.color,...r==null?void 0:r.description,children:n||l})]})]})}),pm=e=>{const o=ve("alert",e);return t.jsx(um,{...o})},Pn=pm,mm=({ratio:e=16/9,children:o,views:r,...n})=>t.jsx(s.View,{width:"100%",position:"relative",overflow:"hidden",paddingTop:`${1/e*100}%`,borderRadius:8,...n,...r==null?void 0:r.center,children:t.jsx(s.View,{position:"absolute",top:0,right:0,bottom:0,left:0,...r==null?void 0:r.view,children:o})}),gm=({ratio:e,children:o,...r})=>t.jsx(mm,{ratio:e,...r,children:o}),Hi=gm;function hm(e,o,r){return Math.min(Math.max(e,o),r)}const fm=({bars:e,isPaused:o,...r})=>{const a=[6,16,23,24,18,9,14,22,24,20,11,12,20,24,21,13,9,19,24,23,16,7,17,23,23,18,8,15,22,24,20,10];return t.jsx(s.Horizontal,{alignItems:"center",minWidth:120,gap:2,height:24,width:"100%",maxWidth:"100%",...r,children:e.map((i,l)=>t.jsx(s.View,{width:3,borderRadius:2,backgroundColor:o?"color-gray-300":i>=0?"theme-primary":"color-gray-300",style:{height:`${i>=0?hm(i*300,6,24):a[l%a.length]}px`}},l))})},Dn=({analyserNode:e,isPaused:o,...r})=>{const n=p.useRef(null),a=60,i=32,[l,u]=p.useState([]);return p.useEffect(()=>{if(!e){u(Array(a).fill(-1));return}const c=e.frequencyBinCount,d=new Uint8Array(c),g=()=>{e.getByteTimeDomainData(d);let m=0;for(let f=0;f<c;f++){const y=(d[f]-128)/128;m+=y*y}const h=Math.sqrt(m/c);p.startTransition(()=>{u(f=>{const k=[...f,h].slice(-a);return k.length<a?[...Array(a-k.length).fill(-1),...k]:k})})};return n.current=setInterval(g,i),()=>{n.current&&clearInterval(n.current)}},[e]),t.jsx(fm,{bars:l,isPaused:o,...r})},ym=()=>{const[e,o]=p.useState(!1);return{imageError:e,setImageError:o}},xm={xs:24,sm:32,md:44,lg:56,xl:72},$r={container:{borderRadius:"50%",overflow:"hidden",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"theme-primary",transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},fallback:{fontWeight:"600",color:"color-white",letterSpacing:"-0.02em"},image:{objectFit:"cover",transition:"opacity 0.2s ease"}},bm=({src:e,size:o="md",fallback:r="IM",views:n,imageError:a,setImageError:i,onClick:l=()=>{},children:u})=>{const c=xm[o],d={...$r.image,...(n==null?void 0:n.image)||{}};return t.jsxs(s.Center,{"data-role":"avatar",width:c,height:c,...$r.container,borderColor:a?"color-gray-400":"transparent",onClick:l,...n==null?void 0:n.container,children:[!a&&e?t.jsx(s.Image,{alt:"",src:e,style:d,width:c,height:c,onError:()=>i(!0)}):t.jsx(s.Text,{size:o,...$r.fallback,...n==null?void 0:n.fallback,children:r}),u]})},km=e=>{const o=ve("avatar",e),{src:r,size:n,views:a,fallback:i,onClick:l,children:u}=o,{imageError:c,setImageError:d}=ym();return t.jsx(bm,{src:r,size:n,views:a,fallback:i,imageError:c,setImageError:d,onClick:l,children:u})},Vi=km,Cm={xs:{minWidth:"16px",height:"16px",padding:"0 4px",fontSize:"9px",fontWeight:"600",lineHeight:"12px",letterSpacing:"-0.01em"},sm:{minWidth:"20px",height:"20px",padding:"0 6px",fontSize:"10px",fontWeight:"600",lineHeight:"14px",letterSpacing:"-0.01em"},md:{minWidth:"24px",height:"24px",padding:"0 8px",fontSize:"12px",fontWeight:"600",lineHeight:"16px",letterSpacing:"-0.01em"},lg:{minWidth:"28px",height:"28px",padding:"0 10px",fontSize:"14px",fontWeight:"600",lineHeight:"20px",letterSpacing:"-0.01em"},xl:{minWidth:"32px",height:"32px",padding:"0 12px",fontSize:"16px",fontWeight:"600",lineHeight:"24px",letterSpacing:"-0.01em"}},Sm={xs:{gap:"6px",padding:"3px 8px 3px 3px"},sm:{gap:"8px",padding:"4px 10px 4px 4px"},md:{gap:"12px",padding:"6px 16px 6px 6px"},lg:{gap:"12px",padding:"7px 18px 7px 7px"},xl:{gap:"14px",padding:"8px 20px 8px 8px"}},wm={xs:{padding:"2px 6px",fontSize:"9px",lineHeight:"12px"},sm:{padding:"3px 8px",fontSize:"10px",lineHeight:"14px"},md:{padding:"6px 12px",fontSize:"11px",lineHeight:"14px"},lg:{padding:"7px 14px",fontSize:"12px",lineHeight:"16px"},xl:{padding:"8px 16px",fontSize:"13px",lineHeight:"18px"}},ya={xs:{fontSize:"11px",lineHeight:"14px"},sm:{fontSize:"12px",lineHeight:"16px"},md:{fontSize:"13px",lineHeight:"18px"},lg:{fontSize:"14px",lineHeight:"20px"},xl:{fontSize:"15px",lineHeight:"22px"}},jm={square:0,rounded:"8px",pill:"9999px"},vm={"top-right":{top:"4px",right:"4px",position:"absolute"},"top-left":{top:"4px",left:"4px",position:"absolute"},"bottom-right":{bottom:"4px",right:"4px",position:"absolute"},"bottom-left":{bottom:"4px",left:"4px",position:"absolute"}},Tm=e=>({display:"inline-flex",height:"auto",minWidth:"auto",backgroundColor:"color-white-600",color:"color-gray-900",borderWidth:"1px",borderStyle:"solid",borderColor:"color-white",backdropFilter:"blur(12px)",boxShadow:"0 1px 2px rgba(15, 23, 42, 0.08)",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",_hover:{backgroundColor:"color-white-800",boxShadow:"0 2px 8px rgba(15, 23, 42, 0.1)"}}),Im=e=>({filled:{backgroundColor:"theme-primary",color:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary",color:"theme-primary",style:{backgroundColor:"transparent"},transition:"border-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.9},_active:{opacity:.95}},link:{borderWidth:0,borderStyle:"none",borderColor:"theme-primary",color:"theme-primary",textDecoration:"underline",style:{backgroundColor:"transparent",textUnderlineOffset:"2px",textDecorationThickness:"1px"},transition:"opacity 0.2s ease",_hover:{opacity:.8}},ghost:{color:"color-gray-500",borderWidth:0,borderStyle:"solid",borderColor:"color-gray-500",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-100"}}}),Pi=e=>({default:{indicator:{backgroundColor:"color-gray-400"},label:{color:"inherit"}},info:{indicator:{backgroundColor:"color-blue-500"},label:{color:"inherit"}},success:{indicator:{backgroundColor:"color-green-500"},label:{color:"inherit"}},warning:{indicator:{backgroundColor:"color-orange-500"},label:{color:"inherit"}},error:{indicator:{backgroundColor:"color-red-500"},label:{color:"inherit"}}}),Rm=p.memo(({content:e,children:o,icon:r,pastil:n,pastilContent:a,action:i,position:l,shape:u="pill",variant:c="filled",size:d="md",isAuto:g=!1,views:m,themeMode:h,backgroundColor:f,color:y,borderColor:k,...b})=>{const{themeMode:j}=s.useTheme(),x=h||j,C=p.useMemo(()=>Im()[c],[x,c]),v=p.useMemo(()=>Tm(),[x]),S=p.useMemo(()=>Pi(),[x]),I=a!=null,w=i!=null,T=I||w,R=o??e,E=R!=null,F=g&&typeof R=="string"&&/^(color|theme|light|dark)-/.test(R)?R:void 0,W=p.useMemo(()=>{const z={width:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"6px",borderRadius:jm[u],...Cm[d],...C,...T?Sm[d]:{},...T?v:{},...l?vm[l]:{},...m==null?void 0:m.container};return c!=="filled"&&!T&&(C.color!==void 0&&(z.color=C.color),C.borderColor!==void 0&&(z.borderColor=C.borderColor),C.backgroundColor!==void 0&&(z.backgroundColor=C.backgroundColor),C&&C.style&&(z.style={...z.style||{},...C.style})),w||b.onClick!==void 0||(delete z._hover,delete z._active),f!==void 0&&(z.backgroundColor=f,k===void 0&&(z.borderColor=f)),k!==void 0&&(z.borderColor=k),y!==void 0&&(z.color=y),F&&(z.backgroundColor=F,z.borderColor=F,z.color="color-white"),z},[w,b.onClick,f,y,k,u,d,c,C,T,v,l,F,m==null?void 0:m.container]);let M="currentColor";return typeof n=="string"?n in S?M=S[n].indicator.backgroundColor:M=n:n===!0&&(M="color-green-500",c==="filled"&&(M="color-white")),t.jsxs(s.Center,{"data-role":"badge",...W,...b,children:[r&&t.jsx(s.View,{"data-role":"badge-icon",...m==null?void 0:m.icon,children:r}),I&&t.jsx(s.Text,{"data-role":"badge-pastil-content",backgroundColor:"color-gray-900",borderRadius:"9999px",color:"color-white",fontWeight:"700",letterSpacing:0,textTransform:"uppercase",whiteSpace:"nowrap",...wm[d],...m==null?void 0:m.pastilContent,children:a}),n&&t.jsx(s.View,{"data-role":"badge-pastil",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:M,...m==null?void 0:m.pastil}),E&&t.jsx(s.Text,{"data-role":"badge-text",color:T?"color-gray-900":W.color,fontWeight:T?"700":"600",textAlign:"center",letterSpacing:T?0:"0.02em",whiteSpace:"nowrap",...T?ya[d]:{},...m==null?void 0:m.text,children:R}),w&&t.jsx(s.Text,{"data-role":"badge-action",color:"color-gray-400",fontWeight:"500",letterSpacing:0,whiteSpace:"nowrap",...ya[d],...m==null?void 0:m.action,children:i})]})}),_e=e=>{const o=ve("badge",e);return t.jsx(Rm,{...o})},Fm={xs:12,sm:14,md:16,lg:18,xl:20},Mm={color:"theme-primary",fontWeight:"600"},zm=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,$n=p.forwardRef(({children:e,href:o,iconSize:r="sm",underline:n="default",isExternal:a=!1,isActive:i=!1,views:l={},to:u,isHovered:c,setIsHovered:d,_hover:g,...m},h)=>t.jsxs(s.Element,{as:"a",ref:h,href:o,display:"inline-flex",gap:3,alignItems:"center",flexWrap:"nowrap",color:"inherit",textDecoration:n==="underline"?"underline":"none",_hover:n==="hover"?{textDecoration:"underline",...g}:g,...a?{target:"_blank",rel:"noopener noreferrer"}:{},...i?{"aria-current":"page",...Mm,...l.active}:{},...l.text,...m,children:[e,a&&t.jsx(zi,{widthHeight:Fm[r]})]}));$n.displayName="LinkAnchor";const Di=p.forwardRef(({to:e="/",onClick:o,...r},n)=>{const a=tn.useHref(e),i=tn.useNavigate(),l=u=>{o==null||o(u),!(u.defaultPrevented||u.button!==0||r.target&&r.target!=="_self"||u.metaKey||u.altKey||u.ctrlKey||u.shiftKey)&&(u.preventDefault(),i(e))};return t.jsx($n,{...r,to:e,href:a,onClick:l,ref:n})});Di.displayName="RouterLinkAnchor";const $i=p.forwardRef((e,o)=>{const r=tn.useInRouterContext(),{href:n,to:a="/",isExternal:i}=e;return r&&!i&&n==null&&!zm.test(a)?t.jsx(Di,{...e,ref:o}):t.jsx($n,{...e,href:n??a,ref:o})});$i.displayName="LinkView";const Li=p.forwardRef((e,o)=>t.jsx($i,{ref:o,...e}));Li.displayName="Link";const Wt=Li,Ln={xs:14,sm:18,md:22,lg:26,xl:30},Bn={fast:50,normal:100,slow:300},Wm=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Em=({size:e="md",speed:o="normal",color:r="theme-loading",themeMode:n,...a})=>{const{getColor:i,themeMode:l}=s.useTheme(),u=i(r,{themeMode:n||l}),c=typeof e=="number"?e:Ln[e],[d,g]=p.useState(0);return p.useEffect(()=>{const m=setInterval(()=>{g(h=>h+45)},Bn[o]);return()=>clearInterval(m)},[o]),t.jsxs(s.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:`${c}px`,height:`${c}px`,viewBox:"0 0 24 24",fill:"none",stroke:u,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:`rotate(${d}deg)`},...a,children:[t.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),t.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),t.jsx("g",{id:"SVGRepo_iconCarrier",children:t.jsx("path",{d:"M21 12a9 9 0 11-6.219-8.56"})})]})},Am=({size:e="md",speed:o="normal",color:r="theme-loading",themeMode:n,...a})=>{const{getColor:i,themeMode:l}=s.useTheme(),u=i(r,{themeMode:n||l}),c=typeof e=="number"?e:Ln[e],[d,g]=p.useState(0);return p.useEffect(()=>{const m=setInterval(()=>{g(h=>h+45)},Bn[o]);return()=>clearInterval(m)},[o]),t.jsxs(s.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${c}px`,height:`${c}px`,style:{transform:`rotate(${d}deg)`},...a,children:[t.jsx("circle",{cx:"10",cy:"25",r:"4",fill:u}),t.jsx("circle",{cx:"25",cy:"25",r:"4",fill:u}),t.jsx("circle",{cx:"40",cy:"25",r:"4",fill:u})]})},Hm=({size:e="md",speed:o="normal",color:r="theme-loading",themeMode:n,...a})=>{const{getColor:i,themeMode:l}=s.useTheme(),u=i(r,{themeMode:n||l}),c=typeof e=="number"?e:Ln[e],[d,g]=p.useState(0);return p.useEffect(()=>{const m=setInterval(()=>{g(h=>h+45)},Bn[o]);return()=>clearInterval(m)},[o]),t.jsx(s.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${c}px`,height:`${c}px`,style:{transform:`rotate(${d}deg)`},...a,children:t.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:u,strokeWidth:"5",strokeDasharray:"1,10"})})},Vm=({size:e,children:o,textColor:r,loaderColor:n,type:a="default",speed:i="normal",textPosition:l="right",views:u,...c})=>{const{getColor:d}=s.useTheme(),g=f=>Wm(f)?f:d(f||"theme-loading");n=g(n||c.color||"theme-loading"),r=g(r||c.color||"theme-loading");const m={size:e,speed:i,color:n},h={default:t.jsx(Em,{...m}),dotted:t.jsx(Am,{...m}),quarter:t.jsx(Hm,{...m})};return t.jsxs(s.Center,{gap:10,flexDirection:l==="top"||l==="bottom"?"column":"row",...c,...u==null?void 0:u.container,children:[(l==="left"||l==="top")&&o&&t.jsx(s.View,{color:r,...u==null?void 0:u.text,children:o}),h[a],(l==="right"||l==="bottom")&&o&&t.jsx(s.View,{color:r,...u==null?void 0:u.text,children:o})]})},Pm=e=>{const o=ve("loader",e);return t.jsx(Vm,{...o})},ho=Pm,Dm=/^(color|theme|light|dark)-/,$m=e=>Dm.test(e),Lm=e=>{const o=e.split("-"),r=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(r)&&r>=0&&r<=1e3?o.slice(0,-1).join("-"):e},Oo=(e,o)=>$m(e)?`${Lm(e)}-${o}`:`color-mix(in srgb, ${e} ${Math.round(o/10)}%, transparent)`,Bi={xs:{minHeight:24,paddingHorizontal:12,paddingVertical:5,fontSize:10,fontWeight:500,lineHeight:12,letterSpacing:"-0.01em"},sm:{minHeight:32,paddingHorizontal:16,paddingVertical:7,fontSize:12,fontWeight:500,lineHeight:16,letterSpacing:"-0.01em"},md:{minHeight:40,paddingHorizontal:20,paddingVertical:9,fontSize:14,fontWeight:500,lineHeight:20,letterSpacing:"-0.01em"},lg:{minHeight:48,paddingHorizontal:24,paddingVertical:11,fontSize:16,fontWeight:500,lineHeight:24,letterSpacing:"-0.01em"},xl:{minHeight:56,paddingHorizontal:28,paddingVertical:13,fontSize:20,fontWeight:500,lineHeight:28,letterSpacing:"-0.01em"}},It={square:0,rounded:8,pill:999},Bm={xs:{width:16,height:16,padding:6},sm:{width:20,height:20,padding:6},md:{width:24,height:24,padding:8},lg:{width:24,height:24,padding:12},xl:{width:28,height:28,padding:14}},oo=e=>/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,_m=(e,o,r=!1,n)=>{const a=r?o:e,i=r?e:o,l=r?o:e,c=(e==="theme-primary"||n&&e===n.primary)&&(n!=null&&n.onPrimary)?n.onPrimary:i,d=`0 0 0 2px ${oo("color-white")}, 0 0 0 4px ${oo(l)}`;return{filled:{backgroundColor:a,color:c,borderWidth:1,borderStyle:"solid",borderColor:a,_hover:{opacity:.92},_active:{opacity:.96},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},empty:{color:l,borderWidth:1,borderStyle:"solid",borderColor:Oo(l,r?400:250),backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, opacity 0.2s ease"},outline:{color:l,borderWidth:1,borderStyle:"solid",borderColor:Oo(l,r?400:250),backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{color:l,borderWidth:0,borderStyle:"solid",borderColor:l,backgroundColor:"transparent",_hover:{opacity:.86},_active:{opacity:.94},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, color 0.2s ease"},link:{color:l,borderWidth:0,borderStyle:"none",borderColor:l,minHeight:"auto",paddingHorizontal:"4px",paddingVertical:"10px",textDecoration:"underline",backgroundColor:"transparent",style:{textUnderlineOffset:"2px",textDecorationThickness:"1px",textDecorationColor:oo(l)},_hover:{opacity:.8},_active:{opacity:.9},_focusVisible:{outline:"none",boxShadow:d},transition:"opacity 0.2s ease"},subtle:{backgroundColor:Oo(l,r?200:100),color:l,borderWidth:1,borderStyle:"solid",borderColor:Oo(l,r?400:250),_hover:{backgroundColor:Oo(l,r?300:180)},_active:{backgroundColor:Oo(l,r?380:240)},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}}},Om=p.memo(({children:e,icon:o,leftIcon:r,rightIcon:n,isLoading:a,iconPosition:i="left",loaderPosition:l="left",size:u="md",resolvedTextColor:c,isIconRounded:d,loaderProps:g,views:m})=>{const h=["left","right"].includes(i)?s.Horizontal:s.Vertical,f=Bi[u];return t.jsxs(h,{gap:8,alignItems:"center",justifyContent:"center",fontSize:f.fontSize,fontWeight:f.fontWeight,lineHeight:f.lineHeight,letterSpacing:f.letterSpacing,whiteSpace:"nowrap",color:c,...m==null?void 0:m.content,children:[a&&l==="left"&&t.jsx(ho,{size:u==="xs"||u==="sm"?"sm":"md",color:c,...g,...m==null?void 0:m.loader}),r&&t.jsx(s.View,{color:c,...m==null?void 0:m.icon,children:r}),o&&["left","top"].includes(i)&&!a&&t.jsx(s.View,{color:c,...m==null?void 0:m.icon,children:o}),e,o&&["right","bottom"].includes(i)&&!a&&t.jsx(s.View,{color:c,...m==null?void 0:m.icon,children:o}),n&&t.jsx(s.View,{color:c,...m==null?void 0:m.icon,children:n}),a&&l==="right"&&t.jsx(ho,{size:u==="xs"||u==="sm"?"sm":"md",color:c,...g,...m==null?void 0:m.loader})]})}),Nm=e=>{const o=It[e];return typeof o=="number"?o:typeof o=="string"&&parseInt(o,10)||0},qm=({asComponent:e,isDisabled:o,isLoading:r,isWrapped:n=!1,borderRadius:a,width:i,height:l,baseStyles:u,sizeStyles:c,iconPad:d,mainTone:g,resolvedTextColor:m,children:h,borderWidth:f=0,...y})=>t.jsx(s.Element,{as:e,disabled:!!(o||r),display:n?"flex":"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:a,width:i,height:l,...u,...c,...d,backgroundColor:(u==null?void 0:u.backgroundColor)||(n?g:void 0),color:m,borderWidth:n?0:void 0,cursor:o?"default":"pointer",...y,children:h}),Um=({shape:e,isDisabled:o,onClick:r,shadow:n,borderWidth:a,isAuto:i,isFilled:l,views:u,children:c,...d})=>t.jsx(s.Element,{as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:It[e],cursor:o?"default":"pointer",onClick:r,boxShadow:n,padding:a,width:l?"100%":i?"fit-content":void 0,...u==null?void 0:u.container,...d,children:c}),Gm=({variant:e,animation:o,to:r,isDisabled:n,isLoading:a,isAuto:i,isFilled:l,isExternal:u,shape:c="rounded",shadow:d,onClick:g,views:m,baseStyles:h,sizeStyles:f,iconPad:y,containerRef:k,resolvedTextColor:b,content:j,size:x,mainTone:C,borderMovingDuration:v=2,borderMovingGradientColors:S=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:I="#705CFF",animatedStrokeTextColor:w="color-gray-900",...T})=>{var W;const R=Nm(c),E=r?t.jsx(Wt,{to:r,isExternal:u,color:"currentColor",textDecoration:"inherit",_hover:{color:"currentColor"},...m==null?void 0:m.link,children:j}):j,F={isDisabled:n,isLoading:a,baseStyles:h,sizeStyles:f,iconPad:y,resolvedTextColor:b,mainTone:C,children:E};if(o==="borderMoving"&&S){const z={from:{backgroundPosition:"0% 50%"},to:{backgroundPosition:"200% 50%"},duration:`${v}s`,timingFunction:"linear",iterationCount:"infinite"};return t.jsx(Um,{shape:c,isDisabled:n,onClick:g,shadow:d,borderWidth:3,isAuto:i,isFilled:l,views:m,background:`linear-gradient(90deg, ${oo(S[0])}, ${oo(S[1])}, ${oo(S[2])}, ${oo(S[0])})`,backgroundSize:"200% 100%",animate:z,...T,children:t.jsx(qm,{asComponent:r?"div":"button",isWrapped:!0,borderRadius:Math.max(0,R-3),width:"100%",height:"100%",...F})})}if(o==="animatedStroke"){const M=oo(I),z=oo(w),H=1e3,V={from:{strokeWidth:"8px",strokeDasharray:`0 ${H}`,strokeDashoffset:-Math.round(H*.63)},to:{strokeWidth:"3px",strokeDasharray:`${H}`,strokeDashoffset:0},duration:"0.9s",timingFunction:"ease-in",fillMode:"forwards"},P=["group",(W=m==null?void 0:m.container)==null?void 0:W.className,T==null?void 0:T.className].filter(Boolean).join(" ");return t.jsxs(s.Element,{ref:k,as:r?"div":"button",type:r?void 0:"button",disabled:!!(!r&&(n||a)),onClick:g,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:l?"100%":i?"fit-content":void 0,borderRadius:It[c],boxShadow:d,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",color:z,backgroundColor:"transparent",borderWidth:0,...m==null?void 0:m.container,...T,className:P,children:[t.jsx(s.View,{as:"svg",position:"absolute",top:0,right:0,bottom:0,left:0,width:"100%",height:"100%",xmlns:"http://www.w3.org/2000/svg",pointerEvents:"none",zIndex:1,"aria-hidden":"true",children:t.jsx(s.View,{as:"rect",x:"0",y:"0",height:"100%",width:"100%",rx:R,ry:R,fill:"transparent",stroke:M,strokeWidth:"8px",strokeDasharray:`0 ${H}`,strokeDashoffset:-Math.round(H*.63),pathLength:H,on:{groupHover:{animate:V}}})}),t.jsx(s.View,{position:"relative",zIndex:0,children:E})]})}if(o==="borderReveal"){const z=oo((S==null?void 0:S[0])||C||"#000000"),V=v*.75/4,P=`linear-gradient(90deg, ${z} 50%, transparent 50%)`,L=`linear-gradient(180deg, ${z} 50%, transparent 50%)`,B=`linear-gradient(270deg, ${z} 50%, transparent 50%)`,$=`linear-gradient(0deg, ${z} 50%, transparent 50%)`,q="100% 0, 100% 100%, 0 100%, 0 0",Y="0 0, 100% 0, 100% 100%, 0 100%",O=`0s, ${V}s, ${V*2}s, ${V*2}s`,J=`${V*2}s, ${V*2}s, ${V}s, 0s`,D=4;return t.jsx(s.Element,{ref:k,as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:It[c],cursor:n?"default":"pointer",onClick:g,boxShadow:d,padding:3,background:`
2
- ${P} no-repeat,
3
- ${L} no-repeat,
4
- ${B} no-repeat,
5
- ${$} no-repeat
6
- `,backgroundSize:`200% ${D}px, ${D}px 200%, 200% ${D}px, ${D}px 200%`,backgroundPosition:q,transitionProperty:"background-position",transitionDuration:`${V}s`,transitionTimingFunction:"linear",transitionDelay:J,_hover:{backgroundPosition:Y,transitionDelay:O},width:l?"100%":i?"fit-content":void 0,...m==null?void 0:m.container,...T,children:t.jsx(s.View,{as:r?"div":"button",disabled:!!(n||a),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,R-3),width:"100%",height:"100%",...h,...f,...y,backgroundColor:(h==null?void 0:h.backgroundColor)||C,color:b,borderWidth:0,cursor:n?"default":"pointer",children:E})})}return t.jsx(s.Element,{ref:k,as:e==="link"&&r?"div":"button",type:e==="link"&&r?void 0:"button",disabled:!!(n||a),...f,...y,display:"inline-flex",alignItems:"center",justifyContent:"center",width:l?"100%":i?"fit-content":void 0,borderRadius:It[c],boxShadow:d,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",onClick:g,...h,...m==null?void 0:m.container,...T,children:E})},Ym=p.memo(p.forwardRef(({variant:e="filled",size:o="md",shape:r="rounded",iconPosition:n="left",loaderPosition:a="left",backgroundColor:i,color:l,textColor:u,explicitTextColor:c,reversed:d=!1,isAuto:g=!0,isFilled:m,isDisabled:h,isLoading:f,isIconRounded:y,isIcon:k,isHovered:b,icon:j,leftIcon:x,rightIcon:C,startIcon:v,endIcon:S,children:I,to:w,isExternal:T,shadow:R,onClick:E,views:F={},animation:W,loaderProps:M,config:z,ariaLabel:H,borderMovingDuration:V=2,borderMovingGradientColors:P=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:L="#705CFF",animatedStrokeTextColor:B="color-gray-900",...$},q)=>{const O=h?"theme-disabled":f?"theme-loading":i??l??"theme-primary",J=c??u??"color-white",{config:D}=Sr(),A=D==null?void 0:D.theme,_=p.useMemo(()=>{const ae=_m(O,J,d,A);return z!=null&&z.variants&&Object.keys(z.variants).forEach(de=>{ae[de]&&(ae[de]=no(ae[de],z.variants[de]))}),ae},[O,J,d,A,z==null?void 0:z.variants]),G=_[e]??_.filled,N=c?{...G,color:c}:G,ee=(N==null?void 0:N.color)??J,oe=t.jsx(Om,{icon:j,leftIcon:x??v,rightIcon:C??S,isLoading:f,iconPosition:n,loaderPosition:a,size:o,resolvedTextColor:ee,isIconRounded:y,loaderProps:M,views:F,children:I}),ie=Bi[o],K=y||k?Bm[o]:{};return t.jsx(Gm,{variant:e,animation:W,to:w,isDisabled:h,isLoading:f,isAuto:g,isFilled:m,isExternal:T,shape:r,shadow:R,onClick:E,views:F,baseStyles:N,sizeStyles:ie,iconPad:K,resolvedTextColor:ee,content:oe,size:o,mainTone:O,borderMovingDuration:V,borderMovingGradientColors:P,animatedStrokeAccentColor:L,animatedStrokeTextColor:B,containerRef:q,...H!==void 0?{"aria-label":H}:{},...$})})),_i=p.forwardRef((e,o)=>{const[r,n]=s.useHover(),a=p.useCallback(u=>{r.current=typeof HTMLElement<"u"&&u instanceof HTMLElement?u:null,typeof o=="function"?o(u):o&&(o.current=u)},[r,o]),i=ve("button",e),l=e.textColor??(e.backgroundColor!=null&&e.color!=null?e.color:void 0);return t.jsx(Ym,{ref:a,isHovered:n,...i,explicitTextColor:l})});_i.displayName="Button";const me=_i,Km={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},Xm={square:0,rounded:"8px",pill:"24px"},Jm=e=>{const o=e==="dark";return{default:{backgroundColor:"color-white",border:"none",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},outlined:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"border-color 0.2s ease, box-shadow 0.2s ease",_hover:{borderColor:"color-gray-300",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.05)"}},elevated:{backgroundColor:"color-white",boxShadow:o?"0px 1px 3px rgba(0, 0, 0, 0.35), 0px 1px 2px rgba(0, 0, 0, 0.3)":"0px 1px 3px rgba(0, 0, 0, 0.08), 0px 1px 2px rgba(0, 0, 0, 0.06)",border:"none",transition:"box-shadow 0.2s ease",_hover:{boxShadow:o?"0px 4px 6px rgba(0, 0, 0, 0.4), 0px 2px 4px rgba(0, 0, 0, 0.35)":"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.06)"}}}},Tr=e=>(e.themeMode,{container:{backgroundColor:"color-white",color:"color-gray-900",borderRadius:"8px",overflow:"hidden",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},header:{padding:"16px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"theme-primary",fontWeight:600,fontSize:14},content:{padding:"16px",color:"color-gray-600",fontSize:12,lineHeight:"18px"},footer:{padding:"16px",borderTop:"1px solid",borderColor:"color-gray-100",justifyContent:"flex-end",gap:8}}),Oi=p.createContext({}),_n=()=>p.useContext(Oi),nn=({children:e,views:o,style:r,themeMode:n,...a})=>{var d;const i=s.useTheme(),{styles:l}=_n(),u=Tr(i).header,c={...u,...l==null?void 0:l.header,...a,style:{...u==null?void 0:u.style,...(d=l==null?void 0:l.header)==null?void 0:d.style,...r}};return t.jsx(s.Vertical,{gap:8,...c,children:e})},an=({children:e,views:o,style:r,themeMode:n,...a})=>{var d;const i=s.useTheme(),{styles:l}=_n(),u=Tr(i).content,c={...u,...l==null?void 0:l.content,...a,style:{...u==null?void 0:u.style,...(d=l==null?void 0:l.content)==null?void 0:d.style,...r}};return t.jsx(s.Vertical,{gap:12,...c,children:e})},ln=({children:e,views:o,style:r,themeMode:n,...a})=>{var d;const i=s.useTheme(),{styles:l}=_n(),u=Tr(i).footer,c={...u,...l==null?void 0:l.footer,...a,style:{...u==null?void 0:u.style,...(d=l==null?void 0:l.footer)==null?void 0:d.style,...r}};return t.jsx(s.Vertical,{gap:8,...c,children:e})},Qm=({variant:e="default",size:o="md",shape:r="rounded",children:n,header:a,footer:i,isFullWidth:l=!1,views:u,style:c,themeMode:d,config:g,...m})=>{var S,I;const h=s.useTheme(),f=Tr(h),y=((S=Km[o])==null?void 0:S.padding)||"16px",k=p.useMemo(()=>({styles:{container:{...f.container,borderRadius:Xm[r],...u==null?void 0:u.container},header:{...f.header,padding:y,...u==null?void 0:u.header},content:{...f.content,padding:y,...u==null?void 0:u.content},footer:{...f.footer,padding:y,...u==null?void 0:u.footer}}}),[f,u,y,r]),b=p.Children.toArray(n).some(w=>p.isValidElement(w)&&(w.type===nn||w.type===an||w.type===ln)),{themeMode:j}=h,C=Jm(d||j)[e],v={width:l?"100%":"auto",overflow:"hidden",...C,...k.styles.container,...m,style:{...(I=k.styles.container)==null?void 0:I.style,...c}};return t.jsx(Oi.Provider,{value:k,children:t.jsx(s.View,{...v,children:b?n:t.jsxs(s.Vertical,{width:"100%",children:[a&&t.jsx(nn,{children:a}),t.jsx(an,{children:n}),i&&t.jsx(ln,{children:i})]})})})},Zm=e=>{const o=ve("card",e);return t.jsx(Qm,{...o})},Ae=Zm;Ae.Header=nn;Ae.Content=an;Ae.Footer=ln;const e0=({defaultActiveIndex:e=0,activeIndex:o,onChange:r,autoPlay:n=!1,autoPlayInterval:a=3e3,pauseOnHover:i=!0,infinite:l=!0,totalSlides:u,stepIndices:c})=>{const d=p.useRef(u||0),[g,m]=p.useState(u||0),h=p.useRef(new Set),f=p.useRef(0),y=p.useMemo(()=>Zo("carousel-content"),[]),[k,b]=p.useState(o!==void 0?o:e),[j,x]=p.useState(!1),[C,v]=p.useState(!1),[S,I]=p.useState(0),[w,T]=p.useState(0),R=p.useRef(null);p.useEffect(()=>{o!==void 0&&b(o)},[o]);const E=p.useCallback(Y=>{let O=Y;l?Y<0?O=g-1:Y>=g&&(O=0):O=Math.max(0,Math.min(Y,g-1)),c&&c.length>0&&(c.includes(O)||(O=c.reduce((D,A)=>Math.abs(A-O)<Math.abs(D-O)?A:D))),o===void 0&&b(O),r&&r(O)},[o,l,r,g]),F=p.useCallback(()=>{E(k+1)},[k,E]),W=p.useCallback(()=>{E(k-1)},[k,E]);p.useEffect(()=>(n&&!j&&!C&&(R.current=setInterval(()=>{F()},a)),()=>{R.current&&clearInterval(R.current)}),[n,a,j,C,F,i]);const M=p.useCallback(()=>{i&&x(!0)},[i]),z=p.useCallback(()=>{x(!1)},[]),H=p.useCallback(Y=>{v(!0),"touches"in Y?(I(Y.touches[0].clientX),T(Y.touches[0].clientY)):(I(Y.clientX),T(Y.clientY))},[]),V=p.useCallback(Y=>{if(!C)return;let O,J;"touches"in Y?(O=Y.touches[0].clientX,J=Y.touches[0].clientY):(O=Y.clientX,J=Y.clientY);const D=O-S,A=J-w;Math.abs(D)>Math.abs(A)&&Math.abs(D)>50&&(D>0?W():F(),v(!1))},[C,S,w,F,W]),P=p.useCallback(()=>{v(!1)},[]),L=p.useCallback(()=>{const Y=f.current++;h.current.add(Y);const O=h.current.size;return d.current=O,m(O),Y},[]),B=p.useCallback(Y=>{h.current.delete(Y);const O=h.current.size;if(d.current=O,m(O),O>0&&k>=O){const J=Math.max(0,O-1);o===void 0&&b(J),r&&r(J)}},[k,o,r]),$=l||k>0,q=l||k<g-1;return{activeIndex:k,totalSlides:g,goToSlide:E,nextSlide:F,prevSlide:W,canGoNext:q,canGoPrevious:$,handleMouseEnter:M,handleMouseLeave:z,handleDragStart:H,handleDragMove:V,handleDragEnd:P,registerSlide:L,unregisterSlide:B,contentId:y,infinite:l}},o0={dot:{width:"10px",height:"10px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},line:{width:"20px",height:"4px",borderRadius:"2px",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",transition:"background-color 0.3s ease"},number:{minWidth:"24px",height:"24px",borderRadius:"50%",backgroundColor:"color-gray-300",margin:"0 4px",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",transition:"background-color 0.3s ease"}},t0={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},ur={width:"40px",height:"40px",borderRadius:"50%",backgroundColor:"color-white",color:"color-gray-800",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",boxShadow:"0 2px 5px rgba(0, 0, 0, 0.1)",zIndex:1,transition:"background-color 0.3s ease",_hover:{backgroundColor:"color-gray-100"}},Pt=()=>({container:{position:"relative",overflow:"hidden"},content:{overflow:"hidden",width:"100%",height:"100%"},innerContainer:{display:"flex",transitionProperty:"transform",transitionDuration:"300ms",transitionTimingFunction:"ease-in-out",height:"100%"},item:{flex:"0 0 100%",minWidth:0,position:"relative",height:"100%"},prevButton:{position:"absolute",top:"50%",left:"16px",transform:"translateY(-50%)",zIndex:10,...ur},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...ur}}),Ni=p.createContext(null),Ir=()=>{const e=p.useContext(Ni);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},qi=({children:e,isActive:o,index:r,views:n,...a})=>t.jsx(s.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...n,...a,children:e}),Ui=({views:e,children:o,...r})=>{const{goToPrevious:n,canGoPrevious:a,styles:i}=Ir(),u={...Pt().prevButton,...i==null?void 0:i.prevButton,...e==null?void 0:e.prevButton};return t.jsx(me,{"aria-label":"Previous slide",onClick:()=>n(),isDisabled:!a,...u,...r,children:o??t.jsx(je,{orientation:"left",widthHeight:16})})},Gi=({views:e,children:o,...r})=>{const{goToNext:n,canGoNext:a,styles:i}=Ir(),u={...Pt().nextButton,...i==null?void 0:i.nextButton,...e==null?void 0:e.nextButton};return t.jsx(me,{"aria-label":"Next slide",onClick:()=>n(),isDisabled:!a,...u,...r,children:o??t.jsx(je,{orientation:"right",widthHeight:16})})},Yi=({children:e,views:o,...r})=>{const{registerSlide:n,unregisterSlide:a,styles:i}=Ir(),l=p.useRef(null);p.useEffect(()=>{const d=n();return l.current=d,()=>{l.current!==null&&a(l.current)}},[n,a]);const c={...Pt().item,...i==null?void 0:i.item,...o==null?void 0:o.item};return t.jsx(s.View,{role:"group","aria-roledescription":"slide",...c,...r,children:e})},Ki=({children:e,views:o,style:r,...n})=>{const{currentIndex:a,styles:i,contentId:l}=Ir(),u=Pt(),c={...u.content,...i==null?void 0:i.content,...o==null?void 0:o.content},d={...u.innerContainer,...i==null?void 0:i.innerContainer,...o==null?void 0:o.innerContainer},g=`-${a*100}%`;return t.jsx(s.View,{...c,...n,style:{...c==null?void 0:c.style,...r},id:l,"aria-live":"polite",children:t.jsx(s.View,{...d,style:{...d==null?void 0:d.style,transform:`translateX(${g})`},children:e})})},r0=({children:e,defaultActiveIndex:o=0,activeIndex:r,onChange:n,showNavigation:a=!0,navigationPosition:i="inside",prevButton:l,nextButton:u,showIndicators:c=!0,indicatorPosition:d="bottom",indicatorVariant:g="dot",autoPlay:m=!1,autoPlayInterval:h=3e3,pauseOnHover:f=!0,infinite:y=!0,direction:k="horizontal",transitionDuration:b=300,views:j,stepIndices:x,themeMode:C,...v})=>{const S=p.useMemo(()=>p.Children.toArray(e),[e]),I=e0({defaultActiveIndex:o,activeIndex:r,onChange:n,autoPlay:m,autoPlayInterval:h,pauseOnHover:f,infinite:y,totalSlides:S.length}),{activeIndex:w,totalSlides:T,goToSlide:R,nextSlide:E,prevSlide:F,handleMouseEnter:W,handleMouseLeave:M,handleDragStart:z,handleDragMove:H,handleDragEnd:V}=I,P=()=>{if(!a)return null;const $=l||t.jsx(s.View,{as:"button","aria-label":"Previous slide",...ur,...j==null?void 0:j.prevButton,children:"❮"}),q=u||t.jsx(s.View,{as:"button","aria-label":"Next slide",...ur,...j==null?void 0:j.nextButton,children:"❯"});return t.jsxs(t.Fragment,{children:[t.jsx(s.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",left:i==="inside"?"10px":"-40px",onClick:F,cursor:!y&&w===0?"not-allowed":"pointer",opacity:!y&&w===0?.5:1,children:$}),t.jsx(s.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:i==="inside"?"10px":"-40px",onClick:E,cursor:!y&&w===S.length-1?"not-allowed":"pointer",opacity:!y&&w===S.length-1?.5:1,children:q})]})},L=()=>c?t.jsx(s.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...d==="top"?{top:"10px"}:{bottom:"10px"},...j==null?void 0:j.indicators,children:S.map(($,q)=>t.jsx(s.View,{onClick:()=>R(q),cursor:"pointer",...o0[g],...q===w?{...t0[g]}:{},...j==null?void 0:j.indicator,...q===w?j==null?void 0:j.activeIndicator:{},children:g==="number"&&q+1},q))}):null;return p.useMemo(()=>p.Children.toArray(e).some($=>p.isValidElement($)&&($.type===Ki||$.type===Yi||$.type===Ui||$.type===Gi)),[e])?t.jsx(Ni.Provider,{value:{currentIndex:w,totalSlides:T,goToSlide:R,goToNext:E,goToPrevious:F,canGoNext:I.canGoNext,canGoPrevious:I.canGoPrevious,registerSlide:I.registerSlide,unregisterSlide:I.unregisterSlide,styles:{...Pt(),...j},contentId:I.contentId,infinite:y},children:t.jsx(s.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...j==null?void 0:j.container,...v,children:e})}):t.jsxs(s.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:W,onMouseLeave:M,onTouchStart:z,onTouchMove:H,onTouchEnd:V,onMouseDown:z,onMouseMove:H,onMouseUp:V,...j==null?void 0:j.container,...v,children:[t.jsx(s.View,{width:"100%",height:"100%",position:"relative",...j==null?void 0:j.slideWrapper,children:S.map(($,q)=>t.jsx(qi,{isActive:q===w,index:q,views:j==null?void 0:j.slide,children:$},q))}),P(),L()]})},n0=e=>t.jsx(r0,{...e}),Xe=n0;Xe.Slide=qi;Xe.Content=Ki;Xe.Item=Yi;Xe.Previous=Ui;Xe.Next=Gi;const Ye={blue:"color-blue-500",green:"color-green-500",purple:"color-purple-500",orange:"color-orange-500",red:"color-red-500",teal:"color-teal-500",pink:"color-pink-500",indigo:"color-indigo-500",yellow:"color-yellow-500",cyan:"color-cyan-500"},Xi=[Ye.blue,Ye.green,Ye.purple,Ye.orange,Ye.red,Ye.teal,Ye.pink,Ye.indigo,Ye.yellow,Ye.cyan],Jo=Xi,a0={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},i0={fontSize:"18px",fontWeight:"700",marginBottom:"24px",textAlign:"center",color:"color-gray-900"},l0={display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginTop:"16px",gap:"12px"},s0={display:"flex",alignItems:"center",padding:"4px 8px",borderRadius:"6px",cursor:"pointer",transition:"background-color 0.2s ease",_hover:{backgroundColor:"color-gray-50"}},c0={width:"10px",height:"10px",borderRadius:"50%",marginRight:"8px"},d0={fontSize:"13px",fontWeight:"500",color:"color-gray-600"},qt={position:"absolute",backgroundColor:"color-white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0px 12px 24px rgba(15, 23, 42, 0.18)",border:"1px solid color-gray-200",fontSize:"14px",display:"flex",flexDirection:"column",pointerEvents:"none",zIndex:100},Ji={stroke:"color-gray-100",strokeWidth:"1px",strokeDasharray:"4 4"},pr={stroke:"color-gray-200",strokeWidth:"1px"},mr={fontSize:"12px",fill:"color-gray-500",fontWeight:"500"},u0={rx:"4px",ry:"4px",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{filter:"brightness(1.1)"}},p0={strokeWidth:"3px",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transition:"stroke-width 0.2s ease"},m0={r:"5px",strokeWidth:"2.5px",stroke:"color-white",cursor:"pointer",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{r:"7px"}},Ut={strokeWidth:"2px",stroke:"color-white",cursor:"pointer",transition:"all 0.3s ease",_hover:{transform:"scale(1.02)"}},On={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-white-800",borderRadius:"4px",zIndex:10,padding:"24px",textAlign:"center"},g0={...On},h0={...On,backgroundColor:"rgba(254, 242, 242, 0.8)",color:"color-red-600"},f0={...On,backgroundColor:"rgba(249, 250, 251, 0.8)",color:"color-gray-500"},y0=({data:e,dataPoints:o,animated:r=!0,animationDuration:n=500,showTooltips:a=!0})=>{const[i,l]=p.useState(r?0:1),[u,c]=p.useState({visible:!1,x:0,y:0,content:null}),d=p.useRef(null),g=p.useRef(null);p.useEffect(()=>{if(!r){l(1);return}const x=Date.now(),C=()=>{const v=Date.now()-x,S=Math.min(v/n,1);l(S),S<1&&(d.current=requestAnimationFrame(C))};return d.current=requestAnimationFrame(C),()=>{d.current&&cancelAnimationFrame(d.current)}},[r,n]);const[m,h]=p.useState(new Set),f=p.useCallback(x=>{h(C=>{const v=new Set(C);return v.has(x)?v.delete(x):v.add(x),v})},[]),y=p.useCallback(()=>e?{...e,series:e.series.map((x,C)=>({...x,color:x.color||Jo[C%Jo.length],hidden:m.has(x.name)}))}:o?o.map((x,C)=>({...x,color:x.color||Jo[C%Jo.length],hidden:m.has(x.label)})):null,[e,o,m]),k=p.useCallback((x,C,v)=>{a&&c({visible:!0,x,y:C,content:v})},[a]),b=p.useCallback(()=>{c(x=>({...x,visible:!1}))},[]),j=p.useCallback(()=>{if(!g.current)return{width:0,height:0};const{width:x,height:C}=g.current.getBoundingClientRect();return{width:x,height:C}},[]);return{animationProgress:i,tooltip:u,containerRef:g,processedData:y,showTooltip:k,hideTooltip:b,getChartDimensions:j,toggleSeries:f}},x0=({data:e,width:o,height:r,animationProgress:n,showGrid:a=!0,onBarClick:i,showTooltip:l,hideTooltip:u,views:c})=>{const{getColor:d}=s.useTheme(),g={top:20,right:20,bottom:40,left:50},m=o-g.left-g.right,h=r-g.top-g.bottom,f=p.useMemo(()=>{let S=0;return e.series.forEach(I=>{I.data.forEach(w=>{S=Math.max(S,w)})}),S},[e]),y=e.labels.length,k=e.series.length,b=m/y,j=b*.8/k,x=b*.2/(k+1),C=f||10,v=p.useMemo(()=>{const I=[];for(let w=0;w<=5;w++){const T=C/5*w;I.push(T)}return I},[f]);return t.jsxs("svg",{width:o,height:r,children:[t.jsx("defs",{children:e.series.map((S,I)=>{const w=S.color?d(S.color):"black";return t.jsxs("linearGradient",{id:`bar-gradient-${I}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[t.jsx("stop",{offset:"0%",stopColor:w,stopOpacity:1}),t.jsx("stop",{offset:"100%",stopColor:w,stopOpacity:.7})]},`bar-gradient-${I}`)})}),t.jsx("line",{x1:g.left,y1:r-g.bottom,x2:o-g.right,y2:r-g.bottom,...pr,...c==null?void 0:c.axis}),t.jsx("line",{x1:g.left,y1:g.top,x2:g.left,y2:r-g.bottom,...pr,...c==null?void 0:c.axis}),e.labels.map((S,I)=>{const w=g.left+(I+.5)*b,T=r-g.bottom+20;return t.jsx("text",{x:w,y:T,textAnchor:"middle",...mr,...c==null?void 0:c.axisLabel,children:S},`x-label-${I}`)}),v.map((S,I)=>{const w=r-g.bottom-S/C*h;return t.jsxs(p.Fragment,{children:[t.jsx("text",{x:g.left-10,y:w,textAnchor:"end",dominantBaseline:"middle",...mr,...c==null?void 0:c.axisLabel,children:S.toFixed(0)}),a&&t.jsx("line",{x1:g.left,y1:w,x2:o-g.right,y2:w,...Ji,...c==null?void 0:c.grid})]},`y-tick-${I}`)}),e.series.map((S,I)=>S.hidden?null:t.jsx(p.Fragment,{children:S.data.map((w,T)=>{const R=w/C*h*n,E=g.left+T*b+x*(I+1)+j*I,F=r-g.bottom-R,W=e.labels[T],M=e.series.reduce((L,B)=>{const $=B.data[T];return L+(typeof $=="number"?$:0)},0),z=M>0?(w/M*100).toFixed(1):null,H=S.color?d(S.color):"black",V=L=>{const B=t.jsxs(s.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[t.jsxs(s.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsx(s.Text,{fontWeight:"semibold",children:S.name}),t.jsx(s.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:H})]}),t.jsx(s.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:W}),t.jsxs(s.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[t.jsxs(s.View,{display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Value"}),t.jsx(s.Text,{fontWeight:"medium",children:w.toLocaleString()})]}),z!==null&&t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Share"}),t.jsx(s.Text,{fontWeight:"medium",children:`${z}%`})]}),t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Category total"}),t.jsx(s.Text,{fontWeight:"medium",children:M.toLocaleString()})]})]})]}),$=L.currentTarget.getBoundingClientRect(),q=$.left+$.width/2,Y=$.top;l(q,Y,B)},P=()=>{i&&i(S.name,T)};return t.jsx("rect",{x:E,y:F,width:j,height:R,fill:`url(#bar-gradient-${I})`,onMouseEnter:V,onMouseMove:V,onMouseLeave:u,onClick:P,...u0,...c==null?void 0:c.bar},`bar-${I}-${T}`)})},`series-${I}`))]})},b0=({data:e,width:o,height:r,animationProgress:n,showGrid:a=!0,onPointClick:i,showTooltip:l,hideTooltip:u,views:c})=>{const{getColor:d}=s.useTheme(),g={top:20,right:20,bottom:40,left:40},m=o-g.left-g.right,h=r-g.top-g.bottom,f=p.useMemo(()=>{let x=0;return e.series.forEach(C=>{C.data.forEach(v=>{x=Math.max(x,v)})}),x},[e]),y=f||10,k=p.useMemo(()=>{const C=[];for(let v=0;v<=5;v++){const S=y/5*v;C.push(S)}return C},[f]),b=x=>{if(x.length<2)return"";const C=x.map((S,I)=>({x:g.left+I/(e.labels.length-1)*m,y:r-g.bottom-S/y*h*n}));let v=`M ${C[0].x},${C[0].y}`;for(let S=0;S<C.length-1;S++){const I=C[S===0?S:S-1],w=C[S],T=C[S+1],R=C[S+2===C.length?S+1:S+2],E=w.x+(T.x-I.x)/6,F=w.y+(T.y-I.y)/6,W=T.x-(R.x-w.x)/6,M=T.y-(R.y-w.y)/6;v+=` C ${E},${F} ${W},${M} ${T.x},${T.y}`}return v},j=x=>{if(x.length<2)return"";const C=b(x),v=g.left,S=g.left+m,I=r-g.bottom;return`${C} L ${S},${I} L ${v},${I} Z`};return t.jsxs("svg",{width:o,height:r,children:[t.jsx("defs",{children:e.series.map((x,C)=>{const v=x.color?d(x.color):"black";return t.jsxs("linearGradient",{id:`gradient-${C}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[t.jsx("stop",{offset:"0%",stopColor:v,stopOpacity:.3}),t.jsx("stop",{offset:"100%",stopColor:v,stopOpacity:0})]},`gradient-${C}`)})}),t.jsx("line",{x1:g.left,y1:r-g.bottom,x2:o-g.right,y2:r-g.bottom,...pr,...c==null?void 0:c.axis}),t.jsx("line",{x1:g.left,y1:g.top,x2:g.left,y2:r-g.bottom,...pr,...c==null?void 0:c.axis}),e.labels.map((x,C)=>{const v=g.left+C/(e.labels.length-1)*m,S=r-g.bottom+20;return t.jsx("text",{x:v,y:S,textAnchor:"middle",...mr,...c==null?void 0:c.axisLabel,children:x},`x-label-${C}`)}),k.map((x,C)=>{const v=r-g.bottom-x/y*h;return t.jsxs(p.Fragment,{children:[t.jsx("text",{x:g.left-10,y:v,textAnchor:"end",dominantBaseline:"middle",...mr,...c==null?void 0:c.axisLabel,children:x.toFixed(0)}),a&&t.jsx("line",{x1:g.left,y1:v,x2:o-g.right,y2:v,...Ji,...c==null?void 0:c.grid})]},`y-tick-${C}`)}),e.series.map((x,C)=>{if(x.hidden)return null;const v=x.color?d(x.color):"black";return t.jsxs(p.Fragment,{children:[t.jsx("path",{d:j(x.data),fill:`url(#gradient-${C})`,...c==null?void 0:c.area}),t.jsx("path",{d:b(x.data),stroke:v,...p0,...c==null?void 0:c.line}),x.data.map((S,I)=>{const w=g.left+I/(e.labels.length-1)*m,T=r-g.bottom-S/y*h*n,R=e.labels[I],E=e.series.reduce((P,L)=>{const B=L.data[I];return P+(typeof B=="number"?B:0)},0),F=E>0?(S/E*100).toFixed(1):null,W=I>0&&typeof x.data[I-1]=="number"?x.data[I-1]:null,M=typeof W=="number"?S-W:null,z=typeof M=="number"?`${M>=0?"+":""}${M.toLocaleString()}`:null,H=P=>{const L=t.jsxs(s.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[t.jsxs(s.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsx(s.Text,{fontWeight:"semibold",children:x.name}),t.jsx(s.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:v})]}),t.jsx(s.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:R}),t.jsxs(s.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[t.jsxs(s.View,{display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Value"}),t.jsx(s.Text,{fontWeight:"medium",children:S.toLocaleString()})]}),z!==null&&t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Change"}),t.jsx(s.Text,{fontWeight:"medium",children:z})]}),F!==null&&t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Share"}),t.jsx(s.Text,{fontWeight:"medium",children:`${F}%`})]}),t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Category total"}),t.jsx(s.Text,{fontWeight:"medium",children:E.toLocaleString()})]})]})]}),B=P.currentTarget.getBoundingClientRect(),$=B.left+B.width/2,q=B.top+B.height/2;l($,q,L)},V=()=>{i&&i(x.name,I)};return t.jsx("circle",{cx:w,cy:T,fill:v,onMouseEnter:H,onMouseMove:H,onMouseLeave:u,onClick:V,...m0,...c==null?void 0:c.point},`point-${C}-${I}`)})]},`series-${C}`)})]})},k0=({dataPoints:e,width:o,height:r,animationProgress:n,isDonut:a=!1,onSliceClick:i,showTooltip:l,hideTooltip:u,views:c})=>{const{getColor:d}=s.useTheme(),{ref:g,relation:m}=s.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),h=p.useRef(null);p.useEffect(()=>{h.current&&g&&(g.current=h.current)},[h,g]);const y=Math.min(o,r)/2*.8,k=o/2,b=r/2,j=a?y*.6:0,x=p.useMemo(()=>e.filter(S=>!S.hidden),[e]),C=p.useMemo(()=>x.reduce((S,I)=>S+I.value,0),[x]),v=p.useMemo(()=>{if(C===0)return[{path:a?[`M ${k} ${b-y}`,`A ${y} ${y} 0 1 1 ${k} ${b+y}`,`A ${y} ${y} 0 1 1 ${k} ${b-y}`,`M ${k} ${b-j}`,`A ${j} ${j} 0 1 0 ${k} ${b+j}`,`A ${j} ${j} 0 1 0 ${k} ${b-j}`,"Z"].join(" "):[`M ${k} ${b}`,`M ${k} ${b-y}`,`A ${y} ${y} 0 1 1 ${k} ${b+y}`,`A ${y} ${y} 0 1 1 ${k} ${b-y}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:k,labelY:b,startAngle:0,endAngle:Math.PI*2,index:-1}];const S=[];let I=-Math.PI/2;for(let w=0;w<x.length;w++){const R=x[w].value/C,E=R*2*Math.PI*n,W=Math.max(0,E-.02),M=I+W,z=k+Math.cos(I)*y,H=b+Math.sin(I)*y,V=k+Math.cos(M)*y,P=b+Math.sin(M)*y,L=k+Math.cos(I)*j,B=b+Math.sin(I)*j,$=k+Math.cos(M)*j,q=b+Math.sin(M)*j,Y=W>Math.PI?1:0;let O;a?O=[`M ${z} ${H}`,`A ${y} ${y} 0 ${Y} 1 ${V} ${P}`,`L ${$} ${q}`,`A ${j} ${j} 0 ${Y} 0 ${L} ${B}`,"Z"].join(" "):O=[`M ${k} ${b}`,`L ${z} ${H}`,`A ${y} ${y} 0 ${Y} 1 ${V} ${P}`,"Z"].join(" ");const J=I+W/2,D=a?(y+j)/2:y*.7,A=k+Math.cos(J)*D,_=b+Math.sin(J)*D,G=`${(R*100).toFixed(1)}%`,N=x[w].color||Jo[w%Jo.length],ee=d(N);S.push({path:O,color:ee,label:x[w].label,value:x[w].value,percentage:G,labelX:A,labelY:_,startAngle:I,endAngle:M,index:w,originalIndex:e.findIndex(oe=>oe.label===x[w].label)}),I=M}return S},[x,C,y,k,b,j,n,a,e]);return t.jsxs("svg",{ref:h,width:o,height:r,style:{overflow:"visible"},children:[a&&t.jsxs("g",{pointerEvents:"none",children:[t.jsx("circle",{cx:k,cy:b,r:j,fill:"white"}),t.jsx("text",{x:k,y:b-8,textAnchor:"middle",dominantBaseline:"middle",fontSize:"14px",fontWeight:"500",fill:"color-gray-500",children:"Total"}),t.jsx("text",{x:k,y:b+12,textAnchor:"middle",dominantBaseline:"middle",fontSize:"20px",fontWeight:"800",fill:"color-gray-900",children:C.toLocaleString()})]}),v.map((S,I)=>{const w=E=>{const F=C>0?S.value/C*100:0,W=C>0?Math.max(0,100-F):null,M=t.jsxs(s.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[t.jsxs(s.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsx(s.Text,{fontWeight:"semibold",children:S.label}),t.jsx(s.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:S.color})]}),t.jsxs(s.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",S.index+1," of ",x.length]}),t.jsxs(s.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[t.jsxs(s.View,{display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Value"}),t.jsx(s.Text,{fontWeight:"medium",children:S.value.toLocaleString()})]}),t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Share"}),t.jsx(s.Text,{fontWeight:"medium",children:S.percentage})]}),t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Total"}),t.jsx(s.Text,{fontWeight:"medium",children:C.toLocaleString()})]}),W!==null&&t.jsxs(s.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[t.jsx(s.Text,{color:"color-gray-500",children:"Remaining"}),t.jsx(s.Text,{fontWeight:"medium",children:`${W.toFixed(1)}%`})]})]})]});let z=E.clientX,H=E.clientY;if(h.current){const V=h.current.getBoundingClientRect();z=V.left+S.labelX,H=V.top+S.labelY}l(z,H,M)},T=()=>{S.index!==-1&&i&&i(e[S.index],S.index)},R=S.index===-1;return t.jsxs("g",{children:[t.jsx("path",{d:S.path,fill:S.color,onMouseEnter:R?void 0:w,onMouseMove:R?void 0:w,onMouseLeave:R?void 0:u,onClick:T,...Ut,style:{...Ut==null?void 0:Ut.style,cursor:R?"default":"pointer"},...c==null?void 0:c.pie}),!R&&S.endAngle-S.startAngle>.25&&t.jsx("text",{x:S.labelX,y:S.labelY,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"11px",fontWeight:"800",pointerEvents:"none",paintOrder:"stroke",stroke:"rgba(0,0,0,0.2)",strokeWidth:"2px",children:S.percentage})]},`slice-${I}`)})]})},C0=({visible:e,x:o,y:r,content:n,maxDistance:a=100,views:i})=>{const l=p.useRef(null),[u,c]=p.useState({left:0,top:0});return p.useEffect(()=>{if(!e||!l.current||typeof window>"u"||typeof l.current.getBoundingClientRect!="function")return;const g=l.current.getBoundingClientRect(),m=g.width||200,h=g.height||100,f=20,y=16;let k=o-m/2,b=r-h-f;b<y&&(b=r+f),k+m>window.innerWidth-y?k=window.innerWidth-m-y:k<y&&(k=y),b=Math.max(y,Math.min(b,window.innerHeight-h-y)),c({left:k,top:b})},[e,o,r]),e?t.jsx(s.View,{ref:l,position:"fixed",left:`${u.left}px`,top:`${u.top}px`,...qt,...i==null?void 0:i.tooltip,style:{...qt==null?void 0:qt.style,pointerEvents:"none",transition:"all 0.1s ease-out"},children:n}):null},S0=({type:e,data:o,dataPoints:r,title:n,showLegend:a=!0,legendPosition:i="bottom",showGrid:l=!0,showTooltips:u=!0,animated:c=!0,animationDuration:d=500,responsive:g=!0,aspectRatio:m=16/9,width:h=200,height:f=200,views:y,onDataPointClick:k,onSeriesClick:b,isLoading:j=!1,error:x,noData:C,loadingIndicator:v,errorIndicator:S,noDataIndicator:I,"aria-label":w,themeMode:T,...R})=>{const{animationProgress:E,tooltip:F,containerRef:W,processedData:M,showTooltip:z,hideTooltip:H,getChartDimensions:V,toggleSeries:P}=y0({data:o,dataPoints:r,animated:c,animationDuration:d,showTooltips:u}),L=M(),{width:B,height:$}=V(),q=h||B,Y=f||(g?B/m:$),O=()=>{if(!a||!L)return null;let ee=[];return e==="pie"||e==="donut"?Array.isArray(L)&&(ee=L):L&&L.series&&(ee=L.series),!ee||ee.length===0?null:t.jsx(s.Horizontal,{flexWrap:"wrap",justifyContent:"flex-start",marginTop:i==="bottom"?"16px":0,marginBottom:i==="top"?"16px":0,...l0,...y==null?void 0:y.legend,children:ee.map((oe,ie)=>{const K=oe.hidden,ae=oe.name||oe.label;return t.jsxs(s.View,{...s0,onClick:()=>P(ae),opacity:K?.4:1,...y==null?void 0:y.legendItem,children:[t.jsx(s.View,{backgroundColor:oe.color,...c0,opacity:K?.3:1}),t.jsx(s.Text,{...d0,textDecoration:K?"line-through":"none",children:ae})]},`legend-${ie}`)})})},J=()=>{if(!L)return null;switch(e){case"bar":return t.jsx(x0,{data:L,width:q,height:Y,animationProgress:E,showGrid:l,onBarClick:b,showTooltip:z,hideTooltip:H,views:y});case"line":case"area":return t.jsx(b0,{data:L,width:q,height:Y,animationProgress:E,showGrid:l,onPointClick:b,showTooltip:z,hideTooltip:H,views:y});case"pie":case"donut":return t.jsx(k0,{dataPoints:L,width:q,height:Y,animationProgress:E,isDonut:e==="donut",onSliceClick:k,showTooltip:z,hideTooltip:H,views:y});default:return null}},D=()=>j?t.jsx(s.View,{...g0,...y==null?void 0:y.loadingOverlay,children:v||t.jsx(s.Center,{children:t.jsx(ho,{size:"lg"})})}):null,A=()=>x?t.jsx(s.View,{...h0,...y==null?void 0:y.errorOverlay,children:S||t.jsx(s.Text,{fontWeight:"medium",children:typeof x=="string"?x:"An error occurred"})}):null,_=()=>C?t.jsx(s.View,{...f0,...y==null?void 0:y.noDataOverlay,children:I||t.jsx(s.Text,{children:typeof C=="string"?C:"No data available"})}):null,G=w??(typeof n=="string"?n:"Chart"),N=!x&&!j&&!C;return t.jsxs(s.View,{ref:W,role:"region","aria-label":G,"aria-busy":j,...a0,...y==null?void 0:y.container,...R,children:[n&&t.jsx(s.Text,{...i0,children:n}),N&&i==="top"&&O(),t.jsxs(s.View,{flex:1,width:"100%",position:"relative",...y==null?void 0:y.chart,children:[N&&J(),D(),A(),_(),t.jsx(C0,{visible:u&&F.visible,x:F.x,y:F.y,content:F.content,maxDistance:100,views:y})]}),N&&i==="bottom"&&O()]})},w0=e=>t.jsx(S0,{...e}),j0=w0,v0=(e=365)=>{const[o,r]=p.useState(!1),[n,a]=p.useState(null),i="app-studio-cookie-consent";p.useEffect(()=>{if(typeof localStorage>"u")return;const d=localStorage.getItem(i);a(d!==null?d==="true":!1)},[]);const l=d=>{if(typeof localStorage<"u"){localStorage.setItem(i,String(d));const g=new Date;g.setDate(g.getDate()+e),localStorage.setItem(`${i}-expires`,g.toISOString())}a(d)};return{isHovered:o,setIsHovered:r,hasConsent:n,acceptCookies:()=>{l(!0)},resetConsent:()=>{typeof localStorage<"u"&&(localStorage.removeItem(i),localStorage.removeItem(`${i}-expires`)),a(!1)}}},T0=e=>({default:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-gray-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-gray-600",borderColor:"color-gray-300",hoverBackgroundColor:"color-gray-100"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-800",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}},primary:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-700"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-700",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}}}),I0=({title:e="Nous utilisons des cookies",description:o="Ce site utilise des cookies pour améliorer votre expérience. En continuant à naviguer sur ce site, vous acceptez notre utilisation des cookies conformément à notre politique de confidentialité.",acceptButtonText:r="Accepter",customizeButtonText:n="Personnaliser",position:a="bottom",variant:i="default",onAccept:l,onCustomize:u,views:c,showCustomizeButton:d=!0,cookieExpiration:g=365,themeMode:m,...h})=>{const{themeMode:f}=s.useTheme(),{hasConsent:y,acceptCookies:k}=v0(g),j=T0()[i];if(y)return null;const x=()=>{k(),l&&l()},C=()=>{u&&u()};return t.jsx(s.View,{style:{position:"fixed",left:16,right:16,zIndex:1e3,...a==="bottom"?{bottom:16}:{top:16}},padding:16,borderWidth:"1px",borderStyle:"solid",borderRadius:8,maxWidth:"800px",marginLeft:"auto",marginRight:"auto",transition:"opacity 0.3s ease, transform 0.3s ease",...j.container,...c==null?void 0:c.container,...h,children:t.jsxs(s.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&t.jsx(s.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...c==null?void 0:c.title,children:e}),o&&t.jsx(s.Text,{fontSize:14,color:"color-black",...c==null?void 0:c.description,children:o}),t.jsxs(s.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...c==null?void 0:c.buttonGroup,children:[d&&t.jsx(me,{variant:"outline",onClick:C,size:"sm",...c==null?void 0:c.customizeButton,children:n}),t.jsx(me,{variant:"filled",onClick:x,size:"sm",...c==null?void 0:c.acceptButton,children:r})]})]})})},R0=e=>t.jsx(I0,{...e}),F0=R0,M0=e=>{const{size:o,variant:r,onOpenChange:n}=e||{},[a,i]=p.useState(!1),[l,u]=p.useState({x:0,y:0}),[c,d]=p.useState(null),g=p.useRef(null),m=p.useRef(null),h=p.useMemo(()=>Zo("contextmenu-content"),[]),f=p.useCallback(k=>{u({x:k.clientX,y:k.clientY}),i(!0),n==null||n(!0)},[n]),y=p.useCallback(()=>{i(!1),d(null),n==null||n(!1)},[n]);return p.useEffect(()=>{const k=x=>{m.current&&!m.current.contains(x.target)&&y()},b=()=>{a&&y()},j=x=>{x.key==="Escape"&&a&&y()};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",k),window.addEventListener("resize",b),document.addEventListener("keydown",j),()=>{document.removeEventListener("mousedown",k),window.removeEventListener("resize",b),document.removeEventListener("keydown",j)}},[a,y]),{isOpen:a,setIsOpen:i,position:l,setPosition:u,activeSubmenuId:c,setActiveSubmenuId:d,size:o,variant:r,triggerRef:g,contentRef:m,contentId:h,openMenu:f,closeMenu:y}},xa={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},z0={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},ba={hover:{backgroundColor:"color-gray-100"}},Qi=p.createContext({isOpen:!1,setIsOpen:()=>{},position:{x:0,y:0},setPosition:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null},contentRef:{current:null},contentId:"contextmenu-content",closeMenu:()=>{},openMenu:()=>{}}),W0=({children:e,value:o})=>t.jsx(Qi.Provider,{value:o,children:e}),gr=()=>{const e=p.useContext(Qi);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},Zi=({children:e,disableNativeContextMenu:o=!0,asChild:r=!1,isDisabled:n=!1,views:a,...i})=>{const{triggerRef:l,contentId:u,openMenu:c}=gr(),g={ref:l,onContextMenu:m=>{if(!n)if(o&&m.preventDefault(),c)c(m);else{const{setIsOpen:h,setPosition:f}=gr();f({x:m.clientX,y:m.clientY}),h(!0)}},"aria-controls":u,"aria-haspopup":"menu","data-disabled":n?"":void 0,...r&&p.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:n},...a==null?void 0:a.container,...i};if(r&&p.isValidElement(e)){const m=p.Children.only(e);return p.cloneElement(m,{...g,...m.props})}return t.jsx(s.View,{...g,children:e})},Nn=({items:e,children:o,position:r,side:n="right",align:a="start",views:i,style:l,...u})=>{const{isOpen:c,position:d,contentRef:g,contentId:m,variant:h}=gr(),f=p.useRef(null),y=g||f,{ref:k,relation:b}=s.useElementPosition({}),[j,x]=p.useState({x:0,y:0});if(p.useEffect(()=>{if(c&&y.current){const v=r||d,S=y.current.offsetWidth,I=y.current.offsetHeight,w=window.innerWidth,T=window.innerHeight;let R=v.x,E=v.y;b&&(b.space.horizontal==="left"?R=v.x-S:R=v.x,b.space.vertical==="top"?E=v.y-I:E=v.y),R+S>w&&(R=w-S-8),R<8&&(R=8),E+I>T&&(E=T-I-8),E<8&&(E=8),x({x:R,y:E})}},[c,d,r,n,a,y,b]),!c)return null;const C={position:"fixed",top:`${j.y}px`,left:`${j.x}px`,zIndex:1e3,transformOrigin:"top left"};return t.jsxs(s.View,{id:m||"context-menu",ref:y,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...C,...l},...z0[h],...i==null?void 0:i.menu,...i==null?void 0:i.content,...u,children:[e&&e.map((v,S)=>v.divider?t.jsx(ol,{views:i},`divider-${S}`):t.jsx(el,{item:v,views:i},v.id)),o]})},el=({item:e,children:o,onSelect:r,isDisabled:n=!1,views:a,variant:i,shape:l,isLoading:u,loaderProps:c,loaderPosition:d,icon:g,iconPosition:m,isFilled:h,isAuto:f,isIconRounded:y,isHovered:k,shadow:b,ariaLabel:j,animation:x,textColor:C,reversed:v,borderMovingDuration:S,borderMovingGradientColors:I,animatedStrokeAccentColor:w,animatedStrokeTextColor:T,to:R,isExternal:E,config:F,...W})=>{const{activeSubmenuId:M,setActiveSubmenuId:z,size:H,closeMenu:V}=gr();if(e){const[B,$]=p.useState(!1),q=e.items&&e.items.length>0,Y=M===e.id,[O,J]=p.useState({x:0,y:0}),D=e.disabled||n,A=()=>{$(!0),q&&z(e.id)},_=()=>{$(!1)},G=()=>{D||!q&&e.onClick&&(e.onClick(),V&&V())},{ref:N,relation:ee}=s.useElementPosition({});return p.useEffect(()=>{if(Y&&N.current){const oe=N.current.getBoundingClientRect(),ie=window.innerWidth,K=200;let ae=!1;if(ee)ae=ee.space.horizontal==="left";else{const de=ie-oe.right,fe=oe.left;ae=de<K&&fe>de}J({x:ae?oe.left-K:oe.right,y:oe.top})}},[Y,e.items,ee]),t.jsxs(s.View,{ref:N,role:"menuitem",display:"flex",alignItems:"center",cursor:D?"not-allowed":"pointer",opacity:D?.5:1,position:"relative","aria-disabled":D,"data-disabled":D?"":void 0,...xa[H],_hover:D?{}:ba.hover,backgroundColor:B&&!D?"color-gray-100":"transparent",onMouseEnter:A,onMouseLeave:_,onClick:G,...a==null?void 0:a.item,...W,children:[e.icon&&t.jsx(s.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),t.jsx(s.View,{flexGrow:1,children:e.label}),q&&t.jsx(s.View,{marginLeft:8,...a==null?void 0:a.submenuIndicator,children:t.jsx(je,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),Y&&q&&t.jsx(Nn,{items:e.items||[],position:O,side:"right",align:"start",views:a})]})}const P=B=>{n||(r==null||r(B),V&&V())},L=R?{as:"a",href:R,color:"inherit",textDecoration:"none",...E?{target:"_blank",rel:"noopener noreferrer"}:{}}:{};return t.jsx(s.View,{role:"menuitem",onClick:P,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,"aria-disabled":n,"data-disabled":n?"":void 0,...xa[H],_hover:n?{}:ba.hover,...L,...a==null?void 0:a.item,...W,children:o})},ol=({views:e,...o})=>t.jsx(s.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.divider,...o}),E0=({views:e,...o})=>t.jsx(s.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.separator,...o}),A0=({children:e,items:o,size:r="md",variant:n="default",disableNativeContextMenu:a=!0,views:i,themeMode:l,onOpenChange:u,...c})=>!o||o.length===0?t.jsx(t.Fragment,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Zi,{disableNativeContextMenu:a,views:i,...c,children:e}),t.jsx(Nn,{items:o,views:i})]}),H0=({children:e,items:o,size:r="md",variant:n="default",disableNativeContextMenu:a=!0,onOpenChange:i,views:l,...u})=>{const c=M0({size:r,variant:n,onOpenChange:i}),{isOpen:d,setIsOpen:g,position:m,setPosition:h,activeSubmenuId:f,setActiveSubmenuId:y,triggerRef:k,contentRef:b,contentId:j,openMenu:x,closeMenu:C}=c;return t.jsx(W0,{value:{isOpen:d,setIsOpen:g,position:m,setPosition:h,activeSubmenuId:f,setActiveSubmenuId:y,size:r,variant:n,triggerRef:k,contentRef:b,contentId:j,openMenu:x,closeMenu:C,styles:l},children:t.jsx(A0,{items:o,size:r,variant:n,disableNativeContextMenu:a,views:l,...u,children:e})})},dt=H0;dt.Trigger=Zi;dt.Content=Nn;dt.Item=el;dt.Divider=ol;dt.Separator=E0;const V0=({src:e,color:o,views:r,themeMode:n,...a})=>{const{getColor:i,themeMode:l}=s.useTheme(),u=o?{fill:i(o,{themeMode:l}),stroke:i(o,{themeMode:l})}:{};return t.jsx(s.View,{display:"flex",alignItems:"center",justifyContent:"center",...a,...r==null?void 0:r.container,children:t.jsx(s.Image,{...u,content:'url("'+e+'")',width:"100%",height:"100%",...r==null?void 0:r.image})})},P0=({path:e,...o})=>t.jsx(s.Image,{src:e,...o}),ka=(e,o)=>o?Array.isArray(e)?e:e===""?[]:[e]:Array.isArray(e)?e[0]??"":e,tl=({placeholder:e,isMulti:o,options:r,value:n,defaultValue:a,id:i})=>{const l=p.useId().replace(/[^a-zA-Z0-9_-]/g,""),u=i??`select-${l}`,c=n!==void 0,[d,g]=p.useState(!1),[m,h]=p.useState(!1),[f,y]=p.useState(()=>a!==void 0?ka(a,o):o?[]:e?"":Array.isArray(r)&&r.length>0?r[0].value:""),k=c?ka(n,o):f,b=p.useCallback(S=>{c||y(S)},[c]),[j,x]=p.useState(0),[C,v]=p.useState(!0);return{id:u,value:k,setValue:b,hide:C,setHide:v,isHovered:d,setIsHovered:g,isFocused:m,setIsFocused:h,highlightedIndex:j,setHighlightedIndex:x}},sn=({children:e,views:o={helperText:{}},...r})=>t.jsx(s.Text,{fontSize:"11px",fontWeight:"400",letterSpacing:"-0.01em",lineHeight:"16px",marginVertical:0,marginHorizontal:0,color:"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...o.helperText,...r,children:e}),fo=p.forwardRef(({children:e,helperText:o,error:r=!1,errorId:n,views:a,...i},l)=>t.jsxs(s.Vertical,{ref:l,gap:4,position:"relative",width:"100%",boxSizing:"border-box",marginVertical:0,...i,...a==null?void 0:a.container,children:[e,!r&&o&&t.jsx(sn,{marginTop:0,...a==null?void 0:a.helperText,children:o}),r&&t.jsx(s.Text,{id:n,fontSize:"11px",lineHeight:"16px",marginTop:0,marginHorizontal:0,fontWeight:"500",color:"theme-error",transition:"color 0.2s ease, opacity 0.2s ease",...a==null?void 0:a.error,children:r})]}));fo.displayName="FieldContainer";const D0={default:{borderRadius:"8px"},square:{borderRadius:0},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},$0={xs:"10px",sm:"11px",md:"11px",lg:"12px",xl:"12px"},L0={outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},default:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",backgroundColor:"transparent",color:"inherit",transition:"border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease",_hover:{borderColor:"color-gray-300"},_focus:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"},_focusVisible:{borderColor:"theme-primary",outline:"none",boxShadow:"0 0 0 3px theme-primary"}},none:{border:"none",style:{backgroundColor:"transparent"},color:"inherit",transition:"background-color 0.2s ease"}},B0={xs:{minHeight:24,paddingVertical:4,paddingHorizontal:10},sm:{minHeight:32,paddingVertical:7,paddingHorizontal:10},md:{minHeight:40,paddingVertical:9,paddingHorizontal:12},lg:{minHeight:48,paddingVertical:11,paddingHorizontal:14},xl:{minHeight:56,paddingVertical:13,paddingHorizontal:16}},_0=e=>{const{minHeight:o,paddingVertical:r,paddingHorizontal:n}=B0[e];return{minHeight:`${o}px`,paddingTop:`${r}px`,paddingBottom:`${r}px`,paddingLeft:`${n}px`,paddingRight:`${n}px`}},So=({label:e,shadow:o,children:r,value:n,size:a="md",shape:i="default",variant:l="default",error:u=!1,showLabel:c=!1,isFocused:d=!1,isHovered:g=!1,isDisabled:m=!1,isReadOnly:h=!1,views:f={pickerBox:{}},...y})=>{const{themeMode:k}=s.useTheme(),b=k==="dark",x=u?"color-red-500":(g||d)&&!m?"theme-primary":"color-gray-200";return t.jsx(s.Horizontal,{gap:8,width:"100%",boxSizing:"border-box",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",borderStyle:"solid",borderColor:x,backgroundColor:b?"color-gray-900":"color-white",fontSize:s.Typography.fontSizes[a],cursor:m?"not-allowed":h?"auto":"text",opacity:m?.7:1,transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",..._0(a),...typeof o=="object"&&o!==null?o:{},...D0[i],...L0[l],...f==null?void 0:f.container,...y,children:r})},Rt=({children:e,...o})=>t.jsx(s.Horizontal,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",...o,children:e}),O0={h1:{fontSize:96,letterSpacing:-1.5},h2:{fontSize:60,letterSpacing:-.5},h3:{fontSize:48,letterSpacing:0},h4:{fontSize:34,letterSpacing:.25},h5:{fontSize:24,letterSpacing:0},h6:{fontSize:20,letterSpacing:.15}},N0=({children:e,heading:o,isItalic:r=!1,isUnderlined:n=!1,isStriked:a=!1,weight:i="normal",size:l="sm",dropDown:u,error:c,isDisabled:d,helperText:g,views:m,...h})=>{const f=o?O0[o]:{};return t.jsx(s.Element,{as:"label",width:"100%",fontSize:l,fontStyle:r?"italic":"normal",fontWeight:s.Typography.fontWeights[i],textDecoration:a?"line-through":n?"underline":"none",...c?{color:"theme-error"}:d?{color:"color-gray-400"}:{},...d?{cursor:"not-allowed"}:{},...f,...h,children:e})},q0=e=>t.jsx(N0,{...e}),Dt=q0,Wo=({children:e,size:o="md",error:r=!1,color:n="theme-primary",views:a={label:{}},helperText:i,...l})=>t.jsx(Dt,{position:"static",fontSize:$0[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,color:r?"theme-error":"inherit",transition:"color 0.2s ease",...a.label,...l,children:e}),ut=({children:e,...o})=>t.jsx(s.Vertical,{display:"flex",flexDirection:"column",gap:4,flex:1,width:"100%",maxWidth:"100%",boxSizing:"border-box",...o,children:e}),rl={xs:12,sm:14,md:16,lg:18,xl:20},U0={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},G0={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"}},Y0={padding:"10px 12px",cursor:"pointer",borderRadius:8,margin:"2px 4px",transition:"all 0.15s ease-in-out"},Gt={default:{},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},Ca={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},K0={padding:"4px 8px",borderRadius:8,backgroundColor:"color-gray-100",fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},X0={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},J0=e=>{if(!e)return{};const{container:o,content:r,...n}=e;return n},Q0=({isHovered:e,setIsHovered:o=()=>{},option:r,size:n="md",callback:a=()=>{},style:i,isSelected:l=!1,...u})=>{const c=(m,h)=>{m.stopPropagation(),m.preventDefault(),typeof a=="function"&&a(h)},d=()=>o(!e),g=()=>l&&e?Gt.selectedHighlighted:l?Gt.selected:e?Gt.highlighted:Gt.default;return t.jsxs(s.Element,{as:"li",role:"option","aria-selected":l,display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",...Y0,...g(),onMouseEnter:d,onMouseLeave:d,onClick:m=>c(m,r.value),...u,children:[t.jsx(s.Text,{fontSize:s.Typography.fontSizes[n],fontWeight:l?"500":"400",lineHeight:"14px",color:l?"color-gray-900":"color-gray-700",...i,children:r.label}),l&&t.jsx(s.Element,{as:"span","aria-hidden":"true",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},Z0=({size:e="md",views:o={field:{},text:{}},value:r,isDisabled:n,placeholder:a,removeOption:i=()=>{},options:l})=>{const u=(o==null?void 0:o.field)||{},c=(o==null?void 0:o.text)||{},d=Array.isArray(r)&&r.length>0,g={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:0,paddingHorizontal:0,fontSize:s.Typography.fontSizes[e],fontWeight:"400",letterSpacing:"-0.01em",color:n?"color-gray-400":"color-gray-900",cursor:n?"not-allowed":"pointer",transition:"all 0.2s ease-in-out",...d?{}:{maxLines:1,minWidth:0},...u,...c,style:{backgroundColor:"transparent",...u.style,...c.style}},m=l.length>0&&l.find(h=>h.value===r);return t.jsx(s.Text,{...g,children:(r===""||Array.isArray(r)&&r.length===0)&&a?a:t.jsx(t.Fragment,{children:typeof r=="string"?(m&&m.label)??r:Array.isArray(r)&&r.length>0?t.jsx(s.Horizontal,{gap:6,children:r.map(h=>t.jsx(tg,{option:h,removeOption:i},h))}):t.jsx("span",{children:r})})})},eg=({id:e,name:o,value:r,onChange:n,isMulti:a=!1,isDisabled:i=!1,isReadOnly:l=!1,options:u=[],defaultValue:c,...d})=>{const g=m=>{n&&n(a?Array.from(m.target.selectedOptions,h=>h.value):m.target.value)};return t.jsx(s.Element,{id:e,name:o,as:"select",opacity:0,width:1,height:1,overflow:"hidden",position:"absolute",pointerEvents:"none",tabIndex:-1,"aria-hidden":"true",value:r,disabled:i,readOnly:l,onChange:g,multiple:a,...d,children:u.length>0&&u.map(m=>t.jsx("option",{value:m.value,children:m.label},m.value))})},og=({size:e,views:o={},options:r,callback:n=()=>{},highlightedIndex:a,setHighlightedIndex:i=()=>{},selectedValue:l,listboxId:u,getOptionId:c})=>{const d=m=>n(m),g=m=>Array.isArray(l)?l.includes(m):l===m;return t.jsx(s.Element,{as:"ul",role:"listbox",id:u,display:"flex",flexDirection:"column",margin:0,padding:"4px",...U0,style:X0,...o==null?void 0:o.dropDown,children:r&&r.length>0&&r.map((m,h)=>t.jsx(Q0,{id:c?c(h):void 0,size:e,style:o.text,option:m,callback:d,isSelected:g(m.value),isHovered:h===a,setIsHovered:()=>{},onMouseEnter:()=>i(h)},m.value))})},tg=({option:e,size:o="md",removeOption:r=()=>{},...n})=>{const a=()=>r(e);return t.jsxs(s.Horizontal,{gap:6,alignItems:"center",onClick:i=>i.stopPropagation(),...K0,_hover:{backgroundColor:"color-gray-200"},...n,children:[t.jsx(s.Text,{fontSize:s.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),t.jsx(s.Element,{as:"button",type:"button","aria-label":`Remove ${e}`,onClick:a,display:"flex",alignItems:"center",justifyContent:"center",padding:0,border:"none",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",transition:"all 0.2s ease-in-out",_hover:{color:"color-gray-700"},children:t.jsx(Ue,{color:"inherit",widthHeight:rl[o]})})]})},nl=({id:e,name:o,label:r,value:n,placeholder:a,helperText:i,hide:l=!1,error:u=!1,isMulti:c=!1,isFocused:d=!1,isHovered:g=!1,isDisabled:m=!1,isReadOnly:h=!1,isRequired:f=!1,isAutoFocus:y=!1,options:k=[],shadow:b={},size:j="md",shape:x="default",variant:C="default",views:v={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:S=()=>{},setHide:I=()=>{},setValue:w=()=>{},setIsHovered:T=()=>{},setIsFocused:R=()=>{},setHighlightedIndex:E,highlightedIndex:F,isScrollable:W,"aria-label":M,...z})=>{const H=p.useId(),V=e??`select-${H.replace(/[^a-zA-Z0-9_-]/g,"")}`,P=`${V}-native`,L=`${V}-label`,B=`${V}-listbox`,$=K=>`${V}-option-${K}`,{ref:q,relation:Y,updateRelation:O}=s.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),J=p.useRef(null),D=()=>{var fe;if(!q.current)return{};const K=q.current.getBoundingClientRect(),ae={position:"fixed",left:K.left,width:K.width,zIndex:1e4};return((fe=Y==null?void 0:Y.space)==null?void 0:fe.vertical)==="top"?{...ae,bottom:window.innerHeight-K.top+8}:{...ae,top:K.bottom+8}};p.useEffect(()=>{const K=()=>I(!0);return document.addEventListener("closeAllSelects",K),()=>document.removeEventListener("closeAllSelects",K)},[I]),p.useEffect(()=>{var K;y&&!m&&!h&&((K=q.current)==null||K.focus())},[]),p.useEffect(()=>{const K=ae=>{!ae.target.closest(`#${V}`)&&!l&&I(!0)};return document.addEventListener("click",K),()=>{document.removeEventListener("click",K)}},[V,l,I]);const A=()=>T(!g),_=()=>R(!0),G=K=>{document.dispatchEvent(new Event("closeAllSelects")),K&&K.stopPropagation&&K.stopPropagation();const ae=!l;I(ae),R(!ae)},N=p.useCallback(K=>{if(I(!0),document.dispatchEvent(new Event("closeAllSelects")),c&&Array.isArray(n)){if(!n.includes(K)){const ae=[...n,K];w(ae),S&&S(ae)}}else w(K),S&&S(K);R(!0)},[c,n,I,w,S,R]),ee=K=>{if(Array.isArray(n)&&n.includes(K)){const ae=n.filter(de=>de!==K);w(ae),S&&S(ae)}},oe=!!r,ie=J0(v);return t.jsx(fo,{ref:q,position:"relative",width:"100%",display:"inline-block",id:V,role:"combobox","aria-haspopup":"listbox","aria-expanded":!l,"aria-labelledby":!M&&oe?L:void 0,"aria-label":M,"aria-controls":B,"aria-activedescendant":!l&&k.length>0?$(F??0):void 0,"aria-disabled":m||void 0,"aria-required":f||void 0,tabIndex:m||h?-1:0,helperText:i,error:u,views:ie,onKeyDown:K=>{if(m||h||K.target!==K.currentTarget)return;if(l){(K.key==="Enter"||K.key===" "||K.key==="ArrowDown")&&(K.preventDefault(),document.dispatchEvent(new Event("closeAllSelects")),I(!1),R(!0));return}const ae=F??0;if(K.key==="ArrowDown")K.preventDefault(),E==null||E(Math.min(ae+1,k.length-1));else if(K.key==="ArrowUp")K.preventDefault(),E==null||E(Math.max(ae-1,0));else if(K.key==="Enter"){K.preventDefault();const de=k[ae];de&&N(de.value)}else K.key==="Escape"&&(K.preventDefault(),I(!0))},onClick:K=>{K.stopPropagation(),m||h||G(K)},children:t.jsxs(So,{label:r,size:j,error:u,shape:x,views:v,shadow:b,variant:C,value:n,color:"theme-primary",isHovered:g,isDisabled:m,isReadOnly:h,isFocused:d,showLabel:oe,onMouseEnter:A,onMouseLeave:A,position:"relative",...v==null?void 0:v.content,children:[t.jsxs(ut,{children:[oe&&t.jsx(Wo,{id:L,htmlFor:P,color:"theme-primary",error:u,...v==null?void 0:v.label,children:r}),t.jsx(eg,{id:P,name:o,options:k,onChange:S,value:n,isDisabled:m,isReadOnly:h,isMulti:c,required:f||void 0,onFocus:_,...z}),t.jsx(Z0,{options:k,size:j,views:v,value:n,isDisabled:m,placeholder:a,removeOption:ee})]}),t.jsx(Rt,{children:!h&&!m&&t.jsx(s.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:l?Ca.closed:Ca.open,children:t.jsx(je,{color:"inherit",widthHeight:rl[j],style:v.icon,orientation:"down"})})}),!l&&k.length>0&&t.jsx(At,{children:t.jsx(s.Element,{ref:J,onClick:K=>K.stopPropagation(),style:{...D(),...G0.enter},children:t.jsx(og,{size:j,views:v,options:k,callback:N,highlightedIndex:F,setHighlightedIndex:E,selectedValue:n,listboxId:B,getOptionId:$})})})]})})},rg=e=>{const o=ve("select",e),r={...o,options:o.options||[]},n=tl(r);return t.jsx(nl,{...n,...r,value:n.value,onClick:a=>{a.stopPropagation(),o.onClick&&o.onClick(a)}})},Ft=rg,al=({isDisabled:e,isChecked:o})=>{const[r,n]=p.useState(!1),[a,i]=p.useState(o||!1),[l,u]=p.useState(o||!1);return p.useEffect(()=>{o!==void 0&&(i(o),u(o))},[o]),{isHovered:r,setIsHovered:n,on:a,setOn:i,value:l,setValue:u}},Sa={xs:{height:"10px",width:"10px"},sm:{height:"14px",width:"14px"},md:{height:"18px",width:"18px"},lg:{height:"22px",width:"22px"},xl:{height:"26px",width:"26px"}},ng={xs:{height:"20px",width:"40px"},sm:{height:"24px",width:"48px"},md:{height:"28px",width:"56px"},lg:{height:"32px",width:"64px"},xl:{height:"36px",width:"72px"}},ag={xs:{height:"22px",width:"52px"},sm:{height:"26px",width:"62px"},md:{height:"30px",width:"72px"},lg:{height:"34px",width:"84px"},xl:{height:"38px",width:"96px"}},ig={xs:"9px",sm:"10px",md:"11px",lg:"12px",xl:"13px"},Yt={xs:{paddingVertical:5,paddingHorizontal:3},sm:{paddingVertical:5,paddingHorizontal:3},md:{paddingVertical:5,paddingHorizontal:5},lg:{paddingVertical:5,paddingHorizontal:5},xl:{paddingVertical:5,paddingHorizontal:5}},so={default:{active:"theme-primary",inactive:"color-gray-300",knob:"color-white",disabled:"color-gray-200"},states:{hover:{active:"theme-primary",inactive:"color-gray-400",activeOpacity:.9},focus:{active:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},inactive:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px color-gray-200"}}}},wa={slider:{transition:"all 0.2s ease-in-out"},knob:{transition:"all 0.2s ease-in-out"}},lg=e=>t.jsx(s.Input,{type:"checkbox",...e}),il=({id:e,name:o,label:r,inActiveChild:n,isChecked:a,activeChild:i,labelPosition:l="right",shadow:u={},size:c="sm",value:d=!1,isHovered:g=!1,isDisabled:m=!1,isReadOnly:h=!1,on:f,setOn:y=()=>{},onChange:k,setValue:b=()=>{},setIsHovered:j=()=>{},helperText:x,description:C,views:v={slider:{},circle:{},label:{}},...S})=>{const I=p.useId(),w=e??I,[T,R]=p.useState(!1),E=typeof a=="boolean"?a:d,W=!!(i||n)?ag[c]:ng[c],M=`${Yt[c].paddingHorizontal}px`,z=`${Yt[c].paddingHorizontal+2}px`,H=`calc(${Sa[c].width} + ${Yt[c].paddingHorizontal}px + 4px)`,V=ig[c],P=D=>{if(!h&&!m){const A=D.target.checked;b(A),y(A),k&&k(A)}},L=()=>j(!0),B=()=>j(!1),$=D=>{let A=!0;try{A=D.target.matches(":focus-visible")}catch{}R(A)},q=()=>R(!1),Y=`${w}-description`,O={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:m?"not-allowed":h?"default":"pointer",opacity:m?.6:1,transition:"all 0.2s ease-in-out",...v.label}},J=t.jsxs(Dt,{htmlFor:w,onMouseEnter:L,onMouseLeave:B,...O.container,children:[l==="left"&&r&&t.jsx(s.Text,{fontWeight:"500",color:m?"color-gray-400":"inherit",transition:"color 0.2s ease, opacity 0.2s ease",children:r}),t.jsxs(s.View,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",marginBottom:4,borderRadius:"9999px",backgroundColor:m?so.default.disabled:E?g?so.states.hover.active:so.default.active:g?so.states.hover.inactive:so.default.inactive,opacity:!m&&E&&g?so.states.hover.activeOpacity:1,cursor:"pointer",...wa.slider,...u,...Yt[c],...W,...v.slider,...T?E?so.states.focus.active:so.states.focus.inactive:{},children:[t.jsx(lg,{id:w,name:o,role:"switch","aria-checked":E,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:2,cursor:m?"not-allowed":h?"default":"pointer",checked:E,onChange:P,onFocus:$,onBlur:q,disabled:m,readOnly:h,"aria-describedby":C?Y:void 0,...S}),i&&E&&t.jsx(s.View,{marginLeft:z,marginRight:H,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:V,color:"color-white",fontWeight:600,children:i}),t.jsx(s.View,{position:"absolute",top:"50%",left:E?void 0:M,right:E?M:void 0,borderRadius:"50%",backgroundColor:so.default.knob,boxShadow:g?"0 4px 10px rgba(15, 23, 42, 0.18)":"0 1px 3px rgba(15, 23, 42, 0.18)",transform:`translateY(-50%) ${g?"scale(1.05)":"scale(1)"}`,...wa.knob,zIndex:1,...Sa[c],...v.circle}),n&&!E&&t.jsx(s.View,{marginLeft:H,marginRight:z,transition:"all 0.2s ease-in-out",display:"flex",alignItems:"center",justifyContent:"center",height:"100%",width:"100%",overflow:"hidden",fontSize:V,color:"color-white",fontWeight:600,children:n})]}),l==="right"&&r&&t.jsx(s.Text,{fontWeight:"500",color:m?"color-gray-400":"inherit",transition:"all 0.2s ease-in-out",children:r})]});return C?t.jsxs(s.Vertical,{gap:4,width:"fit-content",children:[J,t.jsx(s.Text,{id:Y,color:"color-gray-500",fontSize:"14px",lineHeight:"20px",children:C})]}):J},sg=e=>{const o=ve("switch",e),r=al(o);return t.jsx(il,{...r,...o})},qn=sg,ll=({placeholder:e,isMulti:o,options:r,id:n})=>{const a=p.useId().replace(/[^a-zA-Z0-9_-]/g,""),i=n??`selector-${a}`,l=e?o?[]:"":Array.isArray(r)&&r.length>0?r[0].value:o?[]:"",[u,c]=p.useState(!1),[d,g]=p.useState(!1),[m,h]=p.useState(l),[f,y]=p.useState(!0);return{id:i,value:m,setValue:h,hide:f,setHide:y,isHovered:u,setIsHovered:c,isFocused:d,setIsFocused:g}},sl=({id:e,name:o,label:r,value:n,views:a={},options:i=[],helperText:l,error:u=!1,isDisabled:c=!1,isReadOnly:d=!1,onChange:g=()=>{},setValue:m=()=>{},hide:h,setHide:f,isHovered:y,setIsHovered:k,isFocused:b,setIsFocused:j,placeholder:x,isMulti:C,shape:v,variant:S,size:I,shadow:w,isScrollable:T,"aria-label":R,...E})=>{const F=p.useId(),W=e??F,M=`${W}-label`,z=`${W}-helper-text`,H=!!l,V=p.useCallback(P=>{c||d||(m(P.value),g&&g(P.value))},[m,g,c,d]);return t.jsxs(fo,{id:W,width:"100%",views:a,...E,children:[r&&t.jsxs(s.Horizontal,{fontSize:"10px",letterSpacing:"wider",color:"color-black-500",fontWeight:"bold",marginBottom:12,alignItems:"center",gap:6,style:{textTransform:"uppercase"},children:[t.jsx(xo,{widthHeight:14})," ",t.jsx(s.Text,{id:M,children:r})]}),t.jsx(s.Horizontal,{gap:0,role:"radiogroup","aria-labelledby":!R&&r?M:void 0,"aria-label":R,"aria-describedby":H?z:void 0,"aria-readonly":d||void 0,"aria-invalid":u?!0:void 0,children:i.map((P,L,B)=>{const $=n===P.value,q=P.color??"theme-primary",Y=$?q:"color-gray-200",O=$?q:"color-gray-500",J=L===0,D=L===B.length-1,A=D||$;return t.jsx(s.View,{as:"button",type:"button",role:"radio","aria-checked":$,disabled:c,onClick:()=>V(P),flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",paddingVertical:6,paddingHorizontal:12,fontSize:"12px",fontWeight:$?"bold":"normal",cursor:c?"not-allowed":d?"default":"pointer",backgroundColor:"transparent",color:O,borderStyle:"solid",borderColor:Y,borderTopWidth:1,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:A?1:0,borderRadius:J?"6px 0 0 6px":D?"0 6px 6px 0":"0",zIndex:$?1:0,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...a.item,children:P.label},P.value)})}),t.jsx("input",{type:"hidden",id:`${W}-input`,name:o,value:Array.isArray(n)?n.join(","):n,onChange:()=>{}}),H&&t.jsx(s.Text,{id:z,fontSize:"11px",lineHeight:"16px",marginTop:0,fontWeight:u?"500":"400",color:u?"theme-error":"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...a.helperText,children:l})]})},cg=e=>{const o={...e,options:e.options||[]},r=ll(o);return t.jsx(sl,{...r,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},dg=cg,cl=({label:e,placeholder:o,value:r})=>{const[n,a]=p.useState(e??o),[i,l]=p.useState(!1),[u,c]=p.useState(r||""),[d,g]=p.useState(!1);return p.useMemo(()=>{a(d&&!u?o??"":e??o)},[u,d,e,o]),{hint:n,setHint:a,isHovered:i,setIsHovered:l,value:u,setValue:c,isFocused:d,setIsFocused:g}},ug=e=>{if(!e)return{};const{container:o,content:r,...n}=e;return n},pg=(e,o)=>{if(o!=="pill")return e;if(typeof e=="number")return Math.min(e,28);if(typeof e=="string"){const r=Number.parseFloat(e);if(Number.isFinite(r)&&e.trim().endsWith("px"))return`${Math.min(r,28)}px`}return"28px"},dl=({id:e,name:o,hint:r,error:n,value:a,label:i,shadow:l,helperText:u,placeholder:c,size:d="sm",shape:g="default",variant:m="default",isHovered:h=!1,isFocused:f=!1,isEditable:y=!0,isReadOnly:k=!1,isDisabled:b=!1,isAutoFocus:j=!1,isRequired:x,required:C,labelProps:v,maxRows:S=3,maxCols:I=30,onBlur:w=()=>{},onChange:T,onFocus:R,setHint:E=()=>{},setValue:F=()=>{},setIsFocused:W=()=>{},setIsHovered:M=()=>{},onChangeText:z,inputRef:H,views:V={label:{},helperText:{}},...P})=>{const L=p.useId(),B=e??L,$=!!i,q={xs:{minHeight:"72px",shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:"88px",shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:"104px",shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:"120px",shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:"136px",shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},Y=(V==null?void 0:V.field)||{},O=(V==null?void 0:V.container)||{},J=pg(O.borderRadius,g),D={...V,container:{...O,...J!==void 0?{borderRadius:J}:{},overflow:"hidden"}},A=ug(V),_={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:q[d].minHeight,maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:q[d].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:b?"color-gray-400":"color-gray-900",cursor:b?"not-allowed":"text",opacity:b?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",...Y,style:{backgroundColor:"transparent",...Y.style}},G=()=>{W(!0),R&&R()},N=oe=>{w(oe),W(!1)},ee=oe=>{const ie=typeof oe=="string"?oe:oe.target.value;F(ie),z&&z(ie),T&&T(ie)};return t.jsx(fo,{helperText:u,error:n,views:A,children:t.jsx(So,{label:i,size:d,error:n,shape:g,views:D,shadow:l,variant:m,value:a,color:"theme-primary",isHovered:h,isDisabled:b,isReadOnly:k,isFocused:f,showLabel:$,alignItems:"flex-start",minHeight:q[d].minHeight,paddingTop:q[d].shellPaddingY,paddingBottom:q[d].shellPaddingY,paddingLeft:q[d].shellPaddingX,paddingRight:q[d].shellPaddingX,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),...D==null?void 0:D.content,children:t.jsxs(ut,{...V==null?void 0:V.warper,children:[$&&t.jsx(Wo,{htmlFor:B,color:"theme-primary",error:n,...v,...V==null?void 0:V.label,children:i}),t.jsx(s.Element,{ref:H,as:"textarea",id:B,name:o,rows:S,cols:I,value:a,readOnly:k||!y,disabled:b,autoFocus:j,...x??C?{required:!0,"aria-required":!0}:{},placeholder:c||r,onBlur:N,onFocus:G,onChange:oe=>ee(oe),..._,...P,style:{resize:b||k||!y?"none":"vertical",..._.style,...P.style||{}},...V==null?void 0:V.textarea})]})})})},mg=e=>{const o=ve("textarea",e),r=cl(o);return t.jsx(dl,{...r,...o})},$t=mg,Un=({label:e,placeholder:o,value:r})=>{const[n,a]=p.useState(e??o),[i,l]=p.useState(!1),[u,c]=p.useState(!1),[d,g]=p.useState(r);return p.useMemo(()=>{a(i&&!d?o??"":e??o)},[d,i,e,o]),{hint:n,setHint:a,isFocused:i,setIsFocused:l,isHovered:u,setIsHovered:c,setValue:g,value:d}},Lt=({id:e,name:o,label:r,hint:n,value:a,onChange:i,left:l,right:u,helperText:c,placeholder:d,onChangeText:g,shadow:m={},views:h={container:{},field:{},label:{},helperText:{},text:{}},size:f="md",shape:y="default",variant:k="default",error:b=!1,isFocused:j=!1,isHovered:x=!1,isDisabled:C=!1,isReadOnly:v=!1,isClearable:S=!0,isAutoFocus:I=!1,isRequired:w,required:T,labelProps:R,isMultiline:E,multiline:F,rows:W,leftIcon:M,rightIcon:z,setHint:H=()=>{},setIsFocused:V=()=>{},setIsHovered:P=()=>{},setValue:L=()=>{},onClick:B=()=>{},onFocus:$,onBlur:q=()=>{},themeMode:Y,inputRef:O,...J})=>{const D=p.useId(),A=e??D,_=E??F??!1,G=b&&b!==!0?`${A}-error`:void 0,{getColor:N,themeMode:ee}=s.useTheme(),oe=N(C?"color-gray-400":"color-gray-500",{themeMode:Y||ee}),ie=!!r,K={xs:{minHeight:24,shellPaddingY:6,shellPaddingX:10,fontSize:12,lineHeight:"16px"},sm:{minHeight:32,shellPaddingY:8,shellPaddingX:10,fontSize:12,lineHeight:"16px"},md:{minHeight:40,shellPaddingY:10,shellPaddingX:12,fontSize:14,lineHeight:"20px"},lg:{minHeight:48,shellPaddingY:12,shellPaddingX:14,fontSize:16,lineHeight:"24px"},xl:{minHeight:56,shellPaddingY:14,shellPaddingX:16,fontSize:18,lineHeight:"28px"}},ae=(h==null?void 0:h.field)||{},de="0 0 0 1000px var(--theme-canvas) inset",fe={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:"auto",border:"none",backgroundColor:"transparent",fontSize:K[f].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:C?"color-gray-400":"color-gray-900",cursor:C?"not-allowed":"text",opacity:C?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",_focus:{outline:"none",_placeholder:{opacity:.7}},_placeholder:{color:"color-gray-400",opacity:1,transition:"opacity 0.2s ease-out"},_selection:{backgroundColor:"color-mix(in srgb, var(--theme-primary) 20%, transparent)"},_webkitAutofill:{boxShadow:de,WebkitBoxShadow:de,WebkitTextFillColor:"var(--theme-text)",transition:"background-color 5000s ease-in-out 0s"},_webkitContactsAutoFillButton:{visibility:"hidden",pointerEvents:"none",position:"absolute",right:0},...ae},Ie=()=>{V(!0),$&&$()},ce=()=>P(!0),le=()=>P(!1),se=xe=>{q&&q(xe),V(!1)},re=xe=>{typeof xe=="string"?(L(xe),g&&g(xe),i&&i(xe)):(L(xe.target.value),g&&g(xe.target.value),i&&i(xe.target.value))},pe=()=>{L(""),g&&g(""),i&&i(""),q({target:{name:o}})},{container:Q,content:te,...be}=h||{};return t.jsx(fo,{helperText:c,error:b,errorId:G,views:be,children:t.jsxs(So,{label:r,size:f,error:b,shape:y,views:h,shadow:m,variant:k,value:a,color:"theme-primary",isHovered:x,isDisabled:C,isReadOnly:v,isFocused:j,showLabel:ie,onMouseEnter:ce,onMouseLeave:le,children:[l,M&&t.jsx(Rt,{children:M}),t.jsxs(ut,{children:[ie&&t.jsx(Wo,{htmlFor:A,color:"theme-primary",error:b,...R,...h==null?void 0:h.label,children:r}),t.jsx(s.Input,{ref:O,..._?{as:"textarea",rows:W??5}:{type:"text"},id:A,name:o,readOnly:v,disabled:C,autoFocus:I,"aria-invalid":b?!0:void 0,"aria-describedby":G,...w??T?{required:!0,"aria-required":!0}:{},placeholder:d||n,onFocus:Ie,onBlur:se,autoComplete:"off",...fe,...J,onChange:re,value:a})]}),S&&a&&!v&&!C&&t.jsx(Rt,{children:t.jsx(Ue,{size:20,color:oe,onClick:pe,cursor:"pointer",borderRadius:"50%",transition:"background-color 0.2s ease, transform 0.2s ease",_hover:{backgroundColor:"color-gray-100",transform:"scale(1.05)"},_active:{transform:"scale(0.95)"}})}),z&&t.jsx(Rt,{children:z}),u]})})},gg=e=>{const o=ve("input",e),r=Un(o);return t.jsx(Lt,{...r,...o})},Be=gg,ul=({defaultIsSelected:e=!1})=>{const[o,r]=p.useState(!1),[n,a]=p.useState(e);return{isHovered:o,setIsHovered:r,isSelected:n,setIsSelected:a}},hg={xs:{height:"12px",width:"12px"},sm:{height:"16px",width:"16px"},md:{height:"20px",width:"20px"},lg:{height:"24px",width:"24px"},xl:{height:"28px",width:"28px"}},ja={xs:10,sm:14,md:16,lg:20,xl:24},fg={selected:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},unselected:{backgroundColor:"transparent",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",color:"inherit",transition:"all 0.2s ease-in-out"},indeterminate:{backgroundColor:"theme-primary",borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid",color:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},Kt={hover:{selected:{opacity:.9},unselected:{borderColor:"color-gray-400",backgroundColor:"color-gray-50"},indeterminate:{opacity:.9}},focus:{selected:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},unselected:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},indeterminate:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}},disabled:{selected:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},unselected:{borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"},indeterminate:{backgroundColor:"color-gray-300",borderColor:"color-gray-300",opacity:.5,cursor:"not-allowed"}},error:{selected:{backgroundColor:"color-red-500",borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"},indeterminate:{backgroundColor:"color-red-500",borderColor:"color-red-500"}}},pl=({id:e,icon:o,name:r,label:n,isChecked:a,onChange:i,onValueChange:l,shadow:u={},labelPosition:c="right",size:d="md",error:g=!1,isSelected:m=!1,isHovered:h=!1,isDisabled:f=!1,isReadOnly:y=!1,isIndeterminate:k=!1,defaultIsSelected:b=!1,setIsSelected:j=()=>{},setIsHovered:x=()=>{},views:C={checkbox:{},label:{}},infoText:v,helperText:S,...I})=>{const w=p.useId(),T=e??w,R=p.useRef(null),[E,F]=p.useState(!1),W=!!(a||m);p.useEffect(()=>{R.current&&(R.current.indeterminate=k)},[k]);const M=()=>x(!h),z=()=>{!y&&!f&&(j&&j(!m),i&&i(!a),l&&l(!a))},H=k?"indeterminate":a||m?"selected":"unselected",V=g?Kt.error[H]:f?Kt.disabled[H]:h?Kt.hover[H]:{},P={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:g?"theme-error":f?"color-gray-400":"inherit",cursor:f?"not-allowed":y?"default":"pointer",opacity:f?.6:1,transition:"all 0.2s ease-in-out",...C.label},checkbox:{...fg[H],...V,borderRadius:6,...hg[d],transition:"all 0.2s ease-in-out",...u,...C.checkbox}},L=`${T}-info`,B=`${T}-error`,$=[v?L:"",g?B:""].filter(Boolean).join(" ")||void 0;return t.jsxs(s.Vertical,{...P.container,children:[t.jsx(Dt,{htmlFor:T,onMouseEnter:M,onMouseLeave:M,size:s.Typography.fontSizes[d],cursor:"inherit",children:t.jsxs(s.Horizontal,{gap:12,alignItems:"center",children:[" ",c==="left"&&n&&t.jsx(s.Text,{size:d,fontWeight:"500",...C==null?void 0:C.label,children:n}),t.jsxs(s.Center,{position:"relative",...P.checkbox,...E?Kt.focus[H]:{},children:[t.jsx(s.Input,{ref:R,type:"checkbox",id:T,name:r,checked:W,"aria-checked":k?"mixed":void 0,onChange:z,onFocus:()=>F(!0),onBlur:()=>F(!1),disabled:f,readOnly:y,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:f?"not-allowed":y?"default":"pointer","aria-describedby":$,...I}),k?t.jsx(Ii,{widthHeight:ja[d],color:"color-white",transition:"opacity 0.2s ease"}):(a||m)&&(o??t.jsx(Vt,{widthHeight:ja[d],color:"color-white",transition:"opacity 0.2s ease"}))]}),c==="right"&&n&&t.jsx(s.Text,{size:d,fontWeight:"500",...C==null?void 0:C.label,children:n})]})}),v&&t.jsx(s.Text,{id:L,marginLeft:c==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...C==null?void 0:C.infoText,children:v}),g&&t.jsx(s.Text,{id:B,size:"xs",marginTop:4,marginHorizontal:0,color:"theme-error",fontWeight:"500",transition:"all 0.2s ease-in-out",children:g})]})},yg=e=>{const o=ve("checkbox",e),r=ul(o);return t.jsx(pl,{...r,...o})},Gn=yg,ml=({defaultIsSelected:e=!1,isChecked:o})=>{const[r,n]=p.useState(!1),[a,i]=p.useState(o!==void 0?o:e);return p.useEffect(()=>{o!==void 0&&i(o)},[o]),{isHovered:r,setIsHovered:n,isSelected:a,setIsSelected:i}},xg={xs:{height:"16px",width:"16px"},sm:{height:"20px",width:"20px"},md:{height:"24px",width:"24px"},lg:{height:"28px",width:"28px"},xl:{height:"32px",width:"32px"}},bg={xs:{height:"8px",width:"8px"},sm:{height:"10px",width:"10px"},md:{height:"12px",width:"12px"},lg:{height:"14px",width:"14px"},xl:{height:"16px",width:"16px"}},kg={selected:{borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid"},unselected:{borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"}}},Cg={selected:{backgroundColor:"theme-primary"},unselected:{style:{backgroundColor:"transparent"}}},Lr={hover:{selected:{borderColor:"color-blue-600"},unselected:{borderColor:"color-gray-400"}},disabled:{selected:{borderColor:"color-gray-300",opacity:.6},unselected:{borderColor:"color-gray-300",opacity:.6}},error:{selected:{borderColor:"color-red-500"},unselected:{borderColor:"color-red-500"}}},Br={hover:{selected:{backgroundColor:"color-blue-600"},unselected:{style:{backgroundColor:"transparent"}}},disabled:{selected:{backgroundColor:"color-gray-300",opacity:.6},unselected:{opacity:.6,style:{backgroundColor:"transparent"}}},error:{selected:{backgroundColor:"color-red-500"},unselected:{style:{backgroundColor:"transparent"}}}},gl=({id:e,icon:o,name:r,label:n,value:a,isChecked:i,onChange:l,onValueChange:u,shadow:c={},labelPosition:d="right",size:g="md",error:m=!1,isSelected:h=!1,isHovered:f=!1,isDisabled:y=!1,isReadOnly:k=!1,defaultIsSelected:b=!1,setIsSelected:j=()=>{},setIsHovered:x=()=>{},views:C={radio:{},label:{}},infoText:v,helperText:S,...I})=>{const w=p.useId(),T=e??w,[R,E]=p.useState(!1),F=()=>x(!f),W=()=>{!k&&!y&&(j&&j(!0),l&&l(a??""),u&&u(a??""))},M=i||h?"selected":"unselected",z=m?Lr.error[M]:y?Lr.disabled[M]:f?Lr.hover[M]:{},H=m?Br.error[M]:y?Br.disabled[M]:f?Br.hover[M]:{},V={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",selected:{borderColor:"theme-primary"},color:m?"theme-error":y?"color-gray-400":"inherit",cursor:y?"not-allowed":k?"default":"pointer",opacity:y?.6:1,transition:"all 0.2s ease-in-out",...C.label},radio:{...kg[M],...z,borderRadius:"50%",selected:{backgroundColor:"theme-primary"},backgroundColor:"color-white",...xg[g],transition:"all 0.2s ease-in-out",...c,...C.radio},dot:{...Cg[M],...H,borderRadius:"50%",...bg[g],transition:"all 0.2s ease-in-out"}},P=`${T}-info`,L=`${T}-error`,B=[v?P:"",m?L:""].filter(Boolean).join(" ")||void 0;return t.jsxs(s.Vertical,{...V.container,children:[t.jsx(Dt,{htmlFor:T,onMouseEnter:F,onMouseLeave:F,size:s.Typography.fontSizes[g],cursor:"inherit",children:t.jsxs(s.Horizontal,{gap:12,alignItems:"center",children:[" ",d==="left"&&n&&t.jsx(s.Text,{size:g,fontWeight:"500",...C==null?void 0:C.label,children:n}),t.jsxs(s.Center,{position:"relative",...V.radio,...R?{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}:{},children:[t.jsx(s.Input,{type:"radio",id:T,name:r,value:a??"",checked:!!(i||h),onChange:W,onFocus:()=>E(!0),onBlur:()=>E(!1),disabled:y,readOnly:k,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:y?"not-allowed":k?"default":"pointer","aria-describedby":B,...I}),(i||h)&&t.jsx(s.View,{...V.dot})]}),d==="right"&&n&&t.jsx(s.Text,{size:g,fontWeight:"500",...C==null?void 0:C.label,children:n})]})}),v&&t.jsx(s.Text,{id:P,marginLeft:d==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...C==null?void 0:C.infoText,children:v}),m&&t.jsx(s.Text,{id:L,size:"xs",marginTop:4,marginHorizontal:0,color:"theme-error",fontWeight:"500",transition:"color 0.2s ease, opacity 0.2s ease",children:m})]})},Sg=e=>{const o=ve("radio",e),r=ml(o);return t.jsx(gl,{...r,...o})},Yn=Sg,wg=({value:e,defaultValue:o="",onChange:r})=>{const[n,a]=p.useState(e!==void 0?e:o);return p.useEffect(()=>{e!==void 0&&a(e)},[e]),{selectedValue:n,setSelectedValue:l=>{e===void 0&&a(l),r&&r(l)}}},jg=({children:e,name:o,label:r,helperText:n,error:a,selectedValue:i,setSelectedValue:l,direction:u="vertical",spacing:c=8,isDisabled:d=!1,isReadOnly:g=!1,views:m={container:{},label:{},helperText:{}},onChange:h,value:f,defaultValue:y,...k})=>{const b=u==="vertical"?s.Vertical:s.Horizontal,j=p.Children.map(e,I=>{if(p.isValidElement(I)){const w={name:o,isChecked:I.props.value===i,isDisabled:d||I.props.isDisabled,isReadOnly:g||I.props.isReadOnly,onChange:T=>{l(T),I.props.onChange&&I.props.onChange(T)}};return p.cloneElement(I,w)}return I}),x=p.useId(),C=`${x}-label`,v=`${x}-helper`,S=!!(n||a);return t.jsxs(s.Vertical,{gap:c,width:"100%",role:"radiogroup","aria-labelledby":r?C:void 0,"aria-describedby":S?v:void 0,"aria-invalid":a?!0:void 0,...m.container,...k,children:[r&&t.jsx(s.Text,{id:C,fontWeight:"600",fontSize:"14px",color:a?"theme-error":"inherit",marginBottom:4,...m.label,children:r}),t.jsx(b,{gap:c,children:j}),S&&t.jsx(s.Text,{id:v,fontWeight:a?"500":"400",fontSize:"14px",lineHeight:"20px",color:a?"theme-error":"color-gray-500",marginTop:4,transition:"color 0.2s ease, opacity 0.2s ease",...m.helperText,children:a||n})]})},vg=e=>{const o=wg(e);return t.jsx(jg,{...o,...e})},Tg=vg,Fo=e=>Math.min(255,Math.max(0,Math.round(e))),Ig=e=>{const o=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!o)return null;let r=o[1];return r.length===3&&(r=r.split("").map(n=>n+n).join("")),{r:parseInt(r.slice(0,2),16),g:parseInt(r.slice(2,4),16),b:parseInt(r.slice(4,6),16)}},Rg=e=>{const o=/^rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?{r:Fo(Number(o[1])),g:Fo(Number(o[2])),b:Fo(Number(o[3]))}:null},Fg=(e,o,r)=>{const n=(e%360+360)%360,a=Math.min(100,Math.max(0,o))/100,i=Math.min(100,Math.max(0,r))/100,l=(1-Math.abs(2*i-1))*a,u=l*(1-Math.abs(n/60%2-1)),c=i-l/2;let d;return n<60?d=[l,u,0]:n<120?d=[u,l,0]:n<180?d=[0,l,u]:n<240?d=[0,u,l]:n<300?d=[u,0,l]:d=[l,0,u],{r:Fo((d[0]+c)*255),g:Fo((d[1]+c)*255),b:Fo((d[2]+c)*255)}},Mg=e=>{const o=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?Fg(Number(o[1]),Number(o[2]),Number(o[3])):null},zg=e=>Ig(e)??Rg(e)??Mg(e),Wg=({r:e,g:o,b:r})=>{const n=e/255,a=o/255,i=r/255,l=Math.max(n,a,i),u=Math.min(n,a,i),c=l-u,d=(l+u)/2;if(c===0)return{h:0,s:0,l:Math.round(d*100)};const g=c/(1-Math.abs(2*d-1));let m;return l===n?m=(a-i)/c%6:l===a?m=(i-n)/c+2:m=(n-a)/c+4,m=Math.round(m*60),m<0&&(m+=360),{h:m,s:Math.round(g*100),l:Math.round(d*100)}},_r=e=>Fo(e).toString(16).padStart(2,"0"),hr=(e,o)=>{if(!o||!e)return e;const r=zg(e);if(!r)return e;switch(o){case"hex":return`#${_r(r.r)}${_r(r.g)}${_r(r.b)}`;case"rgb":return`rgb(${r.r}, ${r.g}, ${r.b})`;case"hsl":{const{h:n,s:a,l:i}=Wg(r);return`hsl(${n}, ${a}%, ${i}%)`}}},hl=e=>{const{value:o,defaultValue:r="",onChange:n,onChangeComplete:a,onOpen:i,onClose:l,closeOnSelect:u=!0,maxRecentColors:c=8,showRecentColors:d=!0,isAutoFocus:g=!1,colorFormat:m}=e,[h,f]=p.useState(!1),[y,k]=p.useState(o??r),[b,j]=p.useState(""),[x,C]=p.useState([]),[v,S]=p.useState(!1),[I,w]=p.useState(!1),T=p.useRef(null),R=p.useRef(null);p.useEffect(()=>{o!==void 0&&k(o)},[o]),p.useEffect(()=>{if(d&&typeof localStorage<"u")try{const P=localStorage.getItem("colorInput-recentColors");P&&C(JSON.parse(P))}catch(P){console.warn("Failed to load recent colors from localStorage:",P)}},[d]),p.useEffect(()=>{const P=T.current;g&&P&&typeof P.focus=="function"&&P.focus()},[g]),p.useEffect(()=>{if(typeof document>"u")return;const P=L=>{h&&T.current&&R.current&&!T.current.contains(L.target)&&!R.current.contains(L.target)&&H()};return document.addEventListener("mousedown",P),()=>document.removeEventListener("mousedown",P)},[h]);const E=p.useCallback(P=>{d&&C(L=>{const B=L.filter(q=>q!==P),$=[P,...B].slice(0,c);try{typeof localStorage<"u"&&localStorage.setItem("colorInput-recentColors",JSON.stringify($))}catch(q){console.warn("Failed to save recent colors to localStorage:",q)}return $})},[d,c]),F=p.useCallback(()=>{const P=!h;f(P),P?i==null||i():l==null||l()},[h,i,l]),W=p.useCallback(P=>{k(P),E(P);const L=hr(P,m);n==null||n(L),a==null||a(L),u&&(f(!1),l==null||l())},[n,a,u,l,E,m]),M=p.useCallback(P=>{j(P)},[]),z=p.useCallback(()=>{b&&(W(b),j(""))},[b,W]),H=p.useCallback(()=>{f(!1),l==null||l()},[l]),V=p.useCallback(P=>{k(P),n==null||n(hr(P,m))},[n,m]);return{isOpen:h,selectedColor:y,recentColors:x,customColor:b,isFocused:v,isHovered:I,handleToggle:F,handleColorSelect:W,handleCustomColorChange:M,handleCustomColorSubmit:z,handleClose:H,setIsFocused:S,setIsHovered:w,setValue:V,triggerRef:T,dropdownRef:R}},ht={container:{position:"relative",display:"inline-block",width:"fit-content"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300",padding:"8px 12px",borderRadius:8},dropdown:{position:"absolute",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",gap:"8px"},recentColors:{display:"flex",gap:"4px",flexWrap:"wrap"}},Eg={xs:{height:"28px",fontSize:"10px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 16px"},xl:{height:"56px",fontSize:"20px",padding:"16px 20px"}},Ag={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Hg={default:{backgroundColor:"color-white",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},outline:{backgroundColor:"transparent",borderColor:"color-gray-300",borderWidth:"1px",borderStyle:"solid"},none:{backgroundColor:"transparent",borderColor:"transparent",borderWidth:"0px"}},Vg=[{name:"Red 500",value:"color-red-500"},{name:"Orange 500",value:"color-orange-500"},{name:"Yellow 500",value:"color-yellow-500"},{name:"Green 500",value:"color-green-500"},{name:"Blue 500",value:"color-blue-500"},{name:"Indigo 500",value:"color-indigo-500"},{name:"Purple 500",value:"color-purple-500"},{name:"Pink 500",value:"color-pink-500"},{name:"Red 300",value:"color-red-300"},{name:"Orange 300",value:"color-orange-300"},{name:"Yellow 300",value:"color-yellow-300"},{name:"Green 300",value:"color-green-300"},{name:"Blue 300",value:"color-blue-300"},{name:"Indigo 300",value:"color-indigo-300"},{name:"Purple 300",value:"color-purple-300"},{name:"Pink 300",value:"color-pink-300"},{name:"Red 700",value:"color-red-700"},{name:"Orange 700",value:"color-orange-700"},{name:"Yellow 700",value:"color-yellow-700"},{name:"Green 700",value:"color-green-700"},{name:"Blue 700",value:"color-blue-700"},{name:"Indigo 700",value:"color-indigo-700"},{name:"Purple 700",value:"color-purple-700"},{name:"Pink 700",value:"color-pink-700"},{name:"Gray 100",value:"color-gray-100"},{name:"Gray 300",value:"color-gray-300"},{name:"Gray 500",value:"color-gray-500"},{name:"Gray 700",value:"color-gray-700"},{name:"Gray 900",value:"color-gray-900"},{name:"White",value:"color-white"},{name:"Black",value:"color-black"},{name:"Transparent",value:"transparent"}],fl=({id:e,name:o,label:r,placeholder:n="Select a color",helperText:a,views:i={},size:l="md",shape:u="default",variant:c="default",shadow:d,error:g=!1,isDisabled:m=!1,isReadOnly:h=!1,isFocused:f=!1,isHovered:y=!1,predefinedColors:k=Vg,showCustomInput:b=!0,showRecentColors:j=!0,isOpen:x=!1,selectedColor:C="",recentColors:v=[],customColor:S="",handleToggle:I=()=>{},handleColorSelect:w=()=>{},handleCustomColorChange:T=()=>{},handleCustomColorSubmit:R=()=>{},handleClose:E,setIsFocused:F=()=>{},setIsHovered:W=()=>{},setValue:M,triggerRef:z,dropdownRef:H,onChange:V,onChangeComplete:P,onBlur:L,onFocus:B,onOpen:$,onClose:q,colorFormat:Y,maxRecentColors:O,closeOnSelect:J,value:D,defaultValue:A,"aria-label":_,...G})=>{const{getColor:N}=s.useTheme(),ee=p.useId(),oe=e??ee,ie=`${oe}-label`,K=`${oe}-listbox`,ae=`${oe}-helper-text`,de=`${oe}-error-text`,fe=!!g&&typeof g=="string",Ie=[a?ae:null,fe?de:null].filter(Boolean).join(" ")||void 0,ce={...ht.container,...i==null?void 0:i.container},le={...ht.trigger,...Eg[l],...Ag[u],...Hg[c],...g&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...f&&{borderColor:"theme-primary",boxShadow:"0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px rgba(29, 78, 216, 0.16)"},...y&&!m&&{borderColor:"color-gray-400"},...i==null?void 0:i.trigger,...d&&d},se={...ht.dropdown,...i==null?void 0:i.dropdown},re={...ht.colorGrid,...i==null?void 0:i.colorGrid},pe={...ht.recentColors,...i==null?void 0:i.recentColors},Q=C||"color-gray-200";return t.jsxs(s.View,{...ce,...G,children:[r&&t.jsx(Dt,{id:ie,htmlFor:oe,size:l,isDisabled:m,error:g,views:i==null?void 0:i.label,children:r}),o&&t.jsx("input",{type:"hidden",name:o,value:hr(C,Y)}),t.jsxs(s.View,{ref:z,id:oe,onClick:m||h?void 0:I,onKeyDown:te=>{m||h||(te.key==="Enter"||te.key===" ")&&(te.preventDefault(),I())},onMouseEnter:()=>W(!0),onMouseLeave:()=>W(!1),onFocus:()=>{F(!0),B&&B()},onBlur:te=>{F(!1),L&&L(te)},tabIndex:m?-1:0,role:"button","aria-expanded":x,"aria-haspopup":"listbox","aria-controls":x?K:void 0,"aria-labelledby":!_&&r?ie:void 0,"aria-label":_??(r?void 0:n),"aria-describedby":Ie,"aria-invalid":g?!0:void 0,width:"fit-content",gap:8,...le,children:[t.jsx(s.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:Q,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!h&&!m&&t.jsx(je,{widthHeight:16,color:"color-gray-500",orientation:x?"up":"down"})]}),x&&t.jsxs(s.View,{ref:H,...se,children:[t.jsx(s.View,{id:K,role:"listbox","aria-labelledby":r?ie:void 0,"aria-label":r?void 0:"Color options",...re,children:k.map((te,be)=>t.jsx(s.View,{role:"option","aria-selected":C===te.value,"aria-label":te.name,tabIndex:0,width:"24px",height:"24px",borderRadius:"8px",backgroundColor:te.value,borderWidth:"2px",borderStyle:"solid",borderColor:C===te.value?"theme-primary":"transparent",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>w(te.value),onKeyDown:xe=>{(xe.key==="Enter"||xe.key===" ")&&(xe.preventDefault(),w(te.value))},title:te.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"},...i==null?void 0:i.colorSwatch},be))}),j&&v.length>0&&t.jsxs(s.Vertical,{gap:8,marginTop:"16px",children:[t.jsx(s.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Recent Colors"}),t.jsx(s.Horizontal,{gap:4,flexWrap:"wrap",...pe,children:v.map((te,be)=>t.jsx(s.View,{width:"20px",height:"20px",borderRadius:"8px",backgroundColor:te,borderWidth:"1px",borderStyle:"solid",borderColor:C===te?"theme-primary":"color-gray-300",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>w(te),title:te,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"}},be))})]}),b&&t.jsxs(s.Vertical,{gap:8,marginTop:"16px",children:[t.jsx(s.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Custom Color"}),t.jsxs(s.Horizontal,{gap:8,children:[t.jsx(Be,{value:S,onChange:T,placeholder:"#000000 or rgb(0,0,0)","aria-label":"Custom color",size:"sm",style:{flex:1},views:i==null?void 0:i.customInput}),t.jsx(s.Element,{as:"button",type:"button",padding:"8px 12px",backgroundColor:"theme-primary",border:"none",borderRadius:"8px",cursor:"pointer",onClick:R,transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"color-blue-700"},children:t.jsx(s.Text,{color:"color-white",fontSize:"12px",fontWeight:"500",children:"Add"})})]})]})]}),a&&t.jsx(s.Text,{id:ae,fontSize:"12px",color:g?"theme-error":"color-gray-600",marginTop:"4px",...i==null?void 0:i.helperText,children:a}),fe&&t.jsx(s.Text,{id:de,fontSize:"12px",color:"theme-error",marginTop:"4px",...i==null?void 0:i.error,children:g})]})},Pg=e=>{const o=hl(e);return t.jsx(fl,{...o,...e})},Dg=Pg,cn=[{name:"Afghanistan",dial_code:"+93",emoji:"🇦🇫",code:"AF"},{name:"Aland Islands",dial_code:"+358",emoji:"🇦🇽",code:"AX"},{name:"Albania",dial_code:"+355",emoji:"🇦🇱",code:"AL"},{name:"Algeria",dial_code:"+213",emoji:"🇩🇿",code:"DZ"},{name:"AmericanSamoa",dial_code:"+1684",emoji:"🇦🇸",code:"AS"},{name:"Andorra",dial_code:"+376",emoji:"🇦🇩",code:"AD"},{name:"Angola",dial_code:"+244",emoji:"🇦🇴",code:"AO"},{name:"Anguilla",dial_code:"+1264",emoji:"🇦🇮",code:"AI"},{name:"Antarctica",dial_code:"+672",emoji:"🇦🇶",code:"AQ"},{name:"Antigua and Barbuda",dial_code:"+1268",emoji:"🇦🇬",code:"AG"},{name:"Argentina",dial_code:"+54",emoji:"🇦🇷",code:"AR"},{name:"Armenia",dial_code:"+374",emoji:"🇦🇲",code:"AM"},{name:"Aruba",dial_code:"+297",emoji:"🇦🇼",code:"AW"},{name:"Australia",dial_code:"+61",emoji:"🇦🇺",code:"AU"},{name:"Austria",dial_code:"+43",emoji:"🇦🇹",code:"AT"},{name:"Azerbaijan",dial_code:"+994",emoji:"🇦🇿",code:"AZ"},{name:"Bahamas",dial_code:"+1242",emoji:"🇧🇸",code:"BS"},{name:"Bahrain",dial_code:"+973",emoji:"🇧🇭",code:"BH"},{name:"Bangladesh",dial_code:"+880",emoji:"🇧🇩",code:"BD"},{name:"Barbados",dial_code:"+1246",emoji:"🇧🇧",code:"BB"},{name:"Belarus",dial_code:"+375",emoji:"🇧🇾",code:"BY"},{name:"Belgium",dial_code:"+32",emoji:"🇧🇪",code:"BE"},{name:"Belize",dial_code:"+501",emoji:"🇧🇿",code:"BZ"},{name:"Benin",dial_code:"+229",emoji:"🇧🇯",code:"BJ"},{name:"Bermuda",dial_code:"+1441",emoji:"🇧🇲",code:"BM"},{name:"Bhutan",dial_code:"+975",emoji:"🇧🇹",code:"BT"},{name:"Bolivia, Plurinational State of",dial_code:"+591",emoji:"🇧🇴",code:"BO"},{name:"Bosnia and Herzegovina",dial_code:"+387",emoji:"🇧🇦",code:"BA"},{name:"Botswana",dial_code:"+267",emoji:"🇧🇼",code:"BW"},{name:"Brazil",dial_code:"+55",emoji:"🇧🇷",code:"BR"},{name:"British Indian Ocean Territory",dial_code:"+246",emoji:"🇮🇴",code:"IO"},{name:"Brunei Darussalam",dial_code:"+673",emoji:"🇧🇳",code:"BN"},{name:"Bulgaria",dial_code:"+359",emoji:"🇧🇬",code:"BG"},{name:"Burkina Faso",dial_code:"+226",emoji:"🇧🇫",code:"BF"},{name:"Burundi",dial_code:"+257",emoji:"🇧🇮",code:"BI"},{name:"Cambodia",dial_code:"+855",emoji:"🇰🇭",code:"KH"},{name:"Cameroon",dial_code:"+237",emoji:"🇨🇲",code:"CM"},{name:"Canada",dial_code:"+1",emoji:"🇨🇦",code:"CA"},{name:"Cape Verde",dial_code:"+238",emoji:"🇨🇻",code:"CV"},{name:"Cayman Islands",dial_code:"+345",emoji:"🇰🇾",code:"KY"},{name:"Central African Republic",dial_code:"+236",emoji:"🇨🇫",code:"CF"},{name:"Chad",dial_code:"+235",emoji:"🇹🇩",code:"TD"},{name:"Chile",dial_code:"+56",emoji:"🇨🇱",code:"CL"},{name:"China",dial_code:"+86",emoji:"🇨🇳",code:"CN"},{name:"Christmas Island",dial_code:"+61",emoji:"🇨🇽",code:"CX"},{name:"Cocos (Keeling) Islands",dial_code:"+61",emoji:"🇨🇨",code:"CC"},{name:"Colombia",dial_code:"+57",emoji:"🇨🇴",code:"CO"},{name:"Comoros",dial_code:"+269",emoji:"🇰🇲",code:"KM"},{name:"Congo",dial_code:"+242",emoji:"🇨🇬",code:"CG"},{name:"Congo, The Democratic Republic of the Congo",dial_code:"+243",emoji:"🇨🇩",code:"CD"},{name:"Cook Islands",dial_code:"+682",emoji:"🇨🇰",code:"CK"},{name:"Costa Rica",dial_code:"+506",emoji:"🇨🇷",code:"CR"},{name:"Cote d'Ivoire",dial_code:"+225",emoji:"🇨🇮",code:"CI"},{name:"Croatia",dial_code:"+385",emoji:"🇭🇷",code:"HR"},{name:"Cuba",dial_code:"+53",emoji:"🇨🇺",code:"CU"},{name:"Cyprus",dial_code:"+357",emoji:"🇨🇾",code:"CY"},{name:"Czech Republic",dial_code:"+420",emoji:"🇨🇿",code:"CZ"},{name:"Denmark",dial_code:"+45",emoji:"🇩🇰",code:"DK"},{name:"Djibouti",dial_code:"+253",emoji:"🇩🇯",code:"DJ"},{name:"Dominica",dial_code:"+1767",emoji:"🇩🇲",code:"DM"},{name:"Dominican Republic",dial_code:"+1849",emoji:"🇩🇴",code:"DO"},{name:"Ecuador",dial_code:"+593",emoji:"🇪🇨",code:"EC"},{name:"Egypt",dial_code:"+20",emoji:"🇪🇬",code:"EG"},{name:"El Salvador",dial_code:"+503",emoji:"🇸🇻",code:"SV"},{name:"Equatorial Guinea",dial_code:"+240",emoji:"🇬🇶",code:"GQ"},{name:"Eritrea",dial_code:"+291",emoji:"🇪🇷",code:"ER"},{name:"Estonia",dial_code:"+372",emoji:"🇪🇪",code:"EE"},{name:"Ethiopia",dial_code:"+251",emoji:"🇪🇹",code:"ET"},{name:"Falkland Islands (Malvinas)",dial_code:"+500",emoji:"🇫🇰",code:"FK"},{name:"Faroe Islands",dial_code:"+298",emoji:"🇫🇴",code:"FO"},{name:"Fiji",dial_code:"+679",emoji:"🇫🇯",code:"FJ"},{name:"Finland",dial_code:"+358",emoji:"🇫🇮",code:"FI"},{name:"France",dial_code:"+33",emoji:"🇫🇷",code:"FR"},{name:"French Guiana",dial_code:"+594",emoji:"🇬🇫",code:"GF"},{name:"French Polynesia",dial_code:"+689",emoji:"🇵🇫",code:"PF"},{name:"Gabon",dial_code:"+241",emoji:"🇬🇦",code:"GA"},{name:"Gambia",dial_code:"+220",emoji:"🇬🇲",code:"GM"},{name:"Georgia",dial_code:"+995",emoji:"🇬🇪",code:"GE"},{name:"Germany",dial_code:"+49",emoji:"🇩🇪",code:"DE"},{name:"Ghana",dial_code:"+233",emoji:"🇬🇭",code:"GH"},{name:"Gibraltar",dial_code:"+350",emoji:"🇬🇮",code:"GI"},{name:"Greece",dial_code:"+30",emoji:"🇬🇷",code:"GR"},{name:"Greenland",dial_code:"+299",emoji:"🇬🇱",code:"GL"},{name:"Grenada",dial_code:"+1473",emoji:"🇬🇩",code:"GD"},{name:"Guadeloupe",dial_code:"+590",emoji:"🇬🇵",code:"GP"},{name:"Guam",dial_code:"+1671",emoji:"🇬🇺",code:"GU"},{name:"Guatemala",dial_code:"+502",emoji:"🇬🇹",code:"GT"},{name:"Guernsey",dial_code:"+44",emoji:"🇬🇬",code:"GG"},{name:"Guinea",dial_code:"+224",emoji:"🇬🇳",code:"GN"},{name:"Guinea-Bissau",dial_code:"+245",emoji:"🇬🇼",code:"GW"},{name:"Guyana",dial_code:"+595",emoji:"🇬🇾",code:"GY"},{name:"Haiti",dial_code:"+509",emoji:"🇭🇹",code:"HT"},{name:"Holy See (Vatican City State)",dial_code:"+379",emoji:"🇻🇦",code:"VA"},{name:"Honduras",dial_code:"+504",emoji:"🇭🇳",code:"HN"},{name:"Hong Kong",dial_code:"+852",emoji:"🇭🇰",code:"HK"},{name:"Hungary",dial_code:"+36",emoji:"🇭🇺",code:"HU"},{name:"Iceland",dial_code:"+354",emoji:"🇮🇸",code:"IS"},{name:"India",dial_code:"+91",emoji:"🇮🇳",code:"IN"},{name:"Indonesia",dial_code:"+62",emoji:"🇮🇩",code:"ID"},{name:"Iran, Islamic Republic of Persian Gulf",dial_code:"+98",emoji:"🇮🇷",code:"IR"},{name:"Iraq",dial_code:"+964",emoji:"🇮🇷",code:"IQ"},{name:"Ireland",dial_code:"+353",emoji:"🇮🇪",code:"IE"},{name:"Isle of Man",dial_code:"+44",emoji:"🇮🇲",code:"IM"},{name:"Israel",dial_code:"+972",emoji:"🇮🇱",code:"IL"},{name:"Italy",dial_code:"+39",emoji:"🇮🇹",code:"IT"},{name:"Jamaica",dial_code:"+1876",emoji:"🇯🇲",code:"JM"},{name:"Japan",dial_code:"+81",emoji:"🇯🇵",code:"JP"},{name:"Jersey",dial_code:"+44",emoji:"🇯🇪",code:"JE"},{name:"Jordan",dial_code:"+962",emoji:"🇯🇴",code:"JO"},{name:"Kazakhstan",dial_code:"+77",emoji:"🇰🇿",code:"KZ"},{name:"Kenya",dial_code:"+254",emoji:"🇰🇪",code:"KE"},{name:"Kiribati",dial_code:"+686",emoji:"🇰🇮",code:"KI"},{name:"Korea, Democratic People's Republic of Korea",dial_code:"+850",emoji:"🇰🇵",code:"KP"},{name:"Korea, Republic of South Korea",dial_code:"+82",emoji:"🇰🇷",code:"KR"},{name:"Kuwait",dial_code:"+965",emoji:"🇰🇼",code:"KW"},{name:"Kyrgyzstan",dial_code:"+996",emoji:"🇰🇬",code:"KG"},{name:"Laos",dial_code:"+856",emoji:"🇱🇦",code:"LA"},{name:"Latvia",dial_code:"+371",emoji:"🇱🇻",code:"LV"},{name:"Lebanon",dial_code:"+961",emoji:"🇱🇧",code:"LB"},{name:"Lesotho",dial_code:"+266",emoji:"🇱🇸",code:"LS"},{name:"Liberia",dial_code:"+231",emoji:"🇱🇷",code:"LR"},{name:"Libyan Arab Jamahiriya",dial_code:"+218",emoji:"🇱🇾",code:"LY"},{name:"Liechtenstein",dial_code:"+423",emoji:"🇱🇮",code:"LI"},{name:"Lithuania",dial_code:"+370",emoji:"🇱🇹",code:"LT"},{name:"Luxembourg",dial_code:"+352",emoji:"🇱🇺",code:"LU"},{name:"Macao",dial_code:"+853",emoji:"🇲🇴",code:"MO"},{name:"Macedonia",dial_code:"+389",emoji:"🇲🇰",code:"MK"},{name:"Madagascar",dial_code:"+261",emoji:"🇲🇬",code:"MG"},{name:"Malawi",dial_code:"+265",emoji:"🇲🇼",code:"MW"},{name:"Malaysia",dial_code:"+60",emoji:"🇲🇾",code:"MY"},{name:"Maldives",dial_code:"+960",emoji:"🇲🇻",code:"MV"},{name:"Mali",dial_code:"+223",emoji:"🇲🇱",code:"ML"},{name:"Malta",dial_code:"+356",emoji:"🇲🇹",code:"MT"},{name:"Marshall Islands",dial_code:"+692",emoji:"🇲🇭",code:"MH"},{name:"Martinique",dial_code:"+596",emoji:"🇲🇶",code:"MQ"},{name:"Mauritania",dial_code:"+222",emoji:"🇲🇷",code:"MR"},{name:"Mauritius",dial_code:"+230",emoji:"🇲🇺",code:"MU"},{name:"Mayotte",dial_code:"+262",emoji:"🇾🇹",code:"YT"},{name:"Mexico",dial_code:"+52",emoji:"🇲🇽",code:"MX"},{name:"Micronesia, Federated States of Micronesia",dial_code:"+691",emoji:"🇫🇲",code:"FM"},{name:"Moldova",dial_code:"+373",emoji:"🇲🇩",code:"MD"},{name:"Monaco",dial_code:"+377",emoji:"🇲🇨",code:"MC"},{name:"Mongolia",dial_code:"+976",emoji:"🇲🇳",code:"MN"},{name:"Montenegro",dial_code:"+382",emoji:"🇲🇪",code:"ME"},{name:"Montserrat",dial_code:"+1664",emoji:"🇲🇸",code:"MS"},{name:"Morocco",dial_code:"+212",emoji:"🇲🇦",code:"MA"},{name:"Mozambique",dial_code:"+258",emoji:"🇲🇿",code:"MZ"},{name:"Myanmar",dial_code:"+95",emoji:"🇲🇲",code:"MM"},{name:"Namibia",emoji:"🇳🇦",dial_code:"+264",code:"NA"},{name:"Nauru",dial_code:"+674",emoji:"🇳🇷",code:"NR"},{name:"Nepal",dial_code:"+977",emoji:"🇳🇵",code:"NP"},{name:"Netherlands",dial_code:"+31",emoji:"🇳🇱",code:"NL"},{name:"Netherlands Antilles",dial_code:"+599",emoji:"🇧🇶",code:"AN"},{name:"New Caledonia",dial_code:"+687",emoji:"🇳🇨",code:"NC"},{name:"New Zealand",dial_code:"+64",emoji:"🇳🇿",code:"NZ"},{name:"Nicaragua",dial_code:"+505",emoji:"🇳🇮",code:"NI"},{name:"Niger",dial_code:"+227",emoji:"🇳🇪",code:"NE"},{name:"Nigeria",dial_code:"+234",emoji:"🇳🇬",code:"NG"},{name:"Niue",dial_code:"+683",emoji:"🇳🇺",code:"NU"},{name:"Norfolk Island",dial_code:"+672",emoji:"🇳🇫",code:"NF"},{name:"Northern Mariana Islands",dial_code:"+1670",emoji:"🇲🇵",code:"MP"},{name:"Norway",dial_code:"+47",emoji:"🇳🇴",code:"NO"},{name:"Oman",dial_code:"+968",emoji:"🇴🇲",code:"OM"},{name:"Pakistan",dial_code:"+92",emoji:"🇵🇰",code:"PK"},{name:"Palau",dial_code:"+680",emoji:"🇵🇼",code:"PW"},{name:"Palestinian Territory, Occupied",dial_code:"+970",emoji:"🇵🇸",code:"PS"},{name:"Panama",dial_code:"+507",emoji:"🇵🇦",code:"PA"},{name:"Papua New Guinea",dial_code:"+675",emoji:"🇵🇬",code:"PG"},{name:"Paraguay",dial_code:"+595",emoji:"🇵🇾",code:"PY"},{name:"Peru",dial_code:"+51",emoji:"🇵🇪",code:"PE"},{name:"Philippines",dial_code:"+63",emoji:"🇵🇭",code:"PH"},{name:"Pitcairn",dial_code:"+872",emoji:"🇵🇳",code:"PN"},{name:"Poland",dial_code:"+48",emoji:"🇵🇱",code:"PL"},{name:"Portugal",dial_code:"+351",emoji:"🇵🇹",code:"PT"},{name:"Puerto Rico",dial_code:"+1939",emoji:"🇵🇷",code:"PR"},{name:"Qatar",dial_code:"+974",emoji:"🇶🇦",code:"QA"},{name:"Romania",dial_code:"+40",emoji:"🇷🇴",code:"RO"},{name:"Russia",dial_code:"+7",emoji:"🇷🇺",code:"RU"},{name:"Rwanda",dial_code:"+250",emoji:"🇷🇼",code:"RW"},{name:"Reunion",dial_code:"+262",emoji:"🇷🇪",code:"RE"},{name:"Saint Barthelemy",dial_code:"+590",emoji:"🇧🇱",code:"BL"},{name:"Saint Helena, Ascension and Tristan Da Cunha",dial_code:"+290",emoji:"🇸🇭",code:"SH"},{name:"Saint Kitts and Nevis",dial_code:"+1869",emoji:"🇰🇳",code:"KN"},{name:"Saint Lucia",dial_code:"+1758",emoji:"🇱🇨",code:"LC"},{name:"Saint Martin",dial_code:"+590",emoji:"🇲🇫",code:"MF"},{name:"Saint Pierre and Miquelon",dial_code:"+508",emoji:"🇵🇲",code:"PM"},{name:"Saint Vincent and the Grenadines",dial_code:"+1784",emoji:"🇻🇨",code:"VC"},{name:"Samoa",dial_code:"+685",emoji:"🇼🇸",code:"WS"},{name:"San Marino",dial_code:"+378",emoji:"🇸🇲",code:"SM"},{name:"Sao Tome and Principe",dial_code:"+239",emoji:"🇸🇹",code:"ST"},{name:"Saudi Arabia",dial_code:"+966",emoji:"🇸🇦",code:"SA"},{name:"Senegal",dial_code:"+221",emoji:"🇸🇳",code:"SN"},{name:"Serbia",dial_code:"+381",emoji:"🇷🇸",code:"RS"},{name:"Seychelles",dial_code:"+248",emoji:"🇸🇨",code:"SC"},{name:"Sierra Leone",dial_code:"+232",emoji:"🇸🇱",code:"SL"},{name:"Singapore",dial_code:"+65",emoji:"🇸🇬",code:"SG"},{name:"Slovakia",dial_code:"+421",emoji:"🇸🇰",code:"SK"},{name:"Slovenia",dial_code:"+386",emoji:"🇸🇮",code:"SI"},{name:"Solomon Islands",dial_code:"+677",emoji:"🇸🇧",code:"SB"},{name:"Somalia",dial_code:"+252",emoji:"🇸🇴",code:"SO"},{name:"South Africa",dial_code:"+27",emoji:"🇿🇦",code:"ZA"},{name:"South Sudan",dial_code:"+211",emoji:"🇸🇸",code:"SS"},{name:"South Georgia and the South Sandwich Islands",dial_code:"+500",emoji:"🇬🇸",code:"GS"},{name:"Spain",dial_code:"+34",emoji:"🇪🇸",code:"ES"},{name:"Sri Lanka",dial_code:"+94",emoji:"🇱🇰",code:"LK"},{name:"Sudan",dial_code:"+249",emoji:"🇸🇩",code:"SD"},{name:"Suriname",dial_code:"+597",emoji:"🇸🇷",code:"SR"},{name:"Svalbard and Jan Mayen",dial_code:"+47",emoji:"🇸🇯",code:"SJ"},{name:"Swaziland",dial_code:"+268",emoji:"🇸🇿",code:"SZ"},{name:"Sweden",dial_code:"+46",emoji:"🇸🇪",code:"SE"},{name:"Switzerland",dial_code:"+41",emoji:"🇨🇭",code:"CH"},{name:"Syrian Arab Republic",dial_code:"+963",emoji:"🇸🇾",code:"SY"},{name:"Taiwan",dial_code:"+886",emoji:"🇹🇼",code:"TW"},{name:"Tajikistan",dial_code:"+992",emoji:"🇹🇯",code:"TJ"},{name:"Tanzania, United Republic of Tanzania",dial_code:"+255",emoji:"🇹🇿",code:"TZ"},{name:"Thailand",dial_code:"+66",emoji:"🇹🇭",code:"TH"},{name:"Timor-Leste",dial_code:"+670",emoji:"🇹🇱",code:"TL"},{name:"Togo",dial_code:"+228",emoji:"🇹🇬",code:"TG"},{name:"Tokelau",dial_code:"+690",emoji:"🇹🇰",code:"TK"},{name:"Tonga",dial_code:"+676",emoji:"🇹🇴",code:"TO"},{name:"Trinidad and Tobago",dial_code:"+1868",emoji:"🇹🇹",code:"TT"},{name:"Tunisia",dial_code:"+216",emoji:"🇹🇳",code:"TN"},{name:"Turkey",dial_code:"+90",emoji:"🇹🇷",code:"TR"},{name:"Turkmenistan",dial_code:"+993",emoji:"🇹🇲",code:"TM"},{name:"Turks and Caicos Islands",dial_code:"+1649",emoji:"🇹🇨",code:"TC"},{name:"Tuvalu",dial_code:"+688",emoji:"🇹🇻",code:"TV"},{name:"Uganda",dial_code:"+256",emoji:"🇺🇬",code:"UG"},{name:"Ukraine",dial_code:"+380",emoji:"🇺🇦",code:"UA"},{name:"United Arab Emirates",dial_code:"+971",emoji:"🇦🇪",code:"AE"},{name:"United Kingdom",dial_code:"+44",emoji:"🇬🇧",code:"GB"},{name:"United States",dial_code:"+1",emoji:"🇺🇸",code:"US"},{name:"Uruguay",dial_code:"+598",emoji:"🇺🇾",code:"UY"},{name:"Uzbekistan",dial_code:"+998",emoji:"🇺🇿",code:"UZ"},{name:"Vanuatu",dial_code:"+678",emoji:"🇻🇺",code:"VU"},{name:"Venezuela, Bolivarian Republic of Venezuela",dial_code:"+58",emoji:"🇻🇪",code:"VE"},{name:"Vietnam",dial_code:"+84",emoji:"🇻🇳",code:"VN"},{name:"Virgin Islands, British",dial_code:"+1284",emoji:"🇻🇬",code:"VG"},{name:"Virgin Islands, U.S.",dial_code:"+1340",emoji:"🇻🇮",code:"VI"},{name:"Wallis and Futuna",dial_code:"+681",emoji:"🇼🇫",code:"WF"},{name:"Yemen",dial_code:"+967",emoji:"🇾🇪",code:"YE"},{name:"Zambia",dial_code:"+260",emoji:"🇿🇲",code:"ZM"},{name:"Zimbabwe",dial_code:"+263",emoji:"🇿🇼",code:"ZW"}],yl=({placeholder:e})=>{const[o,r]=p.useState(cn),[n,a]=p.useState(e??cn[0].name),[i,l]=p.useState(!0),[u,c]=p.useState(!1),[d,g]=p.useState(!1);return{hide:i,setHide:l,newOptions:o,setNewOptions:r,isHovered:d,setIsHovered:g,isFocused:u,setIsFocused:c,value:n,setValue:a}},va={xs:8,sm:10,md:12,lg:14,xl:16},$g=({size:e,...o})=>t.jsx(s.Element,{as:"ul",...o}),Lg=e=>t.jsx(s.Input,{type:"text",...e}),Bg=({size:e,...o})=>t.jsx(s.Element,{as:"li",...o}),_g=({id:e,option:o,size:r="md",isSelected:n=!1,isHighlighted:a=!1,callback:i=()=>{},views:l={text:{}}})=>{const u=c=>{c&&c.stopPropagation&&c.stopPropagation(),i(o??"")};return t.jsx(Bg,{id:e,margin:0,role:"option","aria-selected":n,listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:u,fontSize:s.Typography.fontSizes[r],backgroundColor:a?"color-gray-100":void 0,_hover:{backgroundColor:"color-gray-100",transition:"all 0.15s ease-in-out"},...l.text,children:o})},Og=({id:e,size:o,views:r={dropDown:{}},options:n=[],selectedOption:a,highlightedIndex:i=-1,callback:l=()=>{}})=>{const u=c=>l(c);return t.jsx($g,{id:e,role:"listbox",margin:0,padding:0,top:"100%",width:"100%",display:"flex",zIndex:1e3,overflow:"auto",maxHeight:"300px",borderRadius:12,position:"absolute",flexDirection:"column",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",...r.dropDown,children:n.map((c,d)=>t.jsx(_g,{id:e?`${e}-option-${d}`:void 0,size:o,option:c.name,isSelected:c.name===a,isHighlighted:d===i,callback:u,...r.text},c.code))})},xl=({id:e,name:o,label:r,value:n,placeholder:a,helperText:i,hide:l=!1,error:u=!1,isHovered:c=!1,isFocused:d=!1,isAutoFocus:g=!1,isDisabled:m=!1,isReadOnly:h=!1,shadow:f={},newOptions:y=[],size:k="md",variant:b="default",shape:j="default",onChange:x,onBlur:C=()=>{},setHide:v=()=>{},setNewOptions:S=()=>{},setIsHovered:I=()=>{},setIsFocused:w=()=>{},setValue:T=()=>{},selected:R,views:E={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:F,...W})=>{const{getColor:M,themeMode:z}=s.useTheme(),H=p.useId(),V=e??H,P=`${V}-listbox`,[L,B]=p.useState(-1),$=M("color-gray-500",{themeMode:F||z}),q=()=>w(!0),Y=N=>{v(!l),B(-1),T(N),x&&x(N)},O=()=>{!m&&!h&&v(!l)},J=N=>{const ee=N.target.value,oe=cn.filter(ie=>ie.name.toLowerCase().startsWith(ee.toLowerCase()));l&&v(!1),S(oe),B(oe.length>0?0:-1),x&&x(ee)},D=N=>{m||h||(N.key==="ArrowDown"?(N.preventDefault(),l?(v(!1),B(y.length>0?0:-1)):B(Math.min(L+1,y.length-1))):N.key==="ArrowUp"?l||(N.preventDefault(),B(Math.max(L-1,0))):N.key==="Enter"?!l&&L>=0&&y[L]&&(N.preventDefault(),Y(y[L].name)):N.key==="Escape"&&(l||(v(!0),B(-1))))},A=N=>{C(N),w(!1)},_=!!r,G={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none"}},transition:"all 0.2s ease-in-out",fontSize:s.Typography.fontSizes[k],backgroundColor:"transparent",color:m?"color-gray-400":"color-gray-900",cursor:m?"not-allowed":h?"auto":"pointer",...E.field};return t.jsxs(fo,{helperText:i,error:u,views:E,onClick:O,children:[t.jsxs(So,{label:r,size:k,error:u,shape:j,views:E,shadow:f,variant:b,value:n,color:"theme-primary",isDisabled:m,isReadOnly:h,isFocused:d,showLabel:_,_hover:!m&&!u?{borderColor:"theme-primary"}:void 0,children:[t.jsxs(ut,{children:[_&&t.jsx(Wo,{htmlFor:V,color:"theme-primary",error:u,views:E,children:r}),t.jsx(Lg,{id:V,name:o,placeholder:a,readOnly:h,disabled:m,autoFocus:g,role:"combobox","aria-expanded":!l,"aria-controls":l?void 0:P,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":!l&&L>=0?`${P}-option-${L}`:void 0,onBlur:A,onFocus:q,onKeyDown:D,...G,...W,value:n,onChange:J})]}),t.jsx(Rt,{children:l?t.jsx(je,{orientation:"down",widthHeight:va[k],color:$,style:E.icon}):t.jsx(je,{orientation:"up",widthHeight:va[k],color:$,style:E.icon})})]}),!l&&t.jsx(Og,{id:P,size:k,views:E,options:y,selectedOption:n,highlightedIndex:L,callback:Y})]})},Ng=e=>{const o=yl(e);return t.jsx(xl,{...o,...e})},qg=Ng,bl=e=>{const o=Un(e),[r,n]=p.useState(!1);return{isVisible:r,setIsVisible:n,...e,...o}},Ta={xs:14,sm:16,md:16,lg:18,xl:20},Ug=({visibleIcon:e,hiddenIcon:o,...r})=>{const{isVisible:n,setIsVisible:a,...i}=bl(r),l=Ta[r.size??"md"]??Ta.md,u=l-2;return t.jsx(Lt,{...i,type:n?"text":"password",isClearable:!1,right:t.jsx(s.View,{display:"flex",alignItems:"center",justifyContent:"center",width:`${l}px`,height:`${l}px`,minWidth:`${l}px`,color:"color-gray-500",cursor:r.isDisabled?"not-allowed":"pointer",transition:"color 0.2s ease",onClick:()=>{r.isDisabled||a(!n)},children:n?e??t.jsx(An,{widthHeight:u}):o??t.jsx(En,{widthHeight:u})})})},Gg=Ug,kl=(e,o,r)=>{const[n,a]=p.useState(e),[i,l]=p.useState(o?{value:o,label:o}:e[0]),[u,c]=p.useState([]),[d,g]=p.useState(0),[m,h]=p.useState(r??""),[f,y]=p.useState(!1);return{filteredItems:n,setFilteredItems:a,selectedItem:i,setSelectedItem:l,selectedItems:u,setSelectedItems:c,highlightedIndex:d,setHighlightedIndex:g,searchQuery:m,setSearchQuery:h,isDropdownVisible:f,setIsDropdownVisible:y}},Yg={xs:12,sm:14,md:16,lg:20,xl:24},Kg={maxHeight:"280px",overflowY:"auto",zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)"},Ia={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},Xg={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:10,borderTopRightRadius:10},Jg={padding:"8px 10px",cursor:"pointer",borderRadius:8,margin:"1px 4px",transition:"all 0.15s ease-in-out"},Qg={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},Ra={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},Zg={display:"inline-flex",alignItems:"center",gap:"4px",padding:"2px 8px",backgroundColor:"color-gray-100",borderRadius:8,fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},Cl=({placeholder:e,items:o,showTick:r=!0,onSelect:n,searchEnabled:a=!0,left:i,right:l,label:u,filteredItems:c,setSelectedItem:d,selectedItem:g,selectedItems:m,setSelectedItems:h,highlightedIndex:f,setHighlightedIndex:y,searchQuery:k,setSearchQuery:b,setFilteredItems:j,views:x,isDropdownVisible:C,setIsDropdownVisible:v,isMulti:S=!1,searchPlaceholder:I,size:w="md",...T})=>{const R=p.useId(),E=T.id??R,F=`${E}-dropdown`,W=`${E}-label`,{ref:M,relation:z}=s.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),H=p.useRef(null),[V,P]=p.useState(!1),[L,B]=p.useState(!1),$=()=>{var N;const D=L?Ia.enter:Ia.initial;if(!M.current)return{};const A=M.current.getBoundingClientRect(),_={position:"fixed",left:A.left,width:A.width,zIndex:1e4,...D};return((N=z==null?void 0:z.space)==null?void 0:N.vertical)==="top"?{..._,bottom:window.innerHeight-A.top+6}:{..._,top:A.bottom+6}};p.useEffect(()=>{if(C){const D=setTimeout(()=>B(!0),10);return()=>clearTimeout(D)}B(!1)},[C]),p.useEffect(()=>{const D=A=>{!A.composedPath().some(N=>(N==null?void 0:N.id)===F)&&M.current&&!M.current.contains(A.target)&&v(!1)};return document.addEventListener("mousedown",D),()=>document.removeEventListener("mousedown",D)},[]);const q=D=>{if(b(D),D==="")j(o);else{const A=o.filter(_=>_.label.toLowerCase().includes(D.toLowerCase()));j(A)}y(0)},Y=D=>{if(S){const A=m.some(G=>G.value===D.value);let _;A?_=m.filter(G=>G.value!==D.value):_=[...m,D],h(_),n==null||n(_)}else d(D),n==null||n(D),v(!1)},O=(D,A)=>{D.stopPropagation();const _=m.filter(G=>G.value!==A.value);h(_),n==null||n(_)},J=D=>S?m.some(A=>A.value===D.value):D.value===g.value;return t.jsxs(s.Horizontal,{flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...T,children:[u&&t.jsx(s.Text,{id:W,views:x==null?void 0:x.label,children:u}),t.jsxs(s.View,{position:"relative",width:"100%",children:[t.jsx("div",{ref:M,role:"combobox",tabIndex:0,"aria-expanded":C,"aria-haspopup":"listbox","aria-controls":C?F:void 0,"aria-labelledby":u?W:void 0,onClick:()=>v(!C),onKeyDown:D=>{D.key==="Enter"||D.key===" "||D.key==="ArrowDown"?(D.preventDefault(),v(!0)):D.key==="Escape"&&v(!1)},style:{width:"100%"},children:t.jsxs(So,{size:w,isHovered:V,isFocused:C,onMouseEnter:()=>P(!0),onMouseLeave:()=>P(!1),cursor:"pointer",views:{container:x==null?void 0:x.container},children:[t.jsxs(s.Horizontal,{gap:10,alignItems:"center",flex:1,minWidth:0,flexWrap:S?"wrap":"nowrap",...x==null?void 0:x.labelContainer,children:[i,S?m.length>0?t.jsx(s.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:m.map(D=>t.jsxs(s.Horizontal,{...Zg,_hover:{backgroundColor:"color-gray-200"},children:[D.icon&&t.jsx(s.View,{flexShrink:0,children:D.icon}),t.jsx(s.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:D.label}),t.jsx(Ue,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:A=>O(A,D)})]},D.value))}):t.jsx(s.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...x==null?void 0:x.label,children:e}):t.jsxs(t.Fragment,{children:[g.icon&&g.label!==e&&t.jsx(s.View,{children:g.icon}),t.jsx(s.Text,{weight:"medium",flexGrow:1,color:g.label===e?"color-gray-500":"color-gray-800",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...x==null?void 0:x.label,children:g.label})]})]}),t.jsxs(s.Horizontal,{gap:8,alignItems:"center",flexShrink:0,children:[l,t.jsx(s.View,{style:C?Ra.open:Ra.closed,children:t.jsx(je,{widthHeight:Yg[w],orientation:"down",color:C?"color-gray-700":"color-gray-400"})})]})]})}),C&&t.jsx(At,{children:t.jsxs(s.View,{ref:H,id:F,role:"listbox","aria-labelledby":u?W:void 0,...Kg,style:$(),...x==null?void 0:x.dropdown,children:[a&&t.jsx(s.View,{...Xg,children:t.jsx(Lt,{id:`${E}-search`,name:`${T.name??E}-search`,width:"100%",type:"search",autoFocus:!0,value:k,onChange:D=>q(D),hint:I||e||"Search...","aria-label":I||"Search",isClearable:!1,left:t.jsx(dr,{widthHeight:14,color:"color-gray-400"}),views:{container:{width:"100%",padding:"0",backgroundColor:"transparent",borderColor:"color-gray-200",...x==null?void 0:x.text},field:{fontSize:"13px"}}})}),c.length>0&&t.jsx(s.View,{margin:0,padding:"4px",children:c.map((D,A)=>{const _=J(D),G=A===f;return t.jsxs(s.Horizontal,{role:"option","aria-selected":_,justifyContent:"space-between",alignItems:"center",...Jg,backgroundColor:_&&G?"color-blue-100":_?"color-blue-50":G?"color-gray-100":"transparent",onMouseEnter:()=>y(A),onClick:()=>Y(D),...x==null?void 0:x.item,children:[t.jsxs(s.Horizontal,{gap:8,alignItems:"center",children:[D.icon&&t.jsx(s.View,{flexShrink:0,children:D.icon}),t.jsx(s.Text,{size:"sm",color:_?"theme-primary":"color-gray-800",weight:_?"medium":"normal",children:D.label})]}),_&&r&&t.jsx(Vt,{widthHeight:16,color:"theme-primary"})]},D.value)})}),c.length===0&&t.jsxs(s.Vertical,{...Qg,children:[t.jsx(dr,{widthHeight:24,color:"color-gray-300"}),t.jsx(s.Text,{color:"color-gray-500",size:"sm",align:"center",children:"No results found"}),t.jsx(s.Text,{color:"color-gray-400",size:"xs",align:"center",children:"Try a different search term"})]})]})})]})]})},eh=({id:e,name:o,items:r,placeholder:n,searchPlaceholder:a,...i})=>{const l=kl(r,n,a);return t.jsx(Cl,{id:e,name:o,items:r,searchPlaceholder:a,...l,...i})},oh=eh,Sl=e=>{const{tags:o,defaultTags:r=[],onTagsChange:n,onTagAdd:a,onTagRemove:i,maxTags:l,minTagLength:u=1,maxTagLength:c=50,allowDuplicates:d=!1,separators:g=["enter","comma"],isDisabled:m=!1,isReadOnly:h=!1}=e,[f,y]=p.useState(""),[k,b]=p.useState(()=>(o||r||[]).map((z,H)=>({id:`tag-${H}-${Date.now()}`,value:z}))),[j,x]=p.useState(!1),[C,v]=p.useState(!1),S=o&&Array.isArray(o)?o.map((M,z)=>({id:`tag-${z}-${Date.now()}`,value:M})):k;p.useEffect(()=>{o&&Array.isArray(o)&&b(o.map((M,z)=>({id:`tag-${z}-${Date.now()}`,value:M})))},[o]);const I=p.useCallback(M=>{const z=M.trim();return!(z.length<u||z.length>c||!d&&S.map(V=>V.value.toLowerCase()).includes(z.toLowerCase())||l&&S.length>=l)},[S,u,c,d,l]),w=p.useCallback(M=>{if(m||h)return;const z=M.trim();if(!z||!I(z))return;const H={id:`tag-${Date.now()}-${Math.random()}`,value:z},V=[...S,H],P=V.map(L=>L.value);o||b(V),n==null||n(P),a==null||a(z),y("")},[S,I,n,a,m,h,o]),T=p.useCallback(M=>{if(m||h)return;const z=S[M];if(!z)return;const H=S.filter((P,L)=>L!==M),V=H.map(P=>P.value);o||b(H),n==null||n(V),i==null||i(z.value,M)},[S,n,i,m,h,o]),R=p.useCallback(M=>{if(m||h)return;const z=M.target.value;if(g.includes("comma")&&z.includes(",")){const H=z.split(","),V=H[0],P=H.slice(1).join(",");V.trim()&&w(V),y(P);return}y(z)},[w,g,m,h]),E=p.useCallback(M=>{if(m||h)return;const{key:z}=M;if(g.includes("enter")&&z==="Enter"){M.preventDefault(),f.trim()&&w(f);return}if(g.includes("tab")&&z==="Tab"&&f.trim()){M.preventDefault(),w(f);return}if(g.includes("space")&&z===" "&&f.trim()){M.preventDefault(),w(f);return}if(z==="Backspace"&&!f&&S.length>0){M.preventDefault(),T(S.length-1);return}},[w,T,f,S,g,m,h]),F=p.useCallback(()=>{var M;x(!0),(M=e.onFocus)==null||M.call(e)},[e.onFocus]),W=p.useCallback(()=>{var M;x(!1),f.trim()&&w(f),(M=e.onBlur)==null||M.call(e)},[w,f,e.onBlur]);return{inputValue:f,setInputValue:y,tags:S,setTags:b,isFocused:j,setIsFocused:x,isHovered:C,setIsHovered:v,addTag:w,removeTag:T,handleInputChange:R,handleKeyDown:E,handleFocus:F,handleBlur:W,validateTag:I}},th=({tag:e,onRemove:o,isRemovable:r,size:n,views:a,isDisabled:i,isReadOnly:l})=>{const[u,c]=p.useState(!1),d={xs:{padding:"2px 8px",fontSize:"10px",iconSize:10},sm:{padding:"4px 10px",fontSize:"12px",iconSize:12},md:{padding:"6px 14px",fontSize:"14px",iconSize:14},lg:{padding:"8px 16px",fontSize:"16px",iconSize:16},xl:{padding:"10px 18px",fontSize:"18px",iconSize:18}}[n]||{padding:"6px 14px",fontSize:"14px",iconSize:14};return t.jsxs(s.Horizontal,{alignItems:"center",gap:6,padding:d.padding,backgroundColor:"theme-primary-100",borderRadius:"9999px",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary-250",transition:"all 0.15s ease-in-out",opacity:i?.6:1,maxWidth:"100%",minWidth:0,_hover:!i&&!l?{backgroundColor:"theme-primary-180",borderColor:"theme-primary-400"}:{},...a==null?void 0:a.tag,children:[t.jsx(s.Text,{fontSize:d.fontSize,color:i?"color-gray-400":"theme-primary",maxLines:1,minWidth:0,...a==null?void 0:a.tagText,children:e}),r&&!i&&!l&&t.jsx(s.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.15s ease-in-out",backgroundColor:u?"color-red-100":"transparent",opacity:u?1:.7,onMouseEnter:()=>c(!0),onMouseLeave:()=>c(!1),onClick:g=>{g.stopPropagation(),o()},_hover:{backgroundColor:"color-red-100"},...a==null?void 0:a.tagRemove,children:t.jsx(Ue,{widthHeight:d.iconSize,color:u?"color-red-500":"color-gray-400"})})]})},wl=({id:e,name:o,label:r,placeholder:n="Type and press Enter to add tags...",helperText:a,error:i=!1,inputValue:l="",tags:u=[],left:c,right:d,shadow:g={},views:m={},size:h="md",shape:f="default",variant:y="default",isDisabled:k=!1,isReadOnly:b=!1,isAutoFocus:j=!1,isRemovable:x=!0,isFocused:C=!1,isHovered:v=!1,maxTags:S,handleInputChange:I,handleKeyDown:w,handleFocus:T,handleBlur:R,removeTag:E,setIsHovered:F,onClick:W,setInputValue:M,setIsFocused:z,addTag:H,defaultTags:V,onTagsChange:P,onTagAdd:L,onTagRemove:B,minTagLength:$,maxTagLength:q,allowDuplicates:Y,separators:O,menuItems:J,onMenuItemSelect:D,onFocus:A,onBlur:_,validateTag:G,...N})=>{const{getColor:ee,themeMode:oe}=s.useTheme(),ie=!!(r&&(C||u.length>0||l)),K=S&&u.length>=S,ae={border:"none",outline:"none",backgroundColor:"transparent",fontSize:s.Typography.fontSizes[h],color:k?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",transition:"all 0.2s ease-in-out",...m==null?void 0:m.input};return t.jsx(fo,{error:!!i,helperText:typeof i=="string"?i:a,views:m,...N,children:t.jsxs(So,{label:r,shadow:g,value:u.length>0||l?"has-content":"",size:h,shape:f,variant:y,error:!!i,showLabel:ie,isFocused:C,isHovered:v,isDisabled:k,isReadOnly:b,views:{...m,container:{...m==null?void 0:m.container,...m==null?void 0:m.inputContainer}},onClick:W,onMouseEnter:()=>F==null?void 0:F(!0),onMouseLeave:()=>F==null?void 0:F(!1),children:[c,t.jsxs(ut,{children:[r&&t.jsx(Wo,{size:h,error:!!i,views:m,children:r}),t.jsxs(s.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:s.Typography.fontSizes[h],padding:"0",...m==null?void 0:m.tagsContainer,children:[u.map((de,fe)=>t.jsx(th,{tag:de.value,onRemove:()=>E==null?void 0:E(fe),isRemovable:x,size:h,views:m,isDisabled:k,isReadOnly:b},de.id)),!K&&t.jsx(s.Input,{id:e,name:o,type:"text",value:l,placeholder:u.length===0?n:"",disabled:k,readOnly:b,autoFocus:j,onChange:I,onKeyDown:w,onFocus:T,onBlur:R,autoComplete:"off",...ae}),K&&t.jsxs(s.Text,{fontSize:s.Typography.fontSizes[h],color:"color-gray-500",fontStyle:"italic",...m==null?void 0:m.placeholder,children:["Maximum ",S," tags reached"]})]})]}),d]})})},rh=e=>{const o=Sl(e),{tags:r,...n}=e,{setTags:a,...i}=o;return t.jsx(wl,{...i,...n})},nh=rh;function ah(e){const o=setTimeout(e,0),r=setTimeout(e,10),n=setTimeout(e,50);return[o,r,n]}const jl=({value:e,defaultValue:o="",length:r=6,onChange:n,onChangeText:a,onComplete:i,onKeyDown:l,onKeyPress:u,onBlur:c,onFocus:d,isReadOnly:g,isDisabled:m,pattern:h,stepValues:f,pasteTransformer:y})=>{var J,D;const k=e!==void 0,b=k?e:o,[j,x]=p.useState(String(b??"").slice(0,r)||""),[C,v]=p.useState(!1),[S,I]=p.useState(!1),[w,T]=p.useState(null),[R,E]=p.useState(null),F=p.useRef(null),W=p.useRef(null),M=p.useRef({value:j,onChange:n||(()=>{}),isIOS:typeof window<"u"&&((D=(J=window==null?void 0:window.CSS)==null?void 0:J.supports)==null?void 0:D.call(J,"-webkit-touch-callout","none"))}),z=p.useRef({prev:[null,null,"none"]}),H=h?typeof h=="string"?new RegExp(h):h:null;p.useEffect(()=>{if(k&&e!==j){const A=String(e??"").slice(0,r)||"";x(A)}},[k,e,r,j]);const V=p.useCallback(A=>{let _=A;if(f&&f.length>0&&A){const G=parseInt(A,10);if(!isNaN(G)){let N=f[0],ee=Math.abs(G-N);for(let oe=1;oe<f.length;oe++){const ie=Math.abs(G-f[oe]);ie<ee&&(ee=ie,N=f[oe])}_=N.toString()}}x(_),n&&n(_),a&&a(_),i&&_.length===r&&i(_)},[n,a,i,r,f,k]),P=p.useCallback(A=>{A&&F.current!==A&&Object.defineProperty(F,"current",{value:A,writable:!0})},[]),L=p.useCallback(A=>{var N,ee,oe,ie;const _=typeof A=="string"?A:((N=A==null?void 0:A.currentTarget)==null?void 0:N.value)??((ee=A==null?void 0:A.target)==null?void 0:ee.value)??((oe=A==null?void 0:A.nativeEvent)==null?void 0:oe.text)??"",G=String(_).slice(0,r);if(G.length>0&&H&&!H.test(G)){(ie=A==null?void 0:A.preventDefault)==null||ie.call(A);return}V(G),F.current&&(F.current.value=G)},[r,H,V,F]),B=p.useCallback(()=>{const A=F.current;if(A&&typeof A.setSelectionRange=="function"){const _=typeof A.value=="string"?A.value.length:0,G=Math.min(_,r-1),N=_;A.setSelectionRange(G,N),T(G),E(N)}v(!0),d&&d()},[r,d]),$=p.useCallback(A=>{v(!1),c&&c(A)},[c]),q=p.useCallback(A=>{l&&l(A)},[]),Y=p.useCallback(A=>{u&&u(A)},[]),O=p.useCallback(A=>{const _=F.current;if(!A.clipboardData||!_)return;const G=A.clipboardData.getData("text/plain"),N=y?y(G):G;A.preventDefault();const ee=_.selectionStart||0,oe=_.selectionEnd||0,ae=(ee!==oe?j.slice(0,ee)+N+j.slice(oe):j.slice(0,ee)+N+j.slice(ee)).slice(0,r);if(ae.length>0&&H&&!H.test(ae))return;_.value=ae,V(ae),x(ae);const de=Math.min(ae.length,r-1),fe=ae.length;_.setSelectionRange(de,fe),T(de),E(fe)},[r,y,H,V,j,x]);return p.useEffect(()=>{const A=F.current,_=W.current;if(!A||!_||typeof document>"u")return;M.current.value!==A.value&&M.current.onChange&&M.current.onChange(A.value),z.current.prev=[A.selectionStart,A.selectionEnd,A.selectionDirection];function G(){if(document.activeElement!==A){T(null),E(null);return}const K=(A==null?void 0:A.selectionStart)??null,ae=(A==null?void 0:A.selectionEnd)??null,de=(A==null?void 0:A.selectionDirection)??null,fe=(A==null?void 0:A.maxLength)??0,Ie=(A==null?void 0:A.value)??"",ce=z.current.prev;let le=-1,se=-1,re="none";if(Ie.length!==0&&K!==null&&ae!==null){const be=K===ae,xe=K===Ie.length&&Ie.length<fe;if(be&&!xe){const ye=K;if(ye===0)le=0,se=1,re="forward";else if(ye===fe)le=ye-1,se=ye,re="backward";else if(fe>1&&Ie.length>1){let he=0;if(ce[0]!==null&&ce[1]!==null){re=ye<ce[1]?"backward":"forward";const Ve=ce[0]===ce[1]&&ce[0]<fe;re==="backward"&&!Ve&&(he=-1)}le=he+ye,se=he+ye+1}}le!==-1&&se!==-1&&le!==se&&F.current&&F.current.setSelectionRange(le,se,re)}const pe=le!==-1?le:K,Q=se!==-1?se:ae,te=re!=="none"?re:de;T(pe),E(Q),z.current.prev=[pe,Q,te]}document.addEventListener("selectionchange",G,{capture:!0}),G(),document.activeElement===A&&v(!0);const N=_,ee=()=>{var K;N&&typeof((K=N.style)==null?void 0:K.setProperty)=="function"&&N.style.setProperty("--root-height",`${A.clientHeight}px`)};ee();const oe=typeof window<"u"?window.ResizeObserver:void 0,ie=typeof oe=="function"?new oe(ee):null;return ie==null||ie.observe(A),()=>{document.removeEventListener("selectionchange",G,{capture:!0}),ie==null||ie.disconnect()}},[]),p.useEffect(()=>{if(typeof Event>"u")return;const A=ah(()=>{var oe,ie,K;const _=F.current;_&&typeof _.dispatchEvent=="function"&&_.dispatchEvent(new Event("input"));const G=(oe=F.current)==null?void 0:oe.selectionStart,N=(ie=F.current)==null?void 0:ie.selectionEnd,ee=(K=F.current)==null?void 0:K.selectionDirection;G!==null&&N!==null&&G!==void 0&&N!==void 0&&(T(G),E(N),z.current.prev=[G,N,ee||"none"])});return()=>A.forEach(clearTimeout)},[j,C]),{value:j,setValue:V,isFocused:C,setIsFocused:v,isHovered:S,setIsHovered:I,inputRef:F,containerRef:W,mirrorSelectionStart:w,mirrorSelectionEnd:R,setMirrorSelectionStart:T,setMirrorSelectionEnd:E,setInputRef:P,handleChange:L,handleFocus:B,handleBlur:$,handleKeyDown:q,handleKeyPress:Y,handlePaste:O}},ih=p.createContext({slots:[],isFocused:!1,isHovering:!1}),lh=`
7
- @keyframes blink {
8
- 0%, 100% { opacity: 1; }
9
- 50% { opacity: 0; }
10
- }
11
- [data-input-otp] {
12
- --nojs-bg: white !important;
13
- --nojs-fg: black !important;
14
- background-color: var(--nojs-bg) !important;
15
- color: var(--nojs-fg) !important;
16
- caret-color: var(--nojs-fg) !important;
17
- letter-spacing: .25em !important;
18
- text-align: center !important;
19
- border: 1px solid var(--nojs-fg) !important;
20
- border-radius: 4px !important;
21
- width: 100% !important;
22
- }
23
- `;function No(e,o){try{e.insertRule(o)}catch{console.error("input-otp could not insert CSS rule:",o)}}const vl=({id:e,name:o,label:r,value:n="",length:a=6,onChange:i,onChangeText:l,onComplete:u,helperText:c,placeholder:d="",shadow:g,views:m={},size:h="md",shape:f="rounded",variant:y="outline",gap:k=8,type:b="text",error:j=!1,isFocused:x=!1,isHovered:C=!1,isDisabled:v=!1,isReadOnly:S=!1,isAutoFocus:I=!1,setValue:w,setIsFocused:T,setIsHovered:R,inputRef:E,containerRef:F,mirrorSelectionStart:W,mirrorSelectionEnd:M,setMirrorSelectionStart:z,setMirrorSelectionEnd:H,handlePaste:V,handleChange:P,handleFocus:L,handleBlur:B,handleKeyDown:$,handleKeyPress:q,secureTextEntry:Y,stepValues:O,setInputRef:J,onBlur:D=()=>{},onClick:A=()=>{},onFocus:_=()=>{},onKeyPress:G,pattern:N,pasteTransformer:ee,...oe})=>{s.useTheme();const ie=p.useId(),K=e??o??ie,ae=!!r,de=p.useMemo(()=>({slots:Array.from({length:a}).map((ce,le)=>{const se=x&&W!==null&&M!==null&&(W===M&&le===W||le>=W&&le<M),re=n[le]!==void 0?n[le]:null,pe=n[0]!==void 0?null:(d==null?void 0:d[le])??null;return{char:re,placeholderChar:pe,isActive:se,hasFakeCaret:se&&re===null}}),isFocused:x,isHovering:!v&&C}),[x,C,v,a,M,W,d,n]);p.useEffect(()=>{I&&E.current&&E.current.focus()},[I,E]),p.useEffect(()=>{if(!document.getElementById("input-otp-style")){const ce=document.createElement("style");if(ce.id="input-otp-style",document.head.appendChild(ce),ce.sheet){const le="background: transparent !important; color: transparent !important; border-color: transparent !important; opacity: 0 !important; box-shadow: none !important; -webkit-box-shadow: none !important; -webkit-text-fill-color: transparent !important;";No(ce.sheet,"@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }"),No(ce.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),No(ce.sheet,`[data-input-otp]:autofill { ${le} }`),No(ce.sheet,`[data-input-otp]:-webkit-autofill { ${le} }`),No(ce.sheet,"@supports (-webkit-touch-callout: none) { [data-input-otp] { letter-spacing: -.6em !important; font-weight: 100 !important; font-stretch: ultra-condensed; font-optical-sizing: none !important; left: -1px !important; right: 1px !important; } }"),No(ce.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}},[]);const fe=()=>t.jsx(s.Horizontal,{gap:k,width:"100%",justifyContent:"center",minHeight:h==="xs"?"32px":h==="sm"?"36px":h==="md"?"40px":h==="lg"?"48px":"56px",...m.container,children:de.slots.map((ce,le)=>t.jsxs(So,{size:h,error:j,shape:f,views:m,variant:y,value:ce.char||"",color:"theme-primary",isHovered:C,isDisabled:v,isReadOnly:S,isFocused:ce.isActive,showLabel:!1,onMouseEnter:()=>R(!0),onMouseLeave:()=>R(!1),justifyContent:"center",alignItems:"center",width:"100%",position:"relative",height:h==="xs"?"32px":h==="sm"?"36px":h==="md"?"40px":h==="lg"?"48px":"56px",...m.container,children:[ce.char?t.jsx(s.View,{textAlign:"center",fontSize:h==="xs"?"14px":h==="sm"?"16px":h==="md"?"18px":h==="lg"?"20px":"24px",fontWeight:"medium",...m.text,children:b==="password"?"•":ce.char}):ce.placeholderChar?t.jsx(s.View,{textAlign:"center",fontSize:h==="xs"?"14px":h==="sm"?"16px":h==="md"?"18px":h==="lg"?"20px":"24px",color:"color-gray-400",opacity:.5,...m.text,children:ce.placeholderChar}):null,ce.hasFakeCaret&&t.jsx(s.View,{position:"absolute",width:"2px",height:"60%",backgroundColor:"theme-primary",animation:"blink 1s step-start infinite",style:{animationName:"blink",animationDuration:"1s",animationIterationCount:"infinite",animationTimingFunction:"step-start"}})]},`${e||o}-${le}`))}),Ie={position:"absolute",inset:0,width:"100%",height:"100%",display:"flex",textAlign:"center",opacity:"1",color:"transparent",pointerEvents:"all",background:"transparent",caretColor:"transparent",border:"0 solid transparent",outline:"0 solid transparent",boxShadow:"none",letterSpacing:"-.5em",fontSize:"var(--root-height)",fontFamily:"monospace",fontVariantNumeric:"tabular-nums"};return t.jsxs(t.Fragment,{children:[t.jsx("noscript",{children:t.jsx("style",{children:lh})}),t.jsxs(fo,{helperText:c,error:j,views:m,children:[ae&&t.jsx(Wo,{htmlFor:K,color:"theme-primary",error:j,...m.label,children:r}),t.jsxs(s.View,{ref:F,"data-input-otp-container":!0,position:"relative",cursor:v?"default":"text",userSelect:"none",pointerEvents:"none",children:[t.jsx(ih.Provider,{value:de,children:fe()}),t.jsx(s.View,{position:"absolute",inset:0,pointerEvents:"none",children:t.jsx(s.Input,{ref:ce=>J(ce),"data-input-otp":!0,"data-input-otp-placeholder-shown":n.length===0||void 0,"data-input-otp-mss":W,"data-input-otp-mse":M,id:K,name:o,type:b==="password"?"password":"text",inputMode:b!=="password"?"numeric":void 0,pattern:"[0-9]*",maxLength:a,readOnly:S,disabled:v,placeholder:d,value:n,onChange:P,onKeyDown:$,onPaste:V,onFocus:L,onBlur:B,onClick:A,onMouseOver:()=>R(!0),onMouseLeave:()=>R(!1),autoComplete:"one-time-code","aria-label":ae?void 0:`OTP input with ${a} digits`,style:Ie,...oe,...m.input})})]})]})]})},sh=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},ch=e=>{const{value:o}=e,{value:r,setValue:n,isFocused:a,setIsFocused:i,isHovered:l,setIsHovered:u,inputRef:c,containerRef:d,mirrorSelectionStart:g,mirrorSelectionEnd:m,setMirrorSelectionStart:h,setMirrorSelectionEnd:f,setInputRef:y,handleChange:k,handleFocus:b,handleBlur:j,handleKeyDown:x,handlePaste:C,handleKeyPress:v}=jl(e),I=sh(o!==void 0?o:r);return t.jsx(vl,{...e,value:I,setValue:n,isFocused:a,setIsFocused:i,isHovered:l,setIsHovered:u,inputRef:c,containerRef:d,mirrorSelectionStart:g,mirrorSelectionEnd:m,setMirrorSelectionStart:h,setMirrorSelectionEnd:f,setInputRef:y,handleChange:k,handleFocus:b,handleBlur:j,handleKeyDown:x,handleKeyPress:v,handlePaste:C,stepValues:e.stepValues})},Tl=ch,ot=(e,o,r)=>Math.min(Math.max(e,o),r),dh=(e,o,r,n,a,i,l)=>{const u=n-r;let c;if(i==="horizontal"){const d=o.width,g=e-o.left;c=ot(g/d,0,1)}else{const d=o.height,g=o.bottom-e;c=ot(g/d,0,1)}if(l&&l.length>0){const d=r+c*u;let g=l[0],m=Math.abs(d-g);for(let h=1;h<l.length;h++){const f=Math.abs(d-l[h]);f<m&&(m=f,g=l[h])}return g}else{const d=r+c*u,g=Math.round(d/a)*a;return ot(g,r,n)}},Il=({min:e=0,max:o=100,step:r=1,value:n,defaultValue:a,onChange:i,onDrag:l,orientation:u="horizontal",isDisabled:c=!1,stepValues:d})=>{const g=ot(n??a??e,e,o),[m,h]=p.useState(g),[f,y]=p.useState(!1),[k,b]=p.useState(!1),j=p.useRef(null),x=p.useRef(null),C=n!==void 0,v=n!==void 0?n:m;p.useEffect(()=>{n!==void 0&&h(ot(n,e,o))},[n,e,o]);const S=p.useCallback(W=>{const M=ot(W,e,o);C||h(M),i&&M!==v&&i(M),f&&l&&l(M)},[C,e,o,i,v,f,l]),I=p.useCallback(W=>{if(c||!j.current)return;const M=j.current;if(typeof M.getBoundingClientRect!="function")return;const z=M.getBoundingClientRect();let H;"touches"in W?H=u==="horizontal"?W.touches[0].clientX:W.touches[0].clientY:H=u==="horizontal"?W.clientX:W.clientY;const V=dh(H,z,e,o,r,u,d);S(V)},[e,o,r,u,S,c,d]),w=p.useCallback(W=>{if(c)return;W.preventDefault(),y(!0),I(W);const M=H=>{I(H)},z=()=>{y(!1),document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",z),document.removeEventListener("touchmove",M),document.removeEventListener("touchend",z)};typeof document>"u"||(document.addEventListener("mousemove",M),document.addEventListener("mouseup",z),document.addEventListener("touchmove",M),document.addEventListener("touchend",z))},[I,c]),T=p.useCallback(W=>{const M=x.current;M&&typeof M.contains=="function"&&M.contains(W.target)||w(W)},[w]),R=p.useCallback(W=>{if(c)return;let M=v;switch(W.key){case"ArrowLeft":case"ArrowDown":M=v-r;break;case"ArrowRight":case"ArrowUp":M=v+r;break;case"Home":M=e;break;case"End":M=o;break;default:return}W.preventDefault(),S(M)},[v,e,o,r,S,c]),E=o-e,F=E===0?0:(v-e)/E*100;return{currentValue:v,isDragging:f,isHovered:k,setIsHovered:b,trackRef:j,thumbRef:x,handleThumbMouseDown:w,handleTrackMouseDown:T,handleKeyDown:R,thumbPositionPercent:F}},Fa={xs:{height:4,width:"100%"},sm:{height:6,width:"100%"},md:{height:8,width:"100%"},lg:{height:10,width:"100%"},xl:{height:12,width:"100%"}},Ma={xs:{width:12,height:12},sm:{width:16,height:16},md:{width:20,height:20},lg:{width:24,height:24},xl:{width:28,height:28}},za={square:0,rounded:4,pill:24},uh=e=>({default:{backgroundColor:"color-gray-200",transition:"background-color 0.15s ease"},outline:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"},transition:"border-color 0.15s ease"}}),Wa=uh(),ph={xs:{trackCrossAxisSize:4,thumbSize:12},sm:{trackCrossAxisSize:6,thumbSize:16},md:{trackCrossAxisSize:8,thumbSize:20},lg:{trackCrossAxisSize:10,thumbSize:24},xl:{trackCrossAxisSize:12,thumbSize:28}},mh={horizontal:{width:"100%",minWidth:"120px",height:"auto",flexDirection:"row",paddingVertical:8},vertical:{height:"100%",minHeight:"120px",width:"auto",flexDirection:"column-reverse",paddingHorizontal:8}},gh=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),ft=(e,o)=>gh(o)?{style:{[e]:o}}:{[e]:o},Rl=p.memo(({min:e=0,max:o=100,step:r=1,currentValue:n,stepValues:a,shape:i="rounded",size:l="md",variant:u="default",orientation:c="horizontal",isDisabled:d=!1,showValue:g=!1,showTooltip:m=!1,backgroundColor:h="theme-primary",label:f,helperText:y,themeMode:k,shadow:b={},isDragging:j,isHovered:x,setIsHovered:C,trackRef:v,thumbRef:S,handleThumbMouseDown:I,handleTrackMouseDown:w,handleKeyDown:T,thumbPositionPercent:R,ariaLabel:E="Slider",views:F={container:{},track:{},progress:{},filledTrack:{},thumb:{},label:{},valueLabel:{},stepMarks:{},tooltip:{}},onChange:W,onDrag:M,value:z,defaultValue:H,...V})=>{var A,_;const P=h,L="theme-disabled",B=Wa[u].backgroundColor,$=d?L:P,q=c==="vertical",{trackCrossAxisSize:Y,thumbSize:O}=ph[l]||{trackCrossAxisSize:Fa[l].height,thumbSize:Ma[l].width||16},J=t.jsxs(s.Vertical,{width:"100%",gap:8,...F.container,...V,children:[f&&t.jsxs(s.Horizontal,{justifyContent:"space-between",alignItems:"center",children:[t.jsx(s.Text,{fontSize:14,fontWeight:500,...F.label,children:f}),g&&t.jsx(s.Text,{fontSize:14,color:"color-gray-500",...F.valueLabel,children:n})]}),t.jsxs(s.View,{ref:v,position:"relative",cursor:d?"not-allowed":"pointer",opacity:d?.6:1,onMouseDown:w,onMouseEnter:()=>C(!0),onMouseLeave:()=>C(!1),...Fa[l],borderRadius:za[i],backgroundColor:B,...Wa[u],...b,...F.track,children:[a&&a.length>0&&t.jsx(t.Fragment,{children:a.map(G=>{const N=(G-e)/(o-e)*100;return t.jsx(s.View,{position:"absolute",top:"50%",left:`${N}%`,transform:"translate(-50%, -50%)",width:4,height:4,borderRadius:"50%",zIndex:1,...ft("backgroundColor",$),...F.stepMarks},G)})}),t.jsx(s.View,{position:"absolute",top:0,left:0,height:"100%",width:`${R}%`,borderRadius:za[i],transition:"width 0.1s ease-in-out",...ft("backgroundColor",$),...F.progress,...F.filledTrack}),t.jsx(s.View,{ref:S,role:"slider",tabIndex:d?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":c,"aria-disabled":d,"aria-label":E,position:"absolute",top:"50%",left:`${R}%`,borderRadius:"50%",backgroundColor:"color-white",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",borderWidth:2,borderStyle:"solid",transition:j?"none":"transform 0.1s ease-in-out",...ft("borderColor",$),transform:x?"translate(-50%, -50%) scale(1.1)":"translate(-50%, -50%)",zIndex:2,onMouseDown:I,onTouchStart:I,onKeyDown:T,...Ma[l],...F.thumb,children:m&&(x||j)&&t.jsx(s.View,{position:"absolute",bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:8,padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:4,fontSize:12,whiteSpace:"nowrap",zIndex:3,...F.tooltip,children:t.jsx(s.Text,{...(A=F.tooltip)==null?void 0:A.text,children:n==null?void 0:n.toFixed(r<1?1:0)})})})]}),y&&t.jsx(sn,{children:y})]}),D=t.jsxs(s.Center,{...mh[c],position:"relative",onMouseEnter:()=>!d&&C(!0),onMouseLeave:()=>!d&&C(!1),...V,...F==null?void 0:F.container,children:[f&&t.jsxs(s.Horizontal,{justifyContent:"space-between",alignItems:"center",marginBottom:8,width:"100%",children:[t.jsx(s.Text,{fontSize:14,fontWeight:500,...F.label,children:f}),g&&t.jsx(s.Text,{fontSize:14,color:"color-gray-500",...F.valueLabel,children:n})]}),t.jsxs(s.View,{ref:v,position:"relative",borderRadius:Y/2,backgroundColor:d?L:B,cursor:d?"not-allowed":"pointer",width:q?`${Y}px`:"100%",height:q?"100%":`${Y}px`,onMouseDown:w,onTouchStart:w,...F==null?void 0:F.track,children:[a&&a.length>0&&t.jsx(t.Fragment,{children:a.map(G=>{const N=(G-e)/(o-e)*100;return t.jsx(s.View,{position:"absolute",width:4,height:4,borderRadius:"50%",backgroundColor:$,zIndex:1,...q?{bottom:`${N}%`,left:"50%",transform:"translate(-50%, 50%)"}:{left:`${N}%`,top:"50%",transform:"translate(-50%, -50%)"},...F.stepMarks},G)})}),t.jsx(s.View,{position:"absolute",borderRadius:Y/2,...q?{bottom:0,left:0,width:"100%",height:`${R}%`}:{top:0,left:0,height:"100%",width:`${R}%`},...ft("backgroundColor",$),...F==null?void 0:F.filledTrack,...F==null?void 0:F.progress}),t.jsx(s.View,{ref:S,role:"slider",tabIndex:d?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":c,"aria-disabled":d,"aria-label":E,position:"absolute",width:`${O}px`,height:`${O}px`,borderRadius:"50%",borderWidth:2,borderStyle:"solid",borderColor:"color-white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.2)",cursor:d?"not-allowed":"grab",transform:q?"translateX(-50%)":"translateY(-50%)",zIndex:2,transition:j?"none":"left 0.1s, bottom 0.1s",...ft("backgroundColor",$),...q?{left:"50%",bottom:`${R}%`}:{top:"50%",left:`${R}%`},onMouseDown:I,onTouchStart:I,onKeyDown:T,...F==null?void 0:F.thumb,children:m&&(x||j)&&t.jsx(s.View,{position:"absolute",padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:"4px",whiteSpace:"nowrap",zIndex:3,...q?{left:"100%",marginLeft:"8px",bottom:"0",transform:"translateY(50%)"}:{bottom:"100%",left:"50%",marginBottom:"8px",transform:"translateX(-50%)"},...F==null?void 0:F.tooltip,children:t.jsx(s.Text,{...(_=F==null?void 0:F.tooltip)==null?void 0:_.text,children:n==null?void 0:n.toFixed(r<1?1:0)})})})]}),y&&t.jsx(sn,{marginTop:8,children:y})]});return q||m?D:J}),hh=e=>{const o=ve("slider",e),r=Il(o);return t.jsx(Rl,{...o,...r})},Fl=hh,fh=({url:e,type:o,name:r,onOpen:n})=>{const a=o.toLowerCase(),i=a.startsWith("image"),l=a.startsWith("video"),u=a.startsWith("audio"),c=()=>{n&&n()};return t.jsxs(s.View,{width:"60px",height:"60px",flexShrink:0,borderRadius:"4px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-gray-200",cursor:"pointer",onClick:c,children:[i&&t.jsx(s.Image,{src:e,alt:r,width:"100%",height:"100%",objectFit:"cover"}),l&&t.jsx(s.View,{as:"video",src:e,controls:!0,width:"100%",height:"100%",style:{objectFit:"cover"},onClick:d=>d.stopPropagation()}),u&&t.jsx(s.View,{as:"audio",controls:!0,src:e,width:"100%",onClick:d=>d.stopPropagation()}),!i&&!l&&!u&&t.jsx(Mo,{widthHeight:24,color:"color-gray-600"})]})},Ml=({behavior:e,keyboardVerticalOffset:o,dismissOnTap:r,enabled:n,children:a,...i})=>t.jsx(s.View,{flex:1,width:"100%",...i,children:a}),yh=({header:e,footer:o,children:r,isLoading:n=!1,safe:a=!0,scrollable:i=!0,dismissKeyboardOnTap:l=!0,keyboardVerticalOffset:u=0,views:c={},backgroundColor:d="color-white",...g})=>{const m=a?s.SafeArea:s.View,h=s.isBrowser()?{}:{keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:!1,contentContainerStyle:{flexGrow:1}},f=n?t.jsx(s.Center,{flex:1,width:"100%",...c.content,children:t.jsx(ho,{})}):i?t.jsx(s.Scroll,{flex:1,width:"100%",...h,...c.content,children:r}):t.jsx(s.View,{flex:1,width:"100%",...c.content,children:r});return t.jsxs(m,{flex:1,height:"100%",width:"100%",flexDirection:"column",backgroundColor:d,...g,...c.container,children:[e!=null&&t.jsx(s.View,{width:"100%",flexShrink:0,...c.header,children:e}),t.jsxs(Ml,{flexDirection:"column",dismissOnTap:l,keyboardVerticalOffset:u,children:[f,o!=null&&t.jsx(s.View,{width:"100%",flexShrink:0,...c.footer,children:o})]})]})},xh=(e=null,o=[])=>{const[r,n]=p.useState(e),[a,i]=p.useState(o),l=p.useRef({});return{activeItemId:r,setActiveItemId:n,expandedItemIds:a,toggleExpandedItem:d=>{i(g=>g.includes(d)?g.filter(h=>h!==d):[...g,d])},isItemExpanded:d=>a.includes(d),triggerRefs:l}},dn={sm:{padding:"8px 12px",fontSize:"12px",fontWeight:"500",media:{mobile:{padding:"6px 10px",fontSize:"11px"}}},md:{padding:"10px 14px",fontSize:"14px",fontWeight:"500",media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},lg:{padding:"12px 16px",fontSize:"14px",fontWeight:"600",media:{mobile:{padding:"10px 14px",fontSize:"12px"}}}},un={default:{color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},outline:{borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",style:{backgroundColor:"transparent"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"}},zl={horizontal:{flexDirection:"row",gap:"8px",media:{mobile:{flexDirection:"column",gap:"4px"}}},vertical:{flexDirection:"column",gap:"4px"}},Qo={active:{backgroundColor:"color-blue-50",color:"color-blue-700",fontWeight:"600",borderLeft:"3px solid",borderColor:"color-blue-600"},hover:{backgroundColor:"color-gray-100",transition:"background-color 0.2s ease"}},Wl=p.createContext({activeItemId:null,setActiveItemId:()=>{},expandedItemIds:[],toggleExpandedItem:()=>{},isItemExpanded:()=>!1,orientation:"vertical",size:"md",variant:"default",triggerRefs:{current:{}}}),bh=({children:e,value:o})=>t.jsx(Wl.Provider,{value:o,children:e}),Bt=()=>{const e=p.useContext(Wl);if(!e)throw new Error("useNavigationMenuContext must be used within a NavigationMenuProvider");return e},Kn=({children:e,views:o})=>{const{orientation:r}=Bt(),n=r==="horizontal"?s.Horizontal:s.Vertical;return t.jsx(n,{width:"100%",...zl[r],transition:"background-color 0.2s ease, border-color 0.2s ease",borderRadius:"8px",...o==null?void 0:o.container,children:e})},El=p.createContext({itemValue:null,isDisabled:!1}),kh=()=>{const e=p.useContext(El);if(!e)throw new Error("useNavigationMenuItemContext must be used within a NavigationMenuItem");return e},Xn=({item:e,value:o,isDisabled:r=!1,children:n,views:a})=>{var j;const{activeItemId:i,setActiveItemId:l,orientation:u,size:c,variant:d,onItemActivate:g}=Bt(),m=(e==null?void 0:e.id)||o,h=i===m,f=(e==null?void 0:e.items)&&e.items.length>0,y=(e==null?void 0:e.disabled)||r,k=()=>{y||m&&(l(m),g&&g(m))},b=u==="horizontal"?s.Horizontal:s.Vertical;return n?t.jsx(El.Provider,{value:{itemValue:m||null,isDisabled:y},children:t.jsx(s.View,{width:"100%",cursor:y?"not-allowed":"pointer",opacity:y?.6:1,borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",...dn[c],...un[d],...h?Qo.active:{},_hover:y?{}:Qo.hover,...a==null?void 0:a.item,children:n})}):f&&e?t.jsxs(b,{width:"100%",flexDirection:"column",position:"relative",...a==null?void 0:a.item,children:[t.jsxs(Al,{itemId:e.id,disabled:e.disabled,views:a,children:[e.icon&&t.jsx(s.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}),t.jsx(Hl,{itemId:e.id,children:t.jsx(Kn,{children:(j=e.items)==null?void 0:j.map(x=>t.jsx(Xn,{item:x},x.id))})})]}):e?t.jsxs(s.View,{as:e.href?"a":"div",href:e.href,onClick:k,cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.6:1,width:"100%",display:"flex",alignItems:"center",borderRadius:"8px",transition:"background-color 0.2s ease, color 0.2s ease, opacity 0.2s ease",gap:"8px",...dn[c],...un[d],...h?Qo.active:{},_hover:e.disabled?{}:Qo.hover,...a==null?void 0:a.item,children:[e.icon&&t.jsx(s.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}):null},Al=({children:e,itemId:o,disabled:r,views:n})=>{const{activeItemId:a,toggleExpandedItem:i,isItemExpanded:l,size:u,variant:c,triggerRefs:d}=Bt(),g=p.useRef(null),m=a===o,h=l(o);p.useEffect(()=>(g.current&&o&&(d.current[o]=g.current),()=>{o&&delete d.current[o]}),[o,d]);const f=y=>{y.preventDefault(),!r&&i(o)};return t.jsxs(s.View,{ref:g,onClick:f,cursor:r?"not-allowed":"pointer",opacity:r?.5:1,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:8,transition:"background-color 0.2s ease",...dn[u],...un[c],...m?Qo.active:{},_hover:r?{}:Qo.hover,...n==null?void 0:n.trigger,children:[t.jsx(s.View,{display:"flex",alignItems:"center",children:e}),t.jsx(s.View,{transition:"transform 0.2s ease",transform:h?"rotate(180deg)":"rotate(0deg)",...n==null?void 0:n.indicator,children:t.jsx(je,{orientation:"down",widthHeight:16,color:"currentColor",filled:!0})})]})},Hl=({children:e,itemId:o,views:r})=>{const{isItemExpanded:n,orientation:a,triggerRefs:i}=Bt(),l=p.useRef(null),[u,c]=p.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),d=n(o);if(p.useEffect(()=>{if(d&&l.current&&o&&i.current[o]&&a==="horizontal"){const m=l.current.getBoundingClientRect(),h=i.current[o].getBoundingClientRect(),f=Math.max(m.width||200,200),y=Math.max(m.height||150,150),k=window.innerWidth,b=window.innerHeight,j={top:h.top,right:k-h.right,bottom:b-h.bottom,left:h.left},x=a==="horizontal"?[{placement:"bottom",space:j.bottom,fits:j.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:j.top,fits:j.top>=y+8,x:h.left,y:h.top-y-8},{placement:"right",space:j.right,fits:j.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:j.left,fits:j.left>=f+8,x:h.left-f-8,y:h.top}]:[{placement:"right",space:j.right,fits:j.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:j.left,fits:j.left>=f+8,x:h.left-f-8,y:h.top},{placement:"bottom",space:j.bottom,fits:j.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:j.top,fits:j.top>=y+8,x:h.left,y:h.top-y-8}],C=x.find(w=>w.fits);if(C){c({x:C.x,y:C.y,placement:C.placement});return}const v=x.reduce((w,T)=>T.space>w.space?T:w);let S=v.x,I=v.y;S+f>k&&(S=k-f-8),S<8&&(S=8),I+y>b&&(I=b-y-8),I<8&&(I=8),c({x:S,y:I,placement:v.placement})}},[d,a,o,i]),!d)return null;if(a==="vertical")return t.jsx(s.View,{paddingLeft:16,width:"100%",position:"relative",backgroundColor:"transparent",...r==null?void 0:r.container,children:e});const g={position:"fixed",left:u.x,top:u.y,zIndex:1e3};return t.jsx(s.View,{ref:l,role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:g,...r==null?void 0:r.container,children:e})},Ch=({href:e,children:o,views:r,underline:n,isExternal:a,iconSize:i,...l})=>{const{itemValue:u,isDisabled:c}=kh(),{activeItemId:d,setActiveItemId:g,onItemActivate:m}=Bt(),h=d===u,f=y=>{if(c){y.preventDefault();return}u&&(g(u),m&&m(u)),l.onClick&&l.onClick(y)};return t.jsx(s.View,{as:"a",href:c?void 0:e,onClick:f,cursor:c?"not-allowed":"pointer",opacity:c?.5:1,width:"100%",display:"flex",alignItems:"center","aria-current":h?"page":void 0,"aria-disabled":c,"data-active":h?"":void 0,"data-disabled":c?"":void 0,...h?{fontWeight:"bold"}:{},...r==null?void 0:r.container,...l,children:o})},Sh=({items:e,orientation:o,views:r,themeMode:n})=>{const a=o==="horizontal"?s.Horizontal:s.Vertical;return!e||e.length===0?null:t.jsx(a,{width:"100%",...zl[o],...r==null?void 0:r.container,children:t.jsx(Kn,{views:r,children:e.map(i=>t.jsx(Xn,{item:i,views:r},i.id))})})},wh=e=>{const o=ve("navigation",e),{items:r,children:n,orientation:a="vertical",size:i="md",variant:l="default",defaultActiveItemId:u=null,defaultExpandedItemIds:c=[],onItemActivate:d,views:g,...m}=o,{activeItemId:h,setActiveItemId:f,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:b,triggerRefs:j}=xh(u,c);return t.jsx(bh,{value:{activeItemId:h,setActiveItemId:f,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:b,orientation:a,size:i,variant:l,onItemActivate:d,triggerRefs:j},children:r?t.jsx(Sh,{items:r,orientation:a,size:i,variant:l,views:g,...m}):n})},Eo=wh;Eo.List=Kn;Eo.Item=Xn;Eo.Trigger=Al;Eo.Content=Hl;Eo.Link=Ch;const Vl={},Pl=p.createContext({views:Vl,onRowClick:()=>{}}),jh=({children:e,views:o=Vl,onRowClick:r})=>t.jsx(Pl.Provider,{value:{views:o,onRowClick:r},children:e}),wo=()=>p.useContext(Pl),ze={table:{width:"100%",color:"inherit",borderRadius:"8px",overflow:"hidden",boxShadow:"0px 1px 3px rgba(0, 0, 0, 0.06), 0px 1px 2px rgba(0, 0, 0, 0.04)",border:"1px solid",borderColor:"color-gray-200",transition:"box-shadow 0.2s ease",media:{mobile:{overflowX:"auto",display:"block",borderRadius:"4px"}}},thead:{backgroundColor:"color-gray-50",borderBottom:"1px solid",borderColor:"color-gray-200"},th:{padding:"12px 16px",fontWeight:"600",fontSize:"14px",color:"inherit",opacity:.72,textAlign:"left",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},td:{padding:"12px 16px",fontSize:"14px",borderBottom:"1px solid",borderColor:"color-gray-100",color:"inherit",flex:1,media:{mobile:{padding:"8px 12px",fontSize:"12px"}}},tr:{flexDirection:"row",alignItems:"stretch",width:"100%",transition:"background-color 0.15s ease",_hover:{backgroundColor:"color-gray-50"},_focus:{outline:"none",backgroundColor:"color-gray-100"}},tfoot:{backgroundColor:"color-gray-50",fontWeight:"600",borderTop:"2px solid",borderColor:"color-gray-200"},caption:{margin:"8px 0",color:"inherit",opacity:.62,fontSize:"14px",fontStyle:"italic",media:{mobile:{fontSize:"12px"}}}};({...ze.th},{...ze.td});({...ze.tr});({...ze.td},{...ze.th});({...ze.table},{...ze.th}),{...ze.td},{...ze.tr},{...ze.tfoot},{...ze.caption};const Dl=({children:e})=>t.jsx(s.View,{width:"100%",style:{overflowX:"auto"},children:e}),$l=e=>{const{views:o}=wo();return t.jsx(s.Element,{as:"table",...ze.table,...o==null?void 0:o.table,...e,style:{borderCollapse:"collapse",...e.style||{}}})},Ll=e=>{const{views:o}=wo();return t.jsx(s.Element,{as:"thead",textAlign:"left",...ze.thead,...o==null?void 0:o.thead,...e})},Bl=e=>{const{views:o}=wo();return t.jsx(s.Element,{as:"th",whiteSpace:"nowrap",...ze.th,...o==null?void 0:o.th,...e})},nr=e=>{const{views:o,onRowClick:r}=wo();return t.jsx(s.Element,{as:"tr",...ze.tr,...o==null?void 0:o.tr,onClick:r,...e})},pn=({isFirstColumn:e,...o})=>{const{views:r}=wo();return t.jsx(s.Element,{as:"td",whiteSpace:"nowrap",fontWeight:e?"500":"400",...ze.td,...r==null?void 0:r.td,...o})},_l=e=>{const{views:o}=wo();return t.jsx(s.Element,{as:"tbody",...ze.tbody,...o==null?void 0:o.tbody,...e})},Ol=e=>{const{views:o}=wo();return t.jsx(s.Element,{as:"tfoot",...ze.tfoot,...o==null?void 0:o.tfoot,...e})},Nl=e=>{const{views:o}=wo();return t.jsx(s.Element,{as:"caption",...ze.caption,...o==null?void 0:o.caption,...e})},vh=({data:e,columns:o,footer:r,caption:n,themeMode:a})=>{const i=Math.max(o.length*140,320);return t.jsx(Dl,{children:t.jsxs($l,{role:"Table",minWidth:i,children:[n&&t.jsx(Nl,{children:n}),t.jsx(Ll,{children:t.jsx(nr,{children:o.map(l=>t.jsx(Bl,{children:l.title},l.field))})}),t.jsx(_l,{children:e.map((l,u)=>t.jsx(nr,{children:o.map((c,d)=>t.jsx(pn,{isFirstColumn:d===0,children:l[c.field]},c.field))},u))}),r&&t.jsx(Ol,{children:t.jsx(nr,{children:r.map((l,u)=>t.jsx(pn,{...l.props,children:l.value},u))})})]})})},Fe=({children:e,views:o,onClick:r})=>{const n=ve("table",{views:o,onClick:r});return t.jsx(jh,{views:n.views,onRowClick:n.onClick,children:e})};Fe.Head=Ll;Fe.HeadCell=Bl;Fe.Body=_l;Fe.Row=nr;Fe.Cell=pn;Fe.Footer=Ol;Fe.Caption=Nl;Fe.Container=$l;Fe.Template=vh;const Th=(e,o,r)=>{const n=d=>d.value!==void 0?d.value:d.title,a=()=>{if(!(!e||e.length===0)){if(o!==void 0){const d=e.find(g=>n(g)===o);if(d)return d}return e[0]}},[i,l]=p.useState(a()),u=r!==void 0?e.find(d=>n(d)===r):i,c=d=>{r===void 0&&l(d)};return p.useEffect(()=>{if(r!==void 0)return;const d=a(),g=i&&e.some(m=>n(m)===n(i));d&&(!g||o!==void 0&&i&&n(i)!==o)?l(d):!d&&i&&l(void 0)},[e,o]),{activeTab:u,setActiveTab:c}},Ih=(e,o,r)=>{const[n,a]=p.useState(e||null);return{activeValue:o!==void 0?o:n,setActiveValue:u=>{o===void 0&&a(u),r&&r(u)}}},Rh=p.memo(({tab:e,isActive:o,onClick:r,iconPosition:n="left",tabStyles:a,textStyles:i})=>{const l=()=>{switch(n){case"top":return"column";case"bottom":return"column-reverse";case"right":return"row-reverse";case"left":default:return"row"}},u=()=>["top","bottom"].includes(n)?"4px":"8px",c=e.icon&&p.isValidElement(e.icon)?p.cloneElement(e.icon,{strokeWidth:o?2.5:2}):e.icon;return t.jsxs(s.Element,{as:"div",role:"tab","aria-selected":o,tabIndex:o?0:-1,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...a,flexDirection:l(),gap:u(),onClick:r,"data-state":o?"active":"inactive",children:[c&&t.jsx(s.Element,{children:c},o?"active-icon":"inactive-icon"),t.jsxs(s.Element,{display:"grid",alignItems:"center",justifyContent:"center",children:[t.jsx(s.Text,{...i,fontWeight:"600",visibility:"hidden",gridColumn:"1",gridRow:"1","aria-hidden":"true",children:e.title}),t.jsx(s.Text,{...i,fontWeight:o?"600":"500",gridColumn:"1",gridRow:"1",children:e.title})]})]})}),Jn=(e,o)=>{const r=o==="dark";return e==="segmented"?{header:{width:"fit-content",alignSelf:"flex-start",gap:6,padding:6,borderRadius:16,backgroundColor:"color-gray-100"},tab:{minHeight:44,padding:"0 22px",borderRadius:12,color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-100",style:{backgroundColor:"transparent"}},activeTab:{backgroundColor:"color-white",color:"color-gray-900",boxShadow:r?"0 1px 3px rgba(0, 0, 0, 0.35)":"0 1px 2px rgba(0, 0, 0, 0.06)"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em"},activeText:{},content:{width:"100%"}}:e==="pill"?{header:{width:"100%",flexWrap:"wrap",gap:12},tab:{minHeight:44,padding:"0 22px",borderRadius:"999px",backgroundColor:"color-white",color:"color-gray-600",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200"},activeTab:{backgroundColor:"theme-primary",color:"color-white",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%"}}:{header:{width:"100%",gap:20,borderBottom:"none"},tab:{minHeight:44,padding:"0 4px",borderRadius:0,color:"color-gray-500",borderBottom:"3px solid",borderColor:"color-white",style:{backgroundColor:"transparent"}},activeTab:{color:"theme-primary",borderColor:"theme-primary"},text:{fontSize:14,lineHeight:"20px",letterSpacing:"-0.01em",color:"inherit"},activeText:{color:"inherit"},content:{width:"100%",paddingTop:12}}},Fh=({tabs:e=[],activeTab:o,handleTabClick:r,views:n={},renderTab:a,renderContent:i,variant:l="underline",iconPosition:u="left",keepMounted:c=!1})=>{const{themeMode:d}=s.useTheme(),g=Jn(l,d);return o?t.jsxs(s.Vertical,{width:"100%",height:"100%",...n.container,children:[t.jsx(s.Horizontal,{alignItems:"center",...g.header,...n.headerTabs,children:e.map(m=>{const h=(m.value!==void 0?m.value:m.title)===(o.value!==void 0?o.value:o.title),f=()=>r(m);return a?a(m,h,f):t.jsx(Rh,{tab:m,isActive:h,onClick:f,iconPosition:u,tabStyles:{...g.tab,...n.tab,...h?g.activeTab:{},...h?n.activeTab:{}},textStyles:{...g.text,...n.title,...h?g.activeText:{},...h?n.activeText:{}}},m.title)})}),t.jsx(s.View,{height:"100%",...g.content,...n.content,children:i?i(o):c?e.map(m=>{const h=m.value!==void 0?m.value:m.title,f=o.value!==void 0?o.value:o.title;return t.jsx(s.View,{display:h===f?"contents":"none",children:m.content},m.title)}):o.content})]}):null},ql=p.createContext(null),Qn=()=>{const e=p.useContext(ql);if(!e)throw new Error("useTabsContext must be used within a Tabs component");return e},Mh=p.memo(({children:e,views:o})=>{var u;const{themeMode:r}=s.useTheme(),{variant:n="underline"}=Qn(),a=Jn(n,r),i=ct("tabs"),l=no({container:(u=i.views)==null?void 0:u.headerTabs},o);return t.jsx(s.Horizontal,{alignItems:"center",...a.header,...l==null?void 0:l.container,children:e})}),zh=p.memo(({value:e,children:o,disabled:r=!1,views:n})=>{var f,y;const{themeMode:a}=s.useTheme(),{activeValue:i,setActiveValue:l,variant:u="underline"}=Qn(),c=i===e,d=Jn(u,a),g=ct("tabs"),m=no({trigger:(f=g.views)==null?void 0:f.tab,activeState:(y=g.views)==null?void 0:y.activeTab},n),h=p.useCallback(()=>{r||l(e)},[r,e,l]);return t.jsx(s.View,{cursor:r?"not-allowed":"pointer",opacity:r?.6:1,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",...d.tab,...c?d.activeTab:{},_hover:r?{}:u==="underline"?{color:"theme-primary"}:{opacity:.9},onClick:h,...m==null?void 0:m.trigger,...c?m==null?void 0:m.activeState:{},children:t.jsx(s.View,{...d.text,...c?d.activeText:{},children:o})})}),Wh=p.memo(({value:e,children:o,views:r})=>{const{activeValue:n}=Qn();return n!==e?null:t.jsx(s.View,{width:"100%",padding:"24px",...r==null?void 0:r.content,children:o})}),Eh=e=>{const o=ve("tabs",e),{tabs:r,views:n,defaultValue:a,onTabChange:i,renderTab:l,renderContent:u,variant:c="underline",iconPosition:d="left",keepMounted:g=!1,value:m,onValueChange:h,children:f}=o,y=Ih(a,m,h),k=Th(r||[],a,m);if(f)return t.jsx(ql.Provider,{value:{...y,variant:c},children:f});if(r){const b=j=>{const x=C=>C.value!==void 0?C.value:C.title;(!k.activeTab||x(k.activeTab)!==x(j))&&(k.setActiveTab(j),i&&i(j))};return t.jsx(Fh,{tabs:r,views:n,activeTab:k.activeTab,handleTabClick:b,renderTab:l,renderContent:u,variant:c,iconPosition:d,keepMounted:g})}return null},Ah=p.memo(Eh),at=Ah;at.List=Mh;at.Trigger=zh;at.Content=Wh;const Hh=e=>{const{children:o,_isInView:r=!1,alternateHighlightText:n=[],alternateAnimation:a=!1,alternateDuration:i=3e3,highlightText:l,highlightTypewriter:u=!1,highlightSlide:c=!1,highlightSlideDuration:d=500,highlightSlideStagger:g=50,highlightSlideSequential:m=!0}=e,[h,f]=p.useState(o),[y,k]=p.useState(l);return p.useEffect(()=>{if(process.env.NODE_ENV==="production"||typeof o!="string"||!l)return;const b=Array.isArray(l)?l:[l];for(const j of b)typeof j=="string"&&j.length>0&&!o.toLowerCase().includes(j.toLowerCase())&&console.warn(`[Title] highlightText "${j}" is not a substring of \`children\`, so nothing will be highlighted. \`children\` must be the complete sentence including the highlight, e.g. \`<Title highlightText="apps">Build apps fast</Title>\`.`)},[o,l]),p.useEffect(()=>{if(!a||n.length===0||!r||typeof o!="string"||typeof l!="string")return process.env.NODE_ENV!=="production"&&a&&n.length>0&&(typeof o!="string"||typeof l!="string")&&console.warn("[Title] alternateHighlightText requires `children` to be the full sentence as a string and `highlightText` to be the placeholder word inside it. Rotation is disabled."),f(o),k(l),()=>{};const b=o,j=l;if(!b.toLowerCase().includes(j.toLowerCase()))return process.env.NODE_ENV!=="production"&&console.warn(`[Title] \`children\` must contain \`highlightText\` ("${j}") — it is the placeholder the rotating words replace, e.g. \`<Title highlightText="apps" alternateHighlightText={["apps", "sites"]}>Build apps fast</Title>\`. Rotation is disabled.`),f(o),k(l),()=>{};let x=0;const C=S=>{const I=n[S],w=j.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),T=new RegExp(w,"gi"),R=b.replace(T,I);f(R),k(I)};C(x);const v=setInterval(()=>{x=(x+1)%n.length,C(x)},i);return()=>clearInterval(v)},[a,n,i,l,o,r]),{finalDisplayedText:h,activeHighlightTarget:y,highlightTypewriter:u,highlightSlide:c,highlightSlideDuration:d,highlightSlideStagger:g,highlightSlideSequential:m}},Vh={xs:24,sm:32,md:48,lg:96,xl:110},Ph={xl:{media:{mobile:{fontSize:48},tablet:{fontSize:96},desktop:{fontSize:110}}},lg:{media:{mobile:{fontSize:48},tablet:{fontSize:48},desktop:{fontSize:70}}},md:{media:{mobile:{fontSize:32},tablet:{fontSize:40},desktop:{fontSize:56}}},sm:{media:{mobile:{fontSize:20},tablet:{fontSize:24},desktop:{fontSize:32}}},xs:{media:{mobile:{fontSize:14},tablet:{fontSize:18},desktop:{fontSize:20}}}},Dh={underline:e=>({textDecoration:"underline",textDecorationColor:e,textDecorationThickness:"4px",textUnderlineOffset:"4px"}),background:e=>({backgroundColor:e,color:"color-white",padding:"0 8px",borderRadius:"4px"}),gradient:(e,o)=>({background:`linear-gradient(135deg, ${e}, ${o||e})`,backgroundClip:"text",WebkitBackgroundClip:"text !important",WebkitTextFillColor:"transparent",color:"transparent",display:"inline-block",textShadow:"none"}),outline:e=>({WebkitTextStroke:`1px ${e}`,WebkitTextFillColor:"transparent !important",color:"transparent",textShadow:"none"}),glow:e=>({color:e,textShadow:`0 0 10px ${e}80, 0 0 20px ${e}40, 0 0 30px ${e}20`}),solid:e=>({color:e}),default:()=>({})},$h=({text:e,typingSpeed:o=50,pauseTime:r=500,onComplete:n,showCursor:a=!0,cursorColor:i="currentColor",textStyle:l,textComponent:u,as:c,...d})=>{const g=u||s.Text,m=Array.isArray(e)?e:[e],[h,f]=p.useState(m.map(()=>"")),[y,k]=p.useState(!1),[b,j]=p.useState(0),[x,C]=p.useState(0);p.useEffect(()=>{f(m.map(()=>"")),k(!1),j(0),C(0)},[e]),p.useEffect(()=>{if(y){n&&n();return}const S=m[b];if(x>=S.length){if(b>=m.length-1){k(!0);return}const w=setTimeout(()=>{j(T=>T+1),C(0)},r);return()=>clearTimeout(w)}const I=setTimeout(()=>{f(w=>{const T=[...w];return T[b]=S.substring(0,x+1),T}),C(w=>w+1)},o);return()=>clearTimeout(I)},[m,b,x,y,n,r,o]);const v=S=>{if(!S||typeof S!="string")return S;const I=S.split("|");return I.length===1?S:I.map((w,T)=>t.jsxs(p.Fragment,{children:[w,T<I.length-1&&t.jsx("br",{})]},T))};return t.jsx(t.Fragment,{children:h.map((S,I)=>t.jsxs(p.Fragment,{children:[v(S),a&&I===b&&!y&&t.jsx(g,{as:"span",display:"inline-block",width:"0.1em",height:"1em",backgroundColor:i,animation:"blink 1s step-end infinite",verticalAlign:"text-bottom",marginLeft:"1px",...l})]},I))})},Lh=({text:e,duration:o=500,direction:r="up",stagger:n=50,sequential:a=!1,textStyle:i,as:l,wordProps:u,textComponent:c,...d})=>{const[g,m]=p.useState(e),[h,f]=p.useState("entering"),[y,k]=p.useState(0),b=c||s.Text,j=p.useRef(null),x=p.useRef(null);p.useEffect(()=>{e===g&&h==="visible"||e!==g&&(h==="entering"||h==="visible"?(j.current=e,f("exiting")):h==="exiting"&&(j.current=e))},[e,g,h]);const{lines:C,totalWordCount:v}=p.useMemo(()=>{const V=g.split("|").map(L=>L.trim().split(/\s+/).filter(B=>B.length>0)),P=V.reduce((L,B)=>L+B.length,0);return{lines:V,totalWordCount:P}},[g]),S=p.useMemo(()=>a?v*(o+n):(v-1)*n+o,[v,o,n,a]),I=p.useMemo(()=>a?v*(o+n):(v-1)*n+o,[v,o,n,a]);p.useEffect(()=>(x.current&&clearTimeout(x.current),h==="entering"?x.current=setTimeout(()=>{f("visible")},S+50):h==="exiting"&&(x.current=setTimeout(()=>{j.current!==null&&(m(j.current),j.current=null),k(H=>H+1),f("entering")},I+50)),()=>{x.current&&clearTimeout(x.current)}),[h,S,I]);const{style:w,...T}=u||{},R=r==="up",E=H=>a?H*(o+n):H*n,F=p.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"bottom",whiteSpace:"nowrap",...i}),[i]),W=p.useMemo(()=>({display:"inline-flex",flexDirection:"column",alignItems:"center"}),[]),M=p.useMemo(()=>({display:"block",whiteSpace:"nowrap"}),[]);let z=0;return t.jsx(s.Element,{as:"span",style:F,...d,children:t.jsx("span",{style:W,children:C.map((H,V)=>t.jsx("span",{style:M,children:H.map((P,L)=>{const B=z++,$=E(B),q=L===H.length-1;let Y;const O=`${o}ms`,J=`${$}ms`;h==="entering"?Y=R?s.Animation.slideInUp({duration:O,delay:J,timingFunction:"ease-out",fillMode:"both"}):s.Animation.slideInDown({duration:O,delay:J,timingFunction:"ease-out",fillMode:"both"}):h==="exiting"&&(Y=R?{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-100%)",opacity:0},duration:O,delay:J,timingFunction:"ease-in",fillMode:"both"}:{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(100%)",opacity:0},duration:O,delay:J,timingFunction:"ease-in",fillMode:"both"});const D={...w,display:"inline-block",marginRight:q?0:"0.25em",transform:h==="visible"?"translateY(0)":void 0,opacity:h==="visible"?1:void 0};return t.jsx(b,{as:"span",animate:Y,...T,...D,children:P},`${y}-${V}-${L}`)})},`line-${V}`))})})};function Ea(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const Or=e=>{if(!e||typeof e!="string")return e;const o=e.split("|");return o.length===1?e:o.map((r,n)=>t.jsxs(p.Fragment,{children:[r,n<o.length-1&&t.jsx("br",{})]},n))},Bh=({children:e,highlightText:o,highlightStyle:r="solid",highlightColor:n="theme-primary",highlightSecondaryColor:a,size:i="lg",views:l,highlightAnimate:u,animate:c,animationLoop:d=1,highlightAnimationLoop:g=1,highlightTypewriter:m=!1,highlightTypewriterDuration:h=3e3,highlightSlide:f=!1,highlightSlideDuration:y=500,highlightSlideStagger:k=50,highlightSlideSequential:b=!0,centered:j=!1,level:x=1,themeMode:C,responsive:v,alternateHighlightText:S,alternateAnimation:I,alternateDuration:w,_isInView:T,...R})=>{const{ref:E,inView:F}=s.useInView(),{finalDisplayedText:W,activeHighlightTarget:M,highlightTypewriter:z,highlightSlide:H,highlightSlideDuration:V,highlightSlideStagger:P,highlightSlideSequential:L}=Hh({children:e,highlightText:o,_isInView:F,highlightTypewriter:m,highlightSlide:f,highlightSlideDuration:y,highlightSlideStagger:k,highlightSlideSequential:b,alternateHighlightText:S,alternateAnimation:I,alternateDuration:w,...R}),B=Vh[i],$={fontFamily:"Mulish, Inter, Geist, system-ui, sans-serif",fontWeight:i==="xl"?700:600,letterSpacing:i==="xl"?"-1.5px":"-0.01em"},q=Dh[r](n,a),Y=(G,N)=>G&&(Array.isArray(G)?G.map(ee=>({...ee,iterationCount:N.toString()})):{...G,iterationCount:N.toString()}),O=Y(c,d),J=Y(u,g),D=typeof W=="string"?W:typeof e=="string"?e:"",A={ref:E,animate:F?O:void 0,as:`h${x}`,fontSize:B,...j?{textAlign:"center"}:{},...v?Ph[i]:{},...$},_=G=>!F&&(z||H)?t.jsx("span",{style:{opacity:0},children:G}):z?t.jsx($h,{text:G,typingSpeed:Math.max(30,h/(G.length*10)),cursorColor:"currentColor",...q}):H?t.jsx(Lh,{text:G,duration:V,stagger:P,sequential:L,direction:"up",wordProps:q}):Or(G);if(typeof D=="string"&&M){const G=Array.isArray(M)?new RegExp(`(${M.map(ie=>Ea(String(ie))).join("|")})`,"gi"):new RegExp(`(${Ea(String(M))})`,"gi"),N=[];let ee=0,oe;for(;oe=G.exec(D);)oe.index>ee&&N.push(D.substring(ee,oe.index)),N.push({highlight:!0,text:oe[0]}),ee=oe.index+oe[0].length;return ee<D.length&&N.push(D.substring(ee)),t.jsx(s.Element,{...A,...l==null?void 0:l.container,...R,children:N.map((ie,K)=>typeof ie=="string"?t.jsx(s.Text,{as:"span",display:"inline",...l==null?void 0:l.text,children:Or(ie)},`text-${K}`):t.jsx(s.Text,{as:"span",display:"inline",animate:F?J:void 0,...H?{}:q,...l==null?void 0:l.highlight,children:_(ie.text)},`highlight-${K}`))})}return r&&!M?t.jsx(s.Element,{...A,...R,...l==null?void 0:l.container,children:t.jsx(s.Text,{as:"span",display:"inline",animate:F?J:void 0,...H?{}:q,...l==null?void 0:l.highlight,children:_(D)})}):t.jsx(s.Text,{...A,...R,...l==null?void 0:l.container,...l==null?void 0:l.text,children:Or(D)})},_h=e=>t.jsx(Bh,{...e}),Ul=_h,Oh={justifyContent:"space-between",alignItems:"flex-start",flexWrap:"wrap",gap:12},Nh={margin:0,fontSize:22,fontWeight:"700",color:"theme-text"},qh={margin:0,color:"color-gray-600"},Uh=({title:e,description:o,action:r,views:n={},...a})=>t.jsxs(s.Horizontal,{...Oh,...n.container,...a,children:[t.jsxs(s.Vertical,{gap:4,flexShrink:1,children:[t.jsx(s.Text,{as:"h1",...Nh,...n.title,children:e}),o?t.jsx(s.Text,{as:"p",...qh,...n.description,children:o}):null]}),r?t.jsx(s.View,{flexShrink:0,...n.action,children:r}):null]}),Gh=e=>{const o=ve("pageHeader",e);return t.jsx(Uh,{...o})},Yh={alignItems:"center",gap:8,paddingVertical:48,paddingHorizontal:16,borderRadius:12,borderWidth:1,borderStyle:"dashed",borderColor:"color-gray-200",backgroundColor:"color-white"},Kh={margin:0,fontSize:16,fontWeight:"600",textAlign:"center",color:"theme-text"},Xh={margin:0,textAlign:"center",color:"color-gray-600"},Jh=({state:e,title:o,description:r,action:n,views:a={},...i})=>t.jsxs(s.Vertical,{...e==="error"?{role:"alert"}:{},"data-testid":`state-${e}`,"data-state":e,...Yh,...a.container,...i,children:[t.jsx(s.Text,{as:"h2",...Kh,...a.title,children:o}),r?t.jsx(s.Text,{as:"p",...Xh,...a.description,children:r}):null,n?t.jsx(s.View,{...a.action,children:n}):null]}),vt=e=>{const o=ve("statePanel",e);return t.jsx(Jh,{...o})},Gl={loading:"Loading…",emptyTitle:"Nothing here yet",errorTitle:"Something went wrong",networkError:"The server could not be reached. Check your connection and retry.",retry:"Retry",forbiddenTitle:"You don't have access to this",signInRequired:"Sign in to continue.",askAccess:"Ask an administrator for access.",goneTitle:"This no longer exists",goneDescription:"It may have been deleted."},Yl=e=>{const o=e!==null&&typeof e=="object"&&"status"in e&&typeof e.status=="number"?e.status:void 0;return o===void 0?{kind:"network"}:o===401||o===403?{kind:"forbidden",status:o}:o===404?{kind:"gone"}:{kind:"error"}},Qh=({label:e,...o})=>t.jsxs(s.Vertical,{role:"status","aria-live":"polite","data-testid":"state-loading","data-state":"loading",alignItems:"center",gap:8,padding:48,...o,children:[t.jsx(ho,{}),t.jsx(s.Text,{color:"color-gray-600",children:e})]}),Zh=e=>t.jsx(s.Vertical,{"data-testid":"state-populated","data-state":"populated",gap:12,...e}),ef=({query:e,isEmpty:o,empty:r,children:n,labels:a,views:i={}})=>{const l={...Gl,...a};if(e.status==="loading")return t.jsx(Qh,{label:l.loading,...i.loading});if(e.status==="error"){const u=Yl(e.error);return u.kind==="forbidden"?t.jsx(vt,{state:"forbidden",title:l.forbiddenTitle,description:u.status===401?l.signInRequired:l.askAccess}):u.kind==="gone"?t.jsx(vt,{state:"gone",title:l.goneTitle,description:l.goneDescription}):t.jsx(vt,{state:"error",title:l.errorTitle,description:u.kind==="network"?l.networkError:void 0,action:t.jsx(me,{onClick:e.reload,children:l.retry})})}return o!=null&&o(e.data)?t.jsx(vt,{state:"empty",title:(r==null?void 0:r.title)??l.emptyTitle,description:r==null?void 0:r.description,action:r==null?void 0:r.action}):t.jsx(Zh,{...i.content,children:n(e.data)})},Kl=e=>{const[o,r]=p.useState(!1),[n,a]=p.useState(e);return{isHovered:o,setIsHovered:r,isToggle:n,setIsToggled:a}},of={square:0,rounded:8,pill:999},tf=(e,o)=>({outline:{backgroundColor:"color-white",color:e,borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{backgroundColor:"transparent",color:e,borderWidth:0,borderStyle:"none",borderColor:"transparent",_hover:{backgroundColor:"color-gray-50"},_active:{backgroundColor:"color-gray-100"},transition:"background-color 0.2s ease, color 0.2s ease"},link:{backgroundColor:"transparent",color:e,borderWidth:1,borderStyle:"solid",borderColor:"transparent",textDecoration:"underline",textUnderlineOffset:"1px",textDecorationThickness:"1px",_hover:{opacity:.8},_active:{opacity:.9},transition:"opacity 0.2s ease"}}),Xl=p.memo(({children:e,shape:o="rounded",variant:r="ghost",isHovered:n,setIsHovered:a,isDisabled:i,isToggle:l,setIsToggled:u,onToggle:c,views:d,backgroundColor:g,color:m,themeMode:h,...f})=>{const{getColor:y,themeMode:k}=s.useTheme(),b=h??k,x=y(i?"theme-disabled":g??m??"theme-primary",{themeMode:b}),v=p.useMemo(()=>tf(x),[x,b])[r],S=!!l,I=p.useCallback(()=>a(!0),[a]),w=p.useCallback(()=>{i||u(T=>{const R=!T;return c&&c(R),R})},[i,u,c]);return t.jsx(s.Center,{role:"Toggle",padding:o==="pill"?"8px 12px":"8px",width:"fit-content",cursor:i?"not-allowed":"pointer",borderRadius:of[o],onClick:w,onMouseEnter:I,onMouseLeave:()=>a(!1),...v,...S&&{...r==="link"?{backgroundColor:"transparent"}:{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200"},color:x},...f,...d==null?void 0:d.container,children:e})}),rf=({children:e,shape:o,variant:r,isDisabled:n,isToggled:a=!1,onToggle:i,...l})=>{const{isHovered:u,setIsHovered:c,isToggle:d,setIsToggled:g}=Kl(a);return p.useEffect(()=>{g(a)},[a]),t.jsx(Xl,{shape:o,variant:r,isDisabled:n,isHovered:u,setIsHovered:c,isToggle:d,setIsToggled:g,onToggle:i,...l,children:e})},Zn=rf,Jl=()=>{const[e,o]=p.useState([]);return{activeToggles:e,setActiveToggles:o}},Ql=({items:e,onToggleChange:o,activeToggles:r,setActiveToggles:n,shape:a="rounded",variant:i="ghost",views:l})=>{const u=p.useCallback((c,d)=>{n(g=>{let m;return d?m=g.includes(c)?g:[...g,c]:m=g.filter(h=>h!==c),o==null||o(m),m})},[o,n]);return t.jsx(s.Horizontal,{role:"ToggleGroup",display:"flex",gap:8,flexWrap:"wrap",...l==null?void 0:l.container,children:e.map(c=>t.jsx(Zn,{role:`toggle-${c.id}`,shape:a,variant:i,isToggled:r.includes(c.id)||c.isActive,onToggle:d=>u(c.id,d),isDisabled:c.isDisabled,views:l==null?void 0:l.toggle,children:c.value},c.id))})},nf=({items:e,shape:o,variant:r,onToggleChange:n})=>{const{activeToggles:a,setActiveToggles:i}=Jl();return t.jsx(Ql,{items:e,shape:o,variant:r,activeToggles:a,setActiveToggles:i,onToggleChange:n})},Zl=nf,af=({items:e,onChange:o})=>{const[r,n]=p.useState(e),[a,i]=p.useState(null),[l,u]=p.useState(null),c=p.useRef({x:0,y:0}),d=p.useRef([]),g=p.useCallback((f,y)=>{f.preventDefault(),document.body.style.cursor="grabbing";const k="touches"in f?f.touches[0].clientX:f.clientX,b="touches"in f?f.touches[0].clientY:f.clientY;c.current={x:k,y:b},u(y),i(r[y])},[r]),m=p.useCallback(f=>{if(l===null)return;const y="touches"in f?f.touches[0].clientX:f.clientX,k="touches"in f?f.touches[0].clientY:f.clientY,b=d.current[l];if(!b)return;const j=y-c.current.x,x=k-c.current.y;b.style.transform=`translate(${j}px, ${x}px)`,b.style.zIndex="1000";const C=d.current.findIndex((v,S)=>{if(!v||S===l)return!1;const I=v.getBoundingClientRect();return k>=I.top&&k<=I.bottom});if(C!==-1&&C!==l){const v=[...r],[S]=v.splice(l,1);v.splice(C,0,S),n(v),u(C),o==null||o(v),c.current={x:y,y:k}}},[l,r,o]),h=p.useCallback(()=>{document.body.style.cursor="",d.current.forEach(f=>{f&&(f.style.transform="",f.style.zIndex="")}),u(null),i(null)},[l]);return p.useEffect(()=>{if(!(typeof window>"u"))return l!==null&&(window.addEventListener("mousemove",m),window.addEventListener("touchmove",m),window.addEventListener("mouseup",h),window.addEventListener("touchend",h)),()=>{window.removeEventListener("mousemove",m),window.removeEventListener("touchmove",m),window.removeEventListener("mouseup",h),window.removeEventListener("touchend",h)}},[l,m,h]),{items:r,draggedItem:a,draggedIndex:l,itemRefs:d,handleDragStart:g}},lf=({items:e,renderItem:o,containerProps:r,itemProps:n,draggedIndex:a,itemRefs:i,handleDragStart:l,views:u,themeMode:c})=>t.jsx(s.View,{overflow:"hidden",position:"relative",...r,...u==null?void 0:u.container,children:e.map((d,g)=>t.jsx(s.View,{ref:m=>{i.current[g]=m},onMouseDown:m=>l(m,g),onTouchStart:m=>l(m,g),position:"relative",cursor:"grab",transition:"transform 0.2s",...n,...u==null?void 0:u.item,children:o?o(d,g):d},g))}),es=e=>{const{items:o,draggedIndex:r,itemRefs:n,handleDragStart:a}=af(e);return t.jsx(lf,{...e,items:o,draggedIndex:r,itemRefs:n,handleDragStart:a})},sf=es,cf=({onFileSelect:e,onMultipleFileSelect:o,validateFile:r,accept:n,multiple:a,disabled:i,previewUrl:l})=>{const[u,c]=p.useState(!1),[d,g]=p.useState(null),m=p.useRef(null),h=l!==void 0?l:d;p.useEffect(()=>()=>{d&&URL.revokeObjectURL(d)},[d]);const f=p.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!i&&c(!0)},[i]),y=p.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!i&&c(!1)},[i]),k=p.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!i&&c(!0)},[i]),b=p.useCallback(v=>{if(!v||v.length===0)return;const S=Array.from(v);if(!a&&S.length>0){const I=S[0];if(I.type.startsWith("image/")){const w=URL.createObjectURL(I);g(T=>(T&&URL.revokeObjectURL(T),w))}else g(null)}a?o&&o(S):S.length>0&&e&&e(S[0])},[a,o,e]),j=p.useCallback(v=>{v.preventDefault(),v.stopPropagation(),c(!1),!i&&v.dataTransfer.files&&v.dataTransfer.files.length>0&&(b(v.dataTransfer.files),v.dataTransfer.clearData())},[i,b]),x=p.useCallback(()=>{var v;i||(v=m.current)==null||v.click()},[i]),C=p.useCallback(v=>{b(v.target.files),v.target.value&&(v.target.value="")},[b]);return{isDragActive:u,handleDragEnter:f,handleDragLeave:y,handleDragOver:k,handleDrop:j,handleClick:x,handleFileChange:C,inputRef:m,preview:h}},Aa=e=>`${e}-${Math.random().toString(36).substring(2,9)}`,df=({openDelay:e=200,closeDelay:o=300}={})=>{const[r,n]=p.useState(!1),a=p.useRef(null),i=p.useRef(null),l=p.useRef(null),u=p.useRef(null),c=p.useMemo(()=>Aa("hovercard-content"),[]),d=p.useMemo(()=>Aa("hovercard-trigger"),[]),g=p.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null),i.current&&(clearTimeout(i.current),i.current=null)},[]),m=p.useCallback(()=>{g(),r||(a.current=setTimeout(()=>{n(!0)},e))},[r,e,g]),h=p.useCallback(()=>{g(),r&&(i.current=setTimeout(()=>{n(!1)},o))},[r,o,g]),f=p.useCallback(()=>{i.current&&(clearTimeout(i.current),i.current=null)},[]);return p.useEffect(()=>()=>g(),[g]),{isOpen:r,openCard:m,closeCard:h,cancelCloseTimer:f,triggerRef:l,contentRef:u,contentId:c,triggerId:d}},os=p.createContext({isOpen:!1,openCard:()=>{},closeCard:()=>{},cancelCloseTimer:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),uf=({children:e,value:o})=>t.jsx(os.Provider,{value:o,children:e}),ts=()=>{const e=p.useContext(os);if(!e)throw new Error("useHoverCardContext must be used within a HoverCardProvider");return e},pf=({children:e,views:o,asChild:r=!1,...n})=>{const{openCard:a,closeCard:i,triggerRef:l,contentId:u,triggerId:c}=ts(),f={ref:l,onMouseEnter:()=>a(),onMouseLeave:()=>i(),onFocus:()=>a(),onBlur:()=>i(),id:c,"aria-describedby":u,...o==null?void 0:o.container,...n};if(r&&p.isValidElement(e)){const y=p.Children.only(e);return p.cloneElement(y,{...f,...y.props})}return t.jsx(s.View,{position:"relative",display:"inline-block",...f,children:e})},mf=({children:e,views:o,side:r="bottom",align:n="center",sideOffset:a=8,style:i,backgroundColor:l="color-white",borderRadius:u="4px",boxShadow:c="0px 2px 8px rgba(0, 0, 0, 0.15)",padding:d="12px",minWidth:g="50px",maxWidth:m="300px",...h})=>{const{isOpen:f,cancelCloseTimer:y,closeCard:k,contentRef:b,triggerRef:j,contentId:x,triggerId:C}=ts(),{ref:v,relation:S}=s.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0});p.useEffect(()=>{j!=null&&j.current&&(v==null?void 0:v.current)!==j.current&&v&&(v.current=j.current)},[j,v,f]);const I=()=>y(),w=()=>k();if(!f)return null;const T=()=>{if(!S||!(j!=null&&j.current))return{position:"absolute",top:0,left:0,zIndex:1e3};const F=j.current.getBoundingClientRect();let W=r;r==="bottom"&&S.space.vertical==="top"?W="top":r==="top"&&S.space.vertical==="bottom"?W="bottom":r==="right"&&S.space.horizontal==="left"?W="left":r==="left"&&S.space.horizontal==="right"&&(W="right");let M=0,z=0;switch(W){case"bottom":M=F.left+F.width/2,z=F.bottom+a;break;case"top":M=F.left+F.width/2,z=F.top-a;break;case"right":M=F.right+a,z=F.top+F.height/2;break;case"left":M=F.left-a,z=F.top+F.height/2;break}return{position:"fixed",left:M,top:z,zIndex:1e3,transform:R(W)}},R=F=>{switch(F){case"bottom":return"translate(-50%, 0)";case"top":return"translate(-50%, -100%)";case"right":return"translate(0, -50%)";case"left":return"translate(-100%, -50%)";default:return"translate(-50%, 0)"}},E=T();return t.jsx(s.View,{ref:b,id:x,role:"tooltip","aria-labelledby":C,onMouseEnter:I,onMouseLeave:w,backgroundColor:l,borderRadius:u,boxShadow:c,padding:d,minWidth:g,maxWidth:m,style:{...E,...i},...o==null?void 0:o.container,...h,children:e})},gf=({children:e,views:o,openDelay:r,closeDelay:n,...a})=>{const i=df({openDelay:r,closeDelay:n});return t.jsx(uf,{value:i,children:t.jsx(s.View,{position:"relative",display:"inline-block",...o==null?void 0:o.container,...a,children:e})})},Oe=gf;Oe.Trigger=pf;Oe.Content=mf;const hf={position:"absolute",top:"-4px",right:"-4px",width:"16px",height:"16px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",color:"white",border:"none",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",fontSize:"12px",zIndex:10,_hover:{backgroundColor:"rgba(0, 0, 0, 0.7)"}},rs=({files:e,sandboxId:o,onRemove:r,layout:n="inline",maxHeight:a="120px",showPreviews:i=!1,views:l={}})=>{if(e.length===0)return null;const u=p.useCallback(d=>d<1024?`${d} B`:d<1024*1024?`${(d/1024).toFixed(1)} KB`:`${(d/(1024*1024)).toFixed(1)} MB`,[]),c=p.useCallback(d=>d.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:d.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:d.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return t.jsx(s.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...l==null?void 0:l.container,children:e.map((d,g)=>{const m=typeof URL<"u"&&typeof URL.createObjectURL=="function"&&typeof Blob<"u"&&d instanceof Blob,h=(d==null?void 0:d.path)||(d==null?void 0:d.url)||(i&&m?URL.createObjectURL(d):""),f=d.type.startsWith("image/"),y=d.type.startsWith("video/"),k=d.type.startsWith("audio/"),b=c(d);return i?t.jsx(s.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...l==null?void 0:l.item,children:i&&t.jsxs(Oe,{children:[t.jsxs(Oe.Trigger,{children:[f&&t.jsx(s.Image,{src:h,alt:d.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&t.jsx(s.View,{as:"video",src:h,alt:d.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),k&&t.jsx(s.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:t.jsx(nt,{widthHeight:24,color:"color-black"})}),!f&&!y&&!k&&t.jsx(s.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:t.jsx(Mo,{widthHeight:24,color:"color-black"})}),r&&t.jsx(s.Button,{...hf,onClick:j=>{j.stopPropagation(),r(g)},"aria-label":`Remove ${d.name}`,children:"×"})]}),t.jsxs(Oe.Content,{children:[f&&t.jsx(s.Image,{src:h,alt:d.name,maxWidth:"100%"}),y&&t.jsx(s.View,{as:"video",src:h,controls:!0,maxWidth:"100%"}),k&&t.jsx(s.View,{as:"audio",src:h,controls:!0,width:"100%"}),t.jsxs(s.Text,{marginTop:"4px",maxLines:1,width:"100%",...l==null?void 0:l.name,children:[d.name," (",u(d.size),")"]})]})]})},g):t.jsxs(s.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...l==null?void 0:l.item,children:[t.jsx(s.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:b.backgroundColor,color:b.color,children:k?t.jsx(nt,{widthHeight:12,color:"currentColor"}):t.jsx(Mo,{widthHeight:12,color:"currentColor"})}),t.jsxs(s.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...l==null?void 0:l.name,children:[d.name," · ",u(d.size)]}),r&&t.jsx(s.View,{as:"button",type:"button",onClick:()=>r(g),"aria-label":`Remove ${d.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},g)})})},ff=({children:e,text:o="Drop files here or click to upload",textProps:r,containerProps:n,disabled:a,accept:i,multiple:l,isDragActive:u,handleDragEnter:c,handleDragLeave:d,handleDragOver:g,handleDrop:m,handleClick:h,handleFileChange:f,inputRef:y,preview:k,imageProps:b,selectedFiles:j,onRemove:x})=>t.jsxs(s.Center,{width:"100%",minHeight:"200px",height:j&&j.length>0?"auto":"200px",borderWidth:2,borderStyle:"dashed",borderColor:u?"theme-primary":"color-gray-300",borderRadius:12,backgroundColor:u?"#EFF6FF":"color-gray-50",flexDirection:"column",cursor:a?"not-allowed":"pointer",opacity:a?.6:1,onClick:h,onDragEnter:c,onDragLeave:d,onDragOver:g,onDrop:m,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease",overflow:"hidden",position:"relative",padding:16,...n,children:[t.jsx("input",{type:"file",ref:y,onChange:f,accept:i,multiple:l,style:{display:"none"},disabled:a}),k&&!l?t.jsxs(s.View,{width:"100%",height:"200px",position:"relative",children:[t.jsx(s.Image,{src:k,alt:"Preview",width:"100%",height:"100%",objectFit:"contain",...b}),t.jsx(s.Center,{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.3)",opacity:0,_hover:{opacity:1},transition:"opacity 0.2s",children:t.jsx(s.Text,{color:"white",fontWeight:600,children:"Click to replace"})})]}):t.jsxs(s.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[e||t.jsxs(s.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[t.jsx(Vn,{widthHeight:40,color:u?"theme-primary":"color-gray-500"}),t.jsx(s.Text,{marginTop:16,color:u?"theme-primary":"color-gray-600",fontWeight:500,textAlign:"center",...r,children:o})]}),l&&j&&j.length>0&&t.jsx(s.View,{marginTop:16,width:"100%",children:t.jsx(rs,{files:j,onRemove:x||(()=>{}),showPreviews:!0,layout:"inline",maxHeight:"160px"})})]})]}),yf=e=>{const o=cf(e);return t.jsx(ff,{...e,...o})},xf=(e=!1)=>{const[o,r]=p.useState(e),[n,a]=p.useState(null);return p.useEffect(()=>{const i=c=>{!c.composedPath().some(m=>(m==null?void 0:m.id)==="dropdown-menu"||(m==null?void 0:m.id)==="dropdown-trigger")&&o&&(r(!1),a(null))},l=()=>{o&&(r(!1),a(null))},u=c=>{c.key==="Escape"&&o&&(r(!1),a(null))};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",i),window.addEventListener("resize",l),document.addEventListener("keydown",u),()=>{document.removeEventListener("mousedown",i),window.removeEventListener("resize",l),document.removeEventListener("keydown",u)}},[o]),{isOpen:o,setIsOpen:r,activeSubmenuId:n,setActiveSubmenuId:a}},bf={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},kf={default:{backgroundColor:"color-white",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Cf={hover:{backgroundColor:"color-gray-100"}},ns=p.createContext({isOpen:!1,setIsOpen:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null}}),Sf=({children:e,value:o})=>t.jsx(ns.Provider,{value:o,children:e}),ea=()=>{const e=p.useContext(ns);if(!e)throw new Error("useDropdownMenuContext must be used within a DropdownMenuProvider");return e},as=({children:e,views:o,...r})=>{const{isOpen:n,setIsOpen:a,triggerRef:i}=ea(),l=u=>{u.stopPropagation(),a(!n)};return t.jsx(s.View,{ref:i,id:"dropdown-trigger",onClick:l,cursor:"pointer",position:"relative",display:"inline-block",...o==null?void 0:o.container,...r,children:e})},oa=({items:e,side:o="bottom",align:r="start",views:n,...a})=>{const{isOpen:i,variant:l,triggerRef:u}=ea(),c=p.useRef(null),{ref:d,relation:g}=s.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[m,h]=p.useState({x:0,y:0,placement:o});if(p.useEffect(()=>{u.current&&d&&(d.current=u.current)},[u,d,i]),p.useEffect(()=>{if(i&&c.current&&u.current){const k=u.current.getBoundingClientRect();let b=o;g&&(o==="bottom"&&g.space.vertical==="top"?b="top":o==="top"&&g.space.vertical==="bottom"?b="bottom":o==="right"&&g.space.horizontal==="left"?b="left":o==="left"&&g.space.horizontal==="right"&&(b="right"));let j=0,x=0;switch(b){case"bottom":j=r==="start"?k.left:r==="end"?k.right-180:k.left+k.width/2-90,x=k.bottom+8;break;case"top":j=r==="start"?k.left:r==="end"?k.right-180:k.left+k.width/2-90,x=k.top-8;break;case"right":j=k.right+8,x=r==="start"?k.top:r==="end"?k.bottom-100:k.top+k.height/2-50;break;case"left":j=k.left-8,x=r==="start"?k.top:r==="end"?k.bottom-100:k.top+k.height/2-50;break}h({x:j,y:x,placement:b})}},[i,o,r,u,g]),!i)return null;const y=(()=>{const k={position:"fixed",left:m.x,top:m.y,zIndex:1e3};switch(m.placement){case"top":return{...k,transform:"translateY(-100%)"};case"left":return{...k,transform:"translateX(-100%)"};case"bottom":case"right":default:return k}})();return t.jsx(s.View,{ref:c,id:"dropdown-menu",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:y,...kf[l],...n==null?void 0:n.menu,...a,children:e.map((k,b)=>k.divider?t.jsx(ls,{views:n},`divider-${b}`):t.jsx(is,{item:k,views:n},k.id))})},is=({item:e,views:o,...r})=>{const{activeSubmenuId:n,setActiveSubmenuId:a,size:i}=ea(),[l,u]=p.useState(!1),c=e.items&&e.items.length>0,d=n===e.id,g=p.useRef(null),m=()=>{u(!0),c&&a(e.id)},h=()=>{u(!1)},f=y=>{y.stopPropagation(),!e.disabled&&!c&&e.onClick&&e.onClick()};return t.jsxs(s.View,{ref:g,display:"flex",alignItems:"center",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.5:1,position:"relative",...bf[i],_hover:e.disabled?{}:Cf.hover,backgroundColor:l&&!e.disabled?"color-gray-100":"transparent",onMouseEnter:m,onMouseLeave:h,onClick:f,...o==null?void 0:o.item,...r,children:[e.icon&&t.jsx(s.View,{marginRight:8,...o==null?void 0:o.icon,children:e.icon}),t.jsx(s.View,{flexGrow:1,children:e.label}),c&&t.jsx(s.View,{marginLeft:8,...o==null?void 0:o.submenuIndicator,children:t.jsx(je,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),d&&c&&t.jsx(oa,{items:e.items||[],side:"right",align:"start",views:o})]})},ls=({views:e,...o})=>t.jsx(s.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.divider,...o}),wf=({trigger:e,items:o,side:r="bottom",align:n="start",views:a,themeMode:i,...l})=>t.jsxs(s.View,{position:"relative",display:"inline-block",...a==null?void 0:a.container,...l,children:[t.jsx(as,{views:a,children:e}),t.jsx(oa,{items:o,side:r,align:n,views:a})]}),jf=({trigger:e,items:o,size:r="md",variant:n="default",side:a="bottom",align:i="start",defaultOpen:l=!1,views:u,...c})=>{const{isOpen:d,setIsOpen:g,activeSubmenuId:m,setActiveSubmenuId:h}=xf(l),f=p.useRef(null);return t.jsx(Sf,{value:{isOpen:d,setIsOpen:g,activeSubmenuId:m,setActiveSubmenuId:h,size:r,variant:n,triggerRef:f},children:t.jsx(wf,{trigger:e,items:o,side:a,align:i,views:u,...c})})},pt=jf;pt.Trigger=as;pt.Content=oa;pt.Item=is;pt.Divider=ls;const vf=e=>{const{value:o,defaultValue:r="",onChange:n,onChangeComplete:a,isOpen:i,onOpen:l,onClose:u,closeOnSelect:c=!0,maxRecentColors:d=8,showRecentColors:g=!0,colorFormat:m}=e,[h,f]=p.useState(i??!1),[y,k]=p.useState(o??r),[b,j]=p.useState(""),[x,C]=p.useState([]),v=p.useRef(null),S=p.useRef(null);p.useEffect(()=>{o!==void 0&&k(o)},[o]),p.useEffect(()=>{i!==void 0&&f(i)},[i]),p.useEffect(()=>{if(g&&typeof localStorage<"u"){const W=localStorage.getItem("colorPicker-recentColors");if(W)try{C(JSON.parse(W))}catch{}}},[g]),p.useEffect(()=>{if(typeof document>"u"||typeof document.addEventListener!="function")return;const W=M=>{h&&v.current&&S.current&&!v.current.contains(M.target)&&!S.current.contains(M.target)&&F()};return document.addEventListener("mousedown",W),()=>document.removeEventListener("mousedown",W)},[h]);const I=p.useCallback(W=>{g&&C(M=>{const z=M.filter(V=>V!==W),H=[W,...z].slice(0,d);return typeof localStorage<"u"&&localStorage.setItem("colorPicker-recentColors",JSON.stringify(H)),H})},[g,d]),w=p.useCallback(()=>{const W=!h;f(W),W?l==null||l():u==null||u()},[h,l,u]),T=p.useCallback(W=>{k(W),I(W);const M=hr(W,m);n==null||n(M),a==null||a(M),c&&(f(!1),u==null||u())},[n,a,c,u,I,m]),R=p.useCallback(W=>{j(W)},[]),E=p.useCallback(()=>{b&&(T(b),j(""))},[b,T]),F=p.useCallback(()=>{f(!1),u==null||u()},[u]);return{isOpen:h,selectedColor:y,recentColors:x,customColor:b,handleToggle:w,handleColorSelect:T,handleCustomColorChange:R,handleCustomColorSubmit:E,handleClose:F,triggerRef:v,dropdownRef:S}},qo={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"},dropdown:{position:"absolute",top:"calc(100% + 8px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.14)",padding:"16px",minWidth:"320px"},colorGrid:{display:"grid",gridTemplateColumns:"repeat(6, 36px)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"12px",marginBottom:"16px"},customInput:{marginBottom:"12px"},recentColors:{borderTop:"1px solid color-gray-100",paddingTop:"12px"}},Tf={xs:{height:"32px",fontSize:"12px",padding:"4px 8px"},sm:{height:"40px",fontSize:"12px",padding:"8px 10px"},md:{height:"44px",fontSize:"14px",padding:"10px 12px"},lg:{height:"48px",fontSize:"16px",padding:"12px 14px"},xl:{height:"56px",fontSize:"18px",padding:"14px 16px"}},If={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Rf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-900"}},Ff=[{name:"Blue",value:"#1D4ED8",category:"primary"},{name:"Purple",value:"#A855F7",category:"primary"},{name:"Green",value:"#22C55E",category:"primary"},{name:"Orange",value:"#F97316",category:"primary"},{name:"Red",value:"#EF4444",category:"primary"},{name:"Ink",value:"#111827",category:"neutral"}],Mf=typeof navigator<"u"&&navigator.product!=="ReactNative"&&typeof document<"u"&&typeof document.createElement=="function",zf=({id:e,name:o,label:r,placeholder:n="Select a color",helperText:a,views:i={},size:l="md",shape:u="default",variant:c="default",error:d=!1,isDisabled:g=!1,isReadOnly:m=!1,predefinedColors:h=Ff,showCustomInput:f=!0,showRecentColors:y=!0,isOpen:k,selectedColor:b,recentColors:j,customColor:x,handleToggle:C,handleColorSelect:v,handleCustomColorChange:S,handleCustomColorSubmit:I,handleClose:w,triggerRef:T,dropdownRef:R,onChange:E,onChangeComplete:F,onOpen:W,onClose:M,colorFormat:z,maxRecentColors:H,closeOnSelect:V,defaultValue:P,value:L,...B})=>{const $={...qo.container,...i==null?void 0:i.container},q={...qo.trigger,...Tf[l],...If[u],...Rf[c],...d&&{borderColor:"color-red-500"},...g&&{opacity:.6,cursor:"not-allowed"},...!g&&!m&&{_hover:{borderColor:"color-gray-400"}},...i==null?void 0:i.trigger},Y={...qo.dropdown,...i==null?void 0:i.dropdown},O={...qo.colorGrid,...i==null?void 0:i.colorGrid},J={...qo.recentColors,...i==null?void 0:i.recentColors},D=b||"color-gray-200";return t.jsxs(s.View,{id:e,...$,...B,children:[r&&t.jsx(s.Text,{fontSize:"12px",lineHeight:"16px",fontWeight:"500",color:"color-gray-600",marginBottom:"6px",...i==null?void 0:i.label,children:r}),t.jsxs(s.View,{ref:T,onClick:g||m?void 0:C,...q,children:[t.jsxs(s.Horizontal,{alignItems:"center",gap:8,children:[t.jsx(s.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:D,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"}),t.jsx(s.Text,{color:b?"color-gray-900":"color-gray-500",fontSize:"inherit",children:b||n})]}),!m&&!g&&t.jsx(je,{widthHeight:16,color:"color-gray-500",orientation:k?"up":"down"})]}),k&&t.jsxs(s.View,{ref:R,...Y,children:[t.jsx(s.View,{...O,children:h.map((A,_)=>t.jsx(s.View,{width:"36px",height:"36px",borderRadius:"8px",backgroundColor:A.value,borderWidth:"1px",borderStyle:"solid",borderColor:b===A.value?"theme-primary":"transparent",cursor:"pointer",onClick:()=>v(A.value),title:A.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"},...i==null?void 0:i.colorSwatch},_))}),f&&t.jsxs(s.View,{...qo.customInput,...i==null?void 0:i.customInput,children:[t.jsxs(s.Horizontal,{gap:8,alignItems:"center",marginBottom:"10px",children:[Mf&&t.jsx("input",{type:"color",value:x||"#1D4ED8",onChange:A=>{const _=A.target.value;S(_),v(_)},style:{width:"36px",height:"36px",border:"1px solid #E5E7EB",borderRadius:"8px",cursor:"pointer",backgroundColor:"transparent"},title:"Pick a color"}),t.jsx(s.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:"HEX"})]}),t.jsx(Be,{placeholder:"#1D4ED8",value:x,onChange:A=>{var _;return S(typeof A=="string"?A:((_=A==null?void 0:A.target)==null?void 0:_.value)??"")},onKeyPress:A=>{A.key==="Enter"&&I()},size:"sm",right:x&&t.jsx(s.View,{width:"18px",height:"18px",borderRadius:"6px",backgroundColor:x,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",onClick:I})})]}),y&&j.length>0&&t.jsxs(s.View,{...J,children:[t.jsx(s.Text,{fontSize:"11px",lineHeight:"16px",fontWeight:"500",color:"color-gray-500",marginBottom:"8px",children:"Recent Colors"}),t.jsx(s.Horizontal,{gap:8,flexWrap:"wrap",children:j.map((A,_)=>t.jsx(s.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:A,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>v(A),title:A,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"}},_))})]})]}),a&&t.jsx(s.Text,{fontSize:"11px",lineHeight:"16px",color:d?"theme-error":"color-gray-500",marginTop:"4px",...i==null?void 0:i.helperText,children:a})]})},Wf=e=>{const o=vf(e);return t.jsx(zf,{...o,...e})},ss=Wf,cs={select:"Select an emoji",reaction:"Add reaction",search:"Search emojis…",more:"More emojis",empty:"No emojis found",categoryEmpty:"No emojis in this category",recent:"Recent",smileys:"Smileys",people:"People",animals:"Animals",food:"Food",activities:"Activities",travel:"Travel",objects:"Objects",symbols:"Symbols",flags:"Flags"},ds=["👍","❤️","🙌","😂","😢","😮"],Ef=[{emoji:"😀",name:"grinning face",category:"smileys",keywords:["happy","smile","grin","heureux","sourire"]},{emoji:"😃",name:"grinning face with big eyes",category:"smileys",keywords:["happy","smile","joy","heureux","sourire","joie"]},{emoji:"😄",name:"grinning face with smiling eyes",category:"smileys",keywords:["happy","smile","joy","heureux","sourire","joie"]},{emoji:"😁",name:"beaming face with smiling eyes",category:"smileys",keywords:["happy","smile","grin","heureux","sourire"]},{emoji:"😆",name:"grinning squinting face",category:"smileys",keywords:["happy","laugh","smile","heureux","rire","sourire"]},{emoji:"😅",name:"grinning face with sweat",category:"smileys",keywords:["happy","sweat","relief","heureux"]},{emoji:"🤣",name:"rolling on the floor laughing",category:"smileys",keywords:["laugh","funny","rofl","rire"]},{emoji:"😂",name:"face with tears of joy",category:"smileys",keywords:["laugh","cry","joy","rire","pleurer","joie"]},{emoji:"🙂",name:"slightly smiling face",category:"smileys",keywords:["smile","happy","sourire","heureux"]},{emoji:"🙃",name:"upside-down face",category:"smileys",keywords:["silly","upside down"]},{emoji:"😉",name:"winking face",category:"smileys",keywords:["wink","flirt"]},{emoji:"😊",name:"smiling face with smiling eyes",category:"smileys",keywords:["happy","smile","blush","heureux","sourire"]},{emoji:"😇",name:"smiling face with halo",category:"smileys",keywords:["angel","innocent"]},{emoji:"🥰",name:"smiling face with hearts",category:"smileys",keywords:["love","hearts","adore","amour"]},{emoji:"😍",name:"smiling face with heart-eyes",category:"smileys",keywords:["love","heart","eyes","amour","cœur","yeux"]},{emoji:"🤩",name:"star-struck",category:"smileys",keywords:["star","struck","amazed","étoile"]},{emoji:"😘",name:"face blowing a kiss",category:"smileys",keywords:["kiss","love","flirt","bisou","amour"]},{emoji:"😗",name:"kissing face",category:"smileys",keywords:["kiss","love","bisou","amour"]},{emoji:"☺️",name:"smiling face",category:"smileys",keywords:["smile","happy","content","sourire","heureux"]},{emoji:"😚",name:"kissing face with closed eyes",category:"smileys",keywords:["kiss","love","closed eyes","bisou","amour","yeux"]},{emoji:"😙",name:"kissing face with smiling eyes",category:"smileys",keywords:["kiss","love","smile","bisou","amour","sourire"]},{emoji:"🥲",name:"smiling face with tear",category:"smileys",keywords:["happy","cry","tear","bittersweet","heureux","pleurer"]},{emoji:"😋",name:"face savoring food",category:"smileys",keywords:["yum","delicious","food","nourriture"]},{emoji:"😛",name:"face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"😜",name:"winking face with tongue",category:"smileys",keywords:["wink","tongue","silly"]},{emoji:"🤪",name:"zany face",category:"smileys",keywords:["crazy","silly","wild"]},{emoji:"😝",name:"squinting face with tongue",category:"smileys",keywords:["tongue","silly","playful"]},{emoji:"🤑",name:"money-mouth face",category:"smileys",keywords:["money","rich","greedy"]},{emoji:"🤗",name:"hugging face",category:"smileys",keywords:["hug","love","care","amour"]},{emoji:"🤭",name:"face with hand over mouth",category:"smileys",keywords:["oops","secret","quiet"]},{emoji:"🫢",name:"face with open eyes and hand over mouth",category:"smileys",keywords:["surprise","shock","oops"]},{emoji:"🫣",name:"face with peeking eye",category:"smileys",keywords:["peek","shy","embarrassed"]},{emoji:"🤫",name:"shushing face",category:"smileys",keywords:["quiet","secret","shh"]},{emoji:"🤔",name:"thinking face",category:"smileys",keywords:["think","consider","hmm","réfléchir"]},{emoji:"🫡",name:"saluting face",category:"smileys",keywords:["salute","respect","military"]},{emoji:"🤐",name:"zipper-mouth face",category:"smileys",keywords:["quiet","secret","zip"]},{emoji:"🤨",name:"face with raised eyebrow",category:"smileys",keywords:["suspicious","doubt","skeptical"]},{emoji:"😐",name:"neutral face",category:"smileys",keywords:["neutral","meh","blank","neutre"]},{emoji:"😑",name:"expressionless face",category:"smileys",keywords:["blank","deadpan","meh"]},{emoji:"😶",name:"face without mouth",category:"smileys",keywords:["quiet","speechless","silent"]},{emoji:"🫥",name:"dotted line face",category:"smileys",keywords:["invisible","depressed","disappear"]},{emoji:"😏",name:"smirking face",category:"smileys",keywords:["smirk","smug","confident"]},{emoji:"😒",name:"unamused face",category:"smileys",keywords:["unamused","bored","annoyed"]},{emoji:"🙄",name:"face with rolling eyes",category:"smileys",keywords:["eye roll","annoyed","whatever"]},{emoji:"😬",name:"grimacing face",category:"smileys",keywords:["grimace","awkward","oops"]},{emoji:"😮‍💨",name:"face exhaling",category:"smileys",keywords:["sigh","relief","tired","fatigué"]},{emoji:"🤥",name:"lying face",category:"smileys",keywords:["lie","pinocchio","dishonest"]},{emoji:"😌",name:"relieved face",category:"smileys",keywords:["relief","calm","peaceful"]},{emoji:"😔",name:"pensive face",category:"smileys",keywords:["sad","thoughtful","pensive","triste"]},{emoji:"😪",name:"sleepy face",category:"smileys",keywords:["sleepy","tired","drowsy","fatigué"]},{emoji:"🤤",name:"drooling face",category:"smileys",keywords:["drool","desire","sleep","dormir"]},{emoji:"😴",name:"sleeping face",category:"smileys",keywords:["sleep","tired","zzz","dormir","fatigué"]},{emoji:"😷",name:"face with medical mask",category:"smileys",keywords:["mask","sick","doctor"]},{emoji:"🤒",name:"face with thermometer",category:"smileys",keywords:["sick","fever","ill"]},{emoji:"🤕",name:"face with head-bandage",category:"smileys",keywords:["hurt","injured","bandage"]},{emoji:"🤢",name:"nauseated face",category:"smileys",keywords:["sick","nausea","disgusted"]},{emoji:"🤮",name:"face vomiting",category:"smileys",keywords:["vomit","sick","disgusted"]},{emoji:"🤧",name:"sneezing face",category:"smileys",keywords:["sneeze","sick","gesundheit"]},{emoji:"🥵",name:"hot face",category:"smileys",keywords:["hot","heat","sweat"]},{emoji:"🥶",name:"cold face",category:"smileys",keywords:["cold","freeze","blue","bleu"]},{emoji:"🥴",name:"woozy face",category:"smileys",keywords:["dizzy","drunk","confused","confus"]},{emoji:"😵",name:"dizzy face",category:"smileys",keywords:["dizzy","confused","knocked out","confus"]},{emoji:"😵‍💫",name:"face with spiral eyes",category:"smileys",keywords:["dizzy","hypnotized","confused","confus"]},{emoji:"🤯",name:"exploding head",category:"smileys",keywords:["mind blown","shocked","amazed"]},{emoji:"🤠",name:"cowboy hat face",category:"smileys",keywords:["cowboy","hat","western"]},{emoji:"🥳",name:"partying face",category:"smileys",keywords:["party","celebration","birthday","fête"]},{emoji:"🥸",name:"disguised face",category:"smileys",keywords:["disguise","glasses","incognito"]},{emoji:"😎",name:"smiling face with sunglasses",category:"smileys",keywords:["cool","sunglasses","awesome"]},{emoji:"🤓",name:"nerd face",category:"smileys",keywords:["nerd","geek","smart"]},{emoji:"🧐",name:"face with monocle",category:"smileys",keywords:["monocle","fancy","inspection"]},{emoji:"👋",name:"waving hand",category:"people",keywords:["wave","hello","goodbye"]},{emoji:"🤚",name:"raised back of hand",category:"people",keywords:["hand","stop","main"]},{emoji:"🖐️",name:"hand with fingers splayed",category:"people",keywords:["hand","five","main"]},{emoji:"✋",name:"raised hand",category:"people",keywords:["hand","stop","high five","main"]},{emoji:"🖖",name:"vulcan salute",category:"people",keywords:["spock","vulcan"]},{emoji:"👌",name:"OK hand",category:"people",keywords:["ok","perfect"]},{emoji:"🤌",name:"pinched fingers",category:"people",keywords:["italian","chef kiss","bisou"]},{emoji:"🤏",name:"pinching hand",category:"people",keywords:["small","tiny"]},{emoji:"✌️",name:"victory hand",category:"people",keywords:["peace","victory","victoire"]},{emoji:"🤞",name:"crossed fingers",category:"people",keywords:["luck","hope"]},{emoji:"🤟",name:"love-you gesture",category:"people",keywords:["love","you","amour"]},{emoji:"🤘",name:"sign of the horns",category:"people",keywords:["rock","metal"]},{emoji:"🤙",name:"call me hand",category:"people",keywords:["call","phone"]},{emoji:"👈",name:"backhand index pointing left",category:"people",keywords:["point","left"]},{emoji:"👉",name:"backhand index pointing right",category:"people",keywords:["point","right"]},{emoji:"👆",name:"backhand index pointing up",category:"people",keywords:["point","up"]},{emoji:"🖕",name:"middle finger",category:"people",keywords:["middle finger","rude"]},{emoji:"👇",name:"backhand index pointing down",category:"people",keywords:["point","down"]},{emoji:"☝️",name:"index pointing up",category:"people",keywords:["point","up","one"]},{emoji:"👍",name:"thumbs up",category:"people",keywords:["thumbs up","good","yes","pouce"]},{emoji:"👎",name:"thumbs down",category:"people",keywords:["thumbs down","bad","no","pouce"]},{emoji:"✊",name:"raised fist",category:"people",keywords:["fist","power","solidarity"]},{emoji:"👊",name:"oncoming fist",category:"people",keywords:["fist","punch","bump"]},{emoji:"🤛",name:"left-facing fist",category:"people",keywords:["fist","bump","left"]},{emoji:"🤜",name:"right-facing fist",category:"people",keywords:["fist","bump","right"]},{emoji:"👏",name:"clapping hands",category:"people",keywords:["clap","applause","bravo"]},{emoji:"🙌",name:"raising hands",category:"people",keywords:["celebration","hooray","praise","fête"]},{emoji:"👐",name:"open hands",category:"people",keywords:["open","hug","jazz hands"]},{emoji:"🤲",name:"palms up together",category:"people",keywords:["prayer","please","hope"]},{emoji:"🤝",name:"handshake",category:"people",keywords:["handshake","deal","agreement"]},{emoji:"🙏",name:"folded hands",category:"people",keywords:["prayer","thanks","please","merci"]},{emoji:"✍️",name:"writing hand",category:"people",keywords:["write","author","signature"]},{emoji:"💅",name:"nail polish",category:"people",keywords:["nails","beauty","manicure"]},{emoji:"🤳",name:"selfie",category:"people",keywords:["selfie","camera","phone"]},{emoji:"💪",name:"flexed biceps",category:"people",keywords:["muscle","strong","flex","force"]},{emoji:"🦾",name:"mechanical arm",category:"people",keywords:["robot","prosthetic","cyborg","ia"]},{emoji:"🦿",name:"mechanical leg",category:"people",keywords:["robot","prosthetic","cyborg","ia"]},{emoji:"🦵",name:"leg",category:"people",keywords:["leg","limb","kick"]},{emoji:"🦶",name:"foot",category:"people",keywords:["foot","kick","stomp"]},{emoji:"👂",name:"ear",category:"people",keywords:["ear","hear","listen"]},{emoji:"🦻",name:"ear with hearing aid",category:"people",keywords:["hearing aid","deaf","accessibility"]},{emoji:"👃",name:"nose",category:"people",keywords:["nose","smell","sniff"]},{emoji:"🧠",name:"brain",category:"people",keywords:["brain","smart","think","cerveau","réfléchir"]},{emoji:"🫀",name:"anatomical heart",category:"people",keywords:["heart","organ","love","cœur","amour"]},{emoji:"🫁",name:"lungs",category:"people",keywords:["lungs","breathe","organ"]},{emoji:"🦷",name:"tooth",category:"people",keywords:["tooth","dental","smile","sourire"]},{emoji:"🦴",name:"bone",category:"people",keywords:["bone","skeleton","dog","chien"]},{emoji:"👀",name:"eyes",category:"people",keywords:["eyes","look","see","yeux"]},{emoji:"👁️",name:"eye",category:"people",keywords:["eye","see","watch"]},{emoji:"👅",name:"tongue",category:"people",keywords:["tongue","taste","lick"]},{emoji:"👄",name:"mouth",category:"people",keywords:["mouth","lips","kiss","bisou"]},{emoji:"🫦",name:"biting lip",category:"people",keywords:["lip","bite","nervous"]},{emoji:"👶",name:"baby",category:"people",keywords:["baby","infant","child"]},{emoji:"🧒",name:"child",category:"people",keywords:["child","kid","young"]},{emoji:"👦",name:"boy",category:"people",keywords:["boy","child","male"]},{emoji:"👧",name:"girl",category:"people",keywords:["girl","child","female"]},{emoji:"🧑",name:"person",category:"people",keywords:["person","adult","human"]},{emoji:"👱",name:"person: blond hair",category:"people",keywords:["blond","hair","person"]},{emoji:"👨",name:"man",category:"people",keywords:["man","male","adult"]},{emoji:"🧔",name:"person: beard",category:"people",keywords:["beard","man","facial hair"]},{emoji:"👩",name:"woman",category:"people",keywords:["woman","female","adult"]},{emoji:"🧓",name:"older person",category:"people",keywords:["old","elderly","senior"]},{emoji:"👴",name:"old man",category:"people",keywords:["old","man","elderly"]},{emoji:"👵",name:"old woman",category:"people",keywords:["old","woman","elderly"]},{emoji:"🐶",name:"dog face",category:"animals",keywords:["dog","pet","animal","chien"]},{emoji:"🐱",name:"cat face",category:"animals",keywords:["cat","pet","animal","chat"]},{emoji:"🐭",name:"mouse face",category:"animals",keywords:["mouse","animal"]},{emoji:"🐹",name:"hamster",category:"animals",keywords:["hamster","pet"]},{emoji:"🐰",name:"rabbit face",category:"animals",keywords:["rabbit","bunny"]},{emoji:"🦊",name:"fox",category:"animals",keywords:["fox","animal"]},{emoji:"🐻",name:"bear",category:"animals",keywords:["bear","animal"]},{emoji:"🐼",name:"panda",category:"animals",keywords:["panda","bear"]},{emoji:"🐨",name:"koala",category:"animals",keywords:["koala","australia","marsupial"]},{emoji:"🐯",name:"tiger face",category:"animals",keywords:["tiger","cat","wild","chat"]},{emoji:"🦁",name:"lion",category:"animals",keywords:["lion","king","cat","chat"]},{emoji:"🐮",name:"cow face",category:"animals",keywords:["cow","moo","farm"]},{emoji:"🐷",name:"pig face",category:"animals",keywords:["pig","oink","farm"]},{emoji:"🐽",name:"pig nose",category:"animals",keywords:["pig","nose","snout"]},{emoji:"🐸",name:"frog",category:"animals",keywords:["frog","amphibian","green","vert"]},{emoji:"🐵",name:"monkey face",category:"animals",keywords:["monkey","primate","banana"]},{emoji:"🙈",name:"see-no-evil monkey",category:"animals",keywords:["monkey","see no evil","eyes","yeux"]},{emoji:"🙉",name:"hear-no-evil monkey",category:"animals",keywords:["monkey","hear no evil","ears"]},{emoji:"🙊",name:"speak-no-evil monkey",category:"animals",keywords:["monkey","speak no evil","mouth"]},{emoji:"🐒",name:"monkey",category:"animals",keywords:["monkey","primate","zoo"]},{emoji:"🦍",name:"gorilla",category:"animals",keywords:["gorilla","ape","strong","force"]},{emoji:"🦧",name:"orangutan",category:"animals",keywords:["orangutan","ape","orange"]},{emoji:"🐺",name:"wolf",category:"animals",keywords:["wolf","howl","wild"]},{emoji:"🐗",name:"boar",category:"animals",keywords:["boar","pig","wild"]},{emoji:"🐴",name:"horse face",category:"animals",keywords:["horse","neigh","ride"]},{emoji:"🐎",name:"horse",category:"animals",keywords:["horse","racing","gallop"]},{emoji:"🦄",name:"unicorn",category:"animals",keywords:["unicorn","magical","horn"]},{emoji:"🦓",name:"zebra",category:"animals",keywords:["zebra","stripes","africa"]},{emoji:"🦌",name:"deer",category:"animals",keywords:["deer","antlers","forest"]},{emoji:"🦏",name:"rhinoceros",category:"animals",keywords:["rhino","horn","africa"]},{emoji:"🦛",name:"hippopotamus",category:"animals",keywords:["hippo","water","africa"]},{emoji:"🐘",name:"elephant",category:"animals",keywords:["elephant","trunk","memory"]},{emoji:"🦒",name:"giraffe",category:"animals",keywords:["giraffe","tall","neck"]},{emoji:"🦘",name:"kangaroo",category:"animals",keywords:["kangaroo","hop","australia"]},{emoji:"🦥",name:"sloth",category:"animals",keywords:["sloth","slow","lazy"]},{emoji:"🦦",name:"otter",category:"animals",keywords:["otter","water","cute"]},{emoji:"🦨",name:"skunk",category:"animals",keywords:["skunk","smell","stripe"]},{emoji:"🦡",name:"badger",category:"animals",keywords:["badger","honey","dig"]},{emoji:"🐾",name:"paw prints",category:"animals",keywords:["paw","prints","tracks"]},{emoji:"🐔",name:"chicken",category:"animals",keywords:["chicken","rooster","farm"]},{emoji:"🐓",name:"rooster",category:"animals",keywords:["rooster","cock","morning"]},{emoji:"🐣",name:"hatching chick",category:"animals",keywords:["chick","hatching","egg"]},{emoji:"🐤",name:"baby chick",category:"animals",keywords:["chick","baby","yellow","jaune"]},{emoji:"🐥",name:"front-facing baby chick",category:"animals",keywords:["chick","baby","cute"]},{emoji:"🦆",name:"duck",category:"animals",keywords:["duck","quack","water"]},{emoji:"🦅",name:"eagle",category:"animals",keywords:["eagle","bird","freedom"]},{emoji:"🦉",name:"owl",category:"animals",keywords:["owl","wise","night"]},{emoji:"🦇",name:"bat",category:"animals",keywords:["bat","vampire","night"]},{emoji:"",name:"bug",category:"animals",keywords:["bug","insect","crawl"]},{emoji:"🦋",name:"butterfly",category:"animals",keywords:["butterfly","beautiful","fly"]},{emoji:"🐌",name:"snail",category:"animals",keywords:["snail","slow","shell"]},{emoji:"🐞",name:"lady beetle",category:"animals",keywords:["ladybug","beetle","red","rouge"]},{emoji:"🐜",name:"ant",category:"animals",keywords:["ant","work","colony"]},{emoji:"🦟",name:"mosquito",category:"animals",keywords:["mosquito","bite","buzz"]},{emoji:"🕷️",name:"spider",category:"animals",keywords:["spider","web","eight legs"]},{emoji:"🦂",name:"scorpion",category:"animals",keywords:["scorpion","sting","desert"]},{emoji:"🐢",name:"turtle",category:"animals",keywords:["turtle","slow","shell"]},{emoji:"🐍",name:"snake",category:"animals",keywords:["snake","slither","reptile"]},{emoji:"🦎",name:"lizard",category:"animals",keywords:["lizard","gecko","reptile"]},{emoji:"🐙",name:"octopus",category:"animals",keywords:["octopus","tentacles","sea"]},{emoji:"🦑",name:"squid",category:"animals",keywords:["squid","tentacles","ocean"]},{emoji:"🦐",name:"shrimp",category:"animals",keywords:["shrimp","seafood","small"]},{emoji:"🦞",name:"lobster",category:"animals",keywords:["lobster","claws","red","rouge"]},{emoji:"🦀",name:"crab",category:"animals",keywords:["crab","claws","beach"]},{emoji:"🐡",name:"blowfish",category:"animals",keywords:["blowfish","puffer","spiky"]},{emoji:"🐠",name:"tropical fish",category:"animals",keywords:["fish","tropical","colorful"]},{emoji:"🐟",name:"fish",category:"animals",keywords:["fish","swim","water"]},{emoji:"🐬",name:"dolphin",category:"animals",keywords:["dolphin","smart","ocean"]},{emoji:"🐳",name:"spouting whale",category:"animals",keywords:["whale","spout","big"]},{emoji:"🐋",name:"whale",category:"animals",keywords:["whale","ocean","huge"]},{emoji:"🦈",name:"shark",category:"animals",keywords:["shark","teeth","dangerous"]},{emoji:"🐊",name:"crocodile",category:"animals",keywords:["crocodile","teeth","swamp"]},{emoji:"🌸",name:"cherry blossom",category:"animals",keywords:["flower","spring","pink","rose"]},{emoji:"💐",name:"bouquet",category:"animals",keywords:["flowers","bouquet","gift","cadeau"]},{emoji:"🌺",name:"hibiscus",category:"animals",keywords:["flower","tropical","red","rouge"]},{emoji:"🌻",name:"sunflower",category:"animals",keywords:["sunflower","yellow","big","jaune"]},{emoji:"🌹",name:"rose",category:"animals",keywords:["rose","love","red","amour","rouge"]},{emoji:"🥀",name:"wilted flower",category:"animals",keywords:["flower","wilted","sad","triste"]},{emoji:"🌷",name:"tulip",category:"animals",keywords:["tulip","spring","netherlands"]},{emoji:"🌼",name:"daisy",category:"animals",keywords:["daisy","white","simple","blanc"]},{emoji:"🌱",name:"seedling",category:"animals",keywords:["plant","grow","green","plante","vert"]},{emoji:"🌿",name:"herb",category:"animals",keywords:["herb","green","leaf","vert"]},{emoji:"🍀",name:"four leaf clover",category:"animals",keywords:["clover","luck","green","vert"]},{emoji:"🌳",name:"deciduous tree",category:"animals",keywords:["tree","nature","green","vert"]},{emoji:"🌲",name:"evergreen tree",category:"animals",keywords:["tree","pine","christmas"]},{emoji:"🌴",name:"palm tree",category:"animals",keywords:["palm","tropical","beach"]},{emoji:"🌵",name:"cactus",category:"animals",keywords:["cactus","desert","spiky"]},{emoji:"🍎",name:"red apple",category:"food",keywords:["apple","fruit"]},{emoji:"🍊",name:"tangerine",category:"food",keywords:["orange","fruit"]},{emoji:"🍋",name:"lemon",category:"food",keywords:["lemon","fruit"]},{emoji:"🍌",name:"banana",category:"food",keywords:["banana","fruit"]},{emoji:"🍉",name:"watermelon",category:"food",keywords:["watermelon","fruit"]},{emoji:"🍇",name:"grapes",category:"food",keywords:["grapes","fruit"]},{emoji:"🍓",name:"strawberry",category:"food",keywords:["strawberry","fruit"]},{emoji:"🫐",name:"blueberries",category:"food",keywords:["blueberry","fruit"]},{emoji:"🥝",name:"kiwi fruit",category:"food",keywords:["kiwi","fruit","green","vert"]},{emoji:"🍅",name:"tomato",category:"food",keywords:["tomato","red","vegetable","rouge"]},{emoji:"🫒",name:"olive",category:"food",keywords:["olive","green","oil","vert"]},{emoji:"🥥",name:"coconut",category:"food",keywords:["coconut","tropical","milk"]},{emoji:"🥑",name:"avocado",category:"food",keywords:["avocado","green","healthy","vert"]},{emoji:"🍆",name:"eggplant",category:"food",keywords:["eggplant","purple","vegetable","violet"]},{emoji:"🥔",name:"potato",category:"food",keywords:["potato","vegetable","starch"]},{emoji:"🥕",name:"carrot",category:"food",keywords:["carrot","orange","vegetable"]},{emoji:"🌽",name:"ear of corn",category:"food",keywords:["corn","yellow","vegetable","jaune"]},{emoji:"🌶️",name:"hot pepper",category:"food",keywords:["pepper","hot","spicy"]},{emoji:"🫑",name:"bell pepper",category:"food",keywords:["pepper","bell","vegetable","cloche"]},{emoji:"🥒",name:"cucumber",category:"food",keywords:["cucumber","green","vegetable","vert"]},{emoji:"🥬",name:"leafy greens",category:"food",keywords:["lettuce","greens","salad"]},{emoji:"🥦",name:"broccoli",category:"food",keywords:["broccoli","green","vegetable","vert"]},{emoji:"🧄",name:"garlic",category:"food",keywords:["garlic","flavor","cooking"]},{emoji:"🧅",name:"onion",category:"food",keywords:["onion","cry","cooking","pleurer"]},{emoji:"🍄",name:"mushroom",category:"food",keywords:["mushroom","fungi","cooking"]},{emoji:"🥜",name:"peanuts",category:"food",keywords:["peanuts","nuts","snack"]},{emoji:"🌰",name:"chestnut",category:"food",keywords:["chestnut","nut","autumn"]},{emoji:"🍞",name:"bread",category:"food",keywords:["bread","loaf","carbs"]},{emoji:"🥐",name:"croissant",category:"food",keywords:["croissant","french","pastry"]},{emoji:"🥖",name:"baguette bread",category:"food",keywords:["baguette","french","bread"]},{emoji:"🫓",name:"flatbread",category:"food",keywords:["flatbread","bread","thin"]},{emoji:"🥨",name:"pretzel",category:"food",keywords:["pretzel","twisted","snack"]},{emoji:"🥯",name:"bagel",category:"food",keywords:["bagel","round","breakfast"]},{emoji:"🥞",name:"pancakes",category:"food",keywords:["pancakes","breakfast","syrup"]},{emoji:"🧇",name:"waffle",category:"food",keywords:["waffle","breakfast","squares"]},{emoji:"🧀",name:"cheese wedge",category:"food",keywords:["cheese","dairy","yellow","jaune"]},{emoji:"🍖",name:"meat on bone",category:"food",keywords:["meat","bone","protein"]},{emoji:"🍗",name:"poultry leg",category:"food",keywords:["chicken","leg","meat"]},{emoji:"🥩",name:"cut of meat",category:"food",keywords:["steak","meat","red","rouge"]},{emoji:"🥓",name:"bacon",category:"food",keywords:["bacon","pork","breakfast"]},{emoji:"🍔",name:"hamburger",category:"food",keywords:["burger","hamburger","fast food","nourriture"]},{emoji:"🍟",name:"french fries",category:"food",keywords:["fries","potato","fast food","nourriture"]},{emoji:"🍕",name:"pizza",category:"food",keywords:["pizza","slice","italian"]},{emoji:"🌭",name:"hot dog",category:"food",keywords:["hot dog","sausage","fast food","chien","nourriture"]},{emoji:"🥪",name:"sandwich",category:"food",keywords:["sandwich","bread","lunch"]},{emoji:"🌮",name:"taco",category:"food",keywords:["taco","mexican","shell"]},{emoji:"🌯",name:"burrito",category:"food",keywords:["burrito","wrap","mexican"]},{emoji:"🫔",name:"tamale",category:"food",keywords:["tamale","mexican","corn"]},{emoji:"🥙",name:"stuffed flatbread",category:"food",keywords:["pita","flatbread","stuffed"]},{emoji:"🧆",name:"falafel",category:"food",keywords:["falafel","middle eastern","chickpea"]},{emoji:"🥚",name:"egg",category:"food",keywords:["egg","protein","breakfast"]},{emoji:"🍳",name:"cooking",category:"food",keywords:["cooking","frying pan","egg"]},{emoji:"🥘",name:"shallow pan of food",category:"food",keywords:["paella","pan","cooking"]},{emoji:"🍲",name:"pot of food",category:"food",keywords:["stew","pot","cooking"]},{emoji:"🫕",name:"fondue",category:"food",keywords:["fondue","cheese","pot"]},{emoji:"🥣",name:"bowl with spoon",category:"food",keywords:["bowl","cereal","soup"]},{emoji:"🥗",name:"green salad",category:"food",keywords:["salad","healthy","greens"]},{emoji:"🍿",name:"popcorn",category:"food",keywords:["popcorn","movie","snack"]},{emoji:"🧈",name:"butter",category:"food",keywords:["butter","dairy","spread"]},{emoji:"🧂",name:"salt",category:"food",keywords:["salt","seasoning","white","blanc"]},{emoji:"🥫",name:"canned food",category:"food",keywords:["can","canned","preserved"]},{emoji:"🍱",name:"bento box",category:"food",keywords:["bento","japanese","lunch box"]},{emoji:"🍘",name:"rice cracker",category:"food",keywords:["rice","cracker","japanese"]},{emoji:"🍙",name:"rice ball",category:"food",keywords:["rice ball","onigiri","japanese"]},{emoji:"🍚",name:"cooked rice",category:"food",keywords:["rice","cooked","bowl"]},{emoji:"🍛",name:"curry rice",category:"food",keywords:["curry","rice","spicy"]},{emoji:"🍜",name:"steaming bowl",category:"food",keywords:["ramen","noodles","soup"]},{emoji:"🍝",name:"spaghetti",category:"food",keywords:["spaghetti","pasta","italian"]},{emoji:"🍠",name:"roasted sweet potato",category:"food",keywords:["sweet potato","roasted","orange"]},{emoji:"🍢",name:"oden",category:"food",keywords:["oden","japanese","skewer"]},{emoji:"🍣",name:"sushi",category:"food",keywords:["sushi","japanese","fish"]},{emoji:"🍤",name:"fried shrimp",category:"food",keywords:["shrimp","fried","tempura"]},{emoji:"🍥",name:"fish cake with swirl",category:"food",keywords:["fish cake","japanese","swirl"]},{emoji:"🥮",name:"moon cake",category:"food",keywords:["moon cake","chinese","festival","lune"]},{emoji:"🍡",name:"dango",category:"food",keywords:["dango","japanese","sweet"]},{emoji:"🥟",name:"dumpling",category:"food",keywords:["dumpling","chinese","steamed"]},{emoji:"🥠",name:"fortune cookie",category:"food",keywords:["fortune cookie","chinese","luck"]},{emoji:"🥡",name:"takeout box",category:"food",keywords:["takeout","chinese","box"]},{emoji:"🦀",name:"crab",category:"food",keywords:["crab","seafood","claws"]},{emoji:"🦞",name:"lobster",category:"food",keywords:["lobster","seafood","red","rouge"]},{emoji:"🦐",name:"shrimp",category:"food",keywords:["shrimp","seafood","small"]},{emoji:"🦑",name:"squid",category:"food",keywords:["squid","seafood","tentacles"]},{emoji:"🦪",name:"oyster",category:"food",keywords:["oyster","seafood","shell"]},{emoji:"🍦",name:"soft ice cream",category:"food",keywords:["ice cream","soft serve","cone"]},{emoji:"🍧",name:"shaved ice",category:"food",keywords:["shaved ice","snow cone","cold"]},{emoji:"🍨",name:"ice cream",category:"food",keywords:["ice cream","dessert","cold"]},{emoji:"🍩",name:"doughnut",category:"food",keywords:["donut","doughnut","sweet"]},{emoji:"🍪",name:"cookie",category:"food",keywords:["cookie","sweet","baked"]},{emoji:"🎂",name:"birthday cake",category:"food",keywords:["cake","birthday","celebration","fête"]},{emoji:"🍰",name:"shortcake",category:"food",keywords:["cake","slice","dessert"]},{emoji:"🧁",name:"cupcake",category:"food",keywords:["cupcake","muffin","sweet"]},{emoji:"🥧",name:"pie",category:"food",keywords:["pie","dessert","slice"]},{emoji:"🍫",name:"chocolate bar",category:"food",keywords:["chocolate","bar","sweet"]},{emoji:"🍬",name:"candy",category:"food",keywords:["candy","sweet","wrapper"]},{emoji:"🍭",name:"lollipop",category:"food",keywords:["lollipop","candy","stick"]},{emoji:"🍮",name:"custard",category:"food",keywords:["custard","pudding","dessert"]},{emoji:"🍯",name:"honey pot",category:"food",keywords:["honey","sweet","bee"]},{emoji:"🍼",name:"baby bottle",category:"food",keywords:["bottle","baby","milk"]},{emoji:"🥛",name:"glass of milk",category:"food",keywords:["milk","glass","dairy"]},{emoji:"☕",name:"hot beverage",category:"food",keywords:["coffee","tea","hot","café"]},{emoji:"🫖",name:"teapot",category:"food",keywords:["teapot","tea","hot"]},{emoji:"🍵",name:"teacup without handle",category:"food",keywords:["tea","green tea","cup","vert"]},{emoji:"🍶",name:"sake",category:"food",keywords:["sake","japanese","alcohol"]},{emoji:"🍾",name:"bottle with popping cork",category:"food",keywords:["champagne","celebration","cork","fête"]},{emoji:"🍷",name:"wine glass",category:"food",keywords:["wine","glass","alcohol"]},{emoji:"🍸",name:"cocktail glass",category:"food",keywords:["cocktail","martini","alcohol"]},{emoji:"🍹",name:"tropical drink",category:"food",keywords:["tropical","cocktail","umbrella"]},{emoji:"🍺",name:"beer mug",category:"food",keywords:["beer","mug","alcohol"]},{emoji:"🍻",name:"clinking beer mugs",category:"food",keywords:["beer","cheers","celebration","fête"]},{emoji:"🥂",name:"clinking glasses",category:"food",keywords:["champagne","cheers","celebration","fête"]},{emoji:"🥃",name:"tumbler glass",category:"food",keywords:["whiskey","tumbler","alcohol"]},{emoji:"🫗",name:"pouring liquid",category:"food",keywords:["pour","liquid","drink","boisson"]},{emoji:"🥤",name:"cup with straw",category:"food",keywords:["soda","straw","drink","boisson"]},{emoji:"🧋",name:"bubble tea",category:"food",keywords:["bubble tea","boba","drink","boisson"]},{emoji:"🧃",name:"beverage box",category:"food",keywords:["juice box","drink","straw","boisson"]},{emoji:"🧉",name:"mate",category:"food",keywords:["mate","tea","south american"]},{emoji:"🧊",name:"ice",category:"food",keywords:["ice","cold","cube"]},{emoji:"⚽",name:"soccer ball",category:"activities",keywords:["soccer","football","sport"]},{emoji:"🏀",name:"basketball",category:"activities",keywords:["basketball","sport"]},{emoji:"🏈",name:"american football",category:"activities",keywords:["football","sport"]},{emoji:"⚾",name:"baseball",category:"activities",keywords:["baseball","sport"]},{emoji:"🥎",name:"softball",category:"activities",keywords:["softball","sport"]},{emoji:"🎾",name:"tennis",category:"activities",keywords:["tennis","sport"]},{emoji:"🚗",name:"automobile",category:"travel",keywords:["car","vehicle"]},{emoji:"🚕",name:"taxi",category:"travel",keywords:["taxi","car"]},{emoji:"🚙",name:"sport utility vehicle",category:"travel",keywords:["suv","car"]},{emoji:"🚌",name:"bus",category:"travel",keywords:["bus","vehicle"]},{emoji:"🚎",name:"trolleybus",category:"travel",keywords:["trolley","bus"]},{emoji:"🏎️",name:"racing car",category:"travel",keywords:["race","car","fast"]},{emoji:"💡",name:"light bulb",category:"objects",keywords:["idea","light","bulb","lumière"]},{emoji:"🔋",name:"battery",category:"objects",keywords:["battery","power"]},{emoji:"🖥️",name:"desktop computer",category:"objects",keywords:["computer","desktop","ordinateur"]},{emoji:"💻",name:"laptop",category:"objects",keywords:["laptop","computer","ordinateur"]},{emoji:"📱",name:"mobile phone",category:"objects",keywords:["phone","mobile"]},{emoji:"☎️",name:"telephone",category:"objects",keywords:["phone","telephone"]},{emoji:"❤️",name:"red heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"🧡",name:"orange heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"💛",name:"yellow heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"💚",name:"green heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"💙",name:"blue heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"💜",name:"purple heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"🖤",name:"black heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"🤍",name:"white heart",category:"symbols",keywords:["love","heart","amour","cœur"]},{emoji:"🏁",name:"chequered flag",category:"flags",keywords:["flag","race","finish","drapeau"]},{emoji:"🚩",name:"triangular flag",category:"flags",keywords:["flag","warning","drapeau","attention"]},{emoji:"🏳️",name:"white flag",category:"flags",keywords:["flag","surrender","drapeau"]},{emoji:"🏴",name:"black flag",category:"flags",keywords:["flag","pirate","drapeau"]},{emoji:"🏳️‍🌈",name:"rainbow flag",category:"flags",keywords:["flag","rainbow","pride","drapeau","arc-en-ciel"]},{emoji:"🔥",name:"fire",category:"symbols",keywords:["fire","feu"]},{emoji:"✨",name:"sparkles",category:"symbols",keywords:["sparkle","étoile"]},{emoji:"⭐",name:"white medium star",category:"travel",keywords:["star","étoile"]},{emoji:"🎯",name:"direct hit",category:"symbols",keywords:["target","cible","objectif"]},{emoji:"🚀",name:"rocket",category:"symbols",keywords:["rocket","fusée","lancement"]},{emoji:"✅",name:"white heavy check mark",category:"symbols",keywords:["check","done","terminé"]},{emoji:"❌",name:"cross mark",category:"symbols",keywords:["cross","erreur"]},{emoji:"⚠️",name:"warning sign",category:"symbols",keywords:["warning","attention"]},{emoji:"📌",name:"pushpin",category:"objects",keywords:["pin","épingle"]},{emoji:"📝",name:"memo",category:"objects",keywords:["note","texte","écrire"]},{emoji:"📁",name:"file folder",category:"objects",keywords:["folder","dossier"]},{emoji:"📅",name:"calendar",category:"objects",keywords:["calendar","calendrier"]},{emoji:"📊",name:"bar chart",category:"objects",keywords:["chart","graphique"]},{emoji:"🔗",name:"link symbol",category:"objects",keywords:["link","lien"]},{emoji:"🔒",name:"lock",category:"objects",keywords:["lock","verrou"]},{emoji:"💬",name:"speech balloon",category:"activities",keywords:["chat","discussion"]},{emoji:"🤖",name:"robot face",category:"smileys",keywords:["robot","ai","ia"]},{emoji:"🌍",name:"earth globe europe-africa",category:"travel",keywords:["world","monde"]},{emoji:"🎉",name:"party popper",category:"activities",keywords:["party","fête"]},{emoji:"🏆",name:"trophy",category:"activities",keywords:["trophy","trophée","victoire"]},{emoji:"🫠",name:"melting face",category:"smileys",keywords:["melting","face","visage"]},{emoji:"😕",name:"confused face",category:"smileys",keywords:["confused","face","confus","visage"]},{emoji:"🫤",name:"face with diagonal mouth",category:"smileys",keywords:["face","with","diagonal","mouth","visage"]},{emoji:"😟",name:"worried face",category:"smileys",keywords:["worried","face","inquiet","visage"]},{emoji:"🙁",name:"slightly frowning face",category:"smileys",keywords:["slightly","frowning","face","visage"]},{emoji:"☹️",name:"white frowning face",category:"smileys",keywords:["white","frowning","face","blanc","visage"]},{emoji:"😮",name:"face with open mouth",category:"smileys",keywords:["face","with","open","mouth","visage"]},{emoji:"😯",name:"hushed face",category:"smileys",keywords:["hushed","face","visage"]},{emoji:"😲",name:"astonished face",category:"smileys",keywords:["astonished","face","visage"]},{emoji:"😳",name:"flushed face",category:"smileys",keywords:["flushed","face","visage"]},{emoji:"🥺",name:"face with pleading eyes",category:"smileys",keywords:["face","with","pleading","eyes","visage","supplier","yeux"]},{emoji:"🥹",name:"face holding back tears",category:"smileys",keywords:["face","holding","back","tears","visage"]},{emoji:"😦",name:"frowning face with open mouth",category:"smileys",keywords:["frowning","face","with","open","mouth","visage"]},{emoji:"😧",name:"anguished face",category:"smileys",keywords:["anguished","face","visage"]},{emoji:"😨",name:"fearful face",category:"smileys",keywords:["fearful","face","effrayé","visage"]},{emoji:"😰",name:"face with open mouth and cold sweat",category:"smileys",keywords:["face","with","open","mouth","and","cold","sweat","visage"]},{emoji:"😥",name:"disappointed but relieved face",category:"smileys",keywords:["disappointed","but","relieved","face","visage"]},{emoji:"😢",name:"crying face",category:"smileys",keywords:["crying","face","visage"]},{emoji:"😭",name:"loudly crying face",category:"smileys",keywords:["loudly","crying","face","visage"]},{emoji:"😱",name:"face screaming in fear",category:"smileys",keywords:["face","screaming","in","fear","visage"]},{emoji:"😖",name:"confounded face",category:"smileys",keywords:["confounded","face","visage"]},{emoji:"😣",name:"persevering face",category:"smileys",keywords:["persevering","face","visage"]},{emoji:"😞",name:"disappointed face",category:"smileys",keywords:["disappointed","face","visage"]},{emoji:"😓",name:"face with cold sweat",category:"smileys",keywords:["face","with","cold","sweat","visage"]},{emoji:"😩",name:"weary face",category:"smileys",keywords:["weary","face","fatigué","visage"]},{emoji:"😫",name:"tired face",category:"smileys",keywords:["tired","face","fatigué","visage"]},{emoji:"🥱",name:"yawning face",category:"smileys",keywords:["yawning","face","visage"]},{emoji:"😤",name:"face with look of triumph",category:"smileys",keywords:["face","with","look","of","triumph","visage"]},{emoji:"😡",name:"pouting face",category:"smileys",keywords:["pouting","face","visage"]},{emoji:"😠",name:"angry face",category:"smileys",keywords:["angry","face","colère","visage"]},{emoji:"🤬",name:"serious face with symbols covering mouth",category:"smileys",keywords:["serious","face","with","symbols","covering","mouth","visage"]},{emoji:"😈",name:"smiling face with horns",category:"smileys",keywords:["smiling","face","with","horns","visage"]},{emoji:"👿",name:"imp",category:"smileys",keywords:["imp"]},{emoji:"💀",name:"skull",category:"smileys",keywords:["skull","crâne"]},{emoji:"☠️",name:"skull and crossbones",category:"smileys",keywords:["skull","and","crossbones","crâne"]},{emoji:"💩",name:"pile of poo",category:"smileys",keywords:["pile","of","poo"]},{emoji:"🤡",name:"clown face",category:"smileys",keywords:["clown","face","visage"]},{emoji:"👻",name:"ghost",category:"smileys",keywords:["ghost","fantôme"]},{emoji:"👽",name:"extraterrestrial alien",category:"symbols",keywords:["extraterrestrial","alien"]},{emoji:"👾",name:"alien monster",category:"symbols",keywords:["alien","monster"]},{emoji:"😺",name:"smiling cat face with open mouth",category:"smileys",keywords:["smiling","cat","face","with","open","mouth","chat","visage"]},{emoji:"😸",name:"grinning cat face with smiling eyes",category:"smileys",keywords:["grinning","cat","face","with","smiling","eyes","chat","visage","yeux"]},{emoji:"😹",name:"cat face with tears of joy",category:"smileys",keywords:["cat","face","with","tears","of","joy","chat","visage","joie"]},{emoji:"😻",name:"smiling cat face with heart-shaped eyes",category:"smileys",keywords:["smiling","cat","face","with","heart-shaped","eyes","chat","visage","yeux"]},{emoji:"😼",name:"cat face with wry smile",category:"smileys",keywords:["cat","face","with","wry","smile","chat","visage","sourire"]},{emoji:"😽",name:"kissing cat face with closed eyes",category:"smileys",keywords:["kissing","cat","face","with","closed","eyes","chat","visage","yeux"]},{emoji:"🙀",name:"weary cat face",category:"smileys",keywords:["weary","cat","face","fatigué","chat","visage"]},{emoji:"😿",name:"crying cat face",category:"smileys",keywords:["crying","cat","face","chat","visage"]},{emoji:"😾",name:"pouting cat face",category:"smileys",keywords:["pouting","cat","face","chat","visage"]},{emoji:"💋",name:"kiss mark",category:"symbols",keywords:["kiss","mark","bisou"]},{emoji:"💌",name:"love letter",category:"symbols",keywords:["love","letter","amour"]},{emoji:"💘",name:"heart with arrow",category:"smileys",keywords:["heart","with","arrow","cœur"]},{emoji:"💝",name:"heart with ribbon",category:"smileys",keywords:["heart","with","ribbon","cœur"]},{emoji:"💖",name:"sparkling heart",category:"smileys",keywords:["sparkling","heart","cœur"]},{emoji:"💗",name:"growing heart",category:"smileys",keywords:["growing","heart","cœur"]},{emoji:"💓",name:"beating heart",category:"smileys",keywords:["beating","heart","cœur"]},{emoji:"💞",name:"revolving hearts",category:"smileys",keywords:["revolving","hearts"]},{emoji:"💕",name:"two hearts",category:"smileys",keywords:["two","hearts"]},{emoji:"💟",name:"heart decoration",category:"smileys",keywords:["heart","decoration","cœur"]},{emoji:"❣️",name:"heavy heart exclamation mark ornament",category:"smileys",keywords:["heavy","heart","exclamation","mark","ornament","cœur"]},{emoji:"💔",name:"broken heart",category:"smileys",keywords:["broken","heart","cœur"]},{emoji:"❤️‍🔥",name:"heavy black heart fire",category:"smileys",keywords:["heavy","black","heart","fire","noir","cœur","feu"]},{emoji:"❤️‍🩹",name:"heavy black heart adhesive bandage",category:"smileys",keywords:["heavy","black","heart","adhesive","bandage","noir","cœur"]},{emoji:"🩷",name:"pink heart",category:"smileys",keywords:["pink","heart","rose","cœur"]},{emoji:"🩵",name:"light blue heart",category:"smileys",keywords:["light","blue","heart","lumière","bleu","cœur"]},{emoji:"🤎",name:"brown heart",category:"smileys",keywords:["brown","heart","marron","cœur"]},{emoji:"🩶",name:"grey heart",category:"smileys",keywords:["grey","heart","gris","cœur"]},{emoji:"💯",name:"hundred points symbol",category:"symbols",keywords:["hundred","points","symbol"]},{emoji:"💢",name:"anger symbol",category:"symbols",keywords:["anger","symbol"]},{emoji:"💥",name:"collision symbol",category:"symbols",keywords:["collision","symbol"]},{emoji:"💫",name:"dizzy symbol",category:"symbols",keywords:["dizzy","symbol"]},{emoji:"💦",name:"splashing sweat symbol",category:"symbols",keywords:["splashing","sweat","symbol"]},{emoji:"💨",name:"dash symbol",category:"symbols",keywords:["dash","symbol"]},{emoji:"💭",name:"thought balloon",category:"activities",keywords:["thought","balloon","ballon"]},{emoji:"💤",name:"sleeping symbol",category:"symbols",keywords:["sleeping","symbol","dormir"]},{emoji:"🫶",name:"heart hands",category:"smileys",keywords:["heart","hands","cœur"]},{emoji:"🫰",name:"hand with index finger and thumb crossed",category:"people",keywords:["hand","with","index","finger","and","thumb","crossed","main","pouce"]},{emoji:"🎊",name:"confetti ball",category:"activities",keywords:["confetti","ball"]},{emoji:"🎈",name:"balloon",category:"activities",keywords:["balloon","ballon"]},{emoji:"🎁",name:"wrapped present",category:"symbols",keywords:["wrapped","present"]},{emoji:"🥇",name:"first place medal",category:"activities",keywords:["first","place","medal"]},{emoji:"🌟",name:"glowing star",category:"travel",keywords:["glowing","star","étoile"]},{emoji:"⚡",name:"high voltage sign",category:"symbols",keywords:["high","voltage","sign"]},{emoji:"🌈",name:"rainbow",category:"travel",keywords:["rainbow","arc-en-ciel"]},{emoji:"☀️",name:"black sun with rays",category:"travel",keywords:["black","sun","with","rays","noir","soleil"]},{emoji:"🌙",name:"crescent moon",category:"travel",keywords:["crescent","moon","lune"]},{emoji:"🎵",name:"musical note",category:"symbols",keywords:["musical","note","musique"]},{emoji:"🎶",name:"multiple musical notes",category:"symbols",keywords:["multiple","musical","notes","musique"]},{emoji:"🎨",name:"artist palette",category:"activities",keywords:["artist","palette"]},{emoji:"🎮",name:"video game",category:"activities",keywords:["video","game"]},{emoji:"📚",name:"books",category:"objects",keywords:["books","livres"]},{emoji:"🔑",name:"key",category:"objects",keywords:["key","clé"]},{emoji:"❓",name:"black question mark ornament",category:"symbols",keywords:["black","question","mark","ornament","noir"]},{emoji:"❗",name:"heavy exclamation mark symbol",category:"symbols",keywords:["heavy","exclamation","mark","symbol"]},{emoji:"🔔",name:"bell",category:"objects",keywords:["bell","cloche"]},{emoji:"♻️",name:"black universal recycling symbol",category:"symbols",keywords:["black","universal","recycling","symbol","noir"]},{emoji:"💎",name:"gem stone",category:"symbols",keywords:["gem","stone"]}],us=Array.from(Ef.reduce((e,o)=>{const r=e.get(o.emoji);return e.set(o.emoji,{...o,keywords:Array.from(new Set([...(r==null?void 0:r.keywords)||[],...o.keywords]))}),e},new Map).values()),ps=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],Ha=e=>e.toLowerCase().replace(/œ/g,"oe").replace(/æ/g,"ae").normalize("NFD").replace(/[\u0300-\u036f]/g,""),Af=e=>e&&typeof e.emoji=="string"&&typeof e.name=="string"&&ps.includes(e.category)&&Array.isArray(e.keywords)&&e.keywords.every(o=>typeof o=="string"),ms=e=>{const{value:o,defaultValue:r="",onChange:n,onEmojiSelect:a,isOpen:i,onOpen:l,onClose:u,closeOnSelect:c=!0,maxRecentEmojis:d=16,mode:g="picker",showRecentEmojis:m=g!=="reaction",enabledCategories:h=ps,customEmojis:f=[],isDisabled:y,isReadOnly:k}=e,[b,j]=p.useState(!1),x=i??b,[C,v]=p.useState(r),S=o??C,[I,w]=p.useState(""),[T,R]=p.useState(h.find(O=>O!=="recent")||"recent"),[E,F]=p.useState([]),[W,M]=p.useState(g!=="reaction"),z=p.useRef(null),H=p.useRef(null),V={...cs,...e.labels},P=p.useMemo(()=>Array.from(new Map([...us,...f].map(O=>[O.emoji,O])).values()),[f]),L=p.useMemo(()=>(e.quickEmojis??ds).map(O=>P.find(J=>J.emoji===O)??{emoji:O,name:O,category:"symbols",keywords:[]}),[P,e.quickEmojis]),B=p.useMemo(()=>{const O=P.filter(J=>h.includes(J.category));if(I.trim()){const J=Ha(I.trim());return O.filter(D=>Ha(`${D.emoji} ${D.name} ${D.keywords.join(" ")}`).includes(J))}return T==="recent"?E.filter(J=>h.includes(J.category)):O.filter(J=>J.category===T)},[P,T,E,I,h]);p.useEffect(()=>{if(!(!m||typeof localStorage>"u"))try{const O=JSON.parse(localStorage.getItem("emojiPicker-recentEmojis")||"[]");Array.isArray(O)&&F(O.filter(Af).slice(0,d))}catch{}},[m,d]),p.useEffect(()=>{h.includes(T)||R(h.find(O=>O!=="recent")||"recent")},[h,T]);const $=p.useCallback(()=>{j(!1),u==null||u()},[u]),q=p.useCallback(()=>{if(!(y||k)){if(x){$();return}j(!0),w(""),M(g!=="reaction"),R(m&&E.length&&h.includes("recent")?"recent":h.find(O=>O!=="recent")||"recent"),l==null||l()}},[x,y,k,$,g,m,E.length,h,l]),Y=p.useCallback(O=>{if(!(y||k)){if(v(O.emoji),m){const J=[O,...E.filter(D=>D.emoji!==O.emoji)].slice(0,Math.max(0,d));if(F(J),typeof localStorage<"u")try{localStorage.setItem("emojiPicker-recentEmojis",JSON.stringify(J))}catch{}}n==null||n(O.emoji),a==null||a(O),c&&$()}},[y,k,m,E,d,n,a,c,$]);return p.useEffect(()=>{if(!x||typeof document>"u"||typeof document.addEventListener!="function")return;const O=J=>{var D,A;(D=H.current)!=null&&D.contains&&((A=z.current)!=null&&A.contains)&&!H.current.contains(J.target)&&!z.current.contains(J.target)&&$()};return document.addEventListener("mousedown",O),()=>document.removeEventListener("mousedown",O)},[x,$]),{isOpen:x,selectedEmoji:S,recentEmojis:E,searchQuery:I,activeCategory:T,filteredEmojis:B,handleToggle:q,handleEmojiSelect:Y,handleSearchChange:w,handleCategoryChange:O=>{R(O),w("")},handleClose:$,triggerRef:z,dropdownRef:H,expanded:W,setExpanded:M,quickEmojiData:L,text:V}},jo={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"320px",maxHeight:"400px",overflow:"hidden"},categoryTabs:{display:"flex",flexDirection:"row",flexWrap:"wrap",borderBottom:"1px solid color-gray-100",marginBottom:"12px",overflowX:"auto"},categoryTab:{padding:"8px 12px",cursor:"pointer",borderBottom:"2px solid transparent",transition:"all 0.2s ease-in-out",fontSize:"14px",fontWeight:"500",color:"color-gray-600",whiteSpace:"nowrap",borderRadius:"8px 8px 0 0"},emojiGrid:{display:"grid",gridTemplateColumns:"repeat(8, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"4px",maxHeight:"240px",overflowY:"auto",padding:"4px",color:"color-black"},emoji:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:6,fontSize:"20px",transition:"all 0.2s ease-in-out"}},Hf={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},Vf={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Pf={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Df={recent:"🕒",smileys:"😀",people:"👤",animals:"🐶",food:"🍎",activities:"⚽",travel:"🚗",objects:"💡",symbols:"❤️",flags:"🏁"},gs=({id:e,name:o,label:r,placeholder:n,helperText:a,views:i={},size:l="md",shape:u="default",variant:c="default",error:d=!1,isDisabled:g=!1,isReadOnly:m=!1,showSearch:h=!0,showCategories:f=!0,showRecentEmojis:y=!0,enabledCategories:k=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],isOpen:b,selectedEmoji:j,recentEmojis:x,searchQuery:C,activeCategory:v,filteredEmojis:S,handleToggle:I,handleEmojiSelect:w,handleSearchChange:T,handleCategoryChange:R,handleClose:E,triggerRef:F,dropdownRef:W,mode:M="picker",trigger:z,quickEmojis:H,selectedEmojis:V=[],expanded:P,setExpanded:L,quickEmojiData:B,text:$,labels:q,onChange:Y,onOpen:O,onClose:J,onEmojiSelect:D,customEmojis:A,closeOnSelect:_,maxRecentEmojis:G,value:N,defaultValue:ee,...oe})=>{const ie=p.useId(),K=`${e||ie}-panel`,ae=p.useRef(!1),de=p.useCallback(re=>{var pe;W.current=re,(pe=re==null?void 0:re.querySelector("input,button"))==null||pe.focus({preventScroll:!0})},[W]),[fe,Ie]=p.useState({top:0,left:0,width:320,maxHeight:400}),ce=k.filter(re=>re!=="recent"||y&&x.length>0);p.useLayoutEffect(()=>{var pe,Q,te,be,xe;if(!b){ae.current&&(document.activeElement===document.body||(pe=W.current)!=null&&pe.contains(document.activeElement))&&((Q=F.current)==null||Q.focus({preventScroll:!0})),ae.current=!1;return}const re=()=>{var Bo;const ye=(Bo=F.current)==null?void 0:Bo.getBoundingClientRect();if(!ye)return;const he=window.visualViewport,Ve=Math.min(320,((he==null?void 0:he.width)??window.innerWidth)-16),Pe=(he==null?void 0:he.offsetLeft)??0,Me=(he==null?void 0:he.offsetTop)??0,De=Me+((he==null?void 0:he.height)??window.innerHeight)-8;if(ye.bottom<Me||ye.top>De){E();return}const mt=P?400:64,$o=ye.top-Me-16,io=De-ye.bottom-8,Lo=io<mt&&$o>io,Ze=Math.min(mt,Math.max(64,Lo?$o:io));Ie({width:Ve,maxHeight:Ze,left:Math.max(Pe+8,Math.min(ye.left,Pe+((he==null?void 0:he.width)??window.innerWidth)-Ve-8)),top:Lo?Math.max(Me+8,ye.top-Ze-8):ye.bottom+8})};return re(),ae.current||(be=(te=W.current)==null?void 0:te.querySelector("input,button"))==null||be.focus({preventScroll:!0}),ae.current=!0,window.addEventListener("scroll",re,!0),window.addEventListener("resize",re),(xe=window.visualViewport)==null||xe.addEventListener("resize",re),()=>{var ye;window.removeEventListener("scroll",re,!0),window.removeEventListener("resize",re),(ye=window.visualViewport)==null||ye.removeEventListener("resize",re)}},[b,P]);const le=re=>w(re),se=(re,pe=!1)=>t.jsx(s.View,{as:"button",type:"button","data-emoji-choice":re.emoji,"aria-label":re.name,"aria-pressed":M==="reaction"?V.includes(re.emoji):j===re.emoji,disabled:g||m,...jo.emoji,width:40,height:44,flex:pe?1:void 0,borderWidth:0,backgroundColor:V.includes(re.emoji)?"color-blue-50":"transparent",_hover:{backgroundColor:"color-gray-100"},_focusVisible:{outline:"2px solid",outlineColor:"theme-primary"},...i.emoji,onClick:()=>le(re),title:re.name,children:re.emoji},re.emoji);return t.jsxs(s.View,{id:e,...jo.container,...i.container,...oe,children:[r&&t.jsx(s.Text,{marginBottom:4,...i.label,children:r}),t.jsx(s.View,{ref:F,as:"button",type:"button",name:o,disabled:g||m,"aria-label":oe["aria-label"]||r||(M==="reaction"?$.reaction:$.select),"aria-haspopup":"dialog","aria-expanded":b,"aria-controls":b?K:void 0,...jo.trigger,...Hf[l],...Vf[u],...Pf[c],borderColor:d?"theme-error":"color-gray-200",opacity:g?.6:1,_focusVisible:{outline:"2px solid",outlineColor:"theme-primary"},...i.trigger,onClick:I,children:z??t.jsxs(s.Horizontal,{gap:8,children:[t.jsx(s.Text,{children:M==="reaction"?"☺ +":j||n||$.select}),M!=="reaction"&&t.jsx(s.Text,{"aria-hidden":"true",children:b?"▴":"▾"})]})}),b&&t.jsx(At,{children:t.jsxs(s.View,{ref:de,id:K,role:"dialog","aria-label":M==="reaction"?$.reaction:$.select,...jo.dropdown,...i.dropdown,position:"fixed",top:fe.top,left:fe.left,right:"auto",width:fe.width,minWidth:0,maxHeight:fe.maxHeight,overflowY:"auto",padding:M==="reaction"&&!P?8:12,zIndex:1100,onKeyDown:re=>{var ye,he,Ve,Pe,Me,De;if(re.key==="Escape"){re.preventDefault(),re.stopPropagation(),E(),(ye=F.current)==null||ye.focus();return}const pe=Array.from(((he=W.current)==null?void 0:he.querySelectorAll("button:not(:disabled)"))||[]),Q=pe.indexOf(document.activeElement);if(re.key==="Tab"){(re.shiftKey&&Q<=0||!re.shiftKey&&Q===pe.length-1)&&E();return}if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(re.key)||!pe.length||re.target.tagName==="INPUT"&&re.key!=="ArrowDown")return;re.preventDefault();const te=(Ve=document.activeElement)==null?void 0:Ve.closest("[data-emoji-grid]"),be=["ArrowUp","ArrowDown"].includes(re.key)&&te?8:1,xe=re.key==="Home"?0:re.key==="End"?pe.length-1:(Q+(["ArrowLeft","ArrowUp"].includes(re.key)?-be:be)+pe.length)%pe.length;(Pe=pe[xe])==null||Pe.focus(),(De=(Me=pe[xe])==null?void 0:Me.scrollIntoView)==null||De.call(Me,{block:"nearest"})},children:[M==="reaction"&&t.jsxs(s.Horizontal,{gap:2,children:[B.map(re=>se(re,!0)),t.jsx(s.View,{as:"button",type:"button",disabled:g||m,"aria-label":$.more,"aria-expanded":P,minWidth:40,minHeight:44,borderWidth:0,borderRadius:8,onClick:()=>L(!P),children:"+"})]}),P&&t.jsxs(t.Fragment,{children:[h&&t.jsx(s.View,{marginBottom:8,...i.searchInput,children:t.jsx(Be,{value:C,onChange:T,placeholder:$.search,"aria-label":$.search,isDisabled:g||m,size:"sm"})}),f&&t.jsx(s.View,{role:"tablist","aria-label":$.select,...jo.categoryTabs,...i.categoryTabs,children:ce.map(re=>t.jsx(s.View,{as:"button",type:"button",role:"tab","aria-label":$[re],"aria-selected":re===v,disabled:g||m,title:$[re],...jo.categoryTab,borderWidth:0,minHeight:44,padding:8,backgroundColor:re===v?"color-blue-50":"transparent",...i.categoryTab,onClick:()=>R(re),children:Df[re]},re))}),t.jsxs(s.View,{"data-emoji-grid":"true",role:"group","aria-label":$.select,...jo.emojiGrid,gridTemplateColumns:"repeat(8, minmax(0, 1fr))",...i.emojiGrid,children:[S.map(re=>se(re)),!S.length&&t.jsx(s.Text,{gridColumn:"1 / -1",children:C?$.empty:$.categoryEmpty})]})]})]})}),a&&t.jsx(s.Text,{color:d?"theme-error":"theme-muted",...i.helperText,children:a})]})},$f=e=>{const o=ms(e);return t.jsx(gs,{...o,...e})},hs=$f,Lf=["paragraph","h1","h2","h3","bullet","number","quote","codeBlock","table"];function Io(e){const o=e.trim();return!!o&&!/[\u0000-\u0020\u007f\\]/.test(o)&&(!/^[a-z][a-z\d+.-]*:/i.test(o)||/^(https?:|mailto:|tel:)/i.test(o))}function Bf(e){const o=/^(!?)\[((?:\\.|[^\]\\\n])*)\]\(/.exec(e);if(!o)return null;let r=o[0].length;const n=r;let a=0;for(;r<e.length;r++){if(e[r]==="\\"){r++;continue}if(e[r]==="(")a++;else if(e[r]===")"){if(!a)break;a--}else if(/\s/.test(e[r]))break}const i=e.slice(n,r).replace(/\\([()\\])/g,"$1"),l=/^(?:[ \t]+(?:"([^"\n]*)"|'([^'\n]*)'))?\)/.exec(e.slice(r));return l?{image:!!o[1],label:o[2],url:i,title:l[1]??l[2],labelStart:o[1].length+1,length:r+l[0].length}:null}function fr(e){return Io(e)&&!/^(?:mailto|tel):/i.test(e.trim())}function _f(e){return/^[a-z][a-z\d+.-]*:\/\/[^\s\\]+$/i.test(e)&&!/^(?:javascript|vbscript|data|file|blob):/i.test(e)}function ro(e,o=0,r=0,n=!1){var u;if(r>20)return[{kind:"text",text:e,start:o,end:o+e.length}];const a=[];let i=0;const l=(c,d,g)=>a.push({kind:"text",text:c,start:o+d,end:o+g});for(;i<e.length;){const c=n&&/^(?: {2,}|\\)\r?\n/.exec(e.slice(i));if(c){a.push({kind:"break",start:o+i,end:o+i+c[0].length}),i+=c[0].length;continue}if(e[i]==="\\"&&/[\\`*{}\[\]()#+.!_>~|]/.test(e[i+1]||"")){l(e[i+1],i+1,i+2),i+=2;continue}const d=/^<br\s*\/?\s*>/i.exec(e.slice(i));if(d){a.push({kind:"break",start:o+i,end:o+i+d[0].length}),i+=d[0].length;continue}const g=/^`+/.exec(e.slice(i));if(g){const k=e.indexOf(g[0],i+g[0].length);if(k>=0){a.push({kind:"code",text:e.slice(i+g[0].length,k),start:o+i,end:o+k+g[0].length,contentStart:o+i+g[0].length}),i=k+g[0].length;continue}}const m=n&&Bf(e.slice(i));if(m){a.push({kind:m.image?"image":"link",start:o+i,end:o+i+m.length,url:m.url,title:m.title,text:m.image?m.label.replace(/\\([\\`*{}\[\]()#+.!_>~|])/g,"$1"):void 0,children:m.image?void 0:ro(m.label,o+i+m.labelStart,r+1,n)}),i+=m.length;continue}const h=!n&&/^\[([^\]\n]+)\]\(([^\s()]*)\)/.exec(e.slice(i));if(h){a.push({kind:"link",start:o+i,end:o+i+h[0].length,url:h[2],children:ro(h[1],o+i+1,r+1)}),i+=h[0].length;continue}const f=[["***","***","bold"],["**","**","bold"],["__","__","bold"],["~~","~~","strikethrough"],["<u>","</u>","underline"],["`","`","code"],["*","*","italic"],["_","_","italic"]];let y=!1;for(const[k,b,j]of f){if(!e.startsWith(k,i))continue;let x=e.indexOf(b,i+k.length);for(;x>=0&&e[x-1]==="\\";)x=e.indexOf(b,x+b.length);if((k==="*"||k==="_")&&e.startsWith(k+k,x)){const S=e.indexOf(k+k,x+2);S>=0&&(x=e.indexOf(k,S+2))}if((k==="**"||k==="__")&&e[x+2]===k[0]&&(((u=e.slice(i+2,x).match(new RegExp(`\\${k[0]}(?!\\${k[0]})`,"g")))==null?void 0:u.length)||0)%2===1&&x++,x<=i+k.length||k==="_"&&/\w/.test(e[i-1]||"")&&/\w/.test(e[x+1]||""))continue;const C=e.slice(i+k.length,x);let v=j==="code"?void 0:ro(C,o+i+k.length,r+1,n);k==="***"&&(v=[{kind:"italic",start:o+i+2,end:o+x+1,children:v}]),a.push({kind:j,start:o+i,end:o+x+b.length,text:j==="code"?C:void 0,children:v}),y=!0,i=x+b.length;break}y||(l(e[i],i,i+1),i++)}return a.reduce((c,d)=>{const g=c[c.length-1];return(g==null?void 0:g.kind)==="text"&&d.kind==="text"&&g.end===d.start?(g.text+=d.text,g.end=d.end):c.push(d),c},[])}function yr(e,o=[],r,{display:n=!1}={}){var k,b,j;const a=e.replace(n?/^ {0,3}(`{3,}|~{3,})[^\n]*\n[\s\S]*?(?:^ {0,3}\1[ \t]*$|(?![\s\S]))/gm:/^ {0,3}(`{3,}|~{3,})[^\n]*\n[\s\S]*?^ {0,3}\1\s*$/gm,"").replace(/`[^`\n]*`/g,""),i=n?/^(?:import |export |\s*:::|\s*\[.+\]:|\s*={3,}\s*$)|\[\^[^\]]+\]|\$\$|\{[^}\n]*\}|<(?!(?:\/?u>|br\s*\/?>))\/?[A-Za-z!]|&(?:#\w+|\w+);/m.test(a)||/^(?:---|\+\+\+)[ \t]*\r?\n[ \t]*[\w-]+:/.test(e)||/^(?:>[ \t]*>| {1,3}#{1,6}\s|#{1,6}\t|[ \t]{2,}(?:>|#{1,6}\s|\|))|^[ \t]{2,}(?:`{3,}|~{3,})/m.test(a):/^(?:import |export |-{3,}\s*$|\+\+\+\s*$|\s*:::|\s*\[.+\]:|\s*#{4,}\s|\s*(?:\*\s*){3,}$|\s*(?:-\s*){3,}$|\s*(?:_\s*){3,}$|\s*={3,}\s*$)|!\[|\[\^[^\]]+\]|\$\$|\{[^}\n]*\}|<(?!(?:\/?u>|br\s*\/?>))\/?[A-Za-z!]|&(?:#\w+|\w+);/m.test(a)||/^[ \t]{2,}(?:`{3,}|~{3,})/m.test(e)||/^(?:>[ \t]*>| {1,3}#{1,6}\s|#{1,6}\t|[ \t]{2,}(?:>|#{1,6}\s|\|)|[ \t]*(?:[-*+] |\d+[.)] )\[[ xX]\])|(?: {2,}|\\)\r?$/m.test(a)||Array.from(a.matchAll(/\[[^\]\n]+\]\(([^)\n]*)\)/g)).some(x=>/[\s(]/.test(x[1])||!Io(x[1]))||a.split(/\r?\n/).some(x=>ro(x.trim(),0,0,!0).some(C=>C.kind==="link"&&C.title==="video")),l=[],u=/[^\r\n]+|\r\n|\n|\r/g;let c=0;for(const x of e.matchAll(u))/^[\r\n]/.test(x[0])&&(l.push({text:e.slice(c,x.index),start:c,end:x.index}),c=x.index+x[0].length);(c<e.length||!l.length)&&l.push({text:e.slice(c),start:c,end:e.length});const d=[],g=new Set;let m=i;const h=/^\s*(?:[-*+] |\d+[.)] )/,f=/^\s*\|?\s*:?-{3,}:?\s*(?:\|\s*:?-{3,}:?\s*)+\|?\s*$/,y=/^ {0,3}(?:(?:\*[ \t]*){3,}|(?:-[ \t]*){3,}|(?:_[ \t]*){3,})$/;for(let x=0;x<l.length;){if(!l[x].text.trim()){const P=x;for(;x<l.length&&!l[x].text.trim();)x++;const L=x-P,B=!d.length,$=B?Math.floor(L/2)+(x===l.length?1:0):x===l.length?Math.ceil(L/2):Math.floor(L/2);for(let q=0;q<$;q++){const Y=((k=l[P+q*2+(B?0:1)])==null?void 0:k.start)??e.length,O=((b=o.find(J=>!J.raw&&!g.has(J.id)))==null?void 0:b.id)||Zo("block");g.add(O),d.push({id:O,kind:"paragraph",raw:"",body:"",start:Y,end:Y,bodyStart:Y})}continue}const C=l[x];let v=x,S="paragraph",I=0,w;const T=(n?/^(#{1,6}) (.*)$/:/^(#{1,3}) (.*)$/).exec(C.text),R=/^ {0,3}(`{3,}|~{3,})([\w+-]*)\s*$/.exec(C.text);let E=!1;if(n&&y.test(C.text))S="hr";else if(T)S=`h${T[1].length}`,I=T[1].length+1;else if(R){for(S="codeBlock",w=R[2],v++;v<l.length&&!new RegExp(`^ {0,3}${R[1][0]}{${R[1].length},}\\s*$`).test(l[v].text);)v++;v>=l.length&&(n||(m=!0),E=!0,v=l.length-1),I=C.end-C.start+(e.slice(C.end,C.end+2)===`\r
24
- `?2:1)}else if(x+1<l.length&&C.text.includes("|")&&f.test(l[x+1].text))for(S="table",v=x+1;v+1<l.length&&l[v+1].text.trim()&&l[v+1].text.includes("|");)v++;else if(h.test(C.text)){for(S=/^\s*\d/.test(C.text)?"number":"bullet";v+1<l.length&&l[v+1].text.trim()&&(h.test(l[v+1].text)||/^\s{2,}\S/.test(l[v+1].text));)v++;I=C.text.match(h)[0].length}else if(/^> ?/.test(C.text))for(S="quote",I=C.text.match(/^> ?/)[0].length;v+1<l.length&&/^> ?/.test(l[v+1].text);)v++;else{for(;v+1<l.length&&l[v+1].text.trim()&&!/^(?:#{1,6} |>|`{3}|~{3})/.test(l[v+1].text)&&!(n&&y.test(l[v+1].text))&&!h.test(l[v+1].text);)v++;/^ {4}\S/.test(C.text)&&(m=!0)}const F=e.slice(C.start,l[v].end),W=o.find(P=>P.id===r&&P.start===C.start&&!g.has(P.id)),M=o[d.length],z=W||o.find(P=>P.raw===F&&!g.has(P.id))||(M&&!g.has(M.id)&&e.indexOf(M.raw,l[v].end)<0?M:void 0),H=(z==null?void 0:z.id)||Zo("block");g.add(H);let V=F.slice(I);S==="codeBlock"&&(V=e.slice(C.start+I,E?l[v].end:l[v].start).replace(/\r?\n$/,"")),d.push({id:H,kind:S,raw:F,start:C.start,end:l[v].end,body:V,bodyStart:C.start+I,language:w}),x=v+1}return d.length||d.push({id:((j=o[0])==null?void 0:j.id)||Zo("block"),kind:"paragraph",raw:"",body:"",start:e.length,end:e.length,bodyStart:e.length}),{blocks:d,sourceMode:m}}function mo(e,o,r){const n=Math.max(0,Math.min(o.start,e.length)),a=Math.max(n,Math.min(o.end,e.length));return e.slice(0,n)+r+e.slice(a)}function Of(e,o){const r=e.kind==="codeBlock"?e.body:e.raw.replace(/^(?:#{1,3} |\s*[-*+] |\s*\d+[.)] |> ?)/gm,"");if(o==="codeBlock"){const a="`".repeat(Math.max(3,...Array.from(r.matchAll(/`+/g),i=>i[0].length+1)));return`${a}
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const P=require("./chunks/designSystem.page-B74Vm2Dt.cjs"),n=require("react/jsx-runtime"),C=require("react"),h=require("app-studio"),ht=require("./chunks/Select.view-Pq1yAcMm.cjs"),E=require("./chunks/Icon-C37alecH.cjs"),Nt=require("./chunks/Alert-Bjl40k3x.cjs"),ce=require("./chunks/Formik.Uploader-D0nzjyau.cjs"),Ut=require("./chunks/Avatar-BB0DeN9j.cjs"),_t=require("./chunks/Card-CNSl9fD5.cjs"),$e=require("./chunks/Loader-4V81BN95.cjs"),qt=require("./chunks/Select-C6R0Tei-.cjs"),Xt=require("./chunks/Switch-D80yPNFV.cjs"),K=require("./chunks/AttachmentPreview-Bwrz5TJh.cjs"),Me=require("./chunks/TextField-Da4JCcAU.cjs"),Yt=require("./chunks/Checkbox-CAI6RtuO.cjs"),Ye=require("./link.cjs.js"),vt=require("./chunks/Tabs-DQeBJwkz.cjs"),ye=require("./theme.cjs.js"),Qe=require("./presets.cjs.js"),we=require("./chunks/Modal-zok954As.cjs"),Je=require("./chunks/Router-DjmVh9pK.cjs"),et=require("./chunks/Router.store-Bxe2uZWk.cjs"),Kt=({isOpen:e,defaultOpen:t=!1,value:r,defaultValue:g,isMulti:o=!1,onOpenChange:a,onClose:c})=>{const b=typeof e=="boolean",i=r!==void 0,s=g??(o?[]:""),[l,f]=C.useState(t),[x,y]=C.useState(s),u=b?!!e:l,j=i?r:x,S=C.useCallback(m=>{b||f(m),a==null||a(m),m||c==null||c()},[b,c,a]),D=C.useCallback(()=>{S(!1)},[S]),d=C.useCallback(m=>{i||y(m)},[i]);return{isSheetOpen:u,selectedValue:j,setSelectedValue:d,closeSheet:D}},Gt={sm:{minHeight:44,paddingVertical:10,paddingHorizontal:16},md:{minHeight:52,paddingVertical:12,paddingHorizontal:18},lg:{minHeight:60,paddingVertical:14,paddingHorizontal:20}},je={sm:{label:14,description:12},md:{label:16,description:13},lg:{label:18,description:14}},at=(e,t)=>e.id??e.value??`action-sheet-item-${t}`,gt=e=>e.value??e.id,ct=e=>e.disabled||e.isDisabled||e.divider,Zt=(e,t)=>{if(typeof e.selected=="boolean")return e.selected;const r=gt(e);return r?Array.isArray(t)?t.includes(r):t===r:!1},Qt=({isSheetOpen:e,closeSheet:t,selectedValue:r,setSelectedValue:g,isClosePrevented:o=!1,dismissOnBackdropPress:a=!0,title:c,description:b,header:i,children:s,items:l=[],isMulti:f=!1,closeOnSelect:x,onSelect:y,onChange:u,showCancel:j=!1,cancelLabel:S="Cancel",onCancel:D,showHandle:d=!0,size:m="md",maxHeight:I="88vh",views:k,animationType:M,...p})=>{if(!e)return null;const w=()=>{o||t()},R=()=>{a&&w()},B=()=>{D==null||D(),w()},W=A=>{var _;if(ct(A))return;const V=gt(A);let O=r;if(V){if(f){const Z=Array.isArray(r)?r:r?[r]:[];O=Z.includes(V)?Z.filter(Y=>Y!==V):[...Z,V]}else O=V;g(O),y==null||y(V,A),u==null||u(O,A)}(_=A.onPress)==null||_.call(A,A),(A.closeOnSelect??x??!f)&&w()};return n.jsx(ht.Portal,{children:n.jsx(h.View,{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999,backgroundColor:"color-dark-50-360",display:"flex",justifyContent:"flex-end",onClick:R,...k==null?void 0:k.overlay,children:n.jsxs(h.Vertical,{width:"100%",maxWidth:520,maxHeight:I,marginHorizontal:"auto",backgroundColor:"color-white",borderTopLeftRadius:24,borderTopRightRadius:24,paddingTop:8,paddingBottom:12,overflow:"hidden",boxShadow:"0 -18px 48px rgba(15, 23, 42, 0.18)",onClick:A=>A.stopPropagation(),...k==null?void 0:k.container,...k==null?void 0:k.sheet,...p,children:[d&&n.jsx(h.View,{width:36,height:4,borderRadius:999,backgroundColor:"color-gray-300",alignSelf:"center",marginTop:4,marginBottom:8,...k==null?void 0:k.handle}),(c||b)&&n.jsxs(h.Vertical,{paddingHorizontal:20,paddingTop:6,paddingBottom:12,gap:4,...k==null?void 0:k.header,children:[c&&n.jsx(h.Text,{fontSize:18,lineHeight:24,fontWeight:"600",color:"color-gray-900",...k==null?void 0:k.title,children:c}),b&&n.jsx(h.Text,{fontSize:13,lineHeight:18,color:"color-gray-500",...k==null?void 0:k.description,children:b})]}),i,n.jsxs(h.Vertical,{overflowY:"auto",paddingBottom:4,...k==null?void 0:k.content,children:[l.map((A,V)=>{if(A.divider)return n.jsx(h.View,{height:1,backgroundColor:"color-gray-200",marginVertical:6,...k==null?void 0:k.divider},at(A,V));const O=Zt(A,r),N=ct(A),_=N?"color-gray-400":A.destructive?"color-red-600":O?"theme-primary":"color-gray-900";return n.jsxs(h.Horizontal,{alignItems:"center",gap:12,opacity:N?.5:1,cursor:N?"not-allowed":"pointer",onClick:()=>W(A),...Gt[m],...k==null?void 0:k.item,children:[A.icon&&n.jsx(h.View,{flexShrink:0,...k==null?void 0:k.itemIcon,children:A.icon}),n.jsxs(h.Vertical,{flex:1,gap:2,children:[typeof A.label=="string"?n.jsx(h.Text,{fontSize:je[m].label,lineHeight:je[m].label+6,fontWeight:O?"600":"400",color:_,...k==null?void 0:k.itemLabel,children:A.label}):A.label,A.description&&n.jsx(h.Text,{fontSize:je[m].description,lineHeight:je[m].description+5,color:"color-gray-500",...k==null?void 0:k.itemDescription,children:A.description})]}),O&&n.jsx(E.TickIcon,{widthHeight:18,color:"theme-primary",...k==null?void 0:k.itemIndicator})]},at(A,V))}),s]}),j&&n.jsx(h.View,{marginTop:8,paddingHorizontal:12,paddingTop:8,borderTopWidth:1,borderTopColor:"color-gray-200",children:n.jsx(h.Horizontal,{minHeight:52,alignItems:"center",justifyContent:"center",borderRadius:14,backgroundColor:"color-gray-100",cursor:"pointer",onClick:B,...k==null?void 0:k.cancelButton,children:n.jsx(h.Text,{fontSize:je[m].label,lineHeight:je[m].label+6,fontWeight:"600",color:"color-gray-900",...k==null?void 0:k.cancelLabel,children:S})})})]})})})},Jt=e=>{const t=Kt(e);return n.jsx(Qt,{...e,...t})},en=Jt,Ie=P.DEFAULT_CHART_COLORS,tn={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},nn={fontSize:"18px",fontWeight:"700",marginBottom:"24px",textAlign:"center",color:"color-gray-900"},rn={display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginTop:"16px",gap:"12px"},on={display:"flex",alignItems:"center",padding:"4px 8px",borderRadius:"6px",cursor:"pointer",transition:"background-color 0.2s ease",_hover:{backgroundColor:"color-gray-50"}},an={width:"10px",height:"10px",borderRadius:"50%",marginRight:"8px"},cn={fontSize:"13px",fontWeight:"500",color:"color-gray-600"},Pe={position:"absolute",backgroundColor:"color-white",padding:"12px 16px",borderRadius:"8px",boxShadow:"0px 12px 24px rgba(15, 23, 42, 0.18)",border:"1px solid color-gray-200",fontSize:"14px",display:"flex",flexDirection:"column",pointerEvents:"none",zIndex:100},pt={stroke:"color-gray-100",strokeWidth:"1px",strokeDasharray:"4 4"},ze={stroke:"color-gray-200",strokeWidth:"1px"},Ne={fontSize:"12px",fill:"color-gray-500",fontWeight:"500"},ln={rx:"4px",ry:"4px",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{filter:"brightness(1.1)"}},sn={strokeWidth:"3px",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transition:"stroke-width 0.2s ease"},dn={r:"5px",strokeWidth:"2.5px",stroke:"color-white",cursor:"pointer",transition:"all 0.2s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{r:"7px"}},Fe={strokeWidth:"2px",stroke:"color-white",cursor:"pointer",transition:"all 0.3s ease",_hover:{transform:"scale(1.02)"}},tt={position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-white-800",borderRadius:"4px",zIndex:10,padding:"24px",textAlign:"center"},un={...tt},hn={...tt,backgroundColor:"rgba(254, 242, 242, 0.8)",color:"color-red-600"},gn={...tt,backgroundColor:"rgba(249, 250, 251, 0.8)",color:"color-gray-500"},pn=({data:e,dataPoints:t,animated:r=!0,animationDuration:g=500,showTooltips:o=!0})=>{const[a,c]=C.useState(r?0:1),[b,i]=C.useState({visible:!1,x:0,y:0,content:null}),s=C.useRef(null),l=C.useRef(null);C.useEffect(()=>{if(!r){c(1);return}const d=Date.now(),m=()=>{const I=Date.now()-d,k=Math.min(I/g,1);c(k),k<1&&(s.current=requestAnimationFrame(m))};return s.current=requestAnimationFrame(m),()=>{s.current&&cancelAnimationFrame(s.current)}},[r,g]);const[f,x]=C.useState(new Set),y=C.useCallback(d=>{x(m=>{const I=new Set(m);return I.has(d)?I.delete(d):I.add(d),I})},[]),u=C.useCallback(()=>e?{...e,series:e.series.map((d,m)=>({...d,color:d.color||Ie[m%Ie.length],hidden:f.has(d.name)}))}:t?t.map((d,m)=>({...d,color:d.color||Ie[m%Ie.length],hidden:f.has(d.label)})):null,[e,t,f]),j=C.useCallback((d,m,I)=>{o&&i({visible:!0,x:d,y:m,content:I})},[o]),S=C.useCallback(()=>{i(d=>({...d,visible:!1}))},[]),D=C.useCallback(()=>{if(!l.current)return{width:0,height:0};const{width:d,height:m}=l.current.getBoundingClientRect();return{width:d,height:m}},[]);return{animationProgress:a,tooltip:b,containerRef:l,processedData:u,showTooltip:j,hideTooltip:S,getChartDimensions:D,toggleSeries:y}},fn=({data:e,width:t,height:r,animationProgress:g,showGrid:o=!0,onBarClick:a,showTooltip:c,hideTooltip:b,views:i})=>{const{getColor:s}=h.useTheme(),l={top:20,right:20,bottom:40,left:50},f=t-l.left-l.right,x=r-l.top-l.bottom,y=C.useMemo(()=>{let k=0;return e.series.forEach(M=>{M.data.forEach(p=>{k=Math.max(k,p)})}),k},[e]),u=e.labels.length,j=e.series.length,S=f/u,D=S*.8/j,d=S*.2/(j+1),m=y||10,I=C.useMemo(()=>{const M=[];for(let p=0;p<=5;p++){const w=m/5*p;M.push(w)}return M},[y]);return n.jsxs("svg",{width:t,height:r,children:[n.jsx("defs",{children:e.series.map((k,M)=>{const p=k.color?s(k.color):"black";return n.jsxs("linearGradient",{id:`bar-gradient-${M}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[n.jsx("stop",{offset:"0%",stopColor:p,stopOpacity:1}),n.jsx("stop",{offset:"100%",stopColor:p,stopOpacity:.7})]},`bar-gradient-${M}`)})}),n.jsx("line",{x1:l.left,y1:r-l.bottom,x2:t-l.right,y2:r-l.bottom,...ze,...i==null?void 0:i.axis}),n.jsx("line",{x1:l.left,y1:l.top,x2:l.left,y2:r-l.bottom,...ze,...i==null?void 0:i.axis}),e.labels.map((k,M)=>{const p=l.left+(M+.5)*S,w=r-l.bottom+20;return n.jsx("text",{x:p,y:w,textAnchor:"middle",...Ne,...i==null?void 0:i.axisLabel,children:k},`x-label-${M}`)}),I.map((k,M)=>{const p=r-l.bottom-k/m*x;return n.jsxs(C.Fragment,{children:[n.jsx("text",{x:l.left-10,y:p,textAnchor:"end",dominantBaseline:"middle",...Ne,...i==null?void 0:i.axisLabel,children:k.toFixed(0)}),o&&n.jsx("line",{x1:l.left,y1:p,x2:t-l.right,y2:p,...pt,...i==null?void 0:i.grid})]},`y-tick-${M}`)}),e.series.map((k,M)=>k.hidden?null:n.jsx(C.Fragment,{children:k.data.map((p,w)=>{const R=p/m*x*g,B=l.left+w*S+d*(M+1)+D*M,W=r-l.bottom-R,A=e.labels[w],V=e.series.reduce((Y,q)=>{const H=q.data[w];return Y+(typeof H=="number"?H:0)},0),O=V>0?(p/V*100).toFixed(1):null,N=k.color?s(k.color):"black",_=Y=>{const q=n.jsxs(h.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[n.jsxs(h.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[n.jsx(h.Text,{fontWeight:"semibold",children:k.name}),n.jsx(h.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:N})]}),n.jsx(h.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:A}),n.jsxs(h.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[n.jsxs(h.View,{display:"flex",justifyContent:"space-between",children:[n.jsx(h.Text,{color:"color-gray-500",children:"Value"}),n.jsx(h.Text,{fontWeight:"medium",children:p.toLocaleString()})]}),O!==null&&n.jsxs(h.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[n.jsx(h.Text,{color:"color-gray-500",children:"Share"}),n.jsx(h.Text,{fontWeight:"medium",children:`${O}%`})]}),n.jsxs(h.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[n.jsx(h.Text,{color:"color-gray-500",children:"Category total"}),n.jsx(h.Text,{fontWeight:"medium",children:V.toLocaleString()})]})]})]}),H=Y.currentTarget.getBoundingClientRect(),ee=H.left+H.width/2,re=H.top;c(ee,re,q)},Z=()=>{a&&a(k.name,w)};return n.jsx("rect",{x:B,y:W,width:D,height:R,fill:`url(#bar-gradient-${M})`,onMouseEnter:_,onMouseMove:_,onMouseLeave:b,onClick:Z,...ln,...i==null?void 0:i.bar},`bar-${M}-${w}`)})},`series-${M}`))]})},mn=({data:e,width:t,height:r,animationProgress:g,showGrid:o=!0,onPointClick:a,showTooltip:c,hideTooltip:b,views:i})=>{const{getColor:s}=h.useTheme(),l={top:20,right:20,bottom:40,left:40},f=t-l.left-l.right,x=r-l.top-l.bottom,y=C.useMemo(()=>{let d=0;return e.series.forEach(m=>{m.data.forEach(I=>{d=Math.max(d,I)})}),d},[e]),u=y||10,j=C.useMemo(()=>{const m=[];for(let I=0;I<=5;I++){const k=u/5*I;m.push(k)}return m},[y]),S=d=>{if(d.length<2)return"";const m=d.map((k,M)=>({x:l.left+M/(e.labels.length-1)*f,y:r-l.bottom-k/u*x*g}));let I=`M ${m[0].x},${m[0].y}`;for(let k=0;k<m.length-1;k++){const M=m[k===0?k:k-1],p=m[k],w=m[k+1],R=m[k+2===m.length?k+1:k+2],B=p.x+(w.x-M.x)/6,W=p.y+(w.y-M.y)/6,A=w.x-(R.x-p.x)/6,V=w.y-(R.y-p.y)/6;I+=` C ${B},${W} ${A},${V} ${w.x},${w.y}`}return I},D=d=>{if(d.length<2)return"";const m=S(d),I=l.left,k=l.left+f,M=r-l.bottom;return`${m} L ${k},${M} L ${I},${M} Z`};return n.jsxs("svg",{width:t,height:r,children:[n.jsx("defs",{children:e.series.map((d,m)=>{const I=d.color?s(d.color):"black";return n.jsxs("linearGradient",{id:`gradient-${m}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[n.jsx("stop",{offset:"0%",stopColor:I,stopOpacity:.3}),n.jsx("stop",{offset:"100%",stopColor:I,stopOpacity:0})]},`gradient-${m}`)})}),n.jsx("line",{x1:l.left,y1:r-l.bottom,x2:t-l.right,y2:r-l.bottom,...ze,...i==null?void 0:i.axis}),n.jsx("line",{x1:l.left,y1:l.top,x2:l.left,y2:r-l.bottom,...ze,...i==null?void 0:i.axis}),e.labels.map((d,m)=>{const I=l.left+m/(e.labels.length-1)*f,k=r-l.bottom+20;return n.jsx("text",{x:I,y:k,textAnchor:"middle",...Ne,...i==null?void 0:i.axisLabel,children:d},`x-label-${m}`)}),j.map((d,m)=>{const I=r-l.bottom-d/u*x;return n.jsxs(C.Fragment,{children:[n.jsx("text",{x:l.left-10,y:I,textAnchor:"end",dominantBaseline:"middle",...Ne,...i==null?void 0:i.axisLabel,children:d.toFixed(0)}),o&&n.jsx("line",{x1:l.left,y1:I,x2:t-l.right,y2:I,...pt,...i==null?void 0:i.grid})]},`y-tick-${m}`)}),e.series.map((d,m)=>{if(d.hidden)return null;const I=d.color?s(d.color):"black";return n.jsxs(C.Fragment,{children:[n.jsx("path",{d:D(d.data),fill:`url(#gradient-${m})`,...i==null?void 0:i.area}),n.jsx("path",{d:S(d.data),stroke:I,...sn,...i==null?void 0:i.line}),d.data.map((k,M)=>{const p=l.left+M/(e.labels.length-1)*f,w=r-l.bottom-k/u*x*g,R=e.labels[M],B=e.series.reduce((Z,Y)=>{const q=Y.data[M];return Z+(typeof q=="number"?q:0)},0),W=B>0?(k/B*100).toFixed(1):null,A=M>0&&typeof d.data[M-1]=="number"?d.data[M-1]:null,V=typeof A=="number"?k-A:null,O=typeof V=="number"?`${V>=0?"+":""}${V.toLocaleString()}`:null,N=Z=>{const Y=n.jsxs(h.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[n.jsxs(h.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[n.jsx(h.Text,{fontWeight:"semibold",children:d.name}),n.jsx(h.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:I})]}),n.jsx(h.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:R}),n.jsxs(h.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[n.jsxs(h.View,{display:"flex",justifyContent:"space-between",children:[n.jsx(h.Text,{color:"color-gray-500",children:"Value"}),n.jsx(h.Text,{fontWeight:"medium",children:k.toLocaleString()})]}),O!==null&&n.jsxs(h.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[n.jsx(h.Text,{color:"color-gray-500",children:"Change"}),n.jsx(h.Text,{fontWeight:"medium",children:O})]}),W!==null&&n.jsxs(h.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[n.jsx(h.Text,{color:"color-gray-500",children:"Share"}),n.jsx(h.Text,{fontWeight:"medium",children:`${W}%`})]}),n.jsxs(h.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[n.jsx(h.Text,{color:"color-gray-500",children:"Category total"}),n.jsx(h.Text,{fontWeight:"medium",children:B.toLocaleString()})]})]})]}),q=Z.currentTarget.getBoundingClientRect(),H=q.left+q.width/2,ee=q.top+q.height/2;c(H,ee,Y)},_=()=>{a&&a(d.name,M)};return n.jsx("circle",{cx:p,cy:w,fill:I,onMouseEnter:N,onMouseMove:N,onMouseLeave:b,onClick:_,...dn,...i==null?void 0:i.point},`point-${m}-${M}`)})]},`series-${m}`)})]})},xn=({dataPoints:e,width:t,height:r,animationProgress:g,isDonut:o=!1,onSliceClick:a,showTooltip:c,hideTooltip:b,views:i})=>{const{getColor:s}=h.useTheme(),{ref:l,relation:f}=h.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),x=C.useRef(null);C.useEffect(()=>{x.current&&l&&(l.current=x.current)},[x,l]);const u=Math.min(t,r)/2*.8,j=t/2,S=r/2,D=o?u*.6:0,d=C.useMemo(()=>e.filter(k=>!k.hidden),[e]),m=C.useMemo(()=>d.reduce((k,M)=>k+M.value,0),[d]),I=C.useMemo(()=>{if(m===0)return[{path:o?[`M ${j} ${S-u}`,`A ${u} ${u} 0 1 1 ${j} ${S+u}`,`A ${u} ${u} 0 1 1 ${j} ${S-u}`,`M ${j} ${S-D}`,`A ${D} ${D} 0 1 0 ${j} ${S+D}`,`A ${D} ${D} 0 1 0 ${j} ${S-D}`,"Z"].join(" "):[`M ${j} ${S}`,`M ${j} ${S-u}`,`A ${u} ${u} 0 1 1 ${j} ${S+u}`,`A ${u} ${u} 0 1 1 ${j} ${S-u}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:j,labelY:S,startAngle:0,endAngle:Math.PI*2,index:-1}];const k=[];let M=-Math.PI/2;for(let p=0;p<d.length;p++){const R=d[p].value/m,B=R*2*Math.PI*g,A=Math.max(0,B-.02),V=M+A,O=j+Math.cos(M)*u,N=S+Math.sin(M)*u,_=j+Math.cos(V)*u,Z=S+Math.sin(V)*u,Y=j+Math.cos(M)*D,q=S+Math.sin(M)*D,H=j+Math.cos(V)*D,ee=S+Math.sin(V)*D,re=A>Math.PI?1:0;let ie;o?ie=[`M ${O} ${N}`,`A ${u} ${u} 0 ${re} 1 ${_} ${Z}`,`L ${H} ${ee}`,`A ${D} ${D} 0 ${re} 0 ${Y} ${q}`,"Z"].join(" "):ie=[`M ${j} ${S}`,`L ${O} ${N}`,`A ${u} ${u} 0 ${re} 1 ${_} ${Z}`,"Z"].join(" ");const se=M+A/2,$=o?(u+D)/2:u*.7,F=j+Math.cos(se)*$,X=S+Math.sin(se)*$,G=`${(R*100).toFixed(1)}%`,U=d[p].color||Ie[p%Ie.length],Q=s(U);k.push({path:ie,color:Q,label:d[p].label,value:d[p].value,percentage:G,labelX:F,labelY:X,startAngle:M,endAngle:V,index:p,originalIndex:e.findIndex(oe=>oe.label===d[p].label)}),M=V}return k},[d,m,u,j,S,D,g,o,e]);return n.jsxs("svg",{ref:x,width:t,height:r,style:{overflow:"visible"},children:[o&&n.jsxs("g",{pointerEvents:"none",children:[n.jsx("circle",{cx:j,cy:S,r:D,fill:"white"}),n.jsx("text",{x:j,y:S-8,textAnchor:"middle",dominantBaseline:"middle",fontSize:"14px",fontWeight:"500",fill:"color-gray-500",children:"Total"}),n.jsx("text",{x:j,y:S+12,textAnchor:"middle",dominantBaseline:"middle",fontSize:"20px",fontWeight:"800",fill:"color-gray-900",children:m.toLocaleString()})]}),I.map((k,M)=>{const p=B=>{const W=m>0?k.value/m*100:0,A=m>0?Math.max(0,100-W):null,V=n.jsxs(h.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[n.jsxs(h.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[n.jsx(h.Text,{fontWeight:"semibold",children:k.label}),n.jsx(h.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:k.color})]}),n.jsxs(h.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",k.index+1," of ",d.length]}),n.jsxs(h.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[n.jsxs(h.View,{display:"flex",justifyContent:"space-between",children:[n.jsx(h.Text,{color:"color-gray-500",children:"Value"}),n.jsx(h.Text,{fontWeight:"medium",children:k.value.toLocaleString()})]}),n.jsxs(h.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[n.jsx(h.Text,{color:"color-gray-500",children:"Share"}),n.jsx(h.Text,{fontWeight:"medium",children:k.percentage})]}),n.jsxs(h.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[n.jsx(h.Text,{color:"color-gray-500",children:"Total"}),n.jsx(h.Text,{fontWeight:"medium",children:m.toLocaleString()})]}),A!==null&&n.jsxs(h.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[n.jsx(h.Text,{color:"color-gray-500",children:"Remaining"}),n.jsx(h.Text,{fontWeight:"medium",children:`${A.toFixed(1)}%`})]})]})]});let O=B.clientX,N=B.clientY;if(x.current){const _=x.current.getBoundingClientRect();O=_.left+k.labelX,N=_.top+k.labelY}c(O,N,V)},w=()=>{k.index!==-1&&a&&a(e[k.index],k.index)},R=k.index===-1;return n.jsxs("g",{children:[n.jsx("path",{d:k.path,fill:k.color,onMouseEnter:R?void 0:p,onMouseMove:R?void 0:p,onMouseLeave:R?void 0:b,onClick:w,...Fe,style:{...Fe==null?void 0:Fe.style,cursor:R?"default":"pointer"},...i==null?void 0:i.pie}),!R&&k.endAngle-k.startAngle>.25&&n.jsx("text",{x:k.labelX,y:k.labelY,textAnchor:"middle",dominantBaseline:"middle",fill:"white",fontSize:"11px",fontWeight:"800",pointerEvents:"none",paintOrder:"stroke",stroke:"rgba(0,0,0,0.2)",strokeWidth:"2px",children:k.percentage})]},`slice-${M}`)})]})},bn=({visible:e,x:t,y:r,content:g,maxDistance:o=100,views:a})=>{const c=C.useRef(null),[b,i]=C.useState({left:0,top:0});return C.useEffect(()=>{if(!e||!c.current||typeof window>"u"||typeof c.current.getBoundingClientRect!="function")return;const l=c.current.getBoundingClientRect(),f=l.width||200,x=l.height||100,y=20,u=16;let j=t-f/2,S=r-x-y;S<u&&(S=r+y),j+f>window.innerWidth-u?j=window.innerWidth-f-u:j<u&&(j=u),S=Math.max(u,Math.min(S,window.innerHeight-x-u)),i({left:j,top:S})},[e,t,r]),e?n.jsx(h.View,{ref:c,position:"fixed",left:`${b.left}px`,top:`${b.top}px`,...Pe,...a==null?void 0:a.tooltip,style:{...Pe==null?void 0:Pe.style,pointerEvents:"none",transition:"all 0.1s ease-out"},children:g}):null},kn=({type:e,data:t,dataPoints:r,title:g,showLegend:o=!0,legendPosition:a="bottom",showGrid:c=!0,showTooltips:b=!0,animated:i=!0,animationDuration:s=500,responsive:l=!0,aspectRatio:f=16/9,width:x=200,height:y=200,views:u,onDataPointClick:j,onSeriesClick:S,isLoading:D=!1,error:d,noData:m,loadingIndicator:I,errorIndicator:k,noDataIndicator:M,"aria-label":p,themeMode:w,...R})=>{const{animationProgress:B,tooltip:W,containerRef:A,processedData:V,showTooltip:O,hideTooltip:N,getChartDimensions:_,toggleSeries:Z}=pn({data:t,dataPoints:r,animated:i,animationDuration:s,showTooltips:b}),Y=V(),{width:q,height:H}=_(),ee=x||q,re=y||(l?q/f:H),ie=()=>{if(!o||!Y)return null;let Q=[];return e==="pie"||e==="donut"?Array.isArray(Y)&&(Q=Y):Y&&Y.series&&(Q=Y.series),!Q||Q.length===0?null:n.jsx(h.Horizontal,{flexWrap:"wrap",justifyContent:"flex-start",marginTop:a==="bottom"?"16px":0,marginBottom:a==="top"?"16px":0,...rn,...u==null?void 0:u.legend,children:Q.map((oe,ue)=>{const ae=oe.hidden,he=oe.name||oe.label;return n.jsxs(h.View,{...on,onClick:()=>Z(he),opacity:ae?.4:1,...u==null?void 0:u.legendItem,children:[n.jsx(h.View,{backgroundColor:oe.color,...an,opacity:ae?.3:1}),n.jsx(h.Text,{...cn,textDecoration:ae?"line-through":"none",children:he})]},`legend-${ue}`)})})},se=()=>{if(!Y)return null;switch(e){case"bar":return n.jsx(fn,{data:Y,width:ee,height:re,animationProgress:B,showGrid:c,onBarClick:S,showTooltip:O,hideTooltip:N,views:u});case"line":case"area":return n.jsx(mn,{data:Y,width:ee,height:re,animationProgress:B,showGrid:c,onPointClick:S,showTooltip:O,hideTooltip:N,views:u});case"pie":case"donut":return n.jsx(xn,{dataPoints:Y,width:ee,height:re,animationProgress:B,isDonut:e==="donut",onSliceClick:j,showTooltip:O,hideTooltip:N,views:u});default:return null}},$=()=>D?n.jsx(h.View,{...un,...u==null?void 0:u.loadingOverlay,children:I||n.jsx(h.Center,{children:n.jsx($e.Loader,{size:"lg"})})}):null,F=()=>d?n.jsx(h.View,{...hn,...u==null?void 0:u.errorOverlay,children:k||n.jsx(h.Text,{fontWeight:"medium",children:typeof d=="string"?d:"An error occurred"})}):null,X=()=>m?n.jsx(h.View,{...gn,...u==null?void 0:u.noDataOverlay,children:M||n.jsx(h.Text,{children:typeof m=="string"?m:"No data available"})}):null,G=p??(typeof g=="string"?g:"Chart"),U=!d&&!D&&!m;return n.jsxs(h.View,{ref:A,role:"region","aria-label":G,"aria-busy":D,...tn,...u==null?void 0:u.container,...R,children:[g&&n.jsx(h.Text,{...nn,children:g}),U&&a==="top"&&ie(),n.jsxs(h.View,{flex:1,width:"100%",position:"relative",...u==null?void 0:u.chart,children:[U&&se(),$(),F(),X(),n.jsx(bn,{visible:b&&W.visible,x:W.x,y:W.y,content:W.content,maxDistance:100,views:u})]}),U&&a==="bottom"&&ie()]})},yn=e=>n.jsx(kn,{...e}),Cn=yn,Sn=(e=365)=>{const[t,r]=C.useState(!1),[g,o]=C.useState(null),a="app-studio-cookie-consent";C.useEffect(()=>{if(typeof localStorage>"u")return;const s=localStorage.getItem(a);o(s!==null?s==="true":!1)},[]);const c=s=>{if(typeof localStorage<"u"){localStorage.setItem(a,String(s));const l=new Date;l.setDate(l.getDate()+e),localStorage.setItem(`${a}-expires`,l.toISOString())}o(s)};return{isHovered:t,setIsHovered:r,hasConsent:g,acceptCookies:()=>{c(!0)},resetConsent:()=>{typeof localStorage<"u"&&(localStorage.removeItem(a),localStorage.removeItem(`${a}-expires`)),o(!1)}}},jn=e=>({default:{container:{backgroundColor:"color-white",borderColor:"color-gray-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-gray-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-gray-600",borderColor:"color-gray-300",hoverBackgroundColor:"color-gray-100"}},info:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-800"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-800",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}},primary:{container:{backgroundColor:"color-blue-50",borderColor:"color-blue-200",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)"},content:{color:"color-blue-700"},acceptButton:{backgroundColor:"color-blue-500",color:"color-white",hoverBackgroundColor:"color-blue-600"},customizeButton:{backgroundColor:"transparent",color:"color-blue-700",borderColor:"color-blue-300",hoverBackgroundColor:"color-blue-100"}}}),In=({title:e="Nous utilisons des cookies",description:t="Ce site utilise des cookies pour améliorer votre expérience. En continuant à naviguer sur ce site, vous acceptez notre utilisation des cookies conformément à notre politique de confidentialité.",acceptButtonText:r="Accepter",customizeButtonText:g="Personnaliser",position:o="bottom",variant:a="default",onAccept:c,onCustomize:b,views:i,showCustomizeButton:s=!0,cookieExpiration:l=365,themeMode:f,...x})=>{const{themeMode:y}=h.useTheme(),{hasConsent:u,acceptCookies:j}=Sn(l),D=jn()[a];if(u)return null;const d=()=>{j(),c&&c()},m=()=>{b&&b()};return n.jsx(h.View,{style:{position:"fixed",left:16,right:16,zIndex:1e3,...o==="bottom"?{bottom:16}:{top:16}},padding:16,borderWidth:"1px",borderStyle:"solid",borderRadius:8,maxWidth:"800px",marginLeft:"auto",marginRight:"auto",transition:"opacity 0.3s ease, transform 0.3s ease",...D.container,...i==null?void 0:i.container,...x,children:n.jsxs(h.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&n.jsx(h.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...i==null?void 0:i.title,children:e}),t&&n.jsx(h.Text,{fontSize:14,color:"color-black",...i==null?void 0:i.description,children:t}),n.jsxs(h.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...i==null?void 0:i.buttonGroup,children:[s&&n.jsx(P.Button,{variant:"outline",onClick:m,size:"sm",...i==null?void 0:i.customizeButton,children:g}),n.jsx(P.Button,{variant:"filled",onClick:d,size:"sm",...i==null?void 0:i.acceptButton,children:r})]})]})})},wn=e=>n.jsx(In,{...e}),Tn=wn,En=({src:e,color:t,views:r,themeMode:g,...o})=>{const{getColor:a,themeMode:c}=h.useTheme(),b=t?{fill:a(t,{themeMode:c}),stroke:a(t,{themeMode:c})}:{};return n.jsx(h.View,{display:"flex",alignItems:"center",justifyContent:"center",...o,...r==null?void 0:r.container,children:n.jsx(h.Image,{...b,content:'url("'+e+'")',width:"100%",height:"100%",...r==null?void 0:r.image})})},Dn=({path:e,...t})=>n.jsx(h.Image,{src:e,...t}),Rn=e=>{const t={...e,options:e.options||[]},r=K.useSelectorState(t);return n.jsx(K.SelectorView,{...r,...t,onClick:g=>{g.stopPropagation(),e.onClick&&e.onClick(g)}})},Mn=Rn,An=({value:e,defaultValue:t="",onChange:r})=>{const[g,o]=C.useState(e!==void 0?e:t);return C.useEffect(()=>{e!==void 0&&o(e)},[e]),{selectedValue:g,setSelectedValue:c=>{e===void 0&&o(c),r&&r(c)}}},Ln=({children:e,name:t,label:r,helperText:g,error:o,selectedValue:a,setSelectedValue:c,direction:b="vertical",spacing:i=8,isDisabled:s=!1,isReadOnly:l=!1,views:f={container:{},label:{},helperText:{}},onChange:x,value:y,defaultValue:u,...j})=>{const S=b==="vertical"?h.Vertical:h.Horizontal,D=C.Children.map(e,M=>{if(C.isValidElement(M)){const p={name:t,isChecked:M.props.value===a,isDisabled:s||M.props.isDisabled,isReadOnly:l||M.props.isReadOnly,onChange:w=>{c(w),M.props.onChange&&M.props.onChange(w)}};return C.cloneElement(M,p)}return M}),d=C.useId(),m=`${d}-label`,I=`${d}-helper`,k=!!(g||o);return n.jsxs(h.Vertical,{gap:i,width:"100%",role:"radiogroup","aria-labelledby":r?m:void 0,"aria-describedby":k?I:void 0,"aria-invalid":o?!0:void 0,...f.container,...j,children:[r&&n.jsx(h.Text,{id:m,fontWeight:"600",fontSize:"14px",color:o?"theme-error":"inherit",marginBottom:4,...f.label,children:r}),n.jsx(S,{gap:i,children:D}),k&&n.jsx(h.Text,{id:I,fontWeight:o?"500":"400",fontSize:"14px",lineHeight:"20px",color:o?"theme-error":"color-gray-500",marginTop:4,transition:"color 0.2s ease, opacity 0.2s ease",...f.helperText,children:o||g})]})},$n=e=>{const t=An(e);return n.jsx(Ln,{...t,...e})},Bn=$n,Vn=e=>{const t=K.useColorInputState(e);return n.jsx(K.ColorInputView,{...t,...e})},Pn=Vn,Fn=e=>{const t=K.useCountryPickerState(e);return n.jsx(K.CountryPickerView,{...t,...e})},Wn=Fn,lt={xs:14,sm:16,md:16,lg:18,xl:20},On=({visibleIcon:e,hiddenIcon:t,...r})=>{const{isVisible:g,setIsVisible:o,...a}=K.usePasswordState(r),c=lt[r.size??"md"]??lt.md,b=c-2;return n.jsx(Me.TextFieldView,{...a,type:g?"text":"password",isClearable:!1,right:n.jsx(h.View,{display:"flex",alignItems:"center",justifyContent:"center",width:`${c}px`,height:`${c}px`,minWidth:`${c}px`,color:"color-gray-500",cursor:r.isDisabled?"not-allowed":"pointer",transition:"color 0.2s ease",onClick:()=>{r.isDisabled||o(!g)},children:g?e??n.jsx(E.OpenEyeIcon,{widthHeight:b}):t??n.jsx(E.CloseEyeIcon,{widthHeight:b})})})},Hn=On,zn=({id:e,name:t,items:r,placeholder:g,searchPlaceholder:o,...a})=>{const c=K.useComboBoxState(r,g,o);return n.jsx(K.ComboBoxView,{id:e,name:t,items:r,searchPlaceholder:o,...c,...a})},Nn=zn,Un=e=>{const t=K.useTagInputState(e),{tags:r,...g}=e,{setTags:o,...a}=t;return n.jsx(K.TagInputView,{...a,...g})},_n=Un,qn=({url:e,type:t,name:r,onOpen:g})=>{const o=t.toLowerCase(),a=o.startsWith("image"),c=o.startsWith("video"),b=o.startsWith("audio"),i=()=>{g&&g()};return n.jsxs(h.View,{width:"60px",height:"60px",flexShrink:0,borderRadius:"4px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-gray-200",cursor:"pointer",onClick:i,children:[a&&n.jsx(h.Image,{src:e,alt:r,width:"100%",height:"100%",objectFit:"cover"}),c&&n.jsx(h.View,{as:"video",src:e,controls:!0,width:"100%",height:"100%",style:{objectFit:"cover"},onClick:s=>s.stopPropagation()}),b&&n.jsx(h.View,{as:"audio",controls:!0,src:e,width:"100%",onClick:s=>s.stopPropagation()}),!a&&!c&&!b&&n.jsx(E.FileIcon,{widthHeight:24,color:"color-gray-600"})]})},ft=({behavior:e,keyboardVerticalOffset:t,dismissOnTap:r,enabled:g,children:o,...a})=>n.jsx(h.View,{flex:1,width:"100%",...a,children:o}),Xn=({header:e,footer:t,children:r,isLoading:g=!1,safe:o=!0,scrollable:a=!0,dismissKeyboardOnTap:c=!0,keyboardVerticalOffset:b=0,views:i={},backgroundColor:s="color-white",...l})=>{const f=o?h.SafeArea:h.View,x=h.isBrowser()?{}:{keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:!1,contentContainerStyle:{flexGrow:1}},y=g?n.jsx(h.Center,{flex:1,width:"100%",...i.content,children:n.jsx($e.Loader,{})}):a?n.jsx(h.Scroll,{flex:1,width:"100%",...x,...i.content,children:r}):n.jsx(h.View,{flex:1,width:"100%",...i.content,children:r});return n.jsxs(f,{flex:1,height:"100%",width:"100%",flexDirection:"column",backgroundColor:s,...l,...i.container,children:[e!=null&&n.jsx(h.View,{width:"100%",flexShrink:0,...i.header,children:e}),n.jsxs(ft,{flexDirection:"column",dismissOnTap:c,keyboardVerticalOffset:b,children:[y,t!=null&&n.jsx(h.View,{width:"100%",flexShrink:0,...i.footer,children:t})]})]})},Yn={justifyContent:"space-between",alignItems:"flex-start",flexWrap:"wrap",gap:12},vn={margin:0,fontSize:22,fontWeight:"700",color:"theme-text"},Kn={margin:0,color:"color-gray-600"},Gn=({title:e,description:t,action:r,views:g={},...o})=>n.jsxs(h.Horizontal,{...Yn,...g.container,...o,children:[n.jsxs(h.Vertical,{gap:4,flexShrink:1,children:[n.jsx(h.Text,{as:"h1",...vn,...g.title,children:e}),t?n.jsx(h.Text,{as:"p",...Kn,...g.description,children:t}):null]}),r?n.jsx(h.View,{flexShrink:0,...g.action,children:r}):null]}),Zn=e=>{const t=ye.useMergedDesignSystemComponentProps("pageHeader",e);return n.jsx(Gn,{...t})},Qn={alignItems:"center",gap:8,paddingVertical:48,paddingHorizontal:16,borderRadius:12,borderWidth:1,borderStyle:"dashed",borderColor:"color-gray-200",backgroundColor:"color-white"},Jn={margin:0,fontSize:16,fontWeight:"600",textAlign:"center",color:"theme-text"},er={margin:0,textAlign:"center",color:"color-gray-600"},tr=({state:e,title:t,description:r,action:g,views:o={},...a})=>n.jsxs(h.Vertical,{...e==="error"?{role:"alert"}:{},"data-testid":`state-${e}`,"data-state":e,...Qn,...o.container,...a,children:[n.jsx(h.Text,{as:"h2",...Jn,...o.title,children:t}),r?n.jsx(h.Text,{as:"p",...er,...o.description,children:r}):null,g?n.jsx(h.View,{...o.action,children:g}):null]}),De=e=>{const t=ye.useMergedDesignSystemComponentProps("statePanel",e);return n.jsx(tr,{...t})},mt={loading:"Loading…",emptyTitle:"Nothing here yet",errorTitle:"Something went wrong",networkError:"The server could not be reached. Check your connection and retry.",retry:"Retry",forbiddenTitle:"You don't have access to this",signInRequired:"Sign in to continue.",askAccess:"Ask an administrator for access.",goneTitle:"This no longer exists",goneDescription:"It may have been deleted."},xt=e=>{const t=e!==null&&typeof e=="object"&&"status"in e&&typeof e.status=="number"?e.status:void 0;return t===void 0?{kind:"network"}:t===401||t===403?{kind:"forbidden",status:t}:t===404?{kind:"gone"}:{kind:"error"}},nr=({label:e,...t})=>n.jsxs(h.Vertical,{role:"status","aria-live":"polite","data-testid":"state-loading","data-state":"loading",alignItems:"center",gap:8,padding:48,...t,children:[n.jsx($e.Loader,{}),n.jsx(h.Text,{color:"color-gray-600",children:e})]}),rr=e=>n.jsx(h.Vertical,{"data-testid":"state-populated","data-state":"populated",gap:12,...e}),or=({query:e,isEmpty:t,empty:r,children:g,labels:o,views:a={}})=>{const c={...mt,...o};if(e.status==="loading")return n.jsx(nr,{label:c.loading,...a.loading});if(e.status==="error"){const b=xt(e.error);return b.kind==="forbidden"?n.jsx(De,{state:"forbidden",title:c.forbiddenTitle,description:b.status===401?c.signInRequired:c.askAccess}):b.kind==="gone"?n.jsx(De,{state:"gone",title:c.goneTitle,description:c.goneDescription}):n.jsx(De,{state:"error",title:c.errorTitle,description:b.kind==="network"?c.networkError:void 0,action:n.jsx(P.Button,{onClick:e.reload,children:c.retry})})}return t!=null&&t(e.data)?n.jsx(De,{state:"empty",title:(r==null?void 0:r.title)??c.emptyTitle,description:r==null?void 0:r.description,action:r==null?void 0:r.action}):n.jsx(rr,{...a.content,children:g(e.data)})},ir=({items:e,onChange:t})=>{const[r,g]=C.useState(e),[o,a]=C.useState(null),[c,b]=C.useState(null),i=C.useRef({x:0,y:0}),s=C.useRef([]),l=C.useCallback((y,u)=>{y.preventDefault(),document.body.style.cursor="grabbing";const j="touches"in y?y.touches[0].clientX:y.clientX,S="touches"in y?y.touches[0].clientY:y.clientY;i.current={x:j,y:S},b(u),a(r[u])},[r]),f=C.useCallback(y=>{if(c===null)return;const u="touches"in y?y.touches[0].clientX:y.clientX,j="touches"in y?y.touches[0].clientY:y.clientY,S=s.current[c];if(!S)return;const D=u-i.current.x,d=j-i.current.y;S.style.transform=`translate(${D}px, ${d}px)`,S.style.zIndex="1000";const m=s.current.findIndex((I,k)=>{if(!I||k===c)return!1;const M=I.getBoundingClientRect();return j>=M.top&&j<=M.bottom});if(m!==-1&&m!==c){const I=[...r],[k]=I.splice(c,1);I.splice(m,0,k),g(I),b(m),t==null||t(I),i.current={x:u,y:j}}},[c,r,t]),x=C.useCallback(()=>{document.body.style.cursor="",s.current.forEach(y=>{y&&(y.style.transform="",y.style.zIndex="")}),b(null),a(null)},[c]);return C.useEffect(()=>{if(!(typeof window>"u"))return c!==null&&(window.addEventListener("mousemove",f),window.addEventListener("touchmove",f),window.addEventListener("mouseup",x),window.addEventListener("touchend",x)),()=>{window.removeEventListener("mousemove",f),window.removeEventListener("touchmove",f),window.removeEventListener("mouseup",x),window.removeEventListener("touchend",x)}},[c,f,x]),{items:r,draggedItem:o,draggedIndex:c,itemRefs:s,handleDragStart:l}},ar=({items:e,renderItem:t,containerProps:r,itemProps:g,draggedIndex:o,itemRefs:a,handleDragStart:c,views:b,themeMode:i})=>n.jsx(h.View,{overflow:"hidden",position:"relative",...r,...b==null?void 0:b.container,children:e.map((s,l)=>n.jsx(h.View,{ref:f=>{a.current[l]=f},onMouseDown:f=>c(f,l),onTouchStart:f=>c(f,l),position:"relative",cursor:"grab",transition:"transform 0.2s",...g,...b==null?void 0:b.item,children:t?t(s,l):s},l))}),bt=e=>{const{items:t,draggedIndex:r,itemRefs:g,handleDragStart:o}=ir(e);return n.jsx(ar,{...e,items:t,draggedIndex:r,itemRefs:g,handleDragStart:o})},cr=bt,lr=({onFileSelect:e,onMultipleFileSelect:t,validateFile:r,accept:g,multiple:o,disabled:a,previewUrl:c})=>{const[b,i]=C.useState(!1),[s,l]=C.useState(null),f=C.useRef(null),x=c!==void 0?c:s;C.useEffect(()=>()=>{s&&URL.revokeObjectURL(s)},[s]);const y=C.useCallback(I=>{I.preventDefault(),I.stopPropagation(),!a&&i(!0)},[a]),u=C.useCallback(I=>{I.preventDefault(),I.stopPropagation(),!a&&i(!1)},[a]),j=C.useCallback(I=>{I.preventDefault(),I.stopPropagation(),!a&&i(!0)},[a]),S=C.useCallback(I=>{if(!I||I.length===0)return;const k=Array.from(I);if(!o&&k.length>0){const M=k[0];if(M.type.startsWith("image/")){const p=URL.createObjectURL(M);l(w=>(w&&URL.revokeObjectURL(w),p))}else l(null)}o?t&&t(k):k.length>0&&e&&e(k[0])},[o,t,e]),D=C.useCallback(I=>{I.preventDefault(),I.stopPropagation(),i(!1),!a&&I.dataTransfer.files&&I.dataTransfer.files.length>0&&(S(I.dataTransfer.files),I.dataTransfer.clearData())},[a,S]),d=C.useCallback(()=>{var I;a||(I=f.current)==null||I.click()},[a]),m=C.useCallback(I=>{S(I.target.files),I.target.value&&(I.target.value="")},[S]);return{isDragActive:b,handleDragEnter:y,handleDragLeave:u,handleDragOver:j,handleDrop:D,handleClick:d,handleFileChange:m,inputRef:f,preview:x}},sr={position:"absolute",top:"-4px",right:"-4px",width:"16px",height:"16px",borderRadius:"50%",backgroundColor:"rgba(0, 0, 0, 0.5)",color:"white",border:"none",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",fontSize:"12px",zIndex:10,_hover:{backgroundColor:"rgba(0, 0, 0, 0.7)"}},kt=({files:e,sandboxId:t,onRemove:r,layout:g="inline",maxHeight:o="120px",showPreviews:a=!1,views:c={}})=>{if(e.length===0)return null;const b=C.useCallback(s=>s<1024?`${s} B`:s<1024*1024?`${(s/1024).toFixed(1)} KB`:`${(s/(1024*1024)).toFixed(1)} MB`,[]),i=C.useCallback(s=>s.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:s.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:s.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return n.jsx(h.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:o,overflowY:"auto",...c==null?void 0:c.container,children:e.map((s,l)=>{const f=typeof URL<"u"&&typeof URL.createObjectURL=="function"&&typeof Blob<"u"&&s instanceof Blob,x=(s==null?void 0:s.path)||(s==null?void 0:s.url)||(a&&f?URL.createObjectURL(s):""),y=s.type.startsWith("image/"),u=s.type.startsWith("video/"),j=s.type.startsWith("audio/"),S=i(s);return a?n.jsx(h.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...c==null?void 0:c.item,children:a&&n.jsxs(ce.HoverCard,{children:[n.jsxs(ce.HoverCard.Trigger,{children:[y&&n.jsx(h.Image,{src:x,alt:s.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),u&&n.jsx(h.View,{as:"video",src:x,alt:s.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),j&&n.jsx(h.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:n.jsx(E.AudioIcon,{widthHeight:24,color:"color-black"})}),!y&&!u&&!j&&n.jsx(h.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:n.jsx(E.FileIcon,{widthHeight:24,color:"color-black"})}),r&&n.jsx(h.Button,{...sr,onClick:D=>{D.stopPropagation(),r(l)},"aria-label":`Remove ${s.name}`,children:"×"})]}),n.jsxs(ce.HoverCard.Content,{children:[y&&n.jsx(h.Image,{src:x,alt:s.name,maxWidth:"100%"}),u&&n.jsx(h.View,{as:"video",src:x,controls:!0,maxWidth:"100%"}),j&&n.jsx(h.View,{as:"audio",src:x,controls:!0,width:"100%"}),n.jsxs(h.Text,{marginTop:"4px",maxLines:1,width:"100%",...c==null?void 0:c.name,children:[s.name," (",b(s.size),")"]})]})]})},l):n.jsxs(h.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...c==null?void 0:c.item,children:[n.jsx(h.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:S.backgroundColor,color:S.color,children:j?n.jsx(E.AudioIcon,{widthHeight:12,color:"currentColor"}):n.jsx(E.FileIcon,{widthHeight:12,color:"currentColor"})}),n.jsxs(h.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...c==null?void 0:c.name,children:[s.name," · ",b(s.size)]}),r&&n.jsx(h.View,{as:"button",type:"button",onClick:()=>r(l),"aria-label":`Remove ${s.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},l)})})},dr=({children:e,text:t="Drop files here or click to upload",textProps:r,containerProps:g,disabled:o,accept:a,multiple:c,isDragActive:b,handleDragEnter:i,handleDragLeave:s,handleDragOver:l,handleDrop:f,handleClick:x,handleFileChange:y,inputRef:u,preview:j,imageProps:S,selectedFiles:D,onRemove:d})=>n.jsxs(h.Center,{width:"100%",minHeight:"200px",height:D&&D.length>0?"auto":"200px",borderWidth:2,borderStyle:"dashed",borderColor:b?"theme-primary":"color-gray-300",borderRadius:12,backgroundColor:b?"#EFF6FF":"color-gray-50",flexDirection:"column",cursor:o?"not-allowed":"pointer",opacity:o?.6:1,onClick:x,onDragEnter:i,onDragLeave:s,onDragOver:l,onDrop:f,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease",overflow:"hidden",position:"relative",padding:16,...g,children:[n.jsx("input",{type:"file",ref:u,onChange:y,accept:a,multiple:c,style:{display:"none"},disabled:o}),j&&!c?n.jsxs(h.View,{width:"100%",height:"200px",position:"relative",children:[n.jsx(h.Image,{src:j,alt:"Preview",width:"100%",height:"100%",objectFit:"contain",...S}),n.jsx(h.Center,{position:"absolute",top:0,left:0,right:0,bottom:0,backgroundColor:"rgba(0,0,0,0.3)",opacity:0,_hover:{opacity:1},transition:"opacity 0.2s",children:n.jsx(h.Text,{color:"white",fontWeight:600,children:"Click to replace"})})]}):n.jsxs(h.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[e||n.jsxs(h.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[n.jsx(E.UploadIcon,{widthHeight:40,color:b?"theme-primary":"color-gray-500"}),n.jsx(h.Text,{marginTop:16,color:b?"theme-primary":"color-gray-600",fontWeight:500,textAlign:"center",...r,children:t})]}),c&&D&&D.length>0&&n.jsx(h.View,{marginTop:16,width:"100%",children:n.jsx(kt,{files:D,onRemove:d||(()=>{}),showPreviews:!0,layout:"inline",maxHeight:"160px"})})]})]}),ur=e=>{const t=lr(e);return n.jsx(dr,{...e,...t})},hr=e=>{const t=K.useEmojiPickerState(e);return n.jsx(K.EmojiPickerView,{...t,...e})},yt=hr,gr=["paragraph","h1","h2","h3","bullet","number","quote","codeBlock","table"];function Se(e){const t=e.trim();return!!t&&!/[\u0000-\u0020\u007f\\]/.test(t)&&(!/^[a-z][a-z\d+.-]*:/i.test(t)||/^(https?:|mailto:|tel:)/i.test(t))}function pr(e){const t=/^(!?)\[((?:\\.|[^\]\\\n])*)\]\(/.exec(e);if(!t)return null;let r=t[0].length;const g=r;let o=0;for(;r<e.length;r++){if(e[r]==="\\"){r++;continue}if(e[r]==="(")o++;else if(e[r]===")"){if(!o)break;o--}else if(/\s/.test(e[r]))break}const a=e.slice(g,r).replace(/\\([()\\])/g,"$1"),c=/^(?:[ \t]+(?:"([^"\n]*)"|'([^'\n]*)'))?\)/.exec(e.slice(r));return c?{image:!!t[1],label:t[2],url:a,title:c[1]??c[2],labelStart:t[1].length+1,length:r+c[0].length}:null}function Ue(e){return Se(e)&&!/^(?:mailto|tel):/i.test(e.trim())}function fr(e){return/^[a-z][a-z\d+.-]*:\/\/[^\s\\]+$/i.test(e)&&!/^(?:javascript|vbscript|data|file|blob):/i.test(e)}function fe(e,t=0,r=0,g=!1){var b;if(r>20)return[{kind:"text",text:e,start:t,end:t+e.length}];const o=[];let a=0;const c=(i,s,l)=>o.push({kind:"text",text:i,start:t+s,end:t+l});for(;a<e.length;){const i=g&&/^(?: {2,}|\\)\r?\n/.exec(e.slice(a));if(i){o.push({kind:"break",start:t+a,end:t+a+i[0].length}),a+=i[0].length;continue}if(e[a]==="\\"&&/[\\`*{}\[\]()#+.!_>~|]/.test(e[a+1]||"")){c(e[a+1],a+1,a+2),a+=2;continue}const s=/^<br\s*\/?\s*>/i.exec(e.slice(a));if(s){o.push({kind:"break",start:t+a,end:t+a+s[0].length}),a+=s[0].length;continue}const l=/^`+/.exec(e.slice(a));if(l){const j=e.indexOf(l[0],a+l[0].length);if(j>=0){o.push({kind:"code",text:e.slice(a+l[0].length,j),start:t+a,end:t+j+l[0].length,contentStart:t+a+l[0].length}),a=j+l[0].length;continue}}const f=g&&pr(e.slice(a));if(f){o.push({kind:f.image?"image":"link",start:t+a,end:t+a+f.length,url:f.url,title:f.title,text:f.image?f.label.replace(/\\([\\`*{}\[\]()#+.!_>~|])/g,"$1"):void 0,children:f.image?void 0:fe(f.label,t+a+f.labelStart,r+1,g)}),a+=f.length;continue}const x=!g&&/^\[([^\]\n]+)\]\(([^\s()]*)\)/.exec(e.slice(a));if(x){o.push({kind:"link",start:t+a,end:t+a+x[0].length,url:x[2],children:fe(x[1],t+a+1,r+1)}),a+=x[0].length;continue}const y=[["***","***","bold"],["**","**","bold"],["__","__","bold"],["~~","~~","strikethrough"],["<u>","</u>","underline"],["`","`","code"],["*","*","italic"],["_","_","italic"]];let u=!1;for(const[j,S,D]of y){if(!e.startsWith(j,a))continue;let d=e.indexOf(S,a+j.length);for(;d>=0&&e[d-1]==="\\";)d=e.indexOf(S,d+S.length);if((j==="*"||j==="_")&&e.startsWith(j+j,d)){const k=e.indexOf(j+j,d+2);k>=0&&(d=e.indexOf(j,k+2))}if((j==="**"||j==="__")&&e[d+2]===j[0]&&(((b=e.slice(a+2,d).match(new RegExp(`\\${j[0]}(?!\\${j[0]})`,"g")))==null?void 0:b.length)||0)%2===1&&d++,d<=a+j.length||j==="_"&&/\w/.test(e[a-1]||"")&&/\w/.test(e[d+1]||""))continue;const m=e.slice(a+j.length,d);let I=D==="code"?void 0:fe(m,t+a+j.length,r+1,g);j==="***"&&(I=[{kind:"italic",start:t+a+2,end:t+d+1,children:I}]),o.push({kind:D,start:t+a,end:t+d+S.length,text:D==="code"?m:void 0,children:I}),u=!0,a=d+S.length;break}u||(c(e[a],a,a+1),a++)}return o.reduce((i,s)=>{const l=i[i.length-1];return(l==null?void 0:l.kind)==="text"&&s.kind==="text"&&l.end===s.start?(l.text+=s.text,l.end=s.end):i.push(s),i},[])}function _e(e,t=[],r,{display:g=!1}={}){var j,S,D;const o=e.replace(g?/^ {0,3}(`{3,}|~{3,})[^\n]*\n[\s\S]*?(?:^ {0,3}\1[ \t]*$|(?![\s\S]))/gm:/^ {0,3}(`{3,}|~{3,})[^\n]*\n[\s\S]*?^ {0,3}\1\s*$/gm,"").replace(/`[^`\n]*`/g,""),a=g?/^(?:import |export |\s*:::|\s*\[.+\]:|\s*={3,}\s*$)|\[\^[^\]]+\]|\$\$|\{[^}\n]*\}|<(?!(?:\/?u>|br\s*\/?>))\/?[A-Za-z!]|&(?:#\w+|\w+);/m.test(o)||/^(?:---|\+\+\+)[ \t]*\r?\n[ \t]*[\w-]+:/.test(e)||/^(?:>[ \t]*>| {1,3}#{1,6}\s|#{1,6}\t|[ \t]{2,}(?:>|#{1,6}\s|\|))|^[ \t]{2,}(?:`{3,}|~{3,})/m.test(o):/^(?:import |export |-{3,}\s*$|\+\+\+\s*$|\s*:::|\s*\[.+\]:|\s*#{4,}\s|\s*(?:\*\s*){3,}$|\s*(?:-\s*){3,}$|\s*(?:_\s*){3,}$|\s*={3,}\s*$)|!\[|\[\^[^\]]+\]|\$\$|\{[^}\n]*\}|<(?!(?:\/?u>|br\s*\/?>))\/?[A-Za-z!]|&(?:#\w+|\w+);/m.test(o)||/^[ \t]{2,}(?:`{3,}|~{3,})/m.test(e)||/^(?:>[ \t]*>| {1,3}#{1,6}\s|#{1,6}\t|[ \t]{2,}(?:>|#{1,6}\s|\|)|[ \t]*(?:[-*+] |\d+[.)] )\[[ xX]\])|(?: {2,}|\\)\r?$/m.test(o)||Array.from(o.matchAll(/\[[^\]\n]+\]\(([^)\n]*)\)/g)).some(d=>/[\s(]/.test(d[1])||!Se(d[1]))||o.split(/\r?\n/).some(d=>fe(d.trim(),0,0,!0).some(m=>m.kind==="link"&&m.title==="video")),c=[],b=/[^\r\n]+|\r\n|\n|\r/g;let i=0;for(const d of e.matchAll(b))/^[\r\n]/.test(d[0])&&(c.push({text:e.slice(i,d.index),start:i,end:d.index}),i=d.index+d[0].length);(i<e.length||!c.length)&&c.push({text:e.slice(i),start:i,end:e.length});const s=[],l=new Set;let f=a;const x=/^\s*(?:[-*+] |\d+[.)] )/,y=/^\s*\|?\s*:?-{3,}:?\s*(?:\|\s*:?-{3,}:?\s*)+\|?\s*$/,u=/^ {0,3}(?:(?:\*[ \t]*){3,}|(?:-[ \t]*){3,}|(?:_[ \t]*){3,})$/;for(let d=0;d<c.length;){if(!c[d].text.trim()){const Z=d;for(;d<c.length&&!c[d].text.trim();)d++;const Y=d-Z,q=!s.length,H=q?Math.floor(Y/2)+(d===c.length?1:0):d===c.length?Math.ceil(Y/2):Math.floor(Y/2);for(let ee=0;ee<H;ee++){const re=((j=c[Z+ee*2+(q?0:1)])==null?void 0:j.start)??e.length,ie=((S=t.find(se=>!se.raw&&!l.has(se.id)))==null?void 0:S.id)||P.generateId("block");l.add(ie),s.push({id:ie,kind:"paragraph",raw:"",body:"",start:re,end:re,bodyStart:re})}continue}const m=c[d];let I=d,k="paragraph",M=0,p;const w=(g?/^(#{1,6}) (.*)$/:/^(#{1,3}) (.*)$/).exec(m.text),R=/^ {0,3}(`{3,}|~{3,})([\w+-]*)\s*$/.exec(m.text);let B=!1;if(g&&u.test(m.text))k="hr";else if(w)k=`h${w[1].length}`,M=w[1].length+1;else if(R){for(k="codeBlock",p=R[2],I++;I<c.length&&!new RegExp(`^ {0,3}${R[1][0]}{${R[1].length},}\\s*$`).test(c[I].text);)I++;I>=c.length&&(g||(f=!0),B=!0,I=c.length-1),M=m.end-m.start+(e.slice(m.end,m.end+2)===`\r
2
+ `?2:1)}else if(d+1<c.length&&m.text.includes("|")&&y.test(c[d+1].text))for(k="table",I=d+1;I+1<c.length&&c[I+1].text.trim()&&c[I+1].text.includes("|");)I++;else if(x.test(m.text)){for(k=/^\s*\d/.test(m.text)?"number":"bullet";I+1<c.length&&c[I+1].text.trim()&&(x.test(c[I+1].text)||/^\s{2,}\S/.test(c[I+1].text));)I++;M=m.text.match(x)[0].length}else if(/^> ?/.test(m.text))for(k="quote",M=m.text.match(/^> ?/)[0].length;I+1<c.length&&/^> ?/.test(c[I+1].text);)I++;else{for(;I+1<c.length&&c[I+1].text.trim()&&!/^(?:#{1,6} |>|`{3}|~{3})/.test(c[I+1].text)&&!(g&&u.test(c[I+1].text))&&!x.test(c[I+1].text);)I++;/^ {4}\S/.test(m.text)&&(f=!0)}const W=e.slice(m.start,c[I].end),A=t.find(Z=>Z.id===r&&Z.start===m.start&&!l.has(Z.id)),V=t[s.length],O=A||t.find(Z=>Z.raw===W&&!l.has(Z.id))||(V&&!l.has(V.id)&&e.indexOf(V.raw,c[I].end)<0?V:void 0),N=(O==null?void 0:O.id)||P.generateId("block");l.add(N);let _=W.slice(M);k==="codeBlock"&&(_=e.slice(m.start+M,B?c[I].end:c[I].start).replace(/\r?\n$/,"")),s.push({id:N,kind:k,raw:W,start:m.start,end:c[I].end,body:_,bodyStart:m.start+M,language:p}),d=I+1}return s.length||s.push({id:((D=t[0])==null?void 0:D.id)||P.generateId("block"),kind:"paragraph",raw:"",body:"",start:e.length,end:e.length,bodyStart:e.length}),{blocks:s,sourceMode:f}}function ke(e,t,r){const g=Math.max(0,Math.min(t.start,e.length)),o=Math.max(g,Math.min(t.end,e.length));return e.slice(0,g)+r+e.slice(o)}function mr(e,t){const r=e.kind==="codeBlock"?e.body:e.raw.replace(/^(?:#{1,3} |\s*[-*+] |\s*\d+[.)] |> ?)/gm,"");if(t==="codeBlock"){const o="`".repeat(Math.max(3,...Array.from(r.matchAll(/`+/g),a=>a[0].length+1)));return`${o}
25
3
  ${r}
26
- ${a}`}if(o==="table")return`| Column 1 | Column 2 | Column 3 |
4
+ ${o}`}if(t==="table")return`| Column 1 | Column 2 | Column 3 |
27
5
  | --- | --- | --- |
28
- | `+r.replace(/\|/g,"\\|").replace(/\r?\n/g," ")+" | | |";const n={paragraph:"",h1:"# ",h2:"## ",h3:"### ",bullet:"- ",number:"1. ",quote:"> "}[o];return r.split(/\r?\n/).map((a,i)=>o==="number"?`${i+1}. ${a}`:n+a).join(`
29
- `)}function Va(e,o){const r={...o},n=a=>{var d,g,m,h;(d=a.children)==null||d.forEach(n);const i=(g=a.children)==null?void 0:g[0],l=(m=a.children)==null?void 0:m[a.children.length-1],u=a.kind==="code"?a.contentStart:i==null?void 0:i.start,c=a.kind==="code"?a.contentStart+(((h=a.text)==null?void 0:h.length)||0):l==null?void 0:l.end;u!==void 0&&c!==void 0&&r.start<=u&&r.end>=c&&(r.start=Math.min(r.start,a.start),r.end=Math.max(r.end,a.end))};return e.filter(a=>a.kind!=="codeBlock"&&o.start<a.end&&o.end>a.start).forEach(a=>ro(a.raw,a.start).forEach(n)),r}function Nf(e,o,r,n,a){const i=[];for(const d of o){if(d.kind==="codeBlock"||d.end<=r.start||d.start>=r.end)continue;let g=d.start;d.raw.split(/\r?\n/).forEach((m,h)=>{var k;const f=g;g+=m.length+(d.raw.includes(`\r
30
- `)?2:1);const y=(b,j)=>{const x={start:Math.max(r.start,b),end:Math.min(r.end,j)};x.end>x.start&&i.push(x)};if(d.kind==="table"){if(h===1)return;let b=m.startsWith("|")?1:0;for(let j=b;j<=m.length;j++)if(j===m.length||m[j]==="|"&&m[j-1]!=="\\"){const x=m.slice(b,j),C=x.trim(),v=f+b+x.indexOf(C);y(v,v+C.length),b=j+1}}else{const b=((k=m.match(/^(?:#{1,3} |\s*(?:[-*+] |\d+[.)] )|> ?)/))==null?void 0:k[0].length)||0;y(f+b,f+m.length)}})}let l=e;const u={...r},c=i.length>0&&i.every(d=>mn(e,d,n,a).removed);for(const d of i.reverse()){const g=mn(l,d,n,a);!c&&g.removed||(u.end=d.end===r.end?g.selection.end:u.end+g.value.length-l.length,d.start===r.start&&(u.start=g.selection.start),l=g.value)}return{value:l,selection:u}}function mn(e,o,r,n){const a={bold:["**","**"],italic:["*","*"],underline:["<u>","</u>"],strikethrough:["~~","~~"],code:["`","`"]};let[i,l]=r==="link"?["[",`](${n})`]:a[r]||["",""];const u=e.slice(o.start,o.end)||r==="link"&&n||"",c=ro(u);if(r!=="link"&&c.length===1&&c[0].kind===r&&c[0].end===u.length){const h=r==="code"?c[0].contentStart:i.length,f=r==="code"?h:l.length,y=u.slice(h,u.length-f);return{removed:!0,value:mo(e,o,y),selection:{start:o.start,end:o.start+y.length}}}if(r==="code"&&(i=l="`".repeat(Math.max(1,...Array.from(u.matchAll(/`+/g),h=>h[0].length+1)))),e.slice(o.start-i.length,o.start)===i&&e.slice(o.end,o.end+l.length)===l)return{removed:!0,value:mo(e,{start:o.start-i.length,end:o.end+l.length},u),selection:{start:o.start-i.length,end:o.end-i.length}};const d=[],g=h=>{var y;if((y=h.children)==null||y.forEach(g),h.kind!==r)return;const f=r==="code"?h.contentStart-h.start:i.length;d.push({start:h.start,end:h.start+f},{start:r==="link"?h.children[h.children.length-1].end:h.end-(r==="code"?f:l.length),end:h.end})};c.forEach(g);let m=u;return d.sort((h,f)=>f.start-h.start).forEach(h=>{m=m.slice(0,h.start)+m.slice(h.end)}),{value:mo(e,o,i+m+l),selection:{start:o.start+i.length,end:o.start+i.length+m.length}}}const gn=/^(\s*)([-*+] |\d+[.)] )/;function Tt(e,o){var r,n,a,i;for(const l of ro(e)){const u=((n=(r=l.children)==null?void 0:r[0])==null?void 0:n.start)??l.contentStart,c=((i=(a=l.children)==null?void 0:a[l.children.length-1])==null?void 0:i.end)??(u===void 0?void 0:l.end-(u-l.start));if(u!==void 0&&c!==void 0&&o>=u&&o<=c){const[d,g]=Tt(e.slice(u,c),o-u),m=h=>h?e.slice(l.start,u)+h+e.slice(c,l.end):"";return[e.slice(0,l.start)+m(d),m(g)+e.slice(l.end)]}l.kind==="text"&&o===l.start&&e[o-1]==="\\"&&o--}return[e.slice(0,o),e.slice(o)]}function uo(e,o,r,n){return{value:mo(e,o,r),selection:{start:n,end:n}}}function fs(e,o,r,n=!1){var h,f,y;const a=o.find(k=>r.start>=k.start&&r.end<=k.end);if(!a)return null;const i=a.raw.includes(`\r
6
+ | `+r.replace(/\|/g,"\\|").replace(/\r?\n/g," ")+" | | |";const g={paragraph:"",h1:"# ",h2:"## ",h3:"### ",bullet:"- ",number:"1. ",quote:"> "}[t];return r.split(/\r?\n/).map((o,a)=>t==="number"?`${a+1}. ${o}`:g+o).join(`
7
+ `)}function st(e,t){const r={...t},g=o=>{var s,l,f,x;(s=o.children)==null||s.forEach(g);const a=(l=o.children)==null?void 0:l[0],c=(f=o.children)==null?void 0:f[o.children.length-1],b=o.kind==="code"?o.contentStart:a==null?void 0:a.start,i=o.kind==="code"?o.contentStart+(((x=o.text)==null?void 0:x.length)||0):c==null?void 0:c.end;b!==void 0&&i!==void 0&&r.start<=b&&r.end>=i&&(r.start=Math.min(r.start,o.start),r.end=Math.max(r.end,o.end))};return e.filter(o=>o.kind!=="codeBlock"&&t.start<o.end&&t.end>o.start).forEach(o=>fe(o.raw,o.start).forEach(g)),r}function xr(e,t,r,g,o){const a=[];for(const s of t){if(s.kind==="codeBlock"||s.end<=r.start||s.start>=r.end)continue;let l=s.start;s.raw.split(/\r?\n/).forEach((f,x)=>{var j;const y=l;l+=f.length+(s.raw.includes(`\r
8
+ `)?2:1);const u=(S,D)=>{const d={start:Math.max(r.start,S),end:Math.min(r.end,D)};d.end>d.start&&a.push(d)};if(s.kind==="table"){if(x===1)return;let S=f.startsWith("|")?1:0;for(let D=S;D<=f.length;D++)if(D===f.length||f[D]==="|"&&f[D-1]!=="\\"){const d=f.slice(S,D),m=d.trim(),I=y+S+d.indexOf(m);u(I,I+m.length),S=D+1}}else{const S=((j=f.match(/^(?:#{1,3} |\s*(?:[-*+] |\d+[.)] )|> ?)/))==null?void 0:j[0].length)||0;u(y+S,y+f.length)}})}let c=e;const b={...r},i=a.length>0&&a.every(s=>ve(e,s,g,o).removed);for(const s of a.reverse()){const l=ve(c,s,g,o);!i&&l.removed||(b.end=s.end===r.end?l.selection.end:b.end+l.value.length-c.length,s.start===r.start&&(b.start=l.selection.start),c=l.value)}return{value:c,selection:b}}function ve(e,t,r,g){const o={bold:["**","**"],italic:["*","*"],underline:["<u>","</u>"],strikethrough:["~~","~~"],code:["`","`"]};let[a,c]=r==="link"?["[",`](${g})`]:o[r]||["",""];const b=e.slice(t.start,t.end)||r==="link"&&g||"",i=fe(b);if(r!=="link"&&i.length===1&&i[0].kind===r&&i[0].end===b.length){const x=r==="code"?i[0].contentStart:a.length,y=r==="code"?x:c.length,u=b.slice(x,b.length-y);return{removed:!0,value:ke(e,t,u),selection:{start:t.start,end:t.start+u.length}}}if(r==="code"&&(a=c="`".repeat(Math.max(1,...Array.from(b.matchAll(/`+/g),x=>x[0].length+1)))),e.slice(t.start-a.length,t.start)===a&&e.slice(t.end,t.end+c.length)===c)return{removed:!0,value:ke(e,{start:t.start-a.length,end:t.end+c.length},b),selection:{start:t.start-a.length,end:t.end-a.length}};const s=[],l=x=>{var u;if((u=x.children)==null||u.forEach(l),x.kind!==r)return;const y=r==="code"?x.contentStart-x.start:a.length;s.push({start:x.start,end:x.start+y},{start:r==="link"?x.children[x.children.length-1].end:x.end-(r==="code"?y:c.length),end:x.end})};i.forEach(l);let f=b;return s.sort((x,y)=>y.start-x.start).forEach(x=>{f=f.slice(0,x.start)+f.slice(x.end)}),{value:ke(e,t,a+f+c),selection:{start:t.start+a.length,end:t.start+a.length+f.length}}}const Ke=/^(\s*)([-*+] |\d+[.)] )/;function Re(e,t){var r,g,o,a;for(const c of fe(e)){const b=((g=(r=c.children)==null?void 0:r[0])==null?void 0:g.start)??c.contentStart,i=((a=(o=c.children)==null?void 0:o[c.children.length-1])==null?void 0:a.end)??(b===void 0?void 0:c.end-(b-c.start));if(b!==void 0&&i!==void 0&&t>=b&&t<=i){const[s,l]=Re(e.slice(b,i),t-b),f=x=>x?e.slice(c.start,b)+x+e.slice(i,c.end):"";return[e.slice(0,c.start)+f(s),f(l)+e.slice(c.end)]}c.kind==="text"&&t===c.start&&e[t-1]==="\\"&&t--}return[e.slice(0,t),e.slice(t)]}function be(e,t,r,g){return{value:ke(e,t,r),selection:{start:g,end:g}}}function Ct(e,t,r,g=!1){var x,y,u;const o=t.find(j=>r.start>=j.start&&r.end<=j.end);if(!o)return null;const a=o.raw.includes(`\r
31
9
  `)||e.includes(`\r
32
10
  `)?`\r
33
11
  `:`
34
- `;if(a.kind==="codeBlock"||a.kind==="table"||n){if(a.kind==="table"&&/[|\r\n]/.test(e.slice(r.start,r.end)))return null;const k=a.kind==="codeBlock"?i:"<br>";return uo(e,r,k,r.start+k.length)}const l=r.start-a.start,u=r.end-a.start;let c,d;if(a.kind==="bullet"||a.kind==="number"){const k=a.raw.lastIndexOf(`
35
- `,Math.max(0,l-1))+1,b=a.raw.indexOf(`
36
- `,u),j=b<0?a.raw.length:b,x=a.raw.slice(k,a.raw.indexOf(`
37
- `,l)<0?a.raw.length:a.raw.indexOf(`
38
- `,l)).replace(/\r$/,""),C=((h=x.match(gn))==null?void 0:h[0])||"",v=a.raw.lastIndexOf(`
39
- `,Math.max(0,u-1))+1,S=a.raw.slice(v,j).replace(/\r$/,""),I=((f=S.match(gn))==null?void 0:f[0])||"";c=Tt(x.slice(C.length),Math.max(0,l-k-C.length))[0],d=Tt(S.slice(I.length),Math.max(0,u-v-I.length))[1];const w=a.raw.slice(0,k).replace(/\r?\n$/,"");let T=a.raw.slice(j).replace(/^\r?\n/,"");if(!c&&!d){if(/^\s/.test(C)){const W=C.replace(/^(?: {1,2}|\t)/,""),M=[w,W,T].filter((z,H)=>z||H===1).join(i);return uo(e,a,M,a.start+(w?w.length+i.length:0)+W.length)}const F=[w,"",T].filter((W,M)=>W||M===1).join(i+i);return uo(e,a,F,a.start+(w?w.length+i.length*2:0))}const R=C.replace(/(\d+)([.)] )$/,(F,W,M)=>`${Number(W)+1}${M}`);if(/\d+[.)] $/.test(C)){const F=((y=C.match(/^\s*/))==null?void 0:y[0])||"";T=T.split(i).map(W=>W.replace(/^(\s*)(\d+)([.)] )/,(M,z,H,V)=>z===F?z+(Number(H)+1)+V:M)).join(i)}const E=[w,C+c,R+d,T].filter((F,W)=>F||W===1||W===2).join(i);return uo(e,a,E,a.start+(w?w.length+i.length:0)+C.length+c.length+i.length+R.length)}const g=a.raw.slice(0,a.bodyStart-a.start);c=Tt(a.body,Math.max(0,l-g.length))[0],d=Tt(a.body,Math.max(0,u-g.length))[1],!c&&d?d=g+d:(c=g+c,a.kind==="quote"&&d&&(d="> "+d));const m=c+i+i+d;return uo(e,a,m,a.start+c.length+i.length*2+(!c&&d?g.length:a.kind==="quote"&&d?2:0))}function qf(e){return e.kind==="codeBlock"?e.body.split(/\r?\n/).map(o=>{if(!o)return"";const r="`".repeat(Math.max(1,...Array.from(o.matchAll(/`+/g),n=>n[0].length+1)));return r+o+r}).join("<br>"):(e.kind==="quote"?e.raw.replace(/^> ?/gm,""):e.kind==="bullet"||e.kind==="number"?e.raw.replace(/^(\s*)([-*+] |\d+[.)] )/gm,""):e.body).replace(/\r?\n/g,"<br>")}function ys(e,o,r,n){var d,g;const a=o.findIndex(m=>m.id===r),i=o[a],l=o[a-1];if(i&&n!==void 0&&(i.kind==="bullet"||i.kind==="number")){const m=i.raw.lastIndexOf(`
40
- `,n-i.start-1)+1,h=(d=i.raw.slice(m).match(gn))==null?void 0:d[0];if(!m||!h)return null;const f=m-(i.raw[m-2]==="\r"?2:1);let y=i.raw.slice(m+h.length);if(/\d+[.)] $/.test(h)){const k=((g=h.match(/^\s*/))==null?void 0:g[0])||"";y=y.replace(/(\r?\n)([ \t]*)(\d+)([.)] )/g,(b,j,x,C,v)=>x===k?j+x+Math.max(1,Number(C)-1)+v:b)}return uo(e,i,i.raw.slice(0,f)+y,i.start+f)}if(!i||!l||i.kind==="table"||l.kind==="table")return null;if(!l.raw)return uo(e,{start:l.start,end:i.end},i.raw,l.start+i.bodyStart-i.start);let u=qf(i);const c=l.kind==="codeBlock"?l.bodyStart+l.body.length:l.end;if(l.kind==="codeBlock"){const m=f=>f.map(y=>y.children?m(y.children):y.kind==="break"?`
41
- `:y.text||"").join("");u=i.kind==="codeBlock"?i.body:m(ro(u));const h=mo(l.raw,{start:c-l.start,end:c-l.start},u);return uo(e,{start:l.start,end:i.end},h,c)}return uo(e,{start:l.end,end:i.end},u,c)}const xs={document:"Document",paragraph:"Paragraph",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",bullet:"Bulleted list",number:"Numbered list",quote:"Quote",codeBlock:"Code block",table:"Table",blocks:"Blocks /",below:"Insert below",duplicate:"Duplicate",delete:"Delete",up:"Move up",down:"Move down",drag:"Drag block",bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",code:"Inline code",link:"Link",linkUrl:"Link address",invalidLink:"Enter an http, https, mailto, tel or relative link.",media:"Insert image or video",image:"Image",video:"Video",mediaUrl:"Media address",mediaDescription:"Description / alternative text",mediaSource:"Inserting media switches this document to Markdown source editing.",invalidMedia:"Choose an image or video and a safe http, https or relative address.",upload:"Upload a file",uploading:"Uploading…",pickingMedia:"Choose a file…",uploadError:"Upload failed. Your document is unchanged.",cancelUpload:"Cancel upload",mediaStale:"The document has changed. Close this panel and choose the insertion point again.",undo:"Undo",redo:"Redo",source:"Markdown source",visual:"Visual editor",emoji:"Insert emoji",sourceFallback:"This Markdown contains syntax that visual editing cannot preserve. Edit its source instead.",selectionToolbar:"Selection actions",askSelection:"Edit selection with AI",askSection:"Edit document with AI",aiPanel:"AI proposal",instruction:"Describe the change",generating:"Preparing proposal…",aiError:"Generation failed. Your text is unchanged.",proposal:"Proposal",apply:"Apply",discard:"Discard",cancel:"Close",retry:"Retry",generate:"Generate",stale:"The document has changed. Select the text again before generating a proposal.",selectionRequired:"Select text inside this editor first.",save:"Save",empty:"Write something…"};function Uf(e){const o=e.value??e.defaultValue??"",r=p.useId(),[n,a]=p.useState(o),[i,l]=p.useState(()=>{const U=yr(o);return U.blocks.forEach((X,ne)=>{X.id=`${r}-block-${ne}`}),U}),[u,c]=p.useState({start:0,end:0}),[d,g]=p.useState(0),[m,h]=p.useState(!1),[f,y]=p.useState(null),[k,b]=p.useState(null),[j,x]=p.useState(!1),[C,v]=p.useState(""),[S,I]=p.useState(""),[w,T]=p.useState(null),[R,E]=p.useState(null),F=p.useRef(null),W=p.useRef(0),M=p.useRef(null),z=U=>{F.current=U,E(U)},H=()=>{var U;W.current++,(U=M.current)==null||U.abort(),M.current=null},[V,P]=p.useState(0),L={...xs,...e.labels},B=!!(e.isDisabled||e.isReadOnly),$=p.useRef({value:o,selection:u}),q=p.useRef(i),Y=p.useRef({undo:[],redo:[],lastInput:0}),O=p.useRef(0),J=p.useRef(!1),D=p.useRef(!1),A=p.useRef(null),_=p.useRef(0),G=p.useRef(e);G.current=e;const N=p.useRef(w);N.current=w;const ee=p.useRef(!0);p.useEffect(()=>(ee.current=!0,()=>{ee.current=!1,_.current++,H()}),[]);const oe=U=>{const X={start:Math.max(0,Math.min(U.start,$.current.value.length)),end:Math.max(0,Math.min(U.end,$.current.value.length)),...U.backward?{backward:!0}:{}};X.end<X.start&&([X.start,X.end]=[X.end,X.start]),!(X.start===$.current.selection.start&&X.end===$.current.selection.end&&!!X.backward==!!$.current.selection.backward)&&(Y.current.lastInput=0,$.current.selection=X,c(X))},ie=(U=$.current.selection)=>{oe(U),J.current=!0,g(X=>X+1)},K=(U,X=!0,ne)=>{F.current&&(H(),z({...F.current,phase:"stale",error:void 0}));const ue=yr(U.value,q.current.blocks,ne);q.current=ue,$.current=U,O.current++,l(ue),a(U.value),c(U.selection),X&&(J.current=!0,g(ge=>ge+1))};p.useEffect(()=>{e.value===void 0||e.value===$.current.value||(K({value:e.value,selection:{start:0,end:0}},!1),D.current=!1,J.current=!1,g(U=>U+1),Y.current={undo:[],redo:[],lastInput:0},_.current++,T(null),b(null),x(!1),A.current=null,z(null),y(null),P(U=>U+1))},[e.value]),p.useEffect(()=>{B&&(D.current=!1,A.current=null,_.current++,T(null),b(null),x(!1),H(),z(null))},[B]);const ae=(U,X=$.current.selection,ne=!1,ue=!0,ge)=>{var Ee,Se;if(B||U===$.current.value)return;const $e=Date.now(),Ce=Y.current;(!ne||$e-Ce.lastInput>750||!Ce.undo.length)&&(Ce.undo.push({value:$.current.value,selection:{...$.current.selection}}),Ce.undo.length>100&&Ce.undo.shift()),Ce.lastInput=ne?$e:0,Ce.redo=[],K({value:U,selection:X},ue,ge),P(eo=>eo+1),(Se=(Ee=G.current).onChange)==null||Se.call(Ee,U)},de=(U,X=$.current.selection,ne=!1)=>{const ue=mo($.current.value,X,U);ae(ue,{start:X.start+U.length,end:X.start+U.length},ne)},fe=(U,X,ne,ue=!0,ge=!1)=>{ae(mo($.current.value,{start:U.start,end:U.end},X),{start:U.start+ne.start,end:U.start+ne.end},ue,ge,U.id)},Ie=(U=!1)=>{if(B||m||q.current.sourceMode)return!1;const X=fs($.current.value,q.current.blocks,$.current.selection,U);return X?(ae(X.value,X.selection),!0):!1},ce=U=>{if(B||m||q.current.sourceMode)return!1;const X=ys($.current.value,q.current.blocks,U);return X?(ae(X.value,X.selection),!0):!1},le=(U=!1)=>{var $e,Ce;if(B)return;const X=Y.current,ne=U?X.redo:X.undo,ue=U?X.undo:X.redo,ge=ne.pop();if(!ge){ie();return}ue.push({value:$.current.value,selection:{...$.current.selection}}),X.lastInput=0,K(ge),P(Ee=>Ee+1),(Ce=($e=G.current).onChange)==null||Ce.call($e,ge.value)},se=(U,X)=>{if(B)return;const ne=q.current.blocks,ue=ne.findIndex(Se=>Se.id===U);if(ue<0||X<0||X>=ne.length||ue===X)return;const ge=[...ne],[$e]=ge.splice(ue,1);ge.splice(X,0,$e);let Ce=$.current.value.slice(0,ne[0].start),Ee=0;ge.forEach((Se,eo)=>{Se.id===U&&(Ee=Ce.length+$e.bodyStart-$e.start),Ce+=Se.raw+(eo+1<ne.length?$.current.value.slice(ne[eo].end,ne[eo+1].start):$.current.value.slice(ne[eo].end))}),q.current={...q.current,blocks:ge},ae(Ce,{start:Ee,end:Ee})},re=(U,X)=>{var Ce,Ee;if(B)return;const ne=q.current.blocks,ue=ne.findIndex(Se=>Se.id===U),ge=ne[ue];if(!ge)return;if(X==="up"||X==="down"){se(U,ue+(X==="up"?-1:1));return}if(X==="delete"){const Se={start:ue===ne.length-1&&ue>0?ne[ue-1].end:ge.start,end:((Ce=ne[ue+1])==null?void 0:Ce.start)??ge.end};de("",Se);return}const $e=`
42
-
43
- `+(X==="duplicate"?ge.raw:"");de($e,{start:ge.end,end:ge.end}),X==="below"&&b(((Ee=q.current.blocks.find(Se=>!Se.raw&&Se.start>=ge.end))==null?void 0:Ee.id)||null)},pe=(U,X)=>{const ne=q.current.blocks.find(ge=>ge.id===U);if(!ne)return;const ue=Of(ne,X);ae(mo($.current.value,{start:ne.start,end:ne.end},ue),{start:ne.start+ue.length,end:ne.start+ue.length}),b(null)},Q=()=>{B||(F.current&&be(!1),A.current={value:$.current.value,selection:{...$.current.selection}},D.current=!0,v(""),I(""),x(!0))},te=(U=!0)=>{const X=A.current;A.current=null,D.current=!1,x(!1),I(""),U&&(X==null?void 0:X.value)===$.current.value&&ie(X.selection)},be=(U=!0)=>{var ne;const X=(ne=F.current)==null?void 0:ne.target;H(),z(null),D.current=!1,U&&(X==null?void 0:X.value)===$.current.value&&ie(X.selection)},xe=()=>{B||F.current||(te(!1),_.current++,T(null),D.current=!0,z({target:{value:$.current.value,selection:{...$.current.selection}},revision:O.current,type:"image",url:"",description:"",phase:"idle"}))},ye=U=>{const X=F.current;B||!X||["loading","picking","stale"].includes(X.phase)||z({...X,...U,phase:"idle",error:void 0,file:void 0})},he=U=>ee.current&&!G.current.isDisabled&&!G.current.isReadOnly&&U.revision===O.current&&U.target.value===$.current.value&&F.current===U,Ve=(U,X=F.current)=>{var pa;if(!X||!he(X)||X.phase==="stale"||!U&&["loading","picking"].includes(X.phase))return;const ne=((U==null?void 0:U.url)??X.url).trim(),ue=(U==null?void 0:U.type)??X.type;if(!fr(ne)||!["image","video"].includes(ue)){z({...X,phase:"error",error:L.invalidMedia});return}const ge=(X.description||((pa=X.file)==null?void 0:pa.name)||ue).replace(/[\r\n]+/g," ").replace(/[\\`*{}\[\]()#+.!_>~|]/g,"\\$&"),$e=ne.replace(/[()"'<>]/g,Fc=>`%${Fc.charCodeAt(0).toString(16).toUpperCase()}`),Ce=ue==="image"?`![${ge}](${$e})`:`[${ge}](${$e} "video")`,Ee=X.target.selection,Se=X.target.value.slice(0,Ee.start),eo=X.target.value.slice(Ee.end),Rc=ue==="video"?`${Se&&!Se.endsWith(`
44
-
45
- `)?Se.endsWith(`
12
+ `;if(o.kind==="codeBlock"||o.kind==="table"||g){if(o.kind==="table"&&/[|\r\n]/.test(e.slice(r.start,r.end)))return null;const j=o.kind==="codeBlock"?a:"<br>";return be(e,r,j,r.start+j.length)}const c=r.start-o.start,b=r.end-o.start;let i,s;if(o.kind==="bullet"||o.kind==="number"){const j=o.raw.lastIndexOf(`
13
+ `,Math.max(0,c-1))+1,S=o.raw.indexOf(`
14
+ `,b),D=S<0?o.raw.length:S,d=o.raw.slice(j,o.raw.indexOf(`
15
+ `,c)<0?o.raw.length:o.raw.indexOf(`
16
+ `,c)).replace(/\r$/,""),m=((x=d.match(Ke))==null?void 0:x[0])||"",I=o.raw.lastIndexOf(`
17
+ `,Math.max(0,b-1))+1,k=o.raw.slice(I,D).replace(/\r$/,""),M=((y=k.match(Ke))==null?void 0:y[0])||"";i=Re(d.slice(m.length),Math.max(0,c-j-m.length))[0],s=Re(k.slice(M.length),Math.max(0,b-I-M.length))[1];const p=o.raw.slice(0,j).replace(/\r?\n$/,"");let w=o.raw.slice(D).replace(/^\r?\n/,"");if(!i&&!s){if(/^\s/.test(m)){const A=m.replace(/^(?: {1,2}|\t)/,""),V=[p,A,w].filter((O,N)=>O||N===1).join(a);return be(e,o,V,o.start+(p?p.length+a.length:0)+A.length)}const W=[p,"",w].filter((A,V)=>A||V===1).join(a+a);return be(e,o,W,o.start+(p?p.length+a.length*2:0))}const R=m.replace(/(\d+)([.)] )$/,(W,A,V)=>`${Number(A)+1}${V}`);if(/\d+[.)] $/.test(m)){const W=((u=m.match(/^\s*/))==null?void 0:u[0])||"";w=w.split(a).map(A=>A.replace(/^(\s*)(\d+)([.)] )/,(V,O,N,_)=>O===W?O+(Number(N)+1)+_:V)).join(a)}const B=[p,m+i,R+s,w].filter((W,A)=>W||A===1||A===2).join(a);return be(e,o,B,o.start+(p?p.length+a.length:0)+m.length+i.length+a.length+R.length)}const l=o.raw.slice(0,o.bodyStart-o.start);i=Re(o.body,Math.max(0,c-l.length))[0],s=Re(o.body,Math.max(0,b-l.length))[1],!i&&s?s=l+s:(i=l+i,o.kind==="quote"&&s&&(s="> "+s));const f=i+a+a+s;return be(e,o,f,o.start+i.length+a.length*2+(!i&&s?l.length:o.kind==="quote"&&s?2:0))}function br(e){return e.kind==="codeBlock"?e.body.split(/\r?\n/).map(t=>{if(!t)return"";const r="`".repeat(Math.max(1,...Array.from(t.matchAll(/`+/g),g=>g[0].length+1)));return r+t+r}).join("<br>"):(e.kind==="quote"?e.raw.replace(/^> ?/gm,""):e.kind==="bullet"||e.kind==="number"?e.raw.replace(/^(\s*)([-*+] |\d+[.)] )/gm,""):e.body).replace(/\r?\n/g,"<br>")}function St(e,t,r,g){var s,l;const o=t.findIndex(f=>f.id===r),a=t[o],c=t[o-1];if(a&&g!==void 0&&(a.kind==="bullet"||a.kind==="number")){const f=a.raw.lastIndexOf(`
18
+ `,g-a.start-1)+1,x=(s=a.raw.slice(f).match(Ke))==null?void 0:s[0];if(!f||!x)return null;const y=f-(a.raw[f-2]==="\r"?2:1);let u=a.raw.slice(f+x.length);if(/\d+[.)] $/.test(x)){const j=((l=x.match(/^\s*/))==null?void 0:l[0])||"";u=u.replace(/(\r?\n)([ \t]*)(\d+)([.)] )/g,(S,D,d,m,I)=>d===j?D+d+Math.max(1,Number(m)-1)+I:S)}return be(e,a,a.raw.slice(0,y)+u,a.start+y)}if(!a||!c||a.kind==="table"||c.kind==="table")return null;if(!c.raw)return be(e,{start:c.start,end:a.end},a.raw,c.start+a.bodyStart-a.start);let b=br(a);const i=c.kind==="codeBlock"?c.bodyStart+c.body.length:c.end;if(c.kind==="codeBlock"){const f=y=>y.map(u=>u.children?f(u.children):u.kind==="break"?`
19
+ `:u.text||"").join("");b=a.kind==="codeBlock"?a.body:f(fe(b));const x=ke(c.raw,{start:i-c.start,end:i-c.start},b);return be(e,{start:c.start,end:a.end},x,i)}return be(e,{start:c.end,end:a.end},b,i)}const jt={document:"Document",paragraph:"Paragraph",h1:"Heading 1",h2:"Heading 2",h3:"Heading 3",bullet:"Bulleted list",number:"Numbered list",quote:"Quote",codeBlock:"Code block",table:"Table",blocks:"Blocks /",below:"Insert below",duplicate:"Duplicate",delete:"Delete",up:"Move up",down:"Move down",drag:"Drag block",bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",code:"Inline code",link:"Link",linkUrl:"Link address",invalidLink:"Enter an http, https, mailto, tel or relative link.",media:"Insert image or video",image:"Image",video:"Video",mediaUrl:"Media address",mediaDescription:"Description / alternative text",mediaSource:"Inserting media switches this document to Markdown source editing.",invalidMedia:"Choose an image or video and a safe http, https or relative address.",upload:"Upload a file",uploading:"Uploading…",pickingMedia:"Choose a file…",uploadError:"Upload failed. Your document is unchanged.",cancelUpload:"Cancel upload",mediaStale:"The document has changed. Close this panel and choose the insertion point again.",undo:"Undo",redo:"Redo",source:"Markdown source",visual:"Visual editor",emoji:"Insert emoji",sourceFallback:"This Markdown contains syntax that visual editing cannot preserve. Edit its source instead.",selectionToolbar:"Selection actions",askSelection:"Edit selection with AI",askSection:"Edit document with AI",aiPanel:"AI proposal",instruction:"Describe the change",generating:"Preparing proposal…",aiError:"Generation failed. Your text is unchanged.",proposal:"Proposal",apply:"Apply",discard:"Discard",cancel:"Close",retry:"Retry",generate:"Generate",stale:"The document has changed. Select the text again before generating a proposal.",selectionRequired:"Select text inside this editor first.",save:"Save",empty:"Write something…"};function kr(e){const t=e.value??e.defaultValue??"",r=C.useId(),[g,o]=C.useState(t),[a,c]=C.useState(()=>{const T=_e(t);return T.blocks.forEach((L,z)=>{L.id=`${r}-block-${z}`}),T}),[b,i]=C.useState({start:0,end:0}),[s,l]=C.useState(0),[f,x]=C.useState(!1),[y,u]=C.useState(null),[j,S]=C.useState(null),[D,d]=C.useState(!1),[m,I]=C.useState(""),[k,M]=C.useState(""),[p,w]=C.useState(null),[R,B]=C.useState(null),W=C.useRef(null),A=C.useRef(0),V=C.useRef(null),O=T=>{W.current=T,B(T)},N=()=>{var T;A.current++,(T=V.current)==null||T.abort(),V.current=null},[_,Z]=C.useState(0),Y={...jt,...e.labels},q=!!(e.isDisabled||e.isReadOnly),H=C.useRef({value:t,selection:b}),ee=C.useRef(a),re=C.useRef({undo:[],redo:[],lastInput:0}),ie=C.useRef(0),se=C.useRef(!1),$=C.useRef(!1),F=C.useRef(null),X=C.useRef(0),G=C.useRef(e);G.current=e;const U=C.useRef(p);U.current=p;const Q=C.useRef(!0);C.useEffect(()=>(Q.current=!0,()=>{Q.current=!1,X.current++,N()}),[]);const oe=T=>{const L={start:Math.max(0,Math.min(T.start,H.current.value.length)),end:Math.max(0,Math.min(T.end,H.current.value.length)),...T.backward?{backward:!0}:{}};L.end<L.start&&([L.start,L.end]=[L.end,L.start]),!(L.start===H.current.selection.start&&L.end===H.current.selection.end&&!!L.backward==!!H.current.selection.backward)&&(re.current.lastInput=0,H.current.selection=L,i(L))},ue=(T=H.current.selection)=>{oe(T),se.current=!0,l(L=>L+1)},ae=(T,L=!0,z)=>{W.current&&(N(),O({...W.current,phase:"stale",error:void 0}));const v=_e(T.value,ee.current.blocks,z);ee.current=v,H.current=T,ie.current++,c(v),o(T.value),i(T.selection),L&&(se.current=!0,l(J=>J+1))};C.useEffect(()=>{e.value===void 0||e.value===H.current.value||(ae({value:e.value,selection:{start:0,end:0}},!1),$.current=!1,se.current=!1,l(T=>T+1),re.current={undo:[],redo:[],lastInput:0},X.current++,w(null),S(null),d(!1),F.current=null,O(null),u(null),Z(T=>T+1))},[e.value]),C.useEffect(()=>{q&&($.current=!1,F.current=null,X.current++,w(null),S(null),d(!1),N(),O(null))},[q]);const he=(T,L=H.current.selection,z=!1,v=!0,J)=>{var le,ne;if(q||T===H.current.value)return;const de=Date.now(),te=re.current;(!z||de-te.lastInput>750||!te.undo.length)&&(te.undo.push({value:H.current.value,selection:{...H.current.selection}}),te.undo.length>100&&te.undo.shift()),te.lastInput=z?de:0,te.redo=[],ae({value:T,selection:L},v,J),Z(pe=>pe+1),(ne=(le=G.current).onChange)==null||ne.call(le,T)},me=(T,L=H.current.selection,z=!1)=>{const v=ke(H.current.value,L,T);he(v,{start:L.start+T.length,end:L.start+T.length},z)},qe=(T,L,z,v=!0,J=!1)=>{he(ke(H.current.value,{start:T.start,end:T.end},L),{start:T.start+z.start,end:T.start+z.end},v,J,T.id)},Xe=(T=!1)=>{if(q||f||ee.current.sourceMode)return!1;const L=Ct(H.current.value,ee.current.blocks,H.current.selection,T);return L?(he(L.value,L.selection),!0):!1},ge=T=>{if(q||f||ee.current.sourceMode)return!1;const L=St(H.current.value,ee.current.blocks,T);return L?(he(L.value,L.selection),!0):!1},Be=(T=!1)=>{var de,te;if(q)return;const L=re.current,z=T?L.redo:L.undo,v=T?L.undo:L.redo,J=z.pop();if(!J){ue();return}v.push({value:H.current.value,selection:{...H.current.selection}}),L.lastInput=0,ae(J),Z(le=>le+1),(te=(de=G.current).onChange)==null||te.call(de,J.value)},xe=(T,L)=>{if(q)return;const z=ee.current.blocks,v=z.findIndex(ne=>ne.id===T);if(v<0||L<0||L>=z.length||v===L)return;const J=[...z],[de]=J.splice(v,1);J.splice(L,0,de);let te=H.current.value.slice(0,z[0].start),le=0;J.forEach((ne,pe)=>{ne.id===T&&(le=te.length+de.bodyStart-de.start),te+=ne.raw+(pe+1<z.length?H.current.value.slice(z[pe].end,z[pe+1].start):H.current.value.slice(z[pe].end))}),ee.current={...ee.current,blocks:J},he(te,{start:le,end:le})},Te=(T,L)=>{var te,le;if(q)return;const z=ee.current.blocks,v=z.findIndex(ne=>ne.id===T),J=z[v];if(!J)return;if(L==="up"||L==="down"){xe(T,v+(L==="up"?-1:1));return}if(L==="delete"){const ne={start:v===z.length-1&&v>0?z[v-1].end:J.start,end:((te=z[v+1])==null?void 0:te.start)??J.end};me("",ne);return}const de=`
20
+
21
+ `+(L==="duplicate"?J.raw:"");me(de,{start:J.end,end:J.end}),L==="below"&&S(((le=ee.current.blocks.find(ne=>!ne.raw&&ne.start>=J.end))==null?void 0:le.id)||null)},Dt=(T,L)=>{const z=ee.current.blocks.find(J=>J.id===T);if(!z)return;const v=mr(z,L);he(ke(H.current.value,{start:z.start,end:z.end},v),{start:z.start+v.length,end:z.start+v.length}),S(null)},Rt=()=>{q||(W.current&&Ve(!1),F.current={value:H.current.value,selection:{...H.current.selection}},$.current=!0,I(""),M(""),d(!0))},Ee=(T=!0)=>{const L=F.current;F.current=null,$.current=!1,d(!1),M(""),T&&(L==null?void 0:L.value)===H.current.value&&ue(L.selection)},Ve=(T=!0)=>{var z;const L=(z=W.current)==null?void 0:z.target;N(),O(null),$.current=!1,T&&(L==null?void 0:L.value)===H.current.value&&ue(L.selection)},Mt=()=>{q||W.current||(Ee(!1),X.current++,w(null),$.current=!0,O({target:{value:H.current.value,selection:{...H.current.selection}},revision:ie.current,type:"image",url:"",description:"",phase:"idle"}))},At=T=>{const L=W.current;q||!L||["loading","picking","stale"].includes(L.phase)||O({...L,...T,phase:"idle",error:void 0,file:void 0})},Ce=T=>Q.current&&!G.current.isDisabled&&!G.current.isReadOnly&&T.revision===ie.current&&T.target.value===H.current.value&&W.current===T,nt=(T,L=W.current)=>{var it;if(!L||!Ce(L)||L.phase==="stale"||!T&&["loading","picking"].includes(L.phase))return;const z=((T==null?void 0:T.url)??L.url).trim(),v=(T==null?void 0:T.type)??L.type;if(!Ue(z)||!["image","video"].includes(v)){O({...L,phase:"error",error:Y.invalidMedia});return}const J=(L.description||((it=L.file)==null?void 0:it.name)||v).replace(/[\r\n]+/g," ").replace(/[\\`*{}\[\]()#+.!_>~|]/g,"\\$&"),de=z.replace(/[()"'<>]/g,zt=>`%${zt.charCodeAt(0).toString(16).toUpperCase()}`),te=v==="image"?`![${J}](${de})`:`[${J}](${de} "video")`,le=L.target.selection,ne=L.target.value.slice(0,le.start),pe=L.target.value.slice(le.end),Ht=v==="video"?`${ne&&!ne.endsWith(`
22
+
23
+ `)?ne.endsWith(`
46
24
  `)?`
47
25
  `:`
48
26
 
49
- `:""}${Ce}${eo&&!eo.startsWith(`
27
+ `:""}${te}${pe&&!pe.startsWith(`
50
28
 
51
- `)?eo.startsWith(`
29
+ `)?pe.startsWith(`
52
30
  `)?`
53
31
  `:`
54
32
 
55
- `:""}`:Ce;be(!1),de(Rc,Ee)},Pe=async(U,X)=>{var Ee;let ne=F.current;const ue=G.current.uploadMedia;if(!ne||!ue||!he(ne)||X===void 0&&["loading","picking"].includes(ne.phase)||X!==void 0&&X!==W.current)return;const ge=(Ee=/^(image|video)\//.exec(U.type))==null?void 0:Ee[1];if(!ge){z({...ne,phase:"error",error:L.invalidMedia});return}const $e=++W.current,Ce=new AbortController;M.current=Ce,ne={...ne,file:U,type:ge,phase:"loading",error:void 0},z(ne);try{const Se=await ue(U,{signal:Ce.signal});if(Ce.signal.aborted||$e!==W.current||!he(ne))return;if(!Se||Se.type!==ge||typeof Se.url!="string"||!fr(Se.url)){z({...ne,phase:"error",error:L.invalidMedia});return}Ve(Se,ne)}catch{!Ce.signal.aborted&&$e===W.current&&he(ne)&&z({...ne,phase:"error",error:L.uploadError})}finally{M.current===Ce&&(M.current=null)}},Me=async()=>{const U=F.current,X=G.current.pickMedia;if(!X||!G.current.uploadMedia||!U||!he(U)||["loading","picking"].includes(U.phase))return;const ne=++W.current,ue={...U,phase:"picking",error:void 0};z(ue);try{const ge=await X();if(ne!==W.current||!he(ue))return;ge?await Pe(ge,ne):z({...ue,phase:"idle"})}catch{ne===W.current&&he(ue)&&z({...ue,phase:"error",error:L.uploadError})}},De=()=>{const U=F.current;U&&(H(),z({...U,phase:"idle",error:void 0}))},mt=(U,X)=>{if(B||U!=="link"&&$.current.selection.start===$.current.selection.end)return;if(U==="link"&&A.current){if(A.current.value!==$.current.value){te(!1);return}oe(A.current.selection)}if(U==="link"&&!Io(X||"")){I(L.invalidLink);return}const ne=m||q.current.sourceMode||$.current.selection.start===$.current.selection.end?mn($.current.value,$.current.selection,U,X):Nf($.current.value,q.current.blocks,$.current.selection,U,X);ae(ne.value,ne.selection),U==="link"&&te(!1),I("")},$o=U=>{if(B||!G.current.generate)return;F.current&&be(!1);const X=U==="section"?{start:0,end:$.current.value.length}:$.current.selection;if(U==="selection"&&X.start===X.end){I(L.selectionRequired);return}te(!1),D.current=!0,_.current++,T({scope:U,target:{value:$.current.value,selection:{...X}},origin:{...$.current.selection},revision:O.current,fragment:$.current.value.slice(X.start,X.end),prompt:"",state:"prompt"})},io=(U=!0)=>{const X=N.current;_.current++,N.current=null,T(null),D.current=!1,U&&(X==null?void 0:X.target.value)===$.current.value&&X.revision===O.current&&ie(X.origin)},Lo=async()=>{const U=N.current;if(B||!(U!=null&&U.prompt.trim())||U.state==="loading"||U.revision!==O.current||!G.current.generate)return;const X=++_.current;N.current={...U,state:"loading"},T(N.current);try{const ne=await G.current.generate(U.prompt.trim(),U.fragment,U.scope);if(!ee.current||X!==_.current)return;if(!ne.trim())throw new Error("empty-proposal");T({...U,result:ne,state:"proposal"})}catch{ee.current&&X===_.current&&T({...U,state:"error"})}},Ze=()=>{const U=N.current;B||!(U!=null&&U.result)||U.revision!==O.current||U.target.value!==$.current.value||(de(U.result,U.target.selection),io(!1))},Bo=()=>{h(U=>!U),J.current=!0,g(U=>U+1)},gt=()=>{b(null),J.current=!0,g(U=>U+1)};return{value:n,document:i,selection:u,restoreVersion:d,restoreRequested:J,manualSource:m,toggleSource:Bo,source:m||i.sourceMode,activeId:f,setActiveId:y,commandId:k,setCommandId:b,closeCommand:gt,linkOpen:j,openLink:Q,closeLink:te,media:R,openMedia:xe,closeMedia:be,changeMedia:ye,insertMedia:Ve,uploadFile:Pe,chooseMedia:Me,cancelMediaUpload:De,link:C,setLink:v,message:S,setMessage:I,labels:L,locked:B,capture:oe,restoreSelection:ie,holdSelection:D,current:$,commit:ae,replace:de,editBlock:fe,breakBlock:Ie,mergeBackward:ce,undo:le,move:se,action:re,transform:pe,format:mt,ai:w,setAi:T,openAi:$o,closeAi:io,runAi:Lo,applyAi:Ze,stale:!!w&&w.revision!==O.current,canUndo:!!Y.current.undo.length,canRedo:!!Y.current.redo.length,historyVersion:V}}const Pa=(e,o)=>{var l,u;if(!e)return!0;const r=e.toLowerCase(),n=o.name.toLowerCase().includes(r),a=((l=o.description)==null?void 0:l.toLowerCase().includes(r))||!1,i=((u=o.keywords)==null?void 0:u.some(c=>c.toLowerCase().includes(r)))||!1;return n||a||i},Gf=({open:e,onOpenChange:o,groups:r=[],commands:n=[],filter:a})=>{const[i,l]=p.useState(""),[u,c]=p.useState(0),d=p.useRef(null),g=p.useMemo(()=>a||Pa,[a]),m=p.useMemo(()=>[...r.flatMap(b=>b.commands),...n],[r,n]),h=p.useMemo(()=>i.trim()?m.filter(k=>g(i,k)):m,[m,i,g]),f=p.useMemo(()=>{if(!i)return r;const k=a||Pa;return r.map(b=>({...b,commands:b.commands.filter(j=>k(i,j))})).filter(b=>b.commands.length)},[r,i,a]);p.useEffect(()=>{c(0)},[h.length]);const y=p.useCallback(k=>{if(e)switch(k.key){case"ArrowDown":k.preventDefault(),c(b=>b<h.length-1?b+1:b);break;case"ArrowUp":k.preventDefault(),c(b=>b>0?b-1:b);break;case"Enter":k.preventDefault(),h[u]&&(h[u].onSelect(),o(!1),l(""));break;case"Escape":k.preventDefault(),o(!1),l("");break}},[e,h,u,o]);return p.useEffect(()=>{if(!(typeof document>"u"))return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[y]),p.useEffect(()=>{const k=d.current;if(k&&typeof k.querySelector=="function"&&e){const b=k.querySelector(`[data-index="${u}"]`);b&&typeof b.scrollIntoView=="function"&&b.scrollIntoView({block:"nearest"})}},[u,e]),p.useEffect(()=>{e?c(0):l("")},[e]),{search:i,setSearch:l,selectedIndex:u,setSelectedIndex:c,filteredCommands:h,filteredGroups:f,listRef:d}},Yf=({onClose:e,children:o,...r})=>t.jsx(s.View,{position:"fixed",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-dark-50-240",zIndex:9999,onClick:n=>{n.target===n.currentTarget&&(e==null||e())},...r,children:o}),bs=p.forwardRef(({value:e,onValueChange:o,...r},n)=>t.jsx(s.Input,{value:e,onChange:a=>{var i,l;return o(typeof a=="string"?a:((i=a==null?void 0:a.target)==null?void 0:i.value)??((l=a==null?void 0:a.nativeEvent)==null?void 0:l.text)??"")},ref:n,...r}));bs.displayName="CommandTextInput";const Kf={sm:{width:"400px",maxHeight:"300px"},md:{width:"500px",maxHeight:"400px"},lg:{width:"600px",maxHeight:"500px"}},Xf=e=>({default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"},outline:{backgroundColor:"color-white",borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",boxShadow:"0px 4px 20px rgba(0, 0, 0, 0.1)"}}),Jf=Xf(),Qf={display:"flex",alignItems:"center",padding:"12px 16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},Zf={overflow:"auto",padding:"8px 0"},ey={marginBottom:"8px"},oy={padding:"8px 16px",fontSize:"12px",fontWeight:"bold",color:"color-gray-500",textTransform:"uppercase"},ty={display:"flex",alignItems:"center",padding:"8px 16px",cursor:"pointer",userSelect:"none",borderRadius:"4px",margin:"0 8px",_hover:{backgroundColor:"color-gray-100"}},ry={backgroundColor:"color-blue-50",_hover:{backgroundColor:"color-blue-100"}},ny={opacity:.5,cursor:"not-allowed",_hover:{backgroundColor:"transparent"}},ay={display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",color:"color-gray-500"},iy={display:"flex",flexDirection:"column",flex:1},ly={fontSize:"14px",fontWeight:"medium"},sy={fontSize:"12px",color:"color-gray-500",marginTop:"2px"},cy={display:"flex",alignItems:"center",marginLeft:"12px",fontSize:"12px",color:"color-gray-500"},dy={display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",color:"color-gray-500",textAlign:"center"},uy={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",fontSize:"12px",color:"color-gray-500"},py=p.createContext({search:"",setSearch:()=>{},selectedIndex:0,setSelectedIndex:()=>{},filteredCommands:[],onSelect:()=>{}}),my=({value:e,children:o})=>t.jsx(py.Provider,{value:e,children:o}),ks=({value:e,onValueChange:o,placeholder:r="Type a command or search...",views:n,...a})=>{const i=p.useRef(null);return p.useEffect(()=>{i.current&&i.current.focus()},[]),t.jsxs(s.View,{...Qf,...n==null?void 0:n.container,...a,children:[t.jsx(dr,{widthHeight:16,color:"color-gray-400",marginRight:"8px"}),t.jsx(bs,{width:"100%",border:"none",outline:"none",backgroundColor:"transparent",fontSize:"14px",...n==null?void 0:n.input,value:e,onValueChange:o,placeholder:r,ref:i})]})},gy=({children:e,views:o,...r})=>t.jsx(s.View,{...Zf,...o==null?void 0:o.container,...r,children:e}),Cs=({heading:e,children:o,views:r,...n})=>t.jsxs(s.View,{...ey,...r==null?void 0:r.container,...n,children:[t.jsx(s.Text,{...oy,...r==null?void 0:r.heading,children:e}),o]}),hn=({item:e,selected:o=!1,onSelect:r,views:n,...a})=>{const i=()=>{!e.disabled&&r&&r()};return t.jsxs(s.Horizontal,{...ty,...o?ry:{},...e.disabled?ny:{},onPress:i,onClick:i,...n==null?void 0:n.container,...a,children:[e.icon&&t.jsx(s.View,{...ay,...n==null?void 0:n.icon,children:e.icon}),t.jsxs(s.Vertical,{...iy,...n==null?void 0:n.content,children:[t.jsx(s.Text,{...ly,...n==null?void 0:n.name,children:e.name}),e.description&&t.jsx(s.Text,{...sy,...n==null?void 0:n.description,children:e.description})]}),e.shortcut&&t.jsx(s.Text,{...cy,...n==null?void 0:n.shortcut,children:e.shortcut})]})},Ss=({children:e="No results found.",views:o,...r})=>t.jsx(s.View,{...dy,...o==null?void 0:o.container,...r,children:e}),hy=({open:e,onOpenChange:o,groups:r=[],commands:n=[],placeholder:a,size:i="md",variant:l="default",emptyState:u,footer:c,search:d,setSearch:g,selectedIndex:m,setSelectedIndex:h,filteredCommands:f,filteredGroups:y,listRef:k,views:b,filter:j,...x})=>{if(!e)return null;const C=p.useCallback(w=>{w.disabled||(w.onSelect(),o(!1),g(""))},[o,g]);p.useCallback(w=>w.target===w.currentTarget&&o(!1),[o]);const v=p.useMemo(()=>({search:d,setSearch:g,selectedIndex:m,setSelectedIndex:h,filteredCommands:f,onSelect:C}),[d,m,f,C,g,h]),S=r.length>0,I=f.length===0;return t.jsx(Yf,{onClose:()=>o(!1),...x,children:t.jsx(my,{value:v,children:t.jsxs(s.View,{borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",...Kf[i],...Jf[l],...b==null?void 0:b.container,onClick:w=>w.stopPropagation(),children:[t.jsx(ks,{value:d,onValueChange:g,placeholder:a,views:b==null?void 0:b.searchInput}),t.jsx(s.View,{ref:k,flex:1,overflow:"auto",...b==null?void 0:b.list,children:I?u||t.jsx(Ss,{views:b==null?void 0:b.empty}):S?y.map(w=>t.jsx(Cs,{heading:w.name,views:b==null?void 0:b.groupHeading,children:w.commands.map(T=>{const R=f.findIndex(E=>E.id===T.id);return t.jsx(hn,{item:T,selected:R===m,onSelect:()=>C(T),"data-index":R,views:{container:b==null?void 0:b.item,icon:b==null?void 0:b.icon,content:b==null?void 0:b.content,name:b==null?void 0:b.name,description:b==null?void 0:b.description,shortcut:b==null?void 0:b.shortcut}},T.id)})},w.id)):f.map((w,T)=>t.jsx(hn,{item:w,selected:T===m,onSelect:()=>C(w),"data-index":T,views:{container:b==null?void 0:b.item,icon:b==null?void 0:b.icon,content:b==null?void 0:b.content,name:b==null?void 0:b.name,description:b==null?void 0:b.description,shortcut:b==null?void 0:b.shortcut}},w.id))}),c&&t.jsx(s.View,{...uy,...b==null?void 0:b.footer,children:c})]})})})},fy=({open:e,onOpenChange:o,groups:r=[],commands:n=[],placeholder:a,size:i="md",variant:l="default",filter:u,emptyState:c,footer:d,views:g,...m})=>{const{search:h,setSearch:f,selectedIndex:y,setSelectedIndex:k,filteredCommands:b,filteredGroups:j,listRef:x}=Gf({open:e,onOpenChange:o,groups:r,commands:n,filter:u});return t.jsx(hy,{open:e,onOpenChange:o,groups:r,commands:n,placeholder:a,size:i,variant:l,emptyState:c,footer:d,search:h,setSearch:f,selectedIndex:y,setSelectedIndex:k,filteredCommands:b,filteredGroups:j,listRef:x,views:g,...m})},Ao=fy;Ao.Input=ks;Ao.List=gy;Ao.Group=Cs;Ao.Item=hn;Ao.Empty=Ss;function yy({url:e,caption:o,native:r,allowVideos:n,renderVideo:a,onLinkPress:i}){const[l,u]=p.useState(!1);if(!n||l||!fr(e))return t.jsx(s.Text,{children:o||e});const c=a==null?void 0:a(e,o);return c!==void 0?t.jsx(t.Fragment,{children:c}):r?t.jsx(s.Text,{accessibilityRole:"link",color:"theme-primary",textDecorationLine:"underline",onPress:()=>i==null?void 0:i(e),children:o||e}):t.jsxs("figure",{style:{margin:0},children:[t.jsx("video",{src:e,controls:!0,preload:"none",playsInline:!0,"aria-label":o||e,style:{display:"block",maxWidth:"100%",width:"100%",height:"auto"},onError:()=>u(!0)}),o&&t.jsx("figcaption",{children:o})]})}function xy({node:e,native:o,allowImages:r}){const[n,a]=p.useState(!1),i=e.text||e.url||"";return!r||n||!fr(e.url||"")?t.jsx(s.Text,{children:i}):o?t.jsx(s.Image,{src:e.url,alt:i,width:240,height:160,resizeMode:"contain",onError:()=>a(!0)}):t.jsx("img",{src:e.url,alt:e.text||"",title:e.title,loading:"lazy",decoding:"async",style:{maxWidth:"100%",height:"auto"},onError:()=>a(!0)})}function by({nodes:e,native:o=!1,codeFontFamily:r="monospace",isDisplay:n=!1,onLinkPress:a,renderLink:i,allowImages:l=!0}){const u=(c,d)=>{var m,h,f,y,k;if(c.kind==="image")return t.jsx(xy,{node:c,native:o,allowImages:l},`${d}:${c.url}`);if(c.kind==="link"&&n){const b=c.url||"",j=(m=c.children)==null?void 0:m.map(u),x=Io(b),C=x||_f(b)?i==null?void 0:i(b,j):void 0;return C!==void 0?t.jsx(p.Fragment,{children:C},d):x?o?t.jsx(s.Text,{color:"theme-primary",textDecorationLine:"underline",accessibilityRole:"link",onPress:()=>a==null?void 0:a(b),children:j},d):t.jsx(Wt,{href:b,title:c.title,display:"inline",color:"theme-primary",underline:"underline",_focusVisible:{outline:"2px solid currentColor",outlineOffset:2},onClick:a?v=>{v.preventDefault(),a(b)}:void 0,children:j},d):t.jsx(p.Fragment,{children:j},d)}if(o){const b={bold:{fontWeight:"700"},italic:{fontStyle:"italic"},underline:{textDecorationLine:"underline"},strikethrough:{textDecorationLine:"line-through"},code:{fontFamily:r,backgroundColor:"color-gray-100"},link:{color:"theme-primary",textDecorationLine:"underline"},text:{},break:{}};return t.jsx(s.Text,{...b[c.kind],...n&&c.kind==="link"&&Io(c.url||"")?{accessibilityRole:"link",onPress:()=>a==null?void 0:a(c.url)}:{},children:c.kind==="break"?`
56
- `:c.children?c.children.map(u):c.text},d)}if(c.kind==="text")return t.jsx("span",{"data-source-start":c.start,"data-source-end":c.end,children:c.text},d);if(c.kind==="break")return t.jsx("br",{"data-source-start":c.start,"data-source-end":c.end},d);if(c.kind==="code")return t.jsx("code",{children:t.jsx("span",{"data-source-start":c.contentStart??c.start+1,"data-source-end":(c.contentStart??c.start+1)+(((h=c.text)==null?void 0:h.length)||0),children:c.text})},d);if(c.kind==="link")return n&&Io(c.url||"")?t.jsx(Wt,{href:c.url,display:"inline",color:"theme-primary",underline:"underline",_focusVisible:{outline:"2px solid currentColor",outlineOffset:2},onClick:a?b=>{b.preventDefault(),a(c.url)}:void 0,children:(f=c.children)==null?void 0:f.map(u)},d):t.jsx("a",{href:Io(c.url||"")?c.url:void 0,onClick:b=>b.preventDefault(),children:(y=c.children)==null?void 0:y.map(u)},d);const g={bold:"strong",italic:"em",underline:"u",strikethrough:"s"}[c.kind];return p.createElement(g,{key:d},(k=c.children)==null?void 0:k.map(u))};return t.jsx(t.Fragment,{children:e.map(u)})}function ws({block:e,native:o=!1,codeFontFamily:r="monospace",isDisplay:n=!1,onLinkPress:a,renderLink:i,allowImages:l,allowVideos:u=!0,renderVideo:c}){var m,h;if(n&&e.kind==="paragraph"){const f=ro(e.body.trim(),0,0,!0),y=f.length===1&&f[0].kind==="link"&&f[0].title==="video"?f[0]:null;if(y){const k=b=>b.children?b.children.map(k).join(""):b.text||"";return t.jsx(yy,{url:y.url||"",caption:k(y),native:o,allowVideos:u,renderVideo:c,onLinkPress:a},y.url)}}const d=(f,y)=>!f&&!o&&!n?t.jsx("span",{"data-source-start":y,"data-source-end":y,children:t.jsx("br",{})}):t.jsx(by,{nodes:ro(f,y,0,n),native:o,codeFontFamily:r,isDisplay:n,onLinkPress:a,renderLink:i,allowImages:l});if(e.kind==="hr")return o?t.jsx(s.View,{borderBottomWidth:1,borderColor:"color-gray-300",marginVertical:8}):t.jsx("hr",{style:{border:0,borderTop:"1px solid #d1d5db",margin:"8px 0"}});if(e.kind==="codeBlock")return o?t.jsx(s.Text,{fontFamily:r,style:o?void 0:{whiteSpace:"pre-wrap"},children:e.body}):t.jsx(s.Element,{as:"pre",margin:0,padding:12,borderRadius:8,backgroundColor:"color-gray-100",fontFamily:r,style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:n?t.jsx("code",{children:e.body}):t.jsx("span",{"data-source-start":e.bodyStart,"data-source-end":e.bodyStart+e.body.length,children:e.body||t.jsx("br",{})})});if(e.kind==="table"){const f=e.raw.split(/\r?\n/)[1],y=f.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(x=>/:\s*$/.test(x)?/^\s*:/.test(x)?"center":"right":"left");let k=e.start;const b=e.raw.split(/\r?\n/).map(x=>{const C=k;k+=x.length+(e.raw.includes(`\r
57
- `)?2:1);const v=[];let S=x.startsWith("|")?1:0;for(let I=S;I<=x.length;I++)if(I===x.length||x[I]==="|"&&x[I-1]!=="\\"){const w=x.slice(S,I),T=w.trim();(I!==x.length||T||x[x.length-1]!=="|")&&v.push({text:T,start:C+S+w.indexOf(T)}),S=I+1}return v}).filter((x,C)=>C!==1),j=t.jsx(Fe,{children:t.jsxs(Fe.Container,{"data-table-separator":o?void 0:f,minWidth:n?Math.max((((m=b[0])==null?void 0:m.length)||0)*140,320):void 0,children:[t.jsx(Fe.Head,{children:t.jsx(Fe.Row,{children:(h=b[0])==null?void 0:h.map((x,C)=>t.jsx(Fe.HeadCell,{textAlign:y[C],children:d(x.text,x.start)},C))})}),t.jsx(Fe.Body,{children:b.slice(1).map((x,C)=>t.jsx(Fe.Row,{children:x.map((v,S)=>t.jsx(Fe.Cell,{textAlign:y[S],children:d(v.text,v.start)},S))},C))})]})});return n?t.jsx(Dl,{children:j}):j}if(e.kind==="bullet"||e.kind==="number"){let f=e.start;const y=e.raw.split(/\r?\n/).map((k,b)=>{var S;const j=f;f+=k.length+(e.raw.includes(`\r
58
- `)?2:1);const x=/^(\s*)([-*+] |\d+[.)] )?(.*)$/.exec(k),C=n&&/^\[([ xX])\][ \t]+(.*)$/.exec(x[3]),v=d(C?C[2]:x[3],j+x[1].length+(((S=x[2])==null?void 0:S.length)||0)+(C?x[3].length-C[2].length:0));return o?t.jsx(s.View,{paddingLeft:x[1].length*8,children:t.jsxs(s.Text,{children:[C?t.jsx(s.Text,{accessibilityRole:"checkbox",accessibilityState:{checked:C[1].toLowerCase()==="x",disabled:!0},children:C[1].toLowerCase()==="x"?"☑ ":"☐ "}):x[2]?/\d/.test(x[2])?x[2]:"• ":"",v]})},b):t.jsxs("li",{"data-list-indent":x[1],"data-list-marker":x[2]||"",style:{marginLeft:x[1].length*8,listStyleType:"none"},children:[C?t.jsx("input",{type:"checkbox",checked:C[1].toLowerCase()==="x",readOnly:!0,disabled:!0,"aria-label":C[2]}):x[2]&&t.jsx("span",{contentEditable:!1,"aria-hidden":"true",style:{display:"inline-block",marginLeft:-20,width:20},children:/\d/.test(x[2])?x[2]:"• "}),v]},b)});return o?t.jsx(s.View,{children:y}):e.kind==="number"?t.jsx("ol",{style:{margin:0,paddingLeft:24},children:y}):t.jsx("ul",{style:{margin:0,paddingLeft:24},children:y})}if(e.kind==="quote"){let f=e.start;const y=e.raw.split(/\r?\n/).map((k,b)=>{var C;const j=f;f+=k.length+(e.raw.includes(`\r
59
- `)?2:1);const x=((C=k.match(/^> ?/))==null?void 0:C[0].length)||0;return t.jsxs(p.Fragment,{children:[b>0&&(o?`
60
- `:t.jsx("br",{})),d(k.slice(x),j+x)]},b)});return o?t.jsx(s.View,{borderLeftWidth:3,borderColor:"color-gray-300",paddingLeft:12,children:t.jsx(s.Text,{children:y})}):t.jsx("blockquote",{style:{margin:0,borderLeft:"3px solid #d1d5db",paddingLeft:12},children:y})}if(o)return t.jsx(s.Text,{accessibilityRole:n&&e.kind!=="paragraph"?"header":void 0,fontSize:e.kind==="h1"?28:e.kind==="h2"?24:e.kind==="h3"?20:e.kind==="h4"?18:e.kind==="h5"?16:e.kind==="h6"?14:16,fontWeight:e.kind==="paragraph"?"400":"700",children:d(e.body,e.bodyStart)});const g=e.kind==="paragraph"?"p":e.kind;return p.createElement(g,{style:{margin:0,minHeight:24}},e.body?d(e.body,e.bodyStart):t.jsx("span",{"data-source-start":e.bodyStart,"data-source-end":e.bodyStart,children:t.jsx("br",{})}))}function ky({state:e,disabled:o}){const r=p.useRef(null);return t.jsxs(t.Fragment,{children:[t.jsx(me,{type:"button",isDisabled:o,onClick:()=>{var n;return(n=r.current)==null?void 0:n.click()},children:e.labels.upload}),t.jsx("input",{ref:r,type:"file",accept:"image/*,video/*",hidden:!0,disabled:o,onChange:n=>{var i;const a=(i=n.currentTarget.files)==null?void 0:i[0];n.currentTarget.value="",a&&e.uploadFile(a)}})]})}function fn({state:e,props:o,preserve:r,formatting:n=!1}){var u;const a=e.selection.start!==e.selection.end,i=r?36:44,l=(c,d,g=!1,m)=>t.jsx(me,{type:"button",size:"sm",variant:"outline",minWidth:i,minHeight:i,paddingHorizontal:10,views:{content:{fontSize:14,fontWeight:c==="bold"?"700":"600",fontStyle:c==="italic"?"italic":"normal",textDecoration:c==="underline"?"underline":c==="strikethrough"?"line-through":void 0}},"aria-label":c==="source"&&e.source?e.labels.visual:e.labels[c],title:e.labels[c],isDisabled:e.locked||g,onPointerDown:r,onMouseDown:r?h=>h.preventDefault():void 0,onClick:d,children:m||e.labels[c]},c);return t.jsxs(s.Horizontal,{role:"toolbar","aria-label":e.labels.selectionToolbar,gap:4,flexWrap:"wrap",alignItems:"center",...(u=o.views)==null?void 0:u.toolbar,children:[n?t.jsxs(t.Fragment,{children:[[["bold","B"],["italic","I"],["underline","U"],["strikethrough","S"],["code","</>"]].map(([c,d])=>l(c,()=>e.format(c),!a,d)),l("link",e.openLink),o.generate&&l("askSelection",()=>e.openAi("selection"),!a)]}):t.jsxs(t.Fragment,{children:[l("undo",()=>e.undo(),!e.canUndo),l("redo",()=>e.undo(!0),!e.canRedo),l("media",e.openMedia),l("source",e.toggleSource,e.document.sourceMode,e.source?e.labels.visual:e.labels.source),o.generate&&l("askSection",()=>e.openAi("section")),o.onSave&&l("save",()=>{var c;return(c=o.onSave)==null?void 0:c.call(o)})]}),t.jsx(hs,{trigger:t.jsx(zt,{name:"smile",widthHeight:18,strokeWidth:2}),"aria-label":e.labels.emoji,isDisabled:e.locked,onPointerDown:r,onMouseDown:r?c=>c.preventDefault():void 0,onOpen:()=>{e.holdSelection.current=!0},onClose:()=>{e.holdSelection.current=!1},showRecentEmojis:!1,onChange:c=>e.replace(c),views:{container:{width:"auto"},trigger:{width:i,height:i,minHeight:i,boxSizing:"border-box",padding:0,justifyContent:"center",alignItems:"center"}}})]})}function Cy({state:e,views:o,floating:r=!1,uploadEnabled:n=!1}){return!e.ai&&!e.linkOpen&&!e.media?null:t.jsxs(s.Vertical,{padding:16,gap:12,borderWidth:r?0:1,borderColor:"color-gray-200",borderRadius:12,...o==null?void 0:o.panel,children:[e.media&&t.jsxs(s.Vertical,{as:r?"form":void 0,role:"group","aria-label":e.labels.media,gap:8,minWidth:r?280:void 0,onSubmit:r?a=>{a.preventDefault(),["loading","picking","stale"].includes(e.media.phase)||e.insertMedia()}:void 0,children:[t.jsx(s.Text,{children:e.labels.mediaSource}),t.jsx(s.Horizontal,{gap:8,children:["image","video"].map(a=>t.jsx(me,{type:"button",variant:e.media.type===a?"solid":"outline","aria-pressed":e.media.type===a,isDisabled:e.locked||["loading","picking","stale"].includes(e.media.phase),onClick:()=>e.changeMedia({type:a}),children:e.labels[a]},a))}),t.jsx(Be,{label:e.labels.mediaUrl,value:e.media.url,isAutoFocus:!0,isDisabled:e.locked||["loading","picking","stale"].includes(e.media.phase),onChange:a=>e.changeMedia({url:a})}),t.jsx(Be,{label:e.labels.mediaDescription,value:e.media.description,isDisabled:e.locked||["loading","picking","stale"].includes(e.media.phase),onChange:a=>e.changeMedia({description:a})}),e.media.error&&t.jsx(s.Text,{role:"alert",children:e.media.error}),e.media.phase==="stale"&&t.jsx(s.Text,{role:"status",children:e.labels.mediaStale}),["loading","picking"].includes(e.media.phase)?t.jsxs(t.Fragment,{children:[t.jsx(s.Text,{role:"status",children:e.media.phase==="picking"?e.labels.pickingMedia:e.labels.uploading}),t.jsx(me,{type:"button",onClick:e.cancelMediaUpload,children:e.labels.cancelUpload})]}):t.jsxs(s.Horizontal,{gap:8,flexWrap:"wrap",children:[t.jsx(me,{type:r?"submit":"button",isDisabled:e.locked||e.media.phase==="stale"||!e.media.url.trim(),onClick:r?void 0:()=>e.insertMedia(),children:e.labels.apply}),n&&t.jsx(ky,{state:e,disabled:e.locked||e.media.phase==="stale"}),e.media.phase==="error"&&e.media.file&&n&&t.jsx(me,{type:"button",isDisabled:e.locked,onClick:()=>void e.uploadFile(e.media.file),children:e.labels.retry})]}),t.jsx(me,{type:"button",variant:"ghost",onClick:()=>e.closeMedia(),children:e.labels.cancel})]}),e.linkOpen&&t.jsxs(s.Vertical,{as:r?"form":void 0,role:"group","aria-label":e.labels.link,gap:8,minWidth:r?260:void 0,onSubmit:r?a=>{a.preventDefault(),e.format("link",e.link.trim())}:void 0,children:[t.jsx(Be,{label:e.labels.linkUrl,value:e.link,isAutoFocus:!0,onChange:e.setLink}),e.message&&t.jsx(s.Text,{role:"alert",children:e.message}),t.jsxs(s.Horizontal,{gap:8,children:[t.jsx(me,{type:r?"submit":"button",isDisabled:e.locked,onClick:r?void 0:()=>e.format("link",e.link.trim()),children:e.labels.apply}),t.jsx(me,{type:"button",variant:"ghost",onClick:()=>{e.closeLink()},children:e.labels.cancel})]})]}),e.ai&&t.jsxs(s.Vertical,{role:"region","aria-label":e.labels.aiPanel,gap:8,children:[t.jsx(s.Text,{children:e.ai.scope==="section"?e.labels.askSection:e.labels.askSelection}),t.jsx(s.Text,{children:e.ai.fragment}),t.jsx($t,{label:e.labels.instruction,value:e.ai.prompt,isAutoFocus:!0,isDisabled:e.locked||e.ai.state==="loading",onChange:a=>e.setAi(i=>i&&{...i,prompt:a})}),e.ai.state==="loading"&&t.jsx(s.Text,{role:"status",children:e.labels.generating}),e.ai.state==="error"&&t.jsx(s.Text,{role:"alert",children:e.labels.aiError}),e.ai.state==="proposal"&&t.jsxs(s.Vertical,{gap:8,children:[t.jsx(s.Text,{fontWeight:"700",children:e.labels.proposal}),t.jsx(s.Text,{children:e.ai.result})]}),e.stale&&t.jsx(s.Text,{role:"status",children:e.labels.stale}),t.jsxs(s.Horizontal,{gap:8,flexWrap:"wrap",children:[e.ai.state==="proposal"&&t.jsx(me,{type:"button",isDisabled:e.locked||e.stale,onClick:e.applyAi,children:e.labels.apply}),t.jsx(me,{type:"button",isDisabled:e.locked||e.stale||e.ai.state==="loading"||!e.ai.prompt.trim(),onClick:()=>void e.runAi(),children:e.ai.state==="proposal"||e.ai.state==="error"?e.labels.retry:e.labels.generate}),t.jsx(me,{type:"button",variant:"ghost",onClick:()=>e.closeAi(),children:e.labels.discard})]})]})]})}const yn=new WeakMap;function Et(e,o=!1){const r=e.ownerDocument.getSelection();if(!(r!=null&&r.anchorNode)||!r.focusNode||!e.contains(r.anchorNode)||!e.contains(r.focusNode))return null;const n=Mt(e,r.anchorNode,r.anchorOffset),a=Mt(e,r.focusNode,r.focusOffset);return n===null||a===null?null:{start:Math.min(n,a),end:Math.max(n,a),...o&&a<n?{backward:!0}:{}}}function Mt(e,o,r){var c,d;const n=o.nodeType===1?o:o.parentElement,a=n==null?void 0:n.closest("[data-block-start]"),i=yn.get(o);if((i==null?void 0:i[r])!==void 0)return Number((a==null?void 0:a.dataset.blockStart)||0)+i[r];const l=n==null?void 0:n.closest("[data-source-start]");if(l&&e.contains(l)){if(o.nodeType===3&&l.childNodes.length===1)return Number(l.dataset.sourceStart)+r;const g=e.ownerDocument.createRange();return g.selectNodeContents(l),g.setEnd(o,r),Number(l.dataset.sourceStart)+g.toString().length}if(!a)return null;if(o.nodeType===1){const g=o.childNodes[r]||o.childNodes[r-1];if((g==null?void 0:g.nodeType)===1){const m=g,h=m.matches("[data-source-start]")?[m]:Array.from(m.querySelectorAll("[data-source-start]")),f=r===o.childNodes.length,y=f?h[h.length-1]:h[0];if(y)return Number(f?y.dataset.sourceEnd:y.dataset.sourceStart)}}const u=Array.from(a.querySelectorAll("[data-source-start]"));return Number(r===0?((c=u[0])==null?void 0:c.dataset.sourceStart)??a.dataset.blockStart:((d=u[u.length-1])==null?void 0:d.dataset.sourceEnd)??a.dataset.blockStart)}function js(e,o){var c,d;const r=Array.from(e.querySelectorAll("[data-source-start]")),n=g=>{var y;let m,h=1/0;for(const k of r){const b=Number(k.dataset.sourceStart),j=Number(k.dataset.sourceEnd),x=g<b?b-g:g>j?g-j:0;x<h&&(m=k,h=x)}if(!m)return null;if(m.tagName==="BR"&&m.parentNode){const k=Array.from(m.parentNode.childNodes).indexOf(m);return[m.parentNode,k+(g>=Number(m.dataset.sourceEnd)?1:0)]}const f=m.firstChild;return(f==null?void 0:f.nodeType)===3?[f,Math.max(0,Math.min(g-Number(m.dataset.sourceStart),((y=f.textContent)==null?void 0:y.length)||0))]:[m,0]},a=n(o.start),i=n(o.end);if(!a||!i)return!1;const l=e.ownerDocument.createRange();l.setStart(...a),l.setEnd(...i),(d=(c=(o.backward?a:i)[0].parentElement)==null?void 0:c.closest('[contenteditable="true"]'))==null||d.focus({preventScroll:!0});const u=e.ownerDocument.getSelection();if(u!=null&&u.setBaseAndExtent){const g=o.backward?i:a,m=o.backward?a:i;u.setBaseAndExtent(...g,...m)}else u==null||u.removeAllRanges(),u==null||u.addRange(l),o.backward&&(u!=null&&u.extend)&&(u.collapse(...i),u.extend(...a));return!0}function Sy(e){const o=e.ownerDocument.getSelection();let r="",n,a;const i=(c,d)=>{const g=yn.get(c)||[];g[d]=r.length,yn.set(c,g),(o==null?void 0:o.anchorNode)===c&&o.anchorOffset===d&&(n=r.length),(o==null?void 0:o.focusNode)===c&&o.focusOffset===d&&(a=r.length)},l=c=>{r+=c},u=(c,d="",g=!1,m=!1)=>{var j;if(c.nodeType===3){const x=c.textContent||"";for(let C=0;C<=x.length;C++)i(c,C),C<x.length&&l(g?x[C]:x[C]===`
61
- `&&m?`
62
- > `:/[\\`*_[\]<>~|#+]/.test(x[C])?"\\"+x[C]:x[C]);return}if(c.nodeType!==1)return;const h=c,f=h.tagName.toLowerCase();if(["script","style","iframe","object","embed"].includes(f)||h.contentEditable==="false")return;const y={strong:["**","**"],b:["**","**"],em:["*","*"],i:["*","*"],u:["<u>","</u>"],s:["~~","~~"],del:["~~","~~"],strike:["~~","~~"],code:["`","`"],a:["[",`](${h.getAttribute("href")||""})`]};if(f==="code"){const x="`".repeat(Math.max(1,...Array.from((h.textContent||"").matchAll(/`+/g),C=>C[0].length+1)));y.code=[x,x]}if(f==="br"){i(c,0),l(m?`
63
- > `:h.hasAttribute("data-source-start")?"<br>":`
64
- `);return}if(["p","div","h1","h2","h3","blockquote","ul","ol","table"].includes(f)&&c!==e&&r&&!r.endsWith(g?`
33
+ `:""}`:te;Ve(!1),me(Ht,le)},rt=async(T,L)=>{var le;let z=W.current;const v=G.current.uploadMedia;if(!z||!v||!Ce(z)||L===void 0&&["loading","picking"].includes(z.phase)||L!==void 0&&L!==A.current)return;const J=(le=/^(image|video)\//.exec(T.type))==null?void 0:le[1];if(!J){O({...z,phase:"error",error:Y.invalidMedia});return}const de=++A.current,te=new AbortController;V.current=te,z={...z,file:T,type:J,phase:"loading",error:void 0},O(z);try{const ne=await v(T,{signal:te.signal});if(te.signal.aborted||de!==A.current||!Ce(z))return;if(!ne||ne.type!==J||typeof ne.url!="string"||!Ue(ne.url)){O({...z,phase:"error",error:Y.invalidMedia});return}nt(ne,z)}catch{!te.signal.aborted&&de===A.current&&Ce(z)&&O({...z,phase:"error",error:Y.uploadError})}finally{V.current===te&&(V.current=null)}},Lt=async()=>{const T=W.current,L=G.current.pickMedia;if(!L||!G.current.uploadMedia||!T||!Ce(T)||["loading","picking"].includes(T.phase))return;const z=++A.current,v={...T,phase:"picking",error:void 0};O(v);try{const J=await L();if(z!==A.current||!Ce(v))return;J?await rt(J,z):O({...v,phase:"idle"})}catch{z===A.current&&Ce(v)&&O({...v,phase:"error",error:Y.uploadError})}},$t=()=>{const T=W.current;T&&(N(),O({...T,phase:"idle",error:void 0}))},Bt=(T,L)=>{if(q||T!=="link"&&H.current.selection.start===H.current.selection.end)return;if(T==="link"&&F.current){if(F.current.value!==H.current.value){Ee(!1);return}oe(F.current.selection)}if(T==="link"&&!Se(L||"")){M(Y.invalidLink);return}const z=f||ee.current.sourceMode||H.current.selection.start===H.current.selection.end?ve(H.current.value,H.current.selection,T,L):xr(H.current.value,ee.current.blocks,H.current.selection,T,L);he(z.value,z.selection),T==="link"&&Ee(!1),M("")},Vt=T=>{if(q||!G.current.generate)return;W.current&&Ve(!1);const L=T==="section"?{start:0,end:H.current.value.length}:H.current.selection;if(T==="selection"&&L.start===L.end){M(Y.selectionRequired);return}Ee(!1),$.current=!0,X.current++,w({scope:T,target:{value:H.current.value,selection:{...L}},origin:{...H.current.selection},revision:ie.current,fragment:H.current.value.slice(L.start,L.end),prompt:"",state:"prompt"})},ot=(T=!0)=>{const L=U.current;X.current++,U.current=null,w(null),$.current=!1,T&&(L==null?void 0:L.target.value)===H.current.value&&L.revision===ie.current&&ue(L.origin)},Pt=async()=>{const T=U.current;if(q||!(T!=null&&T.prompt.trim())||T.state==="loading"||T.revision!==ie.current||!G.current.generate)return;const L=++X.current;U.current={...T,state:"loading"},w(U.current);try{const z=await G.current.generate(T.prompt.trim(),T.fragment,T.scope);if(!Q.current||L!==X.current)return;if(!z.trim())throw new Error("empty-proposal");w({...T,result:z,state:"proposal"})}catch{Q.current&&L===X.current&&w({...T,state:"error"})}},Ft=()=>{const T=U.current;q||!(T!=null&&T.result)||T.revision!==ie.current||T.target.value!==H.current.value||(me(T.result,T.target.selection),ot(!1))},Wt=()=>{x(T=>!T),se.current=!0,l(T=>T+1)},Ot=()=>{S(null),se.current=!0,l(T=>T+1)};return{value:g,document:a,selection:b,restoreVersion:s,restoreRequested:se,manualSource:f,toggleSource:Wt,source:f||a.sourceMode,activeId:y,setActiveId:u,commandId:j,setCommandId:S,closeCommand:Ot,linkOpen:D,openLink:Rt,closeLink:Ee,media:R,openMedia:Mt,closeMedia:Ve,changeMedia:At,insertMedia:nt,uploadFile:rt,chooseMedia:Lt,cancelMediaUpload:$t,link:m,setLink:I,message:k,setMessage:M,labels:Y,locked:q,capture:oe,restoreSelection:ue,holdSelection:$,current:H,commit:he,replace:me,editBlock:qe,breakBlock:Xe,mergeBackward:ge,undo:Be,move:xe,action:Te,transform:Dt,format:Bt,ai:p,setAi:w,openAi:Vt,closeAi:ot,runAi:Pt,applyAi:Ft,stale:!!p&&p.revision!==ie.current,canUndo:!!re.current.undo.length,canRedo:!!re.current.redo.length,historyVersion:_}}function yr({url:e,caption:t,native:r,allowVideos:g,renderVideo:o,onLinkPress:a}){const[c,b]=C.useState(!1);if(!g||c||!Ue(e))return n.jsx(h.Text,{children:t||e});const i=o==null?void 0:o(e,t);return i!==void 0?n.jsx(n.Fragment,{children:i}):r?n.jsx(h.Text,{accessibilityRole:"link",color:"theme-primary",textDecorationLine:"underline",onPress:()=>a==null?void 0:a(e),children:t||e}):n.jsxs("figure",{style:{margin:0},children:[n.jsx("video",{src:e,controls:!0,preload:"none",playsInline:!0,"aria-label":t||e,style:{display:"block",maxWidth:"100%",width:"100%",height:"auto"},onError:()=>b(!0)}),t&&n.jsx("figcaption",{children:t})]})}function Cr({node:e,native:t,allowImages:r}){const[g,o]=C.useState(!1),a=e.text||e.url||"";return!r||g||!Ue(e.url||"")?n.jsx(h.Text,{children:a}):t?n.jsx(h.Image,{src:e.url,alt:a,width:240,height:160,resizeMode:"contain",onError:()=>o(!0)}):n.jsx("img",{src:e.url,alt:e.text||"",title:e.title,loading:"lazy",decoding:"async",style:{maxWidth:"100%",height:"auto"},onError:()=>o(!0)})}function Sr({nodes:e,native:t=!1,codeFontFamily:r="monospace",isDisplay:g=!1,onLinkPress:o,renderLink:a,allowImages:c=!0}){const b=(i,s)=>{var f,x,y,u,j;if(i.kind==="image")return n.jsx(Cr,{node:i,native:t,allowImages:c},`${s}:${i.url}`);if(i.kind==="link"&&g){const S=i.url||"",D=(f=i.children)==null?void 0:f.map(b),d=Se(S),m=d||fr(S)?a==null?void 0:a(S,D):void 0;return m!==void 0?n.jsx(C.Fragment,{children:m},s):d?t?n.jsx(h.Text,{color:"theme-primary",textDecorationLine:"underline",accessibilityRole:"link",onPress:()=>o==null?void 0:o(S),children:D},s):n.jsx(Ye.Link,{href:S,title:i.title,display:"inline",color:"theme-primary",underline:"underline",_focusVisible:{outline:"2px solid currentColor",outlineOffset:2},onClick:o?I=>{I.preventDefault(),o(S)}:void 0,children:D},s):n.jsx(C.Fragment,{children:D},s)}if(t){const S={bold:{fontWeight:"700"},italic:{fontStyle:"italic"},underline:{textDecorationLine:"underline"},strikethrough:{textDecorationLine:"line-through"},code:{fontFamily:r,backgroundColor:"color-gray-100"},link:{color:"theme-primary",textDecorationLine:"underline"},text:{},break:{}};return n.jsx(h.Text,{...S[i.kind],...g&&i.kind==="link"&&Se(i.url||"")?{accessibilityRole:"link",onPress:()=>o==null?void 0:o(i.url)}:{},children:i.kind==="break"?`
34
+ `:i.children?i.children.map(b):i.text},s)}if(i.kind==="text")return n.jsx("span",{"data-source-start":i.start,"data-source-end":i.end,children:i.text},s);if(i.kind==="break")return n.jsx("br",{"data-source-start":i.start,"data-source-end":i.end},s);if(i.kind==="code")return n.jsx("code",{children:n.jsx("span",{"data-source-start":i.contentStart??i.start+1,"data-source-end":(i.contentStart??i.start+1)+(((x=i.text)==null?void 0:x.length)||0),children:i.text})},s);if(i.kind==="link")return g&&Se(i.url||"")?n.jsx(Ye.Link,{href:i.url,display:"inline",color:"theme-primary",underline:"underline",_focusVisible:{outline:"2px solid currentColor",outlineOffset:2},onClick:o?S=>{S.preventDefault(),o(i.url)}:void 0,children:(y=i.children)==null?void 0:y.map(b)},s):n.jsx("a",{href:Se(i.url||"")?i.url:void 0,onClick:S=>S.preventDefault(),children:(u=i.children)==null?void 0:u.map(b)},s);const l={bold:"strong",italic:"em",underline:"u",strikethrough:"s"}[i.kind];return C.createElement(l,{key:s},(j=i.children)==null?void 0:j.map(b))};return n.jsx(n.Fragment,{children:e.map(b)})}function It({block:e,native:t=!1,codeFontFamily:r="monospace",isDisplay:g=!1,onLinkPress:o,renderLink:a,allowImages:c,allowVideos:b=!0,renderVideo:i}){var f,x;if(g&&e.kind==="paragraph"){const y=fe(e.body.trim(),0,0,!0),u=y.length===1&&y[0].kind==="link"&&y[0].title==="video"?y[0]:null;if(u){const j=S=>S.children?S.children.map(j).join(""):S.text||"";return n.jsx(yr,{url:u.url||"",caption:j(u),native:t,allowVideos:b,renderVideo:i,onLinkPress:o},u.url)}}const s=(y,u)=>!y&&!t&&!g?n.jsx("span",{"data-source-start":u,"data-source-end":u,children:n.jsx("br",{})}):n.jsx(Sr,{nodes:fe(y,u,0,g),native:t,codeFontFamily:r,isDisplay:g,onLinkPress:o,renderLink:a,allowImages:c});if(e.kind==="hr")return t?n.jsx(h.View,{borderBottomWidth:1,borderColor:"color-gray-300",marginVertical:8}):n.jsx("hr",{style:{border:0,borderTop:"1px solid #d1d5db",margin:"8px 0"}});if(e.kind==="codeBlock")return t?n.jsx(h.Text,{fontFamily:r,style:t?void 0:{whiteSpace:"pre-wrap"},children:e.body}):n.jsx(h.Element,{as:"pre",margin:0,padding:12,borderRadius:8,backgroundColor:"color-gray-100",fontFamily:r,style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:g?n.jsx("code",{children:e.body}):n.jsx("span",{"data-source-start":e.bodyStart,"data-source-end":e.bodyStart+e.body.length,children:e.body||n.jsx("br",{})})});if(e.kind==="table"){const y=e.raw.split(/\r?\n/)[1],u=y.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(d=>/:\s*$/.test(d)?/^\s*:/.test(d)?"center":"right":"left");let j=e.start;const S=e.raw.split(/\r?\n/).map(d=>{const m=j;j+=d.length+(e.raw.includes(`\r
35
+ `)?2:1);const I=[];let k=d.startsWith("|")?1:0;for(let M=k;M<=d.length;M++)if(M===d.length||d[M]==="|"&&d[M-1]!=="\\"){const p=d.slice(k,M),w=p.trim();(M!==d.length||w||d[d.length-1]!=="|")&&I.push({text:w,start:m+k+p.indexOf(w)}),k=M+1}return I}).filter((d,m)=>m!==1),D=n.jsx(P.Table,{children:n.jsxs(P.Table.Container,{"data-table-separator":t?void 0:y,minWidth:g?Math.max((((f=S[0])==null?void 0:f.length)||0)*140,320):void 0,children:[n.jsx(P.Table.Head,{children:n.jsx(P.Table.Row,{children:(x=S[0])==null?void 0:x.map((d,m)=>n.jsx(P.Table.HeadCell,{textAlign:u[m],children:s(d.text,d.start)},m))})}),n.jsx(P.Table.Body,{children:S.slice(1).map((d,m)=>n.jsx(P.Table.Row,{children:d.map((I,k)=>n.jsx(P.Table.Cell,{textAlign:u[k],children:s(I.text,I.start)},k))},m))})]})});return g?n.jsx(P.TableScroll,{children:D}):D}if(e.kind==="bullet"||e.kind==="number"){let y=e.start;const u=e.raw.split(/\r?\n/).map((j,S)=>{var k;const D=y;y+=j.length+(e.raw.includes(`\r
36
+ `)?2:1);const d=/^(\s*)([-*+] |\d+[.)] )?(.*)$/.exec(j),m=g&&/^\[([ xX])\][ \t]+(.*)$/.exec(d[3]),I=s(m?m[2]:d[3],D+d[1].length+(((k=d[2])==null?void 0:k.length)||0)+(m?d[3].length-m[2].length:0));return t?n.jsx(h.View,{paddingLeft:d[1].length*8,children:n.jsxs(h.Text,{children:[m?n.jsx(h.Text,{accessibilityRole:"checkbox",accessibilityState:{checked:m[1].toLowerCase()==="x",disabled:!0},children:m[1].toLowerCase()==="x"?"☑ ":"☐ "}):d[2]?/\d/.test(d[2])?d[2]:"• ":"",I]})},S):n.jsxs("li",{"data-list-indent":d[1],"data-list-marker":d[2]||"",style:{marginLeft:d[1].length*8,listStyleType:"none"},children:[m?n.jsx("input",{type:"checkbox",checked:m[1].toLowerCase()==="x",readOnly:!0,disabled:!0,"aria-label":m[2]}):d[2]&&n.jsx("span",{contentEditable:!1,"aria-hidden":"true",style:{display:"inline-block",marginLeft:-20,width:20},children:/\d/.test(d[2])?d[2]:"• "}),I]},S)});return t?n.jsx(h.View,{children:u}):e.kind==="number"?n.jsx("ol",{style:{margin:0,paddingLeft:24},children:u}):n.jsx("ul",{style:{margin:0,paddingLeft:24},children:u})}if(e.kind==="quote"){let y=e.start;const u=e.raw.split(/\r?\n/).map((j,S)=>{var m;const D=y;y+=j.length+(e.raw.includes(`\r
37
+ `)?2:1);const d=((m=j.match(/^> ?/))==null?void 0:m[0].length)||0;return n.jsxs(C.Fragment,{children:[S>0&&(t?`
38
+ `:n.jsx("br",{})),s(j.slice(d),D+d)]},S)});return t?n.jsx(h.View,{borderLeftWidth:3,borderColor:"color-gray-300",paddingLeft:12,children:n.jsx(h.Text,{children:u})}):n.jsx("blockquote",{style:{margin:0,borderLeft:"3px solid #d1d5db",paddingLeft:12},children:u})}if(t)return n.jsx(h.Text,{accessibilityRole:g&&e.kind!=="paragraph"?"header":void 0,fontSize:e.kind==="h1"?28:e.kind==="h2"?24:e.kind==="h3"?20:e.kind==="h4"?18:e.kind==="h5"?16:e.kind==="h6"?14:16,fontWeight:e.kind==="paragraph"?"400":"700",children:s(e.body,e.bodyStart)});const l=e.kind==="paragraph"?"p":e.kind;return C.createElement(l,{style:{margin:0,minHeight:24}},e.body?s(e.body,e.bodyStart):n.jsx("span",{"data-source-start":e.bodyStart,"data-source-end":e.bodyStart,children:n.jsx("br",{})}))}function jr({state:e,disabled:t}){const r=C.useRef(null);return n.jsxs(n.Fragment,{children:[n.jsx(P.Button,{type:"button",isDisabled:t,onClick:()=>{var g;return(g=r.current)==null?void 0:g.click()},children:e.labels.upload}),n.jsx("input",{ref:r,type:"file",accept:"image/*,video/*",hidden:!0,disabled:t,onChange:g=>{var a;const o=(a=g.currentTarget.files)==null?void 0:a[0];g.currentTarget.value="",o&&e.uploadFile(o)}})]})}function Ge({state:e,props:t,preserve:r,formatting:g=!1}){var b;const o=e.selection.start!==e.selection.end,a=r?36:44,c=(i,s,l=!1,f)=>n.jsx(P.Button,{type:"button",size:"sm",variant:"outline",minWidth:a,minHeight:a,paddingHorizontal:10,views:{content:{fontSize:14,fontWeight:i==="bold"?"700":"600",fontStyle:i==="italic"?"italic":"normal",textDecoration:i==="underline"?"underline":i==="strikethrough"?"line-through":void 0}},"aria-label":i==="source"&&e.source?e.labels.visual:e.labels[i],title:e.labels[i],isDisabled:e.locked||l,onPointerDown:r,onMouseDown:r?x=>x.preventDefault():void 0,onClick:s,children:f||e.labels[i]},i);return n.jsxs(h.Horizontal,{role:"toolbar","aria-label":e.labels.selectionToolbar,gap:4,flexWrap:"wrap",alignItems:"center",...(b=t.views)==null?void 0:b.toolbar,children:[g?n.jsxs(n.Fragment,{children:[[["bold","B"],["italic","I"],["underline","U"],["strikethrough","S"],["code","</>"]].map(([i,s])=>c(i,()=>e.format(i),!o,s)),c("link",e.openLink),t.generate&&c("askSelection",()=>e.openAi("selection"),!o)]}):n.jsxs(n.Fragment,{children:[c("undo",()=>e.undo(),!e.canUndo),c("redo",()=>e.undo(!0),!e.canRedo),c("media",e.openMedia),c("source",e.toggleSource,e.document.sourceMode,e.source?e.labels.visual:e.labels.source),t.generate&&c("askSection",()=>e.openAi("section")),t.onSave&&c("save",()=>{var i;return(i=t.onSave)==null?void 0:i.call(t)})]}),n.jsx(yt,{trigger:n.jsx(E.Icon,{name:"smile",widthHeight:18,strokeWidth:2}),"aria-label":e.labels.emoji,isDisabled:e.locked,onPointerDown:r,onMouseDown:r?i=>i.preventDefault():void 0,onOpen:()=>{e.holdSelection.current=!0},onClose:()=>{e.holdSelection.current=!1},showRecentEmojis:!1,onChange:i=>e.replace(i),views:{container:{width:"auto"},trigger:{width:a,height:a,minHeight:a,boxSizing:"border-box",padding:0,justifyContent:"center",alignItems:"center"}}})]})}function Ir({state:e,views:t,floating:r=!1,uploadEnabled:g=!1}){return!e.ai&&!e.linkOpen&&!e.media?null:n.jsxs(h.Vertical,{padding:16,gap:12,borderWidth:r?0:1,borderColor:"color-gray-200",borderRadius:12,...t==null?void 0:t.panel,children:[e.media&&n.jsxs(h.Vertical,{as:r?"form":void 0,role:"group","aria-label":e.labels.media,gap:8,minWidth:r?280:void 0,onSubmit:r?o=>{o.preventDefault(),["loading","picking","stale"].includes(e.media.phase)||e.insertMedia()}:void 0,children:[n.jsx(h.Text,{children:e.labels.mediaSource}),n.jsx(h.Horizontal,{gap:8,children:["image","video"].map(o=>n.jsx(P.Button,{type:"button",variant:e.media.type===o?"solid":"outline","aria-pressed":e.media.type===o,isDisabled:e.locked||["loading","picking","stale"].includes(e.media.phase),onClick:()=>e.changeMedia({type:o}),children:e.labels[o]},o))}),n.jsx(Me.TextField,{label:e.labels.mediaUrl,value:e.media.url,isAutoFocus:!0,isDisabled:e.locked||["loading","picking","stale"].includes(e.media.phase),onChange:o=>e.changeMedia({url:o})}),n.jsx(Me.TextField,{label:e.labels.mediaDescription,value:e.media.description,isDisabled:e.locked||["loading","picking","stale"].includes(e.media.phase),onChange:o=>e.changeMedia({description:o})}),e.media.error&&n.jsx(h.Text,{role:"alert",children:e.media.error}),e.media.phase==="stale"&&n.jsx(h.Text,{role:"status",children:e.labels.mediaStale}),["loading","picking"].includes(e.media.phase)?n.jsxs(n.Fragment,{children:[n.jsx(h.Text,{role:"status",children:e.media.phase==="picking"?e.labels.pickingMedia:e.labels.uploading}),n.jsx(P.Button,{type:"button",onClick:e.cancelMediaUpload,children:e.labels.cancelUpload})]}):n.jsxs(h.Horizontal,{gap:8,flexWrap:"wrap",children:[n.jsx(P.Button,{type:r?"submit":"button",isDisabled:e.locked||e.media.phase==="stale"||!e.media.url.trim(),onClick:r?void 0:()=>e.insertMedia(),children:e.labels.apply}),g&&n.jsx(jr,{state:e,disabled:e.locked||e.media.phase==="stale"}),e.media.phase==="error"&&e.media.file&&g&&n.jsx(P.Button,{type:"button",isDisabled:e.locked,onClick:()=>void e.uploadFile(e.media.file),children:e.labels.retry})]}),n.jsx(P.Button,{type:"button",variant:"ghost",onClick:()=>e.closeMedia(),children:e.labels.cancel})]}),e.linkOpen&&n.jsxs(h.Vertical,{as:r?"form":void 0,role:"group","aria-label":e.labels.link,gap:8,minWidth:r?260:void 0,onSubmit:r?o=>{o.preventDefault(),e.format("link",e.link.trim())}:void 0,children:[n.jsx(Me.TextField,{label:e.labels.linkUrl,value:e.link,isAutoFocus:!0,onChange:e.setLink}),e.message&&n.jsx(h.Text,{role:"alert",children:e.message}),n.jsxs(h.Horizontal,{gap:8,children:[n.jsx(P.Button,{type:r?"submit":"button",isDisabled:e.locked,onClick:r?void 0:()=>e.format("link",e.link.trim()),children:e.labels.apply}),n.jsx(P.Button,{type:"button",variant:"ghost",onClick:()=>{e.closeLink()},children:e.labels.cancel})]})]}),e.ai&&n.jsxs(h.Vertical,{role:"region","aria-label":e.labels.aiPanel,gap:8,children:[n.jsx(h.Text,{children:e.ai.scope==="section"?e.labels.askSection:e.labels.askSelection}),n.jsx(h.Text,{children:e.ai.fragment}),n.jsx(P.TextArea,{label:e.labels.instruction,value:e.ai.prompt,isAutoFocus:!0,isDisabled:e.locked||e.ai.state==="loading",onChange:o=>e.setAi(a=>a&&{...a,prompt:o})}),e.ai.state==="loading"&&n.jsx(h.Text,{role:"status",children:e.labels.generating}),e.ai.state==="error"&&n.jsx(h.Text,{role:"alert",children:e.labels.aiError}),e.ai.state==="proposal"&&n.jsxs(h.Vertical,{gap:8,children:[n.jsx(h.Text,{fontWeight:"700",children:e.labels.proposal}),n.jsx(h.Text,{children:e.ai.result})]}),e.stale&&n.jsx(h.Text,{role:"status",children:e.labels.stale}),n.jsxs(h.Horizontal,{gap:8,flexWrap:"wrap",children:[e.ai.state==="proposal"&&n.jsx(P.Button,{type:"button",isDisabled:e.locked||e.stale,onClick:e.applyAi,children:e.labels.apply}),n.jsx(P.Button,{type:"button",isDisabled:e.locked||e.stale||e.ai.state==="loading"||!e.ai.prompt.trim(),onClick:()=>void e.runAi(),children:e.ai.state==="proposal"||e.ai.state==="error"?e.labels.retry:e.labels.generate}),n.jsx(P.Button,{type:"button",variant:"ghost",onClick:()=>e.closeAi(),children:e.labels.discard})]})]})]})}const Ze=new WeakMap;function Le(e,t=!1){const r=e.ownerDocument.getSelection();if(!(r!=null&&r.anchorNode)||!r.focusNode||!e.contains(r.anchorNode)||!e.contains(r.focusNode))return null;const g=Ae(e,r.anchorNode,r.anchorOffset),o=Ae(e,r.focusNode,r.focusOffset);return g===null||o===null?null:{start:Math.min(g,o),end:Math.max(g,o),...t&&o<g?{backward:!0}:{}}}function Ae(e,t,r){var i,s;const g=t.nodeType===1?t:t.parentElement,o=g==null?void 0:g.closest("[data-block-start]"),a=Ze.get(t);if((a==null?void 0:a[r])!==void 0)return Number((o==null?void 0:o.dataset.blockStart)||0)+a[r];const c=g==null?void 0:g.closest("[data-source-start]");if(c&&e.contains(c)){if(t.nodeType===3&&c.childNodes.length===1)return Number(c.dataset.sourceStart)+r;const l=e.ownerDocument.createRange();return l.selectNodeContents(c),l.setEnd(t,r),Number(c.dataset.sourceStart)+l.toString().length}if(!o)return null;if(t.nodeType===1){const l=t.childNodes[r]||t.childNodes[r-1];if((l==null?void 0:l.nodeType)===1){const f=l,x=f.matches("[data-source-start]")?[f]:Array.from(f.querySelectorAll("[data-source-start]")),y=r===t.childNodes.length,u=y?x[x.length-1]:x[0];if(u)return Number(y?u.dataset.sourceEnd:u.dataset.sourceStart)}}const b=Array.from(o.querySelectorAll("[data-source-start]"));return Number(r===0?((i=b[0])==null?void 0:i.dataset.sourceStart)??o.dataset.blockStart:((s=b[b.length-1])==null?void 0:s.dataset.sourceEnd)??o.dataset.blockStart)}function wt(e,t){var i,s;const r=Array.from(e.querySelectorAll("[data-source-start]")),g=l=>{var u;let f,x=1/0;for(const j of r){const S=Number(j.dataset.sourceStart),D=Number(j.dataset.sourceEnd),d=l<S?S-l:l>D?l-D:0;d<x&&(f=j,x=d)}if(!f)return null;if(f.tagName==="BR"&&f.parentNode){const j=Array.from(f.parentNode.childNodes).indexOf(f);return[f.parentNode,j+(l>=Number(f.dataset.sourceEnd)?1:0)]}const y=f.firstChild;return(y==null?void 0:y.nodeType)===3?[y,Math.max(0,Math.min(l-Number(f.dataset.sourceStart),((u=y.textContent)==null?void 0:u.length)||0))]:[f,0]},o=g(t.start),a=g(t.end);if(!o||!a)return!1;const c=e.ownerDocument.createRange();c.setStart(...o),c.setEnd(...a),(s=(i=(t.backward?o:a)[0].parentElement)==null?void 0:i.closest('[contenteditable="true"]'))==null||s.focus({preventScroll:!0});const b=e.ownerDocument.getSelection();if(b!=null&&b.setBaseAndExtent){const l=t.backward?a:o,f=t.backward?o:a;b.setBaseAndExtent(...l,...f)}else b==null||b.removeAllRanges(),b==null||b.addRange(c),t.backward&&(b!=null&&b.extend)&&(b.collapse(...a),b.extend(...o));return!0}function wr(e){const t=e.ownerDocument.getSelection();let r="",g,o;const a=(i,s)=>{const l=Ze.get(i)||[];l[s]=r.length,Ze.set(i,l),(t==null?void 0:t.anchorNode)===i&&t.anchorOffset===s&&(g=r.length),(t==null?void 0:t.focusNode)===i&&t.focusOffset===s&&(o=r.length)},c=i=>{r+=i},b=(i,s="",l=!1,f=!1)=>{var D;if(i.nodeType===3){const d=i.textContent||"";for(let m=0;m<=d.length;m++)a(i,m),m<d.length&&c(l?d[m]:d[m]===`
39
+ `&&f?`
40
+ > `:/[\\`*_[\]<>~|#+]/.test(d[m])?"\\"+d[m]:d[m]);return}if(i.nodeType!==1)return;const x=i,y=x.tagName.toLowerCase();if(["script","style","iframe","object","embed"].includes(y)||x.contentEditable==="false")return;const u={strong:["**","**"],b:["**","**"],em:["*","*"],i:["*","*"],u:["<u>","</u>"],s:["~~","~~"],del:["~~","~~"],strike:["~~","~~"],code:["`","`"],a:["[",`](${x.getAttribute("href")||""})`]};if(y==="code"){const d="`".repeat(Math.max(1,...Array.from((x.textContent||"").matchAll(/`+/g),m=>m[0].length+1)));u.code=[d,d]}if(y==="br"){a(i,0),c(f?`
41
+ > `:x.hasAttribute("data-source-start")?"<br>":`
42
+ `);return}if(["p","div","h1","h2","h3","blockquote","ul","ol","table"].includes(y)&&i!==e&&r&&!r.endsWith(l?`
65
43
  `:`
66
44
 
67
- `)&&l(g||r.endsWith(`
45
+ `)&&c(l||r.endsWith(`
68
46
  `)?`
69
47
  `:`
70
48
 
71
- `),/^h[123]$/.test(f)&&l("#".repeat(Number(f[1]))+" "),f==="blockquote"&&l("> "),f==="li"){r&&!r.endsWith(`
72
- `)&&l(`
73
- `);const x=((j=h.parentElement)==null?void 0:j.tagName)==="OL",C=h.parentElement?Array.from(h.parentElement.children).indexOf(h)+1:1;l((h.dataset.listIndent??d)+(h.dataset.listMarker??(x?`${C}. `:"- ")))}if(f==="table"){Array.from(h.querySelectorAll("tr")).forEach((C,v)=>{v&&l(`
74
- `),l("| "),Array.from(C.children).forEach(S=>{u(S,d),l(" | ")}),v===0&&l(`
75
- `+(h.dataset.tableSeparator||"| "+Array.from(C.children).map(()=>"---").join(" | ")+" |"))});return}!g&&y[f]&&h.textContent&&l(y[f][0]);const b=Array.from(c.childNodes);b.forEach((x,C)=>{i(c,C),u(x,f==="li"?d+" ":d,g||f==="code",m||f==="blockquote")}),i(c,b.length),!g&&y[f]&&h.textContent&&l(y[f][1])};return u(e,"",e.hasAttribute("data-code-block")),{text:r,selection:{start:Math.min(n??r.length,a??r.length),end:Math.max(n??r.length,a??r.length)}}}let Da;function Xt(e){var a,i,l;Da??(Da=new Intl.Segmenter(void 0,{granularity:"grapheme"}));const o=[],r=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT);let n;for(;n=r.nextNode();){if((a=n.parentElement)!=null&&a.closest('[contenteditable="false"]'))continue;if(n.nodeType===1){if(n.tagName!=="BR")continue;const d=n.parentNode,g=Array.from(d.childNodes).indexOf(n),m=d;if(m.dataset.sourceStart!==void 0&&m.dataset.sourceStart===m.dataset.sourceEnd&&!m.textContent){o.push({node:d,offset:0,source:Number(m.dataset.sourceStart)});continue}const h=n.dataset.sourceEnd!==void 0?Number(n.dataset.sourceEnd):Mt(e,d,g+1);if(!o.length){const f=Mt(e,d,g);f!==null&&o.push({node:d,offset:g,source:f})}h!==null&&Number.isFinite(h)&&((i=o[o.length-1])==null?void 0:i.source)!==h&&o.push({node:d,offset:g+1,source:h});continue}const u=n.textContent||"",c=[0,...Array.from(Da.segment(u),d=>d.index+d.segment.length)];for(const d of c){const g=Mt(e,n,d);g!==null&&((l=o[o.length-1])==null?void 0:l.source)!==g&&o.push({node:n,offset:d,source:g})}}if(!o.length){const u=e.querySelector("[data-source-start]");u&&o.push({node:u,offset:0,source:Number(u.dataset.sourceStart)})}return o}function Jt(e){var n,a;const o=e.node.ownerDocument.createRange();o.setStart(e.node,e.offset),o.collapse(!0);const r=(n=o.getBoundingClientRect)==null?void 0:n.call(o);return r!=null&&r.height?r:(a=e.node.nodeType===1?e.node:e.node.parentElement)==null?void 0:a.getBoundingClientRect()}function $a(e,o){var n,a,i;const r="p,h1,h2,h3,li,td,th,pre,blockquote,div";return e.node!==o.node&&e.offset===((n=e.node.textContent)==null?void 0:n.length)&&o.offset===0&&((a=e.node.parentElement)==null?void 0:a.closest(r))===((i=o.node.parentElement)==null?void 0:i.closest(r))}function wy(e,o,r,n){var C,v,S,I,w;if(typeof Intl.Segmenter!="function")return null;const a=e.ownerDocument.getSelection(),i=Et(e,!0);if(!i||!(a!=null&&a.focusNode)||!a.anchorNode)return null;const l=Array.from(e.querySelectorAll("[data-block-id]")),u=o==="ArrowLeft"||o==="ArrowUp",c=o==="ArrowUp"||o==="ArrowDown",d=a.focusNode.nodeType===1?a.focusNode:a.focusNode.parentElement;let g=l.indexOf(d==null?void 0:d.closest("[data-block-id]"));if(g<0)return null;let m=Xt(l[g]);if(!m.length)return null;const h=i.backward?i.start:i.end;let f=m.findIndex(T=>T.node===a.focusNode&&T.offset===a.focusOffset);f<0&&(f=m.reduce((T,R,E)=>Math.abs(R.source-h)<Math.abs(m[T].source-h)?E:T,0));let y=m[f],k=c?n??((C=Jt(y))==null?void 0:C.left)??0:null;if(!r&&i.start!==i.end&&!c){const T=u?i.start:i.end,R=l.find(F=>{const W=F.querySelectorAll("[data-source-start]");return W.length&&T>=Number(W[0].dataset.sourceStart)&&T<=Number(W[W.length-1].dataset.sourceEnd)});y=(R?Xt(R):m).reduce((F,W)=>Math.abs(W.source-T)<Math.abs(F.source-T)?W:F)}else if(c){const T=Jt(y),R=(F,W)=>{const M=F.map(V=>({point:V,rect:Jt(V)})).filter(V=>V.rect&&(!W||!T||(u?V.rect.bottom<T.bottom-T.height/2:V.rect.top>T.top+T.height/2)));if(!M.length)return null;const z=u?Math.max(...M.map(V=>V.rect.top)):Math.min(...M.map(V=>V.rect.top));return M.filter(V=>Math.abs(V.rect.top-z)<Math.max(1,V.rect.height/2)).reduce((V,P)=>Math.abs(P.rect.left-k)<Math.abs(V.rect.left-k)?P:V).point},E=R(m,!0);E?y=E:(g+=u?-1:1,l[g]&&(y=R(Xt(l[g]),!1)??y))}else{const T=u?-1:1;let R=f+T;R>=0&&R<m.length&&(u?$a(m[R],m[f]):$a(m[f],m[R]))&&(R+=T),R>=0&&R<m.length?y=m[R]:(m=l[g+T]?Xt(l[g+T]):[],m.length&&(y=m[u?m.length-1:0]))}const b=r?{node:a.anchorNode,offset:a.anchorOffset,source:i.backward?i.end:i.start}:y,j=(v=y.node.nodeType===1?y.node:y.node.parentElement)==null?void 0:v.closest("[data-editor-input]");j==null||j.focus({preventScroll:!0}),a.setBaseAndExtent(b.node,b.offset,y.node,y.offset);const x=Jt(y);return x&&(x.top<0||x.bottom>(((S=e.ownerDocument.defaultView)==null?void 0:S.innerHeight)??1/0))&&((w=(I=y.node.parentElement)==null?void 0:I.scrollIntoView)==null||w.call(I,{block:"nearest"})),{selection:{start:Math.min(b.source,y.source),end:Math.max(b.source,y.source),...y.source<b.source?{backward:!0}:{}},x:k}}function jy(e,o,r,n,a=!1){const i=p.useRef(!1),l=p.useRef(null),[u,c]=p.useState(!1),d=p.useRef(null),g=p.useRef(null),m=p.useRef(null),h=()=>{i.current=!1,c(!1)};p.useEffect(()=>{const w=e.current.current.selection;!e.source&&!e.locked&&w.start===0&&w.end===e.value.length&&e.value.length>0&&(i.current=!0,c(!0)),(e.source||e.locked||e.current.current.selection.start===e.current.current.selection.end)&&h(),l.current=null,d.current=null,g.current=null,m.current=null},[e.value,e.source,e.locked]);const f=w=>{var R;const T=w instanceof Element?w.closest("[data-editor-input]"):null;return T&&((R=o.current)!=null&&R.contains(T))?T:null},y=w=>{if(i.current)return{start:0,end:e.current.current.value.length,...e.current.current.selection.backward?{backward:!0}:{}};if((w==null?void 0:w.tagName)==="TEXTAREA"){const T=w,R=Number(T.dataset.editorOffset||0);return{start:R+T.selectionStart,end:R+T.selectionEnd}}return o.current?Et(o.current,!0):null},k=w=>i.current||e.document.blocks.filter(T=>w.start<T.end&&w.end>T.start).length>1,b=(w,T,R)=>{if(e.source||w.tagName==="TEXTAREA")return null;if(T==="insertParagraph"||T==="insertLineBreak")return fs(e.current.current.value,e.document.blocks,R,T==="insertLineBreak");const E=w.querySelector("[data-source-start]");if(T==="deleteContentBackward"&&R.start===R.end){const F=Array.from(w.querySelectorAll("li")).find(W=>{var M;return Number((M=W.querySelector("[data-source-start]"))==null?void 0:M.dataset.sourceStart)===R.start});if(R.start===Number(E==null?void 0:E.dataset.sourceStart)||F)return ys(e.current.current.value,e.document.blocks,w.dataset.blockId||"",F&&R.start!==Number(E==null?void 0:E.dataset.sourceStart)?R.start:void 0)??{value:e.current.current.value,selection:R}}return null},j=()=>{var E,F,W;const w=(E=o.current)==null?void 0:E.ownerDocument.activeElement;if((w==null?void 0:w.tagName)==="INPUT"||(w==null?void 0:w.tagName)==="TEXTAREA"){const M=f(w);if(M){const z=y(M);z&&e.capture(z)}return null}const T=(F=o.current)==null?void 0:F.ownerDocument.getSelection();if(!(T!=null&&T.anchorNode)||!T.focusNode||!((W=o.current)!=null&&W.contains(T.anchorNode))||!o.current.contains(T.focusNode))return i.current&&h(),null;const R=y();return R&&e.capture(R),R},x=(w,T=!1)=>{const R=f(w.target);if(!R||R.tagName==="TEXTAREA")return;const E=y(R);!E||E.start===E.end||(w.clipboardData.setData("text/plain",e.current.current.value.slice(E.start,E.end)),w.preventDefault(),T&&!e.locked&&(e.capture(E),e.replace("",Va(e.document.blocks,E)),h()))},C=w=>{if(w.defaultPrevented||w.nativeEvent.isComposing)return;const T=f(w.target);if(!T)return;const R=y(T);R&&e.capture(R);const E=w.key.toLowerCase();E==="tab"&&h();const F=(w.ctrlKey||w.metaKey)&&!w.altKey;if(F&&E==="a"&&!w.shiftKey&&T.tagName!=="TEXTAREA"){w.preventDefault();const W=T.ownerDocument.createRange();W.selectNodeContents(r.current);const M=T.ownerDocument.getSelection();M==null||M.removeAllRanges(),M==null||M.addRange(W),i.current=!0,c(!0),e.capture({start:0,end:e.current.current.value.length});return}if(i.current&&["arrowleft","arrowright","arrowup","arrowdown","home","end","escape"].includes(E)){if(w.shiftKey&&o.current&&js(o.current,{start:0,end:e.current.current.value.length,...e.current.current.selection.backward?{backward:!0}:{}}),h(),!w.shiftKey){w.preventDefault();const W=e.document.blocks[0],M=e.document.blocks[e.document.blocks.length-1],z=["arrowleft","arrowup","home"].includes(E)?W.bodyStart:M.kind==="codeBlock"?M.bodyStart+M.body.length:M.end;e.restoreSelection({start:z,end:z})}if(!w.shiftKey)return}if(!e.source&&!e.locked&&!F&&!w.altKey&&T.tagName!=="TEXTAREA"&&["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(w.key)&&o.current){const W=wy(o.current,w.key,w.shiftKey,l.current);if(W){w.preventDefault(),l.current=W.x,e.capture(W.selection);return}}else l.current=null;if(!e.locked){if(F){E==="z"||E==="y"?(w.preventDefault(),h(),e.undo(E==="y"||w.shiftKey)):E==="s"&&n?(w.preventDefault(),n()):E==="a"&&w.shiftKey&&a?(w.preventDefault(),e.openAi("selection")):["b","i","u"].includes(E)?(w.preventDefault(),e.format({b:"bold",i:"italic",u:"underline"}[E])):E==="k"&&(w.preventDefault(),e.openLink());return}if(!w.altKey&&R&&["enter","backspace"].includes(E)){const W=b(T,E==="enter"?w.shiftKey?"insertLineBreak":"insertParagraph":"deleteContentBackward",R);if(W){w.preventDefault(),e.commit(W.value,W.selection),h();return}}if(T.tagName!=="TEXTAREA"&&R&&R.start!==R.end&&["backspace","delete"].includes(E)){w.preventDefault(),e.replace("",Va(e.document.blocks,R)),h();return}if(R&&k(R)){const W=E==="backspace"||E==="delete"?"":E==="enter"?`
76
-
77
- `:w.key.length===1&&!w.altKey?w.key:null;if(W!==null){w.preventDefault(),e.replace(W,R,w.key.length===1),h();return}}}},v=w=>{var F;const T=f(w.target);if(!T||e.locked||w.isComposing||d.current)return;if(w.inputType==="historyUndo"||w.inputType==="historyRedo"){w.cancelable&&(w.preventDefault(),e.undo(w.inputType==="historyRedo"));return}const R=y(T);if(R){const W=b(T,w.inputType,R);if(W){e.capture(R),w.cancelable?(w.preventDefault(),e.commit(W.value,W.selection),h()):m.current=W;return}}if(!R||!k(R))return;const E=(F=w.inputType)!=null&&F.startsWith("delete")?"":["insertParagraph","insertLineBreak"].includes(w.inputType)?`
49
+ `),/^h[123]$/.test(y)&&c("#".repeat(Number(y[1]))+" "),y==="blockquote"&&c("> "),y==="li"){r&&!r.endsWith(`
50
+ `)&&c(`
51
+ `);const d=((D=x.parentElement)==null?void 0:D.tagName)==="OL",m=x.parentElement?Array.from(x.parentElement.children).indexOf(x)+1:1;c((x.dataset.listIndent??s)+(x.dataset.listMarker??(d?`${m}. `:"- ")))}if(y==="table"){Array.from(x.querySelectorAll("tr")).forEach((m,I)=>{I&&c(`
52
+ `),c("| "),Array.from(m.children).forEach(k=>{b(k,s),c(" | ")}),I===0&&c(`
53
+ `+(x.dataset.tableSeparator||"| "+Array.from(m.children).map(()=>"---").join(" | ")+" |"))});return}!l&&u[y]&&x.textContent&&c(u[y][0]);const S=Array.from(i.childNodes);S.forEach((d,m)=>{a(i,m),b(d,y==="li"?s+" ":s,l||y==="code",f||y==="blockquote")}),a(i,S.length),!l&&u[y]&&x.textContent&&c(u[y][1])};return b(e,"",e.hasAttribute("data-code-block")),{text:r,selection:{start:Math.min(g??r.length,o??r.length),end:Math.max(g??r.length,o??r.length)}}}let dt;function We(e){var o,a,c;dt??(dt=new Intl.Segmenter(void 0,{granularity:"grapheme"}));const t=[],r=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT);let g;for(;g=r.nextNode();){if((o=g.parentElement)!=null&&o.closest('[contenteditable="false"]'))continue;if(g.nodeType===1){if(g.tagName!=="BR")continue;const s=g.parentNode,l=Array.from(s.childNodes).indexOf(g),f=s;if(f.dataset.sourceStart!==void 0&&f.dataset.sourceStart===f.dataset.sourceEnd&&!f.textContent){t.push({node:s,offset:0,source:Number(f.dataset.sourceStart)});continue}const x=g.dataset.sourceEnd!==void 0?Number(g.dataset.sourceEnd):Ae(e,s,l+1);if(!t.length){const y=Ae(e,s,l);y!==null&&t.push({node:s,offset:l,source:y})}x!==null&&Number.isFinite(x)&&((a=t[t.length-1])==null?void 0:a.source)!==x&&t.push({node:s,offset:l+1,source:x});continue}const b=g.textContent||"",i=[0,...Array.from(dt.segment(b),s=>s.index+s.segment.length)];for(const s of i){const l=Ae(e,g,s);l!==null&&((c=t[t.length-1])==null?void 0:c.source)!==l&&t.push({node:g,offset:s,source:l})}}if(!t.length){const b=e.querySelector("[data-source-start]");b&&t.push({node:b,offset:0,source:Number(b.dataset.sourceStart)})}return t}function Oe(e){var g,o;const t=e.node.ownerDocument.createRange();t.setStart(e.node,e.offset),t.collapse(!0);const r=(g=t.getBoundingClientRect)==null?void 0:g.call(t);return r!=null&&r.height?r:(o=e.node.nodeType===1?e.node:e.node.parentElement)==null?void 0:o.getBoundingClientRect()}function ut(e,t){var g,o,a;const r="p,h1,h2,h3,li,td,th,pre,blockquote,div";return e.node!==t.node&&e.offset===((g=e.node.textContent)==null?void 0:g.length)&&t.offset===0&&((o=e.node.parentElement)==null?void 0:o.closest(r))===((a=t.node.parentElement)==null?void 0:a.closest(r))}function Tr(e,t,r,g){var m,I,k,M,p;if(typeof Intl.Segmenter!="function")return null;const o=e.ownerDocument.getSelection(),a=Le(e,!0);if(!a||!(o!=null&&o.focusNode)||!o.anchorNode)return null;const c=Array.from(e.querySelectorAll("[data-block-id]")),b=t==="ArrowLeft"||t==="ArrowUp",i=t==="ArrowUp"||t==="ArrowDown",s=o.focusNode.nodeType===1?o.focusNode:o.focusNode.parentElement;let l=c.indexOf(s==null?void 0:s.closest("[data-block-id]"));if(l<0)return null;let f=We(c[l]);if(!f.length)return null;const x=a.backward?a.start:a.end;let y=f.findIndex(w=>w.node===o.focusNode&&w.offset===o.focusOffset);y<0&&(y=f.reduce((w,R,B)=>Math.abs(R.source-x)<Math.abs(f[w].source-x)?B:w,0));let u=f[y],j=i?g??((m=Oe(u))==null?void 0:m.left)??0:null;if(!r&&a.start!==a.end&&!i){const w=b?a.start:a.end,R=c.find(W=>{const A=W.querySelectorAll("[data-source-start]");return A.length&&w>=Number(A[0].dataset.sourceStart)&&w<=Number(A[A.length-1].dataset.sourceEnd)});u=(R?We(R):f).reduce((W,A)=>Math.abs(A.source-w)<Math.abs(W.source-w)?A:W)}else if(i){const w=Oe(u),R=(W,A)=>{const V=W.map(_=>({point:_,rect:Oe(_)})).filter(_=>_.rect&&(!A||!w||(b?_.rect.bottom<w.bottom-w.height/2:_.rect.top>w.top+w.height/2)));if(!V.length)return null;const O=b?Math.max(...V.map(_=>_.rect.top)):Math.min(...V.map(_=>_.rect.top));return V.filter(_=>Math.abs(_.rect.top-O)<Math.max(1,_.rect.height/2)).reduce((_,Z)=>Math.abs(Z.rect.left-j)<Math.abs(_.rect.left-j)?Z:_).point},B=R(f,!0);B?u=B:(l+=b?-1:1,c[l]&&(u=R(We(c[l]),!1)??u))}else{const w=b?-1:1;let R=y+w;R>=0&&R<f.length&&(b?ut(f[R],f[y]):ut(f[y],f[R]))&&(R+=w),R>=0&&R<f.length?u=f[R]:(f=c[l+w]?We(c[l+w]):[],f.length&&(u=f[b?f.length-1:0]))}const S=r?{node:o.anchorNode,offset:o.anchorOffset,source:a.backward?a.end:a.start}:u,D=(I=u.node.nodeType===1?u.node:u.node.parentElement)==null?void 0:I.closest("[data-editor-input]");D==null||D.focus({preventScroll:!0}),o.setBaseAndExtent(S.node,S.offset,u.node,u.offset);const d=Oe(u);return d&&(d.top<0||d.bottom>(((k=e.ownerDocument.defaultView)==null?void 0:k.innerHeight)??1/0))&&((p=(M=u.node.parentElement)==null?void 0:M.scrollIntoView)==null||p.call(M,{block:"nearest"})),{selection:{start:Math.min(S.source,u.source),end:Math.max(S.source,u.source),...u.source<S.source?{backward:!0}:{}},x:j}}function Er(e,t,r,g,o=!1){const a=C.useRef(!1),c=C.useRef(null),[b,i]=C.useState(!1),s=C.useRef(null),l=C.useRef(null),f=C.useRef(null),x=()=>{a.current=!1,i(!1)};C.useEffect(()=>{const p=e.current.current.selection;!e.source&&!e.locked&&p.start===0&&p.end===e.value.length&&e.value.length>0&&(a.current=!0,i(!0)),(e.source||e.locked||e.current.current.selection.start===e.current.current.selection.end)&&x(),c.current=null,s.current=null,l.current=null,f.current=null},[e.value,e.source,e.locked]);const y=p=>{var R;const w=p instanceof Element?p.closest("[data-editor-input]"):null;return w&&((R=t.current)!=null&&R.contains(w))?w:null},u=p=>{if(a.current)return{start:0,end:e.current.current.value.length,...e.current.current.selection.backward?{backward:!0}:{}};if((p==null?void 0:p.tagName)==="TEXTAREA"){const w=p,R=Number(w.dataset.editorOffset||0);return{start:R+w.selectionStart,end:R+w.selectionEnd}}return t.current?Le(t.current,!0):null},j=p=>a.current||e.document.blocks.filter(w=>p.start<w.end&&p.end>w.start).length>1,S=(p,w,R)=>{if(e.source||p.tagName==="TEXTAREA")return null;if(w==="insertParagraph"||w==="insertLineBreak")return Ct(e.current.current.value,e.document.blocks,R,w==="insertLineBreak");const B=p.querySelector("[data-source-start]");if(w==="deleteContentBackward"&&R.start===R.end){const W=Array.from(p.querySelectorAll("li")).find(A=>{var V;return Number((V=A.querySelector("[data-source-start]"))==null?void 0:V.dataset.sourceStart)===R.start});if(R.start===Number(B==null?void 0:B.dataset.sourceStart)||W)return St(e.current.current.value,e.document.blocks,p.dataset.blockId||"",W&&R.start!==Number(B==null?void 0:B.dataset.sourceStart)?R.start:void 0)??{value:e.current.current.value,selection:R}}return null},D=()=>{var B,W,A;const p=(B=t.current)==null?void 0:B.ownerDocument.activeElement;if((p==null?void 0:p.tagName)==="INPUT"||(p==null?void 0:p.tagName)==="TEXTAREA"){const V=y(p);if(V){const O=u(V);O&&e.capture(O)}return null}const w=(W=t.current)==null?void 0:W.ownerDocument.getSelection();if(!(w!=null&&w.anchorNode)||!w.focusNode||!((A=t.current)!=null&&A.contains(w.anchorNode))||!t.current.contains(w.focusNode))return a.current&&x(),null;const R=u();return R&&e.capture(R),R},d=(p,w=!1)=>{const R=y(p.target);if(!R||R.tagName==="TEXTAREA")return;const B=u(R);!B||B.start===B.end||(p.clipboardData.setData("text/plain",e.current.current.value.slice(B.start,B.end)),p.preventDefault(),w&&!e.locked&&(e.capture(B),e.replace("",st(e.document.blocks,B)),x()))},m=p=>{if(p.defaultPrevented||p.nativeEvent.isComposing)return;const w=y(p.target);if(!w)return;const R=u(w);R&&e.capture(R);const B=p.key.toLowerCase();B==="tab"&&x();const W=(p.ctrlKey||p.metaKey)&&!p.altKey;if(W&&B==="a"&&!p.shiftKey&&w.tagName!=="TEXTAREA"){p.preventDefault();const A=w.ownerDocument.createRange();A.selectNodeContents(r.current);const V=w.ownerDocument.getSelection();V==null||V.removeAllRanges(),V==null||V.addRange(A),a.current=!0,i(!0),e.capture({start:0,end:e.current.current.value.length});return}if(a.current&&["arrowleft","arrowright","arrowup","arrowdown","home","end","escape"].includes(B)){if(p.shiftKey&&t.current&&wt(t.current,{start:0,end:e.current.current.value.length,...e.current.current.selection.backward?{backward:!0}:{}}),x(),!p.shiftKey){p.preventDefault();const A=e.document.blocks[0],V=e.document.blocks[e.document.blocks.length-1],O=["arrowleft","arrowup","home"].includes(B)?A.bodyStart:V.kind==="codeBlock"?V.bodyStart+V.body.length:V.end;e.restoreSelection({start:O,end:O})}if(!p.shiftKey)return}if(!e.source&&!e.locked&&!W&&!p.altKey&&w.tagName!=="TEXTAREA"&&["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(p.key)&&t.current){const A=Tr(t.current,p.key,p.shiftKey,c.current);if(A){p.preventDefault(),c.current=A.x,e.capture(A.selection);return}}else c.current=null;if(!e.locked){if(W){B==="z"||B==="y"?(p.preventDefault(),x(),e.undo(B==="y"||p.shiftKey)):B==="s"&&g?(p.preventDefault(),g()):B==="a"&&p.shiftKey&&o?(p.preventDefault(),e.openAi("selection")):["b","i","u"].includes(B)?(p.preventDefault(),e.format({b:"bold",i:"italic",u:"underline"}[B])):B==="k"&&(p.preventDefault(),e.openLink());return}if(!p.altKey&&R&&["enter","backspace"].includes(B)){const A=S(w,B==="enter"?p.shiftKey?"insertLineBreak":"insertParagraph":"deleteContentBackward",R);if(A){p.preventDefault(),e.commit(A.value,A.selection),x();return}}if(w.tagName!=="TEXTAREA"&&R&&R.start!==R.end&&["backspace","delete"].includes(B)){p.preventDefault(),e.replace("",st(e.document.blocks,R)),x();return}if(R&&j(R)){const A=B==="backspace"||B==="delete"?"":B==="enter"?`
78
54
 
79
- `:w.data;E!=null&&(w.cancelable?(w.preventDefault(),e.replace(E,R),h()):g.current={target:R,text:E})},S=p.useRef(v);return S.current=v,p.useEffect(()=>{const w=o.current,T=R=>S.current(R);return w==null||w.addEventListener("beforeinput",T,!0),()=>w==null?void 0:w.removeEventListener("beforeinput",T,!0)},[o]),{capture:j,selectedDocument:u,onKeyDown:C,onInputCapture:w=>{var F,W;const T=f(w.target),R=w.nativeEvent;if(!T||e.locked||R.isComposing||d.current)return;const E=m.current??b(T,R.inputType,e.current.current.selection);if(E){w.stopPropagation(),m.current=null,E.value===e.current.current.value?e.restoreSelection(E.selection):e.commit(E.value,E.selection),h();return}if(R.inputType==="historyUndo"||R.inputType==="historyRedo")w.stopPropagation(),e.undo(R.inputType==="historyRedo");else if(g.current||T.tagName!=="TEXTAREA"&&k(e.current.current.selection)&&(R.data!=null||(F=R.inputType)!=null&&F.startsWith("delete"))){w.stopPropagation();const{target:M,text:z}=g.current??{target:e.current.current.selection,text:(W=R.inputType)!=null&&W.startsWith("delete")?"":R.data};g.current=null,e.replace(z,M),h()}},onCopy:w=>x(w),onCut:w=>x(w,!0),onPaste:w=>{const T=f(w.target);if(!T||T.tagName==="TEXTAREA"||e.locked)return;const R=y(T);if(!R)return;w.preventDefault();const E=w.clipboardData.getData("text/plain");!E&&!Array.from(w.clipboardData.types||[]).includes("text/plain")||(e.capture(R),e.replace(E,R),h())},onPointerDownCapture:w=>{l.current=null,f(w.target)&&h()},onCompositionStartCapture:w=>{const T=f(w.target),R=T&&y(T);R&&k(R)&&!e.locked&&(d.current=R)},onCompositionEndCapture:w=>{const T=d.current;T&&(w.stopPropagation(),d.current=null,w.data?e.replace(w.data,T):e.restoreSelection(T),h())}}}function vy({rect:e,state:o,props:r,preserve:n}){var c,d,g,m;const a=p.useRef(null),{themeMode:i}=s.useTheme(),[l,u]=p.useState({top:8,left:8});return p.useLayoutEffect(()=>{const h=()=>{var k;const y=(k=a.current)==null?void 0:k.getBoundingClientRect();y&&u({left:Math.max(8,Math.min(e.left,window.innerWidth-y.width-8)),top:Math.max(8,Math.min(e.top-y.height-8>=8?e.top-y.height-8:e.bottom+8,window.innerHeight-y.height-8))})};h();const f=typeof ResizeObserver>"u"?null:new ResizeObserver(h);return a.current&&(f==null||f.observe(a.current)),()=>f==null?void 0:f.disconnect()},[e,o.linkOpen,!!o.media,(c=o.media)==null?void 0:c.phase,(d=o.ai)==null?void 0:d.state,(g=o.ai)==null?void 0:g.result,(m=o.ai)==null?void 0:m.prompt,o.stale,o.message]),p.useEffect(()=>{if(!o.linkOpen&&!o.media&&!o.ai)return;const h=f=>{var y;f.target instanceof Node&&!((y=a.current)!=null&&y.contains(f.target))&&(o.media?o.closeMedia(!1):o.ai?o.closeAi(!1):o.closeLink(!1))};return document.addEventListener("pointerdown",h,!0),()=>document.removeEventListener("pointerdown",h,!0)},[o.linkOpen,!!o.media,!!o.ai]),t.jsx(s.View,{ref:a,"data-editor-selection-toolbar":"true","data-editor-link-popover":o.linkOpen?"true":void 0,"data-editor-ai-popover":o.ai?"true":void 0,role:o.linkOpen||o.media||o.ai?"dialog":void 0,"aria-label":o.media?o.labels.media:o.ai?o.labels.aiPanel:o.linkOpen?o.labels.link:void 0,onKeyDown:h=>{h.key==="Escape"&&(h.preventDefault(),h.stopPropagation(),o.media?o.closeMedia():o.ai?o.closeAi():o.linkOpen&&o.closeLink())},position:"fixed",top:l.top,left:l.left,maxWidth:"calc(100vw - 16px)",maxHeight:"calc(100vh - 16px)",overflow:"auto",backgroundColor:i==="dark"?"color-gray-900":"color-white",borderWidth:1,borderStyle:"solid",borderColor:i==="dark"?"color-gray-600":"color-gray-300",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.18)",borderRadius:10,padding:6,zIndex:1e3,children:o.linkOpen||o.media||o.ai?t.jsx(Cy,{state:o,views:r.views,uploadEnabled:!!r.uploadMedia,floating:!0}):t.jsx(fn,{state:o,props:r,formatting:!0,preserve:n})})}function Ty({block:e,state:o,label:r,views:n}){const a=p.useRef(null),i=p.useRef(!1),l=p.useMemo(()=>t.jsx(ws,{block:e}),[e.id,e.start,o.restoreVersion]),u=()=>{if(!a.current||i.current||o.locked)return;const c=Sy(a.current);if(e.kind==="codeBlock"){const g=e.bodyStart-e.start;o.editBlock(e,mo(e.raw,{start:g,end:g+e.body.length},c.text),{start:g+c.selection.start,end:g+c.selection.end},!0,!1);return}const d=yr(c.text);o.editBlock(e,c.text,c.selection,!0,d.blocks.length!==1||d.blocks[0].kind!==e.kind)};return t.jsx(s.View,{ref:a,"data-block-id":e.id,"data-block-start":e.kind==="codeBlock"?e.bodyStart:e.start,"data-code-block":e.kind==="codeBlock"?e.id:void 0,"data-editor-input":"true",contentEditable:!o.locked,suppressContentEditableWarning:!0,role:"textbox","aria-label":r,"aria-multiline":"true","aria-readonly":o.locked,minHeight:24,flex:1,outline:"none",...n==null?void 0:n.content,onFocus:()=>o.setActiveId(e.id),onBeforeInput:c=>{if(c.defaultPrevented)return;const d=a.current&&Et(a.current,!0);d&&o.capture(d)},onInput:c=>{u()},onCompositionStart:()=>{i.current=!0},onCompositionEnd:()=>{i.current=!1,u()},onKeyDown:c=>{if(c.nativeEvent.isComposing||o.locked)return;const d=a.current&&Et(a.current,!0);d&&o.capture(d),c.key==="/"&&!c.metaKey&&!c.ctrlKey&&!e.body.trim()&&(c.preventDefault(),o.setCommandId(e.id))},children:l},o.restoreVersion)}function Iy({state:e,...o}){const{value:r,defaultValue:n,onChange:a,generate:i,uploadMedia:l,pickMedia:u,onSave:c,label:d=e.labels.document,isDisabled:g,isReadOnly:m,labels:h,views:f={},status:y,...k}=o,b=p.useRef(null),{themeMode:j}=s.useTheme(),[x,C]=p.useState(null),[v,S]=p.useState(null),I=p.useRef(null),w=p.useRef(null),T=jy(e,b,I,c,!!o.generate);p.useLayoutEffect(()=>{if(!e.linkOpen&&!e.media&&!e.ai||!b.current){S(null);return}const D=b.current.ownerDocument.getSelection(),A=D!=null&&D.rangeCount&&D.anchorNode&&b.current.contains(D.anchorNode)?D.getRangeAt(0).cloneRange():null,_=w.current??b.current.querySelector(`[data-block-id="${e.activeId}"]`)??I.current??b.current,G=()=>{const N=A==null?void 0:A.getBoundingClientRect(),ee=N!=null&&N.height?N:_.getBoundingClientRect();S({top:ee.top,bottom:ee.bottom,left:ee.left})};return G(),window.addEventListener("scroll",G,!0),window.addEventListener("resize",G),()=>{window.removeEventListener("scroll",G,!0),window.removeEventListener("resize",G)}},[e.linkOpen,!!e.media,!!e.ai]);const R=p.useRef(null),E=p.useRef(null),F=p.useRef(null),W=p.useRef(null),M=p.useRef([]),z=p.useRef(null),[H,V]=p.useState(null),P=D=>{D.preventDefault()},L=()=>{var D;return Array.from(((D=I.current)==null?void 0:D.querySelectorAll("[data-editor-row]"))||[])},B=()=>{var D;F.current!==null&&window.cancelAnimationFrame(F.current),F.current=null,R.current=null,(D=E.current)==null||D.remove(),E.current=null,z.current=null,V(null)},$=(D,A)=>D>A.from&&D<=A.to?-A.extent:D>=A.to&&D<A.from?A.extent:0,q=(D,A)=>{const _=L()[D];return _?_.offsetTop+(D>A.from?_.offsetHeight-A.height:0):A.top},Y=D=>{const A=z.current;if(!A||A.to===D)return;const _={...A,to:D,top:q(D,A)};z.current=_,V(_)},O=D=>{const A=z.current;if(!A||!I.current)return null;const _=D-I.current.getBoundingClientRect().top;if(_>=A.top&&_<=A.top+A.height)return A.to;const G=L();let N=0;return G.forEach((ee,oe)=>{oe!==A.from&&_>=ee.offsetTop+$(oe,A)+ee.offsetHeight/2&&N++}),N};p.useEffect(()=>{B()},[e.value,e.locked,e.source]),p.useEffect(()=>{if(H!=null&&H.id)return window.addEventListener("resize",B),()=>window.removeEventListener("resize",B)},[H==null?void 0:H.id]),p.useEffect(()=>()=>{var D;F.current!==null&&window.cancelAnimationFrame(F.current),(D=E.current)==null||D.remove(),M.current.forEach(A=>A.cancel())},[]),p.useLayoutEffect(()=>{var A;const D=W.current;D&&(W.current=null,M.current.forEach(_=>_.cancel()),M.current=[],!((A=window.matchMedia)!=null&&A.call(window,"(prefers-reduced-motion: reduce)").matches)&&L().forEach(_=>{const G=D.get(_.dataset.editorRow),N=G===void 0?0:G-_.getBoundingClientRect().top;Math.abs(N)<1||!_.animate||M.current.push(_.animate([{transform:`translateY(${N}px)`},{transform:"translateY(0)"}],{duration:180,easing:"cubic-bezier(0.2, 0, 0, 1)"}))}))}),p.useEffect(()=>{const D=()=>{var ie;const A=b.current;if(!A||e.holdSelection.current||e.linkOpen)return;if(R.current){C(null);return}const _=A.ownerDocument.activeElement,G=T.capture()??Et(A),N=A.ownerDocument.getSelection(),ee=_==null?void 0:_.matches("input[data-editor-input],textarea[data-editor-input]");if(G&&G.start!==G.end&&(N!=null&&N.rangeCount)&&!ee&&!e.locked){const K=N.getRangeAt(0).getBoundingClientRect();if(K.bottom>0&&K.top<window.innerHeight){C({top:K.top,bottom:K.bottom,left:K.left});return}}C(null);const oe=A.ownerDocument.getSelection();if(oe&&!oe.isCollapsed&&oe.anchorNode&&!A.contains(oe.anchorNode)&&!((ie=oe.anchorNode.parentElement)!=null&&ie.closest("[data-editor-block-list]"))){const K=e.current.current.selection.end;e.capture({start:K,end:K})}};return document.addEventListener("selectionchange",D),window.addEventListener("scroll",D,!0),window.addEventListener("resize",D),()=>{document.removeEventListener("selectionchange",D),window.removeEventListener("scroll",D,!0),window.removeEventListener("resize",D)}},[e.locked,e.source,e.linkOpen]),p.useLayoutEffect(()=>{!e.restoreVersion||!b.current||!e.restoreRequested.current||(e.restoreRequested.current=!1,e.source&&w.current?(w.current.focus({preventScroll:!0}),w.current.setSelectionRange(e.selection.start,e.selection.end,e.selection.backward?"backward":"forward")):js(b.current,e.selection))},[e.restoreVersion,e.source]);const J=()=>{w.current&&e.capture({start:w.current.selectionStart,end:w.current.selectionEnd,...w.current.selectionDirection==="backward"?{backward:!0}:{}})};return t.jsxs(s.Vertical,{ref:b,gap:12,minWidth:0,"aria-label":d,"aria-disabled":g,...k,...f.container,onCopy:T.onCopy,onCut:T.onCut,onPaste:T.onPaste,onPointerDownCapture:T.onPointerDownCapture,onInputCapture:T.onInputCapture,onCompositionStartCapture:T.onCompositionStartCapture,onCompositionEndCapture:T.onCompositionEndCapture,onDragOver:D=>{if(!R.current||e.locked)return;D.preventDefault(),D.dataTransfer.dropEffect="move";const A=O(D.clientY);A!==null&&Y(A)},onDragLeave:D=>{const A=D.currentTarget.getBoundingClientRect();(D.clientX<A.left||D.clientX>A.right||D.clientY<A.top||D.clientY>A.bottom)&&z.current&&Y(z.current.from)},onDrop:D=>{var _;if(!R.current||e.locked)return;D.preventDefault();const A=O(D.clientY);if(A!==null&&((_=e.document.blocks[A])==null?void 0:_.id)!==R.current){W.current=new Map(L().map(N=>[N.dataset.editorRow,N.getBoundingClientRect().top]));const G=z.current;G&&I.current&&W.current.set(G.id,I.current.getBoundingClientRect().top+q(A,G)),e.move(R.current,A)}B()},onKeyDown:D=>{D.nativeEvent.isComposing||(D.key==="Escape"&&(B(),e.setCommandId(null),e.linkOpen&&e.closeLink(),e.ai&&e.closeAi(),e.media&&e.closeMedia(),C(null)),T.onKeyDown(D))},children:[!m&&t.jsxs(s.Vertical,{position:"sticky",top:0,zIndex:10,backgroundColor:j==="dark"?"color-gray-900":"color-white",borderWidth:1,borderColor:"color-gray-200",borderStyle:"solid",borderRadius:8,padding:8,gap:4,children:[t.jsx(fn,{state:e,props:o,preserve:P}),e.source&&t.jsx(fn,{state:e,props:o,formatting:!0,preserve:P})]}),e.document.sourceMode&&t.jsx(s.Text,{role:"status",...f.notice,children:e.labels.sourceFallback}),e.message&&!e.linkOpen&&t.jsx(s.Text,{role:"status",...f.notice,children:e.message}),e.source?t.jsx($t,{value:e.value,"data-editor-input":"true","data-editor-offset":0,label:d,isDisabled:g,isReadOnly:m,inputRef:D=>{w.current=D},onSelect:J,onFocus:J,onChange:D=>e.commit(D,w.current?{start:w.current.selectionStart,end:w.current.selectionEnd}:e.selection,!0,!1),views:{textarea:{minHeight:240,fontFamily:"monospace",...f.source}}}):t.jsxs(s.Vertical,{ref:I,position:"relative",gap:12,"data-editor-block-list":"true",children:[H&&t.jsx(s.View,{"data-editor-drop-placeholder":H.to,"aria-hidden":"true",position:"absolute",left:0,right:0,top:0,height:H.height,borderWidth:1,borderStyle:"dashed",boxSizing:"border-box",borderColor:"theme-primary",borderRadius:8,backgroundColor:"theme-primary",opacity:.14,pointerEvents:"none",style:{transform:`translateY(${H.top}px)`,transition:H.reducedMotion?"none":"transform 180ms cubic-bezier(0.2, 0, 0, 1)"}}),e.document.blocks.map((D,A)=>{var _,G;return t.jsxs(s.Horizontal,{gap:8,alignItems:"flex-start",position:"relative",borderRadius:6,backgroundColor:T.selectedDocument?"theme-primary-100":e.activeId===D.id?"color-gray-50":void 0,_hover:{backgroundColor:"color-gray-50"},"data-editor-row":D.id,...f.block,opacity:(H==null?void 0:H.id)===D.id?0:((_=f.block)==null?void 0:_.opacity)??1,style:{...(G=f.block)==null?void 0:G.style,...H?{transform:`translateY(${$(A,H)}px)`,transition:H.reducedMotion?"none":"transform 180ms cubic-bezier(0.2, 0, 0, 1)"}:{}},children:[!m&&t.jsx(pt,{views:{menu:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-300",backgroundColor:j==="dark"?"color-gray-900":"color-white",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.18)"},item:{as:"button",type:"button",width:"100%",textAlign:"left",borderWidth:0,_focusVisible:{outline:"2px solid",outlineColor:"theme-primary"}}},trigger:t.jsx(me,{type:"button",size:"sm",variant:"ghost",isIcon:!0,minWidth:36,width:36,minHeight:36,padding:4,title:`${e.labels.drag} · ${e.labels.blocks}`,style:{userSelect:"none"},draggable:!e.locked,isDisabled:e.locked,cursor:H?"grabbing":"grab","aria-label":e.labels.drag,onDragStart:N=>{var oe;if(e.locked){N.preventDefault();return}R.current=D.id,M.current.forEach(ie=>ie.cancel()),M.current=[];const ee=N.currentTarget.closest("[data-editor-row]");if(ee){const ie=ee.getBoundingClientRect(),K=L(),ae=K[A+1],de=K[A-1],fe=ae?ae.offsetTop-ee.offsetTop-ee.offsetHeight:de?ee.offsetTop-de.offsetTop-de.offsetHeight:0,Ie={id:D.id,from:A,to:A,height:ee.offsetHeight,extent:ee.offsetHeight+Math.max(0,fe),top:ee.offsetTop,reducedMotion:!!((oe=window.matchMedia)!=null&&oe.call(window,"(prefers-reduced-motion: reduce)").matches)};z.current=Ie,F.current=window.requestAnimationFrame(()=>{F.current=null,z.current&&V(z.current)});const ce=ee.cloneNode(!0);let le="Canvas";for(let se=ee;se;se=se.parentElement){const re=window.getComputedStyle(se).backgroundColor;if(re!=="transparent"&&re!=="rgba(0, 0, 0, 0)"){le=re;break}}Object.assign(ce.style,{position:"fixed",left:"-10000px",top:"0",width:`${ie.width}px`,padding:"8px",boxSizing:"border-box",borderRadius:"8px",backgroundColor:le,boxShadow:"0 8px 24px rgba(0,0,0,0.18)",opacity:"1"}),ce.dataset.editorDragPreview="true",ce.setAttribute("aria-hidden","true"),ce.inert=!0,ce.querySelectorAll("[contenteditable]").forEach(se=>{se.style.outline="none"}),ee.ownerDocument.body.appendChild(ce),E.current=ce,N.dataTransfer.setDragImage(ce,N.clientX-ie.left+8,N.clientY-ie.top+8)}N.dataTransfer.setData("application/x-app-studio-block",D.id),N.dataTransfer.effectAllowed="move"},onDragEnd:B,children:t.jsx(Ti,{widthHeight:18,strokeWidth:2})}),items:[{id:"transform",label:e.labels.blocks,disabled:e.locked,onClick:()=>e.setCommandId(D.id)},...["below","duplicate","up","down","delete"].map(N=>({id:N,label:e.labels[N],disabled:e.locked||N==="up"&&A===0||N==="down"&&A===e.document.blocks.length-1,onClick:()=>e.action(D.id,N)}))]},`${e.restoreVersion}-${e.commandId??""}`),t.jsx(Ty,{block:D,state:e,label:D.kind==="codeBlock"?e.labels.codeBlock:d,views:f})]},D.id)})]}),(e.linkOpen||e.media||e.ai?v:!e.source&&x)&&!e.locked&&t.jsx(At,{children:t.jsx(vy,{rect:e.linkOpen||e.media||e.ai?v:x,state:e,props:o,preserve:P})}),t.jsx(Ao,{open:!!e.commandId&&!e.locked,onOpenChange:D=>{D||e.closeCommand()},placeholder:e.labels.blocks,commands:Lf.map(D=>({id:D,name:e.labels[D],onSelect:()=>{e.commandId&&e.transform(e.commandId,D)}}))}),y]})}const Ry=e=>{const o=Uf(e);return t.jsx(Iy,{...e,state:o})};function Fy(){const[e,o]=p.useState(()=>{var r;return typeof window<"u"&&!!((r=window.matchMedia)!=null&&r.call(window,"(prefers-reduced-motion: reduce)").matches)});return p.useEffect(()=>{var a,i;const r=(a=window.matchMedia)==null?void 0:a.call(window,"(prefers-reduced-motion: reduce)");if(!r)return;const n=()=>o(r.matches);return n(),(i=r.addEventListener)==null||i.call(r,"change",n),()=>{var l;return(l=r.removeEventListener)==null?void 0:l.call(r,"change",n)}},[]),e}const Qt=typeof Intl.Segmenter=="function"?new Intl.Segmenter(void 0,{granularity:"grapheme"}):void 0;function vs(e,{typing:o=!1,isStreaming:r=!1,onTypingComplete:n}={}){const a=Fy(),i=!!o&&!a&&!!Qt,l=typeof o=="object"?o:void 0,u=Math.max(1,Math.floor(Number.isFinite(l==null?void 0:l.charsPerTick)?l.charsPerTick:3)),c=Math.max(1,Number.isFinite(l==null?void 0:l.intervalMs)?l.intervalMs:16),[d,g]=p.useState(()=>({value:e,length:i?0:e.length})),m=p.useRef(e),h=p.useRef(null),f=p.useRef(n);f.current=n;const y=p.useMemo(()=>[0,...Array.from((Qt==null?void 0:Qt.segment(e))??[],w=>w.index+w.segment.length)],[e]),k=Math.max(0,y.length-(r?2:1)),b=y[k],j=e.startsWith(d.value)?Math.min(d.length,b):0;let x=0;for(;x+1<y.length&&y[x+1]<=j;)x++;const C=i?y[x]:e.length,v=e.slice(0,C),S=p.useRef({value:e,ends:y,index:x,targetIndex:k});S.current={value:e,ends:y,index:x,targetIndex:k};const I=i&&C<b;return p.useEffect(()=>{e.startsWith(m.current)||(h.current=null),m.current=e},[e]),p.useEffect(()=>{r&&(h.current=null)},[r]),p.useEffect(()=>{i||g(w=>w.value===e&&w.length===e.length?w:{value:e,length:e.length})},[i,e]),p.useEffect(()=>{if(!I)return;const w=setInterval(()=>{const T=S.current;g({value:T.value,length:T.ends[Math.min(T.index+u,T.targetIndex)]})},c);return()=>clearInterval(w)},[I,u,c]),p.useEffect(()=>{var w;o&&e&&!r&&C===e.length&&h.current!==e&&(h.current=e,(w=f.current)==null||w.call(f))},[e,o,r,C]),{displayedText:v,isTyping:i&&(C<e.length||r)}}function My({value:e,label:o,onLinkPress:r,renderLink:n,allowImages:a=!0,allowVideos:i=!0,renderVideo:l,typing:u,isStreaming:c,onTypingComplete:d,labels:g,views:m={},native:h=!1,codeFontFamily:f="monospace",...y}){const{displayedText:k,isTyping:b}=vs(e,{typing:u,isStreaming:c,onTypingComplete:d}),j=p.useRef([]),x=p.useMemo(()=>{const C=yr(k,j.current,void 0,{display:!0});return j.current=C.blocks,C},[k]);return t.jsxs(s.Vertical,{gap:12,minWidth:0,...h?{accessibilityLabel:o}:{role:o?"region":void 0,"aria-label":o},...y,...m.container,children:[x.sourceMode?t.jsxs(t.Fragment,{children:[t.jsx(s.Text,{...m.notice,children:(g==null?void 0:g.sourceFallback)??"This Markdown contains unsupported syntax. Its source is shown as plain text."}),t.jsx(s.Text,{fontFamily:f,...h?{selectable:!0}:{style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"}},...m.source,children:k})]}):x.blocks.filter(C=>C.raw).map(C=>t.jsx(s.View,{minWidth:0,...m.block,children:t.jsx(ws,{block:C,native:h,codeFontFamily:f,isDisplay:!0,onLinkPress:r,renderLink:n,allowImages:a,allowVideos:i,renderVideo:l})},C.id)),b&&t.jsx(s.View,{as:"span",width:2,height:16,backgroundColor:"color-gray-700",...h?{accessibilityElementsHidden:!0}:{"aria-hidden":!0},animate:s.Animation.flash({duration:"0.8s",iterationCount:"infinite"})})]})}const zy=e=>t.jsx(My,{...e}),La=["zoom-out","zoom-in","zap","zap-off","youtube","x","wrench","worm","workflow","wine","wine-off","wind","wind-arrow-down","wifi","wifi-zero","wifi-sync","wifi-pen","wifi-off","wifi-low","wifi-high","wifi-cog","whole-word","wheat","wheat-off","weight","weight-tilde","webhook","webhook-off","webcam","waypoints","waves","waves-ladder","waves-arrow-up","waves-arrow-down","watch","washing-machine","warehouse","wand","wand-sparkles","wallpaper","wallet","wallet-minimal","wallet-cards","vote","volume","volume-x","volume-off","volume-2","volume-1","volleyball","voicemail","view","videotape","video","video-off","vibrate","vibrate-off","venus","venus-and-mars","venetian-mask","vegan","vector-square","vault","variable","van","utility-pole","utensils","utensils-crossed","users","users-round","user","user-x","user-star","user-search","user-round","user-round-x","user-round-search","user-round-plus","user-round-pen","user-round-minus","user-round-cog","user-round-check","user-plus","user-pen","user-minus","user-lock","user-cog","user-check","usb","upload","unplug","unlink","unlink-2","university","ungroup","unfold-vertical","unfold-horizontal","undo","undo-dot","undo-2","underline","umbrella","umbrella-off","type","type-outline","twitter","twitch","tv","tv-minimal","tv-minimal-play","turtle","turntable","turkish-lira","truck","truck-electric","trophy","triangle","triangle-right","triangle-dashed","triangle-alert","trending-up","trending-up-down","trending-down","trello","trees","tree-pine","tree-palm","tree-deciduous","trash","trash-2","transgender","tram-front","train-track","train-front","train-front-tunnel","traffic-cone","tractor","toy-brick","tower-control","touchpad","touchpad-off","torus","tornado","toolbox","tool-case","toilet","toggle-right","toggle-left","timer","timer-reset","timer-off","tickets","tickets-plane","ticket","ticket-x","ticket-slash","ticket-plus","ticket-percent","ticket-minus","ticket-check","thumbs-up","thumbs-down","thermometer","thermometer-sun","thermometer-snowflake","theater","text-wrap","text-select","text-search","text-quote","text-initial","text-cursor","text-cursor-input","text-align-start","text-align-justify","text-align-end","text-align-center","test-tubes","test-tube","test-tube-diagonal","terminal","tent","tent-tree","telescope","target","tangent","tally-5","tally-4","tally-3","tally-2","tally-1","tags","tag","tablets","tablet","tablet-smartphone","table","table-rows-split","table-properties","table-of-contents","table-columns-split","table-cells-split","table-cells-merge","table-2","syringe","swords","sword","switch-camera","swiss-franc","swatch-book","superscript","sunset","sunrise","sun","sun-snow","sun-moon","sun-medium","sun-dim","subscript","strikethrough","stretch-vertical","stretch-horizontal","store","stone","sticky-note","sticker","stethoscope","step-forward","step-back","star","star-off","star-half","stamp","squirrel","squircle","squircle-dashed","squares-unite","squares-subtract","squares-intersect","squares-exclude","square","square-x","square-user","square-user-round","square-terminal","square-stop","square-star","square-stack","square-square","square-split-vertical","square-split-horizontal","square-slash","square-sigma","square-scissors","square-round-corner","square-radical","square-power","square-plus","square-play","square-pilcrow","square-pi","square-percent","square-pen","square-pause","square-parking","square-parking-off","square-mouse-pointer","square-minus","square-menu","square-m","square-library","square-kanban","square-function","square-equal","square-dot","square-divide","square-dashed","square-dashed-top-solid","square-dashed-mouse-pointer","square-dashed-kanban","square-dashed-bottom","square-dashed-bottom-code","square-code","square-chevron-up","square-chevron-right","square-chevron-left","square-chevron-down","square-check","square-check-big","square-chart-gantt","square-bottom-dashed-scissors","square-asterisk","square-arrow-up","square-arrow-up-right","square-arrow-up-left","square-arrow-right","square-arrow-out-up-right","square-arrow-out-up-left","square-arrow-out-down-right","square-arrow-out-down-left","square-arrow-left","square-arrow-down","square-arrow-down-right","square-arrow-down-left","square-activity","sprout","spray-can","spotlight","spool","split","spline","spline-pointer","spell-check","spell-check-2","speech","speaker","sparkles","sparkle","spade","space","soup","solar-panel","sofa","soap-dispenser-droplet","snowflake","snail","smile","smile-plus","smartphone","smartphone-nfc","smartphone-charging","sliders-vertical","sliders-horizontal","slice","slash","slack","skull","skip-forward","skip-back","siren","signpost","signpost-big","signature","signal","signal-zero","signal-medium","signal-low","signal-high","sigma","shuffle","shrub","shrink","shrimp","shredder","shower-head","shovel","shopping-cart","shopping-basket","shopping-bag","shirt","ship","ship-wheel","shield","shield-x","shield-user","shield-question-mark","shield-plus","shield-off","shield-minus","shield-half","shield-ellipsis","shield-check","shield-ban","shield-alert","shell","sheet","share","share-2","shapes","settings","settings-2","server","server-off","server-crash","server-cog","separator-vertical","separator-horizontal","send","send-to-back","send-horizontal","section","search","search-x","search-slash","search-code","search-check","search-alert","scroll","scroll-text","screen-share","screen-share-off","scooter","scissors","scissors-line-dashed","school","scan","scan-text","scan-search","scan-qr-code","scan-line","scan-heart","scan-face","scan-eye","scan-barcode","scaling","scale","scale-3d","save","save-off","save-all","saudi-riyal","satellite","satellite-dish","sandwich","salad","sailboat","russian-ruble","ruler","ruler-dimension-line","rss","rows-4","rows-3","rows-2","router","route","route-off","rotate-cw","rotate-cw-square","rotate-ccw","rotate-ccw-square","rotate-ccw-key","rotate-3d","rose","roller-coaster","rocking-chair","rocket","ribbon","rewind","reply","reply-all","replace","replace-all","repeat","repeat-2","repeat-1","remove-formatting","regex","refrigerator","refresh-cw","refresh-cw-off","refresh-ccw","refresh-ccw-dot","redo","redo-dot","redo-2","recycle","rectangle-vertical","rectangle-horizontal","rectangle-goggles","rectangle-ellipsis","rectangle-circle","receipt","receipt-turkish-lira","receipt-text","receipt-swiss-franc","receipt-russian-ruble","receipt-pound-sterling","receipt-japanese-yen","receipt-indian-rupee","receipt-euro","receipt-cent","ratio","rat","rainbow","rail-symbol","radius","radio","radio-tower","radio-receiver","radical","radiation","radar","rabbit","quote","qr-code","pyramid","puzzle","proportions","projector","printer","printer-check","presentation","power","power-off","pound-sterling","popsicle","popcorn","pointer","pointer-off","podcast","pocket","pocket-knife","plus","plug","plug-zap","plug-2","play","plane","plane-takeoff","plane-landing","pizza","pipette","pin","pin-off","pill","pill-bottle","pilcrow","pilcrow-right","pilcrow-left","piggy-bank","picture-in-picture","picture-in-picture-2","pickaxe","piano","pi","phone","phone-outgoing","phone-off","phone-missed","phone-incoming","phone-forwarded","phone-call","philippine-peso","person-standing","percent","pentagon","pencil","pencil-ruler","pencil-off","pencil-line","pen","pen-tool","pen-off","pen-line","pc-case","paw-print","pause","party-popper","parking-meter","parentheses","paperclip","panels-top-left","panels-right-bottom","panels-left-bottom","panel-top","panel-top-open","panel-top-dashed","panel-top-close","panel-top-bottom-dashed","panel-right","panel-right-open","panel-right-dashed","panel-right-close","panel-left","panel-left-right-dashed","panel-left-open","panel-left-dashed","panel-left-close","panel-bottom","panel-bottom-open","panel-bottom-dashed","panel-bottom-close","panda","palette","paintbrush","paintbrush-vertical","paint-roller","paint-bucket","package","package-x","package-search","package-plus","package-open","package-minus","package-check","package-2","origami","orbit","option","omega","octagon","octagon-x","octagon-pause","octagon-minus","octagon-alert","nut","nut-off","notepad-text","notepad-text-dashed","notebook","notebook-text","notebook-tabs","notebook-pen","non-binary","nfc","newspaper","network","navigation","navigation-off","navigation-2","navigation-2-off","music","music-4","music-3","music-2","move","move-vertical","move-up","move-up-right","move-up-left","move-right","move-left","move-horizontal","move-down","move-down-right","move-down-left","move-diagonal","move-diagonal-2","move-3d","mouse","mouse-pointer","mouse-pointer-click","mouse-pointer-ban","mouse-pointer-2","mouse-pointer-2-off","mouse-off","mountain","mountain-snow","motorbike","moon","moon-star","monitor","monitor-x","monitor-up","monitor-stop","monitor-speaker","monitor-smartphone","monitor-play","monitor-pause","monitor-off","monitor-down","monitor-dot","monitor-cog","monitor-cloud","monitor-check","minus","minimize","minimize-2","milk","milk-off","milestone","microwave","microscope","microchip","mic","mic-vocal","mic-off","messages-square","message-square","message-square-x","message-square-warning","message-square-text","message-square-share","message-square-reply","message-square-quote","message-square-plus","message-square-off","message-square-more","message-square-lock","message-square-heart","message-square-dot","message-square-diff","message-square-dashed","message-square-code","message-circle","message-circle-x","message-circle-warning","message-circle-reply","message-circle-question-mark","message-circle-plus","message-circle-off","message-circle-more","message-circle-heart","message-circle-dashed","message-circle-code","merge","menu","memory-stick","meh","megaphone","megaphone-off","medal","maximize","maximize-2","martini","mars","mars-stroke","map","map-plus","map-pinned","map-pin","map-pin-x","map-pin-x-inside","map-pin-plus","map-pin-plus-inside","map-pin-pen","map-pin-off","map-pin-minus","map-pin-minus-inside","map-pin-house","map-pin-check","map-pin-check-inside","map-minus","mails","mailbox","mail","mail-x","mail-warning","mail-search","mail-question-mark","mail-plus","mail-open","mail-minus","mail-check","magnet","luggage","lollipop","logs","log-out","log-in","lock","lock-open","lock-keyhole","lock-keyhole-open","locate","locate-off","locate-fixed","loader","loader-pinwheel","loader-circle","list","list-x","list-video","list-tree","list-todo","list-start","list-restart","list-plus","list-ordered","list-music","list-minus","list-indent-increase","list-indent-decrease","list-filter","list-filter-plus","list-end","list-collapse","list-chevrons-up-down","list-chevrons-down-up","list-checks","list-check","linkedin","link","link-2","link-2-off","line-squiggle","lightbulb","lightbulb-off","ligature","life-buoy","library","library-big","lectern","leafy-green","leaf","layout-template","layout-panel-top","layout-panel-left","layout-list","layout-grid","layout-dashboard","layers","layers-plus","layers-2","laugh","lasso","lasso-select","laptop","laptop-minimal","laptop-minimal-check","languages","landmark","land-plot","lamp","lamp-wall-up","lamp-wall-down","lamp-floor","lamp-desk","lamp-ceiling","keyboard","keyboard-off","keyboard-music","key","key-square","key-round","kayak","kanban","joystick","japanese-yen","iteration-cw","iteration-ccw","italic","instagram","inspection-panel","info","infinity","indian-rupee","inbox","import","images","image","image-upscale","image-up","image-plus","image-play","image-off","image-minus","image-down","id-card","id-card-lanyard","ice-cream-cone","ice-cream-bowl","house","house-wifi","house-plus","house-plug","house-heart","hourglass","hotel","hospital","hop","hop-off","history","highlighter","hexagon","helicopter","heater","heart","heart-pulse","heart-plus","heart-off","heart-minus","heart-handshake","heart-crack","headset","headphones","headphone-off","heading","heading-6","heading-5","heading-4","heading-3","heading-2","heading-1","hdmi-port","hd","haze","hat-glasses","hash","hard-hat","hard-drive","hard-drive-upload","hard-drive-download","handshake","handbag","hand","hand-platter","hand-metal","hand-helping","hand-heart","hand-grab","hand-fist","hand-coins","hammer","hamburger","ham","guitar","group","grip","grip-vertical","grip-horizontal","grid-3x3","grid-3x2","grid-2x2","grid-2x2-x","grid-2x2-plus","grid-2x2-check","grape","graduation-cap","gpu","goal","globe","globe-lock","glasses","glass-water","gitlab","github","git-pull-request","git-pull-request-draft","git-pull-request-create","git-pull-request-create-arrow","git-pull-request-closed","git-pull-request-arrow","git-merge","git-graph","git-fork","git-compare","git-compare-arrows","git-commit-vertical","git-commit-horizontal","git-branch","git-branch-plus","git-branch-minus","gift","ghost","georgian-lari","gem","gavel","gauge","gamepad","gamepad-directional","gamepad-2","gallery-vertical","gallery-vertical-end","gallery-thumbnails","gallery-horizontal","gallery-horizontal-end","funnel","funnel-x","funnel-plus","fullscreen","fuel","frown","framer","frame","forward","form","forklift","footprints","folders","folder","folder-x","folder-up","folder-tree","folder-sync","folder-symlink","folder-search","folder-search-2","folder-root","folder-plus","folder-pen","folder-output","folder-open","folder-open-dot","folder-minus","folder-lock","folder-key","folder-kanban","folder-input","folder-heart","folder-git","folder-git-2","folder-down","folder-dot","folder-cog","folder-code","folder-closed","folder-clock","folder-check","folder-archive","fold-vertical","fold-horizontal","focus","flower","flower-2","flip-vertical","flip-vertical-2","flip-horizontal","flip-horizontal-2","flask-round","flask-conical","flask-conical-off","flashlight","flashlight-off","flame","flame-kindling","flag","flag-triangle-right","flag-triangle-left","flag-off","fishing-hook","fish","fish-symbol","fish-off","fire-extinguisher","fingerprint-pattern","film","files","file","file-x","file-x-corner","file-volume","file-video-camera","file-user","file-up","file-type","file-type-corner","file-text","file-terminal","file-symlink","file-stack","file-spreadsheet","file-sliders","file-signal","file-search","file-search-corner","file-scan","file-question-mark","file-plus","file-plus-corner","file-play","file-pen","file-pen-line","file-output","file-music","file-minus","file-minus-corner","file-lock","file-key","file-input","file-image","file-heart","file-headphone","file-exclamation-point","file-down","file-digit","file-diff","file-cog","file-code","file-code-corner","file-clock","file-check","file-check-corner","file-chart-pie","file-chart-line","file-chart-column","file-chart-column-increasing","file-braces","file-braces-corner","file-box","file-badge","file-axis-3d","file-archive","figma","ferris-wheel","fence","feather","fast-forward","fan","factory","facebook","eye","eye-off","eye-closed","external-link","expand","ev-charger","euro","ethernet-port","eraser","equal","equal-not","equal-approximately","ellipsis","ellipsis-vertical","egg","egg-off","egg-fried","eclipse","earth","earth-lock","ear","ear-off","dumbbell","drumstick","drum","droplets","droplet","droplet-off","drone","drill","dribbble","drama","drafting-compass","download","dot","door-open","door-closed","door-closed-locked","donut","dollar-sign","dog","dock","dna","dna-off","divide","disc","disc-album","disc-3","disc-2","diff","dices","dice-6","dice-5","dice-4","dice-3","dice-2","dice-1","diamond","diamond-plus","diamond-percent","diamond-minus","diameter","dessert","delete","decimals-arrow-right","decimals-arrow-left","database","database-zap","database-backup","dam","cylinder","currency","cup-soda","cuboid","crown","crosshair","cross","crop","croissant","credit-card","creative-commons","cpu","corner-up-right","corner-up-left","corner-right-up","corner-right-down","corner-left-up","corner-left-down","corner-down-right","corner-down-left","copyright","copyleft","copy","copy-x","copy-slash","copy-plus","copy-minus","copy-check","cooking-pot","cookie","contrast","container","contact","contact-round","construction","cone","concierge-bell","computer","component","compass","command","combine","columns-4","columns-3","columns-3-cog","columns-2","coins","cog","coffee","codesandbox","codepen","code","code-xml","club","clover","cloudy","cloud","cloud-upload","cloud-sync","cloud-sun","cloud-sun-rain","cloud-snow","cloud-rain","cloud-rain-wind","cloud-off","cloud-moon","cloud-moon-rain","cloud-lightning","cloud-hail","cloud-fog","cloud-drizzle","cloud-download","cloud-cog","cloud-check","cloud-backup","cloud-alert","closed-caption","clock","clock-plus","clock-fading","clock-check","clock-arrow-up","clock-arrow-down","clock-alert","clock-9","clock-8","clock-7","clock-6","clock-5","clock-4","clock-3","clock-2","clock-12","clock-11","clock-10","clock-1","clipboard","clipboard-x","clipboard-type","clipboard-plus","clipboard-pen","clipboard-pen-line","clipboard-paste","clipboard-minus","clipboard-list","clipboard-copy","clipboard-clock","clipboard-check","clapperboard","citrus","circuit-board","circle","circle-x","circle-user","circle-user-round","circle-stop","circle-star","circle-small","circle-slash","circle-slash-2","circle-question-mark","circle-power","circle-pound-sterling","circle-plus","circle-play","circle-pile","circle-percent","circle-pause","circle-parking","circle-parking-off","circle-off","circle-minus","circle-gauge","circle-fading-plus","circle-fading-arrow-up","circle-equal","circle-ellipsis","circle-dot","circle-dot-dashed","circle-dollar-sign","circle-divide","circle-dashed","circle-chevron-up","circle-chevron-right","circle-chevron-left","circle-chevron-down","circle-check","circle-check-big","circle-arrow-up","circle-arrow-right","circle-arrow-out-up-right","circle-arrow-out-up-left","circle-arrow-out-down-right","circle-arrow-out-down-left","circle-arrow-left","circle-arrow-down","circle-alert","cigarette","cigarette-off","church","chromium","chevrons-up","chevrons-up-down","chevrons-right","chevrons-right-left","chevrons-left","chevrons-left-right","chevrons-left-right-ellipsis","chevrons-down","chevrons-down-up","chevron-up","chevron-right","chevron-left","chevron-last","chevron-first","chevron-down","chess-rook","chess-queen","chess-pawn","chess-knight","chess-king","chess-bishop","cherry","chef-hat","check","check-line","check-check","chart-spline","chart-scatter","chart-pie","chart-no-axes-gantt","chart-no-axes-combined","chart-no-axes-column","chart-no-axes-column-increasing","chart-no-axes-column-decreasing","chart-network","chart-line","chart-gantt","chart-column","chart-column-stacked","chart-column-increasing","chart-column-decreasing","chart-column-big","chart-candlestick","chart-bar","chart-bar-stacked","chart-bar-increasing","chart-bar-decreasing","chart-bar-big","chart-area","cctv","cat","castle","cast","cassette-tape","case-upper","case-sensitive","case-lower","carrot","card-sim","caravan","car","car-taxi-front","car-front","captions","captions-off","cannabis","cannabis-off","candy","candy-off","candy-cane","camera","camera-off","calendars","calendar","calendar-x","calendar-x-2","calendar-sync","calendar-search","calendar-range","calendar-plus","calendar-plus-2","calendar-off","calendar-minus","calendar-minus-2","calendar-heart","calendar-fold","calendar-days","calendar-cog","calendar-clock","calendar-check","calendar-check-2","calendar-arrow-up","calendar-arrow-down","calendar-1","calculator","cake","cake-slice","cable","cable-car","bus","bus-front","building","building-2","bug","bug-play","bug-off","bubbles","brush","brush-cleaning","bring-to-front","briefcase","briefcase-medical","briefcase-conveyor-belt","briefcase-business","brick-wall","brick-wall-shield","brick-wall-fire","brain","brain-cog","brain-circuit","brackets","braces","boxes","box","bow-arrow","bottle-wine","bot","bot-off","bot-message-square","boom-box","bookmark","bookmark-x","bookmark-plus","bookmark-minus","bookmark-check","book","book-x","book-user","book-up","book-up-2","book-type","book-text","book-search","book-plus","book-open","book-open-text","book-open-check","book-minus","book-marked","book-lock","book-key","book-image","book-heart","book-headphones","book-down","book-dashed","book-copy","book-check","book-audio","book-alert","book-a","bone","bomb","bolt","bold","bluetooth","bluetooth-searching","bluetooth-off","bluetooth-connected","blocks","blinds","blend","bitcoin","birdhouse","bird","biohazard","binoculars","binary","bike","biceps-flexed","between-vertical-start","between-vertical-end","between-horizontal-start","between-horizontal-end","bell","bell-ring","bell-plus","bell-off","bell-minus","bell-electric","bell-dot","beer","beer-off","beef","bed","bed-single","bed-double","bean","bean-off","beaker","battery","battery-warning","battery-plus","battery-medium","battery-low","battery-full","battery-charging","bath","baseline","barrel","barcode","banknote","banknote-x","banknote-arrow-up","banknote-arrow-down","bandage","banana","ban","balloon","baggage-claim","badge","badge-x","badge-turkish-lira","badge-swiss-franc","badge-russian-ruble","badge-question-mark","badge-pound-sterling","badge-plus","badge-percent","badge-minus","badge-japanese-yen","badge-info","badge-indian-rupee","badge-euro","badge-dollar-sign","badge-check","badge-cent","badge-alert","backpack","baby","axis-3d","axe","award","audio-waveform","audio-lines","atom","at-sign","asterisk","arrows-up-from-line","arrow-up","arrow-up-z-a","arrow-up-wide-narrow","arrow-up-to-line","arrow-up-right","arrow-up-narrow-wide","arrow-up-left","arrow-up-from-line","arrow-up-from-dot","arrow-up-down","arrow-up-a-z","arrow-up-1-0","arrow-up-0-1","arrow-right","arrow-right-to-line","arrow-right-left","arrow-right-from-line","arrow-left","arrow-left-to-line","arrow-left-right","arrow-left-from-line","arrow-down","arrow-down-z-a","arrow-down-wide-narrow","arrow-down-up","arrow-down-to-line","arrow-down-to-dot","arrow-down-right","arrow-down-narrow-wide","arrow-down-left","arrow-down-from-line","arrow-down-a-z","arrow-down-1-0","arrow-down-0-1","arrow-big-up","arrow-big-up-dash","arrow-big-right","arrow-big-right-dash","arrow-big-left","arrow-big-left-dash","arrow-big-down","arrow-big-down-dash","armchair","archive","archive-x","archive-restore","apple","app-window","app-window-mac","aperture","anvil","antenna","annoyed","angry","anchor","amphora","ampersands","ampersand","ambulance","align-vertical-space-between","align-vertical-space-around","align-vertical-justify-start","align-vertical-justify-end","align-vertical-justify-center","align-vertical-distribute-start","align-vertical-distribute-end","align-vertical-distribute-center","align-start-vertical","align-start-horizontal","align-horizontal-space-between","align-horizontal-space-around","align-horizontal-justify-start","align-horizontal-justify-end","align-horizontal-justify-center","align-horizontal-distribute-start","align-horizontal-distribute-end","align-horizontal-distribute-center","align-end-vertical","align-end-horizontal","align-center-vertical","align-center-horizontal","album","alarm-smoke","alarm-clock","alarm-clock-plus","alarm-clock-off","alarm-clock-minus","alarm-clock-check","airplay","air-vent","activity","accessibility","a-large-small","a-arrow-up","a-arrow-down"],Ts=e=>{const{value:o,defaultValue:r,onChange:n,isOpen:a,onOpen:i,onClose:l,closeOnSelect:u=!0}=e,[c,d]=p.useState(a??!1),[g,m]=p.useState(o??r),[h,f]=p.useState(""),y=p.useRef(null),k=p.useRef(null);p.useEffect(()=>{o!==void 0&&m(o)},[o]),p.useEffect(()=>{a!==void 0&&d(a)},[a]);const b=p.useMemo(()=>h?La.filter(S=>S.toLowerCase().includes(h.toLowerCase())).slice(0,100):La.slice(0,100),[h]);p.useEffect(()=>{const S=I=>{c&&y.current&&k.current&&!y.current.contains(I.target)&&!k.current.contains(I.target)&&j()};if(!(typeof document>"u"))return document.addEventListener("mousedown",S),()=>document.removeEventListener("mousedown",S)},[c]);const j=p.useCallback(()=>{a===void 0&&d(!1),l&&l()},[l,a]),x=p.useCallback(()=>{const S=!c;a===void 0&&d(S),S?(i&&i(),f("")):l&&l()},[c,i,l,a]),C=p.useCallback(S=>{o===void 0&&m(S),n&&n(S),u&&j()},[n,u,j,o]),v=p.useCallback(S=>{f(S)},[]);return{isOpen:c,selectedIcon:g,searchQuery:h,filteredIcons:b,handleToggle:x,handleIconSelect:C,handleSearchChange:v,handleClose:j,triggerRef:y,dropdownRef:k}},Uo={container:{position:"relative",display:"inline-block",width:"100%"},trigger:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",transition:"all 0.2s ease-in-out"},dropdown:{position:"absolute",mixBlendMode:"normal",top:"calc(100% + 4px)",left:0,right:0,zIndex:1e3,backgroundColor:"color-white",borderRadius:12,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",padding:"16px",minWidth:"280px",maxHeight:"320px",overflow:"hidden",display:"flex",flexDirection:"column"},searchInput:{marginBottom:"12px",flexShrink:0},iconGrid:{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",flexDirection:"row",flexWrap:"wrap",justifyContent:"flex-start",gap:"8px",overflowY:"auto",padding:"4px",color:"color-black",flexGrow:1},iconItem:{width:"32px",height:"32px",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",borderRadius:8,transition:"all 0.2s ease-in-out"}},Wy={xs:{height:"28px",fontSize:"12px",padding:"4px 8px"},sm:{height:"32px",fontSize:"12px",padding:"6px 10px"},md:{height:"40px",fontSize:"14px",padding:"8px 12px"},lg:{height:"48px",fontSize:"14px",padding:"10px 14px"},xl:{height:"56px",fontSize:"16px",padding:"12px 16px"}},Ey={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Ay={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"},filled:{backgroundColor:"color-gray-50",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Is=({label:e,placeholder:o="Select an icon",helperText:r,views:n={},size:a="md",shape:i="default",variant:l="default",error:u=!1,isDisabled:c=!1,isReadOnly:d=!1,showSearch:g=!0,isOpen:m,selectedIcon:h,searchQuery:f,filteredIcons:y,handleToggle:k,handleIconSelect:b,handleSearchChange:j,triggerRef:x,dropdownRef:C,handleClose:v,onChange:S,value:I,defaultValue:w,onOpen:T,onClose:R,closeOnSelect:E,...F})=>{const{getColor:W}=s.useTheme(),M={...Uo.container,...n==null?void 0:n.container},z={...Uo.trigger,...Wy[a],...Ey[i],...Ay[l],...u&&{borderColor:"color-red-500"},...c&&{opacity:.6,cursor:"not-allowed"},...!c&&!d&&{_hover:{borderColor:"color-gray-300"}},...n==null?void 0:n.trigger},H={...Uo.dropdown,...n==null?void 0:n.dropdown},V={...Uo.iconGrid,...n==null?void 0:n.iconGrid};return t.jsxs(s.View,{...M,...F,children:[e&&t.jsx(s.Text,{fontSize:a==="xs"?"12px":a==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...n==null?void 0:n.label,children:e}),t.jsxs(s.View,{ref:x,onClick:c||d?void 0:k,...z,children:[t.jsx(s.Horizontal,{alignItems:"center",gap:8,width:"100%",children:h?t.jsxs(s.Horizontal,{alignItems:"center",gap:8,width:"100%",children:[t.jsx(zt,{name:h,widthHeight:16}),t.jsx(s.Text,{color:"color-gray-800",fontSize:"inherit",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:h})]}):t.jsx(s.Text,{color:"color-gray-500",fontSize:"inherit",children:o})}),!d&&!c&&t.jsx(je,{widthHeight:16,color:"color-gray-500",orientation:m?"up":"down"})]}),m&&t.jsxs(s.View,{ref:C,...H,children:[g&&t.jsx(s.View,{...Uo.searchInput,...n==null?void 0:n.searchInput,children:t.jsx(Be,{placeholder:"Search icons...",value:f,onChange:P=>j(P),size:"sm",autoFocus:!0})}),t.jsx(s.View,{...V,children:y.length>0?y.map(P=>t.jsx(s.View,{...Uo.iconItem,onClick:()=>b(P),title:P,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},backgroundColor:h===P?"#EFF6FF":"transparent",borderWidth:h===P?"1px":"0px",borderStyle:"solid",borderColor:h===P?"#BFDBFE":"transparent",...n==null?void 0:n.iconItem,children:t.jsx(zt,{name:P,widthHeight:20})},P)):t.jsx(s.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:t.jsx(s.Text,{fontSize:"14px",children:"No icons found"})})})]}),r&&t.jsx(s.Text,{color:u?"theme-error":"color-gray-600",marginTop:"4px",...n==null?void 0:n.helperText,children:r})]})},Hy=e=>{const o=Ts(e);return t.jsx(Is,{...o,...e})},Vy=Hy,Ba={"to-right":"to right","to-left":"to left","to-bottom":"to bottom","to-top":"to top","to-top-right":"to top right","to-top-left":"to top left","to-bottom-right":"to bottom right","to-bottom-left":"to bottom left"},Zt={center:"center",top:"top",right:"right",bottom:"bottom",left:"left","top-right":"top right","top-left":"top left","bottom-right":"bottom right","bottom-left":"bottom left"},Py={linear:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],radial:[{color:"color-blue-500",position:"0%"},{color:"color-purple-500",position:"100%"}],conic:[{color:"color-red-500",position:"0deg"},{color:"color-yellow-500",position:"90deg"},{color:"color-green-500",position:"180deg"},{color:"color-blue-500",position:"270deg"},{color:"color-red-500",position:"360deg"}]},Dy=(e,o,r,n,a)=>{const i=o.map(l=>`${l.color} ${l.position||""}`).join(", ");switch(e){case"linear":return`linear-gradient(${r&&Ba[r]?Ba[r]:r||"to right"}, ${i})`;case"radial":const u=a&&Zt[a]?Zt[a]:a||"center";return`radial-gradient(${n||"circle"} at ${u}, ${i})`;case"conic":return`conic-gradient(from 0deg at ${a&&Zt[a]?Zt[a]:a||"center"}, ${i})`;default:return`linear-gradient(to right, ${i})`}},$y={linear:{backgroundSize:"200% 200%",transition:"background-position 3s ease-in-out",animate:{from:{backgroundPosition:"0% 50%"},"50%":{backgroundPosition:"100% 50%"},to:{backgroundPosition:"0% 50%"}}},radial:{backgroundSize:"100% 100%",transition:"background-position 3s ease-in-out, background-size 3s ease-in-out",animate:{from:{backgroundPosition:"center",backgroundSize:"100% 100%"},"50%":{backgroundSize:"120% 120%"},to:{backgroundPosition:"center",backgroundSize:"100% 100%"}}},conic:{transition:"transform 3s linear",animate:{from:{transform:"rotate(0deg)"},to:{transform:"rotate(360deg)"}}}},_a={container:{position:"relative",overflow:"hidden",borderRadius:"8px",transition:"border-radius 0.2s ease, opacity 0.2s ease"},content:{position:"relative",zIndex:1,width:"100%",height:"100%",padding:"16px"}},Ly=({type:e="linear",direction:o="to-right",shape:r="circle",position:n="center",from:a,to:i,colors:l,animate:u=!1,animationDuration:c=3,children:d,views:g,themeMode:m,...h})=>{const f=p.useMemo(()=>l&&l.length>0?l:a&&i?[{color:a,position:"0%"},{color:i,position:"100%"}]:Py[e],[l,a,i,e]),y=p.useMemo(()=>{const b=f.map(j=>({...j,color:j.color}));return Dy(e,b,o,r,n)},[e,f,o,r,n]),k=p.useMemo(()=>{if(!u)return{};const b=$y[e];return{...b,transition:b.transition.replace("3s",`${c}s`),animationDuration:`${c}s`,animationIterationCount:"infinite",animationTimingFunction:e==="conic"?"linear":"ease-in-out"}},[u,c,e]);return t.jsx(s.View,{background:y,..._a.container,...k,...g==null?void 0:g.container,...h,children:d&&t.jsx(s.View,{..._a.content,...g==null?void 0:g.content,children:d})})},Rs=e=>t.jsx(Ly,{...e}),By=(e=null,o=null)=>{const[r,n]=p.useState(e),[a,i]=p.useState(o),l=c=>a===c,u=c=>{i(d=>d===c?null:c)};return p.useEffect(()=>{const c=g=>{!g.composedPath().some(f=>(f==null?void 0:f.id)==="menubar-content"||(f==null?void 0:f.id)==="menubar-trigger")&&a!==null&&i(null)},d=g=>{g.key==="Escape"&&a!==null&&i(null)};if(!(typeof document>"u"))return document.addEventListener("mousedown",c),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",d)}},[a]),{activeMenuId:r,setActiveMenuId:n,openMenuId:a,setOpenMenuId:i,isMenuOpen:l,toggleMenu:u}},Fs={sm:{padding:"6px 10px",fontSize:"14px"},md:{padding:"8px 12px",fontSize:"16px"},lg:{padding:"10px 16px",fontSize:"18px"}},_y={default:{backgroundColor:"transparent",color:"color-gray-800"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800"}},Oy={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},ar={active:{backgroundColor:"color-gray-200",fontWeight:"bold"},hover:{backgroundColor:"color-gray-100"},disabled:{opacity:.5,cursor:"not-allowed"}},Ms=p.createContext({activeMenuId:null,setActiveMenuId:()=>{},openMenuId:null,setOpenMenuId:()=>{},isMenuOpen:()=>!1,toggleMenu:()=>{},orientation:"horizontal",size:"md",variant:"default",triggerRefs:{current:{}}}),Rr=()=>p.useContext(Ms),Ny=({value:e,children:o})=>t.jsx(Ms.Provider,{value:e,children:o}),zs=({children:e,orientation:o="horizontal",size:r="md",variant:n="default",views:a,...i})=>{const l=o==="horizontal"?s.Horizontal:s.Vertical;return t.jsx(l,{role:"menubar","aria-orientation":o,...Oy[o],..._y[n],...a==null?void 0:a.container,...i,children:e})},Ws=({children:e,id:o,disabled:r=!1,views:n})=>{const{orientation:a}=Rr(),i=a==="horizontal"?s.Horizontal:s.Vertical;return t.jsx(i,{role:"none",position:"relative",opacity:r?.5:1,pointerEvents:r?"none":"auto",...n==null?void 0:n.menu,children:p.Children.map(e,l=>p.isValidElement(l)?p.cloneElement(l,{...l.props,menuId:o}):l)})},Es=({children:e,menuId:o,disabled:r=!1,views:n})=>{const{activeMenuId:a,setActiveMenuId:i,toggleMenu:l,isMenuOpen:u,size:c,triggerRefs:d}=Rr(),g=p.useRef(null),m=a===o,h=u(o);p.useEffect(()=>(g.current&&o&&(d.current[o]=g.current),()=>{o&&delete d.current[o]}),[o,d]);const f=()=>{r||(i(o),l(o))};return t.jsx(s.View,{ref:g,id:"menubar-trigger",role:"menuitem","aria-haspopup":"true","aria-expanded":h,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",...Fs[c],...m?ar.active:{},...r?ar.disabled:{},_hover:r?{}:ar.hover,onClick:f,...n==null?void 0:n.trigger,children:e})},As=({children:e,menuId:o,views:r})=>{const{isMenuOpen:n,orientation:a,triggerRefs:i}=Rr(),l=p.useRef(null),[u,c]=p.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),d=n(o);if(p.useEffect(()=>{if(d&&l.current&&o&&i.current[o]){const m=l.current.getBoundingClientRect(),h=i.current[o].getBoundingClientRect(),f=Math.max(m.width||200,200),y=Math.max(m.height||150,150),k=window.innerWidth,b=window.innerHeight,j={top:h.top,right:k-h.right,bottom:b-h.bottom,left:h.left},x=a==="horizontal"?[{placement:"bottom",space:j.bottom,fits:j.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:j.top,fits:j.top>=y+8,x:h.left,y:h.top-y-8},{placement:"right",space:j.right,fits:j.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:j.left,fits:j.left>=f+8,x:h.left-f-8,y:h.top}]:[{placement:"right",space:j.right,fits:j.right>=f+8,x:h.right+8,y:h.top},{placement:"left",space:j.left,fits:j.left>=f+8,x:h.left-f-8,y:h.top},{placement:"bottom",space:j.bottom,fits:j.bottom>=y+8,x:h.left,y:h.bottom+8},{placement:"top",space:j.top,fits:j.top>=y+8,x:h.left,y:h.top-y-8}],C=x.find(w=>w.fits);if(C){c({x:C.x,y:C.y,placement:C.placement});return}const v=x.reduce((w,T)=>T.space>w.space?T:w);let S=v.x,I=v.y;S+f>k&&(S=k-f-8),S<8&&(S=8),I+y>b&&(I=b-y-8),I<8&&(I=8),c({x:S,y:I,placement:v.placement})}},[d,a,o,i]),!d)return null;const g={position:"fixed",left:u.x,top:u.y,zIndex:1e3};return t.jsx(s.View,{ref:l,id:"menubar-content",role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:g,...r==null?void 0:r.content,children:e})},Hs=({children:e,icon:o,disabled:r=!1,onClick:n,views:a})=>{const{size:i}=Rr(),l=()=>{r||!n||n()};return t.jsxs(s.View,{role:"menuitem",cursor:r?"not-allowed":"pointer",userSelect:"none",display:"flex",alignItems:"center",opacity:r?.5:1,...Fs[i],_hover:r?{}:ar.hover,onClick:l,...a==null?void 0:a.item,children:[o&&t.jsx(s.View,{marginRight:8,...a==null?void 0:a.icon,children:o}),e]})},Vs=({views:e})=>t.jsx(s.View,{role:"separator",height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.separator}),qy=({items:e,orientation:o,size:r,variant:n,views:a,themeMode:i})=>t.jsx(zs,{orientation:o,size:r,variant:n,views:a,children:e.map(l=>t.jsxs(Ws,{id:l.id,disabled:l.disabled,views:a,children:[t.jsxs(Es,{menuId:l.id,views:a,children:[l.icon&&t.jsx(s.View,{marginRight:8,...a==null?void 0:a.icon,children:l.icon}),l.label]}),l.items&&l.items.length>0&&t.jsx(As,{menuId:l.id,views:a,children:l.items.map((u,c)=>u.separator?t.jsx(Vs,{views:a},`separator-${c}`):t.jsx(Hs,{id:u.id,icon:u.icon,disabled:u.disabled,onClick:u.onClick,views:a,children:u.label},u.id))})]},l.id))}),Uy=({items:e,orientation:o="horizontal",size:r="md",variant:n="default",defaultActiveMenuId:a=null,defaultOpenMenuId:i=null,views:l,...u})=>{const{activeMenuId:c,setActiveMenuId:d,openMenuId:g,setOpenMenuId:m,isMenuOpen:h,toggleMenu:f}=By(a,i),y=p.useRef({});return t.jsx(Ny,{value:{activeMenuId:c,setActiveMenuId:d,openMenuId:g,setOpenMenuId:m,isMenuOpen:h,toggleMenu:f,orientation:o,size:r,variant:n,triggerRefs:y},children:t.jsx(qy,{items:e,orientation:o,size:r,variant:n,views:l,...u})})},Ho=Uy;Ho.Root=zs;Ho.Menu=Ws;Ho.Trigger=Es;Ho.Content=As;Ho.Item=Hs;Ho.Separator=Vs;const Gy=(e,o,r)=>{const[n,a]=p.useState([]);return p.useEffect(()=>{a((()=>{const l=[];if(o<=r)for(let u=1;u<=o;u++)l.push(u);else{l.push(1);let u=Math.max(2,e-Math.floor((r-2)/2)),c=Math.min(o-1,u+r-3);c>=o-1&&(c=o-1,u=Math.max(2,c-(r-3))),u>2&&l.push("...");for(let d=u;d<=c;d++)l.push(d);c<o-1&&l.push("..."),l.push(o)}return l})())},[e,o,r]),{visiblePageNumbers:n}},Go={sm:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px",media:{mobile:{fontSize:"11px",padding:"3px 6px",minWidth:"24px",height:"24px"}}},md:{fontSize:"14px",padding:"6px 10px",minWidth:"32px",height:"32px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}},lg:{fontSize:"14px",padding:"8px 12px",minWidth:"36px",height:"36px",media:{mobile:{fontSize:"12px",padding:"4px 8px",minWidth:"28px",height:"28px"}}}},yt={default:{backgroundColor:"transparent",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",borderWidth:"0px",borderStyle:"none",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-200"}},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"color-gray-100"}}},xt={rounded:{borderRadius:8},square:{borderRadius:"0px"},circular:{borderRadius:"50%"}},Yy={backgroundColor:"theme-primary",color:"color-white",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"theme-primary",opacity:.9}},er={opacity:.5,cursor:"not-allowed",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"transparent"}},Ky=({currentPage:e,totalPages:o,onPageChange:r,pageSize:n=10,pageSizeOptions:a=[{label:"10 / page",value:10},{label:"20 / page",value:20},{label:"50 / page",value:50},{label:"100 / page",value:100}],onPageSizeChange:i,showPageSizeSelector:l=!1,showPageInfo:u=!0,maxPageButtons:c=5,showFirstLastButtons:d=!1,size:g="md",variant:m="default",shape:h="rounded",visiblePageNumbers:f=[],views:y,...k})=>{const b=C=>{C<1||C>o||C===e||r(C)},j=C=>{i&&i(Number(C.target.value))},x=(C,v)=>{if(C==="...")return t.jsx(s.View,{display:"flex",alignItems:"center",justifyContent:"center",...Go[g],...y==null?void 0:y.ellipsis,children:"..."},`ellipsis-${v}`);const S=C===e;return t.jsx(s.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:S?"default":"pointer",...Go[g],...yt[m],...xt[h],...S?Yy:{},onClick:()=>b(C),"aria-label":`Page ${C}`,"aria-current":S?"page":void 0,...S?y==null?void 0:y.activePageButton:y==null?void 0:y.pageButton,children:C},`page-${C}`)};return t.jsxs(s.Horizontal,{alignItems:"center",gap:8,...y==null?void 0:y.container,...k,children:[d&&t.jsxs(s.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Go[g],...yt[m],...xt[h],...e===1?er:{},onClick:()=>b(1),"aria-label":"First page",disabled:e===1,...y==null?void 0:y.navigationButton,children:[t.jsx(je,{orientation:"left",widthHeight:16}),t.jsx(je,{orientation:"left",widthHeight:16,marginLeft:"-8px"})]}),t.jsx(s.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Go[g],...yt[m],...xt[h],...e===1?er:{},onClick:()=>b(e-1),"aria-label":"Previous page",disabled:e===1,...y==null?void 0:y.navigationButton,children:t.jsx(je,{orientation:"left",widthHeight:16})}),f.map((C,v)=>x(C,v)),t.jsx(s.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Go[g],...yt[m],...xt[h],...e===o?er:{},onClick:()=>b(e+1),"aria-label":"Next page",disabled:e===o,...y==null?void 0:y.navigationButton,children:t.jsx(je,{orientation:"right",widthHeight:16})}),d&&t.jsxs(s.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Go[g],...yt[m],...xt[h],...e===o?er:{},onClick:()=>b(o),"aria-label":"Last page",disabled:e===o,...y==null?void 0:y.navigationButton,children:[t.jsx(je,{orientation:"right",widthHeight:16}),t.jsx(je,{orientation:"right",widthHeight:16,marginLeft:"-8px"})]}),u&&t.jsxs(s.Text,{marginLeft:16,color:"color-gray-600",...y==null?void 0:y.pageInfo,children:["Page ",e," of ",o]}),l&&i&&t.jsx(s.View,{as:"select",marginLeft:16,padding:"4px 8px",borderRadius:"4px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",backgroundColor:"color-white",cursor:"pointer",value:n,onChange:j,...y==null?void 0:y.pageSizeSelector,children:a.map(C=>t.jsx("option",{value:C.value,children:C.label},C.value))})]})},Xy=({currentPage:e,totalPages:o,onPageChange:r,pageSize:n=10,pageSizeOptions:a,onPageSizeChange:i,showPageSizeSelector:l=!1,showPageInfo:u=!0,maxPageButtons:c=5,showFirstLastButtons:d=!1,size:g="md",variant:m="default",shape:h="rounded",views:f,...y})=>{const{visiblePageNumbers:k}=Gy(e,o,c);return t.jsx(Ky,{currentPage:e,totalPages:o,onPageChange:r,pageSize:n,pageSizeOptions:a,onPageSizeChange:i,showPageSizeSelector:l,showPageInfo:u,maxPageButtons:c,showFirstLastButtons:d,size:g,variant:m,shape:h,visiblePageNumbers:k,views:f,...y})},Ps=Xy,Jy=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Qy=p.memo(({shape:e="linear",value:o=0,max:r=100,color:n="theme-primary",backgroundColor:a="color-gray-200",height:i,size:l,radius:u=4,strokeWidth:c=10,showLabel:d=!1,labelColor:g="color-black-primary",animated:m=!0,animationDuration:h="0.5s",views:f,themeMode:y,...k})=>{var E;const{getColor:b,themeMode:j}=s.useTheme(),x=y||j,v=Math.min(r,Math.max(0,o))/r*100,S=F=>Jy(F)?F:b(F,{themeMode:x}),I=p.useMemo(()=>S(a),[b,a,x]),w=p.useMemo(()=>S(n),[b,n,x]);if(e==="circle"){const F=l||(typeof i=="number"?i:100),W=(F-c)/2,M=2*Math.PI*W,z=M-v/100*M;return t.jsxs(s.View,{width:F,height:F,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...f==null?void 0:f.container,...k,children:[t.jsxs("svg",{width:F,height:F,viewBox:`0 0 ${F} ${F}`,style:{transform:"rotate(-90deg)"},children:[t.jsx("circle",{cx:F/2,cy:F/2,r:W,stroke:I,strokeWidth:c,fill:"transparent",...f==null?void 0:f.track}),t.jsx("circle",{cx:F/2,cy:F/2,r:W,stroke:w,strokeWidth:c,strokeDasharray:M,strokeDashoffset:z,strokeLinecap:"round",fill:"transparent",style:{transition:m?`stroke-dashoffset ${h} ease-in-out`:"none"},...f==null?void 0:f.indicator})]}),d&&t.jsx(s.View,{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",children:t.jsxs(s.Text,{color:g,fontSize:`${F*.2}px`,fontWeight:"bold",...f==null?void 0:f.text,children:[Math.round(v),"%"]})})]})}const T=i||8,R={backgroundColor:I,...((E=f==null?void 0:f.container)==null?void 0:E.style)||{},...k.style||{}};return t.jsxs(s.View,{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":r,width:"100%",height:T,borderRadius:u,overflow:"hidden",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...f==null?void 0:f.container,...k,style:R,children:[t.jsx("div",{style:{height:"100%",backgroundColor:w,borderRadius:typeof u=="number"?`${u}px`:u,position:"absolute",left:0,top:0,bottom:0,width:`${v}%`,transition:m?`width ${h} ease-in-out`:"none",...f==null?void 0:f.bar}}),d&&t.jsxs(s.Text,{color:g,fontSize:typeof T=="number"&&T>16?`${T*.6}px`:"10px",fontWeight:"bold",position:"relative",zIndex:1,...f==null?void 0:f.text,children:[Math.round(v),"%"]})]})}),Zy=e=>{const o=ve("progress",e);return t.jsx(Qy,{...o})},Ds=Zy,ex=e=>({solid:"solid",dashed:"dashed",dotted:"dotted"}),ox=ex(),tx={thin:"1px",medium:"2px",thick:"4px"},bt={container:{transition:"opacity 0.15s ease"},label:{fontSize:"14px",fontWeight:"500",color:"color-gray-600",paddingHorizontal:"8px",backgroundColor:"color-white",transition:"color 0.15s ease"}},rx=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),nx=({orientation:e="horizontal",variant:o="solid",thickness:r="thin",color:n,spacing:a="0px",label:i,decorative:l=!1,views:u,themeMode:c,...d})=>{const{themeMode:g}=s.useTheme(),m=n||"color-gray-200",h=ox[o],f=tx[r],y=l?{"aria-hidden":!0}:{role:"separator","aria-orientation":e},k=rx(m)?{style:{borderColor:m}}:{borderColor:m};return i&&e==="horizontal"?t.jsxs(s.Horizontal,{alignItems:"center",justifyContent:"center",width:"100%",padding:a,...y,...d,children:[t.jsx(s.View,{height:"0px",flexGrow:1,borderTop:`${f} ${h}`,...k,...bt.container,...u==null?void 0:u.container}),t.jsx(s.Text,{...bt.label,...u==null?void 0:u.label,children:i}),t.jsx(s.View,{height:"0px",flexGrow:1,borderTop:`${f} ${h}`,...k,...bt.container,...u==null?void 0:u.container})]}):e==="horizontal"?t.jsx(s.View,{height:"0px",width:"100%",borderTop:`${f} ${h}`,padding:a,...k,...bt.container,...y,...u==null?void 0:u.container,...d}):t.jsx(s.View,{width:"0px",height:"100%",borderLeft:`${f} ${h}`,padding:a,...k,...bt.container,...y,...u==null?void 0:u.container,...d})},$s=e=>{const o=ve("separator",e);return t.jsx(nx,{...o})},xr=$s,ax=$s,ix={xs:12,sm:14,md:16,lg:18,xl:20},lx=({isSupported:e,isSharing:o,onShare:r,label:n,children:a,icon:i,size:l,isDisabled:u,isLoading:c,iconPosition:d,disableWhenUnsupported:g=!0,...m})=>{const h=l??"md",f=i??t.jsx(Mi,{widthHeight:ix[h],strokeWidth:1.5,filled:!1}),y=!!u||!e&&g,k=!!c||o;return t.jsx(me,{...m,size:h,icon:f,iconPosition:d??"left",isDisabled:y,isLoading:k,onClick:r,children:a??n??"Share"})},Oa=()=>typeof navigator>"u"?void 0:navigator,sx=(e,o)=>{if(!e||typeof e.share!="function")return!1;if(typeof e.canShare=="function")try{return e.canShare(o)}catch{return!1}return!0},cx=e=>{if(typeof e=="object"&&e!==null&&"name"in e)return String(e.name)},dx=e=>{const{shareData:o,onClick:r,onUnsupported:n,onShareStart:a,onShareSuccess:i,onShareCancel:l,onShareError:u}=e,[c,d]=p.useState(!1),g=p.useMemo(()=>sx(Oa(),o),[o]),m=p.useCallback((...h)=>{r==null||r(...h);const f=Oa();if(!f||typeof f.share!="function"){n==null||n();return}if(!c){if(typeof f.canShare=="function")try{if(!f.canShare(o)){n==null||n();return}}catch(y){u==null||u(y);return}d(!0),a==null||a();try{f.share(o).then(()=>{i==null||i()}).catch(y=>{if(cx(y)==="AbortError"){l==null||l();return}u==null||u(y)}).finally(()=>{d(!1)})}catch(y){d(!1),u==null||u(y)}}},[c,r,l,u,a,i,n,o]);return{isSupported:g,isSharing:c,handleShare:m}},ux=e=>{const{isSupported:o,isSharing:r,handleShare:n}=dx(e),{shareData:a,onShareStart:i,onShareSuccess:l,onShareCancel:u,onShareError:c,onUnsupported:d,onClick:g,...m}=e;return t.jsx(lx,{...m,isSupported:o,isSharing:r,onShare:n})},Ls=ux,px=({label:e,status:o="default",views:r,themeMode:n,...a})=>{const{themeMode:i}=s.useTheme(),l=Pi();return t.jsxs(s.Horizontal,{alignItems:"center",gap:8,role:"status",...r==null?void 0:r.container,...a,children:[t.jsx(s.View,{"data-role":"status-dot","aria-hidden":"true",width:"8px",height:"8px",borderRadius:"50%",...l[o].indicator,...r==null?void 0:r.indicator}),e&&t.jsx(s.Text,{"data-role":"status-label",fontSize:"14px",lineHeight:"20px",...l[o].label,...r==null?void 0:r.label,children:e})]})},ir=e=>{const o=ve("status",e);return t.jsx(px,{...o})},mx=(e=!0,o,r,n)=>{const{on:a}=s.useResponsive(),i=a("mobile"),[l,u]=p.useState(o!==void 0?o:e);return p.useEffect(()=>{o!==void 0&&u(o)},[o]),{isExpanded:l,toggleExpanded:()=>{const m=!l;u(m),r&&r(m)},expand:()=>{l||(u(!0),r&&r(!0))},collapse:()=>{l&&(u(!1),r&&r(!1))},isMobile:i}},gx={sm:{expandedWidth:"240px",collapsedWidth:"64px"},md:{expandedWidth:"280px",collapsedWidth:"72px"},lg:{expandedWidth:"320px",collapsedWidth:"80px"},xl:{expandedWidth:"360px",collapsedWidth:"88px"}},hx=e=>({default:{backgroundColor:"color-white",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},filled:{backgroundColor:"color-gray-100",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease"},outline:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},subtle:{backgroundColor:"color-gray-50",color:"color-gray-800",transition:"background-color 0.2s ease, color 0.2s ease"},elevated:{backgroundColor:"color-white",boxShadow:"0 4px 12px rgba(0, 0, 0, 0.1)",color:"color-gray-800",transition:"all 0.2s ease-in-out"}}),fx=hx(),yx={left:{left:0,borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{right:0,borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"}},xx={none:{},low:{boxShadow:"0 1px 3px rgba(0, 0, 0, 0.1)"},medium:{boxShadow:"0 4px 12px rgba(0, 0, 0, 0.12)"},high:{boxShadow:"0 10px 30px rgba(0, 0, 0, 0.15)"}},bx={fast:"all 0.2s ease-in-out",normal:"all 0.3s ease-in-out",slow:"all 0.5s ease-in-out",bounce:"all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55)"},Bs=p.createContext({isExpanded:!0,toggleExpanded:()=>{},expand:()=>{},collapse:()=>{},position:"left",size:"md",variant:"default"}),Fr=()=>p.useContext(Bs),kx=({value:e,children:o})=>t.jsx(Bs.Provider,{value:e,children:o}),Cx=({children:e,showToggleButton:o=!0,views:r,...n})=>{const{isExpanded:a,toggleExpanded:i,position:l}=Fr();return t.jsx(s.Horizontal,{width:"100%",padding:"16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:"space-between",...r==null?void 0:r.header,...n,children:a?t.jsxs(s.Horizontal,{width:"100%",alignItems:"center",justifyContent:"space-between",children:[e,o&&t.jsx(s.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:i,"aria-label":a?"Collapse sidebar":"Expand sidebar",...r==null?void 0:r.toggleButton,children:t.jsx(je,{orientation:l==="left"?"left":"right",widthHeight:16,...r==null?void 0:r.toggleButtonIcon})})]}):t.jsx(s.View,{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",children:o&&t.jsx(s.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",width:"32px",height:"32px",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"4px",backgroundColor:"transparent",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},onClick:i,"aria-label":a?"Collapse sidebar":"Expand sidebar",...r==null?void 0:r.toggleButton,children:t.jsx(je,{orientation:l==="left"?"right":"left",widthHeight:16,...r==null?void 0:r.toggleButtonIcon})})})})},Sx=({children:e,views:o,...r})=>{const{isExpanded:n}=Fr();return t.jsx(s.View,{flex:"1",width:"100%",overflowY:"auto",overflowX:"hidden",padding:n?"16px":"8px",...o==null?void 0:o.content,...r,children:e})},wx=({children:e,views:o,...r})=>{const{isExpanded:n}=Fr();return t.jsx(s.View,{width:"100%",padding:n?"16px":"8px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",...o==null?void 0:o.footer,...r,children:e})},jx=({children:e,position:o="left",size:r="md",variant:n="default",fixed:a=!1,hasBackdrop:i=!0,expandedWidth:l,collapsedWidth:u,breakpoint:c,breakpointBehavior:d="overlay",elevation:g="none",transitionPreset:m="normal",ariaLabel:h="Sidebar navigation",showToggleButton:f,toggleExpanded:y,expand:k,isExpanded:b,isMobile:j,collapse:x,views:C,themeMode:v,...S})=>{const I=gx[r],w=b?l||I.expandedWidth:u||I.collapsedWidth,T=!j||j&&d!=="hide",R=a||j&&d==="overlay"?"fixed":"relative",E=i&&j&&b&&d==="overlay";return t.jsxs(t.Fragment,{children:[E&&t.jsx(s.View,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"color-dark-50-360",zIndex:998,onClick:x,...C==null?void 0:C.backdrop}),T&&t.jsx(s.Vertical,{position:R,top:0,height:"100vh",width:w,zIndex:999,transition:bx[m],transform:j&&d==="overlay"&&!b?`translateX(${o==="left"?"-100%":"100%"})`:"translateX(0)",role:"navigation","aria-label":h,...fx[n],...yx[o],...xx[g],...C==null?void 0:C.container,...S,children:p.Children.map(e,F=>F)})]})},vx=({children:e,position:o="left",size:r="md",variant:n="default",defaultExpanded:a=!0,expanded:i,onExpandedChange:l,fixed:u=!1,hasBackdrop:c=!0,showToggleButton:d=!0,expandedWidth:g,collapsedWidth:m,breakpoint:h=768,breakpointBehavior:f="overlay",views:y,...k})=>{const{isExpanded:b,toggleExpanded:j,expand:x,collapse:C,isMobile:v}=mx(a,i,l);return t.jsx(kx,{value:{isExpanded:b,toggleExpanded:j,expand:x,collapse:C,position:o,size:r,variant:n,views:y},children:t.jsx(jx,{position:o,size:r,variant:n,fixed:u,hasBackdrop:c,showToggleButton:d,expandedWidth:g,collapsedWidth:m,breakpoint:h,breakpointBehavior:f,isExpanded:b,isMobile:v,toggleExpanded:j,expand:x,collapse:C,views:y,...k,children:e})})},_t=vx;_t.Header=Cx;_t.Content=Sx;_t.Footer=wx;_t.useContext=Fr;const Tx=()=>({getItem:e=>{try{return typeof localStorage>"u"?null:localStorage.getItem(`resizable-${e}`)}catch(o){return console.warn("Failed to access localStorage:",o),null}},setItem:(e,o)=>{try{if(typeof localStorage>"u")return;localStorage.setItem(`resizable-${e}`,o)}catch(r){console.warn("Failed to write to localStorage:",r)}}}),Ix=(e,o,r,n=50,a=1/0,i=!1,l,u,c=10)=>{const[d,g]=p.useState(!1),[m,h]=p.useState([]),f=p.useRef(null),y=p.useRef(null),k=p.useRef(0),b=p.useRef([]),j=p.useRef(u||(typeof window<"u"?Tx():null)),x=p.useCallback(()=>f.current?e==="horizontal"?f.current.offsetWidth:f.current.offsetHeight:0,[e]),C=p.useCallback(()=>{if(!l||!j.current)return null;const H=j.current.getItem(l);if(!H)return null;try{const V=JSON.parse(H);return Array.isArray(V.sizes)?V.sizes:null}catch(V){return console.warn("Failed to parse saved panel sizes:",V),null}},[l]),v=p.useCallback(()=>{if(!l||!j.current||m.length===0)return;const H=m.map(V=>({id:V.id,size:V.size,collapsed:V.collapsed||!1}));j.current.setItem(l,JSON.stringify({sizes:H}))},[l,m]),S=p.useCallback((H,V,P,L,B)=>{h($=>$.some(q=>q.id===H)?$:[...$,{id:H,size:V,minSize:P??n,maxSize:L??a,collapsible:B??i,collapsed:!1}])},[n,a,i]),I=p.useCallback(H=>{h(V=>V.filter(P=>P.id!==H))},[]),w=p.useCallback(H=>{const V=m.find(P=>P.id===H);return V?V.size:0},[m]),T=p.useCallback((H,V)=>{h(P=>P.map(L=>L.id===H?{...L,size:V}:L))},[]),R=p.useCallback(H=>{const V=m.find(P=>P.id===H);return V?!!V.collapsed:!1},[m]),E=p.useCallback(H=>{h(V=>{const P=V.findIndex(q=>q.id===H);if(P===-1)return V;const L=V[P];if(!L.collapsible)return V;const B={...L,collapsed:!L.collapsed},$=[...V];return $[P]=B,$})},[]),F=p.useCallback((H,V)=>{y.current=H,k.current=V,b.current=m.map(P=>P.size),g(!0)},[m]),W=p.useCallback(H=>{if(!d||!y.current)return;const V=y.current,P=H-k.current;let L=-1;const B=V.match(/\d+$/);if(B&&(L=parseInt(B[0],10)-1),L===-1&&m.length>=2&&(L=0),L<0||L>=m.length-1)return;const $=m[L],q=m[L+1];if($.collapsed||q.collapsed)return;let Y=b.current[L]+P,O=b.current[L+1]-P;Y=Math.max($.minSize??n,Math.min($.maxSize??a,Y)),O=Math.max(q.minSize??n,Math.min(q.maxSize??a,O)),h(J=>J.map((D,A)=>A===L?{...D,size:Y}:A===L+1?{...D,size:O}:D))},[d,m,e,n,a]),M=p.useCallback(()=>{d&&r&&r(m.map(H=>H.size)),y.current=null,g(!1),l&&v()},[d,m,r,l,v]),z=p.useCallback(H=>{if(!d||!y.current)return;const V=y.current;let P=-1;const L=V.match(/\d+$/);if(L&&(P=parseInt(L[0],10)-1),P===-1&&m.length>=2&&(P=0),P<0||P>=m.length-1)return;let B=0;e==="horizontal"?(H.key==="ArrowLeft"&&(B=-c),H.key==="ArrowRight"&&(B=c),H.key==="Home"&&(B=-100),H.key==="End"&&(B=100)):(H.key==="ArrowUp"&&(B=-c),H.key==="ArrowDown"&&(B=c),H.key==="Home"&&(B=-100),H.key==="End"&&(B=100)),B!==0&&(H.preventDefault(),W(k.current+B)),H.key==="Escape"&&(h($=>$.map((q,Y)=>({...q,size:b.current[Y]}))),M())},[d,m,e,W,M,c]);return p.useEffect(()=>{if(typeof document>"u")return;const H=L=>{if(!d)return;const B=e==="horizontal"?L.clientX:L.clientY;W(B)},V=L=>{if(!d||L.touches.length===0)return;const B=L.touches[0],$=e==="horizontal"?B.clientX:B.clientY;W($)},P=()=>{d&&M()};return d&&(document.addEventListener("mousemove",H),document.addEventListener("touchmove",V),document.addEventListener("mouseup",P),document.addEventListener("touchend",P),document.addEventListener("keydown",z),document.body.style.cursor=e==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",H),document.removeEventListener("touchmove",V),document.removeEventListener("mouseup",P),document.removeEventListener("touchend",P),document.removeEventListener("keydown",z),document.body.style.cursor="",document.body.style.userSelect=""}},[d,e,W,M,z]),p.useEffect(()=>{if(m.length!==0){if(l){const H=C();if(H){h(V=>V.map(P=>{const L=H.find(B=>B.id===P.id);return L?{...P,size:L.size,collapsed:L.collapsed||!1}:P}));return}}if(!o){const V=x()/m.length;h(P=>P.map(L=>({...L,size:V})))}}},[m.length,o,x,l,C]),p.useEffect(()=>{if(!o||o.length===0||m.length===0)return;const H=x(),V=o.map(P=>typeof P=="string"&&P.endsWith("%")?parseFloat(P)/100*H:typeof P=="number"?P:parseFloat(P));h(P=>P.map((L,B)=>({...L,size:B<V.length?V[B]:L.size})))},[o,m.length,x]),p.useEffect(()=>{m.length>0&&l&&!d&&v()},[m,l,d,v]),{isResizing:d,setIsResizing:g,containerRef:f,panels:m,registerPanel:S,unregisterPanel:I,getPanelSize:w,setPanelSize:T,isPanelCollapsed:R,togglePanelCollapse:E,startResize:F,onResize:W,endResize:M}},Rx={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},Fx=(e,o)=>({sm:{width:o==="horizontal"?"4px":"100%",height:o==="vertical"?"4px":"100%"},md:{width:o==="horizontal"?"6px":"100%",height:o==="vertical"?"6px":"100%"},lg:{width:o==="horizontal"?"8px":"100%",height:o==="vertical"?"8px":"100%"}})[e],Mx=e=>({default:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}},subtle:{backgroundColor:"transparent",_hover:{backgroundColor:"color-gray-100"},_active:{backgroundColor:"color-gray-200"}},prominent:{backgroundColor:"color-gray-100",_hover:{backgroundColor:"color-gray-200"},_active:{backgroundColor:"color-gray-300"}}}),zx=Mx(),or={horizontal:{width:"2px",height:"20px",backgroundColor:"color-gray-400",margin:"0 1px"},vertical:{width:"20px",height:"2px",backgroundColor:"color-gray-400",margin:"1px 0"}},_s=p.createContext({orientation:"horizontal",size:"md",variant:"default",isResizing:!1,setIsResizing:()=>{},registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>0,setPanelSize:()=>{},isPanelCollapsed:()=>!1,togglePanelCollapse:()=>{},startResize:()=>{},onResize:()=>{},endResize:()=>{}}),Os=()=>p.useContext(_s),Wx=({value:e,children:o})=>t.jsx(_s.Provider,{value:e,children:o}),Ex=({children:e,id:o,defaultSize:r,minSize:n,maxSize:a,collapsible:i,defaultCollapsed:l,onCollapseChange:u,views:c,...d})=>{const{orientation:g,registerPanel:m,unregisterPanel:h,getPanelSize:f,isPanelCollapsed:y,togglePanelCollapse:k}=Os(),b=typeof r=="string"&&r.endsWith("%")?0:typeof r=="number"?r:0;p.useEffect(()=>(m(o,b,n,a,i),()=>h(o)),[o,b,n,a,i,m,h]);const j=f(o),x=y(o);return p.useEffect(()=>{u&&x!==void 0&&u(x)},[x,u]),p.useEffect(()=>{i&&l&&!x&&k(o)},[o,i,l,x,k]),x?t.jsx(s.View,{flex:"0 0 auto",width:g==="horizontal"?"10px":"100%",height:g==="vertical"?"10px":"100%",backgroundColor:"color-gray-200",cursor:"pointer",onClick:()=>k(o),"aria-label":`Expand panel ${o}`,role:"button",tabIndex:0,...c==null?void 0:c.collapsedPanel,...d}):t.jsx(s.View,{flex:j>0?"0 0 auto":"1",width:g==="horizontal"?`${j}px`:"100%",height:g==="vertical"?`${j}px`:"100%",overflow:"auto",...c==null?void 0:c.panel,...d,children:e})},Ax=({id:e,position:o="both",disabled:r=!1,withVisualIndicator:n=!0,withCollapseButton:a=!1,collapseTarget:i,views:l,...u})=>{const{orientation:c,size:d,variant:g,startResize:m,isPanelCollapsed:h,togglePanelCollapse:f}=Os(),k=(()=>{if(i)return i;const S=e.match(/\d+$/);if(!S)return"";const I=parseInt(S[0],10);return isNaN(I)?"":`panel${I}`})(),b=h(k),j=S=>{if(r)return;S.preventDefault();const I=c==="horizontal"?S.clientX:S.clientY;m(e,I)},x=S=>{if(r||S.touches.length===0)return;S.preventDefault();const I=S.touches[0],w=c==="horizontal"?I.clientX:I.clientY;m(e,w)},C=S=>{r||(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),m(e,0))},v=S=>{S.stopPropagation(),k&&f(k)};return t.jsxs(s.View,{role:"separator","aria-orientation":c,"aria-valuemin":0,"aria-valuemax":100,tabIndex:r?-1:0,cursor:c==="horizontal"?"col-resize":"row-resize",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...Fx(d,c),...zx[g],onMouseDown:j,onTouchStart:x,onKeyDown:C,opacity:r?.5:1,pointerEvents:r?"none":"auto",...l==null?void 0:l.handle,...u,children:[n&&t.jsx(s.View,{display:"flex",alignItems:"center",justifyContent:"center",width:c==="horizontal"?"100%":"auto",height:c==="vertical"?"100%":"auto",pointerEvents:"none",...l==null?void 0:l.handleIcon,children:c==="horizontal"?t.jsxs(s.Horizontal,{gap:1,children:[t.jsx(s.View,{...or.horizontal}),t.jsx(s.View,{...or.horizontal})]}):t.jsxs(s.Vertical,{gap:1,children:[t.jsx(s.View,{...or.vertical}),t.jsx(s.View,{...or.vertical})]})}),a&&k&&t.jsx(s.View,{position:"absolute",top:c==="horizontal"?"-20px":"50%",left:c==="horizontal"?"50%":"-20px",transform:c==="horizontal"?"translateX(-50%)":"translateY(-50%)",width:"16px",height:"16px",borderRadius:"full",backgroundColor:"color-gray-100",border:"1px solid",borderColor:"color-gray-300",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:1,onClick:v,"aria-label":b?`Expand panel ${k}`:`Collapse panel ${k}`,role:"button",tabIndex:0,pointerEvents:"auto",_hover:{backgroundColor:"color-gray-200"},...l==null?void 0:l.collapseIcon,children:t.jsx(s.View,{width:"8px",height:"8px",display:"flex",alignItems:"center",justifyContent:"center",children:b?t.jsxs(s.Horizontal,{children:[t.jsx(s.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"}),t.jsx(s.View,{width:"2px",height:"6px",backgroundColor:"color-gray-600",position:"absolute"})]}):t.jsx(s.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"})})})]})},Hx=({children:e,orientation:o="horizontal",size:r="md",variant:n="default",defaultSizes:a,minSize:i,maxSize:l,collapsible:u=!1,containerRef:c,autoSaveId:d,keyboardResizeBy:g,onLayout:m,views:h,...f})=>{const y=o==="horizontal"?s.Horizontal:s.Vertical;return t.jsx(y,{ref:c,width:"100%",height:"100%",position:"relative",overflow:"hidden",...Rx[o],...h==null?void 0:h.container,...f,children:e})},Vx=({children:e,orientation:o="horizontal",size:r="md",variant:n="default",defaultSizes:a,onSizesChange:i,minSize:l=50,maxSize:u,collapsible:c=!1,autoSaveId:d,storage:g,keyboardResizeBy:m=10,views:h,...f})=>{const{isResizing:y,setIsResizing:k,containerRef:b,registerPanel:j,unregisterPanel:x,getPanelSize:C,setPanelSize:v,isPanelCollapsed:S,togglePanelCollapse:I,startResize:w,onResize:T,endResize:R}=Ix(o,a,i,l,u,c,d,g,m);return t.jsx(Wx,{value:{orientation:o,size:r,variant:n,isResizing:y,setIsResizing:k,registerPanel:j,unregisterPanel:x,getPanelSize:C,setPanelSize:v,isPanelCollapsed:S,togglePanelCollapse:I,startResize:w,onResize:T,endResize:R},children:t.jsx(Hx,{orientation:o,size:r,variant:n,defaultSizes:a,minSize:l,maxSize:u,collapsible:c,autoSaveId:d,keyboardResizeBy:m,containerRef:b,views:h,...f,children:e})})},ta=Vx;ta.Panel=Ex;ta.Handle=Ax;const Na=()=>Math.random().toString(36).substring(2,11),Px=({defaultOpen:e=!1,openDelay:o=200,closeDelay:r=200,isDisabled:n=!1}={})=>{const[a,i]=p.useState(e),l=p.useRef(null),u=p.useRef(null),c=p.useRef(null),d=p.useRef(null),g=p.useRef(`tooltip-trigger-${Na()}`).current,m=p.useRef(`tooltip-content-${Na()}`).current,h=p.useCallback(()=>{n||(d.current&&(clearTimeout(d.current),d.current=null),!a&&!c.current&&(c.current=setTimeout(()=>{i(!0),c.current=null},o)))},[a,o,n]),f=p.useCallback(()=>{c.current&&(clearTimeout(c.current),c.current=null),a&&!d.current&&(d.current=setTimeout(()=>{i(!1),d.current=null},r))},[a,r]),y=p.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]);return p.useEffect(()=>()=>{c.current&&clearTimeout(c.current),d.current&&clearTimeout(d.current)},[]),p.useEffect(()=>{if(typeof document>"u")return;const k=b=>{b.key==="Escape"&&a&&i(!1)};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[a]),{isOpen:a,openTooltip:h,closeTooltip:f,cancelCloseTimer:y,triggerRef:l,contentRef:u,triggerId:g,contentId:m}},Dx={sm:{padding:"4px 8px",fontSize:"12px",maxWidth:"200px"},md:{padding:"6px 10px",fontSize:"14px",maxWidth:"250px"},lg:{padding:"8px 12px",fontSize:"16px",maxWidth:"300px"}},$x=e=>({default:{backgroundColor:"color-gray-900",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.1), 0px 2px 4px rgba(0, 0, 0, 0.06)",transition:"opacity 0.15s ease"},light:{backgroundColor:"color-white",color:"color-gray-800",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.08), 0px 2px 4px rgba(0, 0, 0, 0.04)",transition:"opacity 0.15s ease"},dark:{backgroundColor:"color-gray-950",color:"color-white",borderRadius:"8px",boxShadow:"0px 4px 6px rgba(0, 0, 0, 0.2), 0px 2px 4px rgba(0, 0, 0, 0.12)",transition:"opacity 0.15s ease"}}),Lx=$x(),Bx=e=>{const o={position:"absolute",width:"8px",height:"8px",backgroundColor:"inherit",borderStyle:"inherit",borderWidth:"inherit",borderColor:"inherit",transform:"rotate(45deg)"};switch(e){case"top":return{...o,bottom:"-4px",left:"50%",marginLeft:"-4px",borderTop:"none",borderLeft:"none"};case"right":return{...o,left:"-4px",top:"50%",marginTop:"-4px",borderRight:"none",borderTop:"none"};case"bottom":return{...o,top:"-4px",left:"50%",marginLeft:"-4px",borderBottom:"none",borderRight:"none"};case"left":return{...o,right:"-4px",top:"50%",marginTop:"-4px",borderLeft:"none",borderBottom:"none"};default:return o}},Ns=p.createContext({isOpen:!1,openTooltip:()=>{},closeTooltip:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),ra=()=>p.useContext(Ns),_x=({value:e,children:o})=>t.jsx(Ns.Provider,{value:e,children:o}),qs=p.memo(({children:e,views:o,asChild:r=!1,...n})=>{const{openTooltip:a,closeTooltip:i,triggerRef:l,contentId:u,triggerId:c}=ra(),d=p.useCallback(()=>a(),[a]),g=p.useCallback(()=>i(),[i]),m=p.useCallback(()=>a(),[a]),h=p.useCallback(()=>i(),[i]),f={ref:l,onMouseEnter:d,onMouseLeave:g,onFocus:m,onBlur:h,id:c,"aria-describedby":u,...o==null?void 0:o.container,...n};return r&&p.isValidElement(e)?p.cloneElement(e,f):t.jsx(s.View,{display:"inline-block",...f,children:e})}),Ox=p.memo(({children:e,views:o,...r})=>{const{isOpen:n,contentRef:a,contentId:i,triggerId:l}=ra();return n?t.jsx(s.View,{ref:a,id:i,role:"tooltip","aria-labelledby":l,...o==null?void 0:o.container,...r,children:e}):null}),Nx=({content:e,children:o,position:r="top",align:n="center",size:a="md",variant:i="default",showArrow:l=!0,views:u,themeMode:c,...d})=>{const{isOpen:g,triggerRef:m,contentRef:h,contentId:f,triggerId:y}=ra(),{ref:k,relation:b}=s.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[j,x]=p.useState({x:0,y:0,placement:r});p.useEffect(()=>{m!=null&&m.current&&k&&(k.current=m.current)},[m,k,g]),p.useEffect(()=>{if(g&&(h!=null&&h.current)&&(m!=null&&m.current)){const S=m.current.getBoundingClientRect();let I=r;b&&(r==="top"&&b.space.vertical==="bottom"?I="bottom":r==="bottom"&&b.space.vertical==="top"?I="top":r==="right"&&b.space.horizontal==="left"?I="left":r==="left"&&b.space.horizontal==="right"&&(I="right"));let w=0,T=0;switch(I){case"top":w=n==="start"?S.left:n==="end"?S.right-120:S.left+S.width/2-60,T=S.top-8;break;case"bottom":w=n==="start"?S.left:n==="end"?S.right-120:S.left+S.width/2-60,T=S.bottom+8;break;case"right":w=S.right+8,T=n==="start"?S.top:n==="end"?S.bottom-32:S.top+S.height/2-16;break;case"left":w=S.left-8,T=n==="start"?S.top:n==="end"?S.bottom-32:S.top+S.height/2-16;break}x({x:w,y:T,placement:I})}},[g,r,n,m,h,b]);const C=p.useMemo(()=>l?Bx(j.placement):{},[l,j.placement]),v=p.useMemo(()=>{const S={position:"fixed",left:j.x,top:j.y,zIndex:1e3};switch(j.placement){case"top":return{...S,transform:"translateY(-100%)"};case"left":return{...S,transform:"translateX(-100%)"};case"bottom":case"right":default:return S}},[j.x,j.y,j.placement]);return t.jsxs(s.View,{position:"relative",display:"inline-block",...u==null?void 0:u.container,...d,children:[t.jsx(qs,{children:o}),g&&t.jsxs(s.View,{ref:h,id:f,role:"tooltip","aria-labelledby":y,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",style:v,...Dx[a],...Lx[i],...u==null?void 0:u.content,children:[typeof e=="string"?t.jsx(s.Text,{...u==null?void 0:u.text,children:e}):e,l&&t.jsx(s.View,{...C,...u==null?void 0:u.arrow})]})]})},qx=({content:e,children:o,position:r="top",align:n="center",size:a="md",variant:i="default",openDelay:l=200,closeDelay:u=200,showArrow:c=!0,defaultOpen:d=!1,isDisabled:g=!1,views:m,...h})=>{const f=Px({defaultOpen:d,openDelay:l,closeDelay:u,isDisabled:g});return t.jsx(_x,{value:f,children:t.jsx(Nx,{content:e,position:r,align:n,size:a,variant:i,showArrow:c,views:m,...h,children:o})})},Mr=qx;Mr.Trigger=qs;Mr.Content=Ox;const Ux={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}},qa={container:{position:"relative",display:"flex",flexDirection:"column",height:"100vh",alignItems:"center",justifyContent:"center"},gradient:{position:"absolute",inset:"-10px",opacity:.5,pointerEvents:"none",filter:"blur(10px)",backgroundSize:"300% 200%",backgroundPosition:"50% 50%, 50% 50%"}},Nr={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},image:{position:"absolute",top:0,left:0,width:"100%",height:"100%",backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundAttachment:"scroll"},content:{position:"relative",width:"100%",height:"100%",zIndex:2}},qr={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",overflow:"hidden"},video:{position:"absolute",top:0,left:0,width:"100%",height:"100%",objectFit:"cover"},content:{position:"relative",zIndex:2}},Gx=p.createContext({}),Yx=({children:e,showRadialGradient:o=!0,views:r,themeMode:n,...a})=>{const i={white:"rgba(255,255,255,1)",transparent:"rgba(255,255,255,0)"},l=["rgb(59, 130, 246)","rgb(196, 181, 253)","rgb(147, 197, 253)","rgb(221, 214, 254)","rgb(96, 165, 250)"],u={...qa.gradient,backgroundImage:`
80
- repeating-linear-gradient(100deg, ${l.join(", ")}),
81
- repeating-linear-gradient(100deg, ${i.white} 0%, ${i.white} 7%, ${i.transparent} 10%, ${i.transparent} 12%, ${i.white} 16%)
82
- `,animation:"aurora 4s ease infinite",...o?{maskImage:"radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%)"}:{}};return t.jsxs(s.View,{...qa.container,...r==null?void 0:r.container,...a,children:[t.jsx(s.View,{style:u}),e,t.jsx("style",{children:`
83
- @keyframes aurora {
84
- 0% { background-position: 0% 50%; }
85
- 50% { background-position: 100% 50%; }
86
- 100% { background-position: 0% 50%; }
87
- }
88
- `})]})},Kx=({number:e=20,children:o,...r})=>{const n=Array.from({length:e},(a,i)=>i);return t.jsxs(s.View,{width:"100%",height:"100%",backgroundColor:"black",position:"relative",overflow:"hidden",...r,children:[n.map(a=>{const i=a*37%200-100+"px",l=.2+a*13%6*.1+"s",u=(1+a*7%9)/2+"s",c=300+a*17%100+"px";return t.jsx(s.View,{position:"absolute",top:"0px",left:i,width:"2px",height:"2px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 0 0 1px rgba(255, 255, 255, 0.1)",transform:"rotate(215deg)",zIndex:0,animate:{from:{transform:"translateX(-100%) translateY(-100%)"},to:{transform:`translateX(${c}) translateY(${c})`},iterationCount:"infinite",timingFunction:"linear",fillMode:"forwards",duration:u,delay:l},children:t.jsx(s.View,{position:"absolute",top:"-1px",left:"-1px",width:"1px",height:"1px",borderRadius:"9999px",backgroundColor:"white",boxShadow:"0 10px 0 1px rgba(255, 255, 255, 0.1)"})},a)}),o&&t.jsx(s.View,{position:"relative",zIndex:1,width:"100%",height:"100%",children:o})]})},Ua=["rgb(186, 230, 253)","rgb(249, 168, 212)","rgb(134, 239, 172)","rgb(253, 224, 71)","rgb(252, 165, 165)","rgb(216, 180, 254)","rgb(147, 197, 253)","rgb(165, 180, 252)","rgb(196, 181, 253)"],Xx=()=>Ua[Math.floor(Math.random()*Ua.length)],Jx=({rows:e=15,cols:o=10,squareSize:r=40,...n})=>{const a=Array(e).fill(1),i=Array(o).fill(1);return t.jsx(s.View,{padding:16,width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-50",zIndex:0,transform:"skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)",...n,children:a.map((l,u)=>t.jsx(s.Horizontal,{gap:0,children:i.map((c,d)=>t.jsx(s.View,{height:r/3,width:r,borderStyle:"solid",borderColor:"color-gray-200",borderWidth:.5,backgroundColor:"transparent",cursor:"pointer",on:{hover:{backgroundColor:Xx(),transition:"background-color 0.2s ease"}}},`col-${d}`))},`row-${u}`))})},Qx=["rgb(59, 130, 246)","rgb(147, 51, 234)","rgb(236, 72, 153)","rgb(34, 197, 94)","rgb(251, 146, 60)","rgb(168, 85, 247)"],Zx=({count:e=50,colors:o=Qx,speed:r="medium",shapes:n=["circle"],...a})=>{const i=Array.from({length:e},(d,g)=>g),l=()=>{switch(r){case"slow":return .5;case"fast":return 2;default:return 1}},u=()=>n[Math.floor(Math.random()*n.length)],c=()=>o[Math.floor(Math.random()*o.length)];return t.jsx(s.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:i.map(d=>{const g=Math.random()*8+4,m=Math.random()*400,h=Math.random()*300,f=Math.random()*400,y=Math.random()*300,k=(Math.random()*10+5)/l(),b=Math.random()*5,j=u(),x=c(),C={circle:{borderRadius:"50%"},square:{borderRadius:"2px"},triangle:{borderRadius:"0",clipPath:"polygon(50% 0%, 0% 100%, 100% 100%)"}};return t.jsx(s.View,{position:"absolute",width:g,height:g,backgroundColor:x,opacity:.7,style:{left:m,top:h,...C[j]},animate:{from:{transform:"translate(0px, 0px) scale(0.5)",opacity:0},to:{transform:`translate(${f-m}px, ${y-h}px) scale(1)`,opacity:.7},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${k}s`,delay:`${b}s`}},d)})})},eb=({gridSize:e=30,lineColor:o="rgba(59, 130, 246, 0.3)",pulseColor:r="rgba(59, 130, 246, 0.8)",animationSpeed:n="medium",...a})=>{const i=()=>{switch(n){case"slow":return 4;case"fast":return 1;default:return 2}},l=Math.floor(400/e),u=Math.floor(300/e),c=l*u,d=Array.from({length:c},(g,m)=>m);return t.jsxs(s.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:[Array.from({length:l+1},(g,m)=>t.jsx(s.View,{position:"absolute",left:m*e,top:0,width:1,height:"100%",backgroundColor:o},`v-line-${m}`)),Array.from({length:u+1},(g,m)=>t.jsx(s.View,{position:"absolute",left:0,top:m*e,width:"100%",height:1,backgroundColor:o},`h-line-${m}`)),d.map(g=>{const m=g%l,h=Math.floor(g/l),f=(m+h)*.1;return t.jsx(s.View,{position:"absolute",left:m*e+1,top:h*e+1,width:e-2,height:e-2,backgroundColor:"transparent",animate:{from:{backgroundColor:"transparent"},to:{backgroundColor:r},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${i()}s`,delay:`${f}s`}},g)})]})},ob=["rgba(59, 130, 246, 0.6)","rgba(147, 51, 234, 0.6)","rgba(236, 72, 153, 0.6)","rgba(34, 197, 94, 0.6)"],tb=({rippleCount:e=5,colors:o=ob,maxSize:r=200,frequency:n=3,...a})=>{const i=Array.from({length:e},(l,u)=>({id:u,x:Math.random()*400,y:Math.random()*300,color:o[u%o.length],delay:u*(n/e),duration:3+Math.random()*2}));return t.jsxs(s.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-100",...a,children:[i.map(l=>t.jsx(s.View,{position:"absolute",width:20,height:20,borderRadius:"50%",style:{left:l.x-10,top:l.y-10,border:`2px solid ${l.color}`,backgroundColor:"transparent"},animate:{from:{transform:"scale(0)",opacity:1},to:{transform:`scale(${r/20})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${l.duration}s`,delay:`${l.delay}s`}},l.id)),i.map(l=>t.jsx(s.View,{position:"absolute",width:10,height:10,borderRadius:"50%",style:{left:l.x-5,top:l.y-5,backgroundColor:l.color},animate:{from:{transform:"scale(1)",opacity:.8},to:{transform:`scale(${r/40})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${l.duration*1.2}s`,delay:`${l.delay+.5}s`}},`secondary-${l.id}`))]})},rb=({children:e,src:o,backgroundSize:r="cover",backgroundPosition:n="center",backgroundRepeat:a="no-repeat",backgroundAttachment:i="scroll",imageOpacity:l=1,overlay:u=null,blendMode:c="normal",views:d,themeMode:g,...m})=>{const h={...Nr.image,backgroundImage:`url(${o})`,backgroundSize:r,backgroundPosition:n,backgroundRepeat:a,backgroundAttachment:i,opacity:l,mixBlendMode:c};return t.jsxs(s.View,{...Nr.container,...d==null?void 0:d.container,...m,children:[t.jsx(s.View,{style:h,...d==null?void 0:d.image}),u,e&&t.jsx(s.View,{...Nr.content,...d==null?void 0:d.content,children:e})]})},nb=({children:e,src:o,autoPlay:r=!0,loop:n=!0,muted:a=!0,playsInline:i=!0,overlay:l=null,blendMode:u="normal",views:c,themeMode:d,...g})=>t.jsxs(s.View,{...qr.container,...c==null?void 0:c.container,...g,children:[t.jsx(s.View,{as:"video",src:o,autoPlay:r,loop:n,muted:a,playsInline:i,style:{...qr.video,mixBlendMode:u},...c==null?void 0:c.video}),l,e&&t.jsx(s.View,{...qr.content,...c==null?void 0:c.content,children:e})]}),ab=({children:e,...o})=>t.jsx(Rs,{...o,children:e}),ib=/^(color|theme|light|dark)-/,lb=e=>{const o=e.split("-"),r=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(r)&&r>=0&&r<=1e3?o.slice(0,-1).join("-"):e},sb=({contentPosition:e,backgroundColor:o="color-black-900",...r})=>{const n=ib.test(o),a=n?lb(o):o,l=(()=>{let u=`${a}-100`,c=`${a}-900`,d=`${a}-600`,g=`${a}-400`;switch(n||(u=`color-mix(in srgb, ${a} 10%, transparent)`,c=`color-mix(in srgb, ${a} 90%, transparent)`,d=`color-mix(in srgb, ${a} 70%, transparent)`,g=`color-mix(in srgb, ${a} 50%, transparent)`),e){case"left":return`radial-gradient(circle at 70% 50%, ${u} 0%, ${u} 100%), linear-gradient(to right, ${c} 0%, ${d} 65%, ${u} 100%)`;case"right":return`radial-gradient(circle at 30% 50%, ${u} 0%, ${u} 100%), linear-gradient(to left, ${c} 0%, ${d} 65%, ${u} 100%)`;case"top":return`radial-gradient(circle at 50% 40%, ${u} 0%, ${u} 100%), linear-gradient(to bottom, ${c} 0%, ${d} 60%, ${u} 100%)`;case"bottom":return`radial-gradient(circle at 50% 60%, ${u} 0%, ${u} 100%), linear-gradient(to top, ${c} 0%, ${d} 60%, ${u} 100%)`;case"center":return`radial-gradient(circle at 50% 70%, ${c} 0%, ${u} 100%)`;default:return g}})();return t.jsx(s.View,{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:l,pointerEvents:"none",zIndex:1,...r})},cb=({children:e,views:o,...r})=>t.jsx(Gx.Provider,{value:{},children:t.jsx(s.View,{...Ux.container,...o==null?void 0:o.container,...r,children:e})}),Us=p.forwardRef(({children:e,shape:o="rounded",decorationRotation:r=5,decorationScale:n=1,decorationOpacity:a=.8,views:i,...l},u)=>{const d=(k=>{switch(k){case"square":return"0px";case"pill":return"9999px";case"rounded":default:return"16px"}})(o),g=Math.abs(r)*(Math.PI/180),m=Math.sin(g)*100,h=(n-1)*100/2,f=Math.ceil(m+h),y=l.backgroundColor??"theme-primary";return t.jsx(s.View,{...l,ref:u,backgroundColor:"transparent",position:"relative",overflow:"visible",...i==null?void 0:i.container,children:t.jsxs(s.View,{padding:l.padding??`${96+f}px ${f}px`,position:"relative",overflow:"visible",children:[t.jsx(s.View,{position:"absolute",top:f,left:f,right:f,bottom:f,backgroundColor:y,borderRadius:d,opacity:a/1.5,transform:`scale(${n})`,pointerEvents:"none",zIndex:1,...i==null?void 0:i.back}),t.jsx(s.View,{position:"absolute",top:f,left:f,right:f,bottom:f,transform:`rotate(${r}deg) scale(${n})`,opacity:a/1.2,backgroundColor:y,borderRadius:d,pointerEvents:"none",zIndex:2,...i==null?void 0:i.front}),t.jsx(s.View,{margin:"0 auto",position:"relative",zIndex:3,...i==null?void 0:i.content,children:e})]})})});Us.displayName="Background.Layout";const we=cb;we.Aurora=Yx;we.Meteors=Kx;we.Wall=Jx;we.Particles=Zx;we.Grid=eb;we.Ripples=tb;we.Image=rb;we.Video=nb;we.Gradient=ab;we.Overlay=sb;we.Layout=Us;const Gs=p.forwardRef((e,o)=>t.jsx(we,{...e,ref:o}));Gs.displayName="Background";const Ys=Object.assign(Gs,{Layout:we.Layout,Aurora:we.Aurora,Meteors:we.Meteors,Wall:we.Wall,Particles:we.Particles,Grid:we.Grid,Ripples:we.Ripples,Image:we.Image,Video:we.Video,Gradient:we.Gradient,Overlay:we.Overlay});Ys.displayName="Background";function db(e){const{inputValue:o,onInputChange:r,onSubmit:n,messages:a=[]}=e,[i,l]=p.useState(""),u=p.useRef(null),c=p.useRef(null),d=o!==void 0,g=o!==void 0?o:i,m=p.useCallback(f=>{d?r==null||r(f):l(f)},[d,r]),h=p.useCallback(f=>{f&&f.preventDefault();const y=g.trim();y&&n&&(n(y),d||l(""),u.current&&(u.current.style.height="auto"))},[g,n,d]);return p.useEffect(()=>{c.current&&(c.current.scrollTop=c.current.scrollHeight)},[a.length]),{internalInputValue:g,handleInputChange:m,handleSubmit:h,inputRef:u,messagesRef:c}}const ub={sm:{fontSize:"12px",padding:"8px"},md:{fontSize:"14px",padding:"10px"},lg:{fontSize:"14px",padding:"12px"}},pb={default:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},glassy:{backgroundColor:"color-white-900",backdropFilter:"blur(10px)",border:"1px solid rgba(226, 232, 240, 0.9)",borderRadius:"12px",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.08)"},minimal:{backgroundColor:"color-white",border:"1px solid color-gray-200",borderRadius:"12px"}},mb={sm:{fontSize:"12px",padding:"8px 10px",borderRadius:"12px"},md:{fontSize:"14px",padding:"10px 12px",borderRadius:"12px"},lg:{fontSize:"14px",padding:"12px 14px",borderRadius:"14px"}},gb={backgroundColor:"theme-primary",color:"color-white",alignSelf:"flex-end",borderBottomRightRadius:"4px"},hb={backgroundColor:"color-white",color:"color-gray-900",alignSelf:"flex-start",borderBottomLeftRadius:"4px",border:"1px solid color-gray-200"},fb={position:"relative",backgroundColor:"color-white",borderTop:"1px solid color-gray-200",padding:"12px",display:"flex",alignItems:"flex-end",gap:"8px",transition:"background-color 0.2s ease, border-color 0.2s ease"},co={container:{display:"flex",flexDirection:"column",width:"100%",height:"100%",overflow:"hidden"},messagesContainer:{flex:1,overflowY:"auto",display:"flex",flexDirection:"column",gap:"12px",padding:"16px",backgroundColor:"color-gray-50"},inputContainer:fb,bubble:{maxWidth:"80%",position:"relative",wordWrap:"break-word",animation:"chatBubbleAppear 0.25s ease-out"},timestamp:{position:"absolute",top:"-24px",fontSize:"12px",color:"color-gray-500",backgroundColor:"color-white-900",padding:"2px 8px",borderRadius:"9999px",opacity:0,transition:"opacity 0.15s ease-out",border:"1px solid color-gray-200"},input:{flex:1,border:"none",outline:"none",backgroundColor:"transparent",resize:"none",fontFamily:"inherit",fontSize:"14px",minHeight:"24px",maxHeight:"120px"},sendButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"background-color 0.2s ease, opacity 0.2s ease",flexShrink:0},attachmentButton:{width:"36px",height:"36px",borderRadius:"10px",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"transparent",transition:"background-color 0.2s ease",flexShrink:0}},yb=({messages:e=[],inputPlaceholder:o="Type a message...",disableInput:r=!1,variant:n="default",size:a="md",showTimestamps:i=!0,enableAttachments:l=!1,enableContextPicker:u=!1,selectedContextElements:c=[],onContextPickerClick:d,onRemoveContextElement:g,isLoading:m=!1,loadingText:h="Loading...",styles:f={},maxHeight:y="600px",internalInputValue:k,handleInputChange:b,handleSubmit:j,inputRef:x,messagesRef:C,inputValue:v,onInputChange:S,...I})=>{var V;const w={...co.container,...pb[n],...f.container},T={...co.messagesContainer,maxHeight:y,...f.messagesContainer},R={...co.inputContainer,...f.inputContainer},E={...co.input,...ub[a],...f.input},F=p.useCallback(P=>{b(P.target.value),P.target.style.height="auto",P.target.style.height=`${P.target.scrollHeight}px`},[b]),W=p.useCallback(P=>{P.key==="Enter"&&!P.shiftKey&&(P.preventDefault(),j())},[j]),M=k.trim().length>0,{onSubmit:z,...H}=I;return t.jsxs(s.View,{...w,...H,children:[t.jsxs(s.View,{ref:C,...T,children:[e.length===0?t.jsx(s.View,{display:"flex",alignItems:"center",justifyContent:"center",flex:1,color:"color-gray-500",children:t.jsx(s.Text,{fontSize:"14px",children:"No messages yet. Start a conversation."})}):e.map(P=>t.jsx(xb,{message:P,size:a,showTimestamp:i,styles:{bubble:f.bubble,userBubble:f.userBubble,assistantBubble:f.assistantBubble,timestamp:f.timestamp,reasoningContainer:f.reasoningContainer,reasoningContent:f.reasoningContent,errorMessage:f.errorMessage,systemMessage:f.systemMessage,toolMessage:f.toolMessage}},P.id)),m&&t.jsxs(s.Horizontal,{justifyContent:"flex-start",alignItems:"center",gap:8,marginTop:"8px",...f.loadingIndicator,children:[t.jsx(Wn,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),t.jsx(s.Text,{color:"color-gray-500",fontSize:"14px",children:h})]})]}),t.jsxs(s.View,{children:[c.length>0&&t.jsx(s.Horizontal,{gap:8,marginBottom:"8px",flexWrap:"wrap",padding:"0 12px 8px",...f.contextChipsContainer,children:c.map(P=>t.jsxs(s.Horizontal,{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",borderRadius:"9999px",padding:"6px 10px",alignItems:"center",gap:6,children:[t.jsx(s.Text,{fontSize:"12px",color:"color-blue-700",fontWeight:"500",children:P.name}),t.jsx(s.View,{as:"button",type:"button",onClick:()=>g==null?void 0:g(P.id),cursor:"pointer",border:"none",backgroundColor:"transparent",display:"flex",alignItems:"center",children:t.jsx(Ue,{widthHeight:12,color:"color-blue-700"})})]},P.id))}),t.jsxs(s.View,{as:"form",onSubmit:j,...R,children:[l&&t.jsx(s.View,{as:"button",type:"button",...co.attachmentButton,...f.attachmentButton,_hover:{backgroundColor:"color-gray-100"},children:t.jsx(Ht,{widthHeight:16,color:"color-gray-600"})}),t.jsx(s.View,{as:"textarea",ref:x,value:k,onChange:F,onKeyDown:W,placeholder:o,disabled:r||m,...E,style:{...E,opacity:r||m?.5:1}}),t.jsxs(s.Vertical,{gap:4,alignItems:"center",children:[u&&t.jsx(s.View,{as:"button",type:"button",onClick:d,...co.attachmentButton,...f.contextPickerButton,_hover:{backgroundColor:"color-gray-100",...(V=f.contextPickerButton)==null?void 0:V._hover},title:"Select element from page",children:t.jsx(Ei,{widthHeight:16,color:"color-gray-600"})}),t.jsx(s.View,{as:"button",disabled:!M||r||m,...co.sendButton,backgroundColor:M?"theme-primary":"color-gray-300",_hover:{backgroundColor:M?"theme-primary":"color-gray-300"},...f.sendButton,style:{cursor:M?"pointer":"not-allowed",opacity:!M||r||m?.6:1},children:t.jsx(zn,{widthHeight:16,color:"color-white",filled:!1})})]})]})]})]})},xb=({message:e,size:o,showTimestamp:r,styles:n})=>{const[a,i]=p.useState(!1),[l,u]=p.useState(!1),c=e.role==="user",d=e.messageType==="system",g=e.messageType==="error",m=e.messageType==="tool";if(d)return t.jsx(s.View,{display:"flex",justifyContent:"center",padding:"8px",width:"100%",...n.systemMessage,children:t.jsxs(s.Horizontal,{gap:6,alignItems:"center",opacity:.7,children:[t.jsx(xo,{widthHeight:12,color:"color-gray-600"}),t.jsx(s.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.content})]})});if(m)return t.jsx(s.View,{display:"flex",justifyContent:"flex-start",padding:"8px 16px",width:"100%",...n.toolMessage,children:t.jsxs(s.Horizontal,{gap:8,alignItems:"center",backgroundColor:"color-gray-50",padding:"8px 10px",borderRadius:"8px",width:"100%",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[t.jsx(Fi,{widthHeight:14,color:"color-gray-600"}),t.jsxs(s.Vertical,{gap:2,children:[t.jsx(s.Text,{fontSize:"11px",fontWeight:"600",color:"color-gray-700",children:"Tool Usage"}),t.jsx(s.Text,{fontSize:"12px",color:"color-gray-600",fontFamily:"monospace",children:e.content})]})]})});const h={...co.bubble,...mb[o],...c?gb:hb,...g?{backgroundColor:"color-red-50",borderWidth:1,borderStyle:"solid",borderColor:"color-red-200",color:"color-red-700"}:{},...n.bubble,...c?n.userBubble:n.assistantBubble,...g?n.errorMessage:{}},f={...co.timestamp,[c?"right":"left"]:"8px",opacity:a?1:0,...n.timestamp};return t.jsx(s.View,{position:"relative",onMouseEnter:()=>i(!0),onMouseLeave:()=>i(!1),display:"flex",justifyContent:c?"flex-end":"flex-start",children:t.jsxs(s.View,{...h,children:[r&&t.jsx(s.View,{...f,children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),g&&t.jsxs(s.Horizontal,{gap:6,marginBottom:"4px",alignItems:"center",children:[t.jsx(vr,{widthHeight:14,color:"color-red-700"}),t.jsx(s.Text,{fontWeight:"600",fontSize:"12px",children:"Error"})]}),e.reasoning&&t.jsxs(s.View,{marginBottom:"8px",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"color-gray-200",paddingBottom:"8px",...n.reasoningContainer,children:[t.jsxs(s.Horizontal,{as:"button",onClick:()=>u(!l),cursor:"pointer",gap:4,alignItems:"center",backgroundColor:"transparent",border:"none",padding:0,children:[t.jsx(s.Text,{fontSize:"11px",color:"color-gray-500",fontWeight:"600",children:"Thinking Process"}),t.jsx(je,{orientation:l?"down":"right",widthHeight:10,color:"color-gray-500"})]}),l&&t.jsx(s.View,{padding:"8px",backgroundColor:"color-gray-50",borderRadius:"8px",marginTop:"4px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",...n.reasoningContent,children:t.jsx(s.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.reasoning})})]}),t.jsx(s.View,{whiteSpace:"pre-wrap",wordBreak:"break-word",children:e.content}),e.attachments&&e.attachments.length>0&&t.jsx(s.Vertical,{gap:4,marginTop:"8px",children:e.attachments.map(y=>t.jsxs(s.Horizontal,{gap:6,padding:"6px 8px",backgroundColor:"color-gray-50",borderRadius:"8px",fontSize:"12px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[t.jsx(Ht,{widthHeight:14}),t.jsx(s.Text,{children:y.name})]},y.id))}),e.contextElements&&e.contextElements.length>0&&t.jsxs(s.Vertical,{gap:4,marginTop:"8px",children:[t.jsx(s.Text,{fontSize:"11px",color:"color-black-500",fontWeight:"600",children:"Context:"}),e.contextElements.map(y=>t.jsx(s.Horizontal,{gap:6,padding:"6px 10px",backgroundColor:"color-blue-50",borderRadius:"9999px",fontSize:"11px",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",children:t.jsx(s.Text,{color:"color-blue-700",fontWeight:"500",children:y.name})},y.id))]})]})})},na=e=>{const o=db(e);return t.jsx(yb,{...e,...o})};na.displayName="ChatWidget";const Ks=na;function bb({onSelect:e,onCancel:o,active:r}){const[n,a]=p.useState(null);p.useRef(null);const i=p.useCallback(c=>{var f;if(!r)return;const d=document.elementFromPoint(c.clientX,c.clientY);if(!d||d===document.body||d.closest('[data-chatwidget-ignore="true"]')||d.closest("#chatwidget-overlay")){a(null);return}const g=d.getBoundingClientRect();let m=d.tagName.toLowerCase();if(d.id)m+=`#${d.id}`;else if(d.className&&typeof d.className=="string"){const y=d.className.split(" ")[0];y&&(m+=`.${y}`)}const h=(f=d.innerText)==null?void 0:f.slice(0,20);h&&(m+=` ("${h}...")`),a({id:d.id||`el-${Date.now()}`,name:m,tagName:d.tagName.toLowerCase(),rect:g})},[r]),l=p.useCallback(c=>{!r||c.target.closest('[data-chatwidget-ignore="true"]')||(c.preventDefault(),c.stopPropagation(),n&&e(n))},[r,n,e]),u=p.useCallback(c=>{r&&c.key==="Escape"&&o()},[r,o]);return p.useEffect(()=>{if(!(typeof document>"u"))return r?(document.addEventListener("mousemove",i),document.addEventListener("click",l,!0),document.addEventListener("keydown",u),document.body.style.cursor="crosshair"):(a(null),document.removeEventListener("mousemove",i),document.removeEventListener("click",l,!0),document.removeEventListener("keydown",u),document.body.style.cursor=""),()=>{document.removeEventListener("mousemove",i),document.removeEventListener("click",l,!0),document.removeEventListener("keydown",u),document.body.style.cursor=""}},[r,i,l,u]),{highlightedElement:n}}function kb({element:e}){return e?t.jsx("div",{id:"chatwidget-overlay",style:{position:"fixed",top:e.rect.top,left:e.rect.left,width:e.rect.width,height:e.rect.height,border:"2px solid #1D4ED8",backgroundColor:"rgba(29, 78, 216, 0.08)",pointerEvents:"none",zIndex:99999,transition:"top 0.1s ease-out, left 0.1s ease-out, width 0.1s ease-out, height 0.1s ease-out",borderRadius:"8px"},children:t.jsx("div",{style:{position:"absolute",top:"-24px",left:"0",backgroundColor:"#1D4ED8",color:"white",padding:"2px 8px",borderRadius:"9999px",fontSize:"12px",fontWeight:"bold",whiteSpace:"nowrap"},children:e.name})}):null}const Cb=({initialMessages:e=[],onSendMessage:o,bubbleSize:r="md"})=>{const[n,a]=p.useState(!1),[i,l]=p.useState(!1),[u,c]=p.useState(e),[d,g]=p.useState([]),{highlightedElement:m}=bb({active:i,onSelect:b=>{g(j=>[...j,b]),l(!1),a(!0)},onCancel:()=>{l(!1),a(!0)}}),h=()=>a(!n),f=()=>{l(!0),a(!1)},y=b=>{g(j=>j.filter(x=>x.id!==b))},k=b=>{const j={id:Date.now().toString(),role:"user",content:b,timestamp:new Date,contextElements:[...d]};c(x=>[...x,j]),o==null||o(b,d),g([]),setTimeout(()=>{var S;const x=Math.random()>.7,C=Math.random()>.4,v={id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date,content:x?"I will highlight the selected element.":`I received your message regarding: ${((S=j.contextElements)==null?void 0:S.map(I=>I.name).join(", "))||"general context"}. How can I assist you further?`,messageType:x?"tool":"text",reasoning:C?"Analyzing the user input and context... The user seems to be asking about specific elements. I should tailor my response to the selected context.":void 0};c(I=>[...I,v]),x&&setTimeout(()=>{c(I=>[...I,{id:(Date.now()+2).toString(),role:"assistant",messageType:"system",content:'Tool "highlightElement" executed successfully.',timestamp:new Date}])},800)},1e3)};return t.jsxs(s.View,{position:"fixed",bottom:24,right:24,zIndex:9999,children:[t.jsx(kb,{element:m}),i&&t.jsx(s.View,{position:"fixed",top:24,left:"50%",transform:"translateX(-50%)",backgroundColor:"rgba(0,0,0,0.8)",color:"white",padding:"8px 16px",borderRadius:"24px",zIndex:1e4,boxShadow:"0 4px 6px rgba(0,0,0,0.1)",children:t.jsx(s.Text,{fontWeight:"600",fontSize:"14px",children:"Click an element to select it. Press ESC to cancel."})}),n&&t.jsxs(s.View,{position:"absolute",bottom:60,right:0,width:"400px",height:"600px",marginBottom:"16px",backgroundColor:"rgba(255, 255, 255, 0.8)",backdropFilter:"blur(20px)",borderRadius:"24px",border:"1px solid rgba(255, 255, 255, 0.4)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",overflow:"hidden",animation:"slideUp 0.3s ease-out",style:{animation:"fadeIn 0.2s ease-out",transformOrigin:"bottom right"},children:[t.jsxs(s.View,{padding:"16px",borderBottom:"1px solid rgba(0,0,0,0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",children:[t.jsx(s.Text,{fontWeight:"bold",color:"color-gray-800",children:"ChatWidget Assistant"}),t.jsx(s.View,{as:"button",onClick:()=>a(!1),cursor:"pointer",padding:"4px",borderRadius:"50%",border:"none",backgroundColor:"transparent",_hover:{backgroundColor:"rgba(0,0,0,0.05)"},children:t.jsx(Ue,{widthHeight:16,color:"color-gray-500"})})]}),t.jsx(Ks,{messages:u,onSubmit:k,size:r,variant:"minimal",enableContextPicker:!0,selectedContextElements:d,onContextPickerClick:f,onRemoveContextElement:y,styles:{container:{height:"calc(100% - 60px)",backgroundColor:"transparent"},inputContainer:{backgroundColor:"white",margin:"0 16px 16px 16px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"}}})]}),!i&&t.jsx(s.View,{as:"button",onClick:h,width:"56px",height:"56px",borderRadius:"50%",backgroundColor:"theme-primary",border:"none",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",_hover:{transform:"scale(1.05)"},_active:{transform:"scale(0.95)"},"data-chatwidget-ignore":"true",children:n?t.jsx(Ue,{widthHeight:24,color:"white"}):t.jsx(Wi,{widthHeight:24,color:"white"})})]})},zr=st.create(e=>({visible:!1,title:"",subtitle:"",variant:"info",isClosable:!1,views:{},action:()=>{},actionText:"",showIcon:!1,timeout:3e3,show:(o,r="",n="",a,i,l,u,c,d)=>e({visible:!0,variant:o,title:r,subtitle:n,isClosable:a,views:i,action:l,actionText:u,showIcon:c,timeout:d}),hide:()=>e({visible:!1})})),Xs=(e,o,r,n)=>{zr.getState().show(e,o,r,n==null?void 0:n.isClosable,n==null?void 0:n.views,n==null?void 0:n.action,n==null?void 0:n.actionText,n==null?void 0:n.showIcon,n==null?void 0:n.timeout)},Js=()=>{zr.getState().hide()},Sb={info:{container:{backgroundColor:"color-white",border:"rgba(191, 219, 254, 0.95)"},icon:{color:"theme-primary",name:"InformationIcon"},content:{color:"color-gray-900"},close:{color:"color-gray-500",name:"CloseIcon"}},success:{container:{backgroundColor:"#F0FDF4",border:"#BBF7D0"},icon:{color:"#16A34A",name:"SuccessIcon"},content:{color:"#14532D"},close:{color:"#15803D",name:"CloseIcon"}},error:{container:{backgroundColor:"#FEF2F2",border:"#FECACA"},icon:{color:"#DC2626",name:"ErrorIcon"},content:{color:"#7F1D1D"},close:{color:"#B91C1C",name:"CloseIcon"}},warning:{container:{backgroundColor:"#FFF7ED",border:"#FED7AA"},icon:{color:"#EA580C",name:"WarningIcon"},content:{color:"#9A3412"},close:{color:"#C2410C",name:"CloseIcon"}}},Qs=({variant:e,hide:o,title:r,subtitle:n,theme:a,action:i,actionText:l,showIcon:u=!1,isClosable:c=!1,timeout:d=3e3,views:g})=>{var j,x;p.useEffect(()=>{if(d&&!c){const C=setTimeout(()=>{o()},d);return()=>{clearTimeout(C)}}},[]);const m=a??Sb,h=!!(i&&l),f={borderWidth:1,borderStyle:"solid",borderRadius:12,borderColor:`${m[e].container.border}`,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.06)"},y={info:"#3b82f6",success:"#4ade80",warning:"#f97316",error:"#ef4444"}[e],k={info:t.jsx(xo,{widthHeight:24,color:y,...g==null?void 0:g.icon}),success:t.jsx(Hn,{widthHeight:24,color:y,...g==null?void 0:g.icon}),warning:t.jsx(Fn,{widthHeight:24,color:y,...g==null?void 0:g.icon}),error:t.jsx(vr,{widthHeight:24,color:y,...g==null?void 0:g.icon})}[e],b=u&&k;return t.jsxs(s.Horizontal,{role:"messageContent",gap:12,width:"100%",maxWidth:520,flexWrap:"nowrap",position:"relative",alignItems:"flex-start",padding:"12px 14px",color:`${m[e].content.color}`,backgroundColor:`${m[e].container.backgroundColor}`,onClick:c?()=>{}:()=>{o()},...f,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...g==null?void 0:g.container,children:[b&&k,t.jsxs(s.Vertical,{gap:4,width:"100%",children:[t.jsx(s.Text,{size:"md",weight:"semiBold",...g==null?void 0:g.title,children:r}),n&&t.jsx(s.Text,{size:"sm",lineHeight:"20px",color:m[e].content.color,...g==null?void 0:g.subtitle,children:n})]}),h&&t.jsx(s.View,{as:"button",type:"button",onClick:i,backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:m[e].container.border,borderRadius:"9999px",padding:"6px 12px",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",...g==null?void 0:g.actionText,children:t.jsx(s.Text,{whiteSpace:"nowrap",size:"sm",weight:"semiBold",color:m[e].content.color,children:l})}),c&&t.jsx(s.View,{position:"absolute",zIndex:1e4,right:8,top:8,onClick:()=>{o()},cursor:"pointer",padding:"4px",borderRadius:"9999px",transition:"background-color 0.2s ease",...(j=g==null?void 0:g.closingIcon)==null?void 0:j.container,children:t.jsx(Ue,{widthHeight:16,color:m[e].close.color,...(x=g==null?void 0:g.closingIcon)==null?void 0:x.icon})})]})},wb=({container:e,theme:o,position:r="topRight"})=>{const{visible:n,title:a,variant:i,subtitle:l,isClosable:u,views:c,action:d,actionText:g,showIcon:m,timeout:h}=zr(),f={topLeft:{top:6,left:8},topRight:{top:6,right:8},bottomLeft:{bottom:8,left:6},bottomRight:{bottom:8,right:6}}[r],y=()=>t.jsx(Qs,{variant:i,subtitle:l,show:n,title:a,theme:o,isClosable:u,views:c,action:d,actionText:g,showIcon:m,timeout:h,hide:()=>Js()}),k=e?p.cloneElement(e,{},y()):t.jsx(s.View,{position:"absolute",zIndex:1e4,...f,children:y()});return n?k:null},jb=(e,o)=>{if(typeof document>"u")return;const r=document.createElement("video");r.preload="metadata",r.onloadedmetadata=()=>{r.currentTime=1},r.oncanplay=()=>{const n=document.createElement("canvas");n.width=r.videoWidth,n.height=r.videoHeight;const a=n.getContext("2d");if(a){a.drawImage(r,0,0,n.width,n.height);const i=n.toDataURL("image/jpeg");o(i)}URL.revokeObjectURL(r.src)},r.src=URL.createObjectURL(e)},vb=({maxSize:e=100*1024*1024,onFileSelect:o,onMultipleFileSelect:r,validateFile:n,thumbnail:a,multiple:i=!1,onError:l=u=>{Xs("error","Error",u)}})=>{const u=p.useRef(null),c=p.useRef(null),[d,g]=p.useState(null),[m,h]=p.useState([]),[f,y]=p.useState(null),[k,b]=p.useState(null),[j,x]=p.useState(a||null),C=p.useCallback(S=>{const I=S.target.files;if(y(null),!I||I.length===0){l("No file selected"),y("No file selected");return}if(i){const w=Array.from(I),T=[];for(const R of w){if(R.size>e){l(`File ${R.name} exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File ${R.name} exceeds ${Math.round(e/(1024*1024))}MB.`);continue}if(n){const E=n(R);if(E){l(`${R.name}: ${E}`),y(`${R.name}: ${E}`);continue}}T.push(R)}T.length>0&&(h(T),r&&r(T))}else{const w=I[0];if(w.size>e){l(`File exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File exceeds ${Math.round(e/(1024*1024))}MB.`);return}if(n){const T=n(w);if(T){l(T),y(T);return}}b(URL.createObjectURL(w)),w.type.startsWith("video/")&&jb(w,x),o&&(g(w),o(w))}},[e,o,r,n,i]),v=()=>{const S=u.current;S&&typeof S.click=="function"&&S.click()};return p.useEffect(()=>()=>{typeof URL<"u"&&typeof URL.revokeObjectURL=="function"&&(k&&URL.revokeObjectURL(k),j&&URL.revokeObjectURL(j))},[k,j]),{previewUrl:k,thumbnailUrl:j,errorMessage:f,fileInputRef:u,videoRef:c,selectedFile:d,selectedFiles:m,handleFileChange:C,handleClick:v}},Tb=({accept:e,isLoading:o=!1,progress:r=0,icon:n,text:a,previewUrl:i,thumbnailUrl:l,errorMessage:u,fileInputRef:c,videoRef:d,selectedFile:g,selectedFiles:m,handleFileChange:h,handleClick:f,multiple:y=!1,containerProps:k,errorMessageProps:b,progressProps:j,videoProps:x,imageProps:C,iconProps:v,textProps:S,fileType:I,previewUrl:w,renderError:T=({errorMessage:H,errorMessageProps:V,themeMode:P})=>t.jsx(s.Text,{color:"red",fontSize:12,marginTop:8,...V,...z==null?void 0:z.text,children:H}),renderText:R=({text:H,textProps:V})=>t.jsx(s.Text,{marginTop:8,...V,...z==null?void 0:z.text,children:H}),renderFile:E=({selectedFile:H,textProps:V})=>H?t.jsxs(s.Center,{marginTop:8,gap:10,flexDirection:"column",...z==null?void 0:z.container,children:[t.jsx(s.Text,{maxLines:2,...V,...z==null?void 0:z.text,children:H.name}),t.jsxs(s.Text,{...V,...z==null?void 0:z.text,children:["(",Math.round(H.size/1024)," KB)"]})]}):null,renderVideo:F=({selectedFile:H,videoRef:V,videoProps:P})=>t.jsx(s.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:t.jsx(s.View,{as:"video",width:"100%",height:"100%",src:H?URL.createObjectURL(H):void 0,style:{objectFit:"cover"},ref:V,...P,...z==null?void 0:z.view})}),renderImage:W=({previewUrl:H,imageProps:V})=>(console.log("Rendering image with URL:",H),t.jsx(s.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:t.jsx(s.Image,{src:H,alt:"Preview",width:"100%",height:"100%",objectFit:"cover",style:{maxHeight:"100%",maxWidth:"100%"},...V,...z==null?void 0:z.image})})),renderProgress:M=({progress:H,progressProps:V})=>t.jsxs(s.Horizontal,{gap:8,alignItems:"center",...V,...z==null?void 0:z.horizontal,children:[t.jsx(s.View,{height:4,backgroundColor:"color-black-100",width:"100%",borderRadius:2,...z==null?void 0:z.view,children:t.jsx(s.View,{height:4,width:`${H}%`,borderRadius:2,backgroundColor:"color-dark-50",...z==null?void 0:z.view})}),t.jsxs(s.Text,{fontSize:12,...z==null?void 0:z.text,children:[H,"%"]})]}),views:z={}})=>{const H=w||i;return t.jsxs(s.Center,{onClick:f,cursor:"pointer",border:"1px solid color-black-100",borderRadius:8,padding:16,flexDirection:"column",overflow:"hidden",position:"relative",height:g&&r===100?"200px":"auto",...k,...z==null?void 0:z.container,children:[r===100&&I==="image"&&H&&W({previewUrl:H,imageProps:C}),r===100&&I==="video"&&l&&F({selectedFile:g,thumbnailUrl:l,videoRef:d,videoProps:x,imageProps:C}),r===100&&I==="file"&&g&&E({selectedFile:g,textProps:S}),r<100&&(n||t.jsx(Vn,{widthHeight:32,...v})),!o&&!g&&a&&R({text:a,textProps:S}),o&&M({progress:r,progressProps:j}),!o&&u&&T({errorMessage:u,errorMessageProps:b}),t.jsx(s.Input,{type:"file",ref:c,onChange:h,accept:e,multiple:y,style:{display:"none"},...z==null?void 0:z.view})]})},Wr=({accept:e="*/*",icon:o,text:r,maxSize:n,onFileSelect:a,onMultipleFileSelect:i,validateFile:l,isLoading:u=!1,progress:c=0,fileType:d,multiple:g=!1,...m})=>{const{previewUrl:h,thumbnailUrl:f,errorMessage:y,videoRef:k,fileInputRef:b,selectedFile:j,selectedFiles:x,handleFileChange:C,handleClick:v}=vb({maxSize:n,onFileSelect:a,onMultipleFileSelect:i,validateFile:l,multiple:g}),I=(()=>{if(d)return d;if(j)return j.type.startsWith("image/")?"image":j.type.startsWith("video/")?"video":"file"})();return t.jsx(Tb,{handleClick:v,accept:e,isLoading:u,progress:c,icon:o,text:r,maxSize:n,onFileSelect:a,validateFile:l,errorMessage:y,handleFileChange:C,selectedFile:j,selectedFiles:x,videoRef:k,fileInputRef:b,previewUrl:h,thumbnailUrl:f,fileType:I,multiple:g,...m})};function Ib(e){const o=Math.floor(e/60),r=e%60;return`${o}:${r.toString().padStart(2,"0")}`}function Rb({onAudio:e,recording:o,paused:r,audioBlob:n,analyserNode:a,duration:i,error:l,startRecording:u,stopRecording:c,pauseRecording:d,resumeRecording:g,resetRecording:m,handleFileChange:h,...f}){const[y,k]=p.useState(null);p.useEffect(()=>{if(n){const x=URL.createObjectURL(n);return k({url:x,label:`recording-${Date.now()}.webm`}),()=>{URL.revokeObjectURL(x)}}return()=>{}},[n]);const b=()=>{y!=null&&y.url&&URL.revokeObjectURL(y.url),k(null),m()},j=x=>{e(x),y!=null&&y.url&&URL.revokeObjectURL(y.url),k({url:URL.createObjectURL(x),label:x.name})};return t.jsxs(s.Vertical,{gap:"10px",width:"100%",...f,children:[t.jsxs(s.Horizontal,{gap:12,alignItems:"center",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[t.jsx(Wr,{accept:"audio/*",icon:t.jsx(Ht,{widthHeight:16}),maxSize:100*1024*1024,onFileSelect:j,fileType:"file",multiple:!1,renderError:({errorMessage:x})=>null,views:{container:{width:"36px",height:"36px",cursor:"pointer",border:"1px solid color-gray-200",borderRadius:"10px",backgroundColor:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"}}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"10px",width:"36px",height:"36px"},validateFile:x=>x.size>100*1024*1024?"File size exceeds 100MB limit":x.type.startsWith("audio/")?null:"Only audio files are allowed"}),t.jsx(s.View,{as:"button",type:"button",onClick:o?c:u,width:"36px",height:"36px",minWidth:"36px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"theme-primary",color:"color-white",borderRadius:"999px",border:"0",cursor:"pointer",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.92},children:o?t.jsx(jr,{widthHeight:14,color:"color-white",filled:!1}):t.jsx(Mn,{widthHeight:18,color:"color-white",filled:!1})}),t.jsx(s.View,{flex:1,minWidth:120,children:t.jsx(Dn,{analyserNode:o?a:null,isPaused:!o||r})}),t.jsx(s.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",whiteSpace:"nowrap",children:Ib(i)})]}),y&&!o&&t.jsxs(s.Vertical,{gap:"8px",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[t.jsxs(s.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:8,children:[t.jsx(s.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:y.label}),t.jsx(s.View,{as:"button",type:"button",onClick:b,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"0",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",children:t.jsx(Ue,{widthHeight:14,color:"currentColor"})})]}),t.jsx(s.View,{as:"audio",controls:!0,src:y.url,width:"100%"})]}),l&&t.jsx(s.Text,{fontSize:"11px",lineHeight:"16px",color:"theme-error",children:l})]})}function Zs(){const[e,o]=p.useState(!1),[r,n]=p.useState(!1),[a,i]=p.useState(0),[l,u]=p.useState(null),[c,d]=p.useState(null),[g,m]=p.useState(null),h=p.useRef(null),f=p.useRef(null),y=p.useRef(null),k=p.useRef(null),b=p.useRef([]),j=p.useRef(null),x=typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm",C=p.useCallback(()=>{h.current&&(h.current.state!=="inactive"&&h.current.stop(),h.current=null),k.current&&(k.current.getTracks().forEach(R=>R.stop()),k.current=null),f.current&&(f.current.close(),f.current=null),y.current&&(y.current.disconnect(),y.current=null),d(null),j.current&&(clearInterval(j.current),j.current=null)},[]),v=p.useCallback(async()=>{C(),u(null),i(0),b.current=[];try{const R=await navigator.mediaDevices.getUserMedia({audio:!0});k.current=R;const E=MediaRecorder.isTypeSupported(x)?x:void 0,F=new MediaRecorder(R,E?{mimeType:E}:void 0);h.current=F;const W=new(window.AudioContext||window.webkitAudioContext);f.current=W;const M=W.createMediaStreamSource(R),z=W.createAnalyser();z.fftSize=256,z.smoothingTimeConstant=.8,M.connect(z),y.current=z,d(z),F.ondataavailable=H=>{H.data.size>0&&b.current.push(H.data)},F.onstop=()=>{const H=new Blob(b.current,{type:F.mimeType||x});m(H),C()},F.start(),o(!0),n(!1),j.current=setInterval(()=>{i(H=>H+1)},1e3)}catch{u("Microphone access denied or unavailable."),C()}},[C]),S=p.useCallback(()=>{h.current&&h.current.state!=="inactive"&&h.current.stop(),o(!1),n(!1),j.current&&(clearInterval(j.current),j.current=null)},[]),I=p.useCallback(()=>{h.current&&h.current.state==="recording"&&(h.current.pause(),n(!0),j.current&&(clearInterval(j.current),j.current=null))},[]),w=p.useCallback(()=>{h.current&&h.current.state==="paused"&&(h.current.resume(),n(!1),j.current||(j.current=setInterval(()=>{i(R=>R+1)},1e3)))},[]),T=p.useCallback(()=>{C(),o(!1),n(!1),m(null),i(0),u(null),b.current=[]},[C]);return p.useEffect(()=>()=>C(),[C]),{recording:e,paused:r,audioBlob:g,analyserNode:c,duration:a,error:l,startRecording:v,stopRecording:S,pauseRecording:I,resumeRecording:w,resetRecording:T}}function Fb(e){const{onAudio:o}=e,{recording:r,paused:n,audioBlob:a,analyserNode:i,duration:l,error:u,startRecording:c,stopRecording:d,pauseRecording:g,resumeRecording:m,resetRecording:h}=Zs();return p.useEffect(()=>{if(a&&o){const y=new File([a],"recording.webm",{type:a.type||"audio/webm;codecs=opus"});o(y)}},[a,o]),{recording:r,paused:n,audioBlob:a,analyserNode:i,duration:l,error:u,startRecording:c,stopRecording:d,pauseRecording:g,resumeRecording:m,resetRecording:h,handleFileChange:y=>{var b;const k=(b=y.target.files)==null?void 0:b[0];k&&o&&o(k)}}}function Mb(e){const o=Fb(e);return t.jsx(Rb,{...e,...o})}const ec=e=>{const{value:o,onChange:r,onSubmit:n,autoFocus:a=!0,loading:i=!1,disabled:l=!1,isAgentRunning:u=!1,onStopAgent:c,sandboxId:d,onUploadProgress:g,onUploadSuccess:m,onUploadError:h,onFileUpload:f}=e,y=o!==void 0&&r!==void 0,[k,b]=p.useState(""),j=y?o:k,[x,C]=p.useState([]),[v,S]=p.useState([]),[I,w]=p.useState(!1),[T,R]=p.useState(0),[E,F]=p.useState([]),[W,M]=p.useState(!1),z=p.useRef(null),[H,V]=p.useState(!1),[P,L]=p.useState("gpt-4"),[B]=p.useState([{id:"gpt-3.5-turbo",name:"GPT-3.5"},{id:"gpt-4",name:"GPT-4"},{id:"gpt-4-thinking",name:"GPT-4 (Thinking)",isThinking:!0},{id:"claude-3-5-sonnet",name:"Claude 3.5 Sonnet"}]),$=p.useRef(null),q=p.useRef(null),Y=p.useRef(null),[O,J]=p.useState(e.showGuideTip||!1);p.useEffect(()=>{a&&$.current&&$.current.focus()},[a]),p.useEffect(()=>()=>{x.forEach(le=>{})},[x]);const D=le=>{y&&r?r(le):b(le)},A=le=>{const se=Y.current;if(se&&typeof Event<"u"){se.value=le,se.dispatchEvent(new Event("input",{bubbles:!0}));return}D(le)},_=le=>{if(le.preventDefault(),!j.trim()&&x.length===0||i||l&&!u)return;if(u&&c){c();return}let se=j;if(x.length>0){const Q=x.map(te=>`[Uploaded File: ${URL.createObjectURL(te)}}]`).join(`
89
- `);se=se?`${se}
55
+ `:p.key.length===1&&!p.altKey?p.key:null;if(A!==null){p.preventDefault(),e.replace(A,R,p.key.length===1),x();return}}}},I=p=>{var W;const w=y(p.target);if(!w||e.locked||p.isComposing||s.current)return;if(p.inputType==="historyUndo"||p.inputType==="historyRedo"){p.cancelable&&(p.preventDefault(),e.undo(p.inputType==="historyRedo"));return}const R=u(w);if(R){const A=S(w,p.inputType,R);if(A){e.capture(R),p.cancelable?(p.preventDefault(),e.commit(A.value,A.selection),x()):f.current=A;return}}if(!R||!j(R))return;const B=(W=p.inputType)!=null&&W.startsWith("delete")?"":["insertParagraph","insertLineBreak"].includes(p.inputType)?`
90
56
 
91
- ${Q}`:Q}let re=P,pe=!1;P.endsWith("-thinking")&&(re=P.replace(/-thinking$/,""),pe=!0),n==null||n(se,{model_name:re,enable_thinking:pe}),y||b(""),C([]),S([])},G=le=>{C(se=>se.filter((re,pe)=>pe!==le)),!d&&v.length>le&&S(se=>se.filter((re,pe)=>pe!==le))},N=le=>{le.preventDefault(),le.stopPropagation(),V(!0)},ee=le=>{le.preventDefault(),le.stopPropagation(),V(!1)},oe=p.useCallback(le=>{!le||le.length===0||(S(se=>[...se,...le]),C(se=>[...se,...le]),F(se=>[...se,...le]),w(!0))},[S,C]),ie=p.useCallback(()=>{if(E.length>0&&!W&&f){M(!0);const le=E[0];z.current=le,R(0),g==null||g(0);try{f(le),F(se=>se.slice(1)),M(!1),z.current=null,R(100),g==null||g(100),m==null||m({file:le})}catch(se){F(re=>re.slice(1)),M(!1),z.current=null,R(0),w(re=>E.length-1>0||!1),h==null||h(se)}}else E.length===0&&I&&(w(!1),R(0))},[E,W,f,I,h,g,m]);p.useEffect(()=>{ie()},[E,W,ie]);const K="active",ae=le=>!0,de=()=>{J(!1),e.onGuideClose&&e.onGuideClose()},fe=le=>{y&&r?r(le.text):b(le.text),e.onPromptExampleSelect&&e.onPromptExampleSelect(le),$.current&&$.current.focus()},Ie=p.useCallback(()=>v,[v]),ce=p.useCallback(()=>S([]),[]);return{onSubmit:n,getPendingFiles:Ie,clearPendingFiles:ce,value:j,handleChange:D,setValue:A,handleSubmit:_,editableRef:$,fileInputRef:q,hiddenInputRef:Y,isUploading:I,uploadProgress:T,isDraggingOver:H,uploadedFiles:x,pendingFiles:v,removeUploadedFile:G,setPendingFiles:S,setUploadedFiles:C,setIsUploading:w,startUpload:oe,selectedModel:P,handleModelChange:L,modelOptions:B,subscriptionStatus:K,canAccessModel:ae,handleDragOver:N,handleDragLeave:ee,isGuideTipShown:O,hideGuideTip:de,handlePromptExampleSelect:fe}},zb={attachmentRemove:{position:"absolute",top:"2px",right:"2px",width:"20px",height:"20px",borderRadius:"50%",backgroundColor:"color-black-900",color:"white",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"12px",zIndex:1}},Ga={container:{width:"100%",maxWidth:"100%",borderRadius:"12px",backgroundColor:"color-white",transition:"background-color 0.2s ease, box-shadow 0.2s ease"},content:{width:"100%",padding:"12px",borderRadius:"12px",backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}},Wb={default:{borderRadius:"8px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"}},Eb={xs:{fontSize:"10px",padding:"4px 8px"},sm:{fontSize:"12px",padding:"6px 10px"},md:{fontSize:"14px",padding:"8px 12px"},lg:{fontSize:"16px",padding:"10px 14px"},xl:{fontSize:"20px",padding:"12px 16px"}},Ab={default:{backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"},outline:{backgroundColor:"transparent",borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"},none:{backgroundColor:"transparent",border:"none"}},Hb=({files:e,sandboxId:o,onRemove:r,layout:n="inline",maxHeight:a="120px",showPreviews:i=!1,views:l={}})=>{if(e.length===0)return null;const u=p.useCallback(d=>d<1024?`${d} B`:d<1024*1024?`${(d/1024).toFixed(1)} KB`:`${(d/(1024*1024)).toFixed(1)} MB`,[]),c=p.useCallback(d=>d.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:d.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:d.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return t.jsx(s.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...l==null?void 0:l.container,children:e.map((d,g)=>{const m=(d==null?void 0:d.path)||(d==null?void 0:d.url)||(i?URL.createObjectURL(d):""),h=d.type.startsWith("image/"),f=d.type.startsWith("video/"),y=d.type.startsWith("audio/"),k=c(d);return i?t.jsx(s.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...l==null?void 0:l.item,children:i&&t.jsxs(Oe,{children:[t.jsxs(Oe.Trigger,{children:[h&&t.jsx(s.Image,{src:m,alt:d.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),f&&t.jsx(s.View,{as:"video",src:m,alt:d.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&t.jsx(s.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:t.jsx(nt,{widthHeight:24,color:"color-black"})}),!h&&!f&&!y&&t.jsx(s.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:t.jsx(Mo,{widthHeight:24,color:"color-black"})}),r&&t.jsx(s.Button,{...zb.attachmentRemove,onClick:b=>{b.stopPropagation(),r(g)},"aria-label":`Remove ${d.name}`,children:"×"})]}),t.jsxs(Oe.Content,{children:[h&&t.jsx(s.Image,{src:m,alt:d.name,maxWidth:"100%"}),f&&t.jsx(s.View,{as:"video",src:m,controls:!0,maxWidth:"100%"}),y&&t.jsx(s.View,{as:"audio",src:m,controls:!0,width:"100%"}),t.jsxs(s.Text,{marginTop:"4px",maxLines:1,width:"100%",...l==null?void 0:l.name,children:[d.name," (",u(d.size),")"]})]})]})},g):t.jsxs(s.Horizontal,{alignItems:"center",gap:"8px",padding:"6px 10px 6px 8px",borderRadius:"9999px",border:"1px solid #E2E8F0",backgroundColor:"color-white",maxWidth:"100%",animate:{from:{opacity:0,scale:.96},to:{opacity:1,scale:1}},animationDuration:.2,...l==null?void 0:l.item,children:[t.jsx(s.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:k.backgroundColor,color:k.color,children:y?t.jsx(nt,{widthHeight:12,color:"currentColor"}):t.jsx(Mo,{widthHeight:12,color:"currentColor"})}),t.jsxs(s.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...l==null?void 0:l.name,children:[d.name," · ",u(d.size)]}),r&&t.jsx(s.View,{as:"button",type:"button",onClick:()=>r(g),"aria-label":`Remove ${d.name}`,display:"flex",alignItems:"center",justifyContent:"center",width:"16px",height:"16px",minWidth:"16px",border:"none",backgroundColor:"transparent",color:"color-gray-400",padding:0,cursor:"pointer",transition:"color 0.2s ease, opacity 0.2s ease",_hover:{color:"color-gray-600"},children:"×"})]},g)})})},Ya=typeof window<"u"?p.useLayoutEffect:p.useEffect,oc=p.forwardRef(({value:e,onChange:o,placeholder:r="Type your message...",disabled:n=!1,autoFocus:a=!0,suggestions:i=[],onSuggestionSelect:l,showSuggestions:u=!1,mentionData:c=[],mentionTrigger:d="@",onMentionSelect:g,onKeyDown:m,maxHeight:h="200px",minHeight:f="40px",name:y,id:k,hiddenInput:b=!0,hiddenInputRef:j,views:x={}},C)=>{var re,pe;const v=p.useRef(e),[S,I]=p.useState(-1),[w,T]=p.useState(!e),R=p.useRef(null),[E,F]=p.useState(!1),[W,M]=p.useState(!1),[z,H]=p.useState(""),[V,P]=p.useState(-1),[L,B]=p.useState(-1),[$,q]=p.useState([]),{ref:Y,relation:O}=s.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[J,D]=p.useState({x:0,y:0}),[A,_]=p.useState({x:0,y:0}),G=p.useRef(null),N=p.useCallback(Q=>{G.current=Q,typeof j=="function"?j(Q):j&&(j.current=Q)},[j]),ee=p.useCallback(Q=>{G.current&&G.current.value!==Q&&(G.current.value=Q)},[]);Ya(()=>{const Q=C;Q!=null&&Q.current&&e!==v.current&&(Q.current.textContent=e,v.current=e,T(!e)),ee(e)},[e,C,ee]);const oe=p.useCallback(Q=>{if(Q===v.current)return;const te=C;te!=null&&te.current&&te.current.textContent!==Q&&(te.current.textContent=Q),v.current=Q,T(!Q),ee(Q),o(Q)},[o,C,ee]);Ya(()=>{const Q=G.current;if(!Q)return;const te=()=>oe(Q.value);return Q.addEventListener("input",te),Q.addEventListener("change",te),()=>{Q.removeEventListener("input",te),Q.removeEventListener("change",te)}},[oe,b]),p.useEffect(()=>{a&&C&&typeof C=="object"&&C.current&&C.current.focus()},[a,C]);const ie=()=>{const Q=window.getSelection();if(!Q||Q.rangeCount===0)return-1;const te=Q.getRangeAt(0),be=te.cloneRange();return be.selectNodeContents(C&&typeof C=="object"&&C.current?C.current:document.body),be.setEnd(te.endContainer,te.endOffset),be.toString().length},K=p.useCallback((Q,te)=>{const be=Q.substring(0,te),xe=be.lastIndexOf(d);if(xe!==-1){const ye=be.substring(xe+1);if(!ye.includes(" ")){const Ve=ye.toLowerCase(),Pe=c.filter(De=>De.name.toLowerCase().includes(Ve));H(Ve),P(xe),q(Pe),M(Pe.length>0),B(0);const Me=ae();D(Me);return}}M(!1),H(""),P(-1),B(-1)},[c,d]);p.useEffect(()=>{R.current&&Y&&(Y.current=R.current)},[R,Y]);const ae=p.useCallback((Q=200)=>{if(!R.current)return{x:0,y:0};const te=R.current.getBoundingClientRect();if(O){const he=O.space.vertical==="top";return{x:te.left,y:he?te.top-Q-8:te.bottom+8}}const be=window.innerHeight,xe={top:te.top,bottom:be-te.bottom},ye=xe.bottom<Q+8&&xe.top>xe.bottom;return{x:te.left,y:ye?te.top-Q-8:te.bottom+8}},[O]),de=p.useCallback(()=>{F(!0);const Q=ae();_(Q)},[ae]),fe=p.useCallback(()=>{setTimeout(()=>{F(!1),I(-1)},150)},[]),Ie=Q=>{const te=Q.currentTarget.textContent||"";if(te!==v.current){o(te),v.current=te,ee(te),T(!te);const be=ie();K(te,be)}},ce=p.useCallback(Q=>{if(C&&typeof C=="object"&&C.current){const te=C.current.textContent||"",be=te.substring(0,V),xe=te.substring(V+d.length+z.length),ye=be+d+Q.name+" "+xe;o(ye),v.current=ye,ee(ye),C.current.textContent=ye;const he=be.length+d.length+Q.name.length+1;setTimeout(()=>{var Ve;if(C.current){const Pe=document.createRange(),Me=window.getSelection(),De=C.current.firstChild;De&&Me&&(Pe.setStart(De,Math.min(he,((Ve=De.textContent)==null?void 0:Ve.length)||0)),Pe.collapse(!0),Me.removeAllRanges(),Me.addRange(Pe))}},0)}M(!1),H(""),P(-1),B(-1),g&&g(Q)},[V,d,z,o,g,C,ee]),le=p.useCallback(Q=>{l&&l(Q),I(-1)},[l]),se=Q=>{if(!(m&&(m(Q),Q.defaultPrevented))){if(W&&$.length>0){if(Q.key==="ArrowDown"){Q.preventDefault(),B(te=>te<$.length-1?te+1:0);return}if(Q.key==="ArrowUp"){Q.preventDefault(),B(te=>te>0?te-1:$.length-1);return}if((Q.key==="Tab"||Q.key==="Enter")&&L>=0){Q.preventDefault(),ce($[L]);return}if(Q.key==="Escape"){M(!1),B(-1);return}}if(u&&i.length>0){if(Q.key==="ArrowDown"){Q.preventDefault(),I(te=>te<i.length-1?te+1:0);return}if(Q.key==="ArrowUp"){Q.preventDefault(),I(te=>te>0?te-1:i.length-1);return}if(Q.key==="Tab"&&S>=0){Q.preventDefault(),le(i[S]);return}if(Q.key==="Escape"){I(-1);return}}}};return t.jsxs(s.View,{ref:R,width:"100%",position:"relative",...x==null?void 0:x.container,children:[t.jsxs(s.View,{width:"100%",minHeight:f,maxHeight:h,overflowY:"auto",position:"relative",children:[w&&t.jsx(s.Text,{position:"absolute",top:"8px",left:"8px",color:"color-gray-400",pointerEvents:"none",fontSize:"14px",zIndex:1,...x==null?void 0:x.placeholder,children:r}),t.jsx(s.View,{as:"div",ref:C,contentEditable:!n,suppressContentEditableWarning:!0,onInput:Ie,onKeyDown:se,onFocus:de,onBlur:fe,role:"textbox","aria-multiline":"true","aria-placeholder":r,width:"100%",minHeight:"24px",padding:"8px",outline:"none",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"14px",color:"color-gray-900",backgroundColor:"transparent",...x==null?void 0:x.input})]}),b&&t.jsx(s.View,{as:"textarea",ref:N,id:k,name:y,defaultValue:e,disabled:n,tabIndex:-1,"aria-hidden":"true","data-editable-input-mirror":"true",opacity:0,width:1,height:1,padding:0,border:"none",resize:"none",overflow:"hidden",position:"absolute",bottom:0,left:0,pointerEvents:"none",...x==null?void 0:x.hiddenInput}),W&&$.length>0&&t.jsx(s.View,{position:"fixed",left:J.x,top:J.y,width:((re=R.current)==null?void 0:re.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-blue-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9999,maxHeight:"200px",overflowY:"auto",...x==null?void 0:x.mentionContainer,children:t.jsxs(s.Vertical,{gap:0,children:[$.map((Q,te)=>t.jsx(s.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:te===L?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>ce(Q),onMouseEnter:()=>B(te),_hover:{backgroundColor:"color-blue-50"},...x==null?void 0:x.mentionItem,children:t.jsxs(s.Vertical,{gap:4,children:[t.jsxs(s.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:[d,Q.name]}),Q.description&&t.jsx(s.Text,{fontSize:"12px",color:"color-gray-600",children:Q.description})]})},Q.id)),process.env.NODE_ENV==="development"&&t.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Mentions (Trigger: ",d,")",O&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),"Space: ",O.space.vertical,"-",O.space.horizontal]})]})]})}),u&&i.length>0&&!W&&E&&!e&&t.jsx(s.View,{position:"fixed",left:A.x,top:A.y,width:((pe=R.current)==null?void 0:pe.offsetWidth)||300,backgroundColor:"color-white",border:"2px solid",borderColor:"color-green-300",borderRadius:"8px",boxShadow:"0 8px 24px rgba(0, 0, 0, 0.15)",zIndex:9998,maxHeight:"200px",overflowY:"auto",...x==null?void 0:x.suggestionsContainer,children:t.jsxs(s.Vertical,{gap:0,children:[i.map((Q,te)=>t.jsx(s.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:te===S?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>le(Q),onMouseEnter:()=>I(te),_hover:{backgroundColor:"color-blue-50"},...x==null?void 0:x.suggestionItem,children:t.jsxs(s.Vertical,{gap:4,children:[t.jsx(s.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:Q.text}),Q.description&&t.jsx(s.Text,{fontSize:"12px",color:"color-gray-600",children:Q.description})]})},Q.id)),process.env.NODE_ENV==="development"&&t.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Suggestions (Focus-triggered)",O&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),"Space: ",O.space.vertical,"-",O.space.horizontal]})]})]})})]})});oc.displayName="EditableInput";const Vb=({examples:e,onSelect:o,views:r={}})=>{const{getColor:n}=s.useTheme();return!e||e.length===0?null:t.jsx(s.Horizontal,{gap:8,overflowX:"auto",padding:"8px 0",width:"100%",...r==null?void 0:r.container,children:e.map(a=>t.jsx(s.View,{as:"button",type:"button",padding:"8px 12px",borderRadius:"9999px",backgroundColor:"color-white",border:"1px solid #E2E8F0",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",onClick:()=>o(a),_hover:{backgroundColor:"#F8FAFC",borderColor:"#CBD5E1"},...r==null?void 0:r.item,children:t.jsx(s.Text,{fontSize:"14px",color:"color-gray-700",...r==null?void 0:r.text,children:a.text})},a.id))})},Pb=({onRecordingComplete:e,onRecordingStart:o,views:r={}})=>{const{recording:n,paused:a,audioBlob:i,analyserNode:l,startRecording:u,stopRecording:c}=Zs();p.useEffect(()=>{if(i){const g=new File([i],`recording-${Date.now()}.webm`,{type:i.type||"audio/webm;codecs=opus"});e(g)}},[i]);const d=p.useCallback(()=>{u(),o==null||o()},[]);return t.jsxs(s.Horizontal,{alignItems:"center",gap:4,children:[t.jsx(s.View,{minWidth:90,children:n&&l&&t.jsx(Dn,{analyserNode:l,isPaused:a})}),t.jsx(s.View,{as:"button",type:"button",onClick:n?c:d,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:n?"theme-error":"color-gray-100",color:n?"color-white":"color-gray-600",borderRadius:"50%",border:"none",cursor:"pointer",_hover:{backgroundColor:n?"color-red-600":"color-gray-200"},...r.button,children:n?t.jsx(jr,{widthHeight:16,color:"currentColor",filled:!1}):t.jsx(Mn,{widthHeight:16,color:"currentColor",filled:!1})})]})},tc=p.memo(({onSubmit:e,placeholder:o="Type your message… use @ to mention",loading:r=!1,disabled:n=!1,isDisabled:a,rightElement:i,onKeyDown:l,isAgentRunning:u=!1,enableAudioRecording:c=!1,leftButtons:d,rightButtons:g,onStopAgent:m,loadingText:h="Agent is working...",autoFocus:f=!0,sandboxId:y,hideAttachments:k=!1,attachmentText:b="",promptExamples:j=[],suggestions:x=[],errorMessage:C,size:v="md",shape:S="rounded",variant:I="default",views:w={},mentionData:T=[],mentionTrigger:R="@",onMentionSelect:E,onAudioRecordingStart:F,onAudioRecordingStop:W,showGuideTip:M,guideVideoUrl:z,onGuideClose:H,onFileBrowse:V,onUploadProgress:P,onUploadSuccess:L,onUploadError:B,onFileUpload:$,onPromptExampleSelect:q,name:Y,hiddenInput:O=!0,value:J,handleChange:D,setValue:A,handleSubmit:_,editableRef:G,fileInputRef:N,hiddenInputRef:ee,isUploading:oe,uploadProgress:ie,isDraggingOver:K,uploadedFiles:ae,pendingFiles:de,getPendingFiles:fe,clearPendingFiles:Ie,removeUploadedFile:ce,setPendingFiles:le,setUploadedFiles:se,setIsUploading:re,startUpload:pe,selectedModel:Q,handleModelChange:te,modelOptions:be,subscriptionStatus:xe,canAccessModel:ye,isGuideTipShown:he,hideGuideTip:Ve,handlePromptExampleSelect:Pe,handleDragOver:Me,handleDragLeave:De,onChange:mt,...$o})=>{s.useTheme();const io=p.useMemo(()=>({...Ga.container,...Wb[S],...w==null?void 0:w.container}),[S,w==null?void 0:w.container]),Lo=p.useMemo(()=>({...Ga.content,...Eb[v],...Ab[I],...w==null?void 0:w.content}),[v,I,w==null?void 0:w.content]),Ze=((J==null?void 0:J.trim().length)??0)>0||ae.length>0,Bo=p.useCallback(ne=>{pe([ne]),W==null||W(ne)},[pe,W]),gt=p.useCallback(ne=>{const ue=ne.filter(ge=>ge.size>52428800?(console.error(`File size exceeds 50MB limit: ${ge.name}`),!1):!0);ue.length>0&&pe(ue)},[pe]),U=p.useCallback(ne=>{if(ne.preventDefault(),ne.stopPropagation(),De(ne),ne.dataTransfer.files.length>0){const ue=Array.from(ne.dataTransfer.files);gt(ue)}},[De,gt]),X=p.useMemo(()=>[...T||[],...ae.map((ne,ue)=>({id:`file-${ue}`,name:ne.name}))],[T,ae]);return t.jsxs(s.View,{display:"flex",flexDirection:"column",boxSizing:"border-box",...io,...$o,onDragOver:Me,onDragLeave:De,onDrop:U,children:[j.length>0&&t.jsx(Vb,{examples:j,onSelect:Pe,views:{container:w==null?void 0:w.promptExamples,item:w==null?void 0:w.promptExampleItem}}),u&&t.jsxs(s.Horizontal,{justifyContent:"center",alignItems:"center",gap:8,padding:"8px 0",animate:{from:{opacity:0,y:-10},to:{opacity:1,y:0},duration:"0.3s"},...w==null?void 0:w.loadingIndicator,children:[t.jsx(Wn,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),t.jsx(s.Text,{color:"color-gray-500",children:h})]}),t.jsx(s.View,{position:"relative",width:"100%",overflow:"visible",children:t.jsxs(s.View,{as:"form",onSubmit:_,overflow:"visible",display:"flex",flexDirection:"column",position:"relative",...Lo,...io,paddingHorizontal:16,paddingVertical:10,backgroundColor:K?"color-blue-50":void 0,children:[t.jsx(Hb,{files:ae,sandboxId:y,onRemove:ce,showPreviews:!0,views:{container:w==null?void 0:w.attachments,item:w==null?void 0:w.attachmentItem,name:w==null?void 0:w.attachmentName,size:w==null?void 0:w.attachmentSize,removeButton:w==null?void 0:w.attachmentRemove}}),t.jsx(oc,{ref:G,value:J||"",onChange:D,placeholder:o,disabled:n&&!u,autoFocus:f,onKeyDown:l,suggestions:x||[],showSuggestions:x&&x.length>0&&!J,onSuggestionSelect:ne=>{D(ne.text)},mentionData:X,mentionTrigger:R,onMentionSelect:E,name:Y,hiddenInput:O,hiddenInputRef:ee,views:{container:{},input:w==null?void 0:w.editableInput,hiddenInput:w==null?void 0:w.hiddenInput}}),t.jsxs(s.Horizontal,{justifyContent:"space-between",alignItems:"center",marginTop:"8px",children:[t.jsxs(s.Horizontal,{gap:8,alignItems:"center",children:[!k&&t.jsx(s.View,{display:"contents",onClickCapture:V?ne=>{ne.target.tagName==="INPUT"&&V()}:void 0,children:t.jsx(Wr,{accept:"*/*",icon:t.jsx(Ht,{widthHeight:16}),maxSize:50*1024*1024,multiple:!0,onMultipleFileSelect:gt,isLoading:oe,progress:ie||0,text:b,fileType:"file",renderError:({errorMessage:ne})=>null,views:{container:{height:"36px",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},...w==null?void 0:w.fileButton}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,borderRadius:S==="rounded"?"50%":4,padding:10},textProps:{fontSize:"14px",color:"color-gray-600"},validateFile:ne=>ne.size>50*1024*1024?"File size exceeds 50MB limit":null})}),d]}),t.jsxs(s.Horizontal,{gap:8,alignItems:"center",children:[i,c&&t.jsx(Pb,{onRecordingStart:F,onRecordingComplete:Bo,views:{button:w==null?void 0:w.recordButton}}),t.jsx(s.View,{as:"button",type:"button",onClick:_,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:u?"theme-error":Ze?"theme-primary":"color-gray-300",color:"color-white",borderRadius:S==="rounded"?"50%":4,border:"none",cursor:Ze?"pointer":"not-allowed",disabled:!Ze||r||n&&!u,transition:"background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease",_hover:{opacity:Ze||u?.9:1},_active:{opacity:Ze||u?.95:1},_focusVisible:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},...w==null?void 0:w.submitButton,children:u?t.jsx(jr,{widthHeight:16,color:"currentColor",filled:!1}):r?t.jsx(ho,{type:"quarter",size:16,color:"color-white"}):t.jsx(zn,{widthHeight:16,color:"currentColor",filled:!1})}),g]})]})]})}),C&&t.jsx(s.Text,{color:"theme-error",marginTop:"4px",...w==null?void 0:w.bottomTip,children:C})]})}),rc=p.forwardRef((e,o)=>{const r={...e,isAgentRunning:e.isAgentRunning??e.isWorkerRunning,onStopAgent:e.onStopAgent??e.onStopWorker,disabled:e.disabled??e.isDisabled},n=ec(r);return p.useImperativeHandle(o,()=>({getValue:()=>{var a,i;return((a=n.hiddenInputRef.current)==null?void 0:a.value)??((i=n.editableRef.current)==null?void 0:i.textContent)??n.value??""},setValue:n.setValue,clear:()=>n.setValue(""),focus:()=>{var a;return(a=n.editableRef.current)==null?void 0:a.focus()},blur:()=>{var a;return(a=n.editableRef.current)==null?void 0:a.blur()},getElement:()=>n.editableRef.current,getInputElement:()=>n.hiddenInputRef.current})),t.jsx(tc,{...r,...n})});rc.displayName="ChatInput";const Ka={xs:"320px",sm:"380px",md:"480px",lg:"640px",xl:"768px",full:"100%"},Db={left:{top:0,left:0,bottom:0,height:"100vh",borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{top:0,right:0,bottom:0,height:"100vh",borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"},top:{top:0,left:0,right:0,width:"100vw",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},bottom:{bottom:0,left:0,right:0,width:"100vw",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200"}},aa=({isOpen:e,onClose:o,isClosePrevented:r,blur:n,children:a,...i})=>{const l=()=>{r||o()};return p.useEffect(()=>{const u=c=>{c.key==="Escape"&&e&&!r&&o()};return e&&document.addEventListener("keydown",u),()=>{document.removeEventListener("keydown",u)}},[e,r,o]),t.jsx(s.View,{"data-testid":"drawer-overlay",role:"dialog","aria-modal":"true",position:"fixed",top:0,left:0,right:0,bottom:0,zIndex:1e3,visibility:e?"visible":"hidden",onClick:l,opacity:e?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease, background-color 0.2s ease",backgroundColor:e?"color-dark-50-360":"transparent",backdropFilter:n?`blur(${n}px)`:void 0,pointerEvents:e?"auto":"none",...i,children:a})},ia=({placement:e="right",size:o="md",isOpen:r=!1,children:n,...a})=>{const i=g=>{g.stopPropagation()},u=e==="top"||e==="bottom"?{height:o==="full"?"100vh":Ka[o]||o,maxHeight:"100vh"}:{width:o==="full"?"100vw":Ka[o]||o,maxWidth:"100vw"},c=e==="left"?"0 12px 12px 0":e==="right"?"12px 0 0 12px":e==="top"?"0 0 12px 12px":"12px 12px 0 0",d=r?"translate3d(0, 0, 0)":e==="left"?"translate3d(-100%, 0, 0)":e==="right"?"translate3d(100%, 0, 0)":e==="top"?"translate3d(0, -100%, 0)":"translate3d(0, 100%, 0)";return t.jsx(s.Vertical,{position:"absolute",backgroundColor:"color-white",borderRadius:c,...Db[e],...u,onClick:i,transform:d,willChange:"transform",transition:"transform 0.24s ease, box-shadow 0.2s ease",boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",...a,children:n})},$b=({children:e,onClose:o,buttonPosition:r="right",...n})=>{const a=o&&t.jsx(s.View,{onClick:o,cursor:"pointer",padding:8,children:t.jsx(Ue,{widthHeight:20,color:"color-gray-500"})});return t.jsxs(s.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderBottomWidth:"1px",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:r==="none"?"center":"space-between",...n,children:[r==="left"&&a,e,r==="right"&&a]})},Lb=({children:e,...o})=>t.jsx(s.Vertical,{padding:24,flex:1,overflowY:"auto",...o,children:e}),Bb=({children:e,...o})=>t.jsx(s.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderTopWidth:"1px",borderTopColor:"color-gray-200",alignItems:"center",justifyContent:"flex-end",gap:12,...o,children:e}),bo=st.create(e=>({drawers:[],onHide:o=>o,onShow:(o,r)=>({name:o,props:r}),show:(o,r={},n={})=>{e(a=>({...a,drawers:[...a.drawers,{name:o,props:{...r,isOpen:!1},overlayProps:n}]}))},hide:o=>{e(r=>o?{...r,drawers:r.drawers.filter(n=>n.name!==o)}:{drawers:[]})},setOnHide:o=>{e(r=>({...r,onHide:o}))},setOnShow:o=>{e(r=>({...r,onShow:o}))}})),_b=(e,o={},r={})=>{const n=bo.getState();n.hide(e),n.show(e,o,r),n.onShow(e,o),queueMicrotask(()=>{bo.setState(a=>({drawers:a.drawers.map(i=>i.name===e?{...i,props:{...i.props,isOpen:!0}}:i)}))})},nc=e=>{bo.getState().onHide(e),bo.getState().hide(typeof e=="string"?e:void 0)},Ob=({drawers:e,onShow:o,onHide:r})=>{const n=bo(a=>a.drawers);return p.useEffect(()=>{o&&bo.getState().setOnShow(o)},[o]),p.useEffect(()=>{r&&bo.getState().setOnHide(r)},[r]),n.length===0?null:t.jsx(p.Fragment,{children:n.map((a,i)=>{var f;const l=e[a.name];if(!l)return console.error(`${a.name} drawer doesn't exist`),null;const{placement:u,size:c,isClosePrevented:d,blur:g,containerProps:m,...h}=a.props||{};return t.jsx(aa,{isOpen:a.props.isOpen,onClose:()=>nc(a.name),isClosePrevented:d,blur:g,...a.overlayProps,style:{zIndex:1e3+i,...((f=a.overlayProps)==null?void 0:f.style)||{}},children:t.jsx(ia,{placement:u,size:c,isOpen:a.props.isOpen,...m||{},children:t.jsx(p.Suspense,{fallback:null,children:t.jsx(l,{...h})})})},i)})})},Nb=({isOpen:e,onClose:o,placement:r="right",size:n="md",isClosePrevented:a,children:i,...l})=>t.jsx(aa,{isOpen:e,onClose:o,isClosePrevented:a,...l,children:t.jsx(ia,{placement:r,size:n,isOpen:e,children:i})}),Vo=Nb;Vo.Overlay=aa;Vo.Container=ia;Vo.Header=$b;Vo.Body=Lb;Vo.Footer=Bb;Vo.Layout=Ob;function br(e){"@babel/helpers - typeof";return br=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(o){return typeof o}:function(o){return o&&typeof Symbol=="function"&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o},br(e)}function Ne(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function qb(e){return Ne(1,arguments),e instanceof Date||br(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ao(e){Ne(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||br(e)==="object"&&o==="[object Date]"?new Date(e.getTime()):typeof e=="number"||o==="[object Number]"?new Date(e):((typeof e=="string"||o==="[object String]")&&typeof console<"u"&&(console.warn("Starting with v2.0.0-beta.1 date-fns doesn't accept strings as date arguments. Please use `parseISO` to parse strings. See: https://github.com/date-fns/date-fns/blob/master/docs/upgradeGuide.md#string-arguments"),console.warn(new Error().stack)),new Date(NaN))}function Ub(e){if(Ne(1,arguments),!qb(e)&&typeof e!="number")return!1;var o=ao(e);return!isNaN(Number(o))}function zo(e){if(e===null||e===!0||e===!1)return NaN;var o=Number(e);return isNaN(o)?o:o<0?Math.ceil(o):Math.floor(o)}function Gb(e,o){Ne(2,arguments);var r=ao(e).getTime(),n=zo(o);return new Date(r+n)}function Yb(e,o){Ne(2,arguments);var r=zo(o);return Gb(e,-r)}var Kb=864e5;function Xb(e){Ne(1,arguments);var o=ao(e),r=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var n=o.getTime(),a=r-n;return Math.floor(a/Kb)+1}function kr(e){Ne(1,arguments);var o=1,r=ao(e),n=r.getUTCDay(),a=(n<o?7:0)+n-o;return r.setUTCDate(r.getUTCDate()-a),r.setUTCHours(0,0,0,0),r}function ac(e){Ne(1,arguments);var o=ao(e),r=o.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(r+1,0,4),n.setUTCHours(0,0,0,0);var a=kr(n),i=new Date(0);i.setUTCFullYear(r,0,4),i.setUTCHours(0,0,0,0);var l=kr(i);return o.getTime()>=a.getTime()?r+1:o.getTime()>=l.getTime()?r:r-1}function Jb(e){Ne(1,arguments);var o=ac(e),r=new Date(0);r.setUTCFullYear(o,0,4),r.setUTCHours(0,0,0,0);var n=kr(r);return n}var Qb=6048e5;function Zb(e){Ne(1,arguments);var o=ao(e),r=kr(o).getTime()-Jb(o).getTime();return Math.round(r/Qb)+1}var ek={};function Er(){return ek}function Cr(e,o){var r,n,a,i,l,u,c,d;Ne(1,arguments);var g=Er(),m=zo((r=(n=(a=(i=o==null?void 0:o.weekStartsOn)!==null&&i!==void 0?i:o==null||(l=o.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.weekStartsOn)!==null&&a!==void 0?a:g.weekStartsOn)!==null&&n!==void 0?n:(c=g.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&r!==void 0?r:0);if(!(m>=0&&m<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var h=ao(e),f=h.getUTCDay(),y=(f<m?7:0)+f-m;return h.setUTCDate(h.getUTCDate()-y),h.setUTCHours(0,0,0,0),h}function ic(e,o){var r,n,a,i,l,u,c,d;Ne(1,arguments);var g=ao(e),m=g.getUTCFullYear(),h=Er(),f=zo((r=(n=(a=(i=o==null?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:o==null||(l=o.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&a!==void 0?a:h.firstWeekContainsDate)!==null&&n!==void 0?n:(c=h.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&r!==void 0?r:1);if(!(f>=1&&f<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(m+1,0,f),y.setUTCHours(0,0,0,0);var k=Cr(y,o),b=new Date(0);b.setUTCFullYear(m,0,f),b.setUTCHours(0,0,0,0);var j=Cr(b,o);return g.getTime()>=k.getTime()?m+1:g.getTime()>=j.getTime()?m:m-1}function ok(e,o){var r,n,a,i,l,u,c,d;Ne(1,arguments);var g=Er(),m=zo((r=(n=(a=(i=o==null?void 0:o.firstWeekContainsDate)!==null&&i!==void 0?i:o==null||(l=o.locale)===null||l===void 0||(u=l.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&a!==void 0?a:g.firstWeekContainsDate)!==null&&n!==void 0?n:(c=g.locale)===null||c===void 0||(d=c.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&r!==void 0?r:1),h=ic(e,o),f=new Date(0);f.setUTCFullYear(h,0,m),f.setUTCHours(0,0,0,0);var y=Cr(f,o);return y}var tk=6048e5;function rk(e,o){Ne(1,arguments);var r=ao(e),n=Cr(r,o).getTime()-ok(r,o).getTime();return Math.round(n/tk)+1}function ke(e,o){for(var r=e<0?"-":"",n=Math.abs(e).toString();n.length<o;)n="0"+n;return r+n}var yo={y:function(o,r){var n=o.getUTCFullYear(),a=n>0?n:1-n;return ke(r==="yy"?a%100:a,r.length)},M:function(o,r){var n=o.getUTCMonth();return r==="M"?String(n+1):ke(n+1,2)},d:function(o,r){return ke(o.getUTCDate(),r.length)},a:function(o,r){var n=o.getUTCHours()/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h:function(o,r){return ke(o.getUTCHours()%12||12,r.length)},H:function(o,r){return ke(o.getUTCHours(),r.length)},m:function(o,r){return ke(o.getUTCMinutes(),r.length)},s:function(o,r){return ke(o.getUTCSeconds(),r.length)},S:function(o,r){var n=r.length,a=o.getUTCMilliseconds(),i=Math.floor(a*Math.pow(10,n-3));return ke(i,r.length)}},Yo={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},nk={G:function(o,r,n){var a=o.getUTCFullYear()>0?1:0;switch(r){case"G":case"GG":case"GGG":return n.era(a,{width:"abbreviated"});case"GGGGG":return n.era(a,{width:"narrow"});case"GGGG":default:return n.era(a,{width:"wide"})}},y:function(o,r,n){if(r==="yo"){var a=o.getUTCFullYear(),i=a>0?a:1-a;return n.ordinalNumber(i,{unit:"year"})}return yo.y(o,r)},Y:function(o,r,n,a){var i=ic(o,a),l=i>0?i:1-i;if(r==="YY"){var u=l%100;return ke(u,2)}return r==="Yo"?n.ordinalNumber(l,{unit:"year"}):ke(l,r.length)},R:function(o,r){var n=ac(o);return ke(n,r.length)},u:function(o,r){var n=o.getUTCFullYear();return ke(n,r.length)},Q:function(o,r,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(r){case"Q":return String(a);case"QQ":return ke(a,2);case"Qo":return n.ordinalNumber(a,{unit:"quarter"});case"QQQ":return n.quarter(a,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(a,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(a,{width:"wide",context:"formatting"})}},q:function(o,r,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(r){case"q":return String(a);case"qq":return ke(a,2);case"qo":return n.ordinalNumber(a,{unit:"quarter"});case"qqq":return n.quarter(a,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(a,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(a,{width:"wide",context:"standalone"})}},M:function(o,r,n){var a=o.getUTCMonth();switch(r){case"M":case"MM":return yo.M(o,r);case"Mo":return n.ordinalNumber(a+1,{unit:"month"});case"MMM":return n.month(a,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(a,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(a,{width:"wide",context:"formatting"})}},L:function(o,r,n){var a=o.getUTCMonth();switch(r){case"L":return String(a+1);case"LL":return ke(a+1,2);case"Lo":return n.ordinalNumber(a+1,{unit:"month"});case"LLL":return n.month(a,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(a,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(a,{width:"wide",context:"standalone"})}},w:function(o,r,n,a){var i=rk(o,a);return r==="wo"?n.ordinalNumber(i,{unit:"week"}):ke(i,r.length)},I:function(o,r,n){var a=Zb(o);return r==="Io"?n.ordinalNumber(a,{unit:"week"}):ke(a,r.length)},d:function(o,r,n){return r==="do"?n.ordinalNumber(o.getUTCDate(),{unit:"date"}):yo.d(o,r)},D:function(o,r,n){var a=Xb(o);return r==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):ke(a,r.length)},E:function(o,r,n){var a=o.getUTCDay();switch(r){case"E":case"EE":case"EEE":return n.day(a,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(a,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(a,{width:"short",context:"formatting"});case"EEEE":default:return n.day(a,{width:"wide",context:"formatting"})}},e:function(o,r,n,a){var i=o.getUTCDay(),l=(i-a.weekStartsOn+8)%7||7;switch(r){case"e":return String(l);case"ee":return ke(l,2);case"eo":return n.ordinalNumber(l,{unit:"day"});case"eee":return n.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(i,{width:"short",context:"formatting"});case"eeee":default:return n.day(i,{width:"wide",context:"formatting"})}},c:function(o,r,n,a){var i=o.getUTCDay(),l=(i-a.weekStartsOn+8)%7||7;switch(r){case"c":return String(l);case"cc":return ke(l,r.length);case"co":return n.ordinalNumber(l,{unit:"day"});case"ccc":return n.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(i,{width:"narrow",context:"standalone"});case"cccccc":return n.day(i,{width:"short",context:"standalone"});case"cccc":default:return n.day(i,{width:"wide",context:"standalone"})}},i:function(o,r,n){var a=o.getUTCDay(),i=a===0?7:a;switch(r){case"i":return String(i);case"ii":return ke(i,r.length);case"io":return n.ordinalNumber(i,{unit:"day"});case"iii":return n.day(a,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(a,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(a,{width:"short",context:"formatting"});case"iiii":default:return n.day(a,{width:"wide",context:"formatting"})}},a:function(o,r,n){var a=o.getUTCHours(),i=a/12>=1?"pm":"am";switch(r){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(o,r,n){var a=o.getUTCHours(),i;switch(a===12?i=Yo.noon:a===0?i=Yo.midnight:i=a/12>=1?"pm":"am",r){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(o,r,n){var a=o.getUTCHours(),i;switch(a>=17?i=Yo.evening:a>=12?i=Yo.afternoon:a>=4?i=Yo.morning:i=Yo.night,r){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(o,r,n){if(r==="ho"){var a=o.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return yo.h(o,r)},H:function(o,r,n){return r==="Ho"?n.ordinalNumber(o.getUTCHours(),{unit:"hour"}):yo.H(o,r)},K:function(o,r,n){var a=o.getUTCHours()%12;return r==="Ko"?n.ordinalNumber(a,{unit:"hour"}):ke(a,r.length)},k:function(o,r,n){var a=o.getUTCHours();return a===0&&(a=24),r==="ko"?n.ordinalNumber(a,{unit:"hour"}):ke(a,r.length)},m:function(o,r,n){return r==="mo"?n.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):yo.m(o,r)},s:function(o,r,n){return r==="so"?n.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):yo.s(o,r)},S:function(o,r){return yo.S(o,r)},X:function(o,r,n,a){var i=a._originalDate||o,l=i.getTimezoneOffset();if(l===0)return"Z";switch(r){case"X":return Ja(l);case"XXXX":case"XX":return To(l);case"XXXXX":case"XXX":default:return To(l,":")}},x:function(o,r,n,a){var i=a._originalDate||o,l=i.getTimezoneOffset();switch(r){case"x":return Ja(l);case"xxxx":case"xx":return To(l);case"xxxxx":case"xxx":default:return To(l,":")}},O:function(o,r,n,a){var i=a._originalDate||o,l=i.getTimezoneOffset();switch(r){case"O":case"OO":case"OOO":return"GMT"+Xa(l,":");case"OOOO":default:return"GMT"+To(l,":")}},z:function(o,r,n,a){var i=a._originalDate||o,l=i.getTimezoneOffset();switch(r){case"z":case"zz":case"zzz":return"GMT"+Xa(l,":");case"zzzz":default:return"GMT"+To(l,":")}},t:function(o,r,n,a){var i=a._originalDate||o,l=Math.floor(i.getTime()/1e3);return ke(l,r.length)},T:function(o,r,n,a){var i=a._originalDate||o,l=i.getTime();return ke(l,r.length)}};function Xa(e,o){var r=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),i=n%60;if(i===0)return r+String(a);var l=o;return r+String(a)+l+ke(i,2)}function Ja(e,o){if(e%60===0){var r=e>0?"-":"+";return r+ke(Math.abs(e)/60,2)}return To(e,o)}function To(e,o){var r=o||"",n=e>0?"-":"+",a=Math.abs(e),i=ke(Math.floor(a/60),2),l=ke(a%60,2);return n+i+r+l}var Qa=function(o,r){switch(o){case"P":return r.date({width:"short"});case"PP":return r.date({width:"medium"});case"PPP":return r.date({width:"long"});case"PPPP":default:return r.date({width:"full"})}},lc=function(o,r){switch(o){case"p":return r.time({width:"short"});case"pp":return r.time({width:"medium"});case"ppp":return r.time({width:"long"});case"pppp":default:return r.time({width:"full"})}},ak=function(o,r){var n=o.match(/(P+)(p+)?/)||[],a=n[1],i=n[2];if(!i)return Qa(o,r);var l;switch(a){case"P":l=r.dateTime({width:"short"});break;case"PP":l=r.dateTime({width:"medium"});break;case"PPP":l=r.dateTime({width:"long"});break;case"PPPP":default:l=r.dateTime({width:"full"});break}return l.replace("{{date}}",Qa(a,r)).replace("{{time}}",lc(i,r))},ik={p:lc,P:ak};function lk(e){var o=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return o.setUTCFullYear(e.getFullYear()),e.getTime()-o.getTime()}var sk=["D","DD"],ck=["YY","YYYY"];function dk(e){return sk.indexOf(e)!==-1}function uk(e){return ck.indexOf(e)!==-1}function Za(e,o,r){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(o,"`) for formatting years to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(o,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(e==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(o,"`) for formatting days of the month to the input `").concat(r,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var pk={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},mk=function(o,r,n){var a,i=pk[o];return typeof i=="string"?a=i:r===1?a=i.one:a=i.other.replace("{{count}}",r.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function Ur(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=o.width?String(o.width):e.defaultWidth,n=e.formats[r]||e.formats[e.defaultWidth];return n}}var gk={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},hk={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},fk={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},yk={date:Ur({formats:gk,defaultWidth:"full"}),time:Ur({formats:hk,defaultWidth:"full"}),dateTime:Ur({formats:fk,defaultWidth:"full"})},xk={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},bk=function(o,r,n,a){return xk[o]};function kt(e){return function(o,r){var n=r!=null&&r.context?String(r.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var i=e.defaultFormattingWidth||e.defaultWidth,l=r!=null&&r.width?String(r.width):i;a=e.formattingValues[l]||e.formattingValues[i]}else{var u=e.defaultWidth,c=r!=null&&r.width?String(r.width):e.defaultWidth;a=e.values[c]||e.values[u]}var d=e.argumentCallback?e.argumentCallback(o):o;return a[d]}}var kk={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ck={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Sk={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},wk={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},jk={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},vk={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Tk=function(o,r){var n=Number(o),a=n%100;if(a>20||a<10)switch(a%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Ik={ordinalNumber:Tk,era:kt({values:kk,defaultWidth:"wide"}),quarter:kt({values:Ck,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:kt({values:Sk,defaultWidth:"wide"}),day:kt({values:wk,defaultWidth:"wide"}),dayPeriod:kt({values:jk,defaultWidth:"wide",formattingValues:vk,defaultFormattingWidth:"wide"})};function Ct(e){return function(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=r.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],i=o.match(a);if(!i)return null;var l=i[0],u=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(u)?Fk(u,function(m){return m.test(l)}):Rk(u,function(m){return m.test(l)}),d;d=e.valueCallback?e.valueCallback(c):c,d=r.valueCallback?r.valueCallback(d):d;var g=o.slice(l.length);return{value:d,rest:g}}}function Rk(e,o){for(var r in e)if(e.hasOwnProperty(r)&&o(e[r]))return r}function Fk(e,o){for(var r=0;r<e.length;r++)if(o(e[r]))return r}function Mk(e){return function(o){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.match(e.matchPattern);if(!n)return null;var a=n[0],i=o.match(e.parsePattern);if(!i)return null;var l=e.valueCallback?e.valueCallback(i[0]):i[0];l=r.valueCallback?r.valueCallback(l):l;var u=o.slice(a.length);return{value:l,rest:u}}}var zk=/^(\d+)(th|st|nd|rd)?/i,Wk=/\d+/i,Ek={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Ak={any:[/^b/i,/^(a|c)/i]},Hk={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Vk={any:[/1/i,/2/i,/3/i,/4/i]},Pk={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Dk={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},$k={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Lk={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Bk={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},_k={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ok={ordinalNumber:Mk({matchPattern:zk,parsePattern:Wk,valueCallback:function(o){return parseInt(o,10)}}),era:Ct({matchPatterns:Ek,defaultMatchWidth:"wide",parsePatterns:Ak,defaultParseWidth:"any"}),quarter:Ct({matchPatterns:Hk,defaultMatchWidth:"wide",parsePatterns:Vk,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:Ct({matchPatterns:Pk,defaultMatchWidth:"wide",parsePatterns:Dk,defaultParseWidth:"any"}),day:Ct({matchPatterns:$k,defaultMatchWidth:"wide",parsePatterns:Lk,defaultParseWidth:"any"}),dayPeriod:Ct({matchPatterns:Bk,defaultMatchWidth:"any",parsePatterns:_k,defaultParseWidth:"any"})},Nk={code:"en-US",formatDistance:mk,formatLong:yk,formatRelative:bk,localize:Ik,match:Ok,options:{weekStartsOn:0,firstWeekContainsDate:1}},qk=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Uk=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Gk=/^'([^]*?)'?$/,Yk=/''/g,Kk=/[a-zA-Z]/;function Xk(e,o,r){var n,a,i,l,u,c,d,g,m,h,f,y,k,b;Ne(2,arguments);var j=String(o),x=Er(),C=(n=(a=void 0)!==null&&a!==void 0?a:x.locale)!==null&&n!==void 0?n:Nk,v=zo((i=(l=(u=(c=void 0)!==null&&c!==void 0?c:void 0)!==null&&u!==void 0?u:x.firstWeekContainsDate)!==null&&l!==void 0?l:(d=x.locale)===null||d===void 0||(g=d.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var S=zo((m=(h=(f=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&f!==void 0?f:x.weekStartsOn)!==null&&h!==void 0?h:(k=x.locale)===null||k===void 0||(b=k.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&m!==void 0?m:0);if(!(S>=0&&S<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!C.localize)throw new RangeError("locale must contain localize property");if(!C.formatLong)throw new RangeError("locale must contain formatLong property");var I=ao(e);if(!Ub(I))throw new RangeError("Invalid time value");var w=lk(I),T=Yb(I,w),R={firstWeekContainsDate:v,weekStartsOn:S,locale:C,_originalDate:I},E=j.match(Uk).map(function(F){var W=F[0];if(W==="p"||W==="P"){var M=ik[W];return M(F,C.formatLong)}return F}).join("").match(qk).map(function(F){if(F==="''")return"'";var W=F[0];if(W==="'")return Jk(F);var M=nk[W];if(M)return uk(F)&&Za(F,o,String(e)),dk(F)&&Za(F,o,String(e)),M(T,F,C.localize,R);if(W.match(Kk))throw new RangeError("Format string contains an unescaped latin alphabet character `"+W+"`");return F}).join("");return E}function Jk(e){var o=e.match(Gk);return o?o[1].replace(Yk,"'"):e}const Gr=e=>typeof e=="string"?e:void 0,sc=({value:e,defaultValue:o}={})=>{const[r,n]=p.useState(!1),[a,i]=p.useState(!1),[l,u]=p.useState(()=>Gr(e)??Gr(o)??Xk(new Date,"yyyy-MM-dd")),c=Gr(e);return p.useEffect(()=>{c!==void 0&&u(c)},[c]),{date:l,setDate:u,isHovered:r,setIsHovered:n,isFocused:a,setIsFocused:i}},Qk=e=>t.jsx(s.Input,{type:"date",...e}),cc=({id:e,name:o,label:r,date:n,children:a,helperText:i,shadow:l={},size:u="md",variant:c="default",shape:d="default",views:g={container:{},label:{},helperText:{},text:{},field:{}},error:m=!1,isHovered:h=!1,isFocused:f=!1,isDisabled:y=!1,isReadOnly:k=!1,setDate:b=()=>{},setIsFocused:j=()=>{},setIsHovered:x=()=>{},onChange:C,onChangeText:v,value:S,defaultValue:I,...w})=>{const{themeMode:T}=s.useTheme(),R=p.useId(),E=e??R,F=!!r,W=()=>x(!h),M=()=>j(!0),z=V=>{typeof V=="string"?(b(V),v&&v(V)):(b(V.target.value),C&&C(V.target.value))},H={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none",backgroundColor:"transparent"}},transition:"all 0.2s ease-in-out",fontSize:s.Typography.fontSizes[u],backgroundColor:"transparent",color:y?"color-gray-400":"color-gray-900",cursor:y?"not-allowed":k?"auto":"pointer",...g.field};return t.jsx(fo,{helperText:i,error:m,views:g,children:t.jsx(So,{label:r,size:u,error:m,shape:d,views:g,shadow:l,color:"theme-primary",variant:c,value:n,isHovered:h,isDisabled:y,isReadOnly:k,isFocused:f,showLabel:F,onMouseEnter:W,onMouseLeave:W,children:t.jsxs(ut,{children:[F&&t.jsx(Wo,{htmlFor:E,color:"theme-primary",error:m,views:g,children:r}),t.jsx(Qk,{id:E,name:o,role:"textbox","aria-label":!F&&typeof r=="string"?r:void 0,onFocus:M,disabled:y,readOnly:k,...H,...w,...v&&{onChangeText:z},onChange:z,value:n})]})})})},Zk=e=>{const o=sc(e);return t.jsx(cc,{...o,...e})},e1=Zk,dc=p.createContext({active:!1,focusNextInput:()=>{},setInputRef:()=>{},handleSubmitEditing:()=>{},getReturnKeyType:()=>"next"}),o1=()=>p.useContext(dc),t1=({children:e,autoFocus:o=!1,initFocus:r,onChange:n=()=>{},...a})=>{const i=Je.useFormikContext();p.useEffect(()=>{n(i.values)},[i.values]);const l=p.useRef({}),u=p.useRef([]),c=(f,y)=>{l.current[f]=y,y&&!u.current.includes(f)&&u.current.push(f)},d=f=>{var y,k;if(o){const j=u.current.indexOf(f)+1;j<u.current.length?(y=l.current[u.current[j]])==null||y.focus():(k=i.submitForm)==null||k.call(i)}},g={active:o,focusNextInput:d,setInputRef:c,handleSubmitEditing:d,getReturnKeyType:f=>u.current.indexOf(f)===u.current.length-1?"done":"next"};p.useEffect(()=>{var f,y;o&&(r&&l.current[r]?(f=l.current[r])==null||f.focus():u.current[0]&&((y=l.current[u.current[0]])==null||y.focus()))},[o,r]);const h=typeof document<"u"&&typeof document.createElement=="function"?{onSubmit:i.handleSubmit,onReset:i.handleReset}:{};return t.jsx(dc.Provider,{value:g,children:t.jsx(s.Form,{...a,...h,children:e})})},r1=e=>{switch(e){case"email":return{autoCorrect:"off",inputMode:"email",autoCapitalize:"none"};case"password":return{autoCorrect:"off",secureTextEntry:!0,autoCapitalize:"none"};case"digits":return{inputMode:"tel"};case"numeric":return{inputMode:"numeric"};case"name":return{autoCorrect:"off"};default:return{}}},We=({name:e,type:o,...r},n={})=>{const a=o1(),{touched:i,errors:l,submitCount:u,values:c,setFieldTouched:d,setFieldValue:g}=Je.useFormikContext(),m=S=>{var I;g(e,S),(I=r.onChangeText)==null||I.call(r,S)},h=S=>{var I;g(e,S),(I=r.onChange)==null||I.call(r,S)},f=()=>{d(e,!0)},y=S=>{S.key==="Enter"&&(S.preventDefault(),a.focusNextInput(e))},k=["text","password","email","digits"].includes(o),b=Je.getIn(i,e)||u>0?Je.getIn(l,e):void 0,j=Je.getIn(c,e),x=typeof document<"u"&&typeof document.createElement=="function",C=!!n.focusable&&a.active,v=C?x?{onKeyPress:y}:{returnKeyType:a.getReturnKeyType(e),onSubmitEditing:()=>a.handleSubmitEditing(e),blurOnSubmit:!1}:{};return{...r1(o),...r,value:j,error:b,onBlur:f,...k?{onChangeText:m}:{onChange:h},...v,...C?{inputRef:S=>a.setInputRef(e,S)}:{}}},n1=e=>{let{value:o,...r}=We(e);r.isChecked=o;const n=ul(e);return t.jsx(pl,{...n,...r})},a1=n1,i1=e=>{let{value:o,...r}=We(e);r.isChecked=o===e.value;const n=ml(e);return t.jsx(gl,{...n,...r})},l1=i1,s1=e=>{const{name:o,onSubmit:r,...n}=e,[a,i]=p.useState([]),l=We({name:o,type:"text"}),u=h=>{l.onChangeText&&l.onChangeText(h)},c=(h,f)=>{r?r(h,f):u(h)},d=()=>a,g=()=>i([]),m=ec({...n,value:l.value||"",onChange:u,onSubmit:c});return t.jsx(tc,{...n,...m,name:o,value:l.value||"",onChange:u,onSubmit:c,error:l.error,getPendingFiles:d,clearPendingFiles:g})},c1=s1,d1=e=>{const o=We(e),r=hl(o);return t.jsx(fl,{...r,...o})},u1=d1,p1=e=>{const o=We(e),r=sc();return t.jsx(cc,{...r,...o})},m1=p1,g1=e=>{const o=We(e),r=yl(e);return t.jsx(xl,{...r,...o})},h1=g1,f1=e=>{let o=We(e);o.selected=o.value;const r=tl({...e,value:o.value});return t.jsx(nl,{...o,...r})},y1=f1,x1=e=>{const o=We(e),r=al(e);return t.jsx(il,{...r,...o})},b1=x1,k1=e=>{const{name:o,...r}=e,{values:n,errors:a,touched:i,submitCount:l,setFieldValue:u,setFieldTouched:c}=Je.useFormikContext(),d=Je.getIn(n,o)||[],g=Je.getIn(i,o)||l>0?Je.getIn(a,o):void 0,m=p.useCallback(b=>{var x;const j=Array.isArray(b)?b.filter(C=>typeof C=="string"):[];u(o,j),(x=e.onTagsChange)==null||x.call(e,j)},[o,u,e.onTagsChange]),h=p.useCallback(()=>{var b;c(o,!0),(b=e.onBlur)==null||b.call(e)},[o,c,e.onBlur]),f=Sl({...r,tags:d,onTagsChange:m,onBlur:h}),{tags:y,...k}=f;return t.jsx(wl,{...k,...r,tags:y,error:g})},C1=k1,S1=e=>{const o=We(e),r=cl(e);return t.jsx(dl,{...r,...o})},w1=S1,j1=e=>{const o=We(e,{focusable:!0}),{value:r,...n}=Un(e);return t.jsx(Lt,{...n,...o})},v1=j1,T1=({visibleIcon:e=t.jsx(An,{widthHeight:14}),hiddenIcon:o=t.jsx(En,{widthHeight:14}),...r})=>{const n=We(r,{focusable:!0}),{isVisible:a,setIsVisible:i,...l}=bl(n);return t.jsx(Lt,{...l,type:a?"text":"password",isClearable:!1,right:t.jsx(s.View,{onClick:()=>{r.isDisabled||i(!a)},children:a?e:o})})},I1=T1,R1=({items:e,placeholder:o,searchPlaceholder:r,isMulti:n=!1,...a})=>{const i=We(a),l=kl(e,o,r);p.useEffect(()=>{if(n&&Array.isArray(i.value))l.setSelectedItems(i.value);else if(!n&&i.value){const c=typeof i.value=="object"?i.value:e.find(d=>d.value===i.value);c&&l.setSelectedItem(c)}},[i.value,n,e]);const u=c=>{i.onChange(c)};return t.jsx(Cl,{...l,...i,items:e,placeholder:o,isMulti:n,onSelect:u})},F1=R1,M1=e=>{const o=We(e),r=Il({...e,value:o.value!==void 0?Number(o.value):void 0,onChange:n=>{var a;o.onChange(n),(a=e.onChange)==null||a.call(e,n)}});return t.jsx(Rl,{...e,...r,...o})},z1=M1,ei=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},Yr=(e,o)=>{console.log(`[FormikOTPInput] ${e}`,o)},W1=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),E1=e=>{const o=We(e),r=ei(o.value).slice(0,e.length||6);Yr("render",{name:e.name,type:e.type,formValue:W1(o.value),displayValue:r,length:e.length||6,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText});const{isFocused:n,setIsFocused:a,isHovered:i,setIsHovered:l,inputRef:u,containerRef:c,mirrorSelectionStart:d,mirrorSelectionEnd:g,setMirrorSelectionStart:m,setMirrorSelectionEnd:h,setInputRef:f,handleFocus:y,handleBlur:k,handleKeyDown:b,handlePaste:j}=jl(e),x=p.useCallback(v=>{const S=ei(v).slice(0,e.length||6);Yr("setValue",{name:e.name,incomingValue:v,nextValue:S,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText}),o.onChange&&o.onChange(S),o.onChangeText&&o.onChangeText(S),e.onComplete&&S.length===(e.length||6)&&e.onComplete(S),u.current&&(u.current.value=S)},[o,e,u]),C=p.useCallback(v=>{var w,T,R;const S=typeof v=="string"?v:((w=v==null?void 0:v.currentTarget)==null?void 0:w.value)??((T=v==null?void 0:v.target)==null?void 0:T.value)??((R=v==null?void 0:v.nativeEvent)==null?void 0:R.text)??"",I=String(S).slice(0,e.length||6);Yr("handleChange normalized",{name:e.name,raw:S,newValue:I}),x(I),u.current&&(u.current.value=I)},[e.length,x,u]);return t.jsx(vl,{...e,...o,value:r,setValue:x,isFocused:n,setIsFocused:a,isHovered:i,setIsHovered:l,inputRef:u,containerRef:c,mirrorSelectionStart:d,mirrorSelectionEnd:g,setMirrorSelectionStart:m,setMirrorSelectionEnd:h,setInputRef:f,handleChange:C,handleFocus:y,handleBlur:k,handleKeyDown:b,handlePaste:j,stepValues:e.stepValues})},A1=E1,H1=e=>Array.isArray(e)?e:e==null?[]:[e],uc=({name:e,uploadFile:o,onUploadSuccess:r,onUploadError:n,transformResponse:a,onMultipleFileSelect:i,onFileSelect:l,multiple:u=!0,...c})=>{const{setFieldValue:d,setFieldTouched:g,values:m}=Je.useFormikContext(),[h,f]=p.useState(!1),[y,k]=p.useState(0),b=p.useCallback(async C=>{if(!C||C.length===0)return;g(e,!0,!0),f(!0);const v=[];for(const S of C){k(0);try{const I=await o(S,T=>{k(T??0)}),w=a?a(I,S):I;v.push(w),r==null||r(S,w)}catch(I){n==null||n(S,I)}}if(v.length>0){const S=H1(Je.getIn(m,e));d(e,[...S,...v],!0),k(100)}else k(0);f(!1)},[e,n,r,g,d,a,o,m]),j=p.useCallback(async C=>{i==null||i(C),await b(C)},[b,i]),x=p.useCallback(async C=>{l==null||l(C),await b([C])},[b,l]);return t.jsx(Wr,{...c,multiple:u,onMultipleFileSelect:u?j:void 0,onFileSelect:u?void 0:x,isLoading:h,progress:y})};uc.displayName="FormikUploader";const V1=e=>{let o=We(e);o.selected=o.value;const r=ll(e);return t.jsx(sl,{...r,...o})},P1=V1,D1=({children:e,shape:o,variant:r,isDisabled:n,isToggled:a=!1,onToggle:i,...l})=>{const u=We(l),{isHovered:c,setIsHovered:d,isToggle:g,setIsToggled:m}=Kl(u.value??a);p.useEffect(()=>{m(u.value??a)},[u.value,a]);const h=f=>{m(f),u.onChange(f),i==null||i(f)};return t.jsx(Xl,{shape:o,variant:r,isDisabled:n,isHovered:c,setIsHovered:d,isToggle:g,setIsToggled:m,onToggle:h,...l,children:e})},$1=D1,L1=({items:e,shape:o,variant:r,onToggleChange:n,...a})=>{const i=We(a),{activeToggles:l,setActiveToggles:u}=Jl();p.useEffect(()=>{Array.isArray(i.value)&&u(i.value)},[i.value]);const c=d=>{u(d),i.onChange(d),n==null||n(d)};return t.jsx(Ql,{items:e,shape:o,variant:r,activeToggles:l,setActiveToggles:u,onToggleChange:c,...a})},B1=L1,_1=e=>{const o=We(e),r={...e,value:o.value??e.value??e.defaultValue},n=Ts(r),a=i=>{n.handleIconSelect(i),o.onChange(i)};return t.jsx(Is,{...n,...r,handleIconSelect:a})},O1=_1,N1=e=>{const o=We(e),r={...e,value:o.value??e.value??e.defaultValue,onChange:o.onChange},n=ms(r),a=i=>{n.handleEmojiSelect(i)};return t.jsx(gs,{...n,...r,handleEmojiSelect:a})},q1=N1,U1=({files:e,onRemove:o,maxHeight:r="120px",views:n={}})=>{if(e.length===0)return null;const a=p.useCallback(i=>i<1024?`${i} B`:i<1024*1024?`${(i/1024).toFixed(1)} KB`:`${(i/(1024*1024)).toFixed(1)} MB`,[]);return t.jsx(s.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:r,overflowY:"auto",...n==null?void 0:n.container,children:e.map((i,l)=>{const u=i.url||"",c=i.type.startsWith("image/"),d=i.type.startsWith("video/"),g=i.type.startsWith("audio/");return t.jsx(s.Vertical,{alignItems:"center",gap:"6px",padding:"6px 10px",borderRadius:"8px",border:"1px solid #E2E8F0",backgroundColor:"color-white",position:"relative",animate:{from:{opacity:0,scale:.9},to:{opacity:1,scale:1}},animationDuration:.2,...n==null?void 0:n.item,children:t.jsxs(Oe,{children:[t.jsx(Oe.Trigger,{children:t.jsxs(s.View,{position:"relative",children:[c&&u&&t.jsx(s.Image,{src:u,alt:i.name,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),d&&u&&t.jsx(s.View,{as:"video",src:u,alt:i.name,controls:!1,muted:!0,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),g&&t.jsx(s.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:t.jsx(nt,{widthHeight:24,color:"color-black"})}),!c&&!d&&!g&&t.jsx(s.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:t.jsx(Mo,{widthHeight:24,color:"color-black"})}),o&&t.jsx(s.Button,{position:"absolute",top:"-4px",right:"-4px",width:"20px",height:"20px",minWidth:"20px",minHeight:"20px",borderRadius:"50%",backgroundColor:"color-red-500",color:"white",fontSize:14,fontWeight:"bold",padding:0,display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",border:"2px solid white",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"#DC2626"},onClick:m=>{m.stopPropagation(),o(l)},"aria-label":`Remove ${i.name}`,children:"×"})]})}),t.jsxs(Oe.Content,{children:[c&&u&&t.jsx(s.Image,{src:u,alt:i.name,maxWidth:"300px"}),d&&u&&t.jsx(s.View,{as:"video",src:u,controls:!0,maxWidth:"300px"}),g&&u&&t.jsx(s.View,{as:"audio",src:u,controls:!0,width:"100%"}),t.jsxs(s.Text,{marginTop:"4px",maxLines:1,width:"100%",fontSize:12,...n==null?void 0:n.name,children:[i.name," (",a(i.size),")"]})]})]})},l)})})},ko=st.create(e=>({modals:[],onHide:o=>o,onShow:(o,r)=>({name:o,props:r}),show:(o,r={},n={})=>{e(a=>({...a,modals:[...a.modals,{name:o,props:{...r,isVisible:!0},overlayProps:n}]}))},hide:o=>{e(r=>o?{...r,modals:r.modals.filter(n=>n.name!==o)}:{modals:[]})},setOnHide:o=>{e(r=>({...r,onHide:o}))},setOnShow:o=>{e(r=>({...r,onShow:o}))}})),G1=(e,o={},r={})=>{ko.getState().show(e,o,r),ko.getState().onShow(e,o)},la=e=>{ko.getState().onHide(e),ko.getState().hide(typeof e=="string"?e:void 0)},Y1={square:{borderRadius:0},rounded:{borderRadius:8}},K1={center:{justifyContent:"center",alignItems:"center"},top:{justifyContent:"center",alignItems:"flex-start"},right:{justifyContent:"flex-end",alignItems:"center"},bottom:{justifyContent:"center",alignItems:"flex-end"},left:{justifyContent:"flex-start",alignItems:"center"}},X1={xs:12,sm:16,md:20,lg:24,xl:28},Kr={body:{fontSize:"16px",fontWeight:"400",color:"color-gray-700"}},pc=p.memo(({children:e,blur:o,isOpen:r=!1,isClosePrevented:n=!1,onClose:a=()=>{},position:i="center",views:l,...u})=>{const c=p.useCallback(()=>{n||a()},[n,a]);return t.jsx(s.Center,{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1e3,onClick:c,visibility:r?"visible":"hidden",opacity:r?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease",...l==null?void 0:l.container,children:t.jsx(s.View,{position:"absolute",top:0,left:0,zIndex:1e3,width:"100vw",height:"100vh",display:"flex",backgroundColor:"color-dark-50-360",backdropFilter:o?`blur(${o}px)`:void 0,transition:"background-color 0.2s ease, backdrop-filter 0.2s ease",onClick:c,...K1[i],...u,...l==null?void 0:l.view,children:e})})}),J1={boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.15)"},Q1={elevation:5,shadowColor:"rgba(0, 0, 0, 0.15)",shadowOffset:{width:0,height:4},shadowOpacity:1,shadowRadius:16},Z1=p.memo(({children:e,shadow:o,isFullScreen:r=!1,shape:n="rounded",views:a,isOpen:i=!0,position:l,...u})=>{const c=typeof document!==void 0?J1:Q1,d=p.useCallback(g=>{g&&g.stopPropagation&&g.stopPropagation()},[]);return t.jsx(s.Vertical,{cursor:"default",backgroundColor:"color-white",width:r?"100%":600,height:r?"100%":"fit-content",onClick:d,transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",opacity:i?1:0,transform:i?"translateY(0)":"translateY(8px)",...o||c,...Y1[n],media:{mobile:{width:"90%",maxWidth:"100%",margin:"16px"}},...u,...a==null?void 0:a.container,children:e})}),eC=p.memo(({children:e,buttonColor:o="theme-primary",iconSize:r="md",buttonSize:n,buttonPosition:a="right",views:i,onClose:l,...u})=>{const c=l||la,d=t.jsx(s.View,{onClick:()=>c(),children:t.jsx(Ue,{widthHeight:X1[n??r],color:o})});return t.jsxs(s.Horizontal,{justifyContent:a==="none"?"center":"space-between",alignItems:"center",paddingVertical:16,paddingHorizontal:24,borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",media:{mobile:{paddingVertical:12,paddingHorizontal:16}},...u,...i==null?void 0:i.header,children:[a==="left"&&d,e,a==="right"&&d]})}),oC=p.memo(({children:e,views:o,...r})=>t.jsx(s.View,{paddingVertical:16,paddingHorizontal:24,fontSize:Kr.body.fontSize,fontWeight:Kr.body.fontWeight,color:Kr.body.color,media:{mobile:{paddingVertical:12,paddingHorizontal:16,fontSize:"14px"}},...r,...o==null?void 0:o.view,children:e})),tC=p.memo(({children:e,views:o,...r})=>t.jsx(s.Horizontal,{marginTop:"auto",alignItems:"center",justifyContent:"flex-end",paddingVertical:16,paddingHorizontal:24,borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",gap:12,media:{mobile:{paddingVertical:12,paddingHorizontal:16,gap:8}},...r,...o==null?void 0:o.container,children:e})),sa=({modals:e,onShow:o,onHide:r})=>{const n=ko(a=>a.modals);return p.useEffect(()=>{o&&ko.getState().setOnShow(o)},[o]),p.useEffect(()=>{r&&ko.getState().setOnHide(r)},[r]),n.length===0?null:t.jsx(p.Fragment,{children:n.map((a,i)=>{const l=e[a.name];return l?t.jsx(pc,{isOpen:a.props.isVisible,onClose:()=>la(a.name),blur:5,...a.overlayProps,style:{zIndex:1e3+i},children:t.jsx(l,{...a.props})},i):(console.error(`${a.name} modal doesn't exist`),null)})})},Po=({children:e})=>t.jsx(t.Fragment,{children:e});Po.Overlay=pc;Po.Container=Z1;Po.Header=eC;Po.Body=oC;Po.Footer=tC;Po.Layout=sa;const to=st.create((e,o)=>({stack:[{path:"/",params:{}}],index:0,push:(r,n={})=>e(a=>{const i=a.stack.slice(0,a.index+1);return i.push({path:r,params:n}),{stack:i,index:i.length-1}}),replace:(r,n={})=>e(a=>{const i=a.stack.slice();return i[a.index]={path:r,params:n},{stack:i}}),back:()=>{const{index:r}=o();return r<=0?!1:(e({index:r-1}),!0)},go:r=>e(n=>({index:Math.min(Math.max(n.index+r,0),n.stack.length-1)})),reset:(r,n={})=>e({stack:[{path:r,params:n}],index:0})})),rC=(e,o)=>to.getState().push(e,o),nC=()=>to.getState().back(),ca=()=>{const e=to(c=>c.stack),o=to(c=>c.index),r=to(c=>c.push),n=to(c=>c.replace),a=to(c=>c.back),i=to(c=>c.go),l=to(c=>c.reset),u=e[o]||{path:"/",params:{}};return{path:u.path,params:u.params,stack:e,index:o,canGoBack:o>0,push:r,replace:n,back:a,go:i,reset:l,navigate:r}},mc=(e,o)=>{const r=e.split("/").filter(Boolean),n=o.split("/").filter(Boolean);if(r.length!==n.length)return null;const a={};for(let i=0;i<r.length;i+=1){const l=r[i];if(l.startsWith(":"))a[l.slice(1)]=decodeURIComponent(n[i]);else if(l!==n[i])return null}return a},aC=e=>Array.isArray(e)?e:Object.entries(e).map(([o,r])=>({path:o,component:r})),iC=({routes:e,notFound:o})=>{const{path:r,params:n}=ca();for(const a of aC(e)){const i=mc(a.path,r);if(i){const l=a.component;return t.jsx(l,{...n,...i})}}return o?t.jsx(o,{}):null},lC=({routes:e,notFound:o,initialPath:r,syncBrowserHistory:n=!1})=>{const{path:a,push:i,back:l,reset:u}=ca(),c=p.useRef(!1);return s.useMount(()=>{r&&u(r)}),p.useEffect(()=>{if(!(!n||typeof window>"u")){if(c.current){c.current=!1;return}try{window.history.pushState({path:a},"",a)}catch{}}},[a,n]),p.useEffect(()=>{if(!n||typeof window>"u")return;const d=()=>{c.current=!0,l()||(c.current=!1)};return window.addEventListener("popstate",d),()=>window.removeEventListener("popstate",d)},[n,l,i]),t.jsx(iC,{routes:e,notFound:o})},Ar=st.create(e=>({started:!1,loaded:!1,setStarted:(o=!0)=>e({started:o}),setLoaded:(o=!0)=>e({loaded:o}),reset:()=>e({started:!1,loaded:!1})})),sC=(e=!0)=>Ar.getState().setLoaded(e),cC=(e=!0)=>Ar.getState().setStarted(e),dC=({logo:e,logoSrc:o,loader:r,showLoader:n=!0,duration:a=600,isLoaded:i,onHidden:l,backgroundColor:u="color-white",children:c,...d})=>{const g=Ar(C=>C.loaded),m=i!==void 0?i:g,[h,f]=p.useState(!0),[y,k]=p.useState(!1);if(p.useEffect(()=>{if(!m||y)return;k(!0);const C=setTimeout(()=>{f(!1),l==null||l()},a);return()=>clearTimeout(C)},[m,y,a,l]),!h)return null;const b=s.isBrowser()?"fixed":"absolute",j=y?s.Animation.fadeOut({duration:`${a}ms`}):void 0,x=e??(o?t.jsx(s.Image,{src:o,width:120,height:120,alt:"logo"}):null);return t.jsxs(s.Center,{position:b,top:0,left:0,right:0,bottom:0,zIndex:9999,backgroundColor:u,animate:j,...d,children:[t.jsxs(s.Vertical,{alignItems:"center",gap:24,children:[x,n&&(r??t.jsx(ho,{}))]}),c]})},tr={info:{container:{backgroundColor:"color-blue-50",border:"color-blue-300"},content:{color:"color-blue-700"},icon:{color:"color-blue-500"}},success:{container:{backgroundColor:"color-green-50",border:"color-green-300"},content:{color:"color-green-700"},icon:{color:"color-green-500"}},warning:{container:{backgroundColor:"color-orange-50",border:"color-orange-300"},content:{color:"color-orange-700"},icon:{color:"color-orange-500"}},error:{container:{backgroundColor:"color-red-50",border:"color-red-300"},content:{color:"color-red-700"},icon:{color:"color-red-500"}}},uC={top:{top:"16px",left:"50%",transform:"translateX(-50%)"},"top-right":{top:"16px",right:"16px"},"top-left":{top:"16px",left:"16px"},bottom:{bottom:"16px",left:"50%",transform:"translateX(-50%)"},"bottom-right":{bottom:"16px",right:"16px"},"bottom-left":{bottom:"16px",left:"16px"}},pC=()=>Math.random().toString(36).substring(2,9);let Ko=new Map;const Ot=st.create(e=>({toasts:[],add:(o,r,n,a={})=>{const i=a.id||pC(),l={id:i,variant:o,title:r,description:n,createdAt:Date.now(),isVisible:!0,...a};if(e(u=>({toasts:[...u.toasts,l]})),a.duration!==0){const u=a.duration||5e3,c=setTimeout(()=>{Ot.getState().remove(i)},u);Ko.set(i,c)}return i},remove:o=>{e(r=>({toasts:r.toasts.map(n=>n.id===o?{...n,isVisible:!1}:n)})),Ko.has(o)&&(clearTimeout(Ko.get(o)),Ko.delete(o)),setTimeout(()=>{e(r=>({toasts:r.toasts.filter(n=>n.id!==o)}))},300)},removeAll:()=>{Ko.forEach(clearTimeout),Ko.clear(),e(o=>({toasts:o.toasts.map(r=>({...r,isVisible:!1}))})),setTimeout(()=>{e({toasts:[]})},300)}})),Do=(e,o,r,n)=>Ot.getState().add(e,o,r,n),gc=(e,o,r)=>Do("info",e,o,r),hc=(e,o,r)=>Do("success",e,o,r),fc=(e,o,r)=>Do("warning",e,o,r),yc=(e,o,r)=>Do("error",e,o,r),xc=e=>{Ot.getState().remove(e)},bc=()=>{Ot.getState().removeAll()},kc=({variant:e,title:o,description:r,onClose:n,isClosable:a=!0,action:i,actionText:l,showIcon:u=!0,theme:c,views:d,render:g,icon:m,id:h,isVisible:f=!0,themeMode:y})=>{const k=c??tr,b=()=>{var v,S;if(m!==void 0)return m;const C=e?(S=(v=tr[e])==null?void 0:v.icon)==null?void 0:S.color:tr.info.icon.color;switch(e){case"info":return t.jsx(xo,{widthHeight:20,color:C});case"success":return t.jsx(Ri,{widthHeight:20,color:C});case"warning":return t.jsx(xo,{widthHeight:20,color:C,orientation:"down"});case"error":return t.jsx(wr,{widthHeight:20,color:C});default:return t.jsx(xo,{widthHeight:20,color:tr.info.icon.color})}};if(g)return t.jsx(t.Fragment,{children:g({id:h||"",onClose:n})});const j=e==="error"?"alert":"status",x=e==="error"||e==="warning"?"assertive":"polite";return t.jsxs(s.Horizontal,{role:j,"aria-live":x,"aria-atomic":"true","data-state":f?"open":"closed",gap:12,width:"100%",maxWidth:"380px",borderWidth:"1px",borderStyle:"solid",borderRadius:"12px",padding:"12px 14px",alignItems:"flex-start",position:"relative",backgroundColor:k[e].container.backgroundColor,borderColor:k[e].container.border,boxShadow:"0 12px 32px rgba(15, 23, 42, 0.12)",opacity:f?1:0,transform:f?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",...d==null?void 0:d.container,children:[u&&t.jsx(s.View,{marginTop:"2px",...d==null?void 0:d.icon,children:b()}),t.jsxs(s.Vertical,{gap:4,flex:"1",children:[t.jsx(s.Text,{fontSize:"14px",lineHeight:"20px",fontWeight:"600",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,...d==null?void 0:d.title,children:o}),r&&t.jsx(s.Text,{fontSize:"12px",lineHeight:"18px",color:k[e].content.color,fontWeight:"400",backgroundColor:k[e].container.backgroundColor,...d==null?void 0:d.description,children:r}),i&&l&&t.jsx(s.Text,{fontSize:"14px",fontWeight:"600",marginTop:"6px",cursor:"pointer",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,onClick:C=>{C.stopPropagation(),i()},_hover:{textDecoration:"underline"},transition:"opacity 0.2s ease, color 0.2s ease",...d==null?void 0:d.actionButton,children:l})]}),a&&t.jsx(s.View,{as:"button","aria-label":"Close toast",backgroundColor:"transparent",border:"none",cursor:"pointer",padding:"4px",marginLeft:"8px",marginTop:"-2px",marginRight:"-4px",borderRadius:"9999px",onClick:C=>{C.stopPropagation(),n()},_hover:{backgroundColor:"color-black-900-60"},transition:"background-color 0.2s ease, opacity 0.2s ease",...d==null?void 0:d.closeButton,children:t.jsx(Ue,{widthHeight:16,color:k[e].content.color})})]})},mC=({position:e="top-right",gap:o=8,limit:r=5,containerStyle:n})=>{const{toasts:a,remove:i}=Ot(),u=p.useMemo(()=>{const c={top:[],"top-right":[],"top-left":[],bottom:[],"bottom-right":[],"bottom-left":[]};return a.forEach(d=>{const g=d.position||e;c[g].push(d)}),Object.keys(c).forEach(d=>{c[d]=c[d].slice(-r)}),c},[a,e,r])[e];return t.jsx(s.View,{position:"fixed",zIndex:9999,display:"flex",flexDirection:e.includes("bottom")?"column-reverse":"column",gap:`${o}px`,width:"fit-content",maxWidth:"100%",pointerEvents:"none",...uC[e],style:n,children:u.map(c=>t.jsx(s.View,{pointerEvents:"auto",animation:e.includes("right")?"slideInRight 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("left")?"slideInLeft 0.3s ease-out, fadeIn 0.3s ease-out":e.includes("top")?"slideInDown 0.3s ease-out, fadeIn 0.3s ease-out":"slideInUp 0.3s ease-out, fadeIn 0.3s ease-out",children:t.jsx(kc,{id:c.id,variant:c.variant,title:c.title,description:c.description,onClose:()=>i(c.id),isClosable:c.isClosable,action:c.action,actionText:c.actionText,showIcon:c.showIcon,views:c.views,render:c.render,icon:c.icon,isVisible:c.isVisible})},c.id))})},gC=()=>({toast:(e,o,r,n)=>Do(e,o,r,n),info:(e,o,r)=>gc(e,o,r),success:(e,o,r)=>hc(e,o,r),warning:(e,o,r)=>fc(e,o,r),error:(e,o,r)=>yc(e,o,r),remove:e=>xc(e),removeAll:()=>bc()}),hC=e=>t.jsx(kc,{...e}),fC=Object.assign(hC,{Container:e=>t.jsx(mC,{...e}),show:Do,info:gc,success:hc,warning:fc,error:yc,remove:xc,removeAll:bc}),yC=gC;function da(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xC=typeof Element<"u",bC=typeof Map=="function",kC=typeof Set=="function",CC=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function lr(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var r,n,a;if(Array.isArray(e)){if(r=e.length,r!=o.length)return!1;for(n=r;n--!==0;)if(!lr(e[n],o[n]))return!1;return!0}var i;if(bC&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!o.has(n.value[0]))return!1;for(i=e.entries();!(n=i.next()).done;)if(!lr(n.value[1],o.get(n.value[0])))return!1;return!0}if(kC&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(i=e.entries();!(n=i.next()).done;)if(!o.has(n.value[0]))return!1;return!0}if(CC&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if(r=e.length,r!=o.length)return!1;for(n=r;n--!==0;)if(e[n]!==o[n])return!1;return!0}if(e.constructor===RegExp)return e.source===o.source&&e.flags===o.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof o.valueOf=="function")return e.valueOf()===o.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof o.toString=="function")return e.toString()===o.toString();if(a=Object.keys(e),r=a.length,r!==Object.keys(o).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,a[n]))return!1;if(xC&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!lr(e[a[n]],o[a[n]]))return!1;return!0}return e!==e&&o!==o}var SC=function(o,r){try{return lr(o,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const wC=da(SC);var jC=function(e,o,r,n,a,i,l,u){if(process.env.NODE_ENV!=="production"&&o===void 0)throw new Error("invariant requires an error message argument");if(!e){var c;if(o===void 0)c=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[r,n,a,i,l,u],g=0;c=new Error(o.replace(/%s/g,function(){return d[g++]})),c.name="Invariant Violation"}throw c.framesToPop=1,c}},vC=jC;const oi=da(vC);var TC=function(o,r,n,a){var i=n?n.call(a,o,r):void 0;if(i!==void 0)return!!i;if(o===r)return!0;if(typeof o!="object"||!o||typeof r!="object"||!r)return!1;var l=Object.keys(o),u=Object.keys(r);if(l.length!==u.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(r),d=0;d<l.length;d++){var g=l[d];if(!c(g))return!1;var m=o[g],h=r[g];if(i=n?n.call(a,m,h,g):void 0,i===!1||i===void 0&&m!==h)return!1}return!0};const IC=da(TC);var Cc=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(Cc||{}),Xr={link:{rel:["amphtml","canonical","alternate"]},script:{type:["application/ld+json"]},meta:{charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]}},ti=Object.values(Cc),Hr={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Sc=Object.entries(Hr).reduce((e,[o,r])=>(e[r]=o,e),{}),Qe="data-rh",tt={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},rt=(e,o)=>{for(let r=e.length-1;r>=0;r-=1){const n=e[r];if(Object.prototype.hasOwnProperty.call(n,o))return n[o]}return null},RC=e=>{let o=rt(e,"title");const r=rt(e,tt.TITLE_TEMPLATE);if(Array.isArray(o)&&(o=o.join("")),r&&o)return r.replace(/%s/g,()=>o);const n=rt(e,tt.DEFAULT_TITLE);return o||n||void 0},FC=e=>rt(e,tt.ON_CHANGE_CLIENT_STATE)||(()=>{}),Jr=(e,o)=>o.filter(r=>typeof r[e]<"u").map(r=>r[e]).reduce((r,n)=>({...r,...n}),{}),MC=(e,o)=>o.filter(r=>typeof r.base<"u").map(r=>r.base).reverse().reduce((r,n)=>{if(!r.length){const a=Object.keys(n);for(let i=0;i<a.length;i+=1){const u=a[i].toLowerCase();if(e.indexOf(u)!==-1&&n[u])return r.concat(n)}}return r},[]),zC=e=>console&&typeof console.warn=="function"&&console.warn(e),St=(e,o,r)=>{const n={};return r.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&zC(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,i)=>{const l={};i.filter(c=>{let d;const g=Object.keys(c);for(let h=0;h<g.length;h+=1){const f=g[h],y=f.toLowerCase();o.indexOf(y)!==-1&&!(d==="rel"&&c[d].toLowerCase()==="canonical")&&!(y==="rel"&&c[y].toLowerCase()==="stylesheet")&&(d=y),o.indexOf(f)!==-1&&(f==="innerHTML"||f==="cssText"||f==="itemprop")&&(d=f)}if(!d||!c[d])return!1;const m=c[d].toLowerCase();return n[d]||(n[d]={}),l[d]||(l[d]={}),n[d][m]?!1:(l[d][m]=!0,!0)}).reverse().forEach(c=>a.push(c));const u=Object.keys(l);for(let c=0;c<u.length;c+=1){const d=u[c],g={...n[d],...l[d]};n[d]=g}return a},[]).reverse()},WC=(e,o)=>{if(Array.isArray(e)&&e.length){for(let r=0;r<e.length;r+=1)if(e[r][o])return!0}return!1},EC=e=>({baseTag:MC(["href"],e),bodyAttributes:Jr("bodyAttributes",e),defer:rt(e,tt.DEFER),encode:rt(e,tt.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Jr("htmlAttributes",e),linkTags:St("link",["rel","href"],e),metaTags:St("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:St("noscript",["innerHTML"],e),onChangeClientState:FC(e),scriptTags:St("script",["src","innerHTML"],e),styleTags:St("style",["cssText"],e),title:RC(e),titleAttributes:Jr("titleAttributes",e),prioritizeSeoTags:WC(e,tt.PRIORITIZE_SEO_TAGS)}),wc=e=>Array.isArray(e)?e.join(""):e,AC=(e,o)=>{const r=Object.keys(e);for(let n=0;n<r.length;n+=1)if(o[r[n]]&&o[r[n]].includes(e[r[n]]))return!0;return!1},Qr=(e,o)=>Array.isArray(e)?e.reduce((r,n)=>(AC(n,o)?r.priority.push(n):r.default.push(n),r),{priority:[],default:[]}):{default:e,priority:[]},ri=(e,o)=>({...e,[o]:void 0}),HC=["noscript","script","style"],xn=(e,o=!0)=>o===!1?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),jc=e=>Object.keys(e).reduce((o,r)=>{const n=typeof e[r]<"u"?`${r}="${e[r]}"`:`${r}`;return o?`${o} ${n}`:n},""),VC=(e,o,r,n)=>{const a=jc(r),i=wc(o);return a?`<${e} ${Qe}="true" ${a}>${xn(i,n)}</${e}>`:`<${e} ${Qe}="true">${xn(i,n)}</${e}>`},PC=(e,o,r=!0)=>o.reduce((n,a)=>{const i=a,l=Object.keys(i).filter(d=>!(d==="innerHTML"||d==="cssText")).reduce((d,g)=>{const m=typeof i[g]>"u"?g:`${g}="${xn(i[g],r)}"`;return d?`${d} ${m}`:m},""),u=i.innerHTML||i.cssText||"",c=HC.indexOf(e)===-1;return`${n}<${e} ${Qe}="true" ${l}${c?"/>":`>${u}</${e}>`}`},""),vc=(e,o={})=>Object.keys(e).reduce((r,n)=>{const a=Hr[n];return r[a||n]=e[n],r},o),DC=(e,o,r)=>{const n={key:o,[Qe]:!0},a=vc(r,n);return[p.createElement("title",a,o)]},sr=(e,o)=>o.map((r,n)=>{const a={key:n,[Qe]:!0};return Object.keys(r).forEach(i=>{const u=Hr[i]||i;if(u==="innerHTML"||u==="cssText"){const c=r.innerHTML||r.cssText;a.dangerouslySetInnerHTML={__html:c}}else a[u]=r[i]}),p.createElement(e,a)}),Ge=(e,o,r=!0)=>{switch(e){case"title":return{toComponent:()=>DC(e,o.title,o.titleAttributes),toString:()=>VC(e,o.title,o.titleAttributes,r)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>vc(o),toString:()=>jc(o)};default:return{toComponent:()=>sr(e,o),toString:()=>PC(e,o,r)}}},$C=({metaTags:e,linkTags:o,scriptTags:r,encode:n})=>{const a=Qr(e,Xr.meta),i=Qr(o,Xr.link),l=Qr(r,Xr.script);return{priorityMethods:{toComponent:()=>[...sr("meta",a.priority),...sr("link",i.priority),...sr("script",l.priority)],toString:()=>`${Ge("meta",a.priority,n)} ${Ge("link",i.priority,n)} ${Ge("script",l.priority,n)}`},metaTags:a.default,linkTags:i.default,scriptTags:l.default}},LC=e=>{const{baseTag:o,bodyAttributes:r,encode:n=!0,htmlAttributes:a,noscriptTags:i,styleTags:l,title:u="",titleAttributes:c,prioritizeSeoTags:d}=e;let{linkTags:g,metaTags:m,scriptTags:h}=e,f={toComponent:()=>[],toString:()=>""};return d&&({priorityMethods:f,linkTags:g,metaTags:m,scriptTags:h}=$C(e)),{priority:f,base:Ge("base",o,n),bodyAttributes:Ge("bodyAttributes",r,n),htmlAttributes:Ge("htmlAttributes",a,n),link:Ge("link",g,n),meta:Ge("meta",m,n),noscript:Ge("noscript",i,n),script:Ge("script",h,n),style:Ge("style",l,n),title:Ge("title",{title:u,titleAttributes:c},n)}},bn=LC,rr=[],ua=!!(typeof window<"u"&&window.document&&window.document.createElement),kn=class{constructor(e,o){lo(this,"instances",[]);lo(this,"canUseDOM",ua);lo(this,"context");lo(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?rr:this.instances,add:e=>{(this.canUseDOM?rr:this.instances).push(e)},remove:e=>{const o=(this.canUseDOM?rr:this.instances).indexOf(e);(this.canUseDOM?rr:this.instances).splice(o,1)}}});this.context=e,this.canUseDOM=o||!1,o||(e.helmet=bn({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},BC=parseInt(p.version.split(".")[0],10),Cn=BC>=19,_C={},Tc=p.createContext(_C),Ro,OC=(Ro=class extends p.Component{constructor(r){super(r);lo(this,"helmetData");Cn?this.helmetData=null:this.helmetData=new kn(this.props.context||{},Ro.canUseDOM)}render(){return Cn?p.createElement(p.Fragment,null,this.props.children):p.createElement(Tc.Provider,{value:this.helmetData.value},this.props.children)}},lo(Ro,"canUseDOM",ua),Ro),Xo=(e,o)=>{const r=document.head||document.querySelector("head"),n=r.querySelectorAll(`${e}[${Qe}]`),a=[].slice.call(n),i=[];let l;return o&&o.length&&o.forEach(u=>{const c=document.createElement(e);for(const d in u)if(Object.prototype.hasOwnProperty.call(u,d))if(d==="innerHTML")c.innerHTML=u.innerHTML;else if(d==="cssText"){const g=u.cssText;c.appendChild(document.createTextNode(g))}else{const g=d,m=typeof u[g]>"u"?"":u[g];c.setAttribute(d,m)}c.setAttribute(Qe,"true"),a.some((d,g)=>(l=g,c.isEqualNode(d)))?a.splice(l,1):i.push(c)}),a.forEach(u=>{var c;return(c=u.parentNode)==null?void 0:c.removeChild(u)}),i.forEach(u=>r.appendChild(u)),{oldTags:a,newTags:i}},Sn=(e,o)=>{const r=document.getElementsByTagName(e)[0];if(!r)return;const n=r.getAttribute(Qe),a=n?n.split(","):[],i=[...a],l=Object.keys(o);for(const u of l){const c=o[u]||"";r.getAttribute(u)!==c&&r.setAttribute(u,c),a.indexOf(u)===-1&&a.push(u);const d=i.indexOf(u);d!==-1&&i.splice(d,1)}for(let u=i.length-1;u>=0;u-=1)r.removeAttribute(i[u]);a.length===i.length?r.removeAttribute(Qe):r.getAttribute(Qe)!==l.join(",")&&r.setAttribute(Qe,l.join(","))},NC=(e,o)=>{typeof e<"u"&&document.title!==e&&(document.title=wc(e)),Sn("title",o)},ni=(e,o)=>{const{baseTag:r,bodyAttributes:n,htmlAttributes:a,linkTags:i,metaTags:l,noscriptTags:u,onChangeClientState:c,scriptTags:d,styleTags:g,title:m,titleAttributes:h}=e;Sn("body",n),Sn("html",a),NC(m,h);const f={baseTag:Xo("base",r),linkTags:Xo("link",i),metaTags:Xo("meta",l),noscriptTags:Xo("noscript",u),scriptTags:Xo("script",d),styleTags:Xo("style",g)},y={},k={};Object.keys(f).forEach(b=>{const{newTags:j,oldTags:x}=f[b];j.length&&(y[b]=j),x.length&&(k[b]=f[b].oldTags)}),o&&o(),c(e,y,k)},wt=null,qC=e=>{wt&&cancelAnimationFrame(wt),e.defer?wt=requestAnimationFrame(()=>{ni(e,()=>{wt=null})}):(ni(e),wt=null)},UC=qC,ai=class extends p.Component{constructor(){super(...arguments);lo(this,"rendered",!1)}shouldComponentUpdate(o){return!IC(o,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:o}=this.props.context;o.remove(this),this.emitChange()}emitChange(){const{helmetInstances:o,setHelmet:r}=this.props.context;let n=null;const a=EC(o.get().map(i=>{const{context:l,...u}=i.props;return u}));OC.canUseDOM?UC(a):bn&&(n=bn(a)),r(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:o}=this.props.context;o.add(this),this.emitChange()}render(){return this.init(),null}},cr=[],ii=e=>{const o={};for(const r of Object.keys(e))o[Sc[r]||r]=e[r];return o},vo=e=>{const o={};for(const r of Object.keys(e)){const n=Hr[r];o[n||r]=e[r]}return o},li=(e,o)=>{if(!ua)return;const r=document.getElementsByTagName(e)[0];if(!r)return;const n="data-rh-managed",a=r.getAttribute(n),i=a?a.split(","):[],l=Object.keys(o);for(const u of i)l.includes(u)||r.removeAttribute(u);for(const u of l){const c=o[u];c==null||c===!1?r.removeAttribute(u):c===!0?r.setAttribute(u,""):r.setAttribute(u,String(c))}l.length>0?r.setAttribute(n,l.join(",")):r.removeAttribute(n)},Zr=()=>{const e={},o={};for(const r of cr){const{htmlAttributes:n,bodyAttributes:a}=r.props;n&&Object.assign(e,ii(n)),a&&Object.assign(o,ii(a))}li("html",e),li("body",o)},GC=class extends p.Component{componentDidMount(){cr.push(this),Zr()}componentDidUpdate(){Zr()}componentWillUnmount(){const e=cr.indexOf(this);e!==-1&&cr.splice(e,1),Zr()}resolveTitle(){const{title:e,titleTemplate:o,defaultTitle:r}=this.props;return e&&o?o.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||r||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const o=this.props.titleAttributes||{};return p.createElement("title",vo(o),e)}renderBase(){const{base:e}=this.props;return e?p.createElement("base",vo(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>p.createElement("meta",{key:r,...vo(o)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>p.createElement("link",{key:r,...vo(o)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>{const{innerHTML:n,...a}=o,i=vo(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),p.createElement("script",{key:r,...i})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>{const{cssText:n,...a}=o,i=vo(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),p.createElement("style",{key:r,...i})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,r)=>{const{innerHTML:n,...a}=o,i=vo(a);return n&&(i.dangerouslySetInnerHTML={__html:n}),p.createElement("noscript",{key:r,...i})})}render(){return p.createElement(p.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},on,YC=(on=class extends p.Component{shouldComponentUpdate(e){return!wC(ri(this.props,"helmetData"),ri(e,"helmetData"))}mapNestedChildrenToProps(e,o){if(!o)return null;switch(e.type){case"script":case"noscript":return{innerHTML:o};case"style":return{cssText:o};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,o,r,n){return{...o,[e.type]:[...o[e.type]||[],{...r,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,o,r,n){switch(e.type){case"title":return{...o,[e.type]:n,titleAttributes:{...r}};case"body":return{...o,bodyAttributes:{...r}};case"html":return{...o,htmlAttributes:{...r}};default:return{...o,[e.type]:{...r}}}}mapArrayTypeChildrenToProps(e,o){let r={...o};return Object.keys(e).forEach(n=>{r={...r,[n]:e[n]}}),r}warnOnInvalidChildren(e,o){return oi(ti.some(r=>e.type===r),typeof e.type=="function"?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${ti.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),oi(!o||typeof o=="string"||Array.isArray(o)&&!o.some(r=>typeof r!="string"),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,o){let r={};return p.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...i}=n.props,l=Object.keys(i).reduce((c,d)=>(c[Sc[d]||d]=i[d],c),{});let{type:u}=n;switch(typeof u=="symbol"?u=u.toString():this.warnOnInvalidChildren(n,a),u){case"Symbol(react.fragment)":o=this.mapChildrenToProps(a,o);break;case"link":case"meta":case"noscript":case"script":case"style":r=this.flattenArrayTypeChildren(n,r,l,a);break;default:o=this.mapObjectTypeChildren(n,o,l,a);break}}),this.mapArrayTypeChildrenToProps(r,o)}render(){const{children:e,...o}=this.props;let r={...o},{helmetData:n}=o;if(e&&(r=this.mapChildrenToProps(e,r)),n&&!(n instanceof kn)){const a=n;n=new kn(a.context,!0),delete r.helmetData}return Cn?p.createElement(GC,{...r}):n?p.createElement(ai,{...r,context:n.value}):p.createElement(Tc.Consumer,null,a=>p.createElement(ai,{...r,context:a}))}},lo(on,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),on);const KC={airbnb:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},apple:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.03em"},coinbase:{highlightStyle:"solid",fontWeight:600,letterSpacing:"-0.02em"},figma:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontWeight:700},linear:{highlightStyle:"gradient",fontWeight:600,letterSpacing:"-0.03em"},nike:{highlightStyle:"underline",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",highlightFontStyle:"italic",highlightFontWeight:900},notion:{highlightStyle:"underline",fontWeight:600,letterSpacing:"-0.01em",highlightFontStyle:"italic"},revolut:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},shopify:{highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},spacex:{highlightStyle:"glow",fontWeight:700,letterSpacing:"0.04em",textTransform:"uppercase",highlightLetterSpacing:"0.06em"},spotify:{highlightStyle:"background",fontWeight:800,letterSpacing:"-0.03em"},stripe:{highlightStyle:"gradient",fontWeight:700,letterSpacing:"-0.03em"},tesla:{highlightStyle:"solid",fontWeight:500,letterSpacing:"-0.01em",textTransform:"uppercase"},uber:{highlightStyle:"underline",fontWeight:700,letterSpacing:"-0.02em"},vercel:{highlightStyle:"outline",fontWeight:700,letterSpacing:"-0.04em"}},XC={highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},JC=e=>KC[e.metadata.id]??XC,Ic=(e,o)=>{const r=e.theme;return{canvas:Le(r.canvas),surface:Le(r.surface),text:Le(r.text),muted:Le(r.muted),border:Le(r.border),primary:Le(r.primary),secondary:Le(r.secondary),success:Le(r.success),warning:Le(r.warning),error:Le(r.error),onPrimary:Le(r.onPrimary),appearance:o}},QC=e=>Ic(e,"light"),ZC=e=>Ic(e,"dark"),Te=({palette:e,label:o,config:r,children:n})=>t.jsxs(s.Vertical,{gap:10,flex:"1 1 320px",minWidth:0,children:[t.jsxs(s.Horizontal,{gap:8,alignItems:"center",children:[t.jsx(s.View,{width:10,height:10,borderRadius:9999,backgroundColor:e.appearance==="dark"?"#111111":"#ffffff",borderWidth:1,borderStyle:"solid",borderColor:"rgba(0,0,0,0.15)"}),t.jsx(s.Text,{fontSize:11,fontWeight:"700",letterSpacing:"0.08em",textTransform:"uppercase",children:o})]}),t.jsx(Rn,{config:r,mode:e.appearance,children:t.jsx(s.View,{padding:20,borderRadius:16,borderWidth:1,borderStyle:"solid",backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",children:n})})]}),Le=e=>!e||typeof e!="string"?e:/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,po=(e,o)=>`color-mix(in srgb, ${Le(e)} ${o}%, transparent)`,eS=e=>e&&e.startsWith("var(--")?e.slice(6,-1):e,oS={cornerStyle:"soft",typeWeight:"bold",typeCase:"normal",typeStyle:"normal",letterSpacing:"-0.01em",accentTreatment:"flat",signatureMotif:"●",density:"comfortable",surfaceTone:"paper",cardRadius:12,pillRadius:9999,badgeRadius:6,voice:"neutral"},tS=e=>e.personality||oS,go=(e,o="normal")=>{let n={light:300,regular:400,bold:700,black:800}[e.typeWeight];return o==="light"&&(n=Math.max(300,n-200)),o==="heavy"&&(n=Math.min(900,n+100)),n},Nt=e=>{switch(e.density){case"tight":return{padding:16,gap:10,large:20};case"spacious":return{padding:28,gap:18,large:36};case"comfortable":default:return{padding:22,gap:14,large:28}}},rS=e=>e.typeCase==="uppercase"?"uppercase":"none",Vr=(e,o)=>{switch(e.surfaceTone){case"glass":return{backgroundColor:o.appearance==="dark"?"rgba(255,255,255,0.04)":"rgba(255,255,255,0.65)",backdropFilter:"blur(14px)"};case"mono":return{backgroundColor:o.appearance==="dark"?"#0a0a0a":Le(o.surface)};case"matte":return{backgroundColor:o.appearance==="dark"?"#181818":"#f4f4f4"};case"paper":default:return{backgroundColor:Le(o.surface)}}},it=(e,o)=>{const r=Le(o.primary),n=Le(o.secondary||o.primary);switch(e.accentTreatment){case"gradient":return`linear-gradient(135deg, ${r} 0%, ${n} 100%)`;case"glow":return r;case"stripe":return`repeating-linear-gradient(45deg, ${r} 0 8px, ${n} 8px 16px)`;case"halftone":return`radial-gradient(circle at 30% 30%, ${r} 0%, ${n} 70%)`;case"flat":default:return r}},lt=(e,o)=>{if(e.accentTreatment==="glow")return`0 0 24px ${po(o.primary,40)}, 0 0 4px ${Le(o.primary)}`},Co=e=>({letterSpacing:e.letterSpacing,textTransform:rS(e),fontStyle:e.typeStyle,fontWeight:go(e,"heavy")}),He=e=>({letterSpacing:e.typeCase==="uppercase"?"0.12em":"0.06em",textTransform:"uppercase",fontStyle:e.typeStyle,fontWeight:go(e,"normal")}),nS=(e,o)=>{var n,a,i;const r=(n=e.components)==null?void 0:n[o];return(i=(a=r==null?void 0:r.views)==null?void 0:a.container)==null?void 0:i.borderRadius},aS=e=>{const o=e.tokens.rawCssVars||{},r=e.theme.border,n=e.theme.surface,a=e.theme.primary,i=o["shadow-ring"]||"rgba(0,0,0,0.08) 0px 0px 0px 1px",l=o["shadow-ring-light"]||`${r} 0px 0px 0px 1px`,u=o["shadow-card"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, ${n} 0px 0px 0px 1px`,c=o["shadow-card-full"]||`rgba(0,0,0,0.08) 0px 0px 0px 1px, rgba(0,0,0,0.04) 0px 2px 2px 0px, rgba(0,0,0,0.04) 0px 8px 8px -8px, ${n} 0px 0px 0px 1px`;return[{name:"Level 0",label:"Flat",description:"No shadow",shadow:"none"},{name:"Level 1",label:"Ring",description:"Shadow-as-border",shadow:i},{name:"Level 1b",label:"Light Ring",description:"Lighter ring",shadow:l},{name:"Level 2",label:"Card",description:"Ring + subtle lift",shadow:u},{name:"Level 3",label:"Full Card",description:"Ring + lift + ambient + glow",shadow:c},{name:"Focus",label:"Accessibility ring",description:"Focus state — 2px ring",shadow:`0 0 0 2px ${a}`}]},jt=(e,o)=>{const n={accordion:["accordion","card","alert"],tabs:["tabs","button"],panel:["card","alert"]}[o]??[o];for(const a of n){const i=nS(e,a);if(i!==void 0)return i}return"12px"},en=({glyph:e,badge:o})=>t.jsxs(s.View,{position:"relative",display:"inline-flex",children:[t.jsx(s.View,{width:32,height:32,borderRadius:"50%",display:"inline-flex",alignItems:"center",justifyContent:"center",style:{backgroundColor:"rgba(0,0,0,0.06)",fontSize:18,lineHeight:"20px"},children:e}),o?t.jsx(s.View,{position:"absolute",top:-10,right:-18,paddingHorizontal:6,paddingVertical:2,borderRadius:9999,style:{backgroundColor:"#ffffff",color:"#222222",fontSize:9,fontWeight:700,letterSpacing:"0.04em",boxShadow:"0 1px 3px rgba(0,0,0,0.18)"},children:o}):null]}),iS=[{title:"Homes",value:"homes",icon:t.jsx(en,{glyph:"🏠"}),content:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:"Tokens, inputs, and feedback components share the active config."})},{title:"Experiences",value:"experiences",icon:t.jsx(en,{glyph:"🎈",badge:"NEW"}),content:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Services",value:"services",icon:t.jsx(en,{glyph:"🛎️",badge:"NEW"}),content:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:"Each tab carries an icon. Active tab uses the theme primary underline."})}],lS=[{title:"Token",field:"token"},{title:"Value",field:"value"},{title:"Role",field:"role"}],sS=[{id:"overview",label:"Overview",href:"#"},{id:"components",label:"Components",href:"#"},{id:"tokens",label:"Tokens",href:"#"}],cS=({color:e,name:o,role:r,border:n})=>t.jsxs(s.View,{borderWidth:1,borderStyle:"solid",borderRadius:8,overflow:"hidden",minWidth:0,borderColor:n,children:[t.jsx(s.View,{height:76,backgroundColor:e}),t.jsxs(s.Vertical,{gap:4,padding:12,children:[t.jsx(s.Text,{fontSize:13,lineHeight:"18px",fontWeight:"700",children:o}),t.jsx(s.Text,{fontSize:12,lineHeight:"16px",opacity:.7,children:e}),t.jsx(s.Text,{fontSize:12,lineHeight:"16px",opacity:.72,children:r})]})]}),Re=({title:e,children:o,config:r})=>t.jsxs(s.Vertical,{gap:18,padding:24,borderWidth:1,borderStyle:"solid",borderRadius:12,backgroundColor:r.theme.canvas,borderColor:r.theme.border,children:[t.jsx(s.Text,{fontSize:18,lineHeight:"24px",fontWeight:"700",color:r.theme.text,children:e}),o]}),dS=({config:e})=>{const o=JC(e),r=o.highlightStyle==="background"?e.theme.onPrimary:e.theme.primary;return t.jsx(s.View,{width:"100%",borderRadius:20,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,backgroundColor:e.theme.surface,children:t.jsxs(s.Horizontal,{width:"100%",flexWrap:"wrap",alignItems:"stretch",gap:0,children:[t.jsxs(s.Vertical,{flex:"1 1 360px",minWidth:0,padding:36,gap:20,justifyContent:"center",children:[t.jsx(_e,{variant:"outline",content:`${e.metadata.label} hero`}),t.jsx(Ul,{size:"xl",responsive:!0,highlightText:"design system",highlightStyle:o.highlightStyle,highlightColor:e.theme.primary,highlightSecondaryColor:o.highlightStyle==="gradient"?e.theme.secondary:e.theme.onPrimary,views:{container:{color:e.theme.text},text:{color:e.theme.text,fontFamily:e.tokens.typography.fontFamily,fontWeight:o.fontWeight,style:{letterSpacing:o.letterSpacing,fontStyle:o.fontStyle??"normal",textTransform:o.textTransform??"none"}},highlight:{color:r,fontWeight:o.highlightFontWeight??o.fontWeight,style:{fontStyle:o.highlightFontStyle??o.fontStyle??"normal",letterSpacing:o.highlightLetterSpacing??o.letterSpacing,textTransform:o.textTransform??"none"}}},children:"Build a beautiful design system in minutes"},`${e.metadata.id}-${o.highlightStyle}`),t.jsxs(s.Text,{color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,style:{fontSize:16,lineHeight:"24px",maxWidth:520},children:["Each brand defines its own highlight treatment —"," ",t.jsx(s.Text,{as:"span",color:e.theme.primary,fontWeight:"700",children:o.highlightStyle})," ","with weight"," ",t.jsx(s.Text,{as:"span",fontWeight:"700",children:o.fontWeight}),o.highlightFontStyle==="italic"||o.fontStyle==="italic"?", italic":"",o.textTransform==="uppercase"?", uppercase":"","."]}),t.jsxs(s.Horizontal,{gap:12,flexWrap:"wrap",children:[t.jsx(me,{color:"theme-primary",size:"md",children:"Get started"}),t.jsx(me,{variant:"outline",color:"theme-primary",size:"md",children:"View docs"})]})]}),t.jsxs(s.View,{flex:"1 1 320px",minWidth:0,minHeight:260,position:"relative",overflow:"hidden",style:{backgroundImage:`linear-gradient(135deg, ${e.theme.primary}, ${e.theme.secondary||e.theme.primary})`},children:[t.jsx(s.View,{position:"absolute",top:"50%",left:"50%",width:180,height:180,borderRadius:9999,style:{transform:"translate(-50%, -50%)",backgroundColor:"rgba(255,255,255,0.18)",filter:"blur(40px)"}}),t.jsxs(s.Vertical,{width:"100%",height:"100%",minHeight:260,padding:32,justifyContent:"flex-end",alignItems:"flex-start",gap:12,children:[t.jsx(s.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:13,letterSpacing:"0.08em",textTransform:"uppercase"},children:e.metadata.label}),t.jsx(s.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:28,lineHeight:"32px",letterSpacing:"-0.02em"},children:e.theme.primary})]})]})]})})},uS=({config:e})=>{var r,n;const o=e.tokens.colors.slice(0,5).map(a=>({token:a.name,value:a.value,role:a.role}));return t.jsxs(s.Vertical,{gap:24,children:[t.jsx(Re,{title:"Color",config:e,children:t.jsx(s.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:12,children:e.tokens.colors.slice(0,12).map(a=>t.jsx(cS,{color:a.value,name:a.name,role:a.role,text:e.theme.text,border:e.theme.border},a.name))})}),t.jsx(Re,{title:"Typography",config:e,children:t.jsxs(s.Vertical,{gap:24,children:[t.jsxs(s.Vertical,{gap:4,children:[t.jsx(s.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:48,lineHeight:"1.0",fontWeight:"700",letterSpacing:"0.96px",textTransform:"uppercase",children:"Making Life Multiplanetary"}),t.jsx(s.Text,{fontSize:10,color:e.theme.muted,children:"Display — 48px / Bold / 1.00 / Uppercase"})]}),t.jsxs(s.Vertical,{gap:4,children:[t.jsx(s.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:16,lineHeight:"1.7",fontWeight:"400",children:"SpaceX designs, manufactures and launches advanced rockets and spacecraft. The company was founded to revolutionize space technology."}),t.jsx(s.Text,{fontSize:10,color:e.theme.muted,children:"Body — 16px / 400 / 1.70"})]}),t.jsxs(s.Vertical,{gap:4,children:[t.jsx(s.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:13,lineHeight:"0.94",fontWeight:"700",letterSpacing:"1.17px",textTransform:"uppercase",children:"Falcon 9 · Starship · Dragon"}),t.jsx(s.Text,{fontSize:10,color:e.theme.muted,children:"Nav Bold — 13px / 700 / 0.94 / Uppercase"})]}),t.jsxs(s.Vertical,{gap:4,children:[t.jsx(s.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:12,lineHeight:"1.0",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Mission Overview"}),t.jsx(s.Text,{fontSize:10,color:e.theme.muted,children:"Caption — 12px / 400 / 1.00 / Uppercase"})]}),t.jsxs(s.Vertical,{gap:4,children:[t.jsx(s.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:10,lineHeight:"0.94",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Launch Date: 2026-04-15"}),t.jsx(s.Text,{fontSize:10,color:e.theme.muted,children:"Micro — 10px / 400 / 0.94 / Uppercase"})]}),t.jsx(s.Horizontal,{gap:10,flexWrap:"wrap",marginTop:12,children:e.tokens.typography.fontSizes.map(a=>t.jsx(_e,{variant:"outline",content:a},a))})]})}),t.jsx(Re,{title:"Spacing, Radius, Shadow",config:e,children:t.jsxs(s.Vertical,{gap:18,children:[t.jsx(s.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"flex-end",children:e.tokens.spacing.slice(0,10).map(a=>t.jsxs(s.Vertical,{gap:8,alignItems:"center",children:[t.jsx(s.View,{width:a,minWidth:4,height:24,borderRadius:2,backgroundColor:e.theme.primary}),t.jsx(s.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),t.jsx(s.Horizontal,{gap:12,flexWrap:"wrap",children:e.tokens.radii.slice(0,6).map(a=>t.jsxs(s.Vertical,{gap:8,alignItems:"center",children:[t.jsx(s.View,{width:64,height:64,borderRadius:a,borderWidth:1,borderStyle:"solid",backgroundColor:e.theme.surface,borderColor:e.theme.border}),t.jsx(s.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),t.jsx(s.View,{width:"100%",maxWidth:"100%",overflowX:"auto",style:{WebkitOverflowScrolling:"touch",color:e.theme.text},children:t.jsx(Fe,{views:(n=(r=e.components)==null?void 0:r.table)==null?void 0:n.views,children:t.jsx(Fe.Template,{caption:"First extracted color tokens",columns:lS,data:o})})})]})})]})},si=({palette:e})=>t.jsxs(Ae,{width:"min(100%, 420px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[t.jsx(Ae.Header,{children:t.jsxs(s.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[t.jsxs(s.Horizontal,{alignItems:"baseline",gap:6,children:[t.jsx(s.Text,{fontSize:24,fontWeight:"800",color:e.text,children:"$182"}),t.jsx(s.Text,{fontSize:14,color:e.muted,children:"night"})]}),t.jsx(_e,{variant:"filled",content:"Best value"})]})}),t.jsx(Ae.Content,{children:t.jsxs(s.Vertical,{gap:12,children:[t.jsxs(s.Horizontal,{gap:0,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,overflow:"hidden",children:[t.jsxs(s.Vertical,{flex:1,padding:10,gap:2,borderRightWidth:1,borderRightStyle:"solid",borderColor:e.border,children:[t.jsx(s.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECK-IN"}),t.jsx(s.Text,{fontSize:14,color:e.text,children:"Mar 12, 2026"})]}),t.jsxs(s.Vertical,{flex:1,padding:10,gap:2,children:[t.jsx(s.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECKOUT"}),t.jsx(s.Text,{fontSize:14,color:e.text,children:"Mar 18, 2026"})]})]}),t.jsxs(s.Vertical,{padding:10,gap:2,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,children:[t.jsx(s.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"GUESTS"}),t.jsx(s.Text,{fontSize:14,color:e.text,children:"2 adults"})]}),t.jsx(me,{isFilled:!0,size:"lg",children:"Reserve"}),t.jsx(xr,{}),t.jsxs(s.Vertical,{gap:6,children:[t.jsxs(s.Horizontal,{justifyContent:"space-between",children:[t.jsx(s.Text,{fontSize:14,color:e.text,children:"$182 × 6 nights"}),t.jsx(s.Text,{fontSize:14,color:e.text,children:"$1,092"})]}),t.jsxs(s.Horizontal,{justifyContent:"space-between",children:[t.jsx(s.Text,{fontSize:14,color:e.text,children:"Cleaning fee"}),t.jsx(s.Text,{fontSize:14,color:e.text,children:"$48"})]}),t.jsxs(s.Horizontal,{justifyContent:"space-between",children:[t.jsx(s.Text,{fontSize:14,color:e.text,children:"Service fee"}),t.jsx(s.Text,{fontSize:14,color:e.text,children:"$165"})]})]}),t.jsx(xr,{}),t.jsxs(s.Horizontal,{justifyContent:"space-between",children:[t.jsx(s.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"Total before taxes"}),t.jsx(s.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"$1,305"})]})]})})]}),ci=[{name:"Starter",tagline:"For solo makers shipping their first project.",price:"$0",period:"/ month",features:["1 workspace","Up to 3 projects","Community support"],ctaLabel:"Get started"},{name:"Pro",tagline:"For growing teams that need more room to build.",price:"$24",period:"/ month",features:["Unlimited projects","Advanced analytics","Priority email support","Custom domains"],ctaLabel:"Start free trial",featured:!0},{name:"Enterprise",tagline:"For organizations with security and scale needs.",price:"Custom",period:"",features:["SSO & SCIM","Audit logs","Dedicated success manager","99.99% uptime SLA"],ctaLabel:"Contact sales"}],di=({palette:e,tier:o,personality:r})=>{const n=Nt(r),a=Vr(r,e),i=it(r,e),l=lt(r,e);return t.jsx(s.View,{width:"min(100%, 280px)",borderRadius:r.cardRadius,overflow:"hidden",borderWidth:o.featured?0:1,borderStyle:"solid",style:{...o.featured?{background:i,boxShadow:l}:a,borderColor:e.border,color:o.featured?e.onPrimary:e.text},children:t.jsxs(s.Vertical,{gap:n.gap,padding:n.padding,children:[t.jsxs(s.Vertical,{gap:6,children:[t.jsxs(s.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[t.jsx(s.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:He(r),children:o.name}),o.featured?t.jsx(s.View,{paddingHorizontal:10,paddingVertical:4,borderRadius:r.badgeRadius,backgroundColor:po(e.onPrimary,22),children:t.jsxs(s.Horizontal,{gap:4,alignItems:"center",children:[t.jsx(s.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1},children:r.signatureMotif}),t.jsx(s.Text,{fontSize:10,color:e.onPrimary,style:He(r),children:r.voice.includes("mission")?"PRIORITY":"POPULAR"})]})}):null]}),t.jsx(s.Text,{fontSize:13,lineHeight:"18px",color:o.featured?po(e.onPrimary,85):e.muted,style:{fontStyle:r.typeStyle},children:o.tagline})]}),t.jsxs(s.Horizontal,{alignItems:"baseline",gap:4,children:[t.jsx(s.Text,{fontSize:n.large+8,color:o.featured?e.onPrimary:e.text,style:Co(r),children:o.price}),o.period?t.jsx(s.Text,{fontSize:14,color:o.featured?po(e.onPrimary,85):e.muted,style:{fontStyle:r.typeStyle},children:o.period}):null]}),t.jsx(s.Vertical,{gap:8,children:o.features.map(u=>t.jsxs(s.Horizontal,{gap:8,alignItems:"center",children:[t.jsx(s.View,{width:18,height:18,borderRadius:r.cornerStyle==="sharp"?2:9999,backgroundColor:o.featured?po(e.onPrimary,22):e.primary,alignItems:"center",justifyContent:"center",style:{display:"flex",flexShrink:0},children:t.jsx(s.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:go(r,"heavy")},children:r.cornerStyle==="sharp"?"+":"✓"})}),t.jsx(s.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:{textTransform:r.typeCase==="uppercase"?"uppercase":"none",letterSpacing:r.typeCase==="uppercase"?"0.04em":"normal",fontStyle:r.typeStyle},children:u})]},u))}),t.jsx(s.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:r.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:o.featured?e.onPrimary:e.text},children:t.jsx(s.Text,{fontSize:14,color:o.featured?e.primary:e.canvas,style:{...He(r),letterSpacing:r.typeCase==="uppercase"?"0.08em":"0.02em"},children:o.ctaLabel})})]})})},ui=({palette:e,personality:o})=>{const r=Nt(o),n=Vr(o,e),a=o.voice.includes("athletic")||o.voice.includes("motion")?"Aero Runner GT":o.voice.includes("mission")||o.voice.includes("futurist")?"Module-04 Insulated Jacket":"Linen Throw Pillow",i=o.voice.includes("athletic")||o.voice.includes("motion")?"Court Black · Mens":o.voice.includes("mission")||o.voice.includes("futurist")?"Carbon · Standard fit":"Stonewashed · Sand";return t.jsx(s.View,{width:"min(100%, 320px)",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:t.jsxs(s.Vertical,{gap:r.gap,padding:r.padding,children:[t.jsx(s.View,{height:120,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${po(e.primary,20)} 0%, ${po(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),t.jsxs(s.Vertical,{gap:4,children:[t.jsxs(s.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[t.jsx(s.Text,{fontSize:15,color:e.text,style:Co(o),children:a}),t.jsx(s.View,{paddingHorizontal:10,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:t.jsx(s.Text,{fontSize:10,color:e.text,style:He(o),children:"IN STOCK"})})]}),t.jsx(s.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:i})]}),t.jsxs(s.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[t.jsxs(s.Horizontal,{alignItems:"baseline",gap:6,children:[t.jsx(s.Text,{fontSize:24,color:e.text,style:Co(o),children:"$42"}),t.jsx(s.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$56"})]}),t.jsx(s.Text,{fontSize:12,color:e.success||e.muted,style:He(o),children:"FREE SHIPPING"})]}),t.jsx(s.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:it(o,e),boxShadow:lt(o,e)},children:t.jsx(s.Text,{fontSize:14,color:e.onPrimary,style:{...He(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})})},pi=({palette:e,personality:o})=>{const r=Nt(o),n=Vr(o,e),a=o.signatureMotif,i=o.voice.includes("athletic")?"★":o.voice.includes("mission")||o.voice.includes("futurist")?"◉":"♥",l=o.voice.includes("athletic")?"Velocity AirFlow 7":o.voice.includes("mission")||o.voice.includes("futurist")?"Sentinel Pro Headset":o.voice.includes("refined")?"Pulse Studio Monitor":"Aurora Wireless Headphones",u=o.voice.includes("athletic")?"Lightweight knit · 280g":o.voice.includes("mission")||o.voice.includes("futurist")?"Mil-spec audio · 60h endurance":"Active noise cancelling · 40h battery",c=o.voice.includes("mission")?"MISSION PICK":o.voice.includes("athletic")?"TEAM PICK":o.voice.includes("futurist")?"SIGNATURE":"BEST SELLER";return t.jsxs(s.View,{position:"relative",width:"min(100%, 320px)",children:[t.jsx(s.View,{position:"absolute",top:-10,left:16,paddingHorizontal:12,paddingVertical:6,borderRadius:o.badgeRadius,zIndex:2,style:{background:it(o,e),boxShadow:lt(o,e)||(e.appearance==="dark"?"0 6px 14px rgba(0,0,0,0.5)":"0 6px 14px rgba(0,0,0,0.12)")},children:t.jsxs(s.Horizontal,{gap:6,alignItems:"center",children:[t.jsx(s.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:go(o,"heavy")},children:a}),t.jsx(s.Text,{fontSize:10,color:e.onPrimary,style:He(o),children:c})]})}),t.jsx(s.View,{position:"absolute",top:12,right:12,width:36,height:36,borderRadius:o.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",zIndex:2,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:t.jsx(s.Text,{fontSize:16,color:i==="♥"&&e.error||e.primary,style:{lineHeight:1},children:i})}),t.jsx(s.View,{width:"100%",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:t.jsxs(s.Vertical,{gap:r.gap,padding:r.padding,children:[t.jsx(s.View,{height:140,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${po(e.primary,20)} 0%, ${po(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),t.jsxs(s.Vertical,{gap:6,children:[t.jsxs(s.Horizontal,{gap:6,alignItems:"center",children:[t.jsx(s.Text,{fontSize:13,color:e.warning||e.primary,style:{lineHeight:1},children:"★★★★★"}),t.jsx(s.Text,{fontSize:12,color:e.muted,children:"4.9 · 1,284 reviews"})]}),t.jsx(s.Text,{fontSize:18,color:e.text,style:Co(o),children:l}),t.jsx(s.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:u})]}),t.jsxs(s.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[t.jsxs(s.Horizontal,{alignItems:"baseline",gap:6,children:[t.jsx(s.Text,{fontSize:26,color:e.text,style:Co(o),children:"$189"}),t.jsx(s.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$249"})]}),t.jsx(s.View,{paddingHorizontal:8,paddingVertical:3,borderRadius:o.badgeRadius,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.08)":"rgba(0,0,0,0.06)"},children:t.jsx(s.Text,{fontSize:10,color:e.text,style:He(o),children:"–24%"})})]}),t.jsxs(s.Horizontal,{gap:8,children:[t.jsx(s.View,{flex:1,paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:it(o,e),boxShadow:lt(o,e)},children:t.jsx(s.Text,{fontSize:13,color:e.onPrimary,style:{...He(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Buy now"})}),t.jsx(s.View,{paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",borderColor:e.border},children:t.jsx(s.Text,{fontSize:13,color:e.text,style:{...He(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})]})})]})},pS=[{slug:"PRIMARY-TINT",source:"primary",intensity:"tint",heading:"Bring everyone together with systems that scale",body:"Signature primary ground for systems, FAQ, and the contact form.",cta:"Get started"},{slug:"SECONDARY-TINT",source:"secondary",intensity:"tint",heading:"A faster, more efficient way of working",body:"Secondary ground for hero moments and supporting narrative.",cta:"Explore"},{slug:"WARNING-TINT",source:"warning",intensity:"tint",heading:"Designed for the way ideas actually move",body:"Warm tint for product storytelling and brand moments.",cta:"See the story"},{slug:"SUCCESS-TINT",source:"success",intensity:"tint",heading:"Ship with confidence, every single release",body:"Cool tint for changelogs, releases, and reliability notes.",cta:"Read changelog"},{slug:"ERROR-TINT",source:"error",intensity:"tint",heading:"Built for teams who care about the details",body:"Saturated tint for community stories and testimonials.",cta:"Meet the makers"},{slug:"INK-INVERTED",source:"ink",intensity:"inverted",heading:"Go deeper. Go further. Go all-in.",body:"Inverted ground for premium tiers and developer surfaces.",cta:"Open the docs"}],wn=(e,o)=>{const r=e.replace("#","").padEnd(6,"0").slice(0,6),n=parseInt(r.slice(0,2),16),a=parseInt(r.slice(2,4),16),i=parseInt(r.slice(4,6),16);return[n,a,i].some(Number.isNaN)?e:`rgba(${n}, ${a}, ${i}, ${o})`},jn=e=>typeof e=="string"&&/^#([0-9a-f]{3}){1,2}$/i.test(e),qe=(e,o,r)=>jn(e)?wn(e,o):e.startsWith("rgba")||e.startsWith("rgb")?e.replace(/rgba?\(([^)]+)\)/,(n,a)=>`rgba(${a.split(",").slice(0,3).map(l=>l.trim()).join(", ")}, ${o})`):r==="dark"?`rgba(255,255,255,${o})`:`rgba(0,0,0,${o})`,mS=({block:e,palette:o,personality:r})=>{const n=Nt(r);let a,i;if(e.source==="ink")a=o.text,i=o.canvas;else{const g=o[e.source]||o.primary;e.intensity==="solid"?(a=g,i=o.onPrimary):(a=qe(g,.32,o.appearance),i=(o.appearance==="dark",o.text))}if(r.accentTreatment==="gradient"&&e.intensity==="tint"){const g=o[e.source],m=o.secondary;jn(g)&&jn(m)&&(a=`linear-gradient(135deg, ${wn(g,.32)} 0%, ${wn(m,.32)} 100%)`)}if(r.accentTreatment==="stripe"&&e.intensity==="tint"){const g=qe(o[e.source],.32,o.appearance),m=qe(o.secondary,.18,o.appearance);a=`repeating-linear-gradient(135deg, ${g} 0 18px, ${m} 18px 36px)`}const l=qe(i,.72,o.appearance),u=qe(i,.55,o.appearance),c=i,d=i===o.canvas?o.text:o.canvas;return t.jsx(s.View,{width:"min(100%, 460px)",borderRadius:r.cardRadius*2,padding:n.large,style:{background:a},children:t.jsxs(s.Vertical,{gap:n.gap+6,children:[t.jsxs(s.Text,{fontSize:11,color:u,style:{...He(r),letterSpacing:"0.12em",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:[r.signatureMotif," ",e.slug]}),t.jsxs(s.Vertical,{gap:14,children:[t.jsx(s.Text,{fontSize:32,lineHeight:"36px",color:i,style:Co(r),children:e.heading}),t.jsx(s.Text,{fontSize:16,lineHeight:"22px",color:l,style:{fontStyle:r.typeStyle},children:e.body})]}),t.jsx(s.View,{alignSelf:"flex-start",paddingHorizontal:28,paddingVertical:14,borderRadius:r.pillRadius,style:{backgroundColor:c,cursor:"pointer"},children:t.jsx(s.Text,{fontSize:15,color:d,style:{...He(r),letterSpacing:r.typeCase==="uppercase"?"0.08em":"0.01em",textTransform:r.typeCase==="uppercase"?"uppercase":"none"},children:e.cta})})]})})},mi=[{id:"design-tokens",badge:"NEW",badgeTone:"success",favorite:"♥",category:"Design systems",title:"Design tokens that survive a redesign",excerpt:"Why semantic naming beats raw values — and how to migrate a token set without breaking every consumer.",author:"Léa Martin",meta:"6 min read · Mar 10",imageTone:"warm"},{id:"shipping-faster",badge:"FEATURED",badgeTone:"primary",favorite:"★",category:"Engineering",title:"Shipping faster without skipping review",excerpt:"Three async patterns we use to keep PR cycle time under 24h while still catching the regressions that matter.",author:"Jordan Reyes",meta:"9 min read · Mar 04",imageTone:"cool"},{id:"a11y-audit",badge:"TRENDING",badgeTone:"warning",favorite:"⛉",category:"Accessibility",title:"The accessibility audit nobody asked for",excerpt:"A walkthrough of the 12 issues we found on our own marketing site — and the four-week fix plan that followed.",author:"Ines Okafor",meta:"12 min read · Feb 27",imageTone:"mono"}],gi=({palette:e,article:o,personality:r})=>{const n=Nt(r),a=Vr(r,e),i=e[o.badgeTone]||e.primary,l=e.secondary||e.primary,u=r.accentTreatment==="gradient"?`linear-gradient(135deg, ${qe(i,.55,e.appearance)} 0%, ${qe(l,.55,e.appearance)} 100%)`:r.accentTreatment==="stripe"?`repeating-linear-gradient(45deg, ${qe(i,.45,e.appearance)} 0 16px, ${qe(l,.25,e.appearance)} 16px 32px)`:r.accentTreatment==="halftone"?`radial-gradient(circle at 30% 30%, ${qe(i,.55,e.appearance)} 0%, ${qe(l,.35,e.appearance)} 70%)`:r.accentTreatment==="glow"?`radial-gradient(circle at 50% 60%, ${qe(i,.45,e.appearance)} 0%, ${e.appearance==="dark"?"#050505":"#0a0a0a"} 100%)`:qe(i,.32,e.appearance),c=r.voice.includes("mission")||r.voice.includes("futurist")?"◉":o.favorite,d=c==="♥"?e.error||e.primary:c==="★"&&e.warning||e.primary;return t.jsx(s.View,{width:"min(100%, 320px)",borderRadius:r.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...a,borderColor:e.border,color:e.text},children:t.jsxs(s.Vertical,{gap:n.gap,padding:n.padding,children:[t.jsxs(s.View,{position:"relative",height:160,borderRadius:r.cardRadius,overflow:"hidden",style:{background:u},children:[t.jsx(s.View,{position:"absolute",top:12,left:12,paddingHorizontal:10,paddingVertical:4,borderRadius:r.badgeRadius,style:{background:it(r,{...e,primary:i}),boxShadow:lt(r,e)},children:t.jsxs(s.Horizontal,{gap:4,alignItems:"center",children:[t.jsx(s.Text,{fontSize:10,color:e.onPrimary,style:{lineHeight:1,fontWeight:go(r,"heavy")},children:r.signatureMotif}),t.jsx(s.Text,{fontSize:10,color:e.onPrimary,style:He(r),children:o.badge})]})}),t.jsx(s.View,{position:"absolute",top:10,right:10,width:36,height:36,borderRadius:r.cornerStyle==="sharp"?4:9999,borderWidth:1,borderStyle:"solid",alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:e.appearance==="dark"?"rgba(0,0,0,0.45)":"rgba(255,255,255,0.92)",borderColor:e.border,backdropFilter:"blur(6px)"},children:t.jsx(s.Text,{fontSize:16,color:d,style:{lineHeight:1},children:c})})]}),t.jsxs(s.Vertical,{gap:8,children:[t.jsx(s.Text,{fontSize:11,color:e.muted,style:He(r),children:o.category}),t.jsx(s.Text,{fontSize:18,lineHeight:"24px",color:e.text,style:Co(r),children:o.title}),t.jsx(s.Text,{fontSize:13,lineHeight:"18px",color:e.muted,style:{fontStyle:r.typeStyle},children:o.excerpt})]}),t.jsxs(s.Horizontal,{gap:10,alignItems:"center",children:[t.jsx(s.View,{width:28,height:28,borderRadius:r.cornerStyle==="sharp"?4:9999,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.08)"}}),t.jsxs(s.Vertical,{gap:0,children:[t.jsx(s.Text,{fontSize:12,color:e.text,style:{fontWeight:go(r,"normal"),fontStyle:r.typeStyle},children:o.author}),t.jsx(s.Text,{fontSize:11,color:e.muted,children:o.meta})]})]})]})})},hi=({palette:e,personality:o,config:r})=>{var m,h,f,y;const n=o.signatureMotif,a=e.primary,i=it(o,e),l=lt(o,e),u=((h=(m=r.tokens)==null?void 0:m.typography)==null?void 0:h.fontFamily)||((y=(f=r.tokens)==null?void 0:f.rawCssVars)==null?void 0:y.display)||"inherit",c=o.voice.includes("mission")?"MAKING LIFE MULTIPLANETARY":o.voice.includes("athletic")?"JUST DO IT":o.voice.includes("refined")?"A new standard in payments":o.voice.includes("speed")?"Built for the makers":o.voice.includes("rhythmic")?"Music for everyone":o.voice.includes("thoughtful")?"The connected workspace":o.voice.includes("warm")?"Belong anywhere":o.voice.includes("minimal")?"Think different":o.voice.includes("commerce")?"The platform commerce is built on":o.voice.includes("bold-fintech")?"Money for the next generation":o.voice.includes("trustworthy")?"The future of money":o.voice.includes("playful")?"Nothing great is made alone":o.voice.includes("motion")?"Get there":o.voice.includes("deploy")?"Develop. Preview. Ship.":o.voice.includes("futurist")?"Accelerating the world to sustainable energy":`${r.metadata.label}`,d=o.typeCase==="uppercase"?"EXPLORE":"Get started",g=o.typeCase==="uppercase"?"LEARN MORE":"Learn more";return t.jsxs(s.View,{width:"100%",borderRadius:o.cardRadius*2,padding:o.density==="spacious"?56:o.density==="tight"?28:40,style:{backgroundColor:e.canvas,color:e.text,fontFamily:u,position:"relative",overflow:"hidden"},children:[o.accentTreatment==="glow"&&t.jsx(s.View,{position:"absolute",top:-120,right:-80,width:360,height:360,borderRadius:9999,style:{background:`radial-gradient(circle, ${a}40 0%, transparent 70%)`,pointerEvents:"none"}}),o.accentTreatment==="halftone"&&t.jsx(s.View,{position:"absolute",top:0,right:0,width:300,height:300,style:{background:`radial-gradient(circle at 70% 30%, ${a}30 0%, transparent 60%)`,pointerEvents:"none"}}),t.jsxs(s.Vertical,{gap:24,style:{position:"relative"},children:[t.jsxs(s.Horizontal,{gap:10,alignItems:"center",children:[t.jsx(s.View,{width:32,height:32,borderRadius:o.cornerStyle==="pill"?9999:o.cornerStyle==="sharp"?0:8,alignItems:"center",justifyContent:"center",style:{display:"flex",background:i,boxShadow:l},children:t.jsx(s.Text,{fontSize:16,color:e.onPrimary,style:{lineHeight:1,fontWeight:go(o,"heavy")},children:n})}),t.jsx(s.Text,{fontSize:13,color:e.muted,style:{...He(o),letterSpacing:o.typeCase==="uppercase"?"0.18em":"0.06em"},children:r.metadata.label})]}),t.jsx(s.Text,{fontSize:o.density==="spacious"?56:o.density==="tight"?40:48,lineHeight:o.density==="spacious"?"60px":o.density==="tight"?"44px":"52px",color:e.text,style:{...Co(o),letterSpacing:o.typeCase==="uppercase"?"0.06em":o.letterSpacing,maxWidth:580,fontFamily:u},children:c}),t.jsxs(s.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[t.jsx(s.View,{paddingHorizontal:o.density==="spacious"?32:24,paddingVertical:o.density==="spacious"?16:14,borderRadius:o.pillRadius,style:{display:"flex",cursor:"pointer",background:i,boxShadow:l},children:t.jsx(s.Text,{fontSize:15,color:e.onPrimary,style:{...He(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:go(o,"heavy"),fontFamily:u},children:d})}),t.jsx(s.View,{paddingHorizontal:24,paddingVertical:14,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",style:{display:"flex",cursor:"pointer",borderColor:e.text},children:t.jsx(s.Text,{fontSize:15,color:e.text,style:{...He(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:go(o,"heavy"),fontFamily:u},children:g})})]}),t.jsx(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"center",marginTop:8,children:[{label:"Primary",value:e.primary},{label:"Surface",value:e.surface},{label:"Text",value:e.text},{label:"Success",value:e.success}].map(k=>t.jsxs(s.Horizontal,{gap:8,alignItems:"center",children:[t.jsx(s.View,{width:20,height:20,borderRadius:o.cornerStyle==="sharp"?0:o.cornerStyle==="pill"?9999:4,borderWidth:1,borderStyle:"solid",style:{backgroundColor:k.value,borderColor:e.border}}),t.jsxs(s.Vertical,{gap:0,children:[t.jsx(s.Text,{fontSize:11,color:e.muted,style:He(o),children:k.label}),t.jsx(s.Text,{fontSize:11,color:e.text,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:eS(k.value)})]})]},k.label))})]})]})},fi=({palette:e,config:o})=>t.jsxs(s.Vertical,{gap:20,padding:36,alignItems:"center",borderRadius:16,style:{backgroundColor:e.surface},children:[t.jsx(_e,{variant:"outline",content:"New release"}),t.jsxs(s.Vertical,{gap:8,alignItems:"center",children:[t.jsxs(s.Text,{fontSize:36,lineHeight:"40px",fontWeight:"800",textAlign:"center",color:e.text,children:[o.metadata.label," Pro"]}),t.jsx(s.Text,{fontSize:18,lineHeight:"24px",color:e.muted,textAlign:"center",children:"Pro. Beyond."})]}),t.jsxs(s.Horizontal,{gap:12,flexWrap:"wrap",justifyContent:"center",children:[t.jsx(me,{shape:"pill",size:"md",children:"Learn more"}),t.jsx(me,{shape:"pill",size:"md",variant:"outline",children:"Buy"})]}),t.jsx(s.View,{width:220,height:140,borderRadius:20,backgroundColor:e.appearance==="dark"?e.canvas:e.text,opacity:.85})]}),yi=({palette:e,config:o})=>t.jsxs(Ae,{width:"min(100%, 320px)",views:{container:{backgroundColor:e.surface,color:e.text,borderWidth:1,borderStyle:"solid",borderColor:e.border},header:{color:e.text,borderColor:e.border},content:{color:e.text},footer:{borderColor:e.border}},children:[t.jsx(Ae.Header,{children:t.jsxs(s.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[t.jsx(s.Text,{color:e.text,fontWeight:"700",children:o.metadata.id==="spacex"?"Falcon 9":"Product Card"}),t.jsx(_e,{variant:"filled",content:"New"})]})}),t.jsx(Ae.Content,{children:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",color:e.text,children:o.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),t.jsx(Ae.Footer,{children:t.jsx(me,{size:"sm",children:o.metadata.id==="spacex"?"Explore":"Review"})})]}),xi=({palette:e})=>t.jsxs(s.Vertical,{gap:14,children:[t.jsxs(s.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[t.jsx(me,{color:"theme-primary",children:"Primary"}),t.jsx(me,{color:"theme-secondary",children:"Secondary"}),t.jsx(me,{color:"color-black",children:"Black"}),t.jsx(me,{color:"color-white",textColor:"color-black",children:"White"})]}),t.jsxs(s.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[t.jsx(me,{variant:"outline",color:"theme-primary",children:"Primary"}),t.jsx(me,{variant:"outline",color:"theme-secondary",children:"Secondary"}),t.jsx(me,{variant:"outline",color:"color-black",children:"Black"}),t.jsx(me,{variant:"outline",color:"color-white",children:"White"})]}),t.jsxs(s.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[t.jsx(me,{variant:"ghost",views:{container:{color:e.text}},children:"Ghost"}),t.jsx(me,{variant:"link",views:{container:{color:e.primary}},children:"Link"}),t.jsx(me,{isDisabled:!0,children:"Disabled"}),t.jsx(me,{isLoading:!0,children:"Loading"})]})]}),bi=({palette:e,config:o})=>t.jsx(s.View,{style:{color:e.text},children:t.jsxs(s.Vertical,{gap:14,children:[t.jsxs(s.Horizontal,{gap:10,flexWrap:"wrap",alignItems:"center",children:[t.jsx(_e,{content:"Badge"}),t.jsx(_e,{variant:"outline",content:"Outline"}),t.jsx(_e,{content:"Primary",views:{container:{backgroundColor:e.primary,color:e.onPrimary,borderColor:e.primary}}}),t.jsx(_e,{content:"Success",views:{container:{backgroundColor:e.success,color:e.onPrimary,borderColor:e.success}}}),t.jsx(_e,{content:"Warning",views:{container:{backgroundColor:e.warning,color:e.onPrimary,borderColor:e.warning}}}),t.jsx(_e,{content:"Error",views:{container:{backgroundColor:e.error,color:e.onPrimary,borderColor:e.error}}})]}),t.jsxs(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[t.jsx(ir,{status:"success",label:"Operational"}),t.jsx(ir,{status:"warning",label:"Degraded"}),t.jsx(ir,{status:"error",label:"Outage"}),t.jsx(ho,{size:"sm",loaderColor:o.theme.primary})]}),t.jsx(Pn,{title:"Heads up",description:"Brand styling cascades through every alert.",variant:"info",views:{container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},title:{color:e.text},description:{color:e.muted}}}),t.jsx(Ds,{value:64,height:10,showLabel:!0,color:e.primary,backgroundColor:e.border,views:{container:{backgroundColor:e.border},bar:{backgroundColor:e.primary}}})]})}),ki=({palette:e,config:o,mode:r})=>{const n={container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},field:{color:e.text}};return t.jsx(s.View,{style:{color:e.text},children:t.jsxs(s.Vertical,{gap:16,children:[t.jsxs(s.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[t.jsx(Be,{size:"md",label:"Name",placeholder:"Ada Lovelace",views:n}),t.jsx(Ft,{id:`forms-${o.metadata.id}-${r}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{container:n.container,field:{fontSize:14,lineHeight:"20px",color:e.text},text:{fontSize:14,lineHeight:"20px",color:e.text}}}),t.jsx($t,{label:"Notes",placeholder:"Add implementation notes",views:n})]}),t.jsxs(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[t.jsx(Gn,{label:"Email updates",defaultIsSelected:!0}),t.jsx(Yn,{label:"Standard",value:"standard",defaultIsSelected:!0}),t.jsx(qn,{label:"Enabled",isChecked:!0})]})]})})},gS=({config:e})=>{const[o,r]=p.useState(1),n=QC(e),a=ZC(e),i=tS(e);return t.jsxs(s.Vertical,{gap:24,children:[t.jsx(Re,{title:"Brand Snapshot (Light & Dark)",config:e,children:t.jsxs(s.Vertical,{gap:20,children:[t.jsx(Te,{config:e,palette:n,label:"On light surface",children:t.jsx(hi,{palette:n,personality:i,config:e})}),t.jsx(Te,{config:e,palette:a,label:"On dark surface",children:t.jsx(hi,{palette:a,personality:i,config:e})})]})}),t.jsx(Re,{title:"Buttons — Light & Dark",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(Te,{config:e,palette:n,label:"On light surface",children:t.jsx(xi,{palette:n})}),t.jsx(Te,{config:e,palette:a,label:"On dark surface",children:t.jsx(xi,{palette:a})})]})}),t.jsx(Re,{title:"Status & Feedback — Light & Dark",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(Te,{config:e,palette:n,label:"On light surface",children:t.jsx(bi,{palette:n,config:e})}),t.jsx(Te,{config:e,palette:a,label:"On dark surface",children:t.jsx(bi,{palette:a,config:e})})]})}),t.jsx(Re,{title:"Forms — Light & Dark",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(Te,{config:e,palette:n,label:"On light surface",children:t.jsx(ki,{palette:n,config:e,mode:"light"})}),t.jsx(Te,{config:e,palette:a,label:"On dark surface",children:t.jsx(ki,{palette:a,config:e,mode:"dark"})})]})}),t.jsx(Re,{title:"Forms (legacy preview)",config:e,children:t.jsxs(s.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",alignItems:"start",gap:16,children:[t.jsx(Be,{size:"md",label:"Name",placeholder:"Ada Lovelace"}),t.jsx(Ft,{id:`design-system-select-${e.metadata.id}`,size:"md",label:"Plan",placeholder:"Select plan",options:[{label:"Starter",value:"starter"},{label:"Team",value:"team"},{label:"Enterprise",value:"enterprise"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),t.jsx($t,{label:"Notes",placeholder:"Add implementation notes"}),t.jsxs(s.Vertical,{gap:12,children:[t.jsx(Gn,{label:"Email updates",defaultIsSelected:!0}),t.jsx(Yn,{label:"Standard",value:"standard",defaultIsSelected:!0}),t.jsx(qn,{label:"Enabled",isChecked:!0}),t.jsx(Fl,{defaultValue:58,showValue:!0}),t.jsx(Tl,{length:6,label:"Verification Code"})]})]})}),t.jsx(Re,{title:"Form States",config:e,children:t.jsxs(s.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[t.jsx(Be,{size:"md",label:"Default",placeholder:"Type here",helperText:"Resting state"}),t.jsx(Be,{size:"md",label:"Filled",defaultValue:"Ada Lovelace",helperText:"Has value"}),t.jsx(Be,{size:"md",label:"With helper",placeholder:"user@example.com",helperText:"We'll never share your email"}),t.jsx(Be,{size:"md",label:"Error",defaultValue:"invalid@",error:"Please enter a valid email"}),t.jsx(Be,{size:"md",label:"Disabled",isDisabled:!0,defaultValue:"Cannot edit",helperText:"Field locked"}),t.jsx(Be,{size:"md",label:"Read only",defaultValue:"Read-only value",isReadOnly:!0,helperText:"View only"}),t.jsx(Ft,{id:`design-system-select-error-${e.metadata.id}`,size:"md",label:"Select error",placeholder:"Pick one",error:!0,helperText:"Selection required",options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}}),t.jsx(Ft,{id:`design-system-select-disabled-${e.metadata.id}`,size:"md",label:"Select disabled",placeholder:"Disabled",isDisabled:!0,options:[{label:"Option A",value:"a"},{label:"Option B",value:"b"}],views:{field:{fontSize:14,lineHeight:"20px"},text:{fontSize:14,lineHeight:"20px"}}})]})}),t.jsx(Re,{title:"Elevation & Depth",config:e,children:t.jsx(s.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:20,children:aS(e).map(l=>t.jsxs(s.Vertical,{gap:12,children:[t.jsx(s.View,{height:120,borderRadius:12,backgroundColor:e.theme.canvas,style:{boxShadow:l.shadow}}),t.jsxs(s.Vertical,{gap:4,children:[t.jsxs(s.Horizontal,{gap:8,alignItems:"baseline",flexWrap:"wrap",children:[t.jsx(s.Text,{fontSize:12,fontWeight:"700",children:l.name}),t.jsx(s.Text,{fontSize:11,fontWeight:"600",color:e.theme.primary,children:l.label})]}),t.jsx(s.Text,{fontSize:11,color:e.theme.muted,children:l.description}),t.jsx(s.Text,{fontSize:10,color:e.theme.muted,style:{wordBreak:"break-word",opacity:.8},children:l.shadow})]})]},l.name))})}),t.jsx(Re,{title:"Color Blocks",config:e,children:t.jsx(s.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(160px, 1fr))",gap:12,children:[["primary","Primary",e.theme.onPrimary],["secondary","Secondary",e.theme.onPrimary],["success","Success","#ffffff"],["warning","Warning","#ffffff"],["error","Error","#ffffff"],["canvas","Canvas",e.theme.text],["surface","Surface",e.theme.text],["text","Text",e.theme.canvas],["muted","Muted",e.theme.canvas],["border","Border",e.theme.text],["onPrimary","On primary",e.theme.text]].map(([l,u,c])=>{const d=e.theme[l];return t.jsxs(s.Vertical,{gap:0,borderRadius:12,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,children:[t.jsx(s.View,{height:88,backgroundColor:d}),t.jsxs(s.Vertical,{gap:4,padding:12,backgroundColor:e.theme.surface,children:[t.jsx(s.Text,{fontSize:13,fontWeight:"700",children:u}),t.jsxs(s.Text,{fontSize:11,color:e.theme.muted,children:["theme.",l]}),t.jsx(s.Text,{fontSize:11,color:e.theme.muted,children:d})]})]},l)})})}),t.jsx(Re,{title:"Pricing — Booking (Light & Dark)",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(Te,{config:e,palette:n,label:"On light surface",children:t.jsx(si,{palette:n})}),t.jsx(Te,{config:e,palette:a,label:"On dark surface",children:t.jsx(si,{palette:a})})]})}),t.jsx(Re,{title:"Pricing — SaaS Tiers (Light & Dark)",config:e,children:t.jsxs(s.Vertical,{gap:20,children:[t.jsx(Te,{config:e,palette:n,label:"On light surface",children:t.jsx(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:ci.map(l=>t.jsx(di,{palette:n,tier:l,personality:i},l.name))})}),t.jsx(Te,{config:e,palette:a,label:"On dark surface",children:t.jsx(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:ci.map(l=>t.jsx(di,{palette:a,tier:l,personality:i},l.name))})})]})}),t.jsx(Re,{title:"Pricing — Product (Light & Dark)",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(Te,{config:e,palette:n,label:"On light surface",children:t.jsx(ui,{palette:n,personality:i})}),t.jsx(Te,{config:e,palette:a,label:"On dark surface",children:t.jsx(ui,{palette:a,personality:i})})]})}),t.jsx(Re,{title:"Pricing — Featured w/ Badge & Favorite (Light & Dark)",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(Te,{config:e,palette:n,label:"On light surface",children:t.jsx(pi,{palette:n,personality:i})}),t.jsx(Te,{config:e,palette:a,label:"On dark surface",children:t.jsx(pi,{palette:a,personality:i})})]})}),t.jsx(Re,{title:"Content — Color Block Cards",config:e,children:t.jsx(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:pS.map(l=>t.jsx(mS,{block:l,palette:n,personality:i},l.slug))})}),t.jsx(Re,{title:"Content — Article Cards w/ Badge & Favorite (Light & Dark)",config:e,children:t.jsxs(s.Vertical,{gap:20,children:[t.jsx(Te,{config:e,palette:n,label:"On light surface",children:t.jsx(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:mi.map(l=>t.jsx(gi,{palette:n,article:l,personality:i},l.id))})}),t.jsx(Te,{config:e,palette:a,label:"On dark surface",children:t.jsx(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:mi.map(l=>t.jsx(gi,{palette:a,article:l,personality:i},l.id))})})]})}),t.jsx(Re,{title:"CTA Card — Light & Dark",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(Te,{config:e,palette:n,label:"On light surface",children:t.jsx(fi,{palette:n,config:e})}),t.jsx(Te,{config:e,palette:a,label:"On dark surface",children:t.jsx(fi,{palette:a,config:e})})]})}),t.jsx(Re,{title:"Product Card — Light & Dark",config:e,children:t.jsxs(s.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[t.jsx(Te,{config:e,palette:n,label:"On light surface",children:t.jsx(yi,{palette:n,config:e})}),t.jsx(Te,{config:e,palette:a,label:"On dark surface",children:t.jsx(yi,{palette:a,config:e})})]})}),t.jsx(Re,{title:"Content & Layout",config:e,children:t.jsxs(s.Vertical,{gap:24,children:[t.jsxs(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:[t.jsxs(Ae,{width:"min(100%, 320px)",children:[t.jsx(Ae.Header,{children:t.jsxs(s.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[t.jsx(s.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Falcon 9":"Product Card"}),t.jsx(_e,{variant:"filled",content:"New"})]})}),t.jsx(Ae.Content,{children:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:e.metadata.id==="spacex"?"The world's first orbital-class reusable rocket. Designed for reliable and safe transport of people and payloads.":"Card surfaces, borders, typography, and shadows come from the active JSON config."})}),t.jsx(Ae.Footer,{children:t.jsx(me,{size:"sm",children:e.metadata.id==="spacex"?"Explore":"Review"})})]}),t.jsxs(Ae,{width:"min(100%, 320px)",children:[t.jsx(Ae.Header,{children:t.jsxs(s.Horizontal,{gap:12,alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",children:[t.jsxs(s.Horizontal,{gap:12,alignItems:"center",children:[t.jsx(Vi,{fallback:e.metadata.label.slice(0,2)}),t.jsxs(s.Vertical,{gap:2,children:[t.jsx(s.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Starship":e.metadata.label}),t.jsx(s.Text,{fontSize:12,color:e.theme.muted,children:e.metadata.id==="spacex"?"Multiplanetary mission":"Config-driven preview"})]})]}),t.jsx(_e,{variant:"outline",content:"Active"})]})}),t.jsx(Ae.Content,{children:e.metadata.id==="spacex"?t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:"The most powerful launch vehicle ever developed. Designed to carry crew and cargo to Mars and beyond."}):t.jsx(Pn,{variant:"info",title:"Config active",description:"This alert is rendered by the shared component."})})]})]}),t.jsx(dS,{config:e}),t.jsx(Hi,{ratio:16/9,borderRadius:12,overflow:"hidden",children:t.jsx(s.View,{width:"100%",height:"100%",backgroundColor:e.theme.primary,children:t.jsxs(s.Vertical,{height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[t.jsx(s.Text,{fontWeight:"700",color:e.theme.onPrimary,children:"16:9 Aspect Ratio"}),t.jsx(_e,{content:"Config primary color"})]})})}),t.jsxs(Xe,{children:[t.jsx(Xe.Content,{children:[1,2,3].map(l=>t.jsx(Xe.Item,{children:t.jsx(s.View,{height:200,borderRadius:12,alignItems:"center",justifyContent:"center",backgroundColor:e.theme.surface,borderColor:e.theme.border,borderWidth:1,borderStyle:"solid",children:t.jsxs(s.Text,{fontSize:24,fontWeight:"700",children:["Slide ",l]})})},l))}),t.jsxs(s.Horizontal,{gap:12,marginTop:12,justifyContent:"center",children:[t.jsx(Xe.Previous,{}),t.jsx(Xe.Next,{})]})]})]})}),t.jsx(Re,{title:"Navigation & Interactive",config:e,children:t.jsxs(s.Vertical,{gap:18,children:[t.jsxs(s.Vertical,{gap:20,children:[t.jsxs(s.Vertical,{gap:8,children:[t.jsx(s.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"With icons"}),t.jsx(at,{tabs:iS,defaultValue:"homes",views:{tab:{borderRadius:jt(e,"tabs")},activeTab:{borderRadius:jt(e,"tabs")}}})]}),t.jsxs(s.Vertical,{gap:8,children:[t.jsx(s.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"Without icons"}),t.jsx(at,{defaultValue:"overview",views:{tab:{borderRadius:jt(e,"tabs")},activeTab:{borderRadius:jt(e,"tabs")}},tabs:[{title:"Overview",value:"overview",content:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:"Tokens and components share the active config."})},{title:"Usage",value:"usage",content:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Audit",value:"audit",content:t.jsx(s.Text,{fontSize:14,lineHeight:"20px",children:"Plain text tabs without icons."})}]})]})]}),t.jsx(Eo,{items:sS,orientation:"horizontal",defaultActiveItemId:"components"}),(()=>{const l=jt(e,"accordion"),u={borderWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,marginBottom:0,borderRadius:0},c={...u,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:e.theme.border};return t.jsxs(Ke,{defaultValue:"tokens",collapsible:!0,shape:"rounded",views:{container:{borderRadius:l,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border}},children:[t.jsxs(Ke.Item,{value:"tokens",...u,views:{item:u,trigger:{borderRadius:0}},children:[t.jsx(Ke.Trigger,{children:"Token extraction"}),t.jsx(Ke.Content,{children:t.jsxs(s.Text,{color:e.theme.muted,children:[Object.keys(e.tokens.rawCssVars).length," raw CSS variables were extracted from ",e.metadata.sourcePath,"."]})})]}),t.jsxs(Ke.Item,{value:"overrides",...c,views:{item:c,trigger:{borderRadius:0}},children:[t.jsx(Ke.Trigger,{children:"Override behavior"}),t.jsx(Ke.Content,{children:t.jsx(s.Text,{color:e.theme.muted,children:"Props passed directly to components override the design-system defaults."})})]})]})})(),t.jsx(xr,{label:"advanced tools"}),t.jsxs(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[t.jsx(Zn,{color:e.theme.primary,children:"Toggle Button"}),t.jsx(Zl,{color:e.theme.primary,items:[{id:"left",value:"Left"},{id:"center",value:"Center"},{id:"right",value:"Right"}]}),t.jsx(Mr,{content:"Tooltip message",children:t.jsx(me,{variant:"outline",children:"Hover for Tooltip"})}),t.jsxs(Oe,{children:[t.jsx(Oe.Trigger,{children:t.jsx(me,{variant:"ghost",children:"Hover Card"})}),t.jsx(Oe.Content,{children:t.jsxs(s.Vertical,{gap:4,padding:12,children:[t.jsx(s.Text,{fontWeight:"700",children:"Detailed Info"}),t.jsx(s.Text,{fontSize:12,opacity:.8,children:"Hover cards provide more context."})]})})]}),t.jsx(ss,{value:e.theme.primary}),t.jsx(Ls,{shareData:{url:"https://example.com",title:"Example"}}),t.jsx(Wt,{to:"#",children:"Inline Link component"})]}),t.jsx(s.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:t.jsx(Ps,{currentPage:o,totalPages:10,onPageChange:r})})]})})]})},hS=({config:e})=>{var o;return t.jsxs(Rn,{config:e,children:[t.jsx(YC,{children:(o=e.metadata.googleFontLinks)==null?void 0:o.map(r=>t.jsx("link",{rel:"stylesheet",href:r},r))}),t.jsx(s.View,{minHeight:"100vh",padding:28,fontFamily:e.tokens.typography.fontFamily,backgroundColor:e.theme.canvas,color:e.theme.text,style:{textTransform:e.metadata.id==="spacex"?"uppercase":"none"},children:t.jsxs(s.Vertical,{gap:28,children:[t.jsxs(s.Vertical,{gap:12,maxWidth:900,children:[t.jsxs(s.Text,{as:"h1",fontSize:44,lineHeight:"48px",fontWeight:"800",fontFamily:e.tokens.typography.fontFamily,children:[e.metadata.label," Design System"]}),t.jsxs(s.Text,{fontSize:16,lineHeight:"24px",color:e.theme.muted,fontFamily:e.tokens.typography.fontFamily,children:["Live App Studio components rendered with the"," ",e.metadata.label," config defaults."]})]}),t.jsxs(s.Vertical,{gap:28,children:[t.jsx(uS,{config:e}),t.jsx(gS,{config:e})]})]})})]})};exports.Accordion=Ke;exports.ActionSheet=sm;exports.Alert=Pn;exports.ArrowIcon=Qp;exports.AspectRatio=Hi;exports.AttachmentGroup=rs;exports.AttachmentIcon=Ht;exports.AttachmentPreview=U1;exports.AudioIcon=nt;exports.AudioInput=Mb;exports.AudioWaveform=Dn;exports.Avatar=Vi;exports.BackIcon=Sp;exports.Background=Ys;exports.Badge=_e;exports.BatteryIcon=ip;exports.BlockEditor=Ry;exports.BluetoothIcon=Yp;exports.BoldArrowIcon=Jp;exports.BookmarkIcon=lp;exports.Button=me;exports.CHART_COLORS=Ye;exports.CalendarIcon=Dp;exports.CameraIcon=Gp;exports.Card=Ae;exports.Carousel=Xe;exports.Chart=j0;exports.ChartIcon=bp;exports.ChatInput=rc;exports.ChatWidget=Ks;exports.ChatWidgetComponent=na;exports.ChatWidgetWidget=Cb;exports.CheckIcon=Cp;exports.Checkbox=Gn;exports.ChevronIcon=je;exports.ClockIcon=$p;exports.CloseEyeIcon=En;exports.CloseIcon=Ue;exports.CloudIcon=sp;exports.ColorInput=Dg;exports.ColorPicker=ss;exports.ComboBox=oh;exports.Command=Ao;exports.ContextMenu=dt;exports.CookieConsent=F0;exports.CopyIcon=cp;exports.CountryPicker=qg;exports.CreditCardIcon=Ap;exports.CropIcon=om;exports.DEFAULT_CHART_COLORS=Xi;exports.DataState=ef;exports.DataStateDefaultLabels=Gl;exports.DatePicker=e1;exports.DefaultEmojiData=us;exports.DeleteIcon=dp;exports.DesignSystem=hS;exports.DesignSystemProvider=Rn;exports.Divider=ax;exports.DocumentIcon=xp;exports.DownloadIcon=mp;exports.DragAndDrop=sf;exports.DragAndDropComponent=es;exports.DragHandleIcon=Ti;exports.DragHandleLinesIcon=rm;exports.Drawer=Vo;exports.DropZone=yf;exports.DropdownMenu=pt;exports.DustBinIcon=wr;exports.EditIcon=up;exports.EmojiPicker=hs;exports.ErrorIcon=vr;exports.ExternalLinkIcon=zi;exports.FacebookIcon=Zu;exports.FileIcon=Mo;exports.FileImage=P0;exports.FileSVG=V0;exports.FilterIcon=Pp;exports.FolderIcon=qu;exports.FormikChatInput=c1;exports.FormikCheckbox=a1;exports.FormikColorInput=u1;exports.FormikComboBox=F1;exports.FormikCountryPicker=h1;exports.FormikDatePicker=m1;exports.FormikEmojiPicker=q1;exports.FormikForm=t1;exports.FormikIconPicker=O1;exports.FormikOTPInput=A1;exports.FormikPassword=I1;exports.FormikRadio=l1;exports.FormikSelect=y1;exports.FormikSelector=P1;exports.FormikSlider=z1;exports.FormikSwitch=b1;exports.FormikTagInput=C1;exports.FormikTextArea=w1;exports.FormikTextField=v1;exports.FormikToggle=$1;exports.FormikToggleGroup=B1;exports.FormikUploader=uc;exports.GiftIcon=Ip;exports.Gradient=Rs;exports.HeartIcon=rp;exports.HelpIcon=Nu;exports.HomeIcon=pp;exports.HoverCard=Oe;exports.Icon=zt;exports.IconPicker=Vy;exports.ImageIcon=Gu;exports.InfoIcon=xo;exports.InstagramIcon=Ju;exports.KeyboardAvoidingView=Ml;exports.LayoutIcon=Wp;exports.LikeIcon=Up;exports.Link=Wt;exports.LinkIcon=zp;exports.LinkedinIcon=ep;exports.Loader=ho;exports.LoadingSpinnerIcon=Wn;exports.LockIcon=hp;exports.LogoutIcon=Fp;exports.MagicWandIcon=Np;exports.MapPinIcon=Lp;exports.Markdown=zy;exports.MediaPreview=fh;exports.MenuIcon=Bp;exports.Menubar=Ho;exports.MessageLayout=wb;exports.MessageView=Qs;exports.MicrophoneIcon=Mn;exports.MinusIcon=Ii;exports.Modal=Po;exports.ModalLayout=sa;exports.ModalRouter=sa;exports.MoonIcon=kp;exports.MoreIcon=Hp;exports.MousePointerIcon=Ei;exports.NavigationMenu=Eo;exports.NotificationIcon=yp;exports.OTPInput=Tl;exports.OpenEyeIcon=An;exports.PageHeader=Gh;exports.PageLayout=yh;exports.Pagination=Ps;exports.PanelIcon=Wi;exports.Password=Gg;exports.PauseIcon=tp;exports.PlayIcon=Ri;exports.PlusIcon=gp;exports.PowerOffIcon=Mp;exports.PrintIcon=Op;exports.ProfileIcon=fp;exports.ProgressBar=Ds;exports.QuickReactionEmojis=ds;exports.Radio=Yn;exports.RadioGroup=Tg;exports.RefreshIcon=_p;exports.Resizable=ta;exports.RotateIcon=Tp;exports.Router=lC;exports.SaveIcon=ap;exports.SearchIcon=dr;exports.Select=Ft;exports.Selector=dg;exports.SendIcon=zn;exports.Separator=xr;exports.SettingsIcon=Fi;exports.ShapeIcon=vp;exports.ShareButton=Ls;exports.ShareIcon=Mi;exports.ShieldIcon=Rp;exports.Sidebar=_t;exports.Slider=Fl;exports.SliderIcon=em;exports.SpinnerIcon=Zp;exports.SplashScreen=dC;exports.StarIcon=np;exports.StatePanel=vt;exports.StatusIndicator=ir;exports.StopIcon=jr;exports.SuccessIcon=Hn;exports.Switch=qn;exports.Table=Fe;exports.Tabs=at;exports.TagInput=nh;exports.TextArea=$t;exports.TextField=Be;exports.TextIcon=jp;exports.ThreadsIcon=op;exports.TickIcon=Vt;exports.Title=Ul;exports.Toast=fC;exports.Toggle=Zn;exports.ToggleGroup=Zl;exports.Tooltip=Mr;exports.TrashIcon=Vp;exports.TwitchIcon=Xu;exports.TwitterIcon=Yu;exports.UnLikeIcon=qp;exports.UnlockIcon=Kp;exports.UploadIcon=Vn;exports.Uploader=Wr;exports.UserIcon=Ou;exports.VideoIcon=Uu;exports.WarningIcon=Fn;exports.WifiIcon=Xp;exports.XIcon=Ku;exports.YoutubeIcon=Qu;exports.ZapIcon=Ep;exports.ZoomInIcon=tm;exports.ZoomOutIcon=wp;exports.classifyDataStateError=Yl;exports.deepMerge=no;exports.defaultBlockEditorLabels=xs;exports.defaultDesignSystemConfig=Ci;exports.defaultEmojiPickerLabels=cs;exports.designSystemConfigList=Mu;exports.designSystemConfigs=vn;exports.getDesignSystemComponentProps=In;exports.goBack=nC;exports.hideDrawer=nc;exports.hideMessage=Js;exports.hideModal=la;exports.matchPath=mc;exports.mergeDesignSystemComponentProps=wi;exports.navigate=rC;exports.normalizeDesignSystemComponentProps=Tn;exports.setSplashLoaded=sC;exports.setSplashStarted=cC;exports.showDrawer=_b;exports.showMessage=Xs;exports.showModal=G1;exports.showToast=Do;exports.useDesignSystem=Sr;exports.useDesignSystemComponentProps=ct;exports.useDrawerStore=bo;exports.useHistory=ca;exports.useMarkdownTyping=vs;exports.useMergedDesignSystemComponentProps=ve;exports.useMessageStore=zr;exports.useModalStore=ko;exports.useRouterStore=to;exports.useSplashStore=Ar;exports.useToast=yC;
57
+ `:p.data;B!=null&&(p.cancelable?(p.preventDefault(),e.replace(B,R),x()):l.current={target:R,text:B})},k=C.useRef(I);return k.current=I,C.useEffect(()=>{const p=t.current,w=R=>k.current(R);return p==null||p.addEventListener("beforeinput",w,!0),()=>p==null?void 0:p.removeEventListener("beforeinput",w,!0)},[t]),{capture:D,selectedDocument:b,onKeyDown:m,onInputCapture:p=>{var W,A;const w=y(p.target),R=p.nativeEvent;if(!w||e.locked||R.isComposing||s.current)return;const B=f.current??S(w,R.inputType,e.current.current.selection);if(B){p.stopPropagation(),f.current=null,B.value===e.current.current.value?e.restoreSelection(B.selection):e.commit(B.value,B.selection),x();return}if(R.inputType==="historyUndo"||R.inputType==="historyRedo")p.stopPropagation(),e.undo(R.inputType==="historyRedo");else if(l.current||w.tagName!=="TEXTAREA"&&j(e.current.current.selection)&&(R.data!=null||(W=R.inputType)!=null&&W.startsWith("delete"))){p.stopPropagation();const{target:V,text:O}=l.current??{target:e.current.current.selection,text:(A=R.inputType)!=null&&A.startsWith("delete")?"":R.data};l.current=null,e.replace(O,V),x()}},onCopy:p=>d(p),onCut:p=>d(p,!0),onPaste:p=>{const w=y(p.target);if(!w||w.tagName==="TEXTAREA"||e.locked)return;const R=u(w);if(!R)return;p.preventDefault();const B=p.clipboardData.getData("text/plain");!B&&!Array.from(p.clipboardData.types||[]).includes("text/plain")||(e.capture(R),e.replace(B,R),x())},onPointerDownCapture:p=>{c.current=null,y(p.target)&&x()},onCompositionStartCapture:p=>{const w=y(p.target),R=w&&u(w);R&&j(R)&&!e.locked&&(s.current=R)},onCompositionEndCapture:p=>{const w=s.current;w&&(p.stopPropagation(),s.current=null,p.data?e.replace(p.data,w):e.restoreSelection(w),x())}}}function Dr({rect:e,state:t,props:r,preserve:g}){var i,s,l,f;const o=C.useRef(null),{themeMode:a}=h.useTheme(),[c,b]=C.useState({top:8,left:8});return C.useLayoutEffect(()=>{const x=()=>{var j;const u=(j=o.current)==null?void 0:j.getBoundingClientRect();u&&b({left:Math.max(8,Math.min(e.left,window.innerWidth-u.width-8)),top:Math.max(8,Math.min(e.top-u.height-8>=8?e.top-u.height-8:e.bottom+8,window.innerHeight-u.height-8))})};x();const y=typeof ResizeObserver>"u"?null:new ResizeObserver(x);return o.current&&(y==null||y.observe(o.current)),()=>y==null?void 0:y.disconnect()},[e,t.linkOpen,!!t.media,(i=t.media)==null?void 0:i.phase,(s=t.ai)==null?void 0:s.state,(l=t.ai)==null?void 0:l.result,(f=t.ai)==null?void 0:f.prompt,t.stale,t.message]),C.useEffect(()=>{if(!t.linkOpen&&!t.media&&!t.ai)return;const x=y=>{var u;y.target instanceof Node&&!((u=o.current)!=null&&u.contains(y.target))&&(t.media?t.closeMedia(!1):t.ai?t.closeAi(!1):t.closeLink(!1))};return document.addEventListener("pointerdown",x,!0),()=>document.removeEventListener("pointerdown",x,!0)},[t.linkOpen,!!t.media,!!t.ai]),n.jsx(h.View,{ref:o,"data-editor-selection-toolbar":"true","data-editor-link-popover":t.linkOpen?"true":void 0,"data-editor-ai-popover":t.ai?"true":void 0,role:t.linkOpen||t.media||t.ai?"dialog":void 0,"aria-label":t.media?t.labels.media:t.ai?t.labels.aiPanel:t.linkOpen?t.labels.link:void 0,onKeyDown:x=>{x.key==="Escape"&&(x.preventDefault(),x.stopPropagation(),t.media?t.closeMedia():t.ai?t.closeAi():t.linkOpen&&t.closeLink())},position:"fixed",top:c.top,left:c.left,maxWidth:"calc(100vw - 16px)",maxHeight:"calc(100vh - 16px)",overflow:"auto",backgroundColor:a==="dark"?"color-gray-900":"color-white",borderWidth:1,borderStyle:"solid",borderColor:a==="dark"?"color-gray-600":"color-gray-300",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.18)",borderRadius:10,padding:6,zIndex:1e3,children:t.linkOpen||t.media||t.ai?n.jsx(Ir,{state:t,views:r.views,uploadEnabled:!!r.uploadMedia,floating:!0}):n.jsx(Ge,{state:t,props:r,formatting:!0,preserve:g})})}function Rr({block:e,state:t,label:r,views:g}){const o=C.useRef(null),a=C.useRef(!1),c=C.useMemo(()=>n.jsx(It,{block:e}),[e.id,e.start,t.restoreVersion]),b=()=>{if(!o.current||a.current||t.locked)return;const i=wr(o.current);if(e.kind==="codeBlock"){const l=e.bodyStart-e.start;t.editBlock(e,ke(e.raw,{start:l,end:l+e.body.length},i.text),{start:l+i.selection.start,end:l+i.selection.end},!0,!1);return}const s=_e(i.text);t.editBlock(e,i.text,i.selection,!0,s.blocks.length!==1||s.blocks[0].kind!==e.kind)};return n.jsx(h.View,{ref:o,"data-block-id":e.id,"data-block-start":e.kind==="codeBlock"?e.bodyStart:e.start,"data-code-block":e.kind==="codeBlock"?e.id:void 0,"data-editor-input":"true",contentEditable:!t.locked,suppressContentEditableWarning:!0,role:"textbox","aria-label":r,"aria-multiline":"true","aria-readonly":t.locked,minHeight:24,flex:1,outline:"none",...g==null?void 0:g.content,onFocus:()=>t.setActiveId(e.id),onBeforeInput:i=>{if(i.defaultPrevented)return;const s=o.current&&Le(o.current,!0);s&&t.capture(s)},onInput:i=>{b()},onCompositionStart:()=>{a.current=!0},onCompositionEnd:()=>{a.current=!1,b()},onKeyDown:i=>{if(i.nativeEvent.isComposing||t.locked)return;const s=o.current&&Le(o.current,!0);s&&t.capture(s),i.key==="/"&&!i.metaKey&&!i.ctrlKey&&!e.body.trim()&&(i.preventDefault(),t.setCommandId(e.id))},children:c},t.restoreVersion)}function Mr({state:e,...t}){const{value:r,defaultValue:g,onChange:o,generate:a,uploadMedia:c,pickMedia:b,onSave:i,label:s=e.labels.document,isDisabled:l,isReadOnly:f,labels:x,views:y={},status:u,...j}=t,S=C.useRef(null),{themeMode:D}=h.useTheme(),[d,m]=C.useState(null),[I,k]=C.useState(null),M=C.useRef(null),p=C.useRef(null),w=Er(e,S,M,i,!!t.generate);C.useLayoutEffect(()=>{if(!e.linkOpen&&!e.media&&!e.ai||!S.current){k(null);return}const $=S.current.ownerDocument.getSelection(),F=$!=null&&$.rangeCount&&$.anchorNode&&S.current.contains($.anchorNode)?$.getRangeAt(0).cloneRange():null,X=p.current??S.current.querySelector(`[data-block-id="${e.activeId}"]`)??M.current??S.current,G=()=>{const U=F==null?void 0:F.getBoundingClientRect(),Q=U!=null&&U.height?U:X.getBoundingClientRect();k({top:Q.top,bottom:Q.bottom,left:Q.left})};return G(),window.addEventListener("scroll",G,!0),window.addEventListener("resize",G),()=>{window.removeEventListener("scroll",G,!0),window.removeEventListener("resize",G)}},[e.linkOpen,!!e.media,!!e.ai]);const R=C.useRef(null),B=C.useRef(null),W=C.useRef(null),A=C.useRef(null),V=C.useRef([]),O=C.useRef(null),[N,_]=C.useState(null),Z=$=>{$.preventDefault()},Y=()=>{var $;return Array.from((($=M.current)==null?void 0:$.querySelectorAll("[data-editor-row]"))||[])},q=()=>{var $;W.current!==null&&window.cancelAnimationFrame(W.current),W.current=null,R.current=null,($=B.current)==null||$.remove(),B.current=null,O.current=null,_(null)},H=($,F)=>$>F.from&&$<=F.to?-F.extent:$>=F.to&&$<F.from?F.extent:0,ee=($,F)=>{const X=Y()[$];return X?X.offsetTop+($>F.from?X.offsetHeight-F.height:0):F.top},re=$=>{const F=O.current;if(!F||F.to===$)return;const X={...F,to:$,top:ee($,F)};O.current=X,_(X)},ie=$=>{const F=O.current;if(!F||!M.current)return null;const X=$-M.current.getBoundingClientRect().top;if(X>=F.top&&X<=F.top+F.height)return F.to;const G=Y();let U=0;return G.forEach((Q,oe)=>{oe!==F.from&&X>=Q.offsetTop+H(oe,F)+Q.offsetHeight/2&&U++}),U};C.useEffect(()=>{q()},[e.value,e.locked,e.source]),C.useEffect(()=>{if(N!=null&&N.id)return window.addEventListener("resize",q),()=>window.removeEventListener("resize",q)},[N==null?void 0:N.id]),C.useEffect(()=>()=>{var $;W.current!==null&&window.cancelAnimationFrame(W.current),($=B.current)==null||$.remove(),V.current.forEach(F=>F.cancel())},[]),C.useLayoutEffect(()=>{var F;const $=A.current;$&&(A.current=null,V.current.forEach(X=>X.cancel()),V.current=[],!((F=window.matchMedia)!=null&&F.call(window,"(prefers-reduced-motion: reduce)").matches)&&Y().forEach(X=>{const G=$.get(X.dataset.editorRow),U=G===void 0?0:G-X.getBoundingClientRect().top;Math.abs(U)<1||!X.animate||V.current.push(X.animate([{transform:`translateY(${U}px)`},{transform:"translateY(0)"}],{duration:180,easing:"cubic-bezier(0.2, 0, 0, 1)"}))}))}),C.useEffect(()=>{const $=()=>{var ue;const F=S.current;if(!F||e.holdSelection.current||e.linkOpen)return;if(R.current){m(null);return}const X=F.ownerDocument.activeElement,G=w.capture()??Le(F),U=F.ownerDocument.getSelection(),Q=X==null?void 0:X.matches("input[data-editor-input],textarea[data-editor-input]");if(G&&G.start!==G.end&&(U!=null&&U.rangeCount)&&!Q&&!e.locked){const ae=U.getRangeAt(0).getBoundingClientRect();if(ae.bottom>0&&ae.top<window.innerHeight){m({top:ae.top,bottom:ae.bottom,left:ae.left});return}}m(null);const oe=F.ownerDocument.getSelection();if(oe&&!oe.isCollapsed&&oe.anchorNode&&!F.contains(oe.anchorNode)&&!((ue=oe.anchorNode.parentElement)!=null&&ue.closest("[data-editor-block-list]"))){const ae=e.current.current.selection.end;e.capture({start:ae,end:ae})}};return document.addEventListener("selectionchange",$),window.addEventListener("scroll",$,!0),window.addEventListener("resize",$),()=>{document.removeEventListener("selectionchange",$),window.removeEventListener("scroll",$,!0),window.removeEventListener("resize",$)}},[e.locked,e.source,e.linkOpen]),C.useLayoutEffect(()=>{!e.restoreVersion||!S.current||!e.restoreRequested.current||(e.restoreRequested.current=!1,e.source&&p.current?(p.current.focus({preventScroll:!0}),p.current.setSelectionRange(e.selection.start,e.selection.end,e.selection.backward?"backward":"forward")):wt(S.current,e.selection))},[e.restoreVersion,e.source]);const se=()=>{p.current&&e.capture({start:p.current.selectionStart,end:p.current.selectionEnd,...p.current.selectionDirection==="backward"?{backward:!0}:{}})};return n.jsxs(h.Vertical,{ref:S,gap:12,minWidth:0,"aria-label":s,"aria-disabled":l,...j,...y.container,onCopy:w.onCopy,onCut:w.onCut,onPaste:w.onPaste,onPointerDownCapture:w.onPointerDownCapture,onInputCapture:w.onInputCapture,onCompositionStartCapture:w.onCompositionStartCapture,onCompositionEndCapture:w.onCompositionEndCapture,onDragOver:$=>{if(!R.current||e.locked)return;$.preventDefault(),$.dataTransfer.dropEffect="move";const F=ie($.clientY);F!==null&&re(F)},onDragLeave:$=>{const F=$.currentTarget.getBoundingClientRect();($.clientX<F.left||$.clientX>F.right||$.clientY<F.top||$.clientY>F.bottom)&&O.current&&re(O.current.from)},onDrop:$=>{var X;if(!R.current||e.locked)return;$.preventDefault();const F=ie($.clientY);if(F!==null&&((X=e.document.blocks[F])==null?void 0:X.id)!==R.current){A.current=new Map(Y().map(U=>[U.dataset.editorRow,U.getBoundingClientRect().top]));const G=O.current;G&&M.current&&A.current.set(G.id,M.current.getBoundingClientRect().top+ee(F,G)),e.move(R.current,F)}q()},onKeyDown:$=>{$.nativeEvent.isComposing||($.key==="Escape"&&(q(),e.setCommandId(null),e.linkOpen&&e.closeLink(),e.ai&&e.closeAi(),e.media&&e.closeMedia(),m(null)),w.onKeyDown($))},children:[!f&&n.jsxs(h.Vertical,{position:"sticky",top:0,zIndex:10,backgroundColor:D==="dark"?"color-gray-900":"color-white",borderWidth:1,borderColor:"color-gray-200",borderStyle:"solid",borderRadius:8,padding:8,gap:4,children:[n.jsx(Ge,{state:e,props:t,preserve:Z}),e.source&&n.jsx(Ge,{state:e,props:t,formatting:!0,preserve:Z})]}),e.document.sourceMode&&n.jsx(h.Text,{role:"status",...y.notice,children:e.labels.sourceFallback}),e.message&&!e.linkOpen&&n.jsx(h.Text,{role:"status",...y.notice,children:e.message}),e.source?n.jsx(P.TextArea,{value:e.value,"data-editor-input":"true","data-editor-offset":0,label:s,isDisabled:l,isReadOnly:f,inputRef:$=>{p.current=$},onSelect:se,onFocus:se,onChange:$=>e.commit($,p.current?{start:p.current.selectionStart,end:p.current.selectionEnd}:e.selection,!0,!1),views:{textarea:{minHeight:240,fontFamily:"monospace",...y.source}}}):n.jsxs(h.Vertical,{ref:M,position:"relative",gap:12,"data-editor-block-list":"true",children:[N&&n.jsx(h.View,{"data-editor-drop-placeholder":N.to,"aria-hidden":"true",position:"absolute",left:0,right:0,top:0,height:N.height,borderWidth:1,borderStyle:"dashed",boxSizing:"border-box",borderColor:"theme-primary",borderRadius:8,backgroundColor:"theme-primary",opacity:.14,pointerEvents:"none",style:{transform:`translateY(${N.top}px)`,transition:N.reducedMotion?"none":"transform 180ms cubic-bezier(0.2, 0, 0, 1)"}}),e.document.blocks.map(($,F)=>{var X,G;return n.jsxs(h.Horizontal,{gap:8,alignItems:"flex-start",position:"relative",borderRadius:6,backgroundColor:w.selectedDocument?"theme-primary-100":e.activeId===$.id?"color-gray-50":void 0,_hover:{backgroundColor:"color-gray-50"},"data-editor-row":$.id,...y.block,opacity:(N==null?void 0:N.id)===$.id?0:((X=y.block)==null?void 0:X.opacity)??1,style:{...(G=y.block)==null?void 0:G.style,...N?{transform:`translateY(${H(F,N)}px)`,transition:N.reducedMotion?"none":"transform 180ms cubic-bezier(0.2, 0, 0, 1)"}:{}},children:[!f&&n.jsx(P.DropdownMenu,{views:{menu:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-300",backgroundColor:D==="dark"?"color-gray-900":"color-white",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.18)"},item:{as:"button",type:"button",width:"100%",textAlign:"left",borderWidth:0,_focusVisible:{outline:"2px solid",outlineColor:"theme-primary"}}},trigger:n.jsx(P.Button,{type:"button",size:"sm",variant:"ghost",isIcon:!0,minWidth:36,width:36,minHeight:36,padding:4,title:`${e.labels.drag} · ${e.labels.blocks}`,style:{userSelect:"none"},draggable:!e.locked,isDisabled:e.locked,cursor:N?"grabbing":"grab","aria-label":e.labels.drag,onDragStart:U=>{var oe;if(e.locked){U.preventDefault();return}R.current=$.id,V.current.forEach(ue=>ue.cancel()),V.current=[];const Q=U.currentTarget.closest("[data-editor-row]");if(Q){const ue=Q.getBoundingClientRect(),ae=Y(),he=ae[F+1],me=ae[F-1],qe=he?he.offsetTop-Q.offsetTop-Q.offsetHeight:me?Q.offsetTop-me.offsetTop-me.offsetHeight:0,Xe={id:$.id,from:F,to:F,height:Q.offsetHeight,extent:Q.offsetHeight+Math.max(0,qe),top:Q.offsetTop,reducedMotion:!!((oe=window.matchMedia)!=null&&oe.call(window,"(prefers-reduced-motion: reduce)").matches)};O.current=Xe,W.current=window.requestAnimationFrame(()=>{W.current=null,O.current&&_(O.current)});const ge=Q.cloneNode(!0);let Be="Canvas";for(let xe=Q;xe;xe=xe.parentElement){const Te=window.getComputedStyle(xe).backgroundColor;if(Te!=="transparent"&&Te!=="rgba(0, 0, 0, 0)"){Be=Te;break}}Object.assign(ge.style,{position:"fixed",left:"-10000px",top:"0",width:`${ue.width}px`,padding:"8px",boxSizing:"border-box",borderRadius:"8px",backgroundColor:Be,boxShadow:"0 8px 24px rgba(0,0,0,0.18)",opacity:"1"}),ge.dataset.editorDragPreview="true",ge.setAttribute("aria-hidden","true"),ge.inert=!0,ge.querySelectorAll("[contenteditable]").forEach(xe=>{xe.style.outline="none"}),Q.ownerDocument.body.appendChild(ge),B.current=ge,U.dataTransfer.setDragImage(ge,U.clientX-ue.left+8,U.clientY-ue.top+8)}U.dataTransfer.setData("application/x-app-studio-block",$.id),U.dataTransfer.effectAllowed="move"},onDragEnd:q,children:n.jsx(E.DragHandleIcon,{widthHeight:18,strokeWidth:2})}),items:[{id:"transform",label:e.labels.blocks,disabled:e.locked,onClick:()=>e.setCommandId($.id)},...["below","duplicate","up","down","delete"].map(U=>({id:U,label:e.labels[U],disabled:e.locked||U==="up"&&F===0||U==="down"&&F===e.document.blocks.length-1,onClick:()=>e.action($.id,U)}))]},`${e.restoreVersion}-${e.commandId??""}`),n.jsx(Rr,{block:$,state:e,label:$.kind==="codeBlock"?e.labels.codeBlock:s,views:y})]},$.id)})]}),(e.linkOpen||e.media||e.ai?I:!e.source&&d)&&!e.locked&&n.jsx(ht.Portal,{children:n.jsx(Dr,{rect:e.linkOpen||e.media||e.ai?I:d,state:e,props:t,preserve:Z})}),n.jsx(P.Command,{open:!!e.commandId&&!e.locked,onOpenChange:$=>{$||e.closeCommand()},placeholder:e.labels.blocks,commands:gr.map($=>({id:$,name:e.labels[$],onSelect:()=>{e.commandId&&e.transform(e.commandId,$)}}))}),u]})}const Ar=e=>{const t=kr(e);return n.jsx(Mr,{...e,state:t})};function Lr(){const[e,t]=C.useState(()=>{var r;return typeof window<"u"&&!!((r=window.matchMedia)!=null&&r.call(window,"(prefers-reduced-motion: reduce)").matches)});return C.useEffect(()=>{var o,a;const r=(o=window.matchMedia)==null?void 0:o.call(window,"(prefers-reduced-motion: reduce)");if(!r)return;const g=()=>t(r.matches);return g(),(a=r.addEventListener)==null||a.call(r,"change",g),()=>{var c;return(c=r.removeEventListener)==null?void 0:c.call(r,"change",g)}},[]),e}const He=typeof Intl.Segmenter=="function"?new Intl.Segmenter(void 0,{granularity:"grapheme"}):void 0;function Tt(e,{typing:t=!1,isStreaming:r=!1,onTypingComplete:g}={}){const o=Lr(),a=!!t&&!o&&!!He,c=typeof t=="object"?t:void 0,b=Math.max(1,Math.floor(Number.isFinite(c==null?void 0:c.charsPerTick)?c.charsPerTick:3)),i=Math.max(1,Number.isFinite(c==null?void 0:c.intervalMs)?c.intervalMs:16),[s,l]=C.useState(()=>({value:e,length:a?0:e.length})),f=C.useRef(e),x=C.useRef(null),y=C.useRef(g);y.current=g;const u=C.useMemo(()=>[0,...Array.from((He==null?void 0:He.segment(e))??[],p=>p.index+p.segment.length)],[e]),j=Math.max(0,u.length-(r?2:1)),S=u[j],D=e.startsWith(s.value)?Math.min(s.length,S):0;let d=0;for(;d+1<u.length&&u[d+1]<=D;)d++;const m=a?u[d]:e.length,I=e.slice(0,m),k=C.useRef({value:e,ends:u,index:d,targetIndex:j});k.current={value:e,ends:u,index:d,targetIndex:j};const M=a&&m<S;return C.useEffect(()=>{e.startsWith(f.current)||(x.current=null),f.current=e},[e]),C.useEffect(()=>{r&&(x.current=null)},[r]),C.useEffect(()=>{a||l(p=>p.value===e&&p.length===e.length?p:{value:e,length:e.length})},[a,e]),C.useEffect(()=>{if(!M)return;const p=setInterval(()=>{const w=k.current;l({value:w.value,length:w.ends[Math.min(w.index+b,w.targetIndex)]})},i);return()=>clearInterval(p)},[M,b,i]),C.useEffect(()=>{var p;t&&e&&!r&&m===e.length&&x.current!==e&&(x.current=e,(p=y.current)==null||p.call(y))},[e,t,r,m]),{displayedText:I,isTyping:a&&(m<e.length||r)}}function $r({value:e,label:t,onLinkPress:r,renderLink:g,allowImages:o=!0,allowVideos:a=!0,renderVideo:c,typing:b,isStreaming:i,onTypingComplete:s,labels:l,views:f={},native:x=!1,codeFontFamily:y="monospace",...u}){const{displayedText:j,isTyping:S}=Tt(e,{typing:b,isStreaming:i,onTypingComplete:s}),D=C.useRef([]),d=C.useMemo(()=>{const m=_e(j,D.current,void 0,{display:!0});return D.current=m.blocks,m},[j]);return n.jsxs(h.Vertical,{gap:12,minWidth:0,...x?{accessibilityLabel:t}:{role:t?"region":void 0,"aria-label":t},...u,...f.container,children:[d.sourceMode?n.jsxs(n.Fragment,{children:[n.jsx(h.Text,{...f.notice,children:(l==null?void 0:l.sourceFallback)??"This Markdown contains unsupported syntax. Its source is shown as plain text."}),n.jsx(h.Text,{fontFamily:y,...x?{selectable:!0}:{style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"}},...f.source,children:j})]}):d.blocks.filter(m=>m.raw).map(m=>n.jsx(h.View,{minWidth:0,...f.block,children:n.jsx(It,{block:m,native:x,codeFontFamily:y,isDisplay:!0,onLinkPress:r,renderLink:g,allowImages:o,allowVideos:a,renderVideo:c})},m.id)),S&&n.jsx(h.View,{as:"span",width:2,height:16,backgroundColor:"color-gray-700",...x?{accessibilityElementsHidden:!0}:{"aria-hidden":!0},animate:h.Animation.flash({duration:"0.8s",iterationCount:"infinite"})})]})}const Br=e=>n.jsx($r,{...e}),Vr=e=>{const t=K.useIconPickerState(e);return n.jsx(K.IconPickerView,{...t,...e})},Pr=Vr;function Fr({onSelect:e,onCancel:t,active:r}){const[g,o]=C.useState(null);C.useRef(null);const a=C.useCallback(i=>{var y;if(!r)return;const s=document.elementFromPoint(i.clientX,i.clientY);if(!s||s===document.body||s.closest('[data-chatwidget-ignore="true"]')||s.closest("#chatwidget-overlay")){o(null);return}const l=s.getBoundingClientRect();let f=s.tagName.toLowerCase();if(s.id)f+=`#${s.id}`;else if(s.className&&typeof s.className=="string"){const u=s.className.split(" ")[0];u&&(f+=`.${u}`)}const x=(y=s.innerText)==null?void 0:y.slice(0,20);x&&(f+=` ("${x}...")`),o({id:s.id||`el-${Date.now()}`,name:f,tagName:s.tagName.toLowerCase(),rect:l})},[r]),c=C.useCallback(i=>{!r||i.target.closest('[data-chatwidget-ignore="true"]')||(i.preventDefault(),i.stopPropagation(),g&&e(g))},[r,g,e]),b=C.useCallback(i=>{r&&i.key==="Escape"&&t()},[r,t]);return C.useEffect(()=>{if(!(typeof document>"u"))return r?(document.addEventListener("mousemove",a),document.addEventListener("click",c,!0),document.addEventListener("keydown",b),document.body.style.cursor="crosshair"):(o(null),document.removeEventListener("mousemove",a),document.removeEventListener("click",c,!0),document.removeEventListener("keydown",b),document.body.style.cursor=""),()=>{document.removeEventListener("mousemove",a),document.removeEventListener("click",c,!0),document.removeEventListener("keydown",b),document.body.style.cursor=""}},[r,a,c,b]),{highlightedElement:g}}function Wr({element:e}){return e?n.jsx("div",{id:"chatwidget-overlay",style:{position:"fixed",top:e.rect.top,left:e.rect.left,width:e.rect.width,height:e.rect.height,border:"2px solid #1D4ED8",backgroundColor:"rgba(29, 78, 216, 0.08)",pointerEvents:"none",zIndex:99999,transition:"top 0.1s ease-out, left 0.1s ease-out, width 0.1s ease-out, height 0.1s ease-out",borderRadius:"8px"},children:n.jsx("div",{style:{position:"absolute",top:"-24px",left:"0",backgroundColor:"#1D4ED8",color:"white",padding:"2px 8px",borderRadius:"9999px",fontSize:"12px",fontWeight:"bold",whiteSpace:"nowrap"},children:e.name})}):null}const Or=({initialMessages:e=[],onSendMessage:t,bubbleSize:r="md"})=>{const[g,o]=C.useState(!1),[a,c]=C.useState(!1),[b,i]=C.useState(e),[s,l]=C.useState([]),{highlightedElement:f}=Fr({active:a,onSelect:S=>{l(D=>[...D,S]),c(!1),o(!0)},onCancel:()=>{c(!1),o(!0)}}),x=()=>o(!g),y=()=>{c(!0),o(!1)},u=S=>{l(D=>D.filter(d=>d.id!==S))},j=S=>{const D={id:Date.now().toString(),role:"user",content:S,timestamp:new Date,contextElements:[...s]};i(d=>[...d,D]),t==null||t(S,s),l([]),setTimeout(()=>{var k;const d=Math.random()>.7,m=Math.random()>.4,I={id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date,content:d?"I will highlight the selected element.":`I received your message regarding: ${((k=D.contextElements)==null?void 0:k.map(M=>M.name).join(", "))||"general context"}. How can I assist you further?`,messageType:d?"tool":"text",reasoning:m?"Analyzing the user input and context... The user seems to be asking about specific elements. I should tailor my response to the selected context.":void 0};i(M=>[...M,I]),d&&setTimeout(()=>{i(M=>[...M,{id:(Date.now()+2).toString(),role:"assistant",messageType:"system",content:'Tool "highlightElement" executed successfully.',timestamp:new Date}])},800)},1e3)};return n.jsxs(h.View,{position:"fixed",bottom:24,right:24,zIndex:9999,children:[n.jsx(Wr,{element:f}),a&&n.jsx(h.View,{position:"fixed",top:24,left:"50%",transform:"translateX(-50%)",backgroundColor:"rgba(0,0,0,0.8)",color:"white",padding:"8px 16px",borderRadius:"24px",zIndex:1e4,boxShadow:"0 4px 6px rgba(0,0,0,0.1)",children:n.jsx(h.Text,{fontWeight:"600",fontSize:"14px",children:"Click an element to select it. Press ESC to cancel."})}),g&&n.jsxs(h.View,{position:"absolute",bottom:60,right:0,width:"400px",height:"600px",marginBottom:"16px",backgroundColor:"rgba(255, 255, 255, 0.8)",backdropFilter:"blur(20px)",borderRadius:"24px",border:"1px solid rgba(255, 255, 255, 0.4)",boxShadow:"0 25px 50px -12px rgba(0, 0, 0, 0.25)",overflow:"hidden",animation:"slideUp 0.3s ease-out",style:{animation:"fadeIn 0.2s ease-out",transformOrigin:"bottom right"},children:[n.jsxs(h.View,{padding:"16px",borderBottom:"1px solid rgba(0,0,0,0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",children:[n.jsx(h.Text,{fontWeight:"bold",color:"color-gray-800",children:"ChatWidget Assistant"}),n.jsx(h.View,{as:"button",onClick:()=>o(!1),cursor:"pointer",padding:"4px",borderRadius:"50%",border:"none",backgroundColor:"transparent",_hover:{backgroundColor:"rgba(0,0,0,0.05)"},children:n.jsx(E.CloseIcon,{widthHeight:16,color:"color-gray-500"})})]}),n.jsx(P.ChatWidget,{messages:b,onSubmit:j,size:r,variant:"minimal",enableContextPicker:!0,selectedContextElements:s,onContextPickerClick:y,onRemoveContextElement:u,styles:{container:{height:"calc(100% - 60px)",backgroundColor:"transparent"},inputContainer:{backgroundColor:"white",margin:"0 16px 16px 16px",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1)"}}})]}),!a&&n.jsx(h.View,{as:"button",onClick:x,width:"56px",height:"56px",borderRadius:"50%",backgroundColor:"theme-primary",border:"none",boxShadow:"0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",_hover:{transform:"scale(1.05)"},_active:{transform:"scale(0.95)"},"data-chatwidget-ignore":"true",children:g?n.jsx(E.CloseIcon,{widthHeight:24,color:"white"}):n.jsx(E.PanelIcon,{widthHeight:24,color:"white"})})]})},Hr={info:{container:{backgroundColor:"color-white",border:"rgba(191, 219, 254, 0.95)"},icon:{color:"theme-primary",name:"InformationIcon"},content:{color:"color-gray-900"},close:{color:"color-gray-500",name:"CloseIcon"}},success:{container:{backgroundColor:"#F0FDF4",border:"#BBF7D0"},icon:{color:"#16A34A",name:"SuccessIcon"},content:{color:"#14532D"},close:{color:"#15803D",name:"CloseIcon"}},error:{container:{backgroundColor:"#FEF2F2",border:"#FECACA"},icon:{color:"#DC2626",name:"ErrorIcon"},content:{color:"#7F1D1D"},close:{color:"#B91C1C",name:"CloseIcon"}},warning:{container:{backgroundColor:"#FFF7ED",border:"#FED7AA"},icon:{color:"#EA580C",name:"WarningIcon"},content:{color:"#9A3412"},close:{color:"#C2410C",name:"CloseIcon"}}},Et=({variant:e,hide:t,title:r,subtitle:g,theme:o,action:a,actionText:c,showIcon:b=!1,isClosable:i=!1,timeout:s=3e3,views:l})=>{var D,d;C.useEffect(()=>{if(s&&!i){const m=setTimeout(()=>{t()},s);return()=>{clearTimeout(m)}}},[]);const f=o??Hr,x=!!(a&&c),y={borderWidth:1,borderStyle:"solid",borderRadius:12,borderColor:`${f[e].container.border}`,boxShadow:"0 8px 24px rgba(15, 23, 42, 0.06)"},u={info:"#3b82f6",success:"#4ade80",warning:"#f97316",error:"#ef4444"}[e],j={info:n.jsx(E.InfoIcon,{widthHeight:24,color:u,...l==null?void 0:l.icon}),success:n.jsx(E.SuccessIcon,{widthHeight:24,color:u,...l==null?void 0:l.icon}),warning:n.jsx(E.WarningIcon,{widthHeight:24,color:u,...l==null?void 0:l.icon}),error:n.jsx(E.ErrorIcon,{widthHeight:24,color:u,...l==null?void 0:l.icon})}[e],S=b&&j;return n.jsxs(h.Horizontal,{role:"messageContent",gap:12,width:"100%",maxWidth:520,flexWrap:"nowrap",position:"relative",alignItems:"flex-start",padding:"12px 14px",color:`${f[e].content.color}`,backgroundColor:`${f[e].container.backgroundColor}`,onClick:i?()=>{}:()=>{t()},...y,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...l==null?void 0:l.container,children:[S&&j,n.jsxs(h.Vertical,{gap:4,width:"100%",children:[n.jsx(h.Text,{size:"md",weight:"semiBold",...l==null?void 0:l.title,children:r}),g&&n.jsx(h.Text,{size:"sm",lineHeight:"20px",color:f[e].content.color,...l==null?void 0:l.subtitle,children:g})]}),x&&n.jsx(h.View,{as:"button",type:"button",onClick:a,backgroundColor:"color-white",borderWidth:"1px",borderStyle:"solid",borderColor:f[e].container.border,borderRadius:"9999px",padding:"6px 12px",cursor:"pointer",transition:"background-color 0.2s ease, border-color 0.2s ease",...l==null?void 0:l.actionText,children:n.jsx(h.Text,{whiteSpace:"nowrap",size:"sm",weight:"semiBold",color:f[e].content.color,children:c})}),i&&n.jsx(h.View,{position:"absolute",zIndex:1e4,right:8,top:8,onClick:()=>{t()},cursor:"pointer",padding:"4px",borderRadius:"9999px",transition:"background-color 0.2s ease",...(D=l==null?void 0:l.closingIcon)==null?void 0:D.container,children:n.jsx(E.CloseIcon,{widthHeight:16,color:f[e].close.color,...(d=l==null?void 0:l.closingIcon)==null?void 0:d.icon})})]})},zr=({container:e,theme:t,position:r="topRight"})=>{const{visible:g,title:o,variant:a,subtitle:c,isClosable:b,views:i,action:s,actionText:l,showIcon:f,timeout:x}=ce.useMessageStore(),y={topLeft:{top:6,left:8},topRight:{top:6,right:8},bottomLeft:{bottom:8,left:6},bottomRight:{bottom:8,right:6}}[r],u=()=>n.jsx(Et,{variant:a,subtitle:c,show:g,title:o,theme:t,isClosable:b,views:i,action:s,actionText:l,showIcon:f,timeout:x,hide:()=>ce.hideMessage()}),j=e?C.cloneElement(e,{},u()):n.jsx(h.View,{position:"absolute",zIndex:1e4,...y,children:u()});return g?j:null};function Nr(e){const t=Math.floor(e/60),r=e%60;return`${t}:${r.toString().padStart(2,"0")}`}function Ur({onAudio:e,recording:t,paused:r,audioBlob:g,analyserNode:o,duration:a,error:c,startRecording:b,stopRecording:i,pauseRecording:s,resumeRecording:l,resetRecording:f,handleFileChange:x,...y}){const[u,j]=C.useState(null);C.useEffect(()=>{if(g){const d=URL.createObjectURL(g);return j({url:d,label:`recording-${Date.now()}.webm`}),()=>{URL.revokeObjectURL(d)}}return()=>{}},[g]);const S=()=>{u!=null&&u.url&&URL.revokeObjectURL(u.url),j(null),f()},D=d=>{e(d),u!=null&&u.url&&URL.revokeObjectURL(u.url),j({url:URL.createObjectURL(d),label:d.name})};return n.jsxs(h.Vertical,{gap:"10px",width:"100%",...y,children:[n.jsxs(h.Horizontal,{gap:12,alignItems:"center",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[n.jsx(ce.Uploader,{accept:"audio/*",icon:n.jsx(E.AttachmentIcon,{widthHeight:16}),maxSize:100*1024*1024,onFileSelect:D,fileType:"file",multiple:!1,renderError:({errorMessage:d})=>null,views:{container:{width:"36px",height:"36px",cursor:"pointer",border:"1px solid color-gray-200",borderRadius:"10px",backgroundColor:"color-white",transition:"background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease",_hover:{backgroundColor:"color-gray-50",borderColor:"color-gray-300"}}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"10px",width:"36px",height:"36px"},validateFile:d=>d.size>100*1024*1024?"File size exceeds 100MB limit":d.type.startsWith("audio/")?null:"Only audio files are allowed"}),n.jsx(h.View,{as:"button",type:"button",onClick:t?i:b,width:"36px",height:"36px",minWidth:"36px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"theme-primary",color:"color-white",borderRadius:"999px",border:"0",cursor:"pointer",transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{opacity:.92},children:t?n.jsx(E.StopIcon,{widthHeight:14,color:"color-white",filled:!1}):n.jsx(E.MicrophoneIcon,{widthHeight:18,color:"color-white",filled:!1})}),n.jsx(h.View,{flex:1,minWidth:120,children:n.jsx(ce.AudioWaveform,{analyserNode:t?o:null,isPaused:!t||r})}),n.jsx(h.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",whiteSpace:"nowrap",children:Nr(a)})]}),u&&!t&&n.jsxs(h.Vertical,{gap:"8px",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[n.jsxs(h.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:8,children:[n.jsx(h.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:u.label}),n.jsx(h.View,{as:"button",type:"button",onClick:S,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"0",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",children:n.jsx(E.CloseIcon,{widthHeight:14,color:"currentColor"})})]}),n.jsx(h.View,{as:"audio",controls:!0,src:u.url,width:"100%"})]}),c&&n.jsx(h.Text,{fontSize:"11px",lineHeight:"16px",color:"theme-error",children:c})]})}function _r(e){const{onAudio:t}=e,{recording:r,paused:g,audioBlob:o,analyserNode:a,duration:c,error:b,startRecording:i,stopRecording:s,pauseRecording:l,resumeRecording:f,resetRecording:x}=ce.useAudioRecording();return C.useEffect(()=>{if(o&&t){const u=new File([o],"recording.webm",{type:o.type||"audio/webm;codecs=opus"});t(u)}},[o,t]),{recording:r,paused:g,audioBlob:o,analyserNode:a,duration:c,error:b,startRecording:i,stopRecording:s,pauseRecording:l,resumeRecording:f,resetRecording:x,handleFileChange:u=>{var S;const j=(S=u.target.files)==null?void 0:S[0];j&&t&&t(j)}}}function qr(e){const t=_r(e);return n.jsx(Ur,{...e,...t})}const Xr=e=>{const t=K.useDatePickerState(e);return n.jsx(K.DatePickerView,{...t,...e})},Yr=Xr,vr=({logo:e,logoSrc:t,loader:r,showLoader:g=!0,duration:o=600,isLoaded:a,onHidden:c,backgroundColor:b="color-white",children:i,...s})=>{const l=P.useSplashStore(m=>m.loaded),f=a!==void 0?a:l,[x,y]=C.useState(!0),[u,j]=C.useState(!1);if(C.useEffect(()=>{if(!f||u)return;j(!0);const m=setTimeout(()=>{y(!1),c==null||c()},o);return()=>clearTimeout(m)},[f,u,o,c]),!x)return null;const S=h.isBrowser()?"fixed":"absolute",D=u?h.Animation.fadeOut({duration:`${o}ms`}):void 0,d=e??(t?n.jsx(h.Image,{src:t,width:120,height:120,alt:"logo"}):null);return n.jsxs(h.Center,{position:S,top:0,left:0,right:0,bottom:0,zIndex:9999,backgroundColor:b,animate:D,...s,children:[n.jsxs(h.Vertical,{alignItems:"center",gap:24,children:[d,g&&(r??n.jsx($e.Loader,{}))]}),i]})};exports.Accordion=P.Accordion;exports.AspectRatio=P.AspectRatio;exports.Background=P.Background;exports.Badge=P.Badge;exports.Button=P.Button;exports.CHART_COLORS=P.CHART_COLORS;exports.Carousel=P.Carousel;exports.ChatInput=P.ChatInput;exports.ChatWidget=P.ChatWidget;exports.ChatWidgetComponent=P.ChatWidgetComponent;exports.ColorPicker=P.ColorPicker;exports.Command=P.Command;exports.ContextMenu=P.ContextMenu;exports.DEFAULT_CHART_COLORS=P.DEFAULT_CHART_COLORS;exports.DesignSystem=P.DesignSystem;exports.DesignSystemProvider=P.DesignSystemProvider;exports.Divider=P.Divider;exports.Drawer=P.Drawer;exports.DropdownMenu=P.DropdownMenu;exports.Gradient=P.Gradient;exports.Menubar=P.Menubar;exports.NavigationMenu=P.NavigationMenu;exports.OTPInput=P.OTPInput;exports.Pagination=P.Pagination;exports.ProgressBar=P.ProgressBar;exports.Radio=P.Radio;exports.Resizable=P.Resizable;exports.Separator=P.Separator;exports.ShareButton=P.ShareButton;exports.Sidebar=P.Sidebar;exports.Slider=P.Slider;exports.StatusIndicator=P.StatusIndicator;exports.Table=P.Table;exports.TextArea=P.TextArea;exports.Title=P.Title;exports.Toast=P.Toast;exports.ToggleGroup=P.ToggleGroup;exports.Tooltip=P.Tooltip;exports.hideDrawer=P.hideDrawer;exports.setSplashLoaded=P.setSplashLoaded;exports.setSplashStarted=P.setSplashStarted;exports.showDrawer=P.showDrawer;exports.showToast=P.showToast;exports.useDrawerStore=P.useDrawerStore;exports.useSplashStore=P.useSplashStore;exports.useToast=P.useToast;exports.ArrowIcon=E.ArrowIcon;exports.AttachmentIcon=E.AttachmentIcon;exports.AudioIcon=E.AudioIcon;exports.BackIcon=E.BackIcon;exports.BatteryIcon=E.BatteryIcon;exports.BluetoothIcon=E.BluetoothIcon;exports.BoldArrowIcon=E.BoldArrowIcon;exports.BookmarkIcon=E.BookmarkIcon;exports.CalendarIcon=E.CalendarIcon;exports.CameraIcon=E.CameraIcon;exports.ChartIcon=E.ChartIcon;exports.CheckIcon=E.CheckIcon;exports.ChevronIcon=E.ChevronIcon;exports.ClockIcon=E.ClockIcon;exports.CloseEyeIcon=E.CloseEyeIcon;exports.CloseIcon=E.CloseIcon;exports.CloudIcon=E.CloudIcon;exports.CopyIcon=E.CopyIcon;exports.CreditCardIcon=E.CreditCardIcon;exports.CropIcon=E.CropIcon;exports.DeleteIcon=E.DeleteIcon;exports.DocumentIcon=E.DocumentIcon;exports.DownloadIcon=E.DownloadIcon;exports.DragHandleIcon=E.DragHandleIcon;exports.DragHandleLinesIcon=E.DragHandleLinesIcon;exports.DustBinIcon=E.DustBinIcon;exports.EditIcon=E.EditIcon;exports.ErrorIcon=E.ErrorIcon;exports.ExternalLinkIcon=E.ExternalLinkIcon;exports.FacebookIcon=E.FacebookIcon;exports.FileIcon=E.FileIcon;exports.FilterIcon=E.FilterIcon;exports.FolderIcon=E.FolderIcon;exports.GiftIcon=E.GiftIcon;exports.HeartIcon=E.HeartIcon;exports.HelpIcon=E.HelpIcon;exports.HomeIcon=E.HomeIcon;exports.Icon=E.Icon;exports.ImageIcon=E.ImageIcon;exports.InfoIcon=E.InfoIcon;exports.InstagramIcon=E.InstagramIcon;exports.LayoutIcon=E.LayoutIcon;exports.LikeIcon=E.LikeIcon;exports.LinkIcon=E.LinkIcon;exports.LinkedinIcon=E.LinkedinIcon;exports.LoadingSpinnerIcon=E.LoadingSpinnerIcon;exports.LockIcon=E.LockIcon;exports.LogoutIcon=E.LogoutIcon;exports.MagicWandIcon=E.MagicWandIcon;exports.MapPinIcon=E.MapPinIcon;exports.MenuIcon=E.MenuIcon;exports.MicrophoneIcon=E.MicrophoneIcon;exports.MinusIcon=E.MinusIcon;exports.MoonIcon=E.MoonIcon;exports.MoreIcon=E.MoreIcon;exports.MousePointerIcon=E.MousePointerIcon;exports.NotificationIcon=E.NotificationIcon;exports.OpenEyeIcon=E.OpenEyeIcon;exports.PanelIcon=E.PanelIcon;exports.PauseIcon=E.PauseIcon;exports.PlayIcon=E.PlayIcon;exports.PlusIcon=E.PlusIcon;exports.PowerOffIcon=E.PowerOffIcon;exports.PrintIcon=E.PrintIcon;exports.ProfileIcon=E.ProfileIcon;exports.RefreshIcon=E.RefreshIcon;exports.RotateIcon=E.RotateIcon;exports.SaveIcon=E.SaveIcon;exports.SearchIcon=E.SearchIcon;exports.SendIcon=E.SendIcon;exports.SettingsIcon=E.SettingsIcon;exports.ShapeIcon=E.ShapeIcon;exports.ShareIcon=E.ShareIcon;exports.ShieldIcon=E.ShieldIcon;exports.SliderIcon=E.SliderIcon;exports.SpinnerIcon=E.SpinnerIcon;exports.StarIcon=E.StarIcon;exports.StopIcon=E.StopIcon;exports.SuccessIcon=E.SuccessIcon;exports.TextIcon=E.TextIcon;exports.ThreadsIcon=E.ThreadsIcon;exports.TickIcon=E.TickIcon;exports.TrashIcon=E.TrashIcon;exports.TwitchIcon=E.TwitchIcon;exports.TwitterIcon=E.TwitterIcon;exports.UnLikeIcon=E.UnLikeIcon;exports.UnlockIcon=E.UnlockIcon;exports.UploadIcon=E.UploadIcon;exports.UserIcon=E.UserIcon;exports.VideoIcon=E.VideoIcon;exports.WarningIcon=E.WarningIcon;exports.WifiIcon=E.WifiIcon;exports.XIcon=E.XIcon;exports.YoutubeIcon=E.YoutubeIcon;exports.ZapIcon=E.ZapIcon;exports.ZoomInIcon=E.ZoomInIcon;exports.ZoomOutIcon=E.ZoomOutIcon;exports.Alert=Nt.Alert;exports.AudioWaveform=ce.AudioWaveform;exports.DefaultEmojiData=ce.DefaultEmojiData;exports.FormikForm=ce.FormikForm;exports.FormikUploader=ce.FormikUploader;exports.HoverCard=ce.HoverCard;exports.QuickReactionEmojis=ce.QuickReactionEmojis;exports.Toggle=ce.Toggle;exports.Uploader=ce.Uploader;exports.hideMessage=ce.hideMessage;exports.showMessage=ce.showMessage;exports.useMessageStore=ce.useMessageStore;exports.Avatar=Ut.Avatar;exports.Card=_t.Card;exports.Loader=$e.Loader;exports.Select=qt.Select;exports.Switch=Xt.Switch;exports.AttachmentPreview=K.AttachmentPreview;exports.FormikChatInput=K.FormikChatInput;exports.FormikCheckbox=K.FormikCheckbox;exports.FormikColorInput=K.FormikColorInput;exports.FormikComboBox=K.FormikComboBox;exports.FormikCountryPicker=K.FormikCountryPicker;exports.FormikDatePicker=K.FormikDatePicker;exports.FormikEmojiPicker=K.FormikEmojiPicker;exports.FormikIconPicker=K.FormikIconPicker;exports.FormikOTPInput=K.FormikOTPInput;exports.FormikPassword=K.FormikPassword;exports.FormikRadio=K.FormikRadio;exports.FormikSelect=K.FormikSelect;exports.FormikSelector=K.FormikSelector;exports.FormikSlider=K.FormikSlider;exports.FormikSwitch=K.FormikSwitch;exports.FormikTagInput=K.FormikTagInput;exports.FormikTextArea=K.FormikTextArea;exports.FormikTextField=K.FormikTextField;exports.FormikToggle=K.FormikToggle;exports.FormikToggleGroup=K.FormikToggleGroup;exports.defaultEmojiPickerLabels=K.defaultEmojiPickerLabels;exports.TextField=Me.TextField;exports.Checkbox=Yt.Checkbox;exports.Link=Ye.Link;exports.Tabs=vt.Tabs;exports.deepMerge=ye.deepMerge;exports.getDesignSystemComponentProps=ye.getDesignSystemComponentProps;exports.mergeDesignSystemComponentProps=ye.mergeDesignSystemComponentProps;exports.normalizeDesignSystemComponentProps=ye.normalizeDesignSystemComponentProps;exports.useDesignSystem=ye.useDesignSystem;exports.useDesignSystemComponentProps=ye.useDesignSystemComponentProps;exports.useMergedDesignSystemComponentProps=ye.useMergedDesignSystemComponentProps;exports.defaultDesignSystemConfig=Qe.defaultDesignSystemConfig;exports.designSystemConfigList=Qe.designSystemConfigList;exports.designSystemConfigs=Qe.designSystemConfigs;exports.Modal=we.Modal;exports.ModalLayout=we.ModalLayout;exports.ModalRouter=we.ModalLayout;exports.hideModal=we.hideModal;exports.showModal=we.showModal;exports.useModalStore=we.useModalStore;exports.Router=Je.Router;exports.matchPath=Je.matchPath;exports.useHistory=Je.useHistory;exports.goBack=et.goBack;exports.navigate=et.navigate;exports.useRouterStore=et.useRouterStore;exports.ActionSheet=en;exports.AttachmentGroup=kt;exports.AudioInput=qr;exports.BlockEditor=Ar;exports.Chart=Cn;exports.ChatWidgetWidget=Or;exports.ColorInput=Pn;exports.ComboBox=Nn;exports.CookieConsent=Tn;exports.CountryPicker=Wn;exports.DataState=or;exports.DataStateDefaultLabels=mt;exports.DatePicker=Yr;exports.DragAndDrop=cr;exports.DragAndDropComponent=bt;exports.DropZone=ur;exports.EmojiPicker=yt;exports.FileImage=Dn;exports.FileSVG=En;exports.IconPicker=Pr;exports.KeyboardAvoidingView=ft;exports.Markdown=Br;exports.MediaPreview=qn;exports.MessageLayout=zr;exports.MessageView=Et;exports.PageHeader=Zn;exports.PageLayout=Xn;exports.Password=Hn;exports.RadioGroup=Bn;exports.Selector=Mn;exports.SplashScreen=vr;exports.StatePanel=De;exports.TagInput=_n;exports.classifyDataStateError=xt;exports.defaultBlockEditorLabels=jt;exports.useMarkdownTyping=Tt;
92
58
  //# sourceMappingURL=web.cjs.js.map