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GAAI,CACf,MAAMI,EAAezV,KAAK6K,MAAMuK,EAAUlJ,GAC1C,OAAO2I,EAAO9C,eAAe,UAAW0D,EAAcT,EAGxD,CAAO,CACL,MAAMU,EAAyBL,EAAS,GAClCM,EAAQ3V,KAAK8N,MAAMuH,EAAS,IAGlC,OAAIK,EAAyB,EACpBb,EAAO9C,eAAe,cAAe4D,EAAOX,GAG1CU,EAAyB,EAC3Bb,EAAO9C,eAAe,aAAc4D,EAAOX,GAI3CH,EAAO9C,eAAe,eAAgB4D,EAAQ,EAAGX,EAE5D,CACF,C","sources":["../node_modules/react-virtualized-auto-sizer/dist/react-virtualized-auto-sizer.esm.js","../node_modules/react-window-infinite-loader/dist/index.esm.js","../node_modules/memoize-one/dist/memoize-one.esm.js","../node_modules/react-window/src/timer.js","../node_modules/react-window/src/domHelpers.js","../node_modules/react-window/src/createGridComponent.js","../node_modules/react-window/src/createListComponent.js","../node_modules/react-window/src/FixedSizeList.js","../node_modules/date-fns/toDate.mjs","../node_modules/date-fns/compareAsc.mjs","../node_modules/date-fns/constants.mjs","../node_modules/date-fns/differenceInCalendarMonths.mjs","../node_modules/date-fns/endOfDay.mjs","../node_modules/date-fns/endOfMonth.mjs","../node_modules/date-fns/isLastDayOfMonth.mjs","../node_modules/date-fns/differenceInMonths.mjs","../node_modules/date-fns/differenceInMilliseconds.mjs","../node_modules/date-fns/differenceInSeconds.mjs","../node_modules/date-fns/_lib/getRoundingMethod.mjs","../node_modules/date-fns/locale/en-US/_lib/formatDistance.mjs","../node_modules/date-fns/locale/_lib/buildFormatLongFn.mjs","../node_modules/date-fns/locale/en-US/_lib/formatLong.mjs","../node_modules/date-fns/locale/en-US/_lib/formatRelative.mjs","../node_modules/date-fns/locale/_lib/buildLocalizeFn.mjs","../node_modules/date-fns/locale/_lib/buildMatchFn.mjs","../node_modules/date-fns/locale/_lib/buildMatchPatternFn.mjs","../node_modules/date-fns/locale/en-US.mjs","../node_modules/date-fns/locale/en-US/_lib/localize.mjs","../node_modules/date-fns/locale/en-US/_lib/match.mjs","../node_modules/date-fns/_lib/defaultOptions.mjs","../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.mjs","../node_modules/date-fns/formatDistance.mjs"],"sourcesContent":["import { Component, createElement } from 'react';\n\n/**\n * Detect Element Resize.\n * https://github.com/sdecima/javascript-detect-element-resize\n * Sebastian Decima\n *\n * Forked from version 0.5.3; includes the following modifications:\n * 1) Guard against unsafe 'window' and 'document' references (to support SSR).\n * 2) Defer initialization code via a top-level function wrapper (to support SSR).\n * 3) Avoid unnecessary reflows by not measuring size for scroll events bubbling from children.\n * 4) Add nonce for style element.\n * 5) Use 'export' statement over 'module.exports' assignment\n **/\n\n// Check `document` and `window` in case of server-side rendering\nlet windowObject;\nif (typeof window !== \"undefined\") {\n windowObject = window;\n\n // eslint-disable-next-line no-restricted-globals\n} else if (typeof self !== \"undefined\") {\n // eslint-disable-next-line no-restricted-globals\n windowObject = self;\n} else {\n windowObject = global;\n}\nlet cancelFrame = null;\nlet requestFrame = null;\nconst TIMEOUT_DURATION = 20;\nconst clearTimeoutFn = windowObject.clearTimeout;\nconst setTimeoutFn = windowObject.setTimeout;\nconst cancelAnimationFrameFn = windowObject.cancelAnimationFrame || windowObject.mozCancelAnimationFrame || windowObject.webkitCancelAnimationFrame;\nconst requestAnimationFrameFn = windowObject.requestAnimationFrame || windowObject.mozRequestAnimationFrame || windowObject.webkitRequestAnimationFrame;\nif (cancelAnimationFrameFn == null || requestAnimationFrameFn == null) {\n // For environments that don't support animation frame,\n // fallback to a setTimeout based approach.\n cancelFrame = clearTimeoutFn;\n requestFrame = function requestAnimationFrameViaSetTimeout(callback) {\n return setTimeoutFn(callback, TIMEOUT_DURATION);\n };\n} else {\n // Counter intuitively, environments that support animation frames can be trickier.\n // Chrome's \"Throttle non-visible cross-origin iframes\" flag can prevent rAFs from being called.\n // In this case, we should fallback to a setTimeout() implementation.\n cancelFrame = function cancelFrame([animationFrameID, timeoutID]) {\n cancelAnimationFrameFn(animationFrameID);\n clearTimeoutFn(timeoutID);\n };\n requestFrame = function requestAnimationFrameWithSetTimeoutFallback(callback) {\n const animationFrameID = requestAnimationFrameFn(function animationFrameCallback() {\n clearTimeoutFn(timeoutID);\n callback();\n });\n const timeoutID = setTimeoutFn(function timeoutCallback() {\n cancelAnimationFrameFn(animationFrameID);\n callback();\n }, TIMEOUT_DURATION);\n return [animationFrameID, timeoutID];\n };\n}\nfunction createDetectElementResize(nonce) {\n let animationKeyframes;\n let animationName;\n let animationStartEvent;\n let animationStyle;\n let checkTriggers;\n let resetTriggers;\n let scrollListener;\n const attachEvent = typeof document !== \"undefined\" && document.attachEvent;\n if (!attachEvent) {\n resetTriggers = function (element) {\n const triggers = element.__resizeTriggers__,\n expand = triggers.firstElementChild,\n contract = triggers.lastElementChild,\n expandChild = expand.firstElementChild;\n contract.scrollLeft = contract.scrollWidth;\n contract.scrollTop = contract.scrollHeight;\n expandChild.style.width = expand.offsetWidth + 1 + \"px\";\n expandChild.style.height = expand.offsetHeight + 1 + \"px\";\n expand.scrollLeft = expand.scrollWidth;\n expand.scrollTop = expand.scrollHeight;\n };\n checkTriggers = function (element) {\n return element.offsetWidth !== element.__resizeLast__.width || element.offsetHeight !== element.__resizeLast__.height;\n };\n scrollListener = function (e) {\n // Don't measure (which forces) reflow for scrolls that happen inside of children!\n if (e.target.className && typeof e.target.className.indexOf === \"function\" && e.target.className.indexOf(\"contract-trigger\") < 0 && e.target.className.indexOf(\"expand-trigger\") < 0) {\n return;\n }\n const element = this;\n resetTriggers(this);\n if (this.__resizeRAF__) {\n cancelFrame(this.__resizeRAF__);\n }\n this.__resizeRAF__ = requestFrame(function animationFrame() {\n if (checkTriggers(element)) {\n element.__resizeLast__.width = element.offsetWidth;\n element.__resizeLast__.height = element.offsetHeight;\n element.__resizeListeners__.forEach(function forEachResizeListener(fn) {\n fn.call(element, e);\n });\n }\n });\n };\n\n /* Detect CSS Animations support to detect element display/re-attach */\n let animation = false;\n let keyframeprefix = \"\";\n animationStartEvent = \"animationstart\";\n const domPrefixes = \"Webkit Moz O ms\".split(\" \");\n let startEvents = \"webkitAnimationStart animationstart oAnimationStart MSAnimationStart\".split(\" \");\n let pfx = \"\";\n {\n const elm = document.createElement(\"fakeelement\");\n if (elm.style.animationName !== undefined) {\n animation = true;\n }\n if (animation === false) {\n for (let i = 0; i < domPrefixes.length; i++) {\n if (elm.style[domPrefixes[i] + \"AnimationName\"] !== undefined) {\n pfx = domPrefixes[i];\n keyframeprefix = \"-\" + pfx.toLowerCase() + \"-\";\n animationStartEvent = startEvents[i];\n animation = true;\n break;\n }\n }\n }\n }\n animationName = \"resizeanim\";\n animationKeyframes = \"@\" + keyframeprefix + \"keyframes \" + animationName + \" { from { opacity: 0; } to { opacity: 0; } } \";\n animationStyle = keyframeprefix + \"animation: 1ms \" + animationName + \"; \";\n }\n const createStyles = function (doc) {\n if (!doc.getElementById(\"detectElementResize\")) {\n //opacity:0 works around a chrome bug https://code.google.com/p/chromium/issues/detail?id=286360\n const css = (animationKeyframes ? animationKeyframes : \"\") + \".resize-triggers { \" + (animationStyle ? animationStyle : \"\") + \"visibility: hidden; opacity: 0; } \" + '.resize-triggers, .resize-triggers > div, .contract-trigger:before { content: \" \"; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; z-index: -1; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',\n head = doc.head || doc.getElementsByTagName(\"head\")[0],\n style = doc.createElement(\"style\");\n style.id = \"detectElementResize\";\n style.type = \"text/css\";\n if (nonce != null) {\n style.setAttribute(\"nonce\", nonce);\n }\n if (style.styleSheet) {\n style.styleSheet.cssText = css;\n } else {\n style.appendChild(doc.createTextNode(css));\n }\n head.appendChild(style);\n }\n };\n const addResizeListener = function (element, fn) {\n if (attachEvent) {\n element.attachEvent(\"onresize\", fn);\n } else {\n if (!element.__resizeTriggers__) {\n const doc = element.ownerDocument;\n const elementStyle = windowObject.getComputedStyle(element);\n if (elementStyle && elementStyle.position === \"static\") {\n element.style.position = \"relative\";\n }\n createStyles(doc);\n element.__resizeLast__ = {};\n element.__resizeListeners__ = [];\n (element.__resizeTriggers__ = doc.createElement(\"div\")).className = \"resize-triggers\";\n const expandTrigger = doc.createElement(\"div\");\n expandTrigger.className = \"expand-trigger\";\n expandTrigger.appendChild(doc.createElement(\"div\"));\n const contractTrigger = doc.createElement(\"div\");\n contractTrigger.className = \"contract-trigger\";\n element.__resizeTriggers__.appendChild(expandTrigger);\n element.__resizeTriggers__.appendChild(contractTrigger);\n element.appendChild(element.__resizeTriggers__);\n resetTriggers(element);\n element.addEventListener(\"scroll\", scrollListener, true);\n\n /* Listen for a css animation to detect element display/re-attach */\n if (animationStartEvent) {\n element.__resizeTriggers__.__animationListener__ = function animationListener(e) {\n if (e.animationName === animationName) {\n resetTriggers(element);\n }\n };\n element.__resizeTriggers__.addEventListener(animationStartEvent, element.__resizeTriggers__.__animationListener__);\n }\n }\n element.__resizeListeners__.push(fn);\n }\n };\n const removeResizeListener = function (element, fn) {\n if (attachEvent) {\n element.detachEvent(\"onresize\", fn);\n } else {\n element.__resizeListeners__.splice(element.__resizeListeners__.indexOf(fn), 1);\n if (!element.__resizeListeners__.length) {\n element.removeEventListener(\"scroll\", scrollListener, true);\n if (element.__resizeTriggers__.__animationListener__) {\n element.__resizeTriggers__.removeEventListener(animationStartEvent, element.__resizeTriggers__.__animationListener__);\n element.__resizeTriggers__.__animationListener__ = null;\n }\n try {\n element.__resizeTriggers__ = !element.removeChild(element.__resizeTriggers__);\n } catch (e) {\n // Preact compat; see developit/preact-compat/issues/228\n }\n }\n }\n };\n return {\n addResizeListener,\n removeResizeListener\n };\n}\n\nclass AutoSizer extends Component {\n constructor(...args) {\n super(...args);\n this.state = {\n height: this.props.defaultHeight || 0,\n scaledHeight: this.props.defaultHeight || 0,\n scaledWidth: this.props.defaultWidth || 0,\n width: this.props.defaultWidth || 0\n };\n this._autoSizer = null;\n this._detectElementResize = null;\n this._parentNode = null;\n this._resizeObserver = null;\n this._timeoutId = null;\n this._onResize = () => {\n this._timeoutId = null;\n const {\n disableHeight,\n disableWidth,\n onResize\n } = this.props;\n if (this._parentNode) {\n // Guard against AutoSizer component being removed from the DOM immediately after being added.\n // This can result in invalid style values which can result in NaN values if we don't handle them.\n // See issue #150 for more context.\n\n const style = window.getComputedStyle(this._parentNode) || {};\n const paddingLeft = parseFloat(style.paddingLeft || \"0\");\n const paddingRight = parseFloat(style.paddingRight || \"0\");\n const paddingTop = parseFloat(style.paddingTop || \"0\");\n const paddingBottom = parseFloat(style.paddingBottom || \"0\");\n const rect = this._parentNode.getBoundingClientRect();\n const scaledHeight = rect.height - paddingTop - paddingBottom;\n const scaledWidth = rect.width - paddingLeft - paddingRight;\n const height = this._parentNode.offsetHeight - paddingTop - paddingBottom;\n const width = this._parentNode.offsetWidth - paddingLeft - paddingRight;\n if (!disableHeight && (this.state.height !== height || this.state.scaledHeight !== scaledHeight) || !disableWidth && (this.state.width !== width || this.state.scaledWidth !== scaledWidth)) {\n this.setState({\n height,\n width,\n scaledHeight,\n scaledWidth\n });\n if (typeof onResize === \"function\") {\n onResize({\n height,\n scaledHeight,\n scaledWidth,\n width\n });\n }\n }\n }\n };\n this._setRef = autoSizer => {\n this._autoSizer = autoSizer;\n };\n }\n componentDidMount() {\n const {\n nonce\n } = this.props;\n const parentNode = this._autoSizer ? this._autoSizer.parentNode : null;\n if (parentNode != null && parentNode.ownerDocument && parentNode.ownerDocument.defaultView && parentNode instanceof parentNode.ownerDocument.defaultView.HTMLElement) {\n // Delay access of parentNode until mount.\n // This handles edge-cases where the component has already been unmounted before its ref has been set,\n // As well as libraries like react-lite which have a slightly different lifecycle.\n this._parentNode = parentNode;\n\n // Use ResizeObserver from the same context where parentNode (which we will observe) was defined\n // Using just global can result into onResize events not being emitted in cases with multiple realms\n const ResizeObserverInstance = parentNode.ownerDocument.defaultView.ResizeObserver;\n if (ResizeObserverInstance != null) {\n this._resizeObserver = new ResizeObserverInstance(() => {\n // Guard against \"ResizeObserver loop limit exceeded\" error;\n // could be triggered if the state update causes the ResizeObserver handler to run long.\n // See https://github.com/bvaughn/react-virtualized-auto-sizer/issues/55\n this._timeoutId = setTimeout(this._onResize, 0);\n });\n this._resizeObserver.observe(parentNode);\n } else {\n // Defer requiring resize handler in order to support server-side rendering.\n // See issue #41\n this._detectElementResize = createDetectElementResize(nonce);\n this._detectElementResize.addResizeListener(parentNode, this._onResize);\n }\n this._onResize();\n }\n }\n componentWillUnmount() {\n if (this._parentNode) {\n if (this._detectElementResize) {\n this._detectElementResize.removeResizeListener(this._parentNode, this._onResize);\n }\n if (this._timeoutId !== null) {\n clearTimeout(this._timeoutId);\n }\n if (this._resizeObserver) {\n this._resizeObserver.disconnect();\n }\n }\n }\n render() {\n const {\n children,\n defaultHeight,\n defaultWidth,\n disableHeight = false,\n disableWidth = false,\n doNotBailOutOnEmptyChildren = false,\n nonce,\n onResize,\n style = {},\n tagName = \"div\",\n ...rest\n } = this.props;\n const {\n height,\n scaledHeight,\n scaledWidth,\n width\n } = this.state;\n\n // Outer div should not force width/height since that may prevent containers from shrinking.\n // Inner component should overflow and use calculated width/height.\n // See issue #68 for more information.\n const outerStyle = {\n overflow: \"visible\"\n };\n const childParams = {};\n\n // Avoid rendering children before the initial measurements have been collected.\n // At best this would just be wasting cycles.\n let bailoutOnChildren = false;\n if (!disableHeight) {\n if (height === 0) {\n bailoutOnChildren = true;\n }\n outerStyle.height = 0;\n childParams.height = height;\n childParams.scaledHeight = scaledHeight;\n }\n if (!disableWidth) {\n if (width === 0) {\n bailoutOnChildren = true;\n }\n outerStyle.width = 0;\n childParams.width = width;\n childParams.scaledWidth = scaledWidth;\n }\n if (doNotBailOutOnEmptyChildren) {\n bailoutOnChildren = false;\n }\n return createElement(tagName, {\n ref: this._setRef,\n style: {\n ...outerStyle,\n ...style\n },\n ...rest\n }, !bailoutOnChildren && children(childParams));\n }\n}\n\nfunction isHeightAndWidthProps(props) {\n return props && props.disableHeight !== true && props.disableWidth !== true;\n}\nfunction isHeightOnlyProps(props) {\n return props && props.disableHeight !== true && props.disableWidth === true;\n}\nfunction isWidthOnlyProps(props) {\n return props && props.disableHeight === true && props.disableWidth !== true;\n}\n\nexport { AutoSizer as default, isHeightAndWidthProps, isHeightOnlyProps, isWidthOnlyProps };\n","import { PureComponent } from 'react';\n\nfunction isInteger(value) {\n return typeof value === 'number' && isFinite(value) && Math.floor(value) === value;\n}\n\nfunction isRangeVisible(_ref) {\n var lastRenderedStartIndex = _ref.lastRenderedStartIndex,\n lastRenderedStopIndex = _ref.lastRenderedStopIndex,\n startIndex = _ref.startIndex,\n stopIndex = _ref.stopIndex;\n\n return !(startIndex > lastRenderedStopIndex || stopIndex < lastRenderedStartIndex);\n}\n\nfunction scanForUnloadedRanges(_ref) {\n var isItemLoaded = _ref.isItemLoaded,\n itemCount = _ref.itemCount,\n minimumBatchSize = _ref.minimumBatchSize,\n startIndex = _ref.startIndex,\n stopIndex = _ref.stopIndex;\n\n var unloadedRanges = [];\n\n var rangeStartIndex = null;\n var rangeStopIndex = null;\n\n for (var _index = startIndex; _index <= stopIndex; _index++) {\n var loaded = isItemLoaded(_index);\n\n if (!loaded) {\n rangeStopIndex = _index;\n if (rangeStartIndex === null) {\n rangeStartIndex = _index;\n }\n } else if (rangeStopIndex !== null) {\n unloadedRanges.push(rangeStartIndex, rangeStopIndex);\n\n rangeStartIndex = rangeStopIndex = null;\n }\n }\n\n // If :rangeStopIndex is not null it means we haven't ran out of unloaded rows.\n // Scan forward to try filling our :minimumBatchSize.\n if (rangeStopIndex !== null) {\n var potentialStopIndex = Math.min(Math.max(rangeStopIndex, rangeStartIndex + minimumBatchSize - 1), itemCount - 1);\n\n for (var _index2 = rangeStopIndex + 1; _index2 <= potentialStopIndex; _index2++) {\n if (!isItemLoaded(_index2)) {\n rangeStopIndex = _index2;\n } else {\n break;\n }\n }\n\n unloadedRanges.push(rangeStartIndex, rangeStopIndex);\n }\n\n // Check to see if our first range ended prematurely.\n // In this case we should scan backwards to try filling our :minimumBatchSize.\n if (unloadedRanges.length) {\n while (unloadedRanges[1] - unloadedRanges[0] + 1 < minimumBatchSize && unloadedRanges[0] > 0) {\n var _index3 = unloadedRanges[0] - 1;\n\n if (!isItemLoaded(_index3)) {\n unloadedRanges[0] = _index3;\n } else {\n break;\n }\n }\n }\n\n return unloadedRanges;\n}\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nvar InfiniteLoader = function (_PureComponent) {\n inherits(InfiniteLoader, _PureComponent);\n\n function InfiniteLoader() {\n var _ref;\n\n var _temp, _this, _ret;\n\n classCallCheck(this, InfiniteLoader);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = InfiniteLoader.__proto__ || Object.getPrototypeOf(InfiniteLoader)).call.apply(_ref, [this].concat(args))), _this), _this._lastRenderedStartIndex = -1, _this._lastRenderedStopIndex = -1, _this._memoizedUnloadedRanges = [], _this._onItemsRendered = function (_ref2) {\n var visibleStartIndex = _ref2.visibleStartIndex,\n visibleStopIndex = _ref2.visibleStopIndex;\n\n if (process.env.NODE_ENV !== 'production') {\n if (!isInteger(visibleStartIndex) || !isInteger(visibleStopIndex)) {\n console.warn('Invalid onItemsRendered signature; please refer to InfiniteLoader documentation.');\n }\n\n if (typeof _this.props.loadMoreRows === 'function') {\n console.warn('InfiniteLoader \"loadMoreRows\" prop has been renamed to \"loadMoreItems\".');\n }\n }\n\n _this._lastRenderedStartIndex = visibleStartIndex;\n _this._lastRenderedStopIndex = visibleStopIndex;\n\n _this._ensureRowsLoaded(visibleStartIndex, visibleStopIndex);\n }, _this._setRef = function (listRef) {\n _this._listRef = listRef;\n }, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n createClass(InfiniteLoader, [{\n key: 'resetloadMoreItemsCache',\n value: function resetloadMoreItemsCache() {\n var autoReload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n this._memoizedUnloadedRanges = [];\n\n if (autoReload) {\n this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);\n }\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (process.env.NODE_ENV !== 'production') {\n if (this._listRef == null) {\n console.warn('Invalid list ref; please refer to InfiniteLoader documentation.');\n }\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var children = this.props.children;\n\n\n return children({\n onItemsRendered: this._onItemsRendered,\n ref: this._setRef\n });\n }\n }, {\n key: '_ensureRowsLoaded',\n value: function _ensureRowsLoaded(startIndex, stopIndex) {\n var _props = this.props,\n isItemLoaded = _props.isItemLoaded,\n itemCount = _props.itemCount,\n _props$minimumBatchSi = _props.minimumBatchSize,\n minimumBatchSize = _props$minimumBatchSi === undefined ? 10 : _props$minimumBatchSi,\n _props$threshold = _props.threshold,\n threshold = _props$threshold === undefined ? 15 : _props$threshold;\n\n\n var unloadedRanges = scanForUnloadedRanges({\n isItemLoaded: isItemLoaded,\n itemCount: itemCount,\n minimumBatchSize: minimumBatchSize,\n startIndex: Math.max(0, startIndex - threshold),\n stopIndex: Math.min(itemCount - 1, stopIndex + threshold)\n });\n\n // Avoid calling load-rows unless range has changed.\n // This shouldn't be strictly necessary, but is maybe nice to do.\n if (this._memoizedUnloadedRanges.length !== unloadedRanges.length || this._memoizedUnloadedRanges.some(function (startOrStop, index) {\n return unloadedRanges[index] !== startOrStop;\n })) {\n this._memoizedUnloadedRanges = unloadedRanges;\n this._loadUnloadedRanges(unloadedRanges);\n }\n }\n }, {\n key: '_loadUnloadedRanges',\n value: function _loadUnloadedRanges(unloadedRanges) {\n var _this2 = this;\n\n // loadMoreRows was renamed to loadMoreItems in v1.0.3; will be removed in v2.0\n var loadMoreItems = this.props.loadMoreItems || this.props.loadMoreRows;\n\n var _loop = function _loop(i) {\n var startIndex = unloadedRanges[i];\n var stopIndex = unloadedRanges[i + 1];\n var promise = loadMoreItems(startIndex, stopIndex);\n if (promise != null) {\n promise.then(function () {\n // Refresh the visible rows if any of them have just been loaded.\n // Otherwise they will remain in their unloaded visual state.\n if (isRangeVisible({\n lastRenderedStartIndex: _this2._lastRenderedStartIndex,\n lastRenderedStopIndex: _this2._lastRenderedStopIndex,\n startIndex: startIndex,\n stopIndex: stopIndex\n })) {\n // Handle an unmount while promises are still in flight.\n if (_this2._listRef == null) {\n return;\n }\n\n // Resize cached row sizes for VariableSizeList,\n // otherwise just re-render the list.\n if (typeof _this2._listRef.resetAfterIndex === 'function') {\n _this2._listRef.resetAfterIndex(startIndex, true);\n } else {\n // HACK reset temporarily cached item styles to force PureComponent to re-render.\n // This is pretty gross, but I'm okay with it for now.\n // Don't judge me.\n if (typeof _this2._listRef._getItemStyleCache === 'function') {\n _this2._listRef._getItemStyleCache(-1);\n }\n _this2._listRef.forceUpdate();\n }\n }\n });\n }\n };\n\n for (var i = 0; i < unloadedRanges.length; i += 2) {\n _loop(i);\n }\n }\n }]);\n return InfiniteLoader;\n}(PureComponent);\n\nexport default InfiniteLoader;\n","var safeIsNaN = Number.isNaN ||\n function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n };\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) { isEqual = areInputsEqual; }\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n function memoized() {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n return lastResult;\n }\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n }\n return memoized;\n}\n\nexport default memoizeOne;\n","// @flow\n\n// Animation frame based implementation of setTimeout.\n// Inspired by Joe Lambert, https://gist.github.com/joelambert/1002116#file-requesttimeout-js\n\nconst hasNativePerformanceNow =\n typeof performance === 'object' && typeof performance.now === 'function';\n\nconst now = hasNativePerformanceNow\n ? () => performance.now()\n : () => Date.now();\n\nexport type TimeoutID = {|\n id: AnimationFrameID,\n|};\n\nexport function cancelTimeout(timeoutID: TimeoutID) {\n cancelAnimationFrame(timeoutID.id);\n}\n\nexport function requestTimeout(callback: Function, delay: number): TimeoutID {\n const start = now();\n\n function tick() {\n if (now() - start >= delay) {\n callback.call(null);\n } else {\n timeoutID.id = requestAnimationFrame(tick);\n }\n }\n\n const timeoutID: TimeoutID = {\n id: requestAnimationFrame(tick),\n };\n\n return timeoutID;\n}\n","// @flow\n\nlet size: number = -1;\n\n// This utility copied from \"dom-helpers\" package.\nexport function getScrollbarSize(recalculate?: boolean = false): number {\n if (size === -1 || recalculate) {\n const div = document.createElement('div');\n const style = div.style;\n style.width = '50px';\n style.height = '50px';\n style.overflow = 'scroll';\n\n ((document.body: any): HTMLBodyElement).appendChild(div);\n\n size = div.offsetWidth - div.clientWidth;\n\n ((document.body: any): HTMLBodyElement).removeChild(div);\n }\n\n return size;\n}\n\nexport type RTLOffsetType =\n | 'negative'\n | 'positive-descending'\n | 'positive-ascending';\n\nlet cachedRTLResult: RTLOffsetType | null = null;\n\n// TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n// Chrome does not seem to adhere; its scrollLeft values are positive (measured relative to the left).\n// Safari's elastic bounce makes detecting this even more complicated wrt potential false positives.\n// The safest way to check this is to intentionally set a negative offset,\n// and then verify that the subsequent \"scroll\" event matches the negative offset.\n// If it does not match, then we can assume a non-standard RTL scroll implementation.\nexport function getRTLOffsetType(recalculate?: boolean = false): RTLOffsetType {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement('div');\n const outerStyle = outerDiv.style;\n outerStyle.width = '50px';\n outerStyle.height = '50px';\n outerStyle.overflow = 'scroll';\n outerStyle.direction = 'rtl';\n\n const innerDiv = document.createElement('div');\n const innerStyle = innerDiv.style;\n innerStyle.width = '100px';\n innerStyle.height = '100px';\n\n outerDiv.appendChild(innerDiv);\n\n ((document.body: any): HTMLBodyElement).appendChild(outerDiv);\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = 'positive-descending';\n } else {\n outerDiv.scrollLeft = 1;\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = 'negative';\n } else {\n cachedRTLResult = 'positive-ascending';\n }\n }\n\n ((document.body: any): HTMLBodyElement).removeChild(outerDiv);\n\n return cachedRTLResult;\n }\n\n return cachedRTLResult;\n}\n","// @flow\n\nimport memoizeOne from 'memoize-one';\nimport { createElement, PureComponent } from 'react';\nimport { cancelTimeout, requestTimeout } from './timer';\nimport { getScrollbarSize, getRTLOffsetType } from './domHelpers';\n\nimport type { TimeoutID } from './timer';\n\ntype Direction = 'ltr' | 'rtl';\nexport type ScrollToAlign = 'auto' | 'smart' | 'center' | 'start' | 'end';\n\ntype itemSize = number | ((index: number) => number);\n\ntype RenderComponentProps = {|\n columnIndex: number,\n data: T,\n isScrolling?: boolean,\n rowIndex: number,\n style: Object,\n|};\nexport type RenderComponent = React$ComponentType<\n $Shape>\n>;\n\ntype ScrollDirection = 'forward' | 'backward';\n\ntype OnItemsRenderedCallback = ({\n overscanColumnStartIndex: number,\n overscanColumnStopIndex: number,\n overscanRowStartIndex: number,\n overscanRowStopIndex: number,\n visibleColumnStartIndex: number,\n visibleColumnStopIndex: number,\n visibleRowStartIndex: number,\n visibleRowStopIndex: number,\n}) => void;\ntype OnScrollCallback = ({\n horizontalScrollDirection: ScrollDirection,\n scrollLeft: number,\n scrollTop: number,\n scrollUpdateWasRequested: boolean,\n verticalScrollDirection: ScrollDirection,\n}) => void;\n\ntype ScrollEvent = SyntheticEvent;\ntype ItemStyleCache = { [key: string]: Object };\n\ntype OuterProps = {|\n children: React$Node,\n className: string | void,\n onScroll: ScrollEvent => void,\n style: {\n [string]: mixed,\n },\n|};\n\ntype InnerProps = {|\n children: React$Node,\n style: {\n [string]: mixed,\n },\n|};\n\nexport type Props = {|\n children: RenderComponent,\n className?: string,\n columnCount: number,\n columnWidth: itemSize,\n direction: Direction,\n height: number,\n initialScrollLeft?: number,\n initialScrollTop?: number,\n innerRef?: any,\n innerElementType?: string | React$AbstractComponent,\n innerTagName?: string, // deprecated\n itemData: T,\n itemKey?: (params: {|\n columnIndex: number,\n data: T,\n rowIndex: number,\n |}) => any,\n onItemsRendered?: OnItemsRenderedCallback,\n onScroll?: OnScrollCallback,\n outerRef?: any,\n outerElementType?: string | React$AbstractComponent,\n outerTagName?: string, // deprecated\n overscanColumnCount?: number,\n overscanColumnsCount?: number, // deprecated\n overscanCount?: number, // deprecated\n overscanRowCount?: number,\n overscanRowsCount?: number, // deprecated\n rowCount: number,\n rowHeight: itemSize,\n style?: Object,\n useIsScrolling: boolean,\n width: number,\n|};\n\ntype State = {|\n instance: any,\n isScrolling: boolean,\n horizontalScrollDirection: ScrollDirection,\n scrollLeft: number,\n scrollTop: number,\n scrollUpdateWasRequested: boolean,\n verticalScrollDirection: ScrollDirection,\n|};\n\ntype getItemOffset = (\n props: Props,\n index: number,\n instanceProps: any\n) => number;\ntype getItemSize = (\n props: Props,\n index: number,\n instanceProps: any\n) => number;\ntype getEstimatedTotalSize = (props: Props, instanceProps: any) => number;\ntype GetOffsetForItemAndAlignment = (\n props: Props,\n index: number,\n align: ScrollToAlign,\n scrollOffset: number,\n instanceProps: any,\n scrollbarSize: number\n) => number;\ntype GetStartIndexForOffset = (\n props: Props,\n offset: number,\n instanceProps: any\n) => number;\ntype GetStopIndexForStartIndex = (\n props: Props,\n startIndex: number,\n scrollOffset: number,\n instanceProps: any\n) => number;\ntype InitInstanceProps = (props: Props, instance: any) => any;\ntype ValidateProps = (props: Props) => void;\n\nconst IS_SCROLLING_DEBOUNCE_INTERVAL = 150;\n\nconst defaultItemKey = ({ columnIndex, data, rowIndex }) =>\n `${rowIndex}:${columnIndex}`;\n\n// In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\nlet devWarningsOverscanCount = null;\nlet devWarningsOverscanRowsColumnsCount = null;\nlet devWarningsTagName = null;\nif (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsOverscanCount = new WeakSet();\n devWarningsOverscanRowsColumnsCount = new WeakSet();\n devWarningsTagName = new WeakSet();\n }\n}\n\nexport default function createGridComponent({\n getColumnOffset,\n getColumnStartIndexForOffset,\n getColumnStopIndexForStartIndex,\n getColumnWidth,\n getEstimatedTotalHeight,\n getEstimatedTotalWidth,\n getOffsetForColumnAndAlignment,\n getOffsetForRowAndAlignment,\n getRowHeight,\n getRowOffset,\n getRowStartIndexForOffset,\n getRowStopIndexForStartIndex,\n initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange,\n validateProps,\n}: {|\n getColumnOffset: getItemOffset,\n getColumnStartIndexForOffset: GetStartIndexForOffset,\n getColumnStopIndexForStartIndex: GetStopIndexForStartIndex,\n getColumnWidth: getItemSize,\n getEstimatedTotalHeight: getEstimatedTotalSize,\n getEstimatedTotalWidth: getEstimatedTotalSize,\n getOffsetForColumnAndAlignment: GetOffsetForItemAndAlignment,\n getOffsetForRowAndAlignment: GetOffsetForItemAndAlignment,\n getRowOffset: getItemOffset,\n getRowHeight: getItemSize,\n getRowStartIndexForOffset: GetStartIndexForOffset,\n getRowStopIndexForStartIndex: GetStopIndexForStartIndex,\n initInstanceProps: InitInstanceProps,\n shouldResetStyleCacheOnItemSizeChange: boolean,\n validateProps: ValidateProps,\n|}) {\n return class Grid extends PureComponent, State> {\n _instanceProps: any = initInstanceProps(this.props, this);\n _resetIsScrollingTimeoutId: TimeoutID | null = null;\n _outerRef: ?HTMLDivElement;\n\n static defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n useIsScrolling: false,\n };\n\n state: State = {\n instance: this,\n isScrolling: false,\n horizontalScrollDirection: 'forward',\n scrollLeft:\n typeof this.props.initialScrollLeft === 'number'\n ? this.props.initialScrollLeft\n : 0,\n scrollTop:\n typeof this.props.initialScrollTop === 'number'\n ? this.props.initialScrollTop\n : 0,\n scrollUpdateWasRequested: false,\n verticalScrollDirection: 'forward',\n };\n\n // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n constructor(props: Props) {\n super(props);\n }\n\n static getDerivedStateFromProps(\n nextProps: Props,\n prevState: State\n ): $Shape | null {\n validateSharedProps(nextProps, prevState);\n validateProps(nextProps);\n return null;\n }\n\n scrollTo({\n scrollLeft,\n scrollTop,\n }: {\n scrollLeft: number,\n scrollTop: number,\n }): void {\n if (scrollLeft !== undefined) {\n scrollLeft = Math.max(0, scrollLeft);\n }\n if (scrollTop !== undefined) {\n scrollTop = Math.max(0, scrollTop);\n }\n\n this.setState(prevState => {\n if (scrollLeft === undefined) {\n scrollLeft = prevState.scrollLeft;\n }\n if (scrollTop === undefined) {\n scrollTop = prevState.scrollTop;\n }\n\n if (\n prevState.scrollLeft === scrollLeft &&\n prevState.scrollTop === scrollTop\n ) {\n return null;\n }\n\n return {\n horizontalScrollDirection:\n prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollUpdateWasRequested: true,\n verticalScrollDirection:\n prevState.scrollTop < scrollTop ? 'forward' : 'backward',\n };\n }, this._resetIsScrollingDebounced);\n }\n\n scrollToItem({\n align = 'auto',\n columnIndex,\n rowIndex,\n }: {\n align: ScrollToAlign,\n columnIndex?: number,\n rowIndex?: number,\n }): void {\n const { columnCount, height, rowCount, width } = this.props;\n const { scrollLeft, scrollTop } = this.state;\n const scrollbarSize = getScrollbarSize();\n\n if (columnIndex !== undefined) {\n columnIndex = Math.max(0, Math.min(columnIndex, columnCount - 1));\n }\n if (rowIndex !== undefined) {\n rowIndex = Math.max(0, Math.min(rowIndex, rowCount - 1));\n }\n\n const estimatedTotalHeight = getEstimatedTotalHeight(\n this.props,\n this._instanceProps\n );\n const estimatedTotalWidth = getEstimatedTotalWidth(\n this.props,\n this._instanceProps\n );\n\n // The scrollbar size should be considered when scrolling an item into view,\n // to ensure it's fully visible.\n // But we only need to account for its size when it's actually visible.\n const horizontalScrollbarSize =\n estimatedTotalWidth > width ? scrollbarSize : 0;\n const verticalScrollbarSize =\n estimatedTotalHeight > height ? scrollbarSize : 0;\n\n this.scrollTo({\n scrollLeft:\n columnIndex !== undefined\n ? getOffsetForColumnAndAlignment(\n this.props,\n columnIndex,\n align,\n scrollLeft,\n this._instanceProps,\n verticalScrollbarSize\n )\n : scrollLeft,\n scrollTop:\n rowIndex !== undefined\n ? getOffsetForRowAndAlignment(\n this.props,\n rowIndex,\n align,\n scrollTop,\n this._instanceProps,\n horizontalScrollbarSize\n )\n : scrollTop,\n });\n }\n\n componentDidMount() {\n const { initialScrollLeft, initialScrollTop } = this.props;\n\n if (this._outerRef != null) {\n const outerRef = ((this._outerRef: any): HTMLElement);\n if (typeof initialScrollLeft === 'number') {\n outerRef.scrollLeft = initialScrollLeft;\n }\n if (typeof initialScrollTop === 'number') {\n outerRef.scrollTop = initialScrollTop;\n }\n }\n\n this._callPropsCallbacks();\n }\n\n componentDidUpdate() {\n const { direction } = this.props;\n const { scrollLeft, scrollTop, scrollUpdateWasRequested } = this.state;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n const outerRef = ((this._outerRef: any): HTMLElement);\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollLeft;\n break;\n case 'positive-ascending':\n outerRef.scrollLeft = scrollLeft;\n break;\n default:\n const { clientWidth, scrollWidth } = outerRef;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } else {\n outerRef.scrollLeft = Math.max(0, scrollLeft);\n }\n\n outerRef.scrollTop = Math.max(0, scrollTop);\n }\n\n this._callPropsCallbacks();\n }\n\n componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n }\n\n render() {\n const {\n children,\n className,\n columnCount,\n direction,\n height,\n innerRef,\n innerElementType,\n innerTagName,\n itemData,\n itemKey = defaultItemKey,\n outerElementType,\n outerTagName,\n rowCount,\n style,\n useIsScrolling,\n width,\n } = this.props;\n const { isScrolling } = this.state;\n\n const [\n columnStartIndex,\n columnStopIndex,\n ] = this._getHorizontalRangeToRender();\n const [rowStartIndex, rowStopIndex] = this._getVerticalRangeToRender();\n\n const items = [];\n if (columnCount > 0 && rowCount) {\n for (\n let rowIndex = rowStartIndex;\n rowIndex <= rowStopIndex;\n rowIndex++\n ) {\n for (\n let columnIndex = columnStartIndex;\n columnIndex <= columnStopIndex;\n columnIndex++\n ) {\n items.push(\n createElement(children, {\n columnIndex,\n data: itemData,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n key: itemKey({ columnIndex, data: itemData, rowIndex }),\n rowIndex,\n style: this._getItemStyle(rowIndex, columnIndex),\n })\n );\n }\n }\n }\n\n // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n const estimatedTotalHeight = getEstimatedTotalHeight(\n this.props,\n this._instanceProps\n );\n const estimatedTotalWidth = getEstimatedTotalWidth(\n this.props,\n this._instanceProps\n );\n\n return createElement(\n outerElementType || outerTagName || 'div',\n {\n className,\n onScroll: this._onScroll,\n ref: this._outerRefSetter,\n style: {\n position: 'relative',\n height,\n width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction,\n ...style,\n },\n },\n createElement(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: estimatedTotalHeight,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: estimatedTotalWidth,\n },\n })\n );\n }\n\n _callOnItemsRendered: (\n overscanColumnStartIndex: number,\n overscanColumnStopIndex: number,\n overscanRowStartIndex: number,\n overscanRowStopIndex: number,\n visibleColumnStartIndex: number,\n visibleColumnStopIndex: number,\n visibleRowStartIndex: number,\n visibleRowStopIndex: number\n ) => void;\n _callOnItemsRendered = memoizeOne(\n (\n overscanColumnStartIndex: number,\n overscanColumnStopIndex: number,\n overscanRowStartIndex: number,\n overscanRowStopIndex: number,\n visibleColumnStartIndex: number,\n visibleColumnStopIndex: number,\n visibleRowStartIndex: number,\n visibleRowStopIndex: number\n ) =>\n ((this.props.onItemsRendered: any): OnItemsRenderedCallback)({\n overscanColumnStartIndex,\n overscanColumnStopIndex,\n overscanRowStartIndex,\n overscanRowStopIndex,\n visibleColumnStartIndex,\n visibleColumnStopIndex,\n visibleRowStartIndex,\n visibleRowStopIndex,\n })\n );\n\n _callOnScroll: (\n scrollLeft: number,\n scrollTop: number,\n horizontalScrollDirection: ScrollDirection,\n verticalScrollDirection: ScrollDirection,\n scrollUpdateWasRequested: boolean\n ) => void;\n _callOnScroll = memoizeOne(\n (\n scrollLeft: number,\n scrollTop: number,\n horizontalScrollDirection: ScrollDirection,\n verticalScrollDirection: ScrollDirection,\n scrollUpdateWasRequested: boolean\n ) =>\n ((this.props.onScroll: any): OnScrollCallback)({\n horizontalScrollDirection,\n scrollLeft,\n scrollTop,\n verticalScrollDirection,\n scrollUpdateWasRequested,\n })\n );\n\n _callPropsCallbacks() {\n const { columnCount, onItemsRendered, onScroll, rowCount } = this.props;\n\n if (typeof onItemsRendered === 'function') {\n if (columnCount > 0 && rowCount > 0) {\n const [\n overscanColumnStartIndex,\n overscanColumnStopIndex,\n visibleColumnStartIndex,\n visibleColumnStopIndex,\n ] = this._getHorizontalRangeToRender();\n const [\n overscanRowStartIndex,\n overscanRowStopIndex,\n visibleRowStartIndex,\n visibleRowStopIndex,\n ] = this._getVerticalRangeToRender();\n this._callOnItemsRendered(\n overscanColumnStartIndex,\n overscanColumnStopIndex,\n overscanRowStartIndex,\n overscanRowStopIndex,\n visibleColumnStartIndex,\n visibleColumnStopIndex,\n visibleRowStartIndex,\n visibleRowStopIndex\n );\n }\n }\n\n if (typeof onScroll === 'function') {\n const {\n horizontalScrollDirection,\n scrollLeft,\n scrollTop,\n scrollUpdateWasRequested,\n verticalScrollDirection,\n } = this.state;\n this._callOnScroll(\n scrollLeft,\n scrollTop,\n horizontalScrollDirection,\n verticalScrollDirection,\n scrollUpdateWasRequested\n );\n }\n }\n\n // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n _getItemStyle: (rowIndex: number, columnIndex: number) => Object;\n _getItemStyle = (rowIndex: number, columnIndex: number): Object => {\n const { columnWidth, direction, rowHeight } = this.props;\n\n const itemStyleCache = this._getItemStyleCache(\n shouldResetStyleCacheOnItemSizeChange && columnWidth,\n shouldResetStyleCacheOnItemSizeChange && direction,\n shouldResetStyleCacheOnItemSizeChange && rowHeight\n );\n\n const key = `${rowIndex}:${columnIndex}`;\n\n let style;\n if (itemStyleCache.hasOwnProperty(key)) {\n style = itemStyleCache[key];\n } else {\n const offset = getColumnOffset(\n this.props,\n columnIndex,\n this._instanceProps\n );\n const isRtl = direction === 'rtl';\n itemStyleCache[key] = style = {\n position: 'absolute',\n left: isRtl ? undefined : offset,\n right: isRtl ? offset : undefined,\n top: getRowOffset(this.props, rowIndex, this._instanceProps),\n height: getRowHeight(this.props, rowIndex, this._instanceProps),\n width: getColumnWidth(this.props, columnIndex, this._instanceProps),\n };\n }\n\n return style;\n };\n\n _getItemStyleCache: (_: any, __: any, ___: any) => ItemStyleCache;\n _getItemStyleCache = memoizeOne((_: any, __: any, ___: any) => ({}));\n\n _getHorizontalRangeToRender(): [number, number, number, number] {\n const {\n columnCount,\n overscanColumnCount,\n overscanColumnsCount,\n overscanCount,\n rowCount,\n } = this.props;\n const { horizontalScrollDirection, isScrolling, scrollLeft } = this.state;\n\n const overscanCountResolved: number =\n overscanColumnCount || overscanColumnsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n const startIndex = getColumnStartIndexForOffset(\n this.props,\n scrollLeft,\n this._instanceProps\n );\n const stopIndex = getColumnStopIndexForStartIndex(\n this.props,\n startIndex,\n scrollLeft,\n this._instanceProps\n );\n\n // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n const overscanBackward =\n !isScrolling || horizontalScrollDirection === 'backward'\n ? Math.max(1, overscanCountResolved)\n : 1;\n const overscanForward =\n !isScrolling || horizontalScrollDirection === 'forward'\n ? Math.max(1, overscanCountResolved)\n : 1;\n\n return [\n Math.max(0, startIndex - overscanBackward),\n Math.max(0, Math.min(columnCount - 1, stopIndex + overscanForward)),\n startIndex,\n stopIndex,\n ];\n }\n\n _getVerticalRangeToRender(): [number, number, number, number] {\n const {\n columnCount,\n overscanCount,\n overscanRowCount,\n overscanRowsCount,\n rowCount,\n } = this.props;\n const { isScrolling, verticalScrollDirection, scrollTop } = this.state;\n\n const overscanCountResolved: number =\n overscanRowCount || overscanRowsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n const startIndex = getRowStartIndexForOffset(\n this.props,\n scrollTop,\n this._instanceProps\n );\n const stopIndex = getRowStopIndexForStartIndex(\n this.props,\n startIndex,\n scrollTop,\n this._instanceProps\n );\n\n // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n const overscanBackward =\n !isScrolling || verticalScrollDirection === 'backward'\n ? Math.max(1, overscanCountResolved)\n : 1;\n const overscanForward =\n !isScrolling || verticalScrollDirection === 'forward'\n ? Math.max(1, overscanCountResolved)\n : 1;\n\n return [\n Math.max(0, startIndex - overscanBackward),\n Math.max(0, Math.min(rowCount - 1, stopIndex + overscanForward)),\n startIndex,\n stopIndex,\n ];\n }\n\n _onScroll = (event: ScrollEvent): void => {\n const {\n clientHeight,\n clientWidth,\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth,\n } = event.currentTarget;\n this.setState(prevState => {\n if (\n prevState.scrollLeft === scrollLeft &&\n prevState.scrollTop === scrollTop\n ) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n const { direction } = this.props;\n\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n let calculatedScrollLeft = scrollLeft;\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n calculatedScrollLeft = -scrollLeft;\n break;\n case 'positive-descending':\n calculatedScrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n }\n\n // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n calculatedScrollLeft = Math.max(\n 0,\n Math.min(calculatedScrollLeft, scrollWidth - clientWidth)\n );\n const calculatedScrollTop = Math.max(\n 0,\n Math.min(scrollTop, scrollHeight - clientHeight)\n );\n\n return {\n isScrolling: true,\n horizontalScrollDirection:\n prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: calculatedScrollLeft,\n scrollTop: calculatedScrollTop,\n verticalScrollDirection:\n prevState.scrollTop < scrollTop ? 'forward' : 'backward',\n scrollUpdateWasRequested: false,\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _outerRefSetter = (ref: any): void => {\n const { outerRef } = this.props;\n\n this._outerRef = ((ref: any): HTMLDivElement);\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (\n outerRef != null &&\n typeof outerRef === 'object' &&\n outerRef.hasOwnProperty('current')\n ) {\n outerRef.current = ref;\n }\n };\n\n _resetIsScrollingDebounced = () => {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n\n this._resetIsScrollingTimeoutId = requestTimeout(\n this._resetIsScrolling,\n IS_SCROLLING_DEBOUNCE_INTERVAL\n );\n };\n\n _resetIsScrolling = () => {\n this._resetIsScrollingTimeoutId = null;\n\n this.setState({ isScrolling: false }, () => {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n this._getItemStyleCache(-1);\n });\n };\n };\n}\n\nconst validateSharedProps = (\n {\n children,\n direction,\n height,\n innerTagName,\n outerTagName,\n overscanColumnsCount,\n overscanCount,\n overscanRowsCount,\n width,\n }: Props,\n { instance }: State\n): void => {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof overscanCount === 'number') {\n if (devWarningsOverscanCount && !devWarningsOverscanCount.has(instance)) {\n devWarningsOverscanCount.add(instance);\n console.warn(\n 'The overscanCount prop has been deprecated. ' +\n 'Please use the overscanColumnCount and overscanRowCount props instead.'\n );\n }\n }\n\n if (\n typeof overscanColumnsCount === 'number' ||\n typeof overscanRowsCount === 'number'\n ) {\n if (\n devWarningsOverscanRowsColumnsCount &&\n !devWarningsOverscanRowsColumnsCount.has(instance)\n ) {\n devWarningsOverscanRowsColumnsCount.add(instance);\n console.warn(\n 'The overscanColumnsCount and overscanRowsCount props have been deprecated. ' +\n 'Please use the overscanColumnCount and overscanRowCount props instead.'\n );\n }\n }\n\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName && !devWarningsTagName.has(instance)) {\n devWarningsTagName.add(instance);\n console.warn(\n 'The innerTagName and outerTagName props have been deprecated. ' +\n 'Please use the innerElementType and outerElementType props instead.'\n );\n }\n }\n\n if (children == null) {\n throw Error(\n 'An invalid \"children\" prop has been specified. ' +\n 'Value should be a React component. ' +\n `\"${children === null ? 'null' : typeof children}\" was specified.`\n );\n }\n\n switch (direction) {\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n default:\n throw Error(\n 'An invalid \"direction\" prop has been specified. ' +\n 'Value should be either \"ltr\" or \"rtl\". ' +\n `\"${direction}\" was specified.`\n );\n }\n\n if (typeof width !== 'number') {\n throw Error(\n 'An invalid \"width\" prop has been specified. ' +\n 'Grids must specify a number for width. ' +\n `\"${width === null ? 'null' : typeof width}\" was specified.`\n );\n }\n\n if (typeof height !== 'number') {\n throw Error(\n 'An invalid \"height\" prop has been specified. ' +\n 'Grids must specify a number for height. ' +\n `\"${height === null ? 'null' : typeof height}\" was specified.`\n );\n }\n }\n};\n","// @flow\n\nimport memoizeOne from 'memoize-one';\nimport { createElement, PureComponent } from 'react';\nimport { cancelTimeout, requestTimeout } from './timer';\nimport { getScrollbarSize, getRTLOffsetType } from './domHelpers';\n\nimport type { TimeoutID } from './timer';\n\nexport type ScrollToAlign = 'auto' | 'smart' | 'center' | 'start' | 'end';\n\ntype itemSize = number | ((index: number) => number);\n// TODO Deprecate directions \"horizontal\" and \"vertical\"\ntype Direction = 'ltr' | 'rtl' | 'horizontal' | 'vertical';\ntype Layout = 'horizontal' | 'vertical';\n\ntype RenderComponentProps = {|\n data: T,\n index: number,\n isScrolling?: boolean,\n style: Object,\n|};\ntype RenderComponent = React$ComponentType<$Shape>>;\n\ntype ScrollDirection = 'forward' | 'backward';\n\ntype onItemsRenderedCallback = ({\n overscanStartIndex: number,\n overscanStopIndex: number,\n visibleStartIndex: number,\n visibleStopIndex: number,\n}) => void;\ntype onScrollCallback = ({\n scrollDirection: ScrollDirection,\n scrollOffset: number,\n scrollUpdateWasRequested: boolean,\n}) => void;\n\ntype ScrollEvent = SyntheticEvent;\ntype ItemStyleCache = { [index: number]: Object };\n\ntype OuterProps = {|\n children: React$Node,\n className: string | void,\n onScroll: ScrollEvent => void,\n style: {\n [string]: mixed,\n },\n|};\n\ntype InnerProps = {|\n children: React$Node,\n style: {\n [string]: mixed,\n },\n|};\n\nexport type Props = {|\n children: RenderComponent,\n className?: string,\n direction: Direction,\n height: number | string,\n initialScrollOffset?: number,\n innerRef?: any,\n innerElementType?: string | React$AbstractComponent,\n innerTagName?: string, // deprecated\n itemCount: number,\n itemData: T,\n itemKey?: (index: number, data: T) => any,\n itemSize: itemSize,\n layout: Layout,\n onItemsRendered?: onItemsRenderedCallback,\n onScroll?: onScrollCallback,\n outerRef?: any,\n outerElementType?: string | React$AbstractComponent,\n outerTagName?: string, // deprecated\n overscanCount: number,\n style?: Object,\n useIsScrolling: boolean,\n width: number | string,\n|};\n\ntype State = {|\n instance: any,\n isScrolling: boolean,\n scrollDirection: ScrollDirection,\n scrollOffset: number,\n scrollUpdateWasRequested: boolean,\n|};\n\ntype GetItemOffset = (\n props: Props,\n index: number,\n instanceProps: any\n) => number;\ntype GetItemSize = (\n props: Props,\n index: number,\n instanceProps: any\n) => number;\ntype GetEstimatedTotalSize = (props: Props, instanceProps: any) => number;\ntype GetOffsetForIndexAndAlignment = (\n props: Props,\n index: number,\n align: ScrollToAlign,\n scrollOffset: number,\n instanceProps: any\n) => number;\ntype GetStartIndexForOffset = (\n props: Props,\n offset: number,\n instanceProps: any\n) => number;\ntype GetStopIndexForStartIndex = (\n props: Props,\n startIndex: number,\n scrollOffset: number,\n instanceProps: any\n) => number;\ntype InitInstanceProps = (props: Props, instance: any) => any;\ntype ValidateProps = (props: Props) => void;\n\nconst IS_SCROLLING_DEBOUNCE_INTERVAL = 150;\n\nconst defaultItemKey = (index: number, data: any) => index;\n\n// In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\nlet devWarningsDirection = null;\nlet devWarningsTagName = null;\nif (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsDirection = new WeakSet();\n devWarningsTagName = new WeakSet();\n }\n}\n\nexport default function createListComponent({\n getItemOffset,\n getEstimatedTotalSize,\n getItemSize,\n getOffsetForIndexAndAlignment,\n getStartIndexForOffset,\n getStopIndexForStartIndex,\n initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange,\n validateProps,\n}: {|\n getItemOffset: GetItemOffset,\n getEstimatedTotalSize: GetEstimatedTotalSize,\n getItemSize: GetItemSize,\n getOffsetForIndexAndAlignment: GetOffsetForIndexAndAlignment,\n getStartIndexForOffset: GetStartIndexForOffset,\n getStopIndexForStartIndex: GetStopIndexForStartIndex,\n initInstanceProps: InitInstanceProps,\n shouldResetStyleCacheOnItemSizeChange: boolean,\n validateProps: ValidateProps,\n|}) {\n return class List extends PureComponent, State> {\n _instanceProps: any = initInstanceProps(this.props, this);\n _outerRef: ?HTMLDivElement;\n _resetIsScrollingTimeoutId: TimeoutID | null = null;\n\n static defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n layout: 'vertical',\n overscanCount: 2,\n useIsScrolling: false,\n };\n\n state: State = {\n instance: this,\n isScrolling: false,\n scrollDirection: 'forward',\n scrollOffset:\n typeof this.props.initialScrollOffset === 'number'\n ? this.props.initialScrollOffset\n : 0,\n scrollUpdateWasRequested: false,\n };\n\n // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n constructor(props: Props) {\n super(props);\n }\n\n static getDerivedStateFromProps(\n nextProps: Props,\n prevState: State\n ): $Shape | null {\n validateSharedProps(nextProps, prevState);\n validateProps(nextProps);\n return null;\n }\n\n scrollTo(scrollOffset: number): void {\n scrollOffset = Math.max(0, scrollOffset);\n\n this.setState(prevState => {\n if (prevState.scrollOffset === scrollOffset) {\n return null;\n }\n return {\n scrollDirection:\n prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: true,\n };\n }, this._resetIsScrollingDebounced);\n }\n\n scrollToItem(index: number, align: ScrollToAlign = 'auto'): void {\n const { itemCount, layout } = this.props;\n const { scrollOffset } = this.state;\n\n index = Math.max(0, Math.min(index, itemCount - 1));\n\n // The scrollbar size should be considered when scrolling an item into view, to ensure it's fully visible.\n // But we only need to account for its size when it's actually visible.\n // This is an edge case for lists; normally they only scroll in the dominant direction.\n let scrollbarSize = 0;\n if (this._outerRef) {\n const outerRef = ((this._outerRef: any): HTMLElement);\n if (layout === 'vertical') {\n scrollbarSize =\n outerRef.scrollWidth > outerRef.clientWidth\n ? getScrollbarSize()\n : 0;\n } else {\n scrollbarSize =\n outerRef.scrollHeight > outerRef.clientHeight\n ? getScrollbarSize()\n : 0;\n }\n }\n\n this.scrollTo(\n getOffsetForIndexAndAlignment(\n this.props,\n index,\n align,\n scrollOffset,\n this._instanceProps,\n scrollbarSize\n )\n );\n }\n\n componentDidMount() {\n const { direction, initialScrollOffset, layout } = this.props;\n\n if (typeof initialScrollOffset === 'number' && this._outerRef != null) {\n const outerRef = ((this._outerRef: any): HTMLElement);\n // TODO Deprecate direction \"horizontal\"\n if (direction === 'horizontal' || layout === 'horizontal') {\n outerRef.scrollLeft = initialScrollOffset;\n } else {\n outerRef.scrollTop = initialScrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n }\n\n componentDidUpdate() {\n const { direction, layout } = this.props;\n const { scrollOffset, scrollUpdateWasRequested } = this.state;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n const outerRef = ((this._outerRef: any): HTMLElement);\n\n // TODO Deprecate direction \"horizontal\"\n if (direction === 'horizontal' || layout === 'horizontal') {\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollOffset;\n break;\n case 'positive-ascending':\n outerRef.scrollLeft = scrollOffset;\n break;\n default:\n const { clientWidth, scrollWidth } = outerRef;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;\n break;\n }\n } else {\n outerRef.scrollLeft = scrollOffset;\n }\n } else {\n outerRef.scrollTop = scrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n }\n\n componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n }\n\n render() {\n const {\n children,\n className,\n direction,\n height,\n innerRef,\n innerElementType,\n innerTagName,\n itemCount,\n itemData,\n itemKey = defaultItemKey,\n layout,\n outerElementType,\n outerTagName,\n style,\n useIsScrolling,\n width,\n } = this.props;\n const { isScrolling } = this.state;\n\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal =\n direction === 'horizontal' || layout === 'horizontal';\n\n const onScroll = isHorizontal\n ? this._onScrollHorizontal\n : this._onScrollVertical;\n\n const [startIndex, stopIndex] = this._getRangeToRender();\n\n const items = [];\n if (itemCount > 0) {\n for (let index = startIndex; index <= stopIndex; index++) {\n items.push(\n createElement(children, {\n data: itemData,\n key: itemKey(index, itemData),\n index,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n style: this._getItemStyle(index),\n })\n );\n }\n }\n\n // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n const estimatedTotalSize = getEstimatedTotalSize(\n this.props,\n this._instanceProps\n );\n\n return createElement(\n outerElementType || outerTagName || 'div',\n {\n className,\n onScroll,\n ref: this._outerRefSetter,\n style: {\n position: 'relative',\n height,\n width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction,\n ...style,\n },\n },\n createElement(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: isHorizontal ? '100%' : estimatedTotalSize,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: isHorizontal ? estimatedTotalSize : '100%',\n },\n })\n );\n }\n\n _callOnItemsRendered: (\n overscanStartIndex: number,\n overscanStopIndex: number,\n visibleStartIndex: number,\n visibleStopIndex: number\n ) => void;\n _callOnItemsRendered = memoizeOne(\n (\n overscanStartIndex: number,\n overscanStopIndex: number,\n visibleStartIndex: number,\n visibleStopIndex: number\n ) =>\n ((this.props.onItemsRendered: any): onItemsRenderedCallback)({\n overscanStartIndex,\n overscanStopIndex,\n visibleStartIndex,\n visibleStopIndex,\n })\n );\n\n _callOnScroll: (\n scrollDirection: ScrollDirection,\n scrollOffset: number,\n scrollUpdateWasRequested: boolean\n ) => void;\n _callOnScroll = memoizeOne(\n (\n scrollDirection: ScrollDirection,\n scrollOffset: number,\n scrollUpdateWasRequested: boolean\n ) =>\n ((this.props.onScroll: any): onScrollCallback)({\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested,\n })\n );\n\n _callPropsCallbacks() {\n if (typeof this.props.onItemsRendered === 'function') {\n const { itemCount } = this.props;\n if (itemCount > 0) {\n const [\n overscanStartIndex,\n overscanStopIndex,\n visibleStartIndex,\n visibleStopIndex,\n ] = this._getRangeToRender();\n this._callOnItemsRendered(\n overscanStartIndex,\n overscanStopIndex,\n visibleStartIndex,\n visibleStopIndex\n );\n }\n }\n\n if (typeof this.props.onScroll === 'function') {\n const {\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested,\n } = this.state;\n this._callOnScroll(\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested\n );\n }\n }\n\n // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n _getItemStyle: (index: number) => Object;\n _getItemStyle = (index: number): Object => {\n const { direction, itemSize, layout } = this.props;\n\n const itemStyleCache = this._getItemStyleCache(\n shouldResetStyleCacheOnItemSizeChange && itemSize,\n shouldResetStyleCacheOnItemSizeChange && layout,\n shouldResetStyleCacheOnItemSizeChange && direction\n );\n\n let style;\n if (itemStyleCache.hasOwnProperty(index)) {\n style = itemStyleCache[index];\n } else {\n const offset = getItemOffset(this.props, index, this._instanceProps);\n const size = getItemSize(this.props, index, this._instanceProps);\n\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal =\n direction === 'horizontal' || layout === 'horizontal';\n\n const isRtl = direction === 'rtl';\n const offsetHorizontal = isHorizontal ? offset : 0;\n itemStyleCache[index] = style = {\n position: 'absolute',\n left: isRtl ? undefined : offsetHorizontal,\n right: isRtl ? offsetHorizontal : undefined,\n top: !isHorizontal ? offset : 0,\n height: !isHorizontal ? size : '100%',\n width: isHorizontal ? size : '100%',\n };\n }\n\n return style;\n };\n\n _getItemStyleCache: (_: any, __: any, ___: any) => ItemStyleCache;\n _getItemStyleCache = memoizeOne((_: any, __: any, ___: any) => ({}));\n\n _getRangeToRender(): [number, number, number, number] {\n const { itemCount, overscanCount } = this.props;\n const { isScrolling, scrollDirection, scrollOffset } = this.state;\n\n if (itemCount === 0) {\n return [0, 0, 0, 0];\n }\n\n const startIndex = getStartIndexForOffset(\n this.props,\n scrollOffset,\n this._instanceProps\n );\n const stopIndex = getStopIndexForStartIndex(\n this.props,\n startIndex,\n scrollOffset,\n this._instanceProps\n );\n\n // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n const overscanBackward =\n !isScrolling || scrollDirection === 'backward'\n ? Math.max(1, overscanCount)\n : 1;\n const overscanForward =\n !isScrolling || scrollDirection === 'forward'\n ? Math.max(1, overscanCount)\n : 1;\n\n return [\n Math.max(0, startIndex - overscanBackward),\n Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)),\n startIndex,\n stopIndex,\n ];\n }\n\n _onScrollHorizontal = (event: ScrollEvent): void => {\n const { clientWidth, scrollLeft, scrollWidth } = event.currentTarget;\n this.setState(prevState => {\n if (prevState.scrollOffset === scrollLeft) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n const { direction } = this.props;\n\n let scrollOffset = scrollLeft;\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n switch (getRTLOffsetType()) {\n case 'negative':\n scrollOffset = -scrollLeft;\n break;\n case 'positive-descending':\n scrollOffset = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n }\n\n // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n scrollOffset = Math.max(\n 0,\n Math.min(scrollOffset, scrollWidth - clientWidth)\n );\n\n return {\n isScrolling: true,\n scrollDirection:\n prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset,\n scrollUpdateWasRequested: false,\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _onScrollVertical = (event: ScrollEvent): void => {\n const { clientHeight, scrollHeight, scrollTop } = event.currentTarget;\n this.setState(prevState => {\n if (prevState.scrollOffset === scrollTop) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n const scrollOffset = Math.max(\n 0,\n Math.min(scrollTop, scrollHeight - clientHeight)\n );\n\n return {\n isScrolling: true,\n scrollDirection:\n prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset,\n scrollUpdateWasRequested: false,\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _outerRefSetter = (ref: any): void => {\n const { outerRef } = this.props;\n\n this._outerRef = ((ref: any): HTMLDivElement);\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (\n outerRef != null &&\n typeof outerRef === 'object' &&\n outerRef.hasOwnProperty('current')\n ) {\n outerRef.current = ref;\n }\n };\n\n _resetIsScrollingDebounced = () => {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n\n this._resetIsScrollingTimeoutId = requestTimeout(\n this._resetIsScrolling,\n IS_SCROLLING_DEBOUNCE_INTERVAL\n );\n };\n\n _resetIsScrolling = () => {\n this._resetIsScrollingTimeoutId = null;\n\n this.setState({ isScrolling: false }, () => {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n this._getItemStyleCache(-1, null);\n });\n };\n };\n}\n\n// NOTE: I considered further wrapping individual items with a pure ListItem component.\n// This would avoid ever calling the render function for the same index more than once,\n// But it would also add the overhead of a lot of components/fibers.\n// I assume people already do this (render function returning a class component),\n// So my doing it would just unnecessarily double the wrappers.\n\nconst validateSharedProps = (\n {\n children,\n direction,\n height,\n layout,\n innerTagName,\n outerTagName,\n width,\n }: Props,\n { instance }: State\n): void => {\n if (process.env.NODE_ENV !== 'production') {\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName && !devWarningsTagName.has(instance)) {\n devWarningsTagName.add(instance);\n console.warn(\n 'The innerTagName and outerTagName props have been deprecated. ' +\n 'Please use the innerElementType and outerElementType props instead.'\n );\n }\n }\n\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n\n switch (direction) {\n case 'horizontal':\n case 'vertical':\n if (devWarningsDirection && !devWarningsDirection.has(instance)) {\n devWarningsDirection.add(instance);\n console.warn(\n 'The direction prop should be either \"ltr\" (default) or \"rtl\". ' +\n 'Please use the layout prop to specify \"vertical\" (default) or \"horizontal\" orientation.'\n );\n }\n break;\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n default:\n throw Error(\n 'An invalid \"direction\" prop has been specified. ' +\n 'Value should be either \"ltr\" or \"rtl\". ' +\n `\"${direction}\" was specified.`\n );\n }\n\n switch (layout) {\n case 'horizontal':\n case 'vertical':\n // Valid values\n break;\n default:\n throw Error(\n 'An invalid \"layout\" prop has been specified. ' +\n 'Value should be either \"horizontal\" or \"vertical\". ' +\n `\"${layout}\" was specified.`\n );\n }\n\n if (children == null) {\n throw Error(\n 'An invalid \"children\" prop has been specified. ' +\n 'Value should be a React component. ' +\n `\"${children === null ? 'null' : typeof children}\" was specified.`\n );\n }\n\n if (isHorizontal && typeof width !== 'number') {\n throw Error(\n 'An invalid \"width\" prop has been specified. ' +\n 'Horizontal lists must specify a number for width. ' +\n `\"${width === null ? 'null' : typeof width}\" was specified.`\n );\n } else if (!isHorizontal && typeof height !== 'number') {\n throw Error(\n 'An invalid \"height\" prop has been specified. ' +\n 'Vertical lists must specify a number for height. ' +\n `\"${height === null ? 'null' : typeof height}\" was specified.`\n );\n }\n }\n};\n","// @flow\n\nimport createListComponent from './createListComponent';\n\nimport type { Props, ScrollToAlign } from './createListComponent';\n\ntype InstanceProps = any;\n\nconst FixedSizeList = createListComponent({\n getItemOffset: ({ itemSize }: Props, index: number): number =>\n index * ((itemSize: any): number),\n\n getItemSize: ({ itemSize }: Props, index: number): number =>\n ((itemSize: any): number),\n\n getEstimatedTotalSize: ({ itemCount, itemSize }: Props) =>\n ((itemSize: any): number) * itemCount,\n\n getOffsetForIndexAndAlignment: (\n { direction, height, itemCount, itemSize, layout, width }: Props,\n index: number,\n align: ScrollToAlign,\n scrollOffset: number,\n instanceProps: InstanceProps,\n scrollbarSize: number\n ): number => {\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n const size = (((isHorizontal ? width : height): any): number);\n const lastItemOffset = Math.max(\n 0,\n itemCount * ((itemSize: any): number) - size\n );\n const maxOffset = Math.min(\n lastItemOffset,\n index * ((itemSize: any): number)\n );\n const minOffset = Math.max(\n 0,\n index * ((itemSize: any): number) -\n size +\n ((itemSize: any): number) +\n scrollbarSize\n );\n\n if (align === 'smart') {\n if (\n scrollOffset >= minOffset - size &&\n scrollOffset <= maxOffset + size\n ) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n case 'end':\n return minOffset;\n case 'center': {\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n const middleOffset = Math.round(\n minOffset + (maxOffset - minOffset) / 2\n );\n if (middleOffset < Math.ceil(size / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastItemOffset + Math.floor(size / 2)) {\n return lastItemOffset; // near the end\n } else {\n return middleOffset;\n }\n }\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n }\n },\n\n getStartIndexForOffset: (\n { itemCount, itemSize }: Props,\n offset: number\n ): number =>\n Math.max(\n 0,\n Math.min(itemCount - 1, Math.floor(offset / ((itemSize: any): number)))\n ),\n\n getStopIndexForStartIndex: (\n { direction, height, itemCount, itemSize, layout, width }: Props,\n startIndex: number,\n scrollOffset: number\n ): number => {\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n const offset = startIndex * ((itemSize: any): number);\n const size = (((isHorizontal ? width : height): any): number);\n const numVisibleItems = Math.ceil(\n (size + scrollOffset - offset) / ((itemSize: any): number)\n );\n return Math.max(\n 0,\n Math.min(\n itemCount - 1,\n startIndex + numVisibleItems - 1 // -1 is because stop index is inclusive\n )\n );\n },\n\n initInstanceProps(props: Props): any {\n // Noop\n },\n\n shouldResetStyleCacheOnItemSizeChange: true,\n\n validateProps: ({ itemSize }: Props): void => {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof itemSize !== 'number') {\n throw Error(\n 'An invalid \"itemSize\" prop has been specified. ' +\n 'Value should be a number. ' +\n `\"${itemSize === null ? 'null' : typeof itemSize}\" was specified.`\n );\n }\n }\n },\n});\n\nexport default FixedSizeList;\n","/**\n * @name toDate\n * @category Common Helpers\n * @summary Convert the given argument to an instance of Date.\n *\n * @description\n * Convert the given argument to an instance of Date.\n *\n * If the argument is an instance of Date, the function returns its clone.\n *\n * If the argument is a number, it is treated as a timestamp.\n *\n * If the argument is none of the above, the function returns Invalid Date.\n *\n * **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param argument - The value to convert\n *\n * @returns The parsed date in the local time zone\n *\n * @example\n * // Clone the date:\n * const result = toDate(new Date(2014, 1, 11, 11, 30, 30))\n * //=> Tue Feb 11 2014 11:30:30\n *\n * @example\n * // Convert the timestamp to date:\n * const result = toDate(1392098430000)\n * //=> Tue Feb 11 2014 11:30:30\n */\nexport function toDate(argument) {\n const argStr = Object.prototype.toString.call(argument);\n\n // Clone the date\n if (\n argument instanceof Date ||\n (typeof argument === \"object\" && argStr === \"[object Date]\")\n ) {\n // Prevent the date to lose the milliseconds when passed to new Date() in IE10\n return new argument.constructor(+argument);\n } else if (\n typeof argument === \"number\" ||\n argStr === \"[object Number]\" ||\n typeof argument === \"string\" ||\n argStr === \"[object String]\"\n ) {\n // TODO: Can we get rid of as?\n return new Date(argument);\n } else {\n // TODO: Can we get rid of as?\n return new Date(NaN);\n }\n}\n\n// Fallback for modularized imports:\nexport default toDate;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name compareAsc\n * @category Common Helpers\n * @summary Compare the two dates and return -1, 0 or 1.\n *\n * @description\n * Compare the two dates and return 1 if the first date is after the second,\n * -1 if the first date is before the second or 0 if dates are equal.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The first date to compare\n * @param dateRight - The second date to compare\n *\n * @returns The result of the comparison\n *\n * @example\n * // Compare 11 February 1987 and 10 July 1989:\n * const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))\n * //=> -1\n *\n * @example\n * // Sort the array of dates:\n * const result = [\n * new Date(1995, 6, 2),\n * new Date(1987, 1, 11),\n * new Date(1989, 6, 10)\n * ].sort(compareAsc)\n * //=> [\n * // Wed Feb 11 1987 00:00:00,\n * // Mon Jul 10 1989 00:00:00,\n * // Sun Jul 02 1995 00:00:00\n * // ]\n */\nexport function compareAsc(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const diff = _dateLeft.getTime() - _dateRight.getTime();\n\n if (diff < 0) {\n return -1;\n } else if (diff > 0) {\n return 1;\n // Return 0 if diff is 0; return NaN if diff is NaN\n } else {\n return diff;\n }\n}\n\n// Fallback for modularized imports:\nexport default compareAsc;\n","/**\n * @module constants\n * @summary Useful constants\n * @description\n * Collection of useful date constants.\n *\n * The constants could be imported from `date-fns/constants`:\n *\n * ```ts\n * import { maxTime, minTime } from \"./constants/date-fns/constants\";\n *\n * function isAllowedTime(time) {\n * return time <= maxTime && time >= minTime;\n * }\n * ```\n */\n\n/**\n * @constant\n * @name daysInWeek\n * @summary Days in 1 week.\n */\nexport const daysInWeek = 7;\n\n/**\n * @constant\n * @name daysInYear\n * @summary Days in 1 year.\n *\n * @description\n * How many days in a year.\n *\n * One years equals 365.2425 days according to the formula:\n *\n * > Leap year occures every 4 years, except for years that are divisable by 100 and not divisable by 400.\n * > 1 mean year = (365+1/4-1/100+1/400) days = 365.2425 days\n */\nexport const daysInYear = 365.2425;\n\n/**\n * @constant\n * @name maxTime\n * @summary Maximum allowed time.\n *\n * @example\n * import { maxTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = 8640000000000001 <= maxTime;\n * //=> false\n *\n * new Date(8640000000000001);\n * //=> Invalid Date\n */\nexport const maxTime = Math.pow(10, 8) * 24 * 60 * 60 * 1000;\n\n/**\n * @constant\n * @name minTime\n * @summary Minimum allowed time.\n *\n * @example\n * import { minTime } from \"./constants/date-fns/constants\";\n *\n * const isValid = -8640000000000001 >= minTime;\n * //=> false\n *\n * new Date(-8640000000000001)\n * //=> Invalid Date\n */\nexport const minTime = -maxTime;\n\n/**\n * @constant\n * @name millisecondsInWeek\n * @summary Milliseconds in 1 week.\n */\nexport const millisecondsInWeek = 604800000;\n\n/**\n * @constant\n * @name millisecondsInDay\n * @summary Milliseconds in 1 day.\n */\nexport const millisecondsInDay = 86400000;\n\n/**\n * @constant\n * @name millisecondsInMinute\n * @summary Milliseconds in 1 minute\n */\nexport const millisecondsInMinute = 60000;\n\n/**\n * @constant\n * @name millisecondsInHour\n * @summary Milliseconds in 1 hour\n */\nexport const millisecondsInHour = 3600000;\n\n/**\n * @constant\n * @name millisecondsInSecond\n * @summary Milliseconds in 1 second\n */\nexport const millisecondsInSecond = 1000;\n\n/**\n * @constant\n * @name minutesInYear\n * @summary Minutes in 1 year.\n */\nexport const minutesInYear = 525600;\n\n/**\n * @constant\n * @name minutesInMonth\n * @summary Minutes in 1 month.\n */\nexport const minutesInMonth = 43200;\n\n/**\n * @constant\n * @name minutesInDay\n * @summary Minutes in 1 day.\n */\nexport const minutesInDay = 1440;\n\n/**\n * @constant\n * @name minutesInHour\n * @summary Minutes in 1 hour.\n */\nexport const minutesInHour = 60;\n\n/**\n * @constant\n * @name monthsInQuarter\n * @summary Months in 1 quarter.\n */\nexport const monthsInQuarter = 3;\n\n/**\n * @constant\n * @name monthsInYear\n * @summary Months in 1 year.\n */\nexport const monthsInYear = 12;\n\n/**\n * @constant\n * @name quartersInYear\n * @summary Quarters in 1 year\n */\nexport const quartersInYear = 4;\n\n/**\n * @constant\n * @name secondsInHour\n * @summary Seconds in 1 hour.\n */\nexport const secondsInHour = 3600;\n\n/**\n * @constant\n * @name secondsInMinute\n * @summary Seconds in 1 minute.\n */\nexport const secondsInMinute = 60;\n\n/**\n * @constant\n * @name secondsInDay\n * @summary Seconds in 1 day.\n */\nexport const secondsInDay = secondsInHour * 24;\n\n/**\n * @constant\n * @name secondsInWeek\n * @summary Seconds in 1 week.\n */\nexport const secondsInWeek = secondsInDay * 7;\n\n/**\n * @constant\n * @name secondsInYear\n * @summary Seconds in 1 year.\n */\nexport const secondsInYear = secondsInDay * daysInYear;\n\n/**\n * @constant\n * @name secondsInMonth\n * @summary Seconds in 1 month\n */\nexport const secondsInMonth = secondsInYear / 12;\n\n/**\n * @constant\n * @name secondsInQuarter\n * @summary Seconds in 1 quarter.\n */\nexport const secondsInQuarter = secondsInMonth * 3;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInCalendarMonths\n * @category Month Helpers\n * @summary Get the number of calendar months between the given dates.\n *\n * @description\n * Get the number of calendar months between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of calendar months\n *\n * @example\n * // How many calendar months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInCalendarMonths(\n * new Date(2014, 8, 1),\n * new Date(2014, 0, 31)\n * )\n * //=> 8\n */\nexport function differenceInCalendarMonths(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const yearDiff = _dateLeft.getFullYear() - _dateRight.getFullYear();\n const monthDiff = _dateLeft.getMonth() - _dateRight.getMonth();\n\n return yearDiff * 12 + monthDiff;\n}\n\n// Fallback for modularized imports:\nexport default differenceInCalendarMonths;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfDay\n * @category Day Helpers\n * @summary Return the end of a day for the given date.\n *\n * @description\n * Return the end of a day for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a day\n *\n * @example\n * // The end of a day for 2 September 2014 11:55:00:\n * const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 02 2014 23:59:59.999\n */\nexport function endOfDay(date) {\n const _date = toDate(date);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfDay;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name endOfMonth\n * @category Month Helpers\n * @summary Return the end of a month for the given date.\n *\n * @description\n * Return the end of a month for the given date.\n * The result will be in the local timezone.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The original date\n *\n * @returns The end of a month\n *\n * @example\n * // The end of a month for 2 September 2014 11:55:00:\n * const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))\n * //=> Tue Sep 30 2014 23:59:59.999\n */\nexport function endOfMonth(date) {\n const _date = toDate(date);\n const month = _date.getMonth();\n _date.setFullYear(_date.getFullYear(), month + 1, 0);\n _date.setHours(23, 59, 59, 999);\n return _date;\n}\n\n// Fallback for modularized imports:\nexport default endOfMonth;\n","import { endOfDay } from \"./endOfDay.mjs\";\nimport { endOfMonth } from \"./endOfMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name isLastDayOfMonth\n * @category Month Helpers\n * @summary Is the given date the last day of a month?\n *\n * @description\n * Is the given date the last day of a month?\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date to check\n\n * @returns The date is the last day of a month\n *\n * @example\n * // Is 28 February 2014 the last day of a month?\n * const result = isLastDayOfMonth(new Date(2014, 1, 28))\n * //=> true\n */\nexport function isLastDayOfMonth(date) {\n const _date = toDate(date);\n return +endOfDay(_date) === +endOfMonth(_date);\n}\n\n// Fallback for modularized imports:\nexport default isLastDayOfMonth;\n","import { compareAsc } from \"./compareAsc.mjs\";\nimport { differenceInCalendarMonths } from \"./differenceInCalendarMonths.mjs\";\nimport { isLastDayOfMonth } from \"./isLastDayOfMonth.mjs\";\nimport { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInMonths\n * @category Month Helpers\n * @summary Get the number of full months between the given dates.\n *\n * @description\n * Get the number of full months between the given dates using trunc as a default rounding method.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of full months\n *\n * @example\n * // How many full months are between 31 January 2014 and 1 September 2014?\n * const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))\n * //=> 7\n */\nexport function differenceInMonths(dateLeft, dateRight) {\n const _dateLeft = toDate(dateLeft);\n const _dateRight = toDate(dateRight);\n\n const sign = compareAsc(_dateLeft, _dateRight);\n const difference = Math.abs(\n differenceInCalendarMonths(_dateLeft, _dateRight),\n );\n let result;\n\n // Check for the difference of less than month\n if (difference < 1) {\n result = 0;\n } else {\n if (_dateLeft.getMonth() === 1 && _dateLeft.getDate() > 27) {\n // This will check if the date is end of Feb and assign a higher end of month date\n // to compare it with Jan\n _dateLeft.setDate(30);\n }\n\n _dateLeft.setMonth(_dateLeft.getMonth() - sign * difference);\n\n // Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full\n // If so, result must be decreased by 1 in absolute value\n let isLastMonthNotFull = compareAsc(_dateLeft, _dateRight) === -sign;\n\n // Check for cases of one full calendar month\n if (\n isLastDayOfMonth(toDate(dateLeft)) &&\n difference === 1 &&\n compareAsc(dateLeft, _dateRight) === 1\n ) {\n isLastMonthNotFull = false;\n }\n\n result = sign * (difference - Number(isLastMonthNotFull));\n }\n\n // Prevent negative zero\n return result === 0 ? 0 : result;\n}\n\n// Fallback for modularized imports:\nexport default differenceInMonths;\n","import { toDate } from \"./toDate.mjs\";\n\n/**\n * @name differenceInMilliseconds\n * @category Millisecond Helpers\n * @summary Get the number of milliseconds between the given dates.\n *\n * @description\n * Get the number of milliseconds between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n *\n * @returns The number of milliseconds\n *\n * @example\n * // How many milliseconds are between\n * // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?\n * const result = differenceInMilliseconds(\n * new Date(2014, 6, 2, 12, 30, 21, 700),\n * new Date(2014, 6, 2, 12, 30, 20, 600)\n * )\n * //=> 1100\n */\nexport function differenceInMilliseconds(dateLeft, dateRight) {\n return +toDate(dateLeft) - +toDate(dateRight);\n}\n\n// Fallback for modularized imports:\nexport default differenceInMilliseconds;\n","import { getRoundingMethod } from \"./_lib/getRoundingMethod.mjs\";\nimport { differenceInMilliseconds } from \"./differenceInMilliseconds.mjs\";\n\n/**\n * The {@link differenceInSeconds} function options.\n */\n\n/**\n * @name differenceInSeconds\n * @category Second Helpers\n * @summary Get the number of seconds between the given dates.\n *\n * @description\n * Get the number of seconds between the given dates.\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param dateLeft - The later date\n * @param dateRight - The earlier date\n * @param options - An object with options.\n *\n * @returns The number of seconds\n *\n * @example\n * // How many seconds are between\n * // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?\n * const result = differenceInSeconds(\n * new Date(2014, 6, 2, 12, 30, 20, 0),\n * new Date(2014, 6, 2, 12, 30, 7, 999)\n * )\n * //=> 12\n */\nexport function differenceInSeconds(dateLeft, dateRight, options) {\n const diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;\n return getRoundingMethod(options?.roundingMethod)(diff);\n}\n\n// Fallback for modularized imports:\nexport default differenceInSeconds;\n","export function getRoundingMethod(method) {\n return (number) => {\n const round = method ? Math[method] : Math.trunc;\n const result = round(number);\n // Prevent negative zero\n return result === 0 ? 0 : result;\n };\n}\n","const formatDistanceLocale = {\n lessThanXSeconds: {\n one: \"less than a second\",\n other: \"less than {{count}} seconds\",\n },\n\n xSeconds: {\n one: \"1 second\",\n other: \"{{count}} seconds\",\n },\n\n halfAMinute: \"half a minute\",\n\n lessThanXMinutes: {\n one: \"less than a minute\",\n other: \"less than {{count}} minutes\",\n },\n\n xMinutes: {\n one: \"1 minute\",\n other: \"{{count}} minutes\",\n },\n\n aboutXHours: {\n one: \"about 1 hour\",\n other: \"about {{count}} hours\",\n },\n\n xHours: {\n one: \"1 hour\",\n other: \"{{count}} hours\",\n },\n\n xDays: {\n one: \"1 day\",\n other: \"{{count}} days\",\n },\n\n aboutXWeeks: {\n one: \"about 1 week\",\n other: \"about {{count}} weeks\",\n },\n\n xWeeks: {\n one: \"1 week\",\n other: \"{{count}} weeks\",\n },\n\n aboutXMonths: {\n one: \"about 1 month\",\n other: \"about {{count}} months\",\n },\n\n xMonths: {\n one: \"1 month\",\n other: \"{{count}} months\",\n },\n\n aboutXYears: {\n one: \"about 1 year\",\n other: \"about {{count}} years\",\n },\n\n xYears: {\n one: \"1 year\",\n other: \"{{count}} years\",\n },\n\n overXYears: {\n one: \"over 1 year\",\n other: \"over {{count}} years\",\n },\n\n almostXYears: {\n one: \"almost 1 year\",\n other: \"almost {{count}} years\",\n },\n};\n\nexport const formatDistance = (token, count, options) => {\n let result;\n\n const tokenValue = formatDistanceLocale[token];\n if (typeof tokenValue === \"string\") {\n result = tokenValue;\n } else if (count === 1) {\n result = tokenValue.one;\n } else {\n result = tokenValue.other.replace(\"{{count}}\", count.toString());\n }\n\n if (options?.addSuffix) {\n if (options.comparison && options.comparison > 0) {\n return \"in \" + result;\n } else {\n return result + \" ago\";\n }\n }\n\n return result;\n};\n","export function buildFormatLongFn(args) {\n return (options = {}) => {\n // TODO: Remove String()\n const width = options.width ? String(options.width) : args.defaultWidth;\n const format = args.formats[width] || args.formats[args.defaultWidth];\n return format;\n };\n}\n","import { buildFormatLongFn } from \"../../_lib/buildFormatLongFn.mjs\";\n\nconst dateFormats = {\n full: \"EEEE, MMMM do, y\",\n long: \"MMMM do, y\",\n medium: \"MMM d, y\",\n short: \"MM/dd/yyyy\",\n};\n\nconst timeFormats = {\n full: \"h:mm:ss a zzzz\",\n long: \"h:mm:ss a z\",\n medium: \"h:mm:ss a\",\n short: \"h:mm a\",\n};\n\nconst dateTimeFormats = {\n full: \"{{date}} 'at' {{time}}\",\n long: \"{{date}} 'at' {{time}}\",\n medium: \"{{date}}, {{time}}\",\n short: \"{{date}}, {{time}}\",\n};\n\nexport const formatLong = {\n date: buildFormatLongFn({\n formats: dateFormats,\n defaultWidth: \"full\",\n }),\n\n time: buildFormatLongFn({\n formats: timeFormats,\n defaultWidth: \"full\",\n }),\n\n dateTime: buildFormatLongFn({\n formats: dateTimeFormats,\n defaultWidth: \"full\",\n }),\n};\n","const formatRelativeLocale = {\n lastWeek: \"'last' eeee 'at' p\",\n yesterday: \"'yesterday at' p\",\n today: \"'today at' p\",\n tomorrow: \"'tomorrow at' p\",\n nextWeek: \"eeee 'at' p\",\n other: \"P\",\n};\n\nexport const formatRelative = (token, _date, _baseDate, _options) =>\n formatRelativeLocale[token];\n","/* eslint-disable no-unused-vars */\n\n/**\n * The localize function argument callback which allows to convert raw value to\n * the actual type.\n *\n * @param value - The value to convert\n *\n * @returns The converted value\n */\n\n/**\n * The map of localized values for each width.\n */\n\n/**\n * The index type of the locale unit value. It types conversion of units of\n * values that don't start at 0 (i.e. quarters).\n */\n\n/**\n * Converts the unit value to the tuple of values.\n */\n\n/**\n * The tuple of localized era values. The first element represents BC,\n * the second element represents AD.\n */\n\n/**\n * The tuple of localized quarter values. The first element represents Q1.\n */\n\n/**\n * The tuple of localized day values. The first element represents Sunday.\n */\n\n/**\n * The tuple of localized month values. The first element represents January.\n */\n\nexport function buildLocalizeFn(args) {\n return (value, options) => {\n const context = options?.context ? String(options.context) : \"standalone\";\n\n let valuesArray;\n if (context === \"formatting\" && args.formattingValues) {\n const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;\n const width = options?.width ? String(options.width) : defaultWidth;\n\n valuesArray =\n args.formattingValues[width] || args.formattingValues[defaultWidth];\n } else {\n const defaultWidth = args.defaultWidth;\n const width = options?.width ? String(options.width) : args.defaultWidth;\n\n valuesArray = args.values[width] || args.values[defaultWidth];\n }\n const index = args.argumentCallback ? args.argumentCallback(value) : value;\n\n // @ts-expect-error - For some reason TypeScript just don't want to match it, no matter how hard we try. I challenge you to try to remove it!\n return valuesArray[index];\n };\n}\n","export function buildMatchFn(args) {\n return (string, options = {}) => {\n const width = options.width;\n\n const matchPattern =\n (width && args.matchPatterns[width]) ||\n args.matchPatterns[args.defaultMatchWidth];\n const matchResult = string.match(matchPattern);\n\n if (!matchResult) {\n return null;\n }\n const matchedString = matchResult[0];\n\n const parsePatterns =\n (width && args.parsePatterns[width]) ||\n args.parsePatterns[args.defaultParseWidth];\n\n const key = Array.isArray(parsePatterns)\n ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString))\n : // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n findKey(parsePatterns, (pattern) => pattern.test(matchedString));\n\n let value;\n\n value = args.valueCallback ? args.valueCallback(key) : key;\n value = options.valueCallback\n ? // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n options.valueCallback(value)\n : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n\nfunction findKey(object, predicate) {\n for (const key in object) {\n if (\n Object.prototype.hasOwnProperty.call(object, key) &&\n predicate(object[key])\n ) {\n return key;\n }\n }\n return undefined;\n}\n\nfunction findIndex(array, predicate) {\n for (let key = 0; key < array.length; key++) {\n if (predicate(array[key])) {\n return key;\n }\n }\n return undefined;\n}\n","export function buildMatchPatternFn(args) {\n return (string, options = {}) => {\n const matchResult = string.match(args.matchPattern);\n if (!matchResult) return null;\n const matchedString = matchResult[0];\n\n const parseResult = string.match(args.parsePattern);\n if (!parseResult) return null;\n let value = args.valueCallback\n ? args.valueCallback(parseResult[0])\n : parseResult[0];\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any -- I challange you to fix the type\n value = options.valueCallback ? options.valueCallback(value) : value;\n\n const rest = string.slice(matchedString.length);\n\n return { value, rest };\n };\n}\n","import { formatDistance } from \"./en-US/_lib/formatDistance.mjs\";\nimport { formatLong } from \"./en-US/_lib/formatLong.mjs\";\nimport { formatRelative } from \"./en-US/_lib/formatRelative.mjs\";\nimport { localize } from \"./en-US/_lib/localize.mjs\";\nimport { match } from \"./en-US/_lib/match.mjs\";\n\n/**\n * @category Locales\n * @summary English locale (United States).\n * @language English\n * @iso-639-2 eng\n * @author Sasha Koss [@kossnocorp](https://github.com/kossnocorp)\n * @author Lesha Koss [@leshakoss](https://github.com/leshakoss)\n */\nexport const enUS = {\n code: \"en-US\",\n formatDistance: formatDistance,\n formatLong: formatLong,\n formatRelative: formatRelative,\n localize: localize,\n match: match,\n options: {\n weekStartsOn: 0 /* Sunday */,\n firstWeekContainsDate: 1,\n },\n};\n\n// Fallback for modularized imports:\nexport default enUS;\n","import { buildLocalizeFn } from \"../../_lib/buildLocalizeFn.mjs\";\n\nconst eraValues = {\n narrow: [\"B\", \"A\"],\n abbreviated: [\"BC\", \"AD\"],\n wide: [\"Before Christ\", \"Anno Domini\"],\n};\n\nconst quarterValues = {\n narrow: [\"1\", \"2\", \"3\", \"4\"],\n abbreviated: [\"Q1\", \"Q2\", \"Q3\", \"Q4\"],\n wide: [\"1st quarter\", \"2nd quarter\", \"3rd quarter\", \"4th quarter\"],\n};\n\n// Note: in English, the names of days of the week and months are capitalized.\n// If you are making a new locale based on this one, check if the same is true for the language you're working on.\n// Generally, formatted dates should look like they are in the middle of a sentence,\n// e.g. in Spanish language the weekdays and months should be in the lowercase.\nconst monthValues = {\n narrow: [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"],\n abbreviated: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n\n wide: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ],\n};\n\nconst dayValues = {\n narrow: [\"S\", \"M\", \"T\", \"W\", \"T\", \"F\", \"S\"],\n short: [\"Su\", \"Mo\", \"Tu\", \"We\", \"Th\", \"Fr\", \"Sa\"],\n abbreviated: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n wide: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ],\n};\n\nconst dayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"morning\",\n afternoon: \"afternoon\",\n evening: \"evening\",\n night: \"night\",\n },\n};\n\nconst formattingDayPeriodValues = {\n narrow: {\n am: \"a\",\n pm: \"p\",\n midnight: \"mi\",\n noon: \"n\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n abbreviated: {\n am: \"AM\",\n pm: \"PM\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n wide: {\n am: \"a.m.\",\n pm: \"p.m.\",\n midnight: \"midnight\",\n noon: \"noon\",\n morning: \"in the morning\",\n afternoon: \"in the afternoon\",\n evening: \"in the evening\",\n night: \"at night\",\n },\n};\n\nconst ordinalNumber = (dirtyNumber, _options) => {\n const number = Number(dirtyNumber);\n\n // If ordinal numbers depend on context, for example,\n // if they are different for different grammatical genders,\n // use `options.unit`.\n //\n // `unit` can be 'year', 'quarter', 'month', 'week', 'date', 'dayOfYear',\n // 'day', 'hour', 'minute', 'second'.\n\n const rem100 = number % 100;\n if (rem100 > 20 || rem100 < 10) {\n switch (rem100 % 10) {\n case 1:\n return number + \"st\";\n case 2:\n return number + \"nd\";\n case 3:\n return number + \"rd\";\n }\n }\n return number + \"th\";\n};\n\nexport const localize = {\n ordinalNumber,\n\n era: buildLocalizeFn({\n values: eraValues,\n defaultWidth: \"wide\",\n }),\n\n quarter: buildLocalizeFn({\n values: quarterValues,\n defaultWidth: \"wide\",\n argumentCallback: (quarter) => quarter - 1,\n }),\n\n month: buildLocalizeFn({\n values: monthValues,\n defaultWidth: \"wide\",\n }),\n\n day: buildLocalizeFn({\n values: dayValues,\n defaultWidth: \"wide\",\n }),\n\n dayPeriod: buildLocalizeFn({\n values: dayPeriodValues,\n defaultWidth: \"wide\",\n formattingValues: formattingDayPeriodValues,\n defaultFormattingWidth: \"wide\",\n }),\n};\n","import { buildMatchFn } from \"../../_lib/buildMatchFn.mjs\";\nimport { buildMatchPatternFn } from \"../../_lib/buildMatchPatternFn.mjs\";\n\nconst matchOrdinalNumberPattern = /^(\\d+)(th|st|nd|rd)?/i;\nconst parseOrdinalNumberPattern = /\\d+/i;\n\nconst matchEraPatterns = {\n narrow: /^(b|a)/i,\n abbreviated: /^(b\\.?\\s?c\\.?|b\\.?\\s?c\\.?\\s?e\\.?|a\\.?\\s?d\\.?|c\\.?\\s?e\\.?)/i,\n wide: /^(before christ|before common era|anno domini|common era)/i,\n};\nconst parseEraPatterns = {\n any: [/^b/i, /^(a|c)/i],\n};\n\nconst matchQuarterPatterns = {\n narrow: /^[1234]/i,\n abbreviated: /^q[1234]/i,\n wide: /^[1234](th|st|nd|rd)? quarter/i,\n};\nconst parseQuarterPatterns = {\n any: [/1/i, /2/i, /3/i, /4/i],\n};\n\nconst matchMonthPatterns = {\n narrow: /^[jfmasond]/i,\n abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,\n wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i,\n};\nconst parseMonthPatterns = {\n narrow: [\n /^j/i,\n /^f/i,\n /^m/i,\n /^a/i,\n /^m/i,\n /^j/i,\n /^j/i,\n /^a/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n\n any: [\n /^ja/i,\n /^f/i,\n /^mar/i,\n /^ap/i,\n /^may/i,\n /^jun/i,\n /^jul/i,\n /^au/i,\n /^s/i,\n /^o/i,\n /^n/i,\n /^d/i,\n ],\n};\n\nconst matchDayPatterns = {\n narrow: /^[smtwf]/i,\n short: /^(su|mo|tu|we|th|fr|sa)/i,\n abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,\n wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i,\n};\nconst parseDayPatterns = {\n narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],\n any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i],\n};\n\nconst matchDayPeriodPatterns = {\n narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,\n any: /^([ap]\\.?\\s?m\\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i,\n};\nconst parseDayPeriodPatterns = {\n any: {\n am: /^a/i,\n pm: /^p/i,\n midnight: /^mi/i,\n noon: /^no/i,\n morning: /morning/i,\n afternoon: /afternoon/i,\n evening: /evening/i,\n night: /night/i,\n },\n};\n\nexport const match = {\n ordinalNumber: buildMatchPatternFn({\n matchPattern: matchOrdinalNumberPattern,\n parsePattern: parseOrdinalNumberPattern,\n valueCallback: (value) => parseInt(value, 10),\n }),\n\n era: buildMatchFn({\n matchPatterns: matchEraPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseEraPatterns,\n defaultParseWidth: \"any\",\n }),\n\n quarter: buildMatchFn({\n matchPatterns: matchQuarterPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseQuarterPatterns,\n defaultParseWidth: \"any\",\n valueCallback: (index) => index + 1,\n }),\n\n month: buildMatchFn({\n matchPatterns: matchMonthPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseMonthPatterns,\n defaultParseWidth: \"any\",\n }),\n\n day: buildMatchFn({\n matchPatterns: matchDayPatterns,\n defaultMatchWidth: \"wide\",\n parsePatterns: parseDayPatterns,\n defaultParseWidth: \"any\",\n }),\n\n dayPeriod: buildMatchFn({\n matchPatterns: matchDayPeriodPatterns,\n defaultMatchWidth: \"any\",\n parsePatterns: parseDayPeriodPatterns,\n defaultParseWidth: \"any\",\n }),\n};\n","let defaultOptions = {};\n\nexport function getDefaultOptions() {\n return defaultOptions;\n}\n\nexport function setDefaultOptions(newOptions) {\n defaultOptions = newOptions;\n}\n","import { toDate } from \"../toDate.mjs\";\n\n/**\n * Google Chrome as of 67.0.3396.87 introduced timezones with offset that includes seconds.\n * They usually appear for dates that denote time before the timezones were introduced\n * (e.g. for 'Europe/Prague' timezone the offset is GMT+00:57:44 before 1 October 1891\n * and GMT+01:00:00 after that date)\n *\n * Date#getTimezoneOffset returns the offset in minutes and would return 57 for the example above,\n * which would lead to incorrect calculations.\n *\n * This function returns the timezone offset in milliseconds that takes seconds in account.\n */\nexport function getTimezoneOffsetInMilliseconds(date) {\n const _date = toDate(date);\n const utcDate = new Date(\n Date.UTC(\n _date.getFullYear(),\n _date.getMonth(),\n _date.getDate(),\n _date.getHours(),\n _date.getMinutes(),\n _date.getSeconds(),\n _date.getMilliseconds(),\n ),\n );\n utcDate.setUTCFullYear(_date.getFullYear());\n return +date - +utcDate;\n}\n","import { compareAsc } from \"./compareAsc.mjs\";\nimport { minutesInDay, minutesInMonth } from \"./constants.mjs\";\nimport { differenceInMonths } from \"./differenceInMonths.mjs\";\nimport { differenceInSeconds } from \"./differenceInSeconds.mjs\";\nimport { toDate } from \"./toDate.mjs\";\nimport { defaultLocale } from \"./_lib/defaultLocale.mjs\";\nimport { getDefaultOptions } from \"./_lib/defaultOptions.mjs\";\nimport { getTimezoneOffsetInMilliseconds } from \"./_lib/getTimezoneOffsetInMilliseconds.mjs\";\n\n/**\n * The {@link formatDistance} function options.\n */\n\n/**\n * @name formatDistance\n * @category Common Helpers\n * @summary Return the distance between the given dates in words.\n *\n * @description\n * Return the distance between the given dates in words.\n *\n * | Distance between dates | Result |\n * |-------------------------------------------------------------------|---------------------|\n * | 0 ... 30 secs | less than a minute |\n * | 30 secs ... 1 min 30 secs | 1 minute |\n * | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |\n * | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |\n * | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |\n * | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |\n * | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |\n * | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |\n * | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |\n * | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |\n * | 1 yr ... 1 yr 3 months | about 1 year |\n * | 1 yr 3 months ... 1 yr 9 month s | over 1 year |\n * | 1 yr 9 months ... 2 yrs | almost 2 years |\n * | N yrs ... N yrs 3 months | about N years |\n * | N yrs 3 months ... N yrs 9 months | over N years |\n * | N yrs 9 months ... N+1 yrs | almost N+1 years |\n *\n * With `options.includeSeconds == true`:\n * | Distance between dates | Result |\n * |------------------------|----------------------|\n * | 0 secs ... 5 secs | less than 5 seconds |\n * | 5 secs ... 10 secs | less than 10 seconds |\n * | 10 secs ... 20 secs | less than 20 seconds |\n * | 20 secs ... 40 secs | half a minute |\n * | 40 secs ... 60 secs | less than a minute |\n * | 60 secs ... 90 secs | 1 minute |\n *\n * @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).\n *\n * @param date - The date\n * @param baseDate - The date to compare with\n * @param options - An object with options\n *\n * @returns The distance in words\n *\n * @throws `date` must not be Invalid Date\n * @throws `baseDate` must not be Invalid Date\n * @throws `options.locale` must contain `formatDistance` property\n *\n * @example\n * // What is the distance between 2 July 2014 and 1 January 2015?\n * const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))\n * //=> '6 months'\n *\n * @example\n * // What is the distance between 1 January 2015 00:00:15\n * // and 1 January 2015 00:00:00, including seconds?\n * const result = formatDistance(\n * new Date(2015, 0, 1, 0, 0, 15),\n * new Date(2015, 0, 1, 0, 0, 0),\n * { includeSeconds: true }\n * )\n * //=> 'less than 20 seconds'\n *\n * @example\n * // What is the distance from 1 January 2016\n * // to 1 January 2015, with a suffix?\n * const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {\n * addSuffix: true\n * })\n * //=> 'about 1 year ago'\n *\n * @example\n * // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?\n * import { eoLocale } from 'date-fns/locale/eo'\n * const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {\n * locale: eoLocale\n * })\n * //=> 'pli ol 1 jaro'\n */\n\nexport function formatDistance(date, baseDate, options) {\n const defaultOptions = getDefaultOptions();\n const locale = options?.locale ?? defaultOptions.locale ?? defaultLocale;\n const minutesInAlmostTwoDays = 2520;\n\n const comparison = compareAsc(date, baseDate);\n\n if (isNaN(comparison)) {\n throw new RangeError(\"Invalid time value\");\n }\n\n const localizeOptions = Object.assign({}, options, {\n addSuffix: options?.addSuffix,\n comparison: comparison,\n });\n\n let dateLeft;\n let dateRight;\n if (comparison > 0) {\n dateLeft = toDate(baseDate);\n dateRight = toDate(date);\n } else {\n dateLeft = toDate(date);\n dateRight = toDate(baseDate);\n }\n\n const seconds = differenceInSeconds(dateRight, dateLeft);\n const offsetInSeconds =\n (getTimezoneOffsetInMilliseconds(dateRight) -\n getTimezoneOffsetInMilliseconds(dateLeft)) /\n 1000;\n const minutes = Math.round((seconds - offsetInSeconds) / 60);\n let months;\n\n // 0 up to 2 mins\n if (minutes < 2) {\n if (options?.includeSeconds) {\n if (seconds < 5) {\n return locale.formatDistance(\"lessThanXSeconds\", 5, localizeOptions);\n } else if (seconds < 10) {\n return locale.formatDistance(\"lessThanXSeconds\", 10, localizeOptions);\n } else if (seconds < 20) {\n return locale.formatDistance(\"lessThanXSeconds\", 20, localizeOptions);\n } else if (seconds < 40) {\n return locale.formatDistance(\"halfAMinute\", 0, localizeOptions);\n } else if (seconds < 60) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", 1, localizeOptions);\n }\n } else {\n if (minutes === 0) {\n return locale.formatDistance(\"lessThanXMinutes\", 1, localizeOptions);\n } else {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n }\n }\n\n // 2 mins up to 0.75 hrs\n } else if (minutes < 45) {\n return locale.formatDistance(\"xMinutes\", minutes, localizeOptions);\n\n // 0.75 hrs up to 1.5 hrs\n } else if (minutes < 90) {\n return locale.formatDistance(\"aboutXHours\", 1, localizeOptions);\n\n // 1.5 hrs up to 24 hrs\n } else if (minutes < minutesInDay) {\n const hours = Math.round(minutes / 60);\n return locale.formatDistance(\"aboutXHours\", hours, localizeOptions);\n\n // 1 day up to 1.75 days\n } else if (minutes < minutesInAlmostTwoDays) {\n return locale.formatDistance(\"xDays\", 1, localizeOptions);\n\n // 1.75 days up to 30 days\n } else if (minutes < minutesInMonth) {\n const days = Math.round(minutes / minutesInDay);\n return locale.formatDistance(\"xDays\", days, localizeOptions);\n\n // 1 month up to 2 months\n } else if (minutes < minutesInMonth * 2) {\n months = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"aboutXMonths\", months, localizeOptions);\n }\n\n months = differenceInMonths(dateRight, dateLeft);\n\n // 2 months up to 12 months\n if (months < 12) {\n const nearestMonth = Math.round(minutes / minutesInMonth);\n return locale.formatDistance(\"xMonths\", nearestMonth, localizeOptions);\n\n // 1 year up to max Date\n } else {\n const monthsSinceStartOfYear = months % 12;\n const years = Math.trunc(months / 12);\n\n // N years up to 1 years 3 months\n if (monthsSinceStartOfYear < 3) {\n return locale.formatDistance(\"aboutXYears\", years, localizeOptions);\n\n // N years 3 months up to N years 9 months\n } else if (monthsSinceStartOfYear < 9) {\n return locale.formatDistance(\"overXYears\", years, localizeOptions);\n\n // N years 9 months up to N year 12 months\n } else {\n return locale.formatDistance(\"almostXYears\", years + 1, localizeOptions);\n }\n }\n}\n\n// Fallback for modularized imports:\nexport default formatDistance;\n"],"names":["windowObject","window","self","global","cancelFrame","requestFrame","clearTimeoutFn","clearTimeout","setTimeoutFn","setTimeout","cancelAnimationFrameFn","cancelAnimationFrame","mozCancelAnimationFrame","webkitCancelAnimationFrame","requestAnimationFrameFn","requestAnimationFrame","mozRequestAnimationFrame","webkitRequestAnimationFrame","createDetectElementResize","nonce","animationKeyframes","animationName","animationStartEvent","animationStyle","checkTriggers","resetTriggers","scrollListener","attachEvent","document","element","triggers","__resizeTriggers__","expand","firstElementChild","contract","lastElementChild","expandChild","scrollLeft","scrollWidth","scrollTop","scrollHeight","style","width","offsetWidth","height","offsetHeight","__resizeLast__","e","target","className","indexOf","this","__resizeRAF__","__resizeListeners__","forEach","fn","call","animation","keyframeprefix","domPrefixes","split","startEvents","pfx","elm","createElement","undefined","i","length","toLowerCase","addResizeListener","doc","ownerDocument","elementStyle","getComputedStyle","position","getElementById","css","head","getElementsByTagName","id","type","setAttribute","styleSheet","cssText","appendChild","createTextNode","createStyles","expandTrigger","contractTrigger","addEventListener","__animationListener__","push","removeResizeListener","detachEvent","splice","removeEventListener","removeChild","callback","_ref","animationFrameID","timeoutID","AutoSizer","Component","constructor","super","arguments","state","props","defaultHeight","scaledHeight","scaledWidth","defaultWidth","_autoSizer","_detectElementResize","_parentNode","_resizeObserver","_timeoutId","_onResize","disableHeight","disableWidth","onResize","paddingLeft","parseFloat","paddingRight","paddingTop","paddingBottom","rect","getBoundingClientRect","setState","_setRef","autoSizer","componentDidMount","parentNode","defaultView","HTMLElement","ResizeObserverInstance","ResizeObserver","observe","componentWillUnmount","disconnect","render","children","doNotBailOutOnEmptyChildren","tagName","rest","outerStyle","overflow","childParams","bailoutOnChildren","ref","createClass","defineProperties","descriptor","enumerable","configurable","writable","Object","defineProperty","key","Constructor","protoProps","staticProps","prototype","possibleConstructorReturn","ReferenceError","_PureComponent","InfiniteLoader","_temp","_this","instance","TypeError","classCallCheck","_len","args","Array","_key","__proto__","getPrototypeOf","apply","concat","_lastRenderedStartIndex","_lastRenderedStopIndex","_memoizedUnloadedRanges","_onItemsRendered","_ref2","visibleStartIndex","visibleStopIndex","_ensureRowsLoaded","listRef","_listRef","subClass","superClass","create","value","setPrototypeOf","inherits","autoReload","process","onItemsRendered","startIndex","stopIndex","_props","isItemLoaded","itemCount","_props$minimumBatchSi","minimumBatchSize","_props$threshold","threshold","unloadedRanges","rangeStartIndex","rangeStopIndex","_index","potentialStopIndex","Math","min","max","_index2","_index3","scanForUnloadedRanges","some","startOrStop","index","_loadUnloadedRanges","_this2","loadMoreItems","loadMoreRows","_loop","promise","then","lastRenderedStartIndex","lastRenderedStopIndex","isRangeVisible","resetAfterIndex","_getItemStyleCache","forceUpdate","PureComponent","safeIsNaN","Number","isNaN","areInputsEqual","newInputs","lastInputs","first","second","resultFn","isEqual","lastThis","lastResult","lastArgs","calledOnce","newArgs","_i","now","performance","Date","cancelTimeout","requestTimeout","delay","start","tick","size","getScrollbarSize","recalculate","div","body","clientWidth","cachedRTLResult","getRTLOffsetType","outerDiv","direction","innerDiv","innerStyle","defaultItemKey$1","data","createListComponent","_class","getItemOffset","getEstimatedTotalSize","getItemSize","getOffsetForIndexAndAlignment","getStartIndexForOffset","getStopIndexForStartIndex","initInstanceProps","shouldResetStyleCacheOnItemSizeChange","validateProps","List","_instanceProps","_assertThisInitialized","_outerRef","_resetIsScrollingTimeoutId","isScrolling","scrollDirection","scrollOffset","initialScrollOffset","scrollUpdateWasRequested","_callOnItemsRendered","memoizeOne","overscanStartIndex","overscanStopIndex","_callOnScroll","onScroll","_getItemStyle","_this$props","itemSize","layout","itemStyleCache","hasOwnProperty","_offset","isHorizontal","isRtl","offsetHorizontal","left","right","top","_","__","___","_onScrollHorizontal","event","_event$currentTarget","currentTarget","prevState","_resetIsScrollingDebounced","_onScrollVertical","_event$currentTarget2","clientHeight","_outerRefSetter","outerRef","current","_resetIsScrolling","_inheritsLoose","getDerivedStateFromProps","nextProps","validateSharedProps$1","_proto","scrollTo","scrollToItem","align","_this$props2","scrollbarSize","_this$props3","_callPropsCallbacks","componentDidUpdate","_this$props4","_this$state","_this$props5","innerRef","innerElementType","innerTagName","itemData","_this$props5$itemKey","itemKey","outerElementType","outerTagName","useIsScrolling","_this$_getRangeToRend","_getRangeToRender","items","estimatedTotalSize","_extends","WebkitOverflowScrolling","willChange","pointerEvents","_this$_getRangeToRend2","_overscanStartIndex","_overscanStopIndex","_visibleStartIndex","_visibleStopIndex","_this$state2","_scrollDirection","_scrollOffset","_scrollUpdateWasRequested","_this$props6","overscanCount","_this$state3","overscanBackward","overscanForward","defaultProps","_ref3","FixedSizeList","_ref4","instanceProps","lastItemOffset","maxOffset","minOffset","middleOffset","round","ceil","floor","_ref5","offset","_ref6","numVisibleItems","_ref7","toDate","argument","argStr","toString","NaN","compareAsc","dateLeft","dateRight","_dateLeft","_dateRight","diff","getTime","pow","minutesInMonth","minutesInDay","differenceInCalendarMonths","getFullYear","getMonth","endOfDay","date","_date","setHours","endOfMonth","month","setFullYear","isLastDayOfMonth","differenceInMonths","sign","difference","abs","result","getDate","setDate","setMonth","isLastMonthNotFull","differenceInMilliseconds","differenceInSeconds","options","method","roundingMethod","number","trunc","formatDistanceLocale","lessThanXSeconds","one","other","xSeconds","halfAMinute","lessThanXMinutes","xMinutes","aboutXHours","xHours","xDays","aboutXWeeks","xWeeks","aboutXMonths","xMonths","aboutXYears","xYears","overXYears","almostXYears","buildFormatLongFn","String","formats","formatLong","full","long","medium","short","time","dateTime","formatRelativeLocale","lastWeek","yesterday","today","tomorrow","nextWeek","buildLocalizeFn","valuesArray","context","formattingValues","defaultFormattingWidth","values","argumentCallback","buildMatchFn","string","matchPattern","matchPatterns","defaultMatchWidth","matchResult","match","matchedString","parsePatterns","defaultParseWidth","isArray","array","predicate","findIndex","pattern","test","object","findKey","valueCallback","slice","enUS","code","formatDistance","token","count","tokenValue","replace","addSuffix","comparison","formatRelative","_baseDate","_options","localize","ordinalNumber","dirtyNumber","rem100","era","narrow","abbreviated","wide","quarter","day","dayPeriod","am","pm","midnight","noon","morning","afternoon","evening","night","parsePattern","parseInt","parseResult","any","weekStartsOn","firstWeekContainsDate","defaultOptions","getDefaultOptions","getTimezoneOffsetInMilliseconds","utcDate","UTC","getHours","getMinutes","getSeconds","getMilliseconds","setUTCFullYear","baseDate","locale","defaultLocale","RangeError","localizeOptions","assign","seconds","offsetInSeconds","minutes","months","includeSeconds","hours","days","nearestMonth","monthsSinceStartOfYear","years"],"sourceRoot":""}