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,MAAOtE,EAAKuE,GAAU,WAAe,MAC/BjJ,EAAW,YACVkB,EAAO2B,GAAY,WAAe,CACvCgF,SAAUiB,EACVnB,WAAOnD,IAITxE,EAASkJ,QAAUH,EACnB,aAAgB,KAEd,GAAIF,IAASnE,EAAK,OAClB,IAAI6D,EAsBJ,OArBAA,EAAYxC,EAAQrB,GAAK,CAACmD,EAAQF,KAChC9E,EAAS,CACPgF,SACAF,UAEE3H,EAASkJ,SAASlJ,EAASkJ,QAAQrB,EAAQF,GAE3CA,EAAMpB,gBAAkBqC,GAAeL,IAEzCA,IACAA,OAAY/D,EACd,GACC,CACD2C,OACAwB,aACAlC,YAEAsB,kBAEA/F,SACCkE,GACI,KACDqC,GACFA,GACF,CACD,GAGH,CAEA3J,MAAMqJ,QAAQxB,GAAaA,EAAUa,WAAab,EAAW/B,EAAKyC,EAAMwB,EAAYC,EAAaC,EAAMd,EAAiB7B,EAAgBlE,IACxI,MAAMmH,EAA8C,OAA/BH,EAAe9H,EAAMyG,YAAiB,EAASqB,EAAa9M,OAC3EkN,EAAsB,WAEvB1E,IAAOyE,GAAgBP,GAAgBC,GAAQO,EAAoBF,UAAYC,IAGlFC,EAAoBF,QAAUC,EAC9BtG,EAAS,CACPgF,SAAUiB,EACVnB,WAAOnD,KAIX,MAAM6E,EAAS,CAACJ,EAAQ/H,EAAM2G,OAAQ3G,EAAMyG,OAK5C,OAHA0B,EAAO3E,IAAM2E,EAAO,GACpBA,EAAOxB,OAASwB,EAAO,GACvBA,EAAO1B,MAAQ0B,EAAO,GACfA,CACT,CAhOqB,W","sources":["webpack:///../../node_modules/react-animate-height/lib/AnimateHeight.js","webpack:///../../node_modules/react-intersection-observer/react-intersection-observer.modern.mjs"],"sourcesContent":["'use strict';\n\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\n\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _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; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nvar _react = require('react');\n\nvar _react2 = _interopRequireDefault(_react);\n\nvar _propTypes = require('prop-types');\n\nvar _propTypes2 = _interopRequireDefault(_propTypes);\n\nvar _classnames = require('classnames');\n\nvar _classnames2 = _interopRequireDefault(_classnames);\n\nfunction _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\nvar ANIMATION_STATE_CLASSES = {\n animating: 'rah-animating',\n animatingUp: 'rah-animating--up',\n animatingDown: 'rah-animating--down',\n animatingToHeightZero: 'rah-animating--to-height-zero',\n animatingToHeightAuto: 'rah-animating--to-height-auto',\n animatingToHeightSpecific: 'rah-animating--to-height-specific',\n static: 'rah-static',\n staticHeightZero: 'rah-static--height-zero',\n staticHeightAuto: 'rah-static--height-auto',\n staticHeightSpecific: 'rah-static--height-specific'\n};\n\nvar PROPS_TO_OMIT = ['animateOpacity', 'animationStateClasses', 'applyInlineTransitions', 'children', 'contentClassName', 'delay', 'duration', 'easing', 'height', 'onAnimationEnd', 'onAnimationStart'];\n\nfunction omit(obj) {\n for (var _len = arguments.length, keys = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n keys[_key - 1] = arguments[_key];\n }\n\n if (!keys.length) {\n return obj;\n }\n\n var res = {};\n var objectKeys = Object.keys(obj);\n\n for (var i = 0; i < objectKeys.length; i++) {\n var key = objectKeys[i];\n\n if (keys.indexOf(key) === -1) {\n res[key] = obj[key];\n }\n }\n\n return res;\n}\n\n// Start animation helper using nested requestAnimationFrames\nfunction startAnimationHelper(callback) {\n var requestAnimationFrameIDs = [];\n\n requestAnimationFrameIDs[0] = requestAnimationFrame(function () {\n requestAnimationFrameIDs[1] = requestAnimationFrame(function () {\n callback();\n });\n });\n\n return requestAnimationFrameIDs;\n}\n\nfunction cancelAnimationFrames(requestAnimationFrameIDs) {\n requestAnimationFrameIDs.forEach(function (id) {\n return cancelAnimationFrame(id);\n });\n}\n\nfunction isNumber(n) {\n return !isNaN(parseFloat(n)) && isFinite(n);\n}\n\nfunction isPercentage(height) {\n // Percentage height\n return typeof height === 'string' && height.search('%') === height.length - 1 && isNumber(height.substr(0, height.length - 1));\n}\n\nfunction runCallback(callback, params) {\n if (callback && typeof callback === 'function') {\n callback(params);\n }\n}\n\nvar AnimateHeight = function (_React$Component) {\n _inherits(AnimateHeight, _React$Component);\n\n function AnimateHeight(props) {\n _classCallCheck(this, AnimateHeight);\n\n var _this = _possibleConstructorReturn(this, (AnimateHeight.__proto__ || Object.getPrototypeOf(AnimateHeight)).call(this, props));\n\n _this.animationFrameIDs = [];\n\n var height = 'auto';\n var overflow = 'visible';\n\n if (isNumber(props.height)) {\n // If value is string \"0\" make sure we convert it to number 0\n height = props.height < 0 || props.height === '0' ? 0 : props.height;\n overflow = 'hidden';\n } else if (isPercentage(props.height)) {\n // If value is string \"0%\" make sure we convert it to number 0\n height = props.height === '0%' ? 0 : props.height;\n overflow = 'hidden';\n }\n\n _this.animationStateClasses = _extends({}, ANIMATION_STATE_CLASSES, props.animationStateClasses);\n\n var animationStateClasses = _this.getStaticStateClasses(height);\n\n _this.state = {\n animationStateClasses: animationStateClasses,\n height: height,\n overflow: overflow,\n shouldUseTransitions: false\n };\n return _this;\n }\n\n _createClass(AnimateHeight, [{\n key: 'componentDidMount',\n value: function componentDidMount() {\n var height = this.state.height;\n\n // Hide content if height is 0 (to prevent tabbing into it)\n // Check for contentElement is added cause this would fail in tests (react-test-renderer)\n // Read more here: https://github.com/Stanko/react-animate-height/issues/17\n\n if (this.contentElement && this.contentElement.style) {\n this.hideContent(height);\n }\n }\n }, {\n key: 'componentDidUpdate',\n value: function componentDidUpdate(prevProps, prevState) {\n var _this2 = this;\n\n var _props = this.props,\n delay = _props.delay,\n duration = _props.duration,\n height = _props.height,\n onAnimationEnd = _props.onAnimationEnd,\n onAnimationStart = _props.onAnimationStart;\n\n // Check if 'height' prop has changed\n\n if (this.contentElement && height !== prevProps.height) {\n var _cx;\n\n // Remove display: none from the content div\n // if it was hidden to prevent tabbing into it\n this.showContent(prevState.height);\n\n // Cache content height\n this.contentElement.style.overflow = 'hidden';\n var contentHeight = this.contentElement.offsetHeight;\n this.contentElement.style.overflow = '';\n\n // set total animation time\n var totalDuration = duration + delay;\n\n var newHeight = null;\n var timeoutState = {\n height: null, // it will be always set to either 'auto' or specific number\n overflow: 'hidden'\n };\n var isCurrentHeightAuto = prevState.height === 'auto';\n\n if (isNumber(height)) {\n // If value is string \"0\" make sure we convert it to number 0\n newHeight = height < 0 || height === '0' ? 0 : height;\n timeoutState.height = newHeight;\n } else if (isPercentage(height)) {\n // If value is string \"0%\" make sure we convert it to number 0\n newHeight = height === '0%' ? 0 : height;\n timeoutState.height = newHeight;\n } else {\n // If not, animate to content height\n // and then reset to auto\n newHeight = contentHeight; // TODO solve contentHeight = 0\n timeoutState.height = 'auto';\n timeoutState.overflow = null;\n }\n\n if (isCurrentHeightAuto) {\n // This is the height to be animated to\n timeoutState.height = newHeight;\n\n // If previous height was 'auto'\n // set starting height explicitly to be able to use transition\n newHeight = contentHeight;\n }\n\n // Animation classes\n var animationStateClasses = (0, _classnames2.default)((_cx = {}, _defineProperty(_cx, this.animationStateClasses.animating, true), _defineProperty(_cx, this.animationStateClasses.animatingUp, prevProps.height === 'auto' || height < prevProps.height), _defineProperty(_cx, this.animationStateClasses.animatingDown, height === 'auto' || height > prevProps.height), _defineProperty(_cx, this.animationStateClasses.animatingToHeightZero, timeoutState.height === 0), _defineProperty(_cx, this.animationStateClasses.animatingToHeightAuto, timeoutState.height === 'auto'), _defineProperty(_cx, this.animationStateClasses.animatingToHeightSpecific, timeoutState.height > 0), _cx));\n\n // Animation classes to be put after animation is complete\n var timeoutAnimationStateClasses = this.getStaticStateClasses(timeoutState.height);\n\n // Set starting height and animating classes\n // We are safe to call set state as it will not trigger infinite loop\n // because of the \"height !== prevProps.height\" check\n this.setState({ // eslint-disable-line react/no-did-update-set-state\n animationStateClasses: animationStateClasses,\n height: newHeight,\n overflow: 'hidden',\n // When animating from 'auto' we first need to set fixed height\n // that change should be animated\n shouldUseTransitions: !isCurrentHeightAuto\n });\n\n // Clear timeouts\n clearTimeout(this.timeoutID);\n clearTimeout(this.animationClassesTimeoutID);\n\n if (isCurrentHeightAuto) {\n // When animating from 'auto' we use a short timeout to start animation\n // after setting fixed height above\n timeoutState.shouldUseTransitions = true;\n\n cancelAnimationFrames(this.animationFrameIDs);\n this.animationFrameIDs = startAnimationHelper(function () {\n _this2.setState(timeoutState);\n\n // ANIMATION STARTS, run a callback if it exists\n runCallback(onAnimationStart, { newHeight: timeoutState.height });\n });\n\n // Set static classes and remove transitions when animation ends\n this.animationClassesTimeoutID = setTimeout(function () {\n _this2.setState({\n animationStateClasses: timeoutAnimationStateClasses,\n shouldUseTransitions: false\n });\n\n // ANIMATION ENDS\n // Hide content if height is 0 (to prevent tabbing into it)\n _this2.hideContent(timeoutState.height);\n // Run a callback if it exists\n runCallback(onAnimationEnd, { newHeight: timeoutState.height });\n }, totalDuration);\n } else {\n // ANIMATION STARTS, run a callback if it exists\n runCallback(onAnimationStart, { newHeight: newHeight });\n\n // Set end height, classes and remove transitions when animation is complete\n this.timeoutID = setTimeout(function () {\n timeoutState.animationStateClasses = timeoutAnimationStateClasses;\n timeoutState.shouldUseTransitions = false;\n\n _this2.setState(timeoutState);\n\n // ANIMATION ENDS\n // If height is auto, don't hide the content\n // (case when element is empty, therefore height is 0)\n if (height !== 'auto') {\n // Hide content if height is 0 (to prevent tabbing into it)\n _this2.hideContent(newHeight); // TODO solve newHeight = 0\n }\n // Run a callback if it exists\n runCallback(onAnimationEnd, { newHeight: newHeight });\n }, totalDuration);\n }\n }\n }\n }, {\n key: 'componentWillUnmount',\n value: function componentWillUnmount() {\n cancelAnimationFrames(this.animationFrameIDs);\n\n clearTimeout(this.timeoutID);\n clearTimeout(this.animationClassesTimeoutID);\n\n this.timeoutID = null;\n this.animationClassesTimeoutID = null;\n this.animationStateClasses = null;\n }\n }, {\n key: 'showContent',\n value: function showContent(height) {\n if (height === 0) {\n this.contentElement.style.display = '';\n }\n }\n }, {\n key: 'hideContent',\n value: function hideContent(newHeight) {\n if (newHeight === 0) {\n this.contentElement.style.display = 'none';\n }\n }\n }, {\n key: 'getStaticStateClasses',\n value: function getStaticStateClasses(height) {\n var _cx2;\n\n return (0, _classnames2.default)((_cx2 = {}, _defineProperty(_cx2, this.animationStateClasses.static, true), _defineProperty(_cx2, this.animationStateClasses.staticHeightZero, height === 0), _defineProperty(_cx2, this.animationStateClasses.staticHeightSpecific, height > 0), _defineProperty(_cx2, this.animationStateClasses.staticHeightAuto, height === 'auto'), _cx2));\n }\n }, {\n key: 'render',\n value: function render() {\n var _cx3,\n _this3 = this;\n\n var _props2 = this.props,\n animateOpacity = _props2.animateOpacity,\n applyInlineTransitions = _props2.applyInlineTransitions,\n children = _props2.children,\n className = _props2.className,\n contentClassName = _props2.contentClassName,\n delay = _props2.delay,\n duration = _props2.duration,\n easing = _props2.easing,\n id = _props2.id,\n style = _props2.style;\n var _state = this.state,\n height = _state.height,\n overflow = _state.overflow,\n animationStateClasses = _state.animationStateClasses,\n shouldUseTransitions = _state.shouldUseTransitions;\n\n\n var componentStyle = _extends({}, style, {\n height: height,\n overflow: overflow || style.overflow\n });\n\n if (shouldUseTransitions && applyInlineTransitions) {\n componentStyle.transition = 'height ' + duration + 'ms ' + easing + ' ' + delay + 'ms';\n\n // Include transition passed through styles\n if (style.transition) {\n componentStyle.transition = style.transition + ', ' + componentStyle.transition;\n }\n\n // Add webkit vendor prefix still used by opera, blackberry...\n componentStyle.WebkitTransition = componentStyle.transition;\n }\n\n var contentStyle = {};\n\n if (animateOpacity) {\n contentStyle.transition = 'opacity ' + duration + 'ms ' + easing + ' ' + delay + 'ms';\n // Add webkit vendor prefix still used by opera, blackberry...\n contentStyle.WebkitTransition = contentStyle.transition;\n\n if (height === 0) {\n contentStyle.opacity = 0;\n }\n }\n\n var componentClasses = (0, _classnames2.default)((_cx3 = {}, _defineProperty(_cx3, animationStateClasses, true), _defineProperty(_cx3, className, className), _cx3));\n\n // Check if user passed aria-hidden prop\n var hasAriaHiddenProp = typeof this.props['aria-hidden'] !== 'undefined';\n var ariaHidden = hasAriaHiddenProp ? this.props['aria-hidden'] : height === 0;\n\n return _react2.default.createElement(\n 'div',\n _extends({}, omit.apply(undefined, [this.props].concat(PROPS_TO_OMIT)), {\n 'aria-hidden': ariaHidden,\n className: componentClasses,\n id: id,\n style: componentStyle\n }),\n _react2.default.createElement(\n 'div',\n {\n className: contentClassName,\n style: contentStyle,\n ref: function ref(el) {\n return _this3.contentElement = el;\n }\n },\n children\n )\n );\n }\n }]);\n\n return AnimateHeight;\n}(_react2.default.Component);\n\nvar heightPropType = function heightPropType(props, propName, componentName) {\n var value = props[propName];\n\n if (typeof value === 'number' && value >= 0 || isPercentage(value) || value === 'auto') {\n return null;\n }\n\n return new TypeError('value \"' + value + '\" of type \"' + (typeof value === 'undefined' ? 'undefined' : _typeof(value)) + '\" is invalid type for ' + propName + ' in ' + componentName + '. ' + 'It needs to be a positive number, string \"auto\" or percentage string (e.g. \"15%\").');\n};\n\nAnimateHeight.propTypes = {\n 'aria-hidden': _propTypes2.default.bool,\n animateOpacity: _propTypes2.default.bool,\n animationStateClasses: _propTypes2.default.object,\n applyInlineTransitions: _propTypes2.default.bool,\n children: _propTypes2.default.any.isRequired,\n className: _propTypes2.default.string,\n contentClassName: _propTypes2.default.string,\n delay: _propTypes2.default.number,\n duration: _propTypes2.default.number,\n easing: _propTypes2.default.string,\n height: heightPropType,\n id: _propTypes2.default.string,\n onAnimationEnd: _propTypes2.default.func,\n onAnimationStart: _propTypes2.default.func,\n style: _propTypes2.default.object\n};\n\nAnimateHeight.defaultProps = {\n animateOpacity: false,\n animationStateClasses: ANIMATION_STATE_CLASSES,\n applyInlineTransitions: true,\n duration: 250,\n delay: 0,\n easing: 'ease',\n style: {}\n};\n\nexports.default = AnimateHeight;","import * as React from 'react';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectWithoutPropertiesLoose(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n return target;\n}\n\nconst observerMap = new Map();\nconst RootIds = new WeakMap();\nlet rootId = 0;\nlet unsupportedValue = undefined;\n/**\r\n * What should be the default behavior if the IntersectionObserver is unsupported?\r\n * Ideally the polyfill has been loaded, you can have the following happen:\r\n * - `undefined`: Throw an error\r\n * - `true` or `false`: Set the `inView` value to this regardless of intersection state\r\n * **/\n\nfunction defaultFallbackInView(inView) {\n unsupportedValue = inView;\n}\n/**\r\n * Generate a unique ID for the root element\r\n * @param root\r\n */\n\nfunction getRootId(root) {\n if (!root) return '0';\n if (RootIds.has(root)) return RootIds.get(root);\n rootId += 1;\n RootIds.set(root, rootId.toString());\n return RootIds.get(root);\n}\n/**\r\n * Convert the options to a string Id, based on the values.\r\n * Ensures we can reuse the same observer when observing elements with the same options.\r\n * @param options\r\n */\n\n\nfunction optionsToId(options) {\n return Object.keys(options).sort().filter(key => options[key] !== undefined).map(key => {\n return `${key}_${key === 'root' ? getRootId(options.root) : options[key]}`;\n }).toString();\n}\n\nfunction createObserver(options) {\n // Create a unique ID for this observer instance, based on the root, root margin and threshold.\n let id = optionsToId(options);\n let instance = observerMap.get(id);\n\n if (!instance) {\n // Create a map of elements this observer is going to observe. Each element has a list of callbacks that should be triggered, once it comes into view.\n const elements = new Map();\n let thresholds;\n const observer = new IntersectionObserver(entries => {\n entries.forEach(entry => {\n var _elements$get;\n\n // While it would be nice if you could just look at isIntersecting to determine if the component is inside the viewport, browsers can't agree on how to use it.\n // -Firefox ignores `threshold` when considering `isIntersecting`, so it will never be false again if `threshold` is > 0\n const inView = entry.isIntersecting && thresholds.some(threshold => entry.intersectionRatio >= threshold); // @ts-ignore support IntersectionObserver v2\n\n if (options.trackVisibility && typeof entry.isVisible === 'undefined') {\n // The browser doesn't support Intersection Observer v2, falling back to v1 behavior.\n // @ts-ignore\n entry.isVisible = inView;\n }\n\n (_elements$get = elements.get(entry.target)) == null ? void 0 : _elements$get.forEach(callback => {\n callback(inView, entry);\n });\n });\n }, options); // Ensure we have a valid thresholds array. If not, use the threshold from the options\n\n thresholds = observer.thresholds || (Array.isArray(options.threshold) ? options.threshold : [options.threshold || 0]);\n instance = {\n id,\n observer,\n elements\n };\n observerMap.set(id, instance);\n }\n\n return instance;\n}\n/**\r\n * @param element - DOM Element to observe\r\n * @param callback - Callback function to trigger when intersection status changes\r\n * @param options - Intersection Observer options\r\n * @param fallbackInView - Fallback inView value.\r\n * @return Function - Cleanup function that should be triggered to unregister the observer\r\n */\n\n\nfunction observe(element, callback, options = {}, fallbackInView = unsupportedValue) {\n if (typeof window.IntersectionObserver === 'undefined' && fallbackInView !== undefined) {\n const bounds = element.getBoundingClientRect();\n callback(fallbackInView, {\n isIntersecting: fallbackInView,\n target: element,\n intersectionRatio: typeof options.threshold === 'number' ? options.threshold : 0,\n time: 0,\n boundingClientRect: bounds,\n intersectionRect: bounds,\n rootBounds: bounds\n });\n return () => {// Nothing to cleanup\n };\n } // An observer with the same options can be reused, so lets use this fact\n\n\n const {\n id,\n observer,\n elements\n } = createObserver(options); // Register the callback listener for this element\n\n let callbacks = elements.get(element) || [];\n\n if (!elements.has(element)) {\n elements.set(element, callbacks);\n }\n\n callbacks.push(callback);\n observer.observe(element);\n return function unobserve() {\n // Remove the callback from the callback list\n callbacks.splice(callbacks.indexOf(callback), 1);\n\n if (callbacks.length === 0) {\n // No more callback exists for element, so destroy it\n elements.delete(element);\n observer.unobserve(element);\n }\n\n if (elements.size === 0) {\n // No more elements are being observer by this instance, so destroy it\n observer.disconnect();\n observerMap.delete(id);\n }\n };\n}\n\nconst _excluded = [\"children\", \"as\", \"triggerOnce\", \"threshold\", \"root\", \"rootMargin\", \"onChange\", \"skip\", \"trackVisibility\", \"delay\", \"initialInView\", \"fallbackInView\"];\n\nfunction isPlainChildren(props) {\n return typeof props.children !== 'function';\n}\n/**\r\n ## Render props\r\n\n To use the `<InView>` component, you pass it a function. It will be called\r\n whenever the state changes, with the new value of `inView`. In addition to the\r\n `inView` prop, children also receive a `ref` that should be set on the\r\n containing DOM element. This is the element that the IntersectionObserver will\r\n monitor.\r\n\n If you need it, you can also access the\r\n [`IntersectionObserverEntry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry)\r\n on `entry`, giving you access to all the details about the current intersection\r\n state.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView>\r\n {({ inView, ref, entry }) => (\r\n <div ref={ref}>\r\n <h2>{`Header inside viewport ${inView}.`}</h2>\r\n </div>\r\n )}\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n\n ## Plain children\r\n\n You can pass any element to the `<InView />`, and it will handle creating the\r\n wrapping DOM element. Add a handler to the `onChange` method, and control the\r\n state in your own component. Any extra props you add to `<InView>` will be\r\n passed to the HTML element, allowing you set the `className`, `style`, etc.\r\n\n ```jsx\r\n import { InView } from 'react-intersection-observer';\r\n\n const Component = () => (\r\n <InView as=\"div\" onChange={(inView, entry) => console.log('Inview:', inView)}>\r\n <h2>Plain children are always rendered. Use onChange to monitor state.</h2>\r\n </InView>\r\n );\r\n\n export default Component;\r\n ```\r\n */\n\n\nclass InView extends React.Component {\n constructor(props) {\n super(props);\n this.node = null;\n this._unobserveCb = null;\n\n this.handleNode = node => {\n if (this.node) {\n // Clear the old observer, before we start observing a new element\n this.unobserve();\n\n if (!node && !this.props.triggerOnce && !this.props.skip) {\n // Reset the state if we get a new node, and we aren't ignoring updates\n this.setState({\n inView: !!this.props.initialInView,\n entry: undefined\n });\n }\n }\n\n this.node = node ? node : null;\n this.observeNode();\n };\n\n this.handleChange = (inView, entry) => {\n if (inView && this.props.triggerOnce) {\n // If `triggerOnce` is true, we should stop observing the element.\n this.unobserve();\n }\n\n if (!isPlainChildren(this.props)) {\n // Store the current State, so we can pass it to the children in the next render update\n // There's no reason to update the state for plain children, since it's not used in the rendering.\n this.setState({\n inView,\n entry\n });\n }\n\n if (this.props.onChange) {\n // If the user is actively listening for onChange, always trigger it\n this.props.onChange(inView, entry);\n }\n };\n\n this.state = {\n inView: !!props.initialInView,\n entry: undefined\n };\n }\n\n componentDidUpdate(prevProps) {\n // If a IntersectionObserver option changed, reinit the observer\n if (prevProps.rootMargin !== this.props.rootMargin || prevProps.root !== this.props.root || prevProps.threshold !== this.props.threshold || prevProps.skip !== this.props.skip || prevProps.trackVisibility !== this.props.trackVisibility || prevProps.delay !== this.props.delay) {\n this.unobserve();\n this.observeNode();\n }\n }\n\n componentWillUnmount() {\n this.unobserve();\n this.node = null;\n }\n\n observeNode() {\n if (!this.node || this.props.skip) return;\n const {\n threshold,\n root,\n rootMargin,\n trackVisibility,\n delay,\n fallbackInView\n } = this.props;\n this._unobserveCb = observe(this.node, this.handleChange, {\n threshold,\n root,\n rootMargin,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n }\n\n unobserve() {\n if (this._unobserveCb) {\n this._unobserveCb();\n\n this._unobserveCb = null;\n }\n }\n\n render() {\n if (!isPlainChildren(this.props)) {\n const {\n inView,\n entry\n } = this.state;\n return this.props.children({\n inView,\n entry,\n ref: this.handleNode\n });\n }\n\n const _this$props = this.props,\n {\n children,\n as\n } = _this$props,\n props = _objectWithoutPropertiesLoose(_this$props, _excluded);\n\n return React.createElement(as || 'div', _extends({\n ref: this.handleNode\n }, props), children);\n }\n\n}\n\n/**\r\n * React Hooks make it easy to monitor the `inView` state of your components. Call\r\n * the `useInView` hook with the (optional) [options](#options) you need. It will\r\n * return an array containing a `ref`, the `inView` status and the current\r\n * [`entry`](https://developer.mozilla.org/en-US/docs/Web/API/IntersectionObserverEntry).\r\n * Assign the `ref` to the DOM element you want to monitor, and the hook will\r\n * report the status.\r\n *\r\n * @example\r\n * ```jsx\r\n * import React from 'react';\r\n * import { useInView } from 'react-intersection-observer';\r\n *\r\n * const Component = () => {\r\n * const { ref, inView, entry } = useInView({\r\n * threshold: 0,\r\n * });\r\n *\r\n * return (\r\n * <div ref={ref}>\r\n * <h2>{`Header inside viewport ${inView}.`}</h2>\r\n * </div>\r\n * );\r\n * };\r\n * ```\r\n */\n\nfunction useInView({\n threshold,\n delay,\n trackVisibility,\n rootMargin,\n root,\n triggerOnce,\n skip,\n initialInView,\n fallbackInView,\n onChange\n} = {}) {\n var _state$entry;\n\n const [ref, setRef] = React.useState(null);\n const callback = React.useRef();\n const [state, setState] = React.useState({\n inView: !!initialInView,\n entry: undefined\n }); // Store the onChange callback in a `ref`, so we can access the latest instance\n // inside the `useEffect`, but without triggering a rerender.\n\n callback.current = onChange;\n React.useEffect(() => {\n // Ensure we have node ref, and that we shouldn't skip observing\n if (skip || !ref) return;\n let unobserve;\n unobserve = observe(ref, (inView, entry) => {\n setState({\n inView,\n entry\n });\n if (callback.current) callback.current(inView, entry);\n\n if (entry.isIntersecting && triggerOnce && unobserve) {\n // If it should only trigger once, unobserve the element after it's inView\n unobserve();\n unobserve = undefined;\n }\n }, {\n root,\n rootMargin,\n threshold,\n // @ts-ignore\n trackVisibility,\n // @ts-ignore\n delay\n }, fallbackInView);\n return () => {\n if (unobserve) {\n unobserve();\n }\n };\n }, // We break the rule here, because we aren't including the actual `threshold` variable\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [// If the threshold is an array, convert it to a string, so it won't change between renders.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n Array.isArray(threshold) ? threshold.toString() : threshold, ref, root, rootMargin, triggerOnce, skip, trackVisibility, fallbackInView, delay]);\n const entryTarget = (_state$entry = state.entry) == null ? void 0 : _state$entry.target;\n const previousEntryTarget = React.useRef();\n\n if (!ref && entryTarget && !triggerOnce && !skip && previousEntryTarget.current !== entryTarget) {\n // If we don't have a node ref, then reset the state (unless the hook is set to only `triggerOnce` or `skip`)\n // This ensures we correctly reflect the current state - If you aren't observing anything, then nothing is inView\n previousEntryTarget.current = entryTarget;\n setState({\n inView: !!initialInView,\n entry: undefined\n });\n }\n\n const result = [setRef, state.inView, state.entry]; // Support object destructuring, by adding the specific values.\n\n result.ref = result[0];\n result.inView = result[1];\n result.entry = result[2];\n return result;\n}\n\nexport { InView, defaultFallbackInView, observe, useInView };\n//# sourceMappingURL=react-intersection-observer.modern.mjs.map\n"],"names":["_typeof","Symbol","iterator","obj","constructor","prototype","_extends","Object","assign","target","i","arguments","length","source","key","hasOwnProperty","call","_createClass","defineProperties","props","descriptor","enumerable","configurable","writable","defineProperty","Constructor","protoProps","staticProps","_react2","_interopRequireDefault","_propTypes2","_classnames2","__esModule","default","_defineProperty","value","ANIMATION_STATE_CLASSES","animating","animatingUp","animatingDown","animatingToHeightZero","animatingToHeightAuto","animatingToHeightSpecific","static","staticHeightZero","staticHeightAuto","staticHeightSpecific","PROPS_TO_OMIT","omit","_len","keys","Array","_key","res","objectKeys","indexOf","cancelAnimationFrames","requestAnimationFrameIDs","forEach","id","cancelAnimationFrame","isNumber","n","isNaN","parseFloat","isFinite","isPercentage","height","search","substr","runCallback","callback","params","AnimateHeight","_React$Component","instance","TypeError","_classCallCheck","this","_this","self","ReferenceError","_possibleConstructorReturn","__proto__","getPrototypeOf","animationFrameIDs","overflow","animationStateClasses","getStaticStateClasses","state","shouldUseTransitions","subClass","superClass","create","setPrototypeOf","_inherits","contentElement","style","hideContent","prevProps","prevState","_this2","_props","delay","duration","onAnimationEnd","onAnimationStart","_cx","showContent","contentHeight","offsetHeight","totalDuration","newHeight","timeoutState","isCurrentHeightAuto","timeoutAnimationStateClasses","setState","clearTimeout","timeoutID","animationClassesTimeoutID","requestAnimationFrame","setTimeout","display","_cx2","_cx3","_this3","_props2","animateOpacity","applyInlineTransitions","children","className","contentClassName","easing","_state","componentStyle","transition","WebkitTransition","contentStyle","opacity","componentClasses","ariaHidden","createElement","apply","undefined","concat","ref","el","Component","propTypes","bool","object","any","isRequired","string","number","propName","componentName","func","defaultProps","exports","observerMap","Map","RootIds","WeakMap","unsupportedValue","rootId","observe","element","options","fallbackInView","window","IntersectionObserver","bounds","getBoundingClientRect","isIntersecting","intersectionRatio","threshold","time","boundingClientRect","intersectionRect","rootBounds","observer","elements","sort","filter","map","root","has","set","toString","get","optionsToId","thresholds","entries","entry","_elements$get","inView","some","trackVisibility","isVisible","isArray","createObserver","callbacks","push","splice","delete","unobserve","size","disconnect","useInView","rootMargin","triggerOnce","skip","initialInView","onChange","_state$entry","setRef","current","entryTarget","previousEntryTarget","result"],"sourceRoot":""}