@app-studio/components 0.11.5 → 0.11.7
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.
- package/dist/files/media/BlockEditor-drag-and-drop.md +61 -0
- package/dist/files/media/BlockEditor.mdx +84 -0
- package/dist/files/media/Button.mdx +1 -1
- package/dist/files/media/Checkbox.mdx +1 -1
- package/dist/files/media/ColorInput.mdx +1 -1
- package/dist/files/media/ColorPicker.mdx +1 -1
- package/dist/files/media/CountryPicker.mdx +1 -1
- package/dist/files/media/DatePicker.mdx +1 -1
- package/dist/files/media/EmojiPicker.mdx +22 -1
- package/dist/files/media/Markdown.mdx +99 -0
- package/dist/files/media/OTPInput.mdx +2 -2
- package/dist/files/media/Select.mdx +1 -1
- package/dist/files/media/Switch.mdx +2 -2
- package/dist/files/media/TextArea.mdx +8 -8
- package/dist/files/media/TextField.mdx +9 -9
- package/dist/index.d.ts +649 -511
- package/dist/native/components/Accordion/Accordion/Accordion.props.d.ts +1 -1
- package/dist/native/components/Accordion/Accordion/Accordion.state.js +1 -1
- package/dist/native/components/Accordion/Accordion/Accordion.view.d.ts +1 -1
- package/dist/native/components/Accordion/Accordion/Accordion.view.js +1 -1
- package/dist/native/components/Accordion/Accordion/Accordion.view.native.d.ts +1 -1
- package/dist/native/components/Accordion/Accordion/Accordion.view.native.js +1 -1
- package/dist/native/components/Accordion/Accordion.js +1 -1
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.props.d.ts +1 -1
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.state.js +1 -1
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.type.d.ts +1 -1
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.d.ts +1 -1
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.js +1 -1
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.native.d.ts +1 -1
- package/dist/native/components/ActionSheet/ActionSheet/ActionSheet.view.native.js +1 -1
- package/dist/native/components/ActionSheet/ActionSheet.d.ts +1 -1
- package/dist/native/components/ActionSheet/ActionSheet.js +1 -1
- package/dist/native/components/Alert/Alert/Alert.props.d.ts +1 -1
- package/dist/native/components/Alert/Alert/Alert.state.d.ts +1 -1
- package/dist/native/components/Alert/Alert/Alert.state.js +1 -1
- package/dist/native/components/Alert/Alert/Alert.view.d.ts +1 -1
- package/dist/native/components/Alert/Alert/Alert.view.js +1 -1
- package/dist/native/components/Alert/Alert/Alert.view.native.d.ts +1 -1
- package/dist/native/components/Alert/Alert/Alert.view.native.js +1 -1
- package/dist/native/components/Alert/Alert.d.ts +1 -1
- package/dist/native/components/Alert/Alert.js +1 -1
- package/dist/native/components/AppRoot/AppRoot.d.ts +1 -1
- package/dist/native/components/AppRoot/AppRoot.js +1 -1
- package/dist/native/components/AppRoot/AppRoot.native.d.ts +1 -1
- package/dist/native/components/AppRoot/AppRoot.native.js +1 -1
- package/dist/native/components/AppRoot/AppRoot.types.d.ts +1 -1
- package/dist/native/components/AspectRatio/AspectRatio/AspectRatio.view.d.ts +1 -1
- package/dist/native/components/AspectRatio/AspectRatio/AspectRatio.view.js +1 -1
- package/dist/native/components/AspectRatio/AspectRatio.d.ts +1 -1
- package/dist/native/components/AspectRatio/AspectRatio.js +1 -1
- package/dist/native/components/AttachmentGroup/AttachmentGroup/AttachmentGroup.d.ts +1 -1
- package/dist/native/components/AttachmentGroup/AttachmentGroup/AttachmentGroup.js +1 -1
- package/dist/native/components/AudioInput/AudioInput/AudioInput.state.js +1 -1
- package/dist/native/components/AudioInput/AudioInput/AudioInput.view.d.ts +1 -1
- package/dist/native/components/AudioInput/AudioInput/AudioInput.view.js +1 -1
- package/dist/native/components/AudioInput/AudioInput.d.ts +1 -1
- package/dist/native/components/AudioInput/AudioInput.js +1 -1
- package/dist/native/components/AudioInput/AudioWaveform/AudioWaveform.d.ts +1 -1
- package/dist/native/components/AudioInput/AudioWaveform/AudioWaveform.js +1 -1
- package/dist/native/components/AudioInput/AudioWaveform/AudioWaveform.view.d.ts +1 -1
- package/dist/native/components/AudioInput/AudioWaveform/AudioWaveform.view.js +1 -1
- package/dist/native/components/AudioInput/useAudioRecording.js +1 -1
- package/dist/native/components/AudioInput/useAudioRecording.native.js +1 -1
- package/dist/native/components/Avatar/Avatar/Avatar.props.d.ts +1 -1
- package/dist/native/components/Avatar/Avatar/Avatar.state.d.ts +1 -1
- package/dist/native/components/Avatar/Avatar/Avatar.state.js +1 -1
- package/dist/native/components/Avatar/Avatar/Avatar.view.d.ts +1 -1
- package/dist/native/components/Avatar/Avatar/Avatar.view.js +1 -1
- package/dist/native/components/Avatar/Avatar.d.ts +1 -1
- package/dist/native/components/Avatar/Avatar.js +1 -1
- package/dist/native/components/Background/Background/Background.props.d.ts +1 -1
- package/dist/native/components/Background/Background/Background.view.d.ts +1 -1
- package/dist/native/components/Background/Background/Background.view.js +1 -1
- package/dist/native/components/Background/Background/Background.view.native.d.ts +1 -1
- package/dist/native/components/Background/Background/Background.view.native.js +1 -1
- package/dist/native/components/Background/Background.d.ts +1 -1
- package/dist/native/components/Background/Background.js +1 -1
- package/dist/native/components/Badge/Badge/Badge.view.d.ts +1 -1
- package/dist/native/components/Badge/Badge/Badge.view.js +1 -1
- package/dist/native/components/Badge/Badge.d.ts +1 -1
- package/dist/native/components/Badge/Badge.js +1 -1
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.content.d.ts +16 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.content.js +193 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.content.js.map +1 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.controls.d.ts +13 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.controls.js +117 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.controls.js.map +1 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.dom.d.ts +8 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.dom.js +224 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.dom.js.map +1 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.keyboard.d.ts +16 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.keyboard.js +298 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.keyboard.js.map +1 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.model.d.ts +46 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.model.js +496 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.model.js.map +1 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.props.d.ts +74 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.props.js +51 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.props.js.map +1 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.selection.d.ts +13 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.selection.js +23 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.selection.js.map +1 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.state.d.ts +114 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.state.js +349 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.state.js.map +1 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.d.ts +6 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.js +492 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.js.map +1 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.native.d.ts +6 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.native.js +119 -0
- package/dist/native/components/BlockEditor/BlockEditor/BlockEditor.view.native.js.map +1 -0
- package/dist/native/components/BlockEditor/BlockEditor.d.ts +3 -0
- package/dist/native/components/BlockEditor/BlockEditor.js +8 -0
- package/dist/native/components/BlockEditor/BlockEditor.js.map +1 -0
- package/dist/native/components/Button/Button/Button.props.d.ts +1 -1
- package/dist/native/components/Button/Button/Button.state.d.ts +1 -1
- package/dist/native/components/Button/Button/Button.state.js +1 -1
- package/dist/native/components/Button/Button/Button.view.d.ts +1 -1
- package/dist/native/components/Button/Button/Button.view.js +1 -1
- package/dist/native/components/Button/Button/Button.view.native.d.ts +1 -1
- package/dist/native/components/Button/Button/Button.view.native.js +1 -1
- package/dist/native/components/Button/Button.d.ts +1 -1
- package/dist/native/components/Button/Button.js +1 -1
- package/dist/native/components/Card/Card/Card.context.d.ts +1 -1
- package/dist/native/components/Card/Card/Card.context.js +1 -1
- package/dist/native/components/Card/Card/Card.state.d.ts +1 -1
- package/dist/native/components/Card/Card/Card.state.js +1 -1
- package/dist/native/components/Card/Card/Card.view.d.ts +1 -1
- package/dist/native/components/Card/Card/Card.view.js +1 -1
- package/dist/native/components/Card/Card.js +1 -1
- package/dist/native/components/Carousel/Carousel/Carousel.context.d.ts +1 -1
- package/dist/native/components/Carousel/Carousel/Carousel.context.js +1 -1
- package/dist/native/components/Carousel/Carousel/Carousel.state.js +1 -1
- package/dist/native/components/Carousel/Carousel/Carousel.view.d.ts +1 -1
- package/dist/native/components/Carousel/Carousel/Carousel.view.js +1 -1
- package/dist/native/components/Carousel/Carousel/Carousel.view.native.d.ts +1 -1
- package/dist/native/components/Carousel/Carousel/Carousel.view.native.js +1 -1
- package/dist/native/components/Carousel/Carousel.js +1 -1
- package/dist/native/components/Chart/Chart/BarChart.d.ts +1 -1
- package/dist/native/components/Chart/Chart/BarChart.js +1 -1
- package/dist/native/components/Chart/Chart/BarChart.native.d.ts +1 -1
- package/dist/native/components/Chart/Chart/BarChart.native.js +1 -1
- package/dist/native/components/Chart/Chart/Chart.state.d.ts +2 -2
- package/dist/native/components/Chart/Chart/Chart.state.js +1 -1
- package/dist/native/components/Chart/Chart/Chart.view.d.ts +1 -1
- package/dist/native/components/Chart/Chart/Chart.view.js +1 -1
- package/dist/native/components/Chart/Chart/ChartTooltip.d.ts +1 -1
- package/dist/native/components/Chart/Chart/ChartTooltip.js +1 -1
- package/dist/native/components/Chart/Chart/LineChart.d.ts +1 -1
- package/dist/native/components/Chart/Chart/LineChart.js +1 -1
- package/dist/native/components/Chart/Chart/LineChart.native.d.ts +1 -1
- package/dist/native/components/Chart/Chart/LineChart.native.js +1 -1
- package/dist/native/components/Chart/Chart/PieChart.d.ts +1 -1
- package/dist/native/components/Chart/Chart/PieChart.js +1 -1
- package/dist/native/components/Chart/Chart/PieChart.native.d.ts +1 -1
- package/dist/native/components/Chart/Chart/PieChart.native.js +1 -1
- package/dist/native/components/Chart/Chart.d.ts +1 -1
- package/dist/native/components/Chart/Chart.js +1 -1
- package/dist/native/components/ChatInput/AttachmentGroup.d.ts +1 -1
- package/dist/native/components/ChatInput/AttachmentGroup.js +1 -1
- package/dist/native/components/ChatInput/AudioRecorder.d.ts +1 -1
- package/dist/native/components/ChatInput/AudioRecorder.js +1 -1
- package/dist/native/components/ChatInput/ChatInput/ChatInput.state.d.ts +7 -7
- package/dist/native/components/ChatInput/ChatInput/ChatInput.state.js +1 -1
- package/dist/native/components/ChatInput/ChatInput/ChatInput.view.d.ts +1 -1
- package/dist/native/components/ChatInput/ChatInput/ChatInput.view.js +1 -1
- package/dist/native/components/ChatInput/ChatInput.d.ts +1 -1
- package/dist/native/components/ChatInput/ChatInput.js +1 -1
- package/dist/native/components/ChatInput/ChatUploader.d.ts +1 -1
- package/dist/native/components/ChatInput/ChatUploader.js +1 -1
- package/dist/native/components/ChatInput/EditableInput.d.ts +1 -1
- package/dist/native/components/ChatInput/EditableInput.js +1 -1
- package/dist/native/components/ChatInput/EditableInput.native.d.ts +1 -1
- package/dist/native/components/ChatInput/EditableInput.native.js +1 -1
- package/dist/native/components/ChatInput/GuideTip.d.ts +1 -1
- package/dist/native/components/ChatInput/GuideTip.js +1 -1
- package/dist/native/components/ChatInput/MessageInput.d.ts +1 -1
- package/dist/native/components/ChatInput/MessageInput.js +2 -2
- package/dist/native/components/ChatInput/MessageInput.js.map +1 -1
- package/dist/native/components/ChatInput/MessageInput.native.d.ts +1 -1
- package/dist/native/components/ChatInput/MessageInput.native.js +1 -1
- package/dist/native/components/ChatInput/PromptExamples.d.ts +1 -1
- package/dist/native/components/ChatInput/PromptExamples.js +1 -1
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.state.d.ts +2 -2
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.state.js +1 -1
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.style.d.ts +1 -1
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.d.ts +1 -1
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.js +2 -2
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.js.map +1 -1
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.native.d.ts +1 -1
- package/dist/native/components/ChatWidget/ChatWidget/ChatWidget.view.native.js +1 -1
- package/dist/native/components/ChatWidget/ChatWidget.d.ts +1 -1
- package/dist/native/components/ChatWidget/ChatWidget.js +1 -1
- package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.d.ts +1 -1
- package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.js +1 -1
- package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.native.d.ts +1 -1
- package/dist/native/components/ChatWidget/Widget/ChatWidgetWidget.native.js +1 -1
- package/dist/native/components/ChatWidget/Widget/useContextSelector.d.ts +1 -1
- package/dist/native/components/ChatWidget/Widget/useContextSelector.js +1 -1
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.state.d.ts +2 -2
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.state.js +1 -1
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.d.ts +1 -1
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.js +1 -1
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.native.d.ts +1 -1
- package/dist/native/components/ColorPicker/ColorPicker/ColorPicker.view.native.js +1 -1
- package/dist/native/components/ColorPicker/ColorPicker.d.ts +1 -1
- package/dist/native/components/ColorPicker/ColorPicker.js +1 -1
- package/dist/native/components/Command/Command/Command.props.d.ts +1 -1
- package/dist/native/components/Command/Command/Command.state.d.ts +3 -3
- package/dist/native/components/Command/Command/Command.state.js +1 -1
- package/dist/native/components/Command/Command/Command.type.d.ts +1 -1
- package/dist/native/components/Command/Command/Command.view.d.ts +1 -1
- package/dist/native/components/Command/Command/Command.view.js +1 -1
- package/dist/native/components/Command/Command/Command.view.native.d.ts +1 -1
- package/dist/native/components/Command/Command/Command.view.native.js +1 -1
- package/dist/native/components/Command/Command/CommandOverlay.d.ts +1 -1
- package/dist/native/components/Command/Command/CommandOverlay.js +1 -1
- package/dist/native/components/Command/Command/CommandOverlay.native.d.ts +1 -1
- package/dist/native/components/Command/Command/CommandOverlay.native.js +1 -1
- package/dist/native/components/Command/Command/CommandTextInput.d.ts +1 -1
- package/dist/native/components/Command/Command/CommandTextInput.js +1 -1
- package/dist/native/components/Command/Command/CommandTextInput.native.d.ts +1 -1
- package/dist/native/components/Command/Command/CommandTextInput.native.js +1 -1
- package/dist/native/components/Command/Command.js +1 -1
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.props.d.ts +1 -1
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.state.d.ts +1 -1
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.state.js +1 -1
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.type.d.ts +1 -1
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.d.ts +1 -1
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.js +1 -1
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.d.ts +1 -1
- package/dist/native/components/ContextMenu/ContextMenu/ContextMenu.view.native.js +1 -1
- package/dist/native/components/ContextMenu/ContextMenu.js +1 -1
- package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.state.d.ts +1 -1
- package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.state.js +1 -1
- package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.view.d.ts +1 -1
- package/dist/native/components/CookieConsent/CookieConsent/CookieConsent.view.js +1 -1
- package/dist/native/components/CookieConsent/CookieConsent.d.ts +1 -1
- package/dist/native/components/CookieConsent/CookieConsent.js +1 -1
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.d.ts +1 -1
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.js +1 -1
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.native.d.ts +1 -1
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.state.native.js +1 -1
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.d.ts +1 -1
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.js +1 -1
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.native.d.ts +1 -1
- package/dist/native/components/DragAndDrop/DragAndDrop/DragAndDrop.view.native.js +1 -1
- package/dist/native/components/DragAndDrop/DragAndDrop.d.ts +1 -1
- package/dist/native/components/DragAndDrop/DragAndDrop.js +1 -1
- package/dist/native/components/Drawer/Drawer/Drawer.layout.d.ts +1 -1
- package/dist/native/components/Drawer/Drawer/Drawer.layout.js +1 -1
- package/dist/native/components/Drawer/Drawer/Drawer.props.d.ts +1 -1
- package/dist/native/components/Drawer/Drawer/Drawer.view.d.ts +1 -1
- package/dist/native/components/Drawer/Drawer/Drawer.view.js +1 -1
- package/dist/native/components/Drawer/Drawer/Drawer.view.native.d.ts +1 -1
- package/dist/native/components/Drawer/Drawer/Drawer.view.native.js +1 -1
- package/dist/native/components/Drawer/Drawer.js +1 -1
- package/dist/native/components/DropZone/DropZone/DropZone.state.js +1 -1
- package/dist/native/components/DropZone/DropZone/DropZone.view.d.ts +1 -1
- package/dist/native/components/DropZone/DropZone/DropZone.view.js +1 -1
- package/dist/native/components/DropZone/DropZone/DropZone.view.native.d.ts +1 -1
- package/dist/native/components/DropZone/DropZone/DropZone.view.native.js +1 -1
- package/dist/native/components/DropZone/DropZone.d.ts +1 -1
- package/dist/native/components/DropZone/DropZone.js +1 -1
- package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.props.d.ts +1 -1
- package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.state.d.ts +2 -2
- package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.state.js +1 -1
- package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.type.d.ts +1 -1
- package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.d.ts +1 -1
- package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.js +1 -1
- package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.native.d.ts +1 -1
- package/dist/native/components/DropdownMenu/DropdownMenu/DropdownMenu.view.native.js +1 -1
- package/dist/native/components/DropdownMenu/DropdownMenu.js +1 -1
- package/dist/native/components/EditComponent/EditComponent.d.ts +1 -1
- package/dist/native/components/EditComponent/EditComponent.js +1 -1
- package/dist/native/components/EditComponent/EditPanel.d.ts +1 -1
- package/dist/native/components/EditComponent/EditPanel.js +1 -1
- package/dist/native/components/EditComponent/EditToolbar.d.ts +1 -1
- package/dist/native/components/EditComponent/EditToolbar.js +1 -1
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.data.d.ts +3 -0
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.data.js +3011 -0
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.data.js.map +1 -0
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.props.d.ts +30 -2
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.props.js +18 -1
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.props.js.map +1 -1
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.state.d.ts +24 -3
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.state.js +147 -113
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.state.js.map +1 -1
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.style.d.ts +2 -2
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.style.js +1 -2211
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.style.js.map +1 -1
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.d.ts +1 -1
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.js +160 -90
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.js.map +1 -1
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.native.d.ts +1 -1
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.native.js +61 -85
- package/dist/native/components/EmojiPicker/EmojiPicker/EmojiPicker.view.native.js.map +1 -1
- package/dist/native/components/EmojiPicker/EmojiPicker.d.ts +1 -1
- package/dist/native/components/EmojiPicker/EmojiPicker.js +1 -1
- package/dist/native/components/File/File.d.ts +1 -1
- package/dist/native/components/File/File.js +1 -1
- package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.props.d.ts +1 -1
- package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.state.d.ts +1 -1
- package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.state.js +1 -1
- package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.d.ts +1 -1
- package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.js +1 -1
- package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.native.d.ts +1 -1
- package/dist/native/components/Form/Checkbox/Checkbox/Checkbox.view.native.js +1 -1
- package/dist/native/components/Form/Checkbox/Checkbox.d.ts +1 -1
- package/dist/native/components/Form/Checkbox/Checkbox.js +1 -1
- package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.props.d.ts +1 -1
- package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.state.d.ts +4 -4
- package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.state.js +1 -1
- package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.d.ts +1 -1
- package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.js +1 -1
- package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.native.d.ts +1 -1
- package/dist/native/components/Form/ColorInput/ColorInput/ColorInput.view.native.js +1 -1
- package/dist/native/components/Form/ColorInput/ColorInput.d.ts +1 -1
- package/dist/native/components/Form/ColorInput/ColorInput.js +1 -1
- package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.context.d.ts +1 -1
- package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.context.js +1 -1
- package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.props.d.ts +1 -1
- package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.provider.d.ts +1 -1
- package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.provider.js +1 -1
- package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.state.js +1 -1
- package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.d.ts +1 -1
- package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.js +1 -1
- package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.native.d.ts +1 -1
- package/dist/native/components/Form/ComboBox/ComboBox/ComboBox.view.native.js +1 -1
- package/dist/native/components/Form/ComboBox/ComboBox.d.ts +1 -1
- package/dist/native/components/Form/ComboBox/ComboBox.js +1 -1
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.state.d.ts +1 -1
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.state.js +1 -1
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.d.ts +1 -1
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.js +1 -1
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.native.d.ts +1 -1
- package/dist/native/components/Form/CountryPicker/CountryPicker/CountryPicker.view.native.js +1 -1
- package/dist/native/components/Form/CountryPicker/CountryPicker.d.ts +1 -1
- package/dist/native/components/Form/CountryPicker/CountryPicker.js +1 -1
- package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.state.d.ts +1 -1
- package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.state.js +1 -1
- package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.view.d.ts +1 -1
- package/dist/native/components/Form/DatePicker/DatePicker/DatePicker.view.js +1 -1
- package/dist/native/components/Form/DatePicker/DatePicker.d.ts +1 -1
- package/dist/native/components/Form/DatePicker/DatePicker.js +1 -1
- package/dist/native/components/Form/Label/Label/Label.view.d.ts +1 -1
- package/dist/native/components/Form/Label/Label/Label.view.js +1 -1
- package/dist/native/components/Form/Label/Label/Label.view.native.d.ts +1 -1
- package/dist/native/components/Form/Label/Label/Label.view.native.js +1 -1
- package/dist/native/components/Form/Label/Label.d.ts +1 -1
- package/dist/native/components/Form/Label/Label.js +1 -1
- package/dist/native/components/Form/Password/Password/Password.props.d.ts +1 -1
- package/dist/native/components/Form/Password/Password/Password.state.d.ts +1 -1
- package/dist/native/components/Form/Password/Password/Password.state.js +1 -1
- package/dist/native/components/Form/Password/Password/Password.type.d.ts +1 -1
- package/dist/native/components/Form/Password/Password.d.ts +1 -1
- package/dist/native/components/Form/Password/Password.js +1 -1
- package/dist/native/components/Form/Password/example/Default.d.ts +1 -1
- package/dist/native/components/Form/Password/example/Default.js +1 -1
- package/dist/native/components/Form/Password/example/DisabledInput.d.ts +1 -1
- package/dist/native/components/Form/Password/example/DisabledInput.js +1 -1
- package/dist/native/components/Form/Password/example/ErrorInput.d.ts +1 -1
- package/dist/native/components/Form/Password/example/ErrorInput.js +3 -5
- package/dist/native/components/Form/Password/example/ErrorInput.js.map +1 -1
- package/dist/native/components/Form/Password/example/HelperText.d.ts +1 -1
- package/dist/native/components/Form/Password/example/HelperText.js +2 -4
- package/dist/native/components/Form/Password/example/HelperText.js.map +1 -1
- package/dist/native/components/Form/Radio/Radio/Radio.props.d.ts +1 -1
- package/dist/native/components/Form/Radio/Radio/Radio.state.d.ts +1 -1
- package/dist/native/components/Form/Radio/Radio/Radio.state.js +1 -1
- package/dist/native/components/Form/Radio/Radio/Radio.view.d.ts +1 -1
- package/dist/native/components/Form/Radio/Radio/Radio.view.js +1 -1
- package/dist/native/components/Form/Radio/Radio/Radio.view.native.d.ts +1 -1
- package/dist/native/components/Form/Radio/Radio/Radio.view.native.js +1 -1
- package/dist/native/components/Form/Radio/Radio.d.ts +1 -1
- package/dist/native/components/Form/Radio/Radio.js +1 -1
- package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.props.d.ts +1 -1
- package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.state.js +1 -1
- package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.view.d.ts +1 -1
- package/dist/native/components/Form/Radio/RadioGroup/RadioGroup.view.js +1 -1
- package/dist/native/components/Form/Radio/RadioGroup.d.ts +1 -1
- package/dist/native/components/Form/Radio/RadioGroup.js +1 -1
- package/dist/native/components/Form/Select/Select/Select.state.d.ts +1 -1
- package/dist/native/components/Form/Select/Select/Select.state.js +1 -1
- package/dist/native/components/Form/Select/Select/Select.view.d.ts +1 -1
- package/dist/native/components/Form/Select/Select/Select.view.js +1 -1
- package/dist/native/components/Form/Select/Select/Select.view.native.d.ts +1 -1
- package/dist/native/components/Form/Select/Select/Select.view.native.js +1 -1
- package/dist/native/components/Form/Select/Select.d.ts +1 -1
- package/dist/native/components/Form/Select/Select.js +1 -1
- package/dist/native/components/Form/Selector/Selector/Selector.state.d.ts +1 -1
- package/dist/native/components/Form/Selector/Selector/Selector.state.js +1 -1
- package/dist/native/components/Form/Selector/Selector/Selector.view.d.ts +1 -1
- package/dist/native/components/Form/Selector/Selector/Selector.view.js +1 -1
- package/dist/native/components/Form/Selector/Selector/Selector.view.native.d.ts +1 -1
- package/dist/native/components/Form/Selector/Selector/Selector.view.native.js +1 -1
- package/dist/native/components/Form/Selector/Selector.d.ts +1 -1
- package/dist/native/components/Form/Selector/Selector.js +1 -1
- package/dist/native/components/Form/Switch/Switch/Switch.state.d.ts +1 -1
- package/dist/native/components/Form/Switch/Switch/Switch.state.js +1 -1
- package/dist/native/components/Form/Switch/Switch/Switch.view.d.ts +1 -1
- package/dist/native/components/Form/Switch/Switch/Switch.view.js +1 -1
- package/dist/native/components/Form/Switch/Switch/Switch.view.native.d.ts +1 -1
- package/dist/native/components/Form/Switch/Switch/Switch.view.native.js +1 -1
- package/dist/native/components/Form/Switch/Switch.d.ts +1 -1
- package/dist/native/components/Form/Switch/Switch.js +1 -1
- package/dist/native/components/Form/TagInput/TagInput/TagInput.props.d.ts +1 -1
- package/dist/native/components/Form/TagInput/TagInput/TagInput.state.d.ts +4 -4
- package/dist/native/components/Form/TagInput/TagInput/TagInput.state.js +1 -1
- package/dist/native/components/Form/TagInput/TagInput/TagInput.view.d.ts +1 -1
- package/dist/native/components/Form/TagInput/TagInput/TagInput.view.js +1 -1
- package/dist/native/components/Form/TagInput/TagInput.d.ts +1 -1
- package/dist/native/components/Form/TagInput/TagInput.js +1 -1
- package/dist/native/components/Form/TextArea/TextArea/TextArea.state.d.ts +4 -4
- package/dist/native/components/Form/TextArea/TextArea/TextArea.state.js +1 -1
- package/dist/native/components/Form/TextArea/TextArea/TextArea.view.d.ts +1 -1
- package/dist/native/components/Form/TextArea/TextArea/TextArea.view.js +1 -1
- package/dist/native/components/Form/TextArea/TextArea/TextArea.view.native.d.ts +1 -1
- package/dist/native/components/Form/TextArea/TextArea/TextArea.view.native.js +3 -3
- package/dist/native/components/Form/TextArea/TextArea/TextArea.view.native.js.map +1 -1
- package/dist/native/components/Form/TextArea/TextArea.d.ts +1 -1
- package/dist/native/components/Form/TextArea/TextArea.js +1 -1
- package/dist/native/components/Form/TextField/TextField/TextField.props.d.ts +1 -1
- package/dist/native/components/Form/TextField/TextField/TextField.state.d.ts +4 -4
- package/dist/native/components/Form/TextField/TextField/TextField.state.js +1 -1
- package/dist/native/components/Form/TextField/TextField/TextField.view.d.ts +1 -1
- package/dist/native/components/Form/TextField/TextField/TextField.view.js +1 -1
- package/dist/native/components/Form/TextField/TextField/TextField.view.native.d.ts +1 -1
- package/dist/native/components/Form/TextField/TextField/TextField.view.native.js +1 -1
- package/dist/native/components/Form/TextField/TextField.d.ts +1 -1
- package/dist/native/components/Form/TextField/TextField.js +1 -1
- package/dist/native/components/Formik/AttachmentPreview.d.ts +1 -1
- package/dist/native/components/Formik/AttachmentPreview.js +1 -1
- package/dist/native/components/Formik/Formik.ChatInput.d.ts +1 -1
- package/dist/native/components/Formik/Formik.ChatInput.js +1 -1
- package/dist/native/components/Formik/Formik.Checkbox.d.ts +1 -1
- package/dist/native/components/Formik/Formik.Checkbox.js +1 -1
- package/dist/native/components/Formik/Formik.ColorInput.d.ts +1 -1
- package/dist/native/components/Formik/Formik.ColorInput.js +1 -1
- package/dist/native/components/Formik/Formik.ComboBox.d.ts +1 -1
- package/dist/native/components/Formik/Formik.ComboBox.js +1 -1
- package/dist/native/components/Formik/Formik.CountryPicker.d.ts +1 -1
- package/dist/native/components/Formik/Formik.CountryPicker.js +1 -1
- package/dist/native/components/Formik/Formik.DatePicker.d.ts +1 -1
- package/dist/native/components/Formik/Formik.DatePicker.js +1 -1
- package/dist/native/components/Formik/Formik.EmojiPicker.d.ts +1 -1
- package/dist/native/components/Formik/Formik.EmojiPicker.js +2 -3
- package/dist/native/components/Formik/Formik.EmojiPicker.js.map +1 -1
- package/dist/native/components/Formik/Formik.Form.d.ts +1 -1
- package/dist/native/components/Formik/Formik.Form.js +1 -1
- package/dist/native/components/Formik/Formik.IconPicker.d.ts +1 -1
- package/dist/native/components/Formik/Formik.IconPicker.js +1 -1
- package/dist/native/components/Formik/Formik.OTPInput.d.ts +1 -1
- package/dist/native/components/Formik/Formik.OTPInput.js +1 -1
- package/dist/native/components/Formik/Formik.Password.d.ts +1 -1
- package/dist/native/components/Formik/Formik.Password.js +1 -1
- package/dist/native/components/Formik/Formik.Radio.d.ts +1 -1
- package/dist/native/components/Formik/Formik.Radio.js +1 -1
- package/dist/native/components/Formik/Formik.Select.d.ts +1 -1
- package/dist/native/components/Formik/Formik.Select.js +1 -1
- package/dist/native/components/Formik/Formik.Selector.d.ts +1 -1
- package/dist/native/components/Formik/Formik.Selector.js +1 -1
- package/dist/native/components/Formik/Formik.Slider.d.ts +1 -1
- package/dist/native/components/Formik/Formik.Slider.js +1 -1
- package/dist/native/components/Formik/Formik.Switch.d.ts +1 -1
- package/dist/native/components/Formik/Formik.Switch.js +1 -1
- package/dist/native/components/Formik/Formik.TagInput.d.ts +1 -1
- package/dist/native/components/Formik/Formik.TagInput.js +1 -1
- package/dist/native/components/Formik/Formik.TextArea.d.ts +1 -1
- package/dist/native/components/Formik/Formik.TextArea.js +1 -1
- package/dist/native/components/Formik/Formik.TextField.d.ts +1 -1
- package/dist/native/components/Formik/Formik.TextField.js +1 -1
- package/dist/native/components/Formik/Formik.Toggle.d.ts +1 -1
- package/dist/native/components/Formik/Formik.Toggle.js +1 -1
- package/dist/native/components/Formik/Formik.ToggleGroup.d.ts +1 -1
- package/dist/native/components/Formik/Formik.ToggleGroup.js +1 -1
- package/dist/native/components/Formik/Formik.Uploader.d.ts +1 -1
- package/dist/native/components/Formik/Formik.Uploader.js +1 -1
- package/dist/native/components/Gradient/Gradient/Gradient.view.d.ts +1 -1
- package/dist/native/components/Gradient/Gradient/Gradient.view.js +1 -1
- package/dist/native/components/Gradient/Gradient/Gradient.view.native.d.ts +1 -1
- package/dist/native/components/Gradient/Gradient/Gradient.view.native.js +1 -1
- package/dist/native/components/Gradient/Gradient.d.ts +1 -1
- package/dist/native/components/Gradient/Gradient.js +1 -1
- package/dist/native/components/HoverCard/HoverCard/HoverCard.props.d.ts +1 -1
- package/dist/native/components/HoverCard/HoverCard/HoverCard.state.d.ts +2 -2
- package/dist/native/components/HoverCard/HoverCard/HoverCard.state.js +1 -1
- package/dist/native/components/HoverCard/HoverCard/HoverCard.style.d.ts +1 -1
- package/dist/native/components/HoverCard/HoverCard/HoverCard.view.d.ts +1 -1
- package/dist/native/components/HoverCard/HoverCard/HoverCard.view.js +1 -1
- package/dist/native/components/HoverCard/HoverCard/HoverCard.view.native.d.ts +1 -1
- package/dist/native/components/HoverCard/HoverCard/HoverCard.view.native.js +1 -1
- package/dist/native/components/HoverCard/HoverCard.js +1 -1
- package/dist/native/components/Icon/Icon.d.ts +1 -1
- package/dist/native/components/Icon/Icon.js +1 -1
- package/dist/native/components/Icon/Icon.native.d.ts +1 -1
- package/dist/native/components/Icon/Icon.native.js +1 -1
- package/dist/native/components/IconPicker/IconPicker/IconPicker.state.d.ts +2 -2
- package/dist/native/components/IconPicker/IconPicker/IconPicker.state.js +1 -1
- package/dist/native/components/IconPicker/IconPicker/IconPicker.view.d.ts +1 -1
- package/dist/native/components/IconPicker/IconPicker/IconPicker.view.js +1 -1
- package/dist/native/components/IconPicker/IconPicker/IconPicker.view.native.d.ts +1 -1
- package/dist/native/components/IconPicker/IconPicker/IconPicker.view.native.js +1 -1
- package/dist/native/components/IconPicker/IconPicker.d.ts +1 -1
- package/dist/native/components/IconPicker/IconPicker.js +1 -1
- package/dist/native/components/Input/FieldContainer/FieldContainer/FieldContainer.props.d.ts +1 -1
- package/dist/native/components/Input/FieldContainer/FieldContainer.d.ts +1 -1
- package/dist/native/components/Input/FieldContainer/FieldContainer.js +1 -1
- package/dist/native/components/Input/FieldContent/FieldContent/FieldContent.props.d.ts +1 -1
- package/dist/native/components/Input/FieldContent/FieldContent.d.ts +1 -1
- package/dist/native/components/Input/FieldContent/FieldContent.js +1 -1
- package/dist/native/components/Input/FieldIcons/FieldIcons.d.ts +1 -1
- package/dist/native/components/Input/FieldIcons/FieldIcons.js +1 -1
- package/dist/native/components/Input/FieldLabel/FieldLabel/FieldLabel.props.d.ts +1 -1
- package/dist/native/components/Input/FieldLabel/FieldLabel.d.ts +1 -1
- package/dist/native/components/Input/FieldLabel/FieldLabel.js +1 -1
- package/dist/native/components/Input/FieldLayout/FieldLayout/FieldLayout.props.d.ts +1 -1
- package/dist/native/components/Input/FieldLayout/FieldLayout.d.ts +1 -1
- package/dist/native/components/Input/FieldLayout/FieldLayout.js +1 -1
- package/dist/native/components/Input/FieldWrapper/FieldWrapper.d.ts +1 -1
- package/dist/native/components/Input/FieldWrapper/FieldWrapper.js +1 -1
- package/dist/native/components/Input/HelperText/HelperText.d.ts +1 -1
- package/dist/native/components/Input/HelperText/HelperText.js +1 -1
- package/dist/native/components/Input/HelperText/HelperText.props.d.ts +1 -1
- package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.d.ts +1 -1
- package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.js +1 -1
- package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.native.d.ts +1 -1
- package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.native.js +1 -1
- package/dist/native/components/KeyboardAvoidingView/KeyboardAvoidingView.types.d.ts +1 -1
- package/dist/native/components/Link/Link/Link.props.d.ts +1 -1
- package/dist/native/components/Link/Link/Link.state.d.ts +1 -1
- package/dist/native/components/Link/Link/Link.state.js +1 -1
- package/dist/native/components/Link/Link/Link.view.d.ts +1 -1
- package/dist/native/components/Link/Link/Link.view.js +1 -1
- package/dist/native/components/Link/Link/Link.view.native.d.ts +1 -1
- package/dist/native/components/Link/Link/Link.view.native.js +1 -1
- package/dist/native/components/Link/Link.d.ts +1 -1
- package/dist/native/components/Link/Link.js +1 -1
- package/dist/native/components/Loader/Loader/Loader.props.d.ts +1 -1
- package/dist/native/components/Loader/Loader/Loader.view.d.ts +1 -1
- package/dist/native/components/Loader/Loader/Loader.view.js +1 -1
- package/dist/native/components/Loader/Loader/Loader.view.native.d.ts +1 -1
- package/dist/native/components/Loader/Loader/Loader.view.native.js +1 -1
- package/dist/native/components/Loader/Loader.d.ts +1 -1
- package/dist/native/components/Loader/Loader.js +1 -1
- package/dist/native/components/Markdown/Markdown/Markdown.content.d.ts +6 -0
- package/dist/native/components/Markdown/Markdown/Markdown.content.js +29 -0
- package/dist/native/components/Markdown/Markdown/Markdown.content.js.map +1 -0
- package/dist/native/components/Markdown/Markdown/Markdown.props.d.ts +16 -0
- package/dist/native/components/Markdown/Markdown/Markdown.props.js +2 -0
- package/dist/native/components/Markdown/Markdown/Markdown.props.js.map +1 -0
- package/dist/native/components/Markdown/Markdown/Markdown.view.d.ts +1 -0
- package/dist/native/components/Markdown/Markdown/Markdown.view.js +2 -0
- package/dist/native/components/Markdown/Markdown/Markdown.view.js.map +1 -0
- package/dist/native/components/Markdown/Markdown/Markdown.view.native.d.ts +3 -0
- package/dist/native/components/Markdown/Markdown/Markdown.view.native.js +8 -0
- package/dist/native/components/Markdown/Markdown/Markdown.view.native.js.map +1 -0
- package/dist/native/components/Markdown/Markdown.d.ts +3 -0
- package/dist/native/components/Markdown/Markdown.js +4 -0
- package/dist/native/components/Markdown/Markdown.js.map +1 -0
- package/dist/native/components/MediaPreview.d.ts +1 -1
- package/dist/native/components/MediaPreview.js +1 -1
- package/dist/native/components/Menubar/Menubar/Menubar.props.d.ts +1 -1
- package/dist/native/components/Menubar/Menubar/Menubar.state.d.ts +2 -2
- package/dist/native/components/Menubar/Menubar/Menubar.state.js +1 -1
- package/dist/native/components/Menubar/Menubar/Menubar.type.d.ts +1 -1
- package/dist/native/components/Menubar/Menubar/Menubar.view.d.ts +1 -1
- package/dist/native/components/Menubar/Menubar/Menubar.view.js +1 -1
- package/dist/native/components/Menubar/Menubar/Menubar.view.native.d.ts +1 -1
- package/dist/native/components/Menubar/Menubar/Menubar.view.native.js +1 -1
- package/dist/native/components/Menubar/Menubar.js +1 -1
- package/dist/native/components/Message/Message/Message.layout.d.ts +1 -1
- package/dist/native/components/Message/Message/Message.layout.js +1 -1
- package/dist/native/components/Message/Message/Message.layout.native.d.ts +1 -1
- package/dist/native/components/Message/Message/Message.layout.native.js +1 -1
- package/dist/native/components/Message/Message/Message.view.d.ts +1 -1
- package/dist/native/components/Message/Message/Message.view.js +1 -1
- package/dist/native/components/Modal/Modal/Modal.layout.d.ts +1 -1
- package/dist/native/components/Modal/Modal/Modal.layout.js +1 -1
- package/dist/native/components/Modal/Modal/Modal.props.d.ts +1 -1
- package/dist/native/components/Modal/Modal/Modal.view.d.ts +1 -1
- package/dist/native/components/Modal/Modal/Modal.view.js +1 -1
- package/dist/native/components/Modal/Modal/Modal.view.native.d.ts +1 -1
- package/dist/native/components/Modal/Modal/Modal.view.native.js +1 -1
- package/dist/native/components/Modal/Modal.js +1 -1
- package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.props.d.ts +1 -1
- package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.state.d.ts +2 -2
- package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.state.js +1 -1
- package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.type.d.ts +1 -1
- package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.d.ts +1 -1
- package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.js +1 -1
- package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.native.d.ts +1 -1
- package/dist/native/components/NavigationMenu/NavigationMenu/NavigationMenu.view.native.js +1 -1
- package/dist/native/components/NavigationMenu/NavigationMenu.js +1 -1
- package/dist/native/components/OTPInput/OTPInput/OTPInput.state.d.ts +7 -7
- package/dist/native/components/OTPInput/OTPInput/OTPInput.state.js +1 -1
- package/dist/native/components/OTPInput/OTPInput/OTPInput.view.d.ts +1 -1
- package/dist/native/components/OTPInput/OTPInput/OTPInput.view.js +1 -1
- package/dist/native/components/OTPInput/OTPInput/OTPInput.view.native.d.ts +1 -1
- package/dist/native/components/OTPInput/OTPInput/OTPInput.view.native.js +1 -1
- package/dist/native/components/OTPInput/OTPInput.d.ts +1 -1
- package/dist/native/components/OTPInput/OTPInput.js +1 -1
- package/dist/native/components/PageLayout/PageLayout.d.ts +1 -1
- package/dist/native/components/PageLayout/PageLayout.js +1 -1
- package/dist/native/components/PageLayout/PageLayout.types.d.ts +1 -1
- package/dist/native/components/Pagination/Pagination/Pagination.state.js +1 -1
- package/dist/native/components/Pagination/Pagination/Pagination.view.d.ts +1 -1
- package/dist/native/components/Pagination/Pagination/Pagination.view.js +1 -1
- package/dist/native/components/Pagination/Pagination/Pagination.view.native.d.ts +1 -1
- package/dist/native/components/Pagination/Pagination/Pagination.view.native.js +1 -1
- package/dist/native/components/Pagination/Pagination.d.ts +1 -1
- package/dist/native/components/Pagination/Pagination.js +1 -1
- package/dist/native/components/Portal/Portal.d.ts +1 -1
- package/dist/native/components/Portal/Portal.js +1 -1
- package/dist/native/components/Portal/Portal.native.d.ts +1 -1
- package/dist/native/components/Portal/Portal.native.js +1 -1
- package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.d.ts +1 -1
- package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.js +1 -1
- package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.native.d.ts +1 -1
- package/dist/native/components/ProgressBar/ProgressBar/ProgressBar.view.native.js +1 -1
- package/dist/native/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/native/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/native/components/Resizable/Resizable/Resizable.props.d.ts +1 -1
- package/dist/native/components/Resizable/Resizable/Resizable.state.d.ts +2 -2
- package/dist/native/components/Resizable/Resizable/Resizable.state.js +1 -1
- package/dist/native/components/Resizable/Resizable/Resizable.view.d.ts +1 -1
- package/dist/native/components/Resizable/Resizable/Resizable.view.js +1 -1
- package/dist/native/components/Resizable/Resizable/Resizable.view.native.d.ts +1 -1
- package/dist/native/components/Resizable/Resizable/Resizable.view.native.js +1 -1
- package/dist/native/components/Resizable/Resizable.js +1 -1
- package/dist/native/components/Router/Router.d.ts +1 -1
- package/dist/native/components/Router/Router.js +1 -1
- package/dist/native/components/Router/Router.match.d.ts +1 -1
- package/dist/native/components/Router/Router.match.js +1 -1
- package/dist/native/components/Router/Router.native.d.ts +1 -1
- package/dist/native/components/Router/Router.native.js +1 -1
- package/dist/native/components/Router/Router.types.d.ts +1 -1
- package/dist/native/components/Separator/Separator/Separator.view.d.ts +1 -1
- package/dist/native/components/Separator/Separator/Separator.view.js +1 -1
- package/dist/native/components/Separator/Separator/Separator.view.native.d.ts +1 -1
- package/dist/native/components/Separator/Separator/Separator.view.native.js +1 -1
- package/dist/native/components/Separator/Separator.d.ts +1 -1
- package/dist/native/components/Separator/Separator.js +1 -1
- package/dist/native/components/ShareButton/ShareButton/ShareButton.props.d.ts +1 -1
- package/dist/native/components/ShareButton/ShareButton/ShareButton.state.js +1 -1
- package/dist/native/components/ShareButton/ShareButton/ShareButton.state.native.js +1 -1
- package/dist/native/components/ShareButton/ShareButton/ShareButton.view.d.ts +1 -1
- package/dist/native/components/ShareButton/ShareButton/ShareButton.view.js +1 -1
- package/dist/native/components/ShareButton/ShareButton.d.ts +1 -1
- package/dist/native/components/ShareButton/ShareButton.js +1 -1
- package/dist/native/components/Sidebar/Sidebar/Sidebar.props.d.ts +1 -1
- package/dist/native/components/Sidebar/Sidebar/Sidebar.state.js +1 -1
- package/dist/native/components/Sidebar/Sidebar/Sidebar.view.d.ts +1 -1
- package/dist/native/components/Sidebar/Sidebar/Sidebar.view.js +1 -1
- package/dist/native/components/Sidebar/Sidebar/Sidebar.view.native.d.ts +1 -1
- package/dist/native/components/Sidebar/Sidebar/Sidebar.view.native.js +1 -1
- package/dist/native/components/Sidebar/Sidebar.js +1 -1
- package/dist/native/components/Slider/Slider/Slider.state.d.ts +1 -1
- package/dist/native/components/Slider/Slider/Slider.state.js +1 -1
- package/dist/native/components/Slider/Slider/Slider.view.d.ts +1 -1
- package/dist/native/components/Slider/Slider/Slider.view.js +1 -1
- package/dist/native/components/Slider/Slider/Slider.view.native.d.ts +1 -1
- package/dist/native/components/Slider/Slider/Slider.view.native.js +1 -1
- package/dist/native/components/Slider/Slider.d.ts +1 -1
- package/dist/native/components/Slider/Slider.js +1 -1
- package/dist/native/components/SplashScreen/SplashScreen.d.ts +1 -1
- package/dist/native/components/SplashScreen/SplashScreen.js +1 -1
- package/dist/native/components/SplashScreen/SplashScreen.types.d.ts +1 -1
- package/dist/native/components/StatusIndicator/StatusIndicator/StatusIndicator.view.d.ts +1 -1
- package/dist/native/components/StatusIndicator/StatusIndicator/StatusIndicator.view.js +1 -1
- package/dist/native/components/StatusIndicator/StatusIndicator.d.ts +1 -1
- package/dist/native/components/StatusIndicator/StatusIndicator.js +1 -1
- package/dist/native/components/Table/Table/Table.context.d.ts +1 -1
- package/dist/native/components/Table/Table/Table.context.js +1 -1
- package/dist/native/components/Table/Table/Table.props.d.ts +1 -1
- package/dist/native/components/Table/Table/Table.state.d.ts +1 -1
- package/dist/native/components/Table/Table/Table.state.js +1 -1
- package/dist/native/components/Table/Table/Table.view.d.ts +1 -1
- package/dist/native/components/Table/Table/Table.view.js +1 -1
- package/dist/native/components/Table/Table/TableScroll.d.ts +1 -1
- package/dist/native/components/Table/Table/TableScroll.js +1 -1
- package/dist/native/components/Table/Table/TableScroll.native.d.ts +1 -1
- package/dist/native/components/Table/Table/TableScroll.native.js +1 -1
- package/dist/native/components/Table/Table.d.ts +1 -1
- package/dist/native/components/Table/Table.js +1 -1
- package/dist/native/components/Tabs/Tabs/TabHeader.d.ts +1 -1
- package/dist/native/components/Tabs/Tabs/TabHeader.js +1 -1
- package/dist/native/components/Tabs/Tabs/Tabs.props.d.ts +1 -1
- package/dist/native/components/Tabs/Tabs/Tabs.state.js +1 -1
- package/dist/native/components/Tabs/Tabs/Tabs.type.d.ts +1 -1
- package/dist/native/components/Tabs/Tabs/Tabs.view.d.ts +1 -1
- package/dist/native/components/Tabs/Tabs/Tabs.view.js +1 -1
- package/dist/native/components/Tabs/Tabs/Tabs.view.native.d.ts +1 -1
- package/dist/native/components/Tabs/Tabs/Tabs.view.native.js +1 -1
- package/dist/native/components/Tabs/Tabs.d.ts +1 -1
- package/dist/native/components/Tabs/Tabs.js +1 -1
- package/dist/native/components/TextArea/TextArea.d.ts +1 -1
- package/dist/native/components/TextArea/TextArea.js +1 -1
- package/dist/native/components/TextArea/TextArea.native.d.ts +1 -1
- package/dist/native/components/TextArea/TextArea.native.js +1 -1
- package/dist/native/components/Title/Title/SlideEffect.d.ts +1 -1
- package/dist/native/components/Title/Title/SlideEffect.js +1 -1
- package/dist/native/components/Title/Title/SlideEffect.native.d.ts +1 -1
- package/dist/native/components/Title/Title/SlideEffect.native.js +1 -1
- package/dist/native/components/Title/Title/Title.state.d.ts +1 -1
- package/dist/native/components/Title/Title/Title.state.js +1 -1
- package/dist/native/components/Title/Title/Title.view.d.ts +1 -1
- package/dist/native/components/Title/Title/Title.view.js +1 -1
- package/dist/native/components/Title/Title/Title.view.native.d.ts +1 -1
- package/dist/native/components/Title/Title/Title.view.native.js +1 -1
- package/dist/native/components/Title/Title/TypewriterEffect.d.ts +1 -1
- package/dist/native/components/Title/Title/TypewriterEffect.js +1 -1
- package/dist/native/components/Title/Title/TypewriterEffect.native.d.ts +1 -1
- package/dist/native/components/Title/Title/TypewriterEffect.native.js +1 -1
- package/dist/native/components/Title/Title.d.ts +1 -1
- package/dist/native/components/Title/Title.js +1 -1
- package/dist/native/components/Toast/Toast/Toast.view.d.ts +1 -1
- package/dist/native/components/Toast/Toast/Toast.view.js +1 -1
- package/dist/native/components/Toast/Toast/Toast.view.native.d.ts +1 -1
- package/dist/native/components/Toast/Toast/Toast.view.native.js +1 -1
- package/dist/native/components/Toast/Toast.d.ts +1 -1
- package/dist/native/components/Toast/Toast.js +1 -1
- package/dist/native/components/Toggle/Toggle/Toggle.state.d.ts +2 -2
- package/dist/native/components/Toggle/Toggle/Toggle.state.js +1 -1
- package/dist/native/components/Toggle/Toggle/Toggle.view.d.ts +1 -1
- package/dist/native/components/Toggle/Toggle/Toggle.view.js +1 -1
- package/dist/native/components/Toggle/Toggle/Toggle.view.native.d.ts +1 -1
- package/dist/native/components/Toggle/Toggle/Toggle.view.native.js +1 -1
- package/dist/native/components/Toggle/Toggle.d.ts +1 -1
- package/dist/native/components/Toggle/Toggle.js +1 -1
- package/dist/native/components/ToggleGroup/ToggleGroup/ToggleGroup.state.d.ts +1 -1
- package/dist/native/components/ToggleGroup/ToggleGroup/ToggleGroup.state.js +1 -1
- package/dist/native/components/ToggleGroup/ToggleGroup/ToggleGroup.view.d.ts +1 -1
- package/dist/native/components/ToggleGroup/ToggleGroup/ToggleGroup.view.js +1 -1
- package/dist/native/components/ToggleGroup/ToggleGroup.d.ts +1 -1
- package/dist/native/components/ToggleGroup/ToggleGroup.js +1 -1
- package/dist/native/components/Tooltip/Tooltip/Tooltip.props.d.ts +1 -1
- package/dist/native/components/Tooltip/Tooltip/Tooltip.state.d.ts +2 -2
- package/dist/native/components/Tooltip/Tooltip/Tooltip.state.js +1 -1
- package/dist/native/components/Tooltip/Tooltip/Tooltip.view.d.ts +1 -1
- package/dist/native/components/Tooltip/Tooltip/Tooltip.view.js +1 -1
- package/dist/native/components/Tooltip/Tooltip/Tooltip.view.native.d.ts +1 -1
- package/dist/native/components/Tooltip/Tooltip/Tooltip.view.native.js +1 -1
- package/dist/native/components/Tooltip/Tooltip.js +1 -1
- package/dist/native/components/Uploader/Uploader/Uploader.state.d.ts +1 -1
- package/dist/native/components/Uploader/Uploader/Uploader.state.js +1 -1
- package/dist/native/components/Uploader/Uploader/Uploader.view.d.ts +1 -1
- package/dist/native/components/Uploader/Uploader/Uploader.view.js +1 -1
- package/dist/native/components/Uploader/Uploader.d.ts +1 -1
- package/dist/native/components/Uploader/Uploader.js +1 -1
- package/dist/native/components/index.d.ts +7 -0
- package/dist/native/components/index.js +5 -0
- package/dist/native/components/index.js.map +1 -1
- package/dist/native/design-system/DesignSystemProvider.d.ts +1 -1
- package/dist/native/design-system/DesignSystemProvider.js +1 -1
- package/dist/native/pages/designSystem.page.d.ts +1 -1
- package/dist/native/pages/designSystem.page.js +1 -1
- package/dist/web.cjs.js +43 -11
- package/dist/web.cjs.js.map +1 -1
- package/dist/web.esm.js +13797 -10688
- package/dist/web.esm.js.map +1 -1
- package/dist/web.umd.js +43 -11
- package/dist/web.umd.js.map +1 -1
- package/docs/app-studio/README.md +1 -1
- package/docs/components/BlockEditor-drag-and-drop.md +61 -0
- package/docs/components/BlockEditor.mdx +84 -0
- package/docs/components/ColorInput.mdx +1 -1
- package/docs/components/EmojiPicker.mdx +20 -0
- package/docs/components/Form.mdx +5 -5
- package/docs/components/Formik.mdx +23 -23
- package/docs/components/Markdown.mdx +99 -0
- package/docs/components/OTPInput.mdx +1 -1
- package/docs/components/TagInput.mdx +1 -1
- package/docs/components/TextArea.mdx +2 -2
- package/docs/components/TextField.mdx +3 -3
- package/docs/getting-started/component-usage.md +2 -2
- package/docs/getting-started/react-native.md +13 -2
- package/docs/tutorials/basic/creating-a-simple-form.md +4 -4
- package/package.json +1 -2
package/dist/web.umd.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
(function(F,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime"),require("react"),require("app-studio"),require("react-dom"),require("zustand"),require("react-router-dom"),require("formik")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","app-studio","react-dom","zustand","react-router-dom","formik"],r):(F=typeof globalThis<"u"?globalThis:F||self,r(F.AppStudioWeb={},F.jsxRuntime,F.React,F.appStudio,F.ReactDOM,F.zustand,F.ReactRouterDOM,F.Formik))})(this,function(F,r,h,i,Pc,vo,it,Ee){"use strict";var zb=Object.defineProperty;var Mb=(F,r,h)=>r in F?zb(F,r,{enumerable:!0,configurable:!0,writable:!0,value:h}):F[r]=h;var Ze=(F,r,h)=>Mb(F,typeof r!="symbol"?r+"":r,h);var wo,Pn;const ct=(e="id")=>`${e}-${Math.random().toString(36).substring(2,9)}`,Vc=({type:e="single",value:o,defaultValue:t,onValueChange:n,collapsible:a=!1})=>{const l=o!==void 0,c=o??t,s=()=>e==="multiple"?Array.isArray(c)?c:c?[c]:[]:Array.isArray(c)?c[0]:c,[d,g]=h.useState(s()),m=h.useMemo(()=>ct("accordion"),[]),f=l?o:d,p=h.useMemo(()=>f===void 0?[]:Array.isArray(f)?f:[f],[f]);h.useEffect(()=>{l&&(e==="multiple"&&!Array.isArray(o)?(console.warn('Accordion with type="multiple" received non-array value:',o),g(o?[String(o)]:[])):e==="single"&&Array.isArray(o)?(console.warn('Accordion with type="single" received array value:',o),g(o.length>0?o[0]:void 0)):g(o))},[o,l,e]);const u=h.useCallback(k=>{let x;if(e==="single")f===k&&a?x=void 0:f!==k?x=k:x=f;else{const C=Array.isArray(f)?f:[];C.includes(k)?x=C.filter(S=>S!==k):x=[...C,k],Array.isArray(x)&&x.length===0&&(x=[])}l||g(x),n&&n(x)},[e,f,a,l,n]),y=h.useCallback(k=>p.includes(k),[p]);return{expandedItems:p,toggleItem:u,isItemExpanded:y,type:e,collapsible:a,baseId:m}},Ac={square:{borderRadius:0},rounded:{borderRadius:8}},Ec={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"}}},Dc={metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},st={airbnb:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:16},title:{color:"color-black",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:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},apple:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:18},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},coinbase:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},figma:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},linear:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},nike:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},description:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},notion:{metadata:{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"]},theme:{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"},tokens:{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"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:10},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},revolut:{metadata:{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"]},theme:{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"},tokens:{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:[]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:20},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},shopify:{metadata:{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"]},theme:{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"},tokens:{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"]},components:{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:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},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"}}}},personality:{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"}},spacex:{metadata:{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"]},theme:{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"},tokens:{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:[]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:2},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},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"}}}},personality:{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"}},spotify:{metadata:{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"]},theme:{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"},tokens:{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"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},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"}}}},personality:{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"}},stripe:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},tesla:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:0},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},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"}}}},personality:{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"}},uber:{metadata:{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"]},theme:{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"},tokens:{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"]},components:{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:{backgroundColor:"color-white",borderColor:"theme-warning",borderRadius:4},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},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"}}}},personality:{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"}},vercel:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"var(--font-sans)"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}}},$c=Object.values(st),An=Dc,To=e=>!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.toString.call(e)==="[object Object]",dt=e=>e,Be=(...e)=>{const o={};return e.forEach(t=>{To(t)&&Object.entries(t).forEach(([n,a])=>{if(a!=null){if(To(a)&&To(o[n])){o[n]=Be(o[n],a);return}o[n]=a}})}),o},En=e=>{if(Array.isArray(e)||!To(e))return e;const o={};for(const[t,n]of Object.entries(e))n!==null&&(o[t]=To(n)?En(n):n);return o},Lc=new Set(["button"]),_c=["backgroundColor","background","borderColor","color"],Dn=new Set,Bc=(e,o)=>{if(process.env.NODE_ENV!=="production"&&!(!o||!Lc.has(e))&&!Dn.has(e))for(const[t,n]of Object.entries(o)){if(!To(n))continue;const a=_c.filter(l=>n[l]!=null);if(a.length>0){Dn.add(e),console.warn(`[design-system] components.${e}.views.${t} 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}}},gt=(e,o)=>{if(!o)return{};const t=o.components[e]||{},n=dt(En(t));return Bc(e,n.views),n},$n=(e,o,t)=>{const{config:n,...a}=o,l=gt(e,t),c=Be(l,n||{});return dt(Be(c,a))},Ln=h.createContext({isEnabled:!1}),ht=({children:e,config:o,configId:t,mode:n})=>{const a=o||(t?st[t]:null)||An,{themeMode:l}=i.useTheme(),c=n??l??a.metadata.defaultAppearance,s=h.useMemo(()=>({config:a,configId:a.metadata.id,isEnabled:!0}),[a]);return r.jsx(Ln.Provider,{value:s,children:r.jsx(i.ThemeProvider,{theme:a.theme,mode:c,transparentWrapper:!0,children:r.jsx("div",{"data-design-system":a.metadata.id,"data-appearance":c,style:{display:"contents"},children:e})})})},xr=()=>h.useContext(Ln),Io=e=>{const{config:o}=xr();return gt(e,o)},pe=(e,o)=>{const{config:t}=xr();return $n(e,o,t)},_n=h.createContext({expandedItems:[],toggleItem:()=>{},isItemExpanded:()=>!1,type:"single",collapsible:!1,baseId:""}),Oc=({children:e,value:o})=>r.jsx(_n.Provider,{value:o,children:e}),Bn=()=>{const e=h.useContext(_n);if(!e)throw new Error("useAccordionContext must be used within an AccordionProvider");return e},Nc=({value:e,children:o,isDisabled:t=!1,views:n,...a})=>{var p;const{isItemExpanded:l,baseId:c}=Bn(),s=Io("accordion"),d=Be({item:(p=s.views)==null?void 0:p.container},n),g=l(e),m=`${c}-trigger-${e}`,f=`${c}-content-${e}`;return r.jsx(i.View,{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",overflow:"hidden",opacity:t?.5:1,pointerEvents:t?"none":"auto","data-state":g?"open":"closed","data-disabled":t?"":void 0,...d==null?void 0:d.item,...a,children:h.Children.map(o,u=>h.isValidElement(u)?h.cloneElement(u,{...u.props,value:e,isExpanded:g,isDisabled:t,triggerId:m,contentId:f}):u)})},qc=({children:e,value:o,isExpanded:t,isDisabled:n,triggerId:a,contentId:l,views:c,asChild:s=!1,...d})=>{var y;const{toggleItem:g}=Bn(),m=Io("accordion"),f=Be({container:(y=m.views)==null?void 0:y.trigger},c),u={id:a,"aria-expanded":t,"aria-controls":l,"aria-disabled":n,"data-state":t?"open":"closed","data-disabled":n?"":void 0,onClick:()=>{o&&!n&&g(o)},padding:16,cursor:n?"not-allowed":"pointer",alignItems:"center",justifyContent:"space-between",width:"100%",style:{backgroundColor:"transparent"},...f==null?void 0:f.container,...d};if(s&&h.isValidElement(e)){const k=h.Children.only(e);return h.cloneElement(k,{...u,...k.props})}return r.jsxs(i.Horizontal,{...u,children:[e,r.jsx(i.View,{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:t?"rotate(180deg)":"rotate(0deg)",...f==null?void 0:f.icon,children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M16.59 8.59L12 13.17L7.41 8.59L6 10L12 16L18 10L16.59 8.59Z",fill:"currentColor"})})})]})},Uc=({children:e,isExpanded:o,isDisabled:t,triggerId:n,contentId:a,views:l,...c})=>{var S;const s=Io("accordion"),d=Be({container:(S=s.views)==null?void 0:S.content},l),g=260,m=h.useRef(null),f=h.useRef(null),[p,u]=h.useState(!!o),[y,k]=h.useState(o?"none":"0px"),[x,C]=h.useState(o?1:0);return h.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]),h.useEffect(()=>{var v;if(f.current&&(clearTimeout(f.current),f.current=null),o){u(!0),requestAnimationFrame(()=>{var I;const b=((I=m.current)==null?void 0:I.scrollHeight)??0;k(`${b}px`),C(1)});return}const w=((v=m.current)==null?void 0:v.scrollHeight)??0;k(`${w}px`),C(1),requestAnimationFrame(()=>{k("0px"),C(0)}),f.current=setTimeout(()=>{u(!1)},g)},[o,e]),h.useEffect(()=>{var v;if(!o||!p)return;const w=((v=m.current)==null?void 0:v.scrollHeight)??0;k(`${w}px`)},[e,o,p]),p?r.jsx(i.View,{id:a,role:"region","aria-labelledby":n,overflow:"hidden",maxHeight:y,opacity:x,transition:`max-height ${g}ms cubic-bezier(0.22, 1, 0.36, 1), opacity ${g}ms ease`,"data-state":o?"open":"closed","data-disabled":t?"":void 0,style:{backgroundColor:"transparent"},...d==null?void 0:d.container,...c,children:r.jsx(i.View,{ref:m,padding:16,children:e})}):null},Gc=({children:e,shape:o="rounded",variant:t="default",views:n,baseId:a,type:l,collapsible:c,themeMode:s,...d})=>r.jsx(i.Vertical,{width:"100%","data-orientation":"vertical",...Ac[o],...Ec[t],...n==null?void 0:n.container,...d,children:e}),De=e=>{const o=pe("accordion",e),{children:t,type:n="single",value:a,defaultValue:l,onValueChange:c,collapsible:s=!1,shape:d="rounded",variant:g="default",views:m,...f}=o,p=Array.isArray(l)?l:l?[l]:void 0,u=Vc({type:n,value:a,defaultValue:l??p,onValueChange:c,collapsible:s});return r.jsx(Oc,{value:{expandedItems:u.expandedItems,toggleItem:u.toggleItem,isItemExpanded:u.isItemExpanded,type:u.type,collapsible:u.collapsible,baseId:u.baseId},children:r.jsx(Gc,{shape:d,variant:g,views:m,baseId:u.baseId,type:u.type,collapsible:u.collapsible,...f,children:t})})};De.Item=Nc,De.Trigger=qc,De.Content=Uc;const Yc=({isOpen:e,defaultOpen:o=!1,value:t,defaultValue:n,isMulti:a=!1,onOpenChange:l,onClose:c})=>{const s=typeof e=="boolean",d=t!==void 0,g=n??(a?[]:""),[m,f]=h.useState(o),[p,u]=h.useState(g),y=s?!!e:m,k=d?t:p,x=h.useCallback(w=>{s||f(w),l==null||l(w),w||c==null||c()},[s,c,l]),C=h.useCallback(()=>{x(!1)},[x]),S=h.useCallback(w=>{d||u(w)},[d]);return{isSheetOpen:y,selectedValue:k,setSelectedValue:S,closeSheet:C}},ft=({children:e,containerId:o="portal-root"})=>{const[t,n]=h.useState(null);return h.useEffect(()=>{let a=document.getElementById(o),l=!1;return a||(l=!0,a=document.createElement("div"),a.setAttribute("id",o),document.body.appendChild(a)),n(a),()=>{l&&a&&a.parentNode&&a.childNodes.length===0&&a.parentNode.removeChild(a)}},[o]),t?Pc.createPortal(e,t):null},mt=new Map,Kc=(e,o,t)=>(mt.has(e)||mt.set(e,h.lazy(()=>import("lucide-react/dynamicIconImports").then(n=>{const a=n.default[e];return a?a():{default:()=>r.jsx(r.Fragment,{children:o||t})}}))),mt.get(e)),On=h.memo(({widthHeight:e,color:o="currentColor",transform:t,orientation:n="up",children:a,...l})=>r.jsx(i.View,{widthHeight:e,color:o,display:"flex",alignItems:"center",justifyContent:"center",transform:t||(n==="left"?"rotate(-90deg)":n==="right"?"rotate(90deg)":n==="up"?"rotate(0deg)":n==="down"?"rotate(180deg)":"none"),...l,children:a})),kr=h.memo(({name:e="circle",widthHeight:o=24,color:t="currentColor",filled:n=!1,strokeWidth:a=1,size:l,children:c,fallback:s,...d})=>{const{getColor:g}=i.useTheme(),m=l||o,f=h.useMemo(()=>{const y=g(t);return{fill:n?y:"none",stroke:y,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round"}},[n,t,a,g]);if(!e)return r.jsx(On,{widthHeight:o,color:t,...d,children:c});const p=e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),u=Kc(p,s,c);return r.jsx(On,{widthHeight:m,color:t,...d,children:r.jsx(h.Suspense,{fallback:s||null,children:r.jsx(u,{size:m,...f})})})}),G=(e,o={})=>{const t=n=>r.jsx(kr,{name:e,...o,...n});return t.displayName=`${e}Icon`,t},Xc=G("user",{filled:!1}),Jc=G("circle-help",{filled:!1}),Qc=G("folder",{filled:!1}),he=G("chevron-up",{filled:!1}),Zc=G("grip-vertical",{filled:!1}),go=G("file",{filled:!1}),Rc=G("video",{filled:!1}),es=G("image",{filled:!1}),Fo=G("volume",{filled:!1}),os=G("twitter",{filled:!1}),rs=G("x",{filled:!1}),ts=G("twitch",{filled:!1}),He=G("x",{filled:!1,strokeWidth:2}),ns=G("instagram",{filled:!1}),as=G("youtube",{filled:!1}),ls=G("facebook",{filled:!1}),is=G("linkedin",{filled:!1}),cs=G("at-sign",{filled:!1}),Nn=G("minus",{filled:!1}),Re=G("info",{filled:!1}),qn=G("play",{filled:!1}),ss=G("pause",{filled:!1}),ds=G("heart",{filled:!1}),gs=G("star",{filled:!1}),hs=G("save",{filled:!1}),pt=G("triangle-alert",{filled:!1}),fs=G("battery",{filled:!1}),ms=G("bookmark",{filled:!1}),ps=G("cloud",{filled:!1}),us=G("copy",{filled:!1}),Cr=G("trash",{filled:!1}),ys=Cr,bs=G("edit",{filled:!1}),ut=G("mic",{filled:!1}),wr=G("square",{filled:!1}),yt=G("send",{filled:!1}),bt=G("loader",{filled:!1}),Xo=G("paperclip",{filled:!1}),Sr=G("search",{filled:!1}),xs=G("home",{filled:!1}),Un=G("settings",{filled:!1}),ks=G("download",{filled:!1}),Gn=G("share",{filled:!1}),Jo=G("check",{filled:!1}),Cs=G("plus",{filled:!1}),xt=G("eye-off",{filled:!1}),kt=G("eye",{filled:!1}),ws=G("lock",{filled:!1}),Ss=G("user",{filled:!1}),Yn=G("external-link",{filled:!1}),Ct=G("check-circle",{filled:!1}),vr=G("alert-circle",{filled:!1}),vs=G("bell",{filled:!1}),Ts=G("file-text",{filled:!1}),Is=G("bar-chart",{filled:!1}),Fs=G("moon",{filled:!1}),Kn=G("panel-left",{filled:!1}),wt=G("upload",{filled:!1}),zs=Jo,Ms=e=>r.jsx(he,{orientation:"left",...e}),Ws=G("zoom-out",{filled:!1}),Hs=G("type",{filled:!1}),js=G("shapes",{filled:!1}),Ps=G("rotate-cw",{filled:!1}),Vs=G("gift",{filled:!1}),As=G("shield",{filled:!1}),Es=G("log-out",{filled:!1}),Ds=G("power",{filled:!1}),$s=G("link",{filled:!1}),Ls=G("layout",{filled:!1}),_s=G("zap",{filled:!1}),Bs=G("credit-card",{filled:!1}),Os=G("more-horizontal",{filled:!1}),Ns=Cr,qs=G("filter",{filled:!1}),Us=G("calendar",{filled:!1}),Gs=G("clock",{filled:!1}),Ys=G("map-pin",{filled:!1}),Ks=G("menu",{filled:!1}),Xs=G("refresh-cw",{filled:!1}),Js=G("printer",{filled:!1}),Qs=G("wand",{filled:!1}),Zs=G("thumbs-down",{filled:!1}),Rs=G("thumbs-up",{filled:!1}),ed=G("camera",{filled:!1}),od=G("bluetooth",{filled:!1}),rd=G("unlock",{filled:!1}),td=G("wifi",{filled:!1}),nd=G("arrow-right",{filled:!1}),ad=G("arrow-up",{filled:!1}),ld=G("loader",{filled:!1}),id=G("sliders-horizontal",{filled:!1}),cd=G("crop",{filled:!1}),sd=G("zoom-in",{filled:!1}),dd=G("grip-horizontal",{filled:!1}),Xn=G("mouse-pointer-2",{filled:!1}),gd={sm:{minHeight:44,paddingVertical:10,paddingHorizontal:16},md:{minHeight:52,paddingVertical:12,paddingHorizontal:18},lg:{minHeight:60,paddingVertical:14,paddingHorizontal:20}},zo={sm:{label:14,description:12},md:{label:16,description:13},lg:{label:18,description:14}},Jn=(e,o)=>e.id??e.value??`action-sheet-item-${o}`,Qn=e=>e.value??e.id,Zn=e=>e.disabled||e.isDisabled||e.divider,hd=(e,o)=>{if(typeof e.selected=="boolean")return e.selected;const t=Qn(e);return t?Array.isArray(o)?o.includes(t):o===t:!1},fd=({isSheetOpen:e,closeSheet:o,selectedValue:t,setSelectedValue:n,isClosePrevented:a=!1,dismissOnBackdropPress:l=!0,title:c,description:s,header:d,children:g,items:m=[],isMulti:f=!1,closeOnSelect:p,onSelect:u,onChange:y,showCancel:k=!1,cancelLabel:x="Cancel",onCancel:C,showHandle:S=!0,size:w="md",maxHeight:v="88vh",views:b,animationType:I,...T})=>{if(!e)return null;const j=()=>{a||o()},E=()=>{l&&j()},D=()=>{C==null||C(),j()},W=A=>{var V;if(Zn(A))return;const H=Qn(A);let z=t;if(H){if(f){const M=Array.isArray(t)?t:t?[t]:[];z=M.includes(H)?M.filter(L=>L!==H):[...M,H]}else z=H;n(z),u==null||u(H,A),y==null||y(z,A)}(V=A.onPress)==null||V.call(A,A),(A.closeOnSelect??p??!f)&&j()};return r.jsx(ft,{children:r.jsx(i.View,{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999,backgroundColor:"color-dark-50-360",display:"flex",justifyContent:"flex-end",onClick:E,...b==null?void 0:b.overlay,children:r.jsxs(i.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:A=>A.stopPropagation(),...b==null?void 0:b.container,...b==null?void 0:b.sheet,...T,children:[S&&r.jsx(i.View,{width:36,height:4,borderRadius:999,backgroundColor:"color-gray-300",alignSelf:"center",marginTop:4,marginBottom:8,...b==null?void 0:b.handle}),(c||s)&&r.jsxs(i.Vertical,{paddingHorizontal:20,paddingTop:6,paddingBottom:12,gap:4,...b==null?void 0:b.header,children:[c&&r.jsx(i.Text,{fontSize:18,lineHeight:24,fontWeight:"600",color:"color-gray-900",...b==null?void 0:b.title,children:c}),s&&r.jsx(i.Text,{fontSize:13,lineHeight:18,color:"color-gray-500",...b==null?void 0:b.description,children:s})]}),d,r.jsxs(i.Vertical,{overflowY:"auto",paddingBottom:4,...b==null?void 0:b.content,children:[m.map((A,H)=>{if(A.divider)return r.jsx(i.View,{height:1,backgroundColor:"color-gray-200",marginVertical:6,...b==null?void 0:b.divider},Jn(A,H));const z=hd(A,t),P=Zn(A),V=P?"color-gray-400":A.destructive?"color-red-600":z?"theme-primary":"color-gray-900";return r.jsxs(i.Horizontal,{alignItems:"center",gap:12,opacity:P?.5:1,cursor:P?"not-allowed":"pointer",onClick:()=>W(A),...gd[w],...b==null?void 0:b.item,children:[A.icon&&r.jsx(i.View,{flexShrink:0,...b==null?void 0:b.itemIcon,children:A.icon}),r.jsxs(i.Vertical,{flex:1,gap:2,children:[typeof A.label=="string"?r.jsx(i.Text,{fontSize:zo[w].label,lineHeight:zo[w].label+6,fontWeight:z?"600":"400",color:V,...b==null?void 0:b.itemLabel,children:A.label}):A.label,A.description&&r.jsx(i.Text,{fontSize:zo[w].description,lineHeight:zo[w].description+5,color:"color-gray-500",...b==null?void 0:b.itemDescription,children:A.description})]}),z&&r.jsx(Jo,{widthHeight:18,color:"theme-primary",...b==null?void 0:b.itemIndicator})]},Jn(A,H))}),g]}),k&&r.jsx(i.View,{marginTop:8,paddingHorizontal:12,paddingTop:8,borderTopWidth:1,borderTopColor:"color-gray-200",children:r.jsx(i.Horizontal,{minHeight:52,alignItems:"center",justifyContent:"center",borderRadius:14,backgroundColor:"color-gray-100",cursor:"pointer",onClick:D,...b==null?void 0:b.cancelButton,children:r.jsx(i.Text,{fontSize:zo[w].label,lineHeight:zo[w].label+6,fontWeight:"600",color:"color-gray-900",...b==null?void 0:b.cancelLabel,children:x})})})]})})})},md=e=>{const o=Yc(e);return r.jsx(fd,{...e,...o})},pd=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-500"}},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-500"}},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-500"}},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-500"}}}},ud={default:"alert",info:"status",success:"status",error:"alert",warning:"alert"},yd=h.memo(({icon:e,title:o="",views:t,description:n="",variant:a="default",themeMode:l,children:c,...s})=>{const{themeMode:d}=i.useTheme(),g=l||d,m=h.useMemo(()=>pd(g),[g]),f=()=>{var y;if(e)return e;const u={size:20,color:((y=t==null?void 0:t.icon)==null?void 0:y.color)??m[a].icon.color};switch(a){case"info":return r.jsx(Re,{...u});case"success":return r.jsx(Ct,{...u});case"error":return r.jsx(vr,{...u});case"warning":default:return r.jsx(pt,{...u})}};return r.jsxs(i.Horizontal,{role:ud[a],gap:12,padding:"12px 16px",flexWrap:"nowrap",alignItems:"flex-start",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:m[a].container.borderColor,backgroundColor:m[a].container.backgroundColor,boxShadow:m[a].container.boxShadow,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...t==null?void 0:t.container,...s,children:[r.jsx(i.View,{alignSelf:"flex-start",marginTop:"2px",...t==null?void 0:t.icon,children:f()}),r.jsxs(i.Vertical,{gap:4,children:[o?r.jsx(i.Text,{fontSize:"14px",fontWeight:"600",lineHeight:"20px",color:m[a].content.color,...t==null?void 0:t.title,children:o}):null,r.jsx(i.Text,{fontSize:"12px",fontWeight:"400",lineHeight:"16px",color:m[a].content.color,...t==null?void 0:t.description,children:n||c})]})]})}),St=e=>{const o=pe("alert",e);return r.jsx(yd,{...o})},bd=({ratio:e=16/9,children:o,views:t,...n})=>r.jsx(i.View,{width:"100%",position:"relative",overflow:"hidden",paddingTop:`${1/e*100}%`,borderRadius:8,...n,...t==null?void 0:t.center,children:r.jsx(i.View,{position:"absolute",top:0,right:0,bottom:0,left:0,...t==null?void 0:t.view,children:o})}),Rn=({ratio:e,children:o,...t})=>r.jsx(bd,{ratio:e,...t,children:o});function xd(e,o,t){return Math.min(Math.max(e,o),t)}const kd=({bars:e,isPaused:o,...t})=>{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 r.jsx(i.Horizontal,{alignItems:"center",minWidth:120,gap:2,height:24,width:"100%",maxWidth:"100%",...t,children:e.map((l,c)=>r.jsx(i.View,{width:3,borderRadius:2,backgroundColor:o?"color-gray-300":l>=0?"theme-primary":"color-gray-300",style:{height:`${l>=0?xd(l*300,6,24):a[c%a.length]}px`}},c))})},vt=({analyserNode:e,isPaused:o,...t})=>{const n=h.useRef(null),a=60,l=32,[c,s]=h.useState([]);return h.useEffect(()=>{if(!e){s(Array(a).fill(-1));return}const d=e.frequencyBinCount,g=new Uint8Array(d),m=()=>{e.getByteTimeDomainData(g);let f=0;for(let u=0;u<d;u++){const y=(g[u]-128)/128;f+=y*y}const p=Math.sqrt(f/d);h.startTransition(()=>{s(u=>{const k=[...u,p].slice(-a);return k.length<a?[...Array(a-k.length).fill(-1),...k]:k})})};return n.current=setInterval(m,l),()=>{n.current&&clearInterval(n.current)}},[e]),r.jsx(kd,{bars:c,isPaused:o,...t})},Tr=vo.create(e=>({visible:!1,title:"",subtitle:"",variant:"info",isClosable:!1,views:{},action:()=>{},actionText:"",showIcon:!1,timeout:3e3,show:(o,t="",n="",a,l,c,s,d,g)=>e({visible:!0,variant:o,title:t,subtitle:n,isClosable:a,views:l,action:c,actionText:s,showIcon:d,timeout:g}),hide:()=>e({visible:!1})})),ea=(e,o,t,n)=>{Tr.getState().show(e,o,t,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)},oa=()=>{Tr.getState().hide()},Cd={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"}}},ra=({variant:e,hide:o,title:t,subtitle:n,theme:a,action:l,actionText:c,showIcon:s=!1,isClosable:d=!1,timeout:g=3e3,views:m})=>{var C,S;h.useEffect(()=>{if(g&&!d){const w=setTimeout(()=>{o()},g);return()=>{clearTimeout(w)}}},[]);const f=a??Cd,p=!!(l&&c),u={borderWidth:1,borderStyle:"solid",borderRadius:12,borderColor:`${f[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:r.jsx(Re,{widthHeight:24,color:y,...m==null?void 0:m.icon}),success:r.jsx(Ct,{widthHeight:24,color:y,...m==null?void 0:m.icon}),warning:r.jsx(pt,{widthHeight:24,color:y,...m==null?void 0:m.icon}),error:r.jsx(vr,{widthHeight:24,color:y,...m==null?void 0:m.icon})}[e],x=s&&k;return r.jsxs(i.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:d?()=>{}:()=>{o()},...u,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...m==null?void 0:m.container,children:[x&&k,r.jsxs(i.Vertical,{gap:4,width:"100%",children:[r.jsx(i.Text,{size:"md",weight:"semiBold",...m==null?void 0:m.title,children:t}),n&&r.jsx(i.Text,{size:"sm",lineHeight:"20px",color:f[e].content.color,...m==null?void 0:m.subtitle,children:n})]}),p&&r.jsx(i.View,{as:"button",type:"button",onClick:l,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",...m==null?void 0:m.actionText,children:r.jsx(i.Text,{whiteSpace:"nowrap",size:"sm",weight:"semiBold",color:f[e].content.color,children:c})}),d&&r.jsx(i.View,{position:"absolute",zIndex:1e4,right:8,top:8,onClick:()=>{o()},cursor:"pointer",padding:"4px",borderRadius:"9999px",transition:"background-color 0.2s ease",...(C=m==null?void 0:m.closingIcon)==null?void 0:C.container,children:r.jsx(He,{widthHeight:16,color:f[e].close.color,...(S=m==null?void 0:m.closingIcon)==null?void 0:S.icon})})]})},wd=({container:e,theme:o,position:t="topRight"})=>{const{visible:n,title:a,variant:l,subtitle:c,isClosable:s,views:d,action:g,actionText:m,showIcon:f,timeout:p}=Tr(),u={topLeft:{top:6,left:8},topRight:{top:6,right:8},bottomLeft:{bottom:8,left:6},bottomRight:{bottom:8,right:6}}[t],y=()=>r.jsx(ra,{variant:l,subtitle:c,show:n,title:a,theme:o,isClosable:s,views:d,action:g,actionText:m,showIcon:f,timeout:p,hide:()=>oa()}),k=e?h.cloneElement(e,{},y()):r.jsx(i.View,{position:"absolute",zIndex:1e4,...u,children:y()});return n?k:null},Sd=(e,o)=>{if(typeof document>"u")return;const t=document.createElement("video");t.preload="metadata",t.onloadedmetadata=()=>{t.currentTime=1},t.oncanplay=()=>{const n=document.createElement("canvas");n.width=t.videoWidth,n.height=t.videoHeight;const a=n.getContext("2d");if(a){a.drawImage(t,0,0,n.width,n.height);const l=n.toDataURL("image/jpeg");o(l)}URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(e)},vd=({maxSize:e=100*1024*1024,onFileSelect:o,onMultipleFileSelect:t,validateFile:n,thumbnail:a,multiple:l=!1,onError:c=s=>{ea("error","Error",s)}})=>{const s=h.useRef(null),d=h.useRef(null),[g,m]=h.useState(null),[f,p]=h.useState([]),[u,y]=h.useState(null),[k,x]=h.useState(null),[C,S]=h.useState(a||null),w=h.useCallback(b=>{const I=b.target.files;if(y(null),!I||I.length===0){c("No file selected"),y("No file selected");return}if(l){const T=Array.from(I),j=[];for(const E of T){if(E.size>e){c(`File ${E.name} exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File ${E.name} exceeds ${Math.round(e/(1024*1024))}MB.`);continue}if(n){const D=n(E);if(D){c(`${E.name}: ${D}`),y(`${E.name}: ${D}`);continue}}j.push(E)}j.length>0&&(p(j),t&&t(j))}else{const T=I[0];if(T.size>e){c(`File exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File exceeds ${Math.round(e/(1024*1024))}MB.`);return}if(n){const j=n(T);if(j){c(j),y(j);return}}x(URL.createObjectURL(T)),T.type.startsWith("video/")&&Sd(T,S),o&&(m(T),o(T))}},[e,o,t,n,l]),v=()=>{const b=s.current;b&&typeof b.click=="function"&&b.click()};return h.useEffect(()=>()=>{typeof URL<"u"&&typeof URL.revokeObjectURL=="function"&&(k&&URL.revokeObjectURL(k),C&&URL.revokeObjectURL(C))},[k,C]),{previewUrl:k,thumbnailUrl:C,errorMessage:u,fileInputRef:s,videoRef:d,selectedFile:g,selectedFiles:f,handleFileChange:w,handleClick:v}},Td=({accept:e,isLoading:o=!1,progress:t=0,icon:n,text:a,previewUrl:l,thumbnailUrl:c,errorMessage:s,fileInputRef:d,videoRef:g,selectedFile:m,selectedFiles:f,handleFileChange:p,handleClick:u,multiple:y=!1,containerProps:k,errorMessageProps:x,progressProps:C,videoProps:S,imageProps:w,iconProps:v,textProps:b,fileType:I,previewUrl:T,renderError:j=({errorMessage:P,errorMessageProps:V,themeMode:M})=>r.jsx(i.Text,{color:"red",fontSize:12,marginTop:8,...V,...z==null?void 0:z.text,children:P}),renderText:E=({text:P,textProps:V})=>r.jsx(i.Text,{marginTop:8,...V,...z==null?void 0:z.text,children:P}),renderFile:D=({selectedFile:P,textProps:V})=>P?r.jsxs(i.Center,{marginTop:8,gap:10,flexDirection:"column",...z==null?void 0:z.container,children:[r.jsx(i.Text,{maxLines:2,...V,...z==null?void 0:z.text,children:P.name}),r.jsxs(i.Text,{...V,...z==null?void 0:z.text,children:["(",Math.round(P.size/1024)," KB)"]})]}):null,renderVideo:W=({selectedFile:P,videoRef:V,videoProps:M})=>r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:r.jsx(i.View,{as:"video",width:"100%",height:"100%",src:P?URL.createObjectURL(P):void 0,style:{objectFit:"cover"},ref:V,...M,...z==null?void 0:z.view})}),renderImage:A=({previewUrl:P,imageProps:V})=>(console.log("Rendering image with URL:",P),r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...z==null?void 0:z.view,children:r.jsx(i.Image,{src:P,alt:"Preview",width:"100%",height:"100%",objectFit:"cover",style:{maxHeight:"100%",maxWidth:"100%"},...V,...z==null?void 0:z.image})})),renderProgress:H=({progress:P,progressProps:V})=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",...V,...z==null?void 0:z.horizontal,children:[r.jsx(i.View,{height:4,backgroundColor:"color-black-100",width:"100%",borderRadius:2,...z==null?void 0:z.view,children:r.jsx(i.View,{height:4,width:`${P}%`,borderRadius:2,backgroundColor:"color-dark-50",...z==null?void 0:z.view})}),r.jsxs(i.Text,{fontSize:12,...z==null?void 0:z.text,children:[P,"%"]})]}),views:z={}})=>{const P=T||l;return r.jsxs(i.Center,{onClick:u,cursor:"pointer",border:"1px solid color-black-100",borderRadius:8,padding:16,flexDirection:"column",overflow:"hidden",position:"relative",height:m&&t===100?"200px":"auto",...k,...z==null?void 0:z.container,children:[t===100&&I==="image"&&P&&A({previewUrl:P,imageProps:w}),t===100&&I==="video"&&c&&W({selectedFile:m,thumbnailUrl:c,videoRef:g,videoProps:S,imageProps:w}),t===100&&I==="file"&&m&&D({selectedFile:m,textProps:b}),t<100&&(n||r.jsx(wt,{widthHeight:32,...v})),!o&&!m&&a&&E({text:a,textProps:b}),o&&H({progress:t,progressProps:C}),!o&&s&&j({errorMessage:s,errorMessageProps:x}),r.jsx(i.Input,{type:"file",ref:d,onChange:p,accept:e,multiple:y,style:{display:"none"},...z==null?void 0:z.view})]})},Ir=({accept:e="*/*",icon:o,text:t,maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:c,isLoading:s=!1,progress:d=0,fileType:g,multiple:m=!1,...f})=>{const{previewUrl:p,thumbnailUrl:u,errorMessage:y,videoRef:k,fileInputRef:x,selectedFile:C,selectedFiles:S,handleFileChange:w,handleClick:v}=vd({maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:c,multiple:m}),I=(()=>{if(g)return g;if(C)return C.type.startsWith("image/")?"image":C.type.startsWith("video/")?"video":"file"})();return r.jsx(Td,{handleClick:v,accept:e,isLoading:s,progress:d,icon:o,text:t,maxSize:n,onFileSelect:a,validateFile:c,errorMessage:y,handleFileChange:w,selectedFile:C,selectedFiles:S,videoRef:k,fileInputRef:x,previewUrl:p,thumbnailUrl:u,fileType:I,multiple:m,...f})};function Id(e){const o=Math.floor(e/60),t=e%60;return`${o}:${t.toString().padStart(2,"0")}`}function Fd({onAudio:e,recording:o,paused:t,audioBlob:n,analyserNode:a,duration:l,error:c,startRecording:s,stopRecording:d,pauseRecording:g,resumeRecording:m,resetRecording:f,handleFileChange:p,...u}){const[y,k]=h.useState(null);h.useEffect(()=>{if(n){const S=URL.createObjectURL(n);return k({url:S,label:`recording-${Date.now()}.webm`}),()=>{URL.revokeObjectURL(S)}}return()=>{}},[n]);const x=()=>{y!=null&&y.url&&URL.revokeObjectURL(y.url),k(null),f()},C=S=>{e(S),y!=null&&y.url&&URL.revokeObjectURL(y.url),k({url:URL.createObjectURL(S),label:S.name})};return r.jsxs(i.Vertical,{gap:"10px",width:"100%",...u,children:[r.jsxs(i.Horizontal,{gap:12,alignItems:"center",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsx(Ir,{accept:"audio/*",icon:r.jsx(Xo,{widthHeight:16}),maxSize:100*1024*1024,onFileSelect:C,fileType:"file",multiple:!1,renderError:({errorMessage:S})=>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:S=>S.size>100*1024*1024?"File size exceeds 100MB limit":S.type.startsWith("audio/")?null:"Only audio files are allowed"}),r.jsx(i.View,{as:"button",type:"button",onClick:o?d:s,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?r.jsx(wr,{widthHeight:14,color:"color-white",filled:!1}):r.jsx(ut,{widthHeight:18,color:"color-white",filled:!1})}),r.jsx(i.View,{flex:1,minWidth:120,children:r.jsx(vt,{analyserNode:o?a:null,isPaused:!o||t})}),r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",whiteSpace:"nowrap",children:Id(l)})]}),y&&!o&&r.jsxs(i.Vertical,{gap:"8px",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:8,children:[r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:y.label}),r.jsx(i.View,{as:"button",type:"button",onClick:x,width:"24px",height:"24px",display:"flex",alignItems:"center",justifyContent:"center",border:"0",backgroundColor:"transparent",color:"color-gray-500",cursor:"pointer",children:r.jsx(He,{widthHeight:14,color:"currentColor"})})]}),r.jsx(i.View,{as:"audio",controls:!0,src:y.url,width:"100%"})]}),c&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",color:"color-red-500",children:c})]})}function ta(){const[e,o]=h.useState(!1),[t,n]=h.useState(!1),[a,l]=h.useState(0),[c,s]=h.useState(null),[d,g]=h.useState(null),[m,f]=h.useState(null),p=h.useRef(null),u=h.useRef(null),y=h.useRef(null),k=h.useRef(null),x=h.useRef([]),C=h.useRef(null),S=typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm",w=h.useCallback(()=>{p.current&&(p.current.state!=="inactive"&&p.current.stop(),p.current=null),k.current&&(k.current.getTracks().forEach(E=>E.stop()),k.current=null),u.current&&(u.current.close(),u.current=null),y.current&&(y.current.disconnect(),y.current=null),g(null),C.current&&(clearInterval(C.current),C.current=null)},[]),v=h.useCallback(async()=>{w(),s(null),l(0),x.current=[];try{const E=await navigator.mediaDevices.getUserMedia({audio:!0});k.current=E;const D=MediaRecorder.isTypeSupported(S)?S:void 0,W=new MediaRecorder(E,D?{mimeType:D}:void 0);p.current=W;const A=new(window.AudioContext||window.webkitAudioContext);u.current=A;const H=A.createMediaStreamSource(E),z=A.createAnalyser();z.fftSize=256,z.smoothingTimeConstant=.8,H.connect(z),y.current=z,g(z),W.ondataavailable=P=>{P.data.size>0&&x.current.push(P.data)},W.onstop=()=>{const P=new Blob(x.current,{type:W.mimeType||S});f(P),w()},W.start(),o(!0),n(!1),C.current=setInterval(()=>{l(P=>P+1)},1e3)}catch{s("Microphone access denied or unavailable."),w()}},[w]),b=h.useCallback(()=>{p.current&&p.current.state!=="inactive"&&p.current.stop(),o(!1),n(!1),C.current&&(clearInterval(C.current),C.current=null)},[]),I=h.useCallback(()=>{p.current&&p.current.state==="recording"&&(p.current.pause(),n(!0),C.current&&(clearInterval(C.current),C.current=null))},[]),T=h.useCallback(()=>{p.current&&p.current.state==="paused"&&(p.current.resume(),n(!1),C.current||(C.current=setInterval(()=>{l(E=>E+1)},1e3)))},[]),j=h.useCallback(()=>{w(),o(!1),n(!1),f(null),l(0),s(null),x.current=[]},[w]);return h.useEffect(()=>()=>w(),[w]),{recording:e,paused:t,audioBlob:m,analyserNode:d,duration:a,error:c,startRecording:v,stopRecording:b,pauseRecording:I,resumeRecording:T,resetRecording:j}}function zd(e){const{onAudio:o}=e,{recording:t,paused:n,audioBlob:a,analyserNode:l,duration:c,error:s,startRecording:d,stopRecording:g,pauseRecording:m,resumeRecording:f,resetRecording:p}=ta();return h.useEffect(()=>{if(a&&o){const y=new File([a],"recording.webm",{type:a.type||"audio/webm;codecs=opus"});o(y)}},[a,o]),{recording:t,paused:n,audioBlob:a,analyserNode:l,duration:c,error:s,startRecording:d,stopRecording:g,pauseRecording:m,resumeRecording:f,resetRecording:p,handleFileChange:y=>{var x;const k=(x=y.target.files)==null?void 0:x[0];k&&o&&o(k)}}}function Md(e){const o=zd(e);return r.jsx(Fd,{...e,...o})}const Wd=()=>{const[e,o]=h.useState(!1);return{imageError:e,setImageError:o}},Hd={xs:24,sm:32,md:44,lg:56,xl:72},Tt={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"}},jd=({src:e,size:o="md",fallback:t="IM",views:n,imageError:a,setImageError:l,onClick:c=()=>{},children:s})=>{const d=Hd[o],g={...Tt.image,...(n==null?void 0:n.image)||{}};return r.jsxs(i.Center,{"data-role":"avatar",width:d,height:d,...Tt.container,borderColor:a?"color-gray-400":"transparent",onClick:c,...n==null?void 0:n.container,children:[!a&&e?r.jsx(i.Image,{alt:"",src:e,style:g,width:d,height:d,onError:()=>l(!0)}):r.jsx(i.Text,{size:o,...Tt.fallback,...n==null?void 0:n.fallback,children:t}),s]})},na=e=>{const o=pe("avatar",e),{src:t,size:n,views:a,fallback:l,onClick:c,children:s}=o,{imageError:d,setImageError:g}=Wd();return r.jsx(jd,{src:t,size:n,views:a,fallback:l,imageError:d,setImageError:g,onClick:c,children:s})},Pd={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"}},Vd={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"}},Ad={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"}},aa={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"}},Ed={square:0,rounded:"8px",pill:"9999px"},Dd={"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"}},$d=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)"}}),Ld=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"}}}),la=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"}}}),_d=h.memo(({content:e,children:o,icon:t,pastil:n,pastilContent:a,action:l,position:c,shape:s="pill",variant:d="filled",size:g="md",isAuto:m=!1,views:f,themeMode:p,backgroundColor:u,color:y,borderColor:k,...x})=>{const{themeMode:C}=i.useTheme(),S=p||C,w=h.useMemo(()=>Ld()[d],[S,d]),v=h.useMemo(()=>$d(),[S]),b=h.useMemo(()=>la(),[S]),I=a!=null,T=l!=null,j=I||T,E=o??e,D=E!=null,W=m&&typeof E=="string"&&/^(color|theme|light|dark)-/.test(E)?E:void 0,A=h.useMemo(()=>{const z={width:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"6px",borderRadius:Ed[s],...Pd[g],...w,...j?Vd[g]:{},...j?v:{},...c?Dd[c]:{},...f==null?void 0:f.container};return d!=="filled"&&!j&&(w.color!==void 0&&(z.color=w.color),w.borderColor!==void 0&&(z.borderColor=w.borderColor),w.backgroundColor!==void 0&&(z.backgroundColor=w.backgroundColor),w&&w.style&&(z.style={...z.style||{},...w.style})),T||x.onClick!==void 0||(delete z._hover,delete z._active),u!==void 0&&(z.backgroundColor=u,k===void 0&&(z.borderColor=u)),k!==void 0&&(z.borderColor=k),y!==void 0&&(z.color=y),W&&(z.backgroundColor=W,z.borderColor=W,z.color="color-white"),z},[T,x.onClick,u,y,k,s,g,d,w,j,v,c,W,f==null?void 0:f.container]);let H="currentColor";return typeof n=="string"?n in b?H=b[n].indicator.backgroundColor:H=n:n===!0&&(H="color-green-500",d==="filled"&&(H="color-white")),r.jsxs(i.Center,{"data-role":"badge",...A,...x,children:[t&&r.jsx(i.View,{"data-role":"badge-icon",...f==null?void 0:f.icon,children:t}),I&&r.jsx(i.Text,{"data-role":"badge-pastil-content",backgroundColor:"color-gray-900",borderRadius:"9999px",color:"color-white",fontWeight:"700",letterSpacing:0,textTransform:"uppercase",whiteSpace:"nowrap",...Ad[g],...f==null?void 0:f.pastilContent,children:a}),n&&r.jsx(i.View,{"data-role":"badge-pastil",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:H,...f==null?void 0:f.pastil}),D&&r.jsx(i.Text,{"data-role":"badge-text",color:j?"color-gray-900":A.color,fontWeight:j?"700":"600",textAlign:"center",letterSpacing:j?0:"0.02em",whiteSpace:"nowrap",...j?aa[g]:{},...f==null?void 0:f.text,children:E}),T&&r.jsx(i.Text,{"data-role":"badge-action",color:"color-gray-400",fontWeight:"500",letterSpacing:0,whiteSpace:"nowrap",...aa[g],...f==null?void 0:f.action,children:l})]})}),Fe=e=>{const o=pe("badge",e);return r.jsx(_d,{...o})},Bd={xs:12,sm:14,md:16,lg:18,xl:20},Od=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,It=h.forwardRef(({children:e,href:o,iconSize:t="sm",underline:n="default",isExternal:a=!1,views:l={},to:c,isHovered:s,setIsHovered:d,_hover:g,...m},f)=>r.jsxs(i.Element,{as:"a",ref:f,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"}:{},...l.text,...m,children:[e,a&&r.jsx(Yn,{widthHeight:Bd[t]})]}));It.displayName="LinkAnchor";const ia=h.forwardRef(({to:e="/",onClick:o,...t},n)=>{const a=it.useHref(e),l=it.useNavigate(),c=s=>{o==null||o(s),!(s.defaultPrevented||s.button!==0||t.target&&t.target!=="_self"||s.metaKey||s.altKey||s.ctrlKey||s.shiftKey)&&(s.preventDefault(),l(e))};return r.jsx(It,{...t,to:e,href:a,onClick:c,ref:n})});ia.displayName="RouterLinkAnchor";const ca=h.forwardRef((e,o)=>{const t=it.useInRouterContext(),{href:n,to:a="/",isExternal:l}=e;return t&&!l&&n==null&&!Od.test(a)?r.jsx(ia,{...e,ref:o}):r.jsx(It,{...e,href:n??a,ref:o})});ca.displayName="LinkView";const sa=h.forwardRef((e,o)=>r.jsx(ca,{ref:o,...e}));sa.displayName="Link";const Ft=sa,zt={xs:14,sm:18,md:22,lg:26,xl:30},Mt={fast:50,normal:100,slow:300},Nd=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),qd=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=l(t,{themeMode:n||c}),d=typeof e=="number"?e:zt[e],[g,m]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{m(p=>p+45)},Mt[o]);return()=>clearInterval(f)},[o]),r.jsxs(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:`${d}px`,height:`${d}px`,viewBox:"0 0 24 24",fill:"none",stroke:s,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:`rotate(${g}deg)`},...a,children:[r.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),r.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("g",{id:"SVGRepo_iconCarrier",children:r.jsx("path",{d:"M21 12a9 9 0 11-6.219-8.56"})})]})},Ud=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=l(t,{themeMode:n||c}),d=typeof e=="number"?e:zt[e],[g,m]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{m(p=>p+45)},Mt[o]);return()=>clearInterval(f)},[o]),r.jsxs(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${g}deg)`},...a,children:[r.jsx("circle",{cx:"10",cy:"25",r:"4",fill:s}),r.jsx("circle",{cx:"25",cy:"25",r:"4",fill:s}),r.jsx("circle",{cx:"40",cy:"25",r:"4",fill:s})]})},Gd=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=l(t,{themeMode:n||c}),d=typeof e=="number"?e:zt[e],[g,m]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{m(p=>p+45)},Mt[o]);return()=>clearInterval(f)},[o]),r.jsx(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${d}px`,height:`${d}px`,style:{transform:`rotate(${g}deg)`},...a,children:r.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:s,strokeWidth:"5",strokeDasharray:"1,10"})})},Yd=({size:e,children:o,textColor:t,loaderColor:n,type:a="default",speed:l="normal",textPosition:c="right",views:s,...d})=>{const{getColor:g}=i.useTheme(),m=u=>Nd(u)?u:g(u||"theme-loading");n=m(n||d.color||"theme-loading"),t=m(t||d.color||"theme-loading");const f={size:e,speed:l,color:n},p={default:r.jsx(qd,{...f}),dotted:r.jsx(Ud,{...f}),quarter:r.jsx(Gd,{...f})};return r.jsxs(i.Center,{gap:10,flexDirection:c==="top"||c==="bottom"?"column":"row",...d,...s==null?void 0:s.container,children:[(c==="left"||c==="top")&&o&&r.jsx(i.View,{color:t,...s==null?void 0:s.text,children:o}),p[a],(c==="right"||c==="bottom")&&o&&r.jsx(i.View,{color:t,...s==null?void 0:s.text,children:o})]})},eo=e=>{const o=pe("loader",e);return r.jsx(Yd,{...o})},Kd=/^(color|theme|light|dark)-/,Xd=e=>Kd.test(e),Jd=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},Mo=(e,o)=>Xd(e)?`${Jd(e)}-${o}`:`color-mix(in srgb, ${e} ${Math.round(o/10)}%, transparent)`,da={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"}},Qo={square:0,rounded:8,pill:999},Qd={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}},Oe=e=>/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,Zd=(e,o,t=!1,n)=>{const a=t?o:e,l=t?e:o,c=t?o:e,d=(e==="theme-primary"||n&&e===n.primary)&&(n!=null&&n.onPrimary)?n.onPrimary:l,g=`0 0 0 2px ${Oe("color-white")}, 0 0 0 4px ${Oe(c)}`;return{filled:{backgroundColor:a,color:d,borderWidth:1,borderStyle:"solid",borderColor:a,_hover:{opacity:.92},_active:{opacity:.96},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease"},empty:{color:c,borderWidth:1,borderStyle:"solid",borderColor:Mo(c,t?400:250),backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, opacity 0.2s ease"},outline:{color:c,borderWidth:1,borderStyle:"solid",borderColor:Mo(c,t?400:250),backgroundColor:"transparent",_hover:{opacity:.9},_active:{opacity:.95},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease"},ghost:{color:c,borderWidth:0,borderStyle:"solid",borderColor:c,backgroundColor:"transparent",_hover:{opacity:.86},_active:{opacity:.94},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, color 0.2s ease"},link:{color:c,borderWidth:0,borderStyle:"none",borderColor:c,minHeight:"auto",paddingHorizontal:"4px",paddingVertical:"10px",textDecoration:"underline",backgroundColor:"transparent",style:{textUnderlineOffset:"2px",textDecorationThickness:"1px",textDecorationColor:Oe(c)},_hover:{opacity:.8},_active:{opacity:.9},_focusVisible:{outline:"none",boxShadow:g},transition:"opacity 0.2s ease"},subtle:{backgroundColor:Mo(c,t?200:100),color:c,borderWidth:1,borderStyle:"solid",borderColor:Mo(c,t?400:250),_hover:{backgroundColor:Mo(c,t?300:180)},_active:{backgroundColor:Mo(c,t?380:240)},_focusVisible:{outline:"none",boxShadow:g},transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}}},Rd=h.memo(({children:e,icon:o,leftIcon:t,rightIcon:n,isLoading:a,iconPosition:l="left",loaderPosition:c="left",size:s="md",resolvedTextColor:d,isIconRounded:g,loaderProps:m,views:f})=>{const p=["left","right"].includes(l)?i.Horizontal:i.Vertical,u=da[s];return r.jsxs(p,{gap:8,alignItems:"center",justifyContent:"center",fontSize:u.fontSize,fontWeight:u.fontWeight,lineHeight:u.lineHeight,letterSpacing:u.letterSpacing,whiteSpace:"nowrap",color:d,...f==null?void 0:f.content,children:[a&&c==="left"&&r.jsx(eo,{size:s==="xs"||s==="sm"?"sm":"md",color:d,...m,...f==null?void 0:f.loader}),t&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:t}),o&&["left","top"].includes(l)&&!a&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:o}),e,o&&["right","bottom"].includes(l)&&!a&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:o}),n&&r.jsx(i.View,{color:d,...f==null?void 0:f.icon,children:n}),a&&c==="right"&&r.jsx(eo,{size:s==="xs"||s==="sm"?"sm":"md",color:d,...m,...f==null?void 0:f.loader})]})}),e0=e=>{const o=Qo[e];return typeof o=="number"?o:typeof o=="string"&&parseInt(o,10)||0},o0=({asComponent:e,isDisabled:o,isLoading:t,isWrapped:n=!1,borderRadius:a,width:l,height:c,baseStyles:s,sizeStyles:d,iconPad:g,mainTone:m,resolvedTextColor:f,children:p,borderWidth:u=0,...y})=>r.jsx(i.Element,{as:e,disabled:!!(o||t),display:n?"flex":"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:a,width:l,height:c,...s,...d,...g,backgroundColor:(s==null?void 0:s.backgroundColor)||(n?m:void 0),color:f,borderWidth:n?0:void 0,cursor:o?"default":"pointer",...y,children:p}),r0=({shape:e,isDisabled:o,onClick:t,shadow:n,borderWidth:a,isAuto:l,isFilled:c,views:s,children:d,...g})=>r.jsx(i.Element,{as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:Qo[e],cursor:o?"default":"pointer",onClick:t,boxShadow:n,padding:a,width:c?"100%":l?"fit-content":void 0,...s==null?void 0:s.container,...g,children:d}),t0=({variant:e,animation:o,to:t,isDisabled:n,isLoading:a,isAuto:l,isFilled:c,isExternal:s,shape:d="rounded",shadow:g,onClick:m,views:f,baseStyles:p,sizeStyles:u,iconPad:y,containerRef:k,resolvedTextColor:x,content:C,size:S,mainTone:w,borderMovingDuration:v=2,borderMovingGradientColors:b=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:I="#705CFF",animatedStrokeTextColor:T="color-gray-900",...j})=>{var A;const E=e0(d),D=t?r.jsx(Ft,{to:t,isExternal:s,color:"currentColor",textDecoration:"inherit",_hover:{color:"currentColor"},...f==null?void 0:f.link,children:C}):C,W={isDisabled:n,isLoading:a,baseStyles:p,sizeStyles:u,iconPad:y,resolvedTextColor:x,mainTone:w,children:D};if(o==="borderMoving"&&b){const z={from:{backgroundPosition:"0% 50%"},to:{backgroundPosition:"200% 50%"},duration:`${v}s`,timingFunction:"linear",iterationCount:"infinite"};return r.jsx(r0,{shape:d,isDisabled:n,onClick:m,shadow:g,borderWidth:3,isAuto:l,isFilled:c,views:f,background:`linear-gradient(90deg, ${Oe(b[0])}, ${Oe(b[1])}, ${Oe(b[2])}, ${Oe(b[0])})`,backgroundSize:"200% 100%",animate:z,...j,children:r.jsx(o0,{asComponent:t?"div":"button",isWrapped:!0,borderRadius:Math.max(0,E-3),width:"100%",height:"100%",...W})})}if(o==="animatedStroke"){const H=Oe(I),z=Oe(T),P=1e3,V={from:{strokeWidth:"8px",strokeDasharray:`0 ${P}`,strokeDashoffset:-Math.round(P*.63)},to:{strokeWidth:"3px",strokeDasharray:`${P}`,strokeDashoffset:0},duration:"0.9s",timingFunction:"ease-in",fillMode:"forwards"},M=["group",(A=f==null?void 0:f.container)==null?void 0:A.className,j==null?void 0:j.className].filter(Boolean).join(" ");return r.jsxs(i.Element,{ref:k,as:t?"div":"button",type:t?void 0:"button",disabled:!!(!t&&(n||a)),onClick:m,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:c?"100%":l?"fit-content":void 0,borderRadius:Qo[d],boxShadow:g,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,...f==null?void 0:f.container,...j,className:M,children:[r.jsx(i.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:r.jsx(i.View,{as:"rect",x:"0",y:"0",height:"100%",width:"100%",rx:E,ry:E,fill:"transparent",stroke:H,strokeWidth:"8px",strokeDasharray:`0 ${P}`,strokeDashoffset:-Math.round(P*.63),pathLength:P,on:{groupHover:{animate:V}}})}),r.jsx(i.View,{position:"relative",zIndex:0,children:D})]})}if(o==="borderReveal"){const z=Oe((b==null?void 0:b[0])||w||"#000000"),V=v*.75/4,M=`linear-gradient(90deg, ${z} 50%, transparent 50%)`,L=`linear-gradient(180deg, ${z} 50%, transparent 50%)`,_=`linear-gradient(270deg, ${z} 50%, transparent 50%)`,O=`linear-gradient(0deg, ${z} 50%, transparent 50%)`,N="100% 0, 100% 100%, 0 100%, 0 0",U="0 0, 100% 0, 100% 100%, 0 100%",X=`0s, ${V}s, ${V*2}s, ${V*2}s`,oe=`${V*2}s, ${V*2}s, ${V}s, 0s`,B=4;return r.jsx(i.Element,{ref:k,as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:Qo[d],cursor:n?"default":"pointer",onClick:m,boxShadow:g,padding:3,background:`
|
|
2
|
-
${
|
|
3
|
-
${
|
|
4
|
-
${
|
|
5
|
-
${
|
|
6
|
-
`,backgroundSize:`200% ${B}px, ${B}px 200%, 200% ${B}px, ${B}px 200%`,backgroundPosition:N,transitionProperty:"background-position",transitionDuration:`${V}s`,transitionTimingFunction:"linear",transitionDelay:oe,_hover:{backgroundPosition:U,transitionDelay:X},width:c?"100%":l?"fit-content":void 0,...f==null?void 0:f.container,...j,children:r.jsx(i.View,{as:t?"div":"button",disabled:!!(n||a),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,E-3),width:"100%",height:"100%",...p,...u,...y,backgroundColor:(p==null?void 0:p.backgroundColor)||w,color:x,borderWidth:0,cursor:n?"default":"pointer",children:D})})}return r.jsx(i.Element,{ref:k,as:e==="link"&&t?"div":"button",type:e==="link"&&t?void 0:"button",disabled:!!(n||a),...u,...y,display:"inline-flex",alignItems:"center",justifyContent:"center",width:c?"100%":l?"fit-content":void 0,borderRadius:Qo[d],boxShadow:g,transition:"background-color 0.2s ease, opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",cursor:n?"default":"pointer",onClick:m,...p,...f==null?void 0:f.container,...j,children:D})},n0=h.memo(h.forwardRef(({variant:e="filled",size:o="md",shape:t="rounded",iconPosition:n="left",loaderPosition:a="left",backgroundColor:l,color:c,textColor:s,explicitTextColor:d,reversed:g=!1,isAuto:m=!0,isFilled:f,isDisabled:p,isLoading:u,isIconRounded:y,isIcon:k,isHovered:x,icon:C,leftIcon:S,rightIcon:w,startIcon:v,endIcon:b,children:I,to:T,isExternal:j,shadow:E,onClick:D,views:W={},animation:A,loaderProps:H,config:z,ariaLabel:P,borderMovingDuration:V=2,borderMovingGradientColors:M=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:L="#705CFF",animatedStrokeTextColor:_="color-gray-900",...O},N)=>{const X=p?"theme-disabled":u?"theme-loading":l??c??"theme-primary",oe=d??s??"color-white",{config:B}=xr(),$=B==null?void 0:B.theme,q=h.useMemo(()=>{const re=Zd(X,oe,g,$);return z!=null&&z.variants&&Object.keys(z.variants).forEach(ie=>{re[ie]&&(re[ie]=Be(re[ie],z.variants[ie]))}),re},[X,oe,g,$,z==null?void 0:z.variants]),J=q[e]??q.filled,Y=d?{...J,color:d}:J,Z=(Y==null?void 0:Y.color)??oe,ee=r.jsx(Rd,{icon:C,leftIcon:S??v,rightIcon:w??b,isLoading:u,iconPosition:n,loaderPosition:a,size:o,resolvedTextColor:Z,isIconRounded:y,loaderProps:H,views:W,children:I}),ne=da[o],K=y||k?Qd[o]:{};return r.jsx(t0,{variant:e,animation:A,to:T,isDisabled:p,isLoading:u,isAuto:m,isFilled:f,isExternal:j,shape:t,shadow:E,onClick:D,views:W,baseStyles:Y,sizeStyles:ne,iconPad:K,resolvedTextColor:Z,content:ee,size:o,mainTone:X,borderMovingDuration:V,borderMovingGradientColors:M,animatedStrokeAccentColor:L,animatedStrokeTextColor:_,containerRef:N,...P!==void 0?{"aria-label":P}:{},...O})})),de=e=>{const[o,t]=i.useHover(),n=pe("button",e),a=e.textColor??(e.backgroundColor!=null&&e.color!=null?e.color:void 0);return r.jsx(n0,{isHovered:t,...n,explicitTextColor:a})},a0={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},l0={square:0,rounded:"8px",pill:"24px"},i0=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)"}}}},Fr=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}}),ga=h.createContext({}),Wt=()=>h.useContext(ga),Ht=({children:e,views:o,style:t,themeMode:n,...a})=>{var g;const l=i.useTheme(),{styles:c}=Wt(),s=Fr(l).header,d={...s,...c==null?void 0:c.header,...a,style:{...s==null?void 0:s.style,...(g=c==null?void 0:c.header)==null?void 0:g.style,...t}};return r.jsx(i.Vertical,{gap:8,...d,children:e})},jt=({children:e,views:o,style:t,themeMode:n,...a})=>{var g;const l=i.useTheme(),{styles:c}=Wt(),s=Fr(l).content,d={...s,...c==null?void 0:c.content,...a,style:{...s==null?void 0:s.style,...(g=c==null?void 0:c.content)==null?void 0:g.style,...t}};return r.jsx(i.Vertical,{gap:12,...d,children:e})},Pt=({children:e,views:o,style:t,themeMode:n,...a})=>{var g;const l=i.useTheme(),{styles:c}=Wt(),s=Fr(l).footer,d={...s,...c==null?void 0:c.footer,...a,style:{...s==null?void 0:s.style,...(g=c==null?void 0:c.footer)==null?void 0:g.style,...t}};return r.jsx(i.Vertical,{gap:8,...d,children:e})},c0=({variant:e="default",size:o="md",shape:t="rounded",children:n,header:a,footer:l,isFullWidth:c=!1,views:s,style:d,themeMode:g,config:m,...f})=>{var b,I;const p=i.useTheme(),u=Fr(p),y=((b=a0[o])==null?void 0:b.padding)||"16px",k=h.useMemo(()=>({styles:{container:{...u.container,borderRadius:l0[t],...s==null?void 0:s.container},header:{...u.header,padding:y,...s==null?void 0:s.header},content:{...u.content,padding:y,...s==null?void 0:s.content},footer:{...u.footer,padding:y,...s==null?void 0:s.footer}}}),[u,s,y,t]),x=h.Children.toArray(n).some(T=>h.isValidElement(T)&&(T.type===Ht||T.type===jt||T.type===Pt)),{themeMode:C}=p,w=i0(g||C)[e],v={width:c?"100%":"auto",overflow:"hidden",...w,...k.styles.container,...f,style:{...(I=k.styles.container)==null?void 0:I.style,...d}};return r.jsx(ga.Provider,{value:k,children:r.jsx(i.View,{...v,children:x?n:r.jsxs(i.Vertical,{width:"100%",children:[a&&r.jsx(Ht,{children:a}),r.jsx(jt,{children:n}),l&&r.jsx(Pt,{children:l})]})})})},we=e=>{const o=pe("card",e);return r.jsx(c0,{...o})};we.Header=Ht,we.Content=jt,we.Footer=Pt;const s0=({defaultActiveIndex:e=0,activeIndex:o,onChange:t,autoPlay:n=!1,autoPlayInterval:a=3e3,pauseOnHover:l=!0,infinite:c=!0,totalSlides:s,stepIndices:d})=>{const g=h.useRef(s||0),[m,f]=h.useState(s||0),p=h.useRef(new Set),u=h.useRef(0),y=h.useMemo(()=>ct("carousel-content"),[]),[k,x]=h.useState(o!==void 0?o:e),[C,S]=h.useState(!1),[w,v]=h.useState(!1),[b,I]=h.useState(0),[T,j]=h.useState(0),E=h.useRef(null);h.useEffect(()=>{o!==void 0&&x(o)},[o]);const D=h.useCallback(U=>{let X=U;c?U<0?X=m-1:U>=m&&(X=0):X=Math.max(0,Math.min(U,m-1)),d&&d.length>0&&(d.includes(X)||(X=d.reduce((B,$)=>Math.abs($-X)<Math.abs(B-X)?$:B))),o===void 0&&x(X),t&&t(X)},[o,c,t,m]),W=h.useCallback(()=>{D(k+1)},[k,D]),A=h.useCallback(()=>{D(k-1)},[k,D]);h.useEffect(()=>(n&&!C&&!w&&(E.current=setInterval(()=>{W()},a)),()=>{E.current&&clearInterval(E.current)}),[n,a,C,w,W,l]);const H=h.useCallback(()=>{l&&S(!0)},[l]),z=h.useCallback(()=>{S(!1)},[]),P=h.useCallback(U=>{v(!0),"touches"in U?(I(U.touches[0].clientX),j(U.touches[0].clientY)):(I(U.clientX),j(U.clientY))},[]),V=h.useCallback(U=>{if(!w)return;let X,oe;"touches"in U?(X=U.touches[0].clientX,oe=U.touches[0].clientY):(X=U.clientX,oe=U.clientY);const B=X-b,$=oe-T;Math.abs(B)>Math.abs($)&&Math.abs(B)>50&&(B>0?A():W(),v(!1))},[w,b,T,W,A]),M=h.useCallback(()=>{v(!1)},[]),L=h.useCallback(()=>{const U=u.current++;p.current.add(U);const X=p.current.size;return g.current=X,f(X),U},[]),_=h.useCallback(U=>{p.current.delete(U);const X=p.current.size;if(g.current=X,f(X),X>0&&k>=X){const oe=Math.max(0,X-1);o===void 0&&x(oe),t&&t(oe)}},[k,o,t]),O=c||k>0,N=c||k<m-1;return{activeIndex:k,totalSlides:m,goToSlide:D,nextSlide:W,prevSlide:A,canGoNext:N,canGoPrevious:O,handleMouseEnter:H,handleMouseLeave:z,handleDragStart:P,handleDragMove:V,handleDragEnd:M,registerSlide:L,unregisterSlide:_,contentId:y,infinite:c}},d0={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"}},g0={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},zr={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"}},Zo=()=>({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,...zr},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...zr}}),ha=h.createContext(null),Mr=()=>{const e=h.useContext(ha);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},fa=({children:e,isActive:o,index:t,views:n,...a})=>r.jsx(i.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...n,...a,children:e}),ma=({views:e,children:o,...t})=>{const{goToPrevious:n,canGoPrevious:a,styles:l}=Mr(),s={...Zo().prevButton,...l==null?void 0:l.prevButton,...e==null?void 0:e.prevButton};return r.jsx(de,{"aria-label":"Previous slide",onClick:()=>n(),isDisabled:!a,...s,...t,children:o??r.jsx(he,{orientation:"left",widthHeight:16})})},pa=({views:e,children:o,...t})=>{const{goToNext:n,canGoNext:a,styles:l}=Mr(),s={...Zo().nextButton,...l==null?void 0:l.nextButton,...e==null?void 0:e.nextButton};return r.jsx(de,{"aria-label":"Next slide",onClick:()=>n(),isDisabled:!a,...s,...t,children:o??r.jsx(he,{orientation:"right",widthHeight:16})})},ua=({children:e,views:o,...t})=>{const{registerSlide:n,unregisterSlide:a,styles:l}=Mr(),c=h.useRef(null);h.useEffect(()=>{const g=n();return c.current=g,()=>{c.current!==null&&a(c.current)}},[n,a]);const d={...Zo().item,...l==null?void 0:l.item,...o==null?void 0:o.item};return r.jsx(i.View,{role:"group","aria-roledescription":"slide",...d,...t,children:e})},ya=({children:e,views:o,style:t,...n})=>{const{currentIndex:a,styles:l,contentId:c}=Mr(),s=Zo(),d={...s.content,...l==null?void 0:l.content,...o==null?void 0:o.content},g={...s.innerContainer,...l==null?void 0:l.innerContainer,...o==null?void 0:o.innerContainer},m=`-${a*100}%`;return r.jsx(i.View,{...d,...n,style:{...d==null?void 0:d.style,...t},id:c,"aria-live":"polite",children:r.jsx(i.View,{...g,style:{...g==null?void 0:g.style,transform:`translateX(${m})`},children:e})})},h0=({children:e,defaultActiveIndex:o=0,activeIndex:t,onChange:n,showNavigation:a=!0,navigationPosition:l="inside",prevButton:c,nextButton:s,showIndicators:d=!0,indicatorPosition:g="bottom",indicatorVariant:m="dot",autoPlay:f=!1,autoPlayInterval:p=3e3,pauseOnHover:u=!0,infinite:y=!0,direction:k="horizontal",transitionDuration:x=300,views:C,stepIndices:S,themeMode:w,...v})=>{const b=h.useMemo(()=>h.Children.toArray(e),[e]),I=s0({defaultActiveIndex:o,activeIndex:t,onChange:n,autoPlay:f,autoPlayInterval:p,pauseOnHover:u,infinite:y,totalSlides:b.length}),{activeIndex:T,totalSlides:j,goToSlide:E,nextSlide:D,prevSlide:W,handleMouseEnter:A,handleMouseLeave:H,handleDragStart:z,handleDragMove:P,handleDragEnd:V}=I,M=()=>{if(!a)return null;const O=c||r.jsx(i.View,{as:"button","aria-label":"Previous slide",...zr,...C==null?void 0:C.prevButton,children:"❮"}),N=s||r.jsx(i.View,{as:"button","aria-label":"Next slide",...zr,...C==null?void 0:C.nextButton,children:"❯"});return r.jsxs(r.Fragment,{children:[r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",left:l==="inside"?"10px":"-40px",onClick:W,cursor:!y&&T===0?"not-allowed":"pointer",opacity:!y&&T===0?.5:1,children:O}),r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:l==="inside"?"10px":"-40px",onClick:D,cursor:!y&&T===b.length-1?"not-allowed":"pointer",opacity:!y&&T===b.length-1?.5:1,children:N})]})},L=()=>d?r.jsx(i.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...g==="top"?{top:"10px"}:{bottom:"10px"},...C==null?void 0:C.indicators,children:b.map((O,N)=>r.jsx(i.View,{onClick:()=>E(N),cursor:"pointer",...d0[m],...N===T?{...g0[m]}:{},...C==null?void 0:C.indicator,...N===T?C==null?void 0:C.activeIndicator:{},children:m==="number"&&N+1},N))}):null;return h.useMemo(()=>h.Children.toArray(e).some(O=>h.isValidElement(O)&&(O.type===ya||O.type===ua||O.type===ma||O.type===pa)),[e])?r.jsx(ha.Provider,{value:{currentIndex:T,totalSlides:j,goToSlide:E,goToNext:D,goToPrevious:W,canGoNext:I.canGoNext,canGoPrevious:I.canGoPrevious,registerSlide:I.registerSlide,unregisterSlide:I.unregisterSlide,styles:{...Zo(),...C},contentId:I.contentId,infinite:y},children:r.jsx(i.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...C==null?void 0:C.container,...v,children:e})}):r.jsxs(i.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:A,onMouseLeave:H,onTouchStart:z,onTouchMove:P,onTouchEnd:V,onMouseDown:z,onMouseMove:P,onMouseUp:V,...C==null?void 0:C.container,...v,children:[r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...C==null?void 0:C.slideWrapper,children:b.map((O,N)=>r.jsx(fa,{isActive:N===T,index:N,views:C==null?void 0:C.slide,children:O},N))}),M(),L()]})},$e=e=>r.jsx(h0,{...e});$e.Slide=fa,$e.Content=ya,$e.Item=ua,$e.Previous=ma,$e.Next=pa;const Le={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"},ba=[Le.blue,Le.green,Le.purple,Le.orange,Le.red,Le.teal,Le.pink,Le.indigo,Le.yellow,Le.cyan],Wo=ba,f0={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},m0={fontSize:"18px",fontWeight:"700",marginBottom:"24px",textAlign:"center",color:"color-gray-900"},p0={display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginTop:"16px",gap:"12px"},u0={display:"flex",alignItems:"center",padding:"4px 8px",borderRadius:"6px",cursor:"pointer",transition:"background-color 0.2s ease",_hover:{backgroundColor:"color-gray-50"}},y0={width:"10px",height:"10px",borderRadius:"50%",marginRight:"8px"},b0={fontSize:"13px",fontWeight:"500",color:"color-gray-600"},Wr={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},xa={stroke:"color-gray-100",strokeWidth:"1px",strokeDasharray:"4 4"},Hr={stroke:"color-gray-200",strokeWidth:"1px"},jr={fontSize:"12px",fill:"color-gray-500",fontWeight:"500"},x0={rx:"4px",ry:"4px",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{filter:"brightness(1.1)"}},k0={strokeWidth:"3px",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transition:"stroke-width 0.2s ease"},C0={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"}},Pr={strokeWidth:"2px",stroke:"color-white",cursor:"pointer",transition:"all 0.3s ease",_hover:{transform:"scale(1.02)"}},Vt={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"},w0={...Vt},S0={...Vt,backgroundColor:"rgba(254, 242, 242, 0.8)",color:"color-red-600"},v0={...Vt,backgroundColor:"rgba(249, 250, 251, 0.8)",color:"color-gray-500"},T0=({data:e,dataPoints:o,animated:t=!0,animationDuration:n=500,showTooltips:a=!0})=>{const[l,c]=h.useState(t?0:1),[s,d]=h.useState({visible:!1,x:0,y:0,content:null}),g=h.useRef(null),m=h.useRef(null);h.useEffect(()=>{if(!t){c(1);return}const S=Date.now(),w=()=>{const v=Date.now()-S,b=Math.min(v/n,1);c(b),b<1&&(g.current=requestAnimationFrame(w))};return g.current=requestAnimationFrame(w),()=>{g.current&&cancelAnimationFrame(g.current)}},[t,n]);const[f,p]=h.useState(new Set),u=h.useCallback(S=>{p(w=>{const v=new Set(w);return v.has(S)?v.delete(S):v.add(S),v})},[]),y=h.useCallback(()=>e?{...e,series:e.series.map((S,w)=>({...S,color:S.color||Wo[w%Wo.length],hidden:f.has(S.name)}))}:o?o.map((S,w)=>({...S,color:S.color||Wo[w%Wo.length],hidden:f.has(S.label)})):null,[e,o,f]),k=h.useCallback((S,w,v)=>{a&&d({visible:!0,x:S,y:w,content:v})},[a]),x=h.useCallback(()=>{d(S=>({...S,visible:!1}))},[]),C=h.useCallback(()=>{if(!m.current)return{width:0,height:0};const{width:S,height:w}=m.current.getBoundingClientRect();return{width:S,height:w}},[]);return{animationProgress:l,tooltip:s,containerRef:m,processedData:y,showTooltip:k,hideTooltip:x,getChartDimensions:C,toggleSeries:u}},I0=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onBarClick:l,showTooltip:c,hideTooltip:s,views:d})=>{const{getColor:g}=i.useTheme(),m={top:20,right:20,bottom:40,left:50},f=o-m.left-m.right,p=t-m.top-m.bottom,u=h.useMemo(()=>{let b=0;return e.series.forEach(I=>{I.data.forEach(T=>{b=Math.max(b,T)})}),b},[e]),y=e.labels.length,k=e.series.length,x=f/y,C=x*.8/k,S=x*.2/(k+1),w=u||10,v=h.useMemo(()=>{const I=[];for(let T=0;T<=5;T++){const j=w/5*T;I.push(j)}return I},[u]);return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((b,I)=>{const T=b.color?g(b.color):"black";return r.jsxs("linearGradient",{id:`bar-gradient-${I}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:T,stopOpacity:1}),r.jsx("stop",{offset:"100%",stopColor:T,stopOpacity:.7})]},`bar-gradient-${I}`)})}),r.jsx("line",{x1:m.left,y1:t-m.bottom,x2:o-m.right,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),r.jsx("line",{x1:m.left,y1:m.top,x2:m.left,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),e.labels.map((b,I)=>{const T=m.left+(I+.5)*x,j=t-m.bottom+20;return r.jsx("text",{x:T,y:j,textAnchor:"middle",...jr,...d==null?void 0:d.axisLabel,children:b},`x-label-${I}`)}),v.map((b,I)=>{const T=t-m.bottom-b/w*p;return r.jsxs(h.Fragment,{children:[r.jsx("text",{x:m.left-10,y:T,textAnchor:"end",dominantBaseline:"middle",...jr,...d==null?void 0:d.axisLabel,children:b.toFixed(0)}),a&&r.jsx("line",{x1:m.left,y1:T,x2:o-m.right,y2:T,...xa,...d==null?void 0:d.grid})]},`y-tick-${I}`)}),e.series.map((b,I)=>b.hidden?null:r.jsx(h.Fragment,{children:b.data.map((T,j)=>{const E=T/w*p*n,D=m.left+j*x+S*(I+1)+C*I,W=t-m.bottom-E,A=e.labels[j],H=e.series.reduce((L,_)=>{const O=_.data[j];return L+(typeof O=="number"?O:0)},0),z=H>0?(T/H*100).toFixed(1):null,P=b.color?g(b.color):"black",V=L=>{const _=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:b.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:P})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:A}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:T.toLocaleString()})]}),z!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${z}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:H.toLocaleString()})]})]})]}),O=L.currentTarget.getBoundingClientRect(),N=O.left+O.width/2,U=O.top;c(N,U,_)},M=()=>{l&&l(b.name,j)};return r.jsx("rect",{x:D,y:W,width:C,height:E,fill:`url(#bar-gradient-${I})`,onMouseEnter:V,onMouseMove:V,onMouseLeave:s,onClick:M,...x0,...d==null?void 0:d.bar},`bar-${I}-${j}`)})},`series-${I}`))]})},F0=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onPointClick:l,showTooltip:c,hideTooltip:s,views:d})=>{const{getColor:g}=i.useTheme(),m={top:20,right:20,bottom:40,left:40},f=o-m.left-m.right,p=t-m.top-m.bottom,u=h.useMemo(()=>{let S=0;return e.series.forEach(w=>{w.data.forEach(v=>{S=Math.max(S,v)})}),S},[e]),y=u||10,k=h.useMemo(()=>{const w=[];for(let v=0;v<=5;v++){const b=y/5*v;w.push(b)}return w},[u]),x=S=>{if(S.length<2)return"";const w=S.map((b,I)=>({x:m.left+I/(e.labels.length-1)*f,y:t-m.bottom-b/y*p*n}));let v=`M ${w[0].x},${w[0].y}`;for(let b=0;b<w.length-1;b++){const I=w[b===0?b:b-1],T=w[b],j=w[b+1],E=w[b+2===w.length?b+1:b+2],D=T.x+(j.x-I.x)/6,W=T.y+(j.y-I.y)/6,A=j.x-(E.x-T.x)/6,H=j.y-(E.y-T.y)/6;v+=` C ${D},${W} ${A},${H} ${j.x},${j.y}`}return v},C=S=>{if(S.length<2)return"";const w=x(S),v=m.left,b=m.left+f,I=t-m.bottom;return`${w} L ${b},${I} L ${v},${I} Z`};return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((S,w)=>{const v=S.color?g(S.color):"black";return r.jsxs("linearGradient",{id:`gradient-${w}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:v,stopOpacity:.3}),r.jsx("stop",{offset:"100%",stopColor:v,stopOpacity:0})]},`gradient-${w}`)})}),r.jsx("line",{x1:m.left,y1:t-m.bottom,x2:o-m.right,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),r.jsx("line",{x1:m.left,y1:m.top,x2:m.left,y2:t-m.bottom,...Hr,...d==null?void 0:d.axis}),e.labels.map((S,w)=>{const v=m.left+w/(e.labels.length-1)*f,b=t-m.bottom+20;return r.jsx("text",{x:v,y:b,textAnchor:"middle",...jr,...d==null?void 0:d.axisLabel,children:S},`x-label-${w}`)}),k.map((S,w)=>{const v=t-m.bottom-S/y*p;return r.jsxs(h.Fragment,{children:[r.jsx("text",{x:m.left-10,y:v,textAnchor:"end",dominantBaseline:"middle",...jr,...d==null?void 0:d.axisLabel,children:S.toFixed(0)}),a&&r.jsx("line",{x1:m.left,y1:v,x2:o-m.right,y2:v,...xa,...d==null?void 0:d.grid})]},`y-tick-${w}`)}),e.series.map((S,w)=>{if(S.hidden)return null;const v=S.color?g(S.color):"black";return r.jsxs(h.Fragment,{children:[r.jsx("path",{d:C(S.data),fill:`url(#gradient-${w})`,...d==null?void 0:d.area}),r.jsx("path",{d:x(S.data),stroke:v,...k0,...d==null?void 0:d.line}),S.data.map((b,I)=>{const T=m.left+I/(e.labels.length-1)*f,j=t-m.bottom-b/y*p*n,E=e.labels[I],D=e.series.reduce((M,L)=>{const _=L.data[I];return M+(typeof _=="number"?_:0)},0),W=D>0?(b/D*100).toFixed(1):null,A=I>0&&typeof S.data[I-1]=="number"?S.data[I-1]:null,H=typeof A=="number"?b-A:null,z=typeof H=="number"?`${H>=0?"+":""}${H.toLocaleString()}`:null,P=M=>{const L=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:S.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:v})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:E}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:b.toLocaleString()})]}),z!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Change"}),r.jsx(i.Text,{fontWeight:"medium",children:z})]}),W!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${W}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:D.toLocaleString()})]})]})]}),_=M.currentTarget.getBoundingClientRect(),O=_.left+_.width/2,N=_.top+_.height/2;c(O,N,L)},V=()=>{l&&l(S.name,I)};return r.jsx("circle",{cx:T,cy:j,fill:v,onMouseEnter:P,onMouseMove:P,onMouseLeave:s,onClick:V,...C0,...d==null?void 0:d.point},`point-${w}-${I}`)})]},`series-${w}`)})]})},z0=({dataPoints:e,width:o,height:t,animationProgress:n,isDonut:a=!1,onSliceClick:l,showTooltip:c,hideTooltip:s,views:d})=>{const{getColor:g}=i.useTheme(),{ref:m,relation:f}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),p=h.useRef(null);h.useEffect(()=>{p.current&&m&&(m.current=p.current)},[p,m]);const y=Math.min(o,t)/2*.8,k=o/2,x=t/2,C=a?y*.6:0,S=h.useMemo(()=>e.filter(b=>!b.hidden),[e]),w=h.useMemo(()=>S.reduce((b,I)=>b+I.value,0),[S]),v=h.useMemo(()=>{if(w===0)return[{path:a?[`M ${k} ${x-y}`,`A ${y} ${y} 0 1 1 ${k} ${x+y}`,`A ${y} ${y} 0 1 1 ${k} ${x-y}`,`M ${k} ${x-C}`,`A ${C} ${C} 0 1 0 ${k} ${x+C}`,`A ${C} ${C} 0 1 0 ${k} ${x-C}`,"Z"].join(" "):[`M ${k} ${x}`,`M ${k} ${x-y}`,`A ${y} ${y} 0 1 1 ${k} ${x+y}`,`A ${y} ${y} 0 1 1 ${k} ${x-y}`,"Z"].join(" "),color:"#E2E8F0",label:"Total",value:0,percentage:"0%",labelX:k,labelY:x,startAngle:0,endAngle:Math.PI*2,index:-1}];const b=[];let I=-Math.PI/2;for(let T=0;T<S.length;T++){const E=S[T].value/w,D=E*2*Math.PI*n,A=Math.max(0,D-.02),H=I+A,z=k+Math.cos(I)*y,P=x+Math.sin(I)*y,V=k+Math.cos(H)*y,M=x+Math.sin(H)*y,L=k+Math.cos(I)*C,_=x+Math.sin(I)*C,O=k+Math.cos(H)*C,N=x+Math.sin(H)*C,U=A>Math.PI?1:0;let X;a?X=[`M ${z} ${P}`,`A ${y} ${y} 0 ${U} 1 ${V} ${M}`,`L ${O} ${N}`,`A ${C} ${C} 0 ${U} 0 ${L} ${_}`,"Z"].join(" "):X=[`M ${k} ${x}`,`L ${z} ${P}`,`A ${y} ${y} 0 ${U} 1 ${V} ${M}`,"Z"].join(" ");const oe=I+A/2,B=a?(y+C)/2:y*.7,$=k+Math.cos(oe)*B,q=x+Math.sin(oe)*B,J=`${(E*100).toFixed(1)}%`,Y=S[T].color||Wo[T%Wo.length],Z=g(Y);b.push({path:X,color:Z,label:S[T].label,value:S[T].value,percentage:J,labelX:$,labelY:q,startAngle:I,endAngle:H,index:T,originalIndex:e.findIndex(ee=>ee.label===S[T].label)}),I=H}return b},[S,w,y,k,x,C,n,a,e]);return r.jsxs("svg",{ref:p,width:o,height:t,style:{overflow:"visible"},children:[a&&r.jsxs("g",{pointerEvents:"none",children:[r.jsx("circle",{cx:k,cy:x,r:C,fill:"white"}),r.jsx("text",{x:k,y:x-8,textAnchor:"middle",dominantBaseline:"middle",fontSize:"14px",fontWeight:"500",fill:"color-gray-500",children:"Total"}),r.jsx("text",{x:k,y:x+12,textAnchor:"middle",dominantBaseline:"middle",fontSize:"20px",fontWeight:"800",fill:"color-gray-900",children:w.toLocaleString()})]}),v.map((b,I)=>{const T=D=>{const W=w>0?b.value/w*100:0,A=w>0?Math.max(0,100-W):null,H=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:b.label}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:b.color})]}),r.jsxs(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",b.index+1," of ",S.length]}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:b.value.toLocaleString()})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:b.percentage})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Total"}),r.jsx(i.Text,{fontWeight:"medium",children:w.toLocaleString()})]}),A!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Remaining"}),r.jsx(i.Text,{fontWeight:"medium",children:`${A.toFixed(1)}%`})]})]})]});let z=D.clientX,P=D.clientY;if(p.current){const V=p.current.getBoundingClientRect();z=V.left+b.labelX,P=V.top+b.labelY}c(z,P,H)},j=()=>{b.index!==-1&&l&&l(e[b.index],b.index)},E=b.index===-1;return r.jsxs("g",{children:[r.jsx("path",{d:b.path,fill:b.color,onMouseEnter:E?void 0:T,onMouseMove:E?void 0:T,onMouseLeave:E?void 0:s,onClick:j,...Pr,style:{...Pr==null?void 0:Pr.style,cursor:E?"default":"pointer"},...d==null?void 0:d.pie}),!E&&b.endAngle-b.startAngle>.25&&r.jsx("text",{x:b.labelX,y:b.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:b.percentage})]},`slice-${I}`)})]})},M0=({visible:e,x:o,y:t,content:n,maxDistance:a=100,views:l})=>{const c=h.useRef(null),[s,d]=h.useState({left:0,top:0});return h.useEffect(()=>{if(!e||!c.current||typeof window>"u"||typeof c.current.getBoundingClientRect!="function")return;const m=c.current.getBoundingClientRect(),f=m.width||200,p=m.height||100,u=20,y=16;let k=o-f/2,x=t-p-u;x<y&&(x=t+u),k+f>window.innerWidth-y?k=window.innerWidth-f-y:k<y&&(k=y),x=Math.max(y,Math.min(x,window.innerHeight-p-y)),d({left:k,top:x})},[e,o,t]),e?r.jsx(i.View,{ref:c,position:"fixed",left:`${s.left}px`,top:`${s.top}px`,...Wr,...l==null?void 0:l.tooltip,style:{...Wr==null?void 0:Wr.style,pointerEvents:"none",transition:"all 0.1s ease-out"},children:n}):null},W0=({type:e,data:o,dataPoints:t,title:n,showLegend:a=!0,legendPosition:l="bottom",showGrid:c=!0,showTooltips:s=!0,animated:d=!0,animationDuration:g=500,responsive:m=!0,aspectRatio:f=16/9,width:p=200,height:u=200,views:y,onDataPointClick:k,onSeriesClick:x,isLoading:C=!1,error:S,noData:w,loadingIndicator:v,errorIndicator:b,noDataIndicator:I,"aria-label":T,themeMode:j,...E})=>{const{animationProgress:D,tooltip:W,containerRef:A,processedData:H,showTooltip:z,hideTooltip:P,getChartDimensions:V,toggleSeries:M}=T0({data:o,dataPoints:t,animated:d,animationDuration:g,showTooltips:s}),L=H(),{width:_,height:O}=V(),N=p||_,U=u||(m?_/f:O),X=()=>{if(!a||!L)return null;let Z=[];return e==="pie"||e==="donut"?Array.isArray(L)&&(Z=L):L&&L.series&&(Z=L.series),!Z||Z.length===0?null:r.jsx(i.Horizontal,{flexWrap:"wrap",justifyContent:"flex-start",marginTop:l==="bottom"?"16px":0,marginBottom:l==="top"?"16px":0,...p0,...y==null?void 0:y.legend,children:Z.map((ee,ne)=>{const K=ee.hidden,re=ee.name||ee.label;return r.jsxs(i.View,{...u0,onClick:()=>M(re),opacity:K?.4:1,...y==null?void 0:y.legendItem,children:[r.jsx(i.View,{backgroundColor:ee.color,...y0,opacity:K?.3:1}),r.jsx(i.Text,{...b0,textDecoration:K?"line-through":"none",children:re})]},`legend-${ne}`)})})},oe=()=>{if(!L)return null;switch(e){case"bar":return r.jsx(I0,{data:L,width:N,height:U,animationProgress:D,showGrid:c,onBarClick:x,showTooltip:z,hideTooltip:P,views:y});case"line":case"area":return r.jsx(F0,{data:L,width:N,height:U,animationProgress:D,showGrid:c,onPointClick:x,showTooltip:z,hideTooltip:P,views:y});case"pie":case"donut":return r.jsx(z0,{dataPoints:L,width:N,height:U,animationProgress:D,isDonut:e==="donut",onSliceClick:k,showTooltip:z,hideTooltip:P,views:y});default:return null}},B=()=>C?r.jsx(i.View,{...w0,...y==null?void 0:y.loadingOverlay,children:v||r.jsx(i.Center,{children:r.jsx(eo,{size:"lg"})})}):null,$=()=>S?r.jsx(i.View,{...S0,...y==null?void 0:y.errorOverlay,children:b||r.jsx(i.Text,{fontWeight:"medium",children:typeof S=="string"?S:"An error occurred"})}):null,q=()=>w?r.jsx(i.View,{...v0,...y==null?void 0:y.noDataOverlay,children:I||r.jsx(i.Text,{children:typeof w=="string"?w:"No data available"})}):null,J=T??(typeof n=="string"?n:"Chart"),Y=!S&&!C&&!w;return r.jsxs(i.View,{ref:A,role:"region","aria-label":J,"aria-busy":C,...f0,...y==null?void 0:y.container,...E,children:[n&&r.jsx(i.Text,{...m0,children:n}),Y&&l==="top"&&X(),r.jsxs(i.View,{flex:1,width:"100%",position:"relative",...y==null?void 0:y.chart,children:[Y&&oe(),B(),$(),q(),r.jsx(M0,{visible:s&&W.visible,x:W.x,y:W.y,content:W.content,maxDistance:100,views:y})]}),Y&&l==="bottom"&&X()]})},H0=e=>r.jsx(W0,{...e}),j0=(e=365)=>{const[o,t]=h.useState(!1),[n,a]=h.useState(null),l="app-studio-cookie-consent";h.useEffect(()=>{if(typeof localStorage>"u")return;const g=localStorage.getItem(l);a(g!==null?g==="true":!1)},[]);const c=g=>{if(typeof localStorage<"u"){localStorage.setItem(l,String(g));const m=new Date;m.setDate(m.getDate()+e),localStorage.setItem(`${l}-expires`,m.toISOString())}a(g)};return{isHovered:o,setIsHovered:t,hasConsent:n,acceptCookies:()=>{c(!0)},resetConsent:()=>{typeof localStorage<"u"&&(localStorage.removeItem(l),localStorage.removeItem(`${l}-expires`)),a(!1)}}},P0=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"}}}),V0=({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:t="Accepter",customizeButtonText:n="Personnaliser",position:a="bottom",variant:l="default",onAccept:c,onCustomize:s,views:d,showCustomizeButton:g=!0,cookieExpiration:m=365,themeMode:f,...p})=>{const{themeMode:u}=i.useTheme(),{hasConsent:y,acceptCookies:k}=j0(m),C=P0()[l];if(y)return null;const S=()=>{k(),c&&c()},w=()=>{s&&s()};return r.jsx(i.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",...C.container,...d==null?void 0:d.container,...p,children:r.jsxs(i.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&r.jsx(i.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...d==null?void 0:d.title,children:e}),o&&r.jsx(i.Text,{fontSize:14,color:"color-black",...d==null?void 0:d.description,children:o}),r.jsxs(i.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...d==null?void 0:d.buttonGroup,children:[g&&r.jsx(de,{variant:"outline",onClick:w,size:"sm",...d==null?void 0:d.customizeButton,children:n}),r.jsx(de,{variant:"filled",onClick:S,size:"sm",...d==null?void 0:d.acceptButton,children:t})]})]})})},A0=e=>r.jsx(V0,{...e}),E0=e=>{const{size:o,variant:t,onOpenChange:n}=e||{},[a,l]=h.useState(!1),[c,s]=h.useState({x:0,y:0}),[d,g]=h.useState(null),m=h.useRef(null),f=h.useRef(null),p=h.useMemo(()=>ct("contextmenu-content"),[]),u=h.useCallback(k=>{s({x:k.clientX,y:k.clientY}),l(!0),n==null||n(!0)},[n]),y=h.useCallback(()=>{l(!1),g(null),n==null||n(!1)},[n]);return h.useEffect(()=>{const k=S=>{f.current&&!f.current.contains(S.target)&&y()},x=()=>{a&&y()},C=S=>{S.key==="Escape"&&a&&y()};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",k),window.addEventListener("resize",x),document.addEventListener("keydown",C),()=>{document.removeEventListener("mousedown",k),window.removeEventListener("resize",x),document.removeEventListener("keydown",C)}},[a,y]),{isOpen:a,setIsOpen:l,position:c,setPosition:s,activeSubmenuId:d,setActiveSubmenuId:g,size:o,variant:t,triggerRef:m,contentRef:f,contentId:p,openMenu:u,closeMenu:y}},ka={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},D0={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"}},Ca={hover:{backgroundColor:"color-gray-100"}},wa=h.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:()=>{}}),$0=({children:e,value:o})=>r.jsx(wa.Provider,{value:o,children:e}),Vr=()=>{const e=h.useContext(wa);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},Sa=({children:e,disableNativeContextMenu:o=!0,asChild:t=!1,isDisabled:n=!1,views:a,...l})=>{const{triggerRef:c,contentId:s,openMenu:d}=Vr(),m={ref:c,onContextMenu:f=>{if(!n)if(o&&f.preventDefault(),d)d(f);else{const{setIsOpen:p,setPosition:u}=Vr();u({x:f.clientX,y:f.clientY}),p(!0)}},"aria-controls":s,"aria-haspopup":"menu","data-disabled":n?"":void 0,...t&&h.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:n},...a==null?void 0:a.container,...l};if(t&&h.isValidElement(e)){const f=h.Children.only(e);return h.cloneElement(f,{...m,...f.props})}return r.jsx(i.View,{...m,children:e})},At=({items:e,children:o,position:t,side:n="right",align:a="start",views:l,style:c,...s})=>{const{isOpen:d,position:g,contentRef:m,contentId:f,variant:p}=Vr(),u=h.useRef(null),y=m||u,{ref:k,relation:x}=i.useElementPosition({}),[C,S]=h.useState({x:0,y:0});if(h.useEffect(()=>{if(d&&y.current){const v=t||g,b=y.current.offsetWidth,I=y.current.offsetHeight,T=window.innerWidth,j=window.innerHeight;let E=v.x,D=v.y;x&&(x.space.horizontal==="left"?E=v.x-b:E=v.x,x.space.vertical==="top"?D=v.y-I:D=v.y),E+b>T&&(E=T-b-8),E<8&&(E=8),D+I>j&&(D=j-I-8),D<8&&(D=8),S({x:E,y:D})}},[d,g,t,n,a,y,x]),!d)return null;const w={position:"fixed",top:`${C.y}px`,left:`${C.x}px`,zIndex:1e3,transformOrigin:"top left"};return r.jsxs(i.View,{id:f||"context-menu",ref:y,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...w,...c},...D0[p],...l==null?void 0:l.menu,...l==null?void 0:l.content,...s,children:[e&&e.map((v,b)=>v.divider?r.jsx(Ta,{views:l},`divider-${b}`):r.jsx(va,{item:v,views:l},v.id)),o]})},va=({item:e,children:o,onSelect:t,isDisabled:n=!1,views:a,variant:l,shape:c,isLoading:s,loaderProps:d,loaderPosition:g,icon:m,iconPosition:f,isFilled:p,isAuto:u,isIconRounded:y,isHovered:k,shadow:x,ariaLabel:C,animation:S,textColor:w,reversed:v,borderMovingDuration:b,borderMovingGradientColors:I,animatedStrokeAccentColor:T,animatedStrokeTextColor:j,to:E,isExternal:D,config:W,...A})=>{const{activeSubmenuId:H,setActiveSubmenuId:z,size:P,closeMenu:V}=Vr();if(e){const[_,O]=h.useState(!1),N=e.items&&e.items.length>0,U=H===e.id,[X,oe]=h.useState({x:0,y:0}),B=e.disabled||n,$=()=>{O(!0),N&&z(e.id)},q=()=>{O(!1)},J=()=>{B||!N&&e.onClick&&(e.onClick(),V&&V())},{ref:Y,relation:Z}=i.useElementPosition({});return h.useEffect(()=>{if(U&&Y.current){const ee=Y.current.getBoundingClientRect(),ne=window.innerWidth,K=200;let re=!1;if(Z)re=Z.space.horizontal==="left";else{const ie=ne-ee.right,ge=ee.left;re=ie<K&&ge>ie}oe({x:re?ee.left-K:ee.right,y:ee.top})}},[U,e.items,Z]),r.jsxs(i.View,{ref:Y,role:"menuitem",display:"flex",alignItems:"center",cursor:B?"not-allowed":"pointer",opacity:B?.5:1,position:"relative","aria-disabled":B,"data-disabled":B?"":void 0,...ka[P],_hover:B?{}:Ca.hover,backgroundColor:_&&!B?"color-gray-100":"transparent",onMouseEnter:$,onMouseLeave:q,onClick:J,...a==null?void 0:a.item,...A,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),N&&r.jsx(i.View,{marginLeft:8,...a==null?void 0:a.submenuIndicator,children:r.jsx(he,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),U&&N&&r.jsx(At,{items:e.items||[],position:X,side:"right",align:"start",views:a})]})}const M=_=>{n||(t==null||t(_),V&&V())},L=E?{as:"a",href:E,color:"inherit",textDecoration:"none",...D?{target:"_blank",rel:"noopener noreferrer"}:{}}:{};return r.jsx(i.View,{role:"menuitem",onClick:M,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,"aria-disabled":n,"data-disabled":n?"":void 0,...ka[P],_hover:n?{}:Ca.hover,...L,...a==null?void 0:a.item,...A,children:o})},Ta=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.divider,...o}),L0=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.separator,...o}),_0=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,views:l,themeMode:c,onOpenChange:s,...d})=>!o||o.length===0?r.jsx(r.Fragment,{children:e}):r.jsxs(r.Fragment,{children:[r.jsx(Sa,{disableNativeContextMenu:a,views:l,...d,children:e}),r.jsx(At,{items:o,views:l})]}),Ho=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,onOpenChange:l,views:c,...s})=>{const d=E0({size:t,variant:n,onOpenChange:l}),{isOpen:g,setIsOpen:m,position:f,setPosition:p,activeSubmenuId:u,setActiveSubmenuId:y,triggerRef:k,contentRef:x,contentId:C,openMenu:S,closeMenu:w}=d;return r.jsx($0,{value:{isOpen:g,setIsOpen:m,position:f,setPosition:p,activeSubmenuId:u,setActiveSubmenuId:y,size:t,variant:n,triggerRef:k,contentRef:x,contentId:C,openMenu:S,closeMenu:w,styles:c},children:r.jsx(_0,{items:o,size:t,variant:n,disableNativeContextMenu:a,views:c,...s,children:e})})};Ho.Trigger=Sa,Ho.Content=At,Ho.Item=va,Ho.Divider=Ta,Ho.Separator=L0;const B0=({src:e,color:o,views:t,themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),s=o?{fill:l(o,{themeMode:c}),stroke:l(o,{themeMode:c})}:{};return r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",...a,...t==null?void 0:t.container,children:r.jsx(i.Image,{...s,content:'url("'+e+'")',width:"100%",height:"100%",...t==null?void 0:t.image})})},O0=({path:e,...o})=>r.jsx(i.Image,{src:e,...o}),Ia=(e,o)=>o?Array.isArray(e)?e:e===""?[]:[e]:Array.isArray(e)?e[0]??"":e,Fa=({placeholder:e,isMulti:o,options:t,value:n,defaultValue:a,id:l})=>{const c=h.useId().replace(/[^a-zA-Z0-9_-]/g,""),s=l??`select-${c}`,d=n!==void 0,[g,m]=h.useState(!1),[f,p]=h.useState(!1),[u,y]=h.useState(()=>a!==void 0?Ia(a,o):o?[]:e?"":Array.isArray(t)&&t.length>0?t[0].value:""),k=d?Ia(n,o):u,x=h.useCallback(b=>{d||y(b)},[d]),[C,S]=h.useState(0),[w,v]=h.useState(!0);return{id:s,value:k,setValue:x,hide:w,setHide:v,isHovered:g,setIsHovered:m,isFocused:f,setIsFocused:p,highlightedIndex:C,setHighlightedIndex:S}},Et=({children:e,views:o={helperText:{}},...t})=>r.jsx(i.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,...t,children:e}),Ue=h.forwardRef(({children:e,helperText:o,error:t=!1,views:n,...a},l)=>r.jsxs(i.Vertical,{ref:l,gap:4,position:"relative",width:"100%",boxSizing:"border-box",marginVertical:0,...a,...n==null?void 0:n.container,children:[e,!t&&o&&r.jsx(Et,{marginTop:0,...n==null?void 0:n.helperText,children:o}),t&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",marginTop:0,marginHorizontal:0,fontWeight:"500",color:"color-red-500",transition:"color 0.2s ease, opacity 0.2s ease",...n==null?void 0:n.error,children:t})]}));Ue.displayName="FieldContainer";const N0={default:{borderRadius:"8px"},square:{borderRadius:0},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},q0={xs:"10px",sm:"11px",md:"11px",lg:"12px",xl:"12px"},U0={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"}},G0={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}},Y0=e=>{const{minHeight:o,paddingVertical:t,paddingHorizontal:n}=G0[e];return{minHeight:`${o}px`,paddingTop:`${t}px`,paddingBottom:`${t}px`,paddingLeft:`${n}px`,paddingRight:`${n}px`}},oo=({label:e,shadow:o,children:t,value:n,size:a="md",shape:l="default",variant:c="default",error:s=!1,showLabel:d=!1,isFocused:g=!1,isHovered:m=!1,isDisabled:f=!1,isReadOnly:p=!1,views:u={pickerBox:{}},...y})=>{const{themeMode:k}=i.useTheme(),x=k==="dark",S=s?"color-red-500":(m||g)&&!f?"theme-primary":"color-gray-200";return r.jsx(i.Horizontal,{gap:8,width:"100%",boxSizing:"border-box",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",borderStyle:"solid",borderColor:S,backgroundColor:x?"color-gray-900":"color-white",fontSize:i.Typography.fontSizes[a],cursor:f?"not-allowed":p?"auto":"text",opacity:f?.7:1,transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...Y0(a),...typeof o=="object"&&o!==null?o:{},...N0[l],...U0[c],...u==null?void 0:u.container,...y,children:t})},Ro=({children:e,...o})=>r.jsx(i.Horizontal,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",...o,children:e}),K0={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}},X0=({children:e,heading:o,isItalic:t=!1,isUnderlined:n=!1,isStriked:a=!1,weight:l="normal",size:c="sm",dropDown:s,error:d,isDisabled:g,helperText:m,views:f,...p})=>{const u=o?K0[o]:{};return r.jsx(i.Element,{as:"label",width:"100%",fontSize:c,fontStyle:t?"italic":"normal",fontWeight:i.Typography.fontWeights[l],textDecoration:a?"line-through":n?"underline":"none",...d?{color:"color-red-500"}:g?{color:"color-gray-400"}:{},...g?{cursor:"not-allowed"}:{},...u,...p,children:e})},er=e=>r.jsx(X0,{...e}),ho=({children:e,size:o="md",error:t=!1,color:n="theme-primary",views:a={label:{}},helperText:l,...c})=>r.jsx(er,{position:"static",fontSize:q0[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,color:t?"color-red-500":"inherit",transition:"color 0.2s ease",...a.label,...c,children:e}),jo=({children:e,...o})=>r.jsx(i.Vertical,{display:"flex",flexDirection:"column",gap:4,flex:1,width:"100%",maxWidth:"100%",boxSizing:"border-box",...o,children:e}),za={xs:12,sm:14,md:16,lg:18,xl:20},J0={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)"},Q0={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"}},Z0={padding:"10px 12px",cursor:"pointer",borderRadius:8,margin:"2px 4px",transition:"all 0.15s ease-in-out"},Ar={default:{},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},Ma={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},R0={padding:"4px 8px",borderRadius:8,backgroundColor:"color-gray-100",fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},eg={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},og=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},rg=({isHovered:e,setIsHovered:o=()=>{},option:t,size:n="md",callback:a=()=>{},style:l,isSelected:c=!1,...s})=>{const d=(f,p)=>{f.stopPropagation(),f.preventDefault(),typeof a=="function"&&a(p)},g=()=>o(!e),m=()=>c&&e?Ar.selectedHighlighted:c?Ar.selected:e?Ar.highlighted:Ar.default;return r.jsxs(i.Element,{as:"li",role:"option","aria-selected":c,display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",...Z0,...m(),onMouseEnter:g,onMouseLeave:g,onClick:f=>d(f,t.value),...s,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[n],fontWeight:c?"500":"400",lineHeight:"14px",color:c?"color-gray-900":"color-gray-700",...l,children:t.label}),c&&r.jsx(i.Element,{as:"span","aria-hidden":"true",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},tg=({size:e="md",views:o={field:{},text:{}},value:t,isDisabled:n,placeholder:a,removeOption:l=()=>{},options:c})=>{const s=(o==null?void 0:o.field)||{},d=(o==null?void 0:o.text)||{},g=Array.isArray(t)&&t.length>0,m={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:0,paddingHorizontal:0,fontSize:i.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",...g?{}:{maxLines:1,minWidth:0},...s,...d,style:{backgroundColor:"transparent",...s.style,...d.style}},f=c.length>0&&c.find(p=>p.value===t);return r.jsx(i.Text,{...m,children:(t===""||Array.isArray(t)&&t.length===0)&&a?a:r.jsx(r.Fragment,{children:typeof t=="string"?(f&&f.label)??t:Array.isArray(t)&&t.length>0?r.jsx(i.Horizontal,{gap:6,children:t.map(p=>r.jsx(lg,{option:p,removeOption:l},p))}):r.jsx("span",{children:t})})})},ng=({id:e,name:o,value:t,onChange:n,isMulti:a=!1,isDisabled:l=!1,isReadOnly:c=!1,options:s=[],defaultValue:d,...g})=>{const m=f=>{n&&n(a?Array.from(f.target.selectedOptions,p=>p.value):f.target.value)};return r.jsx(i.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:t,disabled:l,readOnly:c,onChange:m,multiple:a,...g,children:s.length>0&&s.map(f=>r.jsx("option",{value:f.value,children:f.label},f.value))})},ag=({size:e,views:o={},options:t,callback:n=()=>{},highlightedIndex:a,setHighlightedIndex:l=()=>{},selectedValue:c,listboxId:s,getOptionId:d})=>{const g=f=>n(f),m=f=>Array.isArray(c)?c.includes(f):c===f;return r.jsx(i.Element,{as:"ul",role:"listbox",id:s,display:"flex",flexDirection:"column",margin:0,padding:"4px",...J0,style:eg,...o==null?void 0:o.dropDown,children:t&&t.length>0&&t.map((f,p)=>r.jsx(rg,{id:d?d(p):void 0,size:e,style:o.text,option:f,callback:g,isSelected:m(f.value),isHovered:p===a,setIsHovered:()=>{},onMouseEnter:()=>l(p)},f.value))})},lg=({option:e,size:o="md",removeOption:t=()=>{},...n})=>{const a=()=>t(e);return r.jsxs(i.Horizontal,{gap:6,alignItems:"center",onClick:l=>l.stopPropagation(),...R0,_hover:{backgroundColor:"color-gray-200"},...n,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),r.jsx(i.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:r.jsx(He,{color:"inherit",widthHeight:za[o]})})]})},Wa=({id:e,name:o,label:t,value:n,placeholder:a,helperText:l,hide:c=!1,error:s=!1,isMulti:d=!1,isFocused:g=!1,isHovered:m=!1,isDisabled:f=!1,isReadOnly:p=!1,isRequired:u=!1,isAutoFocus:y=!1,options:k=[],shadow:x={},size:C="md",shape:S="default",variant:w="default",views:v={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:b=()=>{},setHide:I=()=>{},setValue:T=()=>{},setIsHovered:j=()=>{},setIsFocused:E=()=>{},setHighlightedIndex:D,highlightedIndex:W,isScrollable:A,"aria-label":H,...z})=>{const P=h.useId(),V=e??`select-${P.replace(/[^a-zA-Z0-9_-]/g,"")}`,M=`${V}-native`,L=`${V}-label`,_=`${V}-listbox`,O=K=>`${V}-option-${K}`,{ref:N,relation:U,updateRelation:X}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),oe=h.useRef(null),B=()=>{var ge;if(!N.current)return{};const K=N.current.getBoundingClientRect(),re={position:"fixed",left:K.left,width:K.width,zIndex:1e4};return((ge=U==null?void 0:U.space)==null?void 0:ge.vertical)==="top"?{...re,bottom:window.innerHeight-K.top+8}:{...re,top:K.bottom+8}};h.useEffect(()=>{const K=()=>I(!0);return document.addEventListener("closeAllSelects",K),()=>document.removeEventListener("closeAllSelects",K)},[I]),h.useEffect(()=>{var K;y&&!f&&!p&&((K=N.current)==null||K.focus())},[]),h.useEffect(()=>{const K=re=>{!re.target.closest(`#${V}`)&&!c&&I(!0)};return document.addEventListener("click",K),()=>{document.removeEventListener("click",K)}},[V,c,I]);const $=()=>j(!m),q=()=>E(!0),J=K=>{document.dispatchEvent(new Event("closeAllSelects")),K&&K.stopPropagation&&K.stopPropagation();const re=!c;I(re),E(!re)},Y=h.useCallback(K=>{if(I(!0),document.dispatchEvent(new Event("closeAllSelects")),d&&Array.isArray(n)){if(!n.includes(K)){const re=[...n,K];T(re),b&&b(re)}}else T(K),b&&b(K);E(!0)},[d,n,I,T,b,E]),Z=K=>{if(Array.isArray(n)&&n.includes(K)){const re=n.filter(ie=>ie!==K);T(re),b&&b(re)}},ee=!!t,ne=og(v);return r.jsx(Ue,{ref:N,position:"relative",width:"100%",display:"inline-block",id:V,role:"combobox","aria-haspopup":"listbox","aria-expanded":!c,"aria-labelledby":!H&&ee?L:void 0,"aria-label":H,"aria-controls":_,"aria-activedescendant":!c&&k.length>0?O(W??0):void 0,"aria-disabled":f||void 0,"aria-required":u||void 0,tabIndex:f||p?-1:0,helperText:l,error:s,views:ne,onKeyDown:K=>{if(f||p||K.target!==K.currentTarget)return;if(c){(K.key==="Enter"||K.key===" "||K.key==="ArrowDown")&&(K.preventDefault(),document.dispatchEvent(new Event("closeAllSelects")),I(!1),E(!0));return}const re=W??0;if(K.key==="ArrowDown")K.preventDefault(),D==null||D(Math.min(re+1,k.length-1));else if(K.key==="ArrowUp")K.preventDefault(),D==null||D(Math.max(re-1,0));else if(K.key==="Enter"){K.preventDefault();const ie=k[re];ie&&Y(ie.value)}else K.key==="Escape"&&(K.preventDefault(),I(!0))},onClick:K=>{K.stopPropagation(),f||p||J(K)},children:r.jsxs(oo,{label:t,size:C,error:s,shape:S,views:v,shadow:x,variant:w,value:n,color:"theme-primary",isHovered:m,isDisabled:f,isReadOnly:p,isFocused:g,showLabel:ee,onMouseEnter:$,onMouseLeave:$,position:"relative",...v==null?void 0:v.content,children:[r.jsxs(jo,{children:[ee&&r.jsx(ho,{id:L,htmlFor:M,color:"theme-primary",error:s,...v==null?void 0:v.label,children:t}),r.jsx(ng,{id:M,name:o,options:k,onChange:b,value:n,isDisabled:f,isReadOnly:p,isMulti:d,required:u||void 0,onFocus:q,...z}),r.jsx(tg,{options:k,size:C,views:v,value:n,isDisabled:f,placeholder:a,removeOption:Z})]}),r.jsx(Ro,{children:!p&&!f&&r.jsx(i.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:c?Ma.closed:Ma.open,children:r.jsx(he,{color:"inherit",widthHeight:za[C],style:v.icon,orientation:"down"})})}),!c&&k.length>0&&r.jsx(ft,{children:r.jsx(i.Element,{ref:oe,onClick:K=>K.stopPropagation(),style:{...B(),...Q0.enter},children:r.jsx(ag,{size:C,views:v,options:k,callback:Y,highlightedIndex:W,setHighlightedIndex:D,selectedValue:n,listboxId:_,getOptionId:O})})})]})})},or=e=>{const o=pe("select",e),t={...o,options:o.options||[]},n=Fa(t);return r.jsx(Wa,{...n,...t,value:n.value,onClick:a=>{a.stopPropagation(),o.onClick&&o.onClick(a)}})},Ha=({isDisabled:e,isChecked:o})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(o||!1),[c,s]=h.useState(o||!1);return h.useEffect(()=>{o!==void 0&&(l(o),s(o))},[o]),{isHovered:t,setIsHovered:n,on:a,setOn:l,value:c,setValue:s}},ja={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"}},ig={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"}},cg={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"}},sg={xs:"9px",sm:"10px",md:"11px",lg:"12px",xl:"13px"},Er={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}},Ge={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"}}}},Pa={slider:{transition:"all 0.2s ease-in-out"},knob:{transition:"all 0.2s ease-in-out"}},dg=e=>r.jsx(i.Input,{type:"checkbox",...e}),Va=({id:e,name:o,label:t,inActiveChild:n,isChecked:a,activeChild:l,labelPosition:c="right",shadow:s={},size:d="sm",value:g=!1,isHovered:m=!1,isDisabled:f=!1,isReadOnly:p=!1,on:u,setOn:y=()=>{},onChange:k,setValue:x=()=>{},setIsHovered:C=()=>{},helperText:S,description:w,views:v={slider:{},circle:{},label:{}},...b})=>{const I=h.useId(),T=e??I,[j,E]=h.useState(!1),D=typeof a=="boolean"?a:g,A=!!(l||n)?cg[d]:ig[d],H=`${Er[d].paddingHorizontal}px`,z=`${Er[d].paddingHorizontal+2}px`,P=`calc(${ja[d].width} + ${Er[d].paddingHorizontal}px + 4px)`,V=sg[d],M=B=>{if(!p&&!f){const $=B.target.checked;x($),y($),k&&k($)}},L=()=>C(!0),_=()=>C(!1),O=B=>{let $=!0;try{$=B.target.matches(":focus-visible")}catch{}E($)},N=()=>E(!1),U=`${T}-description`,X={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:f?"not-allowed":p?"default":"pointer",opacity:f?.6:1,transition:"all 0.2s ease-in-out",...v.label}},oe=r.jsxs(er,{htmlFor:T,onMouseEnter:L,onMouseLeave:_,...X.container,children:[c==="left"&&t&&r.jsx(i.Text,{fontWeight:"500",color:f?"color-gray-400":"inherit",transition:"color 0.2s ease, opacity 0.2s ease",children:t}),r.jsxs(i.View,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",marginBottom:4,borderRadius:"9999px",backgroundColor:f?Ge.default.disabled:D?m?Ge.states.hover.active:Ge.default.active:m?Ge.states.hover.inactive:Ge.default.inactive,opacity:!f&&D&&m?Ge.states.hover.activeOpacity:1,cursor:"pointer",...Pa.slider,...s,...Er[d],...A,...v.slider,...j?D?Ge.states.focus.active:Ge.states.focus.inactive:{},children:[r.jsx(dg,{id:T,name:o,role:"switch","aria-checked":D,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:2,cursor:f?"not-allowed":p?"default":"pointer",checked:D,onChange:M,onFocus:O,onBlur:N,disabled:f,readOnly:p,"aria-describedby":w?U:void 0,...b}),l&&D&&r.jsx(i.View,{marginLeft:z,marginRight:P,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:l}),r.jsx(i.View,{position:"absolute",top:"50%",left:D?void 0:H,right:D?H:void 0,borderRadius:"50%",backgroundColor:Ge.default.knob,boxShadow:m?"0 4px 10px rgba(15, 23, 42, 0.18)":"0 1px 3px rgba(15, 23, 42, 0.18)",transform:`translateY(-50%) ${m?"scale(1.05)":"scale(1)"}`,...Pa.knob,zIndex:1,...ja[d],...v.circle}),n&&!D&&r.jsx(i.View,{marginLeft:P,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})]}),c==="right"&&t&&r.jsx(i.Text,{fontWeight:"500",color:f?"color-gray-400":"inherit",transition:"all 0.2s ease-in-out",children:t})]});return w?r.jsxs(i.Vertical,{gap:4,width:"fit-content",children:[oe,r.jsx(i.Text,{id:U,color:"color-gray-500",fontSize:"14px",lineHeight:"20px",children:w})]}):oe},Dt=e=>{const o=pe("switch",e),t=Ha(o);return r.jsx(Va,{...t,...o})},Aa=({placeholder:e,isMulti:o,options:t,id:n})=>{const a=h.useId().replace(/[^a-zA-Z0-9_-]/g,""),l=n??`selector-${a}`,c=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[s,d]=h.useState(!1),[g,m]=h.useState(!1),[f,p]=h.useState(c),[u,y]=h.useState(!0);return{id:l,value:f,setValue:p,hide:u,setHide:y,isHovered:s,setIsHovered:d,isFocused:g,setIsFocused:m}},Ea=({id:e,name:o,label:t,value:n,views:a={},options:l=[],helperText:c,error:s=!1,isDisabled:d=!1,isReadOnly:g=!1,onChange:m=()=>{},setValue:f=()=>{},hide:p,setHide:u,isHovered:y,setIsHovered:k,isFocused:x,setIsFocused:C,placeholder:S,isMulti:w,shape:v,variant:b,size:I,shadow:T,isScrollable:j,"aria-label":E,...D})=>{const W=h.useId(),A=e??W,H=`${A}-label`,z=`${A}-helper-text`,P=!!c,V=h.useCallback(M=>{d||g||(f(M.value),m&&m(M.value))},[f,m,d,g]);return r.jsxs(Ue,{id:A,width:"100%",views:a,...D,children:[t&&r.jsxs(i.Horizontal,{fontSize:"10px",letterSpacing:"wider",color:"color-black-500",fontWeight:"bold",marginBottom:12,alignItems:"center",gap:6,style:{textTransform:"uppercase"},children:[r.jsx(Re,{widthHeight:14})," ",r.jsx(i.Text,{id:H,children:t})]}),r.jsx(i.Horizontal,{gap:0,role:"radiogroup","aria-labelledby":!E&&t?H:void 0,"aria-label":E,"aria-describedby":P?z:void 0,"aria-readonly":g||void 0,"aria-invalid":s?!0:void 0,children:l.map((M,L,_)=>{const O=n===M.value,N=M.color??"theme-primary",U=O?N:"color-gray-200",X=O?N:"color-gray-500",oe=L===0,B=L===_.length-1,$=B||O;return r.jsx(i.View,{as:"button",type:"button",role:"radio","aria-checked":O,disabled:d,onClick:()=>V(M),flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",paddingVertical:6,paddingHorizontal:12,fontSize:"12px",fontWeight:O?"bold":"normal",cursor:d?"not-allowed":g?"default":"pointer",backgroundColor:"transparent",color:X,borderStyle:"solid",borderColor:U,borderTopWidth:1,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:$?1:0,borderRadius:oe?"6px 0 0 6px":B?"0 6px 6px 0":"0",zIndex:O?1:0,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...a.item,children:M.label},M.value)})}),r.jsx("input",{type:"hidden",id:`${A}-input`,name:o,value:Array.isArray(n)?n.join(","):n,onChange:()=>{}}),P&&r.jsx(i.Text,{id:z,fontSize:"11px",lineHeight:"16px",marginTop:0,fontWeight:s?"500":"400",color:s?"color-red-500":"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...a.helperText,children:c})]})},gg=e=>{const o={...e,options:e.options||[]},t=Aa(o);return r.jsx(Ea,{...t,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},Da=({label:e,placeholder:o,value:t})=>{const[n,a]=h.useState(e??o),[l,c]=h.useState(!1),[s,d]=h.useState(t||""),[g,m]=h.useState(!1);return h.useMemo(()=>{a(g&&!s?o??"":e??o)},[s,g,e,o]),{hint:n,setHint:a,isHovered:l,setIsHovered:c,value:s,setValue:d,isFocused:g,setIsFocused:m}},hg=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},fg=(e,o)=>{if(o!=="pill")return e;if(typeof e=="number")return Math.min(e,28);if(typeof e=="string"){const t=Number.parseFloat(e);if(Number.isFinite(t)&&e.trim().endsWith("px"))return`${Math.min(t,28)}px`}return"28px"},$a=({id:e,name:o,hint:t,error:n,value:a,label:l,shadow:c,helperText:s,placeholder:d,size:g="sm",shape:m="default",variant:f="default",isHovered:p=!1,isFocused:u=!1,isEditable:y=!0,isReadOnly:k=!1,isDisabled:x=!1,isAutoFocus:C=!1,isRequired:S,required:w,labelProps:v,maxRows:b=3,maxCols:I=30,onBlur:T=()=>{},onChange:j,onFocus:E,setHint:D=()=>{},setValue:W=()=>{},setIsFocused:A=()=>{},setIsHovered:H=()=>{},onChangeText:z,inputRef:P,views:V={label:{},helperText:{}},...M})=>{const L=h.useId(),_=e??L,O=!!l,N={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"}},U=(V==null?void 0:V.field)||{},X=(V==null?void 0:V.container)||{},oe=fg(X.borderRadius,m),B={...V,container:{...X,...oe!==void 0?{borderRadius:oe}:{},overflow:"hidden"}},$=hg(V),q={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:N[g].minHeight,maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:N[g].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:x?"color-gray-400":"color-gray-900",cursor:x?"not-allowed":"text",opacity:x?.7:1,transition:"color 0.2s ease, opacity 0.2s ease",...U,style:{backgroundColor:"transparent",...U.style}},J=()=>{A(!0),E&&E()},Y=ee=>{T(ee),A(!1)},Z=ee=>{const ne=typeof ee=="string"?ee:ee.target.value;W(ne),z&&z(ne),j&&j(ne)};return r.jsx(Ue,{helperText:s,error:n,views:$,children:r.jsx(oo,{label:l,size:g,error:n,shape:m,views:B,shadow:c,variant:f,value:a,color:"theme-primary",isHovered:p,isDisabled:x,isReadOnly:k,isFocused:u,showLabel:O,alignItems:"flex-start",minHeight:N[g].minHeight,paddingTop:N[g].shellPaddingY,paddingBottom:N[g].shellPaddingY,paddingLeft:N[g].shellPaddingX,paddingRight:N[g].shellPaddingX,onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),...B==null?void 0:B.content,children:r.jsxs(jo,{...V==null?void 0:V.warper,children:[O&&r.jsx(ho,{htmlFor:_,color:"theme-primary",error:n,...v,...V==null?void 0:V.label,children:l}),r.jsx(i.Element,{ref:P,as:"textarea",id:_,name:o,rows:b,cols:I,value:a,readOnly:k||!y,disabled:x,autoFocus:C,...S??w?{required:!0,"aria-required":!0}:{},placeholder:d||t,onBlur:Y,onFocus:J,onChange:ee=>Z(ee),...q,...M,style:{resize:x||k||!y?"none":"vertical",...q.style,...M.style||{}},...V==null?void 0:V.textarea})]})})})},$t=e=>{const o=pe("textarea",e),t=Da(o);return r.jsx($a,{...t,...o})},Lt=({label:e,placeholder:o,value:t})=>{const[n,a]=h.useState(e??o),[l,c]=h.useState(!1),[s,d]=h.useState(!1),[g,m]=h.useState(t);return h.useMemo(()=>{a(l&&!g?o??"":e??o)},[g,l,e,o]),{hint:n,setHint:a,isFocused:l,setIsFocused:c,isHovered:s,setIsHovered:d,setValue:m,value:g}},rr=({id:e,name:o,label:t,hint:n,value:a,onChange:l,left:c,right:s,helperText:d,placeholder:g,onChangeText:m,shadow:f={},views:p={container:{},field:{},label:{},helperText:{},text:{}},size:u="md",shape:y="default",variant:k="default",error:x=!1,isFocused:C=!1,isHovered:S=!1,isDisabled:w=!1,isReadOnly:v=!1,isClearable:b=!0,isAutoFocus:I=!1,isRequired:T,required:j,labelProps:E,leftIcon:D,rightIcon:W,setHint:A=()=>{},setIsFocused:H=()=>{},setIsHovered:z=()=>{},setValue:P=()=>{},onClick:V=()=>{},onFocus:M,onBlur:L=()=>{},themeMode:_,inputRef:O,...N})=>{const U=h.useId(),X=e??U,{getColor:oe,themeMode:B}=i.useTheme(),$=oe(w?"color-gray-400":"color-gray-500",{themeMode:_||B}),q=!!t,J={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"}},Y=(p==null?void 0:p.field)||{},Z="0 0 0 1000px var(--theme-canvas) inset",ee={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:"auto",border:"none",backgroundColor:"transparent",fontSize:J[u].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:w?"color-gray-400":"color-gray-900",cursor:w?"not-allowed":"text",opacity:w?.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:Z,WebkitBoxShadow:Z,WebkitTextFillColor:"var(--theme-text)",transition:"background-color 5000s ease-in-out 0s"},_webkitContactsAutoFillButton:{visibility:"hidden",pointerEvents:"none",position:"absolute",right:0},...Y},ne=()=>{H(!0),M&&M()},K=()=>z(!0),re=()=>z(!1),ie=ce=>{L&&L(ce),H(!1)},ge=ce=>{typeof ce=="string"?(P(ce),m&&m(ce),l&&l(ce)):(P(ce.target.value),m&&m(ce.target.value),l&&l(ce.target.value))},We=()=>{P(""),m&&m(""),l&&l(""),L({target:{name:o}})},{container:le,content:te,...ae}=p||{};return r.jsx(Ue,{helperText:d,error:x,views:ae,children:r.jsxs(oo,{label:t,size:u,error:x,shape:y,views:p,shadow:f,variant:k,value:a,color:"theme-primary",isHovered:S,isDisabled:w,isReadOnly:v,isFocused:C,showLabel:q,onMouseEnter:K,onMouseLeave:re,children:[c,D&&r.jsx(Ro,{children:D}),r.jsxs(jo,{children:[q&&r.jsx(ho,{htmlFor:X,color:"theme-primary",error:x,...E,...p==null?void 0:p.label,children:t}),r.jsx(i.Input,{ref:O,type:"text",id:X,name:o,readOnly:v,disabled:w,autoFocus:I,...T??j?{required:!0,"aria-required":!0}:{},placeholder:g||n,onFocus:ne,onBlur:ie,autoComplete:"off",...ee,...N,onChange:ge,value:a})]}),b&&a&&!v&&!w&&r.jsx(Ro,{children:r.jsx(He,{size:20,color:$,onClick:We,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)"}})}),W&&r.jsx(Ro,{children:W}),s]})})},je=e=>{const o=pe("input",e),t=Lt(o);return r.jsx(rr,{...t,...o})},La=({defaultIsSelected:e=!1})=>{const[o,t]=h.useState(!1),[n,a]=h.useState(e);return{isHovered:o,setIsHovered:t,isSelected:n,setIsSelected:a}},mg={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"}},_a={xs:10,sm:14,md:16,lg:20,xl:24},pg={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"}},Dr={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"}}},Ba=({id:e,icon:o,name:t,label:n,isChecked:a,onChange:l,onValueChange:c,shadow:s={},labelPosition:d="right",size:g="md",error:m=!1,isSelected:f=!1,isHovered:p=!1,isDisabled:u=!1,isReadOnly:y=!1,isIndeterminate:k=!1,defaultIsSelected:x=!1,setIsSelected:C=()=>{},setIsHovered:S=()=>{},views:w={checkbox:{},label:{}},infoText:v,helperText:b,...I})=>{const T=h.useId(),j=e??T,E=h.useRef(null),[D,W]=h.useState(!1),A=!!(a||f);h.useEffect(()=>{E.current&&(E.current.indeterminate=k)},[k]);const H=()=>S(!p),z=()=>{!y&&!u&&(C&&C(!f),l&&l(!a),c&&c(!a))},P=k?"indeterminate":a||f?"selected":"unselected",V=m?Dr.error[P]:u?Dr.disabled[P]:p?Dr.hover[P]:{},M={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:m?"color-red-600":u?"color-gray-400":"inherit",cursor:u?"not-allowed":y?"default":"pointer",opacity:u?.6:1,transition:"all 0.2s ease-in-out",...w.label},checkbox:{...pg[P],...V,borderRadius:6,...mg[g],transition:"all 0.2s ease-in-out",...s,...w.checkbox}},L=`${j}-info`,_=`${j}-error`,O=[v?L:"",m?_:""].filter(Boolean).join(" ")||void 0;return r.jsxs(i.Vertical,{...M.container,children:[r.jsx(er,{htmlFor:j,onMouseEnter:H,onMouseLeave:H,size:i.Typography.fontSizes[g],cursor:"inherit",children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",d==="left"&&n&&r.jsx(i.Text,{size:g,fontWeight:"500",...w==null?void 0:w.label,children:n}),r.jsxs(i.Center,{position:"relative",...M.checkbox,...D?Dr.focus[P]:{},children:[r.jsx(i.Input,{ref:E,type:"checkbox",id:j,name:t,checked:A,"aria-checked":k?"mixed":void 0,onChange:z,onFocus:()=>W(!0),onBlur:()=>W(!1),disabled:u,readOnly:y,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:u?"not-allowed":y?"default":"pointer","aria-describedby":O,...I}),k?r.jsx(Nn,{widthHeight:_a[g],color:"color-white",transition:"opacity 0.2s ease"}):(a||f)&&(o??r.jsx(Jo,{widthHeight:_a[g],color:"color-white",transition:"opacity 0.2s ease"}))]}),d==="right"&&n&&r.jsx(i.Text,{size:g,fontWeight:"500",...w==null?void 0:w.label,children:n})]})}),v&&r.jsx(i.Text,{id:L,marginLeft:d==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...w==null?void 0:w.infoText,children:v}),m&&r.jsx(i.Text,{id:_,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"all 0.2s ease-in-out",children:m})]})},_t=e=>{const o=pe("checkbox",e),t=La(o);return r.jsx(Ba,{...t,...o})},Oa=({defaultIsSelected:e=!1,isChecked:o})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(o!==void 0?o:e);return h.useEffect(()=>{o!==void 0&&l(o)},[o]),{isHovered:t,setIsHovered:n,isSelected:a,setIsSelected:l}},ug={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"}},yg={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"}},bg={selected:{borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid"},unselected:{borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"}}},xg={selected:{backgroundColor:"theme-primary"},unselected:{style:{backgroundColor:"transparent"}}},Bt={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"}}},Ot={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"}}}},Na=({id:e,icon:o,name:t,label:n,value:a,isChecked:l,onChange:c,onValueChange:s,shadow:d={},labelPosition:g="right",size:m="md",error:f=!1,isSelected:p=!1,isHovered:u=!1,isDisabled:y=!1,isReadOnly:k=!1,defaultIsSelected:x=!1,setIsSelected:C=()=>{},setIsHovered:S=()=>{},views:w={radio:{},label:{}},infoText:v,helperText:b,...I})=>{const T=h.useId(),j=e??T,[E,D]=h.useState(!1),W=()=>S(!u),A=()=>{!k&&!y&&(C&&C(!0),c&&c(a??""),s&&s(a??""))},H=l||p?"selected":"unselected",z=f?Bt.error[H]:y?Bt.disabled[H]:u?Bt.hover[H]:{},P=f?Ot.error[H]:y?Ot.disabled[H]:u?Ot.hover[H]:{},V={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",selected:{borderColor:"theme-primary"},color:f?"color-red-600":y?"color-gray-400":"inherit",cursor:y?"not-allowed":k?"default":"pointer",opacity:y?.6:1,transition:"all 0.2s ease-in-out",...w.label},radio:{...bg[H],...z,borderRadius:"50%",selected:{backgroundColor:"theme-primary"},backgroundColor:"color-white",...ug[m],transition:"all 0.2s ease-in-out",...d,...w.radio},dot:{...xg[H],...P,borderRadius:"50%",...yg[m],transition:"all 0.2s ease-in-out"}},M=`${j}-info`,L=`${j}-error`,_=[v?M:"",f?L:""].filter(Boolean).join(" ")||void 0;return r.jsxs(i.Vertical,{...V.container,children:[r.jsx(er,{htmlFor:j,onMouseEnter:W,onMouseLeave:W,size:i.Typography.fontSizes[m],cursor:"inherit",children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",g==="left"&&n&&r.jsx(i.Text,{size:m,fontWeight:"500",...w==null?void 0:w.label,children:n}),r.jsxs(i.Center,{position:"relative",...V.radio,...E?{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}:{},children:[r.jsx(i.Input,{type:"radio",id:j,name:t,value:a??"",checked:!!(l||p),onChange:A,onFocus:()=>D(!0),onBlur:()=>D(!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":_,...I}),(l||p)&&r.jsx(i.View,{...V.dot})]}),g==="right"&&n&&r.jsx(i.Text,{size:m,fontWeight:"500",...w==null?void 0:w.label,children:n})]})}),v&&r.jsx(i.Text,{id:M,marginLeft:g==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...w==null?void 0:w.infoText,children:v}),f&&r.jsx(i.Text,{id:L,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"color 0.2s ease, opacity 0.2s ease",children:f})]})},Nt=e=>{const o=pe("radio",e),t=Oa(o);return r.jsx(Na,{...t,...o})},kg=({value:e,defaultValue:o="",onChange:t})=>{const[n,a]=h.useState(e!==void 0?e:o);return h.useEffect(()=>{e!==void 0&&a(e)},[e]),{selectedValue:n,setSelectedValue:c=>{e===void 0&&a(c),t&&t(c)}}},Cg=({children:e,name:o,label:t,helperText:n,error:a,selectedValue:l,setSelectedValue:c,direction:s="vertical",spacing:d=8,isDisabled:g=!1,isReadOnly:m=!1,views:f={container:{},label:{},helperText:{}},onChange:p,value:u,defaultValue:y,...k})=>{const x=s==="vertical"?i.Vertical:i.Horizontal,C=h.Children.map(e,I=>{if(h.isValidElement(I)){const T={name:o,isChecked:I.props.value===l,isDisabled:g||I.props.isDisabled,isReadOnly:m||I.props.isReadOnly,onChange:j=>{c(j),I.props.onChange&&I.props.onChange(j)}};return h.cloneElement(I,T)}return I}),S=h.useId(),w=`${S}-label`,v=`${S}-helper`,b=!!(n||a);return r.jsxs(i.Vertical,{gap:d,width:"100%",role:"radiogroup","aria-labelledby":t?w:void 0,"aria-describedby":b?v:void 0,"aria-invalid":a?!0:void 0,...f.container,...k,children:[t&&r.jsx(i.Text,{id:w,fontWeight:"600",fontSize:"14px",color:a?"color-red-600":"inherit",marginBottom:4,...f.label,children:t}),r.jsx(x,{gap:d,children:C}),b&&r.jsx(i.Text,{id:v,fontWeight:a?"500":"400",fontSize:"14px",lineHeight:"20px",color:a?"color-red-500":"color-gray-500",marginTop:4,transition:"color 0.2s ease, opacity 0.2s ease",...f.helperText,children:a||n})]})},wg=e=>{const o=kg(e);return r.jsx(Cg,{...o,...e})},fo=e=>Math.min(255,Math.max(0,Math.round(e))),Sg=e=>{const o=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!o)return null;let t=o[1];return t.length===3&&(t=t.split("").map(n=>n+n).join("")),{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}},vg=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},Tg=(e,o,t)=>{const n=(e%360+360)%360,a=Math.min(100,Math.max(0,o))/100,l=Math.min(100,Math.max(0,t))/100,c=(1-Math.abs(2*l-1))*a,s=c*(1-Math.abs(n/60%2-1)),d=l-c/2;let g;return n<60?g=[c,s,0]:n<120?g=[s,c,0]:n<180?g=[0,c,s]:n<240?g=[0,s,c]:n<300?g=[s,0,c]:g=[c,0,s],{r:fo((g[0]+d)*255),g:fo((g[1]+d)*255),b:fo((g[2]+d)*255)}},Ig=e=>{const o=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?Tg(Number(o[1]),Number(o[2]),Number(o[3])):null},Fg=e=>Sg(e)??vg(e)??Ig(e),zg=({r:e,g:o,b:t})=>{const n=e/255,a=o/255,l=t/255,c=Math.max(n,a,l),s=Math.min(n,a,l),d=c-s,g=(c+s)/2;if(d===0)return{h:0,s:0,l:Math.round(g*100)};const m=d/(1-Math.abs(2*g-1));let f;return c===n?f=(a-l)/d%6:c===a?f=(l-n)/d+2:f=(n-a)/d+4,f=Math.round(f*60),f<0&&(f+=360),{h:f,s:Math.round(m*100),l:Math.round(g*100)}},qt=e=>fo(e).toString(16).padStart(2,"0"),$r=(e,o)=>{if(!o||!e)return e;const t=Fg(e);if(!t)return e;switch(o){case"hex":return`#${qt(t.r)}${qt(t.g)}${qt(t.b)}`;case"rgb":return`rgb(${t.r}, ${t.g}, ${t.b})`;case"hsl":{const{h:n,s:a,l}=zg(t);return`hsl(${n}, ${a}%, ${l}%)`}}},qa=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,onOpen:l,onClose:c,closeOnSelect:s=!0,maxRecentColors:d=8,showRecentColors:g=!0,isAutoFocus:m=!1,colorFormat:f}=e,[p,u]=h.useState(!1),[y,k]=h.useState(o??t),[x,C]=h.useState(""),[S,w]=h.useState([]),[v,b]=h.useState(!1),[I,T]=h.useState(!1),j=h.useRef(null),E=h.useRef(null);h.useEffect(()=>{o!==void 0&&k(o)},[o]),h.useEffect(()=>{if(g&&typeof localStorage<"u")try{const M=localStorage.getItem("colorInput-recentColors");M&&w(JSON.parse(M))}catch(M){console.warn("Failed to load recent colors from localStorage:",M)}},[g]),h.useEffect(()=>{const M=j.current;m&&M&&typeof M.focus=="function"&&M.focus()},[m]),h.useEffect(()=>{if(typeof document>"u")return;const M=L=>{p&&j.current&&E.current&&!j.current.contains(L.target)&&!E.current.contains(L.target)&&P()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[p]);const D=h.useCallback(M=>{g&&w(L=>{const _=L.filter(N=>N!==M),O=[M,..._].slice(0,d);try{typeof localStorage<"u"&&localStorage.setItem("colorInput-recentColors",JSON.stringify(O))}catch(N){console.warn("Failed to save recent colors to localStorage:",N)}return O})},[g,d]),W=h.useCallback(()=>{const M=!p;u(M),M?l==null||l():c==null||c()},[p,l,c]),A=h.useCallback(M=>{k(M),D(M);const L=$r(M,f);n==null||n(L),a==null||a(L),s&&(u(!1),c==null||c())},[n,a,s,c,D,f]),H=h.useCallback(M=>{C(M)},[]),z=h.useCallback(()=>{x&&(A(x),C(""))},[x,A]),P=h.useCallback(()=>{u(!1),c==null||c()},[c]),V=h.useCallback(M=>{k(M),n==null||n($r(M,f))},[n,f]);return{isOpen:p,selectedColor:y,recentColors:S,customColor:x,isFocused:v,isHovered:I,handleToggle:W,handleColorSelect:A,handleCustomColorChange:H,handleCustomColorSubmit:z,handleClose:P,setIsFocused:b,setIsHovered:T,setValue:V,triggerRef:j,dropdownRef:E}},tr={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"}},Mg={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"}},Wg={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"}},jg=[{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"}],Ua=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:l={},size:c="md",shape:s="default",variant:d="default",shadow:g,error:m=!1,isDisabled:f=!1,isReadOnly:p=!1,isFocused:u=!1,isHovered:y=!1,predefinedColors:k=jg,showCustomInput:x=!0,showRecentColors:C=!0,isOpen:S=!1,selectedColor:w="",recentColors:v=[],customColor:b="",handleToggle:I=()=>{},handleColorSelect:T=()=>{},handleCustomColorChange:j=()=>{},handleCustomColorSubmit:E=()=>{},handleClose:D,setIsFocused:W=()=>{},setIsHovered:A=()=>{},setValue:H,triggerRef:z,dropdownRef:P,onChange:V,onChangeComplete:M,onBlur:L,onFocus:_,onOpen:O,onClose:N,colorFormat:U,maxRecentColors:X,closeOnSelect:oe,value:B,defaultValue:$,"aria-label":q,...J})=>{const{getColor:Y}=i.useTheme(),Z=h.useId(),ee=e??Z,ne=`${ee}-label`,K=`${ee}-listbox`,re=`${ee}-helper-text`,ie=`${ee}-error-text`,ge=!!m&&typeof m=="string",We=[a?re:null,ge?ie:null].filter(Boolean).join(" ")||void 0,le={...tr.container,...l==null?void 0:l.container},te={...tr.trigger,...Mg[c],...Wg[s],...Hg[d],...m&&{borderColor:"color-red-500"},...f&&{opacity:.6,cursor:"not-allowed"},...u&&{borderColor:"theme-primary",boxShadow:"0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px rgba(29, 78, 216, 0.16)"},...y&&!f&&{borderColor:"color-gray-400"},...l==null?void 0:l.trigger,...g&&g},ae={...tr.dropdown,...l==null?void 0:l.dropdown},ce={...tr.colorGrid,...l==null?void 0:l.colorGrid},ye={...tr.recentColors,...l==null?void 0:l.recentColors},Q=w||"color-gray-200";return r.jsxs(i.View,{...le,...J,children:[t&&r.jsx(er,{id:ne,htmlFor:ee,size:c,isDisabled:f,error:m,views:l==null?void 0:l.label,children:t}),o&&r.jsx("input",{type:"hidden",name:o,value:$r(w,U)}),r.jsxs(i.View,{ref:z,id:ee,onClick:f||p?void 0:I,onKeyDown:R=>{f||p||(R.key==="Enter"||R.key===" ")&&(R.preventDefault(),I())},onMouseEnter:()=>A(!0),onMouseLeave:()=>A(!1),onFocus:()=>{W(!0),_&&_()},onBlur:R=>{W(!1),L&&L(R)},tabIndex:f?-1:0,role:"button","aria-expanded":S,"aria-haspopup":"listbox","aria-controls":S?K:void 0,"aria-labelledby":!q&&t?ne:void 0,"aria-label":q??(t?void 0:n),"aria-describedby":We,"aria-invalid":m?!0:void 0,width:"fit-content",gap:8,...te,children:[r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:Q,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!p&&!f&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:S?"up":"down"})]}),S&&r.jsxs(i.View,{ref:P,...ae,children:[r.jsx(i.View,{id:K,role:"listbox","aria-labelledby":t?ne:void 0,"aria-label":t?void 0:"Color options",...ce,children:k.map((R,be)=>r.jsx(i.View,{role:"option","aria-selected":w===R.value,"aria-label":R.name,tabIndex:0,width:"24px",height:"24px",borderRadius:"8px",backgroundColor:R.value,borderWidth:"2px",borderStyle:"solid",borderColor:w===R.value?"theme-primary":"transparent",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(R.value),onKeyDown:Ie=>{(Ie.key==="Enter"||Ie.key===" ")&&(Ie.preventDefault(),T(R.value))},title:R.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"},...l==null?void 0:l.colorSwatch},be))}),C&&v.length>0&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Recent Colors"}),r.jsx(i.Horizontal,{gap:4,flexWrap:"wrap",...ye,children:v.map((R,be)=>r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"8px",backgroundColor:R,borderWidth:"1px",borderStyle:"solid",borderColor:w===R?"theme-primary":"color-gray-300",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(R),title:R,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"}},be))})]}),x&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Custom Color"}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(je,{value:b,onChange:j,placeholder:"#000000 or rgb(0,0,0)","aria-label":"Custom color",size:"sm",style:{flex:1},views:l==null?void 0:l.customInput}),r.jsx(i.Element,{as:"button",type:"button",padding:"8px 12px",backgroundColor:"theme-primary",border:"none",borderRadius:"8px",cursor:"pointer",onClick:E,transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"color-blue-700"},children:r.jsx(i.Text,{color:"color-white",fontSize:"12px",fontWeight:"500",children:"Add"})})]})]})]}),a&&r.jsx(i.Text,{id:re,fontSize:"12px",color:m?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:a}),ge&&r.jsx(i.Text,{id:ie,fontSize:"12px",color:"color-red-500",marginTop:"4px",...l==null?void 0:l.error,children:m})]})},Pg=e=>{const o=qa(e);return r.jsx(Ua,{...o,...e})},Ut=[{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"}],Ga=({placeholder:e})=>{const[o,t]=h.useState(Ut),[n,a]=h.useState(e??Ut[0].name),[l,c]=h.useState(!0),[s,d]=h.useState(!1),[g,m]=h.useState(!1);return{hide:l,setHide:c,newOptions:o,setNewOptions:t,isHovered:g,setIsHovered:m,isFocused:s,setIsFocused:d,value:n,setValue:a}},Ya={xs:8,sm:10,md:12,lg:14,xl:16},Vg=({size:e,...o})=>r.jsx(i.Element,{as:"ul",...o}),Ag=e=>r.jsx(i.Input,{type:"text",...e}),Eg=({size:e,...o})=>r.jsx(i.Element,{as:"li",...o}),Dg=({id:e,option:o,size:t="md",isSelected:n=!1,isHighlighted:a=!1,callback:l=()=>{},views:c={text:{}}})=>{const s=d=>{d&&d.stopPropagation&&d.stopPropagation(),l(o??"")};return r.jsx(Eg,{id:e,margin:0,role:"option","aria-selected":n,listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:s,fontSize:i.Typography.fontSizes[t],backgroundColor:a?"color-gray-100":void 0,_hover:{backgroundColor:"color-gray-100",transition:"all 0.15s ease-in-out"},...c.text,children:o})},$g=({id:e,size:o,views:t={dropDown:{}},options:n=[],selectedOption:a,highlightedIndex:l=-1,callback:c=()=>{}})=>{const s=d=>c(d);return r.jsx(Vg,{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)",...t.dropDown,children:n.map((d,g)=>r.jsx(Dg,{id:e?`${e}-option-${g}`:void 0,size:o,option:d.name,isSelected:d.name===a,isHighlighted:g===l,callback:s,...t.text},d.code))})},Ka=({id:e,name:o,label:t,value:n,placeholder:a,helperText:l,hide:c=!1,error:s=!1,isHovered:d=!1,isFocused:g=!1,isAutoFocus:m=!1,isDisabled:f=!1,isReadOnly:p=!1,shadow:u={},newOptions:y=[],size:k="md",variant:x="default",shape:C="default",onChange:S,onBlur:w=()=>{},setHide:v=()=>{},setNewOptions:b=()=>{},setIsHovered:I=()=>{},setIsFocused:T=()=>{},setValue:j=()=>{},selected:E,views:D={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:W,...A})=>{const{getColor:H,themeMode:z}=i.useTheme(),P=h.useId(),V=e??P,M=`${V}-listbox`,[L,_]=h.useState(-1),O=H("color-gray-500",{themeMode:W||z}),N=()=>T(!0),U=Y=>{v(!c),_(-1),j(Y),S&&S(Y)},X=()=>{!f&&!p&&v(!c)},oe=Y=>{const Z=Y.target.value,ee=Ut.filter(ne=>ne.name.toLowerCase().startsWith(Z.toLowerCase()));c&&v(!1),b(ee),_(ee.length>0?0:-1),S&&S(Z)},B=Y=>{f||p||(Y.key==="ArrowDown"?(Y.preventDefault(),c?(v(!1),_(y.length>0?0:-1)):_(Math.min(L+1,y.length-1))):Y.key==="ArrowUp"?c||(Y.preventDefault(),_(Math.max(L-1,0))):Y.key==="Enter"?!c&&L>=0&&y[L]&&(Y.preventDefault(),U(y[L].name)):Y.key==="Escape"&&(c||(v(!0),_(-1))))},$=Y=>{w(Y),T(!1)},q=!!t,J={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none"}},transition:"all 0.2s ease-in-out",fontSize:i.Typography.fontSizes[k],backgroundColor:"transparent",color:f?"color-gray-400":"color-gray-900",cursor:f?"not-allowed":p?"auto":"pointer",...D.field};return r.jsxs(Ue,{helperText:l,error:s,views:D,onClick:X,children:[r.jsxs(oo,{label:t,size:k,error:s,shape:C,views:D,shadow:u,variant:x,value:n,color:"theme-primary",isDisabled:f,isReadOnly:p,isFocused:g,showLabel:q,_hover:!f&&!s?{borderColor:"theme-primary"}:void 0,children:[r.jsxs(jo,{children:[q&&r.jsx(ho,{htmlFor:V,color:"theme-primary",error:s,views:D,children:t}),r.jsx(Ag,{id:V,name:o,placeholder:a,readOnly:p,disabled:f,autoFocus:m,role:"combobox","aria-expanded":!c,"aria-controls":c?void 0:M,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":!c&&L>=0?`${M}-option-${L}`:void 0,onBlur:$,onFocus:N,onKeyDown:B,...J,...A,value:n,onChange:oe})]}),r.jsx(Ro,{children:c?r.jsx(he,{orientation:"down",widthHeight:Ya[k],color:O,style:D.icon}):r.jsx(he,{orientation:"up",widthHeight:Ya[k],color:O,style:D.icon})})]}),!c&&r.jsx($g,{id:M,size:k,views:D,options:y,selectedOption:n,highlightedIndex:L,callback:U})]})},Lg=e=>{const o=Ga(e);return r.jsx(Ka,{...o,...e})};function Lr(e){"@babel/helpers - typeof";return Lr=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},Lr(e)}function ze(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function _g(e){return ze(1,arguments),e instanceof Date||Lr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ne(e){ze(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||Lr(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 Bg(e){if(ze(1,arguments),!_g(e)&&typeof e!="number")return!1;var o=Ne(e);return!isNaN(Number(o))}function mo(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 Og(e,o){ze(2,arguments);var t=Ne(e).getTime(),n=mo(o);return new Date(t+n)}function Ng(e,o){ze(2,arguments);var t=mo(o);return Og(e,-t)}var qg=864e5;function Ug(e){ze(1,arguments);var o=Ne(e),t=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var n=o.getTime(),a=t-n;return Math.floor(a/qg)+1}function _r(e){ze(1,arguments);var o=1,t=Ne(e),n=t.getUTCDay(),a=(n<o?7:0)+n-o;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function Xa(e){ze(1,arguments);var o=Ne(e),t=o.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(t+1,0,4),n.setUTCHours(0,0,0,0);var a=_r(n),l=new Date(0);l.setUTCFullYear(t,0,4),l.setUTCHours(0,0,0,0);var c=_r(l);return o.getTime()>=a.getTime()?t+1:o.getTime()>=c.getTime()?t:t-1}function Gg(e){ze(1,arguments);var o=Xa(e),t=new Date(0);t.setUTCFullYear(o,0,4),t.setUTCHours(0,0,0,0);var n=_r(t);return n}var Yg=6048e5;function Kg(e){ze(1,arguments);var o=Ne(e),t=_r(o).getTime()-Gg(o).getTime();return Math.round(t/Yg)+1}var Xg={};function Br(){return Xg}function Or(e,o){var t,n,a,l,c,s,d,g;ze(1,arguments);var m=Br(),f=mo((t=(n=(a=(l=o==null?void 0:o.weekStartsOn)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(s=c.options)===null||s===void 0?void 0:s.weekStartsOn)!==null&&a!==void 0?a:m.weekStartsOn)!==null&&n!==void 0?n:(d=m.locale)===null||d===void 0||(g=d.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&t!==void 0?t:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var p=Ne(e),u=p.getUTCDay(),y=(u<f?7:0)+u-f;return p.setUTCDate(p.getUTCDate()-y),p.setUTCHours(0,0,0,0),p}function Ja(e,o){var t,n,a,l,c,s,d,g;ze(1,arguments);var m=Ne(e),f=m.getUTCFullYear(),p=Br(),u=mo((t=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(s=c.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:p.firstWeekContainsDate)!==null&&n!==void 0?n:(d=p.locale)===null||d===void 0||(g=d.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(u>=1&&u<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(f+1,0,u),y.setUTCHours(0,0,0,0);var k=Or(y,o),x=new Date(0);x.setUTCFullYear(f,0,u),x.setUTCHours(0,0,0,0);var C=Or(x,o);return m.getTime()>=k.getTime()?f+1:m.getTime()>=C.getTime()?f:f-1}function Jg(e,o){var t,n,a,l,c,s,d,g;ze(1,arguments);var m=Br(),f=mo((t=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(s=c.options)===null||s===void 0?void 0:s.firstWeekContainsDate)!==null&&a!==void 0?a:m.firstWeekContainsDate)!==null&&n!==void 0?n:(d=m.locale)===null||d===void 0||(g=d.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&t!==void 0?t:1),p=Ja(e,o),u=new Date(0);u.setUTCFullYear(p,0,f),u.setUTCHours(0,0,0,0);var y=Or(u,o);return y}var Qg=6048e5;function Zg(e,o){ze(1,arguments);var t=Ne(e),n=Or(t,o).getTime()-Jg(t,o).getTime();return Math.round(n/Qg)+1}function se(e,o){for(var t=e<0?"-":"",n=Math.abs(e).toString();n.length<o;)n="0"+n;return t+n}var ro={y:function(o,t){var n=o.getUTCFullYear(),a=n>0?n:1-n;return se(t==="yy"?a%100:a,t.length)},M:function(o,t){var n=o.getUTCMonth();return t==="M"?String(n+1):se(n+1,2)},d:function(o,t){return se(o.getUTCDate(),t.length)},a:function(o,t){var n=o.getUTCHours()/12>=1?"pm":"am";switch(t){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,t){return se(o.getUTCHours()%12||12,t.length)},H:function(o,t){return se(o.getUTCHours(),t.length)},m:function(o,t){return se(o.getUTCMinutes(),t.length)},s:function(o,t){return se(o.getUTCSeconds(),t.length)},S:function(o,t){var n=t.length,a=o.getUTCMilliseconds(),l=Math.floor(a*Math.pow(10,n-3));return se(l,t.length)}},Po={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Rg={G:function(o,t,n){var a=o.getUTCFullYear()>0?1:0;switch(t){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,t,n){if(t==="yo"){var a=o.getUTCFullYear(),l=a>0?a:1-a;return n.ordinalNumber(l,{unit:"year"})}return ro.y(o,t)},Y:function(o,t,n,a){var l=Ja(o,a),c=l>0?l:1-l;if(t==="YY"){var s=c%100;return se(s,2)}return t==="Yo"?n.ordinalNumber(c,{unit:"year"}):se(c,t.length)},R:function(o,t){var n=Xa(o);return se(n,t.length)},u:function(o,t){var n=o.getUTCFullYear();return se(n,t.length)},Q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return se(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,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return se(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,t,n){var a=o.getUTCMonth();switch(t){case"M":case"MM":return ro.M(o,t);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,t,n){var a=o.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return se(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,t,n,a){var l=Zg(o,a);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):se(l,t.length)},I:function(o,t,n){var a=Kg(o);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):se(a,t.length)},d:function(o,t,n){return t==="do"?n.ordinalNumber(o.getUTCDate(),{unit:"date"}):ro.d(o,t)},D:function(o,t,n){var a=Ug(o);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):se(a,t.length)},E:function(o,t,n){var a=o.getUTCDay();switch(t){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,t,n,a){var l=o.getUTCDay(),c=(l-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return se(c,2);case"eo":return n.ordinalNumber(c,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(o,t,n,a){var l=o.getUTCDay(),c=(l-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return se(c,t.length);case"co":return n.ordinalNumber(c,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(o,t,n){var a=o.getUTCDay(),l=a===0?7:a;switch(t){case"i":return String(l);case"ii":return se(l,t.length);case"io":return n.ordinalNumber(l,{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,t,n){var a=o.getUTCHours(),l=a/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(o,t,n){var a=o.getUTCHours(),l;switch(a===12?l=Po.noon:a===0?l=Po.midnight:l=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(o,t,n){var a=o.getUTCHours(),l;switch(a>=17?l=Po.evening:a>=12?l=Po.afternoon:a>=4?l=Po.morning:l=Po.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(o,t,n){if(t==="ho"){var a=o.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return ro.h(o,t)},H:function(o,t,n){return t==="Ho"?n.ordinalNumber(o.getUTCHours(),{unit:"hour"}):ro.H(o,t)},K:function(o,t,n){var a=o.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):se(a,t.length)},k:function(o,t,n){var a=o.getUTCHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):se(a,t.length)},m:function(o,t,n){return t==="mo"?n.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):ro.m(o,t)},s:function(o,t,n){return t==="so"?n.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):ro.s(o,t)},S:function(o,t){return ro.S(o,t)},X:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();if(c===0)return"Z";switch(t){case"X":return Za(c);case"XXXX":case"XX":return po(c);case"XXXXX":case"XXX":default:return po(c,":")}},x:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"x":return Za(c);case"xxxx":case"xx":return po(c);case"xxxxx":case"xxx":default:return po(c,":")}},O:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Qa(c,":");case"OOOO":default:return"GMT"+po(c,":")}},z:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Qa(c,":");case"zzzz":default:return"GMT"+po(c,":")}},t:function(o,t,n,a){var l=a._originalDate||o,c=Math.floor(l.getTime()/1e3);return se(c,t.length)},T:function(o,t,n,a){var l=a._originalDate||o,c=l.getTime();return se(c,t.length)}};function Qa(e,o){var t=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),l=n%60;if(l===0)return t+String(a);var c=o;return t+String(a)+c+se(l,2)}function Za(e,o){if(e%60===0){var t=e>0?"-":"+";return t+se(Math.abs(e)/60,2)}return po(e,o)}function po(e,o){var t=o||"",n=e>0?"-":"+",a=Math.abs(e),l=se(Math.floor(a/60),2),c=se(a%60,2);return n+l+t+c}var Ra=function(o,t){switch(o){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},el=function(o,t){switch(o){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},eh=function(o,t){var n=o.match(/(P+)(p+)?/)||[],a=n[1],l=n[2];if(!l)return Ra(o,t);var c;switch(a){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;case"PPPP":default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",Ra(a,t)).replace("{{time}}",el(l,t))},oh={p:el,P:eh};function rh(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 th=["D","DD"],nh=["YY","YYYY"];function ah(e){return th.indexOf(e)!==-1}function lh(e){return nh.indexOf(e)!==-1}function ol(e,o,t){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; 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(t,"`; 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(t,"`; 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(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var ih={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"}},ch=function(o,t,n){var a,l=ih[o];return typeof l=="string"?a=l:t===1?a=l.one:a=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function Gt(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=o.width?String(o.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var sh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},dh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},gh={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},hh={date:Gt({formats:sh,defaultWidth:"full"}),time:Gt({formats:dh,defaultWidth:"full"}),dateTime:Gt({formats:gh,defaultWidth:"full"})},fh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mh=function(o,t,n,a){return fh[o]};function nr(e){return function(o,t){var n=t!=null&&t.context?String(t.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var l=e.defaultFormattingWidth||e.defaultWidth,c=t!=null&&t.width?String(t.width):l;a=e.formattingValues[c]||e.formattingValues[l]}else{var s=e.defaultWidth,d=t!=null&&t.width?String(t.width):e.defaultWidth;a=e.values[d]||e.values[s]}var g=e.argumentCallback?e.argumentCallback(o):o;return a[g]}}var ph={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},uh={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},yh={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"]},bh={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"]},xh={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"}},kh={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"}},Ch=function(o,t){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"},wh={ordinalNumber:Ch,era:nr({values:ph,defaultWidth:"wide"}),quarter:nr({values:uh,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:nr({values:yh,defaultWidth:"wide"}),day:nr({values:bh,defaultWidth:"wide"}),dayPeriod:nr({values:xh,defaultWidth:"wide",formattingValues:kh,defaultFormattingWidth:"wide"})};function ar(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],l=o.match(a);if(!l)return null;var c=l[0],s=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],d=Array.isArray(s)?vh(s,function(f){return f.test(c)}):Sh(s,function(f){return f.test(c)}),g;g=e.valueCallback?e.valueCallback(d):d,g=t.valueCallback?t.valueCallback(g):g;var m=o.slice(c.length);return{value:g,rest:m}}}function Sh(e,o){for(var t in e)if(e.hasOwnProperty(t)&&o(e[t]))return t}function vh(e,o){for(var t=0;t<e.length;t++)if(o(e[t]))return t}function Th(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.match(e.matchPattern);if(!n)return null;var a=n[0],l=o.match(e.parsePattern);if(!l)return null;var c=e.valueCallback?e.valueCallback(l[0]):l[0];c=t.valueCallback?t.valueCallback(c):c;var s=o.slice(a.length);return{value:c,rest:s}}}var Ih=/^(\d+)(th|st|nd|rd)?/i,Fh=/\d+/i,zh={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},Mh={any:[/^b/i,/^(a|c)/i]},Wh={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Hh={any:[/1/i,/2/i,/3/i,/4/i]},jh={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},Ph={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]},Vh={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},Ah={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]},Eh={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},Dh={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}},$h={ordinalNumber:Th({matchPattern:Ih,parsePattern:Fh,valueCallback:function(o){return parseInt(o,10)}}),era:ar({matchPatterns:zh,defaultMatchWidth:"wide",parsePatterns:Mh,defaultParseWidth:"any"}),quarter:ar({matchPatterns:Wh,defaultMatchWidth:"wide",parsePatterns:Hh,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:ar({matchPatterns:jh,defaultMatchWidth:"wide",parsePatterns:Ph,defaultParseWidth:"any"}),day:ar({matchPatterns:Vh,defaultMatchWidth:"wide",parsePatterns:Ah,defaultParseWidth:"any"}),dayPeriod:ar({matchPatterns:Eh,defaultMatchWidth:"any",parsePatterns:Dh,defaultParseWidth:"any"})},Lh={code:"en-US",formatDistance:ch,formatLong:hh,formatRelative:mh,localize:wh,match:$h,options:{weekStartsOn:0,firstWeekContainsDate:1}},_h=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bh=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Oh=/^'([^]*?)'?$/,Nh=/''/g,qh=/[a-zA-Z]/;function Uh(e,o,t){var n,a,l,c,s,d,g,m,f,p,u,y,k,x;ze(2,arguments);var C=String(o),S=Br(),w=(n=(a=void 0)!==null&&a!==void 0?a:S.locale)!==null&&n!==void 0?n:Lh,v=mo((l=(c=(s=(d=void 0)!==null&&d!==void 0?d:void 0)!==null&&s!==void 0?s:S.firstWeekContainsDate)!==null&&c!==void 0?c:(g=S.locale)===null||g===void 0||(m=g.options)===null||m===void 0?void 0:m.firstWeekContainsDate)!==null&&l!==void 0?l:1);if(!(v>=1&&v<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var b=mo((f=(p=(u=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&u!==void 0?u:S.weekStartsOn)!==null&&p!==void 0?p:(k=S.locale)===null||k===void 0||(x=k.options)===null||x===void 0?void 0:x.weekStartsOn)!==null&&f!==void 0?f:0);if(!(b>=0&&b<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!w.localize)throw new RangeError("locale must contain localize property");if(!w.formatLong)throw new RangeError("locale must contain formatLong property");var I=Ne(e);if(!Bg(I))throw new RangeError("Invalid time value");var T=rh(I),j=Ng(I,T),E={firstWeekContainsDate:v,weekStartsOn:b,locale:w,_originalDate:I},D=C.match(Bh).map(function(W){var A=W[0];if(A==="p"||A==="P"){var H=oh[A];return H(W,w.formatLong)}return W}).join("").match(_h).map(function(W){if(W==="''")return"'";var A=W[0];if(A==="'")return Gh(W);var H=Rg[A];if(H)return lh(W)&&ol(W,o,String(e)),ah(W)&&ol(W,o,String(e)),H(j,W,w.localize,E);if(A.match(qh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+A+"`");return W}).join("");return D}function Gh(e){var o=e.match(Oh);return o?o[1].replace(Nh,"'"):e}const Yt=e=>typeof e=="string"?e:void 0,rl=({value:e,defaultValue:o}={})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(!1),[c,s]=h.useState(()=>Yt(e)??Yt(o)??Uh(new Date,"yyyy-MM-dd")),d=Yt(e);return h.useEffect(()=>{d!==void 0&&s(d)},[d]),{date:c,setDate:s,isHovered:t,setIsHovered:n,isFocused:a,setIsFocused:l}},Yh=e=>r.jsx(i.Input,{type:"date",...e}),tl=({id:e,name:o,label:t,date:n,children:a,helperText:l,shadow:c={},size:s="md",variant:d="default",shape:g="default",views:m={container:{},label:{},helperText:{},text:{},field:{}},error:f=!1,isHovered:p=!1,isFocused:u=!1,isDisabled:y=!1,isReadOnly:k=!1,setDate:x=()=>{},setIsFocused:C=()=>{},setIsHovered:S=()=>{},onChange:w,onChangeText:v,value:b,defaultValue:I,...T})=>{const{themeMode:j}=i.useTheme(),E=h.useId(),D=e??E,W=!!t,A=()=>S(!p),H=()=>C(!0),z=V=>{typeof V=="string"?(x(V),v&&v(V)):(x(V.target.value),w&&w(V.target.value))},P={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:i.Typography.fontSizes[s],backgroundColor:"transparent",color:y?"color-gray-400":"color-gray-900",cursor:y?"not-allowed":k?"auto":"pointer",...m.field};return r.jsx(Ue,{helperText:l,error:f,views:m,children:r.jsx(oo,{label:t,size:s,error:f,shape:g,views:m,shadow:c,color:"theme-primary",variant:d,value:n,isHovered:p,isDisabled:y,isReadOnly:k,isFocused:u,showLabel:W,onMouseEnter:A,onMouseLeave:A,children:r.jsxs(jo,{children:[W&&r.jsx(ho,{htmlFor:D,color:"theme-primary",error:f,views:m,children:t}),r.jsx(Yh,{id:D,name:o,role:"textbox","aria-label":!W&&typeof t=="string"?t:void 0,onFocus:H,disabled:y,readOnly:k,...P,...T,...v&&{onChangeText:z},onChange:z,value:n})]})})})},Kh=e=>{const o=rl(e);return r.jsx(tl,{...o,...e})},nl=e=>{const o=Lt(e),[t,n]=h.useState(!1);return{isVisible:t,setIsVisible:n,...e,...o}},al={xs:14,sm:16,md:16,lg:18,xl:20},Xh=({visibleIcon:e,hiddenIcon:o,...t})=>{const{isVisible:n,setIsVisible:a,...l}=nl(t),c=al[t.size??"md"]??al.md,s=c-2;return r.jsx(rr,{...l,type:n?"text":"password",isClearable:!1,right:r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",width:`${c}px`,height:`${c}px`,minWidth:`${c}px`,color:"color-gray-500",cursor:t.isDisabled?"not-allowed":"pointer",transition:"color 0.2s ease",onClick:()=>{t.isDisabled||a(!n)},children:n?e??r.jsx(kt,{widthHeight:s}):o??r.jsx(xt,{widthHeight:s})})})},ll=(e,o,t)=>{const[n,a]=h.useState(e),[l,c]=h.useState(o?{value:o,label:o}:e[0]),[s,d]=h.useState([]),[g,m]=h.useState(0),[f,p]=h.useState(t??""),[u,y]=h.useState(!1);return{filteredItems:n,setFilteredItems:a,selectedItem:l,setSelectedItem:c,selectedItems:s,setSelectedItems:d,highlightedIndex:g,setHighlightedIndex:m,searchQuery:f,setSearchQuery:p,isDropdownVisible:u,setIsDropdownVisible:y}},Jh={xs:12,sm:14,md:16,lg:20,xl:24},Qh={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)"},il={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},Zh={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:10,borderTopRightRadius:10},Rh={padding:"8px 10px",cursor:"pointer",borderRadius:8,margin:"1px 4px",transition:"all 0.15s ease-in-out"},ef={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},cl={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},of={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"},sl=({placeholder:e,items:o,showTick:t=!0,onSelect:n,searchEnabled:a=!0,left:l,right:c,label:s,filteredItems:d,setSelectedItem:g,selectedItem:m,selectedItems:f,setSelectedItems:p,highlightedIndex:u,setHighlightedIndex:y,searchQuery:k,setSearchQuery:x,setFilteredItems:C,views:S,isDropdownVisible:w,setIsDropdownVisible:v,isMulti:b=!1,searchPlaceholder:I,size:T="md",...j})=>{const E=h.useId(),D=j.id??E,W=`${D}-dropdown`,A=`${D}-label`,{ref:H,relation:z}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),P=h.useRef(null),[V,M]=h.useState(!1),[L,_]=h.useState(!1),O=()=>{var Y;const B=L?il.enter:il.initial;if(!H.current)return{};const $=H.current.getBoundingClientRect(),q={position:"fixed",left:$.left,width:$.width,zIndex:1e4,...B};return((Y=z==null?void 0:z.space)==null?void 0:Y.vertical)==="top"?{...q,bottom:window.innerHeight-$.top+6}:{...q,top:$.bottom+6}};h.useEffect(()=>{if(w){const B=setTimeout(()=>_(!0),10);return()=>clearTimeout(B)}_(!1)},[w]),h.useEffect(()=>{const B=$=>{!$.composedPath().some(Y=>(Y==null?void 0:Y.id)===W)&&H.current&&!H.current.contains($.target)&&v(!1)};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]);const N=B=>{if(x(B),B==="")C(o);else{const $=o.filter(q=>q.label.toLowerCase().includes(B.toLowerCase()));C($)}y(0)},U=B=>{if(b){const $=f.some(J=>J.value===B.value);let q;$?q=f.filter(J=>J.value!==B.value):q=[...f,B],p(q),n==null||n(q)}else g(B),n==null||n(B),v(!1)},X=(B,$)=>{B.stopPropagation();const q=f.filter(J=>J.value!==$.value);p(q),n==null||n(q)},oe=B=>b?f.some($=>$.value===B.value):B.value===m.value;return r.jsxs(i.Horizontal,{flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...j,children:[s&&r.jsx(i.Text,{id:A,views:S==null?void 0:S.label,children:s}),r.jsxs(i.View,{position:"relative",width:"100%",children:[r.jsx("div",{ref:H,role:"combobox",tabIndex:0,"aria-expanded":w,"aria-haspopup":"listbox","aria-controls":w?W:void 0,"aria-labelledby":s?A:void 0,onClick:()=>v(!w),onKeyDown:B=>{B.key==="Enter"||B.key===" "||B.key==="ArrowDown"?(B.preventDefault(),v(!0)):B.key==="Escape"&&v(!1)},style:{width:"100%"},children:r.jsxs(oo,{size:T,isHovered:V,isFocused:w,onMouseEnter:()=>M(!0),onMouseLeave:()=>M(!1),cursor:"pointer",views:{container:S==null?void 0:S.container},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",flex:1,minWidth:0,flexWrap:b?"wrap":"nowrap",...S==null?void 0:S.labelContainer,children:[l,b?f.length>0?r.jsx(i.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:f.map(B=>r.jsxs(i.Horizontal,{...of,_hover:{backgroundColor:"color-gray-200"},children:[B.icon&&r.jsx(i.View,{flexShrink:0,children:B.icon}),r.jsx(i.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:B.label}),r.jsx(He,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:$=>X($,B)})]},B.value))}):r.jsx(i.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...S==null?void 0:S.label,children:e}):r.jsxs(r.Fragment,{children:[m.icon&&m.label!==e&&r.jsx(i.View,{children:m.icon}),r.jsx(i.Text,{weight:"medium",flexGrow:1,color:m.label===e?"color-gray-500":"color-gray-800",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...S==null?void 0:S.label,children:m.label})]})]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",flexShrink:0,children:[c,r.jsx(i.View,{style:w?cl.open:cl.closed,children:r.jsx(he,{widthHeight:Jh[T],orientation:"down",color:w?"color-gray-700":"color-gray-400"})})]})]})}),w&&r.jsx(ft,{children:r.jsxs(i.View,{ref:P,id:W,role:"listbox","aria-labelledby":s?A:void 0,...Qh,style:O(),...S==null?void 0:S.dropdown,children:[a&&r.jsx(i.View,{...Zh,children:r.jsx(rr,{id:`${D}-search`,name:`${j.name??D}-search`,width:"100%",type:"search",autoFocus:!0,value:k,onChange:B=>N(B),hint:I||e||"Search...","aria-label":I||"Search",isClearable:!1,left:r.jsx(Sr,{widthHeight:14,color:"color-gray-400"}),views:{container:{width:"100%",padding:"0",backgroundColor:"transparent",borderColor:"color-gray-200",...S==null?void 0:S.text},field:{fontSize:"13px"}}})}),d.length>0&&r.jsx(i.View,{margin:0,padding:"4px",children:d.map((B,$)=>{const q=oe(B),J=$===u;return r.jsxs(i.Horizontal,{role:"option","aria-selected":q,justifyContent:"space-between",alignItems:"center",...Rh,backgroundColor:q&&J?"color-blue-100":q?"color-blue-50":J?"color-gray-100":"transparent",onMouseEnter:()=>y($),onClick:()=>U(B),...S==null?void 0:S.item,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[B.icon&&r.jsx(i.View,{flexShrink:0,children:B.icon}),r.jsx(i.Text,{size:"sm",color:q?"theme-primary":"color-gray-800",weight:q?"medium":"normal",children:B.label})]}),q&&t&&r.jsx(Jo,{widthHeight:16,color:"theme-primary"})]},B.value)})}),d.length===0&&r.jsxs(i.Vertical,{...ef,children:[r.jsx(Sr,{widthHeight:24,color:"color-gray-300"}),r.jsx(i.Text,{color:"color-gray-500",size:"sm",align:"center",children:"No results found"}),r.jsx(i.Text,{color:"color-gray-400",size:"xs",align:"center",children:"Try a different search term"})]})]})})]})]})},rf=({id:e,name:o,items:t,placeholder:n,searchPlaceholder:a,...l})=>{const c=ll(t,n,a);return r.jsx(sl,{id:e,name:o,items:t,searchPlaceholder:a,...c,...l})},dl=e=>{const{tags:o,defaultTags:t=[],onTagsChange:n,onTagAdd:a,onTagRemove:l,maxTags:c,minTagLength:s=1,maxTagLength:d=50,allowDuplicates:g=!1,separators:m=["enter","comma"],isDisabled:f=!1,isReadOnly:p=!1}=e,[u,y]=h.useState(""),[k,x]=h.useState(()=>(o||t||[]).map((z,P)=>({id:`tag-${P}-${Date.now()}`,value:z}))),[C,S]=h.useState(!1),[w,v]=h.useState(!1),b=o&&Array.isArray(o)?o.map((H,z)=>({id:`tag-${z}-${Date.now()}`,value:H})):k;h.useEffect(()=>{o&&Array.isArray(o)&&x(o.map((H,z)=>({id:`tag-${z}-${Date.now()}`,value:H})))},[o]);const I=h.useCallback(H=>{const z=H.trim();return!(z.length<s||z.length>d||!g&&b.map(V=>V.value.toLowerCase()).includes(z.toLowerCase())||c&&b.length>=c)},[b,s,d,g,c]),T=h.useCallback(H=>{if(f||p)return;const z=H.trim();if(!z||!I(z))return;const P={id:`tag-${Date.now()}-${Math.random()}`,value:z},V=[...b,P],M=V.map(L=>L.value);o||x(V),n==null||n(M),a==null||a(z),y("")},[b,I,n,a,f,p,o]),j=h.useCallback(H=>{if(f||p)return;const z=b[H];if(!z)return;const P=b.filter((M,L)=>L!==H),V=P.map(M=>M.value);o||x(P),n==null||n(V),l==null||l(z.value,H)},[b,n,l,f,p,o]),E=h.useCallback(H=>{if(f||p)return;const z=H.target.value;if(m.includes("comma")&&z.includes(",")){const P=z.split(","),V=P[0],M=P.slice(1).join(",");V.trim()&&T(V),y(M);return}y(z)},[T,m,f,p]),D=h.useCallback(H=>{if(f||p)return;const{key:z}=H;if(m.includes("enter")&&z==="Enter"){H.preventDefault(),u.trim()&&T(u);return}if(m.includes("tab")&&z==="Tab"&&u.trim()){H.preventDefault(),T(u);return}if(m.includes("space")&&z===" "&&u.trim()){H.preventDefault(),T(u);return}if(z==="Backspace"&&!u&&b.length>0){H.preventDefault(),j(b.length-1);return}},[T,j,u,b,m,f,p]),W=h.useCallback(()=>{var H;S(!0),(H=e.onFocus)==null||H.call(e)},[e.onFocus]),A=h.useCallback(()=>{var H;S(!1),u.trim()&&T(u),(H=e.onBlur)==null||H.call(e)},[T,u,e.onBlur]);return{inputValue:u,setInputValue:y,tags:b,setTags:x,isFocused:C,setIsFocused:S,isHovered:w,setIsHovered:v,addTag:T,removeTag:j,handleInputChange:E,handleKeyDown:D,handleFocus:W,handleBlur:A,validateTag:I}},tf=({tag:e,onRemove:o,isRemovable:t,size:n,views:a,isDisabled:l,isReadOnly:c})=>{const[s,d]=h.useState(!1),g={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 r.jsxs(i.Horizontal,{alignItems:"center",gap:6,padding:g.padding,backgroundColor:"theme-primary-100",borderRadius:"9999px",borderWidth:"1px",borderStyle:"solid",borderColor:"theme-primary-250",transition:"all 0.15s ease-in-out",opacity:l?.6:1,maxWidth:"100%",minWidth:0,_hover:!l&&!c?{backgroundColor:"theme-primary-180",borderColor:"theme-primary-400"}:{},...a==null?void 0:a.tag,children:[r.jsx(i.Text,{fontSize:g.fontSize,color:l?"color-gray-400":"theme-primary",maxLines:1,minWidth:0,...a==null?void 0:a.tagText,children:e}),t&&!l&&!c&&r.jsx(i.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.15s ease-in-out",backgroundColor:s?"color-red-100":"transparent",opacity:s?1:.7,onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),onClick:m=>{m.stopPropagation(),o()},_hover:{backgroundColor:"color-red-100"},...a==null?void 0:a.tagRemove,children:r.jsx(He,{widthHeight:g.iconSize,color:s?"color-red-500":"color-gray-400"})})]})},gl=({id:e,name:o,label:t,placeholder:n="Type and press Enter to add tags...",helperText:a,error:l=!1,inputValue:c="",tags:s=[],left:d,right:g,shadow:m={},views:f={},size:p="md",shape:u="default",variant:y="default",isDisabled:k=!1,isReadOnly:x=!1,isAutoFocus:C=!1,isRemovable:S=!0,isFocused:w=!1,isHovered:v=!1,maxTags:b,handleInputChange:I,handleKeyDown:T,handleFocus:j,handleBlur:E,removeTag:D,setIsHovered:W,onClick:A,setInputValue:H,setIsFocused:z,addTag:P,defaultTags:V,onTagsChange:M,onTagAdd:L,onTagRemove:_,minTagLength:O,maxTagLength:N,allowDuplicates:U,separators:X,menuItems:oe,onMenuItemSelect:B,onFocus:$,onBlur:q,validateTag:J,...Y})=>{const{getColor:Z,themeMode:ee}=i.useTheme(),ne=!!(t&&(w||s.length>0||c)),K=b&&s.length>=b,re={border:"none",outline:"none",backgroundColor:"transparent",fontSize:i.Typography.fontSizes[p],color:k?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",transition:"all 0.2s ease-in-out",...f==null?void 0:f.input};return r.jsx(Ue,{error:!!l,helperText:typeof l=="string"?l:a,views:f,...Y,children:r.jsxs(oo,{label:t,shadow:m,value:s.length>0||c?"has-content":"",size:p,shape:u,variant:y,error:!!l,showLabel:ne,isFocused:w,isHovered:v,isDisabled:k,isReadOnly:x,views:{...f,container:{...f==null?void 0:f.container,...f==null?void 0:f.inputContainer}},onClick:A,onMouseEnter:()=>W==null?void 0:W(!0),onMouseLeave:()=>W==null?void 0:W(!1),children:[d,r.jsxs(jo,{children:[t&&r.jsx(ho,{size:p,error:!!l,views:f,children:t}),r.jsxs(i.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:i.Typography.fontSizes[p],padding:"0",...f==null?void 0:f.tagsContainer,children:[s.map((ie,ge)=>r.jsx(tf,{tag:ie.value,onRemove:()=>D==null?void 0:D(ge),isRemovable:S,size:p,views:f,isDisabled:k,isReadOnly:x},ie.id)),!K&&r.jsx(i.Input,{id:e,name:o,type:"text",value:c,placeholder:s.length===0?n:"",disabled:k,readOnly:x,autoFocus:C,onChange:I,onKeyDown:T,onFocus:j,onBlur:E,autoComplete:"off",...re}),K&&r.jsxs(i.Text,{fontSize:i.Typography.fontSizes[p],color:"color-gray-500",fontStyle:"italic",...f==null?void 0:f.placeholder,children:["Maximum ",b," tags reached"]})]})]}),g]})})},nf=e=>{const o=dl(e),{tags:t,...n}=e,{setTags:a,...l}=o;return r.jsx(gl,{...l,...n})};function af(e){const o=setTimeout(e,0),t=setTimeout(e,10),n=setTimeout(e,50);return[o,t,n]}const hl=({value:e,defaultValue:o="",length:t=6,onChange:n,onChangeText:a,onComplete:l,onKeyDown:c,onKeyPress:s,onBlur:d,onFocus:g,isReadOnly:m,isDisabled:f,pattern:p,stepValues:u,pasteTransformer:y})=>{var oe,B;const k=e!==void 0,x=k?e:o,[C,S]=h.useState(String(x??"").slice(0,t)||""),[w,v]=h.useState(!1),[b,I]=h.useState(!1),[T,j]=h.useState(null),[E,D]=h.useState(null),W=h.useRef(null),A=h.useRef(null),H=h.useRef({value:C,onChange:n||(()=>{}),isIOS:typeof window<"u"&&((B=(oe=window==null?void 0:window.CSS)==null?void 0:oe.supports)==null?void 0:B.call(oe,"-webkit-touch-callout","none"))}),z=h.useRef({prev:[null,null,"none"]}),P=p?typeof p=="string"?new RegExp(p):p:null;h.useEffect(()=>{if(k&&e!==C){const $=String(e??"").slice(0,t)||"";S($)}},[k,e,t,C]);const V=h.useCallback($=>{let q=$;if(u&&u.length>0&&$){const J=parseInt($,10);if(!isNaN(J)){let Y=u[0],Z=Math.abs(J-Y);for(let ee=1;ee<u.length;ee++){const ne=Math.abs(J-u[ee]);ne<Z&&(Z=ne,Y=u[ee])}q=Y.toString()}}S(q),n&&n(q),a&&a(q),l&&q.length===t&&l(q)},[n,a,l,t,u,k]),M=h.useCallback($=>{$&&W.current!==$&&Object.defineProperty(W,"current",{value:$,writable:!0})},[]),L=h.useCallback($=>{var Y,Z,ee,ne;const q=typeof $=="string"?$:((Y=$==null?void 0:$.currentTarget)==null?void 0:Y.value)??((Z=$==null?void 0:$.target)==null?void 0:Z.value)??((ee=$==null?void 0:$.nativeEvent)==null?void 0:ee.text)??"",J=String(q).slice(0,t);if(J.length>0&&P&&!P.test(J)){(ne=$==null?void 0:$.preventDefault)==null||ne.call($);return}V(J),W.current&&(W.current.value=J)},[t,P,V,W]),_=h.useCallback(()=>{const $=W.current;if($&&typeof $.setSelectionRange=="function"){const q=typeof $.value=="string"?$.value.length:0,J=Math.min(q,t-1),Y=q;$.setSelectionRange(J,Y),j(J),D(Y)}v(!0),g&&g()},[t,g]),O=h.useCallback($=>{v(!1),d&&d($)},[d]),N=h.useCallback($=>{c&&c($)},[]),U=h.useCallback($=>{s&&s($)},[]),X=h.useCallback($=>{const q=W.current;if(!$.clipboardData||!q)return;const J=$.clipboardData.getData("text/plain"),Y=y?y(J):J;$.preventDefault();const Z=q.selectionStart||0,ee=q.selectionEnd||0,re=(Z!==ee?C.slice(0,Z)+Y+C.slice(ee):C.slice(0,Z)+Y+C.slice(Z)).slice(0,t);if(re.length>0&&P&&!P.test(re))return;q.value=re,V(re),S(re);const ie=Math.min(re.length,t-1),ge=re.length;q.setSelectionRange(ie,ge),j(ie),D(ge)},[t,y,P,V,C,S]);return h.useEffect(()=>{const $=W.current,q=A.current;if(!$||!q||typeof document>"u")return;H.current.value!==$.value&&H.current.onChange&&H.current.onChange($.value),z.current.prev=[$.selectionStart,$.selectionEnd,$.selectionDirection];function J(){if(document.activeElement!==$){j(null),D(null);return}const K=($==null?void 0:$.selectionStart)??null,re=($==null?void 0:$.selectionEnd)??null,ie=($==null?void 0:$.selectionDirection)??null,ge=($==null?void 0:$.maxLength)??0,We=($==null?void 0:$.value)??"",le=z.current.prev;let te=-1,ae=-1,ce="none";if(We.length!==0&&K!==null&&re!==null){const be=K===re,Ie=K===We.length&&We.length<ge;if(be&&!Ie){const ve=K;if(ve===0)te=0,ae=1,ce="forward";else if(ve===ge)te=ve-1,ae=ve,ce="backward";else if(ge>1&&We.length>1){let Je=0;if(le[0]!==null&&le[1]!==null){ce=ve<le[1]?"backward":"forward";const co=le[0]===le[1]&&le[0]<ge;ce==="backward"&&!co&&(Je=-1)}te=Je+ve,ae=Je+ve+1}}te!==-1&&ae!==-1&&te!==ae&&W.current&&W.current.setSelectionRange(te,ae,ce)}const ye=te!==-1?te:K,Q=ae!==-1?ae:re,R=ce!=="none"?ce:ie;j(ye),D(Q),z.current.prev=[ye,Q,R]}document.addEventListener("selectionchange",J,{capture:!0}),J(),document.activeElement===$&&v(!0);const Y=q,Z=()=>{var K;Y&&typeof((K=Y.style)==null?void 0:K.setProperty)=="function"&&Y.style.setProperty("--root-height",`${$.clientHeight}px`)};Z();const ee=typeof window<"u"?window.ResizeObserver:void 0,ne=typeof ee=="function"?new ee(Z):null;return ne==null||ne.observe($),()=>{document.removeEventListener("selectionchange",J,{capture:!0}),ne==null||ne.disconnect()}},[]),h.useEffect(()=>{if(typeof Event>"u")return;const $=af(()=>{var ee,ne,K;const q=W.current;q&&typeof q.dispatchEvent=="function"&&q.dispatchEvent(new Event("input"));const J=(ee=W.current)==null?void 0:ee.selectionStart,Y=(ne=W.current)==null?void 0:ne.selectionEnd,Z=(K=W.current)==null?void 0:K.selectionDirection;J!==null&&Y!==null&&J!==void 0&&Y!==void 0&&(j(J),D(Y),z.current.prev=[J,Y,Z||"none"])});return()=>$.forEach(clearTimeout)},[C,w]),{value:C,setValue:V,isFocused:w,setIsFocused:v,isHovered:b,setIsHovered:I,inputRef:W,containerRef:A,mirrorSelectionStart:T,mirrorSelectionEnd:E,setMirrorSelectionStart:j,setMirrorSelectionEnd:D,setInputRef:M,handleChange:L,handleFocus:_,handleBlur:O,handleKeyDown:N,handleKeyPress:U,handlePaste:X}},lf=h.createContext({slots:[],isFocused:!1,isHovering:!1}),cf=`
|
|
1
|
+
(function(z,r){typeof exports=="object"&&typeof module<"u"?r(exports,require("react/jsx-runtime"),require("react"),require("app-studio"),require("react-dom"),require("zustand"),require("react-router-dom"),require("formik")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","app-studio","react-dom","zustand","react-router-dom","formik"],r):(z=typeof globalThis<"u"?globalThis:z||self,r(z.AppStudioWeb={},z.jsxRuntime,z.React,z.appStudio,z.ReactDOM,z.zustand,z.ReactRouterDOM,z.Formik))})(this,function(z,r,h,i,rs,Fo,kt,_e){"use strict";var ix=Object.defineProperty;var cx=(z,r,h)=>r in z?ix(z,r,{enumerable:!0,configurable:!0,writable:!0,value:h}):z[r]=h;var oo=(z,r,h)=>cx(z,typeof r!="symbol"?r+"":r,h);var Io,Un;const zo=(e="id")=>`${e}-${Math.random().toString(36).substring(2,9)}`,ts=({type:e="single",value:o,defaultValue:t,onValueChange:n,collapsible:a=!1})=>{const l=o!==void 0,c=o??t,g=()=>e==="multiple"?Array.isArray(c)?c:c?[c]:[]:Array.isArray(c)?c[0]:c,[s,d]=h.useState(g()),u=h.useMemo(()=>zo("accordion"),[]),f=l?o:s,m=h.useMemo(()=>f===void 0?[]:Array.isArray(f)?f:[f],[f]);h.useEffect(()=>{l&&(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,l,e]);const p=h.useCallback(k=>{let b;if(e==="single")f===k&&a?b=void 0:f!==k?b=k:b=f;else{const w=Array.isArray(f)?f:[];w.includes(k)?b=w.filter(C=>C!==k):b=[...w,k],Array.isArray(b)&&b.length===0&&(b=[])}l||d(b),n&&n(b)},[e,f,a,l,n]),y=h.useCallback(k=>m.includes(k),[m]);return{expandedItems:m,toggleItem:p,isItemExpanded:y,type:e,collapsible:a,baseId:u}},ns={square:{borderRadius:0},rounded:{borderRadius:8}},as={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"}}},ls={metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},Ct={airbnb:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:16},title:{color:"color-black",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:{color:"color-gray-500",fontFamily:"'Inter', 'Airbnb Cereal VF', Circular, -apple-system, system-ui, Roboto, 'Helvetica Neue', sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},apple:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:18},title:{color:"color-black",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif",fontWeight:300,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"-apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Inter', system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},coinbase:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'Coinbase Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},figma:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"theme-primary",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, Helvetica, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},linear:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.025em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', 'SF Pro Display', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},nike:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"theme-secondary",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"italic"},description:{color:"color-gray-500",fontFamily:"'Helvetica Now Display', 'Helvetica Neue', 'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},notion:{metadata:{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"]},theme:{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"},tokens:{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"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:10},title:{color:"color-black",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif",fontWeight:400,letterSpacing:"0em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', -apple-system, BlinkMacSystemFont, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},revolut:{metadata:{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"]},theme:{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"},tokens:{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:[]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:20},title:{color:"color-black",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif",fontWeight:700,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Aeonik Pro', 'Inter', system-ui, -apple-system, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},shopify:{metadata:{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"]},theme:{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"},tokens:{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"]},components:{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:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-muted",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},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"}}}},personality:{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"}},spacex:{metadata:{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"]},theme:{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"},tokens:{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:[]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:2},title:{color:"theme-primary",fontFamily:"'Share Tech', Arial, Verdana, sans-serif",fontWeight:800,letterSpacing:"0.06em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"color-gray-200",fontFamily:"'Share Tech', Arial, Verdana, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},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"}}}},personality:{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"}},spotify:{metadata:{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"]},theme:{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"},tokens:{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"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:8},title:{color:"color-black",fontFamily:"'Inter', Helvetica, Arial, sans-serif",fontWeight:800,letterSpacing:"-0.02em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'Inter', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},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"}}}},personality:{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"}},stripe:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-white",borderColor:"color-gray-200",borderRadius:12},title:{color:"color-black",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif",fontWeight:700,letterSpacing:"-0.022em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'sohne-var', 'SF Pro Display', -apple-system, system-ui, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}},tesla:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:0},title:{color:"color-black",fontFamily:"'Inter', -apple-system, Arial, sans-serif",fontWeight:300,letterSpacing:"0.02em",textTransform:"uppercase",fontStyle:"normal"},description:{color:"theme-warning",fontFamily:"'Inter', -apple-system, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},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"}}}},personality:{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"}},uber:{metadata:{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"]},theme:{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"},tokens:{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"]},components:{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:{backgroundColor:"color-white",borderColor:"theme-warning",borderRadius:4},title:{color:"theme-primary",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif",fontWeight:700,letterSpacing:"-0.01em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"'DM Sans', system-ui, -apple-system, 'Helvetica Neue', Helvetica, Arial, sans-serif"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-primary"},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"}}}},personality:{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"}},vercel:{metadata:{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"]},theme:{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"},tokens:{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)"]},components:{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:{backgroundColor:"color-gray-50",borderColor:"color-gray-200",borderRadius:4},title:{color:"theme-primary",fontFamily:"var(--font-sans)",fontWeight:700,letterSpacing:"-0.04em",textTransform:"none",fontStyle:"normal"},description:{color:"color-gray-500",fontFamily:"var(--font-sans)"},icon:{color:"theme-primary"}}},status:{views:{indicator:{backgroundColor:"theme-success"},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"}}}},personality:{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"}}},is=Object.values(Ct),Kn=ls,Mo=e=>!!e&&typeof e=="object"&&!Array.isArray(e)&&Object.prototype.toString.call(e)==="[object Object]",wt=e=>e,Ge=(...e)=>{const o={};return e.forEach(t=>{Mo(t)&&Object.entries(t).forEach(([n,a])=>{if(a!=null){if(Mo(a)&&Mo(o[n])){o[n]=Ge(o[n],a);return}o[n]=a}})}),o},Xn=e=>{if(Array.isArray(e)||!Mo(e))return e;const o={};for(const[t,n]of Object.entries(e))n!==null&&(o[t]=Mo(n)?Xn(n):n);return o},cs=new Set(["button"]),ss=["backgroundColor","background","borderColor","color"],Jn=new Set,ds=(e,o)=>{if(process.env.NODE_ENV!=="production"&&!(!o||!cs.has(e))&&!Jn.has(e))for(const[t,n]of Object.entries(o)){if(!Mo(n))continue;const a=ss.filter(l=>n[l]!=null);if(a.length>0){Jn.add(e),console.warn(`[design-system] components.${e}.views.${t} 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}}},St=(e,o)=>{if(!o)return{};const t=o.components[e]||{},n=wt(Xn(t));return ds(e,n.views),n},Qn=(e,o,t)=>{const{config:n,...a}=o,l=St(e,t),c=Ge(l,n||{});return wt(Ge(c,a))},Zn=h.createContext({isEnabled:!1}),vt=({children:e,config:o,configId:t,mode:n})=>{const a=o||(t?Ct[t]:null)||Kn,{themeMode:l}=i.useTheme(),c=n??l??a.metadata.defaultAppearance,g=h.useMemo(()=>({config:a,configId:a.metadata.id,isEnabled:!0}),[a]);return r.jsx(Zn.Provider,{value:g,children:r.jsx(i.ThemeProvider,{theme:a.theme,mode:c,transparentWrapper:!0,children:r.jsx("div",{"data-design-system":a.metadata.id,"data-appearance":c,style:{display:"contents"},children:e})})})},Fr=()=>h.useContext(Zn),jo=e=>{const{config:o}=Fr();return St(e,o)},Ce=(e,o)=>{const{config:t}=Fr();return Qn(e,o,t)},Rn=h.createContext({expandedItems:[],toggleItem:()=>{},isItemExpanded:()=>!1,type:"single",collapsible:!1,baseId:""}),gs=({children:e,value:o})=>r.jsx(Rn.Provider,{value:o,children:e}),ea=()=>{const e=h.useContext(Rn);if(!e)throw new Error("useAccordionContext must be used within an AccordionProvider");return e},hs=({value:e,children:o,isDisabled:t=!1,views:n,...a})=>{var m;const{isItemExpanded:l,baseId:c}=ea(),g=jo("accordion"),s=Ge({item:(m=g.views)==null?void 0:m.container},n),d=l(e),u=`${c}-trigger-${e}`,f=`${c}-content-${e}`;return r.jsx(i.View,{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",overflow:"hidden",opacity:t?.5:1,pointerEvents:t?"none":"auto","data-state":d?"open":"closed","data-disabled":t?"":void 0,...s==null?void 0:s.item,...a,children:h.Children.map(o,p=>h.isValidElement(p)?h.cloneElement(p,{...p.props,value:e,isExpanded:d,isDisabled:t,triggerId:u,contentId:f}):p)})},fs=({children:e,value:o,isExpanded:t,isDisabled:n,triggerId:a,contentId:l,views:c,asChild:g=!1,...s})=>{var y;const{toggleItem:d}=ea(),u=jo("accordion"),f=Ge({container:(y=u.views)==null?void 0:y.trigger},c),p={id:a,"aria-expanded":t,"aria-controls":l,"aria-disabled":n,"data-state":t?"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"},...f==null?void 0:f.container,...s};if(g&&h.isValidElement(e)){const k=h.Children.only(e);return h.cloneElement(k,{...p,...k.props})}return r.jsxs(i.Horizontal,{...p,children:[e,r.jsx(i.View,{width:24,height:24,display:"flex",alignItems:"center",justifyContent:"center",transition:"transform 0.2s ease",transform:t?"rotate(180deg)":"rotate(0deg)",...f==null?void 0:f.icon,children:r.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:r.jsx("path",{d:"M16.59 8.59L12 13.17L7.41 8.59L6 10L12 16L18 10L16.59 8.59Z",fill:"currentColor"})})})]})},us=({children:e,isExpanded:o,isDisabled:t,triggerId:n,contentId:a,views:l,...c})=>{var C;const g=jo("accordion"),s=Ge({container:(C=g.views)==null?void 0:C.content},l),d=260,u=h.useRef(null),f=h.useRef(null),[m,p]=h.useState(!!o),[y,k]=h.useState(o?"none":"0px"),[b,w]=h.useState(o?1:0);return h.useEffect(()=>()=>{f.current&&clearTimeout(f.current)},[]),h.useEffect(()=>{var S;if(f.current&&(clearTimeout(f.current),f.current=null),o){p(!0),requestAnimationFrame(()=>{var I;const x=((I=u.current)==null?void 0:I.scrollHeight)??0;k(`${x}px`),w(1)});return}const v=((S=u.current)==null?void 0:S.scrollHeight)??0;k(`${v}px`),w(1),requestAnimationFrame(()=>{k("0px"),w(0)}),f.current=setTimeout(()=>{p(!1)},d)},[o,e]),h.useEffect(()=>{var S;if(!o||!m)return;const v=((S=u.current)==null?void 0:S.scrollHeight)??0;k(`${v}px`)},[e,o,m]),m?r.jsx(i.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":t?"":void 0,style:{backgroundColor:"transparent"},...s==null?void 0:s.container,...c,children:r.jsx(i.View,{ref:u,padding:16,children:e})}):null},ms=({children:e,shape:o="rounded",variant:t="default",views:n,baseId:a,type:l,collapsible:c,themeMode:g,...s})=>r.jsx(i.Vertical,{width:"100%","data-orientation":"vertical",...ns[o],...as[t],...n==null?void 0:n.container,...s,children:e}),Oe=e=>{const o=Ce("accordion",e),{children:t,type:n="single",value:a,defaultValue:l,onValueChange:c,collapsible:g=!1,shape:s="rounded",variant:d="default",views:u,...f}=o,m=Array.isArray(l)?l:l?[l]:void 0,p=ts({type:n,value:a,defaultValue:l??m,onValueChange:c,collapsible:g});return r.jsx(gs,{value:{expandedItems:p.expandedItems,toggleItem:p.toggleItem,isItemExpanded:p.isItemExpanded,type:p.type,collapsible:p.collapsible,baseId:p.baseId},children:r.jsx(ms,{shape:s,variant:d,views:u,baseId:p.baseId,type:p.type,collapsible:p.collapsible,...f,children:t})})};Oe.Item=hs,Oe.Trigger=fs,Oe.Content=us;const ps=({isOpen:e,defaultOpen:o=!1,value:t,defaultValue:n,isMulti:a=!1,onOpenChange:l,onClose:c})=>{const g=typeof e=="boolean",s=t!==void 0,d=n??(a?[]:""),[u,f]=h.useState(o),[m,p]=h.useState(d),y=g?!!e:u,k=s?t:m,b=h.useCallback(v=>{g||f(v),l==null||l(v),v||c==null||c()},[g,c,l]),w=h.useCallback(()=>{b(!1)},[b]),C=h.useCallback(v=>{s||p(v)},[s]);return{isSheetOpen:y,selectedValue:k,setSelectedValue:C,closeSheet:w}},or=({children:e,containerId:o="portal-root"})=>{const[t,n]=h.useState(null);return h.useEffect(()=>{let a=document.getElementById(o),l=!1;return a||(l=!0,a=document.createElement("div"),a.setAttribute("id",o),document.body.appendChild(a)),n(a),()=>{l&&a&&a.parentNode&&a.childNodes.length===0&&a.parentNode.removeChild(a)}},[o]),t?rs.createPortal(e,t):null},Tt=new Map,ys=(e,o,t)=>(Tt.has(e)||Tt.set(e,h.lazy(()=>import("lucide-react/dynamicIconImports").then(n=>{const a=n.default[e];return a?a():{default:()=>r.jsx(r.Fragment,{children:o||t})}}))),Tt.get(e)),oa=h.memo(({widthHeight:e,color:o="currentColor",transform:t,orientation:n="up",children:a,...l})=>r.jsx(i.View,{widthHeight:e,color:o,display:"flex",alignItems:"center",justifyContent:"center",transform:t||(n==="left"?"rotate(-90deg)":n==="right"?"rotate(90deg)":n==="up"?"rotate(0deg)":n==="down"?"rotate(180deg)":"none"),...l,children:a})),rr=h.memo(({name:e="circle",widthHeight:o=24,color:t="currentColor",filled:n=!1,strokeWidth:a=1,size:l,children:c,fallback:g,...s})=>{const{getColor:d}=i.useTheme(),u=l||o,f=h.useMemo(()=>{const y=d(t);return{fill:n?y:"none",stroke:y,strokeWidth:a,strokeLinecap:"round",strokeLinejoin:"round"}},[n,t,a,d]);if(!e)return r.jsx(oa,{widthHeight:o,color:t,...s,children:c});const m=e.toLowerCase().replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),p=ys(m,g,c);return r.jsx(oa,{widthHeight:u,color:t,...s,children:r.jsx(h.Suspense,{fallback:g||null,children:r.jsx(p,{size:u,...f})})})}),oe=(e,o={})=>{const t=n=>r.jsx(rr,{name:e,...o,...n});return t.displayName=`${e}Icon`,t},bs=oe("user",{filled:!1}),xs=oe("circle-help",{filled:!1}),ks=oe("folder",{filled:!1}),ye=oe("chevron-up",{filled:!1}),ra=oe("grip-vertical",{filled:!1}),ho=oe("file",{filled:!1}),Cs=oe("video",{filled:!1}),ws=oe("image",{filled:!1}),Wo=oe("volume",{filled:!1}),Ss=oe("twitter",{filled:!1}),vs=oe("x",{filled:!1}),Ts=oe("twitch",{filled:!1}),$e=oe("x",{filled:!1,strokeWidth:2}),Is=oe("instagram",{filled:!1}),Fs=oe("youtube",{filled:!1}),zs=oe("facebook",{filled:!1}),Ms=oe("linkedin",{filled:!1}),js=oe("at-sign",{filled:!1}),ta=oe("minus",{filled:!1}),ro=oe("info",{filled:!1}),na=oe("play",{filled:!1}),Ws=oe("pause",{filled:!1}),Es=oe("heart",{filled:!1}),As=oe("star",{filled:!1}),Hs=oe("save",{filled:!1}),It=oe("triangle-alert",{filled:!1}),Vs=oe("battery",{filled:!1}),Ps=oe("bookmark",{filled:!1}),Ds=oe("cloud",{filled:!1}),$s=oe("copy",{filled:!1}),zr=oe("trash",{filled:!1}),Ls=zr,Bs=oe("edit",{filled:!1}),Ft=oe("mic",{filled:!1}),Mr=oe("square",{filled:!1}),zt=oe("send",{filled:!1}),Mt=oe("loader",{filled:!1}),tr=oe("paperclip",{filled:!1}),jr=oe("search",{filled:!1}),_s=oe("home",{filled:!1}),aa=oe("settings",{filled:!1}),Os=oe("download",{filled:!1}),la=oe("share",{filled:!1}),nr=oe("check",{filled:!1}),Ns=oe("plus",{filled:!1}),jt=oe("eye-off",{filled:!1}),Wt=oe("eye",{filled:!1}),qs=oe("lock",{filled:!1}),Us=oe("user",{filled:!1}),ia=oe("external-link",{filled:!1}),Et=oe("check-circle",{filled:!1}),Wr=oe("alert-circle",{filled:!1}),Gs=oe("bell",{filled:!1}),Ys=oe("file-text",{filled:!1}),Ks=oe("bar-chart",{filled:!1}),Xs=oe("moon",{filled:!1}),ca=oe("panel-left",{filled:!1}),At=oe("upload",{filled:!1}),Js=nr,Qs=e=>r.jsx(ye,{orientation:"left",...e}),Zs=oe("zoom-out",{filled:!1}),Rs=oe("type",{filled:!1}),ed=oe("shapes",{filled:!1}),od=oe("rotate-cw",{filled:!1}),rd=oe("gift",{filled:!1}),td=oe("shield",{filled:!1}),nd=oe("log-out",{filled:!1}),ad=oe("power",{filled:!1}),ld=oe("link",{filled:!1}),id=oe("layout",{filled:!1}),cd=oe("zap",{filled:!1}),sd=oe("credit-card",{filled:!1}),dd=oe("more-horizontal",{filled:!1}),gd=zr,hd=oe("filter",{filled:!1}),fd=oe("calendar",{filled:!1}),ud=oe("clock",{filled:!1}),md=oe("map-pin",{filled:!1}),pd=oe("menu",{filled:!1}),yd=oe("refresh-cw",{filled:!1}),bd=oe("printer",{filled:!1}),xd=oe("wand",{filled:!1}),kd=oe("thumbs-down",{filled:!1}),Cd=oe("thumbs-up",{filled:!1}),wd=oe("camera",{filled:!1}),Sd=oe("bluetooth",{filled:!1}),vd=oe("unlock",{filled:!1}),Td=oe("wifi",{filled:!1}),Id=oe("arrow-right",{filled:!1}),Fd=oe("arrow-up",{filled:!1}),zd=oe("loader",{filled:!1}),Md=oe("sliders-horizontal",{filled:!1}),jd=oe("crop",{filled:!1}),Wd=oe("zoom-in",{filled:!1}),Ed=oe("grip-horizontal",{filled:!1}),sa=oe("mouse-pointer-2",{filled:!1}),Ad={sm:{minHeight:44,paddingVertical:10,paddingHorizontal:16},md:{minHeight:52,paddingVertical:12,paddingHorizontal:18},lg:{minHeight:60,paddingVertical:14,paddingHorizontal:20}},Eo={sm:{label:14,description:12},md:{label:16,description:13},lg:{label:18,description:14}},da=(e,o)=>e.id??e.value??`action-sheet-item-${o}`,ga=e=>e.value??e.id,ha=e=>e.disabled||e.isDisabled||e.divider,Hd=(e,o)=>{if(typeof e.selected=="boolean")return e.selected;const t=ga(e);return t?Array.isArray(o)?o.includes(t):o===t:!1},Vd=({isSheetOpen:e,closeSheet:o,selectedValue:t,setSelectedValue:n,isClosePrevented:a=!1,dismissOnBackdropPress:l=!0,title:c,description:g,header:s,children:d,items:u=[],isMulti:f=!1,closeOnSelect:m,onSelect:p,onChange:y,showCancel:k=!1,cancelLabel:b="Cancel",onCancel:w,showHandle:C=!0,size:v="md",maxHeight:S="88vh",views:x,animationType:I,...T})=>{if(!e)return null;const W=()=>{a||o()},D=()=>{l&&W()},P=()=>{w==null||w(),W()},M=E=>{var V;if(ha(E))return;const F=ga(E);let j=t;if(F){if(f){const H=Array.isArray(t)?t:t?[t]:[];j=H.includes(F)?H.filter(O=>O!==F):[...H,F]}else j=F;n(j),p==null||p(F,E),y==null||y(j,E)}(V=E.onPress)==null||V.call(E,E),(E.closeOnSelect??m??!f)&&W()};return r.jsx(or,{children:r.jsx(i.View,{position:"fixed",top:0,right:0,bottom:0,left:0,zIndex:9999,backgroundColor:"color-dark-50-360",display:"flex",justifyContent:"flex-end",onClick:D,...x==null?void 0:x.overlay,children:r.jsxs(i.Vertical,{width:"100%",maxWidth:520,maxHeight:S,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:E=>E.stopPropagation(),...x==null?void 0:x.container,...x==null?void 0:x.sheet,...T,children:[C&&r.jsx(i.View,{width:36,height:4,borderRadius:999,backgroundColor:"color-gray-300",alignSelf:"center",marginTop:4,marginBottom:8,...x==null?void 0:x.handle}),(c||g)&&r.jsxs(i.Vertical,{paddingHorizontal:20,paddingTop:6,paddingBottom:12,gap:4,...x==null?void 0:x.header,children:[c&&r.jsx(i.Text,{fontSize:18,lineHeight:24,fontWeight:"600",color:"color-gray-900",...x==null?void 0:x.title,children:c}),g&&r.jsx(i.Text,{fontSize:13,lineHeight:18,color:"color-gray-500",...x==null?void 0:x.description,children:g})]}),s,r.jsxs(i.Vertical,{overflowY:"auto",paddingBottom:4,...x==null?void 0:x.content,children:[u.map((E,F)=>{if(E.divider)return r.jsx(i.View,{height:1,backgroundColor:"color-gray-200",marginVertical:6,...x==null?void 0:x.divider},da(E,F));const j=Hd(E,t),A=ha(E),V=A?"color-gray-400":E.destructive?"color-red-600":j?"theme-primary":"color-gray-900";return r.jsxs(i.Horizontal,{alignItems:"center",gap:12,opacity:A?.5:1,cursor:A?"not-allowed":"pointer",onClick:()=>M(E),...Ad[v],...x==null?void 0:x.item,children:[E.icon&&r.jsx(i.View,{flexShrink:0,...x==null?void 0:x.itemIcon,children:E.icon}),r.jsxs(i.Vertical,{flex:1,gap:2,children:[typeof E.label=="string"?r.jsx(i.Text,{fontSize:Eo[v].label,lineHeight:Eo[v].label+6,fontWeight:j?"600":"400",color:V,...x==null?void 0:x.itemLabel,children:E.label}):E.label,E.description&&r.jsx(i.Text,{fontSize:Eo[v].description,lineHeight:Eo[v].description+5,color:"color-gray-500",...x==null?void 0:x.itemDescription,children:E.description})]}),j&&r.jsx(nr,{widthHeight:18,color:"theme-primary",...x==null?void 0:x.itemIndicator})]},da(E,F))}),d]}),k&&r.jsx(i.View,{marginTop:8,paddingHorizontal:12,paddingTop:8,borderTopWidth:1,borderTopColor:"color-gray-200",children:r.jsx(i.Horizontal,{minHeight:52,alignItems:"center",justifyContent:"center",borderRadius:14,backgroundColor:"color-gray-100",cursor:"pointer",onClick:P,...x==null?void 0:x.cancelButton,children:r.jsx(i.Text,{fontSize:Eo[v].label,lineHeight:Eo[v].label+6,fontWeight:"600",color:"color-gray-900",...x==null?void 0:x.cancelLabel,children:b})})})]})})})},Pd=e=>{const o=ps(e);return r.jsx(Vd,{...e,...o})},Dd=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-500"}},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-500"}},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-500"}},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-500"}}}},$d={default:"alert",info:"status",success:"status",error:"alert",warning:"alert"},Ld=h.memo(({icon:e,title:o="",views:t,description:n="",variant:a="default",themeMode:l,children:c,...g})=>{const{themeMode:s}=i.useTheme(),d=l||s,u=h.useMemo(()=>Dd(d),[d]),f=()=>{var y;if(e)return e;const p={size:20,color:((y=t==null?void 0:t.icon)==null?void 0:y.color)??u[a].icon.color};switch(a){case"info":return r.jsx(ro,{...p});case"success":return r.jsx(Et,{...p});case"error":return r.jsx(Wr,{...p});case"warning":default:return r.jsx(It,{...p})}};return r.jsxs(i.Horizontal,{role:$d[a],gap:12,padding:"12px 16px",flexWrap:"nowrap",alignItems:"flex-start",borderRadius:"8px",borderWidth:"1px",borderStyle:"solid",borderColor:u[a].container.borderColor,backgroundColor:u[a].container.backgroundColor,boxShadow:u[a].container.boxShadow,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...t==null?void 0:t.container,...g,children:[r.jsx(i.View,{alignSelf:"flex-start",marginTop:"2px",...t==null?void 0:t.icon,children:f()}),r.jsxs(i.Vertical,{gap:4,children:[o?r.jsx(i.Text,{fontSize:"14px",fontWeight:"600",lineHeight:"20px",color:u[a].content.color,...t==null?void 0:t.title,children:o}):null,r.jsx(i.Text,{fontSize:"12px",fontWeight:"400",lineHeight:"16px",color:u[a].content.color,...t==null?void 0:t.description,children:n||c})]})]})}),Ht=e=>{const o=Ce("alert",e);return r.jsx(Ld,{...o})},Bd=({ratio:e=16/9,children:o,views:t,...n})=>r.jsx(i.View,{width:"100%",position:"relative",overflow:"hidden",paddingTop:`${1/e*100}%`,borderRadius:8,...n,...t==null?void 0:t.center,children:r.jsx(i.View,{position:"absolute",top:0,right:0,bottom:0,left:0,...t==null?void 0:t.view,children:o})}),fa=({ratio:e,children:o,...t})=>r.jsx(Bd,{ratio:e,...t,children:o});function _d(e,o,t){return Math.min(Math.max(e,o),t)}const Od=({bars:e,isPaused:o,...t})=>{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 r.jsx(i.Horizontal,{alignItems:"center",minWidth:120,gap:2,height:24,width:"100%",maxWidth:"100%",...t,children:e.map((l,c)=>r.jsx(i.View,{width:3,borderRadius:2,backgroundColor:o?"color-gray-300":l>=0?"theme-primary":"color-gray-300",style:{height:`${l>=0?_d(l*300,6,24):a[c%a.length]}px`}},c))})},Vt=({analyserNode:e,isPaused:o,...t})=>{const n=h.useRef(null),a=60,l=32,[c,g]=h.useState([]);return h.useEffect(()=>{if(!e){g(Array(a).fill(-1));return}const s=e.frequencyBinCount,d=new Uint8Array(s),u=()=>{e.getByteTimeDomainData(d);let f=0;for(let p=0;p<s;p++){const y=(d[p]-128)/128;f+=y*y}const m=Math.sqrt(f/s);h.startTransition(()=>{g(p=>{const k=[...p,m].slice(-a);return k.length<a?[...Array(a-k.length).fill(-1),...k]:k})})};return n.current=setInterval(u,l),()=>{n.current&&clearInterval(n.current)}},[e]),r.jsx(Od,{bars:c,isPaused:o,...t})},Er=Fo.create(e=>({visible:!1,title:"",subtitle:"",variant:"info",isClosable:!1,views:{},action:()=>{},actionText:"",showIcon:!1,timeout:3e3,show:(o,t="",n="",a,l,c,g,s,d)=>e({visible:!0,variant:o,title:t,subtitle:n,isClosable:a,views:l,action:c,actionText:g,showIcon:s,timeout:d}),hide:()=>e({visible:!1})})),ua=(e,o,t,n)=>{Er.getState().show(e,o,t,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)},ma=()=>{Er.getState().hide()},Nd={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"}}},pa=({variant:e,hide:o,title:t,subtitle:n,theme:a,action:l,actionText:c,showIcon:g=!1,isClosable:s=!1,timeout:d=3e3,views:u})=>{var w,C;h.useEffect(()=>{if(d&&!s){const v=setTimeout(()=>{o()},d);return()=>{clearTimeout(v)}}},[]);const f=a??Nd,m=!!(l&&c),p={borderWidth:1,borderStyle:"solid",borderRadius:12,borderColor:`${f[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:r.jsx(ro,{widthHeight:24,color:y,...u==null?void 0:u.icon}),success:r.jsx(Et,{widthHeight:24,color:y,...u==null?void 0:u.icon}),warning:r.jsx(It,{widthHeight:24,color:y,...u==null?void 0:u.icon}),error:r.jsx(Wr,{widthHeight:24,color:y,...u==null?void 0:u.icon})}[e],b=g&&k;return r.jsxs(i.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:s?()=>{}:()=>{o()},...p,transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease",...u==null?void 0:u.container,children:[b&&k,r.jsxs(i.Vertical,{gap:4,width:"100%",children:[r.jsx(i.Text,{size:"md",weight:"semiBold",...u==null?void 0:u.title,children:t}),n&&r.jsx(i.Text,{size:"sm",lineHeight:"20px",color:f[e].content.color,...u==null?void 0:u.subtitle,children:n})]}),m&&r.jsx(i.View,{as:"button",type:"button",onClick:l,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",...u==null?void 0:u.actionText,children:r.jsx(i.Text,{whiteSpace:"nowrap",size:"sm",weight:"semiBold",color:f[e].content.color,children:c})}),s&&r.jsx(i.View,{position:"absolute",zIndex:1e4,right:8,top:8,onClick:()=>{o()},cursor:"pointer",padding:"4px",borderRadius:"9999px",transition:"background-color 0.2s ease",...(w=u==null?void 0:u.closingIcon)==null?void 0:w.container,children:r.jsx($e,{widthHeight:16,color:f[e].close.color,...(C=u==null?void 0:u.closingIcon)==null?void 0:C.icon})})]})},qd=({container:e,theme:o,position:t="topRight"})=>{const{visible:n,title:a,variant:l,subtitle:c,isClosable:g,views:s,action:d,actionText:u,showIcon:f,timeout:m}=Er(),p={topLeft:{top:6,left:8},topRight:{top:6,right:8},bottomLeft:{bottom:8,left:6},bottomRight:{bottom:8,right:6}}[t],y=()=>r.jsx(pa,{variant:l,subtitle:c,show:n,title:a,theme:o,isClosable:g,views:s,action:d,actionText:u,showIcon:f,timeout:m,hide:()=>ma()}),k=e?h.cloneElement(e,{},y()):r.jsx(i.View,{position:"absolute",zIndex:1e4,...p,children:y()});return n?k:null},Ud=(e,o)=>{if(typeof document>"u")return;const t=document.createElement("video");t.preload="metadata",t.onloadedmetadata=()=>{t.currentTime=1},t.oncanplay=()=>{const n=document.createElement("canvas");n.width=t.videoWidth,n.height=t.videoHeight;const a=n.getContext("2d");if(a){a.drawImage(t,0,0,n.width,n.height);const l=n.toDataURL("image/jpeg");o(l)}URL.revokeObjectURL(t.src)},t.src=URL.createObjectURL(e)},Gd=({maxSize:e=100*1024*1024,onFileSelect:o,onMultipleFileSelect:t,validateFile:n,thumbnail:a,multiple:l=!1,onError:c=g=>{ua("error","Error",g)}})=>{const g=h.useRef(null),s=h.useRef(null),[d,u]=h.useState(null),[f,m]=h.useState([]),[p,y]=h.useState(null),[k,b]=h.useState(null),[w,C]=h.useState(a||null),v=h.useCallback(x=>{const I=x.target.files;if(y(null),!I||I.length===0){c("No file selected"),y("No file selected");return}if(l){const T=Array.from(I),W=[];for(const D of T){if(D.size>e){c(`File ${D.name} exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File ${D.name} exceeds ${Math.round(e/(1024*1024))}MB.`);continue}if(n){const P=n(D);if(P){c(`${D.name}: ${P}`),y(`${D.name}: ${P}`);continue}}W.push(D)}W.length>0&&(m(W),t&&t(W))}else{const T=I[0];if(T.size>e){c(`File exceeds ${Math.round(e/(1024*1024))}MB.`),y(`File exceeds ${Math.round(e/(1024*1024))}MB.`);return}if(n){const W=n(T);if(W){c(W),y(W);return}}b(URL.createObjectURL(T)),T.type.startsWith("video/")&&Ud(T,C),o&&(u(T),o(T))}},[e,o,t,n,l]),S=()=>{const x=g.current;x&&typeof x.click=="function"&&x.click()};return h.useEffect(()=>()=>{typeof URL<"u"&&typeof URL.revokeObjectURL=="function"&&(k&&URL.revokeObjectURL(k),w&&URL.revokeObjectURL(w))},[k,w]),{previewUrl:k,thumbnailUrl:w,errorMessage:p,fileInputRef:g,videoRef:s,selectedFile:d,selectedFiles:f,handleFileChange:v,handleClick:S}},Yd=({accept:e,isLoading:o=!1,progress:t=0,icon:n,text:a,previewUrl:l,thumbnailUrl:c,errorMessage:g,fileInputRef:s,videoRef:d,selectedFile:u,selectedFiles:f,handleFileChange:m,handleClick:p,multiple:y=!1,containerProps:k,errorMessageProps:b,progressProps:w,videoProps:C,imageProps:v,iconProps:S,textProps:x,fileType:I,previewUrl:T,renderError:W=({errorMessage:A,errorMessageProps:V,themeMode:H})=>r.jsx(i.Text,{color:"red",fontSize:12,marginTop:8,...V,...j==null?void 0:j.text,children:A}),renderText:D=({text:A,textProps:V})=>r.jsx(i.Text,{marginTop:8,...V,...j==null?void 0:j.text,children:A}),renderFile:P=({selectedFile:A,textProps:V})=>A?r.jsxs(i.Center,{marginTop:8,gap:10,flexDirection:"column",...j==null?void 0:j.container,children:[r.jsx(i.Text,{maxLines:2,...V,...j==null?void 0:j.text,children:A.name}),r.jsxs(i.Text,{...V,...j==null?void 0:j.text,children:["(",Math.round(A.size/1024)," KB)"]})]}):null,renderVideo:M=({selectedFile:A,videoRef:V,videoProps:H})=>r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...j==null?void 0:j.view,children:r.jsx(i.View,{as:"video",width:"100%",height:"100%",src:A?URL.createObjectURL(A):void 0,style:{objectFit:"cover"},ref:V,...H,...j==null?void 0:j.view})}),renderImage:E=({previewUrl:A,imageProps:V})=>(console.log("Rendering image with URL:",A),r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...j==null?void 0:j.view,children:r.jsx(i.Image,{src:A,alt:"Preview",width:"100%",height:"100%",objectFit:"cover",style:{maxHeight:"100%",maxWidth:"100%"},...V,...j==null?void 0:j.image})})),renderProgress:F=({progress:A,progressProps:V})=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",...V,...j==null?void 0:j.horizontal,children:[r.jsx(i.View,{height:4,backgroundColor:"color-black-100",width:"100%",borderRadius:2,...j==null?void 0:j.view,children:r.jsx(i.View,{height:4,width:`${A}%`,borderRadius:2,backgroundColor:"color-dark-50",...j==null?void 0:j.view})}),r.jsxs(i.Text,{fontSize:12,...j==null?void 0:j.text,children:[A,"%"]})]}),views:j={}})=>{const A=T||l;return r.jsxs(i.Center,{onClick:p,cursor:"pointer",border:"1px solid color-black-100",borderRadius:8,padding:16,flexDirection:"column",overflow:"hidden",position:"relative",height:u&&t===100?"200px":"auto",...k,...j==null?void 0:j.container,children:[t===100&&I==="image"&&A&&E({previewUrl:A,imageProps:v}),t===100&&I==="video"&&c&&M({selectedFile:u,thumbnailUrl:c,videoRef:d,videoProps:C,imageProps:v}),t===100&&I==="file"&&u&&P({selectedFile:u,textProps:x}),t<100&&(n||r.jsx(At,{widthHeight:32,...S})),!o&&!u&&a&&D({text:a,textProps:x}),o&&F({progress:t,progressProps:w}),!o&&g&&W({errorMessage:g,errorMessageProps:b}),r.jsx(i.Input,{type:"file",ref:s,onChange:m,accept:e,multiple:y,style:{display:"none"},...j==null?void 0:j.view})]})},Ar=({accept:e="*/*",icon:o,text:t,maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:c,isLoading:g=!1,progress:s=0,fileType:d,multiple:u=!1,...f})=>{const{previewUrl:m,thumbnailUrl:p,errorMessage:y,videoRef:k,fileInputRef:b,selectedFile:w,selectedFiles:C,handleFileChange:v,handleClick:S}=Gd({maxSize:n,onFileSelect:a,onMultipleFileSelect:l,validateFile:c,multiple:u}),I=(()=>{if(d)return d;if(w)return w.type.startsWith("image/")?"image":w.type.startsWith("video/")?"video":"file"})();return r.jsx(Yd,{handleClick:S,accept:e,isLoading:g,progress:s,icon:o,text:t,maxSize:n,onFileSelect:a,validateFile:c,errorMessage:y,handleFileChange:v,selectedFile:w,selectedFiles:C,videoRef:k,fileInputRef:b,previewUrl:m,thumbnailUrl:p,fileType:I,multiple:u,...f})};function Kd(e){const o=Math.floor(e/60),t=e%60;return`${o}:${t.toString().padStart(2,"0")}`}function Xd({onAudio:e,recording:o,paused:t,audioBlob:n,analyserNode:a,duration:l,error:c,startRecording:g,stopRecording:s,pauseRecording:d,resumeRecording:u,resetRecording:f,handleFileChange:m,...p}){const[y,k]=h.useState(null);h.useEffect(()=>{if(n){const C=URL.createObjectURL(n);return k({url:C,label:`recording-${Date.now()}.webm`}),()=>{URL.revokeObjectURL(C)}}return()=>{}},[n]);const b=()=>{y!=null&&y.url&&URL.revokeObjectURL(y.url),k(null),f()},w=C=>{e(C),y!=null&&y.url&&URL.revokeObjectURL(y.url),k({url:URL.createObjectURL(C),label:C.name})};return r.jsxs(i.Vertical,{gap:"10px",width:"100%",...p,children:[r.jsxs(i.Horizontal,{gap:12,alignItems:"center",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsx(Ar,{accept:"audio/*",icon:r.jsx(tr,{widthHeight:16}),maxSize:100*1024*1024,onFileSelect:w,fileType:"file",multiple:!1,renderError:({errorMessage:C})=>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:C=>C.size>100*1024*1024?"File size exceeds 100MB limit":C.type.startsWith("audio/")?null:"Only audio files are allowed"}),r.jsx(i.View,{as:"button",type:"button",onClick:o?s:g,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?r.jsx(Mr,{widthHeight:14,color:"color-white",filled:!1}):r.jsx(Ft,{widthHeight:18,color:"color-white",filled:!1})}),r.jsx(i.View,{flex:1,minWidth:120,children:r.jsx(Vt,{analyserNode:o?a:null,isPaused:!o||t})}),r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",whiteSpace:"nowrap",children:Kd(l)})]}),y&&!o&&r.jsxs(i.Vertical,{gap:"8px",padding:"12px 14px",border:"1px solid color-gray-200",borderRadius:"12px",backgroundColor:"color-white",children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:8,children:[r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:y.label}),r.jsx(i.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:r.jsx($e,{widthHeight:14,color:"currentColor"})})]}),r.jsx(i.View,{as:"audio",controls:!0,src:y.url,width:"100%"})]}),c&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",color:"color-red-500",children:c})]})}function ya(){const[e,o]=h.useState(!1),[t,n]=h.useState(!1),[a,l]=h.useState(0),[c,g]=h.useState(null),[s,d]=h.useState(null),[u,f]=h.useState(null),m=h.useRef(null),p=h.useRef(null),y=h.useRef(null),k=h.useRef(null),b=h.useRef([]),w=h.useRef(null),C=typeof MediaRecorder<"u"&&MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":"audio/webm",v=h.useCallback(()=>{m.current&&(m.current.state!=="inactive"&&m.current.stop(),m.current=null),k.current&&(k.current.getTracks().forEach(D=>D.stop()),k.current=null),p.current&&(p.current.close(),p.current=null),y.current&&(y.current.disconnect(),y.current=null),d(null),w.current&&(clearInterval(w.current),w.current=null)},[]),S=h.useCallback(async()=>{v(),g(null),l(0),b.current=[];try{const D=await navigator.mediaDevices.getUserMedia({audio:!0});k.current=D;const P=MediaRecorder.isTypeSupported(C)?C:void 0,M=new MediaRecorder(D,P?{mimeType:P}:void 0);m.current=M;const E=new(window.AudioContext||window.webkitAudioContext);p.current=E;const F=E.createMediaStreamSource(D),j=E.createAnalyser();j.fftSize=256,j.smoothingTimeConstant=.8,F.connect(j),y.current=j,d(j),M.ondataavailable=A=>{A.data.size>0&&b.current.push(A.data)},M.onstop=()=>{const A=new Blob(b.current,{type:M.mimeType||C});f(A),v()},M.start(),o(!0),n(!1),w.current=setInterval(()=>{l(A=>A+1)},1e3)}catch{g("Microphone access denied or unavailable."),v()}},[v]),x=h.useCallback(()=>{m.current&&m.current.state!=="inactive"&&m.current.stop(),o(!1),n(!1),w.current&&(clearInterval(w.current),w.current=null)},[]),I=h.useCallback(()=>{m.current&&m.current.state==="recording"&&(m.current.pause(),n(!0),w.current&&(clearInterval(w.current),w.current=null))},[]),T=h.useCallback(()=>{m.current&&m.current.state==="paused"&&(m.current.resume(),n(!1),w.current||(w.current=setInterval(()=>{l(D=>D+1)},1e3)))},[]),W=h.useCallback(()=>{v(),o(!1),n(!1),f(null),l(0),g(null),b.current=[]},[v]);return h.useEffect(()=>()=>v(),[v]),{recording:e,paused:t,audioBlob:u,analyserNode:s,duration:a,error:c,startRecording:S,stopRecording:x,pauseRecording:I,resumeRecording:T,resetRecording:W}}function Jd(e){const{onAudio:o}=e,{recording:t,paused:n,audioBlob:a,analyserNode:l,duration:c,error:g,startRecording:s,stopRecording:d,pauseRecording:u,resumeRecording:f,resetRecording:m}=ya();return h.useEffect(()=>{if(a&&o){const y=new File([a],"recording.webm",{type:a.type||"audio/webm;codecs=opus"});o(y)}},[a,o]),{recording:t,paused:n,audioBlob:a,analyserNode:l,duration:c,error:g,startRecording:s,stopRecording:d,pauseRecording:u,resumeRecording:f,resetRecording:m,handleFileChange:y=>{var b;const k=(b=y.target.files)==null?void 0:b[0];k&&o&&o(k)}}}function Qd(e){const o=Jd(e);return r.jsx(Xd,{...e,...o})}const Zd=()=>{const[e,o]=h.useState(!1);return{imageError:e,setImageError:o}},Rd={xs:24,sm:32,md:44,lg:56,xl:72},Pt={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"}},e0=({src:e,size:o="md",fallback:t="IM",views:n,imageError:a,setImageError:l,onClick:c=()=>{},children:g})=>{const s=Rd[o],d={...Pt.image,...(n==null?void 0:n.image)||{}};return r.jsxs(i.Center,{"data-role":"avatar",width:s,height:s,...Pt.container,borderColor:a?"color-gray-400":"transparent",onClick:c,...n==null?void 0:n.container,children:[!a&&e?r.jsx(i.Image,{alt:"",src:e,style:d,width:s,height:s,onError:()=>l(!0)}):r.jsx(i.Text,{size:o,...Pt.fallback,...n==null?void 0:n.fallback,children:t}),g]})},ba=e=>{const o=Ce("avatar",e),{src:t,size:n,views:a,fallback:l,onClick:c,children:g}=o,{imageError:s,setImageError:d}=Zd();return r.jsx(e0,{src:t,size:n,views:a,fallback:l,imageError:s,setImageError:d,onClick:c,children:g})},o0={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"}},r0={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"}},t0={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"}},xa={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"}},n0={square:0,rounded:"8px",pill:"9999px"},a0={"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"}},l0=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)"}}),i0=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"}}}),ka=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"}}}),c0=h.memo(({content:e,children:o,icon:t,pastil:n,pastilContent:a,action:l,position:c,shape:g="pill",variant:s="filled",size:d="md",isAuto:u=!1,views:f,themeMode:m,backgroundColor:p,color:y,borderColor:k,...b})=>{const{themeMode:w}=i.useTheme(),C=m||w,v=h.useMemo(()=>i0()[s],[C,s]),S=h.useMemo(()=>l0(),[C]),x=h.useMemo(()=>ka(),[C]),I=a!=null,T=l!=null,W=I||T,D=o??e,P=D!=null,M=u&&typeof D=="string"&&/^(color|theme|light|dark)-/.test(D)?D:void 0,E=h.useMemo(()=>{const j={width:"fit-content",display:"flex",flexDirection:"row",alignItems:"center",justifyContent:"center",gap:"6px",borderRadius:n0[g],...o0[d],...v,...W?r0[d]:{},...W?S:{},...c?a0[c]:{},...f==null?void 0:f.container};return s!=="filled"&&!W&&(v.color!==void 0&&(j.color=v.color),v.borderColor!==void 0&&(j.borderColor=v.borderColor),v.backgroundColor!==void 0&&(j.backgroundColor=v.backgroundColor),v&&v.style&&(j.style={...j.style||{},...v.style})),T||b.onClick!==void 0||(delete j._hover,delete j._active),p!==void 0&&(j.backgroundColor=p,k===void 0&&(j.borderColor=p)),k!==void 0&&(j.borderColor=k),y!==void 0&&(j.color=y),M&&(j.backgroundColor=M,j.borderColor=M,j.color="color-white"),j},[T,b.onClick,p,y,k,g,d,s,v,W,S,c,M,f==null?void 0:f.container]);let F="currentColor";return typeof n=="string"?n in x?F=x[n].indicator.backgroundColor:F=n:n===!0&&(F="color-green-500",s==="filled"&&(F="color-white")),r.jsxs(i.Center,{"data-role":"badge",...E,...b,children:[t&&r.jsx(i.View,{"data-role":"badge-icon",...f==null?void 0:f.icon,children:t}),I&&r.jsx(i.Text,{"data-role":"badge-pastil-content",backgroundColor:"color-gray-900",borderRadius:"9999px",color:"color-white",fontWeight:"700",letterSpacing:0,textTransform:"uppercase",whiteSpace:"nowrap",...t0[d],...f==null?void 0:f.pastilContent,children:a}),n&&r.jsx(i.View,{"data-role":"badge-pastil",width:"6px",height:"6px",borderRadius:"50%",backgroundColor:F,...f==null?void 0:f.pastil}),P&&r.jsx(i.Text,{"data-role":"badge-text",color:W?"color-gray-900":E.color,fontWeight:W?"700":"600",textAlign:"center",letterSpacing:W?0:"0.02em",whiteSpace:"nowrap",...W?xa[d]:{},...f==null?void 0:f.text,children:D}),T&&r.jsx(i.Text,{"data-role":"badge-action",color:"color-gray-400",fontWeight:"500",letterSpacing:0,whiteSpace:"nowrap",...xa[d],...f==null?void 0:f.action,children:l})]})}),Ee=e=>{const o=Ce("badge",e);return r.jsx(c0,{...o})},s0={xs:12,sm:14,md:16,lg:18,xl:20},d0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Dt=h.forwardRef(({children:e,href:o,iconSize:t="sm",underline:n="default",isExternal:a=!1,views:l={},to:c,isHovered:g,setIsHovered:s,_hover:d,...u},f)=>r.jsxs(i.Element,{as:"a",ref:f,href:o,display:"inline-flex",gap:3,alignItems:"center",flexWrap:"nowrap",color:"inherit",textDecoration:n==="underline"?"underline":"none",_hover:n==="hover"?{textDecoration:"underline",...d}:d,...a?{target:"_blank",rel:"noopener noreferrer"}:{},...l.text,...u,children:[e,a&&r.jsx(ia,{widthHeight:s0[t]})]}));Dt.displayName="LinkAnchor";const Ca=h.forwardRef(({to:e="/",onClick:o,...t},n)=>{const a=kt.useHref(e),l=kt.useNavigate(),c=g=>{o==null||o(g),!(g.defaultPrevented||g.button!==0||t.target&&t.target!=="_self"||g.metaKey||g.altKey||g.ctrlKey||g.shiftKey)&&(g.preventDefault(),l(e))};return r.jsx(Dt,{...t,to:e,href:a,onClick:c,ref:n})});Ca.displayName="RouterLinkAnchor";const wa=h.forwardRef((e,o)=>{const t=kt.useInRouterContext(),{href:n,to:a="/",isExternal:l}=e;return t&&!l&&n==null&&!d0.test(a)?r.jsx(Ca,{...e,ref:o}):r.jsx(Dt,{...e,href:n??a,ref:o})});wa.displayName="LinkView";const Sa=h.forwardRef((e,o)=>r.jsx(wa,{ref:o,...e}));Sa.displayName="Link";const Hr=Sa,$t={xs:14,sm:18,md:22,lg:26,xl:30},Lt={fast:50,normal:100,slow:300},g0=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),h0=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),g=l(t,{themeMode:n||c}),s=typeof e=="number"?e:$t[e],[d,u]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{u(m=>m+45)},Lt[o]);return()=>clearInterval(f)},[o]),r.jsxs(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",width:`${s}px`,height:`${s}px`,viewBox:"0 0 24 24",fill:"none",stroke:g,strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round",style:{transform:`rotate(${d}deg)`},...a,children:[r.jsx("g",{id:"SVGRepo_bgCarrier",strokeWidth:"0"}),r.jsx("g",{id:"SVGRepo_tracerCarrier",strokeLinecap:"round",strokeLinejoin:"round"}),r.jsx("g",{id:"SVGRepo_iconCarrier",children:r.jsx("path",{d:"M21 12a9 9 0 11-6.219-8.56"})})]})},f0=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),g=l(t,{themeMode:n||c}),s=typeof e=="number"?e:$t[e],[d,u]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{u(m=>m+45)},Lt[o]);return()=>clearInterval(f)},[o]),r.jsxs(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${s}px`,height:`${s}px`,style:{transform:`rotate(${d}deg)`},...a,children:[r.jsx("circle",{cx:"10",cy:"25",r:"4",fill:g}),r.jsx("circle",{cx:"25",cy:"25",r:"4",fill:g}),r.jsx("circle",{cx:"40",cy:"25",r:"4",fill:g})]})},u0=({size:e="md",speed:o="normal",color:t="theme-loading",themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),g=l(t,{themeMode:n||c}),s=typeof e=="number"?e:$t[e],[d,u]=h.useState(0);return h.useEffect(()=>{const f=setInterval(()=>{u(m=>m+45)},Lt[o]);return()=>clearInterval(f)},[o]),r.jsx(i.View,{as:"svg",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 50 50",width:`${s}px`,height:`${s}px`,style:{transform:`rotate(${d}deg)`},...a,children:r.jsx("circle",{cx:"25",cy:"25",r:"20",fill:"none",stroke:g,strokeWidth:"5",strokeDasharray:"1,10"})})},m0=({size:e,children:o,textColor:t,loaderColor:n,type:a="default",speed:l="normal",textPosition:c="right",views:g,...s})=>{const{getColor:d}=i.useTheme(),u=p=>g0(p)?p:d(p||"theme-loading");n=u(n||s.color||"theme-loading"),t=u(t||s.color||"theme-loading");const f={size:e,speed:l,color:n},m={default:r.jsx(h0,{...f}),dotted:r.jsx(f0,{...f}),quarter:r.jsx(u0,{...f})};return r.jsxs(i.Center,{gap:10,flexDirection:c==="top"||c==="bottom"?"column":"row",...s,...g==null?void 0:g.container,children:[(c==="left"||c==="top")&&o&&r.jsx(i.View,{color:t,...g==null?void 0:g.text,children:o}),m[a],(c==="right"||c==="bottom")&&o&&r.jsx(i.View,{color:t,...g==null?void 0:g.text,children:o})]})},to=e=>{const o=Ce("loader",e);return r.jsx(m0,{...o})},p0=/^(color|theme|light|dark)-/,y0=e=>p0.test(e),b0=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},Ao=(e,o)=>y0(e)?`${b0(e)}-${o}`:`color-mix(in srgb, ${e} ${Math.round(o/10)}%, transparent)`,va={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"}},ar={square:0,rounded:8,pill:999},x0={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}},Ye=e=>/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,k0=(e,o,t=!1,n)=>{const a=t?o:e,l=t?e:o,c=t?o:e,s=(e==="theme-primary"||n&&e===n.primary)&&(n!=null&&n.onPrimary)?n.onPrimary:l,d=`0 0 0 2px ${Ye("color-white")}, 0 0 0 4px ${Ye(c)}`;return{filled:{backgroundColor:a,color:s,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:c,borderWidth:1,borderStyle:"solid",borderColor:Ao(c,t?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:c,borderWidth:1,borderStyle:"solid",borderColor:Ao(c,t?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:c,borderWidth:0,borderStyle:"solid",borderColor:c,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:c,borderWidth:0,borderStyle:"none",borderColor:c,minHeight:"auto",paddingHorizontal:"4px",paddingVertical:"10px",textDecoration:"underline",backgroundColor:"transparent",style:{textUnderlineOffset:"2px",textDecorationThickness:"1px",textDecorationColor:Ye(c)},_hover:{opacity:.8},_active:{opacity:.9},_focusVisible:{outline:"none",boxShadow:d},transition:"opacity 0.2s ease"},subtle:{backgroundColor:Ao(c,t?200:100),color:c,borderWidth:1,borderStyle:"solid",borderColor:Ao(c,t?400:250),_hover:{backgroundColor:Ao(c,t?300:180)},_active:{backgroundColor:Ao(c,t?380:240)},_focusVisible:{outline:"none",boxShadow:d},transition:"background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease"}}},C0=h.memo(({children:e,icon:o,leftIcon:t,rightIcon:n,isLoading:a,iconPosition:l="left",loaderPosition:c="left",size:g="md",resolvedTextColor:s,isIconRounded:d,loaderProps:u,views:f})=>{const m=["left","right"].includes(l)?i.Horizontal:i.Vertical,p=va[g];return r.jsxs(m,{gap:8,alignItems:"center",justifyContent:"center",fontSize:p.fontSize,fontWeight:p.fontWeight,lineHeight:p.lineHeight,letterSpacing:p.letterSpacing,whiteSpace:"nowrap",color:s,...f==null?void 0:f.content,children:[a&&c==="left"&&r.jsx(to,{size:g==="xs"||g==="sm"?"sm":"md",color:s,...u,...f==null?void 0:f.loader}),t&&r.jsx(i.View,{color:s,...f==null?void 0:f.icon,children:t}),o&&["left","top"].includes(l)&&!a&&r.jsx(i.View,{color:s,...f==null?void 0:f.icon,children:o}),e,o&&["right","bottom"].includes(l)&&!a&&r.jsx(i.View,{color:s,...f==null?void 0:f.icon,children:o}),n&&r.jsx(i.View,{color:s,...f==null?void 0:f.icon,children:n}),a&&c==="right"&&r.jsx(to,{size:g==="xs"||g==="sm"?"sm":"md",color:s,...u,...f==null?void 0:f.loader})]})}),w0=e=>{const o=ar[e];return typeof o=="number"?o:typeof o=="string"&&parseInt(o,10)||0},S0=({asComponent:e,isDisabled:o,isLoading:t,isWrapped:n=!1,borderRadius:a,width:l,height:c,baseStyles:g,sizeStyles:s,iconPad:d,mainTone:u,resolvedTextColor:f,children:m,borderWidth:p=0,...y})=>r.jsx(i.Element,{as:e,disabled:!!(o||t),display:n?"flex":"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:a,width:l,height:c,...g,...s,...d,backgroundColor:(g==null?void 0:g.backgroundColor)||(n?u:void 0),color:f,borderWidth:n?0:void 0,cursor:o?"default":"pointer",...y,children:m}),v0=({shape:e,isDisabled:o,onClick:t,shadow:n,borderWidth:a,isAuto:l,isFilled:c,views:g,children:s,...d})=>r.jsx(i.Element,{as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:ar[e],cursor:o?"default":"pointer",onClick:t,boxShadow:n,padding:a,width:c?"100%":l?"fit-content":void 0,...g==null?void 0:g.container,...d,children:s}),T0=({variant:e,animation:o,to:t,isDisabled:n,isLoading:a,isAuto:l,isFilled:c,isExternal:g,shape:s="rounded",shadow:d,onClick:u,views:f,baseStyles:m,sizeStyles:p,iconPad:y,containerRef:k,resolvedTextColor:b,content:w,size:C,mainTone:v,borderMovingDuration:S=2,borderMovingGradientColors:x=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:I="#705CFF",animatedStrokeTextColor:T="color-gray-900",...W})=>{var E;const D=w0(s),P=t?r.jsx(Hr,{to:t,isExternal:g,color:"currentColor",textDecoration:"inherit",_hover:{color:"currentColor"},...f==null?void 0:f.link,children:w}):w,M={isDisabled:n,isLoading:a,baseStyles:m,sizeStyles:p,iconPad:y,resolvedTextColor:b,mainTone:v,children:P};if(o==="borderMoving"&&x){const j={from:{backgroundPosition:"0% 50%"},to:{backgroundPosition:"200% 50%"},duration:`${S}s`,timingFunction:"linear",iterationCount:"infinite"};return r.jsx(v0,{shape:s,isDisabled:n,onClick:u,shadow:d,borderWidth:3,isAuto:l,isFilled:c,views:f,background:`linear-gradient(90deg, ${Ye(x[0])}, ${Ye(x[1])}, ${Ye(x[2])}, ${Ye(x[0])})`,backgroundSize:"200% 100%",animate:j,...W,children:r.jsx(S0,{asComponent:t?"div":"button",isWrapped:!0,borderRadius:Math.max(0,D-3),width:"100%",height:"100%",...M})})}if(o==="animatedStroke"){const F=Ye(I),j=Ye(T),A=1e3,V={from:{strokeWidth:"8px",strokeDasharray:`0 ${A}`,strokeDashoffset:-Math.round(A*.63)},to:{strokeWidth:"3px",strokeDasharray:`${A}`,strokeDashoffset:0},duration:"0.9s",timingFunction:"ease-in",fillMode:"forwards"},H=["group",(E=f==null?void 0:f.container)==null?void 0:E.className,W==null?void 0:W.className].filter(Boolean).join(" ");return r.jsxs(i.Element,{ref:k,as:t?"div":"button",type:t?void 0:"button",disabled:!!(!t&&(n||a)),onClick:u,position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",width:c?"100%":l?"fit-content":void 0,borderRadius:ar[s],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:j,backgroundColor:"transparent",borderWidth:0,...f==null?void 0:f.container,...W,className:H,children:[r.jsx(i.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:r.jsx(i.View,{as:"rect",x:"0",y:"0",height:"100%",width:"100%",rx:D,ry:D,fill:"transparent",stroke:F,strokeWidth:"8px",strokeDasharray:`0 ${A}`,strokeDashoffset:-Math.round(A*.63),pathLength:A,on:{groupHover:{animate:V}}})}),r.jsx(i.View,{position:"relative",zIndex:0,children:P})]})}if(o==="borderReveal"){const j=Ye((x==null?void 0:x[0])||v||"#000000"),V=S*.75/4,H=`linear-gradient(90deg, ${j} 50%, transparent 50%)`,O=`linear-gradient(180deg, ${j} 50%, transparent 50%)`,G=`linear-gradient(270deg, ${j} 50%, transparent 50%)`,U=`linear-gradient(0deg, ${j} 50%, transparent 50%)`,$="100% 0, 100% 100%, 0 100%, 0 0",_="0 0, 100% 0, 100% 100%, 0 100%",N=`0s, ${V}s, ${V*2}s, ${V*2}s`,Q=`${V*2}s, ${V*2}s, ${V}s, 0s`,B=4;return r.jsx(i.Element,{ref:k,as:"div",position:"relative",display:"inline-flex",alignItems:"center",justifyContent:"center",borderRadius:ar[s],cursor:n?"default":"pointer",onClick:u,boxShadow:d,padding:3,background:`
|
|
2
|
+
${H} no-repeat,
|
|
3
|
+
${O} no-repeat,
|
|
4
|
+
${G} no-repeat,
|
|
5
|
+
${U} no-repeat
|
|
6
|
+
`,backgroundSize:`200% ${B}px, ${B}px 200%, 200% ${B}px, ${B}px 200%`,backgroundPosition:$,transitionProperty:"background-position",transitionDuration:`${V}s`,transitionTimingFunction:"linear",transitionDelay:Q,_hover:{backgroundPosition:_,transitionDelay:N},width:c?"100%":l?"fit-content":void 0,...f==null?void 0:f.container,...W,children:r.jsx(i.View,{as:t?"div":"button",disabled:!!(n||a),display:"flex",alignItems:"center",justifyContent:"center",borderRadius:Math.max(0,D-3),width:"100%",height:"100%",...m,...p,...y,backgroundColor:(m==null?void 0:m.backgroundColor)||v,color:b,borderWidth:0,cursor:n?"default":"pointer",children:P})})}return r.jsx(i.Element,{ref:k,as:e==="link"&&t?"div":"button",type:e==="link"&&t?void 0:"button",disabled:!!(n||a),...p,...y,display:"inline-flex",alignItems:"center",justifyContent:"center",width:c?"100%":l?"fit-content":void 0,borderRadius:ar[s],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:u,...m,...f==null?void 0:f.container,...W,children:P})},I0=h.memo(h.forwardRef(({variant:e="filled",size:o="md",shape:t="rounded",iconPosition:n="left",loaderPosition:a="left",backgroundColor:l,color:c,textColor:g,explicitTextColor:s,reversed:d=!1,isAuto:u=!0,isFilled:f,isDisabled:m,isLoading:p,isIconRounded:y,isIcon:k,isHovered:b,icon:w,leftIcon:C,rightIcon:v,startIcon:S,endIcon:x,children:I,to:T,isExternal:W,shadow:D,onClick:P,views:M={},animation:E,loaderProps:F,config:j,ariaLabel:A,borderMovingDuration:V=2,borderMovingGradientColors:H=["#705CFF","#FF5C97","#FFC75C"],animatedStrokeAccentColor:O="#705CFF",animatedStrokeTextColor:G="color-gray-900",...U},$)=>{const N=m?"theme-disabled":p?"theme-loading":l??c??"theme-primary",Q=s??g??"color-white",{config:B}=Fr(),L=B==null?void 0:B.theme,X=h.useMemo(()=>{const ne=k0(N,Q,d,L);return j!=null&&j.variants&&Object.keys(j.variants).forEach(se=>{ne[se]&&(ne[se]=Ge(ne[se],j.variants[se]))}),ne},[N,Q,d,L,j==null?void 0:j.variants]),Z=X[e]??X.filled,ee=s?{...Z,color:s}:Z,ae=(ee==null?void 0:ee.color)??Q,re=r.jsx(C0,{icon:w,leftIcon:C??S,rightIcon:v??x,isLoading:p,iconPosition:n,loaderPosition:a,size:o,resolvedTextColor:ae,isIconRounded:y,loaderProps:F,views:M,children:I}),ie=va[o],R=y||k?x0[o]:{};return r.jsx(T0,{variant:e,animation:E,to:T,isDisabled:m,isLoading:p,isAuto:u,isFilled:f,isExternal:W,shape:t,shadow:D,onClick:P,views:M,baseStyles:ee,sizeStyles:ie,iconPad:R,resolvedTextColor:ae,content:re,size:o,mainTone:N,borderMovingDuration:V,borderMovingGradientColors:H,animatedStrokeAccentColor:O,animatedStrokeTextColor:G,containerRef:$,...A!==void 0?{"aria-label":A}:{},...U})})),me=e=>{const[o,t]=i.useHover(),n=Ce("button",e),a=e.textColor??(e.backgroundColor!=null&&e.color!=null?e.color:void 0);return r.jsx(I0,{isHovered:t,...n,explicitTextColor:a})},F0={sm:{padding:"12px"},md:{padding:"16px"},lg:{padding:"24px"}},z0={square:0,rounded:"8px",pill:"24px"},M0=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)"}}}},Vr=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}}),Ta=h.createContext({}),Bt=()=>h.useContext(Ta),_t=({children:e,views:o,style:t,themeMode:n,...a})=>{var d;const l=i.useTheme(),{styles:c}=Bt(),g=Vr(l).header,s={...g,...c==null?void 0:c.header,...a,style:{...g==null?void 0:g.style,...(d=c==null?void 0:c.header)==null?void 0:d.style,...t}};return r.jsx(i.Vertical,{gap:8,...s,children:e})},Ot=({children:e,views:o,style:t,themeMode:n,...a})=>{var d;const l=i.useTheme(),{styles:c}=Bt(),g=Vr(l).content,s={...g,...c==null?void 0:c.content,...a,style:{...g==null?void 0:g.style,...(d=c==null?void 0:c.content)==null?void 0:d.style,...t}};return r.jsx(i.Vertical,{gap:12,...s,children:e})},Nt=({children:e,views:o,style:t,themeMode:n,...a})=>{var d;const l=i.useTheme(),{styles:c}=Bt(),g=Vr(l).footer,s={...g,...c==null?void 0:c.footer,...a,style:{...g==null?void 0:g.style,...(d=c==null?void 0:c.footer)==null?void 0:d.style,...t}};return r.jsx(i.Vertical,{gap:8,...s,children:e})},j0=({variant:e="default",size:o="md",shape:t="rounded",children:n,header:a,footer:l,isFullWidth:c=!1,views:g,style:s,themeMode:d,config:u,...f})=>{var x,I;const m=i.useTheme(),p=Vr(m),y=((x=F0[o])==null?void 0:x.padding)||"16px",k=h.useMemo(()=>({styles:{container:{...p.container,borderRadius:z0[t],...g==null?void 0:g.container},header:{...p.header,padding:y,...g==null?void 0:g.header},content:{...p.content,padding:y,...g==null?void 0:g.content},footer:{...p.footer,padding:y,...g==null?void 0:g.footer}}}),[p,g,y,t]),b=h.Children.toArray(n).some(T=>h.isValidElement(T)&&(T.type===_t||T.type===Ot||T.type===Nt)),{themeMode:w}=m,v=M0(d||w)[e],S={width:c?"100%":"auto",overflow:"hidden",...v,...k.styles.container,...f,style:{...(I=k.styles.container)==null?void 0:I.style,...s}};return r.jsx(Ta.Provider,{value:k,children:r.jsx(i.View,{...S,children:b?n:r.jsxs(i.Vertical,{width:"100%",children:[a&&r.jsx(_t,{children:a}),r.jsx(Ot,{children:n}),l&&r.jsx(Nt,{children:l})]})})})},ze=e=>{const o=Ce("card",e);return r.jsx(j0,{...o})};ze.Header=_t,ze.Content=Ot,ze.Footer=Nt;const W0=({defaultActiveIndex:e=0,activeIndex:o,onChange:t,autoPlay:n=!1,autoPlayInterval:a=3e3,pauseOnHover:l=!0,infinite:c=!0,totalSlides:g,stepIndices:s})=>{const d=h.useRef(g||0),[u,f]=h.useState(g||0),m=h.useRef(new Set),p=h.useRef(0),y=h.useMemo(()=>zo("carousel-content"),[]),[k,b]=h.useState(o!==void 0?o:e),[w,C]=h.useState(!1),[v,S]=h.useState(!1),[x,I]=h.useState(0),[T,W]=h.useState(0),D=h.useRef(null);h.useEffect(()=>{o!==void 0&&b(o)},[o]);const P=h.useCallback(_=>{let N=_;c?_<0?N=u-1:_>=u&&(N=0):N=Math.max(0,Math.min(_,u-1)),s&&s.length>0&&(s.includes(N)||(N=s.reduce((B,L)=>Math.abs(L-N)<Math.abs(B-N)?L:B))),o===void 0&&b(N),t&&t(N)},[o,c,t,u]),M=h.useCallback(()=>{P(k+1)},[k,P]),E=h.useCallback(()=>{P(k-1)},[k,P]);h.useEffect(()=>(n&&!w&&!v&&(D.current=setInterval(()=>{M()},a)),()=>{D.current&&clearInterval(D.current)}),[n,a,w,v,M,l]);const F=h.useCallback(()=>{l&&C(!0)},[l]),j=h.useCallback(()=>{C(!1)},[]),A=h.useCallback(_=>{S(!0),"touches"in _?(I(_.touches[0].clientX),W(_.touches[0].clientY)):(I(_.clientX),W(_.clientY))},[]),V=h.useCallback(_=>{if(!v)return;let N,Q;"touches"in _?(N=_.touches[0].clientX,Q=_.touches[0].clientY):(N=_.clientX,Q=_.clientY);const B=N-x,L=Q-T;Math.abs(B)>Math.abs(L)&&Math.abs(B)>50&&(B>0?E():M(),S(!1))},[v,x,T,M,E]),H=h.useCallback(()=>{S(!1)},[]),O=h.useCallback(()=>{const _=p.current++;m.current.add(_);const N=m.current.size;return d.current=N,f(N),_},[]),G=h.useCallback(_=>{m.current.delete(_);const N=m.current.size;if(d.current=N,f(N),N>0&&k>=N){const Q=Math.max(0,N-1);o===void 0&&b(Q),t&&t(Q)}},[k,o,t]),U=c||k>0,$=c||k<u-1;return{activeIndex:k,totalSlides:u,goToSlide:P,nextSlide:M,prevSlide:E,canGoNext:$,canGoPrevious:U,handleMouseEnter:F,handleMouseLeave:j,handleDragStart:A,handleDragMove:V,handleDragEnd:H,registerSlide:O,unregisterSlide:G,contentId:y,infinite:c}},E0={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"}},A0={dot:{backgroundColor:"theme-primary"},line:{backgroundColor:"theme-primary"},number:{backgroundColor:"theme-primary",color:"color-white"}},Pr={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"}},lr=()=>({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,...Pr},nextButton:{position:"absolute",top:"50%",right:"16px",transform:"translateY(-50%)",zIndex:10,...Pr}}),Ia=h.createContext(null),Dr=()=>{const e=h.useContext(Ia);if(!e)throw new Error("Carousel compound components must be used within <Carousel>");return e},Fa=({children:e,isActive:o,index:t,views:n,...a})=>r.jsx(i.View,{flexShrink:0,width:"100%",height:"100%",display:o?"block":"none",...n,...a,children:e}),za=({views:e,children:o,...t})=>{const{goToPrevious:n,canGoPrevious:a,styles:l}=Dr(),g={...lr().prevButton,...l==null?void 0:l.prevButton,...e==null?void 0:e.prevButton};return r.jsx(me,{"aria-label":"Previous slide",onClick:()=>n(),isDisabled:!a,...g,...t,children:o??r.jsx(ye,{orientation:"left",widthHeight:16})})},Ma=({views:e,children:o,...t})=>{const{goToNext:n,canGoNext:a,styles:l}=Dr(),g={...lr().nextButton,...l==null?void 0:l.nextButton,...e==null?void 0:e.nextButton};return r.jsx(me,{"aria-label":"Next slide",onClick:()=>n(),isDisabled:!a,...g,...t,children:o??r.jsx(ye,{orientation:"right",widthHeight:16})})},ja=({children:e,views:o,...t})=>{const{registerSlide:n,unregisterSlide:a,styles:l}=Dr(),c=h.useRef(null);h.useEffect(()=>{const d=n();return c.current=d,()=>{c.current!==null&&a(c.current)}},[n,a]);const s={...lr().item,...l==null?void 0:l.item,...o==null?void 0:o.item};return r.jsx(i.View,{role:"group","aria-roledescription":"slide",...s,...t,children:e})},Wa=({children:e,views:o,style:t,...n})=>{const{currentIndex:a,styles:l,contentId:c}=Dr(),g=lr(),s={...g.content,...l==null?void 0:l.content,...o==null?void 0:o.content},d={...g.innerContainer,...l==null?void 0:l.innerContainer,...o==null?void 0:o.innerContainer},u=`-${a*100}%`;return r.jsx(i.View,{...s,...n,style:{...s==null?void 0:s.style,...t},id:c,"aria-live":"polite",children:r.jsx(i.View,{...d,style:{...d==null?void 0:d.style,transform:`translateX(${u})`},children:e})})},H0=({children:e,defaultActiveIndex:o=0,activeIndex:t,onChange:n,showNavigation:a=!0,navigationPosition:l="inside",prevButton:c,nextButton:g,showIndicators:s=!0,indicatorPosition:d="bottom",indicatorVariant:u="dot",autoPlay:f=!1,autoPlayInterval:m=3e3,pauseOnHover:p=!0,infinite:y=!0,direction:k="horizontal",transitionDuration:b=300,views:w,stepIndices:C,themeMode:v,...S})=>{const x=h.useMemo(()=>h.Children.toArray(e),[e]),I=W0({defaultActiveIndex:o,activeIndex:t,onChange:n,autoPlay:f,autoPlayInterval:m,pauseOnHover:p,infinite:y,totalSlides:x.length}),{activeIndex:T,totalSlides:W,goToSlide:D,nextSlide:P,prevSlide:M,handleMouseEnter:E,handleMouseLeave:F,handleDragStart:j,handleDragMove:A,handleDragEnd:V}=I,H=()=>{if(!a)return null;const U=c||r.jsx(i.View,{as:"button","aria-label":"Previous slide",...Pr,...w==null?void 0:w.prevButton,children:"❮"}),$=g||r.jsx(i.View,{as:"button","aria-label":"Next slide",...Pr,...w==null?void 0:w.nextButton,children:"❯"});return r.jsxs(r.Fragment,{children:[r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",left:l==="inside"?"10px":"-40px",onClick:M,cursor:!y&&T===0?"not-allowed":"pointer",opacity:!y&&T===0?.5:1,children:U}),r.jsx(i.View,{position:"absolute",top:"50%",transform:"translateY(-50%)",right:l==="inside"?"10px":"-40px",onClick:P,cursor:!y&&T===x.length-1?"not-allowed":"pointer",opacity:!y&&T===x.length-1?.5:1,children:$})]})},O=()=>s?r.jsx(i.Horizontal,{position:"absolute",left:"0",right:"0",justifyContent:"center",...d==="top"?{top:"10px"}:{bottom:"10px"},...w==null?void 0:w.indicators,children:x.map((U,$)=>r.jsx(i.View,{onClick:()=>D($),cursor:"pointer",...E0[u],...$===T?{...A0[u]}:{},...w==null?void 0:w.indicator,...$===T?w==null?void 0:w.activeIndicator:{},children:u==="number"&&$+1},$))}):null;return h.useMemo(()=>h.Children.toArray(e).some(U=>h.isValidElement(U)&&(U.type===Wa||U.type===ja||U.type===za||U.type===Ma)),[e])?r.jsx(Ia.Provider,{value:{currentIndex:T,totalSlides:W,goToSlide:D,goToNext:P,goToPrevious:M,canGoNext:I.canGoNext,canGoPrevious:I.canGoPrevious,registerSlide:I.registerSlide,unregisterSlide:I.unregisterSlide,styles:{...lr(),...w},contentId:I.contentId,infinite:y},children:r.jsx(i.View,{role:"region","aria-roledescription":"carousel","aria-label":"Carousel",position:"relative",width:"100%",height:"100%",overflow:"hidden",...w==null?void 0:w.container,...S,children:e})}):r.jsxs(i.View,{position:"relative",width:"100%",height:"100%",overflow:"hidden",onMouseEnter:E,onMouseLeave:F,onTouchStart:j,onTouchMove:A,onTouchEnd:V,onMouseDown:j,onMouseMove:A,onMouseUp:V,...w==null?void 0:w.container,...S,children:[r.jsx(i.View,{width:"100%",height:"100%",position:"relative",...w==null?void 0:w.slideWrapper,children:x.map((U,$)=>r.jsx(Fa,{isActive:$===T,index:$,views:w==null?void 0:w.slide,children:U},$))}),H(),O()]})},Ne=e=>r.jsx(H0,{...e});Ne.Slide=Fa,Ne.Content=Wa,Ne.Item=ja,Ne.Previous=za,Ne.Next=Ma;const qe={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"},Ea=[qe.blue,qe.green,qe.purple,qe.orange,qe.red,qe.teal,qe.pink,qe.indigo,qe.yellow,qe.cyan],Ho=Ea,V0={width:"100%",height:"100%",position:"relative",display:"flex",flexDirection:"column"},P0={fontSize:"18px",fontWeight:"700",marginBottom:"24px",textAlign:"center",color:"color-gray-900"},D0={display:"flex",flexWrap:"wrap",justifyContent:"flex-start",marginTop:"16px",gap:"12px"},$0={display:"flex",alignItems:"center",padding:"4px 8px",borderRadius:"6px",cursor:"pointer",transition:"background-color 0.2s ease",_hover:{backgroundColor:"color-gray-50"}},L0={width:"10px",height:"10px",borderRadius:"50%",marginRight:"8px"},B0={fontSize:"13px",fontWeight:"500",color:"color-gray-600"},$r={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},Aa={stroke:"color-gray-100",strokeWidth:"1px",strokeDasharray:"4 4"},Lr={stroke:"color-gray-200",strokeWidth:"1px"},Br={fontSize:"12px",fill:"color-gray-500",fontWeight:"500"},_0={rx:"4px",ry:"4px",cursor:"pointer",transition:"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",_hover:{filter:"brightness(1.1)"}},O0={strokeWidth:"3px",fill:"none",strokeLinecap:"round",strokeLinejoin:"round",transition:"stroke-width 0.2s ease"},N0={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"}},_r={strokeWidth:"2px",stroke:"color-white",cursor:"pointer",transition:"all 0.3s ease",_hover:{transform:"scale(1.02)"}},qt={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"},q0={...qt},U0={...qt,backgroundColor:"rgba(254, 242, 242, 0.8)",color:"color-red-600"},G0={...qt,backgroundColor:"rgba(249, 250, 251, 0.8)",color:"color-gray-500"},Y0=({data:e,dataPoints:o,animated:t=!0,animationDuration:n=500,showTooltips:a=!0})=>{const[l,c]=h.useState(t?0:1),[g,s]=h.useState({visible:!1,x:0,y:0,content:null}),d=h.useRef(null),u=h.useRef(null);h.useEffect(()=>{if(!t){c(1);return}const C=Date.now(),v=()=>{const S=Date.now()-C,x=Math.min(S/n,1);c(x),x<1&&(d.current=requestAnimationFrame(v))};return d.current=requestAnimationFrame(v),()=>{d.current&&cancelAnimationFrame(d.current)}},[t,n]);const[f,m]=h.useState(new Set),p=h.useCallback(C=>{m(v=>{const S=new Set(v);return S.has(C)?S.delete(C):S.add(C),S})},[]),y=h.useCallback(()=>e?{...e,series:e.series.map((C,v)=>({...C,color:C.color||Ho[v%Ho.length],hidden:f.has(C.name)}))}:o?o.map((C,v)=>({...C,color:C.color||Ho[v%Ho.length],hidden:f.has(C.label)})):null,[e,o,f]),k=h.useCallback((C,v,S)=>{a&&s({visible:!0,x:C,y:v,content:S})},[a]),b=h.useCallback(()=>{s(C=>({...C,visible:!1}))},[]),w=h.useCallback(()=>{if(!u.current)return{width:0,height:0};const{width:C,height:v}=u.current.getBoundingClientRect();return{width:C,height:v}},[]);return{animationProgress:l,tooltip:g,containerRef:u,processedData:y,showTooltip:k,hideTooltip:b,getChartDimensions:w,toggleSeries:p}},K0=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onBarClick:l,showTooltip:c,hideTooltip:g,views:s})=>{const{getColor:d}=i.useTheme(),u={top:20,right:20,bottom:40,left:50},f=o-u.left-u.right,m=t-u.top-u.bottom,p=h.useMemo(()=>{let x=0;return e.series.forEach(I=>{I.data.forEach(T=>{x=Math.max(x,T)})}),x},[e]),y=e.labels.length,k=e.series.length,b=f/y,w=b*.8/k,C=b*.2/(k+1),v=p||10,S=h.useMemo(()=>{const I=[];for(let T=0;T<=5;T++){const W=v/5*T;I.push(W)}return I},[p]);return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((x,I)=>{const T=x.color?d(x.color):"black";return r.jsxs("linearGradient",{id:`bar-gradient-${I}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:T,stopOpacity:1}),r.jsx("stop",{offset:"100%",stopColor:T,stopOpacity:.7})]},`bar-gradient-${I}`)})}),r.jsx("line",{x1:u.left,y1:t-u.bottom,x2:o-u.right,y2:t-u.bottom,...Lr,...s==null?void 0:s.axis}),r.jsx("line",{x1:u.left,y1:u.top,x2:u.left,y2:t-u.bottom,...Lr,...s==null?void 0:s.axis}),e.labels.map((x,I)=>{const T=u.left+(I+.5)*b,W=t-u.bottom+20;return r.jsx("text",{x:T,y:W,textAnchor:"middle",...Br,...s==null?void 0:s.axisLabel,children:x},`x-label-${I}`)}),S.map((x,I)=>{const T=t-u.bottom-x/v*m;return r.jsxs(h.Fragment,{children:[r.jsx("text",{x:u.left-10,y:T,textAnchor:"end",dominantBaseline:"middle",...Br,...s==null?void 0:s.axisLabel,children:x.toFixed(0)}),a&&r.jsx("line",{x1:u.left,y1:T,x2:o-u.right,y2:T,...Aa,...s==null?void 0:s.grid})]},`y-tick-${I}`)}),e.series.map((x,I)=>x.hidden?null:r.jsx(h.Fragment,{children:x.data.map((T,W)=>{const D=T/v*m*n,P=u.left+W*b+C*(I+1)+w*I,M=t-u.bottom-D,E=e.labels[W],F=e.series.reduce((O,G)=>{const U=G.data[W];return O+(typeof U=="number"?U:0)},0),j=F>0?(T/F*100).toFixed(1):null,A=x.color?d(x.color):"black",V=O=>{const G=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"180px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:x.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:A})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:E}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:T.toLocaleString()})]}),j!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${j}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:F.toLocaleString()})]})]})]}),U=O.currentTarget.getBoundingClientRect(),$=U.left+U.width/2,_=U.top;c($,_,G)},H=()=>{l&&l(x.name,W)};return r.jsx("rect",{x:P,y:M,width:w,height:D,fill:`url(#bar-gradient-${I})`,onMouseEnter:V,onMouseMove:V,onMouseLeave:g,onClick:H,..._0,...s==null?void 0:s.bar},`bar-${I}-${W}`)})},`series-${I}`))]})},X0=({data:e,width:o,height:t,animationProgress:n,showGrid:a=!0,onPointClick:l,showTooltip:c,hideTooltip:g,views:s})=>{const{getColor:d}=i.useTheme(),u={top:20,right:20,bottom:40,left:40},f=o-u.left-u.right,m=t-u.top-u.bottom,p=h.useMemo(()=>{let C=0;return e.series.forEach(v=>{v.data.forEach(S=>{C=Math.max(C,S)})}),C},[e]),y=p||10,k=h.useMemo(()=>{const v=[];for(let S=0;S<=5;S++){const x=y/5*S;v.push(x)}return v},[p]),b=C=>{if(C.length<2)return"";const v=C.map((x,I)=>({x:u.left+I/(e.labels.length-1)*f,y:t-u.bottom-x/y*m*n}));let S=`M ${v[0].x},${v[0].y}`;for(let x=0;x<v.length-1;x++){const I=v[x===0?x:x-1],T=v[x],W=v[x+1],D=v[x+2===v.length?x+1:x+2],P=T.x+(W.x-I.x)/6,M=T.y+(W.y-I.y)/6,E=W.x-(D.x-T.x)/6,F=W.y-(D.y-T.y)/6;S+=` C ${P},${M} ${E},${F} ${W.x},${W.y}`}return S},w=C=>{if(C.length<2)return"";const v=b(C),S=u.left,x=u.left+f,I=t-u.bottom;return`${v} L ${x},${I} L ${S},${I} Z`};return r.jsxs("svg",{width:o,height:t,children:[r.jsx("defs",{children:e.series.map((C,v)=>{const S=C.color?d(C.color):"black";return r.jsxs("linearGradient",{id:`gradient-${v}`,x1:"0%",y1:"0%",x2:"0%",y2:"100%",children:[r.jsx("stop",{offset:"0%",stopColor:S,stopOpacity:.3}),r.jsx("stop",{offset:"100%",stopColor:S,stopOpacity:0})]},`gradient-${v}`)})}),r.jsx("line",{x1:u.left,y1:t-u.bottom,x2:o-u.right,y2:t-u.bottom,...Lr,...s==null?void 0:s.axis}),r.jsx("line",{x1:u.left,y1:u.top,x2:u.left,y2:t-u.bottom,...Lr,...s==null?void 0:s.axis}),e.labels.map((C,v)=>{const S=u.left+v/(e.labels.length-1)*f,x=t-u.bottom+20;return r.jsx("text",{x:S,y:x,textAnchor:"middle",...Br,...s==null?void 0:s.axisLabel,children:C},`x-label-${v}`)}),k.map((C,v)=>{const S=t-u.bottom-C/y*m;return r.jsxs(h.Fragment,{children:[r.jsx("text",{x:u.left-10,y:S,textAnchor:"end",dominantBaseline:"middle",...Br,...s==null?void 0:s.axisLabel,children:C.toFixed(0)}),a&&r.jsx("line",{x1:u.left,y1:S,x2:o-u.right,y2:S,...Aa,...s==null?void 0:s.grid})]},`y-tick-${v}`)}),e.series.map((C,v)=>{if(C.hidden)return null;const S=C.color?d(C.color):"black";return r.jsxs(h.Fragment,{children:[r.jsx("path",{d:w(C.data),fill:`url(#gradient-${v})`,...s==null?void 0:s.area}),r.jsx("path",{d:b(C.data),stroke:S,...O0,...s==null?void 0:s.line}),C.data.map((x,I)=>{const T=u.left+I/(e.labels.length-1)*f,W=t-u.bottom-x/y*m*n,D=e.labels[I],P=e.series.reduce((H,O)=>{const G=O.data[I];return H+(typeof G=="number"?G:0)},0),M=P>0?(x/P*100).toFixed(1):null,E=I>0&&typeof C.data[I-1]=="number"?C.data[I-1]:null,F=typeof E=="number"?x-E:null,j=typeof F=="number"?`${F>=0?"+":""}${F.toLocaleString()}`:null,A=H=>{const O=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:C.name}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:S})]}),r.jsx(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:D}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:x.toLocaleString()})]}),j!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Change"}),r.jsx(i.Text,{fontWeight:"medium",children:j})]}),M!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:`${M}%`})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Category total"}),r.jsx(i.Text,{fontWeight:"medium",children:P.toLocaleString()})]})]})]}),G=H.currentTarget.getBoundingClientRect(),U=G.left+G.width/2,$=G.top+G.height/2;c(U,$,O)},V=()=>{l&&l(C.name,I)};return r.jsx("circle",{cx:T,cy:W,fill:S,onMouseEnter:A,onMouseMove:A,onMouseLeave:g,onClick:V,...N0,...s==null?void 0:s.point},`point-${v}-${I}`)})]},`series-${v}`)})]})},J0=({dataPoints:e,width:o,height:t,animationProgress:n,isDonut:a=!1,onSliceClick:l,showTooltip:c,hideTooltip:g,views:s})=>{const{getColor:d}=i.useTheme(),{ref:u,relation:f}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),m=h.useRef(null);h.useEffect(()=>{m.current&&u&&(u.current=m.current)},[m,u]);const y=Math.min(o,t)/2*.8,k=o/2,b=t/2,w=a?y*.6:0,C=h.useMemo(()=>e.filter(x=>!x.hidden),[e]),v=h.useMemo(()=>C.reduce((x,I)=>x+I.value,0),[C]),S=h.useMemo(()=>{if(v===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-w}`,`A ${w} ${w} 0 1 0 ${k} ${b+w}`,`A ${w} ${w} 0 1 0 ${k} ${b-w}`,"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 x=[];let I=-Math.PI/2;for(let T=0;T<C.length;T++){const D=C[T].value/v,P=D*2*Math.PI*n,E=Math.max(0,P-.02),F=I+E,j=k+Math.cos(I)*y,A=b+Math.sin(I)*y,V=k+Math.cos(F)*y,H=b+Math.sin(F)*y,O=k+Math.cos(I)*w,G=b+Math.sin(I)*w,U=k+Math.cos(F)*w,$=b+Math.sin(F)*w,_=E>Math.PI?1:0;let N;a?N=[`M ${j} ${A}`,`A ${y} ${y} 0 ${_} 1 ${V} ${H}`,`L ${U} ${$}`,`A ${w} ${w} 0 ${_} 0 ${O} ${G}`,"Z"].join(" "):N=[`M ${k} ${b}`,`L ${j} ${A}`,`A ${y} ${y} 0 ${_} 1 ${V} ${H}`,"Z"].join(" ");const Q=I+E/2,B=a?(y+w)/2:y*.7,L=k+Math.cos(Q)*B,X=b+Math.sin(Q)*B,Z=`${(D*100).toFixed(1)}%`,ee=C[T].color||Ho[T%Ho.length],ae=d(ee);x.push({path:N,color:ae,label:C[T].label,value:C[T].value,percentage:Z,labelX:L,labelY:X,startAngle:I,endAngle:F,index:T,originalIndex:e.findIndex(re=>re.label===C[T].label)}),I=F}return x},[C,v,y,k,b,w,n,a,e]);return r.jsxs("svg",{ref:m,width:o,height:t,style:{overflow:"visible"},children:[a&&r.jsxs("g",{pointerEvents:"none",children:[r.jsx("circle",{cx:k,cy:b,r:w,fill:"white"}),r.jsx("text",{x:k,y:b-8,textAnchor:"middle",dominantBaseline:"middle",fontSize:"14px",fontWeight:"500",fill:"color-gray-500",children:"Total"}),r.jsx("text",{x:k,y:b+12,textAnchor:"middle",dominantBaseline:"middle",fontSize:"20px",fontWeight:"800",fill:"color-gray-900",children:v.toLocaleString()})]}),S.map((x,I)=>{const T=P=>{const M=v>0?x.value/v*100:0,E=v>0?Math.max(0,100-M):null,F=r.jsxs(i.View,{display:"flex",flexDirection:"column",minWidth:"200px",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"semibold",children:x.label}),r.jsx(i.View,{width:"12px",height:"12px",borderRadius:"2px",backgroundColor:x.color})]}),r.jsxs(i.Text,{marginTop:"4px",color:"color-gray-500",fontSize:"12px",children:["Slice ",x.index+1," of ",C.length]}),r.jsxs(i.View,{marginTop:"8px",display:"flex",flexDirection:"column",children:[r.jsxs(i.View,{display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Value"}),r.jsx(i.Text,{fontWeight:"medium",children:x.value.toLocaleString()})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Share"}),r.jsx(i.Text,{fontWeight:"medium",children:x.percentage})]}),r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Total"}),r.jsx(i.Text,{fontWeight:"medium",children:v.toLocaleString()})]}),E!==null&&r.jsxs(i.View,{marginTop:"4px",display:"flex",justifyContent:"space-between",children:[r.jsx(i.Text,{color:"color-gray-500",children:"Remaining"}),r.jsx(i.Text,{fontWeight:"medium",children:`${E.toFixed(1)}%`})]})]})]});let j=P.clientX,A=P.clientY;if(m.current){const V=m.current.getBoundingClientRect();j=V.left+x.labelX,A=V.top+x.labelY}c(j,A,F)},W=()=>{x.index!==-1&&l&&l(e[x.index],x.index)},D=x.index===-1;return r.jsxs("g",{children:[r.jsx("path",{d:x.path,fill:x.color,onMouseEnter:D?void 0:T,onMouseMove:D?void 0:T,onMouseLeave:D?void 0:g,onClick:W,..._r,style:{..._r==null?void 0:_r.style,cursor:D?"default":"pointer"},...s==null?void 0:s.pie}),!D&&x.endAngle-x.startAngle>.25&&r.jsx("text",{x:x.labelX,y:x.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:x.percentage})]},`slice-${I}`)})]})},Q0=({visible:e,x:o,y:t,content:n,maxDistance:a=100,views:l})=>{const c=h.useRef(null),[g,s]=h.useState({left:0,top:0});return h.useEffect(()=>{if(!e||!c.current||typeof window>"u"||typeof c.current.getBoundingClientRect!="function")return;const u=c.current.getBoundingClientRect(),f=u.width||200,m=u.height||100,p=20,y=16;let k=o-f/2,b=t-m-p;b<y&&(b=t+p),k+f>window.innerWidth-y?k=window.innerWidth-f-y:k<y&&(k=y),b=Math.max(y,Math.min(b,window.innerHeight-m-y)),s({left:k,top:b})},[e,o,t]),e?r.jsx(i.View,{ref:c,position:"fixed",left:`${g.left}px`,top:`${g.top}px`,...$r,...l==null?void 0:l.tooltip,style:{...$r==null?void 0:$r.style,pointerEvents:"none",transition:"all 0.1s ease-out"},children:n}):null},Z0=({type:e,data:o,dataPoints:t,title:n,showLegend:a=!0,legendPosition:l="bottom",showGrid:c=!0,showTooltips:g=!0,animated:s=!0,animationDuration:d=500,responsive:u=!0,aspectRatio:f=16/9,width:m=200,height:p=200,views:y,onDataPointClick:k,onSeriesClick:b,isLoading:w=!1,error:C,noData:v,loadingIndicator:S,errorIndicator:x,noDataIndicator:I,"aria-label":T,themeMode:W,...D})=>{const{animationProgress:P,tooltip:M,containerRef:E,processedData:F,showTooltip:j,hideTooltip:A,getChartDimensions:V,toggleSeries:H}=Y0({data:o,dataPoints:t,animated:s,animationDuration:d,showTooltips:g}),O=F(),{width:G,height:U}=V(),$=m||G,_=p||(u?G/f:U),N=()=>{if(!a||!O)return null;let ae=[];return e==="pie"||e==="donut"?Array.isArray(O)&&(ae=O):O&&O.series&&(ae=O.series),!ae||ae.length===0?null:r.jsx(i.Horizontal,{flexWrap:"wrap",justifyContent:"flex-start",marginTop:l==="bottom"?"16px":0,marginBottom:l==="top"?"16px":0,...D0,...y==null?void 0:y.legend,children:ae.map((re,ie)=>{const R=re.hidden,ne=re.name||re.label;return r.jsxs(i.View,{...$0,onClick:()=>H(ne),opacity:R?.4:1,...y==null?void 0:y.legendItem,children:[r.jsx(i.View,{backgroundColor:re.color,...L0,opacity:R?.3:1}),r.jsx(i.Text,{...B0,textDecoration:R?"line-through":"none",children:ne})]},`legend-${ie}`)})})},Q=()=>{if(!O)return null;switch(e){case"bar":return r.jsx(K0,{data:O,width:$,height:_,animationProgress:P,showGrid:c,onBarClick:b,showTooltip:j,hideTooltip:A,views:y});case"line":case"area":return r.jsx(X0,{data:O,width:$,height:_,animationProgress:P,showGrid:c,onPointClick:b,showTooltip:j,hideTooltip:A,views:y});case"pie":case"donut":return r.jsx(J0,{dataPoints:O,width:$,height:_,animationProgress:P,isDonut:e==="donut",onSliceClick:k,showTooltip:j,hideTooltip:A,views:y});default:return null}},B=()=>w?r.jsx(i.View,{...q0,...y==null?void 0:y.loadingOverlay,children:S||r.jsx(i.Center,{children:r.jsx(to,{size:"lg"})})}):null,L=()=>C?r.jsx(i.View,{...U0,...y==null?void 0:y.errorOverlay,children:x||r.jsx(i.Text,{fontWeight:"medium",children:typeof C=="string"?C:"An error occurred"})}):null,X=()=>v?r.jsx(i.View,{...G0,...y==null?void 0:y.noDataOverlay,children:I||r.jsx(i.Text,{children:typeof v=="string"?v:"No data available"})}):null,Z=T??(typeof n=="string"?n:"Chart"),ee=!C&&!w&&!v;return r.jsxs(i.View,{ref:E,role:"region","aria-label":Z,"aria-busy":w,...V0,...y==null?void 0:y.container,...D,children:[n&&r.jsx(i.Text,{...P0,children:n}),ee&&l==="top"&&N(),r.jsxs(i.View,{flex:1,width:"100%",position:"relative",...y==null?void 0:y.chart,children:[ee&&Q(),B(),L(),X(),r.jsx(Q0,{visible:g&&M.visible,x:M.x,y:M.y,content:M.content,maxDistance:100,views:y})]}),ee&&l==="bottom"&&N()]})},R0=e=>r.jsx(Z0,{...e}),eg=(e=365)=>{const[o,t]=h.useState(!1),[n,a]=h.useState(null),l="app-studio-cookie-consent";h.useEffect(()=>{if(typeof localStorage>"u")return;const d=localStorage.getItem(l);a(d!==null?d==="true":!1)},[]);const c=d=>{if(typeof localStorage<"u"){localStorage.setItem(l,String(d));const u=new Date;u.setDate(u.getDate()+e),localStorage.setItem(`${l}-expires`,u.toISOString())}a(d)};return{isHovered:o,setIsHovered:t,hasConsent:n,acceptCookies:()=>{c(!0)},resetConsent:()=>{typeof localStorage<"u"&&(localStorage.removeItem(l),localStorage.removeItem(`${l}-expires`)),a(!1)}}},og=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"}}}),rg=({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:t="Accepter",customizeButtonText:n="Personnaliser",position:a="bottom",variant:l="default",onAccept:c,onCustomize:g,views:s,showCustomizeButton:d=!0,cookieExpiration:u=365,themeMode:f,...m})=>{const{themeMode:p}=i.useTheme(),{hasConsent:y,acceptCookies:k}=eg(u),w=og()[l];if(y)return null;const C=()=>{k(),c&&c()},v=()=>{g&&g()};return r.jsx(i.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",...w.container,...s==null?void 0:s.container,...m,children:r.jsxs(i.Vertical,{gap:12,maxWidth:1200,marginLeft:"auto",marginRight:"auto",children:[e&&r.jsx(i.Text,{fontWeight:"bold",fontSize:18,color:"color-black",...s==null?void 0:s.title,children:e}),o&&r.jsx(i.Text,{fontSize:14,color:"color-black",...s==null?void 0:s.description,children:o}),r.jsxs(i.Horizontal,{gap:12,justifyContent:"flex-end",marginTop:8,...s==null?void 0:s.buttonGroup,children:[d&&r.jsx(me,{variant:"outline",onClick:v,size:"sm",...s==null?void 0:s.customizeButton,children:n}),r.jsx(me,{variant:"filled",onClick:C,size:"sm",...s==null?void 0:s.acceptButton,children:t})]})]})})},tg=e=>r.jsx(rg,{...e}),ng=e=>{const{size:o,variant:t,onOpenChange:n}=e||{},[a,l]=h.useState(!1),[c,g]=h.useState({x:0,y:0}),[s,d]=h.useState(null),u=h.useRef(null),f=h.useRef(null),m=h.useMemo(()=>zo("contextmenu-content"),[]),p=h.useCallback(k=>{g({x:k.clientX,y:k.clientY}),l(!0),n==null||n(!0)},[n]),y=h.useCallback(()=>{l(!1),d(null),n==null||n(!1)},[n]);return h.useEffect(()=>{const k=C=>{f.current&&!f.current.contains(C.target)&&y()},b=()=>{a&&y()},w=C=>{C.key==="Escape"&&a&&y()};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",k),window.addEventListener("resize",b),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",k),window.removeEventListener("resize",b),document.removeEventListener("keydown",w)}},[a,y]),{isOpen:a,setIsOpen:l,position:c,setPosition:g,activeSubmenuId:s,setActiveSubmenuId:d,size:o,variant:t,triggerRef:u,contentRef:f,contentId:m,openMenu:p,closeMenu:y}},Ha={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},ag={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"}},Va={hover:{backgroundColor:"color-gray-100"}},Pa=h.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:()=>{}}),lg=({children:e,value:o})=>r.jsx(Pa.Provider,{value:o,children:e}),Or=()=>{const e=h.useContext(Pa);if(!e)throw new Error("useContextMenuContext must be used within a ContextMenuProvider");return e},Da=({children:e,disableNativeContextMenu:o=!0,asChild:t=!1,isDisabled:n=!1,views:a,...l})=>{const{triggerRef:c,contentId:g,openMenu:s}=Or(),u={ref:c,onContextMenu:f=>{if(!n)if(o&&f.preventDefault(),s)s(f);else{const{setIsOpen:m,setPosition:p}=Or();p({x:f.clientX,y:f.clientY}),m(!0)}},"aria-controls":g,"aria-haspopup":"menu","data-disabled":n?"":void 0,...t&&h.isValidElement(e)&&e.props.isDisabled===void 0&&{isDisabled:n},...a==null?void 0:a.container,...l};if(t&&h.isValidElement(e)){const f=h.Children.only(e);return h.cloneElement(f,{...u,...f.props})}return r.jsx(i.View,{...u,children:e})},Ut=({items:e,children:o,position:t,side:n="right",align:a="start",views:l,style:c,...g})=>{const{isOpen:s,position:d,contentRef:u,contentId:f,variant:m}=Or(),p=h.useRef(null),y=u||p,{ref:k,relation:b}=i.useElementPosition({}),[w,C]=h.useState({x:0,y:0});if(h.useEffect(()=>{if(s&&y.current){const S=t||d,x=y.current.offsetWidth,I=y.current.offsetHeight,T=window.innerWidth,W=window.innerHeight;let D=S.x,P=S.y;b&&(b.space.horizontal==="left"?D=S.x-x:D=S.x,b.space.vertical==="top"?P=S.y-I:P=S.y),D+x>T&&(D=T-x-8),D<8&&(D=8),P+I>W&&(P=W-I-8),P<8&&(P=8),C({x:D,y:P})}},[s,d,t,n,a,y,b]),!s)return null;const v={position:"fixed",top:`${w.y}px`,left:`${w.x}px`,zIndex:1e3,transformOrigin:"top left"};return r.jsxs(i.View,{id:f||"context-menu",ref:y,role:"menu",tabIndex:-1,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:{...v,...c},...ag[m],...l==null?void 0:l.menu,...l==null?void 0:l.content,...g,children:[e&&e.map((S,x)=>S.divider?r.jsx(La,{views:l},`divider-${x}`):r.jsx($a,{item:S,views:l},S.id)),o]})},$a=({item:e,children:o,onSelect:t,isDisabled:n=!1,views:a,variant:l,shape:c,isLoading:g,loaderProps:s,loaderPosition:d,icon:u,iconPosition:f,isFilled:m,isAuto:p,isIconRounded:y,isHovered:k,shadow:b,ariaLabel:w,animation:C,textColor:v,reversed:S,borderMovingDuration:x,borderMovingGradientColors:I,animatedStrokeAccentColor:T,animatedStrokeTextColor:W,to:D,isExternal:P,config:M,...E})=>{const{activeSubmenuId:F,setActiveSubmenuId:j,size:A,closeMenu:V}=Or();if(e){const[G,U]=h.useState(!1),$=e.items&&e.items.length>0,_=F===e.id,[N,Q]=h.useState({x:0,y:0}),B=e.disabled||n,L=()=>{U(!0),$&&j(e.id)},X=()=>{U(!1)},Z=()=>{B||!$&&e.onClick&&(e.onClick(),V&&V())},{ref:ee,relation:ae}=i.useElementPosition({});return h.useEffect(()=>{if(_&&ee.current){const re=ee.current.getBoundingClientRect(),ie=window.innerWidth,R=200;let ne=!1;if(ae)ne=ae.space.horizontal==="left";else{const se=ie-re.right,he=re.left;ne=se<R&&he>se}Q({x:ne?re.left-R:re.right,y:re.top})}},[_,e.items,ae]),r.jsxs(i.View,{ref:ee,role:"menuitem",display:"flex",alignItems:"center",cursor:B?"not-allowed":"pointer",opacity:B?.5:1,position:"relative","aria-disabled":B,"data-disabled":B?"":void 0,...Ha[A],_hover:B?{}:Va.hover,backgroundColor:G&&!B?"color-gray-100":"transparent",onMouseEnter:L,onMouseLeave:X,onClick:Z,...a==null?void 0:a.item,...E,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),$&&r.jsx(i.View,{marginLeft:8,...a==null?void 0:a.submenuIndicator,children:r.jsx(ye,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),_&&$&&r.jsx(Ut,{items:e.items||[],position:N,side:"right",align:"start",views:a})]})}const H=G=>{n||(t==null||t(G),V&&V())},O=D?{as:"a",href:D,color:"inherit",textDecoration:"none",...P?{target:"_blank",rel:"noopener noreferrer"}:{}}:{};return r.jsx(i.View,{role:"menuitem",onClick:H,cursor:n?"not-allowed":"pointer",opacity:n?.5:1,"aria-disabled":n,"data-disabled":n?"":void 0,...Ha[A],_hover:n?{}:Va.hover,...O,...a==null?void 0:a.item,...E,children:o})},La=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.divider,...o}),ig=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",role:"separator","aria-orientation":"horizontal",...e==null?void 0:e.separator,...o}),cg=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,views:l,themeMode:c,onOpenChange:g,...s})=>!o||o.length===0?r.jsx(r.Fragment,{children:e}):r.jsxs(r.Fragment,{children:[r.jsx(Da,{disableNativeContextMenu:a,views:l,...s,children:e}),r.jsx(Ut,{items:o,views:l})]}),Vo=({children:e,items:o,size:t="md",variant:n="default",disableNativeContextMenu:a=!0,onOpenChange:l,views:c,...g})=>{const s=ng({size:t,variant:n,onOpenChange:l}),{isOpen:d,setIsOpen:u,position:f,setPosition:m,activeSubmenuId:p,setActiveSubmenuId:y,triggerRef:k,contentRef:b,contentId:w,openMenu:C,closeMenu:v}=s;return r.jsx(lg,{value:{isOpen:d,setIsOpen:u,position:f,setPosition:m,activeSubmenuId:p,setActiveSubmenuId:y,size:t,variant:n,triggerRef:k,contentRef:b,contentId:w,openMenu:C,closeMenu:v,styles:c},children:r.jsx(cg,{items:o,size:t,variant:n,disableNativeContextMenu:a,views:c,...g,children:e})})};Vo.Trigger=Da,Vo.Content=Ut,Vo.Item=$a,Vo.Divider=La,Vo.Separator=ig;const sg=({src:e,color:o,views:t,themeMode:n,...a})=>{const{getColor:l,themeMode:c}=i.useTheme(),g=o?{fill:l(o,{themeMode:c}),stroke:l(o,{themeMode:c})}:{};return r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",...a,...t==null?void 0:t.container,children:r.jsx(i.Image,{...g,content:'url("'+e+'")',width:"100%",height:"100%",...t==null?void 0:t.image})})},dg=({path:e,...o})=>r.jsx(i.Image,{src:e,...o}),Ba=(e,o)=>o?Array.isArray(e)?e:e===""?[]:[e]:Array.isArray(e)?e[0]??"":e,_a=({placeholder:e,isMulti:o,options:t,value:n,defaultValue:a,id:l})=>{const c=h.useId().replace(/[^a-zA-Z0-9_-]/g,""),g=l??`select-${c}`,s=n!==void 0,[d,u]=h.useState(!1),[f,m]=h.useState(!1),[p,y]=h.useState(()=>a!==void 0?Ba(a,o):o?[]:e?"":Array.isArray(t)&&t.length>0?t[0].value:""),k=s?Ba(n,o):p,b=h.useCallback(x=>{s||y(x)},[s]),[w,C]=h.useState(0),[v,S]=h.useState(!0);return{id:g,value:k,setValue:b,hide:v,setHide:S,isHovered:d,setIsHovered:u,isFocused:f,setIsFocused:m,highlightedIndex:w,setHighlightedIndex:C}},Gt=({children:e,views:o={helperText:{}},...t})=>r.jsx(i.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,...t,children:e}),Je=h.forwardRef(({children:e,helperText:o,error:t=!1,views:n,...a},l)=>r.jsxs(i.Vertical,{ref:l,gap:4,position:"relative",width:"100%",boxSizing:"border-box",marginVertical:0,...a,...n==null?void 0:n.container,children:[e,!t&&o&&r.jsx(Gt,{marginTop:0,...n==null?void 0:n.helperText,children:o}),t&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",marginTop:0,marginHorizontal:0,fontWeight:"500",color:"color-red-500",transition:"color 0.2s ease, opacity 0.2s ease",...n==null?void 0:n.error,children:t})]}));Je.displayName="FieldContainer";const gg={default:{borderRadius:"8px"},square:{borderRadius:0},rounded:{borderRadius:"8px"},pill:{borderRadius:"9999px"}},hg={xs:"10px",sm:"11px",md:"11px",lg:"12px",xl:"12px"},fg={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"}},ug={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}},mg=e=>{const{minHeight:o,paddingVertical:t,paddingHorizontal:n}=ug[e];return{minHeight:`${o}px`,paddingTop:`${t}px`,paddingBottom:`${t}px`,paddingLeft:`${n}px`,paddingRight:`${n}px`}},no=({label:e,shadow:o,children:t,value:n,size:a="md",shape:l="default",variant:c="default",error:g=!1,showLabel:s=!1,isFocused:d=!1,isHovered:u=!1,isDisabled:f=!1,isReadOnly:m=!1,views:p={pickerBox:{}},...y})=>{const{themeMode:k}=i.useTheme(),b=k==="dark",C=g?"color-red-500":(u||d)&&!f?"theme-primary":"color-gray-200";return r.jsx(i.Horizontal,{gap:8,width:"100%",boxSizing:"border-box",display:"flex",flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-start",borderStyle:"solid",borderColor:C,backgroundColor:b?"color-gray-900":"color-white",fontSize:i.Typography.fontSizes[a],cursor:f?"not-allowed":m?"auto":"text",opacity:f?.7:1,transition:"border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease",...mg(a),...typeof o=="object"&&o!==null?o:{},...gg[l],...fg[c],...p==null?void 0:p.container,...y,children:t})},ir=({children:e,...o})=>r.jsx(i.Horizontal,{gap:10,right:10,zIndex:500,flexWrap:"nowrap",alignItems:"center",justifyContent:"flex-end",...o,children:e}),pg={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}},yg=({children:e,heading:o,isItalic:t=!1,isUnderlined:n=!1,isStriked:a=!1,weight:l="normal",size:c="sm",dropDown:g,error:s,isDisabled:d,helperText:u,views:f,...m})=>{const p=o?pg[o]:{};return r.jsx(i.Element,{as:"label",width:"100%",fontSize:c,fontStyle:t?"italic":"normal",fontWeight:i.Typography.fontWeights[l],textDecoration:a?"line-through":n?"underline":"none",...s?{color:"color-red-500"}:d?{color:"color-gray-400"}:{},...d?{cursor:"not-allowed"}:{},...p,...m,children:e})},cr=e=>r.jsx(yg,{...e}),fo=({children:e,size:o="md",error:t=!1,color:n="theme-primary",views:a={label:{}},helperText:l,...c})=>r.jsx(cr,{position:"static",fontSize:hg[o],letterSpacing:"-0.01em",whiteSpace:"nowrap",fontWeight:500,color:t?"color-red-500":"inherit",transition:"color 0.2s ease",...a.label,...c,children:e}),Po=({children:e,...o})=>r.jsx(i.Vertical,{display:"flex",flexDirection:"column",gap:4,flex:1,width:"100%",maxWidth:"100%",boxSizing:"border-box",...o,children:e}),Oa={xs:12,sm:14,md:16,lg:18,xl:20},bg={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)"},xg={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"}},kg={padding:"10px 12px",cursor:"pointer",borderRadius:8,margin:"2px 4px",transition:"all 0.15s ease-in-out"},Nr={default:{},highlighted:{backgroundColor:"color-gray-100"},selected:{backgroundColor:"color-gray-100"},selectedHighlighted:{backgroundColor:"color-gray-200"}},Na={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},Cg={padding:"4px 8px",borderRadius:8,backgroundColor:"color-gray-100",fontSize:"12px",fontWeight:"500",color:"color-gray-700",transition:"all 0.15s ease-in-out"},wg={scrollbarWidth:"thin",scrollbarColor:"rgba(0, 0, 0, 0.15) transparent"},Sg=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},vg=({isHovered:e,setIsHovered:o=()=>{},option:t,size:n="md",callback:a=()=>{},style:l,isSelected:c=!1,...g})=>{const s=(f,m)=>{f.stopPropagation(),f.preventDefault(),typeof a=="function"&&a(m)},d=()=>o(!e),u=()=>c&&e?Nr.selectedHighlighted:c?Nr.selected:e?Nr.highlighted:Nr.default;return r.jsxs(i.Element,{as:"li",role:"option","aria-selected":c,display:"flex",alignItems:"center",justifyContent:"space-between",listStyleType:"none",...kg,...u(),onMouseEnter:d,onMouseLeave:d,onClick:f=>s(f,t.value),...g,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[n],fontWeight:c?"500":"400",lineHeight:"14px",color:c?"color-gray-900":"color-gray-700",...l,children:t.label}),c&&r.jsx(i.Element,{as:"span","aria-hidden":"true",color:"theme-primary",fontSize:"14px",marginLeft:8,display:"flex",alignItems:"center",children:"✓"})]})},Tg=({size:e="md",views:o={field:{},text:{}},value:t,isDisabled:n,placeholder:a,removeOption:l=()=>{},options:c})=>{const g=(o==null?void 0:o.field)||{},s=(o==null?void 0:o.text)||{},d=Array.isArray(t)&&t.length>0,u={margin:0,width:"95%",height:"100%",border:"none",paddingVertical:0,paddingHorizontal:0,fontSize:i.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},...g,...s,style:{backgroundColor:"transparent",...g.style,...s.style}},f=c.length>0&&c.find(m=>m.value===t);return r.jsx(i.Text,{...u,children:(t===""||Array.isArray(t)&&t.length===0)&&a?a:r.jsx(r.Fragment,{children:typeof t=="string"?(f&&f.label)??t:Array.isArray(t)&&t.length>0?r.jsx(i.Horizontal,{gap:6,children:t.map(m=>r.jsx(zg,{option:m,removeOption:l},m))}):r.jsx("span",{children:t})})})},Ig=({id:e,name:o,value:t,onChange:n,isMulti:a=!1,isDisabled:l=!1,isReadOnly:c=!1,options:g=[],defaultValue:s,...d})=>{const u=f=>{n&&n(a?Array.from(f.target.selectedOptions,m=>m.value):f.target.value)};return r.jsx(i.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:t,disabled:l,readOnly:c,onChange:u,multiple:a,...d,children:g.length>0&&g.map(f=>r.jsx("option",{value:f.value,children:f.label},f.value))})},Fg=({size:e,views:o={},options:t,callback:n=()=>{},highlightedIndex:a,setHighlightedIndex:l=()=>{},selectedValue:c,listboxId:g,getOptionId:s})=>{const d=f=>n(f),u=f=>Array.isArray(c)?c.includes(f):c===f;return r.jsx(i.Element,{as:"ul",role:"listbox",id:g,display:"flex",flexDirection:"column",margin:0,padding:"4px",...bg,style:wg,...o==null?void 0:o.dropDown,children:t&&t.length>0&&t.map((f,m)=>r.jsx(vg,{id:s?s(m):void 0,size:e,style:o.text,option:f,callback:d,isSelected:u(f.value),isHovered:m===a,setIsHovered:()=>{},onMouseEnter:()=>l(m)},f.value))})},zg=({option:e,size:o="md",removeOption:t=()=>{},...n})=>{const a=()=>t(e);return r.jsxs(i.Horizontal,{gap:6,alignItems:"center",onClick:l=>l.stopPropagation(),...Cg,_hover:{backgroundColor:"color-gray-200"},...n,children:[r.jsx(i.Text,{fontSize:i.Typography.fontSizes[o],fontWeight:"500",color:"color-gray-700",children:e}),r.jsx(i.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:r.jsx($e,{color:"inherit",widthHeight:Oa[o]})})]})},qa=({id:e,name:o,label:t,value:n,placeholder:a,helperText:l,hide:c=!1,error:g=!1,isMulti:s=!1,isFocused:d=!1,isHovered:u=!1,isDisabled:f=!1,isReadOnly:m=!1,isRequired:p=!1,isAutoFocus:y=!1,options:k=[],shadow:b={},size:w="md",shape:C="default",variant:v="default",views:S={text:{},icon:{},dropDown:{},selectBox:{},label:{},helperText:{}},onChange:x=()=>{},setHide:I=()=>{},setValue:T=()=>{},setIsHovered:W=()=>{},setIsFocused:D=()=>{},setHighlightedIndex:P,highlightedIndex:M,isScrollable:E,"aria-label":F,...j})=>{const A=h.useId(),V=e??`select-${A.replace(/[^a-zA-Z0-9_-]/g,"")}`,H=`${V}-native`,O=`${V}-label`,G=`${V}-listbox`,U=R=>`${V}-option-${R}`,{ref:$,relation:_,updateRelation:N}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),Q=h.useRef(null),B=()=>{var he;if(!$.current)return{};const R=$.current.getBoundingClientRect(),ne={position:"fixed",left:R.left,width:R.width,zIndex:1e4};return((he=_==null?void 0:_.space)==null?void 0:he.vertical)==="top"?{...ne,bottom:window.innerHeight-R.top+8}:{...ne,top:R.bottom+8}};h.useEffect(()=>{const R=()=>I(!0);return document.addEventListener("closeAllSelects",R),()=>document.removeEventListener("closeAllSelects",R)},[I]),h.useEffect(()=>{var R;y&&!f&&!m&&((R=$.current)==null||R.focus())},[]),h.useEffect(()=>{const R=ne=>{!ne.target.closest(`#${V}`)&&!c&&I(!0)};return document.addEventListener("click",R),()=>{document.removeEventListener("click",R)}},[V,c,I]);const L=()=>W(!u),X=()=>D(!0),Z=R=>{document.dispatchEvent(new Event("closeAllSelects")),R&&R.stopPropagation&&R.stopPropagation();const ne=!c;I(ne),D(!ne)},ee=h.useCallback(R=>{if(I(!0),document.dispatchEvent(new Event("closeAllSelects")),s&&Array.isArray(n)){if(!n.includes(R)){const ne=[...n,R];T(ne),x&&x(ne)}}else T(R),x&&x(R);D(!0)},[s,n,I,T,x,D]),ae=R=>{if(Array.isArray(n)&&n.includes(R)){const ne=n.filter(se=>se!==R);T(ne),x&&x(ne)}},re=!!t,ie=Sg(S);return r.jsx(Je,{ref:$,position:"relative",width:"100%",display:"inline-block",id:V,role:"combobox","aria-haspopup":"listbox","aria-expanded":!c,"aria-labelledby":!F&&re?O:void 0,"aria-label":F,"aria-controls":G,"aria-activedescendant":!c&&k.length>0?U(M??0):void 0,"aria-disabled":f||void 0,"aria-required":p||void 0,tabIndex:f||m?-1:0,helperText:l,error:g,views:ie,onKeyDown:R=>{if(f||m||R.target!==R.currentTarget)return;if(c){(R.key==="Enter"||R.key===" "||R.key==="ArrowDown")&&(R.preventDefault(),document.dispatchEvent(new Event("closeAllSelects")),I(!1),D(!0));return}const ne=M??0;if(R.key==="ArrowDown")R.preventDefault(),P==null||P(Math.min(ne+1,k.length-1));else if(R.key==="ArrowUp")R.preventDefault(),P==null||P(Math.max(ne-1,0));else if(R.key==="Enter"){R.preventDefault();const se=k[ne];se&&ee(se.value)}else R.key==="Escape"&&(R.preventDefault(),I(!0))},onClick:R=>{R.stopPropagation(),f||m||Z(R)},children:r.jsxs(no,{label:t,size:w,error:g,shape:C,views:S,shadow:b,variant:v,value:n,color:"theme-primary",isHovered:u,isDisabled:f,isReadOnly:m,isFocused:d,showLabel:re,onMouseEnter:L,onMouseLeave:L,position:"relative",...S==null?void 0:S.content,children:[r.jsxs(Po,{children:[re&&r.jsx(fo,{id:O,htmlFor:H,color:"theme-primary",error:g,...S==null?void 0:S.label,children:t}),r.jsx(Ig,{id:H,name:o,options:k,onChange:x,value:n,isDisabled:f,isReadOnly:m,isMulti:s,required:p||void 0,onFocus:X,...j}),r.jsx(Tg,{options:k,size:w,views:S,value:n,isDisabled:f,placeholder:a,removeOption:ae})]}),r.jsx(ir,{children:!m&&!f&&r.jsx(i.Element,{display:"flex",alignItems:"center",justifyContent:"center",style:c?Na.closed:Na.open,children:r.jsx(ye,{color:"inherit",widthHeight:Oa[w],style:S.icon,orientation:"down"})})}),!c&&k.length>0&&r.jsx(or,{children:r.jsx(i.Element,{ref:Q,onClick:R=>R.stopPropagation(),style:{...B(),...xg.enter},children:r.jsx(Fg,{size:w,views:S,options:k,callback:ee,highlightedIndex:M,setHighlightedIndex:P,selectedValue:n,listboxId:G,getOptionId:U})})})]})})},sr=e=>{const o=Ce("select",e),t={...o,options:o.options||[]},n=_a(t);return r.jsx(qa,{...n,...t,value:n.value,onClick:a=>{a.stopPropagation(),o.onClick&&o.onClick(a)}})},Ua=({isDisabled:e,isChecked:o})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(o||!1),[c,g]=h.useState(o||!1);return h.useEffect(()=>{o!==void 0&&(l(o),g(o))},[o]),{isHovered:t,setIsHovered:n,on:a,setOn:l,value:c,setValue:g}},Ga={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"}},Mg={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"}},jg={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"}},Wg={xs:"9px",sm:"10px",md:"11px",lg:"12px",xl:"13px"},qr={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}},Qe={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"}}}},Ya={slider:{transition:"all 0.2s ease-in-out"},knob:{transition:"all 0.2s ease-in-out"}},Eg=e=>r.jsx(i.Input,{type:"checkbox",...e}),Ka=({id:e,name:o,label:t,inActiveChild:n,isChecked:a,activeChild:l,labelPosition:c="right",shadow:g={},size:s="sm",value:d=!1,isHovered:u=!1,isDisabled:f=!1,isReadOnly:m=!1,on:p,setOn:y=()=>{},onChange:k,setValue:b=()=>{},setIsHovered:w=()=>{},helperText:C,description:v,views:S={slider:{},circle:{},label:{}},...x})=>{const I=h.useId(),T=e??I,[W,D]=h.useState(!1),P=typeof a=="boolean"?a:d,E=!!(l||n)?jg[s]:Mg[s],F=`${qr[s].paddingHorizontal}px`,j=`${qr[s].paddingHorizontal+2}px`,A=`calc(${Ga[s].width} + ${qr[s].paddingHorizontal}px + 4px)`,V=Wg[s],H=B=>{if(!m&&!f){const L=B.target.checked;b(L),y(L),k&&k(L)}},O=()=>w(!0),G=()=>w(!1),U=B=>{let L=!0;try{L=B.target.matches(":focus-visible")}catch{}D(L)},$=()=>D(!1),_=`${T}-description`,N={container:{gap:12,display:"flex",height:"fit-content",width:"fit-content",alignItems:"center",cursor:f?"not-allowed":m?"default":"pointer",opacity:f?.6:1,transition:"all 0.2s ease-in-out",...S.label}},Q=r.jsxs(cr,{htmlFor:T,onMouseEnter:O,onMouseLeave:G,...N.container,children:[c==="left"&&t&&r.jsx(i.Text,{fontWeight:"500",color:f?"color-gray-400":"inherit",transition:"color 0.2s ease, opacity 0.2s ease",children:t}),r.jsxs(i.View,{display:"flex",alignItems:"center",justifyContent:"center",position:"relative",marginBottom:4,borderRadius:"9999px",backgroundColor:f?Qe.default.disabled:P?u?Qe.states.hover.active:Qe.default.active:u?Qe.states.hover.inactive:Qe.default.inactive,opacity:!f&&P&&u?Qe.states.hover.activeOpacity:1,cursor:"pointer",...Ya.slider,...g,...qr[s],...E,...S.slider,...W?P?Qe.states.focus.active:Qe.states.focus.inactive:{},children:[r.jsx(Eg,{id:T,name:o,role:"switch","aria-checked":P,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:2,cursor:f?"not-allowed":m?"default":"pointer",checked:P,onChange:H,onFocus:U,onBlur:$,disabled:f,readOnly:m,"aria-describedby":v?_:void 0,...x}),l&&P&&r.jsx(i.View,{marginLeft:j,marginRight:A,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:l}),r.jsx(i.View,{position:"absolute",top:"50%",left:P?void 0:F,right:P?F:void 0,borderRadius:"50%",backgroundColor:Qe.default.knob,boxShadow:u?"0 4px 10px rgba(15, 23, 42, 0.18)":"0 1px 3px rgba(15, 23, 42, 0.18)",transform:`translateY(-50%) ${u?"scale(1.05)":"scale(1)"}`,...Ya.knob,zIndex:1,...Ga[s],...S.circle}),n&&!P&&r.jsx(i.View,{marginLeft:A,marginRight:j,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})]}),c==="right"&&t&&r.jsx(i.Text,{fontWeight:"500",color:f?"color-gray-400":"inherit",transition:"all 0.2s ease-in-out",children:t})]});return v?r.jsxs(i.Vertical,{gap:4,width:"fit-content",children:[Q,r.jsx(i.Text,{id:_,color:"color-gray-500",fontSize:"14px",lineHeight:"20px",children:v})]}):Q},Yt=e=>{const o=Ce("switch",e),t=Ua(o);return r.jsx(Ka,{...t,...o})},Xa=({placeholder:e,isMulti:o,options:t,id:n})=>{const a=h.useId().replace(/[^a-zA-Z0-9_-]/g,""),l=n??`selector-${a}`,c=e?o?[]:"":Array.isArray(t)&&t.length>0?t[0].value:o?[]:"",[g,s]=h.useState(!1),[d,u]=h.useState(!1),[f,m]=h.useState(c),[p,y]=h.useState(!0);return{id:l,value:f,setValue:m,hide:p,setHide:y,isHovered:g,setIsHovered:s,isFocused:d,setIsFocused:u}},Ja=({id:e,name:o,label:t,value:n,views:a={},options:l=[],helperText:c,error:g=!1,isDisabled:s=!1,isReadOnly:d=!1,onChange:u=()=>{},setValue:f=()=>{},hide:m,setHide:p,isHovered:y,setIsHovered:k,isFocused:b,setIsFocused:w,placeholder:C,isMulti:v,shape:S,variant:x,size:I,shadow:T,isScrollable:W,"aria-label":D,...P})=>{const M=h.useId(),E=e??M,F=`${E}-label`,j=`${E}-helper-text`,A=!!c,V=h.useCallback(H=>{s||d||(f(H.value),u&&u(H.value))},[f,u,s,d]);return r.jsxs(Je,{id:E,width:"100%",views:a,...P,children:[t&&r.jsxs(i.Horizontal,{fontSize:"10px",letterSpacing:"wider",color:"color-black-500",fontWeight:"bold",marginBottom:12,alignItems:"center",gap:6,style:{textTransform:"uppercase"},children:[r.jsx(ro,{widthHeight:14})," ",r.jsx(i.Text,{id:F,children:t})]}),r.jsx(i.Horizontal,{gap:0,role:"radiogroup","aria-labelledby":!D&&t?F:void 0,"aria-label":D,"aria-describedby":A?j:void 0,"aria-readonly":d||void 0,"aria-invalid":g?!0:void 0,children:l.map((H,O,G)=>{const U=n===H.value,$=H.color??"theme-primary",_=U?$:"color-gray-200",N=U?$:"color-gray-500",Q=O===0,B=O===G.length-1,L=B||U;return r.jsx(i.View,{as:"button",type:"button",role:"radio","aria-checked":U,disabled:s,onClick:()=>V(H),flex:1,minWidth:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis",textAlign:"center",paddingVertical:6,paddingHorizontal:12,fontSize:"12px",fontWeight:U?"bold":"normal",cursor:s?"not-allowed":d?"default":"pointer",backgroundColor:"transparent",color:N,borderStyle:"solid",borderColor:_,borderTopWidth:1,borderBottomWidth:1,borderLeftWidth:1,borderRightWidth:L?1:0,borderRadius:Q?"6px 0 0 6px":B?"0 6px 6px 0":"0",zIndex:U?1:0,transition:"color 0.15s ease, border-color 0.15s ease, background-color 0.15s ease",...a.item,children:H.label},H.value)})}),r.jsx("input",{type:"hidden",id:`${E}-input`,name:o,value:Array.isArray(n)?n.join(","):n,onChange:()=>{}}),A&&r.jsx(i.Text,{id:j,fontSize:"11px",lineHeight:"16px",marginTop:0,fontWeight:g?"500":"400",color:g?"color-red-500":"color-gray-500",transition:"color 0.2s ease, opacity 0.2s ease",...a.helperText,children:c})]})},Ag=e=>{const o={...e,options:e.options||[]},t=Xa(o);return r.jsx(Ja,{...t,...o,onClick:n=>{n.stopPropagation(),e.onClick&&e.onClick(n)}})},Qa=({label:e,placeholder:o,value:t})=>{const[n,a]=h.useState(e??o),[l,c]=h.useState(!1),[g,s]=h.useState(t||""),[d,u]=h.useState(!1);return h.useMemo(()=>{a(d&&!g?o??"":e??o)},[g,d,e,o]),{hint:n,setHint:a,isHovered:l,setIsHovered:c,value:g,setValue:s,isFocused:d,setIsFocused:u}},Hg=e=>{if(!e)return{};const{container:o,content:t,...n}=e;return n},Vg=(e,o)=>{if(o!=="pill")return e;if(typeof e=="number")return Math.min(e,28);if(typeof e=="string"){const t=Number.parseFloat(e);if(Number.isFinite(t)&&e.trim().endsWith("px"))return`${Math.min(t,28)}px`}return"28px"},Za=({id:e,name:o,hint:t,error:n,value:a,label:l,shadow:c,helperText:g,placeholder:s,size:d="sm",shape:u="default",variant:f="default",isHovered:m=!1,isFocused:p=!1,isEditable:y=!0,isReadOnly:k=!1,isDisabled:b=!1,isAutoFocus:w=!1,isRequired:C,required:v,labelProps:S,maxRows:x=3,maxCols:I=30,onBlur:T=()=>{},onChange:W,onFocus:D,setHint:P=()=>{},setValue:M=()=>{},setIsFocused:E=()=>{},setIsHovered:F=()=>{},onChangeText:j,inputRef:A,views:V={label:{},helperText:{}},...H})=>{const O=h.useId(),G=e??O,U=!!l,$={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"}},_=(V==null?void 0:V.field)||{},N=(V==null?void 0:V.container)||{},Q=Vg(N.borderRadius,u),B={...V,container:{...N,...Q!==void 0?{borderRadius:Q}:{},overflow:"hidden"}},L=Hg(V),X={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:$[d].minHeight,maxHeight:"calc(100vh - 100px)",border:"none",on:{focus:{outline:"none"}},fontSize:$[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",..._,style:{backgroundColor:"transparent",..._.style}},Z=()=>{E(!0),D&&D()},ee=re=>{T(re),E(!1)},ae=re=>{const ie=typeof re=="string"?re:re.target.value;M(ie),j&&j(ie),W&&W(ie)};return r.jsx(Je,{helperText:g,error:n,views:L,children:r.jsx(no,{label:l,size:d,error:n,shape:u,views:B,shadow:c,variant:f,value:a,color:"theme-primary",isHovered:m,isDisabled:b,isReadOnly:k,isFocused:p,showLabel:U,alignItems:"flex-start",minHeight:$[d].minHeight,paddingTop:$[d].shellPaddingY,paddingBottom:$[d].shellPaddingY,paddingLeft:$[d].shellPaddingX,paddingRight:$[d].shellPaddingX,onMouseEnter:()=>F(!0),onMouseLeave:()=>F(!1),...B==null?void 0:B.content,children:r.jsxs(Po,{...V==null?void 0:V.warper,children:[U&&r.jsx(fo,{htmlFor:G,color:"theme-primary",error:n,...S,...V==null?void 0:V.label,children:l}),r.jsx(i.Element,{ref:A,as:"textarea",id:G,name:o,rows:x,cols:I,value:a,readOnly:k||!y,disabled:b,autoFocus:w,...C??v?{required:!0,"aria-required":!0}:{},placeholder:s||t,onBlur:ee,onFocus:Z,onChange:re=>ae(re),...X,...H,style:{resize:b||k||!y?"none":"vertical",...X.style,...H.style||{}},...V==null?void 0:V.textarea})]})})})},Do=e=>{const o=Ce("textarea",e),t=Qa(o);return r.jsx(Za,{...t,...o})},Kt=({label:e,placeholder:o,value:t})=>{const[n,a]=h.useState(e??o),[l,c]=h.useState(!1),[g,s]=h.useState(!1),[d,u]=h.useState(t);return h.useMemo(()=>{a(l&&!d?o??"":e??o)},[d,l,e,o]),{hint:n,setHint:a,isFocused:l,setIsFocused:c,isHovered:g,setIsHovered:s,setValue:u,value:d}},dr=({id:e,name:o,label:t,hint:n,value:a,onChange:l,left:c,right:g,helperText:s,placeholder:d,onChangeText:u,shadow:f={},views:m={container:{},field:{},label:{},helperText:{},text:{}},size:p="md",shape:y="default",variant:k="default",error:b=!1,isFocused:w=!1,isHovered:C=!1,isDisabled:v=!1,isReadOnly:S=!1,isClearable:x=!0,isAutoFocus:I=!1,isRequired:T,required:W,labelProps:D,leftIcon:P,rightIcon:M,setHint:E=()=>{},setIsFocused:F=()=>{},setIsHovered:j=()=>{},setValue:A=()=>{},onClick:V=()=>{},onFocus:H,onBlur:O=()=>{},themeMode:G,inputRef:U,...$})=>{const _=h.useId(),N=e??_,{getColor:Q,themeMode:B}=i.useTheme(),L=Q(v?"color-gray-400":"color-gray-500",{themeMode:G||B}),X=!!t,Z={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"}},ee=(m==null?void 0:m.field)||{},ae="0 0 0 1000px var(--theme-canvas) inset",re={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",minHeight:"auto",border:"none",backgroundColor:"transparent",fontSize:Z[p].fontSize,letterSpacing:"-0.01em",fontWeight:400,color:v?"color-gray-400":"color-gray-900",cursor:v?"not-allowed":"text",opacity:v?.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:ae,WebkitBoxShadow:ae,WebkitTextFillColor:"var(--theme-text)",transition:"background-color 5000s ease-in-out 0s"},_webkitContactsAutoFillButton:{visibility:"hidden",pointerEvents:"none",position:"absolute",right:0},...ee},ie=()=>{F(!0),H&&H()},R=()=>j(!0),ne=()=>j(!1),se=q=>{O&&O(q),F(!1)},he=q=>{typeof q=="string"?(A(q),u&&u(q),l&&l(q)):(A(q.target.value),u&&u(q.target.value),l&&l(q.target.value))},xe=()=>{A(""),u&&u(""),l&&l(""),O({target:{name:o}})},{container:ge,content:le,...Y}=m||{};return r.jsx(Je,{helperText:s,error:b,views:Y,children:r.jsxs(no,{label:t,size:p,error:b,shape:y,views:m,shadow:f,variant:k,value:a,color:"theme-primary",isHovered:C,isDisabled:v,isReadOnly:S,isFocused:w,showLabel:X,onMouseEnter:R,onMouseLeave:ne,children:[c,P&&r.jsx(ir,{children:P}),r.jsxs(Po,{children:[X&&r.jsx(fo,{htmlFor:N,color:"theme-primary",error:b,...D,...m==null?void 0:m.label,children:t}),r.jsx(i.Input,{ref:U,type:"text",id:N,name:o,readOnly:S,disabled:v,autoFocus:I,...T??W?{required:!0,"aria-required":!0}:{},placeholder:d||n,onFocus:ie,onBlur:se,autoComplete:"off",...re,...$,onChange:he,value:a})]}),x&&a&&!S&&!v&&r.jsx(ir,{children:r.jsx($e,{size:20,color:L,onClick:xe,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)"}})}),M&&r.jsx(ir,{children:M}),g]})})},Pe=e=>{const o=Ce("input",e),t=Kt(o);return r.jsx(dr,{...t,...o})},Ra=({defaultIsSelected:e=!1})=>{const[o,t]=h.useState(!1),[n,a]=h.useState(e);return{isHovered:o,setIsHovered:t,isSelected:n,setIsSelected:a}},Pg={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"}},el={xs:10,sm:14,md:16,lg:20,xl:24},Dg={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"}},Ur={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"}}},ol=({id:e,icon:o,name:t,label:n,isChecked:a,onChange:l,onValueChange:c,shadow:g={},labelPosition:s="right",size:d="md",error:u=!1,isSelected:f=!1,isHovered:m=!1,isDisabled:p=!1,isReadOnly:y=!1,isIndeterminate:k=!1,defaultIsSelected:b=!1,setIsSelected:w=()=>{},setIsHovered:C=()=>{},views:v={checkbox:{},label:{}},infoText:S,helperText:x,...I})=>{const T=h.useId(),W=e??T,D=h.useRef(null),[P,M]=h.useState(!1),E=!!(a||f);h.useEffect(()=>{D.current&&(D.current.indeterminate=k)},[k]);const F=()=>C(!m),j=()=>{!y&&!p&&(w&&w(!f),l&&l(!a),c&&c(!a))},A=k?"indeterminate":a||f?"selected":"unselected",V=u?Ur.error[A]:p?Ur.disabled[A]:m?Ur.hover[A]:{},H={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",color:u?"color-red-600":p?"color-gray-400":"inherit",cursor:p?"not-allowed":y?"default":"pointer",opacity:p?.6:1,transition:"all 0.2s ease-in-out",...v.label},checkbox:{...Dg[A],...V,borderRadius:6,...Pg[d],transition:"all 0.2s ease-in-out",...g,...v.checkbox}},O=`${W}-info`,G=`${W}-error`,U=[S?O:"",u?G:""].filter(Boolean).join(" ")||void 0;return r.jsxs(i.Vertical,{...H.container,children:[r.jsx(cr,{htmlFor:W,onMouseEnter:F,onMouseLeave:F,size:i.Typography.fontSizes[d],cursor:"inherit",children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",s==="left"&&n&&r.jsx(i.Text,{size:d,fontWeight:"500",...v==null?void 0:v.label,children:n}),r.jsxs(i.Center,{position:"relative",...H.checkbox,...P?Ur.focus[A]:{},children:[r.jsx(i.Input,{ref:D,type:"checkbox",id:W,name:t,checked:E,"aria-checked":k?"mixed":void 0,onChange:j,onFocus:()=>M(!0),onBlur:()=>M(!1),disabled:p,readOnly:y,position:"absolute",top:0,left:0,width:"100%",height:"100%",margin:0,opacity:0,zIndex:1,cursor:p?"not-allowed":y?"default":"pointer","aria-describedby":U,...I}),k?r.jsx(ta,{widthHeight:el[d],color:"color-white",transition:"opacity 0.2s ease"}):(a||f)&&(o??r.jsx(nr,{widthHeight:el[d],color:"color-white",transition:"opacity 0.2s ease"}))]}),s==="right"&&n&&r.jsx(i.Text,{size:d,fontWeight:"500",...v==null?void 0:v.label,children:n})]})}),S&&r.jsx(i.Text,{id:O,marginLeft:s==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...v==null?void 0:v.infoText,children:S}),u&&r.jsx(i.Text,{id:G,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"all 0.2s ease-in-out",children:u})]})},Xt=e=>{const o=Ce("checkbox",e),t=Ra(o);return r.jsx(ol,{...t,...o})},rl=({defaultIsSelected:e=!1,isChecked:o})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(o!==void 0?o:e);return h.useEffect(()=>{o!==void 0&&l(o)},[o]),{isHovered:t,setIsHovered:n,isSelected:a,setIsSelected:l}},$g={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"}},Lg={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"}},Bg={selected:{borderColor:"theme-primary",borderWidth:"2px",borderStyle:"solid"},unselected:{borderWidth:"2px",borderStyle:"solid",borderColor:"color-gray-300",style:{backgroundColor:"transparent"}}},_g={selected:{backgroundColor:"theme-primary"},unselected:{style:{backgroundColor:"transparent"}}},Jt={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"}}},Qt={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"}}}},tl=({id:e,icon:o,name:t,label:n,value:a,isChecked:l,onChange:c,onValueChange:g,shadow:s={},labelPosition:d="right",size:u="md",error:f=!1,isSelected:m=!1,isHovered:p=!1,isDisabled:y=!1,isReadOnly:k=!1,defaultIsSelected:b=!1,setIsSelected:w=()=>{},setIsHovered:C=()=>{},views:v={radio:{},label:{}},infoText:S,helperText:x,...I})=>{const T=h.useId(),W=e??T,[D,P]=h.useState(!1),M=()=>C(!p),E=()=>{!k&&!y&&(w&&w(!0),c&&c(a??""),g&&g(a??""))},F=l||m?"selected":"unselected",j=f?Jt.error[F]:y?Jt.disabled[F]:p?Jt.hover[F]:{},A=f?Qt.error[F]:y?Qt.disabled[F]:p?Qt.hover[F]:{},V={container:{gap:8,display:"flex",height:"fit-content",flexDirection:"column",width:"fit-content",selected:{borderColor:"theme-primary"},color:f?"color-red-600":y?"color-gray-400":"inherit",cursor:y?"not-allowed":k?"default":"pointer",opacity:y?.6:1,transition:"all 0.2s ease-in-out",...v.label},radio:{...Bg[F],...j,borderRadius:"50%",selected:{backgroundColor:"theme-primary"},backgroundColor:"color-white",...$g[u],transition:"all 0.2s ease-in-out",...s,...v.radio},dot:{..._g[F],...A,borderRadius:"50%",...Lg[u],transition:"all 0.2s ease-in-out"}},H=`${W}-info`,O=`${W}-error`,G=[S?H:"",f?O:""].filter(Boolean).join(" ")||void 0;return r.jsxs(i.Vertical,{...V.container,children:[r.jsx(cr,{htmlFor:W,onMouseEnter:M,onMouseLeave:M,size:i.Typography.fontSizes[u],cursor:"inherit",children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[" ",d==="left"&&n&&r.jsx(i.Text,{size:u,fontWeight:"500",...v==null?void 0:v.label,children:n}),r.jsxs(i.Center,{position:"relative",...V.radio,...D?{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"}:{},children:[r.jsx(i.Input,{type:"radio",id:W,name:t,value:a??"",checked:!!(l||m),onChange:E,onFocus:()=>P(!0),onBlur:()=>P(!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":G,...I}),(l||m)&&r.jsx(i.View,{...V.dot})]}),d==="right"&&n&&r.jsx(i.Text,{size:u,fontWeight:"500",...v==null?void 0:v.label,children:n})]})}),S&&r.jsx(i.Text,{id:H,marginLeft:d==="left"?0:36,color:"color-gray-500",size:"sm",fontWeight:"400",lineHeight:"20px",...v==null?void 0:v.infoText,children:S}),f&&r.jsx(i.Text,{id:O,size:"xs",marginTop:4,marginHorizontal:0,color:"color-red-500",fontWeight:"500",transition:"color 0.2s ease, opacity 0.2s ease",children:f})]})},Zt=e=>{const o=Ce("radio",e),t=rl(o);return r.jsx(tl,{...t,...o})},Og=({value:e,defaultValue:o="",onChange:t})=>{const[n,a]=h.useState(e!==void 0?e:o);return h.useEffect(()=>{e!==void 0&&a(e)},[e]),{selectedValue:n,setSelectedValue:c=>{e===void 0&&a(c),t&&t(c)}}},Ng=({children:e,name:o,label:t,helperText:n,error:a,selectedValue:l,setSelectedValue:c,direction:g="vertical",spacing:s=8,isDisabled:d=!1,isReadOnly:u=!1,views:f={container:{},label:{},helperText:{}},onChange:m,value:p,defaultValue:y,...k})=>{const b=g==="vertical"?i.Vertical:i.Horizontal,w=h.Children.map(e,I=>{if(h.isValidElement(I)){const T={name:o,isChecked:I.props.value===l,isDisabled:d||I.props.isDisabled,isReadOnly:u||I.props.isReadOnly,onChange:W=>{c(W),I.props.onChange&&I.props.onChange(W)}};return h.cloneElement(I,T)}return I}),C=h.useId(),v=`${C}-label`,S=`${C}-helper`,x=!!(n||a);return r.jsxs(i.Vertical,{gap:s,width:"100%",role:"radiogroup","aria-labelledby":t?v:void 0,"aria-describedby":x?S:void 0,"aria-invalid":a?!0:void 0,...f.container,...k,children:[t&&r.jsx(i.Text,{id:v,fontWeight:"600",fontSize:"14px",color:a?"color-red-600":"inherit",marginBottom:4,...f.label,children:t}),r.jsx(b,{gap:s,children:w}),x&&r.jsx(i.Text,{id:S,fontWeight:a?"500":"400",fontSize:"14px",lineHeight:"20px",color:a?"color-red-500":"color-gray-500",marginTop:4,transition:"color 0.2s ease, opacity 0.2s ease",...f.helperText,children:a||n})]})},qg=e=>{const o=Og(e);return r.jsx(Ng,{...o,...e})},uo=e=>Math.min(255,Math.max(0,Math.round(e))),Ug=e=>{const o=/^#([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(e.trim());if(!o)return null;let t=o[1];return t.length===3&&(t=t.split("").map(n=>n+n).join("")),{r:parseInt(t.slice(0,2),16),g:parseInt(t.slice(2,4),16),b:parseInt(t.slice(4,6),16)}},Gg=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:uo(Number(o[1])),g:uo(Number(o[2])),b:uo(Number(o[3]))}:null},Yg=(e,o,t)=>{const n=(e%360+360)%360,a=Math.min(100,Math.max(0,o))/100,l=Math.min(100,Math.max(0,t))/100,c=(1-Math.abs(2*l-1))*a,g=c*(1-Math.abs(n/60%2-1)),s=l-c/2;let d;return n<60?d=[c,g,0]:n<120?d=[g,c,0]:n<180?d=[0,c,g]:n<240?d=[0,g,c]:n<300?d=[g,0,c]:d=[c,0,g],{r:uo((d[0]+s)*255),g:uo((d[1]+s)*255),b:uo((d[2]+s)*255)}},Kg=e=>{const o=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%\s*(?:,\s*[\d.]+\s*)?\)$/i.exec(e.trim());return o?Yg(Number(o[1]),Number(o[2]),Number(o[3])):null},Xg=e=>Ug(e)??Gg(e)??Kg(e),Jg=({r:e,g:o,b:t})=>{const n=e/255,a=o/255,l=t/255,c=Math.max(n,a,l),g=Math.min(n,a,l),s=c-g,d=(c+g)/2;if(s===0)return{h:0,s:0,l:Math.round(d*100)};const u=s/(1-Math.abs(2*d-1));let f;return c===n?f=(a-l)/s%6:c===a?f=(l-n)/s+2:f=(n-a)/s+4,f=Math.round(f*60),f<0&&(f+=360),{h:f,s:Math.round(u*100),l:Math.round(d*100)}},Rt=e=>uo(e).toString(16).padStart(2,"0"),Gr=(e,o)=>{if(!o||!e)return e;const t=Xg(e);if(!t)return e;switch(o){case"hex":return`#${Rt(t.r)}${Rt(t.g)}${Rt(t.b)}`;case"rgb":return`rgb(${t.r}, ${t.g}, ${t.b})`;case"hsl":{const{h:n,s:a,l}=Jg(t);return`hsl(${n}, ${a}%, ${l}%)`}}},nl=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,onOpen:l,onClose:c,closeOnSelect:g=!0,maxRecentColors:s=8,showRecentColors:d=!0,isAutoFocus:u=!1,colorFormat:f}=e,[m,p]=h.useState(!1),[y,k]=h.useState(o??t),[b,w]=h.useState(""),[C,v]=h.useState([]),[S,x]=h.useState(!1),[I,T]=h.useState(!1),W=h.useRef(null),D=h.useRef(null);h.useEffect(()=>{o!==void 0&&k(o)},[o]),h.useEffect(()=>{if(d&&typeof localStorage<"u")try{const H=localStorage.getItem("colorInput-recentColors");H&&v(JSON.parse(H))}catch(H){console.warn("Failed to load recent colors from localStorage:",H)}},[d]),h.useEffect(()=>{const H=W.current;u&&H&&typeof H.focus=="function"&&H.focus()},[u]),h.useEffect(()=>{if(typeof document>"u")return;const H=O=>{m&&W.current&&D.current&&!W.current.contains(O.target)&&!D.current.contains(O.target)&&A()};return document.addEventListener("mousedown",H),()=>document.removeEventListener("mousedown",H)},[m]);const P=h.useCallback(H=>{d&&v(O=>{const G=O.filter($=>$!==H),U=[H,...G].slice(0,s);try{typeof localStorage<"u"&&localStorage.setItem("colorInput-recentColors",JSON.stringify(U))}catch($){console.warn("Failed to save recent colors to localStorage:",$)}return U})},[d,s]),M=h.useCallback(()=>{const H=!m;p(H),H?l==null||l():c==null||c()},[m,l,c]),E=h.useCallback(H=>{k(H),P(H);const O=Gr(H,f);n==null||n(O),a==null||a(O),g&&(p(!1),c==null||c())},[n,a,g,c,P,f]),F=h.useCallback(H=>{w(H)},[]),j=h.useCallback(()=>{b&&(E(b),w(""))},[b,E]),A=h.useCallback(()=>{p(!1),c==null||c()},[c]),V=h.useCallback(H=>{k(H),n==null||n(Gr(H,f))},[n,f]);return{isOpen:m,selectedColor:y,recentColors:C,customColor:b,isFocused:S,isHovered:I,handleToggle:M,handleColorSelect:E,handleCustomColorChange:F,handleCustomColorSubmit:j,handleClose:A,setIsFocused:x,setIsHovered:T,setValue:V,triggerRef:W,dropdownRef:D}},gr={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"}},Qg={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"}},Zg={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Rg={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"}},eh=[{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"}],al=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:l={},size:c="md",shape:g="default",variant:s="default",shadow:d,error:u=!1,isDisabled:f=!1,isReadOnly:m=!1,isFocused:p=!1,isHovered:y=!1,predefinedColors:k=eh,showCustomInput:b=!0,showRecentColors:w=!0,isOpen:C=!1,selectedColor:v="",recentColors:S=[],customColor:x="",handleToggle:I=()=>{},handleColorSelect:T=()=>{},handleCustomColorChange:W=()=>{},handleCustomColorSubmit:D=()=>{},handleClose:P,setIsFocused:M=()=>{},setIsHovered:E=()=>{},setValue:F,triggerRef:j,dropdownRef:A,onChange:V,onChangeComplete:H,onBlur:O,onFocus:G,onOpen:U,onClose:$,colorFormat:_,maxRecentColors:N,closeOnSelect:Q,value:B,defaultValue:L,"aria-label":X,...Z})=>{const{getColor:ee}=i.useTheme(),ae=h.useId(),re=e??ae,ie=`${re}-label`,R=`${re}-listbox`,ne=`${re}-helper-text`,se=`${re}-error-text`,he=!!u&&typeof u=="string",xe=[a?ne:null,he?se:null].filter(Boolean).join(" ")||void 0,ge={...gr.container,...l==null?void 0:l.container},le={...gr.trigger,...Qg[c],...Zg[g],...Rg[s],...u&&{borderColor:"color-red-500"},...f&&{opacity:.6,cursor:"not-allowed"},...p&&{borderColor:"theme-primary",boxShadow:"0 0 0 2px rgba(255, 255, 255, 1), 0 0 0 4px rgba(29, 78, 216, 0.16)"},...y&&!f&&{borderColor:"color-gray-400"},...l==null?void 0:l.trigger,...d&&d},Y={...gr.dropdown,...l==null?void 0:l.dropdown},q={...gr.colorGrid,...l==null?void 0:l.colorGrid},te={...gr.recentColors,...l==null?void 0:l.recentColors},K=v||"color-gray-200";return r.jsxs(i.View,{...ge,...Z,children:[t&&r.jsx(cr,{id:ie,htmlFor:re,size:c,isDisabled:f,error:u,views:l==null?void 0:l.label,children:t}),o&&r.jsx("input",{type:"hidden",name:o,value:Gr(v,_)}),r.jsxs(i.View,{ref:j,id:re,onClick:f||m?void 0:I,onKeyDown:J=>{f||m||(J.key==="Enter"||J.key===" ")&&(J.preventDefault(),I())},onMouseEnter:()=>E(!0),onMouseLeave:()=>E(!1),onFocus:()=>{M(!0),G&&G()},onBlur:J=>{M(!1),O&&O(J)},tabIndex:f?-1:0,role:"button","aria-expanded":C,"aria-haspopup":"listbox","aria-controls":C?R:void 0,"aria-labelledby":!X&&t?ie:void 0,"aria-label":X??(t?void 0:n),"aria-describedby":xe,"aria-invalid":u?!0:void 0,width:"fit-content",gap:8,...le,children:[r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"4px",backgroundColor:K,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-300"}),!m&&!f&&r.jsx(ye,{widthHeight:16,color:"color-gray-500",orientation:C?"up":"down"})]}),C&&r.jsxs(i.View,{ref:A,...Y,children:[r.jsx(i.View,{id:R,role:"listbox","aria-labelledby":t?ie:void 0,"aria-label":t?void 0:"Color options",...q,children:k.map((J,ue)=>r.jsx(i.View,{role:"option","aria-selected":v===J.value,"aria-label":J.name,tabIndex:0,width:"24px",height:"24px",borderRadius:"8px",backgroundColor:J.value,borderWidth:"2px",borderStyle:"solid",borderColor:v===J.value?"theme-primary":"transparent",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(J.value),onKeyDown:fe=>{(fe.key==="Enter"||fe.key===" ")&&(fe.preventDefault(),T(J.value))},title:J.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"},...l==null?void 0:l.colorSwatch},ue))}),w&&S.length>0&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Recent Colors"}),r.jsx(i.Horizontal,{gap:4,flexWrap:"wrap",...te,children:S.map((J,ue)=>r.jsx(i.View,{width:"20px",height:"20px",borderRadius:"8px",backgroundColor:J,borderWidth:"1px",borderStyle:"solid",borderColor:v===J?"theme-primary":"color-gray-300",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>T(J),title:J,_hover:{transform:"scale(1.05)",borderColor:"color-gray-400"}},ue))})]}),b&&r.jsxs(i.Vertical,{gap:8,marginTop:"16px",children:[r.jsx(i.Text,{fontSize:"12px",fontWeight:"500",color:"color-gray-600",children:"Custom Color"}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(Pe,{value:x,onChange:W,placeholder:"#000000 or rgb(0,0,0)","aria-label":"Custom color",size:"sm",style:{flex:1},views:l==null?void 0:l.customInput}),r.jsx(i.Element,{as:"button",type:"button",padding:"8px 12px",backgroundColor:"theme-primary",border:"none",borderRadius:"8px",cursor:"pointer",onClick:D,transition:"background-color 0.2s ease, opacity 0.2s ease",_hover:{backgroundColor:"color-blue-700"},children:r.jsx(i.Text,{color:"color-white",fontSize:"12px",fontWeight:"500",children:"Add"})})]})]})]}),a&&r.jsx(i.Text,{id:ne,fontSize:"12px",color:u?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:a}),he&&r.jsx(i.Text,{id:se,fontSize:"12px",color:"color-red-500",marginTop:"4px",...l==null?void 0:l.error,children:u})]})},oh=e=>{const o=nl(e);return r.jsx(al,{...o,...e})},en=[{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"}],ll=({placeholder:e})=>{const[o,t]=h.useState(en),[n,a]=h.useState(e??en[0].name),[l,c]=h.useState(!0),[g,s]=h.useState(!1),[d,u]=h.useState(!1);return{hide:l,setHide:c,newOptions:o,setNewOptions:t,isHovered:d,setIsHovered:u,isFocused:g,setIsFocused:s,value:n,setValue:a}},il={xs:8,sm:10,md:12,lg:14,xl:16},rh=({size:e,...o})=>r.jsx(i.Element,{as:"ul",...o}),th=e=>r.jsx(i.Input,{type:"text",...e}),nh=({size:e,...o})=>r.jsx(i.Element,{as:"li",...o}),ah=({id:e,option:o,size:t="md",isSelected:n=!1,isHighlighted:a=!1,callback:l=()=>{},views:c={text:{}}})=>{const g=s=>{s&&s.stopPropagation&&s.stopPropagation(),l(o??"")};return r.jsx(nh,{id:e,margin:0,role:"option","aria-selected":n,listStyleType:"none",fontWeight:"normal",paddingVertical:6,paddingHorizontal:12,onClick:g,fontSize:i.Typography.fontSizes[t],backgroundColor:a?"color-gray-100":void 0,_hover:{backgroundColor:"color-gray-100",transition:"all 0.15s ease-in-out"},...c.text,children:o})},lh=({id:e,size:o,views:t={dropDown:{}},options:n=[],selectedOption:a,highlightedIndex:l=-1,callback:c=()=>{}})=>{const g=s=>c(s);return r.jsx(rh,{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)",...t.dropDown,children:n.map((s,d)=>r.jsx(ah,{id:e?`${e}-option-${d}`:void 0,size:o,option:s.name,isSelected:s.name===a,isHighlighted:d===l,callback:g,...t.text},s.code))})},cl=({id:e,name:o,label:t,value:n,placeholder:a,helperText:l,hide:c=!1,error:g=!1,isHovered:s=!1,isFocused:d=!1,isAutoFocus:u=!1,isDisabled:f=!1,isReadOnly:m=!1,shadow:p={},newOptions:y=[],size:k="md",variant:b="default",shape:w="default",onChange:C,onBlur:v=()=>{},setHide:S=()=>{},setNewOptions:x=()=>{},setIsHovered:I=()=>{},setIsFocused:T=()=>{},setValue:W=()=>{},selected:D,views:P={text:{},icon:{},label:{},dropDown:{},helperText:{}},themeMode:M,...E})=>{const{getColor:F,themeMode:j}=i.useTheme(),A=h.useId(),V=e??A,H=`${V}-listbox`,[O,G]=h.useState(-1),U=F("color-gray-500",{themeMode:M||j}),$=()=>T(!0),_=ee=>{S(!c),G(-1),W(ee),C&&C(ee)},N=()=>{!f&&!m&&S(!c)},Q=ee=>{const ae=ee.target.value,re=en.filter(ie=>ie.name.toLowerCase().startsWith(ae.toLowerCase()));c&&S(!1),x(re),G(re.length>0?0:-1),C&&C(ae)},B=ee=>{f||m||(ee.key==="ArrowDown"?(ee.preventDefault(),c?(S(!1),G(y.length>0?0:-1)):G(Math.min(O+1,y.length-1))):ee.key==="ArrowUp"?c||(ee.preventDefault(),G(Math.max(O-1,0))):ee.key==="Enter"?!c&&O>=0&&y[O]&&(ee.preventDefault(),_(y[O].name)):ee.key==="Escape"&&(c||(S(!0),G(-1))))},L=ee=>{v(ee),T(!1)},X=!!t,Z={margin:0,paddingVertical:0,paddingHorizontal:0,width:"100%",height:"100%",border:"none",on:{focus:{outline:"none"}},transition:"all 0.2s ease-in-out",fontSize:i.Typography.fontSizes[k],backgroundColor:"transparent",color:f?"color-gray-400":"color-gray-900",cursor:f?"not-allowed":m?"auto":"pointer",...P.field};return r.jsxs(Je,{helperText:l,error:g,views:P,onClick:N,children:[r.jsxs(no,{label:t,size:k,error:g,shape:w,views:P,shadow:p,variant:b,value:n,color:"theme-primary",isDisabled:f,isReadOnly:m,isFocused:d,showLabel:X,_hover:!f&&!g?{borderColor:"theme-primary"}:void 0,children:[r.jsxs(Po,{children:[X&&r.jsx(fo,{htmlFor:V,color:"theme-primary",error:g,views:P,children:t}),r.jsx(th,{id:V,name:o,placeholder:a,readOnly:m,disabled:f,autoFocus:u,role:"combobox","aria-expanded":!c,"aria-controls":c?void 0:H,"aria-autocomplete":"list","aria-haspopup":"listbox","aria-activedescendant":!c&&O>=0?`${H}-option-${O}`:void 0,onBlur:L,onFocus:$,onKeyDown:B,...Z,...E,value:n,onChange:Q})]}),r.jsx(ir,{children:c?r.jsx(ye,{orientation:"down",widthHeight:il[k],color:U,style:P.icon}):r.jsx(ye,{orientation:"up",widthHeight:il[k],color:U,style:P.icon})})]}),!c&&r.jsx(lh,{id:H,size:k,views:P,options:y,selectedOption:n,highlightedIndex:O,callback:_})]})},ih=e=>{const o=ll(e);return r.jsx(cl,{...o,...e})};function Yr(e){"@babel/helpers - typeof";return Yr=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},Yr(e)}function Ae(e,o){if(o.length<e)throw new TypeError(e+" argument"+(e>1?"s":"")+" required, but only "+o.length+" present")}function ch(e){return Ae(1,arguments),e instanceof Date||Yr(e)==="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Ke(e){Ae(1,arguments);var o=Object.prototype.toString.call(e);return e instanceof Date||Yr(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 sh(e){if(Ae(1,arguments),!ch(e)&&typeof e!="number")return!1;var o=Ke(e);return!isNaN(Number(o))}function mo(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 dh(e,o){Ae(2,arguments);var t=Ke(e).getTime(),n=mo(o);return new Date(t+n)}function gh(e,o){Ae(2,arguments);var t=mo(o);return dh(e,-t)}var hh=864e5;function fh(e){Ae(1,arguments);var o=Ke(e),t=o.getTime();o.setUTCMonth(0,1),o.setUTCHours(0,0,0,0);var n=o.getTime(),a=t-n;return Math.floor(a/hh)+1}function Kr(e){Ae(1,arguments);var o=1,t=Ke(e),n=t.getUTCDay(),a=(n<o?7:0)+n-o;return t.setUTCDate(t.getUTCDate()-a),t.setUTCHours(0,0,0,0),t}function sl(e){Ae(1,arguments);var o=Ke(e),t=o.getUTCFullYear(),n=new Date(0);n.setUTCFullYear(t+1,0,4),n.setUTCHours(0,0,0,0);var a=Kr(n),l=new Date(0);l.setUTCFullYear(t,0,4),l.setUTCHours(0,0,0,0);var c=Kr(l);return o.getTime()>=a.getTime()?t+1:o.getTime()>=c.getTime()?t:t-1}function uh(e){Ae(1,arguments);var o=sl(e),t=new Date(0);t.setUTCFullYear(o,0,4),t.setUTCHours(0,0,0,0);var n=Kr(t);return n}var mh=6048e5;function ph(e){Ae(1,arguments);var o=Ke(e),t=Kr(o).getTime()-uh(o).getTime();return Math.round(t/mh)+1}var yh={};function Xr(){return yh}function Jr(e,o){var t,n,a,l,c,g,s,d;Ae(1,arguments);var u=Xr(),f=mo((t=(n=(a=(l=o==null?void 0:o.weekStartsOn)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(g=c.options)===null||g===void 0?void 0:g.weekStartsOn)!==null&&a!==void 0?a:u.weekStartsOn)!==null&&n!==void 0?n:(s=u.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.weekStartsOn)!==null&&t!==void 0?t:0);if(!(f>=0&&f<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");var m=Ke(e),p=m.getUTCDay(),y=(p<f?7:0)+p-f;return m.setUTCDate(m.getUTCDate()-y),m.setUTCHours(0,0,0,0),m}function dl(e,o){var t,n,a,l,c,g,s,d;Ae(1,arguments);var u=Ke(e),f=u.getUTCFullYear(),m=Xr(),p=mo((t=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(g=c.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&a!==void 0?a:m.firstWeekContainsDate)!==null&&n!==void 0?n:(s=m.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1);if(!(p>=1&&p<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var y=new Date(0);y.setUTCFullYear(f+1,0,p),y.setUTCHours(0,0,0,0);var k=Jr(y,o),b=new Date(0);b.setUTCFullYear(f,0,p),b.setUTCHours(0,0,0,0);var w=Jr(b,o);return u.getTime()>=k.getTime()?f+1:u.getTime()>=w.getTime()?f:f-1}function bh(e,o){var t,n,a,l,c,g,s,d;Ae(1,arguments);var u=Xr(),f=mo((t=(n=(a=(l=o==null?void 0:o.firstWeekContainsDate)!==null&&l!==void 0?l:o==null||(c=o.locale)===null||c===void 0||(g=c.options)===null||g===void 0?void 0:g.firstWeekContainsDate)!==null&&a!==void 0?a:u.firstWeekContainsDate)!==null&&n!==void 0?n:(s=u.locale)===null||s===void 0||(d=s.options)===null||d===void 0?void 0:d.firstWeekContainsDate)!==null&&t!==void 0?t:1),m=dl(e,o),p=new Date(0);p.setUTCFullYear(m,0,f),p.setUTCHours(0,0,0,0);var y=Jr(p,o);return y}var xh=6048e5;function kh(e,o){Ae(1,arguments);var t=Ke(e),n=Jr(t,o).getTime()-bh(t,o).getTime();return Math.round(n/xh)+1}function pe(e,o){for(var t=e<0?"-":"",n=Math.abs(e).toString();n.length<o;)n="0"+n;return t+n}var ao={y:function(o,t){var n=o.getUTCFullYear(),a=n>0?n:1-n;return pe(t==="yy"?a%100:a,t.length)},M:function(o,t){var n=o.getUTCMonth();return t==="M"?String(n+1):pe(n+1,2)},d:function(o,t){return pe(o.getUTCDate(),t.length)},a:function(o,t){var n=o.getUTCHours()/12>=1?"pm":"am";switch(t){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,t){return pe(o.getUTCHours()%12||12,t.length)},H:function(o,t){return pe(o.getUTCHours(),t.length)},m:function(o,t){return pe(o.getUTCMinutes(),t.length)},s:function(o,t){return pe(o.getUTCSeconds(),t.length)},S:function(o,t){var n=t.length,a=o.getUTCMilliseconds(),l=Math.floor(a*Math.pow(10,n-3));return pe(l,t.length)}},$o={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ch={G:function(o,t,n){var a=o.getUTCFullYear()>0?1:0;switch(t){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,t,n){if(t==="yo"){var a=o.getUTCFullYear(),l=a>0?a:1-a;return n.ordinalNumber(l,{unit:"year"})}return ao.y(o,t)},Y:function(o,t,n,a){var l=dl(o,a),c=l>0?l:1-l;if(t==="YY"){var g=c%100;return pe(g,2)}return t==="Yo"?n.ordinalNumber(c,{unit:"year"}):pe(c,t.length)},R:function(o,t){var n=sl(o);return pe(n,t.length)},u:function(o,t){var n=o.getUTCFullYear();return pe(n,t.length)},Q:function(o,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"Q":return String(a);case"QQ":return pe(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,t,n){var a=Math.ceil((o.getUTCMonth()+1)/3);switch(t){case"q":return String(a);case"qq":return pe(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,t,n){var a=o.getUTCMonth();switch(t){case"M":case"MM":return ao.M(o,t);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,t,n){var a=o.getUTCMonth();switch(t){case"L":return String(a+1);case"LL":return pe(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,t,n,a){var l=kh(o,a);return t==="wo"?n.ordinalNumber(l,{unit:"week"}):pe(l,t.length)},I:function(o,t,n){var a=ph(o);return t==="Io"?n.ordinalNumber(a,{unit:"week"}):pe(a,t.length)},d:function(o,t,n){return t==="do"?n.ordinalNumber(o.getUTCDate(),{unit:"date"}):ao.d(o,t)},D:function(o,t,n){var a=fh(o);return t==="Do"?n.ordinalNumber(a,{unit:"dayOfYear"}):pe(a,t.length)},E:function(o,t,n){var a=o.getUTCDay();switch(t){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,t,n,a){var l=o.getUTCDay(),c=(l-a.weekStartsOn+8)%7||7;switch(t){case"e":return String(c);case"ee":return pe(c,2);case"eo":return n.ordinalNumber(c,{unit:"day"});case"eee":return n.day(l,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(l,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(l,{width:"short",context:"formatting"});case"eeee":default:return n.day(l,{width:"wide",context:"formatting"})}},c:function(o,t,n,a){var l=o.getUTCDay(),c=(l-a.weekStartsOn+8)%7||7;switch(t){case"c":return String(c);case"cc":return pe(c,t.length);case"co":return n.ordinalNumber(c,{unit:"day"});case"ccc":return n.day(l,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(l,{width:"narrow",context:"standalone"});case"cccccc":return n.day(l,{width:"short",context:"standalone"});case"cccc":default:return n.day(l,{width:"wide",context:"standalone"})}},i:function(o,t,n){var a=o.getUTCDay(),l=a===0?7:a;switch(t){case"i":return String(l);case"ii":return pe(l,t.length);case"io":return n.ordinalNumber(l,{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,t,n){var a=o.getUTCHours(),l=a/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},b:function(o,t,n){var a=o.getUTCHours(),l;switch(a===12?l=$o.noon:a===0?l=$o.midnight:l=a/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},B:function(o,t,n){var a=o.getUTCHours(),l;switch(a>=17?l=$o.evening:a>=12?l=$o.afternoon:a>=4?l=$o.morning:l=$o.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(l,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(l,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(l,{width:"wide",context:"formatting"})}},h:function(o,t,n){if(t==="ho"){var a=o.getUTCHours()%12;return a===0&&(a=12),n.ordinalNumber(a,{unit:"hour"})}return ao.h(o,t)},H:function(o,t,n){return t==="Ho"?n.ordinalNumber(o.getUTCHours(),{unit:"hour"}):ao.H(o,t)},K:function(o,t,n){var a=o.getUTCHours()%12;return t==="Ko"?n.ordinalNumber(a,{unit:"hour"}):pe(a,t.length)},k:function(o,t,n){var a=o.getUTCHours();return a===0&&(a=24),t==="ko"?n.ordinalNumber(a,{unit:"hour"}):pe(a,t.length)},m:function(o,t,n){return t==="mo"?n.ordinalNumber(o.getUTCMinutes(),{unit:"minute"}):ao.m(o,t)},s:function(o,t,n){return t==="so"?n.ordinalNumber(o.getUTCSeconds(),{unit:"second"}):ao.s(o,t)},S:function(o,t){return ao.S(o,t)},X:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();if(c===0)return"Z";switch(t){case"X":return hl(c);case"XXXX":case"XX":return po(c);case"XXXXX":case"XXX":default:return po(c,":")}},x:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"x":return hl(c);case"xxxx":case"xx":return po(c);case"xxxxx":case"xxx":default:return po(c,":")}},O:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+gl(c,":");case"OOOO":default:return"GMT"+po(c,":")}},z:function(o,t,n,a){var l=a._originalDate||o,c=l.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+gl(c,":");case"zzzz":default:return"GMT"+po(c,":")}},t:function(o,t,n,a){var l=a._originalDate||o,c=Math.floor(l.getTime()/1e3);return pe(c,t.length)},T:function(o,t,n,a){var l=a._originalDate||o,c=l.getTime();return pe(c,t.length)}};function gl(e,o){var t=e>0?"-":"+",n=Math.abs(e),a=Math.floor(n/60),l=n%60;if(l===0)return t+String(a);var c=o;return t+String(a)+c+pe(l,2)}function hl(e,o){if(e%60===0){var t=e>0?"-":"+";return t+pe(Math.abs(e)/60,2)}return po(e,o)}function po(e,o){var t=o||"",n=e>0?"-":"+",a=Math.abs(e),l=pe(Math.floor(a/60),2),c=pe(a%60,2);return n+l+t+c}var fl=function(o,t){switch(o){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},ul=function(o,t){switch(o){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},wh=function(o,t){var n=o.match(/(P+)(p+)?/)||[],a=n[1],l=n[2];if(!l)return fl(o,t);var c;switch(a){case"P":c=t.dateTime({width:"short"});break;case"PP":c=t.dateTime({width:"medium"});break;case"PPP":c=t.dateTime({width:"long"});break;case"PPPP":default:c=t.dateTime({width:"full"});break}return c.replace("{{date}}",fl(a,t)).replace("{{time}}",ul(l,t))},Sh={p:ul,P:wh};function vh(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 Th=["D","DD"],Ih=["YY","YYYY"];function Fh(e){return Th.indexOf(e)!==-1}function zh(e){return Ih.indexOf(e)!==-1}function ml(e,o,t){if(e==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(o,"`) for formatting years to the input `").concat(t,"`; 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(t,"`; 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(t,"`; 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(t,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var Mh={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"}},jh=function(o,t,n){var a,l=Mh[o];return typeof l=="string"?a=l:t===1?a=l.one:a=l.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+a:a+" ago":a};function on(e){return function(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=o.width?String(o.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var Wh={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Eh={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Ah={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Hh={date:on({formats:Wh,defaultWidth:"full"}),time:on({formats:Eh,defaultWidth:"full"}),dateTime:on({formats:Ah,defaultWidth:"full"})},Vh={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ph=function(o,t,n,a){return Vh[o]};function hr(e){return function(o,t){var n=t!=null&&t.context?String(t.context):"standalone",a;if(n==="formatting"&&e.formattingValues){var l=e.defaultFormattingWidth||e.defaultWidth,c=t!=null&&t.width?String(t.width):l;a=e.formattingValues[c]||e.formattingValues[l]}else{var g=e.defaultWidth,s=t!=null&&t.width?String(t.width):e.defaultWidth;a=e.values[s]||e.values[g]}var d=e.argumentCallback?e.argumentCallback(o):o;return a[d]}}var Dh={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},$h={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Lh={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"]},Bh={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"]},_h={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"}},Oh={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"}},Nh=function(o,t){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"},qh={ordinalNumber:Nh,era:hr({values:Dh,defaultWidth:"wide"}),quarter:hr({values:$h,defaultWidth:"wide",argumentCallback:function(o){return o-1}}),month:hr({values:Lh,defaultWidth:"wide"}),day:hr({values:Bh,defaultWidth:"wide"}),dayPeriod:hr({values:_h,defaultWidth:"wide",formattingValues:Oh,defaultFormattingWidth:"wide"})};function fr(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,a=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],l=o.match(a);if(!l)return null;var c=l[0],g=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],s=Array.isArray(g)?Gh(g,function(f){return f.test(c)}):Uh(g,function(f){return f.test(c)}),d;d=e.valueCallback?e.valueCallback(s):s,d=t.valueCallback?t.valueCallback(d):d;var u=o.slice(c.length);return{value:d,rest:u}}}function Uh(e,o){for(var t in e)if(e.hasOwnProperty(t)&&o(e[t]))return t}function Gh(e,o){for(var t=0;t<e.length;t++)if(o(e[t]))return t}function Yh(e){return function(o){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=o.match(e.matchPattern);if(!n)return null;var a=n[0],l=o.match(e.parsePattern);if(!l)return null;var c=e.valueCallback?e.valueCallback(l[0]):l[0];c=t.valueCallback?t.valueCallback(c):c;var g=o.slice(a.length);return{value:c,rest:g}}}var Kh=/^(\d+)(th|st|nd|rd)?/i,Xh=/\d+/i,Jh={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},Qh={any:[/^b/i,/^(a|c)/i]},Zh={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Rh={any:[/1/i,/2/i,/3/i,/4/i]},ef={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},of={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]},rf={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},tf={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]},nf={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},af={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}},lf={ordinalNumber:Yh({matchPattern:Kh,parsePattern:Xh,valueCallback:function(o){return parseInt(o,10)}}),era:fr({matchPatterns:Jh,defaultMatchWidth:"wide",parsePatterns:Qh,defaultParseWidth:"any"}),quarter:fr({matchPatterns:Zh,defaultMatchWidth:"wide",parsePatterns:Rh,defaultParseWidth:"any",valueCallback:function(o){return o+1}}),month:fr({matchPatterns:ef,defaultMatchWidth:"wide",parsePatterns:of,defaultParseWidth:"any"}),day:fr({matchPatterns:rf,defaultMatchWidth:"wide",parsePatterns:tf,defaultParseWidth:"any"}),dayPeriod:fr({matchPatterns:nf,defaultMatchWidth:"any",parsePatterns:af,defaultParseWidth:"any"})},cf={code:"en-US",formatDistance:jh,formatLong:Hh,formatRelative:Ph,localize:qh,match:lf,options:{weekStartsOn:0,firstWeekContainsDate:1}},sf=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,df=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,gf=/^'([^]*?)'?$/,hf=/''/g,ff=/[a-zA-Z]/;function uf(e,o,t){var n,a,l,c,g,s,d,u,f,m,p,y,k,b;Ae(2,arguments);var w=String(o),C=Xr(),v=(n=(a=void 0)!==null&&a!==void 0?a:C.locale)!==null&&n!==void 0?n:cf,S=mo((l=(c=(g=(s=void 0)!==null&&s!==void 0?s:void 0)!==null&&g!==void 0?g:C.firstWeekContainsDate)!==null&&c!==void 0?c:(d=C.locale)===null||d===void 0||(u=d.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&l!==void 0?l:1);if(!(S>=1&&S<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var x=mo((f=(m=(p=(y=void 0)!==null&&y!==void 0?y:void 0)!==null&&p!==void 0?p:C.weekStartsOn)!==null&&m!==void 0?m:(k=C.locale)===null||k===void 0||(b=k.options)===null||b===void 0?void 0:b.weekStartsOn)!==null&&f!==void 0?f:0);if(!(x>=0&&x<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!v.localize)throw new RangeError("locale must contain localize property");if(!v.formatLong)throw new RangeError("locale must contain formatLong property");var I=Ke(e);if(!sh(I))throw new RangeError("Invalid time value");var T=vh(I),W=gh(I,T),D={firstWeekContainsDate:S,weekStartsOn:x,locale:v,_originalDate:I},P=w.match(df).map(function(M){var E=M[0];if(E==="p"||E==="P"){var F=Sh[E];return F(M,v.formatLong)}return M}).join("").match(sf).map(function(M){if(M==="''")return"'";var E=M[0];if(E==="'")return mf(M);var F=Ch[E];if(F)return zh(M)&&ml(M,o,String(e)),Fh(M)&&ml(M,o,String(e)),F(W,M,v.localize,D);if(E.match(ff))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return M}).join("");return P}function mf(e){var o=e.match(gf);return o?o[1].replace(hf,"'"):e}const rn=e=>typeof e=="string"?e:void 0,pl=({value:e,defaultValue:o}={})=>{const[t,n]=h.useState(!1),[a,l]=h.useState(!1),[c,g]=h.useState(()=>rn(e)??rn(o)??uf(new Date,"yyyy-MM-dd")),s=rn(e);return h.useEffect(()=>{s!==void 0&&g(s)},[s]),{date:c,setDate:g,isHovered:t,setIsHovered:n,isFocused:a,setIsFocused:l}},pf=e=>r.jsx(i.Input,{type:"date",...e}),yl=({id:e,name:o,label:t,date:n,children:a,helperText:l,shadow:c={},size:g="md",variant:s="default",shape:d="default",views:u={container:{},label:{},helperText:{},text:{},field:{}},error:f=!1,isHovered:m=!1,isFocused:p=!1,isDisabled:y=!1,isReadOnly:k=!1,setDate:b=()=>{},setIsFocused:w=()=>{},setIsHovered:C=()=>{},onChange:v,onChangeText:S,value:x,defaultValue:I,...T})=>{const{themeMode:W}=i.useTheme(),D=h.useId(),P=e??D,M=!!t,E=()=>C(!m),F=()=>w(!0),j=V=>{typeof V=="string"?(b(V),S&&S(V)):(b(V.target.value),v&&v(V.target.value))},A={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:i.Typography.fontSizes[g],backgroundColor:"transparent",color:y?"color-gray-400":"color-gray-900",cursor:y?"not-allowed":k?"auto":"pointer",...u.field};return r.jsx(Je,{helperText:l,error:f,views:u,children:r.jsx(no,{label:t,size:g,error:f,shape:d,views:u,shadow:c,color:"theme-primary",variant:s,value:n,isHovered:m,isDisabled:y,isReadOnly:k,isFocused:p,showLabel:M,onMouseEnter:E,onMouseLeave:E,children:r.jsxs(Po,{children:[M&&r.jsx(fo,{htmlFor:P,color:"theme-primary",error:f,views:u,children:t}),r.jsx(pf,{id:P,name:o,role:"textbox","aria-label":!M&&typeof t=="string"?t:void 0,onFocus:F,disabled:y,readOnly:k,...A,...T,...S&&{onChangeText:j},onChange:j,value:n})]})})})},yf=e=>{const o=pl(e);return r.jsx(yl,{...o,...e})},bl=e=>{const o=Kt(e),[t,n]=h.useState(!1);return{isVisible:t,setIsVisible:n,...e,...o}},xl={xs:14,sm:16,md:16,lg:18,xl:20},bf=({visibleIcon:e,hiddenIcon:o,...t})=>{const{isVisible:n,setIsVisible:a,...l}=bl(t),c=xl[t.size??"md"]??xl.md,g=c-2;return r.jsx(dr,{...l,type:n?"text":"password",isClearable:!1,right:r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",width:`${c}px`,height:`${c}px`,minWidth:`${c}px`,color:"color-gray-500",cursor:t.isDisabled?"not-allowed":"pointer",transition:"color 0.2s ease",onClick:()=>{t.isDisabled||a(!n)},children:n?e??r.jsx(Wt,{widthHeight:g}):o??r.jsx(jt,{widthHeight:g})})})},kl=(e,o,t)=>{const[n,a]=h.useState(e),[l,c]=h.useState(o?{value:o,label:o}:e[0]),[g,s]=h.useState([]),[d,u]=h.useState(0),[f,m]=h.useState(t??""),[p,y]=h.useState(!1);return{filteredItems:n,setFilteredItems:a,selectedItem:l,setSelectedItem:c,selectedItems:g,setSelectedItems:s,highlightedIndex:d,setHighlightedIndex:u,searchQuery:f,setSearchQuery:m,isDropdownVisible:p,setIsDropdownVisible:y}},xf={xs:12,sm:14,md:16,lg:20,xl:24},kf={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)"},Cl={enter:{opacity:1,transform:"translateY(0) scale(1)",transition:"all 0.2s ease-in-out"},initial:{opacity:0,transform:"translateY(-8px) scale(0.96)"}},Cf={padding:"8px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-100",backgroundColor:"color-gray-50",borderTopLeftRadius:10,borderTopRightRadius:10},wf={padding:"8px 10px",cursor:"pointer",borderRadius:8,margin:"1px 4px",transition:"all 0.15s ease-in-out"},Sf={padding:"24px 16px",display:"flex",flexDirection:"column",alignItems:"center",gap:"8px"},wl={open:{transform:"rotate(180deg)",transition:"all 0.2s ease-in-out"},closed:{transform:"rotate(0deg)",transition:"all 0.2s ease-in-out"}},vf={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"},Sl=({placeholder:e,items:o,showTick:t=!0,onSelect:n,searchEnabled:a=!0,left:l,right:c,label:g,filteredItems:s,setSelectedItem:d,selectedItem:u,selectedItems:f,setSelectedItems:m,highlightedIndex:p,setHighlightedIndex:y,searchQuery:k,setSearchQuery:b,setFilteredItems:w,views:C,isDropdownVisible:v,setIsDropdownVisible:S,isMulti:x=!1,searchPlaceholder:I,size:T="md",...W})=>{const D=h.useId(),P=W.id??D,M=`${P}-dropdown`,E=`${P}-label`,{ref:F,relation:j}=i.useElementPosition({trackChanges:!0,trackOnScroll:!0,trackOnResize:!0,throttleMs:10}),A=h.useRef(null),[V,H]=h.useState(!1),[O,G]=h.useState(!1),U=()=>{var ee;const B=O?Cl.enter:Cl.initial;if(!F.current)return{};const L=F.current.getBoundingClientRect(),X={position:"fixed",left:L.left,width:L.width,zIndex:1e4,...B};return((ee=j==null?void 0:j.space)==null?void 0:ee.vertical)==="top"?{...X,bottom:window.innerHeight-L.top+6}:{...X,top:L.bottom+6}};h.useEffect(()=>{if(v){const B=setTimeout(()=>G(!0),10);return()=>clearTimeout(B)}G(!1)},[v]),h.useEffect(()=>{const B=L=>{!L.composedPath().some(ee=>(ee==null?void 0:ee.id)===M)&&F.current&&!F.current.contains(L.target)&&S(!1)};return document.addEventListener("mousedown",B),()=>document.removeEventListener("mousedown",B)},[]);const $=B=>{if(b(B),B==="")w(o);else{const L=o.filter(X=>X.label.toLowerCase().includes(B.toLowerCase()));w(L)}y(0)},_=B=>{if(x){const L=f.some(Z=>Z.value===B.value);let X;L?X=f.filter(Z=>Z.value!==B.value):X=[...f,B],m(X),n==null||n(X)}else d(B),n==null||n(B),S(!1)},N=(B,L)=>{B.stopPropagation();const X=f.filter(Z=>Z.value!==L.value);m(X),n==null||n(X)},Q=B=>x?f.some(L=>L.value===B.value):B.value===u.value;return r.jsxs(i.Horizontal,{flexWrap:"nowrap",gap:15,alignItems:"center",width:"100%",...W,children:[g&&r.jsx(i.Text,{id:E,views:C==null?void 0:C.label,children:g}),r.jsxs(i.View,{position:"relative",width:"100%",children:[r.jsx("div",{ref:F,role:"combobox",tabIndex:0,"aria-expanded":v,"aria-haspopup":"listbox","aria-controls":v?M:void 0,"aria-labelledby":g?E:void 0,onClick:()=>S(!v),onKeyDown:B=>{B.key==="Enter"||B.key===" "||B.key==="ArrowDown"?(B.preventDefault(),S(!0)):B.key==="Escape"&&S(!1)},style:{width:"100%"},children:r.jsxs(no,{size:T,isHovered:V,isFocused:v,onMouseEnter:()=>H(!0),onMouseLeave:()=>H(!1),cursor:"pointer",views:{container:C==null?void 0:C.container},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",flex:1,minWidth:0,flexWrap:x?"wrap":"nowrap",...C==null?void 0:C.labelContainer,children:[l,x?f.length>0?r.jsx(i.Horizontal,{gap:6,flexWrap:"wrap",alignItems:"center",children:f.map(B=>r.jsxs(i.Horizontal,{...vf,_hover:{backgroundColor:"color-gray-200"},children:[B.icon&&r.jsx(i.View,{flexShrink:0,children:B.icon}),r.jsx(i.Text,{size:"sm",color:"color-gray-700",weight:"medium",children:B.label}),r.jsx($e,{widthHeight:12,color:"color-gray-500",cursor:"pointer",onClick:L=>N(L,B)})]},B.value))}):r.jsx(i.Text,{weight:"medium",flexGrow:1,color:"color-gray-500",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...C==null?void 0:C.label,children:e}):r.jsxs(r.Fragment,{children:[u.icon&&u.label!==e&&r.jsx(i.View,{children:u.icon}),r.jsx(i.Text,{weight:"medium",flexGrow:1,color:u.label===e?"color-gray-500":"color-gray-800",style:{whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},...C==null?void 0:C.label,children:u.label})]})]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",flexShrink:0,children:[c,r.jsx(i.View,{style:v?wl.open:wl.closed,children:r.jsx(ye,{widthHeight:xf[T],orientation:"down",color:v?"color-gray-700":"color-gray-400"})})]})]})}),v&&r.jsx(or,{children:r.jsxs(i.View,{ref:A,id:M,role:"listbox","aria-labelledby":g?E:void 0,...kf,style:U(),...C==null?void 0:C.dropdown,children:[a&&r.jsx(i.View,{...Cf,children:r.jsx(dr,{id:`${P}-search`,name:`${W.name??P}-search`,width:"100%",type:"search",autoFocus:!0,value:k,onChange:B=>$(B),hint:I||e||"Search...","aria-label":I||"Search",isClearable:!1,left:r.jsx(jr,{widthHeight:14,color:"color-gray-400"}),views:{container:{width:"100%",padding:"0",backgroundColor:"transparent",borderColor:"color-gray-200",...C==null?void 0:C.text},field:{fontSize:"13px"}}})}),s.length>0&&r.jsx(i.View,{margin:0,padding:"4px",children:s.map((B,L)=>{const X=Q(B),Z=L===p;return r.jsxs(i.Horizontal,{role:"option","aria-selected":X,justifyContent:"space-between",alignItems:"center",...wf,backgroundColor:X&&Z?"color-blue-100":X?"color-blue-50":Z?"color-gray-100":"transparent",onMouseEnter:()=>y(L),onClick:()=>_(B),...C==null?void 0:C.item,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[B.icon&&r.jsx(i.View,{flexShrink:0,children:B.icon}),r.jsx(i.Text,{size:"sm",color:X?"theme-primary":"color-gray-800",weight:X?"medium":"normal",children:B.label})]}),X&&t&&r.jsx(nr,{widthHeight:16,color:"theme-primary"})]},B.value)})}),s.length===0&&r.jsxs(i.Vertical,{...Sf,children:[r.jsx(jr,{widthHeight:24,color:"color-gray-300"}),r.jsx(i.Text,{color:"color-gray-500",size:"sm",align:"center",children:"No results found"}),r.jsx(i.Text,{color:"color-gray-400",size:"xs",align:"center",children:"Try a different search term"})]})]})})]})]})},Tf=({id:e,name:o,items:t,placeholder:n,searchPlaceholder:a,...l})=>{const c=kl(t,n,a);return r.jsx(Sl,{id:e,name:o,items:t,searchPlaceholder:a,...c,...l})},vl=e=>{const{tags:o,defaultTags:t=[],onTagsChange:n,onTagAdd:a,onTagRemove:l,maxTags:c,minTagLength:g=1,maxTagLength:s=50,allowDuplicates:d=!1,separators:u=["enter","comma"],isDisabled:f=!1,isReadOnly:m=!1}=e,[p,y]=h.useState(""),[k,b]=h.useState(()=>(o||t||[]).map((j,A)=>({id:`tag-${A}-${Date.now()}`,value:j}))),[w,C]=h.useState(!1),[v,S]=h.useState(!1),x=o&&Array.isArray(o)?o.map((F,j)=>({id:`tag-${j}-${Date.now()}`,value:F})):k;h.useEffect(()=>{o&&Array.isArray(o)&&b(o.map((F,j)=>({id:`tag-${j}-${Date.now()}`,value:F})))},[o]);const I=h.useCallback(F=>{const j=F.trim();return!(j.length<g||j.length>s||!d&&x.map(V=>V.value.toLowerCase()).includes(j.toLowerCase())||c&&x.length>=c)},[x,g,s,d,c]),T=h.useCallback(F=>{if(f||m)return;const j=F.trim();if(!j||!I(j))return;const A={id:`tag-${Date.now()}-${Math.random()}`,value:j},V=[...x,A],H=V.map(O=>O.value);o||b(V),n==null||n(H),a==null||a(j),y("")},[x,I,n,a,f,m,o]),W=h.useCallback(F=>{if(f||m)return;const j=x[F];if(!j)return;const A=x.filter((H,O)=>O!==F),V=A.map(H=>H.value);o||b(A),n==null||n(V),l==null||l(j.value,F)},[x,n,l,f,m,o]),D=h.useCallback(F=>{if(f||m)return;const j=F.target.value;if(u.includes("comma")&&j.includes(",")){const A=j.split(","),V=A[0],H=A.slice(1).join(",");V.trim()&&T(V),y(H);return}y(j)},[T,u,f,m]),P=h.useCallback(F=>{if(f||m)return;const{key:j}=F;if(u.includes("enter")&&j==="Enter"){F.preventDefault(),p.trim()&&T(p);return}if(u.includes("tab")&&j==="Tab"&&p.trim()){F.preventDefault(),T(p);return}if(u.includes("space")&&j===" "&&p.trim()){F.preventDefault(),T(p);return}if(j==="Backspace"&&!p&&x.length>0){F.preventDefault(),W(x.length-1);return}},[T,W,p,x,u,f,m]),M=h.useCallback(()=>{var F;C(!0),(F=e.onFocus)==null||F.call(e)},[e.onFocus]),E=h.useCallback(()=>{var F;C(!1),p.trim()&&T(p),(F=e.onBlur)==null||F.call(e)},[T,p,e.onBlur]);return{inputValue:p,setInputValue:y,tags:x,setTags:b,isFocused:w,setIsFocused:C,isHovered:v,setIsHovered:S,addTag:T,removeTag:W,handleInputChange:D,handleKeyDown:P,handleFocus:M,handleBlur:E,validateTag:I}},If=({tag:e,onRemove:o,isRemovable:t,size:n,views:a,isDisabled:l,isReadOnly:c})=>{const[g,s]=h.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 r.jsxs(i.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:l?.6:1,maxWidth:"100%",minWidth:0,_hover:!l&&!c?{backgroundColor:"theme-primary-180",borderColor:"theme-primary-400"}:{},...a==null?void 0:a.tag,children:[r.jsx(i.Text,{fontSize:d.fontSize,color:l?"color-gray-400":"theme-primary",maxLines:1,minWidth:0,...a==null?void 0:a.tagText,children:e}),t&&!l&&!c&&r.jsx(i.View,{cursor:"pointer",padding:"2px",borderRadius:"50%",transition:"all 0.15s ease-in-out",backgroundColor:g?"color-red-100":"transparent",opacity:g?1:.7,onMouseEnter:()=>s(!0),onMouseLeave:()=>s(!1),onClick:u=>{u.stopPropagation(),o()},_hover:{backgroundColor:"color-red-100"},...a==null?void 0:a.tagRemove,children:r.jsx($e,{widthHeight:d.iconSize,color:g?"color-red-500":"color-gray-400"})})]})},Tl=({id:e,name:o,label:t,placeholder:n="Type and press Enter to add tags...",helperText:a,error:l=!1,inputValue:c="",tags:g=[],left:s,right:d,shadow:u={},views:f={},size:m="md",shape:p="default",variant:y="default",isDisabled:k=!1,isReadOnly:b=!1,isAutoFocus:w=!1,isRemovable:C=!0,isFocused:v=!1,isHovered:S=!1,maxTags:x,handleInputChange:I,handleKeyDown:T,handleFocus:W,handleBlur:D,removeTag:P,setIsHovered:M,onClick:E,setInputValue:F,setIsFocused:j,addTag:A,defaultTags:V,onTagsChange:H,onTagAdd:O,onTagRemove:G,minTagLength:U,maxTagLength:$,allowDuplicates:_,separators:N,menuItems:Q,onMenuItemSelect:B,onFocus:L,onBlur:X,validateTag:Z,...ee})=>{const{getColor:ae,themeMode:re}=i.useTheme(),ie=!!(t&&(v||g.length>0||c)),R=x&&g.length>=x,ne={border:"none",outline:"none",backgroundColor:"transparent",fontSize:i.Typography.fontSizes[m],color:k?"color-gray-400":"color-gray-800",flex:1,minWidth:"120px",transition:"all 0.2s ease-in-out",...f==null?void 0:f.input};return r.jsx(Je,{error:!!l,helperText:typeof l=="string"?l:a,views:f,...ee,children:r.jsxs(no,{label:t,shadow:u,value:g.length>0||c?"has-content":"",size:m,shape:p,variant:y,error:!!l,showLabel:ie,isFocused:v,isHovered:S,isDisabled:k,isReadOnly:b,views:{...f,container:{...f==null?void 0:f.container,...f==null?void 0:f.inputContainer}},onClick:E,onMouseEnter:()=>M==null?void 0:M(!0),onMouseLeave:()=>M==null?void 0:M(!1),children:[s,r.jsxs(Po,{children:[t&&r.jsx(fo,{size:m,error:!!l,views:f,children:t}),r.jsxs(i.Horizontal,{alignItems:"center",gap:8,flexWrap:"wrap",width:"100%",minHeight:i.Typography.fontSizes[m],padding:"0",...f==null?void 0:f.tagsContainer,children:[g.map((se,he)=>r.jsx(If,{tag:se.value,onRemove:()=>P==null?void 0:P(he),isRemovable:C,size:m,views:f,isDisabled:k,isReadOnly:b},se.id)),!R&&r.jsx(i.Input,{id:e,name:o,type:"text",value:c,placeholder:g.length===0?n:"",disabled:k,readOnly:b,autoFocus:w,onChange:I,onKeyDown:T,onFocus:W,onBlur:D,autoComplete:"off",...ne}),R&&r.jsxs(i.Text,{fontSize:i.Typography.fontSizes[m],color:"color-gray-500",fontStyle:"italic",...f==null?void 0:f.placeholder,children:["Maximum ",x," tags reached"]})]})]}),d]})})},Ff=e=>{const o=vl(e),{tags:t,...n}=e,{setTags:a,...l}=o;return r.jsx(Tl,{...l,...n})};function zf(e){const o=setTimeout(e,0),t=setTimeout(e,10),n=setTimeout(e,50);return[o,t,n]}const Il=({value:e,defaultValue:o="",length:t=6,onChange:n,onChangeText:a,onComplete:l,onKeyDown:c,onKeyPress:g,onBlur:s,onFocus:d,isReadOnly:u,isDisabled:f,pattern:m,stepValues:p,pasteTransformer:y})=>{var Q,B;const k=e!==void 0,b=k?e:o,[w,C]=h.useState(String(b??"").slice(0,t)||""),[v,S]=h.useState(!1),[x,I]=h.useState(!1),[T,W]=h.useState(null),[D,P]=h.useState(null),M=h.useRef(null),E=h.useRef(null),F=h.useRef({value:w,onChange:n||(()=>{}),isIOS:typeof window<"u"&&((B=(Q=window==null?void 0:window.CSS)==null?void 0:Q.supports)==null?void 0:B.call(Q,"-webkit-touch-callout","none"))}),j=h.useRef({prev:[null,null,"none"]}),A=m?typeof m=="string"?new RegExp(m):m:null;h.useEffect(()=>{if(k&&e!==w){const L=String(e??"").slice(0,t)||"";C(L)}},[k,e,t,w]);const V=h.useCallback(L=>{let X=L;if(p&&p.length>0&&L){const Z=parseInt(L,10);if(!isNaN(Z)){let ee=p[0],ae=Math.abs(Z-ee);for(let re=1;re<p.length;re++){const ie=Math.abs(Z-p[re]);ie<ae&&(ae=ie,ee=p[re])}X=ee.toString()}}C(X),n&&n(X),a&&a(X),l&&X.length===t&&l(X)},[n,a,l,t,p,k]),H=h.useCallback(L=>{L&&M.current!==L&&Object.defineProperty(M,"current",{value:L,writable:!0})},[]),O=h.useCallback(L=>{var ee,ae,re,ie;const X=typeof L=="string"?L:((ee=L==null?void 0:L.currentTarget)==null?void 0:ee.value)??((ae=L==null?void 0:L.target)==null?void 0:ae.value)??((re=L==null?void 0:L.nativeEvent)==null?void 0:re.text)??"",Z=String(X).slice(0,t);if(Z.length>0&&A&&!A.test(Z)){(ie=L==null?void 0:L.preventDefault)==null||ie.call(L);return}V(Z),M.current&&(M.current.value=Z)},[t,A,V,M]),G=h.useCallback(()=>{const L=M.current;if(L&&typeof L.setSelectionRange=="function"){const X=typeof L.value=="string"?L.value.length:0,Z=Math.min(X,t-1),ee=X;L.setSelectionRange(Z,ee),W(Z),P(ee)}S(!0),d&&d()},[t,d]),U=h.useCallback(L=>{S(!1),s&&s(L)},[s]),$=h.useCallback(L=>{c&&c(L)},[]),_=h.useCallback(L=>{g&&g(L)},[]),N=h.useCallback(L=>{const X=M.current;if(!L.clipboardData||!X)return;const Z=L.clipboardData.getData("text/plain"),ee=y?y(Z):Z;L.preventDefault();const ae=X.selectionStart||0,re=X.selectionEnd||0,ne=(ae!==re?w.slice(0,ae)+ee+w.slice(re):w.slice(0,ae)+ee+w.slice(ae)).slice(0,t);if(ne.length>0&&A&&!A.test(ne))return;X.value=ne,V(ne),C(ne);const se=Math.min(ne.length,t-1),he=ne.length;X.setSelectionRange(se,he),W(se),P(he)},[t,y,A,V,w,C]);return h.useEffect(()=>{const L=M.current,X=E.current;if(!L||!X||typeof document>"u")return;F.current.value!==L.value&&F.current.onChange&&F.current.onChange(L.value),j.current.prev=[L.selectionStart,L.selectionEnd,L.selectionDirection];function Z(){if(document.activeElement!==L){W(null),P(null);return}const R=(L==null?void 0:L.selectionStart)??null,ne=(L==null?void 0:L.selectionEnd)??null,se=(L==null?void 0:L.selectionDirection)??null,he=(L==null?void 0:L.maxLength)??0,xe=(L==null?void 0:L.value)??"",ge=j.current.prev;let le=-1,Y=-1,q="none";if(xe.length!==0&&R!==null&&ne!==null){const ue=R===ne,fe=R===xe.length&&xe.length<he;if(ue&&!fe){const ce=R;if(ce===0)le=0,Y=1,q="forward";else if(ce===he)le=ce-1,Y=ce,q="backward";else if(he>1&&xe.length>1){let de=0;if(ge[0]!==null&&ge[1]!==null){q=ce<ge[1]?"backward":"forward";const Se=ge[0]===ge[1]&&ge[0]<he;q==="backward"&&!Se&&(de=-1)}le=de+ce,Y=de+ce+1}}le!==-1&&Y!==-1&&le!==Y&&M.current&&M.current.setSelectionRange(le,Y,q)}const te=le!==-1?le:R,K=Y!==-1?Y:ne,J=q!=="none"?q:se;W(te),P(K),j.current.prev=[te,K,J]}document.addEventListener("selectionchange",Z,{capture:!0}),Z(),document.activeElement===L&&S(!0);const ee=X,ae=()=>{var R;ee&&typeof((R=ee.style)==null?void 0:R.setProperty)=="function"&&ee.style.setProperty("--root-height",`${L.clientHeight}px`)};ae();const re=typeof window<"u"?window.ResizeObserver:void 0,ie=typeof re=="function"?new re(ae):null;return ie==null||ie.observe(L),()=>{document.removeEventListener("selectionchange",Z,{capture:!0}),ie==null||ie.disconnect()}},[]),h.useEffect(()=>{if(typeof Event>"u")return;const L=zf(()=>{var re,ie,R;const X=M.current;X&&typeof X.dispatchEvent=="function"&&X.dispatchEvent(new Event("input"));const Z=(re=M.current)==null?void 0:re.selectionStart,ee=(ie=M.current)==null?void 0:ie.selectionEnd,ae=(R=M.current)==null?void 0:R.selectionDirection;Z!==null&&ee!==null&&Z!==void 0&&ee!==void 0&&(W(Z),P(ee),j.current.prev=[Z,ee,ae||"none"])});return()=>L.forEach(clearTimeout)},[w,v]),{value:w,setValue:V,isFocused:v,setIsFocused:S,isHovered:x,setIsHovered:I,inputRef:M,containerRef:E,mirrorSelectionStart:T,mirrorSelectionEnd:D,setMirrorSelectionStart:W,setMirrorSelectionEnd:P,setInputRef:H,handleChange:O,handleFocus:G,handleBlur:U,handleKeyDown:$,handleKeyPress:_,handlePaste:N}},Mf=h.createContext({slots:[],isFocused:!1,isHovering:!1}),jf=`
|
|
7
7
|
@keyframes blink {
|
|
8
8
|
0%, 100% { opacity: 1; }
|
|
9
9
|
50% { opacity: 0; }
|
|
@@ -20,17 +20,49 @@
|
|
|
20
20
|
border-radius: 4px !important;
|
|
21
21
|
width: 100% !important;
|
|
22
22
|
}
|
|
23
|
-
`;function
|
|
24
|
-
`);
|
|
23
|
+
`;function Lo(e,o){try{e.insertRule(o)}catch{console.error("input-otp could not insert CSS rule:",o)}}const Fl=({id:e,name:o,label:t,value:n="",length:a=6,onChange:l,onChangeText:c,onComplete:g,helperText:s,placeholder:d="",shadow:u,views:f={},size:m="md",shape:p="rounded",variant:y="outline",gap:k=8,type:b="text",error:w=!1,isFocused:C=!1,isHovered:v=!1,isDisabled:S=!1,isReadOnly:x=!1,isAutoFocus:I=!1,setValue:T,setIsFocused:W,setIsHovered:D,inputRef:P,containerRef:M,mirrorSelectionStart:E,mirrorSelectionEnd:F,setMirrorSelectionStart:j,setMirrorSelectionEnd:A,handlePaste:V,handleChange:H,handleFocus:O,handleBlur:G,handleKeyDown:U,handleKeyPress:$,secureTextEntry:_,stepValues:N,setInputRef:Q,onBlur:B=()=>{},onClick:L=()=>{},onFocus:X=()=>{},onKeyPress:Z,pattern:ee,pasteTransformer:ae,...re})=>{i.useTheme();const ie=h.useId(),R=e??o??ie,ne=!!t,se=h.useMemo(()=>({slots:Array.from({length:a}).map((ge,le)=>{const Y=C&&E!==null&&F!==null&&(E===F&&le===E||le>=E&&le<F),q=n[le]!==void 0?n[le]:null,te=n[0]!==void 0?null:(d==null?void 0:d[le])??null;return{char:q,placeholderChar:te,isActive:Y,hasFakeCaret:Y&&q===null}}),isFocused:C,isHovering:!S&&v}),[C,v,S,a,F,E,d,n]);h.useEffect(()=>{I&&P.current&&P.current.focus()},[I,P]),h.useEffect(()=>{if(!document.getElementById("input-otp-style")){const ge=document.createElement("style");if(ge.id="input-otp-style",document.head.appendChild(ge),ge.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;";Lo(ge.sheet,"@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }"),Lo(ge.sheet,"[data-input-otp]::selection { background: transparent !important; color: transparent !important; }"),Lo(ge.sheet,`[data-input-otp]:autofill { ${le} }`),Lo(ge.sheet,`[data-input-otp]:-webkit-autofill { ${le} }`),Lo(ge.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; } }"),Lo(ge.sheet,"[data-input-otp] + * { pointer-events: all !important; }")}}},[]);const he=()=>r.jsx(i.Horizontal,{gap:k,width:"100%",justifyContent:"center",minHeight:m==="xs"?"32px":m==="sm"?"36px":m==="md"?"40px":m==="lg"?"48px":"56px",...f.container,children:se.slots.map((ge,le)=>r.jsxs(no,{size:m,error:w,shape:p,views:f,variant:y,value:ge.char||"",color:"theme-primary",isHovered:v,isDisabled:S,isReadOnly:x,isFocused:ge.isActive,showLabel:!1,onMouseEnter:()=>D(!0),onMouseLeave:()=>D(!1),justifyContent:"center",alignItems:"center",width:"100%",position:"relative",height:m==="xs"?"32px":m==="sm"?"36px":m==="md"?"40px":m==="lg"?"48px":"56px",...f.container,children:[ge.char?r.jsx(i.View,{textAlign:"center",fontSize:m==="xs"?"14px":m==="sm"?"16px":m==="md"?"18px":m==="lg"?"20px":"24px",fontWeight:"medium",...f.text,children:b==="password"?"•":ge.char}):ge.placeholderChar?r.jsx(i.View,{textAlign:"center",fontSize:m==="xs"?"14px":m==="sm"?"16px":m==="md"?"18px":m==="lg"?"20px":"24px",color:"color-gray-400",opacity:.5,...f.text,children:ge.placeholderChar}):null,ge.hasFakeCaret&&r.jsx(i.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}`))}),xe={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 r.jsxs(r.Fragment,{children:[r.jsx("noscript",{children:r.jsx("style",{children:jf})}),r.jsxs(Je,{helperText:s,error:w,views:f,children:[ne&&r.jsx(fo,{htmlFor:R,color:"theme-primary",error:w,...f.label,children:t}),r.jsxs(i.View,{ref:M,"data-input-otp-container":!0,position:"relative",cursor:S?"default":"text",userSelect:"none",pointerEvents:"none",children:[r.jsx(Mf.Provider,{value:se,children:he()}),r.jsx(i.View,{position:"absolute",inset:0,pointerEvents:"none",children:r.jsx(i.Input,{ref:ge=>Q(ge),"data-input-otp":!0,"data-input-otp-placeholder-shown":n.length===0||void 0,"data-input-otp-mss":E,"data-input-otp-mse":F,id:R,name:o,type:b==="password"?"password":"text",inputMode:b!=="password"?"numeric":void 0,pattern:"[0-9]*",maxLength:a,readOnly:x,disabled:S,placeholder:d,value:n,onChange:H,onKeyDown:U,onPaste:V,onFocus:O,onBlur:G,onClick:L,onMouseOver:()=>D(!0),onMouseLeave:()=>D(!1),autoComplete:"one-time-code","aria-label":ne?void 0:`OTP input with ${a} digits`,style:xe,...re,...f.input})})]})]})]})},Wf=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},zl=e=>{const{value:o}=e,{value:t,setValue:n,isFocused:a,setIsFocused:l,isHovered:c,setIsHovered:g,inputRef:s,containerRef:d,mirrorSelectionStart:u,mirrorSelectionEnd:f,setMirrorSelectionStart:m,setMirrorSelectionEnd:p,setInputRef:y,handleChange:k,handleFocus:b,handleBlur:w,handleKeyDown:C,handlePaste:v,handleKeyPress:S}=Il(e),I=Wf(o!==void 0?o:t);return r.jsx(Fl,{...e,value:I,setValue:n,isFocused:a,setIsFocused:l,isHovered:c,setIsHovered:g,inputRef:s,containerRef:d,mirrorSelectionStart:u,mirrorSelectionEnd:f,setMirrorSelectionStart:m,setMirrorSelectionEnd:p,setInputRef:y,handleChange:k,handleFocus:b,handleBlur:w,handleKeyDown:C,handleKeyPress:S,handlePaste:v,stepValues:e.stepValues})},Ml=h.createContext({active:!1,focusNextInput:()=>{},setInputRef:()=>{},handleSubmitEditing:()=>{},getReturnKeyType:()=>"next"}),Ef=()=>h.useContext(Ml),Af=({children:e,autoFocus:o=!1,initFocus:t,onChange:n=()=>{},...a})=>{const l=_e.useFormikContext();h.useEffect(()=>{n(l.values)},[l.values]);const c=h.useRef({}),g=h.useRef([]),s=(p,y)=>{c.current[p]=y,y&&!g.current.includes(p)&&g.current.push(p)},d=p=>{var y,k;if(o){const w=g.current.indexOf(p)+1;w<g.current.length?(y=c.current[g.current[w]])==null||y.focus():(k=l.submitForm)==null||k.call(l)}},u={active:o,focusNextInput:d,setInputRef:s,handleSubmitEditing:d,getReturnKeyType:p=>g.current.indexOf(p)===g.current.length-1?"done":"next"};h.useEffect(()=>{var p,y;o&&(t&&c.current[t]?(p=c.current[t])==null||p.focus():g.current[0]&&((y=c.current[g.current[0]])==null||y.focus()))},[o,t]);const m=typeof document<"u"&&typeof document.createElement=="function"?{onSubmit:l.handleSubmit,onReset:l.handleReset}:{};return r.jsx(Ml.Provider,{value:u,children:r.jsx(i.Form,{...a,...m,children:e})})},Hf=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{}}},Te=({name:e,type:o,...t},n={})=>{const a=Ef(),{touched:l,errors:c,submitCount:g,values:s,setFieldTouched:d,setFieldValue:u}=_e.useFormikContext(),f=x=>{var I;u(e,x),(I=t.onChangeText)==null||I.call(t,x)},m=x=>{var I;u(e,x),(I=t.onChange)==null||I.call(t,x)},p=()=>{d(e,!0)},y=x=>{x.key==="Enter"&&(x.preventDefault(),a.focusNextInput(e))},k=["text","password","email","digits"].includes(o),b=_e.getIn(l,e)||g>0?_e.getIn(c,e):void 0,w=_e.getIn(s,e),C=typeof document<"u"&&typeof document.createElement=="function",v=!!n.focusable&&a.active,S=v?C?{onKeyPress:y}:{returnKeyType:a.getReturnKeyType(e),onSubmitEditing:()=>a.handleSubmitEditing(e),blurOnSubmit:!1}:{};return{...Hf(o),...t,value:w,error:b,onBlur:p,...k?{onChangeText:f}:{onChange:m},...S,...v?{inputRef:x=>a.setInputRef(e,x)}:{}}},Vf=e=>{let{value:o,...t}=Te(e);t.isChecked=o;const n=Ra(e);return r.jsx(ol,{...n,...t})},Pf=e=>{let{value:o,...t}=Te(e);t.isChecked=o===e.value;const n=rl(e);return r.jsx(tl,{...n,...t})},jl=e=>{const{value:o,onChange:t,onSubmit:n,autoFocus:a=!0,loading:l=!1,disabled:c=!1,isAgentRunning:g=!1,onStopAgent:s,sandboxId:d,onUploadProgress:u,onUploadSuccess:f,onUploadError:m,onFileUpload:p}=e,y=o!==void 0&&t!==void 0,[k,b]=h.useState(""),w=y?o:k,[C,v]=h.useState([]),[S,x]=h.useState([]),[I,T]=h.useState(!1),[W,D]=h.useState(0),[P,M]=h.useState([]),[E,F]=h.useState(!1),j=h.useRef(null),[A,V]=h.useState(!1),[H,O]=h.useState("gpt-4"),[G]=h.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"}]),U=h.useRef(null),$=h.useRef(null),_=h.useRef(null),[N,Q]=h.useState(e.showGuideTip||!1);h.useEffect(()=>{a&&U.current&&U.current.focus()},[a]),h.useEffect(()=>()=>{C.forEach(le=>{})},[C]);const B=le=>{y&&t?t(le):b(le)},L=le=>{const Y=_.current;if(Y&&typeof Event<"u"){Y.value=le,Y.dispatchEvent(new Event("input",{bubbles:!0}));return}B(le)},X=le=>{if(le.preventDefault(),!w.trim()&&C.length===0||l||c&&!g)return;if(g&&s){s();return}let Y=w;if(C.length>0){const K=C.map(J=>`[Uploaded File: ${URL.createObjectURL(J)}}]`).join(`
|
|
24
|
+
`);Y=Y?`${Y}
|
|
25
25
|
|
|
26
|
-
${Q}`:Q}let ce=M,ye=!1;M.endsWith("-thinking")&&(ce=M.replace(/-thinking$/,""),ye=!0),n==null||n(ae,{model_name:ce,enable_thinking:ye}),y||x(""),w([]),b([])},J=te=>{w(ae=>ae.filter((ce,ye)=>ye!==te)),!g&&v.length>te&&b(ae=>ae.filter((ce,ye)=>ye!==te))},Y=te=>{te.preventDefault(),te.stopPropagation(),V(!0)},Z=te=>{te.preventDefault(),te.stopPropagation(),V(!1)},ee=h.useCallback(te=>{!te||te.length===0||(b(ae=>[...ae,...te]),w(ae=>[...ae,...te]),W(ae=>[...ae,...te]),T(!0))},[b,w]),ne=h.useCallback(()=>{if(D.length>0&&!A&&u){H(!0);const te=D[0];z.current=te,E(0),m==null||m(0);try{u(te),W(ae=>ae.slice(1)),H(!1),z.current=null,E(100),m==null||m(100),f==null||f({file:te})}catch(ae){W(ce=>ce.slice(1)),H(!1),z.current=null,E(0),T(ce=>D.length-1>0||!1),p==null||p(ae)}}else D.length===0&&I&&(T(!1),E(0))},[D,A,u,I,p,m,f]);h.useEffect(()=>{ne()},[D,A,ne]);const K="active",re=te=>!0,ie=()=>{oe(!1),e.onGuideClose&&e.onGuideClose()},ge=te=>{y&&t?t(te.text):x(te.text),e.onPromptExampleSelect&&e.onPromptExampleSelect(te),O.current&&O.current.focus()},We=h.useCallback(()=>v,[v]),le=h.useCallback(()=>b([]),[]);return{onSubmit:n,getPendingFiles:We,clearPendingFiles:le,value:C,handleChange:B,setValue:$,handleSubmit:q,editableRef:O,fileInputRef:N,hiddenInputRef:U,isUploading:I,uploadProgress:j,isDraggingOver:P,uploadedFiles:S,pendingFiles:v,removeUploadedFile:J,setPendingFiles:b,setUploadedFiles:w,setIsUploading:T,startUpload:ee,selectedModel:M,handleModelChange:L,modelOptions:_,subscriptionStatus:K,canAccessModel:re,handleDragOver:Y,handleDragLeave:Z,isGuideTipShown:X,hideGuideTip:ie,handlePromptExampleSelect:ge}},pf={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}},yl={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"}},uf={default:{borderRadius:"8px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"}},yf={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"}},bf={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"}},bl=e=>`${e}-${Math.random().toString(36).substring(2,9)}`,xf=({openDelay:e=200,closeDelay:o=300}={})=>{const[t,n]=h.useState(!1),a=h.useRef(null),l=h.useRef(null),c=h.useRef(null),s=h.useRef(null),d=h.useMemo(()=>bl("hovercard-content"),[]),g=h.useMemo(()=>bl("hovercard-trigger"),[]),m=h.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null),l.current&&(clearTimeout(l.current),l.current=null)},[]),f=h.useCallback(()=>{m(),t||(a.current=setTimeout(()=>{n(!0)},e))},[t,e,m]),p=h.useCallback(()=>{m(),t&&(l.current=setTimeout(()=>{n(!1)},o))},[t,o,m]),u=h.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]);return h.useEffect(()=>()=>m(),[m]),{isOpen:t,openCard:f,closeCard:p,cancelCloseTimer:u,triggerRef:c,contentRef:s,contentId:d,triggerId:g}},xl=h.createContext({isOpen:!1,openCard:()=>{},closeCard:()=>{},cancelCloseTimer:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),kf=({children:e,value:o})=>r.jsx(xl.Provider,{value:o,children:e}),kl=()=>{const e=h.useContext(xl);if(!e)throw new Error("useHoverCardContext must be used within a HoverCardProvider");return e},Cf=({children:e,views:o,asChild:t=!1,...n})=>{const{openCard:a,closeCard:l,triggerRef:c,contentId:s,triggerId:d}=kl(),u={ref:c,onMouseEnter:()=>a(),onMouseLeave:()=>l(),onFocus:()=>a(),onBlur:()=>l(),id:d,"aria-describedby":s,...o==null?void 0:o.container,...n};if(t&&h.isValidElement(e)){const y=h.Children.only(e);return h.cloneElement(y,{...u,...y.props})}return r.jsx(i.View,{position:"relative",display:"inline-block",...u,children:e})},wf=({children:e,views:o,side:t="bottom",align:n="center",sideOffset:a=8,style:l,backgroundColor:c="color-white",borderRadius:s="4px",boxShadow:d="0px 2px 8px rgba(0, 0, 0, 0.15)",padding:g="12px",minWidth:m="50px",maxWidth:f="300px",...p})=>{const{isOpen:u,cancelCloseTimer:y,closeCard:k,contentRef:x,triggerRef:C,contentId:S,triggerId:w}=kl(),{ref:v,relation:b}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0});h.useEffect(()=>{C!=null&&C.current&&(v==null?void 0:v.current)!==C.current&&v&&(v.current=C.current)},[C,v,u]);const I=()=>y(),T=()=>k();if(!u)return null;const j=()=>{if(!b||!(C!=null&&C.current))return{position:"absolute",top:0,left:0,zIndex:1e3};const W=C.current.getBoundingClientRect();let A=t;t==="bottom"&&b.space.vertical==="top"?A="top":t==="top"&&b.space.vertical==="bottom"?A="bottom":t==="right"&&b.space.horizontal==="left"?A="left":t==="left"&&b.space.horizontal==="right"&&(A="right");let H=0,z=0;switch(A){case"bottom":H=W.left+W.width/2,z=W.bottom+a;break;case"top":H=W.left+W.width/2,z=W.top-a;break;case"right":H=W.right+a,z=W.top+W.height/2;break;case"left":H=W.left-a,z=W.top+W.height/2;break}return{position:"fixed",left:H,top:z,zIndex:1e3,transform:E(A)}},E=W=>{switch(W){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)"}},D=j();return r.jsx(i.View,{ref:x,id:S,role:"tooltip","aria-labelledby":w,onMouseEnter:I,onMouseLeave:T,backgroundColor:c,borderRadius:s,boxShadow:d,padding:g,minWidth:m,maxWidth:f,style:{...D,...l},...o==null?void 0:o.container,...p,children:e})},Me=({children:e,views:o,openDelay:t,closeDelay:n,...a})=>{const l=xf({openDelay:t,closeDelay:n});return r.jsx(kf,{value:l,children:r.jsx(i.View,{position:"relative",display:"inline-block",...o==null?void 0:o.container,...a,children:e})})};Me.Trigger=Cf,Me.Content=wf;const Sf=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:c={}})=>{if(e.length===0)return null;const s=h.useCallback(g=>g<1024?`${g} B`:g<1024*1024?`${(g/1024).toFixed(1)} KB`:`${(g/(1024*1024)).toFixed(1)} MB`,[]),d=h.useCallback(g=>g.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:g.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:g.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...c==null?void 0:c.container,children:e.map((g,m)=>{const f=(g==null?void 0:g.path)||(g==null?void 0:g.url)||(l?URL.createObjectURL(g):""),p=g.type.startsWith("image/"),u=g.type.startsWith("video/"),y=g.type.startsWith("audio/"),k=d(g);return l?r.jsx(i.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:l&&r.jsxs(Me,{children:[r.jsxs(Me.Trigger,{children:[p&&r.jsx(i.Image,{src:f,alt:g.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),u&&r.jsx(i.View,{as:"video",src:f,alt:g.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Fo,{widthHeight:24,color:"color-black"})}),!p&&!u&&!y&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(go,{widthHeight:24,color:"color-black"})}),t&&r.jsx(i.Button,{...pf.attachmentRemove,onClick:x=>{x.stopPropagation(),t(m)},"aria-label":`Remove ${g.name}`,children:"×"})]}),r.jsxs(Me.Content,{children:[p&&r.jsx(i.Image,{src:f,alt:g.name,maxWidth:"100%"}),u&&r.jsx(i.View,{as:"video",src:f,controls:!0,maxWidth:"100%"}),y&&r.jsx(i.View,{as:"audio",src:f,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",...c==null?void 0:c.name,children:[g.name," (",s(g.size),")"]})]})]})},m):r.jsxs(i.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:[r.jsx(i.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:k.backgroundColor,color:k.color,children:y?r.jsx(Fo,{widthHeight:12,color:"currentColor"}):r.jsx(go,{widthHeight:12,color:"currentColor"})}),r.jsxs(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...c==null?void 0:c.name,children:[g.name," · ",s(g.size)]}),t&&r.jsx(i.View,{as:"button",type:"button",onClick:()=>t(m),"aria-label":`Remove ${g.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:"×"})]},m)})})},Cl=typeof window<"u"?h.useLayoutEffect:h.useEffect,wl=h.forwardRef(({value:e,onChange:o,placeholder:t="Type your message...",disabled:n=!1,autoFocus:a=!0,suggestions:l=[],onSuggestionSelect:c,showSuggestions:s=!1,mentionData:d=[],mentionTrigger:g="@",onMentionSelect:m,onKeyDown:f,maxHeight:p="200px",minHeight:u="40px",name:y,id:k,hiddenInput:x=!0,hiddenInputRef:C,views:S={}},w)=>{var ce,ye;const v=h.useRef(e),[b,I]=h.useState(-1),[T,j]=h.useState(!e),E=h.useRef(null),[D,W]=h.useState(!1),[A,H]=h.useState(!1),[z,P]=h.useState(""),[V,M]=h.useState(-1),[L,_]=h.useState(-1),[O,N]=h.useState([]),{ref:U,relation:X}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[oe,B]=h.useState({x:0,y:0}),[$,q]=h.useState({x:0,y:0}),J=h.useRef(null),Y=h.useCallback(Q=>{J.current=Q,typeof C=="function"?C(Q):C&&(C.current=Q)},[C]),Z=h.useCallback(Q=>{J.current&&J.current.value!==Q&&(J.current.value=Q)},[]);Cl(()=>{const Q=w;Q!=null&&Q.current&&e!==v.current&&(Q.current.textContent=e,v.current=e,j(!e)),Z(e)},[e,w,Z]);const ee=h.useCallback(Q=>{if(Q===v.current)return;const R=w;R!=null&&R.current&&R.current.textContent!==Q&&(R.current.textContent=Q),v.current=Q,j(!Q),Z(Q),o(Q)},[o,w,Z]);Cl(()=>{const Q=J.current;if(!Q)return;const R=()=>ee(Q.value);return Q.addEventListener("input",R),Q.addEventListener("change",R),()=>{Q.removeEventListener("input",R),Q.removeEventListener("change",R)}},[ee,x]),h.useEffect(()=>{a&&w&&typeof w=="object"&&w.current&&w.current.focus()},[a,w]);const ne=()=>{const Q=window.getSelection();if(!Q||Q.rangeCount===0)return-1;const R=Q.getRangeAt(0),be=R.cloneRange();return be.selectNodeContents(w&&typeof w=="object"&&w.current?w.current:document.body),be.setEnd(R.endContainer,R.endOffset),be.toString().length},K=h.useCallback((Q,R)=>{const be=Q.substring(0,R),Ie=be.lastIndexOf(g);if(Ie!==-1){const ve=be.substring(Ie+1);if(!ve.includes(" ")){const co=ve.toLowerCase(),so=d.filter(Qe=>Qe.name.toLowerCase().includes(co));P(co),M(Ie),N(so),H(so.length>0),_(0);const So=re();B(So);return}}H(!1),P(""),M(-1),_(-1)},[d,g]);h.useEffect(()=>{E.current&&U&&(U.current=E.current)},[E,U]);const re=h.useCallback((Q=200)=>{if(!E.current)return{x:0,y:0};const R=E.current.getBoundingClientRect();if(X){const Je=X.space.vertical==="top";return{x:R.left,y:Je?R.top-Q-8:R.bottom+8}}const be=window.innerHeight,Ie={top:R.top,bottom:be-R.bottom},ve=Ie.bottom<Q+8&&Ie.top>Ie.bottom;return{x:R.left,y:ve?R.top-Q-8:R.bottom+8}},[X]),ie=h.useCallback(()=>{W(!0);const Q=re();q(Q)},[re]),ge=h.useCallback(()=>{setTimeout(()=>{W(!1),I(-1)},150)},[]),We=Q=>{const R=Q.currentTarget.textContent||"";if(R!==v.current){o(R),v.current=R,Z(R),j(!R);const be=ne();K(R,be)}},le=h.useCallback(Q=>{if(w&&typeof w=="object"&&w.current){const R=w.current.textContent||"",be=R.substring(0,V),Ie=R.substring(V+g.length+z.length),ve=be+g+Q.name+" "+Ie;o(ve),v.current=ve,Z(ve),w.current.textContent=ve;const Je=be.length+g.length+Q.name.length+1;setTimeout(()=>{var co;if(w.current){const so=document.createRange(),So=window.getSelection(),Qe=w.current.firstChild;Qe&&So&&(so.setStart(Qe,Math.min(Je,((co=Qe.textContent)==null?void 0:co.length)||0)),so.collapse(!0),So.removeAllRanges(),So.addRange(so))}},0)}H(!1),P(""),M(-1),_(-1),m&&m(Q)},[V,g,z,o,m,w,Z]),te=h.useCallback(Q=>{c&&c(Q),I(-1)},[c]),ae=Q=>{if(!(f&&(f(Q),Q.defaultPrevented))){if(A&&O.length>0){if(Q.key==="ArrowDown"){Q.preventDefault(),_(R=>R<O.length-1?R+1:0);return}if(Q.key==="ArrowUp"){Q.preventDefault(),_(R=>R>0?R-1:O.length-1);return}if((Q.key==="Tab"||Q.key==="Enter")&&L>=0){Q.preventDefault(),le(O[L]);return}if(Q.key==="Escape"){H(!1),_(-1);return}}if(s&&l.length>0){if(Q.key==="ArrowDown"){Q.preventDefault(),I(R=>R<l.length-1?R+1:0);return}if(Q.key==="ArrowUp"){Q.preventDefault(),I(R=>R>0?R-1:l.length-1);return}if(Q.key==="Tab"&&b>=0){Q.preventDefault(),te(l[b]);return}if(Q.key==="Escape"){I(-1);return}}}};return r.jsxs(i.View,{ref:E,width:"100%",position:"relative",...S==null?void 0:S.container,children:[r.jsxs(i.View,{width:"100%",minHeight:u,maxHeight:p,overflowY:"auto",position:"relative",children:[T&&r.jsx(i.Text,{position:"absolute",top:"8px",left:"8px",color:"color-gray-400",pointerEvents:"none",fontSize:"14px",zIndex:1,...S==null?void 0:S.placeholder,children:t}),r.jsx(i.View,{as:"div",ref:w,contentEditable:!n,suppressContentEditableWarning:!0,onInput:We,onKeyDown:ae,onFocus:ie,onBlur:ge,role:"textbox","aria-multiline":"true","aria-placeholder":t,width:"100%",minHeight:"24px",padding:"8px",outline:"none",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"14px",color:"color-gray-900",backgroundColor:"transparent",...S==null?void 0:S.input})]}),x&&r.jsx(i.View,{as:"textarea",ref:Y,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",...S==null?void 0:S.hiddenInput}),A&&O.length>0&&r.jsx(i.View,{position:"fixed",left:oe.x,top:oe.y,width:((ce=E.current)==null?void 0:ce.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",...S==null?void 0:S.mentionContainer,children:r.jsxs(i.Vertical,{gap:0,children:[O.map((Q,R)=>r.jsx(i.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:R===L?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>le(Q),onMouseEnter:()=>_(R),_hover:{backgroundColor:"color-blue-50"},...S==null?void 0:S.mentionItem,children:r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:[g,Q.name]}),Q.description&&r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",children:Q.description})]})},Q.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Mentions (Trigger: ",g,")",X&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",X.space.vertical,"-",X.space.horizontal]})]})]})}),s&&l.length>0&&!A&&D&&!e&&r.jsx(i.View,{position:"fixed",left:$.x,top:$.y,width:((ye=E.current)==null?void 0:ye.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",...S==null?void 0:S.suggestionsContainer,children:r.jsxs(i.Vertical,{gap:0,children:[l.map((Q,R)=>r.jsx(i.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:R===b?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>te(Q),onMouseEnter:()=>I(R),_hover:{backgroundColor:"color-blue-50"},...S==null?void 0:S.suggestionItem,children:r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:Q.text}),Q.description&&r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",children:Q.description})]})},Q.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Suggestions (Focus-triggered)",X&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",X.space.vertical,"-",X.space.horizontal]})]})]})})]})});wl.displayName="EditableInput";const vf=({examples:e,onSelect:o,views:t={}})=>{const{getColor:n}=i.useTheme();return!e||e.length===0?null:r.jsx(i.Horizontal,{gap:8,overflowX:"auto",padding:"8px 0",width:"100%",...t==null?void 0:t.container,children:e.map(a=>r.jsx(i.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"},...t==null?void 0:t.item,children:r.jsx(i.Text,{fontSize:"14px",color:"color-gray-700",...t==null?void 0:t.text,children:a.text})},a.id))})},Tf=({onRecordingComplete:e,onRecordingStart:o,views:t={}})=>{const{recording:n,paused:a,audioBlob:l,analyserNode:c,startRecording:s,stopRecording:d}=ta();h.useEffect(()=>{if(l){const m=new File([l],`recording-${Date.now()}.webm`,{type:l.type||"audio/webm;codecs=opus"});e(m)}},[l]);const g=h.useCallback(()=>{s(),o==null||o()},[]);return r.jsxs(i.Horizontal,{alignItems:"center",gap:4,children:[r.jsx(i.View,{minWidth:90,children:n&&c&&r.jsx(vt,{analyserNode:c,isPaused:a})}),r.jsx(i.View,{as:"button",type:"button",onClick:n?d:g,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"},...t.button,children:n?r.jsx(wr,{widthHeight:16,color:"currentColor",filled:!1}):r.jsx(ut,{widthHeight:16,color:"currentColor",filled:!1})})]})},Sl=h.memo(({onSubmit:e,placeholder:o="Type your message… use @ to mention",loading:t=!1,disabled:n=!1,isDisabled:a,rightElement:l,onKeyDown:c,isAgentRunning:s=!1,enableAudioRecording:d=!1,leftButtons:g,rightButtons:m,onStopAgent:f,loadingText:p="Agent is working...",autoFocus:u=!0,sandboxId:y,hideAttachments:k=!1,attachmentText:x="",promptExamples:C=[],suggestions:S=[],errorMessage:w,size:v="md",shape:b="rounded",variant:I="default",views:T={},mentionData:j=[],mentionTrigger:E="@",onMentionSelect:D,onAudioRecordingStart:W,onAudioRecordingStop:A,showGuideTip:H,guideVideoUrl:z,onGuideClose:P,onFileBrowse:V,onUploadProgress:M,onUploadSuccess:L,onUploadError:_,onFileUpload:O,onPromptExampleSelect:N,name:U,hiddenInput:X=!0,value:oe,handleChange:B,setValue:$,handleSubmit:q,editableRef:J,fileInputRef:Y,hiddenInputRef:Z,isUploading:ee,uploadProgress:ne,isDraggingOver:K,uploadedFiles:re,pendingFiles:ie,getPendingFiles:ge,clearPendingFiles:We,removeUploadedFile:le,setPendingFiles:te,setUploadedFiles:ae,setIsUploading:ce,startUpload:ye,selectedModel:Q,handleModelChange:R,modelOptions:be,subscriptionStatus:Ie,canAccessModel:ve,isGuideTipShown:Je,hideGuideTip:co,handlePromptExampleSelect:so,handleDragOver:So,handleDragLeave:Qe,onChange:Lk,...Sb})=>{i.useTheme();const Hc=h.useMemo(()=>({...yl.container,...uf[b],...T==null?void 0:T.container}),[b,T==null?void 0:T.container]),vb=h.useMemo(()=>({...yl.content,...yf[v],...bf[I],...T==null?void 0:T.content}),[v,I,T==null?void 0:T.content]),br=((oe==null?void 0:oe.trim().length)??0)>0||re.length>0,Tb=h.useCallback(Ce=>{ye([Ce]),A==null||A(Ce)},[ye,A]),Vn=h.useCallback(Ce=>{const Ko=Ce.filter(jc=>jc.size>52428800?(console.error(`File size exceeds 50MB limit: ${jc.name}`),!1):!0);Ko.length>0&&ye(Ko)},[ye]),Ib=h.useCallback(Ce=>{if(Ce.preventDefault(),Ce.stopPropagation(),Qe(Ce),Ce.dataTransfer.files.length>0){const Ko=Array.from(Ce.dataTransfer.files);Vn(Ko)}},[Qe,Vn]),Fb=h.useMemo(()=>[...j||[],...re.map((Ce,Ko)=>({id:`file-${Ko}`,name:Ce.name}))],[j,re]);return r.jsxs(i.View,{display:"flex",flexDirection:"column",boxSizing:"border-box",...Hc,...Sb,onDragOver:So,onDragLeave:Qe,onDrop:Ib,children:[C.length>0&&r.jsx(vf,{examples:C,onSelect:so,views:{container:T==null?void 0:T.promptExamples,item:T==null?void 0:T.promptExampleItem}}),s&&r.jsxs(i.Horizontal,{justifyContent:"center",alignItems:"center",gap:8,padding:"8px 0",animate:{from:{opacity:0,y:-10},to:{opacity:1,y:0},duration:"0.3s"},...T==null?void 0:T.loadingIndicator,children:[r.jsx(bt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(i.Text,{color:"color-gray-500",children:p})]}),r.jsx(i.View,{position:"relative",width:"100%",overflow:"visible",children:r.jsxs(i.View,{as:"form",onSubmit:q,overflow:"visible",display:"flex",flexDirection:"column",position:"relative",...vb,...Hc,paddingHorizontal:16,paddingVertical:10,backgroundColor:K?"color-blue-50":void 0,children:[r.jsx(Sf,{files:re,sandboxId:y,onRemove:le,showPreviews:!0,views:{container:T==null?void 0:T.attachments,item:T==null?void 0:T.attachmentItem,name:T==null?void 0:T.attachmentName,size:T==null?void 0:T.attachmentSize,removeButton:T==null?void 0:T.attachmentRemove}}),r.jsx(wl,{ref:J,value:oe||"",onChange:B,placeholder:o,disabled:n&&!s,autoFocus:u,onKeyDown:c,suggestions:S||[],showSuggestions:S&&S.length>0&&!oe,onSuggestionSelect:Ce=>{B(Ce.text)},mentionData:Fb,mentionTrigger:E,onMentionSelect:D,name:U,hiddenInput:X,hiddenInputRef:Z,views:{container:{},input:T==null?void 0:T.editableInput,hiddenInput:T==null?void 0:T.hiddenInput}}),r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",marginTop:"8px",children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[!k&&r.jsx(i.View,{display:"contents",onClickCapture:V?Ce=>{Ce.target.tagName==="INPUT"&&V()}:void 0,children:r.jsx(Ir,{accept:"*/*",icon:r.jsx(Xo,{widthHeight:16}),maxSize:50*1024*1024,multiple:!0,onMultipleFileSelect:Vn,isLoading:ee,progress:ne||0,text:x,fileType:"file",renderError:({errorMessage:Ce})=>null,views:{container:{height:"36px",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},...T==null?void 0:T.fileButton}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,borderRadius:b==="rounded"?"50%":4,padding:10},textProps:{fontSize:"14px",color:"color-gray-600"},validateFile:Ce=>Ce.size>50*1024*1024?"File size exceeds 50MB limit":null})}),g]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[l,d&&r.jsx(Tf,{onRecordingStart:W,onRecordingComplete:Tb,views:{button:T==null?void 0:T.recordButton}}),r.jsx(i.View,{as:"button",type:"button",onClick:q,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:s?"theme-error":br?"theme-primary":"color-gray-300",color:"color-white",borderRadius:b==="rounded"?"50%":4,border:"none",cursor:br?"pointer":"not-allowed",disabled:!br||t||n&&!s,transition:"background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease",_hover:{opacity:br||s?.9:1},_active:{opacity:br||s?.95:1},_focusVisible:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},...T==null?void 0:T.submitButton,children:s?r.jsx(wr,{widthHeight:16,color:"currentColor",filled:!1}):t?r.jsx(eo,{type:"quarter",size:16,color:"color-white"}):r.jsx(yt,{widthHeight:16,color:"currentColor",filled:!1})}),m]})]})]})}),w&&r.jsx(i.Text,{color:"theme-error",marginTop:"4px",...T==null?void 0:T.bottomTip,children:w})]})}),If=e=>{const{name:o,onSubmit:t,...n}=e,[a,l]=h.useState([]),c=xe({name:o,type:"text"}),s=p=>{c.onChangeText&&c.onChangeText(p)},d=(p,u)=>{t?t(p,u):s(p)},g=()=>a,m=()=>l([]),f=ul({...n,value:c.value||"",onChange:s,onSubmit:d});return r.jsx(Sl,{...n,...f,name:o,value:c.value||"",onChange:s,onSubmit:d,error:c.error,getPendingFiles:g,clearPendingFiles:m})},Ff=e=>{const o=xe(e),t=qa(o);return r.jsx(Ua,{...t,...o})},zf=e=>{const o=xe(e),t=rl();return r.jsx(tl,{...t,...o})},Mf=e=>{const o=xe(e),t=Ga(e);return r.jsx(Ka,{...t,...o})},Wf=e=>{let o=xe(e);o.selected=o.value;const t=Fa({...e,value:o.value});return r.jsx(Wa,{...o,...t})},Hf=e=>{const o=xe(e),t=Ha(e);return r.jsx(Va,{...t,...o})},jf=e=>{const{name:o,...t}=e,{values:n,errors:a,touched:l,submitCount:c,setFieldValue:s,setFieldTouched:d}=Ee.useFormikContext(),g=Ee.getIn(n,o)||[],m=Ee.getIn(l,o)||c>0?Ee.getIn(a,o):void 0,f=h.useCallback(x=>{var S;const C=Array.isArray(x)?x.filter(w=>typeof w=="string"):[];s(o,C),(S=e.onTagsChange)==null||S.call(e,C)},[o,s,e.onTagsChange]),p=h.useCallback(()=>{var x;d(o,!0),(x=e.onBlur)==null||x.call(e)},[o,d,e.onBlur]),u=dl({...t,tags:g,onTagsChange:f,onBlur:p}),{tags:y,...k}=u;return r.jsx(gl,{...k,...t,tags:y,error:m})},Pf=e=>{const o=xe(e),t=Da(e);return r.jsx($a,{...t,...o})},Vf=e=>{const o=xe(e,{focusable:!0}),{value:t,...n}=Lt(e);return r.jsx(rr,{...n,...o})},Af=({visibleIcon:e=r.jsx(kt,{widthHeight:14}),hiddenIcon:o=r.jsx(xt,{widthHeight:14}),...t})=>{const n=xe(t,{focusable:!0}),{isVisible:a,setIsVisible:l,...c}=nl(n);return r.jsx(rr,{...c,type:a?"text":"password",isClearable:!1,right:r.jsx(i.View,{onClick:()=>{t.isDisabled||l(!a)},children:a?e:o})})},Ef=({items:e,placeholder:o,searchPlaceholder:t,isMulti:n=!1,...a})=>{const l=xe(a),c=ll(e,o,t);h.useEffect(()=>{if(n&&Array.isArray(l.value))c.setSelectedItems(l.value);else if(!n&&l.value){const d=typeof l.value=="object"?l.value:e.find(g=>g.value===l.value);d&&c.setSelectedItem(d)}},[l.value,n,e]);const s=d=>{l.onChange(d)};return r.jsx(sl,{...c,...l,items:e,placeholder:o,isMulti:n,onSelect:s})},Ao=(e,o,t)=>Math.min(Math.max(e,o),t),Df=(e,o,t,n,a,l,c)=>{const s=n-t;let d;if(l==="horizontal"){const g=o.width,m=e-o.left;d=Ao(m/g,0,1)}else{const g=o.height,m=o.bottom-e;d=Ao(m/g,0,1)}if(c&&c.length>0){const g=t+d*s;let m=c[0],f=Math.abs(g-m);for(let p=1;p<c.length;p++){const u=Math.abs(g-c[p]);u<f&&(f=u,m=c[p])}return m}else{const g=t+d*s,m=Math.round(g/a)*a;return Ao(m,t,n)}},vl=({min:e=0,max:o=100,step:t=1,value:n,defaultValue:a,onChange:l,onDrag:c,orientation:s="horizontal",isDisabled:d=!1,stepValues:g})=>{const m=Ao(n??a??e,e,o),[f,p]=h.useState(m),[u,y]=h.useState(!1),[k,x]=h.useState(!1),C=h.useRef(null),S=h.useRef(null),w=n!==void 0,v=n!==void 0?n:f;h.useEffect(()=>{n!==void 0&&p(Ao(n,e,o))},[n,e,o]);const b=h.useCallback(A=>{const H=Ao(A,e,o);w||p(H),l&&H!==v&&l(H),u&&c&&c(H)},[w,e,o,l,v,u,c]),I=h.useCallback(A=>{if(d||!C.current)return;const H=C.current;if(typeof H.getBoundingClientRect!="function")return;const z=H.getBoundingClientRect();let P;"touches"in A?P=s==="horizontal"?A.touches[0].clientX:A.touches[0].clientY:P=s==="horizontal"?A.clientX:A.clientY;const V=Df(P,z,e,o,t,s,g);b(V)},[e,o,t,s,b,d,g]),T=h.useCallback(A=>{if(d)return;A.preventDefault(),y(!0),I(A);const H=P=>{I(P)},z=()=>{y(!1),document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",z),document.removeEventListener("touchmove",H),document.removeEventListener("touchend",z)};typeof document>"u"||(document.addEventListener("mousemove",H),document.addEventListener("mouseup",z),document.addEventListener("touchmove",H),document.addEventListener("touchend",z))},[I,d]),j=h.useCallback(A=>{const H=S.current;H&&typeof H.contains=="function"&&H.contains(A.target)||T(A)},[T]),E=h.useCallback(A=>{if(d)return;let H=v;switch(A.key){case"ArrowLeft":case"ArrowDown":H=v-t;break;case"ArrowRight":case"ArrowUp":H=v+t;break;case"Home":H=e;break;case"End":H=o;break;default:return}A.preventDefault(),b(H)},[v,e,o,t,b,d]),D=o-e,W=D===0?0:(v-e)/D*100;return{currentValue:v,isDragging:u,isHovered:k,setIsHovered:x,trackRef:C,thumbRef:S,handleThumbMouseDown:T,handleTrackMouseDown:j,handleKeyDown:E,thumbPositionPercent:W}},Tl={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%"}},Il={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}},Fl={square:0,rounded:4,pill:24},zl=(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"}}))(),$f={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}},Lf={horizontal:{width:"100%",minWidth:"120px",height:"auto",flexDirection:"row",paddingVertical:8},vertical:{height:"100%",minHeight:"120px",width:"auto",flexDirection:"column-reverse",paddingHorizontal:8}},_f=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),lr=(e,o)=>_f(o)?{style:{[e]:o}}:{[e]:o},Ml=h.memo(({min:e=0,max:o=100,step:t=1,currentValue:n,stepValues:a,shape:l="rounded",size:c="md",variant:s="default",orientation:d="horizontal",isDisabled:g=!1,showValue:m=!1,showTooltip:f=!1,backgroundColor:p="theme-primary",label:u,helperText:y,themeMode:k,shadow:x={},isDragging:C,isHovered:S,setIsHovered:w,trackRef:v,thumbRef:b,handleThumbMouseDown:I,handleTrackMouseDown:T,handleKeyDown:j,thumbPositionPercent:E,ariaLabel:D="Slider",views:W={container:{},track:{},progress:{},filledTrack:{},thumb:{},label:{},valueLabel:{},stepMarks:{},tooltip:{}},onChange:A,onDrag:H,value:z,defaultValue:P,...V})=>{var $,q;const M=p,L="theme-disabled",_=zl[s].backgroundColor,O=g?L:M,N=d==="vertical",{trackCrossAxisSize:U,thumbSize:X}=$f[c]||{trackCrossAxisSize:Tl[c].height,thumbSize:Il[c].width||16},oe=r.jsxs(i.Vertical,{width:"100%",gap:8,...W.container,...V,children:[u&&r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontSize:14,fontWeight:500,...W.label,children:u}),m&&r.jsx(i.Text,{fontSize:14,color:"color-gray-500",...W.valueLabel,children:n})]}),r.jsxs(i.View,{ref:v,position:"relative",cursor:g?"not-allowed":"pointer",opacity:g?.6:1,onMouseDown:T,onMouseEnter:()=>w(!0),onMouseLeave:()=>w(!1),...Tl[c],borderRadius:Fl[l],backgroundColor:_,...zl[s],...x,...W.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(J=>{const Y=(J-e)/(o-e)*100;return r.jsx(i.View,{position:"absolute",top:"50%",left:`${Y}%`,transform:"translate(-50%, -50%)",width:4,height:4,borderRadius:"50%",zIndex:1,...lr("backgroundColor",O),...W.stepMarks},J)})}),r.jsx(i.View,{position:"absolute",top:0,left:0,height:"100%",width:`${E}%`,borderRadius:Fl[l],transition:"width 0.1s ease-in-out",...lr("backgroundColor",O),...W.progress,...W.filledTrack}),r.jsx(i.View,{ref:b,role:"slider",tabIndex:g?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":g,"aria-label":D,position:"absolute",top:"50%",left:`${E}%`,borderRadius:"50%",backgroundColor:"color-white",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",borderWidth:2,borderStyle:"solid",transition:C?"none":"transform 0.1s ease-in-out",...lr("borderColor",O),transform:S?"translate(-50%, -50%) scale(1.1)":"translate(-50%, -50%)",zIndex:2,onMouseDown:I,onTouchStart:I,onKeyDown:j,...Il[c],...W.thumb,children:f&&(S||C)&&r.jsx(i.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,...W.tooltip,children:r.jsx(i.Text,{...($=W.tooltip)==null?void 0:$.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(Et,{children:y})]}),B=r.jsxs(i.Center,{...Lf[d],position:"relative",onMouseEnter:()=>!g&&w(!0),onMouseLeave:()=>!g&&w(!1),...V,...W==null?void 0:W.container,children:[u&&r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",marginBottom:8,width:"100%",children:[r.jsx(i.Text,{fontSize:14,fontWeight:500,...W.label,children:u}),m&&r.jsx(i.Text,{fontSize:14,color:"color-gray-500",...W.valueLabel,children:n})]}),r.jsxs(i.View,{ref:v,position:"relative",borderRadius:U/2,backgroundColor:g?L:_,cursor:g?"not-allowed":"pointer",width:N?`${U}px`:"100%",height:N?"100%":`${U}px`,onMouseDown:T,onTouchStart:T,...W==null?void 0:W.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(J=>{const Y=(J-e)/(o-e)*100;return r.jsx(i.View,{position:"absolute",width:4,height:4,borderRadius:"50%",backgroundColor:O,zIndex:1,...N?{bottom:`${Y}%`,left:"50%",transform:"translate(-50%, 50%)"}:{left:`${Y}%`,top:"50%",transform:"translate(-50%, -50%)"},...W.stepMarks},J)})}),r.jsx(i.View,{position:"absolute",borderRadius:U/2,...N?{bottom:0,left:0,width:"100%",height:`${E}%`}:{top:0,left:0,height:"100%",width:`${E}%`},...lr("backgroundColor",O),...W==null?void 0:W.filledTrack,...W==null?void 0:W.progress}),r.jsx(i.View,{ref:b,role:"slider",tabIndex:g?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":d,"aria-disabled":g,"aria-label":D,position:"absolute",width:`${X}px`,height:`${X}px`,borderRadius:"50%",borderWidth:2,borderStyle:"solid",borderColor:"color-white",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.2)",cursor:g?"not-allowed":"grab",transform:N?"translateX(-50%)":"translateY(-50%)",zIndex:2,transition:C?"none":"left 0.1s, bottom 0.1s",...lr("backgroundColor",O),...N?{left:"50%",bottom:`${E}%`}:{top:"50%",left:`${E}%`},onMouseDown:I,onTouchStart:I,onKeyDown:j,...W==null?void 0:W.thumb,children:f&&(S||C)&&r.jsx(i.View,{position:"absolute",padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:"4px",whiteSpace:"nowrap",zIndex:3,...N?{left:"100%",marginLeft:"8px",bottom:"0",transform:"translateY(50%)"}:{bottom:"100%",left:"50%",marginBottom:"8px",transform:"translateX(-50%)"},...W==null?void 0:W.tooltip,children:r.jsx(i.Text,{...(q=W==null?void 0:W.tooltip)==null?void 0:q.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(Et,{marginTop:8,children:y})]});return N||f?B:oe}),Bf=e=>{const o=xe(e),t=vl({...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 r.jsx(Ml,{...e,...t,...o})},Wl=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},Kt=(e,o)=>{console.log(`[FormikOTPInput] ${e}`,o)},Of=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),Nf=e=>{const o=xe(e),t=Wl(o.value).slice(0,e.length||6);Kt("render",{name:e.name,type:e.type,formValue:Of(o.value),displayValue:t,length:e.length||6,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText});const{isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:c,inputRef:s,containerRef:d,mirrorSelectionStart:g,mirrorSelectionEnd:m,setMirrorSelectionStart:f,setMirrorSelectionEnd:p,setInputRef:u,handleFocus:y,handleBlur:k,handleKeyDown:x,handlePaste:C}=hl(e),S=h.useCallback(v=>{const b=Wl(v).slice(0,e.length||6);Kt("setValue",{name:e.name,incomingValue:v,nextValue:b,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText}),o.onChange&&o.onChange(b),o.onChangeText&&o.onChangeText(b),e.onComplete&&b.length===(e.length||6)&&e.onComplete(b),s.current&&(s.current.value=b)},[o,e,s]),w=h.useCallback(v=>{var T,j,E;const b=typeof v=="string"?v:((T=v==null?void 0:v.currentTarget)==null?void 0:T.value)??((j=v==null?void 0:v.target)==null?void 0:j.value)??((E=v==null?void 0:v.nativeEvent)==null?void 0:E.text)??"",I=String(b).slice(0,e.length||6);Kt("handleChange normalized",{name:e.name,raw:b,newValue:I}),S(I),s.current&&(s.current.value=I)},[e.length,S,s]);return r.jsx(fl,{...e,...o,value:t,setValue:S,isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:c,inputRef:s,containerRef:d,mirrorSelectionStart:g,mirrorSelectionEnd:m,setMirrorSelectionStart:f,setMirrorSelectionEnd:p,setInputRef:u,handleChange:w,handleFocus:y,handleBlur:k,handleKeyDown:x,handlePaste:C,stepValues:e.stepValues})},qf=e=>Array.isArray(e)?e:e==null?[]:[e],Hl=({name:e,uploadFile:o,onUploadSuccess:t,onUploadError:n,transformResponse:a,onMultipleFileSelect:l,onFileSelect:c,multiple:s=!0,...d})=>{const{setFieldValue:g,setFieldTouched:m,values:f}=Ee.useFormikContext(),[p,u]=h.useState(!1),[y,k]=h.useState(0),x=h.useCallback(async w=>{if(!w||w.length===0)return;m(e,!0,!0),u(!0);const v=[];for(const b of w){k(0);try{const I=await o(b,j=>{k(j??0)}),T=a?a(I,b):I;v.push(T),t==null||t(b,T)}catch(I){n==null||n(b,I)}}if(v.length>0){const b=qf(Ee.getIn(f,e));g(e,[...b,...v],!0),k(100)}else k(0);u(!1)},[e,n,t,m,g,a,o,f]),C=h.useCallback(async w=>{l==null||l(w),await x(w)},[x,l]),S=h.useCallback(async w=>{c==null||c(w),await x([w])},[x,c]);return r.jsx(Ir,{...d,multiple:s,onMultipleFileSelect:s?C:void 0,onFileSelect:s?void 0:S,isLoading:p,progress:y})};Hl.displayName="FormikUploader";const Uf=e=>{let o=xe(e);o.selected=o.value;const t=Aa(e);return r.jsx(Ea,{...t,...o})},jl=e=>{const[o,t]=h.useState(!1),[n,a]=h.useState(e);return{isHovered:o,setIsHovered:t,isToggle:n,setIsToggled:a}},Gf={square:0,rounded:8,pill:999},Yf=(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"}}),Pl=h.memo(({children:e,shape:o="rounded",variant:t="ghost",isHovered:n,setIsHovered:a,isDisabled:l,isToggle:c,setIsToggled:s,onToggle:d,views:g,backgroundColor:m,color:f,themeMode:p,...u})=>{const{getColor:y,themeMode:k}=i.useTheme(),x=p??k,S=y(l?"theme-disabled":m??f??"theme-primary",{themeMode:x}),v=h.useMemo(()=>Yf(S),[S,x])[t],b=!!c,I=h.useCallback(()=>a(!0),[a]),T=h.useCallback(()=>{l||s(j=>{const E=!j;return d&&d(E),E})},[l,s,d]);return r.jsx(i.Center,{role:"Toggle",padding:o==="pill"?"8px 12px":"8px",width:"fit-content",cursor:l?"not-allowed":"pointer",borderRadius:Gf[o],onClick:T,onMouseEnter:I,onMouseLeave:()=>a(!1),...v,...b&&{...t==="link"?{backgroundColor:"transparent"}:{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200"},color:S},...u,...g==null?void 0:g.container,children:e})}),Kf=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:l,...c})=>{const s=xe(c),{isHovered:d,setIsHovered:g,isToggle:m,setIsToggled:f}=jl(s.value??a);h.useEffect(()=>{f(s.value??a)},[s.value,a]);const p=u=>{f(u),s.onChange(u),l==null||l(u)};return r.jsx(Pl,{shape:o,variant:t,isDisabled:n,isHovered:d,setIsHovered:g,isToggle:m,setIsToggled:f,onToggle:p,...c,children:e})},Vl=()=>{const[e,o]=h.useState([]);return{activeToggles:e,setActiveToggles:o}},Xt=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:l,...c})=>{const{isHovered:s,setIsHovered:d,isToggle:g,setIsToggled:m}=jl(a);return h.useEffect(()=>{m(a)},[a]),r.jsx(Pl,{shape:o,variant:t,isDisabled:n,isHovered:s,setIsHovered:d,isToggle:g,setIsToggled:m,onToggle:l,...c,children:e})},Al=({items:e,onToggleChange:o,activeToggles:t,setActiveToggles:n,shape:a="rounded",variant:l="ghost",views:c})=>{const s=h.useCallback((d,g)=>{n(m=>{let f;return g?f=m.includes(d)?m:[...m,d]:f=m.filter(p=>p!==d),o==null||o(f),f})},[o,n]);return r.jsx(i.Horizontal,{role:"ToggleGroup",display:"flex",gap:8,flexWrap:"wrap",...c==null?void 0:c.container,children:e.map(d=>r.jsx(Xt,{role:`toggle-${d.id}`,shape:a,variant:l,isToggled:t.includes(d.id)||d.isActive,onToggle:g=>s(d.id,g),isDisabled:d.isDisabled,views:c==null?void 0:c.toggle,children:d.value},d.id))})},Xf=({items:e,shape:o,variant:t,onToggleChange:n,...a})=>{const l=xe(a),{activeToggles:c,setActiveToggles:s}=Vl();h.useEffect(()=>{Array.isArray(l.value)&&s(l.value)},[l.value]);const d=g=>{s(g),l.onChange(g),n==null||n(g)};return r.jsx(Al,{items:e,shape:o,variant:t,activeToggles:c,setActiveToggles:s,onToggleChange:d,...a})},El=["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"],Dl=e=>{const{value:o,defaultValue:t,onChange:n,isOpen:a,onOpen:l,onClose:c,closeOnSelect:s=!0}=e,[d,g]=h.useState(a??!1),[m,f]=h.useState(o??t),[p,u]=h.useState(""),y=h.useRef(null),k=h.useRef(null);h.useEffect(()=>{o!==void 0&&f(o)},[o]),h.useEffect(()=>{a!==void 0&&g(a)},[a]);const x=h.useMemo(()=>p?El.filter(b=>b.toLowerCase().includes(p.toLowerCase())).slice(0,100):El.slice(0,100),[p]);h.useEffect(()=>{const b=I=>{d&&y.current&&k.current&&!y.current.contains(I.target)&&!k.current.contains(I.target)&&C()};if(!(typeof document>"u"))return document.addEventListener("mousedown",b),()=>document.removeEventListener("mousedown",b)},[d]);const C=h.useCallback(()=>{a===void 0&&g(!1),c&&c()},[c,a]),S=h.useCallback(()=>{const b=!d;a===void 0&&g(b),b?(l&&l(),u("")):c&&c()},[d,l,c,a]),w=h.useCallback(b=>{o===void 0&&f(b),n&&n(b),s&&C()},[n,s,C,o]),v=h.useCallback(b=>{u(b)},[]);return{isOpen:d,selectedIcon:m,searchQuery:p,filteredIcons:x,handleToggle:S,handleIconSelect:w,handleSearchChange:v,handleClose:C,triggerRef:y,dropdownRef:k}},Eo={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"}},Jf={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"}},Qf={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Zf={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"}},$l=({label:e,placeholder:o="Select an icon",helperText:t,views:n={},size:a="md",shape:l="default",variant:c="default",error:s=!1,isDisabled:d=!1,isReadOnly:g=!1,showSearch:m=!0,isOpen:f,selectedIcon:p,searchQuery:u,filteredIcons:y,handleToggle:k,handleIconSelect:x,handleSearchChange:C,triggerRef:S,dropdownRef:w,handleClose:v,onChange:b,value:I,defaultValue:T,onOpen:j,onClose:E,closeOnSelect:D,...W})=>{const{getColor:A}=i.useTheme(),H={...Eo.container,...n==null?void 0:n.container},z={...Eo.trigger,...Jf[a],...Qf[l],...Zf[c],...s&&{borderColor:"color-red-500"},...d&&{opacity:.6,cursor:"not-allowed"},...!d&&!g&&{_hover:{borderColor:"color-gray-300"}},...n==null?void 0:n.trigger},P={...Eo.dropdown,...n==null?void 0:n.dropdown},V={...Eo.iconGrid,...n==null?void 0:n.iconGrid};return r.jsxs(i.View,{...H,...W,children:[e&&r.jsx(i.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}),r.jsxs(i.View,{ref:S,onClick:d||g?void 0:k,...z,children:[r.jsx(i.Horizontal,{alignItems:"center",gap:8,width:"100%",children:p?r.jsxs(i.Horizontal,{alignItems:"center",gap:8,width:"100%",children:[r.jsx(kr,{name:p,widthHeight:16}),r.jsx(i.Text,{color:"color-gray-800",fontSize:"inherit",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:p})]}):r.jsx(i.Text,{color:"color-gray-500",fontSize:"inherit",children:o})}),!g&&!d&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:f?"up":"down"})]}),f&&r.jsxs(i.View,{ref:w,...P,children:[m&&r.jsx(i.View,{...Eo.searchInput,...n==null?void 0:n.searchInput,children:r.jsx(je,{placeholder:"Search icons...",value:u,onChange:M=>C(M),size:"sm",autoFocus:!0})}),r.jsx(i.View,{...V,children:y.length>0?y.map(M=>r.jsx(i.View,{...Eo.iconItem,onClick:()=>x(M),title:M,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},backgroundColor:p===M?"#EFF6FF":"transparent",borderWidth:p===M?"1px":"0px",borderStyle:"solid",borderColor:p===M?"#BFDBFE":"transparent",...n==null?void 0:n.iconItem,children:r.jsx(kr,{name:M,widthHeight:20})},M)):r.jsx(i.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:"No icons found"})})})]}),t&&r.jsx(i.Text,{color:s?"color-red-500":"color-gray-600",marginTop:"4px",...n==null?void 0:n.helperText,children:t})]})},Rf=e=>{const o=xe(e),t={...e,value:o.value??e.value??e.defaultValue},n=Dl(t),a=l=>{n.handleIconSelect(l),o.onChange(l)};return r.jsx($l,{...n,...t,handleIconSelect:a})},to={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"},searchInput:{marginBottom:"12px"},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"}},em={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"}},om={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},rm={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"}},tm={recent:"🕒",smileys:"😀",people:"👤",animals:"🐶",food:"🍎",activities:"⚽",travel:"🚗",objects:"💡",symbols:"❤️",flags:"🏁"},nm=[{emoji:"😀",name:"grinning face",category:"smileys",keywords:["happy","smile","grin"]},{emoji:"😃",name:"grinning face with big eyes",category:"smileys",keywords:["happy","smile","joy"]},{emoji:"😄",name:"grinning face with smiling eyes",category:"smileys",keywords:["happy","smile","joy"]},{emoji:"😁",name:"beaming face with smiling eyes",category:"smileys",keywords:["happy","smile","grin"]},{emoji:"😆",name:"grinning squinting face",category:"smileys",keywords:["happy","laugh","smile"]},{emoji:"😅",name:"grinning face with sweat",category:"smileys",keywords:["happy","sweat","relief"]},{emoji:"🤣",name:"rolling on the floor laughing",category:"smileys",keywords:["laugh","funny","rofl"]},{emoji:"😂",name:"face with tears of joy",category:"smileys",keywords:["laugh","cry","joy"]},{emoji:"🙂",name:"slightly smiling face",category:"smileys",keywords:["smile","happy"]},{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"]},{emoji:"😇",name:"smiling face with halo",category:"smileys",keywords:["angel","innocent"]},{emoji:"🥰",name:"smiling face with hearts",category:"smileys",keywords:["love","hearts","adore"]},{emoji:"😍",name:"smiling face with heart-eyes",category:"smileys",keywords:["love","heart","eyes"]},{emoji:"🤩",name:"star-struck",category:"smileys",keywords:["star","struck","amazed"]},{emoji:"😘",name:"face blowing a kiss",category:"smileys",keywords:["kiss","love","flirt"]},{emoji:"😗",name:"kissing face",category:"smileys",keywords:["kiss","love"]},{emoji:"☺️",name:"smiling face",category:"smileys",keywords:["smile","happy","content"]},{emoji:"😚",name:"kissing face with closed eyes",category:"smileys",keywords:["kiss","love","closed eyes"]},{emoji:"😙",name:"kissing face with smiling eyes",category:"smileys",keywords:["kiss","love","smile"]},{emoji:"🥲",name:"smiling face with tear",category:"smileys",keywords:["happy","cry","tear","bittersweet"]},{emoji:"😋",name:"face savoring food",category:"smileys",keywords:["yum","delicious","food"]},{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"]},{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"]},{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"]},{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"]},{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"]},{emoji:"😪",name:"sleepy face",category:"smileys",keywords:["sleepy","tired","drowsy"]},{emoji:"🤤",name:"drooling face",category:"smileys",keywords:["drool","desire","sleep"]},{emoji:"😴",name:"sleeping face",category:"smileys",keywords:["sleep","tired","zzz"]},{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"]},{emoji:"🥴",name:"woozy face",category:"smileys",keywords:["dizzy","drunk","confused"]},{emoji:"😵",name:"dizzy face",category:"smileys",keywords:["dizzy","confused","knocked out"]},{emoji:"😵💫",name:"face with spiral eyes",category:"smileys",keywords:["dizzy","hypnotized","confused"]},{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"]},{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"]},{emoji:"🖐️",name:"hand with fingers splayed",category:"people",keywords:["hand","five"]},{emoji:"✋",name:"raised hand",category:"people",keywords:["hand","stop","high five"]},{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"]},{emoji:"🤏",name:"pinching hand",category:"people",keywords:["small","tiny"]},{emoji:"✌️",name:"victory hand",category:"people",keywords:["peace","victory"]},{emoji:"🤞",name:"crossed fingers",category:"people",keywords:["luck","hope"]},{emoji:"🤟",name:"love-you gesture",category:"people",keywords:["love","you"]},{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"]},{emoji:"👎",name:"thumbs down",category:"people",keywords:["thumbs down","bad","no"]},{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"]},{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"]},{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"]},{emoji:"🦾",name:"mechanical arm",category:"people",keywords:["robot","prosthetic","cyborg"]},{emoji:"🦿",name:"mechanical leg",category:"people",keywords:["robot","prosthetic","cyborg"]},{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"]},{emoji:"🫀",name:"anatomical heart",category:"people",keywords:["heart","organ","love"]},{emoji:"🫁",name:"lungs",category:"people",keywords:["lungs","breathe","organ"]},{emoji:"🦷",name:"tooth",category:"people",keywords:["tooth","dental","smile"]},{emoji:"🦴",name:"bone",category:"people",keywords:["bone","skeleton","dog"]},{emoji:"👀",name:"eyes",category:"people",keywords:["eyes","look","see"]},{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"]},{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"]},{emoji:"🐱",name:"cat face",category:"animals",keywords:["cat","pet","animal"]},{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"]},{emoji:"🦁",name:"lion",category:"animals",keywords:["lion","king","cat"]},{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"]},{emoji:"🐵",name:"monkey face",category:"animals",keywords:["monkey","primate","banana"]},{emoji:"🙈",name:"see-no-evil monkey",category:"animals",keywords:["monkey","see no evil","eyes"]},{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"]},{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"]},{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"]},{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"]},{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"]},{emoji:"💐",name:"bouquet",category:"animals",keywords:["flowers","bouquet","gift"]},{emoji:"🌺",name:"hibiscus",category:"animals",keywords:["flower","tropical","red"]},{emoji:"🌻",name:"sunflower",category:"animals",keywords:["sunflower","yellow","big"]},{emoji:"🌹",name:"rose",category:"animals",keywords:["rose","love","red"]},{emoji:"🥀",name:"wilted flower",category:"animals",keywords:["flower","wilted","sad"]},{emoji:"🌷",name:"tulip",category:"animals",keywords:["tulip","spring","netherlands"]},{emoji:"🌼",name:"daisy",category:"animals",keywords:["daisy","white","simple"]},{emoji:"🌱",name:"seedling",category:"animals",keywords:["plant","grow","green"]},{emoji:"🌿",name:"herb",category:"animals",keywords:["herb","green","leaf"]},{emoji:"🍀",name:"four leaf clover",category:"animals",keywords:["clover","luck","green"]},{emoji:"🌳",name:"deciduous tree",category:"animals",keywords:["tree","nature","green"]},{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"]},{emoji:"🍅",name:"tomato",category:"food",keywords:["tomato","red","vegetable"]},{emoji:"🫒",name:"olive",category:"food",keywords:["olive","green","oil"]},{emoji:"🥥",name:"coconut",category:"food",keywords:["coconut","tropical","milk"]},{emoji:"🥑",name:"avocado",category:"food",keywords:["avocado","green","healthy"]},{emoji:"🍆",name:"eggplant",category:"food",keywords:["eggplant","purple","vegetable"]},{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"]},{emoji:"🌶️",name:"hot pepper",category:"food",keywords:["pepper","hot","spicy"]},{emoji:"🫑",name:"bell pepper",category:"food",keywords:["pepper","bell","vegetable"]},{emoji:"🥒",name:"cucumber",category:"food",keywords:["cucumber","green","vegetable"]},{emoji:"🥬",name:"leafy greens",category:"food",keywords:["lettuce","greens","salad"]},{emoji:"🥦",name:"broccoli",category:"food",keywords:["broccoli","green","vegetable"]},{emoji:"🧄",name:"garlic",category:"food",keywords:["garlic","flavor","cooking"]},{emoji:"🧅",name:"onion",category:"food",keywords:["onion","cry","cooking"]},{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"]},{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"]},{emoji:"🥓",name:"bacon",category:"food",keywords:["bacon","pork","breakfast"]},{emoji:"🍔",name:"hamburger",category:"food",keywords:["burger","hamburger","fast food"]},{emoji:"🍟",name:"french fries",category:"food",keywords:["fries","potato","fast food"]},{emoji:"🍕",name:"pizza",category:"food",keywords:["pizza","slice","italian"]},{emoji:"🌭",name:"hot dog",category:"food",keywords:["hot dog","sausage","fast food"]},{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"]},{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"]},{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"]},{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"]},{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"]},{emoji:"🫖",name:"teapot",category:"food",keywords:["teapot","tea","hot"]},{emoji:"🍵",name:"teacup without handle",category:"food",keywords:["tea","green tea","cup"]},{emoji:"🍶",name:"sake",category:"food",keywords:["sake","japanese","alcohol"]},{emoji:"🍾",name:"bottle with popping cork",category:"food",keywords:["champagne","celebration","cork"]},{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"]},{emoji:"🥂",name:"clinking glasses",category:"food",keywords:["champagne","cheers","celebration"]},{emoji:"🥃",name:"tumbler glass",category:"food",keywords:["whiskey","tumbler","alcohol"]},{emoji:"🫗",name:"pouring liquid",category:"food",keywords:["pour","liquid","drink"]},{emoji:"🥤",name:"cup with straw",category:"food",keywords:["soda","straw","drink"]},{emoji:"🧋",name:"bubble tea",category:"food",keywords:["bubble tea","boba","drink"]},{emoji:"🧃",name:"beverage box",category:"food",keywords:["juice box","drink","straw"]},{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"]},{emoji:"🔋",name:"battery",category:"objects",keywords:["battery","power"]},{emoji:"🖥️",name:"desktop computer",category:"objects",keywords:["computer","desktop"]},{emoji:"💻",name:"laptop",category:"objects",keywords:["laptop","computer"]},{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"]},{emoji:"🧡",name:"orange heart",category:"symbols",keywords:["love","heart"]},{emoji:"💛",name:"yellow heart",category:"symbols",keywords:["love","heart"]},{emoji:"💚",name:"green heart",category:"symbols",keywords:["love","heart"]},{emoji:"💙",name:"blue heart",category:"symbols",keywords:["love","heart"]},{emoji:"💜",name:"purple heart",category:"symbols",keywords:["love","heart"]},{emoji:"🖤",name:"black heart",category:"symbols",keywords:["love","heart"]},{emoji:"🤍",name:"white heart",category:"symbols",keywords:["love","heart"]},{emoji:"🏁",name:"chequered flag",category:"flags",keywords:["flag","race","finish"]},{emoji:"🚩",name:"triangular flag",category:"flags",keywords:["flag","warning"]},{emoji:"🏳️",name:"white flag",category:"flags",keywords:["flag","surrender"]},{emoji:"🏴",name:"black flag",category:"flags",keywords:["flag","pirate"]},{emoji:"🏳️🌈",name:"rainbow flag",category:"flags",keywords:["flag","rainbow","pride"]}],Ll=e=>{const{value:o,defaultValue:t="",onChange:n,onEmojiSelect:a,isOpen:l,onOpen:c,onClose:s,closeOnSelect:d=!0,maxRecentEmojis:g=16,showRecentEmojis:m=!0,enabledCategories:f=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],customEmojis:p=[]}=e,[u,y]=h.useState(l??!1),[k,x]=h.useState(o??t),[C,S]=h.useState(""),[w,v]=h.useState("smileys"),[b,I]=h.useState([]),T=h.useRef(null),j=h.useRef(null),E=h.useMemo(()=>[...nm,...p],[p]),D=h.useMemo(()=>{let M=E;if(w!=="recent"?M=M.filter(L=>L.category===w):M=b,C){const L=C.toLowerCase();M=M.filter(_=>_.name.toLowerCase().includes(L)||_.keywords.some(O=>O.toLowerCase().includes(L)))}return M},[E,w,b,C]);h.useEffect(()=>{o!==void 0&&x(o)},[o]),h.useEffect(()=>{l!==void 0&&y(l)},[l]),h.useEffect(()=>{if(m&&typeof localStorage<"u"){const M=localStorage.getItem("emojiPicker-recentEmojis");if(M)try{I(JSON.parse(M))}catch{}}},[m]),h.useEffect(()=>{if(typeof document>"u")return;const M=L=>{u&&T.current&&j.current&&!T.current.contains(L.target)&&!j.current.contains(L.target)&&V()};return document.addEventListener("mousedown",M),()=>document.removeEventListener("mousedown",M)},[u]);const W=h.useCallback(M=>{m&&I(L=>{const _=L.filter(N=>N.emoji!==M.emoji),O=[M,..._].slice(0,g);return typeof localStorage<"u"&&localStorage.setItem("emojiPicker-recentEmojis",JSON.stringify(O)),O})},[m,g]),A=h.useCallback(()=>{const M=!u;y(M),M?(c==null||c(),S(""),m&&b.length>0?v("recent"):v("smileys")):s==null||s()},[u,c,s,m,b.length]),H=h.useCallback(M=>{x(M.emoji),W(M),n==null||n(M.emoji),a==null||a(M),d&&(y(!1),s==null||s())},[n,a,d,s,W]),z=h.useCallback(M=>{S(M),M&&w==="recent"&&v("smileys")},[w]),P=h.useCallback(M=>{v(M),S("")},[]),V=h.useCallback(()=>{y(!1),s==null||s()},[s]);return{isOpen:u,selectedEmoji:k,recentEmojis:b,searchQuery:C,activeCategory:w,filteredEmojis:D,handleToggle:A,handleEmojiSelect:H,handleSearchChange:z,handleCategoryChange:P,handleClose:V,triggerRef:T,dropdownRef:j}},_l=({id:e,name:o,label:t,placeholder:n="Select an emoji",helperText:a,views:l={},size:c="md",shape:s="default",variant:d="default",error:g=!1,isDisabled:m=!1,isReadOnly:f=!1,showSearch:p=!0,showCategories:u=!0,showRecentEmojis:y=!0,enabledCategories:k=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],isOpen:x,selectedEmoji:C,recentEmojis:S,searchQuery:w,activeCategory:v,filteredEmojis:b,handleToggle:I,handleEmojiSelect:T,handleSearchChange:j,handleCategoryChange:E,handleClose:D,triggerRef:W,dropdownRef:A,onChange:H,onOpen:z,onClose:P,onEmojiSelect:V,customEmojis:M,closeOnSelect:L,maxRecentEmojis:_,value:O,defaultValue:N,...U})=>{const{getColor:X}=i.useTheme(),oe={...to.container,...l==null?void 0:l.container},B={...to.trigger,...em[c],...om[s],...rm[d],...g&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...!m&&!f&&{_hover:{borderColor:"color-gray-300"}},...l==null?void 0:l.trigger},$={...to.dropdown,...l==null?void 0:l.dropdown},q={...to.categoryTabs,...l==null?void 0:l.categoryTabs},J={...to.emojiGrid,...l==null?void 0:l.emojiGrid},Y=k.filter(Z=>Z==="recent"?y&&S.length>0:!0);return r.jsxs(i.View,{id:e,...oe,...U,children:[t&&r.jsx(i.Text,{fontSize:c==="xs"?"12px":c==="sm"?"14px":"16px",fontWeight:"500",color:"color-gray-700",marginBottom:"4px",...l==null?void 0:l.label,children:t}),r.jsxs(i.View,{ref:W,onClick:m||f?void 0:I,...B,children:[r.jsx(i.Horizontal,{alignItems:"center",gap:8,children:r.jsx(i.Text,{color:C?"color-gray-800":"color-gray-500",fontSize:"inherit",children:C||n})}),!f&&!m&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:x?"up":"down"})]}),x&&r.jsxs(i.View,{ref:A,...$,children:[p&&r.jsx(i.View,{...to.searchInput,...l==null?void 0:l.searchInput,children:r.jsx(je,{placeholder:"Search emojis...",value:w,onChange:j,size:"sm"})}),u&&r.jsx(i.View,{...q,children:Y.map(Z=>r.jsx(i.View,{...to.categoryTab,...v===Z&&{borderBottomColor:"theme-primary",color:"theme-primary",backgroundColor:"color-blue-50"},onClick:()=>E(Z),title:Z.charAt(0).toUpperCase()+Z.slice(1),...l==null?void 0:l.categoryTab,children:tm[Z]},Z))}),r.jsx(i.View,{...J,children:b.length>0?b.map((Z,ee)=>r.jsx(i.View,{...to.emoji,onClick:()=>T(Z),title:Z.name,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},color:"color-gray-800",...l==null?void 0:l.emoji,children:Z.emoji},`${Z.emoji}-${ee}`)):r.jsx(i.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:w?"No emojis found":"No emojis in this category"})})})]}),a&&r.jsx(i.Text,{color:g?"color-red-500":"color-gray-600",marginTop:"4px",...l==null?void 0:l.helperText,children:a})]})},am=e=>{const o=xe(e),t={...e,value:o.value??e.value??e.defaultValue},n=Ll(t),a=l=>{var c;n.handleEmojiSelect(l),o.onChange(l.emoji),(c=e.onEmojiSelect)==null||c.call(e,l)};return r.jsx(_l,{...n,...t,handleEmojiSelect:a})},lm=({files:e,onRemove:o,maxHeight:t="120px",views:n={}})=>{if(e.length===0)return null;const a=h.useCallback(l=>l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(1)} KB`:`${(l/(1024*1024)).toFixed(1)} MB`,[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:t,overflowY:"auto",...n==null?void 0:n.container,children:e.map((l,c)=>{const s=l.url||"",d=l.type.startsWith("image/"),g=l.type.startsWith("video/"),m=l.type.startsWith("audio/");return r.jsx(i.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:r.jsxs(Me,{children:[r.jsx(Me.Trigger,{children:r.jsxs(i.View,{position:"relative",children:[d&&s&&r.jsx(i.Image,{src:s,alt:l.name,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),g&&s&&r.jsx(i.View,{as:"video",src:s,alt:l.name,controls:!1,muted:!0,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),m&&r.jsx(i.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(Fo,{widthHeight:24,color:"color-black"})}),!d&&!g&&!m&&r.jsx(i.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(go,{widthHeight:24,color:"color-black"})}),o&&r.jsx(i.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:f=>{f.stopPropagation(),o(c)},"aria-label":`Remove ${l.name}`,children:"×"})]})}),r.jsxs(Me.Content,{children:[d&&s&&r.jsx(i.Image,{src:s,alt:l.name,maxWidth:"300px"}),g&&s&&r.jsx(i.View,{as:"video",src:s,controls:!0,maxWidth:"300px"}),m&&s&&r.jsx(i.View,{as:"audio",src:s,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",fontSize:12,...n==null?void 0:n.name,children:[l.name," (",a(l.size),")"]})]})]})},c)})})},Bl=e=>{const o=pe("slider",e),t=vl(o);return r.jsx(Ml,{...o,...t})},im=({url:e,type:o,name:t,onOpen:n})=>{const a=o.toLowerCase(),l=a.startsWith("image"),c=a.startsWith("video"),s=a.startsWith("audio"),d=()=>{n&&n()};return r.jsxs(i.View,{width:"60px",height:"60px",flexShrink:0,borderRadius:"4px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-gray-200",cursor:"pointer",onClick:d,children:[l&&r.jsx(i.Image,{src:e,alt:t,width:"100%",height:"100%",objectFit:"cover"}),c&&r.jsx(i.View,{as:"video",src:e,controls:!0,width:"100%",height:"100%",style:{objectFit:"cover"},onClick:g=>g.stopPropagation()}),s&&r.jsx(i.View,{as:"audio",controls:!0,src:e,width:"100%",onClick:g=>g.stopPropagation()}),!l&&!c&&!s&&r.jsx(go,{widthHeight:24,color:"color-gray-600"})]})},no=vo.create(e=>({modals:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,modals:[...a.modals,{name:o,props:{...t,isVisible:!0},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,modals:t.modals.filter(n=>n.name!==o)}:{modals:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),cm=(e,o={},t={})=>{no.getState().show(e,o,t),no.getState().onShow(e,o)},Jt=e=>{no.getState().onHide(e),no.getState().hide(typeof e=="string"?e:void 0)},sm={square:{borderRadius:0},rounded:{borderRadius:8}},dm={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"}},gm={xs:12,sm:16,md:20,lg:24,xl:28},Qt={body:{fontSize:"16px",fontWeight:"400",color:"color-gray-700"}},Ol=h.memo(({children:e,blur:o,isOpen:t=!1,isClosePrevented:n=!1,onClose:a=()=>{},position:l="center",views:c,...s})=>{const d=h.useCallback(()=>{n||a()},[n,a]);return r.jsx(i.Center,{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1e3,onClick:d,visibility:t?"visible":"hidden",opacity:t?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease",...c==null?void 0:c.container,children:r.jsx(i.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:d,...dm[l],...s,...c==null?void 0:c.view,children:e})})}),hm={boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.15)"},fm={elevation:5,shadowColor:"rgba(0, 0, 0, 0.15)",shadowOffset:{width:0,height:4},shadowOpacity:1,shadowRadius:16},mm=h.memo(({children:e,shadow:o,isFullScreen:t=!1,shape:n="rounded",views:a,isOpen:l=!0,position:c,...s})=>{const d=typeof document!==void 0?hm:fm,g=h.useCallback(m=>{m&&m.stopPropagation&&m.stopPropagation()},[]);return r.jsx(i.Vertical,{cursor:"default",backgroundColor:"color-white",width:t?"100%":600,height:t?"100%":"fit-content",onClick:g,transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",opacity:l?1:0,transform:l?"translateY(0)":"translateY(8px)",...o||d,...sm[n],media:{mobile:{width:"90%",maxWidth:"100%",margin:"16px"}},...s,...a==null?void 0:a.container,children:e})}),pm=h.memo(({children:e,buttonColor:o="theme-primary",iconSize:t="md",buttonSize:n,buttonPosition:a="right",views:l,onClose:c,...s})=>{const d=c||Jt,g=r.jsx(i.View,{onClick:()=>d(),children:r.jsx(He,{widthHeight:gm[n??t],color:o})});return r.jsxs(i.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}},...s,...l==null?void 0:l.header,children:[a==="left"&&g,e,a==="right"&&g]})}),um=h.memo(({children:e,views:o,...t})=>r.jsx(i.View,{paddingVertical:16,paddingHorizontal:24,fontSize:Qt.body.fontSize,fontWeight:Qt.body.fontWeight,color:Qt.body.color,media:{mobile:{paddingVertical:12,paddingHorizontal:16,fontSize:"14px"}},...t,...o==null?void 0:o.view,children:e})),ym=h.memo(({children:e,views:o,...t})=>r.jsx(i.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}},...t,...o==null?void 0:o.container,children:e})),Zt=({modals:e,onShow:o,onHide:t})=>{const n=no(a=>a.modals);return h.useEffect(()=>{o&&no.getState().setOnShow(o)},[o]),h.useEffect(()=>{t&&no.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(h.Fragment,{children:n.map((a,l)=>{const c=e[a.name];return c?r.jsx(Ol,{isOpen:a.props.isVisible,onClose:()=>Jt(a.name),blur:5,...a.overlayProps,style:{zIndex:1e3+l},children:r.jsx(c,{...a.props})},l):(console.error(`${a.name} modal doesn't exist`),null)})})},uo=({children:e})=>r.jsx(r.Fragment,{children:e});uo.Overlay=Ol,uo.Container=mm,uo.Header=pm,uo.Body=um,uo.Footer=ym,uo.Layout=Zt;const Nl={xs:"320px",sm:"380px",md:"480px",lg:"640px",xl:"768px",full:"100%"},bm={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"}},Rt=({isOpen:e,onClose:o,isClosePrevented:t,blur:n,children:a,...l})=>{const c=()=>{t||o()};return h.useEffect(()=>{const s=d=>{d.key==="Escape"&&e&&!t&&o()};return e&&document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[e,t,o]),r.jsx(i.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:c,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",...l,children:a})},en=({placement:e="right",size:o="md",isOpen:t=!1,children:n,...a})=>{const l=m=>{m.stopPropagation()},s=e==="top"||e==="bottom"?{height:o==="full"?"100vh":Nl[o]||o,maxHeight:"100vh"}:{width:o==="full"?"100vw":Nl[o]||o,maxWidth:"100vw"},d=e==="left"?"0 12px 12px 0":e==="right"?"12px 0 0 12px":e==="top"?"0 0 12px 12px":"12px 12px 0 0",g=t?"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 r.jsx(i.Vertical,{position:"absolute",backgroundColor:"color-white",borderRadius:d,...bm[e],...s,onClick:l,transform:g,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})},xm=({children:e,onClose:o,buttonPosition:t="right",...n})=>{const a=o&&r.jsx(i.View,{onClick:o,cursor:"pointer",padding:8,children:r.jsx(He,{widthHeight:20,color:"color-gray-500"})});return r.jsxs(i.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderBottomWidth:"1px",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:t==="none"?"center":"space-between",...n,children:[t==="left"&&a,e,t==="right"&&a]})},km=({children:e,...o})=>r.jsx(i.Vertical,{padding:24,flex:1,overflowY:"auto",...o,children:e}),Cm=({children:e,...o})=>r.jsx(i.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderTopWidth:"1px",borderTopColor:"color-gray-200",alignItems:"center",justifyContent:"flex-end",gap:12,...o,children:e}),ao=vo.create(e=>({drawers:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,drawers:[...a.drawers,{name:o,props:{...t,isOpen:!1},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,drawers:t.drawers.filter(n=>n.name!==o)}:{drawers:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),wm=(e,o={},t={})=>{const n=ao.getState();n.hide(e),n.show(e,o,t),n.onShow(e,o),queueMicrotask(()=>{ao.setState(a=>({drawers:a.drawers.map(l=>l.name===e?{...l,props:{...l.props,isOpen:!0}}:l)}))})},ql=e=>{ao.getState().onHide(e),ao.getState().hide(typeof e=="string"?e:void 0)},Sm=({drawers:e,onShow:o,onHide:t})=>{const n=ao(a=>a.drawers);return h.useEffect(()=>{o&&ao.getState().setOnShow(o)},[o]),h.useEffect(()=>{t&&ao.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(h.Fragment,{children:n.map((a,l)=>{var u;const c=e[a.name];if(!c)return console.error(`${a.name} drawer doesn't exist`),null;const{placement:s,size:d,isClosePrevented:g,blur:m,containerProps:f,...p}=a.props||{};return r.jsx(Rt,{isOpen:a.props.isOpen,onClose:()=>ql(a.name),isClosePrevented:g,blur:m,...a.overlayProps,style:{zIndex:1e3+l,...((u=a.overlayProps)==null?void 0:u.style)||{}},children:r.jsx(en,{placement:s,size:d,isOpen:a.props.isOpen,...f||{},children:r.jsx(h.Suspense,{fallback:null,children:r.jsx(c,{...p})})})},l)})})},yo=({isOpen:e,onClose:o,placement:t="right",size:n="md",isClosePrevented:a,children:l,...c})=>r.jsx(Rt,{isOpen:e,onClose:o,isClosePrevented:a,...c,children:r.jsx(en,{placement:t,size:n,isOpen:e,children:l})});yo.Overlay=Rt,yo.Container=en,yo.Header=xm,yo.Body=km,yo.Footer=Cm,yo.Layout=Sm;const Ul=({behavior:e,keyboardVerticalOffset:o,dismissOnTap:t,enabled:n,children:a,...l})=>r.jsx(i.View,{flex:1,width:"100%",...l,children:a}),vm=({header:e,footer:o,children:t,isLoading:n=!1,safe:a=!0,scrollable:l=!0,dismissKeyboardOnTap:c=!0,keyboardVerticalOffset:s=0,views:d={},backgroundColor:g="color-white",...m})=>{const f=a?i.SafeArea:i.View,p=i.isBrowser()?{}:{keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:!1,contentContainerStyle:{flexGrow:1}},u=n?r.jsx(i.Center,{flex:1,width:"100%",...d.content,children:r.jsx(eo,{})}):l?r.jsx(i.Scroll,{flex:1,width:"100%",...p,...d.content,children:t}):r.jsx(i.View,{flex:1,width:"100%",...d.content,children:t});return r.jsxs(f,{flex:1,height:"100%",width:"100%",flexDirection:"column",backgroundColor:g,...m,...d.container,children:[e!=null&&r.jsx(i.View,{width:"100%",flexShrink:0,...d.header,children:e}),r.jsxs(Ul,{flexDirection:"column",dismissOnTap:c,keyboardVerticalOffset:s,children:[u,o!=null&&r.jsx(i.View,{width:"100%",flexShrink:0,...d.footer,children:o})]})]})},Nr=vo.create(e=>({started:!1,loaded:!1,setStarted:(o=!0)=>e({started:o}),setLoaded:(o=!0)=>e({loaded:o}),reset:()=>e({started:!1,loaded:!1})})),Tm=(e=!0)=>Nr.getState().setLoaded(e),Im=(e=!0)=>Nr.getState().setStarted(e),Fm=({logo:e,logoSrc:o,loader:t,showLoader:n=!0,duration:a=600,isLoaded:l,onHidden:c,backgroundColor:s="color-white",children:d,...g})=>{const m=Nr(w=>w.loaded),f=l!==void 0?l:m,[p,u]=h.useState(!0),[y,k]=h.useState(!1);if(h.useEffect(()=>{if(!f||y)return;k(!0);const w=setTimeout(()=>{u(!1),c==null||c()},a);return()=>clearTimeout(w)},[f,y,a,c]),!p)return null;const x=i.isBrowser()?"fixed":"absolute",C=y?i.Animation.fadeOut({duration:`${a}ms`}):void 0,S=e??(o?r.jsx(i.Image,{src:o,width:120,height:120,alt:"logo"}):null);return r.jsxs(i.Center,{position:x,top:0,left:0,right:0,bottom:0,zIndex:9999,backgroundColor:s,animate:C,...g,children:[r.jsxs(i.Vertical,{alignItems:"center",gap:24,children:[S,n&&(t??r.jsx(eo,{}))]}),d]})},qe=vo.create((e,o)=>({stack:[{path:"/",params:{}}],index:0,push:(t,n={})=>e(a=>{const l=a.stack.slice(0,a.index+1);return l.push({path:t,params:n}),{stack:l,index:l.length-1}}),replace:(t,n={})=>e(a=>{const l=a.stack.slice();return l[a.index]={path:t,params:n},{stack:l}}),back:()=>{const{index:t}=o();return t<=0?!1:(e({index:t-1}),!0)},go:t=>e(n=>({index:Math.min(Math.max(n.index+t,0),n.stack.length-1)})),reset:(t,n={})=>e({stack:[{path:t,params:n}],index:0})})),zm=(e,o)=>qe.getState().push(e,o),Mm=()=>qe.getState().back(),on=()=>{const e=qe(d=>d.stack),o=qe(d=>d.index),t=qe(d=>d.push),n=qe(d=>d.replace),a=qe(d=>d.back),l=qe(d=>d.go),c=qe(d=>d.reset),s=e[o]||{path:"/",params:{}};return{path:s.path,params:s.params,stack:e,index:o,canGoBack:o>0,push:t,replace:n,back:a,go:l,reset:c,navigate:t}},Gl=(e,o)=>{const t=e.split("/").filter(Boolean),n=o.split("/").filter(Boolean);if(t.length!==n.length)return null;const a={};for(let l=0;l<t.length;l+=1){const c=t[l];if(c.startsWith(":"))a[c.slice(1)]=decodeURIComponent(n[l]);else if(c!==n[l])return null}return a},Wm=e=>Array.isArray(e)?e:Object.entries(e).map(([o,t])=>({path:o,component:t})),Hm=({routes:e,notFound:o})=>{const{path:t,params:n}=on();for(const a of Wm(e)){const l=Gl(a.path,t);if(l){const c=a.component;return r.jsx(c,{...n,...l})}}return o?r.jsx(o,{}):null},jm=({routes:e,notFound:o,initialPath:t,syncBrowserHistory:n=!1})=>{const{path:a,push:l,back:c,reset:s}=on(),d=h.useRef(!1);return i.useMount(()=>{t&&s(t)}),h.useEffect(()=>{if(!(!n||typeof window>"u")){if(d.current){d.current=!1;return}try{window.history.pushState({path:a},"",a)}catch{}}},[a,n]),h.useEffect(()=>{if(!n||typeof window>"u")return;const g=()=>{d.current=!0,c()||(d.current=!1)};return window.addEventListener("popstate",g),()=>window.removeEventListener("popstate",g)},[n,c,l]),r.jsx(Hm,{routes:e,notFound:o})},Pm=(e=null,o=[])=>{const[t,n]=h.useState(e),[a,l]=h.useState(o),c=h.useRef({});return{activeItemId:t,setActiveItemId:n,expandedItemIds:a,toggleExpandedItem:g=>{l(m=>m.includes(g)?m.filter(p=>p!==g):[...m,g])},isItemExpanded:g=>a.includes(g),triggerRefs:c}},rn={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"}}}},tn={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"}},Yl={horizontal:{flexDirection:"row",gap:"8px",media:{mobile:{flexDirection:"column",gap:"4px"}}},vertical:{flexDirection:"column",gap:"4px"}},Do={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"}},Kl=h.createContext({activeItemId:null,setActiveItemId:()=>{},expandedItemIds:[],toggleExpandedItem:()=>{},isItemExpanded:()=>!1,orientation:"vertical",size:"md",variant:"default",triggerRefs:{current:{}}}),Vm=({children:e,value:o})=>r.jsx(Kl.Provider,{value:o,children:e}),ir=()=>{const e=h.useContext(Kl);if(!e)throw new Error("useNavigationMenuContext must be used within a NavigationMenuProvider");return e},nn=({children:e,views:o})=>{const{orientation:t}=ir(),n=t==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(n,{width:"100%",...Yl[t],transition:"background-color 0.2s ease, border-color 0.2s ease",borderRadius:"8px",...o==null?void 0:o.container,children:e})},Xl=h.createContext({itemValue:null,isDisabled:!1}),Am=()=>{const e=h.useContext(Xl);if(!e)throw new Error("useNavigationMenuItemContext must be used within a NavigationMenuItem");return e},an=({item:e,value:o,isDisabled:t=!1,children:n,views:a})=>{var C;const{activeItemId:l,setActiveItemId:c,orientation:s,size:d,variant:g,onItemActivate:m}=ir(),f=(e==null?void 0:e.id)||o,p=l===f,u=(e==null?void 0:e.items)&&e.items.length>0,y=(e==null?void 0:e.disabled)||t,k=()=>{y||f&&(c(f),m&&m(f))},x=s==="horizontal"?i.Horizontal:i.Vertical;return n?r.jsx(Xl.Provider,{value:{itemValue:f||null,isDisabled:y},children:r.jsx(i.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",...rn[d],...tn[g],...p?Do.active:{},_hover:y?{}:Do.hover,...a==null?void 0:a.item,children:n})}):u&&e?r.jsxs(x,{width:"100%",flexDirection:"column",position:"relative",...a==null?void 0:a.item,children:[r.jsxs(Jl,{itemId:e.id,disabled:e.disabled,views:a,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}),r.jsx(Ql,{itemId:e.id,children:r.jsx(nn,{children:(C=e.items)==null?void 0:C.map(S=>r.jsx(an,{item:S},S.id))})})]}):e?r.jsxs(i.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",...rn[d],...tn[g],...p?Do.active:{},_hover:e.disabled?{}:Do.hover,...a==null?void 0:a.item,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}):null},Jl=({children:e,itemId:o,disabled:t,views:n})=>{const{activeItemId:a,toggleExpandedItem:l,isItemExpanded:c,size:s,variant:d,triggerRefs:g}=ir(),m=h.useRef(null),f=a===o,p=c(o);h.useEffect(()=>(m.current&&o&&(g.current[o]=m.current),()=>{o&&delete g.current[o]}),[o,g]);const u=y=>{y.preventDefault(),!t&&l(o)};return r.jsxs(i.View,{ref:m,onClick:u,cursor:t?"not-allowed":"pointer",opacity:t?.5:1,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:8,transition:"background-color 0.2s ease",...rn[s],...tn[d],...f?Do.active:{},_hover:t?{}:Do.hover,...n==null?void 0:n.trigger,children:[r.jsx(i.View,{display:"flex",alignItems:"center",children:e}),r.jsx(i.View,{transition:"transform 0.2s ease",transform:p?"rotate(180deg)":"rotate(0deg)",...n==null?void 0:n.indicator,children:r.jsx(he,{orientation:"down",widthHeight:16,color:"currentColor",filled:!0})})]})},Ql=({children:e,itemId:o,views:t})=>{const{isItemExpanded:n,orientation:a,triggerRefs:l}=ir(),c=h.useRef(null),[s,d]=h.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),g=n(o);if(h.useEffect(()=>{if(g&&c.current&&o&&l.current[o]&&a==="horizontal"){const f=c.current.getBoundingClientRect(),p=l.current[o].getBoundingClientRect(),u=Math.max(f.width||200,200),y=Math.max(f.height||150,150),k=window.innerWidth,x=window.innerHeight,C={top:p.top,right:k-p.right,bottom:x-p.bottom,left:p.left},S=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8},{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top}]:[{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8}],w=S.find(T=>T.fits);if(w){d({x:w.x,y:w.y,placement:w.placement});return}const v=S.reduce((T,j)=>j.space>T.space?j:T);let b=v.x,I=v.y;b+u>k&&(b=k-u-8),b<8&&(b=8),I+y>x&&(I=x-y-8),I<8&&(I=8),d({x:b,y:I,placement:v.placement})}},[g,a,o,l]),!g)return null;if(a==="vertical")return r.jsx(i.View,{paddingLeft:16,width:"100%",position:"relative",backgroundColor:"transparent",...t==null?void 0:t.container,children:e});const m={position:"fixed",left:s.x,top:s.y,zIndex:1e3};return r.jsx(i.View,{ref:c,role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:m,...t==null?void 0:t.container,children:e})},Em=({href:e,children:o,views:t,underline:n,isExternal:a,iconSize:l,...c})=>{const{itemValue:s,isDisabled:d}=Am(),{activeItemId:g,setActiveItemId:m,onItemActivate:f}=ir(),p=g===s,u=y=>{if(d){y.preventDefault();return}s&&(m(s),f&&f(s)),c.onClick&&c.onClick(y)};return r.jsx(i.View,{as:"a",href:d?void 0:e,onClick:u,cursor:d?"not-allowed":"pointer",opacity:d?.5:1,width:"100%",display:"flex",alignItems:"center","aria-current":p?"page":void 0,"aria-disabled":d,"data-active":p?"":void 0,"data-disabled":d?"":void 0,...p?{fontWeight:"bold"}:{},...t==null?void 0:t.container,...c,children:o})},Dm=({items:e,orientation:o,views:t,themeMode:n})=>{const a=o==="horizontal"?i.Horizontal:i.Vertical;return!e||e.length===0?null:r.jsx(a,{width:"100%",...Yl[o],...t==null?void 0:t.container,children:r.jsx(nn,{views:t,children:e.map(l=>r.jsx(an,{item:l,views:t},l.id))})})},bo=e=>{const o=pe("navigation",e),{items:t,children:n,orientation:a="vertical",size:l="md",variant:c="default",defaultActiveItemId:s=null,defaultExpandedItemIds:d=[],onItemActivate:g,views:m,...f}=o,{activeItemId:p,setActiveItemId:u,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:x,triggerRefs:C}=Pm(s,d);return r.jsx(Vm,{value:{activeItemId:p,setActiveItemId:u,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:x,orientation:a,size:l,variant:c,onItemActivate:g,triggerRefs:C},children:t?r.jsx(Dm,{items:t,orientation:a,size:l,variant:c,views:m,...f}):n})};bo.List=nn,bo.Item=an,bo.Trigger=Jl,bo.Content=Ql,bo.Link=Em;const Zl={},Rl=h.createContext({views:Zl,onRowClick:()=>{}}),$m=({children:e,views:o=Zl,onRowClick:t})=>r.jsx(Rl.Provider,{value:{views:o,onRowClick:t},children:e}),lo=()=>h.useContext(Rl),ke={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"}}}};({...ke.th},{...ke.td}),{...ke.tr},{...ke.td},{...ke.th},{...ke.table},{...ke.th},{...ke.td},{...ke.tr},{...ke.tfoot},{...ke.caption};const Lm=({children:e})=>r.jsx(i.View,{width:"100%",style:{overflowX:"auto"},children:e}),ei=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"table",...ke.table,...o==null?void 0:o.table,...e,style:{borderCollapse:"collapse",...e.style||{}}})},oi=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"thead",textAlign:"left",...ke.thead,...o==null?void 0:o.thead,...e})},ri=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"th",whiteSpace:"nowrap",...ke.th,...o==null?void 0:o.th,...e})},qr=e=>{const{views:o,onRowClick:t}=lo();return r.jsx(i.Element,{as:"tr",...ke.tr,...o==null?void 0:o.tr,onClick:t,...e})},ln=({isFirstColumn:e,...o})=>{const{views:t}=lo();return r.jsx(i.Element,{as:"td",whiteSpace:"nowrap",fontWeight:e?"500":"400",...ke.td,...t==null?void 0:t.td,...o})},ti=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"tbody",...ke.tbody,...o==null?void 0:o.tbody,...e})},ni=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"tfoot",...ke.tfoot,...o==null?void 0:o.tfoot,...e})},ai=e=>{const{views:o}=lo();return r.jsx(i.Element,{as:"caption",...ke.caption,...o==null?void 0:o.caption,...e})},_m=({data:e,columns:o,footer:t,caption:n,themeMode:a})=>{const l=Math.max(o.length*140,320);return r.jsx(Lm,{children:r.jsxs(ei,{role:"Table",minWidth:l,children:[n&&r.jsx(ai,{children:n}),r.jsx(oi,{children:r.jsx(qr,{children:o.map(c=>r.jsx(ri,{children:c.title},c.field))})}),r.jsx(ti,{children:e.map((c,s)=>r.jsx(qr,{children:o.map((d,g)=>r.jsx(ln,{isFirstColumn:g===0,children:c[d.field]},d.field))},s))}),t&&r.jsx(ni,{children:r.jsx(qr,{children:t.map((c,s)=>r.jsx(ln,{...c.props,children:c.value},s))})})]})})},Ve=({children:e,views:o,onClick:t})=>{const n=pe("table",{views:o,onClick:t});return r.jsx($m,{views:n.views,onRowClick:n.onClick,children:e})};Ve.Head=oi,Ve.HeadCell=ri,Ve.Body=ti,Ve.Row=qr,Ve.Cell=ln,Ve.Footer=ni,Ve.Caption=ai,Ve.Container=ei,Ve.Template=_m;const Bm=(e,o,t)=>{const n=g=>g.value!==void 0?g.value:g.title,a=()=>{if(!(!e||e.length===0)){if(o!==void 0){const g=e.find(m=>n(m)===o);if(g)return g}return e[0]}},[l,c]=h.useState(a()),s=t!==void 0?e.find(g=>n(g)===t):l,d=g=>{t===void 0&&c(g)};return h.useEffect(()=>{if(t!==void 0)return;const g=a(),m=l&&e.some(f=>n(f)===n(l));g&&(!m||o!==void 0&&l&&n(l)!==o)?c(g):!g&&l&&c(void 0)},[e,o]),{activeTab:s,setActiveTab:d}},Om=(e,o,t)=>{const[n,a]=h.useState(e||null);return{activeValue:o!==void 0?o:n,setActiveValue:s=>{o===void 0&&a(s),t&&t(s)}}},Nm=h.memo(({tab:e,isActive:o,onClick:t,iconPosition:n="left",tabStyles:a,textStyles:l})=>{const c=()=>{switch(n){case"top":return"column";case"bottom":return"column-reverse";case"right":return"row-reverse";case"left":default:return"row"}},s=()=>["top","bottom"].includes(n)?"4px":"8px",d=e.icon&&h.isValidElement(e.icon)?h.cloneElement(e.icon,{strokeWidth:o?2.5:2}):e.icon;return r.jsxs(i.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:c(),gap:s(),onClick:t,"data-state":o?"active":"inactive",children:[d&&r.jsx(i.Element,{children:d},o?"active-icon":"inactive-icon"),r.jsxs(i.Element,{display:"grid",alignItems:"center",justifyContent:"center",children:[r.jsx(i.Text,{...l,fontWeight:"600",visibility:"hidden",gridColumn:"1",gridRow:"1","aria-hidden":"true",children:e.title}),r.jsx(i.Text,{...l,fontWeight:o?"600":"500",gridColumn:"1",gridRow:"1",children:e.title})]})]})}),cn=(e,o)=>{const t=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:t?"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}}},qm=({tabs:e=[],activeTab:o,handleTabClick:t,views:n={},renderTab:a,renderContent:l,variant:c="underline",iconPosition:s="left",keepMounted:d=!1})=>{const{themeMode:g}=i.useTheme(),m=cn(c,g);return o?r.jsxs(i.Vertical,{width:"100%",height:"100%",...n.container,children:[r.jsx(i.Horizontal,{alignItems:"center",...m.header,...n.headerTabs,children:e.map(f=>{const p=(f.value!==void 0?f.value:f.title)===(o.value!==void 0?o.value:o.title),u=()=>t(f);return a?a(f,p,u):r.jsx(Nm,{tab:f,isActive:p,onClick:u,iconPosition:s,tabStyles:{...m.tab,...n.tab,...p?m.activeTab:{},...p?n.activeTab:{}},textStyles:{...m.text,...n.title,...p?m.activeText:{},...p?n.activeText:{}}},f.title)})}),r.jsx(i.View,{height:"100%",...m.content,...n.content,children:l?l(o):d?e.map(f=>{const p=f.value!==void 0?f.value:f.title,u=o.value!==void 0?o.value:o.title;return r.jsx(i.View,{display:p===u?"contents":"none",children:f.content},f.title)}):o.content})]}):null},li=h.createContext(null),sn=()=>{const e=h.useContext(li);if(!e)throw new Error("useTabsContext must be used within a Tabs component");return e},Um=h.memo(({children:e,views:o})=>{var s;const{themeMode:t}=i.useTheme(),{variant:n="underline"}=sn(),a=cn(n,t),l=Io("tabs"),c=Be({container:(s=l.views)==null?void 0:s.headerTabs},o);return r.jsx(i.Horizontal,{alignItems:"center",...a.header,...c==null?void 0:c.container,children:e})}),Gm=h.memo(({value:e,children:o,disabled:t=!1,views:n})=>{var u,y;const{themeMode:a}=i.useTheme(),{activeValue:l,setActiveValue:c,variant:s="underline"}=sn(),d=l===e,g=cn(s,a),m=Io("tabs"),f=Be({trigger:(u=m.views)==null?void 0:u.tab,activeState:(y=m.views)==null?void 0:y.activeTab},n),p=h.useCallback(()=>{t||c(e)},[t,e,c]);return r.jsx(i.View,{cursor:t?"not-allowed":"pointer",opacity:t?.6:1,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",...g.tab,...d?g.activeTab:{},_hover:t?{}:s==="underline"?{color:"theme-primary"}:{opacity:.9},onClick:p,...f==null?void 0:f.trigger,...d?f==null?void 0:f.activeState:{},children:r.jsx(i.View,{...g.text,...d?g.activeText:{},children:o})})}),Ym=h.memo(({value:e,children:o,views:t})=>{const{activeValue:n}=sn();return n!==e?null:r.jsx(i.View,{width:"100%",padding:"24px",...t==null?void 0:t.content,children:o})}),Km=e=>{const o=pe("tabs",e),{tabs:t,views:n,defaultValue:a,onTabChange:l,renderTab:c,renderContent:s,variant:d="underline",iconPosition:g="left",keepMounted:m=!1,value:f,onValueChange:p,children:u}=o,y=Om(a,f,p),k=Bm(t||[],a,f);if(u)return r.jsx(li.Provider,{value:{...y,variant:d},children:u});if(t){const x=C=>{const S=w=>w.value!==void 0?w.value:w.title;(!k.activeTab||S(k.activeTab)!==S(C))&&(k.setActiveTab(C),l&&l(C))};return r.jsx(qm,{tabs:t,views:n,activeTab:k.activeTab,handleTabClick:x,renderTab:c,renderContent:s,variant:d,iconPosition:g,keepMounted:m})}return null},$o=h.memo(Km);$o.List=Um,$o.Trigger=Gm,$o.Content=Ym;const Xm=e=>{const{children:o,_isInView:t=!1,alternateHighlightText:n=[],alternateAnimation:a=!1,alternateDuration:l=3e3,highlightText:c,highlightTypewriter:s=!1,highlightSlide:d=!1,highlightSlideDuration:g=500,highlightSlideStagger:m=50,highlightSlideSequential:f=!0}=e,[p,u]=h.useState(o),[y,k]=h.useState(c);return h.useEffect(()=>{if(process.env.NODE_ENV==="production"||typeof o!="string"||!c)return;const x=Array.isArray(c)?c:[c];for(const C of x)typeof C=="string"&&C.length>0&&!o.toLowerCase().includes(C.toLowerCase())&&console.warn(`[Title] highlightText "${C}" 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,c]),h.useEffect(()=>{if(!a||n.length===0||!t||typeof o!="string"||typeof c!="string")return process.env.NODE_ENV!=="production"&&a&&n.length>0&&(typeof o!="string"||typeof c!="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."),u(o),k(c),()=>{};const x=o,C=c;if(!x.toLowerCase().includes(C.toLowerCase()))return process.env.NODE_ENV!=="production"&&console.warn(`[Title] \`children\` must contain \`highlightText\` ("${C}") — it is the placeholder the rotating words replace, e.g. \`<Title highlightText="apps" alternateHighlightText={["apps", "sites"]}>Build apps fast</Title>\`. Rotation is disabled.`),u(o),k(c),()=>{};let S=0;const w=b=>{const I=n[b],T=C.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),j=new RegExp(T,"gi"),E=x.replace(j,I);u(E),k(I)};w(S);const v=setInterval(()=>{S=(S+1)%n.length,w(S)},l);return()=>clearInterval(v)},[a,n,l,c,o,t]),{finalDisplayedText:p,activeHighlightTarget:y,highlightTypewriter:s,highlightSlide:d,highlightSlideDuration:g,highlightSlideStagger:m,highlightSlideSequential:f}},Jm={xs:24,sm:32,md:48,lg:96,xl:110},Qm={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}}}},Zm={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:()=>({})},Rm=({text:e,typingSpeed:o=50,pauseTime:t=500,onComplete:n,showCursor:a=!0,cursorColor:l="currentColor",textStyle:c,textComponent:s,as:d,...g})=>{const m=s||i.Text,f=Array.isArray(e)?e:[e],[p,u]=h.useState(f.map(()=>"")),[y,k]=h.useState(!1),[x,C]=h.useState(0),[S,w]=h.useState(0);h.useEffect(()=>{u(f.map(()=>"")),k(!1),C(0),w(0)},[e]),h.useEffect(()=>{if(y){n&&n();return}const b=f[x];if(S>=b.length){if(x>=f.length-1){k(!0);return}const T=setTimeout(()=>{C(j=>j+1),w(0)},t);return()=>clearTimeout(T)}const I=setTimeout(()=>{u(T=>{const j=[...T];return j[x]=b.substring(0,S+1),j}),w(T=>T+1)},o);return()=>clearTimeout(I)},[f,x,S,y,n,t,o]);const v=b=>{if(!b||typeof b!="string")return b;const I=b.split("|");return I.length===1?b:I.map((T,j)=>r.jsxs(h.Fragment,{children:[T,j<I.length-1&&r.jsx("br",{})]},j))};return r.jsx(r.Fragment,{children:p.map((b,I)=>r.jsxs(h.Fragment,{children:[v(b),a&&I===x&&!y&&r.jsx(m,{as:"span",display:"inline-block",width:"0.1em",height:"1em",backgroundColor:l,animation:"blink 1s step-end infinite",verticalAlign:"text-bottom",marginLeft:"1px",...c})]},I))})},ep=({text:e,duration:o=500,direction:t="up",stagger:n=50,sequential:a=!1,textStyle:l,as:c,wordProps:s,textComponent:d,...g})=>{const[m,f]=h.useState(e),[p,u]=h.useState("entering"),[y,k]=h.useState(0),x=d||i.Text,C=h.useRef(null),S=h.useRef(null);h.useEffect(()=>{e===m&&p==="visible"||e!==m&&(p==="entering"||p==="visible"?(C.current=e,u("exiting")):p==="exiting"&&(C.current=e))},[e,m,p]);const{lines:w,totalWordCount:v}=h.useMemo(()=>{const V=m.split("|").map(L=>L.trim().split(/\s+/).filter(_=>_.length>0)),M=V.reduce((L,_)=>L+_.length,0);return{lines:V,totalWordCount:M}},[m]),b=h.useMemo(()=>a?v*(o+n):(v-1)*n+o,[v,o,n,a]),I=h.useMemo(()=>a?v*(o+n):(v-1)*n+o,[v,o,n,a]);h.useEffect(()=>(S.current&&clearTimeout(S.current),p==="entering"?S.current=setTimeout(()=>{u("visible")},b+50):p==="exiting"&&(S.current=setTimeout(()=>{C.current!==null&&(f(C.current),C.current=null),k(P=>P+1),u("entering")},I+50)),()=>{S.current&&clearTimeout(S.current)}),[p,b,I]);const{style:T,...j}=s||{},E=t==="up",D=P=>a?P*(o+n):P*n,W=h.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"bottom",whiteSpace:"nowrap",...l}),[l]),A=h.useMemo(()=>({display:"inline-flex",flexDirection:"column",alignItems:"center"}),[]),H=h.useMemo(()=>({display:"block",whiteSpace:"nowrap"}),[]);let z=0;return r.jsx(i.Element,{as:"span",style:W,...g,children:r.jsx("span",{style:A,children:w.map((P,V)=>r.jsx("span",{style:H,children:P.map((M,L)=>{const _=z++,O=D(_),N=L===P.length-1;let U;const X=`${o}ms`,oe=`${O}ms`;p==="entering"?U=E?i.Animation.slideInUp({duration:X,delay:oe,timingFunction:"ease-out",fillMode:"both"}):i.Animation.slideInDown({duration:X,delay:oe,timingFunction:"ease-out",fillMode:"both"}):p==="exiting"&&(U=E?{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-100%)",opacity:0},duration:X,delay:oe,timingFunction:"ease-in",fillMode:"both"}:{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(100%)",opacity:0},duration:X,delay:oe,timingFunction:"ease-in",fillMode:"both"});const B={...T,display:"inline-block",marginRight:N?0:"0.25em",transform:p==="visible"?"translateY(0)":void 0,opacity:p==="visible"?1:void 0};return r.jsx(x,{as:"span",animate:U,...j,...B,children:M},`${y}-${V}-${L}`)})},`line-${V}`))})})};function ii(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const dn=e=>{if(!e||typeof e!="string")return e;const o=e.split("|");return o.length===1?e:o.map((t,n)=>r.jsxs(h.Fragment,{children:[t,n<o.length-1&&r.jsx("br",{})]},n))},op=({children:e,highlightText:o,highlightStyle:t="solid",highlightColor:n="theme-primary",highlightSecondaryColor:a,size:l="lg",views:c,highlightAnimate:s,animate:d,animationLoop:g=1,highlightAnimationLoop:m=1,highlightTypewriter:f=!1,highlightTypewriterDuration:p=3e3,highlightSlide:u=!1,highlightSlideDuration:y=500,highlightSlideStagger:k=50,highlightSlideSequential:x=!0,centered:C=!1,level:S=1,themeMode:w,responsive:v,alternateHighlightText:b,alternateAnimation:I,alternateDuration:T,_isInView:j,...E})=>{const{ref:D,inView:W}=i.useInView(),{finalDisplayedText:A,activeHighlightTarget:H,highlightTypewriter:z,highlightSlide:P,highlightSlideDuration:V,highlightSlideStagger:M,highlightSlideSequential:L}=Xm({children:e,highlightText:o,_isInView:W,highlightTypewriter:f,highlightSlide:u,highlightSlideDuration:y,highlightSlideStagger:k,highlightSlideSequential:x,alternateHighlightText:b,alternateAnimation:I,alternateDuration:T,...E}),_=Jm[l],O={fontFamily:"Mulish, Inter, Geist, system-ui, sans-serif",fontWeight:l==="xl"?700:600,letterSpacing:l==="xl"?"-1.5px":"-0.01em"},N=Zm[t](n,a),U=(J,Y)=>J&&(Array.isArray(J)?J.map(Z=>({...Z,iterationCount:Y.toString()})):{...J,iterationCount:Y.toString()}),X=U(d,g),oe=U(s,m),B=typeof A=="string"?A:typeof e=="string"?e:"",$={ref:D,animate:W?X:void 0,as:`h${S}`,fontSize:_,...C?{textAlign:"center"}:{},...v?Qm[l]:{},...O},q=J=>!W&&(z||P)?r.jsx("span",{style:{opacity:0},children:J}):z?r.jsx(Rm,{text:J,typingSpeed:Math.max(30,p/(J.length*10)),cursorColor:"currentColor",...N}):P?r.jsx(ep,{text:J,duration:V,stagger:M,sequential:L,direction:"up",wordProps:N}):dn(J);if(typeof B=="string"&&H){const J=Array.isArray(H)?new RegExp(`(${H.map(ne=>ii(String(ne))).join("|")})`,"gi"):new RegExp(`(${ii(String(H))})`,"gi"),Y=[];let Z=0,ee;for(;ee=J.exec(B);)ee.index>Z&&Y.push(B.substring(Z,ee.index)),Y.push({highlight:!0,text:ee[0]}),Z=ee.index+ee[0].length;return Z<B.length&&Y.push(B.substring(Z)),r.jsx(i.Element,{...$,...c==null?void 0:c.container,...E,children:Y.map((ne,K)=>typeof ne=="string"?r.jsx(i.Text,{as:"span",display:"inline",...c==null?void 0:c.text,children:dn(ne)},`text-${K}`):r.jsx(i.Text,{as:"span",display:"inline",animate:W?oe:void 0,...P?{}:N,...c==null?void 0:c.highlight,children:q(ne.text)},`highlight-${K}`))})}return t&&!H?r.jsx(i.Element,{...$,...E,...c==null?void 0:c.container,children:r.jsx(i.Text,{as:"span",display:"inline",animate:W?oe:void 0,...P?{}:N,...c==null?void 0:c.highlight,children:q(B)})}):r.jsx(i.Text,{...$,...E,...c==null?void 0:c.container,...c==null?void 0:c.text,children:dn(B)})},ci=e=>r.jsx(op,{...e}),si=({items:e,shape:o,variant:t,onToggleChange:n})=>{const{activeToggles:a,setActiveToggles:l}=Vl();return r.jsx(Al,{items:e,shape:o,variant:t,activeToggles:a,setActiveToggles:l,onToggleChange:n})},rp=({items:e,onChange:o})=>{const[t,n]=h.useState(e),[a,l]=h.useState(null),[c,s]=h.useState(null),d=h.useRef({x:0,y:0}),g=h.useRef([]),m=h.useCallback((u,y)=>{u.preventDefault(),document.body.style.cursor="grabbing";const k="touches"in u?u.touches[0].clientX:u.clientX,x="touches"in u?u.touches[0].clientY:u.clientY;d.current={x:k,y:x},s(y),l(t[y])},[t]),f=h.useCallback(u=>{if(c===null)return;const y="touches"in u?u.touches[0].clientX:u.clientX,k="touches"in u?u.touches[0].clientY:u.clientY,x=g.current[c];if(!x)return;const C=y-d.current.x,S=k-d.current.y;x.style.transform=`translate(${C}px, ${S}px)`,x.style.zIndex="1000";const w=g.current.findIndex((v,b)=>{if(!v||b===c)return!1;const I=v.getBoundingClientRect();return k>=I.top&&k<=I.bottom});if(w!==-1&&w!==c){const v=[...t],[b]=v.splice(c,1);v.splice(w,0,b),n(v),s(w),o==null||o(v),d.current={x:y,y:k}}},[c,t,o]),p=h.useCallback(()=>{document.body.style.cursor="",g.current.forEach(u=>{u&&(u.style.transform="",u.style.zIndex="")}),s(null),l(null)},[c]);return h.useEffect(()=>{if(!(typeof window>"u"))return c!==null&&(window.addEventListener("mousemove",f),window.addEventListener("touchmove",f),window.addEventListener("mouseup",p),window.addEventListener("touchend",p)),()=>{window.removeEventListener("mousemove",f),window.removeEventListener("touchmove",f),window.removeEventListener("mouseup",p),window.removeEventListener("touchend",p)}},[c,f,p]),{items:t,draggedItem:a,draggedIndex:c,itemRefs:g,handleDragStart:m}},tp=({items:e,renderItem:o,containerProps:t,itemProps:n,draggedIndex:a,itemRefs:l,handleDragStart:c,views:s,themeMode:d})=>r.jsx(i.View,{overflow:"hidden",position:"relative",...t,...s==null?void 0:s.container,children:e.map((g,m)=>r.jsx(i.View,{ref:f=>{l.current[m]=f},onMouseDown:f=>c(f,m),onTouchStart:f=>c(f,m),position:"relative",cursor:"grab",transition:"transform 0.2s",...n,...s==null?void 0:s.item,children:o?o(g,m):g},m))}),di=e=>{const{items:o,draggedIndex:t,itemRefs:n,handleDragStart:a}=rp(e);return r.jsx(tp,{...e,items:o,draggedIndex:t,itemRefs:n,handleDragStart:a})},np=di,ap=({onFileSelect:e,onMultipleFileSelect:o,validateFile:t,accept:n,multiple:a,disabled:l,previewUrl:c})=>{const[s,d]=h.useState(!1),[g,m]=h.useState(null),f=h.useRef(null),p=c!==void 0?c:g;h.useEffect(()=>()=>{g&&URL.revokeObjectURL(g)},[g]);const u=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&d(!0)},[l]),y=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&d(!1)},[l]),k=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),!l&&d(!0)},[l]),x=h.useCallback(v=>{if(!v||v.length===0)return;const b=Array.from(v);if(!a&&b.length>0){const I=b[0];if(I.type.startsWith("image/")){const T=URL.createObjectURL(I);m(j=>(j&&URL.revokeObjectURL(j),T))}else m(null)}a?o&&o(b):b.length>0&&e&&e(b[0])},[a,o,e]),C=h.useCallback(v=>{v.preventDefault(),v.stopPropagation(),d(!1),!l&&v.dataTransfer.files&&v.dataTransfer.files.length>0&&(x(v.dataTransfer.files),v.dataTransfer.clearData())},[l,x]),S=h.useCallback(()=>{var v;l||(v=f.current)==null||v.click()},[l]),w=h.useCallback(v=>{x(v.target.files),v.target.value&&(v.target.value="")},[x]);return{isDragActive:s,handleDragEnter:u,handleDragLeave:y,handleDragOver:k,handleDrop:C,handleClick:S,handleFileChange:w,inputRef:f,preview:p}},lp={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)"}},gi=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:c={}})=>{if(e.length===0)return null;const s=h.useCallback(g=>g<1024?`${g} B`:g<1024*1024?`${(g/1024).toFixed(1)} KB`:`${(g/(1024*1024)).toFixed(1)} MB`,[]),d=h.useCallback(g=>g.type.startsWith("image/")?{backgroundColor:"#DBEAFE",color:"#2563EB"}:g.type.startsWith("video/")?{backgroundColor:"#EDE9FE",color:"#7C3AED"}:g.type.startsWith("audio/")?{backgroundColor:"#DCFCE7",color:"#16A34A"}:{backgroundColor:"#E2E8F0",color:"#475569"},[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...c==null?void 0:c.container,children:e.map((g,m)=>{const f=typeof URL<"u"&&typeof URL.createObjectURL=="function"&&typeof Blob<"u"&&g instanceof Blob,p=(g==null?void 0:g.path)||(g==null?void 0:g.url)||(l&&f?URL.createObjectURL(g):""),u=g.type.startsWith("image/"),y=g.type.startsWith("video/"),k=g.type.startsWith("audio/"),x=d(g);return l?r.jsx(i.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:l&&r.jsxs(Me,{children:[r.jsxs(Me.Trigger,{children:[u&&r.jsx(i.Image,{src:p,alt:g.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(i.View,{as:"video",src:p,alt:g.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),k&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Fo,{widthHeight:24,color:"color-black"})}),!u&&!y&&!k&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(go,{widthHeight:24,color:"color-black"})}),t&&r.jsx(i.Button,{...lp,onClick:C=>{C.stopPropagation(),t(m)},"aria-label":`Remove ${g.name}`,children:"×"})]}),r.jsxs(Me.Content,{children:[u&&r.jsx(i.Image,{src:p,alt:g.name,maxWidth:"100%"}),y&&r.jsx(i.View,{as:"video",src:p,controls:!0,maxWidth:"100%"}),k&&r.jsx(i.View,{as:"audio",src:p,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",...c==null?void 0:c.name,children:[g.name," (",s(g.size),")"]})]})]})},m):r.jsxs(i.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:[r.jsx(i.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:x.backgroundColor,color:x.color,children:k?r.jsx(Fo,{widthHeight:12,color:"currentColor"}):r.jsx(go,{widthHeight:12,color:"currentColor"})}),r.jsxs(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...c==null?void 0:c.name,children:[g.name," · ",s(g.size)]}),t&&r.jsx(i.View,{as:"button",type:"button",onClick:()=>t(m),"aria-label":`Remove ${g.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:"×"})]},m)})})},ip=({children:e,text:o="Drop files here or click to upload",textProps:t,containerProps:n,disabled:a,accept:l,multiple:c,isDragActive:s,handleDragEnter:d,handleDragLeave:g,handleDragOver:m,handleDrop:f,handleClick:p,handleFileChange:u,inputRef:y,preview:k,imageProps:x,selectedFiles:C,onRemove:S})=>r.jsxs(i.Center,{width:"100%",minHeight:"200px",height:C&&C.length>0?"auto":"200px",borderWidth:2,borderStyle:"dashed",borderColor:s?"theme-primary":"color-gray-300",borderRadius:12,backgroundColor:s?"#EFF6FF":"color-gray-50",flexDirection:"column",cursor:a?"not-allowed":"pointer",opacity:a?.6:1,onClick:p,onDragEnter:d,onDragLeave:g,onDragOver:m,onDrop:f,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease",overflow:"hidden",position:"relative",padding:16,...n,children:[r.jsx("input",{type:"file",ref:y,onChange:u,accept:l,multiple:c,style:{display:"none"},disabled:a}),k&&!c?r.jsxs(i.View,{width:"100%",height:"200px",position:"relative",children:[r.jsx(i.Image,{src:k,alt:"Preview",width:"100%",height:"100%",objectFit:"contain",...x}),r.jsx(i.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:r.jsx(i.Text,{color:"white",fontWeight:600,children:"Click to replace"})})]}):r.jsxs(i.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[e||r.jsxs(i.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[r.jsx(wt,{widthHeight:40,color:s?"theme-primary":"color-gray-500"}),r.jsx(i.Text,{marginTop:16,color:s?"theme-primary":"color-gray-600",fontWeight:500,textAlign:"center",...t,children:o})]}),c&&C&&C.length>0&&r.jsx(i.View,{marginTop:16,width:"100%",children:r.jsx(gi,{files:C,onRemove:S||(()=>{}),showPreviews:!0,layout:"inline",maxHeight:"160px"})})]})]}),cp=e=>{const o=ap(e);return r.jsx(ip,{...e,...o})},sp=(e=!1)=>{const[o,t]=h.useState(e),[n,a]=h.useState(null);return h.useEffect(()=>{const l=d=>{!d.composedPath().some(f=>(f==null?void 0:f.id)==="dropdown-menu"||(f==null?void 0:f.id)==="dropdown-trigger")&&o&&(t(!1),a(null))},c=()=>{o&&(t(!1),a(null))},s=d=>{d.key==="Escape"&&o&&(t(!1),a(null))};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",l),window.addEventListener("resize",c),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",l),window.removeEventListener("resize",c),document.removeEventListener("keydown",s)}},[o]),{isOpen:o,setIsOpen:t,activeSubmenuId:n,setActiveSubmenuId:a}},dp={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},gp={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"}},hp={hover:{backgroundColor:"color-gray-100"}},hi=h.createContext({isOpen:!1,setIsOpen:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null}}),fp=({children:e,value:o})=>r.jsx(hi.Provider,{value:o,children:e}),gn=()=>{const e=h.useContext(hi);if(!e)throw new Error("useDropdownMenuContext must be used within a DropdownMenuProvider");return e},fi=({children:e,views:o,...t})=>{const{isOpen:n,setIsOpen:a,triggerRef:l}=gn(),c=s=>{s.stopPropagation(),a(!n)};return r.jsx(i.View,{ref:l,id:"dropdown-trigger",onClick:c,cursor:"pointer",position:"relative",display:"inline-block",...o==null?void 0:o.container,...t,children:e})},hn=({items:e,side:o="bottom",align:t="start",views:n,...a})=>{const{isOpen:l,variant:c,triggerRef:s}=gn(),d=h.useRef(null),{ref:g,relation:m}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[f,p]=h.useState({x:0,y:0,placement:o});if(h.useEffect(()=>{s.current&&g&&(g.current=s.current)},[s,g,l]),h.useEffect(()=>{if(l&&d.current&&s.current){const k=s.current.getBoundingClientRect();let x=o;m&&(o==="bottom"&&m.space.vertical==="top"?x="top":o==="top"&&m.space.vertical==="bottom"?x="bottom":o==="right"&&m.space.horizontal==="left"?x="left":o==="left"&&m.space.horizontal==="right"&&(x="right"));let C=0,S=0;switch(x){case"bottom":C=t==="start"?k.left:t==="end"?k.right-180:k.left+k.width/2-90,S=k.bottom+8;break;case"top":C=t==="start"?k.left:t==="end"?k.right-180:k.left+k.width/2-90,S=k.top-8;break;case"right":C=k.right+8,S=t==="start"?k.top:t==="end"?k.bottom-100:k.top+k.height/2-50;break;case"left":C=k.left-8,S=t==="start"?k.top:t==="end"?k.bottom-100:k.top+k.height/2-50;break}p({x:C,y:S,placement:x})}},[l,o,t,s,m]),!l)return null;const y=(()=>{const k={position:"fixed",left:f.x,top:f.y,zIndex:1e3};switch(f.placement){case"top":return{...k,transform:"translateY(-100%)"};case"left":return{...k,transform:"translateX(-100%)"};case"bottom":case"right":default:return k}})();return r.jsx(i.View,{ref:d,id:"dropdown-menu",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:y,...gp[c],...n==null?void 0:n.menu,...a,children:e.map((k,x)=>k.divider?r.jsx(pi,{views:n},`divider-${x}`):r.jsx(mi,{item:k,views:n},k.id))})},mi=({item:e,views:o,...t})=>{const{activeSubmenuId:n,setActiveSubmenuId:a,size:l}=gn(),[c,s]=h.useState(!1),d=e.items&&e.items.length>0,g=n===e.id,m=h.useRef(null),f=()=>{s(!0),d&&a(e.id)},p=()=>{s(!1)},u=y=>{y.stopPropagation(),!e.disabled&&!d&&e.onClick&&e.onClick()};return r.jsxs(i.View,{ref:m,display:"flex",alignItems:"center",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.5:1,position:"relative",...dp[l],_hover:e.disabled?{}:hp.hover,backgroundColor:c&&!e.disabled?"color-gray-100":"transparent",onMouseEnter:f,onMouseLeave:p,onClick:u,...o==null?void 0:o.item,...t,children:[e.icon&&r.jsx(i.View,{marginRight:8,...o==null?void 0:o.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),d&&r.jsx(i.View,{marginLeft:8,...o==null?void 0:o.submenuIndicator,children:r.jsx(he,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),g&&d&&r.jsx(hn,{items:e.items||[],side:"right",align:"start",views:o})]})},pi=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.divider,...o}),mp=({trigger:e,items:o,side:t="bottom",align:n="start",views:a,themeMode:l,...c})=>r.jsxs(i.View,{position:"relative",display:"inline-block",...a==null?void 0:a.container,...c,children:[r.jsx(fi,{views:a,children:e}),r.jsx(hn,{items:o,side:t,align:n,views:a})]}),cr=({trigger:e,items:o,size:t="md",variant:n="default",side:a="bottom",align:l="start",defaultOpen:c=!1,views:s,...d})=>{const{isOpen:g,setIsOpen:m,activeSubmenuId:f,setActiveSubmenuId:p}=sp(c),u=h.useRef(null);return r.jsx(fp,{value:{isOpen:g,setIsOpen:m,activeSubmenuId:f,setActiveSubmenuId:p,size:t,variant:n,triggerRef:u},children:r.jsx(mp,{trigger:e,items:o,side:a,align:l,views:s,...d})})};cr.Trigger=fi,cr.Content=hn,cr.Item=mi,cr.Divider=pi;const pp=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,isOpen:l,onOpen:c,onClose:s,closeOnSelect:d=!0,maxRecentColors:g=8,showRecentColors:m=!0,colorFormat:f}=e,[p,u]=h.useState(l??!1),[y,k]=h.useState(o??t),[x,C]=h.useState(""),[S,w]=h.useState([]),v=h.useRef(null),b=h.useRef(null);h.useEffect(()=>{o!==void 0&&k(o)},[o]),h.useEffect(()=>{l!==void 0&&u(l)},[l]),h.useEffect(()=>{if(m&&typeof localStorage<"u"){const A=localStorage.getItem("colorPicker-recentColors");if(A)try{w(JSON.parse(A))}catch{}}},[m]),h.useEffect(()=>{if(typeof document>"u"||typeof document.addEventListener!="function")return;const A=H=>{p&&v.current&&b.current&&!v.current.contains(H.target)&&!b.current.contains(H.target)&&W()};return document.addEventListener("mousedown",A),()=>document.removeEventListener("mousedown",A)},[p]);const I=h.useCallback(A=>{m&&w(H=>{const z=H.filter(V=>V!==A),P=[A,...z].slice(0,g);return typeof localStorage<"u"&&localStorage.setItem("colorPicker-recentColors",JSON.stringify(P)),P})},[m,g]),T=h.useCallback(()=>{const A=!p;u(A),A?c==null||c():s==null||s()},[p,c,s]),j=h.useCallback(A=>{k(A),I(A);const H=$r(A,f);n==null||n(H),a==null||a(H),d&&(u(!1),s==null||s())},[n,a,d,s,I,f]),E=h.useCallback(A=>{C(A)},[]),D=h.useCallback(()=>{x&&(j(x),C(""))},[x,j]),W=h.useCallback(()=>{u(!1),s==null||s()},[s]);return{isOpen:p,selectedColor:y,recentColors:S,customColor:x,handleToggle:T,handleColorSelect:j,handleCustomColorChange:E,handleCustomColorSubmit:D,handleClose:W,triggerRef:v,dropdownRef:b}},Lo={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"}},up={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"}},yp={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},bp={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"}},xp=[{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"}],kp=typeof navigator<"u"&&navigator.product!=="ReactNative"&&typeof document<"u"&&typeof document.createElement=="function",Cp=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:l={},size:c="md",shape:s="default",variant:d="default",error:g=!1,isDisabled:m=!1,isReadOnly:f=!1,predefinedColors:p=xp,showCustomInput:u=!0,showRecentColors:y=!0,isOpen:k,selectedColor:x,recentColors:C,customColor:S,handleToggle:w,handleColorSelect:v,handleCustomColorChange:b,handleCustomColorSubmit:I,handleClose:T,triggerRef:j,dropdownRef:E,onChange:D,onChangeComplete:W,onOpen:A,onClose:H,colorFormat:z,maxRecentColors:P,closeOnSelect:V,defaultValue:M,value:L,..._})=>{const O={...Lo.container,...l==null?void 0:l.container},N={...Lo.trigger,...up[c],...yp[s],...bp[d],...g&&{borderColor:"color-red-500"},...m&&{opacity:.6,cursor:"not-allowed"},...!m&&!f&&{_hover:{borderColor:"color-gray-400"}},...l==null?void 0:l.trigger},U={...Lo.dropdown,...l==null?void 0:l.dropdown},X={...Lo.colorGrid,...l==null?void 0:l.colorGrid},oe={...Lo.recentColors,...l==null?void 0:l.recentColors},B=x||"color-gray-200";return r.jsxs(i.View,{id:e,...O,..._,children:[t&&r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",fontWeight:"500",color:"color-gray-600",marginBottom:"6px",...l==null?void 0:l.label,children:t}),r.jsxs(i.View,{ref:j,onClick:m||f?void 0:w,...N,children:[r.jsxs(i.Horizontal,{alignItems:"center",gap:8,children:[r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:B,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"}),r.jsx(i.Text,{color:x?"color-gray-900":"color-gray-500",fontSize:"inherit",children:x||n})]}),!f&&!m&&r.jsx(he,{widthHeight:16,color:"color-gray-500",orientation:k?"up":"down"})]}),k&&r.jsxs(i.View,{ref:E,...U,children:[r.jsx(i.View,{...X,children:p.map(($,q)=>r.jsx(i.View,{width:"36px",height:"36px",borderRadius:"8px",backgroundColor:$.value,borderWidth:"1px",borderStyle:"solid",borderColor:x===$.value?"theme-primary":"transparent",cursor:"pointer",onClick:()=>v($.value),title:$.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"},...l==null?void 0:l.colorSwatch},q))}),u&&r.jsxs(i.View,{...Lo.customInput,...l==null?void 0:l.customInput,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",marginBottom:"10px",children:[kp&&r.jsx("input",{type:"color",value:S||"#1D4ED8",onChange:$=>{const q=$.target.value;b(q),v(q)},style:{width:"36px",height:"36px",border:"1px solid #E5E7EB",borderRadius:"8px",cursor:"pointer",backgroundColor:"transparent"},title:"Pick a color"}),r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:"HEX"})]}),r.jsx(je,{placeholder:"#1D4ED8",value:S,onChange:$=>{var q;return b(typeof $=="string"?$:((q=$==null?void 0:$.target)==null?void 0:q.value)??"")},onKeyPress:$=>{$.key==="Enter"&&I()},size:"sm",right:S&&r.jsx(i.View,{width:"18px",height:"18px",borderRadius:"6px",backgroundColor:S,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",onClick:I})})]}),y&&C.length>0&&r.jsxs(i.View,{...oe,children:[r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",fontWeight:"500",color:"color-gray-500",marginBottom:"8px",children:"Recent Colors"}),r.jsx(i.Horizontal,{gap:8,flexWrap:"wrap",children:C.map(($,q)=>r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:$,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>v($),title:$,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"}},q))})]})]}),a&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",color:g?"color-red-500":"color-gray-500",marginTop:"4px",...l==null?void 0:l.helperText,children:a})]})},ui=e=>{const o=pp(e);return r.jsx(Cp,{...o,...e})},wp=e=>{const o=Ll(e);return r.jsx(_l,{...o,...e})},Sp=e=>{const o=Dl(e);return r.jsx($l,{...o,...e})},yi={"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"},Ur={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"},vp={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"}]},Tp=(e,o,t,n,a)=>{const l=o.map(c=>`${c.color} ${c.position||""}`).join(", ");switch(e){case"linear":return`linear-gradient(${t&&yi[t]?yi[t]:t||"to right"}, ${l})`;case"radial":const s=a&&Ur[a]?Ur[a]:a||"center";return`radial-gradient(${n||"circle"} at ${s}, ${l})`;case"conic":return`conic-gradient(from 0deg at ${a&&Ur[a]?Ur[a]:a||"center"}, ${l})`;default:return`linear-gradient(to right, ${l})`}},Ip={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)"}}}},bi={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"}},Fp=({type:e="linear",direction:o="to-right",shape:t="circle",position:n="center",from:a,to:l,colors:c,animate:s=!1,animationDuration:d=3,children:g,views:m,themeMode:f,...p})=>{const u=h.useMemo(()=>c&&c.length>0?c:a&&l?[{color:a,position:"0%"},{color:l,position:"100%"}]:vp[e],[c,a,l,e]),y=h.useMemo(()=>{const x=u.map(C=>({...C,color:C.color}));return Tp(e,x,o,t,n)},[e,u,o,t,n]),k=h.useMemo(()=>{if(!s)return{};const x=Ip[e];return{...x,transition:x.transition.replace("3s",`${d}s`),animationDuration:`${d}s`,animationIterationCount:"infinite",animationTimingFunction:e==="conic"?"linear":"ease-in-out"}},[s,d,e]);return r.jsx(i.View,{background:y,...bi.container,...k,...m==null?void 0:m.container,...p,children:g&&r.jsx(i.View,{...bi.content,...m==null?void 0:m.content,children:g})})},xi=e=>r.jsx(Fp,{...e}),zp=(e=null,o=null)=>{const[t,n]=h.useState(e),[a,l]=h.useState(o),c=d=>a===d,s=d=>{l(g=>g===d?null:d)};return h.useEffect(()=>{const d=m=>{!m.composedPath().some(u=>(u==null?void 0:u.id)==="menubar-content"||(u==null?void 0:u.id)==="menubar-trigger")&&a!==null&&l(null)},g=m=>{m.key==="Escape"&&a!==null&&l(null)};if(!(typeof document>"u"))return document.addEventListener("mousedown",d),document.addEventListener("keydown",g),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",g)}},[a]),{activeMenuId:t,setActiveMenuId:n,openMenuId:a,setOpenMenuId:l,isMenuOpen:c,toggleMenu:s}},ki={sm:{padding:"6px 10px",fontSize:"14px"},md:{padding:"8px 12px",fontSize:"16px"},lg:{padding:"10px 16px",fontSize:"18px"}},Mp={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"}},Wp={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},Gr={active:{backgroundColor:"color-gray-200",fontWeight:"bold"},hover:{backgroundColor:"color-gray-100"},disabled:{opacity:.5,cursor:"not-allowed"}},Ci=h.createContext({activeMenuId:null,setActiveMenuId:()=>{},openMenuId:null,setOpenMenuId:()=>{},isMenuOpen:()=>!1,toggleMenu:()=>{},orientation:"horizontal",size:"md",variant:"default",triggerRefs:{current:{}}}),Yr=()=>h.useContext(Ci),Hp=({value:e,children:o})=>r.jsx(Ci.Provider,{value:e,children:o}),wi=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",views:a,...l})=>{const c=o==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(c,{role:"menubar","aria-orientation":o,...Wp[o],...Mp[n],...a==null?void 0:a.container,...l,children:e})},Si=({children:e,id:o,disabled:t=!1,views:n})=>{const{orientation:a}=Yr(),l=a==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(l,{role:"none",position:"relative",opacity:t?.5:1,pointerEvents:t?"none":"auto",...n==null?void 0:n.menu,children:h.Children.map(e,c=>h.isValidElement(c)?h.cloneElement(c,{...c.props,menuId:o}):c)})},vi=({children:e,menuId:o,disabled:t=!1,views:n})=>{const{activeMenuId:a,setActiveMenuId:l,toggleMenu:c,isMenuOpen:s,size:d,triggerRefs:g}=Yr(),m=h.useRef(null),f=a===o,p=s(o);h.useEffect(()=>(m.current&&o&&(g.current[o]=m.current),()=>{o&&delete g.current[o]}),[o,g]);const u=()=>{t||(l(o),c(o))};return r.jsx(i.View,{ref:m,id:"menubar-trigger",role:"menuitem","aria-haspopup":"true","aria-expanded":p,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",...ki[d],...f?Gr.active:{},...t?Gr.disabled:{},_hover:t?{}:Gr.hover,onClick:u,...n==null?void 0:n.trigger,children:e})},Ti=({children:e,menuId:o,views:t})=>{const{isMenuOpen:n,orientation:a,triggerRefs:l}=Yr(),c=h.useRef(null),[s,d]=h.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),g=n(o);if(h.useEffect(()=>{if(g&&c.current&&o&&l.current[o]){const f=c.current.getBoundingClientRect(),p=l.current[o].getBoundingClientRect(),u=Math.max(f.width||200,200),y=Math.max(f.height||150,150),k=window.innerWidth,x=window.innerHeight,C={top:p.top,right:k-p.right,bottom:x-p.bottom,left:p.left},S=a==="horizontal"?[{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8},{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top}]:[{placement:"right",space:C.right,fits:C.right>=u+8,x:p.right+8,y:p.top},{placement:"left",space:C.left,fits:C.left>=u+8,x:p.left-u-8,y:p.top},{placement:"bottom",space:C.bottom,fits:C.bottom>=y+8,x:p.left,y:p.bottom+8},{placement:"top",space:C.top,fits:C.top>=y+8,x:p.left,y:p.top-y-8}],w=S.find(T=>T.fits);if(w){d({x:w.x,y:w.y,placement:w.placement});return}const v=S.reduce((T,j)=>j.space>T.space?j:T);let b=v.x,I=v.y;b+u>k&&(b=k-u-8),b<8&&(b=8),I+y>x&&(I=x-y-8),I<8&&(I=8),d({x:b,y:I,placement:v.placement})}},[g,a,o,l]),!g)return null;const m={position:"fixed",left:s.x,top:s.y,zIndex:1e3};return r.jsx(i.View,{ref:c,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:m,...t==null?void 0:t.content,children:e})},Ii=({children:e,icon:o,disabled:t=!1,onClick:n,views:a})=>{const{size:l}=Yr(),c=()=>{t||!n||n()};return r.jsxs(i.View,{role:"menuitem",cursor:t?"not-allowed":"pointer",userSelect:"none",display:"flex",alignItems:"center",opacity:t?.5:1,...ki[l],_hover:t?{}:Gr.hover,onClick:c,...a==null?void 0:a.item,children:[o&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:o}),e]})},Fi=({views:e})=>r.jsx(i.View,{role:"separator",height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.separator}),jp=({items:e,orientation:o,size:t,variant:n,views:a,themeMode:l})=>r.jsx(wi,{orientation:o,size:t,variant:n,views:a,children:e.map(c=>r.jsxs(Si,{id:c.id,disabled:c.disabled,views:a,children:[r.jsxs(vi,{menuId:c.id,views:a,children:[c.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:c.icon}),c.label]}),c.items&&c.items.length>0&&r.jsx(Ti,{menuId:c.id,views:a,children:c.items.map((s,d)=>s.separator?r.jsx(Fi,{views:a},`separator-${d}`):r.jsx(Ii,{id:s.id,icon:s.icon,disabled:s.disabled,onClick:s.onClick,views:a,children:s.label},s.id))})]},c.id))}),xo=({items:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultActiveMenuId:a=null,defaultOpenMenuId:l=null,views:c,...s})=>{const{activeMenuId:d,setActiveMenuId:g,openMenuId:m,setOpenMenuId:f,isMenuOpen:p,toggleMenu:u}=zp(a,l),y=h.useRef({});return r.jsx(Hp,{value:{activeMenuId:d,setActiveMenuId:g,openMenuId:m,setOpenMenuId:f,isMenuOpen:p,toggleMenu:u,orientation:o,size:t,variant:n,triggerRefs:y},children:r.jsx(jp,{items:e,orientation:o,size:t,variant:n,views:c,...s})})};xo.Root=wi,xo.Menu=Si,xo.Trigger=vi,xo.Content=Ti,xo.Item=Ii,xo.Separator=Fi;const Pp=(e,o,t)=>{const[n,a]=h.useState([]);return h.useEffect(()=>{a((()=>{const c=[];if(o<=t)for(let s=1;s<=o;s++)c.push(s);else{c.push(1);let s=Math.max(2,e-Math.floor((t-2)/2)),d=Math.min(o-1,s+t-3);d>=o-1&&(d=o-1,s=Math.max(2,d-(t-3))),s>2&&c.push("...");for(let g=s;g<=d;g++)c.push(g);d<o-1&&c.push("..."),c.push(o)}return c})())},[e,o,t]),{visiblePageNumbers:n}},_o={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"}}}},sr={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"}}},dr={rounded:{borderRadius:8},square:{borderRadius:"0px"},circular:{borderRadius:"50%"}},Vp={backgroundColor:"theme-primary",color:"color-white",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"theme-primary",opacity:.9}},Kr={opacity:.5,cursor:"not-allowed",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"transparent"}},Ap=({currentPage:e,totalPages:o,onPageChange:t,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:l,showPageSizeSelector:c=!1,showPageInfo:s=!0,maxPageButtons:d=5,showFirstLastButtons:g=!1,size:m="md",variant:f="default",shape:p="rounded",visiblePageNumbers:u=[],views:y,...k})=>{const x=w=>{w<1||w>o||w===e||t(w)},C=w=>{l&&l(Number(w.target.value))},S=(w,v)=>{if(w==="...")return r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",..._o[m],...y==null?void 0:y.ellipsis,children:"..."},`ellipsis-${v}`);const b=w===e;return r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:b?"default":"pointer",..._o[m],...sr[f],...dr[p],...b?Vp:{},onClick:()=>x(w),"aria-label":`Page ${w}`,"aria-current":b?"page":void 0,...b?y==null?void 0:y.activePageButton:y==null?void 0:y.pageButton,children:w},`page-${w}`)};return r.jsxs(i.Horizontal,{alignItems:"center",gap:8,...y==null?void 0:y.container,...k,children:[g&&r.jsxs(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",..._o[m],...sr[f],...dr[p],...e===1?Kr:{},onClick:()=>x(1),"aria-label":"First page",disabled:e===1,...y==null?void 0:y.navigationButton,children:[r.jsx(he,{orientation:"left",widthHeight:16}),r.jsx(he,{orientation:"left",widthHeight:16,marginLeft:"-8px"})]}),r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",..._o[m],...sr[f],...dr[p],...e===1?Kr:{},onClick:()=>x(e-1),"aria-label":"Previous page",disabled:e===1,...y==null?void 0:y.navigationButton,children:r.jsx(he,{orientation:"left",widthHeight:16})}),u.map((w,v)=>S(w,v)),r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",..._o[m],...sr[f],...dr[p],...e===o?Kr:{},onClick:()=>x(e+1),"aria-label":"Next page",disabled:e===o,...y==null?void 0:y.navigationButton,children:r.jsx(he,{orientation:"right",widthHeight:16})}),g&&r.jsxs(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",..._o[m],...sr[f],...dr[p],...e===o?Kr:{},onClick:()=>x(o),"aria-label":"Last page",disabled:e===o,...y==null?void 0:y.navigationButton,children:[r.jsx(he,{orientation:"right",widthHeight:16}),r.jsx(he,{orientation:"right",widthHeight:16,marginLeft:"-8px"})]}),s&&r.jsxs(i.Text,{marginLeft:16,color:"color-gray-600",...y==null?void 0:y.pageInfo,children:["Page ",e," of ",o]}),c&&l&&r.jsx(i.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:C,...y==null?void 0:y.pageSizeSelector,children:a.map(w=>r.jsx("option",{value:w.value,children:w.label},w.value))})]})},zi=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:c=!1,showPageInfo:s=!0,maxPageButtons:d=5,showFirstLastButtons:g=!1,size:m="md",variant:f="default",shape:p="rounded",views:u,...y})=>{const{visiblePageNumbers:k}=Pp(e,o,d);return r.jsx(Ap,{currentPage:e,totalPages:o,onPageChange:t,pageSize:n,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:c,showPageInfo:s,maxPageButtons:d,showFirstLastButtons:g,size:m,variant:f,shape:p,visiblePageNumbers:k,views:u,...y})},Ep=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Dp=h.memo(({shape:e="linear",value:o=0,max:t=100,color:n="theme-primary",backgroundColor:a="color-gray-200",height:l,size:c,radius:s=4,strokeWidth:d=10,showLabel:g=!1,labelColor:m="color-black-primary",animated:f=!0,animationDuration:p="0.5s",views:u,themeMode:y,...k})=>{var D;const{getColor:x,themeMode:C}=i.useTheme(),S=y||C,v=Math.min(t,Math.max(0,o))/t*100,b=W=>Ep(W)?W:x(W,{themeMode:S}),I=h.useMemo(()=>b(a),[x,a,S]),T=h.useMemo(()=>b(n),[x,n,S]);if(e==="circle"){const W=c||(typeof l=="number"?l:100),A=(W-d)/2,H=2*Math.PI*A,z=H-v/100*H;return r.jsxs(i.View,{width:W,height:W,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...u==null?void 0:u.container,...k,children:[r.jsxs("svg",{width:W,height:W,viewBox:`0 0 ${W} ${W}`,style:{transform:"rotate(-90deg)"},children:[r.jsx("circle",{cx:W/2,cy:W/2,r:A,stroke:I,strokeWidth:d,fill:"transparent",...u==null?void 0:u.track}),r.jsx("circle",{cx:W/2,cy:W/2,r:A,stroke:T,strokeWidth:d,strokeDasharray:H,strokeDashoffset:z,strokeLinecap:"round",fill:"transparent",style:{transition:f?`stroke-dashoffset ${p} ease-in-out`:"none"},...u==null?void 0:u.indicator})]}),g&&r.jsx(i.View,{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",children:r.jsxs(i.Text,{color:m,fontSize:`${W*.2}px`,fontWeight:"bold",...u==null?void 0:u.text,children:[Math.round(v),"%"]})})]})}const j=l||8,E={backgroundColor:I,...((D=u==null?void 0:u.container)==null?void 0:D.style)||{},...k.style||{}};return r.jsxs(i.View,{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":t,width:"100%",height:j,borderRadius:s,overflow:"hidden",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...u==null?void 0:u.container,...k,style:E,children:[r.jsx("div",{style:{height:"100%",backgroundColor:T,borderRadius:typeof s=="number"?`${s}px`:s,position:"absolute",left:0,top:0,bottom:0,width:`${v}%`,transition:f?`width ${p} ease-in-out`:"none",...u==null?void 0:u.bar}}),g&&r.jsxs(i.Text,{color:m,fontSize:typeof j=="number"&&j>16?`${j*.6}px`:"10px",fontWeight:"bold",position:"relative",zIndex:1,...u==null?void 0:u.text,children:[Math.round(v),"%"]})]})}),Mi=e=>{const o=pe("progress",e);return r.jsx(Dp,{...o})},$p=(e=>({solid:"solid",dashed:"dashed",dotted:"dotted"}))(),Lp={thin:"1px",medium:"2px",thick:"4px"},gr={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"}},_p=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Bp=({orientation:e="horizontal",variant:o="solid",thickness:t="thin",color:n,spacing:a="0px",label:l,decorative:c=!1,views:s,themeMode:d,...g})=>{const{themeMode:m}=i.useTheme(),f=n||"color-gray-200",p=$p[o],u=Lp[t],y=c?{"aria-hidden":!0}:{role:"separator","aria-orientation":e},k=_p(f)?{style:{borderColor:f}}:{borderColor:f};return l&&e==="horizontal"?r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"center",width:"100%",padding:a,...y,...g,children:[r.jsx(i.View,{height:"0px",flexGrow:1,borderTop:`${u} ${p}`,...k,...gr.container,...s==null?void 0:s.container}),r.jsx(i.Text,{...gr.label,...s==null?void 0:s.label,children:l}),r.jsx(i.View,{height:"0px",flexGrow:1,borderTop:`${u} ${p}`,...k,...gr.container,...s==null?void 0:s.container})]}):e==="horizontal"?r.jsx(i.View,{height:"0px",width:"100%",borderTop:`${u} ${p}`,padding:a,...k,...gr.container,...y,...s==null?void 0:s.container,...g}):r.jsx(i.View,{width:"0px",height:"100%",borderLeft:`${u} ${p}`,padding:a,...k,...gr.container,...y,...s==null?void 0:s.container,...g})},Wi=e=>{const o=pe("separator",e);return r.jsx(Bp,{...o})},Xr=Wi,Op=Wi,Np={xs:12,sm:14,md:16,lg:18,xl:20},qp=({isSupported:e,isSharing:o,onShare:t,label:n,children:a,icon:l,size:c,isDisabled:s,isLoading:d,iconPosition:g,disableWhenUnsupported:m=!0,...f})=>{const p=c??"md",u=l??r.jsx(Gn,{widthHeight:Np[p],strokeWidth:1.5,filled:!1}),y=!!s||!e&&m,k=!!d||o;return r.jsx(de,{...f,size:p,icon:u,iconPosition:g??"left",isDisabled:y,isLoading:k,onClick:t,children:a??n??"Share"})},Hi=()=>typeof navigator>"u"?void 0:navigator,Up=(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},Gp=e=>{if(typeof e=="object"&&e!==null&&"name"in e)return String(e.name)},Yp=e=>{const{shareData:o,onClick:t,onUnsupported:n,onShareStart:a,onShareSuccess:l,onShareCancel:c,onShareError:s}=e,[d,g]=h.useState(!1),m=h.useMemo(()=>Up(Hi(),o),[o]),f=h.useCallback((...p)=>{t==null||t(...p);const u=Hi();if(!u||typeof u.share!="function"){n==null||n();return}if(!d){if(typeof u.canShare=="function")try{if(!u.canShare(o)){n==null||n();return}}catch(y){s==null||s(y);return}g(!0),a==null||a();try{u.share(o).then(()=>{l==null||l()}).catch(y=>{if(Gp(y)==="AbortError"){c==null||c();return}s==null||s(y)}).finally(()=>{g(!1)})}catch(y){g(!1),s==null||s(y)}}},[d,t,c,s,a,l,n,o]);return{isSupported:m,isSharing:d,handleShare:f}},ji=e=>{const{isSupported:o,isSharing:t,handleShare:n}=Yp(e),{shareData:a,onShareStart:l,onShareSuccess:c,onShareCancel:s,onShareError:d,onUnsupported:g,onClick:m,...f}=e;return r.jsx(qp,{...f,isSupported:o,isSharing:t,onShare:n})},Kp=({label:e,status:o="default",views:t,themeMode:n,...a})=>{const{themeMode:l}=i.useTheme(),c=la();return r.jsxs(i.Horizontal,{alignItems:"center",gap:8,role:"status",...t==null?void 0:t.container,...a,children:[r.jsx(i.View,{"data-role":"status-dot","aria-hidden":"true",width:"8px",height:"8px",borderRadius:"50%",...c[o].indicator,...t==null?void 0:t.indicator}),e&&r.jsx(i.Text,{"data-role":"status-label",fontSize:"14px",lineHeight:"20px",...c[o].label,...t==null?void 0:t.label,children:e})]})},Jr=e=>{const o=pe("status",e);return r.jsx(Kp,{...o})},Xp=(e=!0,o,t,n)=>{const{on:a}=i.useResponsive(),l=a("mobile"),[c,s]=h.useState(o!==void 0?o:e);return h.useEffect(()=>{o!==void 0&&s(o)},[o]),{isExpanded:c,toggleExpanded:()=>{const f=!c;s(f),t&&t(f)},expand:()=>{c||(s(!0),t&&t(!0))},collapse:()=>{c&&(s(!1),t&&t(!1))},isMobile:l}},Jp={sm:{expandedWidth:"240px",collapsedWidth:"64px"},md:{expandedWidth:"280px",collapsedWidth:"72px"},lg:{expandedWidth:"320px",collapsedWidth:"80px"},xl:{expandedWidth:"360px",collapsedWidth:"88px"}},Qp=(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"}}))(),Zp={left:{left:0,borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{right:0,borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"}},Rp={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)"}},eu={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)"},Pi=h.createContext({isExpanded:!0,toggleExpanded:()=>{},expand:()=>{},collapse:()=>{},position:"left",size:"md",variant:"default"}),Qr=()=>h.useContext(Pi),ou=({value:e,children:o})=>r.jsx(Pi.Provider,{value:e,children:o}),ru=({children:e,showToggleButton:o=!0,views:t,...n})=>{const{isExpanded:a,toggleExpanded:l,position:c}=Qr();return r.jsx(i.Horizontal,{width:"100%",padding:"16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:"space-between",...t==null?void 0:t.header,...n,children:a?r.jsxs(i.Horizontal,{width:"100%",alignItems:"center",justifyContent:"space-between",children:[e,o&&r.jsx(i.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:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(he,{orientation:c==="left"?"left":"right",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})]}):r.jsx(i.View,{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",children:o&&r.jsx(i.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:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(he,{orientation:c==="left"?"right":"left",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})})})},tu=({children:e,views:o,...t})=>{const{isExpanded:n}=Qr();return r.jsx(i.View,{flex:"1",width:"100%",overflowY:"auto",overflowX:"hidden",padding:n?"16px":"8px",...o==null?void 0:o.content,...t,children:e})},nu=({children:e,views:o,...t})=>{const{isExpanded:n}=Qr();return r.jsx(i.View,{width:"100%",padding:n?"16px":"8px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",...o==null?void 0:o.footer,...t,children:e})},au=({children:e,position:o="left",size:t="md",variant:n="default",fixed:a=!1,hasBackdrop:l=!0,expandedWidth:c,collapsedWidth:s,breakpoint:d,breakpointBehavior:g="overlay",elevation:m="none",transitionPreset:f="normal",ariaLabel:p="Sidebar navigation",showToggleButton:u,toggleExpanded:y,expand:k,isExpanded:x,isMobile:C,collapse:S,views:w,themeMode:v,...b})=>{const I=Jp[t],T=x?c||I.expandedWidth:s||I.collapsedWidth,j=!C||C&&g!=="hide",E=a||C&&g==="overlay"?"fixed":"relative",D=l&&C&&x&&g==="overlay";return r.jsxs(r.Fragment,{children:[D&&r.jsx(i.View,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"color-dark-50-360",zIndex:998,onClick:S,...w==null?void 0:w.backdrop}),j&&r.jsx(i.Vertical,{position:E,top:0,height:"100vh",width:T,zIndex:999,transition:eu[f],transform:C&&g==="overlay"&&!x?`translateX(${o==="left"?"-100%":"100%"})`:"translateX(0)",role:"navigation","aria-label":p,...Qp[n],...Zp[o],...Rp[m],...w==null?void 0:w.container,...b,children:h.Children.map(e,W=>W)})]})},hr=({children:e,position:o="left",size:t="md",variant:n="default",defaultExpanded:a=!0,expanded:l,onExpandedChange:c,fixed:s=!1,hasBackdrop:d=!0,showToggleButton:g=!0,expandedWidth:m,collapsedWidth:f,breakpoint:p=768,breakpointBehavior:u="overlay",views:y,...k})=>{const{isExpanded:x,toggleExpanded:C,expand:S,collapse:w,isMobile:v}=Xp(a,l,c);return r.jsx(ou,{value:{isExpanded:x,toggleExpanded:C,expand:S,collapse:w,position:o,size:t,variant:n,views:y},children:r.jsx(au,{position:o,size:t,variant:n,fixed:s,hasBackdrop:d,showToggleButton:g,expandedWidth:m,collapsedWidth:f,breakpoint:p,breakpointBehavior:u,isExpanded:x,isMobile:v,toggleExpanded:C,expand:S,collapse:w,views:y,...k,children:e})})};hr.Header=ru,hr.Content=tu,hr.Footer=nu,hr.useContext=Qr;const lu=()=>({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(t){console.warn("Failed to write to localStorage:",t)}}}),iu=(e,o,t,n=50,a=1/0,l=!1,c,s,d=10)=>{const[g,m]=h.useState(!1),[f,p]=h.useState([]),u=h.useRef(null),y=h.useRef(null),k=h.useRef(0),x=h.useRef([]),C=h.useRef(s||(typeof window<"u"?lu():null)),S=h.useCallback(()=>u.current?e==="horizontal"?u.current.offsetWidth:u.current.offsetHeight:0,[e]),w=h.useCallback(()=>{if(!c||!C.current)return null;const P=C.current.getItem(c);if(!P)return null;try{const V=JSON.parse(P);return Array.isArray(V.sizes)?V.sizes:null}catch(V){return console.warn("Failed to parse saved panel sizes:",V),null}},[c]),v=h.useCallback(()=>{if(!c||!C.current||f.length===0)return;const P=f.map(V=>({id:V.id,size:V.size,collapsed:V.collapsed||!1}));C.current.setItem(c,JSON.stringify({sizes:P}))},[c,f]),b=h.useCallback((P,V,M,L,_)=>{p(O=>O.some(N=>N.id===P)?O:[...O,{id:P,size:V,minSize:M??n,maxSize:L??a,collapsible:_??l,collapsed:!1}])},[n,a,l]),I=h.useCallback(P=>{p(V=>V.filter(M=>M.id!==P))},[]),T=h.useCallback(P=>{const V=f.find(M=>M.id===P);return V?V.size:0},[f]),j=h.useCallback((P,V)=>{p(M=>M.map(L=>L.id===P?{...L,size:V}:L))},[]),E=h.useCallback(P=>{const V=f.find(M=>M.id===P);return V?!!V.collapsed:!1},[f]),D=h.useCallback(P=>{p(V=>{const M=V.findIndex(N=>N.id===P);if(M===-1)return V;const L=V[M];if(!L.collapsible)return V;const _={...L,collapsed:!L.collapsed},O=[...V];return O[M]=_,O})},[]),W=h.useCallback((P,V)=>{y.current=P,k.current=V,x.current=f.map(M=>M.size),m(!0)},[f]),A=h.useCallback(P=>{if(!g||!y.current)return;const V=y.current,M=P-k.current;let L=-1;const _=V.match(/\d+$/);if(_&&(L=parseInt(_[0],10)-1),L===-1&&f.length>=2&&(L=0),L<0||L>=f.length-1)return;const O=f[L],N=f[L+1];if(O.collapsed||N.collapsed)return;let U=x.current[L]+M,X=x.current[L+1]-M;U=Math.max(O.minSize??n,Math.min(O.maxSize??a,U)),X=Math.max(N.minSize??n,Math.min(N.maxSize??a,X)),p(oe=>oe.map((B,$)=>$===L?{...B,size:U}:$===L+1?{...B,size:X}:B))},[g,f,e,n,a]),H=h.useCallback(()=>{g&&t&&t(f.map(P=>P.size)),y.current=null,m(!1),c&&v()},[g,f,t,c,v]),z=h.useCallback(P=>{if(!g||!y.current)return;const V=y.current;let M=-1;const L=V.match(/\d+$/);if(L&&(M=parseInt(L[0],10)-1),M===-1&&f.length>=2&&(M=0),M<0||M>=f.length-1)return;let _=0;e==="horizontal"?(P.key==="ArrowLeft"&&(_=-d),P.key==="ArrowRight"&&(_=d),P.key==="Home"&&(_=-100),P.key==="End"&&(_=100)):(P.key==="ArrowUp"&&(_=-d),P.key==="ArrowDown"&&(_=d),P.key==="Home"&&(_=-100),P.key==="End"&&(_=100)),_!==0&&(P.preventDefault(),A(k.current+_)),P.key==="Escape"&&(p(O=>O.map((N,U)=>({...N,size:x.current[U]}))),H())},[g,f,e,A,H,d]);return h.useEffect(()=>{if(typeof document>"u")return;const P=L=>{if(!g)return;const _=e==="horizontal"?L.clientX:L.clientY;A(_)},V=L=>{if(!g||L.touches.length===0)return;const _=L.touches[0],O=e==="horizontal"?_.clientX:_.clientY;A(O)},M=()=>{g&&H()};return g&&(document.addEventListener("mousemove",P),document.addEventListener("touchmove",V),document.addEventListener("mouseup",M),document.addEventListener("touchend",M),document.addEventListener("keydown",z),document.body.style.cursor=e==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",P),document.removeEventListener("touchmove",V),document.removeEventListener("mouseup",M),document.removeEventListener("touchend",M),document.removeEventListener("keydown",z),document.body.style.cursor="",document.body.style.userSelect=""}},[g,e,A,H,z]),h.useEffect(()=>{if(f.length!==0){if(c){const P=w();if(P){p(V=>V.map(M=>{const L=P.find(_=>_.id===M.id);return L?{...M,size:L.size,collapsed:L.collapsed||!1}:M}));return}}if(!o){const V=S()/f.length;p(M=>M.map(L=>({...L,size:V})))}}},[f.length,o,S,c,w]),h.useEffect(()=>{if(!o||o.length===0||f.length===0)return;const P=S(),V=o.map(M=>typeof M=="string"&&M.endsWith("%")?parseFloat(M)/100*P:typeof M=="number"?M:parseFloat(M));p(M=>M.map((L,_)=>({...L,size:_<V.length?V[_]:L.size})))},[o,f.length,S]),h.useEffect(()=>{f.length>0&&c&&!g&&v()},[f,c,g,v]),{isResizing:g,setIsResizing:m,containerRef:u,panels:f,registerPanel:b,unregisterPanel:I,getPanelSize:T,setPanelSize:j,isPanelCollapsed:E,togglePanelCollapse:D,startResize:W,onResize:A,endResize:H}},cu={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},su=(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],du=(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"}}}))(),Zr={horizontal:{width:"2px",height:"20px",backgroundColor:"color-gray-400",margin:"0 1px"},vertical:{width:"20px",height:"2px",backgroundColor:"color-gray-400",margin:"1px 0"}},Vi=h.createContext({orientation:"horizontal",size:"md",variant:"default",isResizing:!1,setIsResizing:()=>{},registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>0,setPanelSize:()=>{},isPanelCollapsed:()=>!1,togglePanelCollapse:()=>{},startResize:()=>{},onResize:()=>{},endResize:()=>{}}),Ai=()=>h.useContext(Vi),gu=({value:e,children:o})=>r.jsx(Vi.Provider,{value:e,children:o}),hu=({children:e,id:o,defaultSize:t,minSize:n,maxSize:a,collapsible:l,defaultCollapsed:c,onCollapseChange:s,views:d,...g})=>{const{orientation:m,registerPanel:f,unregisterPanel:p,getPanelSize:u,isPanelCollapsed:y,togglePanelCollapse:k}=Ai(),x=typeof t=="string"&&t.endsWith("%")?0:typeof t=="number"?t:0;h.useEffect(()=>(f(o,x,n,a,l),()=>p(o)),[o,x,n,a,l,f,p]);const C=u(o),S=y(o);return h.useEffect(()=>{s&&S!==void 0&&s(S)},[S,s]),h.useEffect(()=>{l&&c&&!S&&k(o)},[o,l,c,S,k]),S?r.jsx(i.View,{flex:"0 0 auto",width:m==="horizontal"?"10px":"100%",height:m==="vertical"?"10px":"100%",backgroundColor:"color-gray-200",cursor:"pointer",onClick:()=>k(o),"aria-label":`Expand panel ${o}`,role:"button",tabIndex:0,...d==null?void 0:d.collapsedPanel,...g}):r.jsx(i.View,{flex:C>0?"0 0 auto":"1",width:m==="horizontal"?`${C}px`:"100%",height:m==="vertical"?`${C}px`:"100%",overflow:"auto",...d==null?void 0:d.panel,...g,children:e})},fu=({id:e,position:o="both",disabled:t=!1,withVisualIndicator:n=!0,withCollapseButton:a=!1,collapseTarget:l,views:c,...s})=>{const{orientation:d,size:g,variant:m,startResize:f,isPanelCollapsed:p,togglePanelCollapse:u}=Ai(),k=(()=>{if(l)return l;const b=e.match(/\d+$/);if(!b)return"";const I=parseInt(b[0],10);return isNaN(I)?"":`panel${I}`})(),x=p(k),C=b=>{if(t)return;b.preventDefault();const I=d==="horizontal"?b.clientX:b.clientY;f(e,I)},S=b=>{if(t||b.touches.length===0)return;b.preventDefault();const I=b.touches[0],T=d==="horizontal"?I.clientX:I.clientY;f(e,T)},w=b=>{t||(b.key==="Enter"||b.key===" ")&&(b.preventDefault(),f(e,0))},v=b=>{b.stopPropagation(),k&&u(k)};return r.jsxs(i.View,{role:"separator","aria-orientation":d,"aria-valuemin":0,"aria-valuemax":100,tabIndex:t?-1:0,cursor:d==="horizontal"?"col-resize":"row-resize",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...su(g,d),...du[m],onMouseDown:C,onTouchStart:S,onKeyDown:w,opacity:t?.5:1,pointerEvents:t?"none":"auto",...c==null?void 0:c.handle,...s,children:[n&&r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",width:d==="horizontal"?"100%":"auto",height:d==="vertical"?"100%":"auto",pointerEvents:"none",...c==null?void 0:c.handleIcon,children:d==="horizontal"?r.jsxs(i.Horizontal,{gap:1,children:[r.jsx(i.View,{...Zr.horizontal}),r.jsx(i.View,{...Zr.horizontal})]}):r.jsxs(i.Vertical,{gap:1,children:[r.jsx(i.View,{...Zr.vertical}),r.jsx(i.View,{...Zr.vertical})]})}),a&&k&&r.jsx(i.View,{position:"absolute",top:d==="horizontal"?"-20px":"50%",left:d==="horizontal"?"50%":"-20px",transform:d==="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":x?`Expand panel ${k}`:`Collapse panel ${k}`,role:"button",tabIndex:0,pointerEvents:"auto",_hover:{backgroundColor:"color-gray-200"},...c==null?void 0:c.collapseIcon,children:r.jsx(i.View,{width:"8px",height:"8px",display:"flex",alignItems:"center",justifyContent:"center",children:x?r.jsxs(i.Horizontal,{children:[r.jsx(i.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"}),r.jsx(i.View,{width:"2px",height:"6px",backgroundColor:"color-gray-600",position:"absolute"})]}):r.jsx(i.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"})})})]})},mu=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,minSize:l,maxSize:c,collapsible:s=!1,containerRef:d,autoSaveId:g,keyboardResizeBy:m,onLayout:f,views:p,...u})=>{const y=o==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(y,{ref:d,width:"100%",height:"100%",position:"relative",overflow:"hidden",...cu[o],...p==null?void 0:p.container,...u,children:e})},fn=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,onSizesChange:l,minSize:c=50,maxSize:s,collapsible:d=!1,autoSaveId:g,storage:m,keyboardResizeBy:f=10,views:p,...u})=>{const{isResizing:y,setIsResizing:k,containerRef:x,registerPanel:C,unregisterPanel:S,getPanelSize:w,setPanelSize:v,isPanelCollapsed:b,togglePanelCollapse:I,startResize:T,onResize:j,endResize:E}=iu(o,a,l,c,s,d,g,m,f);return r.jsx(gu,{value:{orientation:o,size:t,variant:n,isResizing:y,setIsResizing:k,registerPanel:C,unregisterPanel:S,getPanelSize:w,setPanelSize:v,isPanelCollapsed:b,togglePanelCollapse:I,startResize:T,onResize:j,endResize:E},children:r.jsx(mu,{orientation:o,size:t,variant:n,defaultSizes:a,minSize:c,maxSize:s,collapsible:d,autoSaveId:g,keyboardResizeBy:f,containerRef:x,views:p,...u,children:e})})};fn.Panel=hu,fn.Handle=fu;const Rr={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"}}},pu={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"}},uu=()=>Math.random().toString(36).substring(2,9);let Bo=new Map;const fr=vo.create(e=>({toasts:[],add:(o,t,n,a={})=>{const l=a.id||uu(),c={id:l,variant:o,title:t,description:n,createdAt:Date.now(),isVisible:!0,...a};if(e(s=>({toasts:[...s.toasts,c]})),a.duration!==0){const s=a.duration||5e3,d=setTimeout(()=>{fr.getState().remove(l)},s);Bo.set(l,d)}return l},remove:o=>{e(t=>({toasts:t.toasts.map(n=>n.id===o?{...n,isVisible:!1}:n)})),Bo.has(o)&&(clearTimeout(Bo.get(o)),Bo.delete(o)),setTimeout(()=>{e(t=>({toasts:t.toasts.filter(n=>n.id!==o)}))},300)},removeAll:()=>{Bo.forEach(clearTimeout),Bo.clear(),e(o=>({toasts:o.toasts.map(t=>({...t,isVisible:!1}))})),setTimeout(()=>{e({toasts:[]})},300)}})),ko=(e,o,t,n)=>fr.getState().add(e,o,t,n),Ei=(e,o,t)=>ko("info",e,o,t),Di=(e,o,t)=>ko("success",e,o,t),$i=(e,o,t)=>ko("warning",e,o,t),Li=(e,o,t)=>ko("error",e,o,t),_i=e=>{fr.getState().remove(e)},Bi=()=>{fr.getState().removeAll()},Oi=({variant:e,title:o,description:t,onClose:n,isClosable:a=!0,action:l,actionText:c,showIcon:s=!0,theme:d,views:g,render:m,icon:f,id:p,isVisible:u=!0,themeMode:y})=>{const k=d??Rr,x=()=>{var v,b;if(f!==void 0)return f;const w=e?(b=(v=Rr[e])==null?void 0:v.icon)==null?void 0:b.color:Rr.info.icon.color;switch(e){case"info":return r.jsx(Re,{widthHeight:20,color:w});case"success":return r.jsx(qn,{widthHeight:20,color:w});case"warning":return r.jsx(Re,{widthHeight:20,color:w,orientation:"down"});case"error":return r.jsx(Cr,{widthHeight:20,color:w});default:return r.jsx(Re,{widthHeight:20,color:Rr.info.icon.color})}};if(m)return r.jsx(r.Fragment,{children:m({id:p||"",onClose:n})});const C=e==="error"?"alert":"status",S=e==="error"||e==="warning"?"assertive":"polite";return r.jsxs(i.Horizontal,{role:C,"aria-live":S,"aria-atomic":"true","data-state":u?"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:u?1:0,transform:u?"translateY(0)":"translateY(4px)",transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",...g==null?void 0:g.container,children:[s&&r.jsx(i.View,{marginTop:"2px",...g==null?void 0:g.icon,children:x()}),r.jsxs(i.Vertical,{gap:4,flex:"1",children:[r.jsx(i.Text,{fontSize:"14px",lineHeight:"20px",fontWeight:"600",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,...g==null?void 0:g.title,children:o}),t&&r.jsx(i.Text,{fontSize:"12px",lineHeight:"18px",color:k[e].content.color,fontWeight:"400",backgroundColor:k[e].container.backgroundColor,...g==null?void 0:g.description,children:t}),l&&c&&r.jsx(i.Text,{fontSize:"14px",fontWeight:"600",marginTop:"6px",cursor:"pointer",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,onClick:w=>{w.stopPropagation(),l()},_hover:{textDecoration:"underline"},transition:"opacity 0.2s ease, color 0.2s ease",...g==null?void 0:g.actionButton,children:c})]}),a&&r.jsx(i.View,{as:"button","aria-label":"Close toast",backgroundColor:"transparent",border:"none",cursor:"pointer",padding:"4px",marginLeft:"8px",marginTop:"-2px",marginRight:"-4px",borderRadius:"9999px",onClick:w=>{w.stopPropagation(),n()},_hover:{backgroundColor:"color-black-900-60"},transition:"background-color 0.2s ease, opacity 0.2s ease",...g==null?void 0:g.closeButton,children:r.jsx(He,{widthHeight:16,color:k[e].content.color})})]})},yu=({position:e="top-right",gap:o=8,limit:t=5,containerStyle:n})=>{const{toasts:a,remove:l}=fr(),s=h.useMemo(()=>{const d={top:[],"top-right":[],"top-left":[],bottom:[],"bottom-right":[],"bottom-left":[]};return a.forEach(g=>{const m=g.position||e;d[m].push(g)}),Object.keys(d).forEach(g=>{d[g]=d[g].slice(-t)}),d},[a,e,t])[e];return r.jsx(i.View,{position:"fixed",zIndex:9999,display:"flex",flexDirection:e.includes("bottom")?"column-reverse":"column",gap:`${o}px`,width:"fit-content",maxWidth:"100%",pointerEvents:"none",...pu[e],style:n,children:s.map(d=>r.jsx(i.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:r.jsx(Oi,{id:d.id,variant:d.variant,title:d.title,description:d.description,onClose:()=>l(d.id),isClosable:d.isClosable,action:d.action,actionText:d.actionText,showIcon:d.showIcon,views:d.views,render:d.render,icon:d.icon,isVisible:d.isVisible})},d.id))})},bu=()=>({toast:(e,o,t,n)=>ko(e,o,t,n),info:(e,o,t)=>Ei(e,o,t),success:(e,o,t)=>Di(e,o,t),warning:(e,o,t)=>$i(e,o,t),error:(e,o,t)=>Li(e,o,t),remove:e=>_i(e),removeAll:()=>Bi()}),xu=Object.assign(e=>r.jsx(Oi,{...e}),{Container:e=>r.jsx(yu,{...e}),show:ko,info:Ei,success:Di,warning:$i,error:Li,remove:_i,removeAll:Bi}),ku=bu,Ni=(e,o)=>{var c,s;if(!e)return!0;const t=e.toLowerCase(),n=o.name.toLowerCase().includes(t),a=((c=o.description)==null?void 0:c.toLowerCase().includes(t))||!1,l=((s=o.keywords)==null?void 0:s.some(d=>d.toLowerCase().includes(t)))||!1;return n||a||l},Cu=({open:e,onOpenChange:o,groups:t=[],commands:n=[],filter:a})=>{const[l,c]=h.useState(""),[s,d]=h.useState(0),g=h.useRef(null),m=h.useMemo(()=>a||Ni,[a]),f=h.useMemo(()=>[...t.flatMap(x=>x.commands),...n],[t,n]),p=h.useMemo(()=>l.trim()?f.filter(k=>m(l,k)):f,[f,l,m]),u=h.useMemo(()=>{if(!l)return t;const k=a||Ni;return t.map(x=>({...x,commands:x.commands.filter(C=>k(l,C))})).filter(x=>x.commands.length)},[t,l,a]);h.useEffect(()=>{d(0)},[p.length]);const y=h.useCallback(k=>{if(e)switch(k.key){case"ArrowDown":k.preventDefault(),d(x=>x<p.length-1?x+1:x);break;case"ArrowUp":k.preventDefault(),d(x=>x>0?x-1:x);break;case"Enter":k.preventDefault(),p[s]&&(p[s].onSelect(),o(!1),c(""));break;case"Escape":k.preventDefault(),o(!1),c("");break}},[e,p,s,o]);return h.useEffect(()=>{if(!(typeof document>"u"))return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[y]),h.useEffect(()=>{const k=g.current;if(k&&typeof k.querySelector=="function"&&e){const x=k.querySelector(`[data-index="${s}"]`);x&&typeof x.scrollIntoView=="function"&&x.scrollIntoView({block:"nearest"})}},[s,e]),h.useEffect(()=>{e?d(0):c("")},[e]),{search:l,setSearch:c,selectedIndex:s,setSelectedIndex:d,filteredCommands:p,filteredGroups:u,listRef:g}},wu=({onClose:e,children:o,...t})=>r.jsx(i.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())},...t,children:o}),qi=h.forwardRef(({value:e,onValueChange:o,...t},n)=>r.jsx(i.Input,{value:e,onChange:a=>{var l,c;return o(typeof a=="string"?a:((l=a==null?void 0:a.target)==null?void 0:l.value)??((c=a==null?void 0:a.nativeEvent)==null?void 0:c.text)??"")},ref:n,...t}));qi.displayName="CommandTextInput";const Su={sm:{width:"400px",maxHeight:"300px"},md:{width:"500px",maxHeight:"400px"},lg:{width:"600px",maxHeight:"500px"}},vu=(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)"}}))(),Tu={display:"flex",alignItems:"center",padding:"12px 16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},Iu={overflow:"auto",padding:"8px 0"},Fu={marginBottom:"8px"},zu={padding:"8px 16px",fontSize:"12px",fontWeight:"bold",color:"color-gray-500",textTransform:"uppercase"},Mu={display:"flex",alignItems:"center",padding:"8px 16px",cursor:"pointer",userSelect:"none",borderRadius:"4px",margin:"0 8px",_hover:{backgroundColor:"color-gray-100"}},Wu={backgroundColor:"color-blue-50",_hover:{backgroundColor:"color-blue-100"}},Hu={opacity:.5,cursor:"not-allowed",_hover:{backgroundColor:"transparent"}},ju={display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",color:"color-gray-500"},Pu={display:"flex",flexDirection:"column",flex:1},Vu={fontSize:"14px",fontWeight:"medium"},Au={fontSize:"12px",color:"color-gray-500",marginTop:"2px"},Eu={display:"flex",alignItems:"center",marginLeft:"12px",fontSize:"12px",color:"color-gray-500"},Du={display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",color:"color-gray-500",textAlign:"center"},$u={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",fontSize:"12px",color:"color-gray-500"},Lu=h.createContext({search:"",setSearch:()=>{},selectedIndex:0,setSelectedIndex:()=>{},filteredCommands:[],onSelect:()=>{}}),_u=({value:e,children:o})=>r.jsx(Lu.Provider,{value:e,children:o}),Ui=({value:e,onValueChange:o,placeholder:t="Type a command or search...",views:n,...a})=>{const l=h.useRef(null);return h.useEffect(()=>{l.current&&l.current.focus()},[]),r.jsxs(i.View,{...Tu,...n==null?void 0:n.container,...a,children:[r.jsx(Sr,{widthHeight:16,color:"color-gray-400",marginRight:"8px"}),r.jsx(qi,{width:"100%",border:"none",outline:"none",backgroundColor:"transparent",fontSize:"14px",...n==null?void 0:n.input,value:e,onValueChange:o,placeholder:t,ref:l})]})},Bu=({children:e,views:o,...t})=>r.jsx(i.View,{...Iu,...o==null?void 0:o.container,...t,children:e}),Gi=({heading:e,children:o,views:t,...n})=>r.jsxs(i.View,{...Fu,...t==null?void 0:t.container,...n,children:[r.jsx(i.Text,{...zu,...t==null?void 0:t.heading,children:e}),o]}),mn=({item:e,selected:o=!1,onSelect:t,views:n,...a})=>{const l=()=>{!e.disabled&&t&&t()};return r.jsxs(i.Horizontal,{...Mu,...o?Wu:{},...e.disabled?Hu:{},onPress:l,onClick:l,...n==null?void 0:n.container,...a,children:[e.icon&&r.jsx(i.View,{...ju,...n==null?void 0:n.icon,children:e.icon}),r.jsxs(i.Vertical,{...Pu,...n==null?void 0:n.content,children:[r.jsx(i.Text,{...Vu,...n==null?void 0:n.name,children:e.name}),e.description&&r.jsx(i.Text,{...Au,...n==null?void 0:n.description,children:e.description})]}),e.shortcut&&r.jsx(i.Text,{...Eu,...n==null?void 0:n.shortcut,children:e.shortcut})]})},Yi=({children:e="No results found.",views:o,...t})=>r.jsx(i.View,{...Du,...o==null?void 0:o.container,...t,children:e}),Ou=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:l="md",variant:c="default",emptyState:s,footer:d,search:g,setSearch:m,selectedIndex:f,setSelectedIndex:p,filteredCommands:u,filteredGroups:y,listRef:k,views:x,filter:C,...S})=>{if(!e)return null;const w=h.useCallback(T=>{T.disabled||(T.onSelect(),o(!1),m(""))},[o,m]);h.useCallback(T=>T.target===T.currentTarget&&o(!1),[o]);const v=h.useMemo(()=>({search:g,setSearch:m,selectedIndex:f,setSelectedIndex:p,filteredCommands:u,onSelect:w}),[g,f,u,w,m,p]),b=t.length>0,I=u.length===0;return r.jsx(wu,{onClose:()=>o(!1),...S,children:r.jsx(_u,{value:v,children:r.jsxs(i.View,{borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",...Su[l],...vu[c],...x==null?void 0:x.container,onClick:T=>T.stopPropagation(),children:[r.jsx(Ui,{value:g,onValueChange:m,placeholder:a,views:x==null?void 0:x.searchInput}),r.jsx(i.View,{ref:k,flex:1,overflow:"auto",...x==null?void 0:x.list,children:I?s||r.jsx(Yi,{views:x==null?void 0:x.empty}):b?y.map(T=>r.jsx(Gi,{heading:T.name,views:x==null?void 0:x.groupHeading,children:T.commands.map(j=>{const E=u.findIndex(D=>D.id===j.id);return r.jsx(mn,{item:j,selected:E===f,onSelect:()=>w(j),"data-index":E,views:{container:x==null?void 0:x.item,icon:x==null?void 0:x.icon,content:x==null?void 0:x.content,name:x==null?void 0:x.name,description:x==null?void 0:x.description,shortcut:x==null?void 0:x.shortcut}},j.id)})},T.id)):u.map((T,j)=>r.jsx(mn,{item:T,selected:j===f,onSelect:()=>w(T),"data-index":j,views:{container:x==null?void 0:x.item,icon:x==null?void 0:x.icon,content:x==null?void 0:x.content,name:x==null?void 0:x.name,description:x==null?void 0:x.description,shortcut:x==null?void 0:x.shortcut}},T.id))}),d&&r.jsx(i.View,{...$u,...x==null?void 0:x.footer,children:d})]})})})},Oo=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:l="md",variant:c="default",filter:s,emptyState:d,footer:g,views:m,...f})=>{const{search:p,setSearch:u,selectedIndex:y,setSelectedIndex:k,filteredCommands:x,filteredGroups:C,listRef:S}=Cu({open:e,onOpenChange:o,groups:t,commands:n,filter:s});return r.jsx(Ou,{open:e,onOpenChange:o,groups:t,commands:n,placeholder:a,size:l,variant:c,emptyState:d,footer:g,search:p,setSearch:u,selectedIndex:y,setSelectedIndex:k,filteredCommands:x,filteredGroups:C,listRef:S,views:m,...f})};Oo.Input=Ui,Oo.List=Bu,Oo.Group=Gi,Oo.Item=mn,Oo.Empty=Yi;const Ki=()=>Math.random().toString(36).substring(2,11),Nu=({defaultOpen:e=!1,openDelay:o=200,closeDelay:t=200,isDisabled:n=!1}={})=>{const[a,l]=h.useState(e),c=h.useRef(null),s=h.useRef(null),d=h.useRef(null),g=h.useRef(null),m=h.useRef(`tooltip-trigger-${Ki()}`).current,f=h.useRef(`tooltip-content-${Ki()}`).current,p=h.useCallback(()=>{n||(g.current&&(clearTimeout(g.current),g.current=null),!a&&!d.current&&(d.current=setTimeout(()=>{l(!0),d.current=null},o)))},[a,o,n]),u=h.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null),a&&!g.current&&(g.current=setTimeout(()=>{l(!1),g.current=null},t))},[a,t]),y=h.useCallback(()=>{g.current&&(clearTimeout(g.current),g.current=null)},[]);return h.useEffect(()=>()=>{d.current&&clearTimeout(d.current),g.current&&clearTimeout(g.current)},[]),h.useEffect(()=>{if(typeof document>"u")return;const k=x=>{x.key==="Escape"&&a&&l(!1)};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[a]),{isOpen:a,openTooltip:p,closeTooltip:u,cancelCloseTimer:y,triggerRef:c,contentRef:s,triggerId:m,contentId:f}},qu={sm:{padding:"4px 8px",fontSize:"12px",maxWidth:"200px"},md:{padding:"6px 10px",fontSize:"14px",maxWidth:"250px"},lg:{padding:"8px 12px",fontSize:"16px",maxWidth:"300px"}},Uu=(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"}}))(),Gu=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}},Xi=h.createContext({isOpen:!1,openTooltip:()=>{},closeTooltip:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),pn=()=>h.useContext(Xi),Yu=({value:e,children:o})=>r.jsx(Xi.Provider,{value:e,children:o}),Ji=h.memo(({children:e,views:o,asChild:t=!1,...n})=>{const{openTooltip:a,closeTooltip:l,triggerRef:c,contentId:s,triggerId:d}=pn(),g=h.useCallback(()=>a(),[a]),m=h.useCallback(()=>l(),[l]),f=h.useCallback(()=>a(),[a]),p=h.useCallback(()=>l(),[l]),u={ref:c,onMouseEnter:g,onMouseLeave:m,onFocus:f,onBlur:p,id:d,"aria-describedby":s,...o==null?void 0:o.container,...n};return t&&h.isValidElement(e)?h.cloneElement(e,u):r.jsx(i.View,{display:"inline-block",...u,children:e})}),Ku=h.memo(({children:e,views:o,...t})=>{const{isOpen:n,contentRef:a,contentId:l,triggerId:c}=pn();return n?r.jsx(i.View,{ref:a,id:l,role:"tooltip","aria-labelledby":c,...o==null?void 0:o.container,...t,children:e}):null}),Xu=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:l="default",showArrow:c=!0,views:s,themeMode:d,...g})=>{const{isOpen:m,triggerRef:f,contentRef:p,contentId:u,triggerId:y}=pn(),{ref:k,relation:x}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[C,S]=h.useState({x:0,y:0,placement:t});h.useEffect(()=>{f!=null&&f.current&&k&&(k.current=f.current)},[f,k,m]),h.useEffect(()=>{if(m&&(p!=null&&p.current)&&(f!=null&&f.current)){const b=f.current.getBoundingClientRect();let I=t;x&&(t==="top"&&x.space.vertical==="bottom"?I="bottom":t==="bottom"&&x.space.vertical==="top"?I="top":t==="right"&&x.space.horizontal==="left"?I="left":t==="left"&&x.space.horizontal==="right"&&(I="right"));let T=0,j=0;switch(I){case"top":T=n==="start"?b.left:n==="end"?b.right-120:b.left+b.width/2-60,j=b.top-8;break;case"bottom":T=n==="start"?b.left:n==="end"?b.right-120:b.left+b.width/2-60,j=b.bottom+8;break;case"right":T=b.right+8,j=n==="start"?b.top:n==="end"?b.bottom-32:b.top+b.height/2-16;break;case"left":T=b.left-8,j=n==="start"?b.top:n==="end"?b.bottom-32:b.top+b.height/2-16;break}S({x:T,y:j,placement:I})}},[m,t,n,f,p,x]);const w=h.useMemo(()=>c?Gu(C.placement):{},[c,C.placement]),v=h.useMemo(()=>{const b={position:"fixed",left:C.x,top:C.y,zIndex:1e3};switch(C.placement){case"top":return{...b,transform:"translateY(-100%)"};case"left":return{...b,transform:"translateX(-100%)"};case"bottom":case"right":default:return b}},[C.x,C.y,C.placement]);return r.jsxs(i.View,{position:"relative",display:"inline-block",...s==null?void 0:s.container,...g,children:[r.jsx(Ji,{children:o}),m&&r.jsxs(i.View,{ref:p,id:u,role:"tooltip","aria-labelledby":y,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",style:v,...qu[a],...Uu[l],...s==null?void 0:s.content,children:[typeof e=="string"?r.jsx(i.Text,{...s==null?void 0:s.text,children:e}):e,c&&r.jsx(i.View,{...w,...s==null?void 0:s.arrow})]})]})},et=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:l="default",openDelay:c=200,closeDelay:s=200,showArrow:d=!0,defaultOpen:g=!1,isDisabled:m=!1,views:f,...p})=>{const u=Nu({defaultOpen:g,openDelay:c,closeDelay:s,isDisabled:m});return r.jsx(Yu,{value:u,children:r.jsx(Xu,{content:e,position:t,align:n,size:a,variant:l,showArrow:d,views:f,...p,children:o})})};et.Trigger=Ji,et.Content=Ku;const Qi=h.forwardRef((e,o)=>{const t={...e,isAgentRunning:e.isAgentRunning??e.isWorkerRunning,onStopAgent:e.onStopAgent??e.onStopWorker,disabled:e.disabled??e.isDisabled},n=ul(t);return h.useImperativeHandle(o,()=>({getValue:()=>{var a,l;return((a=n.hiddenInputRef.current)==null?void 0:a.value)??((l=n.editableRef.current)==null?void 0:l.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})),r.jsx(Sl,{...t,...n})});Qi.displayName="ChatInput";const Ju={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}},Zi={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%"}},un={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}},yn={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}},Qu=h.createContext({}),Zu=({children:e,showRadialGradient:o=!0,views:t,themeMode:n,...a})=>{const l={white:"rgba(255,255,255,1)",transparent:"rgba(255,255,255,0)"},c=["rgb(59, 130, 246)","rgb(196, 181, 253)","rgb(147, 197, 253)","rgb(221, 214, 254)","rgb(96, 165, 250)"],s={...Zi.gradient,backgroundImage:`
|
|
26
|
+
${K}`:K}let q=H,te=!1;H.endsWith("-thinking")&&(q=H.replace(/-thinking$/,""),te=!0),n==null||n(Y,{model_name:q,enable_thinking:te}),y||b(""),v([]),x([])},Z=le=>{v(Y=>Y.filter((q,te)=>te!==le)),!d&&S.length>le&&x(Y=>Y.filter((q,te)=>te!==le))},ee=le=>{le.preventDefault(),le.stopPropagation(),V(!0)},ae=le=>{le.preventDefault(),le.stopPropagation(),V(!1)},re=h.useCallback(le=>{!le||le.length===0||(x(Y=>[...Y,...le]),v(Y=>[...Y,...le]),M(Y=>[...Y,...le]),T(!0))},[x,v]),ie=h.useCallback(()=>{if(P.length>0&&!E&&p){F(!0);const le=P[0];j.current=le,D(0),u==null||u(0);try{p(le),M(Y=>Y.slice(1)),F(!1),j.current=null,D(100),u==null||u(100),f==null||f({file:le})}catch(Y){M(q=>q.slice(1)),F(!1),j.current=null,D(0),T(q=>P.length-1>0||!1),m==null||m(Y)}}else P.length===0&&I&&(T(!1),D(0))},[P,E,p,I,m,u,f]);h.useEffect(()=>{ie()},[P,E,ie]);const R="active",ne=le=>!0,se=()=>{Q(!1),e.onGuideClose&&e.onGuideClose()},he=le=>{y&&t?t(le.text):b(le.text),e.onPromptExampleSelect&&e.onPromptExampleSelect(le),U.current&&U.current.focus()},xe=h.useCallback(()=>S,[S]),ge=h.useCallback(()=>x([]),[]);return{onSubmit:n,getPendingFiles:xe,clearPendingFiles:ge,value:w,handleChange:B,setValue:L,handleSubmit:X,editableRef:U,fileInputRef:$,hiddenInputRef:_,isUploading:I,uploadProgress:W,isDraggingOver:A,uploadedFiles:C,pendingFiles:S,removeUploadedFile:Z,setPendingFiles:x,setUploadedFiles:v,setIsUploading:T,startUpload:re,selectedModel:H,handleModelChange:O,modelOptions:G,subscriptionStatus:R,canAccessModel:ne,handleDragOver:ee,handleDragLeave:ae,isGuideTipShown:N,hideGuideTip:se,handlePromptExampleSelect:he}},Df={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}},Wl={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"}},$f={default:{borderRadius:"8px"},square:{borderRadius:"0px"},rounded:{borderRadius:"8px"}},Lf={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"}},Bf={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"}},El=e=>`${e}-${Math.random().toString(36).substring(2,9)}`,_f=({openDelay:e=200,closeDelay:o=300}={})=>{const[t,n]=h.useState(!1),a=h.useRef(null),l=h.useRef(null),c=h.useRef(null),g=h.useRef(null),s=h.useMemo(()=>El("hovercard-content"),[]),d=h.useMemo(()=>El("hovercard-trigger"),[]),u=h.useCallback(()=>{a.current&&(clearTimeout(a.current),a.current=null),l.current&&(clearTimeout(l.current),l.current=null)},[]),f=h.useCallback(()=>{u(),t||(a.current=setTimeout(()=>{n(!0)},e))},[t,e,u]),m=h.useCallback(()=>{u(),t&&(l.current=setTimeout(()=>{n(!1)},o))},[t,o,u]),p=h.useCallback(()=>{l.current&&(clearTimeout(l.current),l.current=null)},[]);return h.useEffect(()=>()=>u(),[u]),{isOpen:t,openCard:f,closeCard:m,cancelCloseTimer:p,triggerRef:c,contentRef:g,contentId:s,triggerId:d}},Al=h.createContext({isOpen:!1,openCard:()=>{},closeCard:()=>{},cancelCloseTimer:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),Of=({children:e,value:o})=>r.jsx(Al.Provider,{value:o,children:e}),Hl=()=>{const e=h.useContext(Al);if(!e)throw new Error("useHoverCardContext must be used within a HoverCardProvider");return e},Nf=({children:e,views:o,asChild:t=!1,...n})=>{const{openCard:a,closeCard:l,triggerRef:c,contentId:g,triggerId:s}=Hl(),p={ref:c,onMouseEnter:()=>a(),onMouseLeave:()=>l(),onFocus:()=>a(),onBlur:()=>l(),id:s,"aria-describedby":g,...o==null?void 0:o.container,...n};if(t&&h.isValidElement(e)){const y=h.Children.only(e);return h.cloneElement(y,{...p,...y.props})}return r.jsx(i.View,{position:"relative",display:"inline-block",...p,children:e})},qf=({children:e,views:o,side:t="bottom",align:n="center",sideOffset:a=8,style:l,backgroundColor:c="color-white",borderRadius:g="4px",boxShadow:s="0px 2px 8px rgba(0, 0, 0, 0.15)",padding:d="12px",minWidth:u="50px",maxWidth:f="300px",...m})=>{const{isOpen:p,cancelCloseTimer:y,closeCard:k,contentRef:b,triggerRef:w,contentId:C,triggerId:v}=Hl(),{ref:S,relation:x}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0});h.useEffect(()=>{w!=null&&w.current&&(S==null?void 0:S.current)!==w.current&&S&&(S.current=w.current)},[w,S,p]);const I=()=>y(),T=()=>k();if(!p)return null;const W=()=>{if(!x||!(w!=null&&w.current))return{position:"absolute",top:0,left:0,zIndex:1e3};const M=w.current.getBoundingClientRect();let E=t;t==="bottom"&&x.space.vertical==="top"?E="top":t==="top"&&x.space.vertical==="bottom"?E="bottom":t==="right"&&x.space.horizontal==="left"?E="left":t==="left"&&x.space.horizontal==="right"&&(E="right");let F=0,j=0;switch(E){case"bottom":F=M.left+M.width/2,j=M.bottom+a;break;case"top":F=M.left+M.width/2,j=M.top-a;break;case"right":F=M.right+a,j=M.top+M.height/2;break;case"left":F=M.left-a,j=M.top+M.height/2;break}return{position:"fixed",left:F,top:j,zIndex:1e3,transform:D(E)}},D=M=>{switch(M){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)"}},P=W();return r.jsx(i.View,{ref:b,id:C,role:"tooltip","aria-labelledby":v,onMouseEnter:I,onMouseLeave:T,backgroundColor:c,borderRadius:g,boxShadow:s,padding:d,minWidth:u,maxWidth:f,style:{...P,...l},...o==null?void 0:o.container,...m,children:e})},He=({children:e,views:o,openDelay:t,closeDelay:n,...a})=>{const l=_f({openDelay:t,closeDelay:n});return r.jsx(Of,{value:l,children:r.jsx(i.View,{position:"relative",display:"inline-block",...o==null?void 0:o.container,...a,children:e})})};He.Trigger=Nf,He.Content=qf;const Uf=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:c={}})=>{if(e.length===0)return null;const g=h.useCallback(d=>d<1024?`${d} B`:d<1024*1024?`${(d/1024).toFixed(1)} KB`:`${(d/(1024*1024)).toFixed(1)} MB`,[]),s=h.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 r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...c==null?void 0:c.container,children:e.map((d,u)=>{const f=(d==null?void 0:d.path)||(d==null?void 0:d.url)||(l?URL.createObjectURL(d):""),m=d.type.startsWith("image/"),p=d.type.startsWith("video/"),y=d.type.startsWith("audio/"),k=s(d);return l?r.jsx(i.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:l&&r.jsxs(He,{children:[r.jsxs(He.Trigger,{children:[m&&r.jsx(i.Image,{src:f,alt:d.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),p&&r.jsx(i.View,{as:"video",src:f,alt:d.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Wo,{widthHeight:24,color:"color-black"})}),!m&&!p&&!y&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(ho,{widthHeight:24,color:"color-black"})}),t&&r.jsx(i.Button,{...Df.attachmentRemove,onClick:b=>{b.stopPropagation(),t(u)},"aria-label":`Remove ${d.name}`,children:"×"})]}),r.jsxs(He.Content,{children:[m&&r.jsx(i.Image,{src:f,alt:d.name,maxWidth:"100%"}),p&&r.jsx(i.View,{as:"video",src:f,controls:!0,maxWidth:"100%"}),y&&r.jsx(i.View,{as:"audio",src:f,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",...c==null?void 0:c.name,children:[d.name," (",g(d.size),")"]})]})]})},u):r.jsxs(i.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:[r.jsx(i.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:k.backgroundColor,color:k.color,children:y?r.jsx(Wo,{widthHeight:12,color:"currentColor"}):r.jsx(ho,{widthHeight:12,color:"currentColor"})}),r.jsxs(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...c==null?void 0:c.name,children:[d.name," · ",g(d.size)]}),t&&r.jsx(i.View,{as:"button",type:"button",onClick:()=>t(u),"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:"×"})]},u)})})},Vl=typeof window<"u"?h.useLayoutEffect:h.useEffect,Pl=h.forwardRef(({value:e,onChange:o,placeholder:t="Type your message...",disabled:n=!1,autoFocus:a=!0,suggestions:l=[],onSuggestionSelect:c,showSuggestions:g=!1,mentionData:s=[],mentionTrigger:d="@",onMentionSelect:u,onKeyDown:f,maxHeight:m="200px",minHeight:p="40px",name:y,id:k,hiddenInput:b=!0,hiddenInputRef:w,views:C={}},v)=>{var q,te;const S=h.useRef(e),[x,I]=h.useState(-1),[T,W]=h.useState(!e),D=h.useRef(null),[P,M]=h.useState(!1),[E,F]=h.useState(!1),[j,A]=h.useState(""),[V,H]=h.useState(-1),[O,G]=h.useState(-1),[U,$]=h.useState([]),{ref:_,relation:N}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[Q,B]=h.useState({x:0,y:0}),[L,X]=h.useState({x:0,y:0}),Z=h.useRef(null),ee=h.useCallback(K=>{Z.current=K,typeof w=="function"?w(K):w&&(w.current=K)},[w]),ae=h.useCallback(K=>{Z.current&&Z.current.value!==K&&(Z.current.value=K)},[]);Vl(()=>{const K=v;K!=null&&K.current&&e!==S.current&&(K.current.textContent=e,S.current=e,W(!e)),ae(e)},[e,v,ae]);const re=h.useCallback(K=>{if(K===S.current)return;const J=v;J!=null&&J.current&&J.current.textContent!==K&&(J.current.textContent=K),S.current=K,W(!K),ae(K),o(K)},[o,v,ae]);Vl(()=>{const K=Z.current;if(!K)return;const J=()=>re(K.value);return K.addEventListener("input",J),K.addEventListener("change",J),()=>{K.removeEventListener("input",J),K.removeEventListener("change",J)}},[re,b]),h.useEffect(()=>{a&&v&&typeof v=="object"&&v.current&&v.current.focus()},[a,v]);const ie=()=>{const K=window.getSelection();if(!K||K.rangeCount===0)return-1;const J=K.getRangeAt(0),ue=J.cloneRange();return ue.selectNodeContents(v&&typeof v=="object"&&v.current?v.current:document.body),ue.setEnd(J.endContainer,J.endOffset),ue.toString().length},R=h.useCallback((K,J)=>{const ue=K.substring(0,J),fe=ue.lastIndexOf(d);if(fe!==-1){const ce=ue.substring(fe+1);if(!ce.includes(" ")){const Se=ce.toLowerCase(),De=s.filter(Ve=>Ve.name.toLowerCase().includes(Se));A(Se),H(fe),$(De),F(De.length>0),G(0);const We=ne();B(We);return}}F(!1),A(""),H(-1),G(-1)},[s,d]);h.useEffect(()=>{D.current&&_&&(_.current=D.current)},[D,_]);const ne=h.useCallback((K=200)=>{if(!D.current)return{x:0,y:0};const J=D.current.getBoundingClientRect();if(N){const de=N.space.vertical==="top";return{x:J.left,y:de?J.top-K-8:J.bottom+8}}const ue=window.innerHeight,fe={top:J.top,bottom:ue-J.bottom},ce=fe.bottom<K+8&&fe.top>fe.bottom;return{x:J.left,y:ce?J.top-K-8:J.bottom+8}},[N]),se=h.useCallback(()=>{M(!0);const K=ne();X(K)},[ne]),he=h.useCallback(()=>{setTimeout(()=>{M(!1),I(-1)},150)},[]),xe=K=>{const J=K.currentTarget.textContent||"";if(J!==S.current){o(J),S.current=J,ae(J),W(!J);const ue=ie();R(J,ue)}},ge=h.useCallback(K=>{if(v&&typeof v=="object"&&v.current){const J=v.current.textContent||"",ue=J.substring(0,V),fe=J.substring(V+d.length+j.length),ce=ue+d+K.name+" "+fe;o(ce),S.current=ce,ae(ce),v.current.textContent=ce;const de=ue.length+d.length+K.name.length+1;setTimeout(()=>{var Se;if(v.current){const De=document.createRange(),We=window.getSelection(),Ve=v.current.firstChild;Ve&&We&&(De.setStart(Ve,Math.min(de,((Se=Ve.textContent)==null?void 0:Se.length)||0)),De.collapse(!0),We.removeAllRanges(),We.addRange(De))}},0)}F(!1),A(""),H(-1),G(-1),u&&u(K)},[V,d,j,o,u,v,ae]),le=h.useCallback(K=>{c&&c(K),I(-1)},[c]),Y=K=>{if(!(f&&(f(K),K.defaultPrevented))){if(E&&U.length>0){if(K.key==="ArrowDown"){K.preventDefault(),G(J=>J<U.length-1?J+1:0);return}if(K.key==="ArrowUp"){K.preventDefault(),G(J=>J>0?J-1:U.length-1);return}if((K.key==="Tab"||K.key==="Enter")&&O>=0){K.preventDefault(),ge(U[O]);return}if(K.key==="Escape"){F(!1),G(-1);return}}if(g&&l.length>0){if(K.key==="ArrowDown"){K.preventDefault(),I(J=>J<l.length-1?J+1:0);return}if(K.key==="ArrowUp"){K.preventDefault(),I(J=>J>0?J-1:l.length-1);return}if(K.key==="Tab"&&x>=0){K.preventDefault(),le(l[x]);return}if(K.key==="Escape"){I(-1);return}}}};return r.jsxs(i.View,{ref:D,width:"100%",position:"relative",...C==null?void 0:C.container,children:[r.jsxs(i.View,{width:"100%",minHeight:p,maxHeight:m,overflowY:"auto",position:"relative",children:[T&&r.jsx(i.Text,{position:"absolute",top:"8px",left:"8px",color:"color-gray-400",pointerEvents:"none",fontSize:"14px",zIndex:1,...C==null?void 0:C.placeholder,children:t}),r.jsx(i.View,{as:"div",ref:v,contentEditable:!n,suppressContentEditableWarning:!0,onInput:xe,onKeyDown:Y,onFocus:se,onBlur:he,role:"textbox","aria-multiline":"true","aria-placeholder":t,width:"100%",minHeight:"24px",padding:"8px",outline:"none",whiteSpace:"pre-wrap",wordBreak:"break-word",fontSize:"14px",color:"color-gray-900",backgroundColor:"transparent",...C==null?void 0:C.input})]}),b&&r.jsx(i.View,{as:"textarea",ref:ee,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",...C==null?void 0:C.hiddenInput}),E&&U.length>0&&r.jsx(i.View,{position:"fixed",left:Q.x,top:Q.y,width:((q=D.current)==null?void 0:q.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",...C==null?void 0:C.mentionContainer,children:r.jsxs(i.Vertical,{gap:0,children:[U.map((K,J)=>r.jsx(i.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:J===O?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>ge(K),onMouseEnter:()=>G(J),_hover:{backgroundColor:"color-blue-50"},...C==null?void 0:C.mentionItem,children:r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:[d,K.name]}),K.description&&r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",children:K.description})]})},K.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Mentions (Trigger: ",d,")",N&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",N.space.vertical,"-",N.space.horizontal]})]})]})}),g&&l.length>0&&!E&&P&&!e&&r.jsx(i.View,{position:"fixed",left:L.x,top:L.y,width:((te=D.current)==null?void 0:te.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",...C==null?void 0:C.suggestionsContainer,children:r.jsxs(i.Vertical,{gap:0,children:[l.map((K,J)=>r.jsx(i.View,{as:"button",type:"button",width:"100%",padding:"12px 16px",backgroundColor:J===x?"color-blue-50":"transparent",border:"none",cursor:"pointer",textAlign:"left",transition:"background-color 0.2s ease",onClick:()=>le(K),onMouseEnter:()=>I(J),_hover:{backgroundColor:"color-blue-50"},...C==null?void 0:C.suggestionItem,children:r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontSize:"14px",color:"color-gray-900",fontWeight:"medium",children:K.text}),K.description&&r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",children:K.description})]})},K.id)),process.env.NODE_ENV==="development"&&r.jsxs("div",{style:{fontSize:"8px",opacity:.7,padding:"4px"},children:["Suggestions (Focus-triggered)",N&&r.jsxs(r.Fragment,{children:[r.jsx("br",{}),"Space: ",N.space.vertical,"-",N.space.horizontal]})]})]})})]})});Pl.displayName="EditableInput";const Gf=({examples:e,onSelect:o,views:t={}})=>{const{getColor:n}=i.useTheme();return!e||e.length===0?null:r.jsx(i.Horizontal,{gap:8,overflowX:"auto",padding:"8px 0",width:"100%",...t==null?void 0:t.container,children:e.map(a=>r.jsx(i.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"},...t==null?void 0:t.item,children:r.jsx(i.Text,{fontSize:"14px",color:"color-gray-700",...t==null?void 0:t.text,children:a.text})},a.id))})},Yf=({onRecordingComplete:e,onRecordingStart:o,views:t={}})=>{const{recording:n,paused:a,audioBlob:l,analyserNode:c,startRecording:g,stopRecording:s}=ya();h.useEffect(()=>{if(l){const u=new File([l],`recording-${Date.now()}.webm`,{type:l.type||"audio/webm;codecs=opus"});e(u)}},[l]);const d=h.useCallback(()=>{g(),o==null||o()},[]);return r.jsxs(i.Horizontal,{alignItems:"center",gap:4,children:[r.jsx(i.View,{minWidth:90,children:n&&c&&r.jsx(Vt,{analyserNode:c,isPaused:a})}),r.jsx(i.View,{as:"button",type:"button",onClick:n?s: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"},...t.button,children:n?r.jsx(Mr,{widthHeight:16,color:"currentColor",filled:!1}):r.jsx(Ft,{widthHeight:16,color:"currentColor",filled:!1})})]})},Dl=h.memo(({onSubmit:e,placeholder:o="Type your message… use @ to mention",loading:t=!1,disabled:n=!1,isDisabled:a,rightElement:l,onKeyDown:c,isAgentRunning:g=!1,enableAudioRecording:s=!1,leftButtons:d,rightButtons:u,onStopAgent:f,loadingText:m="Agent is working...",autoFocus:p=!0,sandboxId:y,hideAttachments:k=!1,attachmentText:b="",promptExamples:w=[],suggestions:C=[],errorMessage:v,size:S="md",shape:x="rounded",variant:I="default",views:T={},mentionData:W=[],mentionTrigger:D="@",onMentionSelect:P,onAudioRecordingStart:M,onAudioRecordingStop:E,showGuideTip:F,guideVideoUrl:j,onGuideClose:A,onFileBrowse:V,onUploadProgress:H,onUploadSuccess:O,onUploadError:G,onFileUpload:U,onPromptExampleSelect:$,name:_,hiddenInput:N=!0,value:Q,handleChange:B,setValue:L,handleSubmit:X,editableRef:Z,fileInputRef:ee,hiddenInputRef:ae,isUploading:re,uploadProgress:ie,isDraggingOver:R,uploadedFiles:ne,pendingFiles:se,getPendingFiles:he,clearPendingFiles:xe,removeUploadedFile:ge,setPendingFiles:le,setUploadedFiles:Y,setIsUploading:q,startUpload:te,selectedModel:K,handleModelChange:J,modelOptions:ue,subscriptionStatus:fe,canAccessModel:ce,isGuideTipShown:de,hideGuideTip:Se,handlePromptExampleSelect:De,handleDragOver:We,handleDragLeave:Ve,onChange:Gn,...yt})=>{i.useTheme();const Ro=h.useMemo(()=>({...Wl.container,...$f[x],...T==null?void 0:T.container}),[x,T==null?void 0:T.container]),bt=h.useMemo(()=>({...Wl.content,...Lf[S],...Bf[I],...T==null?void 0:T.content}),[S,I,T==null?void 0:T.content]),go=((Q==null?void 0:Q.trim().length)??0)>0||ne.length>0,xt=h.useCallback(Fe=>{te([Fe]),E==null||E(Fe)},[te,E]),Yn=h.useCallback(Fe=>{const er=Fe.filter(os=>os.size>52428800?(console.error(`File size exceeds 50MB limit: ${os.name}`),!1):!0);er.length>0&&te(er)},[te]),ax=h.useCallback(Fe=>{if(Fe.preventDefault(),Fe.stopPropagation(),Ve(Fe),Fe.dataTransfer.files.length>0){const er=Array.from(Fe.dataTransfer.files);Yn(er)}},[Ve,Yn]),lx=h.useMemo(()=>[...W||[],...ne.map((Fe,er)=>({id:`file-${er}`,name:Fe.name}))],[W,ne]);return r.jsxs(i.View,{display:"flex",flexDirection:"column",boxSizing:"border-box",...Ro,...yt,onDragOver:We,onDragLeave:Ve,onDrop:ax,children:[w.length>0&&r.jsx(Gf,{examples:w,onSelect:De,views:{container:T==null?void 0:T.promptExamples,item:T==null?void 0:T.promptExampleItem}}),g&&r.jsxs(i.Horizontal,{justifyContent:"center",alignItems:"center",gap:8,padding:"8px 0",animate:{from:{opacity:0,y:-10},to:{opacity:1,y:0},duration:"0.3s"},...T==null?void 0:T.loadingIndicator,children:[r.jsx(Mt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(i.Text,{color:"color-gray-500",children:m})]}),r.jsx(i.View,{position:"relative",width:"100%",overflow:"visible",children:r.jsxs(i.View,{as:"form",onSubmit:X,overflow:"visible",display:"flex",flexDirection:"column",position:"relative",...bt,...Ro,paddingHorizontal:16,paddingVertical:10,backgroundColor:R?"color-blue-50":void 0,children:[r.jsx(Uf,{files:ne,sandboxId:y,onRemove:ge,showPreviews:!0,views:{container:T==null?void 0:T.attachments,item:T==null?void 0:T.attachmentItem,name:T==null?void 0:T.attachmentName,size:T==null?void 0:T.attachmentSize,removeButton:T==null?void 0:T.attachmentRemove}}),r.jsx(Pl,{ref:Z,value:Q||"",onChange:B,placeholder:o,disabled:n&&!g,autoFocus:p,onKeyDown:c,suggestions:C||[],showSuggestions:C&&C.length>0&&!Q,onSuggestionSelect:Fe=>{B(Fe.text)},mentionData:lx,mentionTrigger:D,onMentionSelect:P,name:_,hiddenInput:N,hiddenInputRef:ae,views:{container:{},input:T==null?void 0:T.editableInput,hiddenInput:T==null?void 0:T.hiddenInput}}),r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",marginTop:"8px",children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[!k&&r.jsx(i.View,{display:"contents",onClickCapture:V?Fe=>{Fe.target.tagName==="INPUT"&&V()}:void 0,children:r.jsx(Ar,{accept:"*/*",icon:r.jsx(tr,{widthHeight:16}),maxSize:50*1024*1024,multiple:!0,onMultipleFileSelect:Yn,isLoading:re,progress:ie||0,text:b,fileType:"file",renderError:({errorMessage:Fe})=>null,views:{container:{height:"36px",cursor:"pointer",_hover:{backgroundColor:"color-gray-100"},...T==null?void 0:T.fileButton}},containerProps:{display:"flex",alignItems:"center",justifyContent:"center",gap:4,borderRadius:x==="rounded"?"50%":4,padding:10},textProps:{fontSize:"14px",color:"color-gray-600"},validateFile:Fe=>Fe.size>50*1024*1024?"File size exceeds 50MB limit":null})}),d]}),r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[l,s&&r.jsx(Yf,{onRecordingStart:M,onRecordingComplete:xt,views:{button:T==null?void 0:T.recordButton}}),r.jsx(i.View,{as:"button",type:"button",onClick:X,height:"40px",width:"40px",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:g?"theme-error":go?"theme-primary":"color-gray-300",color:"color-white",borderRadius:x==="rounded"?"50%":4,border:"none",cursor:go?"pointer":"not-allowed",disabled:!go||t||n&&!g,transition:"background-color 0.2s ease, opacity 0.2s ease, box-shadow 0.2s ease",_hover:{opacity:go||g?.9:1},_active:{opacity:go||g?.95:1},_focusVisible:{outline:"none",boxShadow:"0 0 0 2px white, 0 0 0 4px theme-primary"},...T==null?void 0:T.submitButton,children:g?r.jsx(Mr,{widthHeight:16,color:"currentColor",filled:!1}):t?r.jsx(to,{type:"quarter",size:16,color:"color-white"}):r.jsx(zt,{widthHeight:16,color:"currentColor",filled:!1})}),u]})]})]})}),v&&r.jsx(i.Text,{color:"theme-error",marginTop:"4px",...T==null?void 0:T.bottomTip,children:v})]})}),Kf=e=>{const{name:o,onSubmit:t,...n}=e,[a,l]=h.useState([]),c=Te({name:o,type:"text"}),g=m=>{c.onChangeText&&c.onChangeText(m)},s=(m,p)=>{t?t(m,p):g(m)},d=()=>a,u=()=>l([]),f=jl({...n,value:c.value||"",onChange:g,onSubmit:s});return r.jsx(Dl,{...n,...f,name:o,value:c.value||"",onChange:g,onSubmit:s,error:c.error,getPendingFiles:d,clearPendingFiles:u})},Xf=e=>{const o=Te(e),t=nl(o);return r.jsx(al,{...t,...o})},Jf=e=>{const o=Te(e),t=pl();return r.jsx(yl,{...t,...o})},Qf=e=>{const o=Te(e),t=ll(e);return r.jsx(cl,{...t,...o})},Zf=e=>{let o=Te(e);o.selected=o.value;const t=_a({...e,value:o.value});return r.jsx(qa,{...o,...t})},Rf=e=>{const o=Te(e),t=Ua(e);return r.jsx(Ka,{...t,...o})},eu=e=>{const{name:o,...t}=e,{values:n,errors:a,touched:l,submitCount:c,setFieldValue:g,setFieldTouched:s}=_e.useFormikContext(),d=_e.getIn(n,o)||[],u=_e.getIn(l,o)||c>0?_e.getIn(a,o):void 0,f=h.useCallback(b=>{var C;const w=Array.isArray(b)?b.filter(v=>typeof v=="string"):[];g(o,w),(C=e.onTagsChange)==null||C.call(e,w)},[o,g,e.onTagsChange]),m=h.useCallback(()=>{var b;s(o,!0),(b=e.onBlur)==null||b.call(e)},[o,s,e.onBlur]),p=vl({...t,tags:d,onTagsChange:f,onBlur:m}),{tags:y,...k}=p;return r.jsx(Tl,{...k,...t,tags:y,error:u})},ou=e=>{const o=Te(e),t=Qa(e);return r.jsx(Za,{...t,...o})},ru=e=>{const o=Te(e,{focusable:!0}),{value:t,...n}=Kt(e);return r.jsx(dr,{...n,...o})},tu=({visibleIcon:e=r.jsx(Wt,{widthHeight:14}),hiddenIcon:o=r.jsx(jt,{widthHeight:14}),...t})=>{const n=Te(t,{focusable:!0}),{isVisible:a,setIsVisible:l,...c}=bl(n);return r.jsx(dr,{...c,type:a?"text":"password",isClearable:!1,right:r.jsx(i.View,{onClick:()=>{t.isDisabled||l(!a)},children:a?e:o})})},nu=({items:e,placeholder:o,searchPlaceholder:t,isMulti:n=!1,...a})=>{const l=Te(a),c=kl(e,o,t);h.useEffect(()=>{if(n&&Array.isArray(l.value))c.setSelectedItems(l.value);else if(!n&&l.value){const s=typeof l.value=="object"?l.value:e.find(d=>d.value===l.value);s&&c.setSelectedItem(s)}},[l.value,n,e]);const g=s=>{l.onChange(s)};return r.jsx(Sl,{...c,...l,items:e,placeholder:o,isMulti:n,onSelect:g})},Bo=(e,o,t)=>Math.min(Math.max(e,o),t),au=(e,o,t,n,a,l,c)=>{const g=n-t;let s;if(l==="horizontal"){const d=o.width,u=e-o.left;s=Bo(u/d,0,1)}else{const d=o.height,u=o.bottom-e;s=Bo(u/d,0,1)}if(c&&c.length>0){const d=t+s*g;let u=c[0],f=Math.abs(d-u);for(let m=1;m<c.length;m++){const p=Math.abs(d-c[m]);p<f&&(f=p,u=c[m])}return u}else{const d=t+s*g,u=Math.round(d/a)*a;return Bo(u,t,n)}},$l=({min:e=0,max:o=100,step:t=1,value:n,defaultValue:a,onChange:l,onDrag:c,orientation:g="horizontal",isDisabled:s=!1,stepValues:d})=>{const u=Bo(n??a??e,e,o),[f,m]=h.useState(u),[p,y]=h.useState(!1),[k,b]=h.useState(!1),w=h.useRef(null),C=h.useRef(null),v=n!==void 0,S=n!==void 0?n:f;h.useEffect(()=>{n!==void 0&&m(Bo(n,e,o))},[n,e,o]);const x=h.useCallback(E=>{const F=Bo(E,e,o);v||m(F),l&&F!==S&&l(F),p&&c&&c(F)},[v,e,o,l,S,p,c]),I=h.useCallback(E=>{if(s||!w.current)return;const F=w.current;if(typeof F.getBoundingClientRect!="function")return;const j=F.getBoundingClientRect();let A;"touches"in E?A=g==="horizontal"?E.touches[0].clientX:E.touches[0].clientY:A=g==="horizontal"?E.clientX:E.clientY;const V=au(A,j,e,o,t,g,d);x(V)},[e,o,t,g,x,s,d]),T=h.useCallback(E=>{if(s)return;E.preventDefault(),y(!0),I(E);const F=A=>{I(A)},j=()=>{y(!1),document.removeEventListener("mousemove",F),document.removeEventListener("mouseup",j),document.removeEventListener("touchmove",F),document.removeEventListener("touchend",j)};typeof document>"u"||(document.addEventListener("mousemove",F),document.addEventListener("mouseup",j),document.addEventListener("touchmove",F),document.addEventListener("touchend",j))},[I,s]),W=h.useCallback(E=>{const F=C.current;F&&typeof F.contains=="function"&&F.contains(E.target)||T(E)},[T]),D=h.useCallback(E=>{if(s)return;let F=S;switch(E.key){case"ArrowLeft":case"ArrowDown":F=S-t;break;case"ArrowRight":case"ArrowUp":F=S+t;break;case"Home":F=e;break;case"End":F=o;break;default:return}E.preventDefault(),x(F)},[S,e,o,t,x,s]),P=o-e,M=P===0?0:(S-e)/P*100;return{currentValue:S,isDragging:p,isHovered:k,setIsHovered:b,trackRef:w,thumbRef:C,handleThumbMouseDown:T,handleTrackMouseDown:W,handleKeyDown:D,thumbPositionPercent:M}},Ll={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%"}},Bl={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}},_l={square:0,rounded:4,pill:24},Ol=(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"}}))(),lu={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}},iu={horizontal:{width:"100%",minWidth:"120px",height:"auto",flexDirection:"row",paddingVertical:8},vertical:{height:"100%",minHeight:"120px",width:"auto",flexDirection:"column-reverse",paddingHorizontal:8}},cu=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),ur=(e,o)=>cu(o)?{style:{[e]:o}}:{[e]:o},Nl=h.memo(({min:e=0,max:o=100,step:t=1,currentValue:n,stepValues:a,shape:l="rounded",size:c="md",variant:g="default",orientation:s="horizontal",isDisabled:d=!1,showValue:u=!1,showTooltip:f=!1,backgroundColor:m="theme-primary",label:p,helperText:y,themeMode:k,shadow:b={},isDragging:w,isHovered:C,setIsHovered:v,trackRef:S,thumbRef:x,handleThumbMouseDown:I,handleTrackMouseDown:T,handleKeyDown:W,thumbPositionPercent:D,ariaLabel:P="Slider",views:M={container:{},track:{},progress:{},filledTrack:{},thumb:{},label:{},valueLabel:{},stepMarks:{},tooltip:{}},onChange:E,onDrag:F,value:j,defaultValue:A,...V})=>{var L,X;const H=m,O="theme-disabled",G=Ol[g].backgroundColor,U=d?O:H,$=s==="vertical",{trackCrossAxisSize:_,thumbSize:N}=lu[c]||{trackCrossAxisSize:Ll[c].height,thumbSize:Bl[c].width||16},Q=r.jsxs(i.Vertical,{width:"100%",gap:8,...M.container,...V,children:[p&&r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontSize:14,fontWeight:500,...M.label,children:p}),u&&r.jsx(i.Text,{fontSize:14,color:"color-gray-500",...M.valueLabel,children:n})]}),r.jsxs(i.View,{ref:S,position:"relative",cursor:d?"not-allowed":"pointer",opacity:d?.6:1,onMouseDown:T,onMouseEnter:()=>v(!0),onMouseLeave:()=>v(!1),...Ll[c],borderRadius:_l[l],backgroundColor:G,...Ol[g],...b,...M.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(Z=>{const ee=(Z-e)/(o-e)*100;return r.jsx(i.View,{position:"absolute",top:"50%",left:`${ee}%`,transform:"translate(-50%, -50%)",width:4,height:4,borderRadius:"50%",zIndex:1,...ur("backgroundColor",U),...M.stepMarks},Z)})}),r.jsx(i.View,{position:"absolute",top:0,left:0,height:"100%",width:`${D}%`,borderRadius:_l[l],transition:"width 0.1s ease-in-out",...ur("backgroundColor",U),...M.progress,...M.filledTrack}),r.jsx(i.View,{ref:x,role:"slider",tabIndex:d?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":s,"aria-disabled":d,"aria-label":P,position:"absolute",top:"50%",left:`${D}%`,borderRadius:"50%",backgroundColor:"color-white",boxShadow:"0 2px 4px rgba(0, 0, 0, 0.2)",borderWidth:2,borderStyle:"solid",transition:w?"none":"transform 0.1s ease-in-out",...ur("borderColor",U),transform:C?"translate(-50%, -50%) scale(1.1)":"translate(-50%, -50%)",zIndex:2,onMouseDown:I,onTouchStart:I,onKeyDown:W,...Bl[c],...M.thumb,children:f&&(C||w)&&r.jsx(i.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,...M.tooltip,children:r.jsx(i.Text,{...(L=M.tooltip)==null?void 0:L.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(Gt,{children:y})]}),B=r.jsxs(i.Center,{...iu[s],position:"relative",onMouseEnter:()=>!d&&v(!0),onMouseLeave:()=>!d&&v(!1),...V,...M==null?void 0:M.container,children:[p&&r.jsxs(i.Horizontal,{justifyContent:"space-between",alignItems:"center",marginBottom:8,width:"100%",children:[r.jsx(i.Text,{fontSize:14,fontWeight:500,...M.label,children:p}),u&&r.jsx(i.Text,{fontSize:14,color:"color-gray-500",...M.valueLabel,children:n})]}),r.jsxs(i.View,{ref:S,position:"relative",borderRadius:_/2,backgroundColor:d?O:G,cursor:d?"not-allowed":"pointer",width:$?`${_}px`:"100%",height:$?"100%":`${_}px`,onMouseDown:T,onTouchStart:T,...M==null?void 0:M.track,children:[a&&a.length>0&&r.jsx(r.Fragment,{children:a.map(Z=>{const ee=(Z-e)/(o-e)*100;return r.jsx(i.View,{position:"absolute",width:4,height:4,borderRadius:"50%",backgroundColor:U,zIndex:1,...$?{bottom:`${ee}%`,left:"50%",transform:"translate(-50%, 50%)"}:{left:`${ee}%`,top:"50%",transform:"translate(-50%, -50%)"},...M.stepMarks},Z)})}),r.jsx(i.View,{position:"absolute",borderRadius:_/2,...$?{bottom:0,left:0,width:"100%",height:`${D}%`}:{top:0,left:0,height:"100%",width:`${D}%`},...ur("backgroundColor",U),...M==null?void 0:M.filledTrack,...M==null?void 0:M.progress}),r.jsx(i.View,{ref:x,role:"slider",tabIndex:d?-1:0,"aria-valuemin":e,"aria-valuemax":o,"aria-valuenow":n,"aria-orientation":s,"aria-disabled":d,"aria-label":P,position:"absolute",width:`${N}px`,height:`${N}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:$?"translateX(-50%)":"translateY(-50%)",zIndex:2,transition:w?"none":"left 0.1s, bottom 0.1s",...ur("backgroundColor",U),...$?{left:"50%",bottom:`${D}%`}:{top:"50%",left:`${D}%`},onMouseDown:I,onTouchStart:I,onKeyDown:W,...M==null?void 0:M.thumb,children:f&&(C||w)&&r.jsx(i.View,{position:"absolute",padding:"4px 8px",backgroundColor:"color-black",color:"color-white",borderRadius:"4px",whiteSpace:"nowrap",zIndex:3,...$?{left:"100%",marginLeft:"8px",bottom:"0",transform:"translateY(50%)"}:{bottom:"100%",left:"50%",marginBottom:"8px",transform:"translateX(-50%)"},...M==null?void 0:M.tooltip,children:r.jsx(i.Text,{...(X=M==null?void 0:M.tooltip)==null?void 0:X.text,children:n==null?void 0:n.toFixed(t<1?1:0)})})})]}),y&&r.jsx(Gt,{marginTop:8,children:y})]});return $||f?B:Q}),su=e=>{const o=Te(e),t=$l({...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 r.jsx(Nl,{...e,...t,...o})},ql=e=>{if(e==null)return"";if(typeof e=="string"||typeof e=="number"){const o=String(e);return o==="[object Object]"?"":o}return""},tn=(e,o)=>{console.log(`[FormikOTPInput] ${e}`,o)},du=e=>e==null||typeof e=="string"||typeof e=="number"||typeof e=="boolean"?e:Object.prototype.toString.call(e),gu=e=>{const o=Te(e),t=ql(o.value).slice(0,e.length||6);tn("render",{name:e.name,type:e.type,formValue:du(o.value),displayValue:t,length:e.length||6,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText});const{isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:c,inputRef:g,containerRef:s,mirrorSelectionStart:d,mirrorSelectionEnd:u,setMirrorSelectionStart:f,setMirrorSelectionEnd:m,setInputRef:p,handleFocus:y,handleBlur:k,handleKeyDown:b,handlePaste:w}=Il(e),C=h.useCallback(S=>{const x=ql(S).slice(0,e.length||6);tn("setValue",{name:e.name,incomingValue:S,nextValue:x,hasFormikOnChange:!!o.onChange,hasFormikOnChangeText:!!o.onChangeText}),o.onChange&&o.onChange(x),o.onChangeText&&o.onChangeText(x),e.onComplete&&x.length===(e.length||6)&&e.onComplete(x),g.current&&(g.current.value=x)},[o,e,g]),v=h.useCallback(S=>{var T,W,D;const x=typeof S=="string"?S:((T=S==null?void 0:S.currentTarget)==null?void 0:T.value)??((W=S==null?void 0:S.target)==null?void 0:W.value)??((D=S==null?void 0:S.nativeEvent)==null?void 0:D.text)??"",I=String(x).slice(0,e.length||6);tn("handleChange normalized",{name:e.name,raw:x,newValue:I}),C(I),g.current&&(g.current.value=I)},[e.length,C,g]);return r.jsx(Fl,{...e,...o,value:t,setValue:C,isFocused:n,setIsFocused:a,isHovered:l,setIsHovered:c,inputRef:g,containerRef:s,mirrorSelectionStart:d,mirrorSelectionEnd:u,setMirrorSelectionStart:f,setMirrorSelectionEnd:m,setInputRef:p,handleChange:v,handleFocus:y,handleBlur:k,handleKeyDown:b,handlePaste:w,stepValues:e.stepValues})},hu=e=>Array.isArray(e)?e:e==null?[]:[e],Ul=({name:e,uploadFile:o,onUploadSuccess:t,onUploadError:n,transformResponse:a,onMultipleFileSelect:l,onFileSelect:c,multiple:g=!0,...s})=>{const{setFieldValue:d,setFieldTouched:u,values:f}=_e.useFormikContext(),[m,p]=h.useState(!1),[y,k]=h.useState(0),b=h.useCallback(async v=>{if(!v||v.length===0)return;u(e,!0,!0),p(!0);const S=[];for(const x of v){k(0);try{const I=await o(x,W=>{k(W??0)}),T=a?a(I,x):I;S.push(T),t==null||t(x,T)}catch(I){n==null||n(x,I)}}if(S.length>0){const x=hu(_e.getIn(f,e));d(e,[...x,...S],!0),k(100)}else k(0);p(!1)},[e,n,t,u,d,a,o,f]),w=h.useCallback(async v=>{l==null||l(v),await b(v)},[b,l]),C=h.useCallback(async v=>{c==null||c(v),await b([v])},[b,c]);return r.jsx(Ar,{...s,multiple:g,onMultipleFileSelect:g?w:void 0,onFileSelect:g?void 0:C,isLoading:m,progress:y})};Ul.displayName="FormikUploader";const fu=e=>{let o=Te(e);o.selected=o.value;const t=Xa(e);return r.jsx(Ja,{...t,...o})},Gl=e=>{const[o,t]=h.useState(!1),[n,a]=h.useState(e);return{isHovered:o,setIsHovered:t,isToggle:n,setIsToggled:a}},uu={square:0,rounded:8,pill:999},mu=(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"}}),Yl=h.memo(({children:e,shape:o="rounded",variant:t="ghost",isHovered:n,setIsHovered:a,isDisabled:l,isToggle:c,setIsToggled:g,onToggle:s,views:d,backgroundColor:u,color:f,themeMode:m,...p})=>{const{getColor:y,themeMode:k}=i.useTheme(),b=m??k,C=y(l?"theme-disabled":u??f??"theme-primary",{themeMode:b}),S=h.useMemo(()=>mu(C),[C,b])[t],x=!!c,I=h.useCallback(()=>a(!0),[a]),T=h.useCallback(()=>{l||g(W=>{const D=!W;return s&&s(D),D})},[l,g,s]);return r.jsx(i.Center,{role:"Toggle",padding:o==="pill"?"8px 12px":"8px",width:"fit-content",cursor:l?"not-allowed":"pointer",borderRadius:uu[o],onClick:T,onMouseEnter:I,onMouseLeave:()=>a(!1),...S,...x&&{...t==="link"?{backgroundColor:"transparent"}:{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200"},color:C},...p,...d==null?void 0:d.container,children:e})}),pu=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:l,...c})=>{const g=Te(c),{isHovered:s,setIsHovered:d,isToggle:u,setIsToggled:f}=Gl(g.value??a);h.useEffect(()=>{f(g.value??a)},[g.value,a]);const m=p=>{f(p),g.onChange(p),l==null||l(p)};return r.jsx(Yl,{shape:o,variant:t,isDisabled:n,isHovered:s,setIsHovered:d,isToggle:u,setIsToggled:f,onToggle:m,...c,children:e})},Kl=()=>{const[e,o]=h.useState([]);return{activeToggles:e,setActiveToggles:o}},nn=({children:e,shape:o,variant:t,isDisabled:n,isToggled:a=!1,onToggle:l,...c})=>{const{isHovered:g,setIsHovered:s,isToggle:d,setIsToggled:u}=Gl(a);return h.useEffect(()=>{u(a)},[a]),r.jsx(Yl,{shape:o,variant:t,isDisabled:n,isHovered:g,setIsHovered:s,isToggle:d,setIsToggled:u,onToggle:l,...c,children:e})},Xl=({items:e,onToggleChange:o,activeToggles:t,setActiveToggles:n,shape:a="rounded",variant:l="ghost",views:c})=>{const g=h.useCallback((s,d)=>{n(u=>{let f;return d?f=u.includes(s)?u:[...u,s]:f=u.filter(m=>m!==s),o==null||o(f),f})},[o,n]);return r.jsx(i.Horizontal,{role:"ToggleGroup",display:"flex",gap:8,flexWrap:"wrap",...c==null?void 0:c.container,children:e.map(s=>r.jsx(nn,{role:`toggle-${s.id}`,shape:a,variant:l,isToggled:t.includes(s.id)||s.isActive,onToggle:d=>g(s.id,d),isDisabled:s.isDisabled,views:c==null?void 0:c.toggle,children:s.value},s.id))})},yu=({items:e,shape:o,variant:t,onToggleChange:n,...a})=>{const l=Te(a),{activeToggles:c,setActiveToggles:g}=Kl();h.useEffect(()=>{Array.isArray(l.value)&&g(l.value)},[l.value]);const s=d=>{g(d),l.onChange(d),n==null||n(d)};return r.jsx(Xl,{items:e,shape:o,variant:t,activeToggles:c,setActiveToggles:g,onToggleChange:s,...a})},Jl=["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"],Ql=e=>{const{value:o,defaultValue:t,onChange:n,isOpen:a,onOpen:l,onClose:c,closeOnSelect:g=!0}=e,[s,d]=h.useState(a??!1),[u,f]=h.useState(o??t),[m,p]=h.useState(""),y=h.useRef(null),k=h.useRef(null);h.useEffect(()=>{o!==void 0&&f(o)},[o]),h.useEffect(()=>{a!==void 0&&d(a)},[a]);const b=h.useMemo(()=>m?Jl.filter(x=>x.toLowerCase().includes(m.toLowerCase())).slice(0,100):Jl.slice(0,100),[m]);h.useEffect(()=>{const x=I=>{s&&y.current&&k.current&&!y.current.contains(I.target)&&!k.current.contains(I.target)&&w()};if(!(typeof document>"u"))return document.addEventListener("mousedown",x),()=>document.removeEventListener("mousedown",x)},[s]);const w=h.useCallback(()=>{a===void 0&&d(!1),c&&c()},[c,a]),C=h.useCallback(()=>{const x=!s;a===void 0&&d(x),x?(l&&l(),p("")):c&&c()},[s,l,c,a]),v=h.useCallback(x=>{o===void 0&&f(x),n&&n(x),g&&w()},[n,g,w,o]),S=h.useCallback(x=>{p(x)},[]);return{isOpen:s,selectedIcon:u,searchQuery:m,filteredIcons:b,handleToggle:C,handleIconSelect:v,handleSearchChange:S,handleClose:w,triggerRef:y,dropdownRef:k}},_o={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"}},bu={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"}},xu={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},ku={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"}},Zl=({label:e,placeholder:o="Select an icon",helperText:t,views:n={},size:a="md",shape:l="default",variant:c="default",error:g=!1,isDisabled:s=!1,isReadOnly:d=!1,showSearch:u=!0,isOpen:f,selectedIcon:m,searchQuery:p,filteredIcons:y,handleToggle:k,handleIconSelect:b,handleSearchChange:w,triggerRef:C,dropdownRef:v,handleClose:S,onChange:x,value:I,defaultValue:T,onOpen:W,onClose:D,closeOnSelect:P,...M})=>{const{getColor:E}=i.useTheme(),F={..._o.container,...n==null?void 0:n.container},j={..._o.trigger,...bu[a],...xu[l],...ku[c],...g&&{borderColor:"color-red-500"},...s&&{opacity:.6,cursor:"not-allowed"},...!s&&!d&&{_hover:{borderColor:"color-gray-300"}},...n==null?void 0:n.trigger},A={..._o.dropdown,...n==null?void 0:n.dropdown},V={..._o.iconGrid,...n==null?void 0:n.iconGrid};return r.jsxs(i.View,{...F,...M,children:[e&&r.jsx(i.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}),r.jsxs(i.View,{ref:C,onClick:s||d?void 0:k,...j,children:[r.jsx(i.Horizontal,{alignItems:"center",gap:8,width:"100%",children:m?r.jsxs(i.Horizontal,{alignItems:"center",gap:8,width:"100%",children:[r.jsx(rr,{name:m,widthHeight:16}),r.jsx(i.Text,{color:"color-gray-800",fontSize:"inherit",style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:m})]}):r.jsx(i.Text,{color:"color-gray-500",fontSize:"inherit",children:o})}),!d&&!s&&r.jsx(ye,{widthHeight:16,color:"color-gray-500",orientation:f?"up":"down"})]}),f&&r.jsxs(i.View,{ref:v,...A,children:[u&&r.jsx(i.View,{..._o.searchInput,...n==null?void 0:n.searchInput,children:r.jsx(Pe,{placeholder:"Search icons...",value:p,onChange:H=>w(H),size:"sm",autoFocus:!0})}),r.jsx(i.View,{...V,children:y.length>0?y.map(H=>r.jsx(i.View,{..._o.iconItem,onClick:()=>b(H),title:H,_hover:{backgroundColor:"color-gray-50",transform:"scale(1.05)"},backgroundColor:m===H?"#EFF6FF":"transparent",borderWidth:m===H?"1px":"0px",borderStyle:"solid",borderColor:m===H?"#BFDBFE":"transparent",...n==null?void 0:n.iconItem,children:r.jsx(rr,{name:H,widthHeight:20})},H)):r.jsx(i.View,{gridColumn:"1 / -1",padding:"20px",textAlign:"center",color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:"No icons found"})})})]}),t&&r.jsx(i.Text,{color:g?"color-red-500":"color-gray-600",marginTop:"4px",...n==null?void 0:n.helperText,children:t})]})},Cu=e=>{const o=Te(e),t={...e,value:o.value??e.value??e.defaultValue},n=Ql(t),a=l=>{n.handleIconSelect(l),o.onChange(l)};return r.jsx(Zl,{...n,...t,handleIconSelect:a})},Rl={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"},ei=["👍","❤️","🙌","😂","😢","😮"],wu=[{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"]}],oi=Array.from(wu.reduce((e,o)=>{const t=e.get(o.emoji);return e.set(o.emoji,{...o,keywords:Array.from(new Set([...(t==null?void 0:t.keywords)||[],...o.keywords]))}),e},new Map).values()),ri=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],ti=e=>e.toLowerCase().replace(/œ/g,"oe").replace(/æ/g,"ae").normalize("NFD").replace(/[\u0300-\u036f]/g,""),Su=e=>e&&typeof e.emoji=="string"&&typeof e.name=="string"&&ri.includes(e.category)&&Array.isArray(e.keywords)&&e.keywords.every(o=>typeof o=="string"),ni=e=>{const{value:o,defaultValue:t="",onChange:n,onEmojiSelect:a,isOpen:l,onOpen:c,onClose:g,closeOnSelect:s=!0,maxRecentEmojis:d=16,mode:u="picker",showRecentEmojis:f=u!=="reaction",enabledCategories:m=ri,customEmojis:p=[],isDisabled:y,isReadOnly:k}=e,[b,w]=h.useState(!1),C=l??b,[v,S]=h.useState(t),x=o??v,[I,T]=h.useState(""),[W,D]=h.useState(m.find(N=>N!=="recent")||"recent"),[P,M]=h.useState([]),[E,F]=h.useState(u!=="reaction"),j=h.useRef(null),A=h.useRef(null),V={...Rl,...e.labels},H=h.useMemo(()=>Array.from(new Map([...oi,...p].map(N=>[N.emoji,N])).values()),[p]),O=h.useMemo(()=>(e.quickEmojis??ei).map(N=>H.find(Q=>Q.emoji===N)??{emoji:N,name:N,category:"symbols",keywords:[]}),[H,e.quickEmojis]),G=h.useMemo(()=>{const N=H.filter(Q=>m.includes(Q.category));if(I.trim()){const Q=ti(I.trim());return N.filter(B=>ti(`${B.emoji} ${B.name} ${B.keywords.join(" ")}`).includes(Q))}return W==="recent"?P.filter(Q=>m.includes(Q.category)):N.filter(Q=>Q.category===W)},[H,W,P,I,m]);h.useEffect(()=>{if(!(!f||typeof localStorage>"u"))try{const N=JSON.parse(localStorage.getItem("emojiPicker-recentEmojis")||"[]");Array.isArray(N)&&M(N.filter(Su).slice(0,d))}catch{}},[f,d]),h.useEffect(()=>{m.includes(W)||D(m.find(N=>N!=="recent")||"recent")},[m,W]);const U=h.useCallback(()=>{w(!1),g==null||g()},[g]),$=h.useCallback(()=>{if(!(y||k)){if(C){U();return}w(!0),T(""),F(u!=="reaction"),D(f&&P.length&&m.includes("recent")?"recent":m.find(N=>N!=="recent")||"recent"),c==null||c()}},[C,y,k,U,u,f,P.length,m,c]),_=h.useCallback(N=>{if(!(y||k)){if(S(N.emoji),f){const Q=[N,...P.filter(B=>B.emoji!==N.emoji)].slice(0,Math.max(0,d));if(M(Q),typeof localStorage<"u")try{localStorage.setItem("emojiPicker-recentEmojis",JSON.stringify(Q))}catch{}}n==null||n(N.emoji),a==null||a(N),s&&U()}},[y,k,f,P,d,n,a,s,U]);return h.useEffect(()=>{if(!C||typeof document>"u"||typeof document.addEventListener!="function")return;const N=Q=>{var B,L;(B=A.current)!=null&&B.contains&&((L=j.current)!=null&&L.contains)&&!A.current.contains(Q.target)&&!j.current.contains(Q.target)&&U()};return document.addEventListener("mousedown",N),()=>document.removeEventListener("mousedown",N)},[C,U]),{isOpen:C,selectedEmoji:x,recentEmojis:P,searchQuery:I,activeCategory:W,filteredEmojis:G,handleToggle:$,handleEmojiSelect:_,handleSearchChange:T,handleCategoryChange:N=>{D(N),T("")},handleClose:U,triggerRef:j,dropdownRef:A,expanded:E,setExpanded:F,quickEmojiData:O,text:V}},yo={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"}},vu={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"}},Tu={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Iu={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"}},Fu={recent:"🕒",smileys:"😀",people:"👤",animals:"🐶",food:"🍎",activities:"⚽",travel:"🚗",objects:"💡",symbols:"❤️",flags:"🏁"},ai=({id:e,name:o,label:t,placeholder:n,helperText:a,views:l={},size:c="md",shape:g="default",variant:s="default",error:d=!1,isDisabled:u=!1,isReadOnly:f=!1,showSearch:m=!0,showCategories:p=!0,showRecentEmojis:y=!0,enabledCategories:k=["recent","smileys","people","animals","food","activities","travel","objects","symbols","flags"],isOpen:b,selectedEmoji:w,recentEmojis:C,searchQuery:v,activeCategory:S,filteredEmojis:x,handleToggle:I,handleEmojiSelect:T,handleSearchChange:W,handleCategoryChange:D,handleClose:P,triggerRef:M,dropdownRef:E,mode:F="picker",trigger:j,quickEmojis:A,selectedEmojis:V=[],expanded:H,setExpanded:O,quickEmojiData:G,text:U,labels:$,onChange:_,onOpen:N,onClose:Q,onEmojiSelect:B,customEmojis:L,closeOnSelect:X,maxRecentEmojis:Z,value:ee,defaultValue:ae,...re})=>{const ie=h.useId(),R=`${e||ie}-panel`,ne=h.useRef(!1),se=h.useCallback(q=>{var te;E.current=q,(te=q==null?void 0:q.querySelector("input,button"))==null||te.focus({preventScroll:!0})},[E]),[he,xe]=h.useState({top:0,left:0,width:320,maxHeight:400}),ge=k.filter(q=>q!=="recent"||y&&C.length>0);h.useLayoutEffect(()=>{var te,K,J,ue,fe;if(!b){ne.current&&(document.activeElement===document.body||(te=E.current)!=null&&te.contains(document.activeElement))&&((K=M.current)==null||K.focus({preventScroll:!0})),ne.current=!1;return}const q=()=>{var xt;const ce=(xt=M.current)==null?void 0:xt.getBoundingClientRect();if(!ce)return;const de=window.visualViewport,Se=Math.min(320,((de==null?void 0:de.width)??window.innerWidth)-16),De=(de==null?void 0:de.offsetLeft)??0,We=(de==null?void 0:de.offsetTop)??0,Ve=We+((de==null?void 0:de.height)??window.innerHeight)-8;if(ce.bottom<We||ce.top>Ve){P();return}const Gn=H?400:64,yt=ce.top-We-16,Ro=Ve-ce.bottom-8,bt=Ro<Gn&&yt>Ro,go=Math.min(Gn,Math.max(64,bt?yt:Ro));xe({width:Se,maxHeight:go,left:Math.max(De+8,Math.min(ce.left,De+((de==null?void 0:de.width)??window.innerWidth)-Se-8)),top:bt?Math.max(We+8,ce.top-go-8):ce.bottom+8})};return q(),ne.current||(ue=(J=E.current)==null?void 0:J.querySelector("input,button"))==null||ue.focus({preventScroll:!0}),ne.current=!0,window.addEventListener("scroll",q,!0),window.addEventListener("resize",q),(fe=window.visualViewport)==null||fe.addEventListener("resize",q),()=>{var ce;window.removeEventListener("scroll",q,!0),window.removeEventListener("resize",q),(ce=window.visualViewport)==null||ce.removeEventListener("resize",q)}},[b,H]);const le=q=>T(q),Y=(q,te=!1)=>r.jsx(i.View,{as:"button",type:"button","data-emoji-choice":q.emoji,"aria-label":q.name,"aria-pressed":F==="reaction"?V.includes(q.emoji):w===q.emoji,disabled:u||f,...yo.emoji,width:40,height:44,flex:te?1:void 0,borderWidth:0,backgroundColor:V.includes(q.emoji)?"color-blue-50":"transparent",_hover:{backgroundColor:"color-gray-100"},_focusVisible:{outline:"2px solid",outlineColor:"theme-primary"},...l.emoji,onClick:()=>le(q),title:q.name,children:q.emoji},q.emoji);return r.jsxs(i.View,{id:e,...yo.container,...l.container,...re,children:[t&&r.jsx(i.Text,{marginBottom:4,...l.label,children:t}),r.jsx(i.View,{ref:M,as:"button",type:"button",name:o,disabled:u||f,"aria-label":re["aria-label"]||t||(F==="reaction"?U.reaction:U.select),"aria-haspopup":"dialog","aria-expanded":b,"aria-controls":b?R:void 0,...yo.trigger,...vu[c],...Tu[g],...Iu[s],borderColor:d?"theme-error":"color-gray-200",opacity:u?.6:1,_focusVisible:{outline:"2px solid",outlineColor:"theme-primary"},...l.trigger,onClick:I,children:j??r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(i.Text,{children:F==="reaction"?"☺ +":w||n||U.select}),F!=="reaction"&&r.jsx(i.Text,{"aria-hidden":"true",children:b?"▴":"▾"})]})}),b&&r.jsx(or,{children:r.jsxs(i.View,{ref:se,id:R,role:"dialog","aria-label":F==="reaction"?U.reaction:U.select,...yo.dropdown,...l.dropdown,position:"fixed",top:he.top,left:he.left,right:"auto",width:he.width,minWidth:0,maxHeight:he.maxHeight,overflowY:"auto",padding:F==="reaction"&&!H?8:12,zIndex:1100,onKeyDown:q=>{var ce,de,Se,De,We,Ve;if(q.key==="Escape"){q.preventDefault(),q.stopPropagation(),P(),(ce=M.current)==null||ce.focus();return}const te=Array.from(((de=E.current)==null?void 0:de.querySelectorAll("button:not(:disabled)"))||[]),K=te.indexOf(document.activeElement);if(q.key==="Tab"){(q.shiftKey&&K<=0||!q.shiftKey&&K===te.length-1)&&P();return}if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(q.key)||!te.length||q.target.tagName==="INPUT"&&q.key!=="ArrowDown")return;q.preventDefault();const J=(Se=document.activeElement)==null?void 0:Se.closest("[data-emoji-grid]"),ue=["ArrowUp","ArrowDown"].includes(q.key)&&J?8:1,fe=q.key==="Home"?0:q.key==="End"?te.length-1:(K+(["ArrowLeft","ArrowUp"].includes(q.key)?-ue:ue)+te.length)%te.length;(De=te[fe])==null||De.focus(),(Ve=(We=te[fe])==null?void 0:We.scrollIntoView)==null||Ve.call(We,{block:"nearest"})},children:[F==="reaction"&&r.jsxs(i.Horizontal,{gap:2,children:[G.map(q=>Y(q,!0)),r.jsx(i.View,{as:"button",type:"button",disabled:u||f,"aria-label":U.more,"aria-expanded":H,minWidth:40,minHeight:44,borderWidth:0,borderRadius:8,onClick:()=>O(!H),children:"+"})]}),H&&r.jsxs(r.Fragment,{children:[m&&r.jsx(i.View,{marginBottom:8,...l.searchInput,children:r.jsx(Pe,{value:v,onChange:W,placeholder:U.search,"aria-label":U.search,isDisabled:u||f,size:"sm"})}),p&&r.jsx(i.View,{role:"tablist","aria-label":U.select,...yo.categoryTabs,...l.categoryTabs,children:ge.map(q=>r.jsx(i.View,{as:"button",type:"button",role:"tab","aria-label":U[q],"aria-selected":q===S,disabled:u||f,title:U[q],...yo.categoryTab,borderWidth:0,minHeight:44,padding:8,backgroundColor:q===S?"color-blue-50":"transparent",...l.categoryTab,onClick:()=>D(q),children:Fu[q]},q))}),r.jsxs(i.View,{"data-emoji-grid":"true",role:"group","aria-label":U.select,...yo.emojiGrid,gridTemplateColumns:"repeat(8, minmax(0, 1fr))",...l.emojiGrid,children:[x.map(q=>Y(q)),!x.length&&r.jsx(i.Text,{gridColumn:"1 / -1",children:v?U.empty:U.categoryEmpty})]})]})]})}),a&&r.jsx(i.Text,{color:d?"theme-error":"theme-muted",...l.helperText,children:a})]})},zu=e=>{const o=Te(e),t={...e,value:o.value??e.value??e.defaultValue,onChange:o.onChange},n=ni(t),a=l=>{n.handleEmojiSelect(l)};return r.jsx(ai,{...n,...t,handleEmojiSelect:a})},Mu=({files:e,onRemove:o,maxHeight:t="120px",views:n={}})=>{if(e.length===0)return null;const a=h.useCallback(l=>l<1024?`${l} B`:l<1024*1024?`${(l/1024).toFixed(1)} KB`:`${(l/(1024*1024)).toFixed(1)} MB`,[]);return r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:t,overflowY:"auto",...n==null?void 0:n.container,children:e.map((l,c)=>{const g=l.url||"",s=l.type.startsWith("image/"),d=l.type.startsWith("video/"),u=l.type.startsWith("audio/");return r.jsx(i.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:r.jsxs(He,{children:[r.jsx(He.Trigger,{children:r.jsxs(i.View,{position:"relative",children:[s&&g&&r.jsx(i.Image,{src:g,alt:l.name,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),d&&g&&r.jsx(i.View,{as:"video",src:g,alt:l.name,controls:!1,muted:!0,width:"60px",height:"60px",objectFit:"cover",borderRadius:"8px"}),u&&r.jsx(i.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(Wo,{widthHeight:24,color:"color-black"})}),!s&&!d&&!u&&r.jsx(i.Center,{width:"60px",height:"60px",backgroundColor:"color-gray-100",borderRadius:"8px",children:r.jsx(ho,{widthHeight:24,color:"color-black"})}),o&&r.jsx(i.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:f=>{f.stopPropagation(),o(c)},"aria-label":`Remove ${l.name}`,children:"×"})]})}),r.jsxs(He.Content,{children:[s&&g&&r.jsx(i.Image,{src:g,alt:l.name,maxWidth:"300px"}),d&&g&&r.jsx(i.View,{as:"video",src:g,controls:!0,maxWidth:"300px"}),u&&g&&r.jsx(i.View,{as:"audio",src:g,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",fontSize:12,...n==null?void 0:n.name,children:[l.name," (",a(l.size),")"]})]})]})},c)})})},li=e=>{const o=Ce("slider",e),t=$l(o);return r.jsx(Nl,{...o,...t})},ju=({url:e,type:o,name:t,onOpen:n})=>{const a=o.toLowerCase(),l=a.startsWith("image"),c=a.startsWith("video"),g=a.startsWith("audio"),s=()=>{n&&n()};return r.jsxs(i.View,{width:"60px",height:"60px",flexShrink:0,borderRadius:"4px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:"color-gray-200",cursor:"pointer",onClick:s,children:[l&&r.jsx(i.Image,{src:e,alt:t,width:"100%",height:"100%",objectFit:"cover"}),c&&r.jsx(i.View,{as:"video",src:e,controls:!0,width:"100%",height:"100%",style:{objectFit:"cover"},onClick:d=>d.stopPropagation()}),g&&r.jsx(i.View,{as:"audio",controls:!0,src:e,width:"100%",onClick:d=>d.stopPropagation()}),!l&&!c&&!g&&r.jsx(ho,{widthHeight:24,color:"color-gray-600"})]})},lo=Fo.create(e=>({modals:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,modals:[...a.modals,{name:o,props:{...t,isVisible:!0},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,modals:t.modals.filter(n=>n.name!==o)}:{modals:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),Wu=(e,o={},t={})=>{lo.getState().show(e,o,t),lo.getState().onShow(e,o)},an=e=>{lo.getState().onHide(e),lo.getState().hide(typeof e=="string"?e:void 0)},Eu={square:{borderRadius:0},rounded:{borderRadius:8}},Au={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"}},Hu={xs:12,sm:16,md:20,lg:24,xl:28},ln={body:{fontSize:"16px",fontWeight:"400",color:"color-gray-700"}},ii=h.memo(({children:e,blur:o,isOpen:t=!1,isClosePrevented:n=!1,onClose:a=()=>{},position:l="center",views:c,...g})=>{const s=h.useCallback(()=>{n||a()},[n,a]);return r.jsx(i.Center,{position:"fixed",top:0,left:0,width:"100%",height:"100%",zIndex:1e3,onClick:s,visibility:t?"visible":"hidden",opacity:t?1:0,transition:"opacity 0.2s ease, visibility 0.2s ease",...c==null?void 0:c.container,children:r.jsx(i.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:s,...Au[l],...g,...c==null?void 0:c.view,children:e})})}),Vu={boxShadow:"0px 4px 16px rgba(0, 0, 0, 0.15)"},Pu={elevation:5,shadowColor:"rgba(0, 0, 0, 0.15)",shadowOffset:{width:0,height:4},shadowOpacity:1,shadowRadius:16},Du=h.memo(({children:e,shadow:o,isFullScreen:t=!1,shape:n="rounded",views:a,isOpen:l=!0,position:c,...g})=>{const s=typeof document!==void 0?Vu:Pu,d=h.useCallback(u=>{u&&u.stopPropagation&&u.stopPropagation()},[]);return r.jsx(i.Vertical,{cursor:"default",backgroundColor:"color-white",width:t?"100%":600,height:t?"100%":"fit-content",onClick:d,transition:"opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease",opacity:l?1:0,transform:l?"translateY(0)":"translateY(8px)",...o||s,...Eu[n],media:{mobile:{width:"90%",maxWidth:"100%",margin:"16px"}},...g,...a==null?void 0:a.container,children:e})}),$u=h.memo(({children:e,buttonColor:o="theme-primary",iconSize:t="md",buttonSize:n,buttonPosition:a="right",views:l,onClose:c,...g})=>{const s=c||an,d=r.jsx(i.View,{onClick:()=>s(),children:r.jsx($e,{widthHeight:Hu[n??t],color:o})});return r.jsxs(i.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}},...g,...l==null?void 0:l.header,children:[a==="left"&&d,e,a==="right"&&d]})}),Lu=h.memo(({children:e,views:o,...t})=>r.jsx(i.View,{paddingVertical:16,paddingHorizontal:24,fontSize:ln.body.fontSize,fontWeight:ln.body.fontWeight,color:ln.body.color,media:{mobile:{paddingVertical:12,paddingHorizontal:16,fontSize:"14px"}},...t,...o==null?void 0:o.view,children:e})),Bu=h.memo(({children:e,views:o,...t})=>r.jsx(i.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}},...t,...o==null?void 0:o.container,children:e})),cn=({modals:e,onShow:o,onHide:t})=>{const n=lo(a=>a.modals);return h.useEffect(()=>{o&&lo.getState().setOnShow(o)},[o]),h.useEffect(()=>{t&&lo.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(h.Fragment,{children:n.map((a,l)=>{const c=e[a.name];return c?r.jsx(ii,{isOpen:a.props.isVisible,onClose:()=>an(a.name),blur:5,...a.overlayProps,style:{zIndex:1e3+l},children:r.jsx(c,{...a.props})},l):(console.error(`${a.name} modal doesn't exist`),null)})})},bo=({children:e})=>r.jsx(r.Fragment,{children:e});bo.Overlay=ii,bo.Container=Du,bo.Header=$u,bo.Body=Lu,bo.Footer=Bu,bo.Layout=cn;const ci={xs:"320px",sm:"380px",md:"480px",lg:"640px",xl:"768px",full:"100%"},_u={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"}},sn=({isOpen:e,onClose:o,isClosePrevented:t,blur:n,children:a,...l})=>{const c=()=>{t||o()};return h.useEffect(()=>{const g=s=>{s.key==="Escape"&&e&&!t&&o()};return e&&document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[e,t,o]),r.jsx(i.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:c,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",...l,children:a})},dn=({placement:e="right",size:o="md",isOpen:t=!1,children:n,...a})=>{const l=u=>{u.stopPropagation()},g=e==="top"||e==="bottom"?{height:o==="full"?"100vh":ci[o]||o,maxHeight:"100vh"}:{width:o==="full"?"100vw":ci[o]||o,maxWidth:"100vw"},s=e==="left"?"0 12px 12px 0":e==="right"?"12px 0 0 12px":e==="top"?"0 0 12px 12px":"12px 12px 0 0",d=t?"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 r.jsx(i.Vertical,{position:"absolute",backgroundColor:"color-white",borderRadius:s,..._u[e],...g,onClick:l,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})},Ou=({children:e,onClose:o,buttonPosition:t="right",...n})=>{const a=o&&r.jsx(i.View,{onClick:o,cursor:"pointer",padding:8,children:r.jsx($e,{widthHeight:20,color:"color-gray-500"})});return r.jsxs(i.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderBottomWidth:"1px",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:t==="none"?"center":"space-between",...n,children:[t==="left"&&a,e,t==="right"&&a]})},Nu=({children:e,...o})=>r.jsx(i.Vertical,{padding:24,flex:1,overflowY:"auto",...o,children:e}),qu=({children:e,...o})=>r.jsx(i.Horizontal,{paddingHorizontal:24,paddingVertical:16,borderTopWidth:"1px",borderTopColor:"color-gray-200",alignItems:"center",justifyContent:"flex-end",gap:12,...o,children:e}),io=Fo.create(e=>({drawers:[],onHide:o=>o,onShow:(o,t)=>({name:o,props:t}),show:(o,t={},n={})=>{e(a=>({...a,drawers:[...a.drawers,{name:o,props:{...t,isOpen:!1},overlayProps:n}]}))},hide:o=>{e(t=>o?{...t,drawers:t.drawers.filter(n=>n.name!==o)}:{drawers:[]})},setOnHide:o=>{e(t=>({...t,onHide:o}))},setOnShow:o=>{e(t=>({...t,onShow:o}))}})),Uu=(e,o={},t={})=>{const n=io.getState();n.hide(e),n.show(e,o,t),n.onShow(e,o),queueMicrotask(()=>{io.setState(a=>({drawers:a.drawers.map(l=>l.name===e?{...l,props:{...l.props,isOpen:!0}}:l)}))})},si=e=>{io.getState().onHide(e),io.getState().hide(typeof e=="string"?e:void 0)},Gu=({drawers:e,onShow:o,onHide:t})=>{const n=io(a=>a.drawers);return h.useEffect(()=>{o&&io.getState().setOnShow(o)},[o]),h.useEffect(()=>{t&&io.getState().setOnHide(t)},[t]),n.length===0?null:r.jsx(h.Fragment,{children:n.map((a,l)=>{var p;const c=e[a.name];if(!c)return console.error(`${a.name} drawer doesn't exist`),null;const{placement:g,size:s,isClosePrevented:d,blur:u,containerProps:f,...m}=a.props||{};return r.jsx(sn,{isOpen:a.props.isOpen,onClose:()=>si(a.name),isClosePrevented:d,blur:u,...a.overlayProps,style:{zIndex:1e3+l,...((p=a.overlayProps)==null?void 0:p.style)||{}},children:r.jsx(dn,{placement:g,size:s,isOpen:a.props.isOpen,...f||{},children:r.jsx(h.Suspense,{fallback:null,children:r.jsx(c,{...m})})})},l)})})},xo=({isOpen:e,onClose:o,placement:t="right",size:n="md",isClosePrevented:a,children:l,...c})=>r.jsx(sn,{isOpen:e,onClose:o,isClosePrevented:a,...c,children:r.jsx(dn,{placement:t,size:n,isOpen:e,children:l})});xo.Overlay=sn,xo.Container=dn,xo.Header=Ou,xo.Body=Nu,xo.Footer=qu,xo.Layout=Gu;const di=({behavior:e,keyboardVerticalOffset:o,dismissOnTap:t,enabled:n,children:a,...l})=>r.jsx(i.View,{flex:1,width:"100%",...l,children:a}),Yu=({header:e,footer:o,children:t,isLoading:n=!1,safe:a=!0,scrollable:l=!0,dismissKeyboardOnTap:c=!0,keyboardVerticalOffset:g=0,views:s={},backgroundColor:d="color-white",...u})=>{const f=a?i.SafeArea:i.View,m=i.isBrowser()?{}:{keyboardShouldPersistTaps:"handled",showsVerticalScrollIndicator:!1,contentContainerStyle:{flexGrow:1}},p=n?r.jsx(i.Center,{flex:1,width:"100%",...s.content,children:r.jsx(to,{})}):l?r.jsx(i.Scroll,{flex:1,width:"100%",...m,...s.content,children:t}):r.jsx(i.View,{flex:1,width:"100%",...s.content,children:t});return r.jsxs(f,{flex:1,height:"100%",width:"100%",flexDirection:"column",backgroundColor:d,...u,...s.container,children:[e!=null&&r.jsx(i.View,{width:"100%",flexShrink:0,...s.header,children:e}),r.jsxs(di,{flexDirection:"column",dismissOnTap:c,keyboardVerticalOffset:g,children:[p,o!=null&&r.jsx(i.View,{width:"100%",flexShrink:0,...s.footer,children:o})]})]})},Qr=Fo.create(e=>({started:!1,loaded:!1,setStarted:(o=!0)=>e({started:o}),setLoaded:(o=!0)=>e({loaded:o}),reset:()=>e({started:!1,loaded:!1})})),Ku=(e=!0)=>Qr.getState().setLoaded(e),Xu=(e=!0)=>Qr.getState().setStarted(e),Ju=({logo:e,logoSrc:o,loader:t,showLoader:n=!0,duration:a=600,isLoaded:l,onHidden:c,backgroundColor:g="color-white",children:s,...d})=>{const u=Qr(v=>v.loaded),f=l!==void 0?l:u,[m,p]=h.useState(!0),[y,k]=h.useState(!1);if(h.useEffect(()=>{if(!f||y)return;k(!0);const v=setTimeout(()=>{p(!1),c==null||c()},a);return()=>clearTimeout(v)},[f,y,a,c]),!m)return null;const b=i.isBrowser()?"fixed":"absolute",w=y?i.Animation.fadeOut({duration:`${a}ms`}):void 0,C=e??(o?r.jsx(i.Image,{src:o,width:120,height:120,alt:"logo"}):null);return r.jsxs(i.Center,{position:b,top:0,left:0,right:0,bottom:0,zIndex:9999,backgroundColor:g,animate:w,...d,children:[r.jsxs(i.Vertical,{alignItems:"center",gap:24,children:[C,n&&(t??r.jsx(to,{}))]}),s]})},Xe=Fo.create((e,o)=>({stack:[{path:"/",params:{}}],index:0,push:(t,n={})=>e(a=>{const l=a.stack.slice(0,a.index+1);return l.push({path:t,params:n}),{stack:l,index:l.length-1}}),replace:(t,n={})=>e(a=>{const l=a.stack.slice();return l[a.index]={path:t,params:n},{stack:l}}),back:()=>{const{index:t}=o();return t<=0?!1:(e({index:t-1}),!0)},go:t=>e(n=>({index:Math.min(Math.max(n.index+t,0),n.stack.length-1)})),reset:(t,n={})=>e({stack:[{path:t,params:n}],index:0})})),Qu=(e,o)=>Xe.getState().push(e,o),Zu=()=>Xe.getState().back(),gn=()=>{const e=Xe(s=>s.stack),o=Xe(s=>s.index),t=Xe(s=>s.push),n=Xe(s=>s.replace),a=Xe(s=>s.back),l=Xe(s=>s.go),c=Xe(s=>s.reset),g=e[o]||{path:"/",params:{}};return{path:g.path,params:g.params,stack:e,index:o,canGoBack:o>0,push:t,replace:n,back:a,go:l,reset:c,navigate:t}},gi=(e,o)=>{const t=e.split("/").filter(Boolean),n=o.split("/").filter(Boolean);if(t.length!==n.length)return null;const a={};for(let l=0;l<t.length;l+=1){const c=t[l];if(c.startsWith(":"))a[c.slice(1)]=decodeURIComponent(n[l]);else if(c!==n[l])return null}return a},Ru=e=>Array.isArray(e)?e:Object.entries(e).map(([o,t])=>({path:o,component:t})),em=({routes:e,notFound:o})=>{const{path:t,params:n}=gn();for(const a of Ru(e)){const l=gi(a.path,t);if(l){const c=a.component;return r.jsx(c,{...n,...l})}}return o?r.jsx(o,{}):null},om=({routes:e,notFound:o,initialPath:t,syncBrowserHistory:n=!1})=>{const{path:a,push:l,back:c,reset:g}=gn(),s=h.useRef(!1);return i.useMount(()=>{t&&g(t)}),h.useEffect(()=>{if(!(!n||typeof window>"u")){if(s.current){s.current=!1;return}try{window.history.pushState({path:a},"",a)}catch{}}},[a,n]),h.useEffect(()=>{if(!n||typeof window>"u")return;const d=()=>{s.current=!0,c()||(s.current=!1)};return window.addEventListener("popstate",d),()=>window.removeEventListener("popstate",d)},[n,c,l]),r.jsx(em,{routes:e,notFound:o})},rm=(e=null,o=[])=>{const[t,n]=h.useState(e),[a,l]=h.useState(o),c=h.useRef({});return{activeItemId:t,setActiveItemId:n,expandedItemIds:a,toggleExpandedItem:d=>{l(u=>u.includes(d)?u.filter(m=>m!==d):[...u,d])},isItemExpanded:d=>a.includes(d),triggerRefs:c}},hn={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"}}}},fn={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"}},hi={horizontal:{flexDirection:"row",gap:"8px",media:{mobile:{flexDirection:"column",gap:"4px"}}},vertical:{flexDirection:"column",gap:"4px"}},Oo={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"}},fi=h.createContext({activeItemId:null,setActiveItemId:()=>{},expandedItemIds:[],toggleExpandedItem:()=>{},isItemExpanded:()=>!1,orientation:"vertical",size:"md",variant:"default",triggerRefs:{current:{}}}),tm=({children:e,value:o})=>r.jsx(fi.Provider,{value:o,children:e}),mr=()=>{const e=h.useContext(fi);if(!e)throw new Error("useNavigationMenuContext must be used within a NavigationMenuProvider");return e},un=({children:e,views:o})=>{const{orientation:t}=mr(),n=t==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(n,{width:"100%",...hi[t],transition:"background-color 0.2s ease, border-color 0.2s ease",borderRadius:"8px",...o==null?void 0:o.container,children:e})},ui=h.createContext({itemValue:null,isDisabled:!1}),nm=()=>{const e=h.useContext(ui);if(!e)throw new Error("useNavigationMenuItemContext must be used within a NavigationMenuItem");return e},mn=({item:e,value:o,isDisabled:t=!1,children:n,views:a})=>{var w;const{activeItemId:l,setActiveItemId:c,orientation:g,size:s,variant:d,onItemActivate:u}=mr(),f=(e==null?void 0:e.id)||o,m=l===f,p=(e==null?void 0:e.items)&&e.items.length>0,y=(e==null?void 0:e.disabled)||t,k=()=>{y||f&&(c(f),u&&u(f))},b=g==="horizontal"?i.Horizontal:i.Vertical;return n?r.jsx(ui.Provider,{value:{itemValue:f||null,isDisabled:y},children:r.jsx(i.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",...hn[s],...fn[d],...m?Oo.active:{},_hover:y?{}:Oo.hover,...a==null?void 0:a.item,children:n})}):p&&e?r.jsxs(b,{width:"100%",flexDirection:"column",position:"relative",...a==null?void 0:a.item,children:[r.jsxs(mi,{itemId:e.id,disabled:e.disabled,views:a,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}),r.jsx(pi,{itemId:e.id,children:r.jsx(un,{children:(w=e.items)==null?void 0:w.map(C=>r.jsx(mn,{item:C},C.id))})})]}):e?r.jsxs(i.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",...hn[s],...fn[d],...m?Oo.active:{},_hover:e.disabled?{}:Oo.hover,...a==null?void 0:a.item,children:[e.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:e.icon}),e.label]}):null},mi=({children:e,itemId:o,disabled:t,views:n})=>{const{activeItemId:a,toggleExpandedItem:l,isItemExpanded:c,size:g,variant:s,triggerRefs:d}=mr(),u=h.useRef(null),f=a===o,m=c(o);h.useEffect(()=>(u.current&&o&&(d.current[o]=u.current),()=>{o&&delete d.current[o]}),[o,d]);const p=y=>{y.preventDefault(),!t&&l(o)};return r.jsxs(i.View,{ref:u,onClick:p,cursor:t?"not-allowed":"pointer",opacity:t?.5:1,width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",borderRadius:8,transition:"background-color 0.2s ease",...hn[g],...fn[s],...f?Oo.active:{},_hover:t?{}:Oo.hover,...n==null?void 0:n.trigger,children:[r.jsx(i.View,{display:"flex",alignItems:"center",children:e}),r.jsx(i.View,{transition:"transform 0.2s ease",transform:m?"rotate(180deg)":"rotate(0deg)",...n==null?void 0:n.indicator,children:r.jsx(ye,{orientation:"down",widthHeight:16,color:"currentColor",filled:!0})})]})},pi=({children:e,itemId:o,views:t})=>{const{isItemExpanded:n,orientation:a,triggerRefs:l}=mr(),c=h.useRef(null),[g,s]=h.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),d=n(o);if(h.useEffect(()=>{if(d&&c.current&&o&&l.current[o]&&a==="horizontal"){const f=c.current.getBoundingClientRect(),m=l.current[o].getBoundingClientRect(),p=Math.max(f.width||200,200),y=Math.max(f.height||150,150),k=window.innerWidth,b=window.innerHeight,w={top:m.top,right:k-m.right,bottom:b-m.bottom,left:m.left},C=a==="horizontal"?[{placement:"bottom",space:w.bottom,fits:w.bottom>=y+8,x:m.left,y:m.bottom+8},{placement:"top",space:w.top,fits:w.top>=y+8,x:m.left,y:m.top-y-8},{placement:"right",space:w.right,fits:w.right>=p+8,x:m.right+8,y:m.top},{placement:"left",space:w.left,fits:w.left>=p+8,x:m.left-p-8,y:m.top}]:[{placement:"right",space:w.right,fits:w.right>=p+8,x:m.right+8,y:m.top},{placement:"left",space:w.left,fits:w.left>=p+8,x:m.left-p-8,y:m.top},{placement:"bottom",space:w.bottom,fits:w.bottom>=y+8,x:m.left,y:m.bottom+8},{placement:"top",space:w.top,fits:w.top>=y+8,x:m.left,y:m.top-y-8}],v=C.find(T=>T.fits);if(v){s({x:v.x,y:v.y,placement:v.placement});return}const S=C.reduce((T,W)=>W.space>T.space?W:T);let x=S.x,I=S.y;x+p>k&&(x=k-p-8),x<8&&(x=8),I+y>b&&(I=b-y-8),I<8&&(I=8),s({x,y:I,placement:S.placement})}},[d,a,o,l]),!d)return null;if(a==="vertical")return r.jsx(i.View,{paddingLeft:16,width:"100%",position:"relative",backgroundColor:"transparent",...t==null?void 0:t.container,children:e});const u={position:"fixed",left:g.x,top:g.y,zIndex:1e3};return r.jsx(i.View,{ref:c,role:"menu",minWidth:"200px",backgroundColor:"color-white",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:u,...t==null?void 0:t.container,children:e})},am=({href:e,children:o,views:t,underline:n,isExternal:a,iconSize:l,...c})=>{const{itemValue:g,isDisabled:s}=nm(),{activeItemId:d,setActiveItemId:u,onItemActivate:f}=mr(),m=d===g,p=y=>{if(s){y.preventDefault();return}g&&(u(g),f&&f(g)),c.onClick&&c.onClick(y)};return r.jsx(i.View,{as:"a",href:s?void 0:e,onClick:p,cursor:s?"not-allowed":"pointer",opacity:s?.5:1,width:"100%",display:"flex",alignItems:"center","aria-current":m?"page":void 0,"aria-disabled":s,"data-active":m?"":void 0,"data-disabled":s?"":void 0,...m?{fontWeight:"bold"}:{},...t==null?void 0:t.container,...c,children:o})},lm=({items:e,orientation:o,views:t,themeMode:n})=>{const a=o==="horizontal"?i.Horizontal:i.Vertical;return!e||e.length===0?null:r.jsx(a,{width:"100%",...hi[o],...t==null?void 0:t.container,children:r.jsx(un,{views:t,children:e.map(l=>r.jsx(mn,{item:l,views:t},l.id))})})},ko=e=>{const o=Ce("navigation",e),{items:t,children:n,orientation:a="vertical",size:l="md",variant:c="default",defaultActiveItemId:g=null,defaultExpandedItemIds:s=[],onItemActivate:d,views:u,...f}=o,{activeItemId:m,setActiveItemId:p,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:b,triggerRefs:w}=rm(g,s);return r.jsx(tm,{value:{activeItemId:m,setActiveItemId:p,expandedItemIds:y,toggleExpandedItem:k,isItemExpanded:b,orientation:a,size:l,variant:c,onItemActivate:d,triggerRefs:w},children:t?r.jsx(lm,{items:t,orientation:a,size:l,variant:c,views:u,...f}):n})};ko.List=un,ko.Item=mn,ko.Trigger=mi,ko.Content=pi,ko.Link=am;const yi={},bi=h.createContext({views:yi,onRowClick:()=>{}}),im=({children:e,views:o=yi,onRowClick:t})=>r.jsx(bi.Provider,{value:{views:o,onRowClick:t},children:e}),co=()=>h.useContext(bi),Ie={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"}}}};({...Ie.th},{...Ie.td}),{...Ie.tr},{...Ie.td},{...Ie.th},{...Ie.table},{...Ie.th},{...Ie.td},{...Ie.tr},{...Ie.tfoot},{...Ie.caption};const xi=({children:e})=>r.jsx(i.View,{width:"100%",style:{overflowX:"auto"},children:e}),ki=e=>{const{views:o}=co();return r.jsx(i.Element,{as:"table",...Ie.table,...o==null?void 0:o.table,...e,style:{borderCollapse:"collapse",...e.style||{}}})},Ci=e=>{const{views:o}=co();return r.jsx(i.Element,{as:"thead",textAlign:"left",...Ie.thead,...o==null?void 0:o.thead,...e})},wi=e=>{const{views:o}=co();return r.jsx(i.Element,{as:"th",whiteSpace:"nowrap",...Ie.th,...o==null?void 0:o.th,...e})},Zr=e=>{const{views:o,onRowClick:t}=co();return r.jsx(i.Element,{as:"tr",...Ie.tr,...o==null?void 0:o.tr,onClick:t,...e})},pn=({isFirstColumn:e,...o})=>{const{views:t}=co();return r.jsx(i.Element,{as:"td",whiteSpace:"nowrap",fontWeight:e?"500":"400",...Ie.td,...t==null?void 0:t.td,...o})},Si=e=>{const{views:o}=co();return r.jsx(i.Element,{as:"tbody",...Ie.tbody,...o==null?void 0:o.tbody,...e})},vi=e=>{const{views:o}=co();return r.jsx(i.Element,{as:"tfoot",...Ie.tfoot,...o==null?void 0:o.tfoot,...e})},Ti=e=>{const{views:o}=co();return r.jsx(i.Element,{as:"caption",...Ie.caption,...o==null?void 0:o.caption,...e})},cm=({data:e,columns:o,footer:t,caption:n,themeMode:a})=>{const l=Math.max(o.length*140,320);return r.jsx(xi,{children:r.jsxs(ki,{role:"Table",minWidth:l,children:[n&&r.jsx(Ti,{children:n}),r.jsx(Ci,{children:r.jsx(Zr,{children:o.map(c=>r.jsx(wi,{children:c.title},c.field))})}),r.jsx(Si,{children:e.map((c,g)=>r.jsx(Zr,{children:o.map((s,d)=>r.jsx(pn,{isFirstColumn:d===0,children:c[s.field]},s.field))},g))}),t&&r.jsx(vi,{children:r.jsx(Zr,{children:t.map((c,g)=>r.jsx(pn,{...c.props,children:c.value},g))})})]})})},ve=({children:e,views:o,onClick:t})=>{const n=Ce("table",{views:o,onClick:t});return r.jsx(im,{views:n.views,onRowClick:n.onClick,children:e})};ve.Head=Ci,ve.HeadCell=wi,ve.Body=Si,ve.Row=Zr,ve.Cell=pn,ve.Footer=vi,ve.Caption=Ti,ve.Container=ki,ve.Template=cm;const sm=(e,o,t)=>{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(u=>n(u)===o);if(d)return d}return e[0]}},[l,c]=h.useState(a()),g=t!==void 0?e.find(d=>n(d)===t):l,s=d=>{t===void 0&&c(d)};return h.useEffect(()=>{if(t!==void 0)return;const d=a(),u=l&&e.some(f=>n(f)===n(l));d&&(!u||o!==void 0&&l&&n(l)!==o)?c(d):!d&&l&&c(void 0)},[e,o]),{activeTab:g,setActiveTab:s}},dm=(e,o,t)=>{const[n,a]=h.useState(e||null);return{activeValue:o!==void 0?o:n,setActiveValue:g=>{o===void 0&&a(g),t&&t(g)}}},gm=h.memo(({tab:e,isActive:o,onClick:t,iconPosition:n="left",tabStyles:a,textStyles:l})=>{const c=()=>{switch(n){case"top":return"column";case"bottom":return"column-reverse";case"right":return"row-reverse";case"left":default:return"row"}},g=()=>["top","bottom"].includes(n)?"4px":"8px",s=e.icon&&h.isValidElement(e.icon)?h.cloneElement(e.icon,{strokeWidth:o?2.5:2}):e.icon;return r.jsxs(i.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:c(),gap:g(),onClick:t,"data-state":o?"active":"inactive",children:[s&&r.jsx(i.Element,{children:s},o?"active-icon":"inactive-icon"),r.jsxs(i.Element,{display:"grid",alignItems:"center",justifyContent:"center",children:[r.jsx(i.Text,{...l,fontWeight:"600",visibility:"hidden",gridColumn:"1",gridRow:"1","aria-hidden":"true",children:e.title}),r.jsx(i.Text,{...l,fontWeight:o?"600":"500",gridColumn:"1",gridRow:"1",children:e.title})]})]})}),yn=(e,o)=>{const t=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:t?"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}}},hm=({tabs:e=[],activeTab:o,handleTabClick:t,views:n={},renderTab:a,renderContent:l,variant:c="underline",iconPosition:g="left",keepMounted:s=!1})=>{const{themeMode:d}=i.useTheme(),u=yn(c,d);return o?r.jsxs(i.Vertical,{width:"100%",height:"100%",...n.container,children:[r.jsx(i.Horizontal,{alignItems:"center",...u.header,...n.headerTabs,children:e.map(f=>{const m=(f.value!==void 0?f.value:f.title)===(o.value!==void 0?o.value:o.title),p=()=>t(f);return a?a(f,m,p):r.jsx(gm,{tab:f,isActive:m,onClick:p,iconPosition:g,tabStyles:{...u.tab,...n.tab,...m?u.activeTab:{},...m?n.activeTab:{}},textStyles:{...u.text,...n.title,...m?u.activeText:{},...m?n.activeText:{}}},f.title)})}),r.jsx(i.View,{height:"100%",...u.content,...n.content,children:l?l(o):s?e.map(f=>{const m=f.value!==void 0?f.value:f.title,p=o.value!==void 0?o.value:o.title;return r.jsx(i.View,{display:m===p?"contents":"none",children:f.content},f.title)}):o.content})]}):null},Ii=h.createContext(null),bn=()=>{const e=h.useContext(Ii);if(!e)throw new Error("useTabsContext must be used within a Tabs component");return e},fm=h.memo(({children:e,views:o})=>{var g;const{themeMode:t}=i.useTheme(),{variant:n="underline"}=bn(),a=yn(n,t),l=jo("tabs"),c=Ge({container:(g=l.views)==null?void 0:g.headerTabs},o);return r.jsx(i.Horizontal,{alignItems:"center",...a.header,...c==null?void 0:c.container,children:e})}),um=h.memo(({value:e,children:o,disabled:t=!1,views:n})=>{var p,y;const{themeMode:a}=i.useTheme(),{activeValue:l,setActiveValue:c,variant:g="underline"}=bn(),s=l===e,d=yn(g,a),u=jo("tabs"),f=Ge({trigger:(p=u.views)==null?void 0:p.tab,activeState:(y=u.views)==null?void 0:y.activeTab},n),m=h.useCallback(()=>{t||c(e)},[t,e,c]);return r.jsx(i.View,{cursor:t?"not-allowed":"pointer",opacity:t?.6:1,display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.2s ease-in-out",...d.tab,...s?d.activeTab:{},_hover:t?{}:g==="underline"?{color:"theme-primary"}:{opacity:.9},onClick:m,...f==null?void 0:f.trigger,...s?f==null?void 0:f.activeState:{},children:r.jsx(i.View,{...d.text,...s?d.activeText:{},children:o})})}),mm=h.memo(({value:e,children:o,views:t})=>{const{activeValue:n}=bn();return n!==e?null:r.jsx(i.View,{width:"100%",padding:"24px",...t==null?void 0:t.content,children:o})}),pm=e=>{const o=Ce("tabs",e),{tabs:t,views:n,defaultValue:a,onTabChange:l,renderTab:c,renderContent:g,variant:s="underline",iconPosition:d="left",keepMounted:u=!1,value:f,onValueChange:m,children:p}=o,y=dm(a,f,m),k=sm(t||[],a,f);if(p)return r.jsx(Ii.Provider,{value:{...y,variant:s},children:p});if(t){const b=w=>{const C=v=>v.value!==void 0?v.value:v.title;(!k.activeTab||C(k.activeTab)!==C(w))&&(k.setActiveTab(w),l&&l(w))};return r.jsx(hm,{tabs:t,views:n,activeTab:k.activeTab,handleTabClick:b,renderTab:c,renderContent:g,variant:s,iconPosition:d,keepMounted:u})}return null},No=h.memo(pm);No.List=fm,No.Trigger=um,No.Content=mm;const ym=e=>{const{children:o,_isInView:t=!1,alternateHighlightText:n=[],alternateAnimation:a=!1,alternateDuration:l=3e3,highlightText:c,highlightTypewriter:g=!1,highlightSlide:s=!1,highlightSlideDuration:d=500,highlightSlideStagger:u=50,highlightSlideSequential:f=!0}=e,[m,p]=h.useState(o),[y,k]=h.useState(c);return h.useEffect(()=>{if(process.env.NODE_ENV==="production"||typeof o!="string"||!c)return;const b=Array.isArray(c)?c:[c];for(const w of b)typeof w=="string"&&w.length>0&&!o.toLowerCase().includes(w.toLowerCase())&&console.warn(`[Title] highlightText "${w}" 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,c]),h.useEffect(()=>{if(!a||n.length===0||!t||typeof o!="string"||typeof c!="string")return process.env.NODE_ENV!=="production"&&a&&n.length>0&&(typeof o!="string"||typeof c!="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."),p(o),k(c),()=>{};const b=o,w=c;if(!b.toLowerCase().includes(w.toLowerCase()))return process.env.NODE_ENV!=="production"&&console.warn(`[Title] \`children\` must contain \`highlightText\` ("${w}") — it is the placeholder the rotating words replace, e.g. \`<Title highlightText="apps" alternateHighlightText={["apps", "sites"]}>Build apps fast</Title>\`. Rotation is disabled.`),p(o),k(c),()=>{};let C=0;const v=x=>{const I=n[x],T=w.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),W=new RegExp(T,"gi"),D=b.replace(W,I);p(D),k(I)};v(C);const S=setInterval(()=>{C=(C+1)%n.length,v(C)},l);return()=>clearInterval(S)},[a,n,l,c,o,t]),{finalDisplayedText:m,activeHighlightTarget:y,highlightTypewriter:g,highlightSlide:s,highlightSlideDuration:d,highlightSlideStagger:u,highlightSlideSequential:f}},bm={xs:24,sm:32,md:48,lg:96,xl:110},xm={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}}}},km={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:()=>({})},Cm=({text:e,typingSpeed:o=50,pauseTime:t=500,onComplete:n,showCursor:a=!0,cursorColor:l="currentColor",textStyle:c,textComponent:g,as:s,...d})=>{const u=g||i.Text,f=Array.isArray(e)?e:[e],[m,p]=h.useState(f.map(()=>"")),[y,k]=h.useState(!1),[b,w]=h.useState(0),[C,v]=h.useState(0);h.useEffect(()=>{p(f.map(()=>"")),k(!1),w(0),v(0)},[e]),h.useEffect(()=>{if(y){n&&n();return}const x=f[b];if(C>=x.length){if(b>=f.length-1){k(!0);return}const T=setTimeout(()=>{w(W=>W+1),v(0)},t);return()=>clearTimeout(T)}const I=setTimeout(()=>{p(T=>{const W=[...T];return W[b]=x.substring(0,C+1),W}),v(T=>T+1)},o);return()=>clearTimeout(I)},[f,b,C,y,n,t,o]);const S=x=>{if(!x||typeof x!="string")return x;const I=x.split("|");return I.length===1?x:I.map((T,W)=>r.jsxs(h.Fragment,{children:[T,W<I.length-1&&r.jsx("br",{})]},W))};return r.jsx(r.Fragment,{children:m.map((x,I)=>r.jsxs(h.Fragment,{children:[S(x),a&&I===b&&!y&&r.jsx(u,{as:"span",display:"inline-block",width:"0.1em",height:"1em",backgroundColor:l,animation:"blink 1s step-end infinite",verticalAlign:"text-bottom",marginLeft:"1px",...c})]},I))})},wm=({text:e,duration:o=500,direction:t="up",stagger:n=50,sequential:a=!1,textStyle:l,as:c,wordProps:g,textComponent:s,...d})=>{const[u,f]=h.useState(e),[m,p]=h.useState("entering"),[y,k]=h.useState(0),b=s||i.Text,w=h.useRef(null),C=h.useRef(null);h.useEffect(()=>{e===u&&m==="visible"||e!==u&&(m==="entering"||m==="visible"?(w.current=e,p("exiting")):m==="exiting"&&(w.current=e))},[e,u,m]);const{lines:v,totalWordCount:S}=h.useMemo(()=>{const V=u.split("|").map(O=>O.trim().split(/\s+/).filter(G=>G.length>0)),H=V.reduce((O,G)=>O+G.length,0);return{lines:V,totalWordCount:H}},[u]),x=h.useMemo(()=>a?S*(o+n):(S-1)*n+o,[S,o,n,a]),I=h.useMemo(()=>a?S*(o+n):(S-1)*n+o,[S,o,n,a]);h.useEffect(()=>(C.current&&clearTimeout(C.current),m==="entering"?C.current=setTimeout(()=>{p("visible")},x+50):m==="exiting"&&(C.current=setTimeout(()=>{w.current!==null&&(f(w.current),w.current=null),k(A=>A+1),p("entering")},I+50)),()=>{C.current&&clearTimeout(C.current)}),[m,x,I]);const{style:T,...W}=g||{},D=t==="up",P=A=>a?A*(o+n):A*n,M=h.useMemo(()=>({display:"inline-block",position:"relative",verticalAlign:"bottom",whiteSpace:"nowrap",...l}),[l]),E=h.useMemo(()=>({display:"inline-flex",flexDirection:"column",alignItems:"center"}),[]),F=h.useMemo(()=>({display:"block",whiteSpace:"nowrap"}),[]);let j=0;return r.jsx(i.Element,{as:"span",style:M,...d,children:r.jsx("span",{style:E,children:v.map((A,V)=>r.jsx("span",{style:F,children:A.map((H,O)=>{const G=j++,U=P(G),$=O===A.length-1;let _;const N=`${o}ms`,Q=`${U}ms`;m==="entering"?_=D?i.Animation.slideInUp({duration:N,delay:Q,timingFunction:"ease-out",fillMode:"both"}):i.Animation.slideInDown({duration:N,delay:Q,timingFunction:"ease-out",fillMode:"both"}):m==="exiting"&&(_=D?{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(-100%)",opacity:0},duration:N,delay:Q,timingFunction:"ease-in",fillMode:"both"}:{from:{transform:"translateY(0)",opacity:1},to:{transform:"translateY(100%)",opacity:0},duration:N,delay:Q,timingFunction:"ease-in",fillMode:"both"});const B={...T,display:"inline-block",marginRight:$?0:"0.25em",transform:m==="visible"?"translateY(0)":void 0,opacity:m==="visible"?1:void 0};return r.jsx(b,{as:"span",animate:_,...W,...B,children:H},`${y}-${V}-${O}`)})},`line-${V}`))})})};function Fi(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}const xn=e=>{if(!e||typeof e!="string")return e;const o=e.split("|");return o.length===1?e:o.map((t,n)=>r.jsxs(h.Fragment,{children:[t,n<o.length-1&&r.jsx("br",{})]},n))},Sm=({children:e,highlightText:o,highlightStyle:t="solid",highlightColor:n="theme-primary",highlightSecondaryColor:a,size:l="lg",views:c,highlightAnimate:g,animate:s,animationLoop:d=1,highlightAnimationLoop:u=1,highlightTypewriter:f=!1,highlightTypewriterDuration:m=3e3,highlightSlide:p=!1,highlightSlideDuration:y=500,highlightSlideStagger:k=50,highlightSlideSequential:b=!0,centered:w=!1,level:C=1,themeMode:v,responsive:S,alternateHighlightText:x,alternateAnimation:I,alternateDuration:T,_isInView:W,...D})=>{const{ref:P,inView:M}=i.useInView(),{finalDisplayedText:E,activeHighlightTarget:F,highlightTypewriter:j,highlightSlide:A,highlightSlideDuration:V,highlightSlideStagger:H,highlightSlideSequential:O}=ym({children:e,highlightText:o,_isInView:M,highlightTypewriter:f,highlightSlide:p,highlightSlideDuration:y,highlightSlideStagger:k,highlightSlideSequential:b,alternateHighlightText:x,alternateAnimation:I,alternateDuration:T,...D}),G=bm[l],U={fontFamily:"Mulish, Inter, Geist, system-ui, sans-serif",fontWeight:l==="xl"?700:600,letterSpacing:l==="xl"?"-1.5px":"-0.01em"},$=km[t](n,a),_=(Z,ee)=>Z&&(Array.isArray(Z)?Z.map(ae=>({...ae,iterationCount:ee.toString()})):{...Z,iterationCount:ee.toString()}),N=_(s,d),Q=_(g,u),B=typeof E=="string"?E:typeof e=="string"?e:"",L={ref:P,animate:M?N:void 0,as:`h${C}`,fontSize:G,...w?{textAlign:"center"}:{},...S?xm[l]:{},...U},X=Z=>!M&&(j||A)?r.jsx("span",{style:{opacity:0},children:Z}):j?r.jsx(Cm,{text:Z,typingSpeed:Math.max(30,m/(Z.length*10)),cursorColor:"currentColor",...$}):A?r.jsx(wm,{text:Z,duration:V,stagger:H,sequential:O,direction:"up",wordProps:$}):xn(Z);if(typeof B=="string"&&F){const Z=Array.isArray(F)?new RegExp(`(${F.map(ie=>Fi(String(ie))).join("|")})`,"gi"):new RegExp(`(${Fi(String(F))})`,"gi"),ee=[];let ae=0,re;for(;re=Z.exec(B);)re.index>ae&&ee.push(B.substring(ae,re.index)),ee.push({highlight:!0,text:re[0]}),ae=re.index+re[0].length;return ae<B.length&&ee.push(B.substring(ae)),r.jsx(i.Element,{...L,...c==null?void 0:c.container,...D,children:ee.map((ie,R)=>typeof ie=="string"?r.jsx(i.Text,{as:"span",display:"inline",...c==null?void 0:c.text,children:xn(ie)},`text-${R}`):r.jsx(i.Text,{as:"span",display:"inline",animate:M?Q:void 0,...A?{}:$,...c==null?void 0:c.highlight,children:X(ie.text)},`highlight-${R}`))})}return t&&!F?r.jsx(i.Element,{...L,...D,...c==null?void 0:c.container,children:r.jsx(i.Text,{as:"span",display:"inline",animate:M?Q:void 0,...A?{}:$,...c==null?void 0:c.highlight,children:X(B)})}):r.jsx(i.Text,{...L,...D,...c==null?void 0:c.container,...c==null?void 0:c.text,children:xn(B)})},zi=e=>r.jsx(Sm,{...e}),Mi=({items:e,shape:o,variant:t,onToggleChange:n})=>{const{activeToggles:a,setActiveToggles:l}=Kl();return r.jsx(Xl,{items:e,shape:o,variant:t,activeToggles:a,setActiveToggles:l,onToggleChange:n})},vm=({items:e,onChange:o})=>{const[t,n]=h.useState(e),[a,l]=h.useState(null),[c,g]=h.useState(null),s=h.useRef({x:0,y:0}),d=h.useRef([]),u=h.useCallback((p,y)=>{p.preventDefault(),document.body.style.cursor="grabbing";const k="touches"in p?p.touches[0].clientX:p.clientX,b="touches"in p?p.touches[0].clientY:p.clientY;s.current={x:k,y:b},g(y),l(t[y])},[t]),f=h.useCallback(p=>{if(c===null)return;const y="touches"in p?p.touches[0].clientX:p.clientX,k="touches"in p?p.touches[0].clientY:p.clientY,b=d.current[c];if(!b)return;const w=y-s.current.x,C=k-s.current.y;b.style.transform=`translate(${w}px, ${C}px)`,b.style.zIndex="1000";const v=d.current.findIndex((S,x)=>{if(!S||x===c)return!1;const I=S.getBoundingClientRect();return k>=I.top&&k<=I.bottom});if(v!==-1&&v!==c){const S=[...t],[x]=S.splice(c,1);S.splice(v,0,x),n(S),g(v),o==null||o(S),s.current={x:y,y:k}}},[c,t,o]),m=h.useCallback(()=>{document.body.style.cursor="",d.current.forEach(p=>{p&&(p.style.transform="",p.style.zIndex="")}),g(null),l(null)},[c]);return h.useEffect(()=>{if(!(typeof window>"u"))return c!==null&&(window.addEventListener("mousemove",f),window.addEventListener("touchmove",f),window.addEventListener("mouseup",m),window.addEventListener("touchend",m)),()=>{window.removeEventListener("mousemove",f),window.removeEventListener("touchmove",f),window.removeEventListener("mouseup",m),window.removeEventListener("touchend",m)}},[c,f,m]),{items:t,draggedItem:a,draggedIndex:c,itemRefs:d,handleDragStart:u}},Tm=({items:e,renderItem:o,containerProps:t,itemProps:n,draggedIndex:a,itemRefs:l,handleDragStart:c,views:g,themeMode:s})=>r.jsx(i.View,{overflow:"hidden",position:"relative",...t,...g==null?void 0:g.container,children:e.map((d,u)=>r.jsx(i.View,{ref:f=>{l.current[u]=f},onMouseDown:f=>c(f,u),onTouchStart:f=>c(f,u),position:"relative",cursor:"grab",transition:"transform 0.2s",...n,...g==null?void 0:g.item,children:o?o(d,u):d},u))}),ji=e=>{const{items:o,draggedIndex:t,itemRefs:n,handleDragStart:a}=vm(e);return r.jsx(Tm,{...e,items:o,draggedIndex:t,itemRefs:n,handleDragStart:a})},Im=ji,Fm=({onFileSelect:e,onMultipleFileSelect:o,validateFile:t,accept:n,multiple:a,disabled:l,previewUrl:c})=>{const[g,s]=h.useState(!1),[d,u]=h.useState(null),f=h.useRef(null),m=c!==void 0?c:d;h.useEffect(()=>()=>{d&&URL.revokeObjectURL(d)},[d]);const p=h.useCallback(S=>{S.preventDefault(),S.stopPropagation(),!l&&s(!0)},[l]),y=h.useCallback(S=>{S.preventDefault(),S.stopPropagation(),!l&&s(!1)},[l]),k=h.useCallback(S=>{S.preventDefault(),S.stopPropagation(),!l&&s(!0)},[l]),b=h.useCallback(S=>{if(!S||S.length===0)return;const x=Array.from(S);if(!a&&x.length>0){const I=x[0];if(I.type.startsWith("image/")){const T=URL.createObjectURL(I);u(W=>(W&&URL.revokeObjectURL(W),T))}else u(null)}a?o&&o(x):x.length>0&&e&&e(x[0])},[a,o,e]),w=h.useCallback(S=>{S.preventDefault(),S.stopPropagation(),s(!1),!l&&S.dataTransfer.files&&S.dataTransfer.files.length>0&&(b(S.dataTransfer.files),S.dataTransfer.clearData())},[l,b]),C=h.useCallback(()=>{var S;l||(S=f.current)==null||S.click()},[l]),v=h.useCallback(S=>{b(S.target.files),S.target.value&&(S.target.value="")},[b]);return{isDragActive:g,handleDragEnter:p,handleDragLeave:y,handleDragOver:k,handleDrop:w,handleClick:C,handleFileChange:v,inputRef:f,preview:m}},zm={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)"}},Wi=({files:e,sandboxId:o,onRemove:t,layout:n="inline",maxHeight:a="120px",showPreviews:l=!1,views:c={}})=>{if(e.length===0)return null;const g=h.useCallback(d=>d<1024?`${d} B`:d<1024*1024?`${(d/1024).toFixed(1)} KB`:`${(d/(1024*1024)).toFixed(1)} MB`,[]),s=h.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 r.jsx(i.View,{display:"flex",flexWrap:"wrap",gap:"8px",padding:"8px 0",maxHeight:a,overflowY:"auto",...c==null?void 0:c.container,children:e.map((d,u)=>{const f=typeof URL<"u"&&typeof URL.createObjectURL=="function"&&typeof Blob<"u"&&d instanceof Blob,m=(d==null?void 0:d.path)||(d==null?void 0:d.url)||(l&&f?URL.createObjectURL(d):""),p=d.type.startsWith("image/"),y=d.type.startsWith("video/"),k=d.type.startsWith("audio/"),b=s(d);return l?r.jsx(i.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:l&&r.jsxs(He,{children:[r.jsxs(He.Trigger,{children:[p&&r.jsx(i.Image,{src:m,alt:d.name,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),y&&r.jsx(i.View,{as:"video",src:m,alt:d.name,controls:!1,muted:!0,width:"60px",height:"60px",borderRadius:"8px",objectFit:"cover"}),k&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(Wo,{widthHeight:24,color:"color-black"})}),!p&&!y&&!k&&r.jsx(i.Center,{width:"60px",height:"60px",borderRadius:"8px",backgroundColor:"color-gray-100",children:r.jsx(ho,{widthHeight:24,color:"color-black"})}),t&&r.jsx(i.Button,{...zm,onClick:w=>{w.stopPropagation(),t(u)},"aria-label":`Remove ${d.name}`,children:"×"})]}),r.jsxs(He.Content,{children:[p&&r.jsx(i.Image,{src:m,alt:d.name,maxWidth:"100%"}),y&&r.jsx(i.View,{as:"video",src:m,controls:!0,maxWidth:"100%"}),k&&r.jsx(i.View,{as:"audio",src:m,controls:!0,width:"100%"}),r.jsxs(i.Text,{marginTop:"4px",maxLines:1,width:"100%",...c==null?void 0:c.name,children:[d.name," (",g(d.size),")"]})]})]})},u):r.jsxs(i.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:[r.jsx(i.Center,{width:"22px",height:"22px",minWidth:"22px",borderRadius:"9999px",backgroundColor:b.backgroundColor,color:b.color,children:k?r.jsx(Wo,{widthHeight:12,color:"currentColor"}):r.jsx(ho,{widthHeight:12,color:"currentColor"})}),r.jsxs(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-600",maxLines:1,maxWidth:"220px",...c==null?void 0:c.name,children:[d.name," · ",g(d.size)]}),t&&r.jsx(i.View,{as:"button",type:"button",onClick:()=>t(u),"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:"×"})]},u)})})},Mm=({children:e,text:o="Drop files here or click to upload",textProps:t,containerProps:n,disabled:a,accept:l,multiple:c,isDragActive:g,handleDragEnter:s,handleDragLeave:d,handleDragOver:u,handleDrop:f,handleClick:m,handleFileChange:p,inputRef:y,preview:k,imageProps:b,selectedFiles:w,onRemove:C})=>r.jsxs(i.Center,{width:"100%",minHeight:"200px",height:w&&w.length>0?"auto":"200px",borderWidth:2,borderStyle:"dashed",borderColor:g?"theme-primary":"color-gray-300",borderRadius:12,backgroundColor:g?"#EFF6FF":"color-gray-50",flexDirection:"column",cursor:a?"not-allowed":"pointer",opacity:a?.6:1,onClick:m,onDragEnter:s,onDragLeave:d,onDragOver:u,onDrop:f,transition:"background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease",overflow:"hidden",position:"relative",padding:16,...n,children:[r.jsx("input",{type:"file",ref:y,onChange:p,accept:l,multiple:c,style:{display:"none"},disabled:a}),k&&!c?r.jsxs(i.View,{width:"100%",height:"200px",position:"relative",children:[r.jsx(i.Image,{src:k,alt:"Preview",width:"100%",height:"100%",objectFit:"contain",...b}),r.jsx(i.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:r.jsx(i.Text,{color:"white",fontWeight:600,children:"Click to replace"})})]}):r.jsxs(i.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[e||r.jsxs(i.View,{flexDirection:"column",alignItems:"center",width:"100%",children:[r.jsx(At,{widthHeight:40,color:g?"theme-primary":"color-gray-500"}),r.jsx(i.Text,{marginTop:16,color:g?"theme-primary":"color-gray-600",fontWeight:500,textAlign:"center",...t,children:o})]}),c&&w&&w.length>0&&r.jsx(i.View,{marginTop:16,width:"100%",children:r.jsx(Wi,{files:w,onRemove:C||(()=>{}),showPreviews:!0,layout:"inline",maxHeight:"160px"})})]})]}),jm=e=>{const o=Fm(e);return r.jsx(Mm,{...e,...o})},Wm=(e=!1)=>{const[o,t]=h.useState(e),[n,a]=h.useState(null);return h.useEffect(()=>{const l=s=>{!s.composedPath().some(f=>(f==null?void 0:f.id)==="dropdown-menu"||(f==null?void 0:f.id)==="dropdown-trigger")&&o&&(t(!1),a(null))},c=()=>{o&&(t(!1),a(null))},g=s=>{s.key==="Escape"&&o&&(t(!1),a(null))};if(!(typeof document>"u"||typeof window>"u"))return document.addEventListener("mousedown",l),window.addEventListener("resize",c),document.addEventListener("keydown",g),()=>{document.removeEventListener("mousedown",l),window.removeEventListener("resize",c),document.removeEventListener("keydown",g)}},[o]),{isOpen:o,setIsOpen:t,activeSubmenuId:n,setActiveSubmenuId:a}},Em={sm:{padding:"6px 8px",fontSize:"14px",minWidth:"160px"},md:{padding:"8px 12px",fontSize:"16px",minWidth:"180px"},lg:{padding:"10px 16px",fontSize:"18px",minWidth:"200px"}},Am={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"}},Hm={hover:{backgroundColor:"color-gray-100"}},Ei=h.createContext({isOpen:!1,setIsOpen:()=>{},activeSubmenuId:null,setActiveSubmenuId:()=>{},size:"md",variant:"default",triggerRef:{current:null}}),Vm=({children:e,value:o})=>r.jsx(Ei.Provider,{value:o,children:e}),kn=()=>{const e=h.useContext(Ei);if(!e)throw new Error("useDropdownMenuContext must be used within a DropdownMenuProvider");return e},Ai=({children:e,views:o,...t})=>{const{isOpen:n,setIsOpen:a,triggerRef:l}=kn(),c=g=>{g.stopPropagation(),a(!n)};return r.jsx(i.View,{ref:l,id:"dropdown-trigger",onClick:c,cursor:"pointer",position:"relative",display:"inline-block",...o==null?void 0:o.container,...t,children:e})},Cn=({items:e,side:o="bottom",align:t="start",views:n,...a})=>{const{isOpen:l,variant:c,triggerRef:g}=kn(),s=h.useRef(null),{ref:d,relation:u}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[f,m]=h.useState({x:0,y:0,placement:o});if(h.useEffect(()=>{g.current&&d&&(d.current=g.current)},[g,d,l]),h.useEffect(()=>{if(l&&s.current&&g.current){const k=g.current.getBoundingClientRect();let b=o;u&&(o==="bottom"&&u.space.vertical==="top"?b="top":o==="top"&&u.space.vertical==="bottom"?b="bottom":o==="right"&&u.space.horizontal==="left"?b="left":o==="left"&&u.space.horizontal==="right"&&(b="right"));let w=0,C=0;switch(b){case"bottom":w=t==="start"?k.left:t==="end"?k.right-180:k.left+k.width/2-90,C=k.bottom+8;break;case"top":w=t==="start"?k.left:t==="end"?k.right-180:k.left+k.width/2-90,C=k.top-8;break;case"right":w=k.right+8,C=t==="start"?k.top:t==="end"?k.bottom-100:k.top+k.height/2-50;break;case"left":w=k.left-8,C=t==="start"?k.top:t==="end"?k.bottom-100:k.top+k.height/2-50;break}m({x:w,y:C,placement:b})}},[l,o,t,g,u]),!l)return null;const y=(()=>{const k={position:"fixed",left:f.x,top:f.y,zIndex:1e3};switch(f.placement){case"top":return{...k,transform:"translateY(-100%)"};case"left":return{...k,transform:"translateX(-100%)"};case"bottom":case"right":default:return k}})();return r.jsx(i.View,{ref:s,id:"dropdown-menu",borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",overflow:"hidden",style:y,...Am[c],...n==null?void 0:n.menu,...a,children:e.map((k,b)=>k.divider?r.jsx(Vi,{views:n},`divider-${b}`):r.jsx(Hi,{item:k,views:n},k.id))})},Hi=({item:e,views:o,...t})=>{const{activeSubmenuId:n,setActiveSubmenuId:a,size:l}=kn(),[c,g]=h.useState(!1),s=e.items&&e.items.length>0,d=n===e.id,u=h.useRef(null),f=()=>{g(!0),s&&a(e.id)},m=()=>{g(!1)},p=y=>{y.stopPropagation(),!e.disabled&&!s&&e.onClick&&e.onClick()};return r.jsxs(i.View,{ref:u,display:"flex",alignItems:"center",cursor:e.disabled?"not-allowed":"pointer",opacity:e.disabled?.5:1,position:"relative",...Em[l],_hover:e.disabled?{}:Hm.hover,backgroundColor:c&&!e.disabled?"color-gray-100":"transparent",onMouseEnter:f,onMouseLeave:m,onClick:p,...o==null?void 0:o.item,...t,children:[e.icon&&r.jsx(i.View,{marginRight:8,...o==null?void 0:o.icon,children:e.icon}),r.jsx(i.View,{flexGrow:1,children:e.label}),s&&r.jsx(i.View,{marginLeft:8,...o==null?void 0:o.submenuIndicator,children:r.jsx(ye,{orientation:"right",widthHeight:16,color:"currentColor",filled:!0})}),d&&s&&r.jsx(Cn,{items:e.items||[],side:"right",align:"start",views:o})]})},Vi=({views:e,...o})=>r.jsx(i.View,{height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.divider,...o}),Pm=({trigger:e,items:o,side:t="bottom",align:n="start",views:a,themeMode:l,...c})=>r.jsxs(i.View,{position:"relative",display:"inline-block",...a==null?void 0:a.container,...c,children:[r.jsx(Ai,{views:a,children:e}),r.jsx(Cn,{items:o,side:t,align:n,views:a})]}),qo=({trigger:e,items:o,size:t="md",variant:n="default",side:a="bottom",align:l="start",defaultOpen:c=!1,views:g,...s})=>{const{isOpen:d,setIsOpen:u,activeSubmenuId:f,setActiveSubmenuId:m}=Wm(c),p=h.useRef(null);return r.jsx(Vm,{value:{isOpen:d,setIsOpen:u,activeSubmenuId:f,setActiveSubmenuId:m,size:t,variant:n,triggerRef:p},children:r.jsx(Pm,{trigger:e,items:o,side:a,align:l,views:g,...s})})};qo.Trigger=Ai,qo.Content=Cn,qo.Item=Hi,qo.Divider=Vi;const Dm=e=>{const{value:o,defaultValue:t="",onChange:n,onChangeComplete:a,isOpen:l,onOpen:c,onClose:g,closeOnSelect:s=!0,maxRecentColors:d=8,showRecentColors:u=!0,colorFormat:f}=e,[m,p]=h.useState(l??!1),[y,k]=h.useState(o??t),[b,w]=h.useState(""),[C,v]=h.useState([]),S=h.useRef(null),x=h.useRef(null);h.useEffect(()=>{o!==void 0&&k(o)},[o]),h.useEffect(()=>{l!==void 0&&p(l)},[l]),h.useEffect(()=>{if(u&&typeof localStorage<"u"){const E=localStorage.getItem("colorPicker-recentColors");if(E)try{v(JSON.parse(E))}catch{}}},[u]),h.useEffect(()=>{if(typeof document>"u"||typeof document.addEventListener!="function")return;const E=F=>{m&&S.current&&x.current&&!S.current.contains(F.target)&&!x.current.contains(F.target)&&M()};return document.addEventListener("mousedown",E),()=>document.removeEventListener("mousedown",E)},[m]);const I=h.useCallback(E=>{u&&v(F=>{const j=F.filter(V=>V!==E),A=[E,...j].slice(0,d);return typeof localStorage<"u"&&localStorage.setItem("colorPicker-recentColors",JSON.stringify(A)),A})},[u,d]),T=h.useCallback(()=>{const E=!m;p(E),E?c==null||c():g==null||g()},[m,c,g]),W=h.useCallback(E=>{k(E),I(E);const F=Gr(E,f);n==null||n(F),a==null||a(F),s&&(p(!1),g==null||g())},[n,a,s,g,I,f]),D=h.useCallback(E=>{w(E)},[]),P=h.useCallback(()=>{b&&(W(b),w(""))},[b,W]),M=h.useCallback(()=>{p(!1),g==null||g()},[g]);return{isOpen:m,selectedColor:y,recentColors:C,customColor:b,handleToggle:T,handleColorSelect:W,handleCustomColorChange:D,handleCustomColorSubmit:P,handleClose:M,triggerRef:S,dropdownRef:x}},Uo={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"}},$m={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"}},Lm={default:{borderRadius:8},square:{borderRadius:0},rounded:{borderRadius:8},pill:{borderRadius:9999}},Bm={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"}},_m=[{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"}],Om=typeof navigator<"u"&&navigator.product!=="ReactNative"&&typeof document<"u"&&typeof document.createElement=="function",Nm=({id:e,name:o,label:t,placeholder:n="Select a color",helperText:a,views:l={},size:c="md",shape:g="default",variant:s="default",error:d=!1,isDisabled:u=!1,isReadOnly:f=!1,predefinedColors:m=_m,showCustomInput:p=!0,showRecentColors:y=!0,isOpen:k,selectedColor:b,recentColors:w,customColor:C,handleToggle:v,handleColorSelect:S,handleCustomColorChange:x,handleCustomColorSubmit:I,handleClose:T,triggerRef:W,dropdownRef:D,onChange:P,onChangeComplete:M,onOpen:E,onClose:F,colorFormat:j,maxRecentColors:A,closeOnSelect:V,defaultValue:H,value:O,...G})=>{const U={...Uo.container,...l==null?void 0:l.container},$={...Uo.trigger,...$m[c],...Lm[g],...Bm[s],...d&&{borderColor:"color-red-500"},...u&&{opacity:.6,cursor:"not-allowed"},...!u&&!f&&{_hover:{borderColor:"color-gray-400"}},...l==null?void 0:l.trigger},_={...Uo.dropdown,...l==null?void 0:l.dropdown},N={...Uo.colorGrid,...l==null?void 0:l.colorGrid},Q={...Uo.recentColors,...l==null?void 0:l.recentColors},B=b||"color-gray-200";return r.jsxs(i.View,{id:e,...U,...G,children:[t&&r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",fontWeight:"500",color:"color-gray-600",marginBottom:"6px",...l==null?void 0:l.label,children:t}),r.jsxs(i.View,{ref:W,onClick:u||f?void 0:v,...$,children:[r.jsxs(i.Horizontal,{alignItems:"center",gap:8,children:[r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:B,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200"}),r.jsx(i.Text,{color:b?"color-gray-900":"color-gray-500",fontSize:"inherit",children:b||n})]}),!f&&!u&&r.jsx(ye,{widthHeight:16,color:"color-gray-500",orientation:k?"up":"down"})]}),k&&r.jsxs(i.View,{ref:D,..._,children:[r.jsx(i.View,{...N,children:m.map((L,X)=>r.jsx(i.View,{width:"36px",height:"36px",borderRadius:"8px",backgroundColor:L.value,borderWidth:"1px",borderStyle:"solid",borderColor:b===L.value?"theme-primary":"transparent",cursor:"pointer",onClick:()=>S(L.value),title:L.name,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"},...l==null?void 0:l.colorSwatch},X))}),p&&r.jsxs(i.View,{...Uo.customInput,...l==null?void 0:l.customInput,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",marginBottom:"10px",children:[Om&&r.jsx("input",{type:"color",value:C||"#1D4ED8",onChange:L=>{const X=L.target.value;x(X),S(X)},style:{width:"36px",height:"36px",border:"1px solid #E5E7EB",borderRadius:"8px",cursor:"pointer",backgroundColor:"transparent"},title:"Pick a color"}),r.jsx(i.Text,{fontSize:"12px",lineHeight:"16px",color:"color-gray-500",children:"HEX"})]}),r.jsx(Pe,{placeholder:"#1D4ED8",value:C,onChange:L=>{var X;return x(typeof L=="string"?L:((X=L==null?void 0:L.target)==null?void 0:X.value)??"")},onKeyPress:L=>{L.key==="Enter"&&I()},size:"sm",right:C&&r.jsx(i.View,{width:"18px",height:"18px",borderRadius:"6px",backgroundColor:C,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",onClick:I})})]}),y&&w.length>0&&r.jsxs(i.View,{...Q,children:[r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",fontWeight:"500",color:"color-gray-500",marginBottom:"8px",children:"Recent Colors"}),r.jsx(i.Horizontal,{gap:8,flexWrap:"wrap",children:w.map((L,X)=>r.jsx(i.View,{width:"24px",height:"24px",borderRadius:"8px",backgroundColor:L,borderWidth:"1px",borderStyle:"solid",borderColor:"color-gray-200",cursor:"pointer",transition:"transform 0.2s ease, border-color 0.2s ease",onClick:()=>S(L),title:L,_hover:{transform:"scale(1.05)",borderColor:"color-gray-300"}},X))})]})]}),a&&r.jsx(i.Text,{fontSize:"11px",lineHeight:"16px",color:d?"color-red-500":"color-gray-500",marginTop:"4px",...l==null?void 0:l.helperText,children:a})]})},Pi=e=>{const o=Dm(e);return r.jsx(Nm,{...o,...e})},Di=e=>{const o=ni(e);return r.jsx(ai,{...o,...e})},$i={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.",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…"},qm=["paragraph","h1","h2","h3","bullet","number","quote","codeBlock","table"];function pr(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 yr(e,o=0,t=0){var c;if(t>20)return[{kind:"text",text:e,start:o,end:o+e.length}];const n=[];let a=0;const l=(g,s,d)=>n.push({kind:"text",text:g,start:o+s,end:o+d});for(;a<e.length;){if(e[a]==="\\"&&/[\\`*{}\[\]()#+.!_>~|]/.test(e[a+1]||"")){l(e[a+1],a+1,a+2),a+=2;continue}const g=/^<br\s*\/?\s*>/i.exec(e.slice(a));if(g){n.push({kind:"break",start:o+a,end:o+a+g[0].length}),a+=g[0].length;continue}const s=/^`+/.exec(e.slice(a));if(s){const m=e.indexOf(s[0],a+s[0].length);if(m>=0){n.push({kind:"code",text:e.slice(a+s[0].length,m),start:o+a,end:o+m+s[0].length,contentStart:o+a+s[0].length}),a=m+s[0].length;continue}}const d=/^\[([^\]\n]+)\]\(([^\s()]*)\)/.exec(e.slice(a));if(d){n.push({kind:"link",start:o+a,end:o+a+d[0].length,url:d[2],children:yr(d[1],o+a+1,t+1)}),a+=d[0].length;continue}const u=[["***","***","bold"],["**","**","bold"],["__","__","bold"],["~~","~~","strikethrough"],["<u>","</u>","underline"],["`","`","code"],["*","*","italic"],["_","_","italic"]];let f=!1;for(const[m,p,y]of u){if(!e.startsWith(m,a))continue;let k=e.indexOf(p,a+m.length);for(;k>=0&&e[k-1]==="\\";)k=e.indexOf(p,k+p.length);if((m==="*"||m==="_")&&e.startsWith(m+m,k)){const C=e.indexOf(m+m,k+2);C>=0&&(k=e.indexOf(m,C+2))}if((m==="**"||m==="__")&&e[k+2]===m[0]&&(((c=e.slice(a+2,k).match(new RegExp(`\\${m[0]}(?!\\${m[0]})`,"g")))==null?void 0:c.length)||0)%2===1&&k++,k<=a+m.length||m==="_"&&/\w/.test(e[a-1]||"")&&/\w/.test(e[k+1]||""))continue;const b=e.slice(a+m.length,k);let w=y==="code"?void 0:yr(b,o+a+m.length,t+1);m==="***"&&(w=[{kind:"italic",start:o+a+2,end:o+k+1,children:w}]),n.push({kind:y,start:o+a,end:o+k+p.length,text:y==="code"?b:void 0,children:w}),f=!0,a=k+p.length;break}f||(l(e[a],a,a+1),a++)}return n.reduce((g,s)=>{const d=g[g.length-1];return(d==null?void 0:d.kind)==="text"&&s.kind==="text"&&d.end===s.start?(d.text+=s.text,d.end=s.end):g.push(s),g},[])}function Rr(e,o=[],t){var p,y,k;const n=e.replace(/^ {0,3}(`{3,}|~{3,})[^\n]*\n[\s\S]*?^ {0,3}\1\s*$/gm,"").replace(/`[^`\n]*`/g,""),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(n)||/^[ \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(n)||Array.from(n.matchAll(/\[[^\]\n]+\]\(([^)\n]*)\)/g)).some(b=>/[\s(]/.test(b[1])||!pr(b[1])),l=[],c=/[^\r\n]+|\r\n|\n|\r/g;let g=0;for(const b of e.matchAll(c))/^[\r\n]/.test(b[0])&&(l.push({text:e.slice(g,b.index),start:g,end:b.index}),g=b.index+b[0].length);(g<e.length||!l.length)&&l.push({text:e.slice(g),start:g,end:e.length});const s=[],d=new Set;let u=a;const f=/^\s*(?:[-*+] |\d+[.)] )/,m=/^\s*\|?\s*:?-{3,}:?\s*(?:\|\s*:?-{3,}:?\s*)+\|?\s*$/;for(let b=0;b<l.length;){if(!l[b].text.trim()){if(s.length&&(b===l.length-1||b>0&&!l[b-1].text.trim()&&((p=l[b+1])!=null&&p.text.trim()))){const j=b===l.length-1?e.length:l[b].start,A=((y=o.find(V=>!V.raw&&!d.has(V.id)))==null?void 0:y.id)||zo("block");d.add(A),s.push({id:A,kind:"paragraph",raw:"",body:"",start:j,end:j,bodyStart:j})}b++;continue}const w=l[b];let C=b,v="paragraph",S=0,x;const I=/^(#{1,3}) (.*)$/.exec(w.text),T=/^ {0,3}(`{3,}|~{3,})([\w+-]*)\s*$/.exec(w.text);if(I)v=`h${I[1].length}`,S=I[1].length+1;else if(T){for(v="codeBlock",x=T[2],C++;C<l.length&&!new RegExp(`^ {0,3}${T[1][0]}{${T[1].length},}\\s*$`).test(l[C].text);)C++;C>=l.length&&(u=!0,C=l.length-1),S=w.end-w.start+(e.slice(w.end,w.end+2)===`\r
|
|
27
|
+
`?2:1)}else if(b+1<l.length&&w.text.includes("|")&&m.test(l[b+1].text))for(v="table",C=b+1;C+1<l.length&&l[C+1].text.trim()&&l[C+1].text.includes("|");)C++;else if(f.test(w.text)){for(v=/^\s*\d/.test(w.text)?"number":"bullet";C+1<l.length&&l[C+1].text.trim()&&(f.test(l[C+1].text)||/^\s{2,}\S/.test(l[C+1].text));)C++;S=w.text.match(f)[0].length}else if(/^> ?/.test(w.text))for(v="quote",S=w.text.match(/^> ?/)[0].length;C+1<l.length&&/^> ?/.test(l[C+1].text);)C++;else{for(;C+1<l.length&&l[C+1].text.trim()&&!/^(?:#{1,6} |>|`{3}|~{3})/.test(l[C+1].text)&&!f.test(l[C+1].text);)C++;/^ {4}\S/.test(w.text)&&(u=!0)}const W=e.slice(w.start,l[C].end),D=o.find(j=>j.id===t&&j.start===w.start&&!d.has(j.id)),P=o[s.length],M=D||o.find(j=>j.raw===W&&!d.has(j.id))||(P&&!d.has(P.id)&&e.indexOf(P.raw,l[C].end)<0?P:void 0),E=(M==null?void 0:M.id)||zo("block");d.add(E);let F=W.slice(S);v==="codeBlock"&&(F=e.slice(w.start+S,l[C].start).replace(/\r?\n$/,"")),s.push({id:E,kind:v,raw:W,start:w.start,end:l[C].end,body:F,bodyStart:w.start+S,language:x}),b=C+1}return s.length||s.push({id:((k=o[0])==null?void 0:k.id)||zo("block"),kind:"paragraph",raw:"",body:"",start:e.length,end:e.length,bodyStart:e.length}),{blocks:s,sourceMode:u}}function Co(e,o,t){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)+t+e.slice(a)}function Um(e,o){const t=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(t.matchAll(/`+/g),l=>l[0].length+1)));return`${a}
|
|
28
|
+
${t}
|
|
29
|
+
${a}`}if(o==="table")return`| Column 1 | Column 2 | Column 3 |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| `+t.replace(/\|/g,"\\|").replace(/\r?\n/g," ")+" | | |";const n={paragraph:"",h1:"# ",h2:"## ",h3:"### ",bullet:"- ",number:"1. ",quote:"> "}[o];return t.split(/\r?\n/).map((a,l)=>o==="number"?`${l+1}. ${a}`:n+a).join(`
|
|
32
|
+
`)}function Li(e,o){const t={...o},n=a=>{var d,u,f,m;(d=a.children)==null||d.forEach(n);const l=(u=a.children)==null?void 0:u[0],c=(f=a.children)==null?void 0:f[a.children.length-1],g=a.kind==="code"?a.contentStart:l==null?void 0:l.start,s=a.kind==="code"?a.contentStart+(((m=a.text)==null?void 0:m.length)||0):c==null?void 0:c.end;g!==void 0&&s!==void 0&&t.start<=g&&t.end>=s&&(t.start=Math.min(t.start,a.start),t.end=Math.max(t.end,a.end))};return e.filter(a=>a.kind!=="codeBlock"&&o.start<a.end&&o.end>a.start).forEach(a=>yr(a.raw,a.start).forEach(n)),t}function Gm(e,o,t,n,a){const l=[];for(const d of o){if(d.kind==="codeBlock"||d.end<=t.start||d.start>=t.end)continue;let u=d.start;d.raw.split(/\r?\n/).forEach((f,m)=>{var k;const p=u;u+=f.length+(d.raw.includes(`\r
|
|
33
|
+
`)?2:1);const y=(b,w)=>{const C={start:Math.max(t.start,b),end:Math.min(t.end,w)};C.end>C.start&&l.push(C)};if(d.kind==="table"){if(m===1)return;let b=f.startsWith("|")?1:0;for(let w=b;w<=f.length;w++)if(w===f.length||f[w]==="|"&&f[w-1]!=="\\"){const C=f.slice(b,w),v=C.trim(),S=p+b+C.indexOf(v);y(S,S+v.length),b=w+1}}else{const b=((k=f.match(/^(?:#{1,3} |\s*(?:[-*+] |\d+[.)] )|> ?)/))==null?void 0:k[0].length)||0;y(p+b,p+f.length)}})}let c=e;const g={...t},s=l.length>0&&l.every(d=>wn(e,d,n,a).removed);for(const d of l.reverse()){const u=wn(c,d,n,a);!s&&u.removed||(g.end=d.end===t.end?u.selection.end:g.end+u.value.length-c.length,d.start===t.start&&(g.start=u.selection.start),c=u.value)}return{value:c,selection:g}}function wn(e,o,t,n){const a={bold:["**","**"],italic:["*","*"],underline:["<u>","</u>"],strikethrough:["~~","~~"],code:["`","`"]};let[l,c]=t==="link"?["[",`](${n})`]:a[t]||["",""];const g=e.slice(o.start,o.end)||t==="link"&&n||"",s=yr(g);if(t!=="link"&&s.length===1&&s[0].kind===t&&s[0].end===g.length){const m=t==="code"?s[0].contentStart:l.length,p=t==="code"?m:c.length,y=g.slice(m,g.length-p);return{removed:!0,value:Co(e,o,y),selection:{start:o.start,end:o.start+y.length}}}if(t==="code"&&(l=c="`".repeat(Math.max(1,...Array.from(g.matchAll(/`+/g),m=>m[0].length+1)))),e.slice(o.start-l.length,o.start)===l&&e.slice(o.end,o.end+c.length)===c)return{removed:!0,value:Co(e,{start:o.start-l.length,end:o.end+c.length},g),selection:{start:o.start-l.length,end:o.end-l.length}};const d=[],u=m=>{var y;if((y=m.children)==null||y.forEach(u),m.kind!==t)return;const p=t==="code"?m.contentStart-m.start:l.length;d.push({start:m.start,end:m.start+p},{start:t==="link"?m.children[m.children.length-1].end:m.end-(t==="code"?p:c.length),end:m.end})};s.forEach(u);let f=g;return d.sort((m,p)=>p.start-m.start).forEach(m=>{f=f.slice(0,m.start)+f.slice(m.end)}),{value:Co(e,o,l+f+c),selection:{start:o.start+l.length,end:o.start+l.length+f.length}}}function Ym(e){const o=e.value??e.defaultValue??"",t=h.useId(),[n,a]=h.useState(o),[l,c]=h.useState(()=>{const Y=Rr(o);return Y.blocks.forEach((q,te)=>{q.id=`${t}-block-${te}`}),Y}),[g,s]=h.useState({start:0,end:0}),[d,u]=h.useState(0),[f,m]=h.useState(!1),[p,y]=h.useState(null),[k,b]=h.useState(null),[w,C]=h.useState(!1),[v,S]=h.useState(""),[x,I]=h.useState(""),[T,W]=h.useState(null),[D,P]=h.useState(0),M={...$i,...e.labels},E=!!(e.isDisabled||e.isReadOnly),F=h.useRef({value:o,selection:g}),j=h.useRef(l),A=h.useRef({undo:[],redo:[],lastInput:0}),V=h.useRef(0),H=h.useRef(!1),O=h.useRef(!1),G=h.useRef(0),U=h.useRef(e);U.current=e;const $=h.useRef(T);$.current=T;const _=h.useRef(!0);h.useEffect(()=>(_.current=!0,()=>{_.current=!1,G.current++}),[]);const N=Y=>{const q={start:Math.max(0,Math.min(Y.start,F.current.value.length)),end:Math.max(0,Math.min(Y.end,F.current.value.length))};q.end<q.start&&([q.start,q.end]=[q.end,q.start]),!(q.start===F.current.selection.start&&q.end===F.current.selection.end)&&(A.current.lastInput=0,F.current.selection=q,s(q))},Q=(Y=F.current.selection)=>{N(Y),H.current=!0,u(q=>q+1)},B=(Y,q=!0,te)=>{const K=Rr(Y.value,j.current.blocks,te);j.current=K,F.current=Y,V.current++,c(K),a(Y.value),s(Y.selection),q&&(H.current=!0,u(J=>J+1))};h.useEffect(()=>{e.value===void 0||e.value===F.current.value||(B({value:e.value,selection:{start:0,end:0}},!1),O.current=!1,H.current=!1,u(Y=>Y+1),A.current={undo:[],redo:[],lastInput:0},G.current++,W(null),b(null),C(!1),y(null),P(Y=>Y+1))},[e.value]),h.useEffect(()=>{E&&(O.current=!1,G.current++,W(null),b(null),C(!1))},[E]);const L=(Y,q=F.current.selection,te=!1,K=!0,J)=>{var ce,de;if(E||Y===F.current.value)return;const ue=Date.now(),fe=A.current;(!te||ue-fe.lastInput>750||!fe.undo.length)&&(fe.undo.push({value:F.current.value,selection:{...F.current.selection}}),fe.undo.length>100&&fe.undo.shift()),fe.lastInput=te?ue:0,fe.redo=[],B({value:Y,selection:q},K,J),P(Se=>Se+1),(de=(ce=U.current).onChange)==null||de.call(ce,Y)},X=(Y,q=F.current.selection,te=!1)=>{const K=Co(F.current.value,q,Y);L(K,{start:q.start+Y.length,end:q.start+Y.length},te)},Z=(Y,q,te,K=!0,J=!1)=>{L(Co(F.current.value,{start:Y.start,end:Y.end},q),{start:Y.start+te.start,end:Y.start+te.end},K,J,Y.id)},ee=(Y=!1)=>{var ue,fe;if(E)return;const q=A.current,te=Y?q.redo:q.undo,K=Y?q.undo:q.redo,J=te.pop();if(!J){Q();return}K.push({value:F.current.value,selection:{...F.current.selection}}),q.lastInput=0,B(J),P(ce=>ce+1),(fe=(ue=U.current).onChange)==null||fe.call(ue,J.value)},ae=(Y,q)=>{if(E)return;const te=j.current.blocks,K=te.findIndex(de=>de.id===Y);if(K<0||q<0||q>=te.length||K===q)return;const J=[...te],[ue]=J.splice(K,1);J.splice(q,0,ue);let fe=F.current.value.slice(0,te[0].start),ce=0;J.forEach((de,Se)=>{de.id===Y&&(ce=fe.length+ue.bodyStart-ue.start),fe+=de.raw+(Se+1<te.length?F.current.value.slice(te[Se].end,te[Se+1].start):F.current.value.slice(te[Se].end))}),j.current={...j.current,blocks:J},L(fe,{start:ce,end:ce})},re=(Y,q)=>{var fe,ce;if(E)return;const te=j.current.blocks,K=te.findIndex(de=>de.id===Y),J=te[K];if(!J)return;if(q==="up"||q==="down"){ae(Y,K+(q==="up"?-1:1));return}if(q==="delete"){const de={start:K===te.length-1&&K>0?te[K-1].end:J.start,end:((fe=te[K+1])==null?void 0:fe.start)??J.end};X("",de);return}const ue=`
|
|
34
|
+
|
|
35
|
+
`+(q==="duplicate"?J.raw:"");X(ue,{start:J.end,end:J.end}),q==="below"&&b(((ce=j.current.blocks.find(de=>!de.raw&&de.start>=J.end))==null?void 0:ce.id)||null)},ie=(Y,q)=>{const te=j.current.blocks.find(J=>J.id===Y);if(!te)return;const K=Um(te,q);L(Co(F.current.value,{start:te.start,end:te.end},K),{start:te.start+K.length,end:te.start+K.length}),b(null)},R=(Y,q)=>{if(E||Y!=="link"&&F.current.selection.start===F.current.selection.end)return;if(Y==="link"&&!pr(q||"")){I(M.invalidLink);return}const te=f||j.current.sourceMode||F.current.selection.start===F.current.selection.end?wn(F.current.value,F.current.selection,Y,q):Gm(F.current.value,j.current.blocks,F.current.selection,Y,q);L(te.value,te.selection),C(!1),I("")},ne=Y=>{if(E||!U.current.generate)return;const q=Y==="section"?{start:0,end:F.current.value.length}:F.current.selection;if(Y==="selection"&&q.start===q.end){I(M.selectionRequired);return}G.current++,W({scope:Y,target:{value:F.current.value,selection:{...q}},revision:V.current,fragment:F.current.value.slice(q.start,q.end),prompt:"",state:"prompt"})},se=()=>{G.current++,W(null),H.current=!0,u(Y=>Y+1)},he=async()=>{const Y=$.current;if(E||!(Y!=null&&Y.prompt.trim())||Y.state==="loading"||Y.revision!==V.current||!U.current.generate)return;const q=++G.current;$.current={...Y,state:"loading"},W($.current);try{const te=await U.current.generate(Y.prompt.trim(),Y.fragment,Y.scope);if(!_.current||q!==G.current)return;if(!te.trim())throw new Error("empty-proposal");W({...Y,result:te,state:"proposal"})}catch{_.current&&q===G.current&&W({...Y,state:"error"})}},xe=()=>{const Y=$.current;E||!(Y!=null&&Y.result)||Y.revision!==V.current||Y.target.value!==F.current.value||(X(Y.result,Y.target.selection),se())},ge=()=>{m(Y=>!Y),H.current=!0,u(Y=>Y+1)},le=()=>{b(null),H.current=!0,u(Y=>Y+1)};return{value:n,document:l,selection:g,restoreVersion:d,restoreRequested:H,manualSource:f,toggleSource:ge,source:f||l.sourceMode,activeId:p,setActiveId:y,commandId:k,setCommandId:b,closeCommand:le,linkOpen:w,setLinkOpen:C,link:v,setLink:S,message:x,setMessage:I,labels:M,locked:E,capture:N,restoreSelection:Q,holdSelection:O,current:F,commit:L,replace:X,editBlock:Z,undo:ee,move:ae,action:re,transform:ie,format:R,ai:T,setAi:W,openAi:ne,closeAi:se,runAi:he,applyAi:xe,stale:!!T&&T.revision!==V.current,canUndo:!!A.current.undo.length,canRedo:!!A.current.redo.length,historyVersion:D}}const Bi=(e,o)=>{var c,g;if(!e)return!0;const t=e.toLowerCase(),n=o.name.toLowerCase().includes(t),a=((c=o.description)==null?void 0:c.toLowerCase().includes(t))||!1,l=((g=o.keywords)==null?void 0:g.some(s=>s.toLowerCase().includes(t)))||!1;return n||a||l},Km=({open:e,onOpenChange:o,groups:t=[],commands:n=[],filter:a})=>{const[l,c]=h.useState(""),[g,s]=h.useState(0),d=h.useRef(null),u=h.useMemo(()=>a||Bi,[a]),f=h.useMemo(()=>[...t.flatMap(b=>b.commands),...n],[t,n]),m=h.useMemo(()=>l.trim()?f.filter(k=>u(l,k)):f,[f,l,u]),p=h.useMemo(()=>{if(!l)return t;const k=a||Bi;return t.map(b=>({...b,commands:b.commands.filter(w=>k(l,w))})).filter(b=>b.commands.length)},[t,l,a]);h.useEffect(()=>{s(0)},[m.length]);const y=h.useCallback(k=>{if(e)switch(k.key){case"ArrowDown":k.preventDefault(),s(b=>b<m.length-1?b+1:b);break;case"ArrowUp":k.preventDefault(),s(b=>b>0?b-1:b);break;case"Enter":k.preventDefault(),m[g]&&(m[g].onSelect(),o(!1),c(""));break;case"Escape":k.preventDefault(),o(!1),c("");break}},[e,m,g,o]);return h.useEffect(()=>{if(!(typeof document>"u"))return document.addEventListener("keydown",y),()=>{document.removeEventListener("keydown",y)}},[y]),h.useEffect(()=>{const k=d.current;if(k&&typeof k.querySelector=="function"&&e){const b=k.querySelector(`[data-index="${g}"]`);b&&typeof b.scrollIntoView=="function"&&b.scrollIntoView({block:"nearest"})}},[g,e]),h.useEffect(()=>{e?s(0):c("")},[e]),{search:l,setSearch:c,selectedIndex:g,setSelectedIndex:s,filteredCommands:m,filteredGroups:p,listRef:d}},Xm=({onClose:e,children:o,...t})=>r.jsx(i.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())},...t,children:o}),_i=h.forwardRef(({value:e,onValueChange:o,...t},n)=>r.jsx(i.Input,{value:e,onChange:a=>{var l,c;return o(typeof a=="string"?a:((l=a==null?void 0:a.target)==null?void 0:l.value)??((c=a==null?void 0:a.nativeEvent)==null?void 0:c.text)??"")},ref:n,...t}));_i.displayName="CommandTextInput";const Jm={sm:{width:"400px",maxHeight:"300px"},md:{width:"500px",maxHeight:"400px"},lg:{width:"600px",maxHeight:"500px"}},Qm=(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)"}}))(),Zm={display:"flex",alignItems:"center",padding:"12px 16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200"},Rm={overflow:"auto",padding:"8px 0"},ep={marginBottom:"8px"},op={padding:"8px 16px",fontSize:"12px",fontWeight:"bold",color:"color-gray-500",textTransform:"uppercase"},rp={display:"flex",alignItems:"center",padding:"8px 16px",cursor:"pointer",userSelect:"none",borderRadius:"4px",margin:"0 8px",_hover:{backgroundColor:"color-gray-100"}},tp={backgroundColor:"color-blue-50",_hover:{backgroundColor:"color-blue-100"}},np={opacity:.5,cursor:"not-allowed",_hover:{backgroundColor:"transparent"}},ap={display:"flex",alignItems:"center",justifyContent:"center",marginRight:"12px",color:"color-gray-500"},lp={display:"flex",flexDirection:"column",flex:1},ip={fontSize:"14px",fontWeight:"medium"},cp={fontSize:"12px",color:"color-gray-500",marginTop:"2px"},sp={display:"flex",alignItems:"center",marginLeft:"12px",fontSize:"12px",color:"color-gray-500"},dp={display:"flex",alignItems:"center",justifyContent:"center",padding:"16px",color:"color-gray-500",textAlign:"center"},gp={display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 16px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",fontSize:"12px",color:"color-gray-500"},hp=h.createContext({search:"",setSearch:()=>{},selectedIndex:0,setSelectedIndex:()=>{},filteredCommands:[],onSelect:()=>{}}),fp=({value:e,children:o})=>r.jsx(hp.Provider,{value:e,children:o}),Oi=({value:e,onValueChange:o,placeholder:t="Type a command or search...",views:n,...a})=>{const l=h.useRef(null);return h.useEffect(()=>{l.current&&l.current.focus()},[]),r.jsxs(i.View,{...Zm,...n==null?void 0:n.container,...a,children:[r.jsx(jr,{widthHeight:16,color:"color-gray-400",marginRight:"8px"}),r.jsx(_i,{width:"100%",border:"none",outline:"none",backgroundColor:"transparent",fontSize:"14px",...n==null?void 0:n.input,value:e,onValueChange:o,placeholder:t,ref:l})]})},up=({children:e,views:o,...t})=>r.jsx(i.View,{...Rm,...o==null?void 0:o.container,...t,children:e}),Ni=({heading:e,children:o,views:t,...n})=>r.jsxs(i.View,{...ep,...t==null?void 0:t.container,...n,children:[r.jsx(i.Text,{...op,...t==null?void 0:t.heading,children:e}),o]}),Sn=({item:e,selected:o=!1,onSelect:t,views:n,...a})=>{const l=()=>{!e.disabled&&t&&t()};return r.jsxs(i.Horizontal,{...rp,...o?tp:{},...e.disabled?np:{},onPress:l,onClick:l,...n==null?void 0:n.container,...a,children:[e.icon&&r.jsx(i.View,{...ap,...n==null?void 0:n.icon,children:e.icon}),r.jsxs(i.Vertical,{...lp,...n==null?void 0:n.content,children:[r.jsx(i.Text,{...ip,...n==null?void 0:n.name,children:e.name}),e.description&&r.jsx(i.Text,{...cp,...n==null?void 0:n.description,children:e.description})]}),e.shortcut&&r.jsx(i.Text,{...sp,...n==null?void 0:n.shortcut,children:e.shortcut})]})},qi=({children:e="No results found.",views:o,...t})=>r.jsx(i.View,{...dp,...o==null?void 0:o.container,...t,children:e}),mp=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:l="md",variant:c="default",emptyState:g,footer:s,search:d,setSearch:u,selectedIndex:f,setSelectedIndex:m,filteredCommands:p,filteredGroups:y,listRef:k,views:b,filter:w,...C})=>{if(!e)return null;const v=h.useCallback(T=>{T.disabled||(T.onSelect(),o(!1),u(""))},[o,u]);h.useCallback(T=>T.target===T.currentTarget&&o(!1),[o]);const S=h.useMemo(()=>({search:d,setSearch:u,selectedIndex:f,setSelectedIndex:m,filteredCommands:p,onSelect:v}),[d,f,p,v,u,m]),x=t.length>0,I=p.length===0;return r.jsx(Xm,{onClose:()=>o(!1),...C,children:r.jsx(fp,{value:S,children:r.jsxs(i.View,{borderRadius:"8px",overflow:"hidden",display:"flex",flexDirection:"column",...Jm[l],...Qm[c],...b==null?void 0:b.container,onClick:T=>T.stopPropagation(),children:[r.jsx(Oi,{value:d,onValueChange:u,placeholder:a,views:b==null?void 0:b.searchInput}),r.jsx(i.View,{ref:k,flex:1,overflow:"auto",...b==null?void 0:b.list,children:I?g||r.jsx(qi,{views:b==null?void 0:b.empty}):x?y.map(T=>r.jsx(Ni,{heading:T.name,views:b==null?void 0:b.groupHeading,children:T.commands.map(W=>{const D=p.findIndex(P=>P.id===W.id);return r.jsx(Sn,{item:W,selected:D===f,onSelect:()=>v(W),"data-index":D,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)})},T.id)):p.map((T,W)=>r.jsx(Sn,{item:T,selected:W===f,onSelect:()=>v(T),"data-index":W,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))}),s&&r.jsx(i.View,{...gp,...b==null?void 0:b.footer,children:s})]})})})},wo=({open:e,onOpenChange:o,groups:t=[],commands:n=[],placeholder:a,size:l="md",variant:c="default",filter:g,emptyState:s,footer:d,views:u,...f})=>{const{search:m,setSearch:p,selectedIndex:y,setSelectedIndex:k,filteredCommands:b,filteredGroups:w,listRef:C}=Km({open:e,onOpenChange:o,groups:t,commands:n,filter:g});return r.jsx(mp,{open:e,onOpenChange:o,groups:t,commands:n,placeholder:a,size:l,variant:c,emptyState:s,footer:d,search:m,setSearch:p,selectedIndex:y,setSelectedIndex:k,filteredCommands:b,filteredGroups:w,listRef:C,views:u,...f})};wo.Input=Oi,wo.List=up,wo.Group=Ni,wo.Item=Sn,wo.Empty=qi;function pp({nodes:e,native:o=!1,codeFontFamily:t="monospace",isDisplay:n=!1,onLinkPress:a}){const l=(c,g)=>{var d,u,f,m;if(o){const p={bold:{fontWeight:"700"},italic:{fontStyle:"italic"},underline:{textDecorationLine:"underline"},strikethrough:{textDecorationLine:"line-through"},code:{fontFamily:t,backgroundColor:"color-gray-100"},link:{color:"theme-primary",textDecorationLine:"underline"},text:{},break:{}};return r.jsx(i.Text,{...p[c.kind],...n&&c.kind==="link"&&pr(c.url||"")?{accessibilityRole:"link",onPress:()=>a==null?void 0:a(c.url)}:{},children:c.kind==="break"?`
|
|
36
|
+
`:c.children?c.children.map(l):c.text},g)}if(c.kind==="text")return r.jsx("span",{"data-source-start":c.start,"data-source-end":c.end,children:c.text},g);if(c.kind==="break")return r.jsx("br",{"data-source-start":c.start,"data-source-end":c.end},g);if(c.kind==="code")return r.jsx("code",{children:r.jsx("span",{"data-source-start":c.contentStart??c.start+1,"data-source-end":(c.contentStart??c.start+1)+(((d=c.text)==null?void 0:d.length)||0),children:c.text})},g);if(c.kind==="link")return n&&pr(c.url||"")?r.jsx(Hr,{href:c.url,display:"inline",color:"theme-primary",underline:"underline",_focusVisible:{outline:"2px solid currentColor",outlineOffset:2},onClick:a?p=>{p.preventDefault(),a(c.url)}:void 0,children:(u=c.children)==null?void 0:u.map(l)},g):r.jsx("a",{href:pr(c.url||"")?c.url:void 0,onClick:p=>p.preventDefault(),children:(f=c.children)==null?void 0:f.map(l)},g);const s={bold:"strong",italic:"em",underline:"u",strikethrough:"s"}[c.kind];return h.createElement(s,{key:g},(m=c.children)==null?void 0:m.map(l))};return r.jsx(r.Fragment,{children:e.map(l)})}function Ui({block:e,native:o=!1,codeFontFamily:t="monospace",isDisplay:n=!1,onLinkPress:a}){var g,s;const l=(d,u)=>r.jsx(pp,{nodes:yr(d,u),native:o,codeFontFamily:t,isDisplay:n,onLinkPress:a});if(e.kind==="codeBlock")return n&&!o?r.jsx(i.Element,{as:"pre",margin:0,padding:12,borderRadius:8,backgroundColor:"color-gray-100",fontFamily:t,style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"},children:r.jsx("code",{children:e.body})}):r.jsx(i.Text,{fontFamily:t,style:o?void 0:{whiteSpace:"pre-wrap"},children:e.body});if(e.kind==="table"){const d=e.raw.split(/\r?\n/)[1],u=d.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(y=>/:\s*$/.test(y)?/^\s*:/.test(y)?"center":"right":"left");let f=e.start;const m=e.raw.split(/\r?\n/).map(y=>{const k=f;f+=y.length+(e.raw.includes(`\r
|
|
37
|
+
`)?2:1);const b=[];let w=y.startsWith("|")?1:0;for(let C=w;C<=y.length;C++)if(C===y.length||y[C]==="|"&&y[C-1]!=="\\"){const v=y.slice(w,C),S=v.trim();(C!==y.length||S||y[y.length-1]!=="|")&&b.push({text:S,start:k+w+v.indexOf(S)}),w=C+1}return b}).filter((y,k)=>k!==1),p=r.jsx(ve,{children:r.jsxs(ve.Container,{"data-table-separator":o?void 0:d,minWidth:n?Math.max((((g=m[0])==null?void 0:g.length)||0)*140,320):void 0,children:[r.jsx(ve.Head,{children:r.jsx(ve.Row,{children:(s=m[0])==null?void 0:s.map((y,k)=>r.jsx(ve.HeadCell,{textAlign:u[k],children:l(y.text,y.start)},k))})}),r.jsx(ve.Body,{children:m.slice(1).map((y,k)=>r.jsx(ve.Row,{children:y.map((b,w)=>r.jsx(ve.Cell,{textAlign:u[w],children:l(b.text,b.start)},w))},k))})]})});return n?r.jsx(xi,{children:p}):p}if(e.kind==="bullet"||e.kind==="number"){let d=e.start;const u=e.raw.split(/\r?\n/).map((f,m)=>{var b;const p=d;d+=f.length+(e.raw.includes(`\r
|
|
38
|
+
`)?2:1);const y=/^(\s*)([-*+] |\d+[.)] )?(.*)$/.exec(f),k=l(y[3],p+y[1].length+(((b=y[2])==null?void 0:b.length)||0));return o?r.jsx(i.View,{paddingLeft:y[1].length*8,children:r.jsxs(i.Text,{children:[y[2]?/\d/.test(y[2])?y[2]:"• ":"",k]})},m):r.jsxs("li",{"data-list-indent":y[1],"data-list-marker":y[2]||"",style:{marginLeft:y[1].length*8,listStyleType:"none"},children:[y[2]&&r.jsx("span",{contentEditable:!1,"aria-hidden":"true",style:{display:"inline-block",marginLeft:-20,width:20},children:/\d/.test(y[2])?y[2]:"• "}),k]},m)});return o?r.jsx(i.View,{children:u}):e.kind==="number"?r.jsx("ol",{style:{margin:0,paddingLeft:24},children:u}):r.jsx("ul",{style:{margin:0,paddingLeft:24},children:u})}if(e.kind==="quote"){let d=e.start;const u=e.raw.split(/\r?\n/).map((f,m)=>{var k;const p=d;d+=f.length+(e.raw.includes(`\r
|
|
39
|
+
`)?2:1);const y=((k=f.match(/^> ?/))==null?void 0:k[0].length)||0;return r.jsxs(h.Fragment,{children:[m>0&&(o?`
|
|
40
|
+
`:r.jsx("br",{})),l(f.slice(y),p+y)]},m)});return o?r.jsx(i.View,{borderLeftWidth:3,borderColor:"color-gray-300",paddingLeft:12,children:r.jsx(i.Text,{children:u})}):r.jsx("blockquote",{style:{margin:0,borderLeft:"3px solid #d1d5db",paddingLeft:12},children:u})}if(o)return r.jsx(i.Text,{fontSize:e.kind==="h1"?28:e.kind==="h2"?24:e.kind==="h3"?20:16,fontWeight:e.kind==="paragraph"?"400":"700",children:l(e.body,e.bodyStart)});const c=e.kind==="paragraph"?"p":e.kind;return h.createElement(c,{style:{margin:0,minHeight:24}},e.body?l(e.body,e.bodyStart):r.jsx("span",{"data-source-start":e.bodyStart,"data-source-end":e.bodyStart,children:r.jsx("br",{})}))}function vn({state:e,props:o,preserve:t,formatting:n=!1}){var g;const a=e.selection.start!==e.selection.end,l=t?36:44,c=(s,d,u=!1,f)=>r.jsx(me,{type:"button",size:"sm",variant:"outline",minWidth:l,minHeight:l,paddingHorizontal:10,views:{content:{fontSize:14,fontWeight:s==="bold"?"700":"600",fontStyle:s==="italic"?"italic":"normal",textDecoration:s==="underline"?"underline":s==="strikethrough"?"line-through":void 0}},"aria-label":s==="source"&&e.source?e.labels.visual:e.labels[s],title:e.labels[s],isDisabled:e.locked||u,onPointerDown:t,onMouseDown:t?m=>m.preventDefault():void 0,onClick:d,children:f||e.labels[s]},s);return r.jsxs(i.Horizontal,{role:"toolbar","aria-label":e.labels.selectionToolbar,gap:4,flexWrap:"wrap",alignItems:"center",...(g=o.views)==null?void 0:g.toolbar,children:[n?r.jsxs(r.Fragment,{children:[[["bold","B"],["italic","I"],["underline","U"],["strikethrough","S"],["code","</>"]].map(([s,d])=>c(s,()=>e.format(s),!a,d)),c("link",()=>{e.setLink(""),e.setLinkOpen(!0)}),o.generate&&c("askSelection",()=>e.openAi("selection"),!a)]}):r.jsxs(r.Fragment,{children:[c("undo",()=>e.undo(),!e.canUndo),c("redo",()=>e.undo(!0),!e.canRedo),c("source",e.toggleSource,e.document.sourceMode,e.source?e.labels.visual:e.labels.source),o.generate&&c("askSection",()=>e.openAi("section")),o.onSave&&c("save",()=>{var s;return(s=o.onSave)==null?void 0:s.call(o)})]}),r.jsx(Di,{trigger:r.jsx(rr,{name:"smile",widthHeight:18,strokeWidth:2}),"aria-label":e.labels.emoji,isDisabled:e.locked,onPointerDown:t,onMouseDown:t?s=>s.preventDefault():void 0,onOpen:()=>{e.holdSelection.current=!0},onClose:()=>{e.holdSelection.current=!1},showRecentEmojis:!1,onChange:s=>e.replace(s),views:{container:{width:"auto"},trigger:{width:l,height:l,minHeight:l,boxSizing:"border-box",padding:0,justifyContent:"center",alignItems:"center"}}})]})}function yp({state:e,views:o}){return!e.ai&&!e.linkOpen?null:r.jsxs(i.Vertical,{padding:16,gap:12,borderWidth:1,borderColor:"color-gray-200",borderRadius:12,...o==null?void 0:o.panel,children:[e.linkOpen&&r.jsxs(i.Vertical,{role:"group","aria-label":e.labels.link,gap:8,children:[r.jsx(Pe,{label:e.labels.linkUrl,value:e.link,isAutoFocus:!0,onChange:e.setLink}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(me,{type:"button",isDisabled:e.locked,onClick:()=>e.format("link",e.link.trim()),children:e.labels.apply}),r.jsx(me,{type:"button",variant:"ghost",onClick:()=>{e.setLinkOpen(!1),e.restoreSelection()},children:e.labels.cancel})]})]}),e.ai&&r.jsxs(i.Vertical,{role:"region","aria-label":e.labels.aiPanel,gap:8,children:[r.jsx(i.Text,{children:e.ai.scope==="section"?e.labels.askSection:e.labels.askSelection}),r.jsx(i.Text,{children:e.ai.fragment}),r.jsx(Do,{label:e.labels.instruction,value:e.ai.prompt,isAutoFocus:!0,isDisabled:e.locked||e.ai.state==="loading",onChange:t=>e.setAi(n=>n&&{...n,prompt:t})}),e.ai.state==="loading"&&r.jsx(i.Text,{role:"status",children:e.labels.generating}),e.ai.state==="error"&&r.jsx(i.Text,{role:"alert",children:e.labels.aiError}),e.ai.state==="proposal"&&r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontWeight:"700",children:e.labels.proposal}),r.jsx(i.Text,{children:e.ai.result})]}),e.stale&&r.jsx(i.Text,{role:"status",children:e.labels.stale}),r.jsxs(i.Horizontal,{gap:8,flexWrap:"wrap",children:[e.ai.state==="proposal"&&r.jsx(me,{type:"button",isDisabled:e.locked||e.stale,onClick:e.applyAi,children:e.labels.apply}),r.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}),r.jsx(me,{type:"button",variant:"ghost",onClick:e.closeAi,children:e.labels.discard})]})]})]})}const Tn=new WeakMap;function et(e){const o=e.ownerDocument.getSelection();if(!(o!=null&&o.anchorNode)||!o.focusNode||!e.contains(o.anchorNode)||!e.contains(o.focusNode))return null;const t=(l,c)=>{var m,p;const g=l.nodeType===1?l:l.parentElement,s=g==null?void 0:g.closest("[data-block-start]"),d=Tn.get(l);if((d==null?void 0:d[c])!==void 0)return Number((s==null?void 0:s.dataset.blockStart)||0)+d[c];const u=g==null?void 0:g.closest("[data-source-start]");if(u&&e.contains(u)){const y=e.ownerDocument.createRange();return y.selectNodeContents(u),y.setEnd(l,c),Number(u.dataset.sourceStart)+y.toString().length}if(!s)return null;if(l.nodeType===1){const y=l.childNodes[c]||l.childNodes[c-1];if((y==null?void 0:y.nodeType)===1){const k=y,b=k.matches("[data-source-start]")?[k]:Array.from(k.querySelectorAll("[data-source-start]")),w=c===l.childNodes.length,C=w?b[b.length-1]:b[0];if(C)return Number(w?C.dataset.sourceEnd:C.dataset.sourceStart)}}const f=Array.from(s.querySelectorAll("[data-source-start]"));return Number(c===0?((m=f[0])==null?void 0:m.dataset.sourceStart)??s.dataset.blockStart:((p=f[f.length-1])==null?void 0:p.dataset.sourceEnd)??s.dataset.blockStart)},n=t(o.anchorNode,o.anchorOffset),a=t(o.focusNode,o.focusOffset);return n===null||a===null?null:{start:Math.min(n,a),end:Math.max(n,a)}}function bp(e,o){var s,d;const t=Array.from(e.querySelectorAll("[data-source-start]")),n=u=>{var y;let f,m=1/0;for(const k of t){const b=Number(k.dataset.sourceStart),w=Number(k.dataset.sourceEnd),C=u<b?b-u:u>w?u-w:0;C<m&&(f=k,m=C)}if(!f)return null;const p=f.firstChild;return(p==null?void 0:p.nodeType)===3?[p,Math.max(0,Math.min(u-Number(f.dataset.sourceStart),((y=p.textContent)==null?void 0:y.length)||0))]:[f,0]},a=n(o.start),l=n(o.end);if(!a||!l)return!1;const c=e.ownerDocument.createRange();c.setStart(...a),c.setEnd(...l),(d=(s=a[0].parentElement)==null?void 0:s.closest('[contenteditable="true"]'))==null||d.focus({preventScroll:!0});const g=e.ownerDocument.getSelection();return g==null||g.removeAllRanges(),g==null||g.addRange(c),!0}function xp(e){const o=e.ownerDocument.getSelection();let t="",n,a;const l=(s,d)=>{const u=Tn.get(s)||[];u[d]=t.length,Tn.set(s,u),(o==null?void 0:o.anchorNode)===s&&o.anchorOffset===d&&(n=t.length),(o==null?void 0:o.focusNode)===s&&o.focusOffset===d&&(a=t.length)},c=s=>{t+=s},g=(s,d="",u=!1,f=!1)=>{var w;if(s.nodeType===3){const C=s.textContent||"";for(let v=0;v<=C.length;v++)l(s,v),v<C.length&&c(u?C[v]:C[v]===`
|
|
41
|
+
`&&f?`
|
|
42
|
+
> `:/[\\`*_[\]<>~|#+]/.test(C[v])?"\\"+C[v]:C[v]);return}if(s.nodeType!==1)return;const m=s,p=m.tagName.toLowerCase();if(["script","style","iframe","object","embed"].includes(p)||m.contentEditable==="false")return;const y={strong:["**","**"],b:["**","**"],em:["*","*"],i:["*","*"],u:["<u>","</u>"],s:["~~","~~"],del:["~~","~~"],strike:["~~","~~"],code:["`","`"],a:["[",`](${m.getAttribute("href")||""})`]};if(p==="code"){const C="`".repeat(Math.max(1,...Array.from((m.textContent||"").matchAll(/`+/g),v=>v[0].length+1)));y.code=[C,C]}if(p==="br"){l(s,0),c(f?`
|
|
43
|
+
> `:m.hasAttribute("data-source-start")?"<br>":`
|
|
44
|
+
`);return}if(["p","div","h1","h2","h3","blockquote","ul","ol","table"].includes(p)&&s!==e&&t&&!t.endsWith(`
|
|
45
|
+
|
|
46
|
+
`)&&c(t.endsWith(`
|
|
47
|
+
`)?`
|
|
48
|
+
`:`
|
|
49
|
+
|
|
50
|
+
`),/^h[123]$/.test(p)&&c("#".repeat(Number(p[1]))+" "),p==="blockquote"&&c("> "),p==="li"){t&&!t.endsWith(`
|
|
51
|
+
`)&&c(`
|
|
52
|
+
`);const C=((w=m.parentElement)==null?void 0:w.tagName)==="OL",v=m.parentElement?Array.from(m.parentElement.children).indexOf(m)+1:1;c((m.dataset.listIndent??d)+(m.dataset.listMarker??(C?`${v}. `:"- ")))}if(p==="table"){Array.from(m.querySelectorAll("tr")).forEach((v,S)=>{S&&c(`
|
|
53
|
+
`),c("| "),Array.from(v.children).forEach(x=>{g(x,d),c(" | ")}),S===0&&c(`
|
|
54
|
+
`+(m.dataset.tableSeparator||"| "+Array.from(v.children).map(()=>"---").join(" | ")+" |"))});return}y[p]&&m.textContent&&c(y[p][0]);const b=Array.from(s.childNodes);b.forEach((C,v)=>{l(s,v),g(C,p==="li"?d+" ":d,u||p==="code",f||p==="blockquote")}),l(s,b.length),y[p]&&m.textContent&&c(y[p][1])};return g(e),{text:t,selection:{start:Math.min(n??t.length,a??t.length),end:Math.max(n??t.length,a??t.length)}}}function kp(e,o,t,n,a=!1){const l=h.useRef(!1),[c,g]=h.useState(!1),s=h.useRef(null),d=h.useRef(null),u=()=>{l.current=!1,g(!1)};h.useEffect(()=>{const S=e.current.current.selection;!e.source&&!e.locked&&S.start===0&&S.end===e.value.length&&e.value.length>0&&(l.current=!0,g(!0)),(e.source||e.locked||e.current.current.selection.start===e.current.current.selection.end)&&u(),s.current=null,d.current=null},[e.value,e.source,e.locked]);const f=S=>{var I;const x=S instanceof Element?S.closest("[data-editor-input]"):null;return x&&((I=o.current)!=null&&I.contains(x))?x:null},m=S=>{if(l.current)return{start:0,end:e.current.current.value.length};if((S==null?void 0:S.tagName)==="TEXTAREA"){const x=S,I=Number(x.dataset.editorOffset||0);return{start:I+x.selectionStart,end:I+x.selectionEnd}}return o.current?et(o.current):null},p=S=>l.current||e.document.blocks.filter(x=>S.start<x.end&&S.end>x.start).length>1,y=()=>{var I;const S=(I=o.current)==null?void 0:I.ownerDocument.activeElement;if((S==null?void 0:S.tagName)==="INPUT"||(S==null?void 0:S.tagName)==="TEXTAREA"){const T=f(S);if(T){const W=m(T);W&&e.capture(W)}return null}const x=m();return x&&e.capture(x),x},k=(S,x=!1)=>{const I=f(S.target);if(!I||I.tagName==="TEXTAREA")return;const T=m(I);!T||T.start===T.end||(S.clipboardData.setData("text/plain",e.current.current.value.slice(T.start,T.end)),S.preventDefault(),x&&!e.locked&&(e.capture(T),e.replace("",Li(e.document.blocks,T)),u()))},b=S=>{if(S.defaultPrevented||S.nativeEvent.isComposing)return;const x=f(S.target);if(!x)return;const I=m(x);I&&e.capture(I);const T=S.key.toLowerCase();T==="tab"&&u();const W=(S.ctrlKey||S.metaKey)&&!S.altKey;if(W&&T==="a"&&!S.shiftKey&&x.tagName!=="TEXTAREA"){S.preventDefault();const D=x.ownerDocument.createRange();D.selectNodeContents(t.current);const P=x.ownerDocument.getSelection();P==null||P.removeAllRanges(),P==null||P.addRange(D),l.current=!0,g(!0),e.capture({start:0,end:e.current.current.value.length});return}if(l.current&&["arrowleft","arrowright","arrowup","arrowdown","home","end","escape"].includes(T)){if(u(),!S.shiftKey){S.preventDefault();const D=e.document.blocks[0],P=e.document.blocks[e.document.blocks.length-1],M=["arrowleft","arrowup","home"].includes(T)?D.bodyStart:P.kind==="codeBlock"?P.bodyStart+P.body.length:P.end;e.restoreSelection({start:M,end:M})}return}if(!e.locked){if(W){T==="z"||T==="y"?(S.preventDefault(),u(),e.undo(T==="y"||S.shiftKey)):T==="s"&&n?(S.preventDefault(),n()):T==="a"&&S.shiftKey&&a?(S.preventDefault(),e.openAi("selection")):["b","i","u"].includes(T)?(S.preventDefault(),e.format({b:"bold",i:"italic",u:"underline"}[T])):T==="k"&&(S.preventDefault(),e.setLink(""),e.setLinkOpen(!0));return}if(x.tagName!=="TEXTAREA"&&I&&I.start!==I.end&&["backspace","delete"].includes(T)){S.preventDefault(),e.replace("",Li(e.document.blocks,I)),u();return}if(I&&p(I)){const D=T==="backspace"||T==="delete"?"":T==="enter"?`
|
|
55
|
+
|
|
56
|
+
`:S.key.length===1&&!S.altKey?S.key:null;if(D!==null){S.preventDefault(),e.replace(D,I,S.key.length===1),u();return}}}},w=S=>{var W;const x=f(S.target);if(!x||e.locked||S.isComposing||s.current)return;if(S.inputType==="historyUndo"||S.inputType==="historyRedo"){S.cancelable&&(S.preventDefault(),e.undo(S.inputType==="historyRedo"));return}const I=m(x);if(!I||!p(I))return;const T=(W=S.inputType)!=null&&W.startsWith("delete")?"":["insertParagraph","insertLineBreak"].includes(S.inputType)?`
|
|
57
|
+
|
|
58
|
+
`:S.data;T!=null&&(S.cancelable?(S.preventDefault(),e.replace(T,I),u()):d.current={target:I,text:T})},C=h.useRef(w);return C.current=w,h.useEffect(()=>{const S=o.current,x=I=>C.current(I);return S==null||S.addEventListener("beforeinput",x,!0),()=>S==null?void 0:S.removeEventListener("beforeinput",x,!0)},[o]),{capture:y,selectedDocument:c,onKeyDown:b,onInputCapture:S=>{var T,W;const x=f(S.target),I=S.nativeEvent;if(!(!x||e.locked||I.isComposing||s.current)){if(I.inputType==="historyUndo"||I.inputType==="historyRedo")S.stopPropagation(),e.undo(I.inputType==="historyRedo");else if(d.current||x.tagName!=="TEXTAREA"&&p(e.current.current.selection)&&(I.data!=null||(T=I.inputType)!=null&&T.startsWith("delete"))){S.stopPropagation();const{target:D,text:P}=d.current??{target:e.current.current.selection,text:(W=I.inputType)!=null&&W.startsWith("delete")?"":I.data};d.current=null,e.replace(P,D),u()}}},onCopy:S=>k(S),onCut:S=>k(S,!0),onPaste:S=>{const x=f(S.target);if(!x||x.tagName==="TEXTAREA"||e.locked)return;const I=m(x);if(!I)return;S.preventDefault();const T=S.clipboardData.getData("text/plain");!T&&!Array.from(S.clipboardData.types||[]).includes("text/plain")||(e.capture(I),e.replace(T,I),u())},onPointerDownCapture:S=>{f(S.target)&&u()},onCompositionStartCapture:S=>{const x=f(S.target),I=x&&m(x);I&&p(I)&&!e.locked&&(s.current=I)},onCompositionEndCapture:S=>{const x=s.current;x&&(S.stopPropagation(),s.current=null,S.data?e.replace(S.data,x):e.restoreSelection(x),u())}}}function Cp({rect:e,state:o,props:t,preserve:n}){const a=h.useRef(null),{themeMode:l}=i.useTheme(),[c,g]=h.useState({top:8,left:8});return h.useLayoutEffect(()=>{var d;const s=(d=a.current)==null?void 0:d.getBoundingClientRect();s&&g({left:Math.max(8,Math.min(e.left,window.innerWidth-s.width-8)),top:Math.max(8,Math.min(e.top-s.height-8>=8?e.top-s.height-8:e.bottom+8,window.innerHeight-s.height-8))})},[e]),r.jsx(i.View,{ref:a,"data-editor-selection-toolbar":"true",position:"fixed",top:c.top,left:c.left,maxWidth:"calc(100vw - 16px)",backgroundColor:l==="dark"?"color-gray-900":"color-white",borderWidth:1,borderStyle:"solid",borderColor:l==="dark"?"color-gray-600":"color-gray-300",boxShadow:"0 6px 20px rgba(0, 0, 0, 0.18)",borderRadius:10,padding:6,zIndex:1e3,children:r.jsx(vn,{state:o,props:t,formatting:!0,preserve:n})})}function wp({block:e,state:o,label:t,views:n}){const a=h.useRef(null),l=h.useRef(!1),c=h.useMemo(()=>r.jsx(Ui,{block:e}),[e.id,e.start,o.restoreVersion]),g=()=>{if(!a.current||l.current||o.locked)return;const s=xp(a.current),d=Rr(s.text);o.editBlock(e,s.text,s.selection,!0,d.blocks.length!==1||d.blocks[0].kind!==e.kind)};return r.jsx(i.View,{ref:a,"data-block-id":e.id,"data-block-start":e.start,"data-editor-input":"true",contentEditable:!o.locked,suppressContentEditableWarning:!0,role:"textbox","aria-label":t,"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:s=>{if(s.defaultPrevented)return;const d=a.current&&et(a.current);d&&o.capture(d)},onInput:s=>{g()},onCompositionStart:()=>{l.current=!0},onCompositionEnd:()=>{l.current=!1,g()},onKeyDown:s=>{if(s.nativeEvent.isComposing||o.locked)return;const d=a.current&&et(a.current);if(d&&o.capture(d),s.key==="/"&&!s.metaKey&&!s.ctrlKey&&!e.body.trim()&&(s.preventDefault(),o.setCommandId(e.id)),s.key==="Backspace"&&(d==null?void 0:d.start)===e.bodyStart&&d.start===d.end){const u=o.document.blocks.findIndex(m=>m.id===e.id),f=o.document.blocks[u-1];f&&f.kind==="paragraph"&&e.kind==="paragraph"&&(s.preventDefault(),o.replace("",{start:f.end,end:e.start}))}},children:c},o.restoreVersion)}function Sp({state:e,...o}){const{value:t,defaultValue:n,onChange:a,generate:l,onSave:c,label:g=e.labels.document,isDisabled:s,isReadOnly:d,labels:u,views:f={},status:m,...p}=o,y=h.useRef(null),{themeMode:k}=i.useTheme(),[b,w]=h.useState(null),C=h.useRef(null),v=h.useRef(null),S=kp(e,y,C,c,!!o.generate),x=h.useRef(null),I=h.useRef(null),T=h.useRef(null),W=h.useRef(null),D=h.useRef([]),P=h.useRef(null),[M,E]=h.useState(null),F=$=>{$.preventDefault()},j=()=>{var $;return Array.from((($=C.current)==null?void 0:$.querySelectorAll("[data-editor-row]"))||[])},A=()=>{var $;T.current!==null&&window.cancelAnimationFrame(T.current),T.current=null,x.current=null,($=I.current)==null||$.remove(),I.current=null,P.current=null,E(null)},V=($,_)=>$>_.from&&$<=_.to?-_.extent:$>=_.to&&$<_.from?_.extent:0,H=($,_)=>{const N=j()[$];return N?N.offsetTop+($>_.from?N.offsetHeight-_.height:0):_.top},O=$=>{const _=P.current;if(!_||_.to===$)return;const N={..._,to:$,top:H($,_)};P.current=N,E(N)},G=$=>{const _=P.current;if(!_||!C.current)return null;const N=$-C.current.getBoundingClientRect().top;if(N>=_.top&&N<=_.top+_.height)return _.to;const Q=j();let B=0;return Q.forEach((L,X)=>{X!==_.from&&N>=L.offsetTop+V(X,_)+L.offsetHeight/2&&B++}),B};h.useEffect(()=>{A()},[e.value,e.locked,e.source]),h.useEffect(()=>{if(M!=null&&M.id)return window.addEventListener("resize",A),()=>window.removeEventListener("resize",A)},[M==null?void 0:M.id]),h.useEffect(()=>()=>{var $;T.current!==null&&window.cancelAnimationFrame(T.current),($=I.current)==null||$.remove(),D.current.forEach(_=>_.cancel())},[]),h.useLayoutEffect(()=>{var _;const $=W.current;$&&(W.current=null,D.current.forEach(N=>N.cancel()),D.current=[],!((_=window.matchMedia)!=null&&_.call(window,"(prefers-reduced-motion: reduce)").matches)&&j().forEach(N=>{const Q=$.get(N.dataset.editorRow),B=Q===void 0?0:Q-N.getBoundingClientRect().top;Math.abs(B)<1||!N.animate||D.current.push(N.animate([{transform:`translateY(${B}px)`},{transform:"translateY(0)"}],{duration:180,easing:"cubic-bezier(0.2, 0, 0, 1)"}))}))}),h.useEffect(()=>{const $=()=>{const _=y.current;if(!_||e.holdSelection.current)return;if(x.current){w(null);return}const N=_.ownerDocument.activeElement,Q=S.capture()??et(_),B=_.ownerDocument.getSelection(),L=N==null?void 0:N.matches("input[data-editor-input],textarea[data-editor-input]");if(Q&&Q.start!==Q.end&&(B!=null&&B.rangeCount)&&!L&&!e.locked){const Z=B.getRangeAt(0).getBoundingClientRect();if(Z.bottom>0&&Z.top<window.innerHeight){w({top:Z.top,bottom:Z.bottom,left:Z.left});return}}w(null);const X=_.ownerDocument.getSelection();if(X&&!X.isCollapsed&&X.anchorNode&&!_.contains(X.anchorNode)){const Z=e.current.current.selection.end;e.capture({start:Z,end:Z})}};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]),h.useLayoutEffect(()=>{if(!(!e.restoreVersion||!y.current||!e.restoreRequested.current))if(e.restoreRequested.current=!1,e.source&&v.current)v.current.focus({preventScroll:!0}),v.current.setSelectionRange(e.selection.start,e.selection.end);else{const $=e.document.blocks.find(N=>N.kind==="codeBlock"&&e.selection.start>=N.bodyStart&&e.selection.end<=N.bodyStart+N.body.length),_=$&&y.current.querySelector(`textarea[data-code-block="${$.id}"]`);_&&$?(_.focus({preventScroll:!0}),_.setSelectionRange(e.selection.start-$.bodyStart,e.selection.end-$.bodyStart)):bp(y.current,e.selection)}},[e.restoreVersion,e.source]);const U=()=>{v.current&&e.capture({start:v.current.selectionStart,end:v.current.selectionEnd})};return r.jsxs(i.Vertical,{ref:y,gap:12,minWidth:0,"aria-label":g,"aria-disabled":s,...p,...f.container,onCopy:S.onCopy,onCut:S.onCut,onPaste:S.onPaste,onPointerDownCapture:S.onPointerDownCapture,onInputCapture:S.onInputCapture,onCompositionStartCapture:S.onCompositionStartCapture,onCompositionEndCapture:S.onCompositionEndCapture,onDragOver:$=>{if(!x.current||e.locked)return;$.preventDefault(),$.dataTransfer.dropEffect="move";const _=G($.clientY);_!==null&&O(_)},onDragLeave:$=>{const _=$.currentTarget.getBoundingClientRect();($.clientX<_.left||$.clientX>_.right||$.clientY<_.top||$.clientY>_.bottom)&&P.current&&O(P.current.from)},onDrop:$=>{var N;if(!x.current||e.locked)return;$.preventDefault();const _=G($.clientY);if(_!==null&&((N=e.document.blocks[_])==null?void 0:N.id)!==x.current){W.current=new Map(j().map(B=>[B.dataset.editorRow,B.getBoundingClientRect().top]));const Q=P.current;Q&&C.current&&W.current.set(Q.id,C.current.getBoundingClientRect().top+H(_,Q)),e.move(x.current,_)}A()},onKeyDown:$=>{$.nativeEvent.isComposing||($.key==="Escape"&&(A(),e.setCommandId(null),e.setLinkOpen(!1),e.linkOpen&&e.restoreSelection(),e.ai&&e.closeAi(),w(null)),S.onKeyDown($))},children:[!d&&r.jsxs(i.Vertical,{position:"sticky",top:0,zIndex:10,backgroundColor:k==="dark"?"color-gray-900":"color-white",borderWidth:1,borderColor:"color-gray-200",borderStyle:"solid",borderRadius:8,padding:8,gap:4,children:[r.jsx(vn,{state:e,props:o,preserve:F}),e.source&&r.jsx(vn,{state:e,props:o,formatting:!0,preserve:F})]}),e.document.sourceMode&&r.jsx(i.Text,{role:"status",...f.notice,children:e.labels.sourceFallback}),e.message&&r.jsx(i.Text,{role:"status",...f.notice,children:e.message}),e.source?r.jsx(Do,{value:e.value,"data-editor-input":"true","data-editor-offset":0,label:g,isDisabled:s,isReadOnly:d,inputRef:$=>{v.current=$},onSelect:U,onFocus:U,onChange:$=>e.commit($,v.current?{start:v.current.selectionStart,end:v.current.selectionEnd}:e.selection,!0,!1),views:{textarea:{minHeight:240,fontFamily:"monospace",...f.source}}}):r.jsxs(i.Vertical,{ref:C,position:"relative",gap:12,"data-editor-block-list":"true",children:[M&&r.jsx(i.View,{"data-editor-drop-placeholder":M.to,"aria-hidden":"true",position:"absolute",left:0,right:0,top:0,height:M.height,borderWidth:1,borderStyle:"dashed",boxSizing:"border-box",borderColor:"theme-primary",borderRadius:8,backgroundColor:"theme-primary",opacity:.14,pointerEvents:"none",style:{transform:`translateY(${M.top}px)`,transition:M.reducedMotion?"none":"transform 180ms cubic-bezier(0.2, 0, 0, 1)"}}),e.document.blocks.map(($,_)=>{var N,Q;return r.jsxs(i.Horizontal,{gap:8,alignItems:"flex-start",position:"relative",borderRadius:6,backgroundColor:S.selectedDocument?"theme-primary-100":e.activeId===$.id?"color-gray-50":void 0,_hover:{backgroundColor:"color-gray-50"},"data-editor-row":$.id,...f.block,opacity:(M==null?void 0:M.id)===$.id?0:((N=f.block)==null?void 0:N.opacity)??1,style:{...(Q=f.block)==null?void 0:Q.style,...M?{transform:`translateY(${V(_,M)}px)`,transition:M.reducedMotion?"none":"transform 180ms cubic-bezier(0.2, 0, 0, 1)"}:{}},children:[!d&&r.jsx(qo,{views:{menu:{borderWidth:1,borderStyle:"solid",borderColor:"color-gray-300",backgroundColor:k==="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:r.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:M?"grabbing":"grab","aria-label":e.labels.drag,onDragStart:B=>{var X;if(e.locked){B.preventDefault();return}x.current=$.id,D.current.forEach(Z=>Z.cancel()),D.current=[];const L=B.currentTarget.closest("[data-editor-row]");if(L){const Z=L.getBoundingClientRect(),ee=j(),ae=ee[_+1],re=ee[_-1],ie=ae?ae.offsetTop-L.offsetTop-L.offsetHeight:re?L.offsetTop-re.offsetTop-re.offsetHeight:0,R={id:$.id,from:_,to:_,height:L.offsetHeight,extent:L.offsetHeight+Math.max(0,ie),top:L.offsetTop,reducedMotion:!!((X=window.matchMedia)!=null&&X.call(window,"(prefers-reduced-motion: reduce)").matches)};P.current=R,T.current=window.requestAnimationFrame(()=>{T.current=null,P.current&&E(P.current)});const ne=L.cloneNode(!0);let se="Canvas";for(let he=L;he;he=he.parentElement){const xe=window.getComputedStyle(he).backgroundColor;if(xe!=="transparent"&&xe!=="rgba(0, 0, 0, 0)"){se=xe;break}}Object.assign(ne.style,{position:"fixed",left:"-10000px",top:"0",width:`${Z.width}px`,padding:"8px",boxSizing:"border-box",borderRadius:"8px",backgroundColor:se,boxShadow:"0 8px 24px rgba(0,0,0,0.18)",opacity:"1"}),ne.dataset.editorDragPreview="true",ne.setAttribute("aria-hidden","true"),ne.inert=!0,ne.querySelectorAll("[contenteditable]").forEach(he=>{he.style.outline="none"}),L.ownerDocument.body.appendChild(ne),I.current=ne,B.dataTransfer.setDragImage(ne,B.clientX-Z.left+8,B.clientY-Z.top+8)}B.dataTransfer.setData("application/x-app-studio-block",$.id),B.dataTransfer.effectAllowed="move"},onDragEnd:A,children:r.jsx(ra,{widthHeight:18,strokeWidth:2})}),items:[{id:"transform",label:e.labels.blocks,disabled:e.locked,onClick:()=>e.setCommandId($.id)},...["below","duplicate","up","down","delete"].map(B=>({id:B,label:e.labels[B],disabled:e.locked||B==="up"&&_===0||B==="down"&&_===e.document.blocks.length-1,onClick:()=>e.action($.id,B)}))]},`${e.restoreVersion}-${e.commandId??""}`),$.kind==="codeBlock"?r.jsx(Do,{"data-code-block":$.id,"data-editor-input":"true","data-editor-offset":$.bodyStart,label:e.labels.codeBlock,value:$.body,variant:"none",isDisabled:s,isReadOnly:d,onFocus:()=>e.setActiveId($.id),onSelect:B=>e.capture({start:$.bodyStart+B.currentTarget.selectionStart,end:$.bodyStart+B.currentTarget.selectionEnd}),onChange:B=>{var Z;const L=(Z=y.current)==null?void 0:Z.querySelector(`textarea[data-code-block="${$.id}"]`),X=Co($.raw,{start:$.bodyStart-$.start,end:$.bodyStart-$.start+$.body.length},B);e.editBlock($,X,{start:$.bodyStart-$.start+((L==null?void 0:L.selectionStart)??B.length),end:$.bodyStart-$.start+((L==null?void 0:L.selectionEnd)??B.length)})},views:{textarea:{fontFamily:"monospace",minHeight:100},container:{flex:1,borderWidth:0}}}):r.jsx(wp,{block:$,state:e,label:g,views:f})]},$.id)})]}),b&&!e.source&&!e.locked&&!e.ai&&!e.linkOpen&&r.jsx(or,{children:r.jsx(Cp,{rect:b,state:e,props:o,preserve:F})}),r.jsx(wo,{open:!!e.commandId&&!e.locked,onOpenChange:$=>{$||e.closeCommand()},placeholder:e.labels.blocks,commands:qm.map($=>({id:$,name:e.labels[$],onSelect:()=>{e.commandId&&e.transform(e.commandId,$)}}))}),r.jsx(yp,{state:e,views:f}),m]})}const vp=e=>{const o=Ym(e);return r.jsx(Sp,{...e,state:o})};function Tp({value:e,label:o,onLinkPress:t,labels:n,views:a={},native:l=!1,codeFontFamily:c="monospace",...g}){const s=h.useMemo(()=>Rr(e),[e]);return r.jsx(i.Vertical,{gap:12,minWidth:0,...l?{accessibilityLabel:o}:{role:o?"region":void 0,"aria-label":o},...g,...a.container,children:s.sourceMode?r.jsxs(r.Fragment,{children:[r.jsx(i.Text,{...a.notice,children:(n==null?void 0:n.sourceFallback)??"This Markdown contains unsupported syntax. Its source is shown as plain text."}),r.jsx(i.Text,{fontFamily:c,...l?{selectable:!0}:{style:{whiteSpace:"pre-wrap",overflowWrap:"anywhere"}},...a.source,children:e})]}):s.blocks.filter(d=>d.raw).map(d=>r.jsx(i.View,{minWidth:0,...a.block,children:r.jsx(Ui,{block:d,native:l,codeFontFamily:c,isDisplay:!0,onLinkPress:t})},d.id))})}const Ip=e=>r.jsx(Tp,{...e}),Fp=e=>{const o=Ql(e);return r.jsx(Zl,{...o,...e})},Gi={"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"},ot={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"},zp={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"}]},Mp=(e,o,t,n,a)=>{const l=o.map(c=>`${c.color} ${c.position||""}`).join(", ");switch(e){case"linear":return`linear-gradient(${t&&Gi[t]?Gi[t]:t||"to right"}, ${l})`;case"radial":const g=a&&ot[a]?ot[a]:a||"center";return`radial-gradient(${n||"circle"} at ${g}, ${l})`;case"conic":return`conic-gradient(from 0deg at ${a&&ot[a]?ot[a]:a||"center"}, ${l})`;default:return`linear-gradient(to right, ${l})`}},jp={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)"}}}},Yi={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"}},Wp=({type:e="linear",direction:o="to-right",shape:t="circle",position:n="center",from:a,to:l,colors:c,animate:g=!1,animationDuration:s=3,children:d,views:u,themeMode:f,...m})=>{const p=h.useMemo(()=>c&&c.length>0?c:a&&l?[{color:a,position:"0%"},{color:l,position:"100%"}]:zp[e],[c,a,l,e]),y=h.useMemo(()=>{const b=p.map(w=>({...w,color:w.color}));return Mp(e,b,o,t,n)},[e,p,o,t,n]),k=h.useMemo(()=>{if(!g)return{};const b=jp[e];return{...b,transition:b.transition.replace("3s",`${s}s`),animationDuration:`${s}s`,animationIterationCount:"infinite",animationTimingFunction:e==="conic"?"linear":"ease-in-out"}},[g,s,e]);return r.jsx(i.View,{background:y,...Yi.container,...k,...u==null?void 0:u.container,...m,children:d&&r.jsx(i.View,{...Yi.content,...u==null?void 0:u.content,children:d})})},Ki=e=>r.jsx(Wp,{...e}),Ep=(e=null,o=null)=>{const[t,n]=h.useState(e),[a,l]=h.useState(o),c=s=>a===s,g=s=>{l(d=>d===s?null:s)};return h.useEffect(()=>{const s=u=>{!u.composedPath().some(p=>(p==null?void 0:p.id)==="menubar-content"||(p==null?void 0:p.id)==="menubar-trigger")&&a!==null&&l(null)},d=u=>{u.key==="Escape"&&a!==null&&l(null)};if(!(typeof document>"u"))return document.addEventListener("mousedown",s),document.addEventListener("keydown",d),()=>{document.removeEventListener("mousedown",s),document.removeEventListener("keydown",d)}},[a]),{activeMenuId:t,setActiveMenuId:n,openMenuId:a,setOpenMenuId:l,isMenuOpen:c,toggleMenu:g}},Xi={sm:{padding:"6px 10px",fontSize:"14px"},md:{padding:"8px 12px",fontSize:"16px"},lg:{padding:"10px 16px",fontSize:"18px"}},Ap={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"}},Hp={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},rt={active:{backgroundColor:"color-gray-200",fontWeight:"bold"},hover:{backgroundColor:"color-gray-100"},disabled:{opacity:.5,cursor:"not-allowed"}},Ji=h.createContext({activeMenuId:null,setActiveMenuId:()=>{},openMenuId:null,setOpenMenuId:()=>{},isMenuOpen:()=>!1,toggleMenu:()=>{},orientation:"horizontal",size:"md",variant:"default",triggerRefs:{current:{}}}),tt=()=>h.useContext(Ji),Vp=({value:e,children:o})=>r.jsx(Ji.Provider,{value:e,children:o}),Qi=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",views:a,...l})=>{const c=o==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(c,{role:"menubar","aria-orientation":o,...Hp[o],...Ap[n],...a==null?void 0:a.container,...l,children:e})},Zi=({children:e,id:o,disabled:t=!1,views:n})=>{const{orientation:a}=tt(),l=a==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(l,{role:"none",position:"relative",opacity:t?.5:1,pointerEvents:t?"none":"auto",...n==null?void 0:n.menu,children:h.Children.map(e,c=>h.isValidElement(c)?h.cloneElement(c,{...c.props,menuId:o}):c)})},Ri=({children:e,menuId:o,disabled:t=!1,views:n})=>{const{activeMenuId:a,setActiveMenuId:l,toggleMenu:c,isMenuOpen:g,size:s,triggerRefs:d}=tt(),u=h.useRef(null),f=a===o,m=g(o);h.useEffect(()=>(u.current&&o&&(d.current[o]=u.current),()=>{o&&delete d.current[o]}),[o,d]);const p=()=>{t||(l(o),c(o))};return r.jsx(i.View,{ref:u,id:"menubar-trigger",role:"menuitem","aria-haspopup":"true","aria-expanded":m,userSelect:"none",display:"flex",alignItems:"center",justifyContent:"space-between",...Xi[s],...f?rt.active:{},...t?rt.disabled:{},_hover:t?{}:rt.hover,onClick:p,...n==null?void 0:n.trigger,children:e})},ec=({children:e,menuId:o,views:t})=>{const{isMenuOpen:n,orientation:a,triggerRefs:l}=tt(),c=h.useRef(null),[g,s]=h.useState({x:0,y:0,placement:a==="horizontal"?"bottom":"right"}),d=n(o);if(h.useEffect(()=>{if(d&&c.current&&o&&l.current[o]){const f=c.current.getBoundingClientRect(),m=l.current[o].getBoundingClientRect(),p=Math.max(f.width||200,200),y=Math.max(f.height||150,150),k=window.innerWidth,b=window.innerHeight,w={top:m.top,right:k-m.right,bottom:b-m.bottom,left:m.left},C=a==="horizontal"?[{placement:"bottom",space:w.bottom,fits:w.bottom>=y+8,x:m.left,y:m.bottom+8},{placement:"top",space:w.top,fits:w.top>=y+8,x:m.left,y:m.top-y-8},{placement:"right",space:w.right,fits:w.right>=p+8,x:m.right+8,y:m.top},{placement:"left",space:w.left,fits:w.left>=p+8,x:m.left-p-8,y:m.top}]:[{placement:"right",space:w.right,fits:w.right>=p+8,x:m.right+8,y:m.top},{placement:"left",space:w.left,fits:w.left>=p+8,x:m.left-p-8,y:m.top},{placement:"bottom",space:w.bottom,fits:w.bottom>=y+8,x:m.left,y:m.bottom+8},{placement:"top",space:w.top,fits:w.top>=y+8,x:m.left,y:m.top-y-8}],v=C.find(T=>T.fits);if(v){s({x:v.x,y:v.y,placement:v.placement});return}const S=C.reduce((T,W)=>W.space>T.space?W:T);let x=S.x,I=S.y;x+p>k&&(x=k-p-8),x<8&&(x=8),I+y>b&&(I=b-y-8),I<8&&(I=8),s({x,y:I,placement:S.placement})}},[d,a,o,l]),!d)return null;const u={position:"fixed",left:g.x,top:g.y,zIndex:1e3};return r.jsx(i.View,{ref:c,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:u,...t==null?void 0:t.content,children:e})},oc=({children:e,icon:o,disabled:t=!1,onClick:n,views:a})=>{const{size:l}=tt(),c=()=>{t||!n||n()};return r.jsxs(i.View,{role:"menuitem",cursor:t?"not-allowed":"pointer",userSelect:"none",display:"flex",alignItems:"center",opacity:t?.5:1,...Xi[l],_hover:t?{}:rt.hover,onClick:c,...a==null?void 0:a.item,children:[o&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:o}),e]})},rc=({views:e})=>r.jsx(i.View,{role:"separator",height:"1px",backgroundColor:"color-gray-200",margin:"4px 0",...e==null?void 0:e.separator}),Pp=({items:e,orientation:o,size:t,variant:n,views:a,themeMode:l})=>r.jsx(Qi,{orientation:o,size:t,variant:n,views:a,children:e.map(c=>r.jsxs(Zi,{id:c.id,disabled:c.disabled,views:a,children:[r.jsxs(Ri,{menuId:c.id,views:a,children:[c.icon&&r.jsx(i.View,{marginRight:8,...a==null?void 0:a.icon,children:c.icon}),c.label]}),c.items&&c.items.length>0&&r.jsx(ec,{menuId:c.id,views:a,children:c.items.map((g,s)=>g.separator?r.jsx(rc,{views:a},`separator-${s}`):r.jsx(oc,{id:g.id,icon:g.icon,disabled:g.disabled,onClick:g.onClick,views:a,children:g.label},g.id))})]},c.id))}),So=({items:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultActiveMenuId:a=null,defaultOpenMenuId:l=null,views:c,...g})=>{const{activeMenuId:s,setActiveMenuId:d,openMenuId:u,setOpenMenuId:f,isMenuOpen:m,toggleMenu:p}=Ep(a,l),y=h.useRef({});return r.jsx(Vp,{value:{activeMenuId:s,setActiveMenuId:d,openMenuId:u,setOpenMenuId:f,isMenuOpen:m,toggleMenu:p,orientation:o,size:t,variant:n,triggerRefs:y},children:r.jsx(Pp,{items:e,orientation:o,size:t,variant:n,views:c,...g})})};So.Root=Qi,So.Menu=Zi,So.Trigger=Ri,So.Content=ec,So.Item=oc,So.Separator=rc;const Dp=(e,o,t)=>{const[n,a]=h.useState([]);return h.useEffect(()=>{a((()=>{const c=[];if(o<=t)for(let g=1;g<=o;g++)c.push(g);else{c.push(1);let g=Math.max(2,e-Math.floor((t-2)/2)),s=Math.min(o-1,g+t-3);s>=o-1&&(s=o-1,g=Math.max(2,s-(t-3))),g>2&&c.push("...");for(let d=g;d<=s;d++)c.push(d);s<o-1&&c.push("..."),c.push(o)}return c})())},[e,o,t]),{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"}}}},br={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"}}},xr={rounded:{borderRadius:8},square:{borderRadius:"0px"},circular:{borderRadius:"50%"}},$p={backgroundColor:"theme-primary",color:"color-white",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"theme-primary",opacity:.9}},nt={opacity:.5,cursor:"not-allowed",transition:"all 0.2s ease-in-out",_hover:{backgroundColor:"transparent"}},Lp=({currentPage:e,totalPages:o,onPageChange:t,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:l,showPageSizeSelector:c=!1,showPageInfo:g=!0,maxPageButtons:s=5,showFirstLastButtons:d=!1,size:u="md",variant:f="default",shape:m="rounded",visiblePageNumbers:p=[],views:y,...k})=>{const b=v=>{v<1||v>o||v===e||t(v)},w=v=>{l&&l(Number(v.target.value))},C=(v,S)=>{if(v==="...")return r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",...Go[u],...y==null?void 0:y.ellipsis,children:"..."},`ellipsis-${S}`);const x=v===e;return r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:x?"default":"pointer",...Go[u],...br[f],...xr[m],...x?$p:{},onClick:()=>b(v),"aria-label":`Page ${v}`,"aria-current":x?"page":void 0,...x?y==null?void 0:y.activePageButton:y==null?void 0:y.pageButton,children:v},`page-${v}`)};return r.jsxs(i.Horizontal,{alignItems:"center",gap:8,...y==null?void 0:y.container,...k,children:[d&&r.jsxs(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Go[u],...br[f],...xr[m],...e===1?nt:{},onClick:()=>b(1),"aria-label":"First page",disabled:e===1,...y==null?void 0:y.navigationButton,children:[r.jsx(ye,{orientation:"left",widthHeight:16}),r.jsx(ye,{orientation:"left",widthHeight:16,marginLeft:"-8px"})]}),r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===1?"not-allowed":"pointer",...Go[u],...br[f],...xr[m],...e===1?nt:{},onClick:()=>b(e-1),"aria-label":"Previous page",disabled:e===1,...y==null?void 0:y.navigationButton,children:r.jsx(ye,{orientation:"left",widthHeight:16})}),p.map((v,S)=>C(v,S)),r.jsx(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Go[u],...br[f],...xr[m],...e===o?nt:{},onClick:()=>b(e+1),"aria-label":"Next page",disabled:e===o,...y==null?void 0:y.navigationButton,children:r.jsx(ye,{orientation:"right",widthHeight:16})}),d&&r.jsxs(i.View,{as:"button",display:"flex",alignItems:"center",justifyContent:"center",cursor:e===o?"not-allowed":"pointer",...Go[u],...br[f],...xr[m],...e===o?nt:{},onClick:()=>b(o),"aria-label":"Last page",disabled:e===o,...y==null?void 0:y.navigationButton,children:[r.jsx(ye,{orientation:"right",widthHeight:16}),r.jsx(ye,{orientation:"right",widthHeight:16,marginLeft:"-8px"})]}),g&&r.jsxs(i.Text,{marginLeft:16,color:"color-gray-600",...y==null?void 0:y.pageInfo,children:["Page ",e," of ",o]}),c&&l&&r.jsx(i.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:w,...y==null?void 0:y.pageSizeSelector,children:a.map(v=>r.jsx("option",{value:v.value,children:v.label},v.value))})]})},tc=({currentPage:e,totalPages:o,onPageChange:t,pageSize:n=10,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:c=!1,showPageInfo:g=!0,maxPageButtons:s=5,showFirstLastButtons:d=!1,size:u="md",variant:f="default",shape:m="rounded",views:p,...y})=>{const{visiblePageNumbers:k}=Dp(e,o,s);return r.jsx(Lp,{currentPage:e,totalPages:o,onPageChange:t,pageSize:n,pageSizeOptions:a,onPageSizeChange:l,showPageSizeSelector:c,showPageInfo:g,maxPageButtons:s,showFirstLastButtons:d,size:u,variant:f,shape:m,visiblePageNumbers:k,views:p,...y})},Bp=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),_p=h.memo(({shape:e="linear",value:o=0,max:t=100,color:n="theme-primary",backgroundColor:a="color-gray-200",height:l,size:c,radius:g=4,strokeWidth:s=10,showLabel:d=!1,labelColor:u="color-black-primary",animated:f=!0,animationDuration:m="0.5s",views:p,themeMode:y,...k})=>{var P;const{getColor:b,themeMode:w}=i.useTheme(),C=y||w,S=Math.min(t,Math.max(0,o))/t*100,x=M=>Bp(M)?M:b(M,{themeMode:C}),I=h.useMemo(()=>x(a),[b,a,C]),T=h.useMemo(()=>x(n),[b,n,C]);if(e==="circle"){const M=c||(typeof l=="number"?l:100),E=(M-s)/2,F=2*Math.PI*E,j=F-S/100*F;return r.jsxs(i.View,{width:M,height:M,position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...p==null?void 0:p.container,...k,children:[r.jsxs("svg",{width:M,height:M,viewBox:`0 0 ${M} ${M}`,style:{transform:"rotate(-90deg)"},children:[r.jsx("circle",{cx:M/2,cy:M/2,r:E,stroke:I,strokeWidth:s,fill:"transparent",...p==null?void 0:p.track}),r.jsx("circle",{cx:M/2,cy:M/2,r:E,stroke:T,strokeWidth:s,strokeDasharray:F,strokeDashoffset:j,strokeLinecap:"round",fill:"transparent",style:{transition:f?`stroke-dashoffset ${m} ease-in-out`:"none"},...p==null?void 0:p.indicator})]}),d&&r.jsx(i.View,{position:"absolute",top:0,left:0,right:0,bottom:0,display:"flex",alignItems:"center",justifyContent:"center",pointerEvents:"none",children:r.jsxs(i.Text,{color:u,fontSize:`${M*.2}px`,fontWeight:"bold",...p==null?void 0:p.text,children:[Math.round(S),"%"]})})]})}const W=l||8,D={backgroundColor:I,...((P=p==null?void 0:p.container)==null?void 0:P.style)||{},...k.style||{}};return r.jsxs(i.View,{role:"progressbar","aria-valuenow":o,"aria-valuemin":0,"aria-valuemax":t,width:"100%",height:W,borderRadius:g,overflow:"hidden",position:"relative",display:"flex",alignItems:"center",justifyContent:"center",...p==null?void 0:p.container,...k,style:D,children:[r.jsx("div",{style:{height:"100%",backgroundColor:T,borderRadius:typeof g=="number"?`${g}px`:g,position:"absolute",left:0,top:0,bottom:0,width:`${S}%`,transition:f?`width ${m} ease-in-out`:"none",...p==null?void 0:p.bar}}),d&&r.jsxs(i.Text,{color:u,fontSize:typeof W=="number"&&W>16?`${W*.6}px`:"10px",fontWeight:"bold",position:"relative",zIndex:1,...p==null?void 0:p.text,children:[Math.round(S),"%"]})]})}),nc=e=>{const o=Ce("progress",e);return r.jsx(_p,{...o})},Op=(e=>({solid:"solid",dashed:"dashed",dotted:"dotted"}))(),Np={thin:"1px",medium:"2px",thick:"4px"},kr={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"}},qp=e=>typeof e=="string"&&(/^(#|rgb\(|rgba\(|hsl\(|hsla\(|var\()/.test(e)||["black","currentColor","inherit","transparent","white"].includes(e)),Up=({orientation:e="horizontal",variant:o="solid",thickness:t="thin",color:n,spacing:a="0px",label:l,decorative:c=!1,views:g,themeMode:s,...d})=>{const{themeMode:u}=i.useTheme(),f=n||"color-gray-200",m=Op[o],p=Np[t],y=c?{"aria-hidden":!0}:{role:"separator","aria-orientation":e},k=qp(f)?{style:{borderColor:f}}:{borderColor:f};return l&&e==="horizontal"?r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"center",width:"100%",padding:a,...y,...d,children:[r.jsx(i.View,{height:"0px",flexGrow:1,borderTop:`${p} ${m}`,...k,...kr.container,...g==null?void 0:g.container}),r.jsx(i.Text,{...kr.label,...g==null?void 0:g.label,children:l}),r.jsx(i.View,{height:"0px",flexGrow:1,borderTop:`${p} ${m}`,...k,...kr.container,...g==null?void 0:g.container})]}):e==="horizontal"?r.jsx(i.View,{height:"0px",width:"100%",borderTop:`${p} ${m}`,padding:a,...k,...kr.container,...y,...g==null?void 0:g.container,...d}):r.jsx(i.View,{width:"0px",height:"100%",borderLeft:`${p} ${m}`,padding:a,...k,...kr.container,...y,...g==null?void 0:g.container,...d})},ac=e=>{const o=Ce("separator",e);return r.jsx(Up,{...o})},at=ac,Gp=ac,Yp={xs:12,sm:14,md:16,lg:18,xl:20},Kp=({isSupported:e,isSharing:o,onShare:t,label:n,children:a,icon:l,size:c,isDisabled:g,isLoading:s,iconPosition:d,disableWhenUnsupported:u=!0,...f})=>{const m=c??"md",p=l??r.jsx(la,{widthHeight:Yp[m],strokeWidth:1.5,filled:!1}),y=!!g||!e&&u,k=!!s||o;return r.jsx(me,{...f,size:m,icon:p,iconPosition:d??"left",isDisabled:y,isLoading:k,onClick:t,children:a??n??"Share"})},lc=()=>typeof navigator>"u"?void 0:navigator,Xp=(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},Jp=e=>{if(typeof e=="object"&&e!==null&&"name"in e)return String(e.name)},Qp=e=>{const{shareData:o,onClick:t,onUnsupported:n,onShareStart:a,onShareSuccess:l,onShareCancel:c,onShareError:g}=e,[s,d]=h.useState(!1),u=h.useMemo(()=>Xp(lc(),o),[o]),f=h.useCallback((...m)=>{t==null||t(...m);const p=lc();if(!p||typeof p.share!="function"){n==null||n();return}if(!s){if(typeof p.canShare=="function")try{if(!p.canShare(o)){n==null||n();return}}catch(y){g==null||g(y);return}d(!0),a==null||a();try{p.share(o).then(()=>{l==null||l()}).catch(y=>{if(Jp(y)==="AbortError"){c==null||c();return}g==null||g(y)}).finally(()=>{d(!1)})}catch(y){d(!1),g==null||g(y)}}},[s,t,c,g,a,l,n,o]);return{isSupported:u,isSharing:s,handleShare:f}},ic=e=>{const{isSupported:o,isSharing:t,handleShare:n}=Qp(e),{shareData:a,onShareStart:l,onShareSuccess:c,onShareCancel:g,onShareError:s,onUnsupported:d,onClick:u,...f}=e;return r.jsx(Kp,{...f,isSupported:o,isSharing:t,onShare:n})},Zp=({label:e,status:o="default",views:t,themeMode:n,...a})=>{const{themeMode:l}=i.useTheme(),c=ka();return r.jsxs(i.Horizontal,{alignItems:"center",gap:8,role:"status",...t==null?void 0:t.container,...a,children:[r.jsx(i.View,{"data-role":"status-dot","aria-hidden":"true",width:"8px",height:"8px",borderRadius:"50%",...c[o].indicator,...t==null?void 0:t.indicator}),e&&r.jsx(i.Text,{"data-role":"status-label",fontSize:"14px",lineHeight:"20px",...c[o].label,...t==null?void 0:t.label,children:e})]})},lt=e=>{const o=Ce("status",e);return r.jsx(Zp,{...o})},Rp=(e=!0,o,t,n)=>{const{on:a}=i.useResponsive(),l=a("mobile"),[c,g]=h.useState(o!==void 0?o:e);return h.useEffect(()=>{o!==void 0&&g(o)},[o]),{isExpanded:c,toggleExpanded:()=>{const f=!c;g(f),t&&t(f)},expand:()=>{c||(g(!0),t&&t(!0))},collapse:()=>{c&&(g(!1),t&&t(!1))},isMobile:l}},ey={sm:{expandedWidth:"240px",collapsedWidth:"64px"},md:{expandedWidth:"280px",collapsedWidth:"72px"},lg:{expandedWidth:"320px",collapsedWidth:"80px"},xl:{expandedWidth:"360px",collapsedWidth:"88px"}},oy=(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"}}))(),ry={left:{left:0,borderRightWidth:"1px",borderRightStyle:"solid",borderRightColor:"color-gray-200"},right:{right:0,borderLeftWidth:"1px",borderLeftStyle:"solid",borderLeftColor:"color-gray-200"}},ty={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)"}},ny={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)"},cc=h.createContext({isExpanded:!0,toggleExpanded:()=>{},expand:()=>{},collapse:()=>{},position:"left",size:"md",variant:"default"}),it=()=>h.useContext(cc),ay=({value:e,children:o})=>r.jsx(cc.Provider,{value:e,children:o}),ly=({children:e,showToggleButton:o=!0,views:t,...n})=>{const{isExpanded:a,toggleExpanded:l,position:c}=it();return r.jsx(i.Horizontal,{width:"100%",padding:"16px",borderBottomWidth:"1px",borderBottomStyle:"solid",borderBottomColor:"color-gray-200",alignItems:"center",justifyContent:"space-between",...t==null?void 0:t.header,...n,children:a?r.jsxs(i.Horizontal,{width:"100%",alignItems:"center",justifyContent:"space-between",children:[e,o&&r.jsx(i.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:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(ye,{orientation:c==="left"?"left":"right",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})]}):r.jsx(i.View,{width:"100%",display:"flex",alignItems:"center",justifyContent:"center",children:o&&r.jsx(i.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:l,"aria-label":a?"Collapse sidebar":"Expand sidebar",...t==null?void 0:t.toggleButton,children:r.jsx(ye,{orientation:c==="left"?"right":"left",widthHeight:16,...t==null?void 0:t.toggleButtonIcon})})})})},iy=({children:e,views:o,...t})=>{const{isExpanded:n}=it();return r.jsx(i.View,{flex:"1",width:"100%",overflowY:"auto",overflowX:"hidden",padding:n?"16px":"8px",...o==null?void 0:o.content,...t,children:e})},cy=({children:e,views:o,...t})=>{const{isExpanded:n}=it();return r.jsx(i.View,{width:"100%",padding:n?"16px":"8px",borderTopWidth:"1px",borderTopStyle:"solid",borderTopColor:"color-gray-200",...o==null?void 0:o.footer,...t,children:e})},sy=({children:e,position:o="left",size:t="md",variant:n="default",fixed:a=!1,hasBackdrop:l=!0,expandedWidth:c,collapsedWidth:g,breakpoint:s,breakpointBehavior:d="overlay",elevation:u="none",transitionPreset:f="normal",ariaLabel:m="Sidebar navigation",showToggleButton:p,toggleExpanded:y,expand:k,isExpanded:b,isMobile:w,collapse:C,views:v,themeMode:S,...x})=>{const I=ey[t],T=b?c||I.expandedWidth:g||I.collapsedWidth,W=!w||w&&d!=="hide",D=a||w&&d==="overlay"?"fixed":"relative",P=l&&w&&b&&d==="overlay";return r.jsxs(r.Fragment,{children:[P&&r.jsx(i.View,{position:"fixed",top:0,left:0,width:"100vw",height:"100vh",backgroundColor:"color-dark-50-360",zIndex:998,onClick:C,...v==null?void 0:v.backdrop}),W&&r.jsx(i.Vertical,{position:D,top:0,height:"100vh",width:T,zIndex:999,transition:ny[f],transform:w&&d==="overlay"&&!b?`translateX(${o==="left"?"-100%":"100%"})`:"translateX(0)",role:"navigation","aria-label":m,...oy[n],...ry[o],...ty[u],...v==null?void 0:v.container,...x,children:h.Children.map(e,M=>M)})]})},Cr=({children:e,position:o="left",size:t="md",variant:n="default",defaultExpanded:a=!0,expanded:l,onExpandedChange:c,fixed:g=!1,hasBackdrop:s=!0,showToggleButton:d=!0,expandedWidth:u,collapsedWidth:f,breakpoint:m=768,breakpointBehavior:p="overlay",views:y,...k})=>{const{isExpanded:b,toggleExpanded:w,expand:C,collapse:v,isMobile:S}=Rp(a,l,c);return r.jsx(ay,{value:{isExpanded:b,toggleExpanded:w,expand:C,collapse:v,position:o,size:t,variant:n,views:y},children:r.jsx(sy,{position:o,size:t,variant:n,fixed:g,hasBackdrop:s,showToggleButton:d,expandedWidth:u,collapsedWidth:f,breakpoint:m,breakpointBehavior:p,isExpanded:b,isMobile:S,toggleExpanded:w,expand:C,collapse:v,views:y,...k,children:e})})};Cr.Header=ly,Cr.Content=iy,Cr.Footer=cy,Cr.useContext=it;const dy=()=>({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(t){console.warn("Failed to write to localStorage:",t)}}}),gy=(e,o,t,n=50,a=1/0,l=!1,c,g,s=10)=>{const[d,u]=h.useState(!1),[f,m]=h.useState([]),p=h.useRef(null),y=h.useRef(null),k=h.useRef(0),b=h.useRef([]),w=h.useRef(g||(typeof window<"u"?dy():null)),C=h.useCallback(()=>p.current?e==="horizontal"?p.current.offsetWidth:p.current.offsetHeight:0,[e]),v=h.useCallback(()=>{if(!c||!w.current)return null;const A=w.current.getItem(c);if(!A)return null;try{const V=JSON.parse(A);return Array.isArray(V.sizes)?V.sizes:null}catch(V){return console.warn("Failed to parse saved panel sizes:",V),null}},[c]),S=h.useCallback(()=>{if(!c||!w.current||f.length===0)return;const A=f.map(V=>({id:V.id,size:V.size,collapsed:V.collapsed||!1}));w.current.setItem(c,JSON.stringify({sizes:A}))},[c,f]),x=h.useCallback((A,V,H,O,G)=>{m(U=>U.some($=>$.id===A)?U:[...U,{id:A,size:V,minSize:H??n,maxSize:O??a,collapsible:G??l,collapsed:!1}])},[n,a,l]),I=h.useCallback(A=>{m(V=>V.filter(H=>H.id!==A))},[]),T=h.useCallback(A=>{const V=f.find(H=>H.id===A);return V?V.size:0},[f]),W=h.useCallback((A,V)=>{m(H=>H.map(O=>O.id===A?{...O,size:V}:O))},[]),D=h.useCallback(A=>{const V=f.find(H=>H.id===A);return V?!!V.collapsed:!1},[f]),P=h.useCallback(A=>{m(V=>{const H=V.findIndex($=>$.id===A);if(H===-1)return V;const O=V[H];if(!O.collapsible)return V;const G={...O,collapsed:!O.collapsed},U=[...V];return U[H]=G,U})},[]),M=h.useCallback((A,V)=>{y.current=A,k.current=V,b.current=f.map(H=>H.size),u(!0)},[f]),E=h.useCallback(A=>{if(!d||!y.current)return;const V=y.current,H=A-k.current;let O=-1;const G=V.match(/\d+$/);if(G&&(O=parseInt(G[0],10)-1),O===-1&&f.length>=2&&(O=0),O<0||O>=f.length-1)return;const U=f[O],$=f[O+1];if(U.collapsed||$.collapsed)return;let _=b.current[O]+H,N=b.current[O+1]-H;_=Math.max(U.minSize??n,Math.min(U.maxSize??a,_)),N=Math.max($.minSize??n,Math.min($.maxSize??a,N)),m(Q=>Q.map((B,L)=>L===O?{...B,size:_}:L===O+1?{...B,size:N}:B))},[d,f,e,n,a]),F=h.useCallback(()=>{d&&t&&t(f.map(A=>A.size)),y.current=null,u(!1),c&&S()},[d,f,t,c,S]),j=h.useCallback(A=>{if(!d||!y.current)return;const V=y.current;let H=-1;const O=V.match(/\d+$/);if(O&&(H=parseInt(O[0],10)-1),H===-1&&f.length>=2&&(H=0),H<0||H>=f.length-1)return;let G=0;e==="horizontal"?(A.key==="ArrowLeft"&&(G=-s),A.key==="ArrowRight"&&(G=s),A.key==="Home"&&(G=-100),A.key==="End"&&(G=100)):(A.key==="ArrowUp"&&(G=-s),A.key==="ArrowDown"&&(G=s),A.key==="Home"&&(G=-100),A.key==="End"&&(G=100)),G!==0&&(A.preventDefault(),E(k.current+G)),A.key==="Escape"&&(m(U=>U.map(($,_)=>({...$,size:b.current[_]}))),F())},[d,f,e,E,F,s]);return h.useEffect(()=>{if(typeof document>"u")return;const A=O=>{if(!d)return;const G=e==="horizontal"?O.clientX:O.clientY;E(G)},V=O=>{if(!d||O.touches.length===0)return;const G=O.touches[0],U=e==="horizontal"?G.clientX:G.clientY;E(U)},H=()=>{d&&F()};return d&&(document.addEventListener("mousemove",A),document.addEventListener("touchmove",V),document.addEventListener("mouseup",H),document.addEventListener("touchend",H),document.addEventListener("keydown",j),document.body.style.cursor=e==="horizontal"?"col-resize":"row-resize",document.body.style.userSelect="none"),()=>{document.removeEventListener("mousemove",A),document.removeEventListener("touchmove",V),document.removeEventListener("mouseup",H),document.removeEventListener("touchend",H),document.removeEventListener("keydown",j),document.body.style.cursor="",document.body.style.userSelect=""}},[d,e,E,F,j]),h.useEffect(()=>{if(f.length!==0){if(c){const A=v();if(A){m(V=>V.map(H=>{const O=A.find(G=>G.id===H.id);return O?{...H,size:O.size,collapsed:O.collapsed||!1}:H}));return}}if(!o){const V=C()/f.length;m(H=>H.map(O=>({...O,size:V})))}}},[f.length,o,C,c,v]),h.useEffect(()=>{if(!o||o.length===0||f.length===0)return;const A=C(),V=o.map(H=>typeof H=="string"&&H.endsWith("%")?parseFloat(H)/100*A:typeof H=="number"?H:parseFloat(H));m(H=>H.map((O,G)=>({...O,size:G<V.length?V[G]:O.size})))},[o,f.length,C]),h.useEffect(()=>{f.length>0&&c&&!d&&S()},[f,c,d,S]),{isResizing:d,setIsResizing:u,containerRef:p,panels:f,registerPanel:x,unregisterPanel:I,getPanelSize:T,setPanelSize:W,isPanelCollapsed:D,togglePanelCollapse:P,startResize:M,onResize:E,endResize:F}},hy={horizontal:{flexDirection:"row"},vertical:{flexDirection:"column"}},fy=(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],uy=(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"}}}))(),ct={horizontal:{width:"2px",height:"20px",backgroundColor:"color-gray-400",margin:"0 1px"},vertical:{width:"20px",height:"2px",backgroundColor:"color-gray-400",margin:"1px 0"}},sc=h.createContext({orientation:"horizontal",size:"md",variant:"default",isResizing:!1,setIsResizing:()=>{},registerPanel:()=>{},unregisterPanel:()=>{},getPanelSize:()=>0,setPanelSize:()=>{},isPanelCollapsed:()=>!1,togglePanelCollapse:()=>{},startResize:()=>{},onResize:()=>{},endResize:()=>{}}),dc=()=>h.useContext(sc),my=({value:e,children:o})=>r.jsx(sc.Provider,{value:e,children:o}),py=({children:e,id:o,defaultSize:t,minSize:n,maxSize:a,collapsible:l,defaultCollapsed:c,onCollapseChange:g,views:s,...d})=>{const{orientation:u,registerPanel:f,unregisterPanel:m,getPanelSize:p,isPanelCollapsed:y,togglePanelCollapse:k}=dc(),b=typeof t=="string"&&t.endsWith("%")?0:typeof t=="number"?t:0;h.useEffect(()=>(f(o,b,n,a,l),()=>m(o)),[o,b,n,a,l,f,m]);const w=p(o),C=y(o);return h.useEffect(()=>{g&&C!==void 0&&g(C)},[C,g]),h.useEffect(()=>{l&&c&&!C&&k(o)},[o,l,c,C,k]),C?r.jsx(i.View,{flex:"0 0 auto",width:u==="horizontal"?"10px":"100%",height:u==="vertical"?"10px":"100%",backgroundColor:"color-gray-200",cursor:"pointer",onClick:()=>k(o),"aria-label":`Expand panel ${o}`,role:"button",tabIndex:0,...s==null?void 0:s.collapsedPanel,...d}):r.jsx(i.View,{flex:w>0?"0 0 auto":"1",width:u==="horizontal"?`${w}px`:"100%",height:u==="vertical"?`${w}px`:"100%",overflow:"auto",...s==null?void 0:s.panel,...d,children:e})},yy=({id:e,position:o="both",disabled:t=!1,withVisualIndicator:n=!0,withCollapseButton:a=!1,collapseTarget:l,views:c,...g})=>{const{orientation:s,size:d,variant:u,startResize:f,isPanelCollapsed:m,togglePanelCollapse:p}=dc(),k=(()=>{if(l)return l;const x=e.match(/\d+$/);if(!x)return"";const I=parseInt(x[0],10);return isNaN(I)?"":`panel${I}`})(),b=m(k),w=x=>{if(t)return;x.preventDefault();const I=s==="horizontal"?x.clientX:x.clientY;f(e,I)},C=x=>{if(t||x.touches.length===0)return;x.preventDefault();const I=x.touches[0],T=s==="horizontal"?I.clientX:I.clientY;f(e,T)},v=x=>{t||(x.key==="Enter"||x.key===" ")&&(x.preventDefault(),f(e,0))},S=x=>{x.stopPropagation(),k&&p(k)};return r.jsxs(i.View,{role:"separator","aria-orientation":s,"aria-valuemin":0,"aria-valuemax":100,tabIndex:t?-1:0,cursor:s==="horizontal"?"col-resize":"row-resize",display:"flex",alignItems:"center",justifyContent:"center",position:"relative",...fy(d,s),...uy[u],onMouseDown:w,onTouchStart:C,onKeyDown:v,opacity:t?.5:1,pointerEvents:t?"none":"auto",...c==null?void 0:c.handle,...g,children:[n&&r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",width:s==="horizontal"?"100%":"auto",height:s==="vertical"?"100%":"auto",pointerEvents:"none",...c==null?void 0:c.handleIcon,children:s==="horizontal"?r.jsxs(i.Horizontal,{gap:1,children:[r.jsx(i.View,{...ct.horizontal}),r.jsx(i.View,{...ct.horizontal})]}):r.jsxs(i.Vertical,{gap:1,children:[r.jsx(i.View,{...ct.vertical}),r.jsx(i.View,{...ct.vertical})]})}),a&&k&&r.jsx(i.View,{position:"absolute",top:s==="horizontal"?"-20px":"50%",left:s==="horizontal"?"50%":"-20px",transform:s==="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:S,"aria-label":b?`Expand panel ${k}`:`Collapse panel ${k}`,role:"button",tabIndex:0,pointerEvents:"auto",_hover:{backgroundColor:"color-gray-200"},...c==null?void 0:c.collapseIcon,children:r.jsx(i.View,{width:"8px",height:"8px",display:"flex",alignItems:"center",justifyContent:"center",children:b?r.jsxs(i.Horizontal,{children:[r.jsx(i.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"}),r.jsx(i.View,{width:"2px",height:"6px",backgroundColor:"color-gray-600",position:"absolute"})]}):r.jsx(i.View,{width:"6px",height:"2px",backgroundColor:"color-gray-600"})})})]})},by=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,minSize:l,maxSize:c,collapsible:g=!1,containerRef:s,autoSaveId:d,keyboardResizeBy:u,onLayout:f,views:m,...p})=>{const y=o==="horizontal"?i.Horizontal:i.Vertical;return r.jsx(y,{ref:s,width:"100%",height:"100%",position:"relative",overflow:"hidden",...hy[o],...m==null?void 0:m.container,...p,children:e})},In=({children:e,orientation:o="horizontal",size:t="md",variant:n="default",defaultSizes:a,onSizesChange:l,minSize:c=50,maxSize:g,collapsible:s=!1,autoSaveId:d,storage:u,keyboardResizeBy:f=10,views:m,...p})=>{const{isResizing:y,setIsResizing:k,containerRef:b,registerPanel:w,unregisterPanel:C,getPanelSize:v,setPanelSize:S,isPanelCollapsed:x,togglePanelCollapse:I,startResize:T,onResize:W,endResize:D}=gy(o,a,l,c,g,s,d,u,f);return r.jsx(my,{value:{orientation:o,size:t,variant:n,isResizing:y,setIsResizing:k,registerPanel:w,unregisterPanel:C,getPanelSize:v,setPanelSize:S,isPanelCollapsed:x,togglePanelCollapse:I,startResize:T,onResize:W,endResize:D},children:r.jsx(by,{orientation:o,size:t,variant:n,defaultSizes:a,minSize:c,maxSize:g,collapsible:s,autoSaveId:d,keyboardResizeBy:f,containerRef:b,views:m,...p,children:e})})};In.Panel=py,In.Handle=yy;const st={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"}}},xy={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"}},ky=()=>Math.random().toString(36).substring(2,9);let Yo=new Map;const wr=Fo.create(e=>({toasts:[],add:(o,t,n,a={})=>{const l=a.id||ky(),c={id:l,variant:o,title:t,description:n,createdAt:Date.now(),isVisible:!0,...a};if(e(g=>({toasts:[...g.toasts,c]})),a.duration!==0){const g=a.duration||5e3,s=setTimeout(()=>{wr.getState().remove(l)},g);Yo.set(l,s)}return l},remove:o=>{e(t=>({toasts:t.toasts.map(n=>n.id===o?{...n,isVisible:!1}:n)})),Yo.has(o)&&(clearTimeout(Yo.get(o)),Yo.delete(o)),setTimeout(()=>{e(t=>({toasts:t.toasts.filter(n=>n.id!==o)}))},300)},removeAll:()=>{Yo.forEach(clearTimeout),Yo.clear(),e(o=>({toasts:o.toasts.map(t=>({...t,isVisible:!1}))})),setTimeout(()=>{e({toasts:[]})},300)}})),vo=(e,o,t,n)=>wr.getState().add(e,o,t,n),gc=(e,o,t)=>vo("info",e,o,t),hc=(e,o,t)=>vo("success",e,o,t),fc=(e,o,t)=>vo("warning",e,o,t),uc=(e,o,t)=>vo("error",e,o,t),mc=e=>{wr.getState().remove(e)},pc=()=>{wr.getState().removeAll()},yc=({variant:e,title:o,description:t,onClose:n,isClosable:a=!0,action:l,actionText:c,showIcon:g=!0,theme:s,views:d,render:u,icon:f,id:m,isVisible:p=!0,themeMode:y})=>{const k=s??st,b=()=>{var S,x;if(f!==void 0)return f;const v=e?(x=(S=st[e])==null?void 0:S.icon)==null?void 0:x.color:st.info.icon.color;switch(e){case"info":return r.jsx(ro,{widthHeight:20,color:v});case"success":return r.jsx(na,{widthHeight:20,color:v});case"warning":return r.jsx(ro,{widthHeight:20,color:v,orientation:"down"});case"error":return r.jsx(zr,{widthHeight:20,color:v});default:return r.jsx(ro,{widthHeight:20,color:st.info.icon.color})}};if(u)return r.jsx(r.Fragment,{children:u({id:m||"",onClose:n})});const w=e==="error"?"alert":"status",C=e==="error"||e==="warning"?"assertive":"polite";return r.jsxs(i.Horizontal,{role:w,"aria-live":C,"aria-atomic":"true","data-state":p?"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:p?1:0,transform:p?"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:[g&&r.jsx(i.View,{marginTop:"2px",...d==null?void 0:d.icon,children:b()}),r.jsxs(i.Vertical,{gap:4,flex:"1",children:[r.jsx(i.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}),t&&r.jsx(i.Text,{fontSize:"12px",lineHeight:"18px",color:k[e].content.color,fontWeight:"400",backgroundColor:k[e].container.backgroundColor,...d==null?void 0:d.description,children:t}),l&&c&&r.jsx(i.Text,{fontSize:"14px",fontWeight:"600",marginTop:"6px",cursor:"pointer",color:k[e].content.color,backgroundColor:k[e].container.backgroundColor,onClick:v=>{v.stopPropagation(),l()},_hover:{textDecoration:"underline"},transition:"opacity 0.2s ease, color 0.2s ease",...d==null?void 0:d.actionButton,children:c})]}),a&&r.jsx(i.View,{as:"button","aria-label":"Close toast",backgroundColor:"transparent",border:"none",cursor:"pointer",padding:"4px",marginLeft:"8px",marginTop:"-2px",marginRight:"-4px",borderRadius:"9999px",onClick:v=>{v.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:r.jsx($e,{widthHeight:16,color:k[e].content.color})})]})},Cy=({position:e="top-right",gap:o=8,limit:t=5,containerStyle:n})=>{const{toasts:a,remove:l}=wr(),g=h.useMemo(()=>{const s={top:[],"top-right":[],"top-left":[],bottom:[],"bottom-right":[],"bottom-left":[]};return a.forEach(d=>{const u=d.position||e;s[u].push(d)}),Object.keys(s).forEach(d=>{s[d]=s[d].slice(-t)}),s},[a,e,t])[e];return r.jsx(i.View,{position:"fixed",zIndex:9999,display:"flex",flexDirection:e.includes("bottom")?"column-reverse":"column",gap:`${o}px`,width:"fit-content",maxWidth:"100%",pointerEvents:"none",...xy[e],style:n,children:g.map(s=>r.jsx(i.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:r.jsx(yc,{id:s.id,variant:s.variant,title:s.title,description:s.description,onClose:()=>l(s.id),isClosable:s.isClosable,action:s.action,actionText:s.actionText,showIcon:s.showIcon,views:s.views,render:s.render,icon:s.icon,isVisible:s.isVisible})},s.id))})},wy=()=>({toast:(e,o,t,n)=>vo(e,o,t,n),info:(e,o,t)=>gc(e,o,t),success:(e,o,t)=>hc(e,o,t),warning:(e,o,t)=>fc(e,o,t),error:(e,o,t)=>uc(e,o,t),remove:e=>mc(e),removeAll:()=>pc()}),Sy=Object.assign(e=>r.jsx(yc,{...e}),{Container:e=>r.jsx(Cy,{...e}),show:vo,info:gc,success:hc,warning:fc,error:uc,remove:mc,removeAll:pc}),vy=wy,bc=()=>Math.random().toString(36).substring(2,11),Ty=({defaultOpen:e=!1,openDelay:o=200,closeDelay:t=200,isDisabled:n=!1}={})=>{const[a,l]=h.useState(e),c=h.useRef(null),g=h.useRef(null),s=h.useRef(null),d=h.useRef(null),u=h.useRef(`tooltip-trigger-${bc()}`).current,f=h.useRef(`tooltip-content-${bc()}`).current,m=h.useCallback(()=>{n||(d.current&&(clearTimeout(d.current),d.current=null),!a&&!s.current&&(s.current=setTimeout(()=>{l(!0),s.current=null},o)))},[a,o,n]),p=h.useCallback(()=>{s.current&&(clearTimeout(s.current),s.current=null),a&&!d.current&&(d.current=setTimeout(()=>{l(!1),d.current=null},t))},[a,t]),y=h.useCallback(()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]);return h.useEffect(()=>()=>{s.current&&clearTimeout(s.current),d.current&&clearTimeout(d.current)},[]),h.useEffect(()=>{if(typeof document>"u")return;const k=b=>{b.key==="Escape"&&a&&l(!1)};return document.addEventListener("keydown",k),()=>{document.removeEventListener("keydown",k)}},[a]),{isOpen:a,openTooltip:m,closeTooltip:p,cancelCloseTimer:y,triggerRef:c,contentRef:g,triggerId:u,contentId:f}},Iy={sm:{padding:"4px 8px",fontSize:"12px",maxWidth:"200px"},md:{padding:"6px 10px",fontSize:"14px",maxWidth:"250px"},lg:{padding:"8px 12px",fontSize:"16px",maxWidth:"300px"}},Fy=(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"}}))(),zy=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}},xc=h.createContext({isOpen:!1,openTooltip:()=>{},closeTooltip:()=>{},triggerRef:{current:null},contentRef:{current:null},contentId:"",triggerId:""}),Fn=()=>h.useContext(xc),My=({value:e,children:o})=>r.jsx(xc.Provider,{value:e,children:o}),kc=h.memo(({children:e,views:o,asChild:t=!1,...n})=>{const{openTooltip:a,closeTooltip:l,triggerRef:c,contentId:g,triggerId:s}=Fn(),d=h.useCallback(()=>a(),[a]),u=h.useCallback(()=>l(),[l]),f=h.useCallback(()=>a(),[a]),m=h.useCallback(()=>l(),[l]),p={ref:c,onMouseEnter:d,onMouseLeave:u,onFocus:f,onBlur:m,id:s,"aria-describedby":g,...o==null?void 0:o.container,...n};return t&&h.isValidElement(e)?h.cloneElement(e,p):r.jsx(i.View,{display:"inline-block",...p,children:e})}),jy=h.memo(({children:e,views:o,...t})=>{const{isOpen:n,contentRef:a,contentId:l,triggerId:c}=Fn();return n?r.jsx(i.View,{ref:a,id:l,role:"tooltip","aria-labelledby":c,...o==null?void 0:o.container,...t,children:e}):null}),Wy=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:l="default",showArrow:c=!0,views:g,themeMode:s,...d})=>{const{isOpen:u,triggerRef:f,contentRef:m,contentId:p,triggerId:y}=Fn(),{ref:k,relation:b}=i.useElementPosition({trackChanges:!0,trackOnHover:!0,trackOnScroll:!0,trackOnResize:!0}),[w,C]=h.useState({x:0,y:0,placement:t});h.useEffect(()=>{f!=null&&f.current&&k&&(k.current=f.current)},[f,k,u]),h.useEffect(()=>{if(u&&(m!=null&&m.current)&&(f!=null&&f.current)){const x=f.current.getBoundingClientRect();let I=t;b&&(t==="top"&&b.space.vertical==="bottom"?I="bottom":t==="bottom"&&b.space.vertical==="top"?I="top":t==="right"&&b.space.horizontal==="left"?I="left":t==="left"&&b.space.horizontal==="right"&&(I="right"));let T=0,W=0;switch(I){case"top":T=n==="start"?x.left:n==="end"?x.right-120:x.left+x.width/2-60,W=x.top-8;break;case"bottom":T=n==="start"?x.left:n==="end"?x.right-120:x.left+x.width/2-60,W=x.bottom+8;break;case"right":T=x.right+8,W=n==="start"?x.top:n==="end"?x.bottom-32:x.top+x.height/2-16;break;case"left":T=x.left-8,W=n==="start"?x.top:n==="end"?x.bottom-32:x.top+x.height/2-16;break}C({x:T,y:W,placement:I})}},[u,t,n,f,m,b]);const v=h.useMemo(()=>c?zy(w.placement):{},[c,w.placement]),S=h.useMemo(()=>{const x={position:"fixed",left:w.x,top:w.y,zIndex:1e3};switch(w.placement){case"top":return{...x,transform:"translateY(-100%)"};case"left":return{...x,transform:"translateX(-100%)"};case"bottom":case"right":default:return x}},[w.x,w.y,w.placement]);return r.jsxs(i.View,{position:"relative",display:"inline-block",...g==null?void 0:g.container,...d,children:[r.jsx(kc,{children:o}),u&&r.jsxs(i.View,{ref:m,id:p,role:"tooltip","aria-labelledby":y,borderRadius:4,boxShadow:"0px 2px 8px rgba(0, 0, 0, 0.15)",style:S,...Iy[a],...Fy[l],...g==null?void 0:g.content,children:[typeof e=="string"?r.jsx(i.Text,{...g==null?void 0:g.text,children:e}):e,c&&r.jsx(i.View,{...v,...g==null?void 0:g.arrow})]})]})},dt=({content:e,children:o,position:t="top",align:n="center",size:a="md",variant:l="default",openDelay:c=200,closeDelay:g=200,showArrow:s=!0,defaultOpen:d=!1,isDisabled:u=!1,views:f,...m})=>{const p=Ty({defaultOpen:d,openDelay:c,closeDelay:g,isDisabled:u});return r.jsx(My,{value:p,children:r.jsx(Wy,{content:e,position:t,align:n,size:a,variant:l,showArrow:s,views:f,...m,children:o})})};dt.Trigger=kc,dt.Content=jy;const Cc=h.forwardRef((e,o)=>{const t={...e,isAgentRunning:e.isAgentRunning??e.isWorkerRunning,onStopAgent:e.onStopAgent??e.onStopWorker,disabled:e.disabled??e.isDisabled},n=jl(t);return h.useImperativeHandle(o,()=>({getValue:()=>{var a,l;return((a=n.hiddenInputRef.current)==null?void 0:a.value)??((l=n.editableRef.current)==null?void 0:l.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})),r.jsx(Dl,{...t,...n})});Cc.displayName="ChatInput";const Ey={container:{position:"relative",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"}},wc={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%"}},zn={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}},Mn={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}},Ay=h.createContext({}),Hy=({children:e,showRadialGradient:o=!0,views:t,themeMode:n,...a})=>{const l={white:"rgba(255,255,255,1)",transparent:"rgba(255,255,255,0)"},c=["rgb(59, 130, 246)","rgb(196, 181, 253)","rgb(147, 197, 253)","rgb(221, 214, 254)","rgb(96, 165, 250)"],g={...wc.gradient,backgroundImage:`
|
|
27
59
|
repeating-linear-gradient(100deg, ${c.join(", ")}),
|
|
28
60
|
repeating-linear-gradient(100deg, ${l.white} 0%, ${l.white} 7%, ${l.transparent} 10%, ${l.transparent} 12%, ${l.white} 16%)
|
|
29
|
-
`,animation:"aurora 4s ease infinite",...o?{maskImage:"radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%)"}:{}};return r.jsxs(i.View,{...
|
|
61
|
+
`,animation:"aurora 4s ease infinite",...o?{maskImage:"radial-gradient(ellipse at 100% 0%, black 10%, transparent 70%)"}:{}};return r.jsxs(i.View,{...wc.container,...t==null?void 0:t.container,...a,children:[r.jsx(i.View,{style:g}),e,r.jsx("style",{children:`
|
|
30
62
|
@keyframes aurora {
|
|
31
63
|
0% { background-position: 0% 50%; }
|
|
32
64
|
50% { background-position: 100% 50%; }
|
|
33
65
|
100% { background-position: 0% 50%; }
|
|
34
66
|
}
|
|
35
|
-
`})]})},Ru=({number:e=20,children:o,...t})=>{const n=Array.from({length:e},(a,l)=>l);return r.jsxs(i.View,{width:"100%",height:"100%",backgroundColor:"black",position:"relative",overflow:"hidden",...t,children:[n.map(a=>{const l=a*37%200-100+"px",c=.2+a*13%6*.1+"s",s=(1+a*7%9)/2+"s",d=300+a*17%100+"px";return r.jsx(i.View,{position:"absolute",top:"0px",left:l,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(${d}) translateY(${d})`},iterationCount:"infinite",timingFunction:"linear",fillMode:"forwards",duration:s,delay:c},children:r.jsx(i.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&&r.jsx(i.View,{position:"relative",zIndex:1,width:"100%",height:"100%",children:o})]})},Ri=["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)"],ey=()=>Ri[Math.floor(Math.random()*Ri.length)],oy=({rows:e=15,cols:o=10,squareSize:t=40,...n})=>{const a=Array(e).fill(1),l=Array(o).fill(1);return r.jsx(i.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((c,s)=>r.jsx(i.Horizontal,{gap:0,children:l.map((d,g)=>r.jsx(i.View,{height:t/3,width:t,borderStyle:"solid",borderColor:"color-gray-200",borderWidth:.5,backgroundColor:"transparent",cursor:"pointer",on:{hover:{backgroundColor:ey(),transition:"background-color 0.2s ease"}}},`col-${g}`))},`row-${s}`))})},ry=["rgb(59, 130, 246)","rgb(147, 51, 234)","rgb(236, 72, 153)","rgb(34, 197, 94)","rgb(251, 146, 60)","rgb(168, 85, 247)"],ty=({count:e=50,colors:o=ry,speed:t="medium",shapes:n=["circle"],...a})=>{const l=Array.from({length:e},(g,m)=>m),c=()=>{switch(t){case"slow":return .5;case"fast":return 2;default:return 1}},s=()=>n[Math.floor(Math.random()*n.length)],d=()=>o[Math.floor(Math.random()*o.length)];return r.jsx(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:l.map(g=>{const m=Math.random()*8+4,f=Math.random()*400,p=Math.random()*300,u=Math.random()*400,y=Math.random()*300,k=(Math.random()*10+5)/c(),x=Math.random()*5,C=s(),S=d(),w={circle:{borderRadius:"50%"},square:{borderRadius:"2px"},triangle:{borderRadius:"0",clipPath:"polygon(50% 0%, 0% 100%, 100% 100%)"}};return r.jsx(i.View,{position:"absolute",width:m,height:m,backgroundColor:S,opacity:.7,style:{left:f,top:p,...w[C]},animate:{from:{transform:"translate(0px, 0px) scale(0.5)",opacity:0},to:{transform:`translate(${u-f}px, ${y-p}px) scale(1)`,opacity:.7},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${k}s`,delay:`${x}s`}},g)})})},ny=({gridSize:e=30,lineColor:o="rgba(59, 130, 246, 0.3)",pulseColor:t="rgba(59, 130, 246, 0.8)",animationSpeed:n="medium",...a})=>{const l=()=>{switch(n){case"slow":return 4;case"fast":return 1;default:return 2}},c=Math.floor(400/e),s=Math.floor(300/e),d=c*s,g=Array.from({length:d},(m,f)=>f);return r.jsxs(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:[Array.from({length:c+1},(m,f)=>r.jsx(i.View,{position:"absolute",left:f*e,top:0,width:1,height:"100%",backgroundColor:o},`v-line-${f}`)),Array.from({length:s+1},(m,f)=>r.jsx(i.View,{position:"absolute",left:0,top:f*e,width:"100%",height:1,backgroundColor:o},`h-line-${f}`)),g.map(m=>{const f=m%c,p=Math.floor(m/c),u=(f+p)*.1;return r.jsx(i.View,{position:"absolute",left:f*e+1,top:p*e+1,width:e-2,height:e-2,backgroundColor:"transparent",animate:{from:{backgroundColor:"transparent"},to:{backgroundColor:t},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${l()}s`,delay:`${u}s`}},m)})]})},ay=["rgba(59, 130, 246, 0.6)","rgba(147, 51, 234, 0.6)","rgba(236, 72, 153, 0.6)","rgba(34, 197, 94, 0.6)"],ly=({rippleCount:e=5,colors:o=ay,maxSize:t=200,frequency:n=3,...a})=>{const l=Array.from({length:e},(c,s)=>({id:s,x:Math.random()*400,y:Math.random()*300,color:o[s%o.length],delay:s*(n/e),duration:3+Math.random()*2}));return r.jsxs(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-100",...a,children:[l.map(c=>r.jsx(i.View,{position:"absolute",width:20,height:20,borderRadius:"50%",style:{left:c.x-10,top:c.y-10,border:`2px solid ${c.color}`,backgroundColor:"transparent"},animate:{from:{transform:"scale(0)",opacity:1},to:{transform:`scale(${t/20})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${c.duration}s`,delay:`${c.delay}s`}},c.id)),l.map(c=>r.jsx(i.View,{position:"absolute",width:10,height:10,borderRadius:"50%",style:{left:c.x-5,top:c.y-5,backgroundColor:c.color},animate:{from:{transform:"scale(1)",opacity:.8},to:{transform:`scale(${t/40})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${c.duration*1.2}s`,delay:`${c.delay+.5}s`}},`secondary-${c.id}`))]})},iy=({children:e,src:o,backgroundSize:t="cover",backgroundPosition:n="center",backgroundRepeat:a="no-repeat",backgroundAttachment:l="scroll",imageOpacity:c=1,overlay:s=null,blendMode:d="normal",views:g,themeMode:m,...f})=>{const p={...un.image,backgroundImage:`url(${o})`,backgroundSize:t,backgroundPosition:n,backgroundRepeat:a,backgroundAttachment:l,opacity:c,mixBlendMode:d};return r.jsxs(i.View,{...un.container,...g==null?void 0:g.container,...f,children:[r.jsx(i.View,{style:p,...g==null?void 0:g.image}),s,e&&r.jsx(i.View,{...un.content,...g==null?void 0:g.content,children:e})]})},cy=({children:e,src:o,autoPlay:t=!0,loop:n=!0,muted:a=!0,playsInline:l=!0,overlay:c=null,blendMode:s="normal",views:d,themeMode:g,...m})=>r.jsxs(i.View,{...yn.container,...d==null?void 0:d.container,...m,children:[r.jsx(i.View,{as:"video",src:o,autoPlay:t,loop:n,muted:a,playsInline:l,style:{...yn.video,mixBlendMode:s},...d==null?void 0:d.video}),c,e&&r.jsx(i.View,{...yn.content,...d==null?void 0:d.content,children:e})]}),sy=({children:e,...o})=>r.jsx(xi,{...o,children:e}),dy=/^(color|theme|light|dark)-/,gy=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},hy=({contentPosition:e,backgroundColor:o="color-black-900",...t})=>{const n=dy.test(o),a=n?gy(o):o,c=(()=>{let s=`${a}-100`,d=`${a}-900`,g=`${a}-600`,m=`${a}-400`;switch(n||(s=`color-mix(in srgb, ${a} 10%, transparent)`,d=`color-mix(in srgb, ${a} 90%, transparent)`,g=`color-mix(in srgb, ${a} 70%, transparent)`,m=`color-mix(in srgb, ${a} 50%, transparent)`),e){case"left":return`radial-gradient(circle at 70% 50%, ${s} 0%, ${s} 100%), linear-gradient(to right, ${d} 0%, ${g} 65%, ${s} 100%)`;case"right":return`radial-gradient(circle at 30% 50%, ${s} 0%, ${s} 100%), linear-gradient(to left, ${d} 0%, ${g} 65%, ${s} 100%)`;case"top":return`radial-gradient(circle at 50% 40%, ${s} 0%, ${s} 100%), linear-gradient(to bottom, ${d} 0%, ${g} 60%, ${s} 100%)`;case"bottom":return`radial-gradient(circle at 50% 60%, ${s} 0%, ${s} 100%), linear-gradient(to top, ${d} 0%, ${g} 60%, ${s} 100%)`;case"center":return`radial-gradient(circle at 50% 70%, ${d} 0%, ${s} 100%)`;default:return m}})();return r.jsx(i.View,{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:c,pointerEvents:"none",zIndex:1,...t})},fy=({children:e,views:o,...t})=>r.jsx(Qu.Provider,{value:{},children:r.jsx(i.View,{...Ju.container,...o==null?void 0:o.container,...t,children:e})}),ec=h.forwardRef(({children:e,shape:o="rounded",decorationRotation:t=5,decorationScale:n=1,decorationOpacity:a=.8,views:l,...c},s)=>{const g=(k=>{switch(k){case"square":return"0px";case"pill":return"9999px";case"rounded":default:return"16px"}})(o),m=Math.abs(t)*(Math.PI/180),f=Math.sin(m)*100,p=(n-1)*100/2,u=Math.ceil(f+p),y=c.backgroundColor??"theme-primary";return r.jsx(i.View,{...c,ref:s,backgroundColor:"transparent",position:"relative",overflow:"visible",...l==null?void 0:l.container,children:r.jsxs(i.View,{padding:c.padding??`${96+u}px ${u}px`,position:"relative",overflow:"visible",children:[r.jsx(i.View,{position:"absolute",top:u,left:u,right:u,bottom:u,backgroundColor:y,borderRadius:g,opacity:a/1.5,transform:`scale(${n})`,pointerEvents:"none",zIndex:1,...l==null?void 0:l.back}),r.jsx(i.View,{position:"absolute",top:u,left:u,right:u,bottom:u,transform:`rotate(${t}deg) scale(${n})`,opacity:a/1.2,backgroundColor:y,borderRadius:g,pointerEvents:"none",zIndex:2,...l==null?void 0:l.front}),r.jsx(i.View,{margin:"0 auto",position:"relative",zIndex:3,...l==null?void 0:l.content,children:e})]})})});ec.displayName="Background.Layout";const fe=fy;fe.Aurora=Zu,fe.Meteors=Ru,fe.Wall=oy,fe.Particles=ty,fe.Grid=ny,fe.Ripples=ly,fe.Image=iy,fe.Video=cy,fe.Gradient=sy,fe.Overlay=hy,fe.Layout=ec;const oc=h.forwardRef((e,o)=>r.jsx(fe,{...e,ref:o}));oc.displayName="Background";const rc=Object.assign(oc,{Layout:fe.Layout,Aurora:fe.Aurora,Meteors:fe.Meteors,Wall:fe.Wall,Particles:fe.Particles,Grid:fe.Grid,Ripples:fe.Ripples,Image:fe.Image,Video:fe.Video,Gradient:fe.Gradient,Overlay:fe.Overlay});rc.displayName="Background";function my(e){const{inputValue:o,onInputChange:t,onSubmit:n,messages:a=[]}=e,[l,c]=h.useState(""),s=h.useRef(null),d=h.useRef(null),g=o!==void 0,m=o!==void 0?o:l,f=h.useCallback(u=>{g?t==null||t(u):c(u)},[g,t]),p=h.useCallback(u=>{u&&u.preventDefault();const y=m.trim();y&&n&&(n(y),g||c(""),s.current&&(s.current.style.height="auto"))},[m,n,g]);return h.useEffect(()=>{d.current&&(d.current.scrollTop=d.current.scrollHeight)},[a.length]),{internalInputValue:m,handleInputChange:f,handleSubmit:p,inputRef:s,messagesRef:d}}const py={sm:{fontSize:"12px",padding:"8px"},md:{fontSize:"14px",padding:"10px"},lg:{fontSize:"14px",padding:"12px"}},uy={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"}},yy={sm:{fontSize:"12px",padding:"8px 10px",borderRadius:"12px"},md:{fontSize:"14px",padding:"10px 12px",borderRadius:"12px"},lg:{fontSize:"14px",padding:"12px 14px",borderRadius:"14px"}},by={backgroundColor:"theme-primary",color:"color-white",alignSelf:"flex-end",borderBottomRightRadius:"4px"},xy={backgroundColor:"color-white",color:"color-gray-900",alignSelf:"flex-start",borderBottomLeftRadius:"4px",border:"1px solid color-gray-200"},Ye={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:{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"},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}},ky=({messages:e=[],inputPlaceholder:o="Type a message...",disableInput:t=!1,variant:n="default",size:a="md",showTimestamps:l=!0,enableAttachments:c=!1,enableContextPicker:s=!1,selectedContextElements:d=[],onContextPickerClick:g,onRemoveContextElement:m,isLoading:f=!1,loadingText:p="Loading...",styles:u={},maxHeight:y="600px",internalInputValue:k,handleInputChange:x,handleSubmit:C,inputRef:S,messagesRef:w,inputValue:v,onInputChange:b,...I})=>{var V;const T={...Ye.container,...uy[n],...u.container},j={...Ye.messagesContainer,maxHeight:y,...u.messagesContainer},E={...Ye.inputContainer,...u.inputContainer},D={...Ye.input,...py[a],...u.input},W=h.useCallback(M=>{x(M.target.value),M.target.style.height="auto",M.target.style.height=`${M.target.scrollHeight}px`},[x]),A=h.useCallback(M=>{M.key==="Enter"&&!M.shiftKey&&(M.preventDefault(),C())},[C]),H=k.trim().length>0,{onSubmit:z,...P}=I;return r.jsxs(i.View,{...T,...P,children:[r.jsxs(i.View,{ref:w,...j,children:[e.length===0?r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",flex:1,color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:"No messages yet. Start a conversation."})}):e.map(M=>r.jsx(Cy,{message:M,size:a,showTimestamp:l,styles:{bubble:u.bubble,userBubble:u.userBubble,assistantBubble:u.assistantBubble,timestamp:u.timestamp,reasoningContainer:u.reasoningContainer,reasoningContent:u.reasoningContent,errorMessage:u.errorMessage,systemMessage:u.systemMessage,toolMessage:u.toolMessage}},M.id)),f&&r.jsxs(i.Horizontal,{justifyContent:"flex-start",alignItems:"center",gap:8,marginTop:"8px",...u.loadingIndicator,children:[r.jsx(bt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(i.Text,{color:"color-gray-500",fontSize:"14px",children:p})]})]}),r.jsxs(i.View,{children:[d.length>0&&r.jsx(i.Horizontal,{gap:8,marginBottom:"8px",flexWrap:"wrap",padding:"0 12px 8px",...u.contextChipsContainer,children:d.map(M=>r.jsxs(i.Horizontal,{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",borderRadius:"9999px",padding:"6px 10px",alignItems:"center",gap:6,children:[r.jsx(i.Text,{fontSize:"12px",color:"color-blue-700",fontWeight:"500",children:M.name}),r.jsx(i.View,{as:"button",type:"button",onClick:()=>m==null?void 0:m(M.id),cursor:"pointer",border:"none",backgroundColor:"transparent",display:"flex",alignItems:"center",children:r.jsx(He,{widthHeight:12,color:"color-blue-700"})})]},M.id))}),r.jsxs(i.View,{as:"form",onSubmit:C,...E,children:[c&&r.jsx(i.View,{as:"button",type:"button",...Ye.attachmentButton,...u.attachmentButton,_hover:{backgroundColor:"color-gray-100"},children:r.jsx(Xo,{widthHeight:16,color:"color-gray-600"})}),r.jsx(i.View,{as:"textarea",ref:S,value:k,onChange:W,onKeyDown:A,placeholder:o,disabled:t||f,...D,style:{...D,opacity:t||f?.5:1}}),r.jsxs(i.Vertical,{gap:4,alignItems:"center",children:[s&&r.jsx(i.View,{as:"button",type:"button",onClick:g,...Ye.attachmentButton,...u.contextPickerButton,_hover:{backgroundColor:"color-gray-100",...(V=u.contextPickerButton)==null?void 0:V._hover},title:"Select element from page",children:r.jsx(Xn,{widthHeight:16,color:"color-gray-600"})}),r.jsx(i.View,{as:"button",type:"submit",disabled:!H||t||f,...Ye.sendButton,backgroundColor:H?"theme-primary":"color-gray-300",_hover:{backgroundColor:H?"theme-primary":"color-gray-300"},...u.sendButton,style:{cursor:H?"pointer":"not-allowed",opacity:!H||t||f?.6:1},children:r.jsx(yt,{widthHeight:16,color:"color-white",filled:!1})})]})]})]})]})},Cy=({message:e,size:o,showTimestamp:t,styles:n})=>{const[a,l]=h.useState(!1),[c,s]=h.useState(!1),d=e.role==="user",g=e.messageType==="system",m=e.messageType==="error",f=e.messageType==="tool";if(g)return r.jsx(i.View,{display:"flex",justifyContent:"center",padding:"8px",width:"100%",...n.systemMessage,children:r.jsxs(i.Horizontal,{gap:6,alignItems:"center",opacity:.7,children:[r.jsx(Re,{widthHeight:12,color:"color-gray-600"}),r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.content})]})});if(f)return r.jsx(i.View,{display:"flex",justifyContent:"flex-start",padding:"8px 16px",width:"100%",...n.toolMessage,children:r.jsxs(i.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:[r.jsx(Un,{widthHeight:14,color:"color-gray-600"}),r.jsxs(i.Vertical,{gap:2,children:[r.jsx(i.Text,{fontSize:"11px",fontWeight:"600",color:"color-gray-700",children:"Tool Usage"}),r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontFamily:"monospace",children:e.content})]})]})});const p={...Ye.bubble,...yy[o],...d?by:xy,...m?{backgroundColor:"color-red-50",borderWidth:1,borderStyle:"solid",borderColor:"color-red-200",color:"color-red-700"}:{},...n.bubble,...d?n.userBubble:n.assistantBubble,...m?n.errorMessage:{}},u={...Ye.timestamp,[d?"right":"left"]:"8px",opacity:a?1:0,...n.timestamp};return r.jsx(i.View,{position:"relative",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),display:"flex",justifyContent:d?"flex-end":"flex-start",children:r.jsxs(i.View,{...p,children:[t&&r.jsx(i.View,{...u,children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),m&&r.jsxs(i.Horizontal,{gap:6,marginBottom:"4px",alignItems:"center",children:[r.jsx(vr,{widthHeight:14,color:"color-red-700"}),r.jsx(i.Text,{fontWeight:"600",fontSize:"12px",children:"Error"})]}),e.reasoning&&r.jsxs(i.View,{marginBottom:"8px",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"color-gray-200",paddingBottom:"8px",...n.reasoningContainer,children:[r.jsxs(i.Horizontal,{as:"button",onClick:()=>s(!c),cursor:"pointer",gap:4,alignItems:"center",backgroundColor:"transparent",border:"none",padding:0,children:[r.jsx(i.Text,{fontSize:"11px",color:"color-gray-500",fontWeight:"600",children:"Thinking Process"}),r.jsx(he,{orientation:c?"down":"right",widthHeight:10,color:"color-gray-500"})]}),c&&r.jsx(i.View,{padding:"8px",backgroundColor:"color-gray-50",borderRadius:"8px",marginTop:"4px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",...n.reasoningContent,children:r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.reasoning})})]}),r.jsx(i.View,{whiteSpace:"pre-wrap",wordBreak:"break-word",children:e.content}),e.attachments&&e.attachments.length>0&&r.jsx(i.Vertical,{gap:4,marginTop:"8px",children:e.attachments.map(y=>r.jsxs(i.Horizontal,{gap:6,padding:"6px 8px",backgroundColor:"color-gray-50",borderRadius:"8px",fontSize:"12px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(Xo,{widthHeight:14}),r.jsx(i.Text,{children:y.name})]},y.id))}),e.contextElements&&e.contextElements.length>0&&r.jsxs(i.Vertical,{gap:4,marginTop:"8px",children:[r.jsx(i.Text,{fontSize:"11px",color:"color-black-500",fontWeight:"600",children:"Context:"}),e.contextElements.map(y=>r.jsx(i.Horizontal,{gap:6,padding:"6px 10px",backgroundColor:"color-blue-50",borderRadius:"9999px",fontSize:"11px",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",children:r.jsx(i.Text,{color:"color-blue-700",fontWeight:"500",children:y.name})},y.id))]})]})})},bn=e=>{const o=my(e);return r.jsx(ky,{...e,...o})};bn.displayName="ChatWidget";const tc=bn;function wy({onSelect:e,onCancel:o,active:t}){const[n,a]=h.useState(null);h.useRef(null);const l=h.useCallback(d=>{var u;if(!t)return;const g=document.elementFromPoint(d.clientX,d.clientY);if(!g||g===document.body||g.closest('[data-chatwidget-ignore="true"]')||g.closest("#chatwidget-overlay")){a(null);return}const m=g.getBoundingClientRect();let f=g.tagName.toLowerCase();if(g.id)f+=`#${g.id}`;else if(g.className&&typeof g.className=="string"){const y=g.className.split(" ")[0];y&&(f+=`.${y}`)}const p=(u=g.innerText)==null?void 0:u.slice(0,20);p&&(f+=` ("${p}...")`),a({id:g.id||`el-${Date.now()}`,name:f,tagName:g.tagName.toLowerCase(),rect:m})},[t]),c=h.useCallback(d=>{!t||d.target.closest('[data-chatwidget-ignore="true"]')||(d.preventDefault(),d.stopPropagation(),n&&e(n))},[t,n,e]),s=h.useCallback(d=>{t&&d.key==="Escape"&&o()},[t,o]);return h.useEffect(()=>{if(!(typeof document>"u"))return t?(document.addEventListener("mousemove",l),document.addEventListener("click",c,!0),document.addEventListener("keydown",s),document.body.style.cursor="crosshair"):(a(null),document.removeEventListener("mousemove",l),document.removeEventListener("click",c,!0),document.removeEventListener("keydown",s),document.body.style.cursor=""),()=>{document.removeEventListener("mousemove",l),document.removeEventListener("click",c,!0),document.removeEventListener("keydown",s),document.body.style.cursor=""}},[t,l,c,s]),{highlightedElement:n}}function Sy({element:e}){return e?r.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:r.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 vy=({initialMessages:e=[],onSendMessage:o,bubbleSize:t="md"})=>{const[n,a]=h.useState(!1),[l,c]=h.useState(!1),[s,d]=h.useState(e),[g,m]=h.useState([]),{highlightedElement:f}=wy({active:l,onSelect:x=>{m(C=>[...C,x]),c(!1),a(!0)},onCancel:()=>{c(!1),a(!0)}}),p=()=>a(!n),u=()=>{c(!0),a(!1)},y=x=>{m(C=>C.filter(S=>S.id!==x))},k=x=>{const C={id:Date.now().toString(),role:"user",content:x,timestamp:new Date,contextElements:[...g]};d(S=>[...S,C]),o==null||o(x,g),m([]),setTimeout(()=>{var b;const S=Math.random()>.7,w=Math.random()>.4,v={id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date,content:S?"I will highlight the selected element.":`I received your message regarding: ${((b=C.contextElements)==null?void 0:b.map(I=>I.name).join(", "))||"general context"}. How can I assist you further?`,messageType:S?"tool":"text",reasoning:w?"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};d(I=>[...I,v]),S&&setTimeout(()=>{d(I=>[...I,{id:(Date.now()+2).toString(),role:"assistant",messageType:"system",content:'Tool "highlightElement" executed successfully.',timestamp:new Date}])},800)},1e3)};return r.jsxs(i.View,{position:"fixed",bottom:24,right:24,zIndex:9999,children:[r.jsx(Sy,{element:f}),l&&r.jsx(i.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:r.jsx(i.Text,{fontWeight:"600",fontSize:"14px",children:"Click an element to select it. Press ESC to cancel."})}),n&&r.jsxs(i.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:[r.jsxs(i.View,{padding:"16px",borderBottom:"1px solid rgba(0,0,0,0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"bold",color:"color-gray-800",children:"ChatWidget Assistant"}),r.jsx(i.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:r.jsx(He,{widthHeight:16,color:"color-gray-500"})})]}),r.jsx(tc,{messages:s,onSubmit:k,size:t,variant:"minimal",enableContextPicker:!0,selectedContextElements:g,onContextPickerClick:u,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)"}}})]}),!l&&r.jsx(i.View,{as:"button",onClick:p,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?r.jsx(He,{widthHeight:24,color:"white"}):r.jsx(Kn,{widthHeight:24,color:"white"})})]})};function xn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ty=typeof Element<"u",Iy=typeof Map=="function",Fy=typeof Set=="function",zy=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function ot(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var t,n,a;if(Array.isArray(e)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(!ot(e[n],o[n]))return!1;return!0}var l;if(Iy&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;for(l=e.entries();!(n=l.next()).done;)if(!ot(n.value[1],o.get(n.value[0])))return!1;return!0}if(Fy&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;return!0}if(zy&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if(t=e.length,t!=o.length)return!1;for(n=t;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),t=a.length,t!==Object.keys(o).length)return!1;for(n=t;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,a[n]))return!1;if(Ty&&e instanceof Element)return!1;for(n=t;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!ot(e[a[n]],o[a[n]]))return!1;return!0}return e!==e&&o!==o}var My=function(o,t){try{return ot(o,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const Wy=xn(My);var Hy=function(e,o,t,n,a,l,c,s){if(process.env.NODE_ENV!=="production"&&o===void 0)throw new Error("invariant requires an error message argument");if(!e){var d;if(o===void 0)d=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var g=[t,n,a,l,c,s],m=0;d=new Error(o.replace(/%s/g,function(){return g[m++]})),d.name="Invariant Violation"}throw d.framesToPop=1,d}},jy=Hy;const nc=xn(jy);var Py=function(o,t,n,a){var l=n?n.call(a,o,t):void 0;if(l!==void 0)return!!l;if(o===t)return!0;if(typeof o!="object"||!o||typeof t!="object"||!t)return!1;var c=Object.keys(o),s=Object.keys(t);if(c.length!==s.length)return!1;for(var d=Object.prototype.hasOwnProperty.bind(t),g=0;g<c.length;g++){var m=c[g];if(!d(m))return!1;var f=o[m],p=t[m];if(l=n?n.call(a,f,p,m):void 0,l===!1||l===void 0&&f!==p)return!1}return!0};const Vy=xn(Py);var ac=(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))(ac||{}),kn={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"]}},lc=Object.values(ac),rt={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},ic=Object.entries(rt).reduce((e,[o,t])=>(e[t]=o,e),{}),_e="data-rh",No={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},qo=(e,o)=>{for(let t=e.length-1;t>=0;t-=1){const n=e[t];if(Object.prototype.hasOwnProperty.call(n,o))return n[o]}return null},Ay=e=>{let o=qo(e,"title");const t=qo(e,No.TITLE_TEMPLATE);if(Array.isArray(o)&&(o=o.join("")),t&&o)return t.replace(/%s/g,()=>o);const n=qo(e,No.DEFAULT_TITLE);return o||n||void 0},Ey=e=>qo(e,No.ON_CHANGE_CLIENT_STATE)||(()=>{}),Cn=(e,o)=>o.filter(t=>typeof t[e]<"u").map(t=>t[e]).reduce((t,n)=>({...t,...n}),{}),Dy=(e,o)=>o.filter(t=>typeof t.base<"u").map(t=>t.base).reverse().reduce((t,n)=>{if(!t.length){const a=Object.keys(n);for(let l=0;l<a.length;l+=1){const s=a[l].toLowerCase();if(e.indexOf(s)!==-1&&n[s])return t.concat(n)}}return t},[]),$y=e=>console&&typeof console.warn=="function"&&console.warn(e),mr=(e,o,t)=>{const n={};return t.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&$y(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,l)=>{const c={};l.filter(d=>{let g;const m=Object.keys(d);for(let p=0;p<m.length;p+=1){const u=m[p],y=u.toLowerCase();o.indexOf(y)!==-1&&!(g==="rel"&&d[g].toLowerCase()==="canonical")&&!(y==="rel"&&d[y].toLowerCase()==="stylesheet")&&(g=y),o.indexOf(u)!==-1&&(u==="innerHTML"||u==="cssText"||u==="itemprop")&&(g=u)}if(!g||!d[g])return!1;const f=d[g].toLowerCase();return n[g]||(n[g]={}),c[g]||(c[g]={}),n[g][f]?!1:(c[g][f]=!0,!0)}).reverse().forEach(d=>a.push(d));const s=Object.keys(c);for(let d=0;d<s.length;d+=1){const g=s[d],m={...n[g],...c[g]};n[g]=m}return a},[]).reverse()},Ly=(e,o)=>{if(Array.isArray(e)&&e.length){for(let t=0;t<e.length;t+=1)if(e[t][o])return!0}return!1},_y=e=>({baseTag:Dy(["href"],e),bodyAttributes:Cn("bodyAttributes",e),defer:qo(e,No.DEFER),encode:qo(e,No.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:Cn("htmlAttributes",e),linkTags:mr("link",["rel","href"],e),metaTags:mr("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:mr("noscript",["innerHTML"],e),onChangeClientState:Ey(e),scriptTags:mr("script",["src","innerHTML"],e),styleTags:mr("style",["cssText"],e),title:Ay(e),titleAttributes:Cn("titleAttributes",e),prioritizeSeoTags:Ly(e,No.PRIORITIZE_SEO_TAGS)}),cc=e=>Array.isArray(e)?e.join(""):e,By=(e,o)=>{const t=Object.keys(e);for(let n=0;n<t.length;n+=1)if(o[t[n]]&&o[t[n]].includes(e[t[n]]))return!0;return!1},wn=(e,o)=>Array.isArray(e)?e.reduce((t,n)=>(By(n,o)?t.priority.push(n):t.default.push(n),t),{priority:[],default:[]}):{default:e,priority:[]},sc=(e,o)=>({...e,[o]:void 0}),Oy=["noscript","script","style"],Sn=(e,o=!0)=>o===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),dc=e=>Object.keys(e).reduce((o,t)=>{const n=typeof e[t]<"u"?`${t}="${e[t]}"`:`${t}`;return o?`${o} ${n}`:n},""),Ny=(e,o,t,n)=>{const a=dc(t),l=cc(o);return a?`<${e} ${_e}="true" ${a}>${Sn(l,n)}</${e}>`:`<${e} ${_e}="true">${Sn(l,n)}</${e}>`},qy=(e,o,t=!0)=>o.reduce((n,a)=>{const l=a,c=Object.keys(l).filter(g=>!(g==="innerHTML"||g==="cssText")).reduce((g,m)=>{const f=typeof l[m]>"u"?m:`${m}="${Sn(l[m],t)}"`;return g?`${g} ${f}`:f},""),s=l.innerHTML||l.cssText||"",d=Oy.indexOf(e)===-1;return`${n}<${e} ${_e}="true" ${c}${d?"/>":`>${s}</${e}>`}`},""),gc=(e,o={})=>Object.keys(e).reduce((t,n)=>{const a=rt[n];return t[a||n]=e[n],t},o),Uy=(e,o,t)=>{const n={key:o,[_e]:!0},a=gc(t,n);return[h.createElement("title",a,o)]},tt=(e,o)=>o.map((t,n)=>{const a={key:n,[_e]:!0};return Object.keys(t).forEach(l=>{const s=rt[l]||l;if(s==="innerHTML"||s==="cssText"){const d=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:d}}else a[s]=t[l]}),h.createElement(e,a)}),Ae=(e,o,t=!0)=>{switch(e){case"title":return{toComponent:()=>Uy(e,o.title,o.titleAttributes),toString:()=>Ny(e,o.title,o.titleAttributes,t)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>gc(o),toString:()=>dc(o)};default:return{toComponent:()=>tt(e,o),toString:()=>qy(e,o,t)}}},Gy=({metaTags:e,linkTags:o,scriptTags:t,encode:n})=>{const a=wn(e,kn.meta),l=wn(o,kn.link),c=wn(t,kn.script);return{priorityMethods:{toComponent:()=>[...tt("meta",a.priority),...tt("link",l.priority),...tt("script",c.priority)],toString:()=>`${Ae("meta",a.priority,n)} ${Ae("link",l.priority,n)} ${Ae("script",c.priority,n)}`},metaTags:a.default,linkTags:l.default,scriptTags:c.default}},Yy=e=>{const{baseTag:o,bodyAttributes:t,encode:n=!0,htmlAttributes:a,noscriptTags:l,styleTags:c,title:s="",titleAttributes:d,prioritizeSeoTags:g}=e;let{linkTags:m,metaTags:f,scriptTags:p}=e,u={toComponent:()=>[],toString:()=>""};return g&&({priorityMethods:u,linkTags:m,metaTags:f,scriptTags:p}=Gy(e)),{priority:u,base:Ae("base",o,n),bodyAttributes:Ae("bodyAttributes",t,n),htmlAttributes:Ae("htmlAttributes",a,n),link:Ae("link",m,n),meta:Ae("meta",f,n),noscript:Ae("noscript",l,n),script:Ae("script",p,n),style:Ae("style",c,n),title:Ae("title",{title:s,titleAttributes:d},n)}},vn=Yy,nt=[],Tn=!!(typeof window<"u"&&window.document&&window.document.createElement),In=class{constructor(e,o){Ze(this,"instances",[]);Ze(this,"canUseDOM",Tn);Ze(this,"context");Ze(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?nt:this.instances,add:e=>{(this.canUseDOM?nt:this.instances).push(e)},remove:e=>{const o=(this.canUseDOM?nt:this.instances).indexOf(e);(this.canUseDOM?nt:this.instances).splice(o,1)}}});this.context=e,this.canUseDOM=o||!1,o||(e.helmet=vn({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},Ky=parseInt(h.version.split(".")[0],10),Fn=Ky>=19,Xy={},hc=h.createContext(Xy),Jy=(wo=class extends h.Component{constructor(t){super(t);Ze(this,"helmetData");Fn?this.helmetData=null:this.helmetData=new In(this.props.context||{},wo.canUseDOM)}render(){return Fn?h.createElement(h.Fragment,null,this.props.children):h.createElement(hc.Provider,{value:this.helmetData.value},this.props.children)}},Ze(wo,"canUseDOM",Tn),wo),Uo=(e,o)=>{const t=document.head||document.querySelector("head"),n=t.querySelectorAll(`${e}[${_e}]`),a=[].slice.call(n),l=[];let c;return o&&o.length&&o.forEach(s=>{const d=document.createElement(e);for(const g in s)if(Object.prototype.hasOwnProperty.call(s,g))if(g==="innerHTML")d.innerHTML=s.innerHTML;else if(g==="cssText"){const m=s.cssText;d.appendChild(document.createTextNode(m))}else{const m=g,f=typeof s[m]>"u"?"":s[m];d.setAttribute(g,f)}d.setAttribute(_e,"true"),a.some((g,m)=>(c=m,d.isEqualNode(g)))?a.splice(c,1):l.push(d)}),a.forEach(s=>{var d;return(d=s.parentNode)==null?void 0:d.removeChild(s)}),l.forEach(s=>t.appendChild(s)),{oldTags:a,newTags:l}},zn=(e,o)=>{const t=document.getElementsByTagName(e)[0];if(!t)return;const n=t.getAttribute(_e),a=n?n.split(","):[],l=[...a],c=Object.keys(o);for(const s of c){const d=o[s]||"";t.getAttribute(s)!==d&&t.setAttribute(s,d),a.indexOf(s)===-1&&a.push(s);const g=l.indexOf(s);g!==-1&&l.splice(g,1)}for(let s=l.length-1;s>=0;s-=1)t.removeAttribute(l[s]);a.length===l.length?t.removeAttribute(_e):t.getAttribute(_e)!==c.join(",")&&t.setAttribute(_e,c.join(","))},Qy=(e,o)=>{typeof e<"u"&&document.title!==e&&(document.title=cc(e)),zn("title",o)},fc=(e,o)=>{const{baseTag:t,bodyAttributes:n,htmlAttributes:a,linkTags:l,metaTags:c,noscriptTags:s,onChangeClientState:d,scriptTags:g,styleTags:m,title:f,titleAttributes:p}=e;zn("body",n),zn("html",a),Qy(f,p);const u={baseTag:Uo("base",t),linkTags:Uo("link",l),metaTags:Uo("meta",c),noscriptTags:Uo("noscript",s),scriptTags:Uo("script",g),styleTags:Uo("style",m)},y={},k={};Object.keys(u).forEach(x=>{const{newTags:C,oldTags:S}=u[x];C.length&&(y[x]=C),S.length&&(k[x]=u[x].oldTags)}),o&&o(),d(e,y,k)},pr=null,Zy=e=>{pr&&cancelAnimationFrame(pr),e.defer?pr=requestAnimationFrame(()=>{fc(e,()=>{pr=null})}):(fc(e),pr=null)},Ry=Zy,mc=class extends h.Component{constructor(){super(...arguments);Ze(this,"rendered",!1)}shouldComponentUpdate(o){return!Vy(o,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:o}=this.props.context;o.remove(this),this.emitChange()}emitChange(){const{helmetInstances:o,setHelmet:t}=this.props.context;let n=null;const a=_y(o.get().map(l=>{const{context:c,...s}=l.props;return s}));Jy.canUseDOM?Ry(a):vn&&(n=vn(a)),t(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}},at=[],pc=e=>{const o={};for(const t of Object.keys(e))o[ic[t]||t]=e[t];return o},Co=e=>{const o={};for(const t of Object.keys(e)){const n=rt[t];o[n||t]=e[t]}return o},uc=(e,o)=>{if(!Tn)return;const t=document.getElementsByTagName(e)[0];if(!t)return;const n="data-rh-managed",a=t.getAttribute(n),l=a?a.split(","):[],c=Object.keys(o);for(const s of l)c.includes(s)||t.removeAttribute(s);for(const s of c){const d=o[s];d==null||d===!1?t.removeAttribute(s):d===!0?t.setAttribute(s,""):t.setAttribute(s,String(d))}c.length>0?t.setAttribute(n,c.join(",")):t.removeAttribute(n)},Mn=()=>{const e={},o={};for(const t of at){const{htmlAttributes:n,bodyAttributes:a}=t.props;n&&Object.assign(e,pc(n)),a&&Object.assign(o,pc(a))}uc("html",e),uc("body",o)},eb=class extends h.Component{componentDidMount(){at.push(this),Mn()}componentDidUpdate(){Mn()}componentWillUnmount(){const e=at.indexOf(this);e!==-1&&at.splice(e,1),Mn()}resolveTitle(){const{title:e,titleTemplate:o,defaultTitle:t}=this.props;return e&&o?o.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||t||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const o=this.props.titleAttributes||{};return h.createElement("title",Co(o),e)}renderBase(){const{base:e}=this.props;return e?h.createElement("base",Co(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>h.createElement("meta",{key:t,...Co(o)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>h.createElement("link",{key:t,...Co(o)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,l=Co(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("script",{key:t,...l})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{cssText:n,...a}=o,l=Co(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("style",{key:t,...l})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,l=Co(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("noscript",{key:t,...l})})}render(){return h.createElement(h.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},ob=(Pn=class extends h.Component{shouldComponentUpdate(e){return!Wy(sc(this.props,"helmetData"),sc(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,t,n){return{...o,[e.type]:[...o[e.type]||[],{...t,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,o,t,n){switch(e.type){case"title":return{...o,[e.type]:n,titleAttributes:{...t}};case"body":return{...o,bodyAttributes:{...t}};case"html":return{...o,htmlAttributes:{...t}};default:return{...o,[e.type]:{...t}}}}mapArrayTypeChildrenToProps(e,o){let t={...o};return Object.keys(e).forEach(n=>{t={...t,[n]:e[n]}}),t}warnOnInvalidChildren(e,o){return nc(lc.some(t=>e.type===t),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 ${lc.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),nc(!o||typeof o=="string"||Array.isArray(o)&&!o.some(t=>typeof t!="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 t={};return h.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...l}=n.props,c=Object.keys(l).reduce((d,g)=>(d[ic[g]||g]=l[g],d),{});let{type:s}=n;switch(typeof s=="symbol"?s=s.toString():this.warnOnInvalidChildren(n,a),s){case"Symbol(react.fragment)":o=this.mapChildrenToProps(a,o);break;case"link":case"meta":case"noscript":case"script":case"style":t=this.flattenArrayTypeChildren(n,t,c,a);break;default:o=this.mapObjectTypeChildren(n,o,c,a);break}}),this.mapArrayTypeChildrenToProps(t,o)}render(){const{children:e,...o}=this.props;let t={...o},{helmetData:n}=o;if(e&&(t=this.mapChildrenToProps(e,t)),n&&!(n instanceof In)){const a=n;n=new In(a.context,!0),delete t.helmetData}return Fn?h.createElement(eb,{...t}):n?h.createElement(mc,{...t,context:n.value}):h.createElement(hc.Consumer,null,a=>h.createElement(mc,{...t,context:a}))}},Ze(Pn,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Pn);const rb={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"}},tb={highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},nb=e=>rb[e.metadata.id]??tb,yc=(e,o)=>{const t=e.theme;return{canvas:Te(t.canvas),surface:Te(t.surface),text:Te(t.text),muted:Te(t.muted),border:Te(t.border),primary:Te(t.primary),secondary:Te(t.secondary),success:Te(t.success),warning:Te(t.warning),error:Te(t.error),onPrimary:Te(t.onPrimary),appearance:o}},ab=e=>yc(e,"light"),lb=e=>yc(e,"dark"),me=({palette:e,label:o,config:t,children:n})=>r.jsxs(i.Vertical,{gap:10,flex:"1 1 320px",minWidth:0,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:10,height:10,borderRadius:9999,backgroundColor:e.appearance==="dark"?"#111111":"#ffffff",borderWidth:1,borderStyle:"solid",borderColor:"rgba(0,0,0,0.15)"}),r.jsx(i.Text,{fontSize:11,fontWeight:"700",letterSpacing:"0.08em",textTransform:"uppercase",children:o})]}),r.jsx(ht,{config:t,mode:e.appearance,children:r.jsx(i.View,{padding:20,borderRadius:16,borderWidth:1,borderStyle:"solid",backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",children:n})})]}),Te=e=>!e||typeof e!="string"?e:/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,Ke=(e,o)=>`color-mix(in srgb, ${Te(e)} ${o}%, transparent)`,ib=e=>e&&e.startsWith("var(--")?e.slice(6,-1):e,cb={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"},sb=e=>e.personality||cb,Xe=(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},ur=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}}},db=e=>e.typeCase==="uppercase"?"uppercase":"none",lt=(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":Te(o.surface)};case"matte":return{backgroundColor:o.appearance==="dark"?"#181818":"#f4f4f4"};case"paper":default:return{backgroundColor:Te(o.surface)}}},Go=(e,o)=>{const t=Te(o.primary),n=Te(o.secondary||o.primary);switch(e.accentTreatment){case"gradient":return`linear-gradient(135deg, ${t} 0%, ${n} 100%)`;case"glow":return t;case"stripe":return`repeating-linear-gradient(45deg, ${t} 0 8px, ${n} 8px 16px)`;case"halftone":return`radial-gradient(circle at 30% 30%, ${t} 0%, ${n} 70%)`;case"flat":default:return t}},Yo=(e,o)=>{if(e.accentTreatment==="glow")return`0 0 24px ${Ke(o.primary,40)}, 0 0 4px ${Te(o.primary)}`},io=e=>({letterSpacing:e.letterSpacing,textTransform:db(e),fontStyle:e.typeStyle,fontWeight:Xe(e,"heavy")}),Se=e=>({letterSpacing:e.typeCase==="uppercase"?"0.12em":"0.06em",textTransform:"uppercase",fontStyle:e.typeStyle,fontWeight:Xe(e,"normal")}),gb=(e,o)=>{var n,a,l;const t=(n=e.components)==null?void 0:n[o];return(l=(a=t==null?void 0:t.views)==null?void 0:a.container)==null?void 0:l.borderRadius},hb=e=>{const o=e.tokens.rawCssVars||{},t=e.theme.border,n=e.theme.surface,a=e.theme.primary,l=o["shadow-ring"]||"rgba(0,0,0,0.08) 0px 0px 0px 1px",c=o["shadow-ring-light"]||`${t} 0px 0px 0px 1px`,s=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`,d=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:l},{name:"Level 1b",label:"Light Ring",description:"Lighter ring",shadow:c},{name:"Level 2",label:"Card",description:"Ring + subtle lift",shadow:s},{name:"Level 3",label:"Full Card",description:"Ring + lift + ambient + glow",shadow:d},{name:"Focus",label:"Accessibility ring",description:"Focus state — 2px ring",shadow:`0 0 0 2px ${a}`}]},yr=(e,o)=>{const n={accordion:["accordion","card","alert"],tabs:["tabs","button"],panel:["card","alert"]}[o]??[o];for(const a of n){const l=gb(e,a);if(l!==void 0)return l}return"12px"},Wn=({glyph:e,badge:o})=>r.jsxs(i.View,{position:"relative",display:"inline-flex",children:[r.jsx(i.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?r.jsx(i.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]}),fb=[{title:"Homes",value:"homes",icon:r.jsx(Wn,{glyph:"🏠"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Tokens, inputs, and feedback components share the active config."})},{title:"Experiences",value:"experiences",icon:r.jsx(Wn,{glyph:"🎈",badge:"NEW"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Services",value:"services",icon:r.jsx(Wn,{glyph:"🛎️",badge:"NEW"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Each tab carries an icon. Active tab uses the theme primary underline."})}],mb=[{title:"Token",field:"token"},{title:"Value",field:"value"},{title:"Role",field:"role"}],pb=[{id:"overview",label:"Overview",href:"#"},{id:"components",label:"Components",href:"#"},{id:"tokens",label:"Tokens",href:"#"}],ub=({color:e,name:o,role:t,border:n})=>r.jsxs(i.View,{borderWidth:1,borderStyle:"solid",borderRadius:8,overflow:"hidden",minWidth:0,borderColor:n,children:[r.jsx(i.View,{height:76,backgroundColor:e}),r.jsxs(i.Vertical,{gap:4,padding:12,children:[r.jsx(i.Text,{fontSize:13,lineHeight:"18px",fontWeight:"700",children:o}),r.jsx(i.Text,{fontSize:12,lineHeight:"16px",opacity:.7,children:e}),r.jsx(i.Text,{fontSize:12,lineHeight:"16px",opacity:.72,children:t})]})]}),ue=({title:e,children:o,config:t})=>r.jsxs(i.Vertical,{gap:18,padding:24,borderWidth:1,borderStyle:"solid",borderRadius:12,backgroundColor:t.theme.canvas,borderColor:t.theme.border,children:[r.jsx(i.Text,{fontSize:18,lineHeight:"24px",fontWeight:"700",color:t.theme.text,children:e}),o]}),yb=({config:e})=>{const o=nb(e),t=o.highlightStyle==="background"?e.theme.onPrimary:e.theme.primary;return r.jsx(i.View,{width:"100%",borderRadius:20,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,backgroundColor:e.theme.surface,children:r.jsxs(i.Horizontal,{width:"100%",flexWrap:"wrap",alignItems:"stretch",gap:0,children:[r.jsxs(i.Vertical,{flex:"1 1 360px",minWidth:0,padding:36,gap:20,justifyContent:"center",children:[r.jsx(Fe,{variant:"outline",content:`${e.metadata.label} hero`}),r.jsx(ci,{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:t,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}`),r.jsxs(i.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 —"," ",r.jsx(i.Text,{as:"span",color:e.theme.primary,fontWeight:"700",children:o.highlightStyle})," ","with weight"," ",r.jsx(i.Text,{as:"span",fontWeight:"700",children:o.fontWeight}),o.highlightFontStyle==="italic"||o.fontStyle==="italic"?", italic":"",o.textTransform==="uppercase"?", uppercase":"","."]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",children:[r.jsx(de,{color:"theme-primary",size:"md",children:"Get started"}),r.jsx(de,{variant:"outline",color:"theme-primary",size:"md",children:"View docs"})]})]}),r.jsxs(i.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:[r.jsx(i.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)"}}),r.jsxs(i.Vertical,{width:"100%",height:"100%",minHeight:260,padding:32,justifyContent:"flex-end",alignItems:"flex-start",gap:12,children:[r.jsx(i.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:13,letterSpacing:"0.08em",textTransform:"uppercase"},children:e.metadata.label}),r.jsx(i.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:28,lineHeight:"32px",letterSpacing:"-0.02em"},children:e.theme.primary})]})]})]})})},bb=({config:e})=>{var t,n;const o=e.tokens.colors.slice(0,5).map(a=>({token:a.name,value:a.value,role:a.role}));return r.jsxs(i.Vertical,{gap:24,children:[r.jsx(ue,{title:"Color",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:12,children:e.tokens.colors.slice(0,12).map(a=>r.jsx(ub,{color:a.value,name:a.name,role:a.role,text:e.theme.text,border:e.theme.border},a.name))})}),r.jsx(ue,{title:"Typography",config:e,children:r.jsxs(i.Vertical,{gap:24,children:[r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:48,lineHeight:"1.0",fontWeight:"700",letterSpacing:"0.96px",textTransform:"uppercase",children:"Making Life Multiplanetary"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Display — 48px / Bold / 1.00 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.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."}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Body — 16px / 400 / 1.70"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:13,lineHeight:"0.94",fontWeight:"700",letterSpacing:"1.17px",textTransform:"uppercase",children:"Falcon 9 · Starship · Dragon"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Nav Bold — 13px / 700 / 0.94 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:12,lineHeight:"1.0",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Mission Overview"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Caption — 12px / 400 / 1.00 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:10,lineHeight:"0.94",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Launch Date: 2026-04-15"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Micro — 10px / 400 / 0.94 / Uppercase"})]}),r.jsx(i.Horizontal,{gap:10,flexWrap:"wrap",marginTop:12,children:e.tokens.typography.fontSizes.map(a=>r.jsx(Fe,{variant:"outline",content:a},a))})]})}),r.jsx(ue,{title:"Spacing, Radius, Shadow",config:e,children:r.jsxs(i.Vertical,{gap:18,children:[r.jsx(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"flex-end",children:e.tokens.spacing.slice(0,10).map(a=>r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:a,minWidth:4,height:24,borderRadius:2,backgroundColor:e.theme.primary}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(i.Horizontal,{gap:12,flexWrap:"wrap",children:e.tokens.radii.slice(0,6).map(a=>r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:64,height:64,borderRadius:a,borderWidth:1,borderStyle:"solid",backgroundColor:e.theme.surface,borderColor:e.theme.border}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(i.View,{width:"100%",maxWidth:"100%",overflowX:"auto",style:{WebkitOverflowScrolling:"touch",color:e.theme.text},children:r.jsx(Ve,{views:(n=(t=e.components)==null?void 0:t.table)==null?void 0:n.views,children:r.jsx(Ve.Template,{caption:"First extracted color tokens",columns:mb,data:o})})})]})})]})},bc=({palette:e})=>r.jsxs(we,{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:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:24,fontWeight:"800",color:e.text,children:"$182"}),r.jsx(i.Text,{fontSize:14,color:e.muted,children:"night"})]}),r.jsx(Fe,{variant:"filled",content:"Best value"})]})}),r.jsx(we.Content,{children:r.jsxs(i.Vertical,{gap:12,children:[r.jsxs(i.Horizontal,{gap:0,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,overflow:"hidden",children:[r.jsxs(i.Vertical,{flex:1,padding:10,gap:2,borderRightWidth:1,borderRightStyle:"solid",borderColor:e.border,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECK-IN"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"Mar 12, 2026"})]}),r.jsxs(i.Vertical,{flex:1,padding:10,gap:2,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECKOUT"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"Mar 18, 2026"})]})]}),r.jsxs(i.Vertical,{padding:10,gap:2,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"GUESTS"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"2 adults"})]}),r.jsx(de,{isFilled:!0,size:"lg",children:"Reserve"}),r.jsx(Xr,{}),r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"$182 × 6 nights"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$1,092"})]}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"Cleaning fee"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$48"})]}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"Service fee"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$165"})]})]}),r.jsx(Xr,{}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"Total before taxes"}),r.jsx(i.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"$1,305"})]})]})})]}),xc=[{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"}],kc=({palette:e,tier:o,personality:t})=>{const n=ur(t),a=lt(t,e),l=Go(t,e),c=Yo(t,e);return r.jsx(i.View,{width:"min(100%, 280px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:o.featured?0:1,borderStyle:"solid",style:{...o.featured?{background:l,boxShadow:c}:a,borderColor:e.border,color:o.featured?e.onPrimary:e.text},children:r.jsxs(i.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:Se(t),children:o.name}),o.featured?r.jsx(i.View,{paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,backgroundColor:Ke(e.onPrimary,22),children:r.jsxs(i.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1},children:t.signatureMotif}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Se(t),children:t.voice.includes("mission")?"PRIORITY":"POPULAR"})]})}):null]}),r.jsx(i.Text,{fontSize:13,lineHeight:"18px",color:o.featured?Ke(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.tagline})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",gap:4,children:[r.jsx(i.Text,{fontSize:n.large+8,color:o.featured?e.onPrimary:e.text,style:io(t),children:o.price}),o.period?r.jsx(i.Text,{fontSize:14,color:o.featured?Ke(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.period}):null]}),r.jsx(i.Vertical,{gap:8,children:o.features.map(s=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:18,height:18,borderRadius:t.cornerStyle==="sharp"?2:9999,backgroundColor:o.featured?Ke(e.onPrimary,22):e.primary,alignItems:"center",justifyContent:"center",style:{display:"flex",flexShrink:0},children:r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(t,"heavy")},children:t.cornerStyle==="sharp"?"+":"✓"})}),r.jsx(i.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:{textTransform:t.typeCase==="uppercase"?"uppercase":"none",letterSpacing:t.typeCase==="uppercase"?"0.04em":"normal",fontStyle:t.typeStyle},children:s})]},s))}),r.jsx(i.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:t.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:o.featured?e.onPrimary:e.text},children:r.jsx(i.Text,{fontSize:14,color:o.featured?e.primary:e.canvas,style:{...Se(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.02em"},children:o.ctaLabel})})]})})},Cc=({palette:e,personality:o})=>{const t=ur(o),n=lt(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",l=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 r.jsx(i.View,{width:"min(100%, 320px)",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(i.View,{height:120,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Ke(e.primary,20)} 0%, ${Ke(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:15,color:e.text,style:io(o),children:a}),r.jsx(i.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:r.jsx(i.Text,{fontSize:10,color:e.text,style:Se(o),children:"IN STOCK"})})]}),r.jsx(i.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:l})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:24,color:e.text,style:io(o),children:"$42"}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$56"})]}),r.jsx(i.Text,{fontSize:12,color:e.success||e.muted,style:Se(o),children:"FREE SHIPPING"})]}),r.jsx(i.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Go(o,e),boxShadow:Yo(o,e)},children:r.jsx(i.Text,{fontSize:14,color:e.onPrimary,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})})},wc=({palette:e,personality:o})=>{const t=ur(o),n=lt(o,e),a=o.signatureMotif,l=o.voice.includes("athletic")?"★":o.voice.includes("mission")||o.voice.includes("futurist")?"◉":"♥",c=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",s=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",d=o.voice.includes("mission")?"MISSION PICK":o.voice.includes("athletic")?"TEAM PICK":o.voice.includes("futurist")?"SIGNATURE":"BEST SELLER";return r.jsxs(i.View,{position:"relative",width:"min(100%, 320px)",children:[r.jsx(i.View,{position:"absolute",top:-10,left:16,paddingHorizontal:12,paddingVertical:6,borderRadius:o.badgeRadius,zIndex:2,style:{background:Go(o,e),boxShadow:Yo(o,e)||(e.appearance==="dark"?"0 6px 14px rgba(0,0,0,0.5)":"0 6px 14px rgba(0,0,0,0.12)")},children:r.jsxs(i.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(o,"heavy")},children:a}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Se(o),children:d})]})}),r.jsx(i.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:r.jsx(i.Text,{fontSize:16,color:l==="♥"&&e.error||e.primary,style:{lineHeight:1},children:l})}),r.jsx(i.View,{width:"100%",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(i.View,{height:140,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Ke(e.primary,20)} 0%, ${Ke(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(i.Text,{fontSize:13,color:e.warning||e.primary,style:{lineHeight:1},children:"★★★★★"}),r.jsx(i.Text,{fontSize:12,color:e.muted,children:"4.9 · 1,284 reviews"})]}),r.jsx(i.Text,{fontSize:18,color:e.text,style:io(o),children:c}),r.jsx(i.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:s})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:26,color:e.text,style:io(o),children:"$189"}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$249"})]}),r.jsx(i.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:r.jsx(i.Text,{fontSize:10,color:e.text,style:Se(o),children:"–24%"})})]}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(i.View,{flex:1,paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Go(o,e),boxShadow:Yo(o,e)},children:r.jsx(i.Text,{fontSize:13,color:e.onPrimary,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Buy now"})}),r.jsx(i.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:r.jsx(i.Text,{fontSize:13,color:e.text,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})]})})]})},xb=[{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"}],Hn=(e,o)=>{const t=e.replace("#","").padEnd(6,"0").slice(0,6),n=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),l=parseInt(t.slice(4,6),16);return[n,a,l].some(Number.isNaN)?e:`rgba(${n}, ${a}, ${l}, ${o})`},jn=e=>typeof e=="string"&&/^#([0-9a-f]{3}){1,2}$/i.test(e),Pe=(e,o,t)=>jn(e)?Hn(e,o):e.startsWith("rgba")||e.startsWith("rgb")?e.replace(/rgba?\(([^)]+)\)/,(n,a)=>`rgba(${a.split(",").slice(0,3).map(c=>c.trim()).join(", ")}, ${o})`):t==="dark"?`rgba(255,255,255,${o})`:`rgba(0,0,0,${o})`,kb=({block:e,palette:o,personality:t})=>{const n=ur(t);let a,l;if(e.source==="ink")a=o.text,l=o.canvas;else{const m=o[e.source]||o.primary;e.intensity==="solid"?(a=m,l=o.onPrimary):(a=Pe(m,.32,o.appearance),l=(o.appearance==="dark",o.text))}if(t.accentTreatment==="gradient"&&e.intensity==="tint"){const m=o[e.source],f=o.secondary;jn(m)&&jn(f)&&(a=`linear-gradient(135deg, ${Hn(m,.32)} 0%, ${Hn(f,.32)} 100%)`)}if(t.accentTreatment==="stripe"&&e.intensity==="tint"){const m=Pe(o[e.source],.32,o.appearance),f=Pe(o.secondary,.18,o.appearance);a=`repeating-linear-gradient(135deg, ${m} 0 18px, ${f} 18px 36px)`}const c=Pe(l,.72,o.appearance),s=Pe(l,.55,o.appearance),d=l,g=l===o.canvas?o.text:o.canvas;return r.jsx(i.View,{width:"min(100%, 460px)",borderRadius:t.cardRadius*2,padding:n.large,style:{background:a},children:r.jsxs(i.Vertical,{gap:n.gap+6,children:[r.jsxs(i.Text,{fontSize:11,color:s,style:{...Se(t),letterSpacing:"0.12em",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:[t.signatureMotif," ",e.slug]}),r.jsxs(i.Vertical,{gap:14,children:[r.jsx(i.Text,{fontSize:32,lineHeight:"36px",color:l,style:io(t),children:e.heading}),r.jsx(i.Text,{fontSize:16,lineHeight:"22px",color:c,style:{fontStyle:t.typeStyle},children:e.body})]}),r.jsx(i.View,{alignSelf:"flex-start",paddingHorizontal:28,paddingVertical:14,borderRadius:t.pillRadius,style:{backgroundColor:d,cursor:"pointer"},children:r.jsx(i.Text,{fontSize:15,color:g,style:{...Se(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.01em",textTransform:t.typeCase==="uppercase"?"uppercase":"none"},children:e.cta})})]})})},Sc=[{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"}],vc=({palette:e,article:o,personality:t})=>{const n=ur(t),a=lt(t,e),l=e[o.badgeTone]||e.primary,c=e.secondary||e.primary,s=t.accentTreatment==="gradient"?`linear-gradient(135deg, ${Pe(l,.55,e.appearance)} 0%, ${Pe(c,.55,e.appearance)} 100%)`:t.accentTreatment==="stripe"?`repeating-linear-gradient(45deg, ${Pe(l,.45,e.appearance)} 0 16px, ${Pe(c,.25,e.appearance)} 16px 32px)`:t.accentTreatment==="halftone"?`radial-gradient(circle at 30% 30%, ${Pe(l,.55,e.appearance)} 0%, ${Pe(c,.35,e.appearance)} 70%)`:t.accentTreatment==="glow"?`radial-gradient(circle at 50% 60%, ${Pe(l,.45,e.appearance)} 0%, ${e.appearance==="dark"?"#050505":"#0a0a0a"} 100%)`:Pe(l,.32,e.appearance),d=t.voice.includes("mission")||t.voice.includes("futurist")?"◉":o.favorite,g=d==="♥"?e.error||e.primary:d==="★"&&e.warning||e.primary;return r.jsx(i.View,{width:"min(100%, 320px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...a,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(i.View,{position:"relative",height:160,borderRadius:t.cardRadius,overflow:"hidden",style:{background:s},children:[r.jsx(i.View,{position:"absolute",top:12,left:12,paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,style:{background:Go(t,{...e,primary:l}),boxShadow:Yo(t,e)},children:r.jsxs(i.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(t,"heavy")},children:t.signatureMotif}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Se(t),children:o.badge})]})}),r.jsx(i.View,{position:"absolute",top:10,right:10,width:36,height:36,borderRadius:t.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:r.jsx(i.Text,{fontSize:16,color:g,style:{lineHeight:1},children:d})})]}),r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:11,color:e.muted,style:Se(t),children:o.category}),r.jsx(i.Text,{fontSize:18,lineHeight:"24px",color:e.text,style:io(t),children:o.title}),r.jsx(i.Text,{fontSize:13,lineHeight:"18px",color:e.muted,style:{fontStyle:t.typeStyle},children:o.excerpt})]}),r.jsxs(i.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(i.View,{width:28,height:28,borderRadius:t.cornerStyle==="sharp"?4:9999,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.08)"}}),r.jsxs(i.Vertical,{gap:0,children:[r.jsx(i.Text,{fontSize:12,color:e.text,style:{fontWeight:Xe(t,"normal"),fontStyle:t.typeStyle},children:o.author}),r.jsx(i.Text,{fontSize:11,color:e.muted,children:o.meta})]})]})]})})},Tc=({palette:e,personality:o,config:t})=>{var f,p,u,y;const n=o.signatureMotif,a=e.primary,l=Go(o,e),c=Yo(o,e),s=((p=(f=t.tokens)==null?void 0:f.typography)==null?void 0:p.fontFamily)||((y=(u=t.tokens)==null?void 0:u.rawCssVars)==null?void 0:y.display)||"inherit",d=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":`${t.metadata.label}`,g=o.typeCase==="uppercase"?"EXPLORE":"Get started",m=o.typeCase==="uppercase"?"LEARN MORE":"Learn more";return r.jsxs(i.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:s,position:"relative",overflow:"hidden"},children:[o.accentTreatment==="glow"&&r.jsx(i.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"&&r.jsx(i.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"}}),r.jsxs(i.Vertical,{gap:24,style:{position:"relative"},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(i.View,{width:32,height:32,borderRadius:o.cornerStyle==="pill"?9999:o.cornerStyle==="sharp"?0:8,alignItems:"center",justifyContent:"center",style:{display:"flex",background:l,boxShadow:c},children:r.jsx(i.Text,{fontSize:16,color:e.onPrimary,style:{lineHeight:1,fontWeight:Xe(o,"heavy")},children:n})}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.18em":"0.06em"},children:t.metadata.label})]}),r.jsx(i.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:{...io(o),letterSpacing:o.typeCase==="uppercase"?"0.06em":o.letterSpacing,maxWidth:580,fontFamily:s},children:d}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(i.View,{paddingHorizontal:o.density==="spacious"?32:24,paddingVertical:o.density==="spacious"?16:14,borderRadius:o.pillRadius,style:{display:"flex",cursor:"pointer",background:l,boxShadow:c},children:r.jsx(i.Text,{fontSize:15,color:e.onPrimary,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Xe(o,"heavy"),fontFamily:s},children:g})}),r.jsx(i.View,{paddingHorizontal:24,paddingVertical:14,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",style:{display:"flex",cursor:"pointer",borderColor:e.text},children:r.jsx(i.Text,{fontSize:15,color:e.text,style:{...Se(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:Xe(o,"heavy"),fontFamily:s},children:m})})]}),r.jsx(i.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=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.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}}),r.jsxs(i.Vertical,{gap:0,children:[r.jsx(i.Text,{fontSize:11,color:e.muted,style:Se(o),children:k.label}),r.jsx(i.Text,{fontSize:11,color:e.text,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:ib(k.value)})]})]},k.label))})]})]})},Ic=({palette:e,config:o})=>r.jsxs(i.Vertical,{gap:20,padding:36,alignItems:"center",borderRadius:16,style:{backgroundColor:e.surface},children:[r.jsx(Fe,{variant:"outline",content:"New release"}),r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsxs(i.Text,{fontSize:36,lineHeight:"40px",fontWeight:"800",textAlign:"center",color:e.text,children:[o.metadata.label," Pro"]}),r.jsx(i.Text,{fontSize:18,lineHeight:"24px",color:e.muted,textAlign:"center",children:"Pro. Beyond."})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",justifyContent:"center",children:[r.jsx(de,{shape:"pill",size:"md",children:"Learn more"}),r.jsx(de,{shape:"pill",size:"md",variant:"outline",children:"Buy"})]}),r.jsx(i.View,{width:220,height:140,borderRadius:20,backgroundColor:e.appearance==="dark"?e.canvas:e.text,opacity:.85})]}),Fc=({palette:e,config:o})=>r.jsxs(we,{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:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(i.Text,{color:e.text,fontWeight:"700",children:o.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Fe,{variant:"filled",content:"New"})]})}),r.jsx(we.Content,{children:r.jsx(i.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."})}),r.jsx(we.Footer,{children:r.jsx(de,{size:"sm",children:o.metadata.id==="spacex"?"Explore":"Review"})})]}),zc=({palette:e})=>r.jsxs(i.Vertical,{gap:14,children:[r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(de,{color:"theme-primary",children:"Primary"}),r.jsx(de,{color:"theme-secondary",children:"Secondary"}),r.jsx(de,{color:"color-black",children:"Black"}),r.jsx(de,{color:"color-white",textColor:"color-black",children:"White"})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(de,{variant:"outline",color:"theme-primary",children:"Primary"}),r.jsx(de,{variant:"outline",color:"theme-secondary",children:"Secondary"}),r.jsx(de,{variant:"outline",color:"color-black",children:"Black"}),r.jsx(de,{variant:"outline",color:"color-white",children:"White"})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(de,{variant:"ghost",views:{container:{color:e.text}},children:"Ghost"}),r.jsx(de,{variant:"link",views:{container:{color:e.primary}},children:"Link"}),r.jsx(de,{isDisabled:!0,children:"Disabled"}),r.jsx(de,{isLoading:!0,children:"Loading"})]})]}),Mc=({palette:e,config:o})=>r.jsx(i.View,{style:{color:e.text},children:r.jsxs(i.Vertical,{gap:14,children:[r.jsxs(i.Horizontal,{gap:10,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Fe,{content:"Badge"}),r.jsx(Fe,{variant:"outline",content:"Outline"}),r.jsx(Fe,{content:"Primary",views:{container:{backgroundColor:e.primary,color:e.onPrimary,borderColor:e.primary}}}),r.jsx(Fe,{content:"Success",views:{container:{backgroundColor:e.success,color:e.onPrimary,borderColor:e.success}}}),r.jsx(Fe,{content:"Warning",views:{container:{backgroundColor:e.warning,color:e.onPrimary,borderColor:e.warning}}}),r.jsx(Fe,{content:"Error",views:{container:{backgroundColor:e.error,color:e.onPrimary,borderColor:e.error}}})]}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Jr,{status:"success",label:"Operational"}),r.jsx(Jr,{status:"warning",label:"Degraded"}),r.jsx(Jr,{status:"error",label:"Outage"}),r.jsx(eo,{size:"sm",loaderColor:o.theme.primary})]}),r.jsx(St,{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}}}),r.jsx(Mi,{value:64,height:10,showLabel:!0,color:e.primary,backgroundColor:e.border,views:{container:{backgroundColor:e.border},bar:{backgroundColor:e.primary}}})]})}),Wc=({palette:e,config:o,mode:t})=>{const n={container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},field:{color:e.text}};return r.jsx(i.View,{style:{color:e.text},children:r.jsxs(i.Vertical,{gap:16,children:[r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(je,{size:"md",label:"Name",placeholder:"Ada Lovelace",views:n}),r.jsx(or,{id:`forms-${o.metadata.id}-${t}`,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}}}),r.jsx($t,{label:"Notes",placeholder:"Add implementation notes",views:n})]}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(_t,{label:"Email updates",defaultIsSelected:!0}),r.jsx(Nt,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(Dt,{label:"Enabled",isChecked:!0})]})]})})},Cb=({config:e})=>{const[o,t]=h.useState(1),n=ab(e),a=lb(e),l=sb(e);return r.jsxs(i.Vertical,{gap:24,children:[r.jsx(ue,{title:"Brand Snapshot (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Tc,{palette:n,personality:l,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Tc,{palette:a,personality:l,config:e})})]})}),r.jsx(ue,{title:"Buttons — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(zc,{palette:n})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(zc,{palette:a})})]})}),r.jsx(ue,{title:"Status & Feedback — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Mc,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Mc,{palette:a,config:e})})]})}),r.jsx(ue,{title:"Forms — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Wc,{palette:n,config:e,mode:"light"})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Wc,{palette:a,config:e,mode:"dark"})})]})}),r.jsx(ue,{title:"Forms (legacy preview)",config:e,children:r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",alignItems:"start",gap:16,children:[r.jsx(je,{size:"md",label:"Name",placeholder:"Ada Lovelace"}),r.jsx(or,{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"}}}),r.jsx($t,{label:"Notes",placeholder:"Add implementation notes"}),r.jsxs(i.Vertical,{gap:12,children:[r.jsx(_t,{label:"Email updates",defaultIsSelected:!0}),r.jsx(Nt,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(Dt,{label:"Enabled",isChecked:!0}),r.jsx(Bl,{defaultValue:58,showValue:!0}),r.jsx(ml,{length:6,label:"Verification Code"})]})]})}),r.jsx(ue,{title:"Form States",config:e,children:r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(je,{size:"md",label:"Default",placeholder:"Type here",helperText:"Resting state"}),r.jsx(je,{size:"md",label:"Filled",defaultValue:"Ada Lovelace",helperText:"Has value"}),r.jsx(je,{size:"md",label:"With helper",placeholder:"user@example.com",helperText:"We'll never share your email"}),r.jsx(je,{size:"md",label:"Error",defaultValue:"invalid@",error:"Please enter a valid email"}),r.jsx(je,{size:"md",label:"Disabled",isDisabled:!0,defaultValue:"Cannot edit",helperText:"Field locked"}),r.jsx(je,{size:"md",label:"Read only",defaultValue:"Read-only value",isReadOnly:!0,helperText:"View only"}),r.jsx(or,{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"}}}),r.jsx(or,{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"}}})]})}),r.jsx(ue,{title:"Elevation & Depth",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:20,children:hb(e).map(c=>r.jsxs(i.Vertical,{gap:12,children:[r.jsx(i.View,{height:120,borderRadius:12,backgroundColor:e.theme.canvas,style:{boxShadow:c.shadow}}),r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"baseline",flexWrap:"wrap",children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",children:c.name}),r.jsx(i.Text,{fontSize:11,fontWeight:"600",color:e.theme.primary,children:c.label})]}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:c.description}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,style:{wordBreak:"break-word",opacity:.8},children:c.shadow})]})]},c.name))})}),r.jsx(ue,{title:"Color Blocks",config:e,children:r.jsx(i.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(([c,s,d])=>{const g=e.theme[c];return r.jsxs(i.Vertical,{gap:0,borderRadius:12,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,children:[r.jsx(i.View,{height:88,backgroundColor:g}),r.jsxs(i.Vertical,{gap:4,padding:12,backgroundColor:e.theme.surface,children:[r.jsx(i.Text,{fontSize:13,fontWeight:"700",children:s}),r.jsxs(i.Text,{fontSize:11,color:e.theme.muted,children:["theme.",c]}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:g})]})]},c)})})}),r.jsx(ue,{title:"Pricing — Booking (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(bc,{palette:n})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(bc,{palette:a})})]})}),r.jsx(ue,{title:"Pricing — SaaS Tiers (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:xc.map(c=>r.jsx(kc,{palette:n,tier:c,personality:l},c.name))})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:xc.map(c=>r.jsx(kc,{palette:a,tier:c,personality:l},c.name))})})]})}),r.jsx(ue,{title:"Pricing — Product (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Cc,{palette:n,personality:l})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Cc,{palette:a,personality:l})})]})}),r.jsx(ue,{title:"Pricing — Featured w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(wc,{palette:n,personality:l})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(wc,{palette:a,personality:l})})]})}),r.jsx(ue,{title:"Content — Color Block Cards",config:e,children:r.jsx(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:xb.map(c=>r.jsx(kb,{block:c,palette:n,personality:l},c.slug))})}),r.jsx(ue,{title:"Content — Article Cards w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Sc.map(c=>r.jsx(vc,{palette:n,article:c,personality:l},c.id))})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Sc.map(c=>r.jsx(vc,{palette:a,article:c,personality:l},c.id))})})]})}),r.jsx(ue,{title:"CTA Card — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Ic,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Ic,{palette:a,config:e})})]})}),r.jsx(ue,{title:"Product Card — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(me,{config:e,palette:n,label:"On light surface",children:r.jsx(Fc,{palette:n,config:e})}),r.jsx(me,{config:e,palette:a,label:"On dark surface",children:r.jsx(Fc,{palette:a,config:e})})]})}),r.jsx(ue,{title:"Content & Layout",config:e,children:r.jsxs(i.Vertical,{gap:24,children:[r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:[r.jsxs(we,{width:"min(100%, 320px)",children:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(i.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Fe,{variant:"filled",content:"New"})]})}),r.jsx(we.Content,{children:r.jsx(i.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."})}),r.jsx(we.Footer,{children:r.jsx(de,{size:"sm",children:e.metadata.id==="spacex"?"Explore":"Review"})})]}),r.jsxs(we,{width:"min(100%, 320px)",children:[r.jsx(we.Header,{children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",children:[r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[r.jsx(na,{fallback:e.metadata.label.slice(0,2)}),r.jsxs(i.Vertical,{gap:2,children:[r.jsx(i.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Starship":e.metadata.label}),r.jsx(i.Text,{fontSize:12,color:e.theme.muted,children:e.metadata.id==="spacex"?"Multiplanetary mission":"Config-driven preview"})]})]}),r.jsx(Fe,{variant:"outline",content:"Active"})]})}),r.jsx(we.Content,{children:e.metadata.id==="spacex"?r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"The most powerful launch vehicle ever developed. Designed to carry crew and cargo to Mars and beyond."}):r.jsx(St,{variant:"info",title:"Config active",description:"This alert is rendered by the shared component."})})]})]}),r.jsx(yb,{config:e}),r.jsx(Rn,{ratio:16/9,borderRadius:12,overflow:"hidden",children:r.jsx(i.View,{width:"100%",height:"100%",backgroundColor:e.theme.primary,children:r.jsxs(i.Vertical,{height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[r.jsx(i.Text,{fontWeight:"700",color:e.theme.onPrimary,children:"16:9 Aspect Ratio"}),r.jsx(Fe,{content:"Config primary color"})]})})}),r.jsxs($e,{children:[r.jsx($e.Content,{children:[1,2,3].map(c=>r.jsx($e.Item,{children:r.jsx(i.View,{height:200,borderRadius:12,alignItems:"center",justifyContent:"center",backgroundColor:e.theme.surface,borderColor:e.theme.border,borderWidth:1,borderStyle:"solid",children:r.jsxs(i.Text,{fontSize:24,fontWeight:"700",children:["Slide ",c]})})},c))}),r.jsxs(i.Horizontal,{gap:12,marginTop:12,justifyContent:"center",children:[r.jsx($e.Previous,{}),r.jsx($e.Next,{})]})]})]})}),r.jsx(ue,{title:"Navigation & Interactive",config:e,children:r.jsxs(i.Vertical,{gap:18,children:[r.jsxs(i.Vertical,{gap:20,children:[r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"With icons"}),r.jsx($o,{tabs:fb,defaultValue:"homes",views:{tab:{borderRadius:yr(e,"tabs")},activeTab:{borderRadius:yr(e,"tabs")}}})]}),r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"Without icons"}),r.jsx($o,{defaultValue:"overview",views:{tab:{borderRadius:yr(e,"tabs")},activeTab:{borderRadius:yr(e,"tabs")}},tabs:[{title:"Overview",value:"overview",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Tokens and components share the active config."})},{title:"Usage",value:"usage",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Audit",value:"audit",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Plain text tabs without icons."})}]})]})]}),r.jsx(bo,{items:pb,orientation:"horizontal",defaultActiveItemId:"components"}),(()=>{const c=yr(e,"accordion"),s={borderWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,marginBottom:0,borderRadius:0},d={...s,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:e.theme.border};return r.jsxs(De,{defaultValue:"tokens",collapsible:!0,shape:"rounded",views:{container:{borderRadius:c,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border}},children:[r.jsxs(De.Item,{value:"tokens",...s,views:{item:s,trigger:{borderRadius:0}},children:[r.jsx(De.Trigger,{children:"Token extraction"}),r.jsx(De.Content,{children:r.jsxs(i.Text,{color:e.theme.muted,children:[Object.keys(e.tokens.rawCssVars).length," raw CSS variables were extracted from ",e.metadata.sourcePath,"."]})})]}),r.jsxs(De.Item,{value:"overrides",...d,views:{item:d,trigger:{borderRadius:0}},children:[r.jsx(De.Trigger,{children:"Override behavior"}),r.jsx(De.Content,{children:r.jsx(i.Text,{color:e.theme.muted,children:"Props passed directly to components override the design-system defaults."})})]})]})})(),r.jsx(Xr,{label:"advanced tools"}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Xt,{color:e.theme.primary,children:"Toggle Button"}),r.jsx(si,{color:e.theme.primary,items:[{id:"left",value:"Left"},{id:"center",value:"Center"},{id:"right",value:"Right"}]}),r.jsx(et,{content:"Tooltip message",children:r.jsx(de,{variant:"outline",children:"Hover for Tooltip"})}),r.jsxs(Me,{children:[r.jsx(Me.Trigger,{children:r.jsx(de,{variant:"ghost",children:"Hover Card"})}),r.jsx(Me.Content,{children:r.jsxs(i.Vertical,{gap:4,padding:12,children:[r.jsx(i.Text,{fontWeight:"700",children:"Detailed Info"}),r.jsx(i.Text,{fontSize:12,opacity:.8,children:"Hover cards provide more context."})]})})]}),r.jsx(ui,{value:e.theme.primary}),r.jsx(ji,{shareData:{url:"https://example.com",title:"Example"}}),r.jsx(Ft,{to:"#",children:"Inline Link component"})]}),r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:r.jsx(zi,{currentPage:o,totalPages:10,onPageChange:t})})]})})]})},wb=({config:e})=>{var o;return r.jsxs(ht,{config:e,children:[r.jsx(ob,{children:(o=e.metadata.googleFontLinks)==null?void 0:o.map(t=>r.jsx("link",{rel:"stylesheet",href:t},t))}),r.jsx(i.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:r.jsxs(i.Vertical,{gap:28,children:[r.jsxs(i.Vertical,{gap:12,maxWidth:900,children:[r.jsxs(i.Text,{as:"h1",fontSize:44,lineHeight:"48px",fontWeight:"800",fontFamily:e.tokens.typography.fontFamily,children:[e.metadata.label," Design System"]}),r.jsxs(i.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."]})]}),r.jsxs(i.Vertical,{gap:28,children:[r.jsx(bb,{config:e}),r.jsx(Cb,{config:e})]})]})})]})};F.Accordion=De,F.ActionSheet=md,F.Alert=St,F.ArrowIcon=ad,F.AspectRatio=Rn,F.AttachmentGroup=gi,F.AttachmentIcon=Xo,F.AttachmentPreview=lm,F.AudioIcon=Fo,F.AudioInput=Md,F.AudioWaveform=vt,F.Avatar=na,F.BackIcon=Ms,F.Background=rc,F.Badge=Fe,F.BatteryIcon=fs,F.BluetoothIcon=od,F.BoldArrowIcon=nd,F.BookmarkIcon=ms,F.Button=de,F.CHART_COLORS=Le,F.CalendarIcon=Us,F.CameraIcon=ed,F.Card=we,F.Carousel=$e,F.Chart=H0,F.ChartIcon=Is,F.ChatInput=Qi,F.ChatWidget=tc,F.ChatWidgetComponent=bn,F.ChatWidgetWidget=vy,F.CheckIcon=zs,F.Checkbox=_t,F.ChevronIcon=he,F.ClockIcon=Gs,F.CloseEyeIcon=xt,F.CloseIcon=He,F.CloudIcon=ps,F.ColorInput=Pg,F.ColorPicker=ui,F.ComboBox=rf,F.Command=Oo,F.ContextMenu=Ho,F.CookieConsent=A0,F.CopyIcon=us,F.CountryPicker=Lg,F.CreditCardIcon=Bs,F.CropIcon=cd,F.DEFAULT_CHART_COLORS=ba,F.DatePicker=Kh,F.DeleteIcon=ys,F.DesignSystem=wb,F.DesignSystemProvider=ht,F.Divider=Op,F.DocumentIcon=Ts,F.DownloadIcon=ks,F.DragAndDrop=np,F.DragAndDropComponent=di,F.DragHandleIcon=Zc,F.DragHandleLinesIcon=dd,F.Drawer=yo,F.DropZone=cp,F.DropdownMenu=cr,F.DustBinIcon=Cr,F.EditIcon=bs,F.EmojiPicker=wp,F.ErrorIcon=vr,F.ExternalLinkIcon=Yn,F.FacebookIcon=ls,F.FileIcon=go,F.FileImage=O0,F.FileSVG=B0,F.FilterIcon=qs,F.FolderIcon=Qc,F.FormikChatInput=If,F.FormikCheckbox=ff,F.FormikColorInput=Ff,F.FormikComboBox=Ef,F.FormikCountryPicker=Mf,F.FormikDatePicker=zf,F.FormikEmojiPicker=am,F.FormikForm=gf,F.FormikIconPicker=Rf,F.FormikOTPInput=Nf,F.FormikPassword=Af,F.FormikRadio=mf,F.FormikSelect=Wf,F.FormikSelector=Uf,F.FormikSlider=Bf,F.FormikSwitch=Hf,F.FormikTagInput=jf,F.FormikTextArea=Pf,F.FormikTextField=Vf,F.FormikToggle=Kf,F.FormikToggleGroup=Xf,F.FormikUploader=Hl,F.GiftIcon=Vs,F.Gradient=xi,F.HeartIcon=ds,F.HelpIcon=Jc,F.HomeIcon=xs,F.HoverCard=Me,F.Icon=kr,F.IconPicker=Sp,F.ImageIcon=es,F.InfoIcon=Re,F.InstagramIcon=ns,F.KeyboardAvoidingView=Ul,F.LayoutIcon=Ls,F.LikeIcon=Rs,F.Link=Ft,F.LinkIcon=$s,F.LinkedinIcon=is,F.Loader=eo,F.LoadingSpinnerIcon=bt,F.LockIcon=ws,F.LogoutIcon=Es,F.MagicWandIcon=Qs,F.MapPinIcon=Ys,F.MediaPreview=im,F.MenuIcon=Ks,F.Menubar=xo,F.MessageLayout=wd,F.MessageView=ra,F.MicrophoneIcon=ut,F.MinusIcon=Nn,F.Modal=uo,F.ModalLayout=Zt,F.ModalRouter=Zt,F.MoonIcon=Fs,F.MoreIcon=Os,F.MousePointerIcon=Xn,F.NavigationMenu=bo,F.NotificationIcon=vs,F.OTPInput=ml,F.OpenEyeIcon=kt,F.PageLayout=vm,F.Pagination=zi,F.PanelIcon=Kn,F.Password=Xh,F.PauseIcon=ss,F.PlayIcon=qn,F.PlusIcon=Cs,F.PowerOffIcon=Ds,F.PrintIcon=Js,F.ProfileIcon=Ss,F.ProgressBar=Mi,F.Radio=Nt,F.RadioGroup=wg,F.RefreshIcon=Xs,F.Resizable=fn,F.RotateIcon=Ps,F.Router=jm,F.SaveIcon=hs,F.SearchIcon=Sr,F.Select=or,F.Selector=gg,F.SendIcon=yt,F.Separator=Xr,F.SettingsIcon=Un,F.ShapeIcon=js,F.ShareButton=ji,F.ShareIcon=Gn,F.ShieldIcon=As,F.Sidebar=hr,F.Slider=Bl,F.SliderIcon=id,F.SpinnerIcon=ld,F.SplashScreen=Fm,F.StarIcon=gs,F.StatusIndicator=Jr,F.StopIcon=wr,F.SuccessIcon=Ct,F.Switch=Dt,F.Table=Ve,F.Tabs=$o,F.TagInput=nf,F.TextArea=$t,F.TextField=je,F.TextIcon=Hs,F.ThreadsIcon=cs,F.TickIcon=Jo,F.Title=ci,F.Toast=xu,F.Toggle=Xt,F.ToggleGroup=si,F.Tooltip=et,F.TrashIcon=Ns,F.TwitchIcon=ts,F.TwitterIcon=os,F.UnLikeIcon=Zs,F.UnlockIcon=rd,F.UploadIcon=wt,F.Uploader=Ir,F.UserIcon=Xc,F.VideoIcon=Rc,F.WarningIcon=pt,F.WifiIcon=td,F.XIcon=rs,F.YoutubeIcon=as,F.ZapIcon=_s,F.ZoomInIcon=sd,F.ZoomOutIcon=Ws,F.deepMerge=Be,F.defaultDesignSystemConfig=An,F.designSystemConfigList=$c,F.designSystemConfigs=st,F.getDesignSystemComponentProps=gt,F.goBack=Mm,F.hideDrawer=ql,F.hideMessage=oa,F.hideModal=Jt,F.matchPath=Gl,F.mergeDesignSystemComponentProps=$n,F.navigate=zm,F.normalizeDesignSystemComponentProps=dt,F.setSplashLoaded=Tm,F.setSplashStarted=Im,F.showDrawer=wm,F.showMessage=ea,F.showModal=cm,F.showToast=ko,F.useDesignSystem=xr,F.useDesignSystemComponentProps=Io,F.useDrawerStore=ao,F.useHistory=on,F.useMergedDesignSystemComponentProps=pe,F.useMessageStore=Tr,F.useModalStore=no,F.useRouterStore=qe,F.useSplashStore=Nr,F.useToast=ku,Object.defineProperty(F,Symbol.toStringTag,{value:"Module"})});
|
|
67
|
+
`})]})},Vy=({number:e=20,children:o,...t})=>{const n=Array.from({length:e},(a,l)=>l);return r.jsxs(i.View,{width:"100%",height:"100%",backgroundColor:"black",position:"relative",overflow:"hidden",...t,children:[n.map(a=>{const l=a*37%200-100+"px",c=.2+a*13%6*.1+"s",g=(1+a*7%9)/2+"s",s=300+a*17%100+"px";return r.jsx(i.View,{position:"absolute",top:"0px",left:l,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(${s}) translateY(${s})`},iterationCount:"infinite",timingFunction:"linear",fillMode:"forwards",duration:g,delay:c},children:r.jsx(i.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&&r.jsx(i.View,{position:"relative",zIndex:1,width:"100%",height:"100%",children:o})]})},Sc=["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)"],Py=()=>Sc[Math.floor(Math.random()*Sc.length)],Dy=({rows:e=15,cols:o=10,squareSize:t=40,...n})=>{const a=Array(e).fill(1),l=Array(o).fill(1);return r.jsx(i.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((c,g)=>r.jsx(i.Horizontal,{gap:0,children:l.map((s,d)=>r.jsx(i.View,{height:t/3,width:t,borderStyle:"solid",borderColor:"color-gray-200",borderWidth:.5,backgroundColor:"transparent",cursor:"pointer",on:{hover:{backgroundColor:Py(),transition:"background-color 0.2s ease"}}},`col-${d}`))},`row-${g}`))})},$y=["rgb(59, 130, 246)","rgb(147, 51, 234)","rgb(236, 72, 153)","rgb(34, 197, 94)","rgb(251, 146, 60)","rgb(168, 85, 247)"],Ly=({count:e=50,colors:o=$y,speed:t="medium",shapes:n=["circle"],...a})=>{const l=Array.from({length:e},(d,u)=>u),c=()=>{switch(t){case"slow":return .5;case"fast":return 2;default:return 1}},g=()=>n[Math.floor(Math.random()*n.length)],s=()=>o[Math.floor(Math.random()*o.length)];return r.jsx(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:l.map(d=>{const u=Math.random()*8+4,f=Math.random()*400,m=Math.random()*300,p=Math.random()*400,y=Math.random()*300,k=(Math.random()*10+5)/c(),b=Math.random()*5,w=g(),C=s(),v={circle:{borderRadius:"50%"},square:{borderRadius:"2px"},triangle:{borderRadius:"0",clipPath:"polygon(50% 0%, 0% 100%, 100% 100%)"}};return r.jsx(i.View,{position:"absolute",width:u,height:u,backgroundColor:C,opacity:.7,style:{left:f,top:m,...v[w]},animate:{from:{transform:"translate(0px, 0px) scale(0.5)",opacity:0},to:{transform:`translate(${p-f}px, ${y-m}px) scale(1)`,opacity:.7},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${k}s`,delay:`${b}s`}},d)})})},By=({gridSize:e=30,lineColor:o="rgba(59, 130, 246, 0.3)",pulseColor:t="rgba(59, 130, 246, 0.8)",animationSpeed:n="medium",...a})=>{const l=()=>{switch(n){case"slow":return 4;case"fast":return 1;default:return 2}},c=Math.floor(400/e),g=Math.floor(300/e),s=c*g,d=Array.from({length:s},(u,f)=>f);return r.jsxs(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-900",...a,children:[Array.from({length:c+1},(u,f)=>r.jsx(i.View,{position:"absolute",left:f*e,top:0,width:1,height:"100%",backgroundColor:o},`v-line-${f}`)),Array.from({length:g+1},(u,f)=>r.jsx(i.View,{position:"absolute",left:0,top:f*e,width:"100%",height:1,backgroundColor:o},`h-line-${f}`)),d.map(u=>{const f=u%c,m=Math.floor(u/c),p=(f+m)*.1;return r.jsx(i.View,{position:"absolute",left:f*e+1,top:m*e+1,width:e-2,height:e-2,backgroundColor:"transparent",animate:{from:{backgroundColor:"transparent"},to:{backgroundColor:t},iterationCount:"infinite",direction:"alternate",timingFunction:"ease-in-out",duration:`${l()}s`,delay:`${p}s`}},u)})]})},_y=["rgba(59, 130, 246, 0.6)","rgba(147, 51, 234, 0.6)","rgba(236, 72, 153, 0.6)","rgba(34, 197, 94, 0.6)"],Oy=({rippleCount:e=5,colors:o=_y,maxSize:t=200,frequency:n=3,...a})=>{const l=Array.from({length:e},(c,g)=>({id:g,x:Math.random()*400,y:Math.random()*300,color:o[g%o.length],delay:g*(n/e),duration:3+Math.random()*2}));return r.jsxs(i.View,{width:400,height:300,position:"relative",overflow:"hidden",backgroundColor:"color-gray-100",...a,children:[l.map(c=>r.jsx(i.View,{position:"absolute",width:20,height:20,borderRadius:"50%",style:{left:c.x-10,top:c.y-10,border:`2px solid ${c.color}`,backgroundColor:"transparent"},animate:{from:{transform:"scale(0)",opacity:1},to:{transform:`scale(${t/20})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${c.duration}s`,delay:`${c.delay}s`}},c.id)),l.map(c=>r.jsx(i.View,{position:"absolute",width:10,height:10,borderRadius:"50%",style:{left:c.x-5,top:c.y-5,backgroundColor:c.color},animate:{from:{transform:"scale(1)",opacity:.8},to:{transform:`scale(${t/40})`,opacity:0},iterationCount:"infinite",timingFunction:"ease-out",duration:`${c.duration*1.2}s`,delay:`${c.delay+.5}s`}},`secondary-${c.id}`))]})},Ny=({children:e,src:o,backgroundSize:t="cover",backgroundPosition:n="center",backgroundRepeat:a="no-repeat",backgroundAttachment:l="scroll",imageOpacity:c=1,overlay:g=null,blendMode:s="normal",views:d,themeMode:u,...f})=>{const m={...zn.image,backgroundImage:`url(${o})`,backgroundSize:t,backgroundPosition:n,backgroundRepeat:a,backgroundAttachment:l,opacity:c,mixBlendMode:s};return r.jsxs(i.View,{...zn.container,...d==null?void 0:d.container,...f,children:[r.jsx(i.View,{style:m,...d==null?void 0:d.image}),g,e&&r.jsx(i.View,{...zn.content,...d==null?void 0:d.content,children:e})]})},qy=({children:e,src:o,autoPlay:t=!0,loop:n=!0,muted:a=!0,playsInline:l=!0,overlay:c=null,blendMode:g="normal",views:s,themeMode:d,...u})=>r.jsxs(i.View,{...Mn.container,...s==null?void 0:s.container,...u,children:[r.jsx(i.View,{as:"video",src:o,autoPlay:t,loop:n,muted:a,playsInline:l,style:{...Mn.video,mixBlendMode:g},...s==null?void 0:s.video}),c,e&&r.jsx(i.View,{...Mn.content,...s==null?void 0:s.content,children:e})]}),Uy=({children:e,...o})=>r.jsx(Ki,{...o,children:e}),Gy=/^(color|theme|light|dark)-/,Yy=e=>{const o=e.split("-"),t=parseInt(o[o.length-1],10),n=e.startsWith("theme-")?3:4;return o.length>=n&&!isNaN(t)&&t>=0&&t<=1e3?o.slice(0,-1).join("-"):e},Ky=({contentPosition:e,backgroundColor:o="color-black-900",...t})=>{const n=Gy.test(o),a=n?Yy(o):o,c=(()=>{let g=`${a}-100`,s=`${a}-900`,d=`${a}-600`,u=`${a}-400`;switch(n||(g=`color-mix(in srgb, ${a} 10%, transparent)`,s=`color-mix(in srgb, ${a} 90%, transparent)`,d=`color-mix(in srgb, ${a} 70%, transparent)`,u=`color-mix(in srgb, ${a} 50%, transparent)`),e){case"left":return`radial-gradient(circle at 70% 50%, ${g} 0%, ${g} 100%), linear-gradient(to right, ${s} 0%, ${d} 65%, ${g} 100%)`;case"right":return`radial-gradient(circle at 30% 50%, ${g} 0%, ${g} 100%), linear-gradient(to left, ${s} 0%, ${d} 65%, ${g} 100%)`;case"top":return`radial-gradient(circle at 50% 40%, ${g} 0%, ${g} 100%), linear-gradient(to bottom, ${s} 0%, ${d} 60%, ${g} 100%)`;case"bottom":return`radial-gradient(circle at 50% 60%, ${g} 0%, ${g} 100%), linear-gradient(to top, ${s} 0%, ${d} 60%, ${g} 100%)`;case"center":return`radial-gradient(circle at 50% 70%, ${s} 0%, ${g} 100%)`;default:return u}})();return r.jsx(i.View,{position:"absolute",top:0,left:0,width:"100%",height:"100%",background:c,pointerEvents:"none",zIndex:1,...t})},Xy=({children:e,views:o,...t})=>r.jsx(Ay.Provider,{value:{},children:r.jsx(i.View,{...Ey.container,...o==null?void 0:o.container,...t,children:e})}),vc=h.forwardRef(({children:e,shape:o="rounded",decorationRotation:t=5,decorationScale:n=1,decorationOpacity:a=.8,views:l,...c},g)=>{const d=(k=>{switch(k){case"square":return"0px";case"pill":return"9999px";case"rounded":default:return"16px"}})(o),u=Math.abs(t)*(Math.PI/180),f=Math.sin(u)*100,m=(n-1)*100/2,p=Math.ceil(f+m),y=c.backgroundColor??"theme-primary";return r.jsx(i.View,{...c,ref:g,backgroundColor:"transparent",position:"relative",overflow:"visible",...l==null?void 0:l.container,children:r.jsxs(i.View,{padding:c.padding??`${96+p}px ${p}px`,position:"relative",overflow:"visible",children:[r.jsx(i.View,{position:"absolute",top:p,left:p,right:p,bottom:p,backgroundColor:y,borderRadius:d,opacity:a/1.5,transform:`scale(${n})`,pointerEvents:"none",zIndex:1,...l==null?void 0:l.back}),r.jsx(i.View,{position:"absolute",top:p,left:p,right:p,bottom:p,transform:`rotate(${t}deg) scale(${n})`,opacity:a/1.2,backgroundColor:y,borderRadius:d,pointerEvents:"none",zIndex:2,...l==null?void 0:l.front}),r.jsx(i.View,{margin:"0 auto",position:"relative",zIndex:3,...l==null?void 0:l.content,children:e})]})})});vc.displayName="Background.Layout";const be=Xy;be.Aurora=Hy,be.Meteors=Vy,be.Wall=Dy,be.Particles=Ly,be.Grid=By,be.Ripples=Oy,be.Image=Ny,be.Video=qy,be.Gradient=Uy,be.Overlay=Ky,be.Layout=vc;const Tc=h.forwardRef((e,o)=>r.jsx(be,{...e,ref:o}));Tc.displayName="Background";const Ic=Object.assign(Tc,{Layout:be.Layout,Aurora:be.Aurora,Meteors:be.Meteors,Wall:be.Wall,Particles:be.Particles,Grid:be.Grid,Ripples:be.Ripples,Image:be.Image,Video:be.Video,Gradient:be.Gradient,Overlay:be.Overlay});Ic.displayName="Background";function Jy(e){const{inputValue:o,onInputChange:t,onSubmit:n,messages:a=[]}=e,[l,c]=h.useState(""),g=h.useRef(null),s=h.useRef(null),d=o!==void 0,u=o!==void 0?o:l,f=h.useCallback(p=>{d?t==null||t(p):c(p)},[d,t]),m=h.useCallback(p=>{p&&p.preventDefault();const y=u.trim();y&&n&&(n(y),d||c(""),g.current&&(g.current.style.height="auto"))},[u,n,d]);return h.useEffect(()=>{s.current&&(s.current.scrollTop=s.current.scrollHeight)},[a.length]),{internalInputValue:u,handleInputChange:f,handleSubmit:m,inputRef:g,messagesRef:s}}const Qy={sm:{fontSize:"12px",padding:"8px"},md:{fontSize:"14px",padding:"10px"},lg:{fontSize:"14px",padding:"12px"}},Zy={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"}},Ry={sm:{fontSize:"12px",padding:"8px 10px",borderRadius:"12px"},md:{fontSize:"14px",padding:"10px 12px",borderRadius:"12px"},lg:{fontSize:"14px",padding:"12px 14px",borderRadius:"14px"}},eb={backgroundColor:"theme-primary",color:"color-white",alignSelf:"flex-end",borderBottomRightRadius:"4px"},ob={backgroundColor:"color-white",color:"color-gray-900",alignSelf:"flex-start",borderBottomLeftRadius:"4px",border:"1px solid color-gray-200"},Ze={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:{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"},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}},rb=({messages:e=[],inputPlaceholder:o="Type a message...",disableInput:t=!1,variant:n="default",size:a="md",showTimestamps:l=!0,enableAttachments:c=!1,enableContextPicker:g=!1,selectedContextElements:s=[],onContextPickerClick:d,onRemoveContextElement:u,isLoading:f=!1,loadingText:m="Loading...",styles:p={},maxHeight:y="600px",internalInputValue:k,handleInputChange:b,handleSubmit:w,inputRef:C,messagesRef:v,inputValue:S,onInputChange:x,...I})=>{var V;const T={...Ze.container,...Zy[n],...p.container},W={...Ze.messagesContainer,maxHeight:y,...p.messagesContainer},D={...Ze.inputContainer,...p.inputContainer},P={...Ze.input,...Qy[a],...p.input},M=h.useCallback(H=>{b(H.target.value),H.target.style.height="auto",H.target.style.height=`${H.target.scrollHeight}px`},[b]),E=h.useCallback(H=>{H.key==="Enter"&&!H.shiftKey&&(H.preventDefault(),w())},[w]),F=k.trim().length>0,{onSubmit:j,...A}=I;return r.jsxs(i.View,{...T,...A,children:[r.jsxs(i.View,{ref:v,...W,children:[e.length===0?r.jsx(i.View,{display:"flex",alignItems:"center",justifyContent:"center",flex:1,color:"color-gray-500",children:r.jsx(i.Text,{fontSize:"14px",children:"No messages yet. Start a conversation."})}):e.map(H=>r.jsx(tb,{message:H,size:a,showTimestamp:l,styles:{bubble:p.bubble,userBubble:p.userBubble,assistantBubble:p.assistantBubble,timestamp:p.timestamp,reasoningContainer:p.reasoningContainer,reasoningContent:p.reasoningContent,errorMessage:p.errorMessage,systemMessage:p.systemMessage,toolMessage:p.toolMessage}},H.id)),f&&r.jsxs(i.Horizontal,{justifyContent:"flex-start",alignItems:"center",gap:8,marginTop:"8px",...p.loadingIndicator,children:[r.jsx(Mt,{widthHeight:12,color:"currentColor",filled:!1,style:{animation:"spin 1s linear infinite"}}),r.jsx(i.Text,{color:"color-gray-500",fontSize:"14px",children:m})]})]}),r.jsxs(i.View,{children:[s.length>0&&r.jsx(i.Horizontal,{gap:8,marginBottom:"8px",flexWrap:"wrap",padding:"0 12px 8px",...p.contextChipsContainer,children:s.map(H=>r.jsxs(i.Horizontal,{backgroundColor:"color-blue-50",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",borderRadius:"9999px",padding:"6px 10px",alignItems:"center",gap:6,children:[r.jsx(i.Text,{fontSize:"12px",color:"color-blue-700",fontWeight:"500",children:H.name}),r.jsx(i.View,{as:"button",type:"button",onClick:()=>u==null?void 0:u(H.id),cursor:"pointer",border:"none",backgroundColor:"transparent",display:"flex",alignItems:"center",children:r.jsx($e,{widthHeight:12,color:"color-blue-700"})})]},H.id))}),r.jsxs(i.View,{as:"form",onSubmit:w,...D,children:[c&&r.jsx(i.View,{as:"button",type:"button",...Ze.attachmentButton,...p.attachmentButton,_hover:{backgroundColor:"color-gray-100"},children:r.jsx(tr,{widthHeight:16,color:"color-gray-600"})}),r.jsx(i.View,{as:"textarea",ref:C,value:k,onChange:M,onKeyDown:E,placeholder:o,disabled:t||f,...P,style:{...P,opacity:t||f?.5:1}}),r.jsxs(i.Vertical,{gap:4,alignItems:"center",children:[g&&r.jsx(i.View,{as:"button",type:"button",onClick:d,...Ze.attachmentButton,...p.contextPickerButton,_hover:{backgroundColor:"color-gray-100",...(V=p.contextPickerButton)==null?void 0:V._hover},title:"Select element from page",children:r.jsx(sa,{widthHeight:16,color:"color-gray-600"})}),r.jsx(i.View,{as:"button",disabled:!F||t||f,...Ze.sendButton,backgroundColor:F?"theme-primary":"color-gray-300",_hover:{backgroundColor:F?"theme-primary":"color-gray-300"},...p.sendButton,style:{cursor:F?"pointer":"not-allowed",opacity:!F||t||f?.6:1},children:r.jsx(zt,{widthHeight:16,color:"color-white",filled:!1})})]})]})]})]})},tb=({message:e,size:o,showTimestamp:t,styles:n})=>{const[a,l]=h.useState(!1),[c,g]=h.useState(!1),s=e.role==="user",d=e.messageType==="system",u=e.messageType==="error",f=e.messageType==="tool";if(d)return r.jsx(i.View,{display:"flex",justifyContent:"center",padding:"8px",width:"100%",...n.systemMessage,children:r.jsxs(i.Horizontal,{gap:6,alignItems:"center",opacity:.7,children:[r.jsx(ro,{widthHeight:12,color:"color-gray-600"}),r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.content})]})});if(f)return r.jsx(i.View,{display:"flex",justifyContent:"flex-start",padding:"8px 16px",width:"100%",...n.toolMessage,children:r.jsxs(i.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:[r.jsx(aa,{widthHeight:14,color:"color-gray-600"}),r.jsxs(i.Vertical,{gap:2,children:[r.jsx(i.Text,{fontSize:"11px",fontWeight:"600",color:"color-gray-700",children:"Tool Usage"}),r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontFamily:"monospace",children:e.content})]})]})});const m={...Ze.bubble,...Ry[o],...s?eb:ob,...u?{backgroundColor:"color-red-50",borderWidth:1,borderStyle:"solid",borderColor:"color-red-200",color:"color-red-700"}:{},...n.bubble,...s?n.userBubble:n.assistantBubble,...u?n.errorMessage:{}},p={...Ze.timestamp,[s?"right":"left"]:"8px",opacity:a?1:0,...n.timestamp};return r.jsx(i.View,{position:"relative",onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),display:"flex",justifyContent:s?"flex-end":"flex-start",children:r.jsxs(i.View,{...m,children:[t&&r.jsx(i.View,{...p,children:e.timestamp.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),u&&r.jsxs(i.Horizontal,{gap:6,marginBottom:"4px",alignItems:"center",children:[r.jsx(Wr,{widthHeight:14,color:"color-red-700"}),r.jsx(i.Text,{fontWeight:"600",fontSize:"12px",children:"Error"})]}),e.reasoning&&r.jsxs(i.View,{marginBottom:"8px",borderBottomWidth:1,borderBottomStyle:"solid",borderBottomColor:"color-gray-200",paddingBottom:"8px",...n.reasoningContainer,children:[r.jsxs(i.Horizontal,{as:"button",onClick:()=>g(!c),cursor:"pointer",gap:4,alignItems:"center",backgroundColor:"transparent",border:"none",padding:0,children:[r.jsx(i.Text,{fontSize:"11px",color:"color-gray-500",fontWeight:"600",children:"Thinking Process"}),r.jsx(ye,{orientation:c?"down":"right",widthHeight:10,color:"color-gray-500"})]}),c&&r.jsx(i.View,{padding:"8px",backgroundColor:"color-gray-50",borderRadius:"8px",marginTop:"4px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",...n.reasoningContent,children:r.jsx(i.Text,{fontSize:"12px",color:"color-gray-600",fontStyle:"italic",children:e.reasoning})})]}),r.jsx(i.View,{whiteSpace:"pre-wrap",wordBreak:"break-word",children:e.content}),e.attachments&&e.attachments.length>0&&r.jsx(i.Vertical,{gap:4,marginTop:"8px",children:e.attachments.map(y=>r.jsxs(i.Horizontal,{gap:6,padding:"6px 8px",backgroundColor:"color-gray-50",borderRadius:"8px",fontSize:"12px",borderWidth:1,borderStyle:"solid",borderColor:"color-gray-200",children:[r.jsx(tr,{widthHeight:14}),r.jsx(i.Text,{children:y.name})]},y.id))}),e.contextElements&&e.contextElements.length>0&&r.jsxs(i.Vertical,{gap:4,marginTop:"8px",children:[r.jsx(i.Text,{fontSize:"11px",color:"color-black-500",fontWeight:"600",children:"Context:"}),e.contextElements.map(y=>r.jsx(i.Horizontal,{gap:6,padding:"6px 10px",backgroundColor:"color-blue-50",borderRadius:"9999px",fontSize:"11px",borderWidth:1,borderStyle:"solid",borderColor:"color-blue-200",children:r.jsx(i.Text,{color:"color-blue-700",fontWeight:"500",children:y.name})},y.id))]})]})})},jn=e=>{const o=Jy(e);return r.jsx(rb,{...e,...o})};jn.displayName="ChatWidget";const Fc=jn;function nb({onSelect:e,onCancel:o,active:t}){const[n,a]=h.useState(null);h.useRef(null);const l=h.useCallback(s=>{var p;if(!t)return;const d=document.elementFromPoint(s.clientX,s.clientY);if(!d||d===document.body||d.closest('[data-chatwidget-ignore="true"]')||d.closest("#chatwidget-overlay")){a(null);return}const u=d.getBoundingClientRect();let f=d.tagName.toLowerCase();if(d.id)f+=`#${d.id}`;else if(d.className&&typeof d.className=="string"){const y=d.className.split(" ")[0];y&&(f+=`.${y}`)}const m=(p=d.innerText)==null?void 0:p.slice(0,20);m&&(f+=` ("${m}...")`),a({id:d.id||`el-${Date.now()}`,name:f,tagName:d.tagName.toLowerCase(),rect:u})},[t]),c=h.useCallback(s=>{!t||s.target.closest('[data-chatwidget-ignore="true"]')||(s.preventDefault(),s.stopPropagation(),n&&e(n))},[t,n,e]),g=h.useCallback(s=>{t&&s.key==="Escape"&&o()},[t,o]);return h.useEffect(()=>{if(!(typeof document>"u"))return t?(document.addEventListener("mousemove",l),document.addEventListener("click",c,!0),document.addEventListener("keydown",g),document.body.style.cursor="crosshair"):(a(null),document.removeEventListener("mousemove",l),document.removeEventListener("click",c,!0),document.removeEventListener("keydown",g),document.body.style.cursor=""),()=>{document.removeEventListener("mousemove",l),document.removeEventListener("click",c,!0),document.removeEventListener("keydown",g),document.body.style.cursor=""}},[t,l,c,g]),{highlightedElement:n}}function ab({element:e}){return e?r.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:r.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 lb=({initialMessages:e=[],onSendMessage:o,bubbleSize:t="md"})=>{const[n,a]=h.useState(!1),[l,c]=h.useState(!1),[g,s]=h.useState(e),[d,u]=h.useState([]),{highlightedElement:f}=nb({active:l,onSelect:b=>{u(w=>[...w,b]),c(!1),a(!0)},onCancel:()=>{c(!1),a(!0)}}),m=()=>a(!n),p=()=>{c(!0),a(!1)},y=b=>{u(w=>w.filter(C=>C.id!==b))},k=b=>{const w={id:Date.now().toString(),role:"user",content:b,timestamp:new Date,contextElements:[...d]};s(C=>[...C,w]),o==null||o(b,d),u([]),setTimeout(()=>{var x;const C=Math.random()>.7,v=Math.random()>.4,S={id:(Date.now()+1).toString(),role:"assistant",timestamp:new Date,content:C?"I will highlight the selected element.":`I received your message regarding: ${((x=w.contextElements)==null?void 0:x.map(I=>I.name).join(", "))||"general context"}. How can I assist you further?`,messageType:C?"tool":"text",reasoning:v?"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};s(I=>[...I,S]),C&&setTimeout(()=>{s(I=>[...I,{id:(Date.now()+2).toString(),role:"assistant",messageType:"system",content:'Tool "highlightElement" executed successfully.',timestamp:new Date}])},800)},1e3)};return r.jsxs(i.View,{position:"fixed",bottom:24,right:24,zIndex:9999,children:[r.jsx(ab,{element:f}),l&&r.jsx(i.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:r.jsx(i.Text,{fontWeight:"600",fontSize:"14px",children:"Click an element to select it. Press ESC to cancel."})}),n&&r.jsxs(i.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:[r.jsxs(i.View,{padding:"16px",borderBottom:"1px solid rgba(0,0,0,0.05)",display:"flex",justifyContent:"space-between",alignItems:"center",children:[r.jsx(i.Text,{fontWeight:"bold",color:"color-gray-800",children:"ChatWidget Assistant"}),r.jsx(i.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:r.jsx($e,{widthHeight:16,color:"color-gray-500"})})]}),r.jsx(Fc,{messages:g,onSubmit:k,size:t,variant:"minimal",enableContextPicker:!0,selectedContextElements:d,onContextPickerClick:p,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)"}}})]}),!l&&r.jsx(i.View,{as:"button",onClick:m,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?r.jsx($e,{widthHeight:24,color:"white"}):r.jsx(ca,{widthHeight:24,color:"white"})})]})};function Wn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ib=typeof Element<"u",cb=typeof Map=="function",sb=typeof Set=="function",db=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function gt(e,o){if(e===o)return!0;if(e&&o&&typeof e=="object"&&typeof o=="object"){if(e.constructor!==o.constructor)return!1;var t,n,a;if(Array.isArray(e)){if(t=e.length,t!=o.length)return!1;for(n=t;n--!==0;)if(!gt(e[n],o[n]))return!1;return!0}var l;if(cb&&e instanceof Map&&o instanceof Map){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;for(l=e.entries();!(n=l.next()).done;)if(!gt(n.value[1],o.get(n.value[0])))return!1;return!0}if(sb&&e instanceof Set&&o instanceof Set){if(e.size!==o.size)return!1;for(l=e.entries();!(n=l.next()).done;)if(!o.has(n.value[0]))return!1;return!0}if(db&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(o)){if(t=e.length,t!=o.length)return!1;for(n=t;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),t=a.length,t!==Object.keys(o).length)return!1;for(n=t;n--!==0;)if(!Object.prototype.hasOwnProperty.call(o,a[n]))return!1;if(ib&&e instanceof Element)return!1;for(n=t;n--!==0;)if(!((a[n]==="_owner"||a[n]==="__v"||a[n]==="__o")&&e.$$typeof)&&!gt(e[a[n]],o[a[n]]))return!1;return!0}return e!==e&&o!==o}var gb=function(o,t){try{return gt(o,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const hb=Wn(gb);var fb=function(e,o,t,n,a,l,c,g){if(process.env.NODE_ENV!=="production"&&o===void 0)throw new Error("invariant requires an error message argument");if(!e){var s;if(o===void 0)s=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var d=[t,n,a,l,c,g],u=0;s=new Error(o.replace(/%s/g,function(){return d[u++]})),s.name="Invariant Violation"}throw s.framesToPop=1,s}},ub=fb;const zc=Wn(ub);var mb=function(o,t,n,a){var l=n?n.call(a,o,t):void 0;if(l!==void 0)return!!l;if(o===t)return!0;if(typeof o!="object"||!o||typeof t!="object"||!t)return!1;var c=Object.keys(o),g=Object.keys(t);if(c.length!==g.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),d=0;d<c.length;d++){var u=c[d];if(!s(u))return!1;var f=o[u],m=t[u];if(l=n?n.call(a,f,m,u):void 0,l===!1||l===void 0&&f!==m)return!1}return!0};const pb=Wn(mb);var Mc=(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))(Mc||{}),En={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"]}},jc=Object.values(Mc),ht={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},Wc=Object.entries(ht).reduce((e,[o,t])=>(e[t]=o,e),{}),Ue="data-rh",Ko={DEFAULT_TITLE:"defaultTitle",DEFER:"defer",ENCODE_SPECIAL_CHARACTERS:"encodeSpecialCharacters",ON_CHANGE_CLIENT_STATE:"onChangeClientState",TITLE_TEMPLATE:"titleTemplate",PRIORITIZE_SEO_TAGS:"prioritizeSeoTags"},Xo=(e,o)=>{for(let t=e.length-1;t>=0;t-=1){const n=e[t];if(Object.prototype.hasOwnProperty.call(n,o))return n[o]}return null},yb=e=>{let o=Xo(e,"title");const t=Xo(e,Ko.TITLE_TEMPLATE);if(Array.isArray(o)&&(o=o.join("")),t&&o)return t.replace(/%s/g,()=>o);const n=Xo(e,Ko.DEFAULT_TITLE);return o||n||void 0},bb=e=>Xo(e,Ko.ON_CHANGE_CLIENT_STATE)||(()=>{}),An=(e,o)=>o.filter(t=>typeof t[e]<"u").map(t=>t[e]).reduce((t,n)=>({...t,...n}),{}),xb=(e,o)=>o.filter(t=>typeof t.base<"u").map(t=>t.base).reverse().reduce((t,n)=>{if(!t.length){const a=Object.keys(n);for(let l=0;l<a.length;l+=1){const g=a[l].toLowerCase();if(e.indexOf(g)!==-1&&n[g])return t.concat(n)}}return t},[]),kb=e=>console&&typeof console.warn=="function"&&console.warn(e),Sr=(e,o,t)=>{const n={};return t.filter(a=>Array.isArray(a[e])?!0:(typeof a[e]<"u"&&kb(`Helmet: ${e} should be of type "Array". Instead found type "${typeof a[e]}"`),!1)).map(a=>a[e]).reverse().reduce((a,l)=>{const c={};l.filter(s=>{let d;const u=Object.keys(s);for(let m=0;m<u.length;m+=1){const p=u[m],y=p.toLowerCase();o.indexOf(y)!==-1&&!(d==="rel"&&s[d].toLowerCase()==="canonical")&&!(y==="rel"&&s[y].toLowerCase()==="stylesheet")&&(d=y),o.indexOf(p)!==-1&&(p==="innerHTML"||p==="cssText"||p==="itemprop")&&(d=p)}if(!d||!s[d])return!1;const f=s[d].toLowerCase();return n[d]||(n[d]={}),c[d]||(c[d]={}),n[d][f]?!1:(c[d][f]=!0,!0)}).reverse().forEach(s=>a.push(s));const g=Object.keys(c);for(let s=0;s<g.length;s+=1){const d=g[s],u={...n[d],...c[d]};n[d]=u}return a},[]).reverse()},Cb=(e,o)=>{if(Array.isArray(e)&&e.length){for(let t=0;t<e.length;t+=1)if(e[t][o])return!0}return!1},wb=e=>({baseTag:xb(["href"],e),bodyAttributes:An("bodyAttributes",e),defer:Xo(e,Ko.DEFER),encode:Xo(e,Ko.ENCODE_SPECIAL_CHARACTERS),htmlAttributes:An("htmlAttributes",e),linkTags:Sr("link",["rel","href"],e),metaTags:Sr("meta",["name","charset","http-equiv","property","itemprop"],e),noscriptTags:Sr("noscript",["innerHTML"],e),onChangeClientState:bb(e),scriptTags:Sr("script",["src","innerHTML"],e),styleTags:Sr("style",["cssText"],e),title:yb(e),titleAttributes:An("titleAttributes",e),prioritizeSeoTags:Cb(e,Ko.PRIORITIZE_SEO_TAGS)}),Ec=e=>Array.isArray(e)?e.join(""):e,Sb=(e,o)=>{const t=Object.keys(e);for(let n=0;n<t.length;n+=1)if(o[t[n]]&&o[t[n]].includes(e[t[n]]))return!0;return!1},Hn=(e,o)=>Array.isArray(e)?e.reduce((t,n)=>(Sb(n,o)?t.priority.push(n):t.default.push(n),t),{priority:[],default:[]}):{default:e,priority:[]},Ac=(e,o)=>({...e,[o]:void 0}),vb=["noscript","script","style"],Vn=(e,o=!0)=>o===!1?String(e):String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'"),Hc=e=>Object.keys(e).reduce((o,t)=>{const n=typeof e[t]<"u"?`${t}="${e[t]}"`:`${t}`;return o?`${o} ${n}`:n},""),Tb=(e,o,t,n)=>{const a=Hc(t),l=Ec(o);return a?`<${e} ${Ue}="true" ${a}>${Vn(l,n)}</${e}>`:`<${e} ${Ue}="true">${Vn(l,n)}</${e}>`},Ib=(e,o,t=!0)=>o.reduce((n,a)=>{const l=a,c=Object.keys(l).filter(d=>!(d==="innerHTML"||d==="cssText")).reduce((d,u)=>{const f=typeof l[u]>"u"?u:`${u}="${Vn(l[u],t)}"`;return d?`${d} ${f}`:f},""),g=l.innerHTML||l.cssText||"",s=vb.indexOf(e)===-1;return`${n}<${e} ${Ue}="true" ${c}${s?"/>":`>${g}</${e}>`}`},""),Vc=(e,o={})=>Object.keys(e).reduce((t,n)=>{const a=ht[n];return t[a||n]=e[n],t},o),Fb=(e,o,t)=>{const n={key:o,[Ue]:!0},a=Vc(t,n);return[h.createElement("title",a,o)]},ft=(e,o)=>o.map((t,n)=>{const a={key:n,[Ue]:!0};return Object.keys(t).forEach(l=>{const g=ht[l]||l;if(g==="innerHTML"||g==="cssText"){const s=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:s}}else a[g]=t[l]}),h.createElement(e,a)}),Be=(e,o,t=!0)=>{switch(e){case"title":return{toComponent:()=>Fb(e,o.title,o.titleAttributes),toString:()=>Tb(e,o.title,o.titleAttributes,t)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>Vc(o),toString:()=>Hc(o)};default:return{toComponent:()=>ft(e,o),toString:()=>Ib(e,o,t)}}},zb=({metaTags:e,linkTags:o,scriptTags:t,encode:n})=>{const a=Hn(e,En.meta),l=Hn(o,En.link),c=Hn(t,En.script);return{priorityMethods:{toComponent:()=>[...ft("meta",a.priority),...ft("link",l.priority),...ft("script",c.priority)],toString:()=>`${Be("meta",a.priority,n)} ${Be("link",l.priority,n)} ${Be("script",c.priority,n)}`},metaTags:a.default,linkTags:l.default,scriptTags:c.default}},Mb=e=>{const{baseTag:o,bodyAttributes:t,encode:n=!0,htmlAttributes:a,noscriptTags:l,styleTags:c,title:g="",titleAttributes:s,prioritizeSeoTags:d}=e;let{linkTags:u,metaTags:f,scriptTags:m}=e,p={toComponent:()=>[],toString:()=>""};return d&&({priorityMethods:p,linkTags:u,metaTags:f,scriptTags:m}=zb(e)),{priority:p,base:Be("base",o,n),bodyAttributes:Be("bodyAttributes",t,n),htmlAttributes:Be("htmlAttributes",a,n),link:Be("link",u,n),meta:Be("meta",f,n),noscript:Be("noscript",l,n),script:Be("script",m,n),style:Be("style",c,n),title:Be("title",{title:g,titleAttributes:s},n)}},Pn=Mb,ut=[],Dn=!!(typeof window<"u"&&window.document&&window.document.createElement),$n=class{constructor(e,o){oo(this,"instances",[]);oo(this,"canUseDOM",Dn);oo(this,"context");oo(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?ut:this.instances,add:e=>{(this.canUseDOM?ut:this.instances).push(e)},remove:e=>{const o=(this.canUseDOM?ut:this.instances).indexOf(e);(this.canUseDOM?ut:this.instances).splice(o,1)}}});this.context=e,this.canUseDOM=o||!1,o||(e.helmet=Pn({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},jb=parseInt(h.version.split(".")[0],10),Ln=jb>=19,Wb={},Pc=h.createContext(Wb),Eb=(Io=class extends h.Component{constructor(t){super(t);oo(this,"helmetData");Ln?this.helmetData=null:this.helmetData=new $n(this.props.context||{},Io.canUseDOM)}render(){return Ln?h.createElement(h.Fragment,null,this.props.children):h.createElement(Pc.Provider,{value:this.helmetData.value},this.props.children)}},oo(Io,"canUseDOM",Dn),Io),Jo=(e,o)=>{const t=document.head||document.querySelector("head"),n=t.querySelectorAll(`${e}[${Ue}]`),a=[].slice.call(n),l=[];let c;return o&&o.length&&o.forEach(g=>{const s=document.createElement(e);for(const d in g)if(Object.prototype.hasOwnProperty.call(g,d))if(d==="innerHTML")s.innerHTML=g.innerHTML;else if(d==="cssText"){const u=g.cssText;s.appendChild(document.createTextNode(u))}else{const u=d,f=typeof g[u]>"u"?"":g[u];s.setAttribute(d,f)}s.setAttribute(Ue,"true"),a.some((d,u)=>(c=u,s.isEqualNode(d)))?a.splice(c,1):l.push(s)}),a.forEach(g=>{var s;return(s=g.parentNode)==null?void 0:s.removeChild(g)}),l.forEach(g=>t.appendChild(g)),{oldTags:a,newTags:l}},Bn=(e,o)=>{const t=document.getElementsByTagName(e)[0];if(!t)return;const n=t.getAttribute(Ue),a=n?n.split(","):[],l=[...a],c=Object.keys(o);for(const g of c){const s=o[g]||"";t.getAttribute(g)!==s&&t.setAttribute(g,s),a.indexOf(g)===-1&&a.push(g);const d=l.indexOf(g);d!==-1&&l.splice(d,1)}for(let g=l.length-1;g>=0;g-=1)t.removeAttribute(l[g]);a.length===l.length?t.removeAttribute(Ue):t.getAttribute(Ue)!==c.join(",")&&t.setAttribute(Ue,c.join(","))},Ab=(e,o)=>{typeof e<"u"&&document.title!==e&&(document.title=Ec(e)),Bn("title",o)},Dc=(e,o)=>{const{baseTag:t,bodyAttributes:n,htmlAttributes:a,linkTags:l,metaTags:c,noscriptTags:g,onChangeClientState:s,scriptTags:d,styleTags:u,title:f,titleAttributes:m}=e;Bn("body",n),Bn("html",a),Ab(f,m);const p={baseTag:Jo("base",t),linkTags:Jo("link",l),metaTags:Jo("meta",c),noscriptTags:Jo("noscript",g),scriptTags:Jo("script",d),styleTags:Jo("style",u)},y={},k={};Object.keys(p).forEach(b=>{const{newTags:w,oldTags:C}=p[b];w.length&&(y[b]=w),C.length&&(k[b]=p[b].oldTags)}),o&&o(),s(e,y,k)},vr=null,Hb=e=>{vr&&cancelAnimationFrame(vr),e.defer?vr=requestAnimationFrame(()=>{Dc(e,()=>{vr=null})}):(Dc(e),vr=null)},Vb=Hb,$c=class extends h.Component{constructor(){super(...arguments);oo(this,"rendered",!1)}shouldComponentUpdate(o){return!pb(o,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:o}=this.props.context;o.remove(this),this.emitChange()}emitChange(){const{helmetInstances:o,setHelmet:t}=this.props.context;let n=null;const a=wb(o.get().map(l=>{const{context:c,...g}=l.props;return g}));Eb.canUseDOM?Vb(a):Pn&&(n=Pn(a)),t(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}},mt=[],Lc=e=>{const o={};for(const t of Object.keys(e))o[Wc[t]||t]=e[t];return o},To=e=>{const o={};for(const t of Object.keys(e)){const n=ht[t];o[n||t]=e[t]}return o},Bc=(e,o)=>{if(!Dn)return;const t=document.getElementsByTagName(e)[0];if(!t)return;const n="data-rh-managed",a=t.getAttribute(n),l=a?a.split(","):[],c=Object.keys(o);for(const g of l)c.includes(g)||t.removeAttribute(g);for(const g of c){const s=o[g];s==null||s===!1?t.removeAttribute(g):s===!0?t.setAttribute(g,""):t.setAttribute(g,String(s))}c.length>0?t.setAttribute(n,c.join(",")):t.removeAttribute(n)},_n=()=>{const e={},o={};for(const t of mt){const{htmlAttributes:n,bodyAttributes:a}=t.props;n&&Object.assign(e,Lc(n)),a&&Object.assign(o,Lc(a))}Bc("html",e),Bc("body",o)},Pb=class extends h.Component{componentDidMount(){mt.push(this),_n()}componentDidUpdate(){_n()}componentWillUnmount(){const e=mt.indexOf(this);e!==-1&&mt.splice(e,1),_n()}resolveTitle(){const{title:e,titleTemplate:o,defaultTitle:t}=this.props;return e&&o?o.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||t||void 0}renderTitle(){const e=this.resolveTitle();if(e===void 0)return null;const o=this.props.titleAttributes||{};return h.createElement("title",To(o),e)}renderBase(){const{base:e}=this.props;return e?h.createElement("base",To(e)):null}renderMeta(){const{meta:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>h.createElement("meta",{key:t,...To(o)}))}renderLink(){const{link:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>h.createElement("link",{key:t,...To(o)}))}renderScript(){const{script:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,l=To(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("script",{key:t,...l})})}renderStyle(){const{style:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{cssText:n,...a}=o,l=To(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("style",{key:t,...l})})}renderNoscript(){const{noscript:e}=this.props;return!e||!Array.isArray(e)?null:e.map((o,t)=>{const{innerHTML:n,...a}=o,l=To(a);return n&&(l.dangerouslySetInnerHTML={__html:n}),h.createElement("noscript",{key:t,...l})})}render(){return h.createElement(h.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},Db=(Un=class extends h.Component{shouldComponentUpdate(e){return!hb(Ac(this.props,"helmetData"),Ac(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,t,n){return{...o,[e.type]:[...o[e.type]||[],{...t,...this.mapNestedChildrenToProps(e,n)}]}}mapObjectTypeChildren(e,o,t,n){switch(e.type){case"title":return{...o,[e.type]:n,titleAttributes:{...t}};case"body":return{...o,bodyAttributes:{...t}};case"html":return{...o,htmlAttributes:{...t}};default:return{...o,[e.type]:{...t}}}}mapArrayTypeChildrenToProps(e,o){let t={...o};return Object.keys(e).forEach(n=>{t={...t,[n]:e[n]}}),t}warnOnInvalidChildren(e,o){return zc(jc.some(t=>e.type===t),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 ${jc.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),zc(!o||typeof o=="string"||Array.isArray(o)&&!o.some(t=>typeof t!="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 t={};return h.Children.forEach(e,n=>{if(!n||!n.props)return;const{children:a,...l}=n.props,c=Object.keys(l).reduce((s,d)=>(s[Wc[d]||d]=l[d],s),{});let{type:g}=n;switch(typeof g=="symbol"?g=g.toString():this.warnOnInvalidChildren(n,a),g){case"Symbol(react.fragment)":o=this.mapChildrenToProps(a,o);break;case"link":case"meta":case"noscript":case"script":case"style":t=this.flattenArrayTypeChildren(n,t,c,a);break;default:o=this.mapObjectTypeChildren(n,o,c,a);break}}),this.mapArrayTypeChildrenToProps(t,o)}render(){const{children:e,...o}=this.props;let t={...o},{helmetData:n}=o;if(e&&(t=this.mapChildrenToProps(e,t)),n&&!(n instanceof $n)){const a=n;n=new $n(a.context,!0),delete t.helmetData}return Ln?h.createElement(Pb,{...t}):n?h.createElement($c,{...t,context:n.value}):h.createElement(Pc.Consumer,null,a=>h.createElement($c,{...t,context:a}))}},oo(Un,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),Un);const $b={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"}},Lb={highlightStyle:"background",fontWeight:700,letterSpacing:"-0.02em"},Bb=e=>$b[e.metadata.id]??Lb,_c=(e,o)=>{const t=e.theme;return{canvas:je(t.canvas),surface:je(t.surface),text:je(t.text),muted:je(t.muted),border:je(t.border),primary:je(t.primary),secondary:je(t.secondary),success:je(t.success),warning:je(t.warning),error:je(t.error),onPrimary:je(t.onPrimary),appearance:o}},_b=e=>_c(e,"light"),Ob=e=>_c(e,"dark"),ke=({palette:e,label:o,config:t,children:n})=>r.jsxs(i.Vertical,{gap:10,flex:"1 1 320px",minWidth:0,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:10,height:10,borderRadius:9999,backgroundColor:e.appearance==="dark"?"#111111":"#ffffff",borderWidth:1,borderStyle:"solid",borderColor:"rgba(0,0,0,0.15)"}),r.jsx(i.Text,{fontSize:11,fontWeight:"700",letterSpacing:"0.08em",textTransform:"uppercase",children:o})]}),r.jsx(vt,{config:t,mode:e.appearance,children:r.jsx(i.View,{padding:20,borderRadius:16,borderWidth:1,borderStyle:"solid",backgroundColor:"color-white",borderColor:"color-gray-200",color:"color-black",children:n})})]}),je=e=>!e||typeof e!="string"?e:/^(color|theme|light|dark)-/.test(e)?`var(--${e})`:e,Re=(e,o)=>`color-mix(in srgb, ${je(e)} ${o}%, transparent)`,Nb=e=>e&&e.startsWith("var(--")?e.slice(6,-1):e,qb={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"},Ub=e=>e.personality||qb,eo=(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},Tr=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}}},Gb=e=>e.typeCase==="uppercase"?"uppercase":"none",pt=(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":je(o.surface)};case"matte":return{backgroundColor:o.appearance==="dark"?"#181818":"#f4f4f4"};case"paper":default:return{backgroundColor:je(o.surface)}}},Qo=(e,o)=>{const t=je(o.primary),n=je(o.secondary||o.primary);switch(e.accentTreatment){case"gradient":return`linear-gradient(135deg, ${t} 0%, ${n} 100%)`;case"glow":return t;case"stripe":return`repeating-linear-gradient(45deg, ${t} 0 8px, ${n} 8px 16px)`;case"halftone":return`radial-gradient(circle at 30% 30%, ${t} 0%, ${n} 70%)`;case"flat":default:return t}},Zo=(e,o)=>{if(e.accentTreatment==="glow")return`0 0 24px ${Re(o.primary,40)}, 0 0 4px ${je(o.primary)}`},so=e=>({letterSpacing:e.letterSpacing,textTransform:Gb(e),fontStyle:e.typeStyle,fontWeight:eo(e,"heavy")}),Me=e=>({letterSpacing:e.typeCase==="uppercase"?"0.12em":"0.06em",textTransform:"uppercase",fontStyle:e.typeStyle,fontWeight:eo(e,"normal")}),Yb=(e,o)=>{var n,a,l;const t=(n=e.components)==null?void 0:n[o];return(l=(a=t==null?void 0:t.views)==null?void 0:a.container)==null?void 0:l.borderRadius},Kb=e=>{const o=e.tokens.rawCssVars||{},t=e.theme.border,n=e.theme.surface,a=e.theme.primary,l=o["shadow-ring"]||"rgba(0,0,0,0.08) 0px 0px 0px 1px",c=o["shadow-ring-light"]||`${t} 0px 0px 0px 1px`,g=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`,s=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:l},{name:"Level 1b",label:"Light Ring",description:"Lighter ring",shadow:c},{name:"Level 2",label:"Card",description:"Ring + subtle lift",shadow:g},{name:"Level 3",label:"Full Card",description:"Ring + lift + ambient + glow",shadow:s},{name:"Focus",label:"Accessibility ring",description:"Focus state — 2px ring",shadow:`0 0 0 2px ${a}`}]},Ir=(e,o)=>{const n={accordion:["accordion","card","alert"],tabs:["tabs","button"],panel:["card","alert"]}[o]??[o];for(const a of n){const l=Yb(e,a);if(l!==void 0)return l}return"12px"},On=({glyph:e,badge:o})=>r.jsxs(i.View,{position:"relative",display:"inline-flex",children:[r.jsx(i.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?r.jsx(i.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]}),Xb=[{title:"Homes",value:"homes",icon:r.jsx(On,{glyph:"🏠"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Tokens, inputs, and feedback components share the active config."})},{title:"Experiences",value:"experiences",icon:r.jsx(On,{glyph:"🎈",badge:"NEW"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Services",value:"services",icon:r.jsx(On,{glyph:"🛎️",badge:"NEW"}),content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Each tab carries an icon. Active tab uses the theme primary underline."})}],Jb=[{title:"Token",field:"token"},{title:"Value",field:"value"},{title:"Role",field:"role"}],Qb=[{id:"overview",label:"Overview",href:"#"},{id:"components",label:"Components",href:"#"},{id:"tokens",label:"Tokens",href:"#"}],Zb=({color:e,name:o,role:t,border:n})=>r.jsxs(i.View,{borderWidth:1,borderStyle:"solid",borderRadius:8,overflow:"hidden",minWidth:0,borderColor:n,children:[r.jsx(i.View,{height:76,backgroundColor:e}),r.jsxs(i.Vertical,{gap:4,padding:12,children:[r.jsx(i.Text,{fontSize:13,lineHeight:"18px",fontWeight:"700",children:o}),r.jsx(i.Text,{fontSize:12,lineHeight:"16px",opacity:.7,children:e}),r.jsx(i.Text,{fontSize:12,lineHeight:"16px",opacity:.72,children:t})]})]}),we=({title:e,children:o,config:t})=>r.jsxs(i.Vertical,{gap:18,padding:24,borderWidth:1,borderStyle:"solid",borderRadius:12,backgroundColor:t.theme.canvas,borderColor:t.theme.border,children:[r.jsx(i.Text,{fontSize:18,lineHeight:"24px",fontWeight:"700",color:t.theme.text,children:e}),o]}),Rb=({config:e})=>{const o=Bb(e),t=o.highlightStyle==="background"?e.theme.onPrimary:e.theme.primary;return r.jsx(i.View,{width:"100%",borderRadius:20,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,backgroundColor:e.theme.surface,children:r.jsxs(i.Horizontal,{width:"100%",flexWrap:"wrap",alignItems:"stretch",gap:0,children:[r.jsxs(i.Vertical,{flex:"1 1 360px",minWidth:0,padding:36,gap:20,justifyContent:"center",children:[r.jsx(Ee,{variant:"outline",content:`${e.metadata.label} hero`}),r.jsx(zi,{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:t,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}`),r.jsxs(i.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 —"," ",r.jsx(i.Text,{as:"span",color:e.theme.primary,fontWeight:"700",children:o.highlightStyle})," ","with weight"," ",r.jsx(i.Text,{as:"span",fontWeight:"700",children:o.fontWeight}),o.highlightFontStyle==="italic"||o.fontStyle==="italic"?", italic":"",o.textTransform==="uppercase"?", uppercase":"","."]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",children:[r.jsx(me,{color:"theme-primary",size:"md",children:"Get started"}),r.jsx(me,{variant:"outline",color:"theme-primary",size:"md",children:"View docs"})]})]}),r.jsxs(i.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:[r.jsx(i.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)"}}),r.jsxs(i.Vertical,{width:"100%",height:"100%",minHeight:260,padding:32,justifyContent:"flex-end",alignItems:"flex-start",gap:12,children:[r.jsx(i.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:13,letterSpacing:"0.08em",textTransform:"uppercase"},children:e.metadata.label}),r.jsx(i.Text,{fontWeight:"700",fontFamily:e.tokens.typography.fontFamily,style:{color:e.theme.onPrimary,fontSize:28,lineHeight:"32px",letterSpacing:"-0.02em"},children:e.theme.primary})]})]})]})})},ex=({config:e})=>{var t,n;const o=e.tokens.colors.slice(0,5).map(a=>({token:a.name,value:a.value,role:a.role}));return r.jsxs(i.Vertical,{gap:24,children:[r.jsx(we,{title:"Color",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(150px, 1fr))",gap:12,children:e.tokens.colors.slice(0,12).map(a=>r.jsx(Zb,{color:a.value,name:a.name,role:a.role,text:e.theme.text,border:e.theme.border},a.name))})}),r.jsx(we,{title:"Typography",config:e,children:r.jsxs(i.Vertical,{gap:24,children:[r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:48,lineHeight:"1.0",fontWeight:"700",letterSpacing:"0.96px",textTransform:"uppercase",children:"Making Life Multiplanetary"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Display — 48px / Bold / 1.00 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.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."}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Body — 16px / 400 / 1.70"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:13,lineHeight:"0.94",fontWeight:"700",letterSpacing:"1.17px",textTransform:"uppercase",children:"Falcon 9 · Starship · Dragon"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Nav Bold — 13px / 700 / 0.94 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:12,lineHeight:"1.0",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Mission Overview"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Caption — 12px / 400 / 1.00 / Uppercase"})]}),r.jsxs(i.Vertical,{gap:4,children:[r.jsx(i.Text,{fontFamily:e.tokens.typography.fontFamily,fontSize:10,lineHeight:"0.94",fontWeight:"400",letterSpacing:"1px",textTransform:"uppercase",children:"Launch Date: 2026-04-15"}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,children:"Micro — 10px / 400 / 0.94 / Uppercase"})]}),r.jsx(i.Horizontal,{gap:10,flexWrap:"wrap",marginTop:12,children:e.tokens.typography.fontSizes.map(a=>r.jsx(Ee,{variant:"outline",content:a},a))})]})}),r.jsx(we,{title:"Spacing, Radius, Shadow",config:e,children:r.jsxs(i.Vertical,{gap:18,children:[r.jsx(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"flex-end",children:e.tokens.spacing.slice(0,10).map(a=>r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:a,minWidth:4,height:24,borderRadius:2,backgroundColor:e.theme.primary}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(i.Horizontal,{gap:12,flexWrap:"wrap",children:e.tokens.radii.slice(0,6).map(a=>r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:64,height:64,borderRadius:a,borderWidth:1,borderStyle:"solid",backgroundColor:e.theme.surface,borderColor:e.theme.border}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:a})]},a))}),r.jsx(i.View,{width:"100%",maxWidth:"100%",overflowX:"auto",style:{WebkitOverflowScrolling:"touch",color:e.theme.text},children:r.jsx(ve,{views:(n=(t=e.components)==null?void 0:t.table)==null?void 0:n.views,children:r.jsx(ve.Template,{caption:"First extracted color tokens",columns:Jb,data:o})})})]})})]})},Oc=({palette:e})=>r.jsxs(ze,{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:[r.jsx(ze.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:24,fontWeight:"800",color:e.text,children:"$182"}),r.jsx(i.Text,{fontSize:14,color:e.muted,children:"night"})]}),r.jsx(Ee,{variant:"filled",content:"Best value"})]})}),r.jsx(ze.Content,{children:r.jsxs(i.Vertical,{gap:12,children:[r.jsxs(i.Horizontal,{gap:0,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,overflow:"hidden",children:[r.jsxs(i.Vertical,{flex:1,padding:10,gap:2,borderRightWidth:1,borderRightStyle:"solid",borderColor:e.border,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECK-IN"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"Mar 12, 2026"})]}),r.jsxs(i.Vertical,{flex:1,padding:10,gap:2,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"CHECKOUT"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"Mar 18, 2026"})]})]}),r.jsxs(i.Vertical,{padding:10,gap:2,borderRadius:10,borderWidth:1,borderStyle:"solid",borderColor:e.border,children:[r.jsx(i.Text,{fontSize:10,fontWeight:"700",letterSpacing:"0.06em",color:e.text,children:"GUESTS"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"2 adults"})]}),r.jsx(me,{isFilled:!0,size:"lg",children:"Reserve"}),r.jsx(at,{}),r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"$182 × 6 nights"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$1,092"})]}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"Cleaning fee"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$48"})]}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:14,color:e.text,children:"Service fee"}),r.jsx(i.Text,{fontSize:14,color:e.text,children:"$165"})]})]}),r.jsx(at,{}),r.jsxs(i.Horizontal,{justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"Total before taxes"}),r.jsx(i.Text,{fontSize:15,fontWeight:"700",color:e.text,children:"$1,305"})]})]})})]}),Nc=[{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"}],qc=({palette:e,tier:o,personality:t})=>{const n=Tr(t),a=pt(t,e),l=Qo(t,e),c=Zo(t,e);return r.jsx(i.View,{width:"min(100%, 280px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:o.featured?0:1,borderStyle:"solid",style:{...o.featured?{background:l,boxShadow:c}:a,borderColor:e.border,color:o.featured?e.onPrimary:e.text},children:r.jsxs(i.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:Me(t),children:o.name}),o.featured?r.jsx(i.View,{paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,backgroundColor:Re(e.onPrimary,22),children:r.jsxs(i.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1},children:t.signatureMotif}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Me(t),children:t.voice.includes("mission")?"PRIORITY":"POPULAR"})]})}):null]}),r.jsx(i.Text,{fontSize:13,lineHeight:"18px",color:o.featured?Re(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.tagline})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",gap:4,children:[r.jsx(i.Text,{fontSize:n.large+8,color:o.featured?e.onPrimary:e.text,style:so(t),children:o.price}),o.period?r.jsx(i.Text,{fontSize:14,color:o.featured?Re(e.onPrimary,85):e.muted,style:{fontStyle:t.typeStyle},children:o.period}):null]}),r.jsx(i.Vertical,{gap:8,children:o.features.map(g=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.View,{width:18,height:18,borderRadius:t.cornerStyle==="sharp"?2:9999,backgroundColor:o.featured?Re(e.onPrimary,22):e.primary,alignItems:"center",justifyContent:"center",style:{display:"flex",flexShrink:0},children:r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:eo(t,"heavy")},children:t.cornerStyle==="sharp"?"+":"✓"})}),r.jsx(i.Text,{fontSize:13,color:o.featured?e.onPrimary:e.text,style:{textTransform:t.typeCase==="uppercase"?"uppercase":"none",letterSpacing:t.typeCase==="uppercase"?"0.04em":"normal",fontStyle:t.typeStyle},children:g})]},g))}),r.jsx(i.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:t.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",backgroundColor:o.featured?e.onPrimary:e.text},children:r.jsx(i.Text,{fontSize:14,color:o.featured?e.primary:e.canvas,style:{...Me(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.02em"},children:o.ctaLabel})})]})})},Uc=({palette:e,personality:o})=>{const t=Tr(o),n=pt(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",l=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 r.jsx(i.View,{width:"min(100%, 320px)",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(i.View,{height:120,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Re(e.primary,20)} 0%, ${Re(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",children:[r.jsx(i.Text,{fontSize:15,color:e.text,style:so(o),children:a}),r.jsx(i.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:r.jsx(i.Text,{fontSize:10,color:e.text,style:Me(o),children:"IN STOCK"})})]}),r.jsx(i.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:l})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:24,color:e.text,style:so(o),children:"$42"}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$56"})]}),r.jsx(i.Text,{fontSize:12,color:e.success||e.muted,style:Me(o),children:"FREE SHIPPING"})]}),r.jsx(i.View,{alignSelf:"stretch",paddingHorizontal:20,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Qo(o,e),boxShadow:Zo(o,e)},children:r.jsx(i.Text,{fontSize:14,color:e.onPrimary,style:{...Me(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})})},Gc=({palette:e,personality:o})=>{const t=Tr(o),n=pt(o,e),a=o.signatureMotif,l=o.voice.includes("athletic")?"★":o.voice.includes("mission")||o.voice.includes("futurist")?"◉":"♥",c=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",g=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",s=o.voice.includes("mission")?"MISSION PICK":o.voice.includes("athletic")?"TEAM PICK":o.voice.includes("futurist")?"SIGNATURE":"BEST SELLER";return r.jsxs(i.View,{position:"relative",width:"min(100%, 320px)",children:[r.jsx(i.View,{position:"absolute",top:-10,left:16,paddingHorizontal:12,paddingVertical:6,borderRadius:o.badgeRadius,zIndex:2,style:{background:Qo(o,e),boxShadow:Zo(o,e)||(e.appearance==="dark"?"0 6px 14px rgba(0,0,0,0.5)":"0 6px 14px rgba(0,0,0,0.12)")},children:r.jsxs(i.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(i.Text,{fontSize:11,color:e.onPrimary,style:{lineHeight:1,fontWeight:eo(o,"heavy")},children:a}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Me(o),children:s})]})}),r.jsx(i.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:r.jsx(i.Text,{fontSize:16,color:l==="♥"&&e.error||e.primary,style:{lineHeight:1},children:l})}),r.jsx(i.View,{width:"100%",borderRadius:o.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...n,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:t.gap,padding:t.padding,children:[r.jsx(i.View,{height:140,borderRadius:o.cardRadius,style:{background:o.accentTreatment==="gradient"?`linear-gradient(135deg, ${Re(e.primary,20)} 0%, ${Re(e.secondary||e.primary,20)} 100%)`:e.appearance==="dark"?"rgba(255,255,255,0.06)":"rgba(0,0,0,0.04)"}}),r.jsxs(i.Vertical,{gap:6,children:[r.jsxs(i.Horizontal,{gap:6,alignItems:"center",children:[r.jsx(i.Text,{fontSize:13,color:e.warning||e.primary,style:{lineHeight:1},children:"★★★★★"}),r.jsx(i.Text,{fontSize:12,color:e.muted,children:"4.9 · 1,284 reviews"})]}),r.jsx(i.Text,{fontSize:18,color:e.text,style:so(o),children:c}),r.jsx(i.Text,{fontSize:12,color:e.muted,style:{fontStyle:o.typeStyle,textTransform:o.typeCase==="uppercase"?"uppercase":"none",letterSpacing:o.typeCase==="uppercase"?"0.04em":"normal"},children:g})]}),r.jsxs(i.Horizontal,{alignItems:"baseline",justifyContent:"space-between",children:[r.jsxs(i.Horizontal,{alignItems:"baseline",gap:6,children:[r.jsx(i.Text,{fontSize:26,color:e.text,style:so(o),children:"$189"}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{textDecoration:"line-through"},children:"$249"})]}),r.jsx(i.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:r.jsx(i.Text,{fontSize:10,color:e.text,style:Me(o),children:"–24%"})})]}),r.jsxs(i.Horizontal,{gap:8,children:[r.jsx(i.View,{flex:1,paddingHorizontal:16,paddingVertical:12,borderRadius:o.pillRadius,alignItems:"center",justifyContent:"center",style:{display:"flex",cursor:"pointer",background:Qo(o,e),boxShadow:Zo(o,e)},children:r.jsx(i.Text,{fontSize:13,color:e.onPrimary,style:{...Me(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Buy now"})}),r.jsx(i.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:r.jsx(i.Text,{fontSize:13,color:e.text,style:{...Me(o),letterSpacing:o.typeCase==="uppercase"?"0.08em":"0.02em"},children:"Add to cart"})})]})]})})]})},ox=[{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"}],Nn=(e,o)=>{const t=e.replace("#","").padEnd(6,"0").slice(0,6),n=parseInt(t.slice(0,2),16),a=parseInt(t.slice(2,4),16),l=parseInt(t.slice(4,6),16);return[n,a,l].some(Number.isNaN)?e:`rgba(${n}, ${a}, ${l}, ${o})`},qn=e=>typeof e=="string"&&/^#([0-9a-f]{3}){1,2}$/i.test(e),Le=(e,o,t)=>qn(e)?Nn(e,o):e.startsWith("rgba")||e.startsWith("rgb")?e.replace(/rgba?\(([^)]+)\)/,(n,a)=>`rgba(${a.split(",").slice(0,3).map(c=>c.trim()).join(", ")}, ${o})`):t==="dark"?`rgba(255,255,255,${o})`:`rgba(0,0,0,${o})`,rx=({block:e,palette:o,personality:t})=>{const n=Tr(t);let a,l;if(e.source==="ink")a=o.text,l=o.canvas;else{const u=o[e.source]||o.primary;e.intensity==="solid"?(a=u,l=o.onPrimary):(a=Le(u,.32,o.appearance),l=(o.appearance==="dark",o.text))}if(t.accentTreatment==="gradient"&&e.intensity==="tint"){const u=o[e.source],f=o.secondary;qn(u)&&qn(f)&&(a=`linear-gradient(135deg, ${Nn(u,.32)} 0%, ${Nn(f,.32)} 100%)`)}if(t.accentTreatment==="stripe"&&e.intensity==="tint"){const u=Le(o[e.source],.32,o.appearance),f=Le(o.secondary,.18,o.appearance);a=`repeating-linear-gradient(135deg, ${u} 0 18px, ${f} 18px 36px)`}const c=Le(l,.72,o.appearance),g=Le(l,.55,o.appearance),s=l,d=l===o.canvas?o.text:o.canvas;return r.jsx(i.View,{width:"min(100%, 460px)",borderRadius:t.cardRadius*2,padding:n.large,style:{background:a},children:r.jsxs(i.Vertical,{gap:n.gap+6,children:[r.jsxs(i.Text,{fontSize:11,color:g,style:{...Me(t),letterSpacing:"0.12em",fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:[t.signatureMotif," ",e.slug]}),r.jsxs(i.Vertical,{gap:14,children:[r.jsx(i.Text,{fontSize:32,lineHeight:"36px",color:l,style:so(t),children:e.heading}),r.jsx(i.Text,{fontSize:16,lineHeight:"22px",color:c,style:{fontStyle:t.typeStyle},children:e.body})]}),r.jsx(i.View,{alignSelf:"flex-start",paddingHorizontal:28,paddingVertical:14,borderRadius:t.pillRadius,style:{backgroundColor:s,cursor:"pointer"},children:r.jsx(i.Text,{fontSize:15,color:d,style:{...Me(t),letterSpacing:t.typeCase==="uppercase"?"0.08em":"0.01em",textTransform:t.typeCase==="uppercase"?"uppercase":"none"},children:e.cta})})]})})},Yc=[{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"}],Kc=({palette:e,article:o,personality:t})=>{const n=Tr(t),a=pt(t,e),l=e[o.badgeTone]||e.primary,c=e.secondary||e.primary,g=t.accentTreatment==="gradient"?`linear-gradient(135deg, ${Le(l,.55,e.appearance)} 0%, ${Le(c,.55,e.appearance)} 100%)`:t.accentTreatment==="stripe"?`repeating-linear-gradient(45deg, ${Le(l,.45,e.appearance)} 0 16px, ${Le(c,.25,e.appearance)} 16px 32px)`:t.accentTreatment==="halftone"?`radial-gradient(circle at 30% 30%, ${Le(l,.55,e.appearance)} 0%, ${Le(c,.35,e.appearance)} 70%)`:t.accentTreatment==="glow"?`radial-gradient(circle at 50% 60%, ${Le(l,.45,e.appearance)} 0%, ${e.appearance==="dark"?"#050505":"#0a0a0a"} 100%)`:Le(l,.32,e.appearance),s=t.voice.includes("mission")||t.voice.includes("futurist")?"◉":o.favorite,d=s==="♥"?e.error||e.primary:s==="★"&&e.warning||e.primary;return r.jsx(i.View,{width:"min(100%, 320px)",borderRadius:t.cardRadius,overflow:"hidden",borderWidth:1,borderStyle:"solid",style:{...a,borderColor:e.border,color:e.text},children:r.jsxs(i.Vertical,{gap:n.gap,padding:n.padding,children:[r.jsxs(i.View,{position:"relative",height:160,borderRadius:t.cardRadius,overflow:"hidden",style:{background:g},children:[r.jsx(i.View,{position:"absolute",top:12,left:12,paddingHorizontal:10,paddingVertical:4,borderRadius:t.badgeRadius,style:{background:Qo(t,{...e,primary:l}),boxShadow:Zo(t,e)},children:r.jsxs(i.Horizontal,{gap:4,alignItems:"center",children:[r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:{lineHeight:1,fontWeight:eo(t,"heavy")},children:t.signatureMotif}),r.jsx(i.Text,{fontSize:10,color:e.onPrimary,style:Me(t),children:o.badge})]})}),r.jsx(i.View,{position:"absolute",top:10,right:10,width:36,height:36,borderRadius:t.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:r.jsx(i.Text,{fontSize:16,color:d,style:{lineHeight:1},children:s})})]}),r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:11,color:e.muted,style:Me(t),children:o.category}),r.jsx(i.Text,{fontSize:18,lineHeight:"24px",color:e.text,style:so(t),children:o.title}),r.jsx(i.Text,{fontSize:13,lineHeight:"18px",color:e.muted,style:{fontStyle:t.typeStyle},children:o.excerpt})]}),r.jsxs(i.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(i.View,{width:28,height:28,borderRadius:t.cornerStyle==="sharp"?4:9999,style:{backgroundColor:e.appearance==="dark"?"rgba(255,255,255,0.12)":"rgba(0,0,0,0.08)"}}),r.jsxs(i.Vertical,{gap:0,children:[r.jsx(i.Text,{fontSize:12,color:e.text,style:{fontWeight:eo(t,"normal"),fontStyle:t.typeStyle},children:o.author}),r.jsx(i.Text,{fontSize:11,color:e.muted,children:o.meta})]})]})]})})},Xc=({palette:e,personality:o,config:t})=>{var f,m,p,y;const n=o.signatureMotif,a=e.primary,l=Qo(o,e),c=Zo(o,e),g=((m=(f=t.tokens)==null?void 0:f.typography)==null?void 0:m.fontFamily)||((y=(p=t.tokens)==null?void 0:p.rawCssVars)==null?void 0:y.display)||"inherit",s=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":`${t.metadata.label}`,d=o.typeCase==="uppercase"?"EXPLORE":"Get started",u=o.typeCase==="uppercase"?"LEARN MORE":"Learn more";return r.jsxs(i.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:g,position:"relative",overflow:"hidden"},children:[o.accentTreatment==="glow"&&r.jsx(i.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"&&r.jsx(i.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"}}),r.jsxs(i.Vertical,{gap:24,style:{position:"relative"},children:[r.jsxs(i.Horizontal,{gap:10,alignItems:"center",children:[r.jsx(i.View,{width:32,height:32,borderRadius:o.cornerStyle==="pill"?9999:o.cornerStyle==="sharp"?0:8,alignItems:"center",justifyContent:"center",style:{display:"flex",background:l,boxShadow:c},children:r.jsx(i.Text,{fontSize:16,color:e.onPrimary,style:{lineHeight:1,fontWeight:eo(o,"heavy")},children:n})}),r.jsx(i.Text,{fontSize:13,color:e.muted,style:{...Me(o),letterSpacing:o.typeCase==="uppercase"?"0.18em":"0.06em"},children:t.metadata.label})]}),r.jsx(i.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:{...so(o),letterSpacing:o.typeCase==="uppercase"?"0.06em":o.letterSpacing,maxWidth:580,fontFamily:g},children:s}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(i.View,{paddingHorizontal:o.density==="spacious"?32:24,paddingVertical:o.density==="spacious"?16:14,borderRadius:o.pillRadius,style:{display:"flex",cursor:"pointer",background:l,boxShadow:c},children:r.jsx(i.Text,{fontSize:15,color:e.onPrimary,style:{...Me(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:eo(o,"heavy"),fontFamily:g},children:d})}),r.jsx(i.View,{paddingHorizontal:24,paddingVertical:14,borderRadius:o.pillRadius,borderWidth:1,borderStyle:"solid",style:{display:"flex",cursor:"pointer",borderColor:e.text},children:r.jsx(i.Text,{fontSize:15,color:e.text,style:{...Me(o),letterSpacing:o.typeCase==="uppercase"?"0.14em":"0.02em",fontWeight:eo(o,"heavy"),fontFamily:g},children:u})})]}),r.jsx(i.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=>r.jsxs(i.Horizontal,{gap:8,alignItems:"center",children:[r.jsx(i.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}}),r.jsxs(i.Vertical,{gap:0,children:[r.jsx(i.Text,{fontSize:11,color:e.muted,style:Me(o),children:k.label}),r.jsx(i.Text,{fontSize:11,color:e.text,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, monospace"},children:Nb(k.value)})]})]},k.label))})]})]})},Jc=({palette:e,config:o})=>r.jsxs(i.Vertical,{gap:20,padding:36,alignItems:"center",borderRadius:16,style:{backgroundColor:e.surface},children:[r.jsx(Ee,{variant:"outline",content:"New release"}),r.jsxs(i.Vertical,{gap:8,alignItems:"center",children:[r.jsxs(i.Text,{fontSize:36,lineHeight:"40px",fontWeight:"800",textAlign:"center",color:e.text,children:[o.metadata.label," Pro"]}),r.jsx(i.Text,{fontSize:18,lineHeight:"24px",color:e.muted,textAlign:"center",children:"Pro. Beyond."})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",justifyContent:"center",children:[r.jsx(me,{shape:"pill",size:"md",children:"Learn more"}),r.jsx(me,{shape:"pill",size:"md",variant:"outline",children:"Buy"})]}),r.jsx(i.View,{width:220,height:140,borderRadius:20,backgroundColor:e.appearance==="dark"?e.canvas:e.text,opacity:.85})]}),Qc=({palette:e,config:o})=>r.jsxs(ze,{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:[r.jsx(ze.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(i.Text,{color:e.text,fontWeight:"700",children:o.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Ee,{variant:"filled",content:"New"})]})}),r.jsx(ze.Content,{children:r.jsx(i.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."})}),r.jsx(ze.Footer,{children:r.jsx(me,{size:"sm",children:o.metadata.id==="spacex"?"Explore":"Review"})})]}),Zc=({palette:e})=>r.jsxs(i.Vertical,{gap:14,children:[r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(me,{color:"theme-primary",children:"Primary"}),r.jsx(me,{color:"theme-secondary",children:"Secondary"}),r.jsx(me,{color:"color-black",children:"Black"}),r.jsx(me,{color:"color-white",textColor:"color-black",children:"White"})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(me,{variant:"outline",color:"theme-primary",children:"Primary"}),r.jsx(me,{variant:"outline",color:"theme-secondary",children:"Secondary"}),r.jsx(me,{variant:"outline",color:"color-black",children:"Black"}),r.jsx(me,{variant:"outline",color:"color-white",children:"White"})]}),r.jsxs(i.Horizontal,{gap:12,flexWrap:"wrap",alignItems:"center",children:[r.jsx(me,{variant:"ghost",views:{container:{color:e.text}},children:"Ghost"}),r.jsx(me,{variant:"link",views:{container:{color:e.primary}},children:"Link"}),r.jsx(me,{isDisabled:!0,children:"Disabled"}),r.jsx(me,{isLoading:!0,children:"Loading"})]})]}),Rc=({palette:e,config:o})=>r.jsx(i.View,{style:{color:e.text},children:r.jsxs(i.Vertical,{gap:14,children:[r.jsxs(i.Horizontal,{gap:10,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Ee,{content:"Badge"}),r.jsx(Ee,{variant:"outline",content:"Outline"}),r.jsx(Ee,{content:"Primary",views:{container:{backgroundColor:e.primary,color:e.onPrimary,borderColor:e.primary}}}),r.jsx(Ee,{content:"Success",views:{container:{backgroundColor:e.success,color:e.onPrimary,borderColor:e.success}}}),r.jsx(Ee,{content:"Warning",views:{container:{backgroundColor:e.warning,color:e.onPrimary,borderColor:e.warning}}}),r.jsx(Ee,{content:"Error",views:{container:{backgroundColor:e.error,color:e.onPrimary,borderColor:e.error}}})]}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(lt,{status:"success",label:"Operational"}),r.jsx(lt,{status:"warning",label:"Degraded"}),r.jsx(lt,{status:"error",label:"Outage"}),r.jsx(to,{size:"sm",loaderColor:o.theme.primary})]}),r.jsx(Ht,{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}}}),r.jsx(nc,{value:64,height:10,showLabel:!0,color:e.primary,backgroundColor:e.border,views:{container:{backgroundColor:e.border},bar:{backgroundColor:e.primary}}})]})}),es=({palette:e,config:o,mode:t})=>{const n={container:{backgroundColor:e.surface,borderColor:e.border,color:e.text},field:{color:e.text}};return r.jsx(i.View,{style:{color:e.text},children:r.jsxs(i.Vertical,{gap:16,children:[r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(Pe,{size:"md",label:"Name",placeholder:"Ada Lovelace",views:n}),r.jsx(sr,{id:`forms-${o.metadata.id}-${t}`,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}}}),r.jsx(Do,{label:"Notes",placeholder:"Add implementation notes",views:n})]}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(Xt,{label:"Email updates",defaultIsSelected:!0}),r.jsx(Zt,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(Yt,{label:"Enabled",isChecked:!0})]})]})})},tx=({config:e})=>{const[o,t]=h.useState(1),n=_b(e),a=Ob(e),l=Ub(e);return r.jsxs(i.Vertical,{gap:24,children:[r.jsx(we,{title:"Brand Snapshot (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(ke,{config:e,palette:n,label:"On light surface",children:r.jsx(Xc,{palette:n,personality:l,config:e})}),r.jsx(ke,{config:e,palette:a,label:"On dark surface",children:r.jsx(Xc,{palette:a,personality:l,config:e})})]})}),r.jsx(we,{title:"Buttons — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ke,{config:e,palette:n,label:"On light surface",children:r.jsx(Zc,{palette:n})}),r.jsx(ke,{config:e,palette:a,label:"On dark surface",children:r.jsx(Zc,{palette:a})})]})}),r.jsx(we,{title:"Status & Feedback — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ke,{config:e,palette:n,label:"On light surface",children:r.jsx(Rc,{palette:n,config:e})}),r.jsx(ke,{config:e,palette:a,label:"On dark surface",children:r.jsx(Rc,{palette:a,config:e})})]})}),r.jsx(we,{title:"Forms — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ke,{config:e,palette:n,label:"On light surface",children:r.jsx(es,{palette:n,config:e,mode:"light"})}),r.jsx(ke,{config:e,palette:a,label:"On dark surface",children:r.jsx(es,{palette:a,config:e,mode:"dark"})})]})}),r.jsx(we,{title:"Forms (legacy preview)",config:e,children:r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",alignItems:"start",gap:16,children:[r.jsx(Pe,{size:"md",label:"Name",placeholder:"Ada Lovelace"}),r.jsx(sr,{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"}}}),r.jsx(Do,{label:"Notes",placeholder:"Add implementation notes"}),r.jsxs(i.Vertical,{gap:12,children:[r.jsx(Xt,{label:"Email updates",defaultIsSelected:!0}),r.jsx(Zt,{label:"Standard",value:"standard",defaultIsSelected:!0}),r.jsx(Yt,{label:"Enabled",isChecked:!0}),r.jsx(li,{defaultValue:58,showValue:!0}),r.jsx(zl,{length:6,label:"Verification Code"})]})]})}),r.jsx(we,{title:"Form States",config:e,children:r.jsxs(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(220px, 1fr))",gap:16,alignItems:"start",children:[r.jsx(Pe,{size:"md",label:"Default",placeholder:"Type here",helperText:"Resting state"}),r.jsx(Pe,{size:"md",label:"Filled",defaultValue:"Ada Lovelace",helperText:"Has value"}),r.jsx(Pe,{size:"md",label:"With helper",placeholder:"user@example.com",helperText:"We'll never share your email"}),r.jsx(Pe,{size:"md",label:"Error",defaultValue:"invalid@",error:"Please enter a valid email"}),r.jsx(Pe,{size:"md",label:"Disabled",isDisabled:!0,defaultValue:"Cannot edit",helperText:"Field locked"}),r.jsx(Pe,{size:"md",label:"Read only",defaultValue:"Read-only value",isReadOnly:!0,helperText:"View only"}),r.jsx(sr,{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"}}}),r.jsx(sr,{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"}}})]})}),r.jsx(we,{title:"Elevation & Depth",config:e,children:r.jsx(i.View,{display:"grid",gridTemplateColumns:"repeat(auto-fit, minmax(200px, 1fr))",gap:20,children:Kb(e).map(c=>r.jsxs(i.Vertical,{gap:12,children:[r.jsx(i.View,{height:120,borderRadius:12,backgroundColor:e.theme.canvas,style:{boxShadow:c.shadow}}),r.jsxs(i.Vertical,{gap:4,children:[r.jsxs(i.Horizontal,{gap:8,alignItems:"baseline",flexWrap:"wrap",children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",children:c.name}),r.jsx(i.Text,{fontSize:11,fontWeight:"600",color:e.theme.primary,children:c.label})]}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:c.description}),r.jsx(i.Text,{fontSize:10,color:e.theme.muted,style:{wordBreak:"break-word",opacity:.8},children:c.shadow})]})]},c.name))})}),r.jsx(we,{title:"Color Blocks",config:e,children:r.jsx(i.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(([c,g,s])=>{const d=e.theme[c];return r.jsxs(i.Vertical,{gap:0,borderRadius:12,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border,children:[r.jsx(i.View,{height:88,backgroundColor:d}),r.jsxs(i.Vertical,{gap:4,padding:12,backgroundColor:e.theme.surface,children:[r.jsx(i.Text,{fontSize:13,fontWeight:"700",children:g}),r.jsxs(i.Text,{fontSize:11,color:e.theme.muted,children:["theme.",c]}),r.jsx(i.Text,{fontSize:11,color:e.theme.muted,children:d})]})]},c)})})}),r.jsx(we,{title:"Pricing — Booking (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ke,{config:e,palette:n,label:"On light surface",children:r.jsx(Oc,{palette:n})}),r.jsx(ke,{config:e,palette:a,label:"On dark surface",children:r.jsx(Oc,{palette:a})})]})}),r.jsx(we,{title:"Pricing — SaaS Tiers (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(ke,{config:e,palette:n,label:"On light surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Nc.map(c=>r.jsx(qc,{palette:n,tier:c,personality:l},c.name))})}),r.jsx(ke,{config:e,palette:a,label:"On dark surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Nc.map(c=>r.jsx(qc,{palette:a,tier:c,personality:l},c.name))})})]})}),r.jsx(we,{title:"Pricing — Product (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ke,{config:e,palette:n,label:"On light surface",children:r.jsx(Uc,{palette:n,personality:l})}),r.jsx(ke,{config:e,palette:a,label:"On dark surface",children:r.jsx(Uc,{palette:a,personality:l})})]})}),r.jsx(we,{title:"Pricing — Featured w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ke,{config:e,palette:n,label:"On light surface",children:r.jsx(Gc,{palette:n,personality:l})}),r.jsx(ke,{config:e,palette:a,label:"On dark surface",children:r.jsx(Gc,{palette:a,personality:l})})]})}),r.jsx(we,{title:"Content — Color Block Cards",config:e,children:r.jsx(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:ox.map(c=>r.jsx(rx,{block:c,palette:n,personality:l},c.slug))})}),r.jsx(we,{title:"Content — Article Cards w/ Badge & Favorite (Light & Dark)",config:e,children:r.jsxs(i.Vertical,{gap:20,children:[r.jsx(ke,{config:e,palette:n,label:"On light surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Yc.map(c=>r.jsx(Kc,{palette:n,article:c,personality:l},c.id))})}),r.jsx(ke,{config:e,palette:a,label:"On dark surface",children:r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:Yc.map(c=>r.jsx(Kc,{palette:a,article:c,personality:l},c.id))})})]})}),r.jsx(we,{title:"CTA Card — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ke,{config:e,palette:n,label:"On light surface",children:r.jsx(Jc,{palette:n,config:e})}),r.jsx(ke,{config:e,palette:a,label:"On dark surface",children:r.jsx(Jc,{palette:a,config:e})})]})}),r.jsx(we,{title:"Product Card — Light & Dark",config:e,children:r.jsxs(i.Horizontal,{gap:20,flexWrap:"wrap",alignItems:"flex-start",children:[r.jsx(ke,{config:e,palette:n,label:"On light surface",children:r.jsx(Qc,{palette:n,config:e})}),r.jsx(ke,{config:e,palette:a,label:"On dark surface",children:r.jsx(Qc,{palette:a,config:e})})]})}),r.jsx(we,{title:"Content & Layout",config:e,children:r.jsxs(i.Vertical,{gap:24,children:[r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"stretch",children:[r.jsxs(ze,{width:"min(100%, 320px)",children:[r.jsx(ze.Header,{children:r.jsxs(i.Horizontal,{alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",children:[r.jsx(i.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Falcon 9":"Product Card"}),r.jsx(Ee,{variant:"filled",content:"New"})]})}),r.jsx(ze.Content,{children:r.jsx(i.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."})}),r.jsx(ze.Footer,{children:r.jsx(me,{size:"sm",children:e.metadata.id==="spacex"?"Explore":"Review"})})]}),r.jsxs(ze,{width:"min(100%, 320px)",children:[r.jsx(ze.Header,{children:r.jsxs(i.Horizontal,{gap:12,alignItems:"center",justifyContent:"space-between",flexWrap:"wrap",children:[r.jsxs(i.Horizontal,{gap:12,alignItems:"center",children:[r.jsx(ba,{fallback:e.metadata.label.slice(0,2)}),r.jsxs(i.Vertical,{gap:2,children:[r.jsx(i.Text,{fontWeight:"700",children:e.metadata.id==="spacex"?"Starship":e.metadata.label}),r.jsx(i.Text,{fontSize:12,color:e.theme.muted,children:e.metadata.id==="spacex"?"Multiplanetary mission":"Config-driven preview"})]})]}),r.jsx(Ee,{variant:"outline",content:"Active"})]})}),r.jsx(ze.Content,{children:e.metadata.id==="spacex"?r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"The most powerful launch vehicle ever developed. Designed to carry crew and cargo to Mars and beyond."}):r.jsx(Ht,{variant:"info",title:"Config active",description:"This alert is rendered by the shared component."})})]})]}),r.jsx(Rb,{config:e}),r.jsx(fa,{ratio:16/9,borderRadius:12,overflow:"hidden",children:r.jsx(i.View,{width:"100%",height:"100%",backgroundColor:e.theme.primary,children:r.jsxs(i.Vertical,{height:"100%",alignItems:"center",justifyContent:"center",gap:8,children:[r.jsx(i.Text,{fontWeight:"700",color:e.theme.onPrimary,children:"16:9 Aspect Ratio"}),r.jsx(Ee,{content:"Config primary color"})]})})}),r.jsxs(Ne,{children:[r.jsx(Ne.Content,{children:[1,2,3].map(c=>r.jsx(Ne.Item,{children:r.jsx(i.View,{height:200,borderRadius:12,alignItems:"center",justifyContent:"center",backgroundColor:e.theme.surface,borderColor:e.theme.border,borderWidth:1,borderStyle:"solid",children:r.jsxs(i.Text,{fontSize:24,fontWeight:"700",children:["Slide ",c]})})},c))}),r.jsxs(i.Horizontal,{gap:12,marginTop:12,justifyContent:"center",children:[r.jsx(Ne.Previous,{}),r.jsx(Ne.Next,{})]})]})]})}),r.jsx(we,{title:"Navigation & Interactive",config:e,children:r.jsxs(i.Vertical,{gap:18,children:[r.jsxs(i.Vertical,{gap:20,children:[r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"With icons"}),r.jsx(No,{tabs:Xb,defaultValue:"homes",views:{tab:{borderRadius:Ir(e,"tabs")},activeTab:{borderRadius:Ir(e,"tabs")}}})]}),r.jsxs(i.Vertical,{gap:8,children:[r.jsx(i.Text,{fontSize:12,fontWeight:"700",color:e.theme.muted,children:"Without icons"}),r.jsx(No,{defaultValue:"overview",views:{tab:{borderRadius:Ir(e,"tabs")},activeTab:{borderRadius:Ir(e,"tabs")}},tabs:[{title:"Overview",value:"overview",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Tokens and components share the active config."})},{title:"Usage",value:"usage",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Explicit props still override the config defaults."})},{title:"Audit",value:"audit",content:r.jsx(i.Text,{fontSize:14,lineHeight:"20px",children:"Plain text tabs without icons."})}]})]})]}),r.jsx(ko,{items:Qb,orientation:"horizontal",defaultActiveItemId:"components"}),(()=>{const c=Ir(e,"accordion"),g={borderWidth:0,borderTopWidth:0,borderBottomWidth:0,borderLeftWidth:0,borderRightWidth:0,marginBottom:0,borderRadius:0},s={...g,borderTopWidth:1,borderTopStyle:"solid",borderTopColor:e.theme.border};return r.jsxs(Oe,{defaultValue:"tokens",collapsible:!0,shape:"rounded",views:{container:{borderRadius:c,overflow:"hidden",borderWidth:1,borderStyle:"solid",borderColor:e.theme.border}},children:[r.jsxs(Oe.Item,{value:"tokens",...g,views:{item:g,trigger:{borderRadius:0}},children:[r.jsx(Oe.Trigger,{children:"Token extraction"}),r.jsx(Oe.Content,{children:r.jsxs(i.Text,{color:e.theme.muted,children:[Object.keys(e.tokens.rawCssVars).length," raw CSS variables were extracted from ",e.metadata.sourcePath,"."]})})]}),r.jsxs(Oe.Item,{value:"overrides",...s,views:{item:s,trigger:{borderRadius:0}},children:[r.jsx(Oe.Trigger,{children:"Override behavior"}),r.jsx(Oe.Content,{children:r.jsx(i.Text,{color:e.theme.muted,children:"Props passed directly to components override the design-system defaults."})})]})]})})(),r.jsx(at,{label:"advanced tools"}),r.jsxs(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:[r.jsx(nn,{color:e.theme.primary,children:"Toggle Button"}),r.jsx(Mi,{color:e.theme.primary,items:[{id:"left",value:"Left"},{id:"center",value:"Center"},{id:"right",value:"Right"}]}),r.jsx(dt,{content:"Tooltip message",children:r.jsx(me,{variant:"outline",children:"Hover for Tooltip"})}),r.jsxs(He,{children:[r.jsx(He.Trigger,{children:r.jsx(me,{variant:"ghost",children:"Hover Card"})}),r.jsx(He.Content,{children:r.jsxs(i.Vertical,{gap:4,padding:12,children:[r.jsx(i.Text,{fontWeight:"700",children:"Detailed Info"}),r.jsx(i.Text,{fontSize:12,opacity:.8,children:"Hover cards provide more context."})]})})]}),r.jsx(Pi,{value:e.theme.primary}),r.jsx(ic,{shareData:{url:"https://example.com",title:"Example"}}),r.jsx(Hr,{to:"#",children:"Inline Link component"})]}),r.jsx(i.Horizontal,{gap:16,flexWrap:"wrap",alignItems:"center",children:r.jsx(tc,{currentPage:o,totalPages:10,onPageChange:t})})]})})]})},nx=({config:e})=>{var o;return r.jsxs(vt,{config:e,children:[r.jsx(Db,{children:(o=e.metadata.googleFontLinks)==null?void 0:o.map(t=>r.jsx("link",{rel:"stylesheet",href:t},t))}),r.jsx(i.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:r.jsxs(i.Vertical,{gap:28,children:[r.jsxs(i.Vertical,{gap:12,maxWidth:900,children:[r.jsxs(i.Text,{as:"h1",fontSize:44,lineHeight:"48px",fontWeight:"800",fontFamily:e.tokens.typography.fontFamily,children:[e.metadata.label," Design System"]}),r.jsxs(i.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."]})]}),r.jsxs(i.Vertical,{gap:28,children:[r.jsx(ex,{config:e}),r.jsx(tx,{config:e})]})]})})]})};z.Accordion=Oe,z.ActionSheet=Pd,z.Alert=Ht,z.ArrowIcon=Fd,z.AspectRatio=fa,z.AttachmentGroup=Wi,z.AttachmentIcon=tr,z.AttachmentPreview=Mu,z.AudioIcon=Wo,z.AudioInput=Qd,z.AudioWaveform=Vt,z.Avatar=ba,z.BackIcon=Qs,z.Background=Ic,z.Badge=Ee,z.BatteryIcon=Vs,z.BlockEditor=vp,z.BluetoothIcon=Sd,z.BoldArrowIcon=Id,z.BookmarkIcon=Ps,z.Button=me,z.CHART_COLORS=qe,z.CalendarIcon=fd,z.CameraIcon=wd,z.Card=ze,z.Carousel=Ne,z.Chart=R0,z.ChartIcon=Ks,z.ChatInput=Cc,z.ChatWidget=Fc,z.ChatWidgetComponent=jn,z.ChatWidgetWidget=lb,z.CheckIcon=Js,z.Checkbox=Xt,z.ChevronIcon=ye,z.ClockIcon=ud,z.CloseEyeIcon=jt,z.CloseIcon=$e,z.CloudIcon=Ds,z.ColorInput=oh,z.ColorPicker=Pi,z.ComboBox=Tf,z.Command=wo,z.ContextMenu=Vo,z.CookieConsent=tg,z.CopyIcon=$s,z.CountryPicker=ih,z.CreditCardIcon=sd,z.CropIcon=jd,z.DEFAULT_CHART_COLORS=Ea,z.DatePicker=yf,z.DefaultEmojiData=oi,z.DeleteIcon=Ls,z.DesignSystem=nx,z.DesignSystemProvider=vt,z.Divider=Gp,z.DocumentIcon=Ys,z.DownloadIcon=Os,z.DragAndDrop=Im,z.DragAndDropComponent=ji,z.DragHandleIcon=ra,z.DragHandleLinesIcon=Ed,z.Drawer=xo,z.DropZone=jm,z.DropdownMenu=qo,z.DustBinIcon=zr,z.EditIcon=Bs,z.EmojiPicker=Di,z.ErrorIcon=Wr,z.ExternalLinkIcon=ia,z.FacebookIcon=zs,z.FileIcon=ho,z.FileImage=dg,z.FileSVG=sg,z.FilterIcon=hd,z.FolderIcon=ks,z.FormikChatInput=Kf,z.FormikCheckbox=Vf,z.FormikColorInput=Xf,z.FormikComboBox=nu,z.FormikCountryPicker=Qf,z.FormikDatePicker=Jf,z.FormikEmojiPicker=zu,z.FormikForm=Af,z.FormikIconPicker=Cu,z.FormikOTPInput=gu,z.FormikPassword=tu,z.FormikRadio=Pf,z.FormikSelect=Zf,z.FormikSelector=fu,z.FormikSlider=su,z.FormikSwitch=Rf,z.FormikTagInput=eu,z.FormikTextArea=ou,z.FormikTextField=ru,z.FormikToggle=pu,z.FormikToggleGroup=yu,z.FormikUploader=Ul,z.GiftIcon=rd,z.Gradient=Ki,z.HeartIcon=Es,z.HelpIcon=xs,z.HomeIcon=_s,z.HoverCard=He,z.Icon=rr,z.IconPicker=Fp,z.ImageIcon=ws,z.InfoIcon=ro,z.InstagramIcon=Is,z.KeyboardAvoidingView=di,z.LayoutIcon=id,z.LikeIcon=Cd,z.Link=Hr,z.LinkIcon=ld,z.LinkedinIcon=Ms,z.Loader=to,z.LoadingSpinnerIcon=Mt,z.LockIcon=qs,z.LogoutIcon=nd,z.MagicWandIcon=xd,z.MapPinIcon=md,z.Markdown=Ip,z.MediaPreview=ju,z.MenuIcon=pd,z.Menubar=So,z.MessageLayout=qd,z.MessageView=pa,z.MicrophoneIcon=Ft,z.MinusIcon=ta,z.Modal=bo,z.ModalLayout=cn,z.ModalRouter=cn,z.MoonIcon=Xs,z.MoreIcon=dd,z.MousePointerIcon=sa,z.NavigationMenu=ko,z.NotificationIcon=Gs,z.OTPInput=zl,z.OpenEyeIcon=Wt,z.PageLayout=Yu,z.Pagination=tc,z.PanelIcon=ca,z.Password=bf,z.PauseIcon=Ws,z.PlayIcon=na,z.PlusIcon=Ns,z.PowerOffIcon=ad,z.PrintIcon=bd,z.ProfileIcon=Us,z.ProgressBar=nc,z.QuickReactionEmojis=ei,z.Radio=Zt,z.RadioGroup=qg,z.RefreshIcon=yd,z.Resizable=In,z.RotateIcon=od,z.Router=om,z.SaveIcon=Hs,z.SearchIcon=jr,z.Select=sr,z.Selector=Ag,z.SendIcon=zt,z.Separator=at,z.SettingsIcon=aa,z.ShapeIcon=ed,z.ShareButton=ic,z.ShareIcon=la,z.ShieldIcon=td,z.Sidebar=Cr,z.Slider=li,z.SliderIcon=Md,z.SpinnerIcon=zd,z.SplashScreen=Ju,z.StarIcon=As,z.StatusIndicator=lt,z.StopIcon=Mr,z.SuccessIcon=Et,z.Switch=Yt,z.Table=ve,z.Tabs=No,z.TagInput=Ff,z.TextArea=Do,z.TextField=Pe,z.TextIcon=Rs,z.ThreadsIcon=js,z.TickIcon=nr,z.Title=zi,z.Toast=Sy,z.Toggle=nn,z.ToggleGroup=Mi,z.Tooltip=dt,z.TrashIcon=gd,z.TwitchIcon=Ts,z.TwitterIcon=Ss,z.UnLikeIcon=kd,z.UnlockIcon=vd,z.UploadIcon=At,z.Uploader=Ar,z.UserIcon=bs,z.VideoIcon=Cs,z.WarningIcon=It,z.WifiIcon=Td,z.XIcon=vs,z.YoutubeIcon=Fs,z.ZapIcon=cd,z.ZoomInIcon=Wd,z.ZoomOutIcon=Zs,z.deepMerge=Ge,z.defaultBlockEditorLabels=$i,z.defaultDesignSystemConfig=Kn,z.defaultEmojiPickerLabels=Rl,z.designSystemConfigList=is,z.designSystemConfigs=Ct,z.getDesignSystemComponentProps=St,z.goBack=Zu,z.hideDrawer=si,z.hideMessage=ma,z.hideModal=an,z.matchPath=gi,z.mergeDesignSystemComponentProps=Qn,z.navigate=Qu,z.normalizeDesignSystemComponentProps=wt,z.setSplashLoaded=Ku,z.setSplashStarted=Xu,z.showDrawer=Uu,z.showMessage=ua,z.showModal=Wu,z.showToast=vo,z.useDesignSystem=Fr,z.useDesignSystemComponentProps=jo,z.useDrawerStore=io,z.useHistory=gn,z.useMergedDesignSystemComponentProps=Ce,z.useMessageStore=Er,z.useModalStore=lo,z.useRouterStore=Xe,z.useSplashStore=Qr,z.useToast=vy,Object.defineProperty(z,Symbol.toStringTag,{value:"Module"})});
|
|
36
68
|
//# sourceMappingURL=web.umd.js.map
|