@spark-ui/components 14.0.0-beta.1 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button-B6rA3-e5.js +2 -0
- package/dist/{Button-C3xHNaGl.js.map → Button-B6rA3-e5.js.map} +1 -1
- package/dist/{Button-D32Avk2j.mjs → Button-C3C0aixy.mjs} +4 -4
- package/dist/{Button-D32Avk2j.mjs.map → Button-C3C0aixy.mjs.map} +1 -1
- package/dist/DialogContent.styles-BSfXHt21.mjs +61 -0
- package/dist/DialogContent.styles-BSfXHt21.mjs.map +1 -0
- package/dist/DialogContent.styles-bBs6l8Cy.js +2 -0
- package/dist/DialogContent.styles-bBs6l8Cy.js.map +1 -0
- package/dist/Icon-CF0W0LKr.js +2 -0
- package/dist/{Icon-Bf0XrmiR.js.map → Icon-CF0W0LKr.js.map} +1 -1
- package/dist/{Icon-D1RueiPY.mjs → Icon-Ck-dhfLd.mjs} +6 -6
- package/dist/{Icon-D1RueiPY.mjs.map → Icon-Ck-dhfLd.mjs.map} +1 -1
- package/dist/{IconButton-BY3gYXtU.mjs → IconButton-C62-axzv.mjs} +6 -6
- package/dist/{IconButton-BY3gYXtU.mjs.map → IconButton-C62-axzv.mjs.map} +1 -1
- package/dist/IconButton-D3g86WpZ.js +2 -0
- package/dist/{IconButton-Bf-EDzpI.js.map → IconButton-D3g86WpZ.js.map} +1 -1
- package/dist/Slot-D2Bbf8Gw.mjs +14 -0
- package/dist/{Slot-C98rL4yy.mjs.map → Slot-D2Bbf8Gw.mjs.map} +1 -1
- package/dist/Slot-DQ8z2zsy.js +2 -0
- package/dist/{Slot-ghrohQLA.js.map → Slot-DQ8z2zsy.js.map} +1 -1
- package/dist/Spinner-_Kffli3B.js +2 -0
- package/dist/{Spinner-DK8VEsaR.js.map → Spinner-_Kffli3B.js.map} +1 -1
- package/dist/{Spinner-CYL5kyzM.mjs → Spinner-jF3-zoh_.mjs} +3 -3
- package/dist/{Spinner-CYL5kyzM.mjs.map → Spinner-jF3-zoh_.mjs.map} +1 -1
- package/dist/{TextLink-3MEVs3No.mjs → TextLink-BuzFRWO6.mjs} +3 -3
- package/dist/{TextLink-3MEVs3No.mjs.map → TextLink-BuzFRWO6.mjs.map} +1 -1
- package/dist/TextLink-C3xDLsbC.js +2 -0
- package/dist/{TextLink-DD0VO37q.js.map → TextLink-C3xDLsbC.js.map} +1 -1
- package/dist/{VisuallyHidden-AoRh4WRK.js → VisuallyHidden-CB6Nx76j.js} +2 -2
- package/dist/{VisuallyHidden-AoRh4WRK.js.map → VisuallyHidden-CB6Nx76j.js.map} +1 -1
- package/dist/{VisuallyHidden-ByNP7ZUI.mjs → VisuallyHidden-KH1biLx-.mjs} +2 -2
- package/dist/{VisuallyHidden-ByNP7ZUI.mjs.map → VisuallyHidden-KH1biLx-.mjs.map} +1 -1
- package/dist/accordion/index.d.mts +15 -0
- package/dist/accordion/index.js +1 -1
- package/dist/accordion/index.js.map +1 -1
- package/dist/accordion/index.mjs +90 -608
- package/dist/accordion/index.mjs.map +1 -1
- package/dist/alert-dialog/AlertDialogPortal.d.ts +1 -1
- package/dist/alert-dialog/index.d.mts +38 -0
- package/dist/alert-dialog/index.js +1 -34
- package/dist/alert-dialog/index.js.map +1 -1
- package/dist/alert-dialog/index.mjs +139 -2475
- package/dist/alert-dialog/index.mjs.map +1 -1
- package/dist/avatar/index.d.mts +15 -0
- package/dist/avatar/index.js +1 -1
- package/dist/avatar/index.js.map +1 -1
- package/dist/avatar/index.mjs +4 -4
- package/dist/badge/index.d.mts +1 -0
- package/dist/badge/index.js +1 -1
- package/dist/badge/index.js.map +1 -1
- package/dist/badge/index.mjs +6 -6
- package/dist/breadcrumb/index.d.mts +12 -0
- package/dist/breadcrumb/index.js +1 -1
- package/dist/breadcrumb/index.js.map +1 -1
- package/dist/breadcrumb/index.mjs +21 -21
- package/dist/button/Button.d.ts +1 -1
- package/dist/button/index.d.mts +1 -0
- package/dist/button/index.js +1 -1
- package/dist/button/index.mjs +1 -1
- package/dist/button/variants/index.d.mts +5 -0
- package/dist/card/index.d.mts +8 -0
- package/dist/card/index.js +1 -1
- package/dist/card/index.js.map +1 -1
- package/dist/card/index.mjs +2 -2
- package/dist/carousel/index.d.mts +19 -0
- package/dist/carousel/index.js +1 -1
- package/dist/carousel/index.js.map +1 -1
- package/dist/carousel/index.mjs +3 -3
- package/dist/checkbox/index.d.mts +2 -0
- package/dist/checkbox/index.js +1 -1
- package/dist/checkbox/index.js.map +1 -1
- package/dist/checkbox/index.mjs +128 -364
- package/dist/checkbox/index.mjs.map +1 -1
- package/dist/chip/index.d.mts +15 -0
- package/dist/chip/index.js +1 -1
- package/dist/chip/index.js.map +1 -1
- package/dist/chip/index.mjs +196 -370
- package/dist/chip/index.mjs.map +1 -1
- package/dist/chip/variants/index.d.mts +3 -0
- package/dist/collapsible/index.d.mts +7 -0
- package/dist/collapsible/index.js +1 -1
- package/dist/collapsible/index.js.map +1 -1
- package/dist/collapsible/index.mjs +38 -213
- package/dist/collapsible/index.mjs.map +1 -1
- package/dist/combobox/index.d.mts +35 -0
- package/dist/combobox/index.js +1 -1
- package/dist/combobox/index.js.map +1 -1
- package/dist/combobox/index.mjs +7 -7
- package/dist/combobox/utils/index.d.mts +14 -0
- package/dist/dialog/Dialog.d.ts +13 -13
- package/dist/dialog/DialogClose.d.ts +9 -8
- package/dist/dialog/DialogContent.d.ts +4 -4
- package/dist/dialog/DialogDescription.d.ts +3 -3
- package/dist/dialog/DialogOverlay.d.ts +5 -5
- package/dist/dialog/DialogPortal.d.ts +4 -4
- package/dist/dialog/DialogTitle.d.ts +3 -3
- package/dist/dialog/DialogTrigger.d.ts +5 -9
- package/dist/dialog/index.d.mts +37 -0
- package/dist/dialog/index.js +1 -1
- package/dist/dialog/index.js.map +1 -1
- package/dist/dialog/index.mjs +149 -159
- package/dist/dialog/index.mjs.map +1 -1
- package/dist/divider/index.d.mts +6 -0
- package/dist/divider/index.js +1 -1
- package/dist/divider/index.js.map +1 -1
- package/dist/divider/index.mjs +58 -76
- package/dist/divider/index.mjs.map +1 -1
- package/dist/drawer/Drawer.d.ts +12 -19
- package/dist/drawer/DrawerClose.d.ts +9 -5
- package/dist/drawer/DrawerContent.d.ts +5 -5
- package/dist/drawer/DrawerDescription.d.ts +4 -4
- package/dist/drawer/DrawerOverlay.d.ts +5 -5
- package/dist/drawer/DrawerPortal.d.ts +4 -4
- package/dist/drawer/DrawerTitle.d.ts +5 -5
- package/dist/drawer/DrawerTrigger.d.ts +5 -5
- package/dist/drawer/index.d.mts +37 -0
- package/dist/drawer/index.d.ts +2 -0
- package/dist/drawer/index.js +1 -1
- package/dist/drawer/index.js.map +1 -1
- package/dist/drawer/index.mjs +143 -114
- package/dist/drawer/index.mjs.map +1 -1
- package/dist/drawer/useRenderSlot.d.ts +3 -0
- package/dist/dropdown/index.d.mts +29 -0
- package/dist/dropdown/index.js +1 -1
- package/dist/dropdown/index.js.map +1 -1
- package/dist/dropdown/index.mjs +5 -5
- package/dist/file-upload/index.d.mts +22 -0
- package/dist/file-upload/index.js +1 -1
- package/dist/file-upload/index.js.map +1 -1
- package/dist/file-upload/index.mjs +6 -6
- package/dist/form-field/index.d.mts +31 -0
- package/dist/form-field/index.js +1 -1
- package/dist/form-field/index.js.map +1 -1
- package/dist/form-field/index.mjs +47 -47
- package/dist/icon/index.d.mts +1 -0
- package/dist/icon/index.js +1 -1
- package/dist/icon/index.mjs +1 -1
- package/dist/icon-button/index.d.mts +1 -0
- package/dist/icon-button/index.js +1 -1
- package/dist/icon-button/index.mjs +1 -1
- package/dist/input/index.d.mts +21 -0
- package/dist/input/index.js +1 -1
- package/dist/input/index.js.map +1 -1
- package/dist/input/index.mjs +4 -4
- package/dist/input-otp/index.d.mts +14 -0
- package/dist/input-otp/index.js +1 -1
- package/dist/input-otp/index.js.map +1 -1
- package/dist/input-otp/index.mjs +139 -137
- package/dist/input-otp/index.mjs.map +1 -1
- package/dist/kbd/index.d.mts +1 -0
- package/dist/label/index.d.mts +7 -0
- package/dist/label/index.js +1 -1
- package/dist/label/index.js.map +1 -1
- package/dist/label/index.mjs +37 -2
- package/dist/label/index.mjs.map +1 -1
- package/dist/link-box/index.d.mts +9 -0
- package/dist/link-box/index.js +1 -1
- package/dist/link-box/index.js.map +1 -1
- package/dist/link-box/index.mjs +7 -7
- package/dist/pagination/index.d.mts +18 -0
- package/dist/pagination/index.js +1 -1
- package/dist/pagination/index.js.map +1 -1
- package/dist/pagination/index.mjs +126 -844
- package/dist/pagination/index.mjs.map +1 -1
- package/dist/popover/index.d.mts +17 -0
- package/dist/popover/index.js +1 -1
- package/dist/popover/index.js.map +1 -1
- package/dist/popover/index.mjs +119 -1748
- package/dist/popover/index.mjs.map +1 -1
- package/dist/portal/index.d.mts +1 -0
- package/dist/portal/index.js +1 -1
- package/dist/portal/index.js.map +1 -1
- package/dist/portal/index.mjs +3 -3
- package/dist/portal/index.mjs.map +1 -1
- package/dist/progress/index.d.mts +13 -0
- package/dist/progress/index.js +1 -6
- package/dist/progress/index.js.map +1 -1
- package/dist/progress/index.mjs +87 -162
- package/dist/progress/index.mjs.map +1 -1
- package/dist/progress-tracker/index.d.mts +10 -0
- package/dist/progress-tracker/index.js +1 -1
- package/dist/progress-tracker/index.js.map +1 -1
- package/dist/progress-tracker/index.mjs +14 -14
- package/dist/radio-group/index.d.mts +7 -0
- package/dist/radio-group/index.js +1 -1
- package/dist/radio-group/index.js.map +1 -1
- package/dist/radio-group/index.mjs +85 -312
- package/dist/radio-group/index.mjs.map +1 -1
- package/dist/rating/index.d.mts +1 -0
- package/dist/rating/index.js +1 -1
- package/dist/rating/index.js.map +1 -1
- package/dist/rating/index.mjs +11 -11
- package/dist/scrolling-list/index.d.mts +15 -0
- package/dist/scrolling-list/index.js +1 -1
- package/dist/scrolling-list/index.js.map +1 -1
- package/dist/scrolling-list/index.mjs +168 -333
- package/dist/scrolling-list/index.mjs.map +1 -1
- package/dist/segmented-gauge/index.d.mts +13 -0
- package/dist/segmented-gauge/index.js +1 -1
- package/dist/segmented-gauge/index.js.map +1 -1
- package/dist/segmented-gauge/index.mjs +1 -1
- package/dist/select/index.d.mts +21 -0
- package/dist/select/index.js +1 -1
- package/dist/select/index.js.map +1 -1
- package/dist/select/index.mjs +21 -21
- package/dist/skeleton/index.d.mts +8 -0
- package/dist/skeleton/index.js +1 -1
- package/dist/skeleton/index.js.map +1 -1
- package/dist/skeleton/index.mjs +2 -2
- package/dist/slider/Slider.d.ts +6 -1
- package/dist/slider/SliderContext.d.ts +4 -1
- package/dist/slider/index.d.mts +8 -0
- package/dist/slider/index.js +1 -1
- package/dist/slider/index.js.map +1 -1
- package/dist/slider/index.mjs +96 -496
- package/dist/slider/index.mjs.map +1 -1
- package/dist/slot/index.d.mts +1 -0
- package/dist/slot/index.js +1 -1
- package/dist/slot/index.mjs +1 -1
- package/dist/snackbar/index.d.mts +13 -0
- package/dist/snackbar/index.js +1 -1
- package/dist/snackbar/index.js.map +1 -1
- package/dist/snackbar/index.mjs +189 -1105
- package/dist/snackbar/index.mjs.map +1 -1
- package/dist/spinner/index.d.mts +1 -0
- package/dist/spinner/index.js +1 -1
- package/dist/spinner/index.mjs +1 -1
- package/dist/stepper/index.d.mts +9 -0
- package/dist/stepper/index.js +1 -7
- package/dist/stepper/index.js.map +1 -1
- package/dist/stepper/index.mjs +137 -2317
- package/dist/stepper/index.mjs.map +1 -1
- package/dist/switch/index.d.mts +1 -0
- package/dist/switch/index.js +1 -1
- package/dist/switch/index.js.map +1 -1
- package/dist/switch/index.mjs +85 -208
- package/dist/switch/index.mjs.map +1 -1
- package/dist/tabs/index.d.mts +13 -0
- package/dist/tabs/index.js +1 -1
- package/dist/tabs/index.js.map +1 -1
- package/dist/tabs/index.mjs +179 -329
- package/dist/tabs/index.mjs.map +1 -1
- package/dist/tag/index.d.mts +1 -0
- package/dist/tag/index.js +1 -1
- package/dist/tag/index.js.map +1 -1
- package/dist/tag/index.mjs +2 -2
- package/dist/tag/variants/index.d.mts +3 -0
- package/dist/text-link/index.d.mts +1 -0
- package/dist/text-link/index.js +1 -1
- package/dist/text-link/index.mjs +1 -1
- package/dist/textarea/index.d.mts +14 -0
- package/dist/textarea/index.js +1 -1
- package/dist/textarea/index.js.map +1 -1
- package/dist/textarea/index.mjs +6 -6
- package/dist/toast/index.d.mts +20 -0
- package/dist/toast/index.js +1 -1
- package/dist/toast/index.js.map +1 -1
- package/dist/toast/index.mjs +146 -1008
- package/dist/toast/index.mjs.map +1 -1
- package/dist/useRenderSlot-DATwjgpo.js +2 -0
- package/dist/useRenderSlot-DATwjgpo.js.map +1 -0
- package/dist/useRenderSlot-LwWj8QbC.mjs +10 -0
- package/dist/useRenderSlot-LwWj8QbC.mjs.map +1 -0
- package/dist/visually-hidden/index.d.mts +1 -0
- package/dist/visually-hidden/index.js +1 -1
- package/dist/visually-hidden/index.mjs +1 -1
- package/package.json +7 -6
- package/dist/Button-C3xHNaGl.js +0 -2
- package/dist/DialogContent.styles-BrhKaHc_.js +0 -2
- package/dist/DialogContent.styles-BrhKaHc_.js.map +0 -1
- package/dist/DialogContent.styles-WGWJS9dj.mjs +0 -48
- package/dist/DialogContent.styles-WGWJS9dj.mjs.map +0 -1
- package/dist/Icon-Bf0XrmiR.js +0 -2
- package/dist/IconButton-Bf-EDzpI.js +0 -2
- package/dist/Slot-C98rL4yy.mjs +0 -14
- package/dist/Slot-ghrohQLA.js +0 -2
- package/dist/Spinner-DK8VEsaR.js +0 -2
- package/dist/TextLink-DD0VO37q.js +0 -2
- package/dist/composite-Br3kM5N9.mjs +0 -40
- package/dist/composite-Br3kM5N9.mjs.map +0 -1
- package/dist/composite-fJD9R7R0.js +0 -2
- package/dist/composite-fJD9R7R0.js.map +0 -1
- package/dist/detectBrowser-Bc7rk5fI.mjs +0 -44
- package/dist/detectBrowser-Bc7rk5fI.mjs.map +0 -1
- package/dist/detectBrowser-DTbs_30X.js +0 -2
- package/dist/detectBrowser-DTbs_30X.js.map +0 -1
- package/dist/downshift.esm-Ncwetv0s.mjs +0 -3038
- package/dist/downshift.esm-Ncwetv0s.mjs.map +0 -1
- package/dist/downshift.esm-PfCOUbxq.js +0 -37
- package/dist/downshift.esm-PfCOUbxq.js.map +0 -1
- package/dist/floating-ui.utils.dom-CCN4I08l.js +0 -2
- package/dist/floating-ui.utils.dom-CCN4I08l.js.map +0 -1
- package/dist/floating-ui.utils.dom-uiDUZc_y.mjs +0 -136
- package/dist/floating-ui.utils.dom-uiDUZc_y.mjs.map +0 -1
- package/dist/index-0KYGKeVg.js +0 -2
- package/dist/index-0KYGKeVg.js.map +0 -1
- package/dist/index-1WIgmEZh.js +0 -2
- package/dist/index-1WIgmEZh.js.map +0 -1
- package/dist/index-BRi38DTc.mjs +0 -21
- package/dist/index-BRi38DTc.mjs.map +0 -1
- package/dist/index-BZAtNKwE.mjs +0 -71
- package/dist/index-BZAtNKwE.mjs.map +0 -1
- package/dist/index-BZPx6jYI.mjs +0 -9
- package/dist/index-BZPx6jYI.mjs.map +0 -1
- package/dist/index-BlkdpEIe.mjs +0 -55
- package/dist/index-BlkdpEIe.mjs.map +0 -1
- package/dist/index-BmAFn37q.mjs +0 -49
- package/dist/index-BmAFn37q.mjs.map +0 -1
- package/dist/index-C-J_tHdS.js +0 -6
- package/dist/index-C-J_tHdS.js.map +0 -1
- package/dist/index-C1qb0595.mjs +0 -28
- package/dist/index-C1qb0595.mjs.map +0 -1
- package/dist/index-C34GgsKQ.mjs +0 -54
- package/dist/index-C34GgsKQ.mjs.map +0 -1
- package/dist/index-CCKe-Mpx.mjs +0 -7
- package/dist/index-CCKe-Mpx.mjs.map +0 -1
- package/dist/index-CDBBjNXc.js +0 -2
- package/dist/index-CDBBjNXc.js.map +0 -1
- package/dist/index-CYjGhVvU.mjs +0 -243
- package/dist/index-CYjGhVvU.mjs.map +0 -1
- package/dist/index-ChLwd62c.js +0 -2
- package/dist/index-ChLwd62c.js.map +0 -1
- package/dist/index-Cjj_rUPu.js +0 -2
- package/dist/index-Cjj_rUPu.js.map +0 -1
- package/dist/index-CyMbLkj0.js +0 -2
- package/dist/index-CyMbLkj0.js.map +0 -1
- package/dist/index-DFZozV_h.mjs +0 -69
- package/dist/index-DFZozV_h.mjs.map +0 -1
- package/dist/index-DKuHkHFX.js +0 -2
- package/dist/index-DKuHkHFX.js.map +0 -1
- package/dist/index-DLHLIYPI.mjs +0 -16
- package/dist/index-DLHLIYPI.mjs.map +0 -1
- package/dist/index-DO-atGp-.js +0 -2
- package/dist/index-DO-atGp-.js.map +0 -1
- package/dist/index-DWlg8lkk.mjs +0 -179
- package/dist/index-DWlg8lkk.mjs.map +0 -1
- package/dist/index-DYxWvftI.js +0 -2
- package/dist/index-DYxWvftI.js.map +0 -1
- package/dist/index-D_lWkK39.mjs +0 -803
- package/dist/index-D_lWkK39.mjs.map +0 -1
- package/dist/index-DdkVj7D0.js +0 -18
- package/dist/index-DdkVj7D0.js.map +0 -1
- package/dist/index-De-6atSi.js +0 -2
- package/dist/index-De-6atSi.js.map +0 -1
- package/dist/index-DhGWNzsz.mjs +0 -83
- package/dist/index-DhGWNzsz.mjs.map +0 -1
- package/dist/index-Dkj4QRX8.js +0 -2
- package/dist/index-Dkj4QRX8.js.map +0 -1
- package/dist/index-DlIFg0Eu.mjs +0 -60
- package/dist/index-DlIFg0Eu.mjs.map +0 -1
- package/dist/index-DnaHaH_0.js +0 -2
- package/dist/index-DnaHaH_0.js.map +0 -1
- package/dist/index-MHF2-CYX.js +0 -2
- package/dist/index-MHF2-CYX.js.map +0 -1
- package/dist/index-MQ0c3ZX_.js +0 -2
- package/dist/index-MQ0c3ZX_.js.map +0 -1
- package/dist/index-MSR-vgWR.mjs +0 -37
- package/dist/index-MSR-vgWR.mjs.map +0 -1
- package/dist/index-VL0YEmOW.mjs +0 -125
- package/dist/index-VL0YEmOW.mjs.map +0 -1
- package/dist/index-tXqxYME3.js +0 -42
- package/dist/index-tXqxYME3.js.map +0 -1
- package/dist/inertValue-Bif5Sqs6.mjs +0 -522
- package/dist/inertValue-Bif5Sqs6.mjs.map +0 -1
- package/dist/inertValue-ShwihJSN.js +0 -5
- package/dist/inertValue-ShwihJSN.js.map +0 -1
- package/dist/useCollapsiblePanel-D1dCo0lf.js +0 -4
- package/dist/useCollapsiblePanel-D1dCo0lf.js.map +0 -1
- package/dist/useCollapsiblePanel-kbMNl4Z4.mjs +0 -287
- package/dist/useCollapsiblePanel-kbMNl4Z4.mjs.map +0 -1
- package/dist/useFocusWithin-CFNEka2I.js +0 -2
- package/dist/useFocusWithin-CFNEka2I.js.map +0 -1
- package/dist/useFocusWithin-CoL4390f.mjs +0 -796
- package/dist/useFocusWithin-CoL4390f.mjs.map +0 -1
- package/dist/useOpenChangeComplete-Dk-u_f2y.js +0 -2
- package/dist/useOpenChangeComplete-Dk-u_f2y.js.map +0 -1
- package/dist/useOpenChangeComplete-RUbg6RBw.mjs +0 -582
- package/dist/useOpenChangeComplete-RUbg6RBw.mjs.map +0 -1
- package/dist/useTransitionStatus-CktVVKxz.mjs +0 -46
- package/dist/useTransitionStatus-CktVVKxz.mjs.map +0 -1
- package/dist/useTransitionStatus-CqbEyvIj.js +0 -2
- package/dist/useTransitionStatus-CqbEyvIj.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inertValue-Bif5Sqs6.mjs","sources":["../../../node_modules/@base-ui/react/esm/utils/constants.js","../../../node_modules/@base-ui/react/esm/floating-ui-react/utils/constants.js","../../../node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js","../../../node_modules/tabbable/dist/index.esm.js","../../../node_modules/@base-ui/react/esm/floating-ui-react/utils/tabbable.js","../../../node_modules/@base-ui/utils/esm/owner.js","../../../node_modules/@base-ui/utils/esm/useTimeout.js","../../../node_modules/@base-ui/react/esm/floating-ui-react/utils/createAttribute.js","../../../node_modules/@base-ui/utils/esm/visuallyHidden.js","../../../node_modules/@base-ui/react/esm/utils/FocusGuard.js","../../../node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingPortal.js","../../../node_modules/@base-ui/utils/esm/inertValue.js"],"sourcesContent":["export const TYPEAHEAD_RESET_MS = 500;\nexport const PATIENT_CLICK_THRESHOLD = 500;\nexport const DISABLED_TRANSITIONS_STYLE = {\n style: {\n transition: 'none'\n }\n};\nexport { EMPTY_OBJECT, EMPTY_ARRAY } from '@base-ui/utils/empty';\nexport const CLICK_TRIGGER_IDENTIFIER = 'data-base-ui-click-trigger';\n\n/**\n * Used for dropdowns that usually strictly prefer top/bottom placements and\n * use `var(--available-height)` to limit their height.\n */\nexport const DROPDOWN_COLLISION_AVOIDANCE = {\n fallbackAxisSide: 'none'\n};\n\n/**\n * Used by regular popups that usually aren't scrollable and are allowed to\n * freely flip to any axis of placement.\n */\nexport const POPUP_COLLISION_AVOIDANCE = {\n fallbackAxisSide: 'end'\n};\n\n/**\n * Special visually hidden styles for the aria-owns owner element to ensure owned element\n * accessibility in iOS/Safari/VoiceControl.\n * The owner element is an empty span, so most of the common visually hidden styles are not needed.\n * @see https://github.com/floating-ui/floating-ui/issues/3403\n */\nexport const ownerVisuallyHidden = {\n clipPath: 'inset(50%)',\n position: 'fixed',\n top: 0,\n left: 0\n};","export const FOCUSABLE_ATTRIBUTE = 'data-base-ui-focusable';\nexport const ACTIVE_KEY = 'active';\nexport const SELECTED_KEY = 'selected';\nexport const TYPEABLE_SELECTOR = \"input:not([type='hidden']):not([disabled]),\" + \"[contenteditable]:not([contenteditable='false']),textarea:not([disabled])\";\nexport const ARROW_LEFT = 'ArrowLeft';\nexport const ARROW_RIGHT = 'ArrowRight';\nexport const ARROW_UP = 'ArrowUp';\nexport const ARROW_DOWN = 'ArrowDown';","import { isHTMLElement, isShadowRoot } from '@floating-ui/utils/dom';\nimport { isJSDOM } from '@base-ui/utils/detectBrowser';\nimport { FOCUSABLE_ATTRIBUTE, TYPEABLE_SELECTOR } from \"./constants.js\";\nexport function activeElement(doc) {\n let element = doc.activeElement;\n while (element?.shadowRoot?.activeElement != null) {\n element = element.shadowRoot.activeElement;\n }\n return element;\n}\nexport function contains(parent, child) {\n if (!parent || !child) {\n return false;\n }\n const rootNode = child.getRootNode?.();\n\n // First, attempt with faster native method\n if (parent.contains(child)) {\n return true;\n }\n\n // then fallback to custom implementation with Shadow DOM support\n if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n while (next) {\n if (parent === next) {\n return true;\n }\n next = next.parentNode || next.host;\n }\n }\n\n // Give up, the result is false\n return false;\n}\nexport function getTarget(event) {\n if ('composedPath' in event) {\n return event.composedPath()[0];\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support\n // `composedPath()`, but browsers without shadow DOM don't.\n return event.target;\n}\nexport function isEventTargetWithin(event, node) {\n if (node == null) {\n return false;\n }\n if ('composedPath' in event) {\n return event.composedPath().includes(node);\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support composedPath, but browsers without shadow dom don't\n const eventAgain = event;\n return eventAgain.target != null && node.contains(eventAgain.target);\n}\nexport function isRootElement(element) {\n return element.matches('html,body');\n}\nexport function getDocument(node) {\n return node?.ownerDocument || document;\n}\nexport function isTypeableElement(element) {\n return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);\n}\nexport function isTypeableCombobox(element) {\n if (!element) {\n return false;\n }\n return element.getAttribute('role') === 'combobox' && isTypeableElement(element);\n}\nexport function matchesFocusVisible(element) {\n // We don't want to block focus from working with `visibleOnly`\n // (JSDOM doesn't match `:focus-visible` when the element has `:focus`)\n if (!element || isJSDOM) {\n return true;\n }\n try {\n return element.matches(':focus-visible');\n } catch (_e) {\n return true;\n }\n}\nexport function getFloatingFocusElement(floatingElement) {\n if (!floatingElement) {\n return null;\n }\n // Try to find the element that has `{...getFloatingProps()}` spread on it.\n // This indicates the floating element is acting as a positioning wrapper, and\n // so focus should be managed on the child element with the event handlers and\n // aria props.\n return floatingElement.hasAttribute(FOCUSABLE_ATTRIBUTE) ? floatingElement : floatingElement.querySelector(`[${FOCUSABLE_ATTRIBUTE}]`) || floatingElement;\n}","/*!\n* tabbable 6.3.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar _isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && _isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (_isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (_isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = _getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n if (displayCheck === 'full-native') {\n if ('checkVisibility' in node) {\n // Chrome >= 105, Edge >= 105, Firefox >= 106, Safari >= 17.4\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility#browser_compatibility\n var visible = node.checkVisibility({\n // Checking opacity might be desirable for some use cases, but natively,\n // opacity zero elements _are_ focusable and tabbable.\n checkOpacity: false,\n opacityProperty: false,\n contentVisibilityAuto: true,\n visibilityProperty: true,\n // This is an alias for `visibilityProperty`. Contemporary browsers\n // support both. However, this alias has wider browser support (Chrome\n // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so\n // we include it anyway.\n checkVisibilityCSS: true\n });\n return !visible;\n }\n // Fall through to manual visibility checks\n }\n\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' ||\n // full-native can run this branch when it falls through in case\n // Element#checkVisibility is unsupported\n displayCheck === 'full-native' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled ||\n // we must do an inert look up to filter out any elements inside an inert ancestor\n // because we're limited in the type of selectors we can use in JSDom (see related\n // note related to `candidateSelectors`)\n _isInert(node) || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isShadowRootTabbable = function isShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar _sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? _sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = _getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return _sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = _getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","import { tabbable } from 'tabbable';\nimport { activeElement, contains, getDocument } from \"./element.js\";\nexport const getTabbableOptions = () => ({\n getShadowRoot: true,\n displayCheck:\n // JSDOM does not support the `tabbable` library. To solve this we can\n // check if `ResizeObserver` is a real function (not polyfilled), which\n // determines if the current environment is JSDOM-like.\n typeof ResizeObserver === 'function' && ResizeObserver.toString().includes('[native code]') ? 'full' : 'none'\n});\nfunction getTabbableIn(container, dir) {\n const list = tabbable(container, getTabbableOptions());\n const len = list.length;\n if (len === 0) {\n return undefined;\n }\n const active = activeElement(getDocument(container));\n const index = list.indexOf(active);\n // eslint-disable-next-line no-nested-ternary\n const nextIndex = index === -1 ? dir === 1 ? 0 : len - 1 : index + dir;\n return list[nextIndex];\n}\nexport function getNextTabbable(referenceElement) {\n return getTabbableIn(getDocument(referenceElement).body, 1) || referenceElement;\n}\nexport function getPreviousTabbable(referenceElement) {\n return getTabbableIn(getDocument(referenceElement).body, -1) || referenceElement;\n}\nfunction getTabbableNearElement(referenceElement, dir) {\n if (!referenceElement) {\n return null;\n }\n const list = tabbable(getDocument(referenceElement).body, getTabbableOptions());\n const elementCount = list.length;\n if (elementCount === 0) {\n return null;\n }\n const index = list.indexOf(referenceElement);\n if (index === -1) {\n return null;\n }\n const nextIndex = (index + dir + elementCount) % elementCount;\n return list[nextIndex];\n}\nexport function getTabbableAfterElement(referenceElement) {\n return getTabbableNearElement(referenceElement, 1);\n}\nexport function getTabbableBeforeElement(referenceElement) {\n return getTabbableNearElement(referenceElement, -1);\n}\nexport function isOutsideEvent(event, container) {\n const containerElement = container || event.currentTarget;\n const relatedTarget = event.relatedTarget;\n return !relatedTarget || !contains(containerElement, relatedTarget);\n}\nexport function disableFocusInside(container) {\n const tabbableElements = tabbable(container, getTabbableOptions());\n tabbableElements.forEach(element => {\n element.dataset.tabindex = element.getAttribute('tabindex') || '';\n element.setAttribute('tabindex', '-1');\n });\n}\nexport function enableFocusInside(container) {\n const elements = container.querySelectorAll('[data-tabindex]');\n elements.forEach(element => {\n const tabindex = element.dataset.tabindex;\n delete element.dataset.tabindex;\n if (tabindex) {\n element.setAttribute('tabindex', tabindex);\n } else {\n element.removeAttribute('tabindex');\n }\n });\n}","export { getWindow as ownerWindow } from '@floating-ui/utils/dom';\nexport function ownerDocument(node) {\n return node?.ownerDocument || document;\n}","'use client';\n\nimport { useRefWithInit } from \"./useRefWithInit.js\";\nimport { useOnMount } from \"./useOnMount.js\";\nconst EMPTY = 0;\nexport class Timeout {\n static create() {\n return new Timeout();\n }\n currentId = EMPTY;\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = EMPTY;\n fn();\n }, delay); /* Node.js types are enabled in development */\n }\n isStarted() {\n return this.currentId !== EMPTY;\n }\n clear = () => {\n if (this.currentId !== EMPTY) {\n clearTimeout(this.currentId);\n this.currentId = EMPTY;\n }\n };\n disposeEffect = () => {\n return this.clear;\n };\n}\n\n/**\n * A `setTimeout` with automatic cleanup and guard.\n */\nexport function useTimeout() {\n const timeout = useRefWithInit(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","export function createAttribute(name) {\n return `data-base-ui-${name}`;\n}","export const visuallyHidden = {\n clip: 'rect(0 0 0 0)',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n position: 'fixed',\n top: 0,\n left: 0,\n border: 0,\n padding: 0,\n width: 1,\n height: 1,\n margin: -1\n};","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { isSafari } from '@base-ui/utils/detectBrowser';\nimport { visuallyHidden } from '@base-ui/utils/visuallyHidden';\n\n/**\n * @internal\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const FocusGuard = /*#__PURE__*/React.forwardRef(function FocusGuard(props, ref) {\n const [role, setRole] = React.useState();\n useIsoLayoutEffect(() => {\n if (isSafari) {\n // Unlike other screen readers such as NVDA and JAWS, the virtual cursor\n // on VoiceOver does trigger the onFocus event, so we can use the focus\n // trap element. On Safari, only buttons trigger the onFocus event.\n setRole('button');\n }\n }, []);\n const restProps = {\n tabIndex: 0,\n // Role is only for VoiceOver\n role\n };\n return /*#__PURE__*/_jsx(\"span\", {\n ...props,\n ref: ref,\n style: visuallyHidden,\n \"aria-hidden\": role ? undefined : true,\n ...restProps,\n \"data-base-ui-focus-guard\": \"\"\n });\n});\nif (process.env.NODE_ENV !== \"production\") FocusGuard.displayName = \"FocusGuard\";","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { isNode } from '@floating-ui/utils/dom';\nimport { useId } from '@base-ui/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { FocusGuard } from \"../../utils/FocusGuard.js\";\nimport { enableFocusInside, disableFocusInside, getPreviousTabbable, getNextTabbable, isOutsideEvent } from \"../utils.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { EMPTY_OBJECT, ownerVisuallyHidden } from \"../../utils/constants.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PortalContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") PortalContext.displayName = \"PortalContext\";\nexport const usePortalContext = () => React.useContext(PortalContext);\nconst attr = createAttribute('portal');\nexport function useFloatingPortalNode(props = {}) {\n const {\n ref,\n container: containerProp,\n componentProps = EMPTY_OBJECT,\n elementProps,\n elementState\n } = props;\n const uniqueId = useId();\n const portalContext = usePortalContext();\n const parentPortalNode = portalContext?.portalNode;\n const [containerElement, setContainerElement] = React.useState(null);\n const [portalNode, setPortalNode] = React.useState(null);\n const containerRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n // Wait for the container to be resolved if explicitly `null`.\n if (containerProp === null) {\n if (containerRef.current) {\n containerRef.current = null;\n setPortalNode(null);\n setContainerElement(null);\n }\n return;\n }\n\n // React 17 does not use React.useId().\n if (uniqueId == null) {\n return;\n }\n const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;\n if (resolvedContainer == null) {\n if (containerRef.current) {\n containerRef.current = null;\n setPortalNode(null);\n setContainerElement(null);\n }\n return;\n }\n if (containerRef.current !== resolvedContainer) {\n containerRef.current = resolvedContainer;\n setPortalNode(null);\n setContainerElement(resolvedContainer);\n }\n }, [containerProp, parentPortalNode, uniqueId]);\n const portalElement = useRenderElement('div', componentProps, {\n ref: [ref, setPortalNode],\n state: elementState,\n props: [{\n id: uniqueId,\n [attr]: ''\n }, elementProps]\n });\n\n // This `createPortal` call injects `portalElement` into the `container`.\n // Another call inside `FloatingPortal`/`FloatingPortalLite` then injects the children into `portalElement`.\n const portalSubtree = containerElement && portalElement ? /*#__PURE__*/ReactDOM.createPortal(portalElement, containerElement) : null;\n return {\n portalNode,\n portalSubtree\n };\n}\n\n/**\n * Portals the floating element into a given container element — by default,\n * outside of the app root and into the body.\n * This is necessary to ensure the floating element can appear outside any\n * potential parent containers that cause clipping (such as `overflow: hidden`),\n * while retaining its location in the React tree.\n * @see https://floating-ui.com/docs/FloatingPortal\n * @internal\n */\nexport const FloatingPortal = /*#__PURE__*/React.forwardRef(function FloatingPortal(componentProps, forwardedRef) {\n const {\n children,\n container,\n className,\n render,\n renderGuards,\n ...elementProps\n } = componentProps;\n const {\n portalNode,\n portalSubtree\n } = useFloatingPortalNode({\n container,\n ref: forwardedRef,\n componentProps,\n elementProps\n });\n const beforeOutsideRef = React.useRef(null);\n const afterOutsideRef = React.useRef(null);\n const beforeInsideRef = React.useRef(null);\n const afterInsideRef = React.useRef(null);\n const [focusManagerState, setFocusManagerState] = React.useState(null);\n const modal = focusManagerState?.modal;\n const open = focusManagerState?.open;\n const shouldRenderGuards = typeof renderGuards === 'boolean' ? renderGuards : !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;\n\n // https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/TabbablePortal.tsx\n React.useEffect(() => {\n if (!portalNode || modal) {\n return undefined;\n }\n\n // Make sure elements inside the portal element are tabbable only when the\n // portal has already been focused, either by tabbing into a focus trap\n // element outside or using the mouse.\n function onFocus(event) {\n if (portalNode && isOutsideEvent(event)) {\n const focusing = event.type === 'focusin';\n const manageFocus = focusing ? enableFocusInside : disableFocusInside;\n manageFocus(portalNode);\n }\n }\n\n // Listen to the event on the capture phase so they run before the focus\n // trap elements onFocus prop is called.\n portalNode.addEventListener('focusin', onFocus, true);\n portalNode.addEventListener('focusout', onFocus, true);\n return () => {\n portalNode.removeEventListener('focusin', onFocus, true);\n portalNode.removeEventListener('focusout', onFocus, true);\n };\n }, [portalNode, modal]);\n React.useEffect(() => {\n if (!portalNode || open) {\n return;\n }\n enableFocusInside(portalNode);\n }, [open, portalNode]);\n const portalContextValue = React.useMemo(() => ({\n beforeOutsideRef,\n afterOutsideRef,\n beforeInsideRef,\n afterInsideRef,\n portalNode,\n setFocusManagerState\n }), [portalNode]);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [portalSubtree, /*#__PURE__*/_jsxs(PortalContext.Provider, {\n value: portalContextValue,\n children: [shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: beforeOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n beforeInsideRef.current?.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable?.focus();\n }\n }\n }), shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(\"span\", {\n \"aria-owns\": portalNode.id,\n style: ownerVisuallyHidden\n }), portalNode && /*#__PURE__*/ReactDOM.createPortal(children, portalNode), shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: afterOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n afterInsideRef.current?.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable?.focus();\n if (focusManagerState?.closeOnFocusOut) {\n focusManagerState?.onOpenChange(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent));\n }\n }\n }\n })]\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") FloatingPortal.displayName = \"FloatingPortal\";","import { isReactVersionAtLeast } from \"./reactVersion.js\";\nexport function inertValue(value) {\n if (isReactVersionAtLeast(19)) {\n return value;\n }\n // compatibility with React < 19\n return value ? 'true' : undefined;\n}"],"names":["CLICK_TRIGGER_IDENTIFIER","ownerVisuallyHidden","FOCUSABLE_ATTRIBUTE","ACTIVE_KEY","SELECTED_KEY","TYPEABLE_SELECTOR","activeElement","doc","element","contains","parent","child","rootNode","isShadowRoot","next","getTarget","event","isEventTargetWithin","node","eventAgain","isRootElement","getDocument","isTypeableElement","isHTMLElement","isTypeableCombobox","matchesFocusVisible","isJSDOM","getFloatingFocusElement","floatingElement","candidateSelectors","candidateSelector","NoElement","matches","getRootNode","_element$getRootNode","_isInert","lookUp","_node$getAttribute","inertAtt","inert","result","isContentEditable","_node$getAttribute2","attValue","getCandidates","el","includeContainer","filter","candidates","_getCandidatesIteratively","elements","options","elementsToCheck","assigned","content","nestedCandidates","validCandidate","shadowRoot","validShadowRoot","_nestedCandidates","hasTabIndex","getTabIndex","getSortOrderTabIndex","isScope","tabIndex","sortOrderedTabbables","a","b","isInput","isHiddenInput","isDetailsWithSummary","r","getCheckedRadio","nodes","form","i","isTabbableRadio","radioScope","queryRadios","name","radioSet","err","checked","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","attached","_nodeRootHost","_nodeRootHost$ownerDo","_node$ownerDocument","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isZeroArea","_node$getBoundingClie","width","height","isHidden","_ref","displayCheck","getShadowRoot","visible","isDirectSummary","nodeUnderDetails","originalNode","parentElement","isDisabledFromFieldset","parentNode","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isShadowRootTabbable","shadowHostNode","_sortByOrder","regularTabbables","orderedTabbables","item","candidateTabindex","acc","sortable","tabbable","container","focusable","isTabbable","getTabbableOptions","getTabbableIn","dir","list","len","active","index","nextIndex","getNextTabbable","referenceElement","getPreviousTabbable","isOutsideEvent","containerElement","relatedTarget","disableFocusInside","enableFocusInside","tabindex","ownerDocument","EMPTY","Timeout","delay","fn","useTimeout","timeout","useRefWithInit","useOnMount","createAttribute","visuallyHidden","FocusGuard","React","props","ref","role","setRole","useIsoLayoutEffect","isSafari","_jsx","PortalContext","usePortalContext","attr","useFloatingPortalNode","containerProp","componentProps","EMPTY_OBJECT","elementProps","elementState","uniqueId","useId","parentPortalNode","setContainerElement","portalNode","setPortalNode","containerRef","resolvedContainer","isNode","portalElement","useRenderElement","ReactDOM","FloatingPortal","forwardedRef","children","className","render","renderGuards","portalSubtree","beforeOutsideRef","afterOutsideRef","beforeInsideRef","afterInsideRef","focusManagerState","setFocusManagerState","modal","open","shouldRenderGuards","onFocus","portalContextValue","_jsxs","domReference","createChangeEventDetails","REASONS.focusOut","inertValue","value","isReactVersionAtLeast"],"mappings":";;;;;;AAQY,MAACA,KAA2B,8BAwB3BC,KAAsB;AAAA,EACjC,UAAU;AAAA,EACV,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AACR,GCrCaC,IAAsB,0BACtBC,KAAa,UACbC,KAAe,YACfC,KAAoB;ACA1B,SAASC,GAAcC,GAAK;AACjC,MAAIC,IAAUD,EAAI;AAClB,SAAOC,GAAS,YAAY,iBAAiB;AAC3C,IAAAA,IAAUA,EAAQ,WAAW;AAE/B,SAAOA;AACT;AACO,SAASC,GAASC,GAAQC,GAAO;AACtC,MAAI,CAACD,KAAU,CAACC;AACd,WAAO;AAET,QAAMC,IAAWD,EAAM,cAAW;AAGlC,MAAID,EAAO,SAASC,CAAK;AACvB,WAAO;AAIT,MAAIC,KAAYC,GAAaD,CAAQ,GAAG;AACtC,QAAIE,IAAOH;AACX,WAAOG,KAAM;AACX,UAAIJ,MAAWI;AACb,eAAO;AAET,MAAAA,IAAOA,EAAK,cAAcA,EAAK;AAAA,IACjC;AAAA,EACF;AAGA,SAAO;AACT;AACO,SAASC,GAAUC,GAAO;AAC/B,SAAI,kBAAkBA,IACbA,EAAM,aAAY,EAAG,CAAC,IAKxBA,EAAM;AACf;AACO,SAASC,GAAoBD,GAAOE,GAAM;AAC/C,MAAIA,KAA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S,CAAA/K,MAAS;AAChB,cAAIyH,EAAezH,GAAOgK,CAAU;AAClC,YAAAiB,EAAgB,SAAS,MAAK;AAAA,eACzB;AACL,kBAAMU,IAAeR,IAAoBA,EAAkB,eAAe;AAE1E,YADqB3D,GAAoBmE,CAAY,GACvC,MAAK;AAAA,UACrB;AAAA,QACF;AAAA,MACR,CAAO,GAAGJ,KAAsBvB,KAA2Bd,gBAAAA,EAAK,QAAQ;AAAA,QAChE,aAAac,EAAW;AAAA,QACxB,OAAO/K;AAAA,MACf,CAAO,GAAG+K,KAA2B,gBAAAO,EAAS,aAAaG,GAAUV,CAAU,GAAGuB,KAAsBvB,KAA2Bd,gBAAAA,EAAKR,GAAY;AAAA,QAC5I,aAAa;AAAA,QACb,KAAKsC;AAAA,QACL,SAAS,CAAAhL,MAAS;AAChB,cAAIyH,EAAezH,GAAOgK,CAAU;AAClC,YAAAkB,EAAe,SAAS,MAAK;AAAA,eACxB;AACL,kBAAMS,IAAeR,IAAoBA,EAAkB,eAAe;AAE1E,YADqB7D,GAAgBqE,CAAY,GACnC,MAAK,GACfR,GAAmB,mBACrBA,GAAmB,aAAa,IAAOS,GAAyBC,IAAkB7L,EAAM,WAAW,CAAC;AAAA,UAExG;AAAA,QACF;AAAA,MACR,CAAO,CAAC;AAAA,IACR,CAAK,CAAC;AAAA,EACN,CAAG;AACH,CAAC;AACG,QAAQ,IAAI,aAAa,iBAAcwK,GAAe,cAAc;ACjMjE,SAASsB,GAAWC,GAAO;AAChC,SAAIC,GAAsB,EAAE,IACnBD,IAGFA,IAAQ,SAAS;AAC1B;","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11]}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
"use strict";const h=require("./useOpenChangeComplete-Dk-u_f2y.js"),fe=require("react"),be=require("react-dom"),V=require("./floating-ui.utils.dom-CCN4I08l.js"),K=require("./detectBrowser-DTbs_30X.js"),E=require("react/jsx-runtime");function W(r){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const t in r)if(t!=="default"){const n=Object.getOwnPropertyDescriptor(r,t);Object.defineProperty(e,t,n.get?n:{enumerable:!0,get:()=>r[t]})}}return e.default=r,Object.freeze(e)}const l=W(fe),z=W(be),ve="data-base-ui-click-trigger",he={clipPath:"inset(50%)",position:"fixed",top:0,left:0},D="data-base-ui-focusable",ge="active",pe="selected",me="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function J(r){let e=r.activeElement;for(;e?.shadowRoot?.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function Z(r,e){if(!r||!e)return!1;const t=e.getRootNode?.();if(r.contains(e))return!0;if(t&&V.isShadowRoot(t)){let n=e;for(;n;){if(r===n)return!0;n=n.parentNode||n.host}}return!1}function ye(r){return"composedPath"in r?r.composedPath()[0]:r.target}function Ee(r,e){if(e==null)return!1;if("composedPath"in r)return r.composedPath().includes(e);const t=r;return t.target!=null&&e.contains(t.target)}function Te(r){return r.matches("html,body")}function A(r){return r?.ownerDocument||document}function $(r){return V.isHTMLElement(r)&&r.matches(me)}function Se(r){return r?r.getAttribute("role")==="combobox"&&$(r):!1}function Re(r){if(!r||K.isJSDOM)return!0;try{return r.matches(":focus-visible")}catch{return!0}}function Ie(r){return r?r.hasAttribute(D)?r:r.querySelector(`[${D}]`)||r:null}/*!
|
|
2
|
-
* tabbable 6.3.0
|
|
3
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4
|
-
*/var xe=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],w=xe.join(","),H=typeof Element>"u",T=H?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,C=!H&&Element.prototype.getRootNode?function(r){var e;return r==null||(e=r.getRootNode)===null||e===void 0?void 0:e.call(r)}:function(r){return r?.ownerDocument},I=function(e,t){var n;t===void 0&&(t=!0);var a=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),u=a===""||a==="true",o=u||t&&e&&I(e.parentNode);return o},we=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},X=function(e,t,n){if(I(e))return[];var a=Array.prototype.slice.apply(e.querySelectorAll(w));return t&&T.call(e,w)&&a.unshift(e),a=a.filter(n),a},N=function(e,t,n){for(var a=[],u=Array.from(e);u.length;){var o=u.shift();if(!I(o,!1))if(o.tagName==="SLOT"){var s=o.assignedElements(),c=s.length?s:o.children,i=N(c,!0,n);n.flatten?a.push.apply(a,i):a.push({scopeParent:o,candidates:i})}else{var d=T.call(o,w);d&&n.filter(o)&&(t||!e.includes(o))&&a.push(o);var f=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),g=!I(f,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(f&&g){var b=N(f===!0?o.children:f.children,!0,n);n.flatten?a.push.apply(a,b):a.push({scopeParent:o,candidates:b})}else u.unshift.apply(u,o.children)}}return a},Q=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},ee=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||we(e))&&!Q(e)?0:e.tabIndex},Ce=function(e,t){var n=ee(e);return n<0&&t&&!Q(e)?0:n},Ne=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},te=function(e){return e.tagName==="INPUT"},Oe=function(e){return te(e)&&e.type==="hidden"},Ae=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},Fe=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},Pe=function(e){if(!e.name)return!0;var t=e.form||C(e),n=function(s){return t.querySelectorAll('input[type="radio"][name="'+s+'"]')},a;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")a=n(window.CSS.escape(e.name));else try{a=n(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var u=Fe(a,e.form);return!u||u===e},De=function(e){return te(e)&&e.type==="radio"},Le=function(e){return De(e)&&!Pe(e)},Me=function(e){var t,n=e&&C(e),a=(t=n)===null||t===void 0?void 0:t.host,u=!1;if(n&&n!==e){var o,s,c;for(u=!!((o=a)!==null&&o!==void 0&&(s=o.ownerDocument)!==null&&s!==void 0&&s.contains(a)||e!=null&&(c=e.ownerDocument)!==null&&c!==void 0&&c.contains(e));!u&&a;){var i,d,f;n=C(a),a=(i=n)===null||i===void 0?void 0:i.host,u=!!((d=a)!==null&&d!==void 0&&(f=d.ownerDocument)!==null&&f!==void 0&&f.contains(a))}}return u},U=function(e){var t=e.getBoundingClientRect(),n=t.width,a=t.height;return n===0&&a===0},Ve=function(e,t){var n=t.displayCheck,a=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var u=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!u}if(getComputedStyle(e).visibility==="hidden")return!0;var o=T.call(e,"details>summary:first-of-type"),s=o?e.parentElement:e;if(T.call(s,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof a=="function"){for(var c=e;e;){var i=e.parentElement,d=C(e);if(i&&!i.shadowRoot&&a(i)===!0)return U(e);e.assignedSlot?e=e.assignedSlot:!i&&d!==e.ownerDocument?e=d.host:e=i}e=c}if(Me(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return U(e);return!1},_e=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var a=t.children.item(n);if(a.tagName==="LEGEND")return T.call(t,"fieldset[disabled] *")?!0:!a.contains(e)}return!0}t=t.parentElement}return!1},L=function(e,t){return!(t.disabled||I(t)||Oe(t)||Ve(t,e)||Ae(t)||_e(t))},M=function(e,t){return!(Le(t)||ee(t)<0||!L(e,t))},ke=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},re=function(e){var t=[],n=[];return e.forEach(function(a,u){var o=!!a.scopeParent,s=o?a.scopeParent:a,c=Ce(s,o),i=o?re(a.candidates):s;c===0?o?t.push.apply(t,i):t.push(s):n.push({documentOrder:u,tabIndex:c,item:a,isScope:o,content:i})}),n.sort(Ne).reduce(function(a,u){return u.isScope?a.push.apply(a,u.content):a.push(u.content),a},[]).concat(t)},_=function(e,t){t=t||{};var n;return t.getShadowRoot?n=N([e],t.includeContainer,{filter:M.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:ke}):n=X(e,t.includeContainer,M.bind(null,t)),re(n)},qe=function(e,t){t=t||{};var n;return t.getShadowRoot?n=N([e],t.includeContainer,{filter:L.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=X(e,t.includeContainer,L.bind(null,t)),n},je=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return T.call(e,w)===!1?!1:M(t,e)};const k=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function ne(r,e){const t=_(r,k()),n=t.length;if(n===0)return;const a=J(A(r)),u=t.indexOf(a),o=u===-1?e===1?0:n-1:u+e;return t[o]}function ae(r){return ne(A(r).body,1)||r}function ie(r){return ne(A(r).body,-1)||r}function x(r,e){const t=e||r.currentTarget,n=r.relatedTarget;return!n||!Z(t,n)}function Be(r){_(r,k()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function Y(r){r.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}function Ge(r){return r?.ownerDocument||document}const R=0;class F{static create(){return new F}currentId=R;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=R,t()},e)}isStarted(){return this.currentId!==R}clear=()=>{this.currentId!==R&&(clearTimeout(this.currentId),this.currentId=R)};disposeEffect=()=>this.clear}function Ue(){const r=h.useRefWithInit(F.create).current;return h.useOnMount(r.disposeEffect),r}function oe(r){return`data-base-ui-${r}`}const ue={clip:"rect(0 0 0 0)",overflow:"hidden",whiteSpace:"nowrap",position:"fixed",top:0,left:0,border:0,padding:0,width:1,height:1,margin:-1},O=l.forwardRef(function(e,t){const[n,a]=l.useState();h.useIsoLayoutEffect(()=>{K.isSafari&&a("button")},[]);const u={tabIndex:0,role:n};return E.jsx("span",{...e,ref:t,style:ue,"aria-hidden":n?void 0:!0,...u,"data-base-ui-focus-guard":""})});process.env.NODE_ENV!=="production"&&(O.displayName="FocusGuard");const q=l.createContext(null);process.env.NODE_ENV!=="production"&&(q.displayName="PortalContext");const se=()=>l.useContext(q),Ye=oe("portal");function le(r={}){const{ref:e,container:t,componentProps:n=h.EMPTY_OBJECT,elementProps:a,elementState:u}=r,o=h.useId(),c=se()?.portalNode,[i,d]=l.useState(null),[f,g]=l.useState(null),b=l.useRef(null);h.useIsoLayoutEffect(()=>{if(t===null){b.current&&(b.current=null,g(null),d(null));return}if(o==null)return;const m=(t&&(V.isNode(t)?t:t.current))??c??document.body;if(m==null){b.current&&(b.current=null,g(null),d(null));return}b.current!==m&&(b.current=m,g(null),d(m))},[t,c,o]);const S=h.useRenderElement("div",n,{ref:[e,g],state:u,props:[{id:o,[Ye]:""},a]});return{portalNode:f,portalSubtree:i&&S?z.createPortal(S,i):null}}const ce=l.forwardRef(function(e,t){const{children:n,container:a,className:u,render:o,renderGuards:s,...c}=e,{portalNode:i,portalSubtree:d}=le({container:a,ref:t,componentProps:e,elementProps:c}),f=l.useRef(null),g=l.useRef(null),b=l.useRef(null),S=l.useRef(null),[v,m]=l.useState(null),j=v?.modal,B=v?.open,P=typeof s=="boolean"?s:!!v&&!v.modal&&v.open&&!!i;l.useEffect(()=>{if(!i||j)return;function p(y){i&&x(y)&&(y.type==="focusin"?Y:Be)(i)}return i.addEventListener("focusin",p,!0),i.addEventListener("focusout",p,!0),()=>{i.removeEventListener("focusin",p,!0),i.removeEventListener("focusout",p,!0)}},[i,j]),l.useEffect(()=>{!i||B||Y(i)},[B,i]);const de=l.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:g,beforeInsideRef:b,afterInsideRef:S,portalNode:i,setFocusManagerState:m}),[i]);return E.jsxs(l.Fragment,{children:[d,E.jsxs(q.Provider,{value:de,children:[P&&i&&E.jsx(O,{"data-type":"outside",ref:f,onFocus:p=>{if(x(p,i))b.current?.focus();else{const y=v?v.domReference:null;ie(y)?.focus()}}}),P&&i&&E.jsx("span",{"aria-owns":i.id,style:he}),i&&z.createPortal(n,i),P&&i&&E.jsx(O,{"data-type":"outside",ref:g,onFocus:p=>{if(x(p,i))S.current?.focus();else{const y=v?v.domReference:null;ae(y)?.focus(),v?.closeOnFocusOut&&v?.onOpenChange(!1,h.createChangeEventDetails(h.focusOut,p.nativeEvent))}}})]})]})});process.env.NODE_ENV!=="production"&&(ce.displayName="FloatingPortal");function Ke(r){return h.isReactVersionAtLeast(19)?r:r?"true":void 0}exports.ACTIVE_KEY=ge;exports.CLICK_TRIGGER_IDENTIFIER=ve;exports.FOCUSABLE_ATTRIBUTE=D;exports.FloatingPortal=ce;exports.FocusGuard=O;exports.SELECTED_KEY=pe;exports.Timeout=F;exports.activeElement=J;exports.contains=Z;exports.createAttribute=oe;exports.focusable=qe;exports.getDocument=A;exports.getFloatingFocusElement=Ie;exports.getNextTabbable=ae;exports.getPreviousTabbable=ie;exports.getTabbableOptions=k;exports.getTarget=ye;exports.inertValue=Ke;exports.isEventTargetWithin=Ee;exports.isOutsideEvent=x;exports.isRootElement=Te;exports.isTabbable=je;exports.isTypeableCombobox=Se;exports.isTypeableElement=$;exports.matchesFocusVisible=Re;exports.ownerDocument=Ge;exports.tabbable=_;exports.useFloatingPortalNode=le;exports.usePortalContext=se;exports.useTimeout=Ue;exports.visuallyHidden=ue;
|
|
5
|
-
//# sourceMappingURL=inertValue-ShwihJSN.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"inertValue-ShwihJSN.js","sources":["../../../node_modules/@base-ui/react/esm/utils/constants.js","../../../node_modules/@base-ui/react/esm/floating-ui-react/utils/constants.js","../../../node_modules/@base-ui/react/esm/floating-ui-react/utils/element.js","../../../node_modules/tabbable/dist/index.esm.js","../../../node_modules/@base-ui/react/esm/floating-ui-react/utils/tabbable.js","../../../node_modules/@base-ui/utils/esm/owner.js","../../../node_modules/@base-ui/utils/esm/useTimeout.js","../../../node_modules/@base-ui/react/esm/floating-ui-react/utils/createAttribute.js","../../../node_modules/@base-ui/utils/esm/visuallyHidden.js","../../../node_modules/@base-ui/react/esm/utils/FocusGuard.js","../../../node_modules/@base-ui/react/esm/floating-ui-react/components/FloatingPortal.js","../../../node_modules/@base-ui/utils/esm/inertValue.js"],"sourcesContent":["export const TYPEAHEAD_RESET_MS = 500;\nexport const PATIENT_CLICK_THRESHOLD = 500;\nexport const DISABLED_TRANSITIONS_STYLE = {\n style: {\n transition: 'none'\n }\n};\nexport { EMPTY_OBJECT, EMPTY_ARRAY } from '@base-ui/utils/empty';\nexport const CLICK_TRIGGER_IDENTIFIER = 'data-base-ui-click-trigger';\n\n/**\n * Used for dropdowns that usually strictly prefer top/bottom placements and\n * use `var(--available-height)` to limit their height.\n */\nexport const DROPDOWN_COLLISION_AVOIDANCE = {\n fallbackAxisSide: 'none'\n};\n\n/**\n * Used by regular popups that usually aren't scrollable and are allowed to\n * freely flip to any axis of placement.\n */\nexport const POPUP_COLLISION_AVOIDANCE = {\n fallbackAxisSide: 'end'\n};\n\n/**\n * Special visually hidden styles for the aria-owns owner element to ensure owned element\n * accessibility in iOS/Safari/VoiceControl.\n * The owner element is an empty span, so most of the common visually hidden styles are not needed.\n * @see https://github.com/floating-ui/floating-ui/issues/3403\n */\nexport const ownerVisuallyHidden = {\n clipPath: 'inset(50%)',\n position: 'fixed',\n top: 0,\n left: 0\n};","export const FOCUSABLE_ATTRIBUTE = 'data-base-ui-focusable';\nexport const ACTIVE_KEY = 'active';\nexport const SELECTED_KEY = 'selected';\nexport const TYPEABLE_SELECTOR = \"input:not([type='hidden']):not([disabled]),\" + \"[contenteditable]:not([contenteditable='false']),textarea:not([disabled])\";\nexport const ARROW_LEFT = 'ArrowLeft';\nexport const ARROW_RIGHT = 'ArrowRight';\nexport const ARROW_UP = 'ArrowUp';\nexport const ARROW_DOWN = 'ArrowDown';","import { isHTMLElement, isShadowRoot } from '@floating-ui/utils/dom';\nimport { isJSDOM } from '@base-ui/utils/detectBrowser';\nimport { FOCUSABLE_ATTRIBUTE, TYPEABLE_SELECTOR } from \"./constants.js\";\nexport function activeElement(doc) {\n let element = doc.activeElement;\n while (element?.shadowRoot?.activeElement != null) {\n element = element.shadowRoot.activeElement;\n }\n return element;\n}\nexport function contains(parent, child) {\n if (!parent || !child) {\n return false;\n }\n const rootNode = child.getRootNode?.();\n\n // First, attempt with faster native method\n if (parent.contains(child)) {\n return true;\n }\n\n // then fallback to custom implementation with Shadow DOM support\n if (rootNode && isShadowRoot(rootNode)) {\n let next = child;\n while (next) {\n if (parent === next) {\n return true;\n }\n next = next.parentNode || next.host;\n }\n }\n\n // Give up, the result is false\n return false;\n}\nexport function getTarget(event) {\n if ('composedPath' in event) {\n return event.composedPath()[0];\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support\n // `composedPath()`, but browsers without shadow DOM don't.\n return event.target;\n}\nexport function isEventTargetWithin(event, node) {\n if (node == null) {\n return false;\n }\n if ('composedPath' in event) {\n return event.composedPath().includes(node);\n }\n\n // TS thinks `event` is of type never as it assumes all browsers support composedPath, but browsers without shadow dom don't\n const eventAgain = event;\n return eventAgain.target != null && node.contains(eventAgain.target);\n}\nexport function isRootElement(element) {\n return element.matches('html,body');\n}\nexport function getDocument(node) {\n return node?.ownerDocument || document;\n}\nexport function isTypeableElement(element) {\n return isHTMLElement(element) && element.matches(TYPEABLE_SELECTOR);\n}\nexport function isTypeableCombobox(element) {\n if (!element) {\n return false;\n }\n return element.getAttribute('role') === 'combobox' && isTypeableElement(element);\n}\nexport function matchesFocusVisible(element) {\n // We don't want to block focus from working with `visibleOnly`\n // (JSDOM doesn't match `:focus-visible` when the element has `:focus`)\n if (!element || isJSDOM) {\n return true;\n }\n try {\n return element.matches(':focus-visible');\n } catch (_e) {\n return true;\n }\n}\nexport function getFloatingFocusElement(floatingElement) {\n if (!floatingElement) {\n return null;\n }\n // Try to find the element that has `{...getFloatingProps()}` spread on it.\n // This indicates the floating element is acting as a positioning wrapper, and\n // so focus should be managed on the child element with the event handlers and\n // aria props.\n return floatingElement.hasAttribute(FOCUSABLE_ATTRIBUTE) ? floatingElement : floatingElement.querySelector(`[${FOCUSABLE_ATTRIBUTE}]`) || floatingElement;\n}","/*!\n* tabbable 6.3.0\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\n// NOTE: separate `:not()` selectors has broader browser support than the newer\n// `:not([inert], [inert] *)` (Feb 2023)\n// CAREFUL: JSDom does not support `:not([inert] *)` as a selector; using it causes\n// the entire query to fail, resulting in no nodes found, which will break a lot\n// of things... so we have to rely on JS to identify nodes inside an inert container\nvar candidateSelectors = ['input:not([inert])', 'select:not([inert])', 'textarea:not([inert])', 'a[href]:not([inert])', 'button:not([inert])', '[tabindex]:not(slot):not([inert])', 'audio[controls]:not([inert])', 'video[controls]:not([inert])', '[contenteditable]:not([contenteditable=\"false\"]):not([inert])', 'details>summary:first-of-type:not([inert])', 'details:not([inert])'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar NoElement = typeof Element === 'undefined';\nvar matches = NoElement ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\nvar getRootNode = !NoElement && Element.prototype.getRootNode ? function (element) {\n var _element$getRootNode;\n return element === null || element === void 0 ? void 0 : (_element$getRootNode = element.getRootNode) === null || _element$getRootNode === void 0 ? void 0 : _element$getRootNode.call(element);\n} : function (element) {\n return element === null || element === void 0 ? void 0 : element.ownerDocument;\n};\n\n/**\n * Determines if a node is inert or in an inert ancestor.\n * @param {Element} [node]\n * @param {boolean} [lookUp] If true and `node` is not inert, looks up at ancestors to\n * see if any of them are inert. If false, only `node` itself is considered.\n * @returns {boolean} True if inert itself or by way of being in an inert ancestor.\n * False if `node` is falsy.\n */\nvar _isInert = function isInert(node, lookUp) {\n var _node$getAttribute;\n if (lookUp === void 0) {\n lookUp = true;\n }\n // CAREFUL: JSDom does not support inert at all, so we can't use the `HTMLElement.inert`\n // JS API property; we have to check the attribute, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's an active element\n var inertAtt = node === null || node === void 0 ? void 0 : (_node$getAttribute = node.getAttribute) === null || _node$getAttribute === void 0 ? void 0 : _node$getAttribute.call(node, 'inert');\n var inert = inertAtt === '' || inertAtt === 'true';\n\n // NOTE: this could also be handled with `node.matches('[inert], :is([inert] *)')`\n // if it weren't for `matches()` not being a function on shadow roots; the following\n // code works for any kind of node\n // CAREFUL: JSDom does not appear to support certain selectors like `:not([inert] *)`\n // so it likely would not support `:is([inert] *)` either...\n var result = inert || lookUp && node && _isInert(node.parentNode); // recursive\n\n return result;\n};\n\n/**\n * Determines if a node's content is editable.\n * @param {Element} [node]\n * @returns True if it's content-editable; false if it's not or `node` is falsy.\n */\nvar isContentEditable = function isContentEditable(node) {\n var _node$getAttribute2;\n // CAREFUL: JSDom does not support the `HTMLElement.isContentEditable` API so we have\n // to use the attribute directly to check for this, which can either be empty or 'true';\n // if it's `null` (not specified) or 'false', it's a non-editable element\n var attValue = node === null || node === void 0 ? void 0 : (_node$getAttribute2 = node.getAttribute) === null || _node$getAttribute2 === void 0 ? void 0 : _node$getAttribute2.call(node, 'contenteditable');\n return attValue === '' || attValue === 'true';\n};\n\n/**\n * @param {Element} el container to check in\n * @param {boolean} includeContainer add container to check\n * @param {(node: Element) => boolean} filter filter candidates\n * @returns {Element[]}\n */\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n // even if `includeContainer=false`, we still have to check it for inertness because\n // if it's inert, all its children are inert\n if (_isInert(el)) {\n return [];\n }\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n candidates = candidates.filter(filter);\n return candidates;\n};\n\n/**\n * @callback GetShadowRoot\n * @param {Element} element to check for shadow root\n * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.\n */\n\n/**\n * @callback ShadowRootFilter\n * @param {Element} shadowHostNode the element which contains shadow content\n * @returns {boolean} true if a shadow root could potentially contain valid candidates.\n */\n\n/**\n * @typedef {Object} CandidateScope\n * @property {Element} scopeParent contains inner candidates\n * @property {Element[]} candidates list of candidates found in the scope parent\n */\n\n/**\n * @typedef {Object} IterativeOptions\n * @property {GetShadowRoot|boolean} getShadowRoot true if shadow support is enabled; falsy if not;\n * if a function, implies shadow support is enabled and either returns the shadow root of an element\n * or a boolean stating if it has an undisclosed shadow root\n * @property {(node: Element) => boolean} filter filter candidates\n * @property {boolean} flatten if true then result will flatten any CandidateScope into the returned list\n * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;\n */\n\n/**\n * @param {Element[]} elements list of element containers to match candidates from\n * @param {boolean} includeContainer add container list to check\n * @param {IterativeOptions} options\n * @returns {Array.<Element|CandidateScope>}\n */\nvar _getCandidatesIteratively = function getCandidatesIteratively(elements, includeContainer, options) {\n var candidates = [];\n var elementsToCheck = Array.from(elements);\n while (elementsToCheck.length) {\n var element = elementsToCheck.shift();\n if (_isInert(element, false)) {\n // no need to look up since we're drilling down\n // anything inside this container will also be inert\n continue;\n }\n if (element.tagName === 'SLOT') {\n // add shadow dom slot scope (slot itself cannot be focusable)\n var assigned = element.assignedElements();\n var content = assigned.length ? assigned : element.children;\n var nestedCandidates = _getCandidatesIteratively(content, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: nestedCandidates\n });\n }\n } else {\n // check candidate element\n var validCandidate = matches.call(element, candidateSelector);\n if (validCandidate && options.filter(element) && (includeContainer || !elements.includes(element))) {\n candidates.push(element);\n }\n\n // iterate over shadow content if possible\n var shadowRoot = element.shadowRoot ||\n // check for an undisclosed shadow\n typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);\n\n // no inert look up because we're already drilling down and checking for inertness\n // on the way down, so all containers to this root node should have already been\n // vetted as non-inert\n var validShadowRoot = !_isInert(shadowRoot, false) && (!options.shadowRootFilter || options.shadowRootFilter(element));\n if (shadowRoot && validShadowRoot) {\n // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed\n // shadow exists, so look at light dom children as fallback BUT create a scope for any\n // child candidates found because they're likely slotted elements (elements that are\n // children of the web component element (which has the shadow), in the light dom, but\n // slotted somewhere _inside_ the undisclosed shadow) -- the scope is created below,\n // _after_ we return from this recursive call\n var _nestedCandidates = _getCandidatesIteratively(shadowRoot === true ? element.children : shadowRoot.children, true, options);\n if (options.flatten) {\n candidates.push.apply(candidates, _nestedCandidates);\n } else {\n candidates.push({\n scopeParent: element,\n candidates: _nestedCandidates\n });\n }\n } else {\n // there's not shadow so just dig into the element's (light dom) children\n // __without__ giving the element special scope treatment\n elementsToCheck.unshift.apply(elementsToCheck, element.children);\n }\n }\n }\n return candidates;\n};\n\n/**\n * @private\n * Determines if the node has an explicitly specified `tabindex` attribute.\n * @param {HTMLElement} node\n * @returns {boolean} True if so; false if not.\n */\nvar hasTabIndex = function hasTabIndex(node) {\n return !isNaN(parseInt(node.getAttribute('tabindex'), 10));\n};\n\n/**\n * Determine the tab index of a given node.\n * @param {HTMLElement} node\n * @returns {number} Tab order (negative, 0, or positive number).\n * @throws {Error} If `node` is falsy.\n */\nvar getTabIndex = function getTabIndex(node) {\n if (!node) {\n throw new Error('No node provided');\n }\n if (node.tabIndex < 0) {\n // in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default\n // `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,\n // yet they are still part of the regular tab order; in FF, they get a default\n // `tabIndex` of 0; since Chrome still puts those elements in the regular tab\n // order, consider their tab index to be 0.\n // Also browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {\n return 0;\n }\n }\n return node.tabIndex;\n};\n\n/**\n * Determine the tab index of a given node __for sort order purposes__.\n * @param {HTMLElement} node\n * @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,\n * has tabIndex -1, but needs to be sorted by document order in order for its content to be\n * inserted into the correct sort position.\n * @returns {number} Tab order (negative, 0, or positive number).\n */\nvar getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {\n var tabIndex = getTabIndex(node);\n if (tabIndex < 0 && isScope && !hasTabIndex(node)) {\n return 0;\n }\n return tabIndex;\n};\nvar sortOrderedTabbables = function sortOrderedTabbables(a, b) {\n return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;\n};\nvar isInput = function isInput(node) {\n return node.tagName === 'INPUT';\n};\nvar isHiddenInput = function isHiddenInput(node) {\n return isInput(node) && node.type === 'hidden';\n};\nvar isDetailsWithSummary = function isDetailsWithSummary(node) {\n var r = node.tagName === 'DETAILS' && Array.prototype.slice.apply(node.children).some(function (child) {\n return child.tagName === 'SUMMARY';\n });\n return r;\n};\nvar getCheckedRadio = function getCheckedRadio(nodes, form) {\n for (var i = 0; i < nodes.length; i++) {\n if (nodes[i].checked && nodes[i].form === form) {\n return nodes[i];\n }\n }\n};\nvar isTabbableRadio = function isTabbableRadio(node) {\n if (!node.name) {\n return true;\n }\n var radioScope = node.form || getRootNode(node);\n var queryRadios = function queryRadios(name) {\n return radioScope.querySelectorAll('input[type=\"radio\"][name=\"' + name + '\"]');\n };\n var radioSet;\n if (typeof window !== 'undefined' && typeof window.CSS !== 'undefined' && typeof window.CSS.escape === 'function') {\n radioSet = queryRadios(window.CSS.escape(node.name));\n } else {\n try {\n radioSet = queryRadios(node.name);\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error('Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s', err.message);\n return false;\n }\n }\n var checked = getCheckedRadio(radioSet, node.form);\n return !checked || checked === node;\n};\nvar isRadio = function isRadio(node) {\n return isInput(node) && node.type === 'radio';\n};\nvar isNonTabbableRadio = function isNonTabbableRadio(node) {\n return isRadio(node) && !isTabbableRadio(node);\n};\n\n// determines if a node is ultimately attached to the window's document\nvar isNodeAttached = function isNodeAttached(node) {\n var _nodeRoot;\n // The root node is the shadow root if the node is in a shadow DOM; some document otherwise\n // (but NOT _the_ document; see second 'If' comment below for more).\n // If rootNode is shadow root, it'll have a host, which is the element to which the shadow\n // is attached, and the one we need to check if it's in the document or not (because the\n // shadow, and all nodes it contains, is never considered in the document since shadows\n // behave like self-contained DOMs; but if the shadow's HOST, which is part of the document,\n // is hidden, or is not in the document itself but is detached, it will affect the shadow's\n // visibility, including all the nodes it contains). The host could be any normal node,\n // or a custom element (i.e. web component). Either way, that's the one that is considered\n // part of the document, not the shadow root, nor any of its children (i.e. the node being\n // tested).\n // To further complicate things, we have to look all the way up until we find a shadow HOST\n // that is attached (or find none) because the node might be in nested shadows...\n // If rootNode is not a shadow root, it won't have a host, and so rootNode should be the\n // document (per the docs) and while it's a Document-type object, that document does not\n // appear to be the same as the node's `ownerDocument` for some reason, so it's safer\n // to ignore the rootNode at this point, and use `node.ownerDocument`. Otherwise,\n // using `rootNode.contains(node)` will _always_ be true we'll get false-positives when\n // node is actually detached.\n // NOTE: If `nodeRootHost` or `node` happens to be the `document` itself (which is possible\n // if a tabbable/focusable node was quickly added to the DOM, focused, and then removed\n // from the DOM as in https://github.com/focus-trap/focus-trap-react/issues/905), then\n // `ownerDocument` will be `null`, hence the optional chaining on it.\n var nodeRoot = node && getRootNode(node);\n var nodeRootHost = (_nodeRoot = nodeRoot) === null || _nodeRoot === void 0 ? void 0 : _nodeRoot.host;\n\n // in some cases, a detached node will return itself as the root instead of a document or\n // shadow root object, in which case, we shouldn't try to look further up the host chain\n var attached = false;\n if (nodeRoot && nodeRoot !== node) {\n var _nodeRootHost, _nodeRootHost$ownerDo, _node$ownerDocument;\n attached = !!((_nodeRootHost = nodeRootHost) !== null && _nodeRootHost !== void 0 && (_nodeRootHost$ownerDo = _nodeRootHost.ownerDocument) !== null && _nodeRootHost$ownerDo !== void 0 && _nodeRootHost$ownerDo.contains(nodeRootHost) || node !== null && node !== void 0 && (_node$ownerDocument = node.ownerDocument) !== null && _node$ownerDocument !== void 0 && _node$ownerDocument.contains(node));\n while (!attached && nodeRootHost) {\n var _nodeRoot2, _nodeRootHost2, _nodeRootHost2$ownerD;\n // since it's not attached and we have a root host, the node MUST be in a nested shadow DOM,\n // which means we need to get the host's host and check if that parent host is contained\n // in (i.e. attached to) the document\n nodeRoot = getRootNode(nodeRootHost);\n nodeRootHost = (_nodeRoot2 = nodeRoot) === null || _nodeRoot2 === void 0 ? void 0 : _nodeRoot2.host;\n attached = !!((_nodeRootHost2 = nodeRootHost) !== null && _nodeRootHost2 !== void 0 && (_nodeRootHost2$ownerD = _nodeRootHost2.ownerDocument) !== null && _nodeRootHost2$ownerD !== void 0 && _nodeRootHost2$ownerD.contains(nodeRootHost));\n }\n }\n return attached;\n};\nvar isZeroArea = function isZeroArea(node) {\n var _node$getBoundingClie = node.getBoundingClientRect(),\n width = _node$getBoundingClie.width,\n height = _node$getBoundingClie.height;\n return width === 0 && height === 0;\n};\nvar isHidden = function isHidden(node, _ref) {\n var displayCheck = _ref.displayCheck,\n getShadowRoot = _ref.getShadowRoot;\n if (displayCheck === 'full-native') {\n if ('checkVisibility' in node) {\n // Chrome >= 105, Edge >= 105, Firefox >= 106, Safari >= 17.4\n // @see https://developer.mozilla.org/en-US/docs/Web/API/Element/checkVisibility#browser_compatibility\n var visible = node.checkVisibility({\n // Checking opacity might be desirable for some use cases, but natively,\n // opacity zero elements _are_ focusable and tabbable.\n checkOpacity: false,\n opacityProperty: false,\n contentVisibilityAuto: true,\n visibilityProperty: true,\n // This is an alias for `visibilityProperty`. Contemporary browsers\n // support both. However, this alias has wider browser support (Chrome\n // >= 105 and Firefox >= 106, vs. Chrome >= 121 and Firefox >= 122), so\n // we include it anyway.\n checkVisibilityCSS: true\n });\n return !visible;\n }\n // Fall through to manual visibility checks\n }\n\n // NOTE: visibility will be `undefined` if node is detached from the document\n // (see notes about this further down), which means we will consider it visible\n // (this is legacy behavior from a very long way back)\n // NOTE: we check this regardless of `displayCheck=\"none\"` because this is a\n // _visibility_ check, not a _display_ check\n if (getComputedStyle(node).visibility === 'hidden') {\n return true;\n }\n var isDirectSummary = matches.call(node, 'details>summary:first-of-type');\n var nodeUnderDetails = isDirectSummary ? node.parentElement : node;\n if (matches.call(nodeUnderDetails, 'details:not([open]) *')) {\n return true;\n }\n if (!displayCheck || displayCheck === 'full' ||\n // full-native can run this branch when it falls through in case\n // Element#checkVisibility is unsupported\n displayCheck === 'full-native' || displayCheck === 'legacy-full') {\n if (typeof getShadowRoot === 'function') {\n // figure out if we should consider the node to be in an undisclosed shadow and use the\n // 'non-zero-area' fallback\n var originalNode = node;\n while (node) {\n var parentElement = node.parentElement;\n var rootNode = getRootNode(node);\n if (parentElement && !parentElement.shadowRoot && getShadowRoot(parentElement) === true // check if there's an undisclosed shadow\n ) {\n // node has an undisclosed shadow which means we can only treat it as a black box, so we\n // fall back to a non-zero-area test\n return isZeroArea(node);\n } else if (node.assignedSlot) {\n // iterate up slot\n node = node.assignedSlot;\n } else if (!parentElement && rootNode !== node.ownerDocument) {\n // cross shadow boundary\n node = rootNode.host;\n } else {\n // iterate up normal dom\n node = parentElement;\n }\n }\n node = originalNode;\n }\n // else, `getShadowRoot` might be true, but all that does is enable shadow DOM support\n // (i.e. it does not also presume that all nodes might have undisclosed shadows); or\n // it might be a falsy value, which means shadow DOM support is disabled\n\n // Since we didn't find it sitting in an undisclosed shadow (or shadows are disabled)\n // now we can just test to see if it would normally be visible or not, provided it's\n // attached to the main document.\n // NOTE: We must consider case where node is inside a shadow DOM and given directly to\n // `isTabbable()` or `isFocusable()` -- regardless of `getShadowRoot` option setting.\n\n if (isNodeAttached(node)) {\n // this works wherever the node is: if there's at least one client rect, it's\n // somehow displayed; it also covers the CSS 'display: contents' case where the\n // node itself is hidden in place of its contents; and there's no need to search\n // up the hierarchy either\n return !node.getClientRects().length;\n }\n\n // Else, the node isn't attached to the document, which means the `getClientRects()`\n // API will __always__ return zero rects (this can happen, for example, if React\n // is used to render nodes onto a detached tree, as confirmed in this thread:\n // https://github.com/facebook/react/issues/9117#issuecomment-284228870)\n //\n // It also means that even window.getComputedStyle(node).display will return `undefined`\n // because styles are only computed for nodes that are in the document.\n //\n // NOTE: THIS HAS BEEN THE CASE FOR YEARS. It is not new, nor is it caused by tabbable\n // somehow. Though it was never stated officially, anyone who has ever used tabbable\n // APIs on nodes in detached containers has actually implicitly used tabbable in what\n // was later (as of v5.2.0 on Apr 9, 2021) called `displayCheck=\"none\"` mode -- essentially\n // considering __everything__ to be visible because of the innability to determine styles.\n //\n // v6.0.0: As of this major release, the default 'full' option __no longer treats detached\n // nodes as visible with the 'none' fallback.__\n if (displayCheck !== 'legacy-full') {\n return true; // hidden\n }\n // else, fallback to 'none' mode and consider the node visible\n } else if (displayCheck === 'non-zero-area') {\n // NOTE: Even though this tests that the node's client rect is non-zero to determine\n // whether it's displayed, and that a detached node will __always__ have a zero-area\n // client rect, we don't special-case for whether the node is attached or not. In\n // this mode, we do want to consider nodes that have a zero area to be hidden at all\n // times, and that includes attached or not.\n return isZeroArea(node);\n }\n\n // visible, as far as we can tell, or per current `displayCheck=none` mode, we assume\n // it's visible\n return false;\n};\n\n// form fields (nested) inside a disabled fieldset are not focusable/tabbable\n// unless they are in the _first_ <legend> element of the top-most disabled\n// fieldset\nvar isDisabledFromFieldset = function isDisabledFromFieldset(node) {\n if (/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(node.tagName)) {\n var parentNode = node.parentElement;\n // check if `node` is contained in a disabled <fieldset>\n while (parentNode) {\n if (parentNode.tagName === 'FIELDSET' && parentNode.disabled) {\n // look for the first <legend> among the children of the disabled <fieldset>\n for (var i = 0; i < parentNode.children.length; i++) {\n var child = parentNode.children.item(i);\n // when the first <legend> (in document order) is found\n if (child.tagName === 'LEGEND') {\n // if its parent <fieldset> is not nested in another disabled <fieldset>,\n // return whether `node` is a descendant of its first <legend>\n return matches.call(parentNode, 'fieldset[disabled] *') ? true : !child.contains(node);\n }\n }\n // the disabled <fieldset> containing `node` has no <legend>\n return true;\n }\n parentNode = parentNode.parentElement;\n }\n }\n\n // else, node's tabbable/focusable state should not be affected by a fieldset's\n // enabled/disabled state\n return false;\n};\nvar isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(options, node) {\n if (node.disabled ||\n // we must do an inert look up to filter out any elements inside an inert ancestor\n // because we're limited in the type of selectors we can use in JSDom (see related\n // note related to `candidateSelectors`)\n _isInert(node) || isHiddenInput(node) || isHidden(node, options) ||\n // For a details element with a summary, the summary element gets the focus\n isDetailsWithSummary(node) || isDisabledFromFieldset(node)) {\n return false;\n }\n return true;\n};\nvar isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {\n if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {\n return false;\n }\n return true;\n};\nvar isShadowRootTabbable = function isShadowRootTabbable(shadowHostNode) {\n var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);\n if (isNaN(tabIndex) || tabIndex >= 0) {\n return true;\n }\n // If a custom element has an explicit negative tabindex,\n // browsers will not allow tab targeting said element's children.\n return false;\n};\n\n/**\n * @param {Array.<Element|CandidateScope>} candidates\n * @returns Element[]\n */\nvar _sortByOrder = function sortByOrder(candidates) {\n var regularTabbables = [];\n var orderedTabbables = [];\n candidates.forEach(function (item, i) {\n var isScope = !!item.scopeParent;\n var element = isScope ? item.scopeParent : item;\n var candidateTabindex = getSortOrderTabIndex(element, isScope);\n var elements = isScope ? _sortByOrder(item.candidates) : element;\n if (candidateTabindex === 0) {\n isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);\n } else {\n orderedTabbables.push({\n documentOrder: i,\n tabIndex: candidateTabindex,\n item: item,\n isScope: isScope,\n content: elements\n });\n }\n });\n return orderedTabbables.sort(sortOrderedTabbables).reduce(function (acc, sortable) {\n sortable.isScope ? acc.push.apply(acc, sortable.content) : acc.push(sortable.content);\n return acc;\n }, []).concat(regularTabbables);\n};\nvar tabbable = function tabbable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = _getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorTabbable.bind(null, options),\n flatten: false,\n getShadowRoot: options.getShadowRoot,\n shadowRootFilter: isShadowRootTabbable\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));\n }\n return _sortByOrder(candidates);\n};\nvar focusable = function focusable(container, options) {\n options = options || {};\n var candidates;\n if (options.getShadowRoot) {\n candidates = _getCandidatesIteratively([container], options.includeContainer, {\n filter: isNodeMatchingSelectorFocusable.bind(null, options),\n flatten: true,\n getShadowRoot: options.getShadowRoot\n });\n } else {\n candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));\n }\n return candidates;\n};\nvar isTabbable = function isTabbable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, candidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorTabbable(options, node);\n};\nvar focusableCandidateSelector = /* #__PURE__ */candidateSelectors.concat('iframe').join(',');\nvar isFocusable = function isFocusable(node, options) {\n options = options || {};\n if (!node) {\n throw new Error('No node provided');\n }\n if (matches.call(node, focusableCandidateSelector) === false) {\n return false;\n }\n return isNodeMatchingSelectorFocusable(options, node);\n};\n\nexport { focusable, getTabIndex, isFocusable, isTabbable, tabbable };\n//# sourceMappingURL=index.esm.js.map\n","import { tabbable } from 'tabbable';\nimport { activeElement, contains, getDocument } from \"./element.js\";\nexport const getTabbableOptions = () => ({\n getShadowRoot: true,\n displayCheck:\n // JSDOM does not support the `tabbable` library. To solve this we can\n // check if `ResizeObserver` is a real function (not polyfilled), which\n // determines if the current environment is JSDOM-like.\n typeof ResizeObserver === 'function' && ResizeObserver.toString().includes('[native code]') ? 'full' : 'none'\n});\nfunction getTabbableIn(container, dir) {\n const list = tabbable(container, getTabbableOptions());\n const len = list.length;\n if (len === 0) {\n return undefined;\n }\n const active = activeElement(getDocument(container));\n const index = list.indexOf(active);\n // eslint-disable-next-line no-nested-ternary\n const nextIndex = index === -1 ? dir === 1 ? 0 : len - 1 : index + dir;\n return list[nextIndex];\n}\nexport function getNextTabbable(referenceElement) {\n return getTabbableIn(getDocument(referenceElement).body, 1) || referenceElement;\n}\nexport function getPreviousTabbable(referenceElement) {\n return getTabbableIn(getDocument(referenceElement).body, -1) || referenceElement;\n}\nfunction getTabbableNearElement(referenceElement, dir) {\n if (!referenceElement) {\n return null;\n }\n const list = tabbable(getDocument(referenceElement).body, getTabbableOptions());\n const elementCount = list.length;\n if (elementCount === 0) {\n return null;\n }\n const index = list.indexOf(referenceElement);\n if (index === -1) {\n return null;\n }\n const nextIndex = (index + dir + elementCount) % elementCount;\n return list[nextIndex];\n}\nexport function getTabbableAfterElement(referenceElement) {\n return getTabbableNearElement(referenceElement, 1);\n}\nexport function getTabbableBeforeElement(referenceElement) {\n return getTabbableNearElement(referenceElement, -1);\n}\nexport function isOutsideEvent(event, container) {\n const containerElement = container || event.currentTarget;\n const relatedTarget = event.relatedTarget;\n return !relatedTarget || !contains(containerElement, relatedTarget);\n}\nexport function disableFocusInside(container) {\n const tabbableElements = tabbable(container, getTabbableOptions());\n tabbableElements.forEach(element => {\n element.dataset.tabindex = element.getAttribute('tabindex') || '';\n element.setAttribute('tabindex', '-1');\n });\n}\nexport function enableFocusInside(container) {\n const elements = container.querySelectorAll('[data-tabindex]');\n elements.forEach(element => {\n const tabindex = element.dataset.tabindex;\n delete element.dataset.tabindex;\n if (tabindex) {\n element.setAttribute('tabindex', tabindex);\n } else {\n element.removeAttribute('tabindex');\n }\n });\n}","export { getWindow as ownerWindow } from '@floating-ui/utils/dom';\nexport function ownerDocument(node) {\n return node?.ownerDocument || document;\n}","'use client';\n\nimport { useRefWithInit } from \"./useRefWithInit.js\";\nimport { useOnMount } from \"./useOnMount.js\";\nconst EMPTY = 0;\nexport class Timeout {\n static create() {\n return new Timeout();\n }\n currentId = EMPTY;\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = EMPTY;\n fn();\n }, delay); /* Node.js types are enabled in development */\n }\n isStarted() {\n return this.currentId !== EMPTY;\n }\n clear = () => {\n if (this.currentId !== EMPTY) {\n clearTimeout(this.currentId);\n this.currentId = EMPTY;\n }\n };\n disposeEffect = () => {\n return this.clear;\n };\n}\n\n/**\n * A `setTimeout` with automatic cleanup and guard.\n */\nexport function useTimeout() {\n const timeout = useRefWithInit(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","export function createAttribute(name) {\n return `data-base-ui-${name}`;\n}","export const visuallyHidden = {\n clip: 'rect(0 0 0 0)',\n overflow: 'hidden',\n whiteSpace: 'nowrap',\n position: 'fixed',\n top: 0,\n left: 0,\n border: 0,\n padding: 0,\n width: 1,\n height: 1,\n margin: -1\n};","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { isSafari } from '@base-ui/utils/detectBrowser';\nimport { visuallyHidden } from '@base-ui/utils/visuallyHidden';\n\n/**\n * @internal\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const FocusGuard = /*#__PURE__*/React.forwardRef(function FocusGuard(props, ref) {\n const [role, setRole] = React.useState();\n useIsoLayoutEffect(() => {\n if (isSafari) {\n // Unlike other screen readers such as NVDA and JAWS, the virtual cursor\n // on VoiceOver does trigger the onFocus event, so we can use the focus\n // trap element. On Safari, only buttons trigger the onFocus event.\n setRole('button');\n }\n }, []);\n const restProps = {\n tabIndex: 0,\n // Role is only for VoiceOver\n role\n };\n return /*#__PURE__*/_jsx(\"span\", {\n ...props,\n ref: ref,\n style: visuallyHidden,\n \"aria-hidden\": role ? undefined : true,\n ...restProps,\n \"data-base-ui-focus-guard\": \"\"\n });\n});\nif (process.env.NODE_ENV !== \"production\") FocusGuard.displayName = \"FocusGuard\";","'use client';\n\nimport * as React from 'react';\nimport * as ReactDOM from 'react-dom';\nimport { isNode } from '@floating-ui/utils/dom';\nimport { useId } from '@base-ui/utils/useId';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { FocusGuard } from \"../../utils/FocusGuard.js\";\nimport { enableFocusInside, disableFocusInside, getPreviousTabbable, getNextTabbable, isOutsideEvent } from \"../utils.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { createAttribute } from \"../utils/createAttribute.js\";\nimport { useRenderElement } from \"../../utils/useRenderElement.js\";\nimport { EMPTY_OBJECT, ownerVisuallyHidden } from \"../../utils/constants.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PortalContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") PortalContext.displayName = \"PortalContext\";\nexport const usePortalContext = () => React.useContext(PortalContext);\nconst attr = createAttribute('portal');\nexport function useFloatingPortalNode(props = {}) {\n const {\n ref,\n container: containerProp,\n componentProps = EMPTY_OBJECT,\n elementProps,\n elementState\n } = props;\n const uniqueId = useId();\n const portalContext = usePortalContext();\n const parentPortalNode = portalContext?.portalNode;\n const [containerElement, setContainerElement] = React.useState(null);\n const [portalNode, setPortalNode] = React.useState(null);\n const containerRef = React.useRef(null);\n useIsoLayoutEffect(() => {\n // Wait for the container to be resolved if explicitly `null`.\n if (containerProp === null) {\n if (containerRef.current) {\n containerRef.current = null;\n setPortalNode(null);\n setContainerElement(null);\n }\n return;\n }\n\n // React 17 does not use React.useId().\n if (uniqueId == null) {\n return;\n }\n const resolvedContainer = (containerProp && (isNode(containerProp) ? containerProp : containerProp.current)) ?? parentPortalNode ?? document.body;\n if (resolvedContainer == null) {\n if (containerRef.current) {\n containerRef.current = null;\n setPortalNode(null);\n setContainerElement(null);\n }\n return;\n }\n if (containerRef.current !== resolvedContainer) {\n containerRef.current = resolvedContainer;\n setPortalNode(null);\n setContainerElement(resolvedContainer);\n }\n }, [containerProp, parentPortalNode, uniqueId]);\n const portalElement = useRenderElement('div', componentProps, {\n ref: [ref, setPortalNode],\n state: elementState,\n props: [{\n id: uniqueId,\n [attr]: ''\n }, elementProps]\n });\n\n // This `createPortal` call injects `portalElement` into the `container`.\n // Another call inside `FloatingPortal`/`FloatingPortalLite` then injects the children into `portalElement`.\n const portalSubtree = containerElement && portalElement ? /*#__PURE__*/ReactDOM.createPortal(portalElement, containerElement) : null;\n return {\n portalNode,\n portalSubtree\n };\n}\n\n/**\n * Portals the floating element into a given container element — by default,\n * outside of the app root and into the body.\n * This is necessary to ensure the floating element can appear outside any\n * potential parent containers that cause clipping (such as `overflow: hidden`),\n * while retaining its location in the React tree.\n * @see https://floating-ui.com/docs/FloatingPortal\n * @internal\n */\nexport const FloatingPortal = /*#__PURE__*/React.forwardRef(function FloatingPortal(componentProps, forwardedRef) {\n const {\n children,\n container,\n className,\n render,\n renderGuards,\n ...elementProps\n } = componentProps;\n const {\n portalNode,\n portalSubtree\n } = useFloatingPortalNode({\n container,\n ref: forwardedRef,\n componentProps,\n elementProps\n });\n const beforeOutsideRef = React.useRef(null);\n const afterOutsideRef = React.useRef(null);\n const beforeInsideRef = React.useRef(null);\n const afterInsideRef = React.useRef(null);\n const [focusManagerState, setFocusManagerState] = React.useState(null);\n const modal = focusManagerState?.modal;\n const open = focusManagerState?.open;\n const shouldRenderGuards = typeof renderGuards === 'boolean' ? renderGuards : !!focusManagerState && !focusManagerState.modal && focusManagerState.open && !!portalNode;\n\n // https://codesandbox.io/s/tabbable-portal-f4tng?file=/src/TabbablePortal.tsx\n React.useEffect(() => {\n if (!portalNode || modal) {\n return undefined;\n }\n\n // Make sure elements inside the portal element are tabbable only when the\n // portal has already been focused, either by tabbing into a focus trap\n // element outside or using the mouse.\n function onFocus(event) {\n if (portalNode && isOutsideEvent(event)) {\n const focusing = event.type === 'focusin';\n const manageFocus = focusing ? enableFocusInside : disableFocusInside;\n manageFocus(portalNode);\n }\n }\n\n // Listen to the event on the capture phase so they run before the focus\n // trap elements onFocus prop is called.\n portalNode.addEventListener('focusin', onFocus, true);\n portalNode.addEventListener('focusout', onFocus, true);\n return () => {\n portalNode.removeEventListener('focusin', onFocus, true);\n portalNode.removeEventListener('focusout', onFocus, true);\n };\n }, [portalNode, modal]);\n React.useEffect(() => {\n if (!portalNode || open) {\n return;\n }\n enableFocusInside(portalNode);\n }, [open, portalNode]);\n const portalContextValue = React.useMemo(() => ({\n beforeOutsideRef,\n afterOutsideRef,\n beforeInsideRef,\n afterInsideRef,\n portalNode,\n setFocusManagerState\n }), [portalNode]);\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [portalSubtree, /*#__PURE__*/_jsxs(PortalContext.Provider, {\n value: portalContextValue,\n children: [shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: beforeOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n beforeInsideRef.current?.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const prevTabbable = getPreviousTabbable(domReference);\n prevTabbable?.focus();\n }\n }\n }), shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(\"span\", {\n \"aria-owns\": portalNode.id,\n style: ownerVisuallyHidden\n }), portalNode && /*#__PURE__*/ReactDOM.createPortal(children, portalNode), shouldRenderGuards && portalNode && /*#__PURE__*/_jsx(FocusGuard, {\n \"data-type\": \"outside\",\n ref: afterOutsideRef,\n onFocus: event => {\n if (isOutsideEvent(event, portalNode)) {\n afterInsideRef.current?.focus();\n } else {\n const domReference = focusManagerState ? focusManagerState.domReference : null;\n const nextTabbable = getNextTabbable(domReference);\n nextTabbable?.focus();\n if (focusManagerState?.closeOnFocusOut) {\n focusManagerState?.onOpenChange(false, createChangeEventDetails(REASONS.focusOut, event.nativeEvent));\n }\n }\n }\n })]\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") FloatingPortal.displayName = \"FloatingPortal\";","import { isReactVersionAtLeast } from \"./reactVersion.js\";\nexport function inertValue(value) {\n if (isReactVersionAtLeast(19)) {\n return value;\n }\n // compatibility with React < 19\n return value ? 'true' : undefined;\n}"],"names":["CLICK_TRIGGER_IDENTIFIER","ownerVisuallyHidden","FOCUSABLE_ATTRIBUTE","ACTIVE_KEY","SELECTED_KEY","TYPEABLE_SELECTOR","activeElement","doc","element","contains","parent","child","rootNode","isShadowRoot","next","getTarget","event","isEventTargetWithin","node","eventAgain","isRootElement","getDocument","isTypeableElement","isHTMLElement","isTypeableCombobox","matchesFocusVisible","isJSDOM","getFloatingFocusElement","floatingElement","candidateSelectors","candidateSelector","NoElement","matches","getRootNode","_element$getRootNode","_isInert","lookUp","_node$getAttribute","inertAtt","inert","result","isContentEditable","_node$getAttribute2","attValue","getCandidates","el","includeContainer","filter","candidates","_getCandidatesIteratively","elements","options","elementsToCheck","assigned","content","nestedCandidates","validCandidate","shadowRoot","validShadowRoot","_nestedCandidates","hasTabIndex","getTabIndex","getSortOrderTabIndex","isScope","tabIndex","sortOrderedTabbables","a","b","isInput","isHiddenInput","isDetailsWithSummary","r","getCheckedRadio","nodes","form","i","isTabbableRadio","radioScope","queryRadios","name","radioSet","err","checked","isRadio","isNonTabbableRadio","isNodeAttached","_nodeRoot","nodeRoot","nodeRootHost","attached","_nodeRootHost","_nodeRootHost$ownerDo","_node$ownerDocument","_nodeRoot2","_nodeRootHost2","_nodeRootHost2$ownerD","isZeroArea","_node$getBoundingClie","width","height","isHidden","_ref","displayCheck","getShadowRoot","visible","isDirectSummary","nodeUnderDetails","originalNode","parentElement","isDisabledFromFieldset","parentNode","isNodeMatchingSelectorFocusable","isNodeMatchingSelectorTabbable","isShadowRootTabbable","shadowHostNode","_sortByOrder","regularTabbables","orderedTabbables","item","candidateTabindex","acc","sortable","tabbable","container","focusable","isTabbable","getTabbableOptions","getTabbableIn","dir","list","len","active","index","nextIndex","getNextTabbable","referenceElement","getPreviousTabbable","isOutsideEvent","containerElement","relatedTarget","disableFocusInside","enableFocusInside","tabindex","ownerDocument","EMPTY","Timeout","delay","fn","useTimeout","timeout","useRefWithInit","useOnMount","createAttribute","visuallyHidden","FocusGuard","React","props","ref","role","setRole","useIsoLayoutEffect","isSafari","restProps","_jsx","PortalContext","usePortalContext","attr","useFloatingPortalNode","containerProp","componentProps","EMPTY_OBJECT","elementProps","elementState","uniqueId","useId","parentPortalNode","setContainerElement","portalNode","setPortalNode","containerRef","resolvedContainer","isNode","portalElement","useRenderElement","ReactDOM","FloatingPortal","forwardedRef","children","className","render","renderGuards","portalSubtree","beforeOutsideRef","afterOutsideRef","beforeInsideRef","afterInsideRef","focusManagerState","setFocusManagerState","modal","open","shouldRenderGuards","onFocus","portalContextValue","_jsxs","domReference","createChangeEventDetails","REASONS.focusOut","inertValue","value","isReactVersion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ACb,IAAKuC,EACL,QAASjL,GAAS,CAChB,GAAIyH,EAAezH,EAAOiK,CAAU,EAClCkB,EAAe,SAAS,MAAK,MACxB,CACL,MAAMS,EAAeR,EAAoBA,EAAkB,aAAe,KACrD9D,GAAgBsE,CAAY,GACnC,MAAK,EACfR,GAAmB,iBACrBA,GAAmB,aAAa,GAAOS,EAAAA,yBAAyBC,EAAAA,SAAkB9L,EAAM,WAAW,CAAC,CAExG,CACF,CACR,CAAO,CAAC,CACR,CAAK,CAAC,CACN,CAAG,CACH,CAAC,EACG,QAAQ,IAAI,WAAa,eAAcyK,GAAe,YAAc,kBCjMjE,SAASsB,GAAWC,EAAO,CAChC,OAAIC,EAAAA,sBAAsB,EAAE,EACnBD,EAGFA,EAAQ,OAAS,MAC1B","x_google_ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11]}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";const k=require("react"),i=require("./useOpenChangeComplete-Dk-u_f2y.js"),H=require("./useTransitionStatus-CqbEyvIj.js");function W(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const b=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(n,r,b.get?b:{enumerable:!0,get:()=>t[r]})}}return n.default=t,Object.freeze(n)}const s=W(k);function U({controlled:t,default:n,name:r,state:b="value"}){const{current:g}=s.useRef(t!==void 0),[S,m]=s.useState(n),C=g?t:S;if(process.env.NODE_ENV!=="production"){s.useEffect(()=>{g!==(t!==void 0)&&console.error([`Base UI: A component is changing the ${g?"":"un"}controlled ${b} state of ${r} to be ${g?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${r} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`
|
|
2
|
-
`))},[b,r,t]);const{current:c}=s.useRef(n);s.useEffect(()=>{!g&&JSON.stringify(c)!==JSON.stringify(n)&&console.error([`Base UI: A component is changing the default ${b} state of an uncontrolled ${r} after being initialized. To suppress this warning opt to use a controlled ${r}.`].join(`
|
|
3
|
-
`))},[JSON.stringify(n)])}const y=s.useCallback(c=>{g||m(c)},[]);return[C,y]}let L;process.env.NODE_ENV!=="production"&&(L=new Set);function $(...t){if(process.env.NODE_ENV!=="production"){const n=t.join(" ");L.has(n)||(L.add(n),console.warn(`Base UI: ${n}`))}}function z(t){const{open:n,defaultOpen:r,onOpenChange:b,disabled:g}=t,S=n!==void 0,[m,C]=U({controlled:n,default:r,name:"Collapsible",state:"open"}),{mounted:y,setMounted:c,transitionStatus:f}=H.useTransitionStatus(m,!0,!0),[l,O]=s.useState(m),[{height:h,width:E},F]=s.useState({height:void 0,width:void 0}),M=H.useBaseUiId(),[I,D]=s.useState(),j=I??M,[N,P]=s.useState(!1),[A,w]=s.useState(!1),x=s.useRef(null),d=s.useRef(null),_=s.useRef(null),R=s.useRef(null),e=i.useAnimationsFinished(R,!1),u=i.useStableCallback(a=>{const o=!m,p=i.createChangeEventDetails(i.triggerPress,a.nativeEvent);if(b(o,p),p.isCanceled)return;const v=R.current;d.current==="css-animation"&&v!=null&&v.style.removeProperty("animation-name"),!N&&!A&&(d.current!=null&&d.current!=="css-animation"&&!y&&o&&c(!0),d.current==="css-animation"&&(!l&&o&&O(!0),!y&&o&&c(!0))),C(o),d.current==="none"&&y&&!o&&c(!1)});return i.useIsoLayoutEffect(()=>{S&&d.current==="none"&&!A&&!m&&c(!1)},[S,A,m,n,c]),s.useMemo(()=>({abortControllerRef:x,animationTypeRef:d,disabled:g,handleTrigger:u,height:h,mounted:y,open:m,panelId:j,panelRef:R,runOnceAnimationsFinish:e,setDimensions:F,setHiddenUntilFound:P,setKeepMounted:w,setMounted:c,setOpen:C,setPanelIdState:D,setVisible:O,transitionDimensionRef:_,transitionStatus:f,visible:l,width:E}),[x,d,g,u,h,y,m,j,R,e,F,P,w,c,C,O,_,f,l,E])}const V=s.createContext(void 0);process.env.NODE_ENV!=="production"&&(V.displayName="CollapsibleRootContext");function K(){const t=s.useContext(V);if(t===void 0)throw new Error(process.env.NODE_ENV!=="production"?"Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.":i.formatErrorMessage(15));return t}let T=(function(t){return t.open="data-open",t.closed="data-closed",t[t.startingStyle=i.TransitionStatusDataAttributes.startingStyle]="startingStyle",t[t.endingStyle=i.TransitionStatusDataAttributes.endingStyle]="endingStyle",t})({}),J=(function(t){return t.panelOpen="data-panel-open",t})({});const G={[T.open]:""},Q={[T.closed]:""},X={open(t){return t?{[J.panelOpen]:""}:null}},Y={open(t){return t?G:Q}};let Z=(function(t){return t.disabled="data-disabled",t.orientation="data-orientation",t})({});function ee(t){const{abortControllerRef:n,animationTypeRef:r,externalRef:b,height:g,hiddenUntilFound:S,keepMounted:m,id:C,mounted:y,onOpenChange:c,open:f,panelRef:l,runOnceAnimationsFinish:O,setDimensions:h,setMounted:E,setOpen:F,setVisible:M,transitionDimensionRef:I,visible:D,width:j}=t,N=s.useRef(!1),P=s.useRef(null),A=s.useRef(f),w=s.useRef(f),x=i.useAnimationFrame(),d=s.useMemo(()=>r.current==="css-animation"?!D:!f&&!y,[f,y,D,r]),_=i.useStableCallback(e=>{if(!e)return;if(r.current==null||I.current==null){const o=getComputedStyle(e),p=o.animationName!=="none"&&o.animationName!=="",v=o.transitionDuration!=="0s"&&o.transitionDuration!=="";p&&v?process.env.NODE_ENV!=="production"&&$("CSS transitions and CSS animations both detected on Collapsible or Accordion panel.","Only one of either animation type should be used."):o.animationName==="none"&&o.transitionDuration!=="0s"?r.current="css-transition":o.animationName!=="none"&&o.transitionDuration==="0s"?r.current="css-animation":r.current="none",e.getAttribute(Z.orientation)==="horizontal"||o.transitionProperty.indexOf("width")>-1?I.current="width":I.current="height"}if(r.current!=="css-transition")return;(g===void 0||j===void 0)&&(h({height:e.scrollHeight,width:e.scrollWidth}),w.current&&e.style.setProperty("transition-duration","0s"));let u=-1,a=-1;return u=i.AnimationFrame.request(()=>{w.current=!1,a=i.AnimationFrame.request(()=>{setTimeout(()=>{e.style.removeProperty("transition-duration")})})}),()=>{i.AnimationFrame.cancel(u),i.AnimationFrame.cancel(a)}}),R=i.useMergedRefs(b,l,_);return i.useIsoLayoutEffect(()=>{if(r.current!=="css-transition")return;const e=l.current;if(!e)return;let u=-1;if(n.current!=null&&(n.current.abort(),n.current=null),f){const a={"justify-content":e.style.justifyContent,"align-items":e.style.alignItems,"align-content":e.style.alignContent,"justify-items":e.style.justifyItems};Object.keys(a).forEach(o=>{e.style.setProperty(o,"initial","important")}),!w.current&&!m&&e.setAttribute(T.startingStyle,""),h({height:e.scrollHeight,width:e.scrollWidth}),u=i.AnimationFrame.request(()=>{Object.entries(a).forEach(([o,p])=>{p===""?e.style.removeProperty(o):e.style.setProperty(o,p)})})}else{if(e.scrollHeight===0&&e.scrollWidth===0)return;h({height:e.scrollHeight,width:e.scrollWidth});const a=new AbortController;n.current=a;const o=a.signal;let p=null;const v=T.endingStyle;return p=new MutationObserver(B=>{B.some(q=>q.type==="attributes"&&q.attributeName===v)&&(p?.disconnect(),p=null,O(()=>{h({height:0,width:0}),e.style.removeProperty("content-visibility"),E(!1),n.current===a&&(n.current=null)},o))}),p.observe(e,{attributes:!0,attributeFilter:[v]}),()=>{p?.disconnect(),x.cancel(),n.current===a&&(a.abort(),n.current=null)}}return()=>{i.AnimationFrame.cancel(u)}},[n,r,x,S,m,y,f,l,O,h,E]),i.useIsoLayoutEffect(()=>{if(r.current!=="css-animation")return;const e=l.current;e&&(P.current=e.style.animationName||P.current,e.style.setProperty("animation-name","none"),h({height:e.scrollHeight,width:e.scrollWidth}),!A.current&&!N.current&&e.style.removeProperty("animation-name"),f?(n.current!=null&&(n.current.abort(),n.current=null),E(!0),M(!0)):(n.current=new AbortController,O(()=>{E(!1),M(!1),n.current=null},n.current.signal)))},[n,r,f,l,O,h,E,M,D]),i.useOnMount(()=>{const e=i.AnimationFrame.request(()=>{A.current=!1});return()=>i.AnimationFrame.cancel(e)}),i.useIsoLayoutEffect(()=>{if(!S)return;const e=l.current;if(!e)return;let u=-1,a=-1;return f&&N.current&&(e.style.transitionDuration="0s",h({height:e.scrollHeight,width:e.scrollWidth}),u=i.AnimationFrame.request(()=>{N.current=!1,a=i.AnimationFrame.request(()=>{setTimeout(()=>{e.style.removeProperty("transition-duration")})})})),()=>{i.AnimationFrame.cancel(u),i.AnimationFrame.cancel(a)}},[S,f,l,h]),i.useIsoLayoutEffect(()=>{const e=l.current;e&&S&&d&&(e.setAttribute("hidden","until-found"),r.current==="css-transition"&&e.setAttribute(T.startingStyle,""))},[S,d,r,l]),s.useEffect(function(){const u=l.current;if(!u)return;function a(o){N.current=!0,F(!0),c(!0,i.createChangeEventDetails(i.none,o))}return u.addEventListener("beforematch",a),()=>{u.removeEventListener("beforematch",a)}},[c,l,F]),s.useMemo(()=>({props:{hidden:d,id:C,ref:R}}),[d,C,R])}exports.CollapsibleRootContext=V;exports.collapsibleOpenStateMapping=Y;exports.triggerOpenStateMapping=X;exports.useCollapsiblePanel=ee;exports.useCollapsibleRoot=z;exports.useCollapsibleRootContext=K;exports.useControlled=U;exports.warn=$;
|
|
4
|
-
//# sourceMappingURL=useCollapsiblePanel-D1dCo0lf.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useCollapsiblePanel-D1dCo0lf.js","sources":["../../../node_modules/@base-ui/utils/esm/useControlled.js","../../../node_modules/@base-ui/utils/esm/warn.js","../../../node_modules/@base-ui/react/esm/collapsible/root/useCollapsibleRoot.js","../../../node_modules/@base-ui/react/esm/collapsible/root/CollapsibleRootContext.js","../../../node_modules/@base-ui/react/esm/collapsible/panel/CollapsiblePanelDataAttributes.js","../../../node_modules/@base-ui/react/esm/collapsible/trigger/CollapsibleTriggerDataAttributes.js","../../../node_modules/@base-ui/react/esm/utils/collapsibleOpenStateMapping.js","../../../node_modules/@base-ui/react/esm/accordion/root/AccordionRootDataAttributes.js","../../../node_modules/@base-ui/react/esm/collapsible/panel/useCollapsiblePanel.js"],"sourcesContent":["'use client';\n\n// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- process.env never changes, dependency arrays are intentionally ignored\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`Base UI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is for more details.\n if (!isControlled && JSON.stringify(defaultValue) !== JSON.stringify(defaultProp)) {\n console.error([`Base UI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","let set;\nif (process.env.NODE_ENV !== 'production') {\n set = new Set();\n}\nexport function warn(...messages) {\n if (process.env.NODE_ENV !== 'production') {\n const messageKey = messages.join(' ');\n if (!set.has(messageKey)) {\n set.add(messageKey);\n console.warn(`Base UI: ${messageKey}`);\n }\n }\n}","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useBaseUiId } from \"../../utils/useBaseUiId.js\";\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { useAnimationsFinished } from \"../../utils/useAnimationsFinished.js\";\nimport { useTransitionStatus } from \"../../utils/useTransitionStatus.js\";\nexport function useCollapsibleRoot(parameters) {\n const {\n open: openParam,\n defaultOpen,\n onOpenChange,\n disabled\n } = parameters;\n const isControlled = openParam !== undefined;\n const [open, setOpen] = useControlled({\n controlled: openParam,\n default: defaultOpen,\n name: 'Collapsible',\n state: 'open'\n });\n const {\n mounted,\n setMounted,\n transitionStatus\n } = useTransitionStatus(open, true, true);\n const [visible, setVisible] = React.useState(open);\n const [{\n height,\n width\n }, setDimensions] = React.useState({\n height: undefined,\n width: undefined\n });\n const defaultPanelId = useBaseUiId();\n const [panelIdState, setPanelIdState] = React.useState();\n const panelId = panelIdState ?? defaultPanelId;\n const [hiddenUntilFound, setHiddenUntilFound] = React.useState(false);\n const [keepMounted, setKeepMounted] = React.useState(false);\n const abortControllerRef = React.useRef(null);\n const animationTypeRef = React.useRef(null);\n const transitionDimensionRef = React.useRef(null);\n const panelRef = React.useRef(null);\n const runOnceAnimationsFinish = useAnimationsFinished(panelRef, false);\n const handleTrigger = useStableCallback(event => {\n const nextOpen = !open;\n const eventDetails = createChangeEventDetails(REASONS.triggerPress, event.nativeEvent);\n onOpenChange(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n const panel = panelRef.current;\n if (animationTypeRef.current === 'css-animation' && panel != null) {\n panel.style.removeProperty('animation-name');\n }\n if (!hiddenUntilFound && !keepMounted) {\n if (animationTypeRef.current != null && animationTypeRef.current !== 'css-animation') {\n if (!mounted && nextOpen) {\n setMounted(true);\n }\n }\n if (animationTypeRef.current === 'css-animation') {\n if (!visible && nextOpen) {\n setVisible(true);\n }\n if (!mounted && nextOpen) {\n setMounted(true);\n }\n }\n }\n setOpen(nextOpen);\n if (animationTypeRef.current === 'none' && mounted && !nextOpen) {\n setMounted(false);\n }\n });\n useIsoLayoutEffect(() => {\n /**\n * Unmount immediately when closing in controlled mode and keepMounted={false}\n * and no CSS animations or transitions are applied\n */\n if (isControlled && animationTypeRef.current === 'none' && !keepMounted && !open) {\n setMounted(false);\n }\n }, [isControlled, keepMounted, open, openParam, setMounted]);\n return React.useMemo(() => ({\n abortControllerRef,\n animationTypeRef,\n disabled,\n handleTrigger,\n height,\n mounted,\n open,\n panelId,\n panelRef,\n runOnceAnimationsFinish,\n setDimensions,\n setHiddenUntilFound,\n setKeepMounted,\n setMounted,\n setOpen,\n setPanelIdState,\n setVisible,\n transitionDimensionRef,\n transitionStatus,\n visible,\n width\n }), [abortControllerRef, animationTypeRef, disabled, handleTrigger, height, mounted, open, panelId, panelRef, runOnceAnimationsFinish, setDimensions, setHiddenUntilFound, setKeepMounted, setMounted, setOpen, setVisible, transitionDimensionRef, transitionStatus, visible, width]);\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const CollapsibleRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") CollapsibleRootContext.displayName = \"CollapsibleRootContext\";\nexport function useCollapsibleRootContext() {\n const context = React.useContext(CollapsibleRootContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: CollapsibleRootContext is missing. Collapsible parts must be placed within <Collapsible.Root>.' : _formatErrorMessage(15));\n }\n return context;\n}","import { TransitionStatusDataAttributes } from \"../../utils/stateAttributesMapping.js\";\nexport let CollapsiblePanelDataAttributes = function (CollapsiblePanelDataAttributes) {\n /**\n * Present when the collapsible panel is open.\n */\n CollapsiblePanelDataAttributes[\"open\"] = \"data-open\";\n /**\n * Present when the collapsible panel is closed.\n */\n CollapsiblePanelDataAttributes[\"closed\"] = \"data-closed\";\n /**\n * Present when the panel is animating in.\n */\n CollapsiblePanelDataAttributes[CollapsiblePanelDataAttributes[\"startingStyle\"] = TransitionStatusDataAttributes.startingStyle] = \"startingStyle\";\n /**\n * Present when the panel is animating out.\n */\n CollapsiblePanelDataAttributes[CollapsiblePanelDataAttributes[\"endingStyle\"] = TransitionStatusDataAttributes.endingStyle] = \"endingStyle\";\n return CollapsiblePanelDataAttributes;\n}({});","export let CollapsibleTriggerDataAttributes = /*#__PURE__*/function (CollapsibleTriggerDataAttributes) {\n /**\n * Present when the collapsible panel is open.\n */\n CollapsibleTriggerDataAttributes[\"panelOpen\"] = \"data-panel-open\";\n return CollapsibleTriggerDataAttributes;\n}({});","import { CollapsiblePanelDataAttributes } from \"../collapsible/panel/CollapsiblePanelDataAttributes.js\";\nimport { CollapsibleTriggerDataAttributes } from \"../collapsible/trigger/CollapsibleTriggerDataAttributes.js\";\nconst PANEL_OPEN_HOOK = {\n [CollapsiblePanelDataAttributes.open]: ''\n};\nconst PANEL_CLOSED_HOOK = {\n [CollapsiblePanelDataAttributes.closed]: ''\n};\nexport const triggerOpenStateMapping = {\n open(value) {\n if (value) {\n return {\n [CollapsibleTriggerDataAttributes.panelOpen]: ''\n };\n }\n return null;\n }\n};\nexport const collapsibleOpenStateMapping = {\n open(value) {\n if (value) {\n return PANEL_OPEN_HOOK;\n }\n return PANEL_CLOSED_HOOK;\n }\n};","export let AccordionRootDataAttributes = /*#__PURE__*/function (AccordionRootDataAttributes) {\n /**\n * Present when the accordion is disabled.\n */\n AccordionRootDataAttributes[\"disabled\"] = \"data-disabled\";\n /**\n * Indicates the orientation of the accordion.\n */\n AccordionRootDataAttributes[\"orientation\"] = \"data-orientation\";\n return AccordionRootDataAttributes;\n}({});","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useOnMount } from '@base-ui/utils/useOnMount';\nimport { AnimationFrame, useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { warn } from '@base-ui/utils/warn';\nimport { createChangeEventDetails } from \"../../utils/createBaseUIEventDetails.js\";\nimport { REASONS } from \"../../utils/reasons.js\";\nimport { CollapsiblePanelDataAttributes } from \"./CollapsiblePanelDataAttributes.js\";\nimport { AccordionRootDataAttributes } from \"../../accordion/root/AccordionRootDataAttributes.js\";\nexport function useCollapsiblePanel(parameters) {\n const {\n abortControllerRef,\n animationTypeRef,\n externalRef,\n height,\n hiddenUntilFound,\n keepMounted,\n id: idParam,\n mounted,\n onOpenChange,\n open,\n panelRef,\n runOnceAnimationsFinish,\n setDimensions,\n setMounted,\n setOpen,\n setVisible,\n transitionDimensionRef,\n visible,\n width\n } = parameters;\n const isBeforeMatchRef = React.useRef(false);\n const latestAnimationNameRef = React.useRef(null);\n const shouldCancelInitialOpenAnimationRef = React.useRef(open);\n const shouldCancelInitialOpenTransitionRef = React.useRef(open);\n const endingStyleFrame = useAnimationFrame();\n\n /**\n * When opening, the `hidden` attribute is removed immediately.\n * When closing, the `hidden` attribute is set after any exit animations runs.\n */\n const hidden = React.useMemo(() => {\n if (animationTypeRef.current === 'css-animation') {\n return !visible;\n }\n return !open && !mounted;\n }, [open, mounted, visible, animationTypeRef]);\n\n /**\n * When `keepMounted` is `true` this runs once as soon as it exists in the DOM\n * regardless of initial open state.\n *\n * When `keepMounted` is `false` this runs on every mount, typically every\n * time it opens. If the panel is in the middle of a close transition that is\n * interrupted and re-opens, this won't run as the panel was not unmounted.\n */\n const handlePanelRef = useStableCallback(element => {\n if (!element) {\n return undefined;\n }\n if (animationTypeRef.current == null || transitionDimensionRef.current == null) {\n const panelStyles = getComputedStyle(element);\n const hasAnimation = panelStyles.animationName !== 'none' && panelStyles.animationName !== '';\n const hasTransition = panelStyles.transitionDuration !== '0s' && panelStyles.transitionDuration !== '';\n\n /**\n * animationTypeRef is safe to read in render because it's only ever set\n * once here during the first render and never again.\n * https://react.dev/learn/referencing-values-with-refs#best-practices-for-refs\n */\n if (hasAnimation && hasTransition) {\n if (process.env.NODE_ENV !== 'production') {\n warn('CSS transitions and CSS animations both detected on Collapsible or Accordion panel.', 'Only one of either animation type should be used.');\n }\n } else if (panelStyles.animationName === 'none' && panelStyles.transitionDuration !== '0s') {\n animationTypeRef.current = 'css-transition';\n } else if (panelStyles.animationName !== 'none' && panelStyles.transitionDuration === '0s') {\n animationTypeRef.current = 'css-animation';\n } else {\n animationTypeRef.current = 'none';\n }\n\n /**\n * We need to know in advance which side is being collapsed when using CSS\n * transitions in order to set the value of width/height to `0px` momentarily.\n * Setting both to `0px` will break layout.\n */\n if (element.getAttribute(AccordionRootDataAttributes.orientation) === 'horizontal' || panelStyles.transitionProperty.indexOf('width') > -1) {\n transitionDimensionRef.current = 'width';\n } else {\n transitionDimensionRef.current = 'height';\n }\n }\n if (animationTypeRef.current !== 'css-transition') {\n return undefined;\n }\n if (height === undefined || width === undefined) {\n setDimensions({\n height: element.scrollHeight,\n width: element.scrollWidth\n });\n if (shouldCancelInitialOpenTransitionRef.current) {\n element.style.setProperty('transition-duration', '0s');\n }\n }\n let frame = -1;\n let nextFrame = -1;\n frame = AnimationFrame.request(() => {\n shouldCancelInitialOpenTransitionRef.current = false;\n nextFrame = AnimationFrame.request(() => {\n /**\n * This is slightly faster than another RAF and is the earliest\n * opportunity to remove the temporary `transition-duration: 0s` that\n * was applied to cancel opening transitions of initially open panels.\n * https://nolanlawson.com/2018/09/25/accurately-measuring-layout-on-the-web/\n */\n setTimeout(() => {\n element.style.removeProperty('transition-duration');\n });\n });\n });\n return () => {\n AnimationFrame.cancel(frame);\n AnimationFrame.cancel(nextFrame);\n };\n });\n const mergedPanelRef = useMergedRefs(externalRef, panelRef, handlePanelRef);\n useIsoLayoutEffect(() => {\n if (animationTypeRef.current !== 'css-transition') {\n return undefined;\n }\n const panel = panelRef.current;\n if (!panel) {\n return undefined;\n }\n let resizeFrame = -1;\n if (abortControllerRef.current != null) {\n abortControllerRef.current.abort();\n abortControllerRef.current = null;\n }\n if (open) {\n const originalLayoutStyles = {\n 'justify-content': panel.style.justifyContent,\n 'align-items': panel.style.alignItems,\n 'align-content': panel.style.alignContent,\n 'justify-items': panel.style.justifyItems\n };\n\n /* opening */\n Object.keys(originalLayoutStyles).forEach(key => {\n panel.style.setProperty(key, 'initial', 'important');\n });\n\n /**\n * When `keepMounted={false}` and the panel is initially closed, the very\n * first time it opens (not any subsequent opens) `data-starting-style` is\n * off or missing by a frame so we need to set it manually. Otherwise any\n * CSS properties expected to transition using [data-starting-style] may\n * be mis-timed and appear to be complete skipped.\n */\n if (!shouldCancelInitialOpenTransitionRef.current && !keepMounted) {\n panel.setAttribute(CollapsiblePanelDataAttributes.startingStyle, '');\n }\n setDimensions({\n height: panel.scrollHeight,\n width: panel.scrollWidth\n });\n resizeFrame = AnimationFrame.request(() => {\n Object.entries(originalLayoutStyles).forEach(([key, value]) => {\n if (value === '') {\n panel.style.removeProperty(key);\n } else {\n panel.style.setProperty(key, value);\n }\n });\n });\n } else {\n if (panel.scrollHeight === 0 && panel.scrollWidth === 0) {\n return undefined;\n }\n\n /* closing */\n setDimensions({\n height: panel.scrollHeight,\n width: panel.scrollWidth\n });\n const abortController = new AbortController();\n abortControllerRef.current = abortController;\n const signal = abortController.signal;\n let attributeObserver = null;\n const endingStyleAttribute = CollapsiblePanelDataAttributes.endingStyle;\n\n // Wait for `[data-ending-style]` to be applied.\n attributeObserver = new MutationObserver(mutationList => {\n const hasEndingStyle = mutationList.some(mutation => mutation.type === 'attributes' && mutation.attributeName === endingStyleAttribute);\n if (hasEndingStyle) {\n attributeObserver?.disconnect();\n attributeObserver = null;\n runOnceAnimationsFinish(() => {\n setDimensions({\n height: 0,\n width: 0\n });\n panel.style.removeProperty('content-visibility');\n setMounted(false);\n if (abortControllerRef.current === abortController) {\n abortControllerRef.current = null;\n }\n }, signal);\n }\n });\n attributeObserver.observe(panel, {\n attributes: true,\n attributeFilter: [endingStyleAttribute]\n });\n return () => {\n attributeObserver?.disconnect();\n endingStyleFrame.cancel();\n if (abortControllerRef.current === abortController) {\n abortController.abort();\n abortControllerRef.current = null;\n }\n };\n }\n return () => {\n AnimationFrame.cancel(resizeFrame);\n };\n }, [abortControllerRef, animationTypeRef, endingStyleFrame, hiddenUntilFound, keepMounted, mounted, open, panelRef, runOnceAnimationsFinish, setDimensions, setMounted]);\n useIsoLayoutEffect(() => {\n if (animationTypeRef.current !== 'css-animation') {\n return;\n }\n const panel = panelRef.current;\n if (!panel) {\n return;\n }\n latestAnimationNameRef.current = panel.style.animationName || latestAnimationNameRef.current;\n panel.style.setProperty('animation-name', 'none');\n setDimensions({\n height: panel.scrollHeight,\n width: panel.scrollWidth\n });\n if (!shouldCancelInitialOpenAnimationRef.current && !isBeforeMatchRef.current) {\n panel.style.removeProperty('animation-name');\n }\n if (open) {\n if (abortControllerRef.current != null) {\n abortControllerRef.current.abort();\n abortControllerRef.current = null;\n }\n setMounted(true);\n setVisible(true);\n } else {\n abortControllerRef.current = new AbortController();\n runOnceAnimationsFinish(() => {\n setMounted(false);\n setVisible(false);\n abortControllerRef.current = null;\n }, abortControllerRef.current.signal);\n }\n }, [abortControllerRef, animationTypeRef, open, panelRef, runOnceAnimationsFinish, setDimensions, setMounted, setVisible, visible]);\n useOnMount(() => {\n const frame = AnimationFrame.request(() => {\n shouldCancelInitialOpenAnimationRef.current = false;\n });\n return () => AnimationFrame.cancel(frame);\n });\n useIsoLayoutEffect(() => {\n if (!hiddenUntilFound) {\n return undefined;\n }\n const panel = panelRef.current;\n if (!panel) {\n return undefined;\n }\n let frame = -1;\n let nextFrame = -1;\n if (open && isBeforeMatchRef.current) {\n panel.style.transitionDuration = '0s';\n setDimensions({\n height: panel.scrollHeight,\n width: panel.scrollWidth\n });\n frame = AnimationFrame.request(() => {\n isBeforeMatchRef.current = false;\n nextFrame = AnimationFrame.request(() => {\n setTimeout(() => {\n panel.style.removeProperty('transition-duration');\n });\n });\n });\n }\n return () => {\n AnimationFrame.cancel(frame);\n AnimationFrame.cancel(nextFrame);\n };\n }, [hiddenUntilFound, open, panelRef, setDimensions]);\n useIsoLayoutEffect(() => {\n const panel = panelRef.current;\n if (panel && hiddenUntilFound && hidden) {\n /**\n * React only supports a boolean for the `hidden` attribute and forces\n * legit string values to booleans so we have to force it back in the DOM\n * when necessary: https://github.com/facebook/react/issues/24740\n */\n panel.setAttribute('hidden', 'until-found');\n /**\n * Set data-starting-style here to persist the closed styles, this is to\n * prevent transitions from starting when the `hidden` attribute changes\n * to `'until-found'` as they could have different `display` properties:\n * https://github.com/tailwindlabs/tailwindcss/pull/14625\n */\n if (animationTypeRef.current === 'css-transition') {\n panel.setAttribute(CollapsiblePanelDataAttributes.startingStyle, '');\n }\n }\n }, [hiddenUntilFound, hidden, animationTypeRef, panelRef]);\n React.useEffect(function registerBeforeMatchListener() {\n const panel = panelRef.current;\n if (!panel) {\n return undefined;\n }\n function handleBeforeMatch(event) {\n isBeforeMatchRef.current = true;\n setOpen(true);\n onOpenChange(true, createChangeEventDetails(REASONS.none, event));\n }\n panel.addEventListener('beforematch', handleBeforeMatch);\n return () => {\n panel.removeEventListener('beforematch', handleBeforeMatch);\n };\n }, [onOpenChange, panelRef, setOpen]);\n return React.useMemo(() => ({\n props: {\n hidden,\n id: idParam,\n ref: mergedPanelRef\n }\n }), [hidden, idParam, mergedPanelRef]);\n}"],"names":["useControlled","controlled","defaultProp","name","state","isControlled","React","valueState","setValue","value","defaultValue","setValueIfUncontrolled","newValue","set","warn","messages","messageKey","useCollapsibleRoot","parameters","openParam","defaultOpen","onOpenChange","disabled","open","setOpen","mounted","setMounted","transitionStatus","useTransitionStatus","visible","setVisible","height","width","setDimensions","defaultPanelId","useBaseUiId","panelIdState","setPanelIdState","panelId","hiddenUntilFound","setHiddenUntilFound","keepMounted","setKeepMounted","abortControllerRef","animationTypeRef","transitionDimensionRef","panelRef","runOnceAnimationsFinish","useAnimationsFinished","handleTrigger","useStableCallback","event","nextOpen","eventDetails","createChangeEventDetails","REASONS.triggerPress","panel","useIsoLayoutEffect","CollapsibleRootContext","useCollapsibleRootContext","context","_formatErrorMessage","CollapsiblePanelDataAttributes","TransitionStatusDataAttributes","CollapsibleTriggerDataAttributes","PANEL_OPEN_HOOK","PANEL_CLOSED_HOOK","triggerOpenStateMapping","collapsibleOpenStateMapping","AccordionRootDataAttributes","useCollapsiblePanel","externalRef","idParam","isBeforeMatchRef","latestAnimationNameRef","shouldCancelInitialOpenAnimationRef","shouldCancelInitialOpenTransitionRef","endingStyleFrame","useAnimationFrame","hidden","handlePanelRef","element","panelStyles","hasAnimation","hasTransition","frame","nextFrame","AnimationFrame","mergedPanelRef","useMergedRefs","resizeFrame","originalLayoutStyles","key","abortController","signal","attributeObserver","endingStyleAttribute","mutationList","mutation","useOnMount","handleBeforeMatch","REASONS.none"],"mappings":"gaAKO,SAASA,EAAc,CAC5B,WAAAC,EACA,QAASC,EACT,KAAAC,EACA,MAAAC,EAAQ,OACV,EAAG,CAED,KAAM,CACJ,QAASC,CACb,EAAMC,EAAM,OAAOL,IAAe,MAAS,EACnC,CAACM,EAAYC,CAAQ,EAAIF,EAAM,SAASJ,CAAW,EACnDO,EAAQJ,EAAeJ,EAAaM,EAC1C,GAAI,QAAQ,IAAI,WAAa,aAAc,CACzCD,EAAM,UAAU,IAAM,CAChBD,KAAkBJ,IAAe,SACnC,QAAQ,MAAM,CAAC,wCAAwCI,EAAe,GAAK,IAAI,cAAcD,CAAK,aAAaD,CAAI,UAAUE,EAAe,KAAO,EAAE,cAAe,8EAA+E,qDAAqDF,CAAI,8CAAoD,6HAA8H,sDAAsD,EAAE,KAAK;AAAA,CAAI,CAAC,CAEpiB,EAAG,CAACC,EAAOD,EAAMF,CAAU,CAAC,EAC5B,KAAM,C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