@babylonlabs-io/core-ui 1.12.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.d.ts +2 -2
- package/dist/components/Accordion/Accordion.js +25 -0
- package/dist/components/Accordion/Accordion.stories.d.ts +6 -0
- package/dist/components/Accordion/Accordion.stories.js +16 -0
- package/dist/components/Accordion/components/AccordionDetails.d.ts +1 -1
- package/dist/components/Accordion/components/AccordionDetails.js +29 -0
- package/dist/components/Accordion/components/AccordionSummary.d.ts +1 -1
- package/dist/components/Accordion/components/AccordionSummary.js +10 -0
- package/dist/components/Accordion/hooks/useHeightObserver.d.ts +1 -1
- package/dist/components/Accordion/hooks/useHeightObserver.js +24 -0
- package/dist/components/Accordion/index.d.ts +4 -3
- package/dist/components/Accordion/index.js +4 -0
- package/dist/components/AmountItem/AmountItem.d.ts +1 -1
- package/dist/components/AmountItem/AmountItem.js +5 -0
- package/dist/components/AmountItem/AmountItem.stories.d.ts +6 -0
- package/dist/components/AmountItem/AmountItem.stories.js +29 -0
- package/dist/components/AmountItem/index.d.ts +1 -1
- package/dist/components/AmountItem/index.js +1 -0
- package/dist/components/Avatar/Avatar.d.ts +2 -1
- package/dist/components/Avatar/Avatar.js +6 -0
- package/dist/components/Avatar/Avatar.stories.d.ts +7 -0
- package/dist/components/Avatar/Avatar.stories.js +18 -0
- package/dist/components/Avatar/AvatarGroup.d.ts +3 -2
- package/dist/components/Avatar/AvatarGroup.js +15 -0
- package/dist/components/Avatar/AvatarGroup.stories.d.ts +6 -0
- package/dist/components/Avatar/AvatarGroup.stories.js +21 -0
- package/dist/components/Avatar/index.d.ts +2 -2
- package/dist/components/Avatar/index.js +2 -0
- package/dist/components/Badge/Badge.d.ts +2 -1
- package/dist/components/Badge/Badge.js +10 -0
- package/dist/components/Badge/Badge.stories.d.ts +6 -0
- package/dist/components/Badge/Badge.stories.js +14 -0
- package/dist/components/Badge/index.d.ts +1 -1
- package/dist/components/Badge/index.js +1 -0
- package/dist/components/Button/Button.d.ts +3 -2
- package/dist/components/Button/Button.js +8 -0
- package/dist/components/Button/Button.stories.d.ts +6 -0
- package/dist/components/Button/Button.stories.js +9 -0
- package/dist/components/Button/IconButton.d.ts +2 -1
- package/dist/components/Button/IconButton.js +6 -0
- package/dist/components/Button/IconButton.stories.d.ts +6 -0
- package/dist/components/Button/IconButton.stories.js +13 -0
- package/dist/components/Button/WalletDisconnectButton.d.ts +2 -2
- package/dist/components/Button/WalletDisconnectButton.js +8 -0
- package/dist/components/Button/index.d.ts +3 -3
- package/dist/components/Button/index.js +3 -0
- package/dist/components/Card/Card.d.ts +4 -3
- package/dist/components/Card/Card.js +6 -0
- package/dist/components/Card/Card.stories.d.ts +6 -0
- package/dist/components/Card/Card.stories.js +10 -0
- package/dist/components/Card/index.d.ts +1 -1
- package/dist/components/Card/index.js +1 -0
- package/dist/components/Chip/Chip.d.ts +2 -1
- package/dist/components/Chip/Chip.js +6 -0
- package/dist/components/Chip/Chip.stories.d.ts +6 -0
- package/dist/components/Chip/Chip.stories.js +9 -0
- package/dist/components/Chip/index.d.ts +1 -1
- package/dist/components/Chip/index.js +1 -0
- package/dist/components/Copy/Copy.d.ts +1 -1
- package/dist/components/Copy/Copy.js +29 -0
- package/dist/components/Copy/index.js +1 -0
- package/dist/components/CounterButton/CounterButton.js +8 -0
- package/dist/components/CounterButton/CounterButton.stories.d.ts +10 -0
- package/dist/components/CounterButton/CounterButton.stories.js +41 -0
- package/dist/components/CounterButton/index.d.ts +1 -1
- package/dist/components/CounterButton/index.js +1 -0
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Dialog/Dialog.js +9 -0
- package/dist/components/Dialog/Dialog.stories.d.ts +7 -0
- package/dist/components/Dialog/Dialog.stories.js +41 -0
- package/dist/components/Dialog/MobileDialog.d.ts +1 -1
- package/dist/components/Dialog/MobileDialog.js +10 -0
- package/dist/components/Dialog/MobileDialog.stories.d.ts +6 -0
- package/dist/components/Dialog/MobileDialog.stories.js +27 -0
- package/dist/components/Dialog/components/Backdrop.d.ts +2 -1
- package/dist/components/Dialog/components/Backdrop.js +4 -0
- package/dist/components/Dialog/components/DialogBody.d.ts +1 -1
- package/dist/components/Dialog/components/DialogBody.js +3 -0
- package/dist/components/Dialog/components/DialogFooter.d.ts +1 -1
- package/dist/components/Dialog/components/DialogFooter.js +3 -0
- package/dist/components/Dialog/components/DialogHeader.d.ts +1 -1
- package/dist/components/Dialog/components/DialogHeader.js +5 -0
- package/dist/components/Dialog/index.d.ts +6 -5
- package/dist/components/Dialog/index.js +6 -0
- package/dist/components/DisplayHash/DisplayHash.d.ts +1 -1
- package/dist/components/DisplayHash/DisplayHash.js +10 -0
- package/dist/components/DisplayHash/index.js +1 -0
- package/dist/components/FeeItem/FeeItem.d.ts +1 -1
- package/dist/components/FeeItem/FeeItem.js +6 -0
- package/dist/components/FeeItem/FeeItem.stories.d.ts +7 -0
- package/dist/components/FeeItem/FeeItem.stories.js +19 -0
- package/dist/components/Form/Checkbox.d.ts +2 -2
- package/dist/components/Form/Checkbox.js +10 -0
- package/dist/components/Form/Checkbox.stories.d.ts +6 -0
- package/dist/components/Form/Checkbox.stories.js +13 -0
- package/dist/components/Form/FormControl.d.ts +2 -1
- package/dist/components/Form/FormControl.js +6 -0
- package/dist/components/Form/FormControl.stories.d.ts +8 -0
- package/dist/components/Form/FormControl.stories.js +30 -0
- package/dist/components/Form/Input.d.ts +3 -2
- package/dist/components/Form/Input.js +8 -0
- package/dist/components/Form/Input.stories.d.ts +10 -0
- package/dist/components/Form/Input.stories.js +43 -0
- package/dist/components/Form/Radio.d.ts +2 -2
- package/dist/components/Form/Radio.js +10 -0
- package/dist/components/Form/Radio.stories.d.ts +6 -0
- package/dist/components/Form/Radio.stories.js +13 -0
- package/dist/components/Form/Select.d.ts +3 -2
- package/dist/components/Form/Select.js +39 -0
- package/dist/components/Form/Select.stories.d.ts +9 -0
- package/dist/components/Form/Select.stories.js +47 -0
- package/dist/components/Form/components/Toggle.d.ts +3 -2
- package/dist/components/Form/components/Toggle.js +22 -0
- package/dist/components/Form/index.d.ts +5 -5
- package/dist/components/Form/index.js +5 -0
- package/dist/components/Heading/Heading.d.ts +3 -2
- package/dist/components/Heading/Heading.js +9 -0
- package/dist/components/Heading/Heading.stories.d.ts +6 -0
- package/dist/components/Heading/Heading.stories.js +10 -0
- package/dist/components/Heading/index.d.ts +1 -1
- package/dist/components/Heading/index.js +1 -0
- package/dist/components/Icons/ThemedIcon.js +25 -0
- package/dist/components/Icons/common/CloseIcon.d.ts +1 -1
- package/dist/components/Icons/common/CloseIcon.js +7 -0
- package/dist/components/Icons/common/CopyIcon.d.ts +1 -1
- package/dist/components/Icons/common/CopyIcon.js +7 -0
- package/dist/components/Icons/index.d.ts +6 -6
- package/dist/components/Icons/index.js +18 -0
- package/dist/components/Icons/wallet/BitcoinPublicKeyIcon.d.ts +1 -1
- package/dist/components/Icons/wallet/BitcoinPublicKeyIcon.js +5 -0
- package/dist/components/Icons/wallet/LinkWalletIcon.d.ts +1 -1
- package/dist/components/Icons/wallet/LinkWalletIcon.js +5 -0
- package/dist/components/Icons/wallet/UsingInscriptionIcon.d.ts +1 -1
- package/dist/components/Icons/wallet/UsingInscriptionIcon.js +5 -0
- package/dist/components/List/List.d.ts +3 -2
- package/dist/components/List/List.js +16 -0
- package/dist/components/List/List.stories.d.ts +11 -0
- package/dist/components/List/List.stories.js +69 -0
- package/dist/components/List/components/ListItem.js +6 -0
- package/dist/components/List/index.d.ts +2 -2
- package/dist/components/List/index.js +2 -0
- package/dist/components/ListLegacy/ListLegacy.d.ts +3 -2
- package/dist/components/ListLegacy/ListLegacy.js +16 -0
- package/dist/components/ListLegacy/ListLegacy.stories.d.ts +11 -0
- package/dist/components/ListLegacy/ListLegacy.stories.js +71 -0
- package/dist/components/ListLegacy/components/ListItemLegacy.js +6 -0
- package/dist/components/ListLegacy/index.d.ts +2 -2
- package/dist/components/ListLegacy/index.js +2 -0
- package/dist/components/Loader/Loader.d.ts +1 -0
- package/dist/components/Loader/Loader.js +6 -0
- package/dist/components/Loader/Loader.stories.d.ts +6 -0
- package/dist/components/Loader/Loader.stories.js +11 -0
- package/dist/components/Loader/index.d.ts +1 -1
- package/dist/components/Loader/index.js +1 -0
- package/dist/components/Menu/Menu.d.ts +2 -2
- package/dist/components/Menu/Menu.js +29 -0
- package/dist/components/Menu/Menu.stories.d.ts +6 -0
- package/dist/components/Menu/Menu.stories.js +38 -0
- package/dist/components/Menu/MenuContext.d.ts +1 -1
- package/dist/components/Menu/MenuContext.js +9 -0
- package/dist/components/Menu/MenuDrawer.d.ts +1 -1
- package/dist/components/Menu/MenuDrawer.js +22 -0
- package/dist/components/Menu/MenuItem.d.ts +1 -1
- package/dist/components/Menu/MenuItem.js +20 -0
- package/dist/components/Menu/SubMenu.d.ts +1 -1
- package/dist/components/Menu/SubMenu.js +12 -0
- package/dist/components/Menu/SubMenuItem.d.ts +1 -1
- package/dist/components/Menu/SubMenuItem.js +6 -0
- package/dist/components/Menu/index.d.ts +6 -6
- package/dist/components/Menu/index.js +6 -0
- package/dist/components/Popover/Popover.d.ts +3 -2
- package/dist/components/Popover/Popover.js +16 -0
- package/dist/components/Popover/Popover.stories.d.ts +6 -0
- package/dist/components/Popover/Popover.stories.js +25 -0
- package/dist/components/Popover/index.d.ts +1 -1
- package/dist/components/Popover/index.js +1 -0
- package/dist/components/Portal/Portal.d.ts +2 -2
- package/dist/components/Portal/Portal.js +45 -0
- package/dist/components/Portal/index.d.ts +1 -1
- package/dist/components/Portal/index.js +1 -0
- package/dist/components/Spacer/Spacer.d.ts +1 -1
- package/dist/components/Spacer/Spacer.js +9 -0
- package/dist/components/Spacer/index.js +1 -0
- package/dist/components/SubSection/SubSection.d.ts +1 -1
- package/dist/components/SubSection/SubSection.js +3 -0
- package/dist/components/SubSection/SubSection.stories.d.ts +6 -0
- package/dist/components/SubSection/SubSection.stories.js +13 -0
- package/dist/components/SubSection/index.d.ts +1 -1
- package/dist/components/SubSection/index.js +1 -0
- package/dist/components/Table/Table.d.ts +2 -1
- package/dist/components/Table/Table.js +37 -0
- package/dist/components/Table/Table.stories.d.ts +7 -0
- package/dist/components/Table/Table.stories.js +131 -0
- package/dist/components/Table/components/Cell.d.ts +1 -1
- package/dist/components/Table/components/Cell.js +6 -0
- package/dist/components/Table/components/Column.d.ts +1 -1
- package/dist/components/Table/components/Column.js +17 -0
- package/dist/components/Table/components/Row.d.ts +1 -1
- package/dist/components/Table/components/Row.js +6 -0
- package/dist/components/Table/index.d.ts +4 -4
- package/dist/components/Table/index.js +4 -0
- package/dist/components/Table/types/index.d.ts +1 -1
- package/dist/components/Table/types/index.js +1 -0
- package/dist/components/Text/Text.d.ts +3 -2
- package/dist/components/Text/Text.js +11 -0
- package/dist/components/Text/Text.stories.d.ts +6 -0
- package/dist/components/Text/Text.stories.js +10 -0
- package/dist/components/Text/index.d.ts +1 -1
- package/dist/components/Text/index.js +1 -0
- package/dist/components/Toggle/Toggle.d.ts +1 -0
- package/dist/components/Toggle/Toggle.js +12 -0
- package/dist/components/Toggle/Toggle.stories.d.ts +6 -0
- package/dist/components/Toggle/Toggle.stories.js +14 -0
- package/dist/components/Toggle/index.d.ts +1 -1
- package/dist/components/Toggle/index.js +1 -0
- package/dist/components/Warning/Warning.d.ts +2 -1
- package/dist/components/Warning/Warning.js +6 -0
- package/dist/components/Warning/Warning.stories.d.ts +9 -0
- package/dist/components/Warning/Warning.stories.js +26 -0
- package/dist/components/Warning/index.d.ts +1 -1
- package/dist/components/Warning/index.js +1 -0
- package/dist/components/index.js +3 -0
- package/dist/context/Dialog.context.d.ts +2 -2
- package/dist/context/Dialog.context.js +33 -0
- package/dist/context/Table.context.d.ts +2 -2
- package/dist/context/Table.context.js +8 -0
- package/dist/elements/FinalityProviderItem/FinalityProviderItem.js +30 -0
- package/dist/elements/FinalityProviderItem/FinalityProviderItem.stories.d.ts +12 -0
- package/dist/elements/FinalityProviderItem/FinalityProviderItem.stories.js +97 -0
- package/dist/elements/FinalityProviderItem/index.d.ts +1 -1
- package/dist/elements/FinalityProviderItem/index.js +1 -0
- package/dist/elements/FinalityProviderLogo/FinalityProviderLogo.js +24 -0
- package/dist/elements/FinalityProviderLogo/FinalityProviderLogo.stories.d.ts +13 -0
- package/dist/elements/FinalityProviderLogo/FinalityProviderLogo.stories.js +61 -0
- package/dist/elements/FinalityProviderLogo/index.d.ts +1 -1
- package/dist/elements/FinalityProviderLogo/index.js +1 -0
- package/dist/elements/Icons/ChevronRightIcon.d.ts +1 -1
- package/dist/elements/Icons/ChevronRightIcon.js +2 -0
- package/dist/elements/Icons/SettingsIcon.d.ts +1 -1
- package/dist/elements/Icons/SettingsIcon.js +2 -0
- package/dist/elements/Icons/index.js +2 -0
- package/dist/elements/ProvidersList/ProvidersList.js +9 -0
- package/dist/elements/ProvidersList/ProvidersList.stories.d.ts +10 -0
- package/dist/elements/ProvidersList/ProvidersList.stories.js +139 -0
- package/dist/elements/ProvidersList/index.d.ts +1 -1
- package/dist/elements/ProvidersList/index.js +1 -0
- package/dist/elements/Table/Table.d.ts +1 -1
- package/dist/elements/Table/Table.js +14 -0
- package/dist/elements/Table/Table.stories.d.ts +8 -0
- package/dist/elements/Table/Table.stories.js +50 -0
- package/dist/elements/Table/index.d.ts +1 -1
- package/dist/elements/Table/index.js +1 -0
- package/dist/hooks/index.js +9 -0
- package/dist/hooks/useClickOutside.js +17 -0
- package/dist/hooks/useControlledState.js +13 -0
- package/dist/hooks/useCopy.js +48 -0
- package/dist/hooks/useIsMobile.js +33 -0
- package/dist/hooks/useMemoizedArray.js +22 -0
- package/dist/hooks/useModalManager.js +28 -0
- package/dist/hooks/useResizeObserver.js +21 -0
- package/dist/hooks/useTableScroll.d.ts +1 -1
- package/dist/hooks/useTableScroll.js +22 -0
- package/dist/hooks/useTableSort.d.ts +1 -1
- package/dist/hooks/useTableSort.js +46 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +45 -44
- package/dist/index.es.js +900 -887
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +45 -0
- package/dist/tsconfig.lib.tsbuildinfo +1 -0
- package/dist/utils/constants.js +3 -0
- package/dist/utils/css.js +6 -0
- package/dist/utils/helpers.js +71 -0
- package/dist/utils/trim.js +14 -0
- package/dist/widgets/form/CheckboxField/CheckboxField.d.ts +1 -1
- package/dist/widgets/form/CheckboxField/CheckboxField.js +7 -0
- package/dist/widgets/form/CheckboxField/CheckboxField.stories.d.ts +6 -0
- package/dist/widgets/form/CheckboxField/CheckboxField.stories.js +17 -0
- package/dist/widgets/form/CheckboxField/index.d.ts +1 -1
- package/dist/widgets/form/CheckboxField/index.js +1 -0
- package/dist/widgets/form/Form/Form.d.ts +3 -3
- package/dist/widgets/form/Form/Form.js +20 -0
- package/dist/widgets/form/Form/Form.stories.d.ts +6 -0
- package/dist/widgets/form/Form/Form.stories.js +27 -0
- package/dist/widgets/form/Form/index.d.ts +1 -1
- package/dist/widgets/form/Form/index.js +1 -0
- package/dist/widgets/form/HiddenField/HiddenField.d.ts +1 -1
- package/dist/widgets/form/HiddenField/HiddenField.js +13 -0
- package/dist/widgets/form/HiddenField/HiddenField.stories.d.ts +6 -0
- package/dist/widgets/form/HiddenField/HiddenField.stories.js +17 -0
- package/dist/widgets/form/HiddenField/index.d.ts +1 -1
- package/dist/widgets/form/HiddenField/index.js +1 -0
- package/dist/widgets/form/NumberField/NumberField.d.ts +2 -2
- package/dist/widgets/form/NumberField/NumberField.js +15 -0
- package/dist/widgets/form/NumberField/NumberField.stories.d.ts +6 -0
- package/dist/widgets/form/NumberField/NumberField.stories.js +31 -0
- package/dist/widgets/form/NumberField/index.d.ts +1 -1
- package/dist/widgets/form/NumberField/index.js +1 -0
- package/dist/widgets/form/RadioField/RadioField.d.ts +1 -1
- package/dist/widgets/form/RadioField/RadioField.js +7 -0
- package/dist/widgets/form/RadioField/RadioField.stories.d.ts +6 -0
- package/dist/widgets/form/RadioField/RadioField.stories.js +14 -0
- package/dist/widgets/form/RadioField/index.d.ts +1 -1
- package/dist/widgets/form/RadioField/index.js +1 -0
- package/dist/widgets/form/SelectField/SelectField.d.ts +3 -3
- package/dist/widgets/form/SelectField/SelectField.js +13 -0
- package/dist/widgets/form/SelectField/SelectField.stories.d.ts +6 -0
- package/dist/widgets/form/SelectField/SelectField.stories.js +33 -0
- package/dist/widgets/form/SelectField/index.d.ts +1 -1
- package/dist/widgets/form/SelectField/index.js +1 -0
- package/dist/widgets/form/TextField/TextField.d.ts +2 -2
- package/dist/widgets/form/TextField/TextField.js +9 -0
- package/dist/widgets/form/TextField/TextField.stories.d.ts +6 -0
- package/dist/widgets/form/TextField/TextField.stories.js +28 -0
- package/dist/widgets/form/TextField/index.d.ts +1 -1
- package/dist/widgets/form/TextField/index.js +1 -0
- package/dist/widgets/form/hooks.d.ts +3 -3
- package/dist/widgets/form/hooks.js +29 -0
- package/dist/widgets/form/types.js +1 -0
- package/dist/widgets/sections/AmountSubsection/AmountSubsection.js +29 -0
- package/dist/widgets/sections/AmountSubsection/AmountSubsection.stories.d.ts +6 -0
- package/dist/widgets/sections/AmountSubsection/AmountSubsection.stories.js +35 -0
- package/dist/widgets/sections/AmountSubsection/index.d.ts +1 -1
- package/dist/widgets/sections/AmountSubsection/index.js +1 -0
- package/dist/widgets/sections/FeesSection/BBNFeeAmount.js +7 -0
- package/dist/widgets/sections/FeesSection/BTCFeeAmount.js +19 -0
- package/dist/widgets/sections/FeesSection/BTCFeeRate.js +7 -0
- package/dist/widgets/sections/FeesSection/FeesSection.js +10 -0
- package/dist/widgets/sections/FeesSection/FeesSection.stories.d.ts +6 -0
- package/dist/widgets/sections/FeesSection/FeesSection.stories.js +14 -0
- package/dist/widgets/sections/FeesSection/Total.js +20 -0
- package/dist/widgets/sections/FeesSection/index.d.ts +6 -6
- package/dist/widgets/sections/FeesSection/index.js +6 -0
- package/dist/widgets/sections/FinalityProviderSubsection/FinalityProviderSubsection.d.ts +1 -1
- package/dist/widgets/sections/FinalityProviderSubsection/FinalityProviderSubsection.js +9 -0
- package/dist/widgets/sections/FinalityProviderSubsection/FinalityProviderSubsection.stories.d.ts +13 -0
- package/dist/widgets/sections/FinalityProviderSubsection/FinalityProviderSubsection.stories.js +191 -0
- package/dist/widgets/sections/FinalityProviderSubsection/index.d.ts +1 -1
- package/dist/widgets/sections/FinalityProviderSubsection/index.js +1 -0
- package/dist/widgets/sections/PreviewModal/PreviewModal.d.ts +1 -1
- package/dist/widgets/sections/PreviewModal/PreviewModal.js +37 -0
- package/dist/widgets/sections/PreviewModal/PreviewModal.stories.d.ts +6 -0
- package/dist/widgets/sections/PreviewModal/PreviewModal.stories.js +47 -0
- package/dist/widgets/sections/PreviewModal/index.d.ts +1 -1
- package/dist/widgets/sections/PreviewModal/index.js +1 -0
- package/dist/widgets/sections/RewardsPreviewModal/RewardsPreviewModal.d.ts +1 -1
- package/dist/widgets/sections/RewardsPreviewModal/RewardsPreviewModal.js +16 -0
- package/dist/widgets/sections/RewardsPreviewModal/RewardsPreviewModal.stories.d.ts +7 -0
- package/dist/widgets/sections/RewardsPreviewModal/RewardsPreviewModal.stories.js +60 -0
- package/dist/widgets/sections/RewardsSubsection/RewardsSubsection.js +13 -0
- package/dist/widgets/sections/RewardsSubsection/RewardsSubsection.stories.d.ts +7 -0
- package/dist/widgets/sections/RewardsSubsection/RewardsSubsection.stories.js +60 -0
- package/dist/widgets/sections/RewardsSubsection/index.d.ts +1 -1
- package/dist/widgets/sections/RewardsSubsection/index.js +1 -0
- package/dist/widgets/sections/SettingMenu/SettingMenu.d.ts +3 -3
- package/dist/widgets/sections/SettingMenu/SettingMenu.js +17 -0
- package/dist/widgets/sections/SettingMenu/SettingMenu.stories.d.ts +5 -0
- package/dist/widgets/sections/SettingMenu/SettingMenu.stories.js +35 -0
- package/dist/widgets/sections/SettingMenu/components/SettingMenuCustomContent.d.ts +1 -1
- package/dist/widgets/sections/SettingMenu/components/SettingMenuCustomContent.js +2 -0
- package/dist/widgets/sections/SettingMenu/components/SettingMenuDescription.d.ts +1 -1
- package/dist/widgets/sections/SettingMenu/components/SettingMenuDescription.js +4 -0
- package/dist/widgets/sections/SettingMenu/components/SettingMenuGroup.d.ts +1 -1
- package/dist/widgets/sections/SettingMenu/components/SettingMenuGroup.js +15 -0
- package/dist/widgets/sections/SettingMenu/components/SettingMenuItem.d.ts +1 -1
- package/dist/widgets/sections/SettingMenu/components/SettingMenuItem.js +13 -0
- package/dist/widgets/sections/SettingMenu/components/SettingMenuSubMenu.d.ts +1 -1
- package/dist/widgets/sections/SettingMenu/components/SettingMenuSubMenu.js +14 -0
- package/dist/widgets/sections/SettingMenu/components/SettingMenuTitle.d.ts +1 -1
- package/dist/widgets/sections/SettingMenu/components/SettingMenuTitle.js +4 -0
- package/dist/widgets/sections/SettingMenu/components/index.d.ts +12 -12
- package/dist/widgets/sections/SettingMenu/components/index.js +6 -0
- package/dist/widgets/sections/SettingMenu/index.d.ts +14 -14
- package/dist/widgets/sections/SettingMenu/index.js +7 -0
- package/dist/widgets/sections/TableElement/TableElement.d.ts +1 -1
- package/dist/widgets/sections/TableElement/TableElement.js +6 -0
- package/dist/widgets/sections/TableElement/TableElement.stories.d.ts +9 -0
- package/dist/widgets/sections/TableElement/TableElement.stories.js +54 -0
- package/dist/widgets/sections/TableElement/index.d.ts +1 -1
- package/dist/widgets/sections/TableElement/index.js +1 -0
- package/dist/widgets/sections/WalletMenu/WalletMenu.d.ts +1 -1
- package/dist/widgets/sections/WalletMenu/WalletMenu.js +22 -0
- package/dist/widgets/sections/WalletMenu/WalletMenu.stories.d.ts +6 -0
- package/dist/widgets/sections/WalletMenu/WalletMenu.stories.js +35 -0
- package/dist/widgets/sections/WalletMenu/components/WalletInfoCard.d.ts +1 -1
- package/dist/widgets/sections/WalletMenu/components/WalletInfoCard.js +9 -0
- package/dist/widgets/sections/WalletMenu/components/WalletInfoSection.d.ts +1 -1
- package/dist/widgets/sections/WalletMenu/components/WalletInfoSection.js +8 -0
- package/dist/widgets/sections/WalletMenu/components/WalletSettingItem.d.ts +1 -1
- package/dist/widgets/sections/WalletMenu/components/WalletSettingItem.js +7 -0
- package/dist/widgets/sections/WalletMenu/components/WalletToggle.d.ts +1 -1
- package/dist/widgets/sections/WalletMenu/components/WalletToggle.js +12 -0
- package/dist/widgets/sections/WalletMenu/components/index.js +4 -0
- package/dist/widgets/sections/WalletMenu/index.js +5 -0
- package/package.json +4 -10
package/dist/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import R, { useState as oe, useRef as nt, useCallback as ae, createContext as sr, useMemo as
|
|
4
|
-
import { twJoin as
|
|
1
|
+
import { jsx as u, jsxs as N, Fragment as rt } from "react/jsx-runtime";
|
|
2
|
+
import * as Ge from "react";
|
|
3
|
+
import R, { useState as oe, useRef as nt, useCallback as ae, createContext as sr, useMemo as We, forwardRef as De, useContext as Lt, useEffect as ce, createElement as br, Children as Xt, cloneElement as yr, isValidElement as wr, useImperativeHandle as En, useId as Sn } from "react";
|
|
4
|
+
import { twJoin as S, twMerge as be } from "tailwind-merge";
|
|
5
5
|
import * as Ti from "react-dom";
|
|
6
6
|
import { createPortal as Mi } from "react-dom";
|
|
7
7
|
function at({
|
|
@@ -35,7 +35,7 @@ function sl({
|
|
|
35
35
|
onStateChange: r
|
|
36
36
|
}), l = ae(() => {
|
|
37
37
|
a(!o);
|
|
38
|
-
}, [a, o]), f =
|
|
38
|
+
}, [a, o]), f = We(
|
|
39
39
|
() => ({
|
|
40
40
|
defaultExpanded: t,
|
|
41
41
|
disabled: i,
|
|
@@ -44,16 +44,16 @@ function sl({
|
|
|
44
44
|
}),
|
|
45
45
|
[t, o, i, l]
|
|
46
46
|
);
|
|
47
|
-
return /* @__PURE__ */
|
|
47
|
+
return /* @__PURE__ */ u(xr.Provider, { value: f, children: /* @__PURE__ */ u("div", { className: S("bbn-accordion", i && "bbn-accordion-disabled", n), children: s }) });
|
|
48
48
|
}
|
|
49
49
|
const lt = De(
|
|
50
|
-
({ variant: e = "contained", size: t = "large", color: r = "primary", fluid: n = !1, className: i, disabled: s, ...o }, a) => /* @__PURE__ */
|
|
50
|
+
({ variant: e = "contained", size: t = "large", color: r = "primary", fluid: n = !1, className: i, disabled: s, ...o }, a) => /* @__PURE__ */ u(
|
|
51
51
|
"button",
|
|
52
52
|
{
|
|
53
53
|
...o,
|
|
54
54
|
disabled: s,
|
|
55
55
|
ref: a,
|
|
56
|
-
className:
|
|
56
|
+
className: S(
|
|
57
57
|
"bbn-btn",
|
|
58
58
|
`bbn-btn-${e}`,
|
|
59
59
|
`bbn-btn-${r}`,
|
|
@@ -65,14 +65,14 @@ const lt = De(
|
|
|
65
65
|
)
|
|
66
66
|
);
|
|
67
67
|
lt.displayName = "Button";
|
|
68
|
-
const An = ({ className: e, ...t }) => /* @__PURE__ */
|
|
69
|
-
({ className: e, ...t }, r) => /* @__PURE__ */
|
|
68
|
+
const An = ({ className: e, ...t }) => /* @__PURE__ */ u("button", { ...t, className: S("bbn-btn-icon", e) }), Fn = De(
|
|
69
|
+
({ className: e, ...t }, r) => /* @__PURE__ */ u(
|
|
70
70
|
lt,
|
|
71
71
|
{
|
|
72
72
|
...t,
|
|
73
73
|
ref: r,
|
|
74
74
|
variant: "contained",
|
|
75
|
-
className:
|
|
75
|
+
className: S(
|
|
76
76
|
"!bg-error-main text-white font-medium !text-sm hover:!bg-error-main/90 transition-colors",
|
|
77
77
|
e
|
|
78
78
|
)
|
|
@@ -87,9 +87,9 @@ function ol({
|
|
|
87
87
|
renderIcon: n = () => null
|
|
88
88
|
}) {
|
|
89
89
|
const { expanded: i, toggle: s } = Lt(xr), o = n(i);
|
|
90
|
-
return /* @__PURE__ */ N("div", { className:
|
|
90
|
+
return /* @__PURE__ */ N("div", { className: S("bbn-accordion-summary", e), onClick: s, children: [
|
|
91
91
|
r,
|
|
92
|
-
o && /* @__PURE__ */
|
|
92
|
+
o && /* @__PURE__ */ u(An, { className: S("bbn-accordion-icon", t), children: o })
|
|
93
93
|
] });
|
|
94
94
|
}
|
|
95
95
|
function Nr(e, t) {
|
|
@@ -121,7 +121,7 @@ function al({
|
|
|
121
121
|
wrapperClassName: n,
|
|
122
122
|
children: i
|
|
123
123
|
}) {
|
|
124
|
-
const { expanded: s } = Lt(xr), [o, a] = oe(s), l = o || !e, { height: f, ref:
|
|
124
|
+
const { expanded: s } = Lt(xr), [o, a] = oe(s), l = o || !e, { height: f, ref: c } = Pi(l);
|
|
125
125
|
return ce(
|
|
126
126
|
function() {
|
|
127
127
|
if (s === o)
|
|
@@ -136,16 +136,16 @@ function al({
|
|
|
136
136
|
};
|
|
137
137
|
},
|
|
138
138
|
[s, o, t]
|
|
139
|
-
), /* @__PURE__ */
|
|
139
|
+
), /* @__PURE__ */ u(
|
|
140
140
|
"div",
|
|
141
141
|
{
|
|
142
|
-
className:
|
|
142
|
+
className: S("bbn-accordion-details", n),
|
|
143
143
|
style: {
|
|
144
144
|
height: s ? f : "0px",
|
|
145
145
|
visibility: o ? "visible" : "hidden",
|
|
146
146
|
transitionDuration: `${t}ms`
|
|
147
147
|
},
|
|
148
|
-
children: l ? /* @__PURE__ */
|
|
148
|
+
children: l ? /* @__PURE__ */ u("div", { ref: c, className: S("bbn-accordion-content", r), children: i }) : null
|
|
149
149
|
}
|
|
150
150
|
);
|
|
151
151
|
}
|
|
@@ -155,7 +155,7 @@ const W = De(
|
|
|
155
155
|
{
|
|
156
156
|
...i,
|
|
157
157
|
ref: s,
|
|
158
|
-
className:
|
|
158
|
+
className: S(`bbn-text-${e}`, n)
|
|
159
159
|
},
|
|
160
160
|
r
|
|
161
161
|
)
|
|
@@ -167,14 +167,14 @@ const Cr = De(
|
|
|
167
167
|
{
|
|
168
168
|
...i,
|
|
169
169
|
ref: s,
|
|
170
|
-
className:
|
|
170
|
+
className: S(`bbn-${e}`, n)
|
|
171
171
|
},
|
|
172
172
|
r
|
|
173
173
|
)
|
|
174
174
|
);
|
|
175
175
|
Cr.displayName = "Heading";
|
|
176
176
|
function Yt({ className: e, style: t, size: r = "large", variant: n = "circular", alt: i, url: s, children: o }) {
|
|
177
|
-
return /* @__PURE__ */
|
|
177
|
+
return /* @__PURE__ */ u("div", { style: t, className: S("bbn-avatar", `bbn-avatar-${r}`, `bbn-avatar-${n}`, e), children: s ? /* @__PURE__ */ u("img", { className: "bbn-avatar-img", src: s, alt: i }) : o });
|
|
178
178
|
}
|
|
179
179
|
const ll = ({
|
|
180
180
|
max: e = 1 / 0,
|
|
@@ -185,7 +185,7 @@ const ll = ({
|
|
|
185
185
|
...s
|
|
186
186
|
}) => {
|
|
187
187
|
const o = Xt.count(r);
|
|
188
|
-
return /* @__PURE__ */ N("div", { className:
|
|
188
|
+
return /* @__PURE__ */ N("div", { className: S("bbn-avatar-group", t), children: [
|
|
189
189
|
Xt.map(
|
|
190
190
|
r,
|
|
191
191
|
(a, l) => wr(a) && l + 1 <= e ? yr(a, {
|
|
@@ -209,22 +209,22 @@ const ll = ({
|
|
|
209
209
|
className: a,
|
|
210
210
|
inputType: l,
|
|
211
211
|
labelClassName: f,
|
|
212
|
-
renderIcon:
|
|
212
|
+
renderIcon: c,
|
|
213
213
|
onChange: d,
|
|
214
214
|
...m
|
|
215
215
|
}, v) {
|
|
216
|
-
const [x = !1,
|
|
216
|
+
const [x = !1, b] = at({
|
|
217
217
|
value: r,
|
|
218
218
|
defaultValue: n,
|
|
219
219
|
onStateChange: d
|
|
220
220
|
});
|
|
221
|
-
function
|
|
222
|
-
var
|
|
223
|
-
|
|
221
|
+
function y(w) {
|
|
222
|
+
var _;
|
|
223
|
+
b(w.currentTarget.checked), (_ = i == null ? void 0 : i.onChange) == null || _.call(i, w);
|
|
224
224
|
}
|
|
225
|
-
const
|
|
226
|
-
|
|
227
|
-
/* @__PURE__ */
|
|
225
|
+
const M = /* @__PURE__ */ N("span", { className: S("bbn-switcher", o && "bbn-switcher-disabled", a), children: [
|
|
226
|
+
c(x),
|
|
227
|
+
/* @__PURE__ */ u(
|
|
228
228
|
"input",
|
|
229
229
|
{
|
|
230
230
|
ref: v,
|
|
@@ -234,7 +234,7 @@ const ll = ({
|
|
|
234
234
|
...m,
|
|
235
235
|
...i,
|
|
236
236
|
checked: x,
|
|
237
|
-
onChange:
|
|
237
|
+
onChange: y
|
|
238
238
|
}
|
|
239
239
|
)
|
|
240
240
|
] });
|
|
@@ -243,26 +243,26 @@ const ll = ({
|
|
|
243
243
|
{
|
|
244
244
|
as: "label",
|
|
245
245
|
variant: "body1",
|
|
246
|
-
className:
|
|
246
|
+
className: S(
|
|
247
247
|
"bbn-switcher-label",
|
|
248
248
|
s === "left" ? "bbn-switcher-left" : "bbn-switcher-right",
|
|
249
249
|
f
|
|
250
250
|
),
|
|
251
251
|
children: [
|
|
252
|
-
|
|
252
|
+
M,
|
|
253
253
|
t
|
|
254
254
|
]
|
|
255
255
|
}
|
|
256
|
-
) :
|
|
256
|
+
) : M;
|
|
257
257
|
}), Bi = {
|
|
258
|
-
false: /* @__PURE__ */
|
|
258
|
+
false: /* @__PURE__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ u(
|
|
259
259
|
"path",
|
|
260
260
|
{
|
|
261
261
|
d: "M19 5V19H5V5H19ZM19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3Z",
|
|
262
262
|
fill: "currentColor"
|
|
263
263
|
}
|
|
264
264
|
) }),
|
|
265
|
-
true: /* @__PURE__ */
|
|
265
|
+
true: /* @__PURE__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ u(
|
|
266
266
|
"path",
|
|
267
267
|
{
|
|
268
268
|
d: "M19 3H5C3.89 3 3 3.9 3 5V19C3 20.1 3.89 21 5 21H19C20.11 21 21 20.1 21 19V5C21 3.9 20.11 3 19 3ZM10 17L5 12L6.41 10.59L10 14.17L17.59 6.58L19 8L10 17Z",
|
|
@@ -270,16 +270,16 @@ const ll = ({
|
|
|
270
270
|
}
|
|
271
271
|
) })
|
|
272
272
|
}, Ri = De(function(t, r) {
|
|
273
|
-
return /* @__PURE__ */
|
|
273
|
+
return /* @__PURE__ */ u(Ln, { ref: r, ...t, inputType: "checkbox", renderIcon: (n) => Bi[n.toString()] });
|
|
274
274
|
}), ji = {
|
|
275
|
-
true: /* @__PURE__ */
|
|
275
|
+
true: /* @__PURE__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ u(
|
|
276
276
|
"path",
|
|
277
277
|
{
|
|
278
278
|
d: "M12 7C9.24 7 7 9.24 7 12C7 14.76 9.24 17 12 17C14.76 17 17 14.76 17 12C17 9.24 14.76 7 12 7ZM12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z",
|
|
279
279
|
fill: "currentColor"
|
|
280
280
|
}
|
|
281
281
|
) }),
|
|
282
|
-
false: /* @__PURE__ */
|
|
282
|
+
false: /* @__PURE__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ u(
|
|
283
283
|
"path",
|
|
284
284
|
{
|
|
285
285
|
d: "M12 2C6.48 2 2 6.48 2 12C2 17.52 6.48 22 12 22C17.52 22 22 17.52 22 12C22 6.48 17.52 2 12 2ZM12 20C7.58 20 4 16.42 4 12C4 7.58 7.58 4 12 4C16.42 4 20 7.58 20 12C20 16.42 16.42 20 12 20Z",
|
|
@@ -287,7 +287,7 @@ const ll = ({
|
|
|
287
287
|
}
|
|
288
288
|
) })
|
|
289
289
|
}, Ii = De(function(t, r) {
|
|
290
|
-
return /* @__PURE__ */
|
|
290
|
+
return /* @__PURE__ */ u(Ln, { ref: r, ...t, inputType: "radio", renderIcon: (n) => ji[n.toString()] });
|
|
291
291
|
});
|
|
292
292
|
var Vn = {
|
|
293
293
|
color: void 0,
|
|
@@ -411,7 +411,7 @@ var Gr = function(t) {
|
|
|
411
411
|
var i = n[0], s = n[1];
|
|
412
412
|
return r[i] = s, r;
|
|
413
413
|
}, {});
|
|
414
|
-
}, Kr = typeof window < "u" && window.document && window.document.createElement ?
|
|
414
|
+
}, Kr = typeof window < "u" && window.document && window.document.createElement ? Ge.useLayoutEffect : Ge.useEffect, de = "top", we = "bottom", xe = "right", he = "left", kr = "auto", _t = [de, we, xe, he], ct = "start", Et = "end", Ki = "clippingParents", Dn = "viewport", yt = "popper", Ji = "reference", Jr = /* @__PURE__ */ _t.reduce(function(e, t) {
|
|
415
415
|
return e.concat([t + "-" + ct, t + "-" + Et]);
|
|
416
416
|
}, []), Tn = /* @__PURE__ */ [].concat(_t, [kr]).reduce(function(e, t) {
|
|
417
417
|
return e.concat([t, t + "-" + ct, t + "-" + Et]);
|
|
@@ -501,16 +501,16 @@ function ft(e, t, r) {
|
|
|
501
501
|
t === void 0 && (t = !1), r === void 0 && (r = !1);
|
|
502
502
|
var n = e.getBoundingClientRect(), i = 1, s = 1;
|
|
503
503
|
t && ye(e) && (i = e.offsetWidth > 0 && ut(n.width) / e.offsetWidth || 1, s = e.offsetHeight > 0 && ut(n.height) / e.offsetHeight || 1);
|
|
504
|
-
var o = et(e) ? ve(e) : window, a = o.visualViewport, l = !Mn() && r, f = (n.left + (l && a ? a.offsetLeft : 0)) / i,
|
|
504
|
+
var o = et(e) ? ve(e) : window, a = o.visualViewport, l = !Mn() && r, f = (n.left + (l && a ? a.offsetLeft : 0)) / i, c = (n.top + (l && a ? a.offsetTop : 0)) / s, d = n.width / i, m = n.height / s;
|
|
505
505
|
return {
|
|
506
506
|
width: d,
|
|
507
507
|
height: m,
|
|
508
|
-
top:
|
|
508
|
+
top: c,
|
|
509
509
|
right: f + d,
|
|
510
|
-
bottom:
|
|
510
|
+
bottom: c + m,
|
|
511
511
|
left: f,
|
|
512
512
|
x: f,
|
|
513
|
-
y:
|
|
513
|
+
y: c
|
|
514
514
|
};
|
|
515
515
|
}
|
|
516
516
|
function Er(e) {
|
|
@@ -542,7 +542,7 @@ function Re(e) {
|
|
|
542
542
|
function ds(e) {
|
|
543
543
|
return ["table", "td", "th"].indexOf(Ve(e)) >= 0;
|
|
544
544
|
}
|
|
545
|
-
function
|
|
545
|
+
function Ue(e) {
|
|
546
546
|
return ((et(e) ? e.ownerDocument : (
|
|
547
547
|
// $FlowFixMe[prop-missing]
|
|
548
548
|
e.document
|
|
@@ -557,7 +557,7 @@ function or(e) {
|
|
|
557
557
|
e.parentNode || // DOM Element detected
|
|
558
558
|
(Or(e) ? e.host : null) || // ShadowRoot detected
|
|
559
559
|
// $FlowFixMe[incompatible-call]: HTMLElement is a Node
|
|
560
|
-
|
|
560
|
+
Ue(e)
|
|
561
561
|
);
|
|
562
562
|
}
|
|
563
563
|
function Qr(e) {
|
|
@@ -617,10 +617,10 @@ var ps = function(t, r) {
|
|
|
617
617
|
})) : t, Rn(typeof t != "number" ? t : jn(t, _t));
|
|
618
618
|
};
|
|
619
619
|
function vs(e) {
|
|
620
|
-
var t, r = e.state, n = e.name, i = e.options, s = r.elements.arrow, o = r.modifiersData.popperOffsets, a = Le(r.placement), l = Sr(a), f = [he, xe].indexOf(a) >= 0,
|
|
620
|
+
var t, r = e.state, n = e.name, i = e.options, s = r.elements.arrow, o = r.modifiersData.popperOffsets, a = Le(r.placement), l = Sr(a), f = [he, xe].indexOf(a) >= 0, c = f ? "height" : "width";
|
|
621
621
|
if (!(!s || !o)) {
|
|
622
|
-
var d = ps(i.padding, r), m = Er(s), v = l === "y" ? de : he, x = l === "y" ? we : xe,
|
|
623
|
-
r.modifiersData[n] = (t = {}, t[$] = k, t.centerOffset = k -
|
|
622
|
+
var d = ps(i.padding, r), m = Er(s), v = l === "y" ? de : he, x = l === "y" ? we : xe, b = r.rects.reference[c] + r.rects.reference[l] - o[l] - r.rects.popper[c], y = o[l] - r.rects.reference[l], M = Dt(s), w = M ? l === "y" ? M.clientHeight || 0 : M.clientWidth || 0 : 0, _ = b / 2 - y / 2, O = d[v], L = w - m[c] - d[x], A = w / 2 - m[c] / 2 + _, k = Nt(O, A, L), $ = l;
|
|
623
|
+
r.modifiersData[n] = (t = {}, t[$] = k, t.centerOffset = k - A, t);
|
|
624
624
|
}
|
|
625
625
|
}
|
|
626
626
|
function gs(e) {
|
|
@@ -653,48 +653,48 @@ function ws(e, t) {
|
|
|
653
653
|
};
|
|
654
654
|
}
|
|
655
655
|
function en(e) {
|
|
656
|
-
var t, r = e.popper, n = e.popperRect, i = e.placement, s = e.variation, o = e.offsets, a = e.position, l = e.gpuAcceleration, f = e.adaptive,
|
|
656
|
+
var t, r = e.popper, n = e.popperRect, i = e.placement, s = e.variation, o = e.offsets, a = e.position, l = e.gpuAcceleration, f = e.adaptive, c = e.roundOffsets, d = e.isFixed, m = o.x, v = m === void 0 ? 0 : m, x = o.y, b = x === void 0 ? 0 : x, y = typeof c == "function" ? c({
|
|
657
657
|
x: v,
|
|
658
|
-
y
|
|
658
|
+
y: b
|
|
659
659
|
}) : {
|
|
660
660
|
x: v,
|
|
661
|
-
y
|
|
661
|
+
y: b
|
|
662
662
|
};
|
|
663
|
-
v =
|
|
664
|
-
var
|
|
663
|
+
v = y.x, b = y.y;
|
|
664
|
+
var M = o.hasOwnProperty("x"), w = o.hasOwnProperty("y"), _ = he, O = de, L = window;
|
|
665
665
|
if (f) {
|
|
666
|
-
var
|
|
667
|
-
if (
|
|
668
|
-
|
|
669
|
-
var j = d &&
|
|
666
|
+
var A = Dt(r), k = "clientHeight", $ = "clientWidth";
|
|
667
|
+
if (A === ve(r) && (A = Ue(r), Re(A).position !== "static" && a === "absolute" && (k = "scrollHeight", $ = "scrollWidth")), A = A, i === de || (i === he || i === xe) && s === Et) {
|
|
668
|
+
O = we;
|
|
669
|
+
var j = d && A === L && L.visualViewport ? L.visualViewport.height : (
|
|
670
670
|
// $FlowFixMe[prop-missing]
|
|
671
|
-
|
|
671
|
+
A[k]
|
|
672
672
|
);
|
|
673
|
-
|
|
673
|
+
b -= j - n.height, b *= l ? 1 : -1;
|
|
674
674
|
}
|
|
675
675
|
if (i === he || (i === de || i === we) && s === Et) {
|
|
676
|
-
|
|
677
|
-
var H = d &&
|
|
676
|
+
_ = xe;
|
|
677
|
+
var H = d && A === L && L.visualViewport ? L.visualViewport.width : (
|
|
678
678
|
// $FlowFixMe[prop-missing]
|
|
679
|
-
|
|
679
|
+
A[$]
|
|
680
680
|
);
|
|
681
681
|
v -= H - n.width, v *= l ? 1 : -1;
|
|
682
682
|
}
|
|
683
683
|
}
|
|
684
684
|
var B = Object.assign({
|
|
685
685
|
position: a
|
|
686
|
-
}, f && ys), D =
|
|
686
|
+
}, f && ys), D = c === !0 ? ws({
|
|
687
687
|
x: v,
|
|
688
|
-
y
|
|
688
|
+
y: b
|
|
689
689
|
}, ve(r)) : {
|
|
690
690
|
x: v,
|
|
691
|
-
y
|
|
691
|
+
y: b
|
|
692
692
|
};
|
|
693
|
-
if (v = D.x,
|
|
693
|
+
if (v = D.x, b = D.y, l) {
|
|
694
694
|
var I;
|
|
695
|
-
return Object.assign({}, B, (I = {}, I[
|
|
695
|
+
return Object.assign({}, B, (I = {}, I[O] = w ? "0" : "", I[_] = M ? "0" : "", I.transform = (L.devicePixelRatio || 1) <= 1 ? "translate(" + v + "px, " + b + "px)" : "translate3d(" + v + "px, " + b + "px, 0)", I));
|
|
696
696
|
}
|
|
697
|
-
return Object.assign({}, B, (t = {}, t[
|
|
697
|
+
return Object.assign({}, B, (t = {}, t[O] = w ? b + "px" : "", t[_] = M ? v + "px" : "", t.transform = "", t));
|
|
698
698
|
}
|
|
699
699
|
function xs(e) {
|
|
700
700
|
var t = e.state, r = e.options, n = r.gpuAcceleration, i = n === void 0 ? !0 : n, s = r.adaptive, o = s === void 0 ? !0 : s, a = r.roundOffsets, l = a === void 0 ? !0 : a, f = {
|
|
@@ -731,11 +731,11 @@ var Wt = {
|
|
|
731
731
|
};
|
|
732
732
|
function Cs(e) {
|
|
733
733
|
var t = e.state, r = e.instance, n = e.options, i = n.scroll, s = i === void 0 ? !0 : i, o = n.resize, a = o === void 0 ? !0 : o, l = ve(t.elements.popper), f = [].concat(t.scrollParents.reference, t.scrollParents.popper);
|
|
734
|
-
return s && f.forEach(function(
|
|
735
|
-
|
|
734
|
+
return s && f.forEach(function(c) {
|
|
735
|
+
c.addEventListener("scroll", r.update, Wt);
|
|
736
736
|
}), a && l.addEventListener("resize", r.update, Wt), function() {
|
|
737
|
-
s && f.forEach(function(
|
|
738
|
-
|
|
737
|
+
s && f.forEach(function(c) {
|
|
738
|
+
c.removeEventListener("scroll", r.update, Wt);
|
|
739
739
|
}), a && l.removeEventListener("resize", r.update, Wt);
|
|
740
740
|
};
|
|
741
741
|
}
|
|
@@ -776,10 +776,10 @@ function Ar(e) {
|
|
|
776
776
|
};
|
|
777
777
|
}
|
|
778
778
|
function Fr(e) {
|
|
779
|
-
return ft(
|
|
779
|
+
return ft(Ue(e)).left + Ar(e).scrollLeft;
|
|
780
780
|
}
|
|
781
781
|
function Ss(e, t) {
|
|
782
|
-
var r = ve(e), n =
|
|
782
|
+
var r = ve(e), n = Ue(e), i = r.visualViewport, s = n.clientWidth, o = n.clientHeight, a = 0, l = 0;
|
|
783
783
|
if (i) {
|
|
784
784
|
s = i.width, o = i.height;
|
|
785
785
|
var f = Mn();
|
|
@@ -793,7 +793,7 @@ function Ss(e, t) {
|
|
|
793
793
|
};
|
|
794
794
|
}
|
|
795
795
|
function As(e) {
|
|
796
|
-
var t, r =
|
|
796
|
+
var t, r = Ue(e), n = Ar(e), i = (t = e.ownerDocument) == null ? void 0 : t.body, s = Je(r.scrollWidth, r.clientWidth, i ? i.scrollWidth : 0, i ? i.clientWidth : 0), o = Je(r.scrollHeight, r.clientHeight, i ? i.scrollHeight : 0, i ? i.clientHeight : 0), a = -n.scrollLeft + Fr(e), l = -n.scrollTop;
|
|
797
797
|
return Re(i || r).direction === "rtl" && (a += Je(r.clientWidth, i ? i.clientWidth : 0) - s), {
|
|
798
798
|
width: s,
|
|
799
799
|
height: o,
|
|
@@ -830,7 +830,7 @@ function Fs(e, t) {
|
|
|
830
830
|
return r.top = r.top + e.clientTop, r.left = r.left + e.clientLeft, r.bottom = r.top + e.clientHeight, r.right = r.left + e.clientWidth, r.width = e.clientWidth, r.height = e.clientHeight, r.x = r.left, r.y = r.top, r;
|
|
831
831
|
}
|
|
832
832
|
function rn(e, t, r) {
|
|
833
|
-
return t === Dn ? vr(Ss(e, r)) : et(t) ? Fs(t, r) : vr(As(
|
|
833
|
+
return t === Dn ? vr(Ss(e, r)) : et(t) ? Fs(t, r) : vr(As(Ue(e)));
|
|
834
834
|
}
|
|
835
835
|
function Ls(e) {
|
|
836
836
|
var t = Ct(or(e)), r = ["absolute", "fixed"].indexOf(Re(e).position) >= 0, n = r && ye(e) ? Dt(e) : e;
|
|
@@ -840,8 +840,8 @@ function Ls(e) {
|
|
|
840
840
|
}
|
|
841
841
|
function Vs(e, t, r, n) {
|
|
842
842
|
var i = t === "clippingParents" ? Ls(e) : [].concat(t), s = [].concat(i, [r]), o = s[0], a = s.reduce(function(l, f) {
|
|
843
|
-
var
|
|
844
|
-
return l.top = Je(
|
|
843
|
+
var c = rn(e, f, n);
|
|
844
|
+
return l.top = Je(c.top, l.top), l.right = Jt(c.right, l.right), l.bottom = Jt(c.bottom, l.bottom), l.left = Je(c.left, l.left), l;
|
|
845
845
|
}, rn(e, o, n));
|
|
846
846
|
return a.width = a.right - a.left, a.height = a.bottom - a.top, a.x = a.left, a.y = a.top, a;
|
|
847
847
|
}
|
|
@@ -880,13 +880,13 @@ function $n(e) {
|
|
|
880
880
|
}
|
|
881
881
|
var f = i ? Sr(i) : null;
|
|
882
882
|
if (f != null) {
|
|
883
|
-
var
|
|
883
|
+
var c = f === "y" ? "height" : "width";
|
|
884
884
|
switch (s) {
|
|
885
885
|
case ct:
|
|
886
|
-
l[f] = l[f] - (t[
|
|
886
|
+
l[f] = l[f] - (t[c] / 2 - r[c] / 2);
|
|
887
887
|
break;
|
|
888
888
|
case Et:
|
|
889
|
-
l[f] = l[f] + (t[
|
|
889
|
+
l[f] = l[f] + (t[c] / 2 - r[c] / 2);
|
|
890
890
|
break;
|
|
891
891
|
}
|
|
892
892
|
}
|
|
@@ -894,15 +894,15 @@ function $n(e) {
|
|
|
894
894
|
}
|
|
895
895
|
function St(e, t) {
|
|
896
896
|
t === void 0 && (t = {});
|
|
897
|
-
var r = t, n = r.placement, i = n === void 0 ? e.placement : n, s = r.strategy, o = s === void 0 ? e.strategy : s, a = r.boundary, l = a === void 0 ? Ki : a, f = r.rootBoundary,
|
|
898
|
-
reference:
|
|
899
|
-
element:
|
|
897
|
+
var r = t, n = r.placement, i = n === void 0 ? e.placement : n, s = r.strategy, o = s === void 0 ? e.strategy : s, a = r.boundary, l = a === void 0 ? Ki : a, f = r.rootBoundary, c = f === void 0 ? Dn : f, d = r.elementContext, m = d === void 0 ? yt : d, v = r.altBoundary, x = v === void 0 ? !1 : v, b = r.padding, y = b === void 0 ? 0 : b, M = Rn(typeof y != "number" ? y : jn(y, _t)), w = m === yt ? Ji : yt, _ = e.rects.popper, O = e.elements[x ? w : m], L = Vs(et(O) ? O : O.contextElement || Ue(e.elements.popper), l, c, o), A = ft(e.elements.reference), k = $n({
|
|
898
|
+
reference: A,
|
|
899
|
+
element: _,
|
|
900
900
|
placement: i
|
|
901
|
-
}), $ = vr(Object.assign({},
|
|
902
|
-
top:
|
|
903
|
-
bottom: j.bottom -
|
|
904
|
-
left:
|
|
905
|
-
right: j.right -
|
|
901
|
+
}), $ = vr(Object.assign({}, _, k)), j = m === yt ? $ : A, H = {
|
|
902
|
+
top: L.top - j.top + M.top,
|
|
903
|
+
bottom: j.bottom - L.bottom + M.bottom,
|
|
904
|
+
left: L.left - j.left + M.left,
|
|
905
|
+
right: j.right - L.right + M.right
|
|
906
906
|
}, B = e.modifiersData.offset;
|
|
907
907
|
if (m === yt && B) {
|
|
908
908
|
var D = B[i];
|
|
@@ -915,22 +915,22 @@ function St(e, t) {
|
|
|
915
915
|
}
|
|
916
916
|
function _s(e, t) {
|
|
917
917
|
t === void 0 && (t = {});
|
|
918
|
-
var r = t, n = r.placement, i = r.boundary, s = r.rootBoundary, o = r.padding, a = r.flipVariations, l = r.allowedAutoPlacements, f = l === void 0 ? Tn : l,
|
|
919
|
-
return dt(x) ===
|
|
918
|
+
var r = t, n = r.placement, i = r.boundary, s = r.rootBoundary, o = r.padding, a = r.flipVariations, l = r.allowedAutoPlacements, f = l === void 0 ? Tn : l, c = dt(n), d = c ? a ? Jr : Jr.filter(function(x) {
|
|
919
|
+
return dt(x) === c;
|
|
920
920
|
}) : _t, m = d.filter(function(x) {
|
|
921
921
|
return f.indexOf(x) >= 0;
|
|
922
922
|
});
|
|
923
923
|
m.length === 0 && (m = d);
|
|
924
|
-
var v = m.reduce(function(x,
|
|
925
|
-
return x[
|
|
926
|
-
placement:
|
|
924
|
+
var v = m.reduce(function(x, b) {
|
|
925
|
+
return x[b] = St(e, {
|
|
926
|
+
placement: b,
|
|
927
927
|
boundary: i,
|
|
928
928
|
rootBoundary: s,
|
|
929
929
|
padding: o
|
|
930
|
-
})[Le(
|
|
930
|
+
})[Le(b)], x;
|
|
931
931
|
}, {});
|
|
932
|
-
return Object.keys(v).sort(function(x,
|
|
933
|
-
return v[x] - v[
|
|
932
|
+
return Object.keys(v).sort(function(x, b) {
|
|
933
|
+
return v[x] - v[b];
|
|
934
934
|
});
|
|
935
935
|
}
|
|
936
936
|
function Ds(e) {
|
|
@@ -942,24 +942,24 @@ function Ds(e) {
|
|
|
942
942
|
function Ts(e) {
|
|
943
943
|
var t = e.state, r = e.options, n = e.name;
|
|
944
944
|
if (!t.modifiersData[n]._skip) {
|
|
945
|
-
for (var i = r.mainAxis, s = i === void 0 ? !0 : i, o = r.altAxis, a = o === void 0 ? !0 : o, l = r.fallbackPlacements, f = r.padding,
|
|
945
|
+
for (var i = r.mainAxis, s = i === void 0 ? !0 : i, o = r.altAxis, a = o === void 0 ? !0 : o, l = r.fallbackPlacements, f = r.padding, c = r.boundary, d = r.rootBoundary, m = r.altBoundary, v = r.flipVariations, x = v === void 0 ? !0 : v, b = r.allowedAutoPlacements, y = t.options.placement, M = Le(y), w = M === y, _ = l || (w || !x ? [qt(y)] : Ds(y)), O = [y].concat(_).reduce(function(je, Ce) {
|
|
946
946
|
return je.concat(Le(Ce) === kr ? _s(t, {
|
|
947
947
|
placement: Ce,
|
|
948
|
-
boundary:
|
|
948
|
+
boundary: c,
|
|
949
949
|
rootBoundary: d,
|
|
950
950
|
padding: f,
|
|
951
951
|
flipVariations: x,
|
|
952
|
-
allowedAutoPlacements:
|
|
952
|
+
allowedAutoPlacements: b
|
|
953
953
|
}) : Ce);
|
|
954
|
-
}, []),
|
|
955
|
-
var B =
|
|
954
|
+
}, []), L = t.rects.reference, A = t.rects.popper, k = /* @__PURE__ */ new Map(), $ = !0, j = O[0], H = 0; H < O.length; H++) {
|
|
955
|
+
var B = O[H], D = Le(B), I = dt(B) === ct, q = [de, we].indexOf(D) >= 0, J = q ? "width" : "height", X = St(t, {
|
|
956
956
|
placement: B,
|
|
957
|
-
boundary:
|
|
957
|
+
boundary: c,
|
|
958
958
|
rootBoundary: d,
|
|
959
959
|
altBoundary: m,
|
|
960
960
|
padding: f
|
|
961
961
|
}), Q = q ? I ? xe : he : I ? we : de;
|
|
962
|
-
|
|
962
|
+
L[J] > A[J] && (Q = qt(Q));
|
|
963
963
|
var Ee = qt(Q), ue = [];
|
|
964
964
|
if (s && ue.push(X[D] <= 0), a && ue.push(X[Q] <= 0, X[Ee] <= 0), ue.every(function(je) {
|
|
965
965
|
return je;
|
|
@@ -971,18 +971,18 @@ function Ts(e) {
|
|
|
971
971
|
}
|
|
972
972
|
if ($)
|
|
973
973
|
for (var Te = x ? 3 : 1, st = function(Ce) {
|
|
974
|
-
var
|
|
974
|
+
var Ze = O.find(function(Ie) {
|
|
975
975
|
var Se = k.get(Ie);
|
|
976
976
|
if (Se)
|
|
977
|
-
return Se.slice(0, Ce).every(function(
|
|
978
|
-
return
|
|
977
|
+
return Se.slice(0, Ce).every(function(Xe) {
|
|
978
|
+
return Xe;
|
|
979
979
|
});
|
|
980
980
|
});
|
|
981
|
-
if (
|
|
982
|
-
return j =
|
|
983
|
-
},
|
|
984
|
-
var
|
|
985
|
-
if (
|
|
981
|
+
if (Ze)
|
|
982
|
+
return j = Ze, "break";
|
|
983
|
+
}, qe = Te; qe > 0; qe--) {
|
|
984
|
+
var ze = st(qe);
|
|
985
|
+
if (ze === "break") break;
|
|
986
986
|
}
|
|
987
987
|
t.placement !== j && (t.modifiersData[n]._skip = !0, t.placement = j, t.reset = !0);
|
|
988
988
|
}
|
|
@@ -1018,14 +1018,14 @@ function Ps(e) {
|
|
|
1018
1018
|
elementContext: "reference"
|
|
1019
1019
|
}), a = St(t, {
|
|
1020
1020
|
altBoundary: !0
|
|
1021
|
-
}), l = nn(o, n), f = nn(a, i, s),
|
|
1021
|
+
}), l = nn(o, n), f = nn(a, i, s), c = sn(l), d = sn(f);
|
|
1022
1022
|
t.modifiersData[r] = {
|
|
1023
1023
|
referenceClippingOffsets: l,
|
|
1024
1024
|
popperEscapeOffsets: f,
|
|
1025
|
-
isReferenceHidden:
|
|
1025
|
+
isReferenceHidden: c,
|
|
1026
1026
|
hasPopperEscaped: d
|
|
1027
1027
|
}, t.attributes.popper = Object.assign({}, t.attributes.popper, {
|
|
1028
|
-
"data-popper-reference-hidden":
|
|
1028
|
+
"data-popper-reference-hidden": c,
|
|
1029
1029
|
"data-popper-escaped": d
|
|
1030
1030
|
});
|
|
1031
1031
|
}
|
|
@@ -1049,8 +1049,8 @@ function Rs(e, t, r) {
|
|
|
1049
1049
|
};
|
|
1050
1050
|
}
|
|
1051
1051
|
function js(e) {
|
|
1052
|
-
var t = e.state, r = e.options, n = e.name, i = r.offset, s = i === void 0 ? [0, 0] : i, o = Tn.reduce(function(
|
|
1053
|
-
return
|
|
1052
|
+
var t = e.state, r = e.options, n = e.name, i = r.offset, s = i === void 0 ? [0, 0] : i, o = Tn.reduce(function(c, d) {
|
|
1053
|
+
return c[d] = Rs(d, t.rects, s), c;
|
|
1054
1054
|
}, {}), a = o[t.placement], l = a.x, f = a.y;
|
|
1055
1055
|
t.modifiersData.popperOffsets != null && (t.modifiersData.popperOffsets.x += l, t.modifiersData.popperOffsets.y += f), t.modifiersData[n] = o;
|
|
1056
1056
|
}
|
|
@@ -1080,14 +1080,14 @@ function Ws(e) {
|
|
|
1080
1080
|
return e === "x" ? "y" : "x";
|
|
1081
1081
|
}
|
|
1082
1082
|
function Us(e) {
|
|
1083
|
-
var t = e.state, r = e.options, n = e.name, i = r.mainAxis, s = i === void 0 ? !0 : i, o = r.altAxis, a = o === void 0 ? !1 : o, l = r.boundary, f = r.rootBoundary,
|
|
1083
|
+
var t = e.state, r = e.options, n = e.name, i = r.mainAxis, s = i === void 0 ? !0 : i, o = r.altAxis, a = o === void 0 ? !1 : o, l = r.boundary, f = r.rootBoundary, c = r.altBoundary, d = r.padding, m = r.tether, v = m === void 0 ? !0 : m, x = r.tetherOffset, b = x === void 0 ? 0 : x, y = St(t, {
|
|
1084
1084
|
boundary: l,
|
|
1085
1085
|
rootBoundary: f,
|
|
1086
1086
|
padding: d,
|
|
1087
|
-
altBoundary:
|
|
1088
|
-
}),
|
|
1087
|
+
altBoundary: c
|
|
1088
|
+
}), M = Le(t.placement), w = dt(t.placement), _ = !w, O = Sr(M), L = Ws(O), A = t.modifiersData.popperOffsets, k = t.rects.reference, $ = t.rects.popper, j = typeof b == "function" ? b(Object.assign({}, t.rects, {
|
|
1089
1089
|
placement: t.placement
|
|
1090
|
-
})) :
|
|
1090
|
+
})) : b, H = typeof j == "number" ? {
|
|
1091
1091
|
mainAxis: j,
|
|
1092
1092
|
altAxis: j
|
|
1093
1093
|
} : Object.assign({
|
|
@@ -1097,17 +1097,17 @@ function Us(e) {
|
|
|
1097
1097
|
x: 0,
|
|
1098
1098
|
y: 0
|
|
1099
1099
|
};
|
|
1100
|
-
if (
|
|
1100
|
+
if (A) {
|
|
1101
1101
|
if (s) {
|
|
1102
|
-
var I, q =
|
|
1102
|
+
var I, q = O === "y" ? de : he, J = O === "y" ? we : xe, X = O === "y" ? "height" : "width", Q = A[O], Ee = Q + y[q], ue = Q - y[J], Te = v ? -$[X] / 2 : 0, st = w === ct ? k[X] : $[X], qe = w === ct ? -$[X] : -k[X], ze = t.elements.arrow, je = v && ze ? Er(ze) : {
|
|
1103
1103
|
width: 0,
|
|
1104
1104
|
height: 0
|
|
1105
|
-
}, Ce = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Bn(),
|
|
1106
|
-
|
|
1105
|
+
}, Ce = t.modifiersData["arrow#persistent"] ? t.modifiersData["arrow#persistent"].padding : Bn(), Ze = Ce[q], Ie = Ce[J], Se = Nt(0, k[X], je[X]), Xe = _ ? k[X] / 2 - Te - Se - Ze - H.mainAxis : st - Se - Ze - H.mainAxis, gt = _ ? -k[X] / 2 + Te + Se + Ie + H.mainAxis : qe + Se + Ie + H.mainAxis, bt = t.elements.arrow && Dt(t.elements.arrow), Mt = bt ? O === "y" ? bt.clientTop || 0 : bt.clientLeft || 0 : 0, Pt = (I = B == null ? void 0 : B[O]) != null ? I : 0, Bt = Q + Xe - Pt - Mt, Rt = Q + gt - Pt, jt = Nt(v ? Jt(Ee, Bt) : Ee, Q, v ? Je(ue, Rt) : ue);
|
|
1106
|
+
A[O] = jt, D[O] = jt - Q;
|
|
1107
1107
|
}
|
|
1108
1108
|
if (a) {
|
|
1109
|
-
var It, qr =
|
|
1110
|
-
L
|
|
1109
|
+
var It, qr = O === "x" ? de : he, $t = O === "x" ? we : xe, h = A[L], p = L === "y" ? "height" : "width", g = h + y[qr], V = h - y[$t], E = [de, he].indexOf(M) !== -1, C = (It = B == null ? void 0 : B[L]) != null ? It : 0, P = E ? g : h - k[p] - $[p] - C + H.altAxis, U = E ? h + k[p] + $[p] - C - H.altAxis : V, z = v && E ? ms(P, h, U) : Nt(v ? P : g, h, v ? U : V);
|
|
1110
|
+
A[L] = z, D[L] = z - h;
|
|
1111
1111
|
}
|
|
1112
1112
|
t.modifiersData[n] = D;
|
|
1113
1113
|
}
|
|
@@ -1134,7 +1134,7 @@ function Xs(e) {
|
|
|
1134
1134
|
}
|
|
1135
1135
|
function Ys(e, t, r) {
|
|
1136
1136
|
r === void 0 && (r = !1);
|
|
1137
|
-
var n = ye(t), i = ye(t) && Xs(t), s =
|
|
1137
|
+
var n = ye(t), i = ye(t) && Xs(t), s = Ue(t), o = ft(e, i, r), a = {
|
|
1138
1138
|
scrollLeft: 0,
|
|
1139
1139
|
scrollTop: 0
|
|
1140
1140
|
}, l = {
|
|
@@ -1215,7 +1215,7 @@ function eo(e) {
|
|
|
1215
1215
|
var t = e, r = t.defaultModifiers, n = r === void 0 ? [] : r, i = t.defaultOptions, s = i === void 0 ? on : i;
|
|
1216
1216
|
return function(a, l, f) {
|
|
1217
1217
|
f === void 0 && (f = s);
|
|
1218
|
-
var
|
|
1218
|
+
var c = {
|
|
1219
1219
|
placement: "bottom",
|
|
1220
1220
|
orderedModifiers: [],
|
|
1221
1221
|
options: Object.assign({}, on, s),
|
|
@@ -1227,16 +1227,16 @@ function eo(e) {
|
|
|
1227
1227
|
attributes: {},
|
|
1228
1228
|
styles: {}
|
|
1229
1229
|
}, d = [], m = !1, v = {
|
|
1230
|
-
state:
|
|
1231
|
-
setOptions: function(
|
|
1232
|
-
var w = typeof
|
|
1233
|
-
|
|
1230
|
+
state: c,
|
|
1231
|
+
setOptions: function(M) {
|
|
1232
|
+
var w = typeof M == "function" ? M(c.options) : M;
|
|
1233
|
+
b(), c.options = Object.assign({}, s, c.options, w), c.scrollParents = {
|
|
1234
1234
|
reference: et(a) ? Ct(a) : a.contextElement ? Ct(a.contextElement) : [],
|
|
1235
1235
|
popper: Ct(l)
|
|
1236
1236
|
};
|
|
1237
|
-
var
|
|
1238
|
-
return
|
|
1239
|
-
return
|
|
1237
|
+
var _ = Ks(Qs([].concat(n, c.options.modifiers)));
|
|
1238
|
+
return c.orderedModifiers = _.filter(function(O) {
|
|
1239
|
+
return O.enabled;
|
|
1240
1240
|
}), x(), v.update();
|
|
1241
1241
|
},
|
|
1242
1242
|
// Sync update – it will always be executed, even if not necessary. This
|
|
@@ -1246,26 +1246,26 @@ function eo(e) {
|
|
|
1246
1246
|
// prefer the async Popper#update method
|
|
1247
1247
|
forceUpdate: function() {
|
|
1248
1248
|
if (!m) {
|
|
1249
|
-
var
|
|
1250
|
-
if (an(w,
|
|
1251
|
-
|
|
1252
|
-
reference: Ys(w, Dt(
|
|
1253
|
-
popper: Er(
|
|
1254
|
-
},
|
|
1255
|
-
return
|
|
1249
|
+
var M = c.elements, w = M.reference, _ = M.popper;
|
|
1250
|
+
if (an(w, _)) {
|
|
1251
|
+
c.rects = {
|
|
1252
|
+
reference: Ys(w, Dt(_), c.options.strategy === "fixed"),
|
|
1253
|
+
popper: Er(_)
|
|
1254
|
+
}, c.reset = !1, c.placement = c.options.placement, c.orderedModifiers.forEach(function(H) {
|
|
1255
|
+
return c.modifiersData[H.name] = Object.assign({}, H.data);
|
|
1256
1256
|
});
|
|
1257
|
-
for (var
|
|
1258
|
-
if (
|
|
1259
|
-
|
|
1257
|
+
for (var O = 0; O < c.orderedModifiers.length; O++) {
|
|
1258
|
+
if (c.reset === !0) {
|
|
1259
|
+
c.reset = !1, O = -1;
|
|
1260
1260
|
continue;
|
|
1261
1261
|
}
|
|
1262
|
-
var
|
|
1263
|
-
typeof
|
|
1264
|
-
state:
|
|
1262
|
+
var L = c.orderedModifiers[O], A = L.fn, k = L.options, $ = k === void 0 ? {} : k, j = L.name;
|
|
1263
|
+
typeof A == "function" && (c = A({
|
|
1264
|
+
state: c,
|
|
1265
1265
|
options: $,
|
|
1266
1266
|
name: j,
|
|
1267
1267
|
instance: v
|
|
1268
|
-
}) ||
|
|
1268
|
+
}) || c);
|
|
1269
1269
|
}
|
|
1270
1270
|
}
|
|
1271
1271
|
}
|
|
@@ -1273,37 +1273,37 @@ function eo(e) {
|
|
|
1273
1273
|
// Async and optimistically optimized update – it will not be executed if
|
|
1274
1274
|
// not necessary (debounced to run at most once-per-tick)
|
|
1275
1275
|
update: Js(function() {
|
|
1276
|
-
return new Promise(function(
|
|
1277
|
-
v.forceUpdate(),
|
|
1276
|
+
return new Promise(function(y) {
|
|
1277
|
+
v.forceUpdate(), y(c);
|
|
1278
1278
|
});
|
|
1279
1279
|
}),
|
|
1280
1280
|
destroy: function() {
|
|
1281
|
-
|
|
1281
|
+
b(), m = !0;
|
|
1282
1282
|
}
|
|
1283
1283
|
};
|
|
1284
1284
|
if (!an(a, l))
|
|
1285
1285
|
return v;
|
|
1286
|
-
v.setOptions(f).then(function(
|
|
1287
|
-
!m && f.onFirstUpdate && f.onFirstUpdate(
|
|
1286
|
+
v.setOptions(f).then(function(y) {
|
|
1287
|
+
!m && f.onFirstUpdate && f.onFirstUpdate(y);
|
|
1288
1288
|
});
|
|
1289
1289
|
function x() {
|
|
1290
|
-
|
|
1291
|
-
var
|
|
1292
|
-
if (typeof
|
|
1293
|
-
var
|
|
1294
|
-
state:
|
|
1295
|
-
name:
|
|
1290
|
+
c.orderedModifiers.forEach(function(y) {
|
|
1291
|
+
var M = y.name, w = y.options, _ = w === void 0 ? {} : w, O = y.effect;
|
|
1292
|
+
if (typeof O == "function") {
|
|
1293
|
+
var L = O({
|
|
1294
|
+
state: c,
|
|
1295
|
+
name: M,
|
|
1296
1296
|
instance: v,
|
|
1297
|
-
options:
|
|
1298
|
-
}),
|
|
1297
|
+
options: _
|
|
1298
|
+
}), A = function() {
|
|
1299
1299
|
};
|
|
1300
|
-
d.push(
|
|
1300
|
+
d.push(L || A);
|
|
1301
1301
|
}
|
|
1302
1302
|
});
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1305
|
-
d.forEach(function(
|
|
1306
|
-
return
|
|
1304
|
+
function b() {
|
|
1305
|
+
d.forEach(function(y) {
|
|
1306
|
+
return y();
|
|
1307
1307
|
}), d = [];
|
|
1308
1308
|
}
|
|
1309
1309
|
return v;
|
|
@@ -1374,12 +1374,12 @@ var ao = function(t, r) {
|
|
|
1374
1374
|
const lo = /* @__PURE__ */ Hn(ao);
|
|
1375
1375
|
var co = [], uo = function(t, r, n) {
|
|
1376
1376
|
n === void 0 && (n = {});
|
|
1377
|
-
var i =
|
|
1377
|
+
var i = Ge.useRef(null), s = {
|
|
1378
1378
|
onFirstUpdate: n.onFirstUpdate,
|
|
1379
1379
|
placement: n.placement || "bottom",
|
|
1380
1380
|
strategy: n.strategy || "absolute",
|
|
1381
1381
|
modifiers: n.modifiers || co
|
|
1382
|
-
}, o =
|
|
1382
|
+
}, o = Ge.useState({
|
|
1383
1383
|
styles: {
|
|
1384
1384
|
popper: {
|
|
1385
1385
|
position: s.strategy,
|
|
@@ -1391,27 +1391,27 @@ var co = [], uo = function(t, r, n) {
|
|
|
1391
1391
|
}
|
|
1392
1392
|
},
|
|
1393
1393
|
attributes: {}
|
|
1394
|
-
}), a = o[0], l = o[1], f =
|
|
1394
|
+
}), a = o[0], l = o[1], f = Ge.useMemo(function() {
|
|
1395
1395
|
return {
|
|
1396
1396
|
name: "updateState",
|
|
1397
1397
|
enabled: !0,
|
|
1398
1398
|
phase: "write",
|
|
1399
1399
|
fn: function(v) {
|
|
1400
|
-
var x = v.state,
|
|
1400
|
+
var x = v.state, b = Object.keys(x.elements);
|
|
1401
1401
|
Ti.flushSync(function() {
|
|
1402
1402
|
l({
|
|
1403
|
-
styles: Gr(
|
|
1404
|
-
return [
|
|
1403
|
+
styles: Gr(b.map(function(y) {
|
|
1404
|
+
return [y, x.styles[y] || {}];
|
|
1405
1405
|
})),
|
|
1406
|
-
attributes: Gr(
|
|
1407
|
-
return [
|
|
1406
|
+
attributes: Gr(b.map(function(y) {
|
|
1407
|
+
return [y, x.attributes[y]];
|
|
1408
1408
|
}))
|
|
1409
1409
|
});
|
|
1410
1410
|
});
|
|
1411
1411
|
},
|
|
1412
1412
|
requires: ["computeStyles"]
|
|
1413
1413
|
};
|
|
1414
|
-
}, []),
|
|
1414
|
+
}, []), c = Ge.useMemo(function() {
|
|
1415
1415
|
var m = {
|
|
1416
1416
|
onFirstUpdate: s.onFirstUpdate,
|
|
1417
1417
|
placement: s.placement,
|
|
@@ -1422,12 +1422,12 @@ var co = [], uo = function(t, r, n) {
|
|
|
1422
1422
|
}])
|
|
1423
1423
|
};
|
|
1424
1424
|
return lo(i.current, m) ? i.current || m : (i.current = m, m);
|
|
1425
|
-
}, [s.onFirstUpdate, s.placement, s.strategy, s.modifiers, f]), d =
|
|
1425
|
+
}, [s.onFirstUpdate, s.placement, s.strategy, s.modifiers, f]), d = Ge.useRef();
|
|
1426
1426
|
return Kr(function() {
|
|
1427
|
-
d.current && d.current.setOptions(
|
|
1428
|
-
}, [
|
|
1427
|
+
d.current && d.current.setOptions(c);
|
|
1428
|
+
}, [c]), Kr(function() {
|
|
1429
1429
|
if (!(t == null || r == null)) {
|
|
1430
|
-
var m = n.createPopper || ro, v = m(t, r,
|
|
1430
|
+
var m = n.createPopper || ro, v = m(t, r, c);
|
|
1431
1431
|
return d.current = v, function() {
|
|
1432
1432
|
v.destroy(), d.current = null;
|
|
1433
1433
|
};
|
|
@@ -1500,11 +1500,11 @@ function Wn({
|
|
|
1500
1500
|
style: o,
|
|
1501
1501
|
onClickOutside: a
|
|
1502
1502
|
}) {
|
|
1503
|
-
const [l, f] = oe(null), { styles:
|
|
1503
|
+
const [l, f] = oe(null), { styles: c } = uo(r, l, {
|
|
1504
1504
|
placement: n,
|
|
1505
1505
|
modifiers: [{ name: "offset", options: { offset: i } }]
|
|
1506
1506
|
});
|
|
1507
|
-
return mo([l, r], a, { enabled: e }), /* @__PURE__ */
|
|
1507
|
+
return mo([l, r], a, { enabled: e }), /* @__PURE__ */ u(ar, { mounted: e, children: /* @__PURE__ */ u("div", { ref: f, style: { ...c.popper, ...o }, className: S("bbn-popover", t), children: s }) });
|
|
1508
1508
|
}
|
|
1509
1509
|
function po(e) {
|
|
1510
1510
|
const [t, r] = oe({ width: 0, height: 0 });
|
|
@@ -1536,65 +1536,65 @@ const vo = (e) => e.label, Un = De(
|
|
|
1536
1536
|
options: a = [],
|
|
1537
1537
|
optionClassName: l,
|
|
1538
1538
|
popoverClassName: f,
|
|
1539
|
-
state:
|
|
1539
|
+
state: c = "default",
|
|
1540
1540
|
onOpen: d,
|
|
1541
1541
|
onSelect: m,
|
|
1542
1542
|
onClose: v,
|
|
1543
1543
|
renderSelectedOption: x = vo,
|
|
1544
|
-
...
|
|
1545
|
-
},
|
|
1546
|
-
const
|
|
1547
|
-
En(
|
|
1548
|
-
const { width: w } = po(
|
|
1544
|
+
...b
|
|
1545
|
+
}, y) => {
|
|
1546
|
+
const M = nt(null);
|
|
1547
|
+
En(y, () => M.current, []);
|
|
1548
|
+
const { width: w } = po(M.current), [_, O] = at({
|
|
1549
1549
|
value: s,
|
|
1550
1550
|
defaultValue: o,
|
|
1551
1551
|
onStateChange: (B) => void (B ? d == null ? void 0 : d() : v == null ? void 0 : v())
|
|
1552
|
-
}), [
|
|
1552
|
+
}), [L, A] = at({
|
|
1553
1553
|
value: r,
|
|
1554
1554
|
defaultValue: n,
|
|
1555
1555
|
onStateChange: m
|
|
1556
|
-
}), k =
|
|
1557
|
-
() => a.find((B) => B.value ===
|
|
1558
|
-
[a,
|
|
1556
|
+
}), k = We(
|
|
1557
|
+
() => a.find((B) => B.value === L),
|
|
1558
|
+
[a, L]
|
|
1559
1559
|
), $ = ae(
|
|
1560
1560
|
(B) => {
|
|
1561
|
-
|
|
1561
|
+
A(B.value), O(!1);
|
|
1562
1562
|
},
|
|
1563
|
-
[
|
|
1563
|
+
[A, O]
|
|
1564
1564
|
), j = ae(() => {
|
|
1565
|
-
|
|
1566
|
-
}, [
|
|
1567
|
-
e ||
|
|
1568
|
-
}, [
|
|
1565
|
+
O(!1);
|
|
1566
|
+
}, [O]), H = ae(() => {
|
|
1567
|
+
e || O(!_);
|
|
1568
|
+
}, [_, e, O]);
|
|
1569
1569
|
return /* @__PURE__ */ N(rt, { children: [
|
|
1570
1570
|
/* @__PURE__ */ N(
|
|
1571
1571
|
"div",
|
|
1572
1572
|
{
|
|
1573
|
-
ref:
|
|
1574
|
-
className:
|
|
1573
|
+
ref: M,
|
|
1574
|
+
className: S("bbn-select", e && "bbn-select-disabled", `bbn-select-${c}`, t),
|
|
1575
1575
|
onClick: H,
|
|
1576
1576
|
tabIndex: e ? -1 : 0,
|
|
1577
|
-
...
|
|
1577
|
+
...b,
|
|
1578
1578
|
children: [
|
|
1579
|
-
/* @__PURE__ */
|
|
1580
|
-
/* @__PURE__ */
|
|
1579
|
+
/* @__PURE__ */ u("span", { children: k ? x(k) : i }),
|
|
1580
|
+
/* @__PURE__ */ u(Yi, { className: S("bbn-select-icon", _ && "bbn-select-icon-open"), size: 20 })
|
|
1581
1581
|
]
|
|
1582
1582
|
}
|
|
1583
1583
|
),
|
|
1584
|
-
/* @__PURE__ */
|
|
1584
|
+
/* @__PURE__ */ u(
|
|
1585
1585
|
Wn,
|
|
1586
1586
|
{
|
|
1587
|
-
anchorEl:
|
|
1588
|
-
className:
|
|
1589
|
-
open:
|
|
1587
|
+
anchorEl: M.current,
|
|
1588
|
+
className: S("bbn-select-menu custom-scrollbar", f),
|
|
1589
|
+
open: _ && !e,
|
|
1590
1590
|
onClickOutside: j,
|
|
1591
1591
|
offset: [0, 4],
|
|
1592
1592
|
placement: "bottom-start",
|
|
1593
1593
|
style: { width: w },
|
|
1594
|
-
children: a.map((B) => /* @__PURE__ */
|
|
1594
|
+
children: a.map((B) => /* @__PURE__ */ u(
|
|
1595
1595
|
"div",
|
|
1596
1596
|
{
|
|
1597
|
-
className:
|
|
1597
|
+
className: S(
|
|
1598
1598
|
"bbn-select-option",
|
|
1599
1599
|
(k == null ? void 0 : k.value) === B.value && "bbn-select-option-selected",
|
|
1600
1600
|
l
|
|
@@ -1611,20 +1611,20 @@ const vo = (e) => e.label, Un = De(
|
|
|
1611
1611
|
);
|
|
1612
1612
|
Un.displayName = "Select";
|
|
1613
1613
|
const Vr = De(
|
|
1614
|
-
({ className: e, prefix: t, suffix: r, disabled: n = !1, state: i = "default", ...s }, o) => /* @__PURE__ */ N("div", { className:
|
|
1615
|
-
t && /* @__PURE__ */
|
|
1616
|
-
/* @__PURE__ */
|
|
1617
|
-
r && /* @__PURE__ */
|
|
1614
|
+
({ className: e, prefix: t, suffix: r, disabled: n = !1, state: i = "default", ...s }, o) => /* @__PURE__ */ N("div", { className: S("bbn-input", n && "bbn-input-disabled", `bbn-input-${i}`), children: [
|
|
1615
|
+
t && /* @__PURE__ */ u("div", { className: "bbn-input-prefix", children: t }),
|
|
1616
|
+
/* @__PURE__ */ u("input", { ref: o, className: S("bbn-input-field", e), disabled: n, ...s }),
|
|
1617
|
+
r && /* @__PURE__ */ u("div", { className: "bbn-input-suffix", children: r })
|
|
1618
1618
|
] })
|
|
1619
1619
|
);
|
|
1620
1620
|
Vr.displayName = "Input";
|
|
1621
1621
|
function lr({ children: e, label: t, hint: r, state: n = "default", className: i }) {
|
|
1622
|
-
return /* @__PURE__ */ N("div", { className:
|
|
1622
|
+
return /* @__PURE__ */ N("div", { className: S("bbn-form-control", i), children: [
|
|
1623
1623
|
t ? /* @__PURE__ */ N("label", { className: "bbn-form-control-label", children: [
|
|
1624
|
-
/* @__PURE__ */
|
|
1624
|
+
/* @__PURE__ */ u("div", { className: "bbn-form-control-title", children: t }),
|
|
1625
1625
|
e
|
|
1626
1626
|
] }) : e,
|
|
1627
|
-
r && /* @__PURE__ */
|
|
1627
|
+
r && /* @__PURE__ */ u("div", { className: S("bbn-form-control-hint", `bbn-form-control-hint-${n}`), children: r })
|
|
1628
1628
|
] });
|
|
1629
1629
|
}
|
|
1630
1630
|
const qn = sr({
|
|
@@ -1632,7 +1632,7 @@ const qn = sr({
|
|
|
1632
1632
|
updateDialog: () => null
|
|
1633
1633
|
});
|
|
1634
1634
|
function cl({ children: e }) {
|
|
1635
|
-
const [t, r] = oe({}), n =
|
|
1635
|
+
const [t, r] = oe({}), n = We(() => Object.values(t).some((a) => a), [t]);
|
|
1636
1636
|
ce(
|
|
1637
1637
|
function() {
|
|
1638
1638
|
if (n) {
|
|
@@ -1647,8 +1647,8 @@ function cl({ children: e }) {
|
|
|
1647
1647
|
r((l) => Reflect.deleteProperty(l, a) ? { ...l } : l);
|
|
1648
1648
|
}, []), s = ae((a, l) => {
|
|
1649
1649
|
r((f) => ({ ...f, [a]: l }));
|
|
1650
|
-
}, []), o =
|
|
1651
|
-
return /* @__PURE__ */
|
|
1650
|
+
}, []), o = We(() => ({ removeDialog: i, updateDialog: s }), [i, s]);
|
|
1651
|
+
return /* @__PURE__ */ u(qn.Provider, { value: o, children: e });
|
|
1652
1652
|
}
|
|
1653
1653
|
function zn({ open: e = !1 } = {}) {
|
|
1654
1654
|
const t = Sn(), [r, n] = oe(e), { updateDialog: i, removeDialog: s } = Lt(qn), o = e || r;
|
|
@@ -1670,11 +1670,11 @@ function zn({ open: e = !1 } = {}) {
|
|
|
1670
1670
|
unmount: a
|
|
1671
1671
|
};
|
|
1672
1672
|
}
|
|
1673
|
-
const Zn = ({ open: e = !1, ...t }) => /* @__PURE__ */
|
|
1673
|
+
const Zn = ({ open: e = !1, ...t }) => /* @__PURE__ */ u(
|
|
1674
1674
|
"div",
|
|
1675
1675
|
{
|
|
1676
1676
|
...t,
|
|
1677
|
-
className:
|
|
1677
|
+
className: S("bbn-backdrop", e ? "animate-backdrop-in" : "animate-backdrop-out", t.className)
|
|
1678
1678
|
}
|
|
1679
1679
|
), go = ({
|
|
1680
1680
|
children: e,
|
|
@@ -1688,15 +1688,15 @@ const Zn = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1688
1688
|
}) => {
|
|
1689
1689
|
const { mounted: l, unmount: f } = zn({ open: t });
|
|
1690
1690
|
return /* @__PURE__ */ N(ar, { mounted: l, children: [
|
|
1691
|
-
/* @__PURE__ */
|
|
1691
|
+
/* @__PURE__ */ u("div", { ...a, className: S("bbn-dialog-wrapper", r), children: /* @__PURE__ */ u(
|
|
1692
1692
|
"div",
|
|
1693
1693
|
{
|
|
1694
|
-
className:
|
|
1694
|
+
className: S("bbn-dialog", t ? "animate-modal-in" : "animate-modal-out", o),
|
|
1695
1695
|
onAnimationEnd: f,
|
|
1696
1696
|
children: e
|
|
1697
1697
|
}
|
|
1698
1698
|
) }),
|
|
1699
|
-
i && /* @__PURE__ */
|
|
1699
|
+
i && /* @__PURE__ */ u(Zn, { className: s, open: t, onClick: n })
|
|
1700
1700
|
] });
|
|
1701
1701
|
}, _r = ({
|
|
1702
1702
|
children: e,
|
|
@@ -1715,10 +1715,10 @@ const Zn = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1715
1715
|
"accent-primary": "text-accent-primary",
|
|
1716
1716
|
"accent-secondary": "text-accent-secondary"
|
|
1717
1717
|
};
|
|
1718
|
-
return /* @__PURE__ */
|
|
1718
|
+
return /* @__PURE__ */ u(
|
|
1719
1719
|
"div",
|
|
1720
1720
|
{
|
|
1721
|
-
className:
|
|
1721
|
+
className: S(
|
|
1722
1722
|
"flex items-center justify-center",
|
|
1723
1723
|
i && {
|
|
1724
1724
|
default: "bg-accent-secondary/10",
|
|
@@ -1744,33 +1744,33 @@ const Zn = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1744
1744
|
className: e = "",
|
|
1745
1745
|
size: t = 24,
|
|
1746
1746
|
variant: r = "primary"
|
|
1747
|
-
}) => /* @__PURE__ */
|
|
1747
|
+
}) => /* @__PURE__ */ u(_r, { variant: r, background: !0, rounded: !0, className: e, children: /* @__PURE__ */ u(
|
|
1748
1748
|
"svg",
|
|
1749
1749
|
{
|
|
1750
1750
|
style: { width: t, height: t * 0.545 },
|
|
1751
1751
|
viewBox: "0 0 22 12",
|
|
1752
1752
|
fill: "none",
|
|
1753
1753
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1754
|
-
children: /* @__PURE__ */
|
|
1754
|
+
children: /* @__PURE__ */ u("path", { d: "M20 4H11.65C10.83 1.67 8.61 0 6 0C2.69 0 0 2.69 0 6C0 9.31 2.69 12 6 12C8.61 12 10.83 10.33 11.65 8H12L14 10L16 8L18 10L22 5.96L20 4ZM6 9C4.35 9 3 7.65 3 6C3 4.35 4.35 3 6 3C7.65 3 9 4.35 9 6C9 7.65 7.65 9 6 9Z" })
|
|
1755
1755
|
}
|
|
1756
1756
|
) }), yo = ({
|
|
1757
1757
|
className: e = "",
|
|
1758
1758
|
size: t = 24,
|
|
1759
1759
|
variant: r = "primary"
|
|
1760
|
-
}) => /* @__PURE__ */
|
|
1760
|
+
}) => /* @__PURE__ */ u(_r, { variant: r, background: !0, rounded: !0, className: e, children: /* @__PURE__ */ u(
|
|
1761
1761
|
"svg",
|
|
1762
1762
|
{
|
|
1763
1763
|
style: { width: t, height: t },
|
|
1764
1764
|
viewBox: "0 0 20 10",
|
|
1765
1765
|
fill: "none",
|
|
1766
1766
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1767
|
-
children: /* @__PURE__ */
|
|
1767
|
+
children: /* @__PURE__ */ u("path", { d: "M15 0H11V2H15C16.65 2 18 3.35 18 5C18 6.65 16.65 8 15 8H11V10H15C17.76 10 20 7.76 20 5C20 2.24 17.76 0 15 0ZM9 8H5C3.35 8 2 6.65 2 5C2 3.35 3.35 2 5 2H9V0H5C2.24 0 0 2.24 0 5C0 7.76 2.24 10 5 10H9V8ZM6 4H14V6H6V4Z" })
|
|
1768
1768
|
}
|
|
1769
1769
|
) }), wo = ({
|
|
1770
1770
|
className: e = "",
|
|
1771
1771
|
size: t = 24,
|
|
1772
1772
|
variant: r = "primary"
|
|
1773
|
-
}) => /* @__PURE__ */
|
|
1773
|
+
}) => /* @__PURE__ */ u(_r, { variant: r, background: !0, rounded: !0, className: e, children: /* @__PURE__ */ N(
|
|
1774
1774
|
"svg",
|
|
1775
1775
|
{
|
|
1776
1776
|
style: { width: t, height: t },
|
|
@@ -1778,8 +1778,8 @@ const Zn = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1778
1778
|
fill: "none",
|
|
1779
1779
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1780
1780
|
children: [
|
|
1781
|
-
/* @__PURE__ */
|
|
1782
|
-
/* @__PURE__ */
|
|
1781
|
+
/* @__PURE__ */ u("path", { d: "M10 0C4.48 0 0 4.48 0 10C0 15.52 4.48 20 10 20C15.52 20 20 15.52 20 10C20 4.48 15.52 0 10 0ZM10 18C5.58 18 2 14.42 2 10C2 5.58 5.58 2 10 2C14.42 2 18 5.58 18 10C18 14.42 14.42 18 10 18Z" }),
|
|
1782
|
+
/* @__PURE__ */ u("path", { d: "M10 15C12.7614 15 15 12.7614 15 10C15 7.23858 12.7614 5 10 5C7.23858 5 5 7.23858 5 10C5 12.7614 7.23858 15 10 15Z" })
|
|
1783
1783
|
]
|
|
1784
1784
|
}
|
|
1785
1785
|
) }), Xn = ({
|
|
@@ -1789,15 +1789,15 @@ const Zn = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1789
1789
|
color: n
|
|
1790
1790
|
}) => {
|
|
1791
1791
|
const i = n || Gn[r];
|
|
1792
|
-
return /* @__PURE__ */
|
|
1792
|
+
return /* @__PURE__ */ u(
|
|
1793
1793
|
"svg",
|
|
1794
1794
|
{
|
|
1795
1795
|
style: { width: t, height: t * 1.143 },
|
|
1796
1796
|
viewBox: "0 0 14 16",
|
|
1797
1797
|
fill: "none",
|
|
1798
1798
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1799
|
-
className:
|
|
1800
|
-
children: /* @__PURE__ */
|
|
1799
|
+
className: S("transition-opacity duration-200", i, e),
|
|
1800
|
+
children: /* @__PURE__ */ u(
|
|
1801
1801
|
"path",
|
|
1802
1802
|
{
|
|
1803
1803
|
d: "M9.99984 0.666626H1.99984C1.2665 0.666626 0.666504 1.26663 0.666504 1.99996V11.3333H1.99984V1.99996H9.99984V0.666626ZM11.9998 3.33329H4.6665C3.93317 3.33329 3.33317 3.93329 3.33317 4.66663V14C3.33317 14.7333 3.93317 15.3333 4.6665 15.3333H11.9998C12.7332 15.3333 13.3332 14.7333 13.3332 14V4.66663C13.3332 3.93329 12.7332 3.33329 11.9998 3.33329ZM11.9998 14H4.6665V4.66663H11.9998V14Z",
|
|
@@ -1813,15 +1813,15 @@ const Zn = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1813
1813
|
color: n
|
|
1814
1814
|
}) => {
|
|
1815
1815
|
const i = n || Gn[r];
|
|
1816
|
-
return /* @__PURE__ */
|
|
1816
|
+
return /* @__PURE__ */ u(
|
|
1817
1817
|
"svg",
|
|
1818
1818
|
{
|
|
1819
1819
|
style: { width: t, height: t },
|
|
1820
1820
|
viewBox: "0 0 14 14",
|
|
1821
1821
|
fill: "none",
|
|
1822
1822
|
xmlns: "http://www.w3.org/2000/svg",
|
|
1823
|
-
className:
|
|
1824
|
-
children: /* @__PURE__ */
|
|
1823
|
+
className: S("transition-opacity duration-200", i, e),
|
|
1824
|
+
children: /* @__PURE__ */ u(
|
|
1825
1825
|
"path",
|
|
1826
1826
|
{
|
|
1827
1827
|
d: "M14 1.41L12.59 0L7 5.59L1.41 0L0 1.41L5.59 7L0 12.59L1.41 14L7 8.41L12.59 14L14 12.59L8.41 7L14 1.41Z",
|
|
@@ -1845,32 +1845,32 @@ const Zn = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1845
1845
|
"div",
|
|
1846
1846
|
{
|
|
1847
1847
|
...i,
|
|
1848
|
-
className:
|
|
1848
|
+
className: S(
|
|
1849
1849
|
"bbn-dialog-mobile",
|
|
1850
1850
|
t ? "animate-mobile-modal-in" : "animate-mobile-modal-out",
|
|
1851
1851
|
r
|
|
1852
1852
|
),
|
|
1853
1853
|
onAnimationEnd: o,
|
|
1854
1854
|
children: [
|
|
1855
|
-
n && /* @__PURE__ */
|
|
1855
|
+
n && /* @__PURE__ */ u(
|
|
1856
1856
|
"button",
|
|
1857
1857
|
{
|
|
1858
1858
|
onClick: n,
|
|
1859
1859
|
className: "absolute top-4 left-4 z-10 p-1.5 rounded-full bg-surface-tertiary hover:bg-surface-quaternary transition-colors",
|
|
1860
1860
|
"aria-label": "Close",
|
|
1861
|
-
children: /* @__PURE__ */
|
|
1861
|
+
children: /* @__PURE__ */ u(Yn, { size: 14, variant: "accent-primary" })
|
|
1862
1862
|
}
|
|
1863
1863
|
),
|
|
1864
1864
|
e
|
|
1865
1865
|
]
|
|
1866
1866
|
}
|
|
1867
1867
|
),
|
|
1868
|
-
/* @__PURE__ */
|
|
1868
|
+
/* @__PURE__ */ u(Zn, { open: t, onClick: n })
|
|
1869
1869
|
] });
|
|
1870
|
-
}, xo = ({ className: e, children: t, title: r, onClose: n }) => /* @__PURE__ */ N("div", { className:
|
|
1870
|
+
}, xo = ({ className: e, children: t, title: r, onClose: n }) => /* @__PURE__ */ N("div", { className: S("bbn-dialog-header", e), children: [
|
|
1871
1871
|
/* @__PURE__ */ N("div", { className: "bbn-dialog-title", children: [
|
|
1872
|
-
/* @__PURE__ */
|
|
1873
|
-
!!n && /* @__PURE__ */
|
|
1872
|
+
/* @__PURE__ */ u(Cr, { variant: "h5", children: r }),
|
|
1873
|
+
!!n && /* @__PURE__ */ u(An, { className: "shrink-0", onClick: n, children: /* @__PURE__ */ u("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ u(
|
|
1874
1874
|
"path",
|
|
1875
1875
|
{
|
|
1876
1876
|
d: "M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z",
|
|
@@ -1879,62 +1879,62 @@ const Zn = ({ open: e = !1, ...t }) => /* @__PURE__ */ c(
|
|
|
1879
1879
|
) }) })
|
|
1880
1880
|
] }),
|
|
1881
1881
|
t
|
|
1882
|
-
] }), No = (e) => /* @__PURE__ */
|
|
1882
|
+
] }), No = (e) => /* @__PURE__ */ u("div", { ...e, className: S("bbn-dialog-body", e.className) }), Co = (e) => /* @__PURE__ */ u("div", { ...e, className: S("bbn-dialog-footer", e.className) });
|
|
1883
1883
|
function ul({ className: e, ...t }) {
|
|
1884
|
-
return /* @__PURE__ */
|
|
1884
|
+
return /* @__PURE__ */ u("span", { ...t, className: S("bbn-chip", e) });
|
|
1885
1885
|
}
|
|
1886
1886
|
function fl({ size: e = 40, className: t }) {
|
|
1887
|
-
return /* @__PURE__ */
|
|
1887
|
+
return /* @__PURE__ */ u("span", { className: be("bbn-loader text-current", t), style: { width: e, height: e }, children: /* @__PURE__ */ u("svg", { viewBox: "22 22 44 44", children: /* @__PURE__ */ u("circle", { cx: "44", cy: "44", r: "20.2", fill: "none", stroke: "currentColor", strokeWidth: "3.6" }) }) });
|
|
1888
1888
|
}
|
|
1889
1889
|
var Jn = "Expected a function", ln = NaN, ko = "[object Symbol]", Oo = /^\s+|\s+$/g, Eo = /^[-+]0x[0-9a-f]+$/i, So = /^0b[01]+$/i, Ao = /^0o[0-7]+$/i, Fo = parseInt, Lo = typeof Ut == "object" && Ut && Ut.Object === Object && Ut, Vo = typeof self == "object" && self && self.Object === Object && self, _o = Lo || Vo || Function("return this")(), Do = Object.prototype, To = Do.toString, Mo = Math.max, Po = Math.min, dr = function() {
|
|
1890
1890
|
return _o.Date.now();
|
|
1891
1891
|
};
|
|
1892
1892
|
function Bo(e, t, r) {
|
|
1893
|
-
var n, i, s, o, a, l, f = 0,
|
|
1893
|
+
var n, i, s, o, a, l, f = 0, c = !1, d = !1, m = !0;
|
|
1894
1894
|
if (typeof e != "function")
|
|
1895
1895
|
throw new TypeError(Jn);
|
|
1896
|
-
t = cn(t) || 0, Qt(r) && (
|
|
1897
|
-
function v(
|
|
1896
|
+
t = cn(t) || 0, Qt(r) && (c = !!r.leading, d = "maxWait" in r, s = d ? Mo(cn(r.maxWait) || 0, t) : s, m = "trailing" in r ? !!r.trailing : m);
|
|
1897
|
+
function v(A) {
|
|
1898
1898
|
var k = n, $ = i;
|
|
1899
|
-
return n = i = void 0, f =
|
|
1899
|
+
return n = i = void 0, f = A, o = e.apply($, k), o;
|
|
1900
1900
|
}
|
|
1901
|
-
function x(
|
|
1902
|
-
return f =
|
|
1901
|
+
function x(A) {
|
|
1902
|
+
return f = A, a = setTimeout(M, t), c ? v(A) : o;
|
|
1903
1903
|
}
|
|
1904
|
-
function
|
|
1905
|
-
var k =
|
|
1904
|
+
function b(A) {
|
|
1905
|
+
var k = A - l, $ = A - f, j = t - k;
|
|
1906
1906
|
return d ? Po(j, s - $) : j;
|
|
1907
1907
|
}
|
|
1908
|
-
function
|
|
1909
|
-
var k =
|
|
1908
|
+
function y(A) {
|
|
1909
|
+
var k = A - l, $ = A - f;
|
|
1910
1910
|
return l === void 0 || k >= t || k < 0 || d && $ >= s;
|
|
1911
1911
|
}
|
|
1912
|
-
function
|
|
1913
|
-
var
|
|
1914
|
-
if (
|
|
1915
|
-
return w(
|
|
1916
|
-
a = setTimeout(
|
|
1912
|
+
function M() {
|
|
1913
|
+
var A = dr();
|
|
1914
|
+
if (y(A))
|
|
1915
|
+
return w(A);
|
|
1916
|
+
a = setTimeout(M, b(A));
|
|
1917
1917
|
}
|
|
1918
|
-
function w(
|
|
1919
|
-
return a = void 0, m && n ? v(
|
|
1918
|
+
function w(A) {
|
|
1919
|
+
return a = void 0, m && n ? v(A) : (n = i = void 0, o);
|
|
1920
1920
|
}
|
|
1921
|
-
function
|
|
1921
|
+
function _() {
|
|
1922
1922
|
a !== void 0 && clearTimeout(a), f = 0, n = l = i = a = void 0;
|
|
1923
1923
|
}
|
|
1924
|
-
function
|
|
1924
|
+
function O() {
|
|
1925
1925
|
return a === void 0 ? o : w(dr());
|
|
1926
1926
|
}
|
|
1927
|
-
function
|
|
1928
|
-
var
|
|
1929
|
-
if (n = arguments, i = this, l =
|
|
1927
|
+
function L() {
|
|
1928
|
+
var A = dr(), k = y(A);
|
|
1929
|
+
if (n = arguments, i = this, l = A, k) {
|
|
1930
1930
|
if (a === void 0)
|
|
1931
1931
|
return x(l);
|
|
1932
1932
|
if (d)
|
|
1933
|
-
return a = setTimeout(
|
|
1933
|
+
return a = setTimeout(M, t), v(l);
|
|
1934
1934
|
}
|
|
1935
|
-
return a === void 0 && (a = setTimeout(
|
|
1935
|
+
return a === void 0 && (a = setTimeout(M, t)), o;
|
|
1936
1936
|
}
|
|
1937
|
-
return
|
|
1937
|
+
return L.cancel = _, L.flush = O, L;
|
|
1938
1938
|
}
|
|
1939
1939
|
function Ro(e, t, r) {
|
|
1940
1940
|
var n = !0, i = !0;
|
|
@@ -2001,36 +2001,36 @@ function Wo({
|
|
|
2001
2001
|
...i
|
|
2002
2002
|
}) {
|
|
2003
2003
|
const { columns: s, sortStates: o, onColumnSort: a } = Lt(ei), l = o[e ?? ""], f = l == null ? void 0 : l.direction;
|
|
2004
|
-
return /* @__PURE__ */
|
|
2004
|
+
return /* @__PURE__ */ u(
|
|
2005
2005
|
W,
|
|
2006
2006
|
{
|
|
2007
2007
|
variant: "caption",
|
|
2008
2008
|
as: "th",
|
|
2009
|
-
className:
|
|
2009
|
+
className: S("bbn-cell-left", n && "bbn-table-sortable", t),
|
|
2010
2010
|
onClick: () => {
|
|
2011
2011
|
if (n && e) {
|
|
2012
|
-
const
|
|
2013
|
-
a == null || a(e,
|
|
2012
|
+
const c = s.find((d) => d.key === e);
|
|
2013
|
+
a == null || a(e, c == null ? void 0 : c.sorter);
|
|
2014
2014
|
}
|
|
2015
2015
|
},
|
|
2016
2016
|
"data-column": e,
|
|
2017
2017
|
...i,
|
|
2018
2018
|
children: /* @__PURE__ */ N("div", { className: "flex items-center justify-between gap-1", children: [
|
|
2019
|
-
/* @__PURE__ */
|
|
2019
|
+
/* @__PURE__ */ u("span", { children: r }),
|
|
2020
2020
|
n && /* @__PURE__ */ N("span", { className: "bbn-table-sort-icons", children: [
|
|
2021
|
-
/* @__PURE__ */
|
|
2021
|
+
/* @__PURE__ */ u(
|
|
2022
2022
|
Gi,
|
|
2023
2023
|
{
|
|
2024
|
-
className:
|
|
2024
|
+
className: S(
|
|
2025
2025
|
"bbn-sort-icon bbn-sort-icon-up",
|
|
2026
2026
|
f === "asc" ? "bbn-sort-icon-active" : "bbn-sort-icon-inactive"
|
|
2027
2027
|
)
|
|
2028
2028
|
}
|
|
2029
2029
|
),
|
|
2030
|
-
/* @__PURE__ */
|
|
2030
|
+
/* @__PURE__ */ u(
|
|
2031
2031
|
Xi,
|
|
2032
2032
|
{
|
|
2033
|
-
className:
|
|
2033
|
+
className: S(
|
|
2034
2034
|
"bbn-sort-icon bbn-sort-icon-down",
|
|
2035
2035
|
f === "desc" ? "bbn-sort-icon-active" : "bbn-sort-icon-inactive"
|
|
2036
2036
|
)
|
|
@@ -2045,8 +2045,8 @@ function Uo(e, t) {
|
|
|
2045
2045
|
const [r, n] = oe({}), i = ae((o, a) => {
|
|
2046
2046
|
a && n((l) => {
|
|
2047
2047
|
var m;
|
|
2048
|
-
const f = ((m = l[o]) == null ? void 0 : m.direction) ?? null,
|
|
2049
|
-
if (
|
|
2048
|
+
const f = ((m = l[o]) == null ? void 0 : m.direction) ?? null, c = f === null ? "asc" : f === "asc" ? "desc" : null;
|
|
2049
|
+
if (c === null)
|
|
2050
2050
|
return Object.fromEntries(
|
|
2051
2051
|
Object.entries(l).filter(([v]) => v !== o).map(([v, x]) => [
|
|
2052
2052
|
v,
|
|
@@ -2056,18 +2056,18 @@ function Uo(e, t) {
|
|
|
2056
2056
|
const d = Math.max(0, ...Object.values(l).map((v) => v.priority));
|
|
2057
2057
|
return {
|
|
2058
2058
|
...l,
|
|
2059
|
-
[o]: { direction:
|
|
2059
|
+
[o]: { direction: c, priority: d + 1 }
|
|
2060
2060
|
};
|
|
2061
2061
|
});
|
|
2062
|
-
}, []), s =
|
|
2062
|
+
}, []), s = We(() => {
|
|
2063
2063
|
const o = Object.entries(r).filter(([, a]) => a.direction !== null).toSorted((a, l) => l[1].priority - a[1].priority).map(([a, l]) => ({
|
|
2064
2064
|
column: t.find((f) => f.key === a),
|
|
2065
2065
|
direction: l.direction
|
|
2066
2066
|
})).filter(({ column: a }) => a == null ? void 0 : a.sorter);
|
|
2067
2067
|
return o.length === 0 ? e : e.toSorted((a, l) => {
|
|
2068
|
-
for (const { column: f, direction:
|
|
2068
|
+
for (const { column: f, direction: c } of o) {
|
|
2069
2069
|
const d = f.sorter(a, l);
|
|
2070
|
-
if (d !== 0) return
|
|
2070
|
+
if (d !== 0) return c === "asc" ? d : -d;
|
|
2071
2071
|
}
|
|
2072
2072
|
return 0;
|
|
2073
2073
|
});
|
|
@@ -2081,12 +2081,12 @@ function qo({
|
|
|
2081
2081
|
columnName: n,
|
|
2082
2082
|
...i
|
|
2083
2083
|
}) {
|
|
2084
|
-
return /* @__PURE__ */
|
|
2084
|
+
return /* @__PURE__ */ u(
|
|
2085
2085
|
W,
|
|
2086
2086
|
{
|
|
2087
2087
|
variant: "body2",
|
|
2088
2088
|
as: "td",
|
|
2089
|
-
className:
|
|
2089
|
+
className: S("bbn-cell-left", e),
|
|
2090
2090
|
"data-column": n,
|
|
2091
2091
|
...i,
|
|
2092
2092
|
children: t ? t(r) : r
|
|
@@ -2100,16 +2100,16 @@ function zo({
|
|
|
2100
2100
|
isSelectable: n,
|
|
2101
2101
|
onSelect: i
|
|
2102
2102
|
}) {
|
|
2103
|
-
return /* @__PURE__ */
|
|
2103
|
+
return /* @__PURE__ */ u(
|
|
2104
2104
|
"tr",
|
|
2105
2105
|
{
|
|
2106
|
-
className:
|
|
2106
|
+
className: S(
|
|
2107
2107
|
r && "selected",
|
|
2108
2108
|
!!i && n && "cursor-pointer",
|
|
2109
2109
|
!n && "opacity-50"
|
|
2110
2110
|
),
|
|
2111
2111
|
onClick: () => i(e),
|
|
2112
|
-
children: t.map((s) => /* @__PURE__ */
|
|
2112
|
+
children: t.map((s) => /* @__PURE__ */ u(
|
|
2113
2113
|
qo,
|
|
2114
2114
|
{
|
|
2115
2115
|
value: e[s.key],
|
|
@@ -2133,43 +2133,43 @@ function Zo({
|
|
|
2133
2133
|
onRowSelect: a,
|
|
2134
2134
|
isRowSelectable: l,
|
|
2135
2135
|
selectedRow: f,
|
|
2136
|
-
defaultSelectedRow:
|
|
2136
|
+
defaultSelectedRow: c,
|
|
2137
2137
|
onSelectedRowChange: d,
|
|
2138
2138
|
...m
|
|
2139
2139
|
}, v) {
|
|
2140
2140
|
const x = nt(null);
|
|
2141
2141
|
En(v, () => x.current, []);
|
|
2142
|
-
const { sortStates:
|
|
2142
|
+
const { sortStates: b, handleColumnSort: y, sortedData: M } = Uo(e, t), { isScrolledTop: w } = Ho(x, { onLoadMore: o, hasMore: i, loading: s }), [_, O] = at({
|
|
2143
2143
|
value: f,
|
|
2144
|
-
defaultValue:
|
|
2144
|
+
defaultValue: c ?? null,
|
|
2145
2145
|
onStateChange: d
|
|
2146
|
-
}),
|
|
2146
|
+
}), L = ae(
|
|
2147
2147
|
(k) => {
|
|
2148
2148
|
if (!a || l && !l(k)) return;
|
|
2149
|
-
const $ =
|
|
2150
|
-
|
|
2149
|
+
const $ = _ === k.id ? null : k.id;
|
|
2150
|
+
O($), a($ === null ? null : k);
|
|
2151
2151
|
},
|
|
2152
|
-
[a, l,
|
|
2153
|
-
),
|
|
2152
|
+
[a, l, _, O]
|
|
2153
|
+
), A = We(
|
|
2154
2154
|
() => ({
|
|
2155
|
-
data:
|
|
2155
|
+
data: M,
|
|
2156
2156
|
columns: t,
|
|
2157
|
-
sortStates:
|
|
2158
|
-
onColumnSort:
|
|
2159
|
-
onRowSelect:
|
|
2157
|
+
sortStates: b,
|
|
2158
|
+
onColumnSort: y,
|
|
2159
|
+
onRowSelect: L
|
|
2160
2160
|
}),
|
|
2161
|
-
[
|
|
2161
|
+
[M, t, b, y, L]
|
|
2162
2162
|
);
|
|
2163
|
-
return /* @__PURE__ */
|
|
2164
|
-
/* @__PURE__ */
|
|
2165
|
-
/* @__PURE__ */
|
|
2163
|
+
return /* @__PURE__ */ u(ei.Provider, { value: A, children: /* @__PURE__ */ u("div", { ref: x, className: S("bbn-table-wrapper", n), children: /* @__PURE__ */ N("table", { className: S("bbn-table", r), ...m, children: [
|
|
2164
|
+
/* @__PURE__ */ u("thead", { className: S("bbn-table-header", w && "scrolled-top"), children: /* @__PURE__ */ u("tr", { children: t.map((k) => /* @__PURE__ */ u(Wo, { className: k.headerClassName, name: k.key, sorter: k.sorter, children: k.header }, k.key)) }) }),
|
|
2165
|
+
/* @__PURE__ */ u("tbody", { className: "bbn-table-body", children: M.map((k) => /* @__PURE__ */ u(
|
|
2166
2166
|
zo,
|
|
2167
2167
|
{
|
|
2168
2168
|
row: k,
|
|
2169
2169
|
columns: t,
|
|
2170
|
-
isSelected:
|
|
2170
|
+
isSelected: _ === k.id,
|
|
2171
2171
|
isSelectable: l ? l(k) : !0,
|
|
2172
|
-
onSelect:
|
|
2172
|
+
onSelect: L
|
|
2173
2173
|
},
|
|
2174
2174
|
k.id
|
|
2175
2175
|
)) })
|
|
@@ -2177,7 +2177,7 @@ function Zo({
|
|
|
2177
2177
|
}
|
|
2178
2178
|
const dl = De(Zo);
|
|
2179
2179
|
function Xo({ as: e = "div", className: t, children: r }) {
|
|
2180
|
-
return br(e, { className:
|
|
2180
|
+
return br(e, { className: S("bbn-card", t) }, r);
|
|
2181
2181
|
}
|
|
2182
2182
|
function hl(e) {
|
|
2183
2183
|
const [t = !1, r] = at({
|
|
@@ -2186,9 +2186,9 @@ function hl(e) {
|
|
|
2186
2186
|
onStateChange: e.onChange
|
|
2187
2187
|
});
|
|
2188
2188
|
return /* @__PURE__ */ N("div", { className: "bbn-toggle", onClick: () => void r(!t), children: [
|
|
2189
|
-
/* @__PURE__ */
|
|
2190
|
-
/* @__PURE__ */
|
|
2191
|
-
/* @__PURE__ */
|
|
2189
|
+
/* @__PURE__ */ u("span", { className: "bbn-toggle-bg", children: e.activeIcon }),
|
|
2190
|
+
/* @__PURE__ */ u("span", { className: S("bbn-toggle-control", t && "bbn-toggle-control-active") }),
|
|
2191
|
+
/* @__PURE__ */ u("span", { className: "bbn-toggle-bg", children: e.inactiveIcon })
|
|
2192
2192
|
] });
|
|
2193
2193
|
}
|
|
2194
2194
|
const Yo = {
|
|
@@ -2197,7 +2197,7 @@ const Yo = {
|
|
|
2197
2197
|
vertical: "horizontal"
|
|
2198
2198
|
};
|
|
2199
2199
|
function ml({ className: e, orientation: t = "vertical", children: r }) {
|
|
2200
|
-
return /* @__PURE__ */
|
|
2200
|
+
return /* @__PURE__ */ u("div", { className: be("bbn-list", `bbn-list-${t}`, e), children: Xt.map(
|
|
2201
2201
|
r,
|
|
2202
2202
|
(n) => wr(n) ? yr(n, {
|
|
2203
2203
|
orientation: Yo[t]
|
|
@@ -2205,17 +2205,17 @@ function ml({ className: e, orientation: t = "vertical", children: r }) {
|
|
|
2205
2205
|
) });
|
|
2206
2206
|
}
|
|
2207
2207
|
function pl({ className: e, orientation: t = "horizontal", title: r, value: n, suffix: i }) {
|
|
2208
|
-
return /* @__PURE__ */ N("div", { className:
|
|
2209
|
-
/* @__PURE__ */
|
|
2208
|
+
return /* @__PURE__ */ N("div", { className: S("bbn-list-item", `bbn-list-item-${t}`, e), children: [
|
|
2209
|
+
/* @__PURE__ */ u(
|
|
2210
2210
|
W,
|
|
2211
2211
|
{
|
|
2212
2212
|
as: "div",
|
|
2213
|
-
className:
|
|
2213
|
+
className: S("bbn-list-title", `bbn-list-title-${t}`),
|
|
2214
2214
|
variant: t === "horizontal" ? "body1" : "body2",
|
|
2215
2215
|
children: r
|
|
2216
2216
|
}
|
|
2217
2217
|
),
|
|
2218
|
-
/* @__PURE__ */ N(W, { as: "div", className:
|
|
2218
|
+
/* @__PURE__ */ N(W, { as: "div", className: S("bbn-list-value", `bbn-list-value-${t}`), variant: "body1", children: [
|
|
2219
2219
|
n,
|
|
2220
2220
|
i
|
|
2221
2221
|
] })
|
|
@@ -2231,17 +2231,17 @@ function vl({
|
|
|
2231
2231
|
badgeClassName: o,
|
|
2232
2232
|
contentClassName: a
|
|
2233
2233
|
}) {
|
|
2234
|
-
const l = typeof t == "number" ? t > 0 : t != null, f = typeof t == "number" && t > r ? `${r}+` : t,
|
|
2235
|
-
return /* @__PURE__ */ N("div", { className:
|
|
2234
|
+
const l = typeof t == "number" ? t > 0 : t != null, f = typeof t == "number" && t > r ? `${r}+` : t, c = `bbn-badge-${n}`, d = `bbn-badge-${i}`;
|
|
2235
|
+
return /* @__PURE__ */ N("div", { className: S("bbn-badge", s), children: [
|
|
2236
2236
|
e,
|
|
2237
|
-
l && /* @__PURE__ */
|
|
2237
|
+
l && /* @__PURE__ */ u("span", { className: S("bbn-badge-indicator", c, d, o), children: /* @__PURE__ */ u("span", { className: S("bbn-badge-content", a), children: f }) })
|
|
2238
2238
|
] });
|
|
2239
2239
|
}
|
|
2240
2240
|
const Dr = ({
|
|
2241
2241
|
children: e,
|
|
2242
2242
|
style: t,
|
|
2243
2243
|
className: r
|
|
2244
|
-
}) => /* @__PURE__ */
|
|
2244
|
+
}) => /* @__PURE__ */ u("div", { className: S("flex rounded bg-secondary-highlight p-4 text-accent-primary", r), style: t, children: e });
|
|
2245
2245
|
function Go(e) {
|
|
2246
2246
|
return Vt({ attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M482 152h60q8 0 8 8v704q0 8-8 8h-60q-8 0-8-8V160q0-8 8-8Z" }, child: [] }, { tag: "path", attr: { d: "M192 474h672q8 0 8 8v60q0 8-8 8H160q-8 0-8-8v-60q0-8 8-8Z" }, child: [] }] })(e);
|
|
2247
2247
|
}
|
|
@@ -2250,7 +2250,7 @@ function Ko({ counter: e, max: t, onAdd: r, alwaysShowCounter: n = !1 }) {
|
|
|
2250
2250
|
return /* @__PURE__ */ N(
|
|
2251
2251
|
"div",
|
|
2252
2252
|
{
|
|
2253
|
-
className:
|
|
2253
|
+
className: S(
|
|
2254
2254
|
"bg-primary-highlight flex overflow-hidden rounded-md border border-accent-primary w-fit",
|
|
2255
2255
|
i && "cursor-pointer",
|
|
2256
2256
|
!s && !i && "hidden",
|
|
@@ -2258,8 +2258,8 @@ function Ko({ counter: e, max: t, onAdd: r, alwaysShowCounter: n = !1 }) {
|
|
|
2258
2258
|
),
|
|
2259
2259
|
onClick: i ? r : void 0,
|
|
2260
2260
|
children: [
|
|
2261
|
-
i && /* @__PURE__ */
|
|
2262
|
-
s && /* @__PURE__ */ N("div", { className:
|
|
2261
|
+
i && /* @__PURE__ */ u("div", { className: "flex h-10 w-10 items-center justify-center", children: /* @__PURE__ */ u(Go, { size: 20 }) }),
|
|
2262
|
+
s && /* @__PURE__ */ N("div", { className: S(
|
|
2263
2263
|
"flex h-10 items-center px-2 text-sm sm:px-4 sm:text-base",
|
|
2264
2264
|
i && "border-l border-accent-primary"
|
|
2265
2265
|
), children: [
|
|
@@ -2271,7 +2271,7 @@ function Ko({ counter: e, max: t, onAdd: r, alwaysShowCounter: n = !1 }) {
|
|
|
2271
2271
|
}
|
|
2272
2272
|
);
|
|
2273
2273
|
}
|
|
2274
|
-
const ti = sr(void 0), ri = () => Lt(ti), Jo = ({ children: e, value: t }) => /* @__PURE__ */
|
|
2274
|
+
const ti = sr(void 0), ri = () => Lt(ti), Jo = ({ children: e, value: t }) => /* @__PURE__ */ u(ti.Provider, { value: t, children: e }), ni = ({
|
|
2275
2275
|
isOpen: e,
|
|
2276
2276
|
onClose: t,
|
|
2277
2277
|
title: r,
|
|
@@ -2282,7 +2282,7 @@ const ti = sr(void 0), ri = () => Lt(ti), Jo = ({ children: e, value: t }) => /*
|
|
|
2282
2282
|
fullHeight: a = !1,
|
|
2283
2283
|
fullWidth: l = !1,
|
|
2284
2284
|
showBackButton: f = !0,
|
|
2285
|
-
showDivider:
|
|
2285
|
+
showDivider: c = !0,
|
|
2286
2286
|
onBackdropClick: d
|
|
2287
2287
|
}) => {
|
|
2288
2288
|
const m = {
|
|
@@ -2292,18 +2292,18 @@ const ti = sr(void 0), ri = () => Lt(ti), Jo = ({ children: e, value: t }) => /*
|
|
|
2292
2292
|
}, v = () => f || r ? /* @__PURE__ */ N(
|
|
2293
2293
|
"div",
|
|
2294
2294
|
{
|
|
2295
|
-
className:
|
|
2295
|
+
className: S(
|
|
2296
2296
|
"flex items-center p-4",
|
|
2297
|
-
|
|
2297
|
+
c && "border-b border-[#38708533] dark:border-[#404040]"
|
|
2298
2298
|
),
|
|
2299
2299
|
children: [
|
|
2300
|
-
f && /* @__PURE__ */
|
|
2300
|
+
f && /* @__PURE__ */ u(
|
|
2301
2301
|
"button",
|
|
2302
2302
|
{
|
|
2303
2303
|
onClick: t,
|
|
2304
2304
|
className: "flex h-8 w-8 flex-shrink-0 items-center justify-center rounded transition-colors hover:bg-accent-secondary/10",
|
|
2305
2305
|
"aria-label": "Go back",
|
|
2306
|
-
children: o || /* @__PURE__ */
|
|
2306
|
+
children: o || /* @__PURE__ */ u(
|
|
2307
2307
|
"svg",
|
|
2308
2308
|
{
|
|
2309
2309
|
width: "16",
|
|
@@ -2312,7 +2312,7 @@ const ti = sr(void 0), ri = () => Lt(ti), Jo = ({ children: e, value: t }) => /*
|
|
|
2312
2312
|
fill: "none",
|
|
2313
2313
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2314
2314
|
className: "text-accent-primary",
|
|
2315
|
-
children: /* @__PURE__ */
|
|
2315
|
+
children: /* @__PURE__ */ u(
|
|
2316
2316
|
"path",
|
|
2317
2317
|
{
|
|
2318
2318
|
d: "M10 12L6 8L10 4",
|
|
@@ -2326,10 +2326,10 @@ const ti = sr(void 0), ri = () => Lt(ti), Jo = ({ children: e, value: t }) => /*
|
|
|
2326
2326
|
)
|
|
2327
2327
|
}
|
|
2328
2328
|
),
|
|
2329
|
-
r && /* @__PURE__ */
|
|
2329
|
+
r && /* @__PURE__ */ u(
|
|
2330
2330
|
"h3",
|
|
2331
2331
|
{
|
|
2332
|
-
className:
|
|
2332
|
+
className: S(
|
|
2333
2333
|
"flex-1 text-sm font-medium text-accent-primary",
|
|
2334
2334
|
f ? "ml-3" : "",
|
|
2335
2335
|
m[s]
|
|
@@ -2341,23 +2341,23 @@ const ti = sr(void 0), ri = () => Lt(ti), Jo = ({ children: e, value: t }) => /*
|
|
|
2341
2341
|
}
|
|
2342
2342
|
) : null, x = () => /* @__PURE__ */ N(rt, { children: [
|
|
2343
2343
|
v(),
|
|
2344
|
-
/* @__PURE__ */
|
|
2344
|
+
/* @__PURE__ */ u("div", { className: "flex-1 overflow-y-auto", children: n })
|
|
2345
2345
|
] });
|
|
2346
2346
|
return a ? /* @__PURE__ */ N(ar, { mounted: !0, rootClassName: "menu-drawer-portal", children: [
|
|
2347
|
-
d && /* @__PURE__ */
|
|
2347
|
+
d && /* @__PURE__ */ u(
|
|
2348
2348
|
"div",
|
|
2349
2349
|
{
|
|
2350
|
-
className:
|
|
2350
|
+
className: S(
|
|
2351
2351
|
"fixed inset-0 z-40 bg-black/50 transition-opacity duration-300",
|
|
2352
2352
|
e ? "opacity-100" : "pointer-events-none opacity-0"
|
|
2353
2353
|
),
|
|
2354
2354
|
onClick: d
|
|
2355
2355
|
}
|
|
2356
2356
|
),
|
|
2357
|
-
/* @__PURE__ */
|
|
2357
|
+
/* @__PURE__ */ u(
|
|
2358
2358
|
"div",
|
|
2359
2359
|
{
|
|
2360
|
-
className:
|
|
2360
|
+
className: S(
|
|
2361
2361
|
"transform transition-transform duration-300 ease-in-out",
|
|
2362
2362
|
"bg-[#FFFFFF] dark:bg-[#252525]",
|
|
2363
2363
|
"fixed inset-y-0 right-0 z-50",
|
|
@@ -2368,10 +2368,10 @@ const ti = sr(void 0), ri = () => Lt(ti), Jo = ({ children: e, value: t }) => /*
|
|
|
2368
2368
|
children: x()
|
|
2369
2369
|
}
|
|
2370
2370
|
)
|
|
2371
|
-
] }) : /* @__PURE__ */
|
|
2371
|
+
] }) : /* @__PURE__ */ u(
|
|
2372
2372
|
"div",
|
|
2373
2373
|
{
|
|
2374
|
-
className:
|
|
2374
|
+
className: S(
|
|
2375
2375
|
"transform transition-transform duration-300 ease-in-out",
|
|
2376
2376
|
"bg-[#FFFFFF] dark:bg-[#252525]",
|
|
2377
2377
|
"absolute inset-0 rounded-lg",
|
|
@@ -2400,27 +2400,27 @@ const si = ({
|
|
|
2400
2400
|
className: o,
|
|
2401
2401
|
mobileMode: a = "dialog"
|
|
2402
2402
|
}) => {
|
|
2403
|
-
const [l, f] = oe(!1),
|
|
2404
|
-
r === void 0 && f(
|
|
2405
|
-
}, x = () => v(!1),
|
|
2403
|
+
const [l, f] = oe(!1), c = nt(null), d = ii(), m = r !== void 0 ? r : l, v = (M) => {
|
|
2404
|
+
r === void 0 && f(M), n == null || n(M);
|
|
2405
|
+
}, x = () => v(!1), b = /* @__PURE__ */ u("div", { className: "relative w-full overflow-hidden", children: e }), y = t || /* @__PURE__ */ u("button", { className: "rounded p-2 hover:bg-gray-100 dark:hover:bg-gray-800", onClick: () => v(!m), children: "Menu" });
|
|
2406
2406
|
return /* @__PURE__ */ N(Jo, { value: { isOpen: m, setIsOpen: v, onClose: x, isMobile: d }, children: [
|
|
2407
|
-
/* @__PURE__ */
|
|
2407
|
+
/* @__PURE__ */ u("div", { ref: c, className: "inline-block", children: R.isValidElement(y) && R.cloneElement(y, {
|
|
2408
2408
|
onClick: () => v(!m),
|
|
2409
2409
|
"aria-haspopup": "true",
|
|
2410
2410
|
"aria-expanded": m
|
|
2411
2411
|
}) }),
|
|
2412
|
-
d ? a === "dialog" ? /* @__PURE__ */
|
|
2412
|
+
d ? a === "dialog" ? /* @__PURE__ */ u(
|
|
2413
2413
|
Kn,
|
|
2414
2414
|
{
|
|
2415
2415
|
open: m,
|
|
2416
2416
|
onClose: x,
|
|
2417
|
-
className:
|
|
2417
|
+
className: S(
|
|
2418
2418
|
"relative bg-[#FFFFFF] dark:bg-[#252525] text-primary-main",
|
|
2419
2419
|
o
|
|
2420
2420
|
),
|
|
2421
|
-
children:
|
|
2421
|
+
children: b
|
|
2422
2422
|
}
|
|
2423
|
-
) : /* @__PURE__ */
|
|
2423
|
+
) : /* @__PURE__ */ u(
|
|
2424
2424
|
ni,
|
|
2425
2425
|
{
|
|
2426
2426
|
isOpen: m,
|
|
@@ -2430,22 +2430,22 @@ const si = ({
|
|
|
2430
2430
|
fullWidth: !0,
|
|
2431
2431
|
showBackButton: !0,
|
|
2432
2432
|
showDivider: !1,
|
|
2433
|
-
children:
|
|
2433
|
+
children: b
|
|
2434
2434
|
}
|
|
2435
|
-
) : /* @__PURE__ */
|
|
2435
|
+
) : /* @__PURE__ */ u(
|
|
2436
2436
|
Wn,
|
|
2437
2437
|
{
|
|
2438
|
-
anchorEl:
|
|
2438
|
+
anchorEl: c.current,
|
|
2439
2439
|
open: m,
|
|
2440
2440
|
offset: s,
|
|
2441
2441
|
placement: i,
|
|
2442
2442
|
onClickOutside: x,
|
|
2443
|
-
className:
|
|
2443
|
+
className: S(
|
|
2444
2444
|
"rounded-lg border border-[#38708533] bg-[#FFFFFF] shadow-lg dark:border-[#404040] dark:bg-[#252525]",
|
|
2445
2445
|
"min-w-[294px]",
|
|
2446
2446
|
o
|
|
2447
2447
|
),
|
|
2448
|
-
children:
|
|
2448
|
+
children: b
|
|
2449
2449
|
}
|
|
2450
2450
|
)
|
|
2451
2451
|
] });
|
|
@@ -2461,15 +2461,15 @@ const si = ({
|
|
|
2461
2461
|
selected: l = !1,
|
|
2462
2462
|
role: f = "menuitem"
|
|
2463
2463
|
}) => {
|
|
2464
|
-
const
|
|
2465
|
-
i || !n || (n(),
|
|
2464
|
+
const c = ri(), d = () => {
|
|
2465
|
+
i || !n || (n(), c && !a && c.onClose());
|
|
2466
2466
|
};
|
|
2467
|
-
return o ? /* @__PURE__ */
|
|
2467
|
+
return o ? /* @__PURE__ */ u(
|
|
2468
2468
|
"button",
|
|
2469
2469
|
{
|
|
2470
2470
|
onClick: d,
|
|
2471
2471
|
disabled: i,
|
|
2472
|
-
className:
|
|
2472
|
+
className: S("w-full text-left", i && "cursor-not-allowed opacity-50", s),
|
|
2473
2473
|
children: o
|
|
2474
2474
|
}
|
|
2475
2475
|
) : /* @__PURE__ */ N(
|
|
@@ -2477,7 +2477,7 @@ const si = ({
|
|
|
2477
2477
|
{
|
|
2478
2478
|
onClick: d,
|
|
2479
2479
|
disabled: i,
|
|
2480
|
-
className:
|
|
2480
|
+
className: S(
|
|
2481
2481
|
"flex w-full items-center justify-between p-6",
|
|
2482
2482
|
"transition-colors hover:bg-accent-secondary/5",
|
|
2483
2483
|
"text-left",
|
|
@@ -2491,10 +2491,10 @@ const si = ({
|
|
|
2491
2491
|
tabIndex: i ? -1 : 0,
|
|
2492
2492
|
children: [
|
|
2493
2493
|
/* @__PURE__ */ N("div", { className: "flex items-center gap-3", children: [
|
|
2494
|
-
e && /* @__PURE__ */
|
|
2494
|
+
e && /* @__PURE__ */ u("div", { className: "flex-shrink-0", children: e }),
|
|
2495
2495
|
/* @__PURE__ */ N("div", { className: "flex flex-col", children: [
|
|
2496
|
-
/* @__PURE__ */
|
|
2497
|
-
r && /* @__PURE__ */
|
|
2496
|
+
/* @__PURE__ */ u("div", { className: "text-sm font-medium text-accent-primary", children: t }),
|
|
2497
|
+
r && /* @__PURE__ */ u("div", { className: "text-xs text-accent-secondary", children: r })
|
|
2498
2498
|
] })
|
|
2499
2499
|
] }),
|
|
2500
2500
|
a
|
|
@@ -2512,7 +2512,7 @@ const si = ({
|
|
|
2512
2512
|
contentClassName: a,
|
|
2513
2513
|
titleAlign: l = "left"
|
|
2514
2514
|
}) => {
|
|
2515
|
-
const [f,
|
|
2515
|
+
const [f, c] = oe(!1), d = ri(), m = /* @__PURE__ */ u(
|
|
2516
2516
|
"svg",
|
|
2517
2517
|
{
|
|
2518
2518
|
width: "16",
|
|
@@ -2521,9 +2521,9 @@ const si = ({
|
|
|
2521
2521
|
fill: "none",
|
|
2522
2522
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2523
2523
|
className: "text-accent-primary",
|
|
2524
|
-
children: /* @__PURE__ */
|
|
2524
|
+
children: /* @__PURE__ */ u("path", { d: "M10 12L6 8L10 4", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
2525
2525
|
}
|
|
2526
|
-
), v = /* @__PURE__ */
|
|
2526
|
+
), v = /* @__PURE__ */ u(
|
|
2527
2527
|
"svg",
|
|
2528
2528
|
{
|
|
2529
2529
|
width: "16",
|
|
@@ -2532,15 +2532,15 @@ const si = ({
|
|
|
2532
2532
|
fill: "none",
|
|
2533
2533
|
xmlns: "http://www.w3.org/2000/svg",
|
|
2534
2534
|
className: "text-accent-primary",
|
|
2535
|
-
children: /* @__PURE__ */
|
|
2535
|
+
children: /* @__PURE__ */ u("path", { d: "M6 4L10 8L6 12", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
2536
2536
|
}
|
|
2537
2537
|
);
|
|
2538
2538
|
return /* @__PURE__ */ N(rt, { children: [
|
|
2539
2539
|
/* @__PURE__ */ N(
|
|
2540
2540
|
"button",
|
|
2541
2541
|
{
|
|
2542
|
-
onClick: () =>
|
|
2543
|
-
className:
|
|
2542
|
+
onClick: () => c(!0),
|
|
2543
|
+
className: S(
|
|
2544
2544
|
"flex w-full items-center justify-between p-6",
|
|
2545
2545
|
"transition-colors hover:bg-accent-secondary/5",
|
|
2546
2546
|
"text-left focus:outline-none",
|
|
@@ -2549,28 +2549,28 @@ const si = ({
|
|
|
2549
2549
|
role: "menuitem",
|
|
2550
2550
|
children: [
|
|
2551
2551
|
/* @__PURE__ */ N("div", { className: "flex items-center gap-3", children: [
|
|
2552
|
-
n && /* @__PURE__ */
|
|
2552
|
+
n && /* @__PURE__ */ u("div", { className: "flex-shrink-0", children: n }),
|
|
2553
2553
|
/* @__PURE__ */ N("div", { className: "flex flex-col", children: [
|
|
2554
|
-
/* @__PURE__ */
|
|
2555
|
-
r && /* @__PURE__ */
|
|
2554
|
+
/* @__PURE__ */ u("span", { className: "text-sm font-medium text-accent-primary", children: t }),
|
|
2555
|
+
r && /* @__PURE__ */ u("span", { className: "mt-0.5 text-xs text-accent-secondary", children: r })
|
|
2556
2556
|
] })
|
|
2557
2557
|
] }),
|
|
2558
2558
|
s || v
|
|
2559
2559
|
]
|
|
2560
2560
|
}
|
|
2561
2561
|
),
|
|
2562
|
-
/* @__PURE__ */
|
|
2562
|
+
/* @__PURE__ */ u(
|
|
2563
2563
|
ni,
|
|
2564
2564
|
{
|
|
2565
2565
|
isOpen: f,
|
|
2566
|
-
onClose: () =>
|
|
2566
|
+
onClose: () => c(!1),
|
|
2567
2567
|
title: t || "",
|
|
2568
2568
|
titleAlign: l,
|
|
2569
2569
|
backIcon: i || m,
|
|
2570
2570
|
fullHeight: d == null ? void 0 : d.isMobile,
|
|
2571
2571
|
fullWidth: d == null ? void 0 : d.isMobile,
|
|
2572
|
-
onBackdropClick: d != null && d.isMobile ? void 0 : () =>
|
|
2573
|
-
className:
|
|
2572
|
+
onBackdropClick: d != null && d.isMobile ? void 0 : () => c(!1),
|
|
2573
|
+
className: S(d != null && d.isMobile ? "z-60" : "z-50", a),
|
|
2574
2574
|
children: e
|
|
2575
2575
|
}
|
|
2576
2576
|
)
|
|
@@ -2584,7 +2584,7 @@ const si = ({
|
|
|
2584
2584
|
suffix: s,
|
|
2585
2585
|
disabled: o = !1
|
|
2586
2586
|
}) => {
|
|
2587
|
-
const a = /* @__PURE__ */
|
|
2587
|
+
const a = /* @__PURE__ */ u("svg", { width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ u(
|
|
2588
2588
|
"path",
|
|
2589
2589
|
{
|
|
2590
2590
|
d: "M16.6667 5L7.5 14.1667L3.33333 10",
|
|
@@ -2600,7 +2600,7 @@ const si = ({
|
|
|
2600
2600
|
role: "menuitem",
|
|
2601
2601
|
onClick: r,
|
|
2602
2602
|
disabled: o,
|
|
2603
|
-
className:
|
|
2603
|
+
className: S(
|
|
2604
2604
|
"flex w-full items-center justify-between p-4",
|
|
2605
2605
|
"transition-colors hover:bg-accent-secondary/5",
|
|
2606
2606
|
"text-left focus:outline-none",
|
|
@@ -2612,8 +2612,8 @@ const si = ({
|
|
|
2612
2612
|
tabIndex: o ? -1 : 0,
|
|
2613
2613
|
children: [
|
|
2614
2614
|
/* @__PURE__ */ N("div", { className: "flex flex-col items-start", children: [
|
|
2615
|
-
/* @__PURE__ */
|
|
2616
|
-
t && /* @__PURE__ */
|
|
2615
|
+
/* @__PURE__ */ u("span", { className: "font-medium text-accent-primary", children: e }),
|
|
2616
|
+
t && /* @__PURE__ */ u("span", { className: "text-sm text-accent-secondary", children: t })
|
|
2617
2617
|
] }),
|
|
2618
2618
|
n && (s || a)
|
|
2619
2619
|
]
|
|
@@ -2631,7 +2631,7 @@ const oi = ({
|
|
|
2631
2631
|
symbols: t = 8,
|
|
2632
2632
|
size: r = "body2",
|
|
2633
2633
|
className: n
|
|
2634
|
-
}) => e ? /* @__PURE__ */
|
|
2634
|
+
}) => e ? /* @__PURE__ */ u(W, { variant: r, className: S("text-accent-primary", n), children: /* @__PURE__ */ u("span", { children: ta(e, t) ?? e }) }) : null;
|
|
2635
2635
|
function ai(e = {}) {
|
|
2636
2636
|
const { copiedText: t = "Copied ✓", timeout: r = 2e3 } = e, [n, i] = oe({}), [s, o] = oe({}), a = ae(
|
|
2637
2637
|
(d, m) => {
|
|
@@ -2643,7 +2643,7 @@ function ai(e = {}) {
|
|
|
2643
2643
|
}, []), f = ae(
|
|
2644
2644
|
(d) => d && n[d] || !1,
|
|
2645
2645
|
[n]
|
|
2646
|
-
),
|
|
2646
|
+
), c = ae(
|
|
2647
2647
|
(d) => d && s[d] || "",
|
|
2648
2648
|
[s]
|
|
2649
2649
|
);
|
|
@@ -2658,7 +2658,7 @@ function ai(e = {}) {
|
|
|
2658
2658
|
};
|
|
2659
2659
|
}, [n, r, l]), {
|
|
2660
2660
|
isCopied: f,
|
|
2661
|
-
copiedText:
|
|
2661
|
+
copiedText: c,
|
|
2662
2662
|
copyToClipboard: a
|
|
2663
2663
|
};
|
|
2664
2664
|
}
|
|
@@ -2676,21 +2676,21 @@ const bl = ({
|
|
|
2676
2676
|
timeout: o
|
|
2677
2677
|
}, {
|
|
2678
2678
|
isCopied: f,
|
|
2679
|
-
copiedText:
|
|
2679
|
+
copiedText: c,
|
|
2680
2680
|
copyToClipboard: d
|
|
2681
|
-
} = ai(l), m = i !== void 0, v = m ? i : f(a), x = m ? s || "Copied ✓" :
|
|
2682
|
-
|
|
2681
|
+
} = ai(l), m = i !== void 0, v = m ? i : f(a), x = m ? s || "Copied ✓" : c(a), b = (y) => {
|
|
2682
|
+
y.stopPropagation(), m && n ? n(t) : d(a, t);
|
|
2683
2683
|
};
|
|
2684
|
-
return /* @__PURE__ */
|
|
2684
|
+
return /* @__PURE__ */ u(
|
|
2685
2685
|
"div",
|
|
2686
2686
|
{
|
|
2687
2687
|
className: be(
|
|
2688
2688
|
"inline-flex items-center cursor-pointer hover:opacity-100 transition-opacity duration-200",
|
|
2689
2689
|
r
|
|
2690
2690
|
),
|
|
2691
|
-
onClick:
|
|
2691
|
+
onClick: b,
|
|
2692
2692
|
children: /* @__PURE__ */ N("div", { className: "relative", children: [
|
|
2693
|
-
/* @__PURE__ */
|
|
2693
|
+
/* @__PURE__ */ u(
|
|
2694
2694
|
"div",
|
|
2695
2695
|
{
|
|
2696
2696
|
className: be(
|
|
@@ -2700,7 +2700,7 @@ const bl = ({
|
|
|
2700
2700
|
children: e
|
|
2701
2701
|
}
|
|
2702
2702
|
),
|
|
2703
|
-
v && /* @__PURE__ */
|
|
2703
|
+
v && /* @__PURE__ */ u(
|
|
2704
2704
|
"div",
|
|
2705
2705
|
{
|
|
2706
2706
|
className: be(
|
|
@@ -2715,9 +2715,9 @@ const bl = ({
|
|
|
2715
2715
|
);
|
|
2716
2716
|
};
|
|
2717
2717
|
function yl({ children: e, className: t }) {
|
|
2718
|
-
return /* @__PURE__ */ N("div", { className:
|
|
2719
|
-
/* @__PURE__ */
|
|
2720
|
-
/* @__PURE__ */
|
|
2718
|
+
return /* @__PURE__ */ N("div", { className: S("bbn-warning", t), children: [
|
|
2719
|
+
/* @__PURE__ */ u("img", { src: "/images/status/warning_dark2.svg", alt: "Warning icon", className: "bbn-warning-icon" }),
|
|
2720
|
+
/* @__PURE__ */ u("p", { className: "bbn-warning-message", children: e })
|
|
2721
2721
|
] });
|
|
2722
2722
|
}
|
|
2723
2723
|
var Tt = (e) => e.type === "checkbox", Ke = (e) => e instanceof Date, le = (e) => e == null;
|
|
@@ -2741,7 +2741,7 @@ function ie(e) {
|
|
|
2741
2741
|
return e;
|
|
2742
2742
|
return t;
|
|
2743
2743
|
}
|
|
2744
|
-
var cr = (e) => /^\w*$/.test(e), ee = (e) => e === void 0, Mr = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Pr = (e) => Mr(e.replace(/["|']|\]/g, "").split(/\.|\[/)),
|
|
2744
|
+
var cr = (e) => /^\w*$/.test(e), ee = (e) => e === void 0, Mr = (e) => Array.isArray(e) ? e.filter(Boolean) : [], Pr = (e) => Mr(e.replace(/["|']|\]/g, "").split(/\.|\[/)), F = (e, t, r) => {
|
|
2745
2745
|
if (!t || !te(e))
|
|
2746
2746
|
return r;
|
|
2747
2747
|
const n = (cr(t) ? [t] : Pr(t)).reduce((i, s) => le(i) ? i : i[s], e);
|
|
@@ -2798,7 +2798,7 @@ var fi = (e, t, r, n = !0) => {
|
|
|
2798
2798
|
});
|
|
2799
2799
|
return i;
|
|
2800
2800
|
};
|
|
2801
|
-
const Rr = typeof window < "u" ?
|
|
2801
|
+
const Rr = typeof window < "u" ? R.useLayoutEffect : R.useEffect;
|
|
2802
2802
|
function di(e) {
|
|
2803
2803
|
const t = ht(), { control: r = t.control, disabled: n, name: i, exact: s } = e || {}, [o, a] = R.useState(r._formState), l = R.useRef({
|
|
2804
2804
|
isDirty: !1,
|
|
@@ -2824,108 +2824,144 @@ function di(e) {
|
|
|
2824
2824
|
l.current.isValid && r._setValid(!0);
|
|
2825
2825
|
}, [r]), R.useMemo(() => fi(o, r, l.current, !1), [o, r]);
|
|
2826
2826
|
}
|
|
2827
|
-
var Ae = (e) => typeof e == "string", hi = (e, t, r, n, i) => Ae(e) ? (n && t.watch.add(e),
|
|
2827
|
+
var Ae = (e) => typeof e == "string", hi = (e, t, r, n, i) => Ae(e) ? (n && t.watch.add(e), F(r, e, i)) : Array.isArray(e) ? e.map((s) => (n && t.watch.add(s), F(r, s))) : (n && (t.watchAll = !0), r), gr = (e) => le(e) || !li(e);
|
|
2828
|
+
function Pe(e, t, r = /* @__PURE__ */ new WeakSet()) {
|
|
2829
|
+
if (gr(e) || gr(t))
|
|
2830
|
+
return e === t;
|
|
2831
|
+
if (Ke(e) && Ke(t))
|
|
2832
|
+
return e.getTime() === t.getTime();
|
|
2833
|
+
const n = Object.keys(e), i = Object.keys(t);
|
|
2834
|
+
if (n.length !== i.length)
|
|
2835
|
+
return !1;
|
|
2836
|
+
if (r.has(e) || r.has(t))
|
|
2837
|
+
return !0;
|
|
2838
|
+
r.add(e), r.add(t);
|
|
2839
|
+
for (const s of n) {
|
|
2840
|
+
const o = e[s];
|
|
2841
|
+
if (!i.includes(s))
|
|
2842
|
+
return !1;
|
|
2843
|
+
if (s !== "ref") {
|
|
2844
|
+
const a = t[s];
|
|
2845
|
+
if (Ke(o) && Ke(a) || te(o) && te(a) || Array.isArray(o) && Array.isArray(a) ? !Pe(o, a, r) : o !== a)
|
|
2846
|
+
return !1;
|
|
2847
|
+
}
|
|
2848
|
+
}
|
|
2849
|
+
return !0;
|
|
2850
|
+
}
|
|
2828
2851
|
function mi(e) {
|
|
2829
|
-
const t = ht(), { control: r = t.control, name: n, defaultValue: i, disabled: s, exact: o } = e || {},
|
|
2852
|
+
const t = ht(), { control: r = t.control, name: n, defaultValue: i, disabled: s, exact: o, compute: a } = e || {}, l = R.useRef(i), f = R.useRef(a), c = R.useRef(void 0);
|
|
2853
|
+
f.current = a;
|
|
2854
|
+
const d = R.useMemo(() => r._getWatch(n, l.current), [r, n]), [m, v] = R.useState(f.current ? f.current(d) : d);
|
|
2830
2855
|
return Rr(() => r._subscribe({
|
|
2831
2856
|
name: n,
|
|
2832
2857
|
formState: {
|
|
2833
2858
|
values: !0
|
|
2834
2859
|
},
|
|
2835
2860
|
exact: o,
|
|
2836
|
-
callback: (
|
|
2837
|
-
|
|
2861
|
+
callback: (x) => {
|
|
2862
|
+
if (!s) {
|
|
2863
|
+
const b = hi(n, r._names, x.values || r._formValues, !1, l.current);
|
|
2864
|
+
if (f.current) {
|
|
2865
|
+
const y = f.current(b);
|
|
2866
|
+
Pe(y, c.current) || (v(y), c.current = y);
|
|
2867
|
+
} else
|
|
2868
|
+
v(b);
|
|
2869
|
+
}
|
|
2870
|
+
}
|
|
2871
|
+
}), [r, s, n, o]), R.useEffect(() => r._removeUnmounted()), m;
|
|
2838
2872
|
}
|
|
2839
2873
|
function sa(e) {
|
|
2840
|
-
const t = ht(), { name: r, disabled: n, control: i = t.control, shouldUnregister: s } = e,
|
|
2874
|
+
const t = ht(), { name: r, disabled: n, control: i = t.control, shouldUnregister: s, defaultValue: o } = e, a = ui(i._names.array, r), l = R.useMemo(() => F(i._formValues, r, F(i._defaultValues, r, o)), [i, r, o]), f = mi({
|
|
2841
2875
|
control: i,
|
|
2842
2876
|
name: r,
|
|
2843
|
-
defaultValue:
|
|
2877
|
+
defaultValue: l,
|
|
2844
2878
|
exact: !0
|
|
2845
|
-
}),
|
|
2879
|
+
}), c = di({
|
|
2846
2880
|
control: i,
|
|
2847
2881
|
name: r,
|
|
2848
2882
|
exact: !0
|
|
2849
|
-
}),
|
|
2883
|
+
}), d = R.useRef(e), m = R.useRef(i.register(r, {
|
|
2850
2884
|
...e.rules,
|
|
2851
|
-
value:
|
|
2885
|
+
value: f,
|
|
2852
2886
|
...me(e.disabled) ? { disabled: e.disabled } : {}
|
|
2853
|
-
}))
|
|
2887
|
+
}));
|
|
2888
|
+
d.current = e;
|
|
2889
|
+
const v = R.useMemo(() => Object.defineProperties({}, {
|
|
2854
2890
|
invalid: {
|
|
2855
2891
|
enumerable: !0,
|
|
2856
|
-
get: () => !!
|
|
2892
|
+
get: () => !!F(c.errors, r)
|
|
2857
2893
|
},
|
|
2858
2894
|
isDirty: {
|
|
2859
2895
|
enumerable: !0,
|
|
2860
|
-
get: () => !!
|
|
2896
|
+
get: () => !!F(c.dirtyFields, r)
|
|
2861
2897
|
},
|
|
2862
2898
|
isTouched: {
|
|
2863
2899
|
enumerable: !0,
|
|
2864
|
-
get: () => !!
|
|
2900
|
+
get: () => !!F(c.touchedFields, r)
|
|
2865
2901
|
},
|
|
2866
2902
|
isValidating: {
|
|
2867
2903
|
enumerable: !0,
|
|
2868
|
-
get: () => !!
|
|
2904
|
+
get: () => !!F(c.validatingFields, r)
|
|
2869
2905
|
},
|
|
2870
2906
|
error: {
|
|
2871
2907
|
enumerable: !0,
|
|
2872
|
-
get: () =>
|
|
2908
|
+
get: () => F(c.errors, r)
|
|
2873
2909
|
}
|
|
2874
|
-
}), [
|
|
2910
|
+
}), [c, r]), x = R.useCallback((w) => m.current.onChange({
|
|
2875
2911
|
target: {
|
|
2876
|
-
value: ci(
|
|
2912
|
+
value: ci(w),
|
|
2877
2913
|
name: r
|
|
2878
2914
|
},
|
|
2879
2915
|
type: er.CHANGE
|
|
2880
|
-
}), [r]),
|
|
2916
|
+
}), [r]), b = R.useCallback(() => m.current.onBlur({
|
|
2881
2917
|
target: {
|
|
2882
|
-
value:
|
|
2918
|
+
value: F(i._formValues, r),
|
|
2883
2919
|
name: r
|
|
2884
2920
|
},
|
|
2885
2921
|
type: er.BLUR
|
|
2886
|
-
}), [r, i._formValues]),
|
|
2887
|
-
const _ =
|
|
2888
|
-
_ &&
|
|
2889
|
-
focus: () =>
|
|
2890
|
-
select: () =>
|
|
2891
|
-
setCustomValidity: (
|
|
2892
|
-
reportValidity: () =>
|
|
2922
|
+
}), [r, i._formValues]), y = R.useCallback((w) => {
|
|
2923
|
+
const _ = F(i._fields, r);
|
|
2924
|
+
_ && w && (_._f.ref = {
|
|
2925
|
+
focus: () => w.focus && w.focus(),
|
|
2926
|
+
select: () => w.select && w.select(),
|
|
2927
|
+
setCustomValidity: (O) => w.setCustomValidity(O),
|
|
2928
|
+
reportValidity: () => w.reportValidity()
|
|
2893
2929
|
});
|
|
2894
|
-
}, [i._fields, r]),
|
|
2930
|
+
}, [i._fields, r]), M = R.useMemo(() => ({
|
|
2895
2931
|
name: r,
|
|
2896
|
-
value:
|
|
2897
|
-
...me(n) ||
|
|
2898
|
-
onChange:
|
|
2899
|
-
onBlur:
|
|
2900
|
-
ref:
|
|
2901
|
-
}), [r, n,
|
|
2932
|
+
value: f,
|
|
2933
|
+
...me(n) || c.disabled ? { disabled: c.disabled || n } : {},
|
|
2934
|
+
onChange: x,
|
|
2935
|
+
onBlur: b,
|
|
2936
|
+
ref: y
|
|
2937
|
+
}), [r, n, c.disabled, x, b, y, f]);
|
|
2902
2938
|
return R.useEffect(() => {
|
|
2903
|
-
const
|
|
2939
|
+
const w = i._options.shouldUnregister || s;
|
|
2904
2940
|
i.register(r, {
|
|
2905
|
-
...
|
|
2906
|
-
...me(
|
|
2941
|
+
...d.current.rules,
|
|
2942
|
+
...me(d.current.disabled) ? { disabled: d.current.disabled } : {}
|
|
2907
2943
|
});
|
|
2908
|
-
const _ = (
|
|
2909
|
-
const
|
|
2910
|
-
|
|
2944
|
+
const _ = (O, L) => {
|
|
2945
|
+
const A = F(i._fields, O);
|
|
2946
|
+
A && A._f && (A._f.mount = L);
|
|
2911
2947
|
};
|
|
2912
|
-
if (_(r, !0),
|
|
2913
|
-
const
|
|
2914
|
-
Z(i._defaultValues, r,
|
|
2948
|
+
if (_(r, !0), w) {
|
|
2949
|
+
const O = ie(F(i._options.defaultValues, r));
|
|
2950
|
+
Z(i._defaultValues, r, O), ee(F(i._formValues, r)) && Z(i._formValues, r, O);
|
|
2915
2951
|
}
|
|
2916
|
-
return !
|
|
2917
|
-
(
|
|
2952
|
+
return !a && i.register(r), () => {
|
|
2953
|
+
(a ? w && !i._state.action : w) ? i.unregister(r) : _(r, !1);
|
|
2918
2954
|
};
|
|
2919
|
-
}, [r, i,
|
|
2955
|
+
}, [r, i, a, s]), R.useEffect(() => {
|
|
2920
2956
|
i._setDisabledField({
|
|
2921
2957
|
disabled: n,
|
|
2922
2958
|
name: r
|
|
2923
2959
|
});
|
|
2924
2960
|
}, [n, r, i]), R.useMemo(() => ({
|
|
2925
|
-
field:
|
|
2926
|
-
formState:
|
|
2927
|
-
fieldState:
|
|
2928
|
-
}), [
|
|
2961
|
+
field: M,
|
|
2962
|
+
formState: c,
|
|
2963
|
+
fieldState: v
|
|
2964
|
+
}), [M, c, v]);
|
|
2929
2965
|
}
|
|
2930
2966
|
var pi = (e, t, r, n, i) => t ? {
|
|
2931
2967
|
...r[e],
|
|
@@ -2952,31 +2988,7 @@ var pi = (e, t, r, n, i) => t ? {
|
|
|
2952
2988
|
e = [];
|
|
2953
2989
|
}
|
|
2954
2990
|
};
|
|
2955
|
-
},
|
|
2956
|
-
function We(e, t, r = /* @__PURE__ */ new WeakSet()) {
|
|
2957
|
-
if (gr(e) || gr(t))
|
|
2958
|
-
return e === t;
|
|
2959
|
-
if (Ke(e) && Ke(t))
|
|
2960
|
-
return e.getTime() === t.getTime();
|
|
2961
|
-
const n = Object.keys(e), i = Object.keys(t);
|
|
2962
|
-
if (n.length !== i.length)
|
|
2963
|
-
return !1;
|
|
2964
|
-
if (r.has(e) || r.has(t))
|
|
2965
|
-
return !0;
|
|
2966
|
-
r.add(e), r.add(t);
|
|
2967
|
-
for (const s of n) {
|
|
2968
|
-
const o = e[s];
|
|
2969
|
-
if (!i.includes(s))
|
|
2970
|
-
return !1;
|
|
2971
|
-
if (s !== "ref") {
|
|
2972
|
-
const a = t[s];
|
|
2973
|
-
if (Ke(o) && Ke(a) || te(o) && te(a) || Array.isArray(o) && Array.isArray(a) ? !We(o, a, r) : o !== a)
|
|
2974
|
-
return !1;
|
|
2975
|
-
}
|
|
2976
|
-
}
|
|
2977
|
-
return !0;
|
|
2978
|
-
}
|
|
2979
|
-
var fe = (e) => te(e) && !Object.keys(e).length, jr = (e) => e.type === "file", Oe = (e) => typeof e == "function", tr = (e) => {
|
|
2991
|
+
}, fe = (e) => te(e) && !Object.keys(e).length, jr = (e) => e.type === "file", Oe = (e) => typeof e == "function", tr = (e) => {
|
|
2980
2992
|
if (!Tr)
|
|
2981
2993
|
return !1;
|
|
2982
2994
|
const t = e ? e.ownerDocument : 0;
|
|
@@ -3016,7 +3028,7 @@ function bi(e, t, r) {
|
|
|
3016
3028
|
const n = Array.isArray(e);
|
|
3017
3029
|
if (te(e) || n)
|
|
3018
3030
|
for (const i in e)
|
|
3019
|
-
Array.isArray(e[i]) || te(e[i]) && !gi(e[i]) ? ee(t) || gr(r[i]) ? r[i] = Array.isArray(e[i]) ? rr(e[i], []) : { ...rr(e[i]) } : bi(e[i], le(t) ? {} : t[i], r[i]) : r[i] = !
|
|
3031
|
+
Array.isArray(e[i]) || te(e[i]) && !gi(e[i]) ? ee(t) || gr(r[i]) ? r[i] = Array.isArray(e[i]) ? rr(e[i], []) : { ...rr(e[i]) } : bi(e[i], le(t) ? {} : t[i], r[i]) : r[i] = !Pe(e[i], t[i]);
|
|
3020
3032
|
return r;
|
|
3021
3033
|
}
|
|
3022
3034
|
var wt = (e, t) => bi(e, t, rr(t));
|
|
@@ -3052,7 +3064,7 @@ function mn(e) {
|
|
|
3052
3064
|
var ca = (e, t, r, n) => {
|
|
3053
3065
|
const i = {};
|
|
3054
3066
|
for (const s of e) {
|
|
3055
|
-
const o =
|
|
3067
|
+
const o = F(t, s);
|
|
3056
3068
|
o && Z(i, s, o._f);
|
|
3057
3069
|
}
|
|
3058
3070
|
return {
|
|
@@ -3072,7 +3084,7 @@ const vn = "AsyncFunction";
|
|
|
3072
3084
|
var ua = (e) => !!e && !!e.validate && !!(Oe(e.validate) && e.validate.constructor.name === vn || te(e.validate) && Object.values(e.validate).find((t) => t.constructor.name === vn)), fa = (e) => e.mount && (e.required || e.min || e.max || e.maxLength || e.minLength || e.pattern || e.validate), gn = (e, t, r) => !r && (t.watchAll || t.watch.has(e) || [...t.watch].some((n) => e.startsWith(n) && /^\.\w+/.test(e.slice(n.length))));
|
|
3073
3085
|
const Ot = (e, t, r, n) => {
|
|
3074
3086
|
for (const i of r || Object.keys(e)) {
|
|
3075
|
-
const s =
|
|
3087
|
+
const s = F(e, i);
|
|
3076
3088
|
if (s) {
|
|
3077
3089
|
const { _f: o, ...a } = s;
|
|
3078
3090
|
if (o) {
|
|
@@ -3088,7 +3100,7 @@ const Ot = (e, t, r, n) => {
|
|
|
3088
3100
|
}
|
|
3089
3101
|
};
|
|
3090
3102
|
function bn(e, t, r) {
|
|
3091
|
-
const n =
|
|
3103
|
+
const n = F(e, r);
|
|
3092
3104
|
if (n || cr(r))
|
|
3093
3105
|
return {
|
|
3094
3106
|
error: n,
|
|
@@ -3096,7 +3108,7 @@ function bn(e, t, r) {
|
|
|
3096
3108
|
};
|
|
3097
3109
|
const i = r.split(".");
|
|
3098
3110
|
for (; i.length; ) {
|
|
3099
|
-
const s = i.join("."), o =
|
|
3111
|
+
const s = i.join("."), o = F(t, s), a = F(e, s);
|
|
3100
3112
|
if (o && !Array.isArray(o) && r !== s)
|
|
3101
3113
|
return { name: r };
|
|
3102
3114
|
if (a && a.type)
|
|
@@ -3119,8 +3131,8 @@ var da = (e, t, r, n) => {
|
|
|
3119
3131
|
r(e);
|
|
3120
3132
|
const { name: i, ...s } = e;
|
|
3121
3133
|
return fe(s) || Object.keys(s).length >= Object.keys(t).length || Object.keys(s).find((o) => t[o] === (!n || ke.all));
|
|
3122
|
-
}, ha = (e, t, r) => !e || !t || e === t || kt(e).some((n) => n && (r ? n === t : n.startsWith(t) || t.startsWith(n))), ma = (e, t, r, n, i) => i.isOnAll ? !1 : !r && i.isOnTouch ? !(t || e) : (r ? n.isOnBlur : i.isOnBlur) ? !e : (r ? n.isOnChange : i.isOnChange) ? e : !0, pa = (e, t) => !Mr(
|
|
3123
|
-
const n = kt(
|
|
3134
|
+
}, ha = (e, t, r) => !e || !t || e === t || kt(e).some((n) => n && (r ? n === t : n.startsWith(t) || t.startsWith(n))), ma = (e, t, r, n, i) => i.isOnAll ? !1 : !r && i.isOnTouch ? !(t || e) : (r ? n.isOnBlur : i.isOnBlur) ? !e : (r ? n.isOnChange : i.isOnChange) ? e : !0, pa = (e, t) => !Mr(F(e, t)).length && re(e, t), va = (e, t, r) => {
|
|
3135
|
+
const n = kt(F(e, r));
|
|
3124
3136
|
return Z(n, "root", t[r]), Z(e, r, n), e;
|
|
3125
3137
|
}, Zt = (e) => Ae(e);
|
|
3126
3138
|
function yn(e, t, r = "validate") {
|
|
@@ -3135,29 +3147,29 @@ var ot = (e) => te(e) && !nr(e) ? e : {
|
|
|
3135
3147
|
value: e,
|
|
3136
3148
|
message: ""
|
|
3137
3149
|
}, wn = async (e, t, r, n, i, s) => {
|
|
3138
|
-
const { ref: o, refs: a, required: l, maxLength: f, minLength:
|
|
3139
|
-
if (!
|
|
3150
|
+
const { ref: o, refs: a, required: l, maxLength: f, minLength: c, min: d, max: m, pattern: v, validate: x, name: b, valueAsNumber: y, mount: M } = e._f, w = F(r, b);
|
|
3151
|
+
if (!M || t.has(b))
|
|
3140
3152
|
return {};
|
|
3141
|
-
const
|
|
3142
|
-
i &&
|
|
3143
|
-
},
|
|
3153
|
+
const _ = a ? a[0] : o, O = (D) => {
|
|
3154
|
+
i && _.reportValidity && (_.setCustomValidity(me(D) ? "" : D || ""), _.reportValidity());
|
|
3155
|
+
}, L = {}, A = Ir(o), k = Tt(o), $ = A || k, j = (y || jr(o)) && ee(o.value) && ee(w) || tr(o) && o.value === "" || w === "" || Array.isArray(w) && !w.length, H = pi.bind(null, b, n, L), B = (D, I, q, J = Me.maxLength, X = Me.minLength) => {
|
|
3144
3156
|
const Q = D ? I : q;
|
|
3145
|
-
|
|
3157
|
+
L[b] = {
|
|
3146
3158
|
type: D ? J : X,
|
|
3147
3159
|
message: Q,
|
|
3148
3160
|
ref: o,
|
|
3149
3161
|
...H(D ? J : X, Q)
|
|
3150
3162
|
};
|
|
3151
3163
|
};
|
|
3152
|
-
if (s ? !Array.isArray(w) || !w.length : l && (!$ && (j || le(w)) || me(w) && !w || k && !yi(a).isValid ||
|
|
3164
|
+
if (s ? !Array.isArray(w) || !w.length : l && (!$ && (j || le(w)) || me(w) && !w || k && !yi(a).isValid || A && !xi(a).isValid)) {
|
|
3153
3165
|
const { value: D, message: I } = Zt(l) ? { value: !!l, message: l } : ot(l);
|
|
3154
|
-
if (D && (
|
|
3166
|
+
if (D && (L[b] = {
|
|
3155
3167
|
type: Me.required,
|
|
3156
3168
|
message: I,
|
|
3157
|
-
ref:
|
|
3169
|
+
ref: _,
|
|
3158
3170
|
...H(Me.required, I)
|
|
3159
3171
|
}, !n))
|
|
3160
|
-
return
|
|
3172
|
+
return O(I), L;
|
|
3161
3173
|
}
|
|
3162
3174
|
if (!j && (!le(d) || !le(m))) {
|
|
3163
3175
|
let D, I;
|
|
@@ -3170,50 +3182,50 @@ var ot = (e) => te(e) && !nr(e) ? e : {
|
|
|
3170
3182
|
Ae(q.value) && w && (D = Ee ? Q(w) > Q(q.value) : ue ? w > q.value : X > new Date(q.value)), Ae(J.value) && w && (I = Ee ? Q(w) < Q(J.value) : ue ? w < J.value : X < new Date(J.value));
|
|
3171
3183
|
}
|
|
3172
3184
|
if ((D || I) && (B(!!D, q.message, J.message, Me.max, Me.min), !n))
|
|
3173
|
-
return
|
|
3185
|
+
return O(L[b].message), L;
|
|
3174
3186
|
}
|
|
3175
|
-
if ((f ||
|
|
3176
|
-
const D = ot(f), I = ot(
|
|
3187
|
+
if ((f || c) && !j && (Ae(w) || s && Array.isArray(w))) {
|
|
3188
|
+
const D = ot(f), I = ot(c), q = !le(D.value) && w.length > +D.value, J = !le(I.value) && w.length < +I.value;
|
|
3177
3189
|
if ((q || J) && (B(q, D.message, I.message), !n))
|
|
3178
|
-
return
|
|
3190
|
+
return O(L[b].message), L;
|
|
3179
3191
|
}
|
|
3180
3192
|
if (v && !j && Ae(w)) {
|
|
3181
3193
|
const { value: D, message: I } = ot(v);
|
|
3182
|
-
if (nr(D) && !w.match(D) && (
|
|
3194
|
+
if (nr(D) && !w.match(D) && (L[b] = {
|
|
3183
3195
|
type: Me.pattern,
|
|
3184
3196
|
message: I,
|
|
3185
3197
|
ref: o,
|
|
3186
3198
|
...H(Me.pattern, I)
|
|
3187
3199
|
}, !n))
|
|
3188
|
-
return
|
|
3200
|
+
return O(I), L;
|
|
3189
3201
|
}
|
|
3190
3202
|
if (x) {
|
|
3191
3203
|
if (Oe(x)) {
|
|
3192
|
-
const D = await x(w, r), I = yn(D,
|
|
3193
|
-
if (I && (
|
|
3204
|
+
const D = await x(w, r), I = yn(D, _);
|
|
3205
|
+
if (I && (L[b] = {
|
|
3194
3206
|
...I,
|
|
3195
3207
|
...H(Me.validate, I.message)
|
|
3196
3208
|
}, !n))
|
|
3197
|
-
return
|
|
3209
|
+
return O(I.message), L;
|
|
3198
3210
|
} else if (te(x)) {
|
|
3199
3211
|
let D = {};
|
|
3200
3212
|
for (const I in x) {
|
|
3201
3213
|
if (!fe(D) && !n)
|
|
3202
3214
|
break;
|
|
3203
|
-
const q = yn(await x[I](w, r),
|
|
3215
|
+
const q = yn(await x[I](w, r), _, I);
|
|
3204
3216
|
q && (D = {
|
|
3205
3217
|
...q,
|
|
3206
3218
|
...H(I, q.message)
|
|
3207
|
-
},
|
|
3219
|
+
}, O(q.message), n && (L[b] = D));
|
|
3208
3220
|
}
|
|
3209
|
-
if (!fe(D) && (
|
|
3210
|
-
ref:
|
|
3221
|
+
if (!fe(D) && (L[b] = {
|
|
3222
|
+
ref: _,
|
|
3211
3223
|
...D
|
|
3212
3224
|
}, !n))
|
|
3213
|
-
return
|
|
3225
|
+
return L;
|
|
3214
3226
|
}
|
|
3215
3227
|
}
|
|
3216
|
-
return
|
|
3228
|
+
return O(!0), L;
|
|
3217
3229
|
};
|
|
3218
3230
|
const ga = {
|
|
3219
3231
|
mode: ke.onSubmit,
|
|
@@ -3250,7 +3262,7 @@ function ba(e = {}) {
|
|
|
3250
3262
|
array: /* @__PURE__ */ new Set(),
|
|
3251
3263
|
watch: /* @__PURE__ */ new Set()
|
|
3252
3264
|
}, l, f = 0;
|
|
3253
|
-
const
|
|
3265
|
+
const c = {
|
|
3254
3266
|
isDirty: !1,
|
|
3255
3267
|
dirtyFields: !1,
|
|
3256
3268
|
validatingFields: !1,
|
|
@@ -3260,42 +3272,42 @@ function ba(e = {}) {
|
|
|
3260
3272
|
errors: !1
|
|
3261
3273
|
};
|
|
3262
3274
|
let d = {
|
|
3263
|
-
...
|
|
3275
|
+
...c
|
|
3264
3276
|
};
|
|
3265
3277
|
const m = {
|
|
3266
3278
|
array: un(),
|
|
3267
3279
|
state: un()
|
|
3268
3280
|
}, v = t.criteriaMode === ke.all, x = (h) => (p) => {
|
|
3269
3281
|
clearTimeout(f), f = setTimeout(h, p);
|
|
3270
|
-
},
|
|
3271
|
-
if (!t.disabled && (
|
|
3282
|
+
}, b = async (h) => {
|
|
3283
|
+
if (!t.disabled && (c.isValid || d.isValid || h)) {
|
|
3272
3284
|
const p = t.resolver ? fe((await k()).errors) : await j(n, !0);
|
|
3273
3285
|
p !== r.isValid && m.state.next({
|
|
3274
3286
|
isValid: p
|
|
3275
3287
|
});
|
|
3276
3288
|
}
|
|
3277
|
-
},
|
|
3278
|
-
!t.disabled && (
|
|
3289
|
+
}, y = (h, p) => {
|
|
3290
|
+
!t.disabled && (c.isValidating || c.validatingFields || d.isValidating || d.validatingFields) && ((h || Array.from(a.mount)).forEach((g) => {
|
|
3279
3291
|
g && (p ? Z(r.validatingFields, g, p) : re(r.validatingFields, g));
|
|
3280
3292
|
}), m.state.next({
|
|
3281
3293
|
validatingFields: r.validatingFields,
|
|
3282
3294
|
isValidating: !fe(r.validatingFields)
|
|
3283
3295
|
}));
|
|
3284
|
-
},
|
|
3296
|
+
}, M = (h, p = [], g, V, E = !0, C = !0) => {
|
|
3285
3297
|
if (V && g && !t.disabled) {
|
|
3286
|
-
if (o.action = !0, C && Array.isArray(
|
|
3287
|
-
const P = g(
|
|
3288
|
-
|
|
3298
|
+
if (o.action = !0, C && Array.isArray(F(n, h))) {
|
|
3299
|
+
const P = g(F(n, h), V.argA, V.argB);
|
|
3300
|
+
E && Z(n, h, P);
|
|
3289
3301
|
}
|
|
3290
|
-
if (C && Array.isArray(
|
|
3291
|
-
const P = g(
|
|
3292
|
-
|
|
3302
|
+
if (C && Array.isArray(F(r.errors, h))) {
|
|
3303
|
+
const P = g(F(r.errors, h), V.argA, V.argB);
|
|
3304
|
+
E && Z(r.errors, h, P), pa(r.errors, h);
|
|
3293
3305
|
}
|
|
3294
|
-
if ((
|
|
3295
|
-
const P = g(
|
|
3296
|
-
|
|
3306
|
+
if ((c.touchedFields || d.touchedFields) && C && Array.isArray(F(r.touchedFields, h))) {
|
|
3307
|
+
const P = g(F(r.touchedFields, h), V.argA, V.argB);
|
|
3308
|
+
E && Z(r.touchedFields, h, P);
|
|
3297
3309
|
}
|
|
3298
|
-
(
|
|
3310
|
+
(c.dirtyFields || d.dirtyFields) && (r.dirtyFields = wt(i, s)), m.state.next({
|
|
3299
3311
|
name: h,
|
|
3300
3312
|
isDirty: B(h, p),
|
|
3301
3313
|
dirtyFields: r.dirtyFields,
|
|
@@ -3308,38 +3320,38 @@ function ba(e = {}) {
|
|
|
3308
3320
|
Z(r.errors, h, p), m.state.next({
|
|
3309
3321
|
errors: r.errors
|
|
3310
3322
|
});
|
|
3311
|
-
},
|
|
3323
|
+
}, _ = (h) => {
|
|
3312
3324
|
r.errors = h, m.state.next({
|
|
3313
3325
|
errors: r.errors,
|
|
3314
3326
|
isValid: !1
|
|
3315
3327
|
});
|
|
3316
|
-
},
|
|
3317
|
-
const
|
|
3318
|
-
if (
|
|
3319
|
-
const C =
|
|
3320
|
-
ee(C) || V && V.defaultChecked || p ? Z(s, h, p ? C : mn(
|
|
3328
|
+
}, O = (h, p, g, V) => {
|
|
3329
|
+
const E = F(n, h);
|
|
3330
|
+
if (E) {
|
|
3331
|
+
const C = F(s, h, ee(g) ? F(i, h) : g);
|
|
3332
|
+
ee(C) || V && V.defaultChecked || p ? Z(s, h, p ? C : mn(E._f)) : q(h, C), o.mount && b();
|
|
3321
3333
|
}
|
|
3322
|
-
},
|
|
3334
|
+
}, L = (h, p, g, V, E) => {
|
|
3323
3335
|
let C = !1, P = !1;
|
|
3324
3336
|
const U = {
|
|
3325
3337
|
name: h
|
|
3326
3338
|
};
|
|
3327
3339
|
if (!t.disabled) {
|
|
3328
3340
|
if (!g || V) {
|
|
3329
|
-
(
|
|
3330
|
-
const z =
|
|
3331
|
-
P = !!
|
|
3341
|
+
(c.isDirty || d.isDirty) && (P = r.isDirty, r.isDirty = U.isDirty = B(), C = P !== U.isDirty);
|
|
3342
|
+
const z = Pe(F(i, h), p);
|
|
3343
|
+
P = !!F(r.dirtyFields, h), z ? re(r.dirtyFields, h) : Z(r.dirtyFields, h, !0), U.dirtyFields = r.dirtyFields, C = C || (c.dirtyFields || d.dirtyFields) && P !== !z;
|
|
3332
3344
|
}
|
|
3333
3345
|
if (g) {
|
|
3334
|
-
const z =
|
|
3335
|
-
z || (Z(r.touchedFields, h, g), U.touchedFields = r.touchedFields, C = C || (
|
|
3346
|
+
const z = F(r.touchedFields, h);
|
|
3347
|
+
z || (Z(r.touchedFields, h, g), U.touchedFields = r.touchedFields, C = C || (c.touchedFields || d.touchedFields) && z !== g);
|
|
3336
3348
|
}
|
|
3337
|
-
C &&
|
|
3349
|
+
C && E && m.state.next(U);
|
|
3338
3350
|
}
|
|
3339
3351
|
return C ? U : {};
|
|
3340
|
-
},
|
|
3341
|
-
const
|
|
3342
|
-
if (t.delayError && g ? (l = x(() => w(h, g)), l(t.delayError)) : (clearTimeout(f), l = null, g ? Z(r.errors, h, g) : re(r.errors, h)), (g ? !
|
|
3352
|
+
}, A = (h, p, g, V) => {
|
|
3353
|
+
const E = F(r.errors, h), C = (c.isValid || d.isValid) && me(p) && r.isValid !== p;
|
|
3354
|
+
if (t.delayError && g ? (l = x(() => w(h, g)), l(t.delayError)) : (clearTimeout(f), l = null, g ? Z(r.errors, h, g) : re(r.errors, h)), (g ? !Pe(E, g) : E) || !fe(V) || C) {
|
|
3343
3355
|
const P = {
|
|
3344
3356
|
...V,
|
|
3345
3357
|
...C && me(p) ? { isValid: p } : {},
|
|
@@ -3352,14 +3364,14 @@ function ba(e = {}) {
|
|
|
3352
3364
|
}, m.state.next(P);
|
|
3353
3365
|
}
|
|
3354
3366
|
}, k = async (h) => {
|
|
3355
|
-
|
|
3367
|
+
y(h, !0);
|
|
3356
3368
|
const p = await t.resolver(s, t.context, ca(h || a.mount, n, t.criteriaMode, t.shouldUseNativeValidation));
|
|
3357
|
-
return
|
|
3369
|
+
return y(h), p;
|
|
3358
3370
|
}, $ = async (h) => {
|
|
3359
3371
|
const { errors: p } = await k(h);
|
|
3360
3372
|
if (h)
|
|
3361
3373
|
for (const g of h) {
|
|
3362
|
-
const V =
|
|
3374
|
+
const V = F(p, g);
|
|
3363
3375
|
V ? Z(r.errors, g, V) : re(r.errors, g);
|
|
3364
3376
|
}
|
|
3365
3377
|
else
|
|
@@ -3369,16 +3381,16 @@ function ba(e = {}) {
|
|
|
3369
3381
|
valid: !0
|
|
3370
3382
|
}) => {
|
|
3371
3383
|
for (const V in h) {
|
|
3372
|
-
const
|
|
3373
|
-
if (
|
|
3374
|
-
const { _f: C, ...P } =
|
|
3384
|
+
const E = h[V];
|
|
3385
|
+
if (E) {
|
|
3386
|
+
const { _f: C, ...P } = E;
|
|
3375
3387
|
if (C) {
|
|
3376
|
-
const U = a.array.has(C.name), z =
|
|
3377
|
-
z &&
|
|
3378
|
-
const ge = await wn(
|
|
3379
|
-
if (z &&
|
|
3388
|
+
const U = a.array.has(C.name), z = E._f && ua(E._f);
|
|
3389
|
+
z && c.validatingFields && y([V], !0);
|
|
3390
|
+
const ge = await wn(E, a.disabled, s, v, t.shouldUseNativeValidation && !p, U);
|
|
3391
|
+
if (z && c.validatingFields && y([V]), ge[C.name] && (g.valid = !1, p))
|
|
3380
3392
|
break;
|
|
3381
|
-
!p && (
|
|
3393
|
+
!p && (F(ge, C.name) ? U ? va(r.errors, ge, C.name) : Z(r.errors, C.name, ge[C.name]) : re(r.errors, C.name));
|
|
3382
3394
|
}
|
|
3383
3395
|
!fe(P) && await j(P, p, g);
|
|
3384
3396
|
}
|
|
@@ -3386,42 +3398,42 @@ function ba(e = {}) {
|
|
|
3386
3398
|
return g.valid;
|
|
3387
3399
|
}, H = () => {
|
|
3388
3400
|
for (const h of a.unMount) {
|
|
3389
|
-
const p =
|
|
3401
|
+
const p = F(n, h);
|
|
3390
3402
|
p && (p._f.refs ? p._f.refs.every((g) => !hr(g)) : !hr(p._f.ref)) && Ie(h);
|
|
3391
3403
|
}
|
|
3392
3404
|
a.unMount = /* @__PURE__ */ new Set();
|
|
3393
|
-
}, B = (h, p) => !t.disabled && (h && p && Z(s, h, p), !
|
|
3405
|
+
}, B = (h, p) => !t.disabled && (h && p && Z(s, h, p), !Pe(Te(), i)), D = (h, p, g) => hi(h, a, {
|
|
3394
3406
|
...o.mount ? s : ee(p) ? i : Ae(h) ? { [h]: p } : p
|
|
3395
|
-
}, g, p), I = (h) => Mr(
|
|
3396
|
-
const V =
|
|
3397
|
-
let
|
|
3407
|
+
}, g, p), I = (h) => Mr(F(o.mount ? s : i, h, t.shouldUnregister ? F(i, h, []) : [])), q = (h, p, g = {}) => {
|
|
3408
|
+
const V = F(n, h);
|
|
3409
|
+
let E = p;
|
|
3398
3410
|
if (V) {
|
|
3399
3411
|
const C = V._f;
|
|
3400
|
-
C && (!C.disabled && Z(s, h, wi(p, C)),
|
|
3401
|
-
(!P.defaultChecked || !P.disabled) && (Array.isArray(
|
|
3402
|
-
}) : C.refs.forEach((P) => P.checked = P.value ===
|
|
3412
|
+
C && (!C.disabled && Z(s, h, wi(p, C)), E = tr(C.ref) && le(p) ? "" : p, vi(C.ref) ? [...C.ref.options].forEach((P) => P.selected = E.includes(P.value)) : C.refs ? Tt(C.ref) ? C.refs.forEach((P) => {
|
|
3413
|
+
(!P.defaultChecked || !P.disabled) && (Array.isArray(E) ? P.checked = !!E.find((U) => U === P.value) : P.checked = E === P.value || !!E);
|
|
3414
|
+
}) : C.refs.forEach((P) => P.checked = P.value === E) : jr(C.ref) ? C.ref.value = "" : (C.ref.value = E, C.ref.type || m.state.next({
|
|
3403
3415
|
name: h,
|
|
3404
3416
|
values: ie(s)
|
|
3405
3417
|
})));
|
|
3406
3418
|
}
|
|
3407
|
-
(g.shouldDirty || g.shouldTouch) &&
|
|
3419
|
+
(g.shouldDirty || g.shouldTouch) && L(h, E, g.shouldTouch, g.shouldDirty, !0), g.shouldValidate && ue(h);
|
|
3408
3420
|
}, J = (h, p, g) => {
|
|
3409
3421
|
for (const V in p) {
|
|
3410
3422
|
if (!p.hasOwnProperty(V))
|
|
3411
3423
|
return;
|
|
3412
|
-
const
|
|
3413
|
-
(a.array.has(h) || te(
|
|
3424
|
+
const E = p[V], C = h + "." + V, P = F(n, C);
|
|
3425
|
+
(a.array.has(h) || te(E) || P && !P._f) && !Ke(E) ? J(C, E, g) : q(C, E, g);
|
|
3414
3426
|
}
|
|
3415
3427
|
}, X = (h, p, g = {}) => {
|
|
3416
|
-
const V =
|
|
3417
|
-
Z(s, h, C),
|
|
3428
|
+
const V = F(n, h), E = a.array.has(h), C = ie(p);
|
|
3429
|
+
Z(s, h, C), E ? (m.array.next({
|
|
3418
3430
|
name: h,
|
|
3419
3431
|
values: ie(s)
|
|
3420
|
-
}), (
|
|
3432
|
+
}), (c.isDirty || c.dirtyFields || d.isDirty || d.dirtyFields) && g.shouldDirty && m.state.next({
|
|
3421
3433
|
name: h,
|
|
3422
3434
|
dirtyFields: wt(i, s),
|
|
3423
3435
|
isDirty: B(h, C)
|
|
3424
|
-
})) : V && !V._f && !le(C) ? J(h, C, g) : q(h, C, g), gn(h, a) && m.state.next({ ...r }), m.state.next({
|
|
3436
|
+
})) : V && !V._f && !le(C) ? J(h, C, g) : q(h, C, g), gn(h, a) && m.state.next({ ...r, name: h }), m.state.next({
|
|
3425
3437
|
name: o.mount ? h : void 0,
|
|
3426
3438
|
values: ie(s)
|
|
3427
3439
|
});
|
|
@@ -3429,20 +3441,20 @@ function ba(e = {}) {
|
|
|
3429
3441
|
o.mount = !0;
|
|
3430
3442
|
const p = h.target;
|
|
3431
3443
|
let g = p.name, V = !0;
|
|
3432
|
-
const
|
|
3433
|
-
V = Number.isNaN(z) || Ke(z) && isNaN(z.getTime()) ||
|
|
3444
|
+
const E = F(n, g), C = (z) => {
|
|
3445
|
+
V = Number.isNaN(z) || Ke(z) && isNaN(z.getTime()) || Pe(z, F(s, g, z));
|
|
3434
3446
|
}, P = pn(t.mode), U = pn(t.reValidateMode);
|
|
3435
|
-
if (
|
|
3447
|
+
if (E) {
|
|
3436
3448
|
let z, ge;
|
|
3437
|
-
const Ht = p.type ? mn(
|
|
3438
|
-
Z(s, g, Ht), $e ? (
|
|
3439
|
-
const fr =
|
|
3449
|
+
const Ht = p.type ? mn(E._f) : ci(h), $e = h.type === er.BLUR || h.type === er.FOCUS_OUT, Vi = !fa(E._f) && !t.resolver && !F(r.errors, g) && !E._f.deps || ma($e, F(r.touchedFields, g), r.isSubmitted, U, P), ur = gn(g, a, $e);
|
|
3450
|
+
Z(s, g, Ht), $e ? (E._f.onBlur && E._f.onBlur(h), l && l(0)) : E._f.onChange && E._f.onChange(h);
|
|
3451
|
+
const fr = L(g, Ht, $e), _i = !fe(fr) || ur;
|
|
3440
3452
|
if (!$e && m.state.next({
|
|
3441
3453
|
name: g,
|
|
3442
3454
|
type: h.type,
|
|
3443
3455
|
values: ie(s)
|
|
3444
3456
|
}), Vi)
|
|
3445
|
-
return (
|
|
3457
|
+
return (c.isValid || d.isValid) && (t.mode === "onBlur" ? $e && b() : $e || b()), _i && m.state.next({ name: g, ...ur ? {} : fr });
|
|
3446
3458
|
if (!$e && ur && m.state.next({ ...r }), t.resolver) {
|
|
3447
3459
|
const { errors: zr } = await k([g]);
|
|
3448
3460
|
if (C(Ht), V) {
|
|
@@ -3450,44 +3462,44 @@ function ba(e = {}) {
|
|
|
3450
3462
|
z = Zr.error, g = Zr.name, ge = fe(zr);
|
|
3451
3463
|
}
|
|
3452
3464
|
} else
|
|
3453
|
-
|
|
3454
|
-
V && (
|
|
3465
|
+
y([g], !0), z = (await wn(E, a.disabled, s, v, t.shouldUseNativeValidation))[g], y([g]), C(Ht), V && (z ? ge = !1 : (c.isValid || d.isValid) && (ge = await j(n, !0)));
|
|
3466
|
+
V && (E._f.deps && ue(E._f.deps), A(g, ge, z, fr));
|
|
3455
3467
|
}
|
|
3456
3468
|
}, Ee = (h, p) => {
|
|
3457
|
-
if (
|
|
3469
|
+
if (F(r.errors, p) && h.focus)
|
|
3458
3470
|
return h.focus(), 1;
|
|
3459
3471
|
}, ue = async (h, p = {}) => {
|
|
3460
3472
|
let g, V;
|
|
3461
|
-
const
|
|
3473
|
+
const E = kt(h);
|
|
3462
3474
|
if (t.resolver) {
|
|
3463
|
-
const C = await $(ee(h) ? h :
|
|
3464
|
-
g = fe(C), V = h ? !
|
|
3465
|
-
} else h ? (V = (await Promise.all(
|
|
3466
|
-
const P =
|
|
3475
|
+
const C = await $(ee(h) ? h : E);
|
|
3476
|
+
g = fe(C), V = h ? !E.some((P) => F(C, P)) : g;
|
|
3477
|
+
} else h ? (V = (await Promise.all(E.map(async (C) => {
|
|
3478
|
+
const P = F(n, C);
|
|
3467
3479
|
return await j(P && P._f ? { [C]: P } : P);
|
|
3468
|
-
}))).every(Boolean), !(!V && !r.isValid) &&
|
|
3480
|
+
}))).every(Boolean), !(!V && !r.isValid) && b()) : V = g = await j(n);
|
|
3469
3481
|
return m.state.next({
|
|
3470
|
-
...!Ae(h) || (
|
|
3482
|
+
...!Ae(h) || (c.isValid || d.isValid) && g !== r.isValid ? {} : { name: h },
|
|
3471
3483
|
...t.resolver || !h ? { isValid: g } : {},
|
|
3472
3484
|
errors: r.errors
|
|
3473
|
-
}), p.shouldFocus && !V && Ot(n, Ee, h ?
|
|
3485
|
+
}), p.shouldFocus && !V && Ot(n, Ee, h ? E : a.mount), V;
|
|
3474
3486
|
}, Te = (h) => {
|
|
3475
3487
|
const p = {
|
|
3476
3488
|
...o.mount ? s : i
|
|
3477
3489
|
};
|
|
3478
|
-
return ee(h) ? p : Ae(h) ?
|
|
3490
|
+
return ee(h) ? p : Ae(h) ? F(p, h) : h.map((g) => F(p, g));
|
|
3479
3491
|
}, st = (h, p) => ({
|
|
3480
|
-
invalid: !!
|
|
3481
|
-
isDirty: !!
|
|
3482
|
-
error:
|
|
3483
|
-
isValidating: !!
|
|
3484
|
-
isTouched: !!
|
|
3485
|
-
}),
|
|
3492
|
+
invalid: !!F((p || r).errors, h),
|
|
3493
|
+
isDirty: !!F((p || r).dirtyFields, h),
|
|
3494
|
+
error: F((p || r).errors, h),
|
|
3495
|
+
isValidating: !!F(r.validatingFields, h),
|
|
3496
|
+
isTouched: !!F((p || r).touchedFields, h)
|
|
3497
|
+
}), qe = (h) => {
|
|
3486
3498
|
h && kt(h).forEach((p) => re(r.errors, p)), m.state.next({
|
|
3487
3499
|
errors: h ? r.errors : {}
|
|
3488
3500
|
});
|
|
3489
|
-
},
|
|
3490
|
-
const V = (
|
|
3501
|
+
}, ze = (h, p, g) => {
|
|
3502
|
+
const V = (F(n, h, { _f: {} })._f || {}).ref, E = F(r.errors, h) || {}, { ref: C, message: P, type: U, ...z } = E;
|
|
3491
3503
|
Z(r.errors, h, {
|
|
3492
3504
|
...z,
|
|
3493
3505
|
...p,
|
|
@@ -3498,16 +3510,17 @@ function ba(e = {}) {
|
|
|
3498
3510
|
isValid: !1
|
|
3499
3511
|
}), g && g.shouldFocus && V && V.focus && V.focus();
|
|
3500
3512
|
}, je = (h, p) => Oe(h) ? m.state.subscribe({
|
|
3501
|
-
next: (g) => h(D(void 0, p), g)
|
|
3513
|
+
next: (g) => "values" in g && h(D(void 0, p), g)
|
|
3502
3514
|
}) : D(h, p, !0), Ce = (h) => m.state.subscribe({
|
|
3503
3515
|
next: (p) => {
|
|
3504
|
-
ha(h.name, p.name, h.exact) && da(p, h.formState ||
|
|
3516
|
+
ha(h.name, p.name, h.exact) && da(p, h.formState || c, It, h.reRenderRoot) && h.callback({
|
|
3505
3517
|
values: { ...s },
|
|
3506
3518
|
...r,
|
|
3507
|
-
...p
|
|
3519
|
+
...p,
|
|
3520
|
+
defaultValues: i
|
|
3508
3521
|
});
|
|
3509
3522
|
}
|
|
3510
|
-
}).unsubscribe,
|
|
3523
|
+
}).unsubscribe, Ze = (h) => (o.mount = !0, d = {
|
|
3511
3524
|
...d,
|
|
3512
3525
|
...h.formState
|
|
3513
3526
|
}, Ce({
|
|
@@ -3521,11 +3534,11 @@ function ba(e = {}) {
|
|
|
3521
3534
|
}), m.state.next({
|
|
3522
3535
|
...r,
|
|
3523
3536
|
...p.keepDirty ? { isDirty: B() } : {}
|
|
3524
|
-
}), !p.keepIsValid &&
|
|
3537
|
+
}), !p.keepIsValid && b();
|
|
3525
3538
|
}, Se = ({ disabled: h, name: p }) => {
|
|
3526
3539
|
(me(h) && o.mount || h || a.disabled.has(p)) && (h ? a.disabled.add(p) : a.disabled.delete(p));
|
|
3527
|
-
},
|
|
3528
|
-
let g =
|
|
3540
|
+
}, Xe = (h, p = {}) => {
|
|
3541
|
+
let g = F(n, h);
|
|
3529
3542
|
const V = me(p.disabled) || me(t.disabled);
|
|
3530
3543
|
return Z(n, h, {
|
|
3531
3544
|
...g || {},
|
|
@@ -3538,7 +3551,7 @@ function ba(e = {}) {
|
|
|
3538
3551
|
}), a.mount.add(h), g ? Se({
|
|
3539
3552
|
disabled: me(p.disabled) ? p.disabled : t.disabled,
|
|
3540
3553
|
name: h
|
|
3541
|
-
}) :
|
|
3554
|
+
}) : O(h, !0, p.value), {
|
|
3542
3555
|
...V ? { disabled: p.disabled || t.disabled } : {},
|
|
3543
3556
|
...t.progressive ? {
|
|
3544
3557
|
required: !!p.required,
|
|
@@ -3551,10 +3564,10 @@ function ba(e = {}) {
|
|
|
3551
3564
|
name: h,
|
|
3552
3565
|
onChange: Q,
|
|
3553
3566
|
onBlur: Q,
|
|
3554
|
-
ref: (
|
|
3555
|
-
if (
|
|
3556
|
-
|
|
3557
|
-
const C = ee(
|
|
3567
|
+
ref: (E) => {
|
|
3568
|
+
if (E) {
|
|
3569
|
+
Xe(h, p), g = F(n, h);
|
|
3570
|
+
const C = ee(E.value) && E.querySelectorAll && E.querySelectorAll("input,select,textarea")[0] || E, P = oa(C), U = g._f.refs || [];
|
|
3558
3571
|
if (P ? U.find((z) => z === C) : C === g._f.ref)
|
|
3559
3572
|
return;
|
|
3560
3573
|
Z(n, h, {
|
|
@@ -3564,43 +3577,43 @@ function ba(e = {}) {
|
|
|
3564
3577
|
refs: [
|
|
3565
3578
|
...U.filter(hr),
|
|
3566
3579
|
C,
|
|
3567
|
-
...Array.isArray(
|
|
3580
|
+
...Array.isArray(F(i, h)) ? [{}] : []
|
|
3568
3581
|
],
|
|
3569
3582
|
ref: { type: C.type, name: h }
|
|
3570
3583
|
} : { ref: C }
|
|
3571
3584
|
}
|
|
3572
|
-
}),
|
|
3585
|
+
}), O(h, !1, void 0, C);
|
|
3573
3586
|
} else
|
|
3574
|
-
g =
|
|
3587
|
+
g = F(n, h, {}), g._f && (g._f.mount = !1), (t.shouldUnregister || p.shouldUnregister) && !(ui(a.array, h) && o.action) && a.unMount.add(h);
|
|
3575
3588
|
}
|
|
3576
3589
|
};
|
|
3577
3590
|
}, gt = () => t.shouldFocusError && Ot(n, Ee, a.mount), bt = (h) => {
|
|
3578
3591
|
me(h) && (m.state.next({ disabled: h }), Ot(n, (p, g) => {
|
|
3579
|
-
const V =
|
|
3580
|
-
V && (p.disabled = V._f.disabled || h, Array.isArray(V._f.refs) && V._f.refs.forEach((
|
|
3581
|
-
|
|
3592
|
+
const V = F(n, g);
|
|
3593
|
+
V && (p.disabled = V._f.disabled || h, Array.isArray(V._f.refs) && V._f.refs.forEach((E) => {
|
|
3594
|
+
E.disabled = V._f.disabled || h;
|
|
3582
3595
|
}));
|
|
3583
3596
|
}, 0, !1));
|
|
3584
3597
|
}, Mt = (h, p) => async (g) => {
|
|
3585
3598
|
let V;
|
|
3586
3599
|
g && (g.preventDefault && g.preventDefault(), g.persist && g.persist());
|
|
3587
|
-
let
|
|
3600
|
+
let E = ie(s);
|
|
3588
3601
|
if (m.state.next({
|
|
3589
3602
|
isSubmitting: !0
|
|
3590
3603
|
}), t.resolver) {
|
|
3591
3604
|
const { errors: C, values: P } = await k();
|
|
3592
|
-
r.errors = C,
|
|
3605
|
+
r.errors = C, E = ie(P);
|
|
3593
3606
|
} else
|
|
3594
3607
|
await j(n);
|
|
3595
3608
|
if (a.disabled.size)
|
|
3596
3609
|
for (const C of a.disabled)
|
|
3597
|
-
re(
|
|
3610
|
+
re(E, C);
|
|
3598
3611
|
if (re(r.errors, "root"), fe(r.errors)) {
|
|
3599
3612
|
m.state.next({
|
|
3600
3613
|
errors: {}
|
|
3601
3614
|
});
|
|
3602
3615
|
try {
|
|
3603
|
-
await h(
|
|
3616
|
+
await h(E, g);
|
|
3604
3617
|
} catch (C) {
|
|
3605
3618
|
V = C;
|
|
3606
3619
|
}
|
|
@@ -3615,9 +3628,9 @@ function ba(e = {}) {
|
|
|
3615
3628
|
}), V)
|
|
3616
3629
|
throw V;
|
|
3617
3630
|
}, Pt = (h, p = {}) => {
|
|
3618
|
-
|
|
3631
|
+
F(n, h) && (ee(p.defaultValue) ? X(h, ie(F(i, h))) : (X(h, p.defaultValue), Z(i, h, ie(p.defaultValue))), p.keepTouched || re(r.touchedFields, h), p.keepDirty || (re(r.dirtyFields, h), r.isDirty = p.defaultValue ? B(h, ie(F(i, h))) : B()), p.keepError || (re(r.errors, h), c.isValid && b()), m.state.next({ ...r }));
|
|
3619
3632
|
}, Bt = (h, p = {}) => {
|
|
3620
|
-
const g = h ? ie(h) : i, V = ie(g),
|
|
3633
|
+
const g = h ? ie(h) : i, V = ie(g), E = fe(h), C = E ? i : V;
|
|
3621
3634
|
if (p.keepDefaultValues || (i = g), !p.keepValues) {
|
|
3622
3635
|
if (p.keepDirtyValues) {
|
|
3623
3636
|
const P = /* @__PURE__ */ new Set([
|
|
@@ -3625,11 +3638,11 @@ function ba(e = {}) {
|
|
|
3625
3638
|
...Object.keys(wt(i, s))
|
|
3626
3639
|
]);
|
|
3627
3640
|
for (const U of Array.from(P))
|
|
3628
|
-
|
|
3641
|
+
F(r.dirtyFields, U) ? Z(C, U, F(s, U)) : X(U, F(C, U));
|
|
3629
3642
|
} else {
|
|
3630
3643
|
if (Tr && ee(h))
|
|
3631
3644
|
for (const P of a.mount) {
|
|
3632
|
-
const U =
|
|
3645
|
+
const U = F(n, P);
|
|
3633
3646
|
if (U && U._f) {
|
|
3634
3647
|
const z = Array.isArray(U._f.refs) ? U._f.refs[0] : U._f.ref;
|
|
3635
3648
|
if (tr(z)) {
|
|
@@ -3643,7 +3656,7 @@ function ba(e = {}) {
|
|
|
3643
3656
|
}
|
|
3644
3657
|
if (p.keepFieldsRef)
|
|
3645
3658
|
for (const P of a.mount)
|
|
3646
|
-
X(P,
|
|
3659
|
+
X(P, F(C, P));
|
|
3647
3660
|
else
|
|
3648
3661
|
n = {};
|
|
3649
3662
|
}
|
|
@@ -3661,21 +3674,21 @@ function ba(e = {}) {
|
|
|
3661
3674
|
watch: /* @__PURE__ */ new Set(),
|
|
3662
3675
|
watchAll: !1,
|
|
3663
3676
|
focus: ""
|
|
3664
|
-
}, o.mount = !
|
|
3677
|
+
}, o.mount = !c.isValid || !!p.keepIsValid || !!p.keepDirtyValues, o.watch = !!t.shouldUnregister, m.state.next({
|
|
3665
3678
|
submitCount: p.keepSubmitCount ? r.submitCount : 0,
|
|
3666
|
-
isDirty:
|
|
3679
|
+
isDirty: E ? !1 : p.keepDirty ? r.isDirty : !!(p.keepDefaultValues && !Pe(h, i)),
|
|
3667
3680
|
isSubmitted: p.keepIsSubmitted ? r.isSubmitted : !1,
|
|
3668
|
-
dirtyFields:
|
|
3681
|
+
dirtyFields: E ? {} : p.keepDirtyValues ? p.keepDefaultValues && s ? wt(i, s) : r.dirtyFields : p.keepDefaultValues && h ? wt(i, h) : p.keepDirty ? r.dirtyFields : {},
|
|
3669
3682
|
touchedFields: p.keepTouched ? r.touchedFields : {},
|
|
3670
3683
|
errors: p.keepErrors ? r.errors : {},
|
|
3671
3684
|
isSubmitSuccessful: p.keepIsSubmitSuccessful ? r.isSubmitSuccessful : !1,
|
|
3672
3685
|
isSubmitting: !1
|
|
3673
3686
|
});
|
|
3674
3687
|
}, Rt = (h, p) => Bt(Oe(h) ? h(s) : h, p), jt = (h, p = {}) => {
|
|
3675
|
-
const g =
|
|
3688
|
+
const g = F(n, h), V = g && g._f;
|
|
3676
3689
|
if (V) {
|
|
3677
|
-
const
|
|
3678
|
-
|
|
3690
|
+
const E = V.refs ? V.refs[0] : V.ref;
|
|
3691
|
+
E.focus && (E.focus(), p.shouldSelect && Oe(E.select) && E.select());
|
|
3679
3692
|
}
|
|
3680
3693
|
}, It = (h) => {
|
|
3681
3694
|
r = {
|
|
@@ -3684,20 +3697,20 @@ function ba(e = {}) {
|
|
|
3684
3697
|
};
|
|
3685
3698
|
}, $t = {
|
|
3686
3699
|
control: {
|
|
3687
|
-
register:
|
|
3700
|
+
register: Xe,
|
|
3688
3701
|
unregister: Ie,
|
|
3689
3702
|
getFieldState: st,
|
|
3690
3703
|
handleSubmit: Mt,
|
|
3691
|
-
setError:
|
|
3704
|
+
setError: ze,
|
|
3692
3705
|
_subscribe: Ce,
|
|
3693
3706
|
_runSchema: k,
|
|
3694
3707
|
_focusError: gt,
|
|
3695
3708
|
_getWatch: D,
|
|
3696
3709
|
_getDirty: B,
|
|
3697
|
-
_setValid:
|
|
3698
|
-
_setFieldArray:
|
|
3710
|
+
_setValid: b,
|
|
3711
|
+
_setFieldArray: M,
|
|
3699
3712
|
_setDisabledField: Se,
|
|
3700
|
-
_setErrors:
|
|
3713
|
+
_setErrors: _,
|
|
3701
3714
|
_getFieldArray: I,
|
|
3702
3715
|
_reset: Bt,
|
|
3703
3716
|
_resetDefaultValues: () => Oe(t.defaultValues) && t.defaultValues().then((h) => {
|
|
@@ -3708,7 +3721,7 @@ function ba(e = {}) {
|
|
|
3708
3721
|
_removeUnmounted: H,
|
|
3709
3722
|
_disableForm: bt,
|
|
3710
3723
|
_subjects: m,
|
|
3711
|
-
_proxyFormState:
|
|
3724
|
+
_proxyFormState: c,
|
|
3712
3725
|
get _fields() {
|
|
3713
3726
|
return n;
|
|
3714
3727
|
},
|
|
@@ -3743,18 +3756,18 @@ function ba(e = {}) {
|
|
|
3743
3756
|
};
|
|
3744
3757
|
}
|
|
3745
3758
|
},
|
|
3746
|
-
subscribe:
|
|
3759
|
+
subscribe: Ze,
|
|
3747
3760
|
trigger: ue,
|
|
3748
|
-
register:
|
|
3761
|
+
register: Xe,
|
|
3749
3762
|
handleSubmit: Mt,
|
|
3750
3763
|
watch: je,
|
|
3751
3764
|
setValue: X,
|
|
3752
3765
|
getValues: Te,
|
|
3753
3766
|
reset: Rt,
|
|
3754
3767
|
resetField: Pt,
|
|
3755
|
-
clearErrors:
|
|
3768
|
+
clearErrors: qe,
|
|
3756
3769
|
unregister: Ie,
|
|
3757
|
-
setError:
|
|
3770
|
+
setError: ze,
|
|
3758
3771
|
setFocus: jt,
|
|
3759
3772
|
getFieldState: st
|
|
3760
3773
|
};
|
|
@@ -3821,7 +3834,7 @@ function ya(e = {}) {
|
|
|
3821
3834
|
});
|
|
3822
3835
|
}
|
|
3823
3836
|
}, [s, n.isDirty]), R.useEffect(() => {
|
|
3824
|
-
e.values && !
|
|
3837
|
+
e.values && !Pe(e.values, r.current) ? (s._reset(e.values, {
|
|
3825
3838
|
keepFieldsRef: !0,
|
|
3826
3839
|
...s._options.resetOptions
|
|
3827
3840
|
}), r.current = e.values, i((o) => ({ ...o }))) : s._resetDefaultValues();
|
|
@@ -3831,7 +3844,7 @@ function ya(e = {}) {
|
|
|
3831
3844
|
}
|
|
3832
3845
|
const xn = (e, t, r) => {
|
|
3833
3846
|
if (e && "reportValidity" in e) {
|
|
3834
|
-
const n =
|
|
3847
|
+
const n = F(r, t);
|
|
3835
3848
|
e.setCustomValidity(n && n.message || ""), e.reportValidity();
|
|
3836
3849
|
}
|
|
3837
3850
|
}, Ni = (e, t) => {
|
|
@@ -3843,9 +3856,9 @@ const xn = (e, t, r) => {
|
|
|
3843
3856
|
t.shouldUseNativeValidation && Ni(e, t);
|
|
3844
3857
|
const r = {};
|
|
3845
3858
|
for (const n in e) {
|
|
3846
|
-
const i =
|
|
3859
|
+
const i = F(t.fields, n), s = Object.assign(e[n] || {}, { ref: i && i.ref });
|
|
3847
3860
|
if (xa(t.names || Object.keys(e), n)) {
|
|
3848
|
-
const o = Object.assign({},
|
|
3861
|
+
const o = Object.assign({}, F(r, n));
|
|
3849
3862
|
Z(o, "root", s), Z(r, n, o);
|
|
3850
3863
|
} else Z(r, n, s);
|
|
3851
3864
|
}
|
|
@@ -3865,10 +3878,10 @@ function Na(e, t, r) {
|
|
|
3865
3878
|
return l && l.then ? l.then(void 0, a) : l;
|
|
3866
3879
|
}(0, function(o) {
|
|
3867
3880
|
if (!o.inner) throw o;
|
|
3868
|
-
return { values: {}, errors: wa((a = o, l = !s.shouldUseNativeValidation && s.criteriaMode === "all", (a.inner || []).reduce(function(f,
|
|
3869
|
-
if (f[
|
|
3870
|
-
var d = f[
|
|
3871
|
-
f[
|
|
3881
|
+
return { values: {}, errors: wa((a = o, l = !s.shouldUseNativeValidation && s.criteriaMode === "all", (a.inner || []).reduce(function(f, c) {
|
|
3882
|
+
if (f[c.path] || (f[c.path] = { message: c.message, type: c.type }), l) {
|
|
3883
|
+
var d = f[c.path].types, m = d && d[c.type];
|
|
3884
|
+
f[c.path] = pi(c.path, l, f, c.type, m ? [].concat(m, c.message) : c.message);
|
|
3872
3885
|
}
|
|
3873
3886
|
return f;
|
|
3874
3887
|
}, {})), s) };
|
|
@@ -3891,7 +3904,7 @@ function wl({
|
|
|
3891
3904
|
onSubmit: l = () => null,
|
|
3892
3905
|
onChange: f
|
|
3893
3906
|
}) {
|
|
3894
|
-
const
|
|
3907
|
+
const c = ya({
|
|
3895
3908
|
mode: n,
|
|
3896
3909
|
reValidateMode: i,
|
|
3897
3910
|
defaultValues: s,
|
|
@@ -3899,14 +3912,14 @@ function wl({
|
|
|
3899
3912
|
});
|
|
3900
3913
|
return ce(() => {
|
|
3901
3914
|
if (!f) return;
|
|
3902
|
-
const { unsubscribe: d } =
|
|
3915
|
+
const { unsubscribe: d } = c.watch(f);
|
|
3903
3916
|
return d;
|
|
3904
|
-
}, [f,
|
|
3917
|
+
}, [f, c.watch]), /* @__PURE__ */ u(ia, { ...c, children: /* @__PURE__ */ u(
|
|
3905
3918
|
"form",
|
|
3906
3919
|
{
|
|
3907
|
-
className:
|
|
3920
|
+
className: S("bbn-form", e),
|
|
3908
3921
|
name: t,
|
|
3909
|
-
onSubmit:
|
|
3922
|
+
onSubmit: c.handleSubmit(l),
|
|
3910
3923
|
...a,
|
|
3911
3924
|
children: r
|
|
3912
3925
|
}
|
|
@@ -3920,13 +3933,13 @@ function mt({
|
|
|
3920
3933
|
shouldUnregister: i = !1,
|
|
3921
3934
|
validateOnMount: s = !0
|
|
3922
3935
|
}) {
|
|
3923
|
-
const { setFocus: o, trigger: a } = ht(), { field: l, fieldState: f } = sa({ name: e, defaultValue: t, disabled: r, shouldUnregister: i }), { invalid:
|
|
3936
|
+
const { setFocus: o, trigger: a } = ht(), { field: l, fieldState: f } = sa({ name: e, defaultValue: t, disabled: r, shouldUnregister: i }), { invalid: c, isTouched: d, error: m } = f;
|
|
3924
3937
|
return ce(() => {
|
|
3925
3938
|
s ? a(e, { shouldFocus: n }) : n && o(e);
|
|
3926
3939
|
}, [e, s]), {
|
|
3927
3940
|
...l,
|
|
3928
3941
|
value: l.value,
|
|
3929
|
-
invalid:
|
|
3942
|
+
invalid: c && d,
|
|
3930
3943
|
error: (m == null ? void 0 : m.message) ?? ""
|
|
3931
3944
|
};
|
|
3932
3945
|
}
|
|
@@ -3946,42 +3959,42 @@ function Nl({
|
|
|
3946
3959
|
autoFocus: a,
|
|
3947
3960
|
defaultValue: l,
|
|
3948
3961
|
placeholder: f,
|
|
3949
|
-
type:
|
|
3962
|
+
type: c,
|
|
3950
3963
|
suffix: d,
|
|
3951
3964
|
prefix: m,
|
|
3952
3965
|
shouldUnregister: v,
|
|
3953
3966
|
state: x,
|
|
3954
|
-
validateOnMount:
|
|
3967
|
+
validateOnMount: b
|
|
3955
3968
|
}) {
|
|
3956
3969
|
const {
|
|
3957
|
-
ref:
|
|
3958
|
-
value:
|
|
3970
|
+
ref: y,
|
|
3971
|
+
value: M = "",
|
|
3959
3972
|
error: w,
|
|
3960
|
-
invalid:
|
|
3961
|
-
onChange:
|
|
3962
|
-
onBlur:
|
|
3963
|
-
} = mt({ name: e, defaultValue: l, autoFocus: a, shouldUnregister: v, validateOnMount:
|
|
3964
|
-
return /* @__PURE__ */
|
|
3973
|
+
invalid: _,
|
|
3974
|
+
onChange: O,
|
|
3975
|
+
onBlur: L
|
|
3976
|
+
} = mt({ name: e, defaultValue: l, autoFocus: a, shouldUnregister: v, validateOnMount: b }), A = _ ? "error" : x;
|
|
3977
|
+
return /* @__PURE__ */ u(lr, { label: r, className: s, state: A, hint: _ ? w : n, children: /* @__PURE__ */ u(
|
|
3965
3978
|
Vr,
|
|
3966
3979
|
{
|
|
3967
3980
|
inputMode: "decimal",
|
|
3968
3981
|
pattern: "^-?\\d*\\.?\\d*$",
|
|
3969
|
-
ref:
|
|
3970
|
-
value:
|
|
3982
|
+
ref: y,
|
|
3983
|
+
value: M,
|
|
3971
3984
|
id: t,
|
|
3972
3985
|
name: e,
|
|
3973
|
-
type:
|
|
3986
|
+
type: c,
|
|
3974
3987
|
className: i,
|
|
3975
3988
|
disabled: o,
|
|
3976
3989
|
autoFocus: a,
|
|
3977
3990
|
placeholder: f,
|
|
3978
3991
|
suffix: d,
|
|
3979
3992
|
prefix: m,
|
|
3980
|
-
state:
|
|
3993
|
+
state: A,
|
|
3981
3994
|
onChange: (j) => {
|
|
3982
|
-
Ca.test(j.target.value) &&
|
|
3995
|
+
Ca.test(j.target.value) && O(j.target.value);
|
|
3983
3996
|
},
|
|
3984
|
-
onBlur:
|
|
3997
|
+
onBlur: L
|
|
3985
3998
|
}
|
|
3986
3999
|
) });
|
|
3987
4000
|
}
|
|
@@ -3996,38 +4009,38 @@ function Cl({
|
|
|
3996
4009
|
autoFocus: a,
|
|
3997
4010
|
defaultValue: l,
|
|
3998
4011
|
placeholder: f,
|
|
3999
|
-
type:
|
|
4012
|
+
type: c,
|
|
4000
4013
|
suffix: d,
|
|
4001
4014
|
prefix: m,
|
|
4002
4015
|
shouldUnregister: v,
|
|
4003
4016
|
state: x,
|
|
4004
|
-
validateOnMount:
|
|
4017
|
+
validateOnMount: b
|
|
4005
4018
|
}) {
|
|
4006
4019
|
const {
|
|
4007
|
-
ref:
|
|
4008
|
-
value:
|
|
4020
|
+
ref: y,
|
|
4021
|
+
value: M = "",
|
|
4009
4022
|
error: w,
|
|
4010
|
-
invalid:
|
|
4011
|
-
onChange:
|
|
4012
|
-
onBlur:
|
|
4013
|
-
} = mt({ name: e, defaultValue: l, autoFocus: a, shouldUnregister: v, validateOnMount:
|
|
4014
|
-
return /* @__PURE__ */
|
|
4023
|
+
invalid: _,
|
|
4024
|
+
onChange: O,
|
|
4025
|
+
onBlur: L
|
|
4026
|
+
} = mt({ name: e, defaultValue: l, autoFocus: a, shouldUnregister: v, validateOnMount: b }), A = _ ? "error" : x;
|
|
4027
|
+
return /* @__PURE__ */ u(lr, { label: r, className: s, state: A, hint: _ ? w : n, children: /* @__PURE__ */ u(
|
|
4015
4028
|
Vr,
|
|
4016
4029
|
{
|
|
4017
|
-
ref:
|
|
4018
|
-
value:
|
|
4030
|
+
ref: y,
|
|
4031
|
+
value: M,
|
|
4019
4032
|
id: t,
|
|
4020
4033
|
name: e,
|
|
4021
|
-
type:
|
|
4034
|
+
type: c,
|
|
4022
4035
|
className: i,
|
|
4023
4036
|
disabled: o,
|
|
4024
4037
|
autoFocus: a,
|
|
4025
4038
|
placeholder: f,
|
|
4026
4039
|
suffix: d,
|
|
4027
4040
|
prefix: m,
|
|
4028
|
-
state:
|
|
4029
|
-
onChange:
|
|
4030
|
-
onBlur:
|
|
4041
|
+
state: A,
|
|
4042
|
+
onChange: O,
|
|
4043
|
+
onBlur: L
|
|
4031
4044
|
}
|
|
4032
4045
|
) });
|
|
4033
4046
|
}
|
|
@@ -4042,13 +4055,13 @@ function kl({
|
|
|
4042
4055
|
labelClassName: a,
|
|
4043
4056
|
orientation: l
|
|
4044
4057
|
}) {
|
|
4045
|
-
const { ref: f, value:
|
|
4046
|
-
return /* @__PURE__ */
|
|
4058
|
+
const { ref: f, value: c = !1, onChange: d, onBlur: m } = mt({ name: e });
|
|
4059
|
+
return /* @__PURE__ */ u(
|
|
4047
4060
|
Ri,
|
|
4048
4061
|
{
|
|
4049
4062
|
ref: f,
|
|
4050
4063
|
name: e,
|
|
4051
|
-
checked:
|
|
4064
|
+
checked: c,
|
|
4052
4065
|
id: t,
|
|
4053
4066
|
label: r,
|
|
4054
4067
|
className: n,
|
|
@@ -4074,11 +4087,11 @@ function Ol({
|
|
|
4074
4087
|
}) {
|
|
4075
4088
|
const {
|
|
4076
4089
|
ref: f,
|
|
4077
|
-
value:
|
|
4090
|
+
value: c,
|
|
4078
4091
|
onChange: d,
|
|
4079
4092
|
onBlur: m
|
|
4080
4093
|
} = mt({ name: e, disabled: i, defaultValue: o ? s : void 0 });
|
|
4081
|
-
return /* @__PURE__ */
|
|
4094
|
+
return /* @__PURE__ */ u(
|
|
4082
4095
|
Ii,
|
|
4083
4096
|
{
|
|
4084
4097
|
ref: f,
|
|
@@ -4087,7 +4100,7 @@ function Ol({
|
|
|
4087
4100
|
label: r,
|
|
4088
4101
|
className: n,
|
|
4089
4102
|
disabled: i,
|
|
4090
|
-
checked:
|
|
4103
|
+
checked: c === s,
|
|
4091
4104
|
value: s,
|
|
4092
4105
|
labelClassName: a,
|
|
4093
4106
|
orientation: l,
|
|
@@ -4106,34 +4119,34 @@ function El({
|
|
|
4106
4119
|
label: a,
|
|
4107
4120
|
hint: l,
|
|
4108
4121
|
className: f,
|
|
4109
|
-
controlClassName:
|
|
4122
|
+
controlClassName: c,
|
|
4110
4123
|
disabled: d,
|
|
4111
4124
|
autoFocus: m,
|
|
4112
4125
|
defaultValue: v,
|
|
4113
4126
|
placeholder: x,
|
|
4114
|
-
shouldUnregister:
|
|
4115
|
-
state:
|
|
4116
|
-
validateOnMount:
|
|
4127
|
+
shouldUnregister: b,
|
|
4128
|
+
state: y,
|
|
4129
|
+
validateOnMount: M,
|
|
4117
4130
|
onOpen: w,
|
|
4118
|
-
onClose:
|
|
4119
|
-
renderSelectedOption:
|
|
4131
|
+
onClose: _,
|
|
4132
|
+
renderSelectedOption: O
|
|
4120
4133
|
}) {
|
|
4121
4134
|
const {
|
|
4122
|
-
ref:
|
|
4123
|
-
value:
|
|
4135
|
+
ref: L,
|
|
4136
|
+
value: A = "",
|
|
4124
4137
|
error: k,
|
|
4125
4138
|
invalid: $,
|
|
4126
4139
|
onChange: j,
|
|
4127
4140
|
onBlur: H
|
|
4128
|
-
} = mt({ name: s, defaultValue: v, autoFocus: m, shouldUnregister:
|
|
4129
|
-
return /* @__PURE__ */
|
|
4141
|
+
} = mt({ name: s, defaultValue: v, autoFocus: m, shouldUnregister: b, validateOnMount: M }), B = $ ? "error" : y;
|
|
4142
|
+
return /* @__PURE__ */ u(lr, { label: a, className: c, state: B, hint: $ ? k : l, children: /* @__PURE__ */ u(
|
|
4130
4143
|
Un,
|
|
4131
4144
|
{
|
|
4132
4145
|
open: e,
|
|
4133
4146
|
defaultOpen: t,
|
|
4134
4147
|
options: r,
|
|
4135
|
-
ref:
|
|
4136
|
-
value:
|
|
4148
|
+
ref: L,
|
|
4149
|
+
value: A,
|
|
4137
4150
|
id: o,
|
|
4138
4151
|
name: s,
|
|
4139
4152
|
className: f,
|
|
@@ -4146,15 +4159,15 @@ function El({
|
|
|
4146
4159
|
onBlur: H,
|
|
4147
4160
|
onOpen: w,
|
|
4148
4161
|
onClose: () => {
|
|
4149
|
-
H == null || H(),
|
|
4162
|
+
H == null || H(), _ == null || _();
|
|
4150
4163
|
},
|
|
4151
|
-
renderSelectedOption:
|
|
4164
|
+
renderSelectedOption: O
|
|
4152
4165
|
}
|
|
4153
4166
|
) });
|
|
4154
4167
|
}
|
|
4155
4168
|
function ka({ displayError: e = !1, ...t }) {
|
|
4156
|
-
const { error: r, value: n, onChange: i, onBlur: s, disabled: o, name: a, ref: l } = mt(t), f = /* @__PURE__ */
|
|
4157
|
-
return e ? /* @__PURE__ */
|
|
4169
|
+
const { error: r, value: n, onChange: i, onBlur: s, disabled: o, name: a, ref: l } = mt(t), f = /* @__PURE__ */ u("input", { ref: l, type: "hidden", name: a, disabled: o, value: n, onChange: i, onBlur: s });
|
|
4170
|
+
return e ? /* @__PURE__ */ u(lr, { hint: e ? r : "", state: e ? "error" : "default", children: f }) : f;
|
|
4158
4171
|
}
|
|
4159
4172
|
const Oa = {
|
|
4160
4173
|
lg: {
|
|
@@ -4171,7 +4184,7 @@ const Oa = {
|
|
|
4171
4184
|
}
|
|
4172
4185
|
}, Ea = ({ logoUrl: e, rank: t, moniker: r, size: n = "md", className: i }) => {
|
|
4173
4186
|
const [s, o] = oe(!1), a = Oa[n], l = (r == null ? void 0 : r.charAt(0).toUpperCase()) ?? String(t);
|
|
4174
|
-
return /* @__PURE__ */
|
|
4187
|
+
return /* @__PURE__ */ u("span", { className: be("relative inline-block", a.logo, i), children: e && !s ? /* @__PURE__ */ u(
|
|
4175
4188
|
"img",
|
|
4176
4189
|
{
|
|
4177
4190
|
src: e,
|
|
@@ -4179,7 +4192,7 @@ const Oa = {
|
|
|
4179
4192
|
className: "h-full w-full rounded-full object-cover",
|
|
4180
4193
|
onError: () => o(!0)
|
|
4181
4194
|
}
|
|
4182
|
-
) : /* @__PURE__ */
|
|
4195
|
+
) : /* @__PURE__ */ u(
|
|
4183
4196
|
W,
|
|
4184
4197
|
{
|
|
4185
4198
|
as: "span",
|
|
@@ -4189,13 +4202,13 @@ const Oa = {
|
|
|
4189
4202
|
) });
|
|
4190
4203
|
};
|
|
4191
4204
|
function Ci({ bsnId: e, bsnName: t, bsnLogoUrl: r, address: n, provider: i, onRemove: s }) {
|
|
4192
|
-
var f,
|
|
4205
|
+
var f, c;
|
|
4193
4206
|
if (!i) return null;
|
|
4194
4207
|
const o = () => {
|
|
4195
4208
|
if (r)
|
|
4196
|
-
return /* @__PURE__ */
|
|
4209
|
+
return /* @__PURE__ */ u(Yt, { url: r, alt: t, variant: "rounded", size: "tiny", className: "mr-1" });
|
|
4197
4210
|
const d = (t == null ? void 0 : t.charAt(0).toUpperCase()) || "?";
|
|
4198
|
-
return /* @__PURE__ */
|
|
4211
|
+
return /* @__PURE__ */ u(Yt, { variant: "rounded", size: "tiny", className: "mr-1", children: /* @__PURE__ */ u(
|
|
4199
4212
|
W,
|
|
4200
4213
|
{
|
|
4201
4214
|
as: "span",
|
|
@@ -4203,13 +4216,13 @@ function Ci({ bsnId: e, bsnName: t, bsnLogoUrl: r, address: n, provider: i, onRe
|
|
|
4203
4216
|
children: d
|
|
4204
4217
|
}
|
|
4205
4218
|
) });
|
|
4206
|
-
}, a = (d) => !d || d.length <=
|
|
4219
|
+
}, a = (d) => !d || d.length <= 12 ? d : `${d.slice(0, 6)}...${d.slice(-6)}`, l = () => n ? /* @__PURE__ */ u("div", { className: "text-xs text-accent-secondary", children: a(n) }) : /* @__PURE__ */ N("div", { className: "flex items-center text-xs text-accent-secondary", children: [
|
|
4207
4220
|
o(),
|
|
4208
4221
|
t
|
|
4209
4222
|
] });
|
|
4210
4223
|
return /* @__PURE__ */ N("div", { className: "flex flex-row items-center justify-between", children: [
|
|
4211
4224
|
/* @__PURE__ */ N("div", { className: "flex h-10 flex-row gap-2", children: [
|
|
4212
|
-
/* @__PURE__ */
|
|
4225
|
+
/* @__PURE__ */ u("div", { className: "shrink-0", children: /* @__PURE__ */ u(
|
|
4213
4226
|
Ea,
|
|
4214
4227
|
{
|
|
4215
4228
|
logoUrl: i.logo_url,
|
|
@@ -4220,15 +4233,15 @@ function Ci({ bsnId: e, bsnName: t, bsnLogoUrl: r, address: n, provider: i, onRe
|
|
|
4220
4233
|
) }),
|
|
4221
4234
|
/* @__PURE__ */ N("div", { className: "flex flex-col justify-center text-accent-primary", children: [
|
|
4222
4235
|
l(),
|
|
4223
|
-
/* @__PURE__ */
|
|
4236
|
+
/* @__PURE__ */ u(W, { as: "div", className: "text-base font-medium text-accent-primary", children: (c = i.description) == null ? void 0 : c.moniker })
|
|
4224
4237
|
] })
|
|
4225
4238
|
] }),
|
|
4226
|
-
s ? /* @__PURE__ */
|
|
4239
|
+
s ? /* @__PURE__ */ u(
|
|
4227
4240
|
"button",
|
|
4228
4241
|
{
|
|
4229
4242
|
onClick: () => s(e),
|
|
4230
4243
|
className: "ml-[10px] flex items-center justify-center cursor-pointer p-1",
|
|
4231
|
-
children: /* @__PURE__ */
|
|
4244
|
+
children: /* @__PURE__ */ u(Yn, { size: 12 })
|
|
4232
4245
|
}
|
|
4233
4246
|
) : null
|
|
4234
4247
|
] });
|
|
@@ -4240,20 +4253,20 @@ const Sl = ({
|
|
|
4240
4253
|
isSelectable: n = !0,
|
|
4241
4254
|
onSelect: i
|
|
4242
4255
|
}) => /* @__PURE__ */ N("div", { className: "bg-secondary-highlight h-[316px] overflow-hidden p-4 flex flex-col rounded justify-between", children: [
|
|
4243
|
-
/* @__PURE__ */
|
|
4244
|
-
/* @__PURE__ */
|
|
4256
|
+
/* @__PURE__ */ u(Ci, { ...t }),
|
|
4257
|
+
/* @__PURE__ */ u("div", { className: "w-full h-px bg-secondary-strokeLight" }),
|
|
4245
4258
|
Object.entries(e).map(([s, o]) => /* @__PURE__ */ N(
|
|
4246
4259
|
"div",
|
|
4247
4260
|
{
|
|
4248
4261
|
className: "text-sm flex flex-row justify-between first:mt-0 mt-1",
|
|
4249
4262
|
children: [
|
|
4250
|
-
/* @__PURE__ */
|
|
4251
|
-
/* @__PURE__ */
|
|
4263
|
+
/* @__PURE__ */ u("div", { className: "text-accent-secondary", children: s }),
|
|
4264
|
+
/* @__PURE__ */ u("div", { className: "text-accent-primary font-medium", children: o })
|
|
4252
4265
|
]
|
|
4253
4266
|
},
|
|
4254
4267
|
s
|
|
4255
4268
|
)),
|
|
4256
|
-
i && /* @__PURE__ */
|
|
4269
|
+
i && /* @__PURE__ */ u(
|
|
4257
4270
|
lt,
|
|
4258
4271
|
{
|
|
4259
4272
|
className: "mt-4",
|
|
@@ -4274,24 +4287,24 @@ const Sl = ({
|
|
|
4274
4287
|
min: a,
|
|
4275
4288
|
step: l,
|
|
4276
4289
|
autoFocus: f,
|
|
4277
|
-
onChange:
|
|
4290
|
+
onChange: c,
|
|
4278
4291
|
onKeyDown: d,
|
|
4279
4292
|
amountUsd: m,
|
|
4280
4293
|
disabled: v = !1
|
|
4281
4294
|
}) => /* @__PURE__ */ N(rt, { children: [
|
|
4282
4295
|
/* @__PURE__ */ N("div", { className: "flex w-full flex-row content-center items-center justify-between font-normal", children: [
|
|
4283
4296
|
/* @__PURE__ */ N("div", { className: "flex items-center gap-2", children: [
|
|
4284
|
-
/* @__PURE__ */
|
|
4285
|
-
/* @__PURE__ */
|
|
4297
|
+
/* @__PURE__ */ u("img", { src: t, alt: r, className: "h-10 max-h-[2.5rem] w-10 max-w-[2.5rem]" }),
|
|
4298
|
+
/* @__PURE__ */ u("div", { className: "text-lg", children: r })
|
|
4286
4299
|
] }),
|
|
4287
|
-
/* @__PURE__ */
|
|
4300
|
+
/* @__PURE__ */ u(
|
|
4288
4301
|
"input",
|
|
4289
4302
|
{
|
|
4290
4303
|
type: "number",
|
|
4291
4304
|
value: e ?? "",
|
|
4292
4305
|
min: a,
|
|
4293
4306
|
step: l,
|
|
4294
|
-
onChange:
|
|
4307
|
+
onChange: c,
|
|
4295
4308
|
onKeyDown: d,
|
|
4296
4309
|
disabled: v,
|
|
4297
4310
|
placeholder: n,
|
|
@@ -4301,7 +4314,7 @@ const Sl = ({
|
|
|
4301
4314
|
)
|
|
4302
4315
|
] }),
|
|
4303
4316
|
o && s ? /* @__PURE__ */ N("div", { className: "flex w-full flex-row content-center justify-between text-sm", children: [
|
|
4304
|
-
/* @__PURE__ */
|
|
4317
|
+
/* @__PURE__ */ u("span", { className: "cursor-default", children: i }),
|
|
4305
4318
|
o.displayUSD && o.price !== void 0 && /* @__PURE__ */ N("div", { children: [
|
|
4306
4319
|
m,
|
|
4307
4320
|
" USD"
|
|
@@ -4344,7 +4357,7 @@ var pt = 1e9, Aa = {
|
|
|
4344
4357
|
// The natural logarithm of 10.
|
|
4345
4358
|
// 115 digits
|
|
4346
4359
|
LN10: "2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"
|
|
4347
|
-
}, Hr, K = !0, Ne = "[DecimalError] ", Qe = Ne + "Invalid argument: ", $r = Ne + "Exponent out of range: ", vt = Math.floor,
|
|
4360
|
+
}, Hr, K = !0, Ne = "[DecimalError] ", Qe = Ne + "Invalid argument: ", $r = Ne + "Exponent out of range: ", vt = Math.floor, Ye = Math.pow, Fa = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, pe, se = 1e7, G = 7, ki = 9007199254740991, ir = vt(ki / G), T = {};
|
|
4348
4361
|
T.absoluteValue = T.abs = function() {
|
|
4349
4362
|
var e = new this.constructor(this);
|
|
4350
4363
|
return e.s && (e.s = 1), e;
|
|
@@ -4459,9 +4472,9 @@ T.squareRoot = T.sqrt = function() {
|
|
|
4459
4472
|
return K = !0, Y(n, r);
|
|
4460
4473
|
};
|
|
4461
4474
|
T.times = T.mul = function(e) {
|
|
4462
|
-
var t, r, n, i, s, o, a, l, f,
|
|
4463
|
-
if (!
|
|
4464
|
-
for (e.s *=
|
|
4475
|
+
var t, r, n, i, s, o, a, l, f, c = this, d = c.constructor, m = c.d, v = (e = new d(e)).d;
|
|
4476
|
+
if (!c.s || !e.s) return new d(0);
|
|
4477
|
+
for (e.s *= c.s, r = c.e + e.e, l = m.length, f = v.length, l < f && (s = m, m = v, v = s, o = l, l = f, f = o), s = [], o = l + f, n = o; n--; ) s.push(0);
|
|
4465
4478
|
for (n = f; --n >= 0; ) {
|
|
4466
4479
|
for (t = 0, i = l + n; i > n; )
|
|
4467
4480
|
a = s[i] + v[n] * m[i - n - 1] + t, s[i--] = a % se | 0, t = a / se | 0;
|
|
@@ -4490,7 +4503,7 @@ T.toNumber = function() {
|
|
|
4490
4503
|
return +this;
|
|
4491
4504
|
};
|
|
4492
4505
|
T.toPower = T.pow = function(e) {
|
|
4493
|
-
var t, r, n, i, s, o, a = this, l = a.constructor, f = 12,
|
|
4506
|
+
var t, r, n, i, s, o, a = this, l = a.constructor, f = 12, c = +(e = new l(e));
|
|
4494
4507
|
if (!e.s) return new l(pe);
|
|
4495
4508
|
if (a = new l(a), !a.s) {
|
|
4496
4509
|
if (e.s < 1) throw Error(Ne + "Infinity");
|
|
@@ -4499,7 +4512,7 @@ T.toPower = T.pow = function(e) {
|
|
|
4499
4512
|
if (a.eq(pe)) return a;
|
|
4500
4513
|
if (n = l.precision, e.eq(pe)) return Y(a, n);
|
|
4501
4514
|
if (t = e.e, r = e.d.length - 1, o = t >= r, s = a.s, o) {
|
|
4502
|
-
if ((r =
|
|
4515
|
+
if ((r = c < 0 ? -c : c) <= ki) {
|
|
4503
4516
|
for (i = new l(pe), t = Math.ceil(n / G + 4), K = !1; r % 2 && (i = i.times(a), Cn(i.d, t)), r = vt(r / 2), r !== 0; )
|
|
4504
4517
|
a = a.times(a), Cn(a.d, t);
|
|
4505
4518
|
return K = !0, e.s < 0 ? new l(pe).div(i) : Y(i, n);
|
|
@@ -4520,9 +4533,9 @@ T.toString = T.valueOf = T.val = T.toJSON = T[Symbol.for("nodejs.util.inspect.cu
|
|
|
4520
4533
|
return tt(e, t <= r.toExpNeg || t >= r.toExpPos);
|
|
4521
4534
|
};
|
|
4522
4535
|
function Oi(e, t) {
|
|
4523
|
-
var r, n, i, s, o, a, l, f,
|
|
4536
|
+
var r, n, i, s, o, a, l, f, c = e.constructor, d = c.precision;
|
|
4524
4537
|
if (!e.s || !t.s)
|
|
4525
|
-
return t.s || (t = new
|
|
4538
|
+
return t.s || (t = new c(e)), K ? Y(t, d) : t;
|
|
4526
4539
|
if (l = e.d, f = t.d, o = e.e, i = t.e, l = l.slice(), s = o - i, s) {
|
|
4527
4540
|
for (s < 0 ? (n = l, s = -s, a = f.length) : (n = f, i = o, a = l.length), o = Math.ceil(d / G), a = o > a ? o + 1 : a + 1, s > a && (s = a, n.length = 1), n.reverse(); s--; ) n.push(0);
|
|
4528
4541
|
n.reverse();
|
|
@@ -4572,34 +4585,34 @@ var Be = /* @__PURE__ */ function() {
|
|
|
4572
4585
|
for (; !n[0] && n.length > 1; ) n.shift();
|
|
4573
4586
|
}
|
|
4574
4587
|
return function(n, i, s, o) {
|
|
4575
|
-
var a, l, f,
|
|
4588
|
+
var a, l, f, c, d, m, v, x, b, y, M, w, _, O, L, A, k, $, j = n.constructor, H = n.s == i.s ? 1 : -1, B = n.d, D = i.d;
|
|
4576
4589
|
if (!n.s) return new j(n);
|
|
4577
4590
|
if (!i.s) throw Error(Ne + "Division by zero");
|
|
4578
|
-
for (l = n.e - i.e, k = D.length,
|
|
4591
|
+
for (l = n.e - i.e, k = D.length, L = B.length, v = new j(H), x = v.d = [], f = 0; D[f] == (B[f] || 0); ) ++f;
|
|
4579
4592
|
if (D[f] > (B[f] || 0) && --l, s == null ? w = s = j.precision : o ? w = s + (ne(n) - ne(i)) + 1 : w = s, w < 0) return new j(0);
|
|
4580
4593
|
if (w = w / G + 2 | 0, f = 0, k == 1)
|
|
4581
|
-
for (
|
|
4582
|
-
|
|
4594
|
+
for (c = 0, D = D[0], w++; (f < L || c) && w--; f++)
|
|
4595
|
+
_ = c * se + (B[f] || 0), x[f] = _ / D | 0, c = _ % D | 0;
|
|
4583
4596
|
else {
|
|
4584
|
-
for (
|
|
4585
|
-
$ = D.slice(), $.unshift(0),
|
|
4597
|
+
for (c = se / (D[0] + 1) | 0, c > 1 && (D = e(D, c), B = e(B, c), k = D.length, L = B.length), O = k, b = B.slice(0, k), y = b.length; y < k; ) b[y++] = 0;
|
|
4598
|
+
$ = D.slice(), $.unshift(0), A = D[0], D[1] >= se / 2 && ++A;
|
|
4586
4599
|
do
|
|
4587
|
-
|
|
4588
|
-
while ((
|
|
4600
|
+
c = 0, a = t(D, b, k, y), a < 0 ? (M = b[0], k != y && (M = M * se + (b[1] || 0)), c = M / A | 0, c > 1 ? (c >= se && (c = se - 1), d = e(D, c), m = d.length, y = b.length, a = t(d, b, m, y), a == 1 && (c--, r(d, k < m ? $ : D, m))) : (c == 0 && (a = c = 1), d = D.slice()), m = d.length, m < y && d.unshift(0), r(b, d, y), a == -1 && (y = b.length, a = t(D, b, k, y), a < 1 && (c++, r(b, k < y ? $ : D, y))), y = b.length) : a === 0 && (c++, b = [0]), x[f++] = c, a && b[0] ? b[y++] = B[O] || 0 : (b = [B[O]], y = 1);
|
|
4601
|
+
while ((O++ < L || b[0] !== void 0) && w--);
|
|
4589
4602
|
}
|
|
4590
4603
|
return x[0] || x.shift(), v.e = l, Y(v, o ? s + ne(v) + 1 : s);
|
|
4591
4604
|
};
|
|
4592
4605
|
}();
|
|
4593
4606
|
function Ei(e, t) {
|
|
4594
|
-
var r, n, i, s, o, a, l = 0, f = 0,
|
|
4607
|
+
var r, n, i, s, o, a, l = 0, f = 0, c = e.constructor, d = c.precision;
|
|
4595
4608
|
if (ne(e) > 16) throw Error($r + ne(e));
|
|
4596
|
-
if (!e.s) return new
|
|
4597
|
-
for (K = !1, a = d, o = new
|
|
4609
|
+
if (!e.s) return new c(pe);
|
|
4610
|
+
for (K = !1, a = d, o = new c(0.03125); e.abs().gte(0.1); )
|
|
4598
4611
|
e = e.times(o), f += 5;
|
|
4599
|
-
for (n = Math.log(
|
|
4612
|
+
for (n = Math.log(Ye(2, f)) / Math.LN10 * 2 + 5 | 0, a += n, r = i = s = new c(pe), c.precision = a; ; ) {
|
|
4600
4613
|
if (i = Y(i.times(e), a), r = r.times(++l), o = s.plus(Be(i, r, a)), Fe(o.d).slice(0, a) === Fe(s.d).slice(0, a)) {
|
|
4601
4614
|
for (; f--; ) s = Y(s.times(s), a);
|
|
4602
|
-
return
|
|
4615
|
+
return c.precision = d, t == null ? (K = !0, Y(s, d)) : s;
|
|
4603
4616
|
}
|
|
4604
4617
|
s = o;
|
|
4605
4618
|
}
|
|
@@ -4618,20 +4631,20 @@ function He(e) {
|
|
|
4618
4631
|
return t;
|
|
4619
4632
|
}
|
|
4620
4633
|
function At(e, t) {
|
|
4621
|
-
var r, n, i, s, o, a, l, f,
|
|
4634
|
+
var r, n, i, s, o, a, l, f, c, d = 1, m = 10, v = e, x = v.d, b = v.constructor, y = b.precision;
|
|
4622
4635
|
if (v.s < 1) throw Error(Ne + (v.s ? "NaN" : "-Infinity"));
|
|
4623
|
-
if (v.eq(pe)) return new
|
|
4624
|
-
if (t == null ? (K = !1, f =
|
|
4625
|
-
return t == null && (K = !0), mr(
|
|
4626
|
-
if (f += m,
|
|
4636
|
+
if (v.eq(pe)) return new b(0);
|
|
4637
|
+
if (t == null ? (K = !1, f = y) : f = t, v.eq(10))
|
|
4638
|
+
return t == null && (K = !0), mr(b, f);
|
|
4639
|
+
if (f += m, b.precision = f, r = Fe(x), n = r.charAt(0), s = ne(v), Math.abs(s) < 15e14) {
|
|
4627
4640
|
for (; n < 7 && n != 1 || n == 1 && r.charAt(1) > 3; )
|
|
4628
4641
|
v = v.times(e), r = Fe(v.d), n = r.charAt(0), d++;
|
|
4629
|
-
s = ne(v), n > 1 ? (v = new
|
|
4642
|
+
s = ne(v), n > 1 ? (v = new b("0." + r), s++) : v = new b(n + "." + r.slice(1));
|
|
4630
4643
|
} else
|
|
4631
|
-
return l = mr(
|
|
4632
|
-
for (a = o = v = Be(v.minus(pe), v.plus(pe), f),
|
|
4633
|
-
if (o = Y(o.times(
|
|
4634
|
-
return a = a.times(2), s !== 0 && (a = a.plus(mr(
|
|
4644
|
+
return l = mr(b, f + 2, y).times(s + ""), v = At(new b(n + "." + r.slice(1)), f - m).plus(l), b.precision = y, t == null ? (K = !0, Y(v, y)) : v;
|
|
4645
|
+
for (a = o = v = Be(v.minus(pe), v.plus(pe), f), c = Y(v.times(v), f), i = 3; ; ) {
|
|
4646
|
+
if (o = Y(o.times(c), f), l = a.plus(Be(o, new b(i), f)), Fe(l.d).slice(0, f) === Fe(a.d).slice(0, f))
|
|
4647
|
+
return a = a.times(2), s !== 0 && (a = a.plus(mr(b, f + 2, y).times(s + ""))), a = Be(a, new b(d), f), b.precision = y, t == null ? (K = !0, Y(a, y)) : a;
|
|
4635
4648
|
a = l, i += 2;
|
|
4636
4649
|
}
|
|
4637
4650
|
}
|
|
@@ -4652,26 +4665,26 @@ function Nn(e, t) {
|
|
|
4652
4665
|
return e;
|
|
4653
4666
|
}
|
|
4654
4667
|
function Y(e, t, r) {
|
|
4655
|
-
var n, i, s, o, a, l, f,
|
|
4668
|
+
var n, i, s, o, a, l, f, c, d = e.d;
|
|
4656
4669
|
for (o = 1, s = d[0]; s >= 10; s /= 10) o++;
|
|
4657
4670
|
if (n = t - o, n < 0)
|
|
4658
|
-
n += G, i = t, f = d[
|
|
4671
|
+
n += G, i = t, f = d[c = 0];
|
|
4659
4672
|
else {
|
|
4660
|
-
if (
|
|
4661
|
-
for (f = s = d[
|
|
4673
|
+
if (c = Math.ceil((n + 1) / G), s = d.length, c >= s) return e;
|
|
4674
|
+
for (f = s = d[c], o = 1; s >= 10; s /= 10) o++;
|
|
4662
4675
|
n %= G, i = n - G + o;
|
|
4663
4676
|
}
|
|
4664
|
-
if (r !== void 0 && (s =
|
|
4665
|
-
(n > 0 ? i > 0 ? f /
|
|
4666
|
-
return l ? (s = ne(e), d.length = 1, t = t - s - 1, d[0] =
|
|
4667
|
-
if (n == 0 ? (d.length =
|
|
4677
|
+
if (r !== void 0 && (s = Ye(10, o - i - 1), a = f / s % 10 | 0, l = t < 0 || d[c + 1] !== void 0 || f % s, l = r < 4 ? (a || l) && (r == 0 || r == (e.s < 0 ? 3 : 2)) : a > 5 || a == 5 && (r == 4 || l || r == 6 && // Check whether the digit to the left of the rounding digit is odd.
|
|
4678
|
+
(n > 0 ? i > 0 ? f / Ye(10, o - i) : 0 : d[c - 1]) % 10 & 1 || r == (e.s < 0 ? 8 : 7))), t < 1 || !d[0])
|
|
4679
|
+
return l ? (s = ne(e), d.length = 1, t = t - s - 1, d[0] = Ye(10, (G - t % G) % G), e.e = vt(-t / G) || 0) : (d.length = 1, d[0] = e.e = e.s = 0), e;
|
|
4680
|
+
if (n == 0 ? (d.length = c, s = 1, c--) : (d.length = c + 1, s = Ye(10, G - n), d[c] = i > 0 ? (f / Ye(10, o - i) % Ye(10, i) | 0) * s : 0), l)
|
|
4668
4681
|
for (; ; )
|
|
4669
|
-
if (
|
|
4682
|
+
if (c == 0) {
|
|
4670
4683
|
(d[0] += s) == se && (d[0] = 1, ++e.e);
|
|
4671
4684
|
break;
|
|
4672
4685
|
} else {
|
|
4673
|
-
if (d[
|
|
4674
|
-
d[
|
|
4686
|
+
if (d[c] += s, d[c] != se) break;
|
|
4687
|
+
d[c--] = 0, s = 1;
|
|
4675
4688
|
}
|
|
4676
4689
|
for (n = d.length; d[--n] === 0; ) d.pop();
|
|
4677
4690
|
if (K && (e.e > ir || e.e < -ir))
|
|
@@ -4679,21 +4692,21 @@ function Y(e, t, r) {
|
|
|
4679
4692
|
return e;
|
|
4680
4693
|
}
|
|
4681
4694
|
function Si(e, t) {
|
|
4682
|
-
var r, n, i, s, o, a, l, f,
|
|
4695
|
+
var r, n, i, s, o, a, l, f, c, d, m = e.constructor, v = m.precision;
|
|
4683
4696
|
if (!e.s || !t.s)
|
|
4684
4697
|
return t.s ? t.s = -t.s : t = new m(e), K ? Y(t, v) : t;
|
|
4685
4698
|
if (l = e.d, d = t.d, n = t.e, f = e.e, l = l.slice(), o = f - n, o) {
|
|
4686
|
-
for (
|
|
4699
|
+
for (c = o < 0, c ? (r = l, o = -o, a = d.length) : (r = d, n = f, a = l.length), i = Math.max(Math.ceil(v / G), a) + 2, o > i && (o = i, r.length = 1), r.reverse(), i = o; i--; ) r.push(0);
|
|
4687
4700
|
r.reverse();
|
|
4688
4701
|
} else {
|
|
4689
|
-
for (i = l.length, a = d.length,
|
|
4702
|
+
for (i = l.length, a = d.length, c = i < a, c && (a = i), i = 0; i < a; i++)
|
|
4690
4703
|
if (l[i] != d[i]) {
|
|
4691
|
-
|
|
4704
|
+
c = l[i] < d[i];
|
|
4692
4705
|
break;
|
|
4693
4706
|
}
|
|
4694
4707
|
o = 0;
|
|
4695
4708
|
}
|
|
4696
|
-
for (
|
|
4709
|
+
for (c && (r = l, l = d, d = r, t.s = -t.s), a = l.length, i = d.length - a; i > 0; --i) l[a++] = 0;
|
|
4697
4710
|
for (i = d.length; i > o; ) {
|
|
4698
4711
|
if (l[--i] < d[i]) {
|
|
4699
4712
|
for (s = i; s && l[--s] === 0; ) l[s] = se - 1;
|
|
@@ -4808,20 +4821,20 @@ const Ta = (e, t, r) => new Hr(e).toDecimalPlaces(t, r).toNumber(), Wr = 8, Ma =
|
|
|
4808
4821
|
step: a = "any",
|
|
4809
4822
|
autoFocus: l = !0
|
|
4810
4823
|
}) => {
|
|
4811
|
-
const f = mi({ name: e, defaultValue: "" }), { setValue:
|
|
4824
|
+
const f = mi({ name: e, defaultValue: "" }), { setValue: c } = ht(), d = parseFloat(f || "0"), m = Da(d, (s == null ? void 0 : s.price) ?? 0, {
|
|
4812
4825
|
zeroDisplay: "$0.00"
|
|
4813
|
-
}), v = (
|
|
4814
|
-
|
|
4826
|
+
}), v = (y) => {
|
|
4827
|
+
c(e, y.target.value, {
|
|
4815
4828
|
shouldValidate: !0,
|
|
4816
4829
|
shouldDirty: !0,
|
|
4817
4830
|
shouldTouch: !0
|
|
4818
4831
|
});
|
|
4819
|
-
}, x = (
|
|
4820
|
-
(
|
|
4821
|
-
},
|
|
4832
|
+
}, x = (y) => {
|
|
4833
|
+
(y.key === "ArrowUp" || y.key === "ArrowDown") && y.preventDefault();
|
|
4834
|
+
}, b = `Stakable: ${Ta(Number(s == null ? void 0 : s.balance), (s == null ? void 0 : s.decimals) ?? Wr)} ${s == null ? void 0 : s.symbol}`;
|
|
4822
4835
|
return /* @__PURE__ */ N(rt, { children: [
|
|
4823
|
-
/* @__PURE__ */
|
|
4824
|
-
/* @__PURE__ */
|
|
4836
|
+
/* @__PURE__ */ u(ka, { name: e, defaultValue: "" }),
|
|
4837
|
+
/* @__PURE__ */ u(Dr, { className: "flex w-full flex-col content-center justify-between gap-4", children: /* @__PURE__ */ u(
|
|
4825
4838
|
Sa,
|
|
4826
4839
|
{
|
|
4827
4840
|
amount: f,
|
|
@@ -4836,14 +4849,14 @@ const Ta = (e, t, r) => new Hr(e).toDecimalPlaces(t, r).toNumber(), Wr = 8, Ma =
|
|
|
4836
4849
|
onChange: v,
|
|
4837
4850
|
onKeyDown: x,
|
|
4838
4851
|
amountUsd: m,
|
|
4839
|
-
subtitle:
|
|
4852
|
+
subtitle: b
|
|
4840
4853
|
}
|
|
4841
4854
|
) })
|
|
4842
4855
|
] });
|
|
4843
4856
|
};
|
|
4844
4857
|
function Ba({ items: e, onRemove: t }) {
|
|
4845
|
-
const r =
|
|
4846
|
-
return r.length === 0 ? null : /* @__PURE__ */
|
|
4858
|
+
const r = We(() => e, [e]);
|
|
4859
|
+
return r.length === 0 ? null : /* @__PURE__ */ u("div", { className: "flex flex-col gap-8", children: r.map(({ bsnId: n, bsnName: i, bsnLogoUrl: s, provider: o }) => /* @__PURE__ */ u(
|
|
4847
4860
|
Ci,
|
|
4848
4861
|
{
|
|
4849
4862
|
bsnId: n,
|
|
@@ -4856,13 +4869,13 @@ function Ba({ items: e, onRemove: t }) {
|
|
|
4856
4869
|
)) });
|
|
4857
4870
|
}
|
|
4858
4871
|
function Fl({ max: e, items: t = [], actionText: r, onAdd: n, onRemove: i }) {
|
|
4859
|
-
const s =
|
|
4860
|
-
return /* @__PURE__ */
|
|
4861
|
-
/* @__PURE__ */
|
|
4862
|
-
/* @__PURE__ */
|
|
4863
|
-
/* @__PURE__ */
|
|
4872
|
+
const s = We(() => t.length, [t]);
|
|
4873
|
+
return /* @__PURE__ */ u(Dr, { children: /* @__PURE__ */ N("div", { className: "flex w-full flex-col gap-4", children: [
|
|
4874
|
+
/* @__PURE__ */ u("div", { className: "flex flex-row", children: /* @__PURE__ */ N("div", { className: "flex w-full flex-row content-center items-center justify-between font-normal", children: [
|
|
4875
|
+
/* @__PURE__ */ u("span", { className: "text-sm sm:text-base", children: r }),
|
|
4876
|
+
/* @__PURE__ */ u(Ko, { counter: s, max: e, onAdd: n })
|
|
4864
4877
|
] }) }),
|
|
4865
|
-
s > 0 && /* @__PURE__ */
|
|
4878
|
+
s > 0 && /* @__PURE__ */ u(Ba, { items: t, onRemove: i })
|
|
4866
4879
|
] }) });
|
|
4867
4880
|
}
|
|
4868
4881
|
function Ur({ title: e, children: t, className: r, hint: n }) {
|
|
@@ -4875,11 +4888,11 @@ function Ur({ title: e, children: t, className: r, hint: n }) {
|
|
|
4875
4888
|
r
|
|
4876
4889
|
),
|
|
4877
4890
|
children: [
|
|
4878
|
-
/* @__PURE__ */
|
|
4891
|
+
/* @__PURE__ */ u(W, { as: "div", variant: "body1", children: e }),
|
|
4879
4892
|
n ? /* @__PURE__ */ N("div", { className: "flex flex-col items-end", children: [
|
|
4880
|
-
/* @__PURE__ */
|
|
4881
|
-
/* @__PURE__ */
|
|
4882
|
-
] }) : /* @__PURE__ */
|
|
4893
|
+
/* @__PURE__ */ u(W, { as: "div", className: "flex items-center gap-2", children: t }),
|
|
4894
|
+
/* @__PURE__ */ u(W, { as: "div", variant: "body2", className: "text-accent-secondary", children: n })
|
|
4895
|
+
] }) : /* @__PURE__ */ u(W, { as: "div", className: "flex items-center gap-2", children: t })
|
|
4883
4896
|
]
|
|
4884
4897
|
}
|
|
4885
4898
|
);
|
|
@@ -4893,7 +4906,7 @@ function ja({ value: e, onEdit: t, title: r = "Network Fee Rate", className: n }
|
|
|
4893
4906
|
e,
|
|
4894
4907
|
" sats/vB"
|
|
4895
4908
|
] }),
|
|
4896
|
-
t && /* @__PURE__ */
|
|
4909
|
+
t && /* @__PURE__ */ u(lt, { size: "small", variant: "outlined", className: "h-6 w-6 pl-1 text-secondary-strokeDark", onClick: t, children: /* @__PURE__ */ u(Ra, { size: 16, className: "text-secondary-strokeDark" }) })
|
|
4897
4910
|
] });
|
|
4898
4911
|
}
|
|
4899
4912
|
function Ia({ amount: e, coinSymbol: t, hint: r, title: n, className: i, decimals: s = Wr }) {
|
|
@@ -4915,14 +4928,14 @@ function $a({ amount: e, coinSymbol: t, hint: r, title: n, className: i, decimal
|
|
|
4915
4928
|
function Ha({ total: e, coinSymbol: t, hint: r, title: n = "Total", className: i, decimals: s = Wr }) {
|
|
4916
4929
|
let o;
|
|
4917
4930
|
return typeof e == "number" ? e === 0 ? o = "0" : o = e.toFixed(s).replace(/0+$/, "").replace(/\.$/, "") : o = e, /* @__PURE__ */ N("div", { className: be("flex flex-row items-start justify-between text-accent-primary", i), children: [
|
|
4918
|
-
/* @__PURE__ */
|
|
4931
|
+
/* @__PURE__ */ u(W, { variant: "body1", className: "font-bold", children: n }),
|
|
4919
4932
|
/* @__PURE__ */ N("div", { className: "flex flex-col items-end justify-center", children: [
|
|
4920
4933
|
/* @__PURE__ */ N(W, { variant: "body1", className: "font-bold", children: [
|
|
4921
4934
|
o,
|
|
4922
4935
|
" ",
|
|
4923
4936
|
t
|
|
4924
4937
|
] }),
|
|
4925
|
-
r && /* @__PURE__ */
|
|
4938
|
+
r && /* @__PURE__ */ u(W, { variant: "body1", className: "text-sm text-accent-secondary", children: r })
|
|
4926
4939
|
] })
|
|
4927
4940
|
] });
|
|
4928
4941
|
}
|
|
@@ -4937,23 +4950,23 @@ function Ll({
|
|
|
4937
4950
|
totalHint: a,
|
|
4938
4951
|
bbnFeeAmount: l,
|
|
4939
4952
|
bbnCoinSymbol: f,
|
|
4940
|
-
bbnFeeAmountHint:
|
|
4953
|
+
bbnFeeAmountHint: c,
|
|
4941
4954
|
bbnFeeDecimals: d
|
|
4942
4955
|
}) {
|
|
4943
|
-
return /* @__PURE__ */
|
|
4944
|
-
/* @__PURE__ */
|
|
4945
|
-
/* @__PURE__ */
|
|
4946
|
-
l !== void 0 && f ? /* @__PURE__ */
|
|
4956
|
+
return /* @__PURE__ */ u(Dr, { className: be("flex w-full flex-col content-center justify-between gap-4", e), children: /* @__PURE__ */ N("div", { className: "flex flex-col gap-6 p-4", children: [
|
|
4957
|
+
/* @__PURE__ */ u(ja, { value: t, onEdit: r }),
|
|
4958
|
+
/* @__PURE__ */ u(Ia, { amount: n, coinSymbol: i, hint: s }),
|
|
4959
|
+
l !== void 0 && f ? /* @__PURE__ */ u(
|
|
4947
4960
|
$a,
|
|
4948
4961
|
{
|
|
4949
4962
|
amount: l,
|
|
4950
4963
|
coinSymbol: f,
|
|
4951
|
-
hint:
|
|
4964
|
+
hint: c,
|
|
4952
4965
|
decimals: d
|
|
4953
4966
|
}
|
|
4954
4967
|
) : null,
|
|
4955
|
-
/* @__PURE__ */
|
|
4956
|
-
/* @__PURE__ */
|
|
4968
|
+
/* @__PURE__ */ u("div", { className: "divider my-4" }),
|
|
4969
|
+
/* @__PURE__ */ u(Ha, { total: o, coinSymbol: i, hint: a })
|
|
4957
4970
|
] }) });
|
|
4958
4971
|
}
|
|
4959
4972
|
const Wa = ({ data: e }) => {
|
|
@@ -4961,21 +4974,21 @@ const Wa = ({ data: e }) => {
|
|
|
4961
4974
|
const t = e[0], r = e.slice(1), i = {
|
|
4962
4975
|
gridTemplateColumns: `repeat(${t.length}, minmax(0, 1fr))`
|
|
4963
4976
|
};
|
|
4964
|
-
return /* @__PURE__ */
|
|
4965
|
-
/* @__PURE__ */
|
|
4977
|
+
return /* @__PURE__ */ u(Xo, { className: "p-6 pt-4", children: /* @__PURE__ */ N("div", { className: "flex flex-col", children: [
|
|
4978
|
+
/* @__PURE__ */ u(
|
|
4966
4979
|
"div",
|
|
4967
4980
|
{
|
|
4968
4981
|
className: "items-center gap-4 pb-4 grid",
|
|
4969
4982
|
style: i,
|
|
4970
|
-
children: t.map((s, o) => /* @__PURE__ */
|
|
4983
|
+
children: t.map((s, o) => /* @__PURE__ */ u(W, { variant: "caption", className: "text-secondary text-center", children: s }, `header-${o}`))
|
|
4971
4984
|
}
|
|
4972
4985
|
),
|
|
4973
|
-
r.map((s, o) => /* @__PURE__ */
|
|
4986
|
+
r.map((s, o) => /* @__PURE__ */ u(
|
|
4974
4987
|
"div",
|
|
4975
4988
|
{
|
|
4976
4989
|
className: "items-center gap-4 rounded bg-primary-contrast p-1 grid",
|
|
4977
4990
|
style: i,
|
|
4978
|
-
children: s.map((a, l) => /* @__PURE__ */
|
|
4991
|
+
children: s.map((a, l) => /* @__PURE__ */ u(
|
|
4979
4992
|
"div",
|
|
4980
4993
|
{
|
|
4981
4994
|
className: "flex w-full items-center justify-center gap-2 py-1",
|
|
@@ -4990,7 +5003,7 @@ const Wa = ({ data: e }) => {
|
|
|
4990
5003
|
};
|
|
4991
5004
|
function Ua({ className: e, ...t }) {
|
|
4992
5005
|
const n = ii(Pa) ? Kn : go;
|
|
4993
|
-
return /* @__PURE__ */
|
|
5006
|
+
return /* @__PURE__ */ u(n, { ...t, className: be("w-[41.25rem] max-w-full", e) });
|
|
4994
5007
|
}
|
|
4995
5008
|
const Vl = ({
|
|
4996
5009
|
open: e,
|
|
@@ -5009,69 +5022,69 @@ const Vl = ({
|
|
|
5009
5022
|
label: "Term",
|
|
5010
5023
|
value: /* @__PURE__ */ N(rt, { children: [
|
|
5011
5024
|
o.term.blocks,
|
|
5012
|
-
/* @__PURE__ */
|
|
5013
|
-
/* @__PURE__ */
|
|
5025
|
+
/* @__PURE__ */ u("br", {}),
|
|
5026
|
+
/* @__PURE__ */ u("span", { className: "text-md text-secondary", children: o.term.duration })
|
|
5014
5027
|
] })
|
|
5015
5028
|
},
|
|
5016
5029
|
{ label: "Unbonding", value: o.unbonding },
|
|
5017
5030
|
{ label: "Unbonding Fee", value: o.unbondingFee }
|
|
5018
5031
|
];
|
|
5019
5032
|
return /* @__PURE__ */ N(Ua, { open: e, onClose: r, children: [
|
|
5020
|
-
/* @__PURE__ */
|
|
5033
|
+
/* @__PURE__ */ u(xo, { title: "Preview", onClose: r, className: "text-accent-primary" }),
|
|
5021
5034
|
/* @__PURE__ */ N(No, { className: "no-scrollbar mb-8 mt-4 flex max-h-[calc(100vh-12rem)] flex-col gap-4 overflow-y-auto text-accent-primary", children: [
|
|
5022
|
-
/* @__PURE__ */
|
|
5035
|
+
/* @__PURE__ */ u(
|
|
5023
5036
|
Wa,
|
|
5024
5037
|
{
|
|
5025
5038
|
data: [
|
|
5026
5039
|
["BSNs", "Finality Provider"],
|
|
5027
5040
|
...i.map((l, f) => {
|
|
5028
|
-
const
|
|
5041
|
+
const c = s[f];
|
|
5029
5042
|
return [
|
|
5030
5043
|
/* @__PURE__ */ N("div", { className: "flex w-full items-center justify-center gap-2 py-1", children: [
|
|
5031
5044
|
l.icon,
|
|
5032
|
-
/* @__PURE__ */
|
|
5045
|
+
/* @__PURE__ */ u(W, { variant: "body2", className: "font-medium", children: l.name })
|
|
5033
5046
|
] }, `bsn-${f}`),
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
/* @__PURE__ */
|
|
5037
|
-
] }, `fp-${f}`) : /* @__PURE__ */
|
|
5047
|
+
c ? /* @__PURE__ */ N("div", { className: "flex w-full items-center justify-center gap-2 py-1", children: [
|
|
5048
|
+
c.icon,
|
|
5049
|
+
/* @__PURE__ */ u(W, { variant: "body2", className: "font-medium", children: c.name })
|
|
5050
|
+
] }, `fp-${f}`) : /* @__PURE__ */ u("div", {}, `fp-${f}`)
|
|
5038
5051
|
];
|
|
5039
5052
|
})
|
|
5040
5053
|
]
|
|
5041
5054
|
}
|
|
5042
5055
|
),
|
|
5043
|
-
/* @__PURE__ */
|
|
5044
|
-
/* @__PURE__ */
|
|
5045
|
-
/* @__PURE__ */
|
|
5056
|
+
/* @__PURE__ */ u("div", { className: "flex flex-col", children: a.map((l, f) => /* @__PURE__ */ N("div", { className: "flex flex-row items-center justify-between py-3", children: [
|
|
5057
|
+
/* @__PURE__ */ u(W, { variant: "body1", className: "text-secondary font-normal", children: l.label }),
|
|
5058
|
+
/* @__PURE__ */ u(W, { variant: "body1", className: "text-right font-normal", children: l.value })
|
|
5046
5059
|
] }, f)) }),
|
|
5047
|
-
/* @__PURE__ */
|
|
5060
|
+
/* @__PURE__ */ u("div", { className: "border-divider w-full border-t" }),
|
|
5048
5061
|
/* @__PURE__ */ N("div", { className: "pt-2", children: [
|
|
5049
|
-
/* @__PURE__ */
|
|
5050
|
-
/* @__PURE__ */
|
|
5051
|
-
/* @__PURE__ */
|
|
5062
|
+
/* @__PURE__ */ u(Cr, { variant: "h6", className: "text-primary mb-2", children: "Attention!" }),
|
|
5063
|
+
/* @__PURE__ */ u(W, { variant: "body2", className: "text-secondary", children: "1. No third party possesses your staked BTC. You are the only one who can unbond and withdraw your stake." }),
|
|
5064
|
+
/* @__PURE__ */ u(W, { variant: "body2", className: "text-secondary", children: "2. Your stake will first be sent to Babylon Genesis for verification (~20 seconds), then you will be prompted to submit it to the Bitcoin ledger. It will be marked as 'Pending' until it receives 10 Bitcoin confirmations." })
|
|
5052
5065
|
] })
|
|
5053
5066
|
] }),
|
|
5054
5067
|
/* @__PURE__ */ N(Co, { className: "flex flex-col gap-4 pb-8 pt-0 sm:flex-row", children: [
|
|
5055
|
-
/* @__PURE__ */
|
|
5056
|
-
/* @__PURE__ */
|
|
5068
|
+
/* @__PURE__ */ u(lt, { variant: "contained", color: "primary", onClick: n, className: "w-full sm:flex-1 sm:order-2", disabled: t, children: t ? "Processing..." : "Proceed to Signing" }),
|
|
5069
|
+
/* @__PURE__ */ u(lt, { variant: "outlined", color: "primary", onClick: r, className: "w-full sm:flex-1 sm:order-1", children: "Cancel" })
|
|
5057
5070
|
] })
|
|
5058
5071
|
] });
|
|
5059
|
-
}, qa = ({ size: e = "md" }) => /* @__PURE__ */
|
|
5072
|
+
}, qa = ({ size: e = "md" }) => /* @__PURE__ */ u("div", { className: {
|
|
5060
5073
|
sm: "mt-2",
|
|
5061
5074
|
md: "mt-4",
|
|
5062
5075
|
lg: "mt-6"
|
|
5063
|
-
}[e] }), za = () => /* @__PURE__ */
|
|
5076
|
+
}[e] }), za = () => /* @__PURE__ */ u("svg", { width: "29", height: "28", viewBox: "0 0 29 28", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ u(
|
|
5064
5077
|
"path",
|
|
5065
5078
|
{
|
|
5066
5079
|
d: "M24.9127 15.3708C24.9711 14.9333 25.0002 14.4812 25.0002 14C25.0002 13.5333 24.9711 13.0667 24.8982 12.6292L27.8586 10.325C28.1211 10.1208 28.194 9.72708 28.0336 9.43542L25.2336 4.59375C25.0586 4.27292 24.694 4.17083 24.3732 4.27292L20.8877 5.67292C20.1586 5.11875 19.3857 4.65208 18.5252 4.30208L18.0002 0.597916C17.9419 0.247916 17.6502 0 17.3002 0H11.7002C11.3502 0 11.0732 0.247916 11.0148 0.597916L10.4898 4.30208C9.62941 4.65208 8.84191 5.13333 8.12732 5.67292L4.64191 4.27292C4.32107 4.15625 3.95649 4.27292 3.78149 4.59375L0.996075 9.43542C0.821075 9.74167 0.879408 10.1208 1.17107 10.325L4.13149 12.6292C4.05857 13.0667 4.00024 13.5479 4.00024 14C4.00024 14.4521 4.02941 14.9333 4.10232 15.3708L1.14191 17.675C0.879408 17.8792 0.806491 18.2729 0.966908 18.5646L3.76691 23.4062C3.94191 23.7271 4.30649 23.8292 4.62732 23.7271L8.11274 22.3271C8.84191 22.8812 9.61482 23.3479 10.4752 23.6979L11.0002 27.4021C11.0732 27.7521 11.3502 28 11.7002 28H17.3002C17.6502 28 17.9419 27.7521 17.9857 27.4021L18.5107 23.6979C19.3711 23.3479 20.1586 22.8812 20.8732 22.3271L24.3586 23.7271C24.6794 23.8438 25.044 23.7271 25.219 23.4062L28.019 18.5646C28.194 18.2437 28.1211 17.8792 27.844 17.675L24.9127 15.3708ZM14.5002 19.25C11.6127 19.25 9.25024 16.8875 9.25024 14C9.25024 11.1125 11.6127 8.75 14.5002 8.75C17.3877 8.75 19.7502 11.1125 19.7502 14C19.7502 16.8875 17.3877 19.25 14.5002 19.25Z",
|
|
5067
5080
|
fill: "#9E9E9E"
|
|
5068
5081
|
}
|
|
5069
|
-
) }), Fi = () => /* @__PURE__ */
|
|
5082
|
+
) }), Fi = () => /* @__PURE__ */ u("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ u("path", { d: "M9 18L15 12L9 6", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) }), Za = ({ children: e, className: t = "" }) => /* @__PURE__ */ u(W, { variant: "body1", className: S("px-7 pb-6 text-accent-primary md:hidden", t), children: e }), Xa = ({
|
|
5070
5083
|
background: e = "none",
|
|
5071
5084
|
backgroundClassName: t = "",
|
|
5072
5085
|
className: r = "",
|
|
5073
5086
|
children: n
|
|
5074
|
-
}) => /* @__PURE__ */
|
|
5087
|
+
}) => /* @__PURE__ */ u("div", { className: S((() => {
|
|
5075
5088
|
switch (e) {
|
|
5076
5089
|
case "secondary":
|
|
5077
5090
|
return "mx-[21px] rounded-lg bg-secondary-highlight md:mx-0 md:bg-transparent";
|
|
@@ -5080,7 +5093,7 @@ const Vl = ({
|
|
|
5080
5093
|
default:
|
|
5081
5094
|
return "";
|
|
5082
5095
|
}
|
|
5083
|
-
})(), r), children: n }), Ft = ({ children: e }) => /* @__PURE__ */
|
|
5096
|
+
})(), r), children: n }), Ft = ({ children: e }) => /* @__PURE__ */ u(rt, { children: e }), Li = ({
|
|
5084
5097
|
icon: e,
|
|
5085
5098
|
suffix: t,
|
|
5086
5099
|
onClick: r,
|
|
@@ -5093,12 +5106,12 @@ const Vl = ({
|
|
|
5093
5106
|
(m) => typeof m == "string" || R.isValidElement(m) && m.type !== Ft
|
|
5094
5107
|
), f = a.find(
|
|
5095
5108
|
(m) => R.isValidElement(m) && m.type === Ft
|
|
5096
|
-
),
|
|
5097
|
-
return /* @__PURE__ */
|
|
5109
|
+
), c = typeof l == "string" ? l : "", d = r ? /* @__PURE__ */ u(Fi, {}) : void 0;
|
|
5110
|
+
return /* @__PURE__ */ u(
|
|
5098
5111
|
Qo,
|
|
5099
5112
|
{
|
|
5100
5113
|
icon: e,
|
|
5101
|
-
name:
|
|
5114
|
+
name: c,
|
|
5102
5115
|
description: f ? f.props.children : void 0,
|
|
5103
5116
|
onClick: r,
|
|
5104
5117
|
disabled: n,
|
|
@@ -5113,18 +5126,18 @@ const Vl = ({
|
|
|
5113
5126
|
), s = n.find(
|
|
5114
5127
|
(l) => R.isValidElement(l) && l.type === Ft
|
|
5115
5128
|
), o = n.filter((l) => R.isValidElement(l) && l.type === Li);
|
|
5116
|
-
return /* @__PURE__ */
|
|
5129
|
+
return /* @__PURE__ */ u(
|
|
5117
5130
|
ea,
|
|
5118
5131
|
{
|
|
5119
5132
|
icon: e,
|
|
5120
5133
|
name: typeof i == "string" ? i : "",
|
|
5121
5134
|
description: s ? s.props.children : void 0,
|
|
5122
5135
|
className: t,
|
|
5123
|
-
suffix: /* @__PURE__ */
|
|
5136
|
+
suffix: /* @__PURE__ */ u(Fi, {}),
|
|
5124
5137
|
children: o
|
|
5125
5138
|
}
|
|
5126
5139
|
);
|
|
5127
|
-
}, Ga = ({ children: e, className: t = "" }) => /* @__PURE__ */
|
|
5140
|
+
}, Ga = ({ children: e, className: t = "" }) => /* @__PURE__ */ u("div", { className: t, children: e }), Ka = ({
|
|
5128
5141
|
trigger: e,
|
|
5129
5142
|
open: t,
|
|
5130
5143
|
onOpenChange: r,
|
|
@@ -5132,15 +5145,15 @@ const Vl = ({
|
|
|
5132
5145
|
className: i,
|
|
5133
5146
|
offset: s = [0, 8],
|
|
5134
5147
|
children: o
|
|
5135
|
-
}) => /* @__PURE__ */
|
|
5148
|
+
}) => /* @__PURE__ */ u(
|
|
5136
5149
|
si,
|
|
5137
5150
|
{
|
|
5138
|
-
trigger: e || /* @__PURE__ */
|
|
5151
|
+
trigger: e || /* @__PURE__ */ u(
|
|
5139
5152
|
"button",
|
|
5140
5153
|
{
|
|
5141
5154
|
className: "flex h-10 w-10 items-center justify-center rounded-lg transition-colors hover:bg-accent-primary/10",
|
|
5142
5155
|
"aria-label": "Settings menu",
|
|
5143
|
-
children: /* @__PURE__ */
|
|
5156
|
+
children: /* @__PURE__ */ u(za, {})
|
|
5144
5157
|
}
|
|
5145
5158
|
),
|
|
5146
5159
|
open: t,
|
|
@@ -5166,11 +5179,11 @@ const kn = ({
|
|
|
5166
5179
|
isCopied: i,
|
|
5167
5180
|
onCopy: s,
|
|
5168
5181
|
className: o
|
|
5169
|
-
}) => /* @__PURE__ */
|
|
5182
|
+
}) => /* @__PURE__ */ u("div", { className: S(
|
|
5170
5183
|
"bg-secondary-highlight dark:bg-secondary-strokeLight rounded-[4px] p-3 flex-1 md:p-4",
|
|
5171
5184
|
o
|
|
5172
5185
|
), children: /* @__PURE__ */ N("div", { className: "flex flex-col w-full", children: [
|
|
5173
|
-
/* @__PURE__ */
|
|
5186
|
+
/* @__PURE__ */ u("div", { className: "flex justify-start mb-2 md:mb-3", children: /* @__PURE__ */ u(
|
|
5174
5187
|
Yt,
|
|
5175
5188
|
{
|
|
5176
5189
|
alt: t || e,
|
|
@@ -5179,7 +5192,7 @@ const kn = ({
|
|
|
5179
5192
|
className: "w-8 h-8 md:w-10 md:h-10"
|
|
5180
5193
|
}
|
|
5181
5194
|
) }),
|
|
5182
|
-
/* @__PURE__ */
|
|
5195
|
+
/* @__PURE__ */ u("div", { className: "flex justify-start mb-[1px]", children: /* @__PURE__ */ N(
|
|
5183
5196
|
W,
|
|
5184
5197
|
{
|
|
5185
5198
|
variant: "body1",
|
|
@@ -5191,7 +5204,7 @@ const kn = ({
|
|
|
5191
5204
|
}
|
|
5192
5205
|
) }),
|
|
5193
5206
|
/* @__PURE__ */ N("div", { className: "flex items-center justify-between w-full", children: [
|
|
5194
|
-
/* @__PURE__ */
|
|
5207
|
+
/* @__PURE__ */ u("div", { className: "flex-1 min-w-0", children: i ? /* @__PURE__ */ u(W, { className: "text-accent-primary !text-sm truncate whitespace-nowrap", children: "Copied ✓" }) : /* @__PURE__ */ u(
|
|
5195
5208
|
oi,
|
|
5196
5209
|
{
|
|
5197
5210
|
className: "text-accent-primary !text-sm",
|
|
@@ -5199,12 +5212,12 @@ const kn = ({
|
|
|
5199
5212
|
symbols: 6
|
|
5200
5213
|
}
|
|
5201
5214
|
) }),
|
|
5202
|
-
/* @__PURE__ */
|
|
5215
|
+
/* @__PURE__ */ u(
|
|
5203
5216
|
"button",
|
|
5204
5217
|
{
|
|
5205
5218
|
onClick: s,
|
|
5206
5219
|
className: "flex-shrink-0 ml-3 p-1 rounded hover:bg-surface-tertiary transition-colors h-6 w-6 flex items-center justify-center hover:opacity-80",
|
|
5207
|
-
children: /* @__PURE__ */
|
|
5220
|
+
children: /* @__PURE__ */ u(Xn, { size: 14, className: "md:w-4 md:h-4" })
|
|
5208
5221
|
}
|
|
5209
5222
|
)
|
|
5210
5223
|
] })
|
|
@@ -5213,7 +5226,7 @@ const kn = ({
|
|
|
5213
5226
|
onChange: t,
|
|
5214
5227
|
className: r = "",
|
|
5215
5228
|
disabled: n = !1
|
|
5216
|
-
}) => /* @__PURE__ */
|
|
5229
|
+
}) => /* @__PURE__ */ u(
|
|
5217
5230
|
"button",
|
|
5218
5231
|
{
|
|
5219
5232
|
type: "button",
|
|
@@ -5221,7 +5234,7 @@ const kn = ({
|
|
|
5221
5234
|
n || t(!e);
|
|
5222
5235
|
},
|
|
5223
5236
|
disabled: n,
|
|
5224
|
-
className:
|
|
5237
|
+
className: S(
|
|
5225
5238
|
"relative inline-flex h-[31px] w-[55px] items-center rounded-full transition-colors duration-300 ease-in-out",
|
|
5226
5239
|
"focus:outline-none focus:ring-2 focus:ring-primary-main focus:ring-offset-2",
|
|
5227
5240
|
e ? "bg-primary-main dark:bg-primary-light" : "bg-[#78788029]",
|
|
@@ -5233,10 +5246,10 @@ const kn = ({
|
|
|
5233
5246
|
},
|
|
5234
5247
|
"aria-pressed": e,
|
|
5235
5248
|
"aria-label": "Toggle",
|
|
5236
|
-
children: /* @__PURE__ */
|
|
5249
|
+
children: /* @__PURE__ */ u(
|
|
5237
5250
|
"span",
|
|
5238
5251
|
{
|
|
5239
|
-
className:
|
|
5252
|
+
className: S(
|
|
5240
5253
|
"inline-block w-[27px] h-[27px] transform rounded-full bg-white transition-transform duration-300 ease-in-out",
|
|
5241
5254
|
"flex items-center justify-center shadow-sm",
|
|
5242
5255
|
e ? "translate-x-[26px]" : "translate-x-[2px]"
|
|
@@ -5251,14 +5264,14 @@ const kn = ({
|
|
|
5251
5264
|
value: n,
|
|
5252
5265
|
onChange: i,
|
|
5253
5266
|
className: s
|
|
5254
|
-
}) => /* @__PURE__ */ N("div", { className:
|
|
5267
|
+
}) => /* @__PURE__ */ N("div", { className: S(
|
|
5255
5268
|
"flex items-center justify-between w-full bg-secondary-highlight dark:bg-secondary-strokeLight rounded-[4px] p-3 md:bg-transparent md:dark:bg-transparent md:p-0 md:mb-0",
|
|
5256
5269
|
s
|
|
5257
5270
|
), children: [
|
|
5258
5271
|
/* @__PURE__ */ N("div", { className: "flex items-center gap-4", children: [
|
|
5259
5272
|
e,
|
|
5260
5273
|
/* @__PURE__ */ N("div", { className: "flex flex-col", children: [
|
|
5261
|
-
/* @__PURE__ */
|
|
5274
|
+
/* @__PURE__ */ u(
|
|
5262
5275
|
W,
|
|
5263
5276
|
{
|
|
5264
5277
|
variant: "body2",
|
|
@@ -5266,10 +5279,10 @@ const kn = ({
|
|
|
5266
5279
|
children: t
|
|
5267
5280
|
}
|
|
5268
5281
|
),
|
|
5269
|
-
/* @__PURE__ */
|
|
5282
|
+
/* @__PURE__ */ u(W, { className: "text-accent-secondary !text-xs", children: r })
|
|
5270
5283
|
] })
|
|
5271
5284
|
] }),
|
|
5272
|
-
/* @__PURE__ */
|
|
5285
|
+
/* @__PURE__ */ u(
|
|
5273
5286
|
Ja,
|
|
5274
5287
|
{
|
|
5275
5288
|
value: n,
|
|
@@ -5283,14 +5296,14 @@ const kn = ({
|
|
|
5283
5296
|
onCopy: n,
|
|
5284
5297
|
className: i,
|
|
5285
5298
|
icon: s
|
|
5286
|
-
}) => /* @__PURE__ */
|
|
5299
|
+
}) => /* @__PURE__ */ u("div", { className: S(
|
|
5287
5300
|
"flex items-center justify-between w-full bg-secondary-highlight dark:bg-secondary-strokeLight rounded-[4px] p-3 md:bg-transparent md:dark:bg-transparent md:p-0 md:mb-0",
|
|
5288
5301
|
i
|
|
5289
|
-
), children: /* @__PURE__ */
|
|
5290
|
-
s && /* @__PURE__ */
|
|
5302
|
+
), children: /* @__PURE__ */ u("div", { className: "flex flex-col w-full", children: /* @__PURE__ */ N("div", { className: "flex items-center gap-4 mb-3", children: [
|
|
5303
|
+
s && /* @__PURE__ */ u("div", { className: "flex-shrink-0", children: s }),
|
|
5291
5304
|
/* @__PURE__ */ N("div", { className: "flex w-full", children: [
|
|
5292
5305
|
/* @__PURE__ */ N("div", { className: "flex flex-col w-full", children: [
|
|
5293
|
-
/* @__PURE__ */
|
|
5306
|
+
/* @__PURE__ */ u(
|
|
5294
5307
|
W,
|
|
5295
5308
|
{
|
|
5296
5309
|
variant: "body2",
|
|
@@ -5298,7 +5311,7 @@ const kn = ({
|
|
|
5298
5311
|
children: e
|
|
5299
5312
|
}
|
|
5300
5313
|
),
|
|
5301
|
-
/* @__PURE__ */
|
|
5314
|
+
/* @__PURE__ */ u("div", { className: "flex items-center justify-between w-full", children: /* @__PURE__ */ u("div", { className: "flex-1 min-w-0", children: r ? /* @__PURE__ */ u(W, { className: "text-accent-secondary !text-xs truncate whitespace-nowrap", children: "Copied ✓" }) : /* @__PURE__ */ u(
|
|
5302
5315
|
oi,
|
|
5303
5316
|
{
|
|
5304
5317
|
className: "text-accent-secondary !text-xs",
|
|
@@ -5307,12 +5320,12 @@ const kn = ({
|
|
|
5307
5320
|
}
|
|
5308
5321
|
) }) })
|
|
5309
5322
|
] }),
|
|
5310
|
-
/* @__PURE__ */
|
|
5323
|
+
/* @__PURE__ */ u(
|
|
5311
5324
|
"button",
|
|
5312
5325
|
{
|
|
5313
5326
|
onClick: n,
|
|
5314
5327
|
className: "flex-shrink-0 ml-3 p-1 rounded hover:bg-surface-tertiary transition-colors h-6 w-6 flex items-center justify-center hover:opacity-80 self-center",
|
|
5315
|
-
children: /* @__PURE__ */
|
|
5328
|
+
children: /* @__PURE__ */ u(Xn, { size: 16 })
|
|
5316
5329
|
}
|
|
5317
5330
|
)
|
|
5318
5331
|
] })
|
|
@@ -5327,43 +5340,43 @@ const kn = ({
|
|
|
5327
5340
|
onExcludeOrdinals: a,
|
|
5328
5341
|
onDisplayLinkedDelegations: l,
|
|
5329
5342
|
publicKeyNoCoord: f,
|
|
5330
|
-
onDisconnect:
|
|
5343
|
+
onDisconnect: c,
|
|
5331
5344
|
forceOpen: d = !1,
|
|
5332
5345
|
onOpenChange: m
|
|
5333
5346
|
}) => {
|
|
5334
|
-
var
|
|
5335
|
-
const { copyToClipboard: v, isCopied: x } = ai(), [
|
|
5336
|
-
|
|
5347
|
+
var _, O, L, A;
|
|
5348
|
+
const { copyToClipboard: v, isCopied: x } = ai(), [b, y] = oe(d), M = ae((k) => {
|
|
5349
|
+
y(k), m == null || m(k);
|
|
5337
5350
|
}, [m]), w = ae(() => {
|
|
5338
|
-
|
|
5339
|
-
}, [
|
|
5340
|
-
return /* @__PURE__ */
|
|
5351
|
+
y(!1), c();
|
|
5352
|
+
}, [c]);
|
|
5353
|
+
return /* @__PURE__ */ u(
|
|
5341
5354
|
si,
|
|
5342
5355
|
{
|
|
5343
5356
|
trigger: e,
|
|
5344
|
-
open:
|
|
5345
|
-
onOpenChange:
|
|
5357
|
+
open: b,
|
|
5358
|
+
onOpenChange: M,
|
|
5346
5359
|
mobileMode: "dialog",
|
|
5347
5360
|
className: "shadow-lg border border-[#38708533] bg-[#FFFFFF] dark:bg-[#252525] dark:border-[#404040] rounded-lg",
|
|
5348
5361
|
children: /* @__PURE__ */ N("div", { className: "p-4 space-y-6 w-full text-primary-main", children: [
|
|
5349
5362
|
/* @__PURE__ */ N("div", { className: "flex flex-row gap-2 w-full md:flex-col overflow-x-auto", children: [
|
|
5350
|
-
/* @__PURE__ */
|
|
5363
|
+
/* @__PURE__ */ u(
|
|
5351
5364
|
kn,
|
|
5352
5365
|
{
|
|
5353
5366
|
walletType: "Bitcoin",
|
|
5354
|
-
walletName: (
|
|
5355
|
-
walletIcon: (
|
|
5367
|
+
walletName: (_ = n.BTC) == null ? void 0 : _.name,
|
|
5368
|
+
walletIcon: (O = n.BTC) == null ? void 0 : O.icon,
|
|
5356
5369
|
address: t,
|
|
5357
5370
|
isCopied: x("btc"),
|
|
5358
5371
|
onCopy: () => v("btc", t)
|
|
5359
5372
|
}
|
|
5360
5373
|
),
|
|
5361
|
-
/* @__PURE__ */
|
|
5374
|
+
/* @__PURE__ */ u(
|
|
5362
5375
|
kn,
|
|
5363
5376
|
{
|
|
5364
5377
|
walletType: "Babylon",
|
|
5365
|
-
walletName: (
|
|
5366
|
-
walletIcon: (
|
|
5378
|
+
walletName: (L = n.BBN) == null ? void 0 : L.name,
|
|
5379
|
+
walletIcon: (A = n.BBN) == null ? void 0 : A.icon,
|
|
5367
5380
|
address: r,
|
|
5368
5381
|
isCopied: x("bbn"),
|
|
5369
5382
|
onCopy: () => v("bbn", r)
|
|
@@ -5371,38 +5384,38 @@ const kn = ({
|
|
|
5371
5384
|
)
|
|
5372
5385
|
] }),
|
|
5373
5386
|
/* @__PURE__ */ N("div", { className: "flex flex-col gap-8 w-full", children: [
|
|
5374
|
-
/* @__PURE__ */
|
|
5387
|
+
/* @__PURE__ */ u(
|
|
5375
5388
|
On,
|
|
5376
5389
|
{
|
|
5377
|
-
icon: /* @__PURE__ */
|
|
5390
|
+
icon: /* @__PURE__ */ u(wo, {}),
|
|
5378
5391
|
title: "Using Inscriptions",
|
|
5379
5392
|
status: i ? "Off" : "On",
|
|
5380
5393
|
value: !i,
|
|
5381
5394
|
onChange: (k) => k ? o() : a()
|
|
5382
5395
|
}
|
|
5383
5396
|
),
|
|
5384
|
-
/* @__PURE__ */
|
|
5397
|
+
/* @__PURE__ */ u(
|
|
5385
5398
|
On,
|
|
5386
5399
|
{
|
|
5387
|
-
icon: /* @__PURE__ */
|
|
5400
|
+
icon: /* @__PURE__ */ u(yo, {}),
|
|
5388
5401
|
title: "Linked Wallet Stakes",
|
|
5389
5402
|
status: s ? "On" : "Off",
|
|
5390
5403
|
value: s,
|
|
5391
5404
|
onChange: l
|
|
5392
5405
|
}
|
|
5393
5406
|
),
|
|
5394
|
-
/* @__PURE__ */
|
|
5407
|
+
/* @__PURE__ */ u(
|
|
5395
5408
|
Qa,
|
|
5396
5409
|
{
|
|
5397
5410
|
title: "Bitcoin Public Key",
|
|
5398
5411
|
value: f,
|
|
5399
5412
|
isCopied: x("publicKey"),
|
|
5400
5413
|
onCopy: () => v("publicKey", f),
|
|
5401
|
-
icon: /* @__PURE__ */
|
|
5414
|
+
icon: /* @__PURE__ */ u(bo, {})
|
|
5402
5415
|
}
|
|
5403
5416
|
)
|
|
5404
5417
|
] }),
|
|
5405
|
-
/* @__PURE__ */
|
|
5418
|
+
/* @__PURE__ */ u("div", { className: "pt-2", children: /* @__PURE__ */ u(
|
|
5406
5419
|
Fn,
|
|
5407
5420
|
{
|
|
5408
5421
|
onClick: w,
|
|
@@ -5419,7 +5432,7 @@ const kn = ({
|
|
|
5419
5432
|
vertical: "horizontal"
|
|
5420
5433
|
};
|
|
5421
5434
|
function Dl({ className: e, orientation: t = "vertical", children: r }) {
|
|
5422
|
-
return /* @__PURE__ */
|
|
5435
|
+
return /* @__PURE__ */ u("div", { className: be("bbn-list-legacy", `bbn-list-legacy-${t}`, e), children: Xt.map(
|
|
5423
5436
|
r,
|
|
5424
5437
|
(n) => wr(n) ? yr(n, {
|
|
5425
5438
|
orientation: el[t]
|
|
@@ -5427,12 +5440,12 @@ function Dl({ className: e, orientation: t = "vertical", children: r }) {
|
|
|
5427
5440
|
) });
|
|
5428
5441
|
}
|
|
5429
5442
|
function Tl({ className: e, orientation: t = "horizontal", title: r, value: n, suffix: i }) {
|
|
5430
|
-
return /* @__PURE__ */ N("div", { className:
|
|
5431
|
-
/* @__PURE__ */
|
|
5443
|
+
return /* @__PURE__ */ N("div", { className: S("bbn-list-item-legacy", `bbn-list-item-legacy-${t}`, e), children: [
|
|
5444
|
+
/* @__PURE__ */ u(
|
|
5432
5445
|
W,
|
|
5433
5446
|
{
|
|
5434
5447
|
as: "div",
|
|
5435
|
-
className:
|
|
5448
|
+
className: S("bbn-list-title-legacy", `bbn-list-title-legacy-${t}`),
|
|
5436
5449
|
variant: t === "horizontal" ? "body1" : "body2",
|
|
5437
5450
|
children: r
|
|
5438
5451
|
}
|
|
@@ -5441,7 +5454,7 @@ function Tl({ className: e, orientation: t = "horizontal", title: r, value: n, s
|
|
|
5441
5454
|
W,
|
|
5442
5455
|
{
|
|
5443
5456
|
as: "div",
|
|
5444
|
-
className:
|
|
5457
|
+
className: S("bbn-list-value-legacy", `bbn-list-value-legacy-${t}`),
|
|
5445
5458
|
variant: "body1",
|
|
5446
5459
|
children: [
|
|
5447
5460
|
n,
|