{"version":3,"file":"reduxPersist.131ff2fd.js","sources":["../../../node_modules/react-redux/es/hooks/useStore.js","../../../node_modules/react-redux/es/hooks/useDispatch.js","../../../node_modules/consolidated-events/lib/index.esm.js","../../../node_modules/react-waypoint/node_modules/react-is/cjs/react-is.production.min.js","../../../node_modules/react-waypoint/node_modules/react-is/index.js","../../../node_modules/react-waypoint/es/index.js","../../../frontend/features/common/hooks/useClickOutsideNode.js","../../../frontend/features/common/utils/reduxPersist.js"],"sourcesContent":["import { useContext } from 'react';\nimport { ReactReduxContext } from '../components/Context';\nimport { useReduxContext as useDefaultReduxContext } from './useReduxContext';\n/**\r\n * Hook factory, which creates a `useStore` hook bound to a given context.\r\n *\r\n * @param {React.Context} [context=ReactReduxContext] Context passed to your ``.\r\n * @returns {Function} A `useStore` hook bound to the specified context.\r\n */\n\nexport function createStoreHook(context = ReactReduxContext) {\n const useReduxContext = // @ts-ignore\n context === ReactReduxContext ? useDefaultReduxContext : () => useContext(context);\n return function useStore() {\n const {\n store\n } = useReduxContext(); // @ts-ignore\n\n return store;\n };\n}\n/**\r\n * A hook to access the redux store.\r\n *\r\n * @returns {any} the redux store\r\n *\r\n * @example\r\n *\r\n * import React from 'react'\r\n * import { useStore } from 'react-redux'\r\n *\r\n * export const ExampleComponent = () => {\r\n * const store = useStore()\r\n * return
{store.getState()}
\r\n * }\r\n */\n\nexport const useStore = /*#__PURE__*/createStoreHook();","import { ReactReduxContext } from '../components/Context';\nimport { useStore as useDefaultStore, createStoreHook } from './useStore';\n/**\r\n * Hook factory, which creates a `useDispatch` hook bound to a given context.\r\n *\r\n * @param {React.Context} [context=ReactReduxContext] Context passed to your ``.\r\n * @returns {Function} A `useDispatch` hook bound to the specified context.\r\n */\n\nexport function createDispatchHook(context = ReactReduxContext) {\n const useStore = // @ts-ignore\n context === ReactReduxContext ? useDefaultStore : createStoreHook(context);\n return function useDispatch() {\n const store = useStore(); // @ts-ignore\n\n return store.dispatch;\n };\n}\n/**\r\n * A hook to access the redux `dispatch` function.\r\n *\r\n * @returns {any|function} redux store's `dispatch` function\r\n *\r\n * @example\r\n *\r\n * import React, { useCallback } from 'react'\r\n * import { useDispatch } from 'react-redux'\r\n *\r\n * export const CounterComponent = ({ value }) => {\r\n * const dispatch = useDispatch()\r\n * const increaseCounter = useCallback(() => dispatch({ type: 'increase-counter' }), [])\r\n * return (\r\n *
\r\n * {value}\r\n * \r\n *
\r\n * )\r\n * }\r\n */\n\nexport const useDispatch = /*#__PURE__*/createDispatchHook();","var CAN_USE_DOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);\n\n// Adapted from Modernizr\n// https://github.com/Modernizr/Modernizr/blob/acb3f0d9/feature-detects/dom/passiveeventlisteners.js#L26-L37\nfunction testPassiveEventListeners() {\n if (!CAN_USE_DOM) {\n return false;\n }\n\n if (!window.addEventListener || !window.removeEventListener || !Object.defineProperty) {\n return false;\n }\n\n var supportsPassiveOption = false;\n try {\n var opts = Object.defineProperty({}, 'passive', {\n // eslint-disable-next-line getter-return\n get: function () {\n function get() {\n supportsPassiveOption = true;\n }\n\n return get;\n }()\n });\n var noop = function noop() {};\n window.addEventListener('testPassiveEventSupport', noop, opts);\n window.removeEventListener('testPassiveEventSupport', noop, opts);\n } catch (e) {\n // do nothing\n }\n\n return supportsPassiveOption;\n}\n\nvar memoized = void 0;\n\nfunction canUsePassiveEventListeners() {\n if (memoized === undefined) {\n memoized = testPassiveEventListeners();\n }\n return memoized;\n}\n\nfunction normalizeEventOptions(eventOptions) {\n if (!eventOptions) {\n return undefined;\n }\n\n if (!canUsePassiveEventListeners()) {\n // If the browser does not support the passive option, then it is expecting\n // a boolean for the options argument to specify whether it should use\n // capture or not. In more modern browsers, this is passed via the `capture`\n // option, so let's just hoist that value up.\n return !!eventOptions.capture;\n }\n\n return eventOptions;\n}\n\n/* eslint-disable no-bitwise */\n\n/**\n * Generate a unique key for any set of event options\n */\nfunction eventOptionsKey(normalizedEventOptions) {\n if (!normalizedEventOptions) {\n return 0;\n }\n\n // If the browser does not support passive event listeners, the normalized\n // event options will be a boolean.\n if (normalizedEventOptions === true) {\n return 100;\n }\n\n // At this point, the browser supports passive event listeners, so we expect\n // the event options to be an object with possible properties of capture,\n // passive, and once.\n //\n // We want to consistently return the same value, regardless of the order of\n // these properties, so let's use binary maths to assign each property to a\n // bit, and then add those together (with an offset to account for the\n // booleans at the beginning of this function).\n var capture = normalizedEventOptions.capture << 0;\n var passive = normalizedEventOptions.passive << 1;\n var once = normalizedEventOptions.once << 2;\n return capture + passive + once;\n}\n\nfunction ensureCanMutateNextEventHandlers(eventHandlers) {\n if (eventHandlers.handlers === eventHandlers.nextHandlers) {\n // eslint-disable-next-line no-param-reassign\n eventHandlers.nextHandlers = eventHandlers.handlers.slice();\n }\n}\n\nfunction TargetEventHandlers(target) {\n this.target = target;\n this.events = {};\n}\n\nTargetEventHandlers.prototype.getEventHandlers = function () {\n function getEventHandlers(eventName, options) {\n var key = String(eventName) + ' ' + String(eventOptionsKey(options));\n\n if (!this.events[key]) {\n this.events[key] = {\n handlers: [],\n handleEvent: undefined\n };\n this.events[key].nextHandlers = this.events[key].handlers;\n }\n\n return this.events[key];\n }\n\n return getEventHandlers;\n}();\n\nTargetEventHandlers.prototype.handleEvent = function () {\n function handleEvent(eventName, options, event) {\n var eventHandlers = this.getEventHandlers(eventName, options);\n eventHandlers.handlers = eventHandlers.nextHandlers;\n eventHandlers.handlers.forEach(function (handler) {\n if (handler) {\n // We need to check for presence here because a handler function may\n // cause later handlers to get removed. This can happen if you for\n // instance have a waypoint that unmounts another waypoint as part of an\n // onEnter/onLeave handler.\n handler(event);\n }\n });\n }\n\n return handleEvent;\n}();\n\nTargetEventHandlers.prototype.add = function () {\n function add(eventName, listener, options) {\n var _this = this;\n\n // options has already been normalized at this point.\n var eventHandlers = this.getEventHandlers(eventName, options);\n\n ensureCanMutateNextEventHandlers(eventHandlers);\n\n if (eventHandlers.nextHandlers.length === 0) {\n eventHandlers.handleEvent = this.handleEvent.bind(this, eventName, options);\n\n this.target.addEventListener(eventName, eventHandlers.handleEvent, options);\n }\n\n eventHandlers.nextHandlers.push(listener);\n\n var isSubscribed = true;\n var unsubscribe = function () {\n function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n\n ensureCanMutateNextEventHandlers(eventHandlers);\n var index = eventHandlers.nextHandlers.indexOf(listener);\n eventHandlers.nextHandlers.splice(index, 1);\n\n if (eventHandlers.nextHandlers.length === 0) {\n // All event handlers have been removed, so we want to remove the event\n // listener from the target node.\n\n if (_this.target) {\n // There can be a race condition where the target may no longer exist\n // when this function is called, e.g. when a React component is\n // unmounting. Guarding against this prevents the following error:\n //\n // Cannot read property 'removeEventListener' of undefined\n _this.target.removeEventListener(eventName, eventHandlers.handleEvent, options);\n }\n\n eventHandlers.handleEvent = undefined;\n }\n }\n\n return unsubscribe;\n }();\n return unsubscribe;\n }\n\n return add;\n}();\n\nvar EVENT_HANDLERS_KEY = '__consolidated_events_handlers__';\n\n// eslint-disable-next-line import/prefer-default-export\nfunction addEventListener(target, eventName, listener, options) {\n if (!target[EVENT_HANDLERS_KEY]) {\n // eslint-disable-next-line no-param-reassign\n target[EVENT_HANDLERS_KEY] = new TargetEventHandlers(target);\n }\n var normalizedEventOptions = normalizeEventOptions(options);\n return target[EVENT_HANDLERS_KEY].add(eventName, listener, normalizedEventOptions);\n}\n\nexport { addEventListener };\n","/** @license React v17.0.2\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\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'use strict';var b=60103,c=60106,d=60107,e=60108,f=60114,g=60109,h=60110,k=60112,l=60113,m=60120,n=60115,p=60116,q=60121,r=60122,u=60117,v=60129,w=60131;\nif(\"function\"===typeof Symbol&&Symbol.for){var x=Symbol.for;b=x(\"react.element\");c=x(\"react.portal\");d=x(\"react.fragment\");e=x(\"react.strict_mode\");f=x(\"react.profiler\");g=x(\"react.provider\");h=x(\"react.context\");k=x(\"react.forward_ref\");l=x(\"react.suspense\");m=x(\"react.suspense_list\");n=x(\"react.memo\");p=x(\"react.lazy\");q=x(\"react.block\");r=x(\"react.server.block\");u=x(\"react.fundamental\");v=x(\"react.debug_trace_mode\");w=x(\"react.legacy_hidden\")}\nfunction y(a){if(\"object\"===typeof a&&null!==a){var t=a.$$typeof;switch(t){case b:switch(a=a.type,a){case d:case f:case e:case l:case m:return a;default:switch(a=a&&a.$$typeof,a){case h:case k:case p:case n:case g:return a;default:return t}}case c:return t}}}var z=g,A=b,B=k,C=d,D=p,E=n,F=c,G=f,H=e,I=l;exports.ContextConsumer=h;exports.ContextProvider=z;exports.Element=A;exports.ForwardRef=B;exports.Fragment=C;exports.Lazy=D;exports.Memo=E;exports.Portal=F;exports.Profiler=G;exports.StrictMode=H;\nexports.Suspense=I;exports.isAsyncMode=function(){return!1};exports.isConcurrentMode=function(){return!1};exports.isContextConsumer=function(a){return y(a)===h};exports.isContextProvider=function(a){return y(a)===g};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===b};exports.isForwardRef=function(a){return y(a)===k};exports.isFragment=function(a){return y(a)===d};exports.isLazy=function(a){return y(a)===p};exports.isMemo=function(a){return y(a)===n};\nexports.isPortal=function(a){return y(a)===c};exports.isProfiler=function(a){return y(a)===f};exports.isStrictMode=function(a){return y(a)===e};exports.isSuspense=function(a){return y(a)===l};exports.isValidElementType=function(a){return\"string\"===typeof a||\"function\"===typeof a||a===d||a===f||a===v||a===e||a===l||a===m||a===w||\"object\"===typeof a&&null!==a&&(a.$$typeof===p||a.$$typeof===n||a.$$typeof===g||a.$$typeof===h||a.$$typeof===k||a.$$typeof===u||a.$$typeof===q||a[0]===r)?!0:!1};\nexports.typeOf=y;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","import _inheritsLoose from '@babel/runtime/helpers/esm/inheritsLoose';\nimport { addEventListener } from 'consolidated-events';\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport { isForwardRef } from 'react-is';\n\n/**\n * Attempts to parse the offset provided as a prop as a percentage. For\n * instance, if the component has been provided with the string \"20%\" as\n * a value of one of the offset props. If the value matches, then it returns\n * a numeric version of the prop. For instance, \"20%\" would become `0.2`.\n * If `str` isn't a percentage, then `undefined` will be returned.\n *\n * @param {string} str The value of an offset prop to be converted to a\n * number.\n * @return {number|undefined} The numeric version of `str`. Undefined if `str`\n * was not a percentage.\n */\nfunction parseOffsetAsPercentage(str) {\n if (str.slice(-1) === '%') {\n return parseFloat(str.slice(0, -1)) / 100;\n }\n\n return undefined;\n}\n\n/**\n * Attempts to parse the offset provided as a prop as a pixel value. If\n * parsing fails, then `undefined` is returned. Three examples of values that\n * will be successfully parsed are:\n * `20`\n * \"20px\"\n * \"20\"\n *\n * @param {string|number} str A string of the form \"{number}\" or \"{number}px\",\n * or just a number.\n * @return {number|undefined} The numeric version of `str`. Undefined if `str`\n * was neither a number nor string ending in \"px\".\n */\nfunction parseOffsetAsPixels(str) {\n if (!isNaN(parseFloat(str)) && isFinite(str)) {\n return parseFloat(str);\n }\n\n if (str.slice(-2) === 'px') {\n return parseFloat(str.slice(0, -2));\n }\n\n return undefined;\n}\n\n/**\n * @param {string|number} offset\n * @param {number} contextHeight\n * @return {number} A number representing `offset` converted into pixels.\n */\n\nfunction computeOffsetPixels(offset, contextHeight) {\n var pixelOffset = parseOffsetAsPixels(offset);\n\n if (typeof pixelOffset === 'number') {\n return pixelOffset;\n }\n\n var percentOffset = parseOffsetAsPercentage(offset);\n\n if (typeof percentOffset === 'number') {\n return percentOffset * contextHeight;\n }\n\n return undefined;\n}\n\nvar ABOVE = 'above';\nvar INSIDE = 'inside';\nvar BELOW = 'below';\nvar INVISIBLE = 'invisible';\n\nfunction debugLog() {\n if (process.env.NODE_ENV !== 'production') {\n var _console;\n\n (_console = console).log.apply(_console, arguments); // eslint-disable-line no-console\n\n }\n}\n\n/**\n * When an element's type is a string, it represents a DOM node with that tag name\n * https://facebook.github.io/react/blog/2015/12/18/react-components-elements-and-instances.html#dom-elements\n *\n * @param {React.element} Component\n * @return {bool} Whether the component is a DOM Element\n */\nfunction isDOMElement(Component) {\n return typeof Component.type === 'string';\n}\n\nvar errorMessage = ' needs a DOM element to compute boundaries. The child you passed is neither a ' + 'DOM element (e.g.
) nor does it use the innerRef prop.\\n\\n' + 'See https://goo.gl/LrBNgw for more info.';\n/**\n * Raise an error if \"children\" is not a DOM Element and there is no ref provided to Waypoint\n *\n * @param {?React.element} children\n * @param {?HTMLElement} ref\n * @return {undefined}\n */\n\nfunction ensureRefIsProvidedByChild(children, ref) {\n if (children && !isDOMElement(children) && !ref) {\n throw new Error(errorMessage);\n }\n}\n\n/**\n * @param {object} bounds An object with bounds data for the waypoint and\n * scrollable parent\n * @return {string} The current position of the waypoint in relation to the\n * visible portion of the scrollable parent. One of the constants `ABOVE`,\n * `BELOW`, `INSIDE` or `INVISIBLE`.\n */\n\nfunction getCurrentPosition(bounds) {\n if (bounds.viewportBottom - bounds.viewportTop === 0) {\n return INVISIBLE;\n } // top is within the viewport\n\n\n if (bounds.viewportTop <= bounds.waypointTop && bounds.waypointTop <= bounds.viewportBottom) {\n return INSIDE;\n } // bottom is within the viewport\n\n\n if (bounds.viewportTop <= bounds.waypointBottom && bounds.waypointBottom <= bounds.viewportBottom) {\n return INSIDE;\n } // top is above the viewport and bottom is below the viewport\n\n\n if (bounds.waypointTop <= bounds.viewportTop && bounds.viewportBottom <= bounds.waypointBottom) {\n return INSIDE;\n }\n\n if (bounds.viewportBottom < bounds.waypointTop) {\n return BELOW;\n }\n\n if (bounds.waypointTop < bounds.viewportTop) {\n return ABOVE;\n }\n\n return INVISIBLE;\n}\n\nvar timeout;\nvar timeoutQueue = [];\nfunction onNextTick(cb) {\n timeoutQueue.push(cb);\n\n if (!timeout) {\n timeout = setTimeout(function () {\n timeout = null; // Drain the timeoutQueue\n\n var item; // eslint-disable-next-line no-cond-assign\n\n while (item = timeoutQueue.shift()) {\n item();\n }\n }, 0);\n }\n\n var isSubscribed = true;\n return function unsubscribe() {\n if (!isSubscribed) {\n return;\n }\n\n isSubscribed = false;\n var index = timeoutQueue.indexOf(cb);\n\n if (index === -1) {\n return;\n }\n\n timeoutQueue.splice(index, 1);\n\n if (!timeoutQueue.length && timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n}\n\nfunction resolveScrollableAncestorProp(scrollableAncestor) {\n // When Waypoint is rendered on the server, `window` is not available.\n // To make Waypoint easier to work with, we allow this to be specified in\n // string form and safely convert to `window` here.\n if (scrollableAncestor === 'window') {\n return global.window;\n }\n\n return scrollableAncestor;\n}\n\nvar hasWindow = typeof window !== 'undefined';\nvar defaultProps = {\n debug: false,\n scrollableAncestor: undefined,\n children: undefined,\n topOffset: '0px',\n bottomOffset: '0px',\n horizontal: false,\n onEnter: function onEnter() {},\n onLeave: function onLeave() {},\n onPositionChange: function onPositionChange() {},\n fireOnRapidScroll: true\n}; // Calls a function when you scroll to the element.\n\nvar Waypoint = /*#__PURE__*/function (_React$PureComponent) {\n _inheritsLoose(Waypoint, _React$PureComponent);\n\n function Waypoint(props) {\n var _this;\n\n _this = _React$PureComponent.call(this, props) || this;\n\n _this.refElement = function (e) {\n _this._ref = e;\n };\n\n return _this;\n }\n\n var _proto = Waypoint.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n var _this2 = this;\n\n if (!hasWindow) {\n return;\n } // this._ref may occasionally not be set at this time. To help ensure that\n // this works smoothly and to avoid layout thrashing, we want to delay the\n // initial execution until the next tick.\n\n\n this.cancelOnNextTick = onNextTick(function () {\n _this2.cancelOnNextTick = null;\n var _this2$props = _this2.props,\n children = _this2$props.children,\n debug = _this2$props.debug; // Berofe doing anything, we want to check that this._ref is avaliable in Waypoint\n\n ensureRefIsProvidedByChild(children, _this2._ref);\n _this2._handleScroll = _this2._handleScroll.bind(_this2);\n _this2.scrollableAncestor = _this2._findScrollableAncestor();\n\n if (process.env.NODE_ENV !== 'production' && debug) {\n debugLog('scrollableAncestor', _this2.scrollableAncestor);\n }\n\n _this2.scrollEventListenerUnsubscribe = addEventListener(_this2.scrollableAncestor, 'scroll', _this2._handleScroll, {\n passive: true\n });\n _this2.resizeEventListenerUnsubscribe = addEventListener(window, 'resize', _this2._handleScroll, {\n passive: true\n });\n\n _this2._handleScroll(null);\n });\n };\n\n _proto.componentDidUpdate = function componentDidUpdate() {\n var _this3 = this;\n\n if (!hasWindow) {\n return;\n }\n\n if (!this.scrollableAncestor) {\n // The Waypoint has not yet initialized.\n return;\n } // The element may have moved, so we need to recompute its position on the\n // page. This happens via handleScroll in a way that forces layout to be\n // computed.\n //\n // We want this to be deferred to avoid forcing layout during render, which\n // causes layout thrashing. And, if we already have this work enqueued, we\n // can just wait for that to happen instead of enqueueing again.\n\n\n if (this.cancelOnNextTick) {\n return;\n }\n\n this.cancelOnNextTick = onNextTick(function () {\n _this3.cancelOnNextTick = null;\n\n _this3._handleScroll(null);\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n if (!hasWindow) {\n return;\n }\n\n if (this.scrollEventListenerUnsubscribe) {\n this.scrollEventListenerUnsubscribe();\n }\n\n if (this.resizeEventListenerUnsubscribe) {\n this.resizeEventListenerUnsubscribe();\n }\n\n if (this.cancelOnNextTick) {\n this.cancelOnNextTick();\n }\n }\n /**\n * Traverses up the DOM to find an ancestor container which has an overflow\n * style that allows for scrolling.\n *\n * @return {Object} the closest ancestor element with an overflow style that\n * allows for scrolling. If none is found, the `window` object is returned\n * as a fallback.\n */\n ;\n\n _proto._findScrollableAncestor = function _findScrollableAncestor() {\n var _this$props = this.props,\n horizontal = _this$props.horizontal,\n scrollableAncestor = _this$props.scrollableAncestor;\n\n if (scrollableAncestor) {\n return resolveScrollableAncestorProp(scrollableAncestor);\n }\n\n var node = this._ref;\n\n while (node.parentNode) {\n node = node.parentNode;\n\n if (node === document.body) {\n // We've reached all the way to the root node.\n return window;\n }\n\n var style = window.getComputedStyle(node);\n var overflowDirec = horizontal ? style.getPropertyValue('overflow-x') : style.getPropertyValue('overflow-y');\n var overflow = overflowDirec || style.getPropertyValue('overflow');\n\n if (overflow === 'auto' || overflow === 'scroll' || overflow === 'overlay') {\n return node;\n }\n } // A scrollable ancestor element was not found, which means that we need to\n // do stuff on window.\n\n\n return window;\n }\n /**\n * @param {Object} event the native scroll event coming from the scrollable\n * ancestor, or resize event coming from the window. Will be undefined if\n * called by a React lifecyle method\n */\n ;\n\n _proto._handleScroll = function _handleScroll(event) {\n if (!this._ref) {\n // There's a chance we end up here after the component has been unmounted.\n return;\n }\n\n var bounds = this._getBounds();\n\n var currentPosition = getCurrentPosition(bounds);\n var previousPosition = this._previousPosition;\n var _this$props2 = this.props,\n debug = _this$props2.debug,\n onPositionChange = _this$props2.onPositionChange,\n onEnter = _this$props2.onEnter,\n onLeave = _this$props2.onLeave,\n fireOnRapidScroll = _this$props2.fireOnRapidScroll;\n\n if (process.env.NODE_ENV !== 'production' && debug) {\n debugLog('currentPosition', currentPosition);\n debugLog('previousPosition', previousPosition);\n } // Save previous position as early as possible to prevent cycles\n\n\n this._previousPosition = currentPosition;\n\n if (previousPosition === currentPosition) {\n // No change since last trigger\n return;\n }\n\n var callbackArg = {\n currentPosition: currentPosition,\n previousPosition: previousPosition,\n event: event,\n waypointTop: bounds.waypointTop,\n waypointBottom: bounds.waypointBottom,\n viewportTop: bounds.viewportTop,\n viewportBottom: bounds.viewportBottom\n };\n onPositionChange.call(this, callbackArg);\n\n if (currentPosition === INSIDE) {\n onEnter.call(this, callbackArg);\n } else if (previousPosition === INSIDE) {\n onLeave.call(this, callbackArg);\n }\n\n var isRapidScrollDown = previousPosition === BELOW && currentPosition === ABOVE;\n var isRapidScrollUp = previousPosition === ABOVE && currentPosition === BELOW;\n\n if (fireOnRapidScroll && (isRapidScrollDown || isRapidScrollUp)) {\n // If the scroll event isn't fired often enough to occur while the\n // waypoint was visible, we trigger both callbacks anyway.\n onEnter.call(this, {\n currentPosition: INSIDE,\n previousPosition: previousPosition,\n event: event,\n waypointTop: bounds.waypointTop,\n waypointBottom: bounds.waypointBottom,\n viewportTop: bounds.viewportTop,\n viewportBottom: bounds.viewportBottom\n });\n onLeave.call(this, {\n currentPosition: currentPosition,\n previousPosition: INSIDE,\n event: event,\n waypointTop: bounds.waypointTop,\n waypointBottom: bounds.waypointBottom,\n viewportTop: bounds.viewportTop,\n viewportBottom: bounds.viewportBottom\n });\n }\n };\n\n _proto._getBounds = function _getBounds() {\n var _this$props3 = this.props,\n horizontal = _this$props3.horizontal,\n debug = _this$props3.debug;\n\n var _this$_ref$getBoundin = this._ref.getBoundingClientRect(),\n left = _this$_ref$getBoundin.left,\n top = _this$_ref$getBoundin.top,\n right = _this$_ref$getBoundin.right,\n bottom = _this$_ref$getBoundin.bottom;\n\n var waypointTop = horizontal ? left : top;\n var waypointBottom = horizontal ? right : bottom;\n var contextHeight;\n var contextScrollTop;\n\n if (this.scrollableAncestor === window) {\n contextHeight = horizontal ? window.innerWidth : window.innerHeight;\n contextScrollTop = 0;\n } else {\n contextHeight = horizontal ? this.scrollableAncestor.offsetWidth : this.scrollableAncestor.offsetHeight;\n contextScrollTop = horizontal ? this.scrollableAncestor.getBoundingClientRect().left : this.scrollableAncestor.getBoundingClientRect().top;\n }\n\n if (process.env.NODE_ENV !== 'production' && debug) {\n debugLog('waypoint top', waypointTop);\n debugLog('waypoint bottom', waypointBottom);\n debugLog('scrollableAncestor height', contextHeight);\n debugLog('scrollableAncestor scrollTop', contextScrollTop);\n }\n\n var _this$props4 = this.props,\n bottomOffset = _this$props4.bottomOffset,\n topOffset = _this$props4.topOffset;\n var topOffsetPx = computeOffsetPixels(topOffset, contextHeight);\n var bottomOffsetPx = computeOffsetPixels(bottomOffset, contextHeight);\n var contextBottom = contextScrollTop + contextHeight;\n return {\n waypointTop: waypointTop,\n waypointBottom: waypointBottom,\n viewportTop: contextScrollTop + topOffsetPx,\n viewportBottom: contextBottom - bottomOffsetPx\n };\n }\n /**\n * @return {Object}\n */\n ;\n\n _proto.render = function render() {\n var _this4 = this;\n\n var children = this.props.children;\n\n if (!children) {\n // We need an element that we can locate in the DOM to determine where it is\n // rendered relative to the top of its context.\n return /*#__PURE__*/React.createElement(\"span\", {\n ref: this.refElement,\n style: {\n fontSize: 0\n }\n });\n }\n\n if (isDOMElement(children) || isForwardRef(children)) {\n var ref = function ref(node) {\n _this4.refElement(node);\n\n if (children.ref) {\n if (typeof children.ref === 'function') {\n children.ref(node);\n } else {\n children.ref.current = node;\n }\n }\n };\n\n return /*#__PURE__*/React.cloneElement(children, {\n ref: ref\n });\n }\n\n return /*#__PURE__*/React.cloneElement(children, {\n innerRef: this.refElement\n });\n };\n\n return Waypoint;\n}(React.PureComponent);\n\nif (process.env.NODE_ENV !== 'production') {\n Waypoint.propTypes = {\n children: PropTypes.element,\n debug: PropTypes.bool,\n onEnter: PropTypes.func,\n onLeave: PropTypes.func,\n onPositionChange: PropTypes.func,\n fireOnRapidScroll: PropTypes.bool,\n // eslint-disable-next-line react/forbid-prop-types\n scrollableAncestor: PropTypes.any,\n horizontal: PropTypes.bool,\n // `topOffset` can either be a number, in which case its a distance from the\n // top of the container in pixels, or a string value. Valid string values are\n // of the form \"20px\", which is parsed as pixels, or \"20%\", which is parsed\n // as a percentage of the height of the containing element.\n // For instance, if you pass \"-20%\", and the containing element is 100px tall,\n // then the waypoint will be triggered when it has been scrolled 20px beyond\n // the top of the containing element.\n topOffset: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),\n // `bottomOffset` can either be a number, in which case its a distance from the\n // bottom of the container in pixels, or a string value. Valid string values are\n // of the form \"20px\", which is parsed as pixels, or \"20%\", which is parsed\n // as a percentage of the height of the containing element.\n // For instance, if you pass \"20%\", and the containing element is 100px tall,\n // then the waypoint will be triggered when it has been scrolled 20px beyond\n // the bottom of the containing element.\n // Similar to `topOffset`, but for the bottom of the container.\n bottomOffset: PropTypes.oneOfType([PropTypes.string, PropTypes.number])\n };\n}\n\nWaypoint.above = ABOVE;\nWaypoint.below = BELOW;\nWaypoint.inside = INSIDE;\nWaypoint.invisible = INVISIBLE;\nWaypoint.defaultProps = defaultProps;\nWaypoint.displayName = 'Waypoint';\n\nexport { Waypoint };\n","// Libraries\nimport { useEffect } from 'react';\n\nexport const useClickOutsideNode = (node, onClickOutside) => {\n const handleClick = (event) => {\n if (node.current && !node.current.contains(event.target)) {\n onClickOutside();\n }\n };\n\n useEffect(() => {\n document.addEventListener('mousedown', handleClick);\n return () => {\n document.removeEventListener('mousedown', handleClick);\n };\n }, []);\n};\n","// TODO: This should be split up into seperate files for each component, the functionality\n// here can also be refactored into reusable hooks\n\n// Libraries\nimport React, { Component, createContext } from 'react';\nimport { connect } from 'react-redux';\n\nconst DELIMITER = '::';\nconst PersistStateContext = createContext({ clearStorage: null });\n\nexport const hydrateState = (getKeyPrefix, propsToHydrate, props = {}) => {\n const keyPrefix = getKeyPrefix(props);\n return Object.entries(localStorage)\n .filter(([storageKey]) => {\n const [prefix, key] = storageKey.split(DELIMITER);\n\n return prefix === keyPrefix && propsToHydrate.includes(key);\n })\n .reduce((accumulator, [storageKey, storageValue]) => {\n const [, key] = storageKey.split(DELIMITER);\n accumulator[key] = JSON.parse(storageValue);\n\n return accumulator;\n }, {});\n};\n\nexport const hydrateEngagementState = (\n getKeyPrefix,\n propsToHydrate,\n props,\n shouldClearStorage,\n setPersistedEngagement\n) => {\n const keyPrefix = getKeyPrefix(props);\n const persistedState = hydrateState(getKeyPrefix, propsToHydrate, props);\n const preview = Boolean(props.engagement.meta?.preview);\n setPersistedEngagement(keyPrefix, persistedState, props.engagement, preview, shouldClearStorage);\n};\n\nexport const persistState =\n (rootSelector, getKeyPrefix, propsToPersist, persistEnabled = () => true) =>\n (WrappedComponent) =>\n connect((state) => ({ rootState: rootSelector(state) }), null)(\n class extends Component {\n componentDidMount() {\n if (!persistEnabled(this.props)) return;\n Object.entries(this.props.rootState)\n .filter(([key]) => propsToPersist.includes(key))\n .forEach(([key, value]) => this.persist(key, value));\n }\n\n componentDidUpdate(prevProps) {\n if (!persistEnabled(this.props)) return;\n Object.entries(this.props.rootState)\n .filter(([key, value]) => propsToPersist.includes(key) && value !== prevProps[key])\n .forEach(([key, value]) => this.persist(key, value));\n }\n\n clearStorage = () => {\n const keyPrefix = getKeyPrefix(this.props);\n Object.keys(localStorage)\n .filter((key) => key.startsWith(keyPrefix))\n .forEach((key) => localStorage.removeItem(key));\n };\n\n persist(key, value) {\n const itemKey = getKeyPrefix(this.props) + DELIMITER + key;\n localStorage.setItem(itemKey, JSON.stringify(value));\n }\n\n render() {\n return (\n \n \n \n );\n }\n },\n propsToPersist\n );\n\nexport const withPersistContext = (WrappedComponent) => (props) =>\n (\n \n {(context) => }\n \n );\n"],"names":["createStoreHook","context","ReactReduxContext","useReduxContext","useDefaultReduxContext","useContext","store","useStore","createDispatchHook","useDefaultStore","useDispatch","CAN_USE_DOM","testPassiveEventListeners","supportsPassiveOption","opts","get","noop","memoized","canUsePassiveEventListeners","normalizeEventOptions","eventOptions","eventOptionsKey","normalizedEventOptions","capture","passive","once","ensureCanMutateNextEventHandlers","eventHandlers","TargetEventHandlers","target","getEventHandlers","eventName","options","key","handleEvent","event","handler","add","listener","_this","isSubscribed","unsubscribe","index","EVENT_HANDLERS_KEY","addEventListener","b","c","d","e","f","g","h","k","l","m","n","p","q","r","u","v","w","x","y","a","t","z","A","B","C","D","E","F","G","H","I","reactIs_production_min","module","require$$0","parseOffsetAsPercentage","str","parseOffsetAsPixels","computeOffsetPixels","offset","contextHeight","pixelOffset","percentOffset","ABOVE","INSIDE","BELOW","INVISIBLE","isDOMElement","Component","errorMessage","ensureRefIsProvidedByChild","children","ref","getCurrentPosition","bounds","timeout","timeoutQueue","onNextTick","cb","item","resolveScrollableAncestorProp","scrollableAncestor","hasWindow","defaultProps","Waypoint","_React$PureComponent","_inheritsLoose","props","_proto","_this2","_this2$props","_this3","_this$props","horizontal","node","style","overflowDirec","overflow","currentPosition","previousPosition","_this$props2","onPositionChange","onEnter","onLeave","fireOnRapidScroll","callbackArg","isRapidScrollDown","isRapidScrollUp","_this$props3","_this$_ref$getBoundin","left","top","right","bottom","waypointTop","waypointBottom","contextScrollTop","_this$props4","bottomOffset","topOffset","topOffsetPx","bottomOffsetPx","contextBottom","_this4","React","isForwardRef","useClickOutsideNode","onClickOutside","handleClick","useEffect","DELIMITER","PersistStateContext","createContext","hydrateState","getKeyPrefix","propsToHydrate","keyPrefix","storageKey","prefix","accumulator","storageValue","hydrateEngagementState","shouldClearStorage","setPersistedEngagement","persistedState","preview","_a","persistState","rootSelector","propsToPersist","persistEnabled","WrappedComponent","connect","state","__publicField","value","prevProps","itemKey","withPersistContext"],"mappings":"irBAUO,SAASA,EAAgBC,EAAUC,EAAmB,CAC3D,MAAMC,EACNF,IAAYC,EAAoBE,GAAyB,IAAMC,EAAU,QAAA,WAACJ,CAAO,EACjF,OAAO,UAAoB,CACzB,KAAM,CACJ,MAAAK,CACD,EAAGH,EAAe,EAEnB,OAAOG,CACX,CACA,CAiBO,MAAMC,GAAwBP,EAAiB,EC5B/C,SAASQ,GAAmBP,EAAUC,EAAmB,CAC9D,MAAMK,EACNN,IAAYC,EAAoBO,GAAkBT,EAAgBC,CAAO,EACzE,OAAO,UAAuB,CAG5B,OAFcM,IAED,QACjB,CACA,CAuBY,MAACG,GAA2BF,GAAkB,ECxC1D,IAAIG,GAAc,CAAC,EAAE,OAAO,OAAW,KAAe,OAAO,UAAY,OAAO,SAAS,eAIzF,SAASC,IAA4B,CAKnC,GAJI,CAACD,IAID,CAAC,OAAO,kBAAoB,CAAC,OAAO,qBAAuB,CAAC,OAAO,eACrE,MAAO,GAGT,IAAIE,EAAwB,GAC5B,GAAI,CACF,IAAIC,EAAO,OAAO,eAAe,CAAA,EAAI,UAAW,CAE9C,IAAK,UAAY,CACf,SAASC,GAAM,CACbF,EAAwB,EACzB,CAED,OAAOE,CACf,EAAS,CACT,CAAK,EACGC,EAAO,UAAgB,GAC3B,OAA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