{"version":3,"file":"AdaptOverlay-DsBkl20d.js","sources":["../../../node_modules/@react-aria/utils/dist/useLayoutEffect.mjs","../../../node_modules/@react-aria/utils/dist/useEffectEvent.mjs","../../../node_modules/@react-aria/ssr/dist/SSRProvider.mjs","../../../node_modules/@react-aria/utils/dist/useId.mjs","../../../node_modules/@react-aria/utils/dist/domHelpers.mjs","../../../node_modules/@react-aria/utils/dist/platform.mjs","../../../node_modules/@react-aria/utils/dist/useResizeObserver.mjs","../../../node_modules/@react-stately/utils/dist/number.mjs","../../../node_modules/@react-aria/overlays/dist/calculatePosition.mjs","../../../node_modules/@react-aria/overlays/dist/useCloseOnScroll.mjs","../../../node_modules/@react-aria/i18n/dist/utils.mjs","../../../node_modules/@react-aria/i18n/dist/useDefaultLocale.mjs","../../../node_modules/@react-aria/i18n/dist/context.mjs","../../../node_modules/@react-aria/overlays/dist/useOverlayPosition.mjs","../../../node_modules/@react-aria/interactions/dist/utils.mjs","../../../node_modules/@react-aria/interactions/dist/useFocusWithin.mjs","../../../node_modules/@react-aria/interactions/dist/useInteractOutside.mjs","../../../node_modules/@react-aria/focus/dist/FocusScope.mjs","../../../node_modules/@react-aria/overlays/dist/useOverlay.mjs","../../../node_modules/@react-aria/overlays/dist/useOverlayTrigger.mjs","../../../app/javascript/dashboards/components/common/AdaptOverlay.tsx"],"sourcesContent":["import $HgANd$react from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== 'undefined' ? (0, $HgANd$react).useLayoutEffect : ()=>{};\n\n\nexport {$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as useLayoutEffect};\n//# sourceMappingURL=useLayoutEffect.module.js.map\n","import {useLayoutEffect as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c} from \"./useLayoutEffect.mjs\";\nimport {useRef as $lmaYr$useRef, useCallback as $lmaYr$useCallback} from \"react\";\n\n/*\n * Copyright 2023 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nfunction $8ae05eaa5c114e9c$export$7f54fc3180508a52(fn) {\n const ref = (0, $lmaYr$useRef)(null);\n (0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{\n ref.current = fn;\n }, [\n fn\n ]);\n // @ts-ignore\n return (0, $lmaYr$useCallback)((...args)=>{\n const f = ref.current;\n return f === null || f === void 0 ? void 0 : f(...args);\n }, []);\n}\n\n\nexport {$8ae05eaa5c114e9c$export$7f54fc3180508a52 as useEffectEvent};\n//# sourceMappingURL=useEffectEvent.module.js.map\n","import $670gB$react, {useContext as $670gB$useContext, useState as $670gB$useState, useMemo as $670gB$useMemo, useLayoutEffect as $670gB$useLayoutEffect, useRef as $670gB$useRef} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not supported.\nconst $b5e257d569688ac6$var$defaultContext = {\n prefix: String(Math.round(Math.random() * 10000000000)),\n current: 0\n};\nconst $b5e257d569688ac6$var$SSRContext = /*#__PURE__*/ (0, $670gB$react).createContext($b5e257d569688ac6$var$defaultContext);\nconst $b5e257d569688ac6$var$IsSSRContext = /*#__PURE__*/ (0, $670gB$react).createContext(false);\n// This is only used in React < 18.\nfunction $b5e257d569688ac6$var$LegacySSRProvider(props) {\n let cur = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n let counter = $b5e257d569688ac6$var$useCounter(cur === $b5e257d569688ac6$var$defaultContext);\n let [isSSR, setIsSSR] = (0, $670gB$useState)(true);\n let value = (0, $670gB$useMemo)(()=>({\n // If this is the first SSRProvider, start with an empty string prefix, otherwise\n // append and increment the counter.\n prefix: cur === $b5e257d569688ac6$var$defaultContext ? '' : `${cur.prefix}-${counter}`,\n current: 0\n }), [\n cur,\n counter\n ]);\n // If on the client, and the component was initially server rendered,\n // then schedule a layout effect to update the component after hydration.\n if (typeof document !== 'undefined') // This if statement technically breaks the rules of hooks, but is safe\n // because the condition never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n (0, $670gB$useLayoutEffect)(()=>{\n setIsSSR(false);\n }, []);\n return /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$SSRContext.Provider, {\n value: value\n }, /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$IsSSRContext.Provider, {\n value: isSSR\n }, props.children));\n}\nlet $b5e257d569688ac6$var$warnedAboutSSRProvider = false;\nfunction $b5e257d569688ac6$export$9f8ac96af4b1b2ae(props) {\n if (typeof (0, $670gB$react)['useId'] === 'function') {\n if (process.env.NODE_ENV !== 'test' && !$b5e257d569688ac6$var$warnedAboutSSRProvider) {\n console.warn('In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.');\n $b5e257d569688ac6$var$warnedAboutSSRProvider = true;\n }\n return /*#__PURE__*/ (0, $670gB$react).createElement((0, $670gB$react).Fragment, null, props.children);\n }\n return /*#__PURE__*/ (0, $670gB$react).createElement($b5e257d569688ac6$var$LegacySSRProvider, props);\n}\nlet $b5e257d569688ac6$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);\nlet $b5e257d569688ac6$var$componentIds = new WeakMap();\nfunction $b5e257d569688ac6$var$useCounter(isDisabled = false) {\n let ctx = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n let ref = (0, $670gB$useRef)(null);\n // eslint-disable-next-line rulesdir/pure-render\n if (ref.current === null && !isDisabled) {\n var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n // In strict mode, React renders components twice, and the ref will be reset to null on the second render.\n // This means our id counter will be incremented twice instead of once. This is a problem because on the\n // server, components are only rendered once and so ids generated on the server won't match the client.\n // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this\n // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.\n // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.\n // To ensure that we only increment the global counter once, we store the starting id for this component in\n // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.\n // Since React runs the second render immediately after the first, this is safe.\n // @ts-ignore\n let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (0, $670gB$react).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;\n if (currentOwner) {\n let prevComponentValue = $b5e257d569688ac6$var$componentIds.get(currentOwner);\n if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.\n $b5e257d569688ac6$var$componentIds.set(currentOwner, {\n id: ctx.current,\n state: currentOwner.memoizedState\n });\n else if (currentOwner.memoizedState !== prevComponentValue.state) {\n // On the second render, the memoizedState gets reset by React.\n // Reset the counter, and remove from the weak map so we don't\n // do this for subsequent useId calls.\n ctx.current = prevComponentValue.id;\n $b5e257d569688ac6$var$componentIds.delete(currentOwner);\n }\n }\n // eslint-disable-next-line rulesdir/pure-render\n ref.current = ++ctx.current;\n }\n // eslint-disable-next-line rulesdir/pure-render\n return ref.current;\n}\nfunction $b5e257d569688ac6$var$useLegacySSRSafeId(defaultId) {\n let ctx = (0, $670gB$useContext)($b5e257d569688ac6$var$SSRContext);\n // If we are rendering in a non-DOM environment, and there's no SSRProvider,\n // provide a warning to hint to the developer to add one.\n if (ctx === $b5e257d569688ac6$var$defaultContext && !$b5e257d569688ac6$var$canUseDOM) console.warn('When server rendering, you must wrap your application in an to ensure consistent ids are generated between the client and server.');\n let counter = $b5e257d569688ac6$var$useCounter(!!defaultId);\n let prefix = ctx === $b5e257d569688ac6$var$defaultContext && process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${ctx.prefix}`;\n return defaultId || `${prefix}-${counter}`;\n}\nfunction $b5e257d569688ac6$var$useModernSSRSafeId(defaultId) {\n // @ts-ignore\n let id = (0, $670gB$react).useId();\n let [didSSR] = (0, $670gB$useState)($b5e257d569688ac6$export$535bd6ca7f90a273());\n let prefix = didSSR || process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${$b5e257d569688ac6$var$defaultContext.prefix}`;\n return defaultId || `${prefix}-${id}`;\n}\nconst $b5e257d569688ac6$export$619500959fc48b26 = typeof (0, $670gB$react)['useId'] === 'function' ? $b5e257d569688ac6$var$useModernSSRSafeId : $b5e257d569688ac6$var$useLegacySSRSafeId;\nfunction $b5e257d569688ac6$var$getSnapshot() {\n return false;\n}\nfunction $b5e257d569688ac6$var$getServerSnapshot() {\n return true;\n}\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction $b5e257d569688ac6$var$subscribe(onStoreChange) {\n // noop\n return ()=>{};\n}\nfunction $b5e257d569688ac6$export$535bd6ca7f90a273() {\n // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.\n if (typeof (0, $670gB$react)['useSyncExternalStore'] === 'function') return (0, $670gB$react)['useSyncExternalStore']($b5e257d569688ac6$var$subscribe, $b5e257d569688ac6$var$getSnapshot, $b5e257d569688ac6$var$getServerSnapshot);\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return (0, $670gB$useContext)($b5e257d569688ac6$var$IsSSRContext);\n}\n\n\nexport {$b5e257d569688ac6$export$9f8ac96af4b1b2ae as SSRProvider, $b5e257d569688ac6$export$535bd6ca7f90a273 as useIsSSR, $b5e257d569688ac6$export$619500959fc48b26 as useSSRSafeId};\n//# sourceMappingURL=SSRProvider.module.js.map\n","import {useLayoutEffect as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c} from \"./useLayoutEffect.mjs\";\nimport {useValueEffect as $1dbecbe27a04f9af$export$14d238f342723f25} from \"./useValueEffect.mjs\";\nimport {useState as $eKkEp$useState, useRef as $eKkEp$useRef, useCallback as $eKkEp$useCallback, useEffect as $eKkEp$useEffect} from \"react\";\nimport {useSSRSafeId as $eKkEp$useSSRSafeId} from \"@react-aria/ssr\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n// copied from SSRProvider.tsx to reduce exports, if needed again, consider sharing\nlet $bdb11010cef70236$var$canUseDOM = Boolean(typeof window !== 'undefined' && window.document && window.document.createElement);\nlet $bdb11010cef70236$var$idsUpdaterMap = new Map();\nfunction $bdb11010cef70236$export$f680877a34711e37(defaultId) {\n let [value, setValue] = (0, $eKkEp$useState)(defaultId);\n let nextId = (0, $eKkEp$useRef)(null);\n let res = (0, $eKkEp$useSSRSafeId)(value);\n let updateValue = (0, $eKkEp$useCallback)((val)=>{\n nextId.current = val;\n }, []);\n if ($bdb11010cef70236$var$canUseDOM) $bdb11010cef70236$var$idsUpdaterMap.set(res, updateValue);\n (0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(()=>{\n let r = res;\n return ()=>{\n $bdb11010cef70236$var$idsUpdaterMap.delete(r);\n };\n }, [\n res\n ]);\n // This cannot cause an infinite loop because the ref is updated first.\n // eslint-disable-next-line\n (0, $eKkEp$useEffect)(()=>{\n let newId = nextId.current;\n if (newId) {\n nextId.current = null;\n setValue(newId);\n }\n });\n return res;\n}\nfunction $bdb11010cef70236$export$cd8c9cb68f842629(idA, idB) {\n if (idA === idB) return idA;\n let setIdA = $bdb11010cef70236$var$idsUpdaterMap.get(idA);\n if (setIdA) {\n setIdA(idB);\n return idB;\n }\n let setIdB = $bdb11010cef70236$var$idsUpdaterMap.get(idB);\n if (setIdB) {\n setIdB(idA);\n return idA;\n }\n return idB;\n}\nfunction $bdb11010cef70236$export$b4cc09c592e8fdb8(depArray = []) {\n let id = $bdb11010cef70236$export$f680877a34711e37();\n let [resolvedId, setResolvedId] = (0, $1dbecbe27a04f9af$export$14d238f342723f25)(id);\n let updateId = (0, $eKkEp$useCallback)(()=>{\n setResolvedId(function*() {\n yield id;\n yield document.getElementById(id) ? id : undefined;\n });\n }, [\n id,\n setResolvedId\n ]);\n (0, $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c)(updateId, [\n id,\n updateId,\n ...depArray\n ]);\n return resolvedId;\n}\n\n\nexport {$bdb11010cef70236$export$f680877a34711e37 as useId, $bdb11010cef70236$export$cd8c9cb68f842629 as mergeIds, $bdb11010cef70236$export$b4cc09c592e8fdb8 as useSlotId};\n//# sourceMappingURL=useId.module.js.map\n","const $431fbd86ca7dc216$export$b204af158042fbac = (el)=>{\n var _el_ownerDocument;\n return (_el_ownerDocument = el === null || el === void 0 ? void 0 : el.ownerDocument) !== null && _el_ownerDocument !== void 0 ? _el_ownerDocument : document;\n};\nconst $431fbd86ca7dc216$export$f21a1ffae260145a = (el)=>{\n if (el && 'window' in el && el.window === el) return el;\n const doc = $431fbd86ca7dc216$export$b204af158042fbac(el);\n return doc.defaultView || window;\n};\n\n\nexport {$431fbd86ca7dc216$export$b204af158042fbac as getOwnerDocument, $431fbd86ca7dc216$export$f21a1ffae260145a as getOwnerWindow};\n//# sourceMappingURL=domHelpers.module.js.map\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ function $c87311424ea30a05$var$testUserAgent(re) {\n var _window_navigator_userAgentData;\n if (typeof window === 'undefined' || window.navigator == null) return false;\n return ((_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.brands.some((brand)=>re.test(brand.brand))) || re.test(window.navigator.userAgent);\n}\nfunction $c87311424ea30a05$var$testPlatform(re) {\n var _window_navigator_userAgentData;\n return typeof window !== 'undefined' && window.navigator != null ? re.test(((_window_navigator_userAgentData = window.navigator['userAgentData']) === null || _window_navigator_userAgentData === void 0 ? void 0 : _window_navigator_userAgentData.platform) || window.navigator.platform) : false;\n}\nfunction $c87311424ea30a05$var$cached(fn) {\n let res = null;\n return ()=>{\n if (res == null) res = fn();\n return res;\n };\n}\nconst $c87311424ea30a05$export$9ac100e40613ea10 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testPlatform(/^Mac/i);\n});\nconst $c87311424ea30a05$export$186c6964ca17d99 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testPlatform(/^iPhone/i);\n});\nconst $c87311424ea30a05$export$7bef049ce92e4224 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testPlatform(/^iPad/i) || // iPadOS 13 lies and says it's a Mac, but we can distinguish by detecting touch support.\n $c87311424ea30a05$export$9ac100e40613ea10() && navigator.maxTouchPoints > 1;\n});\nconst $c87311424ea30a05$export$fedb369cb70207f1 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$export$186c6964ca17d99() || $c87311424ea30a05$export$7bef049ce92e4224();\n});\nconst $c87311424ea30a05$export$e1865c3bedcd822b = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$export$9ac100e40613ea10() || $c87311424ea30a05$export$fedb369cb70207f1();\n});\nconst $c87311424ea30a05$export$78551043582a6a98 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/AppleWebKit/i) && !$c87311424ea30a05$export$6446a186d09e379e();\n});\nconst $c87311424ea30a05$export$6446a186d09e379e = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/Chrome/i);\n});\nconst $c87311424ea30a05$export$a11b0059900ceec8 = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/Android/i);\n});\nconst $c87311424ea30a05$export$b7d78993b74f766d = $c87311424ea30a05$var$cached(function() {\n return $c87311424ea30a05$var$testUserAgent(/Firefox/i);\n});\n\n\nexport {$c87311424ea30a05$export$9ac100e40613ea10 as isMac, $c87311424ea30a05$export$186c6964ca17d99 as isIPhone, $c87311424ea30a05$export$7bef049ce92e4224 as isIPad, $c87311424ea30a05$export$fedb369cb70207f1 as isIOS, $c87311424ea30a05$export$e1865c3bedcd822b as isAppleDevice, $c87311424ea30a05$export$78551043582a6a98 as isWebKit, $c87311424ea30a05$export$6446a186d09e379e as isChrome, $c87311424ea30a05$export$a11b0059900ceec8 as isAndroid, $c87311424ea30a05$export$b7d78993b74f766d as isFirefox};\n//# sourceMappingURL=platform.module.js.map\n","import {useEffect as $Vsl8o$useEffect} from \"react\";\n\n\nfunction $9daab02d461809db$var$hasResizeObserver() {\n return typeof window.ResizeObserver !== 'undefined';\n}\nfunction $9daab02d461809db$export$683480f191c0e3ea(options) {\n const { ref: ref, box: box, onResize: onResize } = options;\n (0, $Vsl8o$useEffect)(()=>{\n let element = ref === null || ref === void 0 ? void 0 : ref.current;\n if (!element) return;\n if (!$9daab02d461809db$var$hasResizeObserver()) {\n window.addEventListener('resize', onResize, false);\n return ()=>{\n window.removeEventListener('resize', onResize, false);\n };\n } else {\n const resizeObserverInstance = new window.ResizeObserver((entries)=>{\n if (!entries.length) return;\n onResize();\n });\n resizeObserverInstance.observe(element, {\n box: box\n });\n return ()=>{\n if (element) resizeObserverInstance.unobserve(element);\n };\n }\n }, [\n onResize,\n ref,\n box\n ]);\n}\n\n\nexport {$9daab02d461809db$export$683480f191c0e3ea as useResizeObserver};\n//# sourceMappingURL=useResizeObserver.module.js.map\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ /**\n * Takes a value and forces it to the closest min/max if it's outside. Also forces it to the closest valid step.\n */ function $9446cca9a3875146$export$7d15b64cf5a3a4c4(value, min = -Infinity, max = Infinity) {\n let newValue = Math.min(Math.max(value, min), max);\n return newValue;\n}\nfunction $9446cca9a3875146$export$e1a7b8e69ef6c52f(value, step) {\n let roundedValue = value;\n let stepString = step.toString();\n let pointIndex = stepString.indexOf('.');\n let precision = pointIndex >= 0 ? stepString.length - pointIndex : 0;\n if (precision > 0) {\n let pow = Math.pow(10, precision);\n roundedValue = Math.round(roundedValue * pow) / pow;\n }\n return roundedValue;\n}\nfunction $9446cca9a3875146$export$cb6e0bb50bc19463(value, min, max, step) {\n min = Number(min);\n max = Number(max);\n let remainder = (value - (isNaN(min) ? 0 : min)) % step;\n let snappedValue = $9446cca9a3875146$export$e1a7b8e69ef6c52f(Math.abs(remainder) * 2 >= step ? value + Math.sign(remainder) * (step - Math.abs(remainder)) : value - remainder, step);\n if (!isNaN(min)) {\n if (snappedValue < min) snappedValue = min;\n else if (!isNaN(max) && snappedValue > max) snappedValue = min + Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f((max - min) / step, step)) * step;\n } else if (!isNaN(max) && snappedValue > max) snappedValue = Math.floor($9446cca9a3875146$export$e1a7b8e69ef6c52f(max / step, step)) * step;\n // correct floating point behavior by rounding to step precision\n snappedValue = $9446cca9a3875146$export$e1a7b8e69ef6c52f(snappedValue, step);\n return snappedValue;\n}\nfunction $9446cca9a3875146$export$b6268554fba451f(value, digits, base = 10) {\n const pow = Math.pow(base, digits);\n return Math.round(value * pow) / pow;\n}\n\n\nexport {$9446cca9a3875146$export$7d15b64cf5a3a4c4 as clamp, $9446cca9a3875146$export$e1a7b8e69ef6c52f as roundToStepPrecision, $9446cca9a3875146$export$cb6e0bb50bc19463 as snapValueToStep, $9446cca9a3875146$export$b6268554fba451f as toFixedNumber};\n//# sourceMappingURL=number.module.js.map\n","import {isWebKit as $fZVmS$isWebKit, clamp as $fZVmS$clamp} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $edcf132a9284368a$var$AXIS = {\n top: 'top',\n bottom: 'top',\n left: 'left',\n right: 'left'\n};\nconst $edcf132a9284368a$var$FLIPPED_DIRECTION = {\n top: 'bottom',\n bottom: 'top',\n left: 'right',\n right: 'left'\n};\nconst $edcf132a9284368a$var$CROSS_AXIS = {\n top: 'left',\n left: 'top'\n};\nconst $edcf132a9284368a$var$AXIS_SIZE = {\n top: 'height',\n left: 'width'\n};\nconst $edcf132a9284368a$var$TOTAL_SIZE = {\n width: 'totalWidth',\n height: 'totalHeight'\n};\nconst $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE = {};\n// @ts-ignore\nlet $edcf132a9284368a$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;\nfunction $edcf132a9284368a$var$getContainerDimensions(containerNode) {\n let width = 0, height = 0, totalWidth = 0, totalHeight = 0, top = 0, left = 0;\n let scroll = {};\n let isPinchZoomedIn = ($edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.scale) > 1;\n if (containerNode.tagName === 'BODY') {\n let documentElement = document.documentElement;\n totalWidth = documentElement.clientWidth;\n totalHeight = documentElement.clientHeight;\n var _visualViewport_width;\n width = (_visualViewport_width = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.width) !== null && _visualViewport_width !== void 0 ? _visualViewport_width : totalWidth;\n var _visualViewport_height;\n height = (_visualViewport_height = $edcf132a9284368a$var$visualViewport === null || $edcf132a9284368a$var$visualViewport === void 0 ? void 0 : $edcf132a9284368a$var$visualViewport.height) !== null && _visualViewport_height !== void 0 ? _visualViewport_height : totalHeight;\n scroll.top = documentElement.scrollTop || containerNode.scrollTop;\n scroll.left = documentElement.scrollLeft || containerNode.scrollLeft;\n // The goal of the below is to get a top/left value that represents the top/left of the visual viewport with\n // respect to the layout viewport origin. This combined with the scrollTop/scrollLeft will allow us to calculate\n // coordinates/values with respect to the visual viewport or with respect to the layout viewport.\n if ($edcf132a9284368a$var$visualViewport) {\n top = $edcf132a9284368a$var$visualViewport.offsetTop;\n left = $edcf132a9284368a$var$visualViewport.offsetLeft;\n }\n } else {\n ({ width: width, height: height, top: top, left: left } = $edcf132a9284368a$var$getOffset(containerNode));\n scroll.top = containerNode.scrollTop;\n scroll.left = containerNode.scrollLeft;\n totalWidth = width;\n totalHeight = height;\n }\n if ((0, $fZVmS$isWebKit)() && (containerNode.tagName === 'BODY' || containerNode.tagName === 'HTML') && isPinchZoomedIn) {\n // Safari will report a non-zero scrollTop/Left for the non-scrolling body/HTML element when pinch zoomed in unlike other browsers.\n // Set to zero for parity calculations so we get consistent positioning of overlays across all browsers.\n // Also switch to visualViewport.pageTop/pageLeft so that we still accomodate for scroll positioning for body/HTML elements that are actually scrollable\n // before pinch zoom happens\n scroll.top = 0;\n scroll.left = 0;\n top = $edcf132a9284368a$var$visualViewport.pageTop;\n left = $edcf132a9284368a$var$visualViewport.pageLeft;\n }\n return {\n width: width,\n height: height,\n totalWidth: totalWidth,\n totalHeight: totalHeight,\n scroll: scroll,\n top: top,\n left: left\n };\n}\nfunction $edcf132a9284368a$var$getScroll(node) {\n return {\n top: node.scrollTop,\n left: node.scrollLeft,\n width: node.scrollWidth,\n height: node.scrollHeight\n };\n}\n// Determines the amount of space required when moving the overlay to ensure it remains in the boundary\nfunction $edcf132a9284368a$var$getDelta(axis, offset, size, // The dimensions of the boundary element that the popover is\n// positioned within (most of the time this is the ).\nboundaryDimensions, // The dimensions of the containing block element that the popover is\n// positioned relative to (e.g. parent with position: relative).\n// Usually this is the same as the boundary element, but if the popover\n// is portaled somewhere other than the body and has an ancestor with\n// position: relative/absolute, it will be different.\ncontainerDimensions, padding, containerOffsetWithBoundary) {\n let containerScroll = containerDimensions.scroll[axis];\n // The height/width of the boundary. Matches the axis along which we are adjusting the overlay position\n let boundarySize = boundaryDimensions[$edcf132a9284368a$var$AXIS_SIZE[axis]];\n // Calculate the edges of the boundary (accomodating for the boundary padding) and the edges of the overlay.\n // Note that these values are with respect to the visual viewport (aka 0,0 is the top left of the viewport)\n let boundaryStartEdge = boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] + padding;\n let boundaryEndEdge = boundarySize + boundaryDimensions.scroll[$edcf132a9284368a$var$AXIS[axis]] - padding;\n let startEdgeOffset = offset - containerScroll + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];\n let endEdgeOffset = offset - containerScroll + size + containerOffsetWithBoundary[axis] - boundaryDimensions[$edcf132a9284368a$var$AXIS[axis]];\n // If any of the overlay edges falls outside of the boundary, shift the overlay the required amount to align one of the overlay's\n // edges with the closest boundary edge.\n if (startEdgeOffset < boundaryStartEdge) return boundaryStartEdge - startEdgeOffset;\n else if (endEdgeOffset > boundaryEndEdge) return Math.max(boundaryEndEdge - endEdgeOffset, boundaryStartEdge - startEdgeOffset);\n else return 0;\n}\nfunction $edcf132a9284368a$var$getMargins(node) {\n let style = window.getComputedStyle(node);\n return {\n top: parseInt(style.marginTop, 10) || 0,\n bottom: parseInt(style.marginBottom, 10) || 0,\n left: parseInt(style.marginLeft, 10) || 0,\n right: parseInt(style.marginRight, 10) || 0\n };\n}\nfunction $edcf132a9284368a$var$parsePlacement(input) {\n if ($edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input]) return $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input];\n let [placement, crossPlacement] = input.split(' ');\n let axis = $edcf132a9284368a$var$AXIS[placement] || 'right';\n let crossAxis = $edcf132a9284368a$var$CROSS_AXIS[axis];\n if (!$edcf132a9284368a$var$AXIS[crossPlacement]) crossPlacement = 'center';\n let size = $edcf132a9284368a$var$AXIS_SIZE[axis];\n let crossSize = $edcf132a9284368a$var$AXIS_SIZE[crossAxis];\n $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input] = {\n placement: placement,\n crossPlacement: crossPlacement,\n axis: axis,\n crossAxis: crossAxis,\n size: size,\n crossSize: crossSize\n };\n return $edcf132a9284368a$var$PARSED_PLACEMENT_CACHE[input];\n}\nfunction $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset) {\n let { placement: placement, crossPlacement: crossPlacement, axis: axis, crossAxis: crossAxis, size: size, crossSize: crossSize } = placementInfo;\n let position = {};\n // button position\n position[crossAxis] = childOffset[crossAxis];\n if (crossPlacement === 'center') // + (button size / 2) - (overlay size / 2)\n // at this point the overlay center should match the button center\n position[crossAxis] += (childOffset[crossSize] - overlaySize[crossSize]) / 2;\n else if (crossPlacement !== crossAxis) // + (button size) - (overlay size)\n // at this point the overlay bottom should match the button bottom\n position[crossAxis] += childOffset[crossSize] - overlaySize[crossSize];\n /* else {\n the overlay top should match the button top\n } */ \n position[crossAxis] += crossOffset;\n // overlay top overlapping arrow with button bottom\n const minPosition = childOffset[crossAxis] - overlaySize[crossSize] + arrowSize + arrowBoundaryOffset;\n // overlay bottom overlapping arrow with button top\n const maxPosition = childOffset[crossAxis] + childOffset[crossSize] - arrowSize - arrowBoundaryOffset;\n position[crossAxis] = (0, $fZVmS$clamp)(position[crossAxis], minPosition, maxPosition);\n // Floor these so the position isn't placed on a partial pixel, only whole pixels. Shouldn't matter if it was floored or ceiled, so chose one.\n if (placement === axis) {\n // If the container is positioned (non-static), then we use the container's actual\n // height, as `bottom` will be relative to this height. But if the container is static,\n // then it can only be the `document.body`, and `bottom` will be relative to _its_\n // container, which should be as large as boundaryDimensions.\n const containerHeight = isContainerPositioned ? containerOffsetWithBoundary[size] : boundaryDimensions[$edcf132a9284368a$var$TOTAL_SIZE[size]];\n position[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] = Math.floor(containerHeight - childOffset[axis] + offset);\n } else position[axis] = Math.floor(childOffset[axis] + childOffset[size] + offset);\n return position;\n}\nfunction $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlayHeight, heightGrowthDirection) {\n const containerHeight = isContainerPositioned ? containerOffsetWithBoundary.height : boundaryDimensions[$edcf132a9284368a$var$TOTAL_SIZE.height];\n // For cases where position is set via \"bottom\" instead of \"top\", we need to calculate the true overlay top with respect to the boundary. Reverse calculate this with the same method\n // used in computePosition.\n let overlayTop = position.top != null ? containerOffsetWithBoundary.top + position.top : containerOffsetWithBoundary.top + (containerHeight - position.bottom - overlayHeight);\n let maxHeight = heightGrowthDirection !== 'top' ? // We want the distance between the top of the overlay to the bottom of the boundary\n Math.max(0, boundaryDimensions.height + boundaryDimensions.top + boundaryDimensions.scroll.top // this is the bottom of the boundary\n - overlayTop // this is the top of the overlay\n - (margins.top + margins.bottom + padding // save additional space for margin and padding\n )) : Math.max(0, overlayTop + overlayHeight // this is the bottom of the overlay\n - (boundaryDimensions.top + boundaryDimensions.scroll.top // this is the top of the boundary\n ) - (margins.top + margins.bottom + padding // save additional space for margin and padding\n ));\n return Math.min(boundaryDimensions.height - padding * 2, maxHeight);\n}\nfunction $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding, placementInfo) {\n let { placement: placement, axis: axis, size: size } = placementInfo;\n if (placement === axis) return Math.max(0, childOffset[axis] - boundaryDimensions[axis] - boundaryDimensions.scroll[axis] + containerOffsetWithBoundary[axis] - margins[axis] - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);\n return Math.max(0, boundaryDimensions[size] + boundaryDimensions[axis] + boundaryDimensions.scroll[axis] - containerOffsetWithBoundary[axis] - childOffset[axis] - childOffset[size] - margins[axis] - margins[$edcf132a9284368a$var$FLIPPED_DIRECTION[axis]] - padding);\n}\nfunction $edcf132a9284368a$export$6839422d1f33cee9(placementInput, childOffset, overlaySize, scrollSize, margins, padding, flip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, userSetMaxHeight, arrowSize, arrowBoundaryOffset) {\n let placementInfo = $edcf132a9284368a$var$parsePlacement(placementInput);\n let { size: size, crossAxis: crossAxis, crossSize: crossSize, placement: placement, crossPlacement: crossPlacement } = placementInfo;\n let position = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset);\n let normalizedOffset = offset;\n let space = $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, placementInfo);\n // Check if the scroll size of the overlay is greater than the available space to determine if we need to flip\n if (flip && scrollSize[size] > space) {\n let flippedPlacementInfo = $edcf132a9284368a$var$parsePlacement(`${$edcf132a9284368a$var$FLIPPED_DIRECTION[placement]} ${crossPlacement}`);\n let flippedPosition = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, flippedPlacementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset);\n let flippedSpace = $edcf132a9284368a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, flippedPlacementInfo);\n // If the available space for the flipped position is greater than the original available space, flip.\n if (flippedSpace > space) {\n placementInfo = flippedPlacementInfo;\n position = flippedPosition;\n normalizedOffset = offset;\n }\n }\n // Determine the direction the height of the overlay can grow so that we can choose how to calculate the max height\n let heightGrowthDirection = 'bottom';\n if (placementInfo.axis === 'top') {\n if (placementInfo.placement === 'top') heightGrowthDirection = 'top';\n else if (placementInfo.placement === 'bottom') heightGrowthDirection = 'bottom';\n } else if (placementInfo.crossAxis === 'top') {\n if (placementInfo.crossPlacement === 'top') heightGrowthDirection = 'bottom';\n else if (placementInfo.crossPlacement === 'bottom') heightGrowthDirection = 'top';\n }\n let delta = $edcf132a9284368a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);\n position[crossAxis] += delta;\n let maxHeight = $edcf132a9284368a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlaySize.height, heightGrowthDirection);\n if (userSetMaxHeight && userSetMaxHeight < maxHeight) maxHeight = userSetMaxHeight;\n overlaySize.height = Math.min(overlaySize.height, maxHeight);\n position = $edcf132a9284368a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, normalizedOffset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset);\n delta = $edcf132a9284368a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);\n position[crossAxis] += delta;\n let arrowPosition = {};\n // All values are transformed so that 0 is at the top/left of the overlay depending on the orientation\n // Prefer the arrow being in the center of the trigger/overlay anchor element\n // childOffset[crossAxis] + .5 * childOffset[crossSize] = absolute position with respect to the trigger's coordinate system that would place the arrow in the center of the trigger\n // position[crossAxis] - margins[AXIS[crossAxis]] = value use to transform the position to a value with respect to the overlay's coordinate system. A child element's (aka arrow) position absolute's \"0\"\n // is positioned after the margin of its parent (aka overlay) so we need to subtract it to get the proper coordinate transform\n let preferredArrowPosition = childOffset[crossAxis] + .5 * childOffset[crossSize] - position[crossAxis] - margins[$edcf132a9284368a$var$AXIS[crossAxis]];\n // Min/Max position limits for the arrow with respect to the overlay\n const arrowMinPosition = arrowSize / 2 + arrowBoundaryOffset;\n // overlaySize[crossSize] - margins = true size of the overlay\n const overlayMargin = $edcf132a9284368a$var$AXIS[crossAxis] === 'left' ? margins.left + margins.right : margins.top + margins.bottom;\n const arrowMaxPosition = overlaySize[crossSize] - overlayMargin - arrowSize / 2 - arrowBoundaryOffset;\n // Min/Max position limits for the arrow with respect to the trigger/overlay anchor element\n // Same margin accomodation done here as well as for the preferredArrowPosition\n const arrowOverlappingChildMinEdge = childOffset[crossAxis] + arrowSize / 2 - (position[crossAxis] + margins[$edcf132a9284368a$var$AXIS[crossAxis]]);\n const arrowOverlappingChildMaxEdge = childOffset[crossAxis] + childOffset[crossSize] - arrowSize / 2 - (position[crossAxis] + margins[$edcf132a9284368a$var$AXIS[crossAxis]]);\n // Clamp the arrow positioning so that it always is within the bounds of the anchor and the overlay\n const arrowPositionOverlappingChild = (0, $fZVmS$clamp)(preferredArrowPosition, arrowOverlappingChildMinEdge, arrowOverlappingChildMaxEdge);\n arrowPosition[crossAxis] = (0, $fZVmS$clamp)(arrowPositionOverlappingChild, arrowMinPosition, arrowMaxPosition);\n return {\n position: position,\n maxHeight: maxHeight,\n arrowOffsetLeft: arrowPosition.left,\n arrowOffsetTop: arrowPosition.top,\n placement: placementInfo.placement\n };\n}\nfunction $edcf132a9284368a$export$b3ceb0cbf1056d98(opts) {\n let { placement: placement, targetNode: targetNode, overlayNode: overlayNode, scrollNode: scrollNode, padding: padding, shouldFlip: shouldFlip, boundaryElement: boundaryElement, offset: offset, crossOffset: crossOffset, maxHeight: maxHeight, arrowSize: arrowSize = 0, arrowBoundaryOffset: arrowBoundaryOffset = 0 } = opts;\n let container = overlayNode instanceof HTMLElement ? $edcf132a9284368a$var$getContainingBlock(overlayNode) : document.documentElement;\n let isViewportContainer = container === document.documentElement;\n const containerPositionStyle = window.getComputedStyle(container).position;\n let isContainerPositioned = !!containerPositionStyle && containerPositionStyle !== 'static';\n let childOffset = isViewportContainer ? $edcf132a9284368a$var$getOffset(targetNode) : $edcf132a9284368a$var$getPosition(targetNode, container);\n if (!isViewportContainer) {\n let { marginTop: marginTop, marginLeft: marginLeft } = window.getComputedStyle(targetNode);\n childOffset.top += parseInt(marginTop, 10) || 0;\n childOffset.left += parseInt(marginLeft, 10) || 0;\n }\n let overlaySize = $edcf132a9284368a$var$getOffset(overlayNode);\n let margins = $edcf132a9284368a$var$getMargins(overlayNode);\n overlaySize.width += margins.left + margins.right;\n overlaySize.height += margins.top + margins.bottom;\n let scrollSize = $edcf132a9284368a$var$getScroll(scrollNode);\n let boundaryDimensions = $edcf132a9284368a$var$getContainerDimensions(boundaryElement);\n let containerDimensions = $edcf132a9284368a$var$getContainerDimensions(container);\n // If the container is the HTML element wrapping the body element, the retrieved scrollTop/scrollLeft will be equal to the\n // body element's scroll. Set the container's scroll values to 0 since the overlay's edge position value in getDelta don't then need to be further offset\n // by the container scroll since they are essentially the same containing element and thus in the same coordinate system\n let containerOffsetWithBoundary = boundaryElement.tagName === 'BODY' ? $edcf132a9284368a$var$getOffset(container) : $edcf132a9284368a$var$getPosition(container, boundaryElement);\n if (container.tagName === 'HTML' && boundaryElement.tagName === 'BODY') {\n containerDimensions.scroll.top = 0;\n containerDimensions.scroll.left = 0;\n }\n return $edcf132a9284368a$export$6839422d1f33cee9(placement, childOffset, overlaySize, scrollSize, margins, padding, shouldFlip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, maxHeight, arrowSize, arrowBoundaryOffset);\n}\nfunction $edcf132a9284368a$var$getOffset(node) {\n let { top: top, left: left, width: width, height: height } = node.getBoundingClientRect();\n let { scrollTop: scrollTop, scrollLeft: scrollLeft, clientTop: clientTop, clientLeft: clientLeft } = document.documentElement;\n return {\n top: top + scrollTop - clientTop,\n left: left + scrollLeft - clientLeft,\n width: width,\n height: height\n };\n}\nfunction $edcf132a9284368a$var$getPosition(node, parent) {\n let style = window.getComputedStyle(node);\n let offset;\n if (style.position === 'fixed') {\n let { top: top, left: left, width: width, height: height } = node.getBoundingClientRect();\n offset = {\n top: top,\n left: left,\n width: width,\n height: height\n };\n } else {\n offset = $edcf132a9284368a$var$getOffset(node);\n let parentOffset = $edcf132a9284368a$var$getOffset(parent);\n let parentStyle = window.getComputedStyle(parent);\n parentOffset.top += (parseInt(parentStyle.borderTopWidth, 10) || 0) - parent.scrollTop;\n parentOffset.left += (parseInt(parentStyle.borderLeftWidth, 10) || 0) - parent.scrollLeft;\n offset.top -= parentOffset.top;\n offset.left -= parentOffset.left;\n }\n offset.top -= parseInt(style.marginTop, 10) || 0;\n offset.left -= parseInt(style.marginLeft, 10) || 0;\n return offset;\n}\n// Returns the containing block of an element, which is the element that\n// this element will be positioned relative to.\n// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block\nfunction $edcf132a9284368a$var$getContainingBlock(node) {\n // The offsetParent of an element in most cases equals the containing block.\n // https://w3c.github.io/csswg-drafts/cssom-view/#dom-htmlelement-offsetparent\n let offsetParent = node.offsetParent;\n // The offsetParent algorithm terminates at the document body,\n // even if the body is not a containing block. Double check that\n // and use the documentElement if so.\n if (offsetParent && offsetParent === document.body && window.getComputedStyle(offsetParent).position === 'static' && !$edcf132a9284368a$var$isContainingBlock(offsetParent)) offsetParent = document.documentElement;\n // TODO(later): handle table elements?\n // The offsetParent can be null if the element has position: fixed, or a few other cases.\n // We have to walk up the tree manually in this case because fixed positioned elements\n // are still positioned relative to their containing block, which is not always the viewport.\n if (offsetParent == null) {\n offsetParent = node.parentElement;\n while(offsetParent && !$edcf132a9284368a$var$isContainingBlock(offsetParent))offsetParent = offsetParent.parentElement;\n }\n // Fall back to the viewport.\n return offsetParent || document.documentElement;\n}\n// https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\nfunction $edcf132a9284368a$var$isContainingBlock(node) {\n let style = window.getComputedStyle(node);\n return style.transform !== 'none' || /transform|perspective/.test(style.willChange) || style.filter !== 'none' || style.contain === 'paint' || // @ts-ignore\n 'backdropFilter' in style && style.backdropFilter !== 'none' || // @ts-ignore\n 'WebkitBackdropFilter' in style && style.WebkitBackdropFilter !== 'none';\n}\n\n\nexport {$edcf132a9284368a$export$6839422d1f33cee9 as calculatePositionInternal, $edcf132a9284368a$export$b3ceb0cbf1056d98 as calculatePosition};\n//# sourceMappingURL=calculatePosition.module.js.map\n","import {useEffect as $dRVb8$useEffect} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \nconst $dd149f63282afbbf$export$f6211563215e3b37 = new WeakMap();\nfunction $dd149f63282afbbf$export$18fc8428861184da(opts) {\n let { triggerRef: triggerRef, isOpen: isOpen, onClose: onClose } = opts;\n (0, $dRVb8$useEffect)(()=>{\n if (!isOpen || onClose === null) return;\n let onScroll = (e)=>{\n // Ignore if scrolling an scrollable region outside the trigger's tree.\n let target = e.target;\n // window is not a Node and doesn't have contain, but window contains everything\n if (!triggerRef.current || target instanceof Node && !target.contains(triggerRef.current)) return;\n // Ignore scroll events on any input or textarea as the cursor position can cause it to scroll\n // such as in a combobox. Clicking the dropdown button places focus on the input, and if the\n // text inside the input extends beyond the 'end', then it will scroll so the cursor is visible at the end.\n if (e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement) return;\n let onCloseHandler = onClose || $dd149f63282afbbf$export$f6211563215e3b37.get(triggerRef.current);\n if (onCloseHandler) onCloseHandler();\n };\n window.addEventListener('scroll', onScroll, true);\n return ()=>{\n window.removeEventListener('scroll', onScroll, true);\n };\n }, [\n isOpen,\n onClose,\n triggerRef\n ]);\n}\n\n\nexport {$dd149f63282afbbf$export$f6211563215e3b37 as onCloseMap, $dd149f63282afbbf$export$18fc8428861184da as useCloseOnScroll};\n//# sourceMappingURL=useCloseOnScroll.module.js.map\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // https://en.wikipedia.org/wiki/Right-to-left\nconst $148a7a147e38ea7f$var$RTL_SCRIPTS = new Set([\n 'Arab',\n 'Syrc',\n 'Samr',\n 'Mand',\n 'Thaa',\n 'Mend',\n 'Nkoo',\n 'Adlm',\n 'Rohg',\n 'Hebr'\n]);\nconst $148a7a147e38ea7f$var$RTL_LANGS = new Set([\n 'ae',\n 'ar',\n 'arc',\n 'bcc',\n 'bqi',\n 'ckb',\n 'dv',\n 'fa',\n 'glk',\n 'he',\n 'ku',\n 'mzn',\n 'nqo',\n 'pnb',\n 'ps',\n 'sd',\n 'ug',\n 'ur',\n 'yi'\n]);\nfunction $148a7a147e38ea7f$export$702d680b21cbd764(localeString) {\n // If the Intl.Locale API is available, use it to get the locale's text direction.\n // @ts-ignore\n if (Intl.Locale) {\n let locale = new Intl.Locale(localeString).maximize();\n // Use the text info object to get the direction if possible.\n // @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo\n let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;\n if (textInfo) return textInfo.direction === 'rtl';\n // Fallback: guess using the script.\n // This is more accurate than guessing by language, since languages can be written in multiple scripts.\n if (locale.script) return $148a7a147e38ea7f$var$RTL_SCRIPTS.has(locale.script);\n }\n // If not, just guess by the language (first part of the locale)\n let lang = localeString.split('-')[0];\n return $148a7a147e38ea7f$var$RTL_LANGS.has(lang);\n}\n\n\nexport {$148a7a147e38ea7f$export$702d680b21cbd764 as isRTL};\n//# sourceMappingURL=utils.module.js.map\n","import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from \"./utils.mjs\";\nimport {useState as $ffhGL$useState, useEffect as $ffhGL$useEffect} from \"react\";\nimport {useIsSSR as $ffhGL$useIsSSR} from \"@react-aria/ssr\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n// Locale passed from server by PackageLocalizationProvider.\nconst $1e5a04cdaf7d1af8$var$localeSymbol = Symbol.for('react-aria.i18n.locale');\nfunction $1e5a04cdaf7d1af8$export$f09106e7c6677ec5() {\n let locale = typeof window !== 'undefined' && window[$1e5a04cdaf7d1af8$var$localeSymbol] || typeof navigator !== 'undefined' && (navigator.language || navigator.userLanguage) || 'en-US';\n try {\n // @ts-ignore\n Intl.DateTimeFormat.supportedLocalesOf([\n locale\n ]);\n } catch (_err) {\n locale = 'en-US';\n }\n return {\n locale: locale,\n direction: (0, $148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? 'rtl' : 'ltr'\n };\n}\nlet $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();\nlet $1e5a04cdaf7d1af8$var$listeners = new Set();\nfunction $1e5a04cdaf7d1af8$var$updateLocale() {\n $1e5a04cdaf7d1af8$var$currentLocale = $1e5a04cdaf7d1af8$export$f09106e7c6677ec5();\n for (let listener of $1e5a04cdaf7d1af8$var$listeners)listener($1e5a04cdaf7d1af8$var$currentLocale);\n}\nfunction $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a() {\n let isSSR = (0, $ffhGL$useIsSSR)();\n let [defaultLocale, setDefaultLocale] = (0, $ffhGL$useState)($1e5a04cdaf7d1af8$var$currentLocale);\n (0, $ffhGL$useEffect)(()=>{\n if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.addEventListener('languagechange', $1e5a04cdaf7d1af8$var$updateLocale);\n $1e5a04cdaf7d1af8$var$listeners.add(setDefaultLocale);\n return ()=>{\n $1e5a04cdaf7d1af8$var$listeners.delete(setDefaultLocale);\n if ($1e5a04cdaf7d1af8$var$listeners.size === 0) window.removeEventListener('languagechange', $1e5a04cdaf7d1af8$var$updateLocale);\n };\n }, []);\n // We cannot determine the browser's language on the server, so default to\n // en-US. This will be updated after hydration on the client to the correct value.\n if (isSSR) return {\n locale: 'en-US',\n direction: 'ltr'\n };\n return defaultLocale;\n}\n\n\nexport {$1e5a04cdaf7d1af8$export$f09106e7c6677ec5 as getDefaultLocale, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a as useDefaultLocale};\n//# sourceMappingURL=useDefaultLocale.module.js.map\n","import {isRTL as $148a7a147e38ea7f$export$702d680b21cbd764} from \"./utils.mjs\";\nimport {useDefaultLocale as $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a} from \"./useDefaultLocale.mjs\";\nimport $h9FiU$react, {useContext as $h9FiU$useContext} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nconst $18f2051aff69b9bf$var$I18nContext = /*#__PURE__*/ (0, $h9FiU$react).createContext(null);\nfunction $18f2051aff69b9bf$export$a54013f0d02a8f82(props) {\n let { locale: locale, children: children } = props;\n let defaultLocale = (0, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();\n let value = (0, $h9FiU$react).useMemo(()=>{\n if (!locale) return defaultLocale;\n return {\n locale: locale,\n direction: (0, $148a7a147e38ea7f$export$702d680b21cbd764)(locale) ? 'rtl' : 'ltr'\n };\n }, [\n defaultLocale,\n locale\n ]);\n return /*#__PURE__*/ (0, $h9FiU$react).createElement($18f2051aff69b9bf$var$I18nContext.Provider, {\n value: value\n }, children);\n}\nfunction $18f2051aff69b9bf$export$43bb16f9c6d9e3f7() {\n let defaultLocale = (0, $1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a)();\n let context = (0, $h9FiU$useContext)($18f2051aff69b9bf$var$I18nContext);\n return context || defaultLocale;\n}\n\n\nexport {$18f2051aff69b9bf$export$a54013f0d02a8f82 as I18nProvider, $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 as useLocale};\n//# sourceMappingURL=context.module.js.map\n","import {calculatePosition as $edcf132a9284368a$export$b3ceb0cbf1056d98} from \"./calculatePosition.mjs\";\nimport {useCloseOnScroll as $dd149f63282afbbf$export$18fc8428861184da} from \"./useCloseOnScroll.mjs\";\nimport {useState as $39EOa$useState, useRef as $39EOa$useRef, useEffect as $39EOa$useEffect, useCallback as $39EOa$useCallback} from \"react\";\nimport {useLayoutEffect as $39EOa$useLayoutEffect, useResizeObserver as $39EOa$useResizeObserver} from \"@react-aria/utils\";\nimport {useLocale as $39EOa$useLocale} from \"@react-aria/i18n\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\n\n// @ts-ignore\nlet $2a41e45df1593e64$var$visualViewport = typeof document !== 'undefined' && window.visualViewport;\nfunction $2a41e45df1593e64$export$d39e1813b3bdd0e1(props) {\n let { direction: direction } = (0, $39EOa$useLocale)();\n let { arrowSize: arrowSize = 0, targetRef: targetRef, overlayRef: overlayRef, scrollRef: scrollRef = overlayRef, placement: placement = 'bottom', containerPadding: containerPadding = 12, shouldFlip: shouldFlip = true, boundaryElement: boundaryElement = typeof document !== 'undefined' ? document.body : null, offset: offset = 0, crossOffset: crossOffset = 0, shouldUpdatePosition: shouldUpdatePosition = true, isOpen: isOpen = true, onClose: onClose, maxHeight: maxHeight, arrowBoundaryOffset: arrowBoundaryOffset = 0 } = props;\n let [position, setPosition] = (0, $39EOa$useState)({\n position: {},\n arrowOffsetLeft: undefined,\n arrowOffsetTop: undefined,\n maxHeight: undefined,\n placement: undefined\n });\n let deps = [\n shouldUpdatePosition,\n placement,\n overlayRef.current,\n targetRef.current,\n scrollRef.current,\n containerPadding,\n shouldFlip,\n boundaryElement,\n offset,\n crossOffset,\n isOpen,\n direction,\n maxHeight,\n arrowBoundaryOffset,\n arrowSize\n ];\n // Note, the position freezing breaks if body sizes itself dynamicly with the visual viewport but that might\n // just be a non-realistic use case\n // Upon opening a overlay, record the current visual viewport scale so we can freeze the overlay styles\n let lastScale = (0, $39EOa$useRef)($2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.scale);\n (0, $39EOa$useEffect)(()=>{\n if (isOpen) lastScale.current = $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.scale;\n }, [\n isOpen\n ]);\n let updatePosition = (0, $39EOa$useCallback)(()=>{\n if (shouldUpdatePosition === false || !isOpen || !overlayRef.current || !targetRef.current || !boundaryElement) return;\n if (($2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.scale) !== lastScale.current) return;\n // Determine a scroll anchor based on the focused element.\n // This stores the offset of the anchor element from the scroll container\n // so it can be restored after repositioning. This way if the overlay height\n // changes, the focused element appears to stay in the same position.\n let anchor = null;\n if (scrollRef.current && scrollRef.current.contains(document.activeElement)) {\n let anchorRect = document.activeElement.getBoundingClientRect();\n let scrollRect = scrollRef.current.getBoundingClientRect();\n // Anchor from the top if the offset is in the top half of the scrollable element,\n // otherwise anchor from the bottom.\n anchor = {\n type: 'top',\n offset: anchorRect.top - scrollRect.top\n };\n if (anchor.offset > scrollRect.height / 2) {\n anchor.type = 'bottom';\n anchor.offset = anchorRect.bottom - scrollRect.bottom;\n }\n }\n // Always reset the overlay's previous max height if not defined by the user so that we can compensate for\n // RAC collections populating after a second render and properly set a correct max height + positioning when it populates.\n let overlay = overlayRef.current;\n if (!maxHeight && overlayRef.current) {\n var _window_visualViewport;\n overlay.style.top = '0px';\n overlay.style.bottom = '';\n var _window_visualViewport_height;\n overlay.style.maxHeight = ((_window_visualViewport_height = (_window_visualViewport = window.visualViewport) === null || _window_visualViewport === void 0 ? void 0 : _window_visualViewport.height) !== null && _window_visualViewport_height !== void 0 ? _window_visualViewport_height : window.innerHeight) + 'px';\n }\n let position = (0, $edcf132a9284368a$export$b3ceb0cbf1056d98)({\n placement: $2a41e45df1593e64$var$translateRTL(placement, direction),\n overlayNode: overlayRef.current,\n targetNode: targetRef.current,\n scrollNode: scrollRef.current || overlayRef.current,\n padding: containerPadding,\n shouldFlip: shouldFlip,\n boundaryElement: boundaryElement,\n offset: offset,\n crossOffset: crossOffset,\n maxHeight: maxHeight,\n arrowSize: arrowSize,\n arrowBoundaryOffset: arrowBoundaryOffset\n });\n // Modify overlay styles directly so positioning happens immediately without the need of a second render\n // This is so we don't have to delay autoFocus scrolling or delay applying preventScroll for popovers\n overlay.style.top = '';\n overlay.style.bottom = '';\n overlay.style.left = '';\n overlay.style.right = '';\n Object.keys(position.position).forEach((key)=>overlay.style[key] = position.position[key] + 'px');\n overlay.style.maxHeight = position.maxHeight != null ? position.maxHeight + 'px' : undefined;\n // Restore scroll position relative to anchor element.\n if (anchor) {\n let anchorRect = document.activeElement.getBoundingClientRect();\n let scrollRect = scrollRef.current.getBoundingClientRect();\n let newOffset = anchorRect[anchor.type] - scrollRect[anchor.type];\n scrollRef.current.scrollTop += newOffset - anchor.offset;\n }\n // Trigger a set state for a second render anyway for arrow positioning\n setPosition(position);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, deps);\n // Update position when anything changes\n // eslint-disable-next-line react-hooks/exhaustive-deps\n (0, $39EOa$useLayoutEffect)(updatePosition, deps);\n // Update position on window resize\n $2a41e45df1593e64$var$useResize(updatePosition);\n // Update position when the overlay changes size (might need to flip).\n (0, $39EOa$useResizeObserver)({\n ref: overlayRef,\n onResize: updatePosition\n });\n // Update position when the target changes size (might need to flip).\n (0, $39EOa$useResizeObserver)({\n ref: targetRef,\n onResize: updatePosition\n });\n // Reposition the overlay and do not close on scroll while the visual viewport is resizing.\n // This will ensure that overlays adjust their positioning when the iOS virtual keyboard appears.\n let isResizing = (0, $39EOa$useRef)(false);\n (0, $39EOa$useLayoutEffect)(()=>{\n let timeout;\n let onResize = ()=>{\n isResizing.current = true;\n clearTimeout(timeout);\n timeout = setTimeout(()=>{\n isResizing.current = false;\n }, 500);\n updatePosition();\n };\n // Only reposition the overlay if a scroll event happens immediately as a result of resize (aka the virtual keyboard has appears)\n // We don't want to reposition the overlay if the user has pinch zoomed in and is scrolling the viewport around.\n let onScroll = ()=>{\n if (isResizing.current) onResize();\n };\n $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.addEventListener('resize', onResize);\n $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.addEventListener('scroll', onScroll);\n return ()=>{\n $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.removeEventListener('resize', onResize);\n $2a41e45df1593e64$var$visualViewport === null || $2a41e45df1593e64$var$visualViewport === void 0 ? void 0 : $2a41e45df1593e64$var$visualViewport.removeEventListener('scroll', onScroll);\n };\n }, [\n updatePosition\n ]);\n let close = (0, $39EOa$useCallback)(()=>{\n if (!isResizing.current) onClose();\n }, [\n onClose,\n isResizing\n ]);\n // When scrolling a parent scrollable region of the trigger (other than the body),\n // we hide the popover. Otherwise, its position would be incorrect.\n (0, $dd149f63282afbbf$export$18fc8428861184da)({\n triggerRef: targetRef,\n isOpen: isOpen,\n onClose: onClose && close\n });\n var _position_maxHeight;\n return {\n overlayProps: {\n style: {\n position: 'absolute',\n zIndex: 100000,\n ...position.position,\n maxHeight: (_position_maxHeight = position.maxHeight) !== null && _position_maxHeight !== void 0 ? _position_maxHeight : '100vh'\n }\n },\n placement: position.placement,\n arrowProps: {\n 'aria-hidden': 'true',\n role: 'presentation',\n style: {\n left: position.arrowOffsetLeft,\n top: position.arrowOffsetTop\n }\n },\n updatePosition: updatePosition\n };\n}\nfunction $2a41e45df1593e64$var$useResize(onResize) {\n (0, $39EOa$useLayoutEffect)(()=>{\n window.addEventListener('resize', onResize, false);\n return ()=>{\n window.removeEventListener('resize', onResize, false);\n };\n }, [\n onResize\n ]);\n}\nfunction $2a41e45df1593e64$var$translateRTL(position, direction) {\n if (direction === 'rtl') return position.replace('start', 'right').replace('end', 'left');\n return position.replace('start', 'left').replace('end', 'right');\n}\n\n\nexport {$2a41e45df1593e64$export$d39e1813b3bdd0e1 as useOverlayPosition};\n//# sourceMappingURL=useOverlayPosition.module.js.map\n","import {useRef as $6dfIe$useRef, useCallback as $6dfIe$useCallback} from \"react\";\nimport {useLayoutEffect as $6dfIe$useLayoutEffect, useEffectEvent as $6dfIe$useEffectEvent} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\nclass $8a9cb279dc87e130$export$905e7fc544a71f36 {\n isDefaultPrevented() {\n return this.nativeEvent.defaultPrevented;\n }\n preventDefault() {\n this.defaultPrevented = true;\n this.nativeEvent.preventDefault();\n }\n stopPropagation() {\n this.nativeEvent.stopPropagation();\n this.isPropagationStopped = ()=>true;\n }\n isPropagationStopped() {\n return false;\n }\n persist() {}\n constructor(type, nativeEvent){\n this.nativeEvent = nativeEvent;\n this.target = nativeEvent.target;\n this.currentTarget = nativeEvent.currentTarget;\n this.relatedTarget = nativeEvent.relatedTarget;\n this.bubbles = nativeEvent.bubbles;\n this.cancelable = nativeEvent.cancelable;\n this.defaultPrevented = nativeEvent.defaultPrevented;\n this.eventPhase = nativeEvent.eventPhase;\n this.isTrusted = nativeEvent.isTrusted;\n this.timeStamp = nativeEvent.timeStamp;\n this.type = type;\n }\n}\nfunction $8a9cb279dc87e130$export$715c682d09d639cc(onBlur) {\n let stateRef = (0, $6dfIe$useRef)({\n isFocused: false,\n observer: null\n });\n // Clean up MutationObserver on unmount. See below.\n // eslint-disable-next-line arrow-body-style\n (0, $6dfIe$useLayoutEffect)(()=>{\n const state = stateRef.current;\n return ()=>{\n if (state.observer) {\n state.observer.disconnect();\n state.observer = null;\n }\n };\n }, []);\n let dispatchBlur = (0, $6dfIe$useEffectEvent)((e)=>{\n onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);\n });\n // This function is called during a React onFocus event.\n return (0, $6dfIe$useCallback)((e)=>{\n // React does not fire onBlur when an element is disabled. https://github.com/facebook/react/issues/9142\n // Most browsers fire a native focusout event in this case, except for Firefox. In that case, we use a\n // MutationObserver to watch for the disabled attribute, and dispatch these events ourselves.\n // For browsers that do, focusout fires before the MutationObserver, so onBlur should not fire twice.\n if (e.target instanceof HTMLButtonElement || e.target instanceof HTMLInputElement || e.target instanceof HTMLTextAreaElement || e.target instanceof HTMLSelectElement) {\n stateRef.current.isFocused = true;\n let target = e.target;\n let onBlurHandler = (e)=>{\n stateRef.current.isFocused = false;\n if (target.disabled) // For backward compatibility, dispatch a (fake) React synthetic event.\n dispatchBlur(new $8a9cb279dc87e130$export$905e7fc544a71f36('blur', e));\n // We no longer need the MutationObserver once the target is blurred.\n if (stateRef.current.observer) {\n stateRef.current.observer.disconnect();\n stateRef.current.observer = null;\n }\n };\n target.addEventListener('focusout', onBlurHandler, {\n once: true\n });\n stateRef.current.observer = new MutationObserver(()=>{\n if (stateRef.current.isFocused && target.disabled) {\n var _stateRef_current_observer;\n (_stateRef_current_observer = stateRef.current.observer) === null || _stateRef_current_observer === void 0 ? void 0 : _stateRef_current_observer.disconnect();\n let relatedTargetEl = target === document.activeElement ? null : document.activeElement;\n target.dispatchEvent(new FocusEvent('blur', {\n relatedTarget: relatedTargetEl\n }));\n target.dispatchEvent(new FocusEvent('focusout', {\n bubbles: true,\n relatedTarget: relatedTargetEl\n }));\n }\n });\n stateRef.current.observer.observe(target, {\n attributes: true,\n attributeFilter: [\n 'disabled'\n ]\n });\n }\n }, [\n dispatchBlur\n ]);\n}\n\n\nexport {$8a9cb279dc87e130$export$905e7fc544a71f36 as SyntheticFocusEvent, $8a9cb279dc87e130$export$715c682d09d639cc as useSyntheticBlurEvent};\n//# sourceMappingURL=utils.module.js.map\n","import {useSyntheticBlurEvent as $8a9cb279dc87e130$export$715c682d09d639cc} from \"./utils.mjs\";\nimport {useRef as $3b9Q0$useRef, useCallback as $3b9Q0$useCallback} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\n\nfunction $9ab94262bd0047c7$export$420e68273165f4ec(props) {\n let { isDisabled: isDisabled, onBlurWithin: onBlurWithin, onFocusWithin: onFocusWithin, onFocusWithinChange: onFocusWithinChange } = props;\n let state = (0, $3b9Q0$useRef)({\n isFocusWithin: false\n });\n let onBlur = (0, $3b9Q0$useCallback)((e)=>{\n // We don't want to trigger onBlurWithin and then immediately onFocusWithin again\n // when moving focus inside the element. Only trigger if the currentTarget doesn't\n // include the relatedTarget (where focus is moving).\n if (state.current.isFocusWithin && !e.currentTarget.contains(e.relatedTarget)) {\n state.current.isFocusWithin = false;\n if (onBlurWithin) onBlurWithin(e);\n if (onFocusWithinChange) onFocusWithinChange(false);\n }\n }, [\n onBlurWithin,\n onFocusWithinChange,\n state\n ]);\n let onSyntheticFocus = (0, $8a9cb279dc87e130$export$715c682d09d639cc)(onBlur);\n let onFocus = (0, $3b9Q0$useCallback)((e)=>{\n // Double check that document.activeElement actually matches e.target in case a previously chained\n // focus handler already moved focus somewhere else.\n if (!state.current.isFocusWithin && document.activeElement === e.target) {\n if (onFocusWithin) onFocusWithin(e);\n if (onFocusWithinChange) onFocusWithinChange(true);\n state.current.isFocusWithin = true;\n onSyntheticFocus(e);\n }\n }, [\n onFocusWithin,\n onFocusWithinChange,\n onSyntheticFocus\n ]);\n if (isDisabled) return {\n focusWithinProps: {\n // These should not have been null, that would conflict in mergeProps\n onFocus: undefined,\n onBlur: undefined\n }\n };\n return {\n focusWithinProps: {\n onFocus: onFocus,\n onBlur: onBlur\n }\n };\n}\n\n\nexport {$9ab94262bd0047c7$export$420e68273165f4ec as useFocusWithin};\n//# sourceMappingURL=useFocusWithin.module.js.map\n","import {useEffectEvent as $ispOf$useEffectEvent, getOwnerDocument as $ispOf$getOwnerDocument} from \"@react-aria/utils\";\nimport {useRef as $ispOf$useRef, useEffect as $ispOf$useEffect} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ // Portions of the code in this file are based on code from react.\n// Original licensing for the following can be found in the\n// NOTICE file in the root directory of this source tree.\n// See https://github.com/facebook/react/tree/cc7c1aece46a6b69b41958d731e0fd27c94bfc6c/packages/react-interactions\n\n\nfunction $e0b6e0b68ec7f50f$export$872b660ac5a1ff98(props) {\n let { ref: ref, onInteractOutside: onInteractOutside, isDisabled: isDisabled, onInteractOutsideStart: onInteractOutsideStart } = props;\n let stateRef = (0, $ispOf$useRef)({\n isPointerDown: false,\n ignoreEmulatedMouseEvents: false\n });\n let onPointerDown = (0, $ispOf$useEffectEvent)((e)=>{\n if (onInteractOutside && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) {\n if (onInteractOutsideStart) onInteractOutsideStart(e);\n stateRef.current.isPointerDown = true;\n }\n });\n let triggerInteractOutside = (0, $ispOf$useEffectEvent)((e)=>{\n if (onInteractOutside) onInteractOutside(e);\n });\n (0, $ispOf$useEffect)(()=>{\n let state = stateRef.current;\n if (isDisabled) return;\n const element = ref.current;\n const documentObject = (0, $ispOf$getOwnerDocument)(element);\n // Use pointer events if available. Otherwise, fall back to mouse and touch events.\n if (typeof PointerEvent !== 'undefined') {\n let onPointerUp = (e)=>{\n if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) triggerInteractOutside(e);\n state.isPointerDown = false;\n };\n // changing these to capture phase fixed combobox\n documentObject.addEventListener('pointerdown', onPointerDown, true);\n documentObject.addEventListener('pointerup', onPointerUp, true);\n return ()=>{\n documentObject.removeEventListener('pointerdown', onPointerDown, true);\n documentObject.removeEventListener('pointerup', onPointerUp, true);\n };\n } else {\n let onMouseUp = (e)=>{\n if (state.ignoreEmulatedMouseEvents) state.ignoreEmulatedMouseEvents = false;\n else if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) triggerInteractOutside(e);\n state.isPointerDown = false;\n };\n let onTouchEnd = (e)=>{\n state.ignoreEmulatedMouseEvents = true;\n if (state.isPointerDown && $e0b6e0b68ec7f50f$var$isValidEvent(e, ref)) triggerInteractOutside(e);\n state.isPointerDown = false;\n };\n documentObject.addEventListener('mousedown', onPointerDown, true);\n documentObject.addEventListener('mouseup', onMouseUp, true);\n documentObject.addEventListener('touchstart', onPointerDown, true);\n documentObject.addEventListener('touchend', onTouchEnd, true);\n return ()=>{\n documentObject.removeEventListener('mousedown', onPointerDown, true);\n documentObject.removeEventListener('mouseup', onMouseUp, true);\n documentObject.removeEventListener('touchstart', onPointerDown, true);\n documentObject.removeEventListener('touchend', onTouchEnd, true);\n };\n }\n }, [\n ref,\n isDisabled,\n onPointerDown,\n triggerInteractOutside\n ]);\n}\nfunction $e0b6e0b68ec7f50f$var$isValidEvent(event, ref) {\n if (event.button > 0) return false;\n if (event.target) {\n // if the event target is no longer in the document, ignore\n const ownerDocument = event.target.ownerDocument;\n if (!ownerDocument || !ownerDocument.documentElement.contains(event.target)) return false;\n // If the target is within a top layer element (e.g. toasts), ignore.\n if (event.target.closest('[data-react-aria-top-layer]')) return false;\n }\n return ref.current && !ref.current.contains(event.target);\n}\n\n\nexport {$e0b6e0b68ec7f50f$export$872b660ac5a1ff98 as useInteractOutside};\n//# sourceMappingURL=useInteractOutside.module.js.map\n","import {focusSafely as $6a99195332edec8b$export$80f3e147d781571c} from \"./focusSafely.mjs\";\nimport {isElementVisible as $645f2e67b85a24c9$export$e989c0fffaa6b27a} from \"./isElementVisible.mjs\";\nimport {useLayoutEffect as $cgawC$useLayoutEffect, getOwnerDocument as $cgawC$getOwnerDocument} from \"@react-aria/utils\";\nimport $cgawC$react, {useRef as $cgawC$useRef, useContext as $cgawC$useContext, useMemo as $cgawC$useMemo, useEffect as $cgawC$useEffect} from \"react\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\n\nconst $9bf71ea28793e738$var$FocusContext = /*#__PURE__*/ (0, $cgawC$react).createContext(null);\nconst $9bf71ea28793e738$var$RESTORE_FOCUS_EVENT = 'react-aria-focus-scope-restore';\nlet $9bf71ea28793e738$var$activeScope = null;\nfunction $9bf71ea28793e738$export$20e40289641fbbb6(props) {\n let { children: children, contain: contain, restoreFocus: restoreFocus, autoFocus: autoFocus } = props;\n let startRef = (0, $cgawC$useRef)(null);\n let endRef = (0, $cgawC$useRef)(null);\n let scopeRef = (0, $cgawC$useRef)([]);\n let { parentNode: parentNode } = (0, $cgawC$useContext)($9bf71ea28793e738$var$FocusContext) || {};\n // Create a tree node here so we can add children to it even before it is added to the tree.\n let node = (0, $cgawC$useMemo)(()=>new $9bf71ea28793e738$var$TreeNode({\n scopeRef: scopeRef\n }), [\n scopeRef\n ]);\n (0, $cgawC$useLayoutEffect)(()=>{\n // If a new scope mounts outside the active scope, (e.g. DialogContainer launched from a menu),\n // use the active scope as the parent instead of the parent from context. Layout effects run bottom\n // up, so if the parent is not yet added to the tree, don't do this. Only the outer-most FocusScope\n // that is being added should get the activeScope as its parent.\n let parent = parentNode || $9bf71ea28793e738$export$d06fae2ee68b101e.root;\n if ($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(parent.scopeRef) && $9bf71ea28793e738$var$activeScope && !$9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, parent.scopeRef)) {\n let activeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);\n if (activeNode) parent = activeNode;\n }\n // Add the node to the parent, and to the tree.\n parent.addChild(node);\n $9bf71ea28793e738$export$d06fae2ee68b101e.addNode(node);\n }, [\n node,\n parentNode\n ]);\n (0, $cgawC$useLayoutEffect)(()=>{\n let node = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);\n if (node) node.contain = !!contain;\n }, [\n contain\n ]);\n (0, $cgawC$useLayoutEffect)(()=>{\n var _startRef_current;\n // Find all rendered nodes between the sentinels and add them to the scope.\n let node = (_startRef_current = startRef.current) === null || _startRef_current === void 0 ? void 0 : _startRef_current.nextSibling;\n let nodes = [];\n let stopPropagation = (e)=>e.stopPropagation();\n while(node && node !== endRef.current){\n nodes.push(node);\n // Stop custom restore focus event from propagating to parent focus scopes.\n node.addEventListener($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, stopPropagation);\n node = node.nextSibling;\n }\n scopeRef.current = nodes;\n return ()=>{\n for (let node of nodes)node.removeEventListener($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, stopPropagation);\n };\n }, [\n children\n ]);\n $9bf71ea28793e738$var$useActiveScopeTracker(scopeRef, restoreFocus, contain);\n $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain);\n $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain);\n $9bf71ea28793e738$var$useAutoFocus(scopeRef, autoFocus);\n // This needs to be an effect so that activeScope is updated after the FocusScope tree is complete.\n // It cannot be a useLayoutEffect because the parent of this node hasn't been attached in the tree yet.\n (0, $cgawC$useEffect)(()=>{\n const activeElement = (0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined).activeElement;\n let scope = null;\n if ($9bf71ea28793e738$var$isElementInScope(activeElement, scopeRef.current)) {\n // We need to traverse the focusScope tree and find the bottom most scope that\n // contains the active element and set that as the activeScope.\n for (let node of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse())if (node.scopeRef && $9bf71ea28793e738$var$isElementInScope(activeElement, node.scopeRef.current)) scope = node;\n if (scope === $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef)) $9bf71ea28793e738$var$activeScope = scope.scopeRef;\n }\n }, [\n scopeRef\n ]);\n // This layout effect cleanup is so that the tree node is removed synchronously with react before the RAF\n // in useRestoreFocus cleanup runs.\n (0, $cgawC$useLayoutEffect)(()=>{\n return ()=>{\n var _focusScopeTree_getTreeNode_parent, _focusScopeTree_getTreeNode;\n var _focusScopeTree_getTreeNode_parent_scopeRef;\n // Scope may have been re-parented.\n let parentScope = (_focusScopeTree_getTreeNode_parent_scopeRef = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : (_focusScopeTree_getTreeNode_parent = _focusScopeTree_getTreeNode.parent) === null || _focusScopeTree_getTreeNode_parent === void 0 ? void 0 : _focusScopeTree_getTreeNode_parent.scopeRef) !== null && _focusScopeTree_getTreeNode_parent_scopeRef !== void 0 ? _focusScopeTree_getTreeNode_parent_scopeRef : null;\n if ((scopeRef === $9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope(scopeRef, $9bf71ea28793e738$var$activeScope)) && (!parentScope || $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(parentScope))) $9bf71ea28793e738$var$activeScope = parentScope;\n $9bf71ea28793e738$export$d06fae2ee68b101e.removeTreeNode(scopeRef);\n };\n }, [\n scopeRef\n ]);\n let focusManager = (0, $cgawC$useMemo)(()=>$9bf71ea28793e738$var$createFocusManagerForScope(scopeRef), []);\n let value = (0, $cgawC$useMemo)(()=>({\n focusManager: focusManager,\n parentNode: node\n }), [\n node,\n focusManager\n ]);\n return /*#__PURE__*/ (0, $cgawC$react).createElement($9bf71ea28793e738$var$FocusContext.Provider, {\n value: value\n }, /*#__PURE__*/ (0, $cgawC$react).createElement(\"span\", {\n \"data-focus-scope-start\": true,\n hidden: true,\n ref: startRef\n }), children, /*#__PURE__*/ (0, $cgawC$react).createElement(\"span\", {\n \"data-focus-scope-end\": true,\n hidden: true,\n ref: endRef\n }));\n}\nfunction $9bf71ea28793e738$export$10c5169755ce7bd7() {\n var _useContext;\n return (_useContext = (0, $cgawC$useContext)($9bf71ea28793e738$var$FocusContext)) === null || _useContext === void 0 ? void 0 : _useContext.focusManager;\n}\nfunction $9bf71ea28793e738$var$createFocusManagerForScope(scopeRef) {\n return {\n focusNext (opts = {}) {\n let scope = scopeRef.current;\n let { from: from, tabbable: tabbable, wrap: wrap, accept: accept } = opts;\n let node = from || (0, $cgawC$getOwnerDocument)(scope[0]).activeElement;\n let sentinel = scope[0].previousElementSibling;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable,\n accept: accept\n }, scope);\n walker.currentNode = $9bf71ea28793e738$var$isElementInScope(node, scope) ? node : sentinel;\n let nextNode = walker.nextNode();\n if (!nextNode && wrap) {\n walker.currentNode = sentinel;\n nextNode = walker.nextNode();\n }\n if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);\n return nextNode;\n },\n focusPrevious (opts = {}) {\n let scope = scopeRef.current;\n let { from: from, tabbable: tabbable, wrap: wrap, accept: accept } = opts;\n let node = from || (0, $cgawC$getOwnerDocument)(scope[0]).activeElement;\n let sentinel = scope[scope.length - 1].nextElementSibling;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable,\n accept: accept\n }, scope);\n walker.currentNode = $9bf71ea28793e738$var$isElementInScope(node, scope) ? node : sentinel;\n let previousNode = walker.previousNode();\n if (!previousNode && wrap) {\n walker.currentNode = sentinel;\n previousNode = walker.previousNode();\n }\n if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);\n return previousNode;\n },\n focusFirst (opts = {}) {\n let scope = scopeRef.current;\n let { tabbable: tabbable, accept: accept } = opts;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable,\n accept: accept\n }, scope);\n walker.currentNode = scope[0].previousElementSibling;\n let nextNode = walker.nextNode();\n if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);\n return nextNode;\n },\n focusLast (opts = {}) {\n let scope = scopeRef.current;\n let { tabbable: tabbable, accept: accept } = opts;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable,\n accept: accept\n }, scope);\n walker.currentNode = scope[scope.length - 1].nextElementSibling;\n let previousNode = walker.previousNode();\n if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);\n return previousNode;\n }\n };\n}\nconst $9bf71ea28793e738$var$focusableElements = [\n 'input:not([disabled]):not([type=hidden])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n 'button:not([disabled])',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[contenteditable]'\n];\nconst $9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR = $9bf71ea28793e738$var$focusableElements.join(':not([hidden]),') + ',[tabindex]:not([disabled]):not([hidden])';\n$9bf71ea28793e738$var$focusableElements.push('[tabindex]:not([tabindex=\"-1\"]):not([disabled])');\nconst $9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR = $9bf71ea28793e738$var$focusableElements.join(':not([hidden]):not([tabindex=\"-1\"]),');\nfunction $9bf71ea28793e738$export$4c063cf1350e6fed(element) {\n return element.matches($9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR);\n}\nfunction $9bf71ea28793e738$var$getScopeRoot(scope) {\n return scope[0].parentElement;\n}\nfunction $9bf71ea28793e738$var$shouldContainFocus(scopeRef) {\n let scope = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);\n while(scope && scope.scopeRef !== scopeRef){\n if (scope.contain) return false;\n scope = scope.parent;\n }\n return true;\n}\nfunction $9bf71ea28793e738$var$useFocusContainment(scopeRef, contain) {\n let focusedNode = (0, $cgawC$useRef)(undefined);\n let raf = (0, $cgawC$useRef)(undefined);\n (0, $cgawC$useLayoutEffect)(()=>{\n let scope = scopeRef.current;\n if (!contain) {\n // if contain was changed, then we should cancel any ongoing waits to pull focus back into containment\n if (raf.current) {\n cancelAnimationFrame(raf.current);\n raf.current = undefined;\n }\n return;\n }\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scope ? scope[0] : undefined);\n // Handle the Tab key to contain focus within the scope\n let onKeyDown = (e)=>{\n if (e.key !== 'Tab' || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing) return;\n let focusedElement = ownerDocument.activeElement;\n let scope = scopeRef.current;\n if (!scope || !$9bf71ea28793e738$var$isElementInScope(focusedElement, scope)) return;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: true\n }, scope);\n if (!focusedElement) return;\n walker.currentNode = focusedElement;\n let nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();\n if (!nextElement) {\n walker.currentNode = e.shiftKey ? scope[scope.length - 1].nextElementSibling : scope[0].previousElementSibling;\n nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();\n }\n e.preventDefault();\n if (nextElement) $9bf71ea28793e738$var$focusElement(nextElement, true);\n };\n let onFocus = (e)=>{\n // If focusing an element in a child scope of the currently active scope, the child becomes active.\n // Moving out of the active scope to an ancestor is not allowed.\n if ((!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) && $9bf71ea28793e738$var$isElementInScope(e.target, scopeRef.current)) {\n $9bf71ea28793e738$var$activeScope = scopeRef;\n focusedNode.current = e.target;\n } else if ($9bf71ea28793e738$var$shouldContainFocus(scopeRef) && !$9bf71ea28793e738$var$isElementInChildScope(e.target, scopeRef)) {\n // If a focus event occurs outside the active scope (e.g. user tabs from browser location bar),\n // restore focus to the previously focused node or the first tabbable element in the active scope.\n if (focusedNode.current) focusedNode.current.focus();\n else if ($9bf71ea28793e738$var$activeScope && $9bf71ea28793e738$var$activeScope.current) $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);\n } else if ($9bf71ea28793e738$var$shouldContainFocus(scopeRef)) focusedNode.current = e.target;\n };\n let onBlur = (e)=>{\n // Firefox doesn't shift focus back to the Dialog properly without this\n if (raf.current) cancelAnimationFrame(raf.current);\n raf.current = requestAnimationFrame(()=>{\n // Use document.activeElement instead of e.relatedTarget so we can tell if user clicked into iframe\n if (ownerDocument.activeElement && $9bf71ea28793e738$var$shouldContainFocus(scopeRef) && !$9bf71ea28793e738$var$isElementInChildScope(ownerDocument.activeElement, scopeRef)) {\n $9bf71ea28793e738$var$activeScope = scopeRef;\n if (ownerDocument.body.contains(e.target)) {\n var _focusedNode_current;\n focusedNode.current = e.target;\n (_focusedNode_current = focusedNode.current) === null || _focusedNode_current === void 0 ? void 0 : _focusedNode_current.focus();\n } else if ($9bf71ea28793e738$var$activeScope.current) $9bf71ea28793e738$var$focusFirstInScope($9bf71ea28793e738$var$activeScope.current);\n }\n });\n };\n ownerDocument.addEventListener('keydown', onKeyDown, false);\n ownerDocument.addEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusout', onBlur, false));\n return ()=>{\n ownerDocument.removeEventListener('keydown', onKeyDown, false);\n ownerDocument.removeEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusout', onBlur, false));\n };\n }, [\n scopeRef,\n contain\n ]);\n // This is a useLayoutEffect so it is guaranteed to run before our async synthetic blur\n // eslint-disable-next-line arrow-body-style\n (0, $cgawC$useLayoutEffect)(()=>{\n return ()=>{\n if (raf.current) cancelAnimationFrame(raf.current);\n };\n }, [\n raf\n ]);\n}\nfunction $9bf71ea28793e738$var$isElementInAnyScope(element) {\n return $9bf71ea28793e738$var$isElementInChildScope(element);\n}\nfunction $9bf71ea28793e738$var$isElementInScope(element, scope) {\n if (!element) return false;\n if (!scope) return false;\n return scope.some((node)=>node.contains(element));\n}\nfunction $9bf71ea28793e738$var$isElementInChildScope(element, scope = null) {\n // If the element is within a top layer element (e.g. toasts), always allow moving focus there.\n if (element instanceof Element && element.closest('[data-react-aria-top-layer]')) return true;\n // node.contains in isElementInScope covers child scopes that are also DOM children,\n // but does not cover child scopes in portals.\n for (let { scopeRef: s } of $9bf71ea28793e738$export$d06fae2ee68b101e.traverse($9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scope))){\n if (s && $9bf71ea28793e738$var$isElementInScope(element, s.current)) return true;\n }\n return false;\n}\nfunction $9bf71ea28793e738$export$1258395f99bf9cbf(element) {\n return $9bf71ea28793e738$var$isElementInChildScope(element, $9bf71ea28793e738$var$activeScope);\n}\nfunction $9bf71ea28793e738$var$isAncestorScope(ancestor, scope) {\n var _focusScopeTree_getTreeNode;\n let parent = (_focusScopeTree_getTreeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scope)) === null || _focusScopeTree_getTreeNode === void 0 ? void 0 : _focusScopeTree_getTreeNode.parent;\n while(parent){\n if (parent.scopeRef === ancestor) return true;\n parent = parent.parent;\n }\n return false;\n}\nfunction $9bf71ea28793e738$var$focusElement(element, scroll = false) {\n if (element != null && !scroll) try {\n (0, $6a99195332edec8b$export$80f3e147d781571c)(element);\n } catch (err) {\n // ignore\n }\n else if (element != null) try {\n element.focus();\n } catch (err) {\n // ignore\n }\n}\nfunction $9bf71ea28793e738$var$getFirstInScope(scope, tabbable = true) {\n let sentinel = scope[0].previousElementSibling;\n let scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: tabbable\n }, scope);\n walker.currentNode = sentinel;\n let nextNode = walker.nextNode();\n // If the scope does not contain a tabbable element, use the first focusable element.\n if (tabbable && !nextNode) {\n scopeRoot = $9bf71ea28793e738$var$getScopeRoot(scope);\n walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(scopeRoot, {\n tabbable: false\n }, scope);\n walker.currentNode = sentinel;\n nextNode = walker.nextNode();\n }\n return nextNode;\n}\nfunction $9bf71ea28793e738$var$focusFirstInScope(scope, tabbable = true) {\n $9bf71ea28793e738$var$focusElement($9bf71ea28793e738$var$getFirstInScope(scope, tabbable));\n}\nfunction $9bf71ea28793e738$var$useAutoFocus(scopeRef, autoFocus) {\n const autoFocusRef = (0, $cgawC$react).useRef(autoFocus);\n (0, $cgawC$useEffect)(()=>{\n if (autoFocusRef.current) {\n $9bf71ea28793e738$var$activeScope = scopeRef;\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined);\n if (!$9bf71ea28793e738$var$isElementInScope(ownerDocument.activeElement, $9bf71ea28793e738$var$activeScope.current) && scopeRef.current) $9bf71ea28793e738$var$focusFirstInScope(scopeRef.current);\n }\n autoFocusRef.current = false;\n }, [\n scopeRef\n ]);\n}\nfunction $9bf71ea28793e738$var$useActiveScopeTracker(scopeRef, restore, contain) {\n // tracks the active scope, in case restore and contain are both false.\n // if either are true, this is tracked in useRestoreFocus or useFocusContainment.\n (0, $cgawC$useLayoutEffect)(()=>{\n if (restore || contain) return;\n let scope = scopeRef.current;\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scope ? scope[0] : undefined);\n let onFocus = (e)=>{\n let target = e.target;\n if ($9bf71ea28793e738$var$isElementInScope(target, scopeRef.current)) $9bf71ea28793e738$var$activeScope = scopeRef;\n else if (!$9bf71ea28793e738$var$isElementInAnyScope(target)) $9bf71ea28793e738$var$activeScope = null;\n };\n ownerDocument.addEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));\n return ()=>{\n ownerDocument.removeEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));\n };\n }, [\n scopeRef,\n restore,\n contain\n ]);\n}\nfunction $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef) {\n let scope = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode($9bf71ea28793e738$var$activeScope);\n while(scope && scope.scopeRef !== scopeRef){\n if (scope.nodeToRestore) return false;\n scope = scope.parent;\n }\n return (scope === null || scope === void 0 ? void 0 : scope.scopeRef) === scopeRef;\n}\nfunction $9bf71ea28793e738$var$useRestoreFocus(scopeRef, restoreFocus, contain) {\n // create a ref during render instead of useLayoutEffect so the active element is saved before a child with autoFocus=true mounts.\n // eslint-disable-next-line no-restricted-globals\n const nodeToRestoreRef = (0, $cgawC$useRef)(typeof document !== 'undefined' ? (0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined).activeElement : null);\n // restoring scopes should all track if they are active regardless of contain, but contain already tracks it plus logic to contain the focus\n // restoring-non-containing scopes should only care if they become active so they can perform the restore\n (0, $cgawC$useLayoutEffect)(()=>{\n let scope = scopeRef.current;\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scope ? scope[0] : undefined);\n if (!restoreFocus || contain) return;\n let onFocus = ()=>{\n // If focusing an element in a child scope of the currently active scope, the child becomes active.\n // Moving out of the active scope to an ancestor is not allowed.\n if ((!$9bf71ea28793e738$var$activeScope || $9bf71ea28793e738$var$isAncestorScope($9bf71ea28793e738$var$activeScope, scopeRef)) && $9bf71ea28793e738$var$isElementInScope(ownerDocument.activeElement, scopeRef.current)) $9bf71ea28793e738$var$activeScope = scopeRef;\n };\n ownerDocument.addEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.addEventListener('focusin', onFocus, false));\n return ()=>{\n ownerDocument.removeEventListener('focusin', onFocus, false);\n scope === null || scope === void 0 ? void 0 : scope.forEach((element)=>element.removeEventListener('focusin', onFocus, false));\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n scopeRef,\n contain\n ]);\n (0, $cgawC$useLayoutEffect)(()=>{\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined);\n if (!restoreFocus) return;\n // Handle the Tab key so that tabbing out of the scope goes to the next element\n // after the node that had focus when the scope mounted. This is important when\n // using portals for overlays, so that focus goes to the expected element when\n // tabbing out of the overlay.\n let onKeyDown = (e)=>{\n if (e.key !== 'Tab' || e.altKey || e.ctrlKey || e.metaKey || !$9bf71ea28793e738$var$shouldContainFocus(scopeRef) || e.isComposing) return;\n let focusedElement = ownerDocument.activeElement;\n if (!$9bf71ea28793e738$var$isElementInScope(focusedElement, scopeRef.current)) return;\n let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);\n if (!treeNode) return;\n let nodeToRestore = treeNode.nodeToRestore;\n // Create a DOM tree walker that matches all tabbable elements\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(ownerDocument.body, {\n tabbable: true\n });\n // Find the next tabbable element after the currently focused element\n walker.currentNode = focusedElement;\n let nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();\n if (!nodeToRestore || !ownerDocument.body.contains(nodeToRestore) || nodeToRestore === ownerDocument.body) {\n nodeToRestore = undefined;\n treeNode.nodeToRestore = undefined;\n }\n // If there is no next element, or it is outside the current scope, move focus to the\n // next element after the node to restore to instead.\n if ((!nextElement || !$9bf71ea28793e738$var$isElementInScope(nextElement, scopeRef.current)) && nodeToRestore) {\n walker.currentNode = nodeToRestore;\n // Skip over elements within the scope, in case the scope immediately follows the node to restore.\n do nextElement = e.shiftKey ? walker.previousNode() : walker.nextNode();\n while ($9bf71ea28793e738$var$isElementInScope(nextElement, scopeRef.current));\n e.preventDefault();\n e.stopPropagation();\n if (nextElement) $9bf71ea28793e738$var$focusElement(nextElement, true);\n else // If there is no next element and the nodeToRestore isn't within a FocusScope (i.e. we are leaving the top level focus scope)\n // then move focus to the body.\n // Otherwise restore focus to the nodeToRestore (e.g menu within a popover -> tabbing to close the menu should move focus to menu trigger)\n if (!$9bf71ea28793e738$var$isElementInAnyScope(nodeToRestore)) focusedElement.blur();\n else $9bf71ea28793e738$var$focusElement(nodeToRestore, true);\n }\n };\n if (!contain) ownerDocument.addEventListener('keydown', onKeyDown, true);\n return ()=>{\n if (!contain) ownerDocument.removeEventListener('keydown', onKeyDown, true);\n };\n }, [\n scopeRef,\n restoreFocus,\n contain\n ]);\n // useLayoutEffect instead of useEffect so the active element is saved synchronously instead of asynchronously.\n (0, $cgawC$useLayoutEffect)(()=>{\n const ownerDocument = (0, $cgawC$getOwnerDocument)(scopeRef.current ? scopeRef.current[0] : undefined);\n if (!restoreFocus) return;\n let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);\n if (!treeNode) return;\n var _nodeToRestoreRef_current;\n treeNode.nodeToRestore = (_nodeToRestoreRef_current = nodeToRestoreRef.current) !== null && _nodeToRestoreRef_current !== void 0 ? _nodeToRestoreRef_current : undefined;\n return ()=>{\n let treeNode = $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(scopeRef);\n if (!treeNode) return;\n let nodeToRestore = treeNode.nodeToRestore;\n // if we already lost focus to the body and this was the active scope, then we should attempt to restore\n if (restoreFocus && nodeToRestore && // eslint-disable-next-line react-hooks/exhaustive-deps\n ($9bf71ea28793e738$var$isElementInScope(ownerDocument.activeElement, scopeRef.current) || ownerDocument.activeElement === ownerDocument.body && $9bf71ea28793e738$var$shouldRestoreFocus(scopeRef))) {\n // freeze the focusScopeTree so it persists after the raf, otherwise during unmount nodes are removed from it\n let clonedTree = $9bf71ea28793e738$export$d06fae2ee68b101e.clone();\n requestAnimationFrame(()=>{\n // Only restore focus if we've lost focus to the body, the alternative is that focus has been purposefully moved elsewhere\n if (ownerDocument.activeElement === ownerDocument.body) {\n // look up the tree starting with our scope to find a nodeToRestore still in the DOM\n let treeNode = clonedTree.getTreeNode(scopeRef);\n while(treeNode){\n if (treeNode.nodeToRestore && treeNode.nodeToRestore.isConnected) {\n $9bf71ea28793e738$var$restoreFocusToElement(treeNode.nodeToRestore);\n return;\n }\n treeNode = treeNode.parent;\n }\n // If no nodeToRestore was found, focus the first element in the nearest\n // ancestor scope that is still in the tree.\n treeNode = clonedTree.getTreeNode(scopeRef);\n while(treeNode){\n if (treeNode.scopeRef && treeNode.scopeRef.current && $9bf71ea28793e738$export$d06fae2ee68b101e.getTreeNode(treeNode.scopeRef)) {\n let node = $9bf71ea28793e738$var$getFirstInScope(treeNode.scopeRef.current, true);\n $9bf71ea28793e738$var$restoreFocusToElement(node);\n return;\n }\n treeNode = treeNode.parent;\n }\n }\n });\n }\n };\n }, [\n scopeRef,\n restoreFocus\n ]);\n}\nfunction $9bf71ea28793e738$var$restoreFocusToElement(node) {\n // Dispatch a custom event that parent elements can intercept to customize focus restoration.\n // For example, virtualized collection components reuse DOM elements, so the original element\n // might still exist in the DOM but representing a different item.\n if (node.dispatchEvent(new CustomEvent($9bf71ea28793e738$var$RESTORE_FOCUS_EVENT, {\n bubbles: true,\n cancelable: true\n }))) $9bf71ea28793e738$var$focusElement(node);\n}\nfunction $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, opts, scope) {\n let selector = (opts === null || opts === void 0 ? void 0 : opts.tabbable) ? $9bf71ea28793e738$var$TABBABLE_ELEMENT_SELECTOR : $9bf71ea28793e738$var$FOCUSABLE_ELEMENT_SELECTOR;\n let walker = (0, $cgawC$getOwnerDocument)(root).createTreeWalker(root, NodeFilter.SHOW_ELEMENT, {\n acceptNode (node) {\n var _opts_from;\n // Skip nodes inside the starting node.\n if (opts === null || opts === void 0 ? void 0 : (_opts_from = opts.from) === null || _opts_from === void 0 ? void 0 : _opts_from.contains(node)) return NodeFilter.FILTER_REJECT;\n if (node.matches(selector) && (0, $645f2e67b85a24c9$export$e989c0fffaa6b27a)(node) && (!scope || $9bf71ea28793e738$var$isElementInScope(node, scope)) && (!(opts === null || opts === void 0 ? void 0 : opts.accept) || opts.accept(node))) return NodeFilter.FILTER_ACCEPT;\n return NodeFilter.FILTER_SKIP;\n }\n });\n if (opts === null || opts === void 0 ? void 0 : opts.from) walker.currentNode = opts.from;\n return walker;\n}\nfunction $9bf71ea28793e738$export$c5251b9e124bf29(ref, defaultOptions = {}) {\n return {\n focusNext (opts = {}) {\n let root = ref.current;\n if (!root) return null;\n let { from: from, tabbable: tabbable = defaultOptions.tabbable, wrap: wrap = defaultOptions.wrap, accept: accept = defaultOptions.accept } = opts;\n let node = from || (0, $cgawC$getOwnerDocument)(root).activeElement;\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {\n tabbable: tabbable,\n accept: accept\n });\n if (root.contains(node)) walker.currentNode = node;\n let nextNode = walker.nextNode();\n if (!nextNode && wrap) {\n walker.currentNode = root;\n nextNode = walker.nextNode();\n }\n if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);\n return nextNode;\n },\n focusPrevious (opts = defaultOptions) {\n let root = ref.current;\n if (!root) return null;\n let { from: from, tabbable: tabbable = defaultOptions.tabbable, wrap: wrap = defaultOptions.wrap, accept: accept = defaultOptions.accept } = opts;\n let node = from || (0, $cgawC$getOwnerDocument)(root).activeElement;\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {\n tabbable: tabbable,\n accept: accept\n });\n if (root.contains(node)) walker.currentNode = node;\n else {\n let next = $9bf71ea28793e738$var$last(walker);\n if (next) $9bf71ea28793e738$var$focusElement(next, true);\n return next !== null && next !== void 0 ? next : null;\n }\n let previousNode = walker.previousNode();\n if (!previousNode && wrap) {\n walker.currentNode = root;\n let lastNode = $9bf71ea28793e738$var$last(walker);\n if (!lastNode) // couldn't wrap\n return null;\n previousNode = lastNode;\n }\n if (previousNode) $9bf71ea28793e738$var$focusElement(previousNode, true);\n return previousNode !== null && previousNode !== void 0 ? previousNode : null;\n },\n focusFirst (opts = defaultOptions) {\n let root = ref.current;\n if (!root) return null;\n let { tabbable: tabbable = defaultOptions.tabbable, accept: accept = defaultOptions.accept } = opts;\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {\n tabbable: tabbable,\n accept: accept\n });\n let nextNode = walker.nextNode();\n if (nextNode) $9bf71ea28793e738$var$focusElement(nextNode, true);\n return nextNode;\n },\n focusLast (opts = defaultOptions) {\n let root = ref.current;\n if (!root) return null;\n let { tabbable: tabbable = defaultOptions.tabbable, accept: accept = defaultOptions.accept } = opts;\n let walker = $9bf71ea28793e738$export$2d6ec8fc375ceafa(root, {\n tabbable: tabbable,\n accept: accept\n });\n let next = $9bf71ea28793e738$var$last(walker);\n if (next) $9bf71ea28793e738$var$focusElement(next, true);\n return next !== null && next !== void 0 ? next : null;\n }\n };\n}\nfunction $9bf71ea28793e738$var$last(walker) {\n let next = undefined;\n let last;\n do {\n last = walker.lastChild();\n if (last) next = last;\n }while (last);\n return next;\n}\nclass $9bf71ea28793e738$var$Tree {\n get size() {\n return this.fastMap.size;\n }\n getTreeNode(data) {\n return this.fastMap.get(data);\n }\n addTreeNode(scopeRef, parent, nodeToRestore) {\n let parentNode = this.fastMap.get(parent !== null && parent !== void 0 ? parent : null);\n if (!parentNode) return;\n let node = new $9bf71ea28793e738$var$TreeNode({\n scopeRef: scopeRef\n });\n parentNode.addChild(node);\n node.parent = parentNode;\n this.fastMap.set(scopeRef, node);\n if (nodeToRestore) node.nodeToRestore = nodeToRestore;\n }\n addNode(node) {\n this.fastMap.set(node.scopeRef, node);\n }\n removeTreeNode(scopeRef) {\n // never remove the root\n if (scopeRef === null) return;\n let node = this.fastMap.get(scopeRef);\n if (!node) return;\n let parentNode = node.parent;\n // when we remove a scope, check if any sibling scopes are trying to restore focus to something inside the scope we're removing\n // if we are, then replace the siblings restore with the restore from the scope we're removing\n for (let current of this.traverse())if (current !== node && node.nodeToRestore && current.nodeToRestore && node.scopeRef && node.scopeRef.current && $9bf71ea28793e738$var$isElementInScope(current.nodeToRestore, node.scopeRef.current)) current.nodeToRestore = node.nodeToRestore;\n let children = node.children;\n if (parentNode) {\n parentNode.removeChild(node);\n if (children.size > 0) children.forEach((child)=>parentNode && parentNode.addChild(child));\n }\n this.fastMap.delete(node.scopeRef);\n }\n // Pre Order Depth First\n *traverse(node = this.root) {\n if (node.scopeRef != null) yield node;\n if (node.children.size > 0) for (let child of node.children)yield* this.traverse(child);\n }\n clone() {\n var _node_parent;\n let newTree = new $9bf71ea28793e738$var$Tree();\n var _node_parent_scopeRef;\n for (let node of this.traverse())newTree.addTreeNode(node.scopeRef, (_node_parent_scopeRef = (_node_parent = node.parent) === null || _node_parent === void 0 ? void 0 : _node_parent.scopeRef) !== null && _node_parent_scopeRef !== void 0 ? _node_parent_scopeRef : null, node.nodeToRestore);\n return newTree;\n }\n constructor(){\n this.fastMap = new Map();\n this.root = new $9bf71ea28793e738$var$TreeNode({\n scopeRef: null\n });\n this.fastMap.set(null, this.root);\n }\n}\nclass $9bf71ea28793e738$var$TreeNode {\n addChild(node) {\n this.children.add(node);\n node.parent = this;\n }\n removeChild(node) {\n this.children.delete(node);\n node.parent = undefined;\n }\n constructor(props){\n this.children = new Set();\n this.contain = false;\n this.scopeRef = props.scopeRef;\n }\n}\nlet $9bf71ea28793e738$export$d06fae2ee68b101e = new $9bf71ea28793e738$var$Tree();\n\n\nexport {$9bf71ea28793e738$export$20e40289641fbbb6 as FocusScope, $9bf71ea28793e738$export$d06fae2ee68b101e as focusScopeTree, $9bf71ea28793e738$export$10c5169755ce7bd7 as useFocusManager, $9bf71ea28793e738$export$2d6ec8fc375ceafa as getFocusableTreeWalker, $9bf71ea28793e738$export$4c063cf1350e6fed as isFocusable, $9bf71ea28793e738$export$1258395f99bf9cbf as isElementInChildOfActiveScope, $9bf71ea28793e738$export$c5251b9e124bf29 as createFocusManager};\n//# sourceMappingURL=FocusScope.module.js.map\n","import {isElementInChildOfActiveScope as $jtpZv$isElementInChildOfActiveScope} from \"@react-aria/focus\";\nimport {useEffect as $jtpZv$useEffect} from \"react\";\nimport {useInteractOutside as $jtpZv$useInteractOutside, useFocusWithin as $jtpZv$useFocusWithin} from \"@react-aria/interactions\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nconst $a11501f3d1d39e6c$var$visibleOverlays = [];\nfunction $a11501f3d1d39e6c$export$ea8f71083e90600f(props, ref) {\n let { onClose: onClose, shouldCloseOnBlur: shouldCloseOnBlur, isOpen: isOpen, isDismissable: isDismissable = false, isKeyboardDismissDisabled: isKeyboardDismissDisabled = false, shouldCloseOnInteractOutside: shouldCloseOnInteractOutside } = props;\n // Add the overlay ref to the stack of visible overlays on mount, and remove on unmount.\n (0, $jtpZv$useEffect)(()=>{\n if (isOpen) $a11501f3d1d39e6c$var$visibleOverlays.push(ref);\n return ()=>{\n let index = $a11501f3d1d39e6c$var$visibleOverlays.indexOf(ref);\n if (index >= 0) $a11501f3d1d39e6c$var$visibleOverlays.splice(index, 1);\n };\n }, [\n isOpen,\n ref\n ]);\n // Only hide the overlay when it is the topmost visible overlay in the stack\n let onHide = ()=>{\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref && onClose) onClose();\n };\n let onInteractOutsideStart = (e)=>{\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {\n e.stopPropagation();\n e.preventDefault();\n }\n }\n };\n let onInteractOutside = (e)=>{\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.target)) {\n if ($a11501f3d1d39e6c$var$visibleOverlays[$a11501f3d1d39e6c$var$visibleOverlays.length - 1] === ref) {\n e.stopPropagation();\n e.preventDefault();\n }\n onHide();\n }\n };\n // Handle the escape key\n let onKeyDown = (e)=>{\n if (e.key === 'Escape' && !isKeyboardDismissDisabled && !e.nativeEvent.isComposing) {\n e.stopPropagation();\n e.preventDefault();\n onHide();\n }\n };\n // Handle clicking outside the overlay to close it\n (0, $jtpZv$useInteractOutside)({\n ref: ref,\n onInteractOutside: isDismissable && isOpen ? onInteractOutside : null,\n onInteractOutsideStart: onInteractOutsideStart\n });\n let { focusWithinProps: focusWithinProps } = (0, $jtpZv$useFocusWithin)({\n isDisabled: !shouldCloseOnBlur,\n onBlurWithin: (e)=>{\n // Do not close if relatedTarget is null, which means focus is lost to the body.\n // That can happen when switching tabs, or due to a VoiceOver/Chrome bug with Control+Option+Arrow navigation.\n // Clicking on the body to close the overlay should already be handled by useInteractOutside.\n // https://github.com/adobe/react-spectrum/issues/4130\n // https://github.com/adobe/react-spectrum/issues/4922\n //\n // If focus is moving into a child focus scope (e.g. menu inside a dialog),\n // do not close the outer overlay. At this point, the active scope should\n // still be the outer overlay, since blur events run before focus.\n if (!e.relatedTarget || (0, $jtpZv$isElementInChildOfActiveScope)(e.relatedTarget)) return;\n if (!shouldCloseOnInteractOutside || shouldCloseOnInteractOutside(e.relatedTarget)) onClose();\n }\n });\n let onPointerDownUnderlay = (e)=>{\n // fixes a firefox issue that starts text selection https://bugzilla.mozilla.org/show_bug.cgi?id=1675846\n if (e.target === e.currentTarget) e.preventDefault();\n };\n return {\n overlayProps: {\n onKeyDown: onKeyDown,\n ...focusWithinProps\n },\n underlayProps: {\n onPointerDown: onPointerDownUnderlay\n }\n };\n}\n\n\nexport {$a11501f3d1d39e6c$export$ea8f71083e90600f as useOverlay};\n//# sourceMappingURL=useOverlay.module.js.map\n","import {onCloseMap as $dd149f63282afbbf$export$f6211563215e3b37} from \"./useCloseOnScroll.mjs\";\nimport {useEffect as $gMvIk$useEffect} from \"react\";\nimport {useId as $gMvIk$useId} from \"@react-aria/utils\";\n\n/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */ \n\n\nfunction $628037886ba31236$export$f9d5c8beee7d008d(props, state, ref) {\n let { type: type } = props;\n let { isOpen: isOpen } = state;\n // Backward compatibility. Share state close function with useOverlayPosition so it can close on scroll\n // without forcing users to pass onClose.\n (0, $gMvIk$useEffect)(()=>{\n if (ref && ref.current) (0, $dd149f63282afbbf$export$f6211563215e3b37).set(ref.current, state.close);\n });\n // Aria 1.1 supports multiple values for aria-haspopup other than just menus.\n // https://www.w3.org/TR/wai-aria-1.1/#aria-haspopup\n // However, we only add it for menus for now because screen readers often\n // announce it as a menu even for other values.\n let ariaHasPopup = undefined;\n if (type === 'menu') ariaHasPopup = true;\n else if (type === 'listbox') ariaHasPopup = 'listbox';\n let overlayId = (0, $gMvIk$useId)();\n return {\n triggerProps: {\n 'aria-haspopup': ariaHasPopup,\n 'aria-expanded': isOpen,\n 'aria-controls': isOpen ? overlayId : null,\n onPress: state.toggle\n },\n overlayProps: {\n id: overlayId\n }\n };\n}\n\n\nexport {$628037886ba31236$export$f9d5c8beee7d008d as useOverlayTrigger};\n//# sourceMappingURL=useOverlayTrigger.module.js.map\n","import { Box, Card } from '@angellist/adapt';\nimport React, { forwardRef, useRef, useState } from 'react';\nimport {\n Placement,\n useOverlay,\n useOverlayPosition,\n useOverlayTrigger,\n} from '@react-aria/overlays';\n\nexport const AdaptOverlay = forwardRef((props: any, ref: any) => {\n const {\n isOpen,\n onClose,\n style,\n children,\n zIndex,\n cardProps = {},\n ...restProps\n } = props;\n const { overlayProps } = useOverlay(\n { onClose, isOpen, isDismissable: true },\n ref,\n );\n\n if (!isOpen) {\n return null;\n }\n\n return (\n \n \n {children}\n \n \n );\n});\n\nAdaptOverlay.displayName = 'AdaptOverlay';\n\ntype Config = {\n positionProps?: {\n placement?: Placement;\n };\n};\n\nexport const useOverlayProps = (config?: Config) => {\n const triggerRef = useRef();\n const overlayRef = useRef();\n const [isOpen, setIsOpen] = useState(false);\n\n const overlayState = {\n isOpen,\n setOpen: (open: boolean) => setIsOpen(open),\n open: () => setIsOpen(true),\n close: () => setIsOpen(false),\n toggle: () => setIsOpen(!isOpen),\n };\n\n const { overlayProps } = useOverlayTrigger(\n { type: 'dialog' },\n overlayState,\n triggerRef,\n );\n\n const { overlayProps: positionProps } = useOverlayPosition({\n targetRef: triggerRef,\n overlayRef,\n placement: 'bottom',\n isOpen,\n offset: 8,\n ...(config?.positionProps || {}),\n });\n\n return {\n triggerRef,\n overlayRef,\n isOpen,\n onOpen: overlayState.open,\n onClose: overlayState.close,\n overlayProps: {\n ...overlayProps,\n ...positionProps,\n },\n };\n};\n"],"names":["$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c","$HgANd$react","$8ae05eaa5c114e9c$export$7f54fc3180508a52","fn","ref","$lmaYr$useRef","$lmaYr$useCallback","args","f","$b5e257d569688ac6$var$defaultContext","$b5e257d569688ac6$var$SSRContext","$670gB$react","$b5e257d569688ac6$var$IsSSRContext","$b5e257d569688ac6$var$canUseDOM","$b5e257d569688ac6$var$componentIds","$b5e257d569688ac6$var$useCounter","isDisabled","ctx","$670gB$useContext","$670gB$useRef","_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner","_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","currentOwner","prevComponentValue","$b5e257d569688ac6$var$useLegacySSRSafeId","defaultId","counter","prefix","$b5e257d569688ac6$var$useModernSSRSafeId","id","didSSR","$670gB$useState","$b5e257d569688ac6$export$535bd6ca7f90a273","$b5e257d569688ac6$export$619500959fc48b26","$b5e257d569688ac6$var$getSnapshot","$b5e257d569688ac6$var$getServerSnapshot","$b5e257d569688ac6$var$subscribe","onStoreChange","$bdb11010cef70236$var$canUseDOM","$bdb11010cef70236$var$idsUpdaterMap","$bdb11010cef70236$export$f680877a34711e37","value","setValue","$eKkEp$useState","nextId","$eKkEp$useRef","res","$eKkEp$useSSRSafeId","updateValue","$eKkEp$useCallback","val","r","$eKkEp$useEffect","newId","$431fbd86ca7dc216$export$b204af158042fbac","el","_el_ownerDocument","$c87311424ea30a05$var$testUserAgent","re","_window_navigator_userAgentData","brand","$c87311424ea30a05$var$cached","$c87311424ea30a05$export$78551043582a6a98","$c87311424ea30a05$export$6446a186d09e379e","$9daab02d461809db$var$hasResizeObserver","$9daab02d461809db$export$683480f191c0e3ea","options","box","onResize","$Vsl8o$useEffect","element","resizeObserverInstance","entries","$9446cca9a3875146$export$7d15b64cf5a3a4c4","min","max","$edcf132a9284368a$var$AXIS","$edcf132a9284368a$var$FLIPPED_DIRECTION","$edcf132a9284368a$var$CROSS_AXIS","$edcf132a9284368a$var$AXIS_SIZE","$edcf132a9284368a$var$TOTAL_SIZE","$edcf132a9284368a$var$PARSED_PLACEMENT_CACHE","$edcf132a9284368a$var$visualViewport","$edcf132a9284368a$var$getContainerDimensions","containerNode","width","height","totalWidth","totalHeight","top","left","scroll","isPinchZoomedIn","documentElement","_visualViewport_width","_visualViewport_height","$edcf132a9284368a$var$getOffset","$fZVmS$isWebKit","$edcf132a9284368a$var$getScroll","node","$edcf132a9284368a$var$getDelta","axis","offset","size","boundaryDimensions","containerDimensions","padding","containerOffsetWithBoundary","containerScroll","boundarySize","boundaryStartEdge","boundaryEndEdge","startEdgeOffset","endEdgeOffset","$edcf132a9284368a$var$getMargins","style","$edcf132a9284368a$var$parsePlacement","input","placement","crossPlacement","crossAxis","crossSize","$edcf132a9284368a$var$computePosition","childOffset","overlaySize","placementInfo","crossOffset","isContainerPositioned","arrowSize","arrowBoundaryOffset","position","minPosition","maxPosition","$fZVmS$clamp","containerHeight","$edcf132a9284368a$var$getMaxHeight","margins","overlayHeight","heightGrowthDirection","overlayTop","maxHeight","$edcf132a9284368a$var$getAvailableSpace","$edcf132a9284368a$export$6839422d1f33cee9","placementInput","scrollSize","flip","userSetMaxHeight","normalizedOffset","space","flippedPlacementInfo","flippedPosition","delta","arrowPosition","preferredArrowPosition","arrowMinPosition","overlayMargin","arrowMaxPosition","arrowOverlappingChildMinEdge","arrowOverlappingChildMaxEdge","arrowPositionOverlappingChild","$edcf132a9284368a$export$b3ceb0cbf1056d98","opts","targetNode","overlayNode","scrollNode","shouldFlip","boundaryElement","container","$edcf132a9284368a$var$getContainingBlock","isViewportContainer","containerPositionStyle","$edcf132a9284368a$var$getPosition","marginTop","marginLeft","scrollTop","scrollLeft","clientTop","clientLeft","parent","parentOffset","parentStyle","offsetParent","$edcf132a9284368a$var$isContainingBlock","$dd149f63282afbbf$export$f6211563215e3b37","$dd149f63282afbbf$export$18fc8428861184da","triggerRef","isOpen","onClose","$dRVb8$useEffect","onScroll","e","target","onCloseHandler","$148a7a147e38ea7f$var$RTL_SCRIPTS","$148a7a147e38ea7f$var$RTL_LANGS","$148a7a147e38ea7f$export$702d680b21cbd764","localeString","locale","textInfo","lang","$1e5a04cdaf7d1af8$var$localeSymbol","$1e5a04cdaf7d1af8$export$f09106e7c6677ec5","$1e5a04cdaf7d1af8$var$currentLocale","$1e5a04cdaf7d1af8$var$listeners","$1e5a04cdaf7d1af8$var$updateLocale","listener","$1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a","isSSR","$ffhGL$useIsSSR","defaultLocale","setDefaultLocale","$ffhGL$useState","$ffhGL$useEffect","$18f2051aff69b9bf$var$I18nContext","$h9FiU$react","$18f2051aff69b9bf$export$43bb16f9c6d9e3f7","$h9FiU$useContext","$2a41e45df1593e64$var$visualViewport","$2a41e45df1593e64$export$d39e1813b3bdd0e1","props","direction","$39EOa$useLocale","targetRef","overlayRef","scrollRef","containerPadding","shouldUpdatePosition","setPosition","$39EOa$useState","deps","lastScale","$39EOa$useRef","$39EOa$useEffect","updatePosition","$39EOa$useCallback","anchor","anchorRect","scrollRect","overlay","_window_visualViewport","_window_visualViewport_height","$2a41e45df1593e64$var$translateRTL","key","newOffset","$39EOa$useLayoutEffect","$2a41e45df1593e64$var$useResize","$39EOa$useResizeObserver","isResizing","timeout","close","_position_maxHeight","$8a9cb279dc87e130$export$905e7fc544a71f36","type","nativeEvent","$8a9cb279dc87e130$export$715c682d09d639cc","onBlur","stateRef","$6dfIe$useRef","$6dfIe$useLayoutEffect","state","dispatchBlur","$6dfIe$useEffectEvent","$6dfIe$useCallback","onBlurHandler","_stateRef_current_observer","relatedTargetEl","$9ab94262bd0047c7$export$420e68273165f4ec","onBlurWithin","onFocusWithin","onFocusWithinChange","$3b9Q0$useRef","$3b9Q0$useCallback","onSyntheticFocus","onFocus","$e0b6e0b68ec7f50f$export$872b660ac5a1ff98","onInteractOutside","onInteractOutsideStart","$ispOf$useRef","onPointerDown","$ispOf$useEffectEvent","$e0b6e0b68ec7f50f$var$isValidEvent","triggerInteractOutside","$ispOf$useEffect","documentObject","$ispOf$getOwnerDocument","onPointerUp","onMouseUp","onTouchEnd","event","ownerDocument","$9bf71ea28793e738$var$activeScope","$9bf71ea28793e738$var$isElementInScope","scope","$9bf71ea28793e738$var$isElementInChildScope","s","$9bf71ea28793e738$export$d06fae2ee68b101e","$9bf71ea28793e738$export$1258395f99bf9cbf","$9bf71ea28793e738$var$Tree","data","scopeRef","nodeToRestore","parentNode","$9bf71ea28793e738$var$TreeNode","current","children","child","_node_parent","newTree","_node_parent_scopeRef","$a11501f3d1d39e6c$var$visibleOverlays","$a11501f3d1d39e6c$export$ea8f71083e90600f","shouldCloseOnBlur","isDismissable","isKeyboardDismissDisabled","shouldCloseOnInteractOutside","$jtpZv$useEffect","index","onHide","onKeyDown","$jtpZv$useInteractOutside","focusWithinProps","$jtpZv$useFocusWithin","$jtpZv$isElementInChildOfActiveScope","onPointerDownUnderlay","$628037886ba31236$export$f9d5c8beee7d008d","$gMvIk$useEffect","ariaHasPopup","overlayId","$gMvIk$useId","AdaptOverlay","forwardRef","zIndex","cardProps","restProps","overlayProps","useOverlay","jsx","Box","Card","useOverlayProps","config","useRef","setIsOpen","useState","overlayState","open","useOverlayTrigger","positionProps","useOverlayPosition"],"mappings":"6IAaA,MAAMA,EAA4C,OAAO,S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