dawn-ui-react 1.0.0-alpha
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/Input-Br91lfPH.js +76 -0
- package/dist/clamp-C6OCmUfq.js +3033 -0
- package/dist/cn-CXogf8HW.js +1692 -0
- package/dist/components/accordion/accordion-header.d.ts +2 -0
- package/dist/components/accordion/accordion-item.d.ts +2 -0
- package/dist/components/accordion/accordion-panel.d.ts +2 -0
- package/dist/components/accordion/accordion-subtitle.d.ts +2 -0
- package/dist/components/accordion/accordion-title.d.ts +2 -0
- package/dist/components/accordion/accordion-trigger.d.ts +2 -0
- package/dist/components/accordion/accordion.d.ts +2 -0
- package/dist/components/accordion/accordion.types.d.ts +18 -0
- package/dist/components/accordion/index.d.ts +7 -0
- package/dist/components/alert/alert-actions.d.ts +2 -0
- package/dist/components/alert/alert-content.d.ts +2 -0
- package/dist/components/alert/alert-description.d.ts +2 -0
- package/dist/components/alert/alert-title.d.ts +2 -0
- package/dist/components/alert/alert.d.ts +2 -0
- package/dist/components/alert/alert.types.d.ts +9 -0
- package/dist/components/alert/index.d.ts +6 -0
- package/dist/components/alert-dialog/alert-dialog-close.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-confirm.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-content.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-context.d.ts +10 -0
- package/dist/components/alert-dialog/alert-dialog-description.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-footer.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-header.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-popup.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-title.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog-trigger.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog.types.d.ts +15 -0
- package/dist/components/alert-dialog/index.d.ts +11 -0
- package/dist/components/autocomplete/autocomplete-collection.d.ts +2 -0
- package/dist/components/autocomplete/autocomplete-content.d.ts +2 -0
- package/dist/components/autocomplete/autocomplete-grid-content.d.ts +2 -0
- package/dist/components/autocomplete/autocomplete-grid-item.d.ts +2 -0
- package/dist/components/autocomplete/autocomplete-group-label.d.ts +2 -0
- package/dist/components/autocomplete/autocomplete-group.d.ts +2 -0
- package/dist/components/autocomplete/autocomplete-input-group-addon.d.ts +2 -0
- package/dist/components/autocomplete/autocomplete-input-group-input.d.ts +2 -0
- package/dist/components/autocomplete/autocomplete-input-group.d.ts +2 -0
- package/dist/components/autocomplete/autocomplete-item.d.ts +2 -0
- package/dist/components/autocomplete/autocomplete-row.d.ts +2 -0
- package/dist/components/autocomplete/autocomplete-status.d.ts +2 -0
- package/dist/components/autocomplete/autocomplete-trigger.d.ts +2 -0
- package/dist/components/autocomplete/autocomplete.d.ts +2 -0
- package/dist/components/autocomplete/autocomplete.types.d.ts +23 -0
- package/dist/components/autocomplete/index.d.ts +15 -0
- package/dist/components/avatar/avatar-badge.d.ts +2 -0
- package/dist/components/avatar/avatar-fallback.d.ts +2 -0
- package/dist/components/avatar/avatar-image.d.ts +2 -0
- package/dist/components/avatar/avatar.d.ts +2 -0
- package/dist/components/avatar/avatar.types.d.ts +14 -0
- package/dist/components/avatar/index.d.ts +5 -0
- package/dist/components/badge/badge.d.ts +2 -0
- package/dist/components/badge/badge.types.d.ts +7 -0
- package/dist/components/badge/index.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb-ellipsis.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb-item.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb-link.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb-separator.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +2 -0
- package/dist/components/breadcrumb/breadcrumb.types.d.ts +5 -0
- package/dist/components/breadcrumb/index.d.ts +6 -0
- package/dist/components/button/button.d.ts +2 -0
- package/dist/components/button/button.types.d.ts +8 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/button-group/button-group.d.ts +2 -0
- package/dist/components/button-group/button-group.types.d.ts +8 -0
- package/dist/components/button-group/index.d.ts +2 -0
- package/dist/components/checkbox/checkbox-indicator.d.ts +2 -0
- package/dist/components/checkbox/checkbox.d.ts +2 -0
- package/dist/components/checkbox/checkbox.types.d.ts +10 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +2 -0
- package/dist/components/checkbox-group/checkbox-group.types.d.ts +2 -0
- package/dist/components/checkbox-group/index.d.ts +2 -0
- package/dist/components/collapsible/collapsible-panel.d.ts +2 -0
- package/dist/components/collapsible/collapsible-trigger.d.ts +2 -0
- package/dist/components/collapsible/collapsible.d.ts +2 -0
- package/dist/components/collapsible/collapsible.types.d.ts +5 -0
- package/dist/components/collapsible/index.d.ts +4 -0
- package/dist/components/combobox/combobox-chip.d.ts +2 -0
- package/dist/components/combobox/combobox-chips.d.ts +2 -0
- package/dist/components/combobox/combobox-collection.d.ts +2 -0
- package/dist/components/combobox/combobox-empty.d.ts +2 -0
- package/dist/components/combobox/combobox-group-label.d.ts +2 -0
- package/dist/components/combobox/combobox-group.d.ts +2 -0
- package/dist/components/combobox/combobox-input.d.ts +2 -0
- package/dist/components/combobox/combobox-item.d.ts +2 -0
- package/dist/components/combobox/combobox-list.d.ts +2 -0
- package/dist/components/combobox/combobox-popup.d.ts +2 -0
- package/dist/components/combobox/combobox-status.d.ts +2 -0
- package/dist/components/combobox/combobox-trigger.d.ts +2 -0
- package/dist/components/combobox/combobox-value.d.ts +2 -0
- package/dist/components/combobox/combobox.d.ts +2 -0
- package/dist/components/combobox/combobox.types.d.ts +22 -0
- package/dist/components/combobox/index.d.ts +15 -0
- package/dist/components/context-menu/context-menu-checkbox-item.d.ts +2 -0
- package/dist/components/context-menu/context-menu-group-label.d.ts +2 -0
- package/dist/components/context-menu/context-menu-group.d.ts +2 -0
- package/dist/components/context-menu/context-menu-item.d.ts +2 -0
- package/dist/components/context-menu/context-menu-popup.d.ts +2 -0
- package/dist/components/context-menu/context-menu-radio-group.d.ts +2 -0
- package/dist/components/context-menu/context-menu-radio-item.d.ts +2 -0
- package/dist/components/context-menu/context-menu-separator.d.ts +2 -0
- package/dist/components/context-menu/context-menu-shortcut.d.ts +2 -0
- package/dist/components/context-menu/context-menu-submenu-trigger.d.ts +2 -0
- package/dist/components/context-menu/context-menu-submenu.d.ts +2 -0
- package/dist/components/context-menu/context-menu-trigger.d.ts +2 -0
- package/dist/components/context-menu/context-menu.d.ts +2 -0
- package/dist/components/context-menu/context-menu.types.d.ts +21 -0
- package/dist/components/context-menu/index.d.ts +14 -0
- package/dist/components/dialog/dialog-close.d.ts +2 -0
- package/dist/components/dialog/dialog-content.d.ts +2 -0
- package/dist/components/dialog/dialog-description.d.ts +2 -0
- package/dist/components/dialog/dialog-footer.d.ts +2 -0
- package/dist/components/dialog/dialog-header.d.ts +2 -0
- package/dist/components/dialog/dialog-popup.d.ts +2 -0
- package/dist/components/dialog/dialog-title.d.ts +2 -0
- package/dist/components/dialog/dialog-trigger.d.ts +2 -0
- package/dist/components/dialog/dialog.d.ts +2 -0
- package/dist/components/dialog/dialog.types.d.ts +11 -0
- package/dist/components/dialog/index.d.ts +10 -0
- package/dist/components/field/field-checkbox.d.ts +2 -0
- package/dist/components/field/field-description.d.ts +2 -0
- package/dist/components/field/field-errors.d.ts +2 -0
- package/dist/components/field/field-input-group-input.d.ts +2 -0
- package/dist/components/field/field-input-group.d.ts +2 -0
- package/dist/components/field/field-input.d.ts +2 -0
- package/dist/components/field/field-label.d.ts +2 -0
- package/dist/components/field/field-radio-group.d.ts +2 -0
- package/dist/components/field/field-select.d.ts +2 -0
- package/dist/components/field/field-slider.d.ts +2 -0
- package/dist/components/field/field-switch.d.ts +2 -0
- package/dist/components/field/field-text-area.d.ts +2 -0
- package/dist/components/field/field-toggle.d.ts +2 -0
- package/dist/components/field/field.d.ts +2 -0
- package/dist/components/field/field.types.d.ts +23 -0
- package/dist/components/field/index.d.ts +13 -0
- package/dist/components/form/form-context.d.ts +98 -0
- package/dist/components/form/form-errors.d.ts +2 -0
- package/dist/components/form/form-reset.d.ts +2 -0
- package/dist/components/form/form-submit.d.ts +2 -0
- package/dist/components/form/form.d.ts +3 -0
- package/dist/components/form/form.types.d.ts +7 -0
- package/dist/components/form/index.d.ts +6 -0
- package/dist/components/index.d.ts +45 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/input.d.ts +2 -0
- package/dist/components/input/input.types.d.ts +8 -0
- package/dist/components/input-group/index.d.ts +4 -0
- package/dist/components/input-group/input-group-addon.d.ts +2 -0
- package/dist/components/input-group/input-group-input.d.ts +2 -0
- package/dist/components/input-group/input-group.d.ts +2 -0
- package/dist/components/input-group/input-group.types.d.ts +6 -0
- package/dist/components/input-otp/index.d.ts +3 -0
- package/dist/components/input-otp/input-otp-slot.d.ts +2 -0
- package/dist/components/input-otp/input-otp.d.ts +2 -0
- package/dist/components/input-otp/input-otp.types.d.ts +3 -0
- package/dist/components/kbd/index.d.ts +2 -0
- package/dist/components/kbd/kbd-group.d.ts +2 -0
- package/dist/components/kbd/kbd.d.ts +2 -0
- package/dist/components/kbd/kbd.types.d.ts +2 -0
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/label/label.d.ts +2 -0
- package/dist/components/label/label.types.d.ts +5 -0
- package/dist/components/layer-tree/index.d.ts +8 -0
- package/dist/components/layer-tree/layer-tree-body.d.ts +2 -0
- package/dist/components/layer-tree/layer-tree-expand-all.d.ts +2 -0
- package/dist/components/layer-tree/layer-tree-node-toggle.d.ts +2 -0
- package/dist/components/layer-tree/layer-tree-node.d.ts +2 -0
- package/dist/components/layer-tree/layer-tree-row.d.ts +2 -0
- package/dist/components/layer-tree/layer-tree-search.d.ts +2 -0
- package/dist/components/layer-tree/layer-tree.d.ts +5 -0
- package/dist/components/layer-tree/layer-tree.types.d.ts +24 -0
- package/dist/components/menu/index.d.ts +14 -0
- package/dist/components/menu/menu-checkbox-item.d.ts +2 -0
- package/dist/components/menu/menu-group-label.d.ts +2 -0
- package/dist/components/menu/menu-group.d.ts +2 -0
- package/dist/components/menu/menu-item.d.ts +2 -0
- package/dist/components/menu/menu-popup.d.ts +2 -0
- package/dist/components/menu/menu-radio-group.d.ts +2 -0
- package/dist/components/menu/menu-radio-item.d.ts +2 -0
- package/dist/components/menu/menu-separator.d.ts +2 -0
- package/dist/components/menu/menu-shortcut.d.ts +2 -0
- package/dist/components/menu/menu-submenu-trigger.d.ts +2 -0
- package/dist/components/menu/menu-submenu.d.ts +2 -0
- package/dist/components/menu/menu-trigger.d.ts +2 -0
- package/dist/components/menu/menu.d.ts +2 -0
- package/dist/components/menu/menu.types.d.ts +21 -0
- package/dist/components/meter/index.d.ts +9 -0
- package/dist/components/meter/meter-footer.d.ts +2 -0
- package/dist/components/meter/meter-header.d.ts +2 -0
- package/dist/components/meter/meter-indicator.d.ts +2 -0
- package/dist/components/meter/meter-label.d.ts +2 -0
- package/dist/components/meter/meter-subtitle.d.ts +2 -0
- package/dist/components/meter/meter-track.d.ts +2 -0
- package/dist/components/meter/meter-value.d.ts +2 -0
- package/dist/components/meter/meter.d.ts +2 -0
- package/dist/components/meter/meter.types.d.ts +15 -0
- package/dist/components/number-field/index.d.ts +2 -0
- package/dist/components/number-field/number-field.d.ts +2 -0
- package/dist/components/number-field/number-field.types.d.ts +8 -0
- package/dist/components/popover/index.d.ts +9 -0
- package/dist/components/popover/popover-content.d.ts +2 -0
- package/dist/components/popover/popover-description.d.ts +2 -0
- package/dist/components/popover/popover-header.d.ts +2 -0
- package/dist/components/popover/popover-panel.d.ts +2 -0
- package/dist/components/popover/popover-title.d.ts +2 -0
- package/dist/components/popover/popover-trigger.d.ts +2 -0
- package/dist/components/popover/popover.d.ts +2 -0
- package/dist/components/popover/popover.types.d.ts +9 -0
- package/dist/components/profile/index.d.ts +2 -0
- package/dist/components/profile/profile.d.ts +2 -0
- package/dist/components/profile/profile.types.d.ts +16 -0
- package/dist/components/progress/index.d.ts +4 -0
- package/dist/components/progress/progress-bar.d.ts +2 -0
- package/dist/components/progress/progress-indicator.d.ts +2 -0
- package/dist/components/progress/progress.d.ts +2 -0
- package/dist/components/progress/progress.types.d.ts +8 -0
- package/dist/components/radar-ping/index.d.ts +2 -0
- package/dist/components/radar-ping/radar-ping.d.ts +2 -0
- package/dist/components/radar-ping/radar-ping.types.d.ts +8 -0
- package/dist/components/radio-group/index.d.ts +3 -0
- package/dist/components/radio-group/radio-group.d.ts +2 -0
- package/dist/components/radio-group/radio-group.types.d.ts +7 -0
- package/dist/components/radio-group/radio.d.ts +2 -0
- package/dist/components/resizeable/index.d.ts +4 -0
- package/dist/components/resizeable/resizeable-handle.d.ts +2 -0
- package/dist/components/resizeable/resizeable-panel-group.d.ts +2 -0
- package/dist/components/resizeable/resizeable-panel.d.ts +2 -0
- package/dist/components/resizeable/resizeable.types.d.ts +6 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/scroll-area.d.ts +2 -0
- package/dist/components/scroll-area/scroll-area.types.d.ts +6 -0
- package/dist/components/select/index.d.ts +10 -0
- package/dist/components/select/select-group-label.d.ts +2 -0
- package/dist/components/select/select-group.d.ts +2 -0
- package/dist/components/select/select-icon.d.ts +2 -0
- package/dist/components/select/select-item.d.ts +2 -0
- package/dist/components/select/select-list.d.ts +2 -0
- package/dist/components/select/select-popup.d.ts +2 -0
- package/dist/components/select/select-trigger.d.ts +2 -0
- package/dist/components/select/select-value.d.ts +2 -0
- package/dist/components/select/select.d.ts +2 -0
- package/dist/components/select/select.types.d.ts +15 -0
- package/dist/components/separator/index.d.ts +2 -0
- package/dist/components/separator/separator.d.ts +2 -0
- package/dist/components/separator/separator.types.d.ts +9 -0
- package/dist/components/sidebar/index.d.ts +17 -0
- package/dist/components/sidebar/sidebar-content.d.ts +2 -0
- package/dist/components/sidebar/sidebar-footer.d.ts +2 -0
- package/dist/components/sidebar/sidebar-group-content.d.ts +2 -0
- package/dist/components/sidebar/sidebar-group-label.d.ts +2 -0
- package/dist/components/sidebar/sidebar-group.d.ts +2 -0
- package/dist/components/sidebar/sidebar-header.d.ts +2 -0
- package/dist/components/sidebar/sidebar-menu-badge.d.ts +2 -0
- package/dist/components/sidebar/sidebar-menu-button.d.ts +2 -0
- package/dist/components/sidebar/sidebar-menu-collapsible-panel.d.ts +2 -0
- package/dist/components/sidebar/sidebar-menu-collapsible-trigger.d.ts +2 -0
- package/dist/components/sidebar/sidebar-menu-collapsible.d.ts +2 -0
- package/dist/components/sidebar/sidebar-menu-item.d.ts +2 -0
- package/dist/components/sidebar/sidebar-menu.d.ts +2 -0
- package/dist/components/sidebar/sidebar-provider.d.ts +14 -0
- package/dist/components/sidebar/sidebar-toggle.d.ts +2 -0
- package/dist/components/sidebar/sidebar.d.ts +2 -0
- package/dist/components/sidebar/sidebar.types.d.ts +27 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/skeleton.d.ts +2 -0
- package/dist/components/skeleton/skeleton.types.d.ts +1 -0
- package/dist/components/slider/index.d.ts +3 -0
- package/dist/components/slider/slider-thumb.d.ts +2 -0
- package/dist/components/slider/slider.d.ts +2 -0
- package/dist/components/slider/slider.types.d.ts +12 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/switch.d.ts +2 -0
- package/dist/components/switch/switch.types.d.ts +4 -0
- package/dist/components/table/index.d.ts +16 -0
- package/dist/components/table/table-body.d.ts +2 -0
- package/dist/components/table/table-change-view.d.ts +4 -0
- package/dist/components/table/table-content.d.ts +2 -0
- package/dist/components/table/table-filter.d.ts +2 -0
- package/dist/components/table/table-first-page.d.ts +2 -0
- package/dist/components/table/table-footer.d.ts +2 -0
- package/dist/components/table/table-header.d.ts +2 -0
- package/dist/components/table/table-last-page.d.ts +2 -0
- package/dist/components/table/table-nav.d.ts +2 -0
- package/dist/components/table/table-next-page.d.ts +2 -0
- package/dist/components/table/table-pagination.d.ts +2 -0
- package/dist/components/table/table-previous-page.d.ts +2 -0
- package/dist/components/table/table-refresh.d.ts +2 -0
- package/dist/components/table/table-results.d.ts +3 -0
- package/dist/components/table/table-row-grid.d.ts +2 -0
- package/dist/components/table/table-row-list.d.ts +2 -0
- package/dist/components/table/table-search.d.ts +2 -0
- package/dist/components/table/table-sort.d.ts +2 -0
- package/dist/components/table/table.d.ts +10 -0
- package/dist/components/table/table.types.d.ts +39 -0
- package/dist/components/tabs/index.d.ts +6 -0
- package/dist/components/tabs/tabs-indicator.d.ts +2 -0
- package/dist/components/tabs/tabs-list.d.ts +2 -0
- package/dist/components/tabs/tabs-panel.d.ts +2 -0
- package/dist/components/tabs/tabs-tab.d.ts +2 -0
- package/dist/components/tabs/tabs.d.ts +2 -0
- package/dist/components/tabs/tabs.types.d.ts +12 -0
- package/dist/components/text-area/index.d.ts +2 -0
- package/dist/components/text-area/text-area.d.ts +2 -0
- package/dist/components/text-area/text-area.types.d.ts +5 -0
- package/dist/components/toast/anchored-toast-item.d.ts +2 -0
- package/dist/components/toast/anchored-toasts.d.ts +2 -0
- package/dist/components/toast/index.d.ts +27 -0
- package/dist/components/toast/stack-toast-item.d.ts +2 -0
- package/dist/components/toast/stack-toasts.d.ts +2 -0
- package/dist/components/toast/toast-manager.d.ts +19 -0
- package/dist/components/toast/toast-provider.d.ts +2 -0
- package/dist/components/toast/toast.types.d.ts +21 -0
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle/toggle.d.ts +2 -0
- package/dist/components/toggle/toggle.types.d.ts +9 -0
- package/dist/components/toggle-group/index.d.ts +2 -0
- package/dist/components/toggle-group/toggle-group-context.d.ts +5 -0
- package/dist/components/toggle-group/toggle-group.d.ts +2 -0
- package/dist/components/toggle-group/toggle-group.types.d.ts +6 -0
- package/dist/components/tooltip/index.d.ts +4 -0
- package/dist/components/tooltip/tooltip-context.d.ts +2 -0
- package/dist/components/tooltip/tooltip-trigger.d.ts +2 -0
- package/dist/components/tooltip/tooltip.d.ts +2 -0
- package/dist/components/tooltip/tooltip.types.d.ts +9 -0
- package/dist/dawn-ui-react.js +12736 -0
- package/dist/dawn-ui-react.umd.cjs +49 -0
- package/dist/field-description-BDRJXMS8.js +12 -0
- package/dist/field-errors-BDUanNiE.js +19 -0
- package/dist/field-input-0WxX-93A.js +58 -0
- package/dist/field-input-group-Dcwadst3.js +18 -0
- package/dist/field-input-group-input-CLQz2SPo.js +20 -0
- package/dist/field-label-DwF_1o76.js +16 -0
- package/dist/field-select-BmvhGVSz.js +2149 -0
- package/dist/field-slider-oL8pDrCe.js +2167 -0
- package/dist/form-context-CzC_p5DL.js +3036 -0
- package/dist/index.d.ts +2 -0
- package/dist/input-group-D3zocoNy.js +12 -0
- package/dist/input-group-input-CHby62R-.js +11 -0
- package/dist/input.types-Dl_61f0y.js +21 -0
- package/dist/rolldown-runtime-CAFD8bLK.js +11 -0
- package/dist/styles.css +779 -0
- package/dist/useLabelableId-VWw8rfpn.js +271 -0
- package/dist/utils/cn.d.ts +2 -0
- package/package.json +124 -0
|
@@ -0,0 +1,3033 @@
|
|
|
1
|
+
import { A as e, C as t, D as n, E as r, F as i, G as a, I as o, J as s, K as c, L as l, M as u, N as d, O as f, P as p, Q as m, R as h, S as g, T as _, V as v, W as y, X as b, Z as x, j as S, k as C, w, x as T, z as E } from "./form-context-CzC_p5DL.js";
|
|
2
|
+
import { F as D, H as ee, S as O, c as k, f as A, l as j, p as M, s as N, u as te } from "./useLabelableId-VWw8rfpn.js";
|
|
3
|
+
import * as P from "react";
|
|
4
|
+
import { useLayoutEffect as ne } from "react";
|
|
5
|
+
import { jsx as F, jsxs as I } from "react/jsx-runtime";
|
|
6
|
+
import * as L from "react-dom";
|
|
7
|
+
import { useSyncExternalStore as re } from "use-sync-external-store/shim";
|
|
8
|
+
import { useSyncExternalStoreWithSelector as ie } from "use-sync-external-store/shim/with-selector";
|
|
9
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/internals/composite/list/CompositeListContext.js
|
|
10
|
+
var R = /* @__PURE__ */ P.createContext({
|
|
11
|
+
register: () => {},
|
|
12
|
+
unregister: () => {},
|
|
13
|
+
subscribeMapChange: () => () => {},
|
|
14
|
+
elementsRef: { current: [] },
|
|
15
|
+
nextIndexRef: { current: 0 }
|
|
16
|
+
});
|
|
17
|
+
process.env.NODE_ENV !== "production" && (R.displayName = "CompositeListContext");
|
|
18
|
+
function ae() {
|
|
19
|
+
return P.useContext(R);
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/internals/composite/list/CompositeList.js
|
|
23
|
+
function z(e) {
|
|
24
|
+
let { children: t, elementsRef: n, labelsRef: r, onMapChange: i } = e, a = x(i), o = P.useRef(0), s = m(V).current, c = m(B).current, [l, u] = P.useState(0), d = P.useRef(l), f = x((e, t) => {
|
|
25
|
+
c.set(e, t ?? null), d.current += 1, u(d.current);
|
|
26
|
+
}), p = x((e) => {
|
|
27
|
+
c.delete(e), d.current += 1, u(d.current);
|
|
28
|
+
}), h = P.useMemo(() => {
|
|
29
|
+
let e = /* @__PURE__ */ new Map();
|
|
30
|
+
return Array.from(c.keys()).filter((e) => e.isConnected).sort(H).forEach((t, n) => {
|
|
31
|
+
let r = c.get(t) ?? {};
|
|
32
|
+
e.set(t, {
|
|
33
|
+
...r,
|
|
34
|
+
index: n
|
|
35
|
+
});
|
|
36
|
+
}), e;
|
|
37
|
+
}, [c, l]);
|
|
38
|
+
b(() => {
|
|
39
|
+
if (typeof MutationObserver != "function" || h.size === 0) return;
|
|
40
|
+
let e = new MutationObserver((e) => {
|
|
41
|
+
let t = /* @__PURE__ */ new Set(), n = (e) => t.has(e) ? t.delete(e) : t.add(e);
|
|
42
|
+
e.forEach((e) => {
|
|
43
|
+
e.removedNodes.forEach(n), e.addedNodes.forEach(n);
|
|
44
|
+
}), t.size === 0 && (d.current += 1, u(d.current));
|
|
45
|
+
});
|
|
46
|
+
return h.forEach((t, n) => {
|
|
47
|
+
n.parentElement && e.observe(n.parentElement, { childList: !0 });
|
|
48
|
+
}), () => {
|
|
49
|
+
e.disconnect();
|
|
50
|
+
};
|
|
51
|
+
}, [h]), b(() => {
|
|
52
|
+
d.current === l && (n.current.length !== h.size && (n.current.length = h.size), r && r.current.length !== h.size && (r.current.length = h.size), o.current = h.size), a(h);
|
|
53
|
+
}, [
|
|
54
|
+
a,
|
|
55
|
+
h,
|
|
56
|
+
n,
|
|
57
|
+
r,
|
|
58
|
+
l
|
|
59
|
+
]), b(() => () => {
|
|
60
|
+
n.current = [];
|
|
61
|
+
}, [n]), b(() => () => {
|
|
62
|
+
r && (r.current = []);
|
|
63
|
+
}, [r]);
|
|
64
|
+
let g = x((e) => (s.add(e), () => {
|
|
65
|
+
s.delete(e);
|
|
66
|
+
}));
|
|
67
|
+
b(() => {
|
|
68
|
+
s.forEach((e) => e(h));
|
|
69
|
+
}, [s, h]);
|
|
70
|
+
let _ = P.useMemo(() => ({
|
|
71
|
+
register: f,
|
|
72
|
+
unregister: p,
|
|
73
|
+
subscribeMapChange: g,
|
|
74
|
+
elementsRef: n,
|
|
75
|
+
labelsRef: r,
|
|
76
|
+
nextIndexRef: o
|
|
77
|
+
}), [
|
|
78
|
+
f,
|
|
79
|
+
p,
|
|
80
|
+
g,
|
|
81
|
+
n,
|
|
82
|
+
r,
|
|
83
|
+
o
|
|
84
|
+
]);
|
|
85
|
+
return /* @__PURE__ */ F(R.Provider, {
|
|
86
|
+
value: _,
|
|
87
|
+
children: t
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
function B() {
|
|
91
|
+
return /* @__PURE__ */ new Map();
|
|
92
|
+
}
|
|
93
|
+
function V() {
|
|
94
|
+
return /* @__PURE__ */ new Set();
|
|
95
|
+
}
|
|
96
|
+
function H(e, t) {
|
|
97
|
+
let n = e.compareDocumentPosition(t);
|
|
98
|
+
return n & Node.DOCUMENT_POSITION_FOLLOWING || n & Node.DOCUMENT_POSITION_CONTAINED_BY ? -1 : n & Node.DOCUMENT_POSITION_PRECEDING || n & Node.DOCUMENT_POSITION_CONTAINS ? 1 : 0;
|
|
99
|
+
}
|
|
100
|
+
//#endregion
|
|
101
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/internals/direction-context/DirectionContext.js
|
|
102
|
+
var oe = /* @__PURE__ */ P.createContext(void 0);
|
|
103
|
+
process.env.NODE_ENV !== "production" && (oe.displayName = "DirectionContext");
|
|
104
|
+
function se() {
|
|
105
|
+
return P.useContext(oe)?.direction ?? "ltr";
|
|
106
|
+
}
|
|
107
|
+
//#endregion
|
|
108
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types_d3ee2f4e7c4092dbff53908511a88462/node_modules/@base-ui/utils/esm/useOnMount.js
|
|
109
|
+
var ce = [];
|
|
110
|
+
function le(e) {
|
|
111
|
+
P.useEffect(e, ce);
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types_d3ee2f4e7c4092dbff53908511a88462/node_modules/@base-ui/utils/esm/useAnimationFrame.js
|
|
115
|
+
var U = null, ue = globalThis.requestAnimationFrame, W = new class {
|
|
116
|
+
callbacks = [];
|
|
117
|
+
callbacksCount = 0;
|
|
118
|
+
nextId = 1;
|
|
119
|
+
startId = 1;
|
|
120
|
+
isScheduled = !1;
|
|
121
|
+
tick = (e) => {
|
|
122
|
+
this.isScheduled = !1;
|
|
123
|
+
let t = this.callbacks, n = this.callbacksCount;
|
|
124
|
+
if (this.callbacks = [], this.callbacksCount = 0, this.startId = this.nextId, n > 0) for (let n = 0; n < t.length; n += 1) t[n]?.(e);
|
|
125
|
+
};
|
|
126
|
+
request(e) {
|
|
127
|
+
let t = this.nextId;
|
|
128
|
+
this.nextId += 1, this.callbacks.push(e), this.callbacksCount += 1;
|
|
129
|
+
let n = process.env.NODE_ENV !== "production" && ue !== requestAnimationFrame && (ue = requestAnimationFrame, !0);
|
|
130
|
+
return (!this.isScheduled || n) && (requestAnimationFrame(this.tick), this.isScheduled = !0), t;
|
|
131
|
+
}
|
|
132
|
+
cancel(e) {
|
|
133
|
+
let t = e - this.startId;
|
|
134
|
+
t < 0 || t >= this.callbacks.length || (this.callbacks[t] = null, --this.callbacksCount);
|
|
135
|
+
}
|
|
136
|
+
}(), G = class e {
|
|
137
|
+
static create() {
|
|
138
|
+
return new e();
|
|
139
|
+
}
|
|
140
|
+
static request(e) {
|
|
141
|
+
return W.request(e);
|
|
142
|
+
}
|
|
143
|
+
static cancel(e) {
|
|
144
|
+
return W.cancel(e);
|
|
145
|
+
}
|
|
146
|
+
currentId = U;
|
|
147
|
+
request(e) {
|
|
148
|
+
this.cancel(), this.currentId = W.request(() => {
|
|
149
|
+
this.currentId = U, e();
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
cancel = () => {
|
|
153
|
+
this.currentId !== U && (W.cancel(this.currentId), this.currentId = U);
|
|
154
|
+
};
|
|
155
|
+
disposeEffect = () => this.cancel;
|
|
156
|
+
};
|
|
157
|
+
function de() {
|
|
158
|
+
let e = m(G.create).current;
|
|
159
|
+
return le(e.disposeEffect), e;
|
|
160
|
+
}
|
|
161
|
+
//#endregion
|
|
162
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/utils/resolveRef.js
|
|
163
|
+
function fe(e) {
|
|
164
|
+
return e == null ? e : "current" in e ? e.current : e;
|
|
165
|
+
}
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/internals/stateAttributesMapping.js
|
|
168
|
+
var K = /* @__PURE__ */ function(e) {
|
|
169
|
+
return e.startingStyle = "data-starting-style", e.endingStyle = "data-ending-style", e;
|
|
170
|
+
}({}), pe = { [K.startingStyle]: "" }, me = { [K.endingStyle]: "" }, he = { transitionStatus(e) {
|
|
171
|
+
return e === "starting" ? pe : e === "ending" ? me : null;
|
|
172
|
+
} };
|
|
173
|
+
//#endregion
|
|
174
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/internals/useAnimationsFinished.js
|
|
175
|
+
function ge(e, t = !1, n = !0) {
|
|
176
|
+
let r = de();
|
|
177
|
+
return x((i, a = null) => {
|
|
178
|
+
r.cancel();
|
|
179
|
+
let o = fe(e);
|
|
180
|
+
if (o == null) return;
|
|
181
|
+
let s = o, c = () => {
|
|
182
|
+
L.flushSync(i);
|
|
183
|
+
};
|
|
184
|
+
if (typeof s.getAnimations != "function" || globalThis.BASE_UI_ANIMATIONS_DISABLED) {
|
|
185
|
+
i();
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
function l() {
|
|
189
|
+
Promise.all(s.getAnimations().map((e) => e.finished)).then(() => {
|
|
190
|
+
a?.aborted || c();
|
|
191
|
+
}).catch(() => {
|
|
192
|
+
if (n) {
|
|
193
|
+
a?.aborted || c();
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
let e = s.getAnimations();
|
|
197
|
+
!a?.aborted && e.length > 0 && e.some((e) => e.pending || e.playState !== "finished") && l();
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
if (t) {
|
|
201
|
+
let e = K.startingStyle;
|
|
202
|
+
if (!s.hasAttribute(e)) {
|
|
203
|
+
r.request(l);
|
|
204
|
+
return;
|
|
205
|
+
}
|
|
206
|
+
let t = new MutationObserver(() => {
|
|
207
|
+
s.hasAttribute(e) || (t.disconnect(), l());
|
|
208
|
+
});
|
|
209
|
+
t.observe(s, {
|
|
210
|
+
attributes: !0,
|
|
211
|
+
attributeFilter: [e]
|
|
212
|
+
}), a?.addEventListener("abort", () => t.disconnect(), { once: !0 });
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
r.request(l);
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/internals/useTransitionStatus.js
|
|
220
|
+
function _e(e, t = !1, n = !1) {
|
|
221
|
+
let [r, i] = P.useState(e && t ? "idle" : void 0), [a, o] = P.useState(e);
|
|
222
|
+
return e && !a && (o(!0), i("starting")), !e && a && r !== "ending" && !n && i("ending"), !e && !a && r === "ending" && i(void 0), b(() => {
|
|
223
|
+
if (!e && a && r !== "ending" && n) {
|
|
224
|
+
let e = G.request(() => {
|
|
225
|
+
i("ending");
|
|
226
|
+
});
|
|
227
|
+
return () => {
|
|
228
|
+
G.cancel(e);
|
|
229
|
+
};
|
|
230
|
+
}
|
|
231
|
+
}, [
|
|
232
|
+
e,
|
|
233
|
+
a,
|
|
234
|
+
r,
|
|
235
|
+
n
|
|
236
|
+
]), b(() => {
|
|
237
|
+
if (!e || t) return;
|
|
238
|
+
let n = G.request(() => {
|
|
239
|
+
i(void 0);
|
|
240
|
+
});
|
|
241
|
+
return () => {
|
|
242
|
+
G.cancel(n);
|
|
243
|
+
};
|
|
244
|
+
}, [t, e]), b(() => {
|
|
245
|
+
if (!e || !t) return;
|
|
246
|
+
e && a && r !== "idle" && i("starting");
|
|
247
|
+
let n = G.request(() => {
|
|
248
|
+
i("idle");
|
|
249
|
+
});
|
|
250
|
+
return () => {
|
|
251
|
+
G.cancel(n);
|
|
252
|
+
};
|
|
253
|
+
}, [
|
|
254
|
+
t,
|
|
255
|
+
e,
|
|
256
|
+
a,
|
|
257
|
+
r
|
|
258
|
+
]), {
|
|
259
|
+
mounted: a,
|
|
260
|
+
setMounted: o,
|
|
261
|
+
transitionStatus: r
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
//#endregion
|
|
265
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types_d3ee2f4e7c4092dbff53908511a88462/node_modules/@base-ui/utils/esm/detectBrowser.js
|
|
266
|
+
var q = typeof navigator < "u", ve = Oe(), ye = Ae(), be = ke(), xe = typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter:none"), Se = ve.platform === "MacIntel" && ve.maxTouchPoints > 1 ? !0 : /iP(hone|ad|od)|iOS/.test(ve.platform), Ce = q && /firefox/i.test(be), we = q && /apple/i.test(navigator.vendor);
|
|
267
|
+
q && /Edg/i.test(be);
|
|
268
|
+
var Te = q && /android/i.test(ye) || /android/i.test(be), Ee = q && ye.toLowerCase().startsWith("mac") && !navigator.maxTouchPoints, De = be.includes("jsdom/");
|
|
269
|
+
function Oe() {
|
|
270
|
+
if (!q) return {
|
|
271
|
+
platform: "",
|
|
272
|
+
maxTouchPoints: -1
|
|
273
|
+
};
|
|
274
|
+
let e = navigator.userAgentData;
|
|
275
|
+
return e?.platform ? {
|
|
276
|
+
platform: e.platform,
|
|
277
|
+
maxTouchPoints: navigator.maxTouchPoints
|
|
278
|
+
} : {
|
|
279
|
+
platform: navigator.platform ?? "",
|
|
280
|
+
maxTouchPoints: navigator.maxTouchPoints ?? -1
|
|
281
|
+
};
|
|
282
|
+
}
|
|
283
|
+
function ke() {
|
|
284
|
+
if (!q) return "";
|
|
285
|
+
let e = navigator.userAgentData;
|
|
286
|
+
return e && Array.isArray(e.brands) ? e.brands.map(({ brand: e, version: t }) => `${e}/${t}`).join(" ") : navigator.userAgent;
|
|
287
|
+
}
|
|
288
|
+
function Ae() {
|
|
289
|
+
if (!q) return "";
|
|
290
|
+
let e = navigator.userAgentData;
|
|
291
|
+
return e?.platform ? e.platform : navigator.platform ?? "";
|
|
292
|
+
}
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/floating-ui-react/utils/constants.js
|
|
295
|
+
var je = "data-base-ui-focusable", Me = "input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])", Ne = "ArrowLeft", Pe = "ArrowRight", Fe = "ArrowUp", Ie = "ArrowDown";
|
|
296
|
+
//#endregion
|
|
297
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js
|
|
298
|
+
function Le(e, t) {
|
|
299
|
+
if (!S(e)) return !1;
|
|
300
|
+
let n = e;
|
|
301
|
+
if (t.hasElement(n)) return !n.hasAttribute("data-trigger-disabled");
|
|
302
|
+
for (let [, e] of t.entries()) if (j(e, n)) return !e.hasAttribute("data-trigger-disabled");
|
|
303
|
+
return !1;
|
|
304
|
+
}
|
|
305
|
+
function J(e, t) {
|
|
306
|
+
if (t == null) return !1;
|
|
307
|
+
if ("composedPath" in e) return e.composedPath().includes(t);
|
|
308
|
+
let n = e;
|
|
309
|
+
return n.target != null && t.contains(n.target);
|
|
310
|
+
}
|
|
311
|
+
function Re(e) {
|
|
312
|
+
return e.matches("html,body");
|
|
313
|
+
}
|
|
314
|
+
function ze(e) {
|
|
315
|
+
return u(e) && e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])");
|
|
316
|
+
}
|
|
317
|
+
function Be(e) {
|
|
318
|
+
return e?.closest(`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Me}`) != null;
|
|
319
|
+
}
|
|
320
|
+
function Ve(e) {
|
|
321
|
+
return e ? e.getAttribute("role") === "combobox" && ze(e) : !1;
|
|
322
|
+
}
|
|
323
|
+
function He(e) {
|
|
324
|
+
if (!e || De) return !0;
|
|
325
|
+
try {
|
|
326
|
+
return e.matches(":focus-visible");
|
|
327
|
+
} catch {
|
|
328
|
+
return !0;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
function Ue(e) {
|
|
332
|
+
return e ? e.hasAttribute("data-base-ui-focusable") ? e : e.querySelector("[data-base-ui-focusable]") || e : null;
|
|
333
|
+
}
|
|
334
|
+
//#endregion
|
|
335
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/floating-ui-react/utils/nodes.js
|
|
336
|
+
function We(e, t, n = !0) {
|
|
337
|
+
return e.filter((e) => e.parentId === t).flatMap((t) => [...!n || t.context?.open ? [t] : [], ...We(e, t.id, n)]);
|
|
338
|
+
}
|
|
339
|
+
function Ge(e, t) {
|
|
340
|
+
let n = [], r = e.find((e) => e.id === t)?.parentId;
|
|
341
|
+
for (; r;) {
|
|
342
|
+
let t = e.find((e) => e.id === r);
|
|
343
|
+
r = t?.parentId, t && (n = n.concat(t));
|
|
344
|
+
}
|
|
345
|
+
return n;
|
|
346
|
+
}
|
|
347
|
+
//#endregion
|
|
348
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/floating-ui-react/utils/event.js
|
|
349
|
+
function Ke(e) {
|
|
350
|
+
e.preventDefault(), e.stopPropagation();
|
|
351
|
+
}
|
|
352
|
+
function qe(e) {
|
|
353
|
+
return "nativeEvent" in e;
|
|
354
|
+
}
|
|
355
|
+
function Je(e) {
|
|
356
|
+
return e.pointerType === "" && e.isTrusted ? !0 : Te && e.pointerType ? e.type === "click" && e.buttons === 1 : e.detail === 0 && !e.pointerType;
|
|
357
|
+
}
|
|
358
|
+
function Ye(e) {
|
|
359
|
+
return De ? !1 : !Te && e.width === 0 && e.height === 0 || Te && e.width === 1 && e.height === 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "mouse" || e.width < 1 && e.height < 1 && e.pressure === 0 && e.detail === 0 && e.pointerType === "touch";
|
|
360
|
+
}
|
|
361
|
+
function Xe(e, t) {
|
|
362
|
+
let n = ["mouse", "pen"];
|
|
363
|
+
return t || n.push("", void 0), n.includes(e);
|
|
364
|
+
}
|
|
365
|
+
function Ze(e) {
|
|
366
|
+
let t = e.type;
|
|
367
|
+
return t === "click" || t === "mousedown" || t === "keydown" || t === "keyup";
|
|
368
|
+
}
|
|
369
|
+
//#endregion
|
|
370
|
+
//#region node_modules/.pnpm/@floating-ui+utils@0.2.11/node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
371
|
+
var Qe = [
|
|
372
|
+
"top",
|
|
373
|
+
"right",
|
|
374
|
+
"bottom",
|
|
375
|
+
"left"
|
|
376
|
+
], $e = Math.min, Y = Math.max, et = Math.round, tt = Math.floor, nt = (e) => ({
|
|
377
|
+
x: e,
|
|
378
|
+
y: e
|
|
379
|
+
}), rt = {
|
|
380
|
+
left: "right",
|
|
381
|
+
right: "left",
|
|
382
|
+
bottom: "top",
|
|
383
|
+
top: "bottom"
|
|
384
|
+
};
|
|
385
|
+
function it(e, t, n) {
|
|
386
|
+
return Y(e, $e(t, n));
|
|
387
|
+
}
|
|
388
|
+
function at(e, t) {
|
|
389
|
+
return typeof e == "function" ? e(t) : e;
|
|
390
|
+
}
|
|
391
|
+
function X(e) {
|
|
392
|
+
return e.split("-")[0];
|
|
393
|
+
}
|
|
394
|
+
function ot(e) {
|
|
395
|
+
return e.split("-")[1];
|
|
396
|
+
}
|
|
397
|
+
function st(e) {
|
|
398
|
+
return e === "x" ? "y" : "x";
|
|
399
|
+
}
|
|
400
|
+
function ct(e) {
|
|
401
|
+
return e === "y" ? "height" : "width";
|
|
402
|
+
}
|
|
403
|
+
function Z(e) {
|
|
404
|
+
let t = e[0];
|
|
405
|
+
return t === "t" || t === "b" ? "y" : "x";
|
|
406
|
+
}
|
|
407
|
+
function lt(e) {
|
|
408
|
+
return st(Z(e));
|
|
409
|
+
}
|
|
410
|
+
function ut(e, t, n) {
|
|
411
|
+
n === void 0 && (n = !1);
|
|
412
|
+
let r = ot(e), i = lt(e), a = ct(i), o = i === "x" ? r === (n ? "end" : "start") ? "right" : "left" : r === "start" ? "bottom" : "top";
|
|
413
|
+
return t.reference[a] > t.floating[a] && (o = yt(o)), [o, yt(o)];
|
|
414
|
+
}
|
|
415
|
+
function dt(e) {
|
|
416
|
+
let t = yt(e);
|
|
417
|
+
return [
|
|
418
|
+
ft(e),
|
|
419
|
+
t,
|
|
420
|
+
ft(t)
|
|
421
|
+
];
|
|
422
|
+
}
|
|
423
|
+
function ft(e) {
|
|
424
|
+
return e.includes("start") ? e.replace("start", "end") : e.replace("end", "start");
|
|
425
|
+
}
|
|
426
|
+
var pt = ["left", "right"], mt = ["right", "left"], ht = ["top", "bottom"], gt = ["bottom", "top"];
|
|
427
|
+
function _t(e, t, n) {
|
|
428
|
+
switch (e) {
|
|
429
|
+
case "top":
|
|
430
|
+
case "bottom": return n ? t ? mt : pt : t ? pt : mt;
|
|
431
|
+
case "left":
|
|
432
|
+
case "right": return t ? ht : gt;
|
|
433
|
+
default: return [];
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
function vt(e, t, n, r) {
|
|
437
|
+
let i = ot(e), a = _t(X(e), n === "start", r);
|
|
438
|
+
return i && (a = a.map((e) => e + "-" + i), t && (a = a.concat(a.map(ft)))), a;
|
|
439
|
+
}
|
|
440
|
+
function yt(e) {
|
|
441
|
+
let t = X(e);
|
|
442
|
+
return rt[t] + e.slice(t.length);
|
|
443
|
+
}
|
|
444
|
+
function bt(e) {
|
|
445
|
+
return {
|
|
446
|
+
top: 0,
|
|
447
|
+
right: 0,
|
|
448
|
+
bottom: 0,
|
|
449
|
+
left: 0,
|
|
450
|
+
...e
|
|
451
|
+
};
|
|
452
|
+
}
|
|
453
|
+
function xt(e) {
|
|
454
|
+
return typeof e == "number" ? {
|
|
455
|
+
top: e,
|
|
456
|
+
right: e,
|
|
457
|
+
bottom: e,
|
|
458
|
+
left: e
|
|
459
|
+
} : bt(e);
|
|
460
|
+
}
|
|
461
|
+
function St(e) {
|
|
462
|
+
let { x: t, y: n, width: r, height: i } = e;
|
|
463
|
+
return {
|
|
464
|
+
width: r,
|
|
465
|
+
height: i,
|
|
466
|
+
top: n,
|
|
467
|
+
left: t,
|
|
468
|
+
right: t + r,
|
|
469
|
+
bottom: n + i,
|
|
470
|
+
x: t,
|
|
471
|
+
y: n
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
//#endregion
|
|
475
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/floating-ui-react/utils/composite.js
|
|
476
|
+
function Ct(e, t, n) {
|
|
477
|
+
return Math.floor(e / t) !== n;
|
|
478
|
+
}
|
|
479
|
+
function wt(e, t) {
|
|
480
|
+
return t < 0 || t >= e.length;
|
|
481
|
+
}
|
|
482
|
+
function Tt(e, t) {
|
|
483
|
+
return Q(e.current, { disabledIndices: t });
|
|
484
|
+
}
|
|
485
|
+
function Et(e, t) {
|
|
486
|
+
return Q(e.current, {
|
|
487
|
+
decrement: !0,
|
|
488
|
+
startingIndex: e.current.length,
|
|
489
|
+
disabledIndices: t
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
function Q(e, { startingIndex: t = -1, decrement: n = !1, disabledIndices: r, amount: i = 1 } = {}) {
|
|
493
|
+
let a = t;
|
|
494
|
+
do
|
|
495
|
+
a += n ? -i : i;
|
|
496
|
+
while (a >= 0 && a <= e.length - 1 && jt(e, a, r));
|
|
497
|
+
return a;
|
|
498
|
+
}
|
|
499
|
+
function Dt(e, { event: t, orientation: n, loopFocus: r, onLoop: i, rtl: a, cols: o, disabledIndices: s, minIndex: c, maxIndex: l, prevIndex: u, stopEvent: d = !1 }) {
|
|
500
|
+
let f = u, p;
|
|
501
|
+
if (t.key === "ArrowUp" ? p = "up" : t.key === "ArrowDown" && (p = "down"), p) {
|
|
502
|
+
let n = [], a = [], m = !1, h = 0;
|
|
503
|
+
{
|
|
504
|
+
let t = null, r = -1;
|
|
505
|
+
e.forEach((e, i) => {
|
|
506
|
+
if (e == null) return;
|
|
507
|
+
h += 1;
|
|
508
|
+
let o = e.closest("[role=\"row\"]");
|
|
509
|
+
o && (m = !0), (o !== t || r === -1) && (t = o, r += 1, n[r] = []), n[r].push(i), a[i] = r;
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
let g = !1, _ = 0;
|
|
513
|
+
if (m) for (let e of n) {
|
|
514
|
+
let t = e.length;
|
|
515
|
+
t > _ && (_ = t), t !== o && (g = !0);
|
|
516
|
+
}
|
|
517
|
+
let v = g && h < e.length, y = _ || o, b = (o) => {
|
|
518
|
+
if (!g || u === -1) return;
|
|
519
|
+
let c = a[u];
|
|
520
|
+
if (c == null) return;
|
|
521
|
+
let l = n[c].indexOf(u), d = o === "up" ? -1 : 1;
|
|
522
|
+
for (let o = c + d, f = 0; f < n.length; f += 1, o += d) {
|
|
523
|
+
if (o < 0 || o >= n.length) {
|
|
524
|
+
if (!r || v) return;
|
|
525
|
+
if (o = o < 0 ? n.length - 1 : 0, i) {
|
|
526
|
+
let e = Math.min(l, n[o].length - 1);
|
|
527
|
+
o = a[i(t, u, n[o][e] ?? n[o][0])] ?? o;
|
|
528
|
+
}
|
|
529
|
+
}
|
|
530
|
+
let c = n[o];
|
|
531
|
+
for (let t = Math.min(l, c.length - 1); t >= 0; --t) {
|
|
532
|
+
let n = c[t];
|
|
533
|
+
if (!jt(e, n, s)) return n;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}, x = (t) => {
|
|
537
|
+
if (!v || u === -1) return;
|
|
538
|
+
let n = u % y, i = t === "up" ? -y : y, a = l - l % y, o = tt(l / y) + 1;
|
|
539
|
+
for (let t = u - n + i, c = 0; c < o; c += 1, t += i) {
|
|
540
|
+
if (t < 0 || t > l) {
|
|
541
|
+
if (!r) return;
|
|
542
|
+
t = t < 0 ? a : 0;
|
|
543
|
+
}
|
|
544
|
+
let i = Math.min(t + y - 1, l);
|
|
545
|
+
for (let r = Math.min(t + n, i); r >= t; --r) if (!jt(e, r, s)) return r;
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
d && Ke(t);
|
|
549
|
+
let S = b(p) ?? x(p);
|
|
550
|
+
if (S !== void 0) f = S;
|
|
551
|
+
else if (u === -1) f = p === "up" ? l : c;
|
|
552
|
+
else if (f = Q(e, {
|
|
553
|
+
startingIndex: u,
|
|
554
|
+
amount: y,
|
|
555
|
+
decrement: p === "up",
|
|
556
|
+
disabledIndices: s
|
|
557
|
+
}), r) {
|
|
558
|
+
if (p === "up" && (u - y < c || f < 0)) {
|
|
559
|
+
let e = u % y, n = l % y, r = l - (n - e);
|
|
560
|
+
f = n === e ? l : n > e ? r : r - y, i && (f = i(t, u, f));
|
|
561
|
+
}
|
|
562
|
+
p === "down" && u + y > l && (f = Q(e, {
|
|
563
|
+
startingIndex: u % y - y,
|
|
564
|
+
amount: y,
|
|
565
|
+
disabledIndices: s
|
|
566
|
+
}), i && (f = i(t, u, f)));
|
|
567
|
+
}
|
|
568
|
+
wt(e, f) && (f = u);
|
|
569
|
+
}
|
|
570
|
+
if (n === "both") {
|
|
571
|
+
let n = tt(u / o);
|
|
572
|
+
t.key === (a ? "ArrowLeft" : "ArrowRight") && (d && Ke(t), u % o === o - 1 ? r && (f = Q(e, {
|
|
573
|
+
startingIndex: u - u % o - 1,
|
|
574
|
+
disabledIndices: s
|
|
575
|
+
}), i && (f = i(t, u, f))) : (f = Q(e, {
|
|
576
|
+
startingIndex: u,
|
|
577
|
+
disabledIndices: s
|
|
578
|
+
}), r && Ct(f, o, n) && (f = Q(e, {
|
|
579
|
+
startingIndex: u - u % o - 1,
|
|
580
|
+
disabledIndices: s
|
|
581
|
+
}), i && (f = i(t, u, f)))), Ct(f, o, n) && (f = u)), t.key === (a ? "ArrowRight" : "ArrowLeft") && (d && Ke(t), u % o === 0 ? r && (f = Q(e, {
|
|
582
|
+
startingIndex: u + (o - u % o),
|
|
583
|
+
decrement: !0,
|
|
584
|
+
disabledIndices: s
|
|
585
|
+
}), i && (f = i(t, u, f))) : (f = Q(e, {
|
|
586
|
+
startingIndex: u,
|
|
587
|
+
decrement: !0,
|
|
588
|
+
disabledIndices: s
|
|
589
|
+
}), r && Ct(f, o, n) && (f = Q(e, {
|
|
590
|
+
startingIndex: u + (o - u % o),
|
|
591
|
+
decrement: !0,
|
|
592
|
+
disabledIndices: s
|
|
593
|
+
}), i && (f = i(t, u, f)))), Ct(f, o, n) && (f = u));
|
|
594
|
+
let c = tt(l / o) === n;
|
|
595
|
+
wt(e, f) && (r && c ? (f = t.key === (a ? "ArrowRight" : "ArrowLeft") ? l : Q(e, {
|
|
596
|
+
startingIndex: u - u % o - 1,
|
|
597
|
+
disabledIndices: s
|
|
598
|
+
}), i && (f = i(t, u, f))) : f = u);
|
|
599
|
+
}
|
|
600
|
+
return f;
|
|
601
|
+
}
|
|
602
|
+
function Ot(e, t, n) {
|
|
603
|
+
let r = [], i = 0;
|
|
604
|
+
return e.forEach(({ width: e, height: a }, o) => {
|
|
605
|
+
if (e > t && process.env.NODE_ENV !== "production") throw Error(`[Floating UI]: Invalid grid - item width at index ${o} is greater than grid columns`);
|
|
606
|
+
let s = !1;
|
|
607
|
+
for (n && (i = 0); !s;) {
|
|
608
|
+
let n = [];
|
|
609
|
+
for (let r = 0; r < e; r += 1) for (let e = 0; e < a; e += 1) n.push(i + r + e * t);
|
|
610
|
+
i % t + e <= t && n.every((e) => r[e] == null) ? (n.forEach((e) => {
|
|
611
|
+
r[e] = o;
|
|
612
|
+
}), s = !0) : i += 1;
|
|
613
|
+
}
|
|
614
|
+
}), [...r];
|
|
615
|
+
}
|
|
616
|
+
function kt(e, t, n, r, i) {
|
|
617
|
+
if (e === -1) return -1;
|
|
618
|
+
let a = n.indexOf(e), o = t[e];
|
|
619
|
+
switch (i) {
|
|
620
|
+
case "tl": return a;
|
|
621
|
+
case "tr": return o ? a + o.width - 1 : a;
|
|
622
|
+
case "bl": return o ? a + (o.height - 1) * r : a;
|
|
623
|
+
case "br": return n.lastIndexOf(e);
|
|
624
|
+
default: return -1;
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
function At(e, t) {
|
|
628
|
+
return t.flatMap((t, n) => e.includes(t) ? [n] : []);
|
|
629
|
+
}
|
|
630
|
+
function jt(e, t, n) {
|
|
631
|
+
if (typeof n == "function" ? n(t) : n?.includes(t) ?? !1) return !0;
|
|
632
|
+
let r = e[t];
|
|
633
|
+
return r ? Nt(r) ? !n && (r.hasAttribute("disabled") || r.getAttribute("aria-disabled") === "true") : !0 : !1;
|
|
634
|
+
}
|
|
635
|
+
function Mt(e) {
|
|
636
|
+
return e.visibility === "hidden" || e.visibility === "collapse";
|
|
637
|
+
}
|
|
638
|
+
function Nt(e, t = e ? T(e) : null) {
|
|
639
|
+
return !e || !e.isConnected || !t || Mt(t) ? !1 : typeof e.checkVisibility == "function" ? e.checkVisibility() : t.display !== "none" && t.display !== "contents";
|
|
640
|
+
}
|
|
641
|
+
//#endregion
|
|
642
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/floating-ui-react/utils/tabbable.js
|
|
643
|
+
var Pt = "a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable=\"false\"]),audio[controls],video[controls]";
|
|
644
|
+
function Ft(e) {
|
|
645
|
+
let t = e.assignedSlot;
|
|
646
|
+
if (t) return t;
|
|
647
|
+
if (e.parentElement) return e.parentElement;
|
|
648
|
+
let n = e.getRootNode();
|
|
649
|
+
return o(n) ? n.host : null;
|
|
650
|
+
}
|
|
651
|
+
function It(e) {
|
|
652
|
+
for (let t of Array.from(e.children)) if (_(t) === "summary") return t;
|
|
653
|
+
return null;
|
|
654
|
+
}
|
|
655
|
+
function Lt(e, t) {
|
|
656
|
+
let n = It(t);
|
|
657
|
+
return !!n && (e === n || j(n, e));
|
|
658
|
+
}
|
|
659
|
+
function Rt(e) {
|
|
660
|
+
let t = e ? _(e) : "";
|
|
661
|
+
return e != null && e.matches(Pt) && (t !== "summary" || e.parentElement != null && _(e.parentElement) === "details" && It(e.parentElement) === e) && (t !== "details" || It(e) == null) && (t !== "input" || e.type !== "hidden");
|
|
662
|
+
}
|
|
663
|
+
function zt(e) {
|
|
664
|
+
if (!Rt(e) || !e.isConnected || e.matches(":disabled")) return !1;
|
|
665
|
+
for (let t = e; t; t = Ft(t)) {
|
|
666
|
+
let n = t !== e, r = _(t) === "slot";
|
|
667
|
+
if (t.hasAttribute("inert") || n && _(t) === "details" && !t.open && !Lt(e, t) || t.hasAttribute("hidden") || !r && !Bt(t, n)) return !1;
|
|
668
|
+
}
|
|
669
|
+
return !0;
|
|
670
|
+
}
|
|
671
|
+
function Bt(e, t) {
|
|
672
|
+
let n = T(e);
|
|
673
|
+
return t ? n.display !== "none" : Nt(e, n);
|
|
674
|
+
}
|
|
675
|
+
function Vt(e) {
|
|
676
|
+
let t = e.tabIndex;
|
|
677
|
+
if (t < 0) {
|
|
678
|
+
let t = _(e);
|
|
679
|
+
if (t === "details" || t === "audio" || t === "video" || u(e) && e.isContentEditable) return 0;
|
|
680
|
+
}
|
|
681
|
+
return t;
|
|
682
|
+
}
|
|
683
|
+
function Ht(e) {
|
|
684
|
+
if (_(e) !== "input") return null;
|
|
685
|
+
let t = e;
|
|
686
|
+
return t.type === "radio" && t.name !== "" ? t : null;
|
|
687
|
+
}
|
|
688
|
+
function Ut(e, t) {
|
|
689
|
+
let n = Ht(e);
|
|
690
|
+
if (!n) return !0;
|
|
691
|
+
let r = t.find((e) => {
|
|
692
|
+
let t = Ht(e);
|
|
693
|
+
return t?.name === n.name && t.form === n.form && t.checked;
|
|
694
|
+
});
|
|
695
|
+
return r ? r === n : t.find((e) => {
|
|
696
|
+
let t = Ht(e);
|
|
697
|
+
return t?.name === n.name && t.form === n.form;
|
|
698
|
+
}) === n;
|
|
699
|
+
}
|
|
700
|
+
function Wt(e) {
|
|
701
|
+
if (u(e) && _(e) === "slot") {
|
|
702
|
+
let t = e.assignedElements({ flatten: !0 });
|
|
703
|
+
if (t.length > 0) return t;
|
|
704
|
+
}
|
|
705
|
+
return u(e) && e.shadowRoot ? Array.from(e.shadowRoot.children) : Array.from(e.children);
|
|
706
|
+
}
|
|
707
|
+
function Gt(e, t) {
|
|
708
|
+
Wt(e).forEach((e) => {
|
|
709
|
+
Rt(e) && t.push(e), Gt(e, t);
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
function Kt(e, t, n) {
|
|
713
|
+
Wt(e).forEach((e) => {
|
|
714
|
+
u(e) && e.matches(t) && n.push(e), Kt(e, t, n);
|
|
715
|
+
});
|
|
716
|
+
}
|
|
717
|
+
function qt(e) {
|
|
718
|
+
return zt(e) && Vt(e) >= 0;
|
|
719
|
+
}
|
|
720
|
+
function Jt(e) {
|
|
721
|
+
let t = [];
|
|
722
|
+
return Gt(e, t), t.filter(zt);
|
|
723
|
+
}
|
|
724
|
+
function Yt(e) {
|
|
725
|
+
let t = Jt(e);
|
|
726
|
+
return t.filter((e) => Vt(e) >= 0 && Ut(e, t));
|
|
727
|
+
}
|
|
728
|
+
function Xt(e, t) {
|
|
729
|
+
let n = Yt(e), r = n.length;
|
|
730
|
+
if (r === 0) return;
|
|
731
|
+
let i = k(N(e)), a = n.indexOf(i);
|
|
732
|
+
return n[a === -1 ? t === 1 ? 0 : r - 1 : a + t];
|
|
733
|
+
}
|
|
734
|
+
function Zt(e) {
|
|
735
|
+
return Xt(N(e).body, 1) || e;
|
|
736
|
+
}
|
|
737
|
+
function Qt(e) {
|
|
738
|
+
return Xt(N(e).body, -1) || e;
|
|
739
|
+
}
|
|
740
|
+
function $t(e, t) {
|
|
741
|
+
if (!e) return null;
|
|
742
|
+
let n = Yt(N(e).body), r = n.length;
|
|
743
|
+
if (r === 0) return null;
|
|
744
|
+
let i = n.indexOf(e);
|
|
745
|
+
return i === -1 ? null : n[(i + t + r) % r];
|
|
746
|
+
}
|
|
747
|
+
function en(e) {
|
|
748
|
+
return $t(e, 1);
|
|
749
|
+
}
|
|
750
|
+
function tn(e) {
|
|
751
|
+
return $t(e, -1);
|
|
752
|
+
}
|
|
753
|
+
function nn(e, t) {
|
|
754
|
+
let n = t || e.currentTarget, r = e.relatedTarget;
|
|
755
|
+
return !r || !j(n, r);
|
|
756
|
+
}
|
|
757
|
+
function rn(e) {
|
|
758
|
+
Yt(e).forEach((e) => {
|
|
759
|
+
e.dataset.tabindex = e.getAttribute("tabindex") || "", e.setAttribute("tabindex", "-1");
|
|
760
|
+
});
|
|
761
|
+
}
|
|
762
|
+
function an(e) {
|
|
763
|
+
let t = [];
|
|
764
|
+
Kt(e, "[data-tabindex]", t), t.forEach((e) => {
|
|
765
|
+
let t = e.dataset.tabindex;
|
|
766
|
+
delete e.dataset.tabindex, t ? e.setAttribute("tabindex", t) : e.removeAttribute("tabindex");
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
//#endregion
|
|
770
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/internals/composite/composite.js
|
|
771
|
+
var on = "ArrowUp", sn = "ArrowDown", cn = "ArrowLeft", ln = "ArrowRight", un = "Home", dn = "PageUp", fn = "PageDown", pn = new Set([cn, ln]), mn = new Set([
|
|
772
|
+
cn,
|
|
773
|
+
ln,
|
|
774
|
+
un,
|
|
775
|
+
"End"
|
|
776
|
+
]), hn = new Set([on, sn]), gn = new Set([
|
|
777
|
+
on,
|
|
778
|
+
sn,
|
|
779
|
+
un,
|
|
780
|
+
"End"
|
|
781
|
+
]), _n = new Set([...pn, ...hn]), vn = new Set([
|
|
782
|
+
..._n,
|
|
783
|
+
un,
|
|
784
|
+
"End"
|
|
785
|
+
]), yn = new Set([
|
|
786
|
+
on,
|
|
787
|
+
sn,
|
|
788
|
+
cn,
|
|
789
|
+
ln,
|
|
790
|
+
un,
|
|
791
|
+
"End"
|
|
792
|
+
]), bn = "Shift", xn = new Set([
|
|
793
|
+
bn,
|
|
794
|
+
"Control",
|
|
795
|
+
"Alt",
|
|
796
|
+
"Meta"
|
|
797
|
+
]);
|
|
798
|
+
function Sn(e) {
|
|
799
|
+
return u(e) && e.tagName === "INPUT";
|
|
800
|
+
}
|
|
801
|
+
function Cn(e) {
|
|
802
|
+
return !!(Sn(e) && e.selectionStart != null || u(e) && e.tagName === "TEXTAREA");
|
|
803
|
+
}
|
|
804
|
+
function wn(e, t, n, r) {
|
|
805
|
+
if (!e || !t || !t.scrollTo) return;
|
|
806
|
+
let i = e.scrollLeft, a = e.scrollTop, o = e.clientWidth < e.scrollWidth, s = e.clientHeight < e.scrollHeight;
|
|
807
|
+
if (o && r !== "vertical") {
|
|
808
|
+
let r = Tn(e, t, "left"), a = En(e), o = En(t);
|
|
809
|
+
n === "ltr" && (r + t.offsetWidth + o.scrollMarginRight > e.scrollLeft + e.clientWidth - a.scrollPaddingRight ? i = r + t.offsetWidth + o.scrollMarginRight - e.clientWidth + a.scrollPaddingRight : r - o.scrollMarginLeft < e.scrollLeft + a.scrollPaddingLeft && (i = r - o.scrollMarginLeft - a.scrollPaddingLeft)), n === "rtl" && (r - o.scrollMarginRight < e.scrollLeft + a.scrollPaddingLeft ? i = r - o.scrollMarginLeft - a.scrollPaddingLeft : r + t.offsetWidth + o.scrollMarginRight > e.scrollLeft + e.clientWidth - a.scrollPaddingRight && (i = r + t.offsetWidth + o.scrollMarginRight - e.clientWidth + a.scrollPaddingRight));
|
|
810
|
+
}
|
|
811
|
+
if (s && r !== "horizontal") {
|
|
812
|
+
let n = Tn(e, t, "top"), r = En(e), i = En(t);
|
|
813
|
+
n - i.scrollMarginTop < e.scrollTop + r.scrollPaddingTop ? a = n - i.scrollMarginTop - r.scrollPaddingTop : n + t.offsetHeight + i.scrollMarginBottom > e.scrollTop + e.clientHeight - r.scrollPaddingBottom && (a = n + t.offsetHeight + i.scrollMarginBottom - e.clientHeight + r.scrollPaddingBottom);
|
|
814
|
+
}
|
|
815
|
+
e.scrollTo({
|
|
816
|
+
left: i,
|
|
817
|
+
top: a,
|
|
818
|
+
behavior: "auto"
|
|
819
|
+
});
|
|
820
|
+
}
|
|
821
|
+
function Tn(e, t, n) {
|
|
822
|
+
let r = n === "left" ? "offsetLeft" : "offsetTop", i = 0;
|
|
823
|
+
for (; t.offsetParent && (i += t[r], t.offsetParent !== e);) t = t.offsetParent;
|
|
824
|
+
return i;
|
|
825
|
+
}
|
|
826
|
+
function En(e) {
|
|
827
|
+
let t = getComputedStyle(e);
|
|
828
|
+
return {
|
|
829
|
+
scrollMarginTop: parseFloat(t.scrollMarginTop) || 0,
|
|
830
|
+
scrollMarginRight: parseFloat(t.scrollMarginRight) || 0,
|
|
831
|
+
scrollMarginBottom: parseFloat(t.scrollMarginBottom) || 0,
|
|
832
|
+
scrollMarginLeft: parseFloat(t.scrollMarginLeft) || 0,
|
|
833
|
+
scrollPaddingTop: parseFloat(t.scrollPaddingTop) || 0,
|
|
834
|
+
scrollPaddingRight: parseFloat(t.scrollPaddingRight) || 0,
|
|
835
|
+
scrollPaddingBottom: parseFloat(t.scrollPaddingBottom) || 0,
|
|
836
|
+
scrollPaddingLeft: parseFloat(t.scrollPaddingLeft) || 0
|
|
837
|
+
};
|
|
838
|
+
}
|
|
839
|
+
//#endregion
|
|
840
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types_d3ee2f4e7c4092dbff53908511a88462/node_modules/@base-ui/utils/esm/addEventListener.js
|
|
841
|
+
function $(e, t, n, r) {
|
|
842
|
+
return e.addEventListener(t, n, r), () => {
|
|
843
|
+
e.removeEventListener(t, n, r);
|
|
844
|
+
};
|
|
845
|
+
}
|
|
846
|
+
//#endregion
|
|
847
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/internals/useOpenChangeComplete.js
|
|
848
|
+
function Dn(e) {
|
|
849
|
+
let { enabled: t = !0, open: n, ref: r, onComplete: i } = e, a = x(i), o = ge(r, n, !1);
|
|
850
|
+
P.useEffect(() => {
|
|
851
|
+
if (!t) return;
|
|
852
|
+
let e = new AbortController();
|
|
853
|
+
return o(a, e.signal), () => {
|
|
854
|
+
e.abort();
|
|
855
|
+
};
|
|
856
|
+
}, [
|
|
857
|
+
t,
|
|
858
|
+
n,
|
|
859
|
+
a,
|
|
860
|
+
o
|
|
861
|
+
]);
|
|
862
|
+
}
|
|
863
|
+
//#endregion
|
|
864
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types_d3ee2f4e7c4092dbff53908511a88462/node_modules/@base-ui/utils/esm/useOnFirstRender.js
|
|
865
|
+
function On(e) {
|
|
866
|
+
let t = P.useRef(!0);
|
|
867
|
+
t.current && (t.current = !1, e());
|
|
868
|
+
}
|
|
869
|
+
//#endregion
|
|
870
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types_d3ee2f4e7c4092dbff53908511a88462/node_modules/@base-ui/utils/esm/useTimeout.js
|
|
871
|
+
var kn = 0, An = class e {
|
|
872
|
+
static create() {
|
|
873
|
+
return new e();
|
|
874
|
+
}
|
|
875
|
+
currentId = kn;
|
|
876
|
+
start(e, t) {
|
|
877
|
+
this.clear(), this.currentId = setTimeout(() => {
|
|
878
|
+
this.currentId = kn, t();
|
|
879
|
+
}, e);
|
|
880
|
+
}
|
|
881
|
+
isStarted() {
|
|
882
|
+
return this.currentId !== kn;
|
|
883
|
+
}
|
|
884
|
+
clear = () => {
|
|
885
|
+
this.currentId !== kn && (clearTimeout(this.currentId), this.currentId = kn);
|
|
886
|
+
};
|
|
887
|
+
disposeEffect = () => this.clear;
|
|
888
|
+
};
|
|
889
|
+
function jn() {
|
|
890
|
+
let e = m(An.create).current;
|
|
891
|
+
return le(e.disposeEffect), e;
|
|
892
|
+
}
|
|
893
|
+
//#endregion
|
|
894
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types_d3ee2f4e7c4092dbff53908511a88462/node_modules/@base-ui/utils/esm/mergeCleanups.js
|
|
895
|
+
function Mn(...e) {
|
|
896
|
+
return () => {
|
|
897
|
+
for (let t = 0; t < e.length; t += 1) {
|
|
898
|
+
let n = e[t];
|
|
899
|
+
n && n();
|
|
900
|
+
}
|
|
901
|
+
};
|
|
902
|
+
}
|
|
903
|
+
//#endregion
|
|
904
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types_d3ee2f4e7c4092dbff53908511a88462/node_modules/@base-ui/utils/esm/useValueAsRef.js
|
|
905
|
+
function Nn(e) {
|
|
906
|
+
let t = m(Pn, e).current;
|
|
907
|
+
return t.next = e, b(t.effect), t;
|
|
908
|
+
}
|
|
909
|
+
function Pn(e) {
|
|
910
|
+
let t = {
|
|
911
|
+
current: e,
|
|
912
|
+
next: e,
|
|
913
|
+
effect: () => {
|
|
914
|
+
t.current = t.next;
|
|
915
|
+
}
|
|
916
|
+
};
|
|
917
|
+
return t;
|
|
918
|
+
}
|
|
919
|
+
//#endregion
|
|
920
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types_d3ee2f4e7c4092dbff53908511a88462/node_modules/@base-ui/utils/esm/visuallyHidden.js
|
|
921
|
+
var Fn = {
|
|
922
|
+
clipPath: "inset(50%)",
|
|
923
|
+
overflow: "hidden",
|
|
924
|
+
whiteSpace: "nowrap",
|
|
925
|
+
border: 0,
|
|
926
|
+
padding: 0,
|
|
927
|
+
width: 1,
|
|
928
|
+
height: 1,
|
|
929
|
+
margin: -1
|
|
930
|
+
}, In = {
|
|
931
|
+
...Fn,
|
|
932
|
+
position: "fixed",
|
|
933
|
+
top: 0,
|
|
934
|
+
left: 0
|
|
935
|
+
}, Ln = {
|
|
936
|
+
...Fn,
|
|
937
|
+
position: "absolute"
|
|
938
|
+
}, Rn = /* @__PURE__ */ P.forwardRef(function(e, t) {
|
|
939
|
+
let [n, r] = P.useState();
|
|
940
|
+
b(() => {
|
|
941
|
+
we && r("button");
|
|
942
|
+
}, []);
|
|
943
|
+
let i = {
|
|
944
|
+
tabIndex: 0,
|
|
945
|
+
role: n
|
|
946
|
+
};
|
|
947
|
+
return /* @__PURE__ */ F("span", {
|
|
948
|
+
...e,
|
|
949
|
+
ref: t,
|
|
950
|
+
style: In,
|
|
951
|
+
"aria-hidden": n ? void 0 : !0,
|
|
952
|
+
...i,
|
|
953
|
+
"data-base-ui-focus-guard": ""
|
|
954
|
+
});
|
|
955
|
+
});
|
|
956
|
+
process.env.NODE_ENV !== "production" && (Rn.displayName = "FocusGuard");
|
|
957
|
+
//#endregion
|
|
958
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/floating-ui-react/utils/createAttribute.js
|
|
959
|
+
function zn(e) {
|
|
960
|
+
return `data-base-ui-${e}`;
|
|
961
|
+
}
|
|
962
|
+
//#endregion
|
|
963
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/internals/constants.js
|
|
964
|
+
var Bn = { style: { transition: "none" } }, Vn = "data-base-ui-click-trigger", Hn = "data-base-ui-swipe-ignore", Un = "data-swipe-ignore", Wn = `[${Hn}]`, Gn = `[${Un}]`, Kn = { fallbackAxisSide: "none" }, qn = { fallbackAxisSide: "end" }, Jn = {
|
|
965
|
+
clipPath: "inset(50%)",
|
|
966
|
+
position: "fixed",
|
|
967
|
+
top: 0,
|
|
968
|
+
left: 0
|
|
969
|
+
}, Yn = /* @__PURE__ */ P.createContext(null);
|
|
970
|
+
process.env.NODE_ENV !== "production" && (Yn.displayName = "PortalContext");
|
|
971
|
+
var Xn = () => P.useContext(Yn), Zn = zn("portal");
|
|
972
|
+
function Qn(e = {}) {
|
|
973
|
+
let { ref: t, container: n, componentProps: r = y, elementProps: i } = e, a = A(), o = Xn()?.portalNode, [s, c] = P.useState(null), [l, u] = P.useState(null), d = x((e) => {
|
|
974
|
+
e !== null && u(e);
|
|
975
|
+
}), f = P.useRef(null);
|
|
976
|
+
b(() => {
|
|
977
|
+
if (n === null) {
|
|
978
|
+
f.current && (f.current = null, u(null), c(null));
|
|
979
|
+
return;
|
|
980
|
+
}
|
|
981
|
+
if (a == null) return;
|
|
982
|
+
let e = (n && (p(n) ? n : n.current)) ?? o ?? document.body;
|
|
983
|
+
if (e == null) {
|
|
984
|
+
f.current && (f.current = null, u(null), c(null));
|
|
985
|
+
return;
|
|
986
|
+
}
|
|
987
|
+
f.current !== e && (f.current = e, u(null), c(e));
|
|
988
|
+
}, [
|
|
989
|
+
n,
|
|
990
|
+
o,
|
|
991
|
+
a
|
|
992
|
+
]);
|
|
993
|
+
let m = v("div", r, {
|
|
994
|
+
ref: [t, d],
|
|
995
|
+
props: [{
|
|
996
|
+
id: a,
|
|
997
|
+
[Zn]: ""
|
|
998
|
+
}, i]
|
|
999
|
+
});
|
|
1000
|
+
return {
|
|
1001
|
+
portalNode: l,
|
|
1002
|
+
portalSubtree: s && m ? /* @__PURE__ */ L.createPortal(m, s) : null
|
|
1003
|
+
};
|
|
1004
|
+
}
|
|
1005
|
+
var $n = /* @__PURE__ */ P.forwardRef(function(e, t) {
|
|
1006
|
+
let { children: n, container: r, className: i, render: a, renderGuards: o, style: s, ...c } = e, { portalNode: l, portalSubtree: u } = Qn({
|
|
1007
|
+
container: r,
|
|
1008
|
+
ref: t,
|
|
1009
|
+
componentProps: e,
|
|
1010
|
+
elementProps: c
|
|
1011
|
+
}), d = P.useRef(null), f = P.useRef(null), p = P.useRef(null), m = P.useRef(null), [h, g] = P.useState(null), _ = P.useRef(!1), v = h?.modal, y = h?.open, b = typeof o == "boolean" ? o : !!h && !h.modal && h.open && !!l;
|
|
1012
|
+
P.useEffect(() => {
|
|
1013
|
+
if (!l || v) return;
|
|
1014
|
+
function e(e) {
|
|
1015
|
+
l && e.relatedTarget && nn(e) && (e.type === "focusin" ? _.current &&= (an(l), !1) : (rn(l), _.current = !0));
|
|
1016
|
+
}
|
|
1017
|
+
return Mn($(l, "focusin", e, !0), $(l, "focusout", e, !0));
|
|
1018
|
+
}, [l, v]), P.useEffect(() => {
|
|
1019
|
+
!l || y !== !1 || (an(l), _.current = !1);
|
|
1020
|
+
}, [y, l]);
|
|
1021
|
+
let x = P.useMemo(() => ({
|
|
1022
|
+
beforeOutsideRef: d,
|
|
1023
|
+
afterOutsideRef: f,
|
|
1024
|
+
beforeInsideRef: p,
|
|
1025
|
+
afterInsideRef: m,
|
|
1026
|
+
portalNode: l,
|
|
1027
|
+
setFocusManagerState: g
|
|
1028
|
+
}), [l]);
|
|
1029
|
+
return /* @__PURE__ */ I(P.Fragment, { children: [u, /* @__PURE__ */ I(Yn.Provider, {
|
|
1030
|
+
value: x,
|
|
1031
|
+
children: [
|
|
1032
|
+
b && l && /* @__PURE__ */ F(Rn, {
|
|
1033
|
+
"data-type": "outside",
|
|
1034
|
+
ref: d,
|
|
1035
|
+
onFocus: (e) => {
|
|
1036
|
+
nn(e, l) ? p.current?.focus() : Qt(h ? h.domReference : null)?.focus();
|
|
1037
|
+
}
|
|
1038
|
+
}),
|
|
1039
|
+
b && l && /* @__PURE__ */ F("span", {
|
|
1040
|
+
"aria-owns": l.id,
|
|
1041
|
+
style: Jn
|
|
1042
|
+
}),
|
|
1043
|
+
l && /* @__PURE__ */ L.createPortal(n, l),
|
|
1044
|
+
b && l && /* @__PURE__ */ F(Rn, {
|
|
1045
|
+
"data-type": "outside",
|
|
1046
|
+
ref: f,
|
|
1047
|
+
onFocus: (e) => {
|
|
1048
|
+
nn(e, l) ? m.current?.focus() : (Zt(h ? h.domReference : null)?.focus(), h?.closeOnFocusOut && h?.onOpenChange(!1, M("focus-out", e.nativeEvent)));
|
|
1049
|
+
}
|
|
1050
|
+
})
|
|
1051
|
+
]
|
|
1052
|
+
})] });
|
|
1053
|
+
});
|
|
1054
|
+
process.env.NODE_ENV !== "production" && ($n.displayName = "FloatingPortal");
|
|
1055
|
+
//#endregion
|
|
1056
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/floating-ui-react/utils/createEventEmitter.js
|
|
1057
|
+
function er() {
|
|
1058
|
+
let e = /* @__PURE__ */ new Map();
|
|
1059
|
+
return {
|
|
1060
|
+
emit(t, n) {
|
|
1061
|
+
e.get(t)?.forEach((e) => e(n));
|
|
1062
|
+
},
|
|
1063
|
+
on(t, n) {
|
|
1064
|
+
e.has(t) || e.set(t, /* @__PURE__ */ new Set()), e.get(t).add(n);
|
|
1065
|
+
},
|
|
1066
|
+
off(t, n) {
|
|
1067
|
+
e.get(t)?.delete(n);
|
|
1068
|
+
}
|
|
1069
|
+
};
|
|
1070
|
+
}
|
|
1071
|
+
//#endregion
|
|
1072
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingTreeStore.js
|
|
1073
|
+
var tr = class {
|
|
1074
|
+
nodesRef = { current: [] };
|
|
1075
|
+
events = er();
|
|
1076
|
+
addNode(e) {
|
|
1077
|
+
this.nodesRef.current.push(e);
|
|
1078
|
+
}
|
|
1079
|
+
removeNode(e) {
|
|
1080
|
+
let t = this.nodesRef.current.findIndex((t) => t === e);
|
|
1081
|
+
t !== -1 && this.nodesRef.current.splice(t, 1);
|
|
1082
|
+
}
|
|
1083
|
+
}, nr = /* @__PURE__ */ P.createContext(null);
|
|
1084
|
+
process.env.NODE_ENV !== "production" && (nr.displayName = "FloatingNodeContext");
|
|
1085
|
+
var rr = /* @__PURE__ */ P.createContext(null);
|
|
1086
|
+
process.env.NODE_ENV !== "production" && (rr.displayName = "FloatingTreeContext");
|
|
1087
|
+
var ir = () => P.useContext(nr)?.id || null, ar = (e) => {
|
|
1088
|
+
let t = P.useContext(rr);
|
|
1089
|
+
return e ?? t;
|
|
1090
|
+
};
|
|
1091
|
+
function or(e) {
|
|
1092
|
+
let t = A(), n = ar(e), r = ir();
|
|
1093
|
+
return b(() => {
|
|
1094
|
+
if (!t) return;
|
|
1095
|
+
let e = {
|
|
1096
|
+
id: t,
|
|
1097
|
+
parentId: r
|
|
1098
|
+
};
|
|
1099
|
+
return n?.addNode(e), () => {
|
|
1100
|
+
n?.removeNode(e);
|
|
1101
|
+
};
|
|
1102
|
+
}, [
|
|
1103
|
+
n,
|
|
1104
|
+
t,
|
|
1105
|
+
r
|
|
1106
|
+
]), t;
|
|
1107
|
+
}
|
|
1108
|
+
function sr(e) {
|
|
1109
|
+
let { children: t, id: n } = e, r = ir();
|
|
1110
|
+
return /* @__PURE__ */ F(nr.Provider, {
|
|
1111
|
+
value: P.useMemo(() => ({
|
|
1112
|
+
id: n,
|
|
1113
|
+
parentId: r
|
|
1114
|
+
}), [n, r]),
|
|
1115
|
+
children: t
|
|
1116
|
+
});
|
|
1117
|
+
}
|
|
1118
|
+
function cr(e) {
|
|
1119
|
+
let { children: t, externalTree: n } = e, r = m(() => n ?? new tr()).current;
|
|
1120
|
+
return /* @__PURE__ */ F(rr.Provider, {
|
|
1121
|
+
value: r,
|
|
1122
|
+
children: t
|
|
1123
|
+
});
|
|
1124
|
+
}
|
|
1125
|
+
//#endregion
|
|
1126
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useDismiss.js
|
|
1127
|
+
var lr = {
|
|
1128
|
+
intentional: "onClick",
|
|
1129
|
+
sloppy: "onPointerDown"
|
|
1130
|
+
};
|
|
1131
|
+
function ur() {
|
|
1132
|
+
return !1;
|
|
1133
|
+
}
|
|
1134
|
+
function dr(e) {
|
|
1135
|
+
return {
|
|
1136
|
+
escapeKey: typeof e == "boolean" ? e : e?.escapeKey ?? !1,
|
|
1137
|
+
outsidePress: typeof e == "boolean" ? e : e?.outsidePress ?? !0
|
|
1138
|
+
};
|
|
1139
|
+
}
|
|
1140
|
+
function fr(e, t = {}) {
|
|
1141
|
+
let n = "rootStore" in e ? e.rootStore : e, r = n.useState("open"), i = n.useState("floatingElement"), { dataRef: a } = n.context, { enabled: s = !0, escapeKey: c = !0, outsidePress: l = !0, outsidePressEvent: p = "sloppy", referencePress: m = ur, referencePressEvent: h = "sloppy", bubbles: g, externalTree: _ } = t, v = ar(_), y = x(typeof l == "function" ? l : () => !1), b = typeof l == "function" ? y : l, C = b !== !1, w = x(() => p), k = P.useRef(!1), A = P.useRef(!1), ne = P.useRef(!1), { escapeKey: F, outsidePress: I } = dr(g), L = P.useRef(null), re = jn(), ie = jn(), R = x(() => {
|
|
1142
|
+
ie.clear(), a.current.insideReactTree = !1;
|
|
1143
|
+
}), ae = P.useRef(!1), z = P.useRef(""), B = x(m), V = x((e) => {
|
|
1144
|
+
if (!r || !s || !c || e.key !== "Escape" || ae.current) return;
|
|
1145
|
+
let t = a.current.floatingContext?.nodeId, i = v ? We(v.nodesRef.current, t) : [];
|
|
1146
|
+
if (!F && i.length > 0) {
|
|
1147
|
+
let e = !0;
|
|
1148
|
+
if (i.forEach((t) => {
|
|
1149
|
+
t.context?.open && !t.context.dataRef.current.__escapeKeyBubbles && (e = !1);
|
|
1150
|
+
}), !e) return;
|
|
1151
|
+
}
|
|
1152
|
+
let o = M(O, qe(e) ? e.nativeEvent : e);
|
|
1153
|
+
n.setOpen(!1, o), !F && !o.isPropagationAllowed && e.stopPropagation();
|
|
1154
|
+
}), H = x(() => {
|
|
1155
|
+
a.current.insideReactTree = !0, ie.start(0, R);
|
|
1156
|
+
});
|
|
1157
|
+
P.useEffect(() => {
|
|
1158
|
+
if (!r || !s) return;
|
|
1159
|
+
a.current.__escapeKeyBubbles = F, a.current.__outsidePressBubbles = I;
|
|
1160
|
+
let e = new An(), t = new An();
|
|
1161
|
+
function l() {
|
|
1162
|
+
e.clear(), ae.current = !0;
|
|
1163
|
+
}
|
|
1164
|
+
function p() {
|
|
1165
|
+
e.start(E() ? 5 : 0, () => {
|
|
1166
|
+
ae.current = !1;
|
|
1167
|
+
});
|
|
1168
|
+
}
|
|
1169
|
+
function m() {
|
|
1170
|
+
ne.current = !0, t.start(0, () => {
|
|
1171
|
+
ne.current = !1;
|
|
1172
|
+
});
|
|
1173
|
+
}
|
|
1174
|
+
function h() {
|
|
1175
|
+
k.current = !1, A.current = !1;
|
|
1176
|
+
}
|
|
1177
|
+
function g() {
|
|
1178
|
+
let e = z.current, t = e === "pen" || !e ? "mouse" : e, n = w(), r = typeof n == "function" ? n() : n;
|
|
1179
|
+
return typeof r == "string" ? r : r[t];
|
|
1180
|
+
}
|
|
1181
|
+
function _(e) {
|
|
1182
|
+
let t = g();
|
|
1183
|
+
return t === "intentional" && e.type !== "click" || t === "sloppy" && e.type === "click";
|
|
1184
|
+
}
|
|
1185
|
+
function y(e) {
|
|
1186
|
+
let t = a.current.floatingContext?.nodeId, r = v && We(v.nodesRef.current, t).some((t) => J(e, t.context?.elements.floating));
|
|
1187
|
+
return J(e, n.select("floatingElement")) || J(e, n.select("domReferenceElement")) || r;
|
|
1188
|
+
}
|
|
1189
|
+
function x(e) {
|
|
1190
|
+
if (_(e)) {
|
|
1191
|
+
R();
|
|
1192
|
+
return;
|
|
1193
|
+
}
|
|
1194
|
+
if (a.current.insideReactTree) {
|
|
1195
|
+
R();
|
|
1196
|
+
return;
|
|
1197
|
+
}
|
|
1198
|
+
let r = te(e), i = `[${zn("inert")}]`, s = S(r) ? r.getRootNode() : null, c = Array.from((o(s) ? s : N(n.select("floatingElement"))).querySelectorAll(i)), l = n.context.triggerElements;
|
|
1199
|
+
if (r && (l.hasElement(r) || l.hasMatchingElement((e) => j(e, r)))) return;
|
|
1200
|
+
let p = S(r) ? r : null;
|
|
1201
|
+
for (; p && !d(p);) {
|
|
1202
|
+
let e = f(p);
|
|
1203
|
+
if (d(e) || !S(e)) break;
|
|
1204
|
+
p = e;
|
|
1205
|
+
}
|
|
1206
|
+
if (c.length && S(r) && !Re(r) && !j(r, n.select("floatingElement")) && c.every((e) => !j(p, e))) return;
|
|
1207
|
+
if (u(r) && !("touches" in e)) {
|
|
1208
|
+
let t = d(r), n = T(r), i = /auto|scroll/, a = t || i.test(n.overflowX), o = t || i.test(n.overflowY), s = a && r.clientWidth > 0 && r.scrollWidth > r.clientWidth, c = o && r.clientHeight > 0 && r.scrollHeight > r.clientHeight, l = n.direction === "rtl", u = c && (l ? e.offsetX <= r.offsetWidth - r.clientWidth : e.offsetX > r.clientWidth), f = s && e.offsetY > r.clientHeight;
|
|
1209
|
+
if (u || f) return;
|
|
1210
|
+
}
|
|
1211
|
+
if (y(e)) return;
|
|
1212
|
+
if (g() === "intentional" && ne.current) {
|
|
1213
|
+
t.clear(), ne.current = !1;
|
|
1214
|
+
return;
|
|
1215
|
+
}
|
|
1216
|
+
if (typeof b == "function" && !b(e)) return;
|
|
1217
|
+
let m = a.current.floatingContext?.nodeId, h = v ? We(v.nodesRef.current, m) : [];
|
|
1218
|
+
if (h.length > 0) {
|
|
1219
|
+
let e = !0;
|
|
1220
|
+
if (h.forEach((t) => {
|
|
1221
|
+
t.context?.open && !t.context.dataRef.current.__outsidePressBubbles && (e = !1);
|
|
1222
|
+
}), !e) return;
|
|
1223
|
+
}
|
|
1224
|
+
n.setOpen(!1, M(D, e)), R();
|
|
1225
|
+
}
|
|
1226
|
+
function ee(e) {
|
|
1227
|
+
g() !== "sloppy" || e.pointerType === "touch" || !n.select("open") || !s || J(e, n.select("floatingElement")) || J(e, n.select("domReferenceElement")) || x(e);
|
|
1228
|
+
}
|
|
1229
|
+
function O(e) {
|
|
1230
|
+
if (g() !== "sloppy" || !n.select("open") || !s || J(e, n.select("floatingElement")) || J(e, n.select("domReferenceElement"))) return;
|
|
1231
|
+
let t = e.touches[0];
|
|
1232
|
+
t && (L.current = {
|
|
1233
|
+
startTime: Date.now(),
|
|
1234
|
+
startX: t.clientX,
|
|
1235
|
+
startY: t.clientY,
|
|
1236
|
+
dismissOnTouchEnd: !1,
|
|
1237
|
+
dismissOnMouseDown: !0
|
|
1238
|
+
}, re.start(1e3, () => {
|
|
1239
|
+
L.current && (L.current.dismissOnTouchEnd = !1, L.current.dismissOnMouseDown = !1);
|
|
1240
|
+
}));
|
|
1241
|
+
}
|
|
1242
|
+
function P(e, t) {
|
|
1243
|
+
let n = te(e);
|
|
1244
|
+
if (!n) return;
|
|
1245
|
+
let r = $(n, e.type, () => {
|
|
1246
|
+
t(e), r();
|
|
1247
|
+
});
|
|
1248
|
+
}
|
|
1249
|
+
function ie(e) {
|
|
1250
|
+
z.current = "touch", P(e, O);
|
|
1251
|
+
}
|
|
1252
|
+
function B(e) {
|
|
1253
|
+
re.clear(), e.type === "pointerdown" && (z.current = e.pointerType), !(e.type === "mousedown" && L.current && !L.current.dismissOnMouseDown) && P(e, (e) => {
|
|
1254
|
+
e.type === "pointerdown" ? ee(e) : x(e);
|
|
1255
|
+
});
|
|
1256
|
+
}
|
|
1257
|
+
function H(e) {
|
|
1258
|
+
if (!k.current) return;
|
|
1259
|
+
let n = A.current;
|
|
1260
|
+
if (h(), g() === "intentional") {
|
|
1261
|
+
if (e.type === "pointercancel") {
|
|
1262
|
+
n && m();
|
|
1263
|
+
return;
|
|
1264
|
+
}
|
|
1265
|
+
if (!y(e)) {
|
|
1266
|
+
if (n) {
|
|
1267
|
+
m();
|
|
1268
|
+
return;
|
|
1269
|
+
}
|
|
1270
|
+
typeof b == "function" && !b(e) || (t.clear(), ne.current = !0, R());
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
}
|
|
1274
|
+
function oe(e) {
|
|
1275
|
+
if (g() !== "sloppy" || !L.current || J(e, n.select("floatingElement")) || J(e, n.select("domReferenceElement"))) return;
|
|
1276
|
+
let t = e.touches[0];
|
|
1277
|
+
if (!t) return;
|
|
1278
|
+
let r = Math.abs(t.clientX - L.current.startX), i = Math.abs(t.clientY - L.current.startY), a = Math.sqrt(r * r + i * i);
|
|
1279
|
+
a > 5 && (L.current.dismissOnTouchEnd = !0), a > 10 && (x(e), re.clear(), L.current = null);
|
|
1280
|
+
}
|
|
1281
|
+
function se(e) {
|
|
1282
|
+
P(e, oe);
|
|
1283
|
+
}
|
|
1284
|
+
function ce(e) {
|
|
1285
|
+
g() !== "sloppy" || !L.current || J(e, n.select("floatingElement")) || J(e, n.select("domReferenceElement")) || (L.current.dismissOnTouchEnd && x(e), re.clear(), L.current = null);
|
|
1286
|
+
}
|
|
1287
|
+
function le(e) {
|
|
1288
|
+
P(e, ce);
|
|
1289
|
+
}
|
|
1290
|
+
let U = N(i), ue = Mn(c && Mn($(U, "keydown", V), $(U, "compositionstart", l), $(U, "compositionend", p)), C && Mn($(U, "click", B, !0), $(U, "pointerdown", B, !0), $(U, "pointerup", H, !0), $(U, "pointercancel", H, !0), $(U, "mousedown", B, !0), $(U, "mouseup", H, !0), $(U, "touchstart", ie, !0), $(U, "touchmove", se, !0), $(U, "touchend", le, !0)));
|
|
1291
|
+
return () => {
|
|
1292
|
+
ue(), e.clear(), t.clear(), h(), ne.current = !1;
|
|
1293
|
+
};
|
|
1294
|
+
}, [
|
|
1295
|
+
a,
|
|
1296
|
+
i,
|
|
1297
|
+
c,
|
|
1298
|
+
C,
|
|
1299
|
+
b,
|
|
1300
|
+
r,
|
|
1301
|
+
s,
|
|
1302
|
+
F,
|
|
1303
|
+
I,
|
|
1304
|
+
V,
|
|
1305
|
+
R,
|
|
1306
|
+
w,
|
|
1307
|
+
v,
|
|
1308
|
+
n,
|
|
1309
|
+
re
|
|
1310
|
+
]), P.useEffect(R, [b, R]);
|
|
1311
|
+
let oe = P.useMemo(() => ({
|
|
1312
|
+
onKeyDown: V,
|
|
1313
|
+
[lr[h]]: (e) => {
|
|
1314
|
+
B() && n.setOpen(!1, M(ee, e.nativeEvent));
|
|
1315
|
+
},
|
|
1316
|
+
...h !== "intentional" && { onClick(e) {
|
|
1317
|
+
B() && n.setOpen(!1, M("trigger-press", e.nativeEvent));
|
|
1318
|
+
} }
|
|
1319
|
+
}), [
|
|
1320
|
+
V,
|
|
1321
|
+
n,
|
|
1322
|
+
h,
|
|
1323
|
+
B
|
|
1324
|
+
]), se = x((e) => {
|
|
1325
|
+
if (!r || !s || e.button !== 0) return;
|
|
1326
|
+
let t = te(e.nativeEvent);
|
|
1327
|
+
j(n.select("floatingElement"), t) && (k.current || (k.current = !0, A.current = !1));
|
|
1328
|
+
}), ce = x((e) => {
|
|
1329
|
+
!r || !s || (e.defaultPrevented || e.nativeEvent.defaultPrevented) && k.current && (A.current = !0);
|
|
1330
|
+
}), le = P.useMemo(() => ({
|
|
1331
|
+
onKeyDown: V,
|
|
1332
|
+
onPointerDown: ce,
|
|
1333
|
+
onMouseDown: ce,
|
|
1334
|
+
onClickCapture: H,
|
|
1335
|
+
onMouseDownCapture(e) {
|
|
1336
|
+
H(), se(e);
|
|
1337
|
+
},
|
|
1338
|
+
onPointerDownCapture(e) {
|
|
1339
|
+
H(), se(e);
|
|
1340
|
+
},
|
|
1341
|
+
onMouseUpCapture: H,
|
|
1342
|
+
onTouchEndCapture: H,
|
|
1343
|
+
onTouchMoveCapture: H
|
|
1344
|
+
}), [
|
|
1345
|
+
V,
|
|
1346
|
+
H,
|
|
1347
|
+
se,
|
|
1348
|
+
ce
|
|
1349
|
+
]);
|
|
1350
|
+
return P.useMemo(() => s ? {
|
|
1351
|
+
reference: oe,
|
|
1352
|
+
floating: le,
|
|
1353
|
+
trigger: oe
|
|
1354
|
+
} : {}, [
|
|
1355
|
+
s,
|
|
1356
|
+
oe,
|
|
1357
|
+
le
|
|
1358
|
+
]);
|
|
1359
|
+
}
|
|
1360
|
+
//#endregion
|
|
1361
|
+
//#region node_modules/.pnpm/@floating-ui+core@1.7.5/node_modules/@floating-ui/core/dist/floating-ui.core.mjs
|
|
1362
|
+
function pr(e, t, n) {
|
|
1363
|
+
let { reference: r, floating: i } = e, a = Z(t), o = lt(t), s = ct(o), c = X(t), l = a === "y", u = r.x + r.width / 2 - i.width / 2, d = r.y + r.height / 2 - i.height / 2, f = r[s] / 2 - i[s] / 2, p;
|
|
1364
|
+
switch (c) {
|
|
1365
|
+
case "top":
|
|
1366
|
+
p = {
|
|
1367
|
+
x: u,
|
|
1368
|
+
y: r.y - i.height
|
|
1369
|
+
};
|
|
1370
|
+
break;
|
|
1371
|
+
case "bottom":
|
|
1372
|
+
p = {
|
|
1373
|
+
x: u,
|
|
1374
|
+
y: r.y + r.height
|
|
1375
|
+
};
|
|
1376
|
+
break;
|
|
1377
|
+
case "right":
|
|
1378
|
+
p = {
|
|
1379
|
+
x: r.x + r.width,
|
|
1380
|
+
y: d
|
|
1381
|
+
};
|
|
1382
|
+
break;
|
|
1383
|
+
case "left":
|
|
1384
|
+
p = {
|
|
1385
|
+
x: r.x - i.width,
|
|
1386
|
+
y: d
|
|
1387
|
+
};
|
|
1388
|
+
break;
|
|
1389
|
+
default: p = {
|
|
1390
|
+
x: r.x,
|
|
1391
|
+
y: r.y
|
|
1392
|
+
};
|
|
1393
|
+
}
|
|
1394
|
+
switch (ot(t)) {
|
|
1395
|
+
case "start":
|
|
1396
|
+
p[o] -= f * (n && l ? -1 : 1);
|
|
1397
|
+
break;
|
|
1398
|
+
case "end":
|
|
1399
|
+
p[o] += f * (n && l ? -1 : 1);
|
|
1400
|
+
break;
|
|
1401
|
+
}
|
|
1402
|
+
return p;
|
|
1403
|
+
}
|
|
1404
|
+
async function mr(e, t) {
|
|
1405
|
+
t === void 0 && (t = {});
|
|
1406
|
+
let { x: n, y: r, platform: i, rects: a, elements: o, strategy: s } = e, { boundary: c = "clippingAncestors", rootBoundary: l = "viewport", elementContext: u = "floating", altBoundary: d = !1, padding: f = 0 } = at(t, e), p = xt(f), m = o[d ? u === "floating" ? "reference" : "floating" : u], h = St(await i.getClippingRect({
|
|
1407
|
+
element: await (i.isElement == null ? void 0 : i.isElement(m)) ?? !0 ? m : m.contextElement || await (i.getDocumentElement == null ? void 0 : i.getDocumentElement(o.floating)),
|
|
1408
|
+
boundary: c,
|
|
1409
|
+
rootBoundary: l,
|
|
1410
|
+
strategy: s
|
|
1411
|
+
})), g = u === "floating" ? {
|
|
1412
|
+
x: n,
|
|
1413
|
+
y: r,
|
|
1414
|
+
width: a.floating.width,
|
|
1415
|
+
height: a.floating.height
|
|
1416
|
+
} : a.reference, _ = await (i.getOffsetParent == null ? void 0 : i.getOffsetParent(o.floating)), v = await (i.isElement == null ? void 0 : i.isElement(_)) && await (i.getScale == null ? void 0 : i.getScale(_)) || {
|
|
1417
|
+
x: 1,
|
|
1418
|
+
y: 1
|
|
1419
|
+
}, y = St(i.convertOffsetParentRelativeRectToViewportRelativeRect ? await i.convertOffsetParentRelativeRectToViewportRelativeRect({
|
|
1420
|
+
elements: o,
|
|
1421
|
+
rect: g,
|
|
1422
|
+
offsetParent: _,
|
|
1423
|
+
strategy: s
|
|
1424
|
+
}) : g);
|
|
1425
|
+
return {
|
|
1426
|
+
top: (h.top - y.top + p.top) / v.y,
|
|
1427
|
+
bottom: (y.bottom - h.bottom + p.bottom) / v.y,
|
|
1428
|
+
left: (h.left - y.left + p.left) / v.x,
|
|
1429
|
+
right: (y.right - h.right + p.right) / v.x
|
|
1430
|
+
};
|
|
1431
|
+
}
|
|
1432
|
+
var hr = 50, gr = async (e, t, n) => {
|
|
1433
|
+
let { placement: r = "bottom", strategy: i = "absolute", middleware: a = [], platform: o } = n, s = o.detectOverflow ? o : {
|
|
1434
|
+
...o,
|
|
1435
|
+
detectOverflow: mr
|
|
1436
|
+
}, c = await (o.isRTL == null ? void 0 : o.isRTL(t)), l = await o.getElementRects({
|
|
1437
|
+
reference: e,
|
|
1438
|
+
floating: t,
|
|
1439
|
+
strategy: i
|
|
1440
|
+
}), { x: u, y: d } = pr(l, r, c), f = r, p = 0, m = {};
|
|
1441
|
+
for (let n = 0; n < a.length; n++) {
|
|
1442
|
+
let h = a[n];
|
|
1443
|
+
if (!h) continue;
|
|
1444
|
+
let { name: g, fn: _ } = h, { x: v, y, data: b, reset: x } = await _({
|
|
1445
|
+
x: u,
|
|
1446
|
+
y: d,
|
|
1447
|
+
initialPlacement: r,
|
|
1448
|
+
placement: f,
|
|
1449
|
+
strategy: i,
|
|
1450
|
+
middlewareData: m,
|
|
1451
|
+
rects: l,
|
|
1452
|
+
platform: s,
|
|
1453
|
+
elements: {
|
|
1454
|
+
reference: e,
|
|
1455
|
+
floating: t
|
|
1456
|
+
}
|
|
1457
|
+
});
|
|
1458
|
+
u = v ?? u, d = y ?? d, m[g] = {
|
|
1459
|
+
...m[g],
|
|
1460
|
+
...b
|
|
1461
|
+
}, x && p < hr && (p++, typeof x == "object" && (x.placement && (f = x.placement), x.rects && (l = x.rects === !0 ? await o.getElementRects({
|
|
1462
|
+
reference: e,
|
|
1463
|
+
floating: t,
|
|
1464
|
+
strategy: i
|
|
1465
|
+
}) : x.rects), {x: u, y: d} = pr(l, f, c)), n = -1);
|
|
1466
|
+
}
|
|
1467
|
+
return {
|
|
1468
|
+
x: u,
|
|
1469
|
+
y: d,
|
|
1470
|
+
placement: f,
|
|
1471
|
+
strategy: i,
|
|
1472
|
+
middlewareData: m
|
|
1473
|
+
};
|
|
1474
|
+
}, _r = function(e) {
|
|
1475
|
+
return e === void 0 && (e = {}), {
|
|
1476
|
+
name: "flip",
|
|
1477
|
+
options: e,
|
|
1478
|
+
async fn(t) {
|
|
1479
|
+
var n;
|
|
1480
|
+
let { placement: r, middlewareData: i, rects: a, initialPlacement: o, platform: s, elements: c } = t, { mainAxis: l = !0, crossAxis: u = !0, fallbackPlacements: d, fallbackStrategy: f = "bestFit", fallbackAxisSideDirection: p = "none", flipAlignment: m = !0, ...h } = at(e, t);
|
|
1481
|
+
if ((n = i.arrow) != null && n.alignmentOffset) return {};
|
|
1482
|
+
let g = X(r), _ = Z(o), v = X(o) === o, y = await (s.isRTL == null ? void 0 : s.isRTL(c.floating)), b = d || (v || !m ? [yt(o)] : dt(o)), x = p !== "none";
|
|
1483
|
+
!d && x && b.push(...vt(o, m, p, y));
|
|
1484
|
+
let S = [o, ...b], C = await s.detectOverflow(t, h), w = [], T = i.flip?.overflows || [];
|
|
1485
|
+
if (l && w.push(C[g]), u) {
|
|
1486
|
+
let e = ut(r, a, y);
|
|
1487
|
+
w.push(C[e[0]], C[e[1]]);
|
|
1488
|
+
}
|
|
1489
|
+
if (T = [...T, {
|
|
1490
|
+
placement: r,
|
|
1491
|
+
overflows: w
|
|
1492
|
+
}], !w.every((e) => e <= 0)) {
|
|
1493
|
+
let e = (i.flip?.index || 0) + 1, t = S[e];
|
|
1494
|
+
if (t && (!(u === "alignment" && _ !== Z(t)) || T.every((e) => Z(e.placement) === _ ? e.overflows[0] > 0 : !0))) return {
|
|
1495
|
+
data: {
|
|
1496
|
+
index: e,
|
|
1497
|
+
overflows: T
|
|
1498
|
+
},
|
|
1499
|
+
reset: { placement: t }
|
|
1500
|
+
};
|
|
1501
|
+
let n = T.filter((e) => e.overflows[0] <= 0).sort((e, t) => e.overflows[1] - t.overflows[1])[0]?.placement;
|
|
1502
|
+
if (!n) switch (f) {
|
|
1503
|
+
case "bestFit": {
|
|
1504
|
+
let e = T.filter((e) => {
|
|
1505
|
+
if (x) {
|
|
1506
|
+
let t = Z(e.placement);
|
|
1507
|
+
return t === _ || t === "y";
|
|
1508
|
+
}
|
|
1509
|
+
return !0;
|
|
1510
|
+
}).map((e) => [e.placement, e.overflows.filter((e) => e > 0).reduce((e, t) => e + t, 0)]).sort((e, t) => e[1] - t[1])[0]?.[0];
|
|
1511
|
+
e && (n = e);
|
|
1512
|
+
break;
|
|
1513
|
+
}
|
|
1514
|
+
case "initialPlacement":
|
|
1515
|
+
n = o;
|
|
1516
|
+
break;
|
|
1517
|
+
}
|
|
1518
|
+
if (r !== n) return { reset: { placement: n } };
|
|
1519
|
+
}
|
|
1520
|
+
return {};
|
|
1521
|
+
}
|
|
1522
|
+
};
|
|
1523
|
+
};
|
|
1524
|
+
function vr(e, t) {
|
|
1525
|
+
return {
|
|
1526
|
+
top: e.top - t.height,
|
|
1527
|
+
right: e.right - t.width,
|
|
1528
|
+
bottom: e.bottom - t.height,
|
|
1529
|
+
left: e.left - t.width
|
|
1530
|
+
};
|
|
1531
|
+
}
|
|
1532
|
+
function yr(e) {
|
|
1533
|
+
return Qe.some((t) => e[t] >= 0);
|
|
1534
|
+
}
|
|
1535
|
+
var br = function(e) {
|
|
1536
|
+
return e === void 0 && (e = {}), {
|
|
1537
|
+
name: "hide",
|
|
1538
|
+
options: e,
|
|
1539
|
+
async fn(t) {
|
|
1540
|
+
let { rects: n, platform: r } = t, { strategy: i = "referenceHidden", ...a } = at(e, t);
|
|
1541
|
+
switch (i) {
|
|
1542
|
+
case "referenceHidden": {
|
|
1543
|
+
let e = vr(await r.detectOverflow(t, {
|
|
1544
|
+
...a,
|
|
1545
|
+
elementContext: "reference"
|
|
1546
|
+
}), n.reference);
|
|
1547
|
+
return { data: {
|
|
1548
|
+
referenceHiddenOffsets: e,
|
|
1549
|
+
referenceHidden: yr(e)
|
|
1550
|
+
} };
|
|
1551
|
+
}
|
|
1552
|
+
case "escaped": {
|
|
1553
|
+
let e = vr(await r.detectOverflow(t, {
|
|
1554
|
+
...a,
|
|
1555
|
+
altBoundary: !0
|
|
1556
|
+
}), n.floating);
|
|
1557
|
+
return { data: {
|
|
1558
|
+
escapedOffsets: e,
|
|
1559
|
+
escaped: yr(e)
|
|
1560
|
+
} };
|
|
1561
|
+
}
|
|
1562
|
+
default: return {};
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
};
|
|
1566
|
+
}, xr = /* @__PURE__ */ new Set(["left", "top"]);
|
|
1567
|
+
async function Sr(e, t) {
|
|
1568
|
+
let { placement: n, platform: r, elements: i } = e, a = await (r.isRTL == null ? void 0 : r.isRTL(i.floating)), o = X(n), s = ot(n), c = Z(n) === "y", l = xr.has(o) ? -1 : 1, u = a && c ? -1 : 1, d = at(t, e), { mainAxis: f, crossAxis: p, alignmentAxis: m } = typeof d == "number" ? {
|
|
1569
|
+
mainAxis: d,
|
|
1570
|
+
crossAxis: 0,
|
|
1571
|
+
alignmentAxis: null
|
|
1572
|
+
} : {
|
|
1573
|
+
mainAxis: d.mainAxis || 0,
|
|
1574
|
+
crossAxis: d.crossAxis || 0,
|
|
1575
|
+
alignmentAxis: d.alignmentAxis
|
|
1576
|
+
};
|
|
1577
|
+
return s && typeof m == "number" && (p = s === "end" ? m * -1 : m), c ? {
|
|
1578
|
+
x: p * u,
|
|
1579
|
+
y: f * l
|
|
1580
|
+
} : {
|
|
1581
|
+
x: f * l,
|
|
1582
|
+
y: p * u
|
|
1583
|
+
};
|
|
1584
|
+
}
|
|
1585
|
+
var Cr = function(e) {
|
|
1586
|
+
return e === void 0 && (e = 0), {
|
|
1587
|
+
name: "offset",
|
|
1588
|
+
options: e,
|
|
1589
|
+
async fn(t) {
|
|
1590
|
+
var n;
|
|
1591
|
+
let { x: r, y: i, placement: a, middlewareData: o } = t, s = await Sr(t, e);
|
|
1592
|
+
return a === o.offset?.placement && (n = o.arrow) != null && n.alignmentOffset ? {} : {
|
|
1593
|
+
x: r + s.x,
|
|
1594
|
+
y: i + s.y,
|
|
1595
|
+
data: {
|
|
1596
|
+
...s,
|
|
1597
|
+
placement: a
|
|
1598
|
+
}
|
|
1599
|
+
};
|
|
1600
|
+
}
|
|
1601
|
+
};
|
|
1602
|
+
}, wr = function(e) {
|
|
1603
|
+
return e === void 0 && (e = {}), {
|
|
1604
|
+
name: "shift",
|
|
1605
|
+
options: e,
|
|
1606
|
+
async fn(t) {
|
|
1607
|
+
let { x: n, y: r, placement: i, platform: a } = t, { mainAxis: o = !0, crossAxis: s = !1, limiter: c = { fn: (e) => {
|
|
1608
|
+
let { x: t, y: n } = e;
|
|
1609
|
+
return {
|
|
1610
|
+
x: t,
|
|
1611
|
+
y: n
|
|
1612
|
+
};
|
|
1613
|
+
} }, ...l } = at(e, t), u = {
|
|
1614
|
+
x: n,
|
|
1615
|
+
y: r
|
|
1616
|
+
}, d = await a.detectOverflow(t, l), f = Z(X(i)), p = st(f), m = u[p], h = u[f];
|
|
1617
|
+
if (o) {
|
|
1618
|
+
let e = p === "y" ? "top" : "left", t = p === "y" ? "bottom" : "right", n = m + d[e], r = m - d[t];
|
|
1619
|
+
m = it(n, m, r);
|
|
1620
|
+
}
|
|
1621
|
+
if (s) {
|
|
1622
|
+
let e = f === "y" ? "top" : "left", t = f === "y" ? "bottom" : "right", n = h + d[e], r = h - d[t];
|
|
1623
|
+
h = it(n, h, r);
|
|
1624
|
+
}
|
|
1625
|
+
let g = c.fn({
|
|
1626
|
+
...t,
|
|
1627
|
+
[p]: m,
|
|
1628
|
+
[f]: h
|
|
1629
|
+
});
|
|
1630
|
+
return {
|
|
1631
|
+
...g,
|
|
1632
|
+
data: {
|
|
1633
|
+
x: g.x - n,
|
|
1634
|
+
y: g.y - r,
|
|
1635
|
+
enabled: {
|
|
1636
|
+
[p]: o,
|
|
1637
|
+
[f]: s
|
|
1638
|
+
}
|
|
1639
|
+
}
|
|
1640
|
+
};
|
|
1641
|
+
}
|
|
1642
|
+
};
|
|
1643
|
+
}, Tr = function(e) {
|
|
1644
|
+
return e === void 0 && (e = {}), {
|
|
1645
|
+
options: e,
|
|
1646
|
+
fn(t) {
|
|
1647
|
+
let { x: n, y: r, placement: i, rects: a, middlewareData: o } = t, { offset: s = 0, mainAxis: c = !0, crossAxis: l = !0 } = at(e, t), u = {
|
|
1648
|
+
x: n,
|
|
1649
|
+
y: r
|
|
1650
|
+
}, d = Z(i), f = st(d), p = u[f], m = u[d], h = at(s, t), g = typeof h == "number" ? {
|
|
1651
|
+
mainAxis: h,
|
|
1652
|
+
crossAxis: 0
|
|
1653
|
+
} : {
|
|
1654
|
+
mainAxis: 0,
|
|
1655
|
+
crossAxis: 0,
|
|
1656
|
+
...h
|
|
1657
|
+
};
|
|
1658
|
+
if (c) {
|
|
1659
|
+
let e = f === "y" ? "height" : "width", t = a.reference[f] - a.floating[e] + g.mainAxis, n = a.reference[f] + a.reference[e] - g.mainAxis;
|
|
1660
|
+
p < t ? p = t : p > n && (p = n);
|
|
1661
|
+
}
|
|
1662
|
+
if (l) {
|
|
1663
|
+
let e = f === "y" ? "width" : "height", t = xr.has(X(i)), n = a.reference[d] - a.floating[e] + (t && o.offset?.[d] || 0) + (t ? 0 : g.crossAxis), r = a.reference[d] + a.reference[e] + (t ? 0 : o.offset?.[d] || 0) - (t ? g.crossAxis : 0);
|
|
1664
|
+
m < n ? m = n : m > r && (m = r);
|
|
1665
|
+
}
|
|
1666
|
+
return {
|
|
1667
|
+
[f]: p,
|
|
1668
|
+
[d]: m
|
|
1669
|
+
};
|
|
1670
|
+
}
|
|
1671
|
+
};
|
|
1672
|
+
}, Er = function(e) {
|
|
1673
|
+
return e === void 0 && (e = {}), {
|
|
1674
|
+
name: "size",
|
|
1675
|
+
options: e,
|
|
1676
|
+
async fn(t) {
|
|
1677
|
+
var n, r;
|
|
1678
|
+
let { placement: i, rects: a, platform: o, elements: s } = t, { apply: c = () => {}, ...l } = at(e, t), u = await o.detectOverflow(t, l), d = X(i), f = ot(i), p = Z(i) === "y", { width: m, height: h } = a.floating, g, _;
|
|
1679
|
+
d === "top" || d === "bottom" ? (g = d, _ = f === (await (o.isRTL == null ? void 0 : o.isRTL(s.floating)) ? "start" : "end") ? "left" : "right") : (_ = d, g = f === "end" ? "top" : "bottom");
|
|
1680
|
+
let v = h - u.top - u.bottom, y = m - u.left - u.right, b = $e(h - u[g], v), x = $e(m - u[_], y), S = !t.middlewareData.shift, C = b, w = x;
|
|
1681
|
+
if ((n = t.middlewareData.shift) != null && n.enabled.x && (w = y), (r = t.middlewareData.shift) != null && r.enabled.y && (C = v), S && !f) {
|
|
1682
|
+
let e = Y(u.left, 0), t = Y(u.right, 0), n = Y(u.top, 0), r = Y(u.bottom, 0);
|
|
1683
|
+
p ? w = m - 2 * (e !== 0 || t !== 0 ? e + t : Y(u.left, u.right)) : C = h - 2 * (n !== 0 || r !== 0 ? n + r : Y(u.top, u.bottom));
|
|
1684
|
+
}
|
|
1685
|
+
await c({
|
|
1686
|
+
...t,
|
|
1687
|
+
availableWidth: w,
|
|
1688
|
+
availableHeight: C
|
|
1689
|
+
});
|
|
1690
|
+
let T = await o.getDimensions(s.floating);
|
|
1691
|
+
return m !== T.width || h !== T.height ? { reset: { rects: !0 } } : {};
|
|
1692
|
+
}
|
|
1693
|
+
};
|
|
1694
|
+
};
|
|
1695
|
+
//#endregion
|
|
1696
|
+
//#region node_modules/.pnpm/@floating-ui+dom@1.7.6/node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
1697
|
+
function Dr(e) {
|
|
1698
|
+
let t = T(e), n = parseFloat(t.width) || 0, r = parseFloat(t.height) || 0, i = u(e), a = i ? e.offsetWidth : n, o = i ? e.offsetHeight : r, s = et(n) !== a || et(r) !== o;
|
|
1699
|
+
return s && (n = a, r = o), {
|
|
1700
|
+
width: n,
|
|
1701
|
+
height: r,
|
|
1702
|
+
$: s
|
|
1703
|
+
};
|
|
1704
|
+
}
|
|
1705
|
+
function Or(e) {
|
|
1706
|
+
return S(e) ? e : e.contextElement;
|
|
1707
|
+
}
|
|
1708
|
+
function kr(e) {
|
|
1709
|
+
let t = Or(e);
|
|
1710
|
+
if (!u(t)) return nt(1);
|
|
1711
|
+
let n = t.getBoundingClientRect(), { width: r, height: i, $: a } = Dr(t), o = (a ? et(n.width) : n.width) / r, s = (a ? et(n.height) : n.height) / i;
|
|
1712
|
+
return (!o || !Number.isFinite(o)) && (o = 1), (!s || !Number.isFinite(s)) && (s = 1), {
|
|
1713
|
+
x: o,
|
|
1714
|
+
y: s
|
|
1715
|
+
};
|
|
1716
|
+
}
|
|
1717
|
+
var Ar = /* @__PURE__ */ nt(0);
|
|
1718
|
+
function jr(e) {
|
|
1719
|
+
let t = C(e);
|
|
1720
|
+
return !E() || !t.visualViewport ? Ar : {
|
|
1721
|
+
x: t.visualViewport.offsetLeft,
|
|
1722
|
+
y: t.visualViewport.offsetTop
|
|
1723
|
+
};
|
|
1724
|
+
}
|
|
1725
|
+
function Mr(e, t, n) {
|
|
1726
|
+
return t === void 0 && (t = !1), !n || t && n !== C(e) ? !1 : t;
|
|
1727
|
+
}
|
|
1728
|
+
function Nr(e, t, n, r) {
|
|
1729
|
+
t === void 0 && (t = !1), n === void 0 && (n = !1);
|
|
1730
|
+
let i = e.getBoundingClientRect(), a = Or(e), o = nt(1);
|
|
1731
|
+
t && (r ? S(r) && (o = kr(r)) : o = kr(e));
|
|
1732
|
+
let s = Mr(a, n, r) ? jr(a) : nt(0), c = (i.left + s.x) / o.x, l = (i.top + s.y) / o.y, u = i.width / o.x, d = i.height / o.y;
|
|
1733
|
+
if (a) {
|
|
1734
|
+
let e = C(a), t = r && S(r) ? C(r) : r, n = e, i = w(n);
|
|
1735
|
+
for (; i && r && t !== n;) {
|
|
1736
|
+
let e = kr(i), t = i.getBoundingClientRect(), r = T(i), a = t.left + (i.clientLeft + parseFloat(r.paddingLeft)) * e.x, o = t.top + (i.clientTop + parseFloat(r.paddingTop)) * e.y;
|
|
1737
|
+
c *= e.x, l *= e.y, u *= e.x, d *= e.y, c += a, l += o, n = C(i), i = w(n);
|
|
1738
|
+
}
|
|
1739
|
+
}
|
|
1740
|
+
return St({
|
|
1741
|
+
width: u,
|
|
1742
|
+
height: d,
|
|
1743
|
+
x: c,
|
|
1744
|
+
y: l
|
|
1745
|
+
});
|
|
1746
|
+
}
|
|
1747
|
+
function Pr(e, n) {
|
|
1748
|
+
let i = r(e).scrollLeft;
|
|
1749
|
+
return n ? n.left + i : Nr(t(e)).left + i;
|
|
1750
|
+
}
|
|
1751
|
+
function Fr(e, t) {
|
|
1752
|
+
let n = e.getBoundingClientRect();
|
|
1753
|
+
return {
|
|
1754
|
+
x: n.left + t.scrollLeft - Pr(e, n),
|
|
1755
|
+
y: n.top + t.scrollTop
|
|
1756
|
+
};
|
|
1757
|
+
}
|
|
1758
|
+
function Ir(e) {
|
|
1759
|
+
let { elements: n, rect: a, offsetParent: o, strategy: s } = e, c = s === "fixed", l = t(o), d = n ? h(n.floating) : !1;
|
|
1760
|
+
if (o === l || d && c) return a;
|
|
1761
|
+
let f = {
|
|
1762
|
+
scrollLeft: 0,
|
|
1763
|
+
scrollTop: 0
|
|
1764
|
+
}, p = nt(1), m = nt(0), g = u(o);
|
|
1765
|
+
if ((g || !g && !c) && ((_(o) !== "body" || i(l)) && (f = r(o)), g)) {
|
|
1766
|
+
let e = Nr(o);
|
|
1767
|
+
p = kr(o), m.x = e.x + o.clientLeft, m.y = e.y + o.clientTop;
|
|
1768
|
+
}
|
|
1769
|
+
let v = l && !g && !c ? Fr(l, f) : nt(0);
|
|
1770
|
+
return {
|
|
1771
|
+
width: a.width * p.x,
|
|
1772
|
+
height: a.height * p.y,
|
|
1773
|
+
x: a.x * p.x - f.scrollLeft * p.x + m.x + v.x,
|
|
1774
|
+
y: a.y * p.y - f.scrollTop * p.y + m.y + v.y
|
|
1775
|
+
};
|
|
1776
|
+
}
|
|
1777
|
+
function Lr(e) {
|
|
1778
|
+
return Array.from(e.getClientRects());
|
|
1779
|
+
}
|
|
1780
|
+
function Rr(e) {
|
|
1781
|
+
let n = t(e), i = r(e), a = e.ownerDocument.body, o = Y(n.scrollWidth, n.clientWidth, a.scrollWidth, a.clientWidth), s = Y(n.scrollHeight, n.clientHeight, a.scrollHeight, a.clientHeight), c = -i.scrollLeft + Pr(e), l = -i.scrollTop;
|
|
1782
|
+
return T(a).direction === "rtl" && (c += Y(n.clientWidth, a.clientWidth) - o), {
|
|
1783
|
+
width: o,
|
|
1784
|
+
height: s,
|
|
1785
|
+
x: c,
|
|
1786
|
+
y: l
|
|
1787
|
+
};
|
|
1788
|
+
}
|
|
1789
|
+
var zr = 25;
|
|
1790
|
+
function Br(e, n) {
|
|
1791
|
+
let r = C(e), i = t(e), a = r.visualViewport, o = i.clientWidth, s = i.clientHeight, c = 0, l = 0;
|
|
1792
|
+
if (a) {
|
|
1793
|
+
o = a.width, s = a.height;
|
|
1794
|
+
let e = E();
|
|
1795
|
+
(!e || e && n === "fixed") && (c = a.offsetLeft, l = a.offsetTop);
|
|
1796
|
+
}
|
|
1797
|
+
let u = Pr(i);
|
|
1798
|
+
if (u <= 0) {
|
|
1799
|
+
let e = i.ownerDocument, t = e.body, n = getComputedStyle(t), r = e.compatMode === "CSS1Compat" && parseFloat(n.marginLeft) + parseFloat(n.marginRight) || 0, a = Math.abs(i.clientWidth - t.clientWidth - r);
|
|
1800
|
+
a <= zr && (o -= a);
|
|
1801
|
+
} else u <= zr && (o += u);
|
|
1802
|
+
return {
|
|
1803
|
+
width: o,
|
|
1804
|
+
height: s,
|
|
1805
|
+
x: c,
|
|
1806
|
+
y: l
|
|
1807
|
+
};
|
|
1808
|
+
}
|
|
1809
|
+
function Vr(e, t) {
|
|
1810
|
+
let n = Nr(e, !0, t === "fixed"), r = n.top + e.clientTop, i = n.left + e.clientLeft, a = u(e) ? kr(e) : nt(1);
|
|
1811
|
+
return {
|
|
1812
|
+
width: e.clientWidth * a.x,
|
|
1813
|
+
height: e.clientHeight * a.y,
|
|
1814
|
+
x: i * a.x,
|
|
1815
|
+
y: r * a.y
|
|
1816
|
+
};
|
|
1817
|
+
}
|
|
1818
|
+
function Hr(e, n, r) {
|
|
1819
|
+
let i;
|
|
1820
|
+
if (n === "viewport") i = Br(e, r);
|
|
1821
|
+
else if (n === "document") i = Rr(t(e));
|
|
1822
|
+
else if (S(n)) i = Vr(n, r);
|
|
1823
|
+
else {
|
|
1824
|
+
let t = jr(e);
|
|
1825
|
+
i = {
|
|
1826
|
+
x: n.x - t.x,
|
|
1827
|
+
y: n.y - t.y,
|
|
1828
|
+
width: n.width,
|
|
1829
|
+
height: n.height
|
|
1830
|
+
};
|
|
1831
|
+
}
|
|
1832
|
+
return St(i);
|
|
1833
|
+
}
|
|
1834
|
+
function Ur(e, t) {
|
|
1835
|
+
let n = f(e);
|
|
1836
|
+
return n === t || !S(n) || d(n) ? !1 : T(n).position === "fixed" || Ur(n, t);
|
|
1837
|
+
}
|
|
1838
|
+
function Wr(t, r) {
|
|
1839
|
+
let a = r.get(t);
|
|
1840
|
+
if (a) return a;
|
|
1841
|
+
let o = n(t, [], !1).filter((e) => S(e) && _(e) !== "body"), s = null, c = T(t).position === "fixed", l = c ? f(t) : t;
|
|
1842
|
+
for (; S(l) && !d(l);) {
|
|
1843
|
+
let n = T(l), r = e(l);
|
|
1844
|
+
!r && n.position === "fixed" && (s = null), (c ? !r && !s : !r && n.position === "static" && s && (s.position === "absolute" || s.position === "fixed") || i(l) && !r && Ur(t, l)) ? o = o.filter((e) => e !== l) : s = n, l = f(l);
|
|
1845
|
+
}
|
|
1846
|
+
return r.set(t, o), o;
|
|
1847
|
+
}
|
|
1848
|
+
function Gr(e) {
|
|
1849
|
+
let { element: t, boundary: n, rootBoundary: r, strategy: i } = e, a = [...n === "clippingAncestors" ? h(t) ? [] : Wr(t, this._c) : [].concat(n), r], o = Hr(t, a[0], i), s = o.top, c = o.right, l = o.bottom, u = o.left;
|
|
1850
|
+
for (let e = 1; e < a.length; e++) {
|
|
1851
|
+
let n = Hr(t, a[e], i);
|
|
1852
|
+
s = Y(n.top, s), c = $e(n.right, c), l = $e(n.bottom, l), u = Y(n.left, u);
|
|
1853
|
+
}
|
|
1854
|
+
return {
|
|
1855
|
+
width: c - u,
|
|
1856
|
+
height: l - s,
|
|
1857
|
+
x: u,
|
|
1858
|
+
y: s
|
|
1859
|
+
};
|
|
1860
|
+
}
|
|
1861
|
+
function Kr(e) {
|
|
1862
|
+
let { width: t, height: n } = Dr(e);
|
|
1863
|
+
return {
|
|
1864
|
+
width: t,
|
|
1865
|
+
height: n
|
|
1866
|
+
};
|
|
1867
|
+
}
|
|
1868
|
+
function qr(e, n, a) {
|
|
1869
|
+
let o = u(n), s = t(n), c = a === "fixed", l = Nr(e, !0, c, n), d = {
|
|
1870
|
+
scrollLeft: 0,
|
|
1871
|
+
scrollTop: 0
|
|
1872
|
+
}, f = nt(0);
|
|
1873
|
+
function p() {
|
|
1874
|
+
f.x = Pr(s);
|
|
1875
|
+
}
|
|
1876
|
+
if (o || !o && !c) if ((_(n) !== "body" || i(s)) && (d = r(n)), o) {
|
|
1877
|
+
let e = Nr(n, !0, c, n);
|
|
1878
|
+
f.x = e.x + n.clientLeft, f.y = e.y + n.clientTop;
|
|
1879
|
+
} else s && p();
|
|
1880
|
+
c && !o && s && p();
|
|
1881
|
+
let m = s && !o && !c ? Fr(s, d) : nt(0);
|
|
1882
|
+
return {
|
|
1883
|
+
x: l.left + d.scrollLeft - f.x - m.x,
|
|
1884
|
+
y: l.top + d.scrollTop - f.y - m.y,
|
|
1885
|
+
width: l.width,
|
|
1886
|
+
height: l.height
|
|
1887
|
+
};
|
|
1888
|
+
}
|
|
1889
|
+
function Jr(e) {
|
|
1890
|
+
return T(e).position === "static";
|
|
1891
|
+
}
|
|
1892
|
+
function Yr(e, n) {
|
|
1893
|
+
if (!u(e) || T(e).position === "fixed") return null;
|
|
1894
|
+
if (n) return n(e);
|
|
1895
|
+
let r = e.offsetParent;
|
|
1896
|
+
return t(e) === r && (r = r.ownerDocument.body), r;
|
|
1897
|
+
}
|
|
1898
|
+
function Xr(t, n) {
|
|
1899
|
+
let r = C(t);
|
|
1900
|
+
if (h(t)) return r;
|
|
1901
|
+
if (!u(t)) {
|
|
1902
|
+
let e = f(t);
|
|
1903
|
+
for (; e && !d(e);) {
|
|
1904
|
+
if (S(e) && !Jr(e)) return e;
|
|
1905
|
+
e = f(e);
|
|
1906
|
+
}
|
|
1907
|
+
return r;
|
|
1908
|
+
}
|
|
1909
|
+
let i = Yr(t, n);
|
|
1910
|
+
for (; i && l(i) && Jr(i);) i = Yr(i, n);
|
|
1911
|
+
return i && d(i) && Jr(i) && !e(i) ? r : i || g(t) || r;
|
|
1912
|
+
}
|
|
1913
|
+
var Zr = async function(e) {
|
|
1914
|
+
let t = this.getOffsetParent || Xr, n = this.getDimensions, r = await n(e.floating);
|
|
1915
|
+
return {
|
|
1916
|
+
reference: qr(e.reference, await t(e.floating), e.strategy),
|
|
1917
|
+
floating: {
|
|
1918
|
+
x: 0,
|
|
1919
|
+
y: 0,
|
|
1920
|
+
width: r.width,
|
|
1921
|
+
height: r.height
|
|
1922
|
+
}
|
|
1923
|
+
};
|
|
1924
|
+
};
|
|
1925
|
+
function Qr(e) {
|
|
1926
|
+
return T(e).direction === "rtl";
|
|
1927
|
+
}
|
|
1928
|
+
var $r = {
|
|
1929
|
+
convertOffsetParentRelativeRectToViewportRelativeRect: Ir,
|
|
1930
|
+
getDocumentElement: t,
|
|
1931
|
+
getClippingRect: Gr,
|
|
1932
|
+
getOffsetParent: Xr,
|
|
1933
|
+
getElementRects: Zr,
|
|
1934
|
+
getClientRects: Lr,
|
|
1935
|
+
getDimensions: Kr,
|
|
1936
|
+
getScale: kr,
|
|
1937
|
+
isElement: S,
|
|
1938
|
+
isRTL: Qr
|
|
1939
|
+
};
|
|
1940
|
+
function ei(e, t) {
|
|
1941
|
+
return e.x === t.x && e.y === t.y && e.width === t.width && e.height === t.height;
|
|
1942
|
+
}
|
|
1943
|
+
function ti(e, n) {
|
|
1944
|
+
let r = null, i, a = t(e);
|
|
1945
|
+
function o() {
|
|
1946
|
+
var e;
|
|
1947
|
+
clearTimeout(i), (e = r) == null || e.disconnect(), r = null;
|
|
1948
|
+
}
|
|
1949
|
+
function s(t, c) {
|
|
1950
|
+
t === void 0 && (t = !1), c === void 0 && (c = 1), o();
|
|
1951
|
+
let l = e.getBoundingClientRect(), { left: u, top: d, width: f, height: p } = l;
|
|
1952
|
+
if (t || n(), !f || !p) return;
|
|
1953
|
+
let m = tt(d), h = tt(a.clientWidth - (u + f)), g = tt(a.clientHeight - (d + p)), _ = tt(u), v = {
|
|
1954
|
+
rootMargin: -m + "px " + -h + "px " + -g + "px " + -_ + "px",
|
|
1955
|
+
threshold: Y(0, $e(1, c)) || 1
|
|
1956
|
+
}, y = !0;
|
|
1957
|
+
function b(t) {
|
|
1958
|
+
let n = t[0].intersectionRatio;
|
|
1959
|
+
if (n !== c) {
|
|
1960
|
+
if (!y) return s();
|
|
1961
|
+
n ? s(!1, n) : i = setTimeout(() => {
|
|
1962
|
+
s(!1, 1e-7);
|
|
1963
|
+
}, 1e3);
|
|
1964
|
+
}
|
|
1965
|
+
n === 1 && !ei(l, e.getBoundingClientRect()) && s(), y = !1;
|
|
1966
|
+
}
|
|
1967
|
+
try {
|
|
1968
|
+
r = new IntersectionObserver(b, {
|
|
1969
|
+
...v,
|
|
1970
|
+
root: a.ownerDocument
|
|
1971
|
+
});
|
|
1972
|
+
} catch {
|
|
1973
|
+
r = new IntersectionObserver(b, v);
|
|
1974
|
+
}
|
|
1975
|
+
r.observe(e);
|
|
1976
|
+
}
|
|
1977
|
+
return s(!0), o;
|
|
1978
|
+
}
|
|
1979
|
+
function ni(e, t, r, i) {
|
|
1980
|
+
i === void 0 && (i = {});
|
|
1981
|
+
let { ancestorScroll: a = !0, ancestorResize: o = !0, elementResize: s = typeof ResizeObserver == "function", layoutShift: c = typeof IntersectionObserver == "function", animationFrame: l = !1 } = i, u = Or(e), d = a || o ? [...u ? n(u) : [], ...t ? n(t) : []] : [];
|
|
1982
|
+
d.forEach((e) => {
|
|
1983
|
+
a && e.addEventListener("scroll", r, { passive: !0 }), o && e.addEventListener("resize", r);
|
|
1984
|
+
});
|
|
1985
|
+
let f = u && c ? ti(u, r) : null, p = -1, m = null;
|
|
1986
|
+
s && (m = new ResizeObserver((e) => {
|
|
1987
|
+
let [n] = e;
|
|
1988
|
+
n && n.target === u && m && t && (m.unobserve(t), cancelAnimationFrame(p), p = requestAnimationFrame(() => {
|
|
1989
|
+
var e;
|
|
1990
|
+
(e = m) == null || e.observe(t);
|
|
1991
|
+
})), r();
|
|
1992
|
+
}), u && !l && m.observe(u), t && m.observe(t));
|
|
1993
|
+
let h, g = l ? Nr(e) : null;
|
|
1994
|
+
l && _();
|
|
1995
|
+
function _() {
|
|
1996
|
+
let t = Nr(e);
|
|
1997
|
+
g && !ei(g, t) && r(), g = t, h = requestAnimationFrame(_);
|
|
1998
|
+
}
|
|
1999
|
+
return r(), () => {
|
|
2000
|
+
var e;
|
|
2001
|
+
d.forEach((e) => {
|
|
2002
|
+
a && e.removeEventListener("scroll", r), o && e.removeEventListener("resize", r);
|
|
2003
|
+
}), f?.(), (e = m) == null || e.disconnect(), m = null, l && cancelAnimationFrame(h);
|
|
2004
|
+
};
|
|
2005
|
+
}
|
|
2006
|
+
var ri = Cr, ii = wr, ai = _r, oi = Er, si = br, ci = Tr, li = (e, t, n) => {
|
|
2007
|
+
let r = /* @__PURE__ */ new Map(), i = {
|
|
2008
|
+
platform: $r,
|
|
2009
|
+
...n
|
|
2010
|
+
}, a = {
|
|
2011
|
+
...i.platform,
|
|
2012
|
+
_c: r
|
|
2013
|
+
};
|
|
2014
|
+
return gr(e, t, {
|
|
2015
|
+
...i,
|
|
2016
|
+
platform: a
|
|
2017
|
+
});
|
|
2018
|
+
}, ui = typeof document < "u" ? ne : function() {};
|
|
2019
|
+
function di(e, t) {
|
|
2020
|
+
if (e === t) return !0;
|
|
2021
|
+
if (typeof e != typeof t) return !1;
|
|
2022
|
+
if (typeof e == "function" && e.toString() === t.toString()) return !0;
|
|
2023
|
+
let n, r, i;
|
|
2024
|
+
if (e && t && typeof e == "object") {
|
|
2025
|
+
if (Array.isArray(e)) {
|
|
2026
|
+
if (n = e.length, n !== t.length) return !1;
|
|
2027
|
+
for (r = n; r-- !== 0;) if (!di(e[r], t[r])) return !1;
|
|
2028
|
+
return !0;
|
|
2029
|
+
}
|
|
2030
|
+
if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length) return !1;
|
|
2031
|
+
for (r = n; r-- !== 0;) if (!{}.hasOwnProperty.call(t, i[r])) return !1;
|
|
2032
|
+
for (r = n; r-- !== 0;) {
|
|
2033
|
+
let n = i[r];
|
|
2034
|
+
if (!(n === "_owner" && e.$$typeof) && !di(e[n], t[n])) return !1;
|
|
2035
|
+
}
|
|
2036
|
+
return !0;
|
|
2037
|
+
}
|
|
2038
|
+
return e !== e && t !== t;
|
|
2039
|
+
}
|
|
2040
|
+
function fi(e) {
|
|
2041
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
2042
|
+
}
|
|
2043
|
+
function pi(e, t) {
|
|
2044
|
+
let n = fi(e);
|
|
2045
|
+
return Math.round(t * n) / n;
|
|
2046
|
+
}
|
|
2047
|
+
function mi(e) {
|
|
2048
|
+
let t = P.useRef(e);
|
|
2049
|
+
return ui(() => {
|
|
2050
|
+
t.current = e;
|
|
2051
|
+
}), t;
|
|
2052
|
+
}
|
|
2053
|
+
function hi(e) {
|
|
2054
|
+
e === void 0 && (e = {});
|
|
2055
|
+
let { placement: t = "bottom", strategy: n = "absolute", middleware: r = [], platform: i, elements: { reference: a, floating: o } = {}, transform: s = !0, whileElementsMounted: c, open: l } = e, [u, d] = P.useState({
|
|
2056
|
+
x: 0,
|
|
2057
|
+
y: 0,
|
|
2058
|
+
strategy: n,
|
|
2059
|
+
placement: t,
|
|
2060
|
+
middlewareData: {},
|
|
2061
|
+
isPositioned: !1
|
|
2062
|
+
}), [f, p] = P.useState(r);
|
|
2063
|
+
di(f, r) || p(r);
|
|
2064
|
+
let [m, h] = P.useState(null), [g, _] = P.useState(null), v = P.useCallback((e) => {
|
|
2065
|
+
e !== S.current && (S.current = e, h(e));
|
|
2066
|
+
}, []), y = P.useCallback((e) => {
|
|
2067
|
+
e !== C.current && (C.current = e, _(e));
|
|
2068
|
+
}, []), b = a || m, x = o || g, S = P.useRef(null), C = P.useRef(null), w = P.useRef(u), T = c != null, E = mi(c), D = mi(i), ee = mi(l), O = P.useCallback(() => {
|
|
2069
|
+
if (!S.current || !C.current) return;
|
|
2070
|
+
let e = {
|
|
2071
|
+
placement: t,
|
|
2072
|
+
strategy: n,
|
|
2073
|
+
middleware: f
|
|
2074
|
+
};
|
|
2075
|
+
D.current && (e.platform = D.current), li(S.current, C.current, e).then((e) => {
|
|
2076
|
+
let t = {
|
|
2077
|
+
...e,
|
|
2078
|
+
isPositioned: ee.current !== !1
|
|
2079
|
+
};
|
|
2080
|
+
k.current && !di(w.current, t) && (w.current = t, L.flushSync(() => {
|
|
2081
|
+
d(t);
|
|
2082
|
+
}));
|
|
2083
|
+
});
|
|
2084
|
+
}, [
|
|
2085
|
+
f,
|
|
2086
|
+
t,
|
|
2087
|
+
n,
|
|
2088
|
+
D,
|
|
2089
|
+
ee
|
|
2090
|
+
]);
|
|
2091
|
+
ui(() => {
|
|
2092
|
+
l === !1 && w.current.isPositioned && (w.current.isPositioned = !1, d((e) => ({
|
|
2093
|
+
...e,
|
|
2094
|
+
isPositioned: !1
|
|
2095
|
+
})));
|
|
2096
|
+
}, [l]);
|
|
2097
|
+
let k = P.useRef(!1);
|
|
2098
|
+
ui(() => (k.current = !0, () => {
|
|
2099
|
+
k.current = !1;
|
|
2100
|
+
}), []), ui(() => {
|
|
2101
|
+
if (b && (S.current = b), x && (C.current = x), b && x) {
|
|
2102
|
+
if (E.current) return E.current(b, x, O);
|
|
2103
|
+
O();
|
|
2104
|
+
}
|
|
2105
|
+
}, [
|
|
2106
|
+
b,
|
|
2107
|
+
x,
|
|
2108
|
+
O,
|
|
2109
|
+
E,
|
|
2110
|
+
T
|
|
2111
|
+
]);
|
|
2112
|
+
let A = P.useMemo(() => ({
|
|
2113
|
+
reference: S,
|
|
2114
|
+
floating: C,
|
|
2115
|
+
setReference: v,
|
|
2116
|
+
setFloating: y
|
|
2117
|
+
}), [v, y]), j = P.useMemo(() => ({
|
|
2118
|
+
reference: b,
|
|
2119
|
+
floating: x
|
|
2120
|
+
}), [b, x]), M = P.useMemo(() => {
|
|
2121
|
+
let e = {
|
|
2122
|
+
position: n,
|
|
2123
|
+
left: 0,
|
|
2124
|
+
top: 0
|
|
2125
|
+
};
|
|
2126
|
+
if (!j.floating) return e;
|
|
2127
|
+
let t = pi(j.floating, u.x), r = pi(j.floating, u.y);
|
|
2128
|
+
return s ? {
|
|
2129
|
+
...e,
|
|
2130
|
+
transform: "translate(" + t + "px, " + r + "px)",
|
|
2131
|
+
...fi(j.floating) >= 1.5 && { willChange: "transform" }
|
|
2132
|
+
} : {
|
|
2133
|
+
position: n,
|
|
2134
|
+
left: t,
|
|
2135
|
+
top: r
|
|
2136
|
+
};
|
|
2137
|
+
}, [
|
|
2138
|
+
n,
|
|
2139
|
+
s,
|
|
2140
|
+
j.floating,
|
|
2141
|
+
u.x,
|
|
2142
|
+
u.y
|
|
2143
|
+
]);
|
|
2144
|
+
return P.useMemo(() => ({
|
|
2145
|
+
...u,
|
|
2146
|
+
update: O,
|
|
2147
|
+
refs: A,
|
|
2148
|
+
elements: j,
|
|
2149
|
+
floatingStyles: M
|
|
2150
|
+
}), [
|
|
2151
|
+
u,
|
|
2152
|
+
O,
|
|
2153
|
+
A,
|
|
2154
|
+
j,
|
|
2155
|
+
M
|
|
2156
|
+
]);
|
|
2157
|
+
}
|
|
2158
|
+
var gi = (e, t) => {
|
|
2159
|
+
let n = ri(e);
|
|
2160
|
+
return {
|
|
2161
|
+
name: n.name,
|
|
2162
|
+
fn: n.fn,
|
|
2163
|
+
options: [e, t]
|
|
2164
|
+
};
|
|
2165
|
+
}, _i = (e, t) => {
|
|
2166
|
+
let n = ii(e);
|
|
2167
|
+
return {
|
|
2168
|
+
name: n.name,
|
|
2169
|
+
fn: n.fn,
|
|
2170
|
+
options: [e, t]
|
|
2171
|
+
};
|
|
2172
|
+
}, vi = (e, t) => ({
|
|
2173
|
+
fn: ci(e).fn,
|
|
2174
|
+
options: [e, t]
|
|
2175
|
+
}), yi = (e, t) => {
|
|
2176
|
+
let n = ai(e);
|
|
2177
|
+
return {
|
|
2178
|
+
name: n.name,
|
|
2179
|
+
fn: n.fn,
|
|
2180
|
+
options: [e, t]
|
|
2181
|
+
};
|
|
2182
|
+
}, bi = (e, t) => {
|
|
2183
|
+
let n = oi(e);
|
|
2184
|
+
return {
|
|
2185
|
+
name: n.name,
|
|
2186
|
+
fn: n.fn,
|
|
2187
|
+
options: [e, t]
|
|
2188
|
+
};
|
|
2189
|
+
}, xi = (e, t) => {
|
|
2190
|
+
let n = si(e);
|
|
2191
|
+
return {
|
|
2192
|
+
name: n.name,
|
|
2193
|
+
fn: n.fn,
|
|
2194
|
+
options: [e, t]
|
|
2195
|
+
};
|
|
2196
|
+
}, Si = (e, t, n, r, i, a, ...o) => {
|
|
2197
|
+
if (o.length > 0) throw Error(process.env.NODE_ENV === "production" ? s(1) : "Unsupported number of selectors");
|
|
2198
|
+
let c;
|
|
2199
|
+
if (e && t && n && r && i && a) c = (o, s, c, l) => a(e(o, s, c, l), t(o, s, c, l), n(o, s, c, l), r(o, s, c, l), i(o, s, c, l), s, c, l);
|
|
2200
|
+
else if (e && t && n && r && i) c = (a, o, s, c) => i(e(a, o, s, c), t(a, o, s, c), n(a, o, s, c), r(a, o, s, c), o, s, c);
|
|
2201
|
+
else if (e && t && n && r) c = (i, a, o, s) => r(e(i, a, o, s), t(i, a, o, s), n(i, a, o, s), a, o, s);
|
|
2202
|
+
else if (e && t && n) c = (r, i, a, o) => n(e(r, i, a, o), t(r, i, a, o), i, a, o);
|
|
2203
|
+
else if (e && t) c = (n, r, i, a) => t(e(n, r, i, a), r, i, a);
|
|
2204
|
+
else if (e) c = e;
|
|
2205
|
+
else throw Error("Missing arguments");
|
|
2206
|
+
return c;
|
|
2207
|
+
}, Ci = [], wi = void 0;
|
|
2208
|
+
function Ti() {
|
|
2209
|
+
return wi;
|
|
2210
|
+
}
|
|
2211
|
+
function Ei(e) {
|
|
2212
|
+
Ci.push(e);
|
|
2213
|
+
}
|
|
2214
|
+
function Di(e) {
|
|
2215
|
+
let t = (t, n) => {
|
|
2216
|
+
let r = m(ki).current, i;
|
|
2217
|
+
try {
|
|
2218
|
+
wi = r;
|
|
2219
|
+
for (let e of Ci) e.before(r);
|
|
2220
|
+
i = e(t, n);
|
|
2221
|
+
for (let e of Ci) e.after(r);
|
|
2222
|
+
r.didInitialize = !0;
|
|
2223
|
+
} finally {
|
|
2224
|
+
wi = void 0;
|
|
2225
|
+
}
|
|
2226
|
+
return i;
|
|
2227
|
+
};
|
|
2228
|
+
return t.displayName = e.displayName || e.name, t;
|
|
2229
|
+
}
|
|
2230
|
+
function Oi(e) {
|
|
2231
|
+
return /* @__PURE__ */ P.forwardRef(Di(e));
|
|
2232
|
+
}
|
|
2233
|
+
function ki() {
|
|
2234
|
+
return { didInitialize: !1 };
|
|
2235
|
+
}
|
|
2236
|
+
//#endregion
|
|
2237
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types_d3ee2f4e7c4092dbff53908511a88462/node_modules/@base-ui/utils/esm/store/useStore.js
|
|
2238
|
+
var Ai = c(19) ? Ni : Pi;
|
|
2239
|
+
function ji(e, t, n, r, i) {
|
|
2240
|
+
return Ai(e, t, n, r, i);
|
|
2241
|
+
}
|
|
2242
|
+
function Mi(e, t, n, r, i) {
|
|
2243
|
+
let a = P.useCallback(() => t(e.getSnapshot(), n, r, i), [
|
|
2244
|
+
e,
|
|
2245
|
+
t,
|
|
2246
|
+
n,
|
|
2247
|
+
r,
|
|
2248
|
+
i
|
|
2249
|
+
]);
|
|
2250
|
+
return re(e.subscribe, a, a);
|
|
2251
|
+
}
|
|
2252
|
+
Ei({
|
|
2253
|
+
before(e) {
|
|
2254
|
+
e.syncIndex = 0, e.didInitialize || (e.syncTick = 1, e.syncHooks = [], e.didChangeStore = !0, e.getSnapshot = () => {
|
|
2255
|
+
let t = !1;
|
|
2256
|
+
for (let n = 0; n < e.syncHooks.length; n += 1) {
|
|
2257
|
+
let r = e.syncHooks[n], i = r.selector(r.store.state, r.a1, r.a2, r.a3);
|
|
2258
|
+
(r.didChange || !Object.is(r.value, i)) && (t = !0, r.value = i, r.didChange = !1);
|
|
2259
|
+
}
|
|
2260
|
+
return t && (e.syncTick += 1), e.syncTick;
|
|
2261
|
+
});
|
|
2262
|
+
},
|
|
2263
|
+
after(e) {
|
|
2264
|
+
e.syncHooks.length > 0 && (e.didChangeStore && (e.didChangeStore = !1, e.subscribe = (t) => {
|
|
2265
|
+
let n = /* @__PURE__ */ new Set();
|
|
2266
|
+
for (let t of e.syncHooks) n.add(t.store);
|
|
2267
|
+
let r = [];
|
|
2268
|
+
for (let e of n) r.push(e.subscribe(t));
|
|
2269
|
+
return () => {
|
|
2270
|
+
for (let e of r) e();
|
|
2271
|
+
};
|
|
2272
|
+
}), re(e.subscribe, e.getSnapshot, e.getSnapshot));
|
|
2273
|
+
}
|
|
2274
|
+
});
|
|
2275
|
+
function Ni(e, t, n, r, i) {
|
|
2276
|
+
let a = Ti();
|
|
2277
|
+
if (!a) return Mi(e, t, n, r, i);
|
|
2278
|
+
let o = a.syncIndex;
|
|
2279
|
+
a.syncIndex += 1;
|
|
2280
|
+
let s;
|
|
2281
|
+
return a.didInitialize ? (s = a.syncHooks[o], (s.store !== e || s.selector !== t || !Object.is(s.a1, n) || !Object.is(s.a2, r) || !Object.is(s.a3, i)) && (s.store !== e && (a.didChangeStore = !0), s.store = e, s.selector = t, s.a1 = n, s.a2 = r, s.a3 = i, s.didChange = !0)) : (s = {
|
|
2282
|
+
store: e,
|
|
2283
|
+
selector: t,
|
|
2284
|
+
a1: n,
|
|
2285
|
+
a2: r,
|
|
2286
|
+
a3: i,
|
|
2287
|
+
value: t(e.getSnapshot(), n, r, i),
|
|
2288
|
+
didChange: !1
|
|
2289
|
+
}, a.syncHooks.push(s)), s.value;
|
|
2290
|
+
}
|
|
2291
|
+
function Pi(e, t, n, r, i) {
|
|
2292
|
+
return ie(e.subscribe, e.getSnapshot, e.getSnapshot, (e) => t(e, n, r, i));
|
|
2293
|
+
}
|
|
2294
|
+
//#endregion
|
|
2295
|
+
//#region node_modules/.pnpm/@base-ui+utils@0.2.8_@types_d3ee2f4e7c4092dbff53908511a88462/node_modules/@base-ui/utils/esm/store/Store.js
|
|
2296
|
+
var Fi = class {
|
|
2297
|
+
constructor(e) {
|
|
2298
|
+
this.state = e, this.listeners = /* @__PURE__ */ new Set(), this.updateTick = 0;
|
|
2299
|
+
}
|
|
2300
|
+
subscribe = (e) => (this.listeners.add(e), () => {
|
|
2301
|
+
this.listeners.delete(e);
|
|
2302
|
+
});
|
|
2303
|
+
getSnapshot = () => this.state;
|
|
2304
|
+
setState(e) {
|
|
2305
|
+
if (this.state === e) return;
|
|
2306
|
+
this.state = e, this.updateTick += 1;
|
|
2307
|
+
let t = this.updateTick;
|
|
2308
|
+
for (let n of this.listeners) {
|
|
2309
|
+
if (t !== this.updateTick) return;
|
|
2310
|
+
n(e);
|
|
2311
|
+
}
|
|
2312
|
+
}
|
|
2313
|
+
update(e) {
|
|
2314
|
+
for (let t in e) if (!Object.is(this.state[t], e[t])) {
|
|
2315
|
+
this.setState({
|
|
2316
|
+
...this.state,
|
|
2317
|
+
...e
|
|
2318
|
+
});
|
|
2319
|
+
return;
|
|
2320
|
+
}
|
|
2321
|
+
}
|
|
2322
|
+
set(e, t) {
|
|
2323
|
+
Object.is(this.state[e], t) || this.setState({
|
|
2324
|
+
...this.state,
|
|
2325
|
+
[e]: t
|
|
2326
|
+
});
|
|
2327
|
+
}
|
|
2328
|
+
notifyAll() {
|
|
2329
|
+
let e = { ...this.state };
|
|
2330
|
+
this.setState(e);
|
|
2331
|
+
}
|
|
2332
|
+
use(e, t, n, r) {
|
|
2333
|
+
return ji(this, e, t, n, r);
|
|
2334
|
+
}
|
|
2335
|
+
}, Ii = class extends Fi {
|
|
2336
|
+
constructor(e, t = {}, n) {
|
|
2337
|
+
super(e), this.context = t, this.selectors = n;
|
|
2338
|
+
}
|
|
2339
|
+
useSyncedValue(e, t) {
|
|
2340
|
+
P.useDebugValue(e), b(() => {
|
|
2341
|
+
this.state[e] !== t && this.set(e, t);
|
|
2342
|
+
}, [e, t]);
|
|
2343
|
+
}
|
|
2344
|
+
useSyncedValueWithCleanup(e, t) {
|
|
2345
|
+
let n = this;
|
|
2346
|
+
b(() => (n.state[e] !== t && n.set(e, t), () => {
|
|
2347
|
+
n.set(e, void 0);
|
|
2348
|
+
}), [
|
|
2349
|
+
n,
|
|
2350
|
+
e,
|
|
2351
|
+
t
|
|
2352
|
+
]);
|
|
2353
|
+
}
|
|
2354
|
+
useSyncedValues(e) {
|
|
2355
|
+
let t = this;
|
|
2356
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2357
|
+
P.useDebugValue(e, (e) => Object.keys(e));
|
|
2358
|
+
let t = P.useRef(Object.keys(e)).current, n = Object.keys(e);
|
|
2359
|
+
(t.length !== n.length || t.some((e, t) => e !== n[t])) && console.error("ReactStore.useSyncedValues expects the same prop keys on every render. Keys should be stable.");
|
|
2360
|
+
}
|
|
2361
|
+
b(() => {
|
|
2362
|
+
t.update(e);
|
|
2363
|
+
}, [t, ...Object.values(e)]);
|
|
2364
|
+
}
|
|
2365
|
+
useControlledProp(e, t) {
|
|
2366
|
+
P.useDebugValue(e);
|
|
2367
|
+
let n = t !== void 0;
|
|
2368
|
+
if (b(() => {
|
|
2369
|
+
n && !Object.is(this.state[e], t) && super.setState({
|
|
2370
|
+
...this.state,
|
|
2371
|
+
[e]: t
|
|
2372
|
+
});
|
|
2373
|
+
}, [
|
|
2374
|
+
e,
|
|
2375
|
+
t,
|
|
2376
|
+
n
|
|
2377
|
+
]), process.env.NODE_ENV !== "production") {
|
|
2378
|
+
let t = this.controlledValues ??= /* @__PURE__ */ new Map();
|
|
2379
|
+
t.has(e) || t.set(e, n);
|
|
2380
|
+
let r = t.get(e);
|
|
2381
|
+
r !== void 0 && r !== n && console.error(`A component is changing the ${n ? "" : "un"}controlled state of ${e.toString()} to be ${n ? "un" : ""}controlled. Elements should not switch from uncontrolled to controlled (or vice versa).`);
|
|
2382
|
+
}
|
|
2383
|
+
}
|
|
2384
|
+
select(e, t, n, r) {
|
|
2385
|
+
let i = this.selectors[e];
|
|
2386
|
+
return i(this.state, t, n, r);
|
|
2387
|
+
}
|
|
2388
|
+
useState(e, t, n, r) {
|
|
2389
|
+
return P.useDebugValue(e), ji(this, this.selectors[e], t, n, r);
|
|
2390
|
+
}
|
|
2391
|
+
useContextCallback(e, t) {
|
|
2392
|
+
P.useDebugValue(e);
|
|
2393
|
+
let n = x(t ?? a);
|
|
2394
|
+
this.context[e] = n;
|
|
2395
|
+
}
|
|
2396
|
+
useStateSetter(e) {
|
|
2397
|
+
let t = P.useRef(void 0);
|
|
2398
|
+
return t.current === void 0 && (t.current = (t) => {
|
|
2399
|
+
this.set(e, t);
|
|
2400
|
+
}), t.current;
|
|
2401
|
+
}
|
|
2402
|
+
observe(e, t) {
|
|
2403
|
+
let n;
|
|
2404
|
+
n = typeof e == "function" ? e : this.selectors[e];
|
|
2405
|
+
let r = n(this.state);
|
|
2406
|
+
return t(r, r, this), this.subscribe((e) => {
|
|
2407
|
+
let i = n(e);
|
|
2408
|
+
if (!Object.is(r, i)) {
|
|
2409
|
+
let e = r;
|
|
2410
|
+
r = i, t(i, e, this);
|
|
2411
|
+
}
|
|
2412
|
+
});
|
|
2413
|
+
}
|
|
2414
|
+
}, Li = {
|
|
2415
|
+
open: Si((e) => e.open),
|
|
2416
|
+
transitionStatus: Si((e) => e.transitionStatus),
|
|
2417
|
+
domReferenceElement: Si((e) => e.domReferenceElement),
|
|
2418
|
+
referenceElement: Si((e) => e.positionReference ?? e.referenceElement),
|
|
2419
|
+
floatingElement: Si((e) => e.floatingElement),
|
|
2420
|
+
floatingId: Si((e) => e.floatingId)
|
|
2421
|
+
}, Ri = class extends Ii {
|
|
2422
|
+
constructor(e) {
|
|
2423
|
+
let { syncOnly: t, nested: n, onOpenChange: r, triggerElements: i, ...a } = e;
|
|
2424
|
+
super({
|
|
2425
|
+
...a,
|
|
2426
|
+
positionReference: a.referenceElement,
|
|
2427
|
+
domReferenceElement: a.referenceElement
|
|
2428
|
+
}, {
|
|
2429
|
+
onOpenChange: r,
|
|
2430
|
+
dataRef: { current: {} },
|
|
2431
|
+
events: er(),
|
|
2432
|
+
nested: n,
|
|
2433
|
+
triggerElements: i
|
|
2434
|
+
}, Li), this.syncOnly = t;
|
|
2435
|
+
}
|
|
2436
|
+
syncOpenEvent = (e, t) => {
|
|
2437
|
+
(!e || !this.state.open || t != null && Ze(t)) && (this.context.dataRef.current.openEvent = e ? t : void 0);
|
|
2438
|
+
};
|
|
2439
|
+
dispatchOpenChange = (e, t) => {
|
|
2440
|
+
this.syncOpenEvent(e, t.event);
|
|
2441
|
+
let n = {
|
|
2442
|
+
open: e,
|
|
2443
|
+
reason: t.reason,
|
|
2444
|
+
nativeEvent: t.event,
|
|
2445
|
+
nested: this.context.nested,
|
|
2446
|
+
triggerElement: t.trigger
|
|
2447
|
+
};
|
|
2448
|
+
this.context.events.emit("openchange", n);
|
|
2449
|
+
};
|
|
2450
|
+
setOpen = (e, t) => {
|
|
2451
|
+
if (this.syncOnly) {
|
|
2452
|
+
this.context.onOpenChange?.(e, t);
|
|
2453
|
+
return;
|
|
2454
|
+
}
|
|
2455
|
+
this.dispatchOpenChange(e, t), this.context.onOpenChange?.(e, t);
|
|
2456
|
+
};
|
|
2457
|
+
}, zi = class {
|
|
2458
|
+
constructor() {
|
|
2459
|
+
this.elementsSet = /* @__PURE__ */ new Set(), this.idMap = /* @__PURE__ */ new Map();
|
|
2460
|
+
}
|
|
2461
|
+
add(e, t) {
|
|
2462
|
+
let n = this.idMap.get(e);
|
|
2463
|
+
if (n !== t && (n !== void 0 && this.elementsSet.delete(n), this.elementsSet.add(t), this.idMap.set(e, t), process.env.NODE_ENV !== "production" && this.elementsSet.size !== this.idMap.size)) throw Error("Base UI: A trigger element cannot be registered under multiple IDs in PopupTriggerMap.");
|
|
2464
|
+
}
|
|
2465
|
+
delete(e) {
|
|
2466
|
+
let t = this.idMap.get(e);
|
|
2467
|
+
t && (this.elementsSet.delete(t), this.idMap.delete(e));
|
|
2468
|
+
}
|
|
2469
|
+
hasElement(e) {
|
|
2470
|
+
return this.elementsSet.has(e);
|
|
2471
|
+
}
|
|
2472
|
+
hasMatchingElement(e) {
|
|
2473
|
+
for (let t of this.elementsSet) if (e(t)) return !0;
|
|
2474
|
+
return !1;
|
|
2475
|
+
}
|
|
2476
|
+
getById(e) {
|
|
2477
|
+
return this.idMap.get(e);
|
|
2478
|
+
}
|
|
2479
|
+
entries() {
|
|
2480
|
+
return this.idMap.entries();
|
|
2481
|
+
}
|
|
2482
|
+
elements() {
|
|
2483
|
+
return this.elementsSet.values();
|
|
2484
|
+
}
|
|
2485
|
+
get size() {
|
|
2486
|
+
return this.idMap.size;
|
|
2487
|
+
}
|
|
2488
|
+
};
|
|
2489
|
+
//#endregion
|
|
2490
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFloatingRootContext.js
|
|
2491
|
+
function Bi(e) {
|
|
2492
|
+
let { open: t = !1, onOpenChange: n, elements: r = {} } = e, i = A(), a = ir() != null;
|
|
2493
|
+
if (process.env.NODE_ENV !== "production") {
|
|
2494
|
+
let e = r.reference;
|
|
2495
|
+
e && !S(e) && console.error("Cannot pass a virtual element to the `elements.reference` option,", "as it must be a real DOM element. Use `context.setPositionReference()`", "instead.");
|
|
2496
|
+
}
|
|
2497
|
+
let o = m(() => new Ri({
|
|
2498
|
+
open: t,
|
|
2499
|
+
transitionStatus: void 0,
|
|
2500
|
+
onOpenChange: n,
|
|
2501
|
+
referenceElement: r.reference ?? null,
|
|
2502
|
+
floatingElement: r.floating ?? null,
|
|
2503
|
+
triggerElements: new zi(),
|
|
2504
|
+
floatingId: i,
|
|
2505
|
+
syncOnly: !1,
|
|
2506
|
+
nested: a
|
|
2507
|
+
})).current;
|
|
2508
|
+
return b(() => {
|
|
2509
|
+
let e = {
|
|
2510
|
+
open: t,
|
|
2511
|
+
floatingId: i
|
|
2512
|
+
};
|
|
2513
|
+
r.reference !== void 0 && (e.referenceElement = r.reference, e.domReferenceElement = S(r.reference) ? r.reference : null), r.floating !== void 0 && (e.floatingElement = r.floating), o.update(e);
|
|
2514
|
+
}, [
|
|
2515
|
+
t,
|
|
2516
|
+
i,
|
|
2517
|
+
r.reference,
|
|
2518
|
+
r.floating,
|
|
2519
|
+
o
|
|
2520
|
+
]), o.context.onOpenChange = n, o.context.nested = a, o;
|
|
2521
|
+
}
|
|
2522
|
+
//#endregion
|
|
2523
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useFloating.js
|
|
2524
|
+
function Vi(e = {}) {
|
|
2525
|
+
let { nodeId: t, externalTree: n } = e, r = Bi(e), i = e.rootContext || r, a = {
|
|
2526
|
+
reference: i.useState("referenceElement"),
|
|
2527
|
+
floating: i.useState("floatingElement"),
|
|
2528
|
+
domReference: i.useState("domReferenceElement")
|
|
2529
|
+
}, [o, s] = P.useState(null), c = P.useRef(null), l = ar(n);
|
|
2530
|
+
b(() => {
|
|
2531
|
+
a.domReference && (c.current = a.domReference);
|
|
2532
|
+
}, [a.domReference]);
|
|
2533
|
+
let u = hi({
|
|
2534
|
+
...e,
|
|
2535
|
+
elements: {
|
|
2536
|
+
...a,
|
|
2537
|
+
...o && { reference: o }
|
|
2538
|
+
}
|
|
2539
|
+
}), d = P.useCallback((e) => {
|
|
2540
|
+
let t = S(e) ? {
|
|
2541
|
+
getBoundingClientRect: () => e.getBoundingClientRect(),
|
|
2542
|
+
getClientRects: () => e.getClientRects(),
|
|
2543
|
+
contextElement: e
|
|
2544
|
+
} : e;
|
|
2545
|
+
s(t), u.refs.setReference(t);
|
|
2546
|
+
}, [u.refs]), [f, p] = P.useState(void 0), [m, h] = P.useState(null);
|
|
2547
|
+
i.useSyncedValue("referenceElement", f ?? null);
|
|
2548
|
+
let g = S(f) ? f : null;
|
|
2549
|
+
i.useSyncedValue("domReferenceElement", f === void 0 ? a.domReference : g), i.useSyncedValue("floatingElement", m);
|
|
2550
|
+
let _ = P.useCallback((e) => {
|
|
2551
|
+
(S(e) || e === null) && (c.current = e, p(e)), (S(u.refs.reference.current) || u.refs.reference.current === null || e !== null && !S(e)) && u.refs.setReference(e);
|
|
2552
|
+
}, [u.refs, p]), v = P.useCallback((e) => {
|
|
2553
|
+
h(e), u.refs.setFloating(e);
|
|
2554
|
+
}, [u.refs]), y = P.useMemo(() => ({
|
|
2555
|
+
...u.refs,
|
|
2556
|
+
setReference: _,
|
|
2557
|
+
setFloating: v,
|
|
2558
|
+
setPositionReference: d,
|
|
2559
|
+
domReference: c
|
|
2560
|
+
}), [
|
|
2561
|
+
u.refs,
|
|
2562
|
+
_,
|
|
2563
|
+
v,
|
|
2564
|
+
d
|
|
2565
|
+
]), x = P.useMemo(() => ({
|
|
2566
|
+
...u.elements,
|
|
2567
|
+
domReference: a.domReference
|
|
2568
|
+
}), [u.elements, a.domReference]), C = i.useState("open"), w = i.useState("floatingId"), T = P.useMemo(() => ({
|
|
2569
|
+
...u,
|
|
2570
|
+
dataRef: i.context.dataRef,
|
|
2571
|
+
open: C,
|
|
2572
|
+
onOpenChange: i.setOpen,
|
|
2573
|
+
events: i.context.events,
|
|
2574
|
+
floatingId: w,
|
|
2575
|
+
refs: y,
|
|
2576
|
+
elements: x,
|
|
2577
|
+
nodeId: t,
|
|
2578
|
+
rootStore: i
|
|
2579
|
+
}), [
|
|
2580
|
+
u,
|
|
2581
|
+
y,
|
|
2582
|
+
x,
|
|
2583
|
+
t,
|
|
2584
|
+
i,
|
|
2585
|
+
C,
|
|
2586
|
+
w
|
|
2587
|
+
]);
|
|
2588
|
+
return b(() => {
|
|
2589
|
+
i.context.dataRef.current.floatingContext = T;
|
|
2590
|
+
let e = l?.nodesRef.current.find((e) => e.id === t);
|
|
2591
|
+
e && (e.context = T);
|
|
2592
|
+
}), P.useMemo(() => ({
|
|
2593
|
+
...u,
|
|
2594
|
+
context: T,
|
|
2595
|
+
refs: y,
|
|
2596
|
+
elements: x,
|
|
2597
|
+
rootStore: i
|
|
2598
|
+
}), [
|
|
2599
|
+
u,
|
|
2600
|
+
y,
|
|
2601
|
+
x,
|
|
2602
|
+
T,
|
|
2603
|
+
i
|
|
2604
|
+
]);
|
|
2605
|
+
}
|
|
2606
|
+
//#endregion
|
|
2607
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/floating-ui-react/hooks/useInteractions.js
|
|
2608
|
+
function Hi(e = []) {
|
|
2609
|
+
let t = e.map((e) => e?.reference), n = e.map((e) => e?.floating), r = e.map((e) => e?.item), i = e.map((e) => e?.trigger), a = P.useCallback((t) => Ui(t, e, "reference"), t), o = P.useCallback((t) => Ui(t, e, "floating"), n), s = P.useCallback((t) => Ui(t, e, "item"), r), c = P.useCallback((t) => Ui(t, e, "trigger"), i);
|
|
2610
|
+
return P.useMemo(() => ({
|
|
2611
|
+
getReferenceProps: a,
|
|
2612
|
+
getFloatingProps: o,
|
|
2613
|
+
getItemProps: s,
|
|
2614
|
+
getTriggerProps: c
|
|
2615
|
+
}), [
|
|
2616
|
+
a,
|
|
2617
|
+
o,
|
|
2618
|
+
s,
|
|
2619
|
+
c
|
|
2620
|
+
]);
|
|
2621
|
+
}
|
|
2622
|
+
function Ui(e, t, n) {
|
|
2623
|
+
let r = /* @__PURE__ */ new Map(), i = n === "item", a = {};
|
|
2624
|
+
n === "floating" && (a.tabIndex = -1, a[je] = "");
|
|
2625
|
+
for (let t in e) i && e && (t === "active" || t === "selected") || (a[t] = e[t]);
|
|
2626
|
+
for (let o = 0; o < t.length; o += 1) {
|
|
2627
|
+
let s, c = t[o]?.[n];
|
|
2628
|
+
s = typeof c == "function" ? e ? c(e) : null : c, s && Wi(a, s, i, r);
|
|
2629
|
+
}
|
|
2630
|
+
return Wi(a, e, i, r), a;
|
|
2631
|
+
}
|
|
2632
|
+
function Wi(e, t, n, r) {
|
|
2633
|
+
for (let i in t) {
|
|
2634
|
+
let a = t[i];
|
|
2635
|
+
n && (i === "active" || i === "selected") || (i.startsWith("on") ? (r.has(i) || r.set(i, []), typeof a == "function" && (r.get(i)?.push(a), e[i] = (...e) => r.get(i)?.map((t) => t(...e)).find((e) => e !== void 0))) : e[i] = a);
|
|
2636
|
+
}
|
|
2637
|
+
}
|
|
2638
|
+
//#endregion
|
|
2639
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/internals/useValueChanged.js
|
|
2640
|
+
function Gi(e, t) {
|
|
2641
|
+
let n = P.useRef(e), r = x(t);
|
|
2642
|
+
b(() => {
|
|
2643
|
+
n.current !== e && r(n.current);
|
|
2644
|
+
}, [e, r]), b(() => {
|
|
2645
|
+
n.current = e;
|
|
2646
|
+
}, [e]);
|
|
2647
|
+
}
|
|
2648
|
+
//#endregion
|
|
2649
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/utils/popupStateMapping.js
|
|
2650
|
+
var Ki = function(e) {
|
|
2651
|
+
return e.open = "data-open", e.closed = "data-closed", e[e.startingStyle = K.startingStyle] = "startingStyle", e[e.endingStyle = K.endingStyle] = "endingStyle", e.anchorHidden = "data-anchor-hidden", e.side = "data-side", e.align = "data-align", e;
|
|
2652
|
+
}({}), qi = /* @__PURE__ */ function(e) {
|
|
2653
|
+
return e.popupOpen = "data-popup-open", e.pressed = "data-pressed", e;
|
|
2654
|
+
}({}), Ji = { [qi.popupOpen]: "" }, Yi = {
|
|
2655
|
+
[qi.popupOpen]: "",
|
|
2656
|
+
[qi.pressed]: ""
|
|
2657
|
+
}, Xi = { [Ki.open]: "" }, Zi = { [Ki.closed]: "" }, Qi = { [Ki.anchorHidden]: "" }, $i = { open(e) {
|
|
2658
|
+
return e ? Ji : null;
|
|
2659
|
+
} }, ea = { open(e) {
|
|
2660
|
+
return e ? Yi : null;
|
|
2661
|
+
} }, ta = {
|
|
2662
|
+
open(e) {
|
|
2663
|
+
return e ? Xi : Zi;
|
|
2664
|
+
},
|
|
2665
|
+
anchorHidden(e) {
|
|
2666
|
+
return e ? Qi : null;
|
|
2667
|
+
}
|
|
2668
|
+
}, na = /* @__PURE__ */ P.createContext({
|
|
2669
|
+
formRef: { current: { fields: /* @__PURE__ */ new Map() } },
|
|
2670
|
+
errors: {},
|
|
2671
|
+
clearErrors: a,
|
|
2672
|
+
validationMode: "onSubmit",
|
|
2673
|
+
submitAttemptedRef: { current: !1 }
|
|
2674
|
+
});
|
|
2675
|
+
process.env.NODE_ENV !== "production" && (na.displayName = "FormContext");
|
|
2676
|
+
function ra() {
|
|
2677
|
+
return P.useContext(na);
|
|
2678
|
+
}
|
|
2679
|
+
//#endregion
|
|
2680
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/utils/resolveAriaLabelledBy.js
|
|
2681
|
+
function ia(e) {
|
|
2682
|
+
return e == null ? void 0 : `${e}-label`;
|
|
2683
|
+
}
|
|
2684
|
+
function aa(e, t) {
|
|
2685
|
+
return e ?? t;
|
|
2686
|
+
}
|
|
2687
|
+
//#endregion
|
|
2688
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/floating-ui-react/middleware/arrow.js
|
|
2689
|
+
var oa = (e) => ({
|
|
2690
|
+
name: "arrow",
|
|
2691
|
+
options: e,
|
|
2692
|
+
async fn(t) {
|
|
2693
|
+
let { x: n, y: r, placement: i, rects: a, platform: o, elements: s, middlewareData: c } = t, { element: l, padding: u = 0, offsetParent: d = "real" } = at(e, t) || {};
|
|
2694
|
+
if (l == null) return {};
|
|
2695
|
+
let f = xt(u), p = {
|
|
2696
|
+
x: n,
|
|
2697
|
+
y: r
|
|
2698
|
+
}, m = lt(i), h = ct(m), g = await o.getDimensions(l), _ = m === "y", v = _ ? "top" : "left", y = _ ? "bottom" : "right", b = _ ? "clientHeight" : "clientWidth", x = a.reference[h] + a.reference[m] - p[m] - a.floating[h], S = p[m] - a.reference[m], C = d === "real" ? await o.getOffsetParent?.(l) : s.floating, w = s.floating[b] || a.floating[h];
|
|
2699
|
+
(!w || !await o.isElement?.(C)) && (w = s.floating[b] || a.floating[h]);
|
|
2700
|
+
let T = x / 2 - S / 2, E = w / 2 - g[h] / 2 - 1, D = Math.min(f[v], E), ee = Math.min(f[y], E), O = D, k = w - g[h] - ee, A = w / 2 - g[h] / 2 + T, j = it(O, A, k), M = !c.arrow && ot(i) != null && A !== j && a.reference[h] / 2 - (A < O ? D : ee) - g[h] / 2 < 0, N = M ? A < O ? A - O : A - k : 0;
|
|
2701
|
+
return {
|
|
2702
|
+
[m]: p[m] + N,
|
|
2703
|
+
data: {
|
|
2704
|
+
[m]: j,
|
|
2705
|
+
centerOffset: A - j - N,
|
|
2706
|
+
...M && { alignmentOffset: N }
|
|
2707
|
+
},
|
|
2708
|
+
reset: M
|
|
2709
|
+
};
|
|
2710
|
+
}
|
|
2711
|
+
}), sa = (e, t) => ({
|
|
2712
|
+
...oa(e),
|
|
2713
|
+
options: [e, t]
|
|
2714
|
+
}), ca = {
|
|
2715
|
+
name: "hide",
|
|
2716
|
+
async fn(e) {
|
|
2717
|
+
let { width: t, height: n, x: r, y: i } = e.rects.reference, a = t === 0 && n === 0 && r === 0 && i === 0;
|
|
2718
|
+
return { data: { referenceHidden: (await xi().fn(e)).data?.referenceHidden || a } };
|
|
2719
|
+
}
|
|
2720
|
+
}, la = {
|
|
2721
|
+
sideX: "left",
|
|
2722
|
+
sideY: "top"
|
|
2723
|
+
}, ua = {
|
|
2724
|
+
name: "adaptiveOrigin",
|
|
2725
|
+
async fn(e) {
|
|
2726
|
+
let { x: t, y: n, rects: { floating: r }, elements: { floating: i }, platform: a, strategy: o, placement: s } = e, c = C(i), l = c.getComputedStyle(i);
|
|
2727
|
+
if (!(l.transitionDuration !== "0s" && l.transitionDuration !== "")) return {
|
|
2728
|
+
x: t,
|
|
2729
|
+
y: n,
|
|
2730
|
+
data: la
|
|
2731
|
+
};
|
|
2732
|
+
let u = await a.getOffsetParent?.(i), d = {
|
|
2733
|
+
width: 0,
|
|
2734
|
+
height: 0
|
|
2735
|
+
};
|
|
2736
|
+
if (o === "fixed" && c?.visualViewport) d = {
|
|
2737
|
+
width: c.visualViewport.width,
|
|
2738
|
+
height: c.visualViewport.height
|
|
2739
|
+
};
|
|
2740
|
+
else if (u === c) {
|
|
2741
|
+
let e = N(i);
|
|
2742
|
+
d = {
|
|
2743
|
+
width: e.documentElement.clientWidth,
|
|
2744
|
+
height: e.documentElement.clientHeight
|
|
2745
|
+
};
|
|
2746
|
+
} else await a.isElement?.(u) && (d = await a.getDimensions(u));
|
|
2747
|
+
let f = X(s), p = t, m = n;
|
|
2748
|
+
f === "left" && (p = d.width - (t + r.width)), f === "top" && (m = d.height - (n + r.height));
|
|
2749
|
+
let h = f === "left" ? "right" : la.sideX, g = f === "top" ? "bottom" : la.sideY;
|
|
2750
|
+
return {
|
|
2751
|
+
x: p,
|
|
2752
|
+
y: m,
|
|
2753
|
+
data: {
|
|
2754
|
+
sideX: h,
|
|
2755
|
+
sideY: g
|
|
2756
|
+
}
|
|
2757
|
+
};
|
|
2758
|
+
}
|
|
2759
|
+
};
|
|
2760
|
+
//#endregion
|
|
2761
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/utils/useAnchorPositioning.js
|
|
2762
|
+
function da(e, t, n) {
|
|
2763
|
+
let r = e === "inline-start" || e === "inline-end";
|
|
2764
|
+
return {
|
|
2765
|
+
top: "top",
|
|
2766
|
+
right: r ? n ? "inline-start" : "inline-end" : "right",
|
|
2767
|
+
bottom: "bottom",
|
|
2768
|
+
left: r ? n ? "inline-end" : "inline-start" : "left"
|
|
2769
|
+
}[t];
|
|
2770
|
+
}
|
|
2771
|
+
function fa(e, t, n) {
|
|
2772
|
+
let { rects: r, placement: i } = e;
|
|
2773
|
+
return {
|
|
2774
|
+
side: da(t, X(i), n),
|
|
2775
|
+
align: ot(i) || "center",
|
|
2776
|
+
anchor: {
|
|
2777
|
+
width: r.reference.width,
|
|
2778
|
+
height: r.reference.height
|
|
2779
|
+
},
|
|
2780
|
+
positioner: {
|
|
2781
|
+
width: r.floating.width,
|
|
2782
|
+
height: r.floating.height
|
|
2783
|
+
}
|
|
2784
|
+
};
|
|
2785
|
+
}
|
|
2786
|
+
function pa(e) {
|
|
2787
|
+
let { anchor: t, positionMethod: n = "absolute", side: r = "bottom", sideOffset: i = 0, align: a = "center", alignOffset: o = 0, collisionBoundary: s, collisionPadding: c = 5, sticky: l = !1, arrowPadding: u = 5, disableAnchorTracking: d = !1, keepMounted: f = !1, floatingRootContext: p, mounted: m, collisionAvoidance: h, shiftCrossAxis: g = !1, nodeId: _, adaptiveOrigin: v, lazyFlip: y = !1, externalTree: S } = e, [w, T] = P.useState(null);
|
|
2788
|
+
!m && w !== null && T(null);
|
|
2789
|
+
let E = h.side || "flip", D = h.align || "flip", ee = h.fallbackAxisSide || "end", O = typeof t == "function" ? t : void 0, k = x(O), A = O ? k : t, j = Nn(t), M = Nn(m), te = se() === "rtl", ne = w || {
|
|
2790
|
+
top: "top",
|
|
2791
|
+
right: "right",
|
|
2792
|
+
bottom: "bottom",
|
|
2793
|
+
left: "left",
|
|
2794
|
+
"inline-end": te ? "left" : "right",
|
|
2795
|
+
"inline-start": te ? "right" : "left"
|
|
2796
|
+
}[r], F = a === "center" ? ne : `${ne}-${a}`, I = c, L = +(r === "bottom"), re = +(r === "top"), ie = +(r === "right"), R = +(r === "left");
|
|
2797
|
+
typeof I == "number" ? I = {
|
|
2798
|
+
top: I + L,
|
|
2799
|
+
right: I + R,
|
|
2800
|
+
bottom: I + re,
|
|
2801
|
+
left: I + ie
|
|
2802
|
+
} : I &&= {
|
|
2803
|
+
top: (I.top || 0) + L,
|
|
2804
|
+
right: (I.right || 0) + R,
|
|
2805
|
+
bottom: (I.bottom || 0) + re,
|
|
2806
|
+
left: (I.left || 0) + ie
|
|
2807
|
+
};
|
|
2808
|
+
let ae = {
|
|
2809
|
+
boundary: s === "clipping-ancestors" ? "clippingAncestors" : s,
|
|
2810
|
+
padding: I
|
|
2811
|
+
}, z = P.useRef(null), B = Nn(i), V = Nn(o), H = [gi((e) => {
|
|
2812
|
+
let t = fa(e, r, te), n = typeof B.current == "function" ? B.current(t) : B.current, i = typeof V.current == "function" ? V.current(t) : V.current;
|
|
2813
|
+
return {
|
|
2814
|
+
mainAxis: n,
|
|
2815
|
+
crossAxis: i,
|
|
2816
|
+
alignmentAxis: i
|
|
2817
|
+
};
|
|
2818
|
+
}, [
|
|
2819
|
+
typeof i == "function" ? 0 : i,
|
|
2820
|
+
typeof o == "function" ? 0 : o,
|
|
2821
|
+
te,
|
|
2822
|
+
r
|
|
2823
|
+
])], oe = D === "none" && E !== "shift", ce = !oe && (l || g || E === "shift"), le = E === "none" ? null : yi({
|
|
2824
|
+
...ae,
|
|
2825
|
+
padding: {
|
|
2826
|
+
top: I.top + 1,
|
|
2827
|
+
right: I.right + 1,
|
|
2828
|
+
bottom: I.bottom + 1,
|
|
2829
|
+
left: I.left + 1
|
|
2830
|
+
},
|
|
2831
|
+
mainAxis: !g && E === "flip",
|
|
2832
|
+
crossAxis: D === "flip" ? "alignment" : !1,
|
|
2833
|
+
fallbackAxisSideDirection: ee
|
|
2834
|
+
}), U = oe ? null : _i((e) => {
|
|
2835
|
+
let t = N(e.elements.floating).documentElement;
|
|
2836
|
+
return {
|
|
2837
|
+
...ae,
|
|
2838
|
+
rootBoundary: g ? {
|
|
2839
|
+
x: 0,
|
|
2840
|
+
y: 0,
|
|
2841
|
+
width: t.clientWidth,
|
|
2842
|
+
height: t.clientHeight
|
|
2843
|
+
} : void 0,
|
|
2844
|
+
mainAxis: D !== "none",
|
|
2845
|
+
crossAxis: ce,
|
|
2846
|
+
limiter: l || g ? void 0 : vi((e) => {
|
|
2847
|
+
if (!z.current) return {};
|
|
2848
|
+
let { width: t, height: n } = z.current.getBoundingClientRect(), r = Z(X(e.placement)), i = r === "y" ? t : n, a = r === "y" ? I.left + I.right : I.top + I.bottom;
|
|
2849
|
+
return { offset: i / 2 + a / 2 };
|
|
2850
|
+
})
|
|
2851
|
+
};
|
|
2852
|
+
}, [
|
|
2853
|
+
ae,
|
|
2854
|
+
l,
|
|
2855
|
+
g,
|
|
2856
|
+
I,
|
|
2857
|
+
D
|
|
2858
|
+
]);
|
|
2859
|
+
E === "shift" || D === "shift" || a === "center" ? H.push(U, le) : H.push(le, U), H.push(bi({
|
|
2860
|
+
...ae,
|
|
2861
|
+
apply({ elements: { floating: e }, availableWidth: t, availableHeight: n, rects: r }) {
|
|
2862
|
+
if (!M.current) return;
|
|
2863
|
+
let i = e.style;
|
|
2864
|
+
i.setProperty("--available-width", `${t}px`), i.setProperty("--available-height", `${n}px`);
|
|
2865
|
+
let a = C(e).devicePixelRatio || 1, { x: o, y: s, width: c, height: l } = r.reference, u = (Math.round((o + c) * a) - Math.round(o * a)) / a, d = (Math.round((s + l) * a) - Math.round(s * a)) / a;
|
|
2866
|
+
i.setProperty("--anchor-width", `${u}px`), i.setProperty("--anchor-height", `${d}px`);
|
|
2867
|
+
}
|
|
2868
|
+
}), sa(() => ({
|
|
2869
|
+
element: z.current || N(z.current).createElement("div"),
|
|
2870
|
+
padding: u,
|
|
2871
|
+
offsetParent: "floating"
|
|
2872
|
+
}), [u]), {
|
|
2873
|
+
name: "transformOrigin",
|
|
2874
|
+
fn(e) {
|
|
2875
|
+
let { elements: t, middlewareData: n, placement: a, rects: o, y: s } = e, c = X(a), l = Z(c), u = z.current, d = n.arrow?.x || 0, f = n.arrow?.y || 0, p = u?.clientWidth || 0, m = u?.clientHeight || 0, h = d + p / 2, g = f + m / 2, _ = Math.abs(n.shift?.y || 0), v = o.reference.height / 2, y = typeof i == "function" ? i(fa(e, r, te)) : i, b = _ > y, x = {
|
|
2876
|
+
top: `${h}px calc(100% + ${y}px)`,
|
|
2877
|
+
bottom: `${h}px ${-y}px`,
|
|
2878
|
+
left: `calc(100% + ${y}px) ${g}px`,
|
|
2879
|
+
right: `${-y}px ${g}px`
|
|
2880
|
+
}[c], S = `${h}px ${o.reference.y + v - s}px`;
|
|
2881
|
+
return t.floating.style.setProperty("--transform-origin", ce && l === "y" && b ? S : x), {};
|
|
2882
|
+
}
|
|
2883
|
+
}, ca, v), b(() => {
|
|
2884
|
+
!m && p && p.update({
|
|
2885
|
+
referenceElement: null,
|
|
2886
|
+
floatingElement: null,
|
|
2887
|
+
domReferenceElement: null,
|
|
2888
|
+
positionReference: null
|
|
2889
|
+
});
|
|
2890
|
+
}, [m, p]);
|
|
2891
|
+
let ue = P.useMemo(() => ({
|
|
2892
|
+
elementResize: !d && typeof ResizeObserver < "u",
|
|
2893
|
+
layoutShift: !d && typeof IntersectionObserver < "u"
|
|
2894
|
+
}), [d]), { refs: W, elements: G, x: de, y: fe, middlewareData: K, update: pe, placement: me, context: he, isPositioned: ge, floatingStyles: _e } = Vi({
|
|
2895
|
+
rootContext: p,
|
|
2896
|
+
open: f ? m : void 0,
|
|
2897
|
+
placement: F,
|
|
2898
|
+
middleware: H,
|
|
2899
|
+
strategy: n,
|
|
2900
|
+
whileElementsMounted: f ? void 0 : (...e) => ni(...e, ue),
|
|
2901
|
+
nodeId: _,
|
|
2902
|
+
externalTree: S
|
|
2903
|
+
}), { sideX: q, sideY: ve } = K.adaptiveOrigin || la, ye = ge ? n : "fixed", be = P.useMemo(() => {
|
|
2904
|
+
let e = v ? {
|
|
2905
|
+
position: ye,
|
|
2906
|
+
[q]: de,
|
|
2907
|
+
[ve]: fe
|
|
2908
|
+
} : {
|
|
2909
|
+
position: ye,
|
|
2910
|
+
..._e
|
|
2911
|
+
};
|
|
2912
|
+
return ge || (e.opacity = 0), e;
|
|
2913
|
+
}, [
|
|
2914
|
+
v,
|
|
2915
|
+
ye,
|
|
2916
|
+
q,
|
|
2917
|
+
de,
|
|
2918
|
+
ve,
|
|
2919
|
+
fe,
|
|
2920
|
+
_e,
|
|
2921
|
+
ge
|
|
2922
|
+
]), xe = P.useRef(null);
|
|
2923
|
+
b(() => {
|
|
2924
|
+
if (!m) return;
|
|
2925
|
+
let e = j.current, t = typeof e == "function" ? e() : e, n = (ma(t) ? t.current : t) || null;
|
|
2926
|
+
n !== xe.current && (W.setPositionReference(n), xe.current = n);
|
|
2927
|
+
}, [
|
|
2928
|
+
m,
|
|
2929
|
+
W,
|
|
2930
|
+
A,
|
|
2931
|
+
j
|
|
2932
|
+
]), P.useEffect(() => {
|
|
2933
|
+
if (!m) return;
|
|
2934
|
+
let e = j.current;
|
|
2935
|
+
typeof e != "function" && ma(e) && e.current !== xe.current && (W.setPositionReference(e.current), xe.current = e.current);
|
|
2936
|
+
}, [
|
|
2937
|
+
m,
|
|
2938
|
+
W,
|
|
2939
|
+
A,
|
|
2940
|
+
j
|
|
2941
|
+
]), P.useEffect(() => {
|
|
2942
|
+
if (f && m && G.domReference && G.floating) return ni(G.domReference, G.floating, pe, ue);
|
|
2943
|
+
}, [
|
|
2944
|
+
f,
|
|
2945
|
+
m,
|
|
2946
|
+
G,
|
|
2947
|
+
pe,
|
|
2948
|
+
ue
|
|
2949
|
+
]);
|
|
2950
|
+
let Se = X(me), Ce = da(r, Se, te), we = ot(me) || "center", Te = !!K.hide?.referenceHidden;
|
|
2951
|
+
b(() => {
|
|
2952
|
+
y && m && ge && T(Se);
|
|
2953
|
+
}, [
|
|
2954
|
+
y,
|
|
2955
|
+
m,
|
|
2956
|
+
ge,
|
|
2957
|
+
Se
|
|
2958
|
+
]);
|
|
2959
|
+
let Ee = P.useMemo(() => ({
|
|
2960
|
+
position: "absolute",
|
|
2961
|
+
top: K.arrow?.y,
|
|
2962
|
+
left: K.arrow?.x
|
|
2963
|
+
}), [K.arrow]), De = K.arrow?.centerOffset !== 0;
|
|
2964
|
+
return P.useMemo(() => ({
|
|
2965
|
+
positionerStyles: be,
|
|
2966
|
+
arrowStyles: Ee,
|
|
2967
|
+
arrowRef: z,
|
|
2968
|
+
arrowUncentered: De,
|
|
2969
|
+
side: Ce,
|
|
2970
|
+
align: we,
|
|
2971
|
+
physicalSide: Se,
|
|
2972
|
+
anchorHidden: Te,
|
|
2973
|
+
refs: W,
|
|
2974
|
+
context: he,
|
|
2975
|
+
isPositioned: ge,
|
|
2976
|
+
update: pe
|
|
2977
|
+
}), [
|
|
2978
|
+
be,
|
|
2979
|
+
Ee,
|
|
2980
|
+
z,
|
|
2981
|
+
De,
|
|
2982
|
+
Ce,
|
|
2983
|
+
we,
|
|
2984
|
+
Se,
|
|
2985
|
+
Te,
|
|
2986
|
+
W,
|
|
2987
|
+
he,
|
|
2988
|
+
ge,
|
|
2989
|
+
pe
|
|
2990
|
+
]);
|
|
2991
|
+
}
|
|
2992
|
+
function ma(e) {
|
|
2993
|
+
return e != null && "current" in e;
|
|
2994
|
+
}
|
|
2995
|
+
//#endregion
|
|
2996
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/utils/getDisabledMountTransitionStyles.js
|
|
2997
|
+
function ha(e) {
|
|
2998
|
+
return e === "starting" ? Bn : y;
|
|
2999
|
+
}
|
|
3000
|
+
//#endregion
|
|
3001
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/utils/usePositioner.js
|
|
3002
|
+
function ga(e, t, { styles: n, transitionStatus: r, props: i, refs: a, hidden: o, inert: s = !1 }) {
|
|
3003
|
+
let c = { ...n };
|
|
3004
|
+
return s && (c.pointerEvents = "none"), v("div", e, {
|
|
3005
|
+
state: t,
|
|
3006
|
+
ref: a,
|
|
3007
|
+
props: [
|
|
3008
|
+
{
|
|
3009
|
+
role: "presentation",
|
|
3010
|
+
hidden: o,
|
|
3011
|
+
style: c
|
|
3012
|
+
},
|
|
3013
|
+
ha(r),
|
|
3014
|
+
i
|
|
3015
|
+
],
|
|
3016
|
+
stateAttributesMapping: ta
|
|
3017
|
+
});
|
|
3018
|
+
}
|
|
3019
|
+
//#endregion
|
|
3020
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/csp-provider/CSPContext.js
|
|
3021
|
+
var _a = /* @__PURE__ */ P.createContext(void 0);
|
|
3022
|
+
process.env.NODE_ENV !== "production" && (_a.displayName = "CSPContext");
|
|
3023
|
+
var va = { disableStyleElements: !1 };
|
|
3024
|
+
function ya() {
|
|
3025
|
+
return P.useContext(_a) ?? va;
|
|
3026
|
+
}
|
|
3027
|
+
//#endregion
|
|
3028
|
+
//#region node_modules/.pnpm/@base-ui+react@1.4.1_@date-_b8638dac2a3c723a96c38fd0e25c7d53/node_modules/@base-ui/react/esm/internals/clamp.js
|
|
3029
|
+
function ba(e, t = -(2 ** 53 - 1), n = 2 ** 53 - 1) {
|
|
3030
|
+
return Math.max(t, Math.min(e, n));
|
|
3031
|
+
}
|
|
3032
|
+
//#endregion
|
|
3033
|
+
export { vn as $, Fe as $t, or as A, Et as At, Gn as B, Ye as Bt, Di as C, qt as Ct, fr as D, kt as Dt, $r as E, Q as Et, Qn as F, St as Ft, Ln as G, Be as Gt, zn as H, Ge as Ht, Xn as I, et as It, An as J, ze as Jt, Nn as K, Le as Kt, Wn as L, Ze as Lt, ar as M, Nt as Mt, tr as N, wt as Nt, sr as O, At as Ot, $n as P, jt as Pt, $ as Q, Pe as Qt, Vn as R, Xe as Rt, ji as S, nn as St, Si as T, Ot as Tt, Rn as U, We as Ut, qn as V, Ke as Vt, In as W, Ue as Wt, On as X, Ie as Xt, jn as Y, He as Yt, Dn as Z, Ne as Zt, Bi as _, Jt as _t, pa as a, xe as an, yn as at, Ii as b, en as bt, aa as c, K as cn, mn as ct, qi as d, G as dn, dn as dt, Te as en, sn as et, ta as f, de as fn, bn as ft, Hi as g, ae as gn, wn as gt, Gi as h, z as hn, Cn as ht, ha as i, we as in, on as it, ir as j, Tt as jt, cr as k, Dt as kt, ra as l, he as ln, xn as lt, $i as m, se as mn, gn as mt, ya as n, Se as nn, cn as nt, ua as o, _e as on, un as ot, ea as p, le as pn, hn as pt, Mn as q, Ve as qt, ga as r, Ee as rn, ln as rt, ia as s, ge as sn, pn as st, ba as t, Ce as tn, _n as tt, Ki as u, fe as un, fn as ut, zi as v, Zt as vt, Oi as w, Yt as wt, Fi as x, tn as xt, Ri as y, Qt as yt, Kn as z, Je as zt };
|