@lumx/vue 4.17.1-alpha.2 → 4.17.1-alpha.3
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/README.md +31 -0
- package/_internal/_virtual/_rolldown/runtime.js +34 -0
- package/_internal/components/alert-dialog/AlertDialog.d.ts +45 -0
- package/_internal/components/alert-dialog/AlertDialog.js +79 -0
- package/_internal/components/alert-dialog/index.d.ts +1 -0
- package/_internal/components/avatar/Avatar.d.ts +30 -0
- package/_internal/components/avatar/Avatar.js +50 -0
- package/_internal/components/avatar/index.d.ts +2 -0
- package/_internal/components/badge/Badge.d.ts +16 -0
- package/_internal/components/badge/Badge.js +25 -0
- package/_internal/components/badge/BadgeWrapper.d.ts +10 -0
- package/_internal/components/badge/BadgeWrapper.js +22 -0
- package/_internal/components/badge/index.d.ts +2 -0
- package/_internal/components/button/Button.d.ts +18 -0
- package/_internal/components/button/Button.js +66 -0
- package/_internal/components/button/ButtonGroup.d.ts +16 -0
- package/_internal/components/button/ButtonGroup.js +25 -0
- package/_internal/components/button/IconButton.d.ts +33 -0
- package/_internal/components/button/IconButton.js +53 -0
- package/_internal/components/button/index.d.ts +4 -0
- package/_internal/components/checkbox/Checkbox.d.ts +20 -0
- package/_internal/components/checkbox/Checkbox.js +55 -0
- package/_internal/components/checkbox/index.d.ts +1 -0
- package/_internal/components/chip/Chip.d.ts +26 -0
- package/_internal/components/chip/Chip.js +74 -0
- package/_internal/components/chip/ChipGroup.d.ts +10 -0
- package/_internal/components/chip/ChipGroup.js +19 -0
- package/_internal/components/chip/SelectionChipGroup.d.ts +48 -0
- package/_internal/components/chip/SelectionChipGroup.js +91 -0
- package/_internal/components/chip/index.d.ts +3 -0
- package/_internal/components/combobox/ComboboxButton.d.ts +15 -0
- package/_internal/components/combobox/ComboboxButton.js +63 -0
- package/_internal/components/combobox/ComboboxInput.d.ts +20 -0
- package/_internal/components/combobox/ComboboxInput.js +97 -0
- package/_internal/components/combobox/ComboboxList.d.ts +7 -0
- package/_internal/components/combobox/ComboboxList.js +54 -0
- package/_internal/components/combobox/ComboboxOption.d.ts +11 -0
- package/_internal/components/combobox/ComboboxOption.js +79 -0
- package/_internal/components/combobox/ComboboxOptionAction.d.ts +9 -0
- package/_internal/components/combobox/ComboboxOptionAction.js +40 -0
- package/_internal/components/combobox/ComboboxOptionMoreInfo.d.ts +9 -0
- package/_internal/components/combobox/ComboboxOptionMoreInfo.js +78 -0
- package/_internal/components/combobox/ComboboxOptionSkeleton.d.ts +7 -0
- package/_internal/components/combobox/ComboboxOptionSkeleton.js +37 -0
- package/_internal/components/combobox/ComboboxPopover.d.ts +13 -0
- package/_internal/components/combobox/ComboboxPopover.js +46 -0
- package/_internal/components/combobox/ComboboxProvider.d.ts +7 -0
- package/_internal/components/combobox/ComboboxProvider.js +46 -0
- package/_internal/components/combobox/ComboboxSection.d.ts +7 -0
- package/_internal/components/combobox/ComboboxSection.js +51 -0
- package/_internal/components/combobox/ComboboxState.d.ts +7 -0
- package/_internal/components/combobox/ComboboxState.js +61 -0
- package/_internal/components/combobox/context/ComboboxContext.js +21 -0
- package/_internal/components/combobox/context/ComboboxListContext.js +19 -0
- package/_internal/components/combobox/context/ComboboxOptionContext.js +22 -0
- package/_internal/components/combobox/context/useComboboxEvent.js +20 -0
- package/_internal/components/combobox/context/useComboboxOpen.js +17 -0
- package/_internal/components/combobox/index.d.ts +115 -0
- package/_internal/components/combobox/index.js +44 -0
- package/_internal/components/combobox/useWrappedRenderOptionSlot.js +46 -0
- package/_internal/components/combobox/useWrappedRenderSectionTitleSlot.js +18 -0
- package/_internal/components/dialog/Dialog.d.ts +42 -0
- package/_internal/components/dialog/Dialog.js +109 -0
- package/_internal/components/dialog/index.d.ts +2 -0
- package/_internal/components/divider/Divider.d.ts +16 -0
- package/_internal/components/divider/Divider.js +29 -0
- package/_internal/components/divider/index.d.ts +1 -0
- package/_internal/components/drag-handle/DragHandle.d.ts +16 -0
- package/_internal/components/drag-handle/DragHandle.js +29 -0
- package/_internal/components/drag-handle/index.d.ts +1 -0
- package/_internal/components/expansion-panel/ExpansionPanel.d.ts +34 -0
- package/_internal/components/expansion-panel/ExpansionPanel.js +86 -0
- package/_internal/components/expansion-panel/index.d.ts +1 -0
- package/_internal/components/flag/Flag.d.ts +16 -0
- package/_internal/components/flag/Flag.js +30 -0
- package/_internal/components/flag/index.d.ts +2 -0
- package/_internal/components/flex-box/FlexBox.d.ts +24 -0
- package/_internal/components/flex-box/FlexBox.js +30 -0
- package/_internal/components/flex-box/index.d.ts +2 -0
- package/_internal/components/generic-block/GenericBlock.d.ts +59 -0
- package/_internal/components/generic-block/GenericBlock.js +55 -0
- package/_internal/components/generic-block/index.d.ts +2 -0
- package/_internal/components/grid-column/GridColumn.d.ts +9 -0
- package/_internal/components/grid-column/GridColumn.js +19 -0
- package/_internal/components/grid-column/index.d.ts +2 -0
- package/_internal/components/heading/Heading.d.ts +16 -0
- package/_internal/components/heading/Heading.js +36 -0
- package/_internal/components/heading/HeadingLevelProvider.d.ts +14 -0
- package/_internal/components/heading/HeadingLevelProvider.js +29 -0
- package/_internal/components/heading/context.js +4 -0
- package/_internal/components/heading/index.d.ts +4 -0
- package/_internal/components/heading/useHeadingLevel.d.ts +11 -0
- package/_internal/components/heading/useHeadingLevel.js +14 -0
- package/_internal/components/icon/Icon.d.ts +16 -0
- package/_internal/components/icon/Icon.js +27 -0
- package/_internal/components/icon/index.d.ts +2 -0
- package/_internal/components/image-block/ImageBlock.d.ts +19 -0
- package/_internal/components/image-block/ImageBlock.js +38 -0
- package/_internal/components/image-block/ImageCaption.js +30 -0
- package/_internal/components/image-block/index.d.ts +2 -0
- package/_internal/components/inline-list/InlineList.d.ts +16 -0
- package/_internal/components/inline-list/InlineList.js +25 -0
- package/_internal/components/inline-list/index.d.ts +1 -0
- package/_internal/components/input-helper/InputHelper.d.ts +16 -0
- package/_internal/components/input-helper/InputHelper.js +28 -0
- package/_internal/components/input-helper/index.d.ts +1 -0
- package/_internal/components/input-label/InputLabel.d.ts +16 -0
- package/_internal/components/input-label/InputLabel.js +28 -0
- package/_internal/components/input-label/index.d.ts +1 -0
- package/_internal/components/lightbox/Lightbox.d.ts +22 -0
- package/_internal/components/lightbox/Lightbox.js +63 -0
- package/_internal/components/lightbox/index.d.ts +1 -0
- package/_internal/components/link/Link.d.ts +20 -0
- package/_internal/components/link/Link.js +43 -0
- package/_internal/components/link/index.d.ts +1 -0
- package/_internal/components/link-preview/LinkPreview.d.ts +20 -0
- package/_internal/components/link-preview/LinkPreview.js +36 -0
- package/_internal/components/link-preview/index.d.ts +1 -0
- package/_internal/components/list/List.d.ts +16 -0
- package/_internal/components/list/List.js +25 -0
- package/_internal/components/list/ListDivider.d.ts +16 -0
- package/_internal/components/list/ListDivider.js +22 -0
- package/_internal/components/list/ListItem.d.ts +27 -0
- package/_internal/components/list/ListItem.js +47 -0
- package/_internal/components/list/ListItemAction.d.ts +27 -0
- package/_internal/components/list/ListItemAction.js +41 -0
- package/_internal/components/list/ListSection.d.ts +16 -0
- package/_internal/components/list/ListSection.js +30 -0
- package/_internal/components/list/index.d.ts +6 -0
- package/_internal/components/menu-button/MenuButton.d.ts +48 -0
- package/_internal/components/menu-button/MenuButton.js +59 -0
- package/_internal/components/menu-button/MenuItem.d.ts +40 -0
- package/_internal/components/menu-button/MenuItem.js +86 -0
- package/_internal/components/menu-button/MenuList.js +43 -0
- package/_internal/components/menu-button/MenuPopover.d.ts +8 -0
- package/_internal/components/menu-button/MenuPopover.js +36 -0
- package/_internal/components/menu-button/MenuProvider.js +49 -0
- package/_internal/components/menu-button/MenuTrigger.js +52 -0
- package/_internal/components/menu-button/context.js +15 -0
- package/_internal/components/menu-button/index.d.ts +3 -0
- package/_internal/components/menu-button/useMenuEvent.js +17 -0
- package/_internal/components/menu-button/useMenuOpen.js +11 -0
- package/_internal/components/message/Message.d.ts +22 -0
- package/_internal/components/message/Message.js +31 -0
- package/_internal/components/message/index.d.ts +1 -0
- package/_internal/components/mosaic/Mosaic.d.ts +28 -0
- package/_internal/components/mosaic/Mosaic.js +36 -0
- package/_internal/components/mosaic/index.d.ts +1 -0
- package/_internal/components/popover/Popover.d.ts +35 -0
- package/_internal/components/popover/Popover.js +76 -0
- package/_internal/components/popover/index.d.ts +3 -0
- package/_internal/components/popover/usePopoverStyle.js +55 -0
- package/_internal/components/popover-dialog/PopoverDialog.d.ts +28 -0
- package/_internal/components/popover-dialog/PopoverDialog.js +34 -0
- package/_internal/components/popover-dialog/index.d.ts +1 -0
- package/_internal/components/progress/ProgressCircular.d.ts +10 -0
- package/_internal/components/progress/ProgressCircular.js +28 -0
- package/_internal/components/progress/ProgressLinear.d.ts +10 -0
- package/_internal/components/progress/ProgressLinear.js +23 -0
- package/_internal/components/progress/index.d.ts +3 -0
- package/_internal/components/radio-button/RadioButton.d.ts +20 -0
- package/_internal/components/radio-button/RadioButton.js +50 -0
- package/_internal/components/radio-button/RadioGroup.d.ts +15 -0
- package/_internal/components/radio-button/RadioGroup.js +25 -0
- package/_internal/components/radio-button/index.d.ts +2 -0
- package/_internal/components/select-button/SelectButton.d.ts +172 -0
- package/_internal/components/select-button/SelectButton.js +164 -0
- package/_internal/components/select-button/index.d.ts +21 -0
- package/_internal/components/select-button/index.js +7 -0
- package/_internal/components/select-text-field/SelectTextField.d.ts +122 -0
- package/_internal/components/select-text-field/SelectTextField.js +195 -0
- package/_internal/components/select-text-field/index.d.ts +51 -0
- package/_internal/components/select-text-field/index.js +19 -0
- package/_internal/components/skeleton/SkeletonCircle.d.ts +15 -0
- package/_internal/components/skeleton/SkeletonCircle.js +29 -0
- package/_internal/components/skeleton/SkeletonRectangle.d.ts +15 -0
- package/_internal/components/skeleton/SkeletonRectangle.js +29 -0
- package/_internal/components/skeleton/SkeletonTypography.d.ts +15 -0
- package/_internal/components/skeleton/SkeletonTypography.js +29 -0
- package/_internal/components/skeleton/index.d.ts +4 -0
- package/_internal/components/switch/Switch.d.ts +20 -0
- package/_internal/components/switch/Switch.js +50 -0
- package/_internal/components/switch/index.d.ts +1 -0
- package/_internal/components/table/Table.d.ts +10 -0
- package/_internal/components/table/Table.js +24 -0
- package/_internal/components/table/TableBody.d.ts +10 -0
- package/_internal/components/table/TableBody.js +21 -0
- package/_internal/components/table/TableCell.d.ts +17 -0
- package/_internal/components/table/TableCell.js +28 -0
- package/_internal/components/table/TableHeader.d.ts +10 -0
- package/_internal/components/table/TableHeader.js +21 -0
- package/_internal/components/table/TableRow.d.ts +14 -0
- package/_internal/components/table/TableRow.js +28 -0
- package/_internal/components/table/index.d.ts +6 -0
- package/_internal/components/tabs/Tab.d.ts +16 -0
- package/_internal/components/tabs/Tab.js +52 -0
- package/_internal/components/tabs/TabList.d.ts +22 -0
- package/_internal/components/tabs/TabList.js +42 -0
- package/_internal/components/tabs/TabPanel.d.ts +18 -0
- package/_internal/components/tabs/TabPanel.js +36 -0
- package/_internal/components/tabs/TabProvider.d.ts +25 -0
- package/_internal/components/tabs/TabProvider.js +60 -0
- package/_internal/components/tabs/index.d.ts +5 -0
- package/_internal/components/tabs/state.js +53 -0
- package/_internal/components/text/Text.d.ts +16 -0
- package/_internal/components/text/Text.js +50 -0
- package/_internal/components/text/index.d.ts +1 -0
- package/_internal/components/text-field/RawInputText.d.ts +27 -0
- package/_internal/components/text-field/RawInputText.js +55 -0
- package/_internal/components/text-field/RawInputTextarea.d.ts +27 -0
- package/_internal/components/text-field/RawInputTextarea.js +59 -0
- package/_internal/components/text-field/TextField.d.ts +52 -0
- package/_internal/components/text-field/TextField.js +123 -0
- package/_internal/components/text-field/index.d.ts +3 -0
- package/_internal/components/text-field/useFitRowsToContent.js +25 -0
- package/_internal/components/thumbnail/Thumbnail.d.ts +29 -0
- package/_internal/components/thumbnail/Thumbnail.js +89 -0
- package/_internal/components/thumbnail/index.d.ts +2 -0
- package/_internal/components/thumbnail/useFocusPointStyle.js +50 -0
- package/_internal/components/thumbnail/useImageLoad.js +38 -0
- package/_internal/components/time-picker-field/TimePickerField.d.ts +37 -0
- package/_internal/components/time-picker-field/TimePickerField.js +104 -0
- package/_internal/components/time-picker-field/index.d.ts +2 -0
- package/_internal/components/toolbar/Toolbar.d.ts +10 -0
- package/_internal/components/toolbar/Toolbar.js +23 -0
- package/_internal/components/toolbar/index.d.ts +2 -0
- package/_internal/components/tooltip/Tooltip.d.ts +18 -0
- package/_internal/components/tooltip/Tooltip.js +77 -0
- package/_internal/components/tooltip/context.js +20 -0
- package/_internal/components/tooltip/index.d.ts +2 -0
- package/_internal/components/tooltip/useInjectTooltipRef.js +46 -0
- package/_internal/components/tooltip/useTooltipOpen.js +39 -0
- package/_internal/components/uploader/Uploader.d.ts +30 -0
- package/_internal/components/uploader/Uploader.js +77 -0
- package/_internal/components/uploader/index.d.ts +2 -0
- package/_internal/components/user-block/UserBlock.d.ts +31 -0
- package/_internal/components/user-block/UserBlock.js +120 -0
- package/_internal/components/user-block/index.d.ts +2 -0
- package/_internal/composables/useAttrFallback.js +39 -0
- package/_internal/composables/useCallbackOnEscape.js +42 -0
- package/_internal/composables/useClassName.js +21 -0
- package/_internal/composables/useDisableBodyScroll.js +17 -0
- package/_internal/composables/useDisableStateProps.js +36 -0
- package/_internal/composables/useDisabledState.js +8 -0
- package/_internal/composables/useFocus.js +23 -0
- package/_internal/composables/useFocusTrap.js +38 -0
- package/_internal/composables/useHasEventListener.js +13 -0
- package/_internal/composables/useId.js +14 -0
- package/_internal/composables/useOverflowTooltipLabel.js +28 -0
- package/_internal/composables/useRestoreFocusOnClose.js +37 -0
- package/_internal/composables/useRovingTabIndexContainer.js +26 -0
- package/_internal/composables/useSlot.js +15 -0
- package/_internal/composables/useTransitionVisibility.js +40 -0
- package/_internal/composables/useWatchDisposable.js +24 -0
- package/_internal/node_modules/@floating-ui/core/dist/floating-ui.core.js +536 -0
- package/_internal/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +528 -0
- package/_internal/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +144 -0
- package/_internal/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +135 -0
- package/_internal/node_modules/@floating-ui/vue/dist/floating-ui.vue.js +145 -0
- package/_internal/node_modules/@vue/reactivity/dist/reactivity.d.ts +104 -0
- package/_internal/node_modules/@vue/runtime-core/dist/runtime-core.d.ts +1179 -0
- package/_internal/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts +90 -0
- package/_internal/node_modules/@vue/shared/dist/shared.d.ts +7 -0
- package/_internal/node_modules/@vueuse/core/dist/index.js +289 -0
- package/_internal/node_modules/@vueuse/shared/dist/index.js +49 -0
- package/_internal/node_modules/classnames/index.js +45 -0
- package/_internal/node_modules/lodash/_DataView.js +10 -0
- package/_internal/node_modules/lodash/_Hash.js +34 -0
- package/_internal/node_modules/lodash/_ListCache.js +34 -0
- package/_internal/node_modules/lodash/_Map.js +10 -0
- package/_internal/node_modules/lodash/_MapCache.js +34 -0
- package/_internal/node_modules/lodash/_Promise.js +10 -0
- package/_internal/node_modules/lodash/_Set.js +10 -0
- package/_internal/node_modules/lodash/_Symbol.js +9 -0
- package/_internal/node_modules/lodash/_WeakMap.js +10 -0
- package/_internal/node_modules/lodash/_apply.js +27 -0
- package/_internal/node_modules/lodash/_arrayMap.js +22 -0
- package/_internal/node_modules/lodash/_arrayPush.js +21 -0
- package/_internal/node_modules/lodash/_assignValue.js +27 -0
- package/_internal/node_modules/lodash/_assocIndexOf.js +23 -0
- package/_internal/node_modules/lodash/_baseAssignValue.js +28 -0
- package/_internal/node_modules/lodash/_baseFindIndex.js +24 -0
- package/_internal/node_modules/lodash/_baseFlatten.js +34 -0
- package/_internal/node_modules/lodash/_baseGet.js +25 -0
- package/_internal/node_modules/lodash/_baseGetTag.js +27 -0
- package/_internal/node_modules/lodash/_baseHasIn.js +19 -0
- package/_internal/node_modules/lodash/_baseIndexOf.js +24 -0
- package/_internal/node_modules/lodash/_baseIndexOfWith.js +23 -0
- package/_internal/node_modules/lodash/_baseIsArguments.js +23 -0
- package/_internal/node_modules/lodash/_baseIsNaN.js +18 -0
- package/_internal/node_modules/lodash/_baseIsNative.js +40 -0
- package/_internal/node_modules/lodash/_baseIsTypedArray.js +29 -0
- package/_internal/node_modules/lodash/_baseKeys.js +26 -0
- package/_internal/node_modules/lodash/_basePick.js +25 -0
- package/_internal/node_modules/lodash/_basePickBy.js +29 -0
- package/_internal/node_modules/lodash/_basePullAll.js +40 -0
- package/_internal/node_modules/lodash/_baseRest.js +23 -0
- package/_internal/node_modules/lodash/_baseSet.js +41 -0
- package/_internal/node_modules/lodash/_baseSetToString.js +19 -0
- package/_internal/node_modules/lodash/_baseSlice.js +28 -0
- package/_internal/node_modules/lodash/_baseToString.js +32 -0
- package/_internal/node_modules/lodash/_baseTrim.js +22 -0
- package/_internal/node_modules/lodash/_baseUnary.js +20 -0
- package/_internal/node_modules/lodash/_castPath.js +25 -0
- package/_internal/node_modules/lodash/_copyArray.js +22 -0
- package/_internal/node_modules/lodash/_coreJsData.js +9 -0
- package/_internal/node_modules/lodash/_defineProperty.js +16 -0
- package/_internal/node_modules/lodash/_flatRest.js +22 -0
- package/_internal/node_modules/lodash/_freeGlobal.js +8 -0
- package/_internal/node_modules/lodash/_getMapData.js +22 -0
- package/_internal/node_modules/lodash/_getNative.js +23 -0
- package/_internal/node_modules/lodash/_getRawTag.js +40 -0
- package/_internal/node_modules/lodash/_getTag.js +40 -0
- package/_internal/node_modules/lodash/_getValue.js +19 -0
- package/_internal/node_modules/lodash/_hasPath.js +36 -0
- package/_internal/node_modules/lodash/_hashClear.js +21 -0
- package/_internal/node_modules/lodash/_hashDelete.js +23 -0
- package/_internal/node_modules/lodash/_hashGet.js +31 -0
- package/_internal/node_modules/lodash/_hashHas.js +25 -0
- package/_internal/node_modules/lodash/_hashSet.js +28 -0
- package/_internal/node_modules/lodash/_isFlattenable.js +24 -0
- package/_internal/node_modules/lodash/_isIndex.js +25 -0
- package/_internal/node_modules/lodash/_isKey.js +27 -0
- package/_internal/node_modules/lodash/_isKeyable.js +19 -0
- package/_internal/node_modules/lodash/_isMasked.js +25 -0
- package/_internal/node_modules/lodash/_isPrototype.js +21 -0
- package/_internal/node_modules/lodash/_listCacheClear.js +19 -0
- package/_internal/node_modules/lodash/_listCacheDelete.js +29 -0
- package/_internal/node_modules/lodash/_listCacheGet.js +23 -0
- package/_internal/node_modules/lodash/_listCacheHas.js +22 -0
- package/_internal/node_modules/lodash/_listCacheSet.js +28 -0
- package/_internal/node_modules/lodash/_mapCacheClear.js +27 -0
- package/_internal/node_modules/lodash/_mapCacheDelete.js +24 -0
- package/_internal/node_modules/lodash/_mapCacheGet.js +22 -0
- package/_internal/node_modules/lodash/_mapCacheHas.js +22 -0
- package/_internal/node_modules/lodash/_mapCacheSet.js +26 -0
- package/_internal/node_modules/lodash/_memoizeCapped.js +28 -0
- package/_internal/node_modules/lodash/_nativeCreate.js +9 -0
- package/_internal/node_modules/lodash/_nativeKeys.js +9 -0
- package/_internal/node_modules/lodash/_nodeUtil.js +22 -0
- package/_internal/node_modules/lodash/_objectToString.js +24 -0
- package/_internal/node_modules/lodash/_overArg.js +21 -0
- package/_internal/node_modules/lodash/_overRest.js +32 -0
- package/_internal/node_modules/lodash/_root.js +12 -0
- package/_internal/node_modules/lodash/_setToString.js +11 -0
- package/_internal/node_modules/lodash/_shortOut.js +31 -0
- package/_internal/node_modules/lodash/_strictIndexOf.js +23 -0
- package/_internal/node_modules/lodash/_stringToPath.js +21 -0
- package/_internal/node_modules/lodash/_toKey.js +24 -0
- package/_internal/node_modules/lodash/_toSource.js +28 -0
- package/_internal/node_modules/lodash/_trimmedEndIndex.js +23 -0
- package/_internal/node_modules/lodash/castArray.js +48 -0
- package/_internal/node_modules/lodash/constant.js +32 -0
- package/_internal/node_modules/lodash/eq.js +43 -0
- package/_internal/node_modules/lodash/flatten.js +27 -0
- package/_internal/node_modules/lodash/hasIn.js +40 -0
- package/_internal/node_modules/lodash/identity.js +27 -0
- package/_internal/node_modules/lodash/isArguments.js +21 -0
- package/_internal/node_modules/lodash/isArray.js +8 -0
- package/_internal/node_modules/lodash/isArrayLike.js +39 -0
- package/_internal/node_modules/lodash/isBuffer.js +17 -0
- package/_internal/node_modules/lodash/isEmpty.js +63 -0
- package/_internal/node_modules/lodash/isFunction.js +35 -0
- package/_internal/node_modules/lodash/isInteger.js +39 -0
- package/_internal/node_modules/lodash/isLength.js +39 -0
- package/_internal/node_modules/lodash/isObject.js +37 -0
- package/_internal/node_modules/lodash/isObjectLike.js +35 -0
- package/_internal/node_modules/lodash/isSymbol.js +33 -0
- package/_internal/node_modules/lodash/isTypedArray.js +13 -0
- package/_internal/node_modules/lodash/last.js +26 -0
- package/_internal/node_modules/lodash/memoize.js +69 -0
- package/_internal/node_modules/lodash/pick.js +13 -0
- package/_internal/node_modules/lodash/pull.js +10 -0
- package/_internal/node_modules/lodash/pullAll.js +33 -0
- package/_internal/node_modules/lodash/set.js +41 -0
- package/_internal/node_modules/lodash/stubFalse.js +24 -0
- package/_internal/node_modules/lodash/take.js +41 -0
- package/_internal/node_modules/lodash/toFinite.js +41 -0
- package/_internal/node_modules/lodash/toInteger.js +40 -0
- package/_internal/node_modules/lodash/toNumber.js +57 -0
- package/_internal/node_modules/lodash/toString.js +34 -0
- package/_internal/node_modules/vue/jsx-runtime/index.d.ts +1 -0
- package/_internal/node_modules/vue-demi/lib/index.js +34 -0
- package/_internal/packages/lumx-core/src/js/components/AlertDialog/index.d.ts +15 -0
- package/_internal/packages/lumx-core/src/js/components/AlertDialog/index.js +107 -0
- package/_internal/packages/lumx-core/src/js/components/Avatar/index.d.ts +27 -0
- package/_internal/packages/lumx-core/src/js/components/Avatar/index.js +29 -0
- package/_internal/packages/lumx-core/src/js/components/Badge/BadgeWrapper.d.ts +14 -0
- package/_internal/packages/lumx-core/src/js/components/Badge/BadgeWrapper.js +12 -0
- package/_internal/packages/lumx-core/src/js/components/Badge/index.d.ts +18 -0
- package/_internal/packages/lumx-core/src/js/components/Badge/index.js +36 -0
- package/_internal/packages/lumx-core/src/js/components/Button/Button.d.ts +19 -0
- package/_internal/packages/lumx-core/src/js/components/Button/Button.js +49 -0
- package/_internal/packages/lumx-core/src/js/components/Button/ButtonGroup.d.ts +17 -0
- package/_internal/packages/lumx-core/src/js/components/Button/ButtonGroup.js +33 -0
- package/_internal/packages/lumx-core/src/js/components/Button/ButtonRoot.d.ts +46 -0
- package/_internal/packages/lumx-core/src/js/components/Button/ButtonRoot.js +77 -0
- package/_internal/packages/lumx-core/src/js/components/Button/IconButton.d.ts +24 -0
- package/_internal/packages/lumx-core/src/js/components/Button/IconButton.js +46 -0
- package/_internal/packages/lumx-core/src/js/components/Checkbox/index.d.ts +35 -0
- package/_internal/packages/lumx-core/src/js/components/Checkbox/index.js +60 -0
- package/_internal/packages/lumx-core/src/js/components/Chip/ChipGroup.d.ts +21 -0
- package/_internal/packages/lumx-core/src/js/components/Chip/ChipGroup.js +19 -0
- package/_internal/packages/lumx-core/src/js/components/Chip/SelectionChipGroup.d.ts +29 -0
- package/_internal/packages/lumx-core/src/js/components/Chip/SelectionChipGroup.js +66 -0
- package/_internal/packages/lumx-core/src/js/components/Chip/index.d.ts +63 -0
- package/_internal/packages/lumx-core/src/js/components/Chip/index.js +65 -0
- package/_internal/packages/lumx-core/src/js/components/Chip/setupSelectionChipGroupEvents.js +97 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxButton.d.ts +34 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxButton.js +58 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxInput.d.ts +34 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxInput.js +47 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxList.d.ts +36 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxList.js +30 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOption.d.ts +53 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOption.js +75 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionAction.d.ts +20 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionAction.js +29 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionMoreInfo.d.ts +29 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionMoreInfo.js +60 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionSkeleton.d.ts +32 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxOptionSkeleton.js +40 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxPopover.d.ts +16 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxPopover.js +52 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxSection.d.ts +36 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxSection.js +43 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxState.d.ts +64 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/ComboboxState.js +85 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/constants.js +4 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/setupCombobox.js +350 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/setupComboboxButton.js +84 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/setupComboboxInput.js +95 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/setupListbox.js +84 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/subscribeComboboxState.js +43 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/types.d.ts +142 -0
- package/_internal/packages/lumx-core/src/js/components/Combobox/utils.js +63 -0
- package/_internal/packages/lumx-core/src/js/components/Dialog/index.d.ts +20 -0
- package/_internal/packages/lumx-core/src/js/components/Dialog/index.js +59 -0
- package/_internal/packages/lumx-core/src/js/components/Divider/index.d.ts +13 -0
- package/_internal/packages/lumx-core/src/js/components/Divider/index.js +21 -0
- package/_internal/packages/lumx-core/src/js/components/DragHandle/index.d.ts +13 -0
- package/_internal/packages/lumx-core/src/js/components/DragHandle/index.js +28 -0
- package/_internal/packages/lumx-core/src/js/components/ExpansionPanel/index.d.ts +51 -0
- package/_internal/packages/lumx-core/src/js/components/ExpansionPanel/index.js +63 -0
- package/_internal/packages/lumx-core/src/js/components/Flag/index.d.ts +24 -0
- package/_internal/packages/lumx-core/src/js/components/Flag/index.js +36 -0
- package/_internal/packages/lumx-core/src/js/components/FlexBox/index.d.ts +34 -0
- package/_internal/packages/lumx-core/src/js/components/FlexBox/index.js +37 -0
- package/_internal/packages/lumx-core/src/js/components/FlexBox/types.d.ts +9 -0
- package/_internal/packages/lumx-core/src/js/components/GenericBlock/constants.d.ts +22 -0
- package/_internal/packages/lumx-core/src/js/components/GenericBlock/constants.js +15 -0
- package/_internal/packages/lumx-core/src/js/components/GenericBlock/index.d.ts +60 -0
- package/_internal/packages/lumx-core/src/js/components/GenericBlock/index.js +45 -0
- package/_internal/packages/lumx-core/src/js/components/GridColumn/GridColumn.d.ts +27 -0
- package/_internal/packages/lumx-core/src/js/components/GridColumn/GridColumn.js +50 -0
- package/_internal/packages/lumx-core/src/js/components/GridColumn/index.d.ts +1 -0
- package/_internal/packages/lumx-core/src/js/components/Heading/constants.d.ts +10 -0
- package/_internal/packages/lumx-core/src/js/components/Heading/constants.js +19 -0
- package/_internal/packages/lumx-core/src/js/components/Heading/index.d.ts +14 -0
- package/_internal/packages/lumx-core/src/js/components/Heading/index.js +26 -0
- package/_internal/packages/lumx-core/src/js/components/Heading/utils.js +14 -0
- package/_internal/packages/lumx-core/src/js/components/Icon/constants.d.ts +4 -0
- package/_internal/packages/lumx-core/src/js/components/Icon/index.d.ts +34 -0
- package/_internal/packages/lumx-core/src/js/components/Icon/index.js +63 -0
- package/_internal/packages/lumx-core/src/js/components/ImageBlock/ImageCaption.d.ts +19 -0
- package/_internal/packages/lumx-core/src/js/components/ImageBlock/ImageCaption.js +52 -0
- package/_internal/packages/lumx-core/src/js/components/ImageBlock/index.d.ts +52 -0
- package/_internal/packages/lumx-core/src/js/components/ImageBlock/index.js +67 -0
- package/_internal/packages/lumx-core/src/js/components/InlineList/index.d.ts +34 -0
- package/_internal/packages/lumx-core/src/js/components/InlineList/index.js +48 -0
- package/_internal/packages/lumx-core/src/js/components/InputHelper/constants.js +9 -0
- package/_internal/packages/lumx-core/src/js/components/InputHelper/index.d.ts +21 -0
- package/_internal/packages/lumx-core/src/js/components/InputHelper/index.js +32 -0
- package/_internal/packages/lumx-core/src/js/components/InputLabel/index.d.ts +24 -0
- package/_internal/packages/lumx-core/src/js/components/InputLabel/index.js +31 -0
- package/_internal/packages/lumx-core/src/js/components/Lightbox/index.d.ts +14 -0
- package/_internal/packages/lumx-core/src/js/components/Lightbox/index.js +46 -0
- package/_internal/packages/lumx-core/src/js/components/Link/index.d.ts +34 -0
- package/_internal/packages/lumx-core/src/js/components/Link/index.js +36 -0
- package/_internal/packages/lumx-core/src/js/components/LinkPreview/index.d.ts +35 -0
- package/_internal/packages/lumx-core/src/js/components/LinkPreview/index.js +64 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListDivider.d.ts +12 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListDivider.js +37 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListItem.d.ts +40 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListItem.js +56 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListItemAction.js +27 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListSection.d.ts +27 -0
- package/_internal/packages/lumx-core/src/js/components/List/ListSection.js +46 -0
- package/_internal/packages/lumx-core/src/js/components/List/index.d.ts +20 -0
- package/_internal/packages/lumx-core/src/js/components/List/index.js +39 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuButton.d.ts +28 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuButton.js +21 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuItem.d.ts +27 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuItem.js +33 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuList.js +19 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuPopover.d.ts +12 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuPopover.js +33 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/MenuTrigger.js +21 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/setupMenu.js +256 -0
- package/_internal/packages/lumx-core/src/js/components/Menu/utils.js +16 -0
- package/_internal/packages/lumx-core/src/js/components/Message/index.d.ts +31 -0
- package/_internal/packages/lumx-core/src/js/components/Message/index.js +83 -0
- package/_internal/packages/lumx-core/src/js/components/Mosaic/index.d.ts +18 -0
- package/_internal/packages/lumx-core/src/js/components/Mosaic/index.js +48 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/constants.d.ts +39 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/constants.js +37 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/index.d.ts +65 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/index.js +71 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/types.d.ts +39 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/utils/buildPopoverMiddleware.js +53 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/utils/computeArrowStyles.js +13 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/utils/getFloatingPlacement.js +10 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/utils/parseAutoPlacement.js +21 -0
- package/_internal/packages/lumx-core/src/js/components/Popover/utils/parseFitWidth.js +12 -0
- package/_internal/packages/lumx-core/src/js/components/PopoverDialog/index.d.ts +13 -0
- package/_internal/packages/lumx-core/src/js/components/PopoverDialog/index.js +15 -0
- package/_internal/packages/lumx-core/src/js/components/ProgressCircular/index.d.ts +32 -0
- package/_internal/packages/lumx-core/src/js/components/ProgressCircular/index.js +43 -0
- package/_internal/packages/lumx-core/src/js/components/ProgressLinear/index.d.ts +13 -0
- package/_internal/packages/lumx-core/src/js/components/ProgressLinear/index.js +21 -0
- package/_internal/packages/lumx-core/src/js/components/RadioButton/index.d.ts +35 -0
- package/_internal/packages/lumx-core/src/js/components/RadioButton/index.js +51 -0
- package/_internal/packages/lumx-core/src/js/components/RadioGroup/index.d.ts +1 -0
- package/_internal/packages/lumx-core/src/js/components/RadioGroup/index.js +33 -0
- package/_internal/packages/lumx-core/src/js/components/RawClickable/index.d.ts +14 -0
- package/_internal/packages/lumx-core/src/js/components/RawClickable/index.js +33 -0
- package/_internal/packages/lumx-core/src/js/components/SelectButton/index.d.ts +58 -0
- package/_internal/packages/lumx-core/src/js/components/SelectButton/index.js +85 -0
- package/_internal/packages/lumx-core/src/js/components/SelectTextField/index.js +70 -0
- package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonCircle.d.ts +18 -0
- package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonCircle.js +25 -0
- package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonRectangle.d.ts +34 -0
- package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonRectangle.js +40 -0
- package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonTypography.d.ts +24 -0
- package/_internal/packages/lumx-core/src/js/components/Skeleton/SkeletonTypography.js +31 -0
- package/_internal/packages/lumx-core/src/js/components/Skeleton/index.d.ts +3 -0
- package/_internal/packages/lumx-core/src/js/components/Switch/index.d.ts +37 -0
- package/_internal/packages/lumx-core/src/js/components/Switch/index.js +58 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableBody.d.ts +15 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableBody.js +20 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableCell.d.ts +42 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableCell.js +79 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableHeader.d.ts +15 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableHeader.js +20 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableRow.d.ts +22 -0
- package/_internal/packages/lumx-core/src/js/components/Table/TableRow.js +25 -0
- package/_internal/packages/lumx-core/src/js/components/Table/constants.d.ts +1 -0
- package/_internal/packages/lumx-core/src/js/components/Table/constants.js +7 -0
- package/_internal/packages/lumx-core/src/js/components/Table/index.d.ts +20 -0
- package/_internal/packages/lumx-core/src/js/components/Table/index.js +22 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/Tab.d.ts +54 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/Tab.js +66 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/TabList.d.ts +27 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/TabList.js +42 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/TabPanel.d.ts +26 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/TabPanel.js +28 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/constants.js +7 -0
- package/_internal/packages/lumx-core/src/js/components/Tabs/state.js +53 -0
- package/_internal/packages/lumx-core/src/js/components/Text/index.d.ts +55 -0
- package/_internal/packages/lumx-core/src/js/components/Text/index.js +37 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/RawInputText.d.ts +21 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/RawInputText.js +42 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/RawInputTextarea.d.ts +19 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/RawInputTextarea.js +42 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/TextField.d.ts +70 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/TextField.js +127 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/constants.d.ts +1 -0
- package/_internal/packages/lumx-core/src/js/components/TextField/constants.js +11 -0
- package/_internal/packages/lumx-core/src/js/components/Thumbnail/index.d.ts +60 -0
- package/_internal/packages/lumx-core/src/js/components/Thumbnail/index.js +99 -0
- package/_internal/packages/lumx-core/src/js/components/Thumbnail/types.d.ts +47 -0
- package/_internal/packages/lumx-core/src/js/components/Thumbnail/types.js +18 -0
- package/_internal/packages/lumx-core/src/js/components/Thumbnail/utils.d.ts +1 -0
- package/_internal/packages/lumx-core/src/js/components/Thumbnail/utils.js +76 -0
- package/_internal/packages/lumx-core/src/js/components/TimePickerField/index.d.ts +61 -0
- package/_internal/packages/lumx-core/src/js/components/TimePickerField/index.js +72 -0
- package/_internal/packages/lumx-core/src/js/components/Toolbar/index.d.ts +23 -0
- package/_internal/packages/lumx-core/src/js/components/Toolbar/index.js +36 -0
- package/_internal/packages/lumx-core/src/js/components/Tooltip/constants.d.ts +4 -0
- package/_internal/packages/lumx-core/src/js/components/Tooltip/constants.js +8 -0
- package/_internal/packages/lumx-core/src/js/components/Tooltip/index.d.ts +25 -0
- package/_internal/packages/lumx-core/src/js/components/Tooltip/index.js +56 -0
- package/_internal/packages/lumx-core/src/js/components/Tooltip/tooltipOpenManager.js +93 -0
- package/_internal/packages/lumx-core/src/js/components/Uploader/index.d.ts +59 -0
- package/_internal/packages/lumx-core/src/js/components/Uploader/index.js +64 -0
- package/_internal/packages/lumx-core/src/js/components/UserBlock/index.d.ts +124 -0
- package/_internal/packages/lumx-core/src/js/components/UserBlock/index.js +88 -0
- package/_internal/packages/lumx-core/src/js/constants/browser/index.js +7 -0
- package/_internal/packages/lumx-core/src/js/constants/components/index.js +19 -0
- package/_internal/packages/lumx-core/src/js/constants/enums/index.d.ts +184 -0
- package/_internal/packages/lumx-core/src/js/constants/enums/index.js +140 -0
- package/_internal/packages/lumx-core/src/js/constants/index.d.ts +1 -0
- package/_internal/packages/lumx-core/src/js/types/AriaAttributes.d.ts +32 -0
- package/_internal/packages/lumx-core/src/js/types/Booleanish.d.ts +4 -0
- package/_internal/packages/lumx-core/src/js/types/CommonRef.d.ts +4 -0
- package/_internal/packages/lumx-core/src/js/types/GenericProps.d.ts +14 -0
- package/_internal/packages/lumx-core/src/js/types/HasAriaDisabled.d.ts +9 -0
- package/_internal/packages/lumx-core/src/js/types/HasAriaLabelOrLabelledBy.d.ts +19 -0
- package/_internal/packages/lumx-core/src/js/types/HasChecked.d.ts +9 -0
- package/_internal/packages/lumx-core/src/js/types/HasClassName.d.ts +9 -0
- package/_internal/packages/lumx-core/src/js/types/HasCloseMode.d.ts +10 -0
- package/_internal/packages/lumx-core/src/js/types/HasDisabled.d.ts +9 -0
- package/_internal/packages/lumx-core/src/js/types/HasPolymorphicAs.d.ts +12 -0
- package/_internal/packages/lumx-core/src/js/types/HasRequiredLinkHref.d.ts +6 -0
- package/_internal/packages/lumx-core/src/js/types/HasTheme.d.ts +10 -0
- package/_internal/packages/lumx-core/src/js/types/HeadingElement.d.ts +5 -0
- package/_internal/packages/lumx-core/src/js/types/JSXElement.d.ts +13 -0
- package/_internal/packages/lumx-core/src/js/types/Selector.d.ts +11 -0
- package/_internal/packages/lumx-core/src/js/types/TextElement.d.ts +7 -0
- package/_internal/packages/lumx-core/src/js/types/ValueOf.d.ts +5 -0
- package/_internal/packages/lumx-core/src/js/types/index.d.ts +17 -0
- package/_internal/packages/lumx-core/src/js/utils/ClickAway/index.d.ts +7 -0
- package/_internal/packages/lumx-core/src/js/utils/ClickAway/index.js +37 -0
- package/_internal/packages/lumx-core/src/js/utils/InfiniteScroll/index.d.ts +9 -0
- package/_internal/packages/lumx-core/src/js/utils/InfiniteScroll/index.js +21 -0
- package/_internal/packages/lumx-core/src/js/utils/InfiniteScroll/setupInfiniteScrollObserver.js +18 -0
- package/_internal/packages/lumx-core/src/js/utils/Portal/index.d.ts +28 -0
- package/_internal/packages/lumx-core/src/js/utils/_internal/color/resolveColorWithVariants.js +9 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/createSelectorTreeWalker.js +20 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/css/combineSize.js +14 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/css/resolveCssSize.js +8 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/css/types.d.ts +7 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/isFocusVisible.js +11 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/isHoverNotSupported.js +5 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/isPrintableKey.js +12 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/lastDescendant.js +9 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/querySelectorInclusive.js +18 -0
- package/_internal/packages/lumx-core/src/js/utils/browser/trackContainerFocus.js +28 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/action-area/index.js +22 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/bem/block.js +18 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/bem/element.js +7 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/bem/index.js +22 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/bem/modifier.js +19 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/color/index.js +38 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/index.js +12 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/spacing/index.js +31 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/typography/index.js +10 -0
- package/_internal/packages/lumx-core/src/js/utils/classNames/visually-hidden/index.js +9 -0
- package/_internal/packages/lumx-core/src/js/utils/disabledState/index.js +13 -0
- package/_internal/packages/lumx-core/src/js/utils/events/keyboard.js +27 -0
- package/_internal/packages/lumx-core/src/js/utils/focus/constants.js +13 -0
- package/_internal/packages/lumx-core/src/js/utils/focus/getFirstAndLastFocusable.js +20 -0
- package/_internal/packages/lumx-core/src/js/utils/focus/getFocusableElements.js +8 -0
- package/_internal/packages/lumx-core/src/js/utils/focus/setupFocusTrap.js +83 -0
- package/_internal/packages/lumx-core/src/js/utils/focusNavigation/createActiveItemState.js +38 -0
- package/_internal/packages/lumx-core/src/js/utils/focusNavigation/createGridFocusNavigation.js +182 -0
- package/_internal/packages/lumx-core/src/js/utils/focusNavigation/createListFocusNavigation.js +151 -0
- package/_internal/packages/lumx-core/src/js/utils/focusNavigation/createPendingNavigation.js +23 -0
- package/_internal/packages/lumx-core/src/js/utils/focusNavigation/setupRovingTabIndex.js +167 -0
- package/_internal/packages/lumx-core/src/js/utils/focusNavigation/types.d.ts +40 -0
- package/_internal/packages/lumx-core/src/js/utils/function/listenerTower.js +28 -0
- package/_internal/packages/lumx-core/src/js/utils/iterable/first.js +8 -0
- package/_internal/packages/lumx-core/src/js/utils/locale/getCurrentLocale.js +10 -0
- package/_internal/packages/lumx-core/src/js/utils/select/findOptionById.js +19 -0
- package/_internal/packages/lumx-core/src/js/utils/select/getOptionDisplayName.js +19 -0
- package/_internal/packages/lumx-core/src/js/utils/select/renderSelectOptions.js +55 -0
- package/_internal/packages/lumx-core/src/js/utils/select/toggleSelection.js +39 -0
- package/_internal/packages/lumx-core/src/js/utils/select/types.d.ts +224 -0
- package/_internal/packages/lumx-core/src/js/utils/selectors/getWithSelector.js +9 -0
- package/_internal/packages/lumx-core/src/js/utils/selectors/groupBySelector.js +21 -0
- package/_internal/packages/lumx-core/src/js/utils/time/buildTimeList.js +36 -0
- package/_internal/packages/lumx-core/src/js/utils/time/formatTime.js +14 -0
- package/_internal/packages/lumx-core/src/js/utils/time/getDateAtTime.js +12 -0
- package/_internal/packages/lumx-core/src/js/utils/time/isDateOnTime.js +10 -0
- package/_internal/packages/lumx-core/src/js/utils/time/parseTimeInput.js +46 -0
- package/_internal/packages/lumx-core/src/js/utils/time/snapTimeToBounds.js +21 -0
- package/_internal/packages/lumx-core/src/js/utils/time/timeOfDayMinutes.js +9 -0
- package/_internal/packages/lumx-core/src/js/utils/typeahead/index.js +77 -0
- package/_internal/utils/ClickAway/ClickAwayProvider.d.ts +19 -0
- package/_internal/utils/ClickAway/ClickAwayProvider.js +58 -0
- package/_internal/utils/ClickAway/index.d.ts +2 -0
- package/_internal/utils/ClickAway/useClickAway.d.ts +25 -0
- package/_internal/utils/ClickAway/useClickAway.js +25 -0
- package/_internal/utils/InfiniteScroll/InfiniteScroll.d.ts +9 -0
- package/_internal/utils/InfiniteScroll/InfiniteScroll.js +23 -0
- package/_internal/utils/InfiniteScroll/index.d.ts +2 -0
- package/_internal/utils/Portal/Portal.d.ts +10 -0
- package/_internal/utils/Portal/Portal.js +37 -0
- package/_internal/utils/Portal/PortalProvider.d.ts +8 -0
- package/_internal/utils/Portal/PortalProvider.js +19 -0
- package/_internal/utils/Portal/index.d.ts +3 -0
- package/_internal/utils/VueToJSX.d.ts +38 -0
- package/_internal/utils/VueToJSX.js +11 -0
- package/_internal/utils/isComponentType.js +9 -0
- package/_internal/utils/theme/ResetTheme.js +11 -0
- package/_internal/utils/theme/ThemeProvider.d.ts +14 -0
- package/_internal/utils/theme/ThemeProvider.js +18 -0
- package/_internal/utils/theme/index.d.ts +2 -0
- package/_internal/utils/theme/useTheme.d.ts +14 -0
- package/_internal/utils/theme/useTheme.js +14 -0
- package/_internal/utils/wrapChildrenIconWithSpaces.js +37 -0
- package/index.d.ts +114 -48
- package/index.js +83 -11709
- package/package.json +6 -9
- package/utils/index.d.ts +10 -7
- package/utils/index.js +8 -24
- package/_internal/CHaqSUjw.js +0 -159
- package/_internal/CHaqSUjw.js.map +0 -1
- package/components/alert-dialog/AlertDialog.d.ts +0 -45
- package/components/alert-dialog/AlertDialog.stories.d.ts +0 -104
- package/components/alert-dialog/index.d.ts +0 -1
- package/components/avatar/Avatar.d.ts +0 -42
- package/components/avatar/Avatar.stories.d.ts +0 -146
- package/components/avatar/index.d.ts +0 -1
- package/components/badge/Badge.d.ts +0 -13
- package/components/badge/Badge.stories.d.ts +0 -34
- package/components/badge/BadgeWrapper.d.ts +0 -8
- package/components/badge/BadgeWrapper.stories.d.ts +0 -18
- package/components/badge/index.d.ts +0 -4
- package/components/button/Button.d.ts +0 -19
- package/components/button/ButtonGroup.d.ts +0 -13
- package/components/button/IconButton.d.ts +0 -35
- package/components/button/index.d.ts +0 -6
- package/components/checkbox/Checkbox.d.ts +0 -21
- package/components/checkbox/index.d.ts +0 -3
- package/components/chip/Chip.d.ts +0 -30
- package/components/chip/Chip.stories.d.ts +0 -121
- package/components/chip/ChipGroup.d.ts +0 -7
- package/components/chip/ChipGroup.stories.d.ts +0 -12
- package/components/chip/SelectionChipGroup.d.ts +0 -51
- package/components/chip/SelectionChipGroup.stories.d.ts +0 -66
- package/components/chip/Stories/CustomRender.vue.d.ts +0 -2
- package/components/chip/Stories/InTextField.vue.d.ts +0 -2
- package/components/chip/index.d.ts +0 -3
- package/components/combobox/Combobox.stories.d.ts +0 -153
- package/components/combobox/Combobox.test.stories.d.ts +0 -165
- package/components/combobox/ComboboxButton.d.ts +0 -48
- package/components/combobox/ComboboxInput.d.ts +0 -41
- package/components/combobox/ComboboxList.d.ts +0 -15
- package/components/combobox/ComboboxOption.d.ts +0 -32
- package/components/combobox/ComboboxOption.test.d.ts +0 -1
- package/components/combobox/ComboboxOptionAction.d.ts +0 -20
- package/components/combobox/ComboboxOptionMoreInfo.d.ts +0 -29
- package/components/combobox/ComboboxOptionSkeleton.d.ts +0 -14
- package/components/combobox/ComboboxPopover.d.ts +0 -20
- package/components/combobox/ComboboxProvider.d.ts +0 -20
- package/components/combobox/ComboboxSection.d.ts +0 -14
- package/components/combobox/ComboboxState.d.ts +0 -14
- package/components/combobox/context/ComboboxContext.d.ts +0 -23
- package/components/combobox/context/ComboboxListContext.d.ts +0 -14
- package/components/combobox/context/ComboboxOptionContext.d.ts +0 -16
- package/components/combobox/context/useComboboxEvent.d.ts +0 -7
- package/components/combobox/context/useComboboxOpen.d.ts +0 -7
- package/components/combobox/index.d.ts +0 -112
- package/components/combobox/useWrappedRenderOptionSlot.d.ts +0 -11
- package/components/combobox/useWrappedRenderSectionTitleSlot.d.ts +0 -10
- package/components/dialog/Dialog.d.ts +0 -67
- package/components/dialog/Dialog.stories.d.ts +0 -106
- package/components/dialog/index.d.ts +0 -2
- package/components/divider/Divider.d.ts +0 -14
- package/components/divider/index.d.ts +0 -2
- package/components/drag-handle/DragHandle.d.ts +0 -14
- package/components/drag-handle/index.d.ts +0 -2
- package/components/expansion-panel/ExpansionPanel.d.ts +0 -39
- package/components/expansion-panel/ExpansionPanel.stories.d.ts +0 -54
- package/components/expansion-panel/index.d.ts +0 -1
- package/components/flag/Flag.d.ts +0 -13
- package/components/flag/Flag.stories.d.ts +0 -108
- package/components/flag/index.d.ts +0 -4
- package/components/flex-box/FlexBox.d.ts +0 -28
- package/components/flex-box/index.d.ts +0 -4
- package/components/generic-block/GenericBlock.d.ts +0 -62
- package/components/generic-block/GenericBlock.stories.d.ts +0 -65
- package/components/generic-block/index.d.ts +0 -4
- package/components/grid-column/GridColumn.d.ts +0 -9
- package/components/grid-column/GridColumn.stories.d.ts +0 -42
- package/components/grid-column/index.d.ts +0 -2
- package/components/heading/Heading.d.ts +0 -13
- package/components/heading/HeadingLevelProvider.d.ts +0 -12
- package/components/heading/context.d.ts +0 -3
- package/components/heading/index.d.ts +0 -6
- package/components/heading/useHeadingLevel.d.ts +0 -7
- package/components/icon/Icon.d.ts +0 -13
- package/components/icon/index.d.ts +0 -4
- package/components/image-block/ImageBlock.d.ts +0 -19
- package/components/image-block/ImageBlock.stories.d.ts +0 -178
- package/components/image-block/ImageCaption.d.ts +0 -19
- package/components/image-block/index.d.ts +0 -1
- package/components/inline-list/InlineList.d.ts +0 -13
- package/components/inline-list/InlineList.stories.d.ts +0 -53
- package/components/inline-list/index.d.ts +0 -3
- package/components/input-helper/InputHelper.d.ts +0 -13
- package/components/input-helper/index.d.ts +0 -3
- package/components/input-label/InputLabel.d.ts +0 -13
- package/components/input-label/index.d.ts +0 -3
- package/components/lightbox/Lightbox.d.ts +0 -28
- package/components/lightbox/Lightbox.stories.d.ts +0 -27
- package/components/lightbox/index.d.ts +0 -1
- package/components/link/Link.d.ts +0 -20
- package/components/link/Link.stories.d.ts +0 -268
- package/components/link/index.d.ts +0 -3
- package/components/link-preview/LinkPreview.d.ts +0 -20
- package/components/link-preview/LinkPreview.stories.d.ts +0 -55
- package/components/link-preview/index.d.ts +0 -3
- package/components/list/List.d.ts +0 -13
- package/components/list/List.stories.d.ts +0 -24
- package/components/list/ListDivider.d.ts +0 -13
- package/components/list/ListDivider.stories.d.ts +0 -7
- package/components/list/ListItem.d.ts +0 -26
- package/components/list/ListItem.stories.d.ts +0 -80
- package/components/list/ListItemAction.d.ts +0 -31
- package/components/list/ListSection.d.ts +0 -13
- package/components/list/ListSection.stories.d.ts +0 -112
- package/components/list/index.d.ts +0 -5
- package/components/menu-button/MenuButton.d.ts +0 -52
- package/components/menu-button/MenuButton.stories.d.ts +0 -46
- package/components/menu-button/MenuButton.test.d.ts +0 -1
- package/components/menu-button/MenuButton.test.stories.d.ts +0 -26
- package/components/menu-button/MenuItem.d.ts +0 -44
- package/components/menu-button/MenuItem.test.d.ts +0 -1
- package/components/menu-button/MenuList.d.ts +0 -15
- package/components/menu-button/MenuPopover.d.ts +0 -15
- package/components/menu-button/MenuProvider.d.ts +0 -15
- package/components/menu-button/MenuTrigger.d.ts +0 -15
- package/components/menu-button/Stories/WithLinkItems.vue.d.ts +0 -8
- package/components/menu-button/context.d.ts +0 -13
- package/components/menu-button/index.d.ts +0 -3
- package/components/menu-button/useMenuEvent.d.ts +0 -3
- package/components/menu-button/useMenuOpen.d.ts +0 -2
- package/components/message/Message.d.ts +0 -25
- package/components/message/index.d.ts +0 -3
- package/components/mosaic/Mosaic.d.ts +0 -30
- package/components/mosaic/Mosaic.stories.d.ts +0 -93
- package/components/mosaic/index.d.ts +0 -1
- package/components/popover/Popover.d.ts +0 -47
- package/components/popover/Popover.stories.d.ts +0 -138
- package/components/popover/Popover.test.stories.d.ts +0 -26
- package/components/popover/index.d.ts +0 -3
- package/components/popover/usePopoverStyle.d.ts +0 -31
- package/components/popover-dialog/PopoverDialog.d.ts +0 -27
- package/components/popover-dialog/PopoverDialog.stories.d.ts +0 -32
- package/components/popover-dialog/PopoverDialog.test.stories.d.ts +0 -99
- package/components/popover-dialog/index.d.ts +0 -1
- package/components/progress/ProgressCircular.d.ts +0 -9
- package/components/progress/ProgressCircular.stories.d.ts +0 -22
- package/components/progress/ProgressLinear.d.ts +0 -8
- package/components/progress/index.d.ts +0 -4
- package/components/radio-button/RadioButton.d.ts +0 -21
- package/components/radio-button/RadioGroup.d.ts +0 -15
- package/components/radio-button/index.d.ts +0 -4
- package/components/select-button/SelectButton.d.ts +0 -176
- package/components/select-button/SelectButton.stories.d.ts +0 -126
- package/components/select-button/SelectButton.test.d.ts +0 -1
- package/components/select-button/SelectButton.test.stories.d.ts +0 -41
- package/components/select-button/Stories/CustomRender.vue.d.ts +0 -2
- package/components/select-button/Stories/WithInfiniteScroll.vue.d.ts +0 -2
- package/components/select-button/index.d.ts +0 -13
- package/components/select-text-field/SelectTextField.d.ts +0 -133
- package/components/select-text-field/SelectTextField.stories.d.ts +0 -203
- package/components/select-text-field/SelectTextField.test.d.ts +0 -1
- package/components/select-text-field/SelectTextField.test.stories.d.ts +0 -37
- package/components/select-text-field/Stories/CustomRender.vue.d.ts +0 -2
- package/components/select-text-field/Stories/MultipleWithSearch.vue.d.ts +0 -2
- package/components/select-text-field/Stories/WithCreatableOptions.vue.d.ts +0 -2
- package/components/select-text-field/Stories/WithInfiniteScroll.vue.d.ts +0 -2
- package/components/select-text-field/Stories/WithSearch.vue.d.ts +0 -2
- package/components/select-text-field/index.d.ts +0 -36
- package/components/skeleton/SkeletonCircle.d.ts +0 -14
- package/components/skeleton/SkeletonRectangle.d.ts +0 -14
- package/components/skeleton/SkeletonTypography.d.ts +0 -14
- package/components/skeleton/index.d.ts +0 -10
- package/components/switch/Switch.d.ts +0 -21
- package/components/switch/index.d.ts +0 -2
- package/components/table/Table.d.ts +0 -7
- package/components/table/TableBody.d.ts +0 -7
- package/components/table/TableCell.d.ts +0 -16
- package/components/table/TableHeader.d.ts +0 -7
- package/components/table/TableRow.d.ts +0 -13
- package/components/table/index.d.ts +0 -10
- package/components/tabs/Tab.d.ts +0 -26
- package/components/tabs/TabList.d.ts +0 -21
- package/components/tabs/TabPanel.d.ts +0 -16
- package/components/tabs/TabProvider.d.ts +0 -26
- package/components/tabs/TabProvider.stories.d.ts +0 -53
- package/components/tabs/TabProvider.test.d.ts +0 -1
- package/components/tabs/index.d.ts +0 -4
- package/components/tabs/state.d.ts +0 -19
- package/components/text/Text.d.ts +0 -13
- package/components/text/index.d.ts +0 -3
- package/components/text-field/RawInputText.d.ts +0 -30
- package/components/text-field/RawInputText.stories.d.ts +0 -13
- package/components/text-field/RawInputTextarea.d.ts +0 -30
- package/components/text-field/RawInputTextarea.stories.d.ts +0 -18
- package/components/text-field/Stories/WithChips.vue.d.ts +0 -2
- package/components/text-field/TextField.d.ts +0 -75
- package/components/text-field/TextField.stories.d.ts +0 -101
- package/components/text-field/index.d.ts +0 -3
- package/components/text-field/useFitRowsToContent.d.ts +0 -5
- package/components/thumbnail/Stories/ThumbnailClickable.vue.d.ts +0 -20
- package/components/thumbnail/Thumbnail.d.ts +0 -35
- package/components/thumbnail/Thumbnail.stories.d.ts +0 -169
- package/components/thumbnail/index.d.ts +0 -4
- package/components/thumbnail/useFocusPointStyle.d.ts +0 -20
- package/components/thumbnail/useImageLoad.d.ts +0 -10
- package/components/time-picker-field/TimePickerField.d.ts +0 -45
- package/components/time-picker-field/TimePickerField.stories.d.ts +0 -54
- package/components/time-picker-field/TimePickerField.test.d.ts +0 -1
- package/components/time-picker-field/index.d.ts +0 -2
- package/components/toolbar/Toolbar.d.ts +0 -8
- package/components/toolbar/Toolbar.stories.d.ts +0 -19
- package/components/toolbar/index.d.ts +0 -3
- package/components/tooltip/Tooltip.d.ts +0 -15
- package/components/tooltip/Tooltip.stories.d.ts +0 -51
- package/components/tooltip/Tooltip.test.stories.d.ts +0 -63
- package/components/tooltip/context.d.ts +0 -13
- package/components/tooltip/index.d.ts +0 -1
- package/components/tooltip/useInjectTooltipRef.d.ts +0 -22
- package/components/tooltip/useTooltipOpen.d.ts +0 -14
- package/components/uploader/Uploader.d.ts +0 -38
- package/components/uploader/index.d.ts +0 -2
- package/components/user-block/UserBlock.d.ts +0 -39
- package/components/user-block/UserBlock.stories.d.ts +0 -151
- package/components/user-block/index.d.ts +0 -1
- package/composables/useAttrFallback.d.ts +0 -28
- package/composables/useCallbackOnEscape.d.ts +0 -13
- package/composables/useClassName.d.ts +0 -16
- package/composables/useDisableBodyScroll.d.ts +0 -8
- package/composables/useDisableStateProps.d.ts +0 -16
- package/composables/useDisabledState.d.ts +0 -3
- package/composables/useFocus.d.ts +0 -9
- package/composables/useFocusTrap.d.ts +0 -13
- package/composables/useHasEventListener.d.ts +0 -7
- package/composables/useId.d.ts +0 -7
- package/composables/useOverflowTooltipLabel.d.ts +0 -7
- package/composables/useRestoreFocusOnClose.d.ts +0 -15
- package/composables/useRovingTabIndexContainer.d.ts +0 -32
- package/composables/useSlot.d.ts +0 -6
- package/composables/useTheme.d.ts +0 -1
- package/composables/useTransitionVisibility.d.ts +0 -11
- package/composables/useWatchDisposable.d.ts +0 -19
- package/index.js.map +0 -1
- package/stories/decorators/withChromaticForceScreenSize.d.ts +0 -2
- package/stories/decorators/withCombinations.d.ts +0 -6
- package/stories/decorators/withNestedProps.d.ts +0 -10
- package/stories/decorators/withResizableBox.d.ts +0 -12
- package/stories/decorators/withThemedBackground.d.ts +0 -12
- package/stories/decorators/withTheming.d.ts +0 -26
- package/stories/decorators/withValueOnChange.d.ts +0 -12
- package/stories/decorators/withWrapper.d.ts +0 -10
- package/stories/utils/CustomLink.vue.d.ts +0 -29
- package/stories/utils/useAttrsWithoutHandlers.d.ts +0 -27
- package/stories/utils/withRender.d.ts +0 -54
- package/utils/ClickAway/ClickAwayProvider.d.ts +0 -21
- package/utils/ClickAway/ClickAwayProvider.stories.d.ts +0 -25
- package/utils/ClickAway/index.d.ts +0 -2
- package/utils/ClickAway/useClickAway.d.ts +0 -18
- package/utils/InfiniteScroll/InfiniteScroll.d.ts +0 -7
- package/utils/InfiniteScroll/InfiniteScroll.test.stories.d.ts +0 -39
- package/utils/InfiniteScroll/index.d.ts +0 -1
- package/utils/Portal/Portal.d.ts +0 -7
- package/utils/Portal/PortalProvider.d.ts +0 -9
- package/utils/Portal/PortalProvider.stories.d.ts +0 -19
- package/utils/Portal/index.d.ts +0 -2
- package/utils/VueToJSX.d.ts +0 -40
- package/utils/action-area/ActionArea.stories.d.ts +0 -28
- package/utils/index.js.map +0 -1
- package/utils/isComponentType.d.ts +0 -6
- package/utils/theme/ResetTheme.d.ts +0 -3
- package/utils/theme/ThemeProvider.d.ts +0 -10
- package/utils/theme/index.d.ts +0 -3
- package/utils/theme/useTheme.d.ts +0 -10
- package/utils/wrapChildrenIconWithSpaces.d.ts +0 -3
package/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../lumx-core/src/js/constants/components/index.ts","../../lumx-core/src/js/constants/enums/index.ts","../../lumx-core/src/js/constants/browser/index.ts","../../../node_modules/classnames/index.js","../../lumx-core/src/js/utils/classNames/bem/modifier.ts","../../lumx-core/src/js/utils/classNames/bem/block.ts","../../lumx-core/src/js/utils/classNames/action-area/index.ts","../../lumx-core/src/js/utils/_internal/color/resolveColorWithVariants.ts","../../lumx-core/src/js/utils/classNames/color/index.ts","../../lumx-core/src/js/utils/classNames/typography/index.ts","../../lumx-core/src/js/utils/classNames/spacing/index.ts","../../lumx-core/src/js/utils/classNames/visually-hidden/index.ts","../../lumx-core/src/js/utils/classNames/bem/element.ts","../../lumx-core/src/js/utils/classNames/bem/index.ts","../../lumx-core/src/js/utils/events/keyboard.ts","../../lumx-core/src/js/utils/selectors/getWithSelector.ts","../../lumx-core/src/js/utils/selectors/groupBySelector.ts","../../lumx-core/src/js/components/AlertDialog/index.tsx","../src/composables/useId.ts","../src/composables/useAttrFallback.ts","../src/composables/useClassName.ts","../../../node_modules/@vueuse/shared/dist/index.js","../../../node_modules/@vueuse/core/dist/index.js","../../lumx-core/src/js/components/Dialog/index.tsx","../../lumx-core/src/js/components/Heading/constants.ts","../../lumx-core/src/js/components/Heading/utils.ts","../src/components/heading/context.ts","../src/components/heading/useHeadingLevel.ts","../src/components/heading/HeadingLevelProvider.tsx","../../lumx-core/src/js/components/ProgressCircular/index.tsx","../src/components/progress/ProgressCircular.tsx","../../../node_modules/lodash/last.js","../../../node_modules/lodash/identity.js","../../../node_modules/lodash/_apply.js","../../../node_modules/lodash/_overRest.js","../../../node_modules/lodash/constant.js","../../../node_modules/lodash/_freeGlobal.js","../../../node_modules/lodash/_root.js","../../../node_modules/lodash/_Symbol.js","../../../node_modules/lodash/_getRawTag.js","../../../node_modules/lodash/_objectToString.js","../../../node_modules/lodash/_baseGetTag.js","../../../node_modules/lodash/isObject.js","../../../node_modules/lodash/isFunction.js","../../../node_modules/lodash/_coreJsData.js","../../../node_modules/lodash/_isMasked.js","../../../node_modules/lodash/_toSource.js","../../../node_modules/lodash/_baseIsNative.js","../../../node_modules/lodash/_getValue.js","../../../node_modules/lodash/_getNative.js","../../../node_modules/lodash/_defineProperty.js","../../../node_modules/lodash/_baseSetToString.js","../../../node_modules/lodash/_shortOut.js","../../../node_modules/lodash/_setToString.js","../../../node_modules/lodash/_baseRest.js","../../../node_modules/lodash/_arrayMap.js","../../../node_modules/lodash/_baseFindIndex.js","../../../node_modules/lodash/_baseIsNaN.js","../../../node_modules/lodash/_strictIndexOf.js","../../../node_modules/lodash/_baseIndexOf.js","../../../node_modules/lodash/_baseIndexOfWith.js","../../../node_modules/lodash/_baseUnary.js","../../../node_modules/lodash/_copyArray.js","../../../node_modules/lodash/_basePullAll.js","../../../node_modules/lodash/pullAll.js","../../../node_modules/lodash/pull.js","../../lumx-core/src/js/utils/function/listenerTower.ts","../src/composables/useCallbackOnEscape.ts","../../lumx-core/src/js/utils/focus/constants.ts","../../lumx-core/src/js/utils/focus/getFocusableElements.ts","../../lumx-core/src/js/utils/focus/getFirstAndLastFocusable.ts","../../lumx-core/src/js/utils/focus/setupFocusTrap.ts","../src/composables/useFocusTrap.ts","../src/composables/useRestoreFocusOnClose.ts","../src/composables/useTransitionVisibility.ts","../src/composables/useDisableBodyScroll.ts","../src/components/dialog/Dialog.tsx","../../../node_modules/lodash/_isPrototype.js","../../../node_modules/lodash/_overArg.js","../../../node_modules/lodash/_nativeKeys.js","../../../node_modules/lodash/_baseKeys.js","../../../node_modules/lodash/_DataView.js","../../../node_modules/lodash/_Map.js","../../../node_modules/lodash/_Promise.js","../../../node_modules/lodash/_Set.js","../../../node_modules/lodash/_WeakMap.js","../../../node_modules/lodash/_getTag.js","../../../node_modules/lodash/isObjectLike.js","../../../node_modules/lodash/_baseIsArguments.js","../../../node_modules/lodash/isArguments.js","../../../node_modules/lodash/isArray.js","../../../node_modules/lodash/isLength.js","../../../node_modules/lodash/isArrayLike.js","../../../node_modules/lodash/stubFalse.js","../../../node_modules/lodash/isBuffer.js","../../../node_modules/lodash/_baseIsTypedArray.js","../../../node_modules/lodash/_nodeUtil.js","../../../node_modules/lodash/isTypedArray.js","../../../node_modules/lodash/isEmpty.js","../../lumx-core/src/js/components/RawClickable/index.tsx","../../lumx-core/src/js/components/Button/ButtonRoot.tsx","../../lumx-core/src/js/components/Button/Button.tsx","../src/composables/useDisabledState.ts","../src/composables/useDisableStateProps.ts","../src/utils/theme/ResetTheme.ts","../../lumx-core/src/js/components/Icon/index.tsx","../src/components/icon/Icon.tsx","../../lumx-core/src/js/components/Text/index.tsx","../src/components/tooltip/context.ts","../src/composables/useOverflowTooltipLabel.ts","../src/composables/useSlot.ts","../src/utils/wrapChildrenIconWithSpaces.ts","../src/components/text/Text.tsx","../src/components/button/Button.tsx","../../lumx-core/src/js/components/Toolbar/index.tsx","../src/components/toolbar/Toolbar.tsx","../src/components/alert-dialog/AlertDialog.tsx","../../lumx-core/src/js/components/Avatar/index.tsx","../../lumx-core/src/js/components/Thumbnail/utils.ts","../../lumx-core/src/js/components/Thumbnail/index.tsx","../src/composables/useHasEventListener.ts","../src/components/thumbnail/useImageLoad.ts","../src/components/thumbnail/useFocusPointStyle.ts","../src/components/thumbnail/Thumbnail.tsx","../../lumx-core/src/js/components/Thumbnail/types.ts","../src/components/avatar/Avatar.tsx","../../lumx-core/src/js/components/Combobox/ComboboxButton.tsx","../../lumx-core/src/js/components/Combobox/utils.ts","../../lumx-core/src/js/utils/focusNavigation/createPendingNavigation.ts","../../lumx-core/src/js/utils/browser/createSelectorTreeWalker.ts","../../lumx-core/src/js/utils/focusNavigation/createListFocusNavigation.ts","../../lumx-core/src/js/utils/focusNavigation/createActiveItemState.ts","../../lumx-core/src/js/utils/browser/lastDescendant.ts","../../lumx-core/src/js/utils/iterable/first.ts","../../lumx-core/src/js/utils/focusNavigation/createGridFocusNavigation.ts","../../lumx-core/src/js/utils/browser/querySelectorInclusive.ts","../../lumx-core/src/js/utils/browser/trackContainerFocus.ts","../../lumx-core/src/js/utils/focusNavigation/setupRovingTabIndex.ts","../../lumx-core/src/js/components/Combobox/setupListbox.ts","../../lumx-core/src/js/components/Combobox/setupCombobox.ts","../../lumx-core/src/js/utils/typeahead/index.ts","../../lumx-core/src/js/utils/browser/isPrintableKey.ts","../../lumx-core/src/js/components/Combobox/setupComboboxButton.ts","../../lumx-core/src/js/components/Button/IconButton.tsx","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs","../../../node_modules/@floating-ui/core/dist/floating-ui.core.mjs","../../../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs","../../../node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs","../../../node_modules/@floating-ui/vue/dist/floating-ui.vue.mjs","../../lumx-core/src/js/components/Tooltip/constants.ts","../../lumx-core/src/js/components/Tooltip/index.tsx","../../lumx-core/src/js/utils/browser/isFocusVisible.ts","../../lumx-core/src/js/utils/browser/isHoverNotSupported.ts","../../lumx-core/src/js/components/Tooltip/tooltipOpenManager.ts","../src/components/tooltip/useTooltipOpen.ts","../src/components/tooltip/useInjectTooltipRef.ts","../src/components/tooltip/Tooltip.tsx","../src/components/button/IconButton.tsx","../../lumx-core/src/js/components/Button/ButtonGroup.tsx","../src/components/button/ButtonGroup.tsx","../src/components/combobox/context/ComboboxContext.ts","../src/composables/useWatchDisposable.ts","../src/components/combobox/context/useComboboxEvent.ts","../src/components/combobox/context/useComboboxOpen.ts","../src/components/combobox/ComboboxButton.tsx","../../lumx-core/src/js/utils/disabledState/index.ts","../../lumx-core/src/js/components/Combobox/ComboboxInput.tsx","../../lumx-core/src/js/components/Combobox/setupComboboxInput.ts","../../lumx-core/src/js/components/TextField/constants.ts","../../lumx-core/src/js/components/TextField/RawInputText.tsx","../src/components/text-field/RawInputText.tsx","../../lumx-core/src/js/components/TextField/RawInputTextarea.tsx","../src/components/text-field/useFitRowsToContent.ts","../src/components/text-field/RawInputTextarea.tsx","../../lumx-core/src/js/components/InputLabel/index.tsx","../../lumx-core/src/js/components/InputHelper/constants.ts","../../lumx-core/src/js/components/InputHelper/index.tsx","../../lumx-core/src/js/components/TextField/TextField.tsx","../src/components/text-field/TextField.tsx","../src/components/combobox/ComboboxInput.tsx","../../lumx-core/src/js/components/List/index.tsx","../../lumx-core/src/js/components/Combobox/ComboboxList.tsx","../src/components/combobox/context/ComboboxListContext.ts","../src/components/combobox/ComboboxList.tsx","../../lumx-core/src/js/components/List/ListItem.tsx","../../lumx-core/src/js/components/List/ListItemAction.tsx","../../lumx-core/src/js/components/Combobox/ComboboxOption.tsx","../src/components/combobox/context/ComboboxOptionContext.ts","../src/components/combobox/ComboboxOption.tsx","../../lumx-core/src/js/components/Combobox/ComboboxOptionAction.tsx","../src/components/combobox/ComboboxOptionAction.tsx","../../lumx-core/src/js/components/Combobox/ComboboxOptionMoreInfo.tsx","../../lumx-core/src/js/components/Popover/constants.ts","../../lumx-core/src/js/components/Popover/index.tsx","../../lumx-core/src/js/components/Popover/utils/parseAutoPlacement.ts","../../lumx-core/src/js/components/Popover/utils/parseFitWidth.ts","../../lumx-core/src/js/utils/browser/css/resolveCssSize.ts","../../lumx-core/src/js/utils/browser/css/combineSize.ts","../../lumx-core/src/js/components/Popover/utils/buildPopoverMiddleware.ts","../../lumx-core/src/js/components/Popover/utils/computeArrowStyles.ts","../../lumx-core/src/js/components/Popover/utils/getFloatingPlacement.ts","../src/components/popover/usePopoverStyle.ts","../src/composables/useFocus.ts","../src/components/popover/Popover.tsx","../src/components/combobox/ComboboxOptionMoreInfo.tsx","../../lumx-core/src/js/components/Skeleton/SkeletonTypography.tsx","../../lumx-core/src/js/components/Combobox/ComboboxOptionSkeleton.tsx","../src/components/combobox/ComboboxOptionSkeleton.tsx","../../lumx-core/src/js/components/Combobox/constants.ts","../../lumx-core/src/js/components/Combobox/ComboboxPopover.tsx","../../../node_modules/lodash/castArray.js","../../lumx-core/src/js/components/FlexBox/index.tsx","../src/components/flex-box/FlexBox.tsx","../src/components/combobox/ComboboxPopover.tsx","../src/components/combobox/ComboboxProvider.tsx","../../lumx-core/src/js/components/Combobox/ComboboxSection.tsx","../src/components/list/List.tsx","../../lumx-core/src/js/components/List/ListDivider.tsx","../src/components/list/ListDivider.tsx","../src/components/list/ListItemAction.tsx","../src/components/list/ListItem.tsx","../../lumx-core/src/js/components/List/ListSection.tsx","../src/components/list/ListSection.tsx","../src/components/combobox/ComboboxSection.tsx","../../lumx-core/src/js/components/Combobox/ComboboxState.tsx","../../lumx-core/src/js/components/Combobox/subscribeComboboxState.ts","../../lumx-core/src/js/components/GenericBlock/index.tsx","../src/components/generic-block/GenericBlock.tsx","../../../node_modules/lodash/isSymbol.js","../../../node_modules/lodash/_isKey.js","../../../node_modules/lodash/_nativeCreate.js","../../../node_modules/lodash/_hashClear.js","../../../node_modules/lodash/_hashDelete.js","../../../node_modules/lodash/_hashGet.js","../../../node_modules/lodash/_hashHas.js","../../../node_modules/lodash/_hashSet.js","../../../node_modules/lodash/_Hash.js","../../../node_modules/lodash/_listCacheClear.js","../../../node_modules/lodash/eq.js","../../../node_modules/lodash/_assocIndexOf.js","../../../node_modules/lodash/_listCacheDelete.js","../../../node_modules/lodash/_listCacheGet.js","../../../node_modules/lodash/_listCacheHas.js","../../../node_modules/lodash/_listCacheSet.js","../../../node_modules/lodash/_ListCache.js","../../../node_modules/lodash/_mapCacheClear.js","../../../node_modules/lodash/_isKeyable.js","../../../node_modules/lodash/_getMapData.js","../../../node_modules/lodash/_mapCacheDelete.js","../../../node_modules/lodash/_mapCacheGet.js","../../../node_modules/lodash/_mapCacheHas.js","../../../node_modules/lodash/_mapCacheSet.js","../../../node_modules/lodash/_MapCache.js","../../../node_modules/lodash/memoize.js","../../../node_modules/lodash/_memoizeCapped.js","../../../node_modules/lodash/_stringToPath.js","../../../node_modules/lodash/_baseToString.js","../../../node_modules/lodash/toString.js","../../../node_modules/lodash/_castPath.js","../../../node_modules/lodash/_toKey.js","../../../node_modules/lodash/_baseGet.js","../../../node_modules/lodash/_baseAssignValue.js","../../../node_modules/lodash/_assignValue.js","../../../node_modules/lodash/_isIndex.js","../../../node_modules/lodash/_baseSet.js","../../../node_modules/lodash/_basePickBy.js","../../../node_modules/lodash/_baseHasIn.js","../../../node_modules/lodash/_hasPath.js","../../../node_modules/lodash/hasIn.js","../../../node_modules/lodash/_basePick.js","../../../node_modules/lodash/_arrayPush.js","../../../node_modules/lodash/_isFlattenable.js","../../../node_modules/lodash/_baseFlatten.js","../../../node_modules/lodash/flatten.js","../../../node_modules/lodash/_flatRest.js","../../../node_modules/lodash/pick.js","../../lumx-core/src/js/components/GenericBlock/constants.ts","../src/components/combobox/ComboboxState.tsx","../src/components/combobox/index.ts","../../lumx-core/src/js/components/Badge/index.tsx","../src/components/badge/Badge.tsx","../../lumx-core/src/js/components/Badge/BadgeWrapper.tsx","../src/components/badge/BadgeWrapper.tsx","../../lumx-core/src/js/components/Checkbox/index.tsx","../src/components/checkbox/Checkbox.tsx","../../lumx-core/src/js/components/Chip/index.tsx","../src/components/chip/Chip.tsx","../../lumx-core/src/js/components/Chip/ChipGroup.tsx","../src/components/chip/ChipGroup.tsx","../../lumx-core/src/js/components/Chip/SelectionChipGroup.tsx","../../lumx-core/src/js/components/Chip/setupSelectionChipGroupEvents.ts","../src/composables/useRovingTabIndexContainer.ts","../src/utils/isComponentType.ts","../src/components/chip/SelectionChipGroup.tsx","../../lumx-core/src/js/components/Lightbox/index.tsx","../src/components/lightbox/Lightbox.tsx","../../lumx-core/src/js/components/Divider/index.tsx","../src/components/divider/Divider.tsx","../../lumx-core/src/js/components/DragHandle/index.tsx","../src/components/drag-handle/DragHandle.tsx","../../lumx-core/src/js/components/ExpansionPanel/index.tsx","../src/components/expansion-panel/ExpansionPanel.tsx","../../lumx-core/src/js/components/Flag/index.tsx","../src/components/flag/Flag.tsx","../../../node_modules/lodash/_trimmedEndIndex.js","../../../node_modules/lodash/_baseTrim.js","../../../node_modules/lodash/toNumber.js","../../../node_modules/lodash/toFinite.js","../../../node_modules/lodash/toInteger.js","../../../node_modules/lodash/isInteger.js","../../lumx-core/src/js/components/GridColumn/GridColumn.tsx","../src/components/grid-column/GridColumn.tsx","../../lumx-core/src/js/components/Heading/index.ts","../src/components/heading/Heading.tsx","../src/components/input-helper/InputHelper.tsx","../src/components/input-label/InputLabel.tsx","../../lumx-core/src/js/components/Link/index.tsx","../src/components/link/Link.tsx","../../lumx-core/src/js/components/LinkPreview/index.tsx","../src/components/link-preview/LinkPreview.tsx","../../lumx-core/src/js/components/Menu/MenuItem.tsx","../src/components/menu-button/context.ts","../src/components/menu-button/MenuItem.tsx","../../lumx-core/src/js/components/Menu/MenuButton.tsx","../../lumx-core/src/js/components/Menu/utils.ts","../../lumx-core/src/js/components/Menu/setupMenu.ts","../src/components/menu-button/MenuProvider.tsx","../../lumx-core/src/js/components/Menu/MenuTrigger.tsx","../src/components/menu-button/useMenuEvent.ts","../src/components/menu-button/useMenuOpen.ts","../src/components/menu-button/MenuTrigger.tsx","../../lumx-core/src/js/components/Menu/MenuPopover.tsx","../src/components/menu-button/MenuPopover.tsx","../../lumx-core/src/js/components/Menu/MenuList.tsx","../src/components/menu-button/MenuList.tsx","../src/components/menu-button/MenuButton.tsx","../../lumx-core/src/js/components/Message/index.tsx","../src/components/message/Message.tsx","../../../node_modules/lodash/_baseSlice.js","../../../node_modules/lodash/take.js","../../lumx-core/src/js/components/Mosaic/index.tsx","../src/components/mosaic/Mosaic.tsx","../../lumx-core/src/js/components/PopoverDialog/index.tsx","../src/components/popover-dialog/PopoverDialog.tsx","../../lumx-core/src/js/components/ProgressLinear/index.tsx","../src/components/progress/ProgressLinear.tsx","../../lumx-core/src/js/components/RadioButton/index.tsx","../src/components/radio-button/RadioButton.tsx","../../lumx-core/src/js/components/RadioGroup/index.tsx","../src/components/radio-button/RadioGroup.tsx","../../lumx-core/src/js/components/Skeleton/SkeletonCircle.tsx","../../lumx-core/src/js/components/Skeleton/SkeletonRectangle.tsx","../src/components/skeleton/SkeletonCircle.tsx","../src/components/skeleton/SkeletonRectangle.tsx","../src/components/skeleton/SkeletonTypography.tsx","../../lumx-core/src/js/components/Switch/index.tsx","../src/components/switch/Switch.tsx","../../lumx-core/src/js/components/Uploader/index.tsx","../src/components/uploader/Uploader.tsx","../../lumx-core/src/js/components/ImageBlock/index.tsx","../../lumx-core/src/js/components/ImageBlock/ImageCaption.tsx","../src/components/image-block/ImageCaption.tsx","../src/components/image-block/ImageBlock.tsx","../../lumx-core/src/js/components/InlineList/index.tsx","../src/components/inline-list/InlineList.tsx","../../lumx-core/src/js/components/Table/constants.ts","../../lumx-core/src/js/components/Table/index.tsx","../src/components/table/Table.tsx","../../lumx-core/src/js/components/Table/TableBody.tsx","../src/components/table/TableBody.tsx","../../lumx-core/src/js/components/Table/TableCell.tsx","../src/components/table/TableCell.tsx","../../lumx-core/src/js/components/Table/TableHeader.tsx","../src/components/table/TableHeader.tsx","../../lumx-core/src/js/components/Table/TableRow.tsx","../src/components/table/TableRow.tsx","../../lumx-core/src/js/components/Tabs/constants.ts","../../lumx-core/src/js/components/Tabs/Tab.tsx","../../lumx-core/src/js/components/Tabs/state.ts","../src/components/tabs/state.ts","../src/components/tabs/Tab.tsx","../../lumx-core/src/js/components/Tabs/TabList.tsx","../src/components/tabs/TabList.tsx","../../lumx-core/src/js/components/Tabs/TabPanel.tsx","../src/components/tabs/TabPanel.tsx","../src/components/tabs/TabProvider.tsx","../../../node_modules/lodash/set.js","../../lumx-core/src/js/components/UserBlock/index.tsx","../src/components/user-block/UserBlock.tsx","../../lumx-core/src/js/utils/select/findOptionById.ts","../../lumx-core/src/js/utils/select/toggleSelection.ts","../../lumx-core/src/js/utils/select/getOptionDisplayName.ts","../../lumx-core/src/js/utils/select/renderSelectOptions.tsx","../../lumx-core/src/js/components/SelectButton/index.tsx","../src/components/combobox/useWrappedRenderOptionSlot.tsx","../src/components/combobox/useWrappedRenderSectionTitleSlot.tsx","../src/components/select-button/SelectButton.tsx","../src/components/select-button/index.ts","../../lumx-core/src/js/components/SelectTextField/index.tsx","../src/components/select-text-field/SelectTextField.tsx","../src/components/select-text-field/index.ts","../../lumx-core/src/js/components/TimePickerField/index.tsx","../../lumx-core/src/js/utils/time/formatTime.ts","../../lumx-core/src/js/utils/time/getDateAtTime.ts","../../lumx-core/src/js/utils/time/timeOfDayMinutes.ts","../../lumx-core/src/js/utils/time/buildTimeList.ts","../../lumx-core/src/js/utils/time/parseTimeInput.ts","../../lumx-core/src/js/utils/time/snapTimeToBounds.ts","../../lumx-core/src/js/utils/time/isDateOnTime.ts","../../lumx-core/src/js/utils/locale/getCurrentLocale.ts","../src/components/time-picker-field/TimePickerField.tsx"],"sourcesContent":["/**\n * Animation duration constants. Take into consideration that if you change one of these variables,\n * you need to update their scss counterpart as well\n */\nexport const DIALOG_TRANSITION_DURATION = 400;\nexport const EXPANSION_PANEL_TRANSITION_DURATION = 400;\nexport const NOTIFICATION_TRANSITION_DURATION = 200;\nexport const SLIDESHOW_TRANSITION_DURATION = 5000;\n\n/**\n * Delay on hover after which we open or close the tooltip.\n * Only applies to devices supporting pointer hover.\n */\nexport const TOOLTIP_HOVER_DELAY = {\n open: 500,\n close: 500,\n};\n\n/**\n * Delay on long press after which we open or close the tooltip.\n * Only applies to devices not supporting pointer hover.\n */\nexport const TOOLTIP_LONG_PRESS_DELAY = {\n open: 250,\n close: 3000,\n};\n","import type { ValueOf } from '@lumx/core/js/types';\n\n/**\n * Alignments.\n */\nexport const Alignment = {\n bottom: 'bottom',\n center: 'center',\n end: 'end',\n left: 'left',\n right: 'right',\n spaceAround: 'space-around',\n spaceBetween: 'space-between',\n spaceEvenly: 'space-evenly',\n start: 'start',\n top: 'top',\n} as const;\nexport type Alignment = ValueOf<typeof Alignment>;\nexport type VerticalAlignment = Extract<Alignment, 'top' | 'center' | 'bottom'>;\nexport type HorizontalAlignment = Extract<Alignment, 'right' | 'center' | 'left'>;\n\nexport const Theme = {\n light: 'light',\n dark: 'dark',\n} as const;\nexport type Theme = ValueOf<typeof Theme>;\n\nexport const Size = {\n xxs: 'xxs',\n xs: 'xs',\n s: 's',\n m: 'm',\n l: 'l',\n xl: 'xl',\n xxl: 'xxl',\n tiny: 'tiny',\n regular: 'regular',\n medium: 'medium',\n big: 'big',\n huge: 'huge',\n} as const;\nexport type Size = ValueOf<typeof Size>;\nexport type GlobalSize = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;\nexport type AbstractSize = Extract<Size, 'tiny' | 'regular' | 'medium' | 'big' | 'huge'>;\n\nexport const Orientation = {\n horizontal: 'horizontal',\n vertical: 'vertical',\n} as const;\nexport type Orientation = ValueOf<typeof Orientation>;\n\nexport const Emphasis = {\n low: 'low',\n medium: 'medium',\n high: 'high',\n} as const;\nexport type Emphasis = ValueOf<typeof Emphasis>;\n\n/**\n * List of typographies that can't be customized.\n */\nexport const TypographyInterface = {\n overline: 'overline',\n caption: 'caption',\n body1: 'body1',\n body2: 'body2',\n subtitle1: 'subtitle1',\n subtitle2: 'subtitle2',\n title: 'title',\n headline: 'headline',\n display1: 'display1',\n} as const;\nexport type TypographyInterface = ValueOf<typeof TypographyInterface>;\n\n/**\n * List of title typographies that can be customized (via CSS variables).\n */\nexport const TypographyTitleCustom = {\n title1: 'custom-title1',\n title2: 'custom-title2',\n title3: 'custom-title3',\n title4: 'custom-title4',\n title5: 'custom-title5',\n title6: 'custom-title6',\n} as const;\nexport type TypographyTitleCustom = ValueOf<typeof TypographyTitleCustom>;\n\n/**\n * List of typographies that can be customized (via CSS variables).\n */\nexport const TypographyCustom = {\n ...TypographyTitleCustom,\n intro: 'custom-intro',\n 'body-large': 'custom-body-large',\n body: 'custom-body',\n quote: 'custom-quote',\n 'publish-info': 'custom-publish-info',\n button: 'custom-button',\n} as const;\nexport type TypographyCustom = ValueOf<typeof TypographyCustom>;\n\n/**\n * List of all typographies.\n */\nexport const Typography = {\n ...TypographyInterface,\n custom: TypographyCustom,\n} as const;\nexport type Typography = TypographyInterface | TypographyCustom;\n\n/**\n * All available aspect ratios.\n */\nexport const AspectRatio = {\n /** Intrinsic content ratio. */\n original: 'original',\n /** Ratio 3:1 */\n panoramic: 'panoramic',\n /** Ratio 16:9 */\n wide: 'wide',\n /** Ratio 3:2 */\n horizontal: 'horizontal',\n /** Ratio 3:2 */\n vertical: 'vertical',\n /** Ratio 1:1 */\n square: 'square',\n /** Ratio constrained by the parent. */\n free: 'free',\n} as const;\nexport type AspectRatio = ValueOf<typeof AspectRatio>;\n\n/**\n * Semantic info about the purpose of the component\n */\nexport const Kind = {\n info: 'info',\n success: 'success',\n warning: 'warning',\n error: 'error',\n} as const;\nexport type Kind = ValueOf<typeof Kind>;\n\n/**\n * All available white-space values\n * */\nexport const WhiteSpace = {\n normal: 'normal',\n nowrap: 'nowrap',\n pre: 'pre',\n 'pre-wrap': 'pre-wrap',\n 'pre-line': 'pre-line',\n 'break-spaces': 'break-spaces',\n};\nexport type WhiteSpace = ValueOf<typeof WhiteSpace>;\n\n/**\n * See SCSS variable $lumx-color-palette\n */\nexport const ColorPalette = {\n primary: 'primary',\n secondary: 'secondary',\n blue: 'blue',\n dark: 'dark',\n green: 'green',\n yellow: 'yellow',\n red: 'red',\n light: 'light',\n grey: 'grey',\n} as const;\nexport type ColorPalette = ValueOf<typeof ColorPalette>;\nexport type Color = ColorPalette | string;\n\n/**\n * See SCSS variable $lumx-color-variants\n */\nexport const ColorVariant = {\n D1: 'D1',\n D2: 'D2',\n L1: 'L1',\n L2: 'L2',\n L3: 'L3',\n L4: 'L4',\n L5: 'L5',\n L6: 'L6',\n N: 'N',\n} as const;\nexport type ColorVariant = ValueOf<typeof ColorVariant>;\n\n/** ColorPalette with all possible color variant combination */\nexport type ColorWithVariants =\n | ColorPalette\n | Exclude<\n `${ColorPalette}-${ColorVariant}`,\n // No dark variant for light and dark\n `light-D${number}` | `dark-D${number}`\n >;\n\nexport const REAL_SIZE_FOR_LUMX_SIZE = {\n [Size.xxs]: 14,\n [Size.xs]: 20,\n [Size.s]: 24,\n [Size.m]: 36,\n [Size.l]: 64,\n [Size.xl]: 128,\n [Size.xxl]: 256,\n};\n","/**\n * Check if we are running in a true browser (not SSR and not jsdom test environment).\n */\nexport const IS_BROWSER = typeof window !== 'undefined' && !window.navigator.userAgent.includes('jsdom');\n\n/**\n * Optional global `window` instance (not defined when running SSR).\n */\nexport const WINDOW = typeof window !== 'undefined' ? window : undefined;\n\n/**\n * Optional global `document` instance (not defined when running SSR).\n */\nexport const DOCUMENT = typeof document !== 'undefined' ? document : undefined;\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import type { Modifier } from './types';\n\n/**\n * Generates BEM modifier class names.\n *\n * @param baseName The base BEM class to attach modifiers to.\n * @param modifiers Map of modifier names to boolean values.\n * @returns Combined modifier class names string.\n *\n * @example\n * modifier('button', { active: true }); // 'button--active'\n * modifier('button', { active: true, disabled: false }); // 'button--active'\n */\nexport function modifier(baseName: string, modifiers: Modifier) {\n const modifierClasses = [];\n for (const [key, value] of Object.entries(modifiers)) {\n if (value) modifierClasses.push(`${baseName}--${key}`);\n }\n return modifierClasses.join(' ');\n}\n","import classnames from 'classnames';\nimport { modifier } from './modifier';\nimport type { AdditionalClasses, Modifier } from './types';\n\n/**\n * Generates a BEM block + modifier class name string.\n * Combines a base class with optional modifiers and additional classes.\n *\n * @param baseName The base BEM class\n * @param modifier Optional modifiers\n * @returns Combined class name string\n *\n * @example\n * block('button'); // 'button'\n * block('button', { active: true, disabled: false }); // 'button button--active'\n */\nexport function block(baseName: string, additionalClasses: AdditionalClasses): string;\nexport function block(baseName: string, modifiers?: Modifier, additionalClasses?: AdditionalClasses): string;\nexport function block(\n baseName: string,\n modifiersOrAdditionalClasses?: Modifier | AdditionalClasses,\n additionalClasses?: AdditionalClasses,\n) {\n let modifiers: Modifier | undefined;\n let classes: AdditionalClasses | undefined;\n\n if (typeof modifiersOrAdditionalClasses === 'string' || Array.isArray(modifiersOrAdditionalClasses)) {\n classes = modifiersOrAdditionalClasses;\n } else {\n modifiers = modifiersOrAdditionalClasses;\n classes = additionalClasses;\n }\n\n if (!modifiers && !classes) {\n return baseName;\n }\n\n return classnames(\n // Additional classes\n classes,\n // Base class\n baseName,\n // Modifier(s)\n modifiers ? modifier(baseName, modifiers) : null,\n );\n}\n","import { block } from '../bem/block';\n\nconst PREFIX = 'lumx-action-area';\nconst ACTION_ELEMENT = `${PREFIX}__action`;\n\ntype ActionModifiers = Partial<\n Record<'has-overlay' | 'focus-outset' | 'focus-inset' | 'theme-dark' | 'theme-light', boolean>\n>;\n\n/**\n * Action area CSS utility.\n *\n * Apply `actionArea()` to the container element to make it a positioning context\n * for the action's expanded click area.\n *\n * Apply `actionArea.action()` to the primary interactive element (link or button)\n * whose click area should expand to fill the entire container.\n */\nexport const actionArea = Object.assign(\n /** Action area container class. Sets `position: relative`. */\n () => PREFIX,\n {\n /** Action element class. Adds a `::before` pseudo-element with `position: absolute; inset: 0` to expand the click area. */\n action: (modifiers?: ActionModifiers) => block(ACTION_ELEMENT, modifiers),\n },\n);\n","import type { ColorPalette, ColorVariant, ColorWithVariants } from '@lumx/core/js/constants';\n\n/** Resolve color & color variant from a `ColorWithVariants` and optionally a `ColorVariant`. */\nexport function resolveColorWithVariants(\n colorWithVariants?: ColorWithVariants,\n colorVariant?: ColorVariant,\n): [color?: ColorPalette, colorVariant?: ColorVariant] {\n if (!colorWithVariants) return [undefined, colorVariant];\n const [color, baseColorVariant] = colorWithVariants.split('-');\n return [color as ColorPalette, (colorVariant || baseColorVariant) as ColorVariant];\n}\n","import { ColorVariant, ColorWithVariants } from '@lumx/core/js/constants';\nimport { resolveColorWithVariants } from '@lumx/core/js/utils/_internal/color';\n\n/**\n * Generates a Lumx color class name for the given type, color and variant.\n * This is the base function used by font() and background() utilities.\n *\n * @param type - The color class type ('font' or 'background')\n * @param propColor - The color palette name (e.g., 'primary', 'dark') with optional variant suffix (e.g., 'primary-L2')\n * @param propColorVariant - Optional color variant override (e.g., 'L1', 'L2', 'D1', 'N')\n * @returns The Lumx color class name or undefined if no color is provided\n *\n * @example\n * color('font', 'dark', 'L2'); // 'lumx-color-font-dark-L2'\n * color('background', 'primary'); // 'lumx-color-background-primary-N'\n * color('font', 'primary-L2'); // 'lumx-color-font-primary-L2'\n * color('font', undefined); // undefined\n */\nexport function color(\n type: 'font' | 'background',\n propColor: ColorWithVariants,\n propColorVariant?: ColorVariant,\n): string {\n const [cColor, cColorVariant = ColorVariant.N] = resolveColorWithVariants(propColor, propColorVariant);\n return `lumx-color-${type}-${cColor}-${cColorVariant}`;\n}\n\n/**\n * Generates a Lumx background color class name for the given color and variant.\n *\n * @param propColor - The color palette name (e.g., 'primary', 'dark', 'light')\n * @param propColorVariant - The color variant (e.g., 'L1', 'L2', 'D1', 'N')\n * @returns The Lumx background color class name\n *\n * @example\n * background('dark', 'L2'); // 'lumx-color-background-dark-L2'\n * background('primary', 'N'); // 'lumx-color-background-primary-N'\n */\nexport const background = (propColor: ColorWithVariants, propColorVariant?: ColorVariant) =>\n color('background', propColor, propColorVariant);\n\n/**\n * Generates a Lumx font color class name for the given color and variant.\n *\n * @param propColor - The color palette name (e.g., 'primary', 'dark') with optional variant suffix (e.g., 'primary-L2')\n * @param propColorVariant - Optional color variant override (e.g., 'L1', 'L2', 'D1', 'N')\n * @returns The Lumx font color class name or undefined if no color is provided\n *\n * @example\n * font('dark', 'L2'); // 'lumx-color-font-dark-L2'\n * font('primary-L2'); // 'lumx-color-font-primary-L2'\n * font('primary'); // 'lumx-color-font-primary-N'\n * font(undefined); // undefined\n */\nexport const font = (propColor: ColorWithVariants, propColorVariant?: ColorVariant) =>\n color('font', propColor, propColorVariant);\n","import type { Typography } from '@lumx/core/js/constants';\n\n/**\n * Returns the classname associated to the given typography. For example, for Typography.title it returns\n * lumx-typography-title\n */\nexport function typography(typo: Typography) {\n return `lumx-typography-${typo}`;\n}\n","import classnames from 'classnames';\n\nimport type { Direction, Spacing } from '@lumx/core/js/types';\nimport { Size, type AbstractSize } from '@lumx/core/js/constants';\n\n/** Set of valid AbstractSize values for runtime detection. */\nconst ABSTRACT_SIZES: ReadonlySet<string> = new Set([Size.tiny, Size.regular, Size.medium, Size.big, Size.huge]);\n\nfunction isAbstractSize(value: unknown): value is AbstractSize {\n return typeof value === 'string' && ABSTRACT_SIZES.has(value);\n}\n\n/**\n * Returns a lumx classname for the given type, direction and size. For example, for\n * arguments type='padding', direction='right', size='regular' it returns lumx-spacing-padding-right-regular\n * @param type - margin or padding\n * @param direction - Direction\n * @param size - Size\n * @returns string\n */\nexport function spacing(type: Spacing, size: AbstractSize | null): string;\nexport function spacing(type: Spacing, direction?: Direction, size?: AbstractSize | null): string;\nexport function spacing(\n type: Spacing,\n directionOrSize?: Direction | AbstractSize | null,\n size?: AbstractSize | null,\n): string {\n // Resolve shorthand: spacing(type, size) => spacing(type, undefined, size)\n const isShorthand = isAbstractSize(directionOrSize) || (directionOrSize === null && size === undefined);\n const direction: Direction | undefined = isShorthand ? undefined : directionOrSize ?? undefined;\n const resolvedSize: AbstractSize | null | undefined = isShorthand ? directionOrSize : size;\n\n let baseClass = `lumx-spacing-${type}`;\n\n if (direction && direction !== 'all') {\n baseClass = `${baseClass}-${direction}`;\n }\n\n if (resolvedSize) {\n baseClass = `${baseClass}-${resolvedSize}`;\n } else if (resolvedSize === null) {\n baseClass = `${baseClass}-none`;\n }\n\n return baseClass;\n}\n\n/**\n * Returns a list of lumx classnames for the given types, directions and sizes. For example, for\n * arguments [\n * { type: 'padding', direction: 'right', size: 'regular'},\n * { type: 'margin', direction: 'left', size: 'big'},\n * ]\n * it returns lumx-spacing-padding-right-regular lumx-spacing-margin-left-big\n * @param spacingConfigs - Array of spacing configurations with direction and size\n * @returns string\n */\nexport const spacings = (spacingConfigs: { type: Spacing; direction?: Direction; size?: AbstractSize | null }[]) =>\n classnames(spacingConfigs.map((spa) => spacing(spa.type, spa.direction, spa.size)));\n\n/**\n * Returns a lumx margin classname for the given direction and size. For example, for\n * arguments direction='right', size='regular' it returns lumx-spacing-margin-right-regular\n *\n * Can also be called with just a size: margin('regular') is equivalent to margin('all', 'regular').\n * @param direction - Direction\n * @param size - Size\n * @returns string\n */\nexport function margin(size: AbstractSize | null): string;\nexport function margin(direction?: Direction, size?: AbstractSize | null): string;\nexport function margin(directionOrSize?: Direction | AbstractSize | null, size?: AbstractSize | null): string {\n if (isAbstractSize(directionOrSize) || (directionOrSize === null && size === undefined)) {\n return spacing('margin', directionOrSize);\n }\n return spacing('margin', directionOrSize ?? undefined, size);\n}\n\n/**\n * Returns a list of lumx margin classnames for the given directions and sizes. For example, for\n * arguments [\n * { direction: 'right', size: 'regular'},\n * { direction: 'left', size: 'big'},\n * ]\n * it returns lumx-spacing-margin-right-regular lumx-spacing-margin-left-big\n * @param marginConfigs - Array of padding configurations with direction and size\n * @returns string\n */\nexport const margins = (marginConfigs: { direction?: Direction; size?: AbstractSize | null }[]) =>\n spacings(marginConfigs.map(({ direction, size }) => ({ type: 'margin', direction, size })));\n\n/**\n * Returns a lumx padding classname for the given direction and size. For example, for\n * arguments direction='right', size='regular' it returns lumx-spacing-padding-right-regular\n *\n * Can also be called with just a size: padding('regular') is equivalent to padding('all', 'regular').\n * @param direction - Direction\n * @param size - Size\n * @returns string\n */\nexport function padding(size: AbstractSize | null): string;\nexport function padding(direction?: Direction, size?: AbstractSize | null): string;\nexport function padding(directionOrSize?: Direction | AbstractSize | null, size?: AbstractSize | null): string {\n if (isAbstractSize(directionOrSize) || (directionOrSize === null && size === undefined)) {\n return spacing('padding', directionOrSize);\n }\n return spacing('padding', directionOrSize ?? undefined, size);\n}\n\n/**\n * Returns a list of lumx padding classnames for the given directions and sizes. For example, for\n * arguments [\n * { direction: 'right', size: 'regular'},\n * { direction: 'left', size: 'big'},\n * ]\n * it returns lumx-spacing-padding-right-regular lumx-spacing-padding-left-big\n * @param paddingConfigs - Array of padding configurations with direction and size\n * @returns Combined padding classnames as a string\n */\nexport const paddings = (paddingConfigs: { direction?: Direction; size?: AbstractSize | null }[]) =>\n spacings(paddingConfigs.map(({ direction, size }) => ({ type: 'padding', direction, size })));\n","import { VISUALLY_HIDDEN } from '@lumx/core/js/constants';\n\n/**\n * Visually hidden class name.\n * Used to hide elements from view but keep them readable from screen readers\n */\nexport const visuallyHidden = () => VISUALLY_HIDDEN;\n","import { block } from './block';\nimport type { AdditionalClasses, Modifier } from './types';\n\n/**\n * Creates a BEM element class generator function for the given base class.\n * Returns a function that generates BEM element class names with optional modifiers.\n *\n * @param baseClass The base BEM block class name (e.g., 'button', 'card')\n * @param elem The BEM element name (e.g., 'icon', 'title')\n * @param modifier Optional BEM modifier ()\n * @returns combined BEM element class name\n *\n * @example\n * element('my-button', 'icon'); // 'my-button__icon'\n * element('my-button', 'icon', { active: true }); // 'my-button__icon my-button__icon--active'\n */\nexport function element(baseClass: string, elem: string, additionalClasses: AdditionalClasses): string;\nexport function element(\n baseClass: string,\n elem: string,\n modifiers?: Modifier,\n additionalClasses?: AdditionalClasses,\n): string;\nexport function element(\n baseClass: string,\n elem: string,\n modifiersOrAdditionalClasses?: Modifier | AdditionalClasses,\n additionalClasses?: AdditionalClasses,\n) {\n return block(`${baseClass}__${elem}`, modifiersOrAdditionalClasses as Modifier, additionalClasses);\n}\n","import { block } from './block';\nimport { element } from './element';\nimport { modifier } from './modifier';\nimport type { AdditionalClasses, Modifier } from './types';\n\n/**\n * Setup BEM block & element generation for a given base name.\n */\nexport function bem(baseName: string) {\n function blockFn(additionalClasses: AdditionalClasses): string;\n function blockFn(modifiers?: Modifier, additionalClasses?: AdditionalClasses): string;\n function blockFn(\n modifiersOrAdditionalClasses?: Modifier | AdditionalClasses,\n additionalClasses?: AdditionalClasses,\n ) {\n return block(baseName, modifiersOrAdditionalClasses as Modifier, additionalClasses);\n }\n\n function elementFn(elem: string, additionalClasses: AdditionalClasses): string;\n function elementFn(elem: string, modifiers?: Modifier, additionalClasses?: AdditionalClasses): string;\n function elementFn(\n elem: string,\n modifiersOrAdditionalClasses?: Modifier | AdditionalClasses,\n additionalClasses?: AdditionalClasses,\n ) {\n return element(baseName, elem, modifiersOrAdditionalClasses as Modifier, additionalClasses);\n }\n\n return {\n block: blockFn,\n element: elementFn,\n modifier: (modifiers: Modifier) => modifier(baseName, modifiers),\n };\n}\n\nexport { block, element };\n","type KeyboardEvent = { key: string };\ntype KeyboardEventHandler<E extends KeyboardEvent> = (event: E) => void;\n\n/**\n * Make sure the pressed key is the enter key before calling the callback.\n *\n * @param handler The handler to call on enter/return press.\n * @return The decorated function.\n */\nexport function onEnterPressed<E extends KeyboardEvent>(handler: KeyboardEventHandler<E>): KeyboardEventHandler<E> {\n return (evt) => {\n if (evt.key !== 'Enter') {\n return;\n }\n handler(evt);\n };\n}\n\n/**\n * Make sure the pressed key is the escape key before calling the callback.\n *\n * @param handler The handler to call on enter/return press.\n * @return The decorated function.\n */\nexport function onEscapePressed<E extends KeyboardEvent>(handler: KeyboardEventHandler<E>): KeyboardEventHandler<E> {\n return (evt) => {\n if (evt.key !== 'Escape') {\n return;\n }\n handler(evt);\n };\n}\n\n/**\n * Handle button key pressed (Enter + Space).\n *\n * @param handler The handler to call.\n * @return The decorated function.\n */\nexport function onButtonPressed<E extends KeyboardEvent>(handler: KeyboardEventHandler<E>): KeyboardEventHandler<E> {\n return (evt) => {\n if (evt.key !== 'Enter' && evt.key !== ' ') {\n return;\n }\n handler(evt);\n };\n}\n","import { Selector } from '../../types';\n\n/** Get value with a string of function selector */\nexport const getWithSelector = <TObject, TValue>(\n selector: Selector<TObject, TValue> | undefined,\n object: TObject,\n): TValue => {\n // Use the provided selector function\n if (typeof selector === 'function') {\n return selector(object);\n }\n // Use the provided selector as a property name\n if (typeof selector === 'string') {\n return object[selector] as TValue;\n }\n return String(object) as TValue;\n};\n","import { getWithSelector } from './getWithSelector';\nimport { Selector } from '../../types';\n\n/**\n * Equivalent to `lodash/groupBy` but returns a `Map` of groups items (instead of an object)\n * (has the major advantage to not forcing the keys to be string!)\n */\nexport function groupBySelector<TObject, TValue>(\n array: TObject[],\n selector: Selector<TObject, TValue>,\n): Map<TValue, TObject[]> {\n const groups = new Map<TValue, TObject[]>();\n\n for (const item of array) {\n const key = getWithSelector(selector, item);\n let group = groups.get(key);\n if (!group) {\n group = [];\n groups.set(key, group);\n }\n group.push(item);\n }\n\n return groups;\n}\n","import { mdiAlert, mdiAlertCircle, mdiCheckCircle, mdiInformation } from '@lumx/icons';\nimport { ColorPalette, Emphasis, Kind, Size } from '../../constants';\nimport type { LumxClassName, JSXElement, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport { DialogProps } from '../Dialog';\n\nexport interface BaseAlertDialogProps {\n /** Message variant. */\n kind?: Kind;\n /** Dialog title. */\n title?: string;\n /**\n * Children\n */\n children?: JSXElement;\n}\n\nexport interface AlertDialogProps extends HasClassName, BaseAlertDialogProps, Pick<DialogProps, 'size'> {\n /** Props forwarded to the confirm button */\n confirmProps: any;\n /**\n * Props forwarded to the cancel button.\n * Will not render a cancel button if undefined.\n */\n cancelProps?: any;\n /** Props forwarded to the dialog wrapper element. */\n dialogProps?: any;\n /** Ref forwarded to the dialog root element. */\n ref?: CommonRef;\n /** Ref forwarded to the cancel button element. */\n cancelButtonRef?: CommonRef;\n /** Ref forwarded to the confirm button element. */\n confirmationButtonRef?: CommonRef;\n /** Element used to wrap the description (children). */\n DescriptionElement: any;\n /** Dialog component injected by the framework wrapper. */\n Dialog: any;\n /** Toolbar component injected by the framework wrapper. */\n Toolbar: any;\n /** Button component injected by the framework wrapper. */\n Button: any;\n /** Icon component injected by the framework wrapper. */\n Icon: any;\n /** Unique identifier for the dialog (used for aria-labelledby / aria-describedby). */\n id: string;\n /**\n * Pre-computed focus element.\n * Allows framework wrappers to pass the actual DOM element directly when ref-on-component\n * does not yield a DOM node (e.g. Vue). Falls back to cancelButtonRef / confirmationButtonRef.\n */\n focusElement?: any;\n}\n\n/**\n * Associative map from message kind to color and icon.\n */\nexport const CONFIG = {\n [Kind.error]: { color: ColorPalette.red, icon: mdiAlert },\n [Kind.info]: { color: ColorPalette.blue, icon: mdiInformation },\n [Kind.success]: { color: ColorPalette.green, icon: mdiCheckCircle },\n [Kind.warning]: { color: ColorPalette.yellow, icon: mdiAlertCircle },\n};\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'AlertDialog';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-alert-dialog';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<AlertDialogProps> = {\n size: Size.tiny,\n kind: Kind.info,\n};\n\n/**\n * AlertDialog component.\n *\n * An alert dialog is a modal dialog that interrupts the user's workflow to\n * communicate an important message and acquire a response.\n *\n * It should not have a complex content.\n * Children of this component should only be strings, paragraphs or links.\n */\nexport const AlertDialog = (props: AlertDialogProps) => {\n const {\n id,\n title,\n className,\n cancelProps,\n confirmProps,\n ref,\n kind = DEFAULT_PROPS.kind,\n size = DEFAULT_PROPS.size,\n dialogProps,\n children,\n DescriptionElement,\n cancelButtonRef,\n confirmationButtonRef,\n focusElement,\n Dialog,\n Toolbar,\n Button,\n Icon,\n ...forwardedProps\n } = props;\n const { color, icon } = CONFIG[kind as Kind] || {};\n\n const titleId = `${id}-title`;\n const descriptionId = `${id}-description`;\n\n const { label: confirmLabel, onClick: confirmOnClick, ...forwardedConfirmProps } = confirmProps;\n const { label: cancelLabel, onClick: cancelOnClick, ...forwardedCancelProps } = cancelProps || {};\n\n return (\n <Dialog\n ref={ref}\n focusElement={focusElement ?? (cancelProps ? cancelButtonRef : confirmationButtonRef)}\n size={size}\n dialogProps={{\n id,\n role: 'alertdialog',\n 'aria-labelledby': titleId,\n 'aria-describedby': descriptionId,\n ...dialogProps,\n }}\n className={classNames.join(\n className,\n block({\n [`kind-${kind}`]: Boolean(kind),\n }),\n )}\n {...forwardedProps}\n >\n <header>\n <Toolbar\n className=\"lumx-spacing-margin-horizontal\"\n before={<Icon icon={icon} size={Size.s} color={color} />}\n label={\n <h2 id={titleId} className=\"lumx-typography-title\">\n {title}\n </h2>\n }\n />\n </header>\n\n {children && (\n <DescriptionElement\n id={descriptionId}\n className=\"lumx-typography-body2 lumx-spacing-padding-vertical-big lumx-spacing-padding-horizontal-huge\"\n >\n {children}\n </DescriptionElement>\n )}\n\n <footer>\n <Toolbar\n className=\"lumx-spacing-margin-horizontal\"\n after={\n <>\n {cancelProps && (\n <Button\n {...forwardedCancelProps}\n ref={cancelButtonRef}\n emphasis={Emphasis.medium}\n onClick={cancelOnClick}\n >\n {cancelLabel}\n </Button>\n )}\n <Button\n {...forwardedConfirmProps}\n ref={confirmationButtonRef}\n color={color}\n className=\"lumx-spacing-margin-left-regular\"\n onClick={confirmOnClick}\n >\n {confirmLabel}\n </Button>\n </>\n }\n />\n </footer>\n </Dialog>\n );\n};\n","let counter = 0;\n\n/**\n * Generate a unique ID for use in components.\n * This is a simple implementation that generates sequential IDs.\n *\n * @return A unique ID string.\n */\nexport function useId(): string {\n counter += 1;\n return `:lumx${counter}:`;\n}\n","import { computed, useAttrs, type ComputedRef, type MaybeRefOrGetter, toValue } from 'vue';\n\n/**\n * Composable that falls back to an `$attrs` value when the Vue prop is absent.\n *\n * When a core JSX component renders a Vue sub-component, it passes props using React naming\n * conventions (e.g. `className`, `tabIndex`). Since these names are not declared Vue props,\n * they land in `$attrs`. This composable reads the fallback attr and merges it with the\n * corresponding Vue prop value using a caller-supplied merge function (or `??` by default).\n *\n * Usage inside `defineComponent` setup:\n * ```tsx\n * // With default merge (vueProp ?? attrFallback):\n * const tabIndex = useAttrFallback(() => attrs.tabindex, 'tabIndex');\n *\n * // With custom merge function:\n * const className = useAttrFallback(\n * () => props.class,\n * 'className',\n * (vue, fallback) => classNames.join(vue, fallback as string | undefined) || undefined,\n * );\n * ```\n *\n * @param vueProp The Vue prop value (or a getter/ref returning it).\n * @param attrFallback The attribute name to read from `$attrs` as the fallback.\n * @param merge Optional merge function. Defaults to `vueProp ?? attrFallback`.\n * @return Computed ref holding the merged value.\n */\nexport function useAttrFallback<T>(\n vueProp: MaybeRefOrGetter<T>,\n attrFallback: string,\n merge?: (vuePropValue: T, attrFallbackValue: unknown) => T,\n): ComputedRef<T> {\n const attrs = useAttrs();\n return computed(() => {\n const vuePropValue = toValue(vueProp);\n const attrFallbackValue = attrs[attrFallback];\n if (merge) return merge(vuePropValue, attrFallbackValue);\n return (vuePropValue ?? attrFallbackValue) as T;\n });\n}\n","import { type ComputedRef, type MaybeRefOrGetter } from 'vue';\n\nimport { classNames } from '@lumx/core/js/utils';\n\nimport { type ClassValue } from '../utils/VueToJSX';\nimport { useAttrFallback } from './useAttrFallback';\n\n/**\n * Composable that merges the Vue `class` prop with the `className` attribute (for React compat).\n *\n * Usage inside `defineComponent` setup:\n * ```tsx\n * const className = useClassName(() => props.class);\n * // Then use className.value instead of props.class when forwarding to the core UI:\n * return () => <SomeUI {...props} className={className.value} />;\n * ```\n *\n * @param classProp The Vue `class` prop value (or a getter/ref returning it).\n * @return Computed ref holding the merged class string (or undefined when empty).\n */\nexport function useClassName(classProp: MaybeRefOrGetter<ClassValue>): ComputedRef<string | undefined> {\n // `classNames.join` handles all ClassValue forms (string, array, object) natively.\n // The outer cast is needed because useAttrFallback<ClassValue> can't infer string | undefined.\n return useAttrFallback(\n classProp,\n 'className',\n (vue, fallback) => classNames.join(vue, fallback as string | undefined) || undefined,\n ) as ComputedRef<string | undefined>;\n}\n","import { computed, customRef, effectScope, getCurrentInstance, getCurrentScope, hasInjectionContext, inject, isReactive, isRef, nextTick, onBeforeMount, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, provide, reactive, readonly, ref, shallowReadonly, shallowRef, toRef as toRef$1, toRefs as toRefs$1, toValue, unref, watch, watchEffect } from \"vue\";\n\n//#region computedEager/index.ts\n/**\n*\n* @deprecated This function will be removed in future version.\n*\n* Note: If you are using Vue 3.4+, you can straight use computed instead.\n* Because in Vue 3.4+, if computed new value does not change,\n* computed, effect, watch, watchEffect, render dependencies will not be triggered.\n* refer: https://github.com/vuejs/core/pull/5912\n*\n* @param fn effect function\n* @param options WatchOptionsBase\n* @returns readonly shallowRef\n*/\nfunction computedEager(fn, options) {\n\tvar _options$flush;\n\tconst result = shallowRef();\n\twatchEffect(() => {\n\t\tresult.value = fn();\n\t}, {\n\t\t...options,\n\t\tflush: (_options$flush = options === null || options === void 0 ? void 0 : options.flush) !== null && _options$flush !== void 0 ? _options$flush : \"sync\"\n\t});\n\treturn readonly(result);\n}\n/** @deprecated use `computedEager` instead */\nconst eagerComputed = computedEager;\n\n//#endregion\n//#region computedWithControl/index.ts\n/**\n* Explicitly define the deps of computed.\n*\n* @param source\n* @param fn\n*/\nfunction computedWithControl(source, fn, options = {}) {\n\tlet v = void 0;\n\tlet track;\n\tlet trigger;\n\tlet dirty = true;\n\tconst update = () => {\n\t\tdirty = true;\n\t\ttrigger();\n\t};\n\twatch(source, update, {\n\t\tflush: \"sync\",\n\t\t...options\n\t});\n\tconst get$1 = typeof fn === \"function\" ? fn : fn.get;\n\tconst set$1 = typeof fn === \"function\" ? void 0 : fn.set;\n\tconst result = customRef((_track, _trigger) => {\n\t\ttrack = _track;\n\t\ttrigger = _trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\tif (dirty) {\n\t\t\t\t\tv = get$1(v);\n\t\t\t\t\tdirty = false;\n\t\t\t\t}\n\t\t\t\ttrack();\n\t\t\t\treturn v;\n\t\t\t},\n\t\t\tset(v$1) {\n\t\t\t\tset$1 === null || set$1 === void 0 || set$1(v$1);\n\t\t\t}\n\t\t};\n\t});\n\tresult.trigger = update;\n\treturn result;\n}\n/** @deprecated use `computedWithControl` instead */\nconst controlledComputed = computedWithControl;\n\n//#endregion\n//#region tryOnScopeDispose/index.ts\n/**\n* Call onScopeDispose() if it's inside an effect scope lifecycle, if not, do nothing\n*\n* @param fn\n*/\nfunction tryOnScopeDispose(fn, failSilently) {\n\tif (getCurrentScope()) {\n\t\tonScopeDispose(fn, failSilently);\n\t\treturn true;\n\t}\n\treturn false;\n}\n\n//#endregion\n//#region createEventHook/index.ts\n/**\n* Utility for creating event hooks\n*\n* @see https://vueuse.org/createEventHook\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createEventHook() {\n\tconst fns = /* @__PURE__ */ new Set();\n\tconst off = (fn) => {\n\t\tfns.delete(fn);\n\t};\n\tconst clear = () => {\n\t\tfns.clear();\n\t};\n\tconst on = (fn) => {\n\t\tfns.add(fn);\n\t\tconst offFn = () => off(fn);\n\t\ttryOnScopeDispose(offFn);\n\t\treturn { off: offFn };\n\t};\n\tconst trigger = (...args) => {\n\t\treturn Promise.all(Array.from(fns).map((fn) => fn(...args)));\n\t};\n\treturn {\n\t\ton,\n\t\toff,\n\t\ttrigger,\n\t\tclear\n\t};\n}\n\n//#endregion\n//#region createGlobalState/index.ts\n/**\n* Keep states in the global scope to be reusable across Vue instances.\n*\n* @see https://vueuse.org/createGlobalState\n* @param stateFactory A factory function to create the state\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createGlobalState(stateFactory) {\n\tlet initialized = false;\n\tlet state;\n\tconst scope = effectScope(true);\n\treturn ((...args) => {\n\t\tif (!initialized) {\n\t\t\tstate = scope.run(() => stateFactory(...args));\n\t\t\tinitialized = true;\n\t\t}\n\t\treturn state;\n\t});\n}\n\n//#endregion\n//#region provideLocal/map.ts\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\n//#endregion\n//#region injectLocal/index.ts\n/**\n* On the basis of `inject`, it is allowed to directly call inject to obtain the value after call provide in the same component.\n*\n* @example\n* ```ts\n* injectLocal('MyInjectionKey', 1)\n* const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1\n* ```\n*\n* @__NO_SIDE_EFFECTS__\n*/\nconst injectLocal = (...args) => {\n\tvar _getCurrentInstance;\n\tconst key = args[0];\n\tconst instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;\n\tconst owner = instance !== null && instance !== void 0 ? instance : getCurrentScope();\n\tif (owner == null && !hasInjectionContext()) throw new Error(\"injectLocal must be called in setup\");\n\tif (owner && localProvidedStateMap.has(owner) && key in localProvidedStateMap.get(owner)) return localProvidedStateMap.get(owner)[key];\n\treturn inject(...args);\n};\n\n//#endregion\n//#region provideLocal/index.ts\n/**\n* On the basis of `provide`, it is allowed to directly call inject to obtain the value after call provide in the same component.\n*\n* @example\n* ```ts\n* provideLocal('MyInjectionKey', 1)\n* const injectedValue = injectLocal('MyInjectionKey') // injectedValue === 1\n* ```\n*/\nfunction provideLocal(key, value) {\n\tvar _getCurrentInstance;\n\tconst instance = (_getCurrentInstance = getCurrentInstance()) === null || _getCurrentInstance === void 0 ? void 0 : _getCurrentInstance.proxy;\n\tconst owner = instance !== null && instance !== void 0 ? instance : getCurrentScope();\n\tif (owner == null) throw new Error(\"provideLocal must be called in setup\");\n\tif (!localProvidedStateMap.has(owner)) localProvidedStateMap.set(owner, Object.create(null));\n\tconst localProvidedState = localProvidedStateMap.get(owner);\n\tlocalProvidedState[key] = value;\n\treturn provide(key, value);\n}\n\n//#endregion\n//#region createInjectionState/index.ts\n/**\n* Create global state that can be injected into components.\n*\n* @see https://vueuse.org/createInjectionState\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createInjectionState(composable, options) {\n\tconst key = (options === null || options === void 0 ? void 0 : options.injectionKey) || Symbol(composable.name || \"InjectionState\");\n\tconst defaultValue = options === null || options === void 0 ? void 0 : options.defaultValue;\n\tconst useProvidingState = (...args) => {\n\t\tconst state = composable(...args);\n\t\tprovideLocal(key, state);\n\t\treturn state;\n\t};\n\tconst useInjectedState = () => injectLocal(key, defaultValue);\n\treturn [useProvidingState, useInjectedState];\n}\n\n//#endregion\n//#region createRef/index.ts\n/**\n* Returns a `deepRef` or `shallowRef` depending on the `deep` param.\n*\n* @example createRef(1) // ShallowRef<number>\n* @example createRef(1, false) // ShallowRef<number>\n* @example createRef(1, true) // Ref<number>\n* @example createRef(\"string\") // ShallowRef<string>\n* @example createRef<\"A\"|\"B\">(\"A\", true) // Ref<\"A\"|\"B\">\n*\n* @param value\n* @param deep\n* @returns the `deepRef` or `shallowRef`\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createRef(value, deep) {\n\tif (deep === true) return ref(value);\n\telse return shallowRef(value);\n}\n\n//#endregion\n//#region utils/is.ts\nconst isClient = typeof window !== \"undefined\" && typeof document !== \"undefined\";\nconst isWorker = typeof WorkerGlobalScope !== \"undefined\" && globalThis instanceof WorkerGlobalScope;\nconst isDef = (val) => typeof val !== \"undefined\";\nconst notNullish = (val) => val != null;\nconst assert = (condition, ...infos) => {\n\tif (!condition) console.warn(...infos);\n};\nconst toString = Object.prototype.toString;\nconst isObject = (val) => toString.call(val) === \"[object Object]\";\nconst now = () => Date.now();\nconst timestamp = () => +Date.now();\nconst clamp = (n, min, max) => Math.min(max, Math.max(min, n));\nconst noop = () => {};\nconst rand = (min, max) => {\n\tmin = Math.ceil(min);\n\tmax = Math.floor(max);\n\treturn Math.floor(Math.random() * (max - min + 1)) + min;\n};\nconst hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key);\nconst isIOS = /* @__PURE__ */ getIsIOS();\nfunction getIsIOS() {\n\tvar _window, _window2, _window3;\n\treturn isClient && !!((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.navigator) === null || _window2 === void 0 ? void 0 : _window2.maxTouchPoints) > 2 && /iPad|Macintosh/.test((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.navigator.userAgent));\n}\n\n//#endregion\n//#region toRef/index.ts\nfunction toRef(...args) {\n\tif (args.length !== 1) return toRef$1(...args);\n\tconst r = args[0];\n\treturn typeof r === \"function\" ? readonly(customRef(() => ({\n\t\tget: r,\n\t\tset: noop\n\t}))) : ref(r);\n}\n\n//#endregion\n//#region utils/filters.ts\n/**\n* @internal\n*/\nfunction createFilterWrapper(filter, fn) {\n\tfunction wrapper(...args) {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tPromise.resolve(filter(() => fn.apply(this, args), {\n\t\t\t\tfn,\n\t\t\t\tthisArg: this,\n\t\t\t\targs\n\t\t\t})).then(resolve).catch(reject);\n\t\t});\n\t}\n\treturn wrapper;\n}\nconst bypassFilter = (invoke$1) => {\n\treturn invoke$1();\n};\n/**\n* Create an EventFilter that debounce the events\n*/\nfunction debounceFilter(ms, options = {}) {\n\tlet timer;\n\tlet maxTimer;\n\tlet lastRejector = noop;\n\tconst _clearTimeout = (timer$1) => {\n\t\tclearTimeout(timer$1);\n\t\tlastRejector();\n\t\tlastRejector = noop;\n\t};\n\tlet lastInvoker;\n\tconst filter = (invoke$1) => {\n\t\tconst duration = toValue(ms);\n\t\tconst maxDuration = toValue(options.maxWait);\n\t\tif (timer) _clearTimeout(timer);\n\t\tif (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n\t\t\tif (maxTimer) {\n\t\t\t\t_clearTimeout(maxTimer);\n\t\t\t\tmaxTimer = void 0;\n\t\t\t}\n\t\t\treturn Promise.resolve(invoke$1());\n\t\t}\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlastRejector = options.rejectOnCancel ? reject : resolve;\n\t\t\tlastInvoker = invoke$1;\n\t\t\tif (maxDuration && !maxTimer) maxTimer = setTimeout(() => {\n\t\t\t\tif (timer) _clearTimeout(timer);\n\t\t\t\tmaxTimer = void 0;\n\t\t\t\tresolve(lastInvoker());\n\t\t\t}, maxDuration);\n\t\t\ttimer = setTimeout(() => {\n\t\t\t\tif (maxTimer) _clearTimeout(maxTimer);\n\t\t\t\tmaxTimer = void 0;\n\t\t\t\tresolve(invoke$1());\n\t\t\t}, duration);\n\t\t});\n\t};\n\treturn filter;\n}\nfunction throttleFilter(...args) {\n\tlet lastExec = 0;\n\tlet timer;\n\tlet isLeading = true;\n\tlet lastRejector = noop;\n\tlet lastValue;\n\tlet ms;\n\tlet trailing;\n\tlet leading;\n\tlet rejectOnCancel;\n\tif (!isRef(args[0]) && typeof args[0] === \"object\") ({delay: ms, trailing = true, leading = true, rejectOnCancel = false} = args[0]);\n\telse [ms, trailing = true, leading = true, rejectOnCancel = false] = args;\n\tconst clear = () => {\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = void 0;\n\t\t\tlastRejector();\n\t\t\tlastRejector = noop;\n\t\t}\n\t};\n\tconst filter = (_invoke) => {\n\t\tconst duration = toValue(ms);\n\t\tconst elapsed = Date.now() - lastExec;\n\t\tconst invoke$1 = () => {\n\t\t\treturn lastValue = _invoke();\n\t\t};\n\t\tclear();\n\t\tif (duration <= 0) {\n\t\t\tlastExec = Date.now();\n\t\t\treturn invoke$1();\n\t\t}\n\t\tif (elapsed > duration) {\n\t\t\tlastExec = Date.now();\n\t\t\tif (leading || !isLeading) invoke$1();\n\t\t} else if (trailing) lastValue = new Promise((resolve, reject) => {\n\t\t\tlastRejector = rejectOnCancel ? reject : resolve;\n\t\t\ttimer = setTimeout(() => {\n\t\t\t\tlastExec = Date.now();\n\t\t\t\tisLeading = true;\n\t\t\t\tresolve(invoke$1());\n\t\t\t\tclear();\n\t\t\t}, Math.max(0, duration - elapsed));\n\t\t});\n\t\tif (!leading && !timer) timer = setTimeout(() => isLeading = true, duration);\n\t\tisLeading = false;\n\t\treturn lastValue;\n\t};\n\treturn filter;\n}\n/**\n* EventFilter that gives extra controls to pause and resume the filter\n*\n* @param extendFilter Extra filter to apply when the PausableFilter is active, default to none\n* @param options Options to configure the filter\n*/\nfunction pausableFilter(extendFilter = bypassFilter, options = {}) {\n\tconst { initialState = \"active\" } = options;\n\tconst isActive = toRef(initialState === \"active\");\n\tfunction pause() {\n\t\tisActive.value = false;\n\t}\n\tfunction resume() {\n\t\tisActive.value = true;\n\t}\n\tconst eventFilter = (...args) => {\n\t\tif (isActive.value) extendFilter(...args);\n\t};\n\treturn {\n\t\tisActive: readonly(isActive),\n\t\tpause,\n\t\tresume,\n\t\teventFilter\n\t};\n}\n\n//#endregion\n//#region utils/general.ts\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n\treturn new Promise((resolve, reject) => {\n\t\tif (throwOnTimeout) setTimeout(() => reject(reason), ms);\n\t\telse setTimeout(resolve, ms);\n\t});\n}\nfunction identity(arg) {\n\treturn arg;\n}\n/**\n* Create singleton promise function\n*\n* @example\n* ```\n* const promise = createSingletonPromise(async () => { ... })\n*\n* await promise()\n* await promise() // all of them will be bind to a single promise instance\n* await promise() // and be resolved together\n* ```\n*/\nfunction createSingletonPromise(fn) {\n\tlet _promise;\n\tfunction wrapper() {\n\t\tif (!_promise) _promise = fn();\n\t\treturn _promise;\n\t}\n\twrapper.reset = async () => {\n\t\tconst _prev = _promise;\n\t\t_promise = void 0;\n\t\tif (_prev) await _prev;\n\t};\n\treturn wrapper;\n}\nfunction invoke(fn) {\n\treturn fn();\n}\nfunction containsProp(obj, ...props) {\n\treturn props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n\tvar _target$match;\n\tif (typeof target === \"number\") return target + delta;\n\tconst value = ((_target$match = target.match(/^-?\\d+\\.?\\d*/)) === null || _target$match === void 0 ? void 0 : _target$match[0]) || \"\";\n\tconst unit = target.slice(value.length);\n\tconst result = Number.parseFloat(value) + delta;\n\tif (Number.isNaN(result)) return target;\n\treturn result + unit;\n}\n/**\n* Get a px value for SSR use, do not rely on this method outside of SSR as REM unit is assumed at 16px, which might not be the case on the client\n*/\nfunction pxValue(px) {\n\treturn px.endsWith(\"rem\") ? Number.parseFloat(px) * 16 : Number.parseFloat(px);\n}\n/**\n* Create a new subset object by giving keys\n*/\nfunction objectPick(obj, keys, omitUndefined = false) {\n\treturn keys.reduce((n, k) => {\n\t\tif (k in obj) {\n\t\t\tif (!omitUndefined || obj[k] !== void 0) n[k] = obj[k];\n\t\t}\n\t\treturn n;\n\t}, {});\n}\n/**\n* Create a new subset object by omit giving keys\n*/\nfunction objectOmit(obj, keys, omitUndefined = false) {\n\treturn Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n\t\treturn (!omitUndefined || value !== void 0) && !keys.includes(key);\n\t}));\n}\nfunction objectEntries(obj) {\n\treturn Object.entries(obj);\n}\nfunction toArray(value) {\n\treturn Array.isArray(value) ? value : [value];\n}\n\n//#endregion\n//#region utils/port.ts\nfunction cacheStringFunction(fn) {\n\tconst cache = Object.create(null);\n\treturn ((str) => {\n\t\treturn cache[str] || (cache[str] = fn(str));\n\t});\n}\nconst hyphenateRE = /\\B([A-Z])/g;\nconst hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, \"-$1\").toLowerCase());\nconst camelizeRE = /-(\\w)/g;\nconst camelize = cacheStringFunction((str) => {\n\treturn str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\n//#endregion\n//#region utils/vue.ts\nfunction getLifeCycleTarget(target) {\n\treturn target || getCurrentInstance();\n}\n\n//#endregion\n//#region createSharedComposable/index.ts\n/**\n* Make a composable function usable with multiple Vue instances.\n*\n* @see https://vueuse.org/createSharedComposable\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createSharedComposable(composable) {\n\tif (!isClient) return composable;\n\tlet subscribers = 0;\n\tlet state;\n\tlet scope;\n\tconst dispose = () => {\n\t\tsubscribers -= 1;\n\t\tif (scope && subscribers <= 0) {\n\t\t\tscope.stop();\n\t\t\tstate = void 0;\n\t\t\tscope = void 0;\n\t\t}\n\t};\n\treturn ((...args) => {\n\t\tsubscribers += 1;\n\t\tif (!scope) {\n\t\t\tscope = effectScope(true);\n\t\t\tstate = scope.run(() => composable(...args));\n\t\t}\n\t\ttryOnScopeDispose(dispose);\n\t\treturn state;\n\t});\n}\n\n//#endregion\n//#region extendRef/index.ts\nfunction extendRef(ref$1, extend, { enumerable = false, unwrap = true } = {}) {\n\tfor (const [key, value] of Object.entries(extend)) {\n\t\tif (key === \"value\") continue;\n\t\tif (isRef(value) && unwrap) Object.defineProperty(ref$1, key, {\n\t\t\tget() {\n\t\t\t\treturn value.value;\n\t\t\t},\n\t\t\tset(v) {\n\t\t\t\tvalue.value = v;\n\t\t\t},\n\t\t\tenumerable\n\t\t});\n\t\telse Object.defineProperty(ref$1, key, {\n\t\t\tvalue,\n\t\t\tenumerable\n\t\t});\n\t}\n\treturn ref$1;\n}\n\n//#endregion\n//#region get/index.ts\nfunction get(obj, key) {\n\tif (key == null) return unref(obj);\n\treturn unref(obj)[key];\n}\n\n//#endregion\n//#region isDefined/index.ts\nfunction isDefined(v) {\n\treturn unref(v) != null;\n}\n\n//#endregion\n//#region makeDestructurable/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction makeDestructurable(obj, arr) {\n\tif (typeof Symbol !== \"undefined\") {\n\t\tconst clone = { ...obj };\n\t\tObject.defineProperty(clone, Symbol.iterator, {\n\t\t\tenumerable: false,\n\t\t\tvalue() {\n\t\t\t\tlet index = 0;\n\t\t\t\treturn { next: () => ({\n\t\t\t\t\tvalue: arr[index++],\n\t\t\t\t\tdone: index > arr.length\n\t\t\t\t}) };\n\t\t\t}\n\t\t});\n\t\treturn clone;\n\t} else return Object.assign([...arr], obj);\n}\n\n//#endregion\n//#region reactify/index.ts\n/**\n* Converts plain function into a reactive function.\n* The converted function accepts refs as it's arguments\n* and returns a ComputedRef, with proper typing.\n*\n* @param fn - Source function\n* @param options - Options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction reactify(fn, options) {\n\tconst unrefFn = (options === null || options === void 0 ? void 0 : options.computedGetter) === false ? unref : toValue;\n\treturn function(...args) {\n\t\treturn computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n\t};\n}\n/** @deprecated use `reactify` instead */\nconst createReactiveFn = reactify;\n\n//#endregion\n//#region reactifyObject/index.ts\n/**\n* Apply `reactify` to an object\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n\tlet keys = [];\n\tlet options;\n\tif (Array.isArray(optionsOrKeys)) keys = optionsOrKeys;\n\telse {\n\t\toptions = optionsOrKeys;\n\t\tconst { includeOwnProperties = true } = optionsOrKeys;\n\t\tkeys.push(...Object.keys(obj));\n\t\tif (includeOwnProperties) keys.push(...Object.getOwnPropertyNames(obj));\n\t}\n\treturn Object.fromEntries(keys.map((key) => {\n\t\tconst value = obj[key];\n\t\treturn [key, typeof value === \"function\" ? reactify(value.bind(obj), options) : value];\n\t}));\n}\n\n//#endregion\n//#region toReactive/index.ts\n/**\n* Converts ref to reactive.\n*\n* @see https://vueuse.org/toReactive\n* @param objectRef A ref of object\n*/\nfunction toReactive(objectRef) {\n\tif (!isRef(objectRef)) return reactive(objectRef);\n\treturn reactive(new Proxy({}, {\n\t\tget(_, p, receiver) {\n\t\t\treturn unref(Reflect.get(objectRef.value, p, receiver));\n\t\t},\n\t\tset(_, p, value) {\n\t\t\tif (isRef(objectRef.value[p]) && !isRef(value)) objectRef.value[p].value = value;\n\t\t\telse objectRef.value[p] = value;\n\t\t\treturn true;\n\t\t},\n\t\tdeleteProperty(_, p) {\n\t\t\treturn Reflect.deleteProperty(objectRef.value, p);\n\t\t},\n\t\thas(_, p) {\n\t\t\treturn Reflect.has(objectRef.value, p);\n\t\t},\n\t\townKeys() {\n\t\t\treturn Object.keys(objectRef.value);\n\t\t},\n\t\tgetOwnPropertyDescriptor() {\n\t\t\treturn {\n\t\t\t\tenumerable: true,\n\t\t\t\tconfigurable: true\n\t\t\t};\n\t\t}\n\t}));\n}\n\n//#endregion\n//#region reactiveComputed/index.ts\n/**\n* Computed reactive object.\n*/\nfunction reactiveComputed(fn) {\n\treturn toReactive(computed(fn));\n}\n\n//#endregion\n//#region reactiveOmit/index.ts\n/**\n* Reactively omit fields from a reactive object\n*\n* @see https://vueuse.org/reactiveOmit\n*/\nfunction reactiveOmit(obj, ...keys) {\n\tconst flatKeys = keys.flat();\n\tconst predicate = flatKeys[0];\n\treturn reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs$1(obj)).filter((e) => !flatKeys.includes(e[0]))));\n}\n\n//#endregion\n//#region reactivePick/index.ts\n/**\n* Reactively pick fields from a reactive object\n*\n* @see https://vueuse.org/reactivePick\n*/\nfunction reactivePick(obj, ...keys) {\n\tconst flatKeys = keys.flat();\n\tconst predicate = flatKeys[0];\n\treturn reactiveComputed(() => typeof predicate === \"function\" ? Object.fromEntries(Object.entries(toRefs$1(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef(obj, k)])));\n}\n\n//#endregion\n//#region refAutoReset/index.ts\n/**\n* Create a ref which will be reset to the default value after some time.\n*\n* @see https://vueuse.org/refAutoReset\n* @param defaultValue The value which will be set.\n* @param afterMs A zero-or-greater delay in milliseconds.\n*/\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n\treturn customRef((track, trigger) => {\n\t\tlet value = toValue(defaultValue);\n\t\tlet timer;\n\t\tconst resetAfter = () => setTimeout(() => {\n\t\t\tvalue = toValue(defaultValue);\n\t\t\ttrigger();\n\t\t}, toValue(afterMs));\n\t\ttryOnScopeDispose(() => {\n\t\t\tclearTimeout(timer);\n\t\t});\n\t\treturn {\n\t\t\tget() {\n\t\t\t\ttrack();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\tset(newValue) {\n\t\t\t\tvalue = newValue;\n\t\t\t\ttrigger();\n\t\t\t\tclearTimeout(timer);\n\t\t\t\ttimer = resetAfter();\n\t\t\t}\n\t\t};\n\t});\n}\n/** @deprecated use `refAutoReset` instead */\nconst autoResetRef = refAutoReset;\n\n//#endregion\n//#region useDebounceFn/index.ts\n/**\n* Debounce execution of a function.\n*\n* @see https://vueuse.org/useDebounceFn\n* @param fn A function to be executed after delay milliseconds debounced.\n* @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n* @param options Options\n*\n* @return A new, debounce, function.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n\treturn createFilterWrapper(debounceFilter(ms, options), fn);\n}\n\n//#endregion\n//#region refDebounced/index.ts\n/**\n* Debounce updates of a ref.\n*\n* @return A new debounced ref.\n*/\nfunction refDebounced(value, ms = 200, options = {}) {\n\tconst debounced = ref(toValue(value));\n\tconst updater = useDebounceFn(() => {\n\t\tdebounced.value = value.value;\n\t}, ms, options);\n\twatch(value, () => updater());\n\treturn shallowReadonly(debounced);\n}\n/** @deprecated use `refDebounced` instead */\nconst debouncedRef = refDebounced;\n/** @deprecated use `refDebounced` instead */\nconst useDebounce = refDebounced;\n\n//#endregion\n//#region refDefault/index.ts\n/**\n* Apply default value to a ref.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction refDefault(source, defaultValue) {\n\treturn computed({\n\t\tget() {\n\t\t\tvar _source$value;\n\t\t\treturn (_source$value = source.value) !== null && _source$value !== void 0 ? _source$value : defaultValue;\n\t\t},\n\t\tset(value) {\n\t\t\tsource.value = value;\n\t\t}\n\t});\n}\n\n//#endregion\n//#region refManualReset/index.ts\n/**\n* Create a ref with manual reset functionality.\n*\n* @see https://vueuse.org/refManualReset\n* @param defaultValue The value which will be set.\n*/\nfunction refManualReset(defaultValue) {\n\tlet value = toValue(defaultValue);\n\tlet trigger;\n\tconst reset = () => {\n\t\tvalue = toValue(defaultValue);\n\t\ttrigger();\n\t};\n\tconst refValue = customRef((track, _trigger) => {\n\t\ttrigger = _trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\ttrack();\n\t\t\t\treturn value;\n\t\t\t},\n\t\t\tset(newValue) {\n\t\t\t\tvalue = newValue;\n\t\t\t\ttrigger();\n\t\t\t}\n\t\t};\n\t});\n\trefValue.reset = reset;\n\treturn refValue;\n}\n\n//#endregion\n//#region useThrottleFn/index.ts\n/**\n* Throttle execution of a function. Especially useful for rate limiting\n* execution of handlers on events like resize and scroll.\n*\n* @param fn A function to be executed after delay milliseconds. The `this` context and all arguments are passed through, as-is,\n* to `callback` when the throttled-function is executed.\n* @param ms A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n* (default value: 200)\n*\n* @param [trailing] if true, call fn again after the time is up (default value: false)\n*\n* @param [leading] if true, call fn on the leading edge of the ms timeout (default value: true)\n*\n* @param [rejectOnCancel] if true, reject the last call if it's been cancel (default value: false)\n*\n* @return A new, throttled, function.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n\treturn createFilterWrapper(throttleFilter(ms, trailing, leading, rejectOnCancel), fn);\n}\n\n//#endregion\n//#region refThrottled/index.ts\n/**\n* Throttle execution of a function. Especially useful for rate limiting\n* execution of handlers on events like resize and scroll.\n*\n* @param value Ref value to be watched with throttle effect\n* @param delay A zero-or-greater delay in milliseconds. For event callbacks, values around 100 or 250 (or even higher) are most useful.\n* @param trailing if true, update the value again after the delay time is up\n* @param leading if true, update the value on the leading edge of the ms timeout\n*/\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n\tif (delay <= 0) return value;\n\tconst throttled = ref(toValue(value));\n\tconst updater = useThrottleFn(() => {\n\t\tthrottled.value = value.value;\n\t}, delay, trailing, leading);\n\twatch(value, () => updater());\n\treturn throttled;\n}\n/** @deprecated use `refThrottled` instead */\nconst throttledRef = refThrottled;\n/** @deprecated use `refThrottled` instead */\nconst useThrottle = refThrottled;\n\n//#endregion\n//#region refWithControl/index.ts\n/**\n* Fine-grained controls over ref and its reactivity.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction refWithControl(initial, options = {}) {\n\tlet source = initial;\n\tlet track;\n\tlet trigger;\n\tconst ref$1 = customRef((_track, _trigger) => {\n\t\ttrack = _track;\n\t\ttrigger = _trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\treturn get$1();\n\t\t\t},\n\t\t\tset(v) {\n\t\t\t\tset$1(v);\n\t\t\t}\n\t\t};\n\t});\n\tfunction get$1(tracking = true) {\n\t\tif (tracking) track();\n\t\treturn source;\n\t}\n\tfunction set$1(value, triggering = true) {\n\t\tvar _options$onBeforeChan, _options$onChanged;\n\t\tif (value === source) return;\n\t\tconst old = source;\n\t\tif (((_options$onBeforeChan = options.onBeforeChange) === null || _options$onBeforeChan === void 0 ? void 0 : _options$onBeforeChan.call(options, value, old)) === false) return;\n\t\tsource = value;\n\t\t(_options$onChanged = options.onChanged) === null || _options$onChanged === void 0 || _options$onChanged.call(options, value, old);\n\t\tif (triggering) trigger();\n\t}\n\t/**\n\t* Get the value without tracked in the reactivity system\n\t*/\n\tconst untrackedGet = () => get$1(false);\n\t/**\n\t* Set the value without triggering the reactivity system\n\t*/\n\tconst silentSet = (v) => set$1(v, false);\n\t/**\n\t* Get the value without tracked in the reactivity system.\n\t*\n\t* Alias for `untrackedGet()`\n\t*/\n\tconst peek = () => get$1(false);\n\t/**\n\t* Set the value without triggering the reactivity system\n\t*\n\t* Alias for `silentSet(v)`\n\t*/\n\tconst lay = (v) => set$1(v, false);\n\treturn extendRef(ref$1, {\n\t\tget: get$1,\n\t\tset: set$1,\n\t\tuntrackedGet,\n\t\tsilentSet,\n\t\tpeek,\n\t\tlay\n\t}, { enumerable: true });\n}\n/** @deprecated use `refWithControl` instead */\nconst controlledRef = refWithControl;\n\n//#endregion\n//#region set/index.ts\n/**\n* Shorthand for `ref.value = x`\n*/\nfunction set(...args) {\n\tif (args.length === 2) {\n\t\tconst [ref$1, value] = args;\n\t\tref$1.value = value;\n\t}\n\tif (args.length === 3) {\n\t\tconst [target, key, value] = args;\n\t\ttarget[key] = value;\n\t}\n}\n\n//#endregion\n//#region watchWithFilter/index.ts\nfunction watchWithFilter(source, cb, options = {}) {\n\tconst { eventFilter = bypassFilter,...watchOptions } = options;\n\treturn watch(source, createFilterWrapper(eventFilter, cb), watchOptions);\n}\n\n//#endregion\n//#region watchPausable/index.ts\nfunction watchPausable(source, cb, options = {}) {\n\tconst { eventFilter: filter, initialState = \"active\",...watchOptions } = options;\n\tconst { eventFilter, pause, resume, isActive } = pausableFilter(filter, { initialState });\n\treturn {\n\t\tstop: watchWithFilter(source, cb, {\n\t\t\t...watchOptions,\n\t\t\teventFilter\n\t\t}),\n\t\tpause,\n\t\tresume,\n\t\tisActive\n\t};\n}\n/** @deprecated use `watchPausable` instead */\nconst pausableWatch = watchPausable;\n\n//#endregion\n//#region syncRef/index.ts\n/**\n* Two-way refs synchronization.\n* From the set theory perspective to restrict the option's type\n* Check in the following order:\n* 1. L = R\n* 2. L ∩ R ≠ ∅\n* 3. L ⊆ R\n* 4. L ∩ R = ∅\n*/\nfunction syncRef(left, right, ...[options]) {\n\tconst { flush = \"sync\", deep = false, immediate = true, direction = \"both\", transform = {} } = options || {};\n\tconst watchers = [];\n\tconst transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n\tconst transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n\tif (direction === \"both\" || direction === \"ltr\") watchers.push(pausableWatch(left, (newValue) => {\n\t\twatchers.forEach((w) => w.pause());\n\t\tright.value = transformLTR(newValue);\n\t\twatchers.forEach((w) => w.resume());\n\t}, {\n\t\tflush,\n\t\tdeep,\n\t\timmediate\n\t}));\n\tif (direction === \"both\" || direction === \"rtl\") watchers.push(pausableWatch(right, (newValue) => {\n\t\twatchers.forEach((w) => w.pause());\n\t\tleft.value = transformRTL(newValue);\n\t\twatchers.forEach((w) => w.resume());\n\t}, {\n\t\tflush,\n\t\tdeep,\n\t\timmediate\n\t}));\n\tconst stop = () => {\n\t\twatchers.forEach((w) => w.stop());\n\t};\n\treturn stop;\n}\n\n//#endregion\n//#region syncRefs/index.ts\n/**\n* Keep target ref(s) in sync with the source ref\n*\n* @param source source ref\n* @param targets\n*/\nfunction syncRefs(source, targets, options = {}) {\n\tconst { flush = \"sync\", deep = false, immediate = true } = options;\n\tconst targetsArray = toArray(targets);\n\treturn watch(source, (newValue) => targetsArray.forEach((target) => target.value = newValue), {\n\t\tflush,\n\t\tdeep,\n\t\timmediate\n\t});\n}\n\n//#endregion\n//#region toRefs/index.ts\n/**\n* Extended `toRefs` that also accepts refs of an object.\n*\n* @see https://vueuse.org/toRefs\n* @param objectRef A ref or normal object or array.\n* @param options Options\n*/\nfunction toRefs(objectRef, options = {}) {\n\tif (!isRef(objectRef)) return toRefs$1(objectRef);\n\tconst result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n\tfor (const key in objectRef.value) result[key] = customRef(() => ({\n\t\tget() {\n\t\t\treturn objectRef.value[key];\n\t\t},\n\t\tset(v) {\n\t\t\tvar _toValue;\n\t\t\tif ((_toValue = toValue(options.replaceRef)) !== null && _toValue !== void 0 ? _toValue : true) if (Array.isArray(objectRef.value)) {\n\t\t\t\tconst copy = [...objectRef.value];\n\t\t\t\tcopy[key] = v;\n\t\t\t\tobjectRef.value = copy;\n\t\t\t} else {\n\t\t\t\tconst newObject = {\n\t\t\t\t\t...objectRef.value,\n\t\t\t\t\t[key]: v\n\t\t\t\t};\n\t\t\t\tObject.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n\t\t\t\tobjectRef.value = newObject;\n\t\t\t}\n\t\t\telse objectRef.value[key] = v;\n\t\t}\n\t}));\n\treturn result;\n}\n\n//#endregion\n//#region tryOnBeforeMount/index.ts\n/**\n* Call onBeforeMount() if it's inside a component lifecycle, if not, just call the function\n*\n* @param fn\n* @param sync if set to false, it will run in the nextTick() of Vue\n* @param target\n*/\nfunction tryOnBeforeMount(fn, sync = true, target) {\n\tif (getLifeCycleTarget(target)) onBeforeMount(fn, target);\n\telse if (sync) fn();\n\telse nextTick(fn);\n}\n\n//#endregion\n//#region tryOnBeforeUnmount/index.ts\n/**\n* Call onBeforeUnmount() if it's inside a component lifecycle, if not, do nothing\n*\n* @param fn\n* @param target\n*/\nfunction tryOnBeforeUnmount(fn, target) {\n\tif (getLifeCycleTarget(target)) onBeforeUnmount(fn, target);\n}\n\n//#endregion\n//#region tryOnMounted/index.ts\n/**\n* Call onMounted() if it's inside a component lifecycle, if not, just call the function\n*\n* @param fn\n* @param sync if set to false, it will run in the nextTick() of Vue\n* @param target\n*/\nfunction tryOnMounted(fn, sync = true, target) {\n\tif (getLifeCycleTarget(target)) onMounted(fn, target);\n\telse if (sync) fn();\n\telse nextTick(fn);\n}\n\n//#endregion\n//#region tryOnUnmounted/index.ts\n/**\n* Call onUnmounted() if it's inside a component lifecycle, if not, do nothing\n*\n* @param fn\n* @param target\n*/\nfunction tryOnUnmounted(fn, target) {\n\tif (getLifeCycleTarget(target)) onUnmounted(fn, target);\n}\n\n//#endregion\n//#region until/index.ts\nfunction createUntil(r, isNot = false) {\n\tfunction toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n\t\tlet stop = null;\n\t\tconst promises = [new Promise((resolve) => {\n\t\t\tstop = watch(r, (v) => {\n\t\t\t\tif (condition(v) !== isNot) {\n\t\t\t\t\tif (stop) stop();\n\t\t\t\t\telse nextTick(() => stop === null || stop === void 0 ? void 0 : stop());\n\t\t\t\t\tresolve(v);\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tflush,\n\t\t\t\tdeep,\n\t\t\t\timmediate: true\n\t\t\t});\n\t\t})];\n\t\tif (timeout != null) promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop === null || stop === void 0 ? void 0 : stop()));\n\t\treturn Promise.race(promises);\n\t}\n\tfunction toBe(value, options) {\n\t\tif (!isRef(value)) return toMatch((v) => v === value, options);\n\t\tconst { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options !== null && options !== void 0 ? options : {};\n\t\tlet stop = null;\n\t\tconst promises = [new Promise((resolve) => {\n\t\t\tstop = watch([r, value], ([v1, v2]) => {\n\t\t\t\tif (isNot !== (v1 === v2)) {\n\t\t\t\t\tif (stop) stop();\n\t\t\t\t\telse nextTick(() => stop === null || stop === void 0 ? void 0 : stop());\n\t\t\t\t\tresolve(v1);\n\t\t\t\t}\n\t\t\t}, {\n\t\t\t\tflush,\n\t\t\t\tdeep,\n\t\t\t\timmediate: true\n\t\t\t});\n\t\t})];\n\t\tif (timeout != null) promises.push(promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n\t\t\tstop === null || stop === void 0 || stop();\n\t\t\treturn toValue(r);\n\t\t}));\n\t\treturn Promise.race(promises);\n\t}\n\tfunction toBeTruthy(options) {\n\t\treturn toMatch((v) => Boolean(v), options);\n\t}\n\tfunction toBeNull(options) {\n\t\treturn toBe(null, options);\n\t}\n\tfunction toBeUndefined(options) {\n\t\treturn toBe(void 0, options);\n\t}\n\tfunction toBeNaN(options) {\n\t\treturn toMatch(Number.isNaN, options);\n\t}\n\tfunction toContains(value, options) {\n\t\treturn toMatch((v) => {\n\t\t\tconst array = Array.from(v);\n\t\t\treturn array.includes(value) || array.includes(toValue(value));\n\t\t}, options);\n\t}\n\tfunction changed(options) {\n\t\treturn changedTimes(1, options);\n\t}\n\tfunction changedTimes(n = 1, options) {\n\t\tlet count = -1;\n\t\treturn toMatch(() => {\n\t\t\tcount += 1;\n\t\t\treturn count >= n;\n\t\t}, options);\n\t}\n\tif (Array.isArray(toValue(r))) return {\n\t\ttoMatch,\n\t\ttoContains,\n\t\tchanged,\n\t\tchangedTimes,\n\t\tget not() {\n\t\t\treturn createUntil(r, !isNot);\n\t\t}\n\t};\n\telse return {\n\t\ttoMatch,\n\t\ttoBe,\n\t\ttoBeTruthy,\n\t\ttoBeNull,\n\t\ttoBeNaN,\n\t\ttoBeUndefined,\n\t\tchanged,\n\t\tchangedTimes,\n\t\tget not() {\n\t\t\treturn createUntil(r, !isNot);\n\t\t}\n\t};\n}\nfunction until(r) {\n\treturn createUntil(r);\n}\n\n//#endregion\n//#region useArrayDifference/index.ts\nfunction defaultComparator(value, othVal) {\n\treturn value === othVal;\n}\n/**\n* Reactive get array difference of two array\n* @see https://vueuse.org/useArrayDifference\n* @returns - the difference of two array\n* @param args\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayDifference(...args) {\n\tvar _args$, _args$2;\n\tconst list = args[0];\n\tconst values = args[1];\n\tlet compareFn = (_args$ = args[2]) !== null && _args$ !== void 0 ? _args$ : defaultComparator;\n\tconst { symmetric = false } = (_args$2 = args[3]) !== null && _args$2 !== void 0 ? _args$2 : {};\n\tif (typeof compareFn === \"string\") {\n\t\tconst key = compareFn;\n\t\tcompareFn = (value, othVal) => value[key] === othVal[key];\n\t}\n\tconst diff1 = computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n\tif (symmetric) {\n\t\tconst diff2 = computed(() => toValue(values).filter((x) => toValue(list).findIndex((y) => compareFn(x, y)) === -1));\n\t\treturn computed(() => symmetric ? [...toValue(diff1), ...toValue(diff2)] : toValue(diff1));\n\t} else return diff1;\n}\n\n//#endregion\n//#region useArrayEvery/index.ts\n/**\n* Reactive `Array.every`\n*\n* @see https://vueuse.org/useArrayEvery\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns **true** if the `fn` function returns a **truthy** value for every element from the array. Otherwise, **false**.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayEvery(list, fn) {\n\treturn computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\n//#endregion\n//#region useArrayFilter/index.ts\n/**\n* Reactive `Array.filter`\n*\n* @see https://vueuse.org/useArrayFilter\n* @param list - the array was called upon.\n* @param fn - a function that is called for every element of the given `list`. Each time `fn` executes, the returned value is added to the new array.\n*\n* @returns a shallow copy of a portion of the given array, filtered down to just the elements from the given array that pass the test implemented by the provided function. If no elements pass the test, an empty array will be returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFilter(list, fn) {\n\treturn computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\n//#endregion\n//#region useArrayFind/index.ts\n/**\n* Reactive `Array.find`\n*\n* @see https://vueuse.org/useArrayFind\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns the first element in the array that satisfies the provided testing function. Otherwise, undefined is returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFind(list, fn) {\n\treturn computed(() => toValue(toValue(list).find((element, index, array) => fn(toValue(element), index, array))));\n}\n\n//#endregion\n//#region useArrayFindIndex/index.ts\n/**\n* Reactive `Array.findIndex`\n*\n* @see https://vueuse.org/useArrayFindIndex\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns the index of the first element in the array that passes the test. Otherwise, \"-1\".\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFindIndex(list, fn) {\n\treturn computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\n//#endregion\n//#region useArrayFindLast/index.ts\nfunction findLast(arr, cb) {\n\tlet index = arr.length;\n\twhile (index-- > 0) if (cb(arr[index], index, arr)) return arr[index];\n}\n/**\n* Reactive `Array.findLast`\n*\n* @see https://vueuse.org/useArrayFindLast\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns the last element in the array that satisfies the provided testing function. Otherwise, undefined is returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayFindLast(list, fn) {\n\treturn computed(() => toValue(!Array.prototype.findLast ? findLast(toValue(list), (element, index, array) => fn(toValue(element), index, array)) : toValue(list).findLast((element, index, array) => fn(toValue(element), index, array))));\n}\n\n//#endregion\n//#region useArrayIncludes/index.ts\nfunction isArrayIncludesOptions(obj) {\n\treturn isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\n/**\n* Reactive `Array.includes`\n*\n* @see https://vueuse.org/useArrayIncludes\n*\n* @returns true if the `value` is found in the array. Otherwise, false.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayIncludes(...args) {\n\tvar _comparator;\n\tconst list = args[0];\n\tconst value = args[1];\n\tlet comparator = args[2];\n\tlet formIndex = 0;\n\tif (isArrayIncludesOptions(comparator)) {\n\t\tvar _comparator$fromIndex;\n\t\tformIndex = (_comparator$fromIndex = comparator.fromIndex) !== null && _comparator$fromIndex !== void 0 ? _comparator$fromIndex : 0;\n\t\tcomparator = comparator.comparator;\n\t}\n\tif (typeof comparator === \"string\") {\n\t\tconst key = comparator;\n\t\tcomparator = (element, value$1) => element[key] === toValue(value$1);\n\t}\n\tcomparator = (_comparator = comparator) !== null && _comparator !== void 0 ? _comparator : ((element, value$1) => element === toValue(value$1));\n\treturn computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(toValue(element), toValue(value), index, toValue(array))));\n}\n\n//#endregion\n//#region useArrayJoin/index.ts\n/**\n* Reactive `Array.join`\n*\n* @see https://vueuse.org/useArrayJoin\n* @param list - the array was called upon.\n* @param separator - a string to separate each pair of adjacent elements of the array. If omitted, the array elements are separated with a comma (\",\").\n*\n* @returns a string with all array elements joined. If arr.length is 0, the empty string is returned.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayJoin(list, separator) {\n\treturn computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\n//#endregion\n//#region useArrayMap/index.ts\n/**\n* Reactive `Array.map`\n*\n* @see https://vueuse.org/useArrayMap\n* @param list - the array was called upon.\n* @param fn - a function that is called for every element of the given `list`. Each time `fn` executes, the returned value is added to the new array.\n*\n* @returns a new array with each element being the result of the callback function.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayMap(list, fn) {\n\treturn computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\n//#endregion\n//#region useArrayReduce/index.ts\n/**\n* Reactive `Array.reduce`\n*\n* @see https://vueuse.org/useArrayReduce\n* @param list - the array was called upon.\n* @param reducer - a \"reducer\" function.\n* @param args\n*\n* @returns the value that results from running the \"reducer\" callback function to completion over the entire array.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayReduce(list, reducer, ...args) {\n\tconst reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n\treturn computed(() => {\n\t\tconst resolved = toValue(list);\n\t\treturn args.length ? resolved.reduce(reduceCallback, typeof args[0] === \"function\" ? toValue(args[0]()) : toValue(args[0])) : resolved.reduce(reduceCallback);\n\t});\n}\n\n//#endregion\n//#region useArraySome/index.ts\n/**\n* Reactive `Array.some`\n*\n* @see https://vueuse.org/useArraySome\n* @param list - the array was called upon.\n* @param fn - a function to test each element.\n*\n* @returns **true** if the `fn` function returns a **truthy** value for any element from the array. Otherwise, **false**.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArraySome(list, fn) {\n\treturn computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\n//#endregion\n//#region useArrayUnique/index.ts\nfunction uniq(array) {\n\treturn Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n\treturn array.reduce((acc, v) => {\n\t\tif (!acc.some((x) => fn(v, x, array))) acc.push(v);\n\t\treturn acc;\n\t}, []);\n}\n/**\n* reactive unique array\n* @see https://vueuse.org/useArrayUnique\n* @param list - the array was called upon.\n* @param compareFn\n* @returns A computed ref that returns a unique array of items.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useArrayUnique(list, compareFn) {\n\treturn computed(() => {\n\t\tconst resolvedList = toValue(list).map((element) => toValue(element));\n\t\treturn compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n\t});\n}\n\n//#endregion\n//#region useCounter/index.ts\n/**\n* Basic counter with utility functions.\n*\n* @see https://vueuse.org/useCounter\n* @param [initialValue]\n* @param options\n*/\nfunction useCounter(initialValue = 0, options = {}) {\n\tlet _initialValue = unref(initialValue);\n\tconst count = shallowRef(initialValue);\n\tconst { max = Number.POSITIVE_INFINITY, min = Number.NEGATIVE_INFINITY } = options;\n\tconst inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);\n\tconst dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);\n\tconst get$1 = () => count.value;\n\tconst set$1 = (val) => count.value = Math.max(min, Math.min(max, val));\n\tconst reset = (val = _initialValue) => {\n\t\t_initialValue = val;\n\t\treturn set$1(val);\n\t};\n\treturn {\n\t\tcount: shallowReadonly(count),\n\t\tinc,\n\t\tdec,\n\t\tget: get$1,\n\t\tset: set$1,\n\t\treset\n\t};\n}\n\n//#endregion\n//#region useDateFormat/index.ts\nconst REGEX_PARSE = /^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[T\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/i;\nconst REGEX_FORMAT = /[YMDHhms]o|\\[([^\\]]+)\\]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a{1,2}|A{1,2}|m{1,2}|s{1,2}|Z{1,2}|z{1,4}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n\tlet m = hours < 12 ? \"AM\" : \"PM\";\n\tif (hasPeriod) m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n\treturn isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n\tconst suffixes = [\n\t\t\"th\",\n\t\t\"st\",\n\t\t\"nd\",\n\t\t\"rd\"\n\t];\n\tconst v = num % 100;\n\treturn num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n\tvar _options$customMeridi;\n\tconst years = date.getFullYear();\n\tconst month = date.getMonth();\n\tconst days = date.getDate();\n\tconst hours = date.getHours();\n\tconst minutes = date.getMinutes();\n\tconst seconds = date.getSeconds();\n\tconst milliseconds = date.getMilliseconds();\n\tconst day = date.getDay();\n\tconst meridiem = (_options$customMeridi = options.customMeridiem) !== null && _options$customMeridi !== void 0 ? _options$customMeridi : defaultMeridiem;\n\tconst stripTimeZone = (dateString) => {\n\t\tvar _dateString$split$;\n\t\treturn (_dateString$split$ = dateString.split(\" \")[1]) !== null && _dateString$split$ !== void 0 ? _dateString$split$ : \"\";\n\t};\n\tconst matches = {\n\t\tYo: () => formatOrdinal(years),\n\t\tYY: () => String(years).slice(-2),\n\t\tYYYY: () => years,\n\t\tM: () => month + 1,\n\t\tMo: () => formatOrdinal(month + 1),\n\t\tMM: () => `${month + 1}`.padStart(2, \"0\"),\n\t\tMMM: () => date.toLocaleDateString(toValue(options.locales), { month: \"short\" }),\n\t\tMMMM: () => date.toLocaleDateString(toValue(options.locales), { month: \"long\" }),\n\t\tD: () => String(days),\n\t\tDo: () => formatOrdinal(days),\n\t\tDD: () => `${days}`.padStart(2, \"0\"),\n\t\tH: () => String(hours),\n\t\tHo: () => formatOrdinal(hours),\n\t\tHH: () => `${hours}`.padStart(2, \"0\"),\n\t\th: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n\t\tho: () => formatOrdinal(hours % 12 || 12),\n\t\thh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n\t\tm: () => String(minutes),\n\t\tmo: () => formatOrdinal(minutes),\n\t\tmm: () => `${minutes}`.padStart(2, \"0\"),\n\t\ts: () => String(seconds),\n\t\tso: () => formatOrdinal(seconds),\n\t\tss: () => `${seconds}`.padStart(2, \"0\"),\n\t\tSSS: () => `${milliseconds}`.padStart(3, \"0\"),\n\t\td: () => day,\n\t\tdd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"narrow\" }),\n\t\tddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"short\" }),\n\t\tdddd: () => date.toLocaleDateString(toValue(options.locales), { weekday: \"long\" }),\n\t\tA: () => meridiem(hours, minutes),\n\t\tAA: () => meridiem(hours, minutes, false, true),\n\t\ta: () => meridiem(hours, minutes, true),\n\t\taa: () => meridiem(hours, minutes, true, true),\n\t\tz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"shortOffset\" })),\n\t\tzz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"shortOffset\" })),\n\t\tzzz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"shortOffset\" })),\n\t\tzzzz: () => stripTimeZone(date.toLocaleDateString(toValue(options.locales), { timeZoneName: \"longOffset\" }))\n\t};\n\treturn formatStr.replace(REGEX_FORMAT, (match, $1) => {\n\t\tvar _ref, _matches$match;\n\t\treturn (_ref = $1 !== null && $1 !== void 0 ? $1 : (_matches$match = matches[match]) === null || _matches$match === void 0 ? void 0 : _matches$match.call(matches)) !== null && _ref !== void 0 ? _ref : match;\n\t});\n}\nfunction normalizeDate(date) {\n\tif (date === null) return /* @__PURE__ */ new Date(NaN);\n\tif (date === void 0) return /* @__PURE__ */ new Date();\n\tif (date instanceof Date) return new Date(date);\n\tif (typeof date === \"string\" && !/Z$/i.test(date)) {\n\t\tconst d = date.match(REGEX_PARSE);\n\t\tif (d) {\n\t\t\tconst m = d[2] - 1 || 0;\n\t\t\tconst ms = (d[7] || \"0\").substring(0, 3);\n\t\t\treturn new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n\t\t}\n\t}\n\treturn new Date(date);\n}\n/**\n* Get the formatted date according to the string of tokens passed in.\n*\n* @see https://vueuse.org/useDateFormat\n* @param date - The date to format, can either be a `Date` object, a timestamp, or a string\n* @param formatStr - The combination of tokens to format the date\n* @param options - UseDateFormatOptions\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n\treturn computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\n//#endregion\n//#region useIntervalFn/index.ts\n/**\n* Wrapper for `setInterval` with controls\n*\n* @see https://vueuse.org/useIntervalFn\n* @param cb\n* @param interval\n* @param options\n*/\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n\tconst { immediate = true, immediateCallback = false } = options;\n\tlet timer = null;\n\tconst isActive = shallowRef(false);\n\tfunction clean() {\n\t\tif (timer) {\n\t\t\tclearInterval(timer);\n\t\t\ttimer = null;\n\t\t}\n\t}\n\tfunction pause() {\n\t\tisActive.value = false;\n\t\tclean();\n\t}\n\tfunction resume() {\n\t\tconst intervalValue = toValue(interval);\n\t\tif (intervalValue <= 0) return;\n\t\tisActive.value = true;\n\t\tif (immediateCallback) cb();\n\t\tclean();\n\t\tif (isActive.value) timer = setInterval(cb, intervalValue);\n\t}\n\tif (immediate && isClient) resume();\n\tif (isRef(interval) || typeof interval === \"function\") tryOnScopeDispose(watch(interval, () => {\n\t\tif (isActive.value && isClient) resume();\n\t}));\n\ttryOnScopeDispose(pause);\n\treturn {\n\t\tisActive: shallowReadonly(isActive),\n\t\tpause,\n\t\tresume\n\t};\n}\n\n//#endregion\n//#region useInterval/index.ts\nfunction useInterval(interval = 1e3, options = {}) {\n\tconst { controls: exposeControls = false, immediate = true, callback } = options;\n\tconst counter = shallowRef(0);\n\tconst update = () => counter.value += 1;\n\tconst reset = () => {\n\t\tcounter.value = 0;\n\t};\n\tconst controls = useIntervalFn(callback ? () => {\n\t\tupdate();\n\t\tcallback(counter.value);\n\t} : update, interval, { immediate });\n\tif (exposeControls) return {\n\t\tcounter: shallowReadonly(counter),\n\t\treset,\n\t\t...controls\n\t};\n\telse return shallowReadonly(counter);\n}\n\n//#endregion\n//#region useLastChanged/index.ts\nfunction useLastChanged(source, options = {}) {\n\tvar _options$initialValue;\n\tconst ms = shallowRef((_options$initialValue = options.initialValue) !== null && _options$initialValue !== void 0 ? _options$initialValue : null);\n\twatch(source, () => ms.value = timestamp(), options);\n\treturn shallowReadonly(ms);\n}\n\n//#endregion\n//#region useTimeoutFn/index.ts\n/**\n* Wrapper for `setTimeout` with controls.\n*\n* @param cb\n* @param interval\n* @param options\n*/\nfunction useTimeoutFn(cb, interval, options = {}) {\n\tconst { immediate = true, immediateCallback = false } = options;\n\tconst isPending = shallowRef(false);\n\tlet timer;\n\tfunction clear() {\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = void 0;\n\t\t}\n\t}\n\tfunction stop() {\n\t\tisPending.value = false;\n\t\tclear();\n\t}\n\tfunction start(...args) {\n\t\tif (immediateCallback) cb();\n\t\tclear();\n\t\tisPending.value = true;\n\t\ttimer = setTimeout(() => {\n\t\t\tisPending.value = false;\n\t\t\ttimer = void 0;\n\t\t\tcb(...args);\n\t\t}, toValue(interval));\n\t}\n\tif (immediate) {\n\t\tisPending.value = true;\n\t\tif (isClient) start();\n\t}\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisPending: shallowReadonly(isPending),\n\t\tstart,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useTimeout/index.ts\nfunction useTimeout(interval = 1e3, options = {}) {\n\tconst { controls: exposeControls = false, callback } = options;\n\tconst controls = useTimeoutFn(callback !== null && callback !== void 0 ? callback : noop, interval, options);\n\tconst ready = computed(() => !controls.isPending.value);\n\tif (exposeControls) return {\n\t\tready,\n\t\t...controls\n\t};\n\telse return ready;\n}\n\n//#endregion\n//#region useToNumber/index.ts\n/**\n* Reactively convert a string ref to number.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useToNumber(value, options = {}) {\n\tconst { method = \"parseFloat\", radix, nanToZero } = options;\n\treturn computed(() => {\n\t\tlet resolved = toValue(value);\n\t\tif (typeof method === \"function\") resolved = method(resolved);\n\t\telse if (typeof resolved === \"string\") resolved = Number[method](resolved, radix);\n\t\tif (nanToZero && Number.isNaN(resolved)) resolved = 0;\n\t\treturn resolved;\n\t});\n}\n\n//#endregion\n//#region useToString/index.ts\n/**\n* Reactively convert a ref to string.\n*\n* @see https://vueuse.org/useToString\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useToString(value) {\n\treturn computed(() => `${toValue(value)}`);\n}\n\n//#endregion\n//#region useToggle/index.ts\n/**\n* A boolean ref with a toggler\n*\n* @see https://vueuse.org/useToggle\n* @param [initialValue]\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useToggle(initialValue = false, options = {}) {\n\tconst { truthyValue = true, falsyValue = false } = options;\n\tconst valueIsRef = isRef(initialValue);\n\tconst _value = shallowRef(initialValue);\n\tfunction toggle(value) {\n\t\tif (arguments.length) {\n\t\t\t_value.value = value;\n\t\t\treturn _value.value;\n\t\t} else {\n\t\t\tconst truthy = toValue(truthyValue);\n\t\t\t_value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n\t\t\treturn _value.value;\n\t\t}\n\t}\n\tif (valueIsRef) return toggle;\n\telse return [_value, toggle];\n}\n\n//#endregion\n//#region watchArray/index.ts\n/**\n* Watch for an array with additions and removals.\n*\n* @see https://vueuse.org/watchArray\n*/\nfunction watchArray(source, cb, options) {\n\tlet oldList = (options === null || options === void 0 ? void 0 : options.immediate) ? [] : [...typeof source === \"function\" ? source() : Array.isArray(source) ? source : toValue(source)];\n\treturn watch(source, (newList, _, onCleanup) => {\n\t\tconst oldListRemains = Array.from({ length: oldList.length });\n\t\tconst added = [];\n\t\tfor (const obj of newList) {\n\t\t\tlet found = false;\n\t\t\tfor (let i = 0; i < oldList.length; i++) if (!oldListRemains[i] && obj === oldList[i]) {\n\t\t\t\toldListRemains[i] = true;\n\t\t\t\tfound = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (!found) added.push(obj);\n\t\t}\n\t\tconst removed = oldList.filter((_$1, i) => !oldListRemains[i]);\n\t\tcb(newList, oldList, added, removed, onCleanup);\n\t\toldList = [...newList];\n\t}, options);\n}\n\n//#endregion\n//#region watchAtMost/index.ts\nfunction watchAtMost(source, cb, options) {\n\tconst { count,...watchOptions } = options;\n\tconst current = shallowRef(0);\n\tconst { stop, resume, pause } = watchWithFilter(source, (...args) => {\n\t\tcurrent.value += 1;\n\t\tif (current.value >= toValue(count)) nextTick(() => stop());\n\t\tcb(...args);\n\t}, watchOptions);\n\treturn {\n\t\tcount: current,\n\t\tstop,\n\t\tresume,\n\t\tpause\n\t};\n}\n\n//#endregion\n//#region watchDebounced/index.ts\nfunction watchDebounced(source, cb, options = {}) {\n\tconst { debounce = 0, maxWait = void 0,...watchOptions } = options;\n\treturn watchWithFilter(source, cb, {\n\t\t...watchOptions,\n\t\teventFilter: debounceFilter(debounce, { maxWait })\n\t});\n}\n/** @deprecated use `watchDebounced` instead */\nconst debouncedWatch = watchDebounced;\n\n//#endregion\n//#region watchDeep/index.ts\n/**\n* Shorthand for watching value with {deep: true}\n*\n* @see https://vueuse.org/watchDeep\n*/\nfunction watchDeep(source, cb, options) {\n\treturn watch(source, cb, {\n\t\t...options,\n\t\tdeep: true\n\t});\n}\n\n//#endregion\n//#region watchIgnorable/index.ts\nfunction watchIgnorable(source, cb, options = {}) {\n\tconst { eventFilter = bypassFilter,...watchOptions } = options;\n\tconst filteredCb = createFilterWrapper(eventFilter, cb);\n\tlet ignoreUpdates;\n\tlet ignorePrevAsyncUpdates;\n\tlet stop;\n\tif (watchOptions.flush === \"sync\") {\n\t\tlet ignore = false;\n\t\tignorePrevAsyncUpdates = () => {};\n\t\tignoreUpdates = (updater) => {\n\t\t\tignore = true;\n\t\t\tupdater();\n\t\t\tignore = false;\n\t\t};\n\t\tstop = watch(source, (...args) => {\n\t\t\tif (!ignore) filteredCb(...args);\n\t\t}, watchOptions);\n\t} else {\n\t\tconst disposables = [];\n\t\tlet ignoreCounter = 0;\n\t\tlet syncCounter = 0;\n\t\tignorePrevAsyncUpdates = () => {\n\t\t\tignoreCounter = syncCounter;\n\t\t};\n\t\tdisposables.push(watch(source, () => {\n\t\t\tsyncCounter++;\n\t\t}, {\n\t\t\t...watchOptions,\n\t\t\tflush: \"sync\"\n\t\t}));\n\t\tignoreUpdates = (updater) => {\n\t\t\tconst syncCounterPrev = syncCounter;\n\t\t\tupdater();\n\t\t\tignoreCounter += syncCounter - syncCounterPrev;\n\t\t};\n\t\tdisposables.push(watch(source, (...args) => {\n\t\t\tconst ignore = ignoreCounter > 0 && ignoreCounter === syncCounter;\n\t\t\tignoreCounter = 0;\n\t\t\tsyncCounter = 0;\n\t\t\tif (ignore) return;\n\t\t\tfilteredCb(...args);\n\t\t}, watchOptions));\n\t\tstop = () => {\n\t\t\tdisposables.forEach((fn) => fn());\n\t\t};\n\t}\n\treturn {\n\t\tstop,\n\t\tignoreUpdates,\n\t\tignorePrevAsyncUpdates\n\t};\n}\n/** @deprecated use `watchIgnorable` instead */\nconst ignorableWatch = watchIgnorable;\n\n//#endregion\n//#region watchImmediate/index.ts\n/**\n* Shorthand for watching value with {immediate: true}\n*\n* @see https://vueuse.org/watchImmediate\n*/\nfunction watchImmediate(source, cb, options) {\n\treturn watch(source, cb, {\n\t\t...options,\n\t\timmediate: true\n\t});\n}\n\n//#endregion\n//#region watchOnce/index.ts\n/**\n* Shorthand for watching value with { once: true }\n*\n* @see https://vueuse.org/watchOnce\n*/\nfunction watchOnce(source, cb, options) {\n\treturn watch(source, cb, {\n\t\t...options,\n\t\tonce: true\n\t});\n}\n\n//#endregion\n//#region watchThrottled/index.ts\nfunction watchThrottled(source, cb, options = {}) {\n\tconst { throttle = 0, trailing = true, leading = true,...watchOptions } = options;\n\treturn watchWithFilter(source, cb, {\n\t\t...watchOptions,\n\t\teventFilter: throttleFilter(throttle, trailing, leading)\n\t});\n}\n/** @deprecated use `watchThrottled` instead */\nconst throttledWatch = watchThrottled;\n\n//#endregion\n//#region watchTriggerable/index.ts\nfunction watchTriggerable(source, cb, options = {}) {\n\tlet cleanupFn;\n\tfunction onEffect() {\n\t\tif (!cleanupFn) return;\n\t\tconst fn = cleanupFn;\n\t\tcleanupFn = void 0;\n\t\tfn();\n\t}\n\t/** Register the function `cleanupFn` */\n\tfunction onCleanup(callback) {\n\t\tcleanupFn = callback;\n\t}\n\tconst _cb = (value, oldValue) => {\n\t\tonEffect();\n\t\treturn cb(value, oldValue, onCleanup);\n\t};\n\tconst res = watchIgnorable(source, _cb, options);\n\tconst { ignoreUpdates } = res;\n\tconst trigger = () => {\n\t\tlet res$1;\n\t\tignoreUpdates(() => {\n\t\t\tres$1 = _cb(getWatchSources(source), getOldValue(source));\n\t\t});\n\t\treturn res$1;\n\t};\n\treturn {\n\t\t...res,\n\t\ttrigger\n\t};\n}\nfunction getWatchSources(sources) {\n\tif (isReactive(sources)) return sources;\n\tif (Array.isArray(sources)) return sources.map((item) => toValue(item));\n\treturn toValue(sources);\n}\nfunction getOldValue(source) {\n\treturn Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\n//#endregion\n//#region whenever/index.ts\n/**\n* Shorthand for watching value to be truthy\n*\n* @see https://vueuse.org/whenever\n*/\nfunction whenever(source, cb, options) {\n\tconst stop = watch(source, (v, ov, onInvalidate) => {\n\t\tif (v) {\n\t\t\tif (options === null || options === void 0 ? void 0 : options.once) nextTick(() => stop());\n\t\t\tcb(v, ov, onInvalidate);\n\t\t}\n\t}, {\n\t\t...options,\n\t\tonce: false\n\t});\n\treturn stop;\n}\n\n//#endregion\nexport { assert, autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, createReactiveFn, createRef, createSharedComposable, createSingletonPromise, debounceFilter, debouncedRef, debouncedWatch, eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, pausableWatch, promiseTimeout, provideLocal, pxValue, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refManualReset, refThrottled, refWithControl, set, syncRef, syncRefs, throttleFilter, throttledRef, throttledWatch, timestamp, toArray, toReactive, toRef, toRefs, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };","import { bypassFilter, camelize, clamp, computedWithControl, containsProp, createEventHook, createFilterWrapper, createRef, createSingletonPromise, debounceFilter, hasOwn, identity, increaseWithUnit, injectLocal, isClient, isDef, isIOS, isObject, isWorker, makeDestructurable, noop, notNullish, objectEntries, objectOmit, objectPick, pausableFilter, pausableWatch, promiseTimeout, provideLocal, pxValue, syncRef, throttleFilter, timestamp, toArray, toRef, toRefs, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useDebounceFn, useIntervalFn, useThrottleFn, useTimeoutFn, watchIgnorable, watchImmediate, watchOnce, watchWithFilter, whenever } from \"@vueuse/shared\";\nimport { Fragment, TransitionGroup, computed, customRef, defineComponent, getCurrentInstance, getCurrentScope, h, hasInjectionContext, inject, isReadonly, isRef, markRaw, nextTick, onBeforeUpdate, onMounted, onUpdated, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, toRaw, toValue, unref, watch, watchEffect } from \"vue\";\n\nexport * from \"@vueuse/shared\"\n\n//#region computedAsync/index.ts\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n\tvar _globalThis$reportErr;\n\tlet options;\n\tif (isRef(optionsOrRef)) options = { evaluating: optionsOrRef };\n\telse options = optionsOrRef || {};\n\tconst { lazy = false, flush = \"sync\", evaluating = void 0, shallow = true, onError = (_globalThis$reportErr = globalThis.reportError) !== null && _globalThis$reportErr !== void 0 ? _globalThis$reportErr : noop } = options;\n\tconst started = shallowRef(!lazy);\n\tconst current = shallow ? shallowRef(initialState) : ref(initialState);\n\tlet counter = 0;\n\twatchEffect(async (onInvalidate) => {\n\t\tif (!started.value) return;\n\t\tcounter++;\n\t\tconst counterAtBeginning = counter;\n\t\tlet hasFinished = false;\n\t\tif (evaluating) Promise.resolve().then(() => {\n\t\t\tevaluating.value = true;\n\t\t});\n\t\ttry {\n\t\t\tconst result = await evaluationCallback((cancelCallback) => {\n\t\t\t\tonInvalidate(() => {\n\t\t\t\t\tif (evaluating) evaluating.value = false;\n\t\t\t\t\tif (!hasFinished) cancelCallback();\n\t\t\t\t});\n\t\t\t});\n\t\t\tif (counterAtBeginning === counter) current.value = result;\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t} finally {\n\t\t\tif (evaluating && counterAtBeginning === counter) evaluating.value = false;\n\t\t\thasFinished = true;\n\t\t}\n\t}, { flush });\n\tif (lazy) return computed(() => {\n\t\tstarted.value = true;\n\t\treturn current.value;\n\t});\n\telse return current;\n}\n/** @deprecated use `computedAsync` instead */\nconst asyncComputed = computedAsync;\n\n//#endregion\n//#region computedInject/index.ts\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n\tlet source = inject(key);\n\tif (defaultSource) source = inject(key, defaultSource);\n\tif (treatDefaultAsFactory) source = inject(key, defaultSource, treatDefaultAsFactory);\n\tif (typeof options === \"function\") return computed((oldValue) => options(source, oldValue));\n\telse return computed({\n\t\tget: (oldValue) => options.get(source, oldValue),\n\t\tset: options.set\n\t});\n}\n\n//#endregion\n//#region createReusableTemplate/index.ts\n/**\n* This function creates `define` and `reuse` components in pair,\n* It also allow to pass a generic to bind with type.\n*\n* @see https://vueuse.org/createReusableTemplate\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createReusableTemplate(options = {}) {\n\tconst { inheritAttrs = true } = options;\n\tconst render = shallowRef();\n\tconst define = defineComponent({ setup(_, { slots }) {\n\t\treturn () => {\n\t\t\trender.value = slots.default;\n\t\t};\n\t} });\n\tconst reuse = defineComponent({\n\t\tinheritAttrs,\n\t\tprops: options.props,\n\t\tsetup(props, { attrs, slots }) {\n\t\t\treturn () => {\n\t\t\t\tvar _render$value;\n\t\t\t\tif (!render.value && true) throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n\t\t\t\tconst vnode = (_render$value = render.value) === null || _render$value === void 0 ? void 0 : _render$value.call(render, {\n\t\t\t\t\t...options.props == null ? keysToCamelKebabCase(attrs) : props,\n\t\t\t\t\t$slots: slots\n\t\t\t\t});\n\t\t\t\treturn inheritAttrs && (vnode === null || vnode === void 0 ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n\t\t\t};\n\t\t}\n\t});\n\treturn makeDestructurable({\n\t\tdefine,\n\t\treuse\n\t}, [define, reuse]);\n}\nfunction keysToCamelKebabCase(obj) {\n\tconst newObj = {};\n\tfor (const key in obj) newObj[camelize(key)] = obj[key];\n\treturn newObj;\n}\n\n//#endregion\n//#region createTemplatePromise/index.ts\n/**\n* Creates a template promise component.\n*\n* @see https://vueuse.org/createTemplatePromise\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createTemplatePromise(options = {}) {\n\tlet index = 0;\n\tconst instances = ref([]);\n\tfunction create(...args) {\n\t\tconst props = shallowReactive({\n\t\t\tkey: index++,\n\t\t\targs,\n\t\t\tpromise: void 0,\n\t\t\tresolve: () => {},\n\t\t\treject: () => {},\n\t\t\tisResolving: false,\n\t\t\toptions\n\t\t});\n\t\tinstances.value.push(props);\n\t\tprops.promise = new Promise((_resolve, _reject) => {\n\t\t\tprops.resolve = (v) => {\n\t\t\t\tprops.isResolving = true;\n\t\t\t\treturn _resolve(v);\n\t\t\t};\n\t\t\tprops.reject = _reject;\n\t\t}).finally(() => {\n\t\t\tprops.promise = void 0;\n\t\t\tconst index$1 = instances.value.indexOf(props);\n\t\t\tif (index$1 !== -1) instances.value.splice(index$1, 1);\n\t\t});\n\t\treturn props.promise;\n\t}\n\tfunction start(...args) {\n\t\tif (options.singleton && instances.value.length > 0) return instances.value[0].promise;\n\t\treturn create(...args);\n\t}\n\tconst component = defineComponent((_, { slots }) => {\n\t\tconst renderList = () => instances.value.map((props) => {\n\t\t\tvar _slots$default;\n\t\t\treturn h(Fragment, { key: props.key }, (_slots$default = slots.default) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots, props));\n\t\t});\n\t\tif (options.transition) return () => h(TransitionGroup, options.transition, renderList);\n\t\treturn renderList;\n\t});\n\tcomponent.start = start;\n\treturn component;\n}\n\n//#endregion\n//#region createUnrefFn/index.ts\n/**\n* Make a plain function accepting ref and raw values as arguments.\n* Returns the same value the unconverted function returns, with proper typing.\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction createUnrefFn(fn) {\n\treturn function(...args) {\n\t\treturn fn.apply(this, args.map((i) => toValue(i)));\n\t};\n}\n\n//#endregion\n//#region _configurable.ts\nconst defaultWindow = isClient ? window : void 0;\nconst defaultDocument = isClient ? window.document : void 0;\nconst defaultNavigator = isClient ? window.navigator : void 0;\nconst defaultLocation = isClient ? window.location : void 0;\n\n//#endregion\n//#region unrefElement/index.ts\n/**\n* Get the dom element of a ref of element or Vue component instance\n*\n* @param elRef\n*/\nfunction unrefElement(elRef) {\n\tvar _$el;\n\tconst plain = toValue(elRef);\n\treturn (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;\n}\n\n//#endregion\n//#region useEventListener/index.ts\nfunction useEventListener(...args) {\n\tconst register = (el, event, listener, options) => {\n\t\tel.addEventListener(event, listener, options);\n\t\treturn () => el.removeEventListener(event, listener, options);\n\t};\n\tconst firstParamTargets = computed(() => {\n\t\tconst test = toArray(toValue(args[0])).filter((e) => e != null);\n\t\treturn test.every((e) => typeof e !== \"string\") ? test : void 0;\n\t});\n\treturn watchImmediate(() => {\n\t\tvar _firstParamTargets$va, _firstParamTargets$va2;\n\t\treturn [\n\t\t\t(_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),\n\t\t\ttoArray(toValue(firstParamTargets.value ? args[1] : args[0])),\n\t\t\ttoArray(unref(firstParamTargets.value ? args[2] : args[1])),\n\t\t\ttoValue(firstParamTargets.value ? args[3] : args[2])\n\t\t];\n\t}, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {\n\t\tif (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;\n\t\tconst optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;\n\t\tconst cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));\n\t\tonCleanup(() => {\n\t\t\tcleanups.forEach((fn) => fn());\n\t\t});\n\t}, { flush: \"post\" });\n}\n\n//#endregion\n//#region onClickOutside/index.ts\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n\tconst { window: window$1 = defaultWindow, ignore = [], capture = true, detectIframe = false, controls = false } = options;\n\tif (!window$1) return controls ? {\n\t\tstop: noop,\n\t\tcancel: noop,\n\t\ttrigger: noop\n\t} : noop;\n\tif (isIOS && !_iOSWorkaround) {\n\t\t_iOSWorkaround = true;\n\t\tconst listenerOptions = { passive: true };\n\t\tArray.from(window$1.document.body.children).forEach((el) => el.addEventListener(\"click\", noop, listenerOptions));\n\t\twindow$1.document.documentElement.addEventListener(\"click\", noop, listenerOptions);\n\t}\n\tlet shouldListen = true;\n\tconst shouldIgnore = (event) => {\n\t\treturn toValue(ignore).some((target$1) => {\n\t\t\tif (typeof target$1 === \"string\") return Array.from(window$1.document.querySelectorAll(target$1)).some((el) => el === event.target || event.composedPath().includes(el));\n\t\t\telse {\n\t\t\t\tconst el = unrefElement(target$1);\n\t\t\t\treturn el && (event.target === el || event.composedPath().includes(el));\n\t\t\t}\n\t\t});\n\t};\n\t/**\n\t* Determines if the given target has multiple root elements.\n\t* Referenced from: https://github.com/vuejs/test-utils/blob/ccb460be55f9f6be05ab708500a41ec8adf6f4bc/src/vue-wrapper.ts#L21\n\t*/\n\tfunction hasMultipleRoots(target$1) {\n\t\tconst vm = toValue(target$1);\n\t\treturn vm && vm.$.subTree.shapeFlag === 16;\n\t}\n\tfunction checkMultipleRoots(target$1, event) {\n\t\tconst vm = toValue(target$1);\n\t\tconst children = vm.$.subTree && vm.$.subTree.children;\n\t\tif (children == null || !Array.isArray(children)) return false;\n\t\treturn children.some((child) => child.el === event.target || event.composedPath().includes(child.el));\n\t}\n\tconst listener = (event) => {\n\t\tconst el = unrefElement(target);\n\t\tif (event.target == null) return;\n\t\tif (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event)) return;\n\t\tif (!el || el === event.target || event.composedPath().includes(el)) return;\n\t\tif (\"detail\" in event && event.detail === 0) shouldListen = !shouldIgnore(event);\n\t\tif (!shouldListen) {\n\t\t\tshouldListen = true;\n\t\t\treturn;\n\t\t}\n\t\thandler(event);\n\t};\n\tlet isProcessingClick = false;\n\tconst cleanup = [\n\t\tuseEventListener(window$1, \"click\", (event) => {\n\t\t\tif (!isProcessingClick) {\n\t\t\t\tisProcessingClick = true;\n\t\t\t\tsetTimeout(() => {\n\t\t\t\t\tisProcessingClick = false;\n\t\t\t\t}, 0);\n\t\t\t\tlistener(event);\n\t\t\t}\n\t\t}, {\n\t\t\tpassive: true,\n\t\t\tcapture\n\t\t}),\n\t\tuseEventListener(window$1, \"pointerdown\", (e) => {\n\t\t\tconst el = unrefElement(target);\n\t\t\tshouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));\n\t\t}, { passive: true }),\n\t\tdetectIframe && useEventListener(window$1, \"blur\", (event) => {\n\t\t\tsetTimeout(() => {\n\t\t\t\tvar _window$document$acti;\n\t\t\t\tconst el = unrefElement(target);\n\t\t\t\tif (((_window$document$acti = window$1.document.activeElement) === null || _window$document$acti === void 0 ? void 0 : _window$document$acti.tagName) === \"IFRAME\" && !(el === null || el === void 0 ? void 0 : el.contains(window$1.document.activeElement))) handler(event);\n\t\t\t}, 0);\n\t\t}, { passive: true })\n\t].filter(Boolean);\n\tconst stop = () => cleanup.forEach((fn) => fn());\n\tif (controls) return {\n\t\tstop,\n\t\tcancel: () => {\n\t\t\tshouldListen = false;\n\t\t},\n\t\ttrigger: (event) => {\n\t\t\tshouldListen = true;\n\t\t\tlistener(event);\n\t\t\tshouldListen = false;\n\t\t}\n\t};\n\treturn stop;\n}\n\n//#endregion\n//#region useMounted/index.ts\n/**\n* Mounted state in ref.\n*\n* @see https://vueuse.org/useMounted\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useMounted() {\n\tconst isMounted = shallowRef(false);\n\tconst instance = getCurrentInstance();\n\tif (instance) onMounted(() => {\n\t\tisMounted.value = true;\n\t}, instance);\n\treturn isMounted;\n}\n\n//#endregion\n//#region useSupported/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useSupported(callback) {\n\tconst isMounted = useMounted();\n\treturn computed(() => {\n\t\tisMounted.value;\n\t\treturn Boolean(callback());\n\t});\n}\n\n//#endregion\n//#region useMutationObserver/index.ts\n/**\n* Watch for changes being made to the DOM tree.\n*\n* @see https://vueuse.org/useMutationObserver\n* @see https://developer.mozilla.org/en-US/docs/Web/API/MutationObserver MutationObserver MDN\n* @param target\n* @param callback\n* @param options\n*/\nfunction useMutationObserver(target, callback, options = {}) {\n\tconst { window: window$1 = defaultWindow,...mutationOptions } = options;\n\tlet observer;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"MutationObserver\" in window$1);\n\tconst cleanup = () => {\n\t\tif (observer) {\n\t\t\tobserver.disconnect();\n\t\t\tobserver = void 0;\n\t\t}\n\t};\n\tconst stopWatch = watch(computed(() => {\n\t\tconst items = toArray(toValue(target)).map(unrefElement).filter(notNullish);\n\t\treturn new Set(items);\n\t}), (newTargets) => {\n\t\tcleanup();\n\t\tif (isSupported.value && newTargets.size) {\n\t\t\tobserver = new MutationObserver(callback);\n\t\t\tnewTargets.forEach((el) => observer.observe(el, mutationOptions));\n\t\t}\n\t}, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t});\n\tconst takeRecords = () => {\n\t\treturn observer === null || observer === void 0 ? void 0 : observer.takeRecords();\n\t};\n\tconst stop = () => {\n\t\tstopWatch();\n\t\tcleanup();\n\t};\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisSupported,\n\t\tstop,\n\t\ttakeRecords\n\t};\n}\n\n//#endregion\n//#region onElementRemoval/index.ts\n/**\n* Fires when the element or any element containing it is removed.\n*\n* @param target\n* @param callback\n* @param options\n*/\nfunction onElementRemoval(target, callback, options = {}) {\n\tconst { window: window$1 = defaultWindow, document: document$1 = window$1 === null || window$1 === void 0 ? void 0 : window$1.document, flush = \"sync\" } = options;\n\tif (!window$1 || !document$1) return noop;\n\tlet stopFn;\n\tconst cleanupAndUpdate = (fn) => {\n\t\tstopFn === null || stopFn === void 0 || stopFn();\n\t\tstopFn = fn;\n\t};\n\tconst stopWatch = watchEffect(() => {\n\t\tconst el = unrefElement(target);\n\t\tif (el) {\n\t\t\tconst { stop } = useMutationObserver(document$1, (mutationsList) => {\n\t\t\t\tif (mutationsList.map((mutation) => [...mutation.removedNodes]).flat().some((node) => node === el || node.contains(el))) callback(mutationsList);\n\t\t\t}, {\n\t\t\t\twindow: window$1,\n\t\t\t\tchildList: true,\n\t\t\t\tsubtree: true\n\t\t\t});\n\t\t\tcleanupAndUpdate(stop);\n\t\t}\n\t}, { flush });\n\tconst stopHandle = () => {\n\t\tstopWatch();\n\t\tcleanupAndUpdate();\n\t};\n\ttryOnScopeDispose(stopHandle);\n\treturn stopHandle;\n}\n\n//#endregion\n//#region onKeyStroke/index.ts\nfunction createKeyPredicate(keyFilter) {\n\tif (typeof keyFilter === \"function\") return keyFilter;\n\telse if (typeof keyFilter === \"string\") return (event) => event.key === keyFilter;\n\telse if (Array.isArray(keyFilter)) return (event) => keyFilter.includes(event.key);\n\treturn () => true;\n}\nfunction onKeyStroke(...args) {\n\tlet key;\n\tlet handler;\n\tlet options = {};\n\tif (args.length === 3) {\n\t\tkey = args[0];\n\t\thandler = args[1];\n\t\toptions = args[2];\n\t} else if (args.length === 2) if (typeof args[1] === \"object\") {\n\t\tkey = true;\n\t\thandler = args[0];\n\t\toptions = args[1];\n\t} else {\n\t\tkey = args[0];\n\t\thandler = args[1];\n\t}\n\telse {\n\t\tkey = true;\n\t\thandler = args[0];\n\t}\n\tconst { target = defaultWindow, eventName = \"keydown\", passive = false, dedupe = false } = options;\n\tconst predicate = createKeyPredicate(key);\n\tconst listener = (e) => {\n\t\tif (e.repeat && toValue(dedupe)) return;\n\t\tif (predicate(e)) handler(e);\n\t};\n\treturn useEventListener(target, eventName, listener, passive);\n}\n/**\n* Listen to the keydown event of the given key.\n*\n* @see https://vueuse.org/onKeyStroke\n* @param key\n* @param handler\n* @param options\n*/\nfunction onKeyDown(key, handler, options = {}) {\n\treturn onKeyStroke(key, handler, {\n\t\t...options,\n\t\teventName: \"keydown\"\n\t});\n}\n/**\n* Listen to the keypress event of the given key.\n*\n* @see https://vueuse.org/onKeyStroke\n* @param key\n* @param handler\n* @param options\n*/\nfunction onKeyPressed(key, handler, options = {}) {\n\treturn onKeyStroke(key, handler, {\n\t\t...options,\n\t\teventName: \"keypress\"\n\t});\n}\n/**\n* Listen to the keyup event of the given key.\n*\n* @see https://vueuse.org/onKeyStroke\n* @param key\n* @param handler\n* @param options\n*/\nfunction onKeyUp(key, handler, options = {}) {\n\treturn onKeyStroke(key, handler, {\n\t\t...options,\n\t\teventName: \"keyup\"\n\t});\n}\n\n//#endregion\n//#region onLongPress/index.ts\nconst DEFAULT_DELAY = 500;\nconst DEFAULT_THRESHOLD = 10;\nfunction onLongPress(target, handler, options) {\n\tvar _options$modifiers10, _options$modifiers11;\n\tconst elementRef = computed(() => unrefElement(target));\n\tlet timeout;\n\tlet posStart;\n\tlet startTimestamp;\n\tlet hasLongPressed = false;\n\tfunction clear() {\n\t\tif (timeout) {\n\t\t\tclearTimeout(timeout);\n\t\t\ttimeout = void 0;\n\t\t}\n\t\tposStart = void 0;\n\t\tstartTimestamp = void 0;\n\t\thasLongPressed = false;\n\t}\n\tfunction getDelay(ev) {\n\t\tconst delay = options === null || options === void 0 ? void 0 : options.delay;\n\t\tif (typeof delay === \"function\") return delay(ev);\n\t\treturn delay !== null && delay !== void 0 ? delay : DEFAULT_DELAY;\n\t}\n\tfunction onRelease(ev) {\n\t\tvar _options$modifiers, _options$modifiers2, _options$modifiers3;\n\t\tconst [_startTimestamp, _posStart, _hasLongPressed] = [\n\t\t\tstartTimestamp,\n\t\t\tposStart,\n\t\t\thasLongPressed\n\t\t];\n\t\tclear();\n\t\tif (!(options === null || options === void 0 ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp) return;\n\t\tif ((options === null || options === void 0 || (_options$modifiers = options.modifiers) === null || _options$modifiers === void 0 ? void 0 : _options$modifiers.self) && ev.target !== elementRef.value) return;\n\t\tif (options === null || options === void 0 || (_options$modifiers2 = options.modifiers) === null || _options$modifiers2 === void 0 ? void 0 : _options$modifiers2.prevent) ev.preventDefault();\n\t\tif (options === null || options === void 0 || (_options$modifiers3 = options.modifiers) === null || _options$modifiers3 === void 0 ? void 0 : _options$modifiers3.stop) ev.stopPropagation();\n\t\tconst dx = ev.x - _posStart.x;\n\t\tconst dy = ev.y - _posStart.y;\n\t\tconst distance = Math.sqrt(dx * dx + dy * dy);\n\t\toptions.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed);\n\t}\n\tfunction onDown(ev) {\n\t\tvar _options$modifiers4, _options$modifiers5, _options$modifiers6;\n\t\tif ((options === null || options === void 0 || (_options$modifiers4 = options.modifiers) === null || _options$modifiers4 === void 0 ? void 0 : _options$modifiers4.self) && ev.target !== elementRef.value) return;\n\t\tclear();\n\t\tif (options === null || options === void 0 || (_options$modifiers5 = options.modifiers) === null || _options$modifiers5 === void 0 ? void 0 : _options$modifiers5.prevent) ev.preventDefault();\n\t\tif (options === null || options === void 0 || (_options$modifiers6 = options.modifiers) === null || _options$modifiers6 === void 0 ? void 0 : _options$modifiers6.stop) ev.stopPropagation();\n\t\tposStart = {\n\t\t\tx: ev.x,\n\t\t\ty: ev.y\n\t\t};\n\t\tstartTimestamp = ev.timeStamp;\n\t\ttimeout = setTimeout(() => {\n\t\t\thasLongPressed = true;\n\t\t\thandler(ev);\n\t\t}, getDelay(ev));\n\t}\n\tfunction onMove(ev) {\n\t\tvar _options$modifiers7, _options$modifiers8, _options$modifiers9, _options$distanceThre;\n\t\tif ((options === null || options === void 0 || (_options$modifiers7 = options.modifiers) === null || _options$modifiers7 === void 0 ? void 0 : _options$modifiers7.self) && ev.target !== elementRef.value) return;\n\t\tif (!posStart || (options === null || options === void 0 ? void 0 : options.distanceThreshold) === false) return;\n\t\tif (options === null || options === void 0 || (_options$modifiers8 = options.modifiers) === null || _options$modifiers8 === void 0 ? void 0 : _options$modifiers8.prevent) ev.preventDefault();\n\t\tif (options === null || options === void 0 || (_options$modifiers9 = options.modifiers) === null || _options$modifiers9 === void 0 ? void 0 : _options$modifiers9.stop) ev.stopPropagation();\n\t\tconst dx = ev.x - posStart.x;\n\t\tconst dy = ev.y - posStart.y;\n\t\tif (Math.sqrt(dx * dx + dy * dy) >= ((_options$distanceThre = options === null || options === void 0 ? void 0 : options.distanceThreshold) !== null && _options$distanceThre !== void 0 ? _options$distanceThre : DEFAULT_THRESHOLD)) clear();\n\t}\n\tconst listenerOptions = {\n\t\tcapture: options === null || options === void 0 || (_options$modifiers10 = options.modifiers) === null || _options$modifiers10 === void 0 ? void 0 : _options$modifiers10.capture,\n\t\tonce: options === null || options === void 0 || (_options$modifiers11 = options.modifiers) === null || _options$modifiers11 === void 0 ? void 0 : _options$modifiers11.once\n\t};\n\tconst cleanup = [\n\t\tuseEventListener(elementRef, \"pointerdown\", onDown, listenerOptions),\n\t\tuseEventListener(elementRef, \"pointermove\", onMove, listenerOptions),\n\t\tuseEventListener(elementRef, [\"pointerup\", \"pointerleave\"], onRelease, listenerOptions)\n\t];\n\tconst stop = () => cleanup.forEach((fn) => fn());\n\treturn stop;\n}\n\n//#endregion\n//#region onStartTyping/index.ts\nfunction isFocusedElementEditable() {\n\tconst { activeElement, body } = document;\n\tif (!activeElement) return false;\n\tif (activeElement === body) return false;\n\tswitch (activeElement.tagName) {\n\t\tcase \"INPUT\":\n\t\tcase \"TEXTAREA\": return true;\n\t}\n\treturn activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({ keyCode, metaKey, ctrlKey, altKey }) {\n\tif (metaKey || ctrlKey || altKey) return false;\n\tif (keyCode >= 48 && keyCode <= 57 || keyCode >= 96 && keyCode <= 105) return true;\n\tif (keyCode >= 65 && keyCode <= 90) return true;\n\treturn false;\n}\n/**\n* Fires when users start typing on non-editable elements.\n*\n* @see https://vueuse.org/onStartTyping\n* @param callback\n* @param options\n*/\nfunction onStartTyping(callback, options = {}) {\n\tconst { document: document$1 = defaultDocument } = options;\n\tconst keydown = (event) => {\n\t\tif (!isFocusedElementEditable() && isTypedCharValid(event)) callback(event);\n\t};\n\tif (document$1) useEventListener(document$1, \"keydown\", keydown, { passive: true });\n}\n\n//#endregion\n//#region templateRef/index.ts\n/**\n* @deprecated Use Vue's built-in `useTemplateRef` instead.\n*\n* Shorthand for binding ref to template element.\n*\n* @see https://vueuse.org/templateRef\n* @param key\n* @param initialValue\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction templateRef(key, initialValue = null) {\n\tconst instance = getCurrentInstance();\n\tlet _trigger = () => {};\n\tconst element = customRef((track, trigger) => {\n\t\t_trigger = trigger;\n\t\treturn {\n\t\t\tget() {\n\t\t\t\tvar _instance$proxy$$refs, _instance$proxy;\n\t\t\t\ttrack();\n\t\t\t\treturn (_instance$proxy$$refs = instance === null || instance === void 0 || (_instance$proxy = instance.proxy) === null || _instance$proxy === void 0 ? void 0 : _instance$proxy.$refs[key]) !== null && _instance$proxy$$refs !== void 0 ? _instance$proxy$$refs : initialValue;\n\t\t\t},\n\t\t\tset() {}\n\t\t};\n\t});\n\ttryOnMounted(_trigger);\n\tonUpdated(_trigger);\n\treturn element;\n}\n\n//#endregion\n//#region useActiveElement/index.ts\n/**\n* Reactive `document.activeElement`\n*\n* @see https://vueuse.org/useActiveElement\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useActiveElement(options = {}) {\n\tvar _options$document;\n\tconst { window: window$1 = defaultWindow, deep = true, triggerOnRemoval = false } = options;\n\tconst document$1 = (_options$document = options.document) !== null && _options$document !== void 0 ? _options$document : window$1 === null || window$1 === void 0 ? void 0 : window$1.document;\n\tconst getDeepActiveElement = () => {\n\t\tlet element = document$1 === null || document$1 === void 0 ? void 0 : document$1.activeElement;\n\t\tif (deep) {\n\t\t\tvar _element$shadowRoot;\n\t\t\twhile (element === null || element === void 0 ? void 0 : element.shadowRoot) element = element === null || element === void 0 || (_element$shadowRoot = element.shadowRoot) === null || _element$shadowRoot === void 0 ? void 0 : _element$shadowRoot.activeElement;\n\t\t}\n\t\treturn element;\n\t};\n\tconst activeElement = shallowRef();\n\tconst trigger = () => {\n\t\tactiveElement.value = getDeepActiveElement();\n\t};\n\tif (window$1) {\n\t\tconst listenerOptions = {\n\t\t\tcapture: true,\n\t\t\tpassive: true\n\t\t};\n\t\tuseEventListener(window$1, \"blur\", (event) => {\n\t\t\tif (event.relatedTarget !== null) return;\n\t\t\ttrigger();\n\t\t}, listenerOptions);\n\t\tuseEventListener(window$1, \"focus\", trigger, listenerOptions);\n\t}\n\tif (triggerOnRemoval) onElementRemoval(activeElement, trigger, { document: document$1 });\n\ttrigger();\n\treturn activeElement;\n}\n\n//#endregion\n//#region useRafFn/index.ts\n/**\n* Call function on every `requestAnimationFrame`. With controls of pausing and resuming.\n*\n* @see https://vueuse.org/useRafFn\n* @param fn\n* @param options\n*/\nfunction useRafFn(fn, options = {}) {\n\tconst { immediate = true, fpsLimit = void 0, window: window$1 = defaultWindow, once = false } = options;\n\tconst isActive = shallowRef(false);\n\tconst intervalLimit = computed(() => {\n\t\treturn fpsLimit ? 1e3 / toValue(fpsLimit) : null;\n\t});\n\tlet previousFrameTimestamp = 0;\n\tlet rafId = null;\n\tfunction loop(timestamp$1) {\n\t\tif (!isActive.value || !window$1) return;\n\t\tif (!previousFrameTimestamp) previousFrameTimestamp = timestamp$1;\n\t\tconst delta = timestamp$1 - previousFrameTimestamp;\n\t\tif (intervalLimit.value && delta < intervalLimit.value) {\n\t\t\trafId = window$1.requestAnimationFrame(loop);\n\t\t\treturn;\n\t\t}\n\t\tpreviousFrameTimestamp = timestamp$1;\n\t\tfn({\n\t\t\tdelta,\n\t\t\ttimestamp: timestamp$1\n\t\t});\n\t\tif (once) {\n\t\t\tisActive.value = false;\n\t\t\trafId = null;\n\t\t\treturn;\n\t\t}\n\t\trafId = window$1.requestAnimationFrame(loop);\n\t}\n\tfunction resume() {\n\t\tif (!isActive.value && window$1) {\n\t\t\tisActive.value = true;\n\t\t\tpreviousFrameTimestamp = 0;\n\t\t\trafId = window$1.requestAnimationFrame(loop);\n\t\t}\n\t}\n\tfunction pause() {\n\t\tisActive.value = false;\n\t\tif (rafId != null && window$1) {\n\t\t\twindow$1.cancelAnimationFrame(rafId);\n\t\t\trafId = null;\n\t\t}\n\t}\n\tif (immediate) resume();\n\ttryOnScopeDispose(pause);\n\treturn {\n\t\tisActive: readonly(isActive),\n\t\tpause,\n\t\tresume\n\t};\n}\n\n//#endregion\n//#region useAnimate/index.ts\n/**\n* Reactive Web Animations API\n*\n* @see https://vueuse.org/useAnimate\n* @param target\n* @param keyframes\n* @param options\n*/\nfunction useAnimate(target, keyframes, options) {\n\tlet config;\n\tlet animateOptions;\n\tif (isObject(options)) {\n\t\tconfig = options;\n\t\tanimateOptions = objectOmit(options, [\n\t\t\t\"window\",\n\t\t\t\"immediate\",\n\t\t\t\"commitStyles\",\n\t\t\t\"persist\",\n\t\t\t\"onReady\",\n\t\t\t\"onError\"\n\t\t]);\n\t} else {\n\t\tconfig = { duration: options };\n\t\tanimateOptions = options;\n\t}\n\tconst { window: window$1 = defaultWindow, immediate = true, commitStyles, persist, playbackRate: _playbackRate = 1, onReady, onError = (e) => {\n\t\tconsole.error(e);\n\t} } = config;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && HTMLElement && \"animate\" in HTMLElement.prototype);\n\tconst animate = shallowRef(void 0);\n\tconst store = shallowReactive({\n\t\tstartTime: null,\n\t\tcurrentTime: null,\n\t\ttimeline: null,\n\t\tplaybackRate: _playbackRate,\n\t\tpending: false,\n\t\tplayState: immediate ? \"idle\" : \"paused\",\n\t\treplaceState: \"active\"\n\t});\n\tconst pending = computed(() => store.pending);\n\tconst playState = computed(() => store.playState);\n\tconst replaceState = computed(() => store.replaceState);\n\tconst startTime = computed({\n\t\tget() {\n\t\t\treturn store.startTime;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.startTime = value;\n\t\t\tif (animate.value) animate.value.startTime = value;\n\t\t}\n\t});\n\tconst currentTime = computed({\n\t\tget() {\n\t\t\treturn store.currentTime;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.currentTime = value;\n\t\t\tif (animate.value) {\n\t\t\t\tanimate.value.currentTime = value;\n\t\t\t\tsyncResume();\n\t\t\t}\n\t\t}\n\t});\n\tconst timeline = computed({\n\t\tget() {\n\t\t\treturn store.timeline;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.timeline = value;\n\t\t\tif (animate.value) animate.value.timeline = value;\n\t\t}\n\t});\n\tconst playbackRate = computed({\n\t\tget() {\n\t\t\treturn store.playbackRate;\n\t\t},\n\t\tset(value) {\n\t\t\tstore.playbackRate = value;\n\t\t\tif (animate.value) animate.value.playbackRate = value;\n\t\t}\n\t});\n\tconst play = () => {\n\t\tif (animate.value) try {\n\t\t\tanimate.value.play();\n\t\t\tsyncResume();\n\t\t} catch (e) {\n\t\t\tsyncPause();\n\t\t\tonError(e);\n\t\t}\n\t\telse update();\n\t};\n\tconst pause = () => {\n\t\ttry {\n\t\t\tvar _animate$value;\n\t\t\t(_animate$value = animate.value) === null || _animate$value === void 0 || _animate$value.pause();\n\t\t\tsyncPause();\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t};\n\tconst reverse = () => {\n\t\tif (!animate.value) update();\n\t\ttry {\n\t\t\tvar _animate$value2;\n\t\t\t(_animate$value2 = animate.value) === null || _animate$value2 === void 0 || _animate$value2.reverse();\n\t\t\tsyncResume();\n\t\t} catch (e) {\n\t\t\tsyncPause();\n\t\t\tonError(e);\n\t\t}\n\t};\n\tconst finish = () => {\n\t\ttry {\n\t\t\tvar _animate$value3;\n\t\t\t(_animate$value3 = animate.value) === null || _animate$value3 === void 0 || _animate$value3.finish();\n\t\t\tsyncPause();\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t};\n\tconst cancel = () => {\n\t\ttry {\n\t\t\tvar _animate$value4;\n\t\t\t(_animate$value4 = animate.value) === null || _animate$value4 === void 0 || _animate$value4.cancel();\n\t\t\tsyncPause();\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t};\n\twatch(() => unrefElement(target), (el) => {\n\t\tif (el) update(true);\n\t\telse animate.value = void 0;\n\t});\n\twatch(() => keyframes, (value) => {\n\t\tif (animate.value) {\n\t\t\tupdate();\n\t\t\tconst targetEl = unrefElement(target);\n\t\t\tif (targetEl) animate.value.effect = new KeyframeEffect(targetEl, toValue(value), animateOptions);\n\t\t}\n\t}, { deep: true });\n\ttryOnMounted(() => update(true), false);\n\ttryOnScopeDispose(cancel);\n\tfunction update(init) {\n\t\tconst el = unrefElement(target);\n\t\tif (!isSupported.value || !el) return;\n\t\tif (!animate.value) animate.value = el.animate(toValue(keyframes), animateOptions);\n\t\tif (persist) animate.value.persist();\n\t\tif (_playbackRate !== 1) animate.value.playbackRate = _playbackRate;\n\t\tif (init && !immediate) animate.value.pause();\n\t\telse syncResume();\n\t\tonReady === null || onReady === void 0 || onReady(animate.value);\n\t}\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(animate, [\n\t\t\"cancel\",\n\t\t\"finish\",\n\t\t\"remove\"\n\t], syncPause, listenerOptions);\n\tuseEventListener(animate, \"finish\", () => {\n\t\tvar _animate$value5;\n\t\tif (commitStyles) (_animate$value5 = animate.value) === null || _animate$value5 === void 0 || _animate$value5.commitStyles();\n\t}, listenerOptions);\n\tconst { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n\t\tif (!animate.value) return;\n\t\tstore.pending = animate.value.pending;\n\t\tstore.playState = animate.value.playState;\n\t\tstore.replaceState = animate.value.replaceState;\n\t\tstore.startTime = animate.value.startTime;\n\t\tstore.currentTime = animate.value.currentTime;\n\t\tstore.timeline = animate.value.timeline;\n\t\tstore.playbackRate = animate.value.playbackRate;\n\t}, { immediate: false });\n\tfunction syncResume() {\n\t\tif (isSupported.value) resumeRef();\n\t}\n\tfunction syncPause() {\n\t\tif (isSupported.value && window$1) window$1.requestAnimationFrame(pauseRef);\n\t}\n\treturn {\n\t\tisSupported,\n\t\tanimate,\n\t\tplay,\n\t\tpause,\n\t\treverse,\n\t\tfinish,\n\t\tcancel,\n\t\tpending,\n\t\tplayState,\n\t\treplaceState,\n\t\tstartTime,\n\t\tcurrentTime,\n\t\ttimeline,\n\t\tplaybackRate\n\t};\n}\n\n//#endregion\n//#region useAsyncQueue/index.ts\n/**\n* Asynchronous queue task controller.\n*\n* @see https://vueuse.org/useAsyncQueue\n* @param tasks\n* @param options\n*/\nfunction useAsyncQueue(tasks, options) {\n\tconst { interrupt = true, onError = noop, onFinished = noop, signal } = options || {};\n\tconst promiseState = {\n\t\taborted: \"aborted\",\n\t\tfulfilled: \"fulfilled\",\n\t\tpending: \"pending\",\n\t\trejected: \"rejected\"\n\t};\n\tconst result = reactive(Array.from(Array.from({ length: tasks.length }), () => ({\n\t\tstate: promiseState.pending,\n\t\tdata: null\n\t})));\n\tconst activeIndex = shallowRef(-1);\n\tif (!tasks || tasks.length === 0) {\n\t\tonFinished();\n\t\treturn {\n\t\t\tactiveIndex,\n\t\t\tresult\n\t\t};\n\t}\n\tfunction updateResult(state, res) {\n\t\tactiveIndex.value++;\n\t\tresult[activeIndex.value].data = res;\n\t\tresult[activeIndex.value].state = state;\n\t}\n\ttasks.reduce((prev, curr) => {\n\t\treturn prev.then((prevRes) => {\n\t\t\tvar _result$activeIndex$v;\n\t\t\tif (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n\t\t\t\tupdateResult(promiseState.aborted, /* @__PURE__ */ new Error(\"aborted\"));\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (((_result$activeIndex$v = result[activeIndex.value]) === null || _result$activeIndex$v === void 0 ? void 0 : _result$activeIndex$v.state) === promiseState.rejected && interrupt) {\n\t\t\t\tonFinished();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst done = curr(prevRes).then((currentRes) => {\n\t\t\t\tupdateResult(promiseState.fulfilled, currentRes);\n\t\t\t\tif (activeIndex.value === tasks.length - 1) onFinished();\n\t\t\t\treturn currentRes;\n\t\t\t});\n\t\t\tif (!signal) return done;\n\t\t\treturn Promise.race([done, whenAborted(signal)]);\n\t\t}).catch((e) => {\n\t\t\tif (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n\t\t\t\tupdateResult(promiseState.aborted, e);\n\t\t\t\treturn e;\n\t\t\t}\n\t\t\tupdateResult(promiseState.rejected, e);\n\t\t\tonError();\n\t\t\tif (activeIndex.value === tasks.length - 1) onFinished();\n\t\t\treturn e;\n\t\t});\n\t}, Promise.resolve());\n\treturn {\n\t\tactiveIndex,\n\t\tresult\n\t};\n}\nfunction whenAborted(signal) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst error = /* @__PURE__ */ new Error(\"aborted\");\n\t\tif (signal.aborted) reject(error);\n\t\telse signal.addEventListener(\"abort\", () => reject(error), { once: true });\n\t});\n}\n\n//#endregion\n//#region useAsyncState/index.ts\n/**\n* Reactive async state. Will not block your setup function and will trigger changes once\n* the promise is ready.\n*\n* @see https://vueuse.org/useAsyncState\n* @param promise The promise / async function to be resolved\n* @param initialState The initial state, used until the first evaluation finishes\n* @param options\n*/\nfunction useAsyncState(promise, initialState, options) {\n\tvar _globalThis$reportErr;\n\tconst { immediate = true, delay = 0, onError = (_globalThis$reportErr = globalThis.reportError) !== null && _globalThis$reportErr !== void 0 ? _globalThis$reportErr : noop, onSuccess = noop, resetOnExecute = true, shallow = true, throwError } = options !== null && options !== void 0 ? options : {};\n\tconst state = shallow ? shallowRef(initialState) : ref(initialState);\n\tconst isReady = shallowRef(false);\n\tconst isLoading = shallowRef(false);\n\tconst error = shallowRef(void 0);\n\tlet executionsCount = 0;\n\tasync function execute(delay$1 = 0, ...args) {\n\t\tconst executionId = executionsCount += 1;\n\t\tif (resetOnExecute) state.value = toValue(initialState);\n\t\terror.value = void 0;\n\t\tisReady.value = false;\n\t\tisLoading.value = true;\n\t\tif (delay$1 > 0) await promiseTimeout(delay$1);\n\t\tconst _promise = typeof promise === \"function\" ? promise(...args) : promise;\n\t\ttry {\n\t\t\tconst data = await _promise;\n\t\t\tif (executionId === executionsCount) {\n\t\t\t\tstate.value = data;\n\t\t\t\tisReady.value = true;\n\t\t\t}\n\t\t\tonSuccess(data);\n\t\t} catch (e) {\n\t\t\tif (executionId === executionsCount) error.value = e;\n\t\t\tonError(e);\n\t\t\tif (throwError) throw e;\n\t\t} finally {\n\t\t\tif (executionId === executionsCount) isLoading.value = false;\n\t\t}\n\t\treturn state.value;\n\t}\n\tif (immediate) execute(delay);\n\tconst shell = {\n\t\tstate,\n\t\tisReady,\n\t\tisLoading,\n\t\terror,\n\t\texecute,\n\t\texecuteImmediate: (...args) => execute(0, ...args)\n\t};\n\tfunction waitUntilIsLoaded() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tuntil(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n\t\t});\n\t}\n\treturn {\n\t\t...shell,\n\t\tthen(onFulfilled, onRejected) {\n\t\t\treturn waitUntilIsLoaded().then(onFulfilled, onRejected);\n\t\t}\n\t};\n}\n\n//#endregion\n//#region useBase64/serialization.ts\nconst defaults = {\n\tarray: (v) => JSON.stringify(v),\n\tobject: (v) => JSON.stringify(v),\n\tset: (v) => JSON.stringify(Array.from(v)),\n\tmap: (v) => JSON.stringify(Object.fromEntries(v)),\n\tnull: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n\tif (!target) return defaults.null;\n\tif (target instanceof Map) return defaults.map;\n\telse if (target instanceof Set) return defaults.set;\n\telse if (Array.isArray(target)) return defaults.array;\n\telse return defaults.object;\n}\n\n//#endregion\n//#region useBase64/index.ts\nfunction useBase64(target, options) {\n\tconst base64 = shallowRef(\"\");\n\tconst promise = shallowRef();\n\tfunction execute() {\n\t\tif (!isClient) return;\n\t\tpromise.value = new Promise((resolve, reject) => {\n\t\t\ttry {\n\t\t\t\tconst _target = toValue(target);\n\t\t\t\tif (_target == null) resolve(\"\");\n\t\t\t\telse if (typeof _target === \"string\") resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n\t\t\t\telse if (_target instanceof Blob) resolve(blobToBase64(_target));\n\t\t\t\telse if (_target instanceof ArrayBuffer) resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n\t\t\t\telse if (_target instanceof HTMLCanvasElement) resolve(_target.toDataURL(options === null || options === void 0 ? void 0 : options.type, options === null || options === void 0 ? void 0 : options.quality));\n\t\t\t\telse if (_target instanceof HTMLImageElement) {\n\t\t\t\t\tconst img = _target.cloneNode(false);\n\t\t\t\t\timg.crossOrigin = \"Anonymous\";\n\t\t\t\t\timgLoaded(img).then(() => {\n\t\t\t\t\t\tconst canvas = document.createElement(\"canvas\");\n\t\t\t\t\t\tconst ctx = canvas.getContext(\"2d\");\n\t\t\t\t\t\tcanvas.width = img.width;\n\t\t\t\t\t\tcanvas.height = img.height;\n\t\t\t\t\t\tctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n\t\t\t\t\t\tresolve(canvas.toDataURL(options === null || options === void 0 ? void 0 : options.type, options === null || options === void 0 ? void 0 : options.quality));\n\t\t\t\t\t}).catch(reject);\n\t\t\t\t} else if (typeof _target === \"object\") {\n\t\t\t\t\tconst serialized = ((options === null || options === void 0 ? void 0 : options.serializer) || getDefaultSerialization(_target))(_target);\n\t\t\t\t\treturn resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n\t\t\t\t} else reject(/* @__PURE__ */ new Error(\"target is unsupported types\"));\n\t\t\t} catch (error) {\n\t\t\t\treject(error);\n\t\t\t}\n\t\t});\n\t\tpromise.value.then((res) => {\n\t\t\tbase64.value = (options === null || options === void 0 ? void 0 : options.dataUrl) === false ? res.replace(/^data:.*?;base64,/, \"\") : res;\n\t\t});\n\t\treturn promise.value;\n\t}\n\tif (isRef(target) || typeof target === \"function\") watch(target, execute, { immediate: true });\n\telse execute();\n\treturn {\n\t\tbase64,\n\t\tpromise,\n\t\texecute\n\t};\n}\nfunction imgLoaded(img) {\n\treturn new Promise((resolve, reject) => {\n\t\tif (!img.complete) {\n\t\t\timg.onload = () => {\n\t\t\t\tresolve();\n\t\t\t};\n\t\t\timg.onerror = reject;\n\t\t} else resolve();\n\t});\n}\nfunction blobToBase64(blob) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst fr = new FileReader();\n\t\tfr.onload = (e) => {\n\t\t\tresolve(e.target.result);\n\t\t};\n\t\tfr.onerror = reject;\n\t\tfr.readAsDataURL(blob);\n\t});\n}\n\n//#endregion\n//#region useBattery/index.ts\n/**\n* Reactive Battery Status API.\n*\n* @see https://vueuse.org/useBattery\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useBattery(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst events$1 = [\n\t\t\"chargingchange\",\n\t\t\"chargingtimechange\",\n\t\t\"dischargingtimechange\",\n\t\t\"levelchange\"\n\t];\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"getBattery\" in navigator$1 && typeof navigator$1.getBattery === \"function\");\n\tconst charging = shallowRef(false);\n\tconst chargingTime = shallowRef(0);\n\tconst dischargingTime = shallowRef(0);\n\tconst level = shallowRef(1);\n\tlet battery;\n\tfunction updateBatteryInfo() {\n\t\tcharging.value = this.charging;\n\t\tchargingTime.value = this.chargingTime || 0;\n\t\tdischargingTime.value = this.dischargingTime || 0;\n\t\tlevel.value = this.level;\n\t}\n\tif (isSupported.value) navigator$1.getBattery().then((_battery) => {\n\t\tbattery = _battery;\n\t\tupdateBatteryInfo.call(battery);\n\t\tuseEventListener(battery, events$1, updateBatteryInfo, { passive: true });\n\t});\n\treturn {\n\t\tisSupported,\n\t\tcharging,\n\t\tchargingTime,\n\t\tdischargingTime,\n\t\tlevel\n\t};\n}\n\n//#endregion\n//#region useBluetooth/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useBluetooth(options) {\n\tlet { acceptAllDevices = false } = options || {};\n\tconst { filters = void 0, optionalServices = void 0, navigator: navigator$1 = defaultNavigator } = options || {};\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"bluetooth\" in navigator$1);\n\tconst device = shallowRef();\n\tconst error = shallowRef(null);\n\twatch(device, () => {\n\t\tconnectToBluetoothGATTServer();\n\t});\n\tasync function requestDevice() {\n\t\tif (!isSupported.value) return;\n\t\terror.value = null;\n\t\tif (filters && filters.length > 0) acceptAllDevices = false;\n\t\ttry {\n\t\t\tdevice.value = await (navigator$1 === null || navigator$1 === void 0 ? void 0 : navigator$1.bluetooth.requestDevice({\n\t\t\t\tacceptAllDevices,\n\t\t\t\tfilters,\n\t\t\t\toptionalServices\n\t\t\t}));\n\t\t} catch (err) {\n\t\t\terror.value = err;\n\t\t}\n\t}\n\tconst server = shallowRef();\n\tconst isConnected = shallowRef(false);\n\tfunction reset() {\n\t\tisConnected.value = false;\n\t\tdevice.value = void 0;\n\t\tserver.value = void 0;\n\t}\n\tasync function connectToBluetoothGATTServer() {\n\t\terror.value = null;\n\t\tif (device.value && device.value.gatt) {\n\t\t\tuseEventListener(device, \"gattserverdisconnected\", reset, { passive: true });\n\t\t\ttry {\n\t\t\t\tserver.value = await device.value.gatt.connect();\n\t\t\t\tisConnected.value = server.value.connected;\n\t\t\t} catch (err) {\n\t\t\t\terror.value = err;\n\t\t\t}\n\t\t}\n\t}\n\ttryOnMounted(() => {\n\t\tvar _device$value$gatt;\n\t\tif (device.value) (_device$value$gatt = device.value.gatt) === null || _device$value$gatt === void 0 || _device$value$gatt.connect();\n\t});\n\ttryOnScopeDispose(() => {\n\t\tvar _device$value$gatt2;\n\t\tif (device.value) (_device$value$gatt2 = device.value.gatt) === null || _device$value$gatt2 === void 0 || _device$value$gatt2.disconnect();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tisConnected: readonly(isConnected),\n\t\tdevice,\n\t\trequestDevice,\n\t\tserver,\n\t\terror\n\t};\n}\n\n//#endregion\n//#region useSSRWidth/index.ts\nconst ssrWidthSymbol = Symbol(\"vueuse-ssr-width\");\n/* @__NO_SIDE_EFFECTS__ */\nfunction useSSRWidth() {\n\tconst ssrWidth = hasInjectionContext() ? injectLocal(ssrWidthSymbol, null) : null;\n\treturn typeof ssrWidth === \"number\" ? ssrWidth : void 0;\n}\nfunction provideSSRWidth(width, app) {\n\tif (app !== void 0) app.provide(ssrWidthSymbol, width);\n\telse provideLocal(ssrWidthSymbol, width);\n}\n\n//#endregion\n//#region useMediaQuery/index.ts\n/**\n* Reactive Media Query.\n*\n* @see https://vueuse.org/useMediaQuery\n* @param query\n* @param options\n*/\nfunction useMediaQuery(query, options = {}) {\n\tconst { window: window$1 = defaultWindow, ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"matchMedia\" in window$1 && typeof window$1.matchMedia === \"function\");\n\tconst ssrSupport = shallowRef(typeof ssrWidth === \"number\");\n\tconst mediaQuery = shallowRef();\n\tconst matches = shallowRef(false);\n\tconst handler = (event) => {\n\t\tmatches.value = event.matches;\n\t};\n\twatchEffect(() => {\n\t\tif (ssrSupport.value) {\n\t\t\tssrSupport.value = !isSupported.value;\n\t\t\tmatches.value = toValue(query).split(\",\").some((queryString) => {\n\t\t\t\tconst not = queryString.includes(\"not all\");\n\t\t\t\tconst minWidth = queryString.match(/\\(\\s*min-width:\\s*(-?\\d+(?:\\.\\d*)?[a-z]+\\s*)\\)/);\n\t\t\t\tconst maxWidth = queryString.match(/\\(\\s*max-width:\\s*(-?\\d+(?:\\.\\d*)?[a-z]+\\s*)\\)/);\n\t\t\t\tlet res = Boolean(minWidth || maxWidth);\n\t\t\t\tif (minWidth && res) res = ssrWidth >= pxValue(minWidth[1]);\n\t\t\t\tif (maxWidth && res) res = ssrWidth <= pxValue(maxWidth[1]);\n\t\t\t\treturn not ? !res : res;\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\t\tif (!isSupported.value) return;\n\t\tmediaQuery.value = window$1.matchMedia(toValue(query));\n\t\tmatches.value = mediaQuery.value.matches;\n\t});\n\tuseEventListener(mediaQuery, \"change\", handler, { passive: true });\n\treturn computed(() => matches.value);\n}\n\n//#endregion\n//#region useBreakpoints/breakpoints.ts\n/**\n* Breakpoints from Tailwind V2\n*\n* @see https://tailwindcss.com/docs/breakpoints\n*/\nconst breakpointsTailwind = {\n\t\"sm\": 640,\n\t\"md\": 768,\n\t\"lg\": 1024,\n\t\"xl\": 1280,\n\t\"2xl\": 1536\n};\n/**\n* Breakpoints from Bootstrap V5\n*\n* @see https://getbootstrap.com/docs/5.0/layout/breakpoints\n*/\nconst breakpointsBootstrapV5 = {\n\txs: 0,\n\tsm: 576,\n\tmd: 768,\n\tlg: 992,\n\txl: 1200,\n\txxl: 1400\n};\n/**\n* Breakpoints from Vuetify V2\n*\n* @see https://v2.vuetifyjs.com/en/features/breakpoints/\n*/\nconst breakpointsVuetifyV2 = {\n\txs: 0,\n\tsm: 600,\n\tmd: 960,\n\tlg: 1264,\n\txl: 1904\n};\n/**\n* Breakpoints from Vuetify V3\n*\n* @see https://vuetifyjs.com/en/styles/float/#overview\n*/\nconst breakpointsVuetifyV3 = {\n\txs: 0,\n\tsm: 600,\n\tmd: 960,\n\tlg: 1280,\n\txl: 1920,\n\txxl: 2560\n};\n/**\n* Alias to `breakpointsVuetifyV2`\n*\n* @deprecated explictly use `breakpointsVuetifyV2` or `breakpointsVuetifyV3` instead\n*/\nconst breakpointsVuetify = breakpointsVuetifyV2;\n/**\n* Breakpoints from Ant Design\n*\n* @see https://ant.design/components/layout/#breakpoint-width\n*/\nconst breakpointsAntDesign = {\n\txs: 480,\n\tsm: 576,\n\tmd: 768,\n\tlg: 992,\n\txl: 1200,\n\txxl: 1600\n};\n/**\n* Breakpoints from Quasar V2\n*\n* @see https://quasar.dev/style/breakpoints\n*/\nconst breakpointsQuasar = {\n\txs: 0,\n\tsm: 600,\n\tmd: 1024,\n\tlg: 1440,\n\txl: 1920\n};\n/**\n* Sematic Breakpoints\n*/\nconst breakpointsSematic = {\n\tmobileS: 320,\n\tmobileM: 375,\n\tmobileL: 425,\n\ttablet: 768,\n\tlaptop: 1024,\n\tlaptopL: 1440,\n\tdesktop4K: 2560\n};\n/**\n* Breakpoints from Master CSS\n*\n* @see https://docs.master.co/css/breakpoints\n*/\nconst breakpointsMasterCss = {\n\t\"3xs\": 360,\n\t\"2xs\": 480,\n\t\"xs\": 600,\n\t\"sm\": 768,\n\t\"md\": 1024,\n\t\"lg\": 1280,\n\t\"xl\": 1440,\n\t\"2xl\": 1600,\n\t\"3xl\": 1920,\n\t\"4xl\": 2560\n};\n/**\n* Breakpoints from PrimeFlex\n*\n* @see https://primeflex.org/installation\n*/\nconst breakpointsPrimeFlex = {\n\tsm: 576,\n\tmd: 768,\n\tlg: 992,\n\txl: 1200\n};\n/**\n* Breakpoints from ElementUI/ElementPlus\n*\n* @see https://element.eleme.io/#/en-US/component/layout\n* @see https://element-plus.org/en-US/component/layout.html\n*/\nconst breakpointsElement = {\n\txs: 0,\n\tsm: 768,\n\tmd: 992,\n\tlg: 1200,\n\txl: 1920\n};\n\n//#endregion\n//#region useBreakpoints/index.ts\n/**\n* Reactively viewport breakpoints\n*\n* @see https://vueuse.org/useBreakpoints\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useBreakpoints(breakpoints, options = {}) {\n\tfunction getValue$1(k, delta) {\n\t\tlet v = toValue(breakpoints[toValue(k)]);\n\t\tif (delta != null) v = increaseWithUnit(v, delta);\n\t\tif (typeof v === \"number\") v = `${v}px`;\n\t\treturn v;\n\t}\n\tconst { window: window$1 = defaultWindow, strategy = \"min-width\", ssrWidth = /* @__PURE__ */ useSSRWidth() } = options;\n\tconst ssrSupport = typeof ssrWidth === \"number\";\n\tconst mounted = ssrSupport ? shallowRef(false) : { value: true };\n\tif (ssrSupport) tryOnMounted(() => mounted.value = !!window$1);\n\tfunction match(query, size) {\n\t\tif (!mounted.value && ssrSupport) return query === \"min\" ? ssrWidth >= pxValue(size) : ssrWidth <= pxValue(size);\n\t\tif (!window$1) return false;\n\t\treturn window$1.matchMedia(`(${query}-width: ${size})`).matches;\n\t}\n\tconst greaterOrEqual = (k) => {\n\t\treturn useMediaQuery(() => `(min-width: ${getValue$1(k)})`, options);\n\t};\n\tconst smallerOrEqual = (k) => {\n\t\treturn useMediaQuery(() => `(max-width: ${getValue$1(k)})`, options);\n\t};\n\tconst shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n\t\tObject.defineProperty(shortcuts, k, {\n\t\t\tget: () => strategy === \"min-width\" ? greaterOrEqual(k) : smallerOrEqual(k),\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true\n\t\t});\n\t\treturn shortcuts;\n\t}, {});\n\tfunction current() {\n\t\tconst points = Object.keys(breakpoints).map((k) => [\n\t\t\tk,\n\t\t\tshortcutMethods[k],\n\t\t\tpxValue(getValue$1(k))\n\t\t]).sort((a, b) => a[2] - b[2]);\n\t\treturn computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n\t}\n\treturn Object.assign(shortcutMethods, {\n\t\tgreaterOrEqual,\n\t\tsmallerOrEqual,\n\t\tgreater(k) {\n\t\t\treturn useMediaQuery(() => `(min-width: ${getValue$1(k, .1)})`, options);\n\t\t},\n\t\tsmaller(k) {\n\t\t\treturn useMediaQuery(() => `(max-width: ${getValue$1(k, -.1)})`, options);\n\t\t},\n\t\tbetween(a, b) {\n\t\t\treturn useMediaQuery(() => `(min-width: ${getValue$1(a)}) and (max-width: ${getValue$1(b, -.1)})`, options);\n\t\t},\n\t\tisGreater(k) {\n\t\t\treturn match(\"min\", getValue$1(k, .1));\n\t\t},\n\t\tisGreaterOrEqual(k) {\n\t\t\treturn match(\"min\", getValue$1(k));\n\t\t},\n\t\tisSmaller(k) {\n\t\t\treturn match(\"max\", getValue$1(k, -.1));\n\t\t},\n\t\tisSmallerOrEqual(k) {\n\t\t\treturn match(\"max\", getValue$1(k));\n\t\t},\n\t\tisInBetween(a, b) {\n\t\t\treturn match(\"min\", getValue$1(a)) && match(\"max\", getValue$1(b, -.1));\n\t\t},\n\t\tcurrent,\n\t\tactive() {\n\t\t\tconst bps = current();\n\t\t\treturn computed(() => bps.value.length === 0 ? \"\" : bps.value.at(strategy === \"min-width\" ? -1 : 0));\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useBroadcastChannel/index.ts\n/**\n* Reactive BroadcastChannel\n*\n* @see https://vueuse.org/useBroadcastChannel\n* @see https://developer.mozilla.org/en-US/docs/Web/API/BroadcastChannel\n* @param options\n*\n*/\nfunction useBroadcastChannel(options) {\n\tconst { name, window: window$1 = defaultWindow } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"BroadcastChannel\" in window$1);\n\tconst isClosed = shallowRef(false);\n\tconst channel = ref();\n\tconst data = ref();\n\tconst error = shallowRef(null);\n\tconst post = (data$1) => {\n\t\tif (channel.value) channel.value.postMessage(data$1);\n\t};\n\tconst close = () => {\n\t\tif (channel.value) channel.value.close();\n\t\tisClosed.value = true;\n\t};\n\tif (isSupported.value) tryOnMounted(() => {\n\t\terror.value = null;\n\t\tchannel.value = new BroadcastChannel(name);\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(channel, \"message\", (e) => {\n\t\t\tdata.value = e.data;\n\t\t}, listenerOptions);\n\t\tuseEventListener(channel, \"messageerror\", (e) => {\n\t\t\terror.value = e;\n\t\t}, listenerOptions);\n\t\tuseEventListener(channel, \"close\", () => {\n\t\t\tisClosed.value = true;\n\t\t}, listenerOptions);\n\t});\n\ttryOnScopeDispose(() => {\n\t\tclose();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tchannel,\n\t\tdata,\n\t\tpost,\n\t\tclose,\n\t\terror,\n\t\tisClosed\n\t};\n}\n\n//#endregion\n//#region useBrowserLocation/index.ts\nconst WRITABLE_PROPERTIES = [\n\t\"hash\",\n\t\"host\",\n\t\"hostname\",\n\t\"href\",\n\t\"pathname\",\n\t\"port\",\n\t\"protocol\",\n\t\"search\"\n];\n/**\n* Reactive browser location.\n*\n* @see https://vueuse.org/useBrowserLocation\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useBrowserLocation(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst refs = Object.fromEntries(WRITABLE_PROPERTIES.map((key) => [key, ref()]));\n\tfor (const [key, ref$1] of objectEntries(refs)) watch(ref$1, (value) => {\n\t\tif (!(window$1 === null || window$1 === void 0 ? void 0 : window$1.location) || window$1.location[key] === value) return;\n\t\twindow$1.location[key] = value;\n\t});\n\tconst buildState = (trigger) => {\n\t\tvar _window$location;\n\t\tconst { state: state$1, length } = (window$1 === null || window$1 === void 0 ? void 0 : window$1.history) || {};\n\t\tconst { origin } = (window$1 === null || window$1 === void 0 ? void 0 : window$1.location) || {};\n\t\tfor (const key of WRITABLE_PROPERTIES) refs[key].value = window$1 === null || window$1 === void 0 || (_window$location = window$1.location) === null || _window$location === void 0 ? void 0 : _window$location[key];\n\t\treturn reactive({\n\t\t\ttrigger,\n\t\t\tstate: state$1,\n\t\t\tlength,\n\t\t\torigin,\n\t\t\t...refs\n\t\t});\n\t};\n\tconst state = ref(buildState(\"load\"));\n\tif (window$1) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(window$1, \"popstate\", () => state.value = buildState(\"popstate\"), listenerOptions);\n\t\tuseEventListener(window$1, \"hashchange\", () => state.value = buildState(\"hashchange\"), listenerOptions);\n\t}\n\treturn state;\n}\n\n//#endregion\n//#region useCached/index.ts\nfunction useCached(refValue, comparator = (a, b) => a === b, options) {\n\tconst { deepRefs = true,...watchOptions } = options || {};\n\tconst cachedValue = createRef(refValue.value, deepRefs);\n\twatch(() => refValue.value, (value) => {\n\t\tif (!comparator(value, cachedValue.value)) cachedValue.value = value;\n\t}, watchOptions);\n\treturn cachedValue;\n}\n\n//#endregion\n//#region usePermission/index.ts\n/**\n* Reactive Permissions API.\n*\n* @see https://vueuse.org/usePermission\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePermission(permissionDesc, options = {}) {\n\tconst { controls = false, navigator: navigator$1 = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"permissions\" in navigator$1);\n\tconst permissionStatus = shallowRef();\n\tconst desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n\tconst state = shallowRef();\n\tconst update = () => {\n\t\tvar _permissionStatus$val, _permissionStatus$val2;\n\t\tstate.value = (_permissionStatus$val = (_permissionStatus$val2 = permissionStatus.value) === null || _permissionStatus$val2 === void 0 ? void 0 : _permissionStatus$val2.state) !== null && _permissionStatus$val !== void 0 ? _permissionStatus$val : \"prompt\";\n\t};\n\tuseEventListener(permissionStatus, \"change\", update, { passive: true });\n\tconst query = createSingletonPromise(async () => {\n\t\tif (!isSupported.value) return;\n\t\tif (!permissionStatus.value) try {\n\t\t\tpermissionStatus.value = await navigator$1.permissions.query(desc);\n\t\t} catch (_unused) {\n\t\t\tpermissionStatus.value = void 0;\n\t\t} finally {\n\t\t\tupdate();\n\t\t}\n\t\tif (controls) return toRaw(permissionStatus.value);\n\t});\n\tquery();\n\tif (controls) return {\n\t\tstate,\n\t\tisSupported,\n\t\tquery\n\t};\n\telse return state;\n}\n\n//#endregion\n//#region useClipboard/index.ts\nfunction useClipboard(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator, read = false, source, copiedDuring = 1500, legacy = false } = options;\n\tconst isClipboardApiSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"clipboard\" in navigator$1);\n\tconst permissionRead = usePermission(\"clipboard-read\");\n\tconst permissionWrite = usePermission(\"clipboard-write\");\n\tconst isSupported = computed(() => isClipboardApiSupported.value || legacy);\n\tconst text = shallowRef(\"\");\n\tconst copied = shallowRef(false);\n\tconst timeout = useTimeoutFn(() => copied.value = false, copiedDuring, { immediate: false });\n\tasync function updateText() {\n\t\tlet useLegacy = !(isClipboardApiSupported.value && isAllowed(permissionRead.value));\n\t\tif (!useLegacy) try {\n\t\t\ttext.value = await navigator$1.clipboard.readText();\n\t\t} catch (_unused) {\n\t\t\tuseLegacy = true;\n\t\t}\n\t\tif (useLegacy) text.value = legacyRead();\n\t}\n\tif (isSupported.value && read) useEventListener([\"copy\", \"cut\"], updateText, { passive: true });\n\tasync function copy(value = toValue(source)) {\n\t\tif (isSupported.value && value != null) {\n\t\t\tlet useLegacy = !(isClipboardApiSupported.value && isAllowed(permissionWrite.value));\n\t\t\tif (!useLegacy) try {\n\t\t\t\tawait navigator$1.clipboard.writeText(value);\n\t\t\t} catch (_unused2) {\n\t\t\t\tuseLegacy = true;\n\t\t\t}\n\t\t\tif (useLegacy) legacyCopy(value);\n\t\t\ttext.value = value;\n\t\t\tcopied.value = true;\n\t\t\ttimeout.start();\n\t\t}\n\t}\n\tfunction legacyCopy(value) {\n\t\tconst ta = document.createElement(\"textarea\");\n\t\tta.value = value;\n\t\tta.style.position = \"absolute\";\n\t\tta.style.opacity = \"0\";\n\t\tta.setAttribute(\"readonly\", \"\");\n\t\tdocument.body.appendChild(ta);\n\t\tta.select();\n\t\tdocument.execCommand(\"copy\");\n\t\tta.remove();\n\t}\n\tfunction legacyRead() {\n\t\tvar _document$getSelectio, _document, _document$getSelectio2;\n\t\treturn (_document$getSelectio = (_document = document) === null || _document === void 0 || (_document$getSelectio2 = _document.getSelection) === null || _document$getSelectio2 === void 0 || (_document$getSelectio2 = _document$getSelectio2.call(_document)) === null || _document$getSelectio2 === void 0 ? void 0 : _document$getSelectio2.toString()) !== null && _document$getSelectio !== void 0 ? _document$getSelectio : \"\";\n\t}\n\tfunction isAllowed(status) {\n\t\treturn status === \"granted\" || status === \"prompt\";\n\t}\n\treturn {\n\t\tisSupported,\n\t\ttext: readonly(text),\n\t\tcopied: readonly(copied),\n\t\tcopy\n\t};\n}\n\n//#endregion\n//#region useClipboardItems/index.ts\nfunction useClipboardItems(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator, read = false, source, copiedDuring = 1500 } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"clipboard\" in navigator$1);\n\tconst content = ref([]);\n\tconst copied = shallowRef(false);\n\tconst timeout = useTimeoutFn(() => copied.value = false, copiedDuring, { immediate: false });\n\tfunction updateContent() {\n\t\tif (isSupported.value) navigator$1.clipboard.read().then((items) => {\n\t\t\tcontent.value = items;\n\t\t});\n\t}\n\tif (isSupported.value && read) useEventListener([\"copy\", \"cut\"], updateContent, { passive: true });\n\tasync function copy(value = toValue(source)) {\n\t\tif (isSupported.value && value != null) {\n\t\t\tawait navigator$1.clipboard.write(value);\n\t\t\tcontent.value = value;\n\t\t\tcopied.value = true;\n\t\t\ttimeout.start();\n\t\t}\n\t}\n\treturn {\n\t\tisSupported,\n\t\tcontent: shallowReadonly(content),\n\t\tcopied: readonly(copied),\n\t\tcopy,\n\t\tread: updateContent\n\t};\n}\n\n//#endregion\n//#region useCloned/index.ts\nfunction cloneFnJSON(source) {\n\treturn JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n\tconst cloned = ref({});\n\tconst isModified = shallowRef(false);\n\tlet _lastSync = false;\n\tconst { manual, clone = cloneFnJSON, deep = true, immediate = true } = options;\n\twatch(cloned, () => {\n\t\tif (_lastSync) {\n\t\t\t_lastSync = false;\n\t\t\treturn;\n\t\t}\n\t\tisModified.value = true;\n\t}, {\n\t\tdeep: true,\n\t\tflush: \"sync\"\n\t});\n\tfunction sync() {\n\t\t_lastSync = true;\n\t\tisModified.value = false;\n\t\tcloned.value = clone(toValue(source));\n\t}\n\tif (!manual && (isRef(source) || typeof source === \"function\")) watch(source, sync, {\n\t\t...options,\n\t\tdeep,\n\t\timmediate\n\t});\n\telse sync();\n\treturn {\n\t\tcloned,\n\t\tisModified,\n\t\tsync\n\t};\n}\n\n//#endregion\n//#region ssr-handlers.ts\nconst _global = typeof globalThis !== \"undefined\" ? globalThis : typeof window !== \"undefined\" ? window : typeof global !== \"undefined\" ? global : typeof self !== \"undefined\" ? self : {};\nconst globalKey = \"__vueuse_ssr_handlers__\";\nconst handlers = /* @__PURE__ */ getHandlers();\nfunction getHandlers() {\n\tif (!(globalKey in _global)) _global[globalKey] = _global[globalKey] || {};\n\treturn _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n\treturn handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n\thandlers[key] = fn;\n}\n\n//#endregion\n//#region usePreferredDark/index.ts\n/**\n* Reactive dark theme preference.\n*\n* @see https://vueuse.org/usePreferredDark\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredDark(options) {\n\treturn useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\n//#endregion\n//#region useStorage/guess.ts\nfunction guessSerializerType(rawInit) {\n\treturn rawInit == null ? \"any\" : rawInit instanceof Set ? \"set\" : rawInit instanceof Map ? \"map\" : rawInit instanceof Date ? \"date\" : typeof rawInit === \"boolean\" ? \"boolean\" : typeof rawInit === \"string\" ? \"string\" : typeof rawInit === \"object\" ? \"object\" : !Number.isNaN(rawInit) ? \"number\" : \"any\";\n}\n\n//#endregion\n//#region useStorage/index.ts\nconst StorageSerializers = {\n\tboolean: {\n\t\tread: (v) => v === \"true\",\n\t\twrite: (v) => String(v)\n\t},\n\tobject: {\n\t\tread: (v) => JSON.parse(v),\n\t\twrite: (v) => JSON.stringify(v)\n\t},\n\tnumber: {\n\t\tread: (v) => Number.parseFloat(v),\n\t\twrite: (v) => String(v)\n\t},\n\tany: {\n\t\tread: (v) => v,\n\t\twrite: (v) => String(v)\n\t},\n\tstring: {\n\t\tread: (v) => v,\n\t\twrite: (v) => String(v)\n\t},\n\tmap: {\n\t\tread: (v) => new Map(JSON.parse(v)),\n\t\twrite: (v) => JSON.stringify(Array.from(v.entries()))\n\t},\n\tset: {\n\t\tread: (v) => new Set(JSON.parse(v)),\n\t\twrite: (v) => JSON.stringify(Array.from(v))\n\t},\n\tdate: {\n\t\tread: (v) => new Date(v),\n\t\twrite: (v) => v.toISOString()\n\t}\n};\nconst customStorageEventName = \"vueuse-storage\";\n/**\n* Reactive LocalStorage/SessionStorage.\n*\n* @see https://vueuse.org/useStorage\n*/\nfunction useStorage(key, defaults$1, storage, options = {}) {\n\tvar _options$serializer;\n\tconst { flush = \"pre\", deep = true, listenToStorageChanges = true, writeDefaults = true, mergeDefaults = false, shallow, window: window$1 = defaultWindow, eventFilter, onError = (e) => {\n\t\tconsole.error(e);\n\t}, initOnMounted } = options;\n\tconst data = (shallow ? shallowRef : ref)(typeof defaults$1 === \"function\" ? defaults$1() : defaults$1);\n\tconst keyComputed = computed(() => toValue(key));\n\tif (!storage) try {\n\t\tstorage = getSSRHandler(\"getDefaultStorage\", () => defaultWindow === null || defaultWindow === void 0 ? void 0 : defaultWindow.localStorage)();\n\t} catch (e) {\n\t\tonError(e);\n\t}\n\tif (!storage) return data;\n\tconst rawInit = toValue(defaults$1);\n\tconst type = guessSerializerType(rawInit);\n\tconst serializer = (_options$serializer = options.serializer) !== null && _options$serializer !== void 0 ? _options$serializer : StorageSerializers[type];\n\tconst { pause: pauseWatch, resume: resumeWatch } = pausableWatch(data, (newValue) => write(newValue), {\n\t\tflush,\n\t\tdeep,\n\t\teventFilter\n\t});\n\twatch(keyComputed, () => update(), { flush });\n\tlet firstMounted = false;\n\tconst onStorageEvent = (ev) => {\n\t\tif (initOnMounted && !firstMounted) return;\n\t\tupdate(ev);\n\t};\n\tconst onStorageCustomEvent = (ev) => {\n\t\tif (initOnMounted && !firstMounted) return;\n\t\tupdateFromCustomEvent(ev);\n\t};\n\t/**\n\t* The custom event is needed for same-document syncing when using custom\n\t* storage backends, but it doesn't work across different documents.\n\t*\n\t* TODO: Consider implementing a BroadcastChannel-based solution that fixes this.\n\t*/\n\tif (window$1 && listenToStorageChanges) if (storage instanceof Storage) useEventListener(window$1, \"storage\", onStorageEvent, { passive: true });\n\telse useEventListener(window$1, customStorageEventName, onStorageCustomEvent);\n\tif (initOnMounted) tryOnMounted(() => {\n\t\tfirstMounted = true;\n\t\tupdate();\n\t});\n\telse update();\n\tfunction dispatchWriteEvent(oldValue, newValue) {\n\t\tif (window$1) {\n\t\t\tconst payload = {\n\t\t\t\tkey: keyComputed.value,\n\t\t\t\toldValue,\n\t\t\t\tnewValue,\n\t\t\t\tstorageArea: storage\n\t\t\t};\n\t\t\twindow$1.dispatchEvent(storage instanceof Storage ? new StorageEvent(\"storage\", payload) : new CustomEvent(customStorageEventName, { detail: payload }));\n\t\t}\n\t}\n\tfunction write(v) {\n\t\ttry {\n\t\t\tconst oldValue = storage.getItem(keyComputed.value);\n\t\t\tif (v == null) {\n\t\t\t\tdispatchWriteEvent(oldValue, null);\n\t\t\t\tstorage.removeItem(keyComputed.value);\n\t\t\t} else {\n\t\t\t\tconst serialized = serializer.write(v);\n\t\t\t\tif (oldValue !== serialized) {\n\t\t\t\t\tstorage.setItem(keyComputed.value, serialized);\n\t\t\t\t\tdispatchWriteEvent(oldValue, serialized);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t}\n\tfunction read(event) {\n\t\tconst rawValue = event ? event.newValue : storage.getItem(keyComputed.value);\n\t\tif (rawValue == null) {\n\t\t\tif (writeDefaults && rawInit != null) storage.setItem(keyComputed.value, serializer.write(rawInit));\n\t\t\treturn rawInit;\n\t\t} else if (!event && mergeDefaults) {\n\t\t\tconst value = serializer.read(rawValue);\n\t\t\tif (typeof mergeDefaults === \"function\") return mergeDefaults(value, rawInit);\n\t\t\telse if (type === \"object\" && !Array.isArray(value)) return {\n\t\t\t\t...rawInit,\n\t\t\t\t...value\n\t\t\t};\n\t\t\treturn value;\n\t\t} else if (typeof rawValue !== \"string\") return rawValue;\n\t\telse return serializer.read(rawValue);\n\t}\n\tfunction update(event) {\n\t\tif (event && event.storageArea !== storage) return;\n\t\tif (event && event.key == null) {\n\t\t\tdata.value = rawInit;\n\t\t\treturn;\n\t\t}\n\t\tif (event && event.key !== keyComputed.value) return;\n\t\tpauseWatch();\n\t\ttry {\n\t\t\tconst serializedData = serializer.write(data.value);\n\t\t\tif (event === void 0 || (event === null || event === void 0 ? void 0 : event.newValue) !== serializedData) data.value = read(event);\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t} finally {\n\t\t\tif (event) nextTick(resumeWatch);\n\t\t\telse resumeWatch();\n\t\t}\n\t}\n\tfunction updateFromCustomEvent(event) {\n\t\tupdate(event.detail);\n\t}\n\treturn data;\n}\n\n//#endregion\n//#region useColorMode/index.ts\nconst CSS_DISABLE_TRANS = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\n/**\n* Reactive color mode with auto data persistence.\n*\n* @see https://vueuse.org/useColorMode\n* @param options\n*/\nfunction useColorMode(options = {}) {\n\tconst { selector = \"html\", attribute = \"class\", initialValue = \"auto\", window: window$1 = defaultWindow, storage, storageKey = \"vueuse-color-scheme\", listenToStorageChanges = true, storageRef, emitAuto, disableTransition = true } = options;\n\tconst modes = {\n\t\tauto: \"\",\n\t\tlight: \"light\",\n\t\tdark: \"dark\",\n\t\t...options.modes || {}\n\t};\n\tconst preferredDark = usePreferredDark({ window: window$1 });\n\tconst system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n\tconst store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, {\n\t\twindow: window$1,\n\t\tlistenToStorageChanges\n\t}));\n\tconst state = computed(() => store.value === \"auto\" ? system.value : store.value);\n\tconst updateHTMLAttrs = getSSRHandler(\"updateHTMLAttrs\", (selector$1, attribute$1, value) => {\n\t\tconst el = typeof selector$1 === \"string\" ? window$1 === null || window$1 === void 0 ? void 0 : window$1.document.querySelector(selector$1) : unrefElement(selector$1);\n\t\tif (!el) return;\n\t\tconst classesToAdd = /* @__PURE__ */ new Set();\n\t\tconst classesToRemove = /* @__PURE__ */ new Set();\n\t\tlet attributeToChange = null;\n\t\tif (attribute$1 === \"class\") {\n\t\t\tconst current = value.split(/\\s/g);\n\t\t\tObject.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n\t\t\t\tif (current.includes(v)) classesToAdd.add(v);\n\t\t\t\telse classesToRemove.add(v);\n\t\t\t});\n\t\t} else attributeToChange = {\n\t\t\tkey: attribute$1,\n\t\t\tvalue\n\t\t};\n\t\tif (classesToAdd.size === 0 && classesToRemove.size === 0 && attributeToChange === null) return;\n\t\tlet style;\n\t\tif (disableTransition) {\n\t\t\tstyle = window$1.document.createElement(\"style\");\n\t\t\tstyle.appendChild(document.createTextNode(CSS_DISABLE_TRANS));\n\t\t\twindow$1.document.head.appendChild(style);\n\t\t}\n\t\tfor (const c of classesToAdd) el.classList.add(c);\n\t\tfor (const c of classesToRemove) el.classList.remove(c);\n\t\tif (attributeToChange) el.setAttribute(attributeToChange.key, attributeToChange.value);\n\t\tif (disableTransition) {\n\t\t\twindow$1.getComputedStyle(style).opacity;\n\t\t\tdocument.head.removeChild(style);\n\t\t}\n\t});\n\tfunction defaultOnChanged(mode) {\n\t\tvar _modes$mode;\n\t\tupdateHTMLAttrs(selector, attribute, (_modes$mode = modes[mode]) !== null && _modes$mode !== void 0 ? _modes$mode : mode);\n\t}\n\tfunction onChanged(mode) {\n\t\tif (options.onChanged) options.onChanged(mode, defaultOnChanged);\n\t\telse defaultOnChanged(mode);\n\t}\n\twatch(state, onChanged, {\n\t\tflush: \"post\",\n\t\timmediate: true\n\t});\n\ttryOnMounted(() => onChanged(state.value));\n\tconst auto = computed({\n\t\tget() {\n\t\t\treturn emitAuto ? store.value : state.value;\n\t\t},\n\t\tset(v) {\n\t\t\tstore.value = v;\n\t\t}\n\t});\n\treturn Object.assign(auto, {\n\t\tstore,\n\t\tsystem,\n\t\tstate\n\t});\n}\n\n//#endregion\n//#region useConfirmDialog/index.ts\n/**\n* Hooks for creating confirm dialogs. Useful for modal windows, popups and logins.\n*\n* @see https://vueuse.org/useConfirmDialog/\n* @param revealed `boolean` `ref` that handles a modal window\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useConfirmDialog(revealed = shallowRef(false)) {\n\tconst confirmHook = createEventHook();\n\tconst cancelHook = createEventHook();\n\tconst revealHook = createEventHook();\n\tlet _resolve = noop;\n\tconst reveal = (data) => {\n\t\trevealHook.trigger(data);\n\t\trevealed.value = true;\n\t\treturn new Promise((resolve) => {\n\t\t\t_resolve = resolve;\n\t\t});\n\t};\n\tconst confirm = (data) => {\n\t\trevealed.value = false;\n\t\tconfirmHook.trigger(data);\n\t\t_resolve({\n\t\t\tdata,\n\t\t\tisCanceled: false\n\t\t});\n\t};\n\tconst cancel = (data) => {\n\t\trevealed.value = false;\n\t\tcancelHook.trigger(data);\n\t\t_resolve({\n\t\t\tdata,\n\t\t\tisCanceled: true\n\t\t});\n\t};\n\treturn {\n\t\tisRevealed: computed(() => revealed.value),\n\t\treveal,\n\t\tconfirm,\n\t\tcancel,\n\t\tonReveal: revealHook.on,\n\t\tonConfirm: confirmHook.on,\n\t\tonCancel: cancelHook.on\n\t};\n}\n\n//#endregion\n//#region useCountdown/index.ts\n/**\n* Wrapper for `useIntervalFn` that provides a countdown timer in seconds.\n*\n* @param initialCountdown\n* @param options\n*\n* @see https://vueuse.org/useCountdown\n*/\nfunction useCountdown(initialCountdown, options) {\n\tvar _options$interval, _options$immediate;\n\tconst remaining = shallowRef(toValue(initialCountdown));\n\tconst intervalController = useIntervalFn(() => {\n\t\tvar _options$onTick;\n\t\tconst value = remaining.value - 1;\n\t\tremaining.value = value < 0 ? 0 : value;\n\t\toptions === null || options === void 0 || (_options$onTick = options.onTick) === null || _options$onTick === void 0 || _options$onTick.call(options);\n\t\tif (remaining.value <= 0) {\n\t\t\tvar _options$onComplete;\n\t\t\tintervalController.pause();\n\t\t\toptions === null || options === void 0 || (_options$onComplete = options.onComplete) === null || _options$onComplete === void 0 || _options$onComplete.call(options);\n\t\t}\n\t}, (_options$interval = options === null || options === void 0 ? void 0 : options.interval) !== null && _options$interval !== void 0 ? _options$interval : 1e3, { immediate: (_options$immediate = options === null || options === void 0 ? void 0 : options.immediate) !== null && _options$immediate !== void 0 ? _options$immediate : false });\n\tconst reset = (countdown) => {\n\t\tvar _toValue;\n\t\tremaining.value = (_toValue = toValue(countdown)) !== null && _toValue !== void 0 ? _toValue : toValue(initialCountdown);\n\t};\n\tconst stop = () => {\n\t\tintervalController.pause();\n\t\treset();\n\t};\n\tconst resume = () => {\n\t\tif (!intervalController.isActive.value) {\n\t\t\tif (remaining.value > 0) intervalController.resume();\n\t\t}\n\t};\n\tconst start = (countdown) => {\n\t\treset(countdown);\n\t\tintervalController.resume();\n\t};\n\treturn {\n\t\tremaining,\n\t\treset,\n\t\tstop,\n\t\tstart,\n\t\tpause: intervalController.pause,\n\t\tresume,\n\t\tisActive: intervalController.isActive\n\t};\n}\n\n//#endregion\n//#region useCssVar/index.ts\n/**\n* Manipulate CSS variables.\n*\n* @see https://vueuse.org/useCssVar\n* @param prop\n* @param target\n* @param options\n*/\nfunction useCssVar(prop, target, options = {}) {\n\tconst { window: window$1 = defaultWindow, initialValue, observe = false } = options;\n\tconst variable = shallowRef(initialValue);\n\tconst elRef = computed(() => {\n\t\tvar _window$document;\n\t\treturn unrefElement(target) || (window$1 === null || window$1 === void 0 || (_window$document = window$1.document) === null || _window$document === void 0 ? void 0 : _window$document.documentElement);\n\t});\n\tfunction updateCssVar() {\n\t\tconst key = toValue(prop);\n\t\tconst el = toValue(elRef);\n\t\tif (el && window$1 && key) {\n\t\t\tvar _window$getComputedSt;\n\t\t\tvariable.value = ((_window$getComputedSt = window$1.getComputedStyle(el).getPropertyValue(key)) === null || _window$getComputedSt === void 0 ? void 0 : _window$getComputedSt.trim()) || variable.value || initialValue;\n\t\t}\n\t}\n\tif (observe) useMutationObserver(elRef, updateCssVar, {\n\t\tattributeFilter: [\"style\", \"class\"],\n\t\twindow: window$1\n\t});\n\twatch([elRef, () => toValue(prop)], (_, old) => {\n\t\tif (old[0] && old[1]) old[0].style.removeProperty(old[1]);\n\t\tupdateCssVar();\n\t}, { immediate: true });\n\twatch([variable, elRef], ([val, el]) => {\n\t\tconst raw_prop = toValue(prop);\n\t\tif ((el === null || el === void 0 ? void 0 : el.style) && raw_prop) if (val == null) el.style.removeProperty(raw_prop);\n\t\telse el.style.setProperty(raw_prop, val);\n\t}, { immediate: true });\n\treturn variable;\n}\n\n//#endregion\n//#region useCurrentElement/index.ts\nfunction useCurrentElement(rootComponent) {\n\tconst vm = getCurrentInstance();\n\tconst currentElement = computedWithControl(() => null, () => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el);\n\tonUpdated(currentElement.trigger);\n\tonMounted(currentElement.trigger);\n\treturn currentElement;\n}\n\n//#endregion\n//#region useCycleList/index.ts\n/**\n* Cycle through a list of items\n*\n* @see https://vueuse.org/useCycleList\n*/\nfunction useCycleList(list, options) {\n\tconst state = shallowRef(getInitialValue());\n\tconst listRef = toRef(list);\n\tconst index = computed({\n\t\tget() {\n\t\t\tvar _options$fallbackInde;\n\t\t\tconst targetList = listRef.value;\n\t\t\tlet index$1 = (options === null || options === void 0 ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n\t\t\tif (index$1 < 0) index$1 = (_options$fallbackInde = options === null || options === void 0 ? void 0 : options.fallbackIndex) !== null && _options$fallbackInde !== void 0 ? _options$fallbackInde : 0;\n\t\t\treturn index$1;\n\t\t},\n\t\tset(v) {\n\t\t\tset(v);\n\t\t}\n\t});\n\tfunction set(i) {\n\t\tconst targetList = listRef.value;\n\t\tconst length = targetList.length;\n\t\tconst value = targetList[(i % length + length) % length];\n\t\tstate.value = value;\n\t\treturn value;\n\t}\n\tfunction shift(delta = 1) {\n\t\treturn set(index.value + delta);\n\t}\n\tfunction next(n = 1) {\n\t\treturn shift(n);\n\t}\n\tfunction prev(n = 1) {\n\t\treturn shift(-n);\n\t}\n\tfunction getInitialValue() {\n\t\tvar _toValue, _options$initialValue;\n\t\treturn (_toValue = toValue((_options$initialValue = options === null || options === void 0 ? void 0 : options.initialValue) !== null && _options$initialValue !== void 0 ? _options$initialValue : toValue(list)[0])) !== null && _toValue !== void 0 ? _toValue : void 0;\n\t}\n\twatch(listRef, () => set(index.value));\n\treturn {\n\t\tstate,\n\t\tindex,\n\t\tnext,\n\t\tprev,\n\t\tgo: set\n\t};\n}\n\n//#endregion\n//#region useDark/index.ts\n/**\n* Reactive dark mode with auto data persistence.\n*\n* @see https://vueuse.org/useDark\n* @param options\n*/\nfunction useDark(options = {}) {\n\tconst { valueDark = \"dark\", valueLight = \"\" } = options;\n\tconst mode = useColorMode({\n\t\t...options,\n\t\tonChanged: (mode$1, defaultHandler) => {\n\t\t\tvar _options$onChanged;\n\t\t\tif (options.onChanged) (_options$onChanged = options.onChanged) === null || _options$onChanged === void 0 || _options$onChanged.call(options, mode$1 === \"dark\", defaultHandler, mode$1);\n\t\t\telse defaultHandler(mode$1);\n\t\t},\n\t\tmodes: {\n\t\t\tdark: valueDark,\n\t\t\tlight: valueLight\n\t\t}\n\t});\n\tconst system = computed(() => mode.system.value);\n\treturn computed({\n\t\tget() {\n\t\t\treturn mode.value === \"dark\";\n\t\t},\n\t\tset(v) {\n\t\t\tconst modeVal = v ? \"dark\" : \"light\";\n\t\t\tif (system.value === modeVal) mode.value = \"auto\";\n\t\t\telse mode.value = modeVal;\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useManualRefHistory/index.ts\nfunction fnBypass(v) {\n\treturn v;\n}\nfunction fnSetSource(source, value) {\n\treturn source.value = value;\n}\nfunction defaultDump(clone) {\n\treturn clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n\treturn clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\n/**\n* Track the change history of a ref, also provides undo and redo functionality.\n*\n* @see https://vueuse.org/useManualRefHistory\n* @param source\n* @param options\n*/\nfunction useManualRefHistory(source, options = {}) {\n\tconst { clone = false, dump = defaultDump(clone), parse = defaultParse(clone), setSource = fnSetSource } = options;\n\tfunction _createHistoryRecord() {\n\t\treturn markRaw({\n\t\t\tsnapshot: dump(source.value),\n\t\t\ttimestamp: timestamp()\n\t\t});\n\t}\n\tconst last = ref(_createHistoryRecord());\n\tconst undoStack = ref([]);\n\tconst redoStack = ref([]);\n\tconst _setSource = (record) => {\n\t\tsetSource(source, parse(record.snapshot));\n\t\tlast.value = record;\n\t};\n\tconst commit = () => {\n\t\tundoStack.value.unshift(last.value);\n\t\tlast.value = _createHistoryRecord();\n\t\tif (options.capacity && undoStack.value.length > options.capacity) undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n\t\tif (redoStack.value.length) redoStack.value.splice(0, redoStack.value.length);\n\t};\n\tconst clear = () => {\n\t\tundoStack.value.splice(0, undoStack.value.length);\n\t\tredoStack.value.splice(0, redoStack.value.length);\n\t};\n\tconst undo = () => {\n\t\tconst state = undoStack.value.shift();\n\t\tif (state) {\n\t\t\tredoStack.value.unshift(last.value);\n\t\t\t_setSource(state);\n\t\t}\n\t};\n\tconst redo = () => {\n\t\tconst state = redoStack.value.shift();\n\t\tif (state) {\n\t\t\tundoStack.value.unshift(last.value);\n\t\t\t_setSource(state);\n\t\t}\n\t};\n\tconst reset = () => {\n\t\t_setSource(last.value);\n\t};\n\treturn {\n\t\tsource,\n\t\tundoStack,\n\t\tredoStack,\n\t\tlast,\n\t\thistory: computed(() => [last.value, ...undoStack.value]),\n\t\tcanUndo: computed(() => undoStack.value.length > 0),\n\t\tcanRedo: computed(() => redoStack.value.length > 0),\n\t\tclear,\n\t\tcommit,\n\t\treset,\n\t\tundo,\n\t\tredo\n\t};\n}\n\n//#endregion\n//#region useRefHistory/index.ts\n/**\n* Track the change history of a ref, also provides undo and redo functionality.\n*\n* @see https://vueuse.org/useRefHistory\n* @param source\n* @param options\n*/\nfunction useRefHistory(source, options = {}) {\n\tconst { deep = false, flush = \"pre\", eventFilter, shouldCommit = () => true } = options;\n\tconst { eventFilter: composedFilter, pause, resume: resumeTracking, isActive: isTracking } = pausableFilter(eventFilter);\n\tlet lastRawValue = source.value;\n\tconst { ignoreUpdates, ignorePrevAsyncUpdates, stop } = watchIgnorable(source, commit, {\n\t\tdeep,\n\t\tflush,\n\t\teventFilter: composedFilter\n\t});\n\tfunction setSource(source$1, value) {\n\t\tignorePrevAsyncUpdates();\n\t\tignoreUpdates(() => {\n\t\t\tsource$1.value = value;\n\t\t\tlastRawValue = value;\n\t\t});\n\t}\n\tconst manualHistory = useManualRefHistory(source, {\n\t\t...options,\n\t\tclone: options.clone || deep,\n\t\tsetSource\n\t});\n\tconst { clear, commit: manualCommit } = manualHistory;\n\tfunction commit() {\n\t\tignorePrevAsyncUpdates();\n\t\tif (!shouldCommit(lastRawValue, source.value)) return;\n\t\tlastRawValue = source.value;\n\t\tmanualCommit();\n\t}\n\tfunction resume(commitNow) {\n\t\tresumeTracking();\n\t\tif (commitNow) commit();\n\t}\n\tfunction batch(fn) {\n\t\tlet canceled = false;\n\t\tconst cancel = () => canceled = true;\n\t\tignoreUpdates(() => {\n\t\t\tfn(cancel);\n\t\t});\n\t\tif (!canceled) commit();\n\t}\n\tfunction dispose() {\n\t\tstop();\n\t\tclear();\n\t}\n\treturn {\n\t\t...manualHistory,\n\t\tisTracking,\n\t\tpause,\n\t\tresume,\n\t\tcommit,\n\t\tbatch,\n\t\tdispose\n\t};\n}\n\n//#endregion\n//#region useDebouncedRefHistory/index.ts\n/**\n* Shorthand for [useRefHistory](https://vueuse.org/useRefHistory) with debounce filter.\n*\n* @see https://vueuse.org/useDebouncedRefHistory\n* @param source\n* @param options\n*/\nfunction useDebouncedRefHistory(source, options = {}) {\n\tconst filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n\treturn { ...useRefHistory(source, {\n\t\t...options,\n\t\teventFilter: filter\n\t}) };\n}\n\n//#endregion\n//#region useDeviceMotion/index.ts\n/**\n* Reactive DeviceMotionEvent.\n*\n* @see https://vueuse.org/useDeviceMotion\n* @param options\n*/\nfunction useDeviceMotion(options = {}) {\n\tconst { window: window$1 = defaultWindow, requestPermissions = false, eventFilter = bypassFilter } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof DeviceMotionEvent !== \"undefined\");\n\tconst requirePermissions = /* @__PURE__ */ useSupported(() => isSupported.value && \"requestPermission\" in DeviceMotionEvent && typeof DeviceMotionEvent.requestPermission === \"function\");\n\tconst permissionGranted = shallowRef(false);\n\tconst acceleration = ref({\n\t\tx: null,\n\t\ty: null,\n\t\tz: null\n\t});\n\tconst rotationRate = ref({\n\t\talpha: null,\n\t\tbeta: null,\n\t\tgamma: null\n\t});\n\tconst interval = shallowRef(0);\n\tconst accelerationIncludingGravity = ref({\n\t\tx: null,\n\t\ty: null,\n\t\tz: null\n\t});\n\tfunction init() {\n\t\tif (window$1) useEventListener(window$1, \"devicemotion\", createFilterWrapper(eventFilter, (event) => {\n\t\t\tvar _event$acceleration, _event$acceleration2, _event$acceleration3, _event$accelerationIn, _event$accelerationIn2, _event$accelerationIn3, _event$rotationRate, _event$rotationRate2, _event$rotationRate3;\n\t\t\tacceleration.value = {\n\t\t\t\tx: ((_event$acceleration = event.acceleration) === null || _event$acceleration === void 0 ? void 0 : _event$acceleration.x) || null,\n\t\t\t\ty: ((_event$acceleration2 = event.acceleration) === null || _event$acceleration2 === void 0 ? void 0 : _event$acceleration2.y) || null,\n\t\t\t\tz: ((_event$acceleration3 = event.acceleration) === null || _event$acceleration3 === void 0 ? void 0 : _event$acceleration3.z) || null\n\t\t\t};\n\t\t\taccelerationIncludingGravity.value = {\n\t\t\t\tx: ((_event$accelerationIn = event.accelerationIncludingGravity) === null || _event$accelerationIn === void 0 ? void 0 : _event$accelerationIn.x) || null,\n\t\t\t\ty: ((_event$accelerationIn2 = event.accelerationIncludingGravity) === null || _event$accelerationIn2 === void 0 ? void 0 : _event$accelerationIn2.y) || null,\n\t\t\t\tz: ((_event$accelerationIn3 = event.accelerationIncludingGravity) === null || _event$accelerationIn3 === void 0 ? void 0 : _event$accelerationIn3.z) || null\n\t\t\t};\n\t\t\trotationRate.value = {\n\t\t\t\talpha: ((_event$rotationRate = event.rotationRate) === null || _event$rotationRate === void 0 ? void 0 : _event$rotationRate.alpha) || null,\n\t\t\t\tbeta: ((_event$rotationRate2 = event.rotationRate) === null || _event$rotationRate2 === void 0 ? void 0 : _event$rotationRate2.beta) || null,\n\t\t\t\tgamma: ((_event$rotationRate3 = event.rotationRate) === null || _event$rotationRate3 === void 0 ? void 0 : _event$rotationRate3.gamma) || null\n\t\t\t};\n\t\t\tinterval.value = event.interval;\n\t\t}), { passive: true });\n\t}\n\tconst ensurePermissions = async () => {\n\t\tif (!requirePermissions.value) permissionGranted.value = true;\n\t\tif (permissionGranted.value) return;\n\t\tif (requirePermissions.value) {\n\t\t\tconst requestPermission = DeviceMotionEvent.requestPermission;\n\t\t\ttry {\n\t\t\t\tif (await requestPermission() === \"granted\") {\n\t\t\t\t\tpermissionGranted.value = true;\n\t\t\t\t\tinit();\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tconsole.error(error);\n\t\t\t}\n\t\t}\n\t};\n\tif (isSupported.value) if (requestPermissions && requirePermissions.value) ensurePermissions().then(() => init());\n\telse init();\n\treturn {\n\t\tacceleration,\n\t\taccelerationIncludingGravity,\n\t\trotationRate,\n\t\tinterval,\n\t\tisSupported,\n\t\trequirePermissions,\n\t\tensurePermissions,\n\t\tpermissionGranted\n\t};\n}\n\n//#endregion\n//#region useDeviceOrientation/index.ts\n/**\n* Reactive DeviceOrientationEvent.\n*\n* @see https://vueuse.org/useDeviceOrientation\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDeviceOrientation(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"DeviceOrientationEvent\" in window$1);\n\tconst isAbsolute = shallowRef(false);\n\tconst alpha = shallowRef(null);\n\tconst beta = shallowRef(null);\n\tconst gamma = shallowRef(null);\n\tif (window$1 && isSupported.value) useEventListener(window$1, \"deviceorientation\", (event) => {\n\t\tisAbsolute.value = event.absolute;\n\t\talpha.value = event.alpha;\n\t\tbeta.value = event.beta;\n\t\tgamma.value = event.gamma;\n\t}, { passive: true });\n\treturn {\n\t\tisSupported,\n\t\tisAbsolute,\n\t\talpha,\n\t\tbeta,\n\t\tgamma\n\t};\n}\n\n//#endregion\n//#region useDevicePixelRatio/index.ts\n/**\n* Reactively track `window.devicePixelRatio`.\n*\n* @see https://vueuse.org/useDevicePixelRatio\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDevicePixelRatio(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst pixelRatio = shallowRef(1);\n\tconst query = useMediaQuery(() => `(resolution: ${pixelRatio.value}dppx)`, options);\n\tlet stop = noop;\n\tif (window$1) stop = watchImmediate(query, () => pixelRatio.value = window$1.devicePixelRatio);\n\treturn {\n\t\tpixelRatio: readonly(pixelRatio),\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useDevicesList/index.ts\n/**\n* Reactive `enumerateDevices` listing available input/output devices\n*\n* @see https://vueuse.org/useDevicesList\n* @param options\n*/\nfunction useDevicesList(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator, requestPermissions = false, constraints = {\n\t\taudio: true,\n\t\tvideo: true\n\t}, onUpdated: onUpdated$1 } = options;\n\tconst devices = ref([]);\n\tconst videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n\tconst audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n\tconst audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && navigator$1.mediaDevices && navigator$1.mediaDevices.enumerateDevices);\n\tconst permissionGranted = shallowRef(false);\n\tlet stream;\n\tasync function update() {\n\t\tif (!isSupported.value) return;\n\t\tdevices.value = await navigator$1.mediaDevices.enumerateDevices();\n\t\tonUpdated$1 === null || onUpdated$1 === void 0 || onUpdated$1(devices.value);\n\t\tif (stream) {\n\t\t\tstream.getTracks().forEach((t) => t.stop());\n\t\t\tstream = null;\n\t\t}\n\t}\n\tasync function ensurePermissions() {\n\t\tconst deviceName = constraints.video ? \"camera\" : \"microphone\";\n\t\tif (!isSupported.value) return false;\n\t\tif (permissionGranted.value) return true;\n\t\tconst { state, query } = usePermission(deviceName, { controls: true });\n\t\tawait query();\n\t\tif (state.value !== \"granted\") {\n\t\t\tlet granted = true;\n\t\t\ttry {\n\t\t\t\tconst allDevices = await navigator$1.mediaDevices.enumerateDevices();\n\t\t\t\tconst hasCamera = allDevices.some((device) => device.kind === \"videoinput\");\n\t\t\t\tconst hasMicrophone = allDevices.some((device) => device.kind === \"audioinput\" || device.kind === \"audiooutput\");\n\t\t\t\tconstraints.video = hasCamera ? constraints.video : false;\n\t\t\t\tconstraints.audio = hasMicrophone ? constraints.audio : false;\n\t\t\t\tstream = await navigator$1.mediaDevices.getUserMedia(constraints);\n\t\t\t} catch (_unused) {\n\t\t\t\tstream = null;\n\t\t\t\tgranted = false;\n\t\t\t}\n\t\t\tupdate();\n\t\t\tpermissionGranted.value = granted;\n\t\t} else permissionGranted.value = true;\n\t\treturn permissionGranted.value;\n\t}\n\tif (isSupported.value) {\n\t\tif (requestPermissions) ensurePermissions();\n\t\tuseEventListener(navigator$1.mediaDevices, \"devicechange\", update, { passive: true });\n\t\tupdate();\n\t}\n\treturn {\n\t\tdevices,\n\t\tensurePermissions,\n\t\tpermissionGranted,\n\t\tvideoInputs,\n\t\taudioInputs,\n\t\taudioOutputs,\n\t\tisSupported\n\t};\n}\n\n//#endregion\n//#region useDisplayMedia/index.ts\n/**\n* Reactive `mediaDevices.getDisplayMedia` streaming\n*\n* @see https://vueuse.org/useDisplayMedia\n* @param options\n*/\nfunction useDisplayMedia(options = {}) {\n\tvar _options$enabled;\n\tconst enabled = shallowRef((_options$enabled = options.enabled) !== null && _options$enabled !== void 0 ? _options$enabled : false);\n\tconst video = options.video;\n\tconst audio = options.audio;\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tvar _navigator$mediaDevic;\n\t\treturn navigator$1 === null || navigator$1 === void 0 || (_navigator$mediaDevic = navigator$1.mediaDevices) === null || _navigator$mediaDevic === void 0 ? void 0 : _navigator$mediaDevic.getDisplayMedia;\n\t});\n\tconst constraint = {\n\t\taudio,\n\t\tvideo\n\t};\n\tconst stream = shallowRef();\n\tasync function _start() {\n\t\tvar _stream$value;\n\t\tif (!isSupported.value || stream.value) return;\n\t\tstream.value = await navigator$1.mediaDevices.getDisplayMedia(constraint);\n\t\t(_stream$value = stream.value) === null || _stream$value === void 0 || _stream$value.getTracks().forEach((t) => useEventListener(t, \"ended\", stop, { passive: true }));\n\t\treturn stream.value;\n\t}\n\tasync function _stop() {\n\t\tvar _stream$value2;\n\t\t(_stream$value2 = stream.value) === null || _stream$value2 === void 0 || _stream$value2.getTracks().forEach((t) => t.stop());\n\t\tstream.value = void 0;\n\t}\n\tfunction stop() {\n\t\t_stop();\n\t\tenabled.value = false;\n\t}\n\tasync function start() {\n\t\tawait _start();\n\t\tif (stream.value) enabled.value = true;\n\t\treturn stream.value;\n\t}\n\twatch(enabled, (v) => {\n\t\tif (v) _start();\n\t\telse _stop();\n\t}, { immediate: true });\n\treturn {\n\t\tisSupported,\n\t\tstream,\n\t\tstart,\n\t\tstop,\n\t\tenabled\n\t};\n}\n\n//#endregion\n//#region useDocumentVisibility/index.ts\n/**\n* Reactively track `document.visibilityState`.\n*\n* @see https://vueuse.org/useDocumentVisibility\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useDocumentVisibility(options = {}) {\n\tconst { document: document$1 = defaultDocument } = options;\n\tif (!document$1) return shallowRef(\"visible\");\n\tconst visibility = shallowRef(document$1.visibilityState);\n\tuseEventListener(document$1, \"visibilitychange\", () => {\n\t\tvisibility.value = document$1.visibilityState;\n\t}, { passive: true });\n\treturn visibility;\n}\n\n//#endregion\n//#region useDraggable/index.ts\n/**\n* Make elements draggable.\n*\n* @see https://vueuse.org/useDraggable\n* @param target\n* @param options\n*/\nfunction useDraggable(target, options = {}) {\n\tvar _toValue;\n\tconst { pointerTypes, preventDefault: preventDefault$1, stopPropagation, exact, onMove, onEnd, onStart, initialValue, axis = \"both\", draggingElement = defaultWindow, containerElement, handle: draggingHandle = target, buttons = [0] } = options;\n\tconst position = ref((_toValue = toValue(initialValue)) !== null && _toValue !== void 0 ? _toValue : {\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst pressedDelta = ref();\n\tconst filterEvent = (e) => {\n\t\tif (pointerTypes) return pointerTypes.includes(e.pointerType);\n\t\treturn true;\n\t};\n\tconst handleEvent = (e) => {\n\t\tif (toValue(preventDefault$1)) e.preventDefault();\n\t\tif (toValue(stopPropagation)) e.stopPropagation();\n\t};\n\tconst start = (e) => {\n\t\tvar _container$getBoundin;\n\t\tif (!toValue(buttons).includes(e.button)) return;\n\t\tif (toValue(options.disabled) || !filterEvent(e)) return;\n\t\tif (toValue(exact) && e.target !== toValue(target)) return;\n\t\tconst container = toValue(containerElement);\n\t\tconst containerRect = container === null || container === void 0 || (_container$getBoundin = container.getBoundingClientRect) === null || _container$getBoundin === void 0 ? void 0 : _container$getBoundin.call(container);\n\t\tconst targetRect = toValue(target).getBoundingClientRect();\n\t\tconst pos = {\n\t\t\tx: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),\n\t\t\ty: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)\n\t\t};\n\t\tif ((onStart === null || onStart === void 0 ? void 0 : onStart(pos, e)) === false) return;\n\t\tpressedDelta.value = pos;\n\t\thandleEvent(e);\n\t};\n\tconst move = (e) => {\n\t\tif (toValue(options.disabled) || !filterEvent(e)) return;\n\t\tif (!pressedDelta.value) return;\n\t\tconst container = toValue(containerElement);\n\t\tconst targetRect = toValue(target).getBoundingClientRect();\n\t\tlet { x, y } = position.value;\n\t\tif (axis === \"x\" || axis === \"both\") {\n\t\t\tx = e.clientX - pressedDelta.value.x;\n\t\t\tif (container) x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width);\n\t\t}\n\t\tif (axis === \"y\" || axis === \"both\") {\n\t\t\ty = e.clientY - pressedDelta.value.y;\n\t\t\tif (container) y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height);\n\t\t}\n\t\tposition.value = {\n\t\t\tx,\n\t\t\ty\n\t\t};\n\t\tonMove === null || onMove === void 0 || onMove(position.value, e);\n\t\thandleEvent(e);\n\t};\n\tconst end = (e) => {\n\t\tif (toValue(options.disabled) || !filterEvent(e)) return;\n\t\tif (!pressedDelta.value) return;\n\t\tpressedDelta.value = void 0;\n\t\tonEnd === null || onEnd === void 0 || onEnd(position.value, e);\n\t\thandleEvent(e);\n\t};\n\tif (isClient) {\n\t\tconst config = () => {\n\t\t\tvar _options$capture;\n\t\t\treturn {\n\t\t\t\tcapture: (_options$capture = options.capture) !== null && _options$capture !== void 0 ? _options$capture : true,\n\t\t\t\tpassive: !toValue(preventDefault$1)\n\t\t\t};\n\t\t};\n\t\tuseEventListener(draggingHandle, \"pointerdown\", start, config);\n\t\tuseEventListener(draggingElement, \"pointermove\", move, config);\n\t\tuseEventListener(draggingElement, \"pointerup\", end, config);\n\t}\n\treturn {\n\t\t...toRefs(position),\n\t\tposition,\n\t\tisDragging: computed(() => !!pressedDelta.value),\n\t\tstyle: computed(() => `left:${position.value.x}px;top:${position.value.y}px;`)\n\t};\n}\n\n//#endregion\n//#region useDropZone/index.ts\nfunction useDropZone(target, options = {}) {\n\tconst isOverDropZone = shallowRef(false);\n\tconst files = shallowRef(null);\n\tlet counter = 0;\n\tlet isValid = true;\n\tif (isClient) {\n\t\tvar _options$multiple, _options$preventDefau;\n\t\tconst _options = typeof options === \"function\" ? { onDrop: options } : options;\n\t\tconst multiple = (_options$multiple = _options.multiple) !== null && _options$multiple !== void 0 ? _options$multiple : true;\n\t\tconst preventDefaultForUnhandled = (_options$preventDefau = _options.preventDefaultForUnhandled) !== null && _options$preventDefau !== void 0 ? _options$preventDefau : false;\n\t\tconst getFiles = (event) => {\n\t\t\tvar _event$dataTransfer$f, _event$dataTransfer;\n\t\t\tconst list = Array.from((_event$dataTransfer$f = (_event$dataTransfer = event.dataTransfer) === null || _event$dataTransfer === void 0 ? void 0 : _event$dataTransfer.files) !== null && _event$dataTransfer$f !== void 0 ? _event$dataTransfer$f : []);\n\t\t\treturn list.length === 0 ? null : multiple ? list : [list[0]];\n\t\t};\n\t\tconst checkDataTypes = (types) => {\n\t\t\tconst dataTypes = unref(_options.dataTypes);\n\t\t\tif (typeof dataTypes === \"function\") return dataTypes(types);\n\t\t\tif (!(dataTypes === null || dataTypes === void 0 ? void 0 : dataTypes.length)) return true;\n\t\t\tif (types.length === 0) return false;\n\t\t\treturn types.every((type) => dataTypes.some((allowedType) => type.includes(allowedType)));\n\t\t};\n\t\tconst checkValidity = (items) => {\n\t\t\tif (_options.checkValidity) return _options.checkValidity(items);\n\t\t\tconst dataTypesValid = checkDataTypes(Array.from(items !== null && items !== void 0 ? items : []).map((item) => item.type));\n\t\t\tconst multipleFilesValid = multiple || items.length <= 1;\n\t\t\treturn dataTypesValid && multipleFilesValid;\n\t\t};\n\t\tconst isSafari = () => /^(?:(?!chrome|android).)*safari/i.test(navigator.userAgent) && !(\"chrome\" in window);\n\t\tconst handleDragEvent = (event, eventType) => {\n\t\t\tvar _event$dataTransfer2, _ref;\n\t\t\tconst dataTransferItemList = (_event$dataTransfer2 = event.dataTransfer) === null || _event$dataTransfer2 === void 0 ? void 0 : _event$dataTransfer2.items;\n\t\t\tisValid = (_ref = dataTransferItemList && checkValidity(dataTransferItemList)) !== null && _ref !== void 0 ? _ref : false;\n\t\t\tif (preventDefaultForUnhandled) event.preventDefault();\n\t\t\tif (!isSafari() && !isValid) {\n\t\t\t\tif (event.dataTransfer) event.dataTransfer.dropEffect = \"none\";\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tevent.preventDefault();\n\t\t\tif (event.dataTransfer) event.dataTransfer.dropEffect = \"copy\";\n\t\t\tconst currentFiles = getFiles(event);\n\t\t\tswitch (eventType) {\n\t\t\t\tcase \"enter\":\n\t\t\t\t\tvar _options$onEnter;\n\t\t\t\t\tcounter += 1;\n\t\t\t\t\tisOverDropZone.value = true;\n\t\t\t\t\t(_options$onEnter = _options.onEnter) === null || _options$onEnter === void 0 || _options$onEnter.call(_options, null, event);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"over\":\n\t\t\t\t\tvar _options$onOver;\n\t\t\t\t\t(_options$onOver = _options.onOver) === null || _options$onOver === void 0 || _options$onOver.call(_options, null, event);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"leave\":\n\t\t\t\t\tvar _options$onLeave;\n\t\t\t\t\tcounter -= 1;\n\t\t\t\t\tif (counter === 0) isOverDropZone.value = false;\n\t\t\t\t\t(_options$onLeave = _options.onLeave) === null || _options$onLeave === void 0 || _options$onLeave.call(_options, null, event);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"drop\":\n\t\t\t\t\tcounter = 0;\n\t\t\t\t\tisOverDropZone.value = false;\n\t\t\t\t\tif (isValid) {\n\t\t\t\t\t\tvar _options$onDrop;\n\t\t\t\t\t\tfiles.value = currentFiles;\n\t\t\t\t\t\t(_options$onDrop = _options.onDrop) === null || _options$onDrop === void 0 || _options$onDrop.call(_options, currentFiles, event);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t};\n\t\tuseEventListener(target, \"dragenter\", (event) => handleDragEvent(event, \"enter\"));\n\t\tuseEventListener(target, \"dragover\", (event) => handleDragEvent(event, \"over\"));\n\t\tuseEventListener(target, \"dragleave\", (event) => handleDragEvent(event, \"leave\"));\n\t\tuseEventListener(target, \"drop\", (event) => handleDragEvent(event, \"drop\"));\n\t}\n\treturn {\n\t\tfiles,\n\t\tisOverDropZone\n\t};\n}\n\n//#endregion\n//#region useResizeObserver/index.ts\n/**\n* Reports changes to the dimensions of an Element's content or the border-box\n*\n* @see https://vueuse.org/useResizeObserver\n* @param target\n* @param callback\n* @param options\n*/\nfunction useResizeObserver(target, callback, options = {}) {\n\tconst { window: window$1 = defaultWindow,...observerOptions } = options;\n\tlet observer;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"ResizeObserver\" in window$1);\n\tconst cleanup = () => {\n\t\tif (observer) {\n\t\t\tobserver.disconnect();\n\t\t\tobserver = void 0;\n\t\t}\n\t};\n\tconst stopWatch = watch(computed(() => {\n\t\tconst _targets = toValue(target);\n\t\treturn Array.isArray(_targets) ? _targets.map((el) => unrefElement(el)) : [unrefElement(_targets)];\n\t}), (els) => {\n\t\tcleanup();\n\t\tif (isSupported.value && window$1) {\n\t\t\tobserver = new ResizeObserver(callback);\n\t\t\tfor (const _el of els) if (_el) observer.observe(_el, observerOptions);\n\t\t}\n\t}, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t});\n\tconst stop = () => {\n\t\tcleanup();\n\t\tstopWatch();\n\t};\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisSupported,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useElementBounding/index.ts\n/**\n* Reactive bounding box of an HTML element.\n*\n* @see https://vueuse.org/useElementBounding\n* @param target\n*/\nfunction useElementBounding(target, options = {}) {\n\tconst { reset = true, windowResize = true, windowScroll = true, immediate = true, updateTiming = \"sync\" } = options;\n\tconst height = shallowRef(0);\n\tconst bottom = shallowRef(0);\n\tconst left = shallowRef(0);\n\tconst right = shallowRef(0);\n\tconst top = shallowRef(0);\n\tconst width = shallowRef(0);\n\tconst x = shallowRef(0);\n\tconst y = shallowRef(0);\n\tfunction recalculate() {\n\t\tconst el = unrefElement(target);\n\t\tif (!el) {\n\t\t\tif (reset) {\n\t\t\t\theight.value = 0;\n\t\t\t\tbottom.value = 0;\n\t\t\t\tleft.value = 0;\n\t\t\t\tright.value = 0;\n\t\t\t\ttop.value = 0;\n\t\t\t\twidth.value = 0;\n\t\t\t\tx.value = 0;\n\t\t\t\ty.value = 0;\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tconst rect = el.getBoundingClientRect();\n\t\theight.value = rect.height;\n\t\tbottom.value = rect.bottom;\n\t\tleft.value = rect.left;\n\t\tright.value = rect.right;\n\t\ttop.value = rect.top;\n\t\twidth.value = rect.width;\n\t\tx.value = rect.x;\n\t\ty.value = rect.y;\n\t}\n\tfunction update() {\n\t\tif (updateTiming === \"sync\") recalculate();\n\t\telse if (updateTiming === \"next-frame\") requestAnimationFrame(() => recalculate());\n\t}\n\tuseResizeObserver(target, update);\n\twatch(() => unrefElement(target), (ele) => !ele && update());\n\tuseMutationObserver(target, update, { attributeFilter: [\"style\", \"class\"] });\n\tif (windowScroll) useEventListener(\"scroll\", update, {\n\t\tcapture: true,\n\t\tpassive: true\n\t});\n\tif (windowResize) useEventListener(\"resize\", update, { passive: true });\n\ttryOnMounted(() => {\n\t\tif (immediate) update();\n\t});\n\treturn {\n\t\theight,\n\t\tbottom,\n\t\tleft,\n\t\tright,\n\t\ttop,\n\t\twidth,\n\t\tx,\n\t\ty,\n\t\tupdate\n\t};\n}\n\n//#endregion\n//#region useElementByPoint/index.ts\n/**\n* Reactive element by point.\n*\n* @see https://vueuse.org/useElementByPoint\n* @param options - UseElementByPointOptions\n*/\nfunction useElementByPoint(options) {\n\tconst { x, y, document: document$1 = defaultDocument, multiple, interval = \"requestAnimationFrame\", immediate = true } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tif (toValue(multiple)) return document$1 && \"elementsFromPoint\" in document$1;\n\t\treturn document$1 && \"elementFromPoint\" in document$1;\n\t});\n\tconst element = shallowRef(null);\n\tconst cb = () => {\n\t\tvar _document$elementsFro, _document$elementFrom;\n\t\telement.value = toValue(multiple) ? (_document$elementsFro = document$1 === null || document$1 === void 0 ? void 0 : document$1.elementsFromPoint(toValue(x), toValue(y))) !== null && _document$elementsFro !== void 0 ? _document$elementsFro : [] : (_document$elementFrom = document$1 === null || document$1 === void 0 ? void 0 : document$1.elementFromPoint(toValue(x), toValue(y))) !== null && _document$elementFrom !== void 0 ? _document$elementFrom : null;\n\t};\n\treturn {\n\t\tisSupported,\n\t\telement,\n\t\t...interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate })\n\t};\n}\n\n//#endregion\n//#region useElementHover/index.ts\nfunction useElementHover(el, options = {}) {\n\tconst { delayEnter = 0, delayLeave = 0, triggerOnRemoval = false, window: window$1 = defaultWindow } = options;\n\tconst isHovered = shallowRef(false);\n\tlet timer;\n\tconst toggle = (entering) => {\n\t\tconst delay = entering ? delayEnter : delayLeave;\n\t\tif (timer) {\n\t\t\tclearTimeout(timer);\n\t\t\ttimer = void 0;\n\t\t}\n\t\tif (delay) timer = setTimeout(() => isHovered.value = entering, delay);\n\t\telse isHovered.value = entering;\n\t};\n\tif (!window$1) return isHovered;\n\tuseEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n\tuseEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n\tif (triggerOnRemoval) onElementRemoval(computed(() => unrefElement(el)), () => toggle(false));\n\treturn isHovered;\n}\n\n//#endregion\n//#region useElementSize/index.ts\n/**\n* Reactive size of an HTML element.\n*\n* @see https://vueuse.org/useElementSize\n*/\nfunction useElementSize(target, initialSize = {\n\twidth: 0,\n\theight: 0\n}, options = {}) {\n\tconst { window: window$1 = defaultWindow, box = \"content-box\" } = options;\n\tconst isSVG = computed(() => {\n\t\tvar _unrefElement;\n\t\treturn (_unrefElement = unrefElement(target)) === null || _unrefElement === void 0 || (_unrefElement = _unrefElement.namespaceURI) === null || _unrefElement === void 0 ? void 0 : _unrefElement.includes(\"svg\");\n\t});\n\tconst width = shallowRef(initialSize.width);\n\tconst height = shallowRef(initialSize.height);\n\tconst { stop: stop1 } = useResizeObserver(target, ([entry]) => {\n\t\tconst boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n\t\tif (window$1 && isSVG.value) {\n\t\t\tconst $elem = unrefElement(target);\n\t\t\tif ($elem) {\n\t\t\t\tconst rect = $elem.getBoundingClientRect();\n\t\t\t\twidth.value = rect.width;\n\t\t\t\theight.value = rect.height;\n\t\t\t}\n\t\t} else if (boxSize) {\n\t\t\tconst formatBoxSize = toArray(boxSize);\n\t\t\twidth.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n\t\t\theight.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n\t\t} else {\n\t\t\twidth.value = entry.contentRect.width;\n\t\t\theight.value = entry.contentRect.height;\n\t\t}\n\t}, options);\n\ttryOnMounted(() => {\n\t\tconst ele = unrefElement(target);\n\t\tif (ele) {\n\t\t\twidth.value = \"offsetWidth\" in ele ? ele.offsetWidth : initialSize.width;\n\t\t\theight.value = \"offsetHeight\" in ele ? ele.offsetHeight : initialSize.height;\n\t\t}\n\t});\n\tconst stop2 = watch(() => unrefElement(target), (ele) => {\n\t\twidth.value = ele ? initialSize.width : 0;\n\t\theight.value = ele ? initialSize.height : 0;\n\t});\n\tfunction stop() {\n\t\tstop1();\n\t\tstop2();\n\t}\n\treturn {\n\t\twidth,\n\t\theight,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useIntersectionObserver/index.ts\n/**\n* Detects that a target element's visibility.\n*\n* @see https://vueuse.org/useIntersectionObserver\n* @param target\n* @param callback\n* @param options\n*/\nfunction useIntersectionObserver(target, callback, options = {}) {\n\tconst { root, rootMargin = \"0px\", threshold = 0, window: window$1 = defaultWindow, immediate = true } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"IntersectionObserver\" in window$1);\n\tconst targets = computed(() => {\n\t\treturn toArray(toValue(target)).map(unrefElement).filter(notNullish);\n\t});\n\tlet cleanup = noop;\n\tconst isActive = shallowRef(immediate);\n\tconst stopWatch = isSupported.value ? watch(() => [\n\t\ttargets.value,\n\t\tunrefElement(root),\n\t\tisActive.value\n\t], ([targets$1, root$1]) => {\n\t\tcleanup();\n\t\tif (!isActive.value) return;\n\t\tif (!targets$1.length) return;\n\t\tconst observer = new IntersectionObserver(callback, {\n\t\t\troot: unrefElement(root$1),\n\t\t\trootMargin,\n\t\t\tthreshold\n\t\t});\n\t\ttargets$1.forEach((el) => el && observer.observe(el));\n\t\tcleanup = () => {\n\t\t\tobserver.disconnect();\n\t\t\tcleanup = noop;\n\t\t};\n\t}, {\n\t\timmediate,\n\t\tflush: \"post\"\n\t}) : noop;\n\tconst stop = () => {\n\t\tcleanup();\n\t\tstopWatch();\n\t\tisActive.value = false;\n\t};\n\ttryOnScopeDispose(stop);\n\treturn {\n\t\tisSupported,\n\t\tisActive,\n\t\tpause() {\n\t\t\tcleanup();\n\t\t\tisActive.value = false;\n\t\t},\n\t\tresume() {\n\t\t\tisActive.value = true;\n\t\t},\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useElementVisibility/index.ts\n/**\n* Tracks the visibility of an element within the viewport.\n*\n* @see https://vueuse.org/useElementVisibility\n*/\nfunction useElementVisibility(element, options = {}) {\n\tconst { window: window$1 = defaultWindow, scrollTarget, threshold = 0, rootMargin, once = false, initialValue = false } = options;\n\tconst elementIsVisible = shallowRef(initialValue);\n\tconst { stop } = useIntersectionObserver(element, (intersectionObserverEntries) => {\n\t\tlet isIntersecting = elementIsVisible.value;\n\t\tlet latestTime = 0;\n\t\tfor (const entry of intersectionObserverEntries) if (entry.time >= latestTime) {\n\t\t\tlatestTime = entry.time;\n\t\t\tisIntersecting = entry.isIntersecting;\n\t\t}\n\t\telementIsVisible.value = isIntersecting;\n\t\tif (once) watchOnce(elementIsVisible, () => {\n\t\t\tstop();\n\t\t});\n\t}, {\n\t\troot: scrollTarget,\n\t\twindow: window$1,\n\t\tthreshold,\n\t\trootMargin: toValue(rootMargin)\n\t});\n\treturn elementIsVisible;\n}\n\n//#endregion\n//#region useEventBus/internal.ts\nconst events = /* @__PURE__ */ new Map();\n\n//#endregion\n//#region useEventBus/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useEventBus(key) {\n\tconst scope = getCurrentScope();\n\tfunction on(listener) {\n\t\tvar _scope$cleanups;\n\t\tconst listeners = events.get(key) || /* @__PURE__ */ new Set();\n\t\tlisteners.add(listener);\n\t\tevents.set(key, listeners);\n\t\tconst _off = () => off(listener);\n\t\tscope === null || scope === void 0 || (_scope$cleanups = scope.cleanups) === null || _scope$cleanups === void 0 || _scope$cleanups.push(_off);\n\t\treturn _off;\n\t}\n\tfunction once(listener) {\n\t\tfunction _listener(...args) {\n\t\t\toff(_listener);\n\t\t\tlistener(...args);\n\t\t}\n\t\treturn on(_listener);\n\t}\n\tfunction off(listener) {\n\t\tconst listeners = events.get(key);\n\t\tif (!listeners) return;\n\t\tlisteners.delete(listener);\n\t\tif (!listeners.size) reset();\n\t}\n\tfunction reset() {\n\t\tevents.delete(key);\n\t}\n\tfunction emit(event, payload) {\n\t\tvar _events$get;\n\t\t(_events$get = events.get(key)) === null || _events$get === void 0 || _events$get.forEach((v) => v(event, payload));\n\t}\n\treturn {\n\t\ton,\n\t\tonce,\n\t\toff,\n\t\temit,\n\t\treset\n\t};\n}\n\n//#endregion\n//#region useEventSource/index.ts\nfunction resolveNestedOptions$1(options) {\n\tif (options === true) return {};\n\treturn options;\n}\n/**\n* Reactive wrapper for EventSource.\n*\n* @see https://vueuse.org/useEventSource\n* @see https://developer.mozilla.org/en-US/docs/Web/API/EventSource/EventSource EventSource\n* @param url\n* @param events\n* @param options\n*/\nfunction useEventSource(url, events$1 = [], options = {}) {\n\tconst event = shallowRef(null);\n\tconst data = shallowRef(null);\n\tconst status = shallowRef(\"CONNECTING\");\n\tconst eventSource = ref(null);\n\tconst error = shallowRef(null);\n\tconst urlRef = toRef(url);\n\tconst lastEventId = shallowRef(null);\n\tlet explicitlyClosed = false;\n\tlet retried = 0;\n\tconst { withCredentials = false, immediate = true, autoConnect = true, autoReconnect, serializer = { read: (v) => v } } = options;\n\tconst close = () => {\n\t\tif (isClient && eventSource.value) {\n\t\t\teventSource.value.close();\n\t\t\teventSource.value = null;\n\t\t\tstatus.value = \"CLOSED\";\n\t\t\texplicitlyClosed = true;\n\t\t}\n\t};\n\tconst _init = () => {\n\t\tif (explicitlyClosed || typeof urlRef.value === \"undefined\") return;\n\t\tconst es = new EventSource(urlRef.value, { withCredentials });\n\t\tstatus.value = \"CONNECTING\";\n\t\teventSource.value = es;\n\t\tes.onopen = () => {\n\t\t\tstatus.value = \"OPEN\";\n\t\t\terror.value = null;\n\t\t};\n\t\tes.onerror = (e) => {\n\t\t\tstatus.value = \"CLOSED\";\n\t\t\terror.value = e;\n\t\t\tif (es.readyState === 2 && !explicitlyClosed && autoReconnect) {\n\t\t\t\tes.close();\n\t\t\t\tconst { retries = -1, delay = 1e3, onFailed } = resolveNestedOptions$1(autoReconnect);\n\t\t\t\tretried += 1;\n\t\t\t\tif (typeof retries === \"number\" && (retries < 0 || retried < retries)) setTimeout(_init, delay);\n\t\t\t\telse if (typeof retries === \"function\" && retries()) setTimeout(_init, delay);\n\t\t\t\telse onFailed === null || onFailed === void 0 || onFailed();\n\t\t\t}\n\t\t};\n\t\tes.onmessage = (e) => {\n\t\t\tvar _serializer$read;\n\t\t\tevent.value = null;\n\t\t\tdata.value = (_serializer$read = serializer.read(e.data)) !== null && _serializer$read !== void 0 ? _serializer$read : null;\n\t\t\tlastEventId.value = e.lastEventId;\n\t\t};\n\t\tfor (const event_name of events$1) useEventListener(es, event_name, (e) => {\n\t\t\tvar _serializer$read2, _e$lastEventId;\n\t\t\tevent.value = event_name;\n\t\t\tdata.value = (_serializer$read2 = serializer.read(e.data)) !== null && _serializer$read2 !== void 0 ? _serializer$read2 : null;\n\t\t\tlastEventId.value = (_e$lastEventId = e.lastEventId) !== null && _e$lastEventId !== void 0 ? _e$lastEventId : null;\n\t\t}, { passive: true });\n\t};\n\tconst open = () => {\n\t\tif (!isClient) return;\n\t\tclose();\n\t\texplicitlyClosed = false;\n\t\tretried = 0;\n\t\t_init();\n\t};\n\tif (immediate) open();\n\tif (autoConnect) watch(urlRef, open);\n\ttryOnScopeDispose(close);\n\treturn {\n\t\teventSource,\n\t\tevent,\n\t\tdata,\n\t\tstatus,\n\t\terror,\n\t\topen,\n\t\tclose,\n\t\tlastEventId\n\t};\n}\n\n//#endregion\n//#region useEyeDropper/index.ts\n/**\n* Reactive [EyeDropper API](https://developer.mozilla.org/en-US/docs/Web/API/EyeDropper_API)\n*\n* @see https://vueuse.org/useEyeDropper\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useEyeDropper(options = {}) {\n\tconst { initialValue = \"\" } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n\tconst sRGBHex = shallowRef(initialValue);\n\tasync function open(openOptions) {\n\t\tif (!isSupported.value) return;\n\t\tconst result = await new window.EyeDropper().open(openOptions);\n\t\tsRGBHex.value = result.sRGBHex;\n\t\treturn result;\n\t}\n\treturn {\n\t\tisSupported,\n\t\tsRGBHex,\n\t\topen\n\t};\n}\n\n//#endregion\n//#region useFavicon/index.ts\nfunction useFavicon(newIcon = null, options = {}) {\n\tconst { baseUrl = \"\", rel = \"icon\", document: document$1 = defaultDocument } = options;\n\tconst favicon = toRef(newIcon);\n\tconst applyIcon = (icon) => {\n\t\tconst elements = document$1 === null || document$1 === void 0 ? void 0 : document$1.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n\t\tif (!elements || elements.length === 0) {\n\t\t\tconst link = document$1 === null || document$1 === void 0 ? void 0 : document$1.createElement(\"link\");\n\t\t\tif (link) {\n\t\t\t\tlink.rel = rel;\n\t\t\t\tlink.href = `${baseUrl}${icon}`;\n\t\t\t\tlink.type = `image/${icon.split(\".\").pop()}`;\n\t\t\t\tdocument$1 === null || document$1 === void 0 || document$1.head.append(link);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\telements === null || elements === void 0 || elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n\t};\n\twatch(favicon, (i, o) => {\n\t\tif (typeof i === \"string\" && i !== o) applyIcon(i);\n\t}, { immediate: true });\n\treturn favicon;\n}\n\n//#endregion\n//#region useFetch/index.ts\nconst payloadMapping = {\n\tjson: \"application/json\",\n\ttext: \"text/plain\"\n};\n/**\n* !!!IMPORTANT!!!\n*\n* If you update the UseFetchOptions interface, be sure to update this object\n* to include the new options\n*/\nfunction isFetchOptions(obj) {\n\treturn obj && containsProp(obj, \"immediate\", \"refetch\", \"initialData\", \"timeout\", \"beforeFetch\", \"afterFetch\", \"onFetchError\", \"fetch\", \"updateDataOnError\");\n}\nconst reAbsolute = /^(?:[a-z][a-z\\d+\\-.]*:)?\\/\\//i;\nfunction isAbsoluteURL(url) {\n\treturn reAbsolute.test(url);\n}\nfunction headersToObject(headers) {\n\tif (typeof Headers !== \"undefined\" && headers instanceof Headers) return Object.fromEntries(headers.entries());\n\treturn headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n\tif (combination === \"overwrite\") return async (ctx) => {\n\t\tlet callback;\n\t\tfor (let i = callbacks.length - 1; i >= 0; i--) if (callbacks[i] != null) {\n\t\t\tcallback = callbacks[i];\n\t\t\tbreak;\n\t\t}\n\t\tif (callback) return {\n\t\t\t...ctx,\n\t\t\t...await callback(ctx)\n\t\t};\n\t\treturn ctx;\n\t};\n\telse return async (ctx) => {\n\t\tfor (const callback of callbacks) if (callback) ctx = {\n\t\t\t...ctx,\n\t\t\t...await callback(ctx)\n\t\t};\n\t\treturn ctx;\n\t};\n}\nfunction createFetch(config = {}) {\n\tconst _combination = config.combination || \"chain\";\n\tconst _options = config.options || {};\n\tconst _fetchOptions = config.fetchOptions || {};\n\tfunction useFactoryFetch(url, ...args) {\n\t\tconst computedUrl = computed(() => {\n\t\t\tconst baseUrl = toValue(config.baseUrl);\n\t\t\tconst targetUrl = toValue(url);\n\t\t\treturn baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n\t\t});\n\t\tlet options = _options;\n\t\tlet fetchOptions = _fetchOptions;\n\t\tif (args.length > 0) if (isFetchOptions(args[0])) options = {\n\t\t\t...options,\n\t\t\t...args[0],\n\t\t\tbeforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n\t\t\tafterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n\t\t\tonFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n\t\t};\n\t\telse fetchOptions = {\n\t\t\t...fetchOptions,\n\t\t\t...args[0],\n\t\t\theaders: {\n\t\t\t\t...headersToObject(fetchOptions.headers) || {},\n\t\t\t\t...headersToObject(args[0].headers) || {}\n\t\t\t}\n\t\t};\n\t\tif (args.length > 1 && isFetchOptions(args[1])) options = {\n\t\t\t...options,\n\t\t\t...args[1],\n\t\t\tbeforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n\t\t\tafterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n\t\t\tonFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n\t\t};\n\t\treturn useFetch(computedUrl, fetchOptions, options);\n\t}\n\treturn useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n\tvar _defaultWindow$fetch, _globalThis;\n\tconst supportsAbort = typeof AbortController === \"function\";\n\tlet fetchOptions = {};\n\tlet options = {\n\t\timmediate: true,\n\t\trefetch: false,\n\t\ttimeout: 0,\n\t\tupdateDataOnError: false\n\t};\n\tconst config = {\n\t\tmethod: \"GET\",\n\t\ttype: \"text\",\n\t\tpayload: void 0\n\t};\n\tif (args.length > 0) if (isFetchOptions(args[0])) options = {\n\t\t...options,\n\t\t...args[0]\n\t};\n\telse fetchOptions = args[0];\n\tif (args.length > 1) {\n\t\tif (isFetchOptions(args[1])) options = {\n\t\t\t...options,\n\t\t\t...args[1]\n\t\t};\n\t}\n\tconst { fetch = (_defaultWindow$fetch = defaultWindow === null || defaultWindow === void 0 ? void 0 : defaultWindow.fetch) !== null && _defaultWindow$fetch !== void 0 ? _defaultWindow$fetch : (_globalThis = globalThis) === null || _globalThis === void 0 ? void 0 : _globalThis.fetch, initialData, timeout } = options;\n\tconst responseEvent = createEventHook();\n\tconst errorEvent = createEventHook();\n\tconst finallyEvent = createEventHook();\n\tconst isFinished = shallowRef(false);\n\tconst isFetching = shallowRef(false);\n\tconst aborted = shallowRef(false);\n\tconst statusCode = shallowRef(null);\n\tconst response = shallowRef(null);\n\tconst error = shallowRef(null);\n\tconst data = shallowRef(initialData || null);\n\tconst canAbort = computed(() => supportsAbort && isFetching.value);\n\tlet controller;\n\tlet timer;\n\tconst abort = (reason) => {\n\t\tif (supportsAbort) {\n\t\t\tcontroller === null || controller === void 0 || controller.abort(reason);\n\t\t\tcontroller = new AbortController();\n\t\t\tcontroller.signal.onabort = () => aborted.value = true;\n\t\t\tfetchOptions = {\n\t\t\t\t...fetchOptions,\n\t\t\t\tsignal: controller.signal\n\t\t\t};\n\t\t}\n\t};\n\tconst loading = (isLoading) => {\n\t\tisFetching.value = isLoading;\n\t\tisFinished.value = !isLoading;\n\t};\n\tif (timeout) timer = useTimeoutFn(abort, timeout, { immediate: false });\n\tlet executeCounter = 0;\n\tconst execute = async (throwOnFailed = false) => {\n\t\tvar _context$options;\n\t\tabort();\n\t\tloading(true);\n\t\terror.value = null;\n\t\tstatusCode.value = null;\n\t\taborted.value = false;\n\t\texecuteCounter += 1;\n\t\tconst currentExecuteCounter = executeCounter;\n\t\tconst defaultFetchOptions = {\n\t\t\tmethod: config.method,\n\t\t\theaders: {}\n\t\t};\n\t\tconst payload = toValue(config.payload);\n\t\tif (payload) {\n\t\t\tvar _payloadMapping$confi;\n\t\t\tconst headers = headersToObject(defaultFetchOptions.headers);\n\t\t\tconst proto = Object.getPrototypeOf(payload);\n\t\t\tif (!config.payloadType && payload && (proto === Object.prototype || Array.isArray(proto)) && !(payload instanceof FormData)) config.payloadType = \"json\";\n\t\t\tif (config.payloadType) headers[\"Content-Type\"] = (_payloadMapping$confi = payloadMapping[config.payloadType]) !== null && _payloadMapping$confi !== void 0 ? _payloadMapping$confi : config.payloadType;\n\t\t\tdefaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n\t\t}\n\t\tlet isCanceled = false;\n\t\tconst context = {\n\t\t\turl: toValue(url),\n\t\t\toptions: {\n\t\t\t\t...defaultFetchOptions,\n\t\t\t\t...fetchOptions\n\t\t\t},\n\t\t\tcancel: () => {\n\t\t\t\tisCanceled = true;\n\t\t\t}\n\t\t};\n\t\tif (options.beforeFetch) Object.assign(context, await options.beforeFetch(context));\n\t\tif (isCanceled || !fetch) {\n\t\t\tloading(false);\n\t\t\treturn Promise.resolve(null);\n\t\t}\n\t\tlet responseData = null;\n\t\tif (timer) timer.start();\n\t\treturn fetch(context.url, {\n\t\t\t...defaultFetchOptions,\n\t\t\t...context.options,\n\t\t\theaders: {\n\t\t\t\t...headersToObject(defaultFetchOptions.headers),\n\t\t\t\t...headersToObject((_context$options = context.options) === null || _context$options === void 0 ? void 0 : _context$options.headers)\n\t\t\t}\n\t\t}).then(async (fetchResponse) => {\n\t\t\tresponse.value = fetchResponse;\n\t\t\tstatusCode.value = fetchResponse.status;\n\t\t\tresponseData = await fetchResponse.clone()[config.type]();\n\t\t\tif (!fetchResponse.ok) {\n\t\t\t\tdata.value = initialData || null;\n\t\t\t\tthrow new Error(fetchResponse.statusText);\n\t\t\t}\n\t\t\tif (options.afterFetch) ({data: responseData} = await options.afterFetch({\n\t\t\t\tdata: responseData,\n\t\t\t\tresponse: fetchResponse,\n\t\t\t\tcontext,\n\t\t\t\texecute\n\t\t\t}));\n\t\t\tdata.value = responseData;\n\t\t\tresponseEvent.trigger(fetchResponse);\n\t\t\treturn fetchResponse;\n\t\t}).catch(async (fetchError) => {\n\t\t\tlet errorData = fetchError.message || fetchError.name;\n\t\t\tif (options.onFetchError) ({error: errorData, data: responseData} = await options.onFetchError({\n\t\t\t\tdata: responseData,\n\t\t\t\terror: fetchError,\n\t\t\t\tresponse: response.value,\n\t\t\t\tcontext,\n\t\t\t\texecute\n\t\t\t}));\n\t\t\terror.value = errorData;\n\t\t\tif (options.updateDataOnError) data.value = responseData;\n\t\t\terrorEvent.trigger(fetchError);\n\t\t\tif (throwOnFailed) throw fetchError;\n\t\t\treturn null;\n\t\t}).finally(() => {\n\t\t\tif (currentExecuteCounter === executeCounter) loading(false);\n\t\t\tif (timer) timer.stop();\n\t\t\tfinallyEvent.trigger(null);\n\t\t});\n\t};\n\tconst refetch = toRef(options.refetch);\n\twatch([refetch, toRef(url)], ([refetch$1]) => refetch$1 && execute(), { deep: true });\n\tconst shell = {\n\t\tisFinished: readonly(isFinished),\n\t\tisFetching: readonly(isFetching),\n\t\tstatusCode,\n\t\tresponse,\n\t\terror,\n\t\tdata,\n\t\tcanAbort,\n\t\taborted,\n\t\tabort,\n\t\texecute,\n\t\tonFetchResponse: responseEvent.on,\n\t\tonFetchError: errorEvent.on,\n\t\tonFetchFinally: finallyEvent.on,\n\t\tget: setMethod(\"GET\"),\n\t\tput: setMethod(\"PUT\"),\n\t\tpost: setMethod(\"POST\"),\n\t\tdelete: setMethod(\"DELETE\"),\n\t\tpatch: setMethod(\"PATCH\"),\n\t\thead: setMethod(\"HEAD\"),\n\t\toptions: setMethod(\"OPTIONS\"),\n\t\tjson: setType(\"json\"),\n\t\ttext: setType(\"text\"),\n\t\tblob: setType(\"blob\"),\n\t\tarrayBuffer: setType(\"arrayBuffer\"),\n\t\tformData: setType(\"formData\")\n\t};\n\tfunction setMethod(method) {\n\t\treturn (payload, payloadType) => {\n\t\t\tif (!isFetching.value) {\n\t\t\t\tconfig.method = method;\n\t\t\t\tconfig.payload = payload;\n\t\t\t\tconfig.payloadType = payloadType;\n\t\t\t\tif (isRef(config.payload)) watch([refetch, toRef(config.payload)], ([refetch$1]) => refetch$1 && execute(), { deep: true });\n\t\t\t\treturn {\n\t\t\t\t\t...shell,\n\t\t\t\t\tthen(onFulfilled, onRejected) {\n\t\t\t\t\t\treturn waitUntilFinished().then(onFulfilled, onRejected);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n\tfunction waitUntilFinished() {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tuntil(isFinished).toBe(true).then(() => resolve(shell)).catch(reject);\n\t\t});\n\t}\n\tfunction setType(type) {\n\t\treturn () => {\n\t\t\tif (!isFetching.value) {\n\t\t\t\tconfig.type = type;\n\t\t\t\treturn {\n\t\t\t\t\t...shell,\n\t\t\t\t\tthen(onFulfilled, onRejected) {\n\t\t\t\t\t\treturn waitUntilFinished().then(onFulfilled, onRejected);\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n\tif (options.immediate) Promise.resolve().then(() => execute());\n\treturn {\n\t\t...shell,\n\t\tthen(onFulfilled, onRejected) {\n\t\t\treturn waitUntilFinished().then(onFulfilled, onRejected);\n\t\t}\n\t};\n}\nfunction joinPaths(start, end) {\n\tif (!start.endsWith(\"/\") && !end.startsWith(\"/\")) return `${start}/${end}`;\n\tif (start.endsWith(\"/\") && end.startsWith(\"/\")) return `${start.slice(0, -1)}${end}`;\n\treturn `${start}${end}`;\n}\n\n//#endregion\n//#region useFileDialog/index.ts\nconst DEFAULT_OPTIONS = {\n\tmultiple: true,\n\taccept: \"*\",\n\treset: false,\n\tdirectory: false\n};\nfunction prepareInitialFiles(files) {\n\tif (!files) return null;\n\tif (files instanceof FileList) return files;\n\tconst dt = new DataTransfer();\n\tfor (const file of files) dt.items.add(file);\n\treturn dt.files;\n}\n/**\n* Open file dialog with ease.\n*\n* @see https://vueuse.org/useFileDialog\n* @param options\n*/\nfunction useFileDialog(options = {}) {\n\tconst { document: document$1 = defaultDocument } = options;\n\tconst files = ref(prepareInitialFiles(options.initialFiles));\n\tconst { on: onChange, trigger: changeTrigger } = createEventHook();\n\tconst { on: onCancel, trigger: cancelTrigger } = createEventHook();\n\tconst inputRef = computed(() => {\n\t\tvar _unrefElement;\n\t\tconst input = (_unrefElement = unrefElement(options.input)) !== null && _unrefElement !== void 0 ? _unrefElement : document$1 ? document$1.createElement(\"input\") : void 0;\n\t\tif (input) {\n\t\t\tinput.type = \"file\";\n\t\t\tinput.onchange = (event) => {\n\t\t\t\tfiles.value = event.target.files;\n\t\t\t\tchangeTrigger(files.value);\n\t\t\t};\n\t\t\tinput.oncancel = () => {\n\t\t\t\tcancelTrigger();\n\t\t\t};\n\t\t}\n\t\treturn input;\n\t});\n\tconst reset = () => {\n\t\tfiles.value = null;\n\t\tif (inputRef.value && inputRef.value.value) {\n\t\t\tinputRef.value.value = \"\";\n\t\t\tchangeTrigger(null);\n\t\t}\n\t};\n\tconst applyOptions = (options$1) => {\n\t\tconst el = inputRef.value;\n\t\tif (!el) return;\n\t\tel.multiple = toValue(options$1.multiple);\n\t\tel.accept = toValue(options$1.accept);\n\t\tel.webkitdirectory = toValue(options$1.directory);\n\t\tif (hasOwn(options$1, \"capture\")) el.capture = toValue(options$1.capture);\n\t};\n\tconst open = (localOptions) => {\n\t\tconst el = inputRef.value;\n\t\tif (!el) return;\n\t\tconst mergedOptions = {\n\t\t\t...DEFAULT_OPTIONS,\n\t\t\t...options,\n\t\t\t...localOptions\n\t\t};\n\t\tapplyOptions(mergedOptions);\n\t\tif (toValue(mergedOptions.reset)) reset();\n\t\tel.click();\n\t};\n\twatchEffect(() => {\n\t\tapplyOptions(options);\n\t});\n\treturn {\n\t\tfiles: readonly(files),\n\t\topen,\n\t\treset,\n\t\tonCancel,\n\t\tonChange\n\t};\n}\n\n//#endregion\n//#region useFileSystemAccess/index.ts\nfunction useFileSystemAccess(options = {}) {\n\tconst { window: _window = defaultWindow, dataType = \"Text\" } = options;\n\tconst window$1 = _window;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"showSaveFilePicker\" in window$1 && \"showOpenFilePicker\" in window$1);\n\tconst fileHandle = shallowRef();\n\tconst data = shallowRef();\n\tconst file = shallowRef();\n\tconst fileName = computed(() => {\n\t\tvar _file$value$name, _file$value;\n\t\treturn (_file$value$name = (_file$value = file.value) === null || _file$value === void 0 ? void 0 : _file$value.name) !== null && _file$value$name !== void 0 ? _file$value$name : \"\";\n\t});\n\tconst fileMIME = computed(() => {\n\t\tvar _file$value$type, _file$value2;\n\t\treturn (_file$value$type = (_file$value2 = file.value) === null || _file$value2 === void 0 ? void 0 : _file$value2.type) !== null && _file$value$type !== void 0 ? _file$value$type : \"\";\n\t});\n\tconst fileSize = computed(() => {\n\t\tvar _file$value$size, _file$value3;\n\t\treturn (_file$value$size = (_file$value3 = file.value) === null || _file$value3 === void 0 ? void 0 : _file$value3.size) !== null && _file$value$size !== void 0 ? _file$value$size : 0;\n\t});\n\tconst fileLastModified = computed(() => {\n\t\tvar _file$value$lastModif, _file$value4;\n\t\treturn (_file$value$lastModif = (_file$value4 = file.value) === null || _file$value4 === void 0 ? void 0 : _file$value4.lastModified) !== null && _file$value$lastModif !== void 0 ? _file$value$lastModif : 0;\n\t});\n\tasync function open(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tconst [handle] = await window$1.showOpenFilePicker({\n\t\t\t...toValue(options),\n\t\t\t..._options\n\t\t});\n\t\tfileHandle.value = handle;\n\t\tawait updateData();\n\t}\n\tasync function create(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tfileHandle.value = await window$1.showSaveFilePicker({\n\t\t\t...options,\n\t\t\t..._options\n\t\t});\n\t\tdata.value = void 0;\n\t\tawait updateData();\n\t}\n\tasync function save(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tif (!fileHandle.value) return saveAs(_options);\n\t\tif (data.value) {\n\t\t\tconst writableStream = await fileHandle.value.createWritable();\n\t\t\tawait writableStream.write(data.value);\n\t\t\tawait writableStream.close();\n\t\t}\n\t\tawait updateFile();\n\t}\n\tasync function saveAs(_options = {}) {\n\t\tif (!isSupported.value) return;\n\t\tfileHandle.value = await window$1.showSaveFilePicker({\n\t\t\t...options,\n\t\t\t..._options\n\t\t});\n\t\tif (data.value) {\n\t\t\tconst writableStream = await fileHandle.value.createWritable();\n\t\t\tawait writableStream.write(data.value);\n\t\t\tawait writableStream.close();\n\t\t}\n\t\tawait updateFile();\n\t}\n\tasync function updateFile() {\n\t\tvar _fileHandle$value;\n\t\tfile.value = await ((_fileHandle$value = fileHandle.value) === null || _fileHandle$value === void 0 ? void 0 : _fileHandle$value.getFile());\n\t}\n\tasync function updateData() {\n\t\tvar _file$value5, _file$value6;\n\t\tawait updateFile();\n\t\tconst type = toValue(dataType);\n\t\tif (type === \"Text\") data.value = await ((_file$value5 = file.value) === null || _file$value5 === void 0 ? void 0 : _file$value5.text());\n\t\telse if (type === \"ArrayBuffer\") data.value = await ((_file$value6 = file.value) === null || _file$value6 === void 0 ? void 0 : _file$value6.arrayBuffer());\n\t\telse if (type === \"Blob\") data.value = file.value;\n\t}\n\twatch(() => toValue(dataType), updateData);\n\treturn {\n\t\tisSupported,\n\t\tdata,\n\t\tfile,\n\t\tfileName,\n\t\tfileMIME,\n\t\tfileSize,\n\t\tfileLastModified,\n\t\topen,\n\t\tcreate,\n\t\tsave,\n\t\tsaveAs,\n\t\tupdateData\n\t};\n}\n\n//#endregion\n//#region useFocus/index.ts\n/**\n* Track or set the focus state of a DOM element.\n*\n* @see https://vueuse.org/useFocus\n* @param target The target element for the focus and blur events.\n* @param options\n*/\nfunction useFocus(target, options = {}) {\n\tconst { initialValue = false, focusVisible = false, preventScroll = false } = options;\n\tconst innerFocused = shallowRef(false);\n\tconst targetElement = computed(() => unrefElement(target));\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(targetElement, \"focus\", (event) => {\n\t\tvar _matches, _ref;\n\t\tif (!focusVisible || ((_matches = (_ref = event.target).matches) === null || _matches === void 0 ? void 0 : _matches.call(_ref, \":focus-visible\"))) innerFocused.value = true;\n\t}, listenerOptions);\n\tuseEventListener(targetElement, \"blur\", () => innerFocused.value = false, listenerOptions);\n\tconst focused = computed({\n\t\tget: () => innerFocused.value,\n\t\tset(value) {\n\t\t\tvar _targetElement$value, _targetElement$value2;\n\t\t\tif (!value && innerFocused.value) (_targetElement$value = targetElement.value) === null || _targetElement$value === void 0 || _targetElement$value.blur();\n\t\t\telse if (value && !innerFocused.value) (_targetElement$value2 = targetElement.value) === null || _targetElement$value2 === void 0 || _targetElement$value2.focus({ preventScroll });\n\t\t}\n\t});\n\twatch(targetElement, () => {\n\t\tfocused.value = initialValue;\n\t}, {\n\t\timmediate: true,\n\t\tflush: \"post\"\n\t});\n\treturn { focused };\n}\n\n//#endregion\n//#region useFocusWithin/index.ts\nconst EVENT_FOCUS_IN = \"focusin\";\nconst EVENT_FOCUS_OUT = \"focusout\";\nconst PSEUDO_CLASS_FOCUS_WITHIN = \":focus-within\";\n/**\n* Track if focus is contained within the target element\n*\n* @see https://vueuse.org/useFocusWithin\n* @param target The target element to track\n* @param options Focus within options\n*/\nfunction useFocusWithin(target, options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst targetElement = computed(() => unrefElement(target));\n\tconst _focused = shallowRef(false);\n\tconst focused = computed(() => _focused.value);\n\tconst activeElement = useActiveElement(options);\n\tif (!window$1 || !activeElement.value) return { focused };\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(targetElement, EVENT_FOCUS_IN, () => _focused.value = true, listenerOptions);\n\tuseEventListener(targetElement, EVENT_FOCUS_OUT, () => {\n\t\tvar _targetElement$value$, _targetElement$value, _targetElement$value$2;\n\t\treturn _focused.value = (_targetElement$value$ = (_targetElement$value = targetElement.value) === null || _targetElement$value === void 0 || (_targetElement$value$2 = _targetElement$value.matches) === null || _targetElement$value$2 === void 0 ? void 0 : _targetElement$value$2.call(_targetElement$value, PSEUDO_CLASS_FOCUS_WITHIN)) !== null && _targetElement$value$ !== void 0 ? _targetElement$value$ : false;\n\t}, listenerOptions);\n\treturn { focused };\n}\n\n//#endregion\n//#region useFps/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useFps(options) {\n\tvar _options$every;\n\tconst fps = shallowRef(0);\n\tif (typeof performance === \"undefined\") return fps;\n\tconst every = (_options$every = options === null || options === void 0 ? void 0 : options.every) !== null && _options$every !== void 0 ? _options$every : 10;\n\tlet last = performance.now();\n\tlet ticks = 0;\n\tuseRafFn(() => {\n\t\tticks += 1;\n\t\tif (ticks >= every) {\n\t\t\tconst now = performance.now();\n\t\t\tconst diff = now - last;\n\t\t\tfps.value = Math.round(1e3 / (diff / ticks));\n\t\t\tlast = now;\n\t\t\tticks = 0;\n\t\t}\n\t});\n\treturn fps;\n}\n\n//#endregion\n//#region useFullscreen/index.ts\nconst eventHandlers = [\n\t\"fullscreenchange\",\n\t\"webkitfullscreenchange\",\n\t\"webkitendfullscreen\",\n\t\"mozfullscreenchange\",\n\t\"MSFullscreenChange\"\n];\n/**\n* Reactive Fullscreen API.\n*\n* @see https://vueuse.org/useFullscreen\n* @param target\n* @param options\n*/\nfunction useFullscreen(target, options = {}) {\n\tconst { document: document$1 = defaultDocument, autoExit = false } = options;\n\tconst targetRef = computed(() => {\n\t\tvar _unrefElement;\n\t\treturn (_unrefElement = unrefElement(target)) !== null && _unrefElement !== void 0 ? _unrefElement : document$1 === null || document$1 === void 0 ? void 0 : document$1.documentElement;\n\t});\n\tconst isFullscreen = shallowRef(false);\n\tconst requestMethod = computed(() => {\n\t\treturn [\n\t\t\t\"requestFullscreen\",\n\t\t\t\"webkitRequestFullscreen\",\n\t\t\t\"webkitEnterFullscreen\",\n\t\t\t\"webkitEnterFullScreen\",\n\t\t\t\"webkitRequestFullScreen\",\n\t\t\t\"mozRequestFullScreen\",\n\t\t\t\"msRequestFullscreen\"\n\t\t].find((m) => document$1 && m in document$1 || targetRef.value && m in targetRef.value);\n\t});\n\tconst exitMethod = computed(() => {\n\t\treturn [\n\t\t\t\"exitFullscreen\",\n\t\t\t\"webkitExitFullscreen\",\n\t\t\t\"webkitExitFullScreen\",\n\t\t\t\"webkitCancelFullScreen\",\n\t\t\t\"mozCancelFullScreen\",\n\t\t\t\"msExitFullscreen\"\n\t\t].find((m) => document$1 && m in document$1 || targetRef.value && m in targetRef.value);\n\t});\n\tconst fullscreenEnabled = computed(() => {\n\t\treturn [\n\t\t\t\"fullScreen\",\n\t\t\t\"webkitIsFullScreen\",\n\t\t\t\"webkitDisplayingFullscreen\",\n\t\t\t\"mozFullScreen\",\n\t\t\t\"msFullscreenElement\"\n\t\t].find((m) => document$1 && m in document$1 || targetRef.value && m in targetRef.value);\n\t});\n\tconst fullscreenElementMethod = [\n\t\t\"fullscreenElement\",\n\t\t\"webkitFullscreenElement\",\n\t\t\"mozFullScreenElement\",\n\t\t\"msFullscreenElement\"\n\t].find((m) => document$1 && m in document$1);\n\tconst isSupported = /* @__PURE__ */ useSupported(() => targetRef.value && document$1 && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n\tconst isCurrentElementFullScreen = () => {\n\t\tif (fullscreenElementMethod) return (document$1 === null || document$1 === void 0 ? void 0 : document$1[fullscreenElementMethod]) === targetRef.value;\n\t\treturn false;\n\t};\n\tconst isElementFullScreen = () => {\n\t\tif (fullscreenEnabled.value) if (document$1 && document$1[fullscreenEnabled.value] != null) return document$1[fullscreenEnabled.value];\n\t\telse {\n\t\t\tconst target$1 = targetRef.value;\n\t\t\tif ((target$1 === null || target$1 === void 0 ? void 0 : target$1[fullscreenEnabled.value]) != null) return Boolean(target$1[fullscreenEnabled.value]);\n\t\t}\n\t\treturn false;\n\t};\n\tasync function exit() {\n\t\tif (!isSupported.value || !isFullscreen.value) return;\n\t\tif (exitMethod.value) if ((document$1 === null || document$1 === void 0 ? void 0 : document$1[exitMethod.value]) != null) await document$1[exitMethod.value]();\n\t\telse {\n\t\t\tconst target$1 = targetRef.value;\n\t\t\tif ((target$1 === null || target$1 === void 0 ? void 0 : target$1[exitMethod.value]) != null) await target$1[exitMethod.value]();\n\t\t}\n\t\tisFullscreen.value = false;\n\t}\n\tasync function enter() {\n\t\tif (!isSupported.value || isFullscreen.value) return;\n\t\tif (isElementFullScreen()) await exit();\n\t\tconst target$1 = targetRef.value;\n\t\tif (requestMethod.value && (target$1 === null || target$1 === void 0 ? void 0 : target$1[requestMethod.value]) != null) {\n\t\t\tawait target$1[requestMethod.value]();\n\t\t\tisFullscreen.value = true;\n\t\t}\n\t}\n\tasync function toggle() {\n\t\tawait (isFullscreen.value ? exit() : enter());\n\t}\n\tconst handlerCallback = () => {\n\t\tconst isElementFullScreenValue = isElementFullScreen();\n\t\tif (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen()) isFullscreen.value = isElementFullScreenValue;\n\t};\n\tconst listenerOptions = {\n\t\tcapture: false,\n\t\tpassive: true\n\t};\n\tuseEventListener(document$1, eventHandlers, handlerCallback, listenerOptions);\n\tuseEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, listenerOptions);\n\ttryOnMounted(handlerCallback, false);\n\tif (autoExit) tryOnScopeDispose(exit);\n\treturn {\n\t\tisSupported,\n\t\tisFullscreen,\n\t\tenter,\n\t\texit,\n\t\ttoggle\n\t};\n}\n\n//#endregion\n//#region useGamepad/index.ts\n/**\n* Maps a standard standard gamepad to an Xbox 360 Controller.\n*/\nfunction mapGamepadToXbox360Controller(gamepad) {\n\treturn computed(() => {\n\t\tif (gamepad.value) return {\n\t\t\tbuttons: {\n\t\t\t\ta: gamepad.value.buttons[0],\n\t\t\t\tb: gamepad.value.buttons[1],\n\t\t\t\tx: gamepad.value.buttons[2],\n\t\t\t\ty: gamepad.value.buttons[3]\n\t\t\t},\n\t\t\tbumper: {\n\t\t\t\tleft: gamepad.value.buttons[4],\n\t\t\t\tright: gamepad.value.buttons[5]\n\t\t\t},\n\t\t\ttriggers: {\n\t\t\t\tleft: gamepad.value.buttons[6],\n\t\t\t\tright: gamepad.value.buttons[7]\n\t\t\t},\n\t\t\tstick: {\n\t\t\t\tleft: {\n\t\t\t\t\thorizontal: gamepad.value.axes[0],\n\t\t\t\t\tvertical: gamepad.value.axes[1],\n\t\t\t\t\tbutton: gamepad.value.buttons[10]\n\t\t\t\t},\n\t\t\t\tright: {\n\t\t\t\t\thorizontal: gamepad.value.axes[2],\n\t\t\t\t\tvertical: gamepad.value.axes[3],\n\t\t\t\t\tbutton: gamepad.value.buttons[11]\n\t\t\t\t}\n\t\t\t},\n\t\t\tdpad: {\n\t\t\t\tup: gamepad.value.buttons[12],\n\t\t\t\tdown: gamepad.value.buttons[13],\n\t\t\t\tleft: gamepad.value.buttons[14],\n\t\t\t\tright: gamepad.value.buttons[15]\n\t\t\t},\n\t\t\tback: gamepad.value.buttons[8],\n\t\t\tstart: gamepad.value.buttons[9]\n\t\t};\n\t\treturn null;\n\t});\n}\n/* @__NO_SIDE_EFFECTS__ */\nfunction useGamepad(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"getGamepads\" in navigator$1);\n\tconst gamepads = ref([]);\n\tconst onConnectedHook = createEventHook();\n\tconst onDisconnectedHook = createEventHook();\n\tconst stateFromGamepad = (gamepad) => {\n\t\tconst hapticActuators = [];\n\t\tconst vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n\t\tif (vibrationActuator) hapticActuators.push(vibrationActuator);\n\t\tif (gamepad.hapticActuators) hapticActuators.push(...gamepad.hapticActuators);\n\t\treturn {\n\t\t\tid: gamepad.id,\n\t\t\tindex: gamepad.index,\n\t\t\tconnected: gamepad.connected,\n\t\t\tmapping: gamepad.mapping,\n\t\t\ttimestamp: gamepad.timestamp,\n\t\t\tvibrationActuator: gamepad.vibrationActuator,\n\t\t\thapticActuators,\n\t\t\taxes: gamepad.axes.map((axes) => axes),\n\t\t\tbuttons: gamepad.buttons.map((button) => ({\n\t\t\t\tpressed: button.pressed,\n\t\t\t\ttouched: button.touched,\n\t\t\t\tvalue: button.value\n\t\t\t}))\n\t\t};\n\t};\n\tconst updateGamepadState = () => {\n\t\tconst _gamepads = (navigator$1 === null || navigator$1 === void 0 ? void 0 : navigator$1.getGamepads()) || [];\n\t\tfor (const gamepad of _gamepads) if (gamepad && gamepads.value[gamepad.index]) gamepads.value[gamepad.index] = stateFromGamepad(gamepad);\n\t};\n\tconst { isActive, pause, resume } = useRafFn(updateGamepadState);\n\tconst onGamepadConnected = (gamepad) => {\n\t\tif (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n\t\t\tgamepads.value.push(stateFromGamepad(gamepad));\n\t\t\tonConnectedHook.trigger(gamepad.index);\n\t\t}\n\t\tresume();\n\t};\n\tconst onGamepadDisconnected = (gamepad) => {\n\t\tgamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n\t\tonDisconnectedHook.trigger(gamepad.index);\n\t};\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad), listenerOptions);\n\tuseEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad), listenerOptions);\n\ttryOnMounted(() => {\n\t\tconst _gamepads = (navigator$1 === null || navigator$1 === void 0 ? void 0 : navigator$1.getGamepads()) || [];\n\t\tfor (const gamepad of _gamepads) if (gamepad && gamepads.value[gamepad.index]) onGamepadConnected(gamepad);\n\t});\n\tpause();\n\treturn {\n\t\tisSupported,\n\t\tonConnected: onConnectedHook.on,\n\t\tonDisconnected: onDisconnectedHook.on,\n\t\tgamepads,\n\t\tpause,\n\t\tresume,\n\t\tisActive\n\t};\n}\n\n//#endregion\n//#region useGeolocation/index.ts\n/**\n* Reactive Geolocation API.\n*\n* @see https://vueuse.org/useGeolocation\n* @param options\n*/\nfunction useGeolocation(options = {}) {\n\tconst { enableHighAccuracy = true, maximumAge = 3e4, timeout = 27e3, navigator: navigator$1 = defaultNavigator, immediate = true } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"geolocation\" in navigator$1);\n\tconst locatedAt = shallowRef(null);\n\tconst error = shallowRef(null);\n\tconst coords = ref({\n\t\taccuracy: 0,\n\t\tlatitude: Number.POSITIVE_INFINITY,\n\t\tlongitude: Number.POSITIVE_INFINITY,\n\t\taltitude: null,\n\t\taltitudeAccuracy: null,\n\t\theading: null,\n\t\tspeed: null\n\t});\n\tfunction updatePosition(position) {\n\t\tlocatedAt.value = position.timestamp;\n\t\tcoords.value = position.coords;\n\t\terror.value = null;\n\t}\n\tlet watcher;\n\tfunction resume() {\n\t\tif (isSupported.value) watcher = navigator$1.geolocation.watchPosition(updatePosition, (err) => error.value = err, {\n\t\t\tenableHighAccuracy,\n\t\t\tmaximumAge,\n\t\t\ttimeout\n\t\t});\n\t}\n\tif (immediate) resume();\n\tfunction pause() {\n\t\tif (watcher && navigator$1) navigator$1.geolocation.clearWatch(watcher);\n\t}\n\ttryOnScopeDispose(() => {\n\t\tpause();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tcoords,\n\t\tlocatedAt,\n\t\terror,\n\t\tresume,\n\t\tpause\n\t};\n}\n\n//#endregion\n//#region useIdle/index.ts\nconst defaultEvents$1 = [\n\t\"mousemove\",\n\t\"mousedown\",\n\t\"resize\",\n\t\"keydown\",\n\t\"touchstart\",\n\t\"wheel\"\n];\nconst oneMinute = 6e4;\n/**\n* Tracks whether the user is being inactive.\n*\n* @see https://vueuse.org/useIdle\n* @param timeout default to 1 minute\n* @param options IdleOptions\n*/\nfunction useIdle(timeout = oneMinute, options = {}) {\n\tconst { initialState = false, listenForVisibilityChange = true, events: events$1 = defaultEvents$1, window: window$1 = defaultWindow, eventFilter = throttleFilter(50) } = options;\n\tconst idle = shallowRef(initialState);\n\tconst lastActive = shallowRef(timestamp());\n\tconst isPending = shallowRef(false);\n\tlet timer;\n\tconst reset = () => {\n\t\tidle.value = false;\n\t\tclearTimeout(timer);\n\t\ttimer = setTimeout(() => idle.value = true, timeout);\n\t};\n\tconst onEvent = createFilterWrapper(eventFilter, () => {\n\t\tlastActive.value = timestamp();\n\t\treset();\n\t});\n\tif (window$1) {\n\t\tconst document$1 = window$1.document;\n\t\tconst listenerOptions = { passive: true };\n\t\tfor (const event of events$1) useEventListener(window$1, event, () => {\n\t\t\tif (!isPending.value) return;\n\t\t\tonEvent();\n\t\t}, listenerOptions);\n\t\tif (listenForVisibilityChange) useEventListener(document$1, \"visibilitychange\", () => {\n\t\t\tif (document$1.hidden || !isPending.value) return;\n\t\t\tonEvent();\n\t\t}, listenerOptions);\n\t\tstart();\n\t}\n\tfunction start() {\n\t\tif (isPending.value) return;\n\t\tisPending.value = true;\n\t\tif (!initialState) reset();\n\t}\n\tfunction stop() {\n\t\tidle.value = initialState;\n\t\tclearTimeout(timer);\n\t\tisPending.value = false;\n\t}\n\treturn {\n\t\tidle,\n\t\tlastActive,\n\t\treset,\n\t\tstop,\n\t\tstart,\n\t\tisPending: shallowReadonly(isPending)\n\t};\n}\n\n//#endregion\n//#region useImage/index.ts\nasync function loadImage(options) {\n\treturn new Promise((resolve, reject) => {\n\t\tconst img = new Image();\n\t\tconst { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy, width, height, decoding, fetchPriority, ismap, usemap } = options;\n\t\timg.src = src;\n\t\tif (srcset != null) img.srcset = srcset;\n\t\tif (sizes != null) img.sizes = sizes;\n\t\tif (clazz != null) img.className = clazz;\n\t\tif (loading != null) img.loading = loading;\n\t\tif (crossorigin != null) img.crossOrigin = crossorigin;\n\t\tif (referrerPolicy != null) img.referrerPolicy = referrerPolicy;\n\t\tif (width != null) img.width = width;\n\t\tif (height != null) img.height = height;\n\t\tif (decoding != null) img.decoding = decoding;\n\t\tif (fetchPriority != null) img.fetchPriority = fetchPriority;\n\t\tif (ismap != null) img.isMap = ismap;\n\t\tif (usemap != null) img.useMap = usemap;\n\t\timg.onload = () => resolve(img);\n\t\timg.onerror = reject;\n\t});\n}\n/**\n* Reactive load an image in the browser, you can wait the result to display it or show a fallback.\n*\n* @see https://vueuse.org/useImage\n* @param options Image attributes, as used in the <img> tag\n* @param asyncStateOptions\n*/\nfunction useImage(options, asyncStateOptions = {}) {\n\tconst state = useAsyncState(() => loadImage(toValue(options)), void 0, {\n\t\tresetOnExecute: true,\n\t\t...asyncStateOptions\n\t});\n\twatch(() => toValue(options), () => state.execute(asyncStateOptions.delay), { deep: true });\n\treturn state;\n}\n\n//#endregion\n//#region _resolve-element.ts\n/**\n* Resolves an element from a given element, window, or document.\n*\n* @internal\n*/\nfunction resolveElement(el) {\n\tif (typeof Window !== \"undefined\" && el instanceof Window) return el.document.documentElement;\n\tif (typeof Document !== \"undefined\" && el instanceof Document) return el.documentElement;\n\treturn el;\n}\n\n//#endregion\n//#region useScroll/index.ts\n/**\n* We have to check if the scroll amount is close enough to some threshold in order to\n* more accurately calculate arrivedState. This is because scrollTop/scrollLeft are non-rounded\n* numbers, while scrollHeight/scrollWidth and clientHeight/clientWidth are rounded.\n* https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollHeight#determine_if_an_element_has_been_totally_scrolled\n*/\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\n/**\n* Reactive scroll.\n*\n* @see https://vueuse.org/useScroll\n* @param element\n* @param options\n*/\nfunction useScroll(element, options = {}) {\n\tconst { throttle = 0, idle = 200, onStop = noop, onScroll = noop, offset = {\n\t\tleft: 0,\n\t\tright: 0,\n\t\ttop: 0,\n\t\tbottom: 0\n\t}, observe: _observe = { mutation: false }, eventListenerOptions = {\n\t\tcapture: false,\n\t\tpassive: true\n\t}, behavior = \"auto\", window: window$1 = defaultWindow, onError = (e) => {\n\t\tconsole.error(e);\n\t} } = options;\n\tconst observe = typeof _observe === \"boolean\" ? { mutation: _observe } : _observe;\n\tconst internalX = shallowRef(0);\n\tconst internalY = shallowRef(0);\n\tconst x = computed({\n\t\tget() {\n\t\t\treturn internalX.value;\n\t\t},\n\t\tset(x$1) {\n\t\t\tscrollTo(x$1, void 0);\n\t\t}\n\t});\n\tconst y = computed({\n\t\tget() {\n\t\t\treturn internalY.value;\n\t\t},\n\t\tset(y$1) {\n\t\t\tscrollTo(void 0, y$1);\n\t\t}\n\t});\n\tfunction scrollTo(_x, _y) {\n\t\tvar _ref, _toValue, _toValue2, _document;\n\t\tif (!window$1) return;\n\t\tconst _element = toValue(element);\n\t\tif (!_element) return;\n\t\t(_ref = _element instanceof Document ? window$1.document.body : _element) === null || _ref === void 0 || _ref.scrollTo({\n\t\t\ttop: (_toValue = toValue(_y)) !== null && _toValue !== void 0 ? _toValue : y.value,\n\t\t\tleft: (_toValue2 = toValue(_x)) !== null && _toValue2 !== void 0 ? _toValue2 : x.value,\n\t\t\tbehavior: toValue(behavior)\n\t\t});\n\t\tconst scrollContainer = (_element === null || _element === void 0 || (_document = _element.document) === null || _document === void 0 ? void 0 : _document.documentElement) || (_element === null || _element === void 0 ? void 0 : _element.documentElement) || _element;\n\t\tif (x != null) internalX.value = scrollContainer.scrollLeft;\n\t\tif (y != null) internalY.value = scrollContainer.scrollTop;\n\t}\n\tconst isScrolling = shallowRef(false);\n\tconst arrivedState = reactive({\n\t\tleft: true,\n\t\tright: false,\n\t\ttop: true,\n\t\tbottom: false\n\t});\n\tconst directions = reactive({\n\t\tleft: false,\n\t\tright: false,\n\t\ttop: false,\n\t\tbottom: false\n\t});\n\tconst onScrollEnd = (e) => {\n\t\tif (!isScrolling.value) return;\n\t\tisScrolling.value = false;\n\t\tdirections.left = false;\n\t\tdirections.right = false;\n\t\tdirections.top = false;\n\t\tdirections.bottom = false;\n\t\tonStop(e);\n\t};\n\tconst onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n\tconst setArrivedState = (target) => {\n\t\tvar _document2;\n\t\tif (!window$1) return;\n\t\tconst el = (target === null || target === void 0 || (_document2 = target.document) === null || _document2 === void 0 ? void 0 : _document2.documentElement) || (target === null || target === void 0 ? void 0 : target.documentElement) || unrefElement(target);\n\t\tconst { display, flexDirection, direction } = window$1.getComputedStyle(el);\n\t\tconst directionMultipler = direction === \"rtl\" ? -1 : 1;\n\t\tconst scrollLeft = el.scrollLeft;\n\t\tdirections.left = scrollLeft < internalX.value;\n\t\tdirections.right = scrollLeft > internalX.value;\n\t\tconst left = Math.abs(scrollLeft * directionMultipler) <= (offset.left || 0);\n\t\tconst right = Math.abs(scrollLeft * directionMultipler) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n\t\tif (display === \"flex\" && flexDirection === \"row-reverse\") {\n\t\t\tarrivedState.left = right;\n\t\t\tarrivedState.right = left;\n\t\t} else {\n\t\t\tarrivedState.left = left;\n\t\t\tarrivedState.right = right;\n\t\t}\n\t\tinternalX.value = scrollLeft;\n\t\tlet scrollTop = el.scrollTop;\n\t\tif (target === window$1.document && !scrollTop) scrollTop = window$1.document.body.scrollTop;\n\t\tdirections.top = scrollTop < internalY.value;\n\t\tdirections.bottom = scrollTop > internalY.value;\n\t\tconst top = Math.abs(scrollTop) <= (offset.top || 0);\n\t\tconst bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n\t\t/**\n\t\t* reverse columns and rows behave exactly the other way around,\n\t\t* bottom is treated as top and top is treated as the negative version of bottom\n\t\t*/\n\t\tif (display === \"flex\" && flexDirection === \"column-reverse\") {\n\t\t\tarrivedState.top = bottom;\n\t\t\tarrivedState.bottom = top;\n\t\t} else {\n\t\t\tarrivedState.top = top;\n\t\t\tarrivedState.bottom = bottom;\n\t\t}\n\t\tinternalY.value = scrollTop;\n\t};\n\tconst onScrollHandler = (e) => {\n\t\tvar _documentElement;\n\t\tif (!window$1) return;\n\t\tsetArrivedState((_documentElement = e.target.documentElement) !== null && _documentElement !== void 0 ? _documentElement : e.target);\n\t\tisScrolling.value = true;\n\t\tonScrollEndDebounced(e);\n\t\tonScroll(e);\n\t};\n\tuseEventListener(element, \"scroll\", throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, eventListenerOptions);\n\ttryOnMounted(() => {\n\t\ttry {\n\t\t\tconst _element = toValue(element);\n\t\t\tif (!_element) return;\n\t\t\tsetArrivedState(_element);\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t});\n\tif ((observe === null || observe === void 0 ? void 0 : observe.mutation) && element != null && element !== window$1 && element !== document) useMutationObserver(element, () => {\n\t\tconst _element = toValue(element);\n\t\tif (!_element) return;\n\t\tsetArrivedState(_element);\n\t}, {\n\t\tattributes: true,\n\t\tchildList: true,\n\t\tsubtree: true\n\t});\n\tuseEventListener(element, \"scrollend\", onScrollEnd, eventListenerOptions);\n\treturn {\n\t\tx,\n\t\ty,\n\t\tisScrolling,\n\t\tarrivedState,\n\t\tdirections,\n\t\tmeasure() {\n\t\t\tconst _element = toValue(element);\n\t\t\tif (window$1 && _element) setArrivedState(_element);\n\t\t}\n\t};\n}\n\n//#endregion\n//#region useInfiniteScroll/index.ts\n/**\n* Reactive infinite scroll.\n*\n* @see https://vueuse.org/useInfiniteScroll\n*/\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n\tvar _options$distance;\n\tconst { direction = \"bottom\", interval = 100, canLoadMore = () => true } = options;\n\tconst state = reactive(useScroll(element, {\n\t\t...options,\n\t\toffset: {\n\t\t\t[direction]: (_options$distance = options.distance) !== null && _options$distance !== void 0 ? _options$distance : 0,\n\t\t\t...options.offset\n\t\t}\n\t}));\n\tconst promise = ref();\n\tconst isLoading = computed(() => !!promise.value);\n\tconst observedElement = computed(() => {\n\t\treturn resolveElement(toValue(element));\n\t});\n\tconst isElementVisible = useElementVisibility(observedElement);\n\tconst canLoad = computed(() => {\n\t\tif (!observedElement.value) return false;\n\t\treturn canLoadMore(observedElement.value);\n\t});\n\tfunction checkAndLoad() {\n\t\tstate.measure();\n\t\tif (!observedElement.value || !isElementVisible.value || !canLoad.value) return;\n\t\tconst { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n\t\tconst isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n\t\tif (state.arrivedState[direction] || isNarrower) {\n\t\t\tif (!promise.value) promise.value = Promise.all([onLoadMore(state), new Promise((resolve) => setTimeout(resolve, interval))]).finally(() => {\n\t\t\t\tpromise.value = null;\n\t\t\t\tnextTick(() => checkAndLoad());\n\t\t\t});\n\t\t}\n\t}\n\ttryOnUnmounted(watch(() => [\n\t\tstate.arrivedState[direction],\n\t\tisElementVisible.value,\n\t\tcanLoad.value\n\t], checkAndLoad, { immediate: true }));\n\treturn {\n\t\tisLoading,\n\t\treset() {\n\t\t\tnextTick(() => checkAndLoad());\n\t\t}\n\t};\n}\n\n//#endregion\n//#region useKeyModifier/index.ts\nconst defaultEvents = [\n\t\"mousedown\",\n\t\"mouseup\",\n\t\"keydown\",\n\t\"keyup\"\n];\n/* @__NO_SIDE_EFFECTS__ */\nfunction useKeyModifier(modifier, options = {}) {\n\tconst { events: events$1 = defaultEvents, document: document$1 = defaultDocument, initial = null } = options;\n\tconst state = shallowRef(initial);\n\tif (document$1) events$1.forEach((listenerEvent) => {\n\t\tuseEventListener(document$1, listenerEvent, (evt) => {\n\t\t\tif (typeof evt.getModifierState === \"function\") state.value = evt.getModifierState(modifier);\n\t\t}, { passive: true });\n\t});\n\treturn state;\n}\n\n//#endregion\n//#region useLocalStorage/index.ts\n/**\n* Reactive LocalStorage.\n*\n* @see https://vueuse.org/useLocalStorage\n* @param key\n* @param initialValue\n* @param options\n*/\nfunction useLocalStorage(key, initialValue, options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\treturn useStorage(key, initialValue, window$1 === null || window$1 === void 0 ? void 0 : window$1.localStorage, options);\n}\n\n//#endregion\n//#region useMagicKeys/aliasMap.ts\nconst DefaultMagicKeysAliasMap = {\n\tctrl: \"control\",\n\tcommand: \"meta\",\n\tcmd: \"meta\",\n\toption: \"alt\",\n\tup: \"arrowup\",\n\tdown: \"arrowdown\",\n\tleft: \"arrowleft\",\n\tright: \"arrowright\"\n};\n\n//#endregion\n//#region useMagicKeys/index.ts\n/**\n* Reactive keys pressed state, with magical keys combination support.\n*\n* @see https://vueuse.org/useMagicKeys\n*/\nfunction useMagicKeys(options = {}) {\n\tconst { reactive: useReactive = false, target = defaultWindow, aliasMap = DefaultMagicKeysAliasMap, passive = true, onEventFired = noop } = options;\n\tconst current = reactive(/* @__PURE__ */ new Set());\n\tconst obj = {\n\t\ttoJSON() {\n\t\t\treturn {};\n\t\t},\n\t\tcurrent\n\t};\n\tconst refs = useReactive ? reactive(obj) : obj;\n\tconst metaDeps = /* @__PURE__ */ new Set();\n\tconst depsMap = new Map([\n\t\t[\"Meta\", metaDeps],\n\t\t[\"Shift\", /* @__PURE__ */ new Set()],\n\t\t[\"Alt\", /* @__PURE__ */ new Set()]\n\t]);\n\tconst usedKeys = /* @__PURE__ */ new Set();\n\tfunction setRefs(key, value) {\n\t\tif (key in refs) if (useReactive) refs[key] = value;\n\t\telse refs[key].value = value;\n\t}\n\tfunction reset() {\n\t\tcurrent.clear();\n\t\tfor (const key of usedKeys) setRefs(key, false);\n\t}\n\tfunction updateDeps(value, e, keys$1) {\n\t\tif (!value || typeof e.getModifierState !== \"function\") return;\n\t\tfor (const [modifier, depsSet] of depsMap) if (e.getModifierState(modifier)) {\n\t\t\tkeys$1.forEach((key) => depsSet.add(key));\n\t\t\tbreak;\n\t\t}\n\t}\n\tfunction clearDeps(value, key) {\n\t\tif (value) return;\n\t\tconst depsMapKey = `${key[0].toUpperCase()}${key.slice(1)}`;\n\t\tconst deps = depsMap.get(depsMapKey);\n\t\tif (![\"shift\", \"alt\"].includes(key) || !deps) return;\n\t\tconst depsArray = Array.from(deps);\n\t\tconst depsIndex = depsArray.indexOf(key);\n\t\tdepsArray.forEach((key$1, index) => {\n\t\t\tif (index >= depsIndex) {\n\t\t\t\tcurrent.delete(key$1);\n\t\t\t\tsetRefs(key$1, false);\n\t\t\t}\n\t\t});\n\t\tdeps.clear();\n\t}\n\tfunction updateRefs(e, value) {\n\t\tvar _e$key, _e$code;\n\t\tconst key = (_e$key = e.key) === null || _e$key === void 0 ? void 0 : _e$key.toLowerCase();\n\t\tconst values = [(_e$code = e.code) === null || _e$code === void 0 ? void 0 : _e$code.toLowerCase(), key].filter(Boolean);\n\t\tif (key === \"\") return;\n\t\tif (key) if (value) current.add(key);\n\t\telse current.delete(key);\n\t\tfor (const key$1 of values) {\n\t\t\tusedKeys.add(key$1);\n\t\t\tsetRefs(key$1, value);\n\t\t}\n\t\tupdateDeps(value, e, [...current, ...values]);\n\t\tclearDeps(value, key);\n\t\tif (key === \"meta\" && !value) {\n\t\t\tmetaDeps.forEach((key$1) => {\n\t\t\t\tcurrent.delete(key$1);\n\t\t\t\tsetRefs(key$1, false);\n\t\t\t});\n\t\t\tmetaDeps.clear();\n\t\t}\n\t}\n\tuseEventListener(target, \"keydown\", (e) => {\n\t\tupdateRefs(e, true);\n\t\treturn onEventFired(e);\n\t}, { passive });\n\tuseEventListener(target, \"keyup\", (e) => {\n\t\tupdateRefs(e, false);\n\t\treturn onEventFired(e);\n\t}, { passive });\n\tuseEventListener(\"blur\", reset, { passive });\n\tuseEventListener(\"focus\", reset, { passive });\n\tconst proxy = new Proxy(refs, { get(target$1, prop, rec) {\n\t\tif (typeof prop !== \"string\") return Reflect.get(target$1, prop, rec);\n\t\tprop = prop.toLowerCase();\n\t\tif (prop in aliasMap) prop = aliasMap[prop];\n\t\tif (!(prop in refs)) if (/[+_-]/.test(prop)) {\n\t\t\tconst keys$1 = prop.split(/[+_-]/g).map((i) => i.trim());\n\t\t\trefs[prop] = computed(() => keys$1.map((key) => toValue(proxy[key])).every(Boolean));\n\t\t} else refs[prop] = shallowRef(false);\n\t\tconst r = Reflect.get(target$1, prop, rec);\n\t\treturn useReactive ? toValue(r) : r;\n\t} });\n\treturn proxy;\n}\n\n//#endregion\n//#region useMediaControls/index.ts\n/**\n* Automatically check if the ref exists and if it does run the cb fn\n*/\nfunction usingElRef(source, cb) {\n\tif (toValue(source)) cb(toValue(source));\n}\n/**\n* Converts a TimeRange object to an array\n*/\nfunction timeRangeToArray(timeRanges) {\n\tlet ranges = [];\n\tfor (let i = 0; i < timeRanges.length; ++i) ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n\treturn ranges;\n}\n/**\n* Converts a TextTrackList object to an array of `UseMediaTextTrack`\n*/\nfunction tracksToArray(tracks) {\n\treturn Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({\n\t\tid,\n\t\tlabel,\n\t\tkind,\n\t\tlanguage,\n\t\tmode,\n\t\tactiveCues,\n\t\tcues,\n\t\tinBandMetadataTrackDispatchType\n\t}));\n}\nconst defaultOptions = {\n\tsrc: \"\",\n\ttracks: []\n};\nfunction useMediaControls(target, options = {}) {\n\ttarget = toRef(target);\n\toptions = {\n\t\t...defaultOptions,\n\t\t...options\n\t};\n\tconst { document: document$1 = defaultDocument } = options;\n\tconst listenerOptions = { passive: true };\n\tconst currentTime = shallowRef(0);\n\tconst duration = shallowRef(0);\n\tconst seeking = shallowRef(false);\n\tconst volume = shallowRef(1);\n\tconst waiting = shallowRef(false);\n\tconst ended = shallowRef(false);\n\tconst playing = shallowRef(false);\n\tconst rate = shallowRef(1);\n\tconst stalled = shallowRef(false);\n\tconst buffered = ref([]);\n\tconst tracks = ref([]);\n\tconst selectedTrack = shallowRef(-1);\n\tconst isPictureInPicture = shallowRef(false);\n\tconst muted = shallowRef(false);\n\tconst supportsPictureInPicture = document$1 && \"pictureInPictureEnabled\" in document$1;\n\tconst sourceErrorEvent = createEventHook();\n\tconst playbackErrorEvent = createEventHook();\n\t/**\n\t* Disables the specified track. If no track is specified then\n\t* all tracks will be disabled\n\t*\n\t* @param track The id of the track to disable\n\t*/\n\tconst disableTrack = (track) => {\n\t\tusingElRef(target, (el) => {\n\t\t\tif (track) {\n\t\t\t\tconst id = typeof track === \"number\" ? track : track.id;\n\t\t\t\tel.textTracks[id].mode = \"disabled\";\n\t\t\t} else for (let i = 0; i < el.textTracks.length; ++i) el.textTracks[i].mode = \"disabled\";\n\t\t\tselectedTrack.value = -1;\n\t\t});\n\t};\n\t/**\n\t* Enables the specified track and disables the\n\t* other tracks unless otherwise specified\n\t*\n\t* @param track The track of the id of the track to enable\n\t* @param disableTracks Disable all other tracks\n\t*/\n\tconst enableTrack = (track, disableTracks = true) => {\n\t\tusingElRef(target, (el) => {\n\t\t\tconst id = typeof track === \"number\" ? track : track.id;\n\t\t\tif (disableTracks) disableTrack();\n\t\t\tel.textTracks[id].mode = \"showing\";\n\t\t\tselectedTrack.value = id;\n\t\t});\n\t};\n\t/**\n\t* Toggle picture in picture mode for the player.\n\t*/\n\tconst togglePictureInPicture = () => {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tusingElRef(target, async (el) => {\n\t\t\t\tif (supportsPictureInPicture) if (!isPictureInPicture.value) el.requestPictureInPicture().then(resolve).catch(reject);\n\t\t\t\telse document$1.exitPictureInPicture().then(resolve).catch(reject);\n\t\t\t});\n\t\t});\n\t};\n\t/**\n\t* This will automatically inject sources to the media element. The sources will be\n\t* appended as children to the media element as `<source>` elements.\n\t*/\n\twatchEffect(() => {\n\t\tif (!document$1) return;\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tconst src = toValue(options.src);\n\t\tlet sources = [];\n\t\tif (!src) return;\n\t\tif (typeof src === \"string\") sources = [{ src }];\n\t\telse if (Array.isArray(src)) sources = src;\n\t\telse if (isObject(src)) sources = [src];\n\t\tel.querySelectorAll(\"source\").forEach((e) => {\n\t\t\te.remove();\n\t\t});\n\t\tsources.forEach(({ src: src$1, type, media }) => {\n\t\t\tconst source = document$1.createElement(\"source\");\n\t\t\tsource.setAttribute(\"src\", src$1);\n\t\t\tsource.setAttribute(\"type\", type || \"\");\n\t\t\tsource.setAttribute(\"media\", media || \"\");\n\t\t\tuseEventListener(source, \"error\", sourceErrorEvent.trigger, listenerOptions);\n\t\t\tel.appendChild(source);\n\t\t});\n\t\tel.load();\n\t});\n\t/**\n\t* Apply composable state to the element, also when element is changed\n\t*/\n\twatch([target, volume], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.volume = volume.value;\n\t});\n\twatch([target, muted], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.muted = muted.value;\n\t});\n\twatch([target, rate], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.playbackRate = rate.value;\n\t});\n\t/**\n\t* Load Tracks\n\t*/\n\twatchEffect(() => {\n\t\tif (!document$1) return;\n\t\tconst textTracks = toValue(options.tracks);\n\t\tconst el = toValue(target);\n\t\tif (!textTracks || !textTracks.length || !el) return;\n\t\t/**\n\t\t* The MediaAPI provides an API for adding text tracks, but they don't currently\n\t\t* have an API for removing text tracks, so instead we will just create and remove\n\t\t* the tracks manually using the HTML api.\n\t\t*/\n\t\tel.querySelectorAll(\"track\").forEach((e) => e.remove());\n\t\ttextTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n\t\t\tconst track = document$1.createElement(\"track\");\n\t\t\ttrack.default = isDefault || false;\n\t\t\ttrack.kind = kind;\n\t\t\ttrack.label = label;\n\t\t\ttrack.src = src;\n\t\t\ttrack.srclang = srcLang;\n\t\t\tif (track.default) selectedTrack.value = i;\n\t\t\tel.appendChild(track);\n\t\t});\n\t});\n\t/**\n\t* This will allow us to update the current time from the timeupdate event\n\t* without setting the medias current position, but if the user changes the\n\t* current time via the ref, then the media will seek.\n\t*\n\t* If we did not use an ignorable watch, then the current time update from\n\t* the timeupdate event would cause the media to stutter.\n\t*/\n\tconst { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tel.currentTime = time;\n\t});\n\t/**\n\t* Using an ignorable watch so we can control the play state using a ref and not\n\t* a function\n\t*/\n\tconst { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tif (isPlaying) el.play().catch((e) => {\n\t\t\tplaybackErrorEvent.trigger(e);\n\t\t\tthrow e;\n\t\t});\n\t\telse el.pause();\n\t});\n\tuseEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime), listenerOptions);\n\tuseEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration, listenerOptions);\n\tuseEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered), listenerOptions);\n\tuseEventListener(target, \"seeking\", () => seeking.value = true, listenerOptions);\n\tuseEventListener(target, \"seeked\", () => seeking.value = false, listenerOptions);\n\tuseEventListener(target, [\"waiting\", \"loadstart\"], () => {\n\t\twaiting.value = true;\n\t\tignorePlayingUpdates(() => playing.value = false);\n\t}, listenerOptions);\n\tuseEventListener(target, \"loadeddata\", () => waiting.value = false, listenerOptions);\n\tuseEventListener(target, \"playing\", () => {\n\t\twaiting.value = false;\n\t\tended.value = false;\n\t\tignorePlayingUpdates(() => playing.value = true);\n\t}, listenerOptions);\n\tuseEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate, listenerOptions);\n\tuseEventListener(target, \"stalled\", () => stalled.value = true, listenerOptions);\n\tuseEventListener(target, \"ended\", () => ended.value = true, listenerOptions);\n\tuseEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false), listenerOptions);\n\tuseEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true), listenerOptions);\n\tuseEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true, listenerOptions);\n\tuseEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false, listenerOptions);\n\tuseEventListener(target, \"volumechange\", () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tvolume.value = el.volume;\n\t\tmuted.value = el.muted;\n\t}, listenerOptions);\n\t/**\n\t* The following listeners need to listen to a nested\n\t* object on the target, so we will have to use a nested\n\t* watch and manually remove the listeners\n\t*/\n\tconst listeners = [];\n\tconst stop = watch([target], () => {\n\t\tconst el = toValue(target);\n\t\tif (!el) return;\n\t\tstop();\n\t\tlisteners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n\t\tlisteners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n\t\tlisteners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks), listenerOptions);\n\t});\n\ttryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n\treturn {\n\t\tcurrentTime,\n\t\tduration,\n\t\twaiting,\n\t\tseeking,\n\t\tended,\n\t\tstalled,\n\t\tbuffered,\n\t\tplaying,\n\t\trate,\n\t\tvolume,\n\t\tmuted,\n\t\ttracks,\n\t\tselectedTrack,\n\t\tenableTrack,\n\t\tdisableTrack,\n\t\tsupportsPictureInPicture,\n\t\ttogglePictureInPicture,\n\t\tisPictureInPicture,\n\t\tonSourceError: sourceErrorEvent.on,\n\t\tonPlaybackError: playbackErrorEvent.on\n\t};\n}\n\n//#endregion\n//#region useMemoize/index.ts\n/**\n* Reactive function result cache based on arguments\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useMemoize(resolver, options) {\n\tconst initCache = () => {\n\t\tif (options === null || options === void 0 ? void 0 : options.cache) return shallowReactive(options.cache);\n\t\treturn shallowReactive(/* @__PURE__ */ new Map());\n\t};\n\tconst cache = initCache();\n\t/**\n\t* Generate key from args\n\t*/\n\tconst generateKey = (...args) => (options === null || options === void 0 ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n\t/**\n\t* Load data and save in cache\n\t*/\n\tconst _loadData = (key, ...args) => {\n\t\tcache.set(key, resolver(...args));\n\t\treturn cache.get(key);\n\t};\n\tconst loadData = (...args) => _loadData(generateKey(...args), ...args);\n\t/**\n\t* Delete key from cache\n\t*/\n\tconst deleteData = (...args) => {\n\t\tcache.delete(generateKey(...args));\n\t};\n\t/**\n\t* Clear cached data\n\t*/\n\tconst clearData = () => {\n\t\tcache.clear();\n\t};\n\tconst memoized = (...args) => {\n\t\tconst key = generateKey(...args);\n\t\tif (cache.has(key)) return cache.get(key);\n\t\treturn _loadData(key, ...args);\n\t};\n\tmemoized.load = loadData;\n\tmemoized.delete = deleteData;\n\tmemoized.clear = clearData;\n\tmemoized.generateKey = generateKey;\n\tmemoized.cache = cache;\n\treturn memoized;\n}\n\n//#endregion\n//#region useMemory/index.ts\n/**\n* Reactive Memory Info.\n*\n* @see https://vueuse.org/useMemory\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useMemory(options = {}) {\n\tconst memory = ref();\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n\tif (isSupported.value) {\n\t\tconst { interval = 1e3 } = options;\n\t\tuseIntervalFn(() => {\n\t\t\tmemory.value = performance.memory;\n\t\t}, interval, {\n\t\t\timmediate: options.immediate,\n\t\t\timmediateCallback: options.immediateCallback\n\t\t});\n\t}\n\treturn {\n\t\tisSupported,\n\t\tmemory\n\t};\n}\n\n//#endregion\n//#region useMouse/index.ts\nconst UseMouseBuiltinExtractors = {\n\tpage: (event) => [event.pageX, event.pageY],\n\tclient: (event) => [event.clientX, event.clientY],\n\tscreen: (event) => [event.screenX, event.screenY],\n\tmovement: (event) => event instanceof MouseEvent ? [event.movementX, event.movementY] : null\n};\n/**\n* Reactive mouse position.\n*\n* @see https://vueuse.org/useMouse\n* @param options\n*/\nfunction useMouse(options = {}) {\n\tconst { type = \"page\", touch = true, resetOnTouchEnds = false, initialValue = {\n\t\tx: 0,\n\t\ty: 0\n\t}, window: window$1 = defaultWindow, target = window$1, scroll = true, eventFilter } = options;\n\tlet _prevMouseEvent = null;\n\tlet _prevScrollX = 0;\n\tlet _prevScrollY = 0;\n\tconst x = shallowRef(initialValue.x);\n\tconst y = shallowRef(initialValue.y);\n\tconst sourceType = shallowRef(null);\n\tconst extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n\tconst mouseHandler = (event) => {\n\t\tconst result = extractor(event);\n\t\t_prevMouseEvent = event;\n\t\tif (result) {\n\t\t\t[x.value, y.value] = result;\n\t\t\tsourceType.value = \"mouse\";\n\t\t}\n\t\tif (window$1) {\n\t\t\t_prevScrollX = window$1.scrollX;\n\t\t\t_prevScrollY = window$1.scrollY;\n\t\t}\n\t};\n\tconst touchHandler = (event) => {\n\t\tif (event.touches.length > 0) {\n\t\t\tconst result = extractor(event.touches[0]);\n\t\t\tif (result) {\n\t\t\t\t[x.value, y.value] = result;\n\t\t\t\tsourceType.value = \"touch\";\n\t\t\t}\n\t\t}\n\t};\n\tconst scrollHandler = () => {\n\t\tif (!_prevMouseEvent || !window$1) return;\n\t\tconst pos = extractor(_prevMouseEvent);\n\t\tif (_prevMouseEvent instanceof MouseEvent && pos) {\n\t\t\tx.value = pos[0] + window$1.scrollX - _prevScrollX;\n\t\t\ty.value = pos[1] + window$1.scrollY - _prevScrollY;\n\t\t}\n\t};\n\tconst reset = () => {\n\t\tx.value = initialValue.x;\n\t\ty.value = initialValue.y;\n\t};\n\tconst mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n\tconst touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n\tconst scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n\tif (target) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n\t\tif (touch && type !== \"movement\") {\n\t\t\tuseEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n\t\t\tif (resetOnTouchEnds) useEventListener(target, \"touchend\", reset, listenerOptions);\n\t\t}\n\t\tif (scroll && type === \"page\") useEventListener(window$1, \"scroll\", scrollHandlerWrapper, listenerOptions);\n\t}\n\treturn {\n\t\tx,\n\t\ty,\n\t\tsourceType\n\t};\n}\n\n//#endregion\n//#region useMouseInElement/index.ts\n/**\n* Reactive mouse position related to an element.\n*\n* @see https://vueuse.org/useMouseInElement\n* @param target\n* @param options\n*/\nfunction useMouseInElement(target, options = {}) {\n\tconst { windowResize = true, windowScroll = true, handleOutside = true, window: window$1 = defaultWindow } = options;\n\tconst type = options.type || \"page\";\n\tconst { x, y, sourceType } = useMouse(options);\n\tconst targetRef = shallowRef(target !== null && target !== void 0 ? target : window$1 === null || window$1 === void 0 ? void 0 : window$1.document.body);\n\tconst elementX = shallowRef(0);\n\tconst elementY = shallowRef(0);\n\tconst elementPositionX = shallowRef(0);\n\tconst elementPositionY = shallowRef(0);\n\tconst elementHeight = shallowRef(0);\n\tconst elementWidth = shallowRef(0);\n\tconst isOutside = shallowRef(true);\n\tfunction update() {\n\t\tif (!window$1) return;\n\t\tconst el = unrefElement(targetRef);\n\t\tif (!el || !(el instanceof Element)) return;\n\t\tfor (const rect of el.getClientRects()) {\n\t\t\tconst { left, top, width, height } = rect;\n\t\t\telementPositionX.value = left + (type === \"page\" ? window$1.pageXOffset : 0);\n\t\t\telementPositionY.value = top + (type === \"page\" ? window$1.pageYOffset : 0);\n\t\t\telementHeight.value = height;\n\t\t\telementWidth.value = width;\n\t\t\tconst elX = x.value - elementPositionX.value;\n\t\t\tconst elY = y.value - elementPositionY.value;\n\t\t\tisOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n\t\t\tif (handleOutside || !isOutside.value) {\n\t\t\t\telementX.value = elX;\n\t\t\t\telementY.value = elY;\n\t\t\t}\n\t\t\tif (!isOutside.value) break;\n\t\t}\n\t}\n\tconst stopFnList = [];\n\tfunction stop() {\n\t\tstopFnList.forEach((fn) => fn());\n\t\tstopFnList.length = 0;\n\t}\n\ttryOnMounted(() => {\n\t\tupdate();\n\t});\n\tif (window$1) {\n\t\tconst { stop: stopResizeObserver } = useResizeObserver(targetRef, update);\n\t\tconst { stop: stopMutationObserver } = useMutationObserver(targetRef, update, { attributeFilter: [\"style\", \"class\"] });\n\t\tconst stopWatch = watch([\n\t\t\ttargetRef,\n\t\t\tx,\n\t\t\ty\n\t\t], update);\n\t\tstopFnList.push(stopResizeObserver, stopMutationObserver, stopWatch);\n\t\tuseEventListener(document, \"mouseleave\", () => isOutside.value = true, { passive: true });\n\t\tif (windowScroll) stopFnList.push(useEventListener(\"scroll\", update, {\n\t\t\tcapture: true,\n\t\t\tpassive: true\n\t\t}));\n\t\tif (windowResize) stopFnList.push(useEventListener(\"resize\", update, { passive: true }));\n\t}\n\treturn {\n\t\tx,\n\t\ty,\n\t\tsourceType,\n\t\telementX,\n\t\telementY,\n\t\telementPositionX,\n\t\telementPositionY,\n\t\telementHeight,\n\t\telementWidth,\n\t\tisOutside,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useMousePressed/index.ts\n/**\n* Reactive mouse pressing state.\n*\n* @see https://vueuse.org/useMousePressed\n* @param options\n*/\nfunction useMousePressed(options = {}) {\n\tconst { touch = true, drag = true, capture = false, initialValue = false, window: window$1 = defaultWindow } = options;\n\tconst pressed = shallowRef(initialValue);\n\tconst sourceType = shallowRef(null);\n\tif (!window$1) return {\n\t\tpressed,\n\t\tsourceType\n\t};\n\tconst onPressed = (srcType) => (event) => {\n\t\tvar _options$onPressed;\n\t\tpressed.value = true;\n\t\tsourceType.value = srcType;\n\t\t(_options$onPressed = options.onPressed) === null || _options$onPressed === void 0 || _options$onPressed.call(options, event);\n\t};\n\tconst onReleased = (event) => {\n\t\tvar _options$onReleased;\n\t\tpressed.value = false;\n\t\tsourceType.value = null;\n\t\t(_options$onReleased = options.onReleased) === null || _options$onReleased === void 0 || _options$onReleased.call(options, event);\n\t};\n\tconst target = computed(() => unrefElement(options.target) || window$1);\n\tconst listenerOptions = {\n\t\tpassive: true,\n\t\tcapture\n\t};\n\tuseEventListener(target, \"mousedown\", onPressed(\"mouse\"), listenerOptions);\n\tuseEventListener(window$1, \"mouseleave\", onReleased, listenerOptions);\n\tuseEventListener(window$1, \"mouseup\", onReleased, listenerOptions);\n\tif (drag) {\n\t\tuseEventListener(target, \"dragstart\", onPressed(\"mouse\"), listenerOptions);\n\t\tuseEventListener(window$1, \"drop\", onReleased, listenerOptions);\n\t\tuseEventListener(window$1, \"dragend\", onReleased, listenerOptions);\n\t}\n\tif (touch) {\n\t\tuseEventListener(target, \"touchstart\", onPressed(\"touch\"), listenerOptions);\n\t\tuseEventListener(window$1, \"touchend\", onReleased, listenerOptions);\n\t\tuseEventListener(window$1, \"touchcancel\", onReleased, listenerOptions);\n\t}\n\treturn {\n\t\tpressed,\n\t\tsourceType\n\t};\n}\n\n//#endregion\n//#region useNavigatorLanguage/index.ts\n/**\n*\n* Reactive useNavigatorLanguage\n*\n* Detects the currently selected user language and returns a reactive language\n* @see https://vueuse.org/useNavigatorLanguage\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useNavigatorLanguage(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst navigator$1 = window$1 === null || window$1 === void 0 ? void 0 : window$1.navigator;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"language\" in navigator$1);\n\tconst language = shallowRef(navigator$1 === null || navigator$1 === void 0 ? void 0 : navigator$1.language);\n\tuseEventListener(window$1, \"languagechange\", () => {\n\t\tif (navigator$1) language.value = navigator$1.language;\n\t}, { passive: true });\n\treturn {\n\t\tisSupported,\n\t\tlanguage\n\t};\n}\n\n//#endregion\n//#region useNetwork/index.ts\n/**\n* Reactive Network status.\n*\n* @see https://vueuse.org/useNetwork\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useNetwork(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst navigator$1 = window$1 === null || window$1 === void 0 ? void 0 : window$1.navigator;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"connection\" in navigator$1);\n\tconst isOnline = shallowRef(true);\n\tconst saveData = shallowRef(false);\n\tconst offlineAt = shallowRef(void 0);\n\tconst onlineAt = shallowRef(void 0);\n\tconst downlink = shallowRef(void 0);\n\tconst downlinkMax = shallowRef(void 0);\n\tconst rtt = shallowRef(void 0);\n\tconst effectiveType = shallowRef(void 0);\n\tconst type = shallowRef(\"unknown\");\n\tconst connection = isSupported.value && navigator$1.connection;\n\tfunction updateNetworkInformation() {\n\t\tif (!navigator$1) return;\n\t\tisOnline.value = navigator$1.onLine;\n\t\tofflineAt.value = isOnline.value ? void 0 : Date.now();\n\t\tonlineAt.value = isOnline.value ? Date.now() : void 0;\n\t\tif (connection) {\n\t\t\tdownlink.value = connection.downlink;\n\t\t\tdownlinkMax.value = connection.downlinkMax;\n\t\t\teffectiveType.value = connection.effectiveType;\n\t\t\trtt.value = connection.rtt;\n\t\t\tsaveData.value = connection.saveData;\n\t\t\ttype.value = connection.type;\n\t\t}\n\t}\n\tconst listenerOptions = { passive: true };\n\tif (window$1) {\n\t\tuseEventListener(window$1, \"offline\", () => {\n\t\t\tisOnline.value = false;\n\t\t\tofflineAt.value = Date.now();\n\t\t}, listenerOptions);\n\t\tuseEventListener(window$1, \"online\", () => {\n\t\t\tisOnline.value = true;\n\t\t\tonlineAt.value = Date.now();\n\t\t}, listenerOptions);\n\t}\n\tif (connection) useEventListener(connection, \"change\", updateNetworkInformation, listenerOptions);\n\tupdateNetworkInformation();\n\treturn {\n\t\tisSupported,\n\t\tisOnline: readonly(isOnline),\n\t\tsaveData: readonly(saveData),\n\t\tofflineAt: readonly(offlineAt),\n\t\tonlineAt: readonly(onlineAt),\n\t\tdownlink: readonly(downlink),\n\t\tdownlinkMax: readonly(downlinkMax),\n\t\teffectiveType: readonly(effectiveType),\n\t\trtt: readonly(rtt),\n\t\ttype: readonly(type)\n\t};\n}\n\n//#endregion\n//#region useNow/index.ts\n/**\n* Reactive current Date instance.\n*\n* @see https://vueuse.org/useNow\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useNow(options = {}) {\n\tconst { controls: exposeControls = false, interval = \"requestAnimationFrame\", immediate = true } = options;\n\tconst now = ref(/* @__PURE__ */ new Date());\n\tconst update = () => now.value = /* @__PURE__ */ new Date();\n\tconst controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate }) : useIntervalFn(update, interval, { immediate });\n\tif (exposeControls) return {\n\t\tnow,\n\t\t...controls\n\t};\n\telse return now;\n}\n\n//#endregion\n//#region useObjectUrl/index.ts\n/**\n* Reactive URL representing an object.\n*\n* @see https://vueuse.org/useObjectUrl\n* @param object\n*/\nfunction useObjectUrl(object) {\n\tconst url = shallowRef();\n\tconst release = () => {\n\t\tif (url.value) URL.revokeObjectURL(url.value);\n\t\turl.value = void 0;\n\t};\n\twatch(() => toValue(object), (newObject) => {\n\t\trelease();\n\t\tif (newObject) url.value = URL.createObjectURL(newObject);\n\t}, { immediate: true });\n\ttryOnScopeDispose(release);\n\treturn readonly(url);\n}\n\n//#endregion\n//#region ../math/useClamp/index.ts\n/**\n* Reactively clamp a value between two other values.\n*\n* @see https://vueuse.org/useClamp\n* @param value number\n* @param min\n* @param max\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useClamp(value, min, max) {\n\tif (typeof value === \"function\" || isReadonly(value)) return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n\tconst _value = ref(value);\n\treturn computed({\n\t\tget() {\n\t\t\treturn _value.value = clamp(_value.value, toValue(min), toValue(max));\n\t\t},\n\t\tset(value$1) {\n\t\t\t_value.value = clamp(value$1, toValue(min), toValue(max));\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useOffsetPagination/index.ts\nfunction useOffsetPagination(options) {\n\tconst { total = Number.POSITIVE_INFINITY, pageSize = 10, page = 1, onPageChange = noop, onPageSizeChange = noop, onPageCountChange = noop } = options;\n\tconst currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n\tconst pageCount = computed(() => Math.max(1, Math.ceil(toValue(total) / toValue(currentPageSize))));\n\tconst currentPage = useClamp(page, 1, pageCount);\n\tconst isFirstPage = computed(() => currentPage.value === 1);\n\tconst isLastPage = computed(() => currentPage.value === pageCount.value);\n\tif (isRef(page)) syncRef(page, currentPage, { direction: isReadonly(page) ? \"ltr\" : \"both\" });\n\tif (isRef(pageSize)) syncRef(pageSize, currentPageSize, { direction: isReadonly(pageSize) ? \"ltr\" : \"both\" });\n\tfunction prev() {\n\t\tcurrentPage.value--;\n\t}\n\tfunction next() {\n\t\tcurrentPage.value++;\n\t}\n\tconst returnValue = {\n\t\tcurrentPage,\n\t\tcurrentPageSize,\n\t\tpageCount,\n\t\tisFirstPage,\n\t\tisLastPage,\n\t\tprev,\n\t\tnext\n\t};\n\twatch(currentPage, () => {\n\t\tonPageChange(reactive(returnValue));\n\t});\n\twatch(currentPageSize, () => {\n\t\tonPageSizeChange(reactive(returnValue));\n\t});\n\twatch(pageCount, () => {\n\t\tonPageCountChange(reactive(returnValue));\n\t});\n\treturn returnValue;\n}\n\n//#endregion\n//#region useOnline/index.ts\n/**\n* Reactive online state.\n*\n* @see https://vueuse.org/useOnline\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useOnline(options = {}) {\n\tconst { isOnline } = useNetwork(options);\n\treturn isOnline;\n}\n\n//#endregion\n//#region usePageLeave/index.ts\n/**\n* Reactive state to show whether mouse leaves the page.\n*\n* @see https://vueuse.org/usePageLeave\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePageLeave(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst isLeft = shallowRef(false);\n\tconst handler = (event) => {\n\t\tif (!window$1) return;\n\t\tevent = event || window$1.event;\n\t\tisLeft.value = !(event.relatedTarget || event.toElement);\n\t};\n\tif (window$1) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(window$1, \"mouseout\", handler, listenerOptions);\n\t\tuseEventListener(window$1.document, \"mouseleave\", handler, listenerOptions);\n\t\tuseEventListener(window$1.document, \"mouseenter\", handler, listenerOptions);\n\t}\n\treturn isLeft;\n}\n\n//#endregion\n//#region useScreenOrientation/index.ts\n/**\n* Reactive screen orientation\n*\n* @see https://vueuse.org/useScreenOrientation\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useScreenOrientation(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"screen\" in window$1 && \"orientation\" in window$1.screen);\n\tconst screenOrientation = isSupported.value ? window$1.screen.orientation : {};\n\tconst orientation = ref(screenOrientation.type);\n\tconst angle = shallowRef(screenOrientation.angle || 0);\n\tif (isSupported.value) useEventListener(window$1, \"orientationchange\", () => {\n\t\torientation.value = screenOrientation.type;\n\t\tangle.value = screenOrientation.angle;\n\t}, { passive: true });\n\tconst lockOrientation = (type) => {\n\t\tif (isSupported.value && typeof screenOrientation.lock === \"function\") return screenOrientation.lock(type);\n\t\treturn Promise.reject(/* @__PURE__ */ new Error(\"Not supported\"));\n\t};\n\tconst unlockOrientation = () => {\n\t\tif (isSupported.value && typeof screenOrientation.unlock === \"function\") screenOrientation.unlock();\n\t};\n\treturn {\n\t\tisSupported,\n\t\torientation,\n\t\tangle,\n\t\tlockOrientation,\n\t\tunlockOrientation\n\t};\n}\n\n//#endregion\n//#region useParallax/index.ts\n/**\n* Create parallax effect easily. It uses `useDeviceOrientation` and fallback to `useMouse`\n* if orientation is not supported.\n*\n* @param target\n* @param options\n*/\nfunction useParallax(target, options = {}) {\n\tconst { deviceOrientationTiltAdjust = (i) => i, deviceOrientationRollAdjust = (i) => i, mouseTiltAdjust = (i) => i, mouseRollAdjust = (i) => i, window: window$1 = defaultWindow } = options;\n\tconst orientation = reactive(useDeviceOrientation({ window: window$1 }));\n\tconst screenOrientation = reactive(useScreenOrientation({ window: window$1 }));\n\tconst { elementX: x, elementY: y, elementWidth: width, elementHeight: height } = useMouseInElement(target, {\n\t\thandleOutside: false,\n\t\twindow: window$1\n\t});\n\tconst source = computed(() => {\n\t\tif (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0)) return \"deviceOrientation\";\n\t\treturn \"mouse\";\n\t});\n\treturn {\n\t\troll: computed(() => {\n\t\t\tif (source.value === \"deviceOrientation\") {\n\t\t\t\tlet value;\n\t\t\t\tswitch (screenOrientation.orientation) {\n\t\t\t\t\tcase \"landscape-primary\":\n\t\t\t\t\t\tvalue = orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"landscape-secondary\":\n\t\t\t\t\t\tvalue = -orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-primary\":\n\t\t\t\t\t\tvalue = -orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-secondary\":\n\t\t\t\t\t\tvalue = orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: value = -orientation.beta / 90;\n\t\t\t\t}\n\t\t\t\treturn deviceOrientationRollAdjust(value);\n\t\t\t} else return mouseRollAdjust(-(y.value - height.value / 2) / height.value);\n\t\t}),\n\t\ttilt: computed(() => {\n\t\t\tif (source.value === \"deviceOrientation\") {\n\t\t\t\tlet value;\n\t\t\t\tswitch (screenOrientation.orientation) {\n\t\t\t\t\tcase \"landscape-primary\":\n\t\t\t\t\t\tvalue = orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"landscape-secondary\":\n\t\t\t\t\t\tvalue = -orientation.beta / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-primary\":\n\t\t\t\t\t\tvalue = orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \"portrait-secondary\":\n\t\t\t\t\t\tvalue = -orientation.gamma / 90;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault: value = orientation.gamma / 90;\n\t\t\t\t}\n\t\t\t\treturn deviceOrientationTiltAdjust(value);\n\t\t\t} else return mouseTiltAdjust((x.value - width.value / 2) / width.value);\n\t\t}),\n\t\tsource\n\t};\n}\n\n//#endregion\n//#region useParentElement/index.ts\nfunction useParentElement(element = useCurrentElement()) {\n\tconst parentElement = shallowRef();\n\tconst update = () => {\n\t\tconst el = unrefElement(element);\n\t\tif (el) parentElement.value = el.parentElement;\n\t};\n\ttryOnMounted(update);\n\twatch(() => toValue(element), update);\n\treturn parentElement;\n}\n\n//#endregion\n//#region usePerformanceObserver/index.ts\n/**\n* Observe performance metrics.\n*\n* @see https://vueuse.org/usePerformanceObserver\n* @param options\n*/\nfunction usePerformanceObserver(options, callback) {\n\tconst { window: window$1 = defaultWindow, immediate = true,...performanceOptions } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => window$1 && \"PerformanceObserver\" in window$1);\n\tlet observer;\n\tconst stop = () => {\n\t\tobserver === null || observer === void 0 || observer.disconnect();\n\t};\n\tconst start = () => {\n\t\tif (isSupported.value) {\n\t\t\tstop();\n\t\t\tobserver = new PerformanceObserver(callback);\n\t\t\tobserver.observe(performanceOptions);\n\t\t}\n\t};\n\ttryOnScopeDispose(stop);\n\tif (immediate) start();\n\treturn {\n\t\tisSupported,\n\t\tstart,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region usePointer/index.ts\nconst defaultState = {\n\tx: 0,\n\ty: 0,\n\tpointerId: 0,\n\tpressure: 0,\n\ttiltX: 0,\n\ttiltY: 0,\n\twidth: 0,\n\theight: 0,\n\ttwist: 0,\n\tpointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\n/**\n* Reactive pointer state.\n*\n* @see https://vueuse.org/usePointer\n* @param options\n*/\nfunction usePointer(options = {}) {\n\tconst { target = defaultWindow } = options;\n\tconst isInside = shallowRef(false);\n\tconst state = shallowRef(options.initialValue || {});\n\tObject.assign(state.value, defaultState, state.value);\n\tconst handler = (event) => {\n\t\tisInside.value = true;\n\t\tif (options.pointerTypes && !options.pointerTypes.includes(event.pointerType)) return;\n\t\tstate.value = objectPick(event, keys, false);\n\t};\n\tif (target) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(target, [\n\t\t\t\"pointerdown\",\n\t\t\t\"pointermove\",\n\t\t\t\"pointerup\"\n\t\t], handler, listenerOptions);\n\t\tuseEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n\t}\n\treturn {\n\t\t...toRefs(state),\n\t\tisInside\n\t};\n}\n\n//#endregion\n//#region usePointerLock/index.ts\n/**\n* Reactive pointer lock.\n*\n* @see https://vueuse.org/usePointerLock\n* @param target\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePointerLock(target, options = {}) {\n\tconst { document: document$1 = defaultDocument } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => document$1 && \"pointerLockElement\" in document$1);\n\tconst element = shallowRef();\n\tconst triggerElement = shallowRef();\n\tlet targetElement;\n\tif (isSupported.value) {\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(document$1, \"pointerlockchange\", () => {\n\t\t\tvar _pointerLockElement;\n\t\t\tconst currentElement = (_pointerLockElement = document$1.pointerLockElement) !== null && _pointerLockElement !== void 0 ? _pointerLockElement : element.value;\n\t\t\tif (targetElement && currentElement === targetElement) {\n\t\t\t\telement.value = document$1.pointerLockElement;\n\t\t\t\tif (!element.value) targetElement = triggerElement.value = null;\n\t\t\t}\n\t\t}, listenerOptions);\n\t\tuseEventListener(document$1, \"pointerlockerror\", () => {\n\t\t\tvar _pointerLockElement2;\n\t\t\tconst currentElement = (_pointerLockElement2 = document$1.pointerLockElement) !== null && _pointerLockElement2 !== void 0 ? _pointerLockElement2 : element.value;\n\t\t\tif (targetElement && currentElement === targetElement) {\n\t\t\t\tconst action = document$1.pointerLockElement ? \"release\" : \"acquire\";\n\t\t\t\tthrow new Error(`Failed to ${action} pointer lock.`);\n\t\t\t}\n\t\t}, listenerOptions);\n\t}\n\tasync function lock(e) {\n\t\tvar _unrefElement;\n\t\tif (!isSupported.value) throw new Error(\"Pointer Lock API is not supported by your browser.\");\n\t\ttriggerElement.value = e instanceof Event ? e.currentTarget : null;\n\t\ttargetElement = e instanceof Event ? (_unrefElement = unrefElement(target)) !== null && _unrefElement !== void 0 ? _unrefElement : triggerElement.value : unrefElement(e);\n\t\tif (!targetElement) throw new Error(\"Target element undefined.\");\n\t\ttargetElement.requestPointerLock();\n\t\treturn await until(element).toBe(targetElement);\n\t}\n\tasync function unlock() {\n\t\tif (!element.value) return false;\n\t\tdocument$1.exitPointerLock();\n\t\tawait until(element).toBeNull();\n\t\treturn true;\n\t}\n\treturn {\n\t\tisSupported,\n\t\telement,\n\t\ttriggerElement,\n\t\tlock,\n\t\tunlock\n\t};\n}\n\n//#endregion\n//#region usePointerSwipe/index.ts\n/**\n* Reactive swipe detection based on PointerEvents.\n*\n* @see https://vueuse.org/usePointerSwipe\n* @param target\n* @param options\n*/\nfunction usePointerSwipe(target, options = {}) {\n\tconst targetRef = toRef(target);\n\tconst { threshold = 50, onSwipe, onSwipeEnd, onSwipeStart, disableTextSelect = false } = options;\n\tconst posStart = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst updatePosStart = (x, y) => {\n\t\tposStart.x = x;\n\t\tposStart.y = y;\n\t};\n\tconst posEnd = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst updatePosEnd = (x, y) => {\n\t\tposEnd.x = x;\n\t\tposEnd.y = y;\n\t};\n\tconst distanceX = computed(() => posStart.x - posEnd.x);\n\tconst distanceY = computed(() => posStart.y - posEnd.y);\n\tconst { max, abs } = Math;\n\tconst isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n\tconst isSwiping = shallowRef(false);\n\tconst isPointerDown = shallowRef(false);\n\tconst direction = computed(() => {\n\t\tif (!isThresholdExceeded.value) return \"none\";\n\t\tif (abs(distanceX.value) > abs(distanceY.value)) return distanceX.value > 0 ? \"left\" : \"right\";\n\t\telse return distanceY.value > 0 ? \"up\" : \"down\";\n\t});\n\tconst eventIsAllowed = (e) => {\n\t\tvar _ref, _options$pointerTypes, _options$pointerTypes2;\n\t\tconst isReleasingButton = e.buttons === 0;\n\t\tconst isPrimaryButton = e.buttons === 1;\n\t\treturn (_ref = (_options$pointerTypes = (_options$pointerTypes2 = options.pointerTypes) === null || _options$pointerTypes2 === void 0 ? void 0 : _options$pointerTypes2.includes(e.pointerType)) !== null && _options$pointerTypes !== void 0 ? _options$pointerTypes : isReleasingButton || isPrimaryButton) !== null && _ref !== void 0 ? _ref : true;\n\t};\n\tconst listenerOptions = { passive: true };\n\tconst stops = [\n\t\tuseEventListener(target, \"pointerdown\", (e) => {\n\t\t\tif (!eventIsAllowed(e)) return;\n\t\t\tisPointerDown.value = true;\n\t\t\tconst eventTarget = e.target;\n\t\t\teventTarget === null || eventTarget === void 0 || eventTarget.setPointerCapture(e.pointerId);\n\t\t\tconst { clientX: x, clientY: y } = e;\n\t\t\tupdatePosStart(x, y);\n\t\t\tupdatePosEnd(x, y);\n\t\t\tonSwipeStart === null || onSwipeStart === void 0 || onSwipeStart(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, \"pointermove\", (e) => {\n\t\t\tif (!eventIsAllowed(e)) return;\n\t\t\tif (!isPointerDown.value) return;\n\t\t\tconst { clientX: x, clientY: y } = e;\n\t\t\tupdatePosEnd(x, y);\n\t\t\tif (!isSwiping.value && isThresholdExceeded.value) isSwiping.value = true;\n\t\t\tif (isSwiping.value) onSwipe === null || onSwipe === void 0 || onSwipe(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, \"pointerup\", (e) => {\n\t\t\tif (!eventIsAllowed(e)) return;\n\t\t\tif (isSwiping.value) onSwipeEnd === null || onSwipeEnd === void 0 || onSwipeEnd(e, direction.value);\n\t\t\tisPointerDown.value = false;\n\t\t\tisSwiping.value = false;\n\t\t}, listenerOptions)\n\t];\n\ttryOnMounted(() => {\n\t\tvar _targetRef$value;\n\t\t(_targetRef$value = targetRef.value) === null || _targetRef$value === void 0 || (_targetRef$value = _targetRef$value.style) === null || _targetRef$value === void 0 || _targetRef$value.setProperty(\"touch-action\", \"pan-y\");\n\t\tif (disableTextSelect) {\n\t\t\tvar _targetRef$value2, _targetRef$value3, _targetRef$value4;\n\t\t\t(_targetRef$value2 = targetRef.value) === null || _targetRef$value2 === void 0 || (_targetRef$value2 = _targetRef$value2.style) === null || _targetRef$value2 === void 0 || _targetRef$value2.setProperty(\"-webkit-user-select\", \"none\");\n\t\t\t(_targetRef$value3 = targetRef.value) === null || _targetRef$value3 === void 0 || (_targetRef$value3 = _targetRef$value3.style) === null || _targetRef$value3 === void 0 || _targetRef$value3.setProperty(\"-ms-user-select\", \"none\");\n\t\t\t(_targetRef$value4 = targetRef.value) === null || _targetRef$value4 === void 0 || (_targetRef$value4 = _targetRef$value4.style) === null || _targetRef$value4 === void 0 || _targetRef$value4.setProperty(\"user-select\", \"none\");\n\t\t}\n\t});\n\tconst stop = () => stops.forEach((s) => s());\n\treturn {\n\t\tisSwiping: readonly(isSwiping),\n\t\tdirection: readonly(direction),\n\t\tposStart: readonly(posStart),\n\t\tposEnd: readonly(posEnd),\n\t\tdistanceX,\n\t\tdistanceY,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region usePreferredColorScheme/index.ts\n/**\n* Reactive prefers-color-scheme media query.\n*\n* @see https://vueuse.org/usePreferredColorScheme\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredColorScheme(options) {\n\tconst isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n\tconst isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n\treturn computed(() => {\n\t\tif (isDark.value) return \"dark\";\n\t\tif (isLight.value) return \"light\";\n\t\treturn \"no-preference\";\n\t});\n}\n\n//#endregion\n//#region usePreferredContrast/index.ts\n/**\n* Reactive prefers-contrast media query.\n*\n* @see https://vueuse.org/usePreferredContrast\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredContrast(options) {\n\tconst isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n\tconst isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n\tconst isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n\treturn computed(() => {\n\t\tif (isMore.value) return \"more\";\n\t\tif (isLess.value) return \"less\";\n\t\tif (isCustom.value) return \"custom\";\n\t\treturn \"no-preference\";\n\t});\n}\n\n//#endregion\n//#region usePreferredLanguages/index.ts\n/**\n* Reactive Navigator Languages.\n*\n* @see https://vueuse.org/usePreferredLanguages\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredLanguages(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tif (!window$1) return shallowRef([\"en\"]);\n\tconst navigator$1 = window$1.navigator;\n\tconst value = shallowRef(navigator$1.languages);\n\tuseEventListener(window$1, \"languagechange\", () => {\n\t\tvalue.value = navigator$1.languages;\n\t}, { passive: true });\n\treturn value;\n}\n\n//#endregion\n//#region usePreferredReducedMotion/index.ts\n/**\n* Reactive prefers-reduced-motion media query.\n*\n* @see https://vueuse.org/usePreferredReducedMotion\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredReducedMotion(options) {\n\tconst isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n\treturn computed(() => {\n\t\tif (isReduced.value) return \"reduce\";\n\t\treturn \"no-preference\";\n\t});\n}\n\n//#endregion\n//#region usePreferredReducedTransparency/index.ts\n/**\n* Reactive prefers-reduced-transparency media query.\n*\n* @see https://vueuse.org/usePreferredReducedTransparency\n* @param [options]\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction usePreferredReducedTransparency(options) {\n\tconst isReduced = useMediaQuery(\"(prefers-reduced-transparency: reduce)\", options);\n\treturn computed(() => {\n\t\tif (isReduced.value) return \"reduce\";\n\t\treturn \"no-preference\";\n\t});\n}\n\n//#endregion\n//#region usePrevious/index.ts\nfunction usePrevious(value, initialValue) {\n\tconst previous = shallowRef(initialValue);\n\twatch(toRef(value), (_, oldValue) => {\n\t\tprevious.value = oldValue;\n\t}, { flush: \"sync\" });\n\treturn readonly(previous);\n}\n\n//#endregion\n//#region useScreenSafeArea/index.ts\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\n/**\n* Reactive `env(safe-area-inset-*)`\n*\n* @see https://vueuse.org/useScreenSafeArea\n*/\nfunction useScreenSafeArea() {\n\tconst top = shallowRef(\"\");\n\tconst right = shallowRef(\"\");\n\tconst bottom = shallowRef(\"\");\n\tconst left = shallowRef(\"\");\n\tif (isClient) {\n\t\tconst topCssVar = useCssVar(topVarName);\n\t\tconst rightCssVar = useCssVar(rightVarName);\n\t\tconst bottomCssVar = useCssVar(bottomVarName);\n\t\tconst leftCssVar = useCssVar(leftVarName);\n\t\ttopCssVar.value = \"env(safe-area-inset-top, 0px)\";\n\t\trightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n\t\tbottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n\t\tleftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n\t\ttryOnMounted(update);\n\t\tuseEventListener(\"resize\", useDebounceFn(update), { passive: true });\n\t}\n\tfunction update() {\n\t\ttop.value = getValue(topVarName);\n\t\tright.value = getValue(rightVarName);\n\t\tbottom.value = getValue(bottomVarName);\n\t\tleft.value = getValue(leftVarName);\n\t}\n\treturn {\n\t\ttop,\n\t\tright,\n\t\tbottom,\n\t\tleft,\n\t\tupdate\n\t};\n}\nfunction getValue(position) {\n\treturn getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\n//#endregion\n//#region useScriptTag/index.ts\n/**\n* Async script tag loading.\n*\n* @see https://vueuse.org/useScriptTag\n* @param src\n* @param onLoaded\n* @param options\n*/\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n\tconst { immediate = true, manual = false, type = \"text/javascript\", async = true, crossOrigin, referrerPolicy, noModule, defer, document: document$1 = defaultDocument, attrs = {}, nonce = void 0 } = options;\n\tconst scriptTag = shallowRef(null);\n\tlet _promise = null;\n\t/**\n\t* Load the script specified via `src`.\n\t*\n\t* @param waitForScriptLoad Whether if the Promise should resolve once the \"load\" event is emitted by the <script> attribute, or right after appending it to the DOM.\n\t* @returns Promise<HTMLScriptElement>\n\t*/\n\tconst loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n\t\tconst resolveWithElement = (el$1) => {\n\t\t\tscriptTag.value = el$1;\n\t\t\tresolve(el$1);\n\t\t\treturn el$1;\n\t\t};\n\t\tif (!document$1) {\n\t\t\tresolve(false);\n\t\t\treturn;\n\t\t}\n\t\tlet shouldAppend = false;\n\t\tlet el = document$1.querySelector(`script[src=\"${toValue(src)}\"]`);\n\t\tif (!el) {\n\t\t\tel = document$1.createElement(\"script\");\n\t\t\tel.type = type;\n\t\t\tel.async = async;\n\t\t\tel.src = toValue(src);\n\t\t\tif (defer) el.defer = defer;\n\t\t\tif (crossOrigin) el.crossOrigin = crossOrigin;\n\t\t\tif (noModule) el.noModule = noModule;\n\t\t\tif (referrerPolicy) el.referrerPolicy = referrerPolicy;\n\t\t\tif (nonce) el.nonce = nonce;\n\t\t\tObject.entries(attrs).forEach(([name, value]) => el === null || el === void 0 ? void 0 : el.setAttribute(name, value));\n\t\t\tshouldAppend = true;\n\t\t} else if (el.hasAttribute(\"data-loaded\")) resolveWithElement(el);\n\t\tconst listenerOptions = { passive: true };\n\t\tuseEventListener(el, \"error\", (event) => reject(event), listenerOptions);\n\t\tuseEventListener(el, \"abort\", (event) => reject(event), listenerOptions);\n\t\tuseEventListener(el, \"load\", () => {\n\t\t\tel.setAttribute(\"data-loaded\", \"true\");\n\t\t\tonLoaded(el);\n\t\t\tresolveWithElement(el);\n\t\t}, listenerOptions);\n\t\tif (shouldAppend) el = document$1.head.appendChild(el);\n\t\tif (!waitForScriptLoad) resolveWithElement(el);\n\t});\n\t/**\n\t* Exposed singleton wrapper for `loadScript`, avoiding calling it twice.\n\t*\n\t* @param waitForScriptLoad Whether if the Promise should resolve once the \"load\" event is emitted by the <script> attribute, or right after appending it to the DOM.\n\t* @returns Promise<HTMLScriptElement>\n\t*/\n\tconst load = (waitForScriptLoad = true) => {\n\t\tif (!_promise) _promise = loadScript(waitForScriptLoad);\n\t\treturn _promise;\n\t};\n\t/**\n\t* Unload the script specified by `src`.\n\t*/\n\tconst unload = () => {\n\t\tif (!document$1) return;\n\t\t_promise = null;\n\t\tif (scriptTag.value) scriptTag.value = null;\n\t\tconst el = document$1.querySelector(`script[src=\"${toValue(src)}\"]`);\n\t\tif (el) document$1.head.removeChild(el);\n\t};\n\tif (immediate && !manual) tryOnMounted(load);\n\tif (!manual) tryOnUnmounted(unload);\n\treturn {\n\t\tscriptTag,\n\t\tload,\n\t\tunload\n\t};\n}\n\n//#endregion\n//#region useScrollLock/index.ts\nfunction checkOverflowScroll(ele) {\n\tconst style = window.getComputedStyle(ele);\n\tif (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) return true;\n\telse {\n\t\tconst parent = ele.parentNode;\n\t\tif (!parent || parent.tagName === \"BODY\") return false;\n\t\treturn checkOverflowScroll(parent);\n\t}\n}\nfunction preventDefault(rawEvent) {\n\tconst e = rawEvent || window.event;\n\tconst _target = e.target;\n\tif (checkOverflowScroll(_target)) return false;\n\tif (e.touches.length > 1) return true;\n\tif (e.preventDefault) e.preventDefault();\n\treturn false;\n}\nconst elInitialOverflow = /* @__PURE__ */ new WeakMap();\n/**\n* Lock scrolling of the element.\n*\n* @see https://vueuse.org/useScrollLock\n* @param element\n*/\nfunction useScrollLock(element, initialState = false) {\n\tconst isLocked = shallowRef(initialState);\n\tlet stopTouchMoveListener = null;\n\tlet initialOverflow = \"\";\n\twatch(toRef(element), (el) => {\n\t\tconst target = resolveElement(toValue(el));\n\t\tif (target) {\n\t\t\tconst ele = target;\n\t\t\tif (!elInitialOverflow.get(ele)) elInitialOverflow.set(ele, ele.style.overflow);\n\t\t\tif (ele.style.overflow !== \"hidden\") initialOverflow = ele.style.overflow;\n\t\t\tif (ele.style.overflow === \"hidden\") return isLocked.value = true;\n\t\t\tif (isLocked.value) return ele.style.overflow = \"hidden\";\n\t\t}\n\t}, { immediate: true });\n\tconst lock = () => {\n\t\tconst el = resolveElement(toValue(element));\n\t\tif (!el || isLocked.value) return;\n\t\tif (isIOS) stopTouchMoveListener = useEventListener(el, \"touchmove\", (e) => {\n\t\t\tpreventDefault(e);\n\t\t}, { passive: false });\n\t\tel.style.overflow = \"hidden\";\n\t\tisLocked.value = true;\n\t};\n\tconst unlock = () => {\n\t\tconst el = resolveElement(toValue(element));\n\t\tif (!el || !isLocked.value) return;\n\t\tif (isIOS) stopTouchMoveListener === null || stopTouchMoveListener === void 0 || stopTouchMoveListener();\n\t\tel.style.overflow = initialOverflow;\n\t\telInitialOverflow.delete(el);\n\t\tisLocked.value = false;\n\t};\n\ttryOnScopeDispose(unlock);\n\treturn computed({\n\t\tget() {\n\t\t\treturn isLocked.value;\n\t\t},\n\t\tset(v) {\n\t\t\tif (v) lock();\n\t\t\telse unlock();\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useSessionStorage/index.ts\n/**\n* Reactive SessionStorage.\n*\n* @see https://vueuse.org/useSessionStorage\n* @param key\n* @param initialValue\n* @param options\n*/\nfunction useSessionStorage(key, initialValue, options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\treturn useStorage(key, initialValue, window$1 === null || window$1 === void 0 ? void 0 : window$1.sessionStorage, options);\n}\n\n//#endregion\n//#region useShare/index.ts\n/**\n* Reactive Web Share API.\n*\n* @see https://vueuse.org/useShare\n* @param shareOptions\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useShare(shareOptions = {}, options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst _navigator = navigator$1;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => _navigator && \"canShare\" in _navigator);\n\tconst share = async (overrideOptions = {}) => {\n\t\tif (isSupported.value) {\n\t\t\tconst data = {\n\t\t\t\t...toValue(shareOptions),\n\t\t\t\t...toValue(overrideOptions)\n\t\t\t};\n\t\t\tlet granted = false;\n\t\t\tif (_navigator.canShare) granted = _navigator.canShare(data);\n\t\t\tif (granted) return _navigator.share(data);\n\t\t}\n\t};\n\treturn {\n\t\tisSupported,\n\t\tshare\n\t};\n}\n\n//#endregion\n//#region useSorted/index.ts\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n\tconst [source] = args;\n\tlet compareFn = defaultCompare;\n\tlet options = {};\n\tif (args.length === 2) if (typeof args[1] === \"object\") {\n\t\tvar _options$compareFn;\n\t\toptions = args[1];\n\t\tcompareFn = (_options$compareFn = options.compareFn) !== null && _options$compareFn !== void 0 ? _options$compareFn : defaultCompare;\n\t} else {\n\t\tvar _args$;\n\t\tcompareFn = (_args$ = args[1]) !== null && _args$ !== void 0 ? _args$ : defaultCompare;\n\t}\n\telse if (args.length > 2) {\n\t\tvar _args$2, _args$3;\n\t\tcompareFn = (_args$2 = args[1]) !== null && _args$2 !== void 0 ? _args$2 : defaultCompare;\n\t\toptions = (_args$3 = args[2]) !== null && _args$3 !== void 0 ? _args$3 : {};\n\t}\n\tconst { dirty = false, sortFn = defaultSortFn } = options;\n\tif (!dirty) return computed(() => sortFn([...toValue(source)], compareFn));\n\twatchEffect(() => {\n\t\tconst result = sortFn(toValue(source), compareFn);\n\t\tif (isRef(source)) source.value = result;\n\t\telse source.splice(0, source.length, ...result);\n\t});\n\treturn source;\n}\n\n//#endregion\n//#region useSpeechRecognition/index.ts\n/**\n* Reactive SpeechRecognition.\n*\n* @see https://vueuse.org/useSpeechRecognition\n* @see https://developer.mozilla.org/en-US/docs/Web/API/SpeechRecognition SpeechRecognition\n* @param options\n*/\nfunction useSpeechRecognition(options = {}) {\n\tconst { interimResults = true, continuous = true, maxAlternatives = 1, window: window$1 = defaultWindow } = options;\n\tconst lang = toRef(options.lang || \"en-US\");\n\tconst isListening = shallowRef(false);\n\tconst isFinal = shallowRef(false);\n\tconst result = shallowRef(\"\");\n\tconst error = shallowRef(void 0);\n\tlet recognition;\n\tconst start = () => {\n\t\tisListening.value = true;\n\t};\n\tconst stop = () => {\n\t\tisListening.value = false;\n\t};\n\tconst toggle = (value = !isListening.value) => {\n\t\tif (value) start();\n\t\telse stop();\n\t};\n\tconst SpeechRecognition = window$1 && (window$1.SpeechRecognition || window$1.webkitSpeechRecognition);\n\tconst isSupported = /* @__PURE__ */ useSupported(() => SpeechRecognition);\n\tif (isSupported.value) {\n\t\trecognition = new SpeechRecognition();\n\t\trecognition.continuous = continuous;\n\t\trecognition.interimResults = interimResults;\n\t\trecognition.lang = toValue(lang);\n\t\trecognition.maxAlternatives = maxAlternatives;\n\t\trecognition.onstart = () => {\n\t\t\tisListening.value = true;\n\t\t\tisFinal.value = false;\n\t\t};\n\t\twatch(lang, (lang$1) => {\n\t\t\tif (recognition && !isListening.value) recognition.lang = lang$1;\n\t\t});\n\t\trecognition.onresult = (event) => {\n\t\t\tconst currentResult = event.results[event.resultIndex];\n\t\t\tconst { transcript } = currentResult[0];\n\t\t\tisFinal.value = currentResult.isFinal;\n\t\t\tresult.value = transcript;\n\t\t\terror.value = void 0;\n\t\t};\n\t\trecognition.onerror = (event) => {\n\t\t\terror.value = event;\n\t\t};\n\t\trecognition.onend = () => {\n\t\t\tisListening.value = false;\n\t\t\trecognition.lang = toValue(lang);\n\t\t};\n\t\twatch(isListening, (newValue, oldValue) => {\n\t\t\tif (newValue === oldValue) return;\n\t\t\ttry {\n\t\t\t\tif (newValue) recognition.start();\n\t\t\t\telse recognition.stop();\n\t\t\t} catch (err) {\n\t\t\t\terror.value = err;\n\t\t\t}\n\t\t});\n\t}\n\ttryOnScopeDispose(() => {\n\t\tstop();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tisListening,\n\t\tisFinal,\n\t\trecognition,\n\t\tresult,\n\t\terror,\n\t\ttoggle,\n\t\tstart,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useSpeechSynthesis/index.ts\n/**\n* Reactive SpeechSynthesis.\n*\n* @see https://vueuse.org/useSpeechSynthesis\n* @see https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesis SpeechSynthesis\n*/\nfunction useSpeechSynthesis(text, options = {}) {\n\tconst { pitch = 1, rate = 1, volume = 1, window: window$1 = defaultWindow, onBoundary } = options;\n\tconst synth = window$1 && window$1.speechSynthesis;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => synth);\n\tconst isPlaying = shallowRef(false);\n\tconst status = shallowRef(\"init\");\n\tconst spokenText = toRef(text || \"\");\n\tconst lang = toRef(options.lang || \"en-US\");\n\tconst error = shallowRef(void 0);\n\tconst toggle = (value = !isPlaying.value) => {\n\t\tisPlaying.value = value;\n\t};\n\tconst bindEventsForUtterance = (utterance$1) => {\n\t\tutterance$1.lang = toValue(lang);\n\t\tutterance$1.voice = toValue(options.voice) || null;\n\t\tutterance$1.pitch = toValue(pitch);\n\t\tutterance$1.rate = toValue(rate);\n\t\tutterance$1.volume = toValue(volume);\n\t\tutterance$1.onstart = () => {\n\t\t\tisPlaying.value = true;\n\t\t\tstatus.value = \"play\";\n\t\t};\n\t\tutterance$1.onpause = () => {\n\t\t\tisPlaying.value = false;\n\t\t\tstatus.value = \"pause\";\n\t\t};\n\t\tutterance$1.onresume = () => {\n\t\t\tisPlaying.value = true;\n\t\t\tstatus.value = \"play\";\n\t\t};\n\t\tutterance$1.onend = () => {\n\t\t\tisPlaying.value = false;\n\t\t\tstatus.value = \"end\";\n\t\t};\n\t\tutterance$1.onerror = (event) => {\n\t\t\terror.value = event;\n\t\t};\n\t\tutterance$1.onboundary = (event) => {\n\t\t\tonBoundary === null || onBoundary === void 0 || onBoundary(event);\n\t\t};\n\t};\n\tconst utterance = computed(() => {\n\t\tisPlaying.value = false;\n\t\tstatus.value = \"init\";\n\t\tconst newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n\t\tbindEventsForUtterance(newUtterance);\n\t\treturn newUtterance;\n\t});\n\tconst speak = () => {\n\t\tsynth.cancel();\n\t\tif (utterance) synth.speak(utterance.value);\n\t};\n\tconst stop = () => {\n\t\tsynth.cancel();\n\t\tisPlaying.value = false;\n\t};\n\tif (isSupported.value) {\n\t\tbindEventsForUtterance(utterance.value);\n\t\twatch(lang, (lang$1) => {\n\t\t\tif (utterance.value && !isPlaying.value) utterance.value.lang = lang$1;\n\t\t});\n\t\tif (options.voice) watch(options.voice, () => {\n\t\t\tsynth.cancel();\n\t\t});\n\t\twatch(isPlaying, () => {\n\t\t\tif (isPlaying.value) synth.resume();\n\t\t\telse synth.pause();\n\t\t});\n\t}\n\ttryOnScopeDispose(() => {\n\t\tisPlaying.value = false;\n\t});\n\treturn {\n\t\tisSupported,\n\t\tisPlaying,\n\t\tstatus,\n\t\tutterance,\n\t\terror,\n\t\tstop,\n\t\ttoggle,\n\t\tspeak\n\t};\n}\n\n//#endregion\n//#region useStepper/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useStepper(steps, initialStep) {\n\tconst stepsRef = ref(steps);\n\tconst stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n\tconst index = ref(stepNames.value.indexOf(initialStep !== null && initialStep !== void 0 ? initialStep : stepNames.value[0]));\n\tconst current = computed(() => at(index.value));\n\tconst isFirst = computed(() => index.value === 0);\n\tconst isLast = computed(() => index.value === stepNames.value.length - 1);\n\tconst next = computed(() => stepNames.value[index.value + 1]);\n\tconst previous = computed(() => stepNames.value[index.value - 1]);\n\tfunction at(index$1) {\n\t\tif (Array.isArray(stepsRef.value)) return stepsRef.value[index$1];\n\t\treturn stepsRef.value[stepNames.value[index$1]];\n\t}\n\tfunction get(step) {\n\t\tif (!stepNames.value.includes(step)) return;\n\t\treturn at(stepNames.value.indexOf(step));\n\t}\n\tfunction goTo(step) {\n\t\tif (stepNames.value.includes(step)) index.value = stepNames.value.indexOf(step);\n\t}\n\tfunction goToNext() {\n\t\tif (isLast.value) return;\n\t\tindex.value++;\n\t}\n\tfunction goToPrevious() {\n\t\tif (isFirst.value) return;\n\t\tindex.value--;\n\t}\n\tfunction goBackTo(step) {\n\t\tif (isAfter(step)) goTo(step);\n\t}\n\tfunction isNext(step) {\n\t\treturn stepNames.value.indexOf(step) === index.value + 1;\n\t}\n\tfunction isPrevious(step) {\n\t\treturn stepNames.value.indexOf(step) === index.value - 1;\n\t}\n\tfunction isCurrent(step) {\n\t\treturn stepNames.value.indexOf(step) === index.value;\n\t}\n\tfunction isBefore(step) {\n\t\treturn index.value < stepNames.value.indexOf(step);\n\t}\n\tfunction isAfter(step) {\n\t\treturn index.value > stepNames.value.indexOf(step);\n\t}\n\treturn {\n\t\tsteps: stepsRef,\n\t\tstepNames,\n\t\tindex,\n\t\tcurrent,\n\t\tnext,\n\t\tprevious,\n\t\tisFirst,\n\t\tisLast,\n\t\tat,\n\t\tget,\n\t\tgoTo,\n\t\tgoToNext,\n\t\tgoToPrevious,\n\t\tgoBackTo,\n\t\tisNext,\n\t\tisPrevious,\n\t\tisCurrent,\n\t\tisBefore,\n\t\tisAfter\n\t};\n}\n\n//#endregion\n//#region useStorageAsync/index.ts\n/**\n* Reactive Storage in with async support.\n*\n* @see https://vueuse.org/useStorageAsync\n* @param key\n* @param initialValue\n* @param storage\n* @param options\n*/\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n\tvar _options$serializer;\n\tconst { flush = \"pre\", deep = true, listenToStorageChanges = true, writeDefaults = true, mergeDefaults = false, shallow, window: window$1 = defaultWindow, eventFilter, onError = (e) => {\n\t\tconsole.error(e);\n\t}, onReady } = options;\n\tconst rawInit = toValue(initialValue);\n\tconst type = guessSerializerType(rawInit);\n\tconst data = (shallow ? shallowRef : ref)(toValue(initialValue));\n\tconst serializer = (_options$serializer = options.serializer) !== null && _options$serializer !== void 0 ? _options$serializer : StorageSerializers[type];\n\tif (!storage) try {\n\t\tstorage = getSSRHandler(\"getDefaultStorageAsync\", () => defaultWindow === null || defaultWindow === void 0 ? void 0 : defaultWindow.localStorage)();\n\t} catch (e) {\n\t\tonError(e);\n\t}\n\tasync function read(event) {\n\t\tif (!storage || event && event.key !== key) return;\n\t\ttry {\n\t\t\tconst rawValue = event ? event.newValue : await storage.getItem(key);\n\t\t\tif (rawValue == null) {\n\t\t\t\tdata.value = rawInit;\n\t\t\t\tif (writeDefaults && rawInit !== null) await storage.setItem(key, await serializer.write(rawInit));\n\t\t\t} else if (mergeDefaults) {\n\t\t\t\tconst value = await serializer.read(rawValue);\n\t\t\t\tif (typeof mergeDefaults === \"function\") data.value = mergeDefaults(value, rawInit);\n\t\t\t\telse if (type === \"object\" && !Array.isArray(value)) data.value = {\n\t\t\t\t\t...rawInit,\n\t\t\t\t\t...value\n\t\t\t\t};\n\t\t\t\telse data.value = value;\n\t\t\t} else data.value = await serializer.read(rawValue);\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t}\n\tconst promise = new Promise((resolve) => {\n\t\tread().then(() => {\n\t\t\tonReady === null || onReady === void 0 || onReady(data.value);\n\t\t\tresolve(data);\n\t\t});\n\t});\n\tif (window$1 && listenToStorageChanges) useEventListener(window$1, \"storage\", (e) => Promise.resolve().then(() => read(e)), { passive: true });\n\tif (storage) watchWithFilter(data, async () => {\n\t\ttry {\n\t\t\tif (data.value == null) await storage.removeItem(key);\n\t\t\telse await storage.setItem(key, await serializer.write(data.value));\n\t\t} catch (e) {\n\t\t\tonError(e);\n\t\t}\n\t}, {\n\t\tflush,\n\t\tdeep,\n\t\teventFilter\n\t});\n\tObject.assign(data, {\n\t\tthen: promise.then.bind(promise),\n\t\tcatch: promise.catch.bind(promise)\n\t});\n\treturn data;\n}\n\n//#endregion\n//#region useStyleTag/index.ts\nlet _id = 0;\n/**\n* Inject <style> element in head.\n*\n* Overload: Omitted id\n*\n* @see https://vueuse.org/useStyleTag\n* @param css\n* @param options\n*/\nfunction useStyleTag(css, options = {}) {\n\tconst isLoaded = shallowRef(false);\n\tconst { document: document$1 = defaultDocument, immediate = true, manual = false, id = `vueuse_styletag_${++_id}` } = options;\n\tconst cssRef = shallowRef(css);\n\tlet stop = () => {};\n\tconst load = () => {\n\t\tif (!document$1) return;\n\t\tconst el = document$1.getElementById(id) || document$1.createElement(\"style\");\n\t\tif (!el.isConnected) {\n\t\t\tel.id = id;\n\t\t\tif (options.nonce) el.nonce = options.nonce;\n\t\t\tif (options.media) el.media = options.media;\n\t\t\tdocument$1.head.appendChild(el);\n\t\t}\n\t\tif (isLoaded.value) return;\n\t\tstop = watch(cssRef, (value) => {\n\t\t\tel.textContent = value;\n\t\t}, { immediate: true });\n\t\tisLoaded.value = true;\n\t};\n\tconst unload = () => {\n\t\tif (!document$1 || !isLoaded.value) return;\n\t\tstop();\n\t\tdocument$1.head.removeChild(document$1.getElementById(id));\n\t\tisLoaded.value = false;\n\t};\n\tif (immediate && !manual) tryOnMounted(load);\n\tif (!manual) tryOnScopeDispose(unload);\n\treturn {\n\t\tid,\n\t\tcss: cssRef,\n\t\tunload,\n\t\tload,\n\t\tisLoaded: readonly(isLoaded)\n\t};\n}\n\n//#endregion\n//#region useSwipe/index.ts\n/**\n* Reactive swipe detection.\n*\n* @see https://vueuse.org/useSwipe\n* @param target\n* @param options\n*/\nfunction useSwipe(target, options = {}) {\n\tconst { threshold = 50, onSwipe, onSwipeEnd, onSwipeStart, passive = true } = options;\n\tconst coordsStart = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst coordsEnd = reactive({\n\t\tx: 0,\n\t\ty: 0\n\t});\n\tconst diffX = computed(() => coordsStart.x - coordsEnd.x);\n\tconst diffY = computed(() => coordsStart.y - coordsEnd.y);\n\tconst { max, abs } = Math;\n\tconst isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n\tconst isSwiping = shallowRef(false);\n\tconst direction = computed(() => {\n\t\tif (!isThresholdExceeded.value) return \"none\";\n\t\tif (abs(diffX.value) > abs(diffY.value)) return diffX.value > 0 ? \"left\" : \"right\";\n\t\telse return diffY.value > 0 ? \"up\" : \"down\";\n\t});\n\tconst getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n\tconst updateCoordsStart = (x, y) => {\n\t\tcoordsStart.x = x;\n\t\tcoordsStart.y = y;\n\t};\n\tconst updateCoordsEnd = (x, y) => {\n\t\tcoordsEnd.x = x;\n\t\tcoordsEnd.y = y;\n\t};\n\tconst listenerOptions = {\n\t\tpassive,\n\t\tcapture: !passive\n\t};\n\tconst onTouchEnd = (e) => {\n\t\tif (isSwiping.value) onSwipeEnd === null || onSwipeEnd === void 0 || onSwipeEnd(e, direction.value);\n\t\tisSwiping.value = false;\n\t};\n\tconst stops = [\n\t\tuseEventListener(target, \"touchstart\", (e) => {\n\t\t\tif (e.touches.length !== 1) return;\n\t\t\tconst [x, y] = getTouchEventCoords(e);\n\t\t\tupdateCoordsStart(x, y);\n\t\t\tupdateCoordsEnd(x, y);\n\t\t\tonSwipeStart === null || onSwipeStart === void 0 || onSwipeStart(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, \"touchmove\", (e) => {\n\t\t\tif (e.touches.length !== 1) return;\n\t\t\tconst [x, y] = getTouchEventCoords(e);\n\t\t\tupdateCoordsEnd(x, y);\n\t\t\tif (listenerOptions.capture && !listenerOptions.passive && Math.abs(diffX.value) > Math.abs(diffY.value)) e.preventDefault();\n\t\t\tif (!isSwiping.value && isThresholdExceeded.value) isSwiping.value = true;\n\t\t\tif (isSwiping.value) onSwipe === null || onSwipe === void 0 || onSwipe(e);\n\t\t}, listenerOptions),\n\t\tuseEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n\t];\n\tconst stop = () => stops.forEach((s) => s());\n\treturn {\n\t\tisSwiping,\n\t\tdirection,\n\t\tcoordsStart,\n\t\tcoordsEnd,\n\t\tlengthX: diffX,\n\t\tlengthY: diffY,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useTemplateRefsList/index.ts\n/* @__NO_SIDE_EFFECTS__ */\nfunction useTemplateRefsList() {\n\tconst refs = ref([]);\n\trefs.value.set = (el) => {\n\t\tif (el) refs.value.push(el);\n\t};\n\tonBeforeUpdate(() => {\n\t\trefs.value.length = 0;\n\t});\n\treturn refs;\n}\n\n//#endregion\n//#region useTextDirection/index.ts\n/**\n* Reactive dir of the element's text.\n*\n* @see https://vueuse.org/useTextDirection\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useTextDirection(options = {}) {\n\tconst { document: document$1 = defaultDocument, selector = \"html\", observe = false, initialValue = \"ltr\" } = options;\n\tfunction getValue$1() {\n\t\tvar _ref, _document$querySelect;\n\t\treturn (_ref = document$1 === null || document$1 === void 0 || (_document$querySelect = document$1.querySelector(selector)) === null || _document$querySelect === void 0 ? void 0 : _document$querySelect.getAttribute(\"dir\")) !== null && _ref !== void 0 ? _ref : initialValue;\n\t}\n\tconst dir = ref(getValue$1());\n\ttryOnMounted(() => dir.value = getValue$1());\n\tif (observe && document$1) useMutationObserver(document$1.querySelector(selector), () => dir.value = getValue$1(), { attributes: true });\n\treturn computed({\n\t\tget() {\n\t\t\treturn dir.value;\n\t\t},\n\t\tset(v) {\n\t\t\tvar _document$querySelect2, _document$querySelect3;\n\t\t\tdir.value = v;\n\t\t\tif (!document$1) return;\n\t\t\tif (dir.value) (_document$querySelect2 = document$1.querySelector(selector)) === null || _document$querySelect2 === void 0 || _document$querySelect2.setAttribute(\"dir\", dir.value);\n\t\t\telse (_document$querySelect3 = document$1.querySelector(selector)) === null || _document$querySelect3 === void 0 || _document$querySelect3.removeAttribute(\"dir\");\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useTextSelection/index.ts\nfunction getRangesFromSelection(selection) {\n\tvar _selection$rangeCount;\n\tconst rangeCount = (_selection$rangeCount = selection.rangeCount) !== null && _selection$rangeCount !== void 0 ? _selection$rangeCount : 0;\n\treturn Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\n/**\n* Reactively track user text selection based on [`Window.getSelection`](https://developer.mozilla.org/en-US/docs/Web/API/Window/getSelection).\n*\n* @see https://vueuse.org/useTextSelection\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useTextSelection(options = {}) {\n\tvar _window$getSelection;\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst selection = shallowRef((_window$getSelection = window$1 === null || window$1 === void 0 ? void 0 : window$1.getSelection()) !== null && _window$getSelection !== void 0 ? _window$getSelection : null);\n\tconst text = computed(() => {\n\t\tvar _selection$value$toSt, _selection$value;\n\t\treturn (_selection$value$toSt = (_selection$value = selection.value) === null || _selection$value === void 0 ? void 0 : _selection$value.toString()) !== null && _selection$value$toSt !== void 0 ? _selection$value$toSt : \"\";\n\t});\n\tconst ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n\tconst rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n\tfunction onSelectionChange() {\n\t\tselection.value = null;\n\t\tif (window$1) selection.value = window$1.getSelection();\n\t}\n\tif (window$1) useEventListener(window$1.document, \"selectionchange\", onSelectionChange, { passive: true });\n\treturn {\n\t\ttext,\n\t\trects,\n\t\tranges,\n\t\tselection\n\t};\n}\n\n//#endregion\n//#region useTextareaAutosize/index.ts\n/**\n* Call window.requestAnimationFrame(), if not available, just call the function\n*\n* @param window\n* @param fn\n*/\nfunction tryRequestAnimationFrame(window$1 = defaultWindow, fn) {\n\tif (window$1 && typeof window$1.requestAnimationFrame === \"function\") window$1.requestAnimationFrame(fn);\n\telse fn();\n}\nfunction useTextareaAutosize(options = {}) {\n\tvar _options$input, _options$styleProp;\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst textarea = toRef(options === null || options === void 0 ? void 0 : options.element);\n\tconst input = toRef((_options$input = options === null || options === void 0 ? void 0 : options.input) !== null && _options$input !== void 0 ? _options$input : \"\");\n\tconst styleProp = (_options$styleProp = options === null || options === void 0 ? void 0 : options.styleProp) !== null && _options$styleProp !== void 0 ? _options$styleProp : \"height\";\n\tconst textareaScrollHeight = shallowRef(1);\n\tconst textareaOldWidth = shallowRef(0);\n\tfunction triggerResize() {\n\t\tvar _textarea$value;\n\t\tif (!textarea.value) return;\n\t\tlet height = \"\";\n\t\ttextarea.value.style[styleProp] = \"1px\";\n\t\ttextareaScrollHeight.value = (_textarea$value = textarea.value) === null || _textarea$value === void 0 ? void 0 : _textarea$value.scrollHeight;\n\t\tconst _styleTarget = toValue(options === null || options === void 0 ? void 0 : options.styleTarget);\n\t\tif (_styleTarget) _styleTarget.style[styleProp] = `${textareaScrollHeight.value}px`;\n\t\telse height = `${textareaScrollHeight.value}px`;\n\t\ttextarea.value.style[styleProp] = height;\n\t}\n\twatch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n\twatch(textareaScrollHeight, () => {\n\t\tvar _options$onResize;\n\t\treturn options === null || options === void 0 || (_options$onResize = options.onResize) === null || _options$onResize === void 0 ? void 0 : _options$onResize.call(options);\n\t});\n\tuseResizeObserver(textarea, ([{ contentRect }]) => {\n\t\tif (textareaOldWidth.value === contentRect.width) return;\n\t\ttryRequestAnimationFrame(window$1, () => {\n\t\t\ttextareaOldWidth.value = contentRect.width;\n\t\t\ttriggerResize();\n\t\t});\n\t});\n\tif (options === null || options === void 0 ? void 0 : options.watch) watch(options.watch, triggerResize, {\n\t\timmediate: true,\n\t\tdeep: true\n\t});\n\treturn {\n\t\ttextarea,\n\t\tinput,\n\t\ttriggerResize\n\t};\n}\n\n//#endregion\n//#region useThrottledRefHistory/index.ts\n/**\n* Shorthand for [useRefHistory](https://vueuse.org/useRefHistory) with throttled filter.\n*\n* @see https://vueuse.org/useThrottledRefHistory\n* @param source\n* @param options\n*/\nfunction useThrottledRefHistory(source, options = {}) {\n\tconst { throttle = 200, trailing = true } = options;\n\tconst filter = throttleFilter(throttle, trailing);\n\treturn { ...useRefHistory(source, {\n\t\t...options,\n\t\teventFilter: filter\n\t}) };\n}\n\n//#endregion\n//#region useTimeAgo/index.ts\nconst DEFAULT_UNITS = [\n\t{\n\t\tmax: 6e4,\n\t\tvalue: 1e3,\n\t\tname: \"second\"\n\t},\n\t{\n\t\tmax: 276e4,\n\t\tvalue: 6e4,\n\t\tname: \"minute\"\n\t},\n\t{\n\t\tmax: 72e6,\n\t\tvalue: 36e5,\n\t\tname: \"hour\"\n\t},\n\t{\n\t\tmax: 5184e5,\n\t\tvalue: 864e5,\n\t\tname: \"day\"\n\t},\n\t{\n\t\tmax: 24192e5,\n\t\tvalue: 6048e5,\n\t\tname: \"week\"\n\t},\n\t{\n\t\tmax: 28512e6,\n\t\tvalue: 2592e6,\n\t\tname: \"month\"\n\t},\n\t{\n\t\tmax: Number.POSITIVE_INFINITY,\n\t\tvalue: 31536e6,\n\t\tname: \"year\"\n\t}\n];\nconst DEFAULT_MESSAGES = {\n\tjustNow: \"just now\",\n\tpast: (n) => n.match(/\\d/) ? `${n} ago` : n,\n\tfuture: (n) => n.match(/\\d/) ? `in ${n}` : n,\n\tmonth: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n\tyear: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n\tday: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n\tweek: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n\thour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n\tminute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n\tsecond: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n\tinvalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n\treturn date.toISOString().slice(0, 10);\n}\n/**\n* Reactive time ago formatter.\n*\n* @see https://vueuse.org/useTimeAgo\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useTimeAgo(time, options = {}) {\n\tconst { controls: exposeControls = false, updateInterval = 3e4 } = options;\n\tconst { now,...controls } = useNow({\n\t\tinterval: updateInterval,\n\t\tcontrols: true\n\t});\n\tconst timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n\tif (exposeControls) return {\n\t\ttimeAgo,\n\t\t...controls\n\t};\n\telse return timeAgo;\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n\tconst { max, messages = DEFAULT_MESSAGES, fullDateFormatter = DEFAULT_FORMATTER, units = DEFAULT_UNITS, showSecond = false, rounding = \"round\" } = options;\n\tconst roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n\tconst diff = +now - +from;\n\tconst absDiff = Math.abs(diff);\n\tfunction getValue$1(diff$1, unit) {\n\t\treturn roundFn(Math.abs(diff$1) / unit.value);\n\t}\n\tfunction format(diff$1, unit) {\n\t\tconst val = getValue$1(diff$1, unit);\n\t\tconst past = diff$1 > 0;\n\t\tconst str = applyFormat(unit.name, val, past);\n\t\treturn applyFormat(past ? \"past\" : \"future\", str, past);\n\t}\n\tfunction applyFormat(name, val, isPast) {\n\t\tconst formatter = messages[name];\n\t\tif (typeof formatter === \"function\") return formatter(val, isPast);\n\t\treturn formatter.replace(\"{0}\", val.toString());\n\t}\n\tif (absDiff < 6e4 && !showSecond) return messages.justNow;\n\tif (typeof max === \"number\" && absDiff > max) return fullDateFormatter(new Date(from));\n\tif (typeof max === \"string\") {\n\t\tvar _units$find;\n\t\tconst unitMax = (_units$find = units.find((i) => i.name === max)) === null || _units$find === void 0 ? void 0 : _units$find.max;\n\t\tif (unitMax && absDiff > unitMax) return fullDateFormatter(new Date(from));\n\t}\n\tfor (const [idx, unit] of units.entries()) {\n\t\tif (getValue$1(diff, unit) <= 0 && units[idx - 1]) return format(diff, units[idx - 1]);\n\t\tif (absDiff < unit.max) return format(diff, unit);\n\t}\n\treturn messages.invalid;\n}\n\n//#endregion\n//#region useTimeAgoIntl/index.ts\nconst UNITS = [\n\t{\n\t\tname: \"year\",\n\t\tms: 31536e6\n\t},\n\t{\n\t\tname: \"month\",\n\t\tms: 2592e6\n\t},\n\t{\n\t\tname: \"week\",\n\t\tms: 6048e5\n\t},\n\t{\n\t\tname: \"day\",\n\t\tms: 864e5\n\t},\n\t{\n\t\tname: \"hour\",\n\t\tms: 36e5\n\t},\n\t{\n\t\tname: \"minute\",\n\t\tms: 6e4\n\t},\n\t{\n\t\tname: \"second\",\n\t\tms: 1e3\n\t}\n];\nfunction useTimeAgoIntl(time, options = {}) {\n\tconst { controls: exposeControls = false, updateInterval = 3e4 } = options;\n\tconst { now,...controls } = useNow({\n\t\tinterval: updateInterval,\n\t\tcontrols: true\n\t});\n\tconst result = computed(() => getTimeAgoIntlResult(new Date(toValue(time)), options, toValue(now)));\n\tconst parts = computed(() => result.value.parts);\n\tconst timeAgoIntl = computed(() => formatTimeAgoIntlParts(parts.value, {\n\t\t...options,\n\t\tlocale: result.value.resolvedLocale\n\t}));\n\treturn exposeControls ? {\n\t\ttimeAgoIntl,\n\t\tparts,\n\t\t...controls\n\t} : timeAgoIntl;\n}\n/**\n* Non-reactive version of useTimeAgoIntl\n*/\nfunction formatTimeAgoIntl(from, options = {}, now = Date.now()) {\n\tconst { parts, resolvedLocale } = getTimeAgoIntlResult(from, options, now);\n\treturn formatTimeAgoIntlParts(parts, {\n\t\t...options,\n\t\tlocale: resolvedLocale\n\t});\n}\n/**\n* Get parts from `Intl.RelativeTimeFormat.formatToParts`.\n*/\nfunction getTimeAgoIntlResult(from, options = {}, now = Date.now()) {\n\tvar _options$units;\n\tconst { locale, relativeTimeFormatOptions = { numeric: \"auto\" } } = options;\n\tconst rtf = new Intl.RelativeTimeFormat(locale, relativeTimeFormatOptions);\n\tconst { locale: resolvedLocale } = rtf.resolvedOptions();\n\tconst diff = +from - +now;\n\tconst absDiff = Math.abs(diff);\n\tconst units = (_options$units = options.units) !== null && _options$units !== void 0 ? _options$units : UNITS;\n\tfor (const { name, ms } of units) if (absDiff >= ms) return {\n\t\tresolvedLocale,\n\t\tparts: rtf.formatToParts(Math.round(diff / ms), name)\n\t};\n\treturn {\n\t\tresolvedLocale,\n\t\tparts: rtf.formatToParts(0, units[units.length - 1].name)\n\t};\n}\n/**\n* Format parts into a string\n*/\nfunction formatTimeAgoIntlParts(parts, options = {}) {\n\tconst { insertSpace = true, joinParts, locale } = options;\n\tif (typeof joinParts === \"function\") return joinParts(parts, locale);\n\tif (!insertSpace) return parts.map((part) => part.value).join(\"\");\n\treturn parts.map((part) => part.value.trim()).join(\" \");\n}\n\n//#endregion\n//#region useTimeoutPoll/index.ts\nfunction useTimeoutPoll(fn, interval, options = {}) {\n\tconst { immediate = true, immediateCallback = false } = options;\n\tconst { start } = useTimeoutFn(loop, interval, { immediate });\n\tconst isActive = shallowRef(false);\n\tasync function loop() {\n\t\tif (!isActive.value) return;\n\t\tawait fn();\n\t\tstart();\n\t}\n\tfunction resume() {\n\t\tif (!isActive.value) {\n\t\t\tisActive.value = true;\n\t\t\tif (immediateCallback) fn();\n\t\t\tstart();\n\t\t}\n\t}\n\tfunction pause() {\n\t\tisActive.value = false;\n\t}\n\tif (immediate && isClient) resume();\n\ttryOnScopeDispose(pause);\n\treturn {\n\t\tisActive,\n\t\tpause,\n\t\tresume\n\t};\n}\n\n//#endregion\n//#region useTimestamp/index.ts\nfunction useTimestamp(options = {}) {\n\tconst { controls: exposeControls = false, offset = 0, immediate = true, interval = \"requestAnimationFrame\", callback } = options;\n\tconst ts = shallowRef(timestamp() + offset);\n\tconst update = () => ts.value = timestamp() + offset;\n\tconst cb = callback ? () => {\n\t\tupdate();\n\t\tcallback(ts.value);\n\t} : update;\n\tconst controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n\tif (exposeControls) return {\n\t\ttimestamp: ts,\n\t\t...controls\n\t};\n\telse return ts;\n}\n\n//#endregion\n//#region useTitle/index.ts\nfunction useTitle(newTitle = null, options = {}) {\n\tvar _document$title, _ref;\n\tconst { document: document$1 = defaultDocument, restoreOnUnmount = (t) => t } = options;\n\tconst originalTitle = (_document$title = document$1 === null || document$1 === void 0 ? void 0 : document$1.title) !== null && _document$title !== void 0 ? _document$title : \"\";\n\tconst title = toRef((_ref = newTitle !== null && newTitle !== void 0 ? newTitle : document$1 === null || document$1 === void 0 ? void 0 : document$1.title) !== null && _ref !== void 0 ? _ref : null);\n\tconst isReadonly$1 = !!(newTitle && typeof newTitle === \"function\");\n\tfunction format(t) {\n\t\tif (!(\"titleTemplate\" in options)) return t;\n\t\tconst template = options.titleTemplate || \"%s\";\n\t\treturn typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n\t}\n\twatch(title, (newValue, oldValue) => {\n\t\tif (newValue !== oldValue && document$1) document$1.title = format(newValue !== null && newValue !== void 0 ? newValue : \"\");\n\t}, { immediate: true });\n\tif (options.observe && !options.titleTemplate && document$1 && !isReadonly$1) {\n\t\tvar _document$head;\n\t\tuseMutationObserver((_document$head = document$1.head) === null || _document$head === void 0 ? void 0 : _document$head.querySelector(\"title\"), () => {\n\t\t\tif (document$1 && document$1.title !== title.value) title.value = format(document$1.title);\n\t\t}, { childList: true });\n\t}\n\ttryOnScopeDispose(() => {\n\t\tif (restoreOnUnmount) {\n\t\t\tconst restoredTitle = restoreOnUnmount(originalTitle, title.value || \"\");\n\t\t\tif (restoredTitle != null && document$1) document$1.title = restoredTitle;\n\t\t}\n\t});\n\treturn title;\n}\n\n//#endregion\n//#region useTransition/index.ts\nconst _TransitionPresets = {\n\teaseInSine: [\n\t\t.12,\n\t\t0,\n\t\t.39,\n\t\t0\n\t],\n\teaseOutSine: [\n\t\t.61,\n\t\t1,\n\t\t.88,\n\t\t1\n\t],\n\teaseInOutSine: [\n\t\t.37,\n\t\t0,\n\t\t.63,\n\t\t1\n\t],\n\teaseInQuad: [\n\t\t.11,\n\t\t0,\n\t\t.5,\n\t\t0\n\t],\n\teaseOutQuad: [\n\t\t.5,\n\t\t1,\n\t\t.89,\n\t\t1\n\t],\n\teaseInOutQuad: [\n\t\t.45,\n\t\t0,\n\t\t.55,\n\t\t1\n\t],\n\teaseInCubic: [\n\t\t.32,\n\t\t0,\n\t\t.67,\n\t\t0\n\t],\n\teaseOutCubic: [\n\t\t.33,\n\t\t1,\n\t\t.68,\n\t\t1\n\t],\n\teaseInOutCubic: [\n\t\t.65,\n\t\t0,\n\t\t.35,\n\t\t1\n\t],\n\teaseInQuart: [\n\t\t.5,\n\t\t0,\n\t\t.75,\n\t\t0\n\t],\n\teaseOutQuart: [\n\t\t.25,\n\t\t1,\n\t\t.5,\n\t\t1\n\t],\n\teaseInOutQuart: [\n\t\t.76,\n\t\t0,\n\t\t.24,\n\t\t1\n\t],\n\teaseInQuint: [\n\t\t.64,\n\t\t0,\n\t\t.78,\n\t\t0\n\t],\n\teaseOutQuint: [\n\t\t.22,\n\t\t1,\n\t\t.36,\n\t\t1\n\t],\n\teaseInOutQuint: [\n\t\t.83,\n\t\t0,\n\t\t.17,\n\t\t1\n\t],\n\teaseInExpo: [\n\t\t.7,\n\t\t0,\n\t\t.84,\n\t\t0\n\t],\n\teaseOutExpo: [\n\t\t.16,\n\t\t1,\n\t\t.3,\n\t\t1\n\t],\n\teaseInOutExpo: [\n\t\t.87,\n\t\t0,\n\t\t.13,\n\t\t1\n\t],\n\teaseInCirc: [\n\t\t.55,\n\t\t0,\n\t\t1,\n\t\t.45\n\t],\n\teaseOutCirc: [\n\t\t0,\n\t\t.55,\n\t\t.45,\n\t\t1\n\t],\n\teaseInOutCirc: [\n\t\t.85,\n\t\t0,\n\t\t.15,\n\t\t1\n\t],\n\teaseInBack: [\n\t\t.36,\n\t\t0,\n\t\t.66,\n\t\t-.56\n\t],\n\teaseOutBack: [\n\t\t.34,\n\t\t1.56,\n\t\t.64,\n\t\t1\n\t],\n\teaseInOutBack: [\n\t\t.68,\n\t\t-.6,\n\t\t.32,\n\t\t1.6\n\t]\n};\n/**\n* Common transitions\n*\n* @see https://easings.net\n*/\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\n/**\n* Create an easing function from cubic bezier points.\n*/\nfunction createEasingFunction([p0, p1, p2, p3]) {\n\tconst a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n\tconst b = (a1, a2) => 3 * a2 - 6 * a1;\n\tconst c = (a1) => 3 * a1;\n\tconst calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n\tconst getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n\tconst getTforX = (x) => {\n\t\tlet aGuessT = x;\n\t\tfor (let i = 0; i < 4; ++i) {\n\t\t\tconst currentSlope = getSlope(aGuessT, p0, p2);\n\t\t\tif (currentSlope === 0) return aGuessT;\n\t\t\tconst currentX = calcBezier(aGuessT, p0, p2) - x;\n\t\t\taGuessT -= currentX / currentSlope;\n\t\t}\n\t\treturn aGuessT;\n\t};\n\treturn (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n\treturn a + alpha * (b - a);\n}\nfunction defaultInterpolation(a, b, t) {\n\tconst aVal = toValue(a);\n\tconst bVal = toValue(b);\n\tif (typeof aVal === \"number\" && typeof bVal === \"number\") return lerp(aVal, bVal, t);\n\tif (Array.isArray(aVal) && Array.isArray(bVal)) return aVal.map((v, i) => lerp(v, toValue(bVal[i]), t));\n\tthrow new TypeError(\"Unknown transition type, specify an interpolation function.\");\n}\nfunction normalizeEasing(easing) {\n\tvar _toValue;\n\treturn typeof easing === \"function\" ? easing : (_toValue = toValue(easing)) !== null && _toValue !== void 0 ? _toValue : identity;\n}\n/**\n* Transition from one value to another.\n*\n* @param source\n* @param from\n* @param to\n* @param options\n*/\nfunction transition(source, from, to, options = {}) {\n\tvar _toValue2;\n\tconst { window: window$1 = defaultWindow } = options;\n\tconst fromVal = toValue(from);\n\tconst toVal = toValue(to);\n\tconst duration = (_toValue2 = toValue(options.duration)) !== null && _toValue2 !== void 0 ? _toValue2 : 1e3;\n\tconst startedAt = Date.now();\n\tconst endAt = Date.now() + duration;\n\tconst interpolation = typeof options.interpolation === \"function\" ? options.interpolation : defaultInterpolation;\n\tconst trans = typeof options.easing !== \"undefined\" ? normalizeEasing(options.easing) : normalizeEasing(options.transition);\n\tconst ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n\treturn new Promise((resolve) => {\n\t\tsource.value = fromVal;\n\t\tconst tick = () => {\n\t\t\tvar _options$abort;\n\t\t\tif ((_options$abort = options.abort) === null || _options$abort === void 0 ? void 0 : _options$abort.call(options)) {\n\t\t\t\tresolve();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst now = Date.now();\n\t\t\tsource.value = interpolation(fromVal, toVal, ease((now - startedAt) / duration));\n\t\t\tif (now < endAt) window$1 === null || window$1 === void 0 || window$1.requestAnimationFrame(tick);\n\t\t\telse {\n\t\t\t\tsource.value = toVal;\n\t\t\t\tresolve();\n\t\t\t}\n\t\t};\n\t\ttick();\n\t});\n}\n/**\n* Transition from one value to another.\n* @deprecated The `executeTransition` function is deprecated, use `transition` instead.\n*\n* @param source\n* @param from\n* @param to\n* @param options\n*/\nfunction executeTransition(source, from, to, options = {}) {\n\treturn transition(source, from, to, options);\n}\n/**\n* Follow value with a transition.\n*\n* @see https://vueuse.org/useTransition\n* @param source\n* @param options\n*/\nfunction useTransition(source, options = {}) {\n\tlet currentId = 0;\n\tconst sourceVal = () => {\n\t\tconst v = toValue(source);\n\t\treturn typeof options.interpolation === \"undefined\" && Array.isArray(v) ? v.map(toValue) : v;\n\t};\n\tconst outputRef = shallowRef(sourceVal());\n\twatch(sourceVal, async (to) => {\n\t\tvar _options$onStarted, _options$onFinished;\n\t\tif (toValue(options.disabled)) return;\n\t\tconst id = ++currentId;\n\t\tif (options.delay) await promiseTimeout(toValue(options.delay));\n\t\tif (id !== currentId) return;\n\t\t(_options$onStarted = options.onStarted) === null || _options$onStarted === void 0 || _options$onStarted.call(options);\n\t\tawait transition(outputRef, outputRef.value, to, {\n\t\t\t...options,\n\t\t\tabort: () => {\n\t\t\t\tvar _options$abort2;\n\t\t\t\treturn id !== currentId || ((_options$abort2 = options.abort) === null || _options$abort2 === void 0 ? void 0 : _options$abort2.call(options));\n\t\t\t}\n\t\t});\n\t\t(_options$onFinished = options.onFinished) === null || _options$onFinished === void 0 || _options$onFinished.call(options);\n\t}, { deep: true });\n\twatch(() => toValue(options.disabled), (disabled) => {\n\t\tif (disabled) {\n\t\t\tcurrentId++;\n\t\t\toutputRef.value = sourceVal();\n\t\t}\n\t});\n\ttryOnScopeDispose(() => {\n\t\tcurrentId++;\n\t});\n\treturn computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\n//#endregion\n//#region useUrlSearchParams/index.ts\n/**\n* Reactive URLSearchParams\n*\n* @see https://vueuse.org/useUrlSearchParams\n* @param mode\n* @param options\n*/\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n\tconst { initialValue = {}, removeNullishValues = true, removeFalsyValues = false, write: enableWrite = true, writeMode = \"replace\", window: window$1 = defaultWindow, stringify = (params) => params.toString() } = options;\n\tif (!window$1) return reactive(initialValue);\n\tconst state = reactive({});\n\tfunction getRawParams() {\n\t\tif (mode === \"history\") return window$1.location.search || \"\";\n\t\telse if (mode === \"hash\") {\n\t\t\tconst hash = window$1.location.hash || \"\";\n\t\t\tconst index = hash.indexOf(\"?\");\n\t\t\treturn index > 0 ? hash.slice(index) : \"\";\n\t\t} else return (window$1.location.hash || \"\").replace(/^#/, \"\");\n\t}\n\tfunction constructQuery(params) {\n\t\tconst stringified = stringify(params);\n\t\tif (mode === \"history\") return `${stringified ? `?${stringified}` : \"\"}${window$1.location.hash || \"\"}`;\n\t\tif (mode === \"hash-params\") return `${window$1.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n\t\tconst hash = window$1.location.hash || \"#\";\n\t\tconst index = hash.indexOf(\"?\");\n\t\tif (index > 0) return `${window$1.location.search || \"\"}${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n\t\treturn `${window$1.location.search || \"\"}${hash}${stringified ? `?${stringified}` : \"\"}`;\n\t}\n\tfunction read() {\n\t\treturn new URLSearchParams(getRawParams());\n\t}\n\tfunction updateState(params) {\n\t\tconst unusedKeys = new Set(Object.keys(state));\n\t\tfor (const key of params.keys()) {\n\t\t\tconst paramsForKey = params.getAll(key);\n\t\t\tstate[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n\t\t\tunusedKeys.delete(key);\n\t\t}\n\t\tArray.from(unusedKeys).forEach((key) => delete state[key]);\n\t}\n\tconst { pause, resume } = pausableWatch(state, () => {\n\t\tconst params = new URLSearchParams(\"\");\n\t\tObject.keys(state).forEach((key) => {\n\t\t\tconst mapEntry = state[key];\n\t\t\tif (Array.isArray(mapEntry)) mapEntry.forEach((value) => params.append(key, value));\n\t\t\telse if (removeNullishValues && mapEntry == null) params.delete(key);\n\t\t\telse if (removeFalsyValues && !mapEntry) params.delete(key);\n\t\t\telse params.set(key, mapEntry);\n\t\t});\n\t\twrite(params, false);\n\t}, { deep: true });\n\tfunction write(params, shouldUpdate, shouldWriteHistory = true) {\n\t\tpause();\n\t\tif (shouldUpdate) updateState(params);\n\t\tif (writeMode === \"replace\") window$1.history.replaceState(window$1.history.state, window$1.document.title, window$1.location.pathname + constructQuery(params));\n\t\telse if (shouldWriteHistory) window$1.history.pushState(window$1.history.state, window$1.document.title, window$1.location.pathname + constructQuery(params));\n\t\tnextTick(() => resume());\n\t}\n\tfunction onChanged() {\n\t\tif (!enableWrite) return;\n\t\twrite(read(), true, false);\n\t}\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(window$1, \"popstate\", onChanged, listenerOptions);\n\tif (mode !== \"history\") useEventListener(window$1, \"hashchange\", onChanged, listenerOptions);\n\tconst initial = read();\n\tif (initial.keys().next().value) updateState(initial);\n\telse Object.assign(state, initialValue);\n\treturn state;\n}\n\n//#endregion\n//#region useUserMedia/index.ts\n/**\n* Reactive `mediaDevices.getUserMedia` streaming\n*\n* @see https://vueuse.org/useUserMedia\n* @param options\n*/\nfunction useUserMedia(options = {}) {\n\tvar _options$enabled, _options$autoSwitch;\n\tconst enabled = shallowRef((_options$enabled = options.enabled) !== null && _options$enabled !== void 0 ? _options$enabled : false);\n\tconst autoSwitch = shallowRef((_options$autoSwitch = options.autoSwitch) !== null && _options$autoSwitch !== void 0 ? _options$autoSwitch : true);\n\tconst constraints = ref(options.constraints);\n\tconst { navigator: navigator$1 = defaultNavigator } = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tvar _navigator$mediaDevic;\n\t\treturn navigator$1 === null || navigator$1 === void 0 || (_navigator$mediaDevic = navigator$1.mediaDevices) === null || _navigator$mediaDevic === void 0 ? void 0 : _navigator$mediaDevic.getUserMedia;\n\t});\n\tconst stream = shallowRef();\n\tfunction getDeviceOptions(type) {\n\t\tswitch (type) {\n\t\t\tcase \"video\":\n\t\t\t\tif (constraints.value) return constraints.value.video || false;\n\t\t\t\tbreak;\n\t\t\tcase \"audio\":\n\t\t\t\tif (constraints.value) return constraints.value.audio || false;\n\t\t\t\tbreak;\n\t\t}\n\t}\n\tasync function _start() {\n\t\tif (!isSupported.value || stream.value) return;\n\t\tstream.value = await navigator$1.mediaDevices.getUserMedia({\n\t\t\tvideo: getDeviceOptions(\"video\"),\n\t\t\taudio: getDeviceOptions(\"audio\")\n\t\t});\n\t\treturn stream.value;\n\t}\n\tfunction _stop() {\n\t\tvar _stream$value;\n\t\t(_stream$value = stream.value) === null || _stream$value === void 0 || _stream$value.getTracks().forEach((t) => t.stop());\n\t\tstream.value = void 0;\n\t}\n\tfunction stop() {\n\t\t_stop();\n\t\tenabled.value = false;\n\t}\n\tasync function start() {\n\t\tawait _start();\n\t\tif (stream.value) enabled.value = true;\n\t\treturn stream.value;\n\t}\n\tasync function restart() {\n\t\t_stop();\n\t\treturn await start();\n\t}\n\twatch(enabled, (v) => {\n\t\tif (v) _start();\n\t\telse _stop();\n\t}, { immediate: true });\n\twatch(constraints, () => {\n\t\tif (autoSwitch.value && stream.value) restart();\n\t}, {\n\t\timmediate: true,\n\t\tdeep: true\n\t});\n\ttryOnScopeDispose(() => {\n\t\tstop();\n\t});\n\treturn {\n\t\tisSupported,\n\t\tstream,\n\t\tstart,\n\t\tstop,\n\t\trestart,\n\t\tconstraints,\n\t\tenabled,\n\t\tautoSwitch\n\t};\n}\n\n//#endregion\n//#region useVModel/index.ts\n/**\n* Shorthand for v-model binding, props + emit -> ref\n*\n* @see https://vueuse.org/useVModel\n* @param props\n* @param key (default 'modelValue')\n* @param emit\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useVModel(props, key, emit, options = {}) {\n\tvar _vm$$emit, _vm$proxy;\n\tconst { clone = false, passive = false, eventName, deep = false, defaultValue, shouldEmit } = options;\n\tconst vm = getCurrentInstance();\n\tconst _emit = emit || (vm === null || vm === void 0 ? void 0 : vm.emit) || (vm === null || vm === void 0 || (_vm$$emit = vm.$emit) === null || _vm$$emit === void 0 ? void 0 : _vm$$emit.bind(vm)) || (vm === null || vm === void 0 || (_vm$proxy = vm.proxy) === null || _vm$proxy === void 0 || (_vm$proxy = _vm$proxy.$emit) === null || _vm$proxy === void 0 ? void 0 : _vm$proxy.bind(vm === null || vm === void 0 ? void 0 : vm.proxy));\n\tlet event = eventName;\n\tif (!key) key = \"modelValue\";\n\tevent = event || `update:${key.toString()}`;\n\tconst cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n\tconst getValue$1 = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n\tconst triggerEmit = (value) => {\n\t\tif (shouldEmit) {\n\t\t\tif (shouldEmit(value)) _emit(event, value);\n\t\t} else _emit(event, value);\n\t};\n\tif (passive) {\n\t\tconst proxy = ref(getValue$1());\n\t\tlet isUpdating = false;\n\t\twatch(() => props[key], (v) => {\n\t\t\tif (!isUpdating) {\n\t\t\t\tisUpdating = true;\n\t\t\t\tproxy.value = cloneFn(v);\n\t\t\t\tnextTick(() => isUpdating = false);\n\t\t\t}\n\t\t});\n\t\twatch(proxy, (v) => {\n\t\t\tif (!isUpdating && (v !== props[key] || deep)) triggerEmit(v);\n\t\t}, { deep });\n\t\treturn proxy;\n\t} else return computed({\n\t\tget() {\n\t\t\treturn getValue$1();\n\t\t},\n\t\tset(value) {\n\t\t\ttriggerEmit(value);\n\t\t}\n\t});\n}\n\n//#endregion\n//#region useVModels/index.ts\n/**\n* Shorthand for props v-model binding. Think like `toRefs(props)` but changes will also emit out.\n*\n* @see https://vueuse.org/useVModels\n* @param props\n* @param emit\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useVModels(props, emit, options = {}) {\n\tconst ret = {};\n\tfor (const key in props) ret[key] = useVModel(props, key, emit, options);\n\treturn ret;\n}\n\n//#endregion\n//#region useVibrate/index.ts\n/**\n* Reactive vibrate\n*\n* @see https://vueuse.org/useVibrate\n* @see https://developer.mozilla.org/en-US/docs/Web/API/Vibration_API\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useVibrate(options) {\n\tconst { pattern = [], interval = 0, navigator: navigator$1 = defaultNavigator } = options || {};\n\tconst isSupported = /* @__PURE__ */ useSupported(() => typeof navigator$1 !== \"undefined\" && \"vibrate\" in navigator$1);\n\tconst patternRef = toRef(pattern);\n\tlet intervalControls;\n\tconst vibrate = (pattern$1 = patternRef.value) => {\n\t\tif (isSupported.value) navigator$1.vibrate(pattern$1);\n\t};\n\tconst stop = () => {\n\t\tif (isSupported.value) navigator$1.vibrate(0);\n\t\tintervalControls === null || intervalControls === void 0 || intervalControls.pause();\n\t};\n\tif (interval > 0) intervalControls = useIntervalFn(vibrate, interval, {\n\t\timmediate: false,\n\t\timmediateCallback: false\n\t});\n\treturn {\n\t\tisSupported,\n\t\tpattern,\n\t\tintervalControls,\n\t\tvibrate,\n\t\tstop\n\t};\n}\n\n//#endregion\n//#region useVirtualList/index.ts\n/**\n* Please consider using [`vue-virtual-scroller`](https://github.com/Akryum/vue-virtual-scroller) if you are looking for more features.\n*/\nfunction useVirtualList(list, options) {\n\tconst { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n\treturn {\n\t\tlist: currentList,\n\t\tscrollTo,\n\t\tcontainerProps: {\n\t\t\tref: containerRef,\n\t\t\tonScroll: () => {\n\t\t\t\tcalculateRange();\n\t\t\t},\n\t\t\tstyle: containerStyle\n\t\t},\n\t\twrapperProps\n\t};\n}\nfunction useVirtualListResources(list) {\n\tconst containerRef = shallowRef(null);\n\tconst size = useElementSize(containerRef);\n\tconst currentList = ref([]);\n\tconst source = shallowRef(list);\n\treturn {\n\t\tstate: ref({\n\t\t\tstart: 0,\n\t\t\tend: 10\n\t\t}),\n\t\tsource,\n\t\tcurrentList,\n\t\tsize,\n\t\tcontainerRef\n\t};\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n\treturn (containerSize) => {\n\t\tif (typeof itemSize === \"number\") return Math.ceil(containerSize / itemSize);\n\t\tconst { start = 0 } = state.value;\n\t\tlet sum = 0;\n\t\tlet capacity = 0;\n\t\tfor (let i = start; i < source.value.length; i++) {\n\t\t\tconst size = itemSize(i);\n\t\t\tsum += size;\n\t\t\tcapacity = i;\n\t\t\tif (sum > containerSize) break;\n\t\t}\n\t\treturn capacity - start;\n\t};\n}\nfunction createGetOffset(source, itemSize) {\n\treturn (scrollDirection) => {\n\t\tif (typeof itemSize === \"number\") return Math.floor(scrollDirection / itemSize) + 1;\n\t\tlet sum = 0;\n\t\tlet offset = 0;\n\t\tfor (let i = 0; i < source.value.length; i++) {\n\t\t\tconst size = itemSize(i);\n\t\t\tsum += size;\n\t\t\tif (sum >= scrollDirection) {\n\t\t\t\toffset = i;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn offset + 1;\n\t};\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n\treturn () => {\n\t\tconst element = containerRef.value;\n\t\tif (element) {\n\t\t\tconst offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n\t\t\tconst viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n\t\t\tconst from = offset - overscan;\n\t\t\tconst to = offset + viewCapacity + overscan;\n\t\t\tstate.value = {\n\t\t\t\tstart: from < 0 ? 0 : from,\n\t\t\t\tend: to > source.value.length ? source.value.length : to\n\t\t\t};\n\t\t\tcurrentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n\t\t\t\tdata: ele,\n\t\t\t\tindex: index + state.value.start\n\t\t\t}));\n\t\t}\n\t};\n}\nfunction createGetDistance(itemSize, source) {\n\treturn (index) => {\n\t\tif (typeof itemSize === \"number\") return index * itemSize;\n\t\treturn source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n\t};\n}\nfunction useWatchForSizes(size, list, containerRef, calculateRange) {\n\twatch([\n\t\tsize.width,\n\t\tsize.height,\n\t\t() => toValue(list),\n\t\tcontainerRef\n\t], () => {\n\t\tcalculateRange();\n\t});\n}\nfunction createComputedTotalSize(itemSize, source) {\n\treturn computed(() => {\n\t\tif (typeof itemSize === \"number\") return source.value.length * itemSize;\n\t\treturn source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n\t});\n}\nconst scrollToDictionaryForElementScrollKey = {\n\thorizontal: \"scrollLeft\",\n\tvertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n\treturn (index) => {\n\t\tif (containerRef.value) {\n\t\t\tcontainerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n\t\t\tcalculateRange();\n\t\t}\n\t};\n}\nfunction useHorizontalVirtualList(options, list) {\n\tconst resources = useVirtualListResources(list);\n\tconst { state, source, currentList, size, containerRef } = resources;\n\tconst containerStyle = { overflowX: \"auto\" };\n\tconst { itemWidth, overscan = 5 } = options;\n\tconst getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n\tconst calculateRange = createCalculateRange(\"horizontal\", overscan, createGetOffset(source, itemWidth), getViewCapacity, resources);\n\tconst getDistanceLeft = createGetDistance(itemWidth, source);\n\tconst offsetLeft = computed(() => getDistanceLeft(state.value.start));\n\tconst totalWidth = createComputedTotalSize(itemWidth, source);\n\tuseWatchForSizes(size, list, containerRef, calculateRange);\n\treturn {\n\t\tscrollTo: createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef),\n\t\tcalculateRange,\n\t\twrapperProps: computed(() => {\n\t\t\treturn { style: {\n\t\t\t\theight: \"100%\",\n\t\t\t\twidth: `${totalWidth.value - offsetLeft.value}px`,\n\t\t\t\tmarginLeft: `${offsetLeft.value}px`,\n\t\t\t\tdisplay: \"flex\"\n\t\t\t} };\n\t\t}),\n\t\tcontainerStyle,\n\t\tcurrentList,\n\t\tcontainerRef\n\t};\n}\nfunction useVerticalVirtualList(options, list) {\n\tconst resources = useVirtualListResources(list);\n\tconst { state, source, currentList, size, containerRef } = resources;\n\tconst containerStyle = { overflowY: \"auto\" };\n\tconst { itemHeight, overscan = 5 } = options;\n\tconst getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n\tconst calculateRange = createCalculateRange(\"vertical\", overscan, createGetOffset(source, itemHeight), getViewCapacity, resources);\n\tconst getDistanceTop = createGetDistance(itemHeight, source);\n\tconst offsetTop = computed(() => getDistanceTop(state.value.start));\n\tconst totalHeight = createComputedTotalSize(itemHeight, source);\n\tuseWatchForSizes(size, list, containerRef, calculateRange);\n\treturn {\n\t\tcalculateRange,\n\t\tscrollTo: createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef),\n\t\tcontainerStyle,\n\t\twrapperProps: computed(() => {\n\t\t\treturn { style: {\n\t\t\t\twidth: \"100%\",\n\t\t\t\theight: `${totalHeight.value - offsetTop.value}px`,\n\t\t\t\tmarginTop: `${offsetTop.value}px`\n\t\t\t} };\n\t\t}),\n\t\tcurrentList,\n\t\tcontainerRef\n\t};\n}\n\n//#endregion\n//#region useWakeLock/index.ts\n/**\n* Reactive Screen Wake Lock API.\n*\n* @see https://vueuse.org/useWakeLock\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useWakeLock(options = {}) {\n\tconst { navigator: navigator$1 = defaultNavigator, document: document$1 = defaultDocument } = options;\n\tconst requestedType = shallowRef(false);\n\tconst sentinel = shallowRef(null);\n\tconst documentVisibility = useDocumentVisibility({ document: document$1 });\n\tconst isSupported = /* @__PURE__ */ useSupported(() => navigator$1 && \"wakeLock\" in navigator$1);\n\tconst isActive = computed(() => !!sentinel.value && documentVisibility.value === \"visible\");\n\tif (isSupported.value) {\n\t\tuseEventListener(sentinel, \"release\", () => {\n\t\t\tvar _sentinel$value$type, _sentinel$value;\n\t\t\trequestedType.value = (_sentinel$value$type = (_sentinel$value = sentinel.value) === null || _sentinel$value === void 0 ? void 0 : _sentinel$value.type) !== null && _sentinel$value$type !== void 0 ? _sentinel$value$type : false;\n\t\t}, { passive: true });\n\t\twhenever(() => documentVisibility.value === \"visible\" && (document$1 === null || document$1 === void 0 ? void 0 : document$1.visibilityState) === \"visible\" && requestedType.value, (type) => {\n\t\t\trequestedType.value = false;\n\t\t\tforceRequest(type);\n\t\t});\n\t}\n\tasync function forceRequest(type) {\n\t\tvar _sentinel$value2;\n\t\tawait ((_sentinel$value2 = sentinel.value) === null || _sentinel$value2 === void 0 ? void 0 : _sentinel$value2.release());\n\t\tsentinel.value = isSupported.value ? await navigator$1.wakeLock.request(type) : null;\n\t}\n\tasync function request(type) {\n\t\tif (documentVisibility.value === \"visible\") await forceRequest(type);\n\t\telse requestedType.value = type;\n\t}\n\tasync function release() {\n\t\trequestedType.value = false;\n\t\tconst s = sentinel.value;\n\t\tsentinel.value = null;\n\t\tawait (s === null || s === void 0 ? void 0 : s.release());\n\t}\n\treturn {\n\t\tsentinel,\n\t\tisSupported,\n\t\tisActive,\n\t\trequest,\n\t\tforceRequest,\n\t\trelease\n\t};\n}\n\n//#endregion\n//#region useWebNotification/index.ts\n/**\n* Reactive useWebNotification\n*\n* @see https://vueuse.org/useWebNotification\n* @see https://developer.mozilla.org/en-US/docs/Web/API/notification\n*/\nfunction useWebNotification(options = {}) {\n\tconst { window: window$1 = defaultWindow, requestPermissions: _requestForPermissions = true } = options;\n\tconst defaultWebNotificationOptions = options;\n\tconst isSupported = /* @__PURE__ */ useSupported(() => {\n\t\tif (!window$1 || !(\"Notification\" in window$1)) return false;\n\t\tif (Notification.permission === \"granted\") return true;\n\t\ttry {\n\t\t\tconst notification$1 = new Notification(\"\");\n\t\t\tnotification$1.onshow = () => {\n\t\t\t\tnotification$1.close();\n\t\t\t};\n\t\t} catch (e) {\n\t\t\tif (e.name === \"TypeError\") return false;\n\t\t}\n\t\treturn true;\n\t});\n\tconst permissionGranted = shallowRef(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n\tconst notification = ref(null);\n\tconst ensurePermissions = async () => {\n\t\tif (!isSupported.value) return;\n\t\tif (!permissionGranted.value && Notification.permission !== \"denied\") {\n\t\t\tif (await Notification.requestPermission() === \"granted\") permissionGranted.value = true;\n\t\t}\n\t\treturn permissionGranted.value;\n\t};\n\tconst { on: onClick, trigger: clickTrigger } = createEventHook();\n\tconst { on: onShow, trigger: showTrigger } = createEventHook();\n\tconst { on: onError, trigger: errorTrigger } = createEventHook();\n\tconst { on: onClose, trigger: closeTrigger } = createEventHook();\n\tconst show = async (overrides) => {\n\t\tif (!isSupported.value || !permissionGranted.value) return;\n\t\tconst options$1 = Object.assign({}, defaultWebNotificationOptions, overrides);\n\t\tnotification.value = new Notification(options$1.title || \"\", options$1);\n\t\tnotification.value.onclick = clickTrigger;\n\t\tnotification.value.onshow = showTrigger;\n\t\tnotification.value.onerror = errorTrigger;\n\t\tnotification.value.onclose = closeTrigger;\n\t\treturn notification.value;\n\t};\n\tconst close = () => {\n\t\tif (notification.value) notification.value.close();\n\t\tnotification.value = null;\n\t};\n\tif (_requestForPermissions) tryOnMounted(ensurePermissions);\n\ttryOnScopeDispose(close);\n\tif (isSupported.value && window$1) {\n\t\tconst document$1 = window$1.document;\n\t\tuseEventListener(document$1, \"visibilitychange\", (e) => {\n\t\t\te.preventDefault();\n\t\t\tif (document$1.visibilityState === \"visible\") close();\n\t\t});\n\t}\n\treturn {\n\t\tisSupported,\n\t\tnotification,\n\t\tensurePermissions,\n\t\tpermissionGranted,\n\t\tshow,\n\t\tclose,\n\t\tonClick,\n\t\tonShow,\n\t\tonError,\n\t\tonClose\n\t};\n}\n\n//#endregion\n//#region useWebSocket/index.ts\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n\tif (options === true) return {};\n\treturn options;\n}\n/**\n* Reactive WebSocket client.\n*\n* @see https://vueuse.org/useWebSocket\n* @param url\n*/\nfunction useWebSocket(url, options = {}) {\n\tconst { onConnected, onDisconnected, onError, onMessage, immediate = true, autoConnect = true, autoClose = true, protocols = [] } = options;\n\tconst data = ref(null);\n\tconst status = shallowRef(\"CLOSED\");\n\tconst wsRef = ref();\n\tconst urlRef = toRef(url);\n\tlet heartbeatPause;\n\tlet heartbeatResume;\n\tlet explicitlyClosed = false;\n\tlet retried = 0;\n\tlet bufferedData = [];\n\tlet retryTimeout;\n\tlet pongTimeoutWait;\n\tconst _sendBuffer = () => {\n\t\tif (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n\t\t\tfor (const buffer of bufferedData) wsRef.value.send(buffer);\n\t\t\tbufferedData = [];\n\t\t}\n\t};\n\tconst resetRetry = () => {\n\t\tif (retryTimeout != null) {\n\t\t\tclearTimeout(retryTimeout);\n\t\t\tretryTimeout = void 0;\n\t\t}\n\t};\n\tconst resetHeartbeat = () => {\n\t\tclearTimeout(pongTimeoutWait);\n\t\tpongTimeoutWait = void 0;\n\t};\n\tconst close = (code = 1e3, reason) => {\n\t\tresetRetry();\n\t\tif (!isClient && !isWorker || !wsRef.value) return;\n\t\texplicitlyClosed = true;\n\t\tresetHeartbeat();\n\t\theartbeatPause === null || heartbeatPause === void 0 || heartbeatPause();\n\t\twsRef.value.close(code, reason);\n\t\twsRef.value = void 0;\n\t};\n\tconst send = (data$1, useBuffer = true) => {\n\t\tif (!wsRef.value || status.value !== \"OPEN\") {\n\t\t\tif (useBuffer) bufferedData.push(data$1);\n\t\t\treturn false;\n\t\t}\n\t\t_sendBuffer();\n\t\twsRef.value.send(data$1);\n\t\treturn true;\n\t};\n\tconst _init = () => {\n\t\tif (explicitlyClosed || typeof urlRef.value === \"undefined\") return;\n\t\tconst ws = new WebSocket(urlRef.value, protocols);\n\t\twsRef.value = ws;\n\t\tstatus.value = \"CONNECTING\";\n\t\tws.onopen = () => {\n\t\t\tstatus.value = \"OPEN\";\n\t\t\tretried = 0;\n\t\t\tonConnected === null || onConnected === void 0 || onConnected(ws);\n\t\t\theartbeatResume === null || heartbeatResume === void 0 || heartbeatResume();\n\t\t\t_sendBuffer();\n\t\t};\n\t\tws.onclose = (ev) => {\n\t\t\tstatus.value = \"CLOSED\";\n\t\t\tresetHeartbeat();\n\t\t\theartbeatPause === null || heartbeatPause === void 0 || heartbeatPause();\n\t\t\tonDisconnected === null || onDisconnected === void 0 || onDisconnected(ws, ev);\n\t\t\tif (!explicitlyClosed && options.autoReconnect && (wsRef.value == null || ws === wsRef.value)) {\n\t\t\t\tconst { retries = -1, delay = 1e3, onFailed } = resolveNestedOptions(options.autoReconnect);\n\t\t\t\tif ((typeof retries === \"function\" ? retries : () => typeof retries === \"number\" && (retries < 0 || retried < retries))(retried)) {\n\t\t\t\t\tretried += 1;\n\t\t\t\t\tconst delayTime = typeof delay === \"function\" ? delay(retried) : delay;\n\t\t\t\t\tretryTimeout = setTimeout(_init, delayTime);\n\t\t\t\t} else onFailed === null || onFailed === void 0 || onFailed();\n\t\t\t}\n\t\t};\n\t\tws.onerror = (e) => {\n\t\t\tonError === null || onError === void 0 || onError(ws, e);\n\t\t};\n\t\tws.onmessage = (e) => {\n\t\t\tif (options.heartbeat) {\n\t\t\t\tresetHeartbeat();\n\t\t\t\tconst { message = DEFAULT_PING_MESSAGE, responseMessage = message } = resolveNestedOptions(options.heartbeat);\n\t\t\t\tif (e.data === toValue(responseMessage)) return;\n\t\t\t}\n\t\t\tdata.value = e.data;\n\t\t\tonMessage === null || onMessage === void 0 || onMessage(ws, e);\n\t\t};\n\t};\n\tif (options.heartbeat) {\n\t\tconst { message = DEFAULT_PING_MESSAGE, interval = 1e3, pongTimeout = 1e3 } = resolveNestedOptions(options.heartbeat);\n\t\tconst { pause, resume } = useIntervalFn(() => {\n\t\t\tsend(toValue(message), false);\n\t\t\tif (pongTimeoutWait != null) return;\n\t\t\tpongTimeoutWait = setTimeout(() => {\n\t\t\t\tclose();\n\t\t\t\texplicitlyClosed = false;\n\t\t\t}, pongTimeout);\n\t\t}, interval, { immediate: false });\n\t\theartbeatPause = pause;\n\t\theartbeatResume = resume;\n\t}\n\tif (autoClose) {\n\t\tif (isClient) useEventListener(\"beforeunload\", () => close(), { passive: true });\n\t\ttryOnScopeDispose(close);\n\t}\n\tconst open = () => {\n\t\tif (!isClient && !isWorker) return;\n\t\tclose();\n\t\texplicitlyClosed = false;\n\t\tretried = 0;\n\t\t_init();\n\t};\n\tif (immediate) open();\n\tif (autoConnect) watch(urlRef, open);\n\treturn {\n\t\tdata,\n\t\tstatus,\n\t\tclose,\n\t\tsend,\n\t\topen,\n\t\tws: wsRef\n\t};\n}\n\n//#endregion\n//#region useWebWorker/index.ts\nfunction useWebWorker(arg0, workerOptions, options) {\n\tconst { window: window$1 = defaultWindow } = options !== null && options !== void 0 ? options : {};\n\tconst data = ref(null);\n\tconst worker = shallowRef();\n\tconst post = (...args) => {\n\t\tif (!worker.value) return;\n\t\tworker.value.postMessage(...args);\n\t};\n\tconst terminate = function terminate$1() {\n\t\tif (!worker.value) return;\n\t\tworker.value.terminate();\n\t};\n\tif (window$1) {\n\t\tif (typeof arg0 === \"string\") worker.value = new Worker(arg0, workerOptions);\n\t\telse if (typeof arg0 === \"function\") worker.value = arg0();\n\t\telse worker.value = arg0;\n\t\tworker.value.onmessage = (e) => {\n\t\t\tdata.value = e.data;\n\t\t};\n\t\ttryOnScopeDispose(() => {\n\t\t\tif (worker.value) worker.value.terminate();\n\t\t});\n\t}\n\treturn {\n\t\tdata,\n\t\tpost,\n\t\tterminate,\n\t\tworker\n\t};\n}\n\n//#endregion\n//#region useWebWorkerFn/lib/depsParser.ts\n/**\n*\n* Concatenates the dependencies into a comma separated string.\n* this string will then be passed as an argument to the \"importScripts\" function\n*\n* @param deps array of string\n* @param localDeps array of function\n* @returns a string composed by the concatenation of the array\n* elements \"deps\" and \"importScripts\".\n*\n* @example\n* depsParser(['demo1', 'demo2']) // return importScripts('demo1', 'demo2')\n*/\nfunction depsParser(deps, localDeps) {\n\tif (deps.length === 0 && localDeps.length === 0) return \"\";\n\tconst depsString = deps.map((dep) => `'${dep}'`).toString();\n\tconst depsFunctionString = localDeps.filter((dep) => typeof dep === \"function\").map((fn) => {\n\t\tconst str = fn.toString();\n\t\tif (str.trim().startsWith(\"function\")) return str;\n\t\telse return `const ${fn.name} = ${str}`;\n\t}).join(\";\");\n\tconst importString = `importScripts(${depsString});`;\n\treturn `${depsString.trim() === \"\" ? \"\" : importString} ${depsFunctionString}`;\n}\nvar depsParser_default = depsParser;\n\n//#endregion\n//#region useWebWorkerFn/lib/jobRunner.ts\n/**\n* This function accepts as a parameter a function \"userFunc\"\n* And as a result returns an anonymous function.\n* This anonymous function, accepts as arguments,\n* the parameters to pass to the function \"useArgs\" and returns a Promise\n* This function can be used as a wrapper, only inside a Worker\n* because it depends by \"postMessage\".\n*\n* @param userFunc {Function} fn the function to run with web worker\n*\n* @returns returns a function that accepts the parameters\n* to be passed to the \"userFunc\" function\n*/\nfunction jobRunner(userFunc) {\n\treturn (e) => {\n\t\tconst userFuncArgs = e.data[0];\n\t\treturn Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n\t\t\tpostMessage([\"SUCCESS\", result]);\n\t\t}).catch((error) => {\n\t\t\tpostMessage([\"ERROR\", error]);\n\t\t});\n\t};\n}\nvar jobRunner_default = jobRunner;\n\n//#endregion\n//#region useWebWorkerFn/lib/createWorkerBlobUrl.ts\n/**\n* Converts the \"fn\" function into the syntax needed to be executed within a web worker\n*\n* @param fn the function to run with web worker\n* @param deps array of strings, imported into the worker through \"importScripts\"\n* @param localDeps array of function, local dependencies\n*\n* @returns a blob url, containing the code of \"fn\" as a string\n*\n* @example\n* createWorkerBlobUrl((a,b) => a+b, [])\n* // return \"onmessage=return Promise.resolve((a,b) => a + b)\n* .then(postMessage(['SUCCESS', result]))\n* .catch(postMessage(['ERROR', error])\"\n*/\nfunction createWorkerBlobUrl(fn, deps, localDeps) {\n\tconst blobCode = `${depsParser_default(deps, localDeps)}; onmessage=(${jobRunner_default})(${fn})`;\n\tconst blob = new Blob([blobCode], { type: \"text/javascript\" });\n\treturn URL.createObjectURL(blob);\n}\nvar createWorkerBlobUrl_default = createWorkerBlobUrl;\n\n//#endregion\n//#region useWebWorkerFn/index.ts\n/**\n* Run expensive function without blocking the UI, using a simple syntax that makes use of Promise.\n*\n* @see https://vueuse.org/useWebWorkerFn\n* @param fn\n* @param options\n*/\nfunction useWebWorkerFn(fn, options = {}) {\n\tconst { dependencies = [], localDependencies = [], timeout, window: window$1 = defaultWindow } = options;\n\tconst worker = ref();\n\tconst workerStatus = shallowRef(\"PENDING\");\n\tconst promise = ref({});\n\tconst timeoutId = shallowRef();\n\tconst workerTerminate = (status = \"PENDING\") => {\n\t\tif (worker.value && worker.value._url && window$1) {\n\t\t\tworker.value.terminate();\n\t\t\tURL.revokeObjectURL(worker.value._url);\n\t\t\tpromise.value = {};\n\t\t\tworker.value = void 0;\n\t\t\twindow$1.clearTimeout(timeoutId.value);\n\t\t\tworkerStatus.value = status;\n\t\t}\n\t};\n\tworkerTerminate();\n\ttryOnScopeDispose(workerTerminate);\n\tconst generateWorker = () => {\n\t\tconst blobUrl = createWorkerBlobUrl_default(fn, dependencies, localDependencies);\n\t\tconst newWorker = new Worker(blobUrl);\n\t\tnewWorker._url = blobUrl;\n\t\tnewWorker.onmessage = (e) => {\n\t\t\tconst { resolve = () => {}, reject = () => {} } = promise.value;\n\t\t\tconst [status, result] = e.data;\n\t\t\tswitch (status) {\n\t\t\t\tcase \"SUCCESS\":\n\t\t\t\t\tresolve(result);\n\t\t\t\t\tworkerTerminate(status);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\treject(result);\n\t\t\t\t\tworkerTerminate(\"ERROR\");\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t};\n\t\tnewWorker.onerror = (e) => {\n\t\t\tconst { reject = () => {} } = promise.value;\n\t\t\te.preventDefault();\n\t\t\treject(e);\n\t\t\tworkerTerminate(\"ERROR\");\n\t\t};\n\t\tif (timeout) timeoutId.value = setTimeout(() => workerTerminate(\"TIMEOUT_EXPIRED\"), timeout);\n\t\treturn newWorker;\n\t};\n\tconst callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n\t\tvar _worker$value;\n\t\tpromise.value = {\n\t\t\tresolve,\n\t\t\treject\n\t\t};\n\t\t(_worker$value = worker.value) === null || _worker$value === void 0 || _worker$value.postMessage([[...fnArgs]]);\n\t\tworkerStatus.value = \"RUNNING\";\n\t});\n\tconst workerFn = (...fnArgs) => {\n\t\tif (workerStatus.value === \"RUNNING\") {\n\t\t\tconsole.error(\"[useWebWorkerFn] You can only run one instance of the worker at a time.\");\n\t\t\treturn Promise.reject();\n\t\t}\n\t\tworker.value = generateWorker();\n\t\treturn callWorker(...fnArgs);\n\t};\n\treturn {\n\t\tworkerFn,\n\t\tworkerStatus,\n\t\tworkerTerminate\n\t};\n}\n\n//#endregion\n//#region useWindowFocus/index.ts\n/**\n* Reactively track window focus with `window.onfocus` and `window.onblur`.\n*\n* @see https://vueuse.org/useWindowFocus\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useWindowFocus(options = {}) {\n\tconst { window: window$1 = defaultWindow } = options;\n\tif (!window$1) return shallowRef(false);\n\tconst focused = shallowRef(window$1.document.hasFocus());\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(window$1, \"blur\", () => {\n\t\tfocused.value = false;\n\t}, listenerOptions);\n\tuseEventListener(window$1, \"focus\", () => {\n\t\tfocused.value = true;\n\t}, listenerOptions);\n\treturn focused;\n}\n\n//#endregion\n//#region useWindowScroll/index.ts\n/**\n* Reactive window scroll.\n*\n* @see https://vueuse.org/useWindowScroll\n* @param options\n*/\nfunction useWindowScroll(options = {}) {\n\tconst { window: window$1 = defaultWindow,...rest } = options;\n\treturn useScroll(window$1, rest);\n}\n\n//#endregion\n//#region useWindowSize/index.ts\n/**\n* Reactive window size.\n*\n* @see https://vueuse.org/useWindowSize\n* @param options\n*\n* @__NO_SIDE_EFFECTS__\n*/\nfunction useWindowSize(options = {}) {\n\tconst { window: window$1 = defaultWindow, initialWidth = Number.POSITIVE_INFINITY, initialHeight = Number.POSITIVE_INFINITY, listenOrientation = true, includeScrollbar = true, type = \"inner\" } = options;\n\tconst width = shallowRef(initialWidth);\n\tconst height = shallowRef(initialHeight);\n\tconst update = () => {\n\t\tif (window$1) if (type === \"outer\") {\n\t\t\twidth.value = window$1.outerWidth;\n\t\t\theight.value = window$1.outerHeight;\n\t\t} else if (type === \"visual\" && window$1.visualViewport) {\n\t\t\tconst { width: visualViewportWidth, height: visualViewportHeight, scale } = window$1.visualViewport;\n\t\t\twidth.value = Math.round(visualViewportWidth * scale);\n\t\t\theight.value = Math.round(visualViewportHeight * scale);\n\t\t} else if (includeScrollbar) {\n\t\t\twidth.value = window$1.innerWidth;\n\t\t\theight.value = window$1.innerHeight;\n\t\t} else {\n\t\t\twidth.value = window$1.document.documentElement.clientWidth;\n\t\t\theight.value = window$1.document.documentElement.clientHeight;\n\t\t}\n\t};\n\tupdate();\n\ttryOnMounted(update);\n\tconst listenerOptions = { passive: true };\n\tuseEventListener(\"resize\", update, listenerOptions);\n\tif (window$1 && type === \"visual\" && window$1.visualViewport) useEventListener(window$1.visualViewport, \"resize\", update, listenerOptions);\n\tif (listenOrientation) watch(useMediaQuery(\"(orientation: portrait)\"), () => update());\n\treturn {\n\t\twidth,\n\t\theight\n\t};\n}\n\n//#endregion\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsElement, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, breakpointsVuetifyV2, breakpointsVuetifyV3, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, formatTimeAgoIntl, formatTimeAgoIntlParts, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onElementRemoval, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, provideSSRWidth, setSSRHandler, templateRef, transition, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useClipboardItems, useCloned, useColorMode, useConfirmDialog, useCountdown, useCssVar, useCurrentElement, useCycleList, useDark, useDebouncedRefHistory, useDeviceMotion, useDeviceOrientation, useDevicePixelRatio, useDevicesList, useDisplayMedia, useDocumentVisibility, useDraggable, useDropZone, useElementBounding, useElementByPoint, useElementHover, useElementSize, useElementVisibility, useEventBus, useEventListener, useEventSource, useEyeDropper, useFavicon, useFetch, useFileDialog, useFileSystemAccess, useFocus, useFocusWithin, useFps, useFullscreen, useGamepad, useGeolocation, useIdle, useImage, useInfiniteScroll, useIntersectionObserver, useKeyModifier, useLocalStorage, useMagicKeys, useManualRefHistory, useMediaControls, useMediaQuery, useMemoize, useMemory, useMounted, useMouse, useMouseInElement, useMousePressed, useMutationObserver, useNavigatorLanguage, useNetwork, useNow, useObjectUrl, useOffsetPagination, useOnline, usePageLeave, useParallax, useParentElement, usePerformanceObserver, usePermission, usePointer, usePointerLock, usePointerSwipe, usePreferredColorScheme, usePreferredContrast, usePreferredDark, usePreferredLanguages, usePreferredReducedMotion, usePreferredReducedTransparency, usePrevious, useRafFn, useRefHistory, useResizeObserver, useSSRWidth, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeAgoIntl, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };","import type { CommonRef, HasClassName, JSXElement, LumxClassName, GenericProps } from '../../types';\nimport { classNames } from '../../utils';\nimport { Size } from '../../constants';\n\nexport interface BaseDialogProps {\n /** Footer content. */\n footer?: JSXElement;\n /** Whether the divider between the dialog content and the footer is always displayed (instead of showing it on scroll). */\n forceFooterDivider?: boolean;\n /** Header content. */\n header?: JSXElement;\n /** Whether the divider between the dialog content and the header is always displayed (instead of showing it on scroll). */\n forceHeaderDivider?: boolean;\n /** Whether the indefinite progress indicator over the dialog content is displayed or not. */\n isLoading?: boolean;\n /** Whether the component is open or not. */\n isOpen?: boolean;\n}\n\n/**\n * Defines the props of the component.\n */\nexport interface DialogProps extends HasClassName, BaseDialogProps {\n /** Reference to the root element. */\n ref?: CommonRef;\n /** Whether the component is still visible (e.g. during close animation). */\n isVisible?: boolean;\n /** Reference to the dialog content element. */\n contentRef?: CommonRef;\n /** Size variant. */\n size?: DialogSizes;\n /** Z-axis position. */\n zIndex?: number;\n /** Additional props for the dialog container element. */\n dialogProps?: GenericProps;\n /** On close callback. */\n handleClose?(): void;\n /** Whether to prevent closing on click away. */\n shouldPreventCloseOnClickAway?: boolean;\n /** Refs used for click-away detection. */\n clickAwayRefs?: any;\n /** Ref for the root wrapper element. */\n rootRef?: CommonRef;\n /** Ref for the inner section element. */\n wrapperRef?: CommonRef;\n /** Whether the header sentinel is out of view (controls header divider). */\n hasTopIntersection: boolean | null;\n /** Whether the footer sentinel is out of view (controls footer divider). */\n hasBottomIntersection: boolean | null;\n /** Props forwarded from a child <header> element. */\n headerChildProps?: GenericProps;\n /** Content extracted from a child <header> element. */\n headerChildContent?: JSXElement;\n /** Props forwarded from a child <footer> element. */\n footerChildProps?: GenericProps;\n /** Content extracted from a child <footer> element. */\n footerChildContent?: JSXElement;\n /** Dialog body content. */\n content?: JSXElement;\n /** Ref setter for the top scroll sentinel element. */\n setSentinelTop?: any;\n /** Ref setter for the bottom scroll sentinel element. */\n setSentinelBottom?: any;\n /** Portal component for rendering outside the DOM hierarchy. */\n Portal: any;\n /** HeadingLevelProvider component. */\n HeadingLevelProvider: any;\n /** ThemeProvider component. */\n ThemeProvider: any;\n /** ClickAwayProvider component. */\n ClickAwayProvider: any;\n /** ProgressCircular component */\n ProgressCircular: any;\n}\n\nexport type DialogSizes = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Dialog';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-dialog';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<DialogProps> = {\n size: Size.big,\n};\n\n/**\n * Dialog component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Dialog = (props: DialogProps) => {\n const {\n className,\n ref,\n header,\n forceFooterDivider,\n forceHeaderDivider,\n footer,\n isLoading,\n isOpen,\n handleClose,\n contentRef,\n size = DEFAULT_PROPS.size,\n zIndex,\n dialogProps,\n headerChildContent,\n isVisible,\n Portal,\n HeadingLevelProvider,\n ThemeProvider,\n ClickAwayProvider,\n shouldPreventCloseOnClickAway,\n clickAwayRefs,\n rootRef,\n wrapperRef,\n hasTopIntersection,\n headerChildProps,\n setSentinelTop,\n content,\n setSentinelBottom,\n footerChildContent,\n footerChildProps,\n ProgressCircular,\n hasBottomIntersection,\n ...forwardedProps\n } = props;\n\n return (\n <Portal>\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n 'is-hidden': !isOpen,\n 'is-loading': isLoading,\n 'is-shown': isOpen || isVisible,\n [`size-${size}`]: Boolean(size),\n }),\n )}\n style={{ zIndex }}\n >\n <div className={element('overlay')} />\n\n <HeadingLevelProvider level={2}>\n <ThemeProvider value={undefined}>\n <div className={element('container')} role=\"dialog\" aria-modal=\"true\" {...dialogProps}>\n <ClickAwayProvider\n callback={!shouldPreventCloseOnClickAway && handleClose}\n childrenRefs={clickAwayRefs}\n parentRef={rootRef}\n >\n <section className={element('wrapper')} ref={wrapperRef}>\n {(header || headerChildContent) && (\n <header\n {...headerChildProps}\n className={classNames.join(\n element('header', {\n 'has-divider': Boolean(forceHeaderDivider || hasTopIntersection),\n }),\n headerChildProps?.className,\n )}\n >\n {header}\n {headerChildContent}\n </header>\n )}\n\n <div ref={contentRef} className={element('content')}>\n <div className={element('sentinel', { top: true })} ref={setSentinelTop} />\n\n {content}\n\n <div\n className={element('sentinel', { bottom: true })}\n ref={setSentinelBottom}\n />\n </div>\n\n {(footer || footerChildContent) && (\n <footer\n {...footerChildProps}\n className={classNames.join(\n element('footer', {\n 'has-divider': Boolean(forceFooterDivider || hasBottomIntersection),\n }),\n footerChildProps?.className,\n )}\n >\n {footer}\n {footerChildContent}\n </footer>\n )}\n\n {isLoading && (\n <div className={element('progress-overlay')}>\n <ProgressCircular />\n </div>\n )}\n </section>\n </ClickAwayProvider>\n </div>\n </ThemeProvider>\n </HeadingLevelProvider>\n </div>\n </Portal>\n );\n};\n","import { Typography } from '../../constants';\nimport { HeadingElement } from '../../types';\n\n/** The maximum authorized heading level. */\nexport const MAX_HEADING_LEVEL = 6;\n\n/**\n * Typography to use by default depending on the heading level.\n */\nexport const DEFAULT_TYPOGRAPHY_BY_LEVEL = {\n h1: Typography.display1,\n h2: Typography.headline,\n h3: Typography.title,\n h4: Typography.subtitle2,\n h5: Typography.subtitle1,\n h6: Typography.body2,\n};\n\nexport interface HeadingLevelContext {\n /** The current level */\n level: number;\n /** The heading element matching the current level */\n headingElement: HeadingElement;\n}\n\nexport const defaultContext: HeadingLevelContext = { level: 1, headingElement: 'h1' };\n","import { MAX_HEADING_LEVEL } from './constants';\n\n/**\n * Computes the next heading level based on the optional prop level or the parent context level.\n *\n * @param levelProp - The explicit level provided via props (optional).\n * @param parentLevel - The level from the parent context.\n * @returns The calculated heading level, clamped to the maximum allowed level.\n */\nexport const computeHeadingLevel = (levelProp: number | undefined, parentLevel: number): number => {\n const nextLevel = levelProp || parentLevel + 1;\n return nextLevel > MAX_HEADING_LEVEL ? MAX_HEADING_LEVEL : nextLevel;\n};\n","import { InjectionKey } from 'vue';\nimport { HeadingLevelContext } from '@lumx/core/js/components/Heading/constants';\n\nexport const HeadingLevelContextKey: InjectionKey<HeadingLevelContext> = Symbol('HeadingLevelContext');\n","import { inject } from 'vue';\nimport { defaultContext, HeadingLevelContext } from '@lumx/core/js/components/Heading/constants';\nimport { HeadingLevelContextKey } from './context';\n\n/**\n * Hook to get the current heading level from the context.\n *\n * @return The current heading level and element.\n */\nexport const useHeadingLevel = (): HeadingLevelContext => {\n return inject(HeadingLevelContextKey, defaultContext);\n};\n","import { computed, defineComponent, provide, reactive, toRefs } from 'vue';\n\nimport type { HeadingElement } from '@lumx/core/js/types';\nimport type { HeadingLevelContext } from '@lumx/core/js/components/Heading/constants';\nimport { computeHeadingLevel } from '@lumx/core/js/components/Heading/utils';\n\nimport { keysOf } from '../../utils/VueToJSX';\nimport { HeadingLevelContextKey } from './context';\nimport { useHeadingLevel } from './useHeadingLevel';\n\nexport interface HeadingLevelProviderProps {\n /** The heading level to start at. If left undefined, the parent context will be used, if any. */\n level?: number;\n}\n\n/**\n * HeadingLevelProvider component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst HeadingLevelProvider = defineComponent(\n (props: HeadingLevelProviderProps, { slots }) => {\n const { level: propLevel } = toRefs(props);\n const parentContext = useHeadingLevel();\n\n const nextLevel = computed(() => {\n return computeHeadingLevel(propLevel?.value, parentContext.level);\n });\n\n const headingElement = computed(() => `h${nextLevel.value}` as HeadingElement);\n\n const context = reactive({\n level: nextLevel,\n headingElement,\n });\n\n provide(HeadingLevelContextKey, context as HeadingLevelContext);\n\n return () => slots.default?.();\n },\n {\n name: 'HeadingLevelProvider',\n props: keysOf<HeadingLevelProviderProps>()('level'),\n },\n);\n\nexport default HeadingLevelProvider;\n","/* eslint-disable react/no-unknown-property */\nimport type { CommonRef, GenericProps, HasClassName, HasTheme, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { Size } from '../../constants';\n\n/**\n * Progress sizes.\n */\nexport type ProgressCircularSize = Extract<Size, 'xxs' | 'xs' | 's' | 'm'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ProgressCircularProps extends HasTheme, HasClassName {\n /**\n * Progress circular size.\n */\n size?: ProgressCircularSize;\n /**\n * Progress display type (inline or block).\n * @default 'block'\n */\n display?: 'inline' | 'block';\n /** Component ref */\n ref?: CommonRef;\n /** additional props for the svg */\n svgProps?: GenericProps;\n /** additional props for the circle */\n circleProps?: GenericProps;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ProgressCircular';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-progress-circular';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ProgressCircularProps> = {\n size: Size.m,\n display: 'block',\n};\n\n/**\n * ProgressCircular component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ProgressCircular = (props: ProgressCircularProps) => {\n const {\n className,\n theme,\n size = DEFAULT_PROPS.size,\n display = DEFAULT_PROPS.display,\n ref,\n circleProps,\n svgProps,\n ...forwardedProps\n } = props;\n const Element = display === 'block' ? 'div' : 'span';\n\n return (\n <Element\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n [`size-${size}`]: Boolean(size),\n [`display-${display}`]: Boolean(display),\n }),\n )}\n >\n <Element className={element('double-bounce1')} />\n <Element className={element('double-bounce2')} />\n\n <svg {...svgProps} viewBox=\"25 25 50 50\">\n <circle {...circleProps} cx=\"50\" cy=\"50\" r=\"20\" fill=\"none\" />\n </svg>\n </Element>\n );\n};\n","import { defineComponent, useAttrs } from 'vue';\nimport {\n ProgressCircular as ProgressCircularUI,\n type ProgressCircularProps as UIProps,\n type ProgressCircularSize,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n element,\n} from '@lumx/core/js/components/ProgressCircular';\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, type VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type ProgressCircularProps = VueToJSXProps<UIProps, 'ref' | 'svgProps' | 'circleProps'>;\n\nexport type { ProgressCircularSize };\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\nconst ProgressCircular = defineComponent(\n (props: ProgressCircularProps) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n return () => {\n return (\n <ProgressCircularUI\n {...props}\n {...attrs}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n circleProps={{\n class: element('path'),\n 'stroke-width': '5',\n }}\n svgProps={{\n class: element('svg'),\n }}\n />\n );\n };\n },\n {\n name: 'LumxProgressCircular',\n inheritAttrs: false,\n props: keysOf<ProgressCircularProps>()('class', 'size', 'display', 'theme'),\n },\n);\n\nexport default ProgressCircular;\n","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array == null ? 0 : array.length;\n return length ? array[length - 1] : undefined;\n}\n\nmodule.exports = last;\n","/**\n * This method returns the first argument it receives.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Util\n * @param {*} value Any value.\n * @returns {*} Returns `value`.\n * @example\n *\n * var object = { 'a': 1 };\n *\n * console.log(_.identity(object) === object);\n * // => true\n */\nfunction identity(value) {\n return value;\n}\n\nmodule.exports = identity;\n","/**\n * A faster alternative to `Function#apply`, this function invokes `func`\n * with the `this` binding of `thisArg` and the arguments of `args`.\n *\n * @private\n * @param {Function} func The function to invoke.\n * @param {*} thisArg The `this` binding of `func`.\n * @param {Array} args The arguments to invoke `func` with.\n * @returns {*} Returns the result of `func`.\n */\nfunction apply(func, thisArg, args) {\n switch (args.length) {\n case 0: return func.call(thisArg);\n case 1: return func.call(thisArg, args[0]);\n case 2: return func.call(thisArg, args[0], args[1]);\n case 3: return func.call(thisArg, args[0], args[1], args[2]);\n }\n return func.apply(thisArg, args);\n}\n\nmodule.exports = apply;\n","var apply = require('./_apply');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * A specialized version of `baseRest` which transforms the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @param {Function} transform The rest array transform.\n * @returns {Function} Returns the new function.\n */\nfunction overRest(func, start, transform) {\n start = nativeMax(start === undefined ? (func.length - 1) : start, 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n index = -1;\n var otherArgs = Array(start + 1);\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = transform(array);\n return apply(func, this, otherArgs);\n };\n}\n\nmodule.exports = overRest;\n","/**\n * Creates a function that returns `value`.\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Util\n * @param {*} value The value to return from the new function.\n * @returns {Function} Returns the new constant function.\n * @example\n *\n * var objects = _.times(2, _.constant({ 'a': 1 }));\n *\n * console.log(objects);\n * // => [{ 'a': 1 }, { 'a': 1 }]\n *\n * console.log(objects[0] === objects[1]);\n * // => true\n */\nfunction constant(value) {\n return function() {\n return value;\n };\n}\n\nmodule.exports = constant;\n","/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\nmodule.exports = freeGlobal;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\nmodule.exports = root;\n","var root = require('./_root');\n\n/** Built-in value references. */\nvar Symbol = root.Symbol;\n\nmodule.exports = Symbol;\n","var Symbol = require('./_Symbol');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the raw `toStringTag`.\n */\nfunction getRawTag(value) {\n var isOwn = hasOwnProperty.call(value, symToStringTag),\n tag = value[symToStringTag];\n\n try {\n value[symToStringTag] = undefined;\n var unmasked = true;\n } catch (e) {}\n\n var result = nativeObjectToString.call(value);\n if (unmasked) {\n if (isOwn) {\n value[symToStringTag] = tag;\n } else {\n delete value[symToStringTag];\n }\n }\n return result;\n}\n\nmodule.exports = getRawTag;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar nativeObjectToString = objectProto.toString;\n\n/**\n * Converts `value` to a string using `Object.prototype.toString`.\n *\n * @private\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n */\nfunction objectToString(value) {\n return nativeObjectToString.call(value);\n}\n\nmodule.exports = objectToString;\n","var Symbol = require('./_Symbol'),\n getRawTag = require('./_getRawTag'),\n objectToString = require('./_objectToString');\n\n/** `Object#toString` result references. */\nvar nullTag = '[object Null]',\n undefinedTag = '[object Undefined]';\n\n/** Built-in value references. */\nvar symToStringTag = Symbol ? Symbol.toStringTag : undefined;\n\n/**\n * The base implementation of `getTag` without fallbacks for buggy environments.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction baseGetTag(value) {\n if (value == null) {\n return value === undefined ? undefinedTag : nullTag;\n }\n return (symToStringTag && symToStringTag in Object(value))\n ? getRawTag(value)\n : objectToString(value);\n}\n\nmodule.exports = baseGetTag;\n","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return value != null && (type == 'object' || type == 'function');\n}\n\nmodule.exports = isObject;\n","var baseGetTag = require('./_baseGetTag'),\n isObject = require('./isObject');\n\n/** `Object#toString` result references. */\nvar asyncTag = '[object AsyncFunction]',\n funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]',\n proxyTag = '[object Proxy]';\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n if (!isObject(value)) {\n return false;\n }\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 9 which returns 'object' for typed arrays and other constructors.\n var tag = baseGetTag(value);\n return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;\n}\n\nmodule.exports = isFunction;\n","var root = require('./_root');\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\nmodule.exports = coreJsData;\n","var coreJsData = require('./_coreJsData');\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\nmodule.exports = isMasked;\n","/** Used for built-in method references. */\nvar funcProto = Function.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to convert.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\nmodule.exports = toSource;\n","var isFunction = require('./isFunction'),\n isMasked = require('./_isMasked'),\n isObject = require('./isObject'),\n toSource = require('./_toSource');\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Used for built-in method references. */\nvar funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = isFunction(value) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\nmodule.exports = baseIsNative;\n","/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\nmodule.exports = getValue;\n","var baseIsNative = require('./_baseIsNative'),\n getValue = require('./_getValue');\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\nmodule.exports = getNative;\n","var getNative = require('./_getNative');\n\nvar defineProperty = (function() {\n try {\n var func = getNative(Object, 'defineProperty');\n func({}, '', {});\n return func;\n } catch (e) {}\n}());\n\nmodule.exports = defineProperty;\n","var constant = require('./constant'),\n defineProperty = require('./_defineProperty'),\n identity = require('./identity');\n\n/**\n * The base implementation of `setToString` without support for hot loop shorting.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar baseSetToString = !defineProperty ? identity : function(func, string) {\n return defineProperty(func, 'toString', {\n 'configurable': true,\n 'enumerable': false,\n 'value': constant(string),\n 'writable': true\n });\n};\n\nmodule.exports = baseSetToString;\n","/** Used to detect hot functions by number of calls within a span of milliseconds. */\nvar HOT_COUNT = 800,\n HOT_SPAN = 16;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeNow = Date.now;\n\n/**\n * Creates a function that'll short out and invoke `identity` instead\n * of `func` when it's called `HOT_COUNT` or more times in `HOT_SPAN`\n * milliseconds.\n *\n * @private\n * @param {Function} func The function to restrict.\n * @returns {Function} Returns the new shortable function.\n */\nfunction shortOut(func) {\n var count = 0,\n lastCalled = 0;\n\n return function() {\n var stamp = nativeNow(),\n remaining = HOT_SPAN - (stamp - lastCalled);\n\n lastCalled = stamp;\n if (remaining > 0) {\n if (++count >= HOT_COUNT) {\n return arguments[0];\n }\n } else {\n count = 0;\n }\n return func.apply(undefined, arguments);\n };\n}\n\nmodule.exports = shortOut;\n","var baseSetToString = require('./_baseSetToString'),\n shortOut = require('./_shortOut');\n\n/**\n * Sets the `toString` method of `func` to return `string`.\n *\n * @private\n * @param {Function} func The function to modify.\n * @param {Function} string The `toString` result.\n * @returns {Function} Returns `func`.\n */\nvar setToString = shortOut(baseSetToString);\n\nmodule.exports = setToString;\n","var identity = require('./identity'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * The base implementation of `_.rest` which doesn't validate or coerce arguments.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n */\nfunction baseRest(func, start) {\n return setToString(overRest(func, start, identity), func + '');\n}\n\nmodule.exports = baseRest;\n","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} [array] The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array == null ? 0 : array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nmodule.exports = arrayMap;\n","/**\n * The base implementation of `_.findIndex` and `_.findLastIndex` without\n * support for iteratee shorthands.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {Function} predicate The function invoked per iteration.\n * @param {number} fromIndex The index to search from.\n * @param {boolean} [fromRight] Specify iterating from right to left.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseFindIndex(array, predicate, fromIndex, fromRight) {\n var length = array.length,\n index = fromIndex + (fromRight ? 1 : -1);\n\n while ((fromRight ? index-- : ++index < length)) {\n if (predicate(array[index], index, array)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseFindIndex;\n","/**\n * The base implementation of `_.isNaN` without support for number objects.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.\n */\nfunction baseIsNaN(value) {\n return value !== value;\n}\n\nmodule.exports = baseIsNaN;\n","/**\n * A specialized version of `_.indexOf` which performs strict equality\n * comparisons of values, i.e. `===`.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction strictIndexOf(array, value, fromIndex) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (array[index] === value) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = strictIndexOf;\n","var baseFindIndex = require('./_baseFindIndex'),\n baseIsNaN = require('./_baseIsNaN'),\n strictIndexOf = require('./_strictIndexOf');\n\n/**\n * The base implementation of `_.indexOf` without `fromIndex` bounds checks.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOf(array, value, fromIndex) {\n return value === value\n ? strictIndexOf(array, value, fromIndex)\n : baseFindIndex(array, baseIsNaN, fromIndex);\n}\n\nmodule.exports = baseIndexOf;\n","/**\n * This function is like `baseIndexOf` except that it accepts a comparator.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} value The value to search for.\n * @param {number} fromIndex The index to search from.\n * @param {Function} comparator The comparator invoked per element.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction baseIndexOfWith(array, value, fromIndex, comparator) {\n var index = fromIndex - 1,\n length = array.length;\n\n while (++index < length) {\n if (comparator(array[index], value)) {\n return index;\n }\n }\n return -1;\n}\n\nmodule.exports = baseIndexOfWith;\n","/**\n * The base implementation of `_.unary` without support for storing metadata.\n *\n * @private\n * @param {Function} func The function to cap arguments for.\n * @returns {Function} Returns the new capped function.\n */\nfunction baseUnary(func) {\n return function(value) {\n return func(value);\n };\n}\n\nmodule.exports = baseUnary;\n","/**\n * Copies the values of `source` to `array`.\n *\n * @private\n * @param {Array} source The array to copy values from.\n * @param {Array} [array=[]] The array to copy values to.\n * @returns {Array} Returns `array`.\n */\nfunction copyArray(source, array) {\n var index = -1,\n length = source.length;\n\n array || (array = Array(length));\n while (++index < length) {\n array[index] = source[index];\n }\n return array;\n}\n\nmodule.exports = copyArray;\n","var arrayMap = require('./_arrayMap'),\n baseIndexOf = require('./_baseIndexOf'),\n baseIndexOfWith = require('./_baseIndexOfWith'),\n baseUnary = require('./_baseUnary'),\n copyArray = require('./_copyArray');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * The base implementation of `_.pullAllBy` without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @param {Function} [iteratee] The iteratee invoked per element.\n * @param {Function} [comparator] The comparator invoked per element.\n * @returns {Array} Returns `array`.\n */\nfunction basePullAll(array, values, iteratee, comparator) {\n var indexOf = comparator ? baseIndexOfWith : baseIndexOf,\n index = -1,\n length = values.length,\n seen = array;\n\n if (array === values) {\n values = copyArray(values);\n }\n if (iteratee) {\n seen = arrayMap(array, baseUnary(iteratee));\n }\n while (++index < length) {\n var fromIndex = 0,\n value = values[index],\n computed = iteratee ? iteratee(value) : value;\n\n while ((fromIndex = indexOf(seen, computed, fromIndex, comparator)) > -1) {\n if (seen !== array) {\n splice.call(seen, fromIndex, 1);\n }\n splice.call(array, fromIndex, 1);\n }\n }\n return array;\n}\n\nmodule.exports = basePullAll;\n","var basePullAll = require('./_basePullAll');\n\n/**\n * This method is like `_.pull` except that it accepts an array of values to remove.\n *\n * **Note:** Unlike `_.difference`, this method mutates `array`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {Array} values The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pullAll(array, ['a', 'c']);\n * console.log(array);\n * // => ['b', 'b']\n */\nfunction pullAll(array, values) {\n return (array && array.length && values && values.length)\n ? basePullAll(array, values)\n : array;\n}\n\nmodule.exports = pullAll;\n","var baseRest = require('./_baseRest'),\n pullAll = require('./pullAll');\n\n/**\n * Removes all given values from `array` using\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * **Note:** Unlike `_.without`, this method mutates `array`. Use `_.remove`\n * to remove elements from an array by predicate.\n *\n * @static\n * @memberOf _\n * @since 2.0.0\n * @category Array\n * @param {Array} array The array to modify.\n * @param {...*} [values] The values to remove.\n * @returns {Array} Returns `array`.\n * @example\n *\n * var array = ['a', 'b', 'c', 'a', 'b', 'c'];\n *\n * _.pull(array, 'a', 'c');\n * console.log(array);\n * // => ['b', 'b']\n */\nvar pull = baseRest(pullAll);\n\nmodule.exports = pull;\n","import last from 'lodash/last';\nimport pull from 'lodash/pull';\n\nexport type Listener = { enable(): void; disable(): void };\n\n/**\n * Keep track of listeners, only the last registered listener gets activated at any point (previously registered\n * listener are disabled).\n * When a listener gets unregistered, the previously registered listener gets enabled again.\n */\nexport function makeListenerTowerContext() {\n const LISTENERS: Listener[] = [];\n\n return {\n register(listener: Listener) {\n // Disable previous listener.\n last(LISTENERS)?.disable();\n // Keep track of current listener.\n LISTENERS.push(listener);\n // Enable current listener.\n listener.enable();\n },\n unregister(listener: Listener) {\n // Disable current listener.\n listener.disable();\n // Remove current listener.\n pull(LISTENERS, listener);\n // Enable previous listener.\n last(LISTENERS)?.enable();\n },\n };\n}\n","import { watchEffect, isRef, type Ref, onUnmounted } from 'vue';\nimport { onEscapePressed } from '@lumx/core/js/utils/events';\nimport { makeListenerTowerContext, type Listener } from '@lumx/core/js/utils/function/listenerTower';\n\nconst LISTENERS = makeListenerTowerContext();\n\n/**\n * Register a global listener on 'Escape' key pressed.\n *\n * If multiple listeners are registered, only the last one is maintained. When a listener is unregistered, the previous\n * one gets activated again.\n *\n * Supports both reactive refs and static values for callback and closeOnEscape.\n *\n * @param callbackRef Callback (or ref to callback)\n * @param closeOnEscapeRef Disables the hook when false (or ref to boolean)\n */\nexport function useCallbackOnEscape(\n callbackRef: Ref<(() => void) | undefined> | (() => void) | undefined,\n closeOnEscapeRef: Ref<boolean> | boolean = true,\n) {\n let listener: Listener | undefined;\n\n watchEffect((onCleanup) => {\n const callback = isRef(callbackRef) ? callbackRef.value : callbackRef;\n const closeOnEscape = isRef(closeOnEscapeRef) ? closeOnEscapeRef.value : closeOnEscapeRef;\n\n if (!closeOnEscape || !callback) return;\n\n const onKeyDown = onEscapePressed(() => callback());\n\n const newListener: Listener = {\n enable: () => document.body.addEventListener('keydown', onKeyDown),\n disable: () => document.body.removeEventListener('keydown', onKeyDown),\n };\n\n LISTENERS.register(newListener);\n listener = newListener;\n\n onCleanup(() => {\n LISTENERS.unregister(newListener);\n listener = undefined;\n });\n });\n\n onUnmounted(() => {\n if (listener) {\n LISTENERS.unregister(listener);\n listener = undefined;\n }\n });\n}\n","/** CSS selector listing all tabbable elements. */\nexport const TABBABLE_ELEMENTS_SELECTOR =\n 'a[href], button, textarea, input:not([type=\"hidden\"]):not([hidden]), [tabindex]';\n\n/**\n * CSS selector matching elements that should be excluded from focus traversal.\n *\n * Note: `aria-disabled` is intentionally NOT in this list — per ARIA semantics, an `aria-disabled` element\n * remains focusable (and discoverable by assistive tech). To remove an element from the tab order, use\n * `tabindex=\"-1\"` instead.\n */\nexport const DISABLED_SELECTOR = '[hidden], [tabindex=\"-1\"], [disabled]:not([disabled=\"false\"])';\n","import { DISABLED_SELECTOR, TABBABLE_ELEMENTS_SELECTOR } from './constants';\n\nconst isNotDisabled = (element: HTMLElement) => !element.matches(DISABLED_SELECTOR);\n\nexport function getFocusableElements(element: HTMLElement | ShadowRoot): HTMLElement[] {\n return Array.from(element.querySelectorAll<HTMLElement>(TABBABLE_ELEMENTS_SELECTOR)).filter(isNotDisabled);\n}\n","import { getFocusableElements } from './getFocusableElements';\n\n/**\n * Get first and last elements focusable in an element.\n *\n * @param parentElement The element in which to search focusable elements.\n * @return first and last focusable elements\n */\nexport function getFirstAndLastFocusable(parentElement: HTMLElement | ShadowRoot) {\n const focusableElements = getFocusableElements(parentElement);\n\n // First non disabled element.\n const first = focusableElements[0];\n // Last non disabled element.\n const last = focusableElements[focusableElements.length - 1];\n\n if (last && first) {\n return { first, last };\n }\n return {};\n}\n","import { makeListenerTowerContext, type Listener } from '../function/listenerTower';\nimport { getFirstAndLastFocusable } from './getFirstAndLastFocusable';\n\n/**\n * Shared listener tower for focus traps.\n *\n * When multiple traps are activated, only the last registered one is active. When it tears down, the previously\n * registered trap is re-enabled.\n */\nconst FOCUS_TRAPS = makeListenerTowerContext();\n\nexport interface SetupFocusTrapOptions {\n /** The element in which to trap the focus. */\n focusZoneElement: HTMLElement;\n /**\n * The element to focus when the trap is activated.\n * Falls back to the first focusable element inside the zone, then to the zone element itself.\n */\n focusElement?: HTMLElement | null;\n}\n\n/**\n * Trap 'Tab' focus switch inside the `focusZoneElement`.\n *\n * Setup behavior:\n * 1. Focus `focusElement` if provided and contained in the zone.\n * 2. Otherwise focus the first focusable descendant.\n * 3. Otherwise focus the zone element itself (falling back to setting `tabindex=\"-1\"` if needed) so that\n * keyboard users (especially screen reader users) land inside the trapped region (e.g. an empty dialog).\n *\n * Tab key behavior:\n * - With at least one focusable descendant: focus cycles between the first and last focusable in the zone.\n * - With no focusable descendant: Tab is swallowed and focus is restored to the zone element itself.\n *\n * Multiple traps stack — only the latest one is active; previous traps re-enable when the latest is torn down.\n *\n * @param options Trap configuration.\n * @param signal AbortSignal used to tear down the trap.\n */\nexport function setupFocusTrap(options: SetupFocusTrapOptions, signal: AbortSignal): void {\n const { focusZoneElement, focusElement } = options;\n\n if (!focusZoneElement || signal.aborted) {\n return;\n }\n\n // The root node is either the Document (regular DOM) or a ShadowRoot (shadow DOM portal).\n const rootNode = focusZoneElement.getRootNode() as Document | ShadowRoot;\n\n // Track whether we added a `tabindex=\"-1\"` so we can restore the original state on teardown.\n let addedTabIndex = false;\n\n /** Make the zone element programmatically focusable (so we can fall back to it). */\n const ensureZoneIsFocusable = () => {\n if (!focusZoneElement.hasAttribute('tabindex')) {\n focusZoneElement.setAttribute('tabindex', '-1');\n addedTabIndex = true;\n }\n };\n\n /** Focus the zone element itself as a last-resort fallback. */\n const focusZoneFallback = () => {\n ensureZoneIsFocusable();\n focusZoneElement.focus({ preventScroll: true });\n };\n\n // Trap 'Tab' key down focus switch into the focus zone.\n const trapTabFocusInFocusZone = (evt: KeyboardEvent) => {\n if (evt.key !== 'Tab') {\n return;\n }\n\n const focusable = getFirstAndLastFocusable(focusZoneElement);\n\n // Prevent focus switch if no focusable available — pin focus on the zone itself.\n if (!focusable.first) {\n evt.preventDefault();\n focusZoneFallback();\n return;\n }\n\n const { activeElement } = rootNode;\n\n if (\n // No previous focus.\n !activeElement ||\n // Previous focus is at the end of the focus zone.\n (!evt.shiftKey && activeElement === focusable.last) ||\n // Previous focus is outside the focus zone.\n !focusZoneElement.contains(activeElement)\n ) {\n focusable.first.focus();\n evt.preventDefault();\n return;\n }\n\n if (\n // Focus order reversed.\n evt.shiftKey &&\n // Previous focus is at the start of the focus zone.\n activeElement === focusable.first\n ) {\n focusable.last.focus();\n evt.preventDefault();\n }\n };\n\n const keydownHandler = trapTabFocusInFocusZone as EventListener;\n const focusTrap: Listener = {\n enable: () => rootNode.addEventListener('keydown', keydownHandler),\n disable: () => rootNode.removeEventListener('keydown', keydownHandler),\n };\n\n // SETUP: focus initial element.\n if (focusElement && focusZoneElement.contains(focusElement)) {\n // Focus the given element.\n focusElement.focus({ preventScroll: true });\n } else {\n const firstFocusable = getFirstAndLastFocusable(focusZoneElement).first;\n if (firstFocusable) {\n // Focus the first focusable descendant.\n firstFocusable.focus({ preventScroll: true });\n } else {\n // No focusable descendant — fall back to the zone itself (e.g. an empty dialog).\n focusZoneFallback();\n }\n }\n\n FOCUS_TRAPS.register(focusTrap);\n\n // TEARDOWN.\n signal.addEventListener(\n 'abort',\n () => {\n FOCUS_TRAPS.unregister(focusTrap);\n if (addedTabIndex) {\n focusZoneElement.removeAttribute('tabindex');\n }\n },\n { once: true },\n );\n}\n","import { isRef, onScopeDispose, watchPostEffect, type Ref } from 'vue';\nimport { setupFocusTrap } from '@lumx/core/js/utils/focus/setupFocusTrap';\n\n/**\n * Trap 'Tab' focus switch inside the `focusZoneElement`.\n *\n * If multiple focus traps are activated, only the last one is maintained and when a focus trap closes, the previous one\n * gets activated again.\n *\n * If the zone has no focusable descendant, the zone element itself receives focus (with a fallback `tabindex=\"-1\"`).\n *\n * @param focusZoneElementRef The element in which to trap the focus (or ref to it). Falsy disables the trap.\n * @param focusElementRef The element to focus when the focus trap is activated (or ref to it).\n */\nexport function useFocusTrap(\n focusZoneElementRef: Ref<HTMLElement | null | undefined | false> | HTMLElement | null | undefined | false,\n focusElementRef?: Ref<HTMLElement | null | undefined> | HTMLElement | null | undefined,\n): void {\n let currentController: AbortController | undefined;\n\n const tearDown = () => {\n if (currentController) {\n currentController.abort();\n currentController = undefined;\n }\n };\n\n watchPostEffect((onCleanup) => {\n const focusZoneElement = isRef(focusZoneElementRef) ? focusZoneElementRef.value : focusZoneElementRef;\n const focusElement = isRef(focusElementRef) ? focusElementRef.value : focusElementRef;\n\n if (!focusZoneElement) return;\n\n const controller = new AbortController();\n currentController = controller;\n setupFocusTrap({ focusZoneElement, focusElement }, controller.signal);\n\n onCleanup(tearDown);\n });\n\n onScopeDispose(tearDown);\n}\n","import { onBeforeUnmount, watch, type Ref } from 'vue';\nimport { getFirstAndLastFocusable } from '@lumx/core/js/utils/focus/getFirstAndLastFocusable';\n\n/**\n * Restores focus to the anchor or parent element when the popover closes,\n * if focus was within the popover at the time it closed.\n *\n * Works both when `isOpen` toggles to false (before Vue re-renders)\n * and when the component unmounts entirely.\n *\n * @param focusAnchorOnClose Whether to restore focus on close.\n * @param anchorRef Reference to the anchor element.\n * @param parentElementRef Reference to the parent element (optional override for focus target).\n * @param popoverElementRef Reference to the popover element.\n * @param isOpenRef Whether the popover is open (used to detect close before DOM update).\n */\nexport function useRestoreFocusOnClose(\n focusAnchorOnClose: Ref<boolean | undefined>,\n anchorRef: Ref<HTMLElement | undefined>,\n parentElementRef: Ref<HTMLElement | undefined> | undefined,\n popoverElementRef: Ref<HTMLElement | undefined>,\n isOpenRef?: Ref<boolean>,\n): void {\n const tryRestoreFocus = () => {\n if (!focusAnchorOnClose.value) return;\n const popoverElement = popoverElementRef.value;\n if (!popoverElement) return;\n\n const isFocusWithin = popoverElement.contains(document.activeElement);\n if (!isFocusWithin) return;\n\n // On next render\n setTimeout(() => {\n const anchorValue = anchorRef.value;\n // Resolve DOM element: in Vue 3, a ref on a component gives the component instance.\n // The actual DOM element is accessed via `$el` on the component instance.\n const anchor: HTMLElement | undefined =\n anchorValue && '$el' in (anchorValue as any)\n ? (anchorValue as any).$el\n : (anchorValue as HTMLElement | undefined);\n const elementToFocus =\n // Provided parent element\n parentElementRef?.value ||\n // Or first focusable element in anchor\n (anchor instanceof HTMLElement ? getFirstAndLastFocusable(anchor).first : undefined) ||\n // Fallback to anchor\n anchor;\n\n elementToFocus?.focus({ preventScroll: true });\n }, 0);\n };\n\n if (isOpenRef) {\n // Watch isOpen with flush:'sync' so the callback runs synchronously before\n // Vue re-renders and removes the popover element from the DOM.\n // This allows us to check focus state while the popover is still in the DOM.\n watch(\n isOpenRef,\n (isOpen, wasOpen) => {\n if (wasOpen && !isOpen) {\n tryRestoreFocus();\n }\n },\n { flush: 'sync' },\n );\n }\n\n // Also handle the case where the Vue component itself unmounts while the popover is open.\n onBeforeUnmount(() => {\n tryRestoreFocus();\n });\n}\n","import { computed, onBeforeUnmount, ref, watch, type ComputedRef, type Ref } from 'vue';\n\n/**\n * Returns true if the component is visible, tracking the opacity transition.\n * Keeps the component mounted during the close animation, then unmounts after the timeout.\n *\n * @param isOpen Whether the component intends to be visible or not.\n * @param timeout Duration of the close animation in ms.\n * @param onVisibilityChange Callback called when the visibility changes.\n * @return ComputedRef<boolean> true if the component should be rendered (open or animating closed)\n */\nexport function useTransitionVisibility(\n isOpen: Ref<boolean>,\n timeout: number,\n onVisibilityChange?: Ref<((isVisible: boolean) => void) | undefined>,\n): ComputedRef<boolean> {\n const isStillVisible = ref(isOpen.value);\n let timer: ReturnType<typeof setTimeout> | undefined;\n\n watch(\n isOpen,\n (open) => {\n if (open) {\n clearTimeout(timer);\n isStillVisible.value = true;\n } else {\n const isReducedMotion =\n typeof window.matchMedia === 'function' &&\n window.matchMedia('(prefers-reduced-motion: reduce)').matches;\n const hasTransition = typeof window !== 'undefined' && window.TransitionEvent && !isReducedMotion;\n\n if (!hasTransition) {\n isStillVisible.value = false;\n } else {\n timer = setTimeout(() => {\n isStillVisible.value = false;\n }, timeout);\n }\n }\n },\n { immediate: false },\n );\n\n let previousIsVisible = isStillVisible.value;\n watch(isStillVisible, (val) => {\n if (val !== previousIsVisible) {\n previousIsVisible = val;\n onVisibilityChange?.value?.(val);\n }\n });\n\n onBeforeUnmount(() => {\n clearTimeout(timer);\n });\n\n return computed(() => isOpen.value || isStillVisible.value);\n}\n","import { watch, type Ref } from 'vue';\nimport { useScrollLock } from '@vueuse/core';\n\n/**\n * Disables body scroll when the dialog is open.\n * Uses @vueuse/core's useScrollLock which sets overflow:hidden on document.body.\n *\n * @param isActive Whether body scroll should be disabled.\n */\nexport function useDisableBodyScroll(isActive: Ref<boolean>): void {\n const isLocked = useScrollLock(typeof document !== 'undefined' ? document.body : null);\n watch(isActive, (active) => {\n isLocked.value = active;\n });\n}\n","import { Comment, computed, defineComponent, ref, type Ref } from 'vue';\nimport { useIntersectionObserver } from '@vueuse/core';\n\nimport { Dialog as UI, type BaseDialogProps, type DialogSizes, DEFAULT_PROPS } from '@lumx/core/js/components/Dialog';\nimport { DIALOG_TRANSITION_DURATION } from '@lumx/core/js/constants';\nimport type { GenericProps, HasCloseMode, JSXElement } from '@lumx/core/js/types';\n\nimport { Portal } from '../../utils/Portal/Portal';\nimport { ClickAwayProvider } from '../../utils/ClickAway/ClickAwayProvider';\nimport { ThemeProvider } from '../../utils/theme/ThemeProvider';\nimport HeadingLevelProvider from '../heading/HeadingLevelProvider';\nimport ProgressCircular from '../progress/ProgressCircular';\n\nimport { useCallbackOnEscape } from '../../composables/useCallbackOnEscape';\nimport { useClassName } from '../../composables/useClassName';\nimport { useFocusTrap } from '../../composables/useFocusTrap';\nimport { useRestoreFocusOnClose } from '../../composables/useRestoreFocusOnClose';\nimport { useTransitionVisibility } from '../../composables/useTransitionVisibility';\nimport { useDisableBodyScroll } from '../../composables/useDisableBodyScroll';\nimport { keysOf, type ClassValue } from '../../utils/VueToJSX';\n\nexport type DialogProps = Pick<BaseDialogProps, 'forceFooterDivider' | 'forceHeaderDivider' | 'isLoading'> &\n HasCloseMode & {\n /** Additional class name. */\n class?: ClassValue;\n /** Whether the dialog is open. */\n isOpen?: boolean;\n /** Size variant. */\n size?: DialogSizes;\n /** Z-axis position. */\n zIndex?: number;\n /** Additional props for the dialog container element. */\n dialogProps?: GenericProps;\n /** Reference to the parent element that triggered modal opening (gets focus back on close). */\n parentElement?: HTMLElement;\n /** Element that should receive focus when the dialog opens. By default the first focusable child. */\n focusElement?: HTMLElement;\n /** Reference to the dialog content element. */\n contentRef?: Ref<HTMLDivElement>;\n /** Whether to keep the dialog open on clickaway or escape press. */\n preventAutoClose?: boolean;\n /** Whether to keep the dialog open on escape press. */\n preventCloseOnEscape?: boolean;\n /** Whether to keep the dialog open on clickaway. */\n preventCloseOnClick?: boolean;\n /** Whether to disable body scroll when the dialog is open. */\n disableBodyScroll?: boolean;\n };\n\nexport const emitSchema = {\n close: () => true,\n visibilityChange: (isVisible: boolean) => typeof isVisible === 'boolean',\n};\n\nconst Dialog = defineComponent(\n (props: DialogProps, { emit, slots, attrs }) => {\n const className = useClassName(() => props.class);\n\n const rootRef = ref<HTMLDivElement | null>(null);\n const wrapperRef = ref<HTMLDivElement | null>(null);\n const localContentRef = ref<HTMLDivElement | null>(null);\n\n // Sentinel refs for scroll divider detection — passed as callback refs to core JSX\n const sentinelTopRef = ref<HTMLElement | null>(null);\n const sentinelBottomRef = ref<HTMLElement | null>(null);\n const setSentinelTop = (el: HTMLElement | null) => {\n sentinelTopRef.value = el;\n };\n const setSentinelBottom = (el: HTMLElement | null) => {\n sentinelBottomRef.value = el;\n };\n\n // Intersection observer for scroll-triggered header/footer dividers\n const hasTopIntersection = ref<boolean | null>(null);\n const hasBottomIntersection = ref<boolean | null>(null);\n useIntersectionObserver(sentinelTopRef, (entries) => {\n const entry = entries[0];\n hasTopIntersection.value = entry ? !entry.isIntersecting : null;\n });\n useIntersectionObserver(sentinelBottomRef, (entries) => {\n const entry = entries[0];\n hasBottomIntersection.value = entry ? !entry.isIntersecting : null;\n });\n\n // Escape key\n const shouldPreventCloseOnEscape = computed(() => props.preventAutoClose || props.preventCloseOnEscape);\n const handleClose = () => emit('close');\n useCallbackOnEscape(\n handleClose,\n computed(() => Boolean(props.isOpen && !shouldPreventCloseOnEscape.value)),\n );\n\n // Focus trap inside the dialog wrapper\n const focusZoneElement = computed(() => {\n if (!props.isOpen) return false as const;\n return wrapperRef.value || false;\n });\n useFocusTrap(\n focusZoneElement,\n computed(() => props.focusElement),\n );\n\n // Restore focus to parentElement when dialog closes\n useRestoreFocusOnClose(\n computed(() => true),\n computed(() => undefined) as Ref<HTMLElement | undefined>,\n computed(() => props.parentElement) as Ref<HTMLElement | undefined>,\n wrapperRef as Ref<HTMLElement | undefined>,\n computed(() => Boolean(props.isOpen)),\n );\n\n // Disable body scroll when dialog is open\n useDisableBodyScroll(computed(() => props.disableBodyScroll !== false && Boolean(props.isOpen)));\n\n // Track animation state: keeps dialog mounted during close animation\n const isVisible = useTransitionVisibility(\n computed(() => Boolean(props.isOpen)),\n DIALOG_TRANSITION_DURATION,\n computed(() => (v: boolean) => emit('visibilityChange', v)),\n );\n\n // Mount guard: keep mounted during open, animation, or hide mode\n const isMounted = computed(() => props.isOpen || isVisible.value || props.closeMode === 'hide');\n\n // Click-away: only the wrapper section is allowed to be clicked inside\n const clickAwayRefs = computed(() => [wrapperRef]) as Ref<Array<Ref<HTMLElement | undefined>>>;\n const shouldPreventCloseOnClickAway = computed(() => props.preventAutoClose || props.preventCloseOnClick);\n\n // Merge external contentRef with internal one via callback ref\n const contentRefCallback = (el: HTMLDivElement | null) => {\n localContentRef.value = el;\n if (props.contentRef) {\n (props.contentRef as Ref<HTMLDivElement | null>).value = el;\n }\n };\n\n return () => {\n if (!isMounted.value) return null;\n\n // Support React-style children where <header> and <footer> are passed inline\n // (used by core component JSX). Falls back to named slots for regular Dialog usage.\n const defaultChildren = slots.default?.() ?? [];\n const headerVnode = defaultChildren.find((c: any) => c.type === 'header');\n const footerVnode = defaultChildren.find((c: any) => c.type === 'footer');\n const hasPartitioned = Boolean(headerVnode || footerVnode);\n const bodyChildren = hasPartitioned\n ? defaultChildren.filter((c: any) => c.type !== 'header' && c.type !== 'footer' && c.type !== Comment)\n : defaultChildren;\n\n return UI({\n ...attrs,\n ClickAwayProvider,\n HeadingLevelProvider,\n Portal,\n ThemeProvider,\n ProgressCircular,\n className: className.value,\n clickAwayRefs,\n content: (bodyChildren.length ? bodyChildren : undefined) as JSXElement,\n contentRef: contentRefCallback,\n dialogProps: props.dialogProps,\n footer: undefined,\n footerChildContent: (slots.footer?.() ?? (footerVnode as any)?.children) as JSXElement | undefined,\n footerChildProps: undefined,\n forceFooterDivider: props.forceFooterDivider,\n forceHeaderDivider: props.forceHeaderDivider,\n handleClose,\n hasBottomIntersection: hasBottomIntersection.value,\n hasTopIntersection: hasTopIntersection.value,\n header: undefined,\n headerChildContent: (slots.header?.() ?? (headerVnode as any)?.children) as JSXElement | undefined,\n headerChildProps: undefined,\n isLoading: props.isLoading,\n isOpen: props.isOpen,\n isVisible: isVisible.value,\n ref: rootRef,\n rootRef: rootRef as Ref<HTMLElement | undefined>,\n setSentinelBottom,\n setSentinelTop,\n shouldPreventCloseOnClickAway: shouldPreventCloseOnClickAway.value,\n size: props.size ?? DEFAULT_PROPS.size,\n wrapperRef: wrapperRef as Ref<HTMLElement | undefined>,\n zIndex: props.zIndex,\n });\n };\n },\n {\n name: 'LumxDialog',\n inheritAttrs: false,\n props: keysOf<DialogProps>()(\n 'class',\n 'closeMode',\n 'contentRef',\n 'dialogProps',\n 'disableBodyScroll',\n 'focusElement',\n 'forceFooterDivider',\n 'forceHeaderDivider',\n 'isLoading',\n 'isOpen',\n 'parentElement',\n 'preventAutoClose',\n 'preventCloseOnClick',\n 'preventCloseOnEscape',\n 'size',\n 'zIndex',\n ),\n emits: emitSchema,\n },\n);\n\nexport default Dialog;\n","/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Checks if `value` is likely a prototype object.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.\n */\nfunction isPrototype(value) {\n var Ctor = value && value.constructor,\n proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;\n\n return value === proto;\n}\n\nmodule.exports = isPrototype;\n","/**\n * Creates a unary function that invokes `func` with its argument transformed.\n *\n * @private\n * @param {Function} func The function to wrap.\n * @param {Function} transform The argument transform.\n * @returns {Function} Returns the new function.\n */\nfunction overArg(func, transform) {\n return function(arg) {\n return func(transform(arg));\n };\n}\n\nmodule.exports = overArg;\n","var overArg = require('./_overArg');\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeKeys = overArg(Object.keys, Object);\n\nmodule.exports = nativeKeys;\n","var isPrototype = require('./_isPrototype'),\n nativeKeys = require('./_nativeKeys');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.\n *\n * @private\n * @param {Object} object The object to query.\n * @returns {Array} Returns the array of property names.\n */\nfunction baseKeys(object) {\n if (!isPrototype(object)) {\n return nativeKeys(object);\n }\n var result = [];\n for (var key in Object(object)) {\n if (hasOwnProperty.call(object, key) && key != 'constructor') {\n result.push(key);\n }\n }\n return result;\n}\n\nmodule.exports = baseKeys;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar DataView = getNative(root, 'DataView');\n\nmodule.exports = DataView;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map');\n\nmodule.exports = Map;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Promise = getNative(root, 'Promise');\n\nmodule.exports = Promise;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar Set = getNative(root, 'Set');\n\nmodule.exports = Set;\n","var getNative = require('./_getNative'),\n root = require('./_root');\n\n/* Built-in method references that are verified to be native. */\nvar WeakMap = getNative(root, 'WeakMap');\n\nmodule.exports = WeakMap;\n","var DataView = require('./_DataView'),\n Map = require('./_Map'),\n Promise = require('./_Promise'),\n Set = require('./_Set'),\n WeakMap = require('./_WeakMap'),\n baseGetTag = require('./_baseGetTag'),\n toSource = require('./_toSource');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n objectTag = '[object Object]',\n promiseTag = '[object Promise]',\n setTag = '[object Set]',\n weakMapTag = '[object WeakMap]';\n\nvar dataViewTag = '[object DataView]';\n\n/** Used to detect maps, sets, and weakmaps. */\nvar dataViewCtorString = toSource(DataView),\n mapCtorString = toSource(Map),\n promiseCtorString = toSource(Promise),\n setCtorString = toSource(Set),\n weakMapCtorString = toSource(WeakMap);\n\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nvar getTag = baseGetTag;\n\n// Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.\nif ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||\n (Map && getTag(new Map) != mapTag) ||\n (Promise && getTag(Promise.resolve()) != promiseTag) ||\n (Set && getTag(new Set) != setTag) ||\n (WeakMap && getTag(new WeakMap) != weakMapTag)) {\n getTag = function(value) {\n var result = baseGetTag(value),\n Ctor = result == objectTag ? value.constructor : undefined,\n ctorString = Ctor ? toSource(Ctor) : '';\n\n if (ctorString) {\n switch (ctorString) {\n case dataViewCtorString: return dataViewTag;\n case mapCtorString: return mapTag;\n case promiseCtorString: return promiseTag;\n case setCtorString: return setTag;\n case weakMapCtorString: return weakMapTag;\n }\n }\n return result;\n };\n}\n\nmodule.exports = getTag;\n","/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return value != null && typeof value == 'object';\n}\n\nmodule.exports = isObjectLike;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]';\n\n/**\n * The base implementation of `_.isArguments`.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n */\nfunction baseIsArguments(value) {\n return isObjectLike(value) && baseGetTag(value) == argsTag;\n}\n\nmodule.exports = baseIsArguments;\n","var baseIsArguments = require('./_baseIsArguments'),\n isObjectLike = require('./isObjectLike');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/** Built-in value references. */\nvar propertyIsEnumerable = objectProto.propertyIsEnumerable;\n\n/**\n * Checks if `value` is likely an `arguments` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an `arguments` object,\n * else `false`.\n * @example\n *\n * _.isArguments(function() { return arguments; }());\n * // => true\n *\n * _.isArguments([1, 2, 3]);\n * // => false\n */\nvar isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {\n return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&\n !propertyIsEnumerable.call(value, 'callee');\n};\n\nmodule.exports = isArguments;\n","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array, else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nmodule.exports = isArray;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/**\n * Checks if `value` is a valid array-like length.\n *\n * **Note:** This method is loosely based on\n * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.\n * @example\n *\n * _.isLength(3);\n * // => true\n *\n * _.isLength(Number.MIN_VALUE);\n * // => false\n *\n * _.isLength(Infinity);\n * // => false\n *\n * _.isLength('3');\n * // => false\n */\nfunction isLength(value) {\n return typeof value == 'number' &&\n value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;\n}\n\nmodule.exports = isLength;\n","var isFunction = require('./isFunction'),\n isLength = require('./isLength');\n\n/**\n * Checks if `value` is array-like. A value is considered array-like if it's\n * not a function and has a `value.length` that's an integer greater than or\n * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is array-like, else `false`.\n * @example\n *\n * _.isArrayLike([1, 2, 3]);\n * // => true\n *\n * _.isArrayLike(document.body.children);\n * // => true\n *\n * _.isArrayLike('abc');\n * // => true\n *\n * _.isArrayLike(_.noop);\n * // => false\n */\nfunction isArrayLike(value) {\n return value != null && isLength(value.length) && !isFunction(value);\n}\n\nmodule.exports = isArrayLike;\n","/**\n * This method returns `false`.\n *\n * @static\n * @memberOf _\n * @since 4.13.0\n * @category Util\n * @returns {boolean} Returns `false`.\n * @example\n *\n * _.times(2, _.stubFalse);\n * // => [false, false]\n */\nfunction stubFalse() {\n return false;\n}\n\nmodule.exports = stubFalse;\n","var root = require('./_root'),\n stubFalse = require('./stubFalse');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Built-in value references. */\nvar Buffer = moduleExports ? root.Buffer : undefined;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined;\n\n/**\n * Checks if `value` is a buffer.\n *\n * @static\n * @memberOf _\n * @since 4.3.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.\n * @example\n *\n * _.isBuffer(new Buffer(2));\n * // => true\n *\n * _.isBuffer(new Uint8Array(2));\n * // => false\n */\nvar isBuffer = nativeIsBuffer || stubFalse;\n\nmodule.exports = isBuffer;\n","var baseGetTag = require('./_baseGetTag'),\n isLength = require('./isLength'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar argsTag = '[object Arguments]',\n arrayTag = '[object Array]',\n boolTag = '[object Boolean]',\n dateTag = '[object Date]',\n errorTag = '[object Error]',\n funcTag = '[object Function]',\n mapTag = '[object Map]',\n numberTag = '[object Number]',\n objectTag = '[object Object]',\n regexpTag = '[object RegExp]',\n setTag = '[object Set]',\n stringTag = '[object String]',\n weakMapTag = '[object WeakMap]';\n\nvar arrayBufferTag = '[object ArrayBuffer]',\n dataViewTag = '[object DataView]',\n float32Tag = '[object Float32Array]',\n float64Tag = '[object Float64Array]',\n int8Tag = '[object Int8Array]',\n int16Tag = '[object Int16Array]',\n int32Tag = '[object Int32Array]',\n uint8Tag = '[object Uint8Array]',\n uint8ClampedTag = '[object Uint8ClampedArray]',\n uint16Tag = '[object Uint16Array]',\n uint32Tag = '[object Uint32Array]';\n\n/** Used to identify `toStringTag` values of typed arrays. */\nvar typedArrayTags = {};\ntypedArrayTags[float32Tag] = typedArrayTags[float64Tag] =\ntypedArrayTags[int8Tag] = typedArrayTags[int16Tag] =\ntypedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =\ntypedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =\ntypedArrayTags[uint32Tag] = true;\ntypedArrayTags[argsTag] = typedArrayTags[arrayTag] =\ntypedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =\ntypedArrayTags[dataViewTag] = typedArrayTags[dateTag] =\ntypedArrayTags[errorTag] = typedArrayTags[funcTag] =\ntypedArrayTags[mapTag] = typedArrayTags[numberTag] =\ntypedArrayTags[objectTag] = typedArrayTags[regexpTag] =\ntypedArrayTags[setTag] = typedArrayTags[stringTag] =\ntypedArrayTags[weakMapTag] = false;\n\n/**\n * The base implementation of `_.isTypedArray` without Node.js optimizations.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n */\nfunction baseIsTypedArray(value) {\n return isObjectLike(value) &&\n isLength(value.length) && !!typedArrayTags[baseGetTag(value)];\n}\n\nmodule.exports = baseIsTypedArray;\n","var freeGlobal = require('./_freeGlobal');\n\n/** Detect free variable `exports`. */\nvar freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;\n\n/** Detect free variable `module`. */\nvar freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;\n\n/** Detect the popular CommonJS extension `module.exports`. */\nvar moduleExports = freeModule && freeModule.exports === freeExports;\n\n/** Detect free variable `process` from Node.js. */\nvar freeProcess = moduleExports && freeGlobal.process;\n\n/** Used to access faster Node.js helpers. */\nvar nodeUtil = (function() {\n try {\n // Use `util.types` for Node.js 10+.\n var types = freeModule && freeModule.require && freeModule.require('util').types;\n\n if (types) {\n return types;\n }\n\n // Legacy `process.binding('util')` for Node.js < 10.\n return freeProcess && freeProcess.binding && freeProcess.binding('util');\n } catch (e) {}\n}());\n\nmodule.exports = nodeUtil;\n","var baseIsTypedArray = require('./_baseIsTypedArray'),\n baseUnary = require('./_baseUnary'),\n nodeUtil = require('./_nodeUtil');\n\n/* Node.js helper references. */\nvar nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;\n\n/**\n * Checks if `value` is classified as a typed array.\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.\n * @example\n *\n * _.isTypedArray(new Uint8Array);\n * // => true\n *\n * _.isTypedArray([]);\n * // => false\n */\nvar isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;\n\nmodule.exports = isTypedArray;\n","var baseKeys = require('./_baseKeys'),\n getTag = require('./_getTag'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isArrayLike = require('./isArrayLike'),\n isBuffer = require('./isBuffer'),\n isPrototype = require('./_isPrototype'),\n isTypedArray = require('./isTypedArray');\n\n/** `Object#toString` result references. */\nvar mapTag = '[object Map]',\n setTag = '[object Set]';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if `value` is an empty object, collection, map, or set.\n *\n * Objects are considered empty if they have no own enumerable string keyed\n * properties.\n *\n * Array-like values such as `arguments` objects, arrays, buffers, strings, or\n * jQuery-like collections are considered empty if they have a `length` of `0`.\n * Similarly, maps and sets are considered empty if they have a `size` of `0`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is empty, else `false`.\n * @example\n *\n * _.isEmpty(null);\n * // => true\n *\n * _.isEmpty(true);\n * // => true\n *\n * _.isEmpty(1);\n * // => true\n *\n * _.isEmpty([1, 2, 3]);\n * // => false\n *\n * _.isEmpty({ 'a': 1 });\n * // => false\n */\nfunction isEmpty(value) {\n if (value == null) {\n return true;\n }\n if (isArrayLike(value) &&\n (isArray(value) || typeof value == 'string' || typeof value.splice == 'function' ||\n isBuffer(value) || isTypedArray(value) || isArguments(value))) {\n return !value.length;\n }\n var tag = getTag(value);\n if (tag == mapTag || tag == setTag) {\n return !value.size;\n }\n if (isPrototype(value)) {\n return !baseKeys(value).length;\n }\n for (var key in value) {\n if (hasOwnProperty.call(value, key)) {\n return false;\n }\n }\n return true;\n}\n\nmodule.exports = isEmpty;\n","import {\n CommonRef,\n HasPolymorphicAs,\n HasRequiredLinkHref,\n HasDisabled,\n JSXElement,\n ElementType,\n HasAriaDisabled,\n} from '../../types';\n\nexport type ClickableElement = 'a' | 'button' | ElementType;\n\nexport interface BaseClickableProps extends HasDisabled, HasAriaDisabled {\n children?: JSXElement;\n handleClick?: (event?: any) => void;\n handleKeyPress?: (event?: any) => void;\n ref?: CommonRef;\n}\n\nexport type RawClickableProps<E extends ClickableElement> = HasPolymorphicAs<E> &\n HasRequiredLinkHref<E> &\n BaseClickableProps;\n\n/**\n * Render clickable element (link, button or custom element)\n * (also does some basic disabled state handling)\n */\nexport const RawClickable = <E extends ClickableElement>(props: RawClickableProps<E>) => {\n const {\n children,\n handleClick,\n handleKeyPress,\n disabled,\n isDisabled = disabled,\n 'aria-disabled': ariaDisabled,\n as,\n ...forwardedProps\n } = props;\n\n const isAnyDisabled = isDisabled || ariaDisabled === 'true' || ariaDisabled === true;\n\n const Component = as as any;\n let clickableProps;\n if (Component === 'button') {\n clickableProps = { type: forwardedProps.type || 'button', disabled: isDisabled };\n } else {\n clickableProps = { tabIndex: isDisabled ? '-1' : forwardedProps.tabIndex };\n }\n\n return (\n <Component\n aria-disabled={isAnyDisabled || undefined}\n {...forwardedProps}\n {...clickableProps}\n onKeyPress={handleKeyPress}\n onClick={(event: any) => {\n if (isAnyDisabled) {\n event.stopPropagation();\n event.preventDefault();\n return;\n }\n handleClick?.(event);\n }}\n >\n {children}\n </Component>\n );\n};\n","import { ColorPalette, Emphasis, Size, Theme } from '../../constants';\nimport { classNames } from '../../utils';\nimport { HasTheme, HasAriaDisabled, AriaAttributes, CommonRef, HasClassName } from '../../types';\nimport { RawClickable, BaseClickableProps } from '../RawClickable';\n\n/**\n * Button size definition.\n */\nexport type ButtonSize = Extract<Size, 's' | 'm'>;\n\nexport interface BaseButtonProps\n extends Pick<AriaAttributes, 'aria-expanded' | 'aria-haspopup' | 'aria-pressed' | 'aria-label'>,\n HasClassName,\n HasTheme,\n HasAriaDisabled,\n BaseClickableProps {\n /** Color variant. */\n color?: ColorPalette;\n /** Emphasis variant. */\n emphasis?: Emphasis;\n /** Whether or not the button has a background color in low emphasis. */\n hasBackground?: boolean;\n /** Native anchor href property. It determines whether the Button will be a <button> or an <a>. */\n href?: string;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Whether the component is selected or not (unsupported in `high` emphasis). */\n isSelected?: boolean;\n /** Native button name property. */\n name?: string;\n /** Size variant. */\n size?: ButtonSize;\n /** Native anchor target property. */\n target?: '_self' | '_blank' | '_parent' | '_top';\n /** Native button type. */\n type?: 'submit' | 'reset' | 'button' | undefined;\n /** Custom component for the link (can be used to inject router Link). */\n linkAs?: 'a' | any;\n /** whether the button is dispalyed in full width or not */\n fullWidth?: boolean;\n /** whether the button is currently active or not */\n isActive?: boolean;\n /** whether the button is currently focused or not */\n isFocused?: boolean;\n /** whether the button is currently focused or not */\n isHovered?: boolean;\n}\n\nexport interface ButtonRootProps extends BaseButtonProps {\n variant: 'button' | 'icon';\n}\n\n/**\n * Component display name.\n */\nconst COMPONENT_NAME = 'ButtonRoot';\n\nexport const BUTTON_WRAPPER_CLASSNAME = `lumx-button-wrapper`;\nconst { block: buttonWrapperBlock } = classNames.bem(BUTTON_WRAPPER_CLASSNAME);\n\nexport const BUTTON_CLASSNAME = `lumx-button`;\nconst { block: buttonBlock } = classNames.bem(BUTTON_CLASSNAME);\n\n/**\n * Render a button wrapper with the ButtonRoot inside.\n *\n * @param props Component props.\n * @return JSX element.\n */\nconst renderButtonWrapper = (props: ButtonRootProps) => {\n const { color, emphasis, variant, fullWidth } = props;\n\n const adaptedColor =\n emphasis === Emphasis.low && (color === ColorPalette.light ? ColorPalette.dark : ColorPalette.light);\n\n const wrapperClassName = buttonWrapperBlock({\n [`color-${adaptedColor}`]: Boolean(adaptedColor),\n [`variant-${variant}`]: Boolean(variant),\n 'is-full-width': fullWidth,\n });\n const buttonProps = { ...props, hasBackground: false };\n\n return (\n <div className={wrapperClassName}>\n {/* eslint-disable-next-line @typescript-eslint/no-use-before-define */}\n {ButtonRoot(buttonProps)}\n </div>\n );\n};\n\n/**\n * ButtonRoot component.\n *\n * @param props Component props.\n * @return JSX Element.\n */\nexport const ButtonRoot = (props: ButtonRootProps) => {\n const {\n 'aria-label': ariaLabel,\n 'aria-disabled': ariaDisabled,\n children,\n className,\n color,\n emphasis,\n hasBackground,\n isSelected,\n isActive,\n isFocused,\n isHovered,\n linkAs,\n size,\n theme = Theme.light,\n variant,\n fullWidth,\n ref,\n ...forwardedProps\n } = props;\n\n const adaptedColor =\n color ||\n (emphasis !== Emphasis.high && theme === Theme.dark && ColorPalette.light) ||\n (emphasis === Emphasis.high && ColorPalette.primary) ||\n ColorPalette.dark;\n\n if (hasBackground) {\n return renderButtonWrapper({ ...props, ref, variant, color: adaptedColor });\n }\n\n const buttonClassName = classNames.join(\n className,\n buttonBlock({\n [`color-${adaptedColor}`]: Boolean(adaptedColor),\n [`emphasis-${emphasis}`]: Boolean(emphasis),\n 'is-selected': isSelected,\n 'is-disabled': Boolean(props.isDisabled || props['aria-disabled']),\n 'is-active': isActive,\n 'is-focused': isFocused,\n 'is-hovered': isHovered,\n [`size-${size}`]: Boolean(size),\n [`theme-${theme}`]: Boolean(emphasis === Emphasis.high && theme),\n [`variant-${variant}`]: Boolean(variant),\n 'is-full-width': fullWidth,\n }),\n );\n\n return RawClickable({\n as: linkAs || (forwardedProps.href ? 'a' : 'button'),\n ...forwardedProps,\n 'aria-disabled': ariaDisabled,\n 'aria-label': ariaLabel,\n ref: ref as CommonRef,\n className: buttonClassName,\n children,\n });\n};\nButtonRoot.displayName = COMPONENT_NAME;\nButtonRoot.defaultProps = {};\n","import { Emphasis, Size } from '../../constants';\nimport type { JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { BaseButtonProps, ButtonRoot } from './ButtonRoot';\n\n/**\n * Button emphasis definition.\n * @deprecated Use Emphasis instead.\n */\nexport const ButtonEmphasis = Emphasis;\n\n/**\n * Defines the props of the component.\n */\nexport interface ButtonProps extends BaseButtonProps {\n /** Left icon (SVG path). */\n leftIcon?: string;\n /** Right icon (SVG path). */\n rightIcon?: string;\n /** When `true`, the button gets as large as possible. */\n fullWidth?: boolean;\n /** Children */\n children?: JSXElement;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Button';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-button';\nconst { modifier } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ButtonProps> = {\n emphasis: Emphasis.high,\n size: Size.m,\n};\n\n/**\n * Button component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Button = (props: ButtonProps) => {\n const {\n className,\n emphasis = DEFAULT_PROPS.emphasis,\n leftIcon,\n rightIcon,\n size = DEFAULT_PROPS.size,\n ...forwardedProps\n } = props;\n\n const buttonClassName = classNames.join(\n className,\n modifier({\n 'has-left-icon': Boolean(leftIcon),\n 'has-right-icon': Boolean(rightIcon),\n }),\n );\n\n return ButtonRoot({\n emphasis,\n size,\n ...forwardedProps,\n className: buttonClassName,\n variant: 'button',\n });\n};\n\nButton.displayName = COMPONENT_NAME;\nButton.className = CLASSNAME;\nButton.defaultProps = DEFAULT_PROPS;\n","import { inject, InjectionKey, provide } from 'vue';\n\nimport { DisabledStateContextValue } from '@lumx/core/js/utils/disabledState';\n\nconst DISABLED_STATE_KEY: InjectionKey<DisabledStateContextValue> = Symbol('DISABLED_STATE_KEY');\n\nexport function useDisabledStateContext(): DisabledStateContextValue {\n return inject(DISABLED_STATE_KEY, { state: null });\n}\n\nexport function provideDisabledState(value: DisabledStateContextValue) {\n provide(DISABLED_STATE_KEY, value);\n}\n","import { computed, ComputedRef, unref } from 'vue';\nimport { getDisabledState, DisabledProps, DisabledState } from '@lumx/core/js/utils/disabledState';\nimport { useDisabledStateContext } from './useDisabledState';\n\ninterface Output<TProps extends DisabledProps> {\n /** Is disabled or aria-disabled */\n isAnyDisabled: ComputedRef<boolean | undefined>;\n disabledStateProps: ComputedRef<DisabledState>;\n otherProps: ComputedRef<Omit<TProps, 'disabled' | 'isDisabled' | 'aria-disabled' | 'ariaDisabled'>>;\n}\n\n/**\n * Resolve disabled state from props.\n * (handles `disabled`, `isDisabled` and `aria-disabled`)\n *\n * @params component props\n */\nexport function useDisableStateProps<TProps extends DisabledProps>(\n props: TProps | ComputedRef<TProps> | (() => TProps),\n): Output<TProps> {\n const disabledStateContext = useDisabledStateContext();\n\n const disabledStateProps = computed(() => {\n const p = typeof props === 'function' ? props() : unref(props);\n return getDisabledState(disabledStateContext, {\n disabled: p.disabled,\n isDisabled: p.isDisabled,\n 'aria-disabled': p['aria-disabled'] ?? p.ariaDisabled,\n });\n });\n\n const isAnyDisabled = computed(\n () => disabledStateProps.value['aria-disabled'] || disabledStateProps.value.disabled || undefined,\n );\n\n const otherProps = computed(() => {\n const p = typeof props === 'function' ? props() : unref(props);\n const { disabled, isDisabled, 'aria-disabled': _, ariaDisabled, onClick, onChange, ...rest } = p as any;\n\n // Only include onClick/onChange if not disabled (matching React behavior)\n if (!isAnyDisabled.value) {\n if (onClick) (rest as any).onClick = onClick;\n if (onChange) (rest as any).onChange = onChange;\n }\n\n return rest;\n });\n\n return { disabledStateProps, isAnyDisabled, otherProps };\n}\n","import { defineComponent, provide } from 'vue';\n\nexport const ResetTheme = defineComponent({\n name: 'ResetTheme',\n setup(_, { slots }) {\n provide('theme', undefined);\n return () => slots.default?.();\n },\n});\n","import { mdiAlertCircle } from '@lumx/icons';\n\nimport { resolveColorWithVariants } from '@lumx/core/js/utils/_internal/color';\nimport { classNames } from '../../utils';\n\nimport { ColorPalette, Size, Theme, ColorWithVariants, ColorVariant } from '../../constants';\nimport type { LumxClassName, HasTheme, HasClassName, CommonRef } from '../../types';\nimport { ICON_SIZES } from './constants';\n\nexport const COMPONENT_NAME = 'Icon';\nexport const IconClassName: LumxClassName<typeof COMPONENT_NAME> = 'lumx-icon';\n\nexport type IconSizes = (typeof ICON_SIZES)[number];\n\n/**\n * Defines the props of the component.\n */\nexport interface IconProps extends HasClassName, HasTheme {\n /** Color variant. */\n color?: ColorWithVariants;\n /** Lightened or darkened variant of the selected icon color. */\n colorVariant?: ColorVariant;\n /** Whether the icon has a shape. */\n hasShape?: boolean;\n /**\n * Icon (SVG path) draw code (`d` property of the `<path>` SVG element).\n * See https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Paths\n */\n icon: string;\n /** Size variant. */\n size?: IconSizes;\n /** Sets an alternative text on the svg. Will set an `img` role to the svg. */\n alt?: string;\n /** Vertical alignment of the icon (only applies for icons nested in Text/Heading). */\n verticalAlign?: null | 'middle';\n /** reference to the root element */\n ref?: CommonRef;\n}\n\nconst CLASSNAME = IconClassName;\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<IconProps> = {};\n\n/**\n * Icon component.\n *\n * @param props Component props.\n */\nexport const Icon = (props: IconProps) => {\n const {\n className,\n color: propColor,\n colorVariant: propColorVariant,\n hasShape,\n icon,\n size,\n ref,\n theme,\n alt,\n verticalAlign,\n ...forwardedProps\n } = props;\n\n const [color, colorVariant] = resolveColorWithVariants(propColor, propColorVariant);\n\n // Color\n let iconColor = color;\n if (!iconColor && (hasShape || theme)) {\n iconColor = theme === Theme.dark ? ColorPalette.light : ColorPalette.dark;\n }\n\n // Color variant\n let iconColorVariant = colorVariant;\n if (!iconColorVariant && hasShape && iconColor === ColorPalette.dark) {\n iconColorVariant = 'L2';\n }\n\n // Size\n let iconSize = size;\n if (size && hasShape) {\n if (size === Size.xxs || size === Size.xs) {\n iconSize = Size.s;\n } else if (size === Size.xxl) {\n iconSize = Size.xl;\n }\n } else if (hasShape) {\n iconSize = Size.m;\n }\n\n return (\n <i\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`color-${iconColor}`]: Boolean(iconColor),\n [`color-variant-${iconColorVariant}`]: Boolean(iconColorVariant),\n 'has-shape': hasShape,\n [`theme-${theme}`]: Boolean(theme),\n [`size-${iconSize}`]: Boolean(iconSize),\n 'no-shape': !hasShape,\n 'has-dark-layer': Boolean(\n !hasShape && iconColor === ColorPalette.yellow && icon === mdiAlertCircle,\n ),\n path: true,\n 'vertical-align-middle': verticalAlign === 'middle',\n }),\n )}\n >\n <svg\n aria-hidden={alt ? undefined : 'true'}\n role={alt ? 'img' : undefined}\n aria-label={alt}\n height=\"1em\"\n preserveAspectRatio=\"xMidYMid meet\"\n style={{ verticalAlign: verticalAlign ? undefined : '-0.125em' }}\n viewBox=\"0 0 24 24\"\n width=\"1em\"\n >\n <path d={icon} fill=\"currentColor\" />\n </svg>\n </i>\n );\n};\n\nIcon.displayName = COMPONENT_NAME;\nIcon.className = CLASSNAME;\nIcon.defaultProps = DEFAULT_PROPS;\n","import { defineComponent, useAttrs } from 'vue';\n\nimport { Icon as IconUI, type IconProps as UIProps } from '@lumx/core/js/components/Icon';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type IconProps = VueToJSXProps<UIProps>;\n\n/**\n * Icon component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Icon = defineComponent(\n (props: IconProps) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme({ defaultTheme: undefined });\n const className = useClassName(() => props.class);\n\n return () => (\n <IconUI {...props} {...attrs} className={className.value} theme={props.theme || defaultTheme.value} />\n );\n },\n {\n name: 'Icon',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<IconProps>()(\n 'icon',\n 'color',\n 'colorVariant',\n 'hasShape',\n 'size',\n 'alt',\n 'verticalAlign',\n 'theme',\n 'class',\n ),\n },\n);\n\nexport default Icon;\n","import type { CSSProperties } from 'react';\n\nimport { classNames } from '../../utils';\nimport type { TextElement, LumxClassName, JSXElement, HasClassName } from '../../types';\nimport { ColorWithVariants, ColorVariant, Typography, WhiteSpace } from '../../constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface TextProps extends HasClassName {\n /**\n * Color variant.\n */\n color?: ColorWithVariants;\n /**\n * Lightened or darkened variant of the selected color.\n */\n colorVariant?: ColorVariant;\n /**\n * Typography variant.\n */\n typography?: Typography;\n /**\n * Custom component to render the text.\n */\n as: TextElement;\n /**\n * Control whether the text should truncate or not.\n * Setting as `true` will make the text truncate on a single line.\n * Setting as `{ lines: number }` will make the text truncate on a multiple lines.\n */\n truncate?: boolean | { lines: number };\n /**\n * Prevents text to wrap on multiple lines\n * (automatically activated when single line text truncate is activated).\n */\n noWrap?: boolean;\n /**\n * WhiteSpace variant\n * Ignored when `noWrap` is set to true\n * Ignored when `truncate` is set to true or lines: 1\n * */\n whiteSpace?: WhiteSpace;\n /**\n * Children\n */\n children?: JSXElement;\n /** list of styles to apply */\n style?: CSSProperties;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Text';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-text';\nexport const { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS = {} as const;\n\n/**\n * Text component common props\n *\n * @param props Component props.\n * @return Common Props\n */\nexport const getTextProps = (props: Omit<TextProps, 'as'>) => {\n const { className, color, colorVariant, noWrap, typography, truncate, whiteSpace, style } = props;\n\n // Truncate mode\n const truncateLinesStyle = typeof truncate === 'object' &&\n truncate.lines > 1 && { '--lumx-text-truncate-lines': truncate.lines };\n const isTruncatedMultiline = !!truncateLinesStyle;\n const isTruncated = !!truncate;\n\n /**\n * Add custom white-space style if specified\n * Disabled if noWrap is specified\n * Disabled if truncated on one-line\n * */\n const whiteSpaceStyle = !noWrap &&\n !(isTruncated && !isTruncatedMultiline) &&\n whiteSpace && { '--lumx-text-white-space': whiteSpace };\n\n return {\n className: classNames.join(\n className,\n block({\n 'is-truncated': isTruncated && !isTruncatedMultiline,\n 'is-truncated-multiline': isTruncatedMultiline,\n 'no-wrap': noWrap,\n }),\n typography && classNames.typography(typography),\n color && classNames.font(color, colorVariant),\n ),\n style: { ...truncateLinesStyle, ...whiteSpaceStyle, ...style },\n };\n};\n","import { inject, provide } from 'vue';\n\n/** Empty object used as marker context value */\ntype TooltipContextValue = NonNullable<unknown>;\n\nconst TOOLTIP_CONTEXT_KEY = Symbol('tooltip-context');\nconst DEFAULT_VALUE = {};\n\n/**\n * Provide tooltip context marker to child components.\n * Used to detect when a component is inside a tooltip (e.g., to prevent nested tooltips).\n */\nexport function provideTooltipContext() {\n provide(TOOLTIP_CONTEXT_KEY, DEFAULT_VALUE);\n}\n\n/**\n * Inject tooltip context marker.\n * Returns the context value if inside a tooltip, undefined otherwise.\n */\nexport function useTooltipContext(): TooltipContextValue | undefined {\n return inject(TOOLTIP_CONTEXT_KEY, undefined);\n}\n","import { ref, Ref, watch } from 'vue';\nimport { useMutationObserver, useResizeObserver } from '@vueuse/core';\nimport { classNames } from '@lumx/core/js/utils';\nimport { useTooltipContext } from '../components/tooltip/context';\n\n/**\n * Compute a tooltip label based on a label element `innerText` if the text overflows.\n */\nexport function useOverflowTooltipLabel(labelRef: Ref<HTMLElement | null | undefined>) {\n const tooltipLabel = ref<string | undefined>(undefined);\n\n // Skip if already inside a tooltip (prevents nested tooltips)\n const isInsideTooltip = useTooltipContext();\n if (isInsideTooltip) {\n return { tooltipLabel };\n }\n\n const updateLabel = () => {\n const labelElement = labelRef.value;\n if (\n labelElement &&\n !labelElement.closest(`.${classNames.visuallyHidden()}`) &&\n labelElement.offsetWidth < labelElement.scrollWidth\n ) {\n tooltipLabel.value = labelElement.innerText;\n } else {\n tooltipLabel.value = undefined;\n }\n };\n\n useMutationObserver(labelRef, updateLabel, {\n childList: true,\n attributes: true,\n characterData: true,\n subtree: true,\n });\n\n useResizeObserver(labelRef, updateLabel);\n\n watch(labelRef, updateLabel, { immediate: true });\n\n return { tooltipLabel };\n}\n","import { JSXElement } from '@lumx/core/js/types';\nimport { useSlots } from 'vue';\n\n/**\n * Returns the slot casted as a JSXElement\n * @returns () => JSXElement | null\n */\nexport const useSlot = (slot: string = 'default') => {\n const slots = useSlots();\n\n return <T = JSXElement>(): T | null => {\n const slotFn = slots?.[slot];\n return slotFn ? (slotFn() as T) : null;\n };\n};\n","import { isVNode, createVNode, Fragment, VNodeArrayChildren, VNodeRef } from 'vue';\nimport { Icon } from '@lumx/vue/components/icon';\n\n/** Force wrap spaces around icons to make sure they are never stuck against text. */\nexport function wrapChildrenIconWithSpaces(children: VNodeArrayChildren | undefined): VNodeArrayChildren | undefined {\n if (!children) return undefined;\n\n const wrappedChildren: VNodeArrayChildren = [];\n\n for (const child of children) {\n if (!isVNode(child)) {\n wrappedChildren.push(child);\n continue;\n }\n\n // Check if the node is an Icon component\n if (child.type === Icon) {\n wrappedChildren.push(' ');\n wrappedChildren.push(child);\n wrappedChildren.push(' ');\n continue;\n }\n\n // Handle Fragments (recurse and flatten)\n if (child.type === Fragment && Array.isArray(child.children)) {\n const updated = wrapChildrenIconWithSpaces(child.children as VNodeArrayChildren);\n if (updated) {\n wrappedChildren.push(...updated);\n }\n continue;\n }\n\n // Handle HTML elements with children array (recurse)\n if (typeof child.type === 'string' && Array.isArray(child.children)) {\n const updated = wrapChildrenIconWithSpaces(child.children as VNodeArrayChildren);\n\n // Re-create the VNode with updated children\n const props: Record<string, any> = { ...(child.props || {}) };\n if (child.key != null) props.key = child.key;\n if (child.ref != null) props.ref = child.ref as unknown as VNodeRef;\n\n wrappedChildren.push(createVNode(child.type, props, updated));\n continue;\n }\n\n wrappedChildren.push(child);\n }\n\n return wrappedChildren;\n}\n","import { computed, defineComponent, useAttrs, useTemplateRef, type VNodeArrayChildren } from 'vue';\n\nimport { getTextProps, type TextProps as UIProps } from '@lumx/core/js/components/Text';\nimport { useClassName } from '@lumx/vue/composables/useClassName';\n\nimport { useOverflowTooltipLabel } from '../../composables/useOverflowTooltipLabel';\nimport { useSlot } from '../../composables/useSlot';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { wrapChildrenIconWithSpaces } from '../../utils/wrapChildrenIconWithSpaces';\n\nexport type TextProps = VueToJSXProps<UIProps>;\n\n/**\n * Text component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Text = defineComponent(\n (props: TextProps, { slots }) => {\n const attrs = useAttrs();\n const defaultSlot = useSlot();\n const labelRef = useTemplateRef<HTMLElement>('tooltip-label');\n const { tooltipLabel } = useOverflowTooltipLabel(labelRef);\n\n const className = useClassName(() => props.class);\n const textProps = computed(() =>\n getTextProps({\n ...props,\n className: className.value,\n }),\n );\n\n const componentProps = computed(() => {\n // Filter out 'children' to avoid Vue warning about read-only DOM property\n const { children: _, ...filteredAttrs } = attrs as any;\n return { ...filteredAttrs, ...textProps.value };\n });\n\n return () => {\n const Component = props.as || 'div';\n // Handle both slot-based children (Vue template usage) and JSX children (core component usage)\n const slot = defaultSlot<VNodeArrayChildren>() || slots.default?.();\n const children = slot ? wrapChildrenIconWithSpaces(slot) : null;\n\n return (\n <Component\n ref=\"tooltip-label\"\n {...componentProps.value}\n class={componentProps.value.className}\n style={componentProps.value.style}\n title={tooltipLabel.value}\n >\n {children}\n </Component>\n );\n };\n },\n {\n name: 'LumxText',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<TextProps>()(\n 'as',\n 'color',\n 'colorVariant',\n 'typography',\n 'truncate',\n 'noWrap',\n 'whiteSpace',\n 'style',\n 'class',\n ),\n },\n);\n\nexport default Text;\n","import isEmpty from 'lodash/isEmpty';\nimport { Comment, computed, defineComponent, toRaw, useAttrs, useSlots } from 'vue';\n\nimport {\n Button as ButtonUI,\n type ButtonProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Button/Button';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { type HyphenatedAriaProps, keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { ResetTheme } from '../../utils/theme';\nimport { Icon } from '../icon';\nimport Text from '../text/Text';\nimport { JSXElement } from '@lumx/core/js/types';\n\nexport type ButtonProps = Omit<VueToJSXProps<UIProps>, HyphenatedAriaProps>;\n\nexport const emitSchema = {\n click: (event: MouseEvent) => event instanceof MouseEvent,\n};\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * Button component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Button = defineComponent(\n (props: ButtonProps, { emit }) => {\n const slots = useSlots();\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(\n computed(() => ({ ...props, ...attrs })),\n );\n\n const handleClick = (event: MouseEvent) => {\n if (isAnyDisabled.value) {\n return;\n }\n\n emit('click', event);\n };\n\n /**\n * Render button content.\n * Prevents unnecessary wrapping:\n * - If the child is a single <Text> component, render it directly.\n * - Otherwise, wrap the content in a <span> for correct layout.\n */\n const renderContent = () => {\n const children = slots.default?.();\n\n // Filter vnodes (Matches React behavior where `{null}` renders nothing — avoids an empty wrapping)\n const visibleChildren = children?.filter((vnode) => vnode != null && vnode.type !== Comment);\n if (!visibleChildren?.length) return null;\n\n // If single Text component, render directly\n if (visibleChildren.length === 1 && visibleChildren[0].type === Text) {\n return visibleChildren[0];\n }\n\n // Otherwise wrap in span\n return <span>{visibleChildren}</span>;\n };\n\n return () => {\n const children = (\n <>\n {props.leftIcon && !isEmpty(props.leftIcon) && (\n <ResetTheme>\n <Icon icon={props.leftIcon} />\n </ResetTheme>\n )}\n {renderContent()}\n {props.rightIcon && !isEmpty(props.rightIcon) && (\n <ResetTheme>\n <Icon icon={props.rightIcon} />\n </ResetTheme>\n )}\n </>\n );\n\n const { linkAs, ...rest } = otherProps.value;\n return (\n <ButtonUI\n {...rest}\n linkAs={toRaw(linkAs)}\n {...disabledStateProps.value}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n handleClick={handleClick as any}\n children={children as JSXElement}\n />\n );\n };\n },\n {\n name: 'LumxButton',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<ButtonProps>()(\n 'leftIcon',\n 'rightIcon',\n 'color',\n 'emphasis',\n 'hasBackground',\n 'href',\n 'isDisabled',\n 'isSelected',\n 'name',\n 'size',\n 'theme',\n 'class',\n 'aria-disabled',\n 'disabled',\n 'fullWidth',\n 'isActive',\n 'isFocused',\n 'isHovered',\n 'linkAs',\n 'target',\n 'type',\n ),\n emits: emitSchema,\n },\n);\n\nexport default Button;\n","import type { JSXElement, LumxClassName, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface ToolbarProps extends HasClassName {\n /** After content (placed after the label). */\n after?: JSXElement;\n /** Before content (placed before the label). */\n before?: JSXElement;\n /** Label content. */\n label?: JSXElement;\n /** Component ref. */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const TOOLBAR_NAME = 'Toolbar';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof TOOLBAR_NAME> = 'lumx-toolbar';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ToolbarProps> = {};\n\n/**\n * Toolbar component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Toolbar = (props: ToolbarProps) => {\n const { after, before, className, label, ref, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n 'has-after': Boolean(after),\n 'has-before': Boolean(before),\n 'has-label': Boolean(label),\n }),\n )}\n >\n {before && <div className={element('before')}>{before}</div>}\n {label && <div className={element('label')}>{label}</div>}\n {after && <div className={element('after')}>{after}</div>}\n </div>\n );\n};\n","import { defineComponent, useAttrs } from 'vue';\nimport {\n Toolbar as ToolbarUI,\n type ToolbarProps as UIProps,\n CLASSNAME,\n TOOLBAR_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Toolbar';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nexport type ToolbarProps = VueToJSXProps<UIProps, 'label' | 'after' | 'before'>;\n\nexport { CLASSNAME, TOOLBAR_NAME, DEFAULT_PROPS };\n\nconst Toolbar = defineComponent(\n (props: ToolbarProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n return () => {\n // Fall back to attrs for before/label/after to support core JSX calling\n // Toolbar with props (React-style) instead of named slots (Vue-style).\n return (\n <ToolbarUI\n {...props}\n {...attrs}\n className={className.value}\n label={(slots.default?.() ?? (attrs as any).label) as JSXElement}\n before={(slots.before?.() ?? (attrs as any).before) as JSXElement}\n after={(slots.after?.() ?? (attrs as any).after) as JSXElement}\n />\n );\n };\n },\n {\n name: 'LumxToolbar',\n inheritAttrs: false,\n props: keysOf<ToolbarProps>()('class'),\n },\n);\n\nexport default Toolbar;\n","import { Text as TextVNode, computed, defineComponent, shallowRef, useAttrs } from 'vue';\nimport { AlertDialog as UI, COMPONENT_NAME, type BaseAlertDialogProps } from '@lumx/core/js/components/AlertDialog';\nimport type { DialogSizes } from '@lumx/core/js/components/Dialog';\nimport type { GenericProps, JSXElement } from '@lumx/core/js/types';\n\nimport { useId } from '../../composables/useId';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, type ClassValue } from '../../utils/VueToJSX';\n\nimport Dialog from '../dialog/Dialog';\nimport Button from '../button/Button';\nimport Icon from '../icon/Icon';\nimport Toolbar from '../toolbar/Toolbar';\n\ntype ButtonActionProps = {\n label: string;\n onClick?: () => void;\n [key: string]: any;\n};\n\nexport interface AlertDialogProps extends Pick<BaseAlertDialogProps, 'kind' | 'title'> {\n /** Additional class name. */\n class?: ClassValue;\n /** Size variant. */\n size?: DialogSizes;\n /** Whether the dialog is open. */\n isOpen?: boolean;\n /** Reference to the parent element that triggered modal opening. */\n parentElement?: HTMLElement;\n /** Additional props for the dialog container element. */\n dialogProps?: GenericProps;\n /** Props forwarded to the confirm button. */\n confirmProps: ButtonActionProps;\n /** Props forwarded to the cancel button. Will not render a cancel button if undefined. */\n cancelProps?: ButtonActionProps;\n /** Unique identifier for the dialog. Generated automatically if not provided. */\n id?: string;\n}\n\nexport const emitSchema = {\n close: () => true,\n};\n\n/**\n * AlertDialog component.\n *\n * An alert dialog is a modal dialog that interrupts the user's workflow to\n * communicate an important message and acquire a response.\n *\n * It should not have a complex content.\n * Children of this component should only be strings, paragraphs or links.\n */\nconst AlertDialog = defineComponent(\n (props: AlertDialogProps, { emit, slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n const generatedId = useId();\n const uniqueId = computed(() => props.id || generatedId);\n\n const cancelButtonEl = shallowRef<HTMLElement | undefined>(undefined);\n const confirmButtonEl = shallowRef<HTMLElement | undefined>(undefined);\n\n return () => {\n const children = slots.default?.();\n const isStringContent = children?.length === 1 && children[0].type === TextVNode;\n const DescriptionElement = isStringContent ? 'p' : 'div';\n\n // isOpen, parentElement and onClose are not in core's AlertDialogProps but flow\n // through to Dialog via ...forwardedProps — spread to avoid excess property checking.\n const dialogPassthrough = {\n isOpen: props.isOpen,\n parentElement: props.parentElement,\n onClose: () => emit('close'),\n };\n\n // Inject vnode lifecycle hooks into button props to capture DOM elements for focus\n // management. We intentionally omit cancelButtonRef/confirmationButtonRef from the\n // UI() call so core's focusElement fallback stays undefined (not a callback function).\n const confirmProps = {\n ...props.confirmProps,\n onVnodeMounted: (vnode: any) => {\n confirmButtonEl.value = vnode.el;\n },\n onVnodeUnmounted: () => {\n confirmButtonEl.value = undefined;\n },\n };\n const cancelProps = props.cancelProps && {\n ...props.cancelProps,\n onVnodeMounted: (vnode: any) => {\n cancelButtonEl.value = vnode.el;\n },\n onVnodeUnmounted: () => {\n cancelButtonEl.value = undefined;\n },\n };\n\n return UI({\n ...attrs,\n ...dialogPassthrough,\n Button,\n Dialog,\n Icon,\n Toolbar,\n DescriptionElement,\n focusElement: props.cancelProps ? cancelButtonEl.value : confirmButtonEl.value,\n className: className.value,\n id: uniqueId.value,\n kind: props.kind,\n size: props.size,\n title: props.title,\n dialogProps: props.dialogProps,\n confirmProps,\n cancelProps,\n children: children as JSXElement,\n });\n };\n },\n {\n name: COMPONENT_NAME,\n inheritAttrs: false,\n props: keysOf<AlertDialogProps>()(\n 'class',\n 'kind',\n 'title',\n 'size',\n 'isOpen',\n 'parentElement',\n 'dialogProps',\n 'confirmProps',\n 'cancelProps',\n 'id',\n ),\n emits: emitSchema,\n },\n);\n\nexport default AlertDialog;\n","import type { HasClassName, JSXElement, LumxClassName, HasTheme, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport { Size } from '../../constants';\n\n/**\n * Avatar sizes.\n */\nexport type AvatarSize = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface AvatarProps extends HasTheme, HasClassName {\n /** Action toolbar content. */\n actions?: JSXElement;\n /** Badge. */\n badge?: JSXElement;\n /** Image URL. */\n image: JSXElement;\n /** Size variant. */\n size?: AvatarSize;\n /** Props to pass to the thumbnail (minus those already set by the Avatar props). */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Avatar';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-avatar';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS = {\n size: Size.m,\n} as const;\n\n/**\n * Avatar component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Avatar = (props: AvatarProps) => {\n const { actions, badge, className, image, size = DEFAULT_PROPS.size, theme, ref, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`size-${size}`]: Boolean(size),\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n {image}\n {actions && <div className={element('actions')}>{actions}</div>}\n {badge && <div className={element('badge')}>{badge}</div>}\n </div>\n );\n};\n","import type { CSSProperties } from 'react';\nimport type { RectSize } from '../../types';\nimport { AspectRatio } from '../../constants';\nimport type { FocusPoint, LoadingState } from './types';\n\n/**\n * Determines the loading state of an HTML image element.\n *\n * @param img - The HTML image element to check\n * @param event - Optional event (load or error) that triggered the state check\n * @returns The current loading state: 'hasError', 'isLoading', or 'isLoaded'\n */\nexport function getImageLoadingState(img: HTMLImageElement | null | undefined, event?: Event): LoadingState {\n // Error event occurred or image has no source.\n if (event?.type === 'error' || (img?.complete && !img.getAttribute('src'))) {\n return 'hasError';\n }\n // Image is undefined or incomplete.\n if (!img || !img.complete) {\n return 'isLoading';\n }\n // Else loaded.\n return 'isLoaded';\n}\n\n/**\n * Parameters for getting image size.\n */\nexport interface GetImageSizeParams {\n /** Image URL (used for validation) */\n image?: string;\n /** Aspect ratio setting */\n aspectRatio?: AspectRatio;\n /** Focus point (if not set, size calculation is skipped) */\n focusPoint?: FocusPoint;\n /** Width from imgProps */\n width?: number;\n /** Height from imgProps */\n height?: number;\n /** Image element (for getting natural dimensions) */\n element?: HTMLImageElement;\n /** Whether image is loaded */\n isLoaded: boolean;\n}\n\n/**\n * Gets the natural image size from props or element.\n * Returns undefined if focus point is not applicable or size cannot be determined.\n *\n * @param params - Image size parameters\n * @returns Image size or undefined\n */\nexport function getImageSize({\n image,\n aspectRatio,\n focusPoint,\n width,\n height,\n element,\n isLoaded,\n}: GetImageSizeParams): RectSize | undefined {\n // Focus point is not applicable => exit early\n if (!image || aspectRatio === AspectRatio.original || (!focusPoint?.x && !focusPoint?.y)) {\n return undefined;\n }\n // Size provided via props\n if (typeof width === 'number' && typeof height === 'number') {\n return { width, height };\n }\n // Size from loaded element\n if (element && isLoaded) {\n return { width: element.naturalWidth, height: element.naturalHeight };\n }\n return undefined;\n}\n\n/**\n * Calculate shift position to center the focus point in the container.\n *\n * This function computes the percentage offset needed to position an image\n * such that a specific focus point on the image aligns with the center of\n * the container, taking into account the image's scale.\n *\n * @param params - Focus point shift calculation parameters\n * @returns Percentage shift (0-100) for CSS positioning\n */\nexport function shiftPosition({\n scale,\n focusPoint,\n imageSize,\n containerSize,\n}: {\n scale: number;\n focusPoint: number;\n imageSize: number;\n containerSize: number;\n}): number {\n const scaledSize = imageSize / scale;\n if (scaledSize === containerSize) return 0;\n\n const scaledFocusHeight = focusPoint * scaledSize;\n const startFocus = scaledFocusHeight - containerSize / 2;\n const shift = startFocus / (scaledSize - containerSize);\n\n return Math.floor(Math.max(Math.min(shift, 1), 0) * 100);\n}\n\n/**\n * Parameters for calculating focus point style.\n */\nexport interface CalculateFocusPointStyleParams {\n /** Image URL */\n image?: string;\n /** Aspect ratio */\n aspectRatio?: AspectRatio;\n /** Focus point */\n focusPoint?: FocusPoint;\n /** Image element (for validation) */\n element?: HTMLImageElement;\n /** Natural image size */\n imageSize?: RectSize;\n /** Container size */\n containerSize?: RectSize;\n}\n\n/**\n * Calculates CSS style for applying focus point positioning.\n *\n * @param params - Focus point style parameters\n * @returns CSS properties to apply to the image\n */\nexport function calculateFocusPointStyle({\n image,\n aspectRatio,\n focusPoint,\n element,\n imageSize,\n containerSize,\n}: CalculateFocusPointStyleParams): CSSProperties {\n // Focus point is not applicable => exit early\n if (!image || aspectRatio === AspectRatio.original || (!focusPoint?.x && !focusPoint?.y)) {\n return {};\n }\n\n if (!element || !imageSize) {\n // Focus point can be computed but not right now (image size unknown).\n return { visibility: 'hidden' };\n }\n\n if (!containerSize || !imageSize.height || !imageSize.width) {\n // Missing container or image size, abort focus point compute.\n return {};\n }\n\n const heightScale = imageSize.height / containerSize.height;\n const widthScale = imageSize.width / containerSize.width;\n const scale = Math.min(widthScale, heightScale);\n\n // Focus Y relative to the top (instead of the center)\n const focusPointFromTop = Math.abs((focusPoint?.y || 0) - 1) / 2;\n const y = shiftPosition({\n scale,\n focusPoint: focusPointFromTop,\n imageSize: imageSize.height,\n containerSize: containerSize.height,\n });\n\n // Focus X relative to the left (instead of the center)\n const focusPointFromLeft = Math.abs((focusPoint?.x || 0) + 1) / 2;\n const x = shiftPosition({\n scale,\n focusPoint: focusPointFromLeft,\n imageSize: imageSize.width,\n containerSize: containerSize.width,\n });\n\n const objectPosition = `${x}% ${y}%`;\n\n return { objectPosition };\n}\n","import type { CSSProperties, ImgHTMLAttributes } from 'react';\n\nimport { AspectRatio, HorizontalAlignment, Size } from '@lumx/core/js/constants';\nimport type { GenericProps, HasTheme, CommonRef, JSXElement, LumxClassName, HasClassName } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { mdiImageBroken } from '@lumx/icons';\nimport { Icon } from '../Icon';\nimport { RawClickable } from '../RawClickable';\nimport { ThumbnailSize, ThumbnailVariant, ThumbnailObjectFit } from './types';\n\ntype ImgHTMLProps = ImgHTMLAttributes<HTMLImageElement>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ThumbnailProps extends HasTheme, HasClassName {\n /** Alignment of the thumbnail in it's parent (requires flex parent). */\n align?: HorizontalAlignment;\n /** Image alternative text. */\n alt: string;\n /** Image aspect ratio. */\n aspectRatio?: AspectRatio;\n /** Badge. */\n badge?: JSXElement;\n /** Image cross origin resource policy. */\n crossOrigin?: ImgHTMLProps['crossOrigin'];\n /** Fallback icon (SVG path) or react node when image fails to load. */\n fallback?: string | JSXElement;\n /** Whether the thumbnail should fill it's parent size (requires flex parent) or not. */\n fillHeight?: boolean;\n /** Image URL. */\n image: string;\n loadingState: string;\n /** Props to inject into the native <img> element. */\n imgProps?: ImgHTMLProps;\n /** Reference to the native <img> element. */\n imgRef?: CommonRef;\n ref?: CommonRef;\n /** Set to true to force the display of the loading skeleton. */\n isLoading?: boolean;\n /** Set how the image should fit when its aspect ratio is constrained */\n objectFit?: ThumbnailObjectFit;\n /** Size variant of the component. */\n size?: ThumbnailSize;\n /** Image loading mode. */\n loading?: 'eager' | 'lazy';\n /** Ref of an existing placeholder image to display while loading. */\n loadingPlaceholderImageRef?: React.RefObject<HTMLImageElement>;\n /** On click callback. */\n handleClick?: (event: any) => void;\n /** On key press callback. */\n handleKeyPress?: (event: any) => void;\n /** Variant of the component. */\n variant?: ThumbnailVariant;\n /** Props to pass to the link wrapping the thumbnail. */\n linkProps?: GenericProps;\n focusPointStyle?: GenericProps;\n disabledStateProps?: GenericProps;\n isAnyDisabled?: boolean;\n /** Custom react component for the link (can be used to inject react router Link). */\n linkAs?: 'a' | any;\n 'aria-label'?: string;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Thumbnail';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-thumbnail';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ThumbnailProps> = {\n fallback: mdiImageBroken,\n loading: 'lazy',\n};\n\n/**\n * Thumbnail component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Thumbnail = (props: ThumbnailProps) => {\n const {\n align,\n alt,\n aspectRatio = AspectRatio.original,\n badge,\n className,\n crossOrigin,\n ref,\n fallback = DEFAULT_PROPS.fallback,\n focusPointStyle,\n fillHeight,\n image,\n imgProps,\n imgRef: propImgRef,\n isLoading: isLoadingProp,\n objectFit,\n loading = DEFAULT_PROPS.loading,\n loadingPlaceholderImageRef,\n isAnyDisabled,\n disabledStateProps,\n size,\n theme,\n loadingState,\n variant,\n linkProps,\n linkAs,\n handleClick,\n handleKeyPress,\n ...forwardedProps\n } = props;\n const isLoading = isLoadingProp || loadingState === 'isLoading';\n const hasError = loadingState === 'hasError';\n\n const hasIconErrorFallback = hasError && typeof fallback === 'string';\n const hasCustomErrorFallback = hasError && !hasIconErrorFallback;\n const imageErrorStyle: CSSProperties = {};\n if (hasIconErrorFallback) {\n // Keep the image layout on icon fallback.\n imageErrorStyle.visibility = 'hidden';\n } else if (hasCustomErrorFallback) {\n // Remove the image on custom fallback.\n imageErrorStyle.display = 'none';\n }\n\n const isLink = Boolean(linkProps?.href || linkAs);\n const isClickable = !isAnyDisabled && Boolean(isLink || !!handleClick || !!handleKeyPress);\n\n const wrapperProps = { ...forwardedProps };\n if (isClickable) {\n Object.assign(wrapperProps, { as: linkAs || (linkProps?.href ? 'a' : 'button') }, disabledStateProps);\n if (isLink) {\n Object.assign(wrapperProps, linkProps);\n } else {\n wrapperProps['aria-label'] = forwardedProps['aria-label'] || alt;\n }\n }\n\n const wrapperClassName = classNames.join(\n linkProps?.className,\n className,\n block({\n [`align-${align}`]: Boolean(align),\n [`aspect-ratio-${aspectRatio}`]: Boolean(aspectRatio),\n [`size-${size}`]: Boolean(size),\n [`theme-${theme}`]: Boolean(theme),\n [`variant-${variant}`]: Boolean(variant),\n 'is-clickable': isClickable,\n 'has-error': hasError,\n 'has-icon-error-fallback': hasIconErrorFallback,\n 'has-custom-error-fallback': hasCustomErrorFallback,\n 'is-loading': isLoading,\n [`object-fit-${objectFit}`]: Boolean(objectFit),\n 'has-badge': !!badge,\n 'fill-height': fillHeight,\n }),\n );\n\n // If we have a loading placeholder image that is really loaded (complete)\n const loadingPlaceholderImage =\n (isLoading && loadingPlaceholderImageRef?.current?.complete && loadingPlaceholderImageRef?.current) ||\n undefined;\n\n // Set loading placeholder image as background\n const loadingStyle = loadingPlaceholderImage\n ? { backgroundImage: `url(${loadingPlaceholderImage.src})` }\n : undefined;\n\n const innerImage = (\n <>\n <span className={element('background')}>\n <img\n // Use placeholder image size\n width={loadingPlaceholderImage?.naturalWidth}\n height={loadingPlaceholderImage?.naturalHeight}\n {...imgProps}\n style={{\n // Reserve space while loading (when possible)\n width: isLoading ? imgProps?.width || loadingPlaceholderImage?.naturalWidth : undefined,\n ...imgProps?.style,\n ...imageErrorStyle,\n ...focusPointStyle,\n ...loadingStyle,\n }}\n ref={propImgRef}\n className={classNames.join(\n element('image', {\n 'is-loading': isLoading,\n 'has-defined-size': Boolean(imgProps?.height && imgProps.width),\n }),\n imgProps?.className,\n )}\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n // @ts-ignore - crossOrigin prop compatibility between React and Vue JSX\n crossOrigin={crossOrigin}\n src={image}\n alt={alt}\n loading={loading}\n />\n {!isLoading && hasError && (\n <span className={element('fallback')}>\n {hasIconErrorFallback ? Icon({ icon: fallback as string, size: Size.xxs, theme }) : fallback}\n </span>\n )}\n </span>\n {badge}\n </>\n );\n\n /** Render `RawClickable` as a function since it is a core component which needs to be treated as such */\n if (isClickable) {\n return RawClickable({\n ref,\n ...wrapperProps,\n className: wrapperClassName,\n children: innerImage as JSXElement,\n handleClick,\n handleKeyPress,\n });\n }\n\n return (\n <div ref={ref} {...wrapperProps} className={wrapperClassName}>\n {innerImage}\n </div>\n );\n};\n\nexport * from './utils';\n","import { getCurrentInstance } from 'vue';\n\n/**\n * Check if a specific event listener is attached to the current component instance.\n *\n * @param eventName - The event name to check (e.g., 'onClick', 'onKeyPress')\n * @returns true if the event listener exists, false otherwise\n */\nexport const useHasEventListener = (eventName: string): boolean => {\n const instance = getCurrentInstance();\n return instance?.vnode.props?.[eventName] !== undefined;\n};\n","import { ref, watch, onBeforeUnmount, Ref } from 'vue';\nimport { getImageLoadingState } from '@lumx/core/js/components/Thumbnail';\nimport { type LoadingState } from '@lumx/core/js/components/Thumbnail/types';\n\n/**\n * Vue composable to track image loading state.\n *\n * @param imageURL - The URL of the image to track\n * @param imgRef - Reference to the HTML image element\n * @returns The current loading state ('hasError', 'isLoading', or 'isLoaded')\n */\nexport function useImageLoad(imageURL: Ref<string>, imgRef: Ref<HTMLImageElement | undefined>): Ref<LoadingState> {\n const state = ref<LoadingState>(getImageLoadingState(imgRef.value));\n\n // Update state when changing image URL or DOM reference.\n watch(\n [imageURL, imgRef],\n () => {\n state.value = getImageLoadingState(imgRef.value);\n },\n { immediate: true },\n );\n\n const update = (event?: Event) => {\n if (imgRef.value) {\n state.value = getImageLoadingState(imgRef.value, event);\n }\n };\n\n // Listen to `load` and `error` event on image\n watch(\n imgRef,\n (img, oldImg) => {\n // Remove listeners from old image\n if (oldImg) {\n oldImg.removeEventListener('load', update);\n oldImg.removeEventListener('error', update);\n }\n\n // Add listeners to new image\n if (img) {\n img.addEventListener('load', update);\n img.addEventListener('error', update);\n }\n },\n { immediate: true },\n );\n\n // Cleanup on unmount\n onBeforeUnmount(() => {\n if (imgRef.value) {\n imgRef.value.removeEventListener('load', update);\n imgRef.value.removeEventListener('error', update);\n }\n });\n\n return state;\n}\n","import { ref, computed, watch, nextTick, Ref, ComputedRef, CSSProperties } from 'vue';\nimport { getImageSize, calculateFocusPointStyle } from '@lumx/core/js/components/Thumbnail';\nimport { RectSize } from '@lumx/core/js/types';\nimport { AspectRatio } from '@lumx/core/js/constants';\nimport { FocusPoint } from '@lumx/core/js/components/Thumbnail/types';\n\ninterface FocusPointStyleParams {\n image: Ref<string>;\n aspectRatio: Ref<AspectRatio | undefined>;\n focusPoint: Ref<FocusPoint | undefined>;\n width: Ref<number | undefined>;\n height: Ref<number | undefined>;\n element: Ref<HTMLImageElement | undefined>;\n isLoaded: Ref<boolean>;\n}\n\n/**\n * Vue composable to compute CSS properties for focus point positioning.\n *\n * @param params - Focus point style parameters\n * @returns Computed CSS properties for the image\n */\nexport function useFocusPointStyle(params: FocusPointStyleParams): ComputedRef<CSSProperties> {\n const { image, aspectRatio, focusPoint, width, height, element, isLoaded } = params;\n\n // Get natural image size from imgProps or img element.\n const imageSize = computed<RectSize | undefined>(() =>\n getImageSize({\n image: image.value,\n aspectRatio: aspectRatio.value,\n focusPoint: focusPoint.value,\n width: width.value,\n height: height.value,\n element: element.value,\n isLoaded: isLoaded.value,\n }),\n );\n\n // Get container size (dependent on imageSize).\n const containerSize = ref<RectSize | undefined>(undefined);\n\n const updateContainerSize = () => {\n const cWidth = element.value?.offsetWidth;\n const cHeight = element.value?.offsetHeight;\n if (cWidth && cHeight) {\n // Update only if needed.\n const oldContainerSize = containerSize.value;\n if (oldContainerSize?.width !== cWidth || oldContainerSize?.height !== cHeight) {\n containerSize.value = { width: cWidth, height: cHeight };\n }\n } else if (imageSize.value) {\n // Wait for a render (in case the container size is dependent on the image size).\n requestAnimationFrame(updateContainerSize);\n }\n };\n\n // Watch for changes that affect container size\n watch(\n [() => element.value?.offsetWidth, () => element.value?.offsetHeight, imageSize],\n () => {\n nextTick(updateContainerSize);\n },\n { immediate: true },\n );\n\n // Compute style.\n const style = computed(\n () =>\n calculateFocusPointStyle({\n image: image.value,\n aspectRatio: aspectRatio.value,\n focusPoint: focusPoint.value,\n element: element.value,\n imageSize: imageSize.value,\n containerSize: containerSize.value,\n }) as CSSProperties,\n );\n\n return style;\n}\n","import { computed, defineComponent, ref, toRaw, toRef, useAttrs } from 'vue';\n\nimport {\n Thumbnail as ThumbnailUI,\n type ThumbnailProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n element,\n} from '@lumx/core/js/components/Thumbnail';\nimport { type FocusPoint } from '@lumx/core/js/components/Thumbnail/types';\nimport { classNames } from '@lumx/core/js/utils';\nimport { JSXElement } from '@lumx/core/js/types';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { useHasEventListener } from '../../composables/useHasEventListener';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { useImageLoad } from './useImageLoad';\nimport { useFocusPointStyle } from './useFocusPointStyle';\n\nexport type ThumbnailProps = VueToJSXProps<\n Omit<\n UIProps,\n 'loadingState' | 'isAnyDisabled' | 'focusPointStyle' | 'disabledStateProps' | 'badge' | 'imgRef' | 'fallback'\n >\n> & {\n /** Apply relative vertical and horizontal shift (from -1 to 1) on the image position inside the thumbnail. */\n focusPoint?: FocusPoint;\n /** ARIA disabled state */\n 'aria-disabled'?: boolean | 'true' | 'false';\n};\n\nexport const emitSchema = {\n click: (event: Event) => event instanceof Event,\n keyPress: (event: Event) => event instanceof Event,\n};\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * Thumbnail component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Thumbnail = defineComponent(\n (props: ThumbnailProps, { emit, slots }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n const imgElement = ref<HTMLImageElement>();\n\n const hasClickListener = useHasEventListener('onClick');\n const hasKeyPressListener = useHasEventListener('onKeyPress');\n\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(\n computed(() => ({ ...props, ...attrs })),\n );\n\n // Image loading state.\n const loadingState = useImageLoad(\n toRef(() => props.image),\n imgElement,\n );\n const isLoaded = computed(() => loadingState.value === 'isLoaded');\n\n // Focus point style.\n const focusPointStyle = useFocusPointStyle({\n image: toRef(() => props.image),\n aspectRatio: toRef(() => props.aspectRatio),\n focusPoint: toRef(() => props.focusPoint),\n width: toRef(() => (typeof props.imgProps?.width === 'number' ? props.imgProps.width : undefined)),\n height: toRef(() => (typeof props.imgProps?.height === 'number' ? props.imgProps.height : undefined)),\n element: imgElement,\n isLoaded,\n });\n\n const handleClick = (event: Event) => {\n if (isAnyDisabled.value) {\n return;\n }\n\n emit('click', event);\n };\n\n const handleKeyPress = (event: Event) => {\n if (isAnyDisabled.value) {\n return;\n }\n\n emit('keyPress', event);\n };\n\n return () => {\n const badge = slots.badge?.();\n const fallback = slots.fallback?.();\n\n const { linkAs, ...restProps } = otherProps.value;\n return (\n <ThumbnailUI\n {...restProps}\n linkAs={toRaw(linkAs)}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n isAnyDisabled={isAnyDisabled.value}\n disabledStateProps={disabledStateProps.value}\n focusPointStyle={focusPointStyle.value}\n loadingState={loadingState.value}\n imgRef={imgElement}\n image={props.image}\n handleClick={hasClickListener ? handleClick : undefined}\n handleKeyPress={hasKeyPressListener ? handleKeyPress : undefined}\n fallback={fallback as JSXElement}\n badge={\n badge &&\n (Array.isArray(badge)\n ? badge.map((b: any) => ({\n ...b,\n props: {\n ...b.props,\n class: classNames.join(element('badge'), b.props?.class),\n },\n }))\n : {\n ...(badge as any),\n props: {\n ...(badge as any).props,\n class: classNames.join(element('badge'), (badge as any).props?.class),\n },\n })\n }\n />\n );\n };\n },\n {\n name: 'LumxThumbnail',\n inheritAttrs: false,\n props: keysOf<ThumbnailProps>()(\n 'align',\n 'alt',\n 'aspectRatio',\n 'class',\n 'crossOrigin',\n 'fillHeight',\n 'focusPoint',\n 'image',\n 'imgProps',\n 'isLoading',\n 'linkAs',\n 'linkProps',\n 'loading',\n 'loadingPlaceholderImageRef',\n 'objectFit',\n 'size',\n 'theme',\n 'variant',\n 'aria-disabled',\n 'aria-label',\n ),\n emits: emitSchema,\n },\n);\n\nexport default Thumbnail;\n","import { AspectRatio, Size } from '../../constants';\nimport { ValueOf } from '../../types';\n\n/**\n * Focal point using vertical alignment, horizontal alignment or coordinates (from -1 to 1).\n */\nexport type FocusPoint = { x?: number; y?: number };\n\n/**\n * Loading attribute is not yet supported in typescript, so we need\n * to add it in order to avoid a ts error.\n * https://github.com/typescript-cheatsheets/react-typescript-cheatsheet/blob/master/ADVANCED.md#adding-non-standard-attributes\n */\ndeclare module 'react' {\n interface ImgHTMLAttributes<T> extends React.HTMLAttributes<T> {\n loading?: 'eager' | 'lazy';\n }\n}\n\n/**\n * All available aspect ratios.\n * @deprecated\n */\nexport const ThumbnailAspectRatio: Record<string, AspectRatio> = { ...AspectRatio };\n\n/**\n * Thumbnail sizes.\n */\nexport type ThumbnailSize = Extract<Size, 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl'>;\n\n/**\n * Thumbnail variants.\n */\nexport const ThumbnailVariant = {\n squared: 'squared',\n rounded: 'rounded',\n} as const;\nexport type ThumbnailVariant = ValueOf<typeof ThumbnailVariant>;\n\n/**\n * Thumbnail object fit.\n */\nexport const ThumbnailObjectFit = {\n cover: 'cover',\n contain: 'contain',\n} as const;\nexport type ThumbnailObjectFit = ValueOf<typeof ThumbnailObjectFit>;\n\nexport type LoadingState = 'isLoading' | 'isLoaded' | 'hasError';\n","import { defineComponent, useAttrs } from 'vue';\n\nimport {\n Avatar as AvatarUI,\n type AvatarProps as UIProps,\n DEFAULT_PROPS,\n element,\n type AvatarSize,\n} from '@lumx/core/js/components/Avatar';\nimport { AspectRatio } from '@lumx/core/js/constants';\nimport type { GenericProps, JSXElement } from '@lumx/core/js/types';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { Thumbnail, type ThumbnailProps } from '../thumbnail';\n\nexport type { AvatarSize };\n\nexport type AvatarProps = VueToJSXProps<UIProps, 'image' | 'actions' | 'badge'> & {\n /** Image URL. */\n image: string;\n /** Image alternative text. */\n alt: string;\n /** Props to pass to the link wrapping the thumbnail. */\n linkProps?: GenericProps;\n /** Custom component for the link (can be used to inject vue-router RouterLink). */\n linkAs?: 'a' | any;\n /** Props to pass to the thumbnail (minus those already set by the Avatar props). */\n thumbnailProps?: Omit<ThumbnailProps, 'image' | 'alt' | 'size' | 'theme' | 'aspectRatio'>;\n};\n\nexport const emitSchema = {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n click: (_event?: MouseEvent) => true,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n keypress: (_event?: KeyboardEvent) => true,\n};\n\nconst Avatar = defineComponent(\n (props: AvatarProps, { emit, slots }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n const handleClick = (event: Event) => emit('click', event as MouseEvent);\n const handleKeyPress = (event: Event) => emit('keypress', event as KeyboardEvent);\n\n return () => {\n const { image, alt, size = DEFAULT_PROPS.size, theme, linkProps, linkAs, thumbnailProps } = props;\n const resolvedTheme = theme || defaultTheme.value;\n\n const actionsContent = slots.actions?.() as JSXElement;\n const badgeContent = slots.badge?.() as JSXElement;\n\n return (\n <AvatarUI\n {...(attrs as any)}\n className={className.value}\n theme={resolvedTheme}\n size={size}\n actions={actionsContent}\n badge={badgeContent}\n image={\n <Thumbnail\n linkProps={linkProps}\n linkAs={linkAs}\n class={element('thumbnail')}\n onClick={handleClick}\n onKeyPress={handleKeyPress}\n {...thumbnailProps}\n aspectRatio={AspectRatio.square}\n size={size}\n image={image}\n alt={alt}\n theme={resolvedTheme}\n />\n }\n />\n );\n };\n },\n {\n name: 'LumxAvatar',\n inheritAttrs: false,\n props: keysOf<AvatarProps>()('image', 'alt', 'size', 'theme', 'linkProps', 'linkAs', 'thumbnailProps', 'class'),\n emits: emitSchema,\n },\n);\n\nexport default Avatar;\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport type { ComboboxCallbacks } from './types';\n\n/**\n * Label display mode for the ComboboxButton.\n * - `'show-selection'`: Show the selected value if available, otherwise the label.\n * - `'show-label'`: Always show the label.\n * - `'show-tooltip'`: Show nothing in the button; label appears only in tooltip.\n */\nexport type ComboboxButtonLabelDisplayMode = 'show-selection' | 'show-label' | 'show-tooltip';\n\n/**\n * Defines the props for the core ComboboxButton template.\n */\nexport interface ComboboxButtonProps extends HasClassName, ComboboxCallbacks {\n /** The label for the button (used for ARIA and tooltip). */\n label: string;\n /** The currently selected value to display. */\n value?: string;\n /** Controls how the label/value is displayed. */\n labelDisplayMode?: ComboboxButtonLabelDisplayMode;\n /** The ID of the listbox element (for aria-controls). */\n listboxId?: string;\n /** Whether the combobox is open. */\n isOpen?: boolean;\n /** ref to the root button element. */\n ref?: CommonRef;\n /** Custom render button */\n renderButton?: (buttonProps: Record<string, any>) => JSXElement;\n}\n\n/**\n * Injected framework-specific components for ComboboxButton rendering.\n */\nexport interface ComboboxButtonComponents {\n /** Button component (framework-specific, e.g. React Button with theme/disabled handling). */\n Button: any;\n /** Tooltip wrapper component. */\n Tooltip: any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxButton';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-button';\n\n/**\n * ComboboxButton core template.\n * Renders a Button with combobox ARIA attributes, wrapped in a Tooltip.\n *\n * Framework-specific components (Tooltip) are passed as a second argument\n * by the React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const ComboboxButton = (props: ComboboxButtonProps, { Button, Tooltip }: ComboboxButtonComponents) => {\n const {\n className,\n label,\n value,\n labelDisplayMode = 'show-selection',\n listboxId,\n isOpen,\n ref,\n renderButton,\n ...forwardedProps\n } = props;\n\n // Determine what content to display\n const showSelection = labelDisplayMode === 'show-selection';\n const tooltipOnly = labelDisplayMode === 'show-tooltip';\n\n const selectionLabel = showSelection && value ? value : null;\n const content: JSXElement = tooltipOnly ? null : selectionLabel || label;\n\n // Hide tooltip if the displayed content equals the label or when open\n const hideTooltip = label === content || isOpen;\n\n const componentProps = {\n ref,\n ...forwardedProps,\n className: classNames.join(className, CLASSNAME),\n role: 'combobox',\n 'aria-controls': listboxId,\n 'aria-haspopup': 'listbox',\n 'aria-expanded': isOpen,\n 'aria-activedescendant': '',\n children: content,\n };\n\n return (\n <Tooltip\n className={hideTooltip ? classNames.visuallyHidden() : undefined}\n label={label}\n closeMode=\"hide\"\n ariaLinkMode=\"aria-labelledby\"\n >\n {renderButton ? renderButton(componentProps) : <Button {...componentProps}>{content}</Button>}\n </Tooltip>\n );\n};\n","import type { OptionRegistration, SectionRegistration, SectionState } from './types';\n\n/**\n * Get the value for a combobox option element.\n * Uses `data-value` when set; falls back to the element's trimmed `textContent`.\n *\n * This is the *selection* value , which may differ from the visible label\n */\nexport function getOptionValue(option: HTMLElement): string {\n if (option.dataset.value !== undefined) return option.dataset.value;\n return option.textContent?.trim() ?? '';\n}\n\n/**\n * Get the visible label for a combobox option element (its trimmed `textContent`).\n *\n * Used for typeahead matching: the user types the characters they see, which is the\n * option's label — not its `data-value` (which can be an unrelated id).\n */\nexport function getOptionLabel(option: HTMLElement): string {\n return option.textContent?.trim() ?? '';\n}\n\n/** Returns true when an option carries aria-disabled=\"true\". */\nexport function isOptionDisabled(option: HTMLElement): boolean {\n return option.getAttribute('aria-disabled') === 'true';\n}\n\n/** Returns true when the cell is NOT the first gridcell in its row (i.e., it's an action cell). */\nexport function isActionCell(cell: HTMLElement): boolean {\n const row = cell.closest('[role=\"row\"]');\n if (!row) return false;\n return row.querySelector('[role=\"gridcell\"]') !== cell;\n}\n\nexport const isSelected = (el: Element) => el.getAttribute('aria-selected') === 'true';\n\n/**\n * Compute the current state of a section and notify when it changed.\n *\n * Section state:\n * - `hidden`: true when the section has registered options but all are filtered out.\n * - `aria-hidden`: true when the section has no registered options at all (skeleton-only).\n *\n * At most one of `hidden` / `aria-hidden` is true at a time.\n */\nexport function notifySection(\n sectionElement: HTMLElement,\n sectionRegistrations: Map<HTMLElement, SectionRegistration>,\n optionRegistrations: Map<HTMLElement, OptionRegistration>,\n force?: boolean,\n): void {\n const reg = sectionRegistrations.get(sectionElement);\n if (!reg) return;\n let hasOptions = false;\n let hasVisibleOption = false;\n for (const [optionElement, optionReg] of optionRegistrations) {\n if (sectionElement.contains(optionElement)) {\n hasOptions = true;\n if (!optionReg.lastFiltered) {\n hasVisibleOption = true;\n break;\n }\n }\n }\n const state: SectionState = {\n hidden: hasOptions && !hasVisibleOption,\n 'aria-hidden': !hasOptions,\n };\n if (force || state.hidden !== reg.last.hidden || state['aria-hidden'] !== reg.last['aria-hidden']) {\n reg.last = state;\n reg.callback(state);\n }\n}\n","/** Create a pending navigation store; discards intent on abort. */\nexport function createPendingNavigation(signal: AbortSignal) {\n let pending: (() => boolean) | null = null;\n const clear = () => {\n pending = null;\n };\n signal.addEventListener('abort', clear);\n return {\n get hasPending() {\n return pending !== null;\n },\n defer(navigate: () => boolean) {\n pending = navigate;\n },\n flush() {\n if (pending?.()) pending = null;\n },\n clear,\n };\n}\n","/**\n * Create a TreeWalker that iterates over elements matching a CSS selector\n * within a container.\n *\n * Uses `NodeFilter.SHOW_ELEMENT` and accepts nodes that match the given\n * selector, skipping everything else. The returned walker can be used with\n * `nextNode()` / `previousNode()` for lazy, sequential DOM traversal.\n *\n * @param container The root element to walk within.\n * @param selector CSS selector that items must match.\n * @returns A TreeWalker scoped to the container and filtered by the selector.\n */\nexport function createSelectorTreeWalker(container: HTMLElement, selector: string): TreeWalker {\n return document.createTreeWalker(container, NodeFilter.SHOW_ELEMENT, {\n acceptNode(node: Node) {\n return (node as HTMLElement).matches(selector) ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;\n },\n });\n}\n","import { createPendingNavigation } from './createPendingNavigation';\nimport type {\n FocusNavigationCallbacks,\n ListFocusNavigationController,\n ListFocusNavigationSelectors,\n ListNavigationOptions,\n} from './types';\nimport { createSelectorTreeWalker } from '../browser/createSelectorTreeWalker';\n\n/**\n * Create a focus navigation controller for a 1D list.\n *\n * This controller is **stateless** — it does not maintain an internal reference to\n * the active item. Instead it reads the active item from the DOM each time via the\n * `getActiveItem` callback provided in the options. This avoids any desync between\n * the controller's internal state and the actual DOM.\n *\n * @param options List navigation options (container, itemSelector, direction, wrap, getActiveItem).\n * @param callbacks Callbacks for focus state changes.\n * @param signal AbortSignal for cleanup.\n * @returns ListFocusNavigationController instance.\n */\nexport function createListFocusNavigation(\n options: ListNavigationOptions,\n callbacks: FocusNavigationCallbacks,\n signal: AbortSignal,\n): ListFocusNavigationController {\n const {\n container,\n itemSelector,\n direction = 'vertical',\n wrap = false,\n itemDisabledSelector,\n getActiveItem = () => null,\n } = options;\n\n /** Combined CSS selector matching enabled (non-disabled) items. */\n const enabledItemSelector = itemDisabledSelector ? `${itemSelector}:not(${itemDisabledSelector})` : itemSelector;\n\n /** Create a TreeWalker over items in the container. */\n function createItemWalker(enabledOnly = true): TreeWalker {\n const selector = enabledOnly ? enabledItemSelector : itemSelector;\n return createSelectorTreeWalker(container, selector);\n }\n\n /** Find the first enabled item in the container. */\n function findFirstEnabled(): HTMLElement | null {\n return container.querySelector<HTMLElement>(enabledItemSelector);\n }\n\n /** Find the last enabled item in the container. */\n function findLastEnabled(): HTMLElement | null {\n const items = container.querySelectorAll<HTMLElement>(enabledItemSelector);\n return items.length > 0 ? items[items.length - 1] : null;\n }\n\n // Deferred navigation intent (replayed once items are committed to the DOM)\n const pending = createPendingNavigation(signal);\n\n /** Find item at offset (lazily walk nodes) */\n function findAtOffset(offset: number): HTMLElement | null {\n const forward = offset > 0;\n const stepsNeeded = Math.abs(offset);\n const active = getActiveItem();\n\n const walker = createItemWalker();\n const step = forward ? () => walker.nextNode() : () => walker.previousNode();\n\n let target: HTMLElement | null = null;\n let remaining = stepsNeeded;\n\n if (active) {\n // Walk from the active item.\n walker.currentNode = active;\n } else if (!forward) {\n // Walking backward with no active item: position at the last enabled item\n target = walker.lastChild() as HTMLElement | null;\n if (!target) return null;\n remaining -= 1;\n }\n\n for (let i = 0; i < remaining; i++) {\n const next = step() as HTMLElement | null;\n if (next) {\n target = next;\n } else if (active && wrap) {\n // Hit boundary with an active item — wrap around to the opposite end.\n const wrapped = forward ? findFirstEnabled() : findLastEnabled();\n if (!wrapped || wrapped === active) break;\n target = wrapped;\n walker.currentNode = wrapped;\n } else {\n break;\n }\n }\n return target;\n }\n\n function findMatching(predicate: (item: HTMLElement) => boolean): HTMLElement | null {\n const walker = createItemWalker(false);\n let node = walker.nextNode() as HTMLElement | null;\n while (node) {\n if (predicate(node)) return node;\n node = walker.nextNode() as HTMLElement | null;\n }\n return null;\n }\n\n /** Clear the active item and discard any pending navigation intent. */\n function clear(): void {\n const current = getActiveItem();\n if (current) {\n callbacks.onDeactivate(current);\n }\n pending.clear();\n callbacks.onClear?.();\n }\n\n // Cleanup on abort.\n signal.addEventListener('abort', clear);\n\n const selectors: ListFocusNavigationSelectors = {\n enabledItemSelector,\n\n get activeItem() {\n return getActiveItem();\n },\n get hasNavigableItems() {\n return container.querySelector(enabledItemSelector) !== null;\n },\n\n getFirst: findFirstEnabled,\n getLast: findLastEnabled,\n getMatching: findMatching,\n findNearestEnabled(anchor: Node): HTMLElement | null {\n if (!container.contains(anchor)) return findFirstEnabled();\n\n // If the anchor itself is an enabled item, return it directly.\n if (anchor instanceof HTMLElement && anchor.matches(enabledItemSelector)) {\n return anchor;\n }\n\n // Walk forward from the anchor for the nearest enabled item.\n const walker = createItemWalker();\n walker.currentNode = anchor;\n const next = walker.nextNode();\n if (next instanceof HTMLElement) return next;\n\n // No enabled item after anchor — walk backward (reuse same walker).\n walker.currentNode = anchor;\n return walker.previousNode() as HTMLElement | null;\n },\n };\n\n /**\n * Navigate via a resolver. The resolver receives the selectors to find the target.\n * If the target is valid, focus is committed (deactivate current, activate target).\n * If the target is not resolvable yet, the intent is deferred for later replay.\n */\n function goTo(resolve: (selectors: ListFocusNavigationSelectors) => HTMLElement | null): boolean {\n const target = resolve(selectors);\n if (target && target.matches(itemSelector) && container.contains(target)) {\n const current = getActiveItem();\n if (current !== target) {\n if (current) callbacks.onDeactivate(current);\n callbacks.onActivate(target);\n }\n pending.clear();\n return true;\n }\n // Target not resolvable yet (e.g. items not committed to the DOM) — defer\n pending.defer(() => goTo(resolve));\n return false;\n }\n\n /** Go to the item at the given offset from the active item. */\n function goToOffset(offset: number): boolean {\n if (offset === 0) return getActiveItem() !== null;\n const target = findAtOffset(offset);\n if (!target) return false;\n return goTo(() => target);\n }\n\n return {\n type: 'list',\n selectors,\n\n goToOffset,\n\n clear,\n\n goTo,\n\n flushPendingNavigation(): void {\n pending.flush();\n },\n\n goUp(): boolean {\n return direction === 'vertical' ? goToOffset(-1) : false;\n },\n\n goDown(): boolean {\n return direction === 'vertical' ? goToOffset(1) : false;\n },\n\n goLeft(): boolean {\n return direction === 'horizontal' ? goToOffset(-1) : false;\n },\n\n goRight(): boolean {\n return direction === 'horizontal' ? goToOffset(1) : false;\n },\n };\n}\n","import type { FocusNavigationCallbacks } from './types';\n\n/**\n * Internal state for tracking the active (focused) item.\n * Shared by both list and grid navigation implementations.\n */\nexport interface ActiveItemState {\n /** Get the currently active item. */\n readonly active: HTMLElement | null;\n /** Set the active item (handles deactivate/activate callbacks). */\n setActive(item: HTMLElement | null): void;\n /** Clear the active item (deactivate + clear callbacks). */\n clear(): void;\n}\n\n/**\n * Create shared active item state with cleanup on abort.\n *\n * Callback invocation:\n * - `setActive(item)`: calls `onDeactivate(previous)` then `onActivate(item)`.\n * - `clear()`: calls `onDeactivate(current)` then `onClear()`.\n * - On `signal.abort()`: same as `clear()`.\n *\n * @param callbacks Focus state change callbacks.\n * @param signal AbortSignal for cleanup.\n * @param initialItem Optional item to silently pre-select on creation (no callbacks fired).\n */\nexport function createActiveItemState(\n callbacks: FocusNavigationCallbacks,\n signal: AbortSignal,\n initialItem?: HTMLElement | null,\n): ActiveItemState {\n let activeItem: HTMLElement | null = initialItem ?? null;\n function clear() {\n if (activeItem) {\n callbacks.onDeactivate(activeItem);\n activeItem = null;\n }\n callbacks.onClear?.();\n }\n signal.addEventListener('abort', clear);\n\n return {\n get active() {\n return activeItem;\n },\n setActive(item: HTMLElement | null): void {\n if (activeItem === item) return;\n if (activeItem) {\n callbacks.onDeactivate(activeItem);\n }\n activeItem = item;\n if (item) {\n callbacks.onActivate(item);\n }\n },\n clear,\n };\n}\n","/** Deepest last-child descendant of `el` (or `el` itself if it has no children). */\nexport function lastDescendant(element: HTMLElement): HTMLElement {\n let node: Element = element;\n while (node.lastElementChild) node = node.lastElementChild;\n return node as HTMLElement;\n}\n","/** Return the first item of an iterable, or `null` if it is empty. */\nexport function first<T>(iterable: Iterable<T>): T | null {\n const { value, done } = iterable[Symbol.iterator]().next();\n return done ? null : value;\n}\n","import { createActiveItemState } from './createActiveItemState';\nimport { createPendingNavigation } from './createPendingNavigation';\nimport type {\n FocusNavigationCallbacks,\n FocusNavigationController,\n FocusNavigationSelectors,\n GridNavigationOptions,\n} from './types';\nimport { lastDescendant } from '../browser/lastDescendant';\nimport { createSelectorTreeWalker } from '../browser/createSelectorTreeWalker';\nimport { first } from '../iterable/first';\n\n/**\n * Create a focus navigation controller for a 2D grid.\n *\n * Resolves rows and cells by querying the DOM and commits focus by updating the\n * active-item state (which fires {@link FocusNavigationCallbacks}).\n *\n * Supports Up/Down between rows (with column memory) and Left/Right between cells\n * (with wrapping across rows).\n *\n * @param options Grid navigation options (container, rowSelector, cellSelector, wrap).\n * @param callbacks Callbacks for focus state changes.\n * @param signal AbortSignal for cleanup.\n * @returns FocusNavigationController instance.\n */\nexport function createGridFocusNavigation(\n options: GridNavigationOptions,\n callbacks: FocusNavigationCallbacks,\n signal: AbortSignal,\n): FocusNavigationController {\n const { container, rowSelector, cellSelector, wrap = false } = options;\n const state = createActiveItemState(callbacks, signal);\n\n const isNavigableRow = (row: HTMLElement) => row.querySelector(cellSelector) !== null;\n const getFirstCell = (row: HTMLElement) => row.querySelector<HTMLElement>(cellSelector);\n const getRowCells = (row: HTMLElement) => Array.from(row.querySelectorAll<HTMLElement>(cellSelector));\n\n /** Lazily walk navigable rows from `start` in a `direction`, projecting each row through `dive`. */\n function* findRows(\n start: HTMLElement | 'first' | 'last' = 'first',\n direction: 'next' | 'prev' = 'next',\n dive?: (row: HTMLElement) => HTMLElement | undefined | null,\n ) {\n // Tree walker\n const walker = createSelectorTreeWalker(container, rowSelector);\n\n // Start at a specific row\n if (start instanceof HTMLElement) walker.currentNode = start;\n // Start from the last\n else if (start === 'last') walker.currentNode = lastDescendant(container);\n\n // Walk nodes\n let node: HTMLElement | null;\n do {\n node = (direction === 'next' ? walker.nextNode() : walker.previousNode()) as HTMLElement | null;\n if (node && isNavigableRow(node)) {\n const result = dive ? dive(node) : node;\n if (result) yield result;\n }\n } while (node);\n }\n\n const findFirstVisibleRow = () => first(findRows());\n const findLastVisibleRow = () => first(findRows('last', 'prev'));\n\n function findParentRow(cell: HTMLElement): HTMLElement | null {\n const row = cell.closest<HTMLElement>(rowSelector);\n return row && container.contains(row) ? row : null;\n }\n\n /** Deferred navigation intent (replayed once cells are committed to the DOM). */\n const pending = createPendingNavigation(signal);\n /** Remembered column index for Up/Down navigation (column memory). */\n let rememberedCol = 0;\n\n /** Activate the cell at the given column in a row element. */\n function focusCellInRow(row: HTMLElement, col: number): boolean {\n const cells = getRowCells(row);\n if (cells.length === 0) return false;\n const clampedCol = Math.min(col, cells.length - 1);\n state.setActive(cells[clampedCol]);\n return true;\n }\n\n /** Activate the given cell (validates it is in the grid, updates column memory). */\n function activateCell(item: HTMLElement): boolean {\n const row = findParentRow(item);\n if (!row) return false;\n const cells = getRowCells(row);\n const col = cells.indexOf(item);\n if (col === -1) return false;\n rememberedCol = col;\n state.setActive(item);\n return true;\n }\n\n /** Got to first cell in first row */\n function goToFirst(): boolean {\n const row = findFirstVisibleRow();\n if (!row) return false;\n rememberedCol = 0;\n return focusCellInRow(row, 0);\n }\n\n /** Got to first cell in last row */\n function goToLast(): boolean {\n const row = findLastVisibleRow();\n if (!row) return false;\n rememberedCol = 0;\n return focusCellInRow(row, 0);\n }\n\n /** Navigate horizontally (left or right) within cells, wrapping across rows. */\n function goHorizontal(step: -1 | 1): boolean {\n if (!state.active) return false;\n\n const currentRow = findParentRow(state.active);\n if (!currentRow) return false;\n\n const cells = getRowCells(currentRow);\n const col = cells.indexOf(state.active);\n if (col === -1) return false;\n\n const nextCol = col + step;\n if (nextCol >= 0 && nextCol < cells.length) {\n rememberedCol = nextCol;\n state.setActive(cells[nextCol]);\n return true;\n }\n\n if (!wrap) return false;\n\n // Wrap to the adjacent row (or opposite boundary row), activating the first or last cell.\n const rowDirection = step > 0 ? 'next' : 'prev';\n const adjacentRow = first(findRows(currentRow, rowDirection));\n const targetRow = adjacentRow ?? (step > 0 ? findFirstVisibleRow() : findLastVisibleRow());\n if (!targetRow) return false;\n\n const targetCells = getRowCells(targetRow);\n if (targetCells.length === 0) return false;\n const targetCol = step > 0 ? 0 : targetCells.length - 1;\n rememberedCol = targetCol;\n state.setActive(targetCells[targetCol]);\n return true;\n }\n\n /** Navigate vertically (up or down) between rows with column memory. */\n function goVertical(direction: 'next' | 'prev'): boolean {\n if (!state.active) {\n // No active cell — go to the boundary row.\n return direction === 'next' ? goToFirst() : goToLast();\n }\n\n const currentRow = findParentRow(state.active);\n if (!currentRow) return false;\n\n const adjacentRow = first(findRows(currentRow, direction));\n if (adjacentRow) return focusCellInRow(adjacentRow, rememberedCol);\n\n if (wrap) {\n // Wrap to the opposite boundary row.\n const wrapRow = direction === 'next' ? findFirstVisibleRow() : findLastVisibleRow();\n if (wrapRow) return focusCellInRow(wrapRow, rememberedCol);\n }\n return false;\n }\n\n const selectors: FocusNavigationSelectors = {\n get activeItem() {\n return state.active;\n },\n get hasNavigableItems() {\n return first(findRows()) !== null;\n },\n // First cell in first row\n getFirst: () => first(findRows('first', 'next', getFirstCell)),\n // First cell in last row\n getLast: () => first(findRows('last', 'prev', getFirstCell)),\n // First cell matching predicate\n getMatching: (predicate) => first(findRows('first', 'next', (row) => getRowCells(row).find(predicate))),\n };\n\n return {\n type: 'grid',\n selectors,\n\n goToOffset(offset: number): boolean {\n if (offset === 0) return state.active !== null;\n const visibleRows = Array.from(findRows());\n if (visibleRows.length === 0) return false;\n\n if (!state.active) {\n // No active item: jump to first or last row, then apply remaining offset.\n const startIdx = offset > 0 ? 0 : visibleRows.length - 1;\n const remainingOffset = offset > 0 ? offset - 1 : offset + 1;\n const targetIdx = Math.max(0, Math.min(startIdx + remainingOffset, visibleRows.length - 1));\n return focusCellInRow(visibleRows[targetIdx], rememberedCol);\n }\n\n // Find current row in the visible rows list.\n const currentRow = findParentRow(state.active);\n if (!currentRow) return false;\n const rowIdx = visibleRows.indexOf(currentRow);\n if (rowIdx === -1) return false;\n\n const targetIdx = Math.max(0, Math.min(rowIdx + offset, visibleRows.length - 1));\n if (targetIdx === rowIdx) return false;\n return focusCellInRow(visibleRows[targetIdx], rememberedCol);\n },\n\n clear(): void {\n state.clear();\n pending.clear();\n },\n\n goTo(resolve: (selectors: FocusNavigationSelectors) => HTMLElement | null): boolean {\n const target = resolve(selectors);\n if (target && activateCell(target)) {\n pending.clear();\n return true;\n }\n // Target not resolvable yet (e.g. cells not committed to the DOM) — defer\n pending.defer(() => this.goTo(resolve));\n return false;\n },\n\n flushPendingNavigation(): void {\n pending.flush();\n },\n\n goUp(): boolean {\n return goVertical('prev');\n },\n\n goDown(): boolean {\n return goVertical('next');\n },\n\n goLeft(): boolean {\n return goHorizontal(-1);\n },\n\n goRight(): boolean {\n return goHorizontal(1);\n },\n };\n}\n","/**\n * Like `querySelectorAll`, but also tests the root node itself.\n *\n * Yields the root element first (if it matches), then all matching descendants\n * in document order. Being a generator, callers that only need the first match\n * can break early without collecting the full list.\n *\n * @param node The starting DOM node.\n * @param selector CSS selector to match against.\n */\nexport function* querySelectorInclusive(node: Node, selector: string): Generator<HTMLElement> {\n if (!(node instanceof HTMLElement)) return;\n if (node.matches(selector)) yield node;\n yield* node.querySelectorAll<HTMLElement>(selector);\n}\n","/**\n * Track whether the container currently has focus.\n *\n * We can't rely on `document.activeElement` inside MutationObserver callbacks because\n * the browser moves focus to `<body>` before they fire. focusout with `relatedTarget === null`\n * (element removed from DOM) keeps the flag true so the observer can move focus to a fallback.\n */\nexport function trackContainerFocus(container: HTMLElement, signal: AbortSignal) {\n let hasFocus = container.contains(document.activeElement);\n container.addEventListener(\n 'focusin',\n () => {\n hasFocus = true;\n },\n { signal },\n );\n container.addEventListener(\n 'focusout',\n (evt: FocusEvent) => {\n const newTarget = evt.relatedTarget as Node | null;\n if (newTarget && !container.contains(newTarget)) {\n hasFocus = false;\n }\n },\n { signal },\n );\n return {\n get hasFocus() {\n return hasFocus;\n },\n reset() {\n hasFocus = false;\n },\n };\n}\n","import { querySelectorInclusive } from '../browser/querySelectorInclusive';\nimport { trackContainerFocus } from '../browser/trackContainerFocus';\nimport { createListFocusNavigation } from './createListFocusNavigation';\nimport type { FocusNavigationController } from './types';\n\n/** Options for {@link setupRovingTabIndex}. */\nexport interface RovingTabIndexOptions {\n /** Container element holding the focusable items. */\n container: HTMLElement;\n /** CSS selector identifying focusable items within the container. */\n itemSelector: string;\n /**\n * Navigation axis — determines which arrow keys navigate.\n * - `'horizontal'` (default): Left/Right navigate.\n * - `'vertical'`: Up/Down navigate.\n */\n direction?: 'horizontal' | 'vertical';\n /** CSS selector matching disabled items (skipped during navigation). */\n itemDisabledSelector?: string;\n /**\n * Attribute name indicating the selected item (e.g. `'aria-selected'`, `'aria-checked'`).\n * When set, the roving tabindex will observe changes to this attribute and keep\n * `tabindex=\"0\"` in sync with the item whose attribute value is `\"true\"`.\n * Default: `'aria-selected'`.\n */\n itemSelectedAttr?: string;\n /** Called when an item receives focus via keyboard navigation. */\n onItemFocused?: (item: HTMLElement) => void;\n}\n\n/**\n * Set up the roving tabindex pattern on a container element.\n *\n * - Keyboard navigation (Arrow keys, Home, End)\n * - tabindex management (`0` on active, `-1` on others)\n * - Mount normalization (single-tabstop invariant)\n * - DOM mutation handling via MutationObserver:\n * removal recovery, insertion normalization, disabled-state changes\n *\n * Torn down when `signal` is aborted.\n */\nexport function setupRovingTabIndex(options: RovingTabIndexOptions, signal: AbortSignal): FocusNavigationController {\n const {\n container,\n itemSelector,\n direction = 'horizontal',\n itemDisabledSelector,\n itemSelectedAttr = 'aria-selected',\n onItemFocused,\n } = options;\n\n const itemActiveSelector = `${itemSelector}[tabindex=\"0\"]`;\n\n // Item selected selector\n let itemSelectedSelector = `${itemSelector}[${itemSelectedAttr}=true]`;\n if (itemDisabledSelector) itemSelectedSelector += `:not(${itemDisabledSelector})`;\n\n // Track focus inside container\n const containerFocus = trackContainerFocus(container, signal);\n\n const nav = createListFocusNavigation(\n {\n type: 'list',\n container,\n itemSelector,\n direction,\n wrap: true,\n itemDisabledSelector,\n getActiveItem: () => container.querySelector<HTMLElement>(itemActiveSelector),\n },\n {\n onActivate(item: HTMLElement) {\n item.setAttribute('tabindex', '0');\n item.focus();\n onItemFocused?.(item);\n },\n onDeactivate(item: HTMLElement) {\n item.setAttribute('tabindex', '-1');\n },\n },\n signal,\n );\n\n // ─── tabindex normalization ────────────────────────────────────\n\n /** Set tabindex only when the value actually changes to avoid unnecessary DOM mutations. */\n function setTabIndex(item: HTMLElement, value: '0' | '-1'): void {\n if (item.getAttribute('tabindex') !== value) {\n item.setAttribute('tabindex', value);\n }\n }\n\n /** Assign tabindex across `items`, ensuring at most one `tabindex=\"0\"` */\n function normalizeItems(items: HTMLElement[], hasExistingTabStop: boolean): void {\n let hasTabStop = hasExistingTabStop;\n\n for (const item of items) {\n if (!container.contains(item)) continue;\n const isDisabled = itemDisabledSelector ? item.matches(itemDisabledSelector) : false;\n\n if (!isDisabled && !hasTabStop) {\n setTabIndex(item, '0');\n hasTabStop = true;\n } else {\n setTabIndex(item, '-1');\n }\n }\n\n if (!hasTabStop) {\n const fallback = container.querySelector<HTMLElement>(nav.selectors.enabledItemSelector);\n if (fallback) setTabIndex(fallback, '0');\n }\n }\n\n /** Enforce the single-tabstop invariant across all items. */\n function normalizeAllItems(): void {\n const items = Array.from(container.querySelectorAll<HTMLElement>(itemSelector));\n const { activeItem } = nav.selectors;\n\n // Prefer either the current active item (from DOM) or the current selected item\n let preferredTabStopIndex = activeItem && items.indexOf(activeItem);\n if (!preferredTabStopIndex || preferredTabStopIndex === -1) {\n preferredTabStopIndex = items.findIndex((item) => item.matches(itemSelectedSelector));\n }\n if (preferredTabStopIndex && preferredTabStopIndex > 0) {\n const [preferredItem] = items.splice(preferredTabStopIndex, 1);\n items.unshift(preferredItem);\n }\n normalizeItems(items, false);\n }\n\n /** Ensure a tab stop exists; find a fallback near `anchor` and optionally move focus to it. */\n function ensureTabStop(shouldFocus: boolean, anchor?: Node | null): void {\n if (container.querySelector(itemActiveSelector)) return;\n const fallback =\n (anchor && nav.selectors.findNearestEnabled(anchor)) ??\n container.querySelector<HTMLElement>(nav.selectors.enabledItemSelector);\n if (!fallback) return;\n if (shouldFocus) {\n nav.goTo(() => fallback);\n } else {\n setTabIndex(fallback, '0');\n }\n }\n\n normalizeAllItems();\n\n // ─── MutationObserver ──────────────────────────────────────────\n\n const observer = new MutationObserver((mutations) => {\n // Track removed\n let removedActiveItem: HTMLElement | null = null;\n let removalAnchor: Node | null = null;\n // Track selected\n let newSelectedItem: HTMLElement | null = null;\n // Track disabled\n const disabledTargets: HTMLElement[] = [];\n // Track added\n const insertedItems: HTMLElement[] = [];\n\n for (const mutation of mutations) {\n if (mutation.type === 'childList') {\n // Track removed — scan removed nodes for the active item (tabindex=\"0\").\n // We cannot gate this on a live DOM query because the item is already removed.\n if (!removedActiveItem) {\n for (const removedNode of mutation.removedNodes) {\n const { value: firstMatch } = querySelectorInclusive(removedNode, itemActiveSelector).next();\n if (firstMatch) {\n removedActiveItem = firstMatch;\n removalAnchor = mutation.nextSibling ?? mutation.previousSibling ?? null;\n break;\n }\n }\n }\n\n // Track added\n for (const addedNode of mutation.addedNodes) {\n for (const item of querySelectorInclusive(addedNode, itemSelector)) {\n insertedItems.push(item);\n }\n }\n }\n\n const target = mutation.target as HTMLElement;\n if (mutation.type === 'attributes' && target.matches(itemSelector)) {\n if (mutation.attributeName === itemSelectedAttr && target.getAttribute(itemSelectedAttr) === 'true') {\n // Track selected item\n newSelectedItem = target;\n } else if (itemDisabledSelector && target.matches(itemDisabledSelector)) {\n // Track disabled items\n disabledTargets.push(target);\n }\n }\n }\n\n // Handle removed item\n if (removedActiveItem) {\n const shouldMoveFocus = containerFocus.hasFocus;\n containerFocus.reset();\n ensureTabStop(shouldMoveFocus, removalAnchor);\n }\n\n // Handle inserted items\n if (insertedItems.length > 0) {\n const hasTabStop = container.querySelector<HTMLElement>(itemActiveSelector) !== null;\n normalizeItems(insertedItems, hasTabStop);\n }\n\n // Handle disabled\n if (disabledTargets.length > 0) {\n const currentActive = nav.selectors.activeItem;\n for (const target of disabledTargets) {\n setTabIndex(target, '-1');\n }\n\n const activeItemDisabled = currentActive && disabledTargets.includes(currentActive);\n const shouldFocus = !!(activeItemDisabled && containerFocus.hasFocus);\n ensureTabStop(shouldFocus);\n }\n\n // Handle selected\n if (newSelectedItem) {\n // Demote previous item\n const currentTabStop = container.querySelector<HTMLElement>(itemActiveSelector);\n if (currentTabStop && currentTabStop !== newSelectedItem) {\n setTabIndex(currentTabStop, '-1');\n }\n // Selected item is the new default focuable item\n setTabIndex(newSelectedItem, '0');\n }\n });\n\n observer.observe(container, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['aria-disabled', 'disabled', itemSelectedAttr],\n });\n signal.addEventListener('abort', () => observer.disconnect());\n\n // ─── Keyboard navigation ───────────────────────────────────────\n\n container.addEventListener(\n 'keydown',\n (evt: KeyboardEvent) => {\n // Adopt focus target if nothing is active yet.\n if (!nav.selectors.activeItem) {\n const target = evt.target as HTMLElement;\n if (target.matches(itemSelector) && container.contains(target)) {\n nav.goTo(() => target);\n }\n }\n\n let handled = false;\n switch (evt.key) {\n case 'ArrowRight':\n handled = nav.goRight();\n break;\n case 'ArrowLeft':\n handled = nav.goLeft();\n break;\n case 'ArrowDown':\n handled = nav.goDown();\n break;\n case 'ArrowUp':\n handled = nav.goUp();\n break;\n case 'Home':\n handled = nav.goTo((s) => s.getFirst());\n break;\n case 'End':\n handled = nav.goTo((s) => s.getLast());\n break;\n default:\n break;\n }\n\n if (handled) {\n evt.preventDefault();\n evt.stopPropagation();\n }\n },\n { signal },\n );\n\n return nav;\n}\n","import {\n createGridFocusNavigation,\n createListFocusNavigation,\n type FocusNavigationController,\n} from '../../utils/focusNavigation';\nimport { isActionCell, isOptionDisabled } from './utils';\nimport type { ComboboxEventMap, ComboboxHandle } from './types';\n\n/**\n * Set up focus navigation and delegated event listeners on a listbox element.\n *\n * This merges two concerns:\n * 1. Creating the appropriate {@link FocusNavigationController} (grid or list mode)\n * with callbacks that manage `aria-activedescendant` and visual focus indicators.\n * 2. Attaching delegated `click` and `mousedown` listeners to the listbox for\n * option selection and blur prevention.\n *\n * The caller is responsible for guarding against duplicate calls (i.e., checking\n * that a focus navigation controller does not already exist before calling)\n * and ensuring `handle.trigger` and `handle.listbox` are non-null.\n *\n * @param handle The combobox handle (provides trigger, listbox, select, etc.).\n * @param signal Abort signal used to clean up all attached listeners.\n * @param notify Notify subscribers of combobox events.\n * @returns The created focus navigation controller.\n */\nexport function setupListbox(\n handle: ComboboxHandle,\n signal: AbortSignal,\n notify: <K extends keyof ComboboxEventMap>(event: K, value: ComboboxEventMap[K]) => void,\n options?: { wrapNavigation?: boolean },\n): FocusNavigationController {\n const trigger = handle.trigger!;\n const listbox = handle.listbox!;\n const isGrid = listbox.getAttribute('role') === 'grid';\n const itemSelector = '[role=\"option\"]';\n\n // ── Focus navigation ──────────────────────────────────────\n\n const focusCallbacks = {\n onActivate: (item: HTMLElement) => {\n item.setAttribute('data-focus-visible-added', 'true');\n trigger.setAttribute('aria-activedescendant', item.id);\n notify('activeDescendantChange', item.id);\n\n requestAnimationFrame(() => {\n // Last item in listbox\n const lastItem =\n !isGrid &&\n // Last item: find last element containing itemSelector and not followed by elements containing itemSelector and then get the itemSelector inside\n listbox.querySelector(\n `:scope > :has(${itemSelector}):not(:has(~ * ${itemSelector})) ${itemSelector}`,\n );\n if (item === lastItem) {\n // Scroll to the end of the listbox (shouldsnap to the end of the scroll container thanks to CSS scroll snap)\n listbox.lastElementChild?.scrollIntoView({ block: 'nearest' });\n } else {\n // Scroll to the element in listbox or else the item\n const toScrollTo = item.closest('[role=listbox] > *') || item;\n toScrollTo.scrollIntoView({ block: 'nearest' });\n }\n });\n },\n onDeactivate: (item: HTMLElement) => {\n item.removeAttribute('data-focus-visible-added');\n },\n onClear: () => {\n trigger.setAttribute('aria-activedescendant', '');\n notify('activeDescendantChange', null);\n },\n };\n\n let focusNav: FocusNavigationController;\n\n if (isGrid) {\n focusNav = createGridFocusNavigation(\n {\n type: 'grid',\n container: listbox,\n rowSelector: '[role=\"row\"]',\n cellSelector: '[role=\"gridcell\"]',\n wrap: true,\n },\n focusCallbacks,\n signal,\n );\n trigger.setAttribute('aria-haspopup', 'grid');\n } else {\n focusNav = createListFocusNavigation(\n {\n type: 'list',\n container: listbox,\n itemSelector,\n wrap: options?.wrapNavigation,\n getActiveItem: () => {\n const id = trigger.getAttribute('aria-activedescendant');\n return (id && listbox.querySelector<HTMLElement>(`#${CSS.escape(id)}`)) || null;\n },\n },\n focusCallbacks,\n signal,\n );\n }\n\n // ── Delegated listbox listeners ───────────────────────────\n\n const cellSelector = isGrid ? '[role=\"gridcell\"]' : '[role=\"option\"]';\n\n listbox.addEventListener(\n 'click',\n (event) => {\n const cell = (event.target as HTMLElement).closest(cellSelector) as HTMLElement | null;\n if (!cell) return;\n // Do not select disabled cells.\n if (isOptionDisabled(cell)) {\n event.stopPropagation();\n return;\n }\n\n if (isGrid && isActionCell(cell)) {\n // Action cell — skip option selection, let its own handler fire.\n return;\n }\n\n handle.select(cell);\n trigger.focus();\n },\n { signal },\n );\n\n // Prevent mousedown on cells to avoid blurring the trigger before click fires.\n listbox.addEventListener(\n 'mousedown',\n (event) => {\n if ((event.target as HTMLElement).closest(cellSelector)) {\n event.preventDefault();\n }\n },\n { signal },\n );\n\n return focusNav;\n}\n","import { type FocusNavigationController } from '../../utils/focusNavigation';\nimport { getOptionValue, isOptionDisabled, isSelected, notifySection } from './utils';\nimport { setupListbox } from './setupListbox';\nimport type {\n ComboboxCallbacks,\n ComboboxEventMap,\n ComboboxHandle,\n OnTriggerAttach,\n OptionRegistration,\n SectionRegistration,\n} from './types';\n\n/** Options for configuring the shared combobox behavior. */\ninterface ComboboxOptions {\n /** When true, ArrowDown/ArrowUp wrap around in listbox mode (input pattern). Default: false. */\n wrapNavigation?: boolean;\n}\n\n/**\n * Set up combobox behavior (WAI-ARIA combobox pattern) on a trigger + listbox pair.\n *\n * The trigger and listbox are registered separately via the returned handle,\n * allowing framework components to register them on mount. The behavior is\n * fully attached once both are registered.\n *\n * @see https://www.w3.org/WAI/ARIA/apg/patterns/combobox/\n *\n * @param callbacks Callbacks invoked on combobox events (e.g. option selection).\n * @param options Options for configuring the shared combobox behavior.\n * @param onTriggerAttach Optional callback invoked when the trigger is registered and the signal is ready.\n * Used by mode-specific wrappers (setupComboboxInput/Button) to automatically\n * attach the appropriate controller.\n * @returns A ComboboxHandle for interacting with the combobox.\n */\nexport function setupCombobox(\n callbacks: ComboboxCallbacks,\n options?: ComboboxOptions,\n onTriggerAttach?: OnTriggerAttach,\n): ComboboxHandle {\n const { wrapNavigation = false } = options ?? {};\n\n let trigger: HTMLInputElement | HTMLButtonElement | null = null;\n let listbox: HTMLElement | null = null;\n let focusNav: FocusNavigationController | null = null;\n let isOpenState = false;\n\n /** Current filter value (empty string = no filtering). */\n let filterValue = '';\n\n /** Registered options: maps DOM element → { callback, last notified state }. */\n const optionRegistrations = new Map<HTMLElement, OptionRegistration>();\n\n /** Registered sections: maps DOM element → { callback, last notified state }. */\n const sectionRegistrations = new Map<HTMLElement, SectionRegistration>();\n\n /** AbortController for all structural event listeners. */\n let abortController: AbortController | null = null;\n\n /** Last notified visible option count, to avoid redundant `optionsChange` notifications. */\n let lastOptionsLength = 0;\n\n /** Last notified input value, to re-fire `optionsChange` when the user keeps typing while empty. */\n let lastInputValue = '';\n\n /** Last notified loading state, used to replay current state to late subscribers. */\n let lastLoadingState = false;\n\n /** Number of currently mounted skeleton placeholders. */\n let skeletonCount = 0;\n\n /** Event subscribers managed by the handle. */\n const subscribers: { [K in keyof ComboboxEventMap]: Set<(value: ComboboxEventMap[K]) => void> } = {\n open: new Set(),\n activeDescendantChange: new Set(),\n optionsChange: new Set(),\n loadingChange: new Set(),\n loadingAnnouncement: new Set(),\n };\n\n /** Notify all subscribers for a given event. */\n function notify<K extends keyof ComboboxEventMap>(event: K, value: ComboboxEventMap[K]) {\n subscribers[event].forEach((cb) => cb(value));\n }\n\n /** Count visible (non-filtered) options. */\n function getVisibleOptionCount(): number {\n let count = 0;\n for (const reg of optionRegistrations.values()) {\n if (!reg.lastFiltered) count += 1;\n }\n return count;\n }\n\n /** True when the popup has visible content (options or skeletons). */\n function hasVisibleContent(): boolean {\n return getVisibleOptionCount() > 0 || skeletonCount > 0;\n }\n\n /**\n * Notify all registered sections and fire `optionsChange` if the visible option count changed\n * or if the input value changed while the list is empty (so `emptyMessage` callbacks get\n * the updated query string).\n * Called whenever the set of visible options may have changed (option register/unregister, filter change).\n */\n function notifyVisibilityChange() {\n for (const [sectionElement] of sectionRegistrations) {\n notifySection(sectionElement, sectionRegistrations, optionRegistrations);\n }\n\n const visibleCount = getVisibleOptionCount();\n const inputValue = trigger?.value ?? '';\n const isEmpty = visibleCount === 0;\n if (visibleCount !== lastOptionsLength || (isEmpty && inputValue !== lastInputValue)) {\n lastOptionsLength = visibleCount;\n lastInputValue = inputValue;\n notify('optionsChange', { optionsLength: visibleCount, inputValue });\n }\n\n // Re-evaluate aria-expanded when the combobox is open — visible content may have\n // changed due to filtering, option register/unregister, or skeleton transitions.\n if (isOpenState) {\n trigger?.setAttribute('aria-expanded', String(hasVisibleContent()));\n }\n }\n\n // ── Skeleton loading tracking ──────────────────────────────\n\n /** Delay before announcing loading in the live region (ms). */\n const LOADING_ANNOUNCEMENT_DELAY = 500;\n\n /** Timer for debounced loading announcement. */\n let loadingTimer: ReturnType<typeof setTimeout> | undefined;\n\n /** Whether a loading announcement has been sent since the last open. */\n let announcementSent = false;\n\n /** Start or restart the debounced loading announcement timer if conditions are met. */\n function startLoadingAnnouncementTimer() {\n clearTimeout(loadingTimer);\n if (skeletonCount > 0 && isOpenState) {\n loadingTimer = setTimeout(() => {\n if (skeletonCount > 0 && isOpenState) {\n announcementSent = true;\n notify('loadingAnnouncement', true);\n }\n }, LOADING_ANNOUNCEMENT_DELAY);\n }\n }\n\n /**\n * Called when the skeleton count transitions between 0 and >0 (or vice versa).\n * Fires `loadingChange` immediately and manages the debounced `loadingAnnouncement`.\n */\n function onSkeletonCountChange() {\n const isLoading = skeletonCount > 0;\n lastLoadingState = isLoading;\n notify('loadingChange', isLoading);\n\n if (isLoading) {\n startLoadingAnnouncementTimer();\n } else {\n clearTimeout(loadingTimer);\n if (announcementSent) {\n announcementSent = false;\n notify('loadingAnnouncement', false);\n }\n }\n }\n\n // Forward-declared so internal helpers (keydown handler, listbox listeners, etc.)\n // can reference `handle` before the object is fully constructed (via closure).\n // The handle is assigned immediately below and is always available by the time these helpers run.\n let handle!: ComboboxHandle;\n\n /** Detach everything (abort all listeners, clear state). */\n function detach() {\n abortController?.abort();\n abortController = null;\n focusNav = null;\n }\n\n /**\n * Attach the shared keydown listener to the trigger.\n *\n * Handles: Enter, ArrowDown, ArrowUp, Escape (2-tier), PageUp, PageDown.\n * Mode-specific keys (Space, Home, End, ArrowLeft/Right, printable chars, etc.)\n * are delegated to the `onKeydown` hook provided by the mode controller.\n */\n function attachTriggerKeydown(\n triggerEl: HTMLInputElement | HTMLButtonElement,\n signal: AbortSignal,\n onKeydown?: (event: KeyboardEvent) => boolean,\n ) {\n function handleKeydown(event: KeyboardEvent) {\n // Let the mode-specific handler run first.\n if (onKeydown?.(event)) {\n event.stopPropagation();\n event.preventDefault();\n return;\n }\n\n let flag = false;\n const { altKey } = event;\n const nav = handle.focusNav;\n\n switch (event.key) {\n case 'Enter':\n if (handle.isOpen && nav?.selectors.activeItem) {\n // Capture activeItem before click — the click handler may close\n // the popover and clear the focus navigation state.\n const { activeItem } = nav.selectors;\n // \"Click\" on active option\n if (!isOptionDisabled(activeItem)) {\n activeItem.click();\n }\n flag = true;\n } else if (handle.isOpen && !handle.isMultiSelect) {\n // Open with no active item (single select) => close the popup,\n // but let Enter propagate so it can submit a surrounding form.\n handle.setIsOpen(false);\n }\n // Otherwise (closed popup, or multi-select with no active item),\n // let Enter pass through so it can submit a surrounding form\n break;\n\n // Open if closed, else move focus within listbox (wrap if enabled).\n case 'ArrowDown':\n if (!handle.isOpen) {\n handle.setIsOpen(true);\n // Focus first or selected item on open.\n if (!altKey) nav?.goTo((s) => s.getMatching(isSelected) ?? s.getFirst());\n } else if (nav?.selectors.hasNavigableItems && !altKey) {\n if (nav.selectors.activeItem) {\n // Go down\n nav.goDown();\n } else {\n // Focus first or selected item when no active item.\n nav.goTo((s) => s.getMatching(isSelected) ?? s.getFirst());\n }\n }\n flag = true;\n break;\n\n // Open if closed, else move focus within listbox (wrap if enabled).\n case 'ArrowUp':\n if (!handle.isOpen && !altKey) {\n handle.setIsOpen(true);\n // Focus last or selected item on open.\n nav?.goTo((s) => s.getMatching(isSelected) ?? s.getLast());\n } else if (handle.isOpen && nav?.selectors.hasNavigableItems) {\n if (nav.selectors.activeItem) {\n // Go up\n nav.goUp();\n } else if (!altKey) {\n // Focus last or selected item when no active item.\n nav.goTo((s) => s.getMatching(isSelected) ?? s.getLast());\n }\n }\n flag = true;\n break;\n\n case 'Escape':\n // 2-tier: close if open, otherwise clear value.\n if (handle.isOpen) {\n handle.setIsOpen(false);\n } else {\n handle.select(null);\n }\n flag = true;\n break;\n\n case 'PageUp':\n if (handle.isOpen && nav?.selectors.activeItem) {\n nav.goToOffset(-10);\n }\n flag = true;\n break;\n\n case 'PageDown':\n if (handle.isOpen && nav?.selectors.activeItem) {\n nav.goToOffset(10);\n }\n flag = true;\n break;\n\n default:\n break;\n }\n\n if (flag) {\n event.stopPropagation();\n event.preventDefault();\n }\n }\n\n triggerEl.addEventListener('keydown', (e) => handleKeydown(e as KeyboardEvent), { signal });\n }\n\n /** Try to fully attach when both trigger and listbox are available. */\n function tryAttach() {\n if (!trigger) return;\n\n // Create a fresh abort controller if needed\n const isNewController = !abortController;\n if (!abortController) {\n abortController = new AbortController();\n }\n\n // Initialize ARIA on trigger\n if (!trigger.getAttribute('aria-activedescendant')) {\n trigger.setAttribute('aria-activedescendant', '');\n }\n trigger.setAttribute('aria-expanded', String(isOpenState));\n\n // On first attach, wire up the mode-specific controller, shared keydown, and focusout handlers.\n if (isNewController) {\n const onKeydown = onTriggerAttach?.(handle, abortController.signal) || undefined;\n attachTriggerKeydown(trigger, abortController.signal, onKeydown);\n\n // Close the popup when the trigger loses focus\n trigger.addEventListener(\n 'focusout',\n () => {\n handle.setIsOpen(false);\n },\n { signal: abortController.signal },\n );\n }\n\n if (listbox && !focusNav) {\n focusNav = setupListbox(handle, abortController.signal, notify, { wrapNavigation });\n }\n }\n\n handle = {\n get trigger() {\n return trigger;\n },\n get listbox() {\n return listbox;\n },\n get focusNav() {\n return focusNav;\n },\n get isOpen() {\n return isOpenState;\n },\n get isMultiSelect() {\n return listbox?.getAttribute('aria-multiselectable') === 'true';\n },\n get isLoading() {\n return skeletonCount > 0;\n },\n\n setIsOpen(isOpen: boolean) {\n if (isOpenState === isOpen) return;\n isOpenState = isOpen;\n if (!isOpen) {\n focusNav?.clear();\n // Reset announcement state so it retriggers on next open\n clearTimeout(loadingTimer);\n if (announcementSent) {\n announcementSent = false;\n notify('loadingAnnouncement', false);\n }\n } else if (skeletonCount > 0) {\n // Opening while already loading — start the announcement timer\n startLoadingAnnouncementTimer();\n }\n\n // Update aria-expanded on trigger (false when no visible options or skeletons)\n trigger?.setAttribute('aria-expanded', String(isOpen && hasVisibleContent()));\n notify('open', isOpen);\n },\n\n select(option: HTMLElement | null) {\n callbacks.onSelect?.({ value: option ? getOptionValue(option) : '' });\n\n // Close on selection (when not multiselectable)\n if (option && !handle.isMultiSelect) {\n handle.focusNav?.clear();\n // Defer the close to the next frame (to make sure all other click handler resolve).\n requestAnimationFrame(() => {\n handle.setIsOpen(false);\n });\n }\n },\n\n flushPendingNavigation() {\n // Do navigations actions we could not do because the combobox items were not mounted yet\n focusNav?.flushPendingNavigation();\n },\n\n registerOption(element: HTMLElement, callback: (isFiltered: boolean) => void): () => void {\n const filterLower = filterValue.toLowerCase();\n const text = getOptionValue(element).toLowerCase();\n const isFiltered = filterLower.length > 0 && !text.includes(filterLower);\n optionRegistrations.set(element, { callback, lastFiltered: isFiltered });\n // Notify immediately with current state so the option renders correctly.\n callback(isFiltered);\n notifyVisibilityChange();\n return () => {\n optionRegistrations.delete(element);\n notifyVisibilityChange();\n };\n },\n\n setFilter(newFilter: string) {\n filterValue = newFilter;\n const filterLower = newFilter.toLowerCase();\n for (const [element, reg] of optionRegistrations) {\n const text = getOptionValue(element).toLowerCase();\n const isFiltered = filterLower.length > 0 && !text.includes(filterLower);\n // Only notify when state actually changes to avoid unnecessary re-renders.\n if (isFiltered !== reg.lastFiltered) {\n reg.lastFiltered = isFiltered;\n reg.callback(isFiltered);\n }\n }\n notifyVisibilityChange();\n },\n\n refilterOption(element: HTMLElement) {\n const reg = optionRegistrations.get(element);\n if (!reg) return;\n const filterLower = filterValue.toLowerCase();\n const text = getOptionValue(element).toLowerCase();\n const isFiltered = filterLower.length > 0 && !text.includes(filterLower);\n if (isFiltered !== reg.lastFiltered) {\n reg.lastFiltered = isFiltered;\n reg.callback(isFiltered);\n notifyVisibilityChange();\n }\n },\n\n registerSection(\n element: HTMLElement,\n callback: (state: { hidden: boolean; 'aria-hidden': boolean }) => void,\n ): () => void {\n sectionRegistrations.set(element, { callback, last: { hidden: false, 'aria-hidden': false } });\n // Compute and notify initial state immediately (force to ensure callback fires).\n notifySection(element, sectionRegistrations, optionRegistrations, true);\n return () => {\n sectionRegistrations.delete(element);\n };\n },\n\n registerSkeleton(): () => void {\n const wasLoading = skeletonCount > 0;\n skeletonCount += 1;\n if (!wasLoading) {\n onSkeletonCountChange();\n }\n return () => {\n skeletonCount -= 1;\n if (skeletonCount === 0) {\n onSkeletonCountChange();\n }\n };\n },\n\n registerTrigger(newTrigger: HTMLInputElement | HTMLButtonElement): () => void {\n // If replacing a trigger, detach first\n if (trigger && trigger !== newTrigger) {\n detach();\n }\n trigger = newTrigger;\n tryAttach();\n\n return () => {\n if (trigger === newTrigger) {\n detach();\n trigger = null;\n }\n };\n },\n\n registerListbox(newListbox: HTMLElement): () => void {\n // If we already have the same listbox, nothing to do\n if (listbox === newListbox) return () => {};\n\n // Store the listbox. If trigger is already attached, we need to\n // create focus nav and attach listbox listeners.\n const hadListbox = !!listbox;\n listbox = newListbox;\n\n if (trigger && abortController) {\n if (!hadListbox) {\n // First listbox — set up focus nav and listbox listeners\n focusNav = setupListbox(handle, abortController.signal, notify, { wrapNavigation });\n } else {\n // Replacing listbox — full re-attach\n detach();\n tryAttach();\n }\n }\n\n return () => {\n if (listbox === newListbox) {\n listbox = null;\n focusNav = null;\n // Don't full detach — trigger and mode controller stay alive\n // The listbox may reappear (e.g., popover re-render)\n }\n };\n },\n\n subscribe<K extends keyof ComboboxEventMap>(\n event: K,\n callback: (value: ComboboxEventMap[K]) => void,\n ): () => void {\n subscribers[event].add(callback);\n // Replay current loading state to late subscribers so that framework wrappers\n // that subscribe after initial mount (e.g. async Vue watchers) don't miss the\n // initial events fired during mount.\n if (event === 'open' && isOpenState) {\n (callback as (value: boolean) => void)(true);\n }\n if (event === 'loadingChange' && lastLoadingState) {\n (callback as (value: boolean) => void)(true);\n }\n\n // Cleanup function\n return () => {\n subscribers[event].delete(callback);\n };\n },\n\n destroy() {\n detach();\n trigger = null;\n listbox = null;\n filterValue = '';\n lastOptionsLength = 0;\n lastInputValue = '';\n lastLoadingState = false;\n optionRegistrations.clear();\n sectionRegistrations.clear();\n skeletonCount = 0;\n clearTimeout(loadingTimer);\n announcementSent = false;\n // Clear all subscribers\n for (const set of Object.values(subscribers)) {\n set.clear();\n }\n },\n };\n\n return handle;\n}\n","/** Typeahead interface. */\nexport interface Typeahead {\n /**\n * Handle a printable character keypress.\n * @param key The character typed.\n * @param currentItem The currently active item.\n * @returns The matched item, or null.\n */\n handle(key: string, currentItem: HTMLElement | null): HTMLElement | null;\n\n /**\n * Re-run the match for the *current* accumulated search string against the\n * live DOM, without appending a new character or resetting the timeout.\n\n * @param currentItem The currently active item.\n * @returns The matched item, or null.\n */\n rematch(currentItem: HTMLElement | null): HTMLElement | null;\n\n /** Reset the accumulated search string. */\n reset(): void;\n}\n\n/** Timeout in ms after which the accumulated search string is cleared. */\nconst SEARCH_TIMEOUT = 500;\n\n/**\n * Create a typeahead controller for keyboard navigation in list-like widgets\n * (combobox, menu, listbox, tree, etc.).\n *\n * Accumulates typed characters and matches them against item labels.\n * Supports single-char cycling (e.g. pressing \"a\" repeatedly cycles through\n * items starting with \"a\") and multi-char prefix matching.\n *\n * Uses a {@link TreeWalker} for lazy DOM traversal — items are visited one\n * at a time without materializing the full list.\n *\n * @param getWalker Callback returning a fresh TreeWalker over navigable items, or null if unavailable.\n * @param getItemValue Callback extracting the text label from an item element.\n * @param signal AbortSignal for cleanup.\n * @returns Typeahead instance.\n */\nexport function createTypeahead(\n getWalker: () => TreeWalker | null,\n getItemValue: (item: HTMLElement) => string,\n signal: AbortSignal,\n): Typeahead {\n let searchString = '';\n let searchTimeout: ReturnType<typeof setTimeout> | undefined;\n\n // Reset timeout\n function reset() {\n searchString = '';\n if (searchTimeout !== undefined) {\n clearTimeout(searchTimeout);\n searchTimeout = undefined;\n }\n }\n signal.addEventListener('abort', reset);\n\n // Match the current accumulated search string against the live DOM.\n function match(currentItem: HTMLElement | null): HTMLElement | null {\n if (!searchString) return null;\n\n const walker = getWalker();\n if (!walker) return null;\n\n // Check if the walker has any items at all.\n const firstItem = walker.nextNode() as HTMLElement | null;\n if (!firstItem) return null;\n\n // Determine if all typed characters are the same (e.g. \"aaa\").\n const allSameChar = searchString.split('').every((ch) => ch === searchString[0]);\n\n // When all characters are the same, search by single char and cycle.\n // Otherwise, search by the full accumulated string.\n const searchText = allSameChar ? searchString[0] : searchString;\n\n // Position the walker at the starting point for the search.\n // For same-char cycling, start from the item AFTER currentItem.\n // For multi-char matching, start from currentItem's position.\n // If currentItem is not within the walker's root, treat as null.\n const validCurrent = currentItem && (walker.root as HTMLElement).contains(currentItem) ? currentItem : null;\n let startItem: HTMLElement;\n if (validCurrent) {\n walker.currentNode = validCurrent;\n if (allSameChar) {\n // Advance past current for cycling; if at end, wrap to first.\n const next = walker.nextNode() as HTMLElement | null;\n startItem = next ?? firstItem;\n } else {\n startItem = validCurrent;\n }\n } else {\n startItem = firstItem;\n }\n\n // Walk forward from startItem, wrapping around, until we either\n // find a match or complete a full cycle back to startItem.\n walker.currentNode = startItem;\n let candidate: HTMLElement = startItem;\n // eslint-disable-next-line no-constant-condition\n while (true) {\n const itemText = getItemValue(candidate).toLowerCase();\n if (itemText.startsWith(searchText)) {\n return candidate;\n }\n\n const next = walker.nextNode() as HTMLElement | null;\n if (next) {\n candidate = next;\n } else {\n // Wrap around to the first item.\n walker.currentNode = walker.root;\n const wrapped = walker.nextNode() as HTMLElement | null;\n if (!wrapped) return null;\n candidate = wrapped;\n }\n\n // Full cycle — no match found.\n if (candidate === startItem) {\n return null;\n }\n }\n }\n\n // Handle typeahead keys\n function handle(key: string, currentItem: HTMLElement | null): HTMLElement | null {\n // Clear any pending reset timeout.\n if (searchTimeout !== undefined) {\n clearTimeout(searchTimeout);\n }\n\n // Accumulate the character.\n searchString += key.toLowerCase();\n\n // Schedule clearing the search string after inactivity.\n searchTimeout = setTimeout(reset, SEARCH_TIMEOUT);\n\n return match(currentItem);\n }\n\n // Re-run the match for the current buffer without mutating it.\n function rematch(currentItem: HTMLElement | null): HTMLElement | null {\n return match(currentItem);\n }\n\n return { handle, rematch, reset };\n}\n","/**\n * Is the key a single printable character (not Space, no modifier keys)?\n *\n * Used by typeahead-style keyboard handlers (menu, combobox) to detect when a\n * keypress should start/continue a type-to-search rather than trigger navigation.\n */\nexport function isPrintableKey({ key, altKey, ctrlKey, metaKey }: KeyboardEvent): boolean {\n return key.length === 1 && key !== ' ' && !altKey && !ctrlKey && !metaKey;\n}\n","import type { ComboboxCallbacks, ComboboxHandle } from './types';\nimport { setupCombobox } from './setupCombobox';\nimport { createTypeahead } from '../../utils/typeahead';\nimport { createSelectorTreeWalker } from '../../utils/browser/createSelectorTreeWalker';\nimport { isPrintableKey } from '../../utils/browser/isPrintableKey';\nimport { getOptionLabel } from './utils';\n\n/**\n * Set up a combobox with a button trigger (select-only pattern).\n *\n * Creates a full combobox handle with the button-mode controller automatically\n * wired in and the trigger registered. The consumer only needs to call\n * `handle.registerListbox(listbox)`.\n *\n * Handles: Space (select/open), Home/End (listbox navigation),\n * printable characters (typeahead), and click (toggle).\n *\n * @param button The button element to use as the combobox trigger.\n * @param callbacks Callbacks for select and open/close events.\n * @returns A ComboboxHandle for interacting with the combobox.\n */\nexport function setupComboboxButton(button: HTMLButtonElement, callbacks: ComboboxCallbacks): ComboboxHandle {\n const handle = setupCombobox(callbacks, undefined, (combobox, signal) => {\n const typeahead = createTypeahead(\n () => {\n if (!combobox.listbox) return null;\n // In grid mode, walk gridcells (first cell per row is the option cell).\n // In list mode, walk option elements.\n const selector = combobox.focusNav?.type === 'grid' ? '[role=\"gridcell\"]' : '[role=\"option\"]';\n return createSelectorTreeWalker(combobox.listbox, selector);\n },\n getOptionLabel,\n signal,\n );\n\n // Click toggles the listbox.\n button.addEventListener('click', () => combobox.setIsOpen(!combobox.isOpen), { signal });\n\n return (event: KeyboardEvent): boolean => {\n const nav = combobox.focusNav;\n\n switch (event.key) {\n case 'Tab':\n // Selects the focused option\n if (combobox.isOpen && nav?.selectors.activeItem) {\n combobox.select(nav.selectors.activeItem);\n }\n // Return false to continue normal 'Tab' behavior (focus next).\n return false;\n\n case ' ':\n // Space acts like Enter in button mode.\n if (combobox.isOpen && nav?.selectors.activeItem) {\n // Click the active item — delegated handler handles select + close.\n nav.selectors.activeItem.click();\n } else {\n combobox.setIsOpen(true);\n }\n return true;\n\n case 'ArrowUp':\n // Alt+ArrowUp: select the focused option and close.\n if (event.altKey && combobox.isOpen && nav?.selectors.activeItem) {\n combobox.select(nav.selectors.activeItem);\n combobox.setIsOpen(false);\n return true;\n }\n // All other ArrowUp cases handled by base handler.\n return false;\n\n case 'Home':\n // `goTo` focuses the first option immediately when open, or defers\n // until the options commit when opening from closed.\n combobox.setIsOpen(true);\n nav?.goTo((n) => n.getFirst());\n return true;\n\n case 'End':\n combobox.setIsOpen(true);\n nav?.goTo((n) => n.getLast());\n return true;\n\n case 'ArrowLeft':\n // Grid mode: navigate to previous cell.\n if (nav?.type === 'grid' && combobox.isOpen && nav.selectors.activeItem) {\n nav.goLeft();\n return true;\n }\n return false;\n\n case 'ArrowRight':\n // Grid mode: navigate to next cell.\n if (nav?.type === 'grid' && combobox.isOpen && nav.selectors.activeItem) {\n nav.goRight();\n return true;\n }\n return false;\n\n case 'Escape':\n // Close if open; never clear selection (button-mode has no text input).\n if (combobox.isOpen) {\n combobox.setIsOpen(false);\n }\n return true;\n\n default:\n // Printable characters → typeahead.\n if (isPrintableKey(event)) {\n combobox.setIsOpen(true);\n typeahead.handle(event.key, nav?.selectors.activeItem ?? null);\n nav?.goTo((n) => typeahead.rematch(n.activeItem));\n return true;\n }\n return false;\n }\n };\n });\n\n handle.registerTrigger(button);\n return handle;\n}\n","import { Emphasis, Size } from '../../constants';\nimport { BaseButtonProps, ButtonRoot } from './ButtonRoot';\nimport { Icon } from '../Icon';\nimport type { LumxClassName, JSXElement } from '../../types';\n\nexport interface IconButtonProps extends BaseButtonProps {\n /**\n * Icon (SVG path).\n * If `image` is also set, `image` will be used instead.\n */\n icon?: string;\n /**\n * Image (image url).\n * Has priority over `icon`.\n */\n image?: string;\n /**\n * Label text (required for a11y purpose).\n * If you really don't want an aria-label, you can set an empty label (this is not recommended).\n */\n label: string;\n /** text to be displayed on hover */\n title?: string;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'IconButton';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-icon-button';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<IconButtonProps> = {\n emphasis: Emphasis.high,\n size: Size.m,\n};\n\n/**\n * IconButton component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const IconButton = (props: IconButtonProps) => {\n const {\n emphasis = DEFAULT_PROPS.emphasis,\n image,\n icon,\n label,\n size = DEFAULT_PROPS.size,\n ...forwardedProps\n } = props;\n\n const defaultChildren = (image ? (\n <img\n // no need to set alt as an aria-label is already set on the button\n alt=\"\"\n src={image}\n />\n ) : (\n Icon({ icon: icon as string })\n )) as unknown as JSXElement;\n\n return ButtonRoot({\n emphasis,\n size,\n ...forwardedProps,\n 'aria-label': label,\n variant: 'icon',\n children: defaultChildren,\n });\n};\n\nIconButton.displayName = COMPONENT_NAME;\nIconButton.className = CLASSNAME;\nIconButton.defaultProps = DEFAULT_PROPS;\n","/**\n * Custom positioning reference element.\n * @see https://floating-ui.com/docs/virtual-elements\n */\n\nconst sides = ['top', 'right', 'bottom', 'left'];\nconst alignments = ['start', 'end'];\nconst placements = /*#__PURE__*/sides.reduce((acc, side) => acc.concat(side, side + \"-\" + alignments[0], side + \"-\" + alignments[1]), []);\nconst min = Math.min;\nconst max = Math.max;\nconst round = Math.round;\nconst floor = Math.floor;\nconst createCoords = v => ({\n x: v,\n y: v\n});\nconst oppositeSideMap = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nconst oppositeAlignmentMap = {\n start: 'end',\n end: 'start'\n};\nfunction clamp(start, value, end) {\n return max(start, min(value, end));\n}\nfunction evaluate(value, param) {\n return typeof value === 'function' ? value(param) : value;\n}\nfunction getSide(placement) {\n return placement.split('-')[0];\n}\nfunction getAlignment(placement) {\n return placement.split('-')[1];\n}\nfunction getOppositeAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}\nfunction getAxisLength(axis) {\n return axis === 'y' ? 'height' : 'width';\n}\nconst yAxisSides = /*#__PURE__*/new Set(['top', 'bottom']);\nfunction getSideAxis(placement) {\n return yAxisSides.has(getSide(placement)) ? 'y' : 'x';\n}\nfunction getAlignmentAxis(placement) {\n return getOppositeAxis(getSideAxis(placement));\n}\nfunction getAlignmentSides(placement, rects, rtl) {\n if (rtl === void 0) {\n rtl = false;\n }\n const alignment = getAlignment(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const length = getAxisLength(alignmentAxis);\n let mainAlignmentSide = alignmentAxis === 'x' ? alignment === (rtl ? 'end' : 'start') ? 'right' : 'left' : alignment === 'start' ? 'bottom' : 'top';\n if (rects.reference[length] > rects.floating[length]) {\n mainAlignmentSide = getOppositePlacement(mainAlignmentSide);\n }\n return [mainAlignmentSide, getOppositePlacement(mainAlignmentSide)];\n}\nfunction getExpandedPlacements(placement) {\n const oppositePlacement = getOppositePlacement(placement);\n return [getOppositeAlignmentPlacement(placement), oppositePlacement, getOppositeAlignmentPlacement(oppositePlacement)];\n}\nfunction getOppositeAlignmentPlacement(placement) {\n return placement.replace(/start|end/g, alignment => oppositeAlignmentMap[alignment]);\n}\nconst lrPlacement = ['left', 'right'];\nconst rlPlacement = ['right', 'left'];\nconst tbPlacement = ['top', 'bottom'];\nconst btPlacement = ['bottom', 'top'];\nfunction getSideList(side, isStart, rtl) {\n switch (side) {\n case 'top':\n case 'bottom':\n if (rtl) return isStart ? rlPlacement : lrPlacement;\n return isStart ? lrPlacement : rlPlacement;\n case 'left':\n case 'right':\n return isStart ? tbPlacement : btPlacement;\n default:\n return [];\n }\n}\nfunction getOppositeAxisPlacements(placement, flipAlignment, direction, rtl) {\n const alignment = getAlignment(placement);\n let list = getSideList(getSide(placement), direction === 'start', rtl);\n if (alignment) {\n list = list.map(side => side + \"-\" + alignment);\n if (flipAlignment) {\n list = list.concat(list.map(getOppositeAlignmentPlacement));\n }\n }\n return list;\n}\nfunction getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, side => oppositeSideMap[side]);\n}\nfunction expandPaddingObject(padding) {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n ...padding\n };\n}\nfunction getPaddingObject(padding) {\n return typeof padding !== 'number' ? expandPaddingObject(padding) : {\n top: padding,\n right: padding,\n bottom: padding,\n left: padding\n };\n}\nfunction rectToClientRect(rect) {\n const {\n x,\n y,\n width,\n height\n } = rect;\n return {\n width,\n height,\n top: y,\n left: x,\n right: x + width,\n bottom: y + height,\n x,\n y\n };\n}\n\nexport { alignments, clamp, createCoords, evaluate, expandPaddingObject, floor, getAlignment, getAlignmentAxis, getAlignmentSides, getAxisLength, getExpandedPlacements, getOppositeAlignmentPlacement, getOppositeAxis, getOppositeAxisPlacements, getOppositePlacement, getPaddingObject, getSide, getSideAxis, max, min, placements, rectToClientRect, round, sides };\n","import { getSideAxis, getAlignmentAxis, getAxisLength, getSide, getAlignment, evaluate, getPaddingObject, rectToClientRect, min, clamp, placements, getAlignmentSides, getOppositeAlignmentPlacement, getOppositePlacement, getExpandedPlacements, getOppositeAxisPlacements, sides, max, getOppositeAxis } from '@floating-ui/utils';\nexport { rectToClientRect } from '@floating-ui/utils';\n\nfunction computeCoordsFromPlacement(_ref, placement, rtl) {\n let {\n reference,\n floating\n } = _ref;\n const sideAxis = getSideAxis(placement);\n const alignmentAxis = getAlignmentAxis(placement);\n const alignLength = getAxisLength(alignmentAxis);\n const side = getSide(placement);\n const isVertical = sideAxis === 'y';\n const commonX = reference.x + reference.width / 2 - floating.width / 2;\n const commonY = reference.y + reference.height / 2 - floating.height / 2;\n const commonAlign = reference[alignLength] / 2 - floating[alignLength] / 2;\n let coords;\n switch (side) {\n case 'top':\n coords = {\n x: commonX,\n y: reference.y - floating.height\n };\n break;\n case 'bottom':\n coords = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n case 'right':\n coords = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n case 'left':\n coords = {\n x: reference.x - floating.width,\n y: commonY\n };\n break;\n default:\n coords = {\n x: reference.x,\n y: reference.y\n };\n }\n switch (getAlignment(placement)) {\n case 'start':\n coords[alignmentAxis] -= commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n case 'end':\n coords[alignmentAxis] += commonAlign * (rtl && isVertical ? -1 : 1);\n break;\n }\n return coords;\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nasync function detectOverflow(state, options) {\n var _await$platform$isEle;\n if (options === void 0) {\n options = {};\n }\n const {\n x,\n y,\n platform,\n rects,\n elements,\n strategy\n } = state;\n const {\n boundary = 'clippingAncestors',\n rootBoundary = 'viewport',\n elementContext = 'floating',\n altBoundary = false,\n padding = 0\n } = evaluate(options, state);\n const paddingObject = getPaddingObject(padding);\n const altContext = elementContext === 'floating' ? 'reference' : 'floating';\n const element = elements[altBoundary ? altContext : elementContext];\n const clippingClientRect = rectToClientRect(await platform.getClippingRect({\n element: ((_await$platform$isEle = await (platform.isElement == null ? void 0 : platform.isElement(element))) != null ? _await$platform$isEle : true) ? element : element.contextElement || (await (platform.getDocumentElement == null ? void 0 : platform.getDocumentElement(elements.floating))),\n boundary,\n rootBoundary,\n strategy\n }));\n const rect = elementContext === 'floating' ? {\n x,\n y,\n width: rects.floating.width,\n height: rects.floating.height\n } : rects.reference;\n const offsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(elements.floating));\n const offsetScale = (await (platform.isElement == null ? void 0 : platform.isElement(offsetParent))) ? (await (platform.getScale == null ? void 0 : platform.getScale(offsetParent))) || {\n x: 1,\n y: 1\n } : {\n x: 1,\n y: 1\n };\n const elementClientRect = rectToClientRect(platform.convertOffsetParentRelativeRectToViewportRelativeRect ? await platform.convertOffsetParentRelativeRectToViewportRelativeRect({\n elements,\n rect,\n offsetParent,\n strategy\n }) : rect);\n return {\n top: (clippingClientRect.top - elementClientRect.top + paddingObject.top) / offsetScale.y,\n bottom: (elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom) / offsetScale.y,\n left: (clippingClientRect.left - elementClientRect.left + paddingObject.left) / offsetScale.x,\n right: (elementClientRect.right - clippingClientRect.right + paddingObject.right) / offsetScale.x\n };\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n *\n * This export does not have any `platform` interface logic. You will need to\n * write one for the platform you are using Floating UI with.\n */\nconst computePosition = async (reference, floating, config) => {\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform\n } = config;\n const validMiddleware = middleware.filter(Boolean);\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(floating));\n let rects = await platform.getElementRects({\n reference,\n floating,\n strategy\n });\n let {\n x,\n y\n } = computeCoordsFromPlacement(rects, placement, rtl);\n let statefulPlacement = placement;\n let middlewareData = {};\n let resetCount = 0;\n for (let i = 0; i < validMiddleware.length; i++) {\n var _platform$detectOverf;\n const {\n name,\n fn\n } = validMiddleware[i];\n const {\n x: nextX,\n y: nextY,\n data,\n reset\n } = await fn({\n x,\n y,\n initialPlacement: placement,\n placement: statefulPlacement,\n strategy,\n middlewareData,\n rects,\n platform: {\n ...platform,\n detectOverflow: (_platform$detectOverf = platform.detectOverflow) != null ? _platform$detectOverf : detectOverflow\n },\n elements: {\n reference,\n floating\n }\n });\n x = nextX != null ? nextX : x;\n y = nextY != null ? nextY : y;\n middlewareData = {\n ...middlewareData,\n [name]: {\n ...middlewareData[name],\n ...data\n }\n };\n if (reset && resetCount <= 50) {\n resetCount++;\n if (typeof reset === 'object') {\n if (reset.placement) {\n statefulPlacement = reset.placement;\n }\n if (reset.rects) {\n rects = reset.rects === true ? await platform.getElementRects({\n reference,\n floating,\n strategy\n }) : reset.rects;\n }\n ({\n x,\n y\n } = computeCoordsFromPlacement(rects, statefulPlacement, rtl));\n }\n i = -1;\n }\n }\n return {\n x,\n y,\n placement: statefulPlacement,\n strategy,\n middlewareData\n };\n};\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = options => ({\n name: 'arrow',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n platform,\n elements,\n middlewareData\n } = state;\n // Since `element` is required, we don't Partial<> the type.\n const {\n element,\n padding = 0\n } = evaluate(options, state) || {};\n if (element == null) {\n return {};\n }\n const paddingObject = getPaddingObject(padding);\n const coords = {\n x,\n y\n };\n const axis = getAlignmentAxis(placement);\n const length = getAxisLength(axis);\n const arrowDimensions = await platform.getDimensions(element);\n const isYAxis = axis === 'y';\n const minProp = isYAxis ? 'top' : 'left';\n const maxProp = isYAxis ? 'bottom' : 'right';\n const clientProp = isYAxis ? 'clientHeight' : 'clientWidth';\n const endDiff = rects.reference[length] + rects.reference[axis] - coords[axis] - rects.floating[length];\n const startDiff = coords[axis] - rects.reference[axis];\n const arrowOffsetParent = await (platform.getOffsetParent == null ? void 0 : platform.getOffsetParent(element));\n let clientSize = arrowOffsetParent ? arrowOffsetParent[clientProp] : 0;\n\n // DOM platform can return `window` as the `offsetParent`.\n if (!clientSize || !(await (platform.isElement == null ? void 0 : platform.isElement(arrowOffsetParent)))) {\n clientSize = elements.floating[clientProp] || rects.floating[length];\n }\n const centerToReference = endDiff / 2 - startDiff / 2;\n\n // If the padding is large enough that it causes the arrow to no longer be\n // centered, modify the padding so that it is centered.\n const largestPossiblePadding = clientSize / 2 - arrowDimensions[length] / 2 - 1;\n const minPadding = min(paddingObject[minProp], largestPossiblePadding);\n const maxPadding = min(paddingObject[maxProp], largestPossiblePadding);\n\n // Make sure the arrow doesn't overflow the floating element if the center\n // point is outside the floating element's bounds.\n const min$1 = minPadding;\n const max = clientSize - arrowDimensions[length] - maxPadding;\n const center = clientSize / 2 - arrowDimensions[length] / 2 + centerToReference;\n const offset = clamp(min$1, center, max);\n\n // If the reference is small enough that the arrow's padding causes it to\n // to point to nothing for an aligned placement, adjust the offset of the\n // floating element itself. To ensure `shift()` continues to take action,\n // a single reset is performed when this is true.\n const shouldAddOffset = !middlewareData.arrow && getAlignment(placement) != null && center !== offset && rects.reference[length] / 2 - (center < min$1 ? minPadding : maxPadding) - arrowDimensions[length] / 2 < 0;\n const alignmentOffset = shouldAddOffset ? center < min$1 ? center - min$1 : center - max : 0;\n return {\n [axis]: coords[axis] + alignmentOffset,\n data: {\n [axis]: offset,\n centerOffset: center - offset - alignmentOffset,\n ...(shouldAddOffset && {\n alignmentOffset\n })\n },\n reset: shouldAddOffset\n };\n }\n});\n\nfunction getPlacementList(alignment, autoAlignment, allowedPlacements) {\n const allowedPlacementsSortedByAlignment = alignment ? [...allowedPlacements.filter(placement => getAlignment(placement) === alignment), ...allowedPlacements.filter(placement => getAlignment(placement) !== alignment)] : allowedPlacements.filter(placement => getSide(placement) === placement);\n return allowedPlacementsSortedByAlignment.filter(placement => {\n if (alignment) {\n return getAlignment(placement) === alignment || (autoAlignment ? getOppositeAlignmentPlacement(placement) !== placement : false);\n }\n return true;\n });\n}\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'autoPlacement',\n options,\n async fn(state) {\n var _middlewareData$autoP, _middlewareData$autoP2, _placementsThatFitOnE;\n const {\n rects,\n middlewareData,\n placement,\n platform,\n elements\n } = state;\n const {\n crossAxis = false,\n alignment,\n allowedPlacements = placements,\n autoAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n const placements$1 = alignment !== undefined || allowedPlacements === placements ? getPlacementList(alignment || null, autoAlignment, allowedPlacements) : allowedPlacements;\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const currentIndex = ((_middlewareData$autoP = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP.index) || 0;\n const currentPlacement = placements$1[currentIndex];\n if (currentPlacement == null) {\n return {};\n }\n const alignmentSides = getAlignmentSides(currentPlacement, rects, await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating)));\n\n // Make `computeCoords` start from the right place.\n if (placement !== currentPlacement) {\n return {\n reset: {\n placement: placements$1[0]\n }\n };\n }\n const currentOverflows = [overflow[getSide(currentPlacement)], overflow[alignmentSides[0]], overflow[alignmentSides[1]]];\n const allOverflows = [...(((_middlewareData$autoP2 = middlewareData.autoPlacement) == null ? void 0 : _middlewareData$autoP2.overflows) || []), {\n placement: currentPlacement,\n overflows: currentOverflows\n }];\n const nextPlacement = placements$1[currentIndex + 1];\n\n // There are more placements to check.\n if (nextPlacement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n const placementsSortedByMostSpace = allOverflows.map(d => {\n const alignment = getAlignment(d.placement);\n return [d.placement, alignment && crossAxis ?\n // Check along the mainAxis and main crossAxis side.\n d.overflows.slice(0, 2).reduce((acc, v) => acc + v, 0) :\n // Check only the mainAxis.\n d.overflows[0], d.overflows];\n }).sort((a, b) => a[1] - b[1]);\n const placementsThatFitOnEachSide = placementsSortedByMostSpace.filter(d => d[2].slice(0,\n // Aligned placements should not check their opposite crossAxis\n // side.\n getAlignment(d[0]) ? 2 : 3).every(v => v <= 0));\n const resetPlacement = ((_placementsThatFitOnE = placementsThatFitOnEachSide[0]) == null ? void 0 : _placementsThatFitOnE[0]) || placementsSortedByMostSpace[0][0];\n if (resetPlacement !== placement) {\n return {\n data: {\n index: currentIndex + 1,\n overflows: allOverflows\n },\n reset: {\n placement: resetPlacement\n }\n };\n }\n return {};\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'flip',\n options,\n async fn(state) {\n var _middlewareData$arrow, _middlewareData$flip;\n const {\n placement,\n middlewareData,\n rects,\n initialPlacement,\n platform,\n elements\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true,\n fallbackPlacements: specifiedFallbackPlacements,\n fallbackStrategy = 'bestFit',\n fallbackAxisSideDirection = 'none',\n flipAlignment = true,\n ...detectOverflowOptions\n } = evaluate(options, state);\n\n // If a reset by the arrow was caused due to an alignment offset being\n // added, we should skip any logic now since `flip()` has already done its\n // work.\n // https://github.com/floating-ui/floating-ui/issues/2549#issuecomment-1719601643\n if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n const side = getSide(placement);\n const initialSideAxis = getSideAxis(initialPlacement);\n const isBasePlacement = getSide(initialPlacement) === initialPlacement;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipAlignment ? [getOppositePlacement(initialPlacement)] : getExpandedPlacements(initialPlacement));\n const hasFallbackAxisSideDirection = fallbackAxisSideDirection !== 'none';\n if (!specifiedFallbackPlacements && hasFallbackAxisSideDirection) {\n fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));\n }\n const placements = [initialPlacement, ...fallbackPlacements];\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const overflows = [];\n let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];\n if (checkMainAxis) {\n overflows.push(overflow[side]);\n }\n if (checkCrossAxis) {\n const sides = getAlignmentSides(placement, rects, rtl);\n overflows.push(overflow[sides[0]], overflow[sides[1]]);\n }\n overflowsData = [...overflowsData, {\n placement,\n overflows\n }];\n\n // One or more sides is overflowing.\n if (!overflows.every(side => side <= 0)) {\n var _middlewareData$flip2, _overflowsData$filter;\n const nextIndex = (((_middlewareData$flip2 = middlewareData.flip) == null ? void 0 : _middlewareData$flip2.index) || 0) + 1;\n const nextPlacement = placements[nextIndex];\n if (nextPlacement) {\n const ignoreCrossAxisOverflow = checkCrossAxis === 'alignment' ? initialSideAxis !== getSideAxis(nextPlacement) : false;\n if (!ignoreCrossAxisOverflow ||\n // We leave the current main axis only if every placement on that axis\n // overflows the main axis.\n overflowsData.every(d => getSideAxis(d.placement) === initialSideAxis ? d.overflows[0] > 0 : true)) {\n // Try next placement and re-run the lifecycle.\n return {\n data: {\n index: nextIndex,\n overflows: overflowsData\n },\n reset: {\n placement: nextPlacement\n }\n };\n }\n }\n\n // First, find the candidates that fit on the mainAxis side of overflow,\n // then find the placement that fits the best on the main crossAxis side.\n let resetPlacement = (_overflowsData$filter = overflowsData.filter(d => d.overflows[0] <= 0).sort((a, b) => a.overflows[1] - b.overflows[1])[0]) == null ? void 0 : _overflowsData$filter.placement;\n\n // Otherwise fallback.\n if (!resetPlacement) {\n switch (fallbackStrategy) {\n case 'bestFit':\n {\n var _overflowsData$filter2;\n const placement = (_overflowsData$filter2 = overflowsData.filter(d => {\n if (hasFallbackAxisSideDirection) {\n const currentSideAxis = getSideAxis(d.placement);\n return currentSideAxis === initialSideAxis ||\n // Create a bias to the `y` side axis due to horizontal\n // reading directions favoring greater width.\n currentSideAxis === 'y';\n }\n return true;\n }).map(d => [d.placement, d.overflows.filter(overflow => overflow > 0).reduce((acc, overflow) => acc + overflow, 0)]).sort((a, b) => a[1] - b[1])[0]) == null ? void 0 : _overflowsData$filter2[0];\n if (placement) {\n resetPlacement = placement;\n }\n break;\n }\n case 'initialPlacement':\n resetPlacement = initialPlacement;\n break;\n }\n }\n if (placement !== resetPlacement) {\n return {\n reset: {\n placement: resetPlacement\n }\n };\n }\n }\n return {};\n }\n };\n};\n\nfunction getSideOffsets(overflow, rect) {\n return {\n top: overflow.top - rect.height,\n right: overflow.right - rect.width,\n bottom: overflow.bottom - rect.height,\n left: overflow.left - rect.width\n };\n}\nfunction isAnySideFullyClipped(overflow) {\n return sides.some(side => overflow[side] >= 0);\n}\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'hide',\n options,\n async fn(state) {\n const {\n rects,\n platform\n } = state;\n const {\n strategy = 'referenceHidden',\n ...detectOverflowOptions\n } = evaluate(options, state);\n switch (strategy) {\n case 'referenceHidden':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n elementContext: 'reference'\n });\n const offsets = getSideOffsets(overflow, rects.reference);\n return {\n data: {\n referenceHiddenOffsets: offsets,\n referenceHidden: isAnySideFullyClipped(offsets)\n }\n };\n }\n case 'escaped':\n {\n const overflow = await platform.detectOverflow(state, {\n ...detectOverflowOptions,\n altBoundary: true\n });\n const offsets = getSideOffsets(overflow, rects.floating);\n return {\n data: {\n escapedOffsets: offsets,\n escaped: isAnySideFullyClipped(offsets)\n }\n };\n }\n default:\n {\n return {};\n }\n }\n }\n };\n};\n\nfunction getBoundingRect(rects) {\n const minX = min(...rects.map(rect => rect.left));\n const minY = min(...rects.map(rect => rect.top));\n const maxX = max(...rects.map(rect => rect.right));\n const maxY = max(...rects.map(rect => rect.bottom));\n return {\n x: minX,\n y: minY,\n width: maxX - minX,\n height: maxY - minY\n };\n}\nfunction getRectsByLine(rects) {\n const sortedRects = rects.slice().sort((a, b) => a.y - b.y);\n const groups = [];\n let prevRect = null;\n for (let i = 0; i < sortedRects.length; i++) {\n const rect = sortedRects[i];\n if (!prevRect || rect.y - prevRect.y > prevRect.height / 2) {\n groups.push([rect]);\n } else {\n groups[groups.length - 1].push(rect);\n }\n prevRect = rect;\n }\n return groups.map(rect => rectToClientRect(getBoundingRect(rect)));\n}\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'inline',\n options,\n async fn(state) {\n const {\n placement,\n elements,\n rects,\n platform,\n strategy\n } = state;\n // A MouseEvent's client{X,Y} coords can be up to 2 pixels off a\n // ClientRect's bounds, despite the event listener being triggered. A\n // padding of 2 seems to handle this issue.\n const {\n padding = 2,\n x,\n y\n } = evaluate(options, state);\n const nativeClientRects = Array.from((await (platform.getClientRects == null ? void 0 : platform.getClientRects(elements.reference))) || []);\n const clientRects = getRectsByLine(nativeClientRects);\n const fallback = rectToClientRect(getBoundingRect(nativeClientRects));\n const paddingObject = getPaddingObject(padding);\n function getBoundingClientRect() {\n // There are two rects and they are disjoined.\n if (clientRects.length === 2 && clientRects[0].left > clientRects[1].right && x != null && y != null) {\n // Find the first rect in which the point is fully inside.\n return clientRects.find(rect => x > rect.left - paddingObject.left && x < rect.right + paddingObject.right && y > rect.top - paddingObject.top && y < rect.bottom + paddingObject.bottom) || fallback;\n }\n\n // There are 2 or more connected rects.\n if (clientRects.length >= 2) {\n if (getSideAxis(placement) === 'y') {\n const firstRect = clientRects[0];\n const lastRect = clientRects[clientRects.length - 1];\n const isTop = getSide(placement) === 'top';\n const top = firstRect.top;\n const bottom = lastRect.bottom;\n const left = isTop ? firstRect.left : lastRect.left;\n const right = isTop ? firstRect.right : lastRect.right;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n const isLeftSide = getSide(placement) === 'left';\n const maxRight = max(...clientRects.map(rect => rect.right));\n const minLeft = min(...clientRects.map(rect => rect.left));\n const measureRects = clientRects.filter(rect => isLeftSide ? rect.left === minLeft : rect.right === maxRight);\n const top = measureRects[0].top;\n const bottom = measureRects[measureRects.length - 1].bottom;\n const left = minLeft;\n const right = maxRight;\n const width = right - left;\n const height = bottom - top;\n return {\n top,\n bottom,\n left,\n right,\n width,\n height,\n x: left,\n y: top\n };\n }\n return fallback;\n }\n const resetRects = await platform.getElementRects({\n reference: {\n getBoundingClientRect\n },\n floating: elements.floating,\n strategy\n });\n if (rects.reference.x !== resetRects.reference.x || rects.reference.y !== resetRects.reference.y || rects.reference.width !== resetRects.reference.width || rects.reference.height !== resetRects.reference.height) {\n return {\n reset: {\n rects: resetRects\n }\n };\n }\n return {};\n }\n };\n};\n\nconst originSides = /*#__PURE__*/new Set(['left', 'top']);\n\n// For type backwards-compatibility, the `OffsetOptions` type was also\n// Derivable.\n\nasync function convertValueToCoords(state, options) {\n const {\n placement,\n platform,\n elements\n } = state;\n const rtl = await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating));\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isVertical = getSideAxis(placement) === 'y';\n const mainAxisMulti = originSides.has(side) ? -1 : 1;\n const crossAxisMulti = rtl && isVertical ? -1 : 1;\n const rawValue = evaluate(options, state);\n\n // eslint-disable-next-line prefer-const\n let {\n mainAxis,\n crossAxis,\n alignmentAxis\n } = typeof rawValue === 'number' ? {\n mainAxis: rawValue,\n crossAxis: 0,\n alignmentAxis: null\n } : {\n mainAxis: rawValue.mainAxis || 0,\n crossAxis: rawValue.crossAxis || 0,\n alignmentAxis: rawValue.alignmentAxis\n };\n if (alignment && typeof alignmentAxis === 'number') {\n crossAxis = alignment === 'end' ? alignmentAxis * -1 : alignmentAxis;\n }\n return isVertical ? {\n x: crossAxis * crossAxisMulti,\n y: mainAxis * mainAxisMulti\n } : {\n x: mainAxis * mainAxisMulti,\n y: crossAxis * crossAxisMulti\n };\n}\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = function (options) {\n if (options === void 0) {\n options = 0;\n }\n return {\n name: 'offset',\n options,\n async fn(state) {\n var _middlewareData$offse, _middlewareData$arrow;\n const {\n x,\n y,\n placement,\n middlewareData\n } = state;\n const diffCoords = await convertValueToCoords(state, options);\n\n // If the placement is the same and the arrow caused an alignment offset\n // then we don't need to change the positioning coordinates.\n if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {\n return {};\n }\n return {\n x: x + diffCoords.x,\n y: y + diffCoords.y,\n data: {\n ...diffCoords,\n placement\n }\n };\n }\n };\n};\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'shift',\n options,\n async fn(state) {\n const {\n x,\n y,\n placement,\n platform\n } = state;\n const {\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = false,\n limiter = {\n fn: _ref => {\n let {\n x,\n y\n } = _ref;\n return {\n x,\n y\n };\n }\n },\n ...detectOverflowOptions\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const crossAxis = getSideAxis(getSide(placement));\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n if (checkMainAxis) {\n const minSide = mainAxis === 'y' ? 'top' : 'left';\n const maxSide = mainAxis === 'y' ? 'bottom' : 'right';\n const min = mainAxisCoord + overflow[minSide];\n const max = mainAxisCoord - overflow[maxSide];\n mainAxisCoord = clamp(min, mainAxisCoord, max);\n }\n if (checkCrossAxis) {\n const minSide = crossAxis === 'y' ? 'top' : 'left';\n const maxSide = crossAxis === 'y' ? 'bottom' : 'right';\n const min = crossAxisCoord + overflow[minSide];\n const max = crossAxisCoord - overflow[maxSide];\n crossAxisCoord = clamp(min, crossAxisCoord, max);\n }\n const limitedCoords = limiter.fn({\n ...state,\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n });\n return {\n ...limitedCoords,\n data: {\n x: limitedCoords.x - x,\n y: limitedCoords.y - y,\n enabled: {\n [mainAxis]: checkMainAxis,\n [crossAxis]: checkCrossAxis\n }\n }\n };\n }\n };\n};\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n options,\n fn(state) {\n const {\n x,\n y,\n placement,\n rects,\n middlewareData\n } = state;\n const {\n offset = 0,\n mainAxis: checkMainAxis = true,\n crossAxis: checkCrossAxis = true\n } = evaluate(options, state);\n const coords = {\n x,\n y\n };\n const crossAxis = getSideAxis(placement);\n const mainAxis = getOppositeAxis(crossAxis);\n let mainAxisCoord = coords[mainAxis];\n let crossAxisCoord = coords[crossAxis];\n const rawOffset = evaluate(offset, state);\n const computedOffset = typeof rawOffset === 'number' ? {\n mainAxis: rawOffset,\n crossAxis: 0\n } : {\n mainAxis: 0,\n crossAxis: 0,\n ...rawOffset\n };\n if (checkMainAxis) {\n const len = mainAxis === 'y' ? 'height' : 'width';\n const limitMin = rects.reference[mainAxis] - rects.floating[len] + computedOffset.mainAxis;\n const limitMax = rects.reference[mainAxis] + rects.reference[len] - computedOffset.mainAxis;\n if (mainAxisCoord < limitMin) {\n mainAxisCoord = limitMin;\n } else if (mainAxisCoord > limitMax) {\n mainAxisCoord = limitMax;\n }\n }\n if (checkCrossAxis) {\n var _middlewareData$offse, _middlewareData$offse2;\n const len = mainAxis === 'y' ? 'width' : 'height';\n const isOriginSide = originSides.has(getSide(placement));\n const limitMin = rects.reference[crossAxis] - rects.floating[len] + (isOriginSide ? ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse[crossAxis]) || 0 : 0) + (isOriginSide ? 0 : computedOffset.crossAxis);\n const limitMax = rects.reference[crossAxis] + rects.reference[len] + (isOriginSide ? 0 : ((_middlewareData$offse2 = middlewareData.offset) == null ? void 0 : _middlewareData$offse2[crossAxis]) || 0) - (isOriginSide ? computedOffset.crossAxis : 0);\n if (crossAxisCoord < limitMin) {\n crossAxisCoord = limitMin;\n } else if (crossAxisCoord > limitMax) {\n crossAxisCoord = limitMax;\n }\n }\n return {\n [mainAxis]: mainAxisCoord,\n [crossAxis]: crossAxisCoord\n };\n }\n };\n};\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = function (options) {\n if (options === void 0) {\n options = {};\n }\n return {\n name: 'size',\n options,\n async fn(state) {\n var _state$middlewareData, _state$middlewareData2;\n const {\n placement,\n rects,\n platform,\n elements\n } = state;\n const {\n apply = () => {},\n ...detectOverflowOptions\n } = evaluate(options, state);\n const overflow = await platform.detectOverflow(state, detectOverflowOptions);\n const side = getSide(placement);\n const alignment = getAlignment(placement);\n const isYAxis = getSideAxis(placement) === 'y';\n const {\n width,\n height\n } = rects.floating;\n let heightSide;\n let widthSide;\n if (side === 'top' || side === 'bottom') {\n heightSide = side;\n widthSide = alignment === ((await (platform.isRTL == null ? void 0 : platform.isRTL(elements.floating))) ? 'start' : 'end') ? 'left' : 'right';\n } else {\n widthSide = side;\n heightSide = alignment === 'end' ? 'top' : 'bottom';\n }\n const maximumClippingHeight = height - overflow.top - overflow.bottom;\n const maximumClippingWidth = width - overflow.left - overflow.right;\n const overflowAvailableHeight = min(height - overflow[heightSide], maximumClippingHeight);\n const overflowAvailableWidth = min(width - overflow[widthSide], maximumClippingWidth);\n const noShift = !state.middlewareData.shift;\n let availableHeight = overflowAvailableHeight;\n let availableWidth = overflowAvailableWidth;\n if ((_state$middlewareData = state.middlewareData.shift) != null && _state$middlewareData.enabled.x) {\n availableWidth = maximumClippingWidth;\n }\n if ((_state$middlewareData2 = state.middlewareData.shift) != null && _state$middlewareData2.enabled.y) {\n availableHeight = maximumClippingHeight;\n }\n if (noShift && !alignment) {\n const xMin = max(overflow.left, 0);\n const xMax = max(overflow.right, 0);\n const yMin = max(overflow.top, 0);\n const yMax = max(overflow.bottom, 0);\n if (isYAxis) {\n availableWidth = width - 2 * (xMin !== 0 || xMax !== 0 ? xMin + xMax : max(overflow.left, overflow.right));\n } else {\n availableHeight = height - 2 * (yMin !== 0 || yMax !== 0 ? yMin + yMax : max(overflow.top, overflow.bottom));\n }\n }\n await apply({\n ...state,\n availableWidth,\n availableHeight\n });\n const nextDimensions = await platform.getDimensions(elements.floating);\n if (width !== nextDimensions.width || height !== nextDimensions.height) {\n return {\n reset: {\n rects: true\n }\n };\n }\n return {};\n }\n };\n};\n\nexport { arrow, autoPlacement, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, shift, size };\n","function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nconst invalidOverflowDisplayValues = /*#__PURE__*/new Set(['inline', 'contents']);\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !invalidOverflowDisplayValues.has(display);\n}\nconst tableElements = /*#__PURE__*/new Set(['table', 'td', 'th']);\nfunction isTableElement(element) {\n return tableElements.has(getNodeName(element));\n}\nconst topLayerSelectors = [':popover-open', ':modal'];\nfunction isTopLayer(element) {\n return topLayerSelectors.some(selector => {\n try {\n return element.matches(selector);\n } catch (_e) {\n return false;\n }\n });\n}\nconst transformProperties = ['transform', 'translate', 'scale', 'rotate', 'perspective'];\nconst willChangeValues = ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'];\nconst containValues = ['paint', 'layout', 'strict', 'content'];\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return transformProperties.some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || willChangeValues.some(value => (css.willChange || '').includes(value)) || containValues.some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nconst lastTraversableNodeNames = /*#__PURE__*/new Set(['html', 'body', '#document']);\nfunction isLastTraversableNode(node) {\n return lastTraversableNodeNames.has(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n","import { rectToClientRect, arrow as arrow$1, autoPlacement as autoPlacement$1, detectOverflow as detectOverflow$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1, computePosition as computePosition$1 } from '@floating-ui/core';\nimport { round, createCoords, max, min, floor } from '@floating-ui/utils';\nimport { getComputedStyle as getComputedStyle$1, isHTMLElement, isElement, getWindow, isWebKit, getFrameElement, getNodeScroll, getDocumentElement, isTopLayer, getNodeName, isOverflowElement, getOverflowAncestors, getParentNode, isLastTraversableNode, isContainingBlock, isTableElement, getContainingBlock } from '@floating-ui/utils/dom';\nexport { getOverflowAncestors } from '@floating-ui/utils/dom';\n\nfunction getCssDimensions(element) {\n const css = getComputedStyle$1(element);\n // In testing environments, the `width` and `height` properties are empty\n // strings for SVG elements, returning NaN. Fallback to `0` in this case.\n let width = parseFloat(css.width) || 0;\n let height = parseFloat(css.height) || 0;\n const hasOffset = isHTMLElement(element);\n const offsetWidth = hasOffset ? element.offsetWidth : width;\n const offsetHeight = hasOffset ? element.offsetHeight : height;\n const shouldFallback = round(width) !== offsetWidth || round(height) !== offsetHeight;\n if (shouldFallback) {\n width = offsetWidth;\n height = offsetHeight;\n }\n return {\n width,\n height,\n $: shouldFallback\n };\n}\n\nfunction unwrapElement(element) {\n return !isElement(element) ? element.contextElement : element;\n}\n\nfunction getScale(element) {\n const domElement = unwrapElement(element);\n if (!isHTMLElement(domElement)) {\n return createCoords(1);\n }\n const rect = domElement.getBoundingClientRect();\n const {\n width,\n height,\n $\n } = getCssDimensions(domElement);\n let x = ($ ? round(rect.width) : rect.width) / width;\n let y = ($ ? round(rect.height) : rect.height) / height;\n\n // 0, NaN, or Infinity should always fallback to 1.\n\n if (!x || !Number.isFinite(x)) {\n x = 1;\n }\n if (!y || !Number.isFinite(y)) {\n y = 1;\n }\n return {\n x,\n y\n };\n}\n\nconst noOffsets = /*#__PURE__*/createCoords(0);\nfunction getVisualOffsets(element) {\n const win = getWindow(element);\n if (!isWebKit() || !win.visualViewport) {\n return noOffsets;\n }\n return {\n x: win.visualViewport.offsetLeft,\n y: win.visualViewport.offsetTop\n };\n}\nfunction shouldAddVisualOffsets(element, isFixed, floatingOffsetParent) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n if (!floatingOffsetParent || isFixed && floatingOffsetParent !== getWindow(element)) {\n return false;\n }\n return isFixed;\n}\n\nfunction getBoundingClientRect(element, includeScale, isFixedStrategy, offsetParent) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n if (isFixedStrategy === void 0) {\n isFixedStrategy = false;\n }\n const clientRect = element.getBoundingClientRect();\n const domElement = unwrapElement(element);\n let scale = createCoords(1);\n if (includeScale) {\n if (offsetParent) {\n if (isElement(offsetParent)) {\n scale = getScale(offsetParent);\n }\n } else {\n scale = getScale(element);\n }\n }\n const visualOffsets = shouldAddVisualOffsets(domElement, isFixedStrategy, offsetParent) ? getVisualOffsets(domElement) : createCoords(0);\n let x = (clientRect.left + visualOffsets.x) / scale.x;\n let y = (clientRect.top + visualOffsets.y) / scale.y;\n let width = clientRect.width / scale.x;\n let height = clientRect.height / scale.y;\n if (domElement) {\n const win = getWindow(domElement);\n const offsetWin = offsetParent && isElement(offsetParent) ? getWindow(offsetParent) : offsetParent;\n let currentWin = win;\n let currentIFrame = getFrameElement(currentWin);\n while (currentIFrame && offsetParent && offsetWin !== currentWin) {\n const iframeScale = getScale(currentIFrame);\n const iframeRect = currentIFrame.getBoundingClientRect();\n const css = getComputedStyle$1(currentIFrame);\n const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css.paddingLeft)) * iframeScale.x;\n const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css.paddingTop)) * iframeScale.y;\n x *= iframeScale.x;\n y *= iframeScale.y;\n width *= iframeScale.x;\n height *= iframeScale.y;\n x += left;\n y += top;\n currentWin = getWindow(currentIFrame);\n currentIFrame = getFrameElement(currentWin);\n }\n }\n return rectToClientRect({\n width,\n height,\n x,\n y\n });\n}\n\n// If <html> has a CSS width greater than the viewport, then this will be\n// incorrect for RTL.\nfunction getWindowScrollBarX(element, rect) {\n const leftScroll = getNodeScroll(element).scrollLeft;\n if (!rect) {\n return getBoundingClientRect(getDocumentElement(element)).left + leftScroll;\n }\n return rect.left + leftScroll;\n}\n\nfunction getHTMLOffset(documentElement, scroll) {\n const htmlRect = documentElement.getBoundingClientRect();\n const x = htmlRect.left + scroll.scrollLeft - getWindowScrollBarX(documentElement, htmlRect);\n const y = htmlRect.top + scroll.scrollTop;\n return {\n x,\n y\n };\n}\n\nfunction convertOffsetParentRelativeRectToViewportRelativeRect(_ref) {\n let {\n elements,\n rect,\n offsetParent,\n strategy\n } = _ref;\n const isFixed = strategy === 'fixed';\n const documentElement = getDocumentElement(offsetParent);\n const topLayer = elements ? isTopLayer(elements.floating) : false;\n if (offsetParent === documentElement || topLayer && isFixed) {\n return rect;\n }\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n let scale = createCoords(1);\n const offsets = createCoords(0);\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isHTMLElement(offsetParent)) {\n const offsetRect = getBoundingClientRect(offsetParent);\n scale = getScale(offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n }\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n return {\n width: rect.width * scale.x,\n height: rect.height * scale.y,\n x: rect.x * scale.x - scroll.scrollLeft * scale.x + offsets.x + htmlOffset.x,\n y: rect.y * scale.y - scroll.scrollTop * scale.y + offsets.y + htmlOffset.y\n };\n}\n\nfunction getClientRects(element) {\n return Array.from(element.getClientRects());\n}\n\n// Gets the entire size of the scrollable document area, even extending outside\n// of the `<html>` and `<body>` rect bounds if horizontally scrollable.\nfunction getDocumentRect(element) {\n const html = getDocumentElement(element);\n const scroll = getNodeScroll(element);\n const body = element.ownerDocument.body;\n const width = max(html.scrollWidth, html.clientWidth, body.scrollWidth, body.clientWidth);\n const height = max(html.scrollHeight, html.clientHeight, body.scrollHeight, body.clientHeight);\n let x = -scroll.scrollLeft + getWindowScrollBarX(element);\n const y = -scroll.scrollTop;\n if (getComputedStyle$1(body).direction === 'rtl') {\n x += max(html.clientWidth, body.clientWidth) - width;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\n// Safety check: ensure the scrollbar space is reasonable in case this\n// calculation is affected by unusual styles.\n// Most scrollbars leave 15-18px of space.\nconst SCROLLBAR_MAX = 25;\nfunction getViewportRect(element, strategy) {\n const win = getWindow(element);\n const html = getDocumentElement(element);\n const visualViewport = win.visualViewport;\n let width = html.clientWidth;\n let height = html.clientHeight;\n let x = 0;\n let y = 0;\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height;\n const visualViewportBased = isWebKit();\n if (!visualViewportBased || visualViewportBased && strategy === 'fixed') {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n const windowScrollbarX = getWindowScrollBarX(html);\n // <html> `overflow: hidden` + `scrollbar-gutter: stable` reduces the\n // visual width of the <html> but this is not considered in the size\n // of `html.clientWidth`.\n if (windowScrollbarX <= 0) {\n const doc = html.ownerDocument;\n const body = doc.body;\n const bodyStyles = getComputedStyle(body);\n const bodyMarginInline = doc.compatMode === 'CSS1Compat' ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;\n const clippingStableScrollbarWidth = Math.abs(html.clientWidth - body.clientWidth - bodyMarginInline);\n if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {\n width -= clippingStableScrollbarWidth;\n }\n } else if (windowScrollbarX <= SCROLLBAR_MAX) {\n // If the <body> scrollbar is on the left, the width needs to be extended\n // by the scrollbar amount so there isn't extra space on the right.\n width += windowScrollbarX;\n }\n return {\n width,\n height,\n x,\n y\n };\n}\n\nconst absoluteOrFixed = /*#__PURE__*/new Set(['absolute', 'fixed']);\n// Returns the inner client rect, subtracting scrollbars if present.\nfunction getInnerBoundingClientRect(element, strategy) {\n const clientRect = getBoundingClientRect(element, true, strategy === 'fixed');\n const top = clientRect.top + element.clientTop;\n const left = clientRect.left + element.clientLeft;\n const scale = isHTMLElement(element) ? getScale(element) : createCoords(1);\n const width = element.clientWidth * scale.x;\n const height = element.clientHeight * scale.y;\n const x = left * scale.x;\n const y = top * scale.y;\n return {\n width,\n height,\n x,\n y\n };\n}\nfunction getClientRectFromClippingAncestor(element, clippingAncestor, strategy) {\n let rect;\n if (clippingAncestor === 'viewport') {\n rect = getViewportRect(element, strategy);\n } else if (clippingAncestor === 'document') {\n rect = getDocumentRect(getDocumentElement(element));\n } else if (isElement(clippingAncestor)) {\n rect = getInnerBoundingClientRect(clippingAncestor, strategy);\n } else {\n const visualOffsets = getVisualOffsets(element);\n rect = {\n x: clippingAncestor.x - visualOffsets.x,\n y: clippingAncestor.y - visualOffsets.y,\n width: clippingAncestor.width,\n height: clippingAncestor.height\n };\n }\n return rectToClientRect(rect);\n}\nfunction hasFixedPositionAncestor(element, stopNode) {\n const parentNode = getParentNode(element);\n if (parentNode === stopNode || !isElement(parentNode) || isLastTraversableNode(parentNode)) {\n return false;\n }\n return getComputedStyle$1(parentNode).position === 'fixed' || hasFixedPositionAncestor(parentNode, stopNode);\n}\n\n// A \"clipping ancestor\" is an `overflow` element with the characteristic of\n// clipping (or hiding) child elements. This returns all clipping ancestors\n// of the given element up the tree.\nfunction getClippingElementAncestors(element, cache) {\n const cachedResult = cache.get(element);\n if (cachedResult) {\n return cachedResult;\n }\n let result = getOverflowAncestors(element, [], false).filter(el => isElement(el) && getNodeName(el) !== 'body');\n let currentContainingBlockComputedStyle = null;\n const elementIsFixed = getComputedStyle$1(element).position === 'fixed';\n let currentNode = elementIsFixed ? getParentNode(element) : element;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n while (isElement(currentNode) && !isLastTraversableNode(currentNode)) {\n const computedStyle = getComputedStyle$1(currentNode);\n const currentNodeIsContaining = isContainingBlock(currentNode);\n if (!currentNodeIsContaining && computedStyle.position === 'fixed') {\n currentContainingBlockComputedStyle = null;\n }\n const shouldDropCurrentNode = elementIsFixed ? !currentNodeIsContaining && !currentContainingBlockComputedStyle : !currentNodeIsContaining && computedStyle.position === 'static' && !!currentContainingBlockComputedStyle && absoluteOrFixed.has(currentContainingBlockComputedStyle.position) || isOverflowElement(currentNode) && !currentNodeIsContaining && hasFixedPositionAncestor(element, currentNode);\n if (shouldDropCurrentNode) {\n // Drop non-containing blocks.\n result = result.filter(ancestor => ancestor !== currentNode);\n } else {\n // Record last containing block for next iteration.\n currentContainingBlockComputedStyle = computedStyle;\n }\n currentNode = getParentNode(currentNode);\n }\n cache.set(element, result);\n return result;\n}\n\n// Gets the maximum area that the element is visible in due to any number of\n// clipping ancestors.\nfunction getClippingRect(_ref) {\n let {\n element,\n boundary,\n rootBoundary,\n strategy\n } = _ref;\n const elementClippingAncestors = boundary === 'clippingAncestors' ? isTopLayer(element) ? [] : getClippingElementAncestors(element, this._c) : [].concat(boundary);\n const clippingAncestors = [...elementClippingAncestors, rootBoundary];\n const firstClippingAncestor = clippingAncestors[0];\n const clippingRect = clippingAncestors.reduce((accRect, clippingAncestor) => {\n const rect = getClientRectFromClippingAncestor(element, clippingAncestor, strategy);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromClippingAncestor(element, firstClippingAncestor, strategy));\n return {\n width: clippingRect.right - clippingRect.left,\n height: clippingRect.bottom - clippingRect.top,\n x: clippingRect.left,\n y: clippingRect.top\n };\n}\n\nfunction getDimensions(element) {\n const {\n width,\n height\n } = getCssDimensions(element);\n return {\n width,\n height\n };\n}\n\nfunction getRectRelativeToOffsetParent(element, offsetParent, strategy) {\n const isOffsetParentAnElement = isHTMLElement(offsetParent);\n const documentElement = getDocumentElement(offsetParent);\n const isFixed = strategy === 'fixed';\n const rect = getBoundingClientRect(element, true, isFixed, offsetParent);\n let scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n const offsets = createCoords(0);\n\n // If the <body> scrollbar appears on the left (e.g. RTL systems). Use\n // Firefox with layout.scrollbar.side = 3 in about:config to test this.\n function setLeftRTLScrollbarOffset() {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || isOverflowElement(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n if (isOffsetParentAnElement) {\n const offsetRect = getBoundingClientRect(offsetParent, true, isFixed, offsetParent);\n offsets.x = offsetRect.x + offsetParent.clientLeft;\n offsets.y = offsetRect.y + offsetParent.clientTop;\n } else if (documentElement) {\n setLeftRTLScrollbarOffset();\n }\n }\n if (isFixed && !isOffsetParentAnElement && documentElement) {\n setLeftRTLScrollbarOffset();\n }\n const htmlOffset = documentElement && !isOffsetParentAnElement && !isFixed ? getHTMLOffset(documentElement, scroll) : createCoords(0);\n const x = rect.left + scroll.scrollLeft - offsets.x - htmlOffset.x;\n const y = rect.top + scroll.scrollTop - offsets.y - htmlOffset.y;\n return {\n x,\n y,\n width: rect.width,\n height: rect.height\n };\n}\n\nfunction isStaticPositioned(element) {\n return getComputedStyle$1(element).position === 'static';\n}\n\nfunction getTrueOffsetParent(element, polyfill) {\n if (!isHTMLElement(element) || getComputedStyle$1(element).position === 'fixed') {\n return null;\n }\n if (polyfill) {\n return polyfill(element);\n }\n let rawOffsetParent = element.offsetParent;\n\n // Firefox returns the <html> element as the offsetParent if it's non-static,\n // while Chrome and Safari return the <body> element. The <body> element must\n // be used to perform the correct calculations even if the <html> element is\n // non-static.\n if (getDocumentElement(element) === rawOffsetParent) {\n rawOffsetParent = rawOffsetParent.ownerDocument.body;\n }\n return rawOffsetParent;\n}\n\n// Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\nfunction getOffsetParent(element, polyfill) {\n const win = getWindow(element);\n if (isTopLayer(element)) {\n return win;\n }\n if (!isHTMLElement(element)) {\n let svgOffsetParent = getParentNode(element);\n while (svgOffsetParent && !isLastTraversableNode(svgOffsetParent)) {\n if (isElement(svgOffsetParent) && !isStaticPositioned(svgOffsetParent)) {\n return svgOffsetParent;\n }\n svgOffsetParent = getParentNode(svgOffsetParent);\n }\n return win;\n }\n let offsetParent = getTrueOffsetParent(element, polyfill);\n while (offsetParent && isTableElement(offsetParent) && isStaticPositioned(offsetParent)) {\n offsetParent = getTrueOffsetParent(offsetParent, polyfill);\n }\n if (offsetParent && isLastTraversableNode(offsetParent) && isStaticPositioned(offsetParent) && !isContainingBlock(offsetParent)) {\n return win;\n }\n return offsetParent || getContainingBlock(element) || win;\n}\n\nconst getElementRects = async function (data) {\n const getOffsetParentFn = this.getOffsetParent || getOffsetParent;\n const getDimensionsFn = this.getDimensions;\n const floatingDimensions = await getDimensionsFn(data.floating);\n return {\n reference: getRectRelativeToOffsetParent(data.reference, await getOffsetParentFn(data.floating), data.strategy),\n floating: {\n x: 0,\n y: 0,\n width: floatingDimensions.width,\n height: floatingDimensions.height\n }\n };\n};\n\nfunction isRTL(element) {\n return getComputedStyle$1(element).direction === 'rtl';\n}\n\nconst platform = {\n convertOffsetParentRelativeRectToViewportRelativeRect,\n getDocumentElement,\n getClippingRect,\n getOffsetParent,\n getElementRects,\n getClientRects,\n getDimensions,\n getScale,\n isElement,\n isRTL\n};\n\nfunction rectsAreEqual(a, b) {\n return a.x === b.x && a.y === b.y && a.width === b.width && a.height === b.height;\n}\n\n// https://samthor.au/2021/observing-dom/\nfunction observeMove(element, onMove) {\n let io = null;\n let timeoutId;\n const root = getDocumentElement(element);\n function cleanup() {\n var _io;\n clearTimeout(timeoutId);\n (_io = io) == null || _io.disconnect();\n io = null;\n }\n function refresh(skip, threshold) {\n if (skip === void 0) {\n skip = false;\n }\n if (threshold === void 0) {\n threshold = 1;\n }\n cleanup();\n const elementRectForRootMargin = element.getBoundingClientRect();\n const {\n left,\n top,\n width,\n height\n } = elementRectForRootMargin;\n if (!skip) {\n onMove();\n }\n if (!width || !height) {\n return;\n }\n const insetTop = floor(top);\n const insetRight = floor(root.clientWidth - (left + width));\n const insetBottom = floor(root.clientHeight - (top + height));\n const insetLeft = floor(left);\n const rootMargin = -insetTop + \"px \" + -insetRight + \"px \" + -insetBottom + \"px \" + -insetLeft + \"px\";\n const options = {\n rootMargin,\n threshold: max(0, min(1, threshold)) || 1\n };\n let isFirstUpdate = true;\n function handleObserve(entries) {\n const ratio = entries[0].intersectionRatio;\n if (ratio !== threshold) {\n if (!isFirstUpdate) {\n return refresh();\n }\n if (!ratio) {\n // If the reference is clipped, the ratio is 0. Throttle the refresh\n // to prevent an infinite loop of updates.\n timeoutId = setTimeout(() => {\n refresh(false, 1e-7);\n }, 1000);\n } else {\n refresh(false, ratio);\n }\n }\n if (ratio === 1 && !rectsAreEqual(elementRectForRootMargin, element.getBoundingClientRect())) {\n // It's possible that even though the ratio is reported as 1, the\n // element is not actually fully within the IntersectionObserver's root\n // area anymore. This can happen under performance constraints. This may\n // be a bug in the browser's IntersectionObserver implementation. To\n // work around this, we compare the element's bounding rect now with\n // what it was at the time we created the IntersectionObserver. If they\n // are not equal then the element moved, so we refresh.\n refresh();\n }\n isFirstUpdate = false;\n }\n\n // Older browsers don't support a `document` as the root and will throw an\n // error.\n try {\n io = new IntersectionObserver(handleObserve, {\n ...options,\n // Handle <iframe>s\n root: root.ownerDocument\n });\n } catch (_e) {\n io = new IntersectionObserver(handleObserve, options);\n }\n io.observe(element);\n }\n refresh(true);\n return cleanup;\n}\n\n/**\n * Automatically updates the position of the floating element when necessary.\n * Should only be called when the floating element is mounted on the DOM or\n * visible on the screen.\n * @returns cleanup function that should be invoked when the floating element is\n * removed from the DOM or hidden from the screen.\n * @see https://floating-ui.com/docs/autoUpdate\n */\nfunction autoUpdate(reference, floating, update, options) {\n if (options === void 0) {\n options = {};\n }\n const {\n ancestorScroll = true,\n ancestorResize = true,\n elementResize = typeof ResizeObserver === 'function',\n layoutShift = typeof IntersectionObserver === 'function',\n animationFrame = false\n } = options;\n const referenceEl = unwrapElement(reference);\n const ancestors = ancestorScroll || ancestorResize ? [...(referenceEl ? getOverflowAncestors(referenceEl) : []), ...getOverflowAncestors(floating)] : [];\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.addEventListener('scroll', update, {\n passive: true\n });\n ancestorResize && ancestor.addEventListener('resize', update);\n });\n const cleanupIo = referenceEl && layoutShift ? observeMove(referenceEl, update) : null;\n let reobserveFrame = -1;\n let resizeObserver = null;\n if (elementResize) {\n resizeObserver = new ResizeObserver(_ref => {\n let [firstEntry] = _ref;\n if (firstEntry && firstEntry.target === referenceEl && resizeObserver) {\n // Prevent update loops when using the `size` middleware.\n // https://github.com/floating-ui/floating-ui/issues/1740\n resizeObserver.unobserve(floating);\n cancelAnimationFrame(reobserveFrame);\n reobserveFrame = requestAnimationFrame(() => {\n var _resizeObserver;\n (_resizeObserver = resizeObserver) == null || _resizeObserver.observe(floating);\n });\n }\n update();\n });\n if (referenceEl && !animationFrame) {\n resizeObserver.observe(referenceEl);\n }\n resizeObserver.observe(floating);\n }\n let frameId;\n let prevRefRect = animationFrame ? getBoundingClientRect(reference) : null;\n if (animationFrame) {\n frameLoop();\n }\n function frameLoop() {\n const nextRefRect = getBoundingClientRect(reference);\n if (prevRefRect && !rectsAreEqual(prevRefRect, nextRefRect)) {\n update();\n }\n prevRefRect = nextRefRect;\n frameId = requestAnimationFrame(frameLoop);\n }\n update();\n return () => {\n var _resizeObserver2;\n ancestors.forEach(ancestor => {\n ancestorScroll && ancestor.removeEventListener('scroll', update);\n ancestorResize && ancestor.removeEventListener('resize', update);\n });\n cleanupIo == null || cleanupIo();\n (_resizeObserver2 = resizeObserver) == null || _resizeObserver2.disconnect();\n resizeObserver = null;\n if (animationFrame) {\n cancelAnimationFrame(frameId);\n }\n };\n}\n\n/**\n * Resolves with an object of overflow side offsets that determine how much the\n * element is overflowing a given clipping boundary on each side.\n * - positive = overflowing the boundary by that number of pixels\n * - negative = how many pixels left before it will overflow\n * - 0 = lies flush with the boundary\n * @see https://floating-ui.com/docs/detectOverflow\n */\nconst detectOverflow = detectOverflow$1;\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = offset$1;\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = autoPlacement$1;\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = shift$1;\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = flip$1;\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = size$1;\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = hide$1;\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = arrow$1;\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = inline$1;\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = limitShift$1;\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element\n * next to a given reference element.\n */\nconst computePosition = (reference, floating, options) => {\n // This caches the expensive `getClippingElementAncestors` function so that\n // multiple lifecycle resets re-use the same result. It only lives for a\n // single call. If other functions become expensive, we can add them as well.\n const cache = new Map();\n const mergedOptions = {\n platform,\n ...options\n };\n const platformWithCache = {\n ...mergedOptions.platform,\n _c: cache\n };\n return computePosition$1(reference, floating, {\n ...mergedOptions,\n platform: platformWithCache\n });\n};\n\nexport { arrow, autoPlacement, autoUpdate, computePosition, detectOverflow, flip, hide, inline, limitShift, offset, platform, shift, size };\n","import { arrow as arrow$1, computePosition } from '@floating-ui/dom';\nexport { autoPlacement, autoUpdate, computePosition, detectOverflow, flip, getOverflowAncestors, hide, inline, limitShift, offset, platform, shift, size } from '@floating-ui/dom';\nimport { isNode, getNodeName } from '@floating-ui/utils/dom';\nimport { unref, computed, ref, shallowRef, watch, getCurrentScope, onScopeDispose, shallowReadonly } from 'vue-demi';\n\nfunction isComponentPublicInstance(target) {\n return target != null && typeof target === 'object' && '$el' in target;\n}\nfunction unwrapElement(target) {\n if (isComponentPublicInstance(target)) {\n const element = target.$el;\n return isNode(element) && getNodeName(element) === '#comment' ? null : element;\n }\n return target;\n}\n\nfunction toValue(source) {\n return typeof source === 'function' ? source() : unref(source);\n}\n\n/**\n * Positions an inner element of the floating element such that it is centered to the reference element.\n * @param options The arrow options.\n * @see https://floating-ui.com/docs/arrow\n */\nfunction arrow(options) {\n return {\n name: 'arrow',\n options,\n fn(args) {\n const element = unwrapElement(toValue(options.element));\n if (element == null) {\n return {};\n }\n return arrow$1({\n element,\n padding: options.padding\n }).fn(args);\n }\n };\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\n/**\n * Computes the `x` and `y` coordinates that will place the floating element next to a reference element when it is given a certain CSS positioning strategy.\n * @param reference The reference template ref.\n * @param floating The floating template ref.\n * @param options The floating options.\n * @see https://floating-ui.com/docs/vue\n */\nfunction useFloating(reference, floating, options) {\n if (options === void 0) {\n options = {};\n }\n const whileElementsMountedOption = options.whileElementsMounted;\n const openOption = computed(() => {\n var _toValue;\n return (_toValue = toValue(options.open)) != null ? _toValue : true;\n });\n const middlewareOption = computed(() => toValue(options.middleware));\n const placementOption = computed(() => {\n var _toValue2;\n return (_toValue2 = toValue(options.placement)) != null ? _toValue2 : 'bottom';\n });\n const strategyOption = computed(() => {\n var _toValue3;\n return (_toValue3 = toValue(options.strategy)) != null ? _toValue3 : 'absolute';\n });\n const transformOption = computed(() => {\n var _toValue4;\n return (_toValue4 = toValue(options.transform)) != null ? _toValue4 : true;\n });\n const referenceElement = computed(() => unwrapElement(reference.value));\n const floatingElement = computed(() => unwrapElement(floating.value));\n const x = ref(0);\n const y = ref(0);\n const strategy = ref(strategyOption.value);\n const placement = ref(placementOption.value);\n const middlewareData = shallowRef({});\n const isPositioned = ref(false);\n const floatingStyles = computed(() => {\n const initialStyles = {\n position: strategy.value,\n left: '0',\n top: '0'\n };\n if (!floatingElement.value) {\n return initialStyles;\n }\n const xVal = roundByDPR(floatingElement.value, x.value);\n const yVal = roundByDPR(floatingElement.value, y.value);\n if (transformOption.value) {\n return {\n ...initialStyles,\n transform: \"translate(\" + xVal + \"px, \" + yVal + \"px)\",\n ...(getDPR(floatingElement.value) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy.value,\n left: xVal + \"px\",\n top: yVal + \"px\"\n };\n });\n let whileElementsMountedCleanup;\n function update() {\n if (referenceElement.value == null || floatingElement.value == null) {\n return;\n }\n const open = openOption.value;\n computePosition(referenceElement.value, floatingElement.value, {\n middleware: middlewareOption.value,\n placement: placementOption.value,\n strategy: strategyOption.value\n }).then(position => {\n x.value = position.x;\n y.value = position.y;\n strategy.value = position.strategy;\n placement.value = position.placement;\n middlewareData.value = position.middlewareData;\n /**\n * The floating element's position may be recomputed while it's closed\n * but still mounted (such as when transitioning out). To ensure\n * `isPositioned` will be `false` initially on the next open, avoid\n * setting it to `true` when `open === false` (must be specified).\n */\n isPositioned.value = open !== false;\n });\n }\n function cleanup() {\n if (typeof whileElementsMountedCleanup === 'function') {\n whileElementsMountedCleanup();\n whileElementsMountedCleanup = undefined;\n }\n }\n function attach() {\n cleanup();\n if (whileElementsMountedOption === undefined) {\n update();\n return;\n }\n if (referenceElement.value != null && floatingElement.value != null) {\n whileElementsMountedCleanup = whileElementsMountedOption(referenceElement.value, floatingElement.value, update);\n return;\n }\n }\n function reset() {\n if (!openOption.value) {\n isPositioned.value = false;\n }\n }\n watch([middlewareOption, placementOption, strategyOption, openOption], update, {\n flush: 'sync'\n });\n watch([referenceElement, floatingElement], attach, {\n flush: 'sync'\n });\n watch(openOption, reset, {\n flush: 'sync'\n });\n if (getCurrentScope()) {\n onScopeDispose(cleanup);\n }\n return {\n x: shallowReadonly(x),\n y: shallowReadonly(y),\n strategy: shallowReadonly(strategy),\n placement: shallowReadonly(placement),\n middlewareData: shallowReadonly(middlewareData),\n isPositioned: shallowReadonly(isPositioned),\n floatingStyles,\n update\n };\n}\n\nexport { arrow, useFloating };\n","export const ARIA_LINK_MODES = ['aria-describedby', 'aria-labelledby'] as const;\n\n/**\n * Arrow size (in pixel).\n */\nexport const ARROW_SIZE = 8;\n\n/**\n * Make sure tooltip appear above popovers.\n * Hardcoded as POPOVER_ZINDEX (9999) + 1.\n */\nexport const TOOLTIP_ZINDEX = 10000;\n","import type { CommonRef, HasClassName, HasCloseMode, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { ARIA_LINK_MODES, TOOLTIP_ZINDEX } from './constants';\n\n/** Position of the tooltip relative to the anchor element. */\nexport type TooltipPlacement = 'top' | 'right' | 'bottom' | 'left';\n\n/**\n * Framework-agnostic tooltip props (shared between React and Vue wrappers).\n */\nexport interface TooltipProps extends HasCloseMode {\n /** Delay (in ms) before closing the tooltip. */\n delay?: number;\n /** Whether the tooltip is displayed even without the mouse hovering the anchor. */\n forceOpen?: boolean;\n /** Label text. */\n label?: string | null | false;\n /** Placement of the tooltip relative to the anchor. */\n placement?: TooltipPlacement;\n /** Choose how the tooltip text should link to the anchor */\n ariaLinkMode?: (typeof ARIA_LINK_MODES)[number];\n /** Z-index for the tooltip */\n zIndex?: number;\n}\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TooltipProps> = {\n placement: 'bottom',\n closeMode: 'unmount',\n ariaLinkMode: 'aria-describedby',\n zIndex: TOOLTIP_ZINDEX,\n};\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Tooltip';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-tooltip';\n\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Props for the TooltipPopup rendering component.\n */\nexport interface TooltipPopupProps extends HasClassName {\n /** Unique ID for the tooltip (used for ARIA linking) */\n id: string;\n /** Label text to display in the tooltip */\n label: string;\n /** Resolved placement position from floating-ui */\n position: string;\n /** Whether the tooltip is visually hidden (closeMode=\"hide\") */\n isHidden: boolean;\n /** Positioning styles from floating-ui */\n style?: any;\n /** Z-index for the tooltip */\n zIndex?: number;\n /** Reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Tooltip popup rendering component.\n * Pure JSX template for the tooltip popup element (arrow + inner text + BEM classes).\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const TooltipPopup = (props: TooltipPopupProps) => {\n const { id, label, position, isHidden, style, zIndex = TOOLTIP_ZINDEX, className, ref, ...forwardedProps } = props;\n\n const labelLines = label ? label.split('\\n') : [];\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n id={id}\n role=\"tooltip\"\n className={classNames.join(\n className,\n block({\n [`position-${position}`]: Boolean(position),\n }),\n isHidden && classNames.visuallyHidden(),\n )}\n style={{ ...(isHidden ? undefined : style), zIndex }}\n data-popper-placement={position}\n >\n <div className={element('arrow')} />\n <div className={element('inner')}>\n {labelLines.map((line, index) => (\n <p key={index}>{line}</p>\n ))}\n </div>\n </div>\n );\n};\n\nTooltipPopup.displayName = COMPONENT_NAME;\nTooltipPopup.className = CLASSNAME;\n\nexport { ARIA_LINK_MODES, ARROW_SIZE, TOOLTIP_ZINDEX } from './constants';\n","/** Check if the focus is visible on the given element */\nexport const isFocusVisible = (element?: HTMLElement) => {\n try {\n return element?.matches?.(':focus-visible, [data-focus-visible-added]');\n } catch (_ignored) {\n // Can fail on non browser env\n return true;\n }\n};\n","/** Return true if the browser does not support pointer hover */\nexport const isHoverNotSupported = (): boolean => !!window.matchMedia?.('(hover: none)').matches;\n","import { IS_BROWSER, TOOLTIP_HOVER_DELAY, TOOLTIP_LONG_PRESS_DELAY } from '../../constants';\nimport { isFocusVisible } from '../../utils/browser/isFocusVisible';\nimport { isHoverNotSupported } from '../../utils/browser/isHoverNotSupported';\n\nexport interface TooltipOpenManagerOptions {\n /** Delay in millisecond to display the tooltip. */\n delay?: number;\n /** Callback to update the open state. */\n onStateChange: (isOpen: boolean) => void;\n}\n\nexport interface TooltipOpenManager {\n /** Attach event listeners to the anchor element. */\n attachAnchor(anchorElement: HTMLElement): void;\n /** Attach event listeners to the popper element (for hover support). */\n attachPopper(popperElement: HTMLElement | null): void;\n /** Close the tooltip immediately (for escape key integration). */\n close(): void;\n /** Destroy the manager, clearing all timers and detaching events. */\n destroy(): void;\n}\n\n/**\n * Framework-agnostic open/close state machine for tooltip.\n * Manages hover, touch, focus, timers, and escape key behavior.\n */\nexport function createTooltipOpenManager(options: TooltipOpenManagerOptions): TooltipOpenManager {\n const { delay, onStateChange } = options;\n\n let timer: ReturnType<typeof setTimeout> | undefined;\n let openStartTime: number | undefined;\n let shouldOpen: boolean | undefined;\n let anchorController: AbortController | undefined;\n let popperController: AbortController | undefined;\n\n // Run timer to defer updating the isOpen state.\n const deferUpdate = (duration: number) => {\n if (timer) clearTimeout(timer);\n const update = () => {\n onStateChange(!!shouldOpen);\n };\n // Skip timeout in fake browsers\n if (!IS_BROWSER) update();\n else timer = setTimeout(update, duration);\n };\n\n const hoverNotSupported = isHoverNotSupported();\n const hasTouch = typeof window !== 'undefined' && 'ontouchstart' in window;\n\n // Adapt open/close delay\n const openDelay = delay || (hoverNotSupported ? TOOLTIP_LONG_PRESS_DELAY.open : TOOLTIP_HOVER_DELAY.open);\n const closeDelay = hoverNotSupported ? TOOLTIP_LONG_PRESS_DELAY.close : TOOLTIP_HOVER_DELAY.close;\n\n // Open (or/and cancel closing) of tooltip.\n const open = () => {\n if (shouldOpen && !timer) return;\n shouldOpen = true;\n openStartTime = Date.now();\n deferUpdate(openDelay);\n };\n\n // Close or cancel opening of tooltip\n const getClose = (overrideDelay: number) => {\n if (!shouldOpen && !timer) return;\n shouldOpen = false;\n deferUpdate(overrideDelay);\n };\n const close = () => getClose(closeDelay);\n const closeImmediately = () => getClose(0);\n\n return {\n attachAnchor(anchorElement: HTMLElement): void {\n anchorController = new AbortController();\n const { signal } = anchorController;\n\n if (hoverNotSupported) {\n /**\n * Handle touchend event.\n * If end comes before the open delay => cancel tooltip (close immediate).\n * Else if end comes after the open delay => tooltip takes priority, the anchor's default touch end event is prevented.\n */\n const longPressEnd = (evt: Event) => {\n if (!openStartTime) return;\n if (Date.now() - openStartTime >= openDelay) {\n // Tooltip take priority, event prevented.\n evt.stopPropagation();\n evt.preventDefault();\n anchorElement.focus();\n // Close with delay.\n close();\n } else {\n // Close immediately.\n closeImmediately();\n }\n };\n\n anchorElement.addEventListener(hasTouch ? 'touchstart' : 'mousedown', open, { signal });\n anchorElement.addEventListener(hasTouch ? 'touchend' : 'mouseup', longPressEnd, { signal });\n } else {\n anchorElement.addEventListener('mouseenter', open, { signal });\n anchorElement.addEventListener('mouseleave', close, { signal });\n anchorElement.addEventListener('mouseup', closeImmediately, { signal });\n }\n\n // Events always applied no matter the browser:\n // Open on focus (only if focus is visible).\n anchorElement.addEventListener(\n 'focusin',\n (e: Event) => {\n // Skip if focus is not visible\n if (!isFocusVisible(e.target as HTMLElement)) return;\n open();\n },\n { signal },\n );\n // Close on lost focus.\n anchorElement.addEventListener('focusout', closeImmediately, { signal });\n },\n\n attachPopper(popperElement: HTMLElement | null): void {\n popperController?.abort();\n if (!popperElement || hoverNotSupported) return;\n popperController = new AbortController();\n const { signal } = popperController;\n // Popper element hover\n popperElement.addEventListener('mouseenter', open, { signal });\n popperElement.addEventListener('mouseleave', close, { signal });\n },\n\n close(): void {\n closeImmediately();\n },\n\n destroy(): void {\n if (timer) clearTimeout(timer);\n anchorController?.abort();\n popperController?.abort();\n },\n };\n}\n","import { type Ref, ref, shallowRef, watchEffect } from 'vue';\nimport { createTooltipOpenManager, type TooltipOpenManager } from '@lumx/core/js/components/Tooltip/tooltipOpenManager';\n\n/**\n * Vue composable controlling tooltip visibility using mouse hover the anchor and delay.\n *\n * @param delay Delay in millisecond to display the tooltip.\n * @param anchorElement Tooltip anchor element ref.\n * @return whether or not to show the tooltip plus popper mount callback and manager ref.\n */\nexport function useTooltipOpen(delay: Ref<number | undefined>, anchorElement: Ref<HTMLElement | null>) {\n const isOpen = ref(false);\n const managerRef = shallowRef<TooltipOpenManager>();\n\n watchEffect((onCleanup) => {\n const el = anchorElement.value;\n if (!el) return;\n\n const manager = createTooltipOpenManager({\n delay: delay.value,\n onStateChange: (value) => {\n isOpen.value = value;\n },\n });\n\n managerRef.value = manager;\n manager.attachAnchor(el);\n\n onCleanup(() => {\n manager.destroy();\n });\n });\n\n const onPopperMount = (el: HTMLElement | null) => {\n managerRef.value?.attachPopper(el);\n };\n\n return { isOpen, onPopperMount, manager: managerRef };\n}\n","import { h, cloneVNode, Fragment, Comment, Text, type VNode } from 'vue';\n\ninterface Options {\n /** Slot content (default slot VNodes) */\n slotContent: VNode[] | undefined;\n /** Set tooltip anchor element */\n setAnchorElement: (el: HTMLElement | null) => void;\n /** Whether the tooltip is mounted */\n isMounted: boolean;\n /** Tooltip id */\n id: string;\n /** Tooltip label */\n label?: string | null | false;\n /** Choose how the tooltip text should link to the anchor */\n ariaLinkMode: 'aria-describedby' | 'aria-labelledby';\n}\n\n/**\n * Flatten Fragment nodes from slot content (slots may wrap content in Fragments).\n */\nfunction renderSlotFragments(children: VNode[]): VNode[] {\n return children.flatMap((child) => {\n if (child.type === Fragment) {\n return renderSlotFragments(child.children as VNode[]);\n }\n return [child];\n });\n}\n\n/**\n * Check if a VNode has isDisabled or disabled props.\n */\nfunction isDisabledVNode(vnode: VNode): boolean {\n const props = vnode.props || {};\n return props.disabled === true || props.isDisabled === true;\n}\n\n/**\n * Inject ref and ARIA attributes into tooltip anchor slot content.\n * - For a single non-disabled element slot: clone with injected ref and ARIA attributes.\n * - For text/fragment/multiple children/disabled elements: wrap in a div.\n */\nexport function useInjectTooltipRef(options: Options): VNode {\n const { slotContent, setAnchorElement, isMounted, id, label, ariaLinkMode } = options;\n\n // No tooltip needed\n if (!slotContent || !label) {\n return h(Fragment, slotContent);\n }\n\n const children = renderSlotFragments(slotContent);\n const firstChild = children.find((c) => c.type !== Comment);\n\n // Only add link when mounted\n const linkId = isMounted ? id : undefined;\n\n // Single non-disabled element slot: clone with injected props\n // Skip text nodes (Symbol(v-txt)) as they can't receive refs\n if (firstChild && children.length === 1 && firstChild.type !== Text && !isDisabledVNode(firstChild)) {\n const extraProps: Record<string, any> = { ref: setAnchorElement };\n\n // Do not add label/description if the tooltip label is already in aria-label\n if (linkId && label !== firstChild.props?.['aria-label']) {\n const existing = firstChild.props?.[ariaLinkMode];\n extraProps[ariaLinkMode] = existing ? `${existing} ${linkId}` : linkId;\n }\n\n return cloneVNode(firstChild, extraProps, true);\n }\n\n // Fallback: wrap in a <div>\n const wrapperProps: Record<string, any> = {\n class: 'lumx-tooltip-anchor-wrapper',\n ref: setAnchorElement,\n };\n\n if (linkId) {\n wrapperProps[ariaLinkMode] = linkId;\n }\n\n return h('div', wrapperProps, slotContent);\n}\n","import { defineComponent, ref, computed } from 'vue';\nimport { useFloating, offset, autoUpdate } from '@floating-ui/vue';\n\nimport {\n TooltipPopup,\n type TooltipProps as CoreTooltipProps,\n type TooltipPlacement,\n DEFAULT_PROPS,\n ARROW_SIZE,\n} from '@lumx/core/js/components/Tooltip';\n\nimport { useId } from '../../composables/useId';\nimport { useClassName } from '../../composables/useClassName';\nimport { useCallbackOnEscape } from '../../composables/useCallbackOnEscape';\nimport { useTooltipOpen } from './useTooltipOpen';\nimport { useInjectTooltipRef } from './useInjectTooltipRef';\nimport { provideTooltipContext } from './context';\nimport { keysOf, type ClassValue } from '../../utils/VueToJSX';\nimport { Portal } from '../../utils/Portal';\n\nexport type { TooltipPlacement };\n\n/**\n * Defines the props of the component.\n */\nexport interface TooltipProps extends CoreTooltipProps {\n /** Class name forwarded to the tooltip popup */\n class?: ClassValue;\n}\n\n/**\n * Vue Tooltip component.\n * Wraps the shared core TooltipPopup with Vue-specific Floating UI, Portal, and slot injection.\n */\nexport const Tooltip = defineComponent(\n (props: TooltipProps, { slots }) => {\n const id = useId();\n const className = useClassName(() => props.class);\n const anchorElement = ref<HTMLElement | null>(null);\n const popperElement = ref<HTMLElement | null>(null);\n\n const placement = computed(() => props.placement || DEFAULT_PROPS.placement!);\n const closeMode = computed(() => props.closeMode || DEFAULT_PROPS.closeMode!);\n const ariaLinkMode = computed(() => props.ariaLinkMode || DEFAULT_PROPS.ariaLinkMode!);\n const zIndex = computed(() => props.zIndex || DEFAULT_PROPS.zIndex!);\n\n // Floating UI positioning\n const { floatingStyles, placement: resolvedPlacement } = useFloating(anchorElement, popperElement, {\n placement,\n whileElementsMounted: autoUpdate,\n middleware: [offset(ARROW_SIZE)],\n });\n\n // Open/close state machine\n const {\n isOpen: isActivated,\n onPopperMount,\n manager,\n } = useTooltipOpen(\n computed(() => props.delay),\n anchorElement,\n );\n\n // Visibility state (include isInsideTooltip check to prevent nested tooltips)\n const isOpen = computed(() => (isActivated.value || props.forceOpen) && !!props.label);\n const isMounted = computed(() => !!props.label && (isOpen.value || closeMode.value === 'hide'));\n const isHidden = computed(() => !isOpen.value && closeMode.value === 'hide');\n\n // Escape key handler (reactive — updates when isOpen changes)\n useCallbackOnEscape(computed(() => (isOpen.value ? () => manager.value?.close() : undefined)));\n\n // Provide context to prevent nested tooltips (called in setup, not render)\n provideTooltipContext();\n\n return () => {\n const position = resolvedPlacement.value ?? placement.value;\n\n // Inject ref + ARIA into anchor slot\n const wrappedChildren = useInjectTooltipRef({\n slotContent: slots.default?.(),\n setAnchorElement: (el: any) => {\n // Handle Vue component instances (el.$el) vs DOM elements\n anchorElement.value = el?.$el || el;\n },\n isMounted: isMounted.value,\n id,\n label: props.label,\n ariaLinkMode: ariaLinkMode.value,\n });\n\n return (\n <>\n {wrappedChildren}\n\n {/* Tooltip popup via Portal */}\n {isMounted.value && (\n <Portal>\n {TooltipPopup({\n ref: (el: any) => {\n const element = el?.$el || el;\n popperElement.value = element;\n onPopperMount(element);\n },\n id,\n label: props.label as string,\n position,\n isHidden: isHidden.value,\n style: isHidden.value ? undefined : floatingStyles.value,\n zIndex: zIndex.value,\n className: className.value,\n })}\n </Portal>\n )}\n </>\n );\n };\n },\n {\n name: 'LumxTooltip',\n inheritAttrs: false,\n props: keysOf<TooltipProps>()(\n 'label',\n 'placement',\n 'delay',\n 'forceOpen',\n 'closeMode',\n 'ariaLinkMode',\n 'zIndex',\n 'class',\n ),\n },\n);\n","import { computed, defineComponent, ref, toRaw, useAttrs } from 'vue';\n\nimport {\n IconButton as IconButtonUI,\n type IconButtonProps as UIProps,\n} from '@lumx/core/js/components/Button/IconButton';\n\nimport { Tooltip, type TooltipProps } from '../tooltip/Tooltip';\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { useAttrFallback } from '../../composables/useAttrFallback';\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { type HyphenatedAriaProps, keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type IconButtonProps = Omit<VueToJSXProps<UIProps>, HyphenatedAriaProps> & {\n /**\n * Props to pass to the tooltip.\n * If undefined or if tooltipProps.label is undefined, the label prop will be used as tooltip label.\n */\n tooltipProps?: Partial<TooltipProps>;\n /** Whether the tooltip should be hidden or not. */\n hideTooltip?: boolean;\n};\n\nexport const emitSchema = {\n click: (event: MouseEvent) => event instanceof MouseEvent,\n};\n\n/**\n * IconButton component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst IconButton = defineComponent(\n (props: IconButtonProps, { emit, expose }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n // Core JSX passes `tabIndex` (React casing); Vue/HTML uses lowercase `tabindex`.\n // useAttrFallback falls back to attrs.tabIndex when tabindex is absent.\n const tabIndex = useAttrFallback(() => attrs.tabindex as number | undefined, 'tabIndex');\n\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(\n computed(() => ({ ...props, ...attrs })),\n );\n\n const handleClick = (event: MouseEvent) => {\n if (isAnyDisabled.value) {\n return;\n }\n\n emit('click', event);\n };\n\n // Ref to the underlying button DOM element.\n const buttonRef = ref<HTMLElement | null>(null);\n const setButtonRef = (el: any) => {\n buttonRef.value = (el?.$el ?? el) as HTMLElement | null;\n };\n expose({\n get $el() {\n return buttonRef.value;\n },\n });\n\n return () => {\n const { linkAs, tooltipProps, hideTooltip, ...rest } = otherProps.value;\n return (\n <Tooltip label={hideTooltip ? '' : props.label} {...tooltipProps}>\n <IconButtonUI\n {...rest}\n ref={setButtonRef}\n linkAs={toRaw(linkAs)}\n {...disabledStateProps.value}\n className={className.value}\n {...({ tabindex: tabIndex.value } as any)}\n theme={props.theme || defaultTheme.value}\n label={props.label}\n handleClick={handleClick as any}\n />\n </Tooltip>\n );\n };\n },\n {\n name: 'IconButton',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<IconButtonProps>()(\n 'icon',\n 'image',\n 'color',\n 'label',\n 'emphasis',\n 'hasBackground',\n 'href',\n 'isDisabled',\n 'isSelected',\n 'name',\n 'size',\n 'theme',\n 'class',\n 'aria-disabled',\n 'disabled',\n 'fullWidth',\n 'isActive',\n 'isFocused',\n 'isHovered',\n 'isDisabled',\n 'linkAs',\n 'target',\n 'type',\n 'title',\n 'tooltipProps',\n 'hideTooltip',\n ),\n emits: emitSchema,\n },\n);\n\nexport default IconButton;\n","import type { LumxClassName, HasClassName, JSXElement, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component\n */\nexport interface ButtonGroupProps extends HasClassName {\n /**\n * Children\n */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ButtonGroup';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-button-group';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ButtonGroupProps> = {};\n\n/**\n * ButtonGroup component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ButtonGroup = (props: ButtonGroupProps) => {\n const { children, className, ...forwardedProps } = props;\n\n return (\n <div {...forwardedProps} className={classNames.join(className, CLASSNAME)}>\n {children}\n </div>\n );\n};\n\nButtonGroup.displayName = COMPONENT_NAME;\nButtonGroup.className = CLASSNAME;\nButtonGroup.defaultProps = DEFAULT_PROPS;\n","import { defineComponent, useAttrs } from 'vue';\n\nimport {\n ButtonGroup as ButtonGroupUI,\n type ButtonGroupProps as UIProps,\n} from '@lumx/core/js/components/Button/ButtonGroup';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type ButtonGroupProps = VueToJSXProps<UIProps>;\n\n/**\n * ButtonGroup component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ButtonGroup = defineComponent(\n (props: ButtonGroupProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n return () => (\n <ButtonGroupUI\n {...props}\n {...attrs}\n className={className.value}\n children={slots.default?.() as JSXElement}\n />\n );\n },\n {\n name: 'ButtonGroup',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<ButtonGroupProps>()('class'),\n },\n);\n\nexport default ButtonGroup;\n","import { type InjectionKey, type Ref, type ShallowRef, inject, provide } from 'vue';\n\nimport type { ComboboxHandle } from '@lumx/core/js/components/Combobox/types';\n\n/** Context value shared between Combobox sub-components. */\nexport interface ComboboxContextValue {\n /** The current ComboboxHandle (set by the trigger sub-component). */\n handle: ShallowRef<ComboboxHandle | null>;\n /** Setter for the handle (called by trigger on mount/unmount). */\n setHandle: (handle: ComboboxHandle | null) => void;\n /** The ID of the listbox element. */\n listboxId: string;\n /** Reference to the anchor element for popover positioning. */\n anchorRef: Ref<HTMLElement | null>;\n}\n\nconst COMBOBOX_CONTEXT_KEY: InjectionKey<ComboboxContextValue> = Symbol('combobox-context');\n\n/**\n * Provides the combobox context to sub-components.\n */\nexport function provideComboboxContext(value: ComboboxContextValue) {\n provide(COMBOBOX_CONTEXT_KEY, value);\n}\n\n/**\n * Hook to access the Combobox context.\n * @throws Error if used outside of a Combobox component.\n * @returns The combobox context value.\n */\nexport function useComboboxContext(): ComboboxContextValue {\n const context = inject(COMBOBOX_CONTEXT_KEY);\n if (!context) {\n throw new Error('Combobox sub-components must be used within a Combobox');\n }\n return context;\n}\n","import { type WatchOptions, type WatchSource, onUnmounted, watch } from 'vue';\n\ntype Cleanup = void | (() => void);\n\ntype MapSources<T> = {\n [K in keyof T]: T[K] extends WatchSource<infer V> ? V : never;\n};\n\ntype MultiWatchSources = (WatchSource<unknown> | object)[];\n\n/**\n * Watch a reactive source and run an effect that can return a cleanup function.\n * On each re-run the previous cleanup is called automatically.\n * Stops and cleans up on unmount.\n *\n * @param source One or more reactive sources to watch.\n * @param effect Effect callback receiving the new (and old) value; may return a cleanup function.\n * @param options Watch options (defaults to `{ immediate: true }`).\n * @returns A stop function that also runs the latest cleanup.\n */\nexport function useWatchDisposable<T extends MultiWatchSources>(\n source: [...T],\n effect: (value: MapSources<T>, oldValue: MapSources<T> | undefined) => Cleanup,\n options?: WatchOptions,\n): () => void;\nexport function useWatchDisposable<T>(\n source: WatchSource<T>,\n effect: (value: T, oldValue: T | undefined) => Cleanup,\n options?: WatchOptions,\n): () => void;\nexport function useWatchDisposable(\n source: any,\n effect: (value: any, oldValue: any) => Cleanup,\n options: WatchOptions = { immediate: true },\n) {\n let cleanup: (() => void) | undefined;\n\n const runCleanup = () => {\n cleanup?.();\n cleanup = undefined;\n };\n\n const stop = watch(\n source,\n (value: any, oldValue: any) => {\n runCleanup();\n const maybeCleanup = effect(value, oldValue);\n if (typeof maybeCleanup === 'function') {\n cleanup = maybeCleanup;\n }\n },\n options,\n );\n\n onUnmounted(() => {\n stop();\n runCleanup();\n });\n\n return () => {\n stop();\n runCleanup();\n };\n}\n","import { type Ref, ref } from 'vue';\n\nimport type { ComboboxEventMap } from '@lumx/core/js/components/Combobox/types';\n\nimport { useWatchDisposable } from '../../../composables/useWatchDisposable';\nimport { useComboboxContext } from './ComboboxContext';\n\n/**\n * Composable to subscribe to a combobox event via the handle's subscriber system.\n * Re-subscribes when the handle changes (e.g. trigger mount/unmount).\n */\nexport function useComboboxEvent<K extends keyof ComboboxEventMap>(\n event: K,\n initialValue: ComboboxEventMap[K],\n): Ref<ComboboxEventMap[K]> {\n const { handle } = useComboboxContext();\n const value = ref(initialValue) as Ref<ComboboxEventMap[K]>;\n\n useWatchDisposable(handle, (h) => {\n if (h) {\n return h.subscribe(event, (v) => {\n value.value = v;\n });\n }\n });\n\n return value;\n}\n","import { useComboboxContext } from './ComboboxContext';\nimport { useComboboxEvent } from './useComboboxEvent';\n\n/**\n * Composable to subscribe to the combobox open/close state.\n */\nexport function useComboboxOpen() {\n const { handle } = useComboboxContext();\n const isOpen = useComboboxEvent('open', false);\n const setIsOpen = (open: boolean) => handle.value?.setIsOpen(open);\n return { isOpen, setIsOpen };\n}\n","import { defineComponent, onUnmounted, ref, useAttrs, watch } from 'vue';\n\nimport {\n ComboboxButton as UI,\n type ComboboxButtonProps as UIProps,\n type ComboboxButtonLabelDisplayMode,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxButton';\nimport { setupComboboxButton } from '@lumx/core/js/components/Combobox/setupComboboxButton';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { Button } from '../button';\nimport { Tooltip } from '../tooltip';\nimport { useComboboxContext } from './context/ComboboxContext';\nimport { useComboboxEvent } from './context/useComboboxEvent';\nimport { useComboboxOpen } from './context/useComboboxOpen';\n\nexport type ComboboxButtonProps = VueToJSXProps<UIProps, 'label' | 'renderButton'> & {\n /** The label for the button (used for ARIA and tooltip). */\n label: string;\n /** The currently selected value to display. */\n value?: string;\n /** Controls how the label/value is displayed. @default 'show-selection' */\n labelDisplayMode?: ComboboxButtonLabelDisplayMode;\n /** Called when an option is selected. */\n onSelect?: (option: { value: string }) => void;\n /** Custom render function replacing the default `<Button>`. See `ComboboxButtonProps.renderButton` in core. */\n renderButton?: UIProps['renderButton'];\n};\n\n/**\n * Combobox.Button component - Button trigger for select-only combobox mode.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ComboboxButton = defineComponent(\n (props: ComboboxButtonProps, { emit }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n const { listboxId, anchorRef, setHandle, handle } = useComboboxContext();\n const { isOpen } = useComboboxOpen();\n const optionsState = useComboboxEvent('optionsChange', { optionsLength: 0 });\n const isLoading = useComboboxEvent('loadingChange', false);\n\n const buttonRef = ref<HTMLElement | null>(null);\n\n // Create the combobox handle with button-mode controller on mount\n watch(\n buttonRef,\n (button) => {\n if (!button) return;\n setHandle(\n setupComboboxButton(button as HTMLButtonElement, {\n onSelect(option) {\n props.onSelect?.(option);\n emit('select', option);\n },\n }),\n );\n // Set anchor ref to the button element\n anchorRef.value = button;\n },\n { immediate: false },\n );\n\n onUnmounted(() => {\n handle.value?.destroy();\n setHandle(null);\n });\n\n return () => {\n const {\n label,\n value,\n labelDisplayMode = 'show-selection',\n renderButton,\n class: _class,\n ...forwardedProps\n } = props;\n return UI(\n {\n ...attrs,\n ...forwardedProps,\n label,\n value,\n labelDisplayMode,\n renderButton,\n listboxId,\n isOpen: isOpen.value && (!!optionsState.value?.optionsLength || isLoading.value),\n ref: (el: any) => {\n // Handle both component instances and raw elements\n buttonRef.value = el?.$el ?? el;\n anchorRef.value = buttonRef.value;\n },\n className: className.value,\n },\n { Button, Tooltip },\n );\n };\n },\n {\n name: 'LumxComboboxButton',\n inheritAttrs: false,\n props: keysOf<ComboboxButtonProps>()(\n 'class',\n 'label',\n 'value',\n 'labelDisplayMode',\n 'renderButton',\n 'listboxId',\n 'isOpen',\n 'onSelect',\n ),\n emits: {\n select: (option: { value: string }) => !!option,\n },\n },\n);\n\nexport { COMPONENT_NAME, CLASSNAME };\nexport default ComboboxButton;\n","/** Disable state */\nexport type DisabledStateContextValue =\n | {\n state: 'disabled';\n }\n | { state: undefined | null };\n\nexport type DisabledProps = {\n disabled?: boolean;\n isDisabled?: boolean;\n 'aria-disabled'?: boolean | 'true' | 'false';\n onClick?: any;\n onChange?: any;\n [key: string]: any;\n};\n\nexport type DisabledState = {\n disabled: boolean;\n 'aria-disabled': boolean;\n};\n\n/**\n * Calculate the disabled state based on context and props.\n */\nexport function getDisabledState(context: DisabledStateContextValue | undefined, props: DisabledProps): DisabledState {\n const { disabled, isDisabled = disabled, 'aria-disabled': ariaDisabled } = props;\n return {\n disabled: context?.state === 'disabled' || !!isDisabled,\n 'aria-disabled': ariaDisabled === true || ariaDisabled === 'true',\n };\n}\n","import { mdiChevronUp, mdiChevronDown } from '@lumx/icons';\nimport type { CommonRef, HasClassName, HasTheme, LumxClassName } from '../../types';\nimport { getDisabledState } from '../../utils/disabledState';\nimport type { ComboboxCallbacks, ComboboxInputOptions } from './types';\n\n/**\n * Defines the props for the core ComboboxInput template.\n */\nexport interface ComboboxInputProps extends HasClassName, HasTheme, ComboboxCallbacks, ComboboxInputOptions {\n /** The ID of the listbox element (for aria-controls). */\n listboxId?: string;\n /** Whether the combobox is open. */\n isOpen?: boolean;\n /** ref to the root element. */\n ref?: CommonRef;\n /** Reference to the input element. */\n inputRef?: CommonRef;\n /** Reference to the text field wrapper element. */\n textFieldRef?: CommonRef;\n /** Props for the toggle button (when provided, a chevron button is rendered). */\n toggleButtonProps?: Record<string, any>;\n /** Toggle callback for the chevron button. */\n handleToggle?(): void;\n}\n\n/**\n * Props from the core `ComboboxInputProps` that framework wrappers (React/Vue)\n * are expected to provide internally or re-type with framework-specific equivalents\n * (e.g. React refs, framework-specific button props). Wrappers should omit these\n * keys when exposing the core props to consumers.\n */\nexport type ComboboxInputPropsToOverride =\n | 'listboxId'\n | 'isOpen'\n | 'inputRef'\n | 'textFieldRef'\n | 'toggleButtonProps'\n | 'handleToggle';\n\n/**\n * Injected framework-specific components for ComboboxInput rendering.\n */\nexport interface ComboboxInputComponents {\n /** TextField component (framework-specific, e.g. React TextField with controlled input). */\n TextField: any;\n /** IconButton component (framework-specific, e.g. React IconButton with theme/disabled). */\n IconButton: any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxInput';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-input';\n\n/**\n * ComboboxInput core template.\n * Renders a TextField with combobox ARIA attributes and an optional toggle button.\n *\n * Framework-specific components (TextField, IconButton) are passed as a second argument\n * by the React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const ComboboxInput = (props: ComboboxInputProps, { TextField, IconButton }: ComboboxInputComponents) => {\n const {\n listboxId,\n isOpen,\n ref,\n inputRef,\n textFieldRef,\n toggleButtonProps,\n handleToggle,\n filter,\n theme,\n ...forwardedProps\n } = props;\n\n // Compute whether the combobox is disabled (native or aria-disabled).\n const disabledState = getDisabledState(undefined, props);\n const isAnyDisabled = disabledState.disabled || disabledState['aria-disabled'] || undefined;\n\n return (\n <TextField\n autoComplete=\"off\"\n readOnly={filter === 'off' || undefined}\n {...forwardedProps}\n ref={ref}\n role=\"combobox\"\n aria-autocomplete=\"list\"\n aria-controls={listboxId}\n aria-expanded={isOpen}\n inputRef={inputRef}\n textFieldRef={textFieldRef}\n theme={theme}\n afterElement={\n toggleButtonProps ? (\n <IconButton\n {...toggleButtonProps}\n theme={theme}\n isDisabled={isAnyDisabled}\n emphasis=\"low\"\n size=\"s\"\n icon={isOpen ? mdiChevronUp : mdiChevronDown}\n tabIndex={-1}\n aria-controls={listboxId}\n aria-expanded={isOpen}\n onClick={handleToggle}\n />\n ) : undefined\n }\n />\n );\n};\n","import type { ComboboxCallbacks, ComboboxHandle, ComboboxInputOptions } from './types';\nimport { setupCombobox } from './setupCombobox';\n\n/** Options for configuring the input-mode combobox controller. */\nexport interface SetupComboboxInputOptions extends ComboboxCallbacks, ComboboxInputOptions {\n /**\n * Called synchronously on every user input event (typing, paste, delete…)\n * (Use this in framework wrappers that maintain controlled input state, like React)\n */\n onInput?(value: string): void;\n}\n\n/**\n * Set up a combobox with an input trigger (autocomplete/filter pattern).\n *\n * Creates a full combobox handle with the input-mode controller automatically\n * wired in and the trigger registered. The consumer only needs to call\n * `handle.registerListbox(listbox)`.\n *\n * Handles: Home/End (text cursor), ArrowLeft/Right (clear active descendant),\n * filtering (on input and on open), and focus behavior.\n *\n * @param input The input element to use as the combobox trigger.\n * @param options Options and callbacks for configuring the input-mode controller.\n * @returns A ComboboxHandle for interacting with the combobox.\n */\nexport function setupComboboxInput(input: HTMLInputElement, options: SetupComboboxInputOptions): ComboboxHandle {\n let handle: ComboboxHandle;\n const { filter = 'auto', selectionMode = 'fill', onSelect: optionOnSelect, onInput: onInputCallback } = options;\n const openOnFocus = options.openOnFocus ?? filter === 'off';\n const autoFilter = filter === 'auto';\n\n /** Check if the input is disabled (native `disabled` attribute or `aria-disabled=\"true\"`). */\n const isDisabled = () => input.disabled || input.getAttribute('aria-disabled') === 'true';\n\n /**\n * True when the current input value came from user typing (real InputEvent).\n * False when the value was set programmatically (select, clear, etc.).\n * Used to decide whether to re-apply the filter when the combobox opens.\n */\n let userHasTyped = false;\n\n /**\n * Wraps the consumer's onSelect to perform input-mode side effects after selection.\n * Filter and typing state are always reset on selection — selectionMode only controls\n * whether onChange is called by the framework wrapper, not the internal filter.\n */\n const onSelect = (option: { value: string }) => {\n optionOnSelect?.(option);\n userHasTyped = false;\n if (autoFilter) handle.setFilter('');\n };\n\n handle = setupCombobox({ onSelect }, { wrapNavigation: true }, (combobox, signal) => {\n signal.addEventListener('abort', () => {\n userHasTyped = false;\n });\n\n // Filter on real user typing (InputEvent with `inputType`).\n input.addEventListener(\n 'input',\n (event) => {\n if (!(event instanceof InputEvent)) return;\n if (isDisabled()) return;\n\n combobox.focusNav?.clear();\n userHasTyped = true;\n\n // Notify the framework wrapper of the new input value synchronously.\n onInputCallback?.(input.value);\n\n combobox.setIsOpen(true);\n\n if (autoFilter) {\n combobox.setFilter(input.value);\n }\n },\n { signal },\n );\n\n // Open on focus (only when openOnFocus is enabled).\n input.addEventListener(\n 'focus',\n () => {\n if (isDisabled()) return;\n combobox.focusNav?.clear();\n if (openOnFocus) {\n combobox.setIsOpen(true);\n }\n },\n { signal },\n );\n\n // Open on click (handles the case where the input is already focused, so focus doesn't re-fire).\n input.addEventListener(\n 'click',\n () => {\n if (isDisabled()) return;\n combobox.setIsOpen(true);\n },\n { signal },\n );\n\n // Re-apply filter when the combobox opens, but only if the current\n // input value came from user typing. After a programmatic change\n // (select, clear), all options should remain visible.\n const unsubscribeOpen = combobox.subscribe('open', (isOpen) => {\n if (isOpen && autoFilter && userHasTyped) {\n combobox.setFilter(input.value);\n }\n });\n signal.addEventListener('abort', unsubscribeOpen);\n\n return (event: KeyboardEvent): boolean => {\n const nav = combobox.focusNav;\n\n switch (event.key) {\n case 'Home':\n input.setSelectionRange(0, 0);\n nav?.clear();\n return true;\n\n case 'End': {\n const len = input.value.length;\n input.setSelectionRange(len, len);\n nav?.clear();\n return true;\n }\n\n case 'ArrowLeft':\n case 'ArrowRight':\n // Grid mode: navigate cells when active item exists.\n if (nav?.type === 'grid' && nav.selectors.activeItem) {\n if (event.key === 'ArrowLeft') nav.goLeft();\n else nav.goRight();\n return true;\n }\n // Listbox mode: clear active item, allow caret movement.\n nav?.clear();\n return false;\n\n default:\n return false;\n }\n };\n });\n\n handle.registerTrigger(input);\n return handle;\n}\n","import { LumxClassName } from '@lumx/core/js/types';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TextField';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-text-field';\n\n/**\n * Input native element class name.\n */\nexport const INPUT_NATIVE_CLASSNAME = `${CLASSNAME}__input-native`;\n","import type { HTMLInputTypeAttribute } from 'react';\n\nimport { CommonRef, HasClassName, HasTheme } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { INPUT_NATIVE_CLASSNAME } from './constants';\n\nconst { block } = classNames.bem(INPUT_NATIVE_CLASSNAME);\n\n/**\n * Defines the props of the component.\n */\nexport interface RawInputTextProps extends HasTheme, HasClassName {\n value?: string;\n type?: HTMLInputTypeAttribute;\n name?: string | undefined;\n ref?: CommonRef;\n handleChange?: (value: string, name?: string, event?: any) => void;\n handleInput?: (value: string, name?: string, event?: any) => void;\n handleFocus?: (event?: any) => void;\n handleBlur?: (event?: any) => void;\n}\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<RawInputTextProps> = {\n type: 'text',\n};\n\n/**\n * Raw input text component\n * (input element without any decoration)\n */\nexport const RawInputText = (props: RawInputTextProps) => {\n const {\n className,\n theme,\n value,\n handleChange,\n handleInput,\n handleFocus,\n handleBlur,\n type = DEFAULT_PROPS.type,\n name,\n ref,\n ...forwardedProps\n } = props;\n\n const handleOnChange = (evt: any) => {\n handleChange?.(evt.target.value, name, evt);\n };\n\n const handleOnInput = (evt: any) => {\n handleInput?.(evt.target.value, name, evt);\n };\n\n return (\n <input\n {...forwardedProps}\n name={name}\n type={type}\n ref={ref}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n text: true,\n }),\n )}\n onChange={handleOnChange}\n onInput={handleOnInput}\n onFocus={handleFocus}\n onBlur={handleBlur}\n value={value}\n />\n );\n};\n","import { defineComponent, useAttrs } from 'vue';\n\nimport {\n RawInputText as RawInputTextUI,\n type RawInputTextProps as UIProps,\n} from '@lumx/core/js/components/TextField/RawInputText';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type RawInputTextProps = VueToJSXProps<UIProps>;\n\nexport const emitSchema = {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n change: (value: string, _name?: string, _event?: Event) => typeof value === 'string',\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n input: (value: string, _name?: string, _event?: Event) => typeof value === 'string',\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n focus: (_event?: FocusEvent) => true,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n blur: (_event?: FocusEvent) => true,\n};\n\n/**\n * Raw input text component.\n * (input element without any decoration)\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst RawInputText = defineComponent(\n (props: RawInputTextProps, { emit }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n const handleChange = (value: string, name?: string, event?: any) => {\n event?.stopImmediatePropagation();\n emit('change', value, name, event);\n };\n\n const handleInput = (value: string, name?: string, event?: any) => {\n emit('input', value, name, event);\n };\n\n const handleFocus = (event?: any) => {\n emit('focus', event);\n };\n\n const handleBlur = (event?: any) => {\n emit('blur', event);\n };\n\n return () => {\n return (\n <RawInputTextUI\n {...(attrs as UIProps)}\n value={props.value}\n type={props.type}\n name={props.name}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n handleChange={handleChange}\n handleInput={handleInput}\n handleFocus={handleFocus}\n handleBlur={handleBlur}\n />\n );\n };\n },\n {\n name: 'LumxRawInputText',\n inheritAttrs: false,\n props: keysOf<RawInputTextProps>()('class', 'theme', 'value', 'type', 'name'),\n emits: emitSchema,\n },\n);\n\nexport default RawInputText;\n","import { CommonRef, HasClassName, HasTheme } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { INPUT_NATIVE_CLASSNAME } from './constants';\n\nconst { block } = classNames.bem(INPUT_NATIVE_CLASSNAME);\n\n/**\n * Defines the props of the component.\n */\nexport interface RawInputTextareaProps extends HasTheme, HasClassName {\n value?: string;\n rows?: number;\n name?: string | undefined;\n ref?: CommonRef;\n handleChange?: (value: string, name?: string, event?: any) => void;\n handleInput?: (value: string, name?: string, event?: any) => void;\n handleFocus?: (event?: any) => void;\n handleBlur?: (event?: any) => void;\n}\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<RawInputTextareaProps> = {\n rows: 2,\n};\n\n/**\n * Raw input textarea component\n * (textarea element without any decoration)\n */\nexport const RawInputTextarea = (props: RawInputTextareaProps) => {\n const {\n className,\n theme,\n value,\n handleChange,\n handleInput,\n handleFocus,\n handleBlur,\n rows = DEFAULT_PROPS.rows,\n name,\n ref,\n ...forwardedProps\n } = props;\n\n const handleOnChange = (evt: any) => {\n handleChange?.(evt.target.value, name, evt);\n };\n\n const handleOnInput = (evt: any) => {\n handleInput?.(evt.target.value, name, evt);\n };\n\n return (\n <textarea\n {...forwardedProps}\n name={name}\n ref={ref}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n textarea: true,\n }),\n )}\n onChange={handleOnChange}\n onInput={handleOnInput}\n onFocus={handleFocus}\n onBlur={handleBlur}\n value={value}\n rows={rows}\n />\n );\n};\n","import { ref, watchEffect } from 'vue';\nimport type { Ref } from 'vue';\n\n/**\n * Fit textarea rows to its content.\n */\nexport function useFitRowsToContent(\n minimumRows: Ref<number>,\n textareaRef: Ref<HTMLTextAreaElement | null>,\n value: Ref<string | undefined>,\n): Ref<number> {\n const rows = ref(minimumRows.value);\n\n watchEffect(\n () => {\n const textarea = textareaRef.value;\n if (!textarea) return;\n\n const currentMinRows = minimumRows.value;\n // Track value dependency\n void value.value;\n\n // Save the current number of rows to restore it later and avoid a flicker.\n const previousRows = textarea.rows;\n\n // Set the rows to the minimum to get a baseline for row height.\n textarea.rows = currentMinRows;\n const rowHeight = textarea.clientHeight / currentMinRows;\n\n // Set rows to 1 to get the smallest possible textarea, which forces\n // scrollHeight to be the actual content height.\n textarea.rows = 1;\n const { scrollHeight } = textarea;\n\n // Restore the rows to the previous value.\n textarea.rows = previousRows;\n\n // Calculate the number of rows required to display the content.\n // Fallback to `minimumRows` if `rowHeight` is 0.\n const requiredRows = rowHeight > 0 ? Math.ceil(scrollHeight / rowHeight) : currentMinRows;\n\n rows.value = Math.max(requiredRows, currentMinRows);\n },\n { flush: 'post' },\n );\n\n return rows;\n}\n","import { computed, defineComponent, ref, useAttrs } from 'vue';\n\nimport {\n RawInputTextarea as RawInputTextareaUI,\n type RawInputTextareaProps as UIProps,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/TextField/RawInputTextarea';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { useFitRowsToContent } from './useFitRowsToContent';\n\nexport type RawInputTextareaProps = VueToJSXProps<UIProps>;\n\nexport const emitSchema = {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n change: (value: string, _name?: string, _event?: Event) => typeof value === 'string',\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n input: (value: string, _name?: string, _event?: Event) => typeof value === 'string',\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n focus: (_event?: FocusEvent) => true,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n blur: (_event?: FocusEvent) => true,\n};\n\n/**\n * Raw input textarea component.\n * (textarea element without any decoration)\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst RawInputTextarea = defineComponent(\n (props: RawInputTextareaProps, { emit }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n const textareaRef = ref<HTMLTextAreaElement | null>(null);\n const rows = useFitRowsToContent(\n computed(() => props.rows ?? (DEFAULT_PROPS.rows as number)),\n textareaRef,\n computed(() => props.value),\n );\n\n const handleChange = (value: string, name?: string, event?: any) => {\n event?.stopImmediatePropagation();\n emit('change', value, name, event);\n };\n\n const handleInput = (value: string, name?: string, event?: any) => {\n emit('input', value, name, event);\n };\n\n const handleFocus = (event?: any) => {\n emit('focus', event);\n };\n\n const handleBlur = (event?: any) => {\n emit('blur', event);\n };\n\n return () => {\n return (\n <RawInputTextareaUI\n {...(attrs as UIProps)}\n ref={textareaRef}\n value={props.value}\n rows={rows.value}\n name={props.name}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n handleChange={handleChange}\n handleInput={handleInput}\n handleFocus={handleFocus}\n handleBlur={handleBlur}\n />\n );\n };\n },\n {\n name: 'LumxRawInputTextarea',\n inheritAttrs: false,\n props: keysOf<RawInputTextareaProps>()('class', 'theme', 'value', 'rows', 'name'),\n emits: emitSchema,\n },\n);\n\nexport default RawInputTextarea;\n","import { classNames } from '../../utils';\nimport { LumxClassName, HasTheme, JSXElement, HasClassName, CommonRef } from '../../types';\nimport { Typography } from '../../constants';\n\nexport const COMPONENT_NAME = 'InputLabel';\nexport const InputLabelClassName: LumxClassName<typeof COMPONENT_NAME> = 'lumx-input-label';\n\nexport interface InputLabelProps extends HasClassName, HasTheme {\n /** Typography variant. */\n typography?: Typography;\n /** Label content. */\n children: JSXElement;\n /** Native htmlFor property. */\n htmlFor: string;\n /** Native id property. */\n id?: string;\n /** Whether the component is required or not. */\n isRequired?: boolean;\n /** ref to the root element */\n ref?: CommonRef;\n /** HTML tag for rendering the label, defaults to `label` */\n as?: 'label' | 'legend';\n}\n\nconst CLASSNAME = InputLabelClassName;\nconst { block } = classNames.bem(CLASSNAME);\n\nconst DEFAULT_PROPS: Partial<InputLabelProps> = {};\n\n/**\n * InputLabel component.\n */\nexport function InputLabel(props: InputLabelProps) {\n const { children, className, htmlFor, isRequired, theme, as, typography, ref, ...forwardedProps } = props;\n const ComponentToUse = as || 'label';\n\n return (\n <ComponentToUse\n ref={ref}\n {...forwardedProps}\n htmlFor={htmlFor}\n className={classNames.join(\n className,\n block({\n 'is-required': isRequired,\n [`theme-${theme}`]: Boolean(theme),\n 'has-custom-typography': Boolean(typography),\n }),\n typography && classNames.typography(typography),\n )}\n >\n {children}\n </ComponentToUse>\n );\n}\n\nInputLabel.displayName = COMPONENT_NAME;\nInputLabel.className = CLASSNAME;\nInputLabel.defaultProps = DEFAULT_PROPS;\n","import { Kind } from '../../constants';\n\nexport const INPUT_HELPER_CONFIGURATION: Record<string, { color: string }> = {\n [Kind.error]: { color: 'red' },\n [Kind.success]: { color: 'green' },\n [Kind.warning]: { color: 'yellow' },\n};\n","import { classNames } from '../../utils';\nimport { Kind } from '../../constants';\nimport { INPUT_HELPER_CONFIGURATION } from './constants';\nimport type { LumxClassName, HasTheme, JSXElement, HasClassName, CommonRef } from '../../types';\n\nexport const COMPONENT_NAME = 'InputHelper';\nexport const InputHelperClassName: LumxClassName<typeof COMPONENT_NAME> = 'lumx-input-helper';\n\n/**\n * Defines the props of the component.\n */\nexport interface InputHelperProps extends HasClassName, HasTheme {\n /** Helper content. */\n children: JSXElement;\n /** Helper variant. */\n kind?: Kind;\n /** ref to the root element `p` */\n ref?: CommonRef;\n /** id for the input helper */\n id?: string;\n}\n\nconst CLASSNAME = InputHelperClassName;\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nconst DEFAULT_PROPS: Partial<InputHelperProps> = {\n kind: Kind.info,\n};\n\n/**\n * InputHelper component.\n */\nexport function InputHelper(props: InputHelperProps) {\n const { children, className, kind = DEFAULT_PROPS.kind, theme, ref, ...forwardedProps } = props;\n const { color } = INPUT_HELPER_CONFIGURATION[kind as string] || {};\n\n return (\n <p\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`color-${color}`]: Boolean(color),\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n {children}\n </p>\n );\n}\n\nInputHelper.displayName = COMPONENT_NAME;\nInputHelper.className = CLASSNAME;\nInputHelper.defaultProps = DEFAULT_PROPS;\n","import { mdiAlertCircle, mdiCheckCircle, mdiCloseCircle } from '@lumx/icons';\nimport { HasTheme, HasAriaDisabled, HasClassName, JSXElement, CommonRef, GenericProps, HasDisabled } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { CLASSNAME } from './constants';\nimport { InputLabel, InputLabelProps } from '../InputLabel';\nimport { Emphasis, Kind, Size, Theme } from '../../constants';\nimport { Icon } from '../Icon';\nimport { InputHelper } from '../InputHelper';\n\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Defines the props of the component.\n */\nexport interface TextFieldProps extends HasClassName, HasTheme, HasAriaDisabled, HasDisabled {\n /** Chip Group to be rendered before the main text input. */\n chips?: JSXElement;\n /** Props to pass to the clear button (minus those already set by the TextField props). If not specified, the button won't be displayed. */\n clearButtonProps?: GenericProps;\n /** Error message. */\n error?: string | JSXElement;\n /** Whether we force the focus style or not. */\n forceFocusStyle?: boolean;\n /** Whether the text field is displayed with error style or not. */\n hasError?: boolean;\n /** Additional element to put at the end of the text field. */\n afterElement?: JSXElement;\n /** Helper text. */\n helper?: string | JSXElement;\n /** Icon (SVG path). */\n icon?: string;\n /** Native input id property (generated if not provided to link the label element). */\n id?: string;\n /** Generated helper id for accessibility attributes. */\n helperId?: string;\n /** Generated error id for accessibility attributes. */\n errorId?: string;\n /** Generated label id for accessibility attributes (used to link the clear button to the field label). */\n labelId?: string;\n /** Whether the component is required or not. */\n isRequired?: boolean;\n /** Whether the text field is displayed with valid style or not. */\n isValid?: boolean;\n /** Label text. */\n label?: string;\n /** Additional label props. */\n labelProps?: InputLabelProps;\n /** Max string length the input accepts (constrains the input and displays a character counter). */\n maxLength?: number;\n /** Whether the text field is a textarea or an input. */\n multiline?: boolean;\n /** Placeholder text. */\n placeholder?: string;\n /** Reference to the wrapper. */\n textFieldRef?: CommonRef;\n /** Value. */\n value?: string;\n /** Whether any part is disabled. */\n isAnyDisabled?: boolean;\n /** The input element (input or textarea). */\n input: JSXElement;\n /** Whether the input is focused. */\n isFocus?: boolean;\n /** IconButton component. */\n IconButton: (props: Record<string, any>) => any;\n /** Ref to the component root. */\n ref?: CommonRef;\n}\n\nexport type TextFieldPropsToOverride =\n | 'input'\n | 'IconButton'\n | 'labelProps'\n | 'textFieldRef'\n | 'clearButtonProps'\n | 'helperId'\n | 'errorId'\n | 'labelId'\n | 'isAnyDisabled'\n | 'isFocus';\n\n/**\n * Generate unique accessibility IDs for helper and error texts.\n * Combines them with any existing aria-describedby in priority order (error > helper > existing).\n *\n * @param helper Helper text content\n * @param error Error text content\n * @param generatedId Unique ID for this text field instance\n * @param existingAriaDescribedBy Existing aria-describedby value to merge\n * @return Object containing helperId, errorId, and combined describedById\n */\nexport function generateAccessibilityIds(\n helper: TextFieldProps['helper'],\n error: TextFieldProps['error'],\n generatedId: string,\n existingAriaDescribedBy?: string,\n label?: TextFieldProps['label'],\n): { helperId?: string; errorId?: string; describedById?: string; labelId?: string } {\n const helperId = helper ? `text-field-helper-${generatedId}` : undefined;\n const errorId = error ? `text-field-error-${generatedId}` : undefined;\n const labelId = label ? `text-field-label-${generatedId}` : undefined;\n const describedByIds = [errorId, helperId, existingAriaDescribedBy].filter(Boolean);\n const describedById = describedByIds.length === 0 ? undefined : describedByIds.join(' ');\n\n return { helperId, errorId, describedById, labelId };\n}\n\n/**\n * TextField component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const TextField = (props: TextFieldProps) => {\n const {\n chips,\n className,\n clearButtonProps,\n error,\n forceFocusStyle,\n hasError,\n helper,\n icon,\n id: textFieldId,\n isRequired,\n isValid,\n label,\n labelProps,\n isAnyDisabled,\n maxLength,\n multiline,\n placeholder,\n textFieldRef,\n helperId,\n errorId,\n labelId,\n theme,\n value,\n afterElement,\n input,\n isFocus,\n IconButton,\n ref,\n } = props;\n\n const valueLength = (value || '').length;\n const isNotEmpty = valueLength > 0;\n\n return (\n <div\n ref={ref}\n className={classNames.join(\n className,\n block({\n 'has-chips': Boolean(chips),\n 'has-error': !isValid && hasError,\n 'has-icon': Boolean(icon),\n 'has-input': !multiline,\n 'has-input-clear': Boolean(clearButtonProps && isNotEmpty),\n 'has-label': Boolean(label),\n 'has-placeholder': Boolean(placeholder),\n 'has-textarea': multiline,\n 'has-value': Boolean(value),\n 'is-disabled': isAnyDisabled,\n 'is-focus': isFocus || forceFocusStyle,\n 'is-valid': isValid,\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n {(label || maxLength) && (\n <div className={element('header')}>\n {label &&\n InputLabel({\n ...labelProps,\n id: labelId,\n htmlFor: textFieldId as string,\n className: element('label'),\n isRequired,\n theme,\n children: label,\n })}\n\n {maxLength && (\n <div className={element('char-counter')}>\n <span>{maxLength - valueLength}</span>\n {maxLength - valueLength === 0 && Icon({ icon: mdiAlertCircle, size: Size.xxs })}\n </div>\n )}\n </div>\n )}\n\n <div className={element('wrapper')} ref={textFieldRef}>\n {icon &&\n Icon({\n className: element('input-icon'),\n color: theme === Theme.dark ? 'light' : undefined,\n icon,\n size: Size.xs,\n })}\n\n {chips ? (\n <div className={element('chips')}>\n {chips}\n\n {input}\n </div>\n ) : (\n <div className={element('input-wrapper')}>{input}</div>\n )}\n\n {(isValid || hasError) &&\n Icon({\n className: element('input-validity'),\n color: theme === Theme.dark ? 'light' : undefined,\n icon: isValid ? mdiCheckCircle : mdiAlertCircle,\n size: Size.xxs,\n })}\n\n {clearButtonProps && isNotEmpty && !isAnyDisabled && (\n <IconButton\n aria-describedby={labelId}\n {...clearButtonProps}\n className={element('input-clear')}\n icon={mdiCloseCircle}\n emphasis={Emphasis.low}\n size={Size.s}\n theme={theme}\n type=\"button\"\n />\n )}\n\n {afterElement && <div className={element('after-element')}>{afterElement}</div>}\n </div>\n\n {hasError &&\n error &&\n InputHelper({ children: error, className: element('helper'), kind: Kind.error, theme, id: errorId })}\n\n {helper && InputHelper({ className: element('helper'), theme, id: helperId, children: helper })}\n </div>\n );\n};\n","import { computed, defineComponent, type ComponentPublicInstance, ref, useAttrs, watch } from 'vue';\n\nimport {\n TextField as TextFieldUI,\n type TextFieldProps as UIProps,\n type TextFieldPropsToOverride,\n generateAccessibilityIds,\n} from '@lumx/core/js/components/TextField/TextField';\nimport { type InputLabelProps } from '@lumx/core/js/components/InputLabel';\nimport { CLASSNAME, COMPONENT_NAME } from '@lumx/core/js/components/TextField/constants';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { useId } from '../../composables/useId';\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { useSlot } from '../../composables/useSlot';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { IconButton } from '../button';\nimport RawInputText from './RawInputText';\nimport RawInputTextarea from './RawInputTextarea';\n\nexport type TextFieldProps = VueToJSXProps<UIProps, TextFieldPropsToOverride | 'chips'> & {\n /** Native input id property (generated if not provided). */\n id?: string;\n /** Props to pass to the clear button. If not specified, the button won't be displayed. */\n clearButtonProps?: { label: string; [key: string]: any };\n /** Native input name property. */\n name?: string;\n /** Native input type (only when multiline is disabled). */\n type?: string;\n /** Minimum rows for textarea (only when multiline is enabled). */\n minimumRows?: number;\n /** Additional label props. */\n labelProps?: InputLabelProps;\n /** Ref callback for the native input element. */\n inputRef?: (el: HTMLInputElement | HTMLTextAreaElement | null) => void;\n /** Ref callback for the text field wrapper element. */\n textFieldRef?: (el: HTMLElement | null) => void;\n};\n\nexport const emitSchema = {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n change: (value: string, _name?: string, _event?: Event) => typeof value === 'string',\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n input: (value: string, _name?: string, _event?: Event) => typeof value === 'string',\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n focus: (_event?: FocusEvent) => true,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n blur: (_event?: FocusEvent) => true,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n clear: (_event?: MouseEvent) => true,\n};\n\nexport { CLASSNAME, COMPONENT_NAME };\n\n/**\n * TextField component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst TextField = defineComponent(\n (props: TextFieldProps, { emit }) => {\n const attrs = useAttrs();\n const getChipsSlot = useSlot('chips');\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n const generatedId = useId();\n const textFieldId = computed(() => props.id || generatedId);\n const isFocus = ref(false);\n\n const { isAnyDisabled, disabledStateProps } = useDisableStateProps(computed(() => ({ ...props, ...attrs })));\n\n // Track the native input element for inputRef forwarding.\n const rawInputInstance = ref<ComponentPublicInstance | null>(null);\n watch(\n rawInputInstance,\n (instance) => {\n const inputElement: HTMLInputElement | HTMLTextAreaElement | null = instance?.$el ?? instance ?? null;\n props.inputRef?.(inputElement);\n },\n { flush: 'sync' },\n );\n\n const accessibilityIds = computed(() =>\n generateAccessibilityIds(\n props.helper,\n props.error,\n generatedId,\n (attrs['aria-describedby'] as string) || undefined,\n props.label,\n ),\n );\n\n const handleChange = (value: string, name?: string, event?: any) => {\n emit('change', value, name, event);\n };\n\n const handleInput = (value: string, name?: string, event?: any) => {\n emit('input', value, name, event);\n };\n\n const handleFocus = (event?: any) => {\n isFocus.value = true;\n emit('focus', event);\n };\n\n const handleBlur = (event?: any) => {\n isFocus.value = false;\n emit('blur', event);\n };\n\n const handleClear = (event?: any) => {\n event?.stopImmediatePropagation();\n emit('change', '');\n emit('clear', event);\n };\n\n return () => {\n const theme = props.theme || defaultTheme.value;\n const { helperId, errorId, describedById, labelId } = accessibilityIds.value;\n\n // Filter out attrs handled explicitly so that unknown attrs (e.g. data-*, aria-*)\n // are forwarded to the native input element.\n const {\n class: _class,\n className: _cn,\n 'aria-describedby': _ab,\n disabled: _d,\n isDisabled: _id,\n 'aria-disabled': _aad,\n ariaDisabled: _ad,\n onChange: _oc,\n onInput: _oi,\n onFocus: _of,\n onBlur: _ob,\n chips: chipsAttr,\n ...inputAttrs\n } = attrs as any;\n\n const inputCommonProps = {\n ...inputAttrs,\n id: textFieldId.value,\n value: props.value,\n name: props.name,\n placeholder: props.placeholder,\n theme,\n 'aria-invalid': props.hasError || undefined,\n 'aria-describedby': describedById,\n ...disabledStateProps.value,\n readOnly: !!(inputAttrs as any).readOnly || !!disabledStateProps.value['aria-disabled'],\n onChange: handleChange,\n onInput: handleInput,\n onFocus: handleFocus,\n onBlur: handleBlur,\n };\n\n const input = (\n props.multiline ? (\n <RawInputTextarea ref={rawInputInstance} {...inputCommonProps} rows={props.minimumRows} />\n ) : (\n <RawInputText ref={rawInputInstance} {...inputCommonProps} type={props.type || 'text'} />\n )\n ) as any;\n\n return (\n <TextFieldUI\n chips={(getChipsSlot() ?? chipsAttr) || undefined}\n error={props.error}\n forceFocusStyle={props.forceFocusStyle}\n hasError={props.hasError}\n afterElement={props.afterElement}\n helper={props.helper}\n icon={props.icon}\n isRequired={props.isRequired}\n isValid={props.isValid}\n label={props.label}\n labelProps={props.labelProps}\n maxLength={props.maxLength}\n multiline={props.multiline}\n placeholder={props.placeholder}\n value={props.value}\n className={className.value}\n theme={theme}\n id={textFieldId.value}\n isAnyDisabled={isAnyDisabled.value}\n helperId={helperId}\n labelId={labelId}\n errorId={errorId}\n isFocus={isFocus.value}\n input={input}\n textFieldRef={props.textFieldRef}\n IconButton={IconButton as any}\n clearButtonProps={\n props.clearButtonProps ? { ...props.clearButtonProps, onClick: handleClear } : undefined\n }\n />\n );\n };\n },\n {\n name: 'LumxTextField',\n inheritAttrs: false,\n props: keysOf<TextFieldProps>()(\n 'class',\n 'theme',\n 'value',\n 'error',\n 'forceFocusStyle',\n 'hasError',\n 'afterElement',\n 'helper',\n 'icon',\n 'isRequired',\n 'isValid',\n 'label',\n 'labelProps',\n 'maxLength',\n 'isDisabled',\n 'disabled',\n 'multiline',\n 'placeholder',\n 'aria-disabled',\n 'id',\n 'clearButtonProps',\n 'name',\n 'type',\n 'minimumRows',\n 'inputRef',\n 'textFieldRef',\n ),\n emits: emitSchema,\n },\n);\n\nexport default TextField;\n","import { defineComponent, onMounted, onUnmounted, ref } from 'vue';\n\nimport {\n ComboboxInput as UI,\n ComboboxInputProps as UIProps,\n ComboboxInputPropsToOverride,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxInput';\nimport { setupComboboxInput } from '@lumx/core/js/components/Combobox/setupComboboxInput';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport type { TextFieldProps } from '../text-field/TextField';\nimport { TextField } from '../text-field';\nimport { IconButton } from '../button';\nimport type { IconButtonProps } from '../button/IconButton';\nimport { useComboboxContext } from './context/ComboboxContext';\nimport { useComboboxEvent } from './context/useComboboxEvent';\nimport { useComboboxOpen } from './context/useComboboxOpen';\n\n/**\n * Props for Combobox.Input component.\n * Note: role, aria-autocomplete, aria-controls, aria-expanded are set internally and cannot be overridden.\n */\nexport interface ComboboxInputProps extends TextFieldProps, VueToJSXProps<UIProps, ComboboxInputPropsToOverride> {\n /**\n * Props for the toggle button.\n * When provided, a chevron button will be rendered in the text field's afterElement\n * to toggle the listbox visibility.\n */\n toggleButtonProps?: Pick<IconButtonProps, 'label'> & Partial<Omit<IconButtonProps, 'label'>>;\n}\n\n/**\n * Combobox.Input component - wraps TextField with combobox ARIA attributes.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ComboboxInput = defineComponent(\n (props: ComboboxInputProps, { emit, attrs }) => {\n const className = useClassName(() => props.class);\n const { listboxId, anchorRef, setHandle, handle } = useComboboxContext();\n const { isOpen, setIsOpen } = useComboboxOpen();\n\n const inputEl = ref<HTMLInputElement | null>(null);\n\n // Get the input element from the TextField component after mount\n onMounted(() => {\n const input = inputEl.value;\n if (!input) return;\n\n setHandle(\n setupComboboxInput(input, {\n onSelect(option) {\n props.onSelect?.(option);\n emit('select', option);\n // Drive emit('change') according to selectionMode.\n if (props.selectionMode === 'keep') {\n // Leave input as-is, no emit('change').\n } else if (props.selectionMode === 'clear') {\n emit('change', '');\n } else {\n // 'fill' (default): echo the selected value.\n emit('change', option.value);\n }\n },\n selectionMode: props.selectionMode,\n filter: props.filter,\n openOnFocus: props.openOnFocus,\n }),\n );\n });\n\n onUnmounted(() => {\n handle.value?.destroy();\n setHandle(null);\n });\n\n // Track options and loading state to compute aria-expanded correctly.\n const optionsState = useComboboxEvent('optionsChange', { optionsLength: 0 });\n const isLoading = useComboboxEvent('loadingChange', false);\n\n const handleToggle = () => {\n // Don't toggle when error/empty state (no options and not loading)\n if (isOpen.value && !optionsState.value?.optionsLength && !isLoading.value) return;\n setIsOpen(!isOpen.value);\n inputEl.value?.focus();\n };\n\n return () => {\n const {\n toggleButtonProps,\n onSelect: _onSelect,\n filter,\n openOnFocus: _oof,\n selectionMode: _selectionMode,\n class: _class,\n ...forwardedProps\n } = props;\n\n // Event handlers are framework-specific and forwarded through the core template's\n // spread to the TextField adapter. They are not in the core ComboboxInputProps type.\n const eventHandlers = {\n onChange: (value: string, name?: string, event?: Event) => emit('change', value, name, event),\n onInput: (value: string) => emit('change', value),\n onFocus: (event?: FocusEvent) => emit('focus', event),\n onBlur: (event?: FocusEvent) => emit('blur', event),\n onClear: (event?: MouseEvent) => emit('clear', event),\n };\n\n // Vue normalizes 'aria-disabled' prop to camelCase 'ariaDisabled'.\n // Re-map it to kebab-case for the core template which expects 'aria-disabled'.\n const { ariaDisabled: fwdAriaDisabled, ...restForwardedProps } = forwardedProps as any;\n\n return UI(\n {\n ...attrs,\n ...restForwardedProps,\n 'aria-disabled': fwdAriaDisabled ?? (attrs as any).ariaDisabled,\n ...eventHandlers,\n listboxId,\n isOpen: isOpen.value && (!!optionsState.value?.optionsLength || isLoading.value),\n filter,\n textFieldRef: (el: HTMLElement | null) => {\n anchorRef.value = el;\n props.textFieldRef?.(el);\n },\n inputRef: (el: HTMLInputElement | null) => {\n inputEl.value = el;\n props.inputRef?.(el);\n },\n toggleButtonProps,\n handleToggle,\n className: className.value,\n },\n { TextField, IconButton },\n );\n };\n },\n {\n name: 'LumxComboboxInput',\n inheritAttrs: false,\n props: keysOf<ComboboxInputProps>()(\n 'class',\n 'theme',\n 'value',\n 'error',\n 'forceFocusStyle',\n 'hasError',\n 'afterElement',\n 'helper',\n 'icon',\n 'isRequired',\n 'isValid',\n 'label',\n 'labelProps',\n 'maxLength',\n 'isDisabled',\n 'disabled',\n 'aria-disabled',\n 'multiline',\n 'placeholder',\n 'id',\n 'clearButtonProps',\n 'name',\n 'type',\n 'minimumRows',\n 'inputRef',\n 'textFieldRef',\n 'toggleButtonProps',\n 'onSelect',\n 'filter',\n 'openOnFocus',\n 'selectionMode',\n ),\n emits: {\n select: (option: { value: string }) => !!option,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n change: (value: string, _name?: string, _event?: Event) => typeof value === 'string',\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n focus: (_event?: FocusEvent) => true,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n blur: (_event?: FocusEvent) => true,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n clear: (_event?: MouseEvent) => true,\n },\n },\n);\n\nexport { COMPONENT_NAME, CLASSNAME };\nexport default ComboboxInput;\n","import { Size } from '../../constants';\nimport type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/** List item padding size. */\nexport type ListItemPadding = Extract<Size, 'big' | 'huge'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ListProps extends HasClassName {\n /** List content (should be ListItem, ListDivider, etc.). */\n children?: JSXElement;\n /** Item padding size. */\n itemPadding?: ListItemPadding;\n /** ref to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'List';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-list';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ListProps> = {};\n\n/**\n * List component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const List = (props: ListProps) => {\n const { children, className, itemPadding, ref, ...forwardedProps } = props;\n\n return (\n <ul\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`item-padding-${itemPadding}`]: Boolean(itemPadding),\n }),\n )}\n ref={ref}\n >\n {children}\n </ul>\n );\n};\n\nList.displayName = COMPONENT_NAME;\nList.className = CLASSNAME;\nList.defaultProps = DEFAULT_PROPS;\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { List } from '../List';\n\n/**\n * Popup type for the combobox listbox.\n * - `'listbox'`: Standard listbox with `role=\"listbox\"` and `role=\"option\"` items.\n * - `'grid'`: Grid mode with `role=\"grid\"` and `role=\"gridcell\"` items, enabling 2D keyboard navigation.\n */\nexport type ComboboxListType = 'listbox' | 'grid';\n\n/**\n * Defines the props for the core ComboboxList template.\n */\nexport interface ComboboxListProps extends HasClassName {\n /** Accessible label for the listbox (required for accessibility). */\n 'aria-label'?: string;\n /**\n * Indicates that the listbox content is incomplete (loading).\n * Set to `true` when skeleton placeholders are present and no real options have loaded yet.\n * Omit (or set to `undefined`) when not loading — the attribute is not rendered as `\"false\"`.\n */\n 'aria-busy'?: boolean;\n /** Content (should be ComboboxOption elements). */\n children?: JSXElement;\n /** The ID of the listbox element. */\n id?: string;\n /** ref to the root element */\n ref?: CommonRef;\n /**\n * The popup type. Set to \"grid\" when options have action buttons.\n * @default 'listbox'\n */\n type?: ComboboxListType;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxList';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-list';\n\n/**\n * ComboboxList core template.\n * Renders a List with combobox-specific ARIA attributes and styling.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ComboboxList = (props: ComboboxListProps) => {\n const {\n 'aria-label': ariaLabel,\n 'aria-busy': ariaBusy,\n children,\n className,\n id,\n type = 'listbox',\n ref,\n ...forwardedProps\n } = props;\n\n return List({\n ...forwardedProps,\n className: classNames.join(className, CLASSNAME),\n ref,\n itemPadding: 'big',\n id,\n role: type,\n 'aria-label': ariaLabel,\n 'aria-busy': ariaBusy || undefined,\n children,\n } as any);\n};\n","import { type InjectionKey, inject, provide } from 'vue';\n\n/** Context value for the Combobox.List sub-tree. */\nexport interface ComboboxListContextValue {\n /** The popup type. \"grid\" enables 2D keyboard navigation and action buttons on options. */\n type: 'listbox' | 'grid';\n}\n\nconst COMBOBOX_LIST_CONTEXT_KEY: InjectionKey<ComboboxListContextValue> = Symbol('combobox-list-context');\n\nconst DEFAULT_VALUE: ComboboxListContextValue = { type: 'listbox' };\n\n/**\n * Provides the combobox list context.\n */\nexport function provideComboboxListContext(value: ComboboxListContextValue) {\n provide(COMBOBOX_LIST_CONTEXT_KEY, value);\n}\n\n/**\n * Hook to access the Combobox.List context (provides the `type`).\n * @returns The list context value.\n */\nexport function useComboboxListContext(): ComboboxListContextValue {\n return inject(COMBOBOX_LIST_CONTEXT_KEY, DEFAULT_VALUE);\n}\n","import { defineComponent, ref, useAttrs, watch } from 'vue';\n\nimport {\n ComboboxList as UI,\n type ComboboxListProps as UIProps,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxList';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { useWatchDisposable } from '../../composables/useWatchDisposable';\nimport { useComboboxContext } from './context/ComboboxContext';\nimport { useComboboxEvent } from './context/useComboboxEvent';\nimport { provideComboboxListContext } from './context/ComboboxListContext';\n\nexport type ComboboxListProps = VueToJSXProps<UIProps, 'aria-label' | 'aria-busy' | 'id'>;\n\n/**\n * Combobox.List component - wraps List with listbox ARIA attributes.\n * Registers itself as the combobox listbox on mount.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ComboboxList = defineComponent(\n (props: ComboboxListProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n const { listboxId, handle } = useComboboxContext();\n const listRef = ref<HTMLElement | null>(null);\n\n provideComboboxListContext({ type: props.type || 'listbox' });\n\n // Register the list as the listbox when both handle and list element are available\n useWatchDisposable([handle, listRef], ([handleValue, list]) => {\n if (!handleValue || !list) return;\n return handleValue.registerListbox(list);\n });\n\n // Tracking states\n const isLoading = useComboboxEvent('loadingChange', false);\n const isOpen = useComboboxEvent('open', false);\n const options = useComboboxEvent('optionsChange', undefined);\n\n // Flush pending navigation (that could not run when closed)\n watch(\n [isOpen, () => options.value?.optionsLength],\n () => {\n if (isOpen.value) handle.value?.flushPendingNavigation();\n },\n { flush: 'post' },\n );\n\n return () => {\n const children = isOpen.value ? (slots.default?.() as JSXElement) : null;\n // Get aria-label and aria-multiselectable from attrs (Vue normalizes hyphenated prop\n // names to camelCase in props, so we read from attrs to get the original values)\n const ariaLabel = (attrs['aria-label'] ?? '') as string;\n const ariaMultiselectable = attrs['aria-multiselectable'] as boolean | undefined;\n return UI({\n 'aria-label': ariaLabel,\n 'aria-multiselectable': ariaMultiselectable || undefined,\n 'aria-busy': isLoading.value || undefined,\n className: className.value,\n ref: listRef as any,\n id: listboxId,\n type: props.type || 'listbox',\n children,\n } as any);\n };\n },\n {\n name: 'LumxComboboxList',\n inheritAttrs: false,\n // Note: 'aria-label' is intentionally NOT declared as a prop because Vue normalizes\n // hyphenated prop names to camelCase (ariaLabel) internally, making it inaccessible\n // via props['aria-label']. Instead, we read it from attrs where Vue keeps the original name.\n props: keysOf<ComboboxListProps>()('type', 'class'),\n },\n);\n\nexport { COMPONENT_NAME, CLASSNAME };\nexport default ComboboxList;\n","import { Size } from '../../constants';\nimport type { CommonRef, GenericProps, HasAriaDisabled, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { RawClickable } from '../RawClickable';\n\n/** ListItem size variants. */\nexport type ListItemSize = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ListItemProps extends HasClassName, HasAriaDisabled {\n /** A component to be rendered after the content. */\n after?: JSXElement;\n /** A component to be rendered before the content. */\n before?: JSXElement;\n /** Content. */\n children?: JSXElement;\n /** Whether the list item should be highlighted or not. */\n isHighlighted?: boolean;\n /** Whether the component is selected or not. */\n isSelected?: boolean;\n /** Whether link/button is disabled or not. */\n isDisabled?: boolean;\n /** Custom component for the link (can be used to inject router Link). */\n linkAs?: 'a' | any;\n /** Props that will be passed on to the Link. */\n linkProps?: GenericProps;\n /** Reference to the link element. */\n linkRef?: CommonRef;\n /** Size variant. */\n size?: ListItemSize;\n /** ref to the root <li> element */\n ref?: CommonRef;\n /** On click callback. */\n handleClick?: (event: any) => void;\n}\n\nexport type ListItemPropsToOverride = 'after' | 'before' | 'children' | 'handleClick';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ListItem';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-list-item';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ListItemProps> = {\n size: Size.regular,\n};\n\n/**\n * ListItem component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ListItem = (props: ListItemProps) => {\n const {\n after,\n before,\n children,\n className,\n isHighlighted,\n isSelected,\n isDisabled,\n 'aria-disabled': ariaDisabled,\n linkAs,\n linkProps = {},\n linkRef,\n handleClick,\n size = DEFAULT_PROPS.size,\n ref,\n ...forwardedProps\n } = props;\n const clickable = !!linkAs || linkProps?.href || handleClick;\n\n return (\n <li\n ref={ref}\n {...forwardedProps}\n className={classNames.join(className, block({ [`size-${size}`]: Boolean(size) }))}\n >\n {RawClickable({\n as: clickable ? linkAs || (linkProps.href ? 'a' : 'button') : 'div',\n isDisabled,\n 'aria-disabled': ariaDisabled,\n ...linkProps,\n className: element(clickable ? 'link' : 'wrapper', {\n 'is-highlighted': isHighlighted,\n 'is-selected': isSelected,\n 'is-disabled': isDisabled || ariaDisabled === 'true',\n }),\n handleClick,\n ref: linkRef,\n children: (\n <>\n {before && <div className={element('before')}>{before}</div>}\n <div className={element('content')}>{children}</div>\n {after && <div className={element('after')}>{after}</div>}\n </>\n ) as JSXElement,\n })}\n </li>\n );\n};\n\nListItem.displayName = COMPONENT_NAME;\nListItem.className = CLASSNAME;\nListItem.defaultProps = DEFAULT_PROPS;\n","import type { HasClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { ClickableElement, RawClickable, RawClickableProps } from '../RawClickable';\n\n/**\n * ListItemAction props.\n */\nexport type ListItemActionProps<E extends ClickableElement = 'button'> = RawClickableProps<E> & HasClassName;\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ListItemAction';\n\n/**\n * Component classname (used by action area CSS pattern).\n */\nexport const CLASSNAME = 'lumx-action-area__action';\n\nexport const DEFAULT_PROPS: Partial<ListItemActionProps> = {};\n\n/**\n * ListItemAction component.\n *\n * Renders a button or link with action area classes.\n * When placed as a child of ListItem, it activates the action area pattern:\n * the entire list item becomes visually clickable, while other interactive\n * elements (in `before`/`after` slots) remain independently clickable.\n */\nexport const ListItemAction = <E extends ClickableElement = 'button'>(props: ListItemActionProps<E>) => {\n const { children, className, as: Element = 'button', handleClick, ...forwardedProps } = props;\n\n return RawClickable({\n as: Element as any,\n ...forwardedProps,\n className: classNames.join(\n className,\n classNames.actionArea.action({ 'has-overlay': true, 'focus-inset': true }),\n ),\n handleClick,\n children,\n });\n};\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { ListItem } from '../List/ListItem';\nimport { ListItemAction } from '../List/ListItemAction';\nimport { getTextProps } from '../Text';\n\n/**\n * Injected framework-specific components for ComboboxOption rendering.\n */\nexport interface ComboboxOptionComponents {\n /** Tooltip wrapper component (optional). Used when `tooltipProps` is provided. */\n Tooltip?: any;\n}\n\n/**\n * Defines the props for the core ComboboxOption template.\n */\nexport interface ComboboxOptionProps extends HasClassName {\n /** A component to be rendered before the content (e.g. an icon or avatar). */\n before?: JSXElement;\n /** A component to be rendered after the content (e.g. ComboboxOptionAction elements). */\n after?: JSXElement;\n /** Content (option label). */\n children?: JSXElement;\n /** Props forwarded to a Tooltip wrapping the role=\"option\" / role=\"gridcell\" element. */\n tooltipProps?: Record<string, any>;\n /** Helper description. */\n description?: string;\n /** Unique ID for the option element. */\n id?: string;\n /** Unique ID for the description element (for aria-describedby). */\n descriptionId?: string;\n /** Whether the option is disabled. */\n isDisabled?: boolean;\n /** Whether the option is selected. */\n isSelected?: boolean;\n /** Whether the parent list is in grid mode. */\n isGrid?: boolean;\n /**\n * Whether the option is hidden (filtered out by auto-filter).\n * When true, renders a bare `<li hidden>` with only the children text — no ARIA roles,\n * no classes, no visual structure. This keeps the element in the DOM so its textContent\n * can be read for future filter evaluations, while naturally excluding it from\n * `[role=\"option\"]` queries (focus navigation) and `.lumx-combobox-option` CSS rules\n * (section/popover auto-hide).\n */\n hidden?: boolean;\n /** On click callback. */\n handleClick?(): void;\n /** Extra props forwarded to the inner action element (e.g. link props when as=\"a\"). */\n actionProps?: Record<string, any>;\n /** ref to the root <li> element. */\n ref?: CommonRef;\n /** The value for this option (used for selection). */\n value?: string;\n}\n\n/**\n * Props that React/Vue wrappers need to re-declare with framework-specific types.\n * Used by `ReactToJSX<ComboboxOptionProps, ComboboxOptionPropsToOverride>`.\n */\nexport type ComboboxOptionPropsToOverride = 'before' | 'after' | 'children' | 'tooltipProps' | 'actionProps';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxOption';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-option';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * ComboboxOption core template.\n * Renders a ListItem with combobox-specific ARIA attributes and structure.\n *\n * In grid mode, the ListItem renders with `role=\"row\"` and the option content\n * uses `role=\"gridcell\"` instead of `role=\"option\"`.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ComboboxOption = (props: ComboboxOptionProps, { Tooltip }: ComboboxOptionComponents = {}) => {\n const {\n before,\n after,\n children,\n className,\n description,\n descriptionId,\n hidden,\n id,\n isDisabled,\n isGrid,\n isSelected,\n handleClick,\n actionProps,\n ref,\n tooltipProps,\n value,\n ...forwardedProps\n } = props;\n\n let actionRole;\n let itemRole;\n if (!hidden) {\n actionRole = isGrid ? 'gridcell' : 'option';\n itemRole = isGrid ? 'row' : 'none';\n }\n\n const actionElement = ListItemAction({\n as: 'button',\n ...actionProps,\n id,\n className: element('action'),\n handleClick,\n 'aria-selected': isSelected ? 'true' : 'false',\n 'data-value': value,\n 'aria-describedby':\n [description && descriptionId, id && `${id}-more-info`].filter(Boolean).join(' ') || undefined,\n 'aria-disabled': isDisabled ? 'true' : undefined,\n role: actionRole,\n children,\n } as any);\n\n const wrappedAction =\n Tooltip && tooltipProps && !hidden ? <Tooltip {...tooltipProps}>{actionElement}</Tooltip> : actionElement;\n\n return ListItem({\n ref,\n size: 'tiny',\n ...forwardedProps,\n hidden,\n className: !hidden ? classNames.join(className, block()) : undefined,\n before,\n after,\n role: itemRole,\n children: (\n <>\n {wrappedAction}\n\n {description && (\n <p\n id={descriptionId}\n {...getTextProps({\n className: element('description'),\n typography: 'caption',\n color: 'dark-L2',\n })}\n >\n {description}\n </p>\n )}\n </>\n ),\n } as any);\n};\n","import { type InjectionKey, inject, provide } from 'vue';\n\n/** Context value provided by Combobox.Option to its `after` slot children. */\nexport interface ComboboxOptionContextValue {\n /** The ID of the parent option element (matches the aria-activedescendant value when highlighted). */\n optionId: string;\n}\n\nconst COMBOBOX_OPTION_CONTEXT_KEY: InjectionKey<ComboboxOptionContextValue> = Symbol('combobox-option-context');\n\n/**\n * Provides the combobox option context.\n */\nexport function provideComboboxOptionContext(value: ComboboxOptionContextValue) {\n provide(COMBOBOX_OPTION_CONTEXT_KEY, value);\n}\n\n/**\n * Hook to access the Combobox.Option context.\n * Must be used within a Combobox.Option's `after` slot.\n * @throws Error if used outside of a Combobox.Option.\n * @returns The option context value.\n */\nexport function useComboboxOptionContext(): ComboboxOptionContextValue {\n const context = inject(COMBOBOX_OPTION_CONTEXT_KEY);\n if (!context) {\n throw new Error('Combobox.OptionMoreInfo must be used within a Combobox.Option `after` slot');\n }\n return context;\n}\n","import { defineComponent, ref, useAttrs, watch, toRef } from 'vue';\n\nimport {\n ComboboxOption as UI,\n type ComboboxOptionProps as UIProps,\n type ComboboxOptionPropsToOverride,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxOption';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { useId } from '../../composables/useId';\nimport { useClassName } from '../../composables/useClassName';\nimport { useWatchDisposable } from '../../composables/useWatchDisposable';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { Tooltip } from '../tooltip';\nimport type { TooltipProps } from '../tooltip/Tooltip';\nimport { useComboboxContext } from './context/ComboboxContext';\nimport { useComboboxListContext } from './context/ComboboxListContext';\nimport { provideComboboxOptionContext } from './context/ComboboxOptionContext';\n\nexport type ComboboxOptionProps = VueToJSXProps<\n UIProps,\n ComboboxOptionPropsToOverride | 'descriptionId' | 'hidden' | 'isGrid' | 'id'\n> & {\n /** Props forwarded to a Tooltip wrapping the option trigger element. */\n tooltipProps?: Partial<TooltipProps>;\n /** Props forwarded to the inner action element (e.g. `{ as: 'a', href: '/foo' }`). */\n actionProps?: Record<string, any>;\n};\n\nexport const emitSchema = {\n click: () => true,\n};\n\n/**\n * Combobox.Option component - wraps ListItem with option role and data-value.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ComboboxOption = defineComponent(\n (props: ComboboxOptionProps, { slots, emit }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n const { type } = useComboboxListContext();\n const { handle } = useComboboxContext();\n const isGrid = type === 'grid';\n const optionId = useId();\n const descriptionId = useId();\n const optionRef = ref<HTMLElement | null>(null);\n const isFiltered = ref(false);\n\n // Provide option context to children (e.g. OptionMoreInfo)\n provideComboboxOptionContext({ optionId });\n\n // Register option with the combobox handle when both are available\n useWatchDisposable([handle, optionRef], ([handleValue, element]) => {\n if (!handleValue || !element) return;\n return handleValue.registerOption(element, (filtered) => {\n isFiltered.value = filtered;\n });\n });\n\n // Re-evaluate filter state when the option value changes.\n watch(\n toRef(props, 'value'),\n () => {\n const handleValue = handle.value;\n const element = optionRef.value;\n if (!handleValue || !element) return;\n handleValue.refilterOption(element);\n },\n // ensuring data-value is committed before re-evaluating the filter.\n { flush: 'post' },\n );\n\n // Update optionRef when the option element is mounted/unmounted\n const setOptionRef = (el: Element | null) => {\n optionRef.value = el as HTMLElement | null;\n };\n\n const handleClick = () => {\n emit('click');\n // Also call attrs.onClick for compatibility with core JSX\n (attrs.onClick as any)?.();\n };\n\n /** Get slot content, falling back to attrs (JSX prop syntax used in tests). */\n const getSlotOrAttr = (name: string) => (slots[name]?.() ?? attrs[name]) as JSXElement;\n\n return () => {\n const before = getSlotOrAttr('before');\n const after = getSlotOrAttr('after');\n const children = slots.default?.() as JSXElement;\n\n return UI(\n {\n ref: setOptionRef as any,\n hidden: isFiltered.value,\n value: props.value,\n description: props.description,\n children,\n isSelected: props.isSelected,\n isDisabled: props.isDisabled,\n isGrid,\n before,\n after,\n handleClick,\n actionProps: props.actionProps,\n id: optionId,\n descriptionId,\n tooltipProps: props.tooltipProps as any,\n className: className.value,\n },\n { Tooltip },\n );\n };\n },\n {\n name: 'LumxComboboxOption',\n inheritAttrs: false,\n props: keysOf<ComboboxOptionProps>()(\n 'value',\n 'description',\n 'isDisabled',\n 'isSelected',\n 'tooltipProps',\n 'actionProps',\n 'class',\n ),\n emits: emitSchema,\n },\n);\n\nexport { COMPONENT_NAME, CLASSNAME };\nexport default ComboboxOption;\n","import type {\n CommonRef,\n HasClassName,\n HasPolymorphicAs,\n HasRequiredLinkHref,\n JSXElement,\n LumxClassName,\n} from '../../types';\nimport { classNames } from '../../utils';\nimport { ClickableElement, RawClickable } from '../RawClickable';\n\n/**\n * Defines the props for the core ComboboxOptionAction template.\n */\nexport type ComboboxOptionActionProps<E extends ClickableElement = 'button'> = HasPolymorphicAs<E> &\n HasClassName &\n HasRequiredLinkHref<E> & {\n /** Content of the action (icon, label, etc.). */\n children?: JSXElement;\n /** Unique ID for the action element. */\n id?: string;\n /** Whether the action is disabled. */\n isDisabled?: boolean;\n /** On click callback. */\n handleClick?(evt: any): void;\n /** ref to the root element. */\n ref?: CommonRef;\n };\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxOptionAction';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-option-action';\n\n/**\n * ComboboxOptionAction core template.\n * Renders a secondary action button within a combobox option row (grid mode).\n * Each action renders as a `role=\"gridcell\"` element, enabling 2D keyboard\n * navigation (ArrowLeft/Right to move between the option and its actions).\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ComboboxOptionAction = <E extends ClickableElement = 'button'>(props: ComboboxOptionActionProps<E>) => {\n const { children, className, as: Element = 'button', handleClick, ...forwardedProps } = props;\n\n return RawClickable({\n as: Element as any,\n ...forwardedProps,\n role: 'gridcell',\n className: classNames.join(className, CLASSNAME),\n handleClick,\n children,\n } as any);\n};\n","import { defineComponent } from 'vue';\n\nimport {\n ComboboxOptionAction as UI,\n type ComboboxOptionActionProps as UIProps,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxOptionAction';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { useId } from '../../composables/useId';\nimport { useClassName } from '../../composables/useClassName';\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type ComboboxOptionActionProps = Pick<VueToJSXProps<UIProps>, 'isDisabled' | 'class'> & {\n /** On click callback. */\n onClick?: (evt: MouseEvent) => void;\n};\n\n/**\n * Combobox.OptionAction sub-component.\n *\n * Renders a secondary action button within a combobox option row (grid mode).\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ComboboxOptionAction = defineComponent(\n (props: ComboboxOptionActionProps, { slots, attrs }) => {\n const actionId = useId();\n const className = useClassName(() => props.class);\n const { disabledStateProps, otherProps } = useDisableStateProps(props as any);\n\n return () => {\n const children = slots.default?.() as JSXElement;\n const { onClick, class: _class, ...forwardedProps } = otherProps.value as any;\n return UI({\n as: 'button' as any,\n ...forwardedProps,\n ...attrs,\n ...disabledStateProps.value,\n id: actionId,\n className: className.value,\n handleClick: onClick,\n children,\n });\n };\n },\n {\n name: 'LumxComboboxOptionAction',\n inheritAttrs: false,\n props: keysOf<ComboboxOptionActionProps>()('isDisabled', 'onClick', 'class'),\n },\n);\n\nexport { COMPONENT_NAME, CLASSNAME };\nexport default ComboboxOptionAction;\n","import { mdiInformationOutline } from '@lumx/icons';\n\nimport type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props for the core ComboboxOptionMoreInfo template.\n */\nexport interface ComboboxOptionMoreInfoProps extends HasClassName {\n /** Popover content (additional details about the option). */\n children?: JSXElement;\n /** Whether the popover is open. */\n isOpen?: boolean;\n /** ID for the popover element (used for aria-describedby on the parent option). */\n popoverId: string;\n /** Ref for the anchor element (icon button). */\n ref?: CommonRef;\n /** Mouse enter callback. */\n onMouseEnter?(): void;\n /** Mouse leave callback. */\n onMouseLeave?(): void;\n /** Props forwarded to the IconButton. */\n buttonProps?: Record<string, any>;\n}\n\n/**\n * Props that React/Vue wrappers need to re-declare with framework-specific types.\n */\nexport type ComboboxOptionMoreInfoPropsToOverride = 'children' | 'popoverId' | 'isOpen';\n\n/**\n * Injected framework-specific components for ComboboxOptionMoreInfo rendering.\n */\nexport interface ComboboxOptionMoreInfoComponents {\n /** IconButton component (framework-specific). */\n IconButton: any;\n /** Popover component (framework-specific). */\n Popover: any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxOptionMoreInfo';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-option-more-info';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * ComboboxOptionMoreInfo core template.\n * Renders an info icon button with a popover that shows additional details about a combobox option.\n * The popover opens on mouse hover or when the parent option is keyboard-highlighted.\n *\n * Framework-specific components (IconButton, Popover) are passed as a second argument\n * by the React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const ComboboxOptionMoreInfo = (\n props: ComboboxOptionMoreInfoProps,\n { IconButton, Popover }: ComboboxOptionMoreInfoComponents,\n) => {\n const { children, className, isOpen, popoverId, ref, onMouseEnter, onMouseLeave, buttonProps } = props;\n\n return (\n <>\n <IconButton\n ref={ref}\n icon={mdiInformationOutline}\n size=\"s\"\n {...buttonProps}\n className={block([className, buttonProps?.className])}\n emphasis=\"low\"\n onMouseEnter={onMouseEnter}\n onMouseLeave={onMouseLeave}\n // Button plays no interactive role — only serves as a hover target and popover anchor.\n // Keyboard accessibility is handled via combobox keyboard highlighting.\n aria-hidden\n label=\"\"\n />\n <Popover\n id={popoverId}\n className={element('popover')}\n anchorRef={ref}\n isOpen={isOpen}\n closeMode=\"unmount\"\n closeOnEscape\n closeOnClickAway\n placement=\"bottom-end\"\n hasArrow\n >\n {children}\n </Popover>\n </>\n );\n};\n","import { Size } from '../../constants/enums';\nimport { ValueOf } from '../../types/ValueOf';\n\n/**\n * Different possible placements for the popover.\n */\nexport const Placement = {\n AUTO: 'auto',\n AUTO_END: 'auto-end',\n AUTO_START: 'auto-start',\n\n TOP: 'top',\n TOP_END: 'top-end',\n TOP_START: 'top-start',\n\n RIGHT: 'right',\n RIGHT_END: 'right-end',\n RIGHT_START: 'right-start',\n\n BOTTOM: 'bottom',\n BOTTOM_END: 'bottom-end',\n BOTTOM_START: 'bottom-start',\n\n LEFT: 'left',\n LEFT_END: 'left-end',\n LEFT_START: 'left-start',\n} as const;\nexport type Placement = ValueOf<typeof Placement>;\n\n/**\n * Popover fit anchor width options.\n */\nexport const FitAnchorWidth = {\n MAX_WIDTH: 'maxWidth',\n MIN_WIDTH: 'minWidth',\n WIDTH: 'width',\n} as const;\nexport type FitAnchorWidth = ValueOf<typeof FitAnchorWidth>;\n\n/**\n * Arrow size (in pixel).\n */\nexport const ARROW_SIZE = 14;\n\n/**\n * Popover default z-index\n */\nexport const POPOVER_ZINDEX = 9999;\n\n/**\n * Popover height/width sizes\n */\nexport const POPOVER_SIZES = [Size.m, Size.l, Size.xl, Size.xxl] as const;\n","import type { JSXElement, HasTheme, HasClassName, HasCloseMode, CommonRef, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { Placement, FitAnchorWidth, POPOVER_ZINDEX } from './constants';\nimport type { PopoverSizes, Elevation, Offset } from './types';\n\n/**\n * Shared popover props used by both React and Vue wrappers.\n *\n * Framework-specific props (ref types, children, callbacks) are added by each wrapper.\n * The `anchorRef`, `boundaryRef`, `focusElement`, `parentElement`, `focusTrapZoneElement`\n * are typed as `any` here because React uses `RefObject<HTMLElement>` while Vue uses\n * raw `HTMLElement` — each framework narrows the type in its own props definition.\n */\nexport interface PopoverProps extends HasClassName, HasTheme, HasCloseMode {\n /** Reference to the DOM element used to set the position of the popover. */\n anchorRef?: CommonRef;\n /** Customize the root element tag. */\n as?: string;\n /** Element which will act as boundary when opening the popover. */\n boundaryRef?: CommonRef;\n /** Whether a click anywhere out of the popover would close it. */\n closeOnClickAway?: boolean;\n /** Whether an escape key press would close the popover. */\n closeOnEscape?: boolean;\n /** Shadow elevation. */\n elevation?: Elevation;\n /**\n * Manage popover width:\n * - `maxWidth`: popover not bigger than anchor\n * - `minWidth` or `true`: popover not smaller than anchor\n * - `width`: popover equal to the anchor.\n */\n fitToAnchorWidth?: FitAnchorWidth | boolean;\n /** Constrain popover height to avoid overflowing the viewport. */\n fitWithinViewportHeight?: boolean;\n /** Element to focus when opening the popover. */\n focusElement?: CommonRef;\n /** Whether the focus should go back on the anchor when popover closes and focus is within. */\n focusAnchorOnClose?: boolean;\n /** Whether we put an arrow or not. */\n hasArrow?: boolean;\n /** Whether the popover is open or not. */\n isOpen: boolean;\n /** Offset placement relative to anchor. */\n offset?: Offset;\n /** Reference to the parent element that triggered the popover. */\n parentElement?: CommonRef;\n /** Placement relative to anchor. */\n placement?: Placement;\n /** Whether the popover should be rendered into a portal. */\n usePortal?: boolean;\n /** The element in which the focus trap should be set. Default to popover. */\n focusTrapZoneElement?: CommonRef;\n /** Z-axis position. */\n zIndex?: number;\n /** Whether the popover should trap the focus within itself. */\n withFocusTrap?: boolean;\n /** On close callback (on click away or Escape pressed). Framework wrappers provide their own type. */\n handleClose?(): void;\n}\n\n/**\n * Internal UI rendering props for the core Popover component.\n * These are passed by the framework wrappers after processing the behavioral PopoverProps.\n */\nexport interface PopoverUIProps extends HasClassName, HasTheme, HasCloseMode, PopoverSizes {\n /** Customize the root element tag. */\n as?: string;\n /** Content. */\n children: JSXElement;\n /** Shadow elevation. */\n elevation?: Elevation;\n /** Whether we put an arrow or not. */\n hasArrow?: boolean;\n /** Whether the popover is open or not. */\n isOpen: boolean;\n /** Resolved position (from floating UI). */\n position?: Placement;\n /** Computed popover styles (from floating UI). */\n popoverStyle?: any;\n /** Computed arrow styles (from floating UI). */\n arrowStyle?: any;\n /** Ref for the popover root element. */\n ref?: CommonRef;\n /** Ref setter for the arrow element. */\n arrowRef?: CommonRef;\n /** Whether to render into a portal. */\n usePortal?: boolean;\n /** Click-away callback (when closeOnClickAway is true). */\n clickAwayCallback?: any;\n /** Refs for click-away detection. */\n clickAwayRefs?: any;\n /** Unmount sentinel (React-specific, optional). */\n unmountSentinel?: JSXElement;\n}\n\n/** Injected framework-specific components. */\nexport interface PopoverComponents {\n /** Portal component for rendering outside the parent hierarchy. */\n Portal: any;\n /** ClickAwayProvider component for click-away detection. */\n ClickAwayProvider: any;\n /** ThemeProvider component for theme context isolation. */\n ThemeProvider: any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Popover';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-popover';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props (used by framework wrappers).\n */\nexport const DEFAULT_PROPS: Partial<PopoverProps> = {\n closeMode: 'unmount',\n elevation: 3 as Elevation,\n placement: Placement.AUTO,\n focusAnchorOnClose: true,\n usePortal: true,\n zIndex: POPOVER_ZINDEX,\n};\n\n/**\n * Popover core UI component.\n *\n * Framework-specific components (Portal, ClickAwayProvider, ThemeProvider) are passed\n * as a second argument by the React/Vue wrappers.\n */\nexport const Popover = (props: PopoverUIProps, { Portal, ClickAwayProvider, ThemeProvider }: PopoverComponents) => {\n const {\n as: asTag = 'div',\n children,\n className,\n closeMode = DEFAULT_PROPS.closeMode,\n elevation = DEFAULT_PROPS.elevation,\n hasArrow,\n isOpen,\n position,\n popoverStyle,\n arrowStyle,\n theme,\n\n // Framework-specific\n ref,\n arrowRef,\n usePortal = DEFAULT_PROPS.usePortal,\n clickAwayCallback,\n clickAwayRefs,\n unmountSentinel,\n\n // Forwarded props\n ...forwardedProps\n } = props;\n\n // Compute hidden/mounted state from closeMode and isOpen.\n const isHidden = !isOpen && closeMode === 'hide';\n const isMounted = isOpen || closeMode === 'hide';\n\n // Cast to `any` to avoid \"union type too complex\" error when using a dynamic tag name in JSX.\n // This is safe because `asTag` is always a valid HTML element tag (e.g. 'div').\n const Component = asTag as any;\n const adjustedElevation = Math.min(elevation || 0, 5);\n\n if (!isMounted) return null;\n\n return (\n <Portal enabled={usePortal}>\n <Component\n {...forwardedProps}\n ref={ref}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n [`elevation-${adjustedElevation}`]: Boolean(adjustedElevation),\n [`position-${position}`]: Boolean(position),\n 'is-hidden': Boolean(isHidden),\n }),\n )}\n hidden={isHidden || undefined}\n style={isHidden ? undefined : popoverStyle}\n data-popper-placement={position}\n >\n {unmountSentinel}\n <ClickAwayProvider callback={!isHidden && clickAwayCallback} childrenRefs={clickAwayRefs}>\n {hasArrow && (\n <div ref={arrowRef} className={element('arrow')} style={isHidden ? undefined : arrowStyle}>\n <svg viewBox=\"0 0 14 14\" aria-hidden>\n <path d=\"M8 3.49C7.62 2.82 6.66 2.82 6.27 3.48L.04 14 14.04 14 8 3.49Z\" />\n </svg>\n </div>\n )}\n <ThemeProvider value={theme}>{children}</ThemeProvider>\n </ClickAwayProvider>\n </Component>\n </Portal>\n );\n};\n","import { type Placement as FloatingPlacement } from '@floating-ui/dom';\nimport { type Placement } from '../constants';\n\n/**\n * Parse a Popover placement into floating-ui placement or auto-placement config.\n */\nexport function parseAutoPlacement(placement?: Placement) {\n if (placement === 'auto') return { isAuto: true as const };\n if (placement === 'auto-start') return { isAuto: true as const, autoAlignment: 'start' as const };\n if (placement === 'auto-end') return { isAuto: true as const, autoAlignment: 'end' as const };\n return { floatingPlacement: placement as FloatingPlacement, isAuto: false as const };\n}\n","import { FitAnchorWidth } from '../constants';\n\n/**\n * Parse the fitToAnchorWidth option into the CSS property name to apply.\n */\nexport function parseFitWidth(fitToAnchorWidth?: string | boolean): string | undefined {\n if (!fitToAnchorWidth) return undefined;\n if (typeof fitToAnchorWidth === 'string') return fitToAnchorWidth;\n return FitAnchorWidth.MIN_WIDTH;\n}\n","import { GlobalSize, Size } from '../../../constants/enums';\nimport type { VarSize } from './types';\n\n/** Resolve a t-shirt size token to its CSS custom property, or pass through as-is. */\nexport function resolveCssSize<V extends string | undefined>(value: V): V extends GlobalSize ? VarSize<V> : V;\nexport function resolveCssSize(value: any) {\n if (value && value in Size) return `var(--lumx-size-${value})`;\n return value;\n}\n","/** Create a CSS min()/max() combiner function. */\nfunction combineSize(combinator: 'min' | 'max') {\n return (size1?: string, size2?: string) => {\n if (size1 && size2) return `${combinator}(${size1}, ${size2})`;\n return size1 || size2 || '';\n };\n}\n\n/** Combine two CSS values with `min()`. */\nexport const cssMin = combineSize('min');\n\n/** Combine two CSS values with `max()`. */\nexport const cssMax = combineSize('max');\n","/* eslint-disable no-param-reassign */\nimport {\n offset as offsetMiddleware,\n flip,\n shift,\n size,\n arrow as arrowMiddleware,\n autoPlacement,\n type Middleware,\n} from '@floating-ui/dom';\n\nimport { ARROW_SIZE } from '../constants';\nimport type { Offset, PopoverSizes } from '../types';\nimport type { PXSize } from '../../../utils/browser/css/types';\nimport { resolveCssSize } from '../../../utils/browser/css/resolveCssSize';\nimport { cssMin, cssMax } from '../../../utils/browser/css/combineSize';\nimport { type parseAutoPlacement } from './parseAutoPlacement';\n\nexport interface BuildPopoverMiddlewareOptions extends PopoverSizes {\n /** Offset from the anchor element. */\n offset?: Offset;\n /** Whether the popover has an arrow. */\n hasArrow?: boolean;\n /** CSS property to fit to anchor width ('minWidth', 'maxWidth', 'width'). Already parsed via `parseFitWidth`. */\n fitWidth?: string;\n /** Constrain popover height to avoid overflowing the viewport. */\n fitWithinViewportHeight?: boolean;\n /** Boundary element for overflow detection. */\n boundary?: HTMLElement;\n /** Parsed placement result from `parseAutoPlacement`. */\n parsedPlacement: ReturnType<typeof parseAutoPlacement>;\n /** Arrow element (required when hasArrow is true). */\n arrowElement?: HTMLElement | null;\n}\n\n/**\n * Build the floating-ui middleware array for popover positioning.\n *\n * Middleware order: offset → flip/autoPlacement → shift → size → arrow\n */\nexport function buildPopoverMiddleware(options: BuildPopoverMiddlewareOptions): Middleware[] {\n const {\n offset,\n hasArrow,\n fitWidth,\n fitWithinViewportHeight,\n width: rawWidth,\n minWidth: rawMinWidth,\n maxWidth: rawMaxWidth,\n height: rawHeight,\n minHeight: rawMinHeight,\n maxHeight: rawMaxHeight,\n boundary,\n parsedPlacement,\n arrowElement,\n } = options;\n\n // Resolve t-shirt sizes to CSS pixel strings for the apply callback.\n const width = resolveCssSize(rawWidth);\n const minWidth = resolveCssSize(rawMinWidth);\n const maxWidth = resolveCssSize(rawMaxWidth);\n const height = resolveCssSize(rawHeight);\n const minHeight = resolveCssSize(rawMinHeight);\n const maxHeight = resolveCssSize(rawMaxHeight);\n\n const middlewares: Middleware[] = [];\n\n // Offset middleware\n const awayOffset = (offset?.away ?? 0) + (hasArrow ? ARROW_SIZE : 0);\n const alongOffset = offset?.along ?? 0;\n middlewares.push(offsetMiddleware({ mainAxis: awayOffset, crossAxis: alongOffset }));\n\n // Positioning middlewares\n if (parsedPlacement.isAuto) {\n middlewares.push(\n autoPlacement({ ...(boundary ? { boundary } : {}), alignment: parsedPlacement.autoAlignment }),\n );\n } else {\n middlewares.push(flip(boundary ? { boundary } : {}));\n middlewares.push(shift(boundary ? { boundary } : {}));\n }\n\n // Size middleware — always required when any sizing constraint is set\n const anySizeConstraint =\n !!fitWidth || !!fitWithinViewportHeight || width || minWidth || maxWidth || height || minHeight || maxHeight;\n\n if (anySizeConstraint) {\n middlewares.push(\n size({\n ...(boundary ? { boundary } : {}),\n apply({ availableHeight, rects, elements }) {\n const anchorWidth: PXSize = `${rects.reference.width}px`;\n\n // Width: explicit width wins, else fitToAnchorWidth.\n elements.floating.style.width = width || (fitWidth === 'width' ? anchorWidth : '');\n // Min-width: anchor constrained by explicit min-width.\n elements.floating.style.minWidth = cssMax(minWidth, fitWidth === 'minWidth' ? anchorWidth : '');\n // Max-width: anchor constrained by explicit max-width.\n elements.floating.style.maxWidth = cssMin(maxWidth, fitWidth === 'maxWidth' ? anchorWidth : '');\n\n // Height: explicit values only.\n elements.floating.style.height = height || '';\n elements.floating.style.minHeight = minHeight || '';\n // Max-height: viewport combined with explicit max-height.\n const adaptedAvailableHeight: PXSize = `${Math.max(0, availableHeight - ARROW_SIZE)}px`;\n elements.floating.style.maxHeight = cssMin(\n maxHeight,\n fitWithinViewportHeight ? adaptedAvailableHeight : '',\n );\n },\n }),\n );\n }\n\n // Arrow middleware\n if (hasArrow && arrowElement) {\n middlewares.push(arrowMiddleware({ element: arrowElement, padding: ARROW_SIZE / 2 }));\n }\n\n return middlewares;\n}\n","import { type MiddlewareData } from '@floating-ui/dom';\n\n/**\n * Compute arrow CSS styles from floating-ui middleware data.\n */\nexport function computeArrowStyles(arrowData?: MiddlewareData['arrow']): Record<string, string> | undefined {\n if (!arrowData) return undefined;\n return {\n left: arrowData.x != null ? `${arrowData.x}px` : '',\n top: arrowData.y != null ? `${arrowData.y}px` : '',\n };\n}\n","import { type Placement as FloatingPlacement } from '@floating-ui/dom';\nimport { type parseAutoPlacement } from './parseAutoPlacement';\n\n/**\n * Get the floating-ui placement from the parsed placement config.\n * Returns undefined for auto-placement (floating-ui handles it via autoPlacement middleware).\n */\nexport function getFloatingPlacement(\n parsedPlacement: ReturnType<typeof parseAutoPlacement>,\n): FloatingPlacement | undefined {\n return parsedPlacement.isAuto ? undefined : parsedPlacement.floatingPlacement;\n}\n","import { computed, ref, type Ref, type CSSProperties } from 'vue';\n\nimport { useFloating, autoUpdate, type Placement as FloatingPlacement } from '@floating-ui/vue';\n\nimport {\n parseAutoPlacement,\n parseFitWidth,\n buildPopoverMiddleware,\n computeArrowStyles,\n getFloatingPlacement,\n} from '@lumx/core/js/components/Popover/utils';\nimport { type Placement } from '@lumx/core/js/components/Popover/constants';\nimport type { Offset, PopoverSizes } from '@lumx/core/js/components/Popover/types';\n\nexport interface UsePopoverStyleOptions {\n anchorRef: Ref<HTMLElement | undefined>;\n offset?: Ref<Offset | undefined>;\n hasArrow?: Ref<boolean | undefined>;\n fitToAnchorWidth?: Ref<string | boolean | undefined>;\n fitWithinViewportHeight?: Ref<boolean | undefined>;\n width?: Ref<PopoverSizes['width']>;\n minWidth?: Ref<PopoverSizes['minWidth']>;\n maxWidth?: Ref<PopoverSizes['maxWidth']>;\n height?: Ref<PopoverSizes['height']>;\n minHeight?: Ref<PopoverSizes['minHeight']>;\n maxHeight?: Ref<PopoverSizes['maxHeight']>;\n boundaryRef?: Ref<HTMLElement | undefined>;\n placement?: Ref<Placement | undefined>;\n style?: Ref<CSSProperties | undefined>;\n zIndex?: Ref<number | undefined>;\n}\n\nexport interface UsePopoverStyleOutput {\n styles: {\n arrow: Ref<CSSProperties | undefined>;\n popover: Ref<CSSProperties>;\n };\n isPositioned: Ref<boolean>;\n position: Ref<Placement | undefined>;\n floatingRef: Ref<HTMLElement | undefined>;\n arrowRef: Ref<HTMLElement | undefined>;\n}\n\nexport function usePopoverStyle(options: UsePopoverStyleOptions): UsePopoverStyleOutput {\n const floatingRef = ref<HTMLElement | undefined>();\n const arrowRef = ref<HTMLElement | undefined>();\n\n const parsedPlacement = computed(() => parseAutoPlacement(options.placement?.value));\n const fitWidth = computed(() => parseFitWidth(options.fitToAnchorWidth?.value));\n\n const middleware = computed(() =>\n buildPopoverMiddleware({\n offset: options.offset?.value,\n hasArrow: options.hasArrow?.value,\n fitWidth: fitWidth.value,\n fitWithinViewportHeight: options.fitWithinViewportHeight?.value,\n width: options.width?.value,\n minWidth: options.minWidth?.value,\n maxWidth: options.maxWidth?.value,\n height: options.height?.value,\n minHeight: options.minHeight?.value,\n maxHeight: options.maxHeight?.value,\n boundary: options.boundaryRef?.value,\n parsedPlacement: parsedPlacement.value,\n arrowElement: arrowRef.value,\n }),\n );\n\n const floatingPlacement = computed(() => getFloatingPlacement(parsedPlacement.value));\n\n const {\n floatingStyles,\n placement: resolvedPlacement,\n isPositioned,\n middlewareData,\n } = useFloating(options.anchorRef, floatingRef, {\n placement: floatingPlacement as Ref<FloatingPlacement | undefined>,\n whileElementsMounted: autoUpdate,\n middleware,\n });\n\n const position = computed<Placement | undefined>(\n () => (resolvedPlacement.value ?? options.placement?.value) as Placement | undefined,\n );\n\n // Compute arrow styles from middleware data\n const arrowStyles = computed<CSSProperties | undefined>(() => computeArrowStyles(middlewareData.value?.arrow));\n\n // Merge floating styles with user-provided styles and zIndex\n const popoverStyle = computed<CSSProperties>(() => {\n return {\n ...(options.style?.value || {}),\n ...floatingStyles.value,\n zIndex: options.zIndex?.value,\n };\n });\n\n return {\n styles: { arrow: arrowStyles, popover: popoverStyle },\n isPositioned,\n position,\n floatingRef,\n arrowRef,\n };\n}\n","import { ref, watchEffect, isRef, type Ref } from 'vue';\n\n/**\n * Composable focusing an element when defined and `shouldFocus` becomes `true`.\n * Only focuses once per transition to `true` (one-shot).\n *\n * @param elementRef Element to focus (or ref to it).\n * @param shouldFocusRef Boolean flag to trigger the focus (or ref to it).\n */\nexport function useFocus(\n elementRef: Ref<HTMLElement | null | undefined> | HTMLElement | null | undefined,\n shouldFocusRef: Ref<boolean> | boolean = true,\n): void {\n const wasFocused = ref(false);\n\n watchEffect(() => {\n const element = isRef(elementRef) ? elementRef.value : elementRef;\n const shouldFocus = isRef(shouldFocusRef) ? shouldFocusRef.value : shouldFocusRef;\n\n if (shouldFocus && !wasFocused.value && element) {\n element.focus();\n wasFocused.value = true;\n }\n if (!shouldFocus) {\n wasFocused.value = false;\n }\n });\n}\n","import { computed, defineComponent, type Ref, unref, toRef } from 'vue';\n\nimport {\n Popover as PopoverUI,\n type PopoverProps as CorePopoverProps,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Popover';\nimport { type Placement, POPOVER_ZINDEX } from '@lumx/core/js/components/Popover/constants';\nimport type { PopoverSizes } from '@lumx/core/js/components/Popover/types';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { ThemeProvider } from '../../utils/theme/ThemeProvider';\nimport { useCallbackOnEscape } from '../../composables/useCallbackOnEscape';\nimport { useClassName } from '../../composables/useClassName';\nimport { Portal } from '../../utils/Portal/Portal';\nimport { ClickAwayProvider } from '../../utils/ClickAway/ClickAwayProvider';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nimport { usePopoverStyle } from './usePopoverStyle';\nimport { useFocusTrap } from '../../composables/useFocusTrap';\nimport { useFocus } from '../../composables/useFocus';\nimport { useRestoreFocusOnClose } from '../../composables/useRestoreFocusOnClose';\n\n/**\n * Vue Popover props derived from core PopoverProps.\n * Omits framework-specific props and narrows element ref types to raw HTMLElement.\n * `isOpen` is made optional (defaults to false at runtime via keysOf).\n */\nexport type PopoverProps = VueToJSXProps<\n CorePopoverProps,\n 'anchorRef' | 'boundaryRef' | 'focusElement' | 'parentElement' | 'focusTrapZoneElement' | 'isOpen'\n> &\n PopoverSizes & {\n /** Reference to the DOM element used to set the position of the popover. Accepts a Vue Ref for reactive positioning. */\n anchorRef?: Ref<HTMLElement | undefined> | HTMLElement;\n /** Element which will act as boundary when opening the popover. Accepts a Vue Ref for reactive positioning. */\n boundaryRef?: Ref<HTMLElement | undefined> | HTMLElement;\n /** Element to focus when opening the popover. */\n focusElement?: HTMLElement;\n /** Whether the popover is open or not. */\n isOpen?: boolean;\n /** Reference to the parent element that triggered the popover. */\n parentElement?: HTMLElement;\n /** The element in which the focus trap should be set. Default to popover. */\n focusTrapZoneElement?: HTMLElement;\n };\n\nexport const emitSchema = {\n close: () => true,\n};\n\nconst Popover = defineComponent(\n (props: PopoverProps, { emit, slots, attrs }) => {\n const className = useClassName(() => props.class);\n // Unwrap anchorRef (accepts both Vue Ref and raw HTMLElement) — reused across composables\n const anchorRef = computed(() => unref(props.anchorRef));\n // Reused across useFocus and useFocusTrap\n const focusElementRef = toRef(props, 'focusElement');\n\n // Positioning\n const { styles, isPositioned, position, floatingRef, arrowRef } = usePopoverStyle({\n anchorRef: anchorRef as Ref<HTMLElement | undefined>,\n boundaryRef: computed(() => unref(props.boundaryRef)) as Ref<HTMLElement | undefined>,\n offset: toRef(props, 'offset'),\n hasArrow: toRef(props, 'hasArrow'),\n fitToAnchorWidth: toRef(props, 'fitToAnchorWidth'),\n fitWithinViewportHeight: toRef(props, 'fitWithinViewportHeight'),\n width: toRef(props, 'width'),\n minWidth: toRef(props, 'minWidth'),\n maxWidth: toRef(props, 'maxWidth'),\n height: toRef(props, 'height'),\n minHeight: toRef(props, 'minHeight'),\n maxHeight: toRef(props, 'maxHeight'),\n placement: computed(() => props.placement || (DEFAULT_PROPS.placement as Placement)),\n style: computed(() => undefined),\n zIndex: computed(() => props.zIndex ?? POPOVER_ZINDEX),\n });\n\n // Focus restore on close\n useRestoreFocusOnClose(\n computed(() => props.focusAnchorOnClose ?? true),\n anchorRef as Ref<HTMLElement | undefined>,\n computed(() => props.parentElement) as Ref<HTMLElement | undefined>,\n floatingRef,\n computed(() => Boolean(props.isOpen)),\n );\n\n // Close handler using emit\n const handleClose = () => {\n emit('close');\n };\n\n // Escape key handling\n useCallbackOnEscape(\n computed(() => handleClose),\n computed(() => Boolean(props.isOpen && props.closeOnEscape)),\n );\n\n // Focus management\n const shouldFocus = computed(() => !props.withFocusTrap && Boolean(props.isOpen) && isPositioned.value);\n useFocus(focusElementRef, shouldFocus);\n\n // Focus trap\n const focusZoneElement = computed(() => {\n if (!props.withFocusTrap || !props.isOpen) return false as const;\n return props.focusTrapZoneElement || floatingRef.value || false;\n });\n useFocusTrap(focusZoneElement, focusElementRef);\n\n // Click-away refs: popover ref + anchor ref\n const clickAwayRefs = computed(() => [floatingRef, anchorRef]) as Ref<Array<Ref<HTMLElement | undefined>>>;\n\n return () =>\n PopoverUI(\n {\n ...attrs,\n as: props.as,\n closeMode: props.closeMode,\n elevation: props.elevation,\n hasArrow: props.hasArrow,\n usePortal: props.usePortal,\n children: slots.default?.() as JSXElement,\n className: className.value,\n isOpen: Boolean(props.isOpen),\n position: position.value,\n popoverStyle: styles.popover.value,\n arrowStyle: styles.arrow.value,\n theme: props.theme,\n ref: floatingRef,\n arrowRef,\n clickAwayCallback: props.closeOnClickAway ? handleClose : undefined,\n clickAwayRefs,\n },\n { Portal, ClickAwayProvider, ThemeProvider },\n );\n },\n {\n name: 'LumxPopover',\n inheritAttrs: false,\n props: keysOf<PopoverProps>()(\n 'anchorRef',\n 'as',\n 'boundaryRef',\n 'closeMode',\n 'closeOnClickAway',\n 'closeOnEscape',\n 'elevation',\n 'fitToAnchorWidth',\n 'fitWithinViewportHeight',\n 'focusElement',\n 'width',\n 'minWidth',\n 'maxWidth',\n 'height',\n 'minHeight',\n 'maxHeight',\n 'focusAnchorOnClose',\n 'hasArrow',\n 'isOpen',\n 'offset',\n 'parentElement',\n 'placement',\n 'usePortal',\n 'focusTrapZoneElement',\n 'zIndex',\n 'withFocusTrap',\n 'theme',\n 'class',\n ),\n emits: emitSchema,\n },\n);\n\nexport default Popover;\n","import { computed, defineComponent, ref } from 'vue';\n\nimport { useClassName } from '../../composables/useClassName';\n\nimport {\n ComboboxOptionMoreInfo as UI,\n type ComboboxOptionMoreInfoProps as UIProps,\n type ComboboxOptionMoreInfoPropsToOverride,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxOptionMoreInfo';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { IconButton } from '../button';\nimport { Popover } from '../popover';\nimport { useComboboxOptionContext } from './context/ComboboxOptionContext';\nimport { useComboboxEvent } from './context/useComboboxEvent';\n\nexport type ComboboxOptionMoreInfoProps = VueToJSXProps<\n UIProps,\n ComboboxOptionMoreInfoPropsToOverride | 'onMouseEnter' | 'onMouseLeave' | 'buttonProps'\n> & {\n /** Callback when the popover opens or closes. */\n onToggle?: (isOpen: boolean) => void;\n};\n\n/**\n * Combobox.OptionMoreInfo component.\n *\n * Displays an info icon button on a combobox option that shows a popover with additional details.\n * The popover opens on mouse hover over the icon or when the parent option is keyboard-highlighted.\n *\n * Must be placed in the `after` slot of a `Combobox.Option`.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ComboboxOptionMoreInfo = defineComponent(\n (props: ComboboxOptionMoreInfoProps, { slots }) => {\n const mergedClassName = useClassName(() => props.class);\n\n // Ref to the IconButton component instance.\n const iconButtonRef = ref<any>(null);\n\n // Resolved DOM element (<button>) used as the popover anchor.\n const anchorEl = computed<HTMLElement | undefined>(() => iconButtonRef.value?.$el ?? undefined);\n\n const isHovered = ref(false);\n\n // Get the parent option ID from the option context\n const { optionId } = useComboboxOptionContext();\n\n // Subscribe to active descendant changes for keyboard highlight detection\n const activeDescendantId = useComboboxEvent('activeDescendantChange', null);\n\n const popoverId = `${optionId}-more-info`;\n\n /**\n * IconButton adapter (closure) that maps core `onMouseEnter`/`onMouseLeave`\n * → Vue `onMouseenter`/`onMouseleave`\n */\n function IconButtonAdapter(coreProps: any) {\n const { onMouseEnter, onMouseLeave, ...rest } = coreProps;\n return (\n <IconButton\n ref={iconButtonRef}\n {...{ onMouseenter: onMouseEnter, onMouseleave: onMouseLeave }}\n {...rest}\n />\n );\n }\n /**\n * Adapter for Popover (closure): `anchorRef` with the resolved DOM element\n */\n const PopoverAdapter = (coreProps: any, { slots: popoverSlots }: any) => {\n const { anchorRef: _coreAnchorRef, ...rest } = coreProps;\n return (\n <Popover anchorRef={anchorEl} {...rest}>\n {popoverSlots}\n </Popover>\n );\n };\n\n return () => {\n const isKeyboardHighlighted = activeDescendantId.value === optionId;\n const isOpen = isHovered.value || isKeyboardHighlighted;\n const children = slots.default?.() as JSXElement;\n\n return UI(\n {\n // Pass `undefined` for the core template's `ref` prop. The core template\n // passes `ref` to `<IconButton ref={ref}>`, but if we pass `iconButtonRef`\n // here, Vue would bind the outer functional component's VNode ref to\n // the same target, resolving to a Text node (due to Tooltip fragments)\n // and overriding the adapter's inner `ref={iconButtonRef}` binding.\n // By passing `undefined`, the outer VNode has no ref and only the adapter's\n // inner ref binding takes effect.\n ref: undefined,\n className: mergedClassName.value,\n isOpen,\n popoverId,\n children,\n onMouseEnter: () => {\n isHovered.value = true;\n },\n onMouseLeave: () => {\n isHovered.value = false;\n },\n },\n { IconButton: IconButtonAdapter, Popover: PopoverAdapter },\n );\n };\n },\n {\n name: 'LumxComboboxOptionMoreInfo',\n inheritAttrs: false,\n props: keysOf<ComboboxOptionMoreInfoProps>()('class', 'onToggle'),\n emits: {\n toggle: (isOpen: boolean) => typeof isOpen === 'boolean',\n },\n },\n);\n\nexport { COMPONENT_NAME, CLASSNAME };\nexport default ComboboxOptionMoreInfo;\n","import type { CSSProperties } from 'react';\nimport type { LumxClassName, HasTheme, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport type { ColorPalette, TypographyInterface } from '../../constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface SkeletonTypographyProps extends HasTheme, HasClassName {\n /** Typography variant. */\n typography: TypographyInterface;\n /** Width CSS property. */\n width?: CSSProperties['width'];\n /** The color of the skeleton. */\n color?: ColorPalette;\n /** Reference to the root element. */\n ref?: CommonRef;\n /** Style object. */\n style?: CSSProperties;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'SkeletonTypography';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-skeleton-typography';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<SkeletonTypographyProps> = {};\n\n/**\n * SkeletonTypography component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const SkeletonTypography = (props: SkeletonTypographyProps) => {\n const { className, theme, typography, width, color, ref, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n [`typography-${typography}`]: Boolean(typography),\n [`color-${color}`]: Boolean(color),\n }),\n )}\n style={{ ...forwardedProps.style, width }}\n >\n <div className={element('inner')} />\n </div>\n );\n};\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { ListItem } from '../List/ListItem';\nimport { SkeletonTypography } from '../Skeleton/SkeletonTypography';\n\n/**\n * Defines the props for the core ComboboxOptionSkeleton template.\n */\nexport interface ComboboxOptionSkeletonProps extends HasClassName {\n /** Content rendered before the skeleton text (e.g. SkeletonCircle for avatar placeholders). */\n before?: JSXElement;\n /** Content rendered after the skeleton text. */\n after?: JSXElement;\n /** Show a secondary skeleton line (mirrors ComboboxOption's `description` prop). */\n hasDescription?: boolean;\n /** Override the default SkeletonTypography content entirely. */\n children?: JSXElement;\n /** ref to the root <li> element. */\n ref?: CommonRef;\n /**\n * Number of skeleton `<li>` elements to render.\n * Each is an independent element with `:nth-child` width cycling applied by SCSS.\n * @default 1\n */\n count?: number;\n}\n\n/**\n * Props that React/Vue wrappers need to re-declare with framework-specific types.\n * Used by `ReactToJSX<ComboboxOptionSkeletonProps, ComboboxOptionSkeletonPropsToOverride>`.\n */\nexport type ComboboxOptionSkeletonPropsToOverride = 'before' | 'after' | 'children';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxOptionSkeleton';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-option-skeleton';\n\n/**\n * ComboboxOptionSkeleton core template.\n * Renders a skeleton placeholder `<li>` inside a combobox list, styled to match\n * option dimensions. Uses `role=\"none\"` so screen readers ignore it.\n *\n * Width variation across sibling skeletons is handled by SCSS `:nth-child` rules,\n * not by props — the component itself does not need a `width` prop.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ComboboxOptionSkeleton = (props: ComboboxOptionSkeletonProps) => {\n const { hasDescription, children, className, ref, count = 1, ...forwardedProps } = props;\n\n const itemProps = {\n ref,\n size: 'tiny' as const,\n role: 'none',\n ...forwardedProps,\n className: classNames.join(className, CLASSNAME),\n children:\n children ||\n ((\n <>\n <SkeletonTypography typography=\"body1\" theme=\"light\" />\n {hasDescription && <SkeletonTypography typography=\"caption\" theme=\"light\" />}\n </>\n ) as JSXElement),\n };\n\n return (\n <>\n {Array.from({ length: count }, (_, i) => (\n <ListItem key={i} {...itemProps} />\n ))}\n </>\n );\n};\n","import { defineComponent } from 'vue';\n\nimport {\n ComboboxOptionSkeleton as UI,\n type ComboboxOptionSkeletonProps as UIProps,\n type ComboboxOptionSkeletonPropsToOverride,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxOptionSkeleton';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { useClassName } from '../../composables/useClassName';\nimport { useWatchDisposable } from '../../composables/useWatchDisposable';\nimport { useComboboxContext } from './context/ComboboxContext';\n\nexport type ComboboxOptionSkeletonProps = VueToJSXProps<UIProps, ComboboxOptionSkeletonPropsToOverride>;\n\n/**\n * Combobox.OptionSkeleton component — renders skeleton placeholder(s) inside a combobox list.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ComboboxOptionSkeleton = defineComponent(\n (props: ComboboxOptionSkeletonProps, { slots, attrs }) => {\n const className = useClassName(() => props.class);\n const { handle } = useComboboxContext();\n\n // Register once with the combobox handle on mount\n useWatchDisposable(handle, (h) => h?.registerSkeleton());\n\n return () => {\n const before = attrs.before as JSXElement;\n const after = attrs.after as JSXElement;\n const children = slots.default?.() as JSXElement;\n\n return UI({\n ...attrs,\n className: className.value,\n count: props.count,\n before,\n after,\n children,\n } as any);\n };\n },\n {\n name: 'LumxComboboxOptionSkeleton',\n inheritAttrs: false,\n props: keysOf<ComboboxOptionSkeletonProps>()('hasDescription', 'count', 'class'),\n },\n);\n\nexport { COMPONENT_NAME, CLASSNAME };\nexport default ComboboxOptionSkeleton;\n","import { VHSize } from '../../utils/browser/css/types';\n\nexport const DEFAULT_COMBOBOX_POPOVER_MAX_HEIGHT: VHSize = '80vh';\n","import type { HasClassName, JSXElement, LumxClassName } from '../../types';\nimport type { PopoverProps } from '../Popover';\nimport type { PopoverSizes } from '../Popover/types';\nimport { classNames } from '../../utils';\nimport { DEFAULT_COMBOBOX_POPOVER_MAX_HEIGHT } from './constants';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxPopover';\n\n/**\n * Component default class name.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-popover';\nconst { block, element } = classNames.bem(CLASSNAME);\n\ntype InheritedPopoverProps = Pick<\n PopoverProps,\n 'closeOnClickAway' | 'closeOnEscape' | 'fitToAnchorWidth' | 'isOpen' | 'anchorRef' | 'placement' | 'handleClose'\n> &\n PopoverSizes;\n\n/**\n * Defines the props for the core ComboboxPopover template.\n */\nexport interface ComboboxPopoverProps extends HasClassName, InheritedPopoverProps {\n /** Content (should contain a ComboboxList). */\n children?: JSXElement;\n}\n\n/**\n * Injected framework-specific components for ComboboxPopover rendering.\n */\nexport interface ComboboxPopoverComponents {\n /** Popover component (framework-specific). */\n Popover: any;\n /** FlexBox component (framework-specific). */\n FlexBox: any;\n}\n\n/**\n * ComboboxPopover core template.\n * Renders a Popover with combobox-specific defaults (className, closeMode, closeOnClickAway, closeOnEscape).\n *\n * Framework-specific components (Popover) are passed as a second argument\n * by the React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const ComboboxPopover = (props: ComboboxPopoverProps, { Popover, FlexBox }: ComboboxPopoverComponents) => {\n const {\n children,\n className,\n closeOnClickAway = true,\n closeOnEscape = false,\n fitToAnchorWidth = true,\n isOpen,\n maxHeight = DEFAULT_COMBOBOX_POPOVER_MAX_HEIGHT,\n placement = 'bottom-start',\n anchorRef,\n handleClose,\n ...forwardedProps\n } = props;\n\n return (\n <Popover\n {...forwardedProps}\n placement={placement}\n fitToAnchorWidth={fitToAnchorWidth}\n maxHeight={maxHeight}\n className={block([className])}\n anchorRef={anchorRef}\n isOpen={isOpen}\n onClose={handleClose}\n closeOnClickAway={closeOnClickAway}\n closeOnEscape={closeOnEscape}\n closeMode=\"hide\"\n >\n <FlexBox orientation=\"vertical\" className={element('scroll')}>\n {children}\n </FlexBox>\n </Popover>\n );\n};\n","var isArray = require('./isArray');\n\n/**\n * Casts `value` as an array if it's not one.\n *\n * @static\n * @memberOf _\n * @since 4.4.0\n * @category Lang\n * @param {*} value The value to inspect.\n * @returns {Array} Returns the cast array.\n * @example\n *\n * _.castArray(1);\n * // => [1]\n *\n * _.castArray({ 'a': 1 });\n * // => [{ 'a': 1 }]\n *\n * _.castArray('abc');\n * // => ['abc']\n *\n * _.castArray(null);\n * // => [null]\n *\n * _.castArray(undefined);\n * // => [undefined]\n *\n * _.castArray();\n * // => []\n *\n * var array = [1, 2, 3];\n * console.log(_.castArray(array) === array);\n * // => true\n */\nfunction castArray() {\n if (!arguments.length) {\n return [];\n }\n var value = arguments[0];\n return isArray(value) ? value : [value];\n}\n\nmodule.exports = castArray;\n","import castArray from 'lodash/castArray';\n\nimport { Orientation } from '../../constants';\nimport { classNames } from '../../utils';\nimport type { LumxClassName, JSXElement, HasClassName, CommonRef } from '../../types';\nimport type { FlexHorizontalAlignment, FlexVerticalAlignment, GapSize, MarginAutoAlignment } from './types';\n\nexport type * from './types';\n\n/**\n * Defines the props of the component.\n */\nexport interface FlexBoxProps extends HasClassName {\n /** Children elements. */\n children?: JSXElement;\n /** Whether the \"content filling space\" is enabled or not. */\n fillSpace?: boolean;\n /** Gap space between flexbox items. */\n gap?: GapSize;\n /** Flex horizontal alignment. */\n hAlign?: FlexVerticalAlignment;\n /** Whether the \"auto margin\" is enabled all around or not. */\n marginAuto?: MarginAutoAlignment | MarginAutoAlignment[];\n /** Whether the \"content shrink\" is disabled or not. */\n noShrink?: boolean;\n /** Flex direction. */\n orientation?: Orientation;\n /** Flex vertical alignment. */\n vAlign?: FlexHorizontalAlignment;\n /** Whether the \"flex wrap\" is enabled or not. */\n wrap?: boolean;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'FlexBox';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-flex-box';\nexport const { block } = classNames.bem(CLASSNAME);\n\n/**\n * Get FlexBox component props (className computation).\n *\n * @param props Component props.\n * @return Computed props with className.\n */\nexport function getFlexBoxProps(props: FlexBoxProps) {\n const { className, fillSpace, gap, hAlign, marginAuto, noShrink, vAlign, wrap, orientation, ...forwardedProps } =\n props;\n\n const adjustedOrientation = orientation ?? (wrap || hAlign || vAlign ? Orientation.horizontal : null);\n\n return {\n ...forwardedProps,\n className: classNames.join(\n className,\n block({\n [`orientation-${adjustedOrientation}`]: Boolean(adjustedOrientation),\n [`v-align-${vAlign}`]: Boolean(vAlign),\n [`h-align-${hAlign}`]: Boolean(hAlign),\n [`gap-${gap}`]: Boolean(gap),\n wrap: Boolean(wrap),\n 'fill-space': fillSpace,\n 'no-shrink': noShrink,\n ...Object.fromEntries(\n castArray(marginAuto)\n .filter(Boolean)\n .map((align) => [`margin-auto-${align}`, true]),\n ),\n }),\n ),\n };\n}\n","import { defineComponent, useAttrs } from 'vue';\n\nimport {\n getFlexBoxProps,\n type FlexBoxProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n} from '@lumx/core/js/components/FlexBox';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type FlexBoxProps = VueToJSXProps<UIProps, 'vAlign' | 'hAlign'> & {\n /** Customize the root element. */\n as?: string;\n /** FlexBox vertical alignment */\n verticalAlign?: UIProps['vAlign'];\n /** FlexBox horizontal alignment */\n horizontalAlign?: UIProps['hAlign'];\n};\n\nexport { CLASSNAME, COMPONENT_NAME };\n\n/**\n * FlexBox component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst FlexBox = defineComponent(\n (props: FlexBoxProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n return () => {\n // Cast to keyof JSX.IntrinsicElements because Vue TSX doesn't automatically infer\n // that a string variable can be used as a JSX element name with props/children.\n // This tells TypeScript that Component represents a valid HTML element tag name.\n const Component = (props.as || 'div') as keyof JSX.IntrinsicElements;\n const computedProps = getFlexBoxProps({\n ...props,\n ...attrs,\n className: className.value,\n vAlign: props.verticalAlign,\n hAlign: props.horizontalAlign,\n });\n\n return <Component {...computedProps}>{slots.default?.() as JSXElement}</Component>;\n };\n },\n {\n name: 'FlexBox',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<FlexBoxProps>()(\n 'as',\n 'fillSpace',\n 'gap',\n 'horizontalAlign',\n 'marginAuto',\n 'noShrink',\n 'orientation',\n 'verticalAlign',\n 'wrap',\n 'class',\n ),\n },\n);\n\nexport default FlexBox;\n","import { computed, defineComponent } from 'vue';\n\nimport { useClassName } from '../../composables/useClassName';\n\nimport {\n ComboboxPopover as UI,\n type ComboboxPopoverProps as UIProps,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxPopover';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { Popover } from '../popover';\nimport type { PopoverProps } from '../popover/Popover';\nimport { useComboboxContext } from './context/ComboboxContext';\nimport { useComboboxOpen } from './context/useComboboxOpen';\nimport { FlexBox } from '../flex-box';\n\n/**\n * Props type extends the core ComboboxPopover props (via VueToJSXProps) with additional\n * Popover passthrough props. The core type only declares props it explicitly uses;\n * extra Popover props flow through the core template's `...forwardedProps` spread.\n */\nexport type ComboboxPopoverProps = VueToJSXProps<UIProps, 'isOpen' | 'anchorRef'> &\n Partial<Omit<PopoverProps, 'isOpen' | 'anchorRef' | 'onClose' | 'class'>>;\n\n/**\n * Combobox.Popover component - renders a Popover connected to the combobox context.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ComboboxPopover = defineComponent(\n (props: ComboboxPopoverProps, { slots }) => {\n const className = useClassName(() => props.class);\n const { anchorRef } = useComboboxContext();\n const { isOpen, setIsOpen } = useComboboxOpen();\n\n // Adapt anchorRef: Popover expects Ref<HTMLElement | undefined> | HTMLElement\n const popoverAnchorRef = computed(() => anchorRef.value ?? undefined);\n\n return () => {\n const { class: _class, ...popoverProps } = props;\n\n return UI(\n {\n ...popoverProps,\n children: slots.default?.() as JSXElement,\n className: className.value,\n isOpen: isOpen.value,\n anchorRef: popoverAnchorRef as any,\n handleClose: () => setIsOpen(false),\n },\n { Popover, FlexBox },\n );\n };\n },\n {\n name: 'LumxComboboxPopover',\n inheritAttrs: false,\n props: keysOf<ComboboxPopoverProps>()(\n 'as',\n 'boundaryRef',\n 'class',\n 'closeMode',\n 'closeOnClickAway',\n 'closeOnEscape',\n 'elevation',\n 'fitToAnchorWidth',\n 'fitWithinViewportHeight',\n 'focusAnchorOnClose',\n 'width',\n 'minWidth',\n 'maxWidth',\n 'height',\n 'minHeight',\n 'maxHeight',\n 'focusElement',\n 'focusTrapZoneElement',\n 'hasArrow',\n 'offset',\n 'parentElement',\n 'placement',\n 'theme',\n 'usePortal',\n 'withFocusTrap',\n 'zIndex',\n ),\n },\n);\n\nexport { COMPONENT_NAME, CLASSNAME };\nexport default ComboboxPopover;\n","import { defineComponent, onWatcherCleanup, ref, shallowRef, useAttrs, watch } from 'vue';\n\nimport type { ComboboxHandle } from '@lumx/core/js/components/Combobox/types';\n\nimport { useId } from '../../composables/useId';\nimport { provideComboboxContext } from './context/ComboboxContext';\n\n/**\n * Defines the props of the component.\n */\nexport interface ComboboxProviderProps {}\n\n/**\n * Combobox.Provider component.\n *\n * Provides shared context to sub-components. The vanilla JS combobox handle is\n * created by the trigger sub-component (Combobox.Input or Combobox.Button) on mount.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ComboboxProvider = defineComponent(\n (_props: ComboboxProviderProps, { slots, emit }) => {\n const attrs = useAttrs();\n const listboxId = useId();\n const anchorRef = ref<HTMLElement | null>(null);\n const handle = shallowRef<ComboboxHandle | null>(null);\n const setHandle = (h: ComboboxHandle | null) => {\n handle.value = h;\n };\n\n provideComboboxContext({ handle, setHandle, listboxId, anchorRef });\n\n // Subscribe to the combobox open event and forward to the onOpen callback.\n watch(handle, (handleValue) => {\n if (!handleValue) return;\n const unsubscribe = handleValue.subscribe('open', (isOpen) => {\n (attrs.onOpen as any)?.(isOpen);\n emit('open', isOpen);\n });\n onWatcherCleanup(unsubscribe);\n });\n\n return () => slots.default?.();\n },\n {\n name: 'LumxComboboxProvider',\n inheritAttrs: false,\n props: {},\n emits: {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n open: (isOpen: boolean) => true,\n },\n },\n);\n\nexport default ComboboxProvider;\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props for the core ComboboxSection template.\n */\nexport interface ComboboxSectionProps extends HasClassName {\n /** Section label displayed as the group title. Accepts a plain string or custom JSX content. */\n label?: string | JSXElement;\n /** Section icon */\n icon?: string;\n /** Section content (should be ComboboxOption elements). */\n children: JSXElement;\n /** ref to the root element. */\n ref?: CommonRef;\n /**\n * When true, the section renders as a bare `<li hidden>` wrapper, keeping children\n * mounted (so option registrations stay alive) but invisible to the user and screen readers.\n * Set automatically by the React/Vue wrapper when all child options are filtered out.\n */\n hidden?: boolean;\n /**\n * When true, the section is visually rendered (label + content) but hidden from assistive\n * technology. Used for skeleton-only sections: the visual skeleton provides feedback to\n * sighted users, while the live region (`ComboboxState`) handles the loading announcement.\n */\n 'aria-hidden'?: boolean;\n}\n\n/**\n * Props that React/Vue wrappers need to re-declare with framework-specific types.\n * Used by `ReactToJSX<ComboboxSectionProps, ComboboxSectionPropsToOverride>`.\n */\nexport type ComboboxSectionPropsToOverride = 'children';\n\n/**\n * Injected framework-specific components for ComboboxSection rendering.\n */\nexport interface ComboboxSectionComponents {\n /** ListSection component (framework-specific). */\n ListSection: any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxSection';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-section';\n\n/**\n * ComboboxSection core template.\n * Renders a ListSection with combobox-specific ARIA roles.\n *\n * Framework-specific components (ListSection) are passed as a second argument\n * by the React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const ComboboxSection = (props: ComboboxSectionProps, { ListSection }: ComboboxSectionComponents) => {\n const { children, className, hidden, 'aria-hidden': ariaHidden, ...forwardedProps } = props;\n return (\n <ListSection\n {...forwardedProps}\n hidden={hidden}\n aria-hidden={ariaHidden || undefined}\n className={!hidden ? classNames.join(className, CLASSNAME) : undefined}\n role={!ariaHidden ? 'none' : undefined}\n itemsWrapperProps={{ role: 'group' }}\n >\n {children}\n </ListSection>\n );\n};\n","import { defineComponent, useAttrs } from 'vue';\n\nimport { List as ListUI, type ListProps as UIProps } from '@lumx/core/js/components/List';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type ListProps = VueToJSXProps<UIProps>;\n\n/**\n * List component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst List = defineComponent(\n (props: ListProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n return () => (\n <ListUI {...props} {...attrs} className={className.value} children={slots.default?.() as JSXElement} />\n );\n },\n {\n name: 'LumxList',\n inheritAttrs: false,\n props: keysOf<ListProps>()('itemPadding', 'class'),\n },\n);\n\nexport default List;\n","import type { CommonRef, HasClassName, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface ListDividerProps extends HasClassName {\n /** ref to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ListDivider';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-list-divider';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ListDividerProps> = {};\n\n/**\n * ListDivider component.\n * Purely decorative, consider a `ListSection` with label for a better list structure.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ListDivider = (props: ListDividerProps) => {\n const { className, ref, ...forwardedProps } = props;\n\n return <li ref={ref} role=\"none\" {...forwardedProps} className={classNames.join(className, CLASSNAME)} />;\n};\n\nListDivider.displayName = COMPONENT_NAME;\nListDivider.className = CLASSNAME;\nListDivider.defaultProps = DEFAULT_PROPS;\n","import { defineComponent, useAttrs } from 'vue';\n\nimport {\n ListDivider as ListDividerUI,\n type ListDividerProps as UIProps,\n} from '@lumx/core/js/components/List/ListDivider';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type ListDividerProps = VueToJSXProps<UIProps>;\n\n/**\n * ListDivider component.\n * Purely decorative, consider a `ListSection` with label for a better list structure.\n *\n * @return Vue element.\n */\nconst ListDivider = defineComponent(\n (props: ListDividerProps) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n return () => <ListDividerUI {...attrs} className={className.value} />;\n },\n {\n name: 'LumxListDivider',\n inheritAttrs: false,\n props: keysOf<ListDividerProps>()('class'),\n },\n);\n\nexport default ListDivider;\n","import { computed, defineComponent, useAttrs } from 'vue';\n\nimport { ListItemAction as ListItemActionUI } from '@lumx/core/js/components/List/ListItemAction';\nimport type { BaseClickableProps, ClickableElement } from '@lumx/core/js/components/RawClickable';\nimport type { HasClassName, JSXElement } from '@lumx/core/js/types';\n\nimport { classNames } from '@lumx/core/js/utils';\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type ListItemActionProps = VueToJSXProps<BaseClickableProps & HasClassName> & {\n /** Customize the rendered element. */\n as?: ClickableElement;\n /** Link href. */\n href?: string;\n};\n\nexport const emitSchema = {\n click: (event: MouseEvent) => event instanceof MouseEvent,\n};\n\n/**\n * ListItemAction component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ListItemAction = defineComponent(\n (props: ListItemActionProps, { emit, slots }) => {\n const attrs = useAttrs();\n const userClassName = useClassName(() => props.class);\n\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(\n computed(() => ({ ...props, ...attrs })),\n );\n\n const handleClick = (event: any) => {\n if (isAnyDisabled.value) {\n return;\n }\n emit('click', event);\n };\n\n return () => {\n const { className: coreClassName, ...rest } = otherProps.value as any;\n return (\n <ListItemActionUI\n {...rest}\n className={classNames.join(userClassName.value, coreClassName) as string}\n isDisabled={disabledStateProps.value.disabled}\n aria-disabled={disabledStateProps.value['aria-disabled']}\n handleClick={handleClick}\n children={slots.default?.() as JSXElement}\n />\n );\n };\n },\n {\n name: 'LumxListItemAction',\n inheritAttrs: false,\n props: keysOf<ListItemActionProps>()('as', 'href', 'class', 'isDisabled', 'disabled', 'aria-disabled'),\n emits: emitSchema,\n },\n);\n\nexport default ListItemAction;\n","import { computed, defineComponent, toRaw, useAttrs } from 'vue';\n\nimport {\n ListItem as ListItemUI,\n type ListItemProps as UIProps,\n type ListItemSize,\n} from '@lumx/core/js/components/List/ListItem';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { useClassName } from '../../composables/useClassName';\nimport { useHasEventListener } from '../../composables/useHasEventListener';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport ListItemAction from './ListItemAction';\n\nexport type { ListItemSize };\n\nexport type ListItemProps = VueToJSXProps<UIProps, 'after' | 'before' | 'linkRef'>;\n\nexport const emitSchema = {\n click: (event: MouseEvent) => event instanceof MouseEvent,\n};\n\n/**\n * ListItem component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ListItem = defineComponent(\n (props: ListItemProps, { emit, slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n const hasOnClick = useHasEventListener('onClick');\n\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(\n computed(() => ({ ...props, ...attrs })),\n );\n\n const handleClick = (event: any) => {\n if (isAnyDisabled.value) {\n return;\n }\n emit('click', event);\n };\n\n return () => {\n const { linkAs, ...rest } = otherProps.value;\n\n return (\n <ListItemUI\n {...rest}\n className={className.value}\n isDisabled={disabledStateProps.value.disabled}\n aria-disabled={disabledStateProps.value['aria-disabled']}\n linkAs={toRaw(linkAs)}\n handleClick={hasOnClick ? handleClick : undefined}\n before={(slots.before?.() as JSXElement) || undefined}\n after={(slots.after?.() as JSXElement) || undefined}\n children={(slots.default?.() as JSXElement) || undefined}\n />\n );\n };\n },\n {\n name: 'LumxListItem',\n inheritAttrs: false,\n props: keysOf<ListItemProps>()(\n 'isHighlighted',\n 'isSelected',\n 'isDisabled',\n 'linkAs',\n 'linkProps',\n 'size',\n 'class',\n 'aria-disabled',\n ),\n emits: emitSchema,\n },\n);\n\nexport default Object.assign(ListItem, { Action: ListItemAction });\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { Icon } from '../Icon';\nimport { TextProps } from '../Text';\n\n/**\n * Defines the props of the component.\n */\nexport interface ListSectionProps extends HasClassName {\n /** Section label displayed as the group title. Accepts a plain string or custom JSX content. */\n label?: string | JSXElement;\n /** Section icon */\n icon?: string;\n /** List items (should be ListItem, ListDivider, etc.). */\n children: JSXElement;\n /** Items wrapper forwarded props */\n itemsWrapperProps?: Record<string, any>;\n /** ID for the label element (used for aria-labelledby). */\n id: string;\n /** ref to the root element */\n ref?: CommonRef;\n /** Text component to use for rendering the label */\n Text: (props: TextProps & Record<string, any>) => any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ListSection';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-list-section';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ListSectionProps> = {};\n\n/**\n * ListSection component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ListSection = (props: ListSectionProps) => {\n const { children, className, label, icon, itemsWrapperProps, id, ref, Text, ...forwardedProps } = props;\n const labelId = `${id}-label`;\n const hasHeader = !!label;\n\n return (\n <li ref={ref} {...forwardedProps} className={classNames.join(className, block())}>\n {hasHeader && (\n <Text as=\"p\" typography=\"overline\" className={element('title')} id={labelId}>\n {icon && Icon({ icon })}\n {label}\n </Text>\n )}\n <ul {...itemsWrapperProps} className={element('items')} aria-labelledby={hasHeader ? labelId : undefined}>\n {children}\n </ul>\n </li>\n );\n};\n\nListSection.displayName = COMPONENT_NAME;\nListSection.className = CLASSNAME;\nListSection.defaultProps = DEFAULT_PROPS;\n","import { defineComponent, useAttrs } from 'vue';\n\nimport {\n ListSection as ListSectionUI,\n type ListSectionProps as UIProps,\n} from '@lumx/core/js/components/List/ListSection';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { useId } from '../../composables/useId';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { Text } from '../text';\n\nexport type ListSectionProps = VueToJSXProps<UIProps, 'id' | 'Text'>;\n\n/**\n * ListSection component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ListSection = defineComponent(\n (props: ListSectionProps, { slots }) => {\n const attrs = useAttrs();\n const id = useId();\n const className = useClassName(() => props.class);\n\n return () => (\n <ListSectionUI\n {...props}\n {...attrs}\n className={className.value}\n id={id}\n Text={Text as unknown as UIProps['Text']}\n children={slots.default?.() as JSXElement}\n />\n );\n },\n {\n name: 'LumxListSection',\n inheritAttrs: false,\n props: keysOf<ListSectionProps>()('label', 'icon', 'itemsWrapperProps', 'class'),\n },\n);\n\nexport default ListSection;\n","import { defineComponent, reactive, ref } from 'vue';\n\nimport { useClassName } from '../../composables/useClassName';\n\nimport {\n ComboboxSection as UI,\n type ComboboxSectionProps as UIProps,\n type ComboboxSectionPropsToOverride,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxSection';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { useWatchDisposable } from '../../composables/useWatchDisposable';\nimport { ListSection } from '../list';\nimport { useComboboxContext } from './context/ComboboxContext';\n\nexport type ComboboxSectionProps = VueToJSXProps<UIProps, ComboboxSectionPropsToOverride | 'hidden' | 'aria-hidden'>;\n\n/**\n * Combobox.Section component - groups Combobox.Option items under a labelled section.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ComboboxSection = defineComponent(\n (props: ComboboxSectionProps, { slots }) => {\n const className = useClassName(() => props.class);\n const { handle } = useComboboxContext();\n const sectionRef = ref<HTMLElement | null>(null);\n const sectionState = reactive({ hidden: false, 'aria-hidden': false });\n\n // Register with the combobox handle for section state notifications.\n // Watch both handle and sectionRef so registration fires as soon as both are available.\n useWatchDisposable([handle, sectionRef], ([h, element]) => {\n if (h && element) {\n return h.registerSection(element, (state) => {\n sectionState.hidden = state.hidden;\n sectionState['aria-hidden'] = state['aria-hidden'];\n });\n }\n });\n\n const setSectionRef = (el: any) => {\n // When ListSection is used directly (no adapter), `el` is the component instance.\n // Unwrap `$el` to get the root DOM element.\n sectionRef.value = (el?.$el ?? el) as HTMLElement | null;\n };\n\n return () => {\n const children = slots.default?.();\n // Return null when children is empty so the section header is not rendered as an orphan\n if (!children || children.length === 0) return null;\n\n // Use the label slot content as JSX when no label prop is provided.\n const label = (props.label ?? slots.label?.()) as string | JSXElement | undefined;\n\n return UI(\n {\n label,\n icon: props.icon,\n className: className.value,\n hidden: sectionState.hidden,\n 'aria-hidden': sectionState['aria-hidden'] || undefined,\n ref: setSectionRef as any,\n children: children as JSXElement,\n },\n { ListSection },\n );\n };\n },\n {\n name: 'LumxComboboxSection',\n inheritAttrs: false,\n props: keysOf<ComboboxSectionProps>()('label', 'icon', 'class'),\n },\n);\n\nexport { COMPONENT_NAME, CLASSNAME };\nexport default ComboboxSection;\n","import type { LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport type { TextProps } from '../Text';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ComboboxState';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-combobox-state';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Defines the props for the core ComboboxState template.\n */\nexport interface ComboboxStateProps {\n /**\n * Message to display when the list has no visible options.\n * Can be a plain string or a function receiving the current input value (for dynamic messages).\n * When omitted, the empty state is not shown.\n */\n emptyMessage?: string | ((inputValue: string) => string);\n /**\n * Message callback to display the number of available options.\n * Called with the current visible option count and should return a human-readable string\n * (e.g. `(n) => \\`${n} result(s) available\\``).\n * Displayed when the combobox is open, not empty, not loading, and not in error.\n * When omitted, no option count message is shown.\n */\n nbOptionMessage?: (optionsLength: number) => string;\n /**\n * Error state title message.\n * When provided, the error state is active (takes priority over the empty state).\n * When omitted, the error state is not shown.\n */\n errorMessage?: string;\n /**\n * Secondary error message (e.g. \"Please try again\").\n * Only rendered when `errorMessage` is provided.\n */\n errorTryReloadMessage?: string;\n /**\n * Message to announce when loading persists (after a 500ms debounce).\n * When omitted, no loading announcement is made.\n */\n loadingMessage?: string;\n /**\n * List state\n */\n state?: {\n /**\n * The number of currently visible options.\n * Driven by the framework wrapper via the combobox handle's `optionsChange` event.\n */\n optionsLength?: number;\n /**\n * The current value of the combobox input.\n * Passed to `emptyMessage` when it is a function.\n */\n inputValue?: string;\n /**\n * Whether loading is active (immediate, from `loadingChange` event).\n * Used to suppress false \"empty\" state while data is loading.\n */\n isLoading?: boolean;\n /**\n * Whether the combobox popover is open.\n * Used to gate live region content so screen readers announce messages\n * when the popover opens (content insertion triggers `aria-live` announcement).\n */\n isOpen?: boolean;\n };\n}\n\n/**\n * Components injected by the framework wrapper (dependency injection).\n */\nexport interface ComboboxStateComponents {\n /**\n * GenericBlock component (framework-specific, e.g. React GenericBlock with FlexBox handling).\n */\n GenericBlock: any;\n /**\n * Text component (framework-specific, e.g. React Text or Vue Text).\n */\n Text: (props: TextProps) => any;\n}\n\n/**\n * ComboboxState core template.\n * Renders empty/error/option-count state messages inside the combobox popover.\n * The block itself acts as a screen reader live region (`role=\"status\" aria-live=\"polite\"`).\n *\n * Activation rules:\n * - Error state: active when `errorMessage` is provided (presence-based).\n * - Empty state: active when `optionsLength` is 0 and `emptyMessage` is provided, and there is no error.\n * - Option count: active when `nbOptionMessage` is provided, the list is not empty, not loading, and not in error.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element or null when no state is active.\n */\nexport const ComboboxState = (props: ComboboxStateProps, { GenericBlock, Text }: ComboboxStateComponents) => {\n const { emptyMessage, nbOptionMessage, errorMessage, errorTryReloadMessage, loadingMessage, state } = props;\n const isOpen = state?.isOpen ?? true;\n const optionsLength = state?.optionsLength ?? 0;\n const isEmpty = optionsLength === 0;\n const showError = !!errorMessage;\n const resolvedEmptyMessage =\n typeof emptyMessage === 'function' ? emptyMessage(state?.inputValue || '') : emptyMessage;\n // Suppress empty while loading (immediate flag prevents false \"no results\" before data arrives)\n const showEmpty = isEmpty && !showError && !state?.isLoading && !!resolvedEmptyMessage;\n // Show loading message when provided and not in error state.\n // The framework wrapper gates `loadingMessage` via the debounced `loadingAnnouncement` event,\n // passing `undefined` until the 500ms threshold is reached.\n const showLoading = !showError && !!loadingMessage;\n // Show option count message when the list is open, not empty, not loading, and not in error.\n const resolvedNbOptionMessage =\n !isEmpty && !showError && !state?.isLoading && nbOptionMessage ? nbOptionMessage(optionsLength) : undefined;\n const show = showEmpty || showError;\n const alignProps = { hAlign: 'center', vAlign: 'center' };\n\n // Gate message content behind isOpen so that content is *inserted* into the\n // aria-live region when the popover opens, triggering screen reader announcements.\n // Without this gate, content is already present (just hidden via display:none from\n // the popover's closeMode=\"hide\") and revealing it doesn't trigger announcements.\n const renderContent = isOpen;\n\n return (\n <GenericBlock\n className={classNames.join(!show && classNames.visuallyHidden(), block(), classNames.padding('regular'))}\n orientation=\"vertical\"\n {...alignProps}\n role=\"status\"\n aria-live=\"polite\"\n aria-atomic\n >\n {renderContent && showEmpty && (\n <Text as=\"p\" typography=\"body1\" color=\"dark-L2\">\n {resolvedEmptyMessage}\n </Text>\n )}\n {renderContent && showLoading && (\n <Text as=\"p\" typography=\"body1\" color=\"dark-L2\">\n {loadingMessage}\n </Text>\n )}\n {renderContent && !!resolvedNbOptionMessage && (\n <Text as=\"p\" typography=\"body1\" color=\"dark-L2\">\n {resolvedNbOptionMessage}\n </Text>\n )}\n {renderContent && !!errorMessage && (\n <>\n <Text as=\"p\" typography=\"subtitle2\">\n {errorMessage}\n </Text>\n {errorTryReloadMessage && (\n <Text as=\"p\" typography=\"body1\" color=\"dark-L2\">\n {errorTryReloadMessage}\n </Text>\n )}\n </>\n )}\n </GenericBlock>\n );\n};\n","import type { ComboboxHandle } from './types';\n\n/**\n * Delay before inserting content into the aria-live region after the popover opens (ms).\n *\n * The popover uses `closeMode=\"hide\"` (`display:none` when closed), so the live region\n * container is not in the accessibility tree until the popover becomes visible.\n * Screen readers only detect content *changes* in live regions that are already visible.\n * This delay ensures the popover's `display:none` is removed and the accessibility tree\n * is updated before content is inserted, so screen readers reliably announce it.\n */\nconst OPEN_ANNOUNCEMENT_DELAY = 100;\n\n/** Setters invoked by `subscribeComboboxState` when handle events fire. */\nexport interface ComboboxStateSetters {\n /** Called immediately with the current loading state, then on every `loadingChange` event. */\n setIsLoading: (value: boolean) => void;\n /** Called on every `loadingAnnouncement` event (debounced 500ms after skeletons mount). */\n setShouldAnnounce: (value: boolean) => void;\n /** Called with `true` after a short delay when the combobox opens, and `false` immediately on close. */\n setIsOpen: (value: boolean) => void;\n}\n\n/**\n * Subscribe to the combobox handle events needed by `ComboboxState`.\n *\n * Manages three subscriptions:\n * - `loadingChange` → `setIsLoading` (+ synchronous initial read of `handle.isLoading`)\n * - `loadingAnnouncement` → `setShouldAnnounce`\n * - `open` → `setIsOpen` (deferred by {@link OPEN_ANNOUNCEMENT_DELAY}ms on open, immediate on close)\n *\n * @param handle The combobox handle to subscribe to.\n * @param setters Framework-specific state setters.\n * @returns A cleanup function that unsubscribes all events and clears timers.\n */\nexport function subscribeComboboxState(handle: ComboboxHandle, setters: ComboboxStateSetters): () => void {\n const { setIsLoading, setShouldAnnounce, setIsOpen } = setters;\n\n // Read current loading state synchronously\n setIsLoading(handle.isLoading);\n\n const unsubLoadingChange = handle.subscribe('loadingChange', setIsLoading);\n const unsubLoadingAnnouncement = handle.subscribe('loadingAnnouncement', setShouldAnnounce);\n\n let openTimer: ReturnType<typeof setTimeout> | undefined;\n const unsubOpen = handle.subscribe('open', (open) => {\n clearTimeout(openTimer);\n if (open) {\n // Delay content insertion so the popover is visible in the\n // accessibility tree before the live region content changes.\n openTimer = setTimeout(() => setIsOpen(true), OPEN_ANNOUNCEMENT_DELAY);\n } else {\n // Reset immediately on close\n setIsOpen(false);\n }\n });\n\n return () => {\n unsubLoadingChange();\n unsubLoadingAnnouncement();\n unsubOpen();\n clearTimeout(openTimer);\n };\n}\n","import type { CommonRef, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { Orientation, Size } from '../../constants';\n\nimport { GenericBlockGapSize } from './constants';\nimport { FlexBoxProps } from '../FlexBox';\n\nexport interface GenericBlockProps extends FlexBoxProps {\n /**\n * Component to use as visual element.\n */\n figure?: JSXElement;\n /**\n * Main content.\n */\n content?: JSXElement;\n /**\n * Actions to set after the main content.\n */\n actions?: JSXElement;\n /**\n * Orientation of the 3 sections\n */\n orientation?: FlexBoxProps['orientation'];\n /**\n * Horizontal alignment.\n */\n horizontalAlign?: FlexBoxProps['hAlign'];\n /**\n * Vertical alignment.\n */\n verticalAlign?: FlexBoxProps['vAlign'];\n /**\n * The props to forward to the content.\n * By default, the content will have the same alignment as wrapper.\n */\n contentProps?: Omit<FlexBoxProps, 'children'>;\n /**\n * props to forward to the actions element.\n */\n actionsProps?: Omit<FlexBoxProps, 'children'>;\n /**\n * props to forward to the figure element.\n */\n figureProps?: Omit<FlexBoxProps, 'children'>;\n /**\n * FlexBox component\n */\n FlexBox: (props: FlexBoxProps) => any;\n /**\n * Gap space between sections.\n */\n gap?: GenericBlockGapSize;\n /**\n * reference to the root element\n */\n ref?: CommonRef;\n}\n\nexport interface GenericBlockSectionProps extends FlexBoxProps {\n /**\n * Gap space between items.\n */\n gap?: GenericBlockGapSize;\n}\n\nexport type GenericBlockPropsToOverride = 'FlexBox' | 'content';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'GenericBlock';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-generic-block';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<GenericBlockProps> = {\n gap: Size.big,\n orientation: Orientation.horizontal,\n};\n\n/**\n * The GenericBlock is a layout component made of 3 sections that can be\n * displayed either horizontally of vertically with the same gap between each section.\n *\n * The sections are:\n * - `Figure` => A visual element to display before the main content.\n * - `Content` => The main content displayed\n * - `Actions` => One or more actions to set after the element.\n *\n * @see https://www.figma.com/file/lzzrQmsfaXRaOyRfoEogPZ/DS%3A-playground?node-id=1%3A4076\n */\nexport const GenericBlock = (props: GenericBlockProps) => {\n const {\n className,\n figure,\n figureProps,\n children,\n actions,\n actionsProps,\n gap = DEFAULT_PROPS.gap,\n ref,\n content,\n orientation = DEFAULT_PROPS.orientation,\n contentProps,\n FlexBox,\n ...forwardedProps\n } = props;\n\n return (\n <FlexBox\n ref={ref}\n className={classNames.join(className, block())}\n gap={gap}\n orientation={orientation}\n {...forwardedProps}\n >\n {figure && (\n <FlexBox {...figureProps} className={classNames.join(figureProps?.className, element('figure'))}>\n {figure}\n </FlexBox>\n )}\n\n {content && (\n <FlexBox\n orientation={Orientation.vertical}\n fillSpace\n {...contentProps}\n className={classNames.join(contentProps?.className, element('content'))}\n >\n {content}\n </FlexBox>\n )}\n\n {actions && (\n <FlexBox {...actionsProps} className={classNames.join(actionsProps?.className, element('actions'))}>\n {actions}\n </FlexBox>\n )}\n </FlexBox>\n );\n};\n","import { type CSSProperties, defineComponent, useAttrs } from 'vue';\n\nimport {\n GenericBlock as GenericBlockUI,\n type GenericBlockProps as UIProps,\n GenericBlockPropsToOverride,\n} from '@lumx/core/js/components/GenericBlock';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { FlexBox as FlexBoxVue, FlexBoxProps } from '../flex-box';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\n/** FlexBox section props extended with standard HTML style. */\ntype SectionProps = FlexBoxProps & { style?: CSSProperties };\n\n// Follow Vue FlexBox convention: expose verticalAlign/horizontalAlign instead of vAlign/hAlign.\n// figure, actions and content are handled via named slots only (not as VNode props).\nexport type GenericBlockProps = VueToJSXProps<\n UIProps,\n | GenericBlockPropsToOverride\n | 'figure'\n | 'actions'\n | 'vAlign'\n | 'hAlign'\n | 'actionsProps'\n | 'contentProps'\n | 'figureProps'\n> & {\n /** Customize the root element tag. */\n as?: string;\n /** Vertical alignment (maps to core's vAlign). */\n verticalAlign?: UIProps['vAlign'];\n /** Horizontal alignment (maps to core's hAlign). */\n horizontalAlign?: UIProps['hAlign'];\n /**\n * The props to forward to the content.\n * By default, the content will have the same alignment as wrapper.\n */\n contentProps?: SectionProps;\n /**\n * props to forward to the actions element.\n */\n actionsProps?: SectionProps;\n /**\n * props to forward to the figure element.\n */\n figureProps?: SectionProps;\n};\n\n/**\n * The GenericBlock is a layout component made of 3 sections that can be\n * displayed either horizontally or vertically with the same gap between each section.\n *\n * The sections are provided via named slots:\n * - `figure` slot => A visual element to display before the main content.\n * - default slot => The main content displayed.\n * - `actions` slot => One or more actions to set after the element.\n */\nconst GenericBlock = defineComponent(\n (props: GenericBlockProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n return () => {\n const figure = slots.figure?.() as JSXElement;\n const content = slots.default?.() as JSXElement;\n const actions = slots.actions?.() as JSXElement;\n\n // Forward alignment to sub-sections (like the React wrapper does with alignProps).\n // verticalAlign/horizontalAlign are in {…props} spread, and FlexBoxVue declares them,\n // so they propagate correctly through forwardedProps → injected FlexBoxVue.\n const alignProps = {\n verticalAlign: props.verticalAlign,\n horizontalAlign: props.horizontalAlign,\n };\n\n // Destructure `class` out of props so it isn't forwarded as-is to GenericBlockUI\n // (which would reach FlexBoxVue as both `class` and `className`, causing FlexBoxVue\n // to prefer `class` over the merged `className` that includes the BEM block class).\n const { class: _, ...restProps } = props;\n\n return (\n <GenericBlockUI\n {...restProps}\n {...attrs}\n className={className.value as string}\n FlexBox={FlexBoxVue as any}\n figure={figure}\n content={content}\n actions={actions}\n figureProps={{ ...alignProps, ...(props.figureProps as any) }}\n contentProps={{ ...alignProps, ...(props.contentProps as any) }}\n actionsProps={{ ...alignProps, ...(props.actionsProps as any) }}\n />\n );\n };\n },\n {\n name: 'LumxGenericBlock',\n inheritAttrs: false,\n props: keysOf<GenericBlockProps>()(\n 'as',\n 'orientation',\n 'verticalAlign',\n 'horizontalAlign',\n 'gap',\n 'fillSpace',\n 'wrap',\n 'marginAuto',\n 'noShrink',\n 'figureProps',\n 'contentProps',\n 'actionsProps',\n 'class',\n ),\n },\n);\n\nexport default GenericBlock;\n","var baseGetTag = require('./_baseGetTag'),\n isObjectLike = require('./isObjectLike');\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && baseGetTag(value) == symbolTag);\n}\n\nmodule.exports = isSymbol;\n","var isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used to match property names within property paths. */\nvar reIsDeepProp = /\\.|\\[(?:[^[\\]]*|([\"'])(?:(?!\\1)[^\\\\]|\\\\.)*?\\1)\\]/,\n reIsPlainProp = /^\\w*$/;\n\n/**\n * Checks if `value` is a property name and not a property path.\n *\n * @private\n * @param {*} value The value to check.\n * @param {Object} [object] The object to query keys on.\n * @returns {boolean} Returns `true` if `value` is a property name, else `false`.\n */\nfunction isKey(value, object) {\n if (isArray(value)) {\n return false;\n }\n var type = typeof value;\n if (type == 'number' || type == 'symbol' || type == 'boolean' ||\n value == null || isSymbol(value)) {\n return true;\n }\n return reIsPlainProp.test(value) || !reIsDeepProp.test(value) ||\n (object != null && value in Object(object));\n}\n\nmodule.exports = isKey;\n","var getNative = require('./_getNative');\n\n/* Built-in method references that are verified to be native. */\nvar nativeCreate = getNative(Object, 'create');\n\nmodule.exports = nativeCreate;\n","var nativeCreate = require('./_nativeCreate');\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n this.size = 0;\n}\n\nmodule.exports = hashClear;\n","/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n var result = this.has(key) && delete this.__data__[key];\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = hashDelete;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\nmodule.exports = hashGet;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);\n}\n\nmodule.exports = hashHas;\n","var nativeCreate = require('./_nativeCreate');\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n this.size += this.has(key) ? 0 : 1;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\nmodule.exports = hashSet;\n","var hashClear = require('./_hashClear'),\n hashDelete = require('./_hashDelete'),\n hashGet = require('./_hashGet'),\n hashHas = require('./_hashHas'),\n hashSet = require('./_hashSet');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\nmodule.exports = Hash;\n","/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n this.size = 0;\n}\n\nmodule.exports = listCacheClear;\n","/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\nmodule.exports = eq;\n","var eq = require('./eq');\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\nmodule.exports = assocIndexOf;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype;\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n --this.size;\n return true;\n}\n\nmodule.exports = listCacheDelete;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\nmodule.exports = listCacheGet;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\nmodule.exports = listCacheHas;\n","var assocIndexOf = require('./_assocIndexOf');\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n ++this.size;\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\nmodule.exports = listCacheSet;\n","var listCacheClear = require('./_listCacheClear'),\n listCacheDelete = require('./_listCacheDelete'),\n listCacheGet = require('./_listCacheGet'),\n listCacheHas = require('./_listCacheHas'),\n listCacheSet = require('./_listCacheSet');\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\nmodule.exports = ListCache;\n","var Hash = require('./_Hash'),\n ListCache = require('./_ListCache'),\n Map = require('./_Map');\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.size = 0;\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\nmodule.exports = mapCacheClear;\n","/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\nmodule.exports = isKeyable;\n","var isKeyable = require('./_isKeyable');\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\nmodule.exports = getMapData;\n","var getMapData = require('./_getMapData');\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n var result = getMapData(this, key)['delete'](key);\n this.size -= result ? 1 : 0;\n return result;\n}\n\nmodule.exports = mapCacheDelete;\n","var getMapData = require('./_getMapData');\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\nmodule.exports = mapCacheGet;\n","var getMapData = require('./_getMapData');\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\nmodule.exports = mapCacheHas;\n","var getMapData = require('./_getMapData');\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n var data = getMapData(this, key),\n size = data.size;\n\n data.set(key, value);\n this.size += data.size == size ? 0 : 1;\n return this;\n}\n\nmodule.exports = mapCacheSet;\n","var mapCacheClear = require('./_mapCacheClear'),\n mapCacheDelete = require('./_mapCacheDelete'),\n mapCacheGet = require('./_mapCacheGet'),\n mapCacheHas = require('./_mapCacheHas'),\n mapCacheSet = require('./_mapCacheSet');\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries == null ? 0 : entries.length;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\nmodule.exports = MapCache;\n","var MapCache = require('./_MapCache');\n\n/** Error message constants. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `clear`, `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver != null && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result) || cache;\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Expose `MapCache`.\nmemoize.Cache = MapCache;\n\nmodule.exports = memoize;\n","var memoize = require('./memoize');\n\n/** Used as the maximum memoize cache size. */\nvar MAX_MEMOIZE_SIZE = 500;\n\n/**\n * A specialized version of `_.memoize` which clears the memoized function's\n * cache when it exceeds `MAX_MEMOIZE_SIZE`.\n *\n * @private\n * @param {Function} func The function to have its output memoized.\n * @returns {Function} Returns the new memoized function.\n */\nfunction memoizeCapped(func) {\n var result = memoize(func, function(key) {\n if (cache.size === MAX_MEMOIZE_SIZE) {\n cache.clear();\n }\n return key;\n });\n\n var cache = result.cache;\n return result;\n}\n\nmodule.exports = memoizeCapped;\n","var memoizeCapped = require('./_memoizeCapped');\n\n/** Used to match property names within property paths. */\nvar rePropName = /[^.[\\]]+|\\[(?:(-?\\d+(?:\\.\\d+)?)|([\"'])((?:(?!\\2)[^\\\\]|\\\\.)*?)\\2)\\]|(?=(?:\\.|\\[\\])(?:\\.|\\[\\]|$))/g;\n\n/** Used to match backslashes in property paths. */\nvar reEscapeChar = /\\\\(\\\\)?/g;\n\n/**\n * Converts `string` to a property path array.\n *\n * @private\n * @param {string} string The string to convert.\n * @returns {Array} Returns the property path array.\n */\nvar stringToPath = memoizeCapped(function(string) {\n var result = [];\n if (string.charCodeAt(0) === 46 /* . */) {\n result.push('');\n }\n string.replace(rePropName, function(match, number, quote, subString) {\n result.push(quote ? subString.replace(reEscapeChar, '$1') : (number || match));\n });\n return result;\n});\n\nmodule.exports = stringToPath;\n","var Symbol = require('./_Symbol'),\n arrayMap = require('./_arrayMap'),\n isArray = require('./isArray'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/** Used to convert symbols to primitives and strings. */\nvar symbolProto = Symbol ? Symbol.prototype : undefined,\n symbolToString = symbolProto ? symbolProto.toString : undefined;\n\n/**\n * The base implementation of `_.toString` which doesn't convert nullish\n * values to empty strings.\n *\n * @private\n * @param {*} value The value to process.\n * @returns {string} Returns the string.\n */\nfunction baseToString(value) {\n // Exit early for strings to avoid a performance hit in some environments.\n if (typeof value == 'string') {\n return value;\n }\n if (isArray(value)) {\n // Recursively convert values (susceptible to call stack limits).\n return arrayMap(value, baseToString) + '';\n }\n if (isSymbol(value)) {\n return symbolToString ? symbolToString.call(value) : '';\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = baseToString;\n","var baseToString = require('./_baseToString');\n\n/**\n * Converts `value` to a string. An empty string is returned for `null`\n * and `undefined` values. The sign of `-0` is preserved.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {string} Returns the converted string.\n * @example\n *\n * _.toString(null);\n * // => ''\n *\n * _.toString(-0);\n * // => '-0'\n *\n * _.toString([1, 2, 3]);\n * // => '1,2,3'\n */\nfunction toString(value) {\n return value == null ? '' : baseToString(value);\n}\n\nmodule.exports = toString;\n","var isArray = require('./isArray'),\n isKey = require('./_isKey'),\n stringToPath = require('./_stringToPath'),\n toString = require('./toString');\n\n/**\n * Casts `value` to a path array if it's not one.\n *\n * @private\n * @param {*} value The value to inspect.\n * @param {Object} [object] The object to query keys on.\n * @returns {Array} Returns the cast property path array.\n */\nfunction castPath(value, object) {\n if (isArray(value)) {\n return value;\n }\n return isKey(value, object) ? [value] : stringToPath(toString(value));\n}\n\nmodule.exports = castPath;\n","var isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0;\n\n/**\n * Converts `value` to a string key if it's not a string or symbol.\n *\n * @private\n * @param {*} value The value to inspect.\n * @returns {string|symbol} Returns the key.\n */\nfunction toKey(value) {\n if (typeof value == 'string' || isSymbol(value)) {\n return value;\n }\n var result = (value + '');\n return (result == '0' && (1 / value) == -INFINITY) ? '-0' : result;\n}\n\nmodule.exports = toKey;\n","var castPath = require('./_castPath'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.get` without support for default values.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path of the property to get.\n * @returns {*} Returns the resolved value.\n */\nfunction baseGet(object, path) {\n path = castPath(path, object);\n\n var index = 0,\n length = path.length;\n\n while (object != null && index < length) {\n object = object[toKey(path[index++])];\n }\n return (index && index == length) ? object : undefined;\n}\n\nmodule.exports = baseGet;\n","var defineProperty = require('./_defineProperty');\n\n/**\n * The base implementation of `assignValue` and `assignMergeValue` without\n * value checks.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction baseAssignValue(object, key, value) {\n if (key == '__proto__' && defineProperty) {\n defineProperty(object, key, {\n 'configurable': true,\n 'enumerable': true,\n 'value': value,\n 'writable': true\n });\n } else {\n object[key] = value;\n }\n}\n\nmodule.exports = baseAssignValue;\n","var baseAssignValue = require('./_baseAssignValue'),\n eq = require('./eq');\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Assigns `value` to `key` of `object` if the existing value is not equivalent\n * using [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * for equality comparisons.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {string} key The key of the property to assign.\n * @param {*} value The value to assign.\n */\nfunction assignValue(object, key, value) {\n var objValue = object[key];\n if (!(hasOwnProperty.call(object, key) && eq(objValue, value)) ||\n (value === undefined && !(key in object))) {\n baseAssignValue(object, key, value);\n }\n}\n\nmodule.exports = assignValue;\n","/** Used as references for various `Number` constants. */\nvar MAX_SAFE_INTEGER = 9007199254740991;\n\n/** Used to detect unsigned integer values. */\nvar reIsUint = /^(?:0|[1-9]\\d*)$/;\n\n/**\n * Checks if `value` is a valid array-like index.\n *\n * @private\n * @param {*} value The value to check.\n * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.\n * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.\n */\nfunction isIndex(value, length) {\n var type = typeof value;\n length = length == null ? MAX_SAFE_INTEGER : length;\n\n return !!length &&\n (type == 'number' ||\n (type != 'symbol' && reIsUint.test(value))) &&\n (value > -1 && value % 1 == 0 && value < length);\n}\n\nmodule.exports = isIndex;\n","var assignValue = require('./_assignValue'),\n castPath = require('./_castPath'),\n isIndex = require('./_isIndex'),\n isObject = require('./isObject'),\n toKey = require('./_toKey');\n\n/**\n * The base implementation of `_.set`.\n *\n * @private\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @param {Function} [customizer] The function to customize path creation.\n * @returns {Object} Returns `object`.\n */\nfunction baseSet(object, path, value, customizer) {\n if (!isObject(object)) {\n return object;\n }\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n lastIndex = length - 1,\n nested = object;\n\n while (nested != null && ++index < length) {\n var key = toKey(path[index]),\n newValue = value;\n\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return object;\n }\n\n if (index != lastIndex) {\n var objValue = nested[key];\n newValue = customizer ? customizer(objValue, key, nested) : undefined;\n if (newValue === undefined) {\n newValue = isObject(objValue)\n ? objValue\n : (isIndex(path[index + 1]) ? [] : {});\n }\n }\n assignValue(nested, key, newValue);\n nested = nested[key];\n }\n return object;\n}\n\nmodule.exports = baseSet;\n","var baseGet = require('./_baseGet'),\n baseSet = require('./_baseSet'),\n castPath = require('./_castPath');\n\n/**\n * The base implementation of `_.pickBy` without support for iteratee shorthands.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @param {Function} predicate The function invoked per property.\n * @returns {Object} Returns the new object.\n */\nfunction basePickBy(object, paths, predicate) {\n var index = -1,\n length = paths.length,\n result = {};\n\n while (++index < length) {\n var path = paths[index],\n value = baseGet(object, path);\n\n if (predicate(value, path)) {\n baseSet(result, castPath(path, object), value);\n }\n }\n return result;\n}\n\nmodule.exports = basePickBy;\n","/**\n * The base implementation of `_.hasIn` without support for deep paths.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {Array|string} key The key to check.\n * @returns {boolean} Returns `true` if `key` exists, else `false`.\n */\nfunction baseHasIn(object, key) {\n return object != null && key in Object(object);\n}\n\nmodule.exports = baseHasIn;\n","var castPath = require('./_castPath'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray'),\n isIndex = require('./_isIndex'),\n isLength = require('./isLength'),\n toKey = require('./_toKey');\n\n/**\n * Checks if `path` exists on `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @param {Function} hasFunc The function to check properties.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n */\nfunction hasPath(object, path, hasFunc) {\n path = castPath(path, object);\n\n var index = -1,\n length = path.length,\n result = false;\n\n while (++index < length) {\n var key = toKey(path[index]);\n if (!(result = object != null && hasFunc(object, key))) {\n break;\n }\n object = object[key];\n }\n if (result || ++index != length) {\n return result;\n }\n length = object == null ? 0 : object.length;\n return !!length && isLength(length) && isIndex(key, length) &&\n (isArray(object) || isArguments(object));\n}\n\nmodule.exports = hasPath;\n","var baseHasIn = require('./_baseHasIn'),\n hasPath = require('./_hasPath');\n\n/**\n * Checks if `path` is a direct or inherited property of `object`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Object\n * @param {Object} object The object to query.\n * @param {Array|string} path The path to check.\n * @returns {boolean} Returns `true` if `path` exists, else `false`.\n * @example\n *\n * var object = _.create({ 'a': _.create({ 'b': 2 }) });\n *\n * _.hasIn(object, 'a');\n * // => true\n *\n * _.hasIn(object, 'a.b');\n * // => true\n *\n * _.hasIn(object, ['a', 'b']);\n * // => true\n *\n * _.hasIn(object, 'b');\n * // => false\n */\nfunction hasIn(object, path) {\n return object != null && hasPath(object, path, baseHasIn);\n}\n\nmodule.exports = hasIn;\n","var basePickBy = require('./_basePickBy'),\n hasIn = require('./hasIn');\n\n/**\n * The base implementation of `_.pick` without support for individual\n * property identifiers.\n *\n * @private\n * @param {Object} object The source object.\n * @param {string[]} paths The property paths to pick.\n * @returns {Object} Returns the new object.\n */\nfunction basePick(object, paths) {\n return basePickBy(object, paths, function(value, path) {\n return hasIn(object, path);\n });\n}\n\nmodule.exports = basePick;\n","/**\n * Appends the elements of `values` to `array`.\n *\n * @private\n * @param {Array} array The array to modify.\n * @param {Array} values The values to append.\n * @returns {Array} Returns `array`.\n */\nfunction arrayPush(array, values) {\n var index = -1,\n length = values.length,\n offset = array.length;\n\n while (++index < length) {\n array[offset + index] = values[index];\n }\n return array;\n}\n\nmodule.exports = arrayPush;\n","var Symbol = require('./_Symbol'),\n isArguments = require('./isArguments'),\n isArray = require('./isArray');\n\n/** Built-in value references. */\nvar spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined;\n\n/**\n * Checks if `value` is a flattenable `arguments` object or array.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is flattenable, else `false`.\n */\nfunction isFlattenable(value) {\n return isArray(value) || isArguments(value) ||\n !!(spreadableSymbol && value && value[spreadableSymbol]);\n}\n\nmodule.exports = isFlattenable;\n","var arrayPush = require('./_arrayPush'),\n isFlattenable = require('./_isFlattenable');\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nmodule.exports = baseFlatten;\n","var baseFlatten = require('./_baseFlatten');\n\n/**\n * Flattens `array` a single level deep.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to flatten.\n * @returns {Array} Returns the new flattened array.\n * @example\n *\n * _.flatten([1, [2, [3, [4]], 5]]);\n * // => [1, 2, [3, [4]], 5]\n */\nfunction flatten(array) {\n var length = array == null ? 0 : array.length;\n return length ? baseFlatten(array, 1) : [];\n}\n\nmodule.exports = flatten;\n","var flatten = require('./flatten'),\n overRest = require('./_overRest'),\n setToString = require('./_setToString');\n\n/**\n * A specialized version of `baseRest` which flattens the rest array.\n *\n * @private\n * @param {Function} func The function to apply a rest parameter to.\n * @returns {Function} Returns the new function.\n */\nfunction flatRest(func) {\n return setToString(overRest(func, undefined, flatten), func + '');\n}\n\nmodule.exports = flatRest;\n","var basePick = require('./_basePick'),\n flatRest = require('./_flatRest');\n\n/**\n * Creates an object composed of the picked `object` properties.\n *\n * @static\n * @since 0.1.0\n * @memberOf _\n * @category Object\n * @param {Object} object The source object.\n * @param {...(string|string[])} [paths] The property paths to pick.\n * @returns {Object} Returns the new object.\n * @example\n *\n * var object = { 'a': 1, 'b': '2', 'c': 3 };\n *\n * _.pick(object, ['a', 'c']);\n * // => { 'a': 1, 'c': 3 }\n */\nvar pick = flatRest(function(object, paths) {\n return object == null ? {} : basePick(object, paths);\n});\n\nmodule.exports = pick;\n","import pick from 'lodash/pick';\nimport { Size } from '../../constants';\nimport { ValueOf } from '../../types';\n\n/**\n * Accepted gap sizes for the generic block.\n */\nexport const GenericBlockGapSize = pick(Size, ['tiny', 'regular', 'medium', 'big', 'huge']);\nexport type GenericBlockGapSize = ValueOf<typeof GenericBlockGapSize>;\n","import { defineComponent, ref } from 'vue';\n\nimport {\n ComboboxState as UI,\n type ComboboxStateProps as UIProps,\n COMPONENT_NAME,\n CLASSNAME,\n} from '@lumx/core/js/components/Combobox/ComboboxState';\nimport { subscribeComboboxState } from '@lumx/core/js/components/Combobox/subscribeComboboxState';\n\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { useWatchDisposable } from '../../composables/useWatchDisposable';\nimport { GenericBlock } from '../generic-block';\nimport { Text } from '../text';\nimport { useComboboxContext } from './context/ComboboxContext';\nimport { useComboboxEvent } from './context/useComboboxEvent';\n\nexport type ComboboxStateProps = VueToJSXProps<UIProps, 'state'>;\n\n/**\n * Combobox.State component - displays empty and error states for the combobox list.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ComboboxState = defineComponent(\n (props: ComboboxStateProps) => {\n const { handle } = useComboboxContext();\n const optionsState = useComboboxEvent('optionsChange', undefined);\n const isLoading = ref(false);\n const shouldAnnounce = ref(false);\n const isOpen = ref(false);\n\n useWatchDisposable(handle, (h) => {\n if (h) {\n return subscribeComboboxState(h, {\n setIsLoading: (v) => {\n isLoading.value = v;\n },\n setShouldAnnounce: (v) => {\n shouldAnnounce.value = v;\n },\n setIsOpen: (v) => {\n isOpen.value = v;\n },\n });\n }\n });\n\n return () => {\n const state = { ...optionsState.value, isLoading: isLoading.value, isOpen: isOpen.value };\n // Only pass loadingMessage to core after the 500ms debounce threshold\n const loadingMessage = shouldAnnounce.value ? props.loadingMessage : undefined;\n\n return UI(\n {\n emptyMessage: props.emptyMessage,\n nbOptionMessage: props.nbOptionMessage,\n errorMessage: props.errorMessage,\n errorTryReloadMessage: props.errorTryReloadMessage,\n loadingMessage,\n state,\n },\n { GenericBlock, Text: Text as any },\n );\n };\n },\n {\n name: 'LumxComboboxState',\n inheritAttrs: false,\n props: keysOf<ComboboxStateProps>()(\n 'emptyMessage',\n 'nbOptionMessage',\n 'errorMessage',\n 'errorTryReloadMessage',\n 'loadingMessage',\n 'class',\n ),\n },\n);\n\nexport { COMPONENT_NAME, CLASSNAME };\nexport default ComboboxState;\n","import ComboboxButton from './ComboboxButton';\nimport ComboboxInput from './ComboboxInput';\nimport ComboboxList from './ComboboxList';\nimport ComboboxOption from './ComboboxOption';\nimport ComboboxOptionAction from './ComboboxOptionAction';\nimport ComboboxOptionMoreInfo from './ComboboxOptionMoreInfo';\nimport ComboboxOptionSkeleton from './ComboboxOptionSkeleton';\nimport ComboboxPopover from './ComboboxPopover';\nimport ComboboxProvider from './ComboboxProvider';\nimport ComboboxSection from './ComboboxSection';\nimport ComboboxState from './ComboboxState';\nimport { ListDivider } from '../list';\n\nexport type { ComboboxProviderProps } from './ComboboxProvider';\nexport type { ComboboxListProps } from './ComboboxList';\nexport type { ComboboxPopoverProps } from './ComboboxPopover';\nexport type { ComboboxButtonProps } from './ComboboxButton';\nexport type { ComboboxInputProps } from './ComboboxInput';\nexport type { ComboboxOptionProps } from './ComboboxOption';\nexport type { ComboboxOptionActionProps } from './ComboboxOptionAction';\nexport type { ComboboxOptionMoreInfoProps } from './ComboboxOptionMoreInfo';\nexport type { ComboboxOptionSkeletonProps } from './ComboboxOptionSkeleton';\nexport type { ComboboxSectionProps } from './ComboboxSection';\nexport type { ComboboxStateProps } from './ComboboxState';\n\nexport type { ComboboxButtonLabelDisplayMode } from '@lumx/core/js/components/Combobox/ComboboxButton';\nexport type { ComboboxListType } from '@lumx/core/js/components/Combobox/ComboboxList';\nexport type { ComboboxHandle, ComboboxCallbacks } from '@lumx/core/js/components/Combobox/types';\n\n/**\n * Combobox compound component namespace.\n */\nexport const Combobox = {\n /** Provides shared combobox context (handle, listbox ID, anchor ref) to all sub-components. */\n Provider: ComboboxProvider,\n /** Button trigger for select-only combobox mode with keyboard navigation and typeahead. */\n Button: ComboboxButton,\n /** Text input trigger for autocomplete combobox mode with optional toggle button and filtering. */\n Input: ComboboxInput,\n /** Listbox container that registers with the combobox handle and tracks loading state. */\n List: ComboboxList,\n /** Selectable option item with filtering and keyboard navigation support. */\n Option: ComboboxOption,\n /** Secondary action button within a grid-mode option row, rendered as an independent gridcell. */\n OptionAction: ComboboxOptionAction,\n /** Info button on an option that shows a popover on hover or keyboard highlight. */\n OptionMoreInfo: ComboboxOptionMoreInfo,\n /** Loading placeholder skeleton(s) that auto-register loading state with the combobox handle. */\n OptionSkeleton: ComboboxOptionSkeleton,\n /** Floating popover container that auto-binds to the combobox anchor and open/close state. */\n Popover: ComboboxPopover,\n /** Labelled group of options that auto-hides when all its child options are filtered out. */\n Section: ComboboxSection,\n /** Displays empty, error, and loading state messages for the combobox list. */\n State: ComboboxState,\n /** Visual separator between option groups (alias for ListDivider). Purely decorative — invisible to screen readers. */\n Divider: ListDivider,\n};\n","import { ColorPalette } from '../../constants';\nimport type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface BadgeProps extends HasClassName {\n /** Badge content. */\n children?: JSXElement;\n /** Color variant. */\n color?: ColorPalette;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Badge';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-badge';\n\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<BadgeProps> = {\n color: ColorPalette.primary,\n};\n\n/**\n * Badge component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Badge = (props: BadgeProps) => {\n const { children, className, color = DEFAULT_PROPS.color, ref, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`color-${color}`]: Boolean(color),\n }),\n )}\n >\n {children}\n </div>\n );\n};\n\nBadge.displayName = COMPONENT_NAME;\nBadge.className = CLASSNAME;\nBadge.defaultProps = DEFAULT_PROPS;\n","import { defineComponent, useAttrs } from 'vue';\n\nimport { Badge as BadgeUI, type BadgeProps as UIProps } from '@lumx/core/js/components/Badge';\nimport { type JSXElement } from '@lumx/core/js/types';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type BadgeProps = VueToJSXProps<UIProps>;\n\n/**\n * Badge component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Badge = defineComponent(\n (props: BadgeProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n return () => (\n <BadgeUI {...props} {...attrs} className={className.value} children={slots.default?.() as JSXElement} />\n );\n },\n {\n name: 'LumxBadge',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<BadgeProps>()('color', 'class'),\n },\n);\n\nexport default Badge;\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\nexport interface BadgeWrapperProps extends HasClassName {\n /** Badge element to display */\n badge?: JSXElement;\n /** Content to wrap with badge */\n children?: JSXElement;\n /** Ref forwarding */\n ref?: CommonRef;\n}\n\nexport const COMPONENT_NAME = 'BadgeWrapper';\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-badge-wrapper';\nexport const DEFAULT_PROPS: Partial<BadgeWrapperProps> = {};\n\nconst { block, element } = classNames.bem(CLASSNAME);\n\nexport const BadgeWrapper = (props: BadgeWrapperProps) => {\n const { badge, children, className, ref, ...forwardedProps } = props;\n\n return (\n <div ref={ref} {...forwardedProps} className={classNames.join(className, block())}>\n {children}\n {badge && <div className={element('badge')}>{badge}</div>}\n </div>\n );\n};\n","import { defineComponent, useAttrs } from 'vue';\nimport {\n BadgeWrapper as BadgeWrapperUI,\n type BadgeWrapperProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Badge/BadgeWrapper';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nexport type BadgeWrapperProps = VueToJSXProps<UIProps>;\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\nconst BadgeWrapper = defineComponent(\n (props: BadgeWrapperProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n return () => {\n return (\n <BadgeWrapperUI\n {...props}\n {...attrs}\n className={className.value}\n badge={(props.badge || slots.badge?.()) as JSXElement}\n children={slots.default?.() as JSXElement}\n />\n );\n };\n },\n {\n name: 'LumxBadgeWrapper',\n inheritAttrs: false,\n props: keysOf<BadgeWrapperProps>()('badge', 'class'),\n },\n);\n\nexport default BadgeWrapper;\n","import { mdiCheck, mdiMinus } from '@lumx/icons';\n\nimport type {\n JSXElement,\n LumxClassName,\n HasTheme,\n HasAriaDisabled,\n HasDisabled,\n HasClassName,\n HasChecked,\n CommonRef,\n} from '../../types';\nimport { classNames } from '../../utils';\nimport { Icon } from '../Icon';\nimport { InputLabel } from '../InputLabel';\nimport { InputHelper } from '../InputHelper';\n\n/**\n * Intermediate state of checkbox.\n */\nexport const INTERMEDIATE_STATE = 'intermediate';\n\n/**\n * Defines the props of the component.\n */\nexport interface CheckboxProps\n extends HasTheme,\n HasClassName,\n HasAriaDisabled,\n HasDisabled,\n HasChecked<boolean | 'intermediate'> {\n /** Helper text. */\n helper?: string;\n /** Native input id property. */\n id?: string;\n /** Label text. */\n label?: JSXElement;\n /** Native input name property. */\n name?: string;\n /** Native input value property. */\n value?: string;\n /** optional props for input */\n inputProps?: Record<string, any>;\n /** Native input ref. */\n inputRef?: CommonRef;\n /** Native input id. */\n inputId: string;\n /** On change callback. */\n handleChange?(isChecked: boolean, value?: string, name?: string, event?: any): void;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Checkbox';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-checkbox';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<CheckboxProps> = {};\n\n/**\n * Checkbox component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Checkbox = (props: CheckboxProps) => {\n const {\n checked,\n className,\n helper,\n id,\n inputRef,\n isChecked = checked,\n label,\n name,\n ref,\n handleChange,\n theme,\n value,\n inputProps = {},\n isDisabled,\n inputId,\n ...forwardedProps\n } = props;\n\n const intermediateState = isChecked === INTERMEDIATE_STATE;\n\n const handleOnChange = (event: any) => {\n if (handleChange) {\n handleChange(!isChecked, value, name, event);\n }\n };\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n // Whether state is intermediate class name will \"-checked\"\n 'is-checked': intermediateState ? true : isChecked,\n 'is-disabled': isDisabled,\n 'is-unchecked': !isChecked,\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n <div className={element('input-wrapper')}>\n <input\n ref={inputRef}\n type=\"checkbox\"\n id={inputId}\n className={element('input-native')}\n name={name}\n value={value}\n checked={isChecked as boolean}\n onChange={handleOnChange}\n aria-describedby={helper ? `${inputId}-helper` : undefined}\n aria-checked={intermediateState ? 'mixed' : Boolean(isChecked)}\n {...(inputProps?.readOnly ? { readOnly: inputProps.readOnly } : {})}\n {...inputProps}\n />\n\n <div className={element('input-placeholder')}>\n <div className={element('input-background')} />\n\n <div className={element('input-indicator')}>\n {Icon({ icon: intermediateState ? mdiMinus : mdiCheck })}\n </div>\n </div>\n </div>\n\n <div className={element('content')}>\n {label && InputLabel({ htmlFor: inputId, className: element('label'), theme, children: label })}\n {helper &&\n InputHelper({ id: `${inputId}-helper`, className: element('helper'), theme, children: helper })}\n </div>\n </div>\n );\n};\n","import { computed, defineComponent, ref, useAttrs, watch } from 'vue';\n\nimport {\n Checkbox as CheckboxUI,\n type CheckboxProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n INTERMEDIATE_STATE,\n} from '@lumx/core/js/components/Checkbox';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { useId } from '../../composables/useId';\n\nexport type CheckboxProps = VueToJSXProps<UIProps, 'inputId' | 'inputRef'>;\n\nexport const emitSchema = {\n change: (isChecked: boolean, value?: string, name?: string, event?: Event) =>\n typeof isChecked === 'boolean' && event instanceof Event,\n};\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS, INTERMEDIATE_STATE };\n\n/**\n * Checkbox component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Checkbox = defineComponent(\n (props: CheckboxProps, { emit }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n const generatedInputId = useId();\n const inputId = computed(() => props.id || generatedInputId);\n const localInputRef = ref<HTMLInputElement | null>(null);\n\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(\n computed(() => ({ ...props, ...attrs })),\n );\n\n const intermediateState = computed(() => props.isChecked === INTERMEDIATE_STATE);\n\n // Handle indeterminate property on the native input element\n watch(\n intermediateState,\n (isIntermediate) => {\n if (localInputRef.value) {\n localInputRef.value.indeterminate = isIntermediate;\n }\n },\n { immediate: true },\n );\n\n const handleChange = (isChecked: boolean, value?: string, name?: string, event?: any) => {\n if (isAnyDisabled.value) {\n return;\n }\n\n emit('change', isChecked, value, name, event);\n };\n\n return () => {\n return (\n <CheckboxUI\n {...otherProps.value}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n inputId={inputId.value}\n inputRef={localInputRef}\n isDisabled={isAnyDisabled.value}\n handleChange={handleChange}\n label={props.label}\n inputProps={{\n ...props.inputProps,\n ...disabledStateProps.value,\n readOnly: disabledStateProps.value['aria-disabled'],\n }}\n />\n );\n };\n },\n {\n name: 'Checkbox',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<CheckboxProps>()(\n 'checked',\n 'class',\n 'disabled',\n 'helper',\n 'id',\n 'inputProps',\n 'isChecked',\n 'isDisabled',\n 'label',\n 'name',\n 'theme',\n 'value',\n 'aria-disabled',\n ),\n emits: emitSchema,\n },\n);\n\nexport default Checkbox;\n","import { ColorPalette, Size, Theme } from '../../constants';\nimport {\n HasTheme,\n HasAriaDisabled,\n JSXElement,\n LumxClassName,\n HasClassName,\n HasDisabled,\n CommonRef,\n GenericProps,\n} from '../../types';\nimport { classNames, onEnterPressed } from '../../utils';\n\n/**\n * Chip sizes.\n */\nexport type ChipSize = Extract<Size, 's' | 'm'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ChipProps extends HasClassName, HasDisabled, HasTheme, HasAriaDisabled {\n /** A component to be rendered after the content. */\n after?: JSXElement;\n /** A component to be rendered before the content. */\n before?: JSXElement;\n /** Color variant. */\n color?: ColorPalette;\n /** Whether the component is clickable or not. */\n isClickable?: boolean;\n /** Whether the chip is currently in a highlighted state or not. */\n isHighlighted?: boolean;\n /** Whether the component is selected or not. */\n isSelected?: boolean;\n /** Size variant. */\n size?: ChipSize;\n /** href for the chip if it is a link */\n href?: string;\n /** reference to the root element */\n ref?: CommonRef;\n /** On \"after\" element clicked callback. */\n handleAfterClick?: (event: any) => void;\n /** On element key down callback. */\n handleKeyDown?: (event: any) => void;\n /** On \"before\" element clicked callback. */\n handleBeforeClick?: (event: any) => void;\n /** On element clicked callback. */\n handleClick?: (event: any) => void;\n /** name of the prop for handling key down events */\n keyDownProp?: string;\n /** name of the prop for tab index */\n tabIndexProp?: string;\n /** Children */\n children?: JSXElement;\n /** Props to apply when the component is in a disabled state. */\n disabledStateProps: GenericProps;\n /** Whether the \"after\" element has a click handler. */\n hasAfterClick?: boolean;\n /** Whether the \"before\" element has a click handler. */\n hasBeforeClick?: boolean;\n /** Whether the component has a main click handler. */\n hasOnClick?: boolean;\n /** Whether any part of the component is disabled. */\n isAnyDisabled?: boolean;\n}\n\nexport type ChipPropsToOverride =\n | 'disabledStateProps'\n | 'hasOnClick'\n | 'hasBeforeClick'\n | 'hasAfterClick'\n | 'before'\n | 'after'\n | 'keyDownProp'\n | 'tabIndexProp'\n | 'isAnyDisabled';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Chip';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-chip';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ChipProps> = {\n size: Size.m,\n};\n\n/**\n * Chip component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Chip = (props: ChipProps) => {\n const {\n after,\n before,\n children,\n className,\n color,\n isClickable: propIsClickable,\n isHighlighted,\n isSelected,\n handleAfterClick,\n handleBeforeClick,\n handleClick,\n hasAfterClick,\n hasBeforeClick,\n hasOnClick,\n size = DEFAULT_PROPS.size,\n theme,\n ref,\n href,\n handleKeyDown,\n disabledStateProps,\n isAnyDisabled,\n keyDownProp = 'onKeyDown',\n tabIndexProp = 'tabIndex',\n ...forwardedProps\n } = props;\n const isButton = hasOnClick && !href;\n const isClickable = Boolean(hasOnClick) || Boolean(href) || propIsClickable;\n\n // Adapt color to the theme.\n const chipColor = color || (theme === Theme.light ? ColorPalette.dark : ColorPalette.light);\n\n const handleOnKeyDown = (evt: any) => {\n handleKeyDown?.(evt);\n\n if (hasOnClick && handleClick) {\n onEnterPressed(handleClick)(evt);\n }\n };\n\n const compatibilityProps = {\n [keyDownProp]: handleOnKeyDown,\n [tabIndexProp]: isClickable && !disabledStateProps.disabled ? 0 : undefined,\n };\n\n return (\n // eslint-disable-next-line jsx-a11y/no-static-element-interactions\n <a\n role={isButton ? 'button' : undefined}\n {...compatibilityProps}\n {...forwardedProps}\n href={!disabledStateProps.disabled ? href : undefined}\n ref={ref}\n className={classNames.join(\n className,\n block({\n 'is-clickable': isClickable,\n [`color-${chipColor}`]: Boolean(chipColor),\n 'is-disabled': isAnyDisabled,\n 'has-after': Boolean(after),\n 'has-before': Boolean(before),\n 'is-highlighted': Boolean(isHighlighted),\n 'is-selected': Boolean(isSelected),\n [`size-${size}`]: Boolean(size),\n 'is-unselected': Boolean(!isSelected),\n }),\n )}\n aria-disabled={(isClickable && isAnyDisabled) || undefined}\n onClick={hasOnClick ? handleClick : undefined}\n >\n {before && (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions\n <div\n className={element('before', {\n 'is-clickable': hasBeforeClick,\n })}\n onClick={handleBeforeClick}\n >\n {before}\n </div>\n )}\n <div className={element('label')}>{children}</div>\n {after && (\n // eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions\n <div\n className={element('after', {\n 'is-clickable': hasAfterClick,\n })}\n onClick={handleAfterClick}\n >\n {after}\n </div>\n )}\n </a>\n );\n};\n","import { computed, defineComponent, useAttrs, useSlots } from 'vue';\n\nimport {\n Chip as ChipUI,\n type ChipProps as UIProps,\n type ChipPropsToOverride,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Chip';\nimport { JSXElement } from '@lumx/core/js/types';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { useHasEventListener } from '../../composables/useHasEventListener';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type ChipProps = VueToJSXProps<UIProps, ChipPropsToOverride>;\n\nexport const emitSchema = {\n click: (event: MouseEvent) => event instanceof MouseEvent,\n afterClick: (event: MouseEvent) => event instanceof MouseEvent,\n beforeClick: (event: MouseEvent) => event instanceof MouseEvent,\n keydown: (event: KeyboardEvent) => event instanceof KeyboardEvent,\n};\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * Chip component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Chip = defineComponent(\n (props: ChipProps, { emit }) => {\n const slots = useSlots();\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n const hasOnClick = useHasEventListener('onClick');\n const hasAfterClick = useHasEventListener('onAfterClick');\n const hasBeforeClick = useHasEventListener('onBeforeClick');\n\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(\n computed(() => ({ ...props, ...attrs })),\n );\n\n const handleClick = (event: MouseEvent) => {\n if (isAnyDisabled.value) {\n return;\n }\n\n emit('click', event);\n };\n\n const handleAfterClick = (event: MouseEvent) => {\n if (isAnyDisabled.value) {\n return;\n }\n\n emit('afterClick', event);\n event?.stopPropagation();\n };\n\n const handleBeforeClick = (event: MouseEvent) => {\n if (isAnyDisabled.value) {\n return;\n }\n\n emit('beforeClick', event);\n event?.stopPropagation();\n };\n\n const handleKeyDown = (event: KeyboardEvent) => {\n if (isAnyDisabled.value) {\n return;\n }\n\n emit('keydown', event);\n };\n\n return () => (\n <ChipUI\n {...otherProps.value}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n handleClick={handleClick as any}\n handleAfterClick={handleAfterClick as any}\n handleBeforeClick={handleBeforeClick as any}\n handleKeyDown={handleKeyDown as any}\n hasOnClick={hasOnClick}\n hasAfterClick={hasAfterClick}\n hasBeforeClick={hasBeforeClick}\n isAnyDisabled={isAnyDisabled.value}\n disabledStateProps={disabledStateProps.value}\n before={((slots.before?.() || attrs.before) as JSXElement) || undefined}\n after={((slots.after?.() || attrs.after) as JSXElement) || undefined}\n children={(slots.default?.() as JSXElement) || undefined}\n keyDownProp=\"onKeydown\"\n tabIndexProp=\"tabindex\"\n />\n );\n },\n {\n name: 'LumxChip',\n inheritAttrs: false,\n props: keysOf<ChipProps>()(\n 'color',\n 'href',\n 'isClickable',\n 'isDisabled',\n 'isHighlighted',\n 'isSelected',\n 'size',\n 'theme',\n 'class',\n 'aria-disabled',\n 'disabled',\n ),\n emits: emitSchema,\n },\n);\n\nexport default Chip;\n","import { HorizontalAlignment } from '../../constants';\nimport type { JSXElement, LumxClassName, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface ChipGroupProps extends HasClassName {\n /**\n * Chip horizontal alignment.\n * @deprecated\n */\n align?: HorizontalAlignment;\n /** Children */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ChipGroup';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-chip-group';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ChipGroupProps> = {};\n\n/**\n * ChipGroup component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ChipGroup = (props: ChipGroupProps) => {\n const { children, className, ref, ...forwardedProps } = props;\n\n return (\n <div ref={ref} {...forwardedProps} className={classNames.join(className, CLASSNAME)}>\n {children}\n </div>\n );\n};\n","import { defineComponent, useAttrs } from 'vue';\nimport { ChipGroup as ChipGroupUI, type ChipGroupProps as UIProps } from '@lumx/core/js/components/Chip/ChipGroup';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { JSXElement } from '@lumx/core/js/types';\n\nexport type ChipGroupProps = VueToJSXProps<UIProps, never>;\n\nconst ChipGroup = defineComponent(\n (props: ChipGroupProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n return () => (\n <ChipGroupUI {...props} {...attrs} className={className.value} children={slots.default?.() as JSXElement} />\n );\n },\n {\n name: 'LumxChipGroup',\n inheritAttrs: false,\n props: keysOf<ChipGroupProps>()('align', 'class'),\n },\n);\n\nexport default ChipGroup;\n","import { mdiClose } from '@lumx/icons';\n\nimport type { LumxClassName, HasClassName, HasTheme } from '../../types';\nimport type { Selector } from '../../types/Selector';\nimport { classNames } from '../../utils';\nimport { getWithSelector } from '../../utils/selectors';\nimport type { ChipProps } from '.';\n\n/**\n * Framework-specific components injected by React/Vue wrappers.\n */\nexport interface SelectionChipGroupComponents {\n Chip: any;\n ChipGroup: any;\n Icon: any;\n Text: any;\n Tooltip: any;\n}\n\n/**\n * Props that consumers can override per chip via getChipProps.\n * Excludes internal/framework props that the core always controls.\n */\nexport type ChipOverrideProps = Pick<\n ChipProps,\n 'isDisabled' | 'color' | 'isHighlighted' | 'isSelected' | 'className' | 'before' | 'after'\n>;\n\n/**\n * Defines the props of the component.\n */\nexport interface SelectionChipGroupProps<O> extends HasClassName, HasTheme {\n /** Option object id selector (either a property name or a function to get the id) */\n getOptionId: Selector<O>;\n /** Option object name selector. Falls back to the id if not defined */\n getOptionName?: Selector<O, string | undefined | null>;\n /** Selected options array */\n value?: O[];\n /** Label for accessibility (aria-label on the listbox) */\n label: string;\n /** Label for the remove action (visually hidden text appended to each chip) */\n chipRemoveLabel?: string;\n /** Disabled state for all chips */\n isDisabled?: boolean;\n /** Customize chip props per option */\n getChipProps?: (option: O) => Partial<ChipProps>;\n /** Ref for the container element */\n ref?: any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'SelectionChipGroup';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-selection-chip-group';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * SelectionChipGroup component.\n * Renders a listbox of removable selection chips using component injection for framework-agnostic rendering.\n *\n * @param props Component props.\n * @param components Framework-specific components injected by the wrapper (Chip, ChipGroup, Icon, Tooltip).\n * @return JSX element, or null when value is empty.\n */\nexport const SelectionChipGroup = <O,>(\n props: SelectionChipGroupProps<O>,\n { Chip, ChipGroup, Icon, Text, Tooltip }: SelectionChipGroupComponents,\n) => {\n const {\n value,\n getOptionId,\n getOptionName,\n label,\n chipRemoveLabel,\n isDisabled,\n theme,\n className,\n getChipProps,\n ref,\n ...forwardedProps\n } = props;\n\n if (!value || value.length === 0) return null;\n\n return (\n <ChipGroup\n {...forwardedProps}\n ref={ref}\n role=\"listbox\"\n aria-label={label}\n aria-multiselectable=\"true\"\n aria-orientation=\"horizontal\"\n className={block([className])}\n >\n {value.map((v) => {\n const name = (getOptionName && getWithSelector(getOptionName, v)) || getWithSelector(getOptionId, v);\n const id = getWithSelector(getOptionId, v);\n\n // Merge custom overrides with defaults\n const customProps = getChipProps?.(v) || {};\n const chipIsDisabled = customProps.isDisabled || isDisabled;\n const chipName = typeof customProps.children === 'string' ? customProps.children : name;\n const ariaLabel = chipRemoveLabel ? `${chipName} - ${chipRemoveLabel}` : chipName;\n\n return (\n <Tooltip key={id} label={!chipIsDisabled ? ariaLabel : undefined}>\n <Chip\n aria-label={ariaLabel}\n {...customProps}\n size=\"s\"\n after={<Icon icon={mdiClose} />}\n className={element('chip', [customProps.className])}\n data-option-id={id}\n isClickable\n role=\"option\"\n aria-selected=\"true\"\n theme={theme}\n isDisabled={chipIsDisabled}\n >\n <Text as=\"span\" truncate>\n {customProps.children || name}\n </Text>\n </Chip>\n </Tooltip>\n );\n })}\n </ChipGroup>\n );\n};\n","import { CLASSNAME as CHIP_CLASSNAME } from '.';\nimport type { Selector } from '../../types/Selector';\nimport { createSelectorTreeWalker } from '../../utils/browser/createSelectorTreeWalker';\nimport { getWithSelector } from '../../utils/selectors';\n\n/** CSS selector for enabled chips (not aria-disabled). */\nconst ENABLED_CHIP_SELECTOR = `.${CHIP_CLASSNAME}:not([aria-disabled=\"true\"])`;\n\n/** Find the closest chip element from an event target. */\nconst getChip = (target: EventTarget | null) =>\n (target as HTMLElement | null)?.closest?.<HTMLElement>(`.${CHIP_CLASSNAME}`) || null;\n\n/** Whether the chip is marked as disabled via aria-disabled. */\nconst isChipDisabled = (chip: HTMLElement | null) => chip?.getAttribute('aria-disabled') === 'true';\n\n/**\n * Options for setting up selection chip group event handlers.\n * All option accessors are wrapped in getters so that React/Vue can provide\n * reactive values without the core needing to know about reactivity systems.\n */\nexport interface SetupSelectionChipGroupEventsOptions<O> {\n /** Getter for the current selected options array. */\n getValue: () => O[] | undefined;\n /** Getter for the option id selector. */\n getOptionId: Selector<O>;\n /** Callback when the option array changes. */\n onChange: (newValue?: O[]) => void;\n /** Getter for the chip group container element. */\n getContainer: () => HTMLElement | null | undefined;\n /** Getter for the associated input element (optional). */\n getInput?: () => HTMLInputElement | null | undefined;\n}\n\n/**\n * Find the nearest enabled chip in the given direction relative to `anchor`.\n *\n * - When `anchor` is provided, walks one step in `direction` from it.\n * - When `anchor` is omitted, returns the first enabled chip from the matching\n * end of the container (last chip for 'previous', first for 'next').\n */\nfunction findSiblingChip(\n container: HTMLElement,\n direction: 'next' | 'previous',\n anchor?: Element | null,\n): HTMLElement | undefined {\n const walker = createSelectorTreeWalker(container, ENABLED_CHIP_SELECTOR);\n\n if (anchor) {\n walker.currentNode = anchor;\n const node = direction === 'next' ? walker.nextNode() : walker.previousNode();\n return (node as HTMLElement) || undefined;\n }\n\n // No anchor: walk from the matching end of the container.\n if (direction === 'previous') {\n let last: HTMLElement | undefined;\n while (walker.nextNode()) {\n last = walker.currentNode as HTMLElement;\n }\n return last;\n }\n return (walker.nextNode() as HTMLElement) || undefined;\n}\n\n/** Remove an option by its id and call onChange. */\nfunction removeOption<O>(options: SetupSelectionChipGroupEventsOptions<O>, optionId: string) {\n const value = options.getValue();\n if (!value) return;\n\n const index = value.findIndex((item) => String(getWithSelector(options.getOptionId, item)) === optionId);\n if (index === -1) return;\n\n const newValue = [...value];\n newValue.splice(index, 1);\n options.onChange(newValue);\n}\n\n/**\n * Attach delegated click and keydown event listeners on the chip group container,\n * and optionally an input backspace handler.\n *\n * Uses addEventListener on the container element. Events bubble up from individual\n * chips, so there is no need to re-attach listeners when chips change.\n *\n * @returns A cleanup function that removes all attached event listeners.\n */\nexport function setupSelectionChipGroupEvents<O>(options: SetupSelectionChipGroupEventsOptions<O>): () => void {\n const container = options.getContainer();\n if (!container) return () => {};\n\n // Delegated click handler on the chip group container.\n const handleClick = (evt: Event) => {\n const chip = getChip(evt.target);\n const optionId = chip?.dataset.optionId;\n if (optionId == null || isChipDisabled(chip)) {\n return;\n }\n\n evt.stopImmediatePropagation();\n removeOption(options, optionId);\n };\n\n // Delegated keydown handler on the chip group container.\n const handleKeyDown = (evt: KeyboardEvent) => {\n const chip = getChip(evt.target);\n const optionId = chip?.dataset.optionId;\n const activatingKey = evt.key === 'Enter' || evt.key === ' ' || evt.key === 'Backspace';\n if (optionId == null || !activatingKey || isChipDisabled(chip)) {\n return;\n }\n\n // Compute focus fallback target before removing the chip.\n let focusTarget: HTMLElement | undefined;\n if (evt.key === 'Backspace') {\n // Custom behavior (not WAI-ARIA recommendation) => focus the previous chip, fallback on input (no more chips)\n focusTarget = findSiblingChip(container, 'previous', chip) || options.getInput?.() || undefined;\n } else {\n // WAI-ARIA recommendation when removing an option in a listbox => focus the next chip, fallback on previous chip\n // (bonus: we fallback on input when there is no more chips)\n focusTarget =\n findSiblingChip(container, 'next', chip) ||\n findSiblingChip(container, 'previous', chip) ||\n options.getInput?.() ||\n undefined;\n }\n if (focusTarget) {\n focusTarget.focus();\n focusTarget.setAttribute('tabindex', '0');\n }\n\n evt.preventDefault();\n removeOption(options, optionId);\n };\n\n container.addEventListener('click', handleClick);\n container.addEventListener('keydown', handleKeyDown);\n\n // Attach input backspace handler if an input is provided.\n const input = options.getInput?.();\n let inputHandler: ((evt: KeyboardEvent) => void) | undefined;\n if (input) {\n inputHandler = (evt: KeyboardEvent) => {\n const backspacePressed = evt.key === 'Backspace';\n const cursorAtStart = input.selectionStart === 0 && input.selectionEnd === 0;\n\n if (!backspacePressed || !cursorAtStart) return;\n\n evt.stopPropagation();\n evt.preventDefault();\n\n const lastChip = findSiblingChip(container, 'previous');\n lastChip?.focus();\n };\n input.addEventListener('keydown', inputHandler);\n }\n\n // Return cleanup function.\n return () => {\n container.removeEventListener('click', handleClick);\n container.removeEventListener('keydown', handleKeyDown);\n if (input && inputHandler) {\n input.removeEventListener('keydown', inputHandler);\n }\n };\n}\n","import { type Ref, watchEffect } from 'vue';\n\nimport { setupRovingTabIndex } from '@lumx/core/js/utils/focusNavigation';\n\nexport interface UseRovingTabIndexContainerOptions {\n /** Ref to the container element holding the focusable items. */\n containerRef: Ref<HTMLElement | null | undefined>;\n /** CSS selector to identify focusable items within the container. */\n itemSelector: string;\n /** Callback invoked when an item receives focus via keyboard navigation. */\n onItemFocused?: (item: HTMLElement) => void;\n /**\n * Primary navigation axis — determines which arrow keys navigate.\n * Default: 'horizontal' (ArrowLeft/ArrowRight).\n */\n direction?: 'horizontal' | 'vertical';\n /**\n * CSS selector matching disabled items within the container.\n * Disabled items are skipped during keyboard navigation.\n */\n itemDisabledSelector?: string;\n /**\n * Attribute name indicating the selected item (e.g. `'aria-selected'`, `'aria-checked'`).\n * When set, the roving tabindex will keep `tabindex=\"0\"` in sync with the item\n * whose attribute value is `\"true\"`.\n * Default: `'aria-selected'`.\n */\n itemSelectedAttr?: string;\n}\n\n/**\n * Vue composable equivalent of React's useRovingTabIndexContainer.\n * Sets up roving tab index keyboard navigation on a container element.\n * Automatically tears down when the container is removed or the composable is unmounted.\n */\nexport function useRovingTabIndexContainer({\n containerRef,\n itemSelector,\n onItemFocused,\n direction,\n itemDisabledSelector,\n itemSelectedAttr,\n}: UseRovingTabIndexContainerOptions): void {\n watchEffect((onCleanup) => {\n const container = containerRef.value;\n if (!container) return;\n\n const abortController = new AbortController();\n setupRovingTabIndex(\n { container, itemSelector, direction, itemDisabledSelector, itemSelectedAttr, onItemFocused },\n abortController.signal,\n );\n\n onCleanup(() => abortController.abort());\n });\n}\n","import { type Component, type VNode, isVNode } from 'vue';\n\n/**\n * Returns a type guard that checks whether a VNode was created from a specific component.\n * Vue equivalent of `@lumx/react/utils/type/isComponentType`.\n */\nexport const isComponentType =\n (type: Component) =>\n (node: unknown): node is VNode =>\n isVNode(node) && node.type === type;\n","import {\n type ComponentPublicInstance,\n type EmitFn,\n type EmitsToProps,\n type PublicProps,\n computed,\n defineComponent,\n ref,\n useAttrs,\n watchEffect,\n} from 'vue';\n\nimport {\n SelectionChipGroup as UI,\n type SelectionChipGroupProps as UIProps,\n} from '@lumx/core/js/components/Chip/SelectionChipGroup';\nimport { CLASSNAME as CHIP_CLASSNAME } from '@lumx/core/js/components/Chip';\nimport { setupSelectionChipGroupEvents } from '@lumx/core/js/components/Chip/setupSelectionChipGroupEvents';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { useTheme } from '../../composables/useTheme';\nimport { useRovingTabIndexContainer } from '../../composables/useRovingTabIndexContainer';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { isComponentType } from '../../utils/isComponentType';\nimport { Icon } from '../icon';\nimport { Tooltip } from '../tooltip';\nimport { Text } from '../text';\n\nimport Chip from './Chip';\nimport ChipGroup from './ChipGroup';\n\n/**\n * Props omit 'ref' (handled internally).\n * inputRef is added here for Vue (ref to an associated input element for backspace focus handling).\n */\nexport type SelectionChipGroupProps<O = any> = VueToJSXProps<UIProps<O>> & {\n /** Ref to the associated input element (for focus restoration on backspace) */\n inputRef?: HTMLInputElement | null;\n};\n\n/** SelectionChipGroup emit schema */\nexport const emitSchema = {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n change: (_newValue?: any[]) => true,\n};\n\n/**\n * SelectionChipGroup emits adapted to the value generic type\n */\nexport type SelectionChipGroupEmits<O> = {\n change: (newValue: O[] | undefined) => void;\n};\n\n/**\n * SelectionChipGroup component constructor with generic type attached to props\n *\n * Vue's `defineComponent` setup-fn overload cannot carry an unbound generic from the setup\n * signature to the resulting component constructor, so the generic is layered on via cast.\n */\nexport interface SelectionChipGroupConstructor {\n new <O = any>(\n props: SelectionChipGroupProps<O> & EmitsToProps<SelectionChipGroupEmits<O>> & PublicProps,\n ): {\n $props: SelectionChipGroupProps<O> & EmitsToProps<SelectionChipGroupEmits<O>>;\n $emit: EmitFn<SelectionChipGroupEmits<O>>;\n };\n}\n\n/**\n * SelectionChipGroup component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst SelectionChipGroup = defineComponent(\n // The component is internally typed against `any` — the generic is layered on at export time\n (props: SelectionChipGroupProps<any>, { emit, slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n const defaultTheme = useTheme();\n const containerRef = ref<ComponentPublicInstance | null>(null);\n\n // Unwrap Vue component instance to the root DOM element\n const getContainer = (): HTMLElement | null => containerRef.value?.$el ?? containerRef.value ?? null;\n\n // Attach event listeners\n watchEffect((onCleanup) => {\n const cleanup = setupSelectionChipGroupEvents({\n getContainer,\n getInput: () => props.inputRef,\n onChange: (newValue) => emit('change', newValue),\n getValue: () => props.value,\n getOptionId: props.getOptionId,\n });\n onCleanup(cleanup);\n });\n\n const containerUnwrapped = computed(getContainer);\n useRovingTabIndexContainer({\n containerRef: containerUnwrapped,\n itemSelector: `.${CHIP_CLASSNAME}`,\n itemDisabledSelector: `.${CHIP_CLASSNAME}[aria-disabled=\"true\"]`,\n });\n\n return () => {\n // Merge getChipProps and chip slot: getChipProps provides base props, slot overrides them,\n // and the core JSX template props take final priority (applied in the core component).\n const getChipProps = (option: unknown) => {\n const chipProps = props.getChipProps?.(option) || {};\n let slotProps: Record<string, any> = {};\n if (slots.chip) {\n const vnodes = slots.chip({ option });\n const customChip = vnodes?.find(isComponentType(Chip));\n slotProps = customChip?.props || {};\n // Handle the before slot\n const beforeSlot = (customChip?.children as any)?.before;\n if (beforeSlot) slotProps.before = beforeSlot();\n }\n // Filter out undefined values from slotProps so they don't override chipProps\n const definedSlotProps = Object.fromEntries(\n Object.entries(slotProps).filter(([, v]) => v !== undefined),\n );\n return { ...chipProps, ...definedSlotProps };\n };\n\n const { class: _class, ...restProps } = props;\n\n /*\n * Selector<O> is not assignable to Selector<any>/Selector<unknown> due to function\n * parameter contravariance. The core template is generic, so we let it infer `unknown`\n * by casting the selectors.\n */\n return UI(\n {\n ...attrs,\n ...restProps,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getOptionId: props.getOptionId as any,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n getOptionName: props.getOptionName as any,\n className: className.value,\n theme: props.theme || defaultTheme.value,\n getChipProps,\n ref: containerRef,\n },\n { Chip, ChipGroup, Icon, Tooltip, Text },\n );\n };\n },\n {\n name: 'LumxSelectionChipGroup',\n inheritAttrs: false,\n props: keysOf<SelectionChipGroupProps>()(\n 'getChipProps',\n 'getOptionId',\n 'getOptionName',\n 'value',\n 'label',\n 'chipRemoveLabel',\n 'isDisabled',\n 'theme',\n 'class',\n 'inputRef',\n ),\n emits: emitSchema,\n },\n);\n\nexport default SelectionChipGroup as unknown as SelectionChipGroupConstructor & typeof SelectionChipGroup;\n","import { mdiClose } from '@lumx/icons';\nimport type { AriaAttributes, CommonRef, HasClassName, LumxClassName, HasTheme, JSXElement } from '../../types';\nimport { classNames } from '../../utils';\n\nexport interface BaseLightboxProps\n extends HasClassName,\n HasTheme,\n Pick<AriaAttributes, 'aria-label' | 'aria-labelledby'> {\n /** Whether the component is open or not. */\n isOpen?: boolean;\n /** Whether to keep the dialog open on clickaway or escape press. */\n preventAutoClose?: boolean;\n /** Z-axis position. */\n zIndex?: number;\n}\n\n/**\n * Defines the props of the component.\n */\nexport interface LightboxProps extends BaseLightboxProps {\n /**\n * @deprecated Use `aria-label` instead.\n */\n ariaLabel?: string;\n /**\n * @deprecated Use `aria-labelledby` instead.\n */\n ariaLabelledBy?: string;\n /** Props to pass to the close button (minus those already set by the Lightbox props). */\n closeButtonProps?: any;\n /** Whether the component is still visible (e.g. during the close transition). */\n isVisible?: boolean;\n /** Reference to the element that triggered modal opening to set focus on. */\n parentElement?: CommonRef;\n /** Reference to the element that should get the focus when the lightbox opens. By default, the close button or the lightbox itself will take focus. */\n focusElement?: CommonRef;\n /** On close callback. */\n handleClose?(): void;\n /** Children */\n children?: JSXElement;\n /** Reference to the lightbox root element. */\n ref?: CommonRef;\n /** Reference to the wrapper div containing the children. */\n childrenRef?: CommonRef;\n /** Refs used for click-away detection. */\n clickAwayRefs?: any;\n /** Reference to the close button element. */\n closeButtonRef?: CommonRef;\n /** Portal component for rendering the lightbox outside the DOM hierarchy. */\n Portal: any;\n /** HeadingLevelProvider component injected by the framework wrapper. */\n HeadingLevelProvider: any;\n /** ThemeProvider component injected by the framework wrapper. */\n ThemeProvider: any;\n /** ClickAwayProvider component injected by the framework wrapper. */\n ClickAwayProvider: any;\n /** IconButton component injected by the framework wrapper. */\n IconButton: any;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Lightbox';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-lightbox';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Lightbox component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Lightbox = (props: LightboxProps) => {\n const {\n 'aria-labelledby': propAriaLabelledBy,\n ariaLabelledBy = propAriaLabelledBy,\n 'aria-label': propAriaLabel,\n ariaLabel = propAriaLabel,\n children,\n className,\n closeButtonProps,\n isOpen,\n handleClose,\n parentElement,\n focusElement,\n preventAutoClose,\n theme,\n zIndex,\n isVisible,\n ref,\n Portal,\n HeadingLevelProvider,\n ThemeProvider,\n ClickAwayProvider,\n childrenRef,\n clickAwayRefs,\n closeButtonRef,\n IconButton,\n ...forwardedProps\n } = props;\n if (!isOpen && !isVisible) return null;\n\n return (\n <Portal>\n <div\n ref={ref}\n {...forwardedProps}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-modal=\"true\"\n role=\"dialog\"\n tabIndex={-1}\n className={classNames.join(\n className,\n block({\n 'is-hidden': !isOpen,\n 'is-shown': isOpen || isVisible,\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n style={{ zIndex }}\n >\n {closeButtonProps && (\n <div className={element('close')}>\n <IconButton\n {...closeButtonProps}\n ref={closeButtonRef}\n emphasis=\"low\"\n hasBackground\n icon={mdiClose}\n theme=\"dark\"\n type=\"button\"\n onClick={handleClose}\n />\n </div>\n )}\n <HeadingLevelProvider level={2}>\n <ThemeProvider value={undefined}>\n <ClickAwayProvider callback={!preventAutoClose && handleClose} childrenRefs={clickAwayRefs}>\n <div ref={childrenRef} className={element('wrapper')} role=\"presentation\">\n {children}\n </div>\n </ClickAwayProvider>\n </ThemeProvider>\n </HeadingLevelProvider>\n </div>\n </Portal>\n );\n};\n","import { computed, defineComponent, ref, type Ref } from 'vue';\n\nimport { Lightbox as UI, type BaseLightboxProps } from '@lumx/core/js/components/Lightbox';\nimport { DIALOG_TRANSITION_DURATION } from '@lumx/core/js/constants';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { Portal } from '../../utils/Portal/Portal';\nimport { ClickAwayProvider } from '../../utils/ClickAway/ClickAwayProvider';\nimport { ThemeProvider } from '../../utils/theme/ThemeProvider';\nimport HeadingLevelProvider from '../heading/HeadingLevelProvider';\nimport IconButton from '../button/IconButton';\n\nimport { useCallbackOnEscape } from '../../composables/useCallbackOnEscape';\nimport { useClassName } from '../../composables/useClassName';\nimport { useFocusTrap } from '../../composables/useFocusTrap';\nimport { useRestoreFocusOnClose } from '../../composables/useRestoreFocusOnClose';\nimport { useTransitionVisibility } from '../../composables/useTransitionVisibility';\nimport { useDisableBodyScroll } from '../../composables/useDisableBodyScroll';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type LightboxProps = VueToJSXProps<BaseLightboxProps, 'theme' | 'aria-label' | 'aria-labelledby'> & {\n /** Reference to the element that triggered lightbox opening (gets focus back on close). */\n parentElement?: HTMLElement;\n /** Element that should receive focus when the lightbox opens. By default the first focusable child. */\n focusElement?: HTMLElement;\n /** Props to pass to the close button. */\n closeButtonProps?: any;\n};\n// theme, aria-label, aria-labelledby pass through via attrs\n\nexport const emitSchema = {\n close: () => true,\n};\n\nconst Lightbox = defineComponent(\n (props: LightboxProps, { emit, slots, attrs }) => {\n const className = useClassName(() => props.class);\n\n // Root div ref — used as focus zone and click-away zone\n const wrapperRef = ref<HTMLDivElement | null>(null);\n // Close button ref (passed to core; only mounted when closeButtonProps is provided)\n const closeButtonRef = ref<HTMLButtonElement | null>(null);\n\n const handleClose = () => emit('close');\n\n // Escape key closes the lightbox\n useCallbackOnEscape(\n handleClose,\n computed(() => Boolean(props.isOpen && !props.preventAutoClose)),\n );\n\n // Focus trap inside the lightbox root\n const focusZoneElement = computed(() => {\n if (!props.isOpen) return false as const;\n return wrapperRef.value || false;\n });\n\n useFocusTrap(\n focusZoneElement,\n computed(() => {\n // closeButtonRef holds a Vue component instance; unwrap to the underlying DOM element via $el\n const closeButtonEl = (closeButtonRef.value as any)?.$el ?? closeButtonRef.value;\n return props.focusElement || closeButtonEl || wrapperRef.value;\n }),\n );\n\n // Restore focus to parentElement when lightbox closes\n useRestoreFocusOnClose(\n computed(() => true),\n computed(() => undefined) as Ref<HTMLElement | undefined>,\n computed(() => props.parentElement) as Ref<HTMLElement | undefined>,\n wrapperRef as Ref<HTMLElement | undefined>,\n computed(() => Boolean(props.isOpen)),\n );\n\n // Disable body scroll when lightbox is open\n useDisableBodyScroll(computed(() => Boolean(props.isOpen)));\n\n // Track animation state: keeps lightbox mounted during close animation\n const isVisible = useTransitionVisibility(\n computed(() => Boolean(props.isOpen)),\n DIALOG_TRANSITION_DURATION,\n );\n\n // Mount guard: keep mounted while open or animating closed\n const isMounted = computed(() => props.isOpen || isVisible.value);\n\n // Click-away: treat the full root div as the \"inside\" zone\n const clickAwayRefs = computed(() => [wrapperRef]) as Ref<Array<Ref<HTMLElement | undefined>>>;\n\n return () => {\n if (!isMounted.value) return null;\n\n return UI({\n ...attrs,\n ClickAwayProvider,\n HeadingLevelProvider,\n IconButton,\n Portal,\n ThemeProvider,\n className: className.value,\n clickAwayRefs,\n closeButtonProps: props.closeButtonProps,\n closeButtonRef,\n isOpen: props.isOpen,\n isVisible: isVisible.value,\n handleClose,\n preventAutoClose: props.preventAutoClose,\n ref: wrapperRef,\n zIndex: props.zIndex,\n children: slots.default?.() as JSXElement,\n });\n };\n },\n {\n name: 'LumxLightbox',\n inheritAttrs: false,\n props: keysOf<LightboxProps>()(\n 'class',\n 'closeButtonProps',\n 'focusElement',\n 'isOpen',\n 'parentElement',\n 'preventAutoClose',\n 'zIndex',\n ),\n emits: emitSchema,\n },\n);\n\nexport default Lightbox;\n","import type { LumxClassName, HasTheme, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface DividerProps extends HasTheme, HasClassName {\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Divider';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-divider';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<DividerProps> = {};\n\n/**\n * Divider component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Divider = (props: DividerProps) => {\n const { className, theme, ref, ...forwardedProps } = props;\n\n return (\n <hr\n ref={ref}\n {...forwardedProps}\n className={classNames.join(className, block({ [`theme-${theme}`]: Boolean(theme) }))}\n />\n );\n};\n","import { defineComponent, useAttrs } from 'vue';\n\nimport {\n Divider as DividerUI,\n type DividerProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Divider';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type DividerProps = VueToJSXProps<UIProps>;\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * Divider component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Divider = defineComponent(\n (props: DividerProps) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n return () => {\n return (\n <DividerUI\n {...attrs}\n {...props}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n />\n );\n };\n },\n {\n name: 'LumxDivider',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<DividerProps>()('class', 'theme'),\n },\n);\n\nexport default Divider;\n","import { mdiDragVertical } from '@lumx/icons';\nimport type { LumxClassName, HasTheme, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport { ColorPalette, Size, Theme } from '../../constants';\nimport { Icon } from '../Icon';\n\n/**\n * Defines the props of the component.\n */\nexport interface DragHandleProps extends HasTheme, HasClassName {\n /** Reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'DragHandle';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-drag-handle';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<DragHandleProps> = {};\n\n/**\n * DragHandle component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const DragHandle = (props: DragHandleProps) => {\n const { className, theme, ref, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(className, block({ [`theme-${theme}`]: Boolean(theme) }))}\n >\n {Icon({\n icon: mdiDragVertical,\n color: theme === Theme.dark ? ColorPalette.light : ColorPalette.dark,\n size: Size.xs,\n })}\n </div>\n );\n};\n","import { defineComponent, useAttrs } from 'vue';\n\nimport {\n DragHandle as DragHandleUI,\n type DragHandleProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/DragHandle';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type DragHandleProps = VueToJSXProps<UIProps>;\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * DragHandle component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst DragHandle = defineComponent(\n (props: DragHandleProps) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme({ defaultTheme: undefined });\n const className = useClassName(() => props.class);\n\n return () => {\n return (\n <DragHandleUI\n {...attrs}\n {...props}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n />\n );\n };\n },\n {\n name: 'LumxDragHandle',\n inheritAttrs: false,\n props: keysOf<DragHandleProps>()('class', 'theme'),\n },\n);\n\nexport default DragHandle;\n","import { mdiChevronDown, mdiChevronUp } from '@lumx/icons';\n\nimport isEmpty from 'lodash/isEmpty';\n\nimport { ColorPalette, Emphasis, Theme } from '../../constants';\nimport type {\n HasClassName,\n LumxClassName,\n HasCloseMode,\n HasTheme,\n CommonRef,\n GenericProps,\n JSXElement,\n} from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface ExpansionPanelProps extends HasClassName, HasCloseMode, HasTheme {\n /** Whether the expansion panel has a background. */\n hasBackground?: boolean;\n /** Whether the header has a divider. */\n hasHeaderDivider?: boolean;\n /** Whether the component is open or not. */\n isOpen?: boolean;\n /** Label text (overwritten if a `<header>` is provided in the children). */\n label?: string;\n /** On open callback. */\n handleOpen?: (event: any) => void;\n /** On close callback. */\n handleClose?: (event: any) => void;\n /** Props to pass to the toggle button (minus those already set by the ExpansionPanel props). */\n toggleButtonProps: any;\n /** On toggle open or close callback. */\n handleToggleOpen?(shouldOpen: boolean, event: any): void;\n /** Children */\n children?: JSXElement;\n /** Ref forwarded to the root `<section>` element. */\n ref?: CommonRef;\n /** Ref forwarded to the collapsible wrapper `<div>`. */\n wrapperRef?: CommonRef;\n /** Props spread onto the header content `<div>` (e.g. `aria-*`, `data-*`). */\n headerProps: GenericProps;\n /** Content rendered inside the header content area. */\n headerContent?: JSXElement;\n /** Optional drag handle element rendered at the start of the header. */\n dragHandle?: JSXElement;\n /** Content rendered inside the collapsible content area. */\n content?: JSXElement;\n /** Optional footer element rendered below the content. */\n footer?: JSXElement;\n /** IconButton component injected by the framework wrapper (React or Vue). */\n IconButton: any;\n /** Whether the children should remain mounted (visible in the DOM) while the panel is closed. */\n isChildrenVisible?: boolean;\n}\n\nexport type ExpansionPanelPropsToOverride =\n | 'handleOpen'\n | 'handleClose'\n | 'toggleButtonProps'\n | 'handleToggleOpen'\n | 'wrapperRef'\n | 'headerProps'\n | 'headerContent'\n | 'dragHandle'\n | 'content'\n | 'IconButton'\n | 'isChildrenVisible'\n | 'footer';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ExpansionPanel';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-expansion-panel';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ExpansionPanelProps> = {\n closeMode: 'unmount',\n};\n\n/**\n * ExpansionPanel component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ExpansionPanel = (props: ExpansionPanelProps) => {\n const {\n className,\n children: anyChildren,\n hasBackground,\n ref,\n hasHeaderDivider,\n isOpen,\n label,\n handleClose,\n handleOpen,\n handleToggleOpen,\n theme,\n toggleButtonProps,\n headerProps,\n headerContent,\n dragHandle,\n wrapperRef,\n content,\n isChildrenVisible,\n IconButton,\n footer,\n closeMode,\n ...forwardedProps\n } = props;\n\n const toggleOpen = (event: any) => {\n const shouldOpen = !isOpen;\n\n if (handleOpen && shouldOpen) {\n handleOpen(event);\n }\n if (handleClose && !shouldOpen) {\n handleClose(event);\n }\n if (handleToggleOpen) {\n handleToggleOpen(shouldOpen, event);\n }\n };\n\n const color = theme === Theme.dark ? ColorPalette.light : ColorPalette.dark;\n\n const rootClassName = classNames.join(\n className,\n block({\n 'has-background': hasBackground,\n 'has-header': Boolean(!isEmpty(headerProps.children)),\n 'has-header-divider': hasHeaderDivider,\n 'is-close': !isOpen,\n 'is-draggable': Boolean(dragHandle),\n 'is-open': isOpen,\n [`theme-${theme}`]: Boolean(theme),\n }),\n );\n\n return (\n <section ref={ref} {...forwardedProps} className={rootClassName}>\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events,jsx-a11y/no-static-element-interactions */}\n <header className={element('header')} onClick={toggleOpen}>\n {dragHandle && <div className={element('header-drag')}>{dragHandle}</div>}\n\n <div {...headerProps} className={element('header-content')}>\n {headerContent}\n </div>\n\n <div className={element('header-toggle')}>\n <IconButton\n {...toggleButtonProps}\n color={color}\n emphasis={Emphasis.low}\n icon={isOpen ? mdiChevronUp : mdiChevronDown}\n aria-expanded={isOpen || 'false'}\n />\n </div>\n </header>\n\n <div className={element('wrapper')} ref={wrapperRef}>\n {(isOpen || isChildrenVisible) && (\n <div className={element('container')}>\n <div className={element('content')}>{content}</div>\n\n {footer && <div className={element('footer')}>{footer}</div>}\n </div>\n )}\n </div>\n </section>\n );\n};\n","import { defineComponent, onMounted, onUnmounted, ref, useAttrs, watch } from 'vue';\n\nimport {\n ExpansionPanel as UI,\n type ExpansionPanelProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n ExpansionPanelPropsToOverride,\n element,\n} from '@lumx/core/js/components/ExpansionPanel';\nimport { IS_BROWSER } from '@lumx/core/js/constants';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport IconButton from '../button/IconButton';\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type ExpansionPanelProps = VueToJSXProps<UIProps, ExpansionPanelPropsToOverride> & {\n /** Props to pass to the toggle button (minus those already set by the ExpansionPanel). */\n toggleButtonProps?: { label: string; [key: string]: any };\n};\n\nexport const emitSchema = {\n open: (event: MouseEvent) => event instanceof MouseEvent,\n close: (event: MouseEvent) => event instanceof MouseEvent,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n toggleOpen: (shouldOpen: boolean, event: MouseEvent) => typeof shouldOpen === 'boolean',\n};\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * ExpansionPanel component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ExpansionPanel = defineComponent(\n (props: ExpansionPanelProps, { emit, slots }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n const wrapperRef = ref<HTMLDivElement | null>(null);\n const isChildrenVisible = ref<boolean | undefined>(props.isOpen);\n const isOpenRef = ref(props.isOpen);\n\n watch(\n () => props.isOpen,\n (isOpen) => {\n isOpenRef.value = isOpen;\n if (isOpen || props.closeMode === 'hide') {\n isChildrenVisible.value = true;\n } else if (!IS_BROWSER) {\n isChildrenVisible.value = false;\n }\n },\n { immediate: true },\n );\n\n let removeTransitionListener: (() => void) | undefined;\n\n onMounted(() => {\n if (!IS_BROWSER || !wrapperRef.value) return;\n const onTransitionEnd = () => {\n isChildrenVisible.value = isOpenRef.value || props.closeMode === 'hide';\n };\n wrapperRef.value.addEventListener('transitionend', onTransitionEnd);\n removeTransitionListener = () => wrapperRef.value?.removeEventListener('transitionend', onTransitionEnd);\n });\n\n onUnmounted(() => {\n removeTransitionListener?.();\n });\n\n const handleOpen = (event: MouseEvent) => {\n event.stopImmediatePropagation();\n emit('open', event);\n };\n\n const handleClose = (event: MouseEvent) => {\n event.stopImmediatePropagation();\n emit('close', event);\n };\n\n const handleToggleOpen = (shouldOpen: boolean, event: MouseEvent) => {\n event.stopImmediatePropagation();\n emit('toggleOpen', shouldOpen, event);\n };\n\n return () => {\n const headerSlot = slots.header?.();\n const headerContent = headerSlot ? headerSlot : <span class={element('label')}>{props.label}</span>;\n\n return (\n <UI\n {...attrs}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n isOpen={props.isOpen}\n label={props.label}\n hasBackground={props.hasBackground}\n hasHeaderDivider={props.hasHeaderDivider}\n closeMode={props.closeMode || DEFAULT_PROPS.closeMode}\n toggleButtonProps={props.toggleButtonProps || { label: '' }}\n handleOpen={handleOpen as any}\n handleClose={handleClose as any}\n handleToggleOpen={handleToggleOpen as any}\n headerProps={{}}\n headerContent={headerContent as JSXElement}\n dragHandle={slots['drag-handle']?.() as JSXElement}\n content={slots.default?.() as JSXElement}\n footer={slots.footer?.() as JSXElement}\n wrapperRef={wrapperRef}\n isChildrenVisible={isChildrenVisible.value}\n IconButton={IconButton}\n />\n );\n };\n },\n {\n name: 'LumxExpansionPanel',\n inheritAttrs: false,\n props: keysOf<ExpansionPanelProps>()(\n 'class',\n 'closeMode',\n 'hasBackground',\n 'hasHeaderDivider',\n 'isOpen',\n 'label',\n 'theme',\n 'toggleButtonProps',\n ),\n emits: emitSchema,\n },\n);\n\nexport default ExpansionPanel;\n","import { ColorPalette, Size, Theme } from '../../constants';\nimport type { LumxClassName, HasTheme, JSXElement, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport { Icon } from '../Icon';\nimport { TextProps } from '../Text';\n\nexport interface FlagProps extends HasClassName, HasTheme {\n /** Color of the component. */\n color?: ColorPalette;\n /** Icon to use before the label. */\n icon?: string;\n /** Text label of the flag. */\n children: JSXElement;\n /** Enable text truncate on overflow */\n truncate?: boolean;\n /** ref to the root element */\n ref?: CommonRef;\n /** Text component to use for rendering the label */\n Text: (props: TextProps) => any;\n}\n\nexport const COMPONENT_NAME = 'Flag';\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-flag';\nexport const DEFAULT_PROPS: Partial<FlagProps> = {};\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Flag component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Flag = (props: FlagProps) => {\n const { children, icon, color, className, theme, truncate, Text, ...forwardedProps } = props;\n const flagColor = color || (theme === Theme.light ? ColorPalette.dark : ColorPalette.light);\n const isTruncated = !!truncate;\n\n return (\n <div\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`color-${flagColor}`]: Boolean(flagColor),\n 'is-truncated': isTruncated,\n }),\n )}\n >\n {icon && Icon({ icon, size: Size.xxs, className: element('icon') })}\n <Text as=\"span\" truncate={!!truncate} typography=\"overline\" className={element('label')}>\n {children}\n </Text>\n </div>\n );\n};\n","import { defineComponent, useAttrs } from 'vue';\n\nimport { Flag as FlagUI, type FlagProps as UIProps } from '@lumx/core/js/components/Flag';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { Text } from '../text';\n\nexport type FlagProps = VueToJSXProps<UIProps, 'Text'>;\n\n/**\n * Flag component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Flag = defineComponent(\n (props: FlagProps, { slots }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n return () => (\n <FlagUI\n {...props}\n {...attrs}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n children={slots.default?.() as JSXElement}\n Text={Text as unknown as UIProps['Text']}\n />\n );\n },\n {\n name: 'Flag',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<FlagProps>()('color', 'icon', 'truncate', 'theme', 'class'),\n },\n);\n\nexport default Flag;\n","/** Used to match a single whitespace character. */\nvar reWhitespace = /\\s/;\n\n/**\n * Used by `_.trim` and `_.trimEnd` to get the index of the last non-whitespace\n * character of `string`.\n *\n * @private\n * @param {string} string The string to inspect.\n * @returns {number} Returns the index of the last non-whitespace character.\n */\nfunction trimmedEndIndex(string) {\n var index = string.length;\n\n while (index-- && reWhitespace.test(string.charAt(index))) {}\n return index;\n}\n\nmodule.exports = trimmedEndIndex;\n","var trimmedEndIndex = require('./_trimmedEndIndex');\n\n/** Used to match leading whitespace. */\nvar reTrimStart = /^\\s+/;\n\n/**\n * The base implementation of `_.trim`.\n *\n * @private\n * @param {string} string The string to trim.\n * @returns {string} Returns the trimmed string.\n */\nfunction baseTrim(string) {\n return string\n ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, '')\n : string;\n}\n\nmodule.exports = baseTrim;\n","var baseTrim = require('./_baseTrim'),\n isObject = require('./isObject'),\n isSymbol = require('./isSymbol');\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = baseTrim(value);\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = toNumber;\n","var toNumber = require('./toNumber');\n\n/** Used as references for various `Number` constants. */\nvar INFINITY = 1 / 0,\n MAX_INTEGER = 1.7976931348623157e+308;\n\n/**\n * Converts `value` to a finite number.\n *\n * @static\n * @memberOf _\n * @since 4.12.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted number.\n * @example\n *\n * _.toFinite(3.2);\n * // => 3.2\n *\n * _.toFinite(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toFinite(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toFinite('3.2');\n * // => 3.2\n */\nfunction toFinite(value) {\n if (!value) {\n return value === 0 ? value : 0;\n }\n value = toNumber(value);\n if (value === INFINITY || value === -INFINITY) {\n var sign = (value < 0 ? -1 : 1);\n return sign * MAX_INTEGER;\n }\n return value === value ? value : 0;\n}\n\nmodule.exports = toFinite;\n","var toFinite = require('./toFinite');\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This method is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/7.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nmodule.exports = toInteger;\n","var toInteger = require('./toInteger');\n\n/**\n * Checks if `value` is an integer.\n *\n * **Note:** This method is based on\n * [`Number.isInteger`](https://mdn.io/Number/isInteger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an integer, else `false`.\n * @example\n *\n * _.isInteger(3);\n * // => true\n *\n * _.isInteger(Number.MIN_VALUE);\n * // => false\n *\n * _.isInteger(Infinity);\n * // => false\n *\n * _.isInteger('3');\n * // => false\n */\nfunction isInteger(value) {\n return typeof value == 'number' && value == toInteger(value);\n}\n\nmodule.exports = isInteger;\n","import isInteger from 'lodash/isInteger';\nimport type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { Size } from '../../constants';\n\nexport type GridColumnGapSize = Extract<Size, 'tiny' | 'regular' | 'big' | 'huge'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface GridColumnProps extends HasClassName {\n /** Customize the root element. */\n as?: any;\n /** Children elements. */\n children?: JSXElement;\n /** Space between columns and rows. */\n gap?: GridColumnGapSize;\n /** Ideal number of columns. */\n maxColumns?: number;\n /** Minimum width for each item, reduce the number of column if there is not enough space. */\n itemMinWidth?: number;\n /** Custom styles. */\n style?: any;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'GridColumn';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-grid-column';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<GridColumnProps> = {};\n\n/**\n * The GridColumn is a layout component that can display children in a grid\n * with custom display properties. It also comes with a responsive design,\n * with a number of column that reduce when there is not enough space for each item.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const GridColumn = (props: GridColumnProps) => {\n const {\n as: Component = 'div',\n gap,\n maxColumns,\n itemMinWidth,\n children,\n className,\n style = {},\n ref,\n ...forwardedProps\n } = props;\n\n return (\n <Component\n {...forwardedProps}\n ref={ref}\n className={classNames.join(className, CLASSNAME)}\n style={{\n ...style,\n ['--lumx-grid-column-item-min-width' as any]: isInteger(itemMinWidth) && `${itemMinWidth}px`,\n ['--lumx-grid-column-columns' as any]: maxColumns,\n ['--lumx-grid-column-gap' as any]: gap && `var(--lumx-spacing-unit-${gap})`,\n }}\n >\n {children}\n </Component>\n );\n};\n\nGridColumn.displayName = COMPONENT_NAME;\nGridColumn.className = CLASSNAME;\nGridColumn.defaultProps = DEFAULT_PROPS;\n","import { defineComponent, useAttrs } from 'vue';\nimport {\n GridColumn as GridColumnUI,\n type GridColumnProps as UIProps,\n type GridColumnGapSize,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/GridColumn';\nimport { type JSXElement } from '@lumx/core/js/types';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type GridColumnProps = VueToJSXProps<UIProps>;\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\nexport type { GridColumnGapSize };\n\nconst GridColumn = defineComponent(\n (props: GridColumnProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n return () => (\n <GridColumnUI\n {...props}\n {...attrs}\n className={className.value}\n children={slots.default?.() as JSXElement}\n />\n );\n },\n {\n name: 'LumxGridColumn',\n inheritAttrs: false,\n props: keysOf<GridColumnProps>()('as', 'class', 'gap', 'itemMinWidth', 'maxColumns', 'style'),\n },\n);\n\nexport default GridColumn;\n","import { HeadingElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { TextProps } from '../Text';\nimport { DEFAULT_TYPOGRAPHY_BY_LEVEL } from './constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface HeadingProps extends Partial<TextProps> {\n /**\n * Display a specific heading level instead of the one provided by parent context provider.\n */\n as?: HeadingElement;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Heading';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-heading';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS = {} as const;\n\n/**\n * Get Heading component common props\n *\n * @param props Component props.\n * @param contextHeadingElement Heading element from context.\n * @return Common Props\n */\nexport const getHeadingProps = (props: HeadingProps, contextHeadingElement?: HeadingElement) => {\n const { as, className, typography, ...otherProps } = props;\n const computedHeadingElement = as || contextHeadingElement || 'h1';\n\n return {\n ...otherProps,\n as: computedHeadingElement,\n className: classNames.join(className, CLASSNAME),\n typography: typography || DEFAULT_TYPOGRAPHY_BY_LEVEL[computedHeadingElement],\n };\n};\n","import { computed, defineComponent, useAttrs } from 'vue';\n\nimport { getHeadingProps, type HeadingProps } from '@lumx/core/js/components/Heading';\nimport { useClassName } from '@lumx/vue/composables/useClassName';\n\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { Text } from '../text';\nimport { useHeadingLevel } from './useHeadingLevel';\n\nexport type HeadingVueProps = VueToJSXProps<HeadingProps>;\n\n/**\n * Heading component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Heading = defineComponent(\n (props: HeadingVueProps, { slots }) => {\n const attrs = useAttrs();\n const context = useHeadingLevel();\n const mergedClassName = useClassName(() => props.class);\n\n const uiProps = computed(() => {\n const { className, ...headingProps } = getHeadingProps(\n {\n ...attrs,\n ...props,\n className: mergedClassName.value,\n },\n context.headingElement,\n );\n\n return {\n ...headingProps,\n class: className,\n };\n });\n\n return () => <Text {...uiProps.value}>{slots.default?.()}</Text>;\n },\n {\n name: 'Heading',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<HeadingVueProps>()(\n 'as',\n 'color',\n 'colorVariant',\n 'typography',\n 'truncate',\n 'noWrap',\n 'whiteSpace',\n 'style',\n 'class',\n ),\n },\n);\n\nexport default Heading;\n","import { defineComponent, useAttrs } from 'vue';\n\nimport { InputHelper as InputHelperUI, type InputHelperProps as UIProps } from '@lumx/core/js/components/InputHelper';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type InputHelperProps = VueToJSXProps<UIProps>;\n\n/**\n * InputHelper component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst InputHelper = defineComponent(\n (props: InputHelperProps, { slots }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n return () => (\n <InputHelperUI\n {...props}\n {...attrs}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n children={slots.default?.() as JSXElement}\n />\n );\n },\n {\n name: 'InputHelper',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<InputHelperProps>()('kind', 'theme', 'class', 'id'),\n },\n);\n\nexport default InputHelper;\n","import { defineComponent, useAttrs } from 'vue';\n\nimport { InputLabel as InputLabelUI, type InputLabelProps as UIProps } from '@lumx/core/js/components/InputLabel';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type InputLabelProps = VueToJSXProps<UIProps>;\n\n/**\n * InputLabel component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst InputLabel = defineComponent(\n (props: InputLabelProps, { slots }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n return () => (\n <InputLabelUI\n {...props}\n {...attrs}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n children={slots.default?.() as JSXElement}\n />\n );\n },\n {\n name: 'InputLabel',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<InputLabelProps>()('htmlFor', 'id', 'isRequired', 'typography', 'theme', 'class', 'as'),\n },\n);\n\nexport default InputLabel;\n","import type { CommonRef, HasDisabled, JSXElement, LumxClassName } from '../../types';\nimport { HasAriaDisabled, HasClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { ColorVariant, ColorWithVariants, Typography } from '../../constants';\nimport { resolveColorWithVariants } from '../../utils/_internal/color';\nimport { RawClickable } from '../RawClickable';\n\n/**\n * Defines the props of the component.\n */\nexport interface LinkProps extends HasClassName, HasAriaDisabled, HasDisabled {\n /** Children content */\n children?: JSXElement;\n /** Color variant. */\n color?: ColorWithVariants;\n /** Lightened or darkened variant of the selected icon color. */\n colorVariant?: ColorVariant;\n /** Link href. */\n href?: string;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Custom element/component for the link. */\n linkAs?: string | any;\n /** Click handler (framework wrappers convert onClick to handleClick). */\n handleClick?: (event: any) => void;\n /** Link target. */\n target?: string;\n /** Typography variant. */\n typography?: Typography;\n /** Element ref. */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Link';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-link';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<LinkProps> = {};\n\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Link component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Link = (props: LinkProps) => {\n const {\n children,\n className,\n color: propColor,\n colorVariant: propColorVariant,\n typography,\n linkAs,\n handleClick,\n ref,\n href,\n ...forwardedProps\n } = props;\n\n const [color, colorVariant] = resolveColorWithVariants(propColor, propColorVariant);\n\n return RawClickable({\n ref,\n as: linkAs || (href ? 'a' : 'button'),\n href,\n ...forwardedProps,\n handleClick,\n children,\n className: classNames.join(\n className,\n block({\n [`color-${color}`]: Boolean(color),\n [`color-variant-${colorVariant}`]: Boolean(colorVariant),\n 'has-typography': !!typography,\n }),\n typography && classNames.typography(typography),\n ),\n });\n};\n","import { computed, defineComponent, toRaw, useAttrs, useSlots } from 'vue';\n\nimport { Link as LinkUI, type LinkProps as UIProps, CLASSNAME } from '@lumx/core/js/components/Link';\n\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { JSXElement } from '@lumx/core/js/types';\nimport { classNames } from '@lumx/core/js/utils';\n\nexport type LinkProps = VueToJSXProps<UIProps>;\n\nexport const emitSchema = {\n click: (event: MouseEvent) => event instanceof MouseEvent,\n};\n\nconst { element } = classNames.bem(CLASSNAME);\n\n/**\n * Link component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Link = defineComponent(\n (props: LinkProps, { emit }) => {\n const slots = useSlots();\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(\n computed(() => ({ ...props, ...attrs })),\n );\n\n const handleClick = (event: MouseEvent) => {\n if (isAnyDisabled.value) {\n return;\n }\n\n emit('click', event);\n };\n\n return () => {\n const { linkAs, ...rest } = otherProps.value;\n return (\n <LinkUI\n {...rest}\n linkAs={toRaw(linkAs)}\n {...disabledStateProps.value}\n className={className.value}\n handleClick={handleClick as any}\n children={(<span className={element('content')}>{slots.default?.()}</span>) as JSXElement}\n />\n );\n };\n },\n {\n name: 'LumxLink',\n inheritAttrs: false,\n props: keysOf<LinkProps>()(\n 'color',\n 'colorVariant',\n 'href',\n 'isDisabled',\n 'disabled',\n 'linkAs',\n 'target',\n 'typography',\n 'class',\n 'aria-disabled',\n ),\n emits: emitSchema,\n },\n);\n\nexport default Link;\n","import { AspectRatio, ColorPalette, ColorVariant, Size, Theme } from '../../constants';\nimport type { CommonRef, HasClassName, LumxClassName, GenericProps, HasTheme } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface LinkPreviewProps extends HasClassName, HasTheme {\n /** Description. */\n description?: string;\n /** Link URL. */\n link: string;\n /** Custom component for the link (can be used to inject a router Link). */\n linkAs?: 'a' | any;\n /** Props to pass to the link (minus those already set by the LinkPreview props). */\n linkProps?: GenericProps;\n /** Size variant. */\n size?: Extract<Size, 'regular' | 'big'>;\n /** Thumbnail for the link preview. */\n thumbnailProps?: GenericProps;\n /** Title. */\n title?: string;\n /** Ref forwarded to the root article element. */\n ref?: CommonRef;\n /** Heading element used to wrap the title. */\n TitleHeading: any;\n /** Link component injected by the framework wrapper. */\n Link: any;\n /** Thumbnail component injected by the framework wrapper. */\n Thumbnail: any;\n}\n\nexport type LinkPreviewPropsToOverride = 'linkProps' | 'TitleHeading' | 'Link' | 'Thumbnail' | 'thumbnailProps';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'LinkPreview';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-link-preview';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS = {\n size: Size.regular,\n titleHeading: 'h2',\n} as const;\n\n/**\n * LinkPreview component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const LinkPreview = (props: LinkPreviewProps) => {\n const {\n className,\n description,\n link,\n linkAs,\n linkProps,\n size = DEFAULT_PROPS.size,\n theme,\n thumbnailProps,\n ref,\n title,\n TitleHeading,\n Link,\n Thumbnail,\n ...forwardedProps\n } = props;\n // Use title heading as title wrapper (see DEFAULT_PROPS for the default value).\n const adjustedSize = size === Size.big && thumbnailProps ? Size.big : Size.regular;\n\n return (\n <article\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`size-${adjustedSize}`]: Boolean(adjustedSize),\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n <div className={element('wrapper')}>\n {thumbnailProps && (\n <div className={element('thumbnail')}>\n <Thumbnail\n {...thumbnailProps}\n linkAs={linkAs}\n linkProps={{\n ...linkProps,\n href: link,\n target: '_blank',\n // Avoid redundant links in focus order\n tabIndex: -1,\n }}\n aspectRatio={AspectRatio.free}\n fillHeight\n />\n </div>\n )}\n\n <div className={element('container')}>\n {title && (\n <TitleHeading className={element('title')}>\n <Link\n {...linkProps}\n linkAs={linkAs}\n target=\"_blank\"\n href={link}\n color={theme === Theme.light ? ColorPalette.dark : ColorPalette.light}\n colorVariant={ColorVariant.N}\n >\n {title}\n </Link>\n </TitleHeading>\n )}\n\n {description && <p className={element('description')}>{description}</p>}\n\n <div className={element('link')}>\n <Link\n {...linkProps}\n linkAs={linkAs}\n className={classNames.join(element('link'), linkProps?.className)}\n target=\"_blank\"\n href={link}\n color={theme === Theme.light ? ColorPalette.primary : ColorPalette.light}\n colorVariant={ColorVariant.N}\n // Avoid redundant links in focus order\n tabIndex={title ? '-1' : undefined}\n >\n {link}\n </Link>\n </div>\n </div>\n </div>\n </article>\n );\n};\n","import { defineComponent, toRaw, useAttrs } from 'vue';\n\nimport {\n LinkPreview as LinkPreviewUI,\n type LinkPreviewProps as UIProps,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/LinkPreview';\n\nimport { Link } from '../link';\nimport { Thumbnail } from '../thumbnail';\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type LinkPreviewProps = VueToJSXProps<UIProps, 'TitleHeading' | 'Link' | 'Thumbnail'> & {\n /** Customize the title heading tag. */\n titleHeading?: string;\n};\n\nexport { COMPONENT_NAME };\n\n/**\n * LinkPreview component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst LinkPreview = defineComponent(\n (props: LinkPreviewProps) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n return () => {\n const { titleHeading = DEFAULT_PROPS.titleHeading, linkAs, ...restProps } = props;\n\n return (\n <LinkPreviewUI\n {...restProps}\n {...attrs}\n linkAs={toRaw(linkAs)}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n TitleHeading={titleHeading as any}\n Link={Link}\n Thumbnail={Thumbnail}\n />\n );\n };\n },\n {\n name: 'LumxLinkPreview',\n inheritAttrs: false,\n props: keysOf<LinkPreviewProps>()(\n 'class',\n 'description',\n 'link',\n 'linkAs',\n 'linkProps',\n 'size',\n 'theme',\n 'thumbnailProps',\n 'title',\n 'titleHeading',\n ),\n },\n);\n\nexport default LinkPreview;\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { ListItem } from '../List/ListItem';\nimport { ListItemAction } from '../List/ListItemAction';\n\n/** MenuItem props. */\nexport interface MenuItemProps extends HasClassName {\n /** Item label content. */\n children?: JSXElement;\n /** Content rendered before the label (e.g. an icon). */\n before?: JSXElement;\n /** Content rendered after the label (e.g. a shortcut hint). */\n after?: JSXElement;\n /** Whether the item is disabled. Skipped by Tab and arrow nav. */\n isDisabled?: boolean;\n /** Click handler for the action element. */\n handleClick?(event: any): void;\n /** Extra props forwarded to the inner action element (e.g. link props when `as=\"a\"`). */\n actionProps?: Record<string, any>;\n /** ref to the inner action element (the focusable `<button>` / `<a>`). */\n actionRef?: CommonRef;\n /** ref to the root `<li>` element. */\n ref?: CommonRef;\n}\n\n/** Props overridden by framework wrappers. */\nexport type MenuItemPropsToOverride = 'before' | 'after' | 'children' | 'handleClick' | 'actionProps' | 'actionRef';\n\nexport const COMPONENT_NAME = 'MenuItem';\n\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-menu-item';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/** MenuItem core template. Renders a `ListItem` with a `ListItemAction`. */\nexport const MenuItem = (props: MenuItemProps) => {\n const { children, className, before, after, isDisabled, handleClick, actionProps, actionRef, ref, ...rest } = props;\n\n const actionElement = ListItemAction({\n as: 'button',\n type: 'button',\n ...actionProps,\n ref: actionRef,\n className: element('action'),\n handleClick,\n 'data-menu-item': '',\n 'aria-disabled': isDisabled ? 'true' : undefined,\n children,\n } as any);\n\n return ListItem({\n ref,\n size: 'tiny',\n ...rest,\n className: classNames.join(className, block()),\n before,\n after,\n children: actionElement,\n } as any);\n};\n","import { type InjectionKey, type Ref, inject, provide } from 'vue';\n\nimport type { MenuHandle } from '@lumx/core/js/components/Menu/types';\n\n/** Shared context value passed from MenuProvider to all Menu sub-components. */\nexport interface MenuContextValue {\n handle: MenuHandle;\n menuId: string;\n triggerId: string;\n anchorRef: Ref<HTMLElement | null>;\n}\n\nconst MENU_CONTEXT_KEY: InjectionKey<MenuContextValue> = Symbol('LumxMenuContext');\n\n/** Provides the Menu context to all descendant Menu sub-components. */\nexport function provideMenuContext(value: MenuContextValue) {\n provide(MENU_CONTEXT_KEY, value);\n}\n\n/** Injects and returns the Menu context; throws if used outside a MenuProvider. */\nexport function useMenuContext(): MenuContextValue {\n const context = inject(MENU_CONTEXT_KEY);\n if (!context) {\n throw new Error('Menu sub-components must be used within a Menu.Provider');\n }\n return context;\n}\n","import { defineComponent, ref, type SlotsType } from 'vue';\n\nimport type { JSXElement } from '@lumx/core/js/types';\nimport { ColorPalette } from '@lumx/core/js/constants';\nimport {\n MenuItem as UI,\n MenuItemProps as UIProps,\n MenuItemPropsToOverride,\n CLASSNAME,\n COMPONENT_NAME,\n} from '@lumx/core/js/components/Menu/MenuItem';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { Icon } from '../icon';\nimport Text from '../text/Text';\n\nimport { useMenuContext } from './context';\n\nexport interface MenuItemActionSlotProps {\n /** Props to spread on the custom action element (includes onClick). */\n actionProps: Record<string, any>;\n /** Whether the item is disabled. */\n isDisabled: boolean;\n}\n\n/** MenuItem props. */\nexport type MenuItemProps = VueToJSXProps<UIProps, MenuItemPropsToOverride> & {\n /** MDI icon rendered as `<Icon size=\"xs\" />` prepended to the `before` slot. */\n icon?: string;\n /** MDI icon rendered as `<Icon size=\"xs\" />` appended to the `after` slot. */\n afterIcon?: string;\n /** Foreground color applied to the icon and label text. */\n color?: ColorPalette;\n};\n\n/**\n * MenuItem component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst MenuItem = defineComponent(\n (props: MenuItemProps, { slots, emit, attrs }) => {\n const { handle } = useMenuContext();\n const className = useClassName(() => props.class);\n const internalRef = ref<HTMLLIElement | null>(null);\n\n const onClick = (event: any) => {\n if (props.isDisabled) {\n event.preventDefault();\n return;\n }\n emit('click', event);\n if (!event.defaultPrevented) {\n handle.trigger?.focus();\n handle.setOpen(false);\n }\n };\n\n return () => {\n // Slots\n const before = slots.before?.();\n const action = slots.action?.({\n actionProps: { onClick },\n isDisabled: props.isDisabled as boolean,\n })?.[0];\n const after = slots.after?.();\n\n // Prepend menu item icon at the start of the \"before\" section\n const beforeWithIcon = props.icon ? (\n <>\n <Icon icon={props.icon} size=\"xs\" color={props.color} />\n {before}\n </>\n ) : (\n before\n );\n\n // Append menu item icon at the end of the \"after\" section\n const afterWithIcon = props.afterIcon ? (\n <>\n {after}\n <Icon icon={props.afterIcon} size=\"xs\" color={props.color} />\n </>\n ) : (\n after\n );\n\n let actionProps: Record<string, any> | undefined;\n let label: JSXElement | undefined;\n\n // Custom action rendered => merge props\n if (action) {\n actionProps = { ...action.props, onClick, as: action.type };\n label = action.children as JSXElement;\n }\n\n // Use action slot label or fallback to menu item slots\n label = label ?? (slots.default?.() as JSXElement);\n\n return UI({\n ...attrs,\n ...props,\n className: className.value,\n ref: internalRef,\n isDisabled: props.isDisabled,\n handleClick: onClick,\n // Slots\n before: beforeWithIcon as JSXElement,\n actionProps,\n after: afterWithIcon as JSXElement,\n children: (\n <Text as=\"span\" color={props.color}>\n {label}\n </Text>\n ) as JSXElement,\n });\n };\n },\n {\n name: 'LumxMenuItem',\n inheritAttrs: false,\n props: keysOf<MenuItemProps>()('icon', 'afterIcon', 'color', 'isDisabled', 'class'),\n emits: ['click'],\n slots: Object as SlotsType<{\n default: void;\n action: MenuItemActionSlotProps;\n before: void;\n after: void;\n }>,\n },\n);\n\nexport { CLASSNAME, COMPONENT_NAME };\nexport default MenuItem;\n","import { mdiDotsVertical } from '@lumx/icons';\nimport type { JSXElement, LumxClassName } from '../../types';\n\nexport type MenuButtonVariant = 'button' | 'icon-button' | 'chip' | 'link';\n\nexport const DEFAULT_PROPS = {\n variant: 'button',\n} satisfies Partial<MenuButtonProps>;\n\n/** ARIA keys set by MenuButton on the trigger — omitted from variant component props. */\ntype MenuButtonAriaKeys = 'aria-haspopup' | 'aria-controls' | 'aria-expanded';\n\n/** Per-variant keys internally managed by MenuButton — omitted from variant component props. */\ntype MenuButtonVariantsInternalKeys = {\n button: MenuButtonAriaKeys;\n 'icon-button': MenuButtonAriaKeys;\n chip: MenuButtonAriaKeys | 'isClickable';\n link: MenuButtonAriaKeys | 'href' | 'linkAs';\n};\n\n/** Discriminated union of MenuButton props across all trigger variants. */\nexport type MenuButtonVariantsProps<TBase, TVariantProps extends Record<MenuButtonVariant, any>> = {\n [V in MenuButtonVariant]: TBase &\n (V extends 'button' ? { variant?: V } : { variant: V }) &\n Omit<TVariantProps[V], MenuButtonVariantsInternalKeys[V] | keyof TBase>;\n}[MenuButtonVariant];\n\nexport interface MenuButtonProps {\n variant?: MenuButtonVariant;\n label?: JSXElement;\n children?: JSXElement;\n triggerProps?: Record<string, any>;\n popoverProps?: Record<string, any>;\n onOpen?: (isOpen: boolean) => void;\n}\n\nexport interface MenuButtonComponents {\n MenuProvider: any;\n MenuTrigger: any;\n MenuPopover: any;\n MenuList: any;\n}\n\nexport const COMPONENT_NAME = 'MenuButton';\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-menu-button';\n\n/** Menu button core template (composition of menu provider, trigger, popover and list) */\nexport const MenuButton = (\n props: MenuButtonProps,\n { MenuProvider, MenuTrigger, MenuPopover, MenuList }: MenuButtonComponents,\n) => {\n const { label, children, triggerProps, popoverProps, onOpen, variant } = props;\n\n const extraTriggerProps: Record<string, any> = {};\n if (variant === 'chip') {\n // Chip render as clickable (since the component cannot detect this automatically)\n extraTriggerProps.isClickable = true;\n }\n\n let triggerChildren;\n if (variant === 'icon-button') {\n // Label as prop (renders as tooltip label)\n extraTriggerProps.label = label;\n // Default icon\n if (!triggerProps?.icon) {\n extraTriggerProps.icon = mdiDotsVertical;\n }\n } else {\n // Only set the label as children when we are not displaying an icon-button\n triggerChildren = label;\n }\n\n return (\n <MenuProvider onOpen={onOpen}>\n <MenuTrigger {...triggerProps} {...extraTriggerProps}>\n {triggerChildren}\n </MenuTrigger>\n <MenuPopover {...popoverProps}>\n <MenuList>{children}</MenuList>\n </MenuPopover>\n </MenuProvider>\n );\n};\n","/**\n * CSS selector for menu items (inner focusable element). Includes disabled items: per\n * WAI-ARIA APG they stay focusable so AT announces them; click is no-op'd via `aria-disabled`.\n */\nexport const MENU_ITEM_SELECTOR = '[data-menu-item]';\n\n/** Get an item's text label (trimmed `textContent`) for typeahead matching. */\nexport function getItemText(item: HTMLElement): string {\n return item.textContent?.trim() ?? '';\n}\n\n/** Get all item elements within a menu container, in DOM order (includes disabled). */\nexport function getItems(menu: HTMLElement): HTMLElement[] {\n return Array.from(menu.querySelectorAll<HTMLElement>(MENU_ITEM_SELECTOR));\n}\n","import { createListFocusNavigation, ListFocusNavigationController } from '../../utils/focusNavigation';\nimport { createTypeahead } from '../../utils/typeahead';\nimport { createSelectorTreeWalker } from '../../utils/browser/createSelectorTreeWalker';\nimport { TABBABLE_ELEMENTS_SELECTOR, DISABLED_SELECTOR } from '../../utils/focus/constants';\nimport { isPrintableKey } from '../../utils/browser/isPrintableKey';\nimport { MENU_ITEM_SELECTOR, getItems, getItemText } from './utils';\nimport type { MenuEventMap, MenuHandle, SetupMenuOptions } from './types';\n\n/**\n * Find and focus the next sequential focusable element after the given trigger\n * in document tab order. Used by Tab-at-last-item to move focus forward past\n * the (now-closed) menu.\n */\nfunction moveFocusAfterTrigger(trigger: HTMLElement) {\n const allFocusable = Array.from(document.querySelectorAll<HTMLElement>(TABBABLE_ELEMENTS_SELECTOR)).filter(\n (el) => !el.matches(DISABLED_SELECTOR) && el.tabIndex >= 0,\n );\n const triggerIdx = allFocusable.indexOf(trigger);\n if (triggerIdx === -1) return;\n const next = allFocusable[triggerIdx + 1];\n next?.focus();\n}\n\n/**\n * Set up a disclosure-pattern menu handle.\n *\n * The trigger is registered separately via {@link MenuHandle.registerTrigger}\n * once the trigger mounts. The menu container is registered separately via\n * {@link MenuHandle.registerMenu} once on mount — the popover uses\n * `closeMode=\"hide\"` so the `<ul>` stays in the DOM at all times.\n *\n * IMPORTANT: this is the **disclosure widget** pattern, NOT WAI-ARIA's\n * `role=\"menu\"`. Items are native `<button>` / `<a>` elements with `tabindex=\"0\"`,\n * so screen readers announce them naturally and Tab navigates between them in\n * DOM order. There is no focus trap.\n *\n * @param options Options (menuId for `aria-controls`).\n * @returns A {@link MenuHandle} for interacting with the menu.\n */\nexport function setupMenu(options: SetupMenuOptions = {}): MenuHandle {\n const { menuId } = options;\n\n let trigger: HTMLElement | null = null;\n let menu: HTMLElement | null = null;\n let isOpenState = false;\n\n /** Handle-lifetime abort controller (typeahead, etc.). */\n const handleAbort = new AbortController();\n /** Per-registration controller for trigger listeners. */\n let triggerAbort: AbortController | null = null;\n /** Per-registration controller for menu list listeners. */\n let menuAbort: AbortController | null = null;\n /** List focus nav controller */\n let focusNav: ListFocusNavigationController | null = null;\n /** Menu handle */\n let handle: MenuHandle;\n\n /**\n * Shared typeahead controller (handle lifetime). Shared between the trigger and the\n * menu list so a character typed on the closed trigger lands in the same buffer that\n * in-menu typing reads.\n */\n const typeahead = createTypeahead(\n () => (menu ? createSelectorTreeWalker(menu, MENU_ITEM_SELECTOR) : null),\n getItemText,\n handleAbort.signal,\n );\n\n const subscribers: { [E in keyof MenuEventMap]: Set<(value: MenuEventMap[E]) => void> } = {\n open: new Set(),\n };\n\n function notify<E extends keyof MenuEventMap>(event: E, value: MenuEventMap[E]) {\n subscribers[event].forEach((cb) => cb(value));\n }\n\n /** Open the menu (if not already open), then navigate */\n function openAndGoTo(resolve: Parameters<ListFocusNavigationController['goTo']>[0]) {\n if (!isOpenState) handle.setOpen(true);\n focusNav?.goTo(resolve);\n }\n\n /**\n * Accumulate a printable key into the shared typeahead buffer, then navigate to the\n * matching item using `goToItem` (immediate, for use inside the open menu).\n * Returns the matched item, or `null` when nothing matches.\n */\n function handleTypeaheadInMenu(key: string, currentItem: HTMLElement | null): HTMLElement | null {\n const match = typeahead.handle(key, currentItem);\n if (match) focusNav?.goTo(() => match);\n return match;\n }\n\n handle = {\n get trigger() {\n return trigger;\n },\n\n setOpen(open: boolean) {\n if (isOpenState === open) return;\n isOpenState = open;\n if (trigger) trigger.setAttribute('aria-expanded', String(open));\n notify('open', open);\n },\n\n registerTrigger(el: HTMLElement) {\n if (trigger && trigger !== el) {\n triggerAbort?.abort();\n triggerAbort = null;\n }\n trigger = el;\n\n triggerAbort = new AbortController();\n const { signal } = triggerAbort;\n\n // Set ARIA attributes.\n trigger.setAttribute('aria-haspopup', 'true');\n trigger.setAttribute('aria-expanded', String(isOpenState));\n if (menuId) trigger.setAttribute('aria-controls', menuId);\n\n // Click toggles the menu. When opening via click, focus the first item.\n trigger.addEventListener(\n 'click',\n () => {\n if (!isOpenState) {\n openAndGoTo((n) => n.getFirst());\n } else {\n handle.setOpen(false);\n }\n },\n { signal },\n );\n\n // Native `<button>` fires `click` on Enter/Space; other elements (Chip, role=\"button\",\n // href-less `<a>`, …) don't, so we fire it manually.\n const needsManualActivation = trigger.tagName !== 'BUTTON';\n\n trigger.addEventListener(\n 'keydown',\n (event) => {\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n event.stopPropagation();\n openAndGoTo((n) => n.getFirst());\n break;\n\n case 'ArrowUp':\n event.preventDefault();\n event.stopPropagation();\n openAndGoTo((n) => n.getLast());\n break;\n\n case 'Enter':\n case ' ':\n // Native <button> already fires `click` on Enter/Space → skip to avoid double-toggle.\n if (!needsManualActivation) break;\n event.preventDefault();\n event.stopPropagation();\n el.click();\n break;\n\n default:\n // Printable char on closed trigger → open menu, focus matching item.\n // When open, the list-side handler owns typeahead (skip here to avoid\n // double-buffering the char).\n if (!isOpenState && isPrintableKey(event)) {\n event.preventDefault();\n event.stopPropagation();\n // Buffer the char; items don't exist yet, matches on flushPendingNavigation\n typeahead.handle(event.key, null);\n focusNav?.goTo((n) => typeahead.rematch(n.activeItem) ?? n.getFirst());\n handle.setOpen(true);\n }\n break;\n }\n },\n { signal },\n );\n\n return () => {\n if (trigger === el) {\n triggerAbort?.abort();\n triggerAbort = null;\n trigger = null;\n }\n };\n },\n\n registerMenu(el: HTMLElement) {\n if (menu && menu !== el) {\n menuAbort?.abort();\n menuAbort = null;\n }\n menu = el;\n\n menuAbort = new AbortController();\n const { signal } = menuAbort;\n\n // ── Focus navigation ──────────────────────────────────\n focusNav = createListFocusNavigation(\n {\n type: 'list',\n container: menu,\n itemSelector: MENU_ITEM_SELECTOR,\n wrap: true,\n getActiveItem: () => {\n const active = document.activeElement;\n if (!active || !el.contains(active)) return null;\n return active as HTMLElement;\n },\n },\n {\n onActivate: (item) => {\n item.focus({ preventScroll: false });\n },\n onDeactivate: () => {\n // No-op — focus moves naturally via item.focus().\n },\n onClear: () => {\n // No-op.\n },\n },\n signal,\n );\n\n // ── Keyboard handlers ─────────────────────────────────\n menu.addEventListener(\n 'keydown',\n (event) => {\n // Modifier+key combos other than Shift+Tab should pass through.\n if (event.altKey || event.ctrlKey || event.metaKey) return;\n\n switch (event.key) {\n case 'ArrowDown':\n event.preventDefault();\n event.stopPropagation();\n focusNav?.goDown();\n break;\n\n case 'ArrowUp':\n event.preventDefault();\n event.stopPropagation();\n focusNav?.goUp();\n break;\n\n case 'Home':\n event.preventDefault();\n event.stopPropagation();\n focusNav?.goTo((s) => s.getFirst());\n break;\n\n case 'End':\n event.preventDefault();\n event.stopPropagation();\n focusNav?.goTo((s) => s.getLast());\n break;\n\n case 'Escape':\n event.preventDefault();\n event.stopPropagation();\n // Focus trigger before closing: with closeMode=\"hide\" items unmount,\n // which would otherwise leave focus on body.\n trigger?.focus();\n handle.setOpen(false);\n break;\n\n case 'Tab': {\n // Tab-at-edge: close menu and move focus manually. The popover stays\n // mounted (closeMode=\"hide\") but items unmount on close, so the focused\n // item disappears before the browser resolves the next tab stop. Blur the\n // active item (so Popover skips focus-restore), close, then move focus\n // forward (Tab) or to the trigger (Shift+Tab).\n const items = getItems(el);\n if (items.length === 0) return;\n const idx = items.indexOf(document.activeElement as HTMLElement);\n if (idx === -1) return;\n\n if (event.shiftKey && idx === 0) {\n event.preventDefault();\n // Focus trigger explicitly for deterministic timing.\n trigger?.focus();\n handle.setOpen(false);\n } else if (!event.shiftKey && idx === items.length - 1) {\n event.preventDefault();\n // Blur active item so focusAnchorOnClose won't kick in.\n (document.activeElement as HTMLElement)?.blur();\n handle.setOpen(false);\n // After unmount, focus the next element after the trigger.\n setTimeout(() => {\n if (trigger) moveFocusAfterTrigger(trigger);\n }, 0);\n }\n break;\n }\n\n default:\n // Printable characters → typeahead among visible items, navigate immediately.\n if (isPrintableKey(event)) {\n const active = document.activeElement;\n const currentItem = active && el.contains(active) ? (active as HTMLElement) : null;\n const match = handleTypeaheadInMenu(event.key, currentItem);\n if (match) {\n event.preventDefault();\n event.stopPropagation();\n }\n }\n break;\n }\n },\n { signal },\n );\n\n return () => {\n if (menu === el) {\n menuAbort?.abort();\n menuAbort = null;\n menu = null;\n }\n };\n },\n\n flushPendingNavigation() {\n focusNav?.flushPendingNavigation();\n },\n\n subscribe<E extends keyof MenuEventMap>(event: E, listener: (value: MenuEventMap[E]) => void) {\n subscribers[event].add(listener);\n return () => {\n subscribers[event].delete(listener);\n };\n },\n\n destroy() {\n handleAbort.abort();\n triggerAbort?.abort();\n menuAbort?.abort();\n triggerAbort = null;\n menuAbort = null;\n trigger = null;\n menu = null;\n isOpenState = false;\n for (const set of Object.values(subscribers)) {\n set.clear();\n }\n },\n };\n\n return handle;\n}\n","import { defineComponent, onMounted, onUnmounted, ref, useSlots } from 'vue';\n\nimport { setupMenu } from '@lumx/core/js/components/Menu/setupMenu';\n\nimport { useId } from '../../composables/useId';\n\nimport { provideMenuContext } from './context';\n\n/** MenuProvider props. */\nexport interface MenuProviderProps {\n onOpen?: (isOpen: boolean) => void;\n class?: string;\n}\n\n/**\n * MenuProvider component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst MenuProvider = defineComponent(\n (props: MenuProviderProps, { emit }) => {\n const slots = useSlots();\n const menuId = useId();\n const triggerId = useId();\n const anchorRef = ref<HTMLElement | null>(null);\n const handle = setupMenu({ menuId });\n\n onMounted(() => {\n const unsub = handle.subscribe('open', (isOpen: boolean) => emit('open', isOpen));\n onUnmounted(() => {\n unsub();\n handle.destroy();\n });\n });\n\n provideMenuContext({ handle, menuId, triggerId, anchorRef });\n\n return () => slots.default?.();\n },\n {\n name: 'LumxMenuProvider',\n inheritAttrs: false,\n props: {\n onOpen: { type: Function as any, default: undefined },\n class: { type: String, default: undefined },\n },\n emits: ['open'],\n },\n);\n\nexport default MenuProvider;\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/** MenuTrigger props. */\nexport interface MenuTriggerProps extends HasClassName {\n /** Content of the trigger (label / icon / etc.). */\n children?: JSXElement;\n /** The id of the trigger element. */\n id?: string;\n /** The id of the menu container (for `aria-controls`). */\n menuId?: string;\n /** Whether the menu is currently open. */\n isOpen?: boolean;\n /** ref to the trigger element. */\n ref?: CommonRef;\n}\n\n/** Framework components injected by wrappers. */\nexport interface MenuTriggerComponents {\n /** Component to render as the trigger (e.g. Button, IconButton, Chip, link). */\n Trigger: any;\n}\n\nexport const COMPONENT_NAME = 'MenuTrigger';\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-menu-trigger';\n\n/** MenuTrigger core template. Renders `Trigger` with disclosure ARIA attributes. */\nexport const MenuTrigger = (props: MenuTriggerProps, { Trigger }: MenuTriggerComponents) => {\n const { children, className, menuId, isOpen, ref, ...forwardedProps } = props;\n\n return (\n <Trigger\n ref={ref}\n {...forwardedProps}\n className={classNames.join(className, CLASSNAME)}\n aria-haspopup=\"true\"\n aria-controls={menuId}\n aria-expanded={isOpen ? 'true' : 'false'}\n >\n {children}\n </Trigger>\n );\n};\n","import { onMounted, onUnmounted, ref, type Ref } from 'vue';\n\nimport type { MenuEventMap } from '@lumx/core/js/components/Menu/types';\n\nimport { useMenuContext } from './context';\n\nexport function useMenuEvent<E extends keyof MenuEventMap>(\n event: E,\n initialValue: MenuEventMap[E],\n): Ref<MenuEventMap[E]> {\n const { handle } = useMenuContext();\n const value = ref(initialValue) as Ref<MenuEventMap[E]>;\n\n let unsub: (() => void) | undefined;\n onMounted(() => {\n unsub = handle.subscribe(event, (v) => {\n value.value = v;\n });\n });\n onUnmounted(() => unsub?.());\n\n return value;\n}\n","import type { Ref } from 'vue';\n\nimport { useMenuEvent } from './useMenuEvent';\nimport { useMenuContext } from './context';\n\nexport function useMenuOpen(): [Ref<boolean>, (open: boolean) => void] {\n const { handle } = useMenuContext();\n const isOpen = useMenuEvent('open', false);\n\n const setIsOpen = (open: boolean) => handle.setOpen(open);\n\n return [isOpen, setIsOpen];\n}\n","import { defineComponent, ref, watchEffect } from 'vue';\n\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport {\n MenuTrigger as UI,\n MenuTriggerProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n} from '@lumx/core/js/components/Menu/MenuTrigger';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { Button } from '../button';\n\nimport { useMenuContext } from './context';\nimport { useMenuOpen } from './useMenuOpen';\n\n/** MenuTrigger props. */\nexport type MenuTriggerProps = VueToJSXProps<UIProps, 'menuId' | 'isOpen'>;\n\n/**\n * MenuTrigger component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst MenuTrigger = defineComponent(\n (props: MenuTriggerProps, { slots, attrs }) => {\n const { menuId, triggerId, anchorRef, handle } = useMenuContext();\n const [isOpen] = useMenuOpen();\n const className = useClassName(() => props.class);\n const internalRef = ref<any>(null);\n\n watchEffect((onCleanup) => {\n const domEl = internalRef.value?.$el ?? internalRef.value;\n if (!domEl) return;\n // Set menu popover anchor on the trigger\n (anchorRef as any).value = domEl;\n // Register the menu trigger element in core logic\n const cleanup = handle.registerTrigger(domEl);\n // Cleanup\n onCleanup(() => cleanup());\n });\n\n return () => {\n const { as, ...restAttrs } = attrs as Record<string, any>;\n\n let Trigger: any = Button;\n if (slots.trigger) {\n // Custom trigger via scoped slot\n Trigger = (slotProps: Record<string, any>) =>\n slots.trigger!({ triggerProps: { ...slotProps, ref: internalRef } });\n } else if (as) {\n // Use `as` prop, attr fallback, or default to Button\n Trigger = as;\n }\n\n return UI(\n {\n ...restAttrs,\n id: triggerId,\n ref: slots.trigger ? undefined : internalRef,\n className: className.value,\n menuId,\n isOpen: isOpen.value,\n children: slots.default?.() as JSXElement,\n },\n { Trigger },\n );\n };\n },\n {\n name: 'LumxMenuTrigger',\n inheritAttrs: false,\n props: keysOf<MenuTriggerProps>()('class', 'id'),\n },\n);\n\nexport { CLASSNAME, COMPONENT_NAME };\nexport default MenuTrigger;\n","import type { HasClassName, JSXElement, LumxClassName } from '../../types';\nimport type { Placement } from '../Popover/constants';\nimport { classNames } from '../../utils';\nimport { PopoverProps } from '../Popover';\n\n/** MenuPopover props. */\nexport interface MenuPopoverProps\n extends HasClassName,\n Pick<PopoverProps, 'placement' | 'anchorRef' | 'isOpen' | 'handleClose'> {\n /** Popover content (a `Menu`). */\n children?: JSXElement;\n}\n\n/** Framework components injected by wrappers. */\nexport interface MenuPopoverComponents {\n /** Popover component (framework-specific). */\n Popover: any;\n /** FlexBox component (framework-specific). */\n FlexBox: any;\n}\n\nexport const COMPONENT_NAME = 'MenuPopover';\n\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-menu-popover';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/** MenuPopover core template. Renders a `Popover` with menu-friendly defaults. */\nexport const MenuPopover = (props: MenuPopoverProps, { Popover, FlexBox }: MenuPopoverComponents) => {\n const {\n children,\n className,\n isOpen,\n placement = 'bottom-start' as Placement,\n anchorRef,\n handleClose,\n ...forwardedProps\n } = props;\n\n return (\n <Popover\n {...forwardedProps}\n placement={placement}\n anchorRef={anchorRef}\n isOpen={isOpen}\n onClose={handleClose}\n closeOnClickAway\n closeOnEscape\n usePortal={false}\n focusAnchorOnClose\n withFocusTrap={false}\n closeMode=\"hide\"\n fitToAnchorWidth={false}\n className={block([className])}\n >\n <FlexBox orientation=\"vertical\" className={element('scroll')}>\n {children}\n </FlexBox>\n </Popover>\n );\n};\n","import { defineComponent, useSlots } from 'vue';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport {\n MenuPopover as UI,\n MenuPopoverProps as UIProps,\n CLASSNAME as MENU_POPOVER_CLASSNAME,\n COMPONENT_NAME as MENU_POPOVER_COMPONENT_NAME,\n} from '@lumx/core/js/components/Menu/MenuPopover';\n\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { FlexBox } from '../flex-box';\nimport { Popover } from '../popover';\n\nimport { useMenuContext } from './context';\nimport { useMenuOpen } from './useMenuOpen';\n\n/** MenusPopover props. */\nexport type MenuPopoverProps = VueToJSXProps<UIProps, 'anchorRef' | 'isOpen' | 'handleClose'>;\n\n/**\n * MenuPopover component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst MenuPopover = defineComponent(\n (props: MenuPopoverProps) => {\n const slots = useSlots();\n const { anchorRef } = useMenuContext();\n const [isOpen, setIsOpen] = useMenuOpen();\n\n return () =>\n UI(\n {\n ...props,\n children: slots.default?.() as JSXElement,\n isOpen: isOpen.value,\n anchorRef,\n handleClose: () => setIsOpen(false),\n },\n { Popover, FlexBox },\n );\n },\n {\n name: 'LumxMenuPopover',\n inheritAttrs: false,\n props: keysOf<MenuPopoverProps>()('placement', 'class'),\n },\n);\n\nexport { MENU_POPOVER_CLASSNAME as CLASSNAME, MENU_POPOVER_COMPONENT_NAME as COMPONENT_NAME };\nexport default MenuPopover;\n","import type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\nimport { List } from '../List';\n\n/** Menu list props. */\nexport type MenuListProps = HasClassName & {\n /** Menu content (MenuItem, ListDivider, ListSection…). */\n children?: JSXElement;\n /** The id of the menu container element (matches `aria-controls` on the trigger). */\n id?: string;\n /** The id of the element that labels the menu (auto-set to the trigger id by wrappers). */\n 'aria-labelledby'?: string;\n /** ref to the root `<ul>` element. */\n ref?: CommonRef;\n};\n\nexport const COMPONENT_NAME = 'Menu';\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-menu';\n\n/** MenuList core template. Wraps `List` with menu-specific class and ARIA labelling. */\nexport const MenuList = (props: MenuListProps) => {\n const { 'aria-labelledby': ariaLabelledby, children, className, id, ref, ...rest } = props;\n\n return List({\n ...rest,\n ref,\n id,\n className: classNames.join(className, CLASSNAME),\n itemPadding: 'big',\n 'aria-labelledby': ariaLabelledby,\n children,\n } as any);\n};\n","import { defineComponent, nextTick, onMounted, onUnmounted, ref, useSlots, watch } from 'vue';\n\nimport type { JSXElement } from '@lumx/core/js/types';\nimport {\n MenuList as UI,\n MenuListProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n} from '@lumx/core/js/components/Menu/MenuList';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nimport { useMenuContext } from './context';\nimport { useMenuOpen } from './useMenuOpen';\n\n/** MenuList props. */\nexport type MenuListProps = VueToJSXProps<UIProps, 'id' | 'aria-labelledby'>;\n\n/**\n * MenuList component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst MenuList = defineComponent(\n (props: MenuListProps) => {\n const slots = useSlots();\n const { menuId, triggerId, handle } = useMenuContext();\n const [isOpen] = useMenuOpen();\n const className = useClassName(() => props.class);\n const internalRef = ref<HTMLElement | null>(null);\n\n onMounted(() => {\n const el = internalRef.value;\n if (!el) return;\n const cleanup = handle.registerMenu(el);\n onUnmounted(() => cleanup?.());\n });\n\n watch(isOpen, (open) => {\n if (open) nextTick(() => handle.flushPendingNavigation());\n });\n\n return () =>\n UI({\n className: className.value,\n id: menuId,\n 'aria-labelledby': triggerId,\n ref: internalRef,\n children: isOpen.value ? (slots.default?.() as JSXElement) : null,\n });\n },\n {\n name: 'LumxMenuList',\n inheritAttrs: false,\n props: keysOf<MenuListProps>()('class'),\n },\n);\n\nexport { CLASSNAME, COMPONENT_NAME };\nexport default MenuList;\n","import { defineComponent } from 'vue';\n\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport {\n DEFAULT_PROPS,\n MenuButton as UI,\n COMPONENT_NAME,\n MenuButtonProps as UIProps,\n type MenuButtonVariant,\n type MenuButtonVariantsProps,\n} from '@lumx/core/js/components/Menu/MenuButton';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nimport Button, { type ButtonProps } from '../button/Button';\nimport IconButton, { type IconButtonProps } from '../button/IconButton';\nimport Chip, { type ChipProps } from '../chip/Chip';\nimport Link, { type LinkProps } from '../link/Link';\n\nimport MenuProvider from './MenuProvider';\nimport MenuTrigger from './MenuTrigger';\nimport MenuPopover, { MenuPopoverProps } from './MenuPopover';\nimport MenuList from './MenuList';\n\n/** Props that MenuButton explicitly declares */\ntype MenuButtonBaseProps = VueToJSXProps<UIProps, 'children' | 'triggerProps' | 'onOpen'> & {\n /** Menu button label */\n label: string;\n /** Trigger variant */\n variant?: MenuButtonVariant;\n /** Menu popover props */\n popoverProps?: MenuPopoverProps;\n};\n\n/** MenuButton props — discriminated union over the variant to inherit the target component's props. */\nexport type MenuButtonProps = MenuButtonVariantsProps<\n MenuButtonBaseProps,\n {\n button: ButtonProps;\n 'icon-button': IconButtonProps;\n chip: ChipProps;\n link: LinkProps;\n }\n>;\n\n/** Menu trigger button component by variant */\nconst TRIGGER_COMPONENTS = {\n button: Button,\n 'icon-button': IconButton,\n chip: Chip,\n link: Link,\n} satisfies Record<MenuButtonVariant, unknown>;\n\n/**\n * MenuButton component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst MenuButton = defineComponent(\n (props: MenuButtonBaseProps, { emit, slots, attrs }) => {\n const className = useClassName(() => props.class);\n const onOpen = (isOpen: boolean) => emit('open', isOpen);\n\n return () => {\n const { variant = DEFAULT_PROPS.variant as MenuButtonVariant, label, popoverProps } = props;\n\n return UI(\n {\n label,\n children: slots.default?.() as JSXElement,\n popoverProps,\n onOpen,\n variant,\n triggerProps: { ...attrs, as: TRIGGER_COMPONENTS[variant], class: className.value },\n },\n { MenuProvider, MenuTrigger, MenuPopover, MenuList },\n );\n };\n },\n {\n name: 'LumxMenuButton',\n inheritAttrs: false,\n props: keysOf<MenuButtonBaseProps>()('label', 'popoverProps', 'class', 'variant'),\n emits: ['open'],\n },\n);\n\n/**\n * MenuButton component constructor.\n */\nexport interface MenuButtonConstructor {\n new (props: MenuButtonProps): {\n $props: MenuButtonProps;\n };\n}\n\n// Re-type the component to handle discriminated union in prop types\nexport default MenuButton as unknown as MenuButtonConstructor & typeof MenuButton;\nexport { COMPONENT_NAME };\n","import { mdiAlert, mdiAlertCircle, mdiCheckCircle, mdiClose, mdiInformation } from '@lumx/icons';\nimport { ColorPalette, Emphasis, Kind, Size } from '../../constants';\nimport type { JSXElement, LumxClassName, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport { Icon } from '../Icon';\nimport { IconButton } from '../Button/IconButton';\n\n/**\n * Defines the props of the component.\n */\nexport interface MessageProps extends HasClassName {\n /** Content. */\n children?: JSXElement;\n /** Whether the message has a background or not. */\n hasBackground?: boolean;\n /** Message variant. */\n kind?: Kind;\n /** Message custom icon SVG path. */\n icon?: string;\n /** Reference to the message container element. */\n ref?: CommonRef;\n /**\n * Displays a close button.\n *\n * NB: only available if `kind === 'info' && hasBackground === true`\n */\n closeButtonProps?: {\n /** The callback called when the button is clicked */\n onClick: () => void;\n /** The label of the close button. */\n label: string;\n };\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Message';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-message';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Associative map from message kind to color and icon.\n */\nexport const CONFIG = {\n [Kind.error]: { color: ColorPalette.red, icon: mdiAlert },\n [Kind.info]: { color: ColorPalette.blue, icon: mdiInformation },\n [Kind.success]: { color: ColorPalette.green, icon: mdiCheckCircle },\n [Kind.warning]: { color: ColorPalette.yellow, icon: mdiAlertCircle },\n};\n\n/**\n * Message component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Message = (props: MessageProps) => {\n const {\n children,\n className,\n hasBackground,\n kind,\n icon: customIcon,\n closeButtonProps,\n ref,\n ...forwardedProps\n } = props;\n const { color, icon } = CONFIG[kind as Kind] || {};\n const { onClick, label: closeButtonLabel } = closeButtonProps || {};\n const isCloseButtonDisplayed = hasBackground && kind === 'info' && onClick && closeButtonLabel;\n\n return (\n <div\n {...forwardedProps}\n ref={ref}\n className={classNames.join(\n className,\n block({\n [`color-${color}`]: Boolean(color),\n 'has-background': hasBackground,\n }),\n )}\n >\n {(customIcon || icon) &&\n Icon({ className: element('icon'), icon: customIcon || icon, size: Size.xs, color })}\n <div className={element('text')}>{children}</div>\n {isCloseButtonDisplayed &&\n IconButton({\n className: element('close-button'),\n icon: mdiClose,\n handleClick: onClick,\n label: closeButtonLabel,\n emphasis: Emphasis.low,\n })}\n </div>\n );\n};\n\nMessage.displayName = COMPONENT_NAME;\nMessage.className = CLASSNAME;\n","import { defineComponent, useAttrs } from 'vue';\nimport { Message as MessageUI, type MessageProps as UIProps } from '@lumx/core/js/components/Message';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type MessageProps = VueToJSXProps<Omit<UIProps, 'closeButtonProps'>> & {\n /** label to be used for the close button */\n closeButtonLabel?: string;\n};\n\nexport interface MessageEmits {\n /** event emited when the Message is closed through the Close Button */\n close: [];\n}\n\n/**\n * Message component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Message = defineComponent(\n (props: MessageProps, { slots, emit }) => {\n const attrs = useAttrs();\n const { closeButtonLabel } = props;\n const className = useClassName(() => props.class);\n\n return () => (\n <MessageUI\n {...props}\n {...attrs}\n className={className.value}\n children={slots.default?.() as JSXElement}\n closeButtonProps={\n closeButtonLabel\n ? {\n label: closeButtonLabel,\n onClick: () => emit('close'),\n }\n : undefined\n }\n />\n );\n },\n {\n name: 'Message',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<MessageProps>()('hasBackground', 'icon', 'kind', 'class', 'closeButtonLabel'),\n emits: ['close'],\n },\n);\n\nexport default Message;\n","/**\n * The base implementation of `_.slice` without an iteratee call guard.\n *\n * @private\n * @param {Array} array The array to slice.\n * @param {number} [start=0] The start position.\n * @param {number} [end=array.length] The end position.\n * @returns {Array} Returns the slice of `array`.\n */\nfunction baseSlice(array, start, end) {\n var index = -1,\n length = array.length;\n\n if (start < 0) {\n start = -start > length ? 0 : (length + start);\n }\n end = end > length ? length : end;\n if (end < 0) {\n end += length;\n }\n length = start > end ? 0 : ((end - start) >>> 0);\n start >>>= 0;\n\n var result = Array(length);\n while (++index < length) {\n result[index] = array[index + start];\n }\n return result;\n}\n\nmodule.exports = baseSlice;\n","var baseSlice = require('./_baseSlice'),\n toInteger = require('./toInteger');\n\n/**\n * Creates a slice of `array` with `n` elements taken from the beginning.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @param {number} [n=1] The number of elements to take.\n * @param- {Object} [guard] Enables use as an iteratee for methods like `_.map`.\n * @returns {Array} Returns the slice of `array`.\n * @example\n *\n * _.take([1, 2, 3]);\n * // => [1]\n *\n * _.take([1, 2, 3], 2);\n * // => [1, 2]\n *\n * _.take([1, 2, 3], 5);\n * // => [1, 2, 3]\n *\n * _.take([1, 2, 3], 0);\n * // => []\n */\nfunction take(array, n, guard) {\n if (!(array && array.length)) {\n return [];\n }\n n = (guard || n === undefined) ? 1 : toInteger(n);\n return baseSlice(array, 0, n < 0 ? 0 : n);\n}\n\nmodule.exports = take;\n","import take from 'lodash/take';\n\nimport { Alignment, AspectRatio } from '../../constants';\nimport type { CommonRef, HasClassName, LumxClassName, HasTheme } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface MosaicProps extends HasClassName, HasTheme {\n /** Thumbnails. */\n thumbnails: any[];\n /** On image click callback. */\n handleClick?(index: number): void;\n Thumbnail: any;\n ref?: CommonRef;\n}\n\nexport type MosaicPropsToOverride = 'Thumbnail' | 'thumbnails';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Mosaic';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-mosaic';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<MosaicProps> = {};\n\n/**\n * Mosaic component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Mosaic = (props: MosaicProps) => {\n const { className, theme, thumbnails, handleClick, Thumbnail, ref, ...forwardedProps } = props;\n const onImageClick = () => {\n if (!handleClick) return undefined;\n\n return (index: number, onClick?: any): any =>\n (event: any) => {\n onClick?.(event);\n handleClick?.(index);\n };\n };\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n 'has-1-thumbnail': thumbnails?.length === 1,\n 'has-2-thumbnails': thumbnails?.length === 2,\n 'has-3-thumbnails': thumbnails?.length === 3,\n 'has-4-thumbnails': thumbnails?.length >= 4,\n }),\n )}\n >\n <div className={element('wrapper')}>\n {take(thumbnails, 4).map((thumbnail: any, index: number) => {\n const { image, onClick, align, ...thumbnailProps } = thumbnail;\n\n return (\n <div key={index} className={element('thumbnail')}>\n <Thumbnail\n {...thumbnailProps}\n align={align || Alignment.left}\n image={image}\n theme={theme}\n aspectRatio={AspectRatio.free}\n fillHeight\n onClick={onImageClick()?.(index, onClick) || onClick}\n />\n\n {thumbnails.length > 4 && index === 3 && (\n <div className={element('overlay')}>\n <span>+{thumbnails.length - 4}</span>\n </div>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n};\n","import { defineComponent, useAttrs } from 'vue';\n\nimport {\n Mosaic as MosaicUI,\n type MosaicProps as UIProps,\n MosaicPropsToOverride,\n} from '@lumx/core/js/components/Mosaic';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { useHasEventListener } from '../../composables/useHasEventListener';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport Thumbnail, { type ThumbnailProps } from '../thumbnail/Thumbnail';\n\nexport type MosaicThumbnailItem = Omit<ThumbnailProps, 'class'> & { onClick?: (event: Event) => void };\n\nexport type MosaicProps = VueToJSXProps<UIProps, MosaicPropsToOverride> & {\n /** Thumbnails. */\n thumbnails: MosaicThumbnailItem[];\n};\n\nexport const emitSchema = {\n handleClick: (index: number) => typeof index === 'number',\n};\n\n/**\n * Mosaic component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Mosaic = defineComponent(\n (props: MosaicProps, { emit }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n const hasHandleClickListener = useHasEventListener('onHandleClick');\n\n const handleClick = (index: number) => {\n emit('handleClick', index);\n };\n\n return () => (\n <MosaicUI\n {...attrs}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n thumbnails={props.thumbnails}\n Thumbnail={Thumbnail}\n handleClick={hasHandleClickListener ? handleClick : undefined}\n />\n );\n },\n {\n name: 'LumxMosaic',\n inheritAttrs: false,\n props: keysOf<MosaicProps>()('thumbnails', 'theme', 'class'),\n emits: emitSchema,\n },\n);\n\nexport default Mosaic;\n","import type { HasAriaLabelOrLabelledBy, LumxClassName } from '../../types';\nimport type { PopoverProps } from '../Popover';\n\n/**\n * PopoverDialog props.\n * The PopoverDialog has the same props as the Popover but requires an accessible label.\n */\nexport type PopoverDialogProps = PopoverProps &\n HasAriaLabelOrLabelledBy & {\n /** Accessible label for the dialog (alternative to aria-label prop). */\n label?: string;\n };\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'PopoverDialog';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-popover-dialog';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<PopoverDialogProps> = {};\n","import { computed, defineComponent, mergeProps, useAttrs } from 'vue';\n\nimport {\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n type PopoverDialogProps as CorePopoverDialogProps,\n} from '@lumx/core/js/components/PopoverDialog';\nimport type { PopoverProps as CorePopoverProps } from '@lumx/core/js/components/Popover';\nimport { classNames } from '@lumx/core/js/utils';\nimport { useClassName } from '@lumx/vue/composables/useClassName';\n\nimport { keysOf } from '../../utils/VueToJSX';\nimport Popover, { type PopoverProps } from '../popover/Popover';\nimport HeadingLevelProvider from '../heading/HeadingLevelProvider';\n\n/**\n * Vue PopoverDialog props.\n * Extends the Vue Popover props with dialog-specific accessible label props from core.\n */\nexport type PopoverDialogProps = PopoverProps & Omit<CorePopoverDialogProps, keyof CorePopoverProps>;\n\nexport const emitSchema = {\n close: () => true,\n};\n\nconst PopoverDialog = defineComponent(\n (props: PopoverDialogProps, { emit, slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n // Vue normalizes hyphenated prop names to camelCase, so 'aria-label' prop becomes 'ariaLabel'.\n // We also check attrs for aria-label when it's not declared as a prop.\n const ariaLabel = computed(() => props.label ?? (props as any).ariaLabel ?? (attrs as any)['aria-label']);\n\n const handleClose = () => emit('close');\n\n return () => {\n const { label: _label, 'aria-label': _ariaLabel, class: _class, ...forwardedProps } = props;\n\n return (\n <Popover\n {...forwardedProps}\n {...mergeProps(attrs, { role: 'dialog', 'aria-modal': 'true', 'aria-label': ariaLabel.value })}\n class={classNames.join(CLASSNAME, className.value)}\n closeOnClickAway\n closeOnEscape\n withFocusTrap\n onClose={handleClose}\n >\n <HeadingLevelProvider level={2}>{slots.default?.()}</HeadingLevelProvider>\n </Popover>\n );\n };\n },\n {\n name: `Lumx${COMPONENT_NAME}`,\n inheritAttrs: false,\n props: keysOf<PopoverDialogProps>()(\n 'anchorRef',\n 'aria-label',\n 'aria-labelledby',\n 'as',\n 'boundaryRef',\n 'closeMode',\n 'closeOnClickAway',\n 'closeOnEscape',\n 'elevation',\n 'fitToAnchorWidth',\n 'fitWithinViewportHeight',\n 'focusAnchorOnClose',\n 'focusElement',\n 'hasArrow',\n 'width',\n 'minWidth',\n 'maxWidth',\n 'height',\n 'minHeight',\n 'maxHeight',\n 'isOpen',\n 'label',\n 'offset',\n 'parentElement',\n 'placement',\n 'usePortal',\n 'focusTrapZoneElement',\n 'withFocusTrap',\n 'zIndex',\n 'theme',\n 'class',\n ),\n emits: emitSchema,\n },\n);\n\nexport default PopoverDialog;\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n","import type { CommonRef, HasClassName, HasTheme, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface ProgressLinearProps extends HasTheme, HasClassName {\n /** Component ref */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ProgressLinear';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-progress-linear';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ProgressLinearProps> = {};\n\n/**\n * ProgressLinear component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const ProgressLinear = (props: ProgressLinearProps) => {\n const { className, theme, ref, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n <div className={element('line1')} />\n <div className={element('line2')} />\n </div>\n );\n};\n","import { defineComponent, useAttrs } from 'vue';\nimport {\n ProgressLinear as ProgressLinearUI,\n type ProgressLinearProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/ProgressLinear';\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, type VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type ProgressLinearProps = VueToJSXProps<UIProps, 'ref'>;\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\nconst ProgressLinear = defineComponent(\n (props: ProgressLinearProps) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n return () => {\n return (\n <ProgressLinearUI\n {...props}\n {...attrs}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n />\n );\n };\n },\n {\n name: 'LumxProgressLinear',\n inheritAttrs: false,\n props: keysOf<ProgressLinearProps>()('class', 'theme'),\n },\n);\n\nexport default ProgressLinear;\n","import type {\n JSXElement,\n LumxClassName,\n HasTheme,\n HasAriaDisabled,\n HasDisabled,\n HasClassName,\n HasChecked,\n CommonRef,\n} from '../../types';\nimport { classNames } from '../../utils';\nimport { InputLabel } from '../InputLabel';\nimport { InputHelper } from '../InputHelper';\n\n/**\n * Defines the props of the component.\n */\nexport interface RadioButtonProps extends HasTheme, HasClassName, HasAriaDisabled, HasDisabled, HasChecked {\n /** Helper text. */\n helper?: string;\n /** Native input id property. */\n id?: string;\n /** Label content. */\n label?: JSXElement;\n /** Native input name property. */\n name?: string;\n /** Native input value property. */\n value?: string;\n /** optional props for input */\n inputProps?: Record<string, any>;\n /** Native input ref. */\n inputRef?: CommonRef;\n /** Native input id. */\n inputId: string;\n /** On change callback. */\n handleChange?(value?: string, name?: string, event?: any): void;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'RadioButton';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-radio-button';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<RadioButtonProps> = {};\n\n/**\n * RadioButton component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const RadioButton = (props: RadioButtonProps) => {\n const {\n checked,\n className,\n helper,\n id,\n inputRef,\n isChecked = checked,\n label,\n name,\n ref,\n handleChange,\n theme,\n value,\n inputProps = {},\n isDisabled,\n inputId,\n ...forwardedProps\n } = props;\n\n const handleOnChange = (event: any) => {\n if (handleChange) {\n handleChange(value, name, event);\n }\n };\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n 'is-checked': isChecked,\n 'is-disabled': isDisabled,\n 'is-unchecked': !isChecked,\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n <div className={element('input-wrapper')}>\n <input\n ref={inputRef}\n className={element('input-native')}\n id={inputId}\n type=\"radio\"\n name={name}\n value={value}\n checked={isChecked}\n onChange={handleOnChange}\n aria-describedby={helper ? `${inputId}-helper` : undefined}\n {...(inputProps?.readOnly ? { readOnly: inputProps.readOnly } : {})}\n {...inputProps}\n />\n\n <div className={element('input-placeholder')}>\n <div className={element('input-background')} />\n <div className={element('input-indicator')} />\n </div>\n </div>\n\n <div className={element('content')}>\n {label && InputLabel({ htmlFor: inputId, className: element('label'), theme, children: label })}\n {helper &&\n InputHelper({ id: `${inputId}-helper`, className: element('helper'), theme, children: helper })}\n </div>\n </div>\n );\n};\n","import { computed, defineComponent, useAttrs } from 'vue';\n\nimport {\n RadioButton as RadioButtonUI,\n type RadioButtonProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/RadioButton';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { useId } from '../../composables/useId';\n\nexport type RadioButtonProps = VueToJSXProps<UIProps, 'inputId' | 'inputRef'>;\n\nexport const emitSchema = {\n change: (value?: string, name?: string, event?: Event) => event instanceof Event,\n};\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * RadioButton component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst RadioButton = defineComponent(\n (props: RadioButtonProps, { emit }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n const generatedInputId = useId();\n const inputId = computed(() => props.id || generatedInputId);\n\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(\n computed(() => ({ ...props, ...attrs })),\n );\n\n const handleChange = (value?: string, name?: string, event?: any) => {\n if (isAnyDisabled.value) {\n return;\n }\n\n emit('change', value, name, event);\n };\n\n return () => {\n return (\n <RadioButtonUI\n {...otherProps.value}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n inputId={inputId.value}\n isDisabled={isAnyDisabled.value}\n handleChange={handleChange}\n label={props.label}\n inputProps={{\n ...props.inputProps,\n ...disabledStateProps.value,\n readOnly: disabledStateProps.value['aria-disabled'],\n }}\n />\n );\n };\n },\n {\n name: 'RadioButton',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<RadioButtonProps>()(\n 'checked',\n 'class',\n 'disabled',\n 'helper',\n 'id',\n 'inputProps',\n 'isChecked',\n 'isDisabled',\n 'label',\n 'name',\n 'theme',\n 'value',\n 'aria-disabled',\n ),\n emits: emitSchema,\n },\n);\n\nexport default RadioButton;\n","import type { JSXElement, LumxClassName, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface RadioGroupProps extends HasClassName {\n /** RadioButton elements */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'RadioGroup';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-radio-group';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<RadioGroupProps> = {};\n\n/**\n * RadioGroup component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const RadioGroup = (props: RadioGroupProps) => {\n const { children, className, ref, ...forwardedProps } = props;\n\n return (\n <div ref={ref} {...forwardedProps} className={classNames.join(className, CLASSNAME)}>\n {children}\n </div>\n );\n};\n\nRadioGroup.displayName = COMPONENT_NAME;\nRadioGroup.className = CLASSNAME;\nRadioGroup.defaultProps = DEFAULT_PROPS;\n","import { defineComponent, useAttrs } from 'vue';\n\nimport { RadioGroup as RadioGroupUI, CLASSNAME, COMPONENT_NAME } from '@lumx/core/js/components/RadioGroup';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, type ClassValue } from '../../utils/VueToJSX';\n\nexport interface RadioGroupProps {\n /** CSS class name */\n class?: ClassValue;\n}\n\nexport { CLASSNAME, COMPONENT_NAME };\n\n/**\n * RadioGroup component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst RadioGroup = defineComponent(\n (props: RadioGroupProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n return () => (\n <RadioGroupUI\n {...props}\n {...attrs}\n className={className.value}\n children={slots.default?.() as JSXElement}\n />\n );\n },\n {\n name: 'RadioGroup',\n inheritAttrs: false,\n props: keysOf<RadioGroupProps>()('class'),\n },\n);\n\nexport default RadioGroup;\n","import type { LumxClassName, HasTheme, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport type { GlobalSize, ColorPalette } from '../../constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface SkeletonCircleProps extends HasTheme, HasClassName {\n /** Size variant. */\n size: GlobalSize;\n /** The color of the skeleton. */\n color?: ColorPalette;\n /** Reference to the root element. */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'SkeletonCircle';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-skeleton-circle';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<SkeletonCircleProps> = {};\n\n/**\n * SkeletonCircle component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const SkeletonCircle = (props: SkeletonCircleProps) => {\n const { className, size, color, theme, ref, ...forwardedProps } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`size-${size}`]: Boolean(size),\n [`color-${color}`]: Boolean(color),\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n />\n );\n};\n","import type { LumxClassName, HasTheme, HasClassName, CommonRef, ValueOf } from '../../types';\nimport { classNames } from '../../utils';\nimport type { GlobalSize, ColorPalette, AspectRatio } from '../../constants';\n\n/**\n * Skeleton variants.\n */\nexport const SkeletonRectangleVariant = { squared: 'squared', rounded: 'rounded', pill: 'pill' } as const;\nexport type SkeletonRectangleVariant = ValueOf<typeof SkeletonRectangleVariant>;\n\n/**\n * Defines the props of the component.\n */\nexport interface SkeletonRectangleProps extends HasTheme, HasClassName {\n /** Aspect ratio (use with width and not height). */\n aspectRatio?: Extract<AspectRatio, 'square' | 'horizontal' | 'vertical' | 'wide'>;\n /** Height size. */\n height?: GlobalSize;\n /** Border variant. */\n variant?: SkeletonRectangleVariant;\n /** Width size. */\n width?: GlobalSize;\n /** The color of the skeleton. */\n color?: ColorPalette;\n /** Reference to the root element. */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'SkeletonRectangle';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-skeleton-rectangle';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<SkeletonRectangleProps> = {\n variant: SkeletonRectangleVariant.squared,\n};\n\n/**\n * SkeletonRectangle component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const SkeletonRectangle = (props: SkeletonRectangleProps) => {\n const {\n aspectRatio,\n className,\n height,\n theme,\n variant = DEFAULT_PROPS.variant,\n width,\n color,\n ref,\n ...forwardedProps\n } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`aspect-ratio-${aspectRatio}`]: Boolean(aspectRatio),\n [`height-${height}`]: Boolean(aspectRatio ? undefined : height),\n [`theme-${theme}`]: Boolean(theme),\n [`variant-${variant}`]: Boolean(variant),\n [`width-${width}`]: Boolean(width),\n [`color-${color}`]: Boolean(color),\n }),\n )}\n >\n <div className={element('inner')} />\n </div>\n );\n};\n","import { defineComponent, useAttrs } from 'vue';\n\nimport {\n SkeletonCircle as SkeletonCircleUI,\n type SkeletonCircleProps as UIProps,\n SKELETON_CIRCLE_CLASSNAME as CLASSNAME,\n SKELETON_CIRCLE_COMPONENT_NAME as COMPONENT_NAME,\n SKELETON_CIRCLE_DEFAULT_PROPS as DEFAULT_PROPS,\n} from '@lumx/core/js/components/Skeleton';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type SkeletonCircleProps = VueToJSXProps<UIProps>;\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * SkeletonCircle component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst SkeletonCircle = defineComponent(\n (props: SkeletonCircleProps) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n return () => {\n return (\n <SkeletonCircleUI\n {...props}\n {...attrs}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n />\n );\n };\n },\n {\n name: 'LumxSkeletonCircle',\n inheritAttrs: false,\n props: keysOf<SkeletonCircleProps>()('class', 'size', 'color', 'theme'),\n },\n);\n\nexport default SkeletonCircle;\n","import { defineComponent, useAttrs } from 'vue';\n\nimport {\n SkeletonRectangle as SkeletonRectangleUI,\n type SkeletonRectangleProps as UIProps,\n SkeletonRectangleVariant,\n SKELETON_RECTANGLE_CLASSNAME as CLASSNAME,\n SKELETON_RECTANGLE_COMPONENT_NAME as COMPONENT_NAME,\n SKELETON_RECTANGLE_DEFAULT_PROPS as DEFAULT_PROPS,\n} from '@lumx/core/js/components/Skeleton';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type SkeletonRectangleProps = VueToJSXProps<UIProps>;\n\nexport { SkeletonRectangleVariant, CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * SkeletonRectangle component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst SkeletonRectangle = defineComponent(\n (props: SkeletonRectangleProps) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n return () => {\n return (\n <SkeletonRectangleUI\n {...props}\n {...attrs}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n />\n );\n };\n },\n {\n name: 'SkeletonRectangle',\n inheritAttrs: false,\n props: keysOf<SkeletonRectangleProps>()('class', 'aspectRatio', 'height', 'variant', 'width', 'color', 'theme'),\n },\n);\n\nexport default SkeletonRectangle;\n","import { defineComponent, useAttrs } from 'vue';\n\nimport {\n SkeletonTypography as SkeletonTypographyUI,\n type SkeletonTypographyProps as UIProps,\n SKELETON_TYPOGRAPHY_CLASSNAME as CLASSNAME,\n SKELETON_TYPOGRAPHY_COMPONENT_NAME as COMPONENT_NAME,\n SKELETON_TYPOGRAPHY_DEFAULT_PROPS as DEFAULT_PROPS,\n} from '@lumx/core/js/components/Skeleton';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type SkeletonTypographyProps = VueToJSXProps<UIProps>;\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * SkeletonTypography component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst SkeletonTypography = defineComponent(\n (props: SkeletonTypographyProps) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n return () => {\n return (\n <SkeletonTypographyUI\n {...props}\n {...attrs}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n />\n );\n };\n },\n {\n name: 'LumxSkeletonTypography',\n inheritAttrs: false,\n props: keysOf<SkeletonTypographyProps>()('class', 'typography', 'width', 'color', 'theme', 'style'),\n },\n);\n\nexport default SkeletonTypography;\n","import type {\n JSXElement,\n LumxClassName,\n HasTheme,\n HasAriaDisabled,\n HasDisabled,\n HasClassName,\n HasChecked,\n CommonRef,\n} from '../../types';\nimport { classNames } from '../../utils';\nimport { InputLabel } from '../InputLabel';\nimport { InputHelper } from '../InputHelper';\n\n/**\n * Defines the props of the component.\n */\nexport interface SwitchProps extends HasTheme, HasClassName, HasAriaDisabled, HasDisabled, HasChecked {\n /** Helper text. */\n helper?: string;\n /** Native input id property. */\n id?: string;\n /** Label text. */\n label?: JSXElement;\n /** Native input name property. */\n name?: string;\n /** Native input value property. */\n value?: string;\n /** optional props for input */\n inputProps?: Record<string, any>;\n /** Native input ref. */\n inputRef?: CommonRef;\n /** Native input id. */\n inputId: string;\n /** On change callback. */\n handleChange?(isChecked: boolean, value?: string, name?: string, event?: any): void;\n /** Position of the switch relative to the label. */\n position?: 'left' | 'right';\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Switch';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-switch';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<SwitchProps> = {\n position: 'left',\n};\n\n/**\n * Switch component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const Switch = (props: SwitchProps) => {\n const {\n checked,\n className,\n helper,\n id,\n inputRef,\n isChecked = checked,\n label,\n name,\n ref,\n handleChange,\n theme,\n value,\n inputProps = {},\n isDisabled,\n inputId,\n position = DEFAULT_PROPS.position,\n ...forwardedProps\n } = props;\n\n const handleOnChange = (event: any) => {\n if (handleChange) {\n handleChange(!isChecked, value, name, event);\n }\n };\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n 'is-checked': isChecked,\n 'is-disabled': isDisabled,\n 'is-unchecked': !isChecked,\n [`position-${position}`]: Boolean(position),\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n <div className={element('input-wrapper')}>\n <input\n ref={inputRef}\n type=\"checkbox\"\n role=\"switch\"\n id={inputId}\n className={element('input-native')}\n name={name}\n value={value}\n checked={Boolean(isChecked)}\n onChange={handleOnChange}\n aria-describedby={helper ? `${inputId}-helper` : undefined}\n aria-checked={Boolean(isChecked)}\n {...(inputProps?.readOnly ? { readOnly: inputProps.readOnly } : {})}\n {...inputProps}\n />\n\n <div className={element('input-placeholder')}>\n <div className={element('input-background')} />\n <div className={element('input-indicator')} />\n </div>\n </div>\n\n <div className={element('content')}>\n {label && InputLabel({ htmlFor: inputId, className: element('label'), theme, children: label })}\n {helper &&\n InputHelper({ id: `${inputId}-helper`, className: element('helper'), theme, children: helper })}\n </div>\n </div>\n );\n};\n","import { computed, defineComponent, useAttrs } from 'vue';\n\nimport {\n Switch as SwitchUI,\n type SwitchProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Switch';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { useId } from '../../composables/useId';\nimport { JSXElement } from '@lumx/core/js/types';\n\nexport type SwitchProps = VueToJSXProps<UIProps, 'inputId' | 'inputRef'>;\n\nexport const emitSchema = {\n change: (isChecked: boolean, value?: string, name?: string, event?: Event) =>\n typeof isChecked === 'boolean' && event instanceof Event,\n};\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * Switch component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Switch = defineComponent(\n (props: SwitchProps, { emit, slots }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n const generatedInputId = useId();\n const inputId = computed(() => props.id || generatedInputId);\n\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(\n computed(() => ({ ...props, ...attrs })),\n );\n\n const handleChange = (isChecked: boolean, value?: string, name?: string, event?: any) => {\n if (isAnyDisabled.value) {\n return;\n }\n\n emit('change', isChecked, value, name, event);\n };\n\n return () => {\n return (\n <SwitchUI\n {...otherProps.value}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n inputId={inputId.value}\n isDisabled={isAnyDisabled.value}\n handleChange={handleChange}\n label={(props.label || slots.default?.()) as JSXElement}\n inputProps={{\n ...props.inputProps,\n ...disabledStateProps.value,\n readOnly: isAnyDisabled.value,\n }}\n />\n );\n };\n },\n {\n name: 'LumxSwitch',\n inheritAttrs: false,\n // Redefine properties so that they come in as `props` on the `defineComponent` function\n props: keysOf<SwitchProps>()(\n 'checked',\n 'class',\n 'disabled',\n 'helper',\n 'id',\n 'inputProps',\n 'isChecked',\n 'isDisabled',\n 'label',\n 'name',\n 'position',\n 'theme',\n 'value',\n 'aria-disabled',\n ),\n emits: emitSchema,\n },\n);\n\nexport default Switch;\n","import { AspectRatio, Size } from '../../constants';\nimport type {\n HasClassName,\n HasDisabled,\n LumxClassName,\n HasTheme,\n ValueOf,\n HasAriaDisabled,\n CommonRef,\n} from '../../types';\nimport { classNames } from '../../utils';\nimport { Icon } from '../Icon';\n\n/**\n * Uploader variants.\n */\nexport const UploaderVariant = {\n square: 'square',\n rounded: 'rounded',\n circle: 'circle',\n} as const;\nexport type UploaderVariant = ValueOf<typeof UploaderVariant>;\n\n/**\n * Uploader sizes.\n */\nexport type UploaderSize = Extract<Size, 'xl' | 'xxl'>;\n\n/**\n * Native input file props (framework-agnostic subset).\n */\ntype FileInputProps = Record<string, any>;\n\n/**\n * Defines the props of the component.\n */\nexport interface UploaderProps extends HasClassName, HasDisabled, HasTheme, HasAriaDisabled {\n /** Image aspect ratio. */\n aspectRatio?: AspectRatio;\n /** Icon (SVG path). */\n icon?: string;\n /** Label text. */\n label?: string;\n /** Size variant. */\n size?: UploaderSize;\n /** Variant. */\n variant?: UploaderVariant;\n /** On click callback. */\n handleClick?: (event: any) => void;\n /** Handle file selection with a native input file. */\n fileInputProps?: FileInputProps;\n /** Forwarded ref to the root element. */\n ref?: CommonRef;\n /** Whether the component is disabled (computed from `isDisabled` and `aria-disabled`). */\n isAnyDisabled?: boolean;\n /** Id of the hidden file input (used to link the label `for` attribute). */\n inputId: string;\n /** Whether a file is currently being dragged over the input. */\n isDragHovering?: boolean;\n /** Callback fired when the file input value changes. */\n handleChange?: (event: any) => void;\n /** Root element tag or component (e.g. `'button'` or `'label'`). */\n Component: 'button' | 'label';\n}\n\nexport type UploaderPropsToOverride = 'isAnyDisabled' | 'inputId' | 'isDragHovering' | 'fileInputProps' | 'Component';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Uploader';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-uploader';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<UploaderProps> = {\n aspectRatio: AspectRatio.horizontal,\n size: Size.xl,\n variant: UploaderVariant.square,\n};\n\n/**\n * Uploader component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Uploader = (props: UploaderProps) => {\n const {\n aspectRatio = DEFAULT_PROPS.aspectRatio,\n className,\n label,\n icon,\n size = DEFAULT_PROPS.size,\n theme,\n variant = DEFAULT_PROPS.variant,\n isAnyDisabled,\n fileInputProps,\n inputId,\n isDragHovering,\n handleClick,\n handleChange,\n Component = 'label',\n ref,\n ...forwardedProps\n } = props;\n // Adjust to square aspect ratio when using circle variants.\n const adjustedAspectRatio = variant === UploaderVariant.circle ? AspectRatio.square : aspectRatio;\n\n return (\n <Component\n ref={ref as any}\n {...forwardedProps}\n onClick={handleClick}\n className={classNames.join(\n className,\n block({\n [`aspect-ratio-${adjustedAspectRatio}`]: Boolean(adjustedAspectRatio),\n [`size-${size}`]: Boolean(size),\n [`theme-${theme}`]: Boolean(theme),\n [`variant-${variant}`]: Boolean(variant),\n 'is-drag-hovering': isDragHovering,\n 'is-disabled': isAnyDisabled,\n }),\n )}\n >\n <span className={element('background')} />\n\n <span className={element('wrapper')}>\n {icon && Icon({ className: element('icon'), icon, size: Size.s })}\n\n {label && <span className={element('label')}>{label}</span>}\n </span>\n\n {fileInputProps && (\n <input\n type=\"file\"\n id={inputId}\n className={classNames.join(element('input'), classNames.visuallyHidden())}\n {...fileInputProps}\n onChange={handleChange}\n />\n )}\n </Component>\n );\n};\n","import { computed, defineComponent, ref, useAttrs } from 'vue';\n\nimport {\n Uploader as UploaderUI,\n UploaderVariant,\n DEFAULT_PROPS,\n CLASSNAME,\n COMPONENT_NAME,\n} from '@lumx/core/js/components/Uploader';\nimport type { UploaderProps as UIProps, UploaderPropsToOverride } from '@lumx/core/js/components/Uploader';\nimport type { UploaderSize } from '@lumx/core/js/components/Uploader';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { useId } from '../../composables/useId';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\ntype VueFileInputProps = {\n /** Accepted file types. */\n accept?: string;\n /** Whether multiple files can be selected. */\n multiple?: boolean;\n /** Camera capture mode. */\n capture?: boolean | 'user' | 'environment';\n /** Native input id (generated if not provided). */\n id?: string;\n};\n\nexport type UploaderProps = VueToJSXProps<UIProps, UploaderPropsToOverride> & {\n /** Handle file selection with a native input file. */\n fileInputProps?: VueFileInputProps;\n};\n\nexport const emitSchema = {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n change: (_files: File[], _event?: Event) => true,\n};\n\nexport type { UploaderSize };\nexport { UploaderVariant, DEFAULT_PROPS, CLASSNAME, COMPONENT_NAME };\n\n/**\n * Uploader component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst Uploader = defineComponent(\n (props: UploaderProps, { emit }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n const generatedInputId = useId();\n const inputId = computed(() => props.fileInputProps?.id || generatedInputId);\n const isDragHovering = ref(false);\n\n const { isAnyDisabled, disabledStateProps, otherProps } = useDisableStateProps(\n computed(() => ({ ...props, ...attrs })),\n );\n\n const handleClick = (event: MouseEvent) => {\n if (isAnyDisabled.value) {\n event.preventDefault();\n return;\n }\n event.stopImmediatePropagation();\n (attrs as any).onClick?.(event);\n };\n\n const handleChange = (event: Event) => {\n if (isAnyDisabled.value) return;\n event.stopImmediatePropagation();\n const input = event.target as HTMLInputElement;\n const files = input.files ? Array.from(input.files) : [];\n emit('change', files, event);\n };\n\n return () => {\n const hasFileInput = Boolean(props.fileInputProps);\n const {\n onClick: _onClick,\n fileInputProps: _fp,\n class: _class,\n theme: _theme,\n ...restProps\n } = otherProps.value as any;\n\n return (\n <UploaderUI\n {...restProps}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n inputId={inputId.value}\n isAnyDisabled={isAnyDisabled.value}\n isDragHovering={isDragHovering.value}\n handleClick={handleClick}\n handleChange={handleChange}\n Component={hasFileInput ? 'label' : 'button'}\n fileInputProps={{\n ...props.fileInputProps,\n ...disabledStateProps.value,\n readonly: isAnyDisabled.value,\n onDrop: () => {\n isDragHovering.value = false;\n },\n onDragleave: () => {\n isDragHovering.value = false;\n },\n onDragenter: () => {\n isDragHovering.value = true;\n },\n }}\n {...(hasFileInput ? { htmlFor: inputId.value } : { type: 'button', ...disabledStateProps.value })}\n />\n );\n };\n },\n {\n name: 'LumxUploader',\n inheritAttrs: false,\n props: keysOf<UploaderProps>()(\n 'class',\n 'theme',\n 'aspectRatio',\n 'icon',\n 'label',\n 'size',\n 'variant',\n 'isDisabled',\n 'disabled',\n 'aria-disabled',\n 'fileInputProps',\n ),\n emits: emitSchema,\n },\n);\n\nexport default Uploader;\n","import { Alignment, HorizontalAlignment, Size } from '../../constants';\nimport type { CommonRef, HasClassName, JSXElement, LumxClassName, GenericProps, HasTheme, ValueOf } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { ImageCaptionMetadata, ImageCaptionPropsToOverride } from './ImageCaption';\n\n/**\n * Image block variants.\n */\nexport const ImageBlockCaptionPosition = {\n below: 'below',\n over: 'over',\n} as const;\nexport type ImageBlockCaptionPosition = ValueOf<typeof ImageBlockCaptionPosition>;\n\n/**\n * Image block sizes.\n */\nexport type ImageBlockSize = Extract<Size, 'xl' | 'xxl'>;\n\n/**\n * Defines the props of the component.\n */\nexport interface ImageBlockProps\n extends HasClassName,\n HasTheme,\n Omit<ImageCaptionMetadata, ImageCaptionPropsToOverride> {\n /** Action toolbar content. */\n actions?: JSXElement;\n /** Alignment. */\n align?: HorizontalAlignment;\n /** Image alternative text. */\n alt: string;\n /** Caption position. */\n captionPosition?: ImageBlockCaptionPosition;\n /** Whether the image has to fill its container height or not. */\n fillHeight?: boolean;\n /** Image URL. */\n image: string;\n /** Size variant. */\n size?: ImageBlockSize;\n /** Props to pass to the thumbnail (minus those already set by the ImageBlock props). */\n thumbnailProps?: GenericProps;\n /** reference to the root element */\n ref?: CommonRef;\n /** component for rendering the thumbnail */\n Thumbnail: any;\n /** component for rendering the image caption */\n ImageCaption: any;\n}\n\nexport type ImageBlockPropsToOverride = 'Thumbnail' | 'ImageCaption' | 'thumbnailProps';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'ImageBlock';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-image-block';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<ImageBlockProps> = {\n captionPosition: ImageBlockCaptionPosition.below,\n align: Alignment.left,\n};\n\n/**\n * ImageBlock component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const ImageBlock = (props: ImageBlockProps) => {\n const {\n actions,\n align = DEFAULT_PROPS.align,\n alt,\n captionPosition = DEFAULT_PROPS.captionPosition,\n captionStyle,\n className,\n description,\n descriptionProps,\n fillHeight,\n image,\n size,\n tags,\n ref,\n theme,\n thumbnailProps,\n title,\n titleProps,\n Thumbnail,\n ImageCaption,\n ...forwardedProps\n } = props;\n return (\n <figure\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`caption-position-${captionPosition}`]: Boolean(captionPosition),\n [`align-${align}`]: Boolean(align),\n [`size-${size}`]: Boolean(size),\n [`theme-${theme}`]: Boolean(theme),\n 'fill-height': fillHeight,\n }),\n )}\n >\n <Thumbnail\n {...thumbnailProps}\n className={classNames.join(element('image'), thumbnailProps?.className)}\n fillHeight={fillHeight}\n align={align}\n image={image}\n size={size}\n theme={theme}\n alt={(alt || title) as string}\n />\n <ImageCaption\n as=\"figcaption\"\n baseClassName={CLASSNAME}\n theme={theme}\n title={title}\n titleProps={titleProps}\n description={description}\n descriptionProps={descriptionProps}\n tags={tags}\n captionStyle={captionStyle}\n align={align}\n truncate={captionPosition === 'over'}\n />\n {actions && <div className={element('actions')}>{actions}</div>}\n </figure>\n );\n};\n","import { HorizontalAlignment } from '../../constants';\nimport { GenericProps, HasPolymorphicAs, HasTheme, JSXElement } from '../../types';\nimport { classNames } from '../../utils';\n\nexport type As = 'div' | 'figcaption';\n\nexport type ImageCaptionMetadata = {\n /** Image title to display in the caption. */\n title?: string;\n /** Props to pass to the title. */\n titleProps?: GenericProps;\n /** Image description. Can be either a string, ReactNode, or sanitized html object. */\n description?: JSXElement | { __html: string };\n /** Props to pass to the description. */\n descriptionProps?: GenericProps;\n /** Tag content. */\n tags?: JSXElement;\n /** Caption custom CSS style. */\n captionStyle?: GenericProps;\n /** Props to pass to the wrapper FlexBox element. */\n wrapperProps?: GenericProps;\n /** FlexBox component injected by the framework wrapper (React or Vue). */\n FlexBox: any;\n /** Text component injected by the framework wrapper (React or Vue). */\n Text: any;\n};\n\nexport type ImageCaptionPropsToOverride = 'FlexBox' | 'Text' | 'wrapperProps';\n\nexport type ImageCaptionProps<AS extends As = 'figcaption'> = HasTheme &\n HasPolymorphicAs<AS> &\n ImageCaptionMetadata & {\n /** Base className for sub elements */\n baseClassName?: string;\n /** Alignment. */\n align?: HorizontalAlignment;\n /** Truncate text on title & description (no line wrapping). */\n truncate?: boolean;\n };\n\n/** Internal component used to render image captions */\nexport const ImageCaption = <AS extends As>(props: ImageCaptionProps<AS>) => {\n const {\n baseClassName,\n theme,\n as = 'figcaption',\n title,\n titleProps,\n description,\n descriptionProps,\n tags,\n captionStyle,\n align,\n truncate,\n FlexBox,\n Text,\n wrapperProps = { vAlign: align, hAlign: align === 'center' ? align : undefined },\n } = props;\n\n if (!title && !description && !tags) return null;\n\n const titleColor = { color: theme === 'dark' ? 'light' : 'dark' } as const;\n const baseColor = { color: theme === 'dark' ? 'light' : 'dark', colorVariant: 'L2' } as const;\n\n return (\n <FlexBox\n as={as}\n className={classNames.join(baseClassName && `${baseClassName}__wrapper`)}\n style={captionStyle}\n orientation=\"vertical\"\n gap=\"regular\"\n {...wrapperProps}\n >\n {(title || description) && (\n <Text\n as=\"p\"\n className={classNames.join(baseClassName && `${baseClassName}__caption`)}\n truncate={truncate}\n {...baseColor}\n >\n {title && (\n <Text\n {...titleProps}\n as=\"span\"\n className={classNames.join(\n titleProps?.className,\n baseClassName && `${baseClassName}__title`,\n )}\n typography=\"subtitle1\"\n {...titleColor}\n >\n {title}\n </Text>\n )}{' '}\n {description &&\n (typeof description === 'object' && '__html' in description ? (\n <Text\n {...descriptionProps}\n as=\"span\"\n className={classNames.join(\n descriptionProps?.className,\n baseClassName && `${baseClassName}__description`,\n )}\n typography=\"body1\"\n dangerouslySetInnerHTML={description as { __html: string }}\n />\n ) : (\n <Text\n {...descriptionProps}\n as=\"span\"\n className={classNames.join(\n descriptionProps?.className,\n baseClassName && `${baseClassName}__description`,\n )}\n typography=\"body1\"\n >\n {description as any}\n </Text>\n ))}\n </Text>\n )}\n {tags && (\n <FlexBox\n className={classNames.join(baseClassName && `${baseClassName}__tags`)}\n orientation=\"horizontal\"\n vAlign={align}\n >\n {tags}\n </FlexBox>\n )}\n </FlexBox>\n );\n};\n","import { defineComponent } from 'vue';\n\nimport { ImageCaption as UI } from '@lumx/core/js/components/ImageBlock/ImageCaption';\nimport { type HorizontalAlignment, type Theme } from '@lumx/core/js/constants';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { keysOf, type ClassValue } from '../../utils/VueToJSX';\nimport { FlexBox } from '../flex-box';\nimport { Text } from '../text';\n\ntype ImageCaptionProps = {\n as?: 'div' | 'figcaption';\n align?: HorizontalAlignment;\n baseClassName?: string;\n captionStyle?: Record<string, any>;\n class?: ClassValue;\n description?: any;\n descriptionProps?: Record<string, any>;\n tags?: any;\n theme?: Theme;\n title?: string;\n titleProps?: Record<string, any>;\n truncate?: boolean;\n};\n\n/** Internal component used to render image captions */\nconst ImageCaption = defineComponent(\n (props: ImageCaptionProps) => {\n const defaultTheme = useTheme();\n\n return () => {\n const { class: _class, theme, align, ...restProps } = props as any;\n return (\n <UI\n {...(restProps as any)}\n align={align}\n theme={theme || defaultTheme.value}\n FlexBox={FlexBox}\n Text={Text}\n wrapperProps={{ verticalAlign: align, horizontalAlign: align === 'center' ? align : undefined }}\n />\n );\n };\n },\n {\n name: 'LumxImageCaption',\n inheritAttrs: false,\n props: keysOf<ImageCaptionProps>()(\n 'align',\n 'as',\n 'baseClassName',\n 'captionStyle',\n 'class',\n 'description',\n 'descriptionProps',\n 'tags',\n 'theme',\n 'title',\n 'titleProps',\n 'truncate',\n ),\n },\n);\n\nexport default ImageCaption;\n","import { defineComponent, useAttrs } from 'vue';\n\nimport {\n ImageBlock as UI,\n type ImageBlockProps as UIProps,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n ImageBlockCaptionPosition,\n ImageBlockPropsToOverride,\n} from '@lumx/core/js/components/ImageBlock';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { Thumbnail, ThumbnailProps } from '../thumbnail';\nimport ImageCaption from './ImageCaption';\n\nexport type ImageBlockProps = Omit<VueToJSXProps<UIProps, ImageBlockPropsToOverride>, never> & {\n /** Props to pass to the thumbnail (minus those already set by the ImageBlock props). */\n thumbnailProps?: Omit<ThumbnailProps, 'image' | 'size' | 'theme' | 'align' | 'fillHeight' | 'alt'>;\n};\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS, ImageBlockCaptionPosition };\n\n/**\n * ImageBlock component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst ImageBlock = defineComponent(\n (props: ImageBlockProps, { slots }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n return () => {\n const { class: _class, theme, tags: tagsProp, actions: actionsProp, ...restProps } = props as any;\n const tags = (slots.tags?.() ?? tagsProp) as any;\n const actions = (slots.actions?.() ?? actionsProp) as any;\n\n return (\n <UI\n {...(restProps as any)}\n {...attrs}\n className={className.value}\n theme={theme || defaultTheme.value}\n tags={tags}\n actions={actions}\n Thumbnail={Thumbnail}\n ImageCaption={ImageCaption}\n />\n );\n };\n },\n {\n name: 'LumxImageBlock',\n inheritAttrs: false,\n props: keysOf<ImageBlockProps>()(\n 'actions',\n 'align',\n 'alt',\n 'captionPosition',\n 'captionStyle',\n 'class',\n 'description',\n 'descriptionProps',\n 'fillHeight',\n 'image',\n 'size',\n 'tags',\n 'theme',\n 'thumbnailProps',\n 'title',\n 'titleProps',\n ),\n },\n);\n\nexport default ImageBlock;\n","import type { ColorVariant, ColorWithVariants, Typography } from '../../constants';\nimport type { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface InlineListProps extends HasClassName {\n /**\n * List items to render.\n */\n items?: JSXElement[];\n /**\n * Text color.\n */\n color?: ColorWithVariants;\n /**\n * Lightened or darkened variant of the selected color.\n */\n colorVariant?: ColorVariant;\n /**\n * Typography variant.\n */\n typography?: Typography;\n /**\n * Activate line wrap on overflow.\n */\n wrap?: boolean;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'InlineList';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-inline-list';\nconst { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<InlineListProps> = {};\n\n/**\n * InlineList component.\n *\n * @param props Component props.\n * @return JSX element.\n */\nexport const InlineList = (props: InlineListProps) => {\n const { className, color, colorVariant, typography, items = [], wrap, ref, ...forwardedProps } = props;\n return (\n // eslint-disable-next-line jsx-a11y/no-redundant-roles\n <ul\n {...forwardedProps}\n ref={ref}\n className={classNames.join(\n className,\n block({ wrap: Boolean(wrap) }),\n color && classNames.font(color, colorVariant),\n typography && classNames.typography(typography),\n )}\n // Lists with removed bullet style can lose their a11y list role on some browsers\n role=\"list\"\n >\n {items.map((item, index) => (\n // We need to item is set as display: contents which removes the semantic.\n // eslint-disable-next-line jsx-a11y/no-redundant-roles\n <li key={index} role=\"listitem\" className={element('item')}>\n {index !== 0 && (\n <span className={element('item-separator')} aria-hidden=\"true\">\n {'\\u00A0•\\u00A0'}\n </span>\n )}\n {item}\n </li>\n ))}\n </ul>\n );\n};\n\nInlineList.displayName = COMPONENT_NAME;\nInlineList.className = CLASSNAME;\nInlineList.defaultProps = DEFAULT_PROPS;\n","import { defineComponent, useAttrs } from 'vue';\n\nimport { InlineList as InlineListUI, type InlineListProps as UIProps } from '@lumx/core/js/components/InlineList';\nimport { type JSXElement } from '@lumx/core/js/types';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\nexport type InlineListProps = VueToJSXProps<UIProps, 'items'>;\n\n/**\n * InlineList component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst InlineList = defineComponent(\n (props: InlineListProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n return () => (\n <InlineListUI {...props} {...attrs} className={className.value} items={slots.default?.() as JSXElement[]} />\n );\n },\n {\n name: 'LumxInlineList',\n inheritAttrs: false,\n props: keysOf<InlineListProps>()('color', 'colorVariant', 'typography', 'wrap', 'class'),\n },\n);\n\nexport default InlineList;\n","import type { LumxClassName } from '../../types';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Table';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-table';\n","import type { JSXElement, HasTheme, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { CLASSNAME, COMPONENT_NAME } from './constants';\n\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Defines the props of the component.\n */\nexport interface TableProps extends HasTheme, HasClassName {\n /** Whether the table has checkbox or thumbnail on first cell or not. */\n hasBefore?: boolean;\n /** Whether the table has dividers or not. */\n hasDividers?: boolean;\n /** Children */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TableProps> = {};\n\n/**\n * Table component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const Table = (props: TableProps) => {\n const { children, className, hasBefore, hasDividers, ref, theme, ...forwardedProps } = props;\n\n return (\n <table\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n 'has-before': hasBefore,\n 'has-dividers': hasDividers,\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n {children}\n </table>\n );\n};\n\nexport { CLASSNAME, COMPONENT_NAME };\n","import { defineComponent, useAttrs } from 'vue';\nimport { Table as UI, type TableProps as UIProps } from '@lumx/core/js/components/Table';\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { JSXElement } from '@lumx/core/js/types';\n\nexport type TableProps = VueToJSXProps<UIProps>;\n\nconst Table = defineComponent(\n (props: TableProps, { slots }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n return () => {\n return (\n <UI\n {...props}\n {...attrs}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n children={slots.default?.() as JSXElement}\n />\n );\n };\n },\n {\n name: 'LumxTable',\n inheritAttrs: false,\n props: keysOf<TableProps>()('class', 'hasBefore', 'hasDividers', 'theme'),\n },\n);\n\nexport default Table;\n","import type { JSXElement, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { CLASSNAME as TABLE_CLASSNAME } from './constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface TableBodyProps extends HasClassName {\n /** Children */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TableBody';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME = `${TABLE_CLASSNAME}__body`;\n\n/**\n * TableBody component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const TableBody = (props: TableBodyProps) => {\n const { children, className, ref, ...forwardedProps } = props;\n\n return (\n <tbody ref={ref} {...forwardedProps} className={classNames.join(className, CLASSNAME)}>\n {children}\n </tbody>\n );\n};\n","import { defineComponent, useAttrs } from 'vue';\nimport { TableBody as UI, type TableBodyProps as UIProps } from '@lumx/core/js/components/Table/TableBody';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { JSXElement } from '@lumx/core/js/types';\n\nexport type TableBodyProps = VueToJSXProps<UIProps>;\n\nconst TableBody = defineComponent(\n (props: TableBodyProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n return () => {\n return <UI {...props} {...attrs} className={className.value} children={slots.default?.() as JSXElement} />;\n };\n },\n {\n name: 'LumxTableBody',\n inheritAttrs: false,\n props: keysOf<TableBodyProps>()('class'),\n },\n);\n\nexport default TableBody;\n","import { mdiArrowDown, mdiArrowUp } from '@lumx/icons';\nimport type { JSXElement, HasClassName, CommonRef, ValueOf } from '../../types';\nimport { classNames } from '../../utils';\nimport { Size } from '../../constants';\nimport { Icon } from '../Icon';\n\nimport { CLASSNAME as TABLE_CLASSNAME } from './constants';\n\n/**\n * Table head cell sort order.\n */\nexport const ThOrder = { asc: 'asc', desc: 'desc' } as const;\nexport type ThOrder = ValueOf<typeof ThOrder>;\n\n/**\n * Table cell variants.\n */\nexport const TableCellVariant = { body: 'body', head: 'head' } as const;\nexport type TableCellVariant = ValueOf<typeof TableCellVariant>;\n\n/**\n * Defines the props of the component.\n */\nexport interface TableCellProps extends HasClassName {\n /** Icon (SVG path).(thead only). */\n icon?: string;\n /** Whether the column is sortable or not (thead only). */\n isSortable?: boolean;\n /** Sort order displayed as icon (sortable thead only). */\n sortOrder?: ThOrder;\n /** Variant. */\n variant?: TableCellVariant;\n /** On header cell click callback. */\n handleClick?(): void;\n /** Children */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TableCell';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME = `${TABLE_CLASSNAME}__cell`;\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TableCellProps> = {\n variant: TableCellVariant.body,\n};\n\n/**\n * TableCell component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const TableCell = (props: TableCellProps) => {\n const {\n children,\n className,\n icon,\n isSortable,\n handleClick,\n ref,\n sortOrder,\n variant = DEFAULT_PROPS.variant,\n ...forwardedProps\n } = props;\n\n // Use button if clickable\n const Wrapper = handleClick ? 'button' : 'div';\n const wrapperProps = Wrapper === 'button' ? ({ type: 'button', onClick: handleClick } as const) : undefined;\n\n // ARIA sort\n let ariaSort: 'ascending' | 'descending' | 'none' | undefined;\n if (isSortable) {\n ariaSort = 'none';\n if (sortOrder === ThOrder.asc) ariaSort = 'ascending';\n if (sortOrder === ThOrder.desc) ariaSort = 'descending';\n }\n\n return (\n <>\n {variant === TableCellVariant.head && (\n <th\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n 'is-sortable': isSortable,\n 'is-sorted': isSortable && !!sortOrder,\n head: true,\n }),\n )}\n aria-sort={ariaSort}\n >\n <Wrapper className={`${CLASSNAME}-wrapper`} {...wrapperProps}>\n {icon && !isSortable && Icon({ className: `${CLASSNAME}-icon`, icon, size: Size.xxs })}\n\n {isSortable &&\n sortOrder === ThOrder.asc &&\n Icon({ className: `${CLASSNAME}-icon`, icon: mdiArrowUp, size: Size.xxs })}\n\n {isSortable &&\n sortOrder === ThOrder.desc &&\n Icon({ className: `${CLASSNAME}-icon`, icon: mdiArrowDown, size: Size.xxs })}\n\n <div className={`${CLASSNAME}-content`}>{children}</div>\n </Wrapper>\n </th>\n )}\n\n {variant === TableCellVariant.body && (\n <td ref={ref} {...forwardedProps} className={classNames.join(className, block({ body: true }))}>\n <div className={`${CLASSNAME}-content`}>{children}</div>\n </td>\n )}\n </>\n );\n};\n","import { defineComponent } from 'vue';\nimport {\n TableCell as UI,\n type TableCellProps as UIProps,\n ThOrder,\n TableCellVariant,\n} from '@lumx/core/js/components/Table/TableCell';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { JSXElement } from '@lumx/core/js/types';\nimport { useHasEventListener } from '@lumx/vue/composables/useHasEventListener';\n\nexport { ThOrder, TableCellVariant };\nexport type {\n ThOrder as ThOrderType,\n TableCellVariant as TableCellVariantType,\n} from '@lumx/core/js/components/Table/TableCell';\n\nexport type TableCellProps = VueToJSXProps<UIProps>;\n\nexport const emitSchema = {\n headerClick: () => true,\n};\n\nconst TableCell = defineComponent(\n (props: TableCellProps, { emit, slots, attrs }) => {\n const className = useClassName(() => props.class);\n\n const handleHeaderClick = () => {\n emit('headerClick');\n };\n\n const hasClickListener = useHasEventListener('onHeaderClick');\n\n return () => {\n return (\n <UI\n {...props}\n {...attrs}\n className={className.value}\n // Pass handler if sortable or if there's a listener\n handleClick={hasClickListener ? handleHeaderClick : undefined}\n children={slots.default?.() as JSXElement}\n />\n );\n };\n },\n {\n name: 'LumxTableCell',\n inheritAttrs: false,\n props: keysOf<TableCellProps>()('class', 'icon', 'isSortable', 'sortOrder', 'variant'),\n emits: emitSchema,\n },\n);\n\nexport default TableCell;\n","import type { JSXElement, HasClassName, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { CLASSNAME as TABLE_CLASSNAME } from './constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface TableHeaderProps extends HasClassName {\n /** Children */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TableHeader';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME = `${TABLE_CLASSNAME}__header`;\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TableHeaderProps> = {};\n\n/**\n * TableHeader component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const TableHeader = (props: TableHeaderProps) => {\n const { children, className, ref, ...forwardedProps } = props;\n\n return (\n <thead ref={ref} {...forwardedProps} className={classNames.join(className, CLASSNAME)}>\n {children}\n </thead>\n );\n};\n","import { defineComponent, useAttrs } from 'vue';\nimport { TableHeader as UI, type TableHeaderProps as UIProps } from '@lumx/core/js/components/Table/TableHeader';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { JSXElement } from '@lumx/core/js/types';\n\nexport type TableHeaderProps = VueToJSXProps<UIProps>;\n\nconst TableHeader = defineComponent(\n (props: TableHeaderProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n return () => {\n return <UI {...props} {...attrs} className={className.value} children={slots.default?.() as JSXElement} />;\n };\n },\n {\n name: 'LumxTableHeader',\n inheritAttrs: false,\n props: keysOf<TableHeaderProps>()('class'),\n },\n);\n\nexport default TableHeader;\n","import type { JSXElement, HasClassName, CommonRef, HasAriaDisabled } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { CLASSNAME as TABLE_CLASSNAME } from './constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface TableRowProps extends HasClassName, HasAriaDisabled {\n /** Whether the component is clickable or not. */\n isClickable?: boolean;\n /** Whether the component is selected or not. */\n isSelected?: boolean;\n /** Tab index */\n tabIndex?: number;\n /** Children */\n children?: JSXElement;\n /** reference to the root element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TableRow';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME = `${TABLE_CLASSNAME}__row`;\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TableRowProps> = {};\n\n/**\n * TableRow component.\n *\n * @param props Component props.\n * @return React element.\n */\nexport const TableRow = (props: TableRowProps) => {\n const {\n children,\n className,\n isClickable,\n isSelected,\n ref,\n tabIndex,\n 'aria-disabled': ariaDisabled,\n ...forwardedProps\n } = props;\n const isDisabled = Boolean(ariaDisabled);\n\n // Use object spread for tabIndex to ensure cross-framework compatibility (Vue JSX expects lowercase 'tabindex')\n const tabIndexProps = tabIndex !== undefined ? { tabIndex } : {};\n\n return (\n <tr\n ref={ref}\n aria-disabled={ariaDisabled}\n {...tabIndexProps}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n 'is-clickable': isClickable && !isDisabled,\n 'is-disabled': isDisabled,\n 'is-selected': isSelected && !isDisabled,\n }),\n )}\n >\n {children}\n </tr>\n );\n};\n","import { computed, defineComponent, useAttrs } from 'vue';\nimport { TableRow as UI, type TableRowProps as UIProps } from '@lumx/core/js/components/Table/TableRow';\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { JSXElement } from '@lumx/core/js/types';\n\nexport type TableRowProps = VueToJSXProps<UIProps, 'tabIndex' | 'aria-disabled'> & {\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n};\n\nconst TableRow = defineComponent(\n (props: TableRowProps, { slots }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n\n const { isAnyDisabled, otherProps } = useDisableStateProps(computed(() => ({ ...props, ...attrs })));\n\n return () => {\n return (\n <UI\n {...otherProps.value}\n className={className.value}\n tabIndex={props.isClickable && !isAnyDisabled.value ? 0 : -1}\n aria-disabled={isAnyDisabled.value}\n children={slots.default?.() as JSXElement}\n />\n );\n };\n },\n {\n name: 'LumxTableRow',\n inheritAttrs: false,\n props: keysOf<TableRowProps>()('class', 'isClickable', 'isDisabled', 'isSelected'),\n },\n);\n\nexport default TableRow;\n","/**\n * Component default class name and class prefix.\n */\nexport const TABS_CLASSNAME = `lumx-tabs`;\n","import { Size } from '../../constants';\nimport { CommonRef, HasClassName, JSXElement } from '../../types';\nimport { classNames } from '../../utils';\nimport { IconProps } from '../Icon';\n\nimport { TABS_CLASSNAME } from './constants';\n\n/**\n * Defines the props of the component.\n */\nexport interface TabProps extends HasClassName {\n /** Children are not supported. */\n children?: never;\n /** Icon (SVG path). */\n icon?: IconProps['icon'];\n /** Icon component properties. */\n iconProps?: Omit<IconProps, 'icon'>;\n /** Native id property. */\n id?: string;\n /** Whether the tab is active or not. */\n isActive?: boolean;\n /** Whether the component is disabled or not. */\n isDisabled?: boolean;\n /** Label content. */\n label: string | JSXElement;\n /** Whether any tab in the list is disabled (used to block interaction). */\n isAnyDisabled?: boolean;\n /** Whether the tab should become active when it receives focus (automatic activation pattern). */\n shouldActivateOnFocus?: boolean;\n /** Focus event handler injected by TabList. */\n handleFocus?: (event: any) => void;\n /** Keypress event handler injected by TabList. */\n handleKeyPress?: (event: any) => void;\n /** Callback to activate this tab, injected by TabList. */\n changeToTab?: () => void;\n /** Tab index for roving tabindex management. */\n tabIndex?: number;\n /** Name of the prop used to set tab index (framework-dependent). */\n tabIndexProp?: string;\n /** Name of the prop used to attach the keypress event (framework-dependent). */\n keyPressProp?: string;\n /** ID applied to the tab button element (for aria-labelledby on the panel). */\n tabId?: string;\n /** ID of the associated tab panel (for aria-controls). */\n tabPanelId?: string;\n /** Icon component injected by the framework wrapper. */\n Icon: any;\n /** Text component injected by the framework wrapper. */\n Text: any;\n /** Forward ref to the underlying button element. */\n ref?: CommonRef;\n}\n\nexport type TabPropsToOverride =\n | 'isAnyDisabled'\n | 'shouldActivateOnFocus'\n | 'changeToTab'\n | 'tabIndex'\n | 'tabIndexProp'\n | 'keyPressProp'\n | 'tabId'\n | 'tabPanelId'\n | 'Icon'\n | 'Text';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'Tab';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TabProps> = {};\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME = `${TABS_CLASSNAME}__link`;\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Tab component.\n *\n * Implements WAI-ARIA `tab` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const Tab = (props: TabProps) => {\n const {\n className,\n icon,\n iconProps = {},\n isAnyDisabled,\n isDisabled,\n id,\n isActive,\n label,\n handleFocus,\n handleKeyPress,\n tabIndex = -1,\n tabIndexProp = 'tabIndex',\n keyPressProp = 'onKeyPress',\n changeToTab,\n tabPanelId,\n shouldActivateOnFocus,\n tabId,\n Icon,\n Text,\n ref,\n ...forwardedProps\n } = props;\n\n const changeToCurrentTab = () => {\n if (isAnyDisabled) {\n return;\n }\n changeToTab?.();\n };\n\n const onFocus = (event: any) => {\n handleFocus?.(event);\n if (shouldActivateOnFocus) {\n changeToCurrentTab();\n }\n };\n\n const onKeyPress = (event: any) => {\n handleKeyPress?.(event);\n if (event.key !== 'Enter' || isAnyDisabled) {\n return;\n }\n changeToCurrentTab();\n };\n\n return (\n <button\n ref={ref}\n {...forwardedProps}\n type=\"button\"\n id={tabId}\n className={classNames.join(\n className,\n block({\n 'is-active': isActive,\n 'is-disabled': isAnyDisabled,\n }),\n )}\n onClick={changeToCurrentTab}\n {...{ [keyPressProp]: onKeyPress }}\n onFocus={onFocus}\n role=\"tab\"\n {...{ [tabIndexProp]: isActive ? 0 : tabIndex }}\n aria-disabled={isAnyDisabled}\n aria-selected={isActive}\n aria-controls={tabPanelId}\n >\n {icon && <Icon icon={icon} size={Size.xs} {...iconProps} />}\n {label && (\n <Text as=\"span\" truncate>\n {label}\n </Text>\n )}\n </button>\n );\n};\n","export type TabType = 'tab' | 'tabPanel';\n\nexport interface State {\n isLazy: boolean;\n shouldActivateOnFocus: boolean;\n activeTabIndex: number;\n ids: Record<TabType, string[]>;\n}\n\nexport const INIT_STATE: State = {\n isLazy: true,\n shouldActivateOnFocus: false,\n activeTabIndex: 0,\n ids: { tab: [], tabPanel: [] },\n};\n\nexport type Action =\n | { type: 'update'; payload: Partial<State> }\n | { type: 'setActiveTabIndex'; payload: number }\n | { type: 'register'; payload: { type: TabType; id: string } }\n | { type: 'unregister'; payload: { type: TabType; id: string } };\n\nexport const reducer = (state: State, action: Action): State => {\n switch (action.type) {\n case 'update':\n return { ...state, ...action.payload };\n case 'setActiveTabIndex': {\n if (state.activeTabIndex === action.payload) {\n return state;\n }\n return { ...state, activeTabIndex: action.payload };\n }\n case 'register': {\n const { type, id } = action.payload;\n return { ...state, ids: { ...state.ids, [type]: [...state.ids[type], id] } };\n }\n case 'unregister': {\n const { type, id } = action.payload;\n const index = state.ids[type].indexOf(id);\n if (index === -1) return state;\n const tabIds = [...state.ids.tab];\n tabIds.splice(index, 1);\n const tabPanelIds = [...state.ids.tabPanel];\n tabPanelIds.splice(index, 1);\n return { ...state, ids: { tab: tabIds, tabPanel: tabPanelIds } };\n }\n default:\n return state;\n }\n};\n\nexport type TabState = Pick<Required<State>, 'isLazy' | 'shouldActivateOnFocus'> & {\n isActive: boolean;\n tabId: string;\n tabPanelId: string;\n changeToTab(): void;\n};\n","import { type ComputedRef, type InjectionKey, type Ref, computed, inject, onBeforeUnmount, onMounted } from 'vue';\n\nimport { type Action, type State, type TabState, type TabType } from '@lumx/core/js/components/Tabs/state';\nimport { useId } from '../../composables/useId';\n\nexport {\n type TabType,\n type State,\n INIT_STATE,\n type Action,\n reducer,\n type TabState,\n} from '@lumx/core/js/components/Tabs/state';\n\nexport type TabProviderContextValue = {\n state: Ref<State>;\n dispatch: (action: Action) => void;\n};\n\n/** Injection key used by TabProvider (provide) and Tab/TabPanel (inject). */\nexport const TAB_PROVIDER_INJECT_KEY: InjectionKey<TabProviderContextValue> = Symbol('LumxTabProvider');\n\n/**\n * Composable equivalent of React's useTabProviderContext.\n * Registers the tab/tabPanel with the provider on mount and unregisters on unmount.\n * Returns a computed ref with the derived tab state, or undefined if no provider is present.\n */\nexport const useTabProviderContext = (type: TabType, originalId?: string): ComputedRef<TabState | undefined> => {\n const context = inject(TAB_PROVIDER_INJECT_KEY, undefined);\n\n if (!context) {\n return computed(() => undefined);\n }\n\n const { state, dispatch } = context;\n const generatedId = useId();\n const id = originalId || generatedId;\n\n onMounted(() => {\n dispatch({ type: 'register', payload: { type, id } });\n });\n\n onBeforeUnmount(() => {\n dispatch({ type: 'unregister', payload: { type, id } });\n });\n\n return computed((): TabState | undefined => {\n const index = state.value.ids[type].indexOf(id);\n if (index === -1) return undefined;\n return {\n isLazy: state.value.isLazy,\n shouldActivateOnFocus: state.value.shouldActivateOnFocus,\n tabId: state.value.ids.tab[index] || '',\n tabPanelId: state.value.ids.tabPanel[index] || '',\n isActive: state.value.activeTabIndex === index,\n changeToTab: () => dispatch({ type: 'setActiveTabIndex', payload: index }),\n };\n });\n};\n\n/**\n * Returns the raw tab provider state ref, or undefined if no provider is present.\n */\nexport const useTabProviderContextState = (): Ref<State> | undefined => {\n return inject(TAB_PROVIDER_INJECT_KEY, undefined)?.state;\n};\n","import { computed, defineComponent, useAttrs } from 'vue';\n\nimport {\n Tab as TabUI,\n type TabProps as UIProps,\n type TabPropsToOverride,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Tabs/Tab';\n\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { Icon } from '../icon';\nimport { Text } from '../text';\nimport { useTabProviderContext } from './state';\n\nexport type TabProps = VueToJSXProps<UIProps, TabPropsToOverride>;\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * Tab component.\n *\n * Implements WAI-ARIA `tab` role.\n *\n * @param props Component props.\n * @return Vue element.\n */\nexport const emitSchema = {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n focus: (_event?: FocusEvent) => true,\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n keypress: (_event?: KeyboardEvent) => true,\n};\n\nconst Tab = defineComponent(\n (props: TabProps, { emit }) => {\n const attrs = useAttrs();\n const className = useClassName(() => props.class);\n const { isAnyDisabled } = useDisableStateProps(computed(() => ({ ...props, ...attrs })));\n const tabState = useTabProviderContext('tab', props.id as string | undefined);\n const isActive = computed(() => props.isActive || tabState.value?.isActive);\n\n const handleFocus = (event: FocusEvent) => emit('focus', event);\n const handleKeyPress = (event: KeyboardEvent) => emit('keypress', event);\n\n return () => {\n return (\n <TabUI\n {...attrs}\n id={props.id}\n className={className.value}\n icon={props.icon}\n iconProps={props.iconProps}\n label={props.label}\n isActive={isActive.value}\n isAnyDisabled={isAnyDisabled.value}\n isDisabled={props.isDisabled}\n shouldActivateOnFocus={tabState.value?.shouldActivateOnFocus}\n changeToTab={tabState.value?.changeToTab}\n tabId={tabState.value?.tabId}\n tabPanelId={tabState.value?.tabPanelId}\n handleFocus={handleFocus}\n handleKeyPress={handleKeyPress}\n keyPressProp=\"onKeypress\"\n tabIndexProp=\"tabindex\"\n Icon={Icon}\n Text={Text}\n />\n );\n };\n },\n {\n name: 'LumxTab',\n inheritAttrs: false,\n props: keysOf<TabProps>()('icon', 'iconProps', 'id', 'isActive', 'isDisabled', 'label', 'class'),\n emits: emitSchema,\n },\n);\n\nexport default Tab;\n","import { Alignment } from '../../constants';\nimport { CommonRef, HasClassName, HasTheme, JSXElement } from '../../types';\nimport { classNames } from '../../utils';\n\nimport { TABS_CLASSNAME as CLASSNAME } from './constants';\n\nconst { block, element } = classNames.bem(CLASSNAME);\n\nexport enum TabListLayout {\n clustered = 'clustered',\n fixed = 'fixed',\n}\n\n/**\n * Defines the props of the component.\n */\nexport interface TabListProps extends HasClassName, HasTheme {\n /** ARIA label (purpose of the set of tabs). */\n ['aria-label']: string;\n /** Tab list. */\n children: JSXElement;\n /** Layout of the tabs in the list. */\n layout?: TabListLayout;\n /** Position of the tabs in the list (requires 'clustered' layout). */\n position?: Alignment;\n /** ref to the wrapper element */\n ref?: CommonRef;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TabList';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TabListProps> = {\n layout: TabListLayout.fixed,\n position: Alignment.left,\n};\n\n/**\n * TabList component.\n *\n * Implements WAI-ARIA `tablist` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const TabList = (props: TabListProps) => {\n const {\n 'aria-label': ariaLabel,\n children,\n className,\n layout = DEFAULT_PROPS.layout,\n position = DEFAULT_PROPS.position,\n theme,\n ref,\n ...forwardedProps\n } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n className={classNames.join(\n className,\n block({\n [`layout-${layout}`]: Boolean(layout),\n [`position-${position}`]: Boolean(position),\n [`theme-${theme}`]: Boolean(theme),\n }),\n )}\n >\n <div className={element('links')} role=\"tablist\" aria-label={ariaLabel}>\n {children}\n </div>\n </div>\n );\n};\n","import { defineComponent, ref, useAttrs, useSlots } from 'vue';\n\nimport {\n TabList as TabListUI,\n type TabListProps as UIProps,\n TabListLayout,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Tabs/TabList';\nimport { TABS_CLASSNAME as CLASSNAME } from '@lumx/core/js/components/Tabs/constants';\nimport { type JSXElement } from '@lumx/core/js/types';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { useRovingTabIndexContainer } from '../../composables/useRovingTabIndexContainer';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\n\n// aria-label is excluded from declared Vue props — Vue treats aria-* as attrs,\n// so it flows through the {..attrs} spread to the core component.\ntype InternalProps = VueToJSXProps<UIProps, 'aria-label'>;\n\n/** Public props type (includes aria-label for TypeScript consumers). */\nexport type TabListProps = InternalProps & { 'aria-label': string };\n\nexport { TabListLayout, CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * TabList component.\n *\n * Implements WAI-ARIA `tablist` role.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst TabList = defineComponent(\n (props: InternalProps) => {\n const attrs = useAttrs();\n const slots = useSlots();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n const containerRef = ref<HTMLElement | null>(null);\n\n useRovingTabIndexContainer({\n containerRef,\n itemSelector: '[role=\"tab\"]',\n });\n\n return () => (\n <TabListUI\n {...attrs}\n ref={containerRef}\n aria-label={attrs['aria-label'] as string}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n layout={props.layout}\n position={props.position}\n children={slots.default?.() as JSXElement}\n />\n );\n },\n {\n name: 'LumxTabList',\n inheritAttrs: false,\n props: keysOf<InternalProps>()('layout', 'position', 'theme', 'class'),\n },\n);\n\nexport default TabList;\n","import { CommonRef, HasClassName, JSXElement, LumxClassName } from '../../types';\nimport { classNames } from '../../utils';\n\n/**\n * Defines the props of the component.\n */\nexport interface TabPanelProps extends HasClassName {\n /** Whether the tab is active or not. */\n isActive?: boolean;\n /** Whether the tab is lazy loaded or not */\n isLazy?: boolean;\n /** Children */\n children?: JSXElement;\n /** ID applied to the tab button element (for aria-labelledby on the panel). */\n tabId?: string;\n /** ID of the associated tab panel (for aria-controls). */\n id?: string;\n /** Name of the prop used to set tab index (framework-dependent). */\n tabIndexProp?: string;\n /** Forward ref to the underlying button element. */\n ref?: CommonRef;\n}\n\nexport type TabPanelPropsToOverride = 'tabId' | 'isLazy' | 'tabIndexProp';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TabPanel';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = `lumx-tab-panel`;\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<TabPanelProps> = {};\n\n/**\n * TabPanel component.\n *\n * Implements WAI-ARIA `tabpanel` role {@see https://www.w3.org/TR/wai-aria-practices-1.1/examples/tabs/tabs-1/tabs.html#rps_label}\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const TabPanel = (props: TabPanelProps) => {\n const {\n children,\n className,\n isActive,\n id,\n tabId,\n isLazy,\n tabIndexProp = 'tabIndex',\n ref,\n ...forwardedProps\n } = props;\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n id={id}\n className={classNames.join(className, block({ 'is-active': isActive }))}\n role=\"tabpanel\"\n {...{ [tabIndexProp]: isActive ? 0 : -1 }}\n aria-labelledby={tabId}\n >\n {(!isLazy || isActive) && children}\n </div>\n );\n};\n","import { computed, defineComponent, useAttrs, useSlots } from 'vue';\n\nimport {\n TabPanel as TabPanelUI,\n type TabPanelProps as UIProps,\n type TabPanelPropsToOverride,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/Tabs/TabPanel';\nimport { type JSXElement } from '@lumx/core/js/types';\n\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { useTabProviderContext } from './state';\n\nexport type TabPanelProps = VueToJSXProps<UIProps, TabPanelPropsToOverride>;\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * TabPanel component.\n *\n * Implements WAI-ARIA `tabpanel` role.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst TabPanel = defineComponent(\n (props: TabPanelProps) => {\n const attrs = useAttrs();\n const slots = useSlots();\n const className = useClassName(() => props.class);\n const tabState = useTabProviderContext('tabPanel', props.id as string | undefined);\n const isActive = computed(() => props.isActive || tabState.value?.isActive);\n\n return () => (\n <TabPanelUI\n {...attrs}\n className={className.value}\n isActive={isActive.value}\n id={tabState.value?.tabPanelId}\n isLazy={tabState.value?.isLazy}\n tabId={tabState.value?.tabId}\n tabIndexProp=\"tabindex\"\n children={slots.default?.() as JSXElement}\n />\n );\n },\n {\n name: 'LumxTabPanel',\n inheritAttrs: false,\n props: keysOf<TabPanelProps>()('isActive', 'id', 'class'),\n },\n);\n\nexport default TabPanel;\n","import { defineComponent, provide, ref, watch } from 'vue';\n\nimport { INIT_STATE, reducer, type Action, type State } from '@lumx/core/js/components/Tabs/state';\n\nimport { TAB_PROVIDER_INJECT_KEY } from './state';\n\nexport interface TabProviderProps {\n /** Active tab index (controlled mode). */\n activeTabIndex?: number;\n /** Tab panel children should not render if the tab panel is hidden. */\n isLazy?: boolean;\n /** Activate tabs on focus. */\n shouldActivateOnFocus?: boolean;\n}\n\nconst DEFAULT_PROPS: Partial<TabProviderProps> = {\n isLazy: INIT_STATE.isLazy,\n shouldActivateOnFocus: INIT_STATE.shouldActivateOnFocus,\n};\n\nexport const emitSchema = {\n change: (index: number) => typeof index === 'number',\n};\n\n/**\n * This component provides a context in which tabs can be defined and linked to their tab panel.\n *\n * It does not produce any markup so you can wrap it around any Vue elements and then split\n * the TabList and TabPanel components in the component tree.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst TabProvider = defineComponent(\n (props: TabProviderProps, { emit, slots }) => {\n const state = ref<State>({\n ...INIT_STATE,\n isLazy: props.isLazy ?? INIT_STATE.isLazy,\n shouldActivateOnFocus: props.shouldActivateOnFocus ?? INIT_STATE.shouldActivateOnFocus,\n ...(props.activeTabIndex !== undefined ? { activeTabIndex: props.activeTabIndex } : {}),\n });\n\n const dispatch = (action: Action) => {\n state.value = reducer(state.value, action);\n };\n\n provide(TAB_PROVIDER_INJECT_KEY, { state, dispatch });\n\n // On prop change → sync internal state (mirrors React's useEffect on propState).\n watch([() => props.activeTabIndex, () => props.isLazy, () => props.shouldActivateOnFocus], () => {\n dispatch({\n type: 'update',\n payload: {\n isLazy: props.isLazy ?? DEFAULT_PROPS.isLazy,\n shouldActivateOnFocus: props.shouldActivateOnFocus ?? DEFAULT_PROPS.shouldActivateOnFocus,\n ...(props.activeTabIndex !== undefined ? { activeTabIndex: props.activeTabIndex } : {}),\n },\n });\n });\n\n // On internal active tab index change → emit change event (for controlled mode).\n watch(\n () => state.value.activeTabIndex,\n (newIndex) => {\n if (props.activeTabIndex !== newIndex) {\n emit('change', newIndex);\n }\n },\n );\n\n return () => slots.default?.();\n },\n {\n name: 'LumxTabProvider',\n props: {\n activeTabIndex: { required: false },\n isLazy: { required: false },\n shouldActivateOnFocus: { required: false },\n },\n emits: emitSchema,\n },\n);\n\nexport default TabProvider;\n","var baseSet = require('./_baseSet');\n\n/**\n * Sets the value at `path` of `object`. If a portion of `path` doesn't exist,\n * it's created. Arrays are created for missing index properties while objects\n * are created for all other missing properties. Use `_.setWith` to customize\n * `path` creation.\n *\n * **Note:** This method mutates `object`.\n *\n * @static\n * @memberOf _\n * @since 3.7.0\n * @category Object\n * @param {Object} object The object to modify.\n * @param {Array|string} path The path of the property to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns `object`.\n * @example\n *\n * var object = { 'a': [{ 'b': { 'c': 3 } }] };\n *\n * _.set(object, 'a[0].b.c', 4);\n * console.log(object.a[0].b.c);\n * // => 4\n *\n * _.set(object, ['x', '0', 'y', 'z'], 5);\n * console.log(object.x[0].y.z);\n * // => 5\n */\nfunction set(object, path, value) {\n return object == null ? object : baseSet(object, path, value);\n}\n\nmodule.exports = set;\n","import type { HasClassName, LumxClassName, HasTheme, GenericProps, JSXElement, CommonRef } from '../../types';\nimport { classNames } from '../../utils';\nimport { Orientation, Size } from '../../constants';\n\n/**\n * User block sizes.\n */\nexport type UserBlockSize = Extract<Size, 'xs' | 's' | 'm' | 'l'>;\n\n/**\n * Props for the UserBlock component.\n *\n * UserBlock displays user information with an avatar, name, and optional fields.\n * Supports both horizontal and vertical orientations with customizable actions.\n */\nexport interface UserBlockProps extends HasClassName, HasTheme {\n /**\n * Props to pass to the Avatar component.\n * Configure the user's avatar appearance and behavior.\n */\n avatarProps?: GenericProps;\n\n /**\n * Additional fields to display below the user's name.\n * Typically used for role, department, or other user metadata.\n */\n fields?: string[];\n\n /**\n * Props to pass to the Link component wrapping the avatar and/or name.\n * Used to make the user block clickable with navigation.\n */\n linkProps?: GenericProps;\n\n /**\n * Custom component to use for the link element.\n * Use this to inject a framework-specific router Link component (e.g., react-router Link).\n * @default 'a'\n */\n linkAs?: 'a' | any;\n\n /**\n * Content for multiple actions displayed in the action toolbar.\n * Only visible when orientation is vertical.\n */\n multipleActions?: JSXElement;\n\n /**\n * The user's display name.\n * Can be a string or custom JSX element.\n */\n name?: JSXElement;\n\n /**\n * Props to pass to the name wrapper element.\n * Used to customize the name block's appearance and behavior.\n */\n nameProps?: GenericProps;\n\n /**\n * Layout orientation of the user block.\n * - horizontal: Avatar and info side by side (default)\n * - vertical: Avatar and info stacked, forces size to 'l'\n * @default Orientation.horizontal\n */\n orientation?: Orientation;\n\n /**\n * Content for a single action displayed in the action toolbar.\n * Only visible when orientation is vertical.\n */\n simpleAction?: JSXElement;\n\n /**\n * Size variant of the component.\n * Note: When orientation is vertical, size is automatically forced to 'l'.\n * @default Size.m\n */\n size?: UserBlockSize;\n\n /**\n * Click event handler.\n * Called when the user clicks on the clickable area (name/avatar).\n */\n handleClick?(): void;\n\n /**\n * Mouse enter event handler.\n * Called when the mouse enters the component.\n */\n handleMouseEnter?(): void;\n mouseEnterProp?: string;\n\n /**\n * Mouse leave event handler.\n * Called when the mouse leaves the component.\n */\n handleMouseLeave?(): void;\n mouseLeaveProp?: string;\n\n /**\n * Additional custom fields to display below the standard fields.\n * Only visible when size is not 'xs' or 's'.\n */\n additionalFields?: JSXElement;\n\n /**\n * Content to display after the entire component.\n * Position depends on orientation:\n * - horizontal: displayed to the right\n * - vertical: displayed at the bottom\n */\n after?: JSXElement;\n\n /**\n * Custom content to replace the default name block.\n * When provided, replaces the default name rendering.\n */\n children?: JSXElement;\n\n /**\n * Ref to attach to the root element.\n */\n ref?: CommonRef;\n\n /**\n * Text component for rendering text content.\n * Injected by the framework wrapper (React/Vue).\n */\n Text: (props: any) => any;\n\n /**\n * Avatar component for rendering the user avatar.\n * Injected by the framework wrapper (React/Vue).\n */\n Avatar: (props: any) => any;\n}\n\nexport type UserBlockPropsToOverride =\n | 'Avatar'\n | 'Text'\n | 'linkProps'\n | 'avatarProps'\n | 'mouseLeaveProp'\n | 'mouseEnterProp';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'UserBlock';\n\n/**\n * Component default class name and class prefix.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-user-block';\nexport const { block, element } = classNames.bem(CLASSNAME);\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS: Partial<UserBlockProps> = {\n orientation: Orientation.horizontal,\n size: Size.m,\n};\n\nexport const isUserBlockClickeable = ({\n linkAs,\n linkProps,\n handleClick,\n}: Pick<UserBlockProps, 'linkAs' | 'linkProps' | 'handleClick'>) => {\n const isLink = Boolean(linkProps?.href || linkAs);\n const isClickable = !!handleClick || isLink;\n\n return isClickable;\n};\n\n/**\n * UserBlock component.\n *\n * @param props Component props.\n * @param ref Component ref.\n * @return React element.\n */\nexport const UserBlock = (props: UserBlockProps) => {\n const {\n avatarProps,\n className,\n fields,\n linkProps,\n linkAs,\n ref,\n multipleActions,\n mouseEnterProp = 'onMouseEnter',\n mouseLeaveProp = 'onMouseLeave',\n name,\n nameProps,\n handleClick,\n handleMouseEnter,\n handleMouseLeave,\n orientation = DEFAULT_PROPS.orientation,\n simpleAction,\n size = DEFAULT_PROPS.size,\n theme,\n children,\n additionalFields,\n after,\n Text,\n Avatar,\n ...forwardedProps\n } = props;\n let componentSize = size;\n\n // Special case - When using vertical orientation force the size to be Sizes.l.\n if (orientation === Orientation.vertical) {\n componentSize = Size.l;\n }\n\n const shouldDisplayActions: boolean = orientation === Orientation.vertical;\n\n const isClickable = isUserBlockClickeable({ handleClick, linkAs, linkProps });\n\n const shouldDisplayFields = componentSize !== Size.s && componentSize !== Size.xs;\n\n const fieldsBlock = fields && shouldDisplayFields && (\n <div className={element('fields')}>\n {fields.map((field: string, idx: number) => (\n <Text as=\"span\" key={idx} className={element('field')}>\n {field}\n </Text>\n ))}\n </div>\n );\n\n const eventHandlers = {\n ...(handleMouseEnter && { [mouseEnterProp]: handleMouseEnter }),\n ...(handleMouseLeave && { [mouseLeaveProp]: handleMouseLeave }),\n };\n\n return (\n <div\n ref={ref}\n {...forwardedProps}\n {...(eventHandlers as any)}\n className={classNames.join(\n className,\n block({\n [`orientation-${orientation}`]: Boolean(orientation),\n [`size-${componentSize}`]: Boolean(componentSize),\n [`theme-${theme}`]: Boolean(theme),\n 'is-clickable': isClickable,\n }),\n )}\n >\n {avatarProps && (\n <Avatar\n linkAs={linkAs}\n linkProps={linkProps}\n alt=\"\"\n {...(avatarProps as any)}\n className={classNames.join(element('avatar'), avatarProps.className)}\n size={componentSize}\n onClick={handleClick}\n theme={theme}\n />\n )}\n {(fields || name || children || additionalFields) && (\n <div className={element('wrapper')}>\n {children}\n {fieldsBlock}\n {shouldDisplayFields ? additionalFields : null}\n </div>\n )}\n {shouldDisplayActions && simpleAction && <div className={element('action')}>{simpleAction}</div>}\n {shouldDisplayActions && multipleActions && <div className={element('actions')}>{multipleActions}</div>}\n {after ? <div className={element('after')}>{after}</div> : null}\n </div>\n );\n};\n","import { computed, defineComponent, toRaw, useAttrs, type VNode } from 'vue';\n\nimport isEmpty from 'lodash/isEmpty';\nimport set from 'lodash/set';\n\nimport {\n UserBlock as UserBlockUI,\n type UserBlockProps as UIProps,\n UserBlockPropsToOverride,\n CLASSNAME,\n COMPONENT_NAME,\n DEFAULT_PROPS,\n element,\n isUserBlockClickeable,\n type UserBlockSize,\n} from '@lumx/core/js/components/UserBlock';\nimport { ColorPalette } from '@lumx/core/js/constants';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { useTheme } from '../../composables/useTheme';\nimport { useClassName } from '../../composables/useClassName';\nimport { keysOf, VueToJSXProps } from '../../utils/VueToJSX';\nimport { classNames } from '@lumx/core/js/utils';\n\nimport { Avatar, type AvatarProps } from '../avatar';\nimport { Link } from '../link';\nimport Text from '../text/Text';\nimport { useHasEventListener } from '@lumx/vue/composables/useHasEventListener';\n\nexport type { UserBlockSize };\n\nexport type UserBlockProps = VueToJSXProps<\n UIProps,\n | UserBlockPropsToOverride\n | 'handleClick'\n | 'handleMouseEnter'\n | 'handleMouseLeave'\n | 'simpleAction'\n | 'multipleActions'\n | 'additionalFields'\n | 'after'\n> & {\n /** Props to pass to the avatar. */\n avatarProps?: Omit<AvatarProps, 'alt'>;\n /** Props to pass to the link wrapping the avatar thumbnail. */\n linkProps?: Record<string, any>;\n};\n\nexport const emitSchema = {\n click: () => true,\n mouseenter: () => true,\n mouseleave: () => true,\n};\n\nexport { CLASSNAME, COMPONENT_NAME, DEFAULT_PROPS };\n\n/**\n * UserBlock component.\n *\n * @param props Component props.\n * @return Vue element.\n */\nconst UserBlock = defineComponent(\n (props: UserBlockProps, { emit, slots }) => {\n const attrs = useAttrs();\n const defaultTheme = useTheme();\n const className = useClassName(() => props.class);\n\n const handleClick = () => {\n emit('click');\n };\n\n const handleMouseEnter = () => {\n emit('mouseenter');\n };\n\n const handleMouseLeave = () => {\n emit('mouseleave');\n };\n\n const hasOnClick = useHasEventListener('onClick');\n const hasOnMouseEnter = useHasEventListener('onMouseenter');\n const hasOnMouseLeave = useHasEventListener('onMouseleave');\n\n /**\n * This logic needs to occur on the wrapper level, since core templates cannot manage\n * the render of dynamically determined components. So `NameComponent`, if moved to core,\n * it will return an `undefined`\n */\n const nameBlock = computed((): VNode | null => {\n const name = props.name || slots.name?.();\n if (isEmpty(name)) {\n return null;\n }\n\n const isClickable = isUserBlockClickeable({\n linkAs: props.linkAs,\n linkProps: props.linkProps,\n handleClick: hasOnClick ? handleClick : undefined,\n });\n\n let NameComponent: any = 'span';\n const nProps: any = {\n ...props.nameProps,\n class: classNames.join(element('name'), props.linkProps?.class, props.nameProps?.class),\n };\n\n if (isClickable) {\n NameComponent = Link;\n Object.assign(nProps, {\n ...props.linkProps,\n color: ColorPalette.dark,\n });\n }\n\n return (\n <NameComponent {...nProps} onClick={handleClick}>\n <Text as=\"span\">{name}</Text>\n </NameComponent>\n ) as VNode;\n });\n\n // Create modified avatarProps with tabIndex if clickable\n const computedAvatarProps = computed(() => {\n if (!props.avatarProps) return undefined;\n\n const isClickable = isUserBlockClickeable({\n linkAs: props.linkAs,\n linkProps: props.linkProps,\n handleClick,\n });\n\n if (isClickable) {\n // Disable avatar focus since the name block is the same link / same button.\n const modifiedProps = { ...props.avatarProps };\n set(modifiedProps, ['thumbnailProps', 'tabIndex'], -1);\n return modifiedProps;\n }\n\n return props.avatarProps;\n });\n\n return () => {\n const { linkAs, fields, ...restProps } = props;\n const childrenContent = slots.default?.() || nameBlock.value;\n\n return (\n <UserBlockUI\n {...restProps}\n {...attrs}\n linkAs={toRaw(linkAs)}\n className={className.value}\n theme={props.theme || defaultTheme.value}\n handleClick={hasOnClick ? handleClick : undefined}\n handleMouseEnter={hasOnMouseEnter ? handleMouseEnter : undefined}\n handleMouseLeave={hasOnMouseLeave ? handleMouseLeave : undefined}\n avatarProps={computedAvatarProps.value}\n fields={(fields || slots.fields?.()) as any}\n simpleAction={(slots['simple-action']?.() || slots.simpleAction?.()) as JSXElement}\n multipleActions={(slots['multiple-actions']?.() || slots.multipleActions?.()) as JSXElement}\n additionalFields={(slots['additional-fields']?.() || slots.additionalFields?.()) as JSXElement}\n after={slots.after?.() as JSXElement}\n Avatar={(avProps) => {\n const { badge, ...restAvatarProps } = avProps;\n return (\n <Avatar {...restAvatarProps}>\n {{\n badge: badge ? () => badge : undefined,\n }}\n </Avatar>\n );\n }}\n Text={Text as unknown as UIProps['Text']}\n children={childrenContent as JSXElement}\n mouseEnterProp=\"onMouseenter\"\n mouseLeaveProp=\"onMouseleave\"\n />\n );\n };\n },\n {\n name: 'LumxUserBlock',\n inheritAttrs: false,\n props: keysOf<UserBlockProps>()(\n 'avatarProps',\n 'class',\n 'fields',\n 'linkAs',\n 'linkProps',\n 'name',\n 'nameProps',\n 'orientation',\n 'size',\n 'theme',\n ),\n emits: emitSchema,\n },\n);\n\nexport default UserBlock;\n","import type { Selector } from '../../types';\nimport { getWithSelector } from '../selectors';\n\n/**\n * Find the option whose id matches the given value.\n *\n * Used by Select* wrappers to resolve a selection event (which carries the option id\n * as `selectedOption.value`) back to the original option object.\n *\n * @param options The list of options.\n * @param getOptionId Selector returning the option id (matches `<Combobox.Option value>`).\n * @param id The id to match against.\n * @return The matching option, or `undefined` if none is found / inputs are nullish.\n */\nexport function findOptionById<O>(\n options: readonly O[] | undefined,\n getOptionId: Selector<O> | undefined,\n id: unknown,\n): O | undefined {\n if (id == null) return undefined;\n return options?.find((option) => getWithSelector(getOptionId, option) === id);\n}\n","import type { Selector } from '../../types';\nimport { getWithSelector } from '../selectors';\nimport { findOptionById } from './findOptionById';\n\n/**\n * Compute the next selection state after a user toggles an option.\n *\n * Single-mode behaviour (`isMultiple=false`):\n * - Returns the option matched by id (or `undefined` if none matches the id —\n * e.g. when the consumer triggers a custom action via `beforeOptions`).\n *\n * Multi-mode behaviour (`isMultiple=true`):\n * - If the option is already in the current value array → returns a new array with it removed.\n * - Otherwise → returns a new array with the option appended.\n * - If the id matches no option in `options` (e.g. custom actions), the current array is returned unchanged.\n *\n * Pure function: never mutates `currentValue`.\n *\n * @param options The list of options.\n * @param getOptionId Selector returning the option id (matches `<Combobox.Option value>`).\n * @param currentValue Current selection (option, array of options, or undefined).\n * @param selectedOptionId Id of the option the user just selected.\n * @param isMultiple Whether to use multi-select semantics.\n * @return The new selection — `O | undefined` in single mode, `O[]` in multi mode.\n */\nexport function toggleSelection<O>(\n options: readonly O[] | undefined,\n getOptionId: Selector<O> | undefined,\n currentValue: O | O[] | undefined,\n selectedOptionId: unknown,\n isMultiple: boolean,\n): O | O[] | undefined {\n const newOption = findOptionById(options, getOptionId, selectedOptionId);\n\n if (!isMultiple) {\n // Single mode — return the matched option (or undefined when nothing matches).\n return newOption;\n }\n\n // Multi mode — toggle membership in the current array.\n const currentArray = Array.isArray(currentValue) ? currentValue : [];\n const existingIndex = currentArray.findIndex((item) => getWithSelector(getOptionId, item) === selectedOptionId);\n\n if (existingIndex === -1) {\n // Skip if no matching option found (e.g. custom action items).\n if (!newOption) return currentArray;\n return [...currentArray, newOption];\n }\n\n // Remove option (toggle off).\n const updated = [...currentArray];\n updated.splice(existingIndex, 1);\n return updated;\n}\n","import type { Selector } from '../../types';\nimport { getWithSelector } from '../selectors';\n\n/**\n * Get the display name for a single option value.\n *\n * Resolves the option's display name by trying `getOptionName` first,\n * then falling back to `getOptionId`, returning `''` for nullish values.\n */\nexport function getOptionDisplayName<O>(\n value: O | undefined,\n getOptionName?: Selector<O, string | undefined | null>,\n getOptionId?: Selector<O>,\n): string {\n if (value === undefined || value === null) return '';\n if (getOptionName) {\n const name = getWithSelector(getOptionName, value);\n if (name != null) return String(name);\n }\n if (getOptionId) {\n return String(getWithSelector(getOptionId, value));\n }\n return '';\n}\n","import { getWithSelector, groupBySelector } from '../selectors';\nimport type { JSXElement } from '../../types';\nimport type { BaseSelectComponents, RenderSelectOptionsProps } from './types';\n\n/**\n * Render options as ComboboxOption elements.\n * Framework-specific components are passed as a second argument.\n */\nexport function renderSelectOptions<O>(\n props: RenderSelectOptionsProps<O>,\n components: BaseSelectComponents,\n): JSXElement {\n const {\n options,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption,\n selected,\n getSectionId,\n renderSectionTitle,\n } = props;\n const { Combobox } = components;\n\n // Render sections when getSectionId is provided.\n if (getSectionId && options) {\n const sections = groupBySelector(options, (option) => getWithSelector(getSectionId, option));\n\n return Array.from(sections.entries()).map(([sectionId, sectionOptions]) => {\n // When renderSectionTitle is provided, use the custom JSX as the label; otherwise fall back to sectionId.\n const sectionLabel = renderSectionTitle ? renderSectionTitle(sectionId, sectionOptions) : sectionId;\n\n return (\n <Combobox.Section key={sectionId} label={sectionLabel}>\n {renderSelectOptions(\n {\n options: sectionOptions,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption,\n selected,\n // getSectionId intentionally omitted to render flat options inside.\n },\n components,\n )}\n </Combobox.Section>\n );\n }) as any;\n }\n\n // Build a Set of selected IDs (works for both single value and arrays).\n const selectedIds: Set<any> | undefined = selected\n ? new Set((Array.isArray(selected) ? selected : [selected]).map((s) => getWithSelector(getOptionId, s)))\n : undefined;\n\n return options?.map((item, index) => {\n const id = getWithSelector(getOptionId || getOptionName, item) as string;\n const name = getWithSelector(getOptionName || getOptionId, item) || id;\n const description = getOptionDescription && getWithSelector(getOptionDescription, item);\n const isSelected = selectedIds?.has(id) ?? false;\n\n // Delegate to the consumer's render function when provided.\n // The consumer receives core-computed context and is responsible for rendering\n // a <Combobox.Option> with those values forwarded.\n if (renderOption) {\n return renderOption(item, { index, value: id, name, isSelected, description }) as any;\n }\n\n return (\n <Combobox.Option key={id} value={id} description={description} isSelected={isSelected}>\n {name}\n </Combobox.Option>\n );\n }) as any;\n}\n","import castArray from 'lodash/castArray';\n\nimport type { LumxClassName } from '../../types';\nimport { getOptionDisplayName } from '../../utils/select/getOptionDisplayName';\nimport { renderSelectOptions } from '../../utils/select/renderSelectOptions';\nimport type { ComboboxButtonLabelDisplayMode } from '../Combobox/ComboboxButton';\nimport {\n BaseSelectComponents,\n BaseSelectProps,\n SelectButtonTranslations,\n SelectListStatus,\n} from '../../utils/select/types';\n\n/**\n * Defines the props for the core SelectButton template.\n */\nexport interface SelectButtonProps<O> extends BaseSelectProps<O> {\n /**\n * Selected value (single mode) or selected values (multi mode).\n * The wrapper layer chooses the shape; the core just renders names.\n */\n value?: O | O[];\n /** Single or multiple selection */\n selectionType?: 'single' | 'multiple';\n /** Button label (used for ARIA and when no selection). */\n label: string;\n /** Controls how the label/value is displayed in the button. */\n labelDisplayMode?: ComboboxButtonLabelDisplayMode;\n /**\n * Props forwarded to Combobox.Button (button appearance, emphasis, size, etc.).\n * Pass `renderButton` here to provide a custom button renderer — see\n * `ComboboxButtonProps.renderButton`. Framework wrappers are responsible for\n * defaulting any visual affordance (e.g. the dropdown chevron `rightIcon`).\n */\n buttonProps?: Record<string, any>;\n /** Props forwarded to Combobox.Popover. */\n popoverProps?: Record<string, any>;\n /** Props forwarded to Combobox.List (e.g. ref). */\n listProps?: Record<string, any>;\n /** Callback on option selected (receives option id string). */\n handleSelect?: (selectedOption: { value: string }) => void;\n /**\n * Status of the dropdown list.\n * - `'idle'` — Default state, no loading indicators.\n * - `'loading'` — Full loading: shows skeleton placeholders, hides real options.\n * - `'loadingMore'` — Paginated loading: appends a skeleton after existing options.\n * - `'error'` — Error state: shows an error message in the dropdown.\n * @default 'idle'\n */\n listStatus?: SelectListStatus;\n /** Optional translations for screen-reader announcements (loading/empty/error/option count). */\n translations?: SelectButtonTranslations;\n /** Callback fired when the dropdown open state changes. */\n onOpen?: (isOpen: boolean) => void;\n /**\n * Callback fired to load more items (infinite scroll).\n * When provided together with an injected `InfiniteScroll` component, an invisible\n * sentinel element is rendered after the options to trigger loading via IntersectionObserver.\n */\n onLoadMore?: () => void;\n /** IntersectionObserver options forwarded to the InfiniteScroll sentinel. */\n infiniteScrollOptions?: IntersectionObserverInit;\n}\n\n/**\n * Injected framework-specific components for SelectButton rendering.\n */\nexport type SelectButtonComponents = BaseSelectComponents;\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'SelectButton';\n\n/**\n * Component default class name.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-select-button';\n\n/**\n * Component default props.\n */\nexport const DEFAULT_PROPS = {\n selectionType: 'single',\n} as const;\n\n/**\n * SelectButton core template.\n * Renders a Combobox with a button trigger and a dropdown list of options.\n *\n * Framework-specific components are passed as a second argument by the React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const SelectButton = <O,>(props: SelectButtonProps<O>, { Combobox, InfiniteScroll }: SelectButtonComponents) => {\n const {\n options,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption,\n getSectionId,\n renderSectionTitle,\n value,\n selectionType = DEFAULT_PROPS.selectionType,\n label,\n labelDisplayMode,\n buttonProps,\n popoverProps,\n listProps,\n handleSelect,\n listStatus = 'idle',\n translations,\n onOpen,\n onLoadMore,\n infiniteScrollOptions,\n } = props;\n\n const isFullLoading = listStatus === 'loading';\n const isLoadingMore = listStatus === 'loadingMore';\n const isError = listStatus === 'error';\n const isMultiselectable = selectionType === 'multiple';\n\n /*\n * Display value: castArray normalizes single/multi value to an array, then resolve\n * each option to its name and join with `, `. Falsy entries (undefined, empty names)\n * are filtered out so partial state still renders cleanly.\n */\n const displayValue =\n value != null\n ? castArray(value)\n .map((v) => getOptionDisplayName(v, getOptionName, getOptionId))\n .filter(Boolean)\n .join(', ')\n : '';\n\n return (\n <Combobox.Provider onOpen={onOpen}>\n <Combobox.Button\n {...buttonProps}\n label={label}\n value={displayValue}\n onSelect={handleSelect}\n labelDisplayMode={labelDisplayMode}\n />\n\n <Combobox.Popover\n fitToAnchorWidth=\"minWidth\"\n fitWithinViewportHeight\n placement=\"bottom-start\"\n {...popoverProps}\n >\n <Combobox.List {...listProps} aria-label={label} aria-multiselectable={isMultiselectable || undefined}>\n {isFullLoading ? (\n <Combobox.OptionSkeleton count={3} />\n ) : (\n renderSelectOptions(\n {\n options,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption,\n getSectionId,\n renderSectionTitle,\n selected: value,\n },\n { Combobox },\n )\n )}\n\n {onLoadMore && InfiniteScroll && (\n <InfiniteScroll\n callback={() => {\n // Guard: prevent firing during loading or error states to avoid duplicate fetches.\n if (listStatus && listStatus !== 'idle') return;\n onLoadMore();\n }}\n options={infiniteScrollOptions}\n />\n )}\n\n {isLoadingMore && <Combobox.OptionSkeleton count={1} />}\n </Combobox.List>\n\n <Combobox.State\n loadingMessage={translations?.loadingMessage}\n emptyMessage={translations?.emptyMessage}\n nbOptionMessage={translations?.nbOptionMessage}\n errorMessage={isError ? translations?.errorMessage : undefined}\n errorTryReloadMessage={isError ? translations?.errorTryReloadMessage : undefined}\n />\n </Combobox.Popover>\n </Combobox.Provider>\n );\n};\n\nSelectButton.displayName = COMPONENT_NAME;\nSelectButton.className = CLASSNAME;\n","import { type ComputedRef, type Slot, computed, useAttrs } from 'vue';\nimport castArray from 'lodash/castArray';\n\nimport type { JSXElement } from '@lumx/core/js/types';\nimport type { RenderOptionContext } from '@lumx/core/js/utils/select/types';\n\nimport { isComponentType } from '../../utils/isComponentType';\nimport ComboboxOption from './ComboboxOption';\n\n/** Render function passed as `renderOption` to a core Select* template. */\ntype WrappedRenderOption = (option: unknown, context: RenderOptionContext) => JSXElement;\n\n/** Raw callback shape accepted as the `renderOption` attr fallback. */\ntype RenderOptionCallback = (option: unknown, context: RenderOptionContext) => unknown;\n\n/**\n * Adapts a Vue scoped slot returning a `<ComboboxOption>` into the `renderOption`\n * callback shape expected by the core Select* templates.\n */\nexport function useWrappedRenderOptionSlot(slot: Slot | undefined): ComputedRef<WrappedRenderOption | undefined> {\n const attrs = useAttrs();\n\n return computed(() => {\n const renderOptionAttr = attrs.renderOption as RenderOptionCallback | undefined;\n\n if (!slot && !renderOptionAttr) return undefined;\n\n return (option: unknown, context: RenderOptionContext) => {\n const { index, value: optionValue, isSelected, description, name } = context;\n // Use slot or fallback on attrs.renderOption (needed for lumx-core compat)\n const vnodes = slot?.({ option, index }) || renderOptionAttr?.(option, context);\n const customOption = castArray(vnodes)?.find(isComponentType(ComboboxOption));\n\n // Fallback: consumer didn't return a <Combobox.Option> — render their VNodes as-is.\n if (!customOption) return vnodes as unknown as JSXElement;\n\n // Extract slot-overridable props; drop undefined so they don't clobber core defaults.\n const slotProps: Record<string, any> = customOption.props || {};\n const definedSlotProps = Object.fromEntries(Object.entries(slotProps).filter(([, v]) => v !== undefined));\n\n // `before`/`after` may be passed as JSX props (attrs) — promote them to named slots.\n const { before: beforeProp, after: afterProp, ...restSlotProps } = definedSlotProps;\n\n // Handle slots overrides (default, before and after)\n const slotChildren = { ...(customOption.children as Record<string, any>) };\n if (beforeProp !== undefined && !slotChildren.before) {\n slotChildren.before = () => beforeProp;\n }\n if (afterProp !== undefined && !slotChildren.after) {\n slotChildren.after = () => afterProp;\n }\n // Fallback: use the resolved option name as the default slot if not provided.\n if (!slotChildren.default) {\n slotChildren.default = name;\n }\n\n return (\n <ComboboxOption\n key={optionValue}\n value={optionValue}\n isSelected={isSelected}\n description={description ?? undefined}\n {...restSlotProps}\n >\n {slotChildren}\n </ComboboxOption>\n ) as JSXElement;\n };\n });\n}\n","import { type ComputedRef, type Slot, computed } from 'vue';\n\nimport type { JSXElement } from '@lumx/core/js/types';\n\n/** Render function passed as `renderSectionTitle` to a core Select* template. */\ntype WrappedRenderSectionTitle = (sectionId: string | undefined, options: unknown[]) => JSXElement;\n\n/**\n * Adapts a Vue scoped section-title slot into the `renderSectionTitle` callback shape\n * expected by the core Select* templates.\n */\nexport function useWrappedRenderSectionTitleSlot(\n slot: Slot | undefined,\n): ComputedRef<WrappedRenderSectionTitle | undefined> {\n return computed(() => {\n if (!slot) return undefined;\n return (sectionId: string | undefined, options: unknown[]) => slot({ sectionId, options }) as JSXElement;\n });\n}\n","import {\n type ComponentPublicInstance,\n type EmitFn,\n type EmitsToProps,\n type PublicProps,\n type SlotsType,\n computed,\n defineComponent,\n ref,\n} from 'vue';\n\nimport { mdiMenuDown } from '@lumx/icons';\nimport { type BaseSelectButtonWrapperProps } from '@lumx/core/js/utils/select/types';\nimport { toggleSelection } from '@lumx/core/js/utils/select/toggleSelection';\nimport {\n DEFAULT_PROPS,\n CLASSNAME,\n SelectButton as UI,\n type SelectButtonProps as UIProps,\n} from '@lumx/core/js/components/SelectButton';\nimport type { ComboboxButtonProps } from '@lumx/core/js/components/Combobox/ComboboxButton';\nimport { InfiniteScroll } from '@lumx/vue/utils/InfiniteScroll';\nimport { JSXElement } from '@lumx/core/js/types';\n\nimport { keysOf, type EmitsOf } from '../../utils/VueToJSX';\nimport { Combobox } from '../combobox';\nimport { Button } from '../button';\nimport { useWrappedRenderOptionSlot } from '../combobox/useWrappedRenderOptionSlot';\nimport { useWrappedRenderSectionTitleSlot } from '../combobox/useWrappedRenderSectionTitleSlot';\nimport { useHasEventListener } from '../../composables/useHasEventListener';\nimport { useClassName } from '../../composables/useClassName';\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\n\n/**\n * Props exposed to the `#button` scoped slot of `<SelectButton>`.\n *\n * `buttonProps` **must** be spread on the slot root element so that the combobox ARIA\n * attributes (`role=\"combobox\"`, `aria-controls`, `aria-haspopup`, `aria-expanded`,\n * `aria-activedescendant`) and the internal `ref` callback reach the underlying DOM node.\n *\n * The `<Tooltip label={label}>` wrapper is always rendered around the slot root, keeping\n * accessibility semantics consistent regardless of the element returned by the slot.\n *\n * @example\n * ```html\n * <!-- IconButton trigger (no text children — use labelDisplayMode=\"show-tooltip\") -->\n * <SelectButton label=\"More\" label-display-mode=\"show-tooltip\" ...>\n * <template #button=\"{ buttonProps, label }\">\n * <IconButton v-bind=\"buttonProps\" :icon=\"mdiDotsVertical\" :label=\"label\" :hide-tooltip=\"true\" />\n * </template>\n * </SelectButton>\n *\n * <!-- Chip trigger -->\n * <SelectButton label=\"Status\" ...>\n * <template #button=\"{ buttonProps, children }\">\n * <Chip v-bind=\"buttonProps\" is-clickable>{{ children }}</Chip>\n * </template>\n * </SelectButton>\n * ```\n */\nexport interface SelectButtonButtonSlotProps {\n /**\n * Merged props that **must** be spread on the slot root element.\n *\n * Contains: `role=\"combobox\"`, `aria-controls`, `aria-haspopup=\"listbox\"`,\n * `aria-expanded`, `aria-activedescendant=\"\"`, the internal `ref` callback,\n * `className`, and any caller-provided button attrs.\n */\n buttonProps: Record<string, any>;\n /**\n * The configured label (always defined).\n * Useful for setting the `label` prop of `<IconButton>` or `<Tooltip>`.\n */\n label: string;\n /**\n * Resolved button children computed from `labelDisplayMode`:\n * - `'show-selection'` — selected option name, falls back to the label when nothing is selected.\n * - `'show-label'` — always the label.\n * - `'show-tooltip'` — `null` (label is surfaced only via the Tooltip; ignore this in the slot).\n */\n children: string | null;\n}\n\n/** Common props shared by single and multi modes. */\ninterface BaseSelectButtonProps<O = any> extends BaseSelectButtonWrapperProps<O> {\n /** Controls how the label/value is displayed in the button. */\n labelDisplayMode?: UIProps<O>['labelDisplayMode'];\n /** Props forwarded to the Combobox.Popover. */\n popoverProps?: Record<string, any>;\n /** CSS class. */\n class?: string;\n}\n\n/**\n * Single-selection props (`selectionType` defaults to `'single'`).\n * Backwards-compatible — existing consumers do not need to set `selectionType`.\n */\nexport interface SingleSelectButtonProps<O = any> extends BaseSelectButtonProps<O> {\n /** Selection type. Optional — defaults to `'single'`. */\n selectionType?: 'single';\n /** Selected option (or `undefined` when nothing is selected). */\n value?: O;\n}\n\n/** Multi-selection props (`selectionType: 'multiple'` is required to opt in). */\nexport interface MultipleSelectButtonProps<O = any> extends BaseSelectButtonProps<O> {\n /** Selection type. */\n selectionType: 'multiple';\n /** Selected options. */\n value?: O[];\n}\n\n/**\n * SelectButton props — supports both single and multi selection.\n * Discriminated on `selectionType`: when `'multiple'`, `value` is `O[]`.\n */\nexport type SelectButtonProps<O = any> = SingleSelectButtonProps<O> | MultipleSelectButtonProps<O>;\n\n/**\n * SelectButton events schema\n */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nexport const emitSchema = {\n /**\n * Selection change. Payload type depends on `selectionType`:\n * - default / `'single'` → `O` (selected option).\n * - `'multiple'` → `O[]` (toggled array).\n *\n * The runtime validator uses `unknown` since the typed payload can't be expressed\n * without the component generic. The typed payload is restored via `SelectButtonEmits`.\n */\n change: (_newValue: unknown) => true,\n /** Bottom of the options list reached — consumer should fetch the next page. */\n 'load-more': () => true,\n /** Dropdown opened or closed. */\n open: (_isOpen: boolean) => true,\n};\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\n/**\n * SelectButton emits typed over the option type O and the selection type S.\n */\ntype SelectButtonEmits<O, S extends 'single' | 'multiple'> = Omit<EmitsOf<typeof emitSchema>, 'change'> & {\n change: (newValue: S extends 'multiple' ? O[] : O) => void;\n};\n\ntype SingleSelectButtonPublicProps<O> = SingleSelectButtonProps<O> & EmitsToProps<SelectButtonEmits<O, 'single'>>;\ntype MultipleSelectButtonPublicProps<O> = MultipleSelectButtonProps<O> & EmitsToProps<SelectButtonEmits<O, 'multiple'>>;\n\n/**\n * SelectButton component constructor with generic type attached to props.\n *\n * Vue's `defineComponent` setup-fn overload cannot carry an unbound generic from the setup\n * signature to the resulting component constructor, so the generic is layered on via cast.\n *\n * Two `new` overloads provide per-branch emit narrowing matching `SelectTextField`.\n */\nexport interface SelectButtonConstructor {\n new <O = any>(\n props: SingleSelectButtonPublicProps<O> & PublicProps,\n ): {\n $props: SingleSelectButtonPublicProps<O>;\n $emit: EmitFn<SelectButtonEmits<O, 'single'>>;\n };\n new <O = any>(\n props: MultipleSelectButtonPublicProps<O> & PublicProps,\n ): {\n $props: MultipleSelectButtonPublicProps<O>;\n $emit: EmitFn<SelectButtonEmits<O, 'multiple'>>;\n };\n}\n\n/**\n * A Button with a select dropdown to choose between a list of options.\n *\n * Scoped slots:\n * - `button({ buttonProps, label, content })` — replaces the default `<Button rightIcon={mdiMenuDown}>` trigger.\n * `buttonProps` **must** be spread on the slot root so that the combobox ARIA attributes and `ref`\n * reach the DOM node. The `<Tooltip>` wrapper is always rendered. See `SelectButtonButtonSlotProps`.\n * - `option({ option, index })` — custom option rendering inside a `<Combobox.Option>`.\n * - `sectionTitle({ sectionId, options })` — custom section header rendering.\n */\nconst SelectButton = defineComponent(\n (props: SelectButtonProps, { emit, slots, attrs }) => {\n // ComboboxList is a Vue component, so the ref resolves to its instance — Vue 3 auto-sets\n // `$el` to the root DOM node (the `<ul>`).\n const listRef = ref<ComponentPublicInstance | null>(null);\n\n // Merge `class` prop with `className` attr (React-style attr from core JSX).\n const className = useClassName(() => props.class);\n\n /*\n * Resolve disabled state from props and any React-named attrs (`ariaDisabled`,\n * `aria-disabled`) forwarded by the core JSX layer.\n */\n const { disabledStateProps } = useDisableStateProps(\n computed(() => ({ ...props, ...attrs }) as Record<string, unknown>),\n );\n\n /** Adapt the 'option' scoped slots to the core JSX renderOption. */\n const renderOption = useWrappedRenderOptionSlot(slots.option);\n\n /** Adapt the 'sectionTitle' scoped slots to the core JSX renderSectionTitle. */\n const renderSectionTitle = useWrappedRenderSectionTitleSlot(slots.sectionTitle);\n\n /** Render button (default Button or custom one) */\n const renderButton = computed(\n (): ComboboxButtonProps['renderButton'] =>\n ({ className: buttonClass, children, ref: triggerRef, ...otherProps }) => {\n const buttonProps = { class: buttonClass, ref: triggerRef, ...otherProps };\n\n // Default button render\n if (!slots.button) {\n return (\n <Button rightIcon={mdiMenuDown} {...buttonProps}>\n {children}\n </Button>\n ) as JSXElement;\n }\n\n // Custom button render\n return slots.button({ buttonProps, label: props.label, children }) as JSXElement;\n },\n );\n\n const handleSelect = (selectedOption: { value: string }) => {\n const next = toggleSelection(\n props.options,\n props.getOptionId,\n props.value,\n selectedOption?.value,\n props.selectionType === 'multiple',\n );\n emit('change', next);\n };\n\n /*\n * Check if a 'load-more' listener is registered on this component\n * (EmitsToProps mapping for the 'load-more' event produces 'onLoad-more').\n */\n const hasLoadMoreListener = useHasEventListener('onLoadMore') || useHasEventListener('onLoad-more');\n const onLoadMore = () => emit('load-more');\n\n return () => {\n const listStatus = props.listStatus ?? 'idle';\n\n return UI(\n {\n options: props.options,\n getOptionId: props.getOptionId as any,\n getOptionName: props.getOptionName as any,\n getOptionDescription: props.getOptionDescription as any,\n renderOption: renderOption.value as any,\n getSectionId: props.getSectionId as any,\n renderSectionTitle: renderSectionTitle.value as any,\n value: props.value,\n selectionType: props.selectionType,\n label: props.label,\n labelDisplayMode: props.labelDisplayMode,\n buttonProps: {\n ...attrs,\n ...disabledStateProps.value,\n className: className.value,\n renderButton: renderButton.value,\n },\n popoverProps: props.popoverProps,\n listProps: { ref: listRef },\n handleSelect,\n listStatus,\n onOpen: (isOpen: boolean) => emit('open', isOpen),\n translations: props.translations,\n onLoadMore: hasLoadMoreListener ? onLoadMore : undefined,\n infiniteScrollOptions: { root: listRef.value?.$el ?? null, rootMargin: '100px' },\n },\n { Combobox, InfiniteScroll },\n );\n };\n },\n {\n name: 'LumxSelectButton',\n inheritAttrs: false,\n slots: Object as SlotsType<{\n /**\n * Replaces the default `<Button rightIcon={mdiMenuDown}>` trigger.\n * `buttonProps` must be spread on the root element of the slot.\n */\n button: SelectButtonButtonSlotProps;\n /** Custom option rendering inside a `<SelectButtonOption>`. */\n option: { option: unknown; index: number };\n /** Custom section header rendering. */\n sectionTitle: { sectionId: string | undefined; options: unknown[] };\n }>,\n props: keysOf<SelectButtonProps<unknown>>()(\n 'options',\n 'getOptionId',\n 'getOptionName',\n 'getOptionDescription',\n 'getSectionId',\n 'selectionType',\n 'value',\n 'label',\n 'labelDisplayMode',\n 'popoverProps',\n 'listStatus',\n 'translations',\n 'class',\n ),\n emits: emitSchema,\n },\n);\n\nexport default SelectButton as unknown as SelectButtonConstructor & typeof SelectButton;\nexport { DEFAULT_PROPS, CLASSNAME };\n","import _ComboboxOption from '../combobox/ComboboxOption';\n\nexport {\n default as SelectButton,\n type SelectButtonProps,\n type SingleSelectButtonProps,\n type MultipleSelectButtonProps,\n type SelectButtonButtonSlotProps,\n} from './SelectButton';\nexport type {\n SelectListStatus,\n SelectListStatus as SelectButtonStatus,\n SelectButtonTranslations,\n} from '@lumx/core/js/utils/select/types';\n\n/** Selectable option within the dropdown list. */\nexport const SelectButtonOption = _ComboboxOption;\n","import type { JSXElement, LumxClassName } from '../../types';\nimport { renderSelectOptions } from '../../utils/select/renderSelectOptions';\nimport { BaseSelectComponents, BaseSelectProps, SelectListStatus } from '../../utils/select/types';\n\n/**\n * Defines the props for the core SelectTextField template.\n */\nexport interface SelectTextFieldProps<O = any> extends BaseSelectProps<O> {\n /** Selected option (single) or options (multiple) — for marking options as selected. */\n selected?: O | O[];\n\n /** Field label (required). Also used as aria-label for the listbox. */\n label: string;\n\n /** Whether the listbox supports multiple selection. */\n isMultiselectable?: boolean;\n\n /** Props forwarded to Combobox.Input. */\n inputProps?: Record<string, any>;\n\n /** Props forwarded to Combobox.Popover. */\n popoverProps?: Record<string, any>;\n\n /** Props forwarded to Combobox.List (e.g. ref). */\n listProps?: Record<string, any>;\n\n /**\n * Status of the dropdown list.\n * - `'idle'` — Default state, no loading indicators.\n * - `'loading'` — Full loading: shows skeleton placeholders, hides real options.\n * - `'loadingMore'` — Paginated loading: appends a skeleton after existing options.\n * - `'error'` — Error state: shows an error message in the dropdown.\n * @default 'idle'\n */\n listStatus?: SelectListStatus;\n\n /** Screen reader loading announcement (e.g. \"Loading…\"). */\n loadingMessage?: string;\n\n /**\n * Message to display when the list has no visible options.\n * Can be a plain string or a function receiving the current input value (for dynamic messages).\n * When omitted, the empty state is not shown.\n */\n emptyMessage?: string | ((inputValue: string) => string);\n\n /**\n * Message callback to display the number of available options.\n * Called with the current visible option count and should return a human-readable string.\n * Displayed when the combobox is open, not empty, not loading, and not in error.\n * When omitted, no option count message is shown.\n */\n nbOptionMessage?: (optionsLength: number) => string;\n\n /** Error title displayed in the dropdown (e.g. \"Failed to load\"). */\n errorMessage?: string;\n\n /** Secondary error message (e.g. \"Please try again\"). */\n errorTryReloadMessage?: string;\n\n /** Callback fired when the dropdown open state changes. */\n onOpen?: (isOpen: boolean) => void;\n\n /** Chips element rendered inside the input (multiple selection). */\n chips?: JSXElement;\n\n /** Content to render before the options list. */\n beforeOptions?: JSXElement;\n\n /** Content to render after options. */\n afterOptions?: JSXElement;\n\n /**\n * Callback fired to load more items (infinite scroll).\n * When provided together with an injected `InfiniteScroll` component, an invisible\n * sentinel element is rendered after the options to trigger loading via IntersectionObserver.\n */\n onLoadMore?: () => void;\n\n /** IntersectionObserver options forwarded to the InfiniteScroll sentinel. */\n infiniteScrollOptions?: IntersectionObserverInit;\n}\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'SelectTextField';\n\n/**\n * Component default class name.\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-select-text-field';\n\n/**\n * SelectTextField core template.\n * Renders a Combobox with a text input trigger and a dropdown list of options.\n * Supports search/filter, single selection, and multiple selection with chips.\n *\n * Framework-specific components are passed as a second argument by the React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const SelectTextField = (props: SelectTextFieldProps, { Combobox, InfiniteScroll }: BaseSelectComponents) => {\n const {\n options,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption,\n getSectionId,\n renderSectionTitle,\n selected,\n label,\n isMultiselectable,\n inputProps,\n popoverProps,\n listProps,\n listStatus = 'idle',\n loadingMessage,\n emptyMessage,\n nbOptionMessage,\n errorMessage,\n errorTryReloadMessage,\n onOpen,\n chips,\n beforeOptions,\n afterOptions,\n onLoadMore,\n infiniteScrollOptions,\n } = props;\n\n const isFullLoading = listStatus === 'loading';\n const isLoadingMore = listStatus === 'loadingMore';\n const isError = listStatus === 'error';\n\n return (\n <Combobox.Provider onOpen={onOpen}>\n <Combobox.Input label={label} {...inputProps} selectionMode=\"keep\" chips={chips} />\n\n <Combobox.Popover\n fitToAnchorWidth=\"minWidth\"\n fitWithinViewportHeight\n placement=\"bottom-start\"\n {...popoverProps}\n >\n <Combobox.List {...listProps} aria-label={label} aria-multiselectable={isMultiselectable || undefined}>\n {beforeOptions}\n\n {isFullLoading ? (\n <Combobox.OptionSkeleton count={3} />\n ) : (\n renderSelectOptions(\n {\n options,\n getOptionId,\n getOptionName,\n getOptionDescription,\n renderOption,\n getSectionId,\n renderSectionTitle,\n selected,\n },\n { Combobox },\n )\n )}\n\n {afterOptions}\n\n {onLoadMore && InfiniteScroll && (\n <InfiniteScroll\n callback={() => {\n // Guard: prevent firing during loading or error states to avoid duplicate fetches.\n if (listStatus && listStatus !== 'idle') return;\n onLoadMore();\n }}\n options={infiniteScrollOptions}\n />\n )}\n\n {isLoadingMore && <Combobox.OptionSkeleton count={1} />}\n </Combobox.List>\n\n <Combobox.State\n loadingMessage={loadingMessage}\n emptyMessage={emptyMessage}\n nbOptionMessage={nbOptionMessage}\n errorMessage={isError ? errorMessage : undefined}\n errorTryReloadMessage={isError ? errorTryReloadMessage : undefined}\n />\n </Combobox.Popover>\n </Combobox.Provider>\n );\n};\n\nSelectTextField.displayName = COMPONENT_NAME;\nSelectTextField.className = CLASSNAME;\n","import {\n type ComponentPublicInstance,\n type EmitFn,\n type EmitsToProps,\n type PublicProps,\n computed,\n defineComponent,\n ref,\n watch,\n} from 'vue';\n\nimport { type BaseSelectTextFieldWrapperProps } from '@lumx/core/js/utils/select/types';\nimport { getOptionDisplayName } from '@lumx/core/js/utils/select/getOptionDisplayName';\nimport { toggleSelection } from '@lumx/core/js/utils/select/toggleSelection';\nimport { SelectTextField as UI } from '@lumx/core/js/components/SelectTextField';\nimport type { JSXElement } from '@lumx/core/js/types';\n\nimport { keysOf, type ClassValue, type EmitsOf } from '../../utils/VueToJSX';\nimport { Combobox } from '../combobox';\nimport { useWrappedRenderOptionSlot } from '../combobox/useWrappedRenderOptionSlot';\nimport { useWrappedRenderSectionTitleSlot } from '../combobox/useWrappedRenderSectionTitleSlot';\nimport SelectionChipGroup from '../chip/SelectionChipGroup';\nimport { InfiniteScroll } from '@lumx/vue/utils/InfiniteScroll';\nimport { useHasEventListener } from '../../composables/useHasEventListener';\nimport { useClassName } from '../../composables/useClassName';\nimport { useDisableStateProps } from '../../composables/useDisableStateProps';\n\n/** Props shared across single and multiple selection modes. */\ninterface BaseSelectTextFieldProps<O = any> extends BaseSelectTextFieldWrapperProps<O> {\n /** Content to render before the options list. */\n beforeOptions?: JSXElement;\n /** CSS class. */\n class?: ClassValue;\n}\n\n/** Props specific to single selection mode. */\nexport interface SingleSelectTextFieldProps<O = any> extends BaseSelectTextFieldProps<O> {\n /** Selection type. */\n selectionType: 'single';\n /** Selected option object. */\n value?: O;\n}\n\n/** Props specific to multiple selection mode. */\nexport interface MultipleSelectTextFieldProps<O = any> extends BaseSelectTextFieldProps<O> {\n /** Selection type. */\n selectionType: 'multiple';\n /** Selected option objects. */\n value?: O[];\n}\n\n/**\n * SelectTextField props — supports both single and multiple selection.\n * Discriminated on `selectionType`:\n * - `'single'` → `value?: O`, emits `change` with `O | undefined`.\n * - `'multiple'` → `value?: O[]`, emits `change` with `O[] | undefined`.\n *\n * @typeParam O - Option object type, inferred from `options` / `getOptionId`.\n */\nexport type SelectTextFieldProps<O = any> = SingleSelectTextFieldProps<O> | MultipleSelectTextFieldProps<O>;\n\n/**\n * SelectTextField events schema\n */\n/* eslint-disable @typescript-eslint/no-unused-vars */\nconst emitSchema = {\n /**\n * Selection change. Payload type depends on `selectionType`:\n * - `'single'` → `O | undefined` (option on select, `undefined` on clear).\n * - `'multiple'` → `O[] | undefined` (`undefined` when fully cleared).\n *\n * The runtime validator uses `unknown` since the discriminated payload can't be\n * expressed without the component generic. The typed payload is restored by the\n * `change` override on `SelectTextFieldEmits<O, S>`.\n */\n change: (_newValue?: unknown) => true,\n /** User typed in the search input. */\n search: (_searchText: string) => true,\n /** Bottom of the options list reached — consumer should fetch the next page. */\n 'load-more': () => true,\n /** Input lost focus. */\n blur: (_event?: FocusEvent) => true,\n /** Input received focus. */\n focus: (_event?: FocusEvent) => true,\n /** Key pressed while the input is focused. */\n keydown: (_event?: KeyboardEvent) => true,\n /** Clear button clicked (single mode only). */\n clear: (_event?: MouseEvent) => true,\n /** Dropdown opened or closed. */\n open: (_isOpen: boolean) => true,\n};\n/* eslint-enable @typescript-eslint/no-unused-vars */\n\n/**\n * SelectTextField emits (adapting to the selection type).\n */\ntype SelectTextFieldEmits<O, S extends 'single' | 'multiple'> = Omit<EmitsOf<typeof emitSchema>, 'change'> & {\n change: (newValue: (S extends 'multiple' ? O[] : O) | undefined) => void;\n};\n\ntype SingleSelectTextFieldPublicProps<O> = SingleSelectTextFieldProps<O> &\n EmitsToProps<SelectTextFieldEmits<O, 'single'>>;\ntype MultipleSelectTextFieldPublicProps<O> = MultipleSelectTextFieldProps<O> &\n EmitsToProps<SelectTextFieldEmits<O, 'multiple'>>;\n\n/**\n * SelectTextField component constructor with generic type attached to props\n *\n * Vue's `defineComponent` setup-fn overload cannot carry an unbound generic from the setup\n * signature to the resulting component constructor, so the generic is layered on via cast.\n */\nexport interface SelectTextFieldConstructor {\n new <O = any>(\n props: SingleSelectTextFieldPublicProps<O> & PublicProps,\n ): {\n $props: SingleSelectTextFieldPublicProps<O>;\n $emit: EmitFn<SelectTextFieldEmits<O, 'single'>>;\n };\n new <O = any>(\n props: MultipleSelectTextFieldPublicProps<O> & PublicProps,\n ): {\n $props: MultipleSelectTextFieldPublicProps<O>;\n $emit: EmitFn<SelectTextFieldEmits<O, 'multiple'>>;\n };\n}\n\n/**\n * A text field with a select dropdown to choose between a list of options.\n * Supports search/filter, single selection, and multiple selection with chips.\n *\n * Scoped slots:\n * - `option({ option, index })` — custom option rendering inside a `<Combobox.Option>`.\n * - `sectionTitle({ sectionId, options })` — custom section header rendering.\n * - `chip({ option, index })` — custom chip rendering (multiple selection only).\n */\nconst SelectTextField = defineComponent(\n (props: SelectTextFieldProps, { emit, slots, attrs }) => {\n const isMultiple = computed(() => props.selectionType === 'multiple');\n\n // Merge `class` prop with `className` attr (React-style attr from core JSX).\n const className = useClassName(() => props.class);\n\n /*\n * Resolve disabled state from props and any React-named attrs (`ariaDisabled`,\n * `aria-disabled`) forwarded by the core JSX layer. `useDisableStateProps`\n * normalizes all the variants and provides `isAnyDisabled`.\n */\n const { isAnyDisabled, disabledStateProps } = useDisableStateProps(\n computed(() => ({ ...props, ...attrs }) as Record<string, unknown>),\n );\n\n // Track whether the user is actively typing a search.\n const isSearching = ref(Boolean(props.searchInputValue));\n const searchText = ref(props.searchInputValue ?? '');\n\n // ComboboxList is a Vue component, so the ref resolves to its instance — Vue 3 auto-sets\n // `$el` to the root DOM node (the `<ul>`).\n const listRef = ref<ComponentPublicInstance | null>(null);\n\n // Ref to the underlying <input> element (needed to link the SelectionChipGroup)\n const inputElRef = ref<HTMLInputElement | null>(null);\n\n // Sync external controlled search value into internal state.\n watch(\n () => props.searchInputValue,\n (newVal) => {\n if (newVal !== undefined) {\n searchText.value = newVal;\n isSearching.value = Boolean(newVal);\n }\n },\n );\n\n // The display value shown in the input.\n const displayValue = computed(() => {\n // Guard: multiple mode always shows the search text (chips represent the selection).\n if (props.selectionType === 'multiple') return searchText.value;\n // Guard: while typing, always show what the user typed.\n if (isSearching.value) return searchText.value;\n // TypeScript now narrows props to SingleSelectTextFieldProps here.\n return getOptionDisplayName(props.value, props.getOptionName, props.getOptionId);\n });\n\n // Map option id selection to option object(s) selection (delegates the toggle math to core).\n const handleSelect = (selectedOption: { value: string }) => {\n const next = toggleSelection(\n props.options,\n props.getOptionId,\n props.value,\n selectedOption.value,\n props.selectionType === 'multiple',\n );\n // In multi mode, `toggleSelection` skips when no option matches and returns the\n // unchanged current array — the emit is a no-op for the consumer.\n emit('change', next);\n\n // Reset search state after selection.\n isSearching.value = false;\n searchText.value = '';\n emit('search', '');\n };\n\n // Handle text input changes (search).\n const handleInputChange = (inputValue: string) => {\n isSearching.value = true;\n searchText.value = inputValue;\n emit('search', inputValue);\n\n // When the user clears the input (single mode only), clear the selection too.\n if (!isMultiple.value && inputValue === '' && props.value !== undefined && props.value !== null) {\n emit('change', undefined);\n }\n };\n\n // Handle clear button click (single mode only).\n const handleClear = (event?: MouseEvent) => {\n emit('change', undefined);\n isSearching.value = false;\n searchText.value = '';\n emit('search', '');\n emit('clear', event);\n };\n\n // Handle blur: reset input to selected value name, then emit blur and search events.\n const handleBlur = (event?: FocusEvent) => {\n isSearching.value = false;\n searchText.value = '';\n emit('search', '');\n emit('blur', event);\n };\n\n /** Adapt the scoped slots to the JSX render functions expected by the core template. */\n const wrappedRenderOption = useWrappedRenderOptionSlot(slots.option);\n const wrappedRenderSectionTitle = useWrappedRenderSectionTitleSlot(slots.sectionTitle);\n\n /*\n * Check if a 'load-more' listener is registered on this component\n * (EmitsToProps mapping for the 'load-more' event produces 'onLoad-more').\n */\n const hasLoadMoreListener = useHasEventListener('onLoadMore') || useHasEventListener('onLoad-more');\n\n const onLoadMore = () => emit('load-more');\n\n return () => {\n const showClear =\n !isMultiple.value &&\n !isAnyDisabled.value &&\n (props.hasClearButton ?? true) &&\n props.value !== undefined &&\n props.value !== null;\n\n // TypeScript narrows props to MultipleSelectTextFieldProps inside the truthy branch.\n const chips =\n props.selectionType === 'multiple' ? (\n <SelectionChipGroup\n value={props.value}\n theme={props.theme}\n getOptionId={props.getOptionId}\n getOptionName={props.getOptionName}\n onChange={(newValue) => emit('change', newValue)}\n inputRef={inputElRef.value}\n isDisabled={isAnyDisabled.value}\n label={props.translations.chipGroupLabel ?? props.label}\n chipRemoveLabel={props.translations.chipRemoveLabel}\n >\n {{ chip: slots.chip || undefined }}\n </SelectionChipGroup>\n ) : undefined;\n\n const listStatus = props.listStatus ?? 'idle';\n\n const beforeOptionsSlot = (props.beforeOptions ?? slots.beforeOptions?.()) as JSXElement | undefined;\n\n /*\n * Selector<O> is not assignable to Selector<any> due to function parameter contravariance.\n * The core template is not generic, so we cast selectors when forwarding to UI().\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n return UI(\n {\n options: props.options,\n getOptionId: props.getOptionId as any,\n getOptionName: props.getOptionName as any,\n getOptionDescription: props.getOptionDescription as any,\n renderOption: wrappedRenderOption.value as any,\n getSectionId: props.getSectionId as any,\n renderSectionTitle: wrappedRenderSectionTitle.value as any,\n selected: props.value,\n label: props.label,\n isMultiselectable: isMultiple.value,\n listStatus,\n onOpen: (isOpen: boolean) => emit('open', isOpen),\n loadingMessage: props.translations.loadingMessage,\n emptyMessage: props.translations.emptyMessage,\n nbOptionMessage: props.translations.nbOptionMessage,\n errorMessage: props.translations.errorMessage,\n errorTryReloadMessage: props.translations.errorTryReloadMessage,\n inputProps: {\n ...props.inputProps,\n placeholder: props.placeholder,\n icon: props.icon,\n value: displayValue.value,\n inputRef(el: HTMLInputElement | null) {\n inputElRef.value = el;\n },\n onChange: handleInputChange,\n onSelect: handleSelect,\n onBlur: handleBlur,\n onFocus: (event?: FocusEvent) => emit('focus', event),\n onKeyDown: (event?: KeyboardEvent) => emit('keydown', event),\n ...disabledStateProps.value,\n isRequired: props.isRequired,\n hasError: props.hasError,\n error: props.error,\n helper: props.helper,\n id: props.id,\n name: props.name,\n isValid: props.isValid,\n maxLength: props.maxLength,\n 'aria-label': props.ariaLabel,\n clearButtonProps: showClear ? { label: props.translations.clearLabel } : undefined,\n onClear: handleClear,\n toggleButtonProps: props.translations.showSuggestionsLabel\n ? { label: props.translations.showSuggestionsLabel }\n : undefined,\n filter: props.filter,\n openOnFocus: props.openOnFocus,\n className: className.value,\n theme: props.theme,\n },\n popoverProps: props.popoverProps,\n listProps: { ref: listRef },\n chips: chips as JSXElement | undefined,\n beforeOptions: beforeOptionsSlot,\n onLoadMore: hasLoadMoreListener ? onLoadMore : undefined,\n infiniteScrollOptions: { root: listRef.value?.$el ?? null, rootMargin: '100px' },\n },\n { Combobox, InfiniteScroll },\n );\n };\n },\n {\n name: 'LumxSelectTextField',\n inheritAttrs: false,\n props: keysOf<SelectTextFieldProps<unknown>>()(\n 'options',\n 'getOptionId',\n 'getOptionName',\n 'getOptionDescription',\n 'getSectionId',\n 'selectionType',\n 'value',\n 'filter',\n 'searchInputValue',\n 'hasClearButton',\n 'listStatus',\n 'label',\n 'placeholder',\n 'icon',\n 'isDisabled',\n 'aria-disabled',\n 'isRequired',\n 'hasError',\n 'error',\n 'helper',\n 'id',\n 'name',\n 'isValid',\n 'maxLength',\n 'ariaLabel',\n 'inputProps',\n 'popoverProps',\n 'translations',\n 'beforeOptions',\n 'openOnFocus',\n 'class',\n 'theme',\n ),\n emits: emitSchema,\n },\n);\n\nexport default SelectTextField as unknown as SelectTextFieldConstructor & typeof SelectTextField;\n","import _ComboboxOption from '../combobox/ComboboxOption';\nimport _ComboboxSection from '../combobox/ComboboxSection';\nimport _ComboboxOptionMoreInfo from '../combobox/ComboboxOptionMoreInfo';\nimport _ComboboxOptionSkeleton from '../combobox/ComboboxOptionSkeleton';\nimport _ListDivider from '../list/ListDivider';\n\nexport {\n type SelectTextFieldProps,\n type SingleSelectTextFieldProps,\n type MultipleSelectTextFieldProps,\n default as SelectTextField,\n} from './SelectTextField';\nexport type { SelectListStatus, SelectListStatus as SelectTextFieldStatus } from '@lumx/core/js/utils/select/types';\nexport type { SelectTextFieldTranslations } from '@lumx/core/js/utils/select/types';\n\n/** Selectable option within the dropdown list. */\nexport const SelectTextFieldOption = _ComboboxOption;\n\n/** Labelled group of options. */\nexport const SelectTextFieldSection = _ComboboxSection;\n\n/** Info icon on an option that reveals a popover with additional details. */\nexport const SelectTextFieldOptionMoreInfo = _ComboboxOptionMoreInfo;\n\n/** Skeleton loading placeholder for options being fetched. */\nexport const SelectTextFieldOptionSkeleton = _ComboboxOptionSkeleton;\n\n/** Visual separator between option groups (alias for ListDivider). Purely decorative — invisible to screen readers. */\nexport const SelectTextFieldDivider = _ListDivider;\n","import { classNames } from '../../utils';\nimport type { GenericProps, HasClassName, HasTheme, LumxClassName } from '../../types';\nimport type { TimeOfDay } from '../../utils/time';\nimport type { SelectTextFieldTranslations } from '../../utils/select/types';\n\n/**\n * Component display name.\n */\nexport const COMPONENT_NAME = 'TimePickerField';\n\n/**\n * Component default class name (BEM root).\n */\nexport const CLASSNAME: LumxClassName<typeof COMPONENT_NAME> = 'lumx-time-picker-field';\nconst { block } = classNames.bem(CLASSNAME);\n\n/**\n * Default values for `TimePickerFieldWrapperProps`.\n */\nexport const DEFAULT_PROPS: Partial<TimePickerFieldWrapperProps> = {\n step: 30,\n boundsMode: 'on-blur',\n};\n\n/**\n * Translations consumed by `TimePickerField` (forwarded as-is to the underlying\n * `SelectTextField`).\n */\nexport type TimePickerFieldTranslations = Pick<SelectTextFieldTranslations, 'clearLabel' | 'showSuggestionsLabel'>;\n\n/**\n * Wrapper-level props shared by React and Vue `TimePickerField`.\n *\n * These represent the public API that framework wrappers expose to consumers\n * (as opposed to the core template props which use pre-computed `TimeOfDay` values).\n */\nexport interface TimePickerFieldWrapperProps {\n /**\n * Currently selected time. Only the time-of-day component is consumed; the\n * date part is preserved when emitting change.\n */\n value?: Date;\n\n /**\n * BCP-47 locale string (e.g. `'en-US'`, `'fr-FR'`).\n */\n locale?: string;\n\n /**\n * Minute interval between option entries.\n */\n step?: number;\n\n /**\n * Lower bound. Options strictly before this time remain **visible** in the\n * dropdown but are rendered as disabled (cannot be picked). Typed input\n * below this bound is snapped up to it on blur.\n */\n minTime?: Date;\n\n /**\n * Upper bound. Options strictly after this time remain **visible** in the\n * dropdown but are rendered as disabled (cannot be picked). Typed input\n * above this bound is snapped down to it on blur.\n */\n maxTime?: Date;\n\n /**\n * Controls how the time value interacts with `[minTime, maxTime]` bounds.\n * Typed input is always snapped to bounds on blur.\n * - `'enforce'`: additionally, the controlled `value` prop is proactively\n * clamped to bounds on mount and whenever bounds change, calling\n * `onChange` when adjusted.\n * - `'on-blur'` (default): only blur snapping applies.\n */\n boundsMode?: 'on-blur' | 'enforce';\n\n /**\n * Translation labels for clear and show suggestions buttons.\n */\n translations: TimePickerFieldTranslations;\n}\n\n/**\n * `SelectTextField` props managed internally by the `TimePickerField` wrappers\n * (omitted from the inherited `SelectTextField` props in both React and Vue).\n */\nexport type TimePickerFieldOwnedSelectProps =\n | 'value'\n | 'listStatus'\n | 'translations'\n | 'options'\n | 'getOptionId'\n | 'getOptionName'\n | 'getOptionDescription'\n | 'getSectionId'\n | 'renderOption'\n | 'filter'\n | 'onBlur'\n | 'onSearch'\n | 'selectionType'\n | 'maxLength'\n | 'searchInputValue'\n | 'openOnFocus'\n | 'beforeOptions'\n | 'popoverProps';\n\n/**\n * Core props for the `TimePickerField` template.\n */\nexport interface TimePickerFieldProps extends HasTheme, HasClassName, GenericProps {\n /**\n * Currently selected option. Resolve from the consumer's `Date` value via\n * `value && timeList.find((e) => e.hour === value.getHours() && e.minute === value.getMinutes())`.\n */\n value?: TimeOfDay;\n\n /** Time options (one entry per `step`-minute slot). */\n options: TimeOfDay[];\n\n /** Translation labels (clear button, show-suggestions toggle). */\n translations: TimePickerFieldTranslations;\n\n /** Called when the user picks (or clears) an option. */\n handleChange(next: TimeOfDay | undefined): void;\n\n /** Called as the user types — wrappers track this to resolve on blur. */\n handleSearch(typed: string): void;\n\n /** Called when the input loses focus — wrappers commit the typed value. */\n handleBlur(): void;\n}\n\n/**\n * Injected framework-specific components for TimePickerField rendering.\n */\nexport interface TimePickerFieldComponents {\n /** Framework-specific `SelectTextField` wrapper. */\n SelectTextField: any;\n /** Framework-specific `SelectTextField.Option` sub-component (used to render disabled out-of-range entries). */\n Option: any;\n}\n\n/**\n * `TimePickerField` core template.\n *\n * Renders a `SelectTextField<TimeOfDay>` with an option list built from\n * `buildTimeList`. Out-of-range options (strictly before `minTime` / after\n * `maxTime`) remain visible in the dropdown but are rendered as disabled.\n *\n * Framework-specific components are passed as a second argument by the\n * React/Vue wrappers.\n *\n * @param props Component props.\n * @param components Injected framework-specific components.\n * @return JSX element.\n */\nexport const TimePickerField = (\n props: TimePickerFieldProps,\n { SelectTextField, Option }: TimePickerFieldComponents,\n) => {\n const { options, translations, className, handleChange, handleSearch, handleBlur, ...fowardedProps } = props;\n\n return (\n <SelectTextField\n {...fowardedProps}\n className={block([className])}\n selectionType=\"single\"\n options={options}\n getOptionId=\"name\"\n renderOption={(entry: TimeOfDay) => <Option isDisabled={entry.outOfRange} />}\n onChange={handleChange}\n onSearch={handleSearch}\n onBlur={handleBlur}\n filter=\"auto\"\n translations={translations}\n />\n );\n};\n\nTimePickerField.displayName = COMPONENT_NAME;\nTimePickerField.className = CLASSNAME;\n","/**\n * Format a time-of-day as a locale-aware short time (e.g. `'10:30 AM'`,\n * `'10:30'`). Hour is `numeric` (not `'2-digit'`); some locales insert a\n * narrow no-break space (U+202F) before AM/PM.\n */\nexport function formatTime(date: Date, locale: string): string {\n return date.toLocaleTimeString(locale, { hour: 'numeric', minute: '2-digit' });\n}\n","/**\n * Build a new `Date` with the given time-of-day, inheriting the date part of\n * `reference` (or today). Seconds/ms zeroed; `reference` is not mutated.\n */\nexport function getDateAtTime({ hour, minute }: { hour: number; minute: number }, reference?: Date): Date {\n const next = reference ? new Date(reference) : new Date();\n next.setHours(hour, minute, 0, 0);\n return next;\n}\n","/**\n * Return the time-of-day of `date` in minutes since 00:00 (date part ignored).\n */\nexport function timeOfDayMinutes(date: Date): number {\n return date.getHours() * 60 + date.getMinutes();\n}\n","import { formatTime } from './formatTime';\nimport { getDateAtTime } from './getDateAtTime';\nimport { timeOfDayMinutes } from './timeOfDayMinutes';\n\n/**\n * A time-of-day (24h), independent of any date or time zone. Canonical\n * exchange shape for the time utilities and `TimePickerField`.\n */\nexport interface TimeOfDay {\n /** 0–23 */\n hour: number;\n /** 0–59 */\n minute: number;\n /** Locale-aware short display string. Populated by `buildTimeList` when `locale` is set. */\n name?: string;\n /**\n * `true` when strictly outside `[minTime, maxTime]`. Set by `buildTimeList`;\n * consumers typically forward this as `isDisabled` on the rendered option.\n */\n outOfRange?: boolean;\n}\n\n/** Options for `buildTimeList`. */\nexport interface BuildTimeListOptions {\n /** Positive integer minute interval between entries. @default 30 */\n step?: number;\n /** Lower bound (date part ignored). Entries before are kept but marked `outOfRange`. */\n minTime?: Date;\n /** Upper bound (date part ignored). Entries after are kept but marked `outOfRange`. */\n maxTime?: Date;\n /** BCP-47 locale used to populate `name` on each entry. */\n locale?: string;\n}\n\nconst MINUTES_IN_HOUR = 60;\nconst MINUTES_IN_DAY = 24 * MINUTES_IN_HOUR;\n\n/**\n * Build a full-day list of `TimeOfDay` entries spaced `step` minutes apart.\n * Out-of-bounds entries are kept (with `outOfRange: true`) so consumers can\n * render them as visible-but-unselectable. Returns `[]` for invalid `step`.\n */\nexport function buildTimeList(options: BuildTimeListOptions = {}): TimeOfDay[] {\n const { step = 30, minTime, maxTime, locale } = options;\n if (!Number.isInteger(step) || step <= 0) {\n return [];\n }\n\n const minMinutes = minTime ? timeOfDayMinutes(minTime) : undefined;\n const maxMinutes = maxTime ? timeOfDayMinutes(maxTime) : undefined;\n\n const list: TimeOfDay[] = [];\n for (let minutes = 0; minutes < MINUTES_IN_DAY; minutes += step) {\n const hour = Math.floor(minutes / MINUTES_IN_HOUR);\n const minute = minutes % MINUTES_IN_HOUR;\n const outOfRange =\n (minMinutes !== undefined && minutes < minMinutes) ||\n (maxMinutes !== undefined && minutes > maxMinutes) ||\n undefined;\n const name = locale ? formatTime(getDateAtTime({ hour, minute }), locale) : undefined;\n\n list.push({ hour, minute, name, outOfRange });\n }\n return list;\n}\n","import type { TimeOfDay } from './buildTimeList';\n\n/**\n * Match a free-form time. Supports:\n * - 12h with am/pm suffix (`a`, `am`, `p`, `pm`, `a.m.`, `p.m.`), optional whitespace\n * - 24h with colon (`15:45`), dot (`15.45`), `h` (`15h45`) or no separator (`1545`)\n * - Optional seconds segment (ignored): `15:45:00`, `15.45.00`\n * - Optional ISO `T` prefix and trailing `Z` (UTC marker)\n *\n * Capture groups:\n * 1: hour, 2: minutes (optional), 3: am/pm marker (optional)\n */\nconst RE_TIME = /^T?(\\d{1,2})(?:[:.h]?([0-5]\\d)(?:[:.]?[0-5]\\d)?)?\\s*(a\\.?m?\\.?|p\\.?m?\\.?)?Z?$/i;\n\n/**\n * Parse a free-form user time input into a 24h `TimeOfDay`. Accepts a wide\n * range of formats:\n *\n * - 12h AM/PM: `'2pm'`, `'2 PM'`, `'2:30pm'`, `'3.45 PM'`, `'3:45 p.m.'`\n * - 24h colon: `'10:30'`, `'15:45'`\n * - 24h dot (DE/FR/IT): `'15.45'`\n * - 24h French: `'15h45'`\n * - Military / no separator: `'1545'`, `'1030pm'`\n * - With seconds (ignored): `'15:45:00'`\n * - ISO 8601: `'T15:45'`, `'15:45Z'`\n *\n * Whitespace is trimmed. Returns `undefined` if no format matches.\n */\nexport function parseTimeInput(raw: string): TimeOfDay | undefined {\n if (typeof raw !== 'string') return undefined;\n const match = raw.trim().match(RE_TIME);\n if (!match) return undefined;\n\n const [, rawHour, rawMinute, ampm] = match;\n let hour = Number(rawHour);\n const minute = rawMinute ? Number(rawMinute) : 0;\n\n if (ampm) {\n // 12h: hour must be 1..12; convert to 24h (12am→0, 12pm→12).\n if (hour < 1 || hour > 12) return undefined;\n const isPm = ampm[0].toLowerCase() === 'p';\n if (hour === 12) hour = isPm ? 12 : 0;\n else if (isPm) hour += 12;\n } else if (hour > 23) {\n // 24h: hour must be 0..23.\n return undefined;\n }\n\n return { hour, minute };\n}\n","import type { TimeOfDay } from './buildTimeList';\nimport { timeOfDayMinutes } from './timeOfDayMinutes';\n\n/**\n * Clamp `time` to `[minTime, maxTime]`. Inputs strictly before `minTime` snap\n * up; inputs strictly after `maxTime` snap down; otherwise returned unchanged.\n * Only the time-of-day of `minTime`/`maxTime` is used.\n */\nexport function snapTimeToBounds(time: TimeOfDay, minTime?: Date, maxTime?: Date): TimeOfDay {\n const totalMinutes = time.hour * 60 + time.minute;\n\n if (minTime && totalMinutes < timeOfDayMinutes(minTime)) {\n return { hour: minTime.getHours(), minute: minTime.getMinutes() };\n }\n if (maxTime && totalMinutes > timeOfDayMinutes(maxTime)) {\n return { hour: maxTime.getHours(), minute: maxTime.getMinutes() };\n }\n return time;\n}\n","/**\n * Returns `true` when the time-of-day of `date` matches `time` (hour and\n * minute). Seconds and milliseconds are ignored.\n */\nexport function isDateOnTime(date: Date, time: { hour: number; minute: number }): boolean {\n return date.getHours() === time.hour && date.getMinutes() === time.minute;\n}\n","/**\n * Get current browser locale (BCP-47 string).\n *\n * Reads `navigator.languages[0]` (the user's preferred language) with a\n * fallback to `navigator.language`.\n */\nexport const getCurrentLocale = (): string => navigator.languages?.[0] || navigator.language;\n","import { computed, defineComponent, ref, watch } from 'vue';\n\nimport {\n TimePickerField as UI,\n type TimePickerFieldProps as UIProps,\n type TimePickerFieldWrapperProps,\n type TimePickerFieldOwnedSelectProps,\n DEFAULT_PROPS,\n} from '@lumx/core/js/components/TimePickerField';\nimport {\n buildTimeList,\n formatTime,\n getDateAtTime,\n isDateOnTime,\n parseTimeInput,\n snapTimeToBounds,\n} from '@lumx/core/js/utils/time';\nimport { getCurrentLocale } from '@lumx/core/js/utils/locale/getCurrentLocale';\n\nimport { keysOf, type ClassValue } from '../../utils/VueToJSX';\nimport { useClassName } from '../../composables/useClassName';\nimport { SelectTextField, SelectTextFieldOption } from '../select-text-field';\n\nimport type { SingleSelectTextFieldProps } from '../select-text-field/SelectTextField';\n\n/**\n * Inherited SelectTextField props (less the parts owned by TimePickerField).\n */\ntype InheritedSelectTextFieldProps = Omit<SingleSelectTextFieldProps<any>, TimePickerFieldOwnedSelectProps | 'class'>;\n\n/**\n * `TimePickerField` props.\n */\nexport interface TimePickerFieldProps extends InheritedSelectTextFieldProps, TimePickerFieldWrapperProps {\n /** CSS class. */\n class?: ClassValue;\n}\n\n/**\n * TimePickerField events schema.\n */\nexport const emitSchema = {\n /**\n * Selection change. Payload is the new `Date` whose date part is inherited\n * from the previous `value` (or today, if none) and whose time-of-day\n * matches the user selection. May be `undefined` when the field is cleared.\n */\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n change: (_newValue?: Date) => true,\n};\n\n/**\n * A select-style picker for choosing a time of day. Wraps `SelectTextField`\n * with a generated list of times built from `step`, `minTime`, and `maxTime`.\n *\n * Out-of-range options (strictly before `minTime` or after `maxTime`) remain\n * visible in the dropdown but are rendered as disabled.\n *\n * Free-form typed input (e.g. `\"10:30 PM\"`, `\"14\"`, `\"930\"`) is parsed on blur.\n */\nconst TimePickerField = defineComponent(\n (props: TimePickerFieldProps, { emit }) => {\n const className = useClassName(() => props.class);\n const locale = computed(() => props.locale ?? getCurrentLocale());\n const step = computed(() => props.step ?? DEFAULT_PROPS.step);\n const boundsMode = computed(() => props.boundsMode ?? DEFAULT_PROPS.boundsMode);\n\n // Build the option list — re-computed only when bounds/step/locale change.\n const timeList = computed(() =>\n buildTimeList({\n step: step.value,\n minTime: props.minTime,\n maxTime: props.maxTime,\n locale: locale.value,\n }),\n );\n\n // Track the user's last non-empty typed input.\n const committedSearch = ref<string>('');\n\n // Resolve the option that matches the current value (by time-of-day).\n const selectedOption = computed(() => {\n const { value } = props;\n if (!value) return undefined;\n return {\n hour: value.getHours(),\n minute: value.getMinutes(),\n name: formatTime(value, locale.value),\n };\n });\n\n // Clamp the current value to bounds whenever enforce mode is set and value/bounds change.\n watch(\n () => [boundsMode.value, props.value, props.minTime, props.maxTime],\n () => {\n if (boundsMode.value !== 'enforce' || !props.value) return;\n\n const timeOfDay = {\n hour: props.value.getHours(),\n minute: props.value.getMinutes(),\n };\n const clamped = snapTimeToBounds(timeOfDay, props.minTime, props.maxTime);\n\n if (clamped.hour !== props.value.getHours() || clamped.minute !== props.value.getMinutes()) {\n emit('change', getDateAtTime(clamped, props.value));\n }\n },\n { immediate: true },\n );\n\n const handleChange: UIProps['handleChange'] = (next) => {\n const date = next ? getDateAtTime(next, props.value) : undefined;\n emit('change', date);\n };\n\n const handleSearch: UIProps['handleSearch'] = (typed) => {\n if (typed) committedSearch.value = typed;\n };\n\n const handleBlur: UIProps['handleBlur'] = () => {\n const typed = committedSearch.value;\n // Reset our local typed-value tracking; SelectTextField clears its own internal copy.\n committedSearch.value = '';\n if (!typed) return;\n const parsed = parseTimeInput(typed);\n if (!parsed) return;\n\n // Snap to bounds if needed, then dedup against the current value.\n const time = snapTimeToBounds(parsed, props.minTime, props.maxTime);\n if (props.value && isDateOnTime(props.value, time)) return;\n\n emit('change', getDateAtTime(time, props.value));\n };\n\n return () => {\n const searchInputValue = props.value ? formatTime(props.value, locale.value) : undefined;\n\n const {\n value: _value,\n locale: _locale,\n step: _step,\n minTime: _minTime,\n maxTime: _maxTime,\n translations,\n class: _class,\n ...forwardedProps\n } = props;\n\n return UI(\n {\n ...(forwardedProps as any),\n value: selectedOption.value,\n options: timeList.value,\n translations,\n className: className.value,\n handleChange,\n handleSearch,\n handleBlur,\n searchInputValue,\n },\n { SelectTextField, Option: SelectTextFieldOption },\n );\n };\n },\n {\n name: 'LumxTimePickerField',\n inheritAttrs: false,\n props: keysOf<TimePickerFieldProps>()(\n 'value',\n 'locale',\n 'step',\n 'minTime',\n 'maxTime',\n 'boundsMode',\n 'translations',\n 'class',\n // Inherited SelectTextField props\n 'label',\n 'placeholder',\n 'icon',\n 'isDisabled',\n 'aria-disabled',\n 'isRequired',\n 'hasError',\n 'error',\n 'helper',\n 'id',\n 'name',\n 'isValid',\n 'ariaLabel',\n 'inputProps',\n 'theme',\n 'hasClearButton',\n ),\n emits: emitSchema,\n },\n);\n\nexport default TimePickerField;\n"],"names":["TOOLTIP_HOVER_DELAY","TOOLTIP_LONG_PRESS_DELAY","Alignment","Theme","Size","Orientation","Emphasis","TypographyInterface","Typography","AspectRatio","Kind","ColorPalette","ColorVariant","IS_BROWSER","hasOwn","classNames","classes","i","arg","argType","inner","key","module","modifier","baseName","modifiers","modifierClasses","value","block","modifiersOrAdditionalClasses","additionalClasses","classnames","PREFIX","ACTION_ELEMENT","actionArea","resolveColorWithVariants","colorWithVariants","colorVariant","color","baseColorVariant","type","propColor","propColorVariant","cColor","cColorVariant","font","typography","typo","ABSTRACT_SIZES","isAbstractSize","spacing","directionOrSize","size","isShorthand","direction","resolvedSize","baseClass","padding","visuallyHidden","VISUALLY_HIDDEN","element","elem","bem","blockFn","elementFn","onEnterPressed","handler","evt","onEscapePressed","getWithSelector","selector","object","groupBySelector","array","groups","item","group","_isSlot","s","Object","prototype","toString","call","_isVNode","CONFIG","error","red","icon","mdiAlert","info","blue","mdiInformation","success","green","mdiCheckCircle","warning","yellow","mdiAlertCircle","COMPONENT_NAME","CLASSNAME","DEFAULT_PROPS","tiny","kind","AlertDialog","props","id","title","className","cancelProps","confirmProps","ref","dialogProps","children","DescriptionElement","cancelButtonRef","confirmationButtonRef","focusElement","Dialog","Toolbar","Button","Icon","forwardedProps","titleId","descriptionId","label","confirmLabel","onClick","confirmOnClick","forwardedConfirmProps","cancelLabel","cancelOnClick","forwardedCancelProps","_createVNode","_mergeProps","role","Boolean","default","_Fragment","medium","counter","useId","useAttrFallback","vueProp","attrFallback","merge","attrs","useAttrs","computed","vuePropValue","toValue","attrFallbackValue","useClassName","classProp","vue","fallback","tryOnScopeDispose","fn","failSilently","getCurrentScope","onScopeDispose","isClient","notNullish","val","noop","toRef","args","toRef$1","r","readonly","customRef","toArray","defaultWindow","unrefElement","elRef","_$el","plain","useMounted","isMounted","shallowRef","instance","getCurrentInstance","onMounted","useSupported","callback","useMutationObserver","target","options","window$1","mutationOptions","observer","isSupported","cleanup","stopWatch","watch","items","newTargets","el","takeRecords","stop","useResizeObserver","observerOptions","_targets","els","_el","useIntersectionObserver","root","rootMargin","threshold","immediate","targets","isActive","targets$1","root$1","resolveElement","elInitialOverflow","useScrollLock","initialState","isLocked","initialOverflow","ele","lock","unlock","v","big","header","forceFooterDivider","forceHeaderDivider","footer","isLoading","isOpen","handleClose","contentRef","zIndex","headerChildContent","isVisible","Portal","HeadingLevelProvider","ThemeProvider","ClickAwayProvider","shouldPreventCloseOnClickAway","clickAwayRefs","rootRef","wrapperRef","hasTopIntersection","headerChildProps","setSentinelTop","content","setSentinelBottom","footerChildContent","footerChildProps","ProgressCircular","hasBottomIntersection","undefined","top","bottom","MAX_HEADING_LEVEL","DEFAULT_TYPOGRAPHY_BY_LEVEL","defaultContext","computeHeadingLevel","levelProp","parentLevel","nextLevel","HeadingLevelContextKey","useHeadingLevel","inject","defineComponent","slots","level","propLevel","toRefs","parentContext","headingElement","context","reactive","provide","name","keysOf","m","display","theme","circleProps","svgProps","Element","defaultTheme","useTheme","class","ProgressCircularUI","inheritAttrs","last","length","last_1","identity","identity_1","apply","func","thisArg","_apply","require$$0","nativeMax","overRest","start","transform","index","otherArgs","_overRest","constant","constant_1","freeGlobal","global","_freeGlobal","freeSelf","_root","Symbol","_Symbol","objectProto","hasOwnProperty","nativeObjectToString","symToStringTag","getRawTag","isOwn","tag","unmasked","result","_getRawTag","objectToString","_objectToString","require$$1","require$$2","nullTag","undefinedTag","baseGetTag","_baseGetTag","isObject","isObject_1","asyncTag","funcTag","genTag","proxyTag","isFunction","isFunction_1","coreJsData","_coreJsData","maskSrcKey","uid","isMasked","_isMasked","funcProto","funcToString","toSource","_toSource","require$$3","reRegExpChar","reIsHostCtor","reIsNative","baseIsNative","pattern","_baseIsNative","getValue","_getValue","getNative","_getNative","defineProperty","_defineProperty","baseSetToString","string","_baseSetToString","HOT_COUNT","HOT_SPAN","nativeNow","shortOut","count","lastCalled","stamp","remaining","_shortOut","setToString","_setToString","baseRest","_baseRest","arrayMap","iteratee","_arrayMap","baseFindIndex","predicate","fromIndex","fromRight","_baseFindIndex","baseIsNaN","_baseIsNaN","strictIndexOf","_strictIndexOf","baseIndexOf","_baseIndexOf","baseIndexOfWith","comparator","_baseIndexOfWith","baseUnary","_baseUnary","copyArray","source","_copyArray","require$$4","arrayProto","splice","basePullAll","values","indexOf","seen","_basePullAll","pullAll","pullAll_1","pull","pull_1","makeListenerTowerContext","LISTENERS","listener","useCallbackOnEscape","callbackRef","closeOnEscapeRef","watchEffect","onCleanup","isRef","onKeyDown","newListener","onUnmounted","TABBABLE_ELEMENTS_SELECTOR","DISABLED_SELECTOR","isNotDisabled","getFocusableElements","getFirstAndLastFocusable","parentElement","focusableElements","first","FOCUS_TRAPS","setupFocusTrap","signal","focusZoneElement","rootNode","addedTabIndex","ensureZoneIsFocusable","focusZoneFallback","keydownHandler","focusable","activeElement","focusTrap","firstFocusable","useFocusTrap","focusZoneElementRef","focusElementRef","currentController","tearDown","watchPostEffect","controller","useRestoreFocusOnClose","focusAnchorOnClose","anchorRef","parentElementRef","popoverElementRef","isOpenRef","tryRestoreFocus","popoverElement","anchorValue","anchor","wasOpen","onBeforeUnmount","useTransitionVisibility","timeout","onVisibilityChange","isStillVisible","timer","open","isReducedMotion","previousIsVisible","useDisableBodyScroll","active","emitSchema","close","visibilityChange","emit","localContentRef","sentinelTopRef","sentinelBottomRef","entries","entry","isIntersecting","shouldPreventCloseOnEscape","preventAutoClose","preventCloseOnEscape","disableBodyScroll","DIALOG_TRANSITION_DURATION","closeMode","preventCloseOnClick","contentRefCallback","defaultChildren","headerVnode","find","c","footerVnode","bodyChildren","filter","Comment","UI","emits","isPrototype","Ctor","proto","_isPrototype","overArg","_overArg","nativeKeys","_nativeKeys","baseKeys","_baseKeys","DataView","_DataView","Map","_Map","Promise","_Promise","Set","_Set","WeakMap","_WeakMap","require$$5","require$$6","mapTag","objectTag","promiseTag","setTag","weakMapTag","dataViewTag","dataViewCtorString","mapCtorString","promiseCtorString","setCtorString","weakMapCtorString","getTag","ctorString","_getTag","isObjectLike","isObjectLike_1","argsTag","baseIsArguments","_baseIsArguments","propertyIsEnumerable","isArguments","isArguments_1","isArray","isArray_1","MAX_SAFE_INTEGER","isLength","isLength_1","isArrayLike","isArrayLike_1","stubFalse","stubFalse_1","freeExports","exports","freeModule","moduleExports","Buffer","nativeIsBuffer","isBuffer","arrayTag","boolTag","dateTag","errorTag","numberTag","regexpTag","stringTag","arrayBufferTag","float32Tag","float64Tag","int8Tag","int16Tag","int32Tag","uint8Tag","uint8ClampedTag","uint16Tag","uint32Tag","typedArrayTags","baseIsTypedArray","_baseIsTypedArray","freeProcess","nodeUtil","types","nodeIsTypedArray","isTypedArray","isTypedArray_1","require$$7","isEmpty","isEmpty_1","RawClickable","handleClick","handleKeyPress","disabled","isDisabled","ariaDisabled","as","isAnyDisabled","Component","clickableProps","tabIndex","event","stopPropagation","preventDefault","BUTTON_WRAPPER_CLASSNAME","buttonWrapperBlock","BUTTON_CLASSNAME","buttonBlock","renderButtonWrapper","emphasis","variant","fullWidth","adaptedColor","low","light","dark","wrapperClassName","buttonProps","hasBackground","ButtonRoot","ariaLabel","isSelected","isFocused","isHovered","linkAs","high","primary","buttonClassName","href","displayName","defaultProps","leftIcon","rightIcon","DISABLED_STATE_KEY","useDisabledStateContext","useDisableStateProps","disabledStateContext","disabledStateProps","p","unref","getDisabledState","otherProps","_","onChange","rest","ResetTheme","IconClassName","hasShape","alt","verticalAlign","iconColor","iconColorVariant","iconSize","xxs","xs","xxl","xl","path","IconUI","getTextProps","noWrap","truncate","whiteSpace","style","truncateLinesStyle","lines","isTruncatedMultiline","isTruncated","whiteSpaceStyle","TOOLTIP_CONTEXT_KEY","DEFAULT_VALUE","provideTooltipContext","useTooltipContext","useOverflowTooltipLabel","labelRef","tooltipLabel","updateLabel","labelElement","useSlot","slot","useSlots","slotFn","wrapChildrenIconWithSpaces","wrappedChildren","child","isVNode","Fragment","updated","createVNode","Text","defaultSlot","useTemplateRef","textProps","componentProps","filteredAttrs","click","MouseEvent","renderContent","visibleChildren","vnode","ButtonUI","toRaw","TOOLBAR_NAME","after","before","ToolbarUI","generatedId","uniqueId","cancelButtonEl","confirmButtonEl","TextVNode","dialogPassthrough","onClose","onVnodeMounted","onVnodeUnmounted","Avatar","actions","badge","image","getImageLoadingState","img","getImageSize","aspectRatio","focusPoint","width","height","isLoaded","shiftPosition","scale","imageSize","containerSize","scaledSize","shift","calculateFocusPointStyle","heightScale","widthScale","focusPointFromTop","y","focusPointFromLeft","mdiImageBroken","loading","Thumbnail","align","original","crossOrigin","focusPointStyle","fillHeight","imgProps","imgRef","propImgRef","isLoadingProp","objectFit","loadingPlaceholderImageRef","loadingState","linkProps","hasError","hasIconErrorFallback","hasCustomErrorFallback","imageErrorStyle","visibility","isLink","isClickable","wrapperProps","assign","join","loadingPlaceholderImage","current","complete","loadingStyle","backgroundImage","src","innerImage","naturalWidth","naturalHeight","useHasEventListener","eventName","useImageLoad","imageURL","state","update","oldImg","useFocusPointStyle","params","updateContainerSize","cWidth","cHeight","oldContainerSize","nextTick","Event","keyPress","imgElement","hasClickListener","hasKeyPressListener","restProps","ThumbnailUI","Array","map","b","ThumbnailVariant","ThumbnailObjectFit","_event","keypress","thumbnailProps","resolvedTheme","actionsContent","badgeContent","AvatarUI","square","ComboboxButton","Tooltip","labelDisplayMode","listboxId","renderButton","hideTooltip","getOptionValue","option","getOptionLabel","isOptionDisabled","isActionCell","cell","row","notifySection","sectionElement","sectionRegistrations","optionRegistrations","force","reg","hasOptions","hasVisibleOption","optionElement","optionReg","createPendingNavigation","pending","clear","navigate","createSelectorTreeWalker","container","node","createListFocusNavigation","callbacks","itemSelector","wrap","itemDisabledSelector","getActiveItem","enabledItemSelector","createItemWalker","enabledOnly","findFirstEnabled","findLastEnabled","findAtOffset","offset","forward","stepsNeeded","walker","step","next","wrapped","findMatching","selectors","goTo","resolve","goToOffset","createActiveItemState","initialItem","activeItem","lastDescendant","iterable","done","createGridFocusNavigation","rowSelector","cellSelector","isNavigableRow","getFirstCell","getRowCells","findRows","dive","findFirstVisibleRow","findLastVisibleRow","findParentRow","rememberedCol","focusCellInRow","col","cells","clampedCol","activateCell","goToFirst","goToLast","goHorizontal","currentRow","nextCol","rowDirection","targetRow","targetCells","targetCol","goVertical","adjacentRow","wrapRow","visibleRows","startIdx","remainingOffset","targetIdx","rowIdx","querySelectorInclusive","trackContainerFocus","hasFocus","newTarget","setupRovingTabIndex","itemSelectedAttr","onItemFocused","itemActiveSelector","itemSelectedSelector","containerFocus","nav","setTabIndex","normalizeItems","hasExistingTabStop","hasTabStop","normalizeAllItems","preferredTabStopIndex","preferredItem","ensureTabStop","shouldFocus","mutations","removedActiveItem","removalAnchor","newSelectedItem","disabledTargets","insertedItems","mutation","removedNode","firstMatch","addedNode","shouldMoveFocus","currentActive","currentTabStop","handled","setupListbox","handle","notify","trigger","listbox","isGrid","focusCallbacks","lastItem","focusNav","setupCombobox","onTriggerAttach","wrapNavigation","isOpenState","filterValue","abortController","lastOptionsLength","lastInputValue","lastLoadingState","skeletonCount","subscribers","cb","getVisibleOptionCount","hasVisibleContent","notifyVisibilityChange","visibleCount","inputValue","LOADING_ANNOUNCEMENT_DELAY","loadingTimer","announcementSent","startLoadingAnnouncementTimer","onSkeletonCountChange","detach","attachTriggerKeydown","triggerEl","onKeydown","handleKeydown","flag","altKey","e","tryAttach","isNewController","filterLower","text","isFiltered","newFilter","wasLoading","newTrigger","newListbox","hadListbox","set","SEARCH_TIMEOUT","createTypeahead","getWalker","getItemValue","searchString","searchTimeout","reset","match","currentItem","firstItem","allSameChar","ch","searchText","validCurrent","startItem","candidate","rematch","isPrintableKey","ctrlKey","metaKey","setupComboboxButton","button","combobox","typeahead","n","IconButton","sides","alignments","placements","acc","side","min","max","round","floor","createCoords","oppositeSideMap","oppositeAlignmentMap","clamp","end","evaluate","param","getSide","placement","getAlignment","getOppositeAxis","axis","getAxisLength","yAxisSides","getSideAxis","getAlignmentAxis","getAlignmentSides","rects","rtl","alignment","alignmentAxis","mainAlignmentSide","getOppositePlacement","getExpandedPlacements","oppositePlacement","getOppositeAlignmentPlacement","lrPlacement","rlPlacement","tbPlacement","btPlacement","getSideList","isStart","getOppositeAxisPlacements","flipAlignment","list","expandPaddingObject","getPaddingObject","rectToClientRect","rect","x","computeCoordsFromPlacement","_ref","reference","floating","sideAxis","alignLength","isVertical","commonX","commonY","commonAlign","coords","detectOverflow","_await$platform$isEle","platform","elements","strategy","boundary","rootBoundary","elementContext","altBoundary","paddingObject","clippingClientRect","offsetParent","offsetScale","elementClientRect","computePosition","config","middleware","validMiddleware","statefulPlacement","middlewareData","resetCount","_platform$detectOverf","nextX","nextY","data","arrow","arrowDimensions","isYAxis","minProp","maxProp","clientProp","endDiff","startDiff","arrowOffsetParent","clientSize","centerToReference","largestPossiblePadding","minPadding","maxPadding","min$1","center","shouldAddOffset","alignmentOffset","getPlacementList","autoAlignment","allowedPlacements","autoPlacement","_middlewareData$autoP","_middlewareData$autoP2","_placementsThatFitOnE","crossAxis","detectOverflowOptions","placements$1","overflow","currentIndex","currentPlacement","alignmentSides","currentOverflows","allOverflows","nextPlacement","placementsSortedByMostSpace","d","a","resetPlacement","flip","_middlewareData$arrow","_middlewareData$flip","initialPlacement","checkMainAxis","checkCrossAxis","specifiedFallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","initialSideAxis","isBasePlacement","fallbackPlacements","hasFallbackAxisSideDirection","overflows","overflowsData","_middlewareData$flip2","_overflowsData$filter","nextIndex","_overflowsData$filter2","currentSideAxis","originSides","convertValueToCoords","mainAxisMulti","crossAxisMulti","rawValue","mainAxis","_middlewareData$offse","diffCoords","limiter","mainAxisCoord","crossAxisCoord","minSide","maxSide","limitedCoords","_state$middlewareData","_state$middlewareData2","heightSide","widthSide","maximumClippingHeight","maximumClippingWidth","overflowAvailableHeight","overflowAvailableWidth","noShift","availableHeight","availableWidth","xMin","xMax","yMin","yMax","nextDimensions","hasWindow","getNodeName","isNode","getWindow","_node$ownerDocument","getDocumentElement","isElement","isHTMLElement","isShadowRoot","invalidOverflowDisplayValues","isOverflowElement","overflowX","overflowY","getComputedStyle","tableElements","isTableElement","topLayerSelectors","isTopLayer","transformProperties","willChangeValues","containValues","isContainingBlock","elementOrCss","webkit","isWebKit","css","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","lastTraversableNodeNames","getNodeScroll","getNearestOverflowAncestor","parentNode","getOverflowAncestors","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","frameElement","getFrameElement","getCssDimensions","getComputedStyle$1","hasOffset","offsetWidth","offsetHeight","shouldFallback","unwrapElement","getScale","domElement","$","noOffsets","getVisualOffsets","shouldAddVisualOffsets","isFixed","floatingOffsetParent","getBoundingClientRect","includeScale","isFixedStrategy","clientRect","visualOffsets","offsetWin","currentWin","currentIFrame","iframeScale","iframeRect","left","getWindowScrollBarX","leftScroll","getHTMLOffset","documentElement","scroll","htmlRect","convertOffsetParentRelativeRectToViewportRelativeRect","topLayer","offsets","isOffsetParentAnElement","offsetRect","htmlOffset","getClientRects","getDocumentRect","html","body","SCROLLBAR_MAX","getViewportRect","visualViewport","visualViewportBased","windowScrollbarX","doc","bodyStyles","bodyMarginInline","clippingStableScrollbarWidth","absoluteOrFixed","getInnerBoundingClientRect","getClientRectFromClippingAncestor","clippingAncestor","hasFixedPositionAncestor","stopNode","getClippingElementAncestors","cache","cachedResult","currentContainingBlockComputedStyle","elementIsFixed","computedStyle","currentNodeIsContaining","ancestor","getClippingRect","clippingAncestors","firstClippingAncestor","clippingRect","accRect","getDimensions","getRectRelativeToOffsetParent","setLeftRTLScrollbarOffset","isStaticPositioned","getTrueOffsetParent","polyfill","rawOffsetParent","getOffsetParent","svgOffsetParent","getElementRects","getOffsetParentFn","getDimensionsFn","floatingDimensions","isRTL","rectsAreEqual","observeMove","onMove","io","timeoutId","_io","refresh","skip","elementRectForRootMargin","insetTop","insetRight","insetBottom","insetLeft","isFirstUpdate","handleObserve","ratio","autoUpdate","ancestorScroll","ancestorResize","elementResize","layoutShift","animationFrame","referenceEl","ancestors","cleanupIo","reobserveFrame","resizeObserver","firstEntry","_resizeObserver","frameId","prevRefRect","frameLoop","nextRefRect","_resizeObserver2","offset$1","autoPlacement$1","shift$1","flip$1","size$1","arrow$1","mergedOptions","platformWithCache","computePosition$1","isComponentPublicInstance","getDPR","roundByDPR","dpr","useFloating","whileElementsMountedOption","openOption","_toValue","middlewareOption","placementOption","_toValue2","strategyOption","_toValue3","transformOption","_toValue4","referenceElement","floatingElement","isPositioned","floatingStyles","initialStyles","xVal","yVal","whileElementsMountedCleanup","position","attach","shallowReadonly","ARROW_SIZE","TOOLTIP_ZINDEX","ariaLinkMode","TooltipPopup","isHidden","labelLines","split","line","isFocusVisible","isHoverNotSupported","createTooltipOpenManager","delay","onStateChange","openStartTime","shouldOpen","anchorController","popperController","deferUpdate","duration","hoverNotSupported","hasTouch","openDelay","closeDelay","getClose","overrideDelay","closeImmediately","anchorElement","longPressEnd","popperElement","useTooltipOpen","managerRef","manager","renderSlotFragments","isDisabledVNode","useInjectTooltipRef","slotContent","setAnchorElement","h","firstChild","linkId","extraProps","existing","cloneVNode","resolvedPlacement","whileElementsMounted","isActivated","onPopperMount","forceOpen","_slot","$el","expose","tabindex","buttonRef","setButtonRef","tooltipProps","IconButtonUI","ButtonGroup","ButtonGroupUI","COMBOBOX_CONTEXT_KEY","provideComboboxContext","useComboboxContext","useWatchDisposable","effect","runCleanup","oldValue","maybeCleanup","useComboboxEvent","initialValue","useComboboxOpen","setHandle","optionsState","optionsLength","onSelect","destroy","_class","select","ComboboxInput","TextField","inputRef","textFieldRef","toggleButtonProps","handleToggle","disabledState","mdiChevronUp","mdiChevronDown","setupComboboxInput","input","optionOnSelect","onInputCallback","openOnFocus","autoFilter","userHasTyped","unsubscribeOpen","len","INPUT_NATIVE_CLASSNAME","RawInputText","handleChange","handleInput","handleFocus","handleBlur","handleOnChange","handleOnInput","change","_name","focus","blur","stopImmediatePropagation","RawInputTextUI","rows","RawInputTextarea","textarea","useFitRowsToContent","minimumRows","textareaRef","currentMinRows","previousRows","rowHeight","scrollHeight","requiredRows","RawInputTextareaUI","InputLabelClassName","InputLabel","htmlFor","isRequired","INPUT_HELPER_CONFIGURATION","InputHelperClassName","InputHelper","generateAccessibilityIds","helper","existingAriaDescribedBy","helperId","errorId","labelId","describedByIds","describedById","chips","clearButtonProps","forceFocusStyle","textFieldId","isValid","labelProps","maxLength","multiline","placeholder","afterElement","isFocus","valueLength","isNotEmpty","mdiCloseCircle","getChipsSlot","rawInputInstance","inputElement","flush","accessibilityIds","handleClear","_cn","_ab","_d","_id","_aad","_ad","_oc","onInput","_oi","onFocus","_of","onBlur","_ob","chipsAttr","inputAttrs","inputCommonProps","readOnly","TextFieldUI","setIsOpen","inputEl","selectionMode","_onSelect","_oof","_selectionMode","eventHandlers","onClear","fwdAriaDisabled","restForwardedProps","List","itemPadding","ComboboxList","ariaBusy","COMBOBOX_LIST_CONTEXT_KEY","provideComboboxListContext","useComboboxListContext","listRef","handleValue","registerListbox","flushPendingNavigation","ariaMultiselectable","regular","ListItem","isHighlighted","linkRef","clickable","ListItemAction","action","ComboboxOption","description","hidden","actionProps","actionRole","itemRole","actionElement","wrappedAction","COMBOBOX_OPTION_CONTEXT_KEY","provideComboboxOptionContext","useComboboxOptionContext","optionId","optionRef","registerOption","filtered","refilterOption","setOptionRef","getSlotOrAttr","ComboboxOptionAction","actionId","ComboboxOptionMoreInfo","Popover","popoverId","onMouseEnter","onMouseLeave","mdiInformationOutline","Placement","FitAnchorWidth","POPOVER_ZINDEX","elevation","AUTO","usePortal","asTag","hasArrow","popoverStyle","arrowStyle","arrowRef","clickAwayCallback","unmountSentinel","adjustedElevation","Math","parseAutoPlacement","parseFitWidth","fitToAnchorWidth","resolveCssSize","combineSize","combinator","size1","size2","cssMin","cssMax","buildPopoverMiddleware","fitWidth","fitWithinViewportHeight","rawWidth","rawMinWidth","rawMaxWidth","rawHeight","rawMinHeight","rawMaxHeight","parsedPlacement","arrowElement","minWidth","maxWidth","minHeight","maxHeight","middlewares","awayOffset","alongOffset","offsetMiddleware","anchorWidth","adaptedAvailableHeight","arrowMiddleware","computeArrowStyles","arrowData","getFloatingPlacement","usePopoverStyle","floatingRef","floatingPlacement","arrowStyles","useFocus","elementRef","shouldFocusRef","wasFocused","styles","boundaryRef","closeOnEscape","withFocusTrap","focusTrapZoneElement","PopoverUI","popover","closeOnClickAway","mergedClassName","iconButtonRef","anchorEl","activeDescendantId","IconButtonAdapter","coreProps","onMouseenter","onMouseleave","PopoverAdapter","popoverSlots","_coreAnchorRef","isKeyboardHighlighted","toggle","SkeletonTypography","ComboboxOptionSkeleton","hasDescription","itemProps","from","registerSkeleton","DEFAULT_COMBOBOX_POPOVER_MAX_HEIGHT","ComboboxPopover","FlexBox","castArray","castArray_1","getFlexBoxProps","fillSpace","gap","hAlign","marginAuto","noShrink","vAlign","orientation","adjustedOrientation","horizontal","fromEntries","computedProps","horizontalAlign","popoverAnchorRef","popoverProps","ComboboxProvider","_props","unsubscribe","subscribe","onOpen","onWatcherCleanup","ComboboxSection","ListSection","ariaHidden","ListUI","ListDivider","ListDividerUI","userClassName","coreClassName","ListItemActionUI","hasOnClick","ListItemUI","ListItem_default","Action","itemsWrapperProps","hasHeader","ListSectionUI","sectionRef","sectionState","registerSection","setSectionRef","ComboboxState","GenericBlock","emptyMessage","nbOptionMessage","errorMessage","errorTryReloadMessage","loadingMessage","showError","resolvedEmptyMessage","showEmpty","showLoading","resolvedNbOptionMessage","show","alignProps","OPEN_ANNOUNCEMENT_DELAY","subscribeComboboxState","setters","setIsLoading","setShouldAnnounce","unsubLoadingChange","unsubLoadingAnnouncement","openTimer","unsubOpen","figure","figureProps","actionsProps","contentProps","vertical","GenericBlockUI","FlexBoxVue","symbolTag","isSymbol","isSymbol_1","reIsDeepProp","reIsPlainProp","isKey","_isKey","nativeCreate","_nativeCreate","hashClear","_hashClear","hashDelete","_hashDelete","HASH_UNDEFINED","hashGet","_hashGet","hashHas","_hashHas","hashSet","_hashSet","Hash","_Hash","listCacheClear","_listCacheClear","eq","other","eq_1","assocIndexOf","_assocIndexOf","listCacheDelete","lastIndex","_listCacheDelete","listCacheGet","_listCacheGet","listCacheHas","_listCacheHas","listCacheSet","_listCacheSet","ListCache","_ListCache","mapCacheClear","_mapCacheClear","isKeyable","_isKeyable","getMapData","_getMapData","mapCacheDelete","_mapCacheDelete","mapCacheGet","_mapCacheGet","mapCacheHas","_mapCacheHas","mapCacheSet","_mapCacheSet","MapCache","_MapCache","FUNC_ERROR_TEXT","memoize","resolver","memoized","memoize_1","MAX_MEMOIZE_SIZE","memoizeCapped","_memoizeCapped","rePropName","reEscapeChar","stringToPath","number","quote","subString","_stringToPath","symbolProto","symbolToString","baseToString","_baseToString","toString_1","castPath","_castPath","toKey","_toKey","baseGet","_baseGet","baseAssignValue","_baseAssignValue","assignValue","objValue","_assignValue","reIsUint","isIndex","_isIndex","baseSet","customizer","nested","newValue","_baseSet","basePickBy","paths","_basePickBy","baseHasIn","_baseHasIn","hasPath","hasFunc","_hasPath","hasIn","hasIn_1","basePick","_basePick","arrayPush","_arrayPush","spreadableSymbol","isFlattenable","_isFlattenable","baseFlatten","depth","isStrict","_baseFlatten","flatten","flatten_1","flatRest","_flatRest","pick","pick_1","GenericBlockGapSize","shouldAnnounce","Combobox","Badge","BadgeUI","BadgeWrapper","BadgeWrapperUI","INTERMEDIATE_STATE","Checkbox","checked","isChecked","inputProps","inputId","intermediateState","mdiMinus","mdiCheck","generatedInputId","localInputRef","isIntermediate","indeterminate","CheckboxUI","Chip","propIsClickable","handleAfterClick","handleBeforeClick","hasAfterClick","hasBeforeClick","handleKeyDown","keyDownProp","tabIndexProp","isButton","chipColor","handleOnKeyDown","compatibilityProps","afterClick","beforeClick","keydown","KeyboardEvent","ChipUI","ChipGroup","ChipGroupUI","SelectionChipGroup","getOptionId","getOptionName","chipRemoveLabel","getChipProps","customProps","chipIsDisabled","chipName","mdiClose","ENABLED_CHIP_SELECTOR","CHIP_CLASSNAME","getChip","isChipDisabled","chip","findSiblingChip","removeOption","setupSelectionChipGroupEvents","activatingKey","focusTarget","inputHandler","backspacePressed","cursorAtStart","useRovingTabIndexContainer","containerRef","isComponentType","_newValue","getContainer","getInput","containerUnwrapped","chipProps","slotProps","customChip","beforeSlot","definedSlotProps","Lightbox","propAriaLabelledBy","ariaLabelledBy","propAriaLabel","closeButtonProps","childrenRef","closeButtonRef","closeButtonEl","Divider","DividerUI","DragHandle","mdiDragVertical","DragHandleUI","ExpansionPanel","anyChildren","hasHeaderDivider","handleOpen","handleToggleOpen","headerProps","headerContent","dragHandle","isChildrenVisible","toggleOpen","rootClassName","removeTransitionListener","onTransitionEnd","addEventListener","removeEventListener","headerSlot","Flag","flagColor","FlagUI","reWhitespace","trimmedEndIndex","_trimmedEndIndex","reTrimStart","baseTrim","_baseTrim","NAN","reIsBadHex","reIsBinary","reIsOctal","freeParseInt","toNumber","isBinary","toNumber_1","INFINITY","MAX_INTEGER","toFinite","sign","toFinite_1","toInteger","remainder","toInteger_1","isInteger","isInteger_1","GridColumn","maxColumns","itemMinWidth","GridColumnUI","getHeadingProps","contextHeadingElement","computedHeadingElement","classNames.join","Heading","uiProps","headingProps","InputHelperUI","InputLabelUI","Link","LinkUI","titleHeading","LinkPreview","link","TitleHeading","adjustedSize","free","N","LinkPreviewUI","MenuItem","actionRef","MENU_CONTEXT_KEY","provideMenuContext","useMenuContext","internalRef","defaultPrevented","setOpen","beforeWithIcon","afterWithIcon","afterIcon","MenuButton","MenuProvider","MenuTrigger","MenuPopover","MenuList","triggerProps","extraTriggerProps","triggerChildren","mdiDotsVertical","MENU_ITEM_SELECTOR","getItemText","getItems","menu","moveFocusAfterTrigger","allFocusable","triggerIdx","setupMenu","menuId","handleAbort","triggerAbort","menuAbort","openAndGoTo","handleTypeaheadInMenu","needsManualActivation","idx","triggerId","unsub","Function","String","Trigger","useMenuEvent","useMenuOpen","domEl","registerTrigger","restAttrs","ariaLabelledby","registerMenu","TRIGGER_COMPONENTS","Message","customIcon","closeButtonLabel","isCloseButtonDisplayed","MessageUI","baseSlice","_baseSlice","take","guard","take_1","Mosaic","thumbnails","onImageClick","thumbnail","_createTextVNode","hasHandleClickListener","MosaicUI","PopoverDialog","_label","_ariaLabel","mergeProps","ProgressLinear","ProgressLinearUI","RadioButton","RadioButtonUI","RadioGroup","RadioGroupUI","SkeletonCircle","SkeletonRectangleVariant","squared","rounded","pill","SkeletonRectangle","SkeletonCircleUI","SkeletonRectangleUI","SkeletonTypographyUI","Switch","SwitchUI","UploaderVariant","circle","Uploader","fileInputProps","isDragHovering","adjustedAspectRatio","_files","files","hasFileInput","_onClick","_fp","_theme","UploaderUI","onDrop","onDragleave","onDragenter","ImageBlockCaptionPosition","below","over","captionPosition","ImageBlock","captionStyle","descriptionProps","tags","titleProps","ImageCaption","baseClassName","titleColor","baseColor","_withDirectives","_resolveDirective","tagsProp","actionsProp","InlineList","InlineListUI","Table","hasBefore","hasDividers","TABLE_CLASSNAME","TableBody","ThOrder","asc","desc","TableCellVariant","head","TableCell","isSortable","sortOrder","Wrapper","ariaSort","mdiArrowUp","mdiArrowDown","headerClick","handleHeaderClick","TableHeader","TableRow","TABS_CLASSNAME","Tab","iconProps","keyPressProp","changeToTab","tabPanelId","shouldActivateOnFocus","tabId","changeToCurrentTab","onKeyPress","INIT_STATE","reducer","tabIds","tabPanelIds","TAB_PROVIDER_INJECT_KEY","useTabProviderContext","originalId","dispatch","tabState","TabUI","TabListLayout","layout","fixed","TabList","TabListUI","TabPanel","isLazy","TabPanelUI","TabProvider","activeTabIndex","payload","newIndex","required","set_1","isUserBlockClickeable","UserBlock","avatarProps","fields","multipleActions","mouseEnterProp","mouseLeaveProp","nameProps","handleMouseEnter","handleMouseLeave","simpleAction","additionalFields","componentSize","l","shouldDisplayActions","shouldDisplayFields","fieldsBlock","field","mouseenter","mouseleave","hasOnMouseEnter","hasOnMouseLeave","nameBlock","NameComponent","nProps","computedAvatarProps","modifiedProps","childrenContent","UserBlockUI","avProps","restAvatarProps","findOptionById","toggleSelection","currentValue","selectedOptionId","isMultiple","newOption","currentArray","existingIndex","getOptionDisplayName","renderSelectOptions","components","getOptionDescription","renderOption","selected","getSectionId","renderSectionTitle","sections","sectionId","sectionOptions","sectionLabel","Section","selectedIds","has","Option","selectionType","SelectButton","InfiniteScroll","listProps","handleSelect","listStatus","translations","onLoadMore","infiniteScrollOptions","isFullLoading","isLoadingMore","isError","isMultiselectable","displayValue","Provider","OptionSkeleton","State","useWrappedRenderOptionSlot","renderOptionAttr","optionValue","vnodes","customOption","beforeProp","afterProp","restSlotProps","slotChildren","useWrappedRenderSectionTitleSlot","load-more","_isOpen","sectionTitle","buttonClass","triggerRef","mdiMenuDown","selectedOption","hasLoadMoreListener","SelectButtonOption","_ComboboxOption","SelectTextField","beforeOptions","afterOptions","Input","search","_searchText","isSearching","searchInputValue","inputElRef","newVal","handleInputChange","wrappedRenderOption","wrappedRenderSectionTitle","showClear","hasClearButton","chipGroupLabel","beforeOptionsSlot","clearLabel","showSuggestionsLabel","SelectTextFieldOption","SelectTextFieldSection","_ComboboxSection","SelectTextFieldOptionMoreInfo","_ComboboxOptionMoreInfo","SelectTextFieldOptionSkeleton","_ComboboxOptionSkeleton","SelectTextFieldDivider","_ListDivider","boundsMode","TimePickerField","handleSearch","fowardedProps","outOfRange","formatTime","date","locale","getDateAtTime","hour","minute","timeOfDayMinutes","MINUTES_IN_HOUR","MINUTES_IN_DAY","buildTimeList","minTime","maxTime","minMinutes","maxMinutes","minutes","RE_TIME","parseTimeInput","raw","rawHour","rawMinute","ampm","isPm","snapTimeToBounds","time","totalMinutes","isDateOnTime","getCurrentLocale","timeList","committedSearch","getHours","getMinutes","timeOfDay","clamped","typed","parsed","_value","_locale","_step","_minTime","_maxTime"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAaO,MAAMA,KAAsB;AAAA,EAC/B,MAAM;AAAA,EACN,OAAO;AACX,GAMaC,KAA2B;AAAA,EACpC,MAAM;AAAA,EACN,OAAO;AACX,GCpBaC,KAAY;AAAA,EAIrB,MAAM;AAOV,GAKaC,KAAQ;AAAA,EACjB,OAAO;AAAA,EACP,MAAM;AACV,GAGaC,IAAO;AAAA,EAChB,KAAK;AAAA,EACL,IAAI;AAAA,EACJ,GAAG;AAAA,EACH,GAAG;AAAA,EACH,GAAG;AAAA,EACH,IAAI;AAAA,EACJ,KAAK;AAAA,EACL,MAAM;AAAA,EACN,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,KAAK;AAAA,EACL,MAAM;AACV,GAKaC,KAAc;AAAA,EACvB,YAAY;AAAA,EACZ,UAAU;AACd,GAGaC,KAAW;AAAA,EACpB,KAAK;AAAA,EACL,QAAQ;AAAA,EACR,MAAM;AACV,GAMaC,KAAsB;AAAA,EAC/B,UAAU;AAAA,EACV,SAAS;AAA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tsE,EAAM7E,OAAOqxE,EAAOrxE,KAAK,IAAIiO,QAEzE;AAAA,MACFjO,OAAOszE;AAAAA,MACPjC,QAAQkC;AAAAA,MACR1/C,MAAM2/C;AAAAA,MACN3B,SAAS4B;AAAAA,MACT3B,SAAS4B;AAAAA,MACTvG,cAAAA;AAAAA,MACAj9D,OAAOopC;AAAAA,MACP,GAAGxzC;AAAAA,IACP,IAAIjB;AAEJ,WAAO6Y,GACH;AAAA,MACI,GAAI5X;AAAAA,MACJ9F,OAAO8uE,EAAe9uE;AAAAA,MACtB+J,SAAS+oE,EAAS9yE;AAAAA,MAClBmtE,cAAAA;AAAAA,MACAnoE,WAAWA,EAAUhF;AAAAA,MACrB46C,cAAAA;AAAAA,MACAo2B,cAAAA;AAAAA,MACAj2B,YAAAA;AAAAA,MACA00B,kBAAAA;AAAAA,IACJ,GACA;AAAA,MAAEP,iBAAAA;AAAAA,MAAiBtC,QAAQyD;AAAAA,IAAsB,CACrD;AAAA,EACJ;AACJ,GACA;AAAA,EACI7gE,MAAM;AAAA,EACNY,cAAc;AAAA,EACdvL,OAAO4K;IACH;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA;AAAA,IAEA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACAkO,OAAO3B;AACX,CACJ;","x_google_ignoreList":[3,21,22,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,144,145,146,147,148,210,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257,258,259,260,261,262,263,264,265,266,267,268,269,270,271,272,273,274,275,304,305,306,307,308,309,338,339,386]}
|