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B,GAAQ,OAAW6Z,GAAQA,MAG9C,O,iCCJA,IAJA,SAAe3mB,GACb,OAAgB,MAATA,I,kCCrBM,SAAS6mB,EAAgBC,EAAK1qB,EAAK4D,GAYhD,OAXI5D,KAAO0qB,EACTjrB,OAAOojB,eAAe6H,EAAK1qB,EAAK,CAC9B4D,MAAOA,EACP+mB,YAAY,EACZC,cAAc,EACdC,UAAU,IAGZH,EAAI1qB,GAAO4D,EAGN8mB,E","sources":["webpack://StravaModern/./node_modules/@reach/visually-hidden/dist/reach-visually-hidden.esm.js","webpack://StravaModern/./node_modules/@reach/alert/node_modules/@reach/utils/owner-document/dist/reach-utils-owner-document.esm.js","webpack://StravaModern/./node_modules/@reach/alert/node_modules/@reach/utils/can-use-dom/dist/reach-utils-can-use-dom.esm.js","webpack://StravaModern/./node_modules/@reach/alert/node_modules/@reach/utils/compose-refs/dist/reach-utils-compose-refs.esm.js","webpack://StravaModern/./node_modules/@reach/alert/node_modules/@reach/utils/type-check/dist/reach-utils-type-check.esm.js","webpack://StravaModern/./node_modules/@reach/alert/dist/reach-alert.esm.js","webpack://StravaModern/./node_modules/@reach/alert/node_modules/@reach/utils/use-previous/dist/reach-utils-use-previous.esm.js","webpack://StravaModern/./node_modules/@reach/dialog/node_modules/prop-types/factoryWithThrowingShims.js","webpack://StravaModern/./node_modules/@reach/dialog/node_modules/prop-types/index.js","webpack://StravaModern/./node_modules/@reach/dialog/node_modules/prop-types/lib/ReactPropTypesSecret.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/constants.js","webpack://StravaModern/./node_modules/use-callback-ref/dist/es2015/useMergeRef.js","webpack://StravaModern/./node_modules/use-callback-ref/dist/es2015/useRef.js","webpack://StravaModern/./node_modules/use-callback-ref/dist/es2015/assignRef.js","webpack://StravaModern/./node_modules/react-focus-lock/dist/es2015/FocusGuard.js","webpack://StravaModern/./node_modules/use-sidecar/dist/es2015/medium.js","webpack://StravaModern/./node_modules/react-focus-lock/dist/es2015/medium.js","webpack://StravaModern/./node_modules/react-focus-lock/dist/es2015/Lock.js","webpack://StravaModern/./node_modules/react-clientside-effect/lib/index.es.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/utils/is.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/utils/correctFocus.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/utils/firstFocus.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/solver.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/utils/array.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/utils/tabOrder.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/utils/tabUtils.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/utils/tabbables.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/utils/DOMutils.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/utils/all-affected.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/utils/getActiveElement.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/utils/parenting.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/focusMerge.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/setFocus.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/index.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/focusInside.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/focusables.js","webpack://StravaModern/./node_modules/react-focus-lock/dist/es2015/util.js","webpack://StravaModern/./node_modules/react-focus-lock/dist/es2015/Trap.js","webpack://StravaModern/./node_modules/focus-lock/dist/es2015/focusIsHidden.js","webpack://StravaModern/./node_modules/react-focus-lock/dist/es2015/Combination.js","webpack://StravaModern/./node_modules/react-focus-lock/dist/es2015/index.js","webpack://StravaModern/./node_modules/react-remove-scroll-bar/dist/es2015/constants.js","webpack://StravaModern/./node_modules/react-remove-scroll/dist/es2015/medium.js","webpack://StravaModern/./node_modules/react-remove-scroll/dist/es2015/UI.js","webpack://StravaModern/./node_modules/use-sidecar/dist/es2015/exports.js","webpack://StravaModern/./node_modules/get-nonce/dist/es2015/index.js","webpack://StravaModern/./node_modules/react-style-singleton/dist/es2015/singleton.js","webpack://StravaModern/./node_modules/react-style-singleton/dist/es2015/component.js","webpack://StravaModern/./node_modules/react-style-singleton/dist/es2015/hook.js","webpack://StravaModern/./node_modules/react-remove-scroll-bar/dist/es2015/utils.js","webpack://StravaModern/./node_modules/react-remove-scroll-bar/dist/es2015/component.js","webpack://StravaModern/./node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js","webpack://StravaModern/./node_modules/react-remove-scroll/dist/es2015/handleScroll.js","webpack://StravaModern/./node_modules/react-remove-scroll/dist/es2015/SideEffect.js","webpack://StravaModern/./node_modules/react-remove-scroll/dist/es2015/sidecar.js","webpack://StravaModern/./node_modules/react-remove-scroll/dist/es2015/Combination.js","webpack://StravaModern/./node_modules/@reach/dialog/dist/dialog.esm.js","webpack://StravaModern/./node_modules/@strava/ui/Modal/styles.scss?b48f","webpack://StravaModern/./node_modules/@strava/ui/Modal/index.js","webpack://StravaModern/./node_modules/lodash-es/camelCase.js","webpack://StravaModern/./node_modules/lodash-es/isNil.js","webpack://StravaModern/./node_modules/@babel/runtime/helpers/esm/defineProperty.js"],"sourcesContent":["import { forwardRef, createElement } from 'react';\nimport PropTypes from 'prop-types';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded = [\"as\", \"style\"];\n\n/**\n * VisuallyHidden\n *\n * Provides text for screen readers that is visually hidden.\n * It is the logical opposite of the `aria-hidden` attribute.\n */\nvar VisuallyHidden = /*#__PURE__*/forwardRef(function VisuallyHidden(_ref, ref) {\n var _ref$as = _ref.as,\n Comp = _ref$as === void 0 ? \"span\" : _ref$as,\n _ref$style = _ref.style,\n style = _ref$style === void 0 ? {} : _ref$style,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n return /*#__PURE__*/createElement(Comp, _extends({\n ref: ref,\n style: _extends({\n border: 0,\n clip: \"rect(0 0 0 0)\",\n height: \"1px\",\n margin: \"-1px\",\n overflow: \"hidden\",\n padding: 0,\n position: \"absolute\",\n width: \"1px\",\n // https://medium.com/@jessebeach/beware-smushed-off-screen-accessible-text-5952a4c2cbfe\n whiteSpace: \"nowrap\",\n wordWrap: \"normal\"\n }, style)\n }, props));\n});\n/**\n * @see Docs https://reach.tech/visually-hidden#visuallyhidden-props\n */\n\nif (process.env.NODE_ENV !== \"production\") {\n VisuallyHidden.displayName = \"VisuallyHidden\";\n VisuallyHidden.propTypes = {\n as: PropTypes.any,\n children: PropTypes.node\n };\n} ////////////////////////////////////////////////////////////////////////////////\n\nexport default VisuallyHidden;\nexport { VisuallyHidden };\n","import { canUseDOM } from '../../can-use-dom/dist/reach-utils-can-use-dom.esm.js';\n\n/**\n * Get an element's owner document. Useful when components are used in iframes\n * or other environments like dev tools.\n *\n * @param element\n */\n\nfunction getOwnerDocument(element) {\n return canUseDOM() ? element ? element.ownerDocument : document : null;\n}\n/**\n * TODO: Remove in 1.0\n */\n\nfunction getOwnerWindow(element) {\n var ownerDocument = getOwnerDocument(element);\n return ownerDocument ? ownerDocument.defaultView || window : null;\n}\n\nexport { getOwnerDocument, getOwnerWindow };\n","function canUseDOM() {\n return !!(typeof window !== \"undefined\" && window.document && window.document.createElement);\n}\n\nexport { canUseDOM };\n","import { useCallback } from 'react';\nimport { isFunction } from '../../type-check/dist/reach-utils-type-check.esm.js';\n\nfunction _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n}\n\nfunction _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n}\n\nfunction _createForOfIteratorHelperLoose(o, allowArrayLike) {\n var it;\n\n if (typeof Symbol === \"undefined\" || o[Symbol.iterator] == null) {\n if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") {\n if (it) o = it;\n var i = 0;\n return function () {\n if (i >= o.length) return {\n done: true\n };\n return {\n done: false,\n value: o[i++]\n };\n };\n }\n\n throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n it = o[Symbol.iterator]();\n return it.next.bind(it);\n}\n\n/**\n * Passes or assigns an arbitrary value to a ref function or object.\n *\n * @param ref\n * @param value\n */\nfunction assignRef(ref, value) {\n if (ref == null) return;\n\n if (isFunction(ref)) {\n ref(value);\n } else {\n try {\n ref.current = value;\n } catch (error) {\n throw new Error(\"Cannot assign value \\\"\" + value + \"\\\" to ref \\\"\" + ref + \"\\\"\");\n }\n }\n}\n/**\n * Passes or assigns a value to multiple refs (typically a DOM node). Useful for\n * dealing with components that need an explicit ref for DOM calculations but\n * also forwards refs assigned by an app.\n *\n * @param refs Refs to fork\n */\n\nfunction useComposedRefs() {\n for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {\n refs[_key] = arguments[_key];\n }\n\n return useCallback(function (node) {\n for (var _iterator = _createForOfIteratorHelperLoose(refs), _step; !(_step = _iterator()).done;) {\n var ref = _step.value;\n assignRef(ref, node);\n } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n }, refs);\n}\n\nexport { assignRef, useComposedRefs };\n","/**\n * Checks whether or not a value is a boolean.\n *\n * @param value\n */\nfunction isBoolean(value) {\n return typeof value === \"boolean\";\n}\n/**\n * Checks whether or not a value is a function.\n *\n * @param value\n */\n\nfunction isFunction(value) {\n // eslint-disable-next-line eqeqeq\n return !!(value && {}.toString.call(value) == \"[object Function]\");\n}\n/**\n * Checks whether or not a value is a number.\n *\n * @param value\n */\n\nfunction isNumber(value) {\n return typeof value === \"number\" && !isNaN(value);\n}\n/**\n * Checks whether or not a value is a string.\n *\n * @param value\n */\n\nfunction isString(value) {\n return typeof value === \"string\";\n}\n\nexport { isBoolean, isFunction, isNumber, isString };\n","import { forwardRef, useRef, useMemo, createElement, useEffect, cloneElement } from 'react';\nimport { render } from 'react-dom';\nimport { VisuallyHidden } from '@reach/visually-hidden';\nimport { usePrevious } from '@reach/utils/use-previous';\nimport { getOwnerDocument } from '@reach/utils/owner-document';\nimport { useComposedRefs } from '@reach/utils/compose-refs';\nimport PropTypes from 'prop-types';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar _excluded = [\"as\", \"children\", \"type\"];\n\n/*\n * Singleton state is fine because you don't server render\n * an alert (SRs don't read them on first load anyway)\n */\nvar keys = {\n polite: -1,\n assertive: -1\n};\nvar elements = {\n polite: {},\n assertive: {}\n};\nvar liveRegions = {\n polite: null,\n assertive: null\n};\nvar renderTimer; ////////////////////////////////////////////////////////////////////////////////\n\n/**\n * Alert\n *\n * Screen-reader-friendly alert messages. In many apps developers add \"alert\"\n * messages when network events or other things happen. Users with assistive\n * technologies may not know about the message unless you develop for it.\n *\n * @see Docs https://reach.tech/alert\n */\n\nvar Alert = /*#__PURE__*/forwardRef(function Alert(_ref, forwardedRef) {\n var _ref$as = _ref.as,\n Comp = _ref$as === void 0 ? \"div\" : _ref$as,\n children = _ref.children,\n _ref$type = _ref.type,\n regionType = _ref$type === void 0 ? \"polite\" : _ref$type,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var ownRef = useRef(null);\n var ref = useComposedRefs(forwardedRef, ownRef);\n var child = useMemo(function () {\n return /*#__PURE__*/createElement(Comp, _extends({}, props, {\n ref: ref,\n \"data-reach-alert\": true\n }), children);\n }, // eslint-disable-next-line react-hooks/exhaustive-deps\n [children, props]);\n useMirrorEffects(regionType, child, ownRef);\n return child;\n});\n/**\n * @see Docs https://reach.tech/alert#alert-props\n */\n\nif (process.env.NODE_ENV !== \"production\") {\n Alert.displayName = \"Alert\";\n Alert.propTypes = {\n children: PropTypes.node,\n type: /*#__PURE__*/PropTypes.oneOf([\"assertive\", \"polite\"])\n };\n} ////////////////////////////////////////////////////////////////////////////////\n\n\nfunction createMirror(type, doc) {\n var key = ++keys[type];\n\n var mount = function mount(element) {\n if (liveRegions[type]) {\n elements[type][key] = element;\n renderAlerts();\n } else {\n var node = doc.createElement(\"div\");\n node.setAttribute(\"data-reach-live-\" + type, \"true\");\n liveRegions[type] = node;\n doc.body.appendChild(liveRegions[type]);\n mount(element);\n }\n };\n\n var update = function update(element) {\n elements[type][key] = element;\n renderAlerts();\n };\n\n var unmount = function unmount() {\n delete elements[type][key];\n renderAlerts();\n };\n\n return {\n mount: mount,\n update: update,\n unmount: unmount\n };\n}\n\nfunction renderAlerts() {\n if (renderTimer != null) {\n window.clearTimeout(renderTimer);\n }\n\n renderTimer = window.setTimeout(function () {\n Object.keys(elements).forEach(function (elementType) {\n var regionType = elementType;\n var container = liveRegions[regionType];\n\n if (container) {\n render( /*#__PURE__*/createElement(VisuallyHidden, {\n as: \"div\"\n }, /*#__PURE__*/createElement(\"div\", {\n // The status role is a type of live region and a container whose\n // content is advisory information for the user that is not\n // important enough to justify an alert, and is often presented as\n // a status bar. When the role is added to an element, the browser\n // will send out an accessible status event to assistive\n // technology products which can then notify the user about it.\n // https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_status_role\n role: regionType === \"assertive\" ? \"alert\" : \"status\",\n \"aria-live\": regionType\n }, Object.keys(elements[regionType]).map(function (key) {\n return /*#__PURE__*/cloneElement(elements[regionType][key], {\n key: key,\n ref: null\n });\n }))), liveRegions[regionType]);\n }\n });\n }, 500);\n}\n\nfunction useMirrorEffects(regionType, element, ref) {\n var prevType = usePrevious(regionType);\n var mirror = useRef(null);\n var mounted = useRef(false);\n useEffect(function () {\n var ownerDocument = getOwnerDocument(ref.current);\n\n if (!mounted.current) {\n mounted.current = true;\n mirror.current = createMirror(regionType, ownerDocument);\n mirror.current.mount(element);\n } else if (prevType !== regionType) {\n mirror.current && mirror.current.unmount();\n mirror.current = createMirror(regionType, ownerDocument);\n mirror.current.mount(element);\n } else {\n mirror.current && mirror.current.update(element);\n }\n }, [element, regionType, prevType, ref]);\n useEffect(function () {\n return function () {\n mirror.current && mirror.current.unmount();\n };\n }, []);\n} ////////////////////////////////////////////////////////////////////////////////\n\nexport default Alert;\nexport { Alert };\n","import { useRef, useEffect } from 'react';\n\n/**\n * Returns the previous value of a reference after a component update.\n *\n * @param value\n */\n\nfunction usePrevious(value) {\n var ref = useRef(null);\n useEffect(function () {\n ref.current = value;\n }, [value]);\n return ref.current;\n}\n\nexport { usePrevious };\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * defines a focus group\n */\nexport var FOCUS_GROUP = 'data-focus-lock';\n/**\n * disables element discovery inside a group marked by key\n */\nexport var FOCUS_DISABLED = 'data-focus-lock-disabled';\n/**\n * allows uncontrolled focus within the marked area, effectively disabling focus lock for it's content\n */\nexport var FOCUS_ALLOW = 'data-no-focus-lock';\n/**\n * instructs autofocus engine to pick default autofocus inside a given node\n * can be set on the element or container\n */\nexport var FOCUS_AUTO = 'data-autofocus-inside';\n/**\n * instructs autofocus to ignore elements within a given node\n * can be set on the element or container\n */\nexport var FOCUS_NO_AUTOFOCUS = 'data-no-autofocus';\n","import { assignRef } from './assignRef';\nimport { useCallbackRef } from './useRef';\n/**\n * Merges two or more refs together providing a single interface to set their value\n * @param {RefObject|Ref} refs\n * @returns {MutableRefObject} - a new ref, which translates all changes to {refs}\n *\n * @see {@link mergeRefs} a version without buit-in memoization\n * @see https://github.com/theKashey/use-callback-ref#usemergerefs\n * @example\n * const Component = React.forwardRef((props, ref) => {\n * const ownRef = useRef();\n * const domRef = useMergeRefs([ref, ownRef]); // 👈 merge together\n * return
...
\n * }\n */\nexport function useMergeRefs(refs, defaultValue) {\n return useCallbackRef(defaultValue || null, function (newValue) { return refs.forEach(function (ref) { return assignRef(ref, newValue); }); });\n}\n","import { useState } from 'react';\n/**\n * creates a MutableRef with ref change callback\n * @param initialValue - initial ref value\n * @param {Function} callback - a callback to run when value changes\n *\n * @example\n * const ref = useCallbackRef(0, (newValue, oldValue) => console.log(oldValue, '->', newValue);\n * ref.current = 1;\n * // prints 0 -> 1\n *\n * @see https://reactjs.org/docs/hooks-reference.html#useref\n * @see https://github.com/theKashey/use-callback-ref#usecallbackref---to-replace-reactuseref\n * @returns {MutableRefObject}\n */\nexport function useCallbackRef(initialValue, callback) {\n var ref = useState(function () { return ({\n // value\n value: initialValue,\n // last callback\n callback: callback,\n // \"memoized\" public interface\n facade: {\n get current() {\n return ref.value;\n },\n set current(value) {\n var last = ref.value;\n if (last !== value) {\n ref.value = value;\n ref.callback(value, last);\n }\n },\n },\n }); })[0];\n // update callback\n ref.callback = callback;\n return ref.facade;\n}\n","/**\n * Assigns a value for a given ref, no matter of the ref format\n * @param {RefObject} ref - a callback function or ref object\n * @param value - a new value\n *\n * @see https://github.com/theKashey/use-callback-ref#assignref\n * @example\n * const refObject = useRef();\n * const refFn = (ref) => {....}\n *\n * assignRef(refObject, \"refValue\");\n * assignRef(refFn, \"refValue\");\n */\nexport function assignRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n }\n else if (ref) {\n ref.current = value;\n }\n return ref;\n}\n","import * as React from 'react';\nimport PropTypes from 'prop-types';\nexport var hiddenGuard = {\n width: '1px',\n height: '0px',\n padding: 0,\n overflow: 'hidden',\n position: 'fixed',\n top: '1px',\n left: '1px'\n};\n\nvar InFocusGuard = function InFocusGuard(_ref) {\n var children = _ref.children;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-first\",\n \"data-focus-guard\": true,\n \"data-focus-auto-guard\": true,\n style: hiddenGuard\n }), children, children && /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-last\",\n \"data-focus-guard\": true,\n \"data-focus-auto-guard\": true,\n style: hiddenGuard\n }));\n};\n\nInFocusGuard.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.node\n} : {};\nInFocusGuard.defaultProps = {\n children: null\n};\nexport default InFocusGuard;","import { __assign } from \"tslib\";\nfunction ItoI(a) {\n return a;\n}\nfunction innerCreateMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n var buffer = [];\n var assigned = false;\n var medium = {\n read: function () {\n if (assigned) {\n throw new Error('Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.');\n }\n if (buffer.length) {\n return buffer[buffer.length - 1];\n }\n return defaults;\n },\n useMedium: function (data) {\n var item = middleware(data, assigned);\n buffer.push(item);\n return function () {\n buffer = buffer.filter(function (x) { return x !== item; });\n };\n },\n assignSyncMedium: function (cb) {\n assigned = true;\n while (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n }\n buffer = {\n push: function (x) { return cb(x); },\n filter: function () { return buffer; },\n };\n },\n assignMedium: function (cb) {\n assigned = true;\n var pendingQueue = [];\n if (buffer.length) {\n var cbs = buffer;\n buffer = [];\n cbs.forEach(cb);\n pendingQueue = buffer;\n }\n var executeQueue = function () {\n var cbs = pendingQueue;\n pendingQueue = [];\n cbs.forEach(cb);\n };\n var cycle = function () { return Promise.resolve().then(executeQueue); };\n cycle();\n buffer = {\n push: function (x) {\n pendingQueue.push(x);\n cycle();\n },\n filter: function (filter) {\n pendingQueue = pendingQueue.filter(filter);\n return buffer;\n },\n };\n },\n };\n return medium;\n}\nexport function createMedium(defaults, middleware) {\n if (middleware === void 0) { middleware = ItoI; }\n return innerCreateMedium(defaults, middleware);\n}\n// eslint-disable-next-line @typescript-eslint/ban-types\nexport function createSidecarMedium(options) {\n if (options === void 0) { options = {}; }\n var medium = innerCreateMedium(null);\n medium.options = __assign({ async: true, ssr: false }, options);\n return medium;\n}\n","import { createMedium, createSidecarMedium } from 'use-sidecar';\nexport var mediumFocus = createMedium({}, function (_ref) {\n var target = _ref.target,\n currentTarget = _ref.currentTarget;\n return {\n target: target,\n currentTarget: currentTarget\n };\n});\nexport var mediumBlur = createMedium();\nexport var mediumEffect = createMedium();\nexport var mediumSidecar = createSidecarMedium({\n async: true\n});","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { node, bool, string, any, arrayOf, oneOfType, object, func } from 'prop-types';\nimport * as constants from 'focus-lock/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { useEffect } from 'react';\nimport { hiddenGuard } from './FocusGuard';\nimport { mediumFocus, mediumBlur, mediumSidecar } from './medium';\nvar emptyArray = [];\nvar FocusLock = /*#__PURE__*/React.forwardRef(function FocusLockUI(props, parentRef) {\n var _extends2;\n\n var _React$useState = React.useState(),\n realObserved = _React$useState[0],\n setObserved = _React$useState[1];\n\n var observed = React.useRef();\n var isActive = React.useRef(false);\n var originalFocusedElement = React.useRef(null);\n var children = props.children,\n disabled = props.disabled,\n noFocusGuards = props.noFocusGuards,\n persistentFocus = props.persistentFocus,\n crossFrame = props.crossFrame,\n autoFocus = props.autoFocus,\n allowTextSelection = props.allowTextSelection,\n group = props.group,\n className = props.className,\n whiteList = props.whiteList,\n hasPositiveIndices = props.hasPositiveIndices,\n _props$shards = props.shards,\n shards = _props$shards === void 0 ? emptyArray : _props$shards,\n _props$as = props.as,\n Container = _props$as === void 0 ? 'div' : _props$as,\n _props$lockProps = props.lockProps,\n containerProps = _props$lockProps === void 0 ? {} : _props$lockProps,\n SideCar = props.sideCar,\n shouldReturnFocus = props.returnFocus,\n focusOptions = props.focusOptions,\n onActivationCallback = props.onActivation,\n onDeactivationCallback = props.onDeactivation;\n\n var _React$useState2 = React.useState({}),\n id = _React$useState2[0]; // SIDE EFFECT CALLBACKS\n\n\n var onActivation = React.useCallback(function () {\n originalFocusedElement.current = originalFocusedElement.current || document && document.activeElement;\n\n if (observed.current && onActivationCallback) {\n onActivationCallback(observed.current);\n }\n\n isActive.current = true;\n }, [onActivationCallback]);\n var onDeactivation = React.useCallback(function () {\n isActive.current = false;\n\n if (onDeactivationCallback) {\n onDeactivationCallback(observed.current);\n }\n }, [onDeactivationCallback]);\n useEffect(function () {\n if (!disabled) {\n // cleanup return focus on trap deactivation\n // sideEffect/returnFocus should happen by this time\n originalFocusedElement.current = null;\n }\n }, []);\n var returnFocus = React.useCallback(function (allowDefer) {\n var returnFocusTo = originalFocusedElement.current;\n\n if (returnFocusTo && returnFocusTo.focus) {\n var howToReturnFocus = typeof shouldReturnFocus === 'function' ? shouldReturnFocus(returnFocusTo) : shouldReturnFocus;\n\n if (howToReturnFocus) {\n var returnFocusOptions = typeof howToReturnFocus === 'object' ? howToReturnFocus : undefined;\n originalFocusedElement.current = null;\n\n if (allowDefer) {\n // React might return focus after update\n // it's safer to defer the action\n Promise.resolve().then(function () {\n return returnFocusTo.focus(returnFocusOptions);\n });\n } else {\n returnFocusTo.focus(returnFocusOptions);\n }\n }\n }\n }, [shouldReturnFocus]); // MEDIUM CALLBACKS\n\n var onFocus = React.useCallback(function (event) {\n if (isActive.current) {\n mediumFocus.useMedium(event);\n }\n }, []);\n var onBlur = mediumBlur.useMedium; // REF PROPAGATION\n // not using real refs due to race conditions\n\n var setObserveNode = React.useCallback(function (newObserved) {\n if (observed.current !== newObserved) {\n observed.current = newObserved;\n setObserved(newObserved);\n }\n }, []);\n\n if (process.env.NODE_ENV !== 'production') {\n if (typeof allowTextSelection !== 'undefined') {\n // eslint-disable-next-line no-console\n console.warn('React-Focus-Lock: allowTextSelection is deprecated and enabled by default');\n }\n\n React.useEffect(function () {\n if (!observed.current) {\n // eslint-disable-next-line no-console\n console.error('FocusLock: could not obtain ref to internal node');\n }\n }, []);\n }\n\n var lockProps = _extends((_extends2 = {}, _extends2[constants.FOCUS_DISABLED] = disabled && 'disabled', _extends2[constants.FOCUS_GROUP] = group, _extends2), containerProps);\n\n var hasLeadingGuards = noFocusGuards !== true;\n var hasTailingGuards = hasLeadingGuards && noFocusGuards !== 'tail';\n var mergedRef = useMergeRefs([parentRef, setObserveNode]);\n return /*#__PURE__*/React.createElement(React.Fragment, null, hasLeadingGuards && [\n /*#__PURE__*/\n // nearest focus guard\n React.createElement(\"div\", {\n key: \"guard-first\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }), // first tabbed element guard\n hasPositiveIndices ? /*#__PURE__*/React.createElement(\"div\", {\n key: \"guard-nearest\",\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 1,\n style: hiddenGuard\n }) : null], !disabled && /*#__PURE__*/React.createElement(SideCar, {\n id: id,\n sideCar: mediumSidecar,\n observed: realObserved,\n disabled: disabled,\n persistentFocus: persistentFocus,\n crossFrame: crossFrame,\n autoFocus: autoFocus,\n whiteList: whiteList,\n shards: shards,\n onActivation: onActivation,\n onDeactivation: onDeactivation,\n returnFocus: returnFocus,\n focusOptions: focusOptions\n }), /*#__PURE__*/React.createElement(Container, _extends({\n ref: mergedRef\n }, lockProps, {\n className: className,\n onBlur: onBlur,\n onFocus: onFocus\n }), children), hasTailingGuards && /*#__PURE__*/React.createElement(\"div\", {\n \"data-focus-guard\": true,\n tabIndex: disabled ? -1 : 0,\n style: hiddenGuard\n }));\n});\nFocusLock.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: node,\n disabled: bool,\n returnFocus: oneOfType([bool, object, func]),\n focusOptions: object,\n noFocusGuards: bool,\n hasPositiveIndices: bool,\n allowTextSelection: bool,\n autoFocus: bool,\n persistentFocus: bool,\n crossFrame: bool,\n group: string,\n className: string,\n whiteList: func,\n shards: arrayOf(any),\n as: oneOfType([string, func, object]),\n lockProps: object,\n onActivation: func,\n onDeactivation: func,\n sideCar: any.isRequired\n} : {};\nFocusLock.defaultProps = {\n children: undefined,\n disabled: false,\n returnFocus: false,\n focusOptions: undefined,\n noFocusGuards: false,\n autoFocus: true,\n persistentFocus: false,\n crossFrame: true,\n hasPositiveIndices: undefined,\n allowTextSelection: undefined,\n group: undefined,\n className: undefined,\n whiteList: undefined,\n shards: undefined,\n as: 'div',\n lockProps: {},\n onActivation: undefined,\n onDeactivation: undefined\n};\nexport default FocusLock;","import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport _defineProperty from '@babel/runtime/helpers/esm/defineProperty';\nimport React, { PureComponent } from 'react';\n\nfunction withSideEffect(reducePropsToState, handleStateChangeOnClient) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof reducePropsToState !== 'function') {\n throw new Error('Expected reducePropsToState to be a function.');\n }\n\n if (typeof handleStateChangeOnClient !== 'function') {\n throw new Error('Expected handleStateChangeOnClient to be a function.');\n }\n }\n\n function getDisplayName(WrappedComponent) {\n return WrappedComponent.displayName || WrappedComponent.name || 'Component';\n }\n\n return function wrap(WrappedComponent) {\n if (process.env.NODE_ENV !== \"production\") {\n if (typeof WrappedComponent !== 'function') {\n throw new Error('Expected WrappedComponent to be a React component.');\n }\n }\n\n var mountedInstances = [];\n var state;\n\n function emitChange() {\n state = reducePropsToState(mountedInstances.map(function (instance) {\n return instance.props;\n }));\n handleStateChangeOnClient(state);\n }\n\n var SideEffect = /*#__PURE__*/function (_PureComponent) {\n _inheritsLoose(SideEffect, _PureComponent);\n\n function SideEffect() {\n return _PureComponent.apply(this, arguments) || this;\n }\n\n // Try to use displayName of wrapped component\n SideEffect.peek = function peek() {\n return state;\n };\n\n var _proto = SideEffect.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n mountedInstances.push(this);\n emitChange();\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n emitChange();\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n var index = mountedInstances.indexOf(this);\n mountedInstances.splice(index, 1);\n emitChange();\n };\n\n _proto.render = function render() {\n return /*#__PURE__*/React.createElement(WrappedComponent, this.props);\n };\n\n return SideEffect;\n }(PureComponent);\n\n _defineProperty(SideEffect, \"displayName\", \"SideEffect(\" + getDisplayName(WrappedComponent) + \")\");\n\n return SideEffect;\n };\n}\n\nexport default withSideEffect;\n","import { FOCUS_NO_AUTOFOCUS } from '../constants';\nvar isElementHidden = function (node) {\n // we can measure only \"elements\"\n // consider others as \"visible\"\n if (node.nodeType !== Node.ELEMENT_NODE) {\n return false;\n }\n var computedStyle = window.getComputedStyle(node, null);\n if (!computedStyle || !computedStyle.getPropertyValue) {\n return false;\n }\n return (computedStyle.getPropertyValue('display') === 'none' || computedStyle.getPropertyValue('visibility') === 'hidden');\n};\nvar getParentNode = function (node) {\n // DOCUMENT_FRAGMENT_NODE can also point on ShadowRoot. In this case .host will point on the next node\n return node.parentNode && node.parentNode.nodeType === Node.DOCUMENT_FRAGMENT_NODE\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any\n node.parentNode.host\n : node.parentNode;\n};\nvar isTopNode = function (node) {\n // @ts-ignore\n return node === document || (node && node.nodeType === Node.DOCUMENT_NODE);\n};\nvar isVisibleUncached = function (node, checkParent) {\n return !node || isTopNode(node) || (!isElementHidden(node) && checkParent(getParentNode(node)));\n};\nexport var isVisibleCached = function (visibilityCache, node) {\n var cached = visibilityCache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isVisibleUncached(node, isVisibleCached.bind(undefined, visibilityCache));\n visibilityCache.set(node, result);\n return result;\n};\nvar isAutoFocusAllowedUncached = function (node, checkParent) {\n return node && !isTopNode(node) ? (isAutoFocusAllowed(node) ? checkParent(getParentNode(node)) : false) : true;\n};\nexport var isAutoFocusAllowedCached = function (cache, node) {\n var cached = cache.get(node);\n if (cached !== undefined) {\n return cached;\n }\n var result = isAutoFocusAllowedUncached(node, isAutoFocusAllowedCached.bind(undefined, cache));\n cache.set(node, result);\n return result;\n};\nexport var getDataset = function (node) {\n // @ts-ignore\n return node.dataset;\n};\nexport var isHTMLButtonElement = function (node) { return node.tagName === 'BUTTON'; };\nexport var isHTMLInputElement = function (node) { return node.tagName === 'INPUT'; };\nexport var isRadioElement = function (node) {\n return isHTMLInputElement(node) && node.type === 'radio';\n};\nexport var notHiddenInput = function (node) {\n return !((isHTMLInputElement(node) || isHTMLButtonElement(node)) && (node.type === 'hidden' || node.disabled));\n};\nexport var isAutoFocusAllowed = function (node) {\n var attribute = node.getAttribute(FOCUS_NO_AUTOFOCUS);\n return ![true, 'true', ''].includes(attribute);\n};\nexport var isGuard = function (node) { var _a; return Boolean(node && ((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.focusGuard)); };\nexport var isNotAGuard = function (node) { return !isGuard(node); };\nexport var isDefined = function (x) { return Boolean(x); };\n","import { isRadioElement } from './is';\nvar findSelectedRadio = function (node, nodes) {\n return nodes\n .filter(isRadioElement)\n .filter(function (el) { return el.name === node.name; })\n .filter(function (el) { return el.checked; })[0] || node;\n};\nexport var correctNode = function (node, nodes) {\n if (isRadioElement(node) && node.name) {\n return findSelectedRadio(node, nodes);\n }\n return node;\n};\n/**\n * giving a set of radio inputs keeps only selected (tabbable) ones\n * @param nodes\n */\nexport var correctNodes = function (nodes) {\n // IE11 has no Set(array) constructor\n var resultSet = new Set();\n nodes.forEach(function (node) { return resultSet.add(correctNode(node, nodes)); });\n // using filter to support IE11\n return nodes.filter(function (node) { return resultSet.has(node); });\n};\n","import { correctNode } from './correctFocus';\nexport var pickFirstFocus = function (nodes) {\n if (nodes[0] && nodes.length > 1) {\n return correctNode(nodes[0], nodes);\n }\n return nodes[0];\n};\nexport var pickFocusable = function (nodes, index) {\n if (nodes.length > 1) {\n return nodes.indexOf(correctNode(nodes[index], nodes));\n }\n return index;\n};\n","import { correctNodes } from './utils/correctFocus';\nimport { pickFocusable } from './utils/firstFocus';\nimport { isGuard } from './utils/is';\nexport var NEW_FOCUS = 'NEW_FOCUS';\n/**\n * Main solver for the \"find next focus\" question\n * @param innerNodes\n * @param outerNodes\n * @param activeElement\n * @param lastNode\n * @returns {number|string|undefined|*}\n */\nexport var newFocus = function (innerNodes, outerNodes, activeElement, lastNode) {\n var cnt = innerNodes.length;\n var firstFocus = innerNodes[0];\n var lastFocus = innerNodes[cnt - 1];\n var isOnGuard = isGuard(activeElement);\n // focus is inside\n if (activeElement && innerNodes.indexOf(activeElement) >= 0) {\n return undefined;\n }\n var activeIndex = activeElement !== undefined ? outerNodes.indexOf(activeElement) : -1;\n var lastIndex = lastNode ? outerNodes.indexOf(lastNode) : activeIndex;\n var lastNodeInside = lastNode ? innerNodes.indexOf(lastNode) : -1;\n var indexDiff = activeIndex - lastIndex;\n var firstNodeIndex = outerNodes.indexOf(firstFocus);\n var lastNodeIndex = outerNodes.indexOf(lastFocus);\n var correctedNodes = correctNodes(outerNodes);\n var correctedIndex = activeElement !== undefined ? correctedNodes.indexOf(activeElement) : -1;\n var correctedIndexDiff = correctedIndex - (lastNode ? correctedNodes.indexOf(lastNode) : activeIndex);\n var returnFirstNode = pickFocusable(innerNodes, 0);\n var returnLastNode = pickFocusable(innerNodes, cnt - 1);\n // new focus\n if (activeIndex === -1 || lastNodeInside === -1) {\n return NEW_FOCUS;\n }\n // old focus\n if (!indexDiff && lastNodeInside >= 0) {\n return lastNodeInside;\n }\n // first element\n if (activeIndex <= firstNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnLastNode;\n }\n // last element\n if (activeIndex >= lastNodeIndex && isOnGuard && Math.abs(indexDiff) > 1) {\n return returnFirstNode;\n }\n // jump out, but not on the guard\n if (indexDiff && Math.abs(correctedIndexDiff) > 1) {\n return lastNodeInside;\n }\n // focus above lock\n if (activeIndex <= firstNodeIndex) {\n return returnLastNode;\n }\n // focus below lock\n if (activeIndex > lastNodeIndex) {\n return returnFirstNode;\n }\n // index is inside tab order, but outside Lock\n if (indexDiff) {\n if (Math.abs(indexDiff) > 1) {\n return lastNodeInside;\n }\n return (cnt + lastNodeInside + indexDiff) % cnt;\n }\n // do nothing\n return undefined;\n};\n","/*\nIE11 support\n */\nexport var toArray = function (a) {\n var ret = Array(a.length);\n for (var i = 0; i < a.length; ++i) {\n ret[i] = a[i];\n }\n return ret;\n};\nexport var asArray = function (a) { return (Array.isArray(a) ? a : [a]); };\n","import { toArray } from './array';\nexport var tabSort = function (a, b) {\n var tabDiff = a.tabIndex - b.tabIndex;\n var indexDiff = a.index - b.index;\n if (tabDiff) {\n if (!a.tabIndex) {\n return 1;\n }\n if (!b.tabIndex) {\n return -1;\n }\n }\n return tabDiff || indexDiff;\n};\nexport var orderByTabIndex = function (nodes, filterNegative, keepGuards) {\n return toArray(nodes)\n .map(function (node, index) { return ({\n node: node,\n index: index,\n tabIndex: keepGuards && node.tabIndex === -1 ? ((node.dataset || {}).focusGuard ? 0 : -1) : node.tabIndex,\n }); })\n .filter(function (data) { return !filterNegative || data.tabIndex >= 0; })\n .sort(tabSort);\n};\n","import { FOCUS_AUTO } from '../constants';\nimport { toArray } from './array';\nimport { tabbables } from './tabbables';\nvar queryTabbables = tabbables.join(',');\nvar queryGuardTabbables = \"\".concat(queryTabbables, \", [data-focus-guard]\");\nvar getFocusablesWithShadowDom = function (parent, withGuards) {\n var _a;\n return toArray(((_a = parent.shadowRoot) === null || _a === void 0 ? void 0 : _a.children) || parent.children).reduce(function (acc, child) {\n return acc.concat(child.matches(withGuards ? queryGuardTabbables : queryTabbables) ? [child] : [], getFocusablesWithShadowDom(child));\n }, []);\n};\nexport var getFocusables = function (parents, withGuards) {\n return parents.reduce(function (acc, parent) {\n return acc.concat(\n // add all tabbables inside and within shadow DOMs in DOM order\n getFocusablesWithShadowDom(parent, withGuards), \n // add if node is tabbable itself\n parent.parentNode\n ? toArray(parent.parentNode.querySelectorAll(queryTabbables)).filter(function (node) { return node === parent; })\n : []);\n }, []);\n};\n/**\n * return a list of focusable nodes within an area marked as \"auto-focusable\"\n * @param parent\n */\nexport var getParentAutofocusables = function (parent) {\n var parentFocus = parent.querySelectorAll(\"[\".concat(FOCUS_AUTO, \"]\"));\n return toArray(parentFocus)\n .map(function (node) { return getFocusables([node]); })\n .reduce(function (acc, nodes) { return acc.concat(nodes); }, []);\n};\n","/**\n * list of the object to be considered as focusable\n */\nexport var tabbables = [\n 'button:enabled',\n 'select:enabled',\n 'textarea:enabled',\n 'input:enabled',\n // elements with explicit roles will also use explicit tabindex\n // '[role=\"button\"]',\n 'a[href]',\n 'area[href]',\n 'summary',\n 'iframe',\n 'object',\n 'embed',\n 'audio[controls]',\n 'video[controls]',\n '[tabindex]',\n '[contenteditable]',\n '[autofocus]',\n];\n","import { toArray } from './array';\nimport { isAutoFocusAllowedCached, isVisibleCached, notHiddenInput } from './is';\nimport { orderByTabIndex } from './tabOrder';\nimport { getFocusables, getParentAutofocusables } from './tabUtils';\n/**\n * given list of focusable elements keeps the ones user can interact with\n * @param nodes\n * @param visibilityCache\n */\nexport var filterFocusable = function (nodes, visibilityCache) {\n return toArray(nodes)\n .filter(function (node) { return isVisibleCached(visibilityCache, node); })\n .filter(function (node) { return notHiddenInput(node); });\n};\nexport var filterAutoFocusable = function (nodes, cache) {\n if (cache === void 0) { cache = new Map(); }\n return toArray(nodes).filter(function (node) { return isAutoFocusAllowedCached(cache, node); });\n};\n/**\n * only tabbable ones\n * (but with guards which would be ignored)\n */\nexport var getTabbableNodes = function (topNodes, visibilityCache, withGuards) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes, withGuards), visibilityCache), true, withGuards);\n};\n/**\n * actually anything \"focusable\", not only tabbable\n * (without guards, as long as they are not expected to be focused)\n */\nexport var getAllTabbableNodes = function (topNodes, visibilityCache) {\n return orderByTabIndex(filterFocusable(getFocusables(topNodes), visibilityCache), false);\n};\n/**\n * return list of nodes which are expected to be auto-focused\n * @param topNode\n * @param visibilityCache\n */\nexport var parentAutofocusables = function (topNode, visibilityCache) {\n return filterFocusable(getParentAutofocusables(topNode), visibilityCache);\n};\n/*\n * Determines if element is contained in scope, including nested shadow DOMs\n */\nexport var contains = function (scope, element) {\n return ((scope.shadowRoot\n ? contains(scope.shadowRoot, element)\n : Object.getPrototypeOf(scope).contains.call(scope, element)) ||\n toArray(scope.children).some(function (child) { return contains(child, element); }));\n};\n","import { FOCUS_DISABLED, FOCUS_GROUP } from '../constants';\nimport { asArray, toArray } from './array';\n/**\n * in case of multiple nodes nested inside each other\n * keeps only top ones\n * this is O(nlogn)\n * @param nodes\n * @returns {*}\n */\nvar filterNested = function (nodes) {\n var contained = new Set();\n var l = nodes.length;\n for (var i = 0; i < l; i += 1) {\n for (var j = i + 1; j < l; j += 1) {\n var position = nodes[i].compareDocumentPosition(nodes[j]);\n /* eslint-disable no-bitwise */\n if ((position & Node.DOCUMENT_POSITION_CONTAINED_BY) > 0) {\n contained.add(j);\n }\n if ((position & Node.DOCUMENT_POSITION_CONTAINS) > 0) {\n contained.add(i);\n }\n /* eslint-enable */\n }\n }\n return nodes.filter(function (_, index) { return !contained.has(index); });\n};\n/**\n * finds top most parent for a node\n * @param node\n * @returns {*}\n */\nvar getTopParent = function (node) {\n return node.parentNode ? getTopParent(node.parentNode) : node;\n};\n/**\n * returns all \"focus containers\" inside a given node\n * @param node\n * @returns {T}\n */\nexport var getAllAffectedNodes = function (node) {\n var nodes = asArray(node);\n return nodes.filter(Boolean).reduce(function (acc, currentNode) {\n var group = currentNode.getAttribute(FOCUS_GROUP);\n acc.push.apply(acc, (group\n ? filterNested(toArray(getTopParent(currentNode).querySelectorAll(\"[\".concat(FOCUS_GROUP, \"=\\\"\").concat(group, \"\\\"]:not([\").concat(FOCUS_DISABLED, \"=\\\"disabled\\\"])\"))))\n : [currentNode]));\n return acc;\n }, []);\n};\n","var getNestedShadowActiveElement = function (shadowRoot) {\n return shadowRoot.activeElement\n ? shadowRoot.activeElement.shadowRoot\n ? getNestedShadowActiveElement(shadowRoot.activeElement.shadowRoot)\n : shadowRoot.activeElement\n : undefined;\n};\n/**\n * returns active element from document or from nested shadowdoms\n */\nexport var getActiveElement = function () {\n return (document.activeElement\n ? document.activeElement.shadowRoot\n ? getNestedShadowActiveElement(document.activeElement.shadowRoot)\n : document.activeElement\n : undefined); // eslint-disable-next-line @typescript-eslint/no-explicit-any\n};\n","import { parentAutofocusables } from './DOMutils';\nimport { contains } from './DOMutils';\nimport { asArray } from './array';\nvar getParents = function (node, parents) {\n if (parents === void 0) { parents = []; }\n parents.push(node);\n if (node.parentNode) {\n getParents(node.parentNode.host || node.parentNode, parents);\n }\n return parents;\n};\n/**\n * finds a parent for both nodeA and nodeB\n * @param nodeA\n * @param nodeB\n * @returns {boolean|*}\n */\nexport var getCommonParent = function (nodeA, nodeB) {\n var parentsA = getParents(nodeA);\n var parentsB = getParents(nodeB);\n // tslint:disable-next-line:prefer-for-of\n for (var i = 0; i < parentsA.length; i += 1) {\n var currentParent = parentsA[i];\n if (parentsB.indexOf(currentParent) >= 0) {\n return currentParent;\n }\n }\n return false;\n};\nexport var getTopCommonParent = function (baseActiveElement, leftEntry, rightEntries) {\n var activeElements = asArray(baseActiveElement);\n var leftEntries = asArray(leftEntry);\n var activeElement = activeElements[0];\n var topCommon = false;\n leftEntries.filter(Boolean).forEach(function (entry) {\n topCommon = getCommonParent(topCommon || entry, entry) || topCommon;\n rightEntries.filter(Boolean).forEach(function (subEntry) {\n var common = getCommonParent(activeElement, subEntry);\n if (common) {\n if (!topCommon || contains(common, topCommon)) {\n topCommon = common;\n }\n else {\n topCommon = getCommonParent(common, topCommon);\n }\n }\n });\n });\n // TODO: add assert here?\n return topCommon;\n};\n/**\n * return list of nodes which are expected to be autofocused inside a given top nodes\n * @param entries\n * @param visibilityCache\n */\nexport var allParentAutofocusables = function (entries, visibilityCache) {\n return entries.reduce(function (acc, node) { return acc.concat(parentAutofocusables(node, visibilityCache)); }, []);\n};\n","import { NEW_FOCUS, newFocus } from './solver';\nimport { filterAutoFocusable, getAllTabbableNodes, getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { pickFirstFocus } from './utils/firstFocus';\nimport { getActiveElement } from './utils/getActiveElement';\nimport { getDataset, isDefined, isNotAGuard } from './utils/is';\nimport { allParentAutofocusables, getTopCommonParent } from './utils/parenting';\nvar findAutoFocused = function (autoFocusables) {\n return function (node) { var _a; \n // @ts-expect-error\n return node.autofocus || !!((_a = getDataset(node)) === null || _a === void 0 ? void 0 : _a.autofocus) || autoFocusables.indexOf(node) >= 0; };\n};\nvar reorderNodes = function (srcNodes, dstNodes) {\n var remap = new Map();\n // no Set(dstNodes) for IE11 :(\n dstNodes.forEach(function (entity) { return remap.set(entity.node, entity); });\n // remap to dstNodes\n return srcNodes.map(function (node) { return remap.get(node); }).filter(isDefined);\n};\n/**\n * given top node(s) and the last active element return the element to be focused next\n * @param topNode\n * @param lastNode\n */\nexport var getFocusMerge = function (topNode, lastNode) {\n var activeElement = document && getActiveElement();\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(activeElement || topNode, topNode, entries);\n var visibilityCache = new Map();\n var anyFocusable = getAllTabbableNodes(entries, visibilityCache);\n var innerElements = getTabbableNodes(entries, visibilityCache).filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n });\n if (!innerElements[0]) {\n innerElements = anyFocusable;\n if (!innerElements[0]) {\n return undefined;\n }\n }\n var outerNodes = getAllTabbableNodes([commonParent], visibilityCache).map(function (_a) {\n var node = _a.node;\n return node;\n });\n var orderedInnerElements = reorderNodes(outerNodes, innerElements);\n var innerNodes = orderedInnerElements.map(function (_a) {\n var node = _a.node;\n return node;\n });\n var newId = newFocus(innerNodes, outerNodes, activeElement, lastNode);\n if (newId === NEW_FOCUS) {\n var autoFocusable = filterAutoFocusable(anyFocusable.map(function (_a) {\n var node = _a.node;\n return node;\n })).filter(findAutoFocused(allParentAutofocusables(entries, visibilityCache)));\n return {\n node: autoFocusable && autoFocusable.length\n ? pickFirstFocus(autoFocusable)\n : pickFirstFocus(filterAutoFocusable(innerNodes)),\n };\n }\n if (newId === undefined) {\n return newId;\n }\n return orderedInnerElements[newId];\n};\n","import { getFocusMerge } from './focusMerge';\nexport var focusOn = function (target, focusOptions) {\n if ('focus' in target) {\n target.focus(focusOptions);\n }\n if ('contentWindow' in target && target.contentWindow) {\n target.contentWindow.focus();\n }\n};\nvar guardCount = 0;\nvar lockDisabled = false;\n/**\n * Sets focus at a given node. The last focused element will help to determine which element(first or last) should be focused.\n * HTML markers (see {@link import('./constants').FOCUS_AUTO} constants) can control autofocus\n * @param topNode\n * @param lastNode\n * @param options\n */\nexport var setFocus = function (topNode, lastNode, options) {\n if (options === void 0) { options = {}; }\n var focusable = getFocusMerge(topNode, lastNode);\n if (lockDisabled) {\n return;\n }\n if (focusable) {\n if (guardCount > 2) {\n // tslint:disable-next-line:no-console\n console.error('FocusLock: focus-fighting detected. Only one focus management system could be active. ' +\n 'See https://github.com/theKashey/focus-lock/#focus-fighting');\n lockDisabled = true;\n setTimeout(function () {\n lockDisabled = false;\n }, 1);\n return;\n }\n guardCount++;\n focusOn(focusable.node, options.focusOptions);\n guardCount--;\n }\n};\n","import * as constants from './constants';\nimport { focusInside } from './focusInside';\nimport { focusIsHidden } from './focusIsHidden';\nimport { getFocusMerge as focusMerge } from './focusMerge';\nimport { getFocusabledIn, getFocusableIn } from './focusables';\nimport { setFocus } from './setFocus';\nimport { focusNextElement, focusPrevElement } from './sibling';\nimport tabHook from './tabHook';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { getActiveElement } from './utils/getActiveElement';\nexport { tabHook, focusInside, focusIsHidden, focusMerge, getFocusableIn, getFocusabledIn, constants, getAllAffectedNodes, focusNextElement, focusPrevElement, getActiveElement, };\nexport default setFocus;\n//\n","import { contains } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\nvar focusInFrame = function (frame) { return frame === document.activeElement; };\nvar focusInsideIframe = function (topNode) {\n return Boolean(toArray(topNode.querySelectorAll('iframe')).some(function (node) { return focusInFrame(node); }));\n};\n/**\n * @returns {Boolean} true, if the current focus is inside given node or nodes\n */\nexport var focusInside = function (topNode) {\n var activeElement = document && getActiveElement();\n if (!activeElement || (activeElement.dataset && activeElement.dataset.focusGuard)) {\n return false;\n }\n return getAllAffectedNodes(topNode).some(function (node) { return contains(node, activeElement) || focusInsideIframe(node); });\n};\n","import { getTabbableNodes } from './utils/DOMutils';\nimport { getAllAffectedNodes } from './utils/all-affected';\nimport { isGuard, isNotAGuard } from './utils/is';\nimport { getTopCommonParent } from './utils/parenting';\n/**\n * return list of focusable elements inside a given top node\n * @deprecated use {@link getFocusableIn}. Yep, there is typo in the function name\n */\nexport var getFocusabledIn = function (topNode) {\n var entries = getAllAffectedNodes(topNode).filter(isNotAGuard);\n var commonParent = getTopCommonParent(topNode, topNode, entries);\n var visibilityCache = new Map();\n var outerNodes = getTabbableNodes([commonParent], visibilityCache, true);\n var innerElements = getTabbableNodes(entries, visibilityCache)\n .filter(function (_a) {\n var node = _a.node;\n return isNotAGuard(node);\n })\n .map(function (_a) {\n var node = _a.node;\n return node;\n });\n return outerNodes.map(function (_a) {\n var node = _a.node, index = _a.index;\n return ({\n node: node,\n index: index,\n lockItem: innerElements.indexOf(node) >= 0,\n guard: isGuard(node),\n });\n });\n};\n/**\n * return list of focusable elements inside a given top node\n */\nexport var getFocusableIn = getFocusabledIn;\n","export function deferAction(action) {\n // Hidding setImmediate from Webpack to avoid inserting polyfill\n var _window = window,\n setImmediate = _window.setImmediate;\n\n if (typeof setImmediate !== 'undefined') {\n setImmediate(action);\n } else {\n setTimeout(action, 1);\n }\n}\nexport var inlineProp = function inlineProp(name, value) {\n var obj = {};\n obj[name] = value;\n return obj;\n};","/* eslint-disable no-mixed-operators */\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport withSideEffect from 'react-clientside-effect';\nimport moveFocusInside, { focusInside, focusIsHidden, getFocusabledIn } from 'focus-lock';\nimport { deferAction } from './util';\nimport { mediumFocus, mediumBlur, mediumEffect } from './medium';\n\nvar focusOnBody = function focusOnBody() {\n return document && document.activeElement === document.body;\n};\n\nvar isFreeFocus = function isFreeFocus() {\n return focusOnBody() || focusIsHidden();\n};\n\nvar lastActiveTrap = null;\nvar lastActiveFocus = null;\nvar lastPortaledElement = null;\nvar focusWasOutsideWindow = false;\n\nvar defaultWhitelist = function defaultWhitelist() {\n return true;\n};\n\nvar focusWhitelisted = function focusWhitelisted(activeElement) {\n return (lastActiveTrap.whiteList || defaultWhitelist)(activeElement);\n};\n\nvar recordPortal = function recordPortal(observerNode, portaledElement) {\n lastPortaledElement = {\n observerNode: observerNode,\n portaledElement: portaledElement\n };\n};\n\nvar focusIsPortaledPair = function focusIsPortaledPair(element) {\n return lastPortaledElement && lastPortaledElement.portaledElement === element;\n};\n\nfunction autoGuard(startIndex, end, step, allNodes) {\n var lastGuard = null;\n var i = startIndex;\n\n do {\n var item = allNodes[i];\n\n if (item.guard) {\n if (item.node.dataset.focusAutoGuard) {\n lastGuard = item;\n }\n } else if (item.lockItem) {\n if (i !== startIndex) {\n // we will tab to the next element\n return;\n }\n\n lastGuard = null;\n } else {\n break;\n }\n } while ((i += step) !== end);\n\n if (lastGuard) {\n lastGuard.node.tabIndex = 0;\n }\n}\n\nvar extractRef = function extractRef(ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\n\nvar focusWasOutside = function focusWasOutside(crossFrameOption) {\n if (crossFrameOption) {\n // with cross frame return true for any value\n return Boolean(focusWasOutsideWindow);\n } // in other case return only of focus went a while aho\n\n\n return focusWasOutsideWindow === 'meanwhile';\n};\n\nvar checkInHost = function checkInHost(check, el, boundary) {\n return el && ( // find host equal to active element and check nested active element\n el.host === check && (!el.activeElement || boundary.contains(el.activeElement)) // dive up\n || el.parentNode && checkInHost(check, el.parentNode, boundary));\n};\n\nvar withinHost = function withinHost(activeElement, workingArea) {\n return workingArea.some(function (area) {\n return checkInHost(activeElement, area, area);\n });\n};\n\nvar activateTrap = function activateTrap() {\n var result = false;\n\n if (lastActiveTrap) {\n var _lastActiveTrap = lastActiveTrap,\n observed = _lastActiveTrap.observed,\n persistentFocus = _lastActiveTrap.persistentFocus,\n autoFocus = _lastActiveTrap.autoFocus,\n shards = _lastActiveTrap.shards,\n crossFrame = _lastActiveTrap.crossFrame,\n focusOptions = _lastActiveTrap.focusOptions;\n var workingNode = observed || lastPortaledElement && lastPortaledElement.portaledElement;\n var activeElement = document && document.activeElement;\n\n if (workingNode) {\n var workingArea = [workingNode].concat(shards.map(extractRef).filter(Boolean));\n\n if (!activeElement || focusWhitelisted(activeElement)) {\n if (persistentFocus || focusWasOutside(crossFrame) || !isFreeFocus() || !lastActiveFocus && autoFocus) {\n if (workingNode && !( // active element is \"inside\" working area\n focusInside(workingArea) || // check for shadow-dom contained elements\n activeElement && withinHost(activeElement, workingArea) || focusIsPortaledPair(activeElement, workingNode))) {\n if (document && !lastActiveFocus && activeElement && !autoFocus) {\n // Check if blur() exists, which is missing on certain elements on IE\n if (activeElement.blur) {\n activeElement.blur();\n }\n\n document.body.focus();\n } else {\n result = moveFocusInside(workingArea, lastActiveFocus, {\n focusOptions: focusOptions\n });\n lastPortaledElement = {};\n }\n }\n\n focusWasOutsideWindow = false;\n lastActiveFocus = document && document.activeElement;\n }\n }\n\n if (document) {\n var newActiveElement = document && document.activeElement;\n var allNodes = getFocusabledIn(workingArea);\n var focusedIndex = allNodes.map(function (_ref) {\n var node = _ref.node;\n return node;\n }).indexOf(newActiveElement);\n\n if (focusedIndex > -1) {\n // remove old focus\n allNodes.filter(function (_ref2) {\n var guard = _ref2.guard,\n node = _ref2.node;\n return guard && node.dataset.focusAutoGuard;\n }).forEach(function (_ref3) {\n var node = _ref3.node;\n return node.removeAttribute('tabIndex');\n });\n autoGuard(focusedIndex, allNodes.length, +1, allNodes);\n autoGuard(focusedIndex, -1, -1, allNodes);\n }\n }\n }\n }\n\n return result;\n};\n\nvar onTrap = function onTrap(event) {\n if (activateTrap() && event) {\n // prevent scroll jump\n event.stopPropagation();\n event.preventDefault();\n }\n};\n\nvar onBlur = function onBlur() {\n return deferAction(activateTrap);\n};\n\nvar onFocus = function onFocus(event) {\n // detect portal\n var source = event.target;\n var currentNode = event.currentTarget;\n\n if (!currentNode.contains(source)) {\n recordPortal(currentNode, source);\n }\n};\n\nvar FocusWatcher = function FocusWatcher() {\n return null;\n};\n\nvar FocusTrap = function FocusTrap(_ref4) {\n var children = _ref4.children;\n return /*#__PURE__*/React.createElement(\"div\", {\n onBlur: onBlur,\n onFocus: onFocus\n }, children);\n};\n\nFocusTrap.propTypes = process.env.NODE_ENV !== \"production\" ? {\n children: PropTypes.node.isRequired\n} : {};\n\nvar onWindowBlur = function onWindowBlur() {\n focusWasOutsideWindow = 'just'; // using setTimeout to set this variable after React/sidecar reaction\n\n setTimeout(function () {\n focusWasOutsideWindow = 'meanwhile';\n }, 0);\n};\n\nvar attachHandler = function attachHandler() {\n document.addEventListener('focusin', onTrap);\n document.addEventListener('focusout', onBlur);\n window.addEventListener('blur', onWindowBlur);\n};\n\nvar detachHandler = function detachHandler() {\n document.removeEventListener('focusin', onTrap);\n document.removeEventListener('focusout', onBlur);\n window.removeEventListener('blur', onWindowBlur);\n};\n\nfunction reducePropsToState(propsList) {\n return propsList.filter(function (_ref5) {\n var disabled = _ref5.disabled;\n return !disabled;\n });\n}\n\nfunction handleStateChangeOnClient(traps) {\n var trap = traps.slice(-1)[0];\n\n if (trap && !lastActiveTrap) {\n attachHandler();\n }\n\n var lastTrap = lastActiveTrap;\n var sameTrap = lastTrap && trap && trap.id === lastTrap.id;\n lastActiveTrap = trap;\n\n if (lastTrap && !sameTrap) {\n lastTrap.onDeactivation(); // return focus only of last trap was removed\n\n if (!traps.filter(function (_ref6) {\n var id = _ref6.id;\n return id === lastTrap.id;\n }).length) {\n // allow defer is no other trap is awaiting restore\n lastTrap.returnFocus(!trap);\n }\n }\n\n if (trap) {\n lastActiveFocus = null;\n\n if (!sameTrap || lastTrap.observed !== trap.observed) {\n trap.onActivation();\n }\n\n activateTrap(true);\n deferAction(activateTrap);\n } else {\n detachHandler();\n lastActiveFocus = null;\n }\n} // bind medium\n\n\nmediumFocus.assignSyncMedium(onFocus);\nmediumBlur.assignMedium(onBlur);\nmediumEffect.assignMedium(function (cb) {\n return cb({\n moveFocusInside: moveFocusInside,\n focusInside: focusInside\n });\n});\nexport default withSideEffect(reducePropsToState, handleStateChangeOnClient)(FocusWatcher);","import { FOCUS_ALLOW } from './constants';\nimport { contains } from './utils/DOMutils';\nimport { toArray } from './utils/array';\nimport { getActiveElement } from './utils/getActiveElement';\n/**\n * focus is hidden FROM the focus-lock\n * ie contained inside a node focus-lock shall ignore\n * @returns {boolean} focus is currently is in \"allow\" area\n */\nexport var focusIsHidden = function () {\n var activeElement = document && getActiveElement();\n if (!activeElement) {\n return false;\n }\n // this does not support setting FOCUS_ALLOW within shadow dom\n return toArray(document.querySelectorAll(\"[\".concat(FOCUS_ALLOW, \"]\"))).some(function (node) { return contains(node, activeElement); });\n};\n","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport FocusLockUI from './Lock';\nimport FocusTrap from './Trap';\n/* that would be a BREAKING CHANGE!\n// delaying sidecar execution till the first usage\nconst RequireSideCar = (props) => {\n // eslint-disable-next-line global-require\n const SideCar = require('./Trap').default;\n return ;\n};\n*/\n\nvar FocusLockCombination = /*#__PURE__*/React.forwardRef(function FocusLockUICombination(props, ref) {\n return /*#__PURE__*/React.createElement(FocusLockUI, _extends({\n sideCar: FocusTrap,\n ref: ref\n }, props));\n});\n\nvar _ref = FocusLockUI.propTypes || {},\n sideCar = _ref.sideCar,\n propTypes = _objectWithoutPropertiesLoose(_ref, [\"sideCar\"]);\n\nFocusLockCombination.propTypes = process.env.NODE_ENV !== \"production\" ? propTypes : {};\nexport default FocusLockCombination;","import FocusLock from './Combination';\nexport * from './UI';\nexport default FocusLock;","export var zeroRightClassName = 'right-scroll-bar-position';\nexport var fullWidthClassName = 'width-before-scroll-bar';\nexport var noScrollbarsClassName = 'with-scroll-bars-hidden';\n/**\n * Name of a CSS variable containing the amount of \"hidden\" scrollbar\n * ! might be undefined ! use will fallback!\n */\nexport var removedBarSizeVariable = '--removed-body-scroll-bar-size';\n","import { createSidecarMedium } from 'use-sidecar';\nexport var effectCar = createSidecarMedium();\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nimport { fullWidthClassName, zeroRightClassName } from 'react-remove-scroll-bar/constants';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { effectCar } from './medium';\nvar nothing = function () {\n return;\n};\n/**\n * Removes scrollbar from the page and contain the scroll within the Lock\n */\nvar RemoveScroll = React.forwardRef(function (props, parentRef) {\n var ref = React.useRef(null);\n var _a = React.useState({\n onScrollCapture: nothing,\n onWheelCapture: nothing,\n onTouchMoveCapture: nothing,\n }), callbacks = _a[0], setCallbacks = _a[1];\n var forwardProps = props.forwardProps, children = props.children, className = props.className, removeScrollBar = props.removeScrollBar, enabled = props.enabled, shards = props.shards, sideCar = props.sideCar, noIsolation = props.noIsolation, inert = props.inert, allowPinchZoom = props.allowPinchZoom, _b = props.as, Container = _b === void 0 ? 'div' : _b, rest = __rest(props, [\"forwardProps\", \"children\", \"className\", \"removeScrollBar\", \"enabled\", \"shards\", \"sideCar\", \"noIsolation\", \"inert\", \"allowPinchZoom\", \"as\"]);\n var SideCar = sideCar;\n var containerRef = useMergeRefs([ref, parentRef]);\n var containerProps = __assign(__assign({}, rest), callbacks);\n return (React.createElement(React.Fragment, null,\n enabled && (React.createElement(SideCar, { sideCar: effectCar, removeScrollBar: removeScrollBar, shards: shards, noIsolation: noIsolation, inert: inert, setCallbacks: setCallbacks, allowPinchZoom: !!allowPinchZoom, lockRef: ref })),\n forwardProps ? (React.cloneElement(React.Children.only(children), __assign(__assign({}, containerProps), { ref: containerRef }))) : (React.createElement(Container, __assign({}, containerProps, { className: className, ref: containerRef }), children))));\n});\nRemoveScroll.defaultProps = {\n enabled: true,\n removeScrollBar: true,\n inert: false,\n};\nRemoveScroll.classNames = {\n fullWidth: fullWidthClassName,\n zeroRight: zeroRightClassName,\n};\nexport { RemoveScroll };\n","import { __assign, __rest } from \"tslib\";\nimport * as React from 'react';\nvar SideCar = function (_a) {\n var sideCar = _a.sideCar, rest = __rest(_a, [\"sideCar\"]);\n if (!sideCar) {\n throw new Error('Sidecar: please provide `sideCar` property to import the right car');\n }\n var Target = sideCar.read();\n if (!Target) {\n throw new Error('Sidecar medium not found');\n }\n return React.createElement(Target, __assign({}, rest));\n};\nSideCar.isSideCarExport = true;\nexport function exportSidecar(medium, exported) {\n medium.useMedium(exported);\n return SideCar;\n}\n","var currentNonce;\nexport var setNonce = function (nonce) {\n currentNonce = nonce;\n};\nexport var getNonce = function () {\n if (currentNonce) {\n return currentNonce;\n }\n if (typeof __webpack_nonce__ !== 'undefined') {\n return __webpack_nonce__;\n }\n return undefined;\n};\n","import { getNonce } from 'get-nonce';\nfunction makeStyleTag() {\n if (!document)\n return null;\n var tag = document.createElement('style');\n tag.type = 'text/css';\n var nonce = getNonce();\n if (nonce) {\n tag.setAttribute('nonce', nonce);\n }\n return tag;\n}\nfunction injectStyles(tag, css) {\n // @ts-ignore\n if (tag.styleSheet) {\n // @ts-ignore\n tag.styleSheet.cssText = css;\n }\n else {\n tag.appendChild(document.createTextNode(css));\n }\n}\nfunction insertStyleTag(tag) {\n var head = document.head || document.getElementsByTagName('head')[0];\n head.appendChild(tag);\n}\nexport var stylesheetSingleton = function () {\n var counter = 0;\n var stylesheet = null;\n return {\n add: function (style) {\n if (counter == 0) {\n if ((stylesheet = makeStyleTag())) {\n injectStyles(stylesheet, style);\n insertStyleTag(stylesheet);\n }\n }\n counter++;\n },\n remove: function () {\n counter--;\n if (!counter && stylesheet) {\n stylesheet.parentNode && stylesheet.parentNode.removeChild(stylesheet);\n stylesheet = null;\n }\n },\n };\n};\n","import { styleHookSingleton } from './hook';\n/**\n * create a Component to add styles on demand\n * - styles are added when first instance is mounted\n * - styles are removed when the last instance is unmounted\n * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior\n */\nexport var styleSingleton = function () {\n var useStyle = styleHookSingleton();\n var Sheet = function (_a) {\n var styles = _a.styles, dynamic = _a.dynamic;\n useStyle(styles, dynamic);\n return null;\n };\n return Sheet;\n};\n","import * as React from 'react';\nimport { stylesheetSingleton } from './singleton';\n/**\n * creates a hook to control style singleton\n * @see {@link styleSingleton} for a safer component version\n * @example\n * ```tsx\n * const useStyle = styleHookSingleton();\n * ///\n * useStyle('body { overflow: hidden}');\n */\nexport var styleHookSingleton = function () {\n var sheet = stylesheetSingleton();\n return function (styles, isDynamic) {\n React.useEffect(function () {\n sheet.add(styles);\n return function () {\n sheet.remove();\n };\n }, [styles && isDynamic]);\n };\n};\n","export var zeroGap = {\n left: 0,\n top: 0,\n right: 0,\n gap: 0,\n};\nvar parse = function (x) { return parseInt(x || '', 10) || 0; };\nvar getOffset = function (gapMode) {\n var cs = window.getComputedStyle(document.body);\n if (process.env.NODE_ENV !== 'production') {\n if (cs.overflowY === 'hidden') {\n console.error('react-remove-scroll-bar: cannot calculate scrollbar size because it is removed (overflow:hidden on body');\n }\n }\n var left = cs[gapMode === 'padding' ? 'paddingLeft' : 'marginLeft'];\n var top = cs[gapMode === 'padding' ? 'paddingTop' : 'marginTop'];\n var right = cs[gapMode === 'padding' ? 'paddingRight' : 'marginRight'];\n return [parse(left), parse(top), parse(right)];\n};\nexport var getGapWidth = function (gapMode) {\n if (gapMode === void 0) { gapMode = 'margin'; }\n if (typeof window === 'undefined') {\n return zeroGap;\n }\n var offsets = getOffset(gapMode);\n var documentWidth = document.documentElement.clientWidth;\n var windowWidth = window.innerWidth;\n return {\n left: offsets[0],\n top: offsets[1],\n right: offsets[2],\n gap: Math.max(0, windowWidth - documentWidth + offsets[2] - offsets[0]),\n };\n};\n","import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { fullWidthClassName, zeroRightClassName, noScrollbarsClassName, removedBarSizeVariable } from './constants';\nimport { getGapWidth } from './utils';\nvar Style = styleSingleton();\n// important tip - once we measure scrollBar width and remove them\n// we could not repeat this operation\n// thus we are using style-singleton - only the first \"yet correct\" style will be applied.\nvar getStyles = function (_a, allowRelative, gapMode, important) {\n var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;\n if (gapMode === void 0) { gapMode = 'margin'; }\n return \"\\n .\".concat(noScrollbarsClassName, \" {\\n overflow: hidden \").concat(important, \";\\n padding-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n body {\\n overflow: hidden \").concat(important, \";\\n overscroll-behavior: contain;\\n \").concat([\n allowRelative && \"position: relative \".concat(important, \";\"),\n gapMode === 'margin' &&\n \"\\n padding-left: \".concat(left, \"px;\\n padding-top: \").concat(top, \"px;\\n padding-right: \").concat(right, \"px;\\n margin-left:0;\\n margin-top:0;\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n \"),\n gapMode === 'padding' && \"padding-right: \".concat(gap, \"px \").concat(important, \";\"),\n ]\n .filter(Boolean)\n .join(''), \"\\n }\\n \\n .\").concat(zeroRightClassName, \" {\\n right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" {\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(zeroRightClassName, \" .\").concat(zeroRightClassName, \" {\\n right: 0 \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" .\").concat(fullWidthClassName, \" {\\n margin-right: 0 \").concat(important, \";\\n }\\n \\n body {\\n \").concat(removedBarSizeVariable, \": \").concat(gap, \"px;\\n }\\n\");\n};\n/**\n * Removes page scrollbar and blocks page scroll when mounted\n */\nexport var RemoveScrollBar = function (props) {\n var noRelative = props.noRelative, noImportant = props.noImportant, _a = props.gapMode, gapMode = _a === void 0 ? 'margin' : _a;\n var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);\n return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });\n};\n","var passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n return true;\n },\n });\n // @ts-ignore\n window.addEventListener('test', options, options);\n // @ts-ignore\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\nexport var nonPassive = passiveSupported ? { passive: false } : false;\n","var alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));\n};\nvar elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };\nvar elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };\nexport var locationCouldBeScrolled = function (axis, node) {\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current), s = _a[1], d = _a[2];\n if (s > d) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== document.body);\n return false;\n};\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;\n return [\n scrollTop,\n scrollHeight,\n clientHeight,\n ];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;\n return [\n scrollLeft,\n scrollWidth,\n clientWidth,\n ];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nexport var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n target = target.parentNode;\n } while (\n // portaled content\n (!targetInLock && target !== document.body) ||\n // self content\n (targetInLock && (endTarget.contains(target) || endTarget === target)));\n if (isDeltaPositive && ((noOverscroll && availableScroll === 0) || (!noOverscroll && delta > availableScroll))) {\n shouldCancelScroll = true;\n }\n else if (!isDeltaPositive &&\n ((noOverscroll && availableScrollTop === 0) || (!noOverscroll && -delta > availableScrollTop))) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\n","import { __spreadArray } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScrollBar } from 'react-remove-scroll-bar';\nimport { styleSingleton } from 'react-style-singleton';\nimport { nonPassive } from './aggresiveCapture';\nimport { handleScroll, locationCouldBeScrolled } from './handleScroll';\nexport var getTouchXY = function (event) {\n return 'changedTouches' in event ? [event.changedTouches[0].clientX, event.changedTouches[0].clientY] : [0, 0];\n};\nexport var getDeltaXY = function (event) { return [event.deltaX, event.deltaY]; };\nvar extractRef = function (ref) {\n return ref && 'current' in ref ? ref.current : ref;\n};\nvar deltaCompare = function (x, y) { return x[0] === y[0] && x[1] === y[1]; };\nvar generateStyle = function (id) { return \"\\n .block-interactivity-\".concat(id, \" {pointer-events: none;}\\n .allow-interactivity-\").concat(id, \" {pointer-events: all;}\\n\"); };\nvar idCounter = 0;\nvar lockStack = [];\nexport function RemoveScrollSideCar(props) {\n var shouldPreventQueue = React.useRef([]);\n var touchStartRef = React.useRef([0, 0]);\n var activeAxis = React.useRef();\n var id = React.useState(idCounter++)[0];\n var Style = React.useState(function () { return styleSingleton(); })[0];\n var lastProps = React.useRef(props);\n React.useEffect(function () {\n lastProps.current = props;\n }, [props]);\n React.useEffect(function () {\n if (props.inert) {\n document.body.classList.add(\"block-interactivity-\".concat(id));\n var allow_1 = __spreadArray([props.lockRef.current], (props.shards || []).map(extractRef), true).filter(Boolean);\n allow_1.forEach(function (el) { return el.classList.add(\"allow-interactivity-\".concat(id)); });\n return function () {\n document.body.classList.remove(\"block-interactivity-\".concat(id));\n allow_1.forEach(function (el) { return el.classList.remove(\"allow-interactivity-\".concat(id)); });\n };\n }\n return;\n }, [props.inert, props.lockRef.current, props.shards]);\n var shouldCancelEvent = React.useCallback(function (event, parent) {\n if ('touches' in event && event.touches.length === 2) {\n return !lastProps.current.allowPinchZoom;\n }\n var touch = getTouchXY(event);\n var touchStart = touchStartRef.current;\n var deltaX = 'deltaX' in event ? event.deltaX : touchStart[0] - touch[0];\n var deltaY = 'deltaY' in event ? event.deltaY : touchStart[1] - touch[1];\n var currentAxis;\n var target = event.target;\n var moveDirection = Math.abs(deltaX) > Math.abs(deltaY) ? 'h' : 'v';\n // allow horizontal touch move on Range inputs. They will not cause any scroll\n if ('touches' in event && moveDirection === 'h' && target.type === 'range') {\n return false;\n }\n var canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n if (!canBeScrolledInMainDirection) {\n return true;\n }\n if (canBeScrolledInMainDirection) {\n currentAxis = moveDirection;\n }\n else {\n currentAxis = moveDirection === 'v' ? 'h' : 'v';\n canBeScrolledInMainDirection = locationCouldBeScrolled(moveDirection, target);\n // other axis might be not scrollable\n }\n if (!canBeScrolledInMainDirection) {\n return false;\n }\n if (!activeAxis.current && 'changedTouches' in event && (deltaX || deltaY)) {\n activeAxis.current = currentAxis;\n }\n if (!currentAxis) {\n return true;\n }\n var cancelingAxis = activeAxis.current || currentAxis;\n return handleScroll(cancelingAxis, parent, event, cancelingAxis === 'h' ? deltaX : deltaY, true);\n }, []);\n var shouldPrevent = React.useCallback(function (_event) {\n var event = _event;\n if (!lockStack.length || lockStack[lockStack.length - 1] !== Style) {\n // not the last active\n return;\n }\n var delta = 'deltaY' in event ? getDeltaXY(event) : getTouchXY(event);\n var sourceEvent = shouldPreventQueue.current.filter(function (e) { return e.name === event.type && e.target === event.target && deltaCompare(e.delta, delta); })[0];\n // self event, and should be canceled\n if (sourceEvent && sourceEvent.should) {\n if (event.cancelable) {\n event.preventDefault();\n }\n return;\n }\n // outside or shard event\n if (!sourceEvent) {\n var shardNodes = (lastProps.current.shards || [])\n .map(extractRef)\n .filter(Boolean)\n .filter(function (node) { return node.contains(event.target); });\n var shouldStop = shardNodes.length > 0 ? shouldCancelEvent(event, shardNodes[0]) : !lastProps.current.noIsolation;\n if (shouldStop) {\n if (event.cancelable) {\n event.preventDefault();\n }\n }\n }\n }, []);\n var shouldCancel = React.useCallback(function (name, delta, target, should) {\n var event = { name: name, delta: delta, target: target, should: should };\n shouldPreventQueue.current.push(event);\n setTimeout(function () {\n shouldPreventQueue.current = shouldPreventQueue.current.filter(function (e) { return e !== event; });\n }, 1);\n }, []);\n var scrollTouchStart = React.useCallback(function (event) {\n touchStartRef.current = getTouchXY(event);\n activeAxis.current = undefined;\n }, []);\n var scrollWheel = React.useCallback(function (event) {\n shouldCancel(event.type, getDeltaXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n var scrollTouchMove = React.useCallback(function (event) {\n shouldCancel(event.type, getTouchXY(event), event.target, shouldCancelEvent(event, props.lockRef.current));\n }, []);\n React.useEffect(function () {\n lockStack.push(Style);\n props.setCallbacks({\n onScrollCapture: scrollWheel,\n onWheelCapture: scrollWheel,\n onTouchMoveCapture: scrollTouchMove,\n });\n document.addEventListener('wheel', shouldPrevent, nonPassive);\n document.addEventListener('touchmove', shouldPrevent, nonPassive);\n document.addEventListener('touchstart', scrollTouchStart, nonPassive);\n return function () {\n lockStack = lockStack.filter(function (inst) { return inst !== Style; });\n document.removeEventListener('wheel', shouldPrevent, nonPassive);\n document.removeEventListener('touchmove', shouldPrevent, nonPassive);\n document.removeEventListener('touchstart', scrollTouchStart, nonPassive);\n };\n }, []);\n var removeScrollBar = props.removeScrollBar, inert = props.inert;\n return (React.createElement(React.Fragment, null,\n inert ? React.createElement(Style, { styles: generateStyle(id) }) : null,\n removeScrollBar ? React.createElement(RemoveScrollBar, { gapMode: \"margin\" }) : null));\n}\n","import { exportSidecar } from 'use-sidecar';\nimport { RemoveScrollSideCar } from './SideEffect';\nimport { effectCar } from './medium';\nexport default exportSidecar(effectCar, RemoveScrollSideCar);\n","import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n","import React, { forwardRef, useEffect, useRef, useCallback } from 'react';\nimport Portal from '@reach/portal';\nimport { checkStyles, useForkedRef, wrapEvent, getOwnerDocument, noop, isString } from '@reach/utils';\nimport FocusLock from 'react-focus-lock';\nimport { RemoveScroll } from 'react-remove-scroll';\nimport PropTypes from 'prop-types';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nvar overlayPropTypes = {\n allowPinchZoom: PropTypes.bool,\n dangerouslyBypassFocusLock: PropTypes.bool,\n dangerouslyBypassScrollLock: PropTypes.bool,\n // TODO:\n initialFocusRef: function initialFocusRef() {\n return null;\n },\n onDismiss: PropTypes.func\n}; ////////////////////////////////////////////////////////////////////////////////\n\n/**\r\n * DialogOverlay\r\n *\r\n * Low-level component if you need more control over the styles or rendering of\r\n * the dialog overlay.\r\n *\r\n * Note: You must render a `DialogContent` inside.\r\n *\r\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialogoverlay\r\n */\n\nvar DialogOverlay = /*#__PURE__*/forwardRef(function DialogOverlay(_ref, forwardedRef) {\n var _ref$isOpen = _ref.isOpen,\n isOpen = _ref$isOpen === void 0 ? true : _ref$isOpen,\n props = _objectWithoutPropertiesLoose(_ref, [\"isOpen\"]);\n\n useEffect(function () {\n return checkStyles(\"dialog\");\n }, []); // We want to ignore the immediate focus of a tooltip so it doesn't pop\n // up again when the menu closes, only pops up when focus returns again\n // to the tooltip (like native OS tooltips).\n\n useEffect(function () {\n if (isOpen) {\n // @ts-ignore\n window.__REACH_DISABLE_TOOLTIPS = true;\n } else {\n window.requestAnimationFrame(function () {\n // Wait a frame so that this doesn't fire before tooltip does\n // @ts-ignore\n window.__REACH_DISABLE_TOOLTIPS = false;\n });\n }\n }, [isOpen]);\n return isOpen ? React.createElement(Portal, {\n \"data-reach-dialog-wrapper\": \"\"\n }, React.createElement(DialogInner, Object.assign({\n ref: forwardedRef\n }, props))) : null;\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n DialogOverlay.displayName = \"DialogOverlay\";\n DialogOverlay.propTypes = /*#__PURE__*/_extends({}, overlayPropTypes, {\n isOpen: PropTypes.bool\n });\n} ////////////////////////////////////////////////////////////////////////////////\n\n/**\r\n * DialogInner\r\n */\n\n\nvar DialogInner = /*#__PURE__*/forwardRef(function DialogInner(_ref2, forwardedRef) {\n var allowPinchZoom = _ref2.allowPinchZoom,\n _ref2$dangerouslyBypa = _ref2.dangerouslyBypassFocusLock,\n dangerouslyBypassFocusLock = _ref2$dangerouslyBypa === void 0 ? false : _ref2$dangerouslyBypa,\n _ref2$dangerouslyBypa2 = _ref2.dangerouslyBypassScrollLock,\n dangerouslyBypassScrollLock = _ref2$dangerouslyBypa2 === void 0 ? false : _ref2$dangerouslyBypa2,\n initialFocusRef = _ref2.initialFocusRef,\n onClick = _ref2.onClick,\n _ref2$onDismiss = _ref2.onDismiss,\n onDismiss = _ref2$onDismiss === void 0 ? noop : _ref2$onDismiss,\n onKeyDown = _ref2.onKeyDown,\n onMouseDown = _ref2.onMouseDown,\n _ref2$unstable_lockFo = _ref2.unstable_lockFocusAcrossFrames,\n unstable_lockFocusAcrossFrames = _ref2$unstable_lockFo === void 0 ? true : _ref2$unstable_lockFo,\n props = _objectWithoutPropertiesLoose(_ref2, [\"allowPinchZoom\", \"dangerouslyBypassFocusLock\", \"dangerouslyBypassScrollLock\", \"initialFocusRef\", \"onClick\", \"onDismiss\", \"onKeyDown\", \"onMouseDown\", \"unstable_lockFocusAcrossFrames\"]);\n\n var mouseDownTarget = useRef(null);\n var overlayNode = useRef(null);\n var ref = useForkedRef(overlayNode, forwardedRef);\n var activateFocusLock = useCallback(function () {\n if (initialFocusRef && initialFocusRef.current) {\n initialFocusRef.current.focus();\n }\n }, [initialFocusRef]);\n\n function handleClick(event) {\n if (mouseDownTarget.current === event.target) {\n event.stopPropagation();\n onDismiss(event);\n }\n }\n\n function handleKeyDown(event) {\n if (event.key === \"Escape\") {\n event.stopPropagation();\n onDismiss(event);\n }\n }\n\n function handleMouseDown(event) {\n mouseDownTarget.current = event.target;\n }\n\n useEffect(function () {\n return overlayNode.current ? createAriaHider(overlayNode.current) : void null;\n }, []);\n return React.createElement(FocusLock, {\n autoFocus: true,\n returnFocus: true,\n onActivation: activateFocusLock,\n disabled: dangerouslyBypassFocusLock,\n crossFrame: unstable_lockFocusAcrossFrames\n }, React.createElement(RemoveScroll, {\n allowPinchZoom: allowPinchZoom,\n enabled: !dangerouslyBypassScrollLock\n }, React.createElement(\"div\", Object.assign({}, props, {\n ref: ref,\n \"data-reach-dialog-overlay\": \"\",\n\n /*\r\n * We can ignore the `no-static-element-interactions` warning here\r\n * because our overlay is only designed to capture any outside\r\n * clicks, not to serve as a clickable element itself.\r\n */\n onClick: wrapEvent(onClick, handleClick),\n onKeyDown: wrapEvent(onKeyDown, handleKeyDown),\n onMouseDown: wrapEvent(onMouseDown, handleMouseDown)\n }))));\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n DialogOverlay.displayName = \"DialogOverlay\";\n DialogOverlay.propTypes = /*#__PURE__*/_extends({}, overlayPropTypes);\n} ////////////////////////////////////////////////////////////////////////////////\n\n/**\r\n * DialogContent\r\n *\r\n * Low-level component if you need more control over the styles or rendering of\r\n * the dialog content.\r\n *\r\n * Note: Must be a child of `DialogOverlay`.\r\n *\r\n * Note: You only need to use this when you are also styling `DialogOverlay`,\r\n * otherwise you can use the high-level `Dialog` component and pass the props\r\n * to it. Any props passed to `Dialog` component (besides `isOpen` and\r\n * `onDismiss`) will be spread onto `DialogContent`.\r\n *\r\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialogcontent\r\n */\n\n\nvar DialogContent = /*#__PURE__*/forwardRef(function DialogContent(_ref3, forwardedRef) {\n var onClick = _ref3.onClick,\n onKeyDown = _ref3.onKeyDown,\n props = _objectWithoutPropertiesLoose(_ref3, [\"onClick\", \"onKeyDown\"]);\n\n return React.createElement(\"div\", Object.assign({\n \"aria-modal\": \"true\",\n role: \"dialog\",\n tabIndex: -1\n }, props, {\n ref: forwardedRef,\n \"data-reach-dialog-content\": \"\",\n onClick: wrapEvent(onClick, function (event) {\n event.stopPropagation();\n })\n }));\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n DialogContent.displayName = \"DialogContent\";\n DialogContent.propTypes = {\n \"aria-label\": ariaLabelType,\n \"aria-labelledby\": ariaLabelType\n };\n} ////////////////////////////////////////////////////////////////////////////////\n\n/**\r\n * Dialog\r\n *\r\n * High-level component to render a modal dialog window over the top of the page\r\n * (or another dialog).\r\n *\r\n * @see Docs https://reacttraining.com/reach-ui/dialog#dialog\r\n */\n\n\nvar Dialog = /*#__PURE__*/forwardRef(function Dialog(_ref4, forwardedRef) {\n var _ref4$allowPinchZoom = _ref4.allowPinchZoom,\n allowPinchZoom = _ref4$allowPinchZoom === void 0 ? false : _ref4$allowPinchZoom,\n initialFocusRef = _ref4.initialFocusRef,\n isOpen = _ref4.isOpen,\n _ref4$onDismiss = _ref4.onDismiss,\n onDismiss = _ref4$onDismiss === void 0 ? noop : _ref4$onDismiss,\n props = _objectWithoutPropertiesLoose(_ref4, [\"allowPinchZoom\", \"initialFocusRef\", \"isOpen\", \"onDismiss\"]);\n\n return React.createElement(DialogOverlay, {\n allowPinchZoom: allowPinchZoom,\n initialFocusRef: initialFocusRef,\n isOpen: isOpen,\n onDismiss: onDismiss\n }, React.createElement(DialogContent, Object.assign({\n ref: forwardedRef\n }, props)));\n});\n\nif (process.env.NODE_ENV !== \"production\") {\n Dialog.displayName = \"Dialog\";\n Dialog.propTypes = {\n isOpen: PropTypes.bool,\n onDismiss: PropTypes.func,\n \"aria-label\": ariaLabelType,\n \"aria-labelledby\": ariaLabelType\n };\n}\n\nfunction createAriaHider(dialogNode) {\n var originalValues = [];\n var rootNodes = [];\n var ownerDocument = getOwnerDocument(dialogNode) || document;\n\n if (!dialogNode) {\n if (process.env.NODE_ENV !== \"production\") {\n console.warn(\"A ref has not yet been attached to a dialog node when attempting to call `createAriaHider`.\");\n }\n\n return noop;\n }\n\n Array.prototype.forEach.call(ownerDocument.querySelectorAll(\"body > *\"), function (node) {\n var _dialogNode$parentNod, _dialogNode$parentNod2;\n\n var portalNode = (_dialogNode$parentNod = dialogNode.parentNode) === null || _dialogNode$parentNod === void 0 ? void 0 : (_dialogNode$parentNod2 = _dialogNode$parentNod.parentNode) === null || _dialogNode$parentNod2 === void 0 ? void 0 : _dialogNode$parentNod2.parentNode;\n\n if (node === portalNode) {\n return;\n }\n\n var attr = node.getAttribute(\"aria-hidden\");\n var alreadyHidden = attr !== null && attr !== \"false\";\n\n if (alreadyHidden) {\n return;\n }\n\n originalValues.push(attr);\n rootNodes.push(node);\n node.setAttribute(\"aria-hidden\", \"true\");\n });\n return function () {\n rootNodes.forEach(function (node, index) {\n var originalValue = originalValues[index];\n\n if (originalValue === null) {\n node.removeAttribute(\"aria-hidden\");\n } else {\n node.setAttribute(\"aria-hidden\", originalValue);\n }\n });\n };\n}\n\nfunction ariaLabelType(props, propName, compName, location, propFullName) {\n var details = \"\\nSee https://www.w3.org/TR/wai-aria/#aria-label for details.\";\n\n if (!props[\"aria-label\"] && !props[\"aria-labelledby\"]) {\n return new Error(\"A <\" + compName + \"> must have either an `aria-label` or `aria-labelledby` prop.\\n \" + details);\n }\n\n if (props[\"aria-label\"] && props[\"aria-labelledby\"]) {\n return new Error(\"You provided both `aria-label` and `aria-labelledby` props to a <\" + compName + \">. If the a label for this component is visible on the screen, that label's component should be given a unique ID prop, and that ID should be passed as the `aria-labelledby` prop into <\" + compName + \">. If the label cannot be determined programmatically from the content of the element, an alternative label should be provided as the `aria-label` prop, which will be used as an `aria-label` on the HTML tag.\" + details);\n } else if (props[propName] != null && !isString(props[propName])) {\n return new Error(\"Invalid prop `\" + propName + \"` supplied to `\" + compName + \"`. Expected `string`, received `\" + (Array.isArray(propFullName) ? \"array\" : typeof propFullName) + \"`.\");\n }\n\n return null;\n}\n\nexport default Dialog;\nexport { Dialog, DialogContent, DialogOverlay };\n//# sourceMappingURL=dialog.esm.js.map\n","// extracted by mini-css-extract-plugin\nexport default {\"overlay\":\"Modal--overlay--datCD\",\"dialog\":\"Modal--dialog--NJuNP\",\"close-button\":\"Modal--close-button--54bUs\",\"closeButton\":\"Modal--close-button--54bUs\",\"title\":\"Modal--title--sH-CW\",\"hero-image\":\"Modal--hero-image--jNDsp\",\"heroImage\":\"Modal--hero-image--jNDsp\",\"body\":\"Modal--body--X1CY9\",\"actions\":\"Modal--actions--Ld-Kr\"};","import React from 'react';\nimport PropTypes from 'prop-types';\nimport { DialogOverlay, DialogContent } from '@reach/dialog';\n\nimport ActionsCancelNormalXsmall from '@strava/icons/ActionsCancelNormalXsmall';\nimport colors from '../colors';\nimport Button from '../Button';\n\nimport styles from './styles.scss';\n\n//\n// ModalOverlay\n//\n// Reach UI docs: https://reach.tech/dialog/#dialogoverlay\n// --------------------\n\nexport function ModalOverlay({ className, children, ...otherProps }) {\n const classNames = [styles.overlay];\n if (className) {\n classNames.push(className);\n }\n return (\n \n {children}\n \n );\n}\n\n// Override DialogContent display name so that error from prop types show 'ModalOverlay'\nDialogOverlay.displayName = 'ModalOverlay';\n\nModalOverlay.defaultProps = {\n className: null,\n isOpen: false,\n onDismiss: () => {},\n initialFocusRef: () => {},\n\n allowPinchZoom: false,\n dangerouslyBypassFocusLock: false,\n dangerouslyBypassScrollLock: false\n};\n\nModalOverlay.propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string,\n isOpen: PropTypes.bool,\n onDismiss: PropTypes.func,\n initialFocusRef: PropTypes.func,\n allowPinchZoom: PropTypes.bool,\n dangerouslyBypassFocusLock: PropTypes.bool,\n dangerouslyBypassScrollLock: PropTypes.bool\n};\n\n//\n// ModalContent\n//\n// Reach UI docs: https://reach.tech/dialog/#dialogcontent\n// --------------------\n\nexport function ModalContent({ className, children, ...otherProps }) {\n const classNames = [styles.dialog];\n if (className) {\n classNames.push(className);\n }\n return (\n \n {children}\n \n );\n}\n\n// Override DialogContent display name so that error from prop types show 'ModalContent'\nDialogContent.displayName = 'ModalContent';\n\nModalContent.defaultProps = {\n className: null\n};\n\nModalContent.propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string,\n\n //\n // @reach/dialog will handle prop-type validation for us, but in order for this\n // props to show up in Storybook we need to add them here.\n //\n /* eslint-disable react/require-default-props */\n 'aria-label': PropTypes.string,\n 'aria-labelledby': PropTypes.string\n /* eslint-enable react/require-default-props */\n};\n\n//\n// ModalTitle\n// --------------------\n\nexport function ModalTitle({ className, children, ...otherProps }) {\n const classNames = [styles.title];\n if (className) {\n classNames.push(className);\n }\n return (\n

\n {children}\n

\n );\n}\n\nModalTitle.defaultProps = {\n className: null\n};\n\nModalTitle.propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string\n};\n\n//\n// ModalActions\n// --------------------\n\nexport function ModalActions({ className, children, ...otherProps }) {\n const classNames = [styles.actions];\n if (className) {\n classNames.push(className);\n }\n return (\n
\n {children}\n
\n );\n}\n\nModalActions.defaultProps = {\n className: null\n};\n\nModalActions.propTypes = {\n children: PropTypes.node.isRequired,\n className: PropTypes.string\n};\n\n//\n// ModalHeroImage\n// --------------------\n\nexport function ModalHeroImage({ className, src, alt, ...otherProps }) {\n const classNames = [styles.heroImage];\n if (className) {\n classNames.push(className);\n }\n return (\n {alt}\n );\n}\n\nModalHeroImage.defaultProps = {\n className: null\n};\n\nModalHeroImage.propTypes = {\n className: PropTypes.string,\n src: PropTypes.string.isRequired,\n alt: PropTypes.string.isRequired\n};\n\n//\n// ModalBody\n// --------------------\n\nexport function ModalBody({ className, ...otherProps }) {\n const classNames = [styles.body];\n if (className) {\n classNames.push(className);\n }\n return
;\n}\n\nModalBody.defaultProps = {\n className: null\n};\n\nModalBody.propTypes = {\n className: PropTypes.string,\n children: PropTypes.node.isRequired\n};\n\n//\n// ModalCloseButton\n// --------------------\n\nexport function ModalCloseButton({ className, color, ...otherProps }) {\n return (\n \n );\n}\n\nModalCloseButton.defaultProps = {\n className: null,\n color: null\n};\n\nModalCloseButton.propTypes = {\n className: PropTypes.string,\n color: PropTypes.string\n};\n\n//\n// Modal\n// --------------------\n\nfunction Modal({\n className,\n isOpen,\n onDismiss,\n hasClose,\n children,\n initialFocusRef,\n ...otherProps\n}) {\n return (\n \n \n {hasClose && (\n \n )}\n {children}\n \n \n );\n}\n\nModal.defaultProps = {\n className: null,\n isOpen: false,\n hasClose: false,\n onDismiss: () => {},\n initialFocusRef: () => {}\n};\n\nModal.propTypes = {\n /**\n * This style will be applied to ModalContent used by Modal component\n */\n className: PropTypes.string,\n\n /**\n * Whether modal is open or closed - aka visitable to the user\n */\n isOpen: PropTypes.bool,\n\n /**\n * Called when modal will be closed\n */\n onDismiss: PropTypes.func,\n\n /**\n * By default the first focusable element will receive focus when the dialog opens but you can provide a ref to focus instead.\n */\n initialFocusRef: PropTypes.func,\n\n /**\n * Whether to show close button or not\n */\n hasClose: PropTypes.bool,\n\n children: PropTypes.oneOfType([\n PropTypes.arrayOf(PropTypes.node),\n PropTypes.node\n ]).isRequired,\n\n //\n // @reach/dialog will handle prop-type validation for us, but in order for this\n // props to show up in Storybook we need to add them here.\n //\n /* eslint-disable react/require-default-props */\n 'aria-label': PropTypes.string,\n 'aria-labelledby': PropTypes.string\n /* eslint-enable react/require-default-props */\n};\n\nexport default Modal;\n","import capitalize from './capitalize.js';\nimport createCompounder from './_createCompounder.js';\n\n/**\n * Converts `string` to [camel case](https://en.wikipedia.org/wiki/CamelCase).\n *\n * @static\n * @memberOf _\n * @since 3.0.0\n * @category String\n * @param {string} [string=''] The string to convert.\n * @returns {string} Returns the camel cased string.\n * @example\n *\n * _.camelCase('Foo Bar');\n * // => 'fooBar'\n *\n * _.camelCase('--foo-bar--');\n * // => 'fooBar'\n *\n * _.camelCase('__FOO_BAR__');\n * // => 'fooBar'\n */\nvar camelCase = createCompounder(function(result, word, index) {\n word = word.toLowerCase();\n return result + (index ? capitalize(word) : word);\n});\n\nexport default camelCase;\n","/**\n * Checks if `value` is `null` or `undefined`.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is nullish, else `false`.\n * @example\n *\n * _.isNil(null);\n * // => true\n *\n * _.isNil(void 0);\n * // => true\n *\n * _.isNil(NaN);\n * // => false\n */\nfunction isNil(value) {\n return value == null;\n}\n\nexport default isNil;\n","export default function _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}"],"names":["_extends","Object","assign","target","i","arguments","length","source","key","prototype","hasOwnProperty","call","apply","this","_excluded","VisuallyHidden","forwardRef","_ref","ref","_ref$as","as","Comp","_ref$style","style","props","excluded","sourceKeys","keys","indexOf","_objectWithoutPropertiesLoose","createElement","border","clip","height","margin","overflow","padding","position","width","whiteSpace","wordWrap","getOwnerDocument","element","window","document","ownerDocument","_arrayLikeToArray","arr","len","arr2","Array","_createForOfIteratorHelperLoose","o","allowArrayLike","it","Symbol","iterator","isArray","minLen","n","toString","slice","constructor","name","from","test","_unsupportedIterableToArray","done","value","TypeError","next","bind","assignRef","isFunction","current","error","Error","renderTimer","polite","assertive","liveRegions","Alert","forwardedRef","children","_ref$type","type","regionType","ownRef","useRef","_len","refs","_key","useCallback","node","_step","_iterator","useComposedRefs","child","useMemo","prevType","useEffect","usePrevious","mirror","mounted","unmount","createMirror","mount","update","useMirrorEffects","doc","renderAlerts","setAttribute","body","appendChild","clearTimeout","setTimeout","forEach","elementType","render","role","map","cloneElement","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","module","exports","shim","propName","componentName","location","propFullName","secret","err","getShim","isRequired","ReactPropTypes","array","bigint","bool","func","number","object","string","symbol","any","arrayOf","instanceOf","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","FOCUS_GROUP","FOCUS_DISABLED","useMergeRefs","defaultValue","initialValue","callback","newValue","useState","facade","last","hiddenGuard","top","left","InFocusGuard","propTypes","defaultProps","ItoI","a","innerCreateMedium","defaults","middleware","buffer","assigned","read","useMedium","data","item","push","filter","x","assignSyncMedium","cb","cbs","assignMedium","pendingQueue","executeQueue","cycle","Promise","resolve","then","createMedium","createSidecarMedium","options","medium","async","ssr","mediumFocus","currentTarget","mediumBlur","mediumEffect","mediumSidecar","emptyArray","FocusLock","parentRef","_extends2","_React$useState","realObserved","setObserved","observed","isActive","originalFocusedElement","disabled","noFocusGuards","persistentFocus","crossFrame","autoFocus","group","allowTextSelection","className","whiteList","hasPositiveIndices","_props$shards","shards","_props$as","Container","_props$lockProps","lockProps","containerProps","SideCar","sideCar","shouldReturnFocus","returnFocus","focusOptions","onActivationCallback","onActivation","onDeactivationCallback","onDeactivation","id","activeElement","allowDefer","returnFocusTo","focus","howToReturnFocus","returnFocusOptions","undefined","onFocus","event","onBlur","setObserveNode","newObserved","hasLeadingGuards","hasTailingGuards","mergedRef","tabIndex","reducePropsToState","handleStateChangeOnClient","WrappedComponent","state","mountedInstances","emitChange","instance","SideEffect","_PureComponent","peek","_proto","componentDidMount","componentDidUpdate","componentWillUnmount","index","splice","PureComponent","displayName","getDisplayName","getParentNode","parentNode","nodeType","Node","DOCUMENT_FRAGMENT_NODE","host","isTopNode","DOCUMENT_NODE","isVisibleUncached","checkParent","ELEMENT_NODE","computedStyle","getComputedStyle","getPropertyValue","isElementHidden","isVisibleCached","visibilityCache","cached","get","result","set","isAutoFocusAllowedCached","cache","isAutoFocusAllowed","isAutoFocusAllowedUncached","getDataset","dataset","isHTMLInputElement","tagName","isRadioElement","attribute","getAttribute","includes","isGuard","_a","Boolean","focusGuard","isNotAGuard","isDefined","correctNode","nodes","el","checked","findSelectedRadio","pickFirstFocus","pickFocusable","NEW_FOCUS","newFocus","innerNodes","outerNodes","lastNode","cnt","firstFocus","lastFocus","isOnGuard","resultSet","activeIndex","lastIndex","lastNodeInside","indexDiff","firstNodeIndex","lastNodeIndex","correctedNodes","Set","add","has","correctedIndexDiff","returnFirstNode","returnLastNode","Math","abs","toArray","ret","asArray","tabSort","b","tabDiff","orderByTabIndex","filterNegative","keepGuards","sort","queryTabbables","join","queryGuardTabbables","concat","getFocusablesWithShadowDom","parent","withGuards","shadowRoot","reduce","acc","matches","getFocusables","parents","querySelectorAll","filterFocusable","isHTMLButtonElement","notHiddenInput","filterAutoFocusable","Map","getTabbableNodes","topNodes","getAllTabbableNodes","parentAutofocusables","topNode","parentFocus","contains","scope","getPrototypeOf","some","getTopParent","getAllAffectedNodes","currentNode","contained","l","j","compareDocumentPosition","DOCUMENT_POSITION_CONTAINED_BY","DOCUMENT_POSITION_CONTAINS","_","filterNested","getNestedShadowActiveElement","getActiveElement","getParents","getCommonParent","nodeA","nodeB","parentsA","parentsB","currentParent","getTopCommonParent","baseActiveElement","leftEntry","rightEntries","activeElements","leftEntries","topCommon","entry","subEntry","common","getFocusMerge","entries","commonParent","anyFocusable","innerElements","srcNodes","dstNodes","remap","autoFocusables","orderedInnerElements","entity","newId","autoFocusable","allParentAutofocusables","autofocus","guardCount","lockDisabled","focusable","console","contentWindow","focusInsideIframe","focusInside","getFocusabledIn","lockItem","guard","deferAction","action","setImmediate","isFreeFocus","lastActiveTrap","lastActiveFocus","lastPortaledElement","focusWasOutsideWindow","defaultWhitelist","autoGuard","startIndex","end","step","allNodes","lastGuard","focusAutoGuard","extractRef","checkInHost","check","boundary","activateTrap","_lastActiveTrap","workingNode","portaledElement","workingArea","focusWhitelisted","area","withinHost","blur","newActiveElement","focusedIndex","_ref2","_ref3","removeAttribute","onTrap","stopPropagation","preventDefault","observerNode","onWindowBlur","moveFocusInside","propsList","_ref5","traps","trap","addEventListener","lastTrap","sameTrap","_ref6","removeEventListener","FocusLockCombination","zeroRightClassName","fullWidthClassName","effectCar","nothing","RemoveScroll","onScrollCapture","onWheelCapture","onTouchMoveCapture","callbacks","setCallbacks","forwardProps","removeScrollBar","enabled","noIsolation","inert","allowPinchZoom","_b","rest","containerRef","lockRef","classNames","fullWidth","zeroRight","currentNonce","Target","isSideCarExport","makeStyleTag","tag","nonce","stylesheetSingleton","counter","stylesheet","css","styleSheet","cssText","createTextNode","head","getElementsByTagName","insertStyleTag","remove","removeChild","styleSingleton","sheet","useStyle","styles","isDynamic","dynamic","zeroGap","right","gap","parse","parseInt","getGapWidth","gapMode","offsets","cs","getOffset","documentWidth","documentElement","clientWidth","windowWidth","innerWidth","max","Style","getStyles","allowRelative","important","RemoveScrollBar","noRelative","noImportant","passiveSupported","defineProperty","nonPassive","passive","elementCanBeScrolled","overflowY","overflowX","alwaysContainsScroll","locationCouldBeScrolled","axis","ShadowRoot","elementCouldBeScrolled","getScrollVariables","elementCouldBeVScrolled","elementCouldBeHScrolled","scrollTop","scrollHeight","clientHeight","scrollLeft","scrollWidth","getHScrollVariables","getTouchXY","changedTouches","clientX","clientY","getDeltaXY","deltaX","deltaY","generateStyle","idCounter","lockStack","exported","shouldPreventQueue","touchStartRef","activeAxis","lastProps","classList","allow_1","shouldCancelEvent","touches","currentAxis","touch","touchStart","moveDirection","canBeScrolledInMainDirection","cancelingAxis","endTarget","sourceDelta","noOverscroll","directionFactor","direction","getDirectionFactor","delta","targetInLock","shouldCancelScroll","isDeltaPositive","availableScroll","availableScrollTop","elementScroll","handleScroll","shouldPrevent","_event","sourceEvent","e","y","should","cancelable","shardNodes","shouldCancel","scrollTouchStart","scrollWheel","scrollTouchMove","inst","ReactRemoveScroll","DialogOverlay","_ref$isOpen","isOpen","__REACH_DISABLE_TOOLTIPS","requestAnimationFrame","DialogInner","_ref2$dangerouslyBypa","dangerouslyBypassFocusLock","_ref2$dangerouslyBypa2","dangerouslyBypassScrollLock","initialFocusRef","onClick","_ref2$onDismiss","onDismiss","onKeyDown","onMouseDown","_ref2$unstable_lockFo","unstable_lockFocusAcrossFrames","mouseDownTarget","overlayNode","activateFocusLock","dialogNode","originalValues","rootNodes","_dialogNode$parentNod","_dialogNode$parentNod2","attr","originalValue","createAriaHider","DialogContent","ModalOverlay","otherProps","ModalContent","ModalTitle","ModalActions","ModalHeroImage","src","alt","ModalBody","ModalCloseButton","color","Button","variant","ActionsCancelNormalXsmall","fill","colors","Modal","hasClose","camelCase","word","toLowerCase","_defineProperty","obj","enumerable","configurable","writable"],"sourceRoot":""}