lizaui 3.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +54 -0
- package/dist/button/index.cjs.js +2 -0
- package/dist/button/index.cjs.js.map +1 -0
- package/dist/button/index.es.js +5 -0
- package/dist/button/index.es.js.map +1 -0
- package/dist/button.d.ts +2 -0
- package/dist/calendar/index.cjs.js +425 -0
- package/dist/calendar/index.cjs.js.map +1 -0
- package/dist/calendar/index.es.js +6105 -0
- package/dist/calendar/index.es.js.map +1 -0
- package/dist/calendar.d.ts +2 -0
- package/dist/checkbox/index.cjs.js +2 -0
- package/dist/checkbox/index.cjs.js.map +1 -0
- package/dist/checkbox/index.es.js +6 -0
- package/dist/checkbox/index.es.js.map +1 -0
- package/dist/checkbox.d.ts +2 -0
- package/dist/chip/index.cjs.js +2 -0
- package/dist/chip/index.cjs.js.map +1 -0
- package/dist/chip/index.es.js +533 -0
- package/dist/chip/index.es.js.map +1 -0
- package/dist/chip.d.ts +2 -0
- package/dist/chunks/bundle-mjs-JiDEie86.js +2728 -0
- package/dist/chunks/bundle-mjs-JiDEie86.js.map +1 -0
- package/dist/chunks/bundle-mjs-W341Qwux.js +2 -0
- package/dist/chunks/bundle-mjs-W341Qwux.js.map +1 -0
- package/dist/chunks/button-CPpIQ7Z7.js +3971 -0
- package/dist/chunks/button-CPpIQ7Z7.js.map +1 -0
- package/dist/chunks/button-Dr5w6yIW.js +10 -0
- package/dist/chunks/button-Dr5w6yIW.js.map +1 -0
- package/dist/chunks/checkbox-C71XoTt2.js +2 -0
- package/dist/chunks/checkbox-C71XoTt2.js.map +1 -0
- package/dist/chunks/checkbox-DN309yjg.js +312 -0
- package/dist/chunks/checkbox-DN309yjg.js.map +1 -0
- package/dist/chunks/classes-7MXTIFwM.js +52 -0
- package/dist/chunks/classes-7MXTIFwM.js.map +1 -0
- package/dist/chunks/classes-P14wj2Ze.js +2 -0
- package/dist/chunks/classes-P14wj2Ze.js.map +1 -0
- package/dist/chunks/clsx-C11secjj.js +2 -0
- package/dist/chunks/clsx-C11secjj.js.map +1 -0
- package/dist/chunks/clsx-OuTLNxxd.js +17 -0
- package/dist/chunks/clsx-OuTLNxxd.js.map +1 -0
- package/dist/chunks/floating-ui.dom-9ZI0iiqa.js +2 -0
- package/dist/chunks/floating-ui.dom-9ZI0iiqa.js.map +1 -0
- package/dist/chunks/floating-ui.dom-PqoU7a4n.js +1134 -0
- package/dist/chunks/floating-ui.dom-PqoU7a4n.js.map +1 -0
- package/dist/chunks/floating-ui.react-dom-BQpCDpNU.js +2 -0
- package/dist/chunks/floating-ui.react-dom-BQpCDpNU.js.map +1 -0
- package/dist/chunks/floating-ui.react-dom-CihJ_dlB.js +204 -0
- package/dist/chunks/floating-ui.react-dom-CihJ_dlB.js.map +1 -0
- package/dist/chunks/iconBase-C4boY5mo.js +2 -0
- package/dist/chunks/iconBase-C4boY5mo.js.map +1 -0
- package/dist/chunks/iconBase-DSKTHwal.js +113 -0
- package/dist/chunks/iconBase-DSKTHwal.js.map +1 -0
- package/dist/chunks/index-CBDkd84T.js +2 -0
- package/dist/chunks/index-CBDkd84T.js.map +1 -0
- package/dist/chunks/index-C_b6-TON.js +78 -0
- package/dist/chunks/index-C_b6-TON.js.map +1 -0
- package/dist/chunks/jsx-runtime-BYq8_R6m.js +247 -0
- package/dist/chunks/jsx-runtime-BYq8_R6m.js.map +1 -0
- package/dist/chunks/jsx-runtime-DFswc9zO.js +2 -0
- package/dist/chunks/jsx-runtime-DFswc9zO.js.map +1 -0
- package/dist/chunks/pattern-CdQavADx.js +5 -0
- package/dist/chunks/pattern-CdQavADx.js.map +1 -0
- package/dist/chunks/pattern-F8jUniwt.js +2 -0
- package/dist/chunks/pattern-F8jUniwt.js.map +1 -0
- package/dist/chunks/refs-DLih6QCP.js +2 -0
- package/dist/chunks/refs-DLih6QCP.js.map +1 -0
- package/dist/chunks/refs-DcCOPvdv.js +35 -0
- package/dist/chunks/refs-DcCOPvdv.js.map +1 -0
- package/dist/chunks/select-BoiIj-gw.js +7 -0
- package/dist/chunks/select-BoiIj-gw.js.map +1 -0
- package/dist/chunks/select-Cy78fn6H.js +4267 -0
- package/dist/chunks/select-Cy78fn6H.js.map +1 -0
- package/dist/chunks/tooltip-BQVohLC7.js +2 -0
- package/dist/chunks/tooltip-BQVohLC7.js.map +1 -0
- package/dist/chunks/tooltip-CIcTjpF8.js +959 -0
- package/dist/chunks/tooltip-CIcTjpF8.js.map +1 -0
- package/dist/chunks/tv-ButAo3dF.js +2669 -0
- package/dist/chunks/tv-ButAo3dF.js.map +1 -0
- package/dist/chunks/tv-C5lw0tnu.js +2 -0
- package/dist/chunks/tv-C5lw0tnu.js.map +1 -0
- package/dist/chunks/utils-Blo0iNdk.js +15 -0
- package/dist/chunks/utils-Blo0iNdk.js.map +1 -0
- package/dist/chunks/utils-DuSyQWep.js +2 -0
- package/dist/chunks/utils-DuSyQWep.js.map +1 -0
- package/dist/chunks/v4-CRLUkzQ6.js +31 -0
- package/dist/chunks/v4-CRLUkzQ6.js.map +1 -0
- package/dist/chunks/v4-CqU37_Sa.js +2 -0
- package/dist/chunks/v4-CqU37_Sa.js.map +1 -0
- package/dist/chunks/variants-BUTPDD09.js +2 -0
- package/dist/chunks/variants-BUTPDD09.js.map +1 -0
- package/dist/chunks/variants-DhZQjbsQ.js +62 -0
- package/dist/chunks/variants-DhZQjbsQ.js.map +1 -0
- package/dist/components/button/button.d.ts +6 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/index.d.ts +4 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/spinner.d.ts +3 -0
- package/dist/components/button/spinner.d.ts.map +1 -0
- package/dist/components/button/use-button.d.ts +328 -0
- package/dist/components/button/use-button.d.ts.map +1 -0
- package/dist/components/calendar/date-picker/date-picker.d.ts +3 -0
- package/dist/components/calendar/date-picker/date-picker.d.ts.map +1 -0
- package/dist/components/calendar/date-picker/date-picker.style.d.ts +9 -0
- package/dist/components/calendar/date-picker/date-picker.style.d.ts.map +1 -0
- package/dist/components/calendar/date-picker/interface/date-picker.interface.d.ts +38 -0
- package/dist/components/calendar/date-picker/interface/date-picker.interface.d.ts.map +1 -0
- package/dist/components/calendar/icon/icon-calendar.d.ts +11 -0
- package/dist/components/calendar/icon/icon-calendar.d.ts.map +1 -0
- package/dist/components/calendar/index.d.ts +2 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/calendar/interface/calendar-shared.interface.d.ts +4 -0
- package/dist/components/calendar/interface/calendar-shared.interface.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox-icon.d.ts +9 -0
- package/dist/components/checkbox/checkbox-icon.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +7 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/index.d.ts +5 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/use-checkbox.d.ts +57 -0
- package/dist/components/checkbox/use-checkbox.d.ts.map +1 -0
- package/dist/components/chip/chip.d.ts +6 -0
- package/dist/components/chip/chip.d.ts.map +1 -0
- package/dist/components/chip/index.d.ts +4 -0
- package/dist/components/chip/index.d.ts.map +1 -0
- package/dist/components/chip/use-chip.d.ts +441 -0
- package/dist/components/chip/use-chip.d.ts.map +1 -0
- package/dist/components/divider/divider.d.ts +6 -0
- package/dist/components/divider/divider.d.ts.map +1 -0
- package/dist/components/divider/index.d.ts +4 -0
- package/dist/components/divider/index.d.ts.map +1 -0
- package/dist/components/divider/use-divider.d.ts +19 -0
- package/dist/components/divider/use-divider.d.ts.map +1 -0
- package/dist/components/divider/use-separator.d.ts +22 -0
- package/dist/components/divider/use-separator.d.ts.map +1 -0
- package/dist/components/icons/close-filled.d.ts +3 -0
- package/dist/components/icons/close-filled.d.ts.map +1 -0
- package/dist/components/index.d.ts +5 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/pagination/function/index.d.ts +7 -0
- package/dist/components/pagination/function/index.d.ts.map +1 -0
- package/dist/components/pagination/hook/use-pagination.d.ts +3 -0
- package/dist/components/pagination/hook/use-pagination.d.ts.map +1 -0
- package/dist/components/pagination/index.d.ts +4 -0
- package/dist/components/pagination/index.d.ts.map +1 -0
- package/dist/components/pagination/interface/pagination-share.interface.d.ts +10 -0
- package/dist/components/pagination/interface/pagination-share.interface.d.ts.map +1 -0
- package/dist/components/pagination/interface/pagination.interface.d.ts +26 -0
- package/dist/components/pagination/interface/pagination.interface.d.ts.map +1 -0
- package/dist/components/pagination/pagination-item.d.ts +3 -0
- package/dist/components/pagination/pagination-item.d.ts.map +1 -0
- package/dist/components/pagination/pagination.d.ts +3 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -0
- package/dist/components/ripple/ripple.d.ts +20 -0
- package/dist/components/ripple/ripple.d.ts.map +1 -0
- package/dist/components/ripple/use-ripple.d.ts +10 -0
- package/dist/components/ripple/use-ripple.d.ts.map +1 -0
- package/dist/components/select/autocomplete/autocomplete.d.ts +3 -0
- package/dist/components/select/autocomplete/autocomplete.d.ts.map +1 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/select/select.d.ts +3 -0
- package/dist/components/select/select.d.ts.map +1 -0
- package/dist/components/select/style/select-theme.style.d.ts +4 -0
- package/dist/components/select/style/select-theme.style.d.ts.map +1 -0
- package/dist/components/select/sub-component/clear-indicator.d.ts +3 -0
- package/dist/components/select/sub-component/clear-indicator.d.ts.map +1 -0
- package/dist/components/select/sub-component/control-start.d.ts +3 -0
- package/dist/components/select/sub-component/control-start.d.ts.map +1 -0
- package/dist/components/select/sub-component/dropdown-indicator.d.ts +3 -0
- package/dist/components/select/sub-component/dropdown-indicator.d.ts.map +1 -0
- package/dist/components/select/sub-component/index.d.ts +9 -0
- package/dist/components/select/sub-component/index.d.ts.map +1 -0
- package/dist/components/select/sub-component/input-select.d.ts +3 -0
- package/dist/components/select/sub-component/input-select.d.ts.map +1 -0
- package/dist/components/select/sub-component/loading-indicator.d.ts +3 -0
- package/dist/components/select/sub-component/loading-indicator.d.ts.map +1 -0
- package/dist/components/select/sub-component/loading-message.d.ts +3 -0
- package/dist/components/select/sub-component/loading-message.d.ts.map +1 -0
- package/dist/components/select/sub-component/no-option-message.d.ts +3 -0
- package/dist/components/select/sub-component/no-option-message.d.ts.map +1 -0
- package/dist/components/select/sub-component/option-item.d.ts +3 -0
- package/dist/components/select/sub-component/option-item.d.ts.map +1 -0
- package/dist/components/select/sub-component/single-value.d.ts +3 -0
- package/dist/components/select/sub-component/single-value.d.ts.map +1 -0
- package/dist/components/table/body/table-body-column.d.ts +4 -0
- package/dist/components/table/body/table-body-column.d.ts.map +1 -0
- package/dist/components/table/body/table-body-row.d.ts +3 -0
- package/dist/components/table/body/table-body-row.d.ts.map +1 -0
- package/dist/components/table/body/table-body.d.ts +4 -0
- package/dist/components/table/body/table-body.d.ts.map +1 -0
- package/dist/components/table/context/table.context.d.ts +3 -0
- package/dist/components/table/context/table.context.d.ts.map +1 -0
- package/dist/components/table/header/table-header-column.d.ts +4 -0
- package/dist/components/table/header/table-header-column.d.ts.map +1 -0
- package/dist/components/table/header/table-header-row.d.ts +4 -0
- package/dist/components/table/header/table-header-row.d.ts.map +1 -0
- package/dist/components/table/header/table-header.d.ts +4 -0
- package/dist/components/table/header/table-header.d.ts.map +1 -0
- package/dist/components/table/hook/use-table-context.d.ts +2 -0
- package/dist/components/table/hook/use-table-context.d.ts.map +1 -0
- package/dist/components/table/hook/use-table.d.ts +10 -0
- package/dist/components/table/hook/use-table.d.ts.map +1 -0
- package/dist/components/table/index.d.ts +4 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/table/interface/table-share.interface.d.ts +9 -0
- package/dist/components/table/interface/table-share.interface.d.ts.map +1 -0
- package/dist/components/table/interface/table.interface.d.ts +115 -0
- package/dist/components/table/interface/table.interface.d.ts.map +1 -0
- package/dist/components/table/search/table-search-column.d.ts +4 -0
- package/dist/components/table/search/table-search-column.d.ts.map +1 -0
- package/dist/components/table/search/table-search-row.d.ts +4 -0
- package/dist/components/table/search/table-search-row.d.ts.map +1 -0
- package/dist/components/table/table.d.ts +4 -0
- package/dist/components/table/table.d.ts.map +1 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +11 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/ui/accordion.d.ts +8 -0
- package/dist/components/ui/accordion.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +15 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/avatar.d.ts +13 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/badge.d.ts +218 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/card.d.ts +10 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/command.d.ts +19 -0
- package/dist/components/ui/command.d.ts.map +1 -0
- package/dist/components/ui/confirmation.d.ts +17 -0
- package/dist/components/ui/confirmation.d.ts.map +1 -0
- package/dist/components/ui/dialog.d.ts +16 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +26 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/index.d.ts +21 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/input-otp.d.ts +12 -0
- package/dist/components/ui/input-otp.d.ts.map +1 -0
- package/dist/components/ui/input.d.ts +42 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/label-error.d.ts +16 -0
- package/dist/components/ui/label-error.d.ts.map +1 -0
- package/dist/components/ui/label.d.ts +5 -0
- package/dist/components/ui/label.d.ts.map +1 -0
- package/dist/components/ui/menubar.d.ts +27 -0
- package/dist/components/ui/menubar.d.ts.map +1 -0
- package/dist/components/ui/modal.d.ts +16 -0
- package/dist/components/ui/modal.d.ts.map +1 -0
- package/dist/components/ui/navigation-menu.d.ts +15 -0
- package/dist/components/ui/navigation-menu.d.ts.map +1 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/resizable.d.ts +9 -0
- package/dist/components/ui/resizable.d.ts.map +1 -0
- package/dist/components/ui/skeleton.d.ts +3 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/switch.d.ts +13 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/tabs.d.ts +8 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/divider/index.cjs.js +2 -0
- package/dist/divider/index.cjs.js.map +1 -0
- package/dist/divider/index.es.js +67 -0
- package/dist/divider/index.es.js.map +1 -0
- package/dist/divider.d.ts +2 -0
- package/dist/functions/assertion.d.ts +14 -0
- package/dist/functions/assertion.d.ts.map +1 -0
- package/dist/functions/index.d.ts +5 -0
- package/dist/functions/index.d.ts.map +1 -0
- package/dist/functions/numbers.d.ts +20 -0
- package/dist/functions/numbers.d.ts.map +1 -0
- package/dist/functions/pattern.d.ts +3 -0
- package/dist/functions/pattern.d.ts.map +1 -0
- package/dist/functions/refs.d.ts +20 -0
- package/dist/functions/refs.d.ts.map +1 -0
- package/dist/hooks/use-confirmation.d.ts +21 -0
- package/dist/hooks/use-confirmation.d.ts.map +1 -0
- package/dist/hooks/use-modal.d.ts +15 -0
- package/dist/hooks/use-modal.d.ts.map +1 -0
- package/dist/index.cjs.js +2 -0
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +386 -0
- package/dist/index.es.js.map +1 -0
- package/dist/lib/tv.d.ts +21 -0
- package/dist/lib/tv.d.ts.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lizaui.css +1 -0
- package/dist/pagination/index.cjs.js +2 -0
- package/dist/pagination/index.cjs.js.map +1 -0
- package/dist/pagination/index.es.js +170 -0
- package/dist/pagination/index.es.js.map +1 -0
- package/dist/pagination.d.ts +2 -0
- package/dist/select/index.cjs.js +2 -0
- package/dist/select/index.cjs.js.map +1 -0
- package/dist/select/index.es.js +226 -0
- package/dist/select/index.es.js.map +1 -0
- package/dist/select.d.ts +2 -0
- package/dist/table/index.cjs.js +2 -0
- package/dist/table/index.cjs.js.map +1 -0
- package/dist/table/index.es.js +233 -0
- package/dist/table/index.es.js.map +1 -0
- package/dist/table.d.ts +2 -0
- package/dist/theme/classes.d.ts +34 -0
- package/dist/theme/classes.d.ts.map +1 -0
- package/dist/theme/color/button.d.ts +162 -0
- package/dist/theme/color/button.d.ts.map +1 -0
- package/dist/theme/color/checkbox.d.ts +289 -0
- package/dist/theme/color/checkbox.d.ts.map +1 -0
- package/dist/theme/color/chip.d.ts +321 -0
- package/dist/theme/color/chip.d.ts.map +1 -0
- package/dist/theme/color/divider.d.ts +29 -0
- package/dist/theme/color/divider.d.ts.map +1 -0
- package/dist/theme/index.d.ts +3 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/variants.d.ts +66 -0
- package/dist/theme/variants.d.ts.map +1 -0
- package/dist/tooltip/index.cjs.js +2 -0
- package/dist/tooltip/index.cjs.js.map +1 -0
- package/dist/tooltip/index.es.js +5 -0
- package/dist/tooltip/index.es.js.map +1 -0
- package/dist/tooltip.d.ts +2 -0
- package/dist/types/checkbox.type.d.ts +89 -0
- package/dist/types/checkbox.type.d.ts.map +1 -0
- package/dist/types/global.d.ts +5 -0
- package/dist/types/global.d.ts.map +1 -0
- package/dist/types/icon.type.d.ts +3 -0
- package/dist/types/icon.type.d.ts.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/select/select-main.type.d.ts +139 -0
- package/dist/types/select/select-main.type.d.ts.map +1 -0
- package/dist/types/select/select.type.d.ts +8 -0
- package/dist/types/select/select.type.d.ts.map +1 -0
- package/dist/types/switch.type.d.ts +78 -0
- package/dist/types/switch.type.d.ts.map +1 -0
- package/dist/types/theme.d.ts +8 -0
- package/dist/types/theme.d.ts.map +1 -0
- package/dist/ui/index.cjs.js +71 -0
- package/dist/ui/index.cjs.js.map +1 -0
- package/dist/ui/index.es.js +8189 -0
- package/dist/ui/index.es.js.map +1 -0
- package/dist/ui.d.ts +2 -0
- package/package.json +135 -0
|
@@ -0,0 +1,1134 @@
|
|
|
1
|
+
const Ht = ["top", "right", "bottom", "left"], q = Math.min, R = Math.max, ot = Math.round, it = Math.floor, F = (t) => ({
|
|
2
|
+
x: t,
|
|
3
|
+
y: t
|
|
4
|
+
}), Nt = {
|
|
5
|
+
left: "right",
|
|
6
|
+
right: "left",
|
|
7
|
+
bottom: "top",
|
|
8
|
+
top: "bottom"
|
|
9
|
+
}, Vt = {
|
|
10
|
+
start: "end",
|
|
11
|
+
end: "start"
|
|
12
|
+
};
|
|
13
|
+
function ut(t, e, n) {
|
|
14
|
+
return R(t, q(e, n));
|
|
15
|
+
}
|
|
16
|
+
function $(t, e) {
|
|
17
|
+
return typeof t == "function" ? t(e) : t;
|
|
18
|
+
}
|
|
19
|
+
function z(t) {
|
|
20
|
+
return t.split("-")[0];
|
|
21
|
+
}
|
|
22
|
+
function Q(t) {
|
|
23
|
+
return t.split("-")[1];
|
|
24
|
+
}
|
|
25
|
+
function ht(t) {
|
|
26
|
+
return t === "x" ? "y" : "x";
|
|
27
|
+
}
|
|
28
|
+
function gt(t) {
|
|
29
|
+
return t === "y" ? "height" : "width";
|
|
30
|
+
}
|
|
31
|
+
function V(t) {
|
|
32
|
+
return ["top", "bottom"].includes(z(t)) ? "y" : "x";
|
|
33
|
+
}
|
|
34
|
+
function pt(t) {
|
|
35
|
+
return ht(V(t));
|
|
36
|
+
}
|
|
37
|
+
function $t(t, e, n) {
|
|
38
|
+
n === void 0 && (n = !1);
|
|
39
|
+
const i = Q(t), o = pt(t), s = gt(o);
|
|
40
|
+
let r = o === "x" ? i === (n ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
41
|
+
return e.reference[s] > e.floating[s] && (r = st(r)), [r, st(r)];
|
|
42
|
+
}
|
|
43
|
+
function zt(t) {
|
|
44
|
+
const e = st(t);
|
|
45
|
+
return [dt(t), e, dt(e)];
|
|
46
|
+
}
|
|
47
|
+
function dt(t) {
|
|
48
|
+
return t.replace(/start|end/g, (e) => Vt[e]);
|
|
49
|
+
}
|
|
50
|
+
function _t(t, e, n) {
|
|
51
|
+
const i = ["left", "right"], o = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
|
|
52
|
+
switch (t) {
|
|
53
|
+
case "top":
|
|
54
|
+
case "bottom":
|
|
55
|
+
return n ? e ? o : i : e ? i : o;
|
|
56
|
+
case "left":
|
|
57
|
+
case "right":
|
|
58
|
+
return e ? s : r;
|
|
59
|
+
default:
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
function It(t, e, n, i) {
|
|
64
|
+
const o = Q(t);
|
|
65
|
+
let s = _t(z(t), n === "start", i);
|
|
66
|
+
return o && (s = s.map((r) => r + "-" + o), e && (s = s.concat(s.map(dt)))), s;
|
|
67
|
+
}
|
|
68
|
+
function st(t) {
|
|
69
|
+
return t.replace(/left|right|bottom|top/g, (e) => Nt[e]);
|
|
70
|
+
}
|
|
71
|
+
function jt(t) {
|
|
72
|
+
return {
|
|
73
|
+
top: 0,
|
|
74
|
+
right: 0,
|
|
75
|
+
bottom: 0,
|
|
76
|
+
left: 0,
|
|
77
|
+
...t
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function Lt(t) {
|
|
81
|
+
return typeof t != "number" ? jt(t) : {
|
|
82
|
+
top: t,
|
|
83
|
+
right: t,
|
|
84
|
+
bottom: t,
|
|
85
|
+
left: t
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
function rt(t) {
|
|
89
|
+
const {
|
|
90
|
+
x: e,
|
|
91
|
+
y: n,
|
|
92
|
+
width: i,
|
|
93
|
+
height: o
|
|
94
|
+
} = t;
|
|
95
|
+
return {
|
|
96
|
+
width: i,
|
|
97
|
+
height: o,
|
|
98
|
+
top: n,
|
|
99
|
+
left: e,
|
|
100
|
+
right: e + i,
|
|
101
|
+
bottom: n + o,
|
|
102
|
+
x: e,
|
|
103
|
+
y: n
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
function bt(t, e, n) {
|
|
107
|
+
let {
|
|
108
|
+
reference: i,
|
|
109
|
+
floating: o
|
|
110
|
+
} = t;
|
|
111
|
+
const s = V(e), r = pt(e), c = gt(r), l = z(e), f = s === "y", d = i.x + i.width / 2 - o.width / 2, u = i.y + i.height / 2 - o.height / 2, h = i[c] / 2 - o[c] / 2;
|
|
112
|
+
let a;
|
|
113
|
+
switch (l) {
|
|
114
|
+
case "top":
|
|
115
|
+
a = {
|
|
116
|
+
x: d,
|
|
117
|
+
y: i.y - o.height
|
|
118
|
+
};
|
|
119
|
+
break;
|
|
120
|
+
case "bottom":
|
|
121
|
+
a = {
|
|
122
|
+
x: d,
|
|
123
|
+
y: i.y + i.height
|
|
124
|
+
};
|
|
125
|
+
break;
|
|
126
|
+
case "right":
|
|
127
|
+
a = {
|
|
128
|
+
x: i.x + i.width,
|
|
129
|
+
y: u
|
|
130
|
+
};
|
|
131
|
+
break;
|
|
132
|
+
case "left":
|
|
133
|
+
a = {
|
|
134
|
+
x: i.x - o.width,
|
|
135
|
+
y: u
|
|
136
|
+
};
|
|
137
|
+
break;
|
|
138
|
+
default:
|
|
139
|
+
a = {
|
|
140
|
+
x: i.x,
|
|
141
|
+
y: i.y
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
switch (Q(e)) {
|
|
145
|
+
case "start":
|
|
146
|
+
a[r] -= h * (n && f ? -1 : 1);
|
|
147
|
+
break;
|
|
148
|
+
case "end":
|
|
149
|
+
a[r] += h * (n && f ? -1 : 1);
|
|
150
|
+
break;
|
|
151
|
+
}
|
|
152
|
+
return a;
|
|
153
|
+
}
|
|
154
|
+
const Yt = async (t, e, n) => {
|
|
155
|
+
const {
|
|
156
|
+
placement: i = "bottom",
|
|
157
|
+
strategy: o = "absolute",
|
|
158
|
+
middleware: s = [],
|
|
159
|
+
platform: r
|
|
160
|
+
} = n, c = s.filter(Boolean), l = await (r.isRTL == null ? void 0 : r.isRTL(e));
|
|
161
|
+
let f = await r.getElementRects({
|
|
162
|
+
reference: t,
|
|
163
|
+
floating: e,
|
|
164
|
+
strategy: o
|
|
165
|
+
}), {
|
|
166
|
+
x: d,
|
|
167
|
+
y: u
|
|
168
|
+
} = bt(f, i, l), h = i, a = {}, m = 0;
|
|
169
|
+
for (let g = 0; g < c.length; g++) {
|
|
170
|
+
const {
|
|
171
|
+
name: p,
|
|
172
|
+
fn: x
|
|
173
|
+
} = c[g], {
|
|
174
|
+
x: w,
|
|
175
|
+
y,
|
|
176
|
+
data: b,
|
|
177
|
+
reset: v
|
|
178
|
+
} = await x({
|
|
179
|
+
x: d,
|
|
180
|
+
y: u,
|
|
181
|
+
initialPlacement: i,
|
|
182
|
+
placement: h,
|
|
183
|
+
strategy: o,
|
|
184
|
+
middlewareData: a,
|
|
185
|
+
rects: f,
|
|
186
|
+
platform: r,
|
|
187
|
+
elements: {
|
|
188
|
+
reference: t,
|
|
189
|
+
floating: e
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
d = w ?? d, u = y ?? u, a = {
|
|
193
|
+
...a,
|
|
194
|
+
[p]: {
|
|
195
|
+
...a[p],
|
|
196
|
+
...b
|
|
197
|
+
}
|
|
198
|
+
}, v && m <= 50 && (m++, typeof v == "object" && (v.placement && (h = v.placement), v.rects && (f = v.rects === !0 ? await r.getElementRects({
|
|
199
|
+
reference: t,
|
|
200
|
+
floating: e,
|
|
201
|
+
strategy: o
|
|
202
|
+
}) : v.rects), {
|
|
203
|
+
x: d,
|
|
204
|
+
y: u
|
|
205
|
+
} = bt(f, h, l)), g = -1);
|
|
206
|
+
}
|
|
207
|
+
return {
|
|
208
|
+
x: d,
|
|
209
|
+
y: u,
|
|
210
|
+
placement: h,
|
|
211
|
+
strategy: o,
|
|
212
|
+
middlewareData: a
|
|
213
|
+
};
|
|
214
|
+
};
|
|
215
|
+
async function tt(t, e) {
|
|
216
|
+
var n;
|
|
217
|
+
e === void 0 && (e = {});
|
|
218
|
+
const {
|
|
219
|
+
x: i,
|
|
220
|
+
y: o,
|
|
221
|
+
platform: s,
|
|
222
|
+
rects: r,
|
|
223
|
+
elements: c,
|
|
224
|
+
strategy: l
|
|
225
|
+
} = t, {
|
|
226
|
+
boundary: f = "clippingAncestors",
|
|
227
|
+
rootBoundary: d = "viewport",
|
|
228
|
+
elementContext: u = "floating",
|
|
229
|
+
altBoundary: h = !1,
|
|
230
|
+
padding: a = 0
|
|
231
|
+
} = $(e, t), m = Lt(a), p = c[h ? u === "floating" ? "reference" : "floating" : u], x = rt(await s.getClippingRect({
|
|
232
|
+
element: (n = await (s.isElement == null ? void 0 : s.isElement(p))) == null || n ? p : p.contextElement || await (s.getDocumentElement == null ? void 0 : s.getDocumentElement(c.floating)),
|
|
233
|
+
boundary: f,
|
|
234
|
+
rootBoundary: d,
|
|
235
|
+
strategy: l
|
|
236
|
+
})), w = u === "floating" ? {
|
|
237
|
+
x: i,
|
|
238
|
+
y: o,
|
|
239
|
+
width: r.floating.width,
|
|
240
|
+
height: r.floating.height
|
|
241
|
+
} : r.reference, y = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), b = await (s.isElement == null ? void 0 : s.isElement(y)) ? await (s.getScale == null ? void 0 : s.getScale(y)) || {
|
|
242
|
+
x: 1,
|
|
243
|
+
y: 1
|
|
244
|
+
} : {
|
|
245
|
+
x: 1,
|
|
246
|
+
y: 1
|
|
247
|
+
}, v = rt(s.convertOffsetParentRelativeRectToViewportRelativeRect ? await s.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
248
|
+
elements: c,
|
|
249
|
+
rect: w,
|
|
250
|
+
offsetParent: y,
|
|
251
|
+
strategy: l
|
|
252
|
+
}) : w);
|
|
253
|
+
return {
|
|
254
|
+
top: (x.top - v.top + m.top) / b.y,
|
|
255
|
+
bottom: (v.bottom - x.bottom + m.bottom) / b.y,
|
|
256
|
+
left: (x.left - v.left + m.left) / b.x,
|
|
257
|
+
right: (v.right - x.right + m.right) / b.x
|
|
258
|
+
};
|
|
259
|
+
}
|
|
260
|
+
const qt = (t) => ({
|
|
261
|
+
name: "arrow",
|
|
262
|
+
options: t,
|
|
263
|
+
async fn(e) {
|
|
264
|
+
const {
|
|
265
|
+
x: n,
|
|
266
|
+
y: i,
|
|
267
|
+
placement: o,
|
|
268
|
+
rects: s,
|
|
269
|
+
platform: r,
|
|
270
|
+
elements: c,
|
|
271
|
+
middlewareData: l
|
|
272
|
+
} = e, {
|
|
273
|
+
element: f,
|
|
274
|
+
padding: d = 0
|
|
275
|
+
} = $(t, e) || {};
|
|
276
|
+
if (f == null)
|
|
277
|
+
return {};
|
|
278
|
+
const u = Lt(d), h = {
|
|
279
|
+
x: n,
|
|
280
|
+
y: i
|
|
281
|
+
}, a = pt(o), m = gt(a), g = await r.getDimensions(f), p = a === "y", x = p ? "top" : "left", w = p ? "bottom" : "right", y = p ? "clientHeight" : "clientWidth", b = s.reference[m] + s.reference[a] - h[a] - s.floating[m], v = h[a] - s.reference[a], O = await (r.getOffsetParent == null ? void 0 : r.getOffsetParent(f));
|
|
282
|
+
let A = O ? O[y] : 0;
|
|
283
|
+
(!A || !await (r.isElement == null ? void 0 : r.isElement(O))) && (A = c.floating[y] || s.floating[m]);
|
|
284
|
+
const H = b / 2 - v / 2, D = A / 2 - g[m] / 2 - 1, T = q(u[x], D), _ = q(u[w], D), P = T, I = A - g[m] - _, M = A / 2 - g[m] / 2 + H, L = ut(P, M, I), U = !l.arrow && Q(o) != null && M !== L && s.reference[m] / 2 - (M < P ? T : _) - g[m] / 2 < 0, N = U ? M < P ? M - P : M - I : 0;
|
|
285
|
+
return {
|
|
286
|
+
[a]: h[a] + N,
|
|
287
|
+
data: {
|
|
288
|
+
[a]: L,
|
|
289
|
+
centerOffset: M - L - N,
|
|
290
|
+
...U && {
|
|
291
|
+
alignmentOffset: N
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
reset: U
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
}), Xt = function(t) {
|
|
298
|
+
return t === void 0 && (t = {}), {
|
|
299
|
+
name: "flip",
|
|
300
|
+
options: t,
|
|
301
|
+
async fn(e) {
|
|
302
|
+
var n, i;
|
|
303
|
+
const {
|
|
304
|
+
placement: o,
|
|
305
|
+
middlewareData: s,
|
|
306
|
+
rects: r,
|
|
307
|
+
initialPlacement: c,
|
|
308
|
+
platform: l,
|
|
309
|
+
elements: f
|
|
310
|
+
} = e, {
|
|
311
|
+
mainAxis: d = !0,
|
|
312
|
+
crossAxis: u = !0,
|
|
313
|
+
fallbackPlacements: h,
|
|
314
|
+
fallbackStrategy: a = "bestFit",
|
|
315
|
+
fallbackAxisSideDirection: m = "none",
|
|
316
|
+
flipAlignment: g = !0,
|
|
317
|
+
...p
|
|
318
|
+
} = $(t, e);
|
|
319
|
+
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
320
|
+
return {};
|
|
321
|
+
const x = z(o), w = V(c), y = z(c) === c, b = await (l.isRTL == null ? void 0 : l.isRTL(f.floating)), v = h || (y || !g ? [st(c)] : zt(c)), O = m !== "none";
|
|
322
|
+
!h && O && v.push(...It(c, g, m, b));
|
|
323
|
+
const A = [c, ...v], H = await tt(e, p), D = [];
|
|
324
|
+
let T = ((i = s.flip) == null ? void 0 : i.overflows) || [];
|
|
325
|
+
if (d && D.push(H[x]), u) {
|
|
326
|
+
const L = $t(o, r, b);
|
|
327
|
+
D.push(H[L[0]], H[L[1]]);
|
|
328
|
+
}
|
|
329
|
+
if (T = [...T, {
|
|
330
|
+
placement: o,
|
|
331
|
+
overflows: D
|
|
332
|
+
}], !D.every((L) => L <= 0)) {
|
|
333
|
+
var _, P;
|
|
334
|
+
const L = (((_ = s.flip) == null ? void 0 : _.index) || 0) + 1, U = A[L];
|
|
335
|
+
if (U) {
|
|
336
|
+
var I;
|
|
337
|
+
const j = u === "alignment" ? w !== V(U) : !1, k = ((I = T[0]) == null ? void 0 : I.overflows[0]) > 0;
|
|
338
|
+
if (!j || k)
|
|
339
|
+
return {
|
|
340
|
+
data: {
|
|
341
|
+
index: L,
|
|
342
|
+
overflows: T
|
|
343
|
+
},
|
|
344
|
+
reset: {
|
|
345
|
+
placement: U
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
let N = (P = T.filter((j) => j.overflows[0] <= 0).sort((j, k) => j.overflows[1] - k.overflows[1])[0]) == null ? void 0 : P.placement;
|
|
350
|
+
if (!N)
|
|
351
|
+
switch (a) {
|
|
352
|
+
case "bestFit": {
|
|
353
|
+
var M;
|
|
354
|
+
const j = (M = T.filter((k) => {
|
|
355
|
+
if (O) {
|
|
356
|
+
const Y = V(k.placement);
|
|
357
|
+
return Y === w || // Create a bias to the `y` side axis due to horizontal
|
|
358
|
+
// reading directions favoring greater width.
|
|
359
|
+
Y === "y";
|
|
360
|
+
}
|
|
361
|
+
return !0;
|
|
362
|
+
}).map((k) => [k.placement, k.overflows.filter((Y) => Y > 0).reduce((Y, Bt) => Y + Bt, 0)]).sort((k, Y) => k[1] - Y[1])[0]) == null ? void 0 : M[0];
|
|
363
|
+
j && (N = j);
|
|
364
|
+
break;
|
|
365
|
+
}
|
|
366
|
+
case "initialPlacement":
|
|
367
|
+
N = c;
|
|
368
|
+
break;
|
|
369
|
+
}
|
|
370
|
+
if (o !== N)
|
|
371
|
+
return {
|
|
372
|
+
reset: {
|
|
373
|
+
placement: N
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
return {};
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
function At(t, e) {
|
|
382
|
+
return {
|
|
383
|
+
top: t.top - e.height,
|
|
384
|
+
right: t.right - e.width,
|
|
385
|
+
bottom: t.bottom - e.height,
|
|
386
|
+
left: t.left - e.width
|
|
387
|
+
};
|
|
388
|
+
}
|
|
389
|
+
function Ot(t) {
|
|
390
|
+
return Ht.some((e) => t[e] >= 0);
|
|
391
|
+
}
|
|
392
|
+
const Ut = function(t) {
|
|
393
|
+
return t === void 0 && (t = {}), {
|
|
394
|
+
name: "hide",
|
|
395
|
+
options: t,
|
|
396
|
+
async fn(e) {
|
|
397
|
+
const {
|
|
398
|
+
rects: n
|
|
399
|
+
} = e, {
|
|
400
|
+
strategy: i = "referenceHidden",
|
|
401
|
+
...o
|
|
402
|
+
} = $(t, e);
|
|
403
|
+
switch (i) {
|
|
404
|
+
case "referenceHidden": {
|
|
405
|
+
const s = await tt(e, {
|
|
406
|
+
...o,
|
|
407
|
+
elementContext: "reference"
|
|
408
|
+
}), r = At(s, n.reference);
|
|
409
|
+
return {
|
|
410
|
+
data: {
|
|
411
|
+
referenceHiddenOffsets: r,
|
|
412
|
+
referenceHidden: Ot(r)
|
|
413
|
+
}
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
case "escaped": {
|
|
417
|
+
const s = await tt(e, {
|
|
418
|
+
...o,
|
|
419
|
+
altBoundary: !0
|
|
420
|
+
}), r = At(s, n.floating);
|
|
421
|
+
return {
|
|
422
|
+
data: {
|
|
423
|
+
escapedOffsets: r,
|
|
424
|
+
escaped: Ot(r)
|
|
425
|
+
}
|
|
426
|
+
};
|
|
427
|
+
}
|
|
428
|
+
default:
|
|
429
|
+
return {};
|
|
430
|
+
}
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
};
|
|
434
|
+
async function Kt(t, e) {
|
|
435
|
+
const {
|
|
436
|
+
placement: n,
|
|
437
|
+
platform: i,
|
|
438
|
+
elements: o
|
|
439
|
+
} = t, s = await (i.isRTL == null ? void 0 : i.isRTL(o.floating)), r = z(n), c = Q(n), l = V(n) === "y", f = ["left", "top"].includes(r) ? -1 : 1, d = s && l ? -1 : 1, u = $(e, t);
|
|
440
|
+
let {
|
|
441
|
+
mainAxis: h,
|
|
442
|
+
crossAxis: a,
|
|
443
|
+
alignmentAxis: m
|
|
444
|
+
} = typeof u == "number" ? {
|
|
445
|
+
mainAxis: u,
|
|
446
|
+
crossAxis: 0,
|
|
447
|
+
alignmentAxis: null
|
|
448
|
+
} : {
|
|
449
|
+
mainAxis: u.mainAxis || 0,
|
|
450
|
+
crossAxis: u.crossAxis || 0,
|
|
451
|
+
alignmentAxis: u.alignmentAxis
|
|
452
|
+
};
|
|
453
|
+
return c && typeof m == "number" && (a = c === "end" ? m * -1 : m), l ? {
|
|
454
|
+
x: a * d,
|
|
455
|
+
y: h * f
|
|
456
|
+
} : {
|
|
457
|
+
x: h * f,
|
|
458
|
+
y: a * d
|
|
459
|
+
};
|
|
460
|
+
}
|
|
461
|
+
const Gt = function(t) {
|
|
462
|
+
return t === void 0 && (t = 0), {
|
|
463
|
+
name: "offset",
|
|
464
|
+
options: t,
|
|
465
|
+
async fn(e) {
|
|
466
|
+
var n, i;
|
|
467
|
+
const {
|
|
468
|
+
x: o,
|
|
469
|
+
y: s,
|
|
470
|
+
placement: r,
|
|
471
|
+
middlewareData: c
|
|
472
|
+
} = e, l = await Kt(e, t);
|
|
473
|
+
return r === ((n = c.offset) == null ? void 0 : n.placement) && (i = c.arrow) != null && i.alignmentOffset ? {} : {
|
|
474
|
+
x: o + l.x,
|
|
475
|
+
y: s + l.y,
|
|
476
|
+
data: {
|
|
477
|
+
...l,
|
|
478
|
+
placement: r
|
|
479
|
+
}
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
};
|
|
483
|
+
}, Jt = function(t) {
|
|
484
|
+
return t === void 0 && (t = {}), {
|
|
485
|
+
name: "shift",
|
|
486
|
+
options: t,
|
|
487
|
+
async fn(e) {
|
|
488
|
+
const {
|
|
489
|
+
x: n,
|
|
490
|
+
y: i,
|
|
491
|
+
placement: o
|
|
492
|
+
} = e, {
|
|
493
|
+
mainAxis: s = !0,
|
|
494
|
+
crossAxis: r = !1,
|
|
495
|
+
limiter: c = {
|
|
496
|
+
fn: (p) => {
|
|
497
|
+
let {
|
|
498
|
+
x,
|
|
499
|
+
y: w
|
|
500
|
+
} = p;
|
|
501
|
+
return {
|
|
502
|
+
x,
|
|
503
|
+
y: w
|
|
504
|
+
};
|
|
505
|
+
}
|
|
506
|
+
},
|
|
507
|
+
...l
|
|
508
|
+
} = $(t, e), f = {
|
|
509
|
+
x: n,
|
|
510
|
+
y: i
|
|
511
|
+
}, d = await tt(e, l), u = V(z(o)), h = ht(u);
|
|
512
|
+
let a = f[h], m = f[u];
|
|
513
|
+
if (s) {
|
|
514
|
+
const p = h === "y" ? "top" : "left", x = h === "y" ? "bottom" : "right", w = a + d[p], y = a - d[x];
|
|
515
|
+
a = ut(w, a, y);
|
|
516
|
+
}
|
|
517
|
+
if (r) {
|
|
518
|
+
const p = u === "y" ? "top" : "left", x = u === "y" ? "bottom" : "right", w = m + d[p], y = m - d[x];
|
|
519
|
+
m = ut(w, m, y);
|
|
520
|
+
}
|
|
521
|
+
const g = c.fn({
|
|
522
|
+
...e,
|
|
523
|
+
[h]: a,
|
|
524
|
+
[u]: m
|
|
525
|
+
});
|
|
526
|
+
return {
|
|
527
|
+
...g,
|
|
528
|
+
data: {
|
|
529
|
+
x: g.x - n,
|
|
530
|
+
y: g.y - i,
|
|
531
|
+
enabled: {
|
|
532
|
+
[h]: s,
|
|
533
|
+
[u]: r
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
};
|
|
537
|
+
}
|
|
538
|
+
};
|
|
539
|
+
}, Qt = function(t) {
|
|
540
|
+
return t === void 0 && (t = {}), {
|
|
541
|
+
options: t,
|
|
542
|
+
fn(e) {
|
|
543
|
+
const {
|
|
544
|
+
x: n,
|
|
545
|
+
y: i,
|
|
546
|
+
placement: o,
|
|
547
|
+
rects: s,
|
|
548
|
+
middlewareData: r
|
|
549
|
+
} = e, {
|
|
550
|
+
offset: c = 0,
|
|
551
|
+
mainAxis: l = !0,
|
|
552
|
+
crossAxis: f = !0
|
|
553
|
+
} = $(t, e), d = {
|
|
554
|
+
x: n,
|
|
555
|
+
y: i
|
|
556
|
+
}, u = V(o), h = ht(u);
|
|
557
|
+
let a = d[h], m = d[u];
|
|
558
|
+
const g = $(c, e), p = typeof g == "number" ? {
|
|
559
|
+
mainAxis: g,
|
|
560
|
+
crossAxis: 0
|
|
561
|
+
} : {
|
|
562
|
+
mainAxis: 0,
|
|
563
|
+
crossAxis: 0,
|
|
564
|
+
...g
|
|
565
|
+
};
|
|
566
|
+
if (l) {
|
|
567
|
+
const y = h === "y" ? "height" : "width", b = s.reference[h] - s.floating[y] + p.mainAxis, v = s.reference[h] + s.reference[y] - p.mainAxis;
|
|
568
|
+
a < b ? a = b : a > v && (a = v);
|
|
569
|
+
}
|
|
570
|
+
if (f) {
|
|
571
|
+
var x, w;
|
|
572
|
+
const y = h === "y" ? "width" : "height", b = ["top", "left"].includes(z(o)), v = s.reference[u] - s.floating[y] + (b && ((x = r.offset) == null ? void 0 : x[u]) || 0) + (b ? 0 : p.crossAxis), O = s.reference[u] + s.reference[y] + (b ? 0 : ((w = r.offset) == null ? void 0 : w[u]) || 0) - (b ? p.crossAxis : 0);
|
|
573
|
+
m < v ? m = v : m > O && (m = O);
|
|
574
|
+
}
|
|
575
|
+
return {
|
|
576
|
+
[h]: a,
|
|
577
|
+
[u]: m
|
|
578
|
+
};
|
|
579
|
+
}
|
|
580
|
+
};
|
|
581
|
+
}, Zt = function(t) {
|
|
582
|
+
return t === void 0 && (t = {}), {
|
|
583
|
+
name: "size",
|
|
584
|
+
options: t,
|
|
585
|
+
async fn(e) {
|
|
586
|
+
var n, i;
|
|
587
|
+
const {
|
|
588
|
+
placement: o,
|
|
589
|
+
rects: s,
|
|
590
|
+
platform: r,
|
|
591
|
+
elements: c
|
|
592
|
+
} = e, {
|
|
593
|
+
apply: l = () => {
|
|
594
|
+
},
|
|
595
|
+
...f
|
|
596
|
+
} = $(t, e), d = await tt(e, f), u = z(o), h = Q(o), a = V(o) === "y", {
|
|
597
|
+
width: m,
|
|
598
|
+
height: g
|
|
599
|
+
} = s.floating;
|
|
600
|
+
let p, x;
|
|
601
|
+
u === "top" || u === "bottom" ? (p = u, x = h === (await (r.isRTL == null ? void 0 : r.isRTL(c.floating)) ? "start" : "end") ? "left" : "right") : (x = u, p = h === "end" ? "top" : "bottom");
|
|
602
|
+
const w = g - d.top - d.bottom, y = m - d.left - d.right, b = q(g - d[p], w), v = q(m - d[x], y), O = !e.middlewareData.shift;
|
|
603
|
+
let A = b, H = v;
|
|
604
|
+
if ((n = e.middlewareData.shift) != null && n.enabled.x && (H = y), (i = e.middlewareData.shift) != null && i.enabled.y && (A = w), O && !h) {
|
|
605
|
+
const T = R(d.left, 0), _ = R(d.right, 0), P = R(d.top, 0), I = R(d.bottom, 0);
|
|
606
|
+
a ? H = m - 2 * (T !== 0 || _ !== 0 ? T + _ : R(d.left, d.right)) : A = g - 2 * (P !== 0 || I !== 0 ? P + I : R(d.top, d.bottom));
|
|
607
|
+
}
|
|
608
|
+
await l({
|
|
609
|
+
...e,
|
|
610
|
+
availableWidth: H,
|
|
611
|
+
availableHeight: A
|
|
612
|
+
});
|
|
613
|
+
const D = await r.getDimensions(c.floating);
|
|
614
|
+
return m !== D.width || g !== D.height ? {
|
|
615
|
+
reset: {
|
|
616
|
+
rects: !0
|
|
617
|
+
}
|
|
618
|
+
} : {};
|
|
619
|
+
}
|
|
620
|
+
};
|
|
621
|
+
};
|
|
622
|
+
function ct() {
|
|
623
|
+
return typeof window < "u";
|
|
624
|
+
}
|
|
625
|
+
function Z(t) {
|
|
626
|
+
return Et(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
627
|
+
}
|
|
628
|
+
function C(t) {
|
|
629
|
+
var e;
|
|
630
|
+
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
631
|
+
}
|
|
632
|
+
function B(t) {
|
|
633
|
+
var e;
|
|
634
|
+
return (e = (Et(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
635
|
+
}
|
|
636
|
+
function Et(t) {
|
|
637
|
+
return ct() ? t instanceof Node || t instanceof C(t).Node : !1;
|
|
638
|
+
}
|
|
639
|
+
function E(t) {
|
|
640
|
+
return ct() ? t instanceof Element || t instanceof C(t).Element : !1;
|
|
641
|
+
}
|
|
642
|
+
function W(t) {
|
|
643
|
+
return ct() ? t instanceof HTMLElement || t instanceof C(t).HTMLElement : !1;
|
|
644
|
+
}
|
|
645
|
+
function Rt(t) {
|
|
646
|
+
return !ct() || typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof C(t).ShadowRoot;
|
|
647
|
+
}
|
|
648
|
+
function nt(t) {
|
|
649
|
+
const {
|
|
650
|
+
overflow: e,
|
|
651
|
+
overflowX: n,
|
|
652
|
+
overflowY: i,
|
|
653
|
+
display: o
|
|
654
|
+
} = S(t);
|
|
655
|
+
return /auto|scroll|overlay|hidden|clip/.test(e + i + n) && !["inline", "contents"].includes(o);
|
|
656
|
+
}
|
|
657
|
+
function te(t) {
|
|
658
|
+
return ["table", "td", "th"].includes(Z(t));
|
|
659
|
+
}
|
|
660
|
+
function lt(t) {
|
|
661
|
+
return [":popover-open", ":modal"].some((e) => {
|
|
662
|
+
try {
|
|
663
|
+
return t.matches(e);
|
|
664
|
+
} catch {
|
|
665
|
+
return !1;
|
|
666
|
+
}
|
|
667
|
+
});
|
|
668
|
+
}
|
|
669
|
+
function xt(t) {
|
|
670
|
+
const e = wt(), n = E(t) ? S(t) : t;
|
|
671
|
+
return ["transform", "translate", "scale", "rotate", "perspective"].some((i) => n[i] ? n[i] !== "none" : !1) || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((i) => (n.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (n.contain || "").includes(i));
|
|
672
|
+
}
|
|
673
|
+
function ee(t) {
|
|
674
|
+
let e = X(t);
|
|
675
|
+
for (; W(e) && !J(e); ) {
|
|
676
|
+
if (xt(e))
|
|
677
|
+
return e;
|
|
678
|
+
if (lt(e))
|
|
679
|
+
return null;
|
|
680
|
+
e = X(e);
|
|
681
|
+
}
|
|
682
|
+
return null;
|
|
683
|
+
}
|
|
684
|
+
function wt() {
|
|
685
|
+
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
686
|
+
}
|
|
687
|
+
function J(t) {
|
|
688
|
+
return ["html", "body", "#document"].includes(Z(t));
|
|
689
|
+
}
|
|
690
|
+
function S(t) {
|
|
691
|
+
return C(t).getComputedStyle(t);
|
|
692
|
+
}
|
|
693
|
+
function ft(t) {
|
|
694
|
+
return E(t) ? {
|
|
695
|
+
scrollLeft: t.scrollLeft,
|
|
696
|
+
scrollTop: t.scrollTop
|
|
697
|
+
} : {
|
|
698
|
+
scrollLeft: t.scrollX,
|
|
699
|
+
scrollTop: t.scrollY
|
|
700
|
+
};
|
|
701
|
+
}
|
|
702
|
+
function X(t) {
|
|
703
|
+
if (Z(t) === "html")
|
|
704
|
+
return t;
|
|
705
|
+
const e = (
|
|
706
|
+
// Step into the shadow DOM of the parent of a slotted node.
|
|
707
|
+
t.assignedSlot || // DOM Element detected.
|
|
708
|
+
t.parentNode || // ShadowRoot detected.
|
|
709
|
+
Rt(t) && t.host || // Fallback.
|
|
710
|
+
B(t)
|
|
711
|
+
);
|
|
712
|
+
return Rt(e) ? e.host : e;
|
|
713
|
+
}
|
|
714
|
+
function St(t) {
|
|
715
|
+
const e = X(t);
|
|
716
|
+
return J(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : W(e) && nt(e) ? e : St(e);
|
|
717
|
+
}
|
|
718
|
+
function et(t, e, n) {
|
|
719
|
+
var i;
|
|
720
|
+
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
721
|
+
const o = St(t), s = o === ((i = t.ownerDocument) == null ? void 0 : i.body), r = C(o);
|
|
722
|
+
if (s) {
|
|
723
|
+
const c = mt(r);
|
|
724
|
+
return e.concat(r, r.visualViewport || [], nt(o) ? o : [], c && n ? et(c) : []);
|
|
725
|
+
}
|
|
726
|
+
return e.concat(o, et(o, [], n));
|
|
727
|
+
}
|
|
728
|
+
function mt(t) {
|
|
729
|
+
return t.parent && Object.getPrototypeOf(t.parent) ? t.frameElement : null;
|
|
730
|
+
}
|
|
731
|
+
function Dt(t) {
|
|
732
|
+
const e = S(t);
|
|
733
|
+
let n = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
|
|
734
|
+
const o = W(t), s = o ? t.offsetWidth : n, r = o ? t.offsetHeight : i, c = ot(n) !== s || ot(i) !== r;
|
|
735
|
+
return c && (n = s, i = r), {
|
|
736
|
+
width: n,
|
|
737
|
+
height: i,
|
|
738
|
+
$: c
|
|
739
|
+
};
|
|
740
|
+
}
|
|
741
|
+
function yt(t) {
|
|
742
|
+
return E(t) ? t : t.contextElement;
|
|
743
|
+
}
|
|
744
|
+
function G(t) {
|
|
745
|
+
const e = yt(t);
|
|
746
|
+
if (!W(e))
|
|
747
|
+
return F(1);
|
|
748
|
+
const n = e.getBoundingClientRect(), {
|
|
749
|
+
width: i,
|
|
750
|
+
height: o,
|
|
751
|
+
$: s
|
|
752
|
+
} = Dt(e);
|
|
753
|
+
let r = (s ? ot(n.width) : n.width) / i, c = (s ? ot(n.height) : n.height) / o;
|
|
754
|
+
return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
755
|
+
x: r,
|
|
756
|
+
y: c
|
|
757
|
+
};
|
|
758
|
+
}
|
|
759
|
+
const ne = /* @__PURE__ */ F(0);
|
|
760
|
+
function Pt(t) {
|
|
761
|
+
const e = C(t);
|
|
762
|
+
return !wt() || !e.visualViewport ? ne : {
|
|
763
|
+
x: e.visualViewport.offsetLeft,
|
|
764
|
+
y: e.visualViewport.offsetTop
|
|
765
|
+
};
|
|
766
|
+
}
|
|
767
|
+
function ie(t, e, n) {
|
|
768
|
+
return e === void 0 && (e = !1), !n || e && n !== C(t) ? !1 : e;
|
|
769
|
+
}
|
|
770
|
+
function K(t, e, n, i) {
|
|
771
|
+
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
772
|
+
const o = t.getBoundingClientRect(), s = yt(t);
|
|
773
|
+
let r = F(1);
|
|
774
|
+
e && (i ? E(i) && (r = G(i)) : r = G(t));
|
|
775
|
+
const c = ie(s, n, i) ? Pt(s) : F(0);
|
|
776
|
+
let l = (o.left + c.x) / r.x, f = (o.top + c.y) / r.y, d = o.width / r.x, u = o.height / r.y;
|
|
777
|
+
if (s) {
|
|
778
|
+
const h = C(s), a = i && E(i) ? C(i) : i;
|
|
779
|
+
let m = h, g = mt(m);
|
|
780
|
+
for (; g && i && a !== m; ) {
|
|
781
|
+
const p = G(g), x = g.getBoundingClientRect(), w = S(g), y = x.left + (g.clientLeft + parseFloat(w.paddingLeft)) * p.x, b = x.top + (g.clientTop + parseFloat(w.paddingTop)) * p.y;
|
|
782
|
+
l *= p.x, f *= p.y, d *= p.x, u *= p.y, l += y, f += b, m = C(g), g = mt(m);
|
|
783
|
+
}
|
|
784
|
+
}
|
|
785
|
+
return rt({
|
|
786
|
+
width: d,
|
|
787
|
+
height: u,
|
|
788
|
+
x: l,
|
|
789
|
+
y: f
|
|
790
|
+
});
|
|
791
|
+
}
|
|
792
|
+
function vt(t, e) {
|
|
793
|
+
const n = ft(t).scrollLeft;
|
|
794
|
+
return e ? e.left + n : K(B(t)).left + n;
|
|
795
|
+
}
|
|
796
|
+
function Mt(t, e, n) {
|
|
797
|
+
n === void 0 && (n = !1);
|
|
798
|
+
const i = t.getBoundingClientRect(), o = i.left + e.scrollLeft - (n ? 0 : (
|
|
799
|
+
// RTL <body> scrollbar.
|
|
800
|
+
vt(t, i)
|
|
801
|
+
)), s = i.top + e.scrollTop;
|
|
802
|
+
return {
|
|
803
|
+
x: o,
|
|
804
|
+
y: s
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
function oe(t) {
|
|
808
|
+
let {
|
|
809
|
+
elements: e,
|
|
810
|
+
rect: n,
|
|
811
|
+
offsetParent: i,
|
|
812
|
+
strategy: o
|
|
813
|
+
} = t;
|
|
814
|
+
const s = o === "fixed", r = B(i), c = e ? lt(e.floating) : !1;
|
|
815
|
+
if (i === r || c && s)
|
|
816
|
+
return n;
|
|
817
|
+
let l = {
|
|
818
|
+
scrollLeft: 0,
|
|
819
|
+
scrollTop: 0
|
|
820
|
+
}, f = F(1);
|
|
821
|
+
const d = F(0), u = W(i);
|
|
822
|
+
if ((u || !u && !s) && ((Z(i) !== "body" || nt(r)) && (l = ft(i)), W(i))) {
|
|
823
|
+
const a = K(i);
|
|
824
|
+
f = G(i), d.x = a.x + i.clientLeft, d.y = a.y + i.clientTop;
|
|
825
|
+
}
|
|
826
|
+
const h = r && !u && !s ? Mt(r, l, !0) : F(0);
|
|
827
|
+
return {
|
|
828
|
+
width: n.width * f.x,
|
|
829
|
+
height: n.height * f.y,
|
|
830
|
+
x: n.x * f.x - l.scrollLeft * f.x + d.x + h.x,
|
|
831
|
+
y: n.y * f.y - l.scrollTop * f.y + d.y + h.y
|
|
832
|
+
};
|
|
833
|
+
}
|
|
834
|
+
function se(t) {
|
|
835
|
+
return Array.from(t.getClientRects());
|
|
836
|
+
}
|
|
837
|
+
function re(t) {
|
|
838
|
+
const e = B(t), n = ft(t), i = t.ownerDocument.body, o = R(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth), s = R(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
|
|
839
|
+
let r = -n.scrollLeft + vt(t);
|
|
840
|
+
const c = -n.scrollTop;
|
|
841
|
+
return S(i).direction === "rtl" && (r += R(e.clientWidth, i.clientWidth) - o), {
|
|
842
|
+
width: o,
|
|
843
|
+
height: s,
|
|
844
|
+
x: r,
|
|
845
|
+
y: c
|
|
846
|
+
};
|
|
847
|
+
}
|
|
848
|
+
function ce(t, e) {
|
|
849
|
+
const n = C(t), i = B(t), o = n.visualViewport;
|
|
850
|
+
let s = i.clientWidth, r = i.clientHeight, c = 0, l = 0;
|
|
851
|
+
if (o) {
|
|
852
|
+
s = o.width, r = o.height;
|
|
853
|
+
const f = wt();
|
|
854
|
+
(!f || f && e === "fixed") && (c = o.offsetLeft, l = o.offsetTop);
|
|
855
|
+
}
|
|
856
|
+
return {
|
|
857
|
+
width: s,
|
|
858
|
+
height: r,
|
|
859
|
+
x: c,
|
|
860
|
+
y: l
|
|
861
|
+
};
|
|
862
|
+
}
|
|
863
|
+
function le(t, e) {
|
|
864
|
+
const n = K(t, !0, e === "fixed"), i = n.top + t.clientTop, o = n.left + t.clientLeft, s = W(t) ? G(t) : F(1), r = t.clientWidth * s.x, c = t.clientHeight * s.y, l = o * s.x, f = i * s.y;
|
|
865
|
+
return {
|
|
866
|
+
width: r,
|
|
867
|
+
height: c,
|
|
868
|
+
x: l,
|
|
869
|
+
y: f
|
|
870
|
+
};
|
|
871
|
+
}
|
|
872
|
+
function Ct(t, e, n) {
|
|
873
|
+
let i;
|
|
874
|
+
if (e === "viewport")
|
|
875
|
+
i = ce(t, n);
|
|
876
|
+
else if (e === "document")
|
|
877
|
+
i = re(B(t));
|
|
878
|
+
else if (E(e))
|
|
879
|
+
i = le(e, n);
|
|
880
|
+
else {
|
|
881
|
+
const o = Pt(t);
|
|
882
|
+
i = {
|
|
883
|
+
x: e.x - o.x,
|
|
884
|
+
y: e.y - o.y,
|
|
885
|
+
width: e.width,
|
|
886
|
+
height: e.height
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
return rt(i);
|
|
890
|
+
}
|
|
891
|
+
function kt(t, e) {
|
|
892
|
+
const n = X(t);
|
|
893
|
+
return n === e || !E(n) || J(n) ? !1 : S(n).position === "fixed" || kt(n, e);
|
|
894
|
+
}
|
|
895
|
+
function fe(t, e) {
|
|
896
|
+
const n = e.get(t);
|
|
897
|
+
if (n)
|
|
898
|
+
return n;
|
|
899
|
+
let i = et(t, [], !1).filter((c) => E(c) && Z(c) !== "body"), o = null;
|
|
900
|
+
const s = S(t).position === "fixed";
|
|
901
|
+
let r = s ? X(t) : t;
|
|
902
|
+
for (; E(r) && !J(r); ) {
|
|
903
|
+
const c = S(r), l = xt(r);
|
|
904
|
+
!l && c.position === "fixed" && (o = null), (s ? !l && !o : !l && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || nt(r) && !l && kt(t, r)) ? i = i.filter((d) => d !== r) : o = c, r = X(r);
|
|
905
|
+
}
|
|
906
|
+
return e.set(t, i), i;
|
|
907
|
+
}
|
|
908
|
+
function ae(t) {
|
|
909
|
+
let {
|
|
910
|
+
element: e,
|
|
911
|
+
boundary: n,
|
|
912
|
+
rootBoundary: i,
|
|
913
|
+
strategy: o
|
|
914
|
+
} = t;
|
|
915
|
+
const r = [...n === "clippingAncestors" ? lt(e) ? [] : fe(e, this._c) : [].concat(n), i], c = r[0], l = r.reduce((f, d) => {
|
|
916
|
+
const u = Ct(e, d, o);
|
|
917
|
+
return f.top = R(u.top, f.top), f.right = q(u.right, f.right), f.bottom = q(u.bottom, f.bottom), f.left = R(u.left, f.left), f;
|
|
918
|
+
}, Ct(e, c, o));
|
|
919
|
+
return {
|
|
920
|
+
width: l.right - l.left,
|
|
921
|
+
height: l.bottom - l.top,
|
|
922
|
+
x: l.left,
|
|
923
|
+
y: l.top
|
|
924
|
+
};
|
|
925
|
+
}
|
|
926
|
+
function ue(t) {
|
|
927
|
+
const {
|
|
928
|
+
width: e,
|
|
929
|
+
height: n
|
|
930
|
+
} = Dt(t);
|
|
931
|
+
return {
|
|
932
|
+
width: e,
|
|
933
|
+
height: n
|
|
934
|
+
};
|
|
935
|
+
}
|
|
936
|
+
function de(t, e, n) {
|
|
937
|
+
const i = W(e), o = B(e), s = n === "fixed", r = K(t, !0, s, e);
|
|
938
|
+
let c = {
|
|
939
|
+
scrollLeft: 0,
|
|
940
|
+
scrollTop: 0
|
|
941
|
+
};
|
|
942
|
+
const l = F(0);
|
|
943
|
+
function f() {
|
|
944
|
+
l.x = vt(o);
|
|
945
|
+
}
|
|
946
|
+
if (i || !i && !s)
|
|
947
|
+
if ((Z(e) !== "body" || nt(o)) && (c = ft(e)), i) {
|
|
948
|
+
const a = K(e, !0, s, e);
|
|
949
|
+
l.x = a.x + e.clientLeft, l.y = a.y + e.clientTop;
|
|
950
|
+
} else o && f();
|
|
951
|
+
s && !i && o && f();
|
|
952
|
+
const d = o && !i && !s ? Mt(o, c) : F(0), u = r.left + c.scrollLeft - l.x - d.x, h = r.top + c.scrollTop - l.y - d.y;
|
|
953
|
+
return {
|
|
954
|
+
x: u,
|
|
955
|
+
y: h,
|
|
956
|
+
width: r.width,
|
|
957
|
+
height: r.height
|
|
958
|
+
};
|
|
959
|
+
}
|
|
960
|
+
function at(t) {
|
|
961
|
+
return S(t).position === "static";
|
|
962
|
+
}
|
|
963
|
+
function Tt(t, e) {
|
|
964
|
+
if (!W(t) || S(t).position === "fixed")
|
|
965
|
+
return null;
|
|
966
|
+
if (e)
|
|
967
|
+
return e(t);
|
|
968
|
+
let n = t.offsetParent;
|
|
969
|
+
return B(t) === n && (n = n.ownerDocument.body), n;
|
|
970
|
+
}
|
|
971
|
+
function Ft(t, e) {
|
|
972
|
+
const n = C(t);
|
|
973
|
+
if (lt(t))
|
|
974
|
+
return n;
|
|
975
|
+
if (!W(t)) {
|
|
976
|
+
let o = X(t);
|
|
977
|
+
for (; o && !J(o); ) {
|
|
978
|
+
if (E(o) && !at(o))
|
|
979
|
+
return o;
|
|
980
|
+
o = X(o);
|
|
981
|
+
}
|
|
982
|
+
return n;
|
|
983
|
+
}
|
|
984
|
+
let i = Tt(t, e);
|
|
985
|
+
for (; i && te(i) && at(i); )
|
|
986
|
+
i = Tt(i, e);
|
|
987
|
+
return i && J(i) && at(i) && !xt(i) ? n : i || ee(t) || n;
|
|
988
|
+
}
|
|
989
|
+
const me = async function(t) {
|
|
990
|
+
const e = this.getOffsetParent || Ft, n = this.getDimensions, i = await n(t.floating);
|
|
991
|
+
return {
|
|
992
|
+
reference: de(t.reference, await e(t.floating), t.strategy),
|
|
993
|
+
floating: {
|
|
994
|
+
x: 0,
|
|
995
|
+
y: 0,
|
|
996
|
+
width: i.width,
|
|
997
|
+
height: i.height
|
|
998
|
+
}
|
|
999
|
+
};
|
|
1000
|
+
};
|
|
1001
|
+
function he(t) {
|
|
1002
|
+
return S(t).direction === "rtl";
|
|
1003
|
+
}
|
|
1004
|
+
const ge = {
|
|
1005
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: oe,
|
|
1006
|
+
getDocumentElement: B,
|
|
1007
|
+
getClippingRect: ae,
|
|
1008
|
+
getOffsetParent: Ft,
|
|
1009
|
+
getElementRects: me,
|
|
1010
|
+
getClientRects: se,
|
|
1011
|
+
getDimensions: ue,
|
|
1012
|
+
getScale: G,
|
|
1013
|
+
isElement: E,
|
|
1014
|
+
isRTL: he
|
|
1015
|
+
};
|
|
1016
|
+
function Wt(t, e) {
|
|
1017
|
+
return t.x === e.x && t.y === e.y && t.width === e.width && t.height === e.height;
|
|
1018
|
+
}
|
|
1019
|
+
function pe(t, e) {
|
|
1020
|
+
let n = null, i;
|
|
1021
|
+
const o = B(t);
|
|
1022
|
+
function s() {
|
|
1023
|
+
var c;
|
|
1024
|
+
clearTimeout(i), (c = n) == null || c.disconnect(), n = null;
|
|
1025
|
+
}
|
|
1026
|
+
function r(c, l) {
|
|
1027
|
+
c === void 0 && (c = !1), l === void 0 && (l = 1), s();
|
|
1028
|
+
const f = t.getBoundingClientRect(), {
|
|
1029
|
+
left: d,
|
|
1030
|
+
top: u,
|
|
1031
|
+
width: h,
|
|
1032
|
+
height: a
|
|
1033
|
+
} = f;
|
|
1034
|
+
if (c || e(), !h || !a)
|
|
1035
|
+
return;
|
|
1036
|
+
const m = it(u), g = it(o.clientWidth - (d + h)), p = it(o.clientHeight - (u + a)), x = it(d), y = {
|
|
1037
|
+
rootMargin: -m + "px " + -g + "px " + -p + "px " + -x + "px",
|
|
1038
|
+
threshold: R(0, q(1, l)) || 1
|
|
1039
|
+
};
|
|
1040
|
+
let b = !0;
|
|
1041
|
+
function v(O) {
|
|
1042
|
+
const A = O[0].intersectionRatio;
|
|
1043
|
+
if (A !== l) {
|
|
1044
|
+
if (!b)
|
|
1045
|
+
return r();
|
|
1046
|
+
A ? r(!1, A) : i = setTimeout(() => {
|
|
1047
|
+
r(!1, 1e-7);
|
|
1048
|
+
}, 1e3);
|
|
1049
|
+
}
|
|
1050
|
+
A === 1 && !Wt(f, t.getBoundingClientRect()) && r(), b = !1;
|
|
1051
|
+
}
|
|
1052
|
+
try {
|
|
1053
|
+
n = new IntersectionObserver(v, {
|
|
1054
|
+
...y,
|
|
1055
|
+
// Handle <iframe>s
|
|
1056
|
+
root: o.ownerDocument
|
|
1057
|
+
});
|
|
1058
|
+
} catch {
|
|
1059
|
+
n = new IntersectionObserver(v, y);
|
|
1060
|
+
}
|
|
1061
|
+
n.observe(t);
|
|
1062
|
+
}
|
|
1063
|
+
return r(!0), s;
|
|
1064
|
+
}
|
|
1065
|
+
function xe(t, e, n, i) {
|
|
1066
|
+
i === void 0 && (i = {});
|
|
1067
|
+
const {
|
|
1068
|
+
ancestorScroll: o = !0,
|
|
1069
|
+
ancestorResize: s = !0,
|
|
1070
|
+
elementResize: r = typeof ResizeObserver == "function",
|
|
1071
|
+
layoutShift: c = typeof IntersectionObserver == "function",
|
|
1072
|
+
animationFrame: l = !1
|
|
1073
|
+
} = i, f = yt(t), d = o || s ? [...f ? et(f) : [], ...et(e)] : [];
|
|
1074
|
+
d.forEach((x) => {
|
|
1075
|
+
o && x.addEventListener("scroll", n, {
|
|
1076
|
+
passive: !0
|
|
1077
|
+
}), s && x.addEventListener("resize", n);
|
|
1078
|
+
});
|
|
1079
|
+
const u = f && c ? pe(f, n) : null;
|
|
1080
|
+
let h = -1, a = null;
|
|
1081
|
+
r && (a = new ResizeObserver((x) => {
|
|
1082
|
+
let [w] = x;
|
|
1083
|
+
w && w.target === f && a && (a.unobserve(e), cancelAnimationFrame(h), h = requestAnimationFrame(() => {
|
|
1084
|
+
var y;
|
|
1085
|
+
(y = a) == null || y.observe(e);
|
|
1086
|
+
})), n();
|
|
1087
|
+
}), f && !l && a.observe(f), a.observe(e));
|
|
1088
|
+
let m, g = l ? K(t) : null;
|
|
1089
|
+
l && p();
|
|
1090
|
+
function p() {
|
|
1091
|
+
const x = K(t);
|
|
1092
|
+
g && !Wt(g, x) && n(), g = x, m = requestAnimationFrame(p);
|
|
1093
|
+
}
|
|
1094
|
+
return n(), () => {
|
|
1095
|
+
var x;
|
|
1096
|
+
d.forEach((w) => {
|
|
1097
|
+
o && w.removeEventListener("scroll", n), s && w.removeEventListener("resize", n);
|
|
1098
|
+
}), u == null || u(), (x = a) == null || x.disconnect(), a = null, l && cancelAnimationFrame(m);
|
|
1099
|
+
};
|
|
1100
|
+
}
|
|
1101
|
+
const we = Gt, ye = Jt, ve = Xt, be = Zt, Ae = Ut, Oe = qt, Re = Qt, Ce = (t, e, n) => {
|
|
1102
|
+
const i = /* @__PURE__ */ new Map(), o = {
|
|
1103
|
+
platform: ge,
|
|
1104
|
+
...n
|
|
1105
|
+
}, s = {
|
|
1106
|
+
...o.platform,
|
|
1107
|
+
_c: i
|
|
1108
|
+
};
|
|
1109
|
+
return Yt(t, e, {
|
|
1110
|
+
...o,
|
|
1111
|
+
platform: s
|
|
1112
|
+
});
|
|
1113
|
+
};
|
|
1114
|
+
export {
|
|
1115
|
+
Oe as a,
|
|
1116
|
+
be as b,
|
|
1117
|
+
Ce as c,
|
|
1118
|
+
W as d,
|
|
1119
|
+
E as e,
|
|
1120
|
+
ve as f,
|
|
1121
|
+
C as g,
|
|
1122
|
+
Ae as h,
|
|
1123
|
+
Rt as i,
|
|
1124
|
+
et as j,
|
|
1125
|
+
S as k,
|
|
1126
|
+
Re as l,
|
|
1127
|
+
wt as m,
|
|
1128
|
+
J as n,
|
|
1129
|
+
we as o,
|
|
1130
|
+
X as p,
|
|
1131
|
+
xe as q,
|
|
1132
|
+
ye as s
|
|
1133
|
+
};
|
|
1134
|
+
//# sourceMappingURL=floating-ui.dom-PqoU7a4n.js.map
|