{"version":3,"file":"account-consent.umd.js","sources":["../../../../src/core/pure/Window.ts","../../../../src/core/pure/Env.ts","../../../../src/api/AccountConsent/util.ts","../../../../src/api/AccountConsent/getPurposeCopy.ts","../../../../src/api/AccountConsent/patchAccountConsent.ts","../../../../src/api/Token/util.ts","../../../../src/api/Token/getAuthToken.ts","../../../../src/api/Token/getCiamToken.ts","../../../../node_modules/.pnpm/@babel+runtime@7.16.3/node_modules/@babel/runtime/helpers/esm/extends.js","../../../../node_modules/.pnpm/@babel+runtime@7.16.3/node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../../../node_modules/.pnpm/classnames@2.3.1/node_modules/classnames/index.js","../../../../node_modules/.pnpm/style-inject@0.3.0/node_modules/style-inject/dist/style-inject.es.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getAlignSelf/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getBorderRadius/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/tokens.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/utils/canUseDOM.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/utils/createPropInlineStyle.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/utils/getFirstMatchingValue.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/utils/isValueOrUndefined.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/utils/pascalize.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/utils/makeResponsive.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/utils/removeEmptyKeys.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/utils/useIsomorphicEffect.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getColor/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getFontWeight/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getFontStyle/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getHeight/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getPosition/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getTextAlign/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getTextTransform/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getWidth/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getPositioning/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getPadding/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getMargin/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getFloat/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getFlex/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getDisplay/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getFontFamily/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getDecoration/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getZIndex/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getSystem/utils.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getSystem/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/config.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/utils.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/system.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/cdn-logos.js","../../../../node_modules/.pnpm/use-callback-ref@1.2.5_@types+react@17.0.35_react@17.0.2/node_modules/use-callback-ref/dist/es2015/useMergeRef.js","../../../../node_modules/.pnpm/use-callback-ref@1.2.5_@types+react@17.0.35_react@17.0.2/node_modules/use-callback-ref/dist/es2015/useRef.js","../../../../node_modules/.pnpm/use-callback-ref@1.2.5_@types+react@17.0.35_react@17.0.2/node_modules/use-callback-ref/dist/es2015/assignRef.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/icons/brand.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/icons/arrow-down.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/icons/arrow-up.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/icons/bullet.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/icons/calendar.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/icons/checkmark.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/icons/chevron-down.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/icons/chevron-forward.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/icons/close.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/icons/error.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/icons/info.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/icons/placeholder.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/icons/search.js","../../../../node_modules/.pnpm/object-assign@4.1.1/node_modules/object-assign/index.js","../../../../node_modules/.pnpm/prop-types@15.7.2/node_modules/prop-types/factoryWithTypeCheckers.js","../../../../node_modules/.pnpm/prop-types@15.7.2/node_modules/prop-types/factoryWithThrowingShims.js","../../../../node_modules/.pnpm/prop-types@15.7.2/node_modules/prop-types/index.js","../../../../node_modules/.pnpm/prop-types@15.7.2/node_modules/prop-types/lib/ReactPropTypesSecret.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Base/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Icon/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Box/createCloneChildren.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Box/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Accordion/AccordionItem/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Accordion/index.js","../../../../node_modules/.pnpm/@babel+runtime@7.16.3/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../../../../node_modules/.pnpm/@babel+runtime@7.16.3/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../../../node_modules/.pnpm/compute-scroll-into-view@1.0.17/node_modules/compute-scroll-into-view/dist/index.module.js","../../../../node_modules/.pnpm/tslib@2.3.1/node_modules/tslib/tslib.es6.js","../../../../node_modules/.pnpm/downshift@6.1.7_react@17.0.2/node_modules/downshift/dist/downshift.esm.js","../../../../node_modules/.pnpm/@babel+runtime@7.16.3/node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../../../node_modules/.pnpm/react-popper@2.2.5_@popperjs+core@2.10.2_react@17.0.2/node_modules/react-popper/lib/esm/Manager.js","../../../../node_modules/.pnpm/react-popper@2.2.5_@popperjs+core@2.10.2_react@17.0.2/node_modules/react-popper/lib/esm/utils.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/enums.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/contains.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/math.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/within.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/getVariation.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/computeOffsets.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/detectOverflow.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/modifiers/hide.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/orderModifiers.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/createPopper.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/debounce.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/mergeByName.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/popper.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/modifiers/offset.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/modifiers/flip.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/utils/getAltAxis.js","../../../../node_modules/.pnpm/@popperjs+core@2.10.2/node_modules/@popperjs/core/lib/modifiers/arrow.js","../../../../node_modules/.pnpm/react-fast-compare@3.2.0/node_modules/react-fast-compare/index.js","../../../../node_modules/.pnpm/react-popper@2.2.5_@popperjs+core@2.10.2_react@17.0.2/node_modules/react-popper/lib/esm/usePopper.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Label/LabelWrapper/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Text/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Label/PrimaryLabel/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Label/OptionalLabel/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Label/ActionLabel/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Label/getPlacement/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Label/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Caption/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Message/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Screenreader/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/IconButton/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/hooks/useMediaQuery/index.js","../../../../node_modules/.pnpm/tabbable@5.2.1/node_modules/tabbable/dist/index.esm.js","../../../../node_modules/.pnpm/focus-trap@6.7.1/node_modules/focus-trap/dist/focus-trap.esm.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/hooks/useFocusTrap/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/hooks/useBodyScrollLock/index.js","../../../../node_modules/.pnpm/inputmask@5.0.6/node_modules/inputmask/dist/inputmask.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Input/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/hooks/useInputMask/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/TextField/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/AutoComplete/Suggestion/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Flex/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Loader/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/AutoComplete/SuggestionContainer/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/AutoComplete/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/utils/escapeRegexCharacters/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-theme-ds@1.11.0-next.1_react@17.0.2/node_modules/@mediahuis/chameleon-theme-ds/lib/web/illustrations/avatar-placeholder.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Avatar/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Paragraph/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Banner/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/BrandedHeading/Base.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/BrandedHeading/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Button/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Checkbox/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Choice/ChoiceInfo.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Choice/ChoiceTitle.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Choice/ChoiceBody.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Choice/ChoiceCaption.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Choice/ChoiceImage.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Choice/index.js","../../../../node_modules/.pnpm/dayjs@1.10.7/node_modules/dayjs/dayjs.min.js","../../../../node_modules/.pnpm/dayjs@1.10.7/node_modules/dayjs/plugin/customParseFormat.js","../../../../node_modules/.pnpm/react-day-picker@7.4.10_react@17.0.2/node_modules/react-day-picker/lib/react-day-picker.min.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/locale/nl-be.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Calendar/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Paper/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Hidden/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Backdrop/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/DatePicker/ResponsiveBackdrop/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Portal/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/DatePicker/CalendarDialog/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/DatePicker/IconLeft/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/DatePicker/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/utils/mergeRefs/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Dialog/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Divider/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Fieldset/index.js","../../../../node_modules/.pnpm/react-side-effect@2.1.1_react@17.0.2/node_modules/react-side-effect/lib/index.js","../../../../node_modules/.pnpm/react-helmet@6.1.0_react@17.0.2/node_modules/react-helmet/es/Helmet.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/config/helpers.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/config/base.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/config/logos/index.ds.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/config/index.ds.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Heading/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/HtmlContent/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Illustration/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Image/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/LinkText/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/List/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/List/ListItem/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Logo/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/system/getLogo/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Placeholder/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Radio/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Reset/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Select/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Switch/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/hooks/useSort/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Skeleton/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Table/Td/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Table/Tr/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Table/Th/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Table/Empty/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Table/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/Textarea/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/WideList/index.js","../../../../node_modules/.pnpm/@mediahuis+chameleon-react@1.11.0-next.1_@types+react@17.0.35_dayjs@1.10.7_prop-types@15.7.2__cevlcgzhatidu2sjwoyiqcfuba/node_modules/@mediahuis/chameleon-react/dist/es/components/WideList/WideListItem/index.js","../../../../node_modules/.pnpm/react@17.0.2/node_modules/react/cjs/react-jsx-runtime.production.min.js","../../../../node_modules/.pnpm/react@17.0.2/node_modules/react/jsx-runtime.js","../../../../src/apps/MySettings/components/MoreInfoText.tsx","../../../../src/apps/MySettings/components/Checkbox.tsx","../../../../src/apps/MySettings/components/ConsentCheckboxListProvider.tsx","../../../../src/api/AccountConsent/getAccountConsents.ts","../../../../src/apps/MySettings/index.tsx","../../../../node_modules/.pnpm/js-cookie@3.0.1/node_modules/js-cookie/dist/js.cookie.js","../../../../src/apps/Popups/components/ConsentProvider/pure.ts","../../../../src/apps/Popups/components/Dialog/Content.tsx","../../../../src/apps/Popups/components/Dialog/Dialog.tsx","../../../../src/apps/Popups/components/Dialog/pure.ts","../../../../src/apps/Popups/components/Dialog/DialogProvider.tsx","../../../../src/apps/Popups/components/ConsentProvider/index.tsx","../../../../src/core/pure/Cookie.ts","../../../../src/apps/Popups/index.tsx","../../../../src/index.tsx","../../../../src/core/pure/toggle.ts"],"sourcesContent":["export const getAccountId = (): string | null => window.MEDIAHUIS?.user?.accountId\nexport const getAuth0Feature = (): boolean => Boolean(window.MEDIAHUIS?.config?.features?.auth0)\nexport const userIsNotLoggedIn = (): boolean => Boolean(!window.MEDIAHUIS?.user?.isLoggedIn)\n\nexport const checkIfClassNameIncludesSubstring = (dialogItem: any, substring: string): boolean => {\n let result = false\n const classList = dialogItem.classList\n\n for (let j = 0; j < classList.length; j++) {\n if (classList[j].includes(substring)) {\n result = true\n }\n }\n return result\n}\n\nexport const checkIfDialogInShadowDomIsVisible = (shadowDomDialogList: any): boolean => {\n for (let i = 0; i < shadowDomDialogList.length; i++) {\n if (shadowDomDialogList[i].shadowRoot) {\n if (shadowDomDialogList[i].shadowRoot?.mode.includes('open')) {\n return false\n }\n }\n }\n return true\n}\n\nexport const isOnlyVisibleDialog = (): boolean => {\n const dialogList = document.querySelectorAll('div[role=dialog]')\n\n for (let i = 0; i < dialogList.length; i++) {\n const dialogVisibility = window.getComputedStyle(dialogList[i]).visibility\n\n if (dialogVisibility === 'visible') {\n if (!checkIfClassNameIncludesSubstring(dialogList[i], 'hidden')) {\n return false\n }\n }\n }\n const shadowDomDialogList = document.querySelectorAll('getsitecontrol-widget')\n if (!checkIfDialogInShadowDomIsVisible(shadowDomDialogList)) return false\n\n return true\n}\n\nexport const isNotMobile = (): boolean => {\n if (window.location.href.includes('origin=app')) return false\n return true\n}\n","import { Brand, BrandGroup, Env } from '../../api'\nimport { getAuth0Feature } from '../../core/pure/Window'\n\nexport const getBrand = (): Brand => MH_BRAND || 'nb'\nexport const getBrandGroup = (): BrandGroup => MH_BRAND_GROUP || 'mhbe'\nexport const getEnv = (): Env => MH_ENV\nexport const getPurposeId = (): string | null => {\n // Temporary override for DL for Forgerock legacy purposes\n // Can be removed after Auth0 release\n if (!getAuth0Feature() && MH_BRAND === 'dl') {\n return '3392ebb4-aed8-4c33-ac7a-c22fa2a07848'\n }\n\n return PURPOSE_ID\n}\n","import { Env } from '..'\n\nexport const getApiUrl = (env: Env | undefined): string => {\n switch (env) {\n case 'test':\n return 'https://testaccountconsent.mediahuis.be/'\n case 'preview':\n return 'https://previewaccountconsent.mediahuis.be/'\n case 'production':\n return 'https://accountconsent.mediahuis.be/'\n default:\n return 'http://localhost:8080/'\n }\n}\n\nexport const api = getApiUrl(MH_ENV)\nexport const apiPath = 'api/v1/'\n","import { getBrand, getBrandGroup, getPurposeId } from '../../core/pure/Env'\nimport { getAuth0Feature } from '../../core/pure/Window'\nimport { api, apiPath } from './util'\n\nexport type Purpose = {\n html?: string\n settingsText: string\n settingsCheckboxText: string\n settingsExtraInfoText: string\n title: string\n titleImageUrl?: string\n version: string\n}\n\nexport const getPurposeCopy = async (): Promise => {\n const isAuth0Enabled = getAuth0Feature()\n\n return await fetch(\n `${api}${apiPath}${isAuth0Enabled ? getBrandGroup() : getBrand()}/purpose/${getPurposeId()}/copy/`,\n ).then((res) => {\n if (res.ok) return res.json()\n\n throw new Error(res.statusText)\n })\n}\n","import { callAuthToken } from '..'\nimport { getBrand, getBrandGroup, getPurposeId } from '../../core/pure/Env'\nimport { getAuth0Feature } from '../../core/pure/Window'\nimport { api, apiPath } from './util'\n\ntype patchAccountConsentBody = {\n isAccepted: boolean\n version: string\n}\n\nexport const patchAccountConsent = async (accountId: string, body: patchAccountConsentBody): Promise => {\n const isAuth0Enabled = getAuth0Feature()\n\n const token = await callAuthToken()\n\n return await fetch(\n `${api}${apiPath}${isAuth0Enabled ? getBrandGroup() : getBrand()}/account/${accountId}/consent/${getPurposeId()}`,\n {\n method: 'PATCH',\n headers: {\n 'content-type': 'application/json',\n Authorization: `Bearer ${token}`,\n },\n body: JSON.stringify(body),\n },\n ).then((res) => {\n if (res.ok) return res.json()\n throw new Error(res.statusText)\n })\n}\n","import { Brand, Env } from '..'\nimport { getAuth0Feature } from '../../core/pure/Window'\nimport { getAuthToken, getAuthTokenOnTest } from './getAuthToken'\nimport { getCiamAccessToken } from './getCiamToken'\n\n// Authorization call for getting the token\nexport const getTokenApiUrl = (env: Env | undefined, brand: string): string => {\n switch (env) {\n case 'test':\n case 'preview':\n case 'production':\n return `${window.location.origin}/token`\n default:\n return `https://testauth.${brand}.be/OIDC/Login`\n }\n}\n\nexport const mapDomain = (brand: Brand): string => {\n switch (brand) {\n case 'dl':\n return 'limburger.nl'\n case 'ds':\n return 'standaard.be'\n case 'gva':\n return 'gva.be'\n case 'hbvl':\n return 'hbvl.be'\n case 'nb':\n default:\n return 'nieuwsblad.be'\n }\n}\n\nexport const tokenApiBaseUrl = getTokenApiUrl(MH_ENV, mapDomain(MH_BRAND))\n\nexport const callAuthToken = async (): Promise => {\n if (MH_ENV !== 'develop') {\n if (getAuth0Feature()) return getCiamAccessToken()\n return (await getAuthToken()).access_token\n }\n\n return (await getAuthTokenOnTest()).accessToken\n}\n","import { mapDomain, tokenApiBaseUrl } from '.'\n\n/* eslint-disable camelcase */\nexport type AuthToken = {\n access_token: string\n expires_in: number\n id_token: string\n scope: string\n token_type: string\n}\n/* eslint-enable camelcase */\n\nexport const getAuthToken = async (): Promise => {\n return await fetch(`${tokenApiBaseUrl}/exchange/accountconsent`, {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n },\n }).then((res) => {\n if (res.ok) return res.json()\n throw new Error(res.statusText)\n })\n}\n\n// Only for testing purposes\nexport type AuthTokenTest = {\n accessToken: string\n expiresIn: number\n identityToken: string\n refreshToken: string\n tokenType: string\n}\n\nexport const getAuthTokenOnTest = async (): Promise => {\n return await fetch(`https://testauth.${mapDomain(MH_BRAND)}/OIDC/Login`, {\n method: 'POST',\n headers: {\n 'content-type': 'application/json',\n },\n body: JSON.stringify({}),\n }).then((res) => {\n if (res.ok) return res.json()\n throw new Error(res.statusText)\n })\n}\n","export const getCiamAccessToken = (): Promise => {\n return new Promise((resolve, reject) => {\n const accessToken = window.CIAM.getAccessToken(window.MEDIAHUIS.config.auth0?.clientId ?? '')\n\n if (accessToken) resolve(accessToken)\n reject()\n })\n}\n","export default function _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}","export default function _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 Copyright (c) 2018 Jed Watson.\n Licensed under the MIT License (MIT), see\n http://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString === Object.prototype.toString) {\n\t\t\t\t\tfor (var key in arg) {\n\t\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","function styleInject(css, ref) {\n if ( ref === void 0 ) ref = {};\n var insertAt = ref.insertAt;\n\n if (!css || typeof document === 'undefined') { return; }\n\n var head = document.head || document.getElementsByTagName('head')[0];\n var style = document.createElement('style');\n style.type = 'text/css';\n\n if (insertAt === 'top') {\n if (head.firstChild) {\n head.insertBefore(style, head.firstChild);\n } else {\n head.appendChild(style);\n }\n } else {\n head.appendChild(style);\n }\n\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(document.createTextNode(css));\n }\n}\n\nexport default styleInject;\n","import cx from 'classnames';\nimport styles from './index.module.scss';\n/**\n * @typedef {\"auto\" | \"flex-start\" | \"flex-end\" | \"center\" | \"baseline\" | \"stretch\"} align\n *\n * @param align {align}\n * @returns - [className]\n *\n * @example\n * const [alignClassName] = getAlignSelf('flex-start');\n */\n\nvar getAlignSelf = function getAlignSelf(align) {\n var _cx;\n\n return [cx((_cx = {}, _cx[styles.auto] = align === 'auto', _cx[styles.flexStart] = align === 'flex-start', _cx[styles.flexEnd] = align === 'flex-end', _cx[styles.center] = align === 'center', _cx[styles.baseline] = align === 'baseline', _cx[styles.stretch] = align === 'stretch', _cx))];\n};\n\nexport default getAlignSelf;","import cx from 'classnames';\nimport styles from './index.module.scss';\n/**\n * @typedef {\"fill\" | \"sides\" | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11} radius\n *\n * @param radius {radius}\n * @returns - [className]\n *\n * @example\n * const [borderRadiusClassName] = getBorderRadius('fill');\n */\n\nvar getBorderRadius = function getBorderRadius(radius) {\n var _cx;\n\n return [cx((_cx = {}, _cx[styles.brFill] = radius === 'fill', _cx[styles.brSides] = radius === 'sides', _cx[styles.br0] = radius === 0, _cx[styles.br1] = radius === 1, _cx[styles.br2] = radius === 2, _cx[styles.br3] = radius === 3, _cx[styles.br4] = radius === 4, _cx[styles.br5] = radius === 5, _cx[styles.br6] = radius === 6, _cx[styles.br7] = radius === 7, _cx[styles.br8] = radius === 8, _cx[styles.br9] = radius === 9, _cx[styles.br10] = radius === 10, _cx[styles.br11] = radius === 11, _cx))];\n};\n\nexport default getBorderRadius;","/**\n * Do not edit directly\n * Generated on Fri, 12 Nov 2021 14:42:51 GMT\n */\nexport var aliasActionBorderRadius = \"2px\";\nexport var aliasBackdropColorBase = \"#000000\";\nexport var aliasBackdropOpacityBase = 0.73;\nexport var aliasFocusColor = \"#92d3ee\";\nexport var aliasFocusColorError = \"#f97a7d\";\nexport var aliasFocusWidth = \"3px\";\nexport var aliasFocusBoxShadow = \"0 0 0 3px #92d3ee\";\nexport var aliasFocusBoxShadowError = \"0 0 0 3px #f97a7d\";\nexport var aliasFocusRingColorBase = \"#92d3ee\";\nexport var aliasFocusRingColorError = \"#f97a7d\";\nexport var aliasFocusRingSizeBase = \"3px\";\nexport var aliasInputBorderWidth = \"1px\";\nexport var aliasInputBorderRadius = \"4px\";\nexport var aliasInputBorderColor = \"#919191\";\nexport var aliasInputBorderColorHover = \"#0a3142\";\nexport var aliasInputBorderColorError = \"#e92326\";\nexport var aliasInputBorderColorActive = \"#000000\";\nexport var aliasInputBorderColorFocus = \"#919191\";\nexport var aliasInputBorderColorDisabled = \"#d7d7d7\";\nexport var aliasInputBorderColorChecked = \"#0a3142\";\nexport var aliasInputBackgroundColor = \"#ffffff\";\nexport var aliasInputBackgroundColorError = \"#e92326\";\nexport var aliasInputBackgroundColorActive = \"#062430\";\nexport var aliasInputBackgroundColorFocus = \"#0a3142\";\nexport var aliasInputBackgroundColorDisabled = \"#ededed\";\nexport var aliasInputBackgroundColorChecked = \"#0a3142\";\nexport var aliasInputTextColorChecked = \"#ffffff\";\nexport var aliasInputBoxShadow = \"0 2px 4px rgba(0, 0, 0, .12)\";\nexport var aliasInputBoxShadowActive = \"inset 0 1px 5px 0 #000000\";\nexport var aliasInputBoxShadowFocus = \"0 0 0 3px #92d3ee\";\nexport var aliasInputBoxShadowError = \"0 0 0 3px #f97a7d\";\nexport var aliasFieldBorderWidthBase = \"1px\";\nexport var aliasFieldBorderColorBase = \"#919191\";\nexport var aliasFieldBorderColorHover = \"#0a3142\";\nexport var aliasFieldBorderColorError = \"#e92326\";\nexport var aliasFieldBorderColorActive = \"#000000\";\nexport var aliasFieldBorderColorFocus = \"#919191\";\nexport var aliasFieldBorderColorDisabled = \"#d7d7d7\";\nexport var aliasFieldBorderColorChecked = \"#0a3142\";\nexport var aliasFieldBackgroundColorBase = \"#ffffff\";\nexport var aliasFieldBackgroundColorError = \"#e92326\";\nexport var aliasFieldBackgroundColorActive = \"#062430\";\nexport var aliasFieldBackgroundColorFocus = \"#0a3142\";\nexport var aliasFieldBackgroundColorDisabled = \"#ededed\";\nexport var aliasFieldBackgroundColorChecked = \"#0a3142\";\nexport var aliasFieldTextChecked = \"#ffffff\";\nexport var aliasFieldShadowBase = \"0 2px 4px rgba(0, 0, 0, .12)\";\nexport var aliasFieldShadowActive = \"inset 0 1px 5px 0 #000000\";\nexport var aliasFieldShadowFocus = \"0 0 0 3px #92d3ee\";\nexport var aliasFieldShadowError = \"0 0 0 3px #f97a7d\";\nexport var colorBlackBase = \"#000000\";\nexport var colorBlue10 = \"#e0f3ff\";\nexport var colorBlue20 = \"#ade2fe\";\nexport var colorBlue30 = \"#68c3f5\";\nexport var colorBlue40 = \"#2da2e3\";\nexport var colorBlue50 = \"#0280c6\";\nexport var colorBlue60 = \"#00649c\";\nexport var colorBlue70 = \"#004c75\";\nexport var colorBlue80 = \"#003958\";\nexport var colorBlue90 = \"#002d46\";\nexport var colorBlue100 = \"#00283d\";\nexport var colorBlueLight = \"#2da2e3\";\nexport var colorBlueBase = \"#0280c6\";\nexport var colorBlueDark = \"#00649c\";\nexport var colorText10 = \"#000000\";\nexport var colorText20 = \"#000000\";\nexport var colorText30 = \"#000000\";\nexport var colorText40 = \"#000000\";\nexport var colorText50 = \"#000000\";\nexport var colorText60 = \"#ffffff\";\nexport var colorText70 = \"#ffffff\";\nexport var colorText80 = \"#ffffff\";\nexport var colorText90 = \"#ffffff\";\nexport var colorText100 = \"#ffffff\";\nexport var colorTextBlueLight = \"#000000\";\nexport var colorTextBlueBase = \"#000000\";\nexport var colorTextBlueDark = \"#ffffff\";\nexport var colorTextGreenLight = \"#000000\";\nexport var colorTextGreenBase = \"#000000\";\nexport var colorTextGreenDark = \"#ffffff\";\nexport var colorTextGreyLight = \"#000000\";\nexport var colorTextGreyBase = \"#000000\";\nexport var colorTextGreyDark = \"#ffffff\";\nexport var colorTextMarketingLight = \"#ffffff\";\nexport var colorTextMarketingBase = \"#ffffff\";\nexport var colorTextMarketingDark = \"#ffffff\";\nexport var colorTextPrimaryLight = \"#ffffff\";\nexport var colorTextPrimaryBase = \"#ffffff\";\nexport var colorTextPrimaryDark = \"#ffffff\";\nexport var colorTextRedLight = \"#000000\";\nexport var colorTextRedBase = \"#000000\";\nexport var colorTextRedDark = \"#ffffff\";\nexport var colorTextSecondaryLight = \"#000000\";\nexport var colorTextSecondaryBase = \"#ffffff\";\nexport var colorTextSecondaryDark = \"#ffffff\";\nexport var colorTextTertiaryLight = \"#ffffff\";\nexport var colorTextTertiaryBase = \"#ffffff\";\nexport var colorTextTertiaryDark = \"#ffffff\";\nexport var colorGreen10 = \"#e0ffe0\";\nexport var colorGreen20 = \"#b2f9b4\";\nexport var colorGreen30 = \"#74eb76\";\nexport var colorGreen40 = \"#40d342\";\nexport var colorGreen50 = \"#1ab11d\";\nexport var colorGreen60 = \"#048907\";\nexport var colorGreen70 = \"#006402\";\nexport var colorGreen80 = \"#005a02\";\nexport var colorGreen90 = \"#003b01\";\nexport var colorGreen100 = \"#003601\";\nexport var colorGreenLight = \"#40d342\";\nexport var colorGreenBase = \"#1ab11d\";\nexport var colorGreenDark = \"#048907\";\nexport var colorGrey10 = \"#f3f4f4\";\nexport var colorGrey20 = \"#ededed\";\nexport var colorGrey30 = \"#d7d7d7\";\nexport var colorGrey40 = \"#b8b8b8\";\nexport var colorGrey50 = \"#919191\";\nexport var colorGrey60 = \"#696969\";\nexport var colorGrey70 = \"#474747\";\nexport var colorGrey80 = \"#2f2f2f\";\nexport var colorGrey90 = \"#212121\";\nexport var colorGrey100 = \"#1c1c1c\";\nexport var colorGreyLight = \"#b8b8b8\";\nexport var colorGreyBase = \"#919191\";\nexport var colorGreyDark = \"#696969\";\nexport var colorMarketing10 = \"#f2fbff\";\nexport var colorMarketing20 = \"#c1e8f8\";\nexport var colorMarketing30 = \"#92d3ee\";\nexport var colorMarketing40 = \"#6bbee0\";\nexport var colorMarketing50 = \"#4ba7cd\";\nexport var colorMarketing60 = \"#338eb4\";\nexport var colorMarketing70 = \"#217295\";\nexport var colorMarketing80 = \"#14536e\";\nexport var colorMarketing90 = \"#0a3142\";\nexport var colorMarketing100 = \"#062430\";\nexport var colorMarketingLight = \"#14536e\";\nexport var colorMarketingBase = \"#0a3142\";\nexport var colorMarketingDark = \"#062430\";\nexport var colorPrimary10 = \"#f2fbff\";\nexport var colorPrimary20 = \"#c1e8f8\";\nexport var colorPrimary30 = \"#92d3ee\";\nexport var colorPrimary40 = \"#6bbee0\";\nexport var colorPrimary50 = \"#4ba7cd\";\nexport var colorPrimary60 = \"#338eb4\";\nexport var colorPrimary70 = \"#217295\";\nexport var colorPrimary80 = \"#14536e\";\nexport var colorPrimary90 = \"#0a3142\";\nexport var colorPrimary100 = \"#062430\";\nexport var colorPrimaryLight = \"#14536e\";\nexport var colorPrimaryBase = \"#0a3142\";\nexport var colorPrimaryDark = \"#062430\";\nexport var colorRed10 = \"#ffebeb\";\nexport var colorRed20 = \"#fdb5b6\";\nexport var colorRed30 = \"#f97a7d\";\nexport var colorRed40 = \"#f2494c\";\nexport var colorRed50 = \"#e92326\";\nexport var colorRed60 = \"#dd070b\";\nexport var colorRed70 = \"#cd0003\";\nexport var colorRed80 = \"#b80003\";\nexport var colorRed90 = \"#a00003\";\nexport var colorRed100 = \"#870002\";\nexport var colorRedLight = \"#f97a7d\";\nexport var colorRedBase = \"#e92326\";\nexport var colorRedDark = \"#cd0003\";\nexport var colorSecondary10 = \"#fff5e4\";\nexport var colorSecondary20 = \"#f8dcab\";\nexport var colorSecondary30 = \"#eec274\";\nexport var colorSecondary40 = \"#e1a947\";\nexport var colorSecondary50 = \"#cf9226\";\nexport var colorSecondary60 = \"#b87b10\";\nexport var colorSecondary70 = \"#9a670c\";\nexport var colorSecondary80 = \"#7f5407\";\nexport var colorSecondary90 = \"#5f3d02\";\nexport var colorSecondary100 = \"#3d2700\";\nexport var colorSecondaryLight = \"#cf9226\";\nexport var colorSecondaryBase = \"#b87b10\";\nexport var colorSecondaryDark = \"#9a670c\";\nexport var colorTertiary10 = \"#ffe2e0\";\nexport var colorTertiary20 = \"#fcb5b4\";\nexport var colorTertiary30 = \"#f77e7c\";\nexport var colorTertiary40 = \"#f0504e\";\nexport var colorTertiary50 = \"#e72d2a\";\nexport var colorTertiary60 = \"#da1311\";\nexport var colorTertiary70 = \"#cb0e0b\";\nexport var colorTertiary80 = \"#b70e0c\";\nexport var colorTertiary90 = \"#a60805\";\nexport var colorTertiary100 = \"#940200\";\nexport var colorTertiaryLight = \"#cb0e0b\";\nexport var colorTertiaryBase = \"#b70e0c\";\nexport var colorTertiaryDark = \"#a60805\";\nexport var colorWhiteBase = \"#ffffff\";\nexport var accordionItemTitleColor = \"#0a3142\";\nexport var avatarSquareBorderRadius = \"4px\";\nexport var bannerRootBorderRadius = \"4px\";\nexport var brandedHeadingRootColor = \"#0a3142\";\nexport var brandedHeadingRootBorderColor = \"#0a3142\";\nexport var brandedHeadingRootSpacingTop = \"8px\";\nexport var brandedHeadingRootSpacingBottom = \"8px\";\nexport var calendarRootDayPickerNavButtonBorderRadius = \"4px\";\nexport var calendarRootDayPickerDayBorderRadius = \"4px\";\nexport var checkboxIconContainerBorderRadius = \"2px\";\nexport var checkboxCheckedColor = \"#ffffff\";\nexport var checkboxCheckedBackground = \"#0a3142\";\nexport var choiceContentBorderRadius = \"4px\";\nexport var choiceBodyBorderRadius = \"2px\";\nexport var choiceInfoColor = \"#2f2f2f\";\nexport var choiceTitleColor = \"#2f2f2f\";\nexport var choiceCaptionColor = \"#696969\";\nexport var choiceCheckedInfoColor = \"#062430\";\nexport var choiceCheckedTitleColor = \"#062430\";\nexport var choiceCheckedBackground = \"#f2fbff\";\nexport var choiceCheckedBorderColor = \"#0a3142\";\nexport var choiceCheckedIconColor = \"#ffffff\";\nexport var choiceCheckedIconBackground = \"#0a3142\";\nexport var dialogRootBorderRadius = \"4px\";\nexport var imageWrapperBorderRadius = \"0px\";\nexport var linkTextBrandedColor = \"#0a3142\";\nexport var linkTextBrandedHoverColor = \"#0a3142\";\nexport var linkTextBrandedVisitedColor = \"#14536e\";\nexport var linkTextBrandedActiveColor = \"#062430\";\nexport var loaderColorBase = \"#0a3142\";\nexport var loaderColorLight = \"#c1e8f8\";\nexport var loaderXxLarge = \"40px\";\nexport var loaderXLarge = \"32px\";\nexport var loaderLarge = \"28px\"; // Mainly for ios\n\nexport var loaderMedium = \"24px\";\nexport var loaderSmall = \"16px\";\nexport var paperWrapperBorderRadius = \"2px\";\nexport var placeholderRootBorderRadius = \"0px\";\nexport var radioCheckedColor = \"#0a3142\";\nexport var stepCompletedNumberColor = \"#ffffff\";\nexport var stepCompletedNumberBackground = \"#0a3142\";\nexport var stepCompletedLineColor = \"#0a3142\";\nexport var stepCompletedLabelColor = \"#0a3142\";\nexport var switchCheckedColor = \"#ffffff\";\nexport var switchCheckedBackground = \"#0a3142\";\nexport var switchActiveBackground = \"#062430\";\nexport var tableRootBorderRadius = \"4px\";\nexport var tooltipContainerBorderRadius = \"4px\";\nexport var widelistRootBorderRadius = \"4px\";\nexport var shadow0 = \"none\";\nexport var shadow1 = \"0 2px 4px rgba(0, 0, 0, .12)\";\nexport var shadow2 = \"0 2px 7px rgba(0, 0, 0, .28)\";\nexport var shadow3 = \"0 7px 14px rgba(0, 0, 0, .28)\";\nexport var shadow4 = \"0 14px 28px rgba(0, 0, 0, .28)\";\nexport var shadowInset1 = \"inset 0 1px 10px 0 rgba(0, 0, 0, .24)\";\nexport var shadowInset2 = \"inset 0 1px 15px 0 rgba(0, 0, 0, 0.28)\";\nexport var zIndex100 = 100; // tooltip\n\nexport var zIndex200 = 200; // menu\n\nexport var zIndex300 = 300; // popover\n\nexport var zIndex400 = 400; // sticky content\n\nexport var zIndex500 = 500; // sheet\n\nexport var zIndex600 = 600; // modal backdrop\n\nexport var zIndex700 = 700; // modal sheet\n\nexport var zIndex800 = 800; // modal (dialog, alert, page, full screen)\n\nexport var zIndex900 = 900; // toast\n\nexport var gridBreakpointXSmall = \"0px\"; // Mobile (portrait) | Grid Fluid\n\nexport var gridBreakpointSmall = \"480px\"; // Mobile (landscape) | Grid Fluid\n\nexport var gridBreakpointMedium = \"786px\"; // Tablet (portrait) | Grid Fluid\n\nexport var gridBreakpointLarge = \"1010px\"; // Desktop (13inch) / Tablet (landscape) | Grid Fluid\n\nexport var gridBreakpointXLarge = \"1440px\"; // HD Desktop (15inch and up) | Grid Static: 1200\n\nexport var gridGutter = \"16px\";\nexport var gridWrapFluid = \"calc(100% - 32px)\"; // Mobile Grid Fluid\n\nexport var gridWrapStatic = \"1200px\"; // Desktop static\n\nexport var space1 = \"2px\";\nexport var space2 = \"4px\";\nexport var space3 = \"8px\";\nexport var space4 = \"12px\";\nexport var space5 = \"16px\";\nexport var space6 = \"24px\";\nexport var space7 = \"32px\";\nexport var space8 = \"40px\";\nexport var space9 = \"48px\";\nexport var space10 = \"64px\";\nexport var space11 = \"96px\";\nexport var motionDurationFast = \"200ms\";\nexport var motionDurationMedium = \"300ms\";\nexport var motionDurationSlow = \"500ms\";\nexport var motionDurationLoop = \"1200ms\";\nexport var overlayFill = \"rgba(0, 0, 0, 0.33)\";\nexport var overlayGradientLinearFadeToTop = \"linear-gradient(-180deg, rgba(213, 219, 224, 0) 0%, rgba(0, 0, 0, 0.33) 100%)\";\nexport var overlayGradientLinearFadeToBottom = \"linear-gradient(-180deg, rgba(0, 0, 0, 0.33) 0%, rgba(255, 255, 255, 0) 100%)\";\nexport var borderRadius0 = \"0px\";\nexport var borderRadius1 = \"2px\";\nexport var borderRadius2 = \"4px\";\nexport var borderRadius3 = \"8px\";\nexport var borderRadius4 = \"12px\";\nexport var borderRadius5 = \"16px\";\nexport var borderRadius6 = \"24px\";\nexport var borderRadius7 = \"32px\";\nexport var borderRadius8 = \"40px\";\nexport var borderRadius9 = \"48px\";\nexport var borderRadius10 = \"64px\";\nexport var borderRadius11 = \"96px\";\nexport var borderRadiusSides = \"9999px\";\nexport var borderRadiusFill = \"50%\";\nexport var fontCaption1Size = \"14px\";\nexport var fontCaption1LineHeight = \"1.1429\";\nexport var fontCaption2Size = \"12px\";\nexport var fontCaption2LineHeight = \"1.3333\";\nexport var fontHeading1Size = \"28px\"; // h1\n\nexport var fontHeading1LineHeight = \"1.1429\"; // h1\n\nexport var fontHeading1Weight = \"700\"; // h1\n\nexport var fontHeading1LargeSize = \"40px\"; // h1\n\nexport var fontHeading1LargeLineHeight = \"1.1\"; // h1\n\nexport var fontHeading2Size = \"24px\"; // h2\n\nexport var fontHeading2LineHeight = \"1.1667\"; // h2\n\nexport var fontHeading2Weight = \"700\"; // h2\n\nexport var fontHeading2LargeSize = \"32px\"; // h2\n\nexport var fontHeading2LargeLineHeight = \"1.25\"; // h2\n\nexport var fontHeading3Size = \"22px\"; // h3\n\nexport var fontHeading3LineHeight = \"1.2727\"; // h3\n\nexport var fontHeading3Weight = \"700\"; // h3\n\nexport var fontHeading3LargeSize = \"24px\"; // h3\n\nexport var fontHeading3LargeLineHeight = \"1.3333\"; // h3\n\nexport var fontHeading4Size = \"20px\"; // h4\n\nexport var fontHeading4LineHeight = \"1.4\"; // h4\n\nexport var fontHeading4Weight = \"700\"; // h4\n\nexport var fontHeading5Size = \"18px\"; // h5\n\nexport var fontHeading5LineHeight = \"1.3333\"; // h5\n\nexport var fontHeading5Weight = \"700\"; // h5\n\nexport var fontHeading6Size = \"16px\"; // h6\n\nexport var fontHeading6LineHeight = \"1.25\"; // h6\n\nexport var fontHeading6Weight = \"700\"; // h6\n\nexport var fontParagraphSize = \"16px\";\nexport var fontParagraphLineHeight = \"1.5\";\nexport var fontParagraphLargeSize = \"16px\";\nexport var fontParagraphLargeLineHeight = \"1.5\";\nexport var fontFamilyNuachtSansWeb = \"'Nuacht Sans', 'Helvetica Neue', Arial, sans-serif\";\nexport var fontFamilyNuachtSerifHeadlineWeb = \"'Nuacht Serif Headline', Georgia, serif\";\nexport var fontFamilyHalant = \"Halant, 'Times New Roman', Times, serif\";\nexport var fontFamilyProdukt = \"Produkt, 'Times New Roman', Times, serif\";\nexport var fontFamilyHelveticaLtStdCond = \"Helvetica Neue Condensed, Arial, Helvetica, sans-serif\";\nexport var fontFamilyHelveticaNeueLtStd = \"HelveticaNeueLTStd, Arial, Helvetica, sans-serif\";\nexport var fontFamilyVitesse = \"Vitesse, 'Times New Roman', Times, serif\";\nexport var fontFamilyBwModelica = \"BwModelica, Open Sans, sans-serif\";\nexport var fontFamilySofiaProCondensed = \"Sofia Pro Condensed, Arial, Helvetica, sans-serif\";\nexport var fontFamilyBarlowSemiCondensed = \"BarlowSemiCondensed, Arial, Helvetica, sans-serif\";\nexport var fontFamilyMerriweather = \"Merriweather, 'Times New Roman', Times, serif\";\nexport var fontFamilyGeorgia = \"Georgia, serif\";\nexport var fontFamilyOpenSans = \"OpenSans, Arial, Helvetica, sans-serif\";\nexport var fontFamilyMarkproNarrow = \"Mark Pro Narrow, Open Sans, Arial, Helvetica, sans-serif\";\nexport var fontFamilyFFGoodProWide = \"FFGoodProWide, Open Sans, Arial, Helvetica, sans-serif\";\nexport var fontFamilyFFGoodOtCondensed = \"FFGoodOTCondensed, Open Sans, Arial, Helvetica, sans-serif\";\nexport var fontFamilyBrandPrimary = \"Georgia, serif\"; // UI Display (e.g. section title)\n\nexport var fontFamilyBrandSecondary = \"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif\"; // Article Display (e.g. teaser title)\n\nexport var fontFamilySystem = \"-apple-system, system-ui, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif\"; // UI Text (e.g. link text) -> body 1\n\nexport var fontSize6XLarge = \"40px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var fontSize5XLarge = \"32px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var fontSize4XLarge = \"28px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var fontSize3XLarge = \"24px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var fontSizeXxLarge = \"22px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var fontSizeXLarge = \"20px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var fontSizeLarge = \"18px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var fontSizeMedium = \"16px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var fontSizeSmall = \"14px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var fontSizeXSmall = \"12px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var fontWeightRegular = \"400\"; // normal\n\nexport var fontWeightMedium = \"500\"; // medium\n\nexport var fontWeightBold = \"700\"; // bold\n\nexport var lineHeight4XLarge = \"48px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var lineHeight3XLarge = \"44px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var lineHeightXxLarge = \"40px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var lineHeightXLarge = \"32px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var lineHeightLarge = \"28px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var lineHeightMedium = \"24px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var lineHeightSmall = \"20px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var lineHeightXSmall = \"16px\"; // use font.heading, font.paragraph, font.caption instead\n\nexport var buttonOutlineBorderColor = \"#000000\";\nexport var buttonOutlineColor = \"#000000\";\nexport var buttonOutlineHoverBorderColor = \"#0a3142\";\nexport var buttonOutlineHoverColor = \"#0a3142\";\nexport var buttonOutlineActiveBackground = \"#f2fbff\";\nexport var buttonOutlineActiveBorderColor = \"#0a3142\";\nexport var buttonOutlineActiveColor = \"#0a3142\";\nexport var buttonPlainColor = \"#0a3142\";\nexport var buttonPlainHoverBackground = \"#f2fbff\";\nexport var buttonPlainActiveBackground = \"#c1e8f8\";\nexport var buttonPrimaryBackground = \"#0a3142\";\nexport var buttonPrimaryColor = \"#ffffff\";\nexport var buttonPrimaryHoverBackground = \"#14536e\";\nexport var buttonPrimaryHoverColor = \"#ffffff\";\nexport var buttonPrimaryActiveBackground = \"#062430\";\nexport var buttonPrimaryActiveColor = \"#ffffff\";\nexport var buttonFontFamily = \"Georgia, serif\";\nexport var buttonFontWeight = \"700\";\nexport var buttonSecondaryColor = \"#0a3142\";\nexport var buttonRootFontWeight = \"700\";\nexport var iconXLarge = \"32px\";\nexport var iconLarge = \"28px\"; // Mainly for ios\n\nexport var iconMedium = \"24px\";\nexport var iconSmall = \"16px\";","/* eslint-disable */\nvar canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\nexport default canUseDOM;","/**\n * @param {string} propValue\n * @returns - css value\n *\n * @example\n * createPropInlineStyle('100%', [2, 4]);\n */\nvar createPropInlineStyle = function createPropInlineStyle(propValue, exclude) {\n if (!propValue || exclude && exclude.includes(propValue) || typeof propValue !== 'string') {\n return undefined;\n }\n\n return propValue;\n};\n\nexport default createPropInlineStyle;","/**\n * @param {*} possibleValues\n * @param {*} values\n * @returns - first matching value in both arrays\n *\n * @example\n * getFirstMatchingValue([0, 1, 2, 3], [2, 3]); -> 2\n * getFirstMatchingValue([0, 1, 2, 3], [3, 2]); -> 3\n * getFirstMatchingValue([0, 1, 2, 3], [1, 2, 3]); -> 1\n */\nvar getFirstMatchingValue = function getFirstMatchingValue(possibleValues, values) {\n return values.find(function (e) {\n return possibleValues.indexOf(e) !== -1;\n });\n};\n\nexport default getFirstMatchingValue;","/**\n * @param {&} value Any value\n *\n * @returns {true|undefined} True or undefined, used in combination with removeEmptyKeys\n *\n * @example\n * isValueOrUndefined(0); -> true\n * isValueOrUndefined('randomString'); -> true\n * isValueOrUndefined(undefined); -> undefined\n */\nvar isValueOrUndefined = function isValueOrUndefined(value) {\n return value !== undefined ? true : undefined;\n};\n\nexport default isValueOrUndefined;","/**\n * @param {string} string - non pascal strin\n * @returns SpaceAround\n *\n * @example\n * pascalize('space-around')\n */\nvar pascalize = function pascalize(string) {\n if (!string) {\n return '';\n }\n\n return string.replace(/[-_]+/g, ' ').replace(/[^\\w\\s]/g, '').replace(/\\s+(.)(\\w+)/g, function ($1, $2, $3) {\n return $2.toUpperCase() + $3.toLowerCase();\n }).replace(/\\s/g, '').replace(/\\w/, function (s) {\n return s.toUpperCase();\n });\n};\n\nexport default pascalize;","import pascalize from './pascalize';\n/**\n * @param {Object} styles - css module styles\n * @param {string|string[]|Object} prop - The string value of a prop or responsive array of the props, or an object with responsive keys\n * @param {string} prop[0] - Value at xs screen-size and up\n * @param {string} prop[1] - Value at sm screen-size and up\n * @param {string} prop[2] - Value at md screen-size and up\n * @param {string} prop[3] - Value at lg screen-size and up\n * @param {string} prop[4] - Value at xl screen-size and up\n * @param {Object} prop - An object with responsive arrays\n * @param {string} prop.xs - Value at xs screen-size and up\n * @param {string} prop.sm - Value at sm screen-size and up\n * @param {string} prop.md - Value at md screen-size and up\n * @param {string} prop.lg - Value at lg screen-size and up\n * @param {string} prop.xl - Value at xl screen-size and up\n * @param {string} propName - The name of the prop\n * @returns An array with camelized style string values\n *\n * @example\n * makeResponsive(styles, 'space-around', 'justifyContent')\n * makeResponsive(styles, { sm: 'space-between', md: 'space-around' }, 'justifyContent')\n * makeResponsive(styles, [ undefined, 'space-between', 'space-around' ], 'justifyContent')\n */\n\nvar makeResponsive = function makeResponsive(styles, prop, propName) {\n // xSmall, small, medium, large, xLarge\n var prefix = pascalize(propName);\n\n if (typeof prop === 'string') {\n var _ref;\n\n return _ref = {}, _ref[styles[\"\" + propName + pascalize(prop)]] = !!prop, _ref;\n }\n\n if (Array.isArray(prop)) {\n var _ref2;\n\n return _ref2 = {}, _ref2[styles[\"\" + propName + pascalize(prop[0])]] = !!prop[0], _ref2[styles[\"sm\" + prefix + pascalize(prop[1])]] = !!prop[1], _ref2[styles[\"md\" + prefix + pascalize(prop[2])]] = !!prop[2], _ref2[styles[\"lg\" + prefix + pascalize(prop[3])]] = !!prop[3], _ref2[styles[\"xl\" + prefix + pascalize(prop[4])]] = !!prop[4], _ref2;\n }\n\n if (typeof prop === 'object') {\n var _ref3;\n\n return _ref3 = {}, _ref3[styles[\"\" + propName + pascalize(prop.xs)]] = !!prop.xs, _ref3[styles[\"sm\" + prefix + pascalize(prop.sm)]] = !!prop.sm, _ref3[styles[\"md\" + prefix + pascalize(prop.md)]] = !!prop.md, _ref3[styles[\"lg\" + prefix + pascalize(prop.lg)]] = !!prop.lg, _ref3[styles[\"xl\" + prefix + pascalize(prop.xl)]] = !!prop.xl, _ref3;\n }\n\n return {};\n};\n\nexport default makeResponsive;","/**\n * @param {Object} obj\n * @param {Boolean} allowNesting\n *\n * @returns {*} Am object without undefined values\n */\nvar removeEmptyKeys = function removeEmptyKeys(obj, allowNesting) {\n if (allowNesting === void 0) {\n allowNesting = false;\n }\n\n Object.keys(obj).forEach(function (key) {\n if (obj[key] && typeof obj[key] === 'object' && allowNesting) removeEmptyKeys(obj[key]);else if (obj[key] === undefined) delete obj[key];\n });\n return obj;\n};\n\nexport default removeEmptyKeys;","import { useEffect, useLayoutEffect } from 'react';\nimport canUseDOM from './canUseDOM';\n/**\n * `React.useLayoutEffect` that fallbacks to `React.useEffect` on server side rendering.\n *\n * isomorphic = equal shape, equal form\n */\n\nvar useIsomorphicEffect = !canUseDOM ? useEffect : useLayoutEffect;\nexport default useIsomorphicEffect;","/* eslint-disable no-sparse-arrays */\n// eslint-disable-next-line\nimport * as tokens from '@mediahuis/chameleon-theme-wl';\nimport { pascalize } from '../../utils';\n/**\n * @param {string} color - name of the color from the tokenset, the color must start with 'color')\n * @returns - [undefined, style]\n *\n * @example\n * const [, colorStyle] getColor('colorPrimaryBase');\n */\n\nvar getColor = function getColor(color) {\n if (!color) {\n return [undefined, undefined];\n }\n\n if (!color.includes('color')) {\n var colorName = \"color\" + pascalize(color);\n return [undefined, tokens[colorName]];\n }\n\n return [undefined, tokens[color]];\n};\n/**\n * @param {string} color - name of the color from the tokenset, the color must start with 'color')\n * @returns - associative text color hex value\n *\n * @example\n * getTextColor('colorPrimaryBase');\n */\n\n\nexport var getTextColor = function getTextColor(color) {\n if (!color) {\n return [undefined, undefined];\n }\n\n var returnColor;\n\n if (color.toLowerCase().includes('black')) {\n return [undefined, '#ffffff'];\n }\n\n if (color.toLowerCase().includes('white')) {\n return [undefined, '#000000'];\n }\n\n if (color.includes('Base') || color.includes('Light') || color.includes('Dark')) {\n if (!color.includes('color')) {\n var colorName = \"colorText\" + pascalize(color);\n returnColor = tokens[colorName];\n } else {\n returnColor = tokens[(\"\" + color).replace('color', 'colorText')];\n }\n }\n\n [10, 20, 30, 40, 50, 60, 70, 80, 90, 100].forEach(function (shade) {\n if (color.includes(\"\" + shade)) {\n returnColor = tokens[\"colorText\" + shade];\n }\n });\n return [undefined, returnColor];\n};\nexport default getColor;","import cx from 'classnames';\nimport styles from './index.module.scss';\n/**\n * @typedef {\"inherit\" | \"regular\" | \"medium\" | \"bold\"} fontWeight\n *\n * @param fontWeight {fontWeight}\n * @returns - [className]\n *\n * @example\n * const [fontWeightClassName] = getFontWeight('medium');\n */\n\nvar getFontWeight = function getFontWeight(fontWeight) {\n var _cx;\n\n return [cx((_cx = {}, _cx[styles.inherit] = fontWeight === 'inherit', _cx[styles.regular] = fontWeight === 'regular', _cx[styles.medium] = fontWeight === 'medium', _cx[styles.bold] = fontWeight === 'bold', _cx))];\n};\n\nexport default getFontWeight;","import cx from 'classnames';\nimport styles from './index.module.scss';\n/**\n * @typedef {\"inherit\" | \"normal\" | \"italic\" | \"oblique\"} fontStyle\n *\n * @param fontStyle {fontStyle}\n * @returns - [className]\n *\n * @example\n * const [fontStyleClassName] = getFontStyle('capitalize');\n */\n\nvar getFontStyle = function getFontStyle(fontStyle) {\n var _cx;\n\n return [cx((_cx = {}, _cx[styles.inherit] = fontStyle === 'inherit', _cx[styles.normal] = fontStyle === 'normal', _cx[styles.italic] = fontStyle === 'italic', _cx[styles.oblique] = fontStyle === 'oblique', _cx))];\n};\n\nexport default getFontStyle;","import cx from 'classnames';\nimport { createPropInlineStyle } from '../../utils';\nimport styles from './index.module.scss';\n/**\n * @typedef {\"full\" | \"auto\" | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | String} height\n *\n * @param height {height}\n * @returns - [className, style]\n *\n * @example\n * const [heightClassName, heightStyle] = getHeight('full');\n */\n\nvar getHeight = function getHeight(height) {\n var _cx;\n\n var spaces = ['full', 'auto', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n var heightClassName = cx((_cx = {}, _cx[styles.hFull] = height === 'full', _cx[styles.hAuto] = height === 'auto', _cx[styles.h0] = height === 0, _cx[styles.h1] = height === 1, _cx[styles.h2] = height === 2, _cx[styles.h3] = height === 3, _cx[styles.h4] = height === 4, _cx[styles.h5] = height === 5, _cx[styles.h6] = height === 6, _cx[styles.h7] = height === 7, _cx[styles.h8] = height === 8, _cx[styles.h9] = height === 9, _cx[styles.h10] = height === 10, _cx[styles.h11] = height === 11, _cx));\n var heightStyle = createPropInlineStyle(height, spaces);\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [heightClassName, heightStyle];\n};\n/**\n * @typedef {\"full\" | \"auto\" | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | String} maxHeight\n *\n * @param maxHeight {maxHeight}\n * @returns - [className, style]\n *\n * @example\n * const [maxHeightClassName, maxHeightStyle] = getMaxHeight('full');\n */\n\n\nexport var getMaxHeight = function getMaxHeight(maxHeight) {\n var _cx2;\n\n var spaces = ['full', 'auto', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n var maxHeightClassName = cx((_cx2 = {}, _cx2[styles.mhFull] = maxHeight === 'full', _cx2[styles.mhAuto] = maxHeight === 'auto', _cx2[styles.mh0] = maxHeight === 0, _cx2[styles.mh1] = maxHeight === 1, _cx2[styles.mh2] = maxHeight === 2, _cx2[styles.mh3] = maxHeight === 3, _cx2[styles.mh4] = maxHeight === 4, _cx2[styles.mh5] = maxHeight === 5, _cx2[styles.mh6] = maxHeight === 6, _cx2[styles.mh7] = maxHeight === 7, _cx2[styles.mh8] = maxHeight === 8, _cx2[styles.mh9] = maxHeight === 9, _cx2[styles.mh10] = maxHeight === 10, _cx2[styles.mh11] = maxHeight === 11, _cx2));\n var maxHeightStyle = createPropInlineStyle(maxHeight, spaces);\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [maxHeightClassName, maxHeightStyle];\n};\nexport default getHeight;","import cx from 'classnames';\nimport styles from './index.module.scss';\n/**\n * @typedef {\"absolute\" | \"relative\" | \"fixed\" | \"sticky\"} position\n *\n * @param position {position}\n * @returns - [className]\n *\n * @example\n * const [positionClassName] = getPosition('absolute');\n */\n\nvar getPosition = function getPosition(position) {\n var _cx;\n\n return [cx((_cx = {}, _cx[styles.positionAbsolute] = position === 'absolute', _cx[styles.positionRelative] = position === 'relative', _cx[styles.positionFixed] = position === 'fixed', _cx[styles.positionSticky] = position === 'sticky', _cx))];\n};\n\nexport default getPosition;","import cx from 'classnames';\nimport styles from './index.module.scss';\n/**\n * @typedef {\"center\" | \"inherit\" | \"justify\" | \"left\" | \"right\"} textAlign\n *\n * @param textAlign {textAlign}\n * @returns - [className]\n *\n * @example\n * const [textAlignClassName] = getTextAlign('center');\n */\n\nvar getTextAlign = function getTextAlign(textAlign) {\n var _cx;\n\n return [cx((_cx = {}, _cx[styles.center] = textAlign === 'center', _cx[styles.inherit] = textAlign === 'inherit', _cx[styles.justify] = textAlign === 'justify', _cx[styles.left] = textAlign === 'left', _cx[styles.right] = textAlign === 'right', _cx))];\n};\n\nexport default getTextAlign;","import cx from 'classnames';\nimport styles from './index.module.scss';\n/**\n * @typedef {\"inherit\" | \"none\" | \"capitalize\" | \"uppercase\" | \"lowercase\"} textTransform\n *\n * @param textTransform {textTransform}\n * @returns - [className]\n *\n * @example\n * const [textTransformClassName] = getTextTransform('capitalize');\n */\n\nvar getTextTransform = function getTextTransform(textTransform) {\n var _cx;\n\n return [cx((_cx = {}, _cx[styles.inherit] = textTransform === 'inherit', _cx[styles.none] = textTransform === 'none', _cx[styles.capitalize] = textTransform === 'capitalize', _cx[styles.uppercase] = textTransform === 'uppercase', _cx[styles.lowercase] = textTransform === 'lowercase', _cx))];\n};\n\nexport default getTextTransform;","import cx from 'classnames';\nimport { createPropInlineStyle } from '../../utils';\nimport styles from './index.module.scss';\n/**\n * @typedef {\"full\" | \"auto\" | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | String} width\n *\n * @param width {width}\n * @returns - [className, style]\n *\n * @example\n * const [widthClassName, widthStyle] = getWidth('full');\n */\n\nvar getWidth = function getWidth(width) {\n var _cx;\n\n var spaces = ['full', 'auto', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n var widthClassName = cx((_cx = {}, _cx[styles.wFull] = width === 'full', _cx[styles.wAuto] = width === 'auto', _cx[styles.w0] = width === 0, _cx[styles.w1] = width === 1, _cx[styles.w2] = width === 2, _cx[styles.w3] = width === 3, _cx[styles.w4] = width === 4, _cx[styles.w5] = width === 5, _cx[styles.w6] = width === 6, _cx[styles.w7] = width === 7, _cx[styles.w8] = width === 8, _cx[styles.w9] = width === 9, _cx[styles.w10] = width === 10, _cx[styles.w11] = width === 11, _cx));\n var widthStyle = createPropInlineStyle(width, spaces);\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [widthClassName, widthStyle];\n};\n/**\n * @typedef {\"full\" | \"auto\" | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | String} maxWidth\n *\n * @param maxWidth {maxWidth}\n * @returns - [className, style]\n *\n * @example\n * const [maxWidthClassName, maxWidthStyle] = getMaxWidth('full');\n */\n\n\nexport var getMaxWidth = function getMaxWidth(maxWidth) {\n var _cx2;\n\n var spaces = ['full', 'auto', 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n var maxWidthClassName = cx((_cx2 = {}, _cx2[styles.mwFull] = maxWidth === 'full', _cx2[styles.mwAuto] = maxWidth === 'auto', _cx2[styles.mw0] = maxWidth === 0, _cx2[styles.mw1] = maxWidth === 1, _cx2[styles.mw2] = maxWidth === 2, _cx2[styles.mw3] = maxWidth === 3, _cx2[styles.mw4] = maxWidth === 4, _cx2[styles.mw5] = maxWidth === 5, _cx2[styles.mw6] = maxWidth === 6, _cx2[styles.mw7] = maxWidth === 7, _cx2[styles.mw8] = maxWidth === 8, _cx2[styles.mw9] = maxWidth === 9, _cx2[styles.mw10] = maxWidth === 10, _cx2[styles.mw11] = maxWidth === 11, _cx2));\n var maxWidthStyle = createPropInlineStyle(maxWidth, spaces);\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [maxWidthClassName, maxWidthStyle];\n};\nexport default getWidth;","import cx from 'classnames';\nimport styles from './index.module.scss';\n/**\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11} top\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11} right\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11} bottom\n * @typedef {0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11} left\n */\n\n/**\n * @param top {top}\n * @returns - [className]\n *\n * @example\n * const [topClassName] = getTop(3);\n */\n\nexport var getTop = function getTop(top) {\n var _cx;\n\n var classNames = cx((_cx = {}, _cx[styles[\"top\" + top]] = typeof top === 'number', _cx));\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [classNames];\n};\n/**\n * @param right {right}\n * @returns - [className]\n *\n * @example\n * const [rightClassName] = getRight(3);\n */\n\nexport var getRight = function getRight(right) {\n var _cx2;\n\n var classNames = cx((_cx2 = {}, _cx2[styles[\"right\" + right]] = typeof right === 'number', _cx2));\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [classNames];\n};\n/**\n * @param bottom {bottom}\n * @returns - [className]\n *\n * @example\n * const [bottomClassName] = getBottom(3);\n */\n\nexport var getBottom = function getBottom(bottom) {\n var _cx3;\n\n var classNames = cx((_cx3 = {}, _cx3[styles[\"bottom\" + bottom]] = typeof bottom === 'number', _cx3));\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [classNames];\n};\n/**\n * @param left {left}\n * @returns - [className]\n *\n * @example\n * const [leftClassName] = getLeft(3);\n */\n\nexport var getLeft = function getLeft(left) {\n var _cx4;\n\n var classNames = cx((_cx4 = {}, _cx4[styles[\"left\" + left]] = typeof left === 'number', _cx4));\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [classNames];\n};","import { removeEmptyKeys, isValueOrUndefined, getFirstMatchingValue } from '../../utils';\nimport styles from './index.module.scss';\nvar possibleProps = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];\n/**\n * @typedef { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 } p\n * @typedef { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 } pb\n * @typedef { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 } pl\n * @typedef { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 } pr\n * @typedef { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 } pt\n * @typedef { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 } px\n * @typedef { 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 } py\n */\n\n/**\n * @param p {p}\n * @param pb {pb}\n * @param pl {pl}\n * @param pr {pr}\n * @param pt {pt}\n * @param px {px}\n * @param py {py}\n *\n * @returns [className]\n */\n\nvar getPadding = function getPadding(p, pb, pl, pr, pt, px, py) {\n var _removeEmptyKeys;\n\n var paddingBottom = getFirstMatchingValue(possibleProps, [pb, py, p]);\n var paddingLeft = getFirstMatchingValue(possibleProps, [pl, px, p]);\n var paddingRight = getFirstMatchingValue(possibleProps, [pr, px, p]);\n var paddingTop = getFirstMatchingValue(possibleProps, [pt, py, p]);\n var classnames = removeEmptyKeys((_removeEmptyKeys = {}, _removeEmptyKeys[styles[\"paddingBottom\" + paddingBottom]] = isValueOrUndefined(paddingBottom), _removeEmptyKeys[styles[\"paddingLeft\" + paddingLeft]] = isValueOrUndefined(paddingLeft), _removeEmptyKeys[styles[\"paddingRight\" + paddingRight]] = isValueOrUndefined(paddingRight), _removeEmptyKeys[styles[\"paddingTop\" + paddingTop]] = isValueOrUndefined(paddingTop), _removeEmptyKeys));\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [classnames];\n};\n\nexport default getPadding;","import { removeEmptyKeys, isValueOrUndefined, getFirstMatchingValue } from '../../utils';\nimport styles from './index.module.scss';\nvar possibleProps = [-11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 'auto'];\n\nvar withPrefix = function withPrefix(val) {\n if (val < 0) {\n return \"Negative\" + Math.abs(val);\n }\n\n return val;\n};\n/**\n * @typedef { -11 | -10 | -9 | -8 | -7 | -6 | -5 | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 'auto' } m\n * @typedef { -11 | -10 | -9 | -8 | -7 | -6 | -5 | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 'auto' } mb\n * @typedef { -11 | -10 | -9 | -8 | -7 | -6 | -5 | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 'auto' } ml\n * @typedef { -11 | -10 | -9 | -8 | -7 | -6 | -5 | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 'auto' } mr\n * @typedef { -11 | -10 | -9 | -8 | -7 | -6 | -5 | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 'auto' } mt\n * @typedef { -11 | -10 | -9 | -8 | -7 | -6 | -5 | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 'auto' } mx\n * @typedef { -11 | -10 | -9 | -8 | -7 | -6 | -5 | -4 | -3 | -2 | -1 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 'auto' } my\n */\n\n/**\n * @param m {m}\n * @param mb {mb}\n * @param ml {ml}\n * @param mr {mr}\n * @param mt {mt}\n * @param mx {mx}\n * @param my {my}\n *\n * @returns [className]\n */\n\n\nvar getMargin = function getMargin(m, mb, ml, mr, mt, mx, my) {\n var _removeEmptyKeys;\n\n var marginBottom = getFirstMatchingValue(possibleProps, [mb, my, m]);\n var marginLeft = getFirstMatchingValue(possibleProps, [ml, mx, m]);\n var marginRight = getFirstMatchingValue(possibleProps, [mr, mx, m]);\n var marginTop = getFirstMatchingValue(possibleProps, [mt, my, m]);\n var classnames = removeEmptyKeys((_removeEmptyKeys = {}, _removeEmptyKeys[styles[\"marginBottom\" + withPrefix(marginBottom)]] = isValueOrUndefined(marginBottom), _removeEmptyKeys[styles[\"marginLeft\" + withPrefix(marginLeft)]] = isValueOrUndefined(marginLeft), _removeEmptyKeys[styles[\"marginRight\" + withPrefix(marginRight)]] = isValueOrUndefined(marginRight), _removeEmptyKeys[styles[\"marginTop\" + withPrefix(marginTop)]] = isValueOrUndefined(marginTop), _removeEmptyKeys));\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [classnames];\n};\n\nexport default getMargin;","import cx from 'classnames';\nimport styles from './index.module.scss';\n/**\n * @typedef {\"left\" | \"right\" | \"none\"} float\n *\n * @param float {float}\n * @returns - [className]\n *\n * @example\n * const [floatClassName] = getFloat('left');\n */\n\nvar getFloat = function getFloat(float) {\n var _cx;\n\n return [cx((_cx = {}, _cx[styles.floatLeft] = float === 'left', _cx[styles.floatRight] = float === 'right', _cx[styles.floatNone] = float === 'none', _cx))];\n};\n\nexport default getFloat;","import cx from 'classnames';\nimport { makeResponsive } from '../../utils';\nimport styles from './index.module.scss';\n/**\n * @typedef {\"center\" | \"flex-end\" | \"flex-start\" | \"space-around\" | \"space-between\" | \"space-evenly\" | \"stretch\"} alignContent\n *\n * @param alignContent {alignContent}\n * @returns - [className, style]\n *\n * @example\n * const [classnames, style] = getAlignContent('center');\n */\n\nexport var getAlignContent = function getAlignContent(alignContent) {\n var classnames = cx(makeResponsive(styles, alignContent, 'alignContent'));\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [classnames, undefined];\n};\n/**\n * @typedef {\"flex-start\" | \"center\" | \"flex-end\" | \"stretch\" | \"baseline\"} alignItems\n *\n * @param alignItems {alignItems}\n * @returns - [className, style]\n *\n * @example\n * const [classnames, style] = getAlignItems('center');\n */\n\nexport var getAlignItems = function getAlignItems(alignItems) {\n var classnames = cx(makeResponsive(styles, alignItems, 'alignItems'));\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [classnames, undefined];\n};\n/**\n * @typedef {\"row\" | \"row-reverse\" | \"column\" | \"column-reverse\"} flexDirection\n *\n * @param flexDirection {flexDirection}\n * @returns - [className, style]\n *\n * @example\n * const [classnames, style] = getFlexDirection('center');\n */\n\nexport var getFlexDirection = function getFlexDirection(flexDirection) {\n var classnames = cx(makeResponsive(styles, flexDirection, 'flexDirection'));\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [classnames, undefined];\n};\n/**\n * @typedef {\"nowrap\" | \"wrap\" | \"wrap-reverse\"} flexWrap\n *\n * @param flexWrap {flexWrap}\n * @returns - [className, style]\n *\n * @example\n * const [classnames, style] = getFlexWrap('center');\n */\n\nexport var getFlexWrap = function getFlexWrap(flexWrap) {\n var classnames = cx(makeResponsive(styles, flexWrap, 'flexWrap'));\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [classnames, undefined];\n};\n/**\n * @typedef {\"flex-start\" | \"center\" | \"flex-end\" | \"space-between\" | \"space-around\" | \"space-evenly\"} justifyContent\n *\n * @param justifyContent {justifyContent}\n * @returns - [className, style]\n *\n * @example\n * const [classnames, style] = getJustifyContent('center');\n */\n\nexport var getJustifyContent = function getJustifyContent(justifyContent) {\n var classnames = cx(makeResponsive(styles, justifyContent, 'justifyContent'));\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [classnames, undefined];\n};","import cx from 'classnames';\nimport styles from './index.module.scss';\n/**\n * @typedef {\"inline\" | \"block\" | \"contents\" | \"flex\" | \"grid\" | \"inline-block\" | \"inline-flex\" | \"inline-grid\" | \"inline-table\" | \"list-item\" | \"run-in\" | \"table\" | \"table-caption\" | \"table-column-group\" | \"table-header-group\" | \"table-footer-group\" | \"table-row-group\" | \"table-cell\" | \"table-column\" | \"table-row\" | \"none\" | \"initial\" | \"inherit\"} display\n *\n * @param display {display}\n * @returns - [className, style]\n *\n * @example\n * const [displayClassName, displayStyle] = getDisplay('full');\n */\n\nvar getDisplay = function getDisplay(display) {\n var _cx;\n\n var displayClassName = cx((_cx = {}, _cx[styles.displayInline] = display === 'inline', _cx[styles.displayBlock] = display === 'block', _cx[styles.displayFlex] = display === 'flex', _cx[styles.displayGrid] = display === 'grid', _cx[styles.displayInlineBlock] = display === 'inline-block', _cx[styles.displayInlineFlex] = display === 'inline-flex', _cx[styles.displayInlineGrid] = display === 'inline-grid', _cx[styles.displayInlineTable] = display === 'inline-table', _cx[styles.displayListItem] = display === 'list-item', _cx[styles.displayRunIn] = display === 'run-in', _cx[styles.displayTable] = display === 'table', _cx[styles.displayTableCaption] = display === 'table-caption', _cx[styles.displayTableColumnGroup] = display === 'table-column-group', _cx[styles.displayTableHeaderGroup] = display === 'table-header-group', _cx[styles.displayTableFooterGroup] = display === 'table-footer-group', _cx[styles.displayTableRowGroup] = display === 'table-row-group', _cx[styles.displayTableCell] = display === 'table-cell', _cx[styles.displayTableColumn] = display === 'table-column', _cx[styles.displayTableRow] = display === 'table-row', _cx[styles.displayNone] = display === 'none', _cx[styles.displayInitial] = display === 'initial', _cx[styles.displayInherit] = display === 'inherit', _cx));\n /**\n * We return an array and not an object, for renaming reasons.\n */\n\n return [displayClassName, undefined];\n};\n\nexport default getDisplay;","import cx from 'classnames';\nimport styles from './index.module.scss';\n/**\n * @typedef {\"primary\" | \"secondary\" | \"system\" | \"inherit\"} fontFamily\n *\n * @param fontFamily {fontFamily}\n * @returns - [className]\n *\n * @example\n * const [fontFamilyClassName] = getFontFamily('primary');\n */\n\nvar getFontFamily = function getFontFamily(fontFamily) {\n var _cx;\n\n return [cx((_cx = {}, _cx[styles.inherit] = fontFamily === 'inherit', _cx[styles.primary] = fontFamily === 'primary', _cx[styles.secondary] = fontFamily === 'secondary', _cx[styles.system] = fontFamily === 'system', _cx))];\n};\n\nexport default getFontFamily;","import cx from 'classnames';\nimport styles from './index.module.scss';\n/**\n * @typedef {\"inherit\" | \"none\" | \"underline\" | \"line-through\"} decoration\n *\n * @param decoration {decoration}\n * @returns - [className]\n *\n * @example\n * const [decorationClassName] = getDecoration('underline');\n */\n\nvar getDecoration = function getDecoration(decoration) {\n var _cx;\n\n return [cx((_cx = {}, _cx[styles.inherit] = decoration === 'inherit', _cx[styles.none] = decoration === 'none', _cx[styles.underline] = decoration === 'underline', _cx[styles.lineThrough] = decoration === 'line-through', _cx))];\n};\n\nexport default getDecoration;","import cx from 'classnames';\nimport styles from './index.module.scss';\n/**\n * @typedef {0 | 100 | 200 | 300 | 400 | 500| 600 | 700 | 800 | 900 } zIndex\n *\n * @param zIndex {zIndex}\n * @returns - [className]\n *\n * @example\n * const [zIndexClassName] = getZIndex(100);\n */\n\nvar getZIndex = function getZIndex(zIndex) {\n var _cx;\n\n return [cx((_cx = {}, _cx[styles.zIndex0] = zIndex === 0, _cx[styles.zIndex100] = zIndex === 100, _cx[styles.zIndex200] = zIndex === 200, _cx[styles.zIndex300] = zIndex === 300, _cx[styles.zIndex400] = zIndex === 400, _cx[styles.zIndex500] = zIndex === 500, _cx[styles.zIndex600] = zIndex === 600, _cx[styles.zIndex700] = zIndex === 700, _cx[styles.zIndex800] = zIndex === 800, _cx[styles.zIndex900] = zIndex === 900, _cx))];\n};\n\nexport default getZIndex;","/* eslint-disable no-sparse-arrays */\n\n/**\n * @param {*} value1\n * @param {*} value2\n *\n * @returns {*} one of the values\n */\nexport var combineStyle = function combineStyle(value1, value2) {\n if (value1 !== undefined || value2 !== undefined) {\n return value1 !== undefined ? value1 : value2;\n }\n\n return undefined;\n};\n/**\n * @param {*} flex\n * @param {*} flexGrow\n * @param {*} flexShrink\n * @param {*} flexBasis\n *\n * @returns {*} A normalized combination of the flex shorthand\n */\n\nexport var createFlexStyle = function createFlexStyle(flex, flexGrow, flexShrink, flexBasis) {\n if (flex) {\n return [, flex];\n }\n\n if (flexGrow !== undefined || flexShrink !== undefined || flexBasis !== undefined) {\n return [, (flexGrow !== undefined ? flexGrow : 0) + \" \" + (flexShrink !== undefined ? flexShrink : 1) + \" \" + (flexBasis !== undefined ? flexBasis : 'auto')];\n }\n\n return [undefined, undefined];\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\n\n/* eslint-disable no-sparse-arrays, import/max-dependencies */\nimport cx from 'classnames';\nimport getAlignSelf from '../getAlignSelf';\nimport getBorderRadius from '../getBorderRadius';\nimport getColor, { getTextColor } from '../getColor';\nimport getFontWeight from '../getFontWeight';\nimport getFontStyle from '../getFontStyle';\nimport getHeight, { getMaxHeight } from '../getHeight';\nimport getPosition from '../getPosition';\nimport getTextAlign from '../getTextAlign';\nimport getTextTransform from '../getTextTransform';\nimport getWidth, { getMaxWidth } from '../getWidth';\nimport { getTop, getLeft, getRight, getBottom } from '../getPositioning';\nimport getPadding from '../getPadding';\nimport getMargin from '../getMargin';\nimport getFloat from '../getFloat';\nimport { getAlignContent, getAlignItems, getFlexDirection, getFlexWrap, getJustifyContent } from '../getFlex';\nimport getDisplay from '../getDisplay';\nimport getFontFamily from '../getFontFamily';\nimport getDecoration from '../getDecoration';\nimport getZIndex from '../getZIndex';\nimport { removeEmptyKeys } from '../../utils';\nimport { combineStyle, createFlexStyle } from './utils';\n/**\n * @param {Object} props\n * @param props.alignSelf {import('../getAlignSelf').align}\n * @param props.alignContent {import('../getFlex').alignContent}\n * @param props.alignItems {import('../getFlex').alignItems}\n * @param props.flexDirection {import('../getFlex').alignItems}\n * @param props.flexWrap {import('../getFlex').flexWrap}\n * @param props.justifyContent {import('../getFlex').justifyContent}\n * @param {string} props.bgColor ,\n * @param {string} props.borderBottomColor,\n * @param {string} props.borderBottomStyle,\n * @param {string|number} props.borderBottomWidth,\n * @param {string} props.borderColor,\n * @param {string} props.borderLeftColor,\n * @param {string} props.borderLeftStyle,\n * @param {string|number} props.borderLeftWidth,\n * @param props.borderRadius {import('../getBorderRadius').radius}\n * @param {string} props.borderRightColor,\n * @param {string} props.borderRightStyle,\n * @param {string|number} props.borderRightWidth,\n * @param {string} props.borderStyle,\n * @param {string} props.borderTopColor,\n * @param {string} props.borderTopStyle,\n * @param {string|number} props.borderTopWidth,\n * @param {string|number} props.borderWidth,\n * @param props.bottom {import('../getPositioning').bottom}\n * @param {string} props.className\n * @param {string} props.color\n * @param props.decoration {import('../getDecoration').decoration}\n * @param props.display {import('../getDisplay').display}\n * @param {string|number} props.flex\n * @param {string|number} props.flexBasis\n * @param {string|number} props.flexGrow\n * @param {string|number} props.flexShrink\n * @param props.float {import('../getFloat').float}\n * @param props.fontWeight {import('../getFontWeight').fontWeight}\n * @param props.fontFamily {import('../getFontFamily').fontFamily}\n * @param props.getFontStyle {import('../getFontStyle').fontStyle}\n * @param props.height {import('../getHeight').height}\n * @param props.maxHeight {import('../getHeight').maxHeight}\n * @param props.left {import('../getPositioning').left}\n * @param props.m {import('../getMargin').m}\n * @param props.mb {import('../getMargin').mb}\n * @param props.ml {import('../getMargin').ml}\n * @param props.mr {import('../getMargin').mr}\n * @param props.mt {import('../getMargin').mt}\n * @param props.mx {import('../getMargin').mx}\n * @param props.my {import('../getMargin').my}\n * @param {number} props.order\n * @param props.p {import('../getPadding').p}\n * @param props.pb {import('../getPadding').pb}\n * @param props.pl {import('../getPadding').pl}\n * @param props.position {import('../getPosition').position}\n * @param props.pr {import('../getPadding').pr}\n * @param props.pt {import('../getPadding').pt}\n * @param props.px {import('../getPadding').px}\n * @param props.py {import('../getPadding').py}\n * @param props.right {import('../getPositioning').right}\n * @param {object} props.style\n * @param props.textAlign {import('../getTextAlign').textAlign}\n * @param props.textTransform {import('../getTextTransform').textTransform}\n * @param props.top {import('../getPositioning').top}\n * @param props.width {import('../getWidth').width}\n * @param props.maxWidth {import('../getWidth').maxWidth}\n * @param props.zIndex {import('../getZIndex').zIndex}\n */\n\nvar getSystem = function getSystem(_ref) {\n var alignContent = _ref.alignContent,\n alignItems = _ref.alignItems,\n alignSelf = _ref.alignSelf,\n bgColor = _ref.bgColor,\n borderBottomColor = _ref.borderBottomColor,\n borderBottomStyle = _ref.borderBottomStyle,\n borderBottomWidth = _ref.borderBottomWidth,\n borderColor = _ref.borderColor,\n borderLeftColor = _ref.borderLeftColor,\n borderLeftStyle = _ref.borderLeftStyle,\n borderLeftWidth = _ref.borderLeftWidth,\n borderRadius = _ref.borderRadius,\n borderRightColor = _ref.borderRightColor,\n borderRightStyle = _ref.borderRightStyle,\n borderRightWidth = _ref.borderRightWidth,\n borderStyle = _ref.borderStyle,\n borderTopColor = _ref.borderTopColor,\n borderTopStyle = _ref.borderTopStyle,\n borderTopWidth = _ref.borderTopWidth,\n borderWidth = _ref.borderWidth,\n bottom = _ref.bottom,\n className = _ref.className,\n color = _ref.color,\n decoration = _ref.decoration,\n display = _ref.display,\n flex = _ref.flex,\n flexBasis = _ref.flexBasis,\n flexDirection = _ref.flexDirection,\n flexGrow = _ref.flexGrow,\n flexShrink = _ref.flexShrink,\n flexWrap = _ref.flexWrap,\n float = _ref.float,\n fontFamily = _ref.fontFamily,\n fontStyle = _ref.fontStyle,\n fontWeight = _ref.fontWeight,\n height = _ref.height,\n justifyContent = _ref.justifyContent,\n left = _ref.left,\n m = _ref.m,\n maxHeight = _ref.maxHeight,\n maxWidth = _ref.maxWidth,\n mb = _ref.mb,\n ml = _ref.ml,\n mr = _ref.mr,\n mt = _ref.mt,\n mx = _ref.mx,\n my = _ref.my,\n order = _ref.order,\n p = _ref.p,\n pb = _ref.pb,\n pl = _ref.pl,\n position = _ref.position,\n pr = _ref.pr,\n pt = _ref.pt,\n px = _ref.px,\n py = _ref.py,\n right = _ref.right,\n style = _ref.style,\n textAlign = _ref.textAlign,\n textTransform = _ref.textTransform,\n top = _ref.top,\n width = _ref.width,\n zIndex = _ref.zIndex;\n\n // getAlignSelf\n var _getAlignSelf = getAlignSelf(alignSelf),\n alignSelfClassName = _getAlignSelf[0]; // getBorderRadius\n\n\n var _getBorderRadius = getBorderRadius(borderRadius),\n borderRadiusClassName = _getBorderRadius[0]; // getColor\n\n\n var _getColor = getColor(bgColor),\n backgroundColorStyle = _getColor[1];\n\n var _ref2 = color ? getColor(color) : getTextColor(bgColor),\n colorStyle = _ref2[1];\n\n var _getColor2 = getColor(borderColor),\n borderColorStyle = _getColor2[1];\n\n var _getColor3 = getColor(borderTopColor),\n borderColorTopStyle = _getColor3[1];\n\n var _getColor4 = getColor(borderLeftColor),\n borderColorLeftStyle = _getColor4[1];\n\n var _getColor5 = getColor(borderRightColor),\n borderColorRightStyle = _getColor5[1];\n\n var _getColor6 = getColor(borderBottomColor),\n borderColorBottomStyle = _getColor6[1]; // getDecoration\n\n\n var _getDecoration = getDecoration(decoration),\n decorationClassName = _getDecoration[0]; // getDisplay\n\n\n var _getDisplay = getDisplay(display),\n displayClassName = _getDisplay[0]; // getFloat\n\n\n var _getFloat = getFloat(float),\n floatClassName = _getFloat[0]; // getFontFamily\n\n\n var _getFontFamily = getFontFamily(fontFamily),\n fontFamilyClassName = _getFontFamily[0]; // getFontStyle\n\n\n var _getFontStyle = getFontStyle(fontStyle),\n fontStyleClassName = _getFontStyle[0]; // getFontWeight\n\n\n var _getFontWeight = getFontWeight(fontWeight),\n fontWeightClassName = _getFontWeight[0]; // getHeight\n\n\n var _getHeight = getHeight(height),\n heightClassName = _getHeight[0],\n heightStyle = _getHeight[1]; // getMaxHeight\n\n\n var _getMaxHeight = getMaxHeight(maxHeight),\n maxHeightClassName = _getMaxHeight[0],\n maxHeightStyle = _getMaxHeight[1]; // getFlex\n\n\n var _getAlignContent = getAlignContent(alignContent),\n alignContentClassName = _getAlignContent[0];\n\n var _getAlignItems = getAlignItems(alignItems),\n alignItemsClassName = _getAlignItems[0];\n\n var _getFlexDirection = getFlexDirection(flexDirection),\n flexDirectionClassName = _getFlexDirection[0];\n\n var _getFlexWrap = getFlexWrap(flexWrap),\n flexWrapClassName = _getFlexWrap[0];\n\n var _getJustifyContent = getJustifyContent(justifyContent),\n justifyContentClassName = _getJustifyContent[0]; // getIcon - not implemented in system\n // getMargin\n\n\n var _getMargin = getMargin(m, mb, ml, mr, mt, mx, my),\n marginClassName = _getMargin[0]; // getPadding\n\n\n var _getPadding = getPadding(p, pb, pl, pr, pt, px, py),\n paddingClassName = _getPadding[0]; // getPosition\n\n\n var _getPosition = getPosition(position),\n positionClassName = _getPosition[0]; // getPositioning\n\n\n var _getTop = getTop(top),\n topClassName = _getTop[0];\n\n var _getBottom = getBottom(bottom),\n bottomClassName = _getBottom[0];\n\n var _getLeft = getLeft(left),\n leftClassName = _getLeft[0];\n\n var _getRight = getRight(right),\n rightClassName = _getRight[0]; // getTextAlign\n\n\n var _getTextAlign = getTextAlign(textAlign),\n textAlignClassName = _getTextAlign[0]; // getTextAlign\n\n\n var _getTextTransform = getTextTransform(textTransform),\n textTransformClassName = _getTextTransform[0]; // getWidth\n\n\n var _getWidth = getWidth(width),\n widthClassName = _getWidth[0],\n widthStyle = _getWidth[1]; // getMaxWidth\n\n\n var _getMaxWidth = getMaxWidth(maxWidth),\n maxWidthClassName = _getMaxWidth[0],\n maxWidthStyle = _getMaxWidth[1]; // not from system\n\n\n var _createFlexStyle = createFlexStyle(flex, flexGrow, flexShrink, flexBasis),\n flexStyle = _createFlexStyle[1]; // getZIndex\n\n\n var _getZIndex = getZIndex(zIndex),\n zIndexClassName = _getZIndex[0];\n\n var classNames = cx(alignContentClassName, alignItemsClassName, alignSelfClassName, borderRadiusClassName, bottomClassName, decorationClassName, displayClassName, flexDirectionClassName, flexWrapClassName, floatClassName, fontFamilyClassName, fontStyleClassName, fontWeightClassName, heightClassName, justifyContentClassName, leftClassName, marginClassName, maxHeightClassName, maxWidthClassName, paddingClassName, positionClassName, rightClassName, textAlignClassName, textTransformClassName, topClassName, widthClassName, zIndexClassName, className // keep className as last\n ) || undefined;\n return [classNames, removeEmptyKeys(_extends({\n backgroundColor: backgroundColorStyle,\n borderLeftColor: combineStyle(borderColorLeftStyle, borderColorStyle),\n borderRightColor: combineStyle(borderColorRightStyle, borderColorStyle),\n borderTopColor: combineStyle(borderColorTopStyle, borderColorStyle),\n borderBottomColor: combineStyle(borderColorBottomStyle, borderColorStyle),\n borderTopStyle: combineStyle(borderTopStyle, borderStyle),\n borderRightStyle: combineStyle(borderRightStyle, borderStyle),\n borderBottomStyle: combineStyle(borderBottomStyle, borderStyle),\n borderLeftStyle: combineStyle(borderLeftStyle, borderStyle),\n borderTopWidth: combineStyle(borderTopWidth, borderWidth),\n borderRightWidth: combineStyle(borderRightWidth, borderWidth),\n borderBottomWidth: combineStyle(borderBottomWidth, borderWidth),\n borderLeftWidth: combineStyle(borderLeftWidth, borderWidth),\n color: colorStyle,\n flex: flexStyle,\n height: heightStyle,\n maxHeight: maxHeightStyle,\n order: order,\n width: widthStyle,\n maxWidth: maxWidthStyle\n }, style))];\n};\n\nexport default getSystem;","export var aliases = {\n backgroundProps: ['bgColor'],\n borderProps: ['borderBottomColor', 'borderBottomStyle', 'borderBottomWidth', 'borderColor', 'borderLeftColor', 'borderLeftStyle', 'borderLeftWidth', 'borderRightColor', 'borderRightStyle', 'borderRightWidth', 'borderStyle', 'borderTopColor', 'borderTopStyle', 'borderTopWidth', 'borderWidth'],\n borderRadiusProps: ['borderRadius'],\n colorProps: ['color'],\n flexProps: ['alignSelf', 'flex', 'flexBasis', 'flexGrow', 'flexShrink', 'order'],\n flexParentProps: ['alignContent', 'alignItems', 'flexDirection', 'flexWrap', 'justifyContent'],\n heightProps: ['height', 'maxHeight'],\n marginProps: ['m', 'mb', 'ml', 'mr', 'mt', 'mx', 'my'],\n paddingProps: ['p', 'pb', 'pl', 'pr', 'pt', 'px', 'py'],\n positioningProps: ['position', 'bottom', 'left', 'right', 'top', 'zIndex'],\n textProps: ['fontWeight', 'fontStyle', 'textAlign', 'fontFamily', 'decoration', 'textTransform'],\n widthProps: ['width', 'maxWidth'],\n floatProps: ['float'],\n displayProps: ['display']\n};","import { removeEmptyKeys } from '../utils';\nimport { aliases } from './config';\n/**\n * @returns - [flattenAliases]\n *\n * @example\n * const flattenAliases = flattenAliasProps();\n */\n\nexport var flattenAliasProps = function flattenAliasProps() {\n var aliasProps = [];\n Object.keys(aliases).forEach(function (alias) {\n aliasProps = [].concat(aliases[alias], aliasProps);\n });\n return aliasProps;\n};\n/**\n * @param {string[]} atomArray\n *\n * @returns - [atomStrings]\n *\n * @example\n * const ['m', 'mb', 'mt', 'ml', 'mr', 'my', 'mx' , 'p'] = extendAtomProps(['marginProps', 'p']);\n */\n\nexport var extendAtomProps = function extendAtomProps(atomArray) {\n var atoms = [];\n var cleanAtoms = atomArray.filter(function (item) {\n return !item.includes('Props');\n }); // Remove aliases from default props\n\n Object.keys(aliases).forEach(function (aliasKey) {\n if (atomArray.includes(\"\" + aliasKey)) {\n atoms = [].concat(aliases[aliasKey], atoms);\n }\n });\n return [].concat(cleanAtoms, atoms);\n};\n/**\n * @param {Object} props\n * @param {string[]} allowedProps\n *\n * @returns - {}\n *\n * @example\n * const { m: 3 } = filterAllowedAtoms({ m: 3, float: 'left' }, [m', 'mb', 'mt', 'ml', 'mr', 'my', 'mx' , 'p']]);\n */\n\nexport var filterAllowedAtoms = function filterAllowedAtoms(props, allowedProps) {\n return Object.keys(props).filter(function (key) {\n return allowedProps.includes(key);\n }).reduce(function (obj, key) {\n obj[key] = props[key];\n return obj;\n }, {});\n};\n/**\n * @param {Object} props\n *\n * @returns - {cleanProps}\n *\n * @example\n * const { name: 'Jef' } = filterAllowedAtoms({m: 3, name: 'Jef'});\n */\n\nexport var removeAtomsFromProps = function removeAtomsFromProps(props) {\n var aliasProps = flattenAliasProps();\n return removeEmptyKeys(Object.keys(props).filter(function (key) {\n return !aliasProps.includes(key);\n }).reduce(function (obj, key) {\n obj[key] = props[key];\n return obj;\n }, {}));\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"style\"];\nimport getSystem from './getSystem';\nimport { extendAtomProps, removeAtomsFromProps, filterAllowedAtoms } from './utils';\n/**\n * @param {Object} props\n * @param {Array} allowed\n *\n * @returns - [className, style, restProps]\n *\n * @example\n * const [className, style, rest] = system({ m: 3, p: 2 }, ['marginProps']); // Will only return margin3 as className\n */\n\nvar system = function system(props, allowed) {\n var allowedAtoms = extendAtomProps(allowed);\n var atomProps = filterAllowedAtoms(props, allowedAtoms);\n\n var _removeAtomsFromProps = removeAtomsFromProps(props, allowedAtoms),\n className = _removeAtomsFromProps.className,\n style = _removeAtomsFromProps.style,\n rest = _objectWithoutPropertiesLoose(_removeAtomsFromProps, _excluded);\n\n var _getSystem = getSystem(_extends({}, atomProps, {\n className: className,\n style: style\n })),\n systemClassName = _getSystem[0],\n systemStyle = _getSystem[1];\n\n return [systemClassName, systemStyle, rest];\n};\n\nexport default system;","export default {\n activeVersion: 'v2',\n baseUrl: 'https://shared.mediahuis.be/logos/ds/',\n alt: 'De Standaard',\n v1: {\n main: {\n 'brand-main': {\n png: 'brand-main.png',\n svg: 'brand-main.svg',\n },\n 'brand-square-main': {\n png: 'brand-square-main.png',\n svg: 'brand-square-main.svg',\n },\n 'brand-plus-main': {\n png: 'brand-plus-main.png',\n svg: 'brand-plus-main.svg',\n alt: 'Plus Artikel',\n },\n },\n variations: {\n 'brand-square-icon': {\n png: 'brand-square-icon.png',\n svg: 'brand-square-icon.svg',\n },\n 'brand-icon-name-nested': {\n png: 'brand-icon-name-nested.png',\n svg: 'brand-icon-name-nested.svg',\n },\n 'brand-icon-name-nested-white': {\n png: 'brand-icon-name-nested-white.png',\n svg: 'brand-icon-name-nested-white.svg',\n },\n 'brand-plus': {\n png: 'brand-plus.png',\n svg: 'brand-plus.svg',\n alt: 'Plus artikel',\n },\n },\n subscriptions: {\n 'abo-digitaal': {\n png: 'abo-digitaal.png',\n svg: 'abo-digitaal.svg',\n alt: 'Abonnement Digitaal',\n },\n 'abo-slim': {\n png: 'abo-slim.png',\n svg: 'abo-slim.svg',\n alt: 'Abonnement Slim',\n },\n 'abo-snel': {\n png: 'abo-snel.png',\n svg: 'abo-snel.svg',\n alt: 'Abonnement Snel',\n },\n 'abo-super': {\n png: 'abo-super.png',\n svg: 'abo-super.svg',\n alt: 'Abonnement Super',\n },\n },\n audio: {\n Audio: {\n png: 'audio.png',\n svg: 'audio.svg',\n alt: 'Audio',\n },\n },\n },\n v2: {\n main: {\n 'brand-main': {\n png: 'brand-main.png',\n svg: 'brand-main.svg',\n },\n 'brand-square-main': {\n png: 'brand-square-main.png',\n svg: 'brand-square-main.svg',\n },\n 'brand-plus-main': {\n png: 'brand-plus-main.png',\n svg: 'brand-plus-main.svg',\n },\n },\n variations: {\n 'brand-square-icon': {\n png: 'brand-square-icon.png',\n svg: 'brand-square-icon.svg',\n },\n 'brand-square-icon-white': {\n png: 'brand-square-icon-white.png',\n svg: 'brand-square-icon-white.svg',\n },\n 'brand-plus': {\n png: 'brand-plus.png',\n svg: 'brand-plus.svg',\n alt: 'Plus artikel',\n },\n },\n subscriptions: {\n 'abo-digitaal': {\n png: 'abo-digitaal.png',\n svg: 'abo-digitaal.svg',\n alt: 'Abonnement Digitaal',\n },\n 'abo-slim': {\n png: 'abo-slim.png',\n svg: 'abo-slim.svg',\n alt: 'Abonnement Slim',\n },\n 'abo-snel': {\n png: 'abo-snel.png',\n svg: 'abo-snel.svg',\n alt: 'Abonnement Snel',\n },\n 'abo-super': {\n png: 'abo-super.png',\n svg: 'abo-super.svg',\n alt: 'Abonnement Super',\n },\n },\n audio: {\n Audio: {\n png: 'audio.png',\n svg: 'audio.svg',\n alt: 'Audio',\n },\n },\n },\n};\n","import { useCallbackRef } from './useRef';\nimport { assignRef } from './assignRef';\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, function (newValue) {\n return refs.forEach(function (ref) { return assignRef(ref, newValue); });\n });\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","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction Brand(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M20.933 6.132l-.56.855c-.38-.345-1.25-.987-2.701-.987-1.678 0-3.684 1.036-3.684 3.125s1.383 2.896 2.73 3.389l1.053.378c1.086.394 2.171.838 2.171 2.204 0 1.152-.887 1.794-2.023 1.794h-.115c-1.003 0-2.122-.74-2.698-2.056l-.443-.97h-.808v3.996h.692l.625-.987c.477.51 1.447 1.119 2.814 1.119 2.187 0 4.014-1.284 4.014-3.422 0-2.122-1.267-2.863-2.945-3.472l-1.07-.394a44.36 44.36 0 00-.145-.053c-1.03-.371-1.976-.712-1.976-1.97 0-1.135.955-1.595 1.876-1.595h.132c1.25 0 2.074.821 2.634 2.074l.427.97h.642V6.132h-.642zm-8.407 5.61c0 4.243-2.978 6.12-5.839 6.12H2v-.838c.89-.066 1.218-.444 1.218-1.81V8.65c0-1.366-.328-1.562-1.218-1.612v-.904h4.687c2.927-.002 5.84 1.478 5.84 5.608zm-2.32.64v-.904c0-3.028-1.826-4.36-3.717-4.36H5.337v9.739H6.49c1.957 0 3.717-1.58 3.717-4.475z\",\n clipRule: \"evenodd\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(Brand);\nexport default ForwardRef;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction ArrowDown(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M6.998 13.32a.75.75 0 011.06.06l3.192 3.55V4.75a.75.75 0 011.5 0v12.18l3.193-3.55a.75.75 0 011.059-.06.751.751 0 01.056 1.06L12 20l-5.057-5.62a.751.751 0 01.055-1.06z\",\n clipRule: \"evenodd\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(ArrowDown);\nexport default ForwardRef;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction ArrowUp(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M6.998 10.68a.75.75 0 001.06-.06l3.192-3.55v12.18a.75.75 0 001.5 0V7.07l3.193 3.55a.75.75 0 001.059.06.751.751 0 00.056-1.06L12 4 6.943 9.62a.751.751 0 00.055 1.06z\",\n clipRule: \"evenodd\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(ArrowUp);\nexport default ForwardRef;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction Bullet(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 15a3 3 0 100-6 3 3 0 000 6z\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(Bullet);\nexport default ForwardRef;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction Calendar(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M5 4.5v1H3.5A.5.5 0 003 6v13.5a.5.5 0 00.5.5h17a.5.5 0 00.5-.5V6a.5.5 0 00-.5-.5H19v-1h1.5A1.5 1.5 0 0122 6v13.5a1.5 1.5 0 01-1.5 1.5h-17A1.5 1.5 0 012 19.5V6a1.5 1.5 0 011.5-1.5H5zM7 16v1H6v-1h1zm5.5 0v1h-1v-1h1zm5.5 0v1h-1v-1h1zM7 13v1H6v-1h1zm5.5 0v1h-1v-1h1zm5.5 0v1h-1v-1h1zM7 10v1H6v-1h1zm5.5 0v1h-1v-1h1zm5.5 0v1h-1v-1h1zM6.5 3a.5.5 0 01.5.5v3a.5.5 0 01-1 0v-3a.5.5 0 01.5-.5zm11 0a.5.5 0 01.5.5v3a.5.5 0 01-1 0v-3a.5.5 0 01.5-.5zM16 4.5v1H8v-1h8z\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(Calendar);\nexport default ForwardRef;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction Checkmark(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M20.53 6.47a.75.75 0 010 1.06L10.046 18.015 3.52 12.576a.75.75 0 01.96-1.152l5.474 4.561L19.47 6.47a.75.75 0 011.06 0z\",\n clipRule: \"evenodd\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(Checkmark);\nexport default ForwardRef;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction ChevronDown(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M19.03 8.47a.75.75 0 010 1.06L12 16.56 4.97 9.53a.75.75 0 011.06-1.06L12 14.44l5.97-5.97a.75.75 0 011.06 0z\",\n clipRule: \"evenodd\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(ChevronDown);\nexport default ForwardRef;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction ChevronForward(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M8.47 4.97a.75.75 0 011.06 0L16.56 12l-7.03 7.03a.75.75 0 01-1.06-1.06L14.44 12 8.47 6.03a.75.75 0 010-1.06z\",\n clipRule: \"evenodd\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(ChevronForward);\nexport default ForwardRef;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction Close(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n fillRule: \"evenodd\",\n d: \"M5.47 5.47a.75.75 0 011.06 0L12 10.94l5.47-5.47a.75.75 0 111.06 1.06L13.06 12l5.47 5.47a.75.75 0 11-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 01-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 010-1.06z\",\n clipRule: \"evenodd\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(Close);\nexport default ForwardRef;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction Error(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 1a9 9 0 100 18 9 9 0 000-18zm0 13a.5.5 0 110 1 .5.5 0 010-1zm0-9a.5.5 0 01.5.5v6a.5.5 0 01-1 0v-6A.5.5 0 0112 7z\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(Error);\nexport default ForwardRef;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction Info(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M12 2c5.523 0 10 4.477 10 10s-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2zm0 1a9 9 0 100 18 9 9 0 000-18zm0 7a.5.5 0 01.5.5v6a.5.5 0 01-1 0v-6a.5.5 0 01.5-.5zm0-3a.5.5 0 110 1 .5.5 0 010-1z\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(Info);\nexport default ForwardRef;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction Placeholder(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M3 18v3h3v1H3a1 1 0 01-1-1v-3h1zm19 0v3a1 1 0 01-1 1h-3v-1h3v-3h1zm-11 3v1H8v-1h3zm5 0v1h-3v-1h3zM3 13v3H2v-3h1zm19 0v3h-1v-3h1zM3 8v3H2V8h1zm19 0v3h-1V8h1zM6 2v1H3v3H2V3a1 1 0 011-1h3zm15 0a1 1 0 01.993.883L22 3v3h-1V3h-3V2h3zM11 2v1H8V2h3zm5 0v1h-3V2h3z\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(Placeholder);\nexport default ForwardRef;","function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }\n\nimport * as React from \"react\";\n\nfunction Search(props, svgRef) {\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n viewBox: \"0 0 24 24\",\n ref: svgRef\n }, props), /*#__PURE__*/React.createElement(\"path\", {\n d: \"M15.657 4.343A8 8 0 114.343 15.657 8 8 0 0115.657 4.343zm-.707.707a7 7 0 10-9.9 9.9 7 7 0 009.9-9.9zm6.9 16.1a.491.491 0 010 .7.491.491 0 01-.7 0l-5.847-5.84.707-.707 5.84 5.847z\"\n }));\n}\n\nvar ForwardRef = /*#__PURE__*/React.forwardRef(Search);\nexport default ForwardRef;","/*\nobject-assign\n(c) Sindre Sorhus\n@license MIT\n*/\n\n'use strict';\n/* eslint-disable no-unused-vars */\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar hasOwnProperty = Object.prototype.hasOwnProperty;\nvar propIsEnumerable = Object.prototype.propertyIsEnumerable;\n\nfunction toObject(val) {\n\tif (val === null || val === undefined) {\n\t\tthrow new TypeError('Object.assign cannot be called with null or undefined');\n\t}\n\n\treturn Object(val);\n}\n\nfunction shouldUseNative() {\n\ttry {\n\t\tif (!Object.assign) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Detect buggy property enumeration order in older V8 versions.\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=4118\n\t\tvar test1 = new String('abc'); // eslint-disable-line no-new-wrappers\n\t\ttest1[5] = 'de';\n\t\tif (Object.getOwnPropertyNames(test1)[0] === '5') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test2 = {};\n\t\tfor (var i = 0; i < 10; i++) {\n\t\t\ttest2['_' + String.fromCharCode(i)] = i;\n\t\t}\n\t\tvar order2 = Object.getOwnPropertyNames(test2).map(function (n) {\n\t\t\treturn test2[n];\n\t\t});\n\t\tif (order2.join('') !== '0123456789') {\n\t\t\treturn false;\n\t\t}\n\n\t\t// https://bugs.chromium.org/p/v8/issues/detail?id=3056\n\t\tvar test3 = {};\n\t\t'abcdefghijklmnopqrst'.split('').forEach(function (letter) {\n\t\t\ttest3[letter] = letter;\n\t\t});\n\t\tif (Object.keys(Object.assign({}, test3)).join('') !==\n\t\t\t\t'abcdefghijklmnopqrst') {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t} catch (err) {\n\t\t// We don't expect any of the above to throw, but better to be safe.\n\t\treturn false;\n\t}\n}\n\nmodule.exports = shouldUseNative() ? Object.assign : function (target, source) {\n\tvar from;\n\tvar to = toObject(target);\n\tvar symbols;\n\n\tfor (var s = 1; s < arguments.length; s++) {\n\t\tfrom = Object(arguments[s]);\n\n\t\tfor (var key in from) {\n\t\t\tif (hasOwnProperty.call(from, key)) {\n\t\t\t\tto[key] = from[key];\n\t\t\t}\n\t\t}\n\n\t\tif (getOwnPropertySymbols) {\n\t\t\tsymbols = getOwnPropertySymbols(from);\n\t\t\tfor (var i = 0; i < symbols.length; i++) {\n\t\t\t\tif (propIsEnumerable.call(from, symbols[i])) {\n\t\t\t\t\tto[symbols[i]] = from[symbols[i]];\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\treturn to;\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 ReactIs = require('react-is');\nvar assign = require('object-assign');\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\nvar checkPropTypes = require('./checkPropTypes');\n\nvar has = Function.call.bind(Object.prototype.hasOwnProperty);\nvar printWarning = function() {};\n\nif (process.env.NODE_ENV !== 'production') {\n printWarning = function(text) {\n var message = 'Warning: ' + text;\n if (typeof console !== 'undefined') {\n console.error(message);\n }\n try {\n // --- Welcome to debugging React ---\n // This error was thrown as a convenience so that you can use this stack\n // to find the callsite that caused this warning to fire.\n throw new Error(message);\n } catch (x) {}\n };\n}\n\nfunction emptyFunctionThatReturnsNull() {\n return null;\n}\n\nmodule.exports = function(isValidElement, throwOnDirectAccess) {\n /* global Symbol */\n var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;\n var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.\n\n /**\n * Returns the iterator method function contained on the iterable object.\n *\n * Be sure to invoke the function with the iterable as context:\n *\n * var iteratorFn = getIteratorFn(myIterable);\n * if (iteratorFn) {\n * var iterator = iteratorFn.call(myIterable);\n * ...\n * }\n *\n * @param {?object} maybeIterable\n * @return {?function}\n */\n function getIteratorFn(maybeIterable) {\n var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);\n if (typeof iteratorFn === 'function') {\n return iteratorFn;\n }\n }\n\n /**\n * Collection of methods that allow declaration and validation of props that are\n * supplied to React components. Example usage:\n *\n * var Props = require('ReactPropTypes');\n * var MyArticle = React.createClass({\n * propTypes: {\n * // An optional string prop named \"description\".\n * description: Props.string,\n *\n * // A required enum prop named \"category\".\n * category: Props.oneOf(['News','Photos']).isRequired,\n *\n * // A prop named \"dialog\" that requires an instance of Dialog.\n * dialog: Props.instanceOf(Dialog).isRequired\n * },\n * render: function() { ... }\n * });\n *\n * A more formal specification of how these methods are used:\n *\n * type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)\n * decl := ReactPropTypes.{type}(.isRequired)?\n *\n * Each and every declaration produces a function with the same signature. This\n * allows the creation of custom validation functions. For example:\n *\n * var MyLink = React.createClass({\n * propTypes: {\n * // An optional string or URI prop named \"href\".\n * href: function(props, propName, componentName) {\n * var propValue = props[propName];\n * if (propValue != null && typeof propValue !== 'string' &&\n * !(propValue instanceof URI)) {\n * return new Error(\n * 'Expected a string or an URI for ' + propName + ' in ' +\n * componentName\n * );\n * }\n * }\n * },\n * render: function() {...}\n * });\n *\n * @internal\n */\n\n var ANONYMOUS = '<>';\n\n // Important!\n // Keep this list in sync with production version in `./factoryWithThrowingShims.js`.\n var ReactPropTypes = {\n array: createPrimitiveTypeChecker('array'),\n bool: createPrimitiveTypeChecker('boolean'),\n func: createPrimitiveTypeChecker('function'),\n number: createPrimitiveTypeChecker('number'),\n object: createPrimitiveTypeChecker('object'),\n string: createPrimitiveTypeChecker('string'),\n symbol: createPrimitiveTypeChecker('symbol'),\n\n any: createAnyTypeChecker(),\n arrayOf: createArrayOfTypeChecker,\n element: createElementTypeChecker(),\n elementType: createElementTypeTypeChecker(),\n instanceOf: createInstanceTypeChecker,\n node: createNodeChecker(),\n objectOf: createObjectOfTypeChecker,\n oneOf: createEnumTypeChecker,\n oneOfType: createUnionTypeChecker,\n shape: createShapeTypeChecker,\n exact: createStrictShapeTypeChecker,\n };\n\n /**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\n /*eslint-disable no-self-compare*/\n function is(x, y) {\n // SameValue algorithm\n if (x === y) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return x !== 0 || 1 / x === 1 / y;\n } else {\n // Step 6.a: NaN == NaN\n return x !== x && y !== y;\n }\n }\n /*eslint-enable no-self-compare*/\n\n /**\n * We use an Error-like object for backward compatibility as people may call\n * PropTypes directly and inspect their output. However, we don't use real\n * Errors anymore. We don't inspect their stack anyway, and creating them\n * is prohibitively expensive if they are created too often, such as what\n * happens in oneOfType() for any type before the one that matched.\n */\n function PropTypeError(message) {\n this.message = message;\n this.stack = '';\n }\n // Make `instanceof Error` still work for returned errors.\n PropTypeError.prototype = Error.prototype;\n\n function createChainableTypeChecker(validate) {\n if (process.env.NODE_ENV !== 'production') {\n var manualPropTypeCallCache = {};\n var manualPropTypeWarningCount = 0;\n }\n function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {\n componentName = componentName || ANONYMOUS;\n propFullName = propFullName || propName;\n\n if (secret !== ReactPropTypesSecret) {\n if (throwOnDirectAccess) {\n // New behavior only for users of `prop-types` package\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 } else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {\n // Old behavior for people using React.PropTypes\n var cacheKey = componentName + ':' + propName;\n if (\n !manualPropTypeCallCache[cacheKey] &&\n // Avoid spamming the console because they are often not actionable except for lib authors\n manualPropTypeWarningCount < 3\n ) {\n printWarning(\n 'You are manually calling a React.PropTypes validation ' +\n 'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +\n 'and will throw in the standalone `prop-types` package. ' +\n 'You may be seeing this warning due to a third-party PropTypes ' +\n 'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'\n );\n manualPropTypeCallCache[cacheKey] = true;\n manualPropTypeWarningCount++;\n }\n }\n }\n if (props[propName] == null) {\n if (isRequired) {\n if (props[propName] === null) {\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));\n }\n return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));\n }\n return null;\n } else {\n return validate(props, propName, componentName, location, propFullName);\n }\n }\n\n var chainedCheckType = checkType.bind(null, false);\n chainedCheckType.isRequired = checkType.bind(null, true);\n\n return chainedCheckType;\n }\n\n function createPrimitiveTypeChecker(expectedType) {\n function validate(props, propName, componentName, location, propFullName, secret) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== expectedType) {\n // `propValue` being instance of, say, date/regexp, pass the 'object'\n // check, but we can offer a more precise error message here rather than\n // 'of type `object`'.\n var preciseType = getPreciseType(propValue);\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createAnyTypeChecker() {\n return createChainableTypeChecker(emptyFunctionThatReturnsNull);\n }\n\n function createArrayOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');\n }\n var propValue = props[propName];\n if (!Array.isArray(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));\n }\n for (var i = 0; i < propValue.length; i++) {\n var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!isValidElement(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createElementTypeTypeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n if (!ReactIs.isValidElementType(propValue)) {\n var propType = getPropType(propValue);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createInstanceTypeChecker(expectedClass) {\n function validate(props, propName, componentName, location, propFullName) {\n if (!(props[propName] instanceof expectedClass)) {\n var expectedClassName = expectedClass.name || ANONYMOUS;\n var actualClassName = getClassName(props[propName]);\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createEnumTypeChecker(expectedValues) {\n if (!Array.isArray(expectedValues)) {\n if (process.env.NODE_ENV !== 'production') {\n if (arguments.length > 1) {\n printWarning(\n 'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +\n 'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'\n );\n } else {\n printWarning('Invalid argument supplied to oneOf, expected an array.');\n }\n }\n return emptyFunctionThatReturnsNull;\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n for (var i = 0; i < expectedValues.length; i++) {\n if (is(propValue, expectedValues[i])) {\n return null;\n }\n }\n\n var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {\n var type = getPreciseType(value);\n if (type === 'symbol') {\n return String(value);\n }\n return value;\n });\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createObjectOfTypeChecker(typeChecker) {\n function validate(props, propName, componentName, location, propFullName) {\n if (typeof typeChecker !== 'function') {\n return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');\n }\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));\n }\n for (var key in propValue) {\n if (has(propValue, key)) {\n var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error instanceof Error) {\n return error;\n }\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createUnionTypeChecker(arrayOfTypeCheckers) {\n if (!Array.isArray(arrayOfTypeCheckers)) {\n process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;\n return emptyFunctionThatReturnsNull;\n }\n\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (typeof checker !== 'function') {\n printWarning(\n 'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +\n 'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'\n );\n return emptyFunctionThatReturnsNull;\n }\n }\n\n function validate(props, propName, componentName, location, propFullName) {\n for (var i = 0; i < arrayOfTypeCheckers.length; i++) {\n var checker = arrayOfTypeCheckers[i];\n if (checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret) == null) {\n return null;\n }\n }\n\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`.'));\n }\n return createChainableTypeChecker(validate);\n }\n\n function createNodeChecker() {\n function validate(props, propName, componentName, location, propFullName) {\n if (!isNode(props[propName])) {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n for (var key in shapeTypes) {\n var checker = shapeTypes[key];\n if (!checker) {\n continue;\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n return createChainableTypeChecker(validate);\n }\n\n function createStrictShapeTypeChecker(shapeTypes) {\n function validate(props, propName, componentName, location, propFullName) {\n var propValue = props[propName];\n var propType = getPropType(propValue);\n if (propType !== 'object') {\n return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));\n }\n // We need to check all keys in case some are required but missing from\n // props.\n var allKeys = assign({}, props[propName], shapeTypes);\n for (var key in allKeys) {\n var checker = shapeTypes[key];\n if (!checker) {\n return new PropTypeError(\n 'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +\n '\\nBad object: ' + JSON.stringify(props[propName], null, ' ') +\n '\\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')\n );\n }\n var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret);\n if (error) {\n return error;\n }\n }\n return null;\n }\n\n return createChainableTypeChecker(validate);\n }\n\n function isNode(propValue) {\n switch (typeof propValue) {\n case 'number':\n case 'string':\n case 'undefined':\n return true;\n case 'boolean':\n return !propValue;\n case 'object':\n if (Array.isArray(propValue)) {\n return propValue.every(isNode);\n }\n if (propValue === null || isValidElement(propValue)) {\n return true;\n }\n\n var iteratorFn = getIteratorFn(propValue);\n if (iteratorFn) {\n var iterator = iteratorFn.call(propValue);\n var step;\n if (iteratorFn !== propValue.entries) {\n while (!(step = iterator.next()).done) {\n if (!isNode(step.value)) {\n return false;\n }\n }\n } else {\n // Iterator will provide entry [k,v] tuples rather than values.\n while (!(step = iterator.next()).done) {\n var entry = step.value;\n if (entry) {\n if (!isNode(entry[1])) {\n return false;\n }\n }\n }\n }\n } else {\n return false;\n }\n\n return true;\n default:\n return false;\n }\n }\n\n function isSymbol(propType, propValue) {\n // Native Symbol.\n if (propType === 'symbol') {\n return true;\n }\n\n // falsy value can't be a Symbol\n if (!propValue) {\n return false;\n }\n\n // 19.4.3.5 Symbol.prototype[@@toStringTag] === 'Symbol'\n if (propValue['@@toStringTag'] === 'Symbol') {\n return true;\n }\n\n // Fallback for non-spec compliant Symbols which are polyfilled.\n if (typeof Symbol === 'function' && propValue instanceof Symbol) {\n return true;\n }\n\n return false;\n }\n\n // Equivalent of `typeof` but with special handling for array and regexp.\n function getPropType(propValue) {\n var propType = typeof propValue;\n if (Array.isArray(propValue)) {\n return 'array';\n }\n if (propValue instanceof RegExp) {\n // Old webkits (at least until Android 4.0) return 'function' rather than\n // 'object' for typeof a RegExp. We'll normalize this here so that /bla/\n // passes PropTypes.object.\n return 'object';\n }\n if (isSymbol(propType, propValue)) {\n return 'symbol';\n }\n return propType;\n }\n\n // This handles more types than `getPropType`. Only used for error messages.\n // See `createPrimitiveTypeChecker`.\n function getPreciseType(propValue) {\n if (typeof propValue === 'undefined' || propValue === null) {\n return '' + propValue;\n }\n var propType = getPropType(propValue);\n if (propType === 'object') {\n if (propValue instanceof Date) {\n return 'date';\n } else if (propValue instanceof RegExp) {\n return 'regexp';\n }\n }\n return propType;\n }\n\n // Returns a string that is postfixed to a warning about an invalid type.\n // For example, \"undefined\" or \"of type array\"\n function getPostfixForTypeWarning(value) {\n var type = getPreciseType(value);\n switch (type) {\n case 'array':\n case 'object':\n return 'an ' + type;\n case 'boolean':\n case 'date':\n case 'regexp':\n return 'a ' + type;\n default:\n return type;\n }\n }\n\n // Returns class name of the object, if any.\n function getClassName(propValue) {\n if (!propValue.constructor || !propValue.constructor.name) {\n return ANONYMOUS;\n }\n return propValue.constructor.name;\n }\n\n ReactPropTypes.checkPropTypes = checkPropTypes;\n ReactPropTypes.resetWarningCache = checkPropTypes.resetWarningCache;\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\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 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","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\"];\nimport React from 'react';\nimport PropTypes from 'prop-types';\n/**\n * @type {React.FunctionComponent<{as: React.ComponentType}>}\n */\n\nvar Base = /*#__PURE__*/React.forwardRef(function (props, ref) {\n var as = props.as,\n rest = _objectWithoutPropertiesLoose(props, _excluded);\n\n var BaseInner = /*#__PURE__*/React.createElement(as, _extends({}, rest, {\n ref: ref\n }));\n return BaseInner;\n});\nBase.displayName = 'Base';\nBase.identifier = Base.displayName;\nBase.propTypes = {\n /** Render with a different HTML tag or a different custom component. */\n as: PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.node, PropTypes.object])\n};\nBase.defaultProps = {\n as: 'div'\n};\nexport default Base;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\", \"size\"];\nimport React, { forwardRef } from 'react';\nimport cx from 'classnames';\nimport { Placeholder } from '@mediahuis/chameleon-theme-wl/icons';\nimport system from '../../system';\nimport Base from '../Base';\nimport styles from './index.module.scss';\nvar SYSTEM_PROPS = ['colorProps', 'flexProps', 'marginProps', 'positioningProps', 'floatProps'];\nvar Icon = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _classNames;\n\n var as = _ref.as,\n size = _ref.size,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var _system = system(props, SYSTEM_PROPS),\n className = _system[0],\n style = _system[1],\n rest = _system[2];\n\n var classNames = (_classNames = {}, _classNames[styles.root] = true, _classNames[styles.small] = size === 'small', _classNames[styles.medium] = size === 'medium', _classNames[styles.large] = size === 'large', _classNames[styles.xLarge] = size === 'xLarge', _classNames);\n return /*#__PURE__*/React.createElement(Base, _extends({\n as: as || Placeholder,\n className: cx(classNames, className),\n style: style,\n ref: ref\n }, rest));\n});\nIcon.displayName = 'Icon';\nIcon.identifier = Icon.displayName;\nIcon.clonableProps = SYSTEM_PROPS;\nIcon.defaultProps = {\n size: 'medium',\n flexShrink: 0\n};\nexport default Icon;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport React from 'react';\nimport { getSystem } from '../../system';\nimport { extendAtomProps, filterAllowedAtoms } from '../../system/utils';\n\nvar warnNotAllowedProps = function warnNotAllowedProps(clonableProps, usedProps, displayName) {\n Object.keys(usedProps).forEach(function (cleanProp) {\n if (!clonableProps.includes(cleanProp)) {\n // eslint-disable-next-line\n console.warn(\"Box clone: \\\"\" + cleanProp + \"\\\" is not allowed in \\\"\" + displayName + \"\\\".\");\n }\n });\n};\n/**\n * Use React.cloneElement and pass only allowedProps to the child component.\n *\n * @param {Object} allPropsObj - All props available in Box\n * @param {Node} children - Box children\n * @param {string} className - Css class\n * @param {Object} rest - Spread props object\n * @param {Object} style - Style object\n * @param {usedProps} - The active used props object\n *\n * @returns - React.cloneElement with filtered props\n *\n * @example\n * createCloneChildren({ children, className, usedProps, allPropsObj, rest, style });\n */\n\n\nvar createCloneChildren = function createCloneChildren(_ref) {\n var allPropsObj = _ref.allPropsObj,\n children = _ref.children,\n className = _ref.className,\n rest = _ref.rest,\n style = _ref.style,\n usedProps = _ref.usedProps;\n return React.Children.map(children, function (child) {\n // Get clonableProps of the child component -> doesn't mean they are passed by Box (it's just possible)\n var clonableProps = child.type.clonableProps ? extendAtomProps(child.type.clonableProps) // Extend props with aliases e.g. m -> mx, mb, ...\n : []; // Warn when prop is not allowed in the child component\n\n warnNotAllowedProps(clonableProps, usedProps, child.type.displayName); // Remove not allowed props from props passed to the child component\n\n var clonedPropsObj = filterAllowedAtoms(allPropsObj, clonableProps); // Create atom classNames & styles\n\n var _getSystem = getSystem(_extends({}, clonedPropsObj, {\n className: className,\n style: style\n })),\n allowedClassnames = _getSystem[0],\n allowedStyles = _getSystem[1];\n\n return /*#__PURE__*/React.cloneElement(child, _extends({\n style: allowedStyles,\n className: allowedClassnames\n }, rest), child.props.children);\n });\n};\n\nexport default createCloneChildren;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"alignContent\", \"alignItems\", \"alignSelf\", \"bgColor\", \"borderBottomColor\", \"borderBottomStyle\", \"borderBottomWidth\", \"borderColor\", \"borderLeftColor\", \"borderLeftStyle\", \"borderLeftWidth\", \"borderRadius\", \"borderRightColor\", \"borderRightStyle\", \"borderRightWidth\", \"borderStyle\", \"borderTopColor\", \"borderTopStyle\", \"borderTopWidth\", \"borderWidth\", \"bottom\", \"children\", \"className\", \"clone\", \"color\", \"display\", \"flex\", \"flexBasis\", \"flexDirection\", \"flexGrow\", \"flexShrink\", \"flexWrap\", \"float\", \"fontStyle\", \"fontWeight\", \"height\", \"justifyContent\", \"left\", \"m\", \"maxHeight\", \"maxWidth\", \"mb\", \"ml\", \"mr\", \"mt\", \"mx\", \"my\", \"order\", \"p\", \"pb\", \"pl\", \"position\", \"pr\", \"pt\", \"px\", \"py\", \"right\", \"style\", \"textAlign\", \"textTransform\", \"top\", \"width\", \"zIndex\"];\n\n/* eslint-disable import/order */\nimport React, { forwardRef } from 'react';\nimport Base from '../Base';\nimport { removeEmptyKeys } from '../../utils';\nimport { getSystem, aliases } from '../../system';\nimport createCloneChildren from './createCloneChildren';\nvar Box = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var alignContent = _ref.alignContent,\n alignItems = _ref.alignItems,\n alignSelf = _ref.alignSelf,\n bgColor = _ref.bgColor,\n borderBottomColor = _ref.borderBottomColor,\n borderBottomStyle = _ref.borderBottomStyle,\n borderBottomWidth = _ref.borderBottomWidth,\n borderColor = _ref.borderColor,\n borderLeftColor = _ref.borderLeftColor,\n borderLeftStyle = _ref.borderLeftStyle,\n borderLeftWidth = _ref.borderLeftWidth,\n borderRadius = _ref.borderRadius,\n borderRightColor = _ref.borderRightColor,\n borderRightStyle = _ref.borderRightStyle,\n borderRightWidth = _ref.borderRightWidth,\n borderStyle = _ref.borderStyle,\n borderTopColor = _ref.borderTopColor,\n borderTopStyle = _ref.borderTopStyle,\n borderTopWidth = _ref.borderTopWidth,\n borderWidth = _ref.borderWidth,\n bottom = _ref.bottom,\n children = _ref.children,\n className = _ref.className,\n clone = _ref.clone,\n color = _ref.color,\n display = _ref.display,\n flex = _ref.flex,\n flexBasis = _ref.flexBasis,\n flexDirection = _ref.flexDirection,\n flexGrow = _ref.flexGrow,\n flexShrink = _ref.flexShrink,\n flexWrap = _ref.flexWrap,\n float = _ref.float,\n fontStyle = _ref.fontStyle,\n fontWeight = _ref.fontWeight,\n height = _ref.height,\n justifyContent = _ref.justifyContent,\n left = _ref.left,\n m = _ref.m,\n maxHeight = _ref.maxHeight,\n maxWidth = _ref.maxWidth,\n mb = _ref.mb,\n ml = _ref.ml,\n mr = _ref.mr,\n mt = _ref.mt,\n mx = _ref.mx,\n my = _ref.my,\n order = _ref.order,\n p = _ref.p,\n pb = _ref.pb,\n pl = _ref.pl,\n position = _ref.position,\n pr = _ref.pr,\n pt = _ref.pt,\n px = _ref.px,\n py = _ref.py,\n right = _ref.right,\n style = _ref.style,\n textAlign = _ref.textAlign,\n textTransform = _ref.textTransform,\n top = _ref.top,\n width = _ref.width,\n zIndex = _ref.zIndex,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var allPropsObj = {\n alignContent: alignContent,\n alignItems: alignItems,\n alignSelf: alignSelf,\n bgColor: bgColor,\n borderBottomColor: borderBottomColor,\n borderBottomStyle: borderBottomStyle,\n borderBottomWidth: borderBottomWidth,\n borderColor: borderColor,\n borderLeftColor: borderLeftColor,\n borderLeftStyle: borderLeftStyle,\n borderLeftWidth: borderLeftWidth,\n borderRadius: borderRadius,\n borderRightColor: borderRightColor,\n borderRightStyle: borderRightStyle,\n borderRightWidth: borderRightWidth,\n borderStyle: borderStyle,\n borderTopColor: borderTopColor,\n borderTopStyle: borderTopStyle,\n borderTopWidth: borderTopWidth,\n borderWidth: borderWidth,\n bottom: bottom,\n color: color,\n display: display,\n flex: flex,\n flexBasis: flexBasis,\n flexDirection: flexDirection,\n flexGrow: flexGrow,\n flexShrink: flexShrink,\n flexWrap: flexWrap,\n float: float,\n fontStyle: fontStyle,\n fontWeight: fontWeight,\n height: height,\n justifyContent: justifyContent,\n left: left,\n m: m,\n maxHeight: maxHeight,\n maxWidth: maxWidth,\n mb: mb,\n ml: ml,\n mr: mr,\n mt: mt,\n mx: mx,\n my: my,\n order: order,\n p: p,\n pb: pb,\n pl: pl,\n position: position,\n pr: pr,\n pt: pt,\n px: px,\n py: py,\n right: right,\n textAlign: textAlign,\n textTransform: textTransform,\n top: top,\n width: width,\n zIndex: zIndex\n }; // Remove unused props from the allPropsObject.\n\n var usedProps = removeEmptyKeys(allPropsObj); // Use React.cloneElement and pass only allowedProps to the child component.\n\n if (clone) {\n // Has no ref passed trough\n return createCloneChildren({\n children: children,\n className: className,\n usedProps: usedProps,\n allPropsObj: allPropsObj,\n rest: rest,\n style: style\n });\n } // Generate Atom classnames and styles from the passed props.\n\n\n var _getSystem = getSystem(_extends({}, usedProps, {\n className: className,\n style: style\n })),\n classnames = _getSystem[0],\n styles = _getSystem[1];\n\n return /*#__PURE__*/React.createElement(Base, _extends({\n className: classnames,\n ref: ref,\n style: styles\n }, rest), children);\n});\nBox.displayName = 'Box';\nBox.identifier = Box.displayName;\nBox.aliases = aliases;\nBox.defaultProps = {};\nexport default Box;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"children\", \"expanded\", \"focussed\", \"id\", \"index\", \"title\", \"onClick\", \"onKeyDown\", \"onFocus\"];\nimport React, { forwardRef, useRef, useEffect } from 'react';\nimport cx from 'classnames';\nimport { useMergeRefs } from 'use-callback-ref';\nimport { ChevronForward } from '@mediahuis/chameleon-theme-wl/icons';\nimport Icon from '../../Icon';\nimport Box from '../../Box';\nimport system from '../../../system';\nimport styles from './index.module.scss';\nvar SYSTEM_PROPS = []; // If system props added - stories should be written!\n\nvar AccordionItem = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n expanded = _ref.expanded,\n focussed = _ref.focussed,\n id = _ref.id,\n index = _ref.index,\n title = _ref.title,\n _onClick = _ref.onClick,\n onKeyDown = _ref.onKeyDown,\n _onFocus = _ref.onFocus,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var innerRef = useRef(null);\n var combinedRef = useMergeRefs([ref, innerRef]);\n\n var _system = system(props, SYSTEM_PROPS),\n className = _system[0],\n style = _system[1],\n rest = _system[2];\n\n useEffect(function () {\n if (focussed) {\n innerRef.current.focus();\n }\n }, [focussed]);\n return /*#__PURE__*/React.createElement(\"div\", {\n id: id,\n className: cx(styles.root, className),\n style: style\n }, /*#__PURE__*/React.createElement(Box, _extends({\n as: \"button\",\n \"aria-expanded\": expanded ? 'true' : 'false',\n \"aria-controls\": id + \"-section\",\n id: id + \"-accordion\",\n onClick: function onClick() {\n return _onClick && _onClick(index);\n },\n onKeyDown: onKeyDown,\n width: \"full\",\n textAlign: \"left\",\n position: \"relative\",\n ref: combinedRef,\n className: cx(styles.button, expanded && styles.buttonExpanded),\n onFocus: function onFocus() {\n return _onFocus && _onFocus(index);\n }\n }, rest), /*#__PURE__*/React.createElement(Icon, {\n position: \"absolute\",\n left: 5,\n \"aria-hidden\": \"true\",\n size: \"small\",\n as: ChevronForward,\n className: cx(styles.icon, expanded && styles.iconExpanded)\n }), title), /*#__PURE__*/React.createElement(\"div\", {\n id: id + \"-section\",\n role: \"region\",\n \"aria-labelledby\": id + \"-accordion\",\n className: styles.panel,\n hidden: !expanded,\n pl: 10\n }, children));\n});\nAccordionItem.displayName = 'AccordionItem';\nAccordionItem.identifier = AccordionItem.displayName; // used in docs website\n\nAccordionItem.clonableProps = SYSTEM_PROPS;\nexport default AccordionItem;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"children\", \"id\", \"initialExpandedIndex\", \"collapsible\"];\n\n/**\n * Implementation based on:\n * WAI-ARIA: https://www.w3.org/TR/wai-aria-practices-1.2/#accordion\n *\n * Availability of accordion content to assistive technology requires the use of aria-controls and toggling aria-expanded as regions are expanded and collapsed.\n *\n * Behaviour:\n * Each section header is focusable\n * Enter and Space: when focused on a section header, should toggle the visibility of its body\n *\n * Recommended:\n * Up and Down arrows: when focused on a section header should navigate to the next/previous header.\n * This should not change the state of the section (if the section is hidden, it stays hidden).\n */\nimport React, { forwardRef } from 'react';\nimport system from '../../system';\nimport _AccordionItem from './AccordionItem';\nexport var AccordionItem = _AccordionItem;\nvar SYSTEM_PROPS = ['marginProps', 'floatProps', 'flexProps'];\nvar Accordion = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n id = _ref.id,\n initialExpandedIndex = _ref.initialExpandedIndex,\n collapsible = _ref.collapsible,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var childrenCount = React.Children.count(children);\n\n var _React$useState = React.useState(initialExpandedIndex),\n expandedIndex = _React$useState[0],\n setExpandedIndex = _React$useState[1];\n\n var _React$useState2 = React.useState(-1),\n focusIndex = _React$useState2[0],\n setFocusIndex = _React$useState2[1];\n\n var _system = system(props, SYSTEM_PROPS),\n className = _system[0],\n style = _system[1],\n rest = _system[2];\n\n var handleExpanded = function handleExpanded(index) {\n if (collapsible) {\n setExpandedIndex(expandedIndex === index ? -1 : index);\n } else {\n setExpandedIndex(index);\n }\n };\n\n var onClick = function onClick(index) {\n return handleExpanded(index);\n };\n\n var onFocus = function onFocus(index) {\n return setFocusIndex(index);\n };\n\n var onKeyDown = function onKeyDown(e) {\n if (e.keyCode === 40) {\n // Down arrow\n e.preventDefault();\n\n if (focusIndex === childrenCount - 1) {\n setFocusIndex(0);\n } else {\n setFocusIndex(focusIndex + 1);\n }\n } else if (e.keyCode === 38) {\n // Up arrow\n e.preventDefault();\n\n if (focusIndex === 0) {\n setFocusIndex(childrenCount - 1);\n } else {\n setFocusIndex(focusIndex - 1);\n }\n }\n };\n\n return /*#__PURE__*/React.createElement(\"div\", _extends({\n id: id,\n className: className,\n style: style,\n ref: ref\n }, rest), React.Children.map(children, function (child, index) {\n if (child.type.identifier !== _AccordionItem.identifier) {\n // eslint-disable-next-line\n console.warn('[INVALID CHILDREN](Accordion): Children of Accordion must be of type AccordionItem.');\n return null;\n }\n\n return /*#__PURE__*/React.cloneElement(child, {\n id: id + \"-\" + index,\n key: id + \"-\" + index,\n expanded: expandedIndex === index,\n focussed: focusIndex === index,\n onKeyDown: onKeyDown,\n onClick: onClick,\n onFocus: onFocus,\n index: index\n }, child.props.children);\n }));\n});\nAccordion.displayName = 'Accordion';\nAccordion.identifier = Accordion.displayName; // used in docs website\n\nAccordion.clonableProps = SYSTEM_PROPS;\nAccordion.defaultProps = {\n initialExpandedIndex: -1\n};\nexport default Accordion;","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","function t(t){return\"object\"==typeof t&&null!=t&&1===t.nodeType}function e(t,e){return(!e||\"hidden\"!==t)&&\"visible\"!==t&&\"clip\"!==t}function n(t,n){if(t.clientHeighte||o>t&&l=e&&d>=n?o-t-r:l>e&&dn?l-e+i:0}export default function(e,i){var o=window,l=i.scrollMode,d=i.block,u=i.inline,h=i.boundary,a=i.skipOverflowHiddenElements,c=\"function\"==typeof h?h:function(t){return t!==h};if(!t(e))throw new TypeError(\"Invalid target\");for(var f=document.scrollingElement||document.documentElement,s=[],p=e;t(p)&&c(p);){if((p=p.parentElement)===f){s.push(p);break}null!=p&&p===document.body&&n(p)&&!n(document.documentElement)||null!=p&&n(p,a)&&s.push(p)}for(var m=o.visualViewport?o.visualViewport.width:innerWidth,g=o.visualViewport?o.visualViewport.height:innerHeight,w=window.scrollX||pageXOffset,v=window.scrollY||pageYOffset,W=e.getBoundingClientRect(),b=W.height,H=W.width,y=W.top,E=W.right,M=W.bottom,V=W.left,x=\"start\"===d||\"nearest\"===d?y:\"end\"===d?M:y+b/2,I=\"center\"===u?V+H/2:\"end\"===u?E:V,C=[],T=0;T=0&&V>=0&&M<=g&&E<=m&&y>=R&&M<=Y&&V>=L&&E<=X)return C;var S=getComputedStyle(k),j=parseInt(S.borderLeftWidth,10),q=parseInt(S.borderTopWidth,10),z=parseInt(S.borderRightWidth,10),A=parseInt(S.borderBottomWidth,10),F=0,G=0,J=\"offsetWidth\"in k?k.offsetWidth-k.clientWidth-j-z:0,K=\"offsetHeight\"in k?k.offsetHeight-k.clientHeight-q-A:0;if(f===k)F=\"start\"===d?x:\"end\"===d?x-g:\"nearest\"===d?r(v,v+g,g,q,A,v+x,v+x+b,b):x-g/2,G=\"start\"===u?I:\"center\"===u?I-m/2:\"end\"===u?I-m:r(w,w+m,m,j,z,w+I,w+I+H,H),F=Math.max(0,F+v),G=Math.max(0,G+w);else{F=\"start\"===d?x-R-q:\"end\"===d?x-Y+A+K:\"nearest\"===d?r(R,Y,D,q,A+K,x,x+b,b):x-(R+D/2)+K/2,G=\"start\"===u?I-L-j:\"center\"===u?I-(L+O/2)+J/2:\"end\"===u?I-X+z+J:r(L,X,O,j,z+J,I,I+H,H);var N=k.scrollLeft,P=k.scrollTop;x+=P-(F=Math.max(0,Math.min(P+F,k.scrollHeight-D+K))),I+=N-(G=Math.max(0,Math.min(N+G,k.scrollWidth-O+J)))}C.push({el:k,top:F,left:G})}return C}\n//# sourceMappingURL=index.module.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","import _objectWithoutPropertiesLoose from '@babel/runtime/helpers/esm/objectWithoutPropertiesLoose';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport _assertThisInitialized from '@babel/runtime/helpers/esm/assertThisInitialized';\nimport _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport PropTypes from 'prop-types';\nimport { cloneElement, Component, useRef, useEffect, useCallback, useLayoutEffect, useReducer, useMemo } from 'react';\nimport { isForwardRef } from 'react-is';\nimport computeScrollIntoView from 'compute-scroll-into-view';\nimport { __assign } from 'tslib';\n\nvar idCounter = 0;\n/**\n * Accepts a parameter and returns it if it's a function\n * or a noop function if it's not. This allows us to\n * accept a callback, but not worry about it if it's not\n * passed.\n * @param {Function} cb the callback\n * @return {Function} a function\n */\n\nfunction cbToCb(cb) {\n return typeof cb === 'function' ? cb : noop;\n}\n\nfunction noop() {}\n/**\n * Scroll node into view if necessary\n * @param {HTMLElement} node the element that should scroll into view\n * @param {HTMLElement} menuNode the menu element of the component\n */\n\n\nfunction scrollIntoView(node, menuNode) {\n if (!node) {\n return;\n }\n\n var actions = computeScrollIntoView(node, {\n boundary: menuNode,\n block: 'nearest',\n scrollMode: 'if-needed'\n });\n actions.forEach(function (_ref) {\n var el = _ref.el,\n top = _ref.top,\n left = _ref.left;\n el.scrollTop = top;\n el.scrollLeft = left;\n });\n}\n/**\n * @param {HTMLElement} parent the parent node\n * @param {HTMLElement} child the child node\n * @param {Window} environment The window context where downshift renders.\n * @return {Boolean} whether the parent is the child or the child is in the parent\n */\n\n\nfunction isOrContainsNode(parent, child, environment) {\n var result = parent === child || child instanceof environment.Node && parent.contains && parent.contains(child);\n return result;\n}\n/**\n * Simple debounce implementation. Will call the given\n * function once after the time given has passed since\n * it was last called.\n * @param {Function} fn the function to call after the time\n * @param {Number} time the time to wait\n * @return {Function} the debounced function\n */\n\n\nfunction debounce(fn, time) {\n var timeoutId;\n\n function cancel() {\n if (timeoutId) {\n clearTimeout(timeoutId);\n }\n }\n\n function wrapper() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n cancel();\n timeoutId = setTimeout(function () {\n timeoutId = null;\n fn.apply(void 0, args);\n }, time);\n }\n\n wrapper.cancel = cancel;\n return wrapper;\n}\n/**\n * This is intended to be used to compose event handlers.\n * They are executed in order until one of them sets\n * `event.preventDownshiftDefault = true`.\n * @param {...Function} fns the event handler functions\n * @return {Function} the event handler to add to an element\n */\n\n\nfunction callAllEventHandlers() {\n for (var _len2 = arguments.length, fns = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n fns[_key2] = arguments[_key2];\n }\n\n return function (event) {\n for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {\n args[_key3 - 1] = arguments[_key3];\n }\n\n return fns.some(function (fn) {\n if (fn) {\n fn.apply(void 0, [event].concat(args));\n }\n\n return event.preventDownshiftDefault || event.hasOwnProperty('nativeEvent') && event.nativeEvent.preventDownshiftDefault;\n });\n };\n}\n\nfunction handleRefs() {\n for (var _len4 = arguments.length, refs = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n refs[_key4] = arguments[_key4];\n }\n\n return function (node) {\n refs.forEach(function (ref) {\n if (typeof ref === 'function') {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n });\n };\n}\n/**\n * This generates a unique ID for an instance of Downshift\n * @return {String} the unique ID\n */\n\n\nfunction generateId() {\n return String(idCounter++);\n}\n/**\n * Resets idCounter to 0. Used for SSR.\n */\n\n\nfunction resetIdCounter() {\n idCounter = 0;\n}\n/**\n * Default implementation for status message. Only added when menu is open.\n * Will specify if there are results in the list, and if so, how many,\n * and what keys are relevant.\n *\n * @param {Object} param the downshift state and other relevant properties\n * @return {String} the a11y status message\n */\n\n\nfunction getA11yStatusMessage$1(_ref2) {\n var isOpen = _ref2.isOpen,\n resultCount = _ref2.resultCount,\n previousResultCount = _ref2.previousResultCount;\n\n if (!isOpen) {\n return '';\n }\n\n if (!resultCount) {\n return 'No results are available.';\n }\n\n if (resultCount !== previousResultCount) {\n return resultCount + \" result\" + (resultCount === 1 ? ' is' : 's are') + \" available, use up and down arrow keys to navigate. Press Enter key to select.\";\n }\n\n return '';\n}\n/**\n * Takes an argument and if it's an array, returns the first item in the array\n * otherwise returns the argument\n * @param {*} arg the maybe-array\n * @param {*} defaultValue the value if arg is falsey not defined\n * @return {*} the arg or it's first item\n */\n\n\nfunction unwrapArray(arg, defaultValue) {\n arg = Array.isArray(arg) ?\n /* istanbul ignore next (preact) */\n arg[0] : arg;\n\n if (!arg && defaultValue) {\n return defaultValue;\n } else {\n return arg;\n }\n}\n/**\n * @param {Object} element (P)react element\n * @return {Boolean} whether it's a DOM element\n */\n\n\nfunction isDOMElement(element) {\n\n\n return typeof element.type === 'string';\n}\n/**\n * @param {Object} element (P)react element\n * @return {Object} the props\n */\n\n\nfunction getElementProps(element) {\n\n return element.props;\n}\n/**\n * Throws a helpful error message for required properties. Useful\n * to be used as a default in destructuring or object params.\n * @param {String} fnName the function name\n * @param {String} propName the prop name\n */\n\n\nfunction requiredProp(fnName, propName) {\n // eslint-disable-next-line no-console\n console.error(\"The property \\\"\" + propName + \"\\\" is required in \\\"\" + fnName + \"\\\"\");\n}\n\nvar stateKeys = ['highlightedIndex', 'inputValue', 'isOpen', 'selectedItem', 'type'];\n/**\n * @param {Object} state the state object\n * @return {Object} state that is relevant to downshift\n */\n\nfunction pickState(state) {\n if (state === void 0) {\n state = {};\n }\n\n var result = {};\n stateKeys.forEach(function (k) {\n if (state.hasOwnProperty(k)) {\n result[k] = state[k];\n }\n });\n return result;\n}\n/**\n * This will perform a shallow merge of the given state object\n * with the state coming from props\n * (for the controlled component scenario)\n * This is used in state updater functions so they're referencing\n * the right state regardless of where it comes from.\n *\n * @param {Object} state The state of the component/hook.\n * @param {Object} props The props that may contain controlled values.\n * @returns {Object} The merged controlled state.\n */\n\n\nfunction getState(state, props) {\n return Object.keys(state).reduce(function (prevState, key) {\n prevState[key] = isControlledProp(props, key) ? props[key] : state[key];\n return prevState;\n }, {});\n}\n/**\n * This determines whether a prop is a \"controlled prop\" meaning it is\n * state which is controlled by the outside of this component rather\n * than within this component.\n *\n * @param {Object} props The props that may contain controlled values.\n * @param {String} key the key to check\n * @return {Boolean} whether it is a controlled controlled prop\n */\n\n\nfunction isControlledProp(props, key) {\n return props[key] !== undefined;\n}\n/**\n * Normalizes the 'key' property of a KeyboardEvent in IE/Edge\n * @param {Object} event a keyboardEvent object\n * @return {String} keyboard key\n */\n\n\nfunction normalizeArrowKey(event) {\n var key = event.key,\n keyCode = event.keyCode;\n /* istanbul ignore next (ie) */\n\n if (keyCode >= 37 && keyCode <= 40 && key.indexOf('Arrow') !== 0) {\n return \"Arrow\" + key;\n }\n\n return key;\n}\n/**\n * Simple check if the value passed is object literal\n * @param {*} obj any things\n * @return {Boolean} whether it's object literal\n */\n\n\nfunction isPlainObject(obj) {\n return Object.prototype.toString.call(obj) === '[object Object]';\n}\n/**\n * Returns the new index in the list, in a circular way. If next value is out of bonds from the total,\n * it will wrap to either 0 or itemCount - 1.\n *\n * @param {number} moveAmount Number of positions to move. Negative to move backwards, positive forwards.\n * @param {number} baseIndex The initial position to move from.\n * @param {number} itemCount The total number of items.\n * @param {Function} getItemNodeFromIndex Used to check if item is disabled.\n * @param {boolean} circular Specify if navigation is circular. Default is true.\n * @returns {number} The new index after the move.\n */\n\n\nfunction getNextWrappingIndex(moveAmount, baseIndex, itemCount, getItemNodeFromIndex, circular) {\n if (circular === void 0) {\n circular = true;\n }\n\n if (itemCount === 0) {\n return -1;\n }\n\n var itemsLastIndex = itemCount - 1;\n\n if (typeof baseIndex !== 'number' || baseIndex < 0 || baseIndex >= itemCount) {\n baseIndex = moveAmount > 0 ? -1 : itemsLastIndex + 1;\n }\n\n var newIndex = baseIndex + moveAmount;\n\n if (newIndex < 0) {\n newIndex = circular ? itemsLastIndex : 0;\n } else if (newIndex > itemsLastIndex) {\n newIndex = circular ? 0 : itemsLastIndex;\n }\n\n var nonDisabledNewIndex = getNextNonDisabledIndex(moveAmount, newIndex, itemCount, getItemNodeFromIndex, circular);\n\n if (nonDisabledNewIndex === -1) {\n return baseIndex >= itemCount ? -1 : baseIndex;\n }\n\n return nonDisabledNewIndex;\n}\n/**\n * Returns the next index in the list of an item that is not disabled.\n *\n * @param {number} moveAmount Number of positions to move. Negative to move backwards, positive forwards.\n * @param {number} baseIndex The initial position to move from.\n * @param {number} itemCount The total number of items.\n * @param {Function} getItemNodeFromIndex Used to check if item is disabled.\n * @param {boolean} circular Specify if navigation is circular. Default is true.\n * @returns {number} The new index. Returns baseIndex if item is not disabled. Returns next non-disabled item otherwise. If no non-disabled found it will return -1.\n */\n\n\nfunction getNextNonDisabledIndex(moveAmount, baseIndex, itemCount, getItemNodeFromIndex, circular) {\n var currentElementNode = getItemNodeFromIndex(baseIndex);\n\n if (!currentElementNode || !currentElementNode.hasAttribute('disabled')) {\n return baseIndex;\n }\n\n if (moveAmount > 0) {\n for (var index = baseIndex + 1; index < itemCount; index++) {\n if (!getItemNodeFromIndex(index).hasAttribute('disabled')) {\n return index;\n }\n }\n } else {\n for (var _index = baseIndex - 1; _index >= 0; _index--) {\n if (!getItemNodeFromIndex(_index).hasAttribute('disabled')) {\n return _index;\n }\n }\n }\n\n if (circular) {\n return moveAmount > 0 ? getNextNonDisabledIndex(1, 0, itemCount, getItemNodeFromIndex, false) : getNextNonDisabledIndex(-1, itemCount - 1, itemCount, getItemNodeFromIndex, false);\n }\n\n return -1;\n}\n/**\n * Checks if event target is within the downshift elements.\n *\n * @param {EventTarget} target Target to check.\n * @param {HTMLElement[]} downshiftElements The elements that form downshift (list, toggle button etc).\n * @param {Window} environment The window context where downshift renders.\n * @param {boolean} checkActiveElement Whether to also check activeElement.\n *\n * @returns {boolean} Whether or not the target is within downshift elements.\n */\n\n\nfunction targetWithinDownshift(target, downshiftElements, environment, checkActiveElement) {\n if (checkActiveElement === void 0) {\n checkActiveElement = true;\n }\n\n return downshiftElements.some(function (contextNode) {\n return contextNode && (isOrContainsNode(contextNode, target, environment) || checkActiveElement && isOrContainsNode(contextNode, environment.document.activeElement, environment));\n });\n} // eslint-disable-next-line import/no-mutable-exports\n\n\nvar validateControlledUnchanged = noop;\n/* istanbul ignore next */\n\nif (process.env.NODE_ENV !== 'production') {\n validateControlledUnchanged = function validateControlledUnchanged(state, prevProps, nextProps) {\n var warningDescription = \"This prop should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled Downshift element for the lifetime of the component. More info: https://github.com/downshift-js/downshift#control-props\";\n Object.keys(state).forEach(function (propKey) {\n if (prevProps[propKey] !== undefined && nextProps[propKey] === undefined) {\n // eslint-disable-next-line no-console\n console.error(\"downshift: A component has changed the controlled prop \\\"\" + propKey + \"\\\" to be uncontrolled. \" + warningDescription);\n } else if (prevProps[propKey] === undefined && nextProps[propKey] !== undefined) {\n // eslint-disable-next-line no-console\n console.error(\"downshift: A component has changed the uncontrolled prop \\\"\" + propKey + \"\\\" to be controlled. \" + warningDescription);\n }\n });\n };\n}\n\nvar cleanupStatus = debounce(function (documentProp) {\n getStatusDiv(documentProp).textContent = '';\n}, 500);\n/**\n * @param {String} status the status message\n * @param {Object} documentProp document passed by the user.\n */\n\nfunction setStatus(status, documentProp) {\n var div = getStatusDiv(documentProp);\n\n if (!status) {\n return;\n }\n\n div.textContent = status;\n cleanupStatus(documentProp);\n}\n/**\n * Get the status node or create it if it does not already exist.\n * @param {Object} documentProp document passed by the user.\n * @return {HTMLElement} the status node.\n */\n\n\nfunction getStatusDiv(documentProp) {\n if (documentProp === void 0) {\n documentProp = document;\n }\n\n var statusDiv = documentProp.getElementById('a11y-status-message');\n\n if (statusDiv) {\n return statusDiv;\n }\n\n statusDiv = documentProp.createElement('div');\n statusDiv.setAttribute('id', 'a11y-status-message');\n statusDiv.setAttribute('role', 'status');\n statusDiv.setAttribute('aria-live', 'polite');\n statusDiv.setAttribute('aria-relevant', 'additions text');\n Object.assign(statusDiv.style, {\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 });\n documentProp.body.appendChild(statusDiv);\n return statusDiv;\n}\n\nvar unknown = process.env.NODE_ENV !== \"production\" ? '__autocomplete_unknown__' : 0;\nvar mouseUp = process.env.NODE_ENV !== \"production\" ? '__autocomplete_mouseup__' : 1;\nvar itemMouseEnter = process.env.NODE_ENV !== \"production\" ? '__autocomplete_item_mouseenter__' : 2;\nvar keyDownArrowUp = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_arrow_up__' : 3;\nvar keyDownArrowDown = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_arrow_down__' : 4;\nvar keyDownEscape = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_escape__' : 5;\nvar keyDownEnter = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_enter__' : 6;\nvar keyDownHome = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_home__' : 7;\nvar keyDownEnd = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_end__' : 8;\nvar clickItem = process.env.NODE_ENV !== \"production\" ? '__autocomplete_click_item__' : 9;\nvar blurInput = process.env.NODE_ENV !== \"production\" ? '__autocomplete_blur_input__' : 10;\nvar changeInput = process.env.NODE_ENV !== \"production\" ? '__autocomplete_change_input__' : 11;\nvar keyDownSpaceButton = process.env.NODE_ENV !== \"production\" ? '__autocomplete_keydown_space_button__' : 12;\nvar clickButton = process.env.NODE_ENV !== \"production\" ? '__autocomplete_click_button__' : 13;\nvar blurButton = process.env.NODE_ENV !== \"production\" ? '__autocomplete_blur_button__' : 14;\nvar controlledPropUpdatedSelectedItem = process.env.NODE_ENV !== \"production\" ? '__autocomplete_controlled_prop_updated_selected_item__' : 15;\nvar touchEnd = process.env.NODE_ENV !== \"production\" ? '__autocomplete_touchend__' : 16;\n\nvar stateChangeTypes$3 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n unknown: unknown,\n mouseUp: mouseUp,\n itemMouseEnter: itemMouseEnter,\n keyDownArrowUp: keyDownArrowUp,\n keyDownArrowDown: keyDownArrowDown,\n keyDownEscape: keyDownEscape,\n keyDownEnter: keyDownEnter,\n keyDownHome: keyDownHome,\n keyDownEnd: keyDownEnd,\n clickItem: clickItem,\n blurInput: blurInput,\n changeInput: changeInput,\n keyDownSpaceButton: keyDownSpaceButton,\n clickButton: clickButton,\n blurButton: blurButton,\n controlledPropUpdatedSelectedItem: controlledPropUpdatedSelectedItem,\n touchEnd: touchEnd\n});\n\nvar _excluded$4 = [\"refKey\", \"ref\"],\n _excluded2$3 = [\"onClick\", \"onPress\", \"onKeyDown\", \"onKeyUp\", \"onBlur\"],\n _excluded3$2 = [\"onKeyDown\", \"onBlur\", \"onChange\", \"onInput\", \"onChangeText\"],\n _excluded4$1 = [\"refKey\", \"ref\"],\n _excluded5$1 = [\"onMouseMove\", \"onMouseDown\", \"onClick\", \"onPress\", \"index\", \"item\"];\n\nvar Downshift = /*#__PURE__*/function () {\n var Downshift = /*#__PURE__*/function (_Component) {\n _inheritsLoose(Downshift, _Component);\n\n function Downshift(_props) {\n var _this;\n\n _this = _Component.call(this, _props) || this; // fancy destructuring + defaults + aliases\n // this basically says each value of state should either be set to\n // the initial value or the default value if the initial value is not provided\n\n _this.id = _this.props.id || \"downshift-\" + generateId();\n _this.menuId = _this.props.menuId || _this.id + \"-menu\";\n _this.labelId = _this.props.labelId || _this.id + \"-label\";\n _this.inputId = _this.props.inputId || _this.id + \"-input\";\n\n _this.getItemId = _this.props.getItemId || function (index) {\n return _this.id + \"-item-\" + index;\n };\n\n _this.input = null;\n _this.items = [];\n _this.itemCount = null;\n _this.previousResultCount = 0;\n _this.timeoutIds = [];\n\n _this.internalSetTimeout = function (fn, time) {\n var id = setTimeout(function () {\n _this.timeoutIds = _this.timeoutIds.filter(function (i) {\n return i !== id;\n });\n fn();\n }, time);\n\n _this.timeoutIds.push(id);\n };\n\n _this.setItemCount = function (count) {\n _this.itemCount = count;\n };\n\n _this.unsetItemCount = function () {\n _this.itemCount = null;\n };\n\n _this.setHighlightedIndex = function (highlightedIndex, otherStateToSet) {\n if (highlightedIndex === void 0) {\n highlightedIndex = _this.props.defaultHighlightedIndex;\n }\n\n if (otherStateToSet === void 0) {\n otherStateToSet = {};\n }\n\n otherStateToSet = pickState(otherStateToSet);\n\n _this.internalSetState(_extends({\n highlightedIndex: highlightedIndex\n }, otherStateToSet));\n };\n\n _this.clearSelection = function (cb) {\n _this.internalSetState({\n selectedItem: null,\n inputValue: '',\n highlightedIndex: _this.props.defaultHighlightedIndex,\n isOpen: _this.props.defaultIsOpen\n }, cb);\n };\n\n _this.selectItem = function (item, otherStateToSet, cb) {\n otherStateToSet = pickState(otherStateToSet);\n\n _this.internalSetState(_extends({\n isOpen: _this.props.defaultIsOpen,\n highlightedIndex: _this.props.defaultHighlightedIndex,\n selectedItem: item,\n inputValue: _this.props.itemToString(item)\n }, otherStateToSet), cb);\n };\n\n _this.selectItemAtIndex = function (itemIndex, otherStateToSet, cb) {\n var item = _this.items[itemIndex];\n\n if (item == null) {\n return;\n }\n\n _this.selectItem(item, otherStateToSet, cb);\n };\n\n _this.selectHighlightedItem = function (otherStateToSet, cb) {\n return _this.selectItemAtIndex(_this.getState().highlightedIndex, otherStateToSet, cb);\n };\n\n _this.internalSetState = function (stateToSet, cb) {\n var isItemSelected, onChangeArg;\n var onStateChangeArg = {};\n var isStateToSetFunction = typeof stateToSet === 'function'; // we want to call `onInputValueChange` before the `setState` call\n // so someone controlling the `inputValue` state gets notified of\n // the input change as soon as possible. This avoids issues with\n // preserving the cursor position.\n // See https://github.com/downshift-js/downshift/issues/217 for more info.\n\n if (!isStateToSetFunction && stateToSet.hasOwnProperty('inputValue')) {\n _this.props.onInputValueChange(stateToSet.inputValue, _extends({}, _this.getStateAndHelpers(), stateToSet));\n }\n\n return _this.setState(function (state) {\n state = _this.getState(state);\n var newStateToSet = isStateToSetFunction ? stateToSet(state) : stateToSet; // Your own function that could modify the state that will be set.\n\n newStateToSet = _this.props.stateReducer(state, newStateToSet); // checks if an item is selected, regardless of if it's different from\n // what was selected before\n // used to determine if onSelect and onChange callbacks should be called\n\n isItemSelected = newStateToSet.hasOwnProperty('selectedItem'); // this keeps track of the object we want to call with setState\n\n var nextState = {}; // this is just used to tell whether the state changed\n\n var nextFullState = {}; // we need to call on change if the outside world is controlling any of our state\n // and we're trying to update that state. OR if the selection has changed and we're\n // trying to update the selection\n\n if (isItemSelected && newStateToSet.selectedItem !== state.selectedItem) {\n onChangeArg = newStateToSet.selectedItem;\n }\n\n newStateToSet.type = newStateToSet.type || unknown;\n Object.keys(newStateToSet).forEach(function (key) {\n // onStateChangeArg should only have the state that is\n // actually changing\n if (state[key] !== newStateToSet[key]) {\n onStateChangeArg[key] = newStateToSet[key];\n } // the type is useful for the onStateChangeArg\n // but we don't actually want to set it in internal state.\n // this is an undocumented feature for now... Not all internalSetState\n // calls support it and I'm not certain we want them to yet.\n // But it enables users controlling the isOpen state to know when\n // the isOpen state changes due to mouseup events which is quite handy.\n\n\n if (key === 'type') {\n return;\n }\n\n nextFullState[key] = newStateToSet[key]; // if it's coming from props, then we don't care to set it internally\n\n if (!isControlledProp(_this.props, key)) {\n nextState[key] = newStateToSet[key];\n }\n }); // if stateToSet is a function, then we weren't able to call onInputValueChange\n // earlier, so we'll call it now that we know what the inputValue state will be.\n\n if (isStateToSetFunction && newStateToSet.hasOwnProperty('inputValue')) {\n _this.props.onInputValueChange(newStateToSet.inputValue, _extends({}, _this.getStateAndHelpers(), newStateToSet));\n }\n\n return nextState;\n }, function () {\n // call the provided callback if it's a function\n cbToCb(cb)(); // only call the onStateChange and onChange callbacks if\n // we have relevant information to pass them.\n\n var hasMoreStateThanType = Object.keys(onStateChangeArg).length > 1;\n\n if (hasMoreStateThanType) {\n _this.props.onStateChange(onStateChangeArg, _this.getStateAndHelpers());\n }\n\n if (isItemSelected) {\n _this.props.onSelect(stateToSet.selectedItem, _this.getStateAndHelpers());\n }\n\n if (onChangeArg !== undefined) {\n _this.props.onChange(onChangeArg, _this.getStateAndHelpers());\n } // this is currently undocumented and therefore subject to change\n // We'll try to not break it, but just be warned.\n\n\n _this.props.onUserAction(onStateChangeArg, _this.getStateAndHelpers());\n });\n };\n\n _this.rootRef = function (node) {\n return _this._rootNode = node;\n };\n\n _this.getRootProps = function (_temp, _temp2) {\n var _extends2;\n\n var _ref = _temp === void 0 ? {} : _temp,\n _ref$refKey = _ref.refKey,\n refKey = _ref$refKey === void 0 ? 'ref' : _ref$refKey,\n ref = _ref.ref,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded$4);\n\n var _ref2 = _temp2 === void 0 ? {} : _temp2,\n _ref2$suppressRefErro = _ref2.suppressRefError,\n suppressRefError = _ref2$suppressRefErro === void 0 ? false : _ref2$suppressRefErro;\n\n // this is used in the render to know whether the user has called getRootProps.\n // It uses that to know whether to apply the props automatically\n _this.getRootProps.called = true;\n _this.getRootProps.refKey = refKey;\n _this.getRootProps.suppressRefError = suppressRefError;\n\n var _this$getState = _this.getState(),\n isOpen = _this$getState.isOpen;\n\n return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, _this.rootRef), _extends2.role = 'combobox', _extends2['aria-expanded'] = isOpen, _extends2['aria-haspopup'] = 'listbox', _extends2['aria-owns'] = isOpen ? _this.menuId : null, _extends2['aria-labelledby'] = _this.labelId, _extends2), rest);\n };\n\n _this.keyDownHandlers = {\n ArrowDown: function ArrowDown(event) {\n var _this2 = this;\n\n event.preventDefault();\n\n if (this.getState().isOpen) {\n var amount = event.shiftKey ? 5 : 1;\n this.moveHighlightedIndex(amount, {\n type: keyDownArrowDown\n });\n } else {\n this.internalSetState({\n isOpen: true,\n type: keyDownArrowDown\n }, function () {\n var itemCount = _this2.getItemCount();\n\n if (itemCount > 0) {\n var _this2$getState = _this2.getState(),\n highlightedIndex = _this2$getState.highlightedIndex;\n\n var nextHighlightedIndex = getNextWrappingIndex(1, highlightedIndex, itemCount, function (index) {\n return _this2.getItemNodeFromIndex(index);\n });\n\n _this2.setHighlightedIndex(nextHighlightedIndex, {\n type: keyDownArrowDown\n });\n }\n });\n }\n },\n ArrowUp: function ArrowUp(event) {\n var _this3 = this;\n\n event.preventDefault();\n\n if (this.getState().isOpen) {\n var amount = event.shiftKey ? -5 : -1;\n this.moveHighlightedIndex(amount, {\n type: keyDownArrowUp\n });\n } else {\n this.internalSetState({\n isOpen: true,\n type: keyDownArrowUp\n }, function () {\n var itemCount = _this3.getItemCount();\n\n if (itemCount > 0) {\n var _this3$getState = _this3.getState(),\n highlightedIndex = _this3$getState.highlightedIndex;\n\n var nextHighlightedIndex = getNextWrappingIndex(-1, highlightedIndex, itemCount, function (index) {\n return _this3.getItemNodeFromIndex(index);\n });\n\n _this3.setHighlightedIndex(nextHighlightedIndex, {\n type: keyDownArrowUp\n });\n }\n });\n }\n },\n Enter: function Enter(event) {\n if (event.which === 229) {\n return;\n }\n\n var _this$getState2 = this.getState(),\n isOpen = _this$getState2.isOpen,\n highlightedIndex = _this$getState2.highlightedIndex;\n\n if (isOpen && highlightedIndex != null) {\n event.preventDefault();\n var item = this.items[highlightedIndex];\n var itemNode = this.getItemNodeFromIndex(highlightedIndex);\n\n if (item == null || itemNode && itemNode.hasAttribute('disabled')) {\n return;\n }\n\n this.selectHighlightedItem({\n type: keyDownEnter\n });\n }\n },\n Escape: function Escape(event) {\n event.preventDefault();\n this.reset(_extends({\n type: keyDownEscape\n }, !this.state.isOpen && {\n selectedItem: null,\n inputValue: ''\n }));\n }\n };\n _this.buttonKeyDownHandlers = _extends({}, _this.keyDownHandlers, {\n ' ': function _(event) {\n event.preventDefault();\n this.toggleMenu({\n type: keyDownSpaceButton\n });\n }\n });\n _this.inputKeyDownHandlers = _extends({}, _this.keyDownHandlers, {\n Home: function Home(event) {\n var _this4 = this;\n\n var _this$getState3 = this.getState(),\n isOpen = _this$getState3.isOpen;\n\n if (!isOpen) {\n return;\n }\n\n event.preventDefault();\n var itemCount = this.getItemCount();\n\n if (itemCount <= 0 || !isOpen) {\n return;\n } // get next non-disabled starting downwards from 0 if that's disabled.\n\n\n var newHighlightedIndex = getNextNonDisabledIndex(1, 0, itemCount, function (index) {\n return _this4.getItemNodeFromIndex(index);\n }, false);\n this.setHighlightedIndex(newHighlightedIndex, {\n type: keyDownHome\n });\n },\n End: function End(event) {\n var _this5 = this;\n\n var _this$getState4 = this.getState(),\n isOpen = _this$getState4.isOpen;\n\n if (!isOpen) {\n return;\n }\n\n event.preventDefault();\n var itemCount = this.getItemCount();\n\n if (itemCount <= 0 || !isOpen) {\n return;\n } // get next non-disabled starting upwards from last index if that's disabled.\n\n\n var newHighlightedIndex = getNextNonDisabledIndex(-1, itemCount - 1, itemCount, function (index) {\n return _this5.getItemNodeFromIndex(index);\n }, false);\n this.setHighlightedIndex(newHighlightedIndex, {\n type: keyDownEnd\n });\n }\n });\n\n _this.getToggleButtonProps = function (_temp3) {\n var _ref3 = _temp3 === void 0 ? {} : _temp3,\n onClick = _ref3.onClick;\n _ref3.onPress;\n var onKeyDown = _ref3.onKeyDown,\n onKeyUp = _ref3.onKeyUp,\n onBlur = _ref3.onBlur,\n rest = _objectWithoutPropertiesLoose(_ref3, _excluded2$3);\n\n var _this$getState5 = _this.getState(),\n isOpen = _this$getState5.isOpen;\n\n var enabledEventHandlers = {\n onClick: callAllEventHandlers(onClick, _this.buttonHandleClick),\n onKeyDown: callAllEventHandlers(onKeyDown, _this.buttonHandleKeyDown),\n onKeyUp: callAllEventHandlers(onKeyUp, _this.buttonHandleKeyUp),\n onBlur: callAllEventHandlers(onBlur, _this.buttonHandleBlur)\n };\n var eventHandlers = rest.disabled ? {} : enabledEventHandlers;\n return _extends({\n type: 'button',\n role: 'button',\n 'aria-label': isOpen ? 'close menu' : 'open menu',\n 'aria-haspopup': true,\n 'data-toggle': true\n }, eventHandlers, rest);\n };\n\n _this.buttonHandleKeyUp = function (event) {\n // Prevent click event from emitting in Firefox\n event.preventDefault();\n };\n\n _this.buttonHandleKeyDown = function (event) {\n var key = normalizeArrowKey(event);\n\n if (_this.buttonKeyDownHandlers[key]) {\n _this.buttonKeyDownHandlers[key].call(_assertThisInitialized(_this), event);\n }\n };\n\n _this.buttonHandleClick = function (event) {\n event.preventDefault(); // handle odd case for Safari and Firefox which\n // don't give the button the focus properly.\n\n /* istanbul ignore if (can't reasonably test this) */\n\n if (_this.props.environment.document.activeElement === _this.props.environment.document.body) {\n event.target.focus();\n } // to simplify testing components that use downshift, we'll not wrap this in a setTimeout\n // if the NODE_ENV is test. With the proper build system, this should be dead code eliminated\n // when building for production and should therefore have no impact on production code.\n\n\n if (process.env.NODE_ENV === 'test') {\n _this.toggleMenu({\n type: clickButton\n });\n } else {\n // Ensure that toggle of menu occurs after the potential blur event in iOS\n _this.internalSetTimeout(function () {\n return _this.toggleMenu({\n type: clickButton\n });\n });\n }\n };\n\n _this.buttonHandleBlur = function (event) {\n var blurTarget = event.target; // Save blur target for comparison with activeElement later\n // Need setTimeout, so that when the user presses Tab, the activeElement is the next focused element, not body element\n\n _this.internalSetTimeout(function () {\n if (!_this.isMouseDown && (_this.props.environment.document.activeElement == null || _this.props.environment.document.activeElement.id !== _this.inputId) && _this.props.environment.document.activeElement !== blurTarget // Do nothing if we refocus the same element again (to solve issue in Safari on iOS)\n ) {\n _this.reset({\n type: blurButton\n });\n }\n });\n };\n\n _this.getLabelProps = function (props) {\n return _extends({\n htmlFor: _this.inputId,\n id: _this.labelId\n }, props);\n };\n\n _this.getInputProps = function (_temp4) {\n var _ref4 = _temp4 === void 0 ? {} : _temp4,\n onKeyDown = _ref4.onKeyDown,\n onBlur = _ref4.onBlur,\n onChange = _ref4.onChange,\n onInput = _ref4.onInput;\n _ref4.onChangeText;\n var rest = _objectWithoutPropertiesLoose(_ref4, _excluded3$2);\n\n var onChangeKey;\n var eventHandlers = {};\n /* istanbul ignore next (preact) */\n\n {\n onChangeKey = 'onChange';\n }\n\n var _this$getState6 = _this.getState(),\n inputValue = _this$getState6.inputValue,\n isOpen = _this$getState6.isOpen,\n highlightedIndex = _this$getState6.highlightedIndex;\n\n if (!rest.disabled) {\n var _eventHandlers;\n\n eventHandlers = (_eventHandlers = {}, _eventHandlers[onChangeKey] = callAllEventHandlers(onChange, onInput, _this.inputHandleChange), _eventHandlers.onKeyDown = callAllEventHandlers(onKeyDown, _this.inputHandleKeyDown), _eventHandlers.onBlur = callAllEventHandlers(onBlur, _this.inputHandleBlur), _eventHandlers);\n }\n\n return _extends({\n 'aria-autocomplete': 'list',\n 'aria-activedescendant': isOpen && typeof highlightedIndex === 'number' && highlightedIndex >= 0 ? _this.getItemId(highlightedIndex) : null,\n 'aria-controls': isOpen ? _this.menuId : null,\n 'aria-labelledby': _this.labelId,\n // https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion\n // revert back since autocomplete=\"nope\" is ignored on latest Chrome and Opera\n autoComplete: 'off',\n value: inputValue,\n id: _this.inputId\n }, eventHandlers, rest);\n };\n\n _this.inputHandleKeyDown = function (event) {\n var key = normalizeArrowKey(event);\n\n if (key && _this.inputKeyDownHandlers[key]) {\n _this.inputKeyDownHandlers[key].call(_assertThisInitialized(_this), event);\n }\n };\n\n _this.inputHandleChange = function (event) {\n _this.internalSetState({\n type: changeInput,\n isOpen: true,\n inputValue: event.target.value,\n highlightedIndex: _this.props.defaultHighlightedIndex\n });\n };\n\n _this.inputHandleBlur = function () {\n // Need setTimeout, so that when the user presses Tab, the activeElement is the next focused element, not the body element\n _this.internalSetTimeout(function () {\n var downshiftButtonIsActive = _this.props.environment.document && !!_this.props.environment.document.activeElement && !!_this.props.environment.document.activeElement.dataset && _this.props.environment.document.activeElement.dataset.toggle && _this._rootNode && _this._rootNode.contains(_this.props.environment.document.activeElement);\n\n if (!_this.isMouseDown && !downshiftButtonIsActive) {\n _this.reset({\n type: blurInput\n });\n }\n });\n };\n\n _this.menuRef = function (node) {\n _this._menuNode = node;\n };\n\n _this.getMenuProps = function (_temp5, _temp6) {\n var _extends3;\n\n var _ref5 = _temp5 === void 0 ? {} : _temp5,\n _ref5$refKey = _ref5.refKey,\n refKey = _ref5$refKey === void 0 ? 'ref' : _ref5$refKey,\n ref = _ref5.ref,\n props = _objectWithoutPropertiesLoose(_ref5, _excluded4$1);\n\n var _ref6 = _temp6 === void 0 ? {} : _temp6,\n _ref6$suppressRefErro = _ref6.suppressRefError,\n suppressRefError = _ref6$suppressRefErro === void 0 ? false : _ref6$suppressRefErro;\n\n _this.getMenuProps.called = true;\n _this.getMenuProps.refKey = refKey;\n _this.getMenuProps.suppressRefError = suppressRefError;\n return _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, _this.menuRef), _extends3.role = 'listbox', _extends3['aria-labelledby'] = props && props['aria-label'] ? null : _this.labelId, _extends3.id = _this.menuId, _extends3), props);\n };\n\n _this.getItemProps = function (_temp7) {\n var _enabledEventHandlers;\n\n var _ref7 = _temp7 === void 0 ? {} : _temp7,\n onMouseMove = _ref7.onMouseMove,\n onMouseDown = _ref7.onMouseDown,\n onClick = _ref7.onClick;\n _ref7.onPress;\n var index = _ref7.index,\n _ref7$item = _ref7.item,\n item = _ref7$item === void 0 ? process.env.NODE_ENV === 'production' ?\n /* istanbul ignore next */\n undefined : requiredProp('getItemProps', 'item') : _ref7$item,\n rest = _objectWithoutPropertiesLoose(_ref7, _excluded5$1);\n\n if (index === undefined) {\n _this.items.push(item);\n\n index = _this.items.indexOf(item);\n } else {\n _this.items[index] = item;\n }\n\n var onSelectKey = 'onClick';\n var customClickHandler = onClick;\n var enabledEventHandlers = (_enabledEventHandlers = {\n // onMouseMove is used over onMouseEnter here. onMouseMove\n // is only triggered on actual mouse movement while onMouseEnter\n // can fire on DOM changes, interrupting keyboard navigation\n onMouseMove: callAllEventHandlers(onMouseMove, function () {\n if (index === _this.getState().highlightedIndex) {\n return;\n }\n\n _this.setHighlightedIndex(index, {\n type: itemMouseEnter\n }); // We never want to manually scroll when changing state based\n // on `onMouseMove` because we will be moving the element out\n // from under the user which is currently scrolling/moving the\n // cursor\n\n\n _this.avoidScrolling = true;\n\n _this.internalSetTimeout(function () {\n return _this.avoidScrolling = false;\n }, 250);\n }),\n onMouseDown: callAllEventHandlers(onMouseDown, function (event) {\n // This prevents the activeElement from being changed\n // to the item so it can remain with the current activeElement\n // which is a more common use case.\n event.preventDefault();\n })\n }, _enabledEventHandlers[onSelectKey] = callAllEventHandlers(customClickHandler, function () {\n _this.selectItemAtIndex(index, {\n type: clickItem\n });\n }), _enabledEventHandlers); // Passing down the onMouseDown handler to prevent redirect\n // of the activeElement if clicking on disabled items\n\n var eventHandlers = rest.disabled ? {\n onMouseDown: enabledEventHandlers.onMouseDown\n } : enabledEventHandlers;\n return _extends({\n id: _this.getItemId(index),\n role: 'option',\n 'aria-selected': _this.getState().highlightedIndex === index\n }, eventHandlers, rest);\n };\n\n _this.clearItems = function () {\n _this.items = [];\n };\n\n _this.reset = function (otherStateToSet, cb) {\n if (otherStateToSet === void 0) {\n otherStateToSet = {};\n }\n\n otherStateToSet = pickState(otherStateToSet);\n\n _this.internalSetState(function (_ref8) {\n var selectedItem = _ref8.selectedItem;\n return _extends({\n isOpen: _this.props.defaultIsOpen,\n highlightedIndex: _this.props.defaultHighlightedIndex,\n inputValue: _this.props.itemToString(selectedItem)\n }, otherStateToSet);\n }, cb);\n };\n\n _this.toggleMenu = function (otherStateToSet, cb) {\n if (otherStateToSet === void 0) {\n otherStateToSet = {};\n }\n\n otherStateToSet = pickState(otherStateToSet);\n\n _this.internalSetState(function (_ref9) {\n var isOpen = _ref9.isOpen;\n return _extends({\n isOpen: !isOpen\n }, isOpen && {\n highlightedIndex: _this.props.defaultHighlightedIndex\n }, otherStateToSet);\n }, function () {\n var _this$getState7 = _this.getState(),\n isOpen = _this$getState7.isOpen,\n highlightedIndex = _this$getState7.highlightedIndex;\n\n if (isOpen) {\n if (_this.getItemCount() > 0 && typeof highlightedIndex === 'number') {\n _this.setHighlightedIndex(highlightedIndex, otherStateToSet);\n }\n }\n\n cbToCb(cb)();\n });\n };\n\n _this.openMenu = function (cb) {\n _this.internalSetState({\n isOpen: true\n }, cb);\n };\n\n _this.closeMenu = function (cb) {\n _this.internalSetState({\n isOpen: false\n }, cb);\n };\n\n _this.updateStatus = debounce(function () {\n var state = _this.getState();\n\n var item = _this.items[state.highlightedIndex];\n\n var resultCount = _this.getItemCount();\n\n var status = _this.props.getA11yStatusMessage(_extends({\n itemToString: _this.props.itemToString,\n previousResultCount: _this.previousResultCount,\n resultCount: resultCount,\n highlightedItem: item\n }, state));\n\n _this.previousResultCount = resultCount;\n setStatus(status, _this.props.environment.document);\n }, 200);\n\n var _this$props = _this.props,\n defaultHighlightedIndex = _this$props.defaultHighlightedIndex,\n _this$props$initialHi = _this$props.initialHighlightedIndex,\n _highlightedIndex = _this$props$initialHi === void 0 ? defaultHighlightedIndex : _this$props$initialHi,\n defaultIsOpen = _this$props.defaultIsOpen,\n _this$props$initialIs = _this$props.initialIsOpen,\n _isOpen = _this$props$initialIs === void 0 ? defaultIsOpen : _this$props$initialIs,\n _this$props$initialIn = _this$props.initialInputValue,\n _inputValue = _this$props$initialIn === void 0 ? '' : _this$props$initialIn,\n _this$props$initialSe = _this$props.initialSelectedItem,\n _selectedItem = _this$props$initialSe === void 0 ? null : _this$props$initialSe;\n\n var _state = _this.getState({\n highlightedIndex: _highlightedIndex,\n isOpen: _isOpen,\n inputValue: _inputValue,\n selectedItem: _selectedItem\n });\n\n if (_state.selectedItem != null && _this.props.initialInputValue === undefined) {\n _state.inputValue = _this.props.itemToString(_state.selectedItem);\n }\n\n _this.state = _state;\n return _this;\n }\n\n var _proto = Downshift.prototype;\n\n /**\n * Clear all running timeouts\n */\n _proto.internalClearTimeouts = function internalClearTimeouts() {\n this.timeoutIds.forEach(function (id) {\n clearTimeout(id);\n });\n this.timeoutIds = [];\n }\n /**\n * Gets the state based on internal state or props\n * If a state value is passed via props, then that\n * is the value given, otherwise it's retrieved from\n * stateToMerge\n *\n * @param {Object} stateToMerge defaults to this.state\n * @return {Object} the state\n */\n ;\n\n _proto.getState = function getState$1(stateToMerge) {\n if (stateToMerge === void 0) {\n stateToMerge = this.state;\n }\n\n return getState(stateToMerge, this.props);\n };\n\n _proto.getItemCount = function getItemCount() {\n // things read better this way. They're in priority order:\n // 1. `this.itemCount`\n // 2. `this.props.itemCount`\n // 3. `this.items.length`\n var itemCount = this.items.length;\n\n if (this.itemCount != null) {\n itemCount = this.itemCount;\n } else if (this.props.itemCount !== undefined) {\n itemCount = this.props.itemCount;\n }\n\n return itemCount;\n };\n\n _proto.getItemNodeFromIndex = function getItemNodeFromIndex(index) {\n return this.props.environment.document.getElementById(this.getItemId(index));\n };\n\n _proto.scrollHighlightedItemIntoView = function scrollHighlightedItemIntoView() {\n /* istanbul ignore else (react-native) */\n {\n var node = this.getItemNodeFromIndex(this.getState().highlightedIndex);\n this.props.scrollIntoView(node, this._menuNode);\n }\n };\n\n _proto.moveHighlightedIndex = function moveHighlightedIndex(amount, otherStateToSet) {\n var _this6 = this;\n\n var itemCount = this.getItemCount();\n\n var _this$getState8 = this.getState(),\n highlightedIndex = _this$getState8.highlightedIndex;\n\n if (itemCount > 0) {\n var nextHighlightedIndex = getNextWrappingIndex(amount, highlightedIndex, itemCount, function (index) {\n return _this6.getItemNodeFromIndex(index);\n });\n this.setHighlightedIndex(nextHighlightedIndex, otherStateToSet);\n }\n };\n\n _proto.getStateAndHelpers = function getStateAndHelpers() {\n var _this$getState9 = this.getState(),\n highlightedIndex = _this$getState9.highlightedIndex,\n inputValue = _this$getState9.inputValue,\n selectedItem = _this$getState9.selectedItem,\n isOpen = _this$getState9.isOpen;\n\n var itemToString = this.props.itemToString;\n var id = this.id;\n var getRootProps = this.getRootProps,\n getToggleButtonProps = this.getToggleButtonProps,\n getLabelProps = this.getLabelProps,\n getMenuProps = this.getMenuProps,\n getInputProps = this.getInputProps,\n getItemProps = this.getItemProps,\n openMenu = this.openMenu,\n closeMenu = this.closeMenu,\n toggleMenu = this.toggleMenu,\n selectItem = this.selectItem,\n selectItemAtIndex = this.selectItemAtIndex,\n selectHighlightedItem = this.selectHighlightedItem,\n setHighlightedIndex = this.setHighlightedIndex,\n clearSelection = this.clearSelection,\n clearItems = this.clearItems,\n reset = this.reset,\n setItemCount = this.setItemCount,\n unsetItemCount = this.unsetItemCount,\n setState = this.internalSetState;\n return {\n // prop getters\n getRootProps: getRootProps,\n getToggleButtonProps: getToggleButtonProps,\n getLabelProps: getLabelProps,\n getMenuProps: getMenuProps,\n getInputProps: getInputProps,\n getItemProps: getItemProps,\n // actions\n reset: reset,\n openMenu: openMenu,\n closeMenu: closeMenu,\n toggleMenu: toggleMenu,\n selectItem: selectItem,\n selectItemAtIndex: selectItemAtIndex,\n selectHighlightedItem: selectHighlightedItem,\n setHighlightedIndex: setHighlightedIndex,\n clearSelection: clearSelection,\n clearItems: clearItems,\n setItemCount: setItemCount,\n unsetItemCount: unsetItemCount,\n setState: setState,\n // props\n itemToString: itemToString,\n // derived\n id: id,\n // state\n highlightedIndex: highlightedIndex,\n inputValue: inputValue,\n isOpen: isOpen,\n selectedItem: selectedItem\n };\n } //////////////////////////// ROOT\n ;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this7 = this;\n\n /* istanbul ignore if (react-native) */\n if (process.env.NODE_ENV !== 'production' && !false && this.getMenuProps.called && !this.getMenuProps.suppressRefError) {\n validateGetMenuPropsCalledCorrectly(this._menuNode, this.getMenuProps);\n }\n /* istanbul ignore if (react-native) */\n\n\n {\n // this.isMouseDown helps us track whether the mouse is currently held down.\n // This is useful when the user clicks on an item in the list, but holds the mouse\n // down long enough for the list to disappear (because the blur event fires on the input)\n // this.isMouseDown is used in the blur handler on the input to determine whether the blur event should\n // trigger hiding the menu.\n var onMouseDown = function onMouseDown() {\n _this7.isMouseDown = true;\n };\n\n var onMouseUp = function onMouseUp(event) {\n _this7.isMouseDown = false; // if the target element or the activeElement is within a downshift node\n // then we don't want to reset downshift\n\n var contextWithinDownshift = targetWithinDownshift(event.target, [_this7._rootNode, _this7._menuNode], _this7.props.environment);\n\n if (!contextWithinDownshift && _this7.getState().isOpen) {\n _this7.reset({\n type: mouseUp\n }, function () {\n return _this7.props.onOuterClick(_this7.getStateAndHelpers());\n });\n }\n }; // Touching an element in iOS gives focus and hover states, but touching out of\n // the element will remove hover, and persist the focus state, resulting in the\n // blur event not being triggered.\n // this.isTouchMove helps us track whether the user is tapping or swiping on a touch screen.\n // If the user taps outside of Downshift, the component should be reset,\n // but not if the user is swiping\n\n\n var onTouchStart = function onTouchStart() {\n _this7.isTouchMove = false;\n };\n\n var onTouchMove = function onTouchMove() {\n _this7.isTouchMove = true;\n };\n\n var onTouchEnd = function onTouchEnd(event) {\n var contextWithinDownshift = targetWithinDownshift(event.target, [_this7._rootNode, _this7._menuNode], _this7.props.environment, false);\n\n if (!_this7.isTouchMove && !contextWithinDownshift && _this7.getState().isOpen) {\n _this7.reset({\n type: touchEnd\n }, function () {\n return _this7.props.onOuterClick(_this7.getStateAndHelpers());\n });\n }\n };\n\n var environment = this.props.environment;\n environment.addEventListener('mousedown', onMouseDown);\n environment.addEventListener('mouseup', onMouseUp);\n environment.addEventListener('touchstart', onTouchStart);\n environment.addEventListener('touchmove', onTouchMove);\n environment.addEventListener('touchend', onTouchEnd);\n\n this.cleanup = function () {\n _this7.internalClearTimeouts();\n\n _this7.updateStatus.cancel();\n\n environment.removeEventListener('mousedown', onMouseDown);\n environment.removeEventListener('mouseup', onMouseUp);\n environment.removeEventListener('touchstart', onTouchStart);\n environment.removeEventListener('touchmove', onTouchMove);\n environment.removeEventListener('touchend', onTouchEnd);\n };\n }\n };\n\n _proto.shouldScroll = function shouldScroll(prevState, prevProps) {\n var _ref10 = this.props.highlightedIndex === undefined ? this.getState() : this.props,\n currentHighlightedIndex = _ref10.highlightedIndex;\n\n var _ref11 = prevProps.highlightedIndex === undefined ? prevState : prevProps,\n prevHighlightedIndex = _ref11.highlightedIndex;\n\n var scrollWhenOpen = currentHighlightedIndex && this.getState().isOpen && !prevState.isOpen;\n var scrollWhenNavigating = currentHighlightedIndex !== prevHighlightedIndex;\n return scrollWhenOpen || scrollWhenNavigating;\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps, prevState) {\n if (process.env.NODE_ENV !== 'production') {\n validateControlledUnchanged(this.state, prevProps, this.props);\n /* istanbul ignore if (react-native) */\n\n if (this.getMenuProps.called && !this.getMenuProps.suppressRefError) {\n validateGetMenuPropsCalledCorrectly(this._menuNode, this.getMenuProps);\n }\n }\n\n if (isControlledProp(this.props, 'selectedItem') && this.props.selectedItemChanged(prevProps.selectedItem, this.props.selectedItem)) {\n this.internalSetState({\n type: controlledPropUpdatedSelectedItem,\n inputValue: this.props.itemToString(this.props.selectedItem)\n });\n }\n\n if (!this.avoidScrolling && this.shouldScroll(prevState, prevProps)) {\n this.scrollHighlightedItemIntoView();\n }\n /* istanbul ignore else (react-native) */\n\n\n {\n this.updateStatus();\n }\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cleanup(); // avoids memory leak\n };\n\n _proto.render = function render() {\n var children = unwrapArray(this.props.children, noop); // because the items are rerendered every time we call the children\n // we clear this out each render and it will be populated again as\n // getItemProps is called.\n\n this.clearItems(); // we reset this so we know whether the user calls getRootProps during\n // this render. If they do then we don't need to do anything,\n // if they don't then we need to clone the element they return and\n // apply the props for them.\n\n this.getRootProps.called = false;\n this.getRootProps.refKey = undefined;\n this.getRootProps.suppressRefError = undefined; // we do something similar for getMenuProps\n\n this.getMenuProps.called = false;\n this.getMenuProps.refKey = undefined;\n this.getMenuProps.suppressRefError = undefined; // we do something similar for getLabelProps\n\n this.getLabelProps.called = false; // and something similar for getInputProps\n\n this.getInputProps.called = false;\n var element = unwrapArray(children(this.getStateAndHelpers()));\n\n if (!element) {\n return null;\n }\n\n if (this.getRootProps.called || this.props.suppressRefError) {\n if (process.env.NODE_ENV !== 'production' && !this.getRootProps.suppressRefError && !this.props.suppressRefError) {\n validateGetRootPropsCalledCorrectly(element, this.getRootProps);\n }\n\n return element;\n } else if (isDOMElement(element)) {\n // they didn't apply the root props, but we can clone\n // this and apply the props ourselves\n return /*#__PURE__*/cloneElement(element, this.getRootProps(getElementProps(element)));\n }\n /* istanbul ignore else */\n\n\n if (process.env.NODE_ENV !== 'production') {\n // they didn't apply the root props, but they need to\n // otherwise we can't query around the autocomplete\n throw new Error('downshift: If you return a non-DOM element, you must apply the getRootProps function');\n }\n /* istanbul ignore next */\n\n\n return undefined;\n };\n\n return Downshift;\n }(Component);\n\n Downshift.defaultProps = {\n defaultHighlightedIndex: null,\n defaultIsOpen: false,\n getA11yStatusMessage: getA11yStatusMessage$1,\n itemToString: function itemToString(i) {\n if (i == null) {\n return '';\n }\n\n if (process.env.NODE_ENV !== 'production' && isPlainObject(i) && !i.hasOwnProperty('toString')) {\n // eslint-disable-next-line no-console\n console.warn('downshift: An object was passed to the default implementation of `itemToString`. You should probably provide your own `itemToString` implementation. Please refer to the `itemToString` API documentation.', 'The object that was passed:', i);\n }\n\n return String(i);\n },\n onStateChange: noop,\n onInputValueChange: noop,\n onUserAction: noop,\n onChange: noop,\n onSelect: noop,\n onOuterClick: noop,\n selectedItemChanged: function selectedItemChanged(prevItem, item) {\n return prevItem !== item;\n },\n environment:\n /* istanbul ignore next (ssr) */\n typeof window === 'undefined' ? {} : window,\n stateReducer: function stateReducer(state, stateToSet) {\n return stateToSet;\n },\n suppressRefError: false,\n scrollIntoView: scrollIntoView\n };\n Downshift.stateChangeTypes = stateChangeTypes$3;\n return Downshift;\n}();\n\nprocess.env.NODE_ENV !== \"production\" ? Downshift.propTypes = {\n children: PropTypes.func,\n defaultHighlightedIndex: PropTypes.number,\n defaultIsOpen: PropTypes.bool,\n initialHighlightedIndex: PropTypes.number,\n initialSelectedItem: PropTypes.any,\n initialInputValue: PropTypes.string,\n initialIsOpen: PropTypes.bool,\n getA11yStatusMessage: PropTypes.func,\n itemToString: PropTypes.func,\n onChange: PropTypes.func,\n onSelect: PropTypes.func,\n onStateChange: PropTypes.func,\n onInputValueChange: PropTypes.func,\n onUserAction: PropTypes.func,\n onOuterClick: PropTypes.func,\n selectedItemChanged: PropTypes.func,\n stateReducer: PropTypes.func,\n itemCount: PropTypes.number,\n id: PropTypes.string,\n environment: PropTypes.shape({\n addEventListener: PropTypes.func,\n removeEventListener: PropTypes.func,\n document: PropTypes.shape({\n getElementById: PropTypes.func,\n activeElement: PropTypes.any,\n body: PropTypes.any\n })\n }),\n suppressRefError: PropTypes.bool,\n scrollIntoView: PropTypes.func,\n // things we keep in state for uncontrolled components\n // but can accept as props for controlled components\n\n /* eslint-disable react/no-unused-prop-types */\n selectedItem: PropTypes.any,\n isOpen: PropTypes.bool,\n inputValue: PropTypes.string,\n highlightedIndex: PropTypes.number,\n labelId: PropTypes.string,\n inputId: PropTypes.string,\n menuId: PropTypes.string,\n getItemId: PropTypes.func\n /* eslint-enable react/no-unused-prop-types */\n\n} : void 0;\nvar Downshift$1 = Downshift;\n\nfunction validateGetMenuPropsCalledCorrectly(node, _ref12) {\n var refKey = _ref12.refKey;\n\n if (!node) {\n // eslint-disable-next-line no-console\n console.error(\"downshift: The ref prop \\\"\" + refKey + \"\\\" from getMenuProps was not applied correctly on your menu element.\");\n }\n}\n\nfunction validateGetRootPropsCalledCorrectly(element, _ref13) {\n var refKey = _ref13.refKey;\n var refKeySpecified = refKey !== 'ref';\n var isComposite = !isDOMElement(element);\n\n if (isComposite && !refKeySpecified && !isForwardRef(element)) {\n // eslint-disable-next-line no-console\n console.error('downshift: You returned a non-DOM element. You must specify a refKey in getRootProps');\n } else if (!isComposite && refKeySpecified) {\n // eslint-disable-next-line no-console\n console.error(\"downshift: You returned a DOM element. You should not specify a refKey in getRootProps. You specified \\\"\" + refKey + \"\\\"\");\n }\n\n if (!isForwardRef(element) && !getElementProps(element)[refKey]) {\n // eslint-disable-next-line no-console\n console.error(\"downshift: You must apply the ref prop \\\"\" + refKey + \"\\\" from getRootProps onto your root element.\");\n }\n}\n\nvar _excluded$3 = [\"isInitialMount\", \"highlightedIndex\", \"items\", \"environment\"];\nvar dropdownDefaultStateValues = {\n highlightedIndex: -1,\n isOpen: false,\n selectedItem: null,\n inputValue: ''\n};\n\nfunction callOnChangeProps(action, state, newState) {\n var props = action.props,\n type = action.type;\n var changes = {};\n Object.keys(state).forEach(function (key) {\n invokeOnChangeHandler(key, action, state, newState);\n\n if (newState[key] !== state[key]) {\n changes[key] = newState[key];\n }\n });\n\n if (props.onStateChange && Object.keys(changes).length) {\n props.onStateChange(_extends({\n type: type\n }, changes));\n }\n}\n\nfunction invokeOnChangeHandler(key, action, state, newState) {\n var props = action.props,\n type = action.type;\n var handler = \"on\" + capitalizeString(key) + \"Change\";\n\n if (props[handler] && newState[key] !== undefined && newState[key] !== state[key]) {\n props[handler](_extends({\n type: type\n }, newState));\n }\n}\n/**\n * Default state reducer that returns the changes.\n *\n * @param {Object} s state.\n * @param {Object} a action with changes.\n * @returns {Object} changes.\n */\n\n\nfunction stateReducer(s, a) {\n return a.changes;\n}\n/**\n * Returns a message to be added to aria-live region when item is selected.\n *\n * @param {Object} selectionParameters Parameters required to build the message.\n * @returns {string} The a11y message.\n */\n\n\nfunction getA11ySelectionMessage(selectionParameters) {\n var selectedItem = selectionParameters.selectedItem,\n itemToStringLocal = selectionParameters.itemToString;\n return selectedItem ? itemToStringLocal(selectedItem) + \" has been selected.\" : '';\n}\n/**\n * Debounced call for updating the a11y message.\n */\n\n\nvar updateA11yStatus = debounce(function (getA11yMessage, document) {\n setStatus(getA11yMessage(), document);\n}, 200); // istanbul ignore next\n\nvar useIsomorphicLayoutEffect = typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined' ? useLayoutEffect : useEffect;\n\nfunction useElementIds(_ref) {\n var _ref$id = _ref.id,\n id = _ref$id === void 0 ? \"downshift-\" + generateId() : _ref$id,\n labelId = _ref.labelId,\n menuId = _ref.menuId,\n getItemId = _ref.getItemId,\n toggleButtonId = _ref.toggleButtonId,\n inputId = _ref.inputId;\n var elementIdsRef = useRef({\n labelId: labelId || id + \"-label\",\n menuId: menuId || id + \"-menu\",\n getItemId: getItemId || function (index) {\n return id + \"-item-\" + index;\n },\n toggleButtonId: toggleButtonId || id + \"-toggle-button\",\n inputId: inputId || id + \"-input\"\n });\n return elementIdsRef.current;\n}\n\nfunction getItemIndex(index, item, items) {\n if (index !== undefined) {\n return index;\n }\n\n if (items.length === 0) {\n return -1;\n }\n\n return items.indexOf(item);\n}\n\nfunction itemToString(item) {\n return item ? String(item) : '';\n}\n\nfunction isAcceptedCharacterKey(key) {\n return /^\\S{1}$/.test(key);\n}\n\nfunction capitalizeString(string) {\n return \"\" + string.slice(0, 1).toUpperCase() + string.slice(1);\n}\n\nfunction useLatestRef(val) {\n var ref = useRef(val); // technically this is not \"concurrent mode safe\" because we're manipulating\n // the value during render (so it's not idempotent). However, the places this\n // hook is used is to support memoizing callbacks which will be called\n // *during* render, so we need the latest values *during* render.\n // If not for this, then we'd probably want to use useLayoutEffect instead.\n\n ref.current = val;\n return ref;\n}\n/**\n * Computes the controlled state using a the previous state, props,\n * two reducers, one from downshift and an optional one from the user.\n * Also calls the onChange handlers for state values that have changed.\n *\n * @param {Function} reducer Reducer function from downshift.\n * @param {Object} initialState Initial state of the hook.\n * @param {Object} props The hook props.\n * @returns {Array} An array with the state and an action dispatcher.\n */\n\n\nfunction useEnhancedReducer(reducer, initialState, props) {\n var prevStateRef = useRef();\n var actionRef = useRef();\n var enhancedReducer = useCallback(function (state, action) {\n actionRef.current = action;\n state = getState(state, action.props);\n var changes = reducer(state, action);\n var newState = action.props.stateReducer(state, _extends({}, action, {\n changes: changes\n }));\n return newState;\n }, [reducer]);\n\n var _useReducer = useReducer(enhancedReducer, initialState),\n state = _useReducer[0],\n dispatch = _useReducer[1];\n\n var propsRef = useLatestRef(props);\n var dispatchWithProps = useCallback(function (action) {\n return dispatch(_extends({\n props: propsRef.current\n }, action));\n }, [propsRef]);\n var action = actionRef.current;\n useEffect(function () {\n if (action && prevStateRef.current && prevStateRef.current !== state) {\n callOnChangeProps(action, getState(prevStateRef.current, action.props), state);\n }\n\n prevStateRef.current = state;\n }, [state, props, action]);\n return [state, dispatchWithProps];\n}\n/**\n * Wraps the useEnhancedReducer and applies the controlled prop values before\n * returning the new state.\n *\n * @param {Function} reducer Reducer function from downshift.\n * @param {Object} initialState Initial state of the hook.\n * @param {Object} props The hook props.\n * @returns {Array} An array with the state and an action dispatcher.\n */\n\n\nfunction useControlledReducer$1(reducer, initialState, props) {\n var _useEnhancedReducer = useEnhancedReducer(reducer, initialState, props),\n state = _useEnhancedReducer[0],\n dispatch = _useEnhancedReducer[1];\n\n return [getState(state, props), dispatch];\n}\n\nvar defaultProps$3 = {\n itemToString: itemToString,\n stateReducer: stateReducer,\n getA11ySelectionMessage: getA11ySelectionMessage,\n scrollIntoView: scrollIntoView,\n circularNavigation: false,\n environment:\n /* istanbul ignore next (ssr) */\n typeof window === 'undefined' ? {} : window\n};\n\nfunction getDefaultValue$1(props, propKey, defaultStateValues) {\n if (defaultStateValues === void 0) {\n defaultStateValues = dropdownDefaultStateValues;\n }\n\n var defaultPropKey = \"default\" + capitalizeString(propKey);\n\n if (defaultPropKey in props) {\n return props[defaultPropKey];\n }\n\n return defaultStateValues[propKey];\n}\n\nfunction getInitialValue$1(props, propKey, defaultStateValues) {\n if (defaultStateValues === void 0) {\n defaultStateValues = dropdownDefaultStateValues;\n }\n\n if (propKey in props) {\n return props[propKey];\n }\n\n var initialPropKey = \"initial\" + capitalizeString(propKey);\n\n if (initialPropKey in props) {\n return props[initialPropKey];\n }\n\n return getDefaultValue$1(props, propKey, defaultStateValues);\n}\n\nfunction getInitialState$2(props) {\n var selectedItem = getInitialValue$1(props, 'selectedItem');\n var isOpen = getInitialValue$1(props, 'isOpen');\n var highlightedIndex = getInitialValue$1(props, 'highlightedIndex');\n var inputValue = getInitialValue$1(props, 'inputValue');\n return {\n highlightedIndex: highlightedIndex < 0 && selectedItem && isOpen ? props.items.indexOf(selectedItem) : highlightedIndex,\n isOpen: isOpen,\n selectedItem: selectedItem,\n inputValue: inputValue\n };\n}\n\nfunction getHighlightedIndexOnOpen(props, state, offset, getItemNodeFromIndex) {\n var items = props.items,\n initialHighlightedIndex = props.initialHighlightedIndex,\n defaultHighlightedIndex = props.defaultHighlightedIndex;\n var selectedItem = state.selectedItem,\n highlightedIndex = state.highlightedIndex;\n\n if (items.length === 0) {\n return -1;\n } // initialHighlightedIndex will give value to highlightedIndex on initial state only.\n\n\n if (initialHighlightedIndex !== undefined && highlightedIndex === initialHighlightedIndex) {\n return initialHighlightedIndex;\n }\n\n if (defaultHighlightedIndex !== undefined) {\n return defaultHighlightedIndex;\n }\n\n if (selectedItem) {\n if (offset === 0) {\n return items.indexOf(selectedItem);\n }\n\n return getNextWrappingIndex(offset, items.indexOf(selectedItem), items.length, getItemNodeFromIndex, false);\n }\n\n if (offset === 0) {\n return -1;\n }\n\n return offset < 0 ? items.length - 1 : 0;\n}\n/**\n * Reuse the movement tracking of mouse and touch events.\n *\n * @param {boolean} isOpen Whether the dropdown is open or not.\n * @param {Array} downshiftElementRefs Downshift element refs to track movement (toggleButton, menu etc.)\n * @param {Object} environment Environment where component/hook exists.\n * @param {Function} handleBlur Handler on blur from mouse or touch.\n * @returns {Object} Ref containing whether mouseDown or touchMove event is happening\n */\n\n\nfunction useMouseAndTouchTracker(isOpen, downshiftElementRefs, environment, handleBlur) {\n var mouseAndTouchTrackersRef = useRef({\n isMouseDown: false,\n isTouchMove: false\n });\n useEffect(function () {\n // The same strategy for checking if a click occurred inside or outside downsift\n // as in downshift.js.\n var onMouseDown = function onMouseDown() {\n mouseAndTouchTrackersRef.current.isMouseDown = true;\n };\n\n var onMouseUp = function onMouseUp(event) {\n mouseAndTouchTrackersRef.current.isMouseDown = false;\n\n if (isOpen && !targetWithinDownshift(event.target, downshiftElementRefs.map(function (ref) {\n return ref.current;\n }), environment)) {\n handleBlur();\n }\n };\n\n var onTouchStart = function onTouchStart() {\n mouseAndTouchTrackersRef.current.isTouchMove = false;\n };\n\n var onTouchMove = function onTouchMove() {\n mouseAndTouchTrackersRef.current.isTouchMove = true;\n };\n\n var onTouchEnd = function onTouchEnd(event) {\n if (isOpen && !mouseAndTouchTrackersRef.current.isTouchMove && !targetWithinDownshift(event.target, downshiftElementRefs.map(function (ref) {\n return ref.current;\n }), environment, false)) {\n handleBlur();\n }\n };\n\n environment.addEventListener('mousedown', onMouseDown);\n environment.addEventListener('mouseup', onMouseUp);\n environment.addEventListener('touchstart', onTouchStart);\n environment.addEventListener('touchmove', onTouchMove);\n environment.addEventListener('touchend', onTouchEnd);\n return function cleanup() {\n environment.removeEventListener('mousedown', onMouseDown);\n environment.removeEventListener('mouseup', onMouseUp);\n environment.removeEventListener('touchstart', onTouchStart);\n environment.removeEventListener('touchmove', onTouchMove);\n environment.removeEventListener('touchend', onTouchEnd);\n }; // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [isOpen, environment]);\n return mouseAndTouchTrackersRef;\n}\n/* istanbul ignore next */\n// eslint-disable-next-line import/no-mutable-exports\n\n\nvar useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {\n return noop;\n};\n/**\n * Custom hook that checks if getter props are called correctly.\n *\n * @param {...any} propKeys Getter prop names to be handled.\n * @returns {Function} Setter function called inside getter props to set call information.\n */\n\n/* istanbul ignore next */\n\n\nif (process.env.NODE_ENV !== 'production') {\n useGetterPropsCalledChecker = function useGetterPropsCalledChecker() {\n var isInitialMountRef = useRef(true);\n\n for (var _len = arguments.length, propKeys = new Array(_len), _key = 0; _key < _len; _key++) {\n propKeys[_key] = arguments[_key];\n }\n\n var getterPropsCalledRef = useRef(propKeys.reduce(function (acc, propKey) {\n acc[propKey] = {};\n return acc;\n }, {}));\n useEffect(function () {\n Object.keys(getterPropsCalledRef.current).forEach(function (propKey) {\n var propCallInfo = getterPropsCalledRef.current[propKey];\n\n if (isInitialMountRef.current) {\n if (!Object.keys(propCallInfo).length) {\n // eslint-disable-next-line no-console\n console.error(\"downshift: You forgot to call the \" + propKey + \" getter function on your component / element.\");\n return;\n }\n }\n\n var suppressRefError = propCallInfo.suppressRefError,\n refKey = propCallInfo.refKey,\n elementRef = propCallInfo.elementRef;\n\n if ((!elementRef || !elementRef.current) && !suppressRefError) {\n // eslint-disable-next-line no-console\n console.error(\"downshift: The ref prop \\\"\" + refKey + \"\\\" from \" + propKey + \" was not applied correctly on your element.\");\n }\n });\n isInitialMountRef.current = false;\n });\n var setGetterPropCallInfo = useCallback(function (propKey, suppressRefError, refKey, elementRef) {\n getterPropsCalledRef.current[propKey] = {\n suppressRefError: suppressRefError,\n refKey: refKey,\n elementRef: elementRef\n };\n }, []);\n return setGetterPropCallInfo;\n };\n}\n\nfunction useA11yMessageSetter(getA11yMessage, dependencyArray, _ref2) {\n var isInitialMount = _ref2.isInitialMount,\n highlightedIndex = _ref2.highlightedIndex,\n items = _ref2.items,\n environment = _ref2.environment,\n rest = _objectWithoutPropertiesLoose(_ref2, _excluded$3);\n\n // Sets a11y status message on changes in state.\n useEffect(function () {\n if (isInitialMount || false) {\n return;\n }\n\n updateA11yStatus(function () {\n return getA11yMessage(_extends({\n highlightedIndex: highlightedIndex,\n highlightedItem: items[highlightedIndex],\n resultCount: items.length\n }, rest));\n }, environment.document); // eslint-disable-next-line react-hooks/exhaustive-deps\n }, dependencyArray);\n}\n\nfunction useScrollIntoView(_ref3) {\n var highlightedIndex = _ref3.highlightedIndex,\n isOpen = _ref3.isOpen,\n itemRefs = _ref3.itemRefs,\n getItemNodeFromIndex = _ref3.getItemNodeFromIndex,\n menuElement = _ref3.menuElement,\n scrollIntoViewProp = _ref3.scrollIntoView;\n // used not to scroll on highlight by mouse.\n var shouldScrollRef = useRef(true); // Scroll on highlighted item if change comes from keyboard.\n\n useIsomorphicLayoutEffect(function () {\n if (highlightedIndex < 0 || !isOpen || !Object.keys(itemRefs.current).length) {\n return;\n }\n\n if (shouldScrollRef.current === false) {\n shouldScrollRef.current = true;\n } else {\n scrollIntoViewProp(getItemNodeFromIndex(highlightedIndex), menuElement);\n } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n }, [highlightedIndex]);\n return shouldScrollRef;\n} // eslint-disable-next-line import/no-mutable-exports\n\n\nvar useControlPropsValidator = noop;\n/* istanbul ignore next */\n\nif (process.env.NODE_ENV !== 'production') {\n useControlPropsValidator = function useControlPropsValidator(_ref4) {\n var isInitialMount = _ref4.isInitialMount,\n props = _ref4.props,\n state = _ref4.state;\n // used for checking when props are moving from controlled to uncontrolled.\n var prevPropsRef = useRef(props);\n useEffect(function () {\n if (isInitialMount) {\n return;\n }\n\n validateControlledUnchanged(state, prevPropsRef.current, props);\n prevPropsRef.current = props;\n }, [state, props, isInitialMount]);\n };\n}\n\n/* eslint-disable complexity */\n\nfunction downshiftCommonReducer(state, action, stateChangeTypes) {\n var type = action.type,\n props = action.props;\n var changes;\n\n switch (type) {\n case stateChangeTypes.ItemMouseMove:\n changes = {\n highlightedIndex: action.index\n };\n break;\n\n case stateChangeTypes.MenuMouseLeave:\n changes = {\n highlightedIndex: -1\n };\n break;\n\n case stateChangeTypes.ToggleButtonClick:\n case stateChangeTypes.FunctionToggleMenu:\n changes = {\n isOpen: !state.isOpen,\n highlightedIndex: state.isOpen ? -1 : getHighlightedIndexOnOpen(props, state, 0)\n };\n break;\n\n case stateChangeTypes.FunctionOpenMenu:\n changes = {\n isOpen: true,\n highlightedIndex: getHighlightedIndexOnOpen(props, state, 0)\n };\n break;\n\n case stateChangeTypes.FunctionCloseMenu:\n changes = {\n isOpen: false\n };\n break;\n\n case stateChangeTypes.FunctionSetHighlightedIndex:\n changes = {\n highlightedIndex: action.highlightedIndex\n };\n break;\n\n case stateChangeTypes.FunctionSetInputValue:\n changes = {\n inputValue: action.inputValue\n };\n break;\n\n case stateChangeTypes.FunctionReset:\n changes = {\n highlightedIndex: getDefaultValue$1(props, 'highlightedIndex'),\n isOpen: getDefaultValue$1(props, 'isOpen'),\n selectedItem: getDefaultValue$1(props, 'selectedItem'),\n inputValue: getDefaultValue$1(props, 'inputValue')\n };\n break;\n\n default:\n throw new Error('Reducer called without proper action type.');\n }\n\n return _extends({}, state, changes);\n}\n/* eslint-enable complexity */\n\nfunction getItemIndexByCharacterKey(_a) {\n var keysSoFar = _a.keysSoFar, highlightedIndex = _a.highlightedIndex, items = _a.items, itemToString = _a.itemToString, getItemNodeFromIndex = _a.getItemNodeFromIndex;\n var lowerCasedKeysSoFar = keysSoFar.toLowerCase();\n for (var index = 0; index < items.length; index++) {\n var offsetIndex = (index + highlightedIndex + 1) % items.length;\n var item = items[offsetIndex];\n if (item !== undefined &&\n itemToString(item)\n .toLowerCase()\n .startsWith(lowerCasedKeysSoFar)) {\n var element = getItemNodeFromIndex(offsetIndex);\n if (!(element === null || element === void 0 ? void 0 : element.hasAttribute('disabled'))) {\n return offsetIndex;\n }\n }\n }\n return highlightedIndex;\n}\nvar propTypes$2 = {\n items: PropTypes.array.isRequired,\n itemToString: PropTypes.func,\n getA11yStatusMessage: PropTypes.func,\n getA11ySelectionMessage: PropTypes.func,\n circularNavigation: PropTypes.bool,\n highlightedIndex: PropTypes.number,\n defaultHighlightedIndex: PropTypes.number,\n initialHighlightedIndex: PropTypes.number,\n isOpen: PropTypes.bool,\n defaultIsOpen: PropTypes.bool,\n initialIsOpen: PropTypes.bool,\n selectedItem: PropTypes.any,\n initialSelectedItem: PropTypes.any,\n defaultSelectedItem: PropTypes.any,\n id: PropTypes.string,\n labelId: PropTypes.string,\n menuId: PropTypes.string,\n getItemId: PropTypes.func,\n toggleButtonId: PropTypes.string,\n stateReducer: PropTypes.func,\n onSelectedItemChange: PropTypes.func,\n onHighlightedIndexChange: PropTypes.func,\n onStateChange: PropTypes.func,\n onIsOpenChange: PropTypes.func,\n environment: PropTypes.shape({\n addEventListener: PropTypes.func,\n removeEventListener: PropTypes.func,\n document: PropTypes.shape({\n getElementById: PropTypes.func,\n activeElement: PropTypes.any,\n body: PropTypes.any\n })\n })\n};\n/**\n * Default implementation for status message. Only added when menu is open.\n * Will specift if there are results in the list, and if so, how many,\n * and what keys are relevant.\n *\n * @param {Object} param the downshift state and other relevant properties\n * @return {String} the a11y status message\n */\nfunction getA11yStatusMessage(_a) {\n var isOpen = _a.isOpen, resultCount = _a.resultCount, previousResultCount = _a.previousResultCount;\n if (!isOpen) {\n return '';\n }\n if (!resultCount) {\n return 'No results are available.';\n }\n if (resultCount !== previousResultCount) {\n return resultCount + \" result\" + (resultCount === 1 ? ' is' : 's are') + \" available, use up and down arrow keys to navigate. Press Enter or Space Bar keys to select.\";\n }\n return '';\n}\nvar defaultProps$2 = __assign(__assign({}, defaultProps$3), { getA11yStatusMessage: getA11yStatusMessage });\n// eslint-disable-next-line import/no-mutable-exports\nvar validatePropTypes$2 = noop;\n/* istanbul ignore next */\nif (process.env.NODE_ENV !== 'production') {\n validatePropTypes$2 = function (options, caller) {\n PropTypes.checkPropTypes(propTypes$2, options, 'prop', caller.name);\n };\n}\n\nvar MenuKeyDownArrowDown = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_arrow_down__' : 0;\nvar MenuKeyDownArrowUp = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_arrow_up__' : 1;\nvar MenuKeyDownEscape = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_escape__' : 2;\nvar MenuKeyDownHome = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_home__' : 3;\nvar MenuKeyDownEnd = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_end__' : 4;\nvar MenuKeyDownEnter = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_enter__' : 5;\nvar MenuKeyDownSpaceButton = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_space_button__' : 6;\nvar MenuKeyDownCharacter = process.env.NODE_ENV !== \"production\" ? '__menu_keydown_character__' : 7;\nvar MenuBlur = process.env.NODE_ENV !== \"production\" ? '__menu_blur__' : 8;\nvar MenuMouseLeave$1 = process.env.NODE_ENV !== \"production\" ? '__menu_mouse_leave__' : 9;\nvar ItemMouseMove$1 = process.env.NODE_ENV !== \"production\" ? '__item_mouse_move__' : 10;\nvar ItemClick$1 = process.env.NODE_ENV !== \"production\" ? '__item_click__' : 11;\nvar ToggleButtonClick$1 = process.env.NODE_ENV !== \"production\" ? '__togglebutton_click__' : 12;\nvar ToggleButtonKeyDownArrowDown = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_arrow_down__' : 13;\nvar ToggleButtonKeyDownArrowUp = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_arrow_up__' : 14;\nvar ToggleButtonKeyDownCharacter = process.env.NODE_ENV !== \"production\" ? '__togglebutton_keydown_character__' : 15;\nvar FunctionToggleMenu$1 = process.env.NODE_ENV !== \"production\" ? '__function_toggle_menu__' : 16;\nvar FunctionOpenMenu$1 = process.env.NODE_ENV !== \"production\" ? '__function_open_menu__' : 17;\nvar FunctionCloseMenu$1 = process.env.NODE_ENV !== \"production\" ? '__function_close_menu__' : 18;\nvar FunctionSetHighlightedIndex$1 = process.env.NODE_ENV !== \"production\" ? '__function_set_highlighted_index__' : 19;\nvar FunctionSelectItem$1 = process.env.NODE_ENV !== \"production\" ? '__function_select_item__' : 20;\nvar FunctionSetInputValue$1 = process.env.NODE_ENV !== \"production\" ? '__function_set_input_value__' : 21;\nvar FunctionReset$2 = process.env.NODE_ENV !== \"production\" ? '__function_reset__' : 22;\n\nvar stateChangeTypes$2 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MenuKeyDownArrowDown: MenuKeyDownArrowDown,\n MenuKeyDownArrowUp: MenuKeyDownArrowUp,\n MenuKeyDownEscape: MenuKeyDownEscape,\n MenuKeyDownHome: MenuKeyDownHome,\n MenuKeyDownEnd: MenuKeyDownEnd,\n MenuKeyDownEnter: MenuKeyDownEnter,\n MenuKeyDownSpaceButton: MenuKeyDownSpaceButton,\n MenuKeyDownCharacter: MenuKeyDownCharacter,\n MenuBlur: MenuBlur,\n MenuMouseLeave: MenuMouseLeave$1,\n ItemMouseMove: ItemMouseMove$1,\n ItemClick: ItemClick$1,\n ToggleButtonClick: ToggleButtonClick$1,\n ToggleButtonKeyDownArrowDown: ToggleButtonKeyDownArrowDown,\n ToggleButtonKeyDownArrowUp: ToggleButtonKeyDownArrowUp,\n ToggleButtonKeyDownCharacter: ToggleButtonKeyDownCharacter,\n FunctionToggleMenu: FunctionToggleMenu$1,\n FunctionOpenMenu: FunctionOpenMenu$1,\n FunctionCloseMenu: FunctionCloseMenu$1,\n FunctionSetHighlightedIndex: FunctionSetHighlightedIndex$1,\n FunctionSelectItem: FunctionSelectItem$1,\n FunctionSetInputValue: FunctionSetInputValue$1,\n FunctionReset: FunctionReset$2\n});\n\n/* eslint-disable complexity */\n\nfunction downshiftSelectReducer(state, action) {\n var type = action.type,\n props = action.props,\n shiftKey = action.shiftKey;\n var changes;\n\n switch (type) {\n case ItemClick$1:\n changes = {\n isOpen: getDefaultValue$1(props, 'isOpen'),\n highlightedIndex: getDefaultValue$1(props, 'highlightedIndex'),\n selectedItem: props.items[action.index]\n };\n break;\n\n case ToggleButtonKeyDownCharacter:\n {\n var lowercasedKey = action.key;\n var inputValue = \"\" + state.inputValue + lowercasedKey;\n var itemIndex = getItemIndexByCharacterKey({\n keysSoFar: inputValue,\n highlightedIndex: state.selectedItem ? props.items.indexOf(state.selectedItem) : -1,\n items: props.items,\n itemToString: props.itemToString,\n getItemNodeFromIndex: action.getItemNodeFromIndex\n });\n changes = _extends({\n inputValue: inputValue\n }, itemIndex >= 0 && {\n selectedItem: props.items[itemIndex]\n });\n }\n break;\n\n case ToggleButtonKeyDownArrowDown:\n changes = {\n highlightedIndex: getHighlightedIndexOnOpen(props, state, 1, action.getItemNodeFromIndex),\n isOpen: true\n };\n break;\n\n case ToggleButtonKeyDownArrowUp:\n changes = {\n highlightedIndex: getHighlightedIndexOnOpen(props, state, -1, action.getItemNodeFromIndex),\n isOpen: true\n };\n break;\n\n case MenuKeyDownEnter:\n case MenuKeyDownSpaceButton:\n changes = _extends({\n isOpen: getDefaultValue$1(props, 'isOpen'),\n highlightedIndex: getDefaultValue$1(props, 'highlightedIndex')\n }, state.highlightedIndex >= 0 && {\n selectedItem: props.items[state.highlightedIndex]\n });\n break;\n\n case MenuKeyDownHome:\n changes = {\n highlightedIndex: getNextNonDisabledIndex(1, 0, props.items.length, action.getItemNodeFromIndex, false)\n };\n break;\n\n case MenuKeyDownEnd:\n changes = {\n highlightedIndex: getNextNonDisabledIndex(-1, props.items.length - 1, props.items.length, action.getItemNodeFromIndex, false)\n };\n break;\n\n case MenuKeyDownEscape:\n changes = {\n isOpen: false,\n highlightedIndex: -1\n };\n break;\n\n case MenuBlur:\n changes = {\n isOpen: false,\n highlightedIndex: -1\n };\n break;\n\n case MenuKeyDownCharacter:\n {\n var _lowercasedKey = action.key;\n\n var _inputValue = \"\" + state.inputValue + _lowercasedKey;\n\n var highlightedIndex = getItemIndexByCharacterKey({\n keysSoFar: _inputValue,\n highlightedIndex: state.highlightedIndex,\n items: props.items,\n itemToString: props.itemToString,\n getItemNodeFromIndex: action.getItemNodeFromIndex\n });\n changes = _extends({\n inputValue: _inputValue\n }, highlightedIndex >= 0 && {\n highlightedIndex: highlightedIndex\n });\n }\n break;\n\n case MenuKeyDownArrowDown:\n changes = {\n highlightedIndex: getNextWrappingIndex(shiftKey ? 5 : 1, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, props.circularNavigation)\n };\n break;\n\n case MenuKeyDownArrowUp:\n changes = {\n highlightedIndex: getNextWrappingIndex(shiftKey ? -5 : -1, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, props.circularNavigation)\n };\n break;\n\n case FunctionSelectItem$1:\n changes = {\n selectedItem: action.selectedItem\n };\n break;\n\n default:\n return downshiftCommonReducer(state, action, stateChangeTypes$2);\n }\n\n return _extends({}, state, changes);\n}\n/* eslint-enable complexity */\n\nvar _excluded$2 = [\"onMouseLeave\", \"refKey\", \"onKeyDown\", \"onBlur\", \"ref\"],\n _excluded2$2 = [\"onClick\", \"onKeyDown\", \"refKey\", \"ref\"],\n _excluded3$1 = [\"item\", \"index\", \"onMouseMove\", \"onClick\", \"refKey\", \"ref\"];\nuseSelect.stateChangeTypes = stateChangeTypes$2;\n\nfunction useSelect(userProps) {\n if (userProps === void 0) {\n userProps = {};\n }\n\n validatePropTypes$2(userProps, useSelect); // Props defaults and destructuring.\n\n var props = _extends({}, defaultProps$2, userProps);\n\n var items = props.items,\n scrollIntoView = props.scrollIntoView,\n environment = props.environment,\n initialIsOpen = props.initialIsOpen,\n defaultIsOpen = props.defaultIsOpen,\n itemToString = props.itemToString,\n getA11ySelectionMessage = props.getA11ySelectionMessage,\n getA11yStatusMessage = props.getA11yStatusMessage; // Initial state depending on controlled props.\n\n var initialState = getInitialState$2(props);\n\n var _useControlledReducer = useControlledReducer$1(downshiftSelectReducer, initialState, props),\n state = _useControlledReducer[0],\n dispatch = _useControlledReducer[1];\n\n var isOpen = state.isOpen,\n highlightedIndex = state.highlightedIndex,\n selectedItem = state.selectedItem,\n inputValue = state.inputValue; // Element efs.\n\n var toggleButtonRef = useRef(null);\n var menuRef = useRef(null);\n var itemRefs = useRef({}); // used not to trigger menu blur action in some scenarios.\n\n var shouldBlurRef = useRef(true); // used to keep the inputValue clearTimeout object between renders.\n\n var clearTimeoutRef = useRef(null); // prevent id re-generation between renders.\n\n var elementIds = useElementIds(props); // used to keep track of how many items we had on previous cycle.\n\n var previousResultCountRef = useRef();\n var isInitialMountRef = useRef(true); // utility callback to get item element.\n\n var latest = useLatestRef({\n state: state,\n props: props\n }); // Some utils.\n\n var getItemNodeFromIndex = useCallback(function (index) {\n return itemRefs.current[elementIds.getItemId(index)];\n }, [elementIds]); // Effects.\n // Sets a11y status message on changes in state.\n\n useA11yMessageSetter(getA11yStatusMessage, [isOpen, highlightedIndex, inputValue, items], _extends({\n isInitialMount: isInitialMountRef.current,\n previousResultCount: previousResultCountRef.current,\n items: items,\n environment: environment,\n itemToString: itemToString\n }, state)); // Sets a11y status message on changes in selectedItem.\n\n useA11yMessageSetter(getA11ySelectionMessage, [selectedItem], _extends({\n isInitialMount: isInitialMountRef.current,\n previousResultCount: previousResultCountRef.current,\n items: items,\n environment: environment,\n itemToString: itemToString\n }, state)); // Scroll on highlighted item if change comes from keyboard.\n\n var shouldScrollRef = useScrollIntoView({\n menuElement: menuRef.current,\n highlightedIndex: highlightedIndex,\n isOpen: isOpen,\n itemRefs: itemRefs,\n scrollIntoView: scrollIntoView,\n getItemNodeFromIndex: getItemNodeFromIndex\n }); // Sets cleanup for the keysSoFar callback, debounded after 500ms.\n\n useEffect(function () {\n // init the clean function here as we need access to dispatch.\n clearTimeoutRef.current = debounce(function (outerDispatch) {\n outerDispatch({\n type: FunctionSetInputValue$1,\n inputValue: ''\n });\n }, 500); // Cancel any pending debounced calls on mount\n\n return function () {\n clearTimeoutRef.current.cancel();\n };\n }, []); // Invokes the keysSoFar callback set up above.\n\n useEffect(function () {\n if (!inputValue) {\n return;\n }\n\n clearTimeoutRef.current(dispatch);\n }, [dispatch, inputValue]);\n useControlPropsValidator({\n isInitialMount: isInitialMountRef.current,\n props: props,\n state: state\n });\n /* Controls the focus on the menu or the toggle button. */\n\n useEffect(function () {\n // Don't focus menu on first render.\n if (isInitialMountRef.current) {\n // Unless it was initialised as open.\n if ((initialIsOpen || defaultIsOpen || isOpen) && menuRef.current) {\n menuRef.current.focus();\n }\n\n return;\n } // Focus menu on open.\n\n\n if (isOpen) {\n // istanbul ignore else\n if (menuRef.current) {\n menuRef.current.focus();\n }\n\n return;\n } // Focus toggleButton on close, but not if it was closed with (Shift+)Tab.\n\n\n if (environment.document.activeElement === menuRef.current) {\n // istanbul ignore else\n if (toggleButtonRef.current) {\n shouldBlurRef.current = false;\n toggleButtonRef.current.focus();\n }\n } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n }, [isOpen]);\n useEffect(function () {\n if (isInitialMountRef.current) {\n return;\n }\n\n previousResultCountRef.current = items.length;\n }); // Add mouse/touch events to document.\n\n var mouseAndTouchTrackersRef = useMouseAndTouchTracker(isOpen, [menuRef, toggleButtonRef], environment, function () {\n dispatch({\n type: MenuBlur\n });\n });\n var setGetterPropCallInfo = useGetterPropsCalledChecker('getMenuProps', 'getToggleButtonProps'); // Make initial ref false.\n\n useEffect(function () {\n isInitialMountRef.current = false;\n }, []); // Reset itemRefs on close.\n\n useEffect(function () {\n if (!isOpen) {\n itemRefs.current = {};\n }\n }, [isOpen]); // Event handler functions.\n\n var toggleButtonKeyDownHandlers = useMemo(function () {\n return {\n ArrowDown: function ArrowDown(event) {\n event.preventDefault();\n dispatch({\n type: ToggleButtonKeyDownArrowDown,\n getItemNodeFromIndex: getItemNodeFromIndex,\n shiftKey: event.shiftKey\n });\n },\n ArrowUp: function ArrowUp(event) {\n event.preventDefault();\n dispatch({\n type: ToggleButtonKeyDownArrowUp,\n getItemNodeFromIndex: getItemNodeFromIndex,\n shiftKey: event.shiftKey\n });\n }\n };\n }, [dispatch, getItemNodeFromIndex]);\n var menuKeyDownHandlers = useMemo(function () {\n return {\n ArrowDown: function ArrowDown(event) {\n event.preventDefault();\n dispatch({\n type: MenuKeyDownArrowDown,\n getItemNodeFromIndex: getItemNodeFromIndex,\n shiftKey: event.shiftKey\n });\n },\n ArrowUp: function ArrowUp(event) {\n event.preventDefault();\n dispatch({\n type: MenuKeyDownArrowUp,\n getItemNodeFromIndex: getItemNodeFromIndex,\n shiftKey: event.shiftKey\n });\n },\n Home: function Home(event) {\n event.preventDefault();\n dispatch({\n type: MenuKeyDownHome,\n getItemNodeFromIndex: getItemNodeFromIndex\n });\n },\n End: function End(event) {\n event.preventDefault();\n dispatch({\n type: MenuKeyDownEnd,\n getItemNodeFromIndex: getItemNodeFromIndex\n });\n },\n Escape: function Escape() {\n dispatch({\n type: MenuKeyDownEscape\n });\n },\n Enter: function Enter(event) {\n event.preventDefault();\n dispatch({\n type: MenuKeyDownEnter\n });\n },\n ' ': function _(event) {\n event.preventDefault();\n dispatch({\n type: MenuKeyDownSpaceButton\n });\n }\n };\n }, [dispatch, getItemNodeFromIndex]); // Action functions.\n\n var toggleMenu = useCallback(function () {\n dispatch({\n type: FunctionToggleMenu$1\n });\n }, [dispatch]);\n var closeMenu = useCallback(function () {\n dispatch({\n type: FunctionCloseMenu$1\n });\n }, [dispatch]);\n var openMenu = useCallback(function () {\n dispatch({\n type: FunctionOpenMenu$1\n });\n }, [dispatch]);\n var setHighlightedIndex = useCallback(function (newHighlightedIndex) {\n dispatch({\n type: FunctionSetHighlightedIndex$1,\n highlightedIndex: newHighlightedIndex\n });\n }, [dispatch]);\n var selectItem = useCallback(function (newSelectedItem) {\n dispatch({\n type: FunctionSelectItem$1,\n selectedItem: newSelectedItem\n });\n }, [dispatch]);\n var reset = useCallback(function () {\n dispatch({\n type: FunctionReset$2\n });\n }, [dispatch]);\n var setInputValue = useCallback(function (newInputValue) {\n dispatch({\n type: FunctionSetInputValue$1,\n inputValue: newInputValue\n });\n }, [dispatch]); // Getter functions.\n\n var getLabelProps = useCallback(function (labelProps) {\n return _extends({\n id: elementIds.labelId,\n htmlFor: elementIds.toggleButtonId\n }, labelProps);\n }, [elementIds]);\n var getMenuProps = useCallback(function (_temp, _temp2) {\n var _extends2;\n\n var _ref = _temp === void 0 ? {} : _temp,\n onMouseLeave = _ref.onMouseLeave,\n _ref$refKey = _ref.refKey,\n refKey = _ref$refKey === void 0 ? 'ref' : _ref$refKey,\n onKeyDown = _ref.onKeyDown,\n onBlur = _ref.onBlur,\n ref = _ref.ref,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);\n\n var _ref2 = _temp2 === void 0 ? {} : _temp2,\n _ref2$suppressRefErro = _ref2.suppressRefError,\n suppressRefError = _ref2$suppressRefErro === void 0 ? false : _ref2$suppressRefErro;\n\n var latestState = latest.current.state;\n\n var menuHandleKeyDown = function menuHandleKeyDown(event) {\n var key = normalizeArrowKey(event);\n\n if (key && menuKeyDownHandlers[key]) {\n menuKeyDownHandlers[key](event);\n } else if (isAcceptedCharacterKey(key)) {\n dispatch({\n type: MenuKeyDownCharacter,\n key: key,\n getItemNodeFromIndex: getItemNodeFromIndex\n });\n }\n };\n\n var menuHandleBlur = function menuHandleBlur() {\n // if the blur was a result of selection, we don't trigger this action.\n if (shouldBlurRef.current === false) {\n shouldBlurRef.current = true;\n return;\n }\n\n var shouldBlur = !mouseAndTouchTrackersRef.current.isMouseDown;\n /* istanbul ignore else */\n\n if (shouldBlur) {\n dispatch({\n type: MenuBlur\n });\n }\n };\n\n var menuHandleMouseLeave = function menuHandleMouseLeave() {\n dispatch({\n type: MenuMouseLeave$1\n });\n };\n\n setGetterPropCallInfo('getMenuProps', suppressRefError, refKey, menuRef);\n return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, function (menuNode) {\n menuRef.current = menuNode;\n }), _extends2.id = elementIds.menuId, _extends2.role = 'listbox', _extends2['aria-labelledby'] = elementIds.labelId, _extends2.tabIndex = -1, _extends2), latestState.isOpen && latestState.highlightedIndex > -1 && {\n 'aria-activedescendant': elementIds.getItemId(latestState.highlightedIndex)\n }, {\n onMouseLeave: callAllEventHandlers(onMouseLeave, menuHandleMouseLeave),\n onKeyDown: callAllEventHandlers(onKeyDown, menuHandleKeyDown),\n onBlur: callAllEventHandlers(onBlur, menuHandleBlur)\n }, rest);\n }, [dispatch, latest, menuKeyDownHandlers, mouseAndTouchTrackersRef, setGetterPropCallInfo, elementIds, getItemNodeFromIndex]);\n var getToggleButtonProps = useCallback(function (_temp3, _temp4) {\n var _extends3;\n\n var _ref3 = _temp3 === void 0 ? {} : _temp3,\n onClick = _ref3.onClick,\n onKeyDown = _ref3.onKeyDown,\n _ref3$refKey = _ref3.refKey,\n refKey = _ref3$refKey === void 0 ? 'ref' : _ref3$refKey,\n ref = _ref3.ref,\n rest = _objectWithoutPropertiesLoose(_ref3, _excluded2$2);\n\n var _ref4 = _temp4 === void 0 ? {} : _temp4,\n _ref4$suppressRefErro = _ref4.suppressRefError,\n suppressRefError = _ref4$suppressRefErro === void 0 ? false : _ref4$suppressRefErro;\n\n var toggleButtonHandleClick = function toggleButtonHandleClick() {\n dispatch({\n type: ToggleButtonClick$1\n });\n };\n\n var toggleButtonHandleKeyDown = function toggleButtonHandleKeyDown(event) {\n var key = normalizeArrowKey(event);\n\n if (key && toggleButtonKeyDownHandlers[key]) {\n toggleButtonKeyDownHandlers[key](event);\n } else if (isAcceptedCharacterKey(key)) {\n dispatch({\n type: ToggleButtonKeyDownCharacter,\n key: key,\n getItemNodeFromIndex: getItemNodeFromIndex\n });\n }\n };\n\n var toggleProps = _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function (toggleButtonNode) {\n toggleButtonRef.current = toggleButtonNode;\n }), _extends3.id = elementIds.toggleButtonId, _extends3['aria-haspopup'] = 'listbox', _extends3['aria-expanded'] = latest.current.state.isOpen, _extends3['aria-labelledby'] = elementIds.labelId + \" \" + elementIds.toggleButtonId, _extends3), rest);\n\n if (!rest.disabled) {\n toggleProps.onClick = callAllEventHandlers(onClick, toggleButtonHandleClick);\n toggleProps.onKeyDown = callAllEventHandlers(onKeyDown, toggleButtonHandleKeyDown);\n }\n\n setGetterPropCallInfo('getToggleButtonProps', suppressRefError, refKey, toggleButtonRef);\n return toggleProps;\n }, [dispatch, latest, toggleButtonKeyDownHandlers, setGetterPropCallInfo, elementIds, getItemNodeFromIndex]);\n var getItemProps = useCallback(function (_temp5) {\n var _extends4;\n\n var _ref5 = _temp5 === void 0 ? {} : _temp5,\n item = _ref5.item,\n index = _ref5.index,\n onMouseMove = _ref5.onMouseMove,\n onClick = _ref5.onClick,\n _ref5$refKey = _ref5.refKey,\n refKey = _ref5$refKey === void 0 ? 'ref' : _ref5$refKey,\n ref = _ref5.ref,\n rest = _objectWithoutPropertiesLoose(_ref5, _excluded3$1);\n\n var _latest$current = latest.current,\n latestState = _latest$current.state,\n latestProps = _latest$current.props;\n\n var itemHandleMouseMove = function itemHandleMouseMove() {\n if (index === latestState.highlightedIndex) {\n return;\n }\n\n shouldScrollRef.current = false;\n dispatch({\n type: ItemMouseMove$1,\n index: index\n });\n };\n\n var itemHandleClick = function itemHandleClick() {\n dispatch({\n type: ItemClick$1,\n index: index\n });\n };\n\n var itemIndex = getItemIndex(index, item, latestProps.items);\n\n if (itemIndex < 0) {\n throw new Error('Pass either item or item index in getItemProps!');\n }\n\n var itemProps = _extends((_extends4 = {\n role: 'option',\n 'aria-selected': \"\" + (itemIndex === latestState.highlightedIndex),\n id: elementIds.getItemId(itemIndex)\n }, _extends4[refKey] = handleRefs(ref, function (itemNode) {\n if (itemNode) {\n itemRefs.current[elementIds.getItemId(itemIndex)] = itemNode;\n }\n }), _extends4), rest);\n\n if (!rest.disabled) {\n itemProps.onMouseMove = callAllEventHandlers(onMouseMove, itemHandleMouseMove);\n itemProps.onClick = callAllEventHandlers(onClick, itemHandleClick);\n }\n\n return itemProps;\n }, [dispatch, latest, shouldScrollRef, elementIds]);\n return {\n // prop getters.\n getToggleButtonProps: getToggleButtonProps,\n getLabelProps: getLabelProps,\n getMenuProps: getMenuProps,\n getItemProps: getItemProps,\n // actions.\n toggleMenu: toggleMenu,\n openMenu: openMenu,\n closeMenu: closeMenu,\n setHighlightedIndex: setHighlightedIndex,\n selectItem: selectItem,\n reset: reset,\n setInputValue: setInputValue,\n // state.\n highlightedIndex: highlightedIndex,\n isOpen: isOpen,\n selectedItem: selectedItem,\n inputValue: inputValue\n };\n}\n\nvar InputKeyDownArrowDown = process.env.NODE_ENV !== \"production\" ? '__input_keydown_arrow_down__' : 0;\nvar InputKeyDownArrowUp = process.env.NODE_ENV !== \"production\" ? '__input_keydown_arrow_up__' : 1;\nvar InputKeyDownEscape = process.env.NODE_ENV !== \"production\" ? '__input_keydown_escape__' : 2;\nvar InputKeyDownHome = process.env.NODE_ENV !== \"production\" ? '__input_keydown_home__' : 3;\nvar InputKeyDownEnd = process.env.NODE_ENV !== \"production\" ? '__input_keydown_end__' : 4;\nvar InputKeyDownEnter = process.env.NODE_ENV !== \"production\" ? '__input_keydown_enter__' : 5;\nvar InputChange = process.env.NODE_ENV !== \"production\" ? '__input_change__' : 6;\nvar InputBlur = process.env.NODE_ENV !== \"production\" ? '__input_blur__' : 7;\nvar MenuMouseLeave = process.env.NODE_ENV !== \"production\" ? '__menu_mouse_leave__' : 8;\nvar ItemMouseMove = process.env.NODE_ENV !== \"production\" ? '__item_mouse_move__' : 9;\nvar ItemClick = process.env.NODE_ENV !== \"production\" ? '__item_click__' : 10;\nvar ToggleButtonClick = process.env.NODE_ENV !== \"production\" ? '__togglebutton_click__' : 11;\nvar FunctionToggleMenu = process.env.NODE_ENV !== \"production\" ? '__function_toggle_menu__' : 12;\nvar FunctionOpenMenu = process.env.NODE_ENV !== \"production\" ? '__function_open_menu__' : 13;\nvar FunctionCloseMenu = process.env.NODE_ENV !== \"production\" ? '__function_close_menu__' : 14;\nvar FunctionSetHighlightedIndex = process.env.NODE_ENV !== \"production\" ? '__function_set_highlighted_index__' : 15;\nvar FunctionSelectItem = process.env.NODE_ENV !== \"production\" ? '__function_select_item__' : 16;\nvar FunctionSetInputValue = process.env.NODE_ENV !== \"production\" ? '__function_set_input_value__' : 17;\nvar FunctionReset$1 = process.env.NODE_ENV !== \"production\" ? '__function_reset__' : 18;\nvar ControlledPropUpdatedSelectedItem = process.env.NODE_ENV !== \"production\" ? '__controlled_prop_updated_selected_item__' : 19;\n\nvar stateChangeTypes$1 = /*#__PURE__*/Object.freeze({\n __proto__: null,\n InputKeyDownArrowDown: InputKeyDownArrowDown,\n InputKeyDownArrowUp: InputKeyDownArrowUp,\n InputKeyDownEscape: InputKeyDownEscape,\n InputKeyDownHome: InputKeyDownHome,\n InputKeyDownEnd: InputKeyDownEnd,\n InputKeyDownEnter: InputKeyDownEnter,\n InputChange: InputChange,\n InputBlur: InputBlur,\n MenuMouseLeave: MenuMouseLeave,\n ItemMouseMove: ItemMouseMove,\n ItemClick: ItemClick,\n ToggleButtonClick: ToggleButtonClick,\n FunctionToggleMenu: FunctionToggleMenu,\n FunctionOpenMenu: FunctionOpenMenu,\n FunctionCloseMenu: FunctionCloseMenu,\n FunctionSetHighlightedIndex: FunctionSetHighlightedIndex,\n FunctionSelectItem: FunctionSelectItem,\n FunctionSetInputValue: FunctionSetInputValue,\n FunctionReset: FunctionReset$1,\n ControlledPropUpdatedSelectedItem: ControlledPropUpdatedSelectedItem\n});\n\nfunction getInitialState$1(props) {\n var initialState = getInitialState$2(props);\n var selectedItem = initialState.selectedItem;\n var inputValue = initialState.inputValue;\n\n if (inputValue === '' && selectedItem && props.defaultInputValue === undefined && props.initialInputValue === undefined && props.inputValue === undefined) {\n inputValue = props.itemToString(selectedItem);\n }\n\n return _extends({}, initialState, {\n inputValue: inputValue\n });\n}\n\nvar propTypes$1 = {\n items: PropTypes.array.isRequired,\n itemToString: PropTypes.func,\n getA11yStatusMessage: PropTypes.func,\n getA11ySelectionMessage: PropTypes.func,\n circularNavigation: PropTypes.bool,\n highlightedIndex: PropTypes.number,\n defaultHighlightedIndex: PropTypes.number,\n initialHighlightedIndex: PropTypes.number,\n isOpen: PropTypes.bool,\n defaultIsOpen: PropTypes.bool,\n initialIsOpen: PropTypes.bool,\n selectedItem: PropTypes.any,\n initialSelectedItem: PropTypes.any,\n defaultSelectedItem: PropTypes.any,\n inputValue: PropTypes.string,\n defaultInputValue: PropTypes.string,\n initialInputValue: PropTypes.string,\n id: PropTypes.string,\n labelId: PropTypes.string,\n menuId: PropTypes.string,\n getItemId: PropTypes.func,\n inputId: PropTypes.string,\n toggleButtonId: PropTypes.string,\n stateReducer: PropTypes.func,\n onSelectedItemChange: PropTypes.func,\n onHighlightedIndexChange: PropTypes.func,\n onStateChange: PropTypes.func,\n onIsOpenChange: PropTypes.func,\n onInputValueChange: PropTypes.func,\n environment: PropTypes.shape({\n addEventListener: PropTypes.func,\n removeEventListener: PropTypes.func,\n document: PropTypes.shape({\n getElementById: PropTypes.func,\n activeElement: PropTypes.any,\n body: PropTypes.any\n })\n })\n};\n/**\n * The useCombobox version of useControlledReducer, which also\n * checks if the controlled prop selectedItem changed between\n * renders. If so, it will also update inputValue with its\n * string equivalent. It uses the common useEnhancedReducer to\n * compute the rest of the state.\n *\n * @param {Function} reducer Reducer function from downshift.\n * @param {Object} initialState Initial state of the hook.\n * @param {Object} props The hook props.\n * @returns {Array} An array with the state and an action dispatcher.\n */\n\nfunction useControlledReducer(reducer, initialState, props) {\n var previousSelectedItemRef = useRef();\n\n var _useEnhancedReducer = useEnhancedReducer(reducer, initialState, props),\n state = _useEnhancedReducer[0],\n dispatch = _useEnhancedReducer[1]; // ToDo: if needed, make same approach as selectedItemChanged from Downshift.\n\n\n useEffect(function () {\n if (isControlledProp(props, 'selectedItem')) {\n if (previousSelectedItemRef.current !== props.selectedItem) {\n dispatch({\n type: ControlledPropUpdatedSelectedItem,\n inputValue: props.itemToString(props.selectedItem)\n });\n }\n\n previousSelectedItemRef.current = state.selectedItem === previousSelectedItemRef.current ? props.selectedItem : state.selectedItem;\n }\n });\n return [getState(state, props), dispatch];\n} // eslint-disable-next-line import/no-mutable-exports\n\n\nvar validatePropTypes$1 = noop;\n/* istanbul ignore next */\n\nif (process.env.NODE_ENV !== 'production') {\n validatePropTypes$1 = function validatePropTypes(options, caller) {\n PropTypes.checkPropTypes(propTypes$1, options, 'prop', caller.name);\n };\n}\n\nvar defaultProps$1 = _extends({}, defaultProps$3, {\n getA11yStatusMessage: getA11yStatusMessage$1,\n circularNavigation: true\n});\n\n/* eslint-disable complexity */\n\nfunction downshiftUseComboboxReducer(state, action) {\n var type = action.type,\n props = action.props,\n shiftKey = action.shiftKey;\n var changes;\n\n switch (type) {\n case ItemClick:\n changes = {\n isOpen: getDefaultValue$1(props, 'isOpen'),\n highlightedIndex: getDefaultValue$1(props, 'highlightedIndex'),\n selectedItem: props.items[action.index],\n inputValue: props.itemToString(props.items[action.index])\n };\n break;\n\n case InputKeyDownArrowDown:\n if (state.isOpen) {\n changes = {\n highlightedIndex: getNextWrappingIndex(shiftKey ? 5 : 1, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, props.circularNavigation)\n };\n } else {\n changes = {\n highlightedIndex: getHighlightedIndexOnOpen(props, state, 1, action.getItemNodeFromIndex),\n isOpen: props.items.length >= 0\n };\n }\n\n break;\n\n case InputKeyDownArrowUp:\n if (state.isOpen) {\n changes = {\n highlightedIndex: getNextWrappingIndex(shiftKey ? -5 : -1, state.highlightedIndex, props.items.length, action.getItemNodeFromIndex, props.circularNavigation)\n };\n } else {\n changes = {\n highlightedIndex: getHighlightedIndexOnOpen(props, state, -1, action.getItemNodeFromIndex),\n isOpen: props.items.length >= 0\n };\n }\n\n break;\n\n case InputKeyDownEnter:\n changes = _extends({}, state.isOpen && state.highlightedIndex >= 0 && {\n selectedItem: props.items[state.highlightedIndex],\n isOpen: getDefaultValue$1(props, 'isOpen'),\n highlightedIndex: getDefaultValue$1(props, 'highlightedIndex'),\n inputValue: props.itemToString(props.items[state.highlightedIndex])\n });\n break;\n\n case InputKeyDownEscape:\n changes = _extends({\n isOpen: false,\n highlightedIndex: -1\n }, !state.isOpen && {\n selectedItem: null,\n inputValue: ''\n });\n break;\n\n case InputKeyDownHome:\n changes = {\n highlightedIndex: getNextNonDisabledIndex(1, 0, props.items.length, action.getItemNodeFromIndex, false)\n };\n break;\n\n case InputKeyDownEnd:\n changes = {\n highlightedIndex: getNextNonDisabledIndex(-1, props.items.length - 1, props.items.length, action.getItemNodeFromIndex, false)\n };\n break;\n\n case InputBlur:\n changes = _extends({\n isOpen: false,\n highlightedIndex: -1\n }, state.highlightedIndex >= 0 && action.selectItem && {\n selectedItem: props.items[state.highlightedIndex],\n inputValue: props.itemToString(props.items[state.highlightedIndex])\n });\n break;\n\n case InputChange:\n changes = {\n isOpen: true,\n highlightedIndex: getDefaultValue$1(props, 'highlightedIndex'),\n inputValue: action.inputValue\n };\n break;\n\n case FunctionSelectItem:\n changes = {\n selectedItem: action.selectedItem,\n inputValue: props.itemToString(action.selectedItem)\n };\n break;\n\n case ControlledPropUpdatedSelectedItem:\n changes = {\n inputValue: action.inputValue\n };\n break;\n\n default:\n return downshiftCommonReducer(state, action, stateChangeTypes$1);\n }\n\n return _extends({}, state, changes);\n}\n/* eslint-enable complexity */\n\nvar _excluded$1 = [\"onMouseLeave\", \"refKey\", \"ref\"],\n _excluded2$1 = [\"item\", \"index\", \"refKey\", \"ref\", \"onMouseMove\", \"onClick\", \"onPress\"],\n _excluded3 = [\"onClick\", \"onPress\", \"refKey\", \"ref\"],\n _excluded4 = [\"onKeyDown\", \"onChange\", \"onInput\", \"onBlur\", \"onChangeText\", \"refKey\", \"ref\"],\n _excluded5 = [\"refKey\", \"ref\"];\nuseCombobox.stateChangeTypes = stateChangeTypes$1;\n\nfunction useCombobox(userProps) {\n if (userProps === void 0) {\n userProps = {};\n }\n\n validatePropTypes$1(userProps, useCombobox); // Props defaults and destructuring.\n\n var props = _extends({}, defaultProps$1, userProps);\n\n var initialIsOpen = props.initialIsOpen,\n defaultIsOpen = props.defaultIsOpen,\n items = props.items,\n scrollIntoView = props.scrollIntoView,\n environment = props.environment,\n getA11yStatusMessage = props.getA11yStatusMessage,\n getA11ySelectionMessage = props.getA11ySelectionMessage,\n itemToString = props.itemToString; // Initial state depending on controlled props.\n\n var initialState = getInitialState$1(props);\n\n var _useControlledReducer = useControlledReducer(downshiftUseComboboxReducer, initialState, props),\n state = _useControlledReducer[0],\n dispatch = _useControlledReducer[1];\n\n var isOpen = state.isOpen,\n highlightedIndex = state.highlightedIndex,\n selectedItem = state.selectedItem,\n inputValue = state.inputValue; // Element refs.\n\n var menuRef = useRef(null);\n var itemRefs = useRef({});\n var inputRef = useRef(null);\n var toggleButtonRef = useRef(null);\n var comboboxRef = useRef(null);\n var isInitialMountRef = useRef(true); // prevent id re-generation between renders.\n\n var elementIds = useElementIds(props); // used to keep track of how many items we had on previous cycle.\n\n var previousResultCountRef = useRef(); // utility callback to get item element.\n\n var latest = useLatestRef({\n state: state,\n props: props\n });\n var getItemNodeFromIndex = useCallback(function (index) {\n return itemRefs.current[elementIds.getItemId(index)];\n }, [elementIds]); // Effects.\n // Sets a11y status message on changes in state.\n\n useA11yMessageSetter(getA11yStatusMessage, [isOpen, highlightedIndex, inputValue, items], _extends({\n isInitialMount: isInitialMountRef.current,\n previousResultCount: previousResultCountRef.current,\n items: items,\n environment: environment,\n itemToString: itemToString\n }, state)); // Sets a11y status message on changes in selectedItem.\n\n useA11yMessageSetter(getA11ySelectionMessage, [selectedItem], _extends({\n isInitialMount: isInitialMountRef.current,\n previousResultCount: previousResultCountRef.current,\n items: items,\n environment: environment,\n itemToString: itemToString\n }, state)); // Scroll on highlighted item if change comes from keyboard.\n\n var shouldScrollRef = useScrollIntoView({\n menuElement: menuRef.current,\n highlightedIndex: highlightedIndex,\n isOpen: isOpen,\n itemRefs: itemRefs,\n scrollIntoView: scrollIntoView,\n getItemNodeFromIndex: getItemNodeFromIndex\n });\n useControlPropsValidator({\n isInitialMount: isInitialMountRef.current,\n props: props,\n state: state\n }); // Focus the input on first render if required.\n\n useEffect(function () {\n var focusOnOpen = initialIsOpen || defaultIsOpen || isOpen;\n\n if (focusOnOpen && inputRef.current) {\n inputRef.current.focus();\n } // eslint-disable-next-line react-hooks/exhaustive-deps\n\n }, []);\n useEffect(function () {\n if (isInitialMountRef.current) {\n return;\n }\n\n previousResultCountRef.current = items.length;\n }); // Add mouse/touch events to document.\n\n var mouseAndTouchTrackersRef = useMouseAndTouchTracker(isOpen, [comboboxRef, menuRef, toggleButtonRef], environment, function () {\n dispatch({\n type: InputBlur,\n selectItem: false\n });\n });\n var setGetterPropCallInfo = useGetterPropsCalledChecker('getInputProps', 'getComboboxProps', 'getMenuProps'); // Make initial ref false.\n\n useEffect(function () {\n isInitialMountRef.current = false;\n }, []); // Reset itemRefs on close.\n\n useEffect(function () {\n if (!isOpen) {\n itemRefs.current = {};\n }\n }, [isOpen]);\n /* Event handler functions */\n\n var inputKeyDownHandlers = useMemo(function () {\n return {\n ArrowDown: function ArrowDown(event) {\n event.preventDefault();\n dispatch({\n type: InputKeyDownArrowDown,\n shiftKey: event.shiftKey,\n getItemNodeFromIndex: getItemNodeFromIndex\n });\n },\n ArrowUp: function ArrowUp(event) {\n event.preventDefault();\n dispatch({\n type: InputKeyDownArrowUp,\n shiftKey: event.shiftKey,\n getItemNodeFromIndex: getItemNodeFromIndex\n });\n },\n Home: function Home(event) {\n if (!latest.current.state.isOpen) {\n return;\n }\n\n event.preventDefault();\n dispatch({\n type: InputKeyDownHome,\n getItemNodeFromIndex: getItemNodeFromIndex\n });\n },\n End: function End(event) {\n if (!latest.current.state.isOpen) {\n return;\n }\n\n event.preventDefault();\n dispatch({\n type: InputKeyDownEnd,\n getItemNodeFromIndex: getItemNodeFromIndex\n });\n },\n Escape: function Escape() {\n var latestState = latest.current.state;\n\n if (latestState.isOpen || latestState.inputValue || latestState.selectedItem || latestState.highlightedIndex > -1) {\n dispatch({\n type: InputKeyDownEscape\n });\n }\n },\n Enter: function Enter(event) {\n var latestState = latest.current.state; // if closed or no highlighted index, do nothing.\n\n if (!latestState.isOpen || latestState.highlightedIndex < 0 || event.which === 229 // if IME composing, wait for next Enter keydown event.\n ) {\n return;\n }\n\n event.preventDefault();\n dispatch({\n type: InputKeyDownEnter,\n getItemNodeFromIndex: getItemNodeFromIndex\n });\n }\n };\n }, [dispatch, latest, getItemNodeFromIndex]); // Getter props.\n\n var getLabelProps = useCallback(function (labelProps) {\n return _extends({\n id: elementIds.labelId,\n htmlFor: elementIds.inputId\n }, labelProps);\n }, [elementIds]);\n var getMenuProps = useCallback(function (_temp, _temp2) {\n var _extends2;\n\n var _ref = _temp === void 0 ? {} : _temp,\n onMouseLeave = _ref.onMouseLeave,\n _ref$refKey = _ref.refKey,\n refKey = _ref$refKey === void 0 ? 'ref' : _ref$refKey,\n ref = _ref.ref,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);\n\n var _ref2 = _temp2 === void 0 ? {} : _temp2,\n _ref2$suppressRefErro = _ref2.suppressRefError,\n suppressRefError = _ref2$suppressRefErro === void 0 ? false : _ref2$suppressRefErro;\n\n setGetterPropCallInfo('getMenuProps', suppressRefError, refKey, menuRef);\n return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, function (menuNode) {\n menuRef.current = menuNode;\n }), _extends2.id = elementIds.menuId, _extends2.role = 'listbox', _extends2['aria-labelledby'] = elementIds.labelId, _extends2.onMouseLeave = callAllEventHandlers(onMouseLeave, function () {\n dispatch({\n type: MenuMouseLeave\n });\n }), _extends2), rest);\n }, [dispatch, setGetterPropCallInfo, elementIds]);\n var getItemProps = useCallback(function (_temp3) {\n var _extends3, _ref4;\n\n var _ref3 = _temp3 === void 0 ? {} : _temp3,\n item = _ref3.item,\n index = _ref3.index,\n _ref3$refKey = _ref3.refKey,\n refKey = _ref3$refKey === void 0 ? 'ref' : _ref3$refKey,\n ref = _ref3.ref,\n onMouseMove = _ref3.onMouseMove,\n onClick = _ref3.onClick;\n _ref3.onPress;\n var rest = _objectWithoutPropertiesLoose(_ref3, _excluded2$1);\n\n var _latest$current = latest.current,\n latestProps = _latest$current.props,\n latestState = _latest$current.state;\n var itemIndex = getItemIndex(index, item, latestProps.items);\n\n if (itemIndex < 0) {\n throw new Error('Pass either item or item index in getItemProps!');\n }\n\n var onSelectKey = 'onClick';\n var customClickHandler = onClick;\n\n var itemHandleMouseMove = function itemHandleMouseMove() {\n if (index === latestState.highlightedIndex) {\n return;\n }\n\n shouldScrollRef.current = false;\n dispatch({\n type: ItemMouseMove,\n index: index\n });\n };\n\n var itemHandleClick = function itemHandleClick() {\n dispatch({\n type: ItemClick,\n index: index\n });\n\n if (inputRef.current) {\n inputRef.current.focus();\n }\n };\n\n return _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function (itemNode) {\n if (itemNode) {\n itemRefs.current[elementIds.getItemId(itemIndex)] = itemNode;\n }\n }), _extends3.role = 'option', _extends3['aria-selected'] = \"\" + (itemIndex === latestState.highlightedIndex), _extends3.id = elementIds.getItemId(itemIndex), _extends3), !rest.disabled && (_ref4 = {\n onMouseMove: callAllEventHandlers(onMouseMove, itemHandleMouseMove)\n }, _ref4[onSelectKey] = callAllEventHandlers(customClickHandler, itemHandleClick), _ref4), rest);\n }, [dispatch, latest, shouldScrollRef, elementIds]);\n var getToggleButtonProps = useCallback(function (_temp4) {\n var _extends4;\n\n var _ref5 = _temp4 === void 0 ? {} : _temp4,\n onClick = _ref5.onClick;\n _ref5.onPress;\n var _ref5$refKey = _ref5.refKey,\n refKey = _ref5$refKey === void 0 ? 'ref' : _ref5$refKey,\n ref = _ref5.ref,\n rest = _objectWithoutPropertiesLoose(_ref5, _excluded3);\n\n var toggleButtonHandleClick = function toggleButtonHandleClick() {\n dispatch({\n type: ToggleButtonClick\n });\n\n if (!latest.current.state.isOpen && inputRef.current) {\n inputRef.current.focus();\n }\n };\n\n return _extends((_extends4 = {}, _extends4[refKey] = handleRefs(ref, function (toggleButtonNode) {\n toggleButtonRef.current = toggleButtonNode;\n }), _extends4.id = elementIds.toggleButtonId, _extends4.tabIndex = -1, _extends4), !rest.disabled && _extends({}, {\n onClick: callAllEventHandlers(onClick, toggleButtonHandleClick)\n }), rest);\n }, [dispatch, latest, elementIds]);\n var getInputProps = useCallback(function (_temp5, _temp6) {\n var _extends5;\n\n var _ref6 = _temp5 === void 0 ? {} : _temp5,\n onKeyDown = _ref6.onKeyDown,\n onChange = _ref6.onChange,\n onInput = _ref6.onInput,\n onBlur = _ref6.onBlur;\n _ref6.onChangeText;\n var _ref6$refKey = _ref6.refKey,\n refKey = _ref6$refKey === void 0 ? 'ref' : _ref6$refKey,\n ref = _ref6.ref,\n rest = _objectWithoutPropertiesLoose(_ref6, _excluded4);\n\n var _ref7 = _temp6 === void 0 ? {} : _temp6,\n _ref7$suppressRefErro = _ref7.suppressRefError,\n suppressRefError = _ref7$suppressRefErro === void 0 ? false : _ref7$suppressRefErro;\n\n setGetterPropCallInfo('getInputProps', suppressRefError, refKey, inputRef);\n var latestState = latest.current.state;\n\n var inputHandleKeyDown = function inputHandleKeyDown(event) {\n var key = normalizeArrowKey(event);\n\n if (key && inputKeyDownHandlers[key]) {\n inputKeyDownHandlers[key](event);\n }\n };\n\n var inputHandleChange = function inputHandleChange(event) {\n dispatch({\n type: InputChange,\n inputValue: event.target.value\n });\n };\n\n var inputHandleBlur = function inputHandleBlur() {\n /* istanbul ignore else */\n if (latestState.isOpen && !mouseAndTouchTrackersRef.current.isMouseDown) {\n dispatch({\n type: InputBlur,\n selectItem: true\n });\n }\n };\n /* istanbul ignore next (preact) */\n\n\n var onChangeKey = 'onChange';\n var eventHandlers = {};\n\n if (!rest.disabled) {\n var _eventHandlers;\n\n eventHandlers = (_eventHandlers = {}, _eventHandlers[onChangeKey] = callAllEventHandlers(onChange, onInput, inputHandleChange), _eventHandlers.onKeyDown = callAllEventHandlers(onKeyDown, inputHandleKeyDown), _eventHandlers.onBlur = callAllEventHandlers(onBlur, inputHandleBlur), _eventHandlers);\n }\n\n return _extends((_extends5 = {}, _extends5[refKey] = handleRefs(ref, function (inputNode) {\n inputRef.current = inputNode;\n }), _extends5.id = elementIds.inputId, _extends5['aria-autocomplete'] = 'list', _extends5['aria-controls'] = elementIds.menuId, _extends5), latestState.isOpen && latestState.highlightedIndex > -1 && {\n 'aria-activedescendant': elementIds.getItemId(latestState.highlightedIndex)\n }, {\n 'aria-labelledby': elementIds.labelId,\n // https://developer.mozilla.org/en-US/docs/Web/Security/Securing_your_site/Turning_off_form_autocompletion\n // revert back since autocomplete=\"nope\" is ignored on latest Chrome and Opera\n autoComplete: 'off',\n value: latestState.inputValue\n }, eventHandlers, rest);\n }, [dispatch, inputKeyDownHandlers, latest, mouseAndTouchTrackersRef, setGetterPropCallInfo, elementIds]);\n var getComboboxProps = useCallback(function (_temp7, _temp8) {\n var _extends6;\n\n var _ref8 = _temp7 === void 0 ? {} : _temp7,\n _ref8$refKey = _ref8.refKey,\n refKey = _ref8$refKey === void 0 ? 'ref' : _ref8$refKey,\n ref = _ref8.ref,\n rest = _objectWithoutPropertiesLoose(_ref8, _excluded5);\n\n var _ref9 = _temp8 === void 0 ? {} : _temp8,\n _ref9$suppressRefErro = _ref9.suppressRefError,\n suppressRefError = _ref9$suppressRefErro === void 0 ? false : _ref9$suppressRefErro;\n\n setGetterPropCallInfo('getComboboxProps', suppressRefError, refKey, comboboxRef);\n return _extends((_extends6 = {}, _extends6[refKey] = handleRefs(ref, function (comboboxNode) {\n comboboxRef.current = comboboxNode;\n }), _extends6.role = 'combobox', _extends6['aria-haspopup'] = 'listbox', _extends6['aria-owns'] = elementIds.menuId, _extends6['aria-expanded'] = latest.current.state.isOpen, _extends6), rest);\n }, [latest, setGetterPropCallInfo, elementIds]); // returns\n\n var toggleMenu = useCallback(function () {\n dispatch({\n type: FunctionToggleMenu\n });\n }, [dispatch]);\n var closeMenu = useCallback(function () {\n dispatch({\n type: FunctionCloseMenu\n });\n }, [dispatch]);\n var openMenu = useCallback(function () {\n dispatch({\n type: FunctionOpenMenu\n });\n }, [dispatch]);\n var setHighlightedIndex = useCallback(function (newHighlightedIndex) {\n dispatch({\n type: FunctionSetHighlightedIndex,\n highlightedIndex: newHighlightedIndex\n });\n }, [dispatch]);\n var selectItem = useCallback(function (newSelectedItem) {\n dispatch({\n type: FunctionSelectItem,\n selectedItem: newSelectedItem\n });\n }, [dispatch]);\n var setInputValue = useCallback(function (newInputValue) {\n dispatch({\n type: FunctionSetInputValue,\n inputValue: newInputValue\n });\n }, [dispatch]);\n var reset = useCallback(function () {\n dispatch({\n type: FunctionReset$1\n });\n }, [dispatch]);\n return {\n // prop getters.\n getItemProps: getItemProps,\n getLabelProps: getLabelProps,\n getMenuProps: getMenuProps,\n getInputProps: getInputProps,\n getComboboxProps: getComboboxProps,\n getToggleButtonProps: getToggleButtonProps,\n // actions.\n toggleMenu: toggleMenu,\n openMenu: openMenu,\n closeMenu: closeMenu,\n setHighlightedIndex: setHighlightedIndex,\n setInputValue: setInputValue,\n selectItem: selectItem,\n reset: reset,\n // state.\n highlightedIndex: highlightedIndex,\n isOpen: isOpen,\n selectedItem: selectedItem,\n inputValue: inputValue\n };\n}\n\nvar defaultStateValues = {\n activeIndex: -1,\n selectedItems: []\n};\n/**\n * Returns the initial value for a state key in the following order:\n * 1. controlled prop, 2. initial prop, 3. default prop, 4. default\n * value from Downshift.\n *\n * @param {Object} props Props passed to the hook.\n * @param {string} propKey Props key to generate the value for.\n * @returns {any} The initial value for that prop.\n */\n\nfunction getInitialValue(props, propKey) {\n return getInitialValue$1(props, propKey, defaultStateValues);\n}\n/**\n * Returns the default value for a state key in the following order:\n * 1. controlled prop, 2. default prop, 3. default value from Downshift.\n *\n * @param {Object} props Props passed to the hook.\n * @param {string} propKey Props key to generate the value for.\n * @returns {any} The initial value for that prop.\n */\n\n\nfunction getDefaultValue(props, propKey) {\n return getDefaultValue$1(props, propKey, defaultStateValues);\n}\n/**\n * Gets the initial state based on the provided props. It uses initial, default\n * and controlled props related to state in order to compute the initial value.\n *\n * @param {Object} props Props passed to the hook.\n * @returns {Object} The initial state.\n */\n\n\nfunction getInitialState(props) {\n var activeIndex = getInitialValue(props, 'activeIndex');\n var selectedItems = getInitialValue(props, 'selectedItems');\n return {\n activeIndex: activeIndex,\n selectedItems: selectedItems\n };\n}\n/**\n * Returns true if dropdown keydown operation is permitted. Should not be\n * allowed on keydown with modifier keys (ctrl, alt, shift, meta), on\n * input element with text content that is either highlighted or selection\n * cursor is not at the starting position.\n *\n * @param {KeyboardEvent} event The event from keydown.\n * @returns {boolean} Whether the operation is allowed.\n */\n\n\nfunction isKeyDownOperationPermitted(event) {\n if (event.shiftKey || event.metaKey || event.ctrlKey || event.altKey) {\n return false;\n }\n\n var element = event.target;\n\n if (element instanceof HTMLInputElement && // if element is a text input\n element.value !== '' && (element.selectionStart !== 0 || element.selectionEnd !== 0)) {\n return false;\n }\n\n return true;\n}\n/**\n * Returns a message to be added to aria-live region when item is removed.\n *\n * @param {Object} selectionParameters Parameters required to build the message.\n * @returns {string} The a11y message.\n */\n\n\nfunction getA11yRemovalMessage(selectionParameters) {\n var removedSelectedItem = selectionParameters.removedSelectedItem,\n itemToStringLocal = selectionParameters.itemToString;\n return itemToStringLocal(removedSelectedItem) + \" has been removed.\";\n}\n\nvar propTypes = {\n selectedItems: PropTypes.array,\n initialSelectedItems: PropTypes.array,\n defaultSelectedItems: PropTypes.array,\n itemToString: PropTypes.func,\n getA11yRemovalMessage: PropTypes.func,\n stateReducer: PropTypes.func,\n activeIndex: PropTypes.number,\n initialActiveIndex: PropTypes.number,\n defaultActiveIndex: PropTypes.number,\n onActiveIndexChange: PropTypes.func,\n onSelectedItemsChange: PropTypes.func,\n keyNavigationNext: PropTypes.string,\n keyNavigationPrevious: PropTypes.string,\n environment: PropTypes.shape({\n addEventListener: PropTypes.func,\n removeEventListener: PropTypes.func,\n document: PropTypes.shape({\n getElementById: PropTypes.func,\n activeElement: PropTypes.any,\n body: PropTypes.any\n })\n })\n};\nvar defaultProps = {\n itemToString: defaultProps$3.itemToString,\n stateReducer: defaultProps$3.stateReducer,\n environment: defaultProps$3.environment,\n getA11yRemovalMessage: getA11yRemovalMessage,\n keyNavigationNext: 'ArrowRight',\n keyNavigationPrevious: 'ArrowLeft'\n}; // eslint-disable-next-line import/no-mutable-exports\n\nvar validatePropTypes = noop;\n/* istanbul ignore next */\n\nif (process.env.NODE_ENV !== 'production') {\n validatePropTypes = function validatePropTypes(options, caller) {\n PropTypes.checkPropTypes(propTypes, options, 'prop', caller.name);\n };\n}\n\nvar SelectedItemClick = process.env.NODE_ENV !== \"production\" ? '__selected_item_click__' : 0;\nvar SelectedItemKeyDownDelete = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_delete__' : 1;\nvar SelectedItemKeyDownBackspace = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_backspace__' : 2;\nvar SelectedItemKeyDownNavigationNext = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_navigation_next__' : 3;\nvar SelectedItemKeyDownNavigationPrevious = process.env.NODE_ENV !== \"production\" ? '__selected_item_keydown_navigation_previous__' : 4;\nvar DropdownKeyDownNavigationPrevious = process.env.NODE_ENV !== \"production\" ? '__dropdown_keydown_navigation_previous__' : 5;\nvar DropdownKeyDownBackspace = process.env.NODE_ENV !== \"production\" ? '__dropdown_keydown_backspace__' : 6;\nvar DropdownClick = process.env.NODE_ENV !== \"production\" ? '__dropdown_click__' : 7;\nvar FunctionAddSelectedItem = process.env.NODE_ENV !== \"production\" ? '__function_add_selected_item__' : 8;\nvar FunctionRemoveSelectedItem = process.env.NODE_ENV !== \"production\" ? '__function_remove_selected_item__' : 9;\nvar FunctionSetSelectedItems = process.env.NODE_ENV !== \"production\" ? '__function_set_selected_items__' : 10;\nvar FunctionSetActiveIndex = process.env.NODE_ENV !== \"production\" ? '__function_set_active_index__' : 11;\nvar FunctionReset = process.env.NODE_ENV !== \"production\" ? '__function_reset__' : 12;\n\nvar stateChangeTypes = /*#__PURE__*/Object.freeze({\n __proto__: null,\n SelectedItemClick: SelectedItemClick,\n SelectedItemKeyDownDelete: SelectedItemKeyDownDelete,\n SelectedItemKeyDownBackspace: SelectedItemKeyDownBackspace,\n SelectedItemKeyDownNavigationNext: SelectedItemKeyDownNavigationNext,\n SelectedItemKeyDownNavigationPrevious: SelectedItemKeyDownNavigationPrevious,\n DropdownKeyDownNavigationPrevious: DropdownKeyDownNavigationPrevious,\n DropdownKeyDownBackspace: DropdownKeyDownBackspace,\n DropdownClick: DropdownClick,\n FunctionAddSelectedItem: FunctionAddSelectedItem,\n FunctionRemoveSelectedItem: FunctionRemoveSelectedItem,\n FunctionSetSelectedItems: FunctionSetSelectedItems,\n FunctionSetActiveIndex: FunctionSetActiveIndex,\n FunctionReset: FunctionReset\n});\n\n/* eslint-disable complexity */\n\nfunction downshiftMultipleSelectionReducer(state, action) {\n var type = action.type,\n index = action.index,\n props = action.props,\n selectedItem = action.selectedItem;\n var activeIndex = state.activeIndex,\n selectedItems = state.selectedItems;\n var changes;\n\n switch (type) {\n case SelectedItemClick:\n changes = {\n activeIndex: index\n };\n break;\n\n case SelectedItemKeyDownNavigationPrevious:\n changes = {\n activeIndex: activeIndex - 1 < 0 ? 0 : activeIndex - 1\n };\n break;\n\n case SelectedItemKeyDownNavigationNext:\n changes = {\n activeIndex: activeIndex + 1 >= selectedItems.length ? -1 : activeIndex + 1\n };\n break;\n\n case SelectedItemKeyDownBackspace:\n case SelectedItemKeyDownDelete:\n {\n var newActiveIndex = activeIndex;\n\n if (selectedItems.length === 1) {\n newActiveIndex = -1;\n } else if (activeIndex === selectedItems.length - 1) {\n newActiveIndex = selectedItems.length - 2;\n }\n\n changes = _extends({\n selectedItems: [].concat(selectedItems.slice(0, activeIndex), selectedItems.slice(activeIndex + 1))\n }, {\n activeIndex: newActiveIndex\n });\n break;\n }\n\n case DropdownKeyDownNavigationPrevious:\n changes = {\n activeIndex: selectedItems.length - 1\n };\n break;\n\n case DropdownKeyDownBackspace:\n changes = {\n selectedItems: selectedItems.slice(0, selectedItems.length - 1)\n };\n break;\n\n case FunctionAddSelectedItem:\n changes = {\n selectedItems: [].concat(selectedItems, [selectedItem])\n };\n break;\n\n case DropdownClick:\n changes = {\n activeIndex: -1\n };\n break;\n\n case FunctionRemoveSelectedItem:\n {\n var _newActiveIndex = activeIndex;\n var selectedItemIndex = selectedItems.indexOf(selectedItem);\n\n if (selectedItems.length === 1) {\n _newActiveIndex = -1;\n } else if (selectedItemIndex === selectedItems.length - 1) {\n _newActiveIndex = selectedItems.length - 2;\n }\n\n changes = _extends({\n selectedItems: [].concat(selectedItems.slice(0, selectedItemIndex), selectedItems.slice(selectedItemIndex + 1))\n }, {\n activeIndex: _newActiveIndex\n });\n break;\n }\n\n case FunctionSetSelectedItems:\n {\n var newSelectedItems = action.selectedItems;\n changes = {\n selectedItems: newSelectedItems\n };\n break;\n }\n\n case FunctionSetActiveIndex:\n {\n var _newActiveIndex2 = action.activeIndex;\n changes = {\n activeIndex: _newActiveIndex2\n };\n break;\n }\n\n case FunctionReset:\n changes = {\n activeIndex: getDefaultValue(props, 'activeIndex'),\n selectedItems: getDefaultValue(props, 'selectedItems')\n };\n break;\n\n default:\n throw new Error('Reducer called without proper action type.');\n }\n\n return _extends({}, state, changes);\n}\n\nvar _excluded = [\"refKey\", \"ref\", \"onClick\", \"onKeyDown\", \"selectedItem\", \"index\"],\n _excluded2 = [\"refKey\", \"ref\", \"onKeyDown\", \"onClick\", \"preventKeyAction\"];\nuseMultipleSelection.stateChangeTypes = stateChangeTypes;\n\nfunction useMultipleSelection(userProps) {\n if (userProps === void 0) {\n userProps = {};\n }\n\n validatePropTypes(userProps, useMultipleSelection); // Props defaults and destructuring.\n\n var props = _extends({}, defaultProps, userProps);\n\n var getA11yRemovalMessage = props.getA11yRemovalMessage,\n itemToString = props.itemToString,\n environment = props.environment,\n keyNavigationNext = props.keyNavigationNext,\n keyNavigationPrevious = props.keyNavigationPrevious; // Reducer init.\n\n var _useControlledReducer = useControlledReducer$1(downshiftMultipleSelectionReducer, getInitialState(props), props),\n state = _useControlledReducer[0],\n dispatch = _useControlledReducer[1];\n\n var activeIndex = state.activeIndex,\n selectedItems = state.selectedItems; // Refs.\n\n var isInitialMountRef = useRef(true);\n var dropdownRef = useRef(null);\n var previousSelectedItemsRef = useRef(selectedItems);\n var selectedItemRefs = useRef();\n selectedItemRefs.current = [];\n var latest = useLatestRef({\n state: state,\n props: props\n }); // Effects.\n\n /* Sets a11y status message on changes in selectedItem. */\n\n useEffect(function () {\n if (isInitialMountRef.current) {\n return;\n }\n\n if (selectedItems.length < previousSelectedItemsRef.current.length) {\n var removedSelectedItem = previousSelectedItemsRef.current.find(function (item) {\n return selectedItems.indexOf(item) < 0;\n });\n setStatus(getA11yRemovalMessage({\n itemToString: itemToString,\n resultCount: selectedItems.length,\n removedSelectedItem: removedSelectedItem,\n activeIndex: activeIndex,\n activeSelectedItem: selectedItems[activeIndex]\n }), environment.document);\n }\n\n previousSelectedItemsRef.current = selectedItems; // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [selectedItems.length]); // Sets focus on active item.\n\n useEffect(function () {\n if (isInitialMountRef.current) {\n return;\n }\n\n if (activeIndex === -1 && dropdownRef.current) {\n dropdownRef.current.focus();\n } else if (selectedItemRefs.current[activeIndex]) {\n selectedItemRefs.current[activeIndex].focus();\n }\n }, [activeIndex]);\n useControlPropsValidator({\n isInitialMount: isInitialMountRef.current,\n props: props,\n state: state\n });\n var setGetterPropCallInfo = useGetterPropsCalledChecker('getDropdownProps'); // Make initial ref false.\n\n useEffect(function () {\n isInitialMountRef.current = false;\n }, []); // Event handler functions.\n\n var selectedItemKeyDownHandlers = useMemo(function () {\n var _ref;\n\n return _ref = {}, _ref[keyNavigationPrevious] = function () {\n dispatch({\n type: SelectedItemKeyDownNavigationPrevious\n });\n }, _ref[keyNavigationNext] = function () {\n dispatch({\n type: SelectedItemKeyDownNavigationNext\n });\n }, _ref.Delete = function Delete() {\n dispatch({\n type: SelectedItemKeyDownDelete\n });\n }, _ref.Backspace = function Backspace() {\n dispatch({\n type: SelectedItemKeyDownBackspace\n });\n }, _ref;\n }, [dispatch, keyNavigationNext, keyNavigationPrevious]);\n var dropdownKeyDownHandlers = useMemo(function () {\n var _ref2;\n\n return _ref2 = {}, _ref2[keyNavigationPrevious] = function (event) {\n if (isKeyDownOperationPermitted(event)) {\n dispatch({\n type: DropdownKeyDownNavigationPrevious\n });\n }\n }, _ref2.Backspace = function Backspace(event) {\n if (isKeyDownOperationPermitted(event)) {\n dispatch({\n type: DropdownKeyDownBackspace\n });\n }\n }, _ref2;\n }, [dispatch, keyNavigationPrevious]); // Getter props.\n\n var getSelectedItemProps = useCallback(function (_temp) {\n var _extends2;\n\n var _ref3 = _temp === void 0 ? {} : _temp,\n _ref3$refKey = _ref3.refKey,\n refKey = _ref3$refKey === void 0 ? 'ref' : _ref3$refKey,\n ref = _ref3.ref,\n onClick = _ref3.onClick,\n onKeyDown = _ref3.onKeyDown,\n selectedItem = _ref3.selectedItem,\n index = _ref3.index,\n rest = _objectWithoutPropertiesLoose(_ref3, _excluded);\n\n var latestState = latest.current.state;\n var itemIndex = getItemIndex(index, selectedItem, latestState.selectedItems);\n\n if (itemIndex < 0) {\n throw new Error('Pass either selectedItem or index in getSelectedItemProps!');\n }\n\n var selectedItemHandleClick = function selectedItemHandleClick() {\n dispatch({\n type: SelectedItemClick,\n index: index\n });\n };\n\n var selectedItemHandleKeyDown = function selectedItemHandleKeyDown(event) {\n var key = normalizeArrowKey(event);\n\n if (key && selectedItemKeyDownHandlers[key]) {\n selectedItemKeyDownHandlers[key](event);\n }\n };\n\n return _extends((_extends2 = {}, _extends2[refKey] = handleRefs(ref, function (selectedItemNode) {\n if (selectedItemNode) {\n selectedItemRefs.current.push(selectedItemNode);\n }\n }), _extends2.tabIndex = index === latestState.activeIndex ? 0 : -1, _extends2.onClick = callAllEventHandlers(onClick, selectedItemHandleClick), _extends2.onKeyDown = callAllEventHandlers(onKeyDown, selectedItemHandleKeyDown), _extends2), rest);\n }, [dispatch, latest, selectedItemKeyDownHandlers]);\n var getDropdownProps = useCallback(function (_temp2, _temp3) {\n var _extends3;\n\n var _ref4 = _temp2 === void 0 ? {} : _temp2,\n _ref4$refKey = _ref4.refKey,\n refKey = _ref4$refKey === void 0 ? 'ref' : _ref4$refKey,\n ref = _ref4.ref,\n onKeyDown = _ref4.onKeyDown,\n onClick = _ref4.onClick,\n _ref4$preventKeyActio = _ref4.preventKeyAction,\n preventKeyAction = _ref4$preventKeyActio === void 0 ? false : _ref4$preventKeyActio,\n rest = _objectWithoutPropertiesLoose(_ref4, _excluded2);\n\n var _ref5 = _temp3 === void 0 ? {} : _temp3,\n _ref5$suppressRefErro = _ref5.suppressRefError,\n suppressRefError = _ref5$suppressRefErro === void 0 ? false : _ref5$suppressRefErro;\n\n setGetterPropCallInfo('getDropdownProps', suppressRefError, refKey, dropdownRef);\n\n var dropdownHandleKeyDown = function dropdownHandleKeyDown(event) {\n var key = normalizeArrowKey(event);\n\n if (key && dropdownKeyDownHandlers[key]) {\n dropdownKeyDownHandlers[key](event);\n }\n };\n\n var dropdownHandleClick = function dropdownHandleClick() {\n dispatch({\n type: DropdownClick\n });\n };\n\n return _extends((_extends3 = {}, _extends3[refKey] = handleRefs(ref, function (dropdownNode) {\n if (dropdownNode) {\n dropdownRef.current = dropdownNode;\n }\n }), _extends3), !preventKeyAction && {\n onKeyDown: callAllEventHandlers(onKeyDown, dropdownHandleKeyDown),\n onClick: callAllEventHandlers(onClick, dropdownHandleClick)\n }, rest);\n }, [dispatch, dropdownKeyDownHandlers, setGetterPropCallInfo]); // returns\n\n var addSelectedItem = useCallback(function (selectedItem) {\n dispatch({\n type: FunctionAddSelectedItem,\n selectedItem: selectedItem\n });\n }, [dispatch]);\n var removeSelectedItem = useCallback(function (selectedItem) {\n dispatch({\n type: FunctionRemoveSelectedItem,\n selectedItem: selectedItem\n });\n }, [dispatch]);\n var setSelectedItems = useCallback(function (newSelectedItems) {\n dispatch({\n type: FunctionSetSelectedItems,\n selectedItems: newSelectedItems\n });\n }, [dispatch]);\n var setActiveIndex = useCallback(function (newActiveIndex) {\n dispatch({\n type: FunctionSetActiveIndex,\n activeIndex: newActiveIndex\n });\n }, [dispatch]);\n var reset = useCallback(function () {\n dispatch({\n type: FunctionReset\n });\n }, [dispatch]);\n return {\n getSelectedItemProps: getSelectedItemProps,\n getDropdownProps: getDropdownProps,\n addSelectedItem: addSelectedItem,\n removeSelectedItem: removeSelectedItem,\n setSelectedItems: setSelectedItems,\n setActiveIndex: setActiveIndex,\n reset: reset,\n selectedItems: selectedItems,\n activeIndex: activeIndex\n };\n}\n\nexport { Downshift$1 as default, resetIdCounter, useCombobox, useMultipleSelection, useSelect };\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import * as React from 'react';\nexport var ManagerReferenceNodeContext = React.createContext();\nexport var ManagerReferenceNodeSetterContext = React.createContext();\nexport function Manager(_ref) {\n var children = _ref.children;\n\n var _React$useState = React.useState(null),\n referenceNode = _React$useState[0],\n setReferenceNode = _React$useState[1];\n\n var hasUnmounted = React.useRef(false);\n React.useEffect(function () {\n return function () {\n hasUnmounted.current = true;\n };\n }, []);\n var handleSetReferenceNode = React.useCallback(function (node) {\n if (!hasUnmounted.current) {\n setReferenceNode(node);\n }\n }, []);\n return /*#__PURE__*/React.createElement(ManagerReferenceNodeContext.Provider, {\n value: referenceNode\n }, /*#__PURE__*/React.createElement(ManagerReferenceNodeSetterContext.Provider, {\n value: handleSetReferenceNode\n }, children));\n}","import * as React from 'react';\n\n/**\n * Takes an argument and if it's an array, returns the first item in the array,\n * otherwise returns the argument. Used for Preact compatibility.\n */\nexport var unwrapArray = function unwrapArray(arg) {\n return Array.isArray(arg) ? arg[0] : arg;\n};\n/**\n * Takes a maybe-undefined function and arbitrary args and invokes the function\n * only if it is defined.\n */\n\nexport var safeInvoke = function safeInvoke(fn) {\n if (typeof fn === 'function') {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return fn.apply(void 0, args);\n }\n};\n/**\n * Sets a ref using either a ref callback or a ref object\n */\n\nexport var setRef = function setRef(ref, node) {\n // if its a function call it\n if (typeof ref === 'function') {\n return safeInvoke(ref, node);\n } // otherwise we should treat it as a ref object\n else if (ref != null) {\n ref.current = node;\n }\n};\n/**\n * Simple ponyfill for Object.fromEntries\n */\n\nexport var fromEntries = function fromEntries(entries) {\n return entries.reduce(function (acc, _ref) {\n var key = _ref[0],\n value = _ref[1];\n acc[key] = value;\n return acc;\n }, {});\n};\n/**\n * Small wrapper around `useLayoutEffect` to get rid of the warning on SSR envs\n */\n\nexport var useIsomorphicLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? React.useLayoutEffect : React.useEffect;","export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];","export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}","export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}","import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };","import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};","import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}","// import { isHTMLElement } from './instanceOf';\nexport default function getBoundingClientRect(element, // eslint-disable-next-line unused-imports/no-unused-vars\nincludeScale) {\n if (includeScale === void 0) {\n includeScale = false;\n }\n\n var rect = element.getBoundingClientRect();\n var scaleX = 1;\n var scaleY = 1; // FIXME:\n // `offsetWidth` returns an integer while `getBoundingClientRect`\n // returns a float. This results in `scaleX` or `scaleY` being\n // non-1 when it should be for elements that aren't a full pixel in\n // width or height.\n // if (isHTMLElement(element) && includeScale) {\n // const offsetHeight = element.offsetHeight;\n // const offsetWidth = element.offsetWidth;\n // // Do not attempt to divide by 0, otherwise we get `Infinity` as scale\n // // Fallback to 1 in case both values are `0`\n // if (offsetWidth > 0) {\n // scaleX = rect.width / offsetWidth || 1;\n // }\n // if (offsetHeight > 0) {\n // scaleY = rect.height / offsetHeight || 1;\n // }\n // }\n\n return {\n width: rect.width / scaleX,\n height: rect.height / scaleY,\n top: rect.top / scaleY,\n right: rect.right / scaleX,\n bottom: rect.bottom / scaleY,\n left: rect.left / scaleX,\n x: rect.left / scaleX,\n y: rect.top / scaleY\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}","import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}","import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}","import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}","import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}","import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}","import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}","export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}","export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;","import { max as mathMax, min as mathMin } from \"./math.js\";\nexport default function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}","import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}","export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}","export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}","export default function getVariation(placement) {\n return placement.split('-')[1];\n}","import { top, left, right, bottom, end } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n variation = _ref2.variation,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets;\n\n var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,\n _ref3$x = _ref3.x,\n x = _ref3$x === void 0 ? 0 : _ref3$x,\n _ref3$y = _ref3.y,\n y = _ref3$y === void 0 ? 0 : _ref3$y;\n\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static' && position === 'absolute') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top || (placement === left || placement === right) && variation === end) {\n sideY = bottom; // $FlowFixMe[prop-missing]\n\n y -= offsetParent[heightProp] - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left || (placement === top || placement === bottom) && variation === end) {\n sideX = right; // $FlowFixMe[prop-missing]\n\n x -= offsetParent[widthProp] - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) <= 1 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref4) {\n var state = _ref4.state,\n options = _ref4.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n variation: getVariation(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};","import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};","var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}","var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}","import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}","import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}","import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}","import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}","export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}","import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element) {\n var rect = getBoundingClientRect(element);\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}","import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nexport default function getViewportRect(element) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n // can be obscured underneath it.\n // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n // if it isn't open, so if this isn't available, the popper will be detected\n // to overflow the bottom of the screen too early.\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n // Feature detection fails in mobile emulation mode in Chrome.\n // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n // 0.001\n // Fallback here: \"Not Safari\" userAgent\n\n if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}","import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}","import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}","import getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);\n var referenceClientRect = getBoundingClientRect(state.elements.reference);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}","import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}","import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};","import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n\nfunction isElementScaled(element) {\n var rect = element.getBoundingClientRect();\n var scaleX = rect.width / element.offsetWidth || 1;\n var scaleY = rect.height / element.offsetHeight || 1;\n return scaleX !== 1 || scaleY !== 1;\n} // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent, true);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}","import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}","export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}","import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}","import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(setOptionsAction) {\n var options = typeof setOptionsAction === 'function' ? setOptionsAction(state.options) : setOptionsAction;\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update – it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update – it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };","export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}","export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}","import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";","import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\";\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};","import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases – research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};","import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport within from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { max as mathMax, min as mathMin } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis || checkAltAxis) {\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = popperOffsets[mainAxis] + overflow[mainSide];\n var max = popperOffsets[mainAxis] - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;\n var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;\n\n if (checkMainAxis) {\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var _preventedOffset = within(tether ? mathMin(_min, tetherMin) : _min, _offset, tether ? mathMax(_max, tetherMax) : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};","export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}","import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport within from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};","/* global Map:readonly, Set:readonly, ArrayBuffer:readonly */\n\nvar hasElementType = typeof Element !== 'undefined';\nvar hasMap = typeof Map === 'function';\nvar hasSet = typeof Set === 'function';\nvar hasArrayBuffer = typeof ArrayBuffer === 'function' && !!ArrayBuffer.isView;\n\n// Note: We **don't** need `envHasBigInt64Array` in fde es6/index.js\n\nfunction equal(a, b) {\n // START: fast-deep-equal es6/index.js 3.1.1\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n // START: Modifications:\n // 1. Extra `has &&` helpers in initial condition allow es6 code\n // to co-exist with es5.\n // 2. Replace `for of` with es5 compliant iteration using `for`.\n // Basically, take:\n //\n // ```js\n // for (i of a.entries())\n // if (!b.has(i[0])) return false;\n // ```\n //\n // ... and convert to:\n //\n // ```js\n // it = a.entries();\n // while (!(i = it.next()).done)\n // if (!b.has(i.value[0])) return false;\n // ```\n //\n // **Note**: `i` access switches to `i.value`.\n var it;\n if (hasMap && (a instanceof Map) && (b instanceof Map)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!equal(i.value[1], b.get(i.value[0]))) return false;\n return true;\n }\n\n if (hasSet && (a instanceof Set) && (b instanceof Set)) {\n if (a.size !== b.size) return false;\n it = a.entries();\n while (!(i = it.next()).done)\n if (!b.has(i.value[0])) return false;\n return true;\n }\n // END: Modifications\n\n if (hasArrayBuffer && ArrayBuffer.isView(a) && ArrayBuffer.isView(b)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (a[i] !== b[i]) return false;\n return true;\n }\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n // END: fast-deep-equal\n\n // START: react-fast-compare\n // custom handling for DOM elements\n if (hasElementType && a instanceof Element) return false;\n\n // custom handling for React/Preact\n for (i = length; i-- !== 0;) {\n if ((keys[i] === '_owner' || keys[i] === '__v' || keys[i] === '__o') && a.$$typeof) {\n // React-specific: avoid traversing React elements' _owner\n // Preact-specific: avoid traversing Preact elements' __v and __o\n // __v = $_original / $_vnode\n // __o = $_owner\n // These properties contain circular references and are not needed when\n // comparing the actual elements (and not their owners)\n // .$$typeof and ._store on just reasonable markers of elements\n\n continue;\n }\n\n // all other properties should be traversed as usual\n if (!equal(a[keys[i]], b[keys[i]])) return false;\n }\n // END: react-fast-compare\n\n // START: fast-deep-equal\n return true;\n }\n\n return a !== a && b !== b;\n}\n// end fast-deep-equal\n\nmodule.exports = function isEqual(a, b) {\n try {\n return equal(a, b);\n } catch (error) {\n if (((error.message || '').match(/stack|recursion/i))) {\n // warn on circular references, don't crash\n // browsers give this different errors name and messages:\n // chrome/safari: \"RangeError\", \"Maximum call stack size exceeded\"\n // firefox: \"InternalError\", too much recursion\"\n // edge: \"Error\", \"Out of stack space\"\n console.warn('react-fast-compare cannot handle circular refs');\n return false;\n }\n // some other error. we should definitely know about these\n throw error;\n }\n};\n","import * as React from 'react';\nimport { createPopper as defaultCreatePopper } from '@popperjs/core';\nimport isEqual from 'react-fast-compare';\nimport { fromEntries, useIsomorphicLayoutEffect } from './utils';\nvar EMPTY_MODIFIERS = [];\nexport var usePopper = function usePopper(referenceElement, popperElement, options) {\n if (options === void 0) {\n options = {};\n }\n\n var prevOptions = React.useRef(null);\n var optionsWithDefaults = {\n onFirstUpdate: options.onFirstUpdate,\n placement: options.placement || 'bottom',\n strategy: options.strategy || 'absolute',\n modifiers: options.modifiers || EMPTY_MODIFIERS\n };\n\n var _React$useState = React.useState({\n styles: {\n popper: {\n position: optionsWithDefaults.strategy,\n left: '0',\n top: '0'\n },\n arrow: {\n position: 'absolute'\n }\n },\n attributes: {}\n }),\n state = _React$useState[0],\n setState = _React$useState[1];\n\n var updateStateModifier = React.useMemo(function () {\n return {\n name: 'updateState',\n enabled: true,\n phase: 'write',\n fn: function fn(_ref) {\n var state = _ref.state;\n var elements = Object.keys(state.elements);\n setState({\n styles: fromEntries(elements.map(function (element) {\n return [element, state.styles[element] || {}];\n })),\n attributes: fromEntries(elements.map(function (element) {\n return [element, state.attributes[element]];\n }))\n });\n },\n requires: ['computeStyles']\n };\n }, []);\n var popperOptions = React.useMemo(function () {\n var newOptions = {\n onFirstUpdate: optionsWithDefaults.onFirstUpdate,\n placement: optionsWithDefaults.placement,\n strategy: optionsWithDefaults.strategy,\n modifiers: [].concat(optionsWithDefaults.modifiers, [updateStateModifier, {\n name: 'applyStyles',\n enabled: false\n }])\n };\n\n if (isEqual(prevOptions.current, newOptions)) {\n return prevOptions.current || newOptions;\n } else {\n prevOptions.current = newOptions;\n return newOptions;\n }\n }, [optionsWithDefaults.onFirstUpdate, optionsWithDefaults.placement, optionsWithDefaults.strategy, optionsWithDefaults.modifiers, updateStateModifier]);\n var popperInstanceRef = React.useRef();\n useIsomorphicLayoutEffect(function () {\n if (popperInstanceRef.current) {\n popperInstanceRef.current.setOptions(popperOptions);\n }\n }, [popperOptions]);\n useIsomorphicLayoutEffect(function () {\n if (referenceElement == null || popperElement == null) {\n return;\n }\n\n var createPopper = options.createPopper || defaultCreatePopper;\n var popperInstance = createPopper(referenceElement, popperElement, popperOptions);\n popperInstanceRef.current = popperInstance;\n return function () {\n popperInstance.destroy();\n popperInstanceRef.current = null;\n };\n }, [referenceElement, popperElement, options.createPopper]);\n return {\n state: popperInstanceRef.current ? popperInstanceRef.current.state : null,\n styles: state.styles,\n attributes: state.attributes,\n update: popperInstanceRef.current ? popperInstanceRef.current.update : null,\n forceUpdate: popperInstanceRef.current ? popperInstanceRef.current.forceUpdate : null\n };\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"children\", \"className\", \"alignItems\", \"width\"];\nimport React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport Box from '../../Box';\nimport styles from './index.module.scss';\nvar LabelWrapper = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n className = _ref.className,\n alignItems = _ref.alignItems,\n width = _ref.width,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(Box, _extends({\n alignItems: alignItems === 'baseline' ? 'baseline' : 'center',\n width: width === 'full' ? 'full' : 'auto',\n display: \"inline-flex\",\n className: cx(styles.root, className),\n ref: ref\n }, rest), children);\n});\nLabelWrapper.displayName = 'LabelWrapper';\nLabelWrapper.identifier = LabelWrapper.displayName; // used in docs website\n\nLabelWrapper.propTypes = {\n /** alignItems baseline or center */\n alignItems: PropTypes.string,\n\n /** Contents displayed within the Wrapper. */\n children: PropTypes.node,\n\n /** Extend classNames. */\n className: PropTypes.string,\n\n /** Width full or auto */\n width: PropTypes.oneOf(['auto', 'full'])\n};\nLabelWrapper.defaultProps = {\n width: 'full'\n};\nexport default LabelWrapper;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"size\", \"as\"];\nimport React, { forwardRef } from 'react';\nimport cx from 'classnames';\nimport Base from '../Base';\nimport system from '../../system';\nimport styles from './index.module.scss';\n/**\n * Note!\n *\n * This component is extended by Heading, Paragraph & Caption\n * Changes will also affect those components\n */\n\nvar SYSTEM_PROPS = ['colorProps', 'flexProps', 'marginProps', 'textProps', 'floatProps', 'displayProps'];\nvar Text = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _classnames;\n\n var size = _ref.size,\n as = _ref.as,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var classnames = (_classnames = {}, _classnames[styles.root] = true, _classnames[styles.heading1] = size === 'Heading1', _classnames[styles.heading2] = size === 'Heading2', _classnames[styles.heading3] = size === 'Heading3', _classnames[styles.heading4] = size === 'Heading4', _classnames[styles.heading5] = size === 'Heading5', _classnames[styles.heading6] = size === 'Heading6', _classnames[styles.paragraph] = size === 'Paragraph', _classnames[styles.caption1] = size === 'Caption1', _classnames[styles.caption2] = size === 'Caption2', _classnames);\n\n var _system = system(props, SYSTEM_PROPS),\n className = _system[0],\n style = _system[1],\n rest = _system[2];\n\n return /*#__PURE__*/React.createElement(Base, _extends({\n as: as,\n className: cx(classnames, className),\n ref: ref,\n style: style\n }, rest));\n});\nText.displayName = 'Text';\nText.identifier = Text.displayName;\nText.clonableProps = SYSTEM_PROPS;\nText.defaultProps = {\n as: 'span',\n size: 'Heading6'\n};\nexport default Text;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"as\", \"children\", \"className\", \"size\", \"fontWeight\", \"fontFamily\"];\nimport React, { forwardRef } from 'react';\nimport cx from 'classnames';\nimport Text from '../../Text';\nimport styles from './index.module.scss';\nvar PrimaryLabel = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _classnames;\n\n var as = _ref.as,\n children = _ref.children,\n className = _ref.className,\n size = _ref.size,\n fontWeight = _ref.fontWeight,\n fontFamily = _ref.fontFamily,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var classnames = (_classnames = {}, _classnames[styles.root] = true, _classnames);\n return /*#__PURE__*/React.createElement(Text, _extends({}, rest, {\n as: as,\n className: cx(classnames, className),\n ref: ref,\n size: size,\n fontWeight: fontWeight,\n fontFamily: fontFamily\n }), children);\n});\nPrimaryLabel.displayName = 'PrimaryLabel';\nPrimaryLabel.identifier = PrimaryLabel.displayName; // used in docs website\n\nPrimaryLabel.defaultProps = {\n as: 'div',\n fontWeight: 'medium',\n size: 'Heading6',\n fontFamily: 'system'\n};\nexport default PrimaryLabel;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"children\", \"className\"];\nimport React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport styles from './index.module.scss';\nvar OptionalLabel = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n className = _ref.className,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: cx(styles.root, className),\n ref: ref\n }, rest), \"(\" + children + \")\");\n});\nOptionalLabel.displayName = 'OptionalLabel';\nOptionalLabel.identifier = OptionalLabel.displayName; // used in docs website\n\nOptionalLabel.propTypes = {\n /** Contents displayed within the OptionalLabel. */\n children: PropTypes.node,\n\n /** Extend classNames. */\n className: PropTypes.string\n};\nexport default OptionalLabel;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"children\", \"className\"];\nimport React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport styles from './index.module.scss';\nvar ActionLabel = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var children = _ref.children,\n className = _ref.className,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n className: cx(styles.root, className),\n ref: ref\n }, rest), children);\n});\nActionLabel.displayName = 'ActionLabel';\nActionLabel.identifier = ActionLabel.displayName; // used in docs website\n\nActionLabel.propTypes = {\n /** Contents displayed within the ActionLabel. */\n children: PropTypes.node,\n\n /** Extend classNames. */\n className: PropTypes.string\n};\nexport default ActionLabel;","import styles from './index.module.scss';\n\nvar getPlacement = function getPlacement(placement) {\n switch (placement) {\n case 'left':\n return {\n rootClassName: styles.containerLeft,\n iconClassName: styles.iconContainerLeft,\n labelWidth: 'full',\n labelLeftMargin: 0,\n inputClassName: styles.inputLeft\n };\n\n default:\n return {\n rootClassName: styles.containerRight,\n iconClassName: styles.iconContainerRight,\n labelWidth: 'auto',\n labelLeftMargin: 5,\n inputClassName: styles.inputRight\n };\n }\n};\n\nexport default getPlacement;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"action\", \"children\", \"className\", \"htmlFor\", \"id\", \"optional\", \"width\", \"hidden\", \"alignItems\"];\nimport React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport Box from '../Box';\nimport LabelWrapper from './LabelWrapper';\nimport PrimaryLabel from './PrimaryLabel';\nimport OptionalLabel from './OptionalLabel';\nimport ActionLabel from './ActionLabel'; // import InfoLabel from './InfoLabel';\n\nimport styles from './index.module.scss';\nexport { default as getPlacement } from './getPlacement';\nvar Label = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var action = _ref.action,\n children = _ref.children,\n className = _ref.className,\n htmlFor = _ref.htmlFor,\n id = _ref.id,\n optional = _ref.optional,\n width = _ref.width,\n hidden = _ref.hidden,\n alignItems = _ref.alignItems,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(LabelWrapper, {\n width: width,\n alignItems: alignItems,\n className: cx(className, hidden && styles.hidden)\n }, /*#__PURE__*/React.createElement(PrimaryLabel, _extends({\n as: \"label\",\n htmlFor: htmlFor,\n id: id,\n ref: ref\n }, rest), /*#__PURE__*/React.createElement(Box, {\n as: \"span\",\n mr: 1\n }, children), optional && /*#__PURE__*/React.createElement(OptionalLabel, null, optional)), action && /*#__PURE__*/React.createElement(ActionLabel, null, action));\n});\nLabel.displayName = 'Label';\nLabel.identifier = Label.displayName; // used in docs website\n\nLabel.clonableProps = ['marginProps', 'floatProps'];\nLabel.propTypes = {\n /** Contents displayed within the ActionLabel. */\n action: PropTypes.node,\n\n /** alignItems baseline or center */\n alignItems: PropTypes.string,\n\n /** Contents displayed within the PrimaryLabel. */\n children: PropTypes.node.isRequired,\n\n /** Extend classNames. */\n className: PropTypes.string,\n\n /** FontWeight atom. */\n fontWeight: PropTypes.oneOf(['inherit', 'regular', 'medium', 'bold']),\n\n /** Visibly hide the label. */\n hidden: PropTypes.bool,\n\n /** HTML For attribute, which references to a specific input. */\n htmlFor: PropTypes.string,\n\n /** Native HTML id attribute. */\n id: PropTypes.string,\n\n /** Contents displayed within the OptionalLabel. */\n optional: PropTypes.string,\n\n /** Width full or auto */\n width: PropTypes.oneOf(['auto', 'full'])\n};\nexport default Label;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"level\"];\n\n/* eslint-disable import/order */\nimport React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport Text from '../Text';\nvar SYSTEM_PROPS = Text.clonableProps; // No need for internal system, system enherits from Text\n\nvar Caption = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var level = _ref.level,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(Text, _extends({\n ref: ref\n }, rest, {\n size: \"Caption\" + level\n }));\n});\nCaption.displayName = 'Caption';\nCaption.identifier = Caption.displayName;\nCaption.clonableProps = SYSTEM_PROPS;\nCaption.defaultProps = {\n as: 'p',\n decoration: 'none',\n fontFamily: 'system',\n fontWeight: 'regular',\n level: 1,\n textAlign: 'inherit'\n};\nCaption.propTypes = {\n /** Change the rendered HTML tag e.g. span, p, h1 */\n as: PropTypes.oneOfType([PropTypes.func, PropTypes.string, PropTypes.node, PropTypes.object]),\n\n /** Content for component *required */\n children: PropTypes.node.isRequired,\n\n /** Extend classNames. */\n className: PropTypes.string,\n\n /** Changes the Caption's color, choose one of the tokens. */\n color: PropTypes.string,\n\n /** Sets the css text-decoration property. */\n decoration: PropTypes.oneOf(['inherit', 'none', 'underline', 'line-through']),\n\n /** Sets the css font-family property. */\n fontFamily: PropTypes.oneOf(['inherit', 'primary', 'secondary', 'system']),\n\n /** Sets the css font-style property. */\n fontStyle: PropTypes.oneOf(['inherit', 'normal', 'italic', 'oblique']),\n\n /** Sets the css font-weight property. */\n fontWeight: PropTypes.oneOf(['inherit', 'regular', 'medium', 'bold']),\n\n /** Maps token scale to font-size and line-height */\n level: PropTypes.oneOf([1, 2]),\n\n /** Extend style. */\n style: PropTypes.shape({}),\n\n /** Sets the css text-align property. */\n textAlign: PropTypes.oneOf(['inherit', 'left', 'right', 'center', 'justify']),\n\n /** Sets the css text-transform property. */\n textTransform: PropTypes.oneOf(['inherit', 'none', 'capitalize', 'uppercase', 'lowercase'])\n};\nexport default Caption;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"id\", \"children\", \"error\"];\nimport React, { forwardRef } from 'react';\nimport PropTypes from 'prop-types';\nimport cx from 'classnames';\nimport { Error as IcoError } from '@mediahuis/chameleon-theme-wl/icons';\nimport Caption from '../Caption';\nimport Icon from '../Icon';\nimport styles from './index.module.scss';\nvar Message = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var id = _ref.id,\n children = _ref.children,\n error = _ref.error,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(Caption, _extends({\n as: \"div\",\n color: error ? 'redBase' : 'grey50',\n id: id,\n ref: ref,\n role: error ? 'alert' : undefined,\n className: cx(styles.root, rest.className)\n }, rest), error && /*#__PURE__*/React.createElement(Icon, {\n className: styles.icon,\n as: IcoError,\n size: \"small\"\n }), children);\n});\nMessage.displayName = 'Message';\nMessage.identifier = Message.displayName; // used in docs website\n\nMessage.clonableProps = ['marginProps', 'paddingProps', 'floatProps'];\nMessage.propTypes = {\n /** Contents displayed within the message. */\n children: PropTypes.node,\n\n /** Visually displayed as error text. Will add the necessary role attribute. */\n error: PropTypes.bool,\n\n /** Id of the element, required for reference. */\n id: PropTypes.string\n};\nexport default Message;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"children\"];\nimport React, { forwardRef } from 'react';\nimport cx from 'classnames';\nimport PropTypes from 'prop-types';\nimport styles from './index.module.scss';\n/**\n * Screenreader\n *\n * Provides text for screen readers that is visually hidden.\n * It is the logical opposite of the `aria-hidden` attribute.\n *\n * @see https://snook.ca/archives/html_and_css/hiding-content-for-accessibility\n * @see https://a11yproject.com/posts/how-to-hide-content/\n * @see Docs https://reacttraining.com/reach-ui/screenreader\n * @see Source https://github.com/reach/reach-ui/tree/master/packages/screenreader\n */\n\nvar Screenreader = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var className = _ref.className,\n children = _ref.children,\n rest = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n return /*#__PURE__*/React.createElement(\"span\", _extends({\n ref: ref,\n className: cx(styles.root, className)\n }, rest), children);\n});\nScreenreader.displayName = 'Screenreader';\nScreenreader.identifier = Screenreader.displayName;\nScreenreader.clonableProps = [];\nScreenreader.propTypes = {\n /** Text for screen readers that is visually hidden. */\n children: PropTypes.node.isRequired,\n\n /** Extend classNames. */\n className: PropTypes.string\n};\nScreenreader.defaultProps = {};\nexport default Screenreader;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _excluded = [\"accessibilityLabel\", \"appearance\", \"as\", \"circular\", \"color\", \"disabled\", \"icon\", \"name\", \"onClick\", \"size\"];\nimport React, { forwardRef } from 'react';\nimport cx from 'classnames';\nimport system, { getColor } from '../../system';\nimport Base from '../Base';\nimport Screenreader from '../Screenreader';\nimport Icon from '../Icon';\nimport styles from './index.module.scss';\nvar SYSTEM_PROPS = ['flexProps', 'marginProps', 'floatProps', 'positioningProps'];\nvar IconButton = /*#__PURE__*/forwardRef(function (_ref, ref) {\n var _classnames;\n\n var accessibilityLabel = _ref.accessibilityLabel,\n appearance = _ref.appearance,\n as = _ref.as,\n circular = _ref.circular,\n color = _ref.color,\n disabled = _ref.disabled,\n icon = _ref.icon,\n name = _ref.name,\n onClick = _ref.onClick,\n size = _ref.size,\n props = _objectWithoutPropertiesLoose(_ref, _excluded);\n\n var _getColor = getColor(color),\n colorSystemStyle = _getColor[1]; // Only use color with appearance `default`\n\n\n var colorStyle = appearance === 'default' ? colorSystemStyle : undefined;\n\n var _system = system(props, SYSTEM_PROPS),\n className = _system[0],\n style = _system[1],\n rest = _system[2];\n\n var classnames = (_classnames = {}, _classnames[styles.root] = true, _classnames[styles.small] = size === 'small', _classnames[styles.large] = size === 'large', _classnames[styles.default] = appearance === 'default', _classnames[styles.primary] = appearance === 'primary', _classnames[styles.secondary] = appearance === 'secondary', _classnames[styles.plain] = appearance === 'plain', _classnames[styles.outline] = appearance === 'outline', _classnames[styles.disabled] = disabled, _classnames[styles.square] = !circular, _classnames[styles.circular] = circular, _classnames); // TODO: remove when name is being removed from icon\n\n var iconProps = name ? {\n name: name\n } : {\n as: icon\n };\n\n if (name) {\n // eslint-disable-next-line\n console.warn('[DEPRECATED](IconButton): \"name\" is deprecated. Use the \"icon\" prop instead.');\n }\n\n return /*#__PURE__*/React.createElement(Base, _extends({\n as: as,\n className: cx(classnames, className),\n style: _extends({\n color: colorStyle\n }, style),\n disabled: disabled,\n ref: ref,\n onClick: onClick\n }, rest), /*#__PURE__*/React.createElement(Icon, _extends({\n \"aria-hidden\": \"true\"\n }, iconProps, {\n size: \"small\"\n })), accessibilityLabel || name ? /*#__PURE__*/React.createElement(Screenreader, null, accessibilityLabel || name) : null);\n});\nIconButton.displayName = 'IconButton';\nIconButton.identifier = IconButton.displayName; // used in docs website\n\nIconButton.clonableProps = SYSTEM_PROPS;\nIconButton.defaultProps = {\n appearance: 'default',\n as: 'button',\n size: 'large',\n flexShrink: 0\n};\nexport default IconButton;","import { useState, useEffect } from 'react';\nimport { gridBreakpointXSmall, gridBreakpointSmall, gridBreakpointMedium, gridBreakpointLarge, gridBreakpointXLarge } from '@mediahuis/chameleon-theme-wl';\nimport { canUseDOM } from '../../utils';\n\nvar convertValuesObjectToArray = function convertValuesObjectToArray(values) {\n var xs = values.xs;\n var sm = values.sm !== undefined ? values.sm : xs;\n var md = values.md !== undefined ? values.md : sm;\n var lg = values.lg !== undefined ? values.lg : md;\n var xl = values.xl !== undefined ? values.xl : lg;\n return [xs, sm, md, lg, xl];\n};\n\nvar convertValuesToFallbackArray = function convertValuesToFallbackArray(values) {\n var xs = values[0];\n var sm = values[1] !== undefined ? values[1] : xs;\n var md = values[2] !== undefined ? values[2] : sm;\n var lg = values[3] !== undefined ? values[3] : md;\n var xl = values[4] !== undefined ? values[4] : lg;\n return [xs, sm, md, lg, xl];\n};\n\nvar queries = {\n xs: \"screen and (min-width: \" + gridBreakpointXSmall + \")\",\n sm: \"screen and (min-width: \" + gridBreakpointSmall + \")\",\n md: \"screen and (min-width: \" + gridBreakpointMedium + \")\",\n lg: \"screen and (min-width: \" + gridBreakpointLarge + \")\",\n xl: \"screen and (min-width: \" + gridBreakpointXLarge + \")\"\n};\n\nvar useMediaQuery = function useMediaQuery(values, defaultValue) {\n // SSR fallback\n if (!canUseDOM || !window.matchMedia) {\n // eslint-disable-line\n return defaultValue;\n } // Array containing a media query list for each query\n\n\n var mediaQueryLists = Object.keys(queries).map(function (l) {\n return window.matchMedia(queries[l]);\n } // eslint-disable-line\n ); // Function that gets value based on matching media query\n\n var getValue = function getValue() {\n // Get index of last media query that matches\n var index = mediaQueryLists.filter(function (mql) {\n return mql.matches;\n }).length - 1;\n\n if (Array.isArray(values)) {\n var valuesArray = convertValuesToFallbackArray(values);\n\n if (typeof valuesArray[index] !== 'undefined') {\n return valuesArray[index];\n }\n }\n\n if (typeof values === 'object') {\n // Convert object to array\n var _valuesArray = convertValuesObjectToArray(values);\n\n if (typeof _valuesArray[index] !== 'undefined') {\n return _valuesArray[index];\n }\n } // Return defaultValue if none\n\n\n return defaultValue;\n }; // State and setter for matched value\n\n\n var _useState = useState(getValue),\n value = _useState[0],\n setValue = _useState[1];\n\n useEffect(function () {\n // Event listener callback\n var handler = function handler() {\n return setValue(getValue);\n }; // Set a listener for each media query with above handler as callback.\n\n\n mediaQueryLists.forEach(function (mql) {\n return mql.addListener(handler);\n }); // Remove listeners on cleanup\n\n return function () {\n mediaQueryLists.forEach(function (mql) {\n return mql.removeListener(handler);\n });\n };\n }, [] // Empty array ensures effect is only run on mount and unmount\n );\n return value;\n};\n\nexport default useMediaQuery;","/*!\n* tabbable 5.2.1\n* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE\n*/\nvar candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable=\"false\"])', 'details>summary:first-of-type', 'details'];\nvar candidateSelector = /* #__PURE__ */candidateSelectors.join(',');\nvar matches = typeof Element === 'undefined' ? function () {} : Element.prototype.matches || Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector;\n\nvar getCandidates = function getCandidates(el, includeContainer, filter) {\n var candidates = Array.prototype.slice.apply(el.querySelectorAll(candidateSelector));\n\n if (includeContainer && matches.call(el, candidateSelector)) {\n candidates.unshift(el);\n }\n\n candidates = candidates.filter(filter);\n return candidates;\n};\n\nvar isContentEditable = function isContentEditable(node) {\n return node.contentEditable === 'true';\n};\n\nvar getTabindex = function getTabindex(node) {\n var tabindexAttr = parseInt(node.getAttribute('tabindex'), 10);\n\n if (!isNaN(tabindexAttr)) {\n return tabindexAttr;\n } // Browsers do not return `tabIndex` correctly for contentEditable nodes;\n // so if they don't have a tabindex attribute specifically set, assume it's 0.\n\n\n if (isContentEditable(node)) {\n return 0;\n } // in Chrome,
,