UNPKG

react-waterfall-scroll

Version:
1,359 lines (1,358 loc) 54.3 kB
var __defProp = Object.defineProperty; var __getOwnPropSymbols = Object.getOwnPropertySymbols; var __hasOwnProp = Object.prototype.hasOwnProperty; var __propIsEnum = Object.prototype.propertyIsEnumerable; var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value; var __spreadValues = (a, b) => { for (var prop in b || (b = {})) if (__hasOwnProp.call(b, prop)) __defNormalProp(a, prop, b[prop]); if (__getOwnPropSymbols) for (var prop of __getOwnPropSymbols(b)) { if (__propIsEnum.call(b, prop)) __defNormalProp(a, prop, b[prop]); } return a; }; import React, { useRef, useState, useEffect, useLayoutEffect } from "react"; var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; function isObject$5(value) { var type = typeof value; return value != null && (type == "object" || type == "function"); } var isObject_1 = isObject$5; var freeGlobal$1 = typeof commonjsGlobal == "object" && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal; var _freeGlobal = freeGlobal$1; var freeGlobal = _freeGlobal; var freeSelf = typeof self == "object" && self && self.Object === Object && self; var root$9 = freeGlobal || freeSelf || Function("return this")(); var _root = root$9; var root$8 = _root; var now$1 = function() { return root$8.Date.now(); }; var now_1 = now$1; var reWhitespace = /\s/; function trimmedEndIndex$1(string) { var index = string.length; while (index-- && reWhitespace.test(string.charAt(index))) { } return index; } var _trimmedEndIndex = trimmedEndIndex$1; var trimmedEndIndex = _trimmedEndIndex; var reTrimStart = /^\s+/; function baseTrim$1(string) { return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string; } var _baseTrim = baseTrim$1; var root$7 = _root; var Symbol$5 = root$7.Symbol; var _Symbol = Symbol$5; var Symbol$4 = _Symbol; var objectProto$b = Object.prototype; var hasOwnProperty$8 = objectProto$b.hasOwnProperty; var nativeObjectToString$1 = objectProto$b.toString; var symToStringTag$1 = Symbol$4 ? Symbol$4.toStringTag : void 0; function getRawTag$1(value) { var isOwn = hasOwnProperty$8.call(value, symToStringTag$1), tag = value[symToStringTag$1]; try { value[symToStringTag$1] = void 0; var unmasked = true; } catch (e) { } var result = nativeObjectToString$1.call(value); if (unmasked) { if (isOwn) { value[symToStringTag$1] = tag; } else { delete value[symToStringTag$1]; } } return result; } var _getRawTag = getRawTag$1; var objectProto$a = Object.prototype; var nativeObjectToString = objectProto$a.toString; function objectToString$1(value) { return nativeObjectToString.call(value); } var _objectToString = objectToString$1; var Symbol$3 = _Symbol, getRawTag = _getRawTag, objectToString = _objectToString; var nullTag = "[object Null]", undefinedTag = "[object Undefined]"; var symToStringTag = Symbol$3 ? Symbol$3.toStringTag : void 0; function baseGetTag$5(value) { if (value == null) { return value === void 0 ? undefinedTag : nullTag; } return symToStringTag && symToStringTag in Object(value) ? getRawTag(value) : objectToString(value); } var _baseGetTag = baseGetTag$5; function isObjectLike$6(value) { return value != null && typeof value == "object"; } var isObjectLike_1 = isObjectLike$6; var baseGetTag$4 = _baseGetTag, isObjectLike$5 = isObjectLike_1; var symbolTag$1 = "[object Symbol]"; function isSymbol$1(value) { return typeof value == "symbol" || isObjectLike$5(value) && baseGetTag$4(value) == symbolTag$1; } var isSymbol_1 = isSymbol$1; var baseTrim = _baseTrim, isObject$4 = isObject_1, isSymbol = isSymbol_1; var NAN = 0 / 0; var reIsBadHex = /^[-+]0x[0-9a-f]+$/i; var reIsBinary = /^0b[01]+$/i; var reIsOctal = /^0o[0-7]+$/i; var freeParseInt = parseInt; function toNumber$1(value) { if (typeof value == "number") { return value; } if (isSymbol(value)) { return NAN; } if (isObject$4(value)) { var other = typeof value.valueOf == "function" ? value.valueOf() : value; value = isObject$4(other) ? other + "" : other; } if (typeof value != "string") { return value === 0 ? value : +value; } value = baseTrim(value); var isBinary = reIsBinary.test(value); return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value; } var toNumber_1 = toNumber$1; var isObject$3 = isObject_1, now = now_1, toNumber = toNumber_1; var FUNC_ERROR_TEXT$1 = "Expected a function"; var nativeMax$1 = Math.max, nativeMin$1 = Math.min; function debounce$1(func, wait, options) { var lastArgs, lastThis, maxWait, result, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true; if (typeof func != "function") { throw new TypeError(FUNC_ERROR_TEXT$1); } wait = toNumber(wait) || 0; if (isObject$3(options)) { leading = !!options.leading; maxing = "maxWait" in options; maxWait = maxing ? nativeMax$1(toNumber(options.maxWait) || 0, wait) : maxWait; trailing = "trailing" in options ? !!options.trailing : trailing; } function invokeFunc(time) { var args = lastArgs, thisArg = lastThis; lastArgs = lastThis = void 0; lastInvokeTime = time; result = func.apply(thisArg, args); return result; } function leadingEdge(time) { lastInvokeTime = time; timerId = setTimeout(timerExpired, wait); return leading ? invokeFunc(time) : result; } function remainingWait(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall; return maxing ? nativeMin$1(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting; } function shouldInvoke(time) { var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime; return lastCallTime === void 0 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait; } function timerExpired() { var time = now(); if (shouldInvoke(time)) { return trailingEdge(time); } timerId = setTimeout(timerExpired, remainingWait(time)); } function trailingEdge(time) { timerId = void 0; if (trailing && lastArgs) { return invokeFunc(time); } lastArgs = lastThis = void 0; return result; } function cancel() { if (timerId !== void 0) { clearTimeout(timerId); } lastInvokeTime = 0; lastArgs = lastCallTime = lastThis = timerId = void 0; } function flush() { return timerId === void 0 ? result : trailingEdge(now()); } function debounced() { var time = now(), isInvoking = shouldInvoke(time); lastArgs = arguments; lastThis = this; lastCallTime = time; if (isInvoking) { if (timerId === void 0) { return leadingEdge(lastCallTime); } if (maxing) { clearTimeout(timerId); timerId = setTimeout(timerExpired, wait); return invokeFunc(lastCallTime); } } if (timerId === void 0) { timerId = setTimeout(timerExpired, wait); } return result; } debounced.cancel = cancel; debounced.flush = flush; return debounced; } var debounce_1 = debounce$1; var debounce = debounce_1, isObject$2 = isObject_1; var FUNC_ERROR_TEXT = "Expected a function"; function throttle(func, wait, options) { var leading = true, trailing = true; if (typeof func != "function") { throw new TypeError(FUNC_ERROR_TEXT); } if (isObject$2(options)) { leading = "leading" in options ? !!options.leading : leading; trailing = "trailing" in options ? !!options.trailing : trailing; } return debounce(func, wait, { "leading": leading, "maxWait": wait, "trailing": trailing }); } var throttle_1 = throttle; function arrayMap$3(array, iteratee) { var index = -1, length = array == null ? 0 : array.length, result = Array(length); while (++index < length) { result[index] = iteratee(array[index], index, array); } return result; } var _arrayMap = arrayMap$3; var baseGetTag$3 = _baseGetTag, isObject$1 = isObject_1; var asyncTag = "[object AsyncFunction]", funcTag$1 = "[object Function]", genTag = "[object GeneratorFunction]", proxyTag = "[object Proxy]"; function isFunction$2(value) { if (!isObject$1(value)) { return false; } var tag = baseGetTag$3(value); return tag == funcTag$1 || tag == genTag || tag == asyncTag || tag == proxyTag; } var isFunction_1 = isFunction$2; var root$6 = _root; var coreJsData$1 = root$6["__core-js_shared__"]; var _coreJsData = coreJsData$1; var coreJsData = _coreJsData; var maskSrcKey = function() { var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || ""); return uid ? "Symbol(src)_1." + uid : ""; }(); function isMasked$1(func) { return !!maskSrcKey && maskSrcKey in func; } var _isMasked = isMasked$1; var funcProto$1 = Function.prototype; var funcToString$1 = funcProto$1.toString; function toSource$2(func) { if (func != null) { try { return funcToString$1.call(func); } catch (e) { } try { return func + ""; } catch (e) { } } return ""; } var _toSource = toSource$2; var isFunction$1 = isFunction_1, isMasked = _isMasked, isObject = isObject_1, toSource$1 = _toSource; var reRegExpChar = /[\\^$.*+?()[\]{}|]/g; var reIsHostCtor = /^\[object .+?Constructor\]$/; var funcProto = Function.prototype, objectProto$9 = Object.prototype; var funcToString = funcProto.toString; var hasOwnProperty$7 = objectProto$9.hasOwnProperty; var reIsNative = RegExp("^" + funcToString.call(hasOwnProperty$7).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"); function baseIsNative$1(value) { if (!isObject(value) || isMasked(value)) { return false; } var pattern = isFunction$1(value) ? reIsNative : reIsHostCtor; return pattern.test(toSource$1(value)); } var _baseIsNative = baseIsNative$1; function getValue$1(object, key) { return object == null ? void 0 : object[key]; } var _getValue = getValue$1; var baseIsNative = _baseIsNative, getValue = _getValue; function getNative$7(object, key) { var value = getValue(object, key); return baseIsNative(value) ? value : void 0; } var _getNative = getNative$7; var getNative$6 = _getNative; var nativeCreate$4 = getNative$6(Object, "create"); var _nativeCreate = nativeCreate$4; var nativeCreate$3 = _nativeCreate; function hashClear$1() { this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {}; this.size = 0; } var _hashClear = hashClear$1; function hashDelete$1(key) { var result = this.has(key) && delete this.__data__[key]; this.size -= result ? 1 : 0; return result; } var _hashDelete = hashDelete$1; var nativeCreate$2 = _nativeCreate; var HASH_UNDEFINED$2 = "__lodash_hash_undefined__"; var objectProto$8 = Object.prototype; var hasOwnProperty$6 = objectProto$8.hasOwnProperty; function hashGet$1(key) { var data = this.__data__; if (nativeCreate$2) { var result = data[key]; return result === HASH_UNDEFINED$2 ? void 0 : result; } return hasOwnProperty$6.call(data, key) ? data[key] : void 0; } var _hashGet = hashGet$1; var nativeCreate$1 = _nativeCreate; var objectProto$7 = Object.prototype; var hasOwnProperty$5 = objectProto$7.hasOwnProperty; function hashHas$1(key) { var data = this.__data__; return nativeCreate$1 ? data[key] !== void 0 : hasOwnProperty$5.call(data, key); } var _hashHas = hashHas$1; var nativeCreate = _nativeCreate; var HASH_UNDEFINED$1 = "__lodash_hash_undefined__"; function hashSet$1(key, value) { var data = this.__data__; this.size += this.has(key) ? 0 : 1; data[key] = nativeCreate && value === void 0 ? HASH_UNDEFINED$1 : value; return this; } var _hashSet = hashSet$1; var hashClear = _hashClear, hashDelete = _hashDelete, hashGet = _hashGet, hashHas = _hashHas, hashSet = _hashSet; function Hash$1(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } Hash$1.prototype.clear = hashClear; Hash$1.prototype["delete"] = hashDelete; Hash$1.prototype.get = hashGet; Hash$1.prototype.has = hashHas; Hash$1.prototype.set = hashSet; var _Hash = Hash$1; function listCacheClear$1() { this.__data__ = []; this.size = 0; } var _listCacheClear = listCacheClear$1; function eq$2(value, other) { return value === other || value !== value && other !== other; } var eq_1 = eq$2; var eq$1 = eq_1; function assocIndexOf$4(array, key) { var length = array.length; while (length--) { if (eq$1(array[length][0], key)) { return length; } } return -1; } var _assocIndexOf = assocIndexOf$4; var assocIndexOf$3 = _assocIndexOf; var arrayProto = Array.prototype; var splice = arrayProto.splice; function listCacheDelete$1(key) { var data = this.__data__, index = assocIndexOf$3(data, key); if (index < 0) { return false; } var lastIndex = data.length - 1; if (index == lastIndex) { data.pop(); } else { splice.call(data, index, 1); } --this.size; return true; } var _listCacheDelete = listCacheDelete$1; var assocIndexOf$2 = _assocIndexOf; function listCacheGet$1(key) { var data = this.__data__, index = assocIndexOf$2(data, key); return index < 0 ? void 0 : data[index][1]; } var _listCacheGet = listCacheGet$1; var assocIndexOf$1 = _assocIndexOf; function listCacheHas$1(key) { return assocIndexOf$1(this.__data__, key) > -1; } var _listCacheHas = listCacheHas$1; var assocIndexOf = _assocIndexOf; function listCacheSet$1(key, value) { var data = this.__data__, index = assocIndexOf(data, key); if (index < 0) { ++this.size; data.push([key, value]); } else { data[index][1] = value; } return this; } var _listCacheSet = listCacheSet$1; var listCacheClear = _listCacheClear, listCacheDelete = _listCacheDelete, listCacheGet = _listCacheGet, listCacheHas = _listCacheHas, listCacheSet = _listCacheSet; function ListCache$4(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } ListCache$4.prototype.clear = listCacheClear; ListCache$4.prototype["delete"] = listCacheDelete; ListCache$4.prototype.get = listCacheGet; ListCache$4.prototype.has = listCacheHas; ListCache$4.prototype.set = listCacheSet; var _ListCache = ListCache$4; var getNative$5 = _getNative, root$5 = _root; var Map$3 = getNative$5(root$5, "Map"); var _Map = Map$3; var Hash = _Hash, ListCache$3 = _ListCache, Map$2 = _Map; function mapCacheClear$1() { this.size = 0; this.__data__ = { "hash": new Hash(), "map": new (Map$2 || ListCache$3)(), "string": new Hash() }; } var _mapCacheClear = mapCacheClear$1; function isKeyable$1(value) { var type = typeof value; return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null; } var _isKeyable = isKeyable$1; var isKeyable = _isKeyable; function getMapData$4(map, key) { var data = map.__data__; return isKeyable(key) ? data[typeof key == "string" ? "string" : "hash"] : data.map; } var _getMapData = getMapData$4; var getMapData$3 = _getMapData; function mapCacheDelete$1(key) { var result = getMapData$3(this, key)["delete"](key); this.size -= result ? 1 : 0; return result; } var _mapCacheDelete = mapCacheDelete$1; var getMapData$2 = _getMapData; function mapCacheGet$1(key) { return getMapData$2(this, key).get(key); } var _mapCacheGet = mapCacheGet$1; var getMapData$1 = _getMapData; function mapCacheHas$1(key) { return getMapData$1(this, key).has(key); } var _mapCacheHas = mapCacheHas$1; var getMapData = _getMapData; function mapCacheSet$1(key, value) { var data = getMapData(this, key), size = data.size; data.set(key, value); this.size += data.size == size ? 0 : 1; return this; } var _mapCacheSet = mapCacheSet$1; var mapCacheClear = _mapCacheClear, mapCacheDelete = _mapCacheDelete, mapCacheGet = _mapCacheGet, mapCacheHas = _mapCacheHas, mapCacheSet = _mapCacheSet; function MapCache$2(entries) { var index = -1, length = entries == null ? 0 : entries.length; this.clear(); while (++index < length) { var entry = entries[index]; this.set(entry[0], entry[1]); } } MapCache$2.prototype.clear = mapCacheClear; MapCache$2.prototype["delete"] = mapCacheDelete; MapCache$2.prototype.get = mapCacheGet; MapCache$2.prototype.has = mapCacheHas; MapCache$2.prototype.set = mapCacheSet; var _MapCache = MapCache$2; var HASH_UNDEFINED = "__lodash_hash_undefined__"; function setCacheAdd$1(value) { this.__data__.set(value, HASH_UNDEFINED); return this; } var _setCacheAdd = setCacheAdd$1; function setCacheHas$1(value) { return this.__data__.has(value); } var _setCacheHas = setCacheHas$1; var MapCache$1 = _MapCache, setCacheAdd = _setCacheAdd, setCacheHas = _setCacheHas; function SetCache$3(values) { var index = -1, length = values == null ? 0 : values.length; this.__data__ = new MapCache$1(); while (++index < length) { this.add(values[index]); } } SetCache$3.prototype.add = SetCache$3.prototype.push = setCacheAdd; SetCache$3.prototype.has = setCacheHas; var _SetCache = SetCache$3; function baseFindIndex$1(array, predicate, fromIndex, fromRight) { var length = array.length, index = fromIndex + (fromRight ? 1 : -1); while (fromRight ? index-- : ++index < length) { if (predicate(array[index], index, array)) { return index; } } return -1; } var _baseFindIndex = baseFindIndex$1; function baseIsNaN$1(value) { return value !== value; } var _baseIsNaN = baseIsNaN$1; function strictIndexOf$1(array, value, fromIndex) { var index = fromIndex - 1, length = array.length; while (++index < length) { if (array[index] === value) { return index; } } return -1; } var _strictIndexOf = strictIndexOf$1; var baseFindIndex = _baseFindIndex, baseIsNaN = _baseIsNaN, strictIndexOf = _strictIndexOf; function baseIndexOf$1(array, value, fromIndex) { return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex); } var _baseIndexOf = baseIndexOf$1; var baseIndexOf = _baseIndexOf; function arrayIncludes$2(array, value) { var length = array == null ? 0 : array.length; return !!length && baseIndexOf(array, value, 0) > -1; } var _arrayIncludes = arrayIncludes$2; function arrayIncludesWith$2(array, value, comparator) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (comparator(value, array[index])) { return true; } } return false; } var _arrayIncludesWith = arrayIncludesWith$2; function baseUnary$3(func) { return function(value) { return func(value); }; } var _baseUnary = baseUnary$3; function cacheHas$3(cache, key) { return cache.has(key); } var _cacheHas = cacheHas$3; var SetCache$2 = _SetCache, arrayIncludes$1 = _arrayIncludes, arrayIncludesWith$1 = _arrayIncludesWith, arrayMap$2 = _arrayMap, baseUnary$2 = _baseUnary, cacheHas$2 = _cacheHas; var nativeMin = Math.min; function baseIntersection$1(arrays, iteratee, comparator) { var includes = comparator ? arrayIncludesWith$1 : arrayIncludes$1, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array(othLength), maxLength = Infinity, result = []; while (othIndex--) { var array = arrays[othIndex]; if (othIndex && iteratee) { array = arrayMap$2(array, baseUnary$2(iteratee)); } maxLength = nativeMin(array.length, maxLength); caches[othIndex] = !comparator && (iteratee || length >= 120 && array.length >= 120) ? new SetCache$2(othIndex && array) : void 0; } array = arrays[0]; var index = -1, seen = caches[0]; outer: while (++index < length && result.length < maxLength) { var value = array[index], computed = iteratee ? iteratee(value) : value; value = comparator || value !== 0 ? value : 0; if (!(seen ? cacheHas$2(seen, computed) : includes(result, computed, comparator))) { othIndex = othLength; while (--othIndex) { var cache = caches[othIndex]; if (!(cache ? cacheHas$2(cache, computed) : includes(arrays[othIndex], computed, comparator))) { continue outer; } } if (seen) { seen.push(computed); } result.push(value); } } return result; } var _baseIntersection = baseIntersection$1; function identity$2(value) { return value; } var identity_1 = identity$2; function apply$1(func, thisArg, args) { switch (args.length) { case 0: return func.call(thisArg); case 1: return func.call(thisArg, args[0]); case 2: return func.call(thisArg, args[0], args[1]); case 3: return func.call(thisArg, args[0], args[1], args[2]); } return func.apply(thisArg, args); } var _apply = apply$1; var apply = _apply; var nativeMax = Math.max; function overRest$1(func, start, transform) { start = nativeMax(start === void 0 ? func.length - 1 : start, 0); return function() { var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array(length); while (++index < length) { array[index] = args[start + index]; } index = -1; var otherArgs = Array(start + 1); while (++index < start) { otherArgs[index] = args[index]; } otherArgs[start] = transform(array); return apply(func, this, otherArgs); }; } var _overRest = overRest$1; function constant$1(value) { return function() { return value; }; } var constant_1 = constant$1; var getNative$4 = _getNative; var defineProperty$1 = function() { try { var func = getNative$4(Object, "defineProperty"); func({}, "", {}); return func; } catch (e) { } }(); var _defineProperty = defineProperty$1; var constant = constant_1, defineProperty = _defineProperty, identity$1 = identity_1; var baseSetToString$1 = !defineProperty ? identity$1 : function(func, string) { return defineProperty(func, "toString", { "configurable": true, "enumerable": false, "value": constant(string), "writable": true }); }; var _baseSetToString = baseSetToString$1; var HOT_COUNT = 800, HOT_SPAN = 16; var nativeNow = Date.now; function shortOut$1(func) { var count = 0, lastCalled = 0; return function() { var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled); lastCalled = stamp; if (remaining > 0) { if (++count >= HOT_COUNT) { return arguments[0]; } } else { count = 0; } return func.apply(void 0, arguments); }; } var _shortOut = shortOut$1; var baseSetToString = _baseSetToString, shortOut = _shortOut; var setToString$1 = shortOut(baseSetToString); var _setToString = setToString$1; var identity = identity_1, overRest = _overRest, setToString = _setToString; function baseRest$2(func, start) { return setToString(overRest(func, start, identity), func + ""); } var _baseRest = baseRest$2; var MAX_SAFE_INTEGER$1 = 9007199254740991; function isLength$2(value) { return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER$1; } var isLength_1 = isLength$2; var isFunction = isFunction_1, isLength$1 = isLength_1; function isArrayLike$2(value) { return value != null && isLength$1(value.length) && !isFunction(value); } var isArrayLike_1 = isArrayLike$2; var isArrayLike$1 = isArrayLike_1, isObjectLike$4 = isObjectLike_1; function isArrayLikeObject$2(value) { return isObjectLike$4(value) && isArrayLike$1(value); } var isArrayLikeObject_1 = isArrayLikeObject$2; var isArrayLikeObject$1 = isArrayLikeObject_1; function castArrayLikeObject$1(value) { return isArrayLikeObject$1(value) ? value : []; } var _castArrayLikeObject = castArrayLikeObject$1; function last$2(array) { var length = array == null ? 0 : array.length; return length ? array[length - 1] : void 0; } var last_1 = last$2; var arrayMap$1 = _arrayMap, baseIntersection = _baseIntersection, baseRest$1 = _baseRest, castArrayLikeObject = _castArrayLikeObject, last$1 = last_1; var intersectionWith = baseRest$1(function(arrays) { var comparator = last$1(arrays), mapped = arrayMap$1(arrays, castArrayLikeObject); comparator = typeof comparator == "function" ? comparator : void 0; if (comparator) { mapped.pop(); } return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, void 0, comparator) : []; }); var intersectionWith_1 = intersectionWith; var SetCache$1 = _SetCache, arrayIncludes = _arrayIncludes, arrayIncludesWith = _arrayIncludesWith, arrayMap = _arrayMap, baseUnary$1 = _baseUnary, cacheHas$1 = _cacheHas; var LARGE_ARRAY_SIZE$1 = 200; function baseDifference$1(array, values, iteratee, comparator) { var index = -1, includes = arrayIncludes, isCommon = true, length = array.length, result = [], valuesLength = values.length; if (!length) { return result; } if (iteratee) { values = arrayMap(values, baseUnary$1(iteratee)); } if (comparator) { includes = arrayIncludesWith; isCommon = false; } else if (values.length >= LARGE_ARRAY_SIZE$1) { includes = cacheHas$1; isCommon = false; values = new SetCache$1(values); } outer: while (++index < length) { var value = array[index], computed = iteratee == null ? value : iteratee(value); value = comparator || value !== 0 ? value : 0; if (isCommon && computed === computed) { var valuesIndex = valuesLength; while (valuesIndex--) { if (values[valuesIndex] === computed) { continue outer; } } result.push(value); } else if (!includes(values, computed, comparator)) { result.push(value); } } return result; } var _baseDifference = baseDifference$1; function arrayPush$2(array, values) { var index = -1, length = values.length, offset = array.length; while (++index < length) { array[offset + index] = values[index]; } return array; } var _arrayPush = arrayPush$2; var baseGetTag$2 = _baseGetTag, isObjectLike$3 = isObjectLike_1; var argsTag$2 = "[object Arguments]"; function baseIsArguments$1(value) { return isObjectLike$3(value) && baseGetTag$2(value) == argsTag$2; } var _baseIsArguments = baseIsArguments$1; var baseIsArguments = _baseIsArguments, isObjectLike$2 = isObjectLike_1; var objectProto$6 = Object.prototype; var hasOwnProperty$4 = objectProto$6.hasOwnProperty; var propertyIsEnumerable$1 = objectProto$6.propertyIsEnumerable; var isArguments$2 = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) { return isObjectLike$2(value) && hasOwnProperty$4.call(value, "callee") && !propertyIsEnumerable$1.call(value, "callee"); }; var isArguments_1 = isArguments$2; var isArray$4 = Array.isArray; var isArray_1 = isArray$4; var Symbol$2 = _Symbol, isArguments$1 = isArguments_1, isArray$3 = isArray_1; var spreadableSymbol = Symbol$2 ? Symbol$2.isConcatSpreadable : void 0; function isFlattenable$1(value) { return isArray$3(value) || isArguments$1(value) || !!(spreadableSymbol && value && value[spreadableSymbol]); } var _isFlattenable = isFlattenable$1; var arrayPush$1 = _arrayPush, isFlattenable = _isFlattenable; function baseFlatten$1(array, depth, predicate, isStrict, result) { var index = -1, length = array.length; predicate || (predicate = isFlattenable); result || (result = []); while (++index < length) { var value = array[index]; if (depth > 0 && predicate(value)) { if (depth > 1) { baseFlatten$1(value, depth - 1, predicate, isStrict, result); } else { arrayPush$1(result, value); } } else if (!isStrict) { result[result.length] = value; } } return result; } var _baseFlatten = baseFlatten$1; var baseDifference = _baseDifference, baseFlatten = _baseFlatten, baseRest = _baseRest, isArrayLikeObject = isArrayLikeObject_1, last = last_1; var differenceWith = baseRest(function(array, values) { var comparator = last(values); if (isArrayLikeObject(comparator)) { comparator = void 0; } return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values, 1, isArrayLikeObject, true), void 0, comparator) : []; }); var differenceWith_1 = differenceWith; var ListCache$2 = _ListCache; function stackClear$1() { this.__data__ = new ListCache$2(); this.size = 0; } var _stackClear = stackClear$1; function stackDelete$1(key) { var data = this.__data__, result = data["delete"](key); this.size = data.size; return result; } var _stackDelete = stackDelete$1; function stackGet$1(key) { return this.__data__.get(key); } var _stackGet = stackGet$1; function stackHas$1(key) { return this.__data__.has(key); } var _stackHas = stackHas$1; var ListCache$1 = _ListCache, Map$1 = _Map, MapCache = _MapCache; var LARGE_ARRAY_SIZE = 200; function stackSet$1(key, value) { var data = this.__data__; if (data instanceof ListCache$1) { var pairs = data.__data__; if (!Map$1 || pairs.length < LARGE_ARRAY_SIZE - 1) { pairs.push([key, value]); this.size = ++data.size; return this; } data = this.__data__ = new MapCache(pairs); } data.set(key, value); this.size = data.size; return this; } var _stackSet = stackSet$1; var ListCache = _ListCache, stackClear = _stackClear, stackDelete = _stackDelete, stackGet = _stackGet, stackHas = _stackHas, stackSet = _stackSet; function Stack$1(entries) { var data = this.__data__ = new ListCache(entries); this.size = data.size; } Stack$1.prototype.clear = stackClear; Stack$1.prototype["delete"] = stackDelete; Stack$1.prototype.get = stackGet; Stack$1.prototype.has = stackHas; Stack$1.prototype.set = stackSet; var _Stack = Stack$1; function arraySome$1(array, predicate) { var index = -1, length = array == null ? 0 : array.length; while (++index < length) { if (predicate(array[index], index, array)) { return true; } } return false; } var _arraySome = arraySome$1; var SetCache = _SetCache, arraySome = _arraySome, cacheHas = _cacheHas; var COMPARE_PARTIAL_FLAG$3 = 1, COMPARE_UNORDERED_FLAG$1 = 2; function equalArrays$2(array, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG$3, arrLength = array.length, othLength = other.length; if (arrLength != othLength && !(isPartial && othLength > arrLength)) { return false; } var arrStacked = stack.get(array); var othStacked = stack.get(other); if (arrStacked && othStacked) { return arrStacked == other && othStacked == array; } var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new SetCache() : void 0; stack.set(array, other); stack.set(other, array); while (++index < arrLength) { var arrValue = array[index], othValue = other[index]; if (customizer) { var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack); } if (compared !== void 0) { if (compared) { continue; } result = false; break; } if (seen) { if (!arraySome(other, function(othValue2, othIndex) { if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) { return seen.push(othIndex); } })) { result = false; break; } } else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) { result = false; break; } } stack["delete"](array); stack["delete"](other); return result; } var _equalArrays = equalArrays$2; var root$4 = _root; var Uint8Array$1 = root$4.Uint8Array; var _Uint8Array = Uint8Array$1; function mapToArray$1(map) { var index = -1, result = Array(map.size); map.forEach(function(value, key) { result[++index] = [key, value]; }); return result; } var _mapToArray = mapToArray$1; function setToArray$1(set) { var index = -1, result = Array(set.size); set.forEach(function(value) { result[++index] = value; }); return result; } var _setToArray = setToArray$1; var Symbol$1 = _Symbol, Uint8Array2 = _Uint8Array, eq = eq_1, equalArrays$1 = _equalArrays, mapToArray = _mapToArray, setToArray = _setToArray; var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2; var boolTag$1 = "[object Boolean]", dateTag$1 = "[object Date]", errorTag$1 = "[object Error]", mapTag$2 = "[object Map]", numberTag$1 = "[object Number]", regexpTag$1 = "[object RegExp]", setTag$2 = "[object Set]", stringTag$1 = "[object String]", symbolTag = "[object Symbol]"; var arrayBufferTag$1 = "[object ArrayBuffer]", dataViewTag$2 = "[object DataView]"; var symbolProto = Symbol$1 ? Symbol$1.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0; function equalByTag$1(object, other, tag, bitmask, customizer, equalFunc, stack) { switch (tag) { case dataViewTag$2: if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) { return false; } object = object.buffer; other = other.buffer; case arrayBufferTag$1: if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) { return false; } return true; case boolTag$1: case dateTag$1: case numberTag$1: return eq(+object, +other); case errorTag$1: return object.name == other.name && object.message == other.message; case regexpTag$1: case stringTag$1: return object == other + ""; case mapTag$2: var convert = mapToArray; case setTag$2: var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2; convert || (convert = setToArray); if (object.size != other.size && !isPartial) { return false; } var stacked = stack.get(object); if (stacked) { return stacked == other; } bitmask |= COMPARE_UNORDERED_FLAG; stack.set(object, other); var result = equalArrays$1(convert(object), convert(other), bitmask, customizer, equalFunc, stack); stack["delete"](object); return result; case symbolTag: if (symbolValueOf) { return symbolValueOf.call(object) == symbolValueOf.call(other); } } return false; } var _equalByTag = equalByTag$1; var arrayPush = _arrayPush, isArray$2 = isArray_1; function baseGetAllKeys$1(object, keysFunc, symbolsFunc) { var result = keysFunc(object); return isArray$2(object) ? result : arrayPush(result, symbolsFunc(object)); } var _baseGetAllKeys = baseGetAllKeys$1; function arrayFilter$1(array, predicate) { var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = []; while (++index < length) { var value = array[index]; if (predicate(value, index, array)) { result[resIndex++] = value; } } return result; } var _arrayFilter = arrayFilter$1; function stubArray$1() { return []; } var stubArray_1 = stubArray$1; var arrayFilter = _arrayFilter, stubArray = stubArray_1; var objectProto$5 = Object.prototype; var propertyIsEnumerable = objectProto$5.propertyIsEnumerable; var nativeGetSymbols = Object.getOwnPropertySymbols; var getSymbols$1 = !nativeGetSymbols ? stubArray : function(object) { if (object == null) { return []; } object = Object(object); return arrayFilter(nativeGetSymbols(object), function(symbol) { return propertyIsEnumerable.call(object, symbol); }); }; var _getSymbols = getSymbols$1; function baseTimes$1(n, iteratee) { var index = -1, result = Array(n); while (++index < n) { result[index] = iteratee(index); } return result; } var _baseTimes = baseTimes$1; var isBuffer$2 = { exports: {} }; function stubFalse() { return false; } var stubFalse_1 = stubFalse; (function(module, exports) { var root2 = _root, stubFalse2 = stubFalse_1; var freeExports = exports && !exports.nodeType && exports; var freeModule = freeExports && true && module && !module.nodeType && module; var moduleExports = freeModule && freeModule.exports === freeExports; var Buffer2 = moduleExports ? root2.Buffer : void 0; var nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : void 0; var isBuffer2 = nativeIsBuffer || stubFalse2; module.exports = isBuffer2; })(isBuffer$2, isBuffer$2.exports); var MAX_SAFE_INTEGER = 9007199254740991; var reIsUint = /^(?:0|[1-9]\d*)$/; function isIndex$1(value, length) { var type = typeof value; length = length == null ? MAX_SAFE_INTEGER : length; return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length); } var _isIndex = isIndex$1; var baseGetTag$1 = _baseGetTag, isLength = isLength_1, isObjectLike$1 = isObjectLike_1; var argsTag$1 = "[object Arguments]", arrayTag$1 = "[object Array]", boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", funcTag = "[object Function]", mapTag$1 = "[object Map]", numberTag = "[object Number]", objectTag$2 = "[object Object]", regexpTag = "[object RegExp]", setTag$1 = "[object Set]", stringTag = "[object String]", weakMapTag$1 = "[object WeakMap]"; var arrayBufferTag = "[object ArrayBuffer]", dataViewTag$1 = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]"; var typedArrayTags = {}; typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true; typedArrayTags[argsTag$1] = typedArrayTags[arrayTag$1] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag$1] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag$1] = typedArrayTags[numberTag] = typedArrayTags[objectTag$2] = typedArrayTags[regexpTag] = typedArrayTags[setTag$1] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag$1] = false; function baseIsTypedArray$1(value) { return isObjectLike$1(value) && isLength(value.length) && !!typedArrayTags[baseGetTag$1(value)]; } var _baseIsTypedArray = baseIsTypedArray$1; var _nodeUtil = { exports: {} }; (function(module, exports) { var freeGlobal2 = _freeGlobal; var freeExports = exports && !exports.nodeType && exports; var freeModule = freeExports && true && module && !module.nodeType && module; var moduleExports = freeModule && freeModule.exports === freeExports; var freeProcess = moduleExports && freeGlobal2.process; var nodeUtil2 = function() { try { var types = freeModule && freeModule.require && freeModule.require("util").types; if (types) { return types; } return freeProcess && freeProcess.binding && freeProcess.binding("util"); } catch (e) { } }(); module.exports = nodeUtil2; })(_nodeUtil, _nodeUtil.exports); var baseIsTypedArray = _baseIsTypedArray, baseUnary = _baseUnary, nodeUtil = _nodeUtil.exports; var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray; var isTypedArray$2 = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray; var isTypedArray_1 = isTypedArray$2; var baseTimes = _baseTimes, isArguments = isArguments_1, isArray$1 = isArray_1, isBuffer$1 = isBuffer$2.exports, isIndex = _isIndex, isTypedArray$1 = isTypedArray_1; var objectProto$4 = Object.prototype; var hasOwnProperty$3 = objectProto$4.hasOwnProperty; function arrayLikeKeys$1(value, inherited) { var isArr = isArray$1(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer$1(value), isType = !isArr && !isArg && !isBuff && isTypedArray$1(value), skipIndexes = isArr || isArg || isBuff || isType, result = skipIndexes ? baseTimes(value.length, String) : [], length = result.length; for (var key in value) { if ((inherited || hasOwnProperty$3.call(value, key)) && !(skipIndexes && (key == "length" || isBuff && (key == "offset" || key == "parent") || isType && (key == "buffer" || key == "byteLength" || key == "byteOffset") || isIndex(key, length)))) { result.push(key); } } return result; } var _arrayLikeKeys = arrayLikeKeys$1; var objectProto$3 = Object.prototype; function isPrototype$1(value) { var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto$3; return value === proto; } var _isPrototype = isPrototype$1; function overArg$1(func, transform) { return function(arg) { return func(transform(arg)); }; } var _overArg = overArg$1; var overArg = _overArg; var nativeKeys$1 = overArg(Object.keys, Object); var _nativeKeys = nativeKeys$1; var isPrototype = _isPrototype, nativeKeys = _nativeKeys; var objectProto$2 = Object.prototype; var hasOwnProperty$2 = objectProto$2.hasOwnProperty; function baseKeys$1(object) { if (!isPrototype(object)) { return nativeKeys(object); } var result = []; for (var key in Object(object)) { if (hasOwnProperty$2.call(object, key) && key != "constructor") { result.push(key); } } return result; } var _baseKeys = baseKeys$1; var arrayLikeKeys = _arrayLikeKeys, baseKeys = _baseKeys, isArrayLike = isArrayLike_1; function keys$1(object) { return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object); } var keys_1 = keys$1; var baseGetAllKeys = _baseGetAllKeys, getSymbols = _getSymbols, keys = keys_1; function getAllKeys$1(object) { return baseGetAllKeys(object, keys, getSymbols); } var _getAllKeys = getAllKeys$1; var getAllKeys = _getAllKeys; var COMPARE_PARTIAL_FLAG$1 = 1; var objectProto$1 = Object.prototype; var hasOwnProperty$1 = objectProto$1.hasOwnProperty; function equalObjects$1(object, other, bitmask, customizer, equalFunc, stack) { var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length; if (objLength != othLength && !isPartial) { return false; } var index = objLength; while (index--) { var key = objProps[index]; if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) { return false; } } var objStacked = stack.get(object); var othStacked = stack.get(other); if (objStacked && othStacked) { return objStacked == other && othStacked == object; } var result = true; stack.set(object, other); stack.set(other, object); var skipCtor = isPartial; while (++index < objLength) { key = objProps[index]; var objValue = object[key], othValue = other[key]; if (customizer) { var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack); } if (!(compared === void 0 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) { result = false; break; } skipCtor || (skipCtor = key == "constructor"); } if (result && !skipCtor) { var objCtor = object.constructor, othCtor = other.constructor; if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) { result = false; } } stack["delete"](object); stack["delete"](other); return result; } var _equalObjects = equalObjects$1; var getNative$3 = _getNative, root$3 = _root; var DataView$1 = getNative$3(root$3, "DataView"); var _DataView = DataView$1; var getNative$2 = _getNative, root$2 = _root; var Promise$2 = getNative$2(root$2, "Promise"); var _Promise = Promise$2; var getNative$1 = _getNative, root$1 = _root; var Set$1 = getNative$1(root$1, "Set"); var _Set = Set$1; var getNative = _getNative, root = _root; var WeakMap$1 = getNative(root, "WeakMap"); var _WeakMap = WeakMap$1; var DataView = _DataView, Map = _Map, Promise$1 = _Promise, Set = _Set, WeakMap = _WeakMap, baseGetTag = _baseGetTag, toSource = _toSource; var mapTag = "[object Map]", objectTag$1 = "[object Object]", promiseTag = "[object Promise]", setTag = "[object Set]", weakMapTag = "[object WeakMap]"; var dataViewTag = "[object DataView]"; var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map), promiseCtorString = toSource(Promise$1), setCtorString = toSource(Set), weakMapCtorString = toSource(WeakMap); var getTag$1 = baseGetTag; if (DataView && getTag$1(new DataView(new ArrayBuffer(1))) != dataViewTag || Map && getTag$1(new Map()) != mapTag || Promise$1 && getTag$1(Promise$1.resolve()) != promiseTag || Set && getTag$1(new Set()) != setTag || WeakMap && getTag$1(new WeakMap()) != weakMapTag) { getTag$1 = function(value) { var result = baseGetTag(value), Ctor = result == objectTag$1 ? value.constructor : void 0, ctorString = Ctor ? toSource(Ctor) : ""; if (ctorString) { switch (ctorString) { case dataViewCtorString: return dataViewTag; case mapCtorString: return mapTag; case promiseCtorString: return promiseTag; case setCtorString: return setTag; case weakMapCtorString: return weakMapTag; } } return result; }; } var _getTag = getTag$1; var Stack = _Stack, equalArrays = _equalArrays, equalByTag = _equalByTag, equalObjects = _equalObjects, getTag = _getTag, isArray = isArray_1, isBuffer = isBuffer$2.exports, isTypedArray = isTypedArray_1; var COMPARE_PARTIAL_FLAG = 1; var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[object Object]"; var objectProto = Object.prototype; var hasOwnProperty = objectProto.hasOwnProperty; function baseIsEqualDeep$1(object, other, bitmask, customizer, equalFunc, stack) { var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other); objTag = objTag == argsTag ? objectTag : objTag; othTag = othTag == argsTag ? objectTag : othTag; var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag; if (isSameTag && isBuffer(object)) { if (!isBuffer(other)) { return false; } objIsArr = true; objIsObj = false; } if (isSameTag && !objIsObj) { stack || (stack = new Stack()); return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack); } if (!(bitmask & COMPARE_PARTIAL_FLAG)) { var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__"); if (objIsWrapped || othIsWrapped) { var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other; stack || (stack = new Stack()); return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack); } } if (!isSameTag) { return false; } stack || (stack = new Stack()); return equalObjects(object, other, bitmask, customizer, equalFunc, stack); } var _baseIsEqualDeep = baseIsEqualDeep$1; var baseIsEqualDeep = _baseIsEqualDeep, isObjectLike = isObjectLike_1; function baseIsEqual$1(value, other, bitmask, customizer, stack) { if (value === other) { return true; } if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) { return value !== value && other !== other; } return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual$1, stack); } var _baseIsEqual = baseIsEqual$1; var baseIsEqual = _baseIsEqual; function isEqual(value, other) { return baseIsEqual(value, other); } var isEqual_1 = isEqual; const defaultStyle = { display: "flex", flexDirection: "row", justifyContent: "flex-start", alignItems: "flex-start" }; WaterFall.defaultProps = { col: 3, horizontalSpacing: 10, verticalSpacing: 10, waterFallBoxStyle: {}, width: "unset", useWindow: false, limitHeight: 50, CardComponent: () => null, data: [], onReachBottom: () => { } }; var minOrMax; (function(minOrMax2) { minOrMax2[minOrMax2["min"] = 0] = "min"; minOrMax2[minOrMax2["max"] = 1] = "max"; })(minOrMax || (minOrMax = {})); function getEmptyArr(col) { return Array.from(Array(col), (v, k) => []); } function getIntersection(preData, data) { return intersectionWith_1(preData, data, isEqual_1); } function getDifference(preData, data) { return differenceWith_1(data, preData, isEqual_1); } function nextIndex(current, sum) { if (current === sum - 1) { return 0; } else { return current + 1; } } function getDomByHeight(domList, type) { const a = [...domList]; const sortList = a.sort((a2, b) => { return b.clientHeight - a2.clientHeight; }); const sortFlag = type === 0 ? sortList.length - 1 : 0; const colDom = sortList[sortFlag]; const index = domList.indexOf(colDom); return { colDom, index }; } function useScroll(useWindow, limitHeight, waterFallNode, onReachBottom) { useLayoutEffect(() => { const target = useWindow ? window : waterFallNode.current.parentNode; const onScroll = throttle_1(() => { let scrollHeight, scrollTop, innerHeight; if (useWindow) {