// Module ID: 16136 // Function ID: 16137 // Dependencies: [41, 42, 109, 32, 19, 17, 1247] // Exports: useAdaptiveRender, useAdaptiveRenderChange, useListScrollSize, useRecyclingEffect, useRecyclingState, useSyncLayout, useViewability, useViewabilityAmount // Module 16136 import _classCallCheck from "_classCallCheck" /* 41 */; import _createClass from "_createClass" /* 42 */; import _objectWithoutProperties from "_objectWithoutProperties" /* 109 */; import _slicedToArray from "module_32" /* 32 */; import noop_mod from "module_19" /* 19 */; import get_ActivityIndicator from "module_17" /* 17 */; let ScrollAdjustHandler = require; function toNativeHorizontalOffset(state, arg1, contentSize) { if (state) { let props; if (null != state) { props = state.props; } let horizontal; if (null != props) { horizontal = props.horizontal; } let tmp4 = horizontal; if (tmp4) { let rtl; if (null != props) { rtl = props.rtl; } if (null == rtl) { rtl = get_ActivityIndicator.I18nManager.isRTL; } tmp4 = rtl; } if (tmp4) { if (undefined !== contentSize) { const _Number = Number; if (Number.isFinite(contentSize)) { const _Number2 = Number; if (Number.isFinite(state.scrollLength)) { if (contentSize > state.scrollLength) { const _Math = Math; let bound = Math.max(0, contentSize - state.scrollLength); } let bound1 = arg1; if (undefined !== bound) { const _Math2 = Math; const _Math3 = Math; bound1 = Math.max(0, Math.min(bound, arg1)); } let prop; if (null != state) { prop = state.horizontalRTLScrollType; } let str2 = "inverted"; if (null != prop) { str2 = prop; } if ("negative" === str2) { let num5 = 0; if (0 !== bound1) { num5 = -bound1; } let tmp15 = num5; } else { tmp15 = bound1; if ("inverted" === str2) { let tmp16 = bound1; if (!tmp11) { const diff = bound - bound1; let bound2 = diff; if (!tmp11) { const _Math4 = Math; const _Math5 = Math; bound2 = Math.max(0, Math.min(bound, diff)); } tmp16 = bound2; } tmp15 = tmp16; } } return tmp15; } } } let num2; if (undefined !== contentSize) { const _Number3 = Number; if (Number.isFinite(contentSize)) { const _Number4 = Number; if (Number.isFinite(state.scrollLength)) { num2 = 0; } } } bound = num2; } } return arg1; } function StateProvider(children) { return { if (typeof createAnimatedValue === "function") { const obj = { animatedScrollY: null, columnWrapperStyle: "e", containerLayoutTriggers: "Array", contextNum: 0, listeners: "r", mapViewabilityAmountCallbacks: "flexDirection", mapViewabilityAmountValues: null, mapViewabilityCallbacks: "\u{1F9D1}\u{1F3FE}\u200D\u{1F9B0}", mapViewabilityConfigStates: true, mapViewabilityValues: null, pendingContainerIds: 12.1, positionListeners: "TRANSPARENT", scrollAxisGap: 0, state: "19.2.3", values: "react-native-renderer", viewRefs: null }; value = new Animated.Animated.Value(0); obj.animatedScrollY = value; const _Map = Map; map = new Map(); obj.containerLayoutTriggers = map; closure_18 = tmp12 + 1; obj.contextNum = +closure_18; const _Map2 = Map; map1 = new Map(); obj.listeners = map1; const _Map3 = Map; const map2 = new Map(); obj.mapViewabilityAmountCallbacks = map2; const _Map4 = Map; const map3 = new Map(); obj.mapViewabilityAmountValues = map3; const _Map5 = Map; const map4 = new Map(); obj.mapViewabilityCallbacks = map4; const _Map6 = Map; const map5 = new Map(); obj.mapViewabilityConfigStates = map5; const _Map7 = Map; const map6 = new Map(); obj.mapViewabilityValues = map6; const _Map8 = Map; const map7 = new Map(); obj.positionListeners = map7; const _Map9 = Map; const items = [["alignItemsAtEndPadding", 0], ["containerLayoutEpoch", 0], ["stylePaddingTop", 0], ["headerSize", 0], ["numContainers", 0], ["activeStickyIndex", -1], , , , , , , , ]; const items1 = ["isAtEnd", false]; items[6] = items1; const items2 = ["isAtStart", false]; items[7] = items2; const items3 = ["isNearEnd", false]; items[8] = items3; const items4 = ["isNearStart", false]; items[9] = items4; const items5 = ["isWithinMaintainScrollAtEndThreshold", false]; items[10] = items5; items[11] = ["adaptiveRender", "normal"]; items[12] = ["totalSize", 0]; items[13] = ["scrollAdjustPending", 0]; const map8 = new Map(items); obj.values = map8; const _Map10 = Map; const map9 = new Map(); obj.viewRefs = map9; return obj; } else { throw new TypeError("Trying to call a non-function"); } }), 1)[0]}>{arg0.children}; } function listen$(listeners, arg1, arg2) { closure_0 = arg2; listeners = listeners.listeners; value = listeners.get(arg1); set = value; let obj = value; if (!value) { const _Set = Set; set = new Set(); const result = listeners.set(arg1, set); obj = set; } obj.add(arg2); return () => set.delete(closure_0); } function peek$(measureInLayoutEffect, containerLayoutEpoch) { const values = measureInLayoutEffect.values; return values.get(containerLayoutEpoch); } function set$(context, totalSize, data) { ({ listeners, values } = context); if (values.get(totalSize) !== data) { const result = values.set(totalSize, data); value = listeners.get(totalSize); if (value) { for (const item10015 of value) { let item10015Result = item10015(arg2); continue; } } } } function notifyPosition$(positionListeners, arg1, sum2) { positionListeners = positionListeners.positionListeners; value = positionListeners.get(arg1); if (value) { for (const item10010 of value) { let item10010Result = item10010(arg2); continue; } } } function getContentInsetEnd(context, current) { const state = context.state; const props = state.props; ({ horizontal, contentInset } = props); if (null == contentInset) { contentInset = state.nativeContentInset; } if (horizontal) { let num2 = contentInset; if (!contentInset) { if (!num2) { num2 = 0; } let num = num2; } else { let props1; if (null != state) { props1 = state.props; } let horizontal1; if (null != props1) { horizontal1 = props1.horizontal; } let tmp3 = horizontal1; if (tmp3) { let rtl; if (null != props1) { rtl = props1.rtl; } if (null == rtl) { rtl = get_ActivityIndicator.I18nManager.isRTL; } tmp3 = rtl; } } } else if (null != contentInset) { num = contentInset.bottom; } if (!num) { num = 0; } let contentInsetEndAdjustment = current; if (null == current) { contentInsetEndAdjustment = props.contentInsetEndAdjustment; } let num3 = 0; if (null != contentInsetEndAdjustment) { num3 = contentInsetEndAdjustment; } const bound = Math.max(0, num3); const values = context.values; value = values.get("anchoredEndSpaceSize"); const anchoredEndSpace = props.anchoredEndSpace; let includeInEndInset; if (null != anchoredEndSpace) { includeInEndInset = anchoredEndSpace.includeInEndInset; } let num4 = 0; if (includeInEndInset) { num4 = 0; if (value) { num4 = value; } } const contentInsetOverride = state.contentInsetOverride; let tmp10; if (null != contentInsetOverride) { tmp10 = contentInsetOverride; } if (tmp10) { const rect = { bottom: 0, left: 0, right: 0 }; const merged = Object.assign(contentInset); const merged1 = Object.assign(tmp10); if (horizontal) { let props2; if (null != state) { props2 = state.props; } let horizontal2; if (null != props2) { horizontal2 = props2.horizontal; } let tmp20 = horizontal2; if (tmp20) { let rtl1; if (null != props2) { rtl1 = props2.rtl; } if (null == rtl1) { rtl1 = get_ActivityIndicator.I18nManager.isRTL; } tmp20 = rtl1; } let num5 = (tmp20 ? rect.left : rect.right) || 0; const tmp23 = (tmp20 ? rect.left : rect.right) || 0; } else { num5 = rect.bottom; } if (!num5) { num5 = 0; } return Math.max(num5 + bound, num4); } else { const _Math = Math; return Math.max(tmp11, num4); } } function getContentSize(context) { ({ values, state } = context); const tmp = values.get("stylePaddingTop") || 0; const tmp2 = state.props.stylePaddingBottom || 0; const tmp3 = values.get("alignItemsAtEndPadding") || 0; const tmp4 = values.get("headerSize") || 0; let num = getContentInsetEnd(context); let totalSize = state.pendingTotalSize; const sum = tmp4 + (values.get("footerSize") || 0); if (null == totalSize) { totalSize = state.totalSize; } if (null == totalSize) { totalSize = values.get("totalSize"); } const sum1 = sum + totalSize + tmp + tmp3 + tmp2; if (!num) { num = 0; } return sum1 + num; } function createContainerItemMetadata(dataChangeEpoch, itemIndex, itemData, itemType) { return { dataChangeEpoch: dataChangeEpoch.dataChangeEpoch, getFixedItemSize: dataChangeEpoch.props.getFixedItemSize, getItemType: dataChangeEpoch.props.getItemType, itemData, itemIndex, itemType }; } function resolveContainerItemMetadata(state, containerId, itemIndex, itemData) { ({ getFixedItemSize, getItemType } = state.props); const containerItemMetadata = state.containerItemMetadata; value = containerItemMetadata.get(containerId); let dataChangeEpoch; if (null != value) { dataChangeEpoch = value.dataChangeEpoch; } if (dataChangeEpoch === state.dataChangeEpoch) { if (value.getItemType === getItemType) { if (value.getFixedItemSize !== getFixedItemSize) { value.didResolveFixedItemSize = false; value.fixedItemSize = undefined; value.getFixedItemSize = getFixedItemSize; } let tmp6 = getFixedItemSize; if (getFixedItemSize) { tmp6 = !value.didResolveFixedItemSize; } if (tmp6) { const itemType = value.itemType; let str2 = ""; if (null != itemType) { str2 = itemType; } value.fixedItemSize = getFixedItemSize(itemData, itemIndex, str2); value.didResolveFixedItemSize = true; } return value; } } let tmp3; if (getItemType) { const itemType1 = getItemType(itemData, itemIndex); let str = ""; if (null != itemType1) { str = itemType1; } tmp3 = str; } const obj = { dataChangeEpoch: state.dataChangeEpoch, getFixedItemSize: state.props.getFixedItemSize, getItemType: state.props.getItemType, itemData, itemIndex, itemType: tmp3 }; const containerItemMetadata2 = state.containerItemMetadata; const result = containerItemMetadata2.set(containerId, obj); value = obj; } function invalidateContainerFixedItemSizes(state) { const containerItemMetadata = state.containerItemMetadata; const values = containerItemMetadata.values(); const iter = values[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { nextResult.didResolveFixedItemSize = false; nextResult.fixedItemSize = undefined; continue; } } function ensureInitialScrollSessionCompletion(initialScrollSession, kind) { let tmp = kind; if (kind === undefined) { initialScrollSession = initialScrollSession.initialScrollSession; let kind1; if (null != initialScrollSession) { kind1 = initialScrollSession.kind; } let str = "bootstrap"; if (null != kind1) { str = kind1; } tmp = str; } if (initialScrollSession.initialScrollSession) { if (initialScrollSession.initialScrollSession.kind !== tmp) { if ("bootstrap" === initialScrollSession.initialScrollSession.kind) { const bootstrap = initialScrollSession.initialScrollSession.bootstrap; } const completion2 = initialScrollSession.initialScrollSession.completion; const previousDataLength2 = initialScrollSession.initialScrollSession.previousDataLength; if ("offset" === tmp) { const obj2 = { completion: completion2, kind: tmp, previousDataLength: previousDataLength2 }; let obj3 = obj2; } else { obj3 = { bootstrap, completion: completion2, kind: tmp, previousDataLength: previousDataLength2 }; } initialScrollSession.initialScrollSession = obj3; } } else { const obj = { completion: {}, kind: tmp, previousDataLength: 0 }; ({ completion, kind, previousDataLength } = obj); if ("offset" === kind) { const obj4 = { completion, kind, previousDataLength }; let obj5 = obj4; } else { obj5 = { bootstrap: tmp4, completion, kind, previousDataLength }; } initialScrollSession.initialScrollSession = obj5; } const initialScrollSession2 = initialScrollSession.initialScrollSession; if (null == initialScrollSession2.completion) { initialScrollSession2.completion = {}; } return initialScrollSession.initialScrollSession.completion; } function setInitialScrollSession(state, arg1) { let obj = arg1; if (arg1 === undefined) { obj = {}; } const initialScrollSession = state.initialScrollSession; let kind = obj.kind; if (null == kind) { let kind1; if (null != initialScrollSession) { kind1 = initialScrollSession.kind; } kind = kind1; } if (null != initialScrollSession) { const completion = initialScrollSession.completion; } let kind2; if (null != initialScrollSession) { kind2 = initialScrollSession.kind; } if ("bootstrap" === kind2) { let bootstrap = initialScrollSession.bootstrap; } if ("bootstrap" === kind) { if (null !== obj.bootstrap) { const bootstrap2 = obj.bootstrap; if (null != bootstrap2) { bootstrap = bootstrap2; } } } if (kind) { if (!state.initialScroll) { if (!tmp3) { let prop; if (null != completion) { prop = completion.didDispatchNativeScroll; } if (!prop) { let prop1; if (null != completion) { prop1 = completion.didRetrySilentInitialScroll; } prop = prop1; } if (!prop) { let watchdog; if (null != completion) { watchdog = completion.watchdog; } prop = watchdog; } if (!prop) { state.initialScrollSession = undefined; } } } let previousDataLength = obj.previousDataLength; if (null == previousDataLength) { let previousDataLength1; if (null != initialScrollSession) { previousDataLength1 = initialScrollSession.previousDataLength; } previousDataLength = previousDataLength1; } let num = 0; if (null != previousDataLength) { num = previousDataLength; } if ("offset" === kind) { const obj2 = { completion, kind, previousDataLength: num }; let obj3 = obj2; } else { obj3 = { bootstrap: tmp3, completion, kind, previousDataLength: num }; } state.initialScrollSession = obj3; return state.initialScrollSession; } else { state.initialScrollSession = undefined; } } function resetSharedEdgeGateIfOutsideHysteresis(state) { state = state.state; if (state.edgeReachedGate) { const tmp2 = getContentSize(state); const diff = tmp2 - state.scroll - state.scrollLength; const result = state.props.onStartReachedThreshold * state.scrollLength; const result1 = state.props.onEndReachedThreshold * state.scrollLength; const _Math = Math; const diff1 = diff - getContentInsetEnd(state); const absolute = Math.abs(state.scroll); let tmp11 = result > 0; if (tmp11) { tmp11 = absolute >= 1.3 * result; } if (!tmp11) { tmp11 = result <= 0 && absolute > 0; const tmp12 = result <= 0 && absolute > 0; } const _Math2 = Math; const absolute1 = Math.abs(diff1); let tmp14 = !tmp6; let tmp15 = tmp14; if (tmp2 >= state.scrollLength) { tmp15 = result1 > 0; } if (tmp15) { tmp15 = absolute1 >= 1.3 * result1; } if (!tmp15) { if (!tmp6) { tmp14 = result1 <= 0; } if (tmp14) { tmp14 = absolute1 > 0; } tmp15 = tmp14; } if (tmp11) { tmp11 = tmp15; } if (tmp11) { state.edgeReachedGate = undefined; } } } function hasActiveInitialScroll(initialScroll) { initialScroll = undefined; if (null != initialScroll) { initialScroll = initialScroll.initialScroll; } return initialScroll && !initialScroll.didFinishInitialScroll; } function checkAtBottom(state, arg1, arg2) { closure_1 = arg1; closure_2 = arg2; state = state.state; if (state) { ({ scrollLength, scroll, props } = state); const onEndReachedThreshold = props.onEndReachedThreshold; ({ queuedInitialLayout, maintainingScrollAtEnd } = state); const tmp2 = getContentSize(state); resetSharedEdgeGateIfOutsideHysteresis(state); if (tmp2 > 0) { if (queuedInitialLayout) { const diff = tmp2 - scroll - scrollLength; const diff1 = diff - getContentInsetEnd(state); let tmp10 = tmp8; if (tmp2 >= scrollLength) { tmp10 = diff1 <= 1; } set$(state, "isAtEnd", tmp10); let tmp12 = tmp8; if (tmp2 >= scrollLength) { tmp12 = diff1 <= onEndReachedThreshold * scrollLength; } set$(state, "isNearEnd", tmp12); let tmp14 = tmp8; if (tmp2 >= scrollLength) { tmp14 = diff1 <= props.maintainScrollAtEndThreshold * scrollLength; } set$(state, "isWithinMaintainScrollAtEndThreshold", tmp14); let initialScroll; if (null != state) { initialScroll = state.initialScroll; } if (!tmp18) { const result = onEndReachedThreshold * scrollLength; ({ isEndReached, endReachedSnapshot } = state); let obj = { contentSize: tmp2, dataLength: null, scrollPosition: null }; const data = state.props.data; let length; if (null != data) { length = data.length; } obj.dataLength = length; obj.scrollPosition = scroll; state.isEndReached = checkThreshold(diff1, tmp8, result, isEndReached, endReachedSnapshot, obj, (distanceFromEnd) => { const edgeReachedGate = state.state.edgeReachedGate; let tmp4 = !edgeReachedGate; if (edgeReachedGate) { tmp4 = tmp2 === "end"; } if (!tmp4) { tmp4 = closure_2; } if (tmp4) { state.state.edgeReachedGate = "closed"; const props = state.props; const onEndReached = props.onEndReached; if (null != onEndReached) { const call = onEndReached.call; const obj = { distanceFromEnd }; if (typeof call === "unknown") { onEndReached(obj); } else { call(props, obj); } } } }, (endReachedSnapshot) => { state.endReachedSnapshot = endReachedSnapshot; }); } tmp18 = initialScroll && !state.didFinishInitialScroll || maintainingScrollAtEnd; } } } } function checkThresholds(context, arg1) { checkAtBottom(context, arg1, !context.state.edgeReachedGate); closure_1 = arg1; closure_2 = tmp; let state; if (null != context) { state = context.state; } if (state) { ({ isStartReached, props, scroll, startReachedSnapshot, totalSize } = state); const result = props.onStartReachedThreshold * state.scrollLength; resetSharedEdgeGateIfOutsideHysteresis(context); if (isStartReached) { isStartReached = result > 0; } if (isStartReached) { isStartReached = scroll > result; } if (isStartReached) { isStartReached = startReachedSnapshot; } if (isStartReached) { isStartReached = startReachedSnapshot.contentSize !== totalSize || startReachedSnapshot.dataLength !== length; const tmp7 = startReachedSnapshot.contentSize !== totalSize || startReachedSnapshot.dataLength !== length; } if (isStartReached) { state.isStartReached = false; state.startReachedSnapshot = undefined; } set$(context, "isAtStart", scroll <= 1); set$(context, "isNearStart", scroll <= result); let initialScroll; if (null != state) { initialScroll = state.initialScroll; } if (!tmp12) { let obj = { contentSize: totalSize, dataLength: length, scrollPosition: scroll }; state.isStartReached = checkThreshold(scroll, false, result, state.isStartReached, startReachedSnapshot, obj, (distanceFromStart) => { const edgeReachedGate = state.state.edgeReachedGate; let tmp4 = !edgeReachedGate; if (edgeReachedGate) { tmp4 = tmp2 === "start"; } if (!tmp4) { tmp4 = closure_2; } if (tmp4) { state.state.edgeReachedGate = "closed"; const props = state.props; const onStartReached = props.onStartReached; if (null != onStartReached) { const call = onStartReached.call; const obj = { distanceFromStart }; if (typeof call === "unknown") { onStartReached(obj); } else { call(props, obj); } } } }, (startReachedSnapshot) => { state.startReachedSnapshot = startReachedSnapshot; }); } tmp12 = initialScroll && !state.didFinishInitialScroll || state.scrollingTo; } } function scheduleAdaptiveRenderExit(state, exitDelay) { state = state.state; const state2 = state.state; const timeoutAdaptiveRender = state2.timeoutAdaptiveRender; if (undefined !== timeoutAdaptiveRender) { const _clearTimeout = clearTimeout; clearTimeout(timeoutAdaptiveRender); let timeouts = state2.timeouts; timeouts.delete(timeoutAdaptiveRender); state2.timeoutAdaptiveRender = undefined; } if (exitDelay <= 0) { let values = state.values; if (values.get("adaptiveRender") !== "normal") { set$(state, "adaptiveRender", "normal"); let adaptiveRender = state.state.props.adaptiveRender; let onChange; if (null != adaptiveRender) { onChange = adaptiveRender.onChange; } if (null != onChange) { let call = onChange.call; if (typeof call === "unknown") { onChange("normal", "scroll"); } else { call(adaptiveRender, "normal", "scroll"); } } } } else { const _setTimeout = setTimeout; const timerId = setTimeout(() => { const timeouts = state.timeouts; timeouts.delete(timerId); state.timeoutAdaptiveRender = undefined; const values = state.values; if (values.get("adaptiveRender") !== "normal") { set$(tmp2, "adaptiveRender", "normal"); const adaptiveRender = tmp2.state.props.adaptiveRender; let onChange; if (null != adaptiveRender) { onChange = adaptiveRender.onChange; } if (null != onChange) { const call = onChange.call; if (typeof call === "unknown") { onChange("normal", "scroll"); } else { call(adaptiveRender, "normal", "scroll"); } } } }, exitDelay); state.timeoutAdaptiveRender = timerId; const timeouts2 = state.timeouts; timeouts2.add(timerId); } } function resetAdaptiveRender(context) { const state = context.state; const timeoutAdaptiveRender = state.timeoutAdaptiveRender; if (undefined !== timeoutAdaptiveRender) { const _clearTimeout = clearTimeout; clearTimeout(timeoutAdaptiveRender); const timeouts = state.timeouts; timeouts.delete(timeoutAdaptiveRender); state.timeoutAdaptiveRender = undefined; } const adaptiveRender = context.state.props.adaptiveRender; let initialMode; if (null != adaptiveRender) { initialMode = adaptiveRender.initialMode; } let str = "normal"; if (null != initialMode) { str = initialMode; } const values = context.values; if (values.get("adaptiveRender") !== str) { const values2 = context.values; if (values2.get("adaptiveRender") !== str) { set$(context, "adaptiveRender", str); const adaptiveRender2 = context.state.props.adaptiveRender; let onChange; if (null != adaptiveRender2) { onChange = adaptiveRender2.onChange; } if (null != onChange) { const call = onChange.call; if (typeof call === "unknown") { onChange(str, "initial"); } else { call(adaptiveRender2, str, "initial"); } } } } } function getEffectiveDrawDistance(state, arg1) { const drawDistance = state.state.props.drawDistance; const initialScroll = state.state.initialScroll; let tmp = undefined !== initialScroll; if (tmp) { const viewPosition = initialScroll.viewPosition; let num2 = 0; if (null != viewPosition) { num2 = viewPosition; } tmp = num2 > 0; } if ("visible-first" === arg1) { const _Math = Math; let bound = Math.min(drawDistance, 50); } else { bound = drawDistance; if ("full" !== arg1) { const values = state.values; bound = drawDistance; if (!values.get("readyToRender")) { bound = drawDistance; } } } return bound; } function setInitialRenderState(context, didLayout) { const state = context.state; const onLoad = state.props.onLoad; if (didLayout.didLayout) { state.didContainersLayout = true; } if (didLayout.didInitialScroll) { state.didFinishInitialScroll = true; } let didFinishInitialScroll = state.didContainersLayout; if (didFinishInitialScroll) { didFinishInitialScroll = state.didFinishInitialScroll; } let BooleanResult = Boolean(didFinishInitialScroll); if (BooleanResult) { const values = context.values; BooleanResult = !values.get("readyToRender"); } if (BooleanResult) { set$(context, "readyToRender", true); const values2 = context.values; if (values2.get("adaptiveRender") !== "normal") { tmp2(context, "adaptiveRender", "normal"); const adaptiveRender = context.state.props.adaptiveRender; let onChange; if (null != adaptiveRender) { onChange = adaptiveRender.onChange; } if (null != onChange) { const call = onChange.call; if (typeof call === "unknown") { onChange("normal", "ready"); } else { call(adaptiveRender, "normal", "ready"); } } } if (state.props.drawDistance > 50) { const state2 = context.state; if (!tmp8) { const _requestAnimationFrame = requestAnimationFrame; state2.queuedFullDrawDistancePrewarm = requestAnimationFrame(() => { state6.queuedFullDrawDistancePrewarm = undefined; const triggerCalculateItemsInView = state6.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(); } else { call(state6); } } }); } tmp8 = state2.props.drawDistance <= 50 || undefined !== state2.queuedFullDrawDistancePrewarm; } if (!state.didLoad) { state.didLoad = true; if (onLoad) { const obj = { elapsedTimeInMs: null }; const _Date = Date; obj.elapsedTimeInMs = Date.now() - state.loadStartTime; onLoad(obj); } } tmp2 = set$; } } function finishInitialScroll(context, resolvedOffset) { let state = context.state; if (undefined !== resolvedOffset.resolvedOffset) { resolvedOffset = resolvedOffset.resolvedOffset; state.scroll = resolvedOffset; state.scrollPending = resolvedOffset; state.scrollPrev = resolvedOffset; } else if (resolvedOffset.syncObservedOffset) { const initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("offset" === kind) { current = state.refScroller.current; let prop; if (null != current) { prop = current.getCurrentScrollOffset; } if (null == prop) { let isFiniteResult = typeof undefined === "number"; if (typeof undefined === "number") { const _Number = Number; isFiniteResult = Number.isFinite(undefined); } if (isFiniteResult) { state.scroll = undefined; state.scrollPending = undefined; state.scrollPrev = undefined; } } else { let call = prop.call; typeof call === "unknown" ? prop() : call(current); } } } function complete() { let scrollPending = resolvedOffset.resolvedOffset; if (null == scrollPending) { scrollPending = state.scrollPending; } if (null == scrollPending) { const scroll = state.scroll; } closure_37.clear(state); if (resolvedOffset.preserveTarget) { if (tmp4.initialScroll) { tmp4.clearPreservedInitialScrollOnNextFinish = undefined; setInitialScrollSession(tmp4); if (undefined !== tmp4.timeoutPreservedInitialScrollClear) { const _clearTimeout2 = clearTimeout; clearTimeout(tmp4.timeoutPreservedInitialScrollClear); tmp4.timeoutPreservedInitialScrollClear = undefined; } if (tmp.schedulePreservedTargetClear) { const _setTimeout = setTimeout; tmp4.timeoutPreservedInitialScrollClear = setTimeout(() => { state.timeoutPreservedInitialScrollClear = undefined; let initialScroll = state.didFinishInitialScroll; if (initialScroll) { const scrollingTo = tmp.scrollingTo; let isInitialScroll; if (null != scrollingTo) { isInitialScroll = scrollingTo.isInitialScroll; } initialScroll = !isInitialScroll; } if (initialScroll) { initialScroll = tmp.initialScroll; } if (initialScroll) { if (undefined !== tmp.timeoutPreservedInitialScrollClear) { const _clearTimeout = clearTimeout; clearTimeout(tmp.timeoutPreservedInitialScrollClear); tmp.timeoutPreservedInitialScrollClear = undefined; } tmp.clearPreservedInitialScrollOnNextFinish = undefined; tmp.initialScroll = undefined; setInitialScrollSession(tmp); } }, 2000); } } if (!tmp.recalculateItems) { setInitialRenderState(state, { didInitialScroll: true }); const onFinished = tmp.onFinished; if (null != onFinished) { const call2 = onFinished.call; if (typeof call2 === "unknown") { onFinished(); } else { call2(tmp); } } } else { state = state.state; let triggerCalculateItemsInView = state.props; let data; if (null != triggerCalculateItemsInView) { data = triggerCalculateItemsInView.data; } if (data) { triggerCalculateItemsInView = state.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; let obj = { forceFullItemPositions: true }; if (typeof call !== "unknown") { call(state, obj); } } const result = triggerCalculateItemsInView(obj); } obj = checkThresholds; checkThresholds(state); } } if (undefined !== state.timeoutPreservedInitialScrollClear) { let _clearTimeout = clearTimeout; clearTimeout(tmp4.timeoutPreservedInitialScrollClear); tmp4.timeoutPreservedInitialScrollClear = undefined; } state.clearPreservedInitialScrollOnNextFinish = undefined; state.initialScroll = undefined; setInitialScrollSession(state); } if (resolvedOffset.waitForCompletionFrame) { const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(complete); } else { complete(); } } function getId(props, arg1) { ({ data, keyExtractor } = props.props); if (data) { let tmp2 = null; if (arg1 < data.length) { let keyExtractorResult = arg1; if (keyExtractor) { keyExtractorResult = keyExtractor(data[arg1], arg1); } tmp2 = keyExtractorResult; } props.idCache[arg1] = tmp2; return tmp2; } else { return ""; } } function updateContentMetricsState(context) { const values = context.values; const state = context.state; let num = 0; if (state.props.alignItemsAtEndPaddingEnabled) { num = 0; if (!state.props.horizontal) { num = 0; if (state.props.data.length > 0) { num = 0; if (state.scrollLength > 0) { ({ state: state2, values: values2 } = context); const tmp3 = values2.get("headerSize") || 0; let totalSize = state2.pendingTotalSize; const sum = tmp3 + (values2.get("footerSize") || 0); if (null == totalSize) { totalSize = state2.totalSize; } if (null == totalSize) { totalSize = values2.get("totalSize"); } let num2 = 0; if (null != totalSize) { num2 = totalSize; } let num3 = state2.props.stylePaddingTop; const sum1 = sum + num2; if (!num3) { num3 = 0; } let num4 = state2.props.stylePaddingBottom; const sum2 = sum1 + num3; if (!num4) { num4 = 0; } const diff = state.scrollLength - (sum2 + num4); num = Math.max(0, diff - getContentInsetEnd(context)); const tmp4 = values2.get("footerSize") || 0; } } } } if (tmp !== num) { set$(context, "alignItemsAtEndPadding", num); } } function setSize(state, itemKey, result2, arg3) { flag = arg3; if (arg3 === undefined) { flag = true; } const sizes = state.state.sizes; value = sizes.get(itemKey); let diff = result2; if (undefined !== value) { diff = result2 - value; } if (0 !== diff) { if (flag === undefined) { flag = true; } state = state.state; const totalSize = state.totalSize; if (null === itemKey) { let sum = diff; if (state.timeoutSetPaddingTop) { const _clearTimeout = clearTimeout; clearTimeout(state.timeoutSetPaddingTop); state.timeoutSetPaddingTop = undefined; sum = diff; } } else { sum = tmp3 + diff; } if (totalSize !== sum) { if (!closure_27) { if (state.initialScroll) { if (sum < totalSize) { state.pendingTotalSize = sum; } } } state.pendingTotalSize = undefined; state.totalSize = sum; if (flag) { set$(state, "totalSize", sum); } updateContentMetricsState(state); } else { let tmp8 = flag; if (flag) { const values = state.values; tmp8 = values.get("totalSize") !== sum; } if (tmp8) { set$(state, "totalSize", sum); } } } const result = sizes.set(itemKey, result2); } function isFunction(fn) { return typeof fn === "function"; } function isNullOrUndefined(arg0) { return null == arg0; } function extractPadding(paddingVertical, paddingVertical2, Bottom) { if ("Left" !== Bottom) { if ("Right" !== Bottom) { let paddingHorizontal = paddingVertical.paddingVertical; } const _HermesInternal = HermesInternal; const tmp3 = paddingVertical["padding" + Bottom]; if (null != tmp3) { paddingHorizontal = tmp3; } if (null == paddingHorizontal) { paddingHorizontal = paddingVertical.padding; } let num = 0; if (null != paddingHorizontal) { num = paddingHorizontal; } if (!tmp) { if ("Right" !== Bottom) { let paddingHorizontal2 = paddingVertical2.paddingVertical; } const _HermesInternal2 = HermesInternal; const tmp6 = paddingVertical2["padding" + Bottom]; if (null != tmp6) { paddingHorizontal2 = tmp6; } if (null == paddingHorizontal2) { paddingHorizontal2 = paddingVertical2.padding; } let num2 = 0; if (null != paddingHorizontal2) { num2 = paddingHorizontal2; } return num + num2; } paddingHorizontal2 = paddingVertical2.paddingHorizontal; } paddingHorizontal = paddingVertical.paddingHorizontal; } function findContainerId(state, key) { state = state.state; let containerItemKeys; if (null != state) { containerItemKeys = state.containerItemKeys; } value = undefined; if (null != containerItemKeys) { value = containerItemKeys.get(key); } if (undefined !== value) { return value; } else { const values = state.values; value2 = values.get("numContainers"); let num = 0; if (0 < value2) { const _HermesInternal = HermesInternal; const values2 = state.values; while (values2.get("containerItemKey" + num) !== key) { num = num + 1; } return num; } return -1; } } function getKnownOrFixedItemSize(state, sum1) { state = state.state; ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp = null; if (sum1 < data.length) { let keyExtractorResult = sum1; if (keyExtractor) { keyExtractorResult = keyExtractor(data[sum1], sum1); } tmp = keyExtractorResult; } state.idCache[sum1] = tmp; str = tmp; } const state2 = state.state; ({ getFixedItemSize, getItemType } = state2.props); value = undefined; if (str) { const sizesKnown = state2.sizesKnown; value = sizesKnown.get(str); } let tmp5 = value; if (undefined === value) { tmp5 = value; if (str) { tmp5 = value; if (getFixedItemSize) { let str2 = ""; if (getItemType) { const itemType = getItemType(tmp3, sum1); str2 = ""; if (null != itemType) { str2 = itemType; } } const fixedItemSize = getFixedItemSize(tmp3, sum1, str2); tmp5 = value; if (undefined !== fixedItemSize) { const sum = fixedItemSize + state.scrollAxisGap; const sizesKnown2 = state2.sizesKnown; const result = sizesKnown2.set(str, sum); tmp5 = sum; } } } } return tmp5; } function getItemSize(state, found, diff, data, arg4, arg5, arg6, itemType) { state = state.state; ({ sizes, props } = state); const getItemType = props.getItemType; ({ scrollingTo, sizesKnown, averageSizes } = state); value = sizesKnown.get(found); if (undefined !== value) { return value; } else { const value3 = sizes.get(found); if (arg5) { if (undefined !== value3) { return value3; } } const state2 = state.state; ({ getFixedItemSize, getItemType: getItemType2 } = state2.props); let value4; if (found) { const sizesKnown2 = state2.sizesKnown; value4 = sizesKnown2.get(found); } let tmp6 = value4; if (undefined === value4) { tmp6 = value4; if (found) { tmp6 = value4; if (getFixedItemSize) { itemType = undefined; if (null != itemType) { itemType = itemType.itemType; } if (null == itemType) { let str2 = ""; if (getItemType2) { const itemType2 = getItemType2(data, diff); str2 = ""; if (null != itemType2) { str2 = itemType2; } } itemType = str2; } let prop; if (null != itemType) { prop = itemType.didResolveFixedItemSize; } const tmp11 = prop ? itemType.fixedItemSize : getFixedItemSize(data, diff, itemType); tmp6 = value4; if (undefined !== tmp11) { const sum = tmp11 + state.scrollAxisGap; const sizesKnown3 = state2.sizesKnown; const result = sizesKnown3.set(found, sum); tmp6 = sum; } } } } if (undefined !== tmp6) { setSize(state, found, tmp6, arg6); return tmp6; } else { let itemType1; if (null != itemType) { itemType1 = itemType.itemType; } if (null == itemType1) { let str4 = ""; if (getItemType) { const itemType3 = getItemType(data, diff); str4 = ""; if (null != itemType3) { str4 = itemType3; } } itemType1 = str4; } let result1 = tmp6; if (arg4) { result1 = tmp6; if (!scrollingTo) { let avg; if (null != averageSizes[itemType1]) { avg = tmp19.avg; } result1 = tmp6; if (undefined !== avg) { const _Math = Math; result1 = Math.floor(8 * avg) / 8; } } } if (undefined === result1) { if (undefined !== value3) { return value3; } } let result2 = result1; if (undefined === result1) { result2 = result1; if (arg4) { result2 = result1; if (scrollingTo) { const averageSizeSnapshot = scrollingTo.averageSizeSnapshot; let tmp24; if (null != averageSizeSnapshot) { tmp24 = averageSizeSnapshot[itemType1]; } result2 = result1; if (undefined !== tmp24) { const _Math2 = Math; result2 = Math.floor(8 * tmp24) / 8; } } } } if (undefined === result2) { result2 = props.estimatedItemSize + state.scrollAxisGap; } setSize(state, found, result2, arg6); return result2; } } } function calculateOffsetWithOffsetPosition(ctx, offset, scrollingTo) { const state = ctx.state; ({ index, viewOffset, viewPosition } = scrollingTo); let diff = offset; if (viewOffset) { diff = offset - viewOffset; } let sum2 = diff; if (undefined !== index) { const values = ctx.values; const values2 = ctx.values; const tmp4 = values.get("stylePaddingTop") || 0; const values3 = ctx.values; const sum = tmp4 + (values2.get("alignItemsAtEndPadding") || 0); const tmp5 = values2.get("alignItemsAtEndPadding") || 0; const sum1 = sum + (values3.get("headerSize") || 0); sum2 = diff; if (sum1) { sum2 = diff + sum1; } const tmp7 = values3.get("headerSize") || 0; } let sum3 = sum2; if (undefined !== viewPosition) { sum3 = sum2; if (tmp2) { if (0 === state.props.data.length) { return sum2; } else { const estimatedItemSize = state.props.estimatedItemSize; let num2 = 0; if (null != estimatedItemSize) { num2 = estimatedItemSize; } if (!(index < 0 || index >= length)) { ({ data, keyExtractor } = state.props); let str4 = ""; if (data) { let tmp13 = null; if (index < data.length) { let keyExtractorResult = index; if (keyExtractor) { keyExtractorResult = keyExtractor(data[index], index); } tmp13 = keyExtractorResult; } state.idCache[index] = tmp13; str4 = tmp13; } num2 = getItemSize(ctx, str4, index, state.props.data[index]); } const diff1 = sum2 - viewPosition * (state.scrollLength - getContentInsetEnd(ctx) - num2); sum3 = diff1; if (!(index < 0 || index >= length)) { sum3 = diff1; if (index === state.props.data.length - 1) { const values4 = ctx.values; sum3 = diff1 + (values4.get("footerSize") || 0); const tmp20 = values4.get("footerSize") || 0; } } } } } return sum3; } function finishScrollTo(state) { state = state.state; let scrollingTo1; if (null != state) { scrollingTo1 = state.scrollingTo; } if (scrollingTo1) { const pendingScrollResolve = state.pendingScrollResolve; state.pendingScrollResolve = undefined; const scrollingTo = state.scrollingTo; state.scrollHistory.length = 0; state.scrollingTo = undefined; state.scrollTargetPinnedRange = undefined; if (undefined !== state.pendingTotalSize) { const pendingTotalSize = state.pendingTotalSize; const state3 = state.state; ({ totalSize, totalSize: totalSize2 } = state3); if (state3.timeoutSetPaddingTop) { const _clearTimeout = clearTimeout; clearTimeout(state3.timeoutSetPaddingTop); state3.timeoutSetPaddingTop = undefined; } if (totalSize !== pendingTotalSize) { if (!closure_27) { if (state3.initialScroll) { if (pendingTotalSize < totalSize) { state3.pendingTotalSize = pendingTotalSize; } } } state3.pendingTotalSize = undefined; state3.totalSize = pendingTotalSize; set$(state, "totalSize", pendingTotalSize); updateContentMetricsState(state); } else { const values = state.values; if (values.get("totalSize") !== pendingTotalSize) { set$(state, "totalSize", pendingTotalSize); } } } state.scrollAdjustHandler.commitPendingAdjust(scrollingTo); if (!scrollingTo.isInitialScroll) { if (!state.initialScroll) { const state2 = state.state; const props = state2.props; let data; if (null != props) { data = props.data; } if (data) { const triggerCalculateItemsInView = state2.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; const obj = { forceFullItemPositions: true }; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(obj); } else { call(state2, obj); } } } checkThresholds(state); if (null != pendingScrollResolve) { pendingScrollResolve(); } } } const initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let tmp18 = scrollingTo.isInitialScroll && !state.clearPreservedInitialScrollOnNextFinish && state.props.data.length > 0; if (tmp18) { const initialScroll = state.initialScroll; let viewPosition; if (null != initialScroll) { viewPosition = initialScroll.viewPosition; } tmp18 = 1 === viewPosition; } const obj2 = { onFinished() { if (null != pendingScrollResolve) { tmp(); } }, preserveTarget: null, recalculateItems: true, schedulePreservedTargetClear: null, syncObservedOffset: null, waitForCompletionFrame: null }; let tmp22 = tmp20; if ("offset" === kind) { tmp22 = 0 === state.props.data.length; } if (!tmp22) { tmp22 = tmp18; } obj2.preserveTarget = tmp22; obj2.schedulePreservedTargetClear = tmp18; obj2.syncObservedOffset = "offset" === kind; obj2.waitForCompletionFrame = scrollingTo.waitForInitialScrollCompletionFrame; finishInitialScroll(state, obj2); } } function shouldFinishInitialScrollWithoutNativeProgress(state, scrollingTo) { if (scrollingTo.isInitialScroll) { if (!scrollingTo.animated) { if (state.didContainersLayout) { const initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("bootstrap" === kind) { return false; } else { let offset = scrollingTo.targetOffset; if (null == offset) { offset = scrollingTo.offset; } let result = closure_37.hasNonZeroTargetOffset(offset); if (result) { result = closure_36.didDispatchNativeScroll(state); } if (result) { result = !state.hasScrolled; } let tmp7 = !result; if (!result) { let isAtZeroTargetOffsetResult = obj.isAtZeroTargetOffset(offset); if (!isAtZeroTargetOffsetResult) { const _Math = Math; isAtZeroTargetOffsetResult = Math.abs(state.scroll - offset) > 1; } if (!isAtZeroTargetOffsetResult) { const _Math2 = Math; isAtZeroTargetOffsetResult = Math.abs(state.scrollPending - offset) > 1; } let tmp11 = !isAtZeroTargetOffsetResult; if (!isAtZeroTargetOffsetResult) { let prop = scrollingTo.waitForInitialScrollCompletionFrame; if (!prop) { value = obj.get(state); if (null != value) { const targetOffset = value.targetOffset; } const didFinishInitialScroll = state.didFinishInitialScroll; let result1 = !didFinishInitialScroll; if (!didFinishInitialScroll) { result1 = obj.hasNonZeroTargetOffset(targetOffset); } prop = result1; } tmp11 = prop; } tmp7 = tmp11; } return tmp7; } } } } return false; } function getResolvedScrollCompletionState(state, scrollingTo) { ({ scrollPending, scrollAdjustHandler } = state.state); const index = scrollingTo.index; let tmp2 = scrollingTo.index === state.state.props.data.length - 1; const adjust = scrollAdjustHandler.getAdjust(); if (tmp2) { tmp2 = 1 === scrollingTo.viewPosition; } if (tmp2) { let num = undefined !== index; if (num) { if (num) { num = state.state.positions[index]; } if (!num) { num = 0; } let targetOffset = calculateOffsetWithOffsetPosition(state, num, scrollingTo); } const state2 = state.state; const tmp12 = getContentSize(state); const _Number3 = Number; let bound1 = targetOffset; if (Number.isFinite(tmp12)) { const _Number4 = Number; bound1 = targetOffset; if (Number.isFinite(state2.scrollLength)) { bound1 = targetOffset; if (state2.lastLayout) { const _Math4 = Math; let viewOffset1; const bound = Math.max(0, tmp12 - state2.scrollLength); if (null != scrollingTo) { viewOffset1 = scrollingTo.viewOffset; } let num6 = 0; if (typeof viewOffset1 === "number") { num6 = 0; if (viewOffset1 < 0) { num6 = -viewOffset1; } } const _Math5 = Math; bound1 = Math.min(targetOffset, bound + num6); } } } const _Math6 = Math; const bound2 = Math.max(0, bound1); const state3 = state.state; const tmp11Result = getContentSize(state); const _Number5 = Number; let bound4 = scrollPending; if (Number.isFinite(tmp11Result)) { const _Number6 = Number; bound4 = scrollPending; if (Number.isFinite(state3.scrollLength)) { bound4 = scrollPending; if (state3.lastLayout) { const _Math7 = Math; let viewOffset2; const bound3 = Math.max(0, tmp11Result - state3.scrollLength); if (null != scrollingTo) { viewOffset2 = scrollingTo.viewOffset; } let num7 = 0; if (typeof viewOffset2 === "number") { num7 = 0; if (viewOffset2 < 0) { num7 = -viewOffset2; } } const _Math8 = Math; bound4 = Math.min(scrollPending, bound3 + num7); } } } const _Math9 = Math; const _Math10 = Math; const bound5 = Math.max(0, bound4); const _Math11 = Math; const absolute = Math.abs(scrollPending - bound2); const animated = scrollingTo.animated; flag = !animated; const absolute1 = Math.abs(scrollPending - (bound2 + adjust)); if (animated) { flag = false; } const obj = { clampedTargetOffset: bound2, isAtResolvedTarget: null }; const _Math12 = Math; let tmp27 = Math.abs(scrollPending - bound5) < 1; if (tmp27) { let tmp28 = absolute < 1; if (!tmp28) { if (flag) { flag = absolute1 < 1; } tmp28 = flag; } tmp27 = tmp28; } obj.isAtResolvedTarget = tmp27; return obj; } targetOffset = scrollingTo.targetOffset; if (null == targetOffset) { ({ viewOffset, offset } = scrollingTo); if (!viewOffset) { viewOffset = 0; } const diff = offset - viewOffset; state = state.state; const tmp5 = getContentSize(state); const _Number = Number; let bound7 = diff; if (Number.isFinite(tmp5)) { const _Number2 = Number; bound7 = diff; if (Number.isFinite(state.scrollLength)) { bound7 = diff; if (state.lastLayout) { const _Math = Math; let viewOffset3; const bound6 = Math.max(0, tmp5 - state.scrollLength); if (null != scrollingTo) { viewOffset3 = scrollingTo.viewOffset; } let num3 = 0; if (typeof viewOffset3 === "number") { num3 = 0; if (viewOffset3 < 0) { num3 = -viewOffset3; } } const _Math2 = Math; bound7 = Math.min(diff, bound6 + num3); } } } const _Math3 = Math; targetOffset = Math.max(0, bound7); } } function checkFinishedScrollFallback(state) { closure_0 = state; state = state.state; let scrollingTo = state.scrollingTo; const state2 = state.state; let scrollingTo2 = state2.scrollingTo; let isInitialScroll; if (null != scrollingTo2) { isInitialScroll = scrollingTo2.isInitialScroll; } let tmp2 = isInitialScroll; if (tmp2) { tmp2 = state2.props.data.length > 0; } if (tmp2) { tmp2 = getContentSize(state) <= state2.scrollLength; } if (tmp2) { tmp2 = state2.scrollPending <= 1; } let isInitialScroll1; if (null != scrollingTo) { isInitialScroll1 = scrollingTo.isInitialScroll; } let result = isInitialScroll1; if (result) { result = closure_36.didDispatchNativeScroll(state); } if (result) { result = !state.hasScrolled; } _classCallCheck = result; let tmp7 = undefined !== scrollingTo; if (tmp7) { tmp7 = shouldFinishInitialScrollWithoutNativeProgress(state, scrollingTo); } let isInitialScroll2; if (null != scrollingTo) { isInitialScroll2 = scrollingTo.isInitialScroll; } if (isInitialScroll2) { isInitialScroll2 = !tmp2; } if (isInitialScroll2) { isInitialScroll2 = !tmp7; } if (!isInitialScroll2) { isInitialScroll2 = !state.didContainersLayout; } let num5 = 0; if (!tmp2) { num5 = 0; if (!tmp7) { let num6 = 16; if (!result) { let num7 = 100; if (isInitialScroll2) { num7 = 500; } num6 = num7; } num5 = num6; } } state.timeoutCheckFinishedScrollFallback = setTimeout(() => { state = 0; function checkHasScrolled() { state.timeoutCheckFinishedScrollFallback = undefined; const scrollingTo = state.scrollingTo; if (scrollingTo) { state = state + 1; value = closure_37.get(tmp); if (null != value) { const targetOffset = value.targetOffset; } const didFinishInitialScroll = tmp.didFinishInitialScroll; result = !didFinishInitialScroll; if (!didFinishInitialScroll) { result = obj.hasNonZeroTargetOffset(targetOffset); } if (result) { result = !tmp.hasScrolled; } let num2 = 5; let num3 = 5; if (!result) { if (result) { num2 = 20; } num3 = num2; } state = state.state; const scrollingTo2 = state.scrollingTo; let isInitialScroll1; if (null != scrollingTo2) { isInitialScroll1 = scrollingTo2.isInitialScroll; } let tmp9 = isInitialScroll1; if (tmp9) { tmp9 = state.props.data.length > 0; } if (tmp9) { tmp9 = getContentSize(tmp7) <= state.scrollLength; } if (tmp9) { tmp9 = state.scrollPending <= 1; } const tmp14 = getResolvedScrollCompletionState(state, scrollingTo); let isAtResolvedTarget = tmp6; if (result) { isAtResolvedTarget = tmp14.isAtResolvedTarget; } if (isAtResolvedTarget) { isAtResolvedTarget = state >= 1; } let tmp16 = isAtResolvedTarget; if (isAtResolvedTarget) { tmp16 = !closure_36.didRetrySilentInitialScroll(tmp); } let hasScrolled = tmp.hasScrolled; if (hasScrolled) { const isInitialScroll = scrollingTo.isInitialScroll; let isAtResolvedTarget2 = !isInitialScroll; if (isInitialScroll) { isAtResolvedTarget2 = tmp14.isAtResolvedTarget; } hasScrolled = isAtResolvedTarget2; } let tmp18 = scrollingTo.isInitialScroll && !tmp14.isAtResolvedTarget; if (tmp18) { tmp18 = state <= num3; } if (tmp16) { const value3 = obj.get(tmp); let targetOffset1; if (null != value3) { targetOffset1 = value3.targetOffset; } if (null == targetOffset1) { targetOffset1 = scrollingTo.targetOffset; } let num11 = 0; if (null != targetOffset1) { num11 = targetOffset1; } const tmp31 = num11 >= 1 ? num11 - 1 : num11 + 1; const result1 = closure_36.markSilentInitialScrollRetry(tmp); const current2 = tmp7.state.refScroller.current; if (null != current2) { let num12 = 0; if (tmp7.state.props.horizontal) { num12 = tmp31; } let point = { animated: false, x: num12, y: null }; let num13 = 0; if (!tmp7.state.props.horizontal) { num13 = tmp31; } point.y = num13; current2.scrollTo(point); } const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(() => { current = num11.state.refScroller.current; if (null != current) { let num = 0; if (tmp.state.props.horizontal) { num = tmp2; } const point = { animated: false, x: num, y: null }; let num2 = 0; if (!tmp.state.props.horizontal) { num2 = tmp2; } point.y = num2; current.scrollTo(point); } }); const _setTimeout3 = setTimeout; tmp.timeoutCheckFinishedScrollFallback = setTimeout(checkHasScrolled, 16); } else { if (!tmp9) { if (!hasScrolled) { if (!tmp12) { if (!isAtResolvedTarget) { if (num3 >= state) { if (result) { if (state <= num3) { const value4 = obj.get(tmp); let targetOffset2; if (null != value4) { targetOffset2 = value4.targetOffset; } if (null == targetOffset2) { targetOffset2 = scrollingTo.targetOffset; } if (null == targetOffset2) { targetOffset2 = tmp.scrollPending; } current = tmp7.state.refScroller.current; if (null != current) { let num8 = 0; if (tmp7.state.props.horizontal) { num8 = targetOffset2; } const point1 = { animated: false, x: num8, y: null }; let num9 = 0; if (!tmp7.state.props.horizontal) { num9 = targetOffset2; } point1.y = num9; current.scrollTo(point1); } let num10 = 100; if (tmp6) { num10 = 16; } const _setTimeout2 = setTimeout; tmp.timeoutCheckFinishedScrollFallback = setTimeout(checkHasScrolled, num10); } } let num7 = 100; if (tmp6) { num7 = 16; } const _setTimeout = setTimeout; tmp.timeoutCheckFinishedScrollFallback = setTimeout(checkHasScrolled, num7); } } } } } finishScrollTo(tmp7); } tmp12 = shouldFinishInitialScrollWithoutNativeProgress(tmp, scrollingTo); } } checkHasScrolled(); }, num5); } function doMaintainScrollAtEnd(context) { const state = context.state; const refScroller = state.refScroller; const maintainScrollAtEnd = state.props.maintainScrollAtEnd; let values = context.values; ({ didContainersLayout, pendingNativeMVCPAdjust } = state); const tmp2 = values.get("isWithinMaintainScrollAtEndThreshold") && maintainScrollAtEnd && didContainersLayout; if (pendingNativeMVCPAdjust) { state.pendingMaintainScrollAtEnd = tmp2; return false; } else { state.pendingMaintainScrollAtEnd = false; if (tmp2) { if (getContentSize(context) < state.scrollLength) { state.scroll = 0; } if (state.maintainingScrollAtEnd) { state.pendingMaintainScrollAtEnd = true; } else { let str = "pending-instant"; if (maintainScrollAtEnd.animated) { str = "pending-animated"; } let str2 = "instant"; if (maintainScrollAtEnd.animated) { str2 = "animated"; } state.maintainingScrollAtEnd = str; const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(() => { values = values.values; if (values.get("isWithinMaintainScrollAtEndThreshold")) { tmp2.maintainingScrollAtEnd = str2; current = refScroller.current; if (tmp2.props.horizontal) { let props; if (null != tmp2) { props = tmp2.props; } let horizontal; if (null != props) { horizontal = props.horizontal; } let tmp9 = horizontal; if (tmp9) { let rtl; if (null != props) { rtl = props.rtl; } if (null == rtl) { rtl = get_ActivityIndicator.I18nManager.isRTL; } tmp9 = rtl; } if (tmp9) { const tmp14 = getContentSize(values); const _Number = Number; if (Number.isFinite(tmp14)) { const _Number2 = Number; if (Number.isFinite(tmp2.scrollLength)) { if (tmp14 > tmp2.scrollLength) { const _Math = Math; let bound = Math.max(0, tmp14 - tmp2.scrollLength); } if (null != current) { const point = { animated: maintainScrollAtEnd.animated, x: tmp18, y: 0 }; current.scrollTo(point); } } } const _Number3 = Number; let num2; if (Number.isFinite(tmp14)) { const _Number4 = Number; if (Number.isFinite(tmp2.scrollLength)) { num2 = 0; } } bound = num2; } let num4 = 0; if (maintainScrollAtEnd.animated) { num4 = 500; } const timerId = setTimeout(() => { if (state.maintainingScrollAtEnd === str2) { tmp.maintainingScrollAtEnd = undefined; if (tmp.pendingMaintainScrollAtEnd) { doMaintainScrollAtEnd(values); } } }, num4); } if (null != current) { const obj = { animated: maintainScrollAtEnd.animated }; current.scrollToEnd(obj); } } else if (tmp2.maintainingScrollAtEnd === str) { tmp2.maintainingScrollAtEnd = undefined; } }); } return true; } else { return false; } } const tmp = values.get("isWithinMaintainScrollAtEndThreshold") && maintainScrollAtEnd && didContainersLayout; } function requestAdjust(state, arg1, arg2) { closure_1 = arg1; state = state.state; if (Math.abs(arg1) > 0.1) { let tmp = !closure_27; if (!closure_27) { tmp = arg2; } if (tmp) { tmp = state.scroll <= arg1; } closure_3 = tmp; function doit() { if (closure_3) { const obj = { horizontal: state.props.horizontal, offset: state.scroll }; state = state.state; const offset = obj.offset; current = state.refScroller.current; if (current) { const horizontal = obj.horizontal; if (horizontal) { const tmp10 = getContentSize(tmp4); } const point = { animated: !tmp7, x: null, y: null }; let num3 = 0; if (horizontal) { num3 = tmp9(state, offset, tmp10); } point.x = num3; let num4 = 0; if (!horizontal) { num4 = offset; } point.y = num4; current.scrollTo(point); if (tmp6) { const result = closure_36.markInitialScrollNativeDispatch(state); } if (!!tmp7) { state.scroll = offset; checkFinishedScrollFallback(tmp4); } tmp9 = toNativeHorizontalOffset; } } else { const adjust = state.scrollAdjustHandler.requestAdjust(closure_1); if (state.adjustingFromInitialMount) { tmp.adjustingFromInitialMount = tmp.adjustingFromInitialMount - 1; } const scrollAdjustHandler = state.scrollAdjustHandler; } } state.scroll = state.scroll + arg1; state.scrollForNextCalculateItemsInView = undefined; const values = state.values; if (values.get("readyToRender")) { doit(); const diff = state.scroll - arg1 / 2; if (!state.ignoreScrollFromMVCP) { state.ignoreScrollFromMVCP = {}; } if (arg1 > 0) { state.ignoreScrollFromMVCP.lt = diff; } else { state.ignoreScrollFromMVCP.gt = diff; } if (state.ignoreScrollFromMVCPTimeout) { const _clearTimeout = clearTimeout; clearTimeout(state.ignoreScrollFromMVCPTimeout); } let num4 = 100; if (tmp) { num4 = 250; } const _setTimeout = setTimeout; state.ignoreScrollFromMVCPTimeout = setTimeout(() => { state.ignoreScrollFromMVCP = undefined; let ignoreScrollFromMVCPIgnored = state.ignoreScrollFromMVCPIgnored; if (ignoreScrollFromMVCPIgnored) { ignoreScrollFromMVCPIgnored = false !== tmp.scrollProcessingEnabled; } if (ignoreScrollFromMVCPIgnored) { tmp.ignoreScrollFromMVCPIgnored = false; ({ scroll: tmp.scrollPending, reprocessCurrentScroll } = tmp); if (null != reprocessCurrentScroll) { const call = reprocessCurrentScroll.call; if (typeof call === "unknown") { const result = reprocessCurrentScroll(); } else { call(tmp); } } } }, num4); } else { state.adjustingFromInitialMount = (state.adjustingFromInitialMount || 0) + 1; const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(doit); const tmp2 = state.adjustingFromInitialMount || 0; } } } function maybeApplyPredictedNativeMVCPAdjust(state) { state = state.state; const pendingNativeMVCPAdjust = state.pendingNativeMVCPAdjust; if (pendingNativeMVCPAdjust) { const _Math = Math; if (Math.abs(pendingNativeMVCPAdjust.manualApplied) <= c66) { const amount2 = pendingNativeMVCPAdjust.amount; const _Math9 = Math; if (Math.abs(amount2) <= tmp2) { const _Math7 = Math; if (Math.abs(0) > tmp2) { const amount = pendingNativeMVCPAdjust.amount; const _Math8 = Math; if (Math.abs(amount) > tmp2) { pendingNativeMVCPAdjust.manualApplied = amount; requestAdjust(state, amount, true); pendingNativeMVCPAdjust.furthestProgressTowardAmount = 0; } } } else { const _Math2 = Math; const diff = Math.max(0, tmp8 - state.scrollLength) - state.scroll; if (amount2 < 0) { const _Math5 = Math; const _Math6 = Math; let num = Math.max(amount2, Math.min(0, diff)); } else if (amount2 > 0) { const _Math3 = Math; const _Math4 = Math; num = Math.min(amount2, Math.max(0, diff)); } } tmp8 = getContentSize(state); } } } function prepareMVCP(state, arg1) { closure_1 = arg1; state = state.state; ({ idsInView, positions } = state); const maintainVisibleContentPosition = state.props.maintainVisibleContentPosition; let data = maintainVisibleContentPosition.data; ({ size, shouldRestorePosition: closure_7 } = maintainVisibleContentPosition); const timestamp = Date.now(); const scrollingTo = state.scrollingTo; const items = []; let index; if (null != scrollingTo) { index = scrollingTo.index; } let viewPosition; if (null != scrollingTo) { viewPosition = scrollingTo.viewPosition; } let tmp5 = tmp4; if (undefined !== index) { tmp5 = state.props.data.length > 0; } if (tmp5) { tmp5 = index >= state.props.data.length - 1; } if (tmp5) { let num4 = 0; if (null != viewPosition) { num4 = viewPosition; } tmp5 = num4 > 0; } closure_12 = tmp5; if (arg1) { size = data; } const indexByKey = state.indexByKey; const scroll = state.scroll; closure_15 = getContentSize(state); if (size) { if (state.pendingNativeMVCPAdjust) { if (undefined === index) { maybeApplyPredictedNativeMVCPAdjust(state); } } if (tmp4) { if (!closure_27) { let isInitialScroll; if (null != scrollingTo) { isInitialScroll = scrollingTo.isInitialScroll; } } ({ data: data2, keyExtractor } = state.props); let str = ""; if (data2) { let tmp11 = null; if (index < data2.length) { let keyExtractorResult = index; if (keyExtractor) { keyExtractorResult = keyExtractor(data2[index], index); } tmp11 = keyExtractorResult; } state.idCache[index] = tmp11; str = tmp11; } let found = str; let tmp7 = str; } else { if (tmp6) { found = idsInView.find((item) => undefined !== indexByKey.get(item)); tmp7 = found; } tmp6 = idsInView.length > 0 && state.didContainersLayout && !arg1; } if (arg1) { if (idsInView.length > 0) { if (state.didContainersLayout) { for (let num6 = 0; num6 < idsInView.length; num6 = num6 + 1) { let tmp13 = idsInView[num6]; value = indexByKey.get(tmp13); if (undefined !== value) { let tmp16 = positions[value]; if (undefined !== tmp16) { let obj = { id: tmp13, position: tmp16 }; let arr = items.push(obj); } } } } } } if (undefined !== tmp7) { value2 = indexByKey.get(tmp7); if (undefined !== value2) { closure_2 = positions[value2]; } } return () => { let position; let tmp16; data = state.props.data; let tmp = closure_1; if (closure_1) { tmp = data; } if (tmp) { tmp = undefined === index; } if (tmp) { flag = true; if (undefined !== found) { value = indexByKey.get(tmp3); let tmp6 = undefined === value; if (!tmp6) { tmp6 = undefined === positions[value]; } flag = tmp6; } tmp = flag; } let num = 0; if (tmp) { let num3 = 0; num = 0; if (0 < items.length) { do { let tmp9 = items[num3]; position = tmp9.position; let value4 = indexByKey.get(tmp9.id); let tmp12 = undefined !== value4; if (tmp12) { let sum = num3 + 1; num3 = sum; num = 0; } tmp16 = undefined; if (tmp12) { tmp16 = positions[value4]; } } while (undefined === tmp16); num = tmp16 - position; } } let tmp20 = num; if (undefined !== found) { let diff1 = closure_2; tmp20 = num; if (undefined !== closure_2) { const value5 = indexByKey.get(tmp19); let tmp22; if (undefined !== value5) { tmp22 = positions[value5]; } tmp20 = num; if (undefined !== tmp22) { const tmp64 = getContentSize(state); const diff = tmp22 - diff1; if (0 !== diff) { if (closure_12) { diff1 = state; if (state.scroll + state.scrollLength > tmp64) { if (diff <= 0) { const _Math = Math; const bound = Math.max(0, tmp64 - diff1.scrollLength); diff1.scroll = bound; diff1.scrollPending = bound; } } const _Math2 = Math; diff1 = tmp64 - diff1.scroll - diff1.scrollLength; const num4 = Math.max(0, diff1); } } } } } let sum1 = tmp20; if (viewPosition) { sum1 = tmp20; if (tmp28 > 0) { const tmp36 = getItemSize(state, tmp19, index, state.props.data[index]); if (null != scrollingTo) { const itemSize = tmp37.itemSize; } sum1 = tmp20; if (undefined !== tmp36) { sum1 = tmp20; if (undefined !== itemSize) { sum1 = tmp20; if (tmp36 !== itemSize) { const diff2 = tmp36 - itemSize; sum1 = tmp20; if (0 !== diff2) { sum1 = tmp20 + diff2 * tmp28; tmp37.itemSize = tmp36; } } } } } } let tmp40 = closure_1; let tmp45 = !closure_1; if (closure_1) { tmp45 = !tmp41.props.maintainVisibleContentPosition.data; } if (!tmp45) { tmp45 = undefined !== tmp44; } if (!tmp45) { tmp45 = sum1 >= -0.1; } let tmp46 = !tmp45; if (!tmp45) { const _Math3 = Math; const diff3 = tmp42 - tmp43 - tmp41.scrollLength; tmp46 = diff3 < Math.abs(sum1) - c66; } if (tmp46) { const obj = { amount: sum1, furthestProgressTowardAmount: 0, manualApplied: 0, startScroll: tmp43 }; tmp41.pendingNativeMVCPAdjust = obj; maybeApplyPredictedNativeMVCPAdjust(state); } else { const _Math4 = Math; if (Math.abs(sum1) > c66) { let value6 = "pending-animated" === tmp41.maintainingScrollAtEnd; if (!value6) { value6 = "animated" === tmp41.maintainingScrollAtEnd; } if (value6) { const values = state.values; value6 = values.get("isWithinMaintainScrollAtEndThreshold"); } if (!value6) { if (tmp40) { tmp40 = data; } requestAdjust(state, sum1, tmp40); } } } tmp42 = closure_15; tmp44 = index; }; } } function updateScroll(context, scroll, arg2, markHasScrolled) { const state = context.state; ({ ignoreScrollFromMVCP, lastScrollAdjustForHistory, scrollAdjustHandler, scrollHistory, scrollingTo, scroll } = state); markHasScrolled = undefined; if (null != markHasScrolled) { markHasScrolled = markHasScrolled.markHasScrolled; } if (false !== markHasScrolled) { state.hasScrolled = true; } const timestamp = Date.now(); state.lastBatchingAction = timestamp; const adjust = scrollAdjustHandler.getAdjust(); let tmp4 = undefined !== lastScrollAdjustForHistory; if (tmp4) { const _Math = Math; tmp4 = Math.abs(adjust - lastScrollAdjustForHistory) > 0.1; } if (tmp4) { scrollHistory.length = 0; } state.lastScrollAdjustForHistory = adjust; let tmp6 = tmp5; if (undefined === scrollingTo) { tmp6 = 0 === scrollHistory.length && scroll === state.scroll; const tmp7 = 0 === scrollHistory.length && scroll === state.scroll; } if (!tmp6) { tmp6 = tmp4; } if (!tmp6) { const obj = { scroll, time: timestamp }; scrollHistory.push(obj); } if (scrollHistory.length > 5) { scrollHistory.shift(); } if (ignoreScrollFromMVCP) { if (!scrollingTo) { ({ lt, gt } = ignoreScrollFromMVCP); state.ignoreScrollFromMVCPIgnored = true; } } state.scrollPrev = scroll; state.scrollPrevTime = state.scrollTime; state.scroll = scroll; state.scrollTime = timestamp; const absolute = Math.abs(scroll - scroll); let prop; if (null != markHasScrolled) { prop = markHasScrolled.fromNativeScrollEvent; } if (prop) { if (absolute > 0.1) { if (!tmp4) { if (undefined === scrollingTo) { if (!state.pendingNativeMVCPAdjust) { let state2 = scroll - scroll; const state3 = context.state; let str = "prepared"; if ("prepared" === state3.edgeReachedGate) { str = "end"; if (state2 < 0) { str = "start"; } state3.edgeReachedGate = "closed"; state2 = context.state; if ("start" !== str) { state2.isEndReached = false; state2.endReachedSnapshot = undefined; } } state2.isStartReached = false; state2.startReachedSnapshot = undefined; } } } } } const state4 = context.state; const pendingNativeMVCPAdjust = state4.pendingNativeMVCPAdjust; let flag3 = false; if (pendingNativeMVCPAdjust) { const diff = pendingNativeMVCPAdjust.amount - pendingNativeMVCPAdjust.manualApplied; const diff1 = scroll - (pendingNativeMVCPAdjust.startScroll + pendingNativeMVCPAdjust.manualApplied); let tmp18 = tmp17; if (diff < 0) { tmp18 = diff1 > c66; } if (!tmp18) { let tmp20 = diff > 0; if (tmp20) { tmp20 = diff1 < -0.1; } tmp18 = tmp20; } let tmp21 = diff1; if (diff < 0) { tmp21 = -diff1; } const _Math2 = Math; if (Math.abs(diff) <= c66) { state4.pendingNativeMVCPAdjust = undefined; flag3 = true; } else if (tmp18) { state4.pendingNativeMVCPAdjust = undefined; flag3 = false; } else { const _Math3 = Math; const sum = tmp21 + tmp22; if (sum >= Math.abs(diff)) { context.state.pendingNativeMVCPAdjust = undefined; const diff2 = diff - diff1; const _Math5 = Math; flag3 = true; if (Math.abs(diff2) > tmp22) { requestAdjust(context, diff2, true); flag3 = true; } } else { const _Math8 = Math; const _Math9 = Math; if (Math.abs(scroll - Math.max(0, getContentSize(context) - state4.scrollLength)) > 1) { if (state4.pendingMaintainScrollAtEnd) { const values = context.values; if (values.get("isWithinMaintainScrollAtEndThreshold")) { flag3 = flag4; } } if (tmp21 > pendingNativeMVCPAdjust.furthestProgressTowardAmount + tmp22) { pendingNativeMVCPAdjust.furthestProgressTowardAmount = tmp21; flag4 = false; } else { flag4 = pendingNativeMVCPAdjust.furthestProgressTowardAmount > tmp22 && tmp21 < pendingNativeMVCPAdjust.furthestProgressTowardAmount - tmp22; if (flag4) { state4.pendingNativeMVCPAdjust = undefined; flag4 = false; } } } context.state.pendingNativeMVCPAdjust = undefined; const diff3 = diff - diff1; const _Math4 = Math; flag4 = true; if (Math.abs(diff3) > tmp22) { requestAdjust(context, diff3, true); flag4 = true; } } } } const scrollLength = state.scrollLength; const tmp31 = getScrollVelocity(state); const state5 = context.state; const adaptiveRender = state5.props.adaptiveRender; const values2 = context.values; let onChange = "adaptiveRender"; value = values2.get("adaptiveRender"); const values3 = context.values; if (values3.get("readyToRender")) { if (adaptiveRender) { const enterVelocity = adaptiveRender.enterVelocity; const exitVelocity = adaptiveRender.exitVelocity; const exitDelay = adaptiveRender.exitDelay; let num10 = 250; if (null != exitDelay) { num10 = exitDelay; } if (tmp30) { let str6 = "light"; } else { const _Math6 = Math; str6 = "normal"; } let str7 = "normal"; if (undefined === state5.timeoutAdaptiveRender) { str7 = value; } if (str6 !== str7) { if ("light" === str6) { let adaptiveRender2 = context.values; if (adaptiveRender2.get(onChange) !== "light") { set$(context, onChange, "light"); adaptiveRender2 = context.state.props.adaptiveRender; onChange = undefined; if (null != adaptiveRender2) { onChange = adaptiveRender2.onChange; } if (null != onChange) { let call = onChange.call; if (typeof call !== "unknown") { call(adaptiveRender2, "light", "scroll"); } } onChange("light", "scroll"); } scheduleAdaptiveRenderExit(context, num10); } else if (tmp36) { scheduleAdaptiveRenderExit(context, num10); } } } else { resetAdaptiveRender(context); } } const scrollLastCalculate = state.scrollLastCalculate; if (!state.dataChangeNeedsScrollUpdate) { if (!flag3) { if (undefined === tmp12) { if (!arg2) { if (undefined !== scrollLastCalculate) { const _Math7 = Math; } } } } } state.scrollLastCalculate = state.scroll; state.ignoreScrollFromMVCPIgnored = false; state.lastScrollDelta = absolute; if (scrollLength > 0 && undefined === scrollingTo && absolute > scrollLength && !state.pendingNativeMVCPAdjust) { state.mvcpAnchorLock = undefined; state.pendingNativeMVCPAdjust = undefined; const obj2 = { keys: null }; const _Set = Set; set = new Set(); obj2.keys = set; state.userScrollAnchorReset = obj2; if (undefined !== state.queuedMVCPRecalculate) { const _cancelAnimationFrame = cancelAnimationFrame; cancelAnimationFrame(state.queuedMVCPRecalculate); state.queuedMVCPRecalculate = undefined; } const obj3 = { doMVCP: tmp5, scrollVelocity: tmp31 }; if (tmp30) { obj3.drawDistanceMode = "visible-first"; } const triggerCalculateItemsInView2 = state.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView2) { const call3 = triggerCalculateItemsInView2.call; if (typeof call3 === "unknown") { let result = triggerCalculateItemsInView2(obj3); } else { call3(state, obj3); } } checkThresholds(context, tmp12); const state6 = context.state; if (!tmp56) { const _requestAnimationFrame = requestAnimationFrame; state6.queuedFullDrawDistancePrewarm = requestAnimationFrame(() => { state6.queuedFullDrawDistancePrewarm = undefined; const triggerCalculateItemsInView = state6.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(); } else { call(state6); } } }); } tmp56 = state6.props.drawDistance <= 50 || undefined !== state6.queuedFullDrawDistancePrewarm; } else { const obj4 = { doMVCP: tmp5, scrollVelocity: tmp31 }; if (tmp30) { obj4.drawDistanceMode = "visible-first"; } let triggerCalculateItemsInView = state.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call2 = triggerCalculateItemsInView.call; if (typeof call2 === "unknown") { const result1 = triggerCalculateItemsInView(obj4); } else { call2(state, obj4); } } checkThresholds(context, tmp12); } let prop1 = state.pendingMaintainScrollAtEnd; if (!prop1) { const maintainScrollAtEnd = state.props.maintainScrollAtEnd; let onDataChange; if (null != maintainScrollAtEnd) { onDataChange = maintainScrollAtEnd.onDataChange; } prop1 = onDataChange; } if (flag3) { flag3 = prop1; } if (flag3) { state.pendingMaintainScrollAtEnd = false; doMaintainScrollAtEnd(context); } state.dataChangeNeedsScrollUpdate = false; state.lastScrollDelta = 0; } function getItemBottom(state, bound5) { if (undefined !== state.state.positions[bound5]) { let tmp3Result; if (undefined !== bound5) { if (bound5 >= 0) { state = state.state; ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp4 = null; if (bound5 < data.length) { let keyExtractorResult = bound5; if (keyExtractor) { keyExtractorResult = keyExtractor(data[bound5], bound5); } tmp4 = keyExtractorResult; } state.idCache[bound5] = tmp4; str = tmp4; } tmp3Result = getItemSize(state, str, bound5, state.state.props.data[bound5]); } } let num2 = 0; if (null != tmp3Result) { num2 = tmp3Result; } const _Number = Number; let num3 = 0; if (Number.isFinite(num2)) { num3 = num2; } return tmp + num3; } } function scrollTo(state, arg1) { let diff1; let sum; state = state.state; ({ noScrollingTo, forceScroll } = arg1); const tmp2 = _objectWithoutProperties(arg1, closure_5); ({ animated, isInitialScroll, offset, precomputedWithViewOffset, waitForInitialScrollCompletionFrame } = tmp2); if (state.animFrameCheckFinishedScroll) { const _cancelAnimationFrame = cancelAnimationFrame; cancelAnimationFrame(state.state.animFrameCheckFinishedScroll); } if (state.timeoutCheckFinishedScrollFallback) { const _clearTimeout = clearTimeout; clearTimeout(state.state.timeoutCheckFinishedScrollFallback); } let tmp7 = offset; if (!precomputedWithViewOffset) { tmp7 = calculateOffsetWithOffsetPosition(state, offset, tmp2); } let tmp9 = isInitialScroll; if (tmp9) { const initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } tmp9 = "offset" === kind; } const state2 = state.state; const tmp12 = getContentSize(state); let bound1 = tmp7; if (Number.isFinite(tmp12)) { const _Number = Number; bound1 = tmp7; if (Number.isFinite(state2.scrollLength)) { bound1 = tmp7; if (state2.lastLayout) { const _Math = Math; let viewOffset; const bound = Math.max(0, tmp12 - state2.scrollLength); if (null != tmp2) { viewOffset = tmp2.viewOffset; } let num2 = 0; if (typeof viewOffset === "number") { num2 = 0; if (viewOffset < 0) { num2 = -viewOffset; } } const _Math2 = Math; bound1 = Math.min(tmp7, bound + num2); } } } const bound2 = Math.max(0, bound1); let tmp18 = bound2; if (tmp9) { tmp18 = tmp7; } state.scrollHistory.length = 0; if (!noScrollingTo) { if (isInitialScroll) { closure_36.resetFlags(state); } const _Object = Object; let tmp21; if (0 !== Object.keys(state.averageSizes).length) { const obj = {}; tmp21 = obj; const keys = Object.keys(); if (keys !== undefined) { tmp21 = obj; while (keys[tmp] !== undefined) { obj[tmp23] = state.averageSizes[tmp23].avg; continue; } } } const obj2 = {}; const merged = Object.assign(tmp2); if (tmp21) { const obj3 = { averageSizeSnapshot: tmp21 }; let obj4 = obj3; } else { obj4 = {}; } const merged1 = Object.assign(obj4); obj2.targetOffset = bound2; obj2.waitForInitialScrollCompletionFrame = waitForInitialScrollCompletionFrame; state.scrollingTo = obj2; if (!isInitialScroll) { const index = tmp2.index; const state3 = state.state; let tmp30; if (0 !== state3.props.data.length) { const _Math7 = Math; const bound3 = Math.max(0, bound2); const _Math8 = Math; const bound4 = Math.max(bound3, bound2 + state3.scrollLength); if (undefined !== index) { const _Math4 = Math; const _Math5 = Math; let bound5 = Math.max(0, Math.min(length - 1, index)); } else { const state4 = state.state; let diff = state4.props.data.length - 1; let num5 = 0; if (0 <= diff) { do { let _Math3 = Math; let rounded = Math.floor((num5 + diff) / 2); let tmp35 = state4.positions[rounded]; if (undefined === tmp35) { diff1 = rounded - 1; sum = num5; let tmp41 = tmp32; } else if (tmp35 <= bound3) { sum = rounded + 1; diff1 = diff; tmp41 = rounded; } else { diff1 = rounded - 1; sum = num5; tmp41 = tmp32; } diff = diff1; num5 = sum; tmp32 = tmp41; bound5 = tmp41; } while (sum <= diff1); } } if (undefined !== bound5) { if (tmp87) { if (undefined === state3.positions[bound5]) { const obj5 = { end: bound5, start: bound5 }; tmp30 = obj5; } } if (undefined !== index) { let diff2 = bound5; let tmp45 = bound5; if (bound5 > 0) { tmp45 = diff2; while (undefined !== state3.positions[diff2]) { tmp45 = diff2; if (tmp46 <= bound3) { break; } else { tmp45 = diff2; if (undefined === state3.positions[diff2 - 1]) { break; } else { diff2 = diff2 - 1; tmp45 = diff2; if (diff2 <= 0) { break; } } } } } let diff3 = tmp45; let tmp49 = tmp45; if (tmp45 > 0) { const tmp51 = getItemBottom(state, diff3 - 1); tmp49 = diff3; while (undefined !== tmp51) { tmp49 = diff3; if (tmp51 <= bound3) { break; } else { diff3 = diff3 - 1; tmp49 = diff3; if (diff3 <= 0) { break; } } } } let tmp53 = tmp49; let tmp54 = tmp49; if (tmp49 + 1 < length) { tmp54 = tmp53; while (undefined !== state3.positions[tmp53 + 1]) { tmp54 = tmp53; if (tmp55 > bound4) { break; } else { let sum1 = tmp53 + 1; tmp53 = sum1; tmp54 = sum1; if (sum1 + 1 >= length) { break; } } } } const obj6 = { end: tmp54, start: tmp49 }; tmp30 = obj6; } else { const tmp43 = getItemBottom(state, bound5); } } } const state5 = state.state; if (tmp30) { state5.scrollTargetPinnedRange = tmp30; state.state.scrollForNextCalculateItemsInView = undefined; } else { state5.scrollTargetPinnedRange = undefined; } } } state.scrollPending = bound2; value = closure_37.get(state); const didFinishInitialScroll = state.didFinishInitialScroll; let result = !didFinishInitialScroll; if (!didFinishInitialScroll) { let tmp60 = isInitialScroll; if (!isInitialScroll) { tmp60 = value; } result = tmp60; } if (result) { result = obj7.hasNonZeroTargetOffset(bound2); } const didFinishInitialScroll2 = state.didFinishInitialScroll; let isAtZeroTargetOffsetResult = !didFinishInitialScroll2; if (!didFinishInitialScroll2) { isAtZeroTargetOffsetResult = value; } if (isAtZeroTargetOffsetResult) { isAtZeroTargetOffsetResult = obj7.isAtZeroTargetOffset(tmp18); } if (result) { state.hasScrolled = false; let startScroll; if (null != value) { startScroll = value.startScroll; } if (null == startScroll) { startScroll = state.scroll; } const obj8 = { startScroll, targetOffset: bound2 }; const result1 = obj7.set(state, obj8); } else if (isAtZeroTargetOffsetResult) { obj7.clear(state); } let tmp66 = !isInitialScroll; if (!isInitialScroll) { tmp66 = !noScrollingTo; } if (tmp66) { const _Math6 = Math; tmp66 = Math.abs(state.scroll - bound2) > 1; } if (tmp66) { if (animated) { if (state.scrollTargetPinnedRange) { const triggerCalculateItemsInView = state.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; if (typeof call === "unknown") { const result2 = triggerCalculateItemsInView(); } else { call(state); } } } } else { updateScroll(state, bound2, true, { markHasScrolled: false }); } } const state6 = state.state; current = state6.refScroller.current; if (current) { const horizontal = state.props.horizontal; if (horizontal) { const tmp76 = getContentSize(state); } const point = { animated: !tmp73, x: null, y: null }; let num10 = 0; if (horizontal) { num10 = tmp75(state6, tmp18, tmp76); } point.x = num10; let num11 = 0; if (!horizontal) { num11 = tmp18; } point.y = num11; current.scrollTo(point); if (isInitialScroll) { const result3 = closure_36.markInitialScrollNativeDispatch(state6); } if (!!tmp73) { state6.scroll = tmp18; checkFinishedScrollFallback(state); } tmp75 = toNativeHorizontalOffset; } } function scrollToIndex(state, animated) { ({ index, viewOffset } = animated); if (viewOffset === undefined) { viewOffset = 0; } flag = animated.animated; if (flag === undefined) { flag = true; } let num = animated.viewPosition; state = state.state; const data1 = state.props.data; if (data1.length <= 0) { let tmp5Result; if (undefined !== -1) { if (-1 >= 0) { const state2 = state.state; ({ data, keyExtractor } = state2.props); let str = ""; if (data) { let tmp6 = null; if (-1 < data.length) { let num4 = -1; if (keyExtractor) { num4 = keyExtractor(data[-1], -1); } tmp6 = num4; } state2.idCache[-1] = tmp6; str = tmp6; } tmp5Result = getItemSize(state, str, -1, state.state.props.data[-1]); } } if (tmp10) { num = 1; } state.scrollForNextCalculateItemsInView = undefined; const obj = { animated: flag, forceScroll: tmp, index: -1, isInitialScroll: tmp2, itemSize: tmp5Result, offset: undefined !== -1 && state.state.positions[-1] || 0, viewOffset, viewPosition: null }; let num8 = 0; if (null != num) { num8 = num; } obj.viewPosition = num8; scrollTo(state, obj); } else if (index >= length) { const num2 = length - 1; } } function dispatchInitialScroll(state, target) { target = target.target; const index = target.index; let num; ({ forceScroll, resolvedOffset, waitForCompletionFrame } = target); if (undefined !== index) { if (state.state.props.data.length <= 0) { num = -1; } else if (index >= length) { const num4 = length - 1; } } const obj = { animated: false, forceScroll, index: null, isInitialScroll: true, itemSize: null, offset: null, precomputedWithViewOffset: true, viewOffset: null, viewPosition: null, waitForInitialScrollCompletionFrame: null }; let tmp3; if (undefined !== num) { if (num >= 0) { tmp3 = num; } } obj.index = tmp3; let tmp5Result; if (undefined !== num) { if (num >= 0) { state = state.state; ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp6 = null; if (num < data.length) { let keyExtractorResult = num; if (keyExtractor) { keyExtractorResult = keyExtractor(data[num], num); } tmp6 = keyExtractorResult; } state.idCache[num] = tmp6; str = tmp6; } tmp5Result = getItemSize(state, str, num, state.state.props.data[num]); } } obj.itemSize = tmp5Result; obj.offset = resolvedOffset; ({ viewOffset: obj.viewOffset, viewPosition: obj.viewPosition } = target); obj.waitForInitialScrollCompletionFrame = waitForCompletionFrame; scrollTo(state, obj); } function resolveInitialScrollOffset(context, initialScroll) { const initialScrollSession = context.state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("offset" === kind) { const contentOffset = initialScroll.contentOffset; let num3 = 0; if (null != contentOffset) { num3 = contentOffset; } let bound2 = num3; } else { let num = 0; if (undefined !== initialScroll.index) { const index = initialScroll.index; num = undefined !== index && context.state.positions[index] || 0; const tmp2 = undefined !== index && context.state.positions[index] || 0; } const tmp11Result = calculateOffsetWithOffsetPosition(context, num, initialScroll); const state = context.state; const tmp5 = getContentSize(context); const _Number = Number; let bound1 = tmp11Result; if (Number.isFinite(tmp5)) { const _Number2 = Number; bound1 = tmp11Result; if (Number.isFinite(state.scrollLength)) { bound1 = tmp11Result; if (state.lastLayout) { const _Math = Math; let viewOffset; const bound = Math.max(0, tmp5 - state.scrollLength); if (null != initialScroll) { viewOffset = initialScroll.viewOffset; } let num2 = 0; if (typeof viewOffset === "number") { num2 = 0; if (viewOffset < 0) { num2 = -viewOffset; } } const _Math2 = Math; bound1 = Math.min(tmp11Result, bound + num2); } } } const _Math3 = Math; bound2 = Math.max(0, bound1); } return bound2; } function advanceCurrentInitialScrollSession(context, forceScroll) { const initialScrollSession = context.state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("offset" === kind) { if (null != forceScroll) { let forceScroll2 = forceScroll.forceScroll; } const state3 = context.state; ({ scrollingTo: scrollingTo2, initialScroll: initialScroll3 } = state3); let isInitialScroll; ({ didFinishInitialScroll, queuedInitialLayout: queuedInitialLayout2 } = state3); if (null != scrollingTo2) { isInitialScroll = scrollingTo2.isInitialScroll; } // // eliminated: always false let tmp33; if (initialScroll3) { if (!flag5) { if (!didFinishInitialScroll) { if (!scrollingTo2) { const obj2 = { initialScroll: initialScroll3, isInitialScrollInProgress: tmp32, queuedInitialLayout: queuedInitialLayout2, scrollingTo: scrollingTo2 }; tmp33 = obj2; } } } } let flag6 = false; if (tmp33) { const initialScroll4 = tmp33.initialScroll; const contentOffset = initialScroll4.contentOffset; let num8 = 0; if (null != contentOffset) { num8 = contentOffset; } const _Math5 = Math; let tmp35 = Math.abs(state3.scroll - num8) <= 1; if (tmp35) { const _Math6 = Math; tmp35 = Math.abs(state3.scrollPending - num8) <= 1; } if (!forceScroll2) { let queuedInitialLayout1 = state3.lastLayout && state3.scrollLength > 0; if (null == forceScroll2) { if (!queuedInitialLayout1) { queuedInitialLayout1 = tmp33.queuedInitialLayout; } forceScroll2 = queuedInitialLayout1; } const obj3 = { forceScroll: forceScroll2, resolvedOffset: num8, target: initialScroll4 }; dispatchInitialScroll(context, obj3); flag6 = true; } else { flag6 = false; } } let flag3 = flag6; } else { if (null != forceScroll) { forceScroll = forceScroll.forceScroll; } const state = context.state; ({ queuedInitialLayout, scrollingTo, initialScroll } = state); let isInitialScroll1; if (null != scrollingTo) { isInitialScroll1 = scrollingTo.isInitialScroll; } flag2 = true; if (flag2) { flag2 = !queuedInitialLayout; } if (flag2) { flag2 = !tmp4; } let tmp5; if (initialScroll) { if (!flag2) { if (!state.didFinishInitialScroll) { if (!scrollingTo) { const obj = { initialScroll, isInitialScrollInProgress: tmp4, queuedInitialLayout, scrollingTo }; tmp5 = obj; } } } } flag3 = false; if (tmp5) { ({ initialScroll: initialScroll2, isInitialScrollInProgress } = tmp5); let scrollingTo1; if (isInitialScrollInProgress) { scrollingTo1 = tmp5.scrollingTo; } const tmp8 = resolveInitialScrollOffset(context, initialScroll2); let tmp9; if (scrollingTo1) { let offset = scrollingTo1.targetOffset; if (null == offset) { offset = scrollingTo1.offset; } tmp9 = offset; } let tmp10 = undefined === initialScroll2.contentOffset; if (!tmp10) { const _Math = Math; tmp10 = Math.abs(initialScroll2.contentOffset - tmp8) > 1; } let tmp12 = undefined !== tmp9; let tmp13 = tmp12; if (tmp12) { const _Math2 = Math; tmp13 = Math.abs(tmp9 - tmp8) > 1; } if (tmp12) { const _Math3 = Math; tmp12 = Math.abs(state.scroll - tmp8) <= 1; } if (tmp12) { const _Math4 = Math; tmp12 = Math.abs(state.scrollPending - tmp8) <= 1; } let num6 = !forceScroll; if (!forceScroll) { num6 = !tmp10; } if (num6) { num6 = isInitialScrollInProgress; } if (num6) { num6 = !tmp13; } if (!num6) { let tmp17 = forceScroll; if (forceScroll) { tmp17 = tmp12; } num6 = tmp17; } if (!num6) { let tmp18 = tmp10; if (tmp10) { const initialScrollSession2 = state.initialScrollSession; let kind1; if (null != initialScrollSession2) { kind1 = initialScrollSession2.kind; } tmp18 = "offset" !== kind1; } if (tmp18) { const obj4 = {}; const merged = Object.assign(initialScroll2); obj4.contentOffset = tmp8; const state2 = context.state; state2.clearPreservedInitialScrollOnNextFinish = undefined; if (undefined !== state2.timeoutPreservedInitialScrollClear) { const _clearTimeout = clearTimeout; clearTimeout(state2.timeoutPreservedInitialScrollClear); state2.timeoutPreservedInitialScrollClear = undefined; } state2.initialScroll = obj4; const initialScrollSession3 = state2.initialScrollSession; let kind2; if (null != initialScrollSession3) { kind2 = initialScrollSession3.kind; } let str = "bootstrap"; if ("offset" === kind2) { str = "offset"; } const obj5 = { kind: str }; setInitialScrollSession(state2, obj5); } if (null == forceScroll) { let queuedInitialLayout3 = tmp5.queuedInitialLayout; if (!queuedInitialLayout3) { if (isInitialScrollInProgress) { isInitialScrollInProgress = tmp10; } queuedInitialLayout3 = isInitialScrollInProgress; } forceScroll = queuedInitialLayout3; } const obj6 = { forceScroll, resolvedOffset: tmp8, target: initialScroll2 }; dispatchInitialScroll(context, obj6); num6 = 0; } flag3 = !num6; } const tmp3 = !isInitialScroll1; } return flag3; } function checkAllSizesKnown(state, startBuffered, endBuffered) { if (null != startBuffered) { if (null != endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { flag = false; const containerItemKeys = state.containerItemKeys; const keys = containerItemKeys.keys(); for (const item10007 of keys) { let indexByKey = arg0.indexByKey; value = indexByKey.get(item10007); let tmp3 = value; if (undefined !== value) { if (tmp3 >= arg1) { if (tmp3 <= arg2) { flag = true; let tmp8 = getId(arg0, tmp3); if (undefined !== tmp8) { let sizesKnown = arg0.sizesKnown; } obj.return(); return false; } } } continue; } return flag; } } } } return false; } function abortBootstrapRevealIfNeeded(state, maxFrames) { maxFrames = maxFrames.maxFrames; let num = 8; if (undefined !== maxFrames) { num = maxFrames; } const maxPasses = maxFrames.maxPasses; let num2 = 24; if (undefined !== maxPasses) { num2 = maxPasses; } flag = maxFrames.mountFrameCount >= num || maxFrames.passCount >= num2; if (flag) { if (closure_31) { const _console = console; console.warn("LegendList bootstrap initial scroll aborted after exceeding convergence bounds."); } state = state.state; const initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = state.initialScrollSession.bootstrap; } const initialScroll = state.initialScroll; if (bootstrap) { if (initialScroll) { const initialScrollSession2 = state.initialScrollSession; let kind1; if (null != initialScrollSession2) { kind1 = initialScrollSession2.kind; } if ("offset" !== kind1) { if (state.refScroller.current) { const initialScrollSession3 = state.initialScrollSession; let kind2; if (null != initialScrollSession3) { kind2 = initialScrollSession3.kind; } let bootstrap1; if ("bootstrap" === kind2) { bootstrap1 = state.initialScrollSession.bootstrap; } let frameHandle; if (null != bootstrap1) { frameHandle = bootstrap1.frameHandle; } let tmp13 = undefined !== frameHandle; if (tmp13) { const _cancelAnimationFrame = cancelAnimationFrame; tmp13 = typeof cancelAnimationFrame === "function"; } if (tmp13) { const _cancelAnimationFrame2 = cancelAnimationFrame; cancelAnimationFrame(frameHandle); } if (bootstrap1) { bootstrap1.frameHandle = undefined; } const initialScrollSession4 = state.initialScrollSession; let kind3; if (null != initialScrollSession4) { kind3 = initialScrollSession4.kind; } const obj = { bootstrap: null, kind: kind3 }; setInitialScrollSession(state, obj); const obj2 = { forceScroll: true, resolvedOffset: bootstrap.scroll, target: initialScroll, waitForCompletionFrame: false }; dispatchInitialScroll(state, obj2); flag = true; } } } } const initialScrollSession5 = state.initialScrollSession; let kind4; if (null != initialScrollSession5) { kind4 = initialScrollSession5.kind; } let bootstrap2; if ("bootstrap" === kind4) { bootstrap2 = state.initialScrollSession.bootstrap; } let scroll; if (null != bootstrap2) { scroll = bootstrap2.scroll; } if (null == scroll) { scroll = state.scrollPending; } if (null == scroll) { scroll = state.scroll; } let num5 = 0; if (null != scroll) { num5 = scroll; } const state2 = state.state; const initialScrollSession6 = state2.initialScrollSession; let kind5; if (null != initialScrollSession6) { kind5 = initialScrollSession6.kind; } let bootstrap3; if ("bootstrap" === kind5) { bootstrap3 = state2.initialScrollSession.bootstrap; } let frameHandle1; if (null != bootstrap3) { frameHandle1 = bootstrap3.frameHandle; } let tmp28 = undefined !== frameHandle1; if (tmp28) { const _cancelAnimationFrame3 = cancelAnimationFrame; tmp28 = typeof cancelAnimationFrame === "function"; } if (tmp28) { const _cancelAnimationFrame4 = cancelAnimationFrame; cancelAnimationFrame(frameHandle1); } if (bootstrap3) { bootstrap3.frameHandle = undefined; } const initialScrollSession7 = state2.initialScrollSession; let kind6; if (null != initialScrollSession7) { kind6 = initialScrollSession7.kind; } const obj3 = { bootstrap: null, kind: kind6 }; setInitialScrollSession(state2, obj3); const clearPreservedInitialScrollOnNextFinish = state2.clearPreservedInitialScrollOnNextFinish; let tmp35 = !clearPreservedInitialScrollOnNextFinish; if (!clearPreservedInitialScrollOnNextFinish) { tmp35 = state2.props.data.length > 0; } if (tmp35) { const initialScroll2 = state2.initialScroll; let viewPosition; if (null != initialScroll2) { viewPosition = initialScroll2.viewPosition; } tmp35 = 1 === viewPosition; } const obj4 = { preserveTarget: tmp35, recalculateItems: true, resolvedOffset: num5, schedulePreservedTargetClear: tmp35 }; finishInitialScroll(state, obj4); flag = true; } return flag; } function startBootstrapInitialScrollSession(state, scroll) { const initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = state.initialScrollSession.bootstrap; } let frameHandle; if (null != bootstrap) { frameHandle = bootstrap.frameHandle; } const obj = { frameHandle, mountFrameCount: null, passCount: 0, previousResolvedOffset: "a", scroll: "PX_16", seedContentOffset: "Array", targetIndexSeed: 0, visibleIndices: false }; let mountFrameCount; if (null != bootstrap) { mountFrameCount = bootstrap.mountFrameCount; } let num = 0; if (null != mountFrameCount) { num = mountFrameCount; } obj.mountFrameCount = num; ({ scroll: obj.scroll, seedContentOffset } = scroll); if (null == seedContentOffset) { let seedContentOffset1; if (null != bootstrap) { seedContentOffset1 = bootstrap.seedContentOffset; } seedContentOffset = seedContentOffset1; } if (null == seedContentOffset) { seedContentOffset = scroll.scroll; } obj.seedContentOffset = seedContentOffset; obj.targetIndexSeed = scroll.targetIndexSeed; setInitialScrollSession(state, { bootstrap: obj, kind: "bootstrap" }); } function rearmBootstrapInitialScroll(context, scroll) { let state = context.state; const initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = state.initialScrollSession.bootstrap; } if (bootstrap) { bootstrap.passCount = 0; bootstrap.previousResolvedOffset = undefined; scroll = scroll.scroll; if (null == scroll) { scroll = bootstrap.scroll; } bootstrap.scroll = scroll; let seedContentOffset = scroll.seedContentOffset; if (null == seedContentOffset) { seedContentOffset = bootstrap.seedContentOffset; } bootstrap.seedContentOffset = seedContentOffset; let targetIndexSeed = scroll.targetIndexSeed; if (null == targetIndexSeed) { targetIndexSeed = bootstrap.targetIndexSeed; } bootstrap.targetIndexSeed = targetIndexSeed; bootstrap.visibleIndices = undefined; const obj = { bootstrap, kind: "bootstrap" }; setInitialScrollSession(state, obj); } else if (undefined !== scroll.scroll) { ({ scroll: obj2.scroll, seedContentOffset: obj2.seedContentOffset, targetIndexSeed: obj2.targetIndexSeed } = scroll); startBootstrapInitialScrollSession(state, { scroll: null, seedContentOffset: null, targetIndexSeed: null }); const obj3 = { scroll: null, seedContentOffset: null, targetIndexSeed: null }; } state = context; const state2 = context.state; const initialScrollSession2 = state2.initialScrollSession; let kind1; if (null != initialScrollSession2) { kind1 = initialScrollSession2.kind; } let bootstrap1; if ("bootstrap" === kind1) { bootstrap1 = state2.initialScrollSession.bootstrap; } if (bootstrap1) { if (undefined === bootstrap1.frameHandle) { const _requestAnimationFrame = requestAnimationFrame; bootstrap1.frameHandle = requestAnimationFrame(() => { const initialScrollSession = state4.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = state4.initialScrollSession.bootstrap; } if (bootstrap) { bootstrap.frameHandle = undefined; bootstrap.mountFrameCount = bootstrap.mountFrameCount + 1; const obj = { mountFrameCount: null, passCount: null }; ({ mountFrameCount: obj.mountFrameCount, passCount: obj.passCount } = bootstrap); if (!abortBootstrapRevealIfNeeded(closure_0, obj)) { closure_0 = tmp5; state = tmp5.state; const initialScrollSession2 = state.initialScrollSession; let kind1; if (null != initialScrollSession2) { kind1 = initialScrollSession2.kind; } let bootstrap1; if ("bootstrap" === kind1) { bootstrap1 = state.initialScrollSession.bootstrap; } if (bootstrap1) { if (undefined === bootstrap1.frameHandle) { const _requestAnimationFrame = requestAnimationFrame; bootstrap1.frameHandle = requestAnimationFrame(() => { const initialScrollSession = state4.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = state4.initialScrollSession.bootstrap; } if (bootstrap) { bootstrap.frameHandle = undefined; bootstrap.mountFrameCount = bootstrap.mountFrameCount + 1; const obj = { mountFrameCount: null, passCount: null }; ({ mountFrameCount: obj.mountFrameCount, passCount: obj.passCount } = bootstrap); if (!abortBootstrapRevealIfNeeded(closure_0, obj)) { closure_0 = tmp5; state = tmp5.state; const initialScrollSession2 = state.initialScrollSession; let kind1; if (null != initialScrollSession2) { kind1 = initialScrollSession2.kind; } let bootstrap1; if ("bootstrap" === kind1) { bootstrap1 = state.initialScrollSession.bootstrap; } if (bootstrap1) { if (undefined === bootstrap1.frameHandle) { const _requestAnimationFrame = requestAnimationFrame; bootstrap1.frameHandle = requestAnimationFrame(() => { const initialScrollSession = state4.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = state4.initialScrollSession.bootstrap; } if (bootstrap) { bootstrap.frameHandle = undefined; bootstrap.mountFrameCount = bootstrap.mountFrameCount + 1; const obj = { mountFrameCount: null, passCount: null }; ({ mountFrameCount: obj.mountFrameCount, passCount: obj.passCount } = bootstrap); if (!abortBootstrapRevealIfNeeded(closure_0, obj)) { closure_0 = tmp5; state = tmp5.state; const initialScrollSession2 = state.initialScrollSession; let kind1; if (null != initialScrollSession2) { kind1 = initialScrollSession2.kind; } let bootstrap1; if ("bootstrap" === kind1) { bootstrap1 = state.initialScrollSession.bootstrap; } if (bootstrap1) { if (undefined === bootstrap1.frameHandle) { const _requestAnimationFrame = requestAnimationFrame; bootstrap1.frameHandle = requestAnimationFrame(() => { const initialScrollSession = state4.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = state4.initialScrollSession.bootstrap; } if (bootstrap) { bootstrap.frameHandle = undefined; bootstrap.mountFrameCount = bootstrap.mountFrameCount + 1; const obj = { mountFrameCount: null, passCount: null }; ({ mountFrameCount: obj.mountFrameCount, passCount: obj.passCount } = bootstrap); if (!abortBootstrapRevealIfNeeded(closure_0, obj)) { closure_0 = tmp5; state = tmp5.state; const initialScrollSession2 = state.initialScrollSession; let kind1; if (null != initialScrollSession2) { kind1 = initialScrollSession2.kind; } let bootstrap1; if ("bootstrap" === kind1) { bootstrap1 = state.initialScrollSession.bootstrap; } if (bootstrap1) { if (undefined === bootstrap1.frameHandle) { const _requestAnimationFrame = requestAnimationFrame; bootstrap1.frameHandle = requestAnimationFrame(() => { ... }); } } } } }); } } } } }); } } } } }); } } } } }); } } state = context.state; const animationFrame = requestAnimationFrame(() => { const initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = tmp.initialScrollSession.bootstrap; } if (bootstrap) { const triggerCalculateItemsInView = tmp.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; const obj = { forceFullItemPositions: true }; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(obj); } else { call(tmp, obj); } } } }); } function clearPendingInitialScrollFooterLayout(context, target) { target = target.target; let prop; ({ dataLength, stylePaddingBottom } = target); if (null != target) { prop = target.preserveForFooterLayout; } if (prop) { const obj = { contentOffset: "Array", index: true, preserveForBottomPadding: null, preserveForFooterLayout: null, viewOffset: 1, viewPosition: 190 }; const _Math = Math; obj.index = Math.max(0, dataLength - 1); obj.preserveForFooterLayout = undefined; obj.viewOffset = -stylePaddingBottom; const state = context.state; state.clearPreservedInitialScrollOnNextFinish = undefined; if (undefined !== state.timeoutPreservedInitialScrollClear) { const _clearTimeout = clearTimeout; clearTimeout(state.timeoutPreservedInitialScrollClear); state.timeoutPreservedInitialScrollClear = undefined; } state.initialScroll = obj; const initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let str = "bootstrap"; if ("offset" === kind) { str = "offset"; } const obj2 = { kind: str }; setInitialScrollSession(state, obj2); } } function didFinishedInitialScrollMoveAwayFromTarget(context, initialScroll) { const state = context.state; if (state.didFinishInitialScroll) { current = state.refScroller.current; let prop; if (null != current) { prop = current.getCurrentScrollOffset; } if (null == prop) { if (typeof undefined !== "number") { let scroll = state.scrollPending; if (null == scroll) { scroll = state.scroll; } let num2 = 0; if (null != scroll) { num2 = scroll; } const tmp4 = num2; } else { const _Number = Number; } const _Math = Math; return Math.abs(tmp4 - resolveInitialScrollOffset(context, initialScroll)) > num; } else { const call = prop.call; typeof call === "unknown" ? prop() : call(current); } } else { return false; } } function getPreservedEndAnchorOffsetDiff(context) { const state = context.state; const initialScroll = state.initialScroll; if (state.didFinishInitialScroll) { const scrollingTo = state.scrollingTo; let isInitialScroll; if (null != scrollingTo) { isInitialScroll = scrollingTo.isInitialScroll; } if (!isInitialScroll) { if (initialScroll) { if (1 === initialScroll.viewPosition) { if (0 !== state.props.data.length) { const initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("offset" !== kind) { if (typeof state.lastNativeScroll === "number") { const _Number = Number; if (Number.isFinite(state.lastNativeScroll)) { let lastNativeScroll = state.lastNativeScroll; } return resolveInitialScrollOffset(context, initialScroll) - lastNativeScroll; } current = state.refScroller.current; let prop; if (null != current) { prop = current.getCurrentScrollOffset; } if (null == prop) { if (typeof lastNativeScroll !== "number") { let scroll = state.scrollPending; if (null == scroll) { scroll = state.scroll; } let num2 = 0; if (null != scroll) { num2 = scroll; } lastNativeScroll = num2; } else { const _Number2 = Number; } } else { const call = prop.call; typeof call === "unknown" ? prop() : call(current); } } } } } } } } function evaluateBootstrapInitialScroll(state) { state = state.state; let initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = state.initialScrollSession.bootstrap; } const initialScroll = state.initialScroll; if (bootstrap) { if (initialScroll) { const initialScrollSession2 = state.initialScrollSession; let kind1; if (null != initialScrollSession2) { kind1 = initialScrollSession2.kind; } if ("offset" !== kind1) { const scrollingTo = state.scrollingTo; let isInitialScroll; if (null != scrollingTo) { isInitialScroll = scrollingTo.isInitialScroll; } if (!isInitialScroll) { bootstrap.passCount = bootstrap.passCount + 1; let obj = { mountFrameCount: null, passCount: null }; ({ mountFrameCount: obj.mountFrameCount, passCount: obj.passCount } = bootstrap); if (!abortBootstrapRevealIfNeeded(state, obj)) { if (tmp6) { bootstrap.targetIndexSeed = undefined; } const tmp8 = resolveInitialScrollOffset(state, initialScroll); const _Math = Math; const data1 = state.props.data; const positions = state.positions; let targetIndexSeed = bootstrap.targetIndexSeed; const tmp10 = checkAllSizesKnown(state, state.startBuffered, state.endBuffered); tmp6 = undefined !== initialScroll.index && state.startBuffered >= 0 && state.endBuffered >= 0 && initialScroll.index >= state.startBuffered && initialScroll.index <= state.endBuffered; if (null == targetIndexSeed) { let startBuffered; if (state.startBuffered >= 0) { startBuffered = state.startBuffered; } targetIndexSeed = startBuffered; } const sum = tmp8 + state.scrollLength; let num3 = 0; if (undefined !== targetIndexSeed) { const _Math2 = Math; const _Math3 = Math; num3 = Math.max(0, Math.min(length - 1, targetIndexSeed)); } let tmp15 = num3; let sum1 = num3; if (num3 > 0) { while (true) { let diff = tmp15 - 1; let tmp18 = positions[diff]; if (undefined !== tmp18) { let tmp22 = state.idCache[diff]; if (null == tmp22) { ({ data, keyExtractor } = state.props); let str3 = ""; if (data) { let tmp20 = null; if (diff < data.length) { let keyExtractorResult = diff; if (keyExtractor) { keyExtractorResult = keyExtractor(data[diff], diff); } tmp20 = keyExtractorResult; } state.idCache[diff] = tmp20; str3 = tmp20; } tmp22 = str3; } let sizes = state.sizes; value = sizes.get(tmp22); if (null == value) { value = getItemSize(state, tmp24, diff, data1[diff]); } if (undefined !== value) { sum1 = tmp15; if (tmp18 + value <= tmp8) { break; } } break; } tmp15 = diff; sum1 = diff; if (0 >= diff) { break; } } } const items = []; if (sum1 < data1.length) { while (true) { let tmp29 = positions[sum1]; if (undefined !== tmp29) { let tmp33 = state.idCache[sum1]; if (null == tmp33) { ({ data: data2, keyExtractor: keyExtractor2 } = state.props); let str4 = ""; if (data2) { let tmp31 = null; if (sum1 < data2.length) { let keyExtractor2Result = sum1; if (keyExtractor2) { keyExtractor2Result = keyExtractor2(data2[sum1], sum1); } tmp31 = keyExtractor2Result; } state.idCache[sum1] = tmp31; str4 = tmp31; } tmp33 = str4; } let sizes2 = state.sizes; value2 = sizes2.get(tmp33); if (null == value2) { value2 = getItemSize(state, tmp35, tmp30, data1[sum1]); } if (undefined !== value2) { if (tmp29 < sum) { if (tmp29 + value2 > tmp8) { let arr = items.push(sum1); } } if (items.length > 0) { if (tmp29 >= sum) { break; } } break; } } sum1 = sum1 + 1; if (sum1 >= length) { break; } } } const tmp12 = Math.abs(bootstrap.scroll - tmp8) > 1; ({ previousResolvedOffset, visibleIndices } = bootstrap); bootstrap.previousResolvedOffset = tmp8; bootstrap.visibleIndices = items; if (tmp12) { bootstrap.scroll = tmp8; const _requestAnimationFrame2 = requestAnimationFrame; const animationFrame = requestAnimationFrame(() => { const initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = tmp.initialScrollSession.bootstrap; } if (bootstrap) { const triggerCalculateItemsInView = tmp.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; const obj = { forceFullItemPositions: true }; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(obj); } else { call(tmp, obj); } } } }); } else if (tmp10) { if (tmp41) { if (undefined !== previousResolvedOffset) { const _Math4 = Math; if (Math.abs(previousResolvedOffset - tmp8) <= 1) { flag = false; if (visibleIndices) { flag = false; if (visibleIndices.length === items.length) { let num6 = 0; flag = true; if (0 < visibleIndices.length) { flag = false; while (visibleIndices[num6] === items[num6]) { let sum2 = num6 + 1; num6 = sum2; flag = true; if (sum2 >= visibleIndices.length) { break; } } } } } if (flag) { const initialScrollSession3 = state.initialScrollSession; let kind2; if (null != initialScrollSession3) { kind2 = initialScrollSession3.kind; } let bootstrap1; if ("bootstrap" === kind2) { bootstrap1 = state.initialScrollSession.bootstrap; } let frameHandle; if (null != bootstrap1) { frameHandle = bootstrap1.frameHandle; } let tmp48 = undefined !== frameHandle; if (tmp48) { const _cancelAnimationFrame = cancelAnimationFrame; tmp48 = typeof cancelAnimationFrame === "function"; } if (tmp48) { const _cancelAnimationFrame2 = cancelAnimationFrame; cancelAnimationFrame(frameHandle); } if (bootstrap1) { bootstrap1.frameHandle = undefined; } const initialScrollSession4 = state.initialScrollSession; let kind3; if (null != initialScrollSession4) { kind3 = initialScrollSession4.kind; } const obj2 = { bootstrap: null, kind: kind3 }; setInitialScrollSession(state, obj2); const obj3 = { forceScroll: true, resolvedOffset: tmp8, target: initialScroll, waitForCompletionFrame: false }; dispatchInitialScroll(state, obj3); } } } const _requestAnimationFrame = requestAnimationFrame; const animationFrame1 = requestAnimationFrame(() => { const initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = tmp.initialScrollSession.bootstrap; } if (bootstrap) { const triggerCalculateItemsInView = tmp.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; const obj = { forceFullItemPositions: true }; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(obj); } else { call(tmp, obj); } } } }); } } tmp41 = items.length > 0 && items.every((item) => { let tmp2 = state.idCache[item]; if (null == tmp2) { ({ data, keyExtractor } = tmp.props); let str = ""; if (data) { let tmp3 = null; if (item < data.length) { let keyExtractorResult = item; if (keyExtractor) { keyExtractorResult = keyExtractor(data[item], item); } tmp3 = keyExtractorResult; } tmp.idCache[item] = tmp3; str = tmp3; } tmp2 = str; } const sizesKnown = tmp.sizesKnown; return sizesKnown.has(tmp2); }); } } } } } } function retargetActiveInitialScrollAtEnd(context) { const state = context.state; const initialScroll = state.initialScroll; if (state.didFinishInitialScroll) { flag = false; if (undefined !== getPreservedEndAnchorOffsetDiff(context)) { const preservedEndAnchorCorrection = {}; closure_0 = context; const state2 = context.state; state2.preservedEndAnchorCorrection = preservedEndAnchorCorrection; const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(() => { const preservedEndAnchorCorrection = state3.preservedEndAnchorCorrection; if (preservedEndAnchorCorrection === obj4) { const tmp10 = getPreservedEndAnchorOffsetDiff(closure_0); if (undefined !== tmp10) { const _Math = Math; if (Math.abs(tmp10) > 1) { const lastRequestTime = preservedEndAnchorCorrection.lastRequestTime; let tmp4 = !lastRequestTime; if (lastRequestTime) { const lastNativeScrollTime = tmp.lastNativeScrollTime; let num = 0; if (null != lastNativeScrollTime) { num = lastNativeScrollTime; } tmp4 = num > preservedEndAnchorCorrection.lastRequestTime; } if (tmp4) { const _Date = Date; preservedEndAnchorCorrection.lastRequestTime = Date.now(); requestAdjust(tmp9, tmp10); } closure_0 = tmp9; closure_1 = tmp2; state = tmp9.state; state.preservedEndAnchorCorrection = tmp2; const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(() => { const preservedEndAnchorCorrection = state3.preservedEndAnchorCorrection; if (preservedEndAnchorCorrection === obj4) { const tmp10 = getPreservedEndAnchorOffsetDiff(closure_0); if (undefined !== tmp10) { const _Math = Math; if (Math.abs(tmp10) > 1) { const lastRequestTime = preservedEndAnchorCorrection.lastRequestTime; let tmp4 = !lastRequestTime; if (lastRequestTime) { const lastNativeScrollTime = tmp.lastNativeScrollTime; let num = 0; if (null != lastNativeScrollTime) { num = lastNativeScrollTime; } tmp4 = num > preservedEndAnchorCorrection.lastRequestTime; } if (tmp4) { const _Date = Date; preservedEndAnchorCorrection.lastRequestTime = Date.now(); requestAdjust(tmp9, tmp10); } closure_0 = tmp9; closure_1 = tmp2; state = tmp9.state; state.preservedEndAnchorCorrection = tmp2; const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(() => { const preservedEndAnchorCorrection = state3.preservedEndAnchorCorrection; if (preservedEndAnchorCorrection === obj4) { const tmp10 = getPreservedEndAnchorOffsetDiff(closure_0); if (undefined !== tmp10) { const _Math = Math; if (Math.abs(tmp10) > 1) { const lastRequestTime = preservedEndAnchorCorrection.lastRequestTime; let tmp4 = !lastRequestTime; if (lastRequestTime) { const lastNativeScrollTime = tmp.lastNativeScrollTime; let num = 0; if (null != lastNativeScrollTime) { num = lastNativeScrollTime; } tmp4 = num > preservedEndAnchorCorrection.lastRequestTime; } if (tmp4) { const _Date = Date; preservedEndAnchorCorrection.lastRequestTime = Date.now(); requestAdjust(tmp9, tmp10); } closure_0 = tmp9; closure_1 = tmp2; state = tmp9.state; state.preservedEndAnchorCorrection = tmp2; const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(() => { const preservedEndAnchorCorrection = state3.preservedEndAnchorCorrection; if (preservedEndAnchorCorrection === obj4) { const tmp10 = getPreservedEndAnchorOffsetDiff(closure_0); if (undefined !== tmp10) { const _Math = Math; if (Math.abs(tmp10) > 1) { const lastRequestTime = preservedEndAnchorCorrection.lastRequestTime; let tmp4 = !lastRequestTime; if (lastRequestTime) { const lastNativeScrollTime = tmp.lastNativeScrollTime; let num = 0; if (null != lastNativeScrollTime) { num = lastNativeScrollTime; } tmp4 = num > preservedEndAnchorCorrection.lastRequestTime; } if (tmp4) { const _Date = Date; preservedEndAnchorCorrection.lastRequestTime = Date.now(); requestAdjust(tmp9, tmp10); } closure_0 = tmp9; closure_1 = tmp2; state = tmp9.state; state.preservedEndAnchorCorrection = tmp2; const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(() => { ... }); } } tmp.preservedEndAnchorCorrection = undefined; } }); } } tmp.preservedEndAnchorCorrection = undefined; } }); } } tmp.preservedEndAnchorCorrection = undefined; } }); } } tmp.preservedEndAnchorCorrection = undefined; } }); flag = true; } let tmp4 = flag; } else { let tmp = !initialScroll; if (initialScroll) { const initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } tmp = "offset" === kind; } if (!tmp) { tmp = 1 !== initialScroll.viewPosition; } if (!tmp) { tmp = 0 === state.props.data.length; } tmp4 = !tmp; if (!tmp) { tmp4 = advanceCurrentInitialScrollSession(context, { forceScroll: true }); } } return tmp4; } function resetLayoutCachesForDataChange(indexByKey) { indexByKey = indexByKey.indexByKey; indexByKey.clear(); indexByKey.idCache.length = 0; indexByKey.positions.length = 0; indexByKey.columns.length = 0; indexByKey.columnSpans.length = 0; } function scheduleContainerLayout(measureInLayoutEffect, c0) { const pendingContainerIds = measureInLayoutEffect.pendingContainerIds; if (undefined === c0) { measureInLayoutEffect.pendingContainerIds = null; } else if (null !== pendingContainerIds) { if (pendingContainerIds) { if (typeof c0 === "number") { pendingContainerIds.add(c0); set = pendingContainerIds; } else { const tmp23 = c0[Symbol.iterator](); set = pendingContainerIds; while (tmp23 !== undefined) { let addResult1 = pendingContainerIds.add(tmp7); continue; } } } else if (typeof c0 === "number") { const _Set = Set; const items = [c0]; set = new Set(items); } else { const _Set2 = Set; set = new Set(c0); } measureInLayoutEffect.pendingContainerIds = set; } if (undefined === measureInLayoutEffect.pendingContainerIds) { const tmp14 = peek$(measureInLayoutEffect, "containerLayoutEpoch"); let num2 = 0; if (null != tmp14) { num2 = tmp14; } set$(measureInLayoutEffect, "containerLayoutEpoch", num2 + 1); } } function syncMountedContainer(state, arg1, data, updateLayout) { state = state.state; ({ data, itemsAreEqual, keyExtractor } = state.props); if (undefined === data[data]) { return { didChangePosition: false, didRefreshData: false }; } else { let tmp7 = state.idCache[data]; if (null == tmp7) { ({ data: data2, keyExtractor: keyExtractor2 } = state.props); let str = ""; if (data2) { let tmp5 = null; if (data < data2.length) { let keyExtractor2Result = data; if (keyExtractor2) { keyExtractor2Result = keyExtractor2(data2[data], data); } tmp5 = keyExtractor2Result; } state.idCache[data] = tmp5; str = tmp5; } tmp7 = str; } updateLayout = updateLayout.updateLayout; flag = false; if (tmp9) { let num = tmp3[data]; if (undefined === num) { const _HermesInternal14 = HermesInternal; set$(state, "containerPosition" + arg1, c32); return { didChangePosition: false, didRefreshData: false }; } else { if (!num) { num = 0; } const scrollAdjustPending = updateLayout.scrollAdjustPending; let num3 = 0; if (null != scrollAdjustPending) { num3 = scrollAdjustPending; } const diff = num - num3; const sizes = state.sizes; value = sizes.get(tmp7); if (null == value) { value = getItemSize(state, tmp7, data, tmp4); } const values = state.values; const value7 = values.get("totalSize"); let props; if (null != state) { props = state.props; } let horizontal; if (null != props) { horizontal = props.horizontal; } let tmp21 = horizontal; if (tmp21) { let rtl; if (null != props) { rtl = props.rtl; } if (null == rtl) { rtl = get_ActivityIndicator.I18nManager.isRTL; } tmp21 = rtl; } let bound = diff; if (tmp21) { bound = diff; if (undefined !== value7) { const _Number = Number; bound = diff; if (Number.isFinite(value7)) { const _Math = Math; bound = Math.max(0, value7 - diff - value); } } } const _HermesInternal = HermesInternal; const values2 = state.values; const _HermesInternal2 = HermesInternal; const value8 = values2.get("containerPosition" + arg1); const values3 = state.values; const _HermesInternal3 = HermesInternal; const value9 = values3.get("containerColumn" + arg1); const values4 = state.values; let tmp33 = bound > c32; const value10 = values4.get("containerSpan" + arg1); if (tmp33) { tmp33 = bound !== value8; } flag2 = false; if (tmp33) { const _HermesInternal4 = HermesInternal; set$(state, "containerPosition" + arg1, bound); flag2 = true; } if (tmp36) { const _HermesInternal5 = HermesInternal; set$(state, "containerColumn" + arg1, tmp26); } flag = flag2; if ((tmp2[data] || 1) !== value10) { const _HermesInternal6 = HermesInternal; set$(state, "containerSpan" + arg1, tmp27); flag = flag2; } tmp36 = (tmp[data] || 1) >= 0 && (tmp[data] || 1) !== value9; } } const _HermesInternal7 = HermesInternal; const values5 = state.values; if (values5.get("containerItemIndex" + arg1) !== data) { const _HermesInternal8 = HermesInternal; set$(state, "containerItemIndex" + arg1, data); } const _HermesInternal9 = HermesInternal; const values6 = state.values; const value11 = values6.get("containerItemData" + arg1); let flag3 = false; if (value11 !== tmp4) { const pendingDataComparison3 = state.pendingDataComparison; let previousData; if (null != pendingDataComparison3) { previousData = pendingDataComparison3.previousData; } let prop; if (previousData === state.previousData) { const pendingDataComparison = state.pendingDataComparison; let nextData; if (null != pendingDataComparison) { nextData = pendingDataComparison.nextData; } if (nextData === data) { prop = state.pendingDataComparison; } } let tmp48; if (null != prop) { tmp48 = prop.byIndex[data]; } let num7 = 0; if (null != tmp48) { num7 = tmp48; } let num8 = 2; if (2 === num7) { const _HermesInternal13 = HermesInternal; set$(state, "containerItemData" + arg1, tmp4); flag3 = true; } else { flag3 = false; if (1 !== num7) { const _HermesInternal15 = HermesInternal; const values7 = state.values; const value12 = values7.get("containerItemKey" + arg1); if (null != value12) { tmp7 = value12; } if (null != keyExtractor) { const keyExtractorResult = keyExtractor(value11, data); } if (undefined !== value11) { if (keyExtractor) { if (keyExtractorResult === tmp7) { if (itemsAreEqual) { const itemsAreEqualResult = itemsAreEqual(value11, tmp4, data, data); if (!tmp59) { if (state.previousData) { const obj = { byIndex: [], nextData: data, previousData: state.previousData }; state.pendingDataComparison = obj; } } const pendingDataComparison2 = state.pendingDataComparison; let byIndex; if (null != pendingDataComparison2) { byIndex = pendingDataComparison2.byIndex; } if (byIndex) { if (itemsAreEqualResult) { num8 = 1; } state.pendingDataComparison.byIndex[data] = num8; } flag3 = false; if (!itemsAreEqualResult) { const _HermesInternal12 = HermesInternal; set$(state, "containerItemData" + arg1, tmp4); flag3 = true; } tmp59 = state.pendingDataComparison && state.pendingDataComparison.previousData === state.previousData && state.pendingDataComparison.nextData === data; } else { const _HermesInternal11 = HermesInternal; set$(state, "containerItemData" + arg1, tmp4); flag3 = true; } } } } const _HermesInternal10 = HermesInternal; set$(state, "containerItemData" + arg1, tmp4); flag3 = true; } } } const obj2 = { didChangePosition: flag, didRefreshData: flag3 }; return obj2; } } function updateItemPositions(context, arg1) { let obj = arg2; if (arg2 === undefined) { obj = { doMVCP: false, forceFullUpdate: false, optimizeForVisibleWindow: false, scrollBottomBuffered: -1, startIndex: 0 }; } ({ doMVCP, forceFullUpdate } = obj); if (forceFullUpdate === undefined) { forceFullUpdate = false; } flag = obj.optimizeForVisibleWindow; if (flag === undefined) { flag = false; } ({ scrollVelocity, startIndex } = obj); const state = context.state; ({ columns, columnSpans, indexByKey, positions, sizesKnown, props } = state); ({ data, overrideItemLayout } = props); const values = context.values; value = values.get("numColumns"); let num = 1; if (null != value) { num = value; } if (closure_31) { const _Map = Map; map = new Map(); } const values2 = context.values; const value7 = values2.get("extraData"); if (overrideItemLayout) { const obj2 = { span: 1 }; } if (null == scrollVelocity) { scrollVelocity = getScrollVelocity(state); } let tmp11 = !forceFullUpdate; if (!forceFullUpdate) { tmp11 = !arg1; } if (tmp11) { if (!flag) { const _Math = Math; flag = Math.abs(scrollVelocity) > 0; } if (!flag) { flag = false; } tmp11 = flag; } let tmp14 = !doMVCP; const sum = obj.scrollBottomBuffered + 1000; if (doMVCP) { tmp14 = arg1; } if (!tmp14) { tmp14 = 0 !== state.scrollAdjustHandler.getAdjust(); const scrollAdjustHandler = state.scrollAdjustHandler; } if (!tmp14) { const values3 = context.values; const value8 = values3.get("scrollAdjustPending"); let num2 = 0; if (null != value8) { num2 = value8; } tmp14 = 0 !== num2; } if (arg1) { columnSpans.length = 0; } if (num <= 1) { if (columns.length) { columns.length = 0; } if (columnSpans.length) { columnSpans.length = 0; } } let num3 = 0; let tmp16 = startIndex; if (startIndex > 0) { if (tmp5) { ({ state: state2, values: values4 } = context); const value9 = values4.get("numColumns"); if (1 === state2.columns[startIndex]) { let num6 = 0; if (startIndex > 0) { const diff = startIndex - 1; let num7 = 0; if (null != state2.positions[diff]) { num7 = tmp37; } if (value9 <= 1) { const _Math5 = Math; let bound = Math.max(0, diff); } else { const _Math4 = Math; let bound1 = Math.max(0, diff); bound = bound1; if (bound1 > 0) { bound = bound1; while (1 !== state2.columns[bound1]) { bound1 = bound1 - 1; bound = bound1; if (bound1 <= 0) { break; } } } } const state3 = context.state; let num8 = 0; if (diff >= bound) { const data1 = state3.props.data; num8 = 0; if (data1) { let num9 = 0; let num10 = 0; while (bound <= diff) { let tmp45 = num9; if (bound >= 0) { tmp45 = num9; if (bound < data1.length) { let flag4 = true; let tmp49 = getItemSize(context, state3.idCache[bound], tmp43, data1[bound], true); tmp45 = num9; if (tmp49 > num9) { tmp45 = tmp49; } } } bound = bound + 1; num9 = tmp45; num10 = tmp45; } num8 = num10; } } num6 = num7 + num8; } num3 = num6; tmp16 = startIndex; } else if (value9 <= 1) { const _Math3 = Math; let bound2 = Math.max(0, startIndex); } else { const _Math2 = Math; let bound3 = Math.max(0, startIndex); bound2 = bound3; if (bound3 > 0) { bound2 = bound3; while (1 !== state2.columns[bound3]) { bound3 = bound3 - 1; bound2 = bound3; if (bound3 <= 0) { break; } } } } } else { num3 = 0; tmp16 = startIndex; if (startIndex < length) { const diff1 = startIndex - 1; ({ data: data2, keyExtractor } = state.props); let str2 = ""; if (data2) { let tmp18 = null; if (diff1 < data2.length) { let keyExtractorResult = diff1; if (keyExtractor) { keyExtractorResult = keyExtractor(data2[diff1], diff1); } tmp18 = keyExtractorResult; } state.idCache[diff1] = tmp18; str2 = tmp18; } let num4 = 0; if (null != positions[diff1]) { num4 = tmp20; } let value10 = sizesKnown.get(str2); if (null == value10) { value10 = getItemSize(context, str2, diff1, data[diff1], true, tmp14, false); } num3 = num4 + value10; tmp16 = startIndex; } } } let tmp50 = arg1; if (!arg1) { tmp50 = 0 === indexByKey.size; } let tmp51 = tmp5; if (num > 1) { tmp51 = overrideItemLayout; } if (tmp51) { tmp51 = obj2; } let num12 = 0; let num13 = 1; let flag5 = false; if (tmp16 < data.length) { while (true) { let tmp53 = tmp16; let num14 = num13; if (tmp11) { if (undefined !== tmp52) { flag5 = true; if (tmp16 > tmp52) { break; } } break; } let sum1 = tmp52; if (tmp11) { sum1 = tmp52; if (undefined === tmp52) { sum1 = tmp52; if (!tmp3) { sum1 = tmp52; if (!arg1) { sum1 = tmp52; if (num3 > sum) { let num15 = 1; if (tmp5) { num15 = num; } sum1 = tmp16 + num15 + 10; } } } } } let tmp58 = tmp2[tmp16]; if (null == tmp58) { ({ data: data3, keyExtractor: keyExtractor2 } = state.props); let str3 = ""; if (data3) { let tmp59 = null; if (tmp16 < data3.length) { let keyExtractor2Result = tmp16; if (keyExtractor2) { keyExtractor2Result = keyExtractor2(data3[tmp16], tmp16); } tmp59 = keyExtractor2Result; } state.idCache[tmp16] = tmp59; str3 = tmp59; } tmp58 = str3; } let num16 = 1; if (tmp51) { obj2.span = 1; let overrideItemLayoutResult = overrideItemLayout(obj2, data[tmp16], tmp53, num, value7); let span = obj2.span; let isFiniteResult = undefined !== span; if (isFiniteResult) { let _Number = Number; isFiniteResult = Number.isFinite(span); } num16 = 1; if (isFiniteResult) { let _Math6 = Math; let _Math7 = Math; let _Math8 = Math; num16 = Math.max(1, Math.min(num, Math.round(span))); } } let tmp67 = tmp5; if (tmp5) { tmp67 = num14 + num16 - 1 > num; } let num17 = num12; let sum2 = num3; if (tmp67) { sum2 = num3 + num12; num17 = 0; num14 = 1; } let value11 = sizesKnown.get(tmp58); if (undefined === value11) { let flag6 = true; let flag7 = false; value11 = getItemSize(context, tmp58, tmp53, data[tmp16], true, tmp14, false); } let tmp75 = closure_31; if (closure_31) { tmp75 = tmp50; } if (tmp75) { if (map.has(tmp58)) { let _console = console; let _HermesInternal = HermesInternal; let errorResult = console.error("[legend-list] Error: Detected overlapping key (" + tmp58 + ") which causes missing items and gaps and other terrrible things. Check that keyExtractor returns unique values."); } let result = map.set(tmp58, tmp16); } if (sum2 !== positions[tmp16]) { positions[tmp16] = sum2; if (tmp) { let tmp79 = notifyPosition$(context, tmp58, sum2); } } if (tmp50) { let result1 = indexByKey.set(tmp58, tmp16); } if (tmp5) { columns[tmp16] = num14; columnSpans[tmp16] = num16; let tmp82 = num17; if (value11 > num17) { tmp82 = value11; } let num20 = num14 + num16; let num19 = tmp82; let sum3 = sum2; if (num20 > num) { sum3 = sum2 + tmp82; num19 = 0; num20 = 1; } } else { sum3 = sum2 + value11; num19 = num17; num20 = num14; } let sum4 = tmp16 + 1; num12 = num19; num13 = num20; num3 = sum3; tmp16 = sum4; tmp52 = sum1; flag5 = false; if (sum4 >= length) { break; } } } if (!flag5) { const state4 = context.state; const data7 = state4.props.data; const values5 = context.values; const value12 = values5.get("numColumns"); let num21 = 1; if (null != value12) { num21 = value12; } if (0 === data7.length) { const state6 = context.state; ({ totalSize: totalSize3, totalSize: totalSize4 } = state6); if (state6.timeoutSetPaddingTop) { const _clearTimeout3 = clearTimeout; clearTimeout(state6.timeoutSetPaddingTop); state6.timeoutSetPaddingTop = undefined; } if (totalSize3 !== 0) { if (!closure_27) { if (state6.initialScroll) { if (0 < totalSize3) { state6.pendingTotalSize = 0; } } } state6.pendingTotalSize = undefined; state6.totalSize = 0; set$(context, "totalSize", 0); updateContentMetricsState(context); } else { const values6 = context.values; if (values6.get("totalSize") !== 0) { set$(context, "totalSize", 0); } } } else { const diff2 = data7.length - 1; ({ data: data6, keyExtractor: keyExtractor5 } = state4.props); let str4 = ""; if (data6) { let tmp85 = null; if (diff2 < data6.length) { let keyExtractor5Result = diff2; if (keyExtractor5) { keyExtractor5Result = keyExtractor5(data6[diff2], diff2); } tmp85 = keyExtractor5Result; } state4.idCache[diff2] = tmp85; str4 = tmp85; } if (undefined !== str4) { if (undefined !== tmp87) { if (num21 > 1) { let diff3 = diff2; let sum5 = diff2; if (0 < diff2) { sum5 = diff3; while (1 !== state4.columns[diff3]) { sum5 = diff3; if (undefined === tmp96) { break; } else { diff3 = diff3 - 1; sum5 = diff3; if (0 >= diff3) { break; } } } } let num22 = 0; let num23 = 0; if (sum5 <= diff2) { do { let tmp99 = state4.idCache[sum5]; let tmp101 = num22; let tmp98 = getItemSize; let tmp100 = sum5; if (null == tmp99) { ({ data: data4, keyExtractor: keyExtractor3 } = state4.props); let str7 = ""; if (data4) { let tmp102 = null; if (sum5 < data4.length) { let keyExtractor3Result = sum5; if (keyExtractor3) { keyExtractor3Result = keyExtractor3(data4[sum5], sum5); } tmp102 = keyExtractor3Result; } state4.idCache[sum5] = tmp102; str7 = tmp102; } tmp99 = str7; } let tmp98Result = tmp98(context, tmp99, tmp100, data7[sum5]); if (tmp98Result > tmp101) { tmp101 = tmp98Result; } sum5 = sum5 + 1; num22 = tmp101; num23 = tmp101; } while (sum5 <= diff2); } const sum6 = tmp87 + num23; const state5 = context.state; ({ totalSize, totalSize: totalSize2 } = state5); if (state5.timeoutSetPaddingTop) { const _clearTimeout2 = clearTimeout; clearTimeout(state5.timeoutSetPaddingTop); state5.timeoutSetPaddingTop = undefined; } if (totalSize !== sum6) { if (!closure_27) { if (state5.initialScroll) { if (sum6 < totalSize) { state5.pendingTotalSize = sum6; } } } state5.pendingTotalSize = undefined; state5.totalSize = sum6; set$(context, "totalSize", sum6); updateContentMetricsState(context); } else { const values7 = context.values; if (values7.get("totalSize") !== sum6) { set$(context, "totalSize", sum6); } } } else { const tmp138 = getItemSize(context, str4, diff2, data7[diff2]); if (undefined !== tmp138) { const sum7 = tmp87 + tmp138; const state8 = context.state; ({ totalSize: totalSize5, totalSize: totalSize6 } = state8); if (state8.timeoutSetPaddingTop) { const _clearTimeout = clearTimeout; clearTimeout(state8.timeoutSetPaddingTop); state8.timeoutSetPaddingTop = undefined; } if (totalSize5 !== sum7) { if (!closure_27) { if (state8.initialScroll) { if (sum7 < totalSize5) { state8.pendingTotalSize = sum7; } } } state8.pendingTotalSize = undefined; state8.totalSize = sum7; set$(context, "totalSize", sum7); updateContentMetricsState(context); } else { const values8 = context.values; if (values8.get("totalSize") !== sum7) { set$(context, "totalSize", sum7); } } } } } } } } if (props.snapToIndices) { const state7 = context.state; const snapToIndices = state7.props.snapToIndices; if (state7.props.horizontal) { const tmp123 = getContentSize(context); } const _Array = Array; const ArrayResult = Array(snapToIndices.length); for (let num25 = 0; num25 < snapToIndices.length; num25 = num25 + 1) { let tmp126 = snapToIndices[num25]; ({ data: data5, keyExtractor: keyExtractor4 } = state7.props); if (data5) { let tmp128 = null; if (tmp126 < data5.length) { let keyExtractor4Result = tmp126; if (keyExtractor4) { keyExtractor4Result = keyExtractor4(data5[tmp126], tmp126); } tmp128 = keyExtractor4Result; } state7.idCache[tmp126] = tmp128; } ArrayResult[num25] = toNativeHorizontalOffset(state7, state7.positions[tmp126], tmp123); } set$(context, "snapToOffsets", ArrayResult); } } function ensureViewabilityState(mapViewabilityConfigStates, id) { mapViewabilityConfigStates = mapViewabilityConfigStates.mapViewabilityConfigStates; if (!mapViewabilityConfigStates) { const _Map = Map; map = new Map(); mapViewabilityConfigStates.mapViewabilityConfigStates = map; mapViewabilityConfigStates = map; } value = mapViewabilityConfigStates.get(id); if (!value) { const obj = { end: -1, endBuffered: -1, previousEnd: -1, previousStart: -1, start: -1, startBuffered: -1, viewableItems: [] }; const result = mapViewabilityConfigStates.set(id, obj); value = obj; } return value; } function updateViewableItems(timeouts, arg1, arg2, arg3, start, end) { closure_0 = timeouts; closure_1 = arg1; closure_2 = arg3; let tmp = arg6; if (arg6 === undefined) { tmp = start; } const startBuffered = tmp; let tmp2 = arg7; if (arg7 === undefined) { tmp2 = end; } const endBuffered = tmp2; timeouts = undefined; timeouts = timeouts.timeouts; const data = timeouts.props.data; function _loop(iter) { closure_0 = iter; const id = iter.viewabilityConfig.id; let mapViewabilityConfigStates = timerId.mapViewabilityConfigStates; if (!mapViewabilityConfigStates) { const _Map = Map; map = new Map(); tmp.mapViewabilityConfigStates = map; mapViewabilityConfigStates = map; } value = mapViewabilityConfigStates.get(id); let tmp8 = value; if (!value) { const obj = { end: -1, endBuffered: -1, previousEnd: -1, previousStart: -1, start: -1, startBuffered: -1, viewableItems: [] }; const result = mapViewabilityConfigStates.set(id, obj); tmp8 = obj; } tmp8.start = start; tmp8.end = end; tmp8.startBuffered = startBuffered; tmp8.endBuffered = endBuffered; if (iter.viewabilityConfig.minimumViewTime) { const _setTimeout = setTimeout; timerId = setTimeout(() => { timeouts.delete(timerId); updateViewableItemsWithConfig(data, closure_0, closure_0, closure_1, closure_2); }, iter.viewabilityConfig.minimumViewTime); timeouts.add(timerId); } else { updateViewableItemsWithConfig(data, iter, closure_0, tmp, closure_2); } } const iter = arg2[Symbol.iterator](); while (iter !== undefined) { let _loopResult = _loop(iter.next()); continue; } } function updateViewableItemsWithConfig(data, arg1, indexByKey, mapViewabilityAmountValues, scrollSize) { let length; let items; ({ viewabilityConfig, onViewableItemsChanged } = arg1); const id = viewabilityConfig.id; const tmp = ensureViewabilityState(mapViewabilityAmountValues, id); ({ viewableItems, start, end } = tmp); ({ startBuffered, endBuffered } = tmp); while (tmp2 !== undefined) { let tmp5 = _slicedToArray(tmp3, 2); [tmp6, tmp8] = tmp5; let tmp7 = tmp6; if (computeViewability(indexByKey, mapViewabilityAmountValues, viewabilityConfig, tmp6, tmp8.key, scrollSize, tmp8.item, tmp8.index).sizeVisible < 0) { if (null == items) { items = []; } let arr = items.push(tmp7); } continue; } const items1 = []; set = new Set(); if (viewableItems) { const iter = viewableItems[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { let tmp23 = nextResult; let addResult = set.add(nextResult.key); indexByKey = indexByKey.indexByKey; value = indexByKey.get(nextResult.key); let tmp26 = value; let tmp27; if (undefined !== value) { tmp27 = data[tmp26]; } let tmp29 = tmp27; let tmp32 = findContainerId(mapViewabilityAmountValues, tmp23.key); flag2 = false; let tmp34 = undefined !== tmp26; if (tmp34) { tmp34 = undefined !== tmp29; } if (tmp34) { flag2 = checkIsViewable(indexByKey, mapViewabilityAmountValues, viewabilityConfig, tmp32, tmp23.key, scrollSize, tmp29, tmp26); } if (flag2) { continue; } else { let obj = {}; let merged = Object.assign(tmp23); if (null != tmp26) { let index = value; } else { index = tmp23.index; } obj.index = index; obj.isViewable = false; if (null != tmp29) { let item = tmp27; } else { item = tmp23.item; } obj.item = item; obj = items1.push(obj); } } } const items2 = []; let sum = start; if (start <= end) { do { let tmp54 = data[sum]; if (tmp54) { let tmp57 = getId(indexByKey, sum); let tmp59 = findContainerId(mapViewabilityAmountValues, tmp57); if (checkIsViewable(indexByKey, mapViewabilityAmountValues, viewabilityConfig, tmp59, tmp57, scrollSize, tmp54, tmp55)) { let obj2 = { containerId: tmp59, index: sum, isViewable: true, item: tmp54, key: tmp57 }; let arr2 = items2.push(obj2); if (!set.has(obj2.key)) { let arr3 = items1.push(obj2); } } } sum = sum + 1; } while (sum <= end); } const merged1 = Object.assign(tmp, { previousEnd: end, previousStart: start, viewableItems: items2 }); if (items1.length > 0) { tmp.viewableItems = items2; let num5 = 0; if (0 < items1.length) { do { let tmp72 = items1[num5]; let tmp77 = maybeUpdateViewabilityCallback(mapViewabilityAmountValues, id, tmp72.containerId, tmp72); num5 = num5 + 1; length = items1.length; } while (num5 < length); } if (onViewableItemsChanged) { const obj3 = { changed: items1, end, endBuffered, start, startBuffered, viewableItems: items2 }; const result = onViewableItemsChanged(obj3); } } if (items) { for (const item10166 of items) { mapViewabilityAmountValues = arg3.mapViewabilityAmountValues; let tmp81 = item10166; value2 = mapViewabilityAmountValues.get(item10166); if (value2) { value2 = tmp83.sizeVisible < 0; } if (value2) { let mapViewabilityAmountValues2 = arg3.mapViewabilityAmountValues; let deleteResult = mapViewabilityAmountValues2.delete(tmp81); } continue; } } } function areViewabilityAmountTokensEqual(mapViewabilityAmountValues, containerId2) { return mapViewabilityAmountValues && mapViewabilityAmountValues.containerId === containerId2.containerId && mapViewabilityAmountValues.index === containerId2.index && mapViewabilityAmountValues.isViewable === containerId2.isViewable && mapViewabilityAmountValues.item === containerId2.item && mapViewabilityAmountValues.key === containerId2.key && mapViewabilityAmountValues.percentOfScroller === containerId2.percentOfScroller && mapViewabilityAmountValues.percentVisible === containerId2.percentVisible && mapViewabilityAmountValues.scrollSize === containerId2.scrollSize && mapViewabilityAmountValues.size === containerId2.size && mapViewabilityAmountValues.sizeVisible === containerId2.sizeVisible; } function computeViewability(sizes, mapViewabilityAmountValues, viewabilityConfig, containerId, key, scrollSize, item, index) { sizes = sizes.sizes; const values = mapViewabilityAmountValues.values; const values2 = mapViewabilityAmountValues.values; const tmp = values.get("stylePaddingTop") || 0; const values3 = mapViewabilityAmountValues.values; const sum = tmp + (values2.get("alignItemsAtEndPadding") || 0); const tmp2 = values2.get("alignItemsAtEndPadding") || 0; ({ itemVisiblePercentThreshold, viewAreaCoveragePercentThreshold } = viewabilityConfig); const sum1 = sum + (values3.get("headerSize") || 0); if (null != viewAreaCoveragePercentThreshold) { itemVisiblePercentThreshold = viewAreaCoveragePercentThreshold; } const diff = sizes.scroll - sum1; const tmp9 = sizes.get(key) || 0; if (undefined === sizes.positions[index]) { const obj2 = { containerId, index, isViewable: false, item, key, percentOfScroller: 0, percentVisible: 0, scrollSize, size: tmp9, sizeVisible: -1 }; const mapViewabilityAmountValues3 = mapViewabilityAmountValues.mapViewabilityAmountValues; if (!areViewabilityAmountTokensEqual(mapViewabilityAmountValues3.get(containerId), obj2)) { const mapViewabilityAmountValues4 = mapViewabilityAmountValues.mapViewabilityAmountValues; const result = mapViewabilityAmountValues4.set(containerId, obj2); value = mapViewabilityAmountValues.mapViewabilityAmountCallbacks.get(containerId); if (value) { value(obj2); } const mapViewabilityAmountCallbacks2 = mapViewabilityAmountValues.mapViewabilityAmountCallbacks; } return obj2; } else { const diff1 = tmp8 - diff; const sum2 = diff1 + tmp9; let diff2 = tmp9; if (!(diff1 >= 0 && sum2 <= scrollSize && sum2 > diff1)) { const _Math = Math; const _Math2 = Math; const bound = Math.min(sum2, scrollSize); diff2 = bound - Math.max(diff1, 0); } let num = 0; if (tmp9) { let num3 = 100; if (!tmp10) { num3 = diff2 / tmp9 * 100; } num = num3; } let num4 = 0; if (tmp9) { num4 = diff2 / scrollSize * 100; } const obj = { containerId, index, isViewable: null, item: null, key: null, percentOfScroller: null, percentVisible: null, scrollSize: null, size: null, sizeVisible: null }; let num6 = 100; if (!(diff1 >= 0 && sum2 <= scrollSize && sum2 > diff1)) { let tmp14 = num; if (tmp6) { tmp14 = num4; } num6 = tmp14; } obj.isViewable = num6 >= itemVisiblePercentThreshold; obj.item = item; obj.key = key; obj.percentOfScroller = num4; obj.percentVisible = num; obj.scrollSize = scrollSize; obj.size = tmp9; obj.sizeVisible = diff2; mapViewabilityAmountValues = mapViewabilityAmountValues.mapViewabilityAmountValues; if (!areViewabilityAmountTokensEqual(mapViewabilityAmountValues.get(containerId), obj)) { const mapViewabilityAmountValues2 = mapViewabilityAmountValues.mapViewabilityAmountValues; const result1 = mapViewabilityAmountValues2.set(containerId, obj); value2 = mapViewabilityAmountValues.mapViewabilityAmountCallbacks.get(containerId); if (value2) { value2(obj); } const mapViewabilityAmountCallbacks = mapViewabilityAmountValues.mapViewabilityAmountCallbacks; } return obj; } const tmp4 = values3.get("headerSize") || 0; } function checkIsViewable(indexByKey, mapViewabilityAmountValues, viewabilityConfig, containerId, key, scrollSize, item, index) { mapViewabilityAmountValues = mapViewabilityAmountValues.mapViewabilityAmountValues; value = mapViewabilityAmountValues.get(containerId); let tmp2 = value; if (value) { tmp2 = value.key === key; } if (tmp2) { tmp2 = value.index === index; } if (!tmp2) { value = computeViewability(indexByKey, mapViewabilityAmountValues, viewabilityConfig, containerId, key, scrollSize, item, index); } return value.isViewable; } function maybeUpdateViewabilityCallback(mapViewabilityValues, id, containerId, arg3) { const sum = containerId + id; mapViewabilityValues = mapViewabilityValues.mapViewabilityValues; const result = mapViewabilityValues.set(sum, arg3); value = mapViewabilityValues.mapViewabilityCallbacks.get(sum); if (null != value) { value(arg3); } } function comparatorByDistance(distance, distance2) { return distance2.distance - distance.distance; } function isStickyIndexActive(state, arg1) { state = state.state; flag = false; const obj = state.stickyContainerPool[Symbol.iterator](); while (obj !== undefined) { let _HermesInternal = HermesInternal; let tmp3 = peek$(state, "containerItemKey" + tmp); value = undefined; if (tmp3) { let indexByKey = state.indexByKey; value = indexByKey.get(tmp4); } if (value === arg1) { flag = true; obj.return(); break; } return flag; } } function trackVisibleRange(startNoBuffer, startNoBuffer2, arg2, arg3, arg4, arg5) { let tmp = null === startNoBuffer.startNoBuffer; if (tmp) { tmp = arg2 + arg3 > arg4; } if (tmp) { startNoBuffer.startNoBuffer = startNoBuffer2; } let tmp3 = undefined === startNoBuffer.firstFullyOnScreenIndex; if (tmp3) { tmp3 = arg2 >= arg4 - 10; } if (tmp3) { tmp3 = arg2 <= arg5; } if (tmp3) { startNoBuffer.firstFullyOnScreenIndex = startNoBuffer2; } flag = false; if (null !== startNoBuffer.startNoBuffer) { flag2 = true; if (arg2 <= arg5) { startNoBuffer.endNoBuffer = startNoBuffer2; flag2 = false; } flag = flag2; } return flag; } function getIdsInVisibleRange(props, firstFullyOnScreenIndex) { let startNoBuffer = firstFullyOnScreenIndex.firstFullyOnScreenIndex; if (null == startNoBuffer) { startNoBuffer = firstFullyOnScreenIndex.startNoBuffer; } const items = []; if (null != startNoBuffer) { if (null !== firstFullyOnScreenIndex.endNoBuffer) { if (startNoBuffer <= firstFullyOnScreenIndex.endNoBuffer) { do { let tmp = props.idCache[startNoBuffer]; if (null == tmp) { ({ data, keyExtractor } = props.props); let str = ""; if (data) { let tmp3 = null; if (startNoBuffer < data.length) { let keyExtractorResult = startNoBuffer; if (keyExtractor) { keyExtractorResult = keyExtractor(data[startNoBuffer], startNoBuffer); } tmp3 = keyExtractorResult; } props.idCache[startNoBuffer] = tmp3; str = tmp3; } tmp = str; } let arr = items.push(tmp); startNoBuffer = startNoBuffer + 1; } while (startNoBuffer <= firstFullyOnScreenIndex.endNoBuffer); } } } return items; } function maybeEmitFirstVisibleItemChanged(props, index) { const onFirstVisibleItemChanged = props.props.onFirstVisibleItemChanged; if (onFirstVisibleItemChanged) { if (null !== index) { if (index >= 0) { if (index < props.props.data.length) { let tmp5 = props.idCache[index]; if (null == tmp5) { ({ data, keyExtractor } = props.props); let str = ""; if (data) { let tmp3 = null; if (index < data.length) { let keyExtractorResult = index; if (keyExtractor) { keyExtractorResult = keyExtractor(data[index], index); } tmp3 = keyExtractorResult; } props.idCache[index] = tmp3; str = tmp3; } tmp5 = str; } index = undefined; if (null != props.lastFirstVisibleItemCallback) { index = lastFirstVisibleItemCallback.index; } if (!tmp7) { const obj = { index, key: tmp5 }; props.lastFirstVisibleItemCallback = obj; const obj2 = { index, item: props.props.data[index], key: tmp5 }; const result = onFirstVisibleItemChanged(obj2); } tmp7 = index === index && props.lastFirstVisibleItemCallback.key === tmp5; } } } } } function maybeUpdateAnchoredEndSpace(context) { const state = context.state; const anchoredEndSpace = state.props.anchoredEndSpace; const values = context.values; value = values.get("anchoredEndSpaceSize"); ({ anchoredEndSpaceReadyAnchorIndex, anchoredEndSpaceReadyAnchorKey } = state); if (null != anchoredEndSpace) { const anchorIndex = anchoredEndSpace.anchorIndex; } let num = 0; flag = true; if (anchoredEndSpace) { ({ anchorIndex: anchorIndex2, anchorMaxSize, anchorOffset } = anchoredEndSpace); let num2 = 0; if (undefined !== anchorOffset) { num2 = anchorOffset; } const data1 = state.props.data; if (anchorIndex2 >= 0) { if (anchorIndex2 < data1.length) { if (state.scrollLength > 0) { ({ data, keyExtractor } = state.props); const str = ""; if (data) { let tmp3 = null; if (anchorIndex2 < data.length) { let keyExtractorResult = anchorIndex2; if (keyExtractor) { keyExtractorResult = keyExtractor(data[anchorIndex2], anchorIndex2); } tmp3 = keyExtractorResult; } state.idCache[anchorIndex2] = tmp3; } const values2 = context.values; values2.get("footerSize") || 0; flag2 = false; let sum1 = anchorIndex2; let num3 = 0; let flag3 = false; if (anchorIndex2 < data1.length) { do { let tmp10 = getKnownOrFixedItemSize(context, sum1); let flag4 = flag2; let bound = tmp10; if (sum1 === anchorIndex2) { bound = tmp10; if (undefined !== anchorMaxSize) { let num5 = tmp10; if (!tmp10) { num5 = 0; } let _Math = Math; bound = Math.min(num5, Math.max(0, anchorMaxSize)); } } if (undefined === tmp10) { flag4 = true; } let tmp14 = null != bound && bound > 0; let sum = num3; if (tmp14) { sum = num3 + bound; } sum1 = sum1 + 1; num3 = sum; flag2 = flag4; flag3 = flag4; } while (sum1 < data1.length); } if (flag3) { let num6 = value; if (!value) { num6 = 0; } let bound1 = num6; } else { const _Math2 = Math; bound1 = Math.max(0, state.scrollLength - tmp16 - num2); } } } } num = 0; flag = true; if (anchorIndex2 >= 0) { flag = false; num = 0; } } let tmp21 = value !== num; if (flag) { let tmp22 = tmp21; if (!tmp21) { tmp22 = anchoredEndSpaceReadyAnchorIndex !== anchorIndex || anchoredEndSpaceReadyAnchorKey !== tmp2; const tmp23 = anchoredEndSpaceReadyAnchorIndex !== anchorIndex || anchoredEndSpaceReadyAnchorKey !== tmp2; } flag = tmp22; } if (flag) { state.anchoredEndSpaceReadyAnchorIndex = anchorIndex; state.anchoredEndSpaceReadyAnchorKey = tmp2; if (tmp21) { set$(context, "anchoredEndSpaceSize", num); let onSizeChanged; if (null != anchoredEndSpace) { onSizeChanged = anchoredEndSpace.onSizeChanged; } if (null != onSizeChanged) { const call = onSizeChanged.call; if (typeof call === "unknown") { onSizeChanged(num); } else { call(anchoredEndSpace, num); } } } if (tmp21) { let includeInEndInset; if (null != anchoredEndSpace) { includeInEndInset = anchoredEndSpace.includeInEndInset; } tmp21 = includeInEndInset; } if (tmp21) { updateScroll(context, state.scroll, true); } let onReady; if (null != anchoredEndSpace) { onReady = anchoredEndSpace.onReady; } if (null != onReady) { const call2 = onReady.call; const obj = { anchorIndex, anchorKey: tmp2, size: num }; if (typeof call2 === "unknown") { onReady(obj); } else { call2(anchoredEndSpace, obj); } } } return num; } function mergeItemSizeUpdateResult(didChange, didChange2) { if (!didChange.didChange) { didChange.didChange = didChange2.didChange; } if (!didChange.didMeasureUserScrollAnchorResetItem) { didChange.didMeasureUserScrollAnchorResetItem = didChange2.didMeasureUserScrollAnchorResetItem; } if (!didChange.needsRecalculate) { didChange.needsRecalculate = didChange2.needsRecalculate; } if (!didChange.shouldMaintainScrollAtEnd) { didChange.shouldMaintainScrollAtEnd = didChange2.shouldMaintainScrollAtEnd; } } function flushItemSizeUpdates(state, needsRecalculate) { state = state.state; if (needsRecalculate.needsRecalculate) { state.scrollForNextCalculateItemsInView = undefined; const state2 = state.state; if (undefined !== state2.userScrollAnchorReset) { closure_129_0 = state; closure_129_1 = {}; const state3 = state.state; fn(() => { let set2; let tmp163; let tmp164; let containerItemKeys = state.containerItemKeys; ({ enableScrollForNextCalculateItemsInView, idCache } = state); ({ indexByKey, minIndexSizeChanged, positions, props } = state); ({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props); ({ keyExtractor, onStickyHeaderChange: closure_4 } = props); ({ scrollForNextCalculateItemsInView, scrollLength } = state); ({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state); const data = state.props.data; let prop = state.props.stickyHeaderIndicesArr; if (!prop) { prop = []; } let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet; if (!stickyHeaderIndicesSet) { let _Set = Set; stickyHeaderIndicesSet = new Set(); } let tmp9 = closure_1_46(containerItemKeys, idCache.drawDistanceMode); ({ dataChanged, doMVCP, forceFullItemPositions } = idCache); let initialScrollSession = tmp2.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = tmp2.initialScrollSession.bootstrap; } let tmp16 = closure_1_21(containerItemKeys, "numContainers"); if (data) { if (0 !== scrollLength) { if (tmp16) { closure_8 = ref2(tmp7); let sum = tmp15(tmp7, "stylePaddingTop") + tmp15(tmp7, "alignItemsAtEndPadding"); closure_9 = sum + tmp15(tmp7, "headerSize"); const tmp15Result3 = tmp15(tmp7, "numColumns"); let scrollVelocity = idCache.scrollVelocity; if (null == scrollVelocity) { scrollVelocity = closure_1_69(tmp2); } ({ initialScroll, queuedInitialLayout } = tmp2); if (!tmp13) { let scroll1; if (null != bootstrap) { scroll1 = bootstrap.scroll; } if (null == scroll1) { scroll1 = tmp2.scroll; } let scroll = scroll1; } else { if (!queuedInitialLayout) { if (closure_1_41(tmp2)) { if (initialScroll) { scroll = closure_1_75(tmp7, initialScroll); } } } scroll = tmp2.scroll; } let num = 0; closure_11 = 0; closure_12 = 0; closure_13 = 0; closure_14 = 0; scrollBottomBuffered = 0; closure_16 = scroll; function updateScroll2(scroll) { closure_16 = scroll; values = values.values; value = values.get("scrollAdjustPending"); num = 0; if (null != value) { num = value; } closure_11 = num - closure_9; const rounded = Math.round(scroll + closure_11); closure_12 = rounded; if (rounded + scrollLength > closure_8) { const _Math = Math; closure_12 = Math.max(0, tmp4 - tmp3); } } updateScroll2(scroll); const tmp15Result4 = tmp15(tmp7, "activeStickyIndex"); closure_17 = tmp15Result4; function resolveStickyState() { num = -1; let num2 = -1; if (prop.length > 0) { let diff = arr.length - 1; let tmp5 = num; if (0 <= diff) { while (true) { let tmp6 = tmp3[arr[diff]]; if (undefined === tmp6) { diff = diff - 1; tmp5 = num; if (0 > diff) { break; } } else { tmp5 = diff; if (tmp >= tmp6) { break; } } break; } } num2 = tmp5; } if (0 <= num2) { num = arr[num2]; } let tmp8 = num2 >= 0; if (0 > num2) { tmp8 = tmp9 >= 0; } if (tmp8) { context(containerItemKeys, "activeStickyIndex", num); } let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null }; finishCalculateItemsInView = undefined; if (closure_4) { if (arr.length > 0) { if (tmp9 !== num) { finishCalculateItemsInView = () => { if (undefined !== data[num]) { if (null != closure_2_4) { const obj = { index: tmp, item: tmp2 }; tmp3(obj); } } }; } } } obj.finishCalculateItemsInView = finishCalculateItemsInView; return obj; } if (!dataChanged) { let stickyState = resolveStickyState(); } let result2 = tmp9; let result3 = tmp9; if (scrollVelocity > 0) { let result = 0.5 * tmp9; const result1 = 1.5 * tmp9; result3 = result1; result2 = result; } else { if (0 === scrollVelocity) { let _Math = Math; num = 50; } result2 = 1.5 * tmp9; result3 = 0.5 * tmp9; } let num6 = 0; if (!dataChanged) { num6 = 0; if (!forceFullItemPositions) { num6 = 0; if (!tmp25) { num6 = 0; if (!closure_1_41(tmp2)) { num6 = 0; if (!tmp2.scrollingTo) { num6 = 0; if (!tmp2.pendingNativeMVCPAdjust) { num6 = 0; if (tmp15(tmp7, "readyToRender")) { let _Math2 = Math; num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) { if (arg1 <= 0) { return 0; } else { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const bound = Math.min(1, Math.abs(scrollVelocity) / 4); return Math.sign(scrollVelocity) * arg1 * bound; } })(scrollVelocity, Math.min(result2, result3)); } } } } } } } function updateScrollRange() { const bound = Math.max(0, closure_12); closure_14 = Math.max(bound, closure_12 + scrollLength + Math.max(0, -closure_16)); closure_13 = bound - result2 + num6; closure_15 = closure_14 + result3 + num6; } updateScrollRange(); if (0 !== num6) { (function scheduleRenderRangeProjectionSettle(containerItemKeys) { state = containerItemKeys.state; const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle; if (undefined !== timeoutRenderRangeProjectionSettle) { const _clearTimeout = clearTimeout; clearTimeout(timeoutRenderRangeProjectionSettle); let timeouts = state.timeouts; timeouts.delete(timeoutRenderRangeProjectionSettle); } const timerId = setTimeout(() => { state.timeoutRenderRangeProjectionSettle = undefined; const timeouts = state.timeouts; timeouts.delete(timerId); state.scrollHistory.length = 0; const triggerCalculateItemsInView = state.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(); } else { call(state); } } }, 100); state.timeoutRenderRangeProjectionSettle = timerId; const timeouts2 = state.timeouts; timeouts2.add(timerId); })(tmp7); } if (enableScrollForNextCalculateItemsInView) { if (!tmp25) { if (!dataChanged) { if (!forceFullItemPositions) { if (scrollForNextCalculateItemsInView) { ({ top, bottom } = scrollForNextCalculateItemsInView); if (null === top) { if (null === bottom) { tmp2.scrollForNextCalculateItemsInView = undefined; } } if (null === top) { if (viewabilityConfigCallbackPairs) { (function updateViewabilityForCachedRange(containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, arg3, arg4) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { let tmp7 = null; let sum1; let tmp9 = null; if (startBuffered <= endBuffered) { let tmp3 = null; let tmp5 = null; let tmp6 = startBuffered; tmp7 = null; tmp9 = null; if (startBuffered < data1.length) { while (true) { let tmp10 = tmp[tmp6]; let tmp11 = tmp3; let tmp12 = tmp4; let tmp13 = tmp5; let tmp14 = tmp6; if (null == tmp10) { ({ data, keyExtractor } = state.props); let str2 = ""; if (data) { let tmp15 = null; if (tmp6 < data.length) { let keyExtractorResult = tmp6; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp6], tmp6); } tmp15 = keyExtractorResult; } state.idCache[tmp6] = tmp15; str2 = tmp15; } tmp10 = str2; } value = sizes.get(tmp10); if (null == value) { value = closure_1_58(containerItemKeys, tmp18, tmp14, data1[tmp6]); } let tmp23 = tmp2[tmp6]; let tmp24 = null === tmp11 && tmp23 + value > arg3; if (tmp24) { tmp11 = tmp6; } let tmp25 = undefined === tmp12 && tmp23 >= arg3 - 10 && tmp23 <= arg4; if (tmp25) { tmp12 = tmp6; } let tmp26 = tmp13; flag = false; if (null !== tmp11) { flag2 = true; if (tmp23 <= arg4) { tmp13 = tmp6; flag2 = false; } tmp26 = tmp13; flag = flag2; } tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (flag) { break; } else { let sum = tmp6 + 1; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (sum > endBuffered) { break; } else { tmp3 = tmp11; tmp4 = tmp12; tmp5 = tmp26; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; tmp6 = sum; if (sum >= data1.length) { break; } } } } } } const obj = { endNoBuffer: tmp9, firstFullyOnScreenIndex: sum1, idsInView: null, startNoBuffer: null }; if (null == sum1) { sum1 = tmp7; } const items = []; if (null != sum1) { if (null !== tmp9) { if (sum1 <= tmp9) { do { let tmp29 = state.idCache[sum1]; if (null == tmp29) { ({ data: data2, keyExtractor: keyExtractor2 } = state.props); let str4 = ""; if (data2) { let tmp31 = null; if (sum1 < data2.length) { let keyExtractor2Result = sum1; if (keyExtractor2) { keyExtractor2Result = keyExtractor2(data2[sum1], sum1); } tmp31 = keyExtractor2Result; } state.idCache[sum1] = tmp31; str4 = tmp31; } tmp29 = str4; } let arr = items.push(tmp29); sum1 = sum1 + 1; } while (sum1 <= tmp9); } } } obj.idsInView = items; obj.startNoBuffer = tmp7; const merged = Object.assign(state, obj); closure_1_102(state, tmp7); if (tmp37) { closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered); } tmp37 = null !== tmp7 && null !== tmp9; } } } } })(tmp7, viewabilityConfigCallbackPairs, scrollLength, closure_12, closure_14); } else if (tmp2.props.onFirstVisibleItemChanged) { closure_1_102(tmp2, (function findFirstVisibleIndexInCachedRange(containerItemKeys, arg1) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { if (startBuffered <= endBuffered) { if (startBuffered < data1.length) { while (true) { let tmp3 = tmp[startBuffered]; let tmp4 = startBuffered; if (null == tmp3) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp5 = null; if (startBuffered < data.length) { let keyExtractorResult = startBuffered; if (keyExtractor) { keyExtractorResult = keyExtractor(data[startBuffered], startBuffered); } tmp5 = keyExtractorResult; } state.idCache[startBuffered] = tmp5; str = tmp5; } tmp3 = str; } value = sizes.get(tmp3); let tmp9 = value; if (null == value) { tmp9 = closure_1_58(containerItemKeys, tmp8, tmp4, data1[startBuffered]); } if (tmp2[startBuffered] + tmp9 > arg1) { break; } else { let sum = startBuffered + 1; if (sum <= endBuffered) { startBuffered = sum; } } } return startBuffered; } } return null; } } } } return null; })(tmp7, closure_12)); } let prop1; if (null != stickyState) { prop1 = stickyState.finishCalculateItemsInView; } if (null != prop1) { let call = prop1.call; typeof call === "unknown" ? prop1() : call(stickyState); } } } } } } } let tmp73; if (doMVCP) { if (!tmp25) { tmp73 = closure_1_68(tmp7, dataChanged); } } if (dataChanged) { closure_1_86(tmp2); } let num8 = 0; if (!forceFullItemPositions) { num8 = 0; if (!dataChanged) { let startBuffered = minIndexSizeChanged; if (null == minIndexSizeChanged) { startBuffered = tmp2.startBuffered; } let num9 = 0; if (null != startBuffered) { num9 = startBuffered; } num8 = num9; } } let obj = { doMVCP, forceFullUpdate: forceFullItemPositions, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null }; let tmp82 = !forceFullItemPositions; if (!forceFullItemPositions) { tmp82 = !dataChanged; } if (tmp82) { tmp82 = tmp15Result3 > 1; } if (tmp82) { tmp82 = undefined !== minIndexSizeChanged; } obj.optimizeForVisibleWindow = tmp82; obj.scrollBottomBuffered = scrollBottomBuffered; obj.scrollVelocity = scrollVelocity; obj.startIndex = num8; closure_1_89(tmp7, dataChanged, obj); const tmp17Result = ref2(tmp7); closure_8 = tmp17Result; if (undefined !== minIndexSizeChanged) { tmp2.minIndexSizeChanged = undefined; } if (dataChanged) { if (doMVCP) { if (tmp2.props.maintainVisibleContentPosition.data) { if (tmp2.didContainersLayout) { if (tmp2.idsInView.length > 0) { const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition; const _Set2 = Set; set = new Set(); const idsInView = tmp2.idsInView; for (const item10226 of idsInView) { let tmp99 = item10226; value = indexByKey.get(item10226); let tmp101 = value; if (undefined !== value) { let tmp102 = shouldRestorePosition; if (shouldRestorePosition) { tmp102 = !shouldRestorePosition(data[tmp101], tmp101, data); } if (!tmp102) { let addResult = set.add(tmp99); } } continue; } } } } } } const tmp112 = closure_1_21(containerItemKeys, "scrollAdjustPending"); let num11 = 0; if (null != tmp112) { num11 = tmp112; } if (null != tmp73) { tmp73(); } let tmp114 = tmp73; if (tmp114) { let tmp116 = tmp107.scroll !== state.scroll; if (!tmp116) { const tmp109Result = tmp109(tmp111, "scrollAdjustPending"); let num12 = 0; if (null != tmp109Result) { num12 = tmp109Result; } tmp116 = num12 !== num11; } tmp114 = tmp116; } if (tmp114) { updateScroll2(tmp107.scroll); updateScrollRange(); } if (dataChanged) { stickyState = resolveStickyState(); } let tmp123; if (!tmp13) { let targetIndexSeed; if (null != bootstrap) { targetIndexSeed = bootstrap.targetIndexSeed; } tmp123 = targetIndexSeed; } if (null == tmp123) { let num13 = !dataChanged; if (!dataChanged) { num13 = startBufferedId; } if (num13) { num13 = indexByKey.get(startBufferedId); } if (!num13) { num13 = 0; } tmp123 = num13; } let diff = tmp123; let tmp126 = tmp123; let tmp127 = tmp123; if (tmp123 >= 0) { while (true) { let tmp128 = idCache[diff]; let tmp129 = diff; if (null == tmp128) { tmp128 = closure_1_49(state, diff); } let value4 = sizes.get(tmp128); if (null == value4) { value4 = closure_1_58(containerItemKeys, tmp135, tmp129, data[diff]); } tmp127 = tmp126; if (positions[diff] + value4 <= closure_13) { break; } else { diff = diff - 1; tmp126 = tmp129; tmp127 = tmp129; if (diff < 0) { break; } } } } let tmp143 = tmp127; if (tmp15Result3 > 1) { let diff1 = tmp127; tmp143 = tmp127; if (tmp127 > 0) { tmp143 = diff1; while (1 !== state.columns[diff1]) { tmp143 = diff1; if (undefined === tmp145) { break; } else { diff1 = diff1 - 1; tmp143 = diff1; if (0 >= diff1) { break; } } } } } let num16 = 0; let num17 = 0; let num18 = 0; if (0 < tmp16) { do { let _HermesInternal = HermesInternal; let tmp152 = closure_1_21(containerItemKeys, "containerItemKey" + num16); let bound = num17; if (undefined !== tmp152) { let _Math3 = Math; bound = Math.max(num17, indexByKey.get(tmp152)); } num16 = num16 + 1; num17 = bound; num18 = bound; } while (num16 < tmp16); } let obj2 = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: -1 }; const length = data.length; let _Math4 = Math; const bound1 = Math.max(0, tmp143); let tmp157 = bound1; let flag3 = false; let tmp160 = null; let tmp161 = null; let tmp162 = null; let endNoBuffer1 = null; let tmp166 = null; let startNoBuffer1 = null; if (bound1 < length) { while (true) { let tmp168 = idCache[tmp157]; let tmp169 = tmp157; let tmp171 = tmp158; let tmp172 = tmp159; let tmp173 = tmp160; let tmp174 = tmp161; let tmp175 = tmp162; if (null == tmp168) { tmp168 = closure_1_49(state, tmp157); } let value5 = sizes.get(tmp168); if (null == value5) { value5 = closure_1_58(containerItemKeys, tmp180, tmp169, data[tmp157]); } let tmp187 = positions[tmp157]; let tmp188 = tmp171; let tmp189 = tmp172; let tmp190 = tmp173; let tmp191 = tmp174; let tmp192 = tmp175; let tmp193 = flag3; if (!flag3) { let tmp201 = closure_1_100(obj2, tmp169, tmp187, value5, closure_12, closure_14); let tmp202 = null === tmp175; if (tmp202) { tmp202 = tmp187 + value5 > closure_13; } if (tmp202) { let tmp205 = null; if (closure_13 >= 0) { tmp205 = tmp187; } tmp172 = tmp205; tmp174 = tmp168; tmp175 = tmp157; } let tmp206 = flag3; let tmp207 = tmp171; let tmp208 = tmp173; if (null !== obj2.startNoBuffer) { let flag4 = true; if (tmp187 <= scrollBottomBuffered) { let sum1 = null; if (scrollBottomBuffered <= tmp17Result) { sum1 = tmp187 + value5; } tmp171 = sum1; flag4 = flag3; tmp173 = tmp157; } tmp206 = flag4; tmp207 = tmp171; tmp208 = tmp173; } tmp193 = tmp206; tmp188 = tmp207; tmp190 = tmp208; tmp189 = tmp172; tmp191 = tmp174; tmp192 = tmp175; } let sum2 = tmp157 + 1; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; if (sum2 >= length) { break; } else { tmp157 = sum2; flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; if (!tmp193) { continue; } else { flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; tmp157 = sum2; if (sum2 > num18) { break; } } continue; } } } const _Object = Object; let obj3 = { endBuffered: endNoBuffer1, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null }; ({ endNoBuffer: obj5.endNoBuffer, firstFullyOnScreenIndex: obj5.firstFullyOnScreenIndex } = obj2); obj3.idsInView = closure_1_101(state, obj2); obj3.startBuffered = startNoBuffer1; obj3.startBufferedId = tmp166; obj3.startNoBuffer = obj2.startNoBuffer; let merged = Object.assign(state, obj3); if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp164; } if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp163; } if (enableScrollForNextCalculateItemsInView) { if (!closure_1_54(tmp164)) { const rect = { bottom: tmp163, top: tmp164 }; const tmp219 = rect; } tmp214.scrollForNextCalculateItemsInView = tmp219; } let sum4 = tmp16; let items = []; if (dataChanged) { let num21 = 0; if (0 < sum4) { do { let _HermesInternal2 = HermesInternal; let tmp226 = closure_1_21(containerItemKeys, "containerItemKey" + num21); let tmp227 = !keyExtractor; if (keyExtractor) { let tmp229 = tmp226; if (tmp226) { tmp229 = undefined === indexByKey.get(tmp226); } tmp227 = tmp229; } if (tmp227) { let arr = items.push(num21); } num21 = num21 + 1; } while (num21 < sum4); } } let tmp233 = state; const scrollTargetPinnedRange = state.scrollTargetPinnedRange; let bound2 = 0; let bound3 = -1; let num23 = -1; let num24 = 0; if (scrollTargetPinnedRange) { const _Math5 = Math; const _Math6 = Math; bound2 = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); const _Math7 = Math; const _Math8 = Math; const diff2 = length - 1; bound3 = Math.min(diff2, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); num23 = bound3; num24 = bound2; } closure_24 = tmp237; function isPinnedRenderIndex(arg0) { let hasItem = set.has(arg0); if (!hasItem) { let tmp2 = closure_24; if (closure_24) { tmp2 = arg0 >= bound2; } if (tmp2) { tmp2 = arg0 <= bound3; } hasItem = tmp2; } return hasItem; } if (null !== startNoBuffer1) { if (null !== endNoBuffer1) { let items1 = []; const _Set6 = Set; const set1 = new Set(); function addPinnedIndex(bound2) { if (bound2 >= 0) { if (bound2 < length) { let tmp4 = idCache[bound2]; if (null == tmp4) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp2 = null; if (bound2 < data.length) { let keyExtractorResult = bound2; if (keyExtractor) { keyExtractorResult = keyExtractor(data[bound2], bound2); } tmp2 = keyExtractorResult; } tmp.idCache[bound2] = tmp2; str = tmp2; } tmp4 = str; } value = containerItemKeys.get(tmp4); if (undefined !== value) { const stickyContainerPool = state.stickyContainerPool; stickyContainerPool.add(value); } else { let hasItem = null == tmp4; if (!hasItem) { hasItem = set1.has(bound2); } if (!hasItem) { set1.add(bound2); items1.push(bound2); } } } } } let sum3 = startNoBuffer1; if (startNoBuffer1 <= endNoBuffer1) { do { let tmp238 = idCache[sum3]; if (null == tmp238) { tmp238 = closure_1_49(state, sum3); } if (!containerItemKeys.has(tmp238)) { let addResult1 = set1.add(sum3); let arr2 = items1.push(sum3); } sum3 = sum3 + 1; } while (sum3 <= endNoBuffer1); } for (const item10471 of alwaysRenderIndicesArr) { let addPinnedIndexResult = addPinnedIndex(item10471); continue; } if (tmp237) { if (num24 <= num23) { do { let addPinnedIndexResult1 = addPinnedIndex(num24); num24 = num24 + 1; } while (num24 <= num23); } } if (prop.length > 0) { let currentStickyIdx; if (null != stickyState) { currentStickyIdx = stickyState.currentStickyIdx; } let num25 = -1; if (null != currentStickyIdx) { num25 = currentStickyIdx; } (function handleStickyActivation(containerItemKeys, prop, currentStickyIdx, items1, set1, startNoBuffer1, endNoBuffer1) { state = containerItemKeys.state; num = -1; if (currentStickyIdx >= 0) { num = prop[currentStickyIdx]; } bound2(containerItemKeys, "activeStickyIndex", num); let num2 = 0; do { let diff = currentStickyIdx - num2; if (diff >= 0) { let tmp12 = prop[diff]; if (!closure_1_99(containerItemKeys, tmp12)) { let tmp5 = state.idCache[tmp12]; if (null == tmp5) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp6 = null; if (tmp12 < data.length) { let keyExtractorResult = tmp12; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp12], tmp12); } tmp6 = keyExtractorResult; } state.idCache[tmp12] = tmp6; str = tmp6; } tmp5 = str; } let tmp8 = tmp5; if (tmp5) { containerItemKeys = state.containerItemKeys; tmp8 = !containerItemKeys.has(tmp5); } if (tmp8) { let tmp9 = tmp12 < startNoBuffer1 || tmp12 > endNoBuffer1; tmp8 = tmp9; } if (tmp8) { tmp8 = !set1.has(tmp12); } if (tmp8) { let addResult = set1.add(tmp12); let arr = items1.push(tmp12); } } } num2 = num2 + 1; } while (num2 <= 1); })(containerItemKeys, prop, num25, items1, tmp476, startNoBuffer1, endNoBuffer1); } else if (-1 !== tmp15Result4) { context(containerItemKeys, "activeStickyIndex", -1); } if (items1.length > 0) { let fn; if (getItemType) { fn = (arg0) => { const tmp = getItemType(data[arg0], arg0); let str = ""; if (undefined !== tmp) { const _String = String; str = String(tmp); } return str; }; } const tmp275 = (function findAvailableContainers(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, set) { closure_0 = fn; if (0 === items1.length) { return []; } else { const tmp56 = length(containerItemKeys, "numContainers"); state = containerItemKeys.state; ({ containerItemMetadata: closure_2, stickyContainerPool } = state); set = undefined; if (items.length > 0) { const _Set = Set; set = new Set(items); } const mapped = items1.map((itemIndex, order) => { const obj = { isSticky: null, itemIndex, itemType: null, order: null }; const stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet; obj.isSticky = stickyHeaderIndicesSet.has(itemIndex); let tmp; if (null != closure_0) { tmp = closure_0(itemIndex); } obj.itemType = tmp; obj.order = order; return obj; }); const found = mapped.filter((isSticky) => !isSticky.isSticky); items = []; items1 = []; let num2 = 0; const found1 = mapped.filter((isSticky) => isSticky.isSticky); if (0 < tmp56) { while (true) { let _HermesInternal = HermesInternal; let tmp13 = length(containerItemKeys, "containerItemKey" + num2); let hasItem; if (null != set) { hasItem = set.has(num2); } let tmp16 = !hasItem; if (tmp13) { let hasItem1; if (null != set) { hasItem1 = set.has(tmp13); } if (hasItem1) { let indexByKey = state.indexByKey; } num2 = num2 + 1; if (num2 >= tmp56) { break; } } let tmp18 = !tmp16; if (stickyContainerPool.has(num2)) { let tmp22 = undefined === tmp13 || tmp18; if (tmp22) { let obj2 = { containerIndex: num2, distance: null }; let _Number2 = Number; obj2.distance = Number.POSITIVE_INFINITY; let arr = items1.push(obj2); } } else { if (undefined !== tmp13) { if (!tmp18) { if (!tmp) { let indexByKey2 = state.indexByKey; value = indexByKey2.get(tmp13); if (undefined !== value) { if (value < startNoBuffer1) { let obj = { containerIndex: num2, distance: value < startNoBuffer1 ? startNoBuffer1 - value : value - endNoBuffer1 }; let arr2 = items.push(obj); } } } } } let obj3 = { containerIndex: num2, distance: null }; let _Number = Number; obj3.distance = Number.POSITIVE_INFINITY; let arr3 = items.push(obj3); } } } const sorted = items.sort(closure_98); const _Array = Array; const array = new Array(length); let sum = tmp56; c5 = false; function assign(itemIndex, containerIndex) { array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType }; let deleteResult; if (null != set) { deleteResult = set.delete(containerIndex); } if (deleteResult) { c5 = true; } } function assignMatching(found, items, arg2) { closure_1 = arg2; function _loop2(iter) { items = iter; if (closure_1_4[iter.order]) { return 1; } else { const findIndexResult = items.findIndex(() => { ... }); if (-1 !== findIndexResult) { const containerIndex = array(items.splice(findIndexResult, 1), 1)[0].containerIndex; if (typeof assign === "function") { const obj = { containerIndex, itemIndex: null, itemType: null }; ({ itemIndex: obj.itemIndex, itemType: obj.itemType } = iter); tmp[iter.order] = obj; let deleteResult; if (null != set) { deleteResult = obj2.delete(containerIndex); } if (deleteResult) { c5 = true; } obj2 = set; } else { throw new TypeError("Trying to call a non-function"); } } } } const iter = found[Symbol.iterator](); while (iter !== undefined) { let _loop2Result = _loop2(iter.next()); continue; } } function assignFromPool(found, items, arg2) { if (closure_0) { assignMatching(found, items, (arg0, arg1) => { let tmp = undefined !== arg1; if (tmp) { tmp = arg0 === arg1; } return tmp; }); } assignMatching(found, items, (arg0) => undefined === arg0); if (arg2) { assignMatching(found, items, () => true); } } assignFromPool(found, items, true); assignFromPool(found1, items1, false); for (const item10099 of mapped) { let tmp36 = item10099; if (!array[item10099.order]) { let tmp38 = +sum; sum = tmp38 + 1; let tmp39 = tmp38; if (tmp36.isSticky) { let addResult = stickyContainerPool.add(tmp39); } let obj4 = assign(tmp36, tmp39); } continue; } if (c5) { items.length = 0; if (set) { for (const item10120 of set) { let arr7 = arg4.push(item10120); continue; } } } if (closure_31) { let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled"); if (null == POSITIVE_INFINITY) { const _Number3 = Number; POSITIVE_INFINITY = Number.POSITIVE_INFINITY; } if (sum > POSITIVE_INFINITY) { const _console = console; const obj5 = { debugInfo: null }; const obj10 = { numContainers: tmp56, numContainersPooled: POSITIVE_INFINITY, numNeeded: length, stillNeeded: sum - tmp56 }; obj5.debugInfo = obj10; console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj5); } } return array; } })(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, tmp88); let iter = tmp275[Symbol.iterator](); let nextResult = iter.next(); while (iter !== undefined) { let itemIndex = nextResult.itemIndex; let tmp281 = itemIndex; let containerIndex = nextResult.containerIndex; let tmp282 = idCache[itemIndex]; let tmp280 = nextResult; if (null != tmp282) { let tmp288 = tmp282; } else { tmp288 = closure_1_49(state, tmp281); } let tmp289 = tmp288; let tmp293 = containerItemKeys; let _HermesInternal3 = HermesInternal; let tmp291 = closure_1_21; let tmp295 = closure_1_21(containerItemKeys, "containerItemKey" + containerIndex); let tmp296 = tmp295; if (tmp295) { tmp295 = tmp296 !== tmp289; } if (tmp295) { let deleteResult = containerItemKeys.delete(tmp296); } if (tmp296 !== tmp289) { if (null == set2) { let _Set3 = Set; let tmp304 = new.target; let tmp305 = new.target; set2 = new Set(); } let addResult2 = set2.add(containerIndex); let tmp311 = state.containerItemGenerations[containerIndex]; let num28 = 0; if (null != tmp311) { num28 = tmp311; } state.containerItemGenerations[containerIndex] = num28 + 1; } let tmp314 = context; let _HermesInternal4 = HermesInternal; let tmp318 = context(tmp293, "containerItemKey" + containerIndex, tmp289); let _HermesInternal5 = HermesInternal; let tmp320 = context(tmp293, "containerItemIndex" + containerIndex, tmp281); let _HermesInternal6 = HermesInternal; let tmp321 = context(tmp293, "containerItemData" + containerIndex, data[tmp281]); let tmp323 = state; let containerItemMetadata = state.containerItemMetadata; let result4 = containerItemMetadata.set(containerIndex, ref3(state, itemIndex, data[tmp281], tmp280.itemType)); let result5 = containerItemKeys.set(tmp289, containerIndex); let userScrollAnchorReset = state.userScrollAnchorReset; if (null != userScrollAnchorReset) { let keys = tmp330.keys; let addResult3 = keys.add(tmp289); } let _HermesInternal7 = HermesInternal; let combined = "containerSticky" + containerIndex; let hasItem = stickyHeaderIndicesSet.has(tmp281); let isPinnedRenderIndexResult = isPinnedRenderIndex(tmp281); if (hasItem) { let tmp314Result = tmp314(tmp293, combined, true); let stickyContainerPool2 = tmp323.stickyContainerPool; let addResult4 = stickyContainerPool2.add(containerIndex); } else { if (tmp291(tmp293, combined)) { let tmp314Result2 = tmp314(tmp293, combined, false); } let stickyContainerPool = tmp323.stickyContainerPool; if (isPinnedRenderIndexResult) { let addResult5 = stickyContainerPool.add(containerIndex); } else { let deleteResult1 = stickyContainerPool.delete(containerIndex); } } if (containerIndex >= sum4) { sum4 = containerIndex + 1; } continue; } if (sum4 !== tmp16) { context(containerItemKeys, "numContainers", sum4); if (sum4 > closure_1_21(containerItemKeys, "numContainersPooled")) { tmp364(tmp366, "numContainersPooled", (function getExpandedContainerPoolSize(length, sum4) { num = 0; if (length > 0) { num = 0; if (sum4 > 0) { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const _Math4 = Math; const bound = Math.max(length, sum4); num = Math.min(bound, Math.max(sum4, Math.ceil(1.5 * sum4))); } } return num; })(length, sum4)); } tmp364 = context; tmp366 = containerItemKeys; } } tmp233 = state; const userScrollAnchorReset2 = state.userScrollAnchorReset; let size; if (null != userScrollAnchorReset2) { size = userScrollAnchorReset2.keys.size; } if (0 === size) { tmp233.userScrollAnchorReset = undefined; } tmp476 = set1; } } if (tmp233.stickyContainerPool.size > 0) { let currentStickyIdx1; if (null != stickyState) { currentStickyIdx1 = stickyState.currentStickyIdx; } let num30 = -1; if (null != currentStickyIdx1) { num30 = currentStickyIdx1; } (function handleStickyRecycling(containerItemKeys, prop, arg2, arg3, currentStickyIdx1, items, isPinnedRenderIndex) { state = containerItemKeys.state; const iter = state.stickyContainerPool[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { let tmp2 = nextResult; let _HermesInternal = HermesInternal; let tmp4 = length(containerItemKeys, "containerItemKey" + nextResult); value = undefined; if (tmp4) { let indexByKey = state.indexByKey; value = indexByKey.get(tmp5); } let tmp8 = value; if (undefined !== value) { if (!isPinnedRenderIndex(tmp8)) { let index = prop.indexOf(tmp8); let tmp11 = index; if (-1 !== index) { if (tmp11 < currentStickyIdx1 - 1) { let tmp19 = prop[tmp11 + 1]; flag = false; if (tmp19) { let tmp45 = state.positions[tmp20]; let tmp47 = undefined !== tmp45; if (tmp47) { tmp47 = arg2 > tmp46 + 2 * arg3; } flag = tmp47; } else { let tmp22 = state.idCache[tmp8]; if (null != tmp22) { let tmp26 = tmp22; } else { tmp26 = closure_1_49(state, tmp8); } let tmp27 = tmp26; if (tmp26) { let tmp29 = state.positions[tmp8]; let sizes = state.sizes; value2 = sizes.get(tmp27); if (null != value2) { } else { let tmp38 = closure_1_58(containerItemKeys, tmp27, value, state.props.data[tmp8]); } let tmp41 = undefined !== tmp29; if (tmp41) { tmp41 = arg2 > tmp29 + tmp39 + 3 * arg3; } flag = tmp41; } } if (flag) { let arr = items.push(tmp2); } } } else { let stickyContainerPool = state.stickyContainerPool; let deleteResult = stickyContainerPool.delete(tmp2); let _HermesInternal2 = HermesInternal; let tmp15 = bound2(containerItemKeys, "containerSticky" + tmp2, false); } } } continue; } })(containerItemKeys, prop, closure_12, tmp9, num30, items, isPinnedRenderIndex); } if (items.length > 0) { const _Set4 = Set; const set3 = new Set(items); } let num32 = 0; let flag5 = false; if (0 < sum4) { do { let tmp398 = containerItemKeys; let _HermesInternal8 = HermesInternal; let tmp399 = closure_1_21(containerItemKeys, "containerItemKey" + num32); let hasItem1; let tmp400 = num32; if (null != set3) { hasItem1 = set3.has(num32); } if (hasItem1) { if (undefined !== tmp399) { let deleteResult2 = containerItemKeys.delete(tmp399); if (null == set2) { let _Set5 = Set; let tmp408 = new.target; let tmp409 = new.target; set2 = new Set(); } let addResult6 = set2.add(num32); let tmp414 = state.containerItemGenerations[num32]; let num33 = 0; if (null != tmp414) { num33 = tmp414; } state.containerItemGenerations[num32] = num33 + 1; } let containerItemMetadata2 = state.containerItemMetadata; let tmp416 = state; let deleteResult3 = containerItemMetadata2.delete(num32); let stickyContainerPool3 = state.stickyContainerPool; if (stickyContainerPool3.has(num32)) { let _HermesInternal9 = HermesInternal; let tmp421 = context(tmp398, "containerSticky" + num32, false); let stickyContainerPool4 = tmp416.stickyContainerPool; let deleteResult4 = stickyContainerPool4.delete(num32); } let _HermesInternal10 = HermesInternal; let tmp427 = context(tmp398, "containerItemKey" + num32, undefined); let _HermesInternal11 = HermesInternal; let tmp428 = context(tmp398, "containerItemIndex" + num32, undefined); let _HermesInternal12 = HermesInternal; let tmp429 = context(tmp398, "containerItemData" + num32, undefined); let _HermesInternal13 = HermesInternal; let tmp431 = context(tmp398, "containerPosition" + num32, hasHadNonEmptyData); let _HermesInternal14 = HermesInternal; let tmp432 = context(tmp398, "containerColumn" + num32, -1); let _HermesInternal15 = HermesInternal; let tmp433 = context(tmp398, "containerSpan" + num32, 1); let tmp404 = flag5; } else { let value6 = indexByKey.get(tmp399); tmp404 = flag5; if (undefined !== value6) { let obj4 = { scrollAdjustPending: null, updateLayout: true }; obj4.scrollAdjustPending = num; let tmp405 = closure_1_88(tmp398, tmp400, value6, obj4).didChangePosition || flag5; tmp404 = tmp405; } } num32 = num32 + 1; flag5 = tmp404; } while (num32 < sum4); } let tmp435 = set2; if (set2) { tmp435 = overrideItemLayout; } if (tmp435) { closure_1_87(containerItemKeys, set2); } if (!tmp13) { closure_1_84(containerItemKeys); } else { closure_1_102(state, obj2.startNoBuffer); if (!queuedInitialLayout) { if (!tmp442.didContainersLayout) { if (closure_1_41(tmp442)) { let tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } else { tmp447Result = tmp447(tmp442, tmp442.startNoBuffer, tmp442.endNoBuffer); if (!tmp447Result) { tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } } if (tmp447Result) { (function setDidLayout(containerItemKeys) { containerItemKeys.state.queuedInitialLayout = true; closure_1_42(containerItemKeys); closure_1_47(containerItemKeys, { didLayout: true }); })(containerItemKeys); (function handleInitialScrollLayoutReady(containerItemKeys) { closure_0 = containerItemKeys; if (containerItemKeys.state.initialScroll) { closure_76(containerItemKeys, { forceScroll: true }); const initialScrollSession = containerItemKeys.state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("offset" !== kind) { const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(function runScroll() { return closure_2_76(closure_0, { forceScroll: true }); }); } closure_129_0 = containerItemKeys; const scrollingTo = containerItemKeys.state.scrollingTo; { let isInitialScroll; if (null != scrollingTo) { isInitialScroll = scrollingTo.isInitialScroll; } } } })(containerItemKeys); } } } let tmp455 = viewabilityConfigCallbackPairs; if (viewabilityConfigCallbackPairs) { tmp455 = null !== obj2.startNoBuffer; } if (tmp455) { tmp455 = null !== obj2.endNoBuffer; } if (tmp455) { state = containerItemKeys.state; ({ startNoBuffer, endNoBuffer } = obj2); if (null == startNoBuffer1) { startNoBuffer1 = obj2.startNoBuffer; } if (null == endNoBuffer1) { endNoBuffer1 = obj2.endNoBuffer; } closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, startNoBuffer1, endNoBuffer1); } let prop2; if (null != stickyState) { prop2 = stickyState.finishCalculateItemsInView; } if (null != prop2) { const call2 = prop2.call; if (typeof call2 === "unknown") { prop2(); } else { call2(stickyState); } } } tmp109 = closure_1_21; tmp111 = containerItemKeys; const tmp15Result = tmp15(tmp7, "stylePaddingTop"); tmp214 = state; } } } }); const userScrollAnchorReset2 = state2.userScrollAnchorReset; let size; if (null != userScrollAnchorReset2) { size = userScrollAnchorReset2.keys.size; } if (0 === size) { state2.userScrollAnchorReset = undefined; } } else { closure_0 = state; closure_1 = { doMVCP: true }; state = state.state; fn(() => { let set2; let tmp163; let tmp164; let containerItemKeys = state.containerItemKeys; ({ enableScrollForNextCalculateItemsInView, idCache } = state); ({ indexByKey, minIndexSizeChanged, positions, props } = state); ({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props); ({ keyExtractor, onStickyHeaderChange: closure_4 } = props); ({ scrollForNextCalculateItemsInView, scrollLength } = state); ({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state); const data = state.props.data; let prop = state.props.stickyHeaderIndicesArr; if (!prop) { prop = []; } let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet; if (!stickyHeaderIndicesSet) { let _Set = Set; stickyHeaderIndicesSet = new Set(); } let tmp9 = closure_1_46(containerItemKeys, idCache.drawDistanceMode); ({ dataChanged, doMVCP, forceFullItemPositions } = idCache); let initialScrollSession = tmp2.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = tmp2.initialScrollSession.bootstrap; } let tmp16 = closure_1_21(containerItemKeys, "numContainers"); if (data) { if (0 !== scrollLength) { if (tmp16) { closure_8 = ref2(tmp7); let sum = tmp15(tmp7, "stylePaddingTop") + tmp15(tmp7, "alignItemsAtEndPadding"); closure_9 = sum + tmp15(tmp7, "headerSize"); const tmp15Result3 = tmp15(tmp7, "numColumns"); let scrollVelocity = idCache.scrollVelocity; if (null == scrollVelocity) { scrollVelocity = closure_1_69(tmp2); } ({ initialScroll, queuedInitialLayout } = tmp2); if (!tmp13) { let scroll1; if (null != bootstrap) { scroll1 = bootstrap.scroll; } if (null == scroll1) { scroll1 = tmp2.scroll; } let scroll = scroll1; } else { if (!queuedInitialLayout) { if (closure_1_41(tmp2)) { if (initialScroll) { scroll = closure_1_75(tmp7, initialScroll); } } } scroll = tmp2.scroll; } let num = 0; closure_11 = 0; closure_12 = 0; closure_13 = 0; closure_14 = 0; scrollBottomBuffered = 0; closure_16 = scroll; function updateScroll2(scroll) { closure_16 = scroll; values = values.values; value = values.get("scrollAdjustPending"); num = 0; if (null != value) { num = value; } closure_11 = num - closure_9; const rounded = Math.round(scroll + closure_11); closure_12 = rounded; if (rounded + scrollLength > closure_8) { const _Math = Math; closure_12 = Math.max(0, tmp4 - tmp3); } } updateScroll2(scroll); const tmp15Result4 = tmp15(tmp7, "activeStickyIndex"); closure_17 = tmp15Result4; function resolveStickyState() { num = -1; let num2 = -1; if (prop.length > 0) { let diff = arr.length - 1; let tmp5 = num; if (0 <= diff) { while (true) { let tmp6 = tmp3[arr[diff]]; if (undefined === tmp6) { diff = diff - 1; tmp5 = num; if (0 > diff) { break; } } else { tmp5 = diff; if (tmp >= tmp6) { break; } } break; } } num2 = tmp5; } if (0 <= num2) { num = arr[num2]; } let tmp8 = num2 >= 0; if (0 > num2) { tmp8 = tmp9 >= 0; } if (tmp8) { context(containerItemKeys, "activeStickyIndex", num); } let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null }; finishCalculateItemsInView = undefined; if (closure_4) { if (arr.length > 0) { if (tmp9 !== num) { finishCalculateItemsInView = () => { if (undefined !== data[num]) { if (null != closure_2_4) { const obj = { index: tmp, item: tmp2 }; tmp3(obj); } } }; } } } obj.finishCalculateItemsInView = finishCalculateItemsInView; return obj; } if (!dataChanged) { let stickyState = resolveStickyState(); } let result2 = tmp9; let result3 = tmp9; if (scrollVelocity > 0) { let result = 0.5 * tmp9; const result1 = 1.5 * tmp9; result3 = result1; result2 = result; } else { if (0 === scrollVelocity) { let _Math = Math; num = 50; } result2 = 1.5 * tmp9; result3 = 0.5 * tmp9; } let num6 = 0; if (!dataChanged) { num6 = 0; if (!forceFullItemPositions) { num6 = 0; if (!tmp25) { num6 = 0; if (!closure_1_41(tmp2)) { num6 = 0; if (!tmp2.scrollingTo) { num6 = 0; if (!tmp2.pendingNativeMVCPAdjust) { num6 = 0; if (tmp15(tmp7, "readyToRender")) { let _Math2 = Math; num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) { if (arg1 <= 0) { return 0; } else { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const bound = Math.min(1, Math.abs(scrollVelocity) / 4); return Math.sign(scrollVelocity) * arg1 * bound; } })(scrollVelocity, Math.min(result2, result3)); } } } } } } } function updateScrollRange() { const bound = Math.max(0, closure_12); closure_14 = Math.max(bound, closure_12 + scrollLength + Math.max(0, -closure_16)); closure_13 = bound - result2 + num6; closure_15 = closure_14 + result3 + num6; } updateScrollRange(); if (0 !== num6) { (function scheduleRenderRangeProjectionSettle(containerItemKeys) { state = containerItemKeys.state; const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle; if (undefined !== timeoutRenderRangeProjectionSettle) { const _clearTimeout = clearTimeout; clearTimeout(timeoutRenderRangeProjectionSettle); let timeouts = state.timeouts; timeouts.delete(timeoutRenderRangeProjectionSettle); } const timerId = setTimeout(() => { state.timeoutRenderRangeProjectionSettle = undefined; const timeouts = state.timeouts; timeouts.delete(timerId); state.scrollHistory.length = 0; const triggerCalculateItemsInView = state.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(); } else { call(state); } } }, 100); state.timeoutRenderRangeProjectionSettle = timerId; const timeouts2 = state.timeouts; timeouts2.add(timerId); })(tmp7); } if (enableScrollForNextCalculateItemsInView) { if (!tmp25) { if (!dataChanged) { if (!forceFullItemPositions) { if (scrollForNextCalculateItemsInView) { ({ top, bottom } = scrollForNextCalculateItemsInView); if (null === top) { if (null === bottom) { tmp2.scrollForNextCalculateItemsInView = undefined; } } if (null === top) { if (viewabilityConfigCallbackPairs) { (function updateViewabilityForCachedRange(containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, arg3, arg4) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { let tmp7 = null; let sum1; let tmp9 = null; if (startBuffered <= endBuffered) { let tmp3 = null; let tmp5 = null; let tmp6 = startBuffered; tmp7 = null; tmp9 = null; if (startBuffered < data1.length) { while (true) { let tmp10 = tmp[tmp6]; let tmp11 = tmp3; let tmp12 = tmp4; let tmp13 = tmp5; let tmp14 = tmp6; if (null == tmp10) { ({ data, keyExtractor } = state.props); let str2 = ""; if (data) { let tmp15 = null; if (tmp6 < data.length) { let keyExtractorResult = tmp6; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp6], tmp6); } tmp15 = keyExtractorResult; } state.idCache[tmp6] = tmp15; str2 = tmp15; } tmp10 = str2; } value = sizes.get(tmp10); if (null == value) { value = closure_1_58(containerItemKeys, tmp18, tmp14, data1[tmp6]); } let tmp23 = tmp2[tmp6]; let tmp24 = null === tmp11 && tmp23 + value > arg3; if (tmp24) { tmp11 = tmp6; } let tmp25 = undefined === tmp12 && tmp23 >= arg3 - 10 && tmp23 <= arg4; if (tmp25) { tmp12 = tmp6; } let tmp26 = tmp13; flag = false; if (null !== tmp11) { flag2 = true; if (tmp23 <= arg4) { tmp13 = tmp6; flag2 = false; } tmp26 = tmp13; flag = flag2; } tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (flag) { break; } else { let sum = tmp6 + 1; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (sum > endBuffered) { break; } else { tmp3 = tmp11; tmp4 = tmp12; tmp5 = tmp26; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; tmp6 = sum; if (sum >= data1.length) { break; } } } } } } const obj = { endNoBuffer: tmp9, firstFullyOnScreenIndex: sum1, idsInView: null, startNoBuffer: null }; if (null == sum1) { sum1 = tmp7; } const items = []; if (null != sum1) { if (null !== tmp9) { if (sum1 <= tmp9) { do { let tmp29 = state.idCache[sum1]; if (null == tmp29) { ({ data: data2, keyExtractor: keyExtractor2 } = state.props); let str4 = ""; if (data2) { let tmp31 = null; if (sum1 < data2.length) { let keyExtractor2Result = sum1; if (keyExtractor2) { keyExtractor2Result = keyExtractor2(data2[sum1], sum1); } tmp31 = keyExtractor2Result; } state.idCache[sum1] = tmp31; str4 = tmp31; } tmp29 = str4; } let arr = items.push(tmp29); sum1 = sum1 + 1; } while (sum1 <= tmp9); } } } obj.idsInView = items; obj.startNoBuffer = tmp7; const merged = Object.assign(state, obj); closure_1_102(state, tmp7); if (tmp37) { closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered); } tmp37 = null !== tmp7 && null !== tmp9; } } } } })(tmp7, viewabilityConfigCallbackPairs, scrollLength, closure_12, closure_14); } else if (tmp2.props.onFirstVisibleItemChanged) { closure_1_102(tmp2, (function findFirstVisibleIndexInCachedRange(containerItemKeys, arg1) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { if (startBuffered <= endBuffered) { if (startBuffered < data1.length) { while (true) { let tmp3 = tmp[startBuffered]; let tmp4 = startBuffered; if (null == tmp3) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp5 = null; if (startBuffered < data.length) { let keyExtractorResult = startBuffered; if (keyExtractor) { keyExtractorResult = keyExtractor(data[startBuffered], startBuffered); } tmp5 = keyExtractorResult; } state.idCache[startBuffered] = tmp5; str = tmp5; } tmp3 = str; } value = sizes.get(tmp3); let tmp9 = value; if (null == value) { tmp9 = closure_1_58(containerItemKeys, tmp8, tmp4, data1[startBuffered]); } if (tmp2[startBuffered] + tmp9 > arg1) { break; } else { let sum = startBuffered + 1; if (sum <= endBuffered) { startBuffered = sum; } } } return startBuffered; } } return null; } } } } return null; })(tmp7, closure_12)); } let prop1; if (null != stickyState) { prop1 = stickyState.finishCalculateItemsInView; } if (null != prop1) { let call = prop1.call; typeof call === "unknown" ? prop1() : call(stickyState); } } } } } } } let tmp73; if (doMVCP) { if (!tmp25) { tmp73 = closure_1_68(tmp7, dataChanged); } } if (dataChanged) { closure_1_86(tmp2); } let num8 = 0; if (!forceFullItemPositions) { num8 = 0; if (!dataChanged) { let startBuffered = minIndexSizeChanged; if (null == minIndexSizeChanged) { startBuffered = tmp2.startBuffered; } let num9 = 0; if (null != startBuffered) { num9 = startBuffered; } num8 = num9; } } let obj = { doMVCP, forceFullUpdate: forceFullItemPositions, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null }; let tmp82 = !forceFullItemPositions; if (!forceFullItemPositions) { tmp82 = !dataChanged; } if (tmp82) { tmp82 = tmp15Result3 > 1; } if (tmp82) { tmp82 = undefined !== minIndexSizeChanged; } obj.optimizeForVisibleWindow = tmp82; obj.scrollBottomBuffered = scrollBottomBuffered; obj.scrollVelocity = scrollVelocity; obj.startIndex = num8; closure_1_89(tmp7, dataChanged, obj); const tmp17Result = ref2(tmp7); closure_8 = tmp17Result; if (undefined !== minIndexSizeChanged) { tmp2.minIndexSizeChanged = undefined; } if (dataChanged) { if (doMVCP) { if (tmp2.props.maintainVisibleContentPosition.data) { if (tmp2.didContainersLayout) { if (tmp2.idsInView.length > 0) { const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition; const _Set2 = Set; set = new Set(); const idsInView = tmp2.idsInView; for (const item10226 of idsInView) { let tmp99 = item10226; value = indexByKey.get(item10226); let tmp101 = value; if (undefined !== value) { let tmp102 = shouldRestorePosition; if (shouldRestorePosition) { tmp102 = !shouldRestorePosition(data[tmp101], tmp101, data); } if (!tmp102) { let addResult = set.add(tmp99); } } continue; } } } } } } const tmp112 = closure_1_21(containerItemKeys, "scrollAdjustPending"); let num11 = 0; if (null != tmp112) { num11 = tmp112; } if (null != tmp73) { tmp73(); } let tmp114 = tmp73; if (tmp114) { let tmp116 = tmp107.scroll !== state.scroll; if (!tmp116) { const tmp109Result = tmp109(tmp111, "scrollAdjustPending"); let num12 = 0; if (null != tmp109Result) { num12 = tmp109Result; } tmp116 = num12 !== num11; } tmp114 = tmp116; } if (tmp114) { updateScroll2(tmp107.scroll); updateScrollRange(); } if (dataChanged) { stickyState = resolveStickyState(); } let tmp123; if (!tmp13) { let targetIndexSeed; if (null != bootstrap) { targetIndexSeed = bootstrap.targetIndexSeed; } tmp123 = targetIndexSeed; } if (null == tmp123) { let num13 = !dataChanged; if (!dataChanged) { num13 = startBufferedId; } if (num13) { num13 = indexByKey.get(startBufferedId); } if (!num13) { num13 = 0; } tmp123 = num13; } let diff = tmp123; let tmp126 = tmp123; let tmp127 = tmp123; if (tmp123 >= 0) { while (true) { let tmp128 = idCache[diff]; let tmp129 = diff; if (null == tmp128) { tmp128 = closure_1_49(state, diff); } let value4 = sizes.get(tmp128); if (null == value4) { value4 = closure_1_58(containerItemKeys, tmp135, tmp129, data[diff]); } tmp127 = tmp126; if (positions[diff] + value4 <= closure_13) { break; } else { diff = diff - 1; tmp126 = tmp129; tmp127 = tmp129; if (diff < 0) { break; } } } } let tmp143 = tmp127; if (tmp15Result3 > 1) { let diff1 = tmp127; tmp143 = tmp127; if (tmp127 > 0) { tmp143 = diff1; while (1 !== state.columns[diff1]) { tmp143 = diff1; if (undefined === tmp145) { break; } else { diff1 = diff1 - 1; tmp143 = diff1; if (0 >= diff1) { break; } } } } } let num16 = 0; let num17 = 0; let num18 = 0; if (0 < tmp16) { do { let _HermesInternal = HermesInternal; let tmp152 = closure_1_21(containerItemKeys, "containerItemKey" + num16); let bound = num17; if (undefined !== tmp152) { let _Math3 = Math; bound = Math.max(num17, indexByKey.get(tmp152)); } num16 = num16 + 1; num17 = bound; num18 = bound; } while (num16 < tmp16); } let obj2 = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: -1 }; const length = data.length; let _Math4 = Math; const bound1 = Math.max(0, tmp143); let tmp157 = bound1; let flag3 = false; let tmp160 = null; let tmp161 = null; let tmp162 = null; let endNoBuffer1 = null; let tmp166 = null; let startNoBuffer1 = null; if (bound1 < length) { while (true) { let tmp168 = idCache[tmp157]; let tmp169 = tmp157; let tmp171 = tmp158; let tmp172 = tmp159; let tmp173 = tmp160; let tmp174 = tmp161; let tmp175 = tmp162; if (null == tmp168) { tmp168 = closure_1_49(state, tmp157); } let value5 = sizes.get(tmp168); if (null == value5) { value5 = closure_1_58(containerItemKeys, tmp180, tmp169, data[tmp157]); } let tmp187 = positions[tmp157]; let tmp188 = tmp171; let tmp189 = tmp172; let tmp190 = tmp173; let tmp191 = tmp174; let tmp192 = tmp175; let tmp193 = flag3; if (!flag3) { let tmp201 = closure_1_100(obj2, tmp169, tmp187, value5, closure_12, closure_14); let tmp202 = null === tmp175; if (tmp202) { tmp202 = tmp187 + value5 > closure_13; } if (tmp202) { let tmp205 = null; if (closure_13 >= 0) { tmp205 = tmp187; } tmp172 = tmp205; tmp174 = tmp168; tmp175 = tmp157; } let tmp206 = flag3; let tmp207 = tmp171; let tmp208 = tmp173; if (null !== obj2.startNoBuffer) { let flag4 = true; if (tmp187 <= scrollBottomBuffered) { let sum1 = null; if (scrollBottomBuffered <= tmp17Result) { sum1 = tmp187 + value5; } tmp171 = sum1; flag4 = flag3; tmp173 = tmp157; } tmp206 = flag4; tmp207 = tmp171; tmp208 = tmp173; } tmp193 = tmp206; tmp188 = tmp207; tmp190 = tmp208; tmp189 = tmp172; tmp191 = tmp174; tmp192 = tmp175; } let sum2 = tmp157 + 1; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; if (sum2 >= length) { break; } else { tmp157 = sum2; flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; if (!tmp193) { continue; } else { flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; tmp157 = sum2; if (sum2 > num18) { break; } } continue; } } } const _Object = Object; let obj3 = { endBuffered: endNoBuffer1, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null }; ({ endNoBuffer: obj5.endNoBuffer, firstFullyOnScreenIndex: obj5.firstFullyOnScreenIndex } = obj2); obj3.idsInView = closure_1_101(state, obj2); obj3.startBuffered = startNoBuffer1; obj3.startBufferedId = tmp166; obj3.startNoBuffer = obj2.startNoBuffer; let merged = Object.assign(state, obj3); if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp164; } if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp163; } if (enableScrollForNextCalculateItemsInView) { if (!closure_1_54(tmp164)) { const rect = { bottom: tmp163, top: tmp164 }; const tmp219 = rect; } tmp214.scrollForNextCalculateItemsInView = tmp219; } let sum4 = tmp16; let items = []; if (dataChanged) { let num21 = 0; if (0 < sum4) { do { let _HermesInternal2 = HermesInternal; let tmp226 = closure_1_21(containerItemKeys, "containerItemKey" + num21); let tmp227 = !keyExtractor; if (keyExtractor) { let tmp229 = tmp226; if (tmp226) { tmp229 = undefined === indexByKey.get(tmp226); } tmp227 = tmp229; } if (tmp227) { let arr = items.push(num21); } num21 = num21 + 1; } while (num21 < sum4); } } let tmp233 = state; const scrollTargetPinnedRange = state.scrollTargetPinnedRange; let bound2 = 0; let bound3 = -1; let num23 = -1; let num24 = 0; if (scrollTargetPinnedRange) { const _Math5 = Math; const _Math6 = Math; bound2 = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); const _Math7 = Math; const _Math8 = Math; const diff2 = length - 1; bound3 = Math.min(diff2, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); num23 = bound3; num24 = bound2; } closure_24 = tmp237; function isPinnedRenderIndex(arg0) { let hasItem = set.has(arg0); if (!hasItem) { let tmp2 = closure_24; if (closure_24) { tmp2 = arg0 >= bound2; } if (tmp2) { tmp2 = arg0 <= bound3; } hasItem = tmp2; } return hasItem; } if (null !== startNoBuffer1) { if (null !== endNoBuffer1) { let items1 = []; const _Set6 = Set; const set1 = new Set(); function addPinnedIndex(bound2) { if (bound2 >= 0) { if (bound2 < length) { let tmp4 = idCache[bound2]; if (null == tmp4) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp2 = null; if (bound2 < data.length) { let keyExtractorResult = bound2; if (keyExtractor) { keyExtractorResult = keyExtractor(data[bound2], bound2); } tmp2 = keyExtractorResult; } tmp.idCache[bound2] = tmp2; str = tmp2; } tmp4 = str; } value = containerItemKeys.get(tmp4); if (undefined !== value) { const stickyContainerPool = state.stickyContainerPool; stickyContainerPool.add(value); } else { let hasItem = null == tmp4; if (!hasItem) { hasItem = set1.has(bound2); } if (!hasItem) { set1.add(bound2); items1.push(bound2); } } } } } let sum3 = startNoBuffer1; if (startNoBuffer1 <= endNoBuffer1) { do { let tmp238 = idCache[sum3]; if (null == tmp238) { tmp238 = closure_1_49(state, sum3); } if (!containerItemKeys.has(tmp238)) { let addResult1 = set1.add(sum3); let arr2 = items1.push(sum3); } sum3 = sum3 + 1; } while (sum3 <= endNoBuffer1); } for (const item10471 of alwaysRenderIndicesArr) { let addPinnedIndexResult = addPinnedIndex(item10471); continue; } if (tmp237) { if (num24 <= num23) { do { let addPinnedIndexResult1 = addPinnedIndex(num24); num24 = num24 + 1; } while (num24 <= num23); } } if (prop.length > 0) { let currentStickyIdx; if (null != stickyState) { currentStickyIdx = stickyState.currentStickyIdx; } let num25 = -1; if (null != currentStickyIdx) { num25 = currentStickyIdx; } (function handleStickyActivation(containerItemKeys, prop, currentStickyIdx, items1, set1, startNoBuffer1, endNoBuffer1) { state = containerItemKeys.state; num = -1; if (currentStickyIdx >= 0) { num = prop[currentStickyIdx]; } bound2(containerItemKeys, "activeStickyIndex", num); let num2 = 0; do { let diff = currentStickyIdx - num2; if (diff >= 0) { let tmp12 = prop[diff]; if (!closure_1_99(containerItemKeys, tmp12)) { let tmp5 = state.idCache[tmp12]; if (null == tmp5) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp6 = null; if (tmp12 < data.length) { let keyExtractorResult = tmp12; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp12], tmp12); } tmp6 = keyExtractorResult; } state.idCache[tmp12] = tmp6; str = tmp6; } tmp5 = str; } let tmp8 = tmp5; if (tmp5) { containerItemKeys = state.containerItemKeys; tmp8 = !containerItemKeys.has(tmp5); } if (tmp8) { let tmp9 = tmp12 < startNoBuffer1 || tmp12 > endNoBuffer1; tmp8 = tmp9; } if (tmp8) { tmp8 = !set1.has(tmp12); } if (tmp8) { let addResult = set1.add(tmp12); let arr = items1.push(tmp12); } } } num2 = num2 + 1; } while (num2 <= 1); })(containerItemKeys, prop, num25, items1, tmp476, startNoBuffer1, endNoBuffer1); } else if (-1 !== tmp15Result4) { context(containerItemKeys, "activeStickyIndex", -1); } if (items1.length > 0) { let fn; if (getItemType) { fn = (arg0) => { const tmp = getItemType(data[arg0], arg0); let str = ""; if (undefined !== tmp) { const _String = String; str = String(tmp); } return str; }; } const tmp275 = (function findAvailableContainers(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, set) { closure_0 = fn; if (0 === items1.length) { return []; } else { const tmp56 = length(containerItemKeys, "numContainers"); state = containerItemKeys.state; ({ containerItemMetadata: closure_2, stickyContainerPool } = state); set = undefined; if (items.length > 0) { const _Set = Set; set = new Set(items); } const mapped = items1.map((itemIndex, order) => { const obj = { isSticky: null, itemIndex, itemType: null, order: null }; const stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet; obj.isSticky = stickyHeaderIndicesSet.has(itemIndex); let tmp; if (null != closure_0) { tmp = closure_0(itemIndex); } obj.itemType = tmp; obj.order = order; return obj; }); const found = mapped.filter((isSticky) => !isSticky.isSticky); items = []; items1 = []; let num2 = 0; const found1 = mapped.filter((isSticky) => isSticky.isSticky); if (0 < tmp56) { while (true) { let _HermesInternal = HermesInternal; let tmp13 = length(containerItemKeys, "containerItemKey" + num2); let hasItem; if (null != set) { hasItem = set.has(num2); } let tmp16 = !hasItem; if (tmp13) { let hasItem1; if (null != set) { hasItem1 = set.has(tmp13); } if (hasItem1) { let indexByKey = state.indexByKey; } num2 = num2 + 1; if (num2 >= tmp56) { break; } } let tmp18 = !tmp16; if (stickyContainerPool.has(num2)) { let tmp22 = undefined === tmp13 || tmp18; if (tmp22) { let obj2 = { containerIndex: num2, distance: null }; let _Number2 = Number; obj2.distance = Number.POSITIVE_INFINITY; let arr = items1.push(obj2); } } else { if (undefined !== tmp13) { if (!tmp18) { if (!tmp) { let indexByKey2 = state.indexByKey; value = indexByKey2.get(tmp13); if (undefined !== value) { if (value < startNoBuffer1) { let obj = { containerIndex: num2, distance: value < startNoBuffer1 ? startNoBuffer1 - value : value - endNoBuffer1 }; let arr2 = items.push(obj); } } } } } let obj3 = { containerIndex: num2, distance: null }; let _Number = Number; obj3.distance = Number.POSITIVE_INFINITY; let arr3 = items.push(obj3); } } } const sorted = items.sort(closure_98); const _Array = Array; const array = new Array(length); let sum = tmp56; c5 = false; function assign(itemIndex, containerIndex) { array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType }; let deleteResult; if (null != set) { deleteResult = set.delete(containerIndex); } if (deleteResult) { c5 = true; } } function assignMatching(found, items, arg2) { closure_1 = arg2; function _loop2(iter) { items = iter; if (closure_1_4[iter.order]) { return 1; } else { const findIndexResult = items.findIndex(() => { ... }); if (-1 !== findIndexResult) { const containerIndex = array(items.splice(findIndexResult, 1), 1)[0].containerIndex; if (typeof assign === "function") { const obj = { containerIndex, itemIndex: null, itemType: null }; ({ itemIndex: obj.itemIndex, itemType: obj.itemType } = iter); tmp[iter.order] = obj; let deleteResult; if (null != set) { deleteResult = obj2.delete(containerIndex); } if (deleteResult) { c5 = true; } obj2 = set; } else { throw new TypeError("Trying to call a non-function"); } } } } const iter = found[Symbol.iterator](); while (iter !== undefined) { let _loop2Result = _loop2(iter.next()); continue; } } function assignFromPool(found, items, arg2) { if (closure_0) { assignMatching(found, items, (arg0, arg1) => { let tmp = undefined !== arg1; if (tmp) { tmp = arg0 === arg1; } return tmp; }); } assignMatching(found, items, (arg0) => undefined === arg0); if (arg2) { assignMatching(found, items, () => true); } } assignFromPool(found, items, true); assignFromPool(found1, items1, false); for (const item10099 of mapped) { let tmp36 = item10099; if (!array[item10099.order]) { let tmp38 = +sum; sum = tmp38 + 1; let tmp39 = tmp38; if (tmp36.isSticky) { let addResult = stickyContainerPool.add(tmp39); } let obj4 = assign(tmp36, tmp39); } continue; } if (c5) { items.length = 0; if (set) { for (const item10120 of set) { let arr7 = arg4.push(item10120); continue; } } } if (closure_31) { let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled"); if (null == POSITIVE_INFINITY) { const _Number3 = Number; POSITIVE_INFINITY = Number.POSITIVE_INFINITY; } if (sum > POSITIVE_INFINITY) { const _console = console; const obj5 = { debugInfo: null }; const obj10 = { numContainers: tmp56, numContainersPooled: POSITIVE_INFINITY, numNeeded: length, stillNeeded: sum - tmp56 }; obj5.debugInfo = obj10; console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj5); } } return array; } })(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, tmp88); let iter = tmp275[Symbol.iterator](); let nextResult = iter.next(); while (iter !== undefined) { let itemIndex = nextResult.itemIndex; let tmp281 = itemIndex; let containerIndex = nextResult.containerIndex; let tmp282 = idCache[itemIndex]; let tmp280 = nextResult; if (null != tmp282) { let tmp288 = tmp282; } else { tmp288 = closure_1_49(state, tmp281); } let tmp289 = tmp288; let tmp293 = containerItemKeys; let _HermesInternal3 = HermesInternal; let tmp291 = closure_1_21; let tmp295 = closure_1_21(containerItemKeys, "containerItemKey" + containerIndex); let tmp296 = tmp295; if (tmp295) { tmp295 = tmp296 !== tmp289; } if (tmp295) { let deleteResult = containerItemKeys.delete(tmp296); } if (tmp296 !== tmp289) { if (null == set2) { let _Set3 = Set; let tmp304 = new.target; let tmp305 = new.target; set2 = new Set(); } let addResult2 = set2.add(containerIndex); let tmp311 = state.containerItemGenerations[containerIndex]; let num28 = 0; if (null != tmp311) { num28 = tmp311; } state.containerItemGenerations[containerIndex] = num28 + 1; } let tmp314 = context; let _HermesInternal4 = HermesInternal; let tmp318 = context(tmp293, "containerItemKey" + containerIndex, tmp289); let _HermesInternal5 = HermesInternal; let tmp320 = context(tmp293, "containerItemIndex" + containerIndex, tmp281); let _HermesInternal6 = HermesInternal; let tmp321 = context(tmp293, "containerItemData" + containerIndex, data[tmp281]); let tmp323 = state; let containerItemMetadata = state.containerItemMetadata; let result4 = containerItemMetadata.set(containerIndex, ref3(state, itemIndex, data[tmp281], tmp280.itemType)); let result5 = containerItemKeys.set(tmp289, containerIndex); let userScrollAnchorReset = state.userScrollAnchorReset; if (null != userScrollAnchorReset) { let keys = tmp330.keys; let addResult3 = keys.add(tmp289); } let _HermesInternal7 = HermesInternal; let combined = "containerSticky" + containerIndex; let hasItem = stickyHeaderIndicesSet.has(tmp281); let isPinnedRenderIndexResult = isPinnedRenderIndex(tmp281); if (hasItem) { let tmp314Result = tmp314(tmp293, combined, true); let stickyContainerPool2 = tmp323.stickyContainerPool; let addResult4 = stickyContainerPool2.add(containerIndex); } else { if (tmp291(tmp293, combined)) { let tmp314Result2 = tmp314(tmp293, combined, false); } let stickyContainerPool = tmp323.stickyContainerPool; if (isPinnedRenderIndexResult) { let addResult5 = stickyContainerPool.add(containerIndex); } else { let deleteResult1 = stickyContainerPool.delete(containerIndex); } } if (containerIndex >= sum4) { sum4 = containerIndex + 1; } continue; } if (sum4 !== tmp16) { context(containerItemKeys, "numContainers", sum4); if (sum4 > closure_1_21(containerItemKeys, "numContainersPooled")) { tmp364(tmp366, "numContainersPooled", (function getExpandedContainerPoolSize(length, sum4) { num = 0; if (length > 0) { num = 0; if (sum4 > 0) { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const _Math4 = Math; const bound = Math.max(length, sum4); num = Math.min(bound, Math.max(sum4, Math.ceil(1.5 * sum4))); } } return num; })(length, sum4)); } tmp364 = context; tmp366 = containerItemKeys; } } tmp233 = state; const userScrollAnchorReset2 = state.userScrollAnchorReset; let size; if (null != userScrollAnchorReset2) { size = userScrollAnchorReset2.keys.size; } if (0 === size) { tmp233.userScrollAnchorReset = undefined; } tmp476 = set1; } } if (tmp233.stickyContainerPool.size > 0) { let currentStickyIdx1; if (null != stickyState) { currentStickyIdx1 = stickyState.currentStickyIdx; } let num30 = -1; if (null != currentStickyIdx1) { num30 = currentStickyIdx1; } (function handleStickyRecycling(containerItemKeys, prop, arg2, arg3, currentStickyIdx1, items, isPinnedRenderIndex) { state = containerItemKeys.state; const iter = state.stickyContainerPool[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { let tmp2 = nextResult; let _HermesInternal = HermesInternal; let tmp4 = length(containerItemKeys, "containerItemKey" + nextResult); value = undefined; if (tmp4) { let indexByKey = state.indexByKey; value = indexByKey.get(tmp5); } let tmp8 = value; if (undefined !== value) { if (!isPinnedRenderIndex(tmp8)) { let index = prop.indexOf(tmp8); let tmp11 = index; if (-1 !== index) { if (tmp11 < currentStickyIdx1 - 1) { let tmp19 = prop[tmp11 + 1]; flag = false; if (tmp19) { let tmp45 = state.positions[tmp20]; let tmp47 = undefined !== tmp45; if (tmp47) { tmp47 = arg2 > tmp46 + 2 * arg3; } flag = tmp47; } else { let tmp22 = state.idCache[tmp8]; if (null != tmp22) { let tmp26 = tmp22; } else { tmp26 = closure_1_49(state, tmp8); } let tmp27 = tmp26; if (tmp26) { let tmp29 = state.positions[tmp8]; let sizes = state.sizes; value2 = sizes.get(tmp27); if (null != value2) { } else { let tmp38 = closure_1_58(containerItemKeys, tmp27, value, state.props.data[tmp8]); } let tmp41 = undefined !== tmp29; if (tmp41) { tmp41 = arg2 > tmp29 + tmp39 + 3 * arg3; } flag = tmp41; } } if (flag) { let arr = items.push(tmp2); } } } else { let stickyContainerPool = state.stickyContainerPool; let deleteResult = stickyContainerPool.delete(tmp2); let _HermesInternal2 = HermesInternal; let tmp15 = bound2(containerItemKeys, "containerSticky" + tmp2, false); } } } continue; } })(containerItemKeys, prop, closure_12, tmp9, num30, items, isPinnedRenderIndex); } if (items.length > 0) { const _Set4 = Set; const set3 = new Set(items); } let num32 = 0; let flag5 = false; if (0 < sum4) { do { let tmp398 = containerItemKeys; let _HermesInternal8 = HermesInternal; let tmp399 = closure_1_21(containerItemKeys, "containerItemKey" + num32); let hasItem1; let tmp400 = num32; if (null != set3) { hasItem1 = set3.has(num32); } if (hasItem1) { if (undefined !== tmp399) { let deleteResult2 = containerItemKeys.delete(tmp399); if (null == set2) { let _Set5 = Set; let tmp408 = new.target; let tmp409 = new.target; set2 = new Set(); } let addResult6 = set2.add(num32); let tmp414 = state.containerItemGenerations[num32]; let num33 = 0; if (null != tmp414) { num33 = tmp414; } state.containerItemGenerations[num32] = num33 + 1; } let containerItemMetadata2 = state.containerItemMetadata; let tmp416 = state; let deleteResult3 = containerItemMetadata2.delete(num32); let stickyContainerPool3 = state.stickyContainerPool; if (stickyContainerPool3.has(num32)) { let _HermesInternal9 = HermesInternal; let tmp421 = context(tmp398, "containerSticky" + num32, false); let stickyContainerPool4 = tmp416.stickyContainerPool; let deleteResult4 = stickyContainerPool4.delete(num32); } let _HermesInternal10 = HermesInternal; let tmp427 = context(tmp398, "containerItemKey" + num32, undefined); let _HermesInternal11 = HermesInternal; let tmp428 = context(tmp398, "containerItemIndex" + num32, undefined); let _HermesInternal12 = HermesInternal; let tmp429 = context(tmp398, "containerItemData" + num32, undefined); let _HermesInternal13 = HermesInternal; let tmp431 = context(tmp398, "containerPosition" + num32, hasHadNonEmptyData); let _HermesInternal14 = HermesInternal; let tmp432 = context(tmp398, "containerColumn" + num32, -1); let _HermesInternal15 = HermesInternal; let tmp433 = context(tmp398, "containerSpan" + num32, 1); let tmp404 = flag5; } else { let value6 = indexByKey.get(tmp399); tmp404 = flag5; if (undefined !== value6) { let obj4 = { scrollAdjustPending: null, updateLayout: true }; obj4.scrollAdjustPending = num; let tmp405 = closure_1_88(tmp398, tmp400, value6, obj4).didChangePosition || flag5; tmp404 = tmp405; } } num32 = num32 + 1; flag5 = tmp404; } while (num32 < sum4); } let tmp435 = set2; if (set2) { tmp435 = overrideItemLayout; } if (tmp435) { closure_1_87(containerItemKeys, set2); } if (!tmp13) { closure_1_84(containerItemKeys); } else { closure_1_102(state, obj2.startNoBuffer); if (!queuedInitialLayout) { if (!tmp442.didContainersLayout) { if (closure_1_41(tmp442)) { let tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } else { tmp447Result = tmp447(tmp442, tmp442.startNoBuffer, tmp442.endNoBuffer); if (!tmp447Result) { tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } } if (tmp447Result) { (function setDidLayout(containerItemKeys) { containerItemKeys.state.queuedInitialLayout = true; closure_1_42(containerItemKeys); closure_1_47(containerItemKeys, { didLayout: true }); })(containerItemKeys); (function handleInitialScrollLayoutReady(containerItemKeys) { closure_0 = containerItemKeys; if (containerItemKeys.state.initialScroll) { closure_76(containerItemKeys, { forceScroll: true }); const initialScrollSession = containerItemKeys.state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("offset" !== kind) { const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(function runScroll() { return closure_2_76(closure_0, { forceScroll: true }); }); } closure_129_0 = containerItemKeys; const scrollingTo = containerItemKeys.state.scrollingTo; { let isInitialScroll; if (null != scrollingTo) { isInitialScroll = scrollingTo.isInitialScroll; } } } })(containerItemKeys); } } } let tmp455 = viewabilityConfigCallbackPairs; if (viewabilityConfigCallbackPairs) { tmp455 = null !== obj2.startNoBuffer; } if (tmp455) { tmp455 = null !== obj2.endNoBuffer; } if (tmp455) { state = containerItemKeys.state; ({ startNoBuffer, endNoBuffer } = obj2); if (null == startNoBuffer1) { startNoBuffer1 = obj2.startNoBuffer; } if (null == endNoBuffer1) { endNoBuffer1 = obj2.endNoBuffer; } closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, startNoBuffer1, endNoBuffer1); } let prop2; if (null != stickyState) { prop2 = stickyState.finishCalculateItemsInView; } if (null != prop2) { const call2 = prop2.call; if (typeof call2 === "unknown") { prop2(); } else { call2(stickyState); } } } tmp109 = closure_1_21; tmp111 = containerItemKeys; const tmp15Result = tmp15(tmp7, "stylePaddingTop"); tmp214 = state; } } } }); } } else { let didMeasureUserScrollAnchorResetItem = needsRecalculate.didMeasureUserScrollAnchorResetItem; if (didMeasureUserScrollAnchorResetItem) { const userScrollAnchorReset = state.userScrollAnchorReset; let size1; if (null != userScrollAnchorReset) { size1 = userScrollAnchorReset.keys.size; } didMeasureUserScrollAnchorResetItem = 0 === size1; } if (didMeasureUserScrollAnchorResetItem) { state.userScrollAnchorReset = undefined; } } if (tmp9) { doMaintainScrollAtEnd(state); } } function updateItemSizesBatch(measureInLayoutEffect, items) { const state = measureInLayoutEffect.state; const obj = {}; const iter = items[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { let tmp2 = nextResult; if (undefined === nextResult.containerId) { let indexByKey = state.indexByKey; value = indexByKey.get(tmp2.itemKey); let tmp7 = value; let tmp8; if (undefined !== value) { let data = state.props.data; if (null != data) { tmp8 = tmp9[tmp7]; } } let tmp12 = tmp8; let tmp14; if (undefined !== tmp2.containerId) { if (undefined !== tmp7) { if (undefined !== tmp12) { tmp14 = resolveContainerItemMetadata(state, tmp2.containerId, tmp7, tmp12); } } } let tmp27 = mergeItemSizeUpdateResult(obj, applyItemSize(measureInLayoutEffect, tmp2.itemKey, tmp2.size, tmp14)); } else { let _HermesInternal = HermesInternal; } continue; } flushItemSizeUpdates(measureInLayoutEffect, obj); } function applyItemSize(state, itemKey, size, didResolveFixedItemSize) { state = state.state; const userScrollAnchorReset = state.userScrollAnchorReset; let deleteResult; if (null != userScrollAnchorReset) { const keys = userScrollAnchorReset.keys; deleteResult = keys.delete(itemKey); } ({ didContainersLayout, sizesKnown, props } = state); ({ getFixedItemSize, getItemType, horizontal, onItemSizeChanged, maintainScrollAtEnd } = props); if (props.data) { const indexByKey = state.indexByKey; value = indexByKey.get(itemKey); let tmp6 = didResolveFixedItemSize; if (getFixedItemSize) { if (undefined === value) { const obj2 = { didMeasureUserScrollAnchorResetItem: tmp2 }; return obj2; } else if (undefined === state.props.data[value]) { const obj3 = { didMeasureUserScrollAnchorResetItem: tmp2 }; return obj3; } else { let prop; if (null != didResolveFixedItemSize) { prop = didResolveFixedItemSize.didResolveFixedItemSize; } let tmp8 = didResolveFixedItemSize; if (!prop) { let itemType; if (null != didResolveFixedItemSize) { itemType = didResolveFixedItemSize.itemType; } if (null == itemType) { let str2 = ""; if (getItemType) { const itemType1 = getItemType(tmp66, value); str2 = ""; if (null != itemType1) { str2 = itemType1; } } itemType = str2; } const obj4 = { didResolveFixedItemSize: true, fixedItemSize: getFixedItemSize(tmp66, value, itemType), itemType }; tmp8 = obj4; } const fixedItemSize = tmp8.fixedItemSize; tmp6 = tmp8; if (undefined !== fixedItemSize) { tmp6 = tmp8; if (fixedItemSize === sizesKnown.get(itemKey)) { if (state.state.needsOtherAxisSize) { const tmp61 = horizontal ? size.height : size.width; const values2 = state.values; const value6 = values2.get("otherAxisSize"); let tmp63 = !value6; if (value6) { tmp63 = tmp61 > value6; } if (tmp63) { set$(state, "otherAxisSize", tmp61); } } const obj5 = { didMeasureUserScrollAnchorResetItem: tmp2 }; return obj5; } } } } flag = !didContainersLayout; const sizesKnown2 = state.sizesKnown; const value7 = sizesKnown2.get(itemKey); ({ indexByKey: indexByKey2, sizesKnown: sizesKnown3, averageSizes, props: props2 } = state.state); ({ data, getItemType: getItemType2, getFixedItemSize: getFixedItemSize2 } = props2); let num2 = 0; if (data) { const value8 = indexByKey2.get(itemKey); let itemType2; if (null != tmp6) { itemType2 = tmp6.itemType; } let fixedItemSize1; if (null != tmp6) { fixedItemSize1 = tmp6.fixedItemSize; } let tmp17 = getFixedItemSize2; if (getFixedItemSize2) { let prop1; if (null != tmp6) { prop1 = tmp6.didResolveFixedItemSize; } tmp17 = !prop1; } if (tmp17) { let str4 = ""; if (getItemType2) { const itemType21 = getItemType2(tmp14, value8); str4 = ""; if (null != itemType21) { str4 = itemType21; } } fixedItemSize1 = getFixedItemSize2(tmp14, value8, str4); itemType2 = str4; } let prop2; if (null != tmp6) { prop2 = tmp6.didResolveFixedItemSize; } if (!prop2) { const tmp29 = getItemSize(state, itemKey, value8, tmp14, undefined, undefined, undefined, tmp21); const tmp30 = tmp12 ? size.width : size.height; const value9 = sizesKnown3.get(itemKey); if (undefined === value9) { const _Math2 = Math; const result = Math.floor(8 * tmp30) / 8; const result1 = sizesKnown3.set(itemKey, result); if (undefined === fixedItemSize1) { if (0 < result) { if (null == itemType2) { let str6 = ""; if (getItemType2) { const itemType22 = getItemType2(tmp14, value8); str6 = ""; if (null != itemType22) { str6 = itemType22; } } itemType2 = str6; } let tmp39 = averageSizes[itemType2]; if (!tmp39) { const obj6 = { avg: 0, num: 0 }; averageSizes[itemType2] = obj6; tmp39 = obj6; } if (0 === tmp39.num) { tmp39.avg = result; tmp39.num = tmp39.num + 1; } else { if (tmp32) { if (value9 > 0) { tmp39.avg = tmp39.avg + (result - value9) / tmp39.num; } } tmp39.avg = (tmp39.avg * tmp39.num + result) / (tmp39.num + 1); tmp39.num = tmp39.num + 1; } } } if (!tmp29) { setSize(state, itemKey, result); num2 = result - tmp29; } else { const _Math3 = Math; num2 = 0; } } else { const _Math = Math; num2 = 0; } } let prop3; if (null != tmp6) { prop3 = tmp6.didResolveFixedItemSize; } const obj7 = { didResolveFixedItemSize: prop3, fixedItemSize: fixedItemSize1, itemType: itemType2 }; } const _Math4 = Math; const result2 = Math.floor(8 * (horizontal ? size.width : size.height)) / 8; flag2 = false; let tmp44 = flag; let tmp45; if (0 !== num2) { if (didContainersLayout) { flag = value >= state.startBuffered && value <= tmp67; const tmp46 = value >= state.startBuffered && value <= tmp67; } let hasItem = !flag; if (!flag) { const containerItemKeys = state.containerItemKeys; hasItem = containerItemKeys.has(itemKey); } if (hasItem) { flag = true; } let tmp48 = undefined !== value7; if (tmp48) { const _Math5 = Math; tmp48 = Math.abs(value7 - result2) > 5; } let flag3 = false; if (tmp48) { flag3 = true; } if (null != onItemSizeChanged) { const obj8 = { index: value, itemData: state.props.data[value], itemKey, previous: result2 - num2, size: result2 }; onItemSizeChanged(obj8); } maybeUpdateAnchoredEndSpace(state); flag2 = flag3; tmp44 = flag; tmp45 = value; } if (undefined !== tmp45) { let bound = tmp45; if (undefined !== state.minIndexSizeChanged) { const _Math6 = Math; bound = Math.min(state.minIndexSizeChanged, tmp45); } state.minIndexSizeChanged = bound; } if (state.state.needsOtherAxisSize) { const tmp53 = horizontal ? size.height : size.width; const values = state.values; const value10 = values.get("otherAxisSize"); let tmp55 = !value10; if (value10) { tmp55 = tmp53 > value10; } if (tmp55) { set$(state, "otherAxisSize", tmp53); } } if (!didContainersLayout) { if (!checkAllSizesKnown(state, state.startBuffered, state.endBuffered)) { let obj9 = { didChange: tmp58, didMeasureUserScrollAnchorResetItem: tmp2 }; } return obj9; } const obj10 = { didChange: 0 !== num2, didMeasureUserScrollAnchorResetItem: tmp2, needsRecalculate: tmp44, shouldMaintainScrollAtEnd: null }; if (flag2) { let onItemLayout; if (null != maintainScrollAtEnd) { onItemLayout = maintainScrollAtEnd.onItemLayout; } flag2 = onItemLayout; } obj10.shouldMaintainScrollAtEnd = flag2; obj9 = obj10; } else { const obj = { didMeasureUserScrollAnchorResetItem: tmp2 }; return obj; } } function measureContainersInLayoutEffect(context, arg1) { let keys = arg1; if (arg1 === undefined) { keys = null; } c1 = undefined; c2 = undefined; c3 = undefined; let state = context.state; let items = []; c6 = true; if (null == keys) { let viewRefs = context.viewRefs; keys = viewRefs.keys(); } function _loop3(iter) { context = iter; const viewRefs = context.viewRefs; value = viewRefs.get(iter); const values = context.values; const value3 = values.get("containerItemKey" + iter); let itemKey = value3; if (undefined !== value3) { itemKey = tmp22; let num = 0; if (null != state.containerItemGenerations[iter]) { num = itemKey; } const sum = num + 1; current = sum; state.containerItemGenerations[iter] = sum; state = tmp.state; const props = state.props; const data = props.data; const indexByKey = state.indexByKey; const value4 = indexByKey.get(value3); if (data) { if (props.getFixedItemSize) { if (undefined !== value4) { if (undefined !== data[value4]) { const tmp13 = resolveContainerItemMetadata(state, iter, value4, tmp7); let fixedItemSize; if (null != tmp13) { fixedItemSize = tmp13.fixedItemSize; } } } } } if (!state.needsOtherAxisSize) { if (undefined !== tmp6) { const sizesKnown = tmp21.sizesKnown; if (sizesKnown.get(value3) === tmp6 + tmp.scrollAxisGap) { const state2 = tmp.state; const userScrollAnchorReset = state2.userScrollAnchorReset; let deleteResult; if (null != userScrollAnchorReset) { const keys = userScrollAnchorReset.keys; deleteResult = keys.delete(value3); } if (deleteResult) { deleteResult = 0 === userScrollAnchorReset.keys.size; } if (deleteResult) { state2.userScrollAnchorReset = undefined; } } } } if (value) { current = value.current; let measure; if (null != current) { measure = current.measure; } if (null != measure) { const call = measure.call; const fn = (arg0, arg1, width, height) => { let num = 0; if (null != iter.state.containerItemGenerations[iter]) { num = tmp3; } if (num === current) { const obj = { containerId: iter, itemKey, size: null }; const size = { height, width }; obj.size = size; if (c6) { items.push(obj); } else { items = [obj]; updateItemSizesBatch(iter, items); } } }; if (typeof call === "unknown") { tmp18(fn); } else { call(tmp19, fn); } tmp18 = measure; tmp19 = current; } } } } const iter = keys[Symbol.iterator](); while (iter !== undefined) { let _loop3Result = _loop3(iter.next()); continue; } c6 = false; if (items.length > 0) { updateItemSizesBatch(context, items); } } function useValue$(totalSize, arg1) { closure_0 = totalSize; let obj = arg1; if (!arg1) { obj = {}; } const getValue = obj.getValue; const context = frozen.useContext(closure_17); function getNewValue() { } let values = context.values; value = values.get(totalSize); if (getValue) { value2 = getValue(value); } else { value2 = value; } const first = getNewValue(noop.useState(() => { value = new get_ActivityIndicator.Animated.Value(num); return value; }), 1)[0]; const items = [first, context, totalSize]; const layoutEffect = noop.useLayoutEffect(() => { function syncCurrentValue() { if (typeof getNewValue === "function") { values = values.values; value = values.get(syncCurrentValue); if (getValue) { let tmp3Result = getValue(value); } else { tmp3Result = value; } num = 0; if (null != tmp3Result) { num = tmp3Result; } tmp2(num); } else { throw new TypeError("Trying to call a non-function"); } } const listeners = context.listeners; value = listeners.get(closure_0); set = value; let obj = value; if (!value) { const _Set = Set; set = new Set(); const result = listeners.set(tmp2, set); obj = set; } obj.add(syncCurrentValue); if (typeof getNewValue === "function") { let values = tmp.values; value2 = values.get(tmp2); if (getValue) { let tmp13Result = getValue(value2); } else { tmp13Result = value2; } num = 0; if (null != tmp13Result) { num = tmp13Result; } const fn = () => set.delete(closure_0); tmp12(num); return fn; } else { throw new TypeError("Trying to call a non-function"); } tmp = context; }, items); return first; } function useContainerItemSignals(context) { let containerId; if (null != context) { containerId = context.containerId; } let num = -1; if (null != containerId) { num = containerId; } const items = ["containerItemKey" + num, "containerItemIndex" + num, "containerItemData" + num]; let first; context = frozen.useContext(closure_17); if (1 === items.length) { first = items[0]; } else { first = items.join("\0"); } const items1 = [context, first]; const memo = frozen.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; const tmp5 = _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 3); [tmp6, tmp7] = tmp5; return { hasItemInfo: context && undefined !== tmp6 && undefined !== tmp7, item: tmp5[2], itemIndex: tmp7, itemKey: tmp6 }; } function useIsLastItem() { const context = noop.useContext(closure_115); let context2 = context; let containerId; if (null != context) { containerId = context.containerId; } let num = -1; if (null != containerId) { num = containerId; } let items = ["containerItemKey" + num]; closure_129_1 = undefined; const context1 = frozen.useContext(closure_17); closure_129_0 = context1; if (1 === items.length) { let first = items[0]; } else { first = items.join("\0"); } closure_129_1 = first; const items1 = [context1, first]; const memo = obj.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; _slicedToArray(context2(get2[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0]; context2 = obj.useContext(closure_17); const items2 = [context2, "lastItemKeys"]; const memo1 = obj.useMemo(() => { let items = ["lastItemKeys"]; let values = context2; items = []; items = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items2); get2 = memo1.get; const items3 = [ get2, (arr) => { flag = context2; if (context2) { flag = null != get2; } if (flag) { let hasItem; if (null != arr) { hasItem = arr.includes(get2); } flag = hasItem; } if (!flag) { flag = false; } return flag; } ]; const callback = obj.useCallback(() => { const first = get2()[0]; flag = ScrollAdjustHandler; if (ScrollAdjustHandler) { flag = null != dependencyMap; } if (flag) { let hasItem; if (null != first) { hasItem = first.includes(dependencyMap); } flag = hasItem; } if (!flag) { flag = false; } return flag; }, items3); const obj2 = context2(get2[6]); return context2(get2[6]).useSyncExternalStore(memo1.subscribe, callback, callback); } function Separator(arg0) { ({ ItemSeparatorComponent, leadingItem } = arg0); let element = null; if (!useIsLastItem()) { const obj = { leadingItem }; element = ; } return element; } function ContainerSlotBase(arg0) { ({ id, ContainerComponent } = arg0); ({ horizontal, recycleItems, ItemSeparatorComponent, getRenderedItem, stickyHeaderConfig } = arg0); if (ContainerComponent === undefined) { ContainerComponent = closure_121; } const items = ["containerItemKey" + id]; let first; const context = frozen.useContext(closure_17); if (1 === items.length) { first = items[0]; } else { first = items.join("\0"); } const items1 = [context, first]; const memo = obj.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; const first1 = _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0]; let element = null; if (undefined !== first1) { const obj3 = { getRenderedItem, horizontal, ItemSeparatorComponent, id, itemKey: first1, recycleItems, stickyHeaderConfig }; element = ; } return element; } function ScrollAdjust() { const items = ["scrollAdjust", "scrollAdjustUserOffset"]; let first; const context = frozen.useContext(closure_17); const context1 = frozen.useContext(closure_17); if (1 === items.length) { first = items[0]; } else { first = items.join("\0"); } const items1 = [context1, first]; const memo = obj.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; const tmp5 = _slicedToArray(context1(first[6]).useSyncExternalStore(memo.subscribe, get, get), 2); const sum = (tmp5[0] || 0) + (tmp5[1] || 0) + 10000000; const state = context.state; let horizontal; if (null != state) { horizontal = state.props.horizontal; } let num = 0; if (horizontal) { num = sum; } const style = { height: 0, left: num, position: "absolute", top: null, width: 0 }; let num2 = 0; if (!horizontal) { num2 = sum; } style.top = num2; return ; } function doInitialAllocateContainers(context) { let state = context.state; ({ scrollLength, props } = state); ({ data, getFixedItemSize, getItemType, estimatedItemSize } = props); const drawDistance = context.state.props.drawDistance; const initialScroll = context.state.initialScroll; let tmp = undefined !== initialScroll; if (tmp) { const viewPosition = initialScroll.viewPosition; let num2 = 0; if (null != viewPosition) { num2 = viewPosition; } tmp = num2 > 0; } const values = context.values; let bound = drawDistance; if (!values.get("readyToRender")) { bound = drawDistance; if (!tmp) { const _Math = Math; bound = Math.min(drawDistance, 50); } } if (scrollLength > 0) { if (data.length > 0) { if (!tmp5) { if (getFixedItemSize) { const _Math2 = Math; const bound1 = Math.min(20, data.length); let num6 = 0; let num7 = 0; let num8 = 0; if (0 < bound1) { do { let tmp10 = data[num6]; let sum = num7; if (undefined !== tmp10) { let itemType; if (null != getItemType) { itemType = getItemType(tmp10, num6); } let str2 = ""; if (null != itemType) { str2 = itemType; } let fixedItemSize = getFixedItemSize(tmp10, num6, str2); let tmp16 = estimatedItemSize; if (null != fixedItemSize) { tmp16 = fixedItemSize; } sum = num7 + (tmp16 + context.scrollAxisGap); } num6 = num6 + 1; num7 = sum; num8 = sum; } while (num6 < bound1); } let result = num8 / bound1; } else { result = estimatedItemSize + context.scrollAxisGap; } const _Math3 = Math; const _Math4 = Math; const bound2 = Math.max(1, Math.ceil((scrollLength + 2 * bound) / result * props.numColumns)); for (let num12 = 0; num12 < bound2; num12 = num12 + 1) { let _HermesInternal = HermesInternal; let tmp21 = set$(context, "containerPosition" + num12, c32); let _HermesInternal2 = HermesInternal; let tmp22 = set$(context, "containerColumn" + num12, -1); let _HermesInternal3 = HermesInternal; let tmp23 = set$(context, "containerSpan" + num12, 1); } set$(context, "numContainers", bound2); let num13 = 0; if (data.length > 0) { num13 = 0; if (bound2 > 0) { const _Math5 = Math; const _Math6 = Math; const _Math7 = Math; const _Math8 = Math; const bound3 = Math.min(Math.ceil(3 * bound2), bound2 + 64); const _Math9 = Math; const bound4 = Math.max(bound2, bound3, Math.min(length, 32)); const _Math10 = Math; num13 = Math.min(Math.max(length, bound2), bound4); } } set$(context, "numContainersPooled", num13); let tmp29 = closure_27; if (closure_27) { tmp29 = !state.lastLayout; } if (!tmp29) { if (state.initialScroll) { const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(() => { closure_1 = { dataChanged: true, doMVCP: true }; state = state.state; fn(() => { let set2; let tmp163; let tmp164; let containerItemKeys = state.containerItemKeys; ({ enableScrollForNextCalculateItemsInView, idCache } = state); ({ indexByKey, minIndexSizeChanged, positions, props } = state); ({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props); ({ keyExtractor, onStickyHeaderChange: closure_4 } = props); ({ scrollForNextCalculateItemsInView, scrollLength } = state); ({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state); const data = state.props.data; let prop = state.props.stickyHeaderIndicesArr; if (!prop) { prop = []; } let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet; if (!stickyHeaderIndicesSet) { let _Set = Set; stickyHeaderIndicesSet = new Set(); } let tmp9 = closure_1_46(containerItemKeys, idCache.drawDistanceMode); ({ dataChanged, doMVCP, forceFullItemPositions } = idCache); let initialScrollSession = tmp2.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = tmp2.initialScrollSession.bootstrap; } let tmp16 = closure_1_21(containerItemKeys, "numContainers"); if (data) { if (0 !== scrollLength) { if (tmp16) { closure_8 = ref2(tmp7); let sum = tmp15(tmp7, "stylePaddingTop") + tmp15(tmp7, "alignItemsAtEndPadding"); closure_9 = sum + tmp15(tmp7, "headerSize"); const tmp15Result3 = tmp15(tmp7, "numColumns"); let scrollVelocity = idCache.scrollVelocity; if (null == scrollVelocity) { scrollVelocity = closure_1_69(tmp2); } ({ initialScroll, queuedInitialLayout } = tmp2); if (!tmp13) { let scroll1; if (null != bootstrap) { scroll1 = bootstrap.scroll; } if (null == scroll1) { scroll1 = tmp2.scroll; } let scroll = scroll1; } else { if (!queuedInitialLayout) { if (closure_1_41(tmp2)) { if (initialScroll) { scroll = closure_1_75(tmp7, initialScroll); } } } scroll = tmp2.scroll; } let num = 0; closure_11 = 0; closure_12 = 0; closure_13 = 0; closure_14 = 0; scrollBottomBuffered = 0; closure_16 = scroll; function updateScroll2(scroll) { closure_16 = scroll; values = values.values; value = values.get("scrollAdjustPending"); num = 0; if (null != value) { num = value; } closure_11 = num - closure_9; const rounded = Math.round(scroll + closure_11); closure_12 = rounded; if (rounded + scrollLength > closure_8) { const _Math = Math; closure_12 = Math.max(0, tmp4 - tmp3); } } updateScroll2(scroll); const tmp15Result4 = tmp15(tmp7, "activeStickyIndex"); closure_17 = tmp15Result4; function resolveStickyState() { num = -1; let num2 = -1; if (prop.length > 0) { let diff = arr.length - 1; let tmp5 = num; if (0 <= diff) { while (true) { let tmp6 = tmp3[arr[diff]]; if (undefined === tmp6) { diff = diff - 1; tmp5 = num; if (0 > diff) { break; } } else { tmp5 = diff; if (tmp >= tmp6) { break; } } break; } } num2 = tmp5; } if (0 <= num2) { num = arr[num2]; } let tmp8 = num2 >= 0; if (0 > num2) { tmp8 = tmp9 >= 0; } if (tmp8) { context(containerItemKeys, "activeStickyIndex", num); } let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null }; finishCalculateItemsInView = undefined; if (closure_4) { if (arr.length > 0) { if (tmp9 !== num) { finishCalculateItemsInView = () => { if (undefined !== data[num]) { if (null != closure_2_4) { const obj = { index: tmp, item: tmp2 }; tmp3(obj); } } }; } } } obj.finishCalculateItemsInView = finishCalculateItemsInView; return obj; } if (!dataChanged) { let stickyState = resolveStickyState(); } let result2 = tmp9; let result3 = tmp9; if (scrollVelocity > 0) { let result = 0.5 * tmp9; const result1 = 1.5 * tmp9; result3 = result1; result2 = result; } else { if (0 === scrollVelocity) { let _Math = Math; num = 50; } result2 = 1.5 * tmp9; result3 = 0.5 * tmp9; } let num6 = 0; if (!dataChanged) { num6 = 0; if (!forceFullItemPositions) { num6 = 0; if (!tmp25) { num6 = 0; if (!closure_1_41(tmp2)) { num6 = 0; if (!tmp2.scrollingTo) { num6 = 0; if (!tmp2.pendingNativeMVCPAdjust) { num6 = 0; if (tmp15(tmp7, "readyToRender")) { let _Math2 = Math; num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) { if (arg1 <= 0) { return 0; } else { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const bound = Math.min(1, Math.abs(scrollVelocity) / 4); return Math.sign(scrollVelocity) * arg1 * bound; } })(scrollVelocity, Math.min(result2, result3)); } } } } } } } function updateScrollRange() { const bound = Math.max(0, closure_12); closure_14 = Math.max(bound, closure_12 + scrollLength + Math.max(0, -closure_16)); closure_13 = bound - result2 + num6; closure_15 = closure_14 + result3 + num6; } updateScrollRange(); if (0 !== num6) { (function scheduleRenderRangeProjectionSettle(containerItemKeys) { state = containerItemKeys.state; const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle; if (undefined !== timeoutRenderRangeProjectionSettle) { const _clearTimeout = clearTimeout; clearTimeout(timeoutRenderRangeProjectionSettle); let timeouts = state.timeouts; timeouts.delete(timeoutRenderRangeProjectionSettle); } const timerId = setTimeout(() => { state.timeoutRenderRangeProjectionSettle = undefined; const timeouts = state.timeouts; timeouts.delete(timerId); state.scrollHistory.length = 0; const triggerCalculateItemsInView = state.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(); } else { call(state); } } }, 100); state.timeoutRenderRangeProjectionSettle = timerId; const timeouts2 = state.timeouts; timeouts2.add(timerId); })(tmp7); } if (enableScrollForNextCalculateItemsInView) { if (!tmp25) { if (!dataChanged) { if (!forceFullItemPositions) { if (scrollForNextCalculateItemsInView) { ({ top, bottom } = scrollForNextCalculateItemsInView); if (null === top) { if (null === bottom) { tmp2.scrollForNextCalculateItemsInView = undefined; } } if (null === top) { if (viewabilityConfigCallbackPairs) { (function updateViewabilityForCachedRange(containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, arg3, arg4) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { let tmp7 = null; let sum1; let tmp9 = null; if (startBuffered <= endBuffered) { let tmp3 = null; let tmp5 = null; let tmp6 = startBuffered; tmp7 = null; tmp9 = null; if (startBuffered < data1.length) { while (true) { let tmp10 = tmp[tmp6]; let tmp11 = tmp3; let tmp12 = tmp4; let tmp13 = tmp5; let tmp14 = tmp6; if (null == tmp10) { ({ data, keyExtractor } = state.props); let str2 = ""; if (data) { let tmp15 = null; if (tmp6 < data.length) { let keyExtractorResult = tmp6; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp6], tmp6); } tmp15 = keyExtractorResult; } state.idCache[tmp6] = tmp15; str2 = tmp15; } tmp10 = str2; } value = sizes.get(tmp10); if (null == value) { value = closure_1_58(containerItemKeys, tmp18, tmp14, data1[tmp6]); } let tmp23 = tmp2[tmp6]; let tmp24 = null === tmp11 && tmp23 + value > arg3; if (tmp24) { tmp11 = tmp6; } let tmp25 = undefined === tmp12 && tmp23 >= arg3 - 10 && tmp23 <= arg4; if (tmp25) { tmp12 = tmp6; } let tmp26 = tmp13; flag = false; if (null !== tmp11) { flag2 = true; if (tmp23 <= arg4) { tmp13 = tmp6; flag2 = false; } tmp26 = tmp13; flag = flag2; } tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (flag) { break; } else { let sum = tmp6 + 1; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (sum > endBuffered) { break; } else { tmp3 = tmp11; tmp4 = tmp12; tmp5 = tmp26; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; tmp6 = sum; if (sum >= data1.length) { break; } } } } } } const obj = { endNoBuffer: tmp9, firstFullyOnScreenIndex: sum1, idsInView: null, startNoBuffer: null }; if (null == sum1) { sum1 = tmp7; } const items = []; if (null != sum1) { if (null !== tmp9) { if (sum1 <= tmp9) { do { let tmp29 = state.idCache[sum1]; if (null == tmp29) { ({ data: data2, keyExtractor: keyExtractor2 } = state.props); let str4 = ""; if (data2) { let tmp31 = null; if (sum1 < data2.length) { let keyExtractor2Result = sum1; if (keyExtractor2) { keyExtractor2Result = keyExtractor2(data2[sum1], sum1); } tmp31 = keyExtractor2Result; } state.idCache[sum1] = tmp31; str4 = tmp31; } tmp29 = str4; } let arr = items.push(tmp29); sum1 = sum1 + 1; } while (sum1 <= tmp9); } } } obj.idsInView = items; obj.startNoBuffer = tmp7; const merged = Object.assign(state, obj); closure_1_102(state, tmp7); if (tmp37) { closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered); } tmp37 = null !== tmp7 && null !== tmp9; } } } } })(tmp7, viewabilityConfigCallbackPairs, scrollLength, closure_12, closure_14); } else if (tmp2.props.onFirstVisibleItemChanged) { closure_1_102(tmp2, (function findFirstVisibleIndexInCachedRange(containerItemKeys, arg1) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { if (startBuffered <= endBuffered) { if (startBuffered < data1.length) { while (true) { let tmp3 = tmp[startBuffered]; let tmp4 = startBuffered; if (null == tmp3) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp5 = null; if (startBuffered < data.length) { let keyExtractorResult = startBuffered; if (keyExtractor) { keyExtractorResult = keyExtractor(data[startBuffered], startBuffered); } tmp5 = keyExtractorResult; } state.idCache[startBuffered] = tmp5; str = tmp5; } tmp3 = str; } value = sizes.get(tmp3); let tmp9 = value; if (null == value) { tmp9 = closure_1_58(containerItemKeys, tmp8, tmp4, data1[startBuffered]); } if (tmp2[startBuffered] + tmp9 > arg1) { break; } else { let sum = startBuffered + 1; if (sum <= endBuffered) { startBuffered = sum; } } } return startBuffered; } } return null; } } } } return null; })(tmp7, closure_12)); } let prop1; if (null != stickyState) { prop1 = stickyState.finishCalculateItemsInView; } if (null != prop1) { let call = prop1.call; typeof call === "unknown" ? prop1() : call(stickyState); } } } } } } } let tmp73; if (doMVCP) { if (!tmp25) { tmp73 = closure_1_68(tmp7, dataChanged); } } if (dataChanged) { closure_1_86(tmp2); } let num8 = 0; if (!forceFullItemPositions) { num8 = 0; if (!dataChanged) { let startBuffered = minIndexSizeChanged; if (null == minIndexSizeChanged) { startBuffered = tmp2.startBuffered; } let num9 = 0; if (null != startBuffered) { num9 = startBuffered; } num8 = num9; } } let obj = { doMVCP, forceFullUpdate: forceFullItemPositions, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null }; let tmp82 = !forceFullItemPositions; if (!forceFullItemPositions) { tmp82 = !dataChanged; } if (tmp82) { tmp82 = tmp15Result3 > 1; } if (tmp82) { tmp82 = undefined !== minIndexSizeChanged; } obj.optimizeForVisibleWindow = tmp82; obj.scrollBottomBuffered = scrollBottomBuffered; obj.scrollVelocity = scrollVelocity; obj.startIndex = num8; closure_1_89(tmp7, dataChanged, obj); const tmp17Result = ref2(tmp7); closure_8 = tmp17Result; if (undefined !== minIndexSizeChanged) { tmp2.minIndexSizeChanged = undefined; } if (dataChanged) { if (doMVCP) { if (tmp2.props.maintainVisibleContentPosition.data) { if (tmp2.didContainersLayout) { if (tmp2.idsInView.length > 0) { const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition; const _Set2 = Set; set = new Set(); const idsInView = tmp2.idsInView; for (const item10226 of idsInView) { let tmp99 = item10226; value = indexByKey.get(item10226); let tmp101 = value; if (undefined !== value) { let tmp102 = shouldRestorePosition; if (shouldRestorePosition) { tmp102 = !shouldRestorePosition(data[tmp101], tmp101, data); } if (!tmp102) { let addResult = set.add(tmp99); } } continue; } } } } } } const tmp112 = closure_1_21(containerItemKeys, "scrollAdjustPending"); let num11 = 0; if (null != tmp112) { num11 = tmp112; } if (null != tmp73) { tmp73(); } let tmp114 = tmp73; if (tmp114) { let tmp116 = tmp107.scroll !== state.scroll; if (!tmp116) { const tmp109Result = tmp109(tmp111, "scrollAdjustPending"); let num12 = 0; if (null != tmp109Result) { num12 = tmp109Result; } tmp116 = num12 !== num11; } tmp114 = tmp116; } if (tmp114) { updateScroll2(tmp107.scroll); updateScrollRange(); } if (dataChanged) { stickyState = resolveStickyState(); } let tmp123; if (!tmp13) { let targetIndexSeed; if (null != bootstrap) { targetIndexSeed = bootstrap.targetIndexSeed; } tmp123 = targetIndexSeed; } if (null == tmp123) { let num13 = !dataChanged; if (!dataChanged) { num13 = startBufferedId; } if (num13) { num13 = indexByKey.get(startBufferedId); } if (!num13) { num13 = 0; } tmp123 = num13; } let diff = tmp123; let tmp126 = tmp123; let tmp127 = tmp123; if (tmp123 >= 0) { while (true) { let tmp128 = idCache[diff]; let tmp129 = diff; if (null == tmp128) { tmp128 = closure_1_49(state, diff); } let value4 = sizes.get(tmp128); if (null == value4) { value4 = closure_1_58(containerItemKeys, tmp135, tmp129, data[diff]); } tmp127 = tmp126; if (positions[diff] + value4 <= closure_13) { break; } else { diff = diff - 1; tmp126 = tmp129; tmp127 = tmp129; if (diff < 0) { break; } } } } let tmp143 = tmp127; if (tmp15Result3 > 1) { let diff1 = tmp127; tmp143 = tmp127; if (tmp127 > 0) { tmp143 = diff1; while (1 !== state.columns[diff1]) { tmp143 = diff1; if (undefined === tmp145) { break; } else { diff1 = diff1 - 1; tmp143 = diff1; if (0 >= diff1) { break; } } } } } let num16 = 0; let num17 = 0; let num18 = 0; if (0 < tmp16) { do { let _HermesInternal = HermesInternal; let tmp152 = closure_1_21(containerItemKeys, "containerItemKey" + num16); let bound = num17; if (undefined !== tmp152) { let _Math3 = Math; bound = Math.max(num17, indexByKey.get(tmp152)); } num16 = num16 + 1; num17 = bound; num18 = bound; } while (num16 < tmp16); } let obj2 = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: -1 }; const length = data.length; let _Math4 = Math; const bound1 = Math.max(0, tmp143); let tmp157 = bound1; let flag3 = false; let tmp160 = null; let tmp161 = null; let tmp162 = null; let endNoBuffer1 = null; let tmp166 = null; let startNoBuffer1 = null; if (bound1 < length) { while (true) { let tmp168 = idCache[tmp157]; let tmp169 = tmp157; let tmp171 = tmp158; let tmp172 = tmp159; let tmp173 = tmp160; let tmp174 = tmp161; let tmp175 = tmp162; if (null == tmp168) { tmp168 = closure_1_49(state, tmp157); } let value5 = sizes.get(tmp168); if (null == value5) { value5 = closure_1_58(containerItemKeys, tmp180, tmp169, data[tmp157]); } let tmp187 = positions[tmp157]; let tmp188 = tmp171; let tmp189 = tmp172; let tmp190 = tmp173; let tmp191 = tmp174; let tmp192 = tmp175; let tmp193 = flag3; if (!flag3) { let tmp201 = closure_1_100(obj2, tmp169, tmp187, value5, closure_12, closure_14); let tmp202 = null === tmp175; if (tmp202) { tmp202 = tmp187 + value5 > closure_13; } if (tmp202) { let tmp205 = null; if (closure_13 >= 0) { tmp205 = tmp187; } tmp172 = tmp205; tmp174 = tmp168; tmp175 = tmp157; } let tmp206 = flag3; let tmp207 = tmp171; let tmp208 = tmp173; if (null !== obj2.startNoBuffer) { let flag4 = true; if (tmp187 <= scrollBottomBuffered) { let sum1 = null; if (scrollBottomBuffered <= tmp17Result) { sum1 = tmp187 + value5; } tmp171 = sum1; flag4 = flag3; tmp173 = tmp157; } tmp206 = flag4; tmp207 = tmp171; tmp208 = tmp173; } tmp193 = tmp206; tmp188 = tmp207; tmp190 = tmp208; tmp189 = tmp172; tmp191 = tmp174; tmp192 = tmp175; } let sum2 = tmp157 + 1; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; if (sum2 >= length) { break; } else { tmp157 = sum2; flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; if (!tmp193) { continue; } else { flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; tmp157 = sum2; if (sum2 > num18) { break; } } continue; } } } const _Object = Object; let obj3 = { endBuffered: endNoBuffer1, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null }; ({ endNoBuffer: obj5.endNoBuffer, firstFullyOnScreenIndex: obj5.firstFullyOnScreenIndex } = obj2); obj3.idsInView = closure_1_101(state, obj2); obj3.startBuffered = startNoBuffer1; obj3.startBufferedId = tmp166; obj3.startNoBuffer = obj2.startNoBuffer; let merged = Object.assign(state, obj3); if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp164; } if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp163; } if (enableScrollForNextCalculateItemsInView) { if (!closure_1_54(tmp164)) { const rect = { bottom: tmp163, top: tmp164 }; const tmp219 = rect; } tmp214.scrollForNextCalculateItemsInView = tmp219; } let sum4 = tmp16; let items = []; if (dataChanged) { let num21 = 0; if (0 < sum4) { do { let _HermesInternal2 = HermesInternal; let tmp226 = closure_1_21(containerItemKeys, "containerItemKey" + num21); let tmp227 = !keyExtractor; if (keyExtractor) { let tmp229 = tmp226; if (tmp226) { tmp229 = undefined === indexByKey.get(tmp226); } tmp227 = tmp229; } if (tmp227) { let arr = items.push(num21); } num21 = num21 + 1; } while (num21 < sum4); } } let tmp233 = state; const scrollTargetPinnedRange = state.scrollTargetPinnedRange; let bound2 = 0; let bound3 = -1; let num23 = -1; let num24 = 0; if (scrollTargetPinnedRange) { const _Math5 = Math; const _Math6 = Math; bound2 = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); const _Math7 = Math; const _Math8 = Math; const diff2 = length - 1; bound3 = Math.min(diff2, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); num23 = bound3; num24 = bound2; } closure_24 = tmp237; function isPinnedRenderIndex(arg0) { let hasItem = set.has(arg0); if (!hasItem) { let tmp2 = closure_24; if (closure_24) { tmp2 = arg0 >= bound2; } if (tmp2) { tmp2 = arg0 <= bound3; } hasItem = tmp2; } return hasItem; } if (null !== startNoBuffer1) { if (null !== endNoBuffer1) { let items1 = []; const _Set6 = Set; const set1 = new Set(); function addPinnedIndex(bound2) { if (bound2 >= 0) { if (bound2 < length) { let tmp4 = idCache[bound2]; if (null == tmp4) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp2 = null; if (bound2 < data.length) { let keyExtractorResult = bound2; if (keyExtractor) { keyExtractorResult = keyExtractor(data[bound2], bound2); } tmp2 = keyExtractorResult; } tmp.idCache[bound2] = tmp2; str = tmp2; } tmp4 = str; } value = containerItemKeys.get(tmp4); if (undefined !== value) { const stickyContainerPool = state.stickyContainerPool; stickyContainerPool.add(value); } else { let hasItem = null == tmp4; if (!hasItem) { hasItem = set1.has(bound2); } if (!hasItem) { set1.add(bound2); items1.push(bound2); } } } } } let sum3 = startNoBuffer1; if (startNoBuffer1 <= endNoBuffer1) { do { let tmp238 = idCache[sum3]; if (null == tmp238) { tmp238 = closure_1_49(state, sum3); } if (!containerItemKeys.has(tmp238)) { let addResult1 = set1.add(sum3); let arr2 = items1.push(sum3); } sum3 = sum3 + 1; } while (sum3 <= endNoBuffer1); } for (const item10471 of alwaysRenderIndicesArr) { let addPinnedIndexResult = addPinnedIndex(item10471); continue; } if (tmp237) { if (num24 <= num23) { do { let addPinnedIndexResult1 = addPinnedIndex(num24); num24 = num24 + 1; } while (num24 <= num23); } } if (prop.length > 0) { let currentStickyIdx; if (null != stickyState) { currentStickyIdx = stickyState.currentStickyIdx; } let num25 = -1; if (null != currentStickyIdx) { num25 = currentStickyIdx; } (function handleStickyActivation(containerItemKeys, prop, currentStickyIdx, items1, set1, startNoBuffer1, endNoBuffer1) { state = containerItemKeys.state; num = -1; if (currentStickyIdx >= 0) { num = prop[currentStickyIdx]; } bound2(containerItemKeys, "activeStickyIndex", num); let num2 = 0; do { let diff = currentStickyIdx - num2; if (diff >= 0) { let tmp12 = prop[diff]; if (!closure_1_99(containerItemKeys, tmp12)) { let tmp5 = state.idCache[tmp12]; if (null == tmp5) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp6 = null; if (tmp12 < data.length) { let keyExtractorResult = tmp12; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp12], tmp12); } tmp6 = keyExtractorResult; } state.idCache[tmp12] = tmp6; str = tmp6; } tmp5 = str; } let tmp8 = tmp5; if (tmp5) { containerItemKeys = state.containerItemKeys; tmp8 = !containerItemKeys.has(tmp5); } if (tmp8) { let tmp9 = tmp12 < startNoBuffer1 || tmp12 > endNoBuffer1; tmp8 = tmp9; } if (tmp8) { tmp8 = !set1.has(tmp12); } if (tmp8) { let addResult = set1.add(tmp12); let arr = items1.push(tmp12); } } } num2 = num2 + 1; } while (num2 <= 1); })(containerItemKeys, prop, num25, items1, tmp476, startNoBuffer1, endNoBuffer1); } else if (-1 !== tmp15Result4) { context(containerItemKeys, "activeStickyIndex", -1); } if (items1.length > 0) { let fn; if (getItemType) { fn = (arg0) => { const tmp = getItemType(data[arg0], arg0); let str = ""; if (undefined !== tmp) { const _String = String; str = String(tmp); } return str; }; } const tmp275 = (function findAvailableContainers(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, set) { closure_0 = fn; if (0 === items1.length) { return []; } else { const tmp56 = length(containerItemKeys, "numContainers"); state = containerItemKeys.state; ({ containerItemMetadata: closure_2, stickyContainerPool } = state); set = undefined; if (items.length > 0) { const _Set = Set; set = new Set(items); } const mapped = items1.map((itemIndex, order) => { const obj = { isSticky: null, itemIndex, itemType: null, order: null }; const stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet; obj.isSticky = stickyHeaderIndicesSet.has(itemIndex); let tmp; if (null != closure_0) { tmp = closure_0(itemIndex); } obj.itemType = tmp; obj.order = order; return obj; }); const found = mapped.filter((isSticky) => !isSticky.isSticky); items = []; items1 = []; let num2 = 0; const found1 = mapped.filter((isSticky) => isSticky.isSticky); if (0 < tmp56) { while (true) { let _HermesInternal = HermesInternal; let tmp13 = length(containerItemKeys, "containerItemKey" + num2); let hasItem; if (null != set) { hasItem = set.has(num2); } let tmp16 = !hasItem; if (tmp13) { let hasItem1; if (null != set) { hasItem1 = set.has(tmp13); } if (hasItem1) { let indexByKey = state.indexByKey; } num2 = num2 + 1; if (num2 >= tmp56) { break; } } let tmp18 = !tmp16; if (stickyContainerPool.has(num2)) { let tmp22 = undefined === tmp13 || tmp18; if (tmp22) { let obj2 = { containerIndex: num2, distance: null }; let _Number2 = Number; obj2.distance = Number.POSITIVE_INFINITY; let arr = items1.push(obj2); } } else { if (undefined !== tmp13) { if (!tmp18) { if (!tmp) { let indexByKey2 = state.indexByKey; value = indexByKey2.get(tmp13); if (undefined !== value) { if (value < startNoBuffer1) { let obj = { containerIndex: num2, distance: value < startNoBuffer1 ? startNoBuffer1 - value : value - endNoBuffer1 }; let arr2 = items.push(obj); } } } } } let obj3 = { containerIndex: num2, distance: null }; let _Number = Number; obj3.distance = Number.POSITIVE_INFINITY; let arr3 = items.push(obj3); } } } const sorted = items.sort(closure_98); const _Array = Array; const array = new Array(length); let sum = tmp56; c5 = false; function assign(itemIndex, containerIndex) { array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType }; let deleteResult; if (null != set) { deleteResult = set.delete(containerIndex); } if (deleteResult) { c5 = true; } } function assignMatching(found, items, arg2) { closure_1 = arg2; function _loop2() { ... } const iter = found[Symbol.iterator](); while (iter !== undefined) { let _loop2Result = _loop2(iter.next()); continue; } } function assignFromPool(found, items, arg2) { if (closure_0) { assignMatching(found, items, /* F125837 */ function() { ... }); } assignMatching(found, items, /* F125838 */ function() { ... }); if (arg2) { assignMatching(found, items, /* F125839 */ function() { ... }); } } assignFromPool(found, items, true); assignFromPool(found1, items1, false); for (const item10099 of mapped) { let tmp36 = item10099; if (!array[item10099.order]) { let tmp38 = +sum; sum = tmp38 + 1; let tmp39 = tmp38; if (tmp36.isSticky) { let addResult = stickyContainerPool.add(tmp39); } let obj4 = assign(tmp36, tmp39); } continue; } if (c5) { items.length = 0; if (set) { for (const item10120 of set) { let arr7 = arg4.push(item10120); continue; } } } if (closure_31) { let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled"); if (null == POSITIVE_INFINITY) { const _Number3 = Number; POSITIVE_INFINITY = Number.POSITIVE_INFINITY; } if (sum > POSITIVE_INFINITY) { const _console = console; const obj5 = { debugInfo: null }; const obj10 = { numContainers: tmp56, numContainersPooled: POSITIVE_INFINITY, numNeeded: length, stillNeeded: sum - tmp56 }; obj5.debugInfo = obj10; console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj5); } } return array; } })(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, tmp88); let iter = tmp275[Symbol.iterator](); let nextResult = iter.next(); while (iter !== undefined) { let itemIndex = nextResult.itemIndex; let tmp281 = itemIndex; let containerIndex = nextResult.containerIndex; let tmp282 = idCache[itemIndex]; let tmp280 = nextResult; if (null != tmp282) { let tmp288 = tmp282; } else { tmp288 = closure_1_49(state, tmp281); } let tmp289 = tmp288; let tmp293 = containerItemKeys; let _HermesInternal3 = HermesInternal; let tmp291 = closure_1_21; let tmp295 = closure_1_21(containerItemKeys, "containerItemKey" + containerIndex); let tmp296 = tmp295; if (tmp295) { tmp295 = tmp296 !== tmp289; } if (tmp295) { let deleteResult = containerItemKeys.delete(tmp296); } if (tmp296 !== tmp289) { if (null == set2) { let _Set3 = Set; let tmp304 = new.target; let tmp305 = new.target; set2 = new Set(); } let addResult2 = set2.add(containerIndex); let tmp311 = state.containerItemGenerations[containerIndex]; let num28 = 0; if (null != tmp311) { num28 = tmp311; } state.containerItemGenerations[containerIndex] = num28 + 1; } let tmp314 = context; let _HermesInternal4 = HermesInternal; let tmp318 = context(tmp293, "containerItemKey" + containerIndex, tmp289); let _HermesInternal5 = HermesInternal; let tmp320 = context(tmp293, "containerItemIndex" + containerIndex, tmp281); let _HermesInternal6 = HermesInternal; let tmp321 = context(tmp293, "containerItemData" + containerIndex, data[tmp281]); let tmp323 = state; let containerItemMetadata = state.containerItemMetadata; let result4 = containerItemMetadata.set(containerIndex, ref3(state, itemIndex, data[tmp281], tmp280.itemType)); let result5 = containerItemKeys.set(tmp289, containerIndex); let userScrollAnchorReset = state.userScrollAnchorReset; if (null != userScrollAnchorReset) { let keys = tmp330.keys; let addResult3 = keys.add(tmp289); } let _HermesInternal7 = HermesInternal; let combined = "containerSticky" + containerIndex; let hasItem = stickyHeaderIndicesSet.has(tmp281); let isPinnedRenderIndexResult = isPinnedRenderIndex(tmp281); if (hasItem) { let tmp314Result = tmp314(tmp293, combined, true); let stickyContainerPool2 = tmp323.stickyContainerPool; let addResult4 = stickyContainerPool2.add(containerIndex); } else { if (tmp291(tmp293, combined)) { let tmp314Result2 = tmp314(tmp293, combined, false); } let stickyContainerPool = tmp323.stickyContainerPool; if (isPinnedRenderIndexResult) { let addResult5 = stickyContainerPool.add(containerIndex); } else { let deleteResult1 = stickyContainerPool.delete(containerIndex); } } if (containerIndex >= sum4) { sum4 = containerIndex + 1; } continue; } if (sum4 !== tmp16) { context(containerItemKeys, "numContainers", sum4); if (sum4 > closure_1_21(containerItemKeys, "numContainersPooled")) { tmp364(tmp366, "numContainersPooled", (function getExpandedContainerPoolSize(length, sum4) { num = 0; if (length > 0) { num = 0; if (sum4 > 0) { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const _Math4 = Math; const bound = Math.max(length, sum4); num = Math.min(bound, Math.max(sum4, Math.ceil(1.5 * sum4))); } } return num; })(length, sum4)); } tmp364 = context; tmp366 = containerItemKeys; } } tmp233 = state; const userScrollAnchorReset2 = state.userScrollAnchorReset; let size; if (null != userScrollAnchorReset2) { size = userScrollAnchorReset2.keys.size; } if (0 === size) { tmp233.userScrollAnchorReset = undefined; } tmp476 = set1; } } if (tmp233.stickyContainerPool.size > 0) { let currentStickyIdx1; if (null != stickyState) { currentStickyIdx1 = stickyState.currentStickyIdx; } let num30 = -1; if (null != currentStickyIdx1) { num30 = currentStickyIdx1; } (function handleStickyRecycling(containerItemKeys, prop, arg2, arg3, currentStickyIdx1, items, isPinnedRenderIndex) { state = containerItemKeys.state; const iter = state.stickyContainerPool[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { let tmp2 = nextResult; let _HermesInternal = HermesInternal; let tmp4 = length(containerItemKeys, "containerItemKey" + nextResult); value = undefined; if (tmp4) { let indexByKey = state.indexByKey; value = indexByKey.get(tmp5); } let tmp8 = value; if (undefined !== value) { if (!isPinnedRenderIndex(tmp8)) { let index = prop.indexOf(tmp8); let tmp11 = index; if (-1 !== index) { if (tmp11 < currentStickyIdx1 - 1) { let tmp19 = prop[tmp11 + 1]; flag = false; if (tmp19) { let tmp45 = state.positions[tmp20]; let tmp47 = undefined !== tmp45; if (tmp47) { tmp47 = arg2 > tmp46 + 2 * arg3; } flag = tmp47; } else { let tmp22 = state.idCache[tmp8]; if (null != tmp22) { let tmp26 = tmp22; } else { tmp26 = closure_1_49(state, tmp8); } let tmp27 = tmp26; if (tmp26) { let tmp29 = state.positions[tmp8]; let sizes = state.sizes; value2 = sizes.get(tmp27); if (null != value2) { } else { let tmp38 = closure_1_58(containerItemKeys, tmp27, value, state.props.data[tmp8]); } let tmp41 = undefined !== tmp29; if (tmp41) { tmp41 = arg2 > tmp29 + tmp39 + 3 * arg3; } flag = tmp41; } } if (flag) { let arr = items.push(tmp2); } } } else { let stickyContainerPool = state.stickyContainerPool; let deleteResult = stickyContainerPool.delete(tmp2); let _HermesInternal2 = HermesInternal; let tmp15 = bound2(containerItemKeys, "containerSticky" + tmp2, false); } } } continue; } })(containerItemKeys, prop, closure_12, tmp9, num30, items, isPinnedRenderIndex); } if (items.length > 0) { const _Set4 = Set; const set3 = new Set(items); } let num32 = 0; let flag5 = false; if (0 < sum4) { do { let tmp398 = containerItemKeys; let _HermesInternal8 = HermesInternal; let tmp399 = closure_1_21(containerItemKeys, "containerItemKey" + num32); let hasItem1; let tmp400 = num32; if (null != set3) { hasItem1 = set3.has(num32); } if (hasItem1) { if (undefined !== tmp399) { let deleteResult2 = containerItemKeys.delete(tmp399); if (null == set2) { let _Set5 = Set; let tmp408 = new.target; let tmp409 = new.target; set2 = new Set(); } let addResult6 = set2.add(num32); let tmp414 = state.containerItemGenerations[num32]; let num33 = 0; if (null != tmp414) { num33 = tmp414; } state.containerItemGenerations[num32] = num33 + 1; } let containerItemMetadata2 = state.containerItemMetadata; let tmp416 = state; let deleteResult3 = containerItemMetadata2.delete(num32); let stickyContainerPool3 = state.stickyContainerPool; if (stickyContainerPool3.has(num32)) { let _HermesInternal9 = HermesInternal; let tmp421 = context(tmp398, "containerSticky" + num32, false); let stickyContainerPool4 = tmp416.stickyContainerPool; let deleteResult4 = stickyContainerPool4.delete(num32); } let _HermesInternal10 = HermesInternal; let tmp427 = context(tmp398, "containerItemKey" + num32, undefined); let _HermesInternal11 = HermesInternal; let tmp428 = context(tmp398, "containerItemIndex" + num32, undefined); let _HermesInternal12 = HermesInternal; let tmp429 = context(tmp398, "containerItemData" + num32, undefined); let _HermesInternal13 = HermesInternal; let tmp431 = context(tmp398, "containerPosition" + num32, hasHadNonEmptyData); let _HermesInternal14 = HermesInternal; let tmp432 = context(tmp398, "containerColumn" + num32, -1); let _HermesInternal15 = HermesInternal; let tmp433 = context(tmp398, "containerSpan" + num32, 1); let tmp404 = flag5; } else { let value6 = indexByKey.get(tmp399); tmp404 = flag5; if (undefined !== value6) { let obj4 = { scrollAdjustPending: null, updateLayout: true }; obj4.scrollAdjustPending = num; let tmp405 = closure_1_88(tmp398, tmp400, value6, obj4).didChangePosition || flag5; tmp404 = tmp405; } } num32 = num32 + 1; flag5 = tmp404; } while (num32 < sum4); } let tmp435 = set2; if (set2) { tmp435 = overrideItemLayout; } if (tmp435) { closure_1_87(containerItemKeys, set2); } if (!tmp13) { closure_1_84(containerItemKeys); } else { closure_1_102(state, obj2.startNoBuffer); if (!queuedInitialLayout) { if (!tmp442.didContainersLayout) { if (closure_1_41(tmp442)) { let tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } else { tmp447Result = tmp447(tmp442, tmp442.startNoBuffer, tmp442.endNoBuffer); if (!tmp447Result) { tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } } if (tmp447Result) { (function setDidLayout(containerItemKeys) { containerItemKeys.state.queuedInitialLayout = true; closure_1_42(containerItemKeys); closure_1_47(containerItemKeys, { didLayout: true }); })(containerItemKeys); (function handleInitialScrollLayoutReady(containerItemKeys) { closure_0 = containerItemKeys; if (containerItemKeys.state.initialScroll) { closure_76(containerItemKeys, { forceScroll: true }); const initialScrollSession = containerItemKeys.state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("offset" !== kind) { const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(function runScroll() { return closure_2_76(closure_0, { forceScroll: true }); }); } closure_129_0 = containerItemKeys; const scrollingTo = containerItemKeys.state.scrollingTo; { let isInitialScroll; if (null != scrollingTo) { isInitialScroll = scrollingTo.isInitialScroll; } } } })(containerItemKeys); } } } let tmp455 = viewabilityConfigCallbackPairs; if (viewabilityConfigCallbackPairs) { tmp455 = null !== obj2.startNoBuffer; } if (tmp455) { tmp455 = null !== obj2.endNoBuffer; } if (tmp455) { state = containerItemKeys.state; ({ startNoBuffer, endNoBuffer } = obj2); if (null == startNoBuffer1) { startNoBuffer1 = obj2.startNoBuffer; } if (null == endNoBuffer1) { endNoBuffer1 = obj2.endNoBuffer; } closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, startNoBuffer1, endNoBuffer1); } let prop2; if (null != stickyState) { prop2 = stickyState.finishCalculateItemsInView; } if (null != prop2) { const call2 = prop2.call; if (typeof call2 === "unknown") { prop2(); } else { call2(stickyState); } } } tmp109 = closure_1_21; tmp111 = containerItemKeys; const tmp15Result = tmp15(tmp7, "stylePaddingTop"); tmp214 = state; } } } }); }); } else { closure_129_0 = context; closure_129_1 = { dataChanged: true, doMVCP: true }; const state2 = context.state; fn(() => { let set2; let tmp163; let tmp164; let containerItemKeys = state.containerItemKeys; ({ enableScrollForNextCalculateItemsInView, idCache } = state); ({ indexByKey, minIndexSizeChanged, positions, props } = state); ({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props); ({ keyExtractor, onStickyHeaderChange: closure_4 } = props); ({ scrollForNextCalculateItemsInView, scrollLength } = state); ({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state); const data = state.props.data; let prop = state.props.stickyHeaderIndicesArr; if (!prop) { prop = []; } let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet; if (!stickyHeaderIndicesSet) { let _Set = Set; stickyHeaderIndicesSet = new Set(); } let tmp9 = closure_1_46(containerItemKeys, idCache.drawDistanceMode); ({ dataChanged, doMVCP, forceFullItemPositions } = idCache); let initialScrollSession = tmp2.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = tmp2.initialScrollSession.bootstrap; } let tmp16 = closure_1_21(containerItemKeys, "numContainers"); if (data) { if (0 !== scrollLength) { if (tmp16) { closure_8 = ref2(tmp7); let sum = tmp15(tmp7, "stylePaddingTop") + tmp15(tmp7, "alignItemsAtEndPadding"); closure_9 = sum + tmp15(tmp7, "headerSize"); const tmp15Result3 = tmp15(tmp7, "numColumns"); let scrollVelocity = idCache.scrollVelocity; if (null == scrollVelocity) { scrollVelocity = closure_1_69(tmp2); } ({ initialScroll, queuedInitialLayout } = tmp2); if (!tmp13) { let scroll1; if (null != bootstrap) { scroll1 = bootstrap.scroll; } if (null == scroll1) { scroll1 = tmp2.scroll; } let scroll = scroll1; } else { if (!queuedInitialLayout) { if (closure_1_41(tmp2)) { if (initialScroll) { scroll = closure_1_75(tmp7, initialScroll); } } } scroll = tmp2.scroll; } let num = 0; closure_11 = 0; closure_12 = 0; closure_13 = 0; closure_14 = 0; scrollBottomBuffered = 0; closure_16 = scroll; function updateScroll2(scroll) { closure_16 = scroll; values = values.values; value = values.get("scrollAdjustPending"); num = 0; if (null != value) { num = value; } closure_11 = num - closure_9; const rounded = Math.round(scroll + closure_11); closure_12 = rounded; if (rounded + scrollLength > closure_8) { const _Math = Math; closure_12 = Math.max(0, tmp4 - tmp3); } } updateScroll2(scroll); const tmp15Result4 = tmp15(tmp7, "activeStickyIndex"); closure_17 = tmp15Result4; function resolveStickyState() { num = -1; let num2 = -1; if (prop.length > 0) { let diff = arr.length - 1; let tmp5 = num; if (0 <= diff) { while (true) { let tmp6 = tmp3[arr[diff]]; if (undefined === tmp6) { diff = diff - 1; tmp5 = num; if (0 > diff) { break; } } else { tmp5 = diff; if (tmp >= tmp6) { break; } } break; } } num2 = tmp5; } if (0 <= num2) { num = arr[num2]; } let tmp8 = num2 >= 0; if (0 > num2) { tmp8 = tmp9 >= 0; } if (tmp8) { context(containerItemKeys, "activeStickyIndex", num); } let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null }; finishCalculateItemsInView = undefined; if (closure_4) { if (arr.length > 0) { if (tmp9 !== num) { finishCalculateItemsInView = () => { if (undefined !== data[num]) { if (null != closure_2_4) { const obj = { index: tmp, item: tmp2 }; tmp3(obj); } } }; } } } obj.finishCalculateItemsInView = finishCalculateItemsInView; return obj; } if (!dataChanged) { let stickyState = resolveStickyState(); } let result2 = tmp9; let result3 = tmp9; if (scrollVelocity > 0) { let result = 0.5 * tmp9; const result1 = 1.5 * tmp9; result3 = result1; result2 = result; } else { if (0 === scrollVelocity) { let _Math = Math; num = 50; } result2 = 1.5 * tmp9; result3 = 0.5 * tmp9; } let num6 = 0; if (!dataChanged) { num6 = 0; if (!forceFullItemPositions) { num6 = 0; if (!tmp25) { num6 = 0; if (!closure_1_41(tmp2)) { num6 = 0; if (!tmp2.scrollingTo) { num6 = 0; if (!tmp2.pendingNativeMVCPAdjust) { num6 = 0; if (tmp15(tmp7, "readyToRender")) { let _Math2 = Math; num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) { if (arg1 <= 0) { return 0; } else { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const bound = Math.min(1, Math.abs(scrollVelocity) / 4); return Math.sign(scrollVelocity) * arg1 * bound; } })(scrollVelocity, Math.min(result2, result3)); } } } } } } } function updateScrollRange() { const bound = Math.max(0, closure_12); closure_14 = Math.max(bound, closure_12 + scrollLength + Math.max(0, -closure_16)); closure_13 = bound - result2 + num6; closure_15 = closure_14 + result3 + num6; } updateScrollRange(); if (0 !== num6) { (function scheduleRenderRangeProjectionSettle(containerItemKeys) { state = containerItemKeys.state; const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle; if (undefined !== timeoutRenderRangeProjectionSettle) { const _clearTimeout = clearTimeout; clearTimeout(timeoutRenderRangeProjectionSettle); let timeouts = state.timeouts; timeouts.delete(timeoutRenderRangeProjectionSettle); } const timerId = setTimeout(() => { state.timeoutRenderRangeProjectionSettle = undefined; const timeouts = state.timeouts; timeouts.delete(timerId); state.scrollHistory.length = 0; const triggerCalculateItemsInView = state.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(); } else { call(state); } } }, 100); state.timeoutRenderRangeProjectionSettle = timerId; const timeouts2 = state.timeouts; timeouts2.add(timerId); })(tmp7); } if (enableScrollForNextCalculateItemsInView) { if (!tmp25) { if (!dataChanged) { if (!forceFullItemPositions) { if (scrollForNextCalculateItemsInView) { ({ top, bottom } = scrollForNextCalculateItemsInView); if (null === top) { if (null === bottom) { tmp2.scrollForNextCalculateItemsInView = undefined; } } if (null === top) { if (viewabilityConfigCallbackPairs) { (function updateViewabilityForCachedRange(containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, arg3, arg4) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { let tmp7 = null; let sum1; let tmp9 = null; if (startBuffered <= endBuffered) { let tmp3 = null; let tmp5 = null; let tmp6 = startBuffered; tmp7 = null; tmp9 = null; if (startBuffered < data1.length) { while (true) { let tmp10 = tmp[tmp6]; let tmp11 = tmp3; let tmp12 = tmp4; let tmp13 = tmp5; let tmp14 = tmp6; if (null == tmp10) { ({ data, keyExtractor } = state.props); let str2 = ""; if (data) { let tmp15 = null; if (tmp6 < data.length) { let keyExtractorResult = tmp6; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp6], tmp6); } tmp15 = keyExtractorResult; } state.idCache[tmp6] = tmp15; str2 = tmp15; } tmp10 = str2; } value = sizes.get(tmp10); if (null == value) { value = closure_1_58(containerItemKeys, tmp18, tmp14, data1[tmp6]); } let tmp23 = tmp2[tmp6]; let tmp24 = null === tmp11 && tmp23 + value > arg3; if (tmp24) { tmp11 = tmp6; } let tmp25 = undefined === tmp12 && tmp23 >= arg3 - 10 && tmp23 <= arg4; if (tmp25) { tmp12 = tmp6; } let tmp26 = tmp13; flag = false; if (null !== tmp11) { flag2 = true; if (tmp23 <= arg4) { tmp13 = tmp6; flag2 = false; } tmp26 = tmp13; flag = flag2; } tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (flag) { break; } else { let sum = tmp6 + 1; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (sum > endBuffered) { break; } else { tmp3 = tmp11; tmp4 = tmp12; tmp5 = tmp26; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; tmp6 = sum; if (sum >= data1.length) { break; } } } } } } const obj = { endNoBuffer: tmp9, firstFullyOnScreenIndex: sum1, idsInView: null, startNoBuffer: null }; if (null == sum1) { sum1 = tmp7; } const items = []; if (null != sum1) { if (null !== tmp9) { if (sum1 <= tmp9) { do { let tmp29 = state.idCache[sum1]; if (null == tmp29) { ({ data: data2, keyExtractor: keyExtractor2 } = state.props); let str4 = ""; if (data2) { let tmp31 = null; if (sum1 < data2.length) { let keyExtractor2Result = sum1; if (keyExtractor2) { keyExtractor2Result = keyExtractor2(data2[sum1], sum1); } tmp31 = keyExtractor2Result; } state.idCache[sum1] = tmp31; str4 = tmp31; } tmp29 = str4; } let arr = items.push(tmp29); sum1 = sum1 + 1; } while (sum1 <= tmp9); } } } obj.idsInView = items; obj.startNoBuffer = tmp7; const merged = Object.assign(state, obj); closure_1_102(state, tmp7); if (tmp37) { closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered); } tmp37 = null !== tmp7 && null !== tmp9; } } } } })(tmp7, viewabilityConfigCallbackPairs, scrollLength, closure_12, closure_14); } else if (tmp2.props.onFirstVisibleItemChanged) { closure_1_102(tmp2, (function findFirstVisibleIndexInCachedRange(containerItemKeys, arg1) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { if (startBuffered <= endBuffered) { if (startBuffered < data1.length) { while (true) { let tmp3 = tmp[startBuffered]; let tmp4 = startBuffered; if (null == tmp3) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp5 = null; if (startBuffered < data.length) { let keyExtractorResult = startBuffered; if (keyExtractor) { keyExtractorResult = keyExtractor(data[startBuffered], startBuffered); } tmp5 = keyExtractorResult; } state.idCache[startBuffered] = tmp5; str = tmp5; } tmp3 = str; } value = sizes.get(tmp3); let tmp9 = value; if (null == value) { tmp9 = closure_1_58(containerItemKeys, tmp8, tmp4, data1[startBuffered]); } if (tmp2[startBuffered] + tmp9 > arg1) { break; } else { let sum = startBuffered + 1; if (sum <= endBuffered) { startBuffered = sum; } } } return startBuffered; } } return null; } } } } return null; })(tmp7, closure_12)); } let prop1; if (null != stickyState) { prop1 = stickyState.finishCalculateItemsInView; } if (null != prop1) { let call = prop1.call; typeof call === "unknown" ? prop1() : call(stickyState); } } } } } } } let tmp73; if (doMVCP) { if (!tmp25) { tmp73 = closure_1_68(tmp7, dataChanged); } } if (dataChanged) { closure_1_86(tmp2); } let num8 = 0; if (!forceFullItemPositions) { num8 = 0; if (!dataChanged) { let startBuffered = minIndexSizeChanged; if (null == minIndexSizeChanged) { startBuffered = tmp2.startBuffered; } let num9 = 0; if (null != startBuffered) { num9 = startBuffered; } num8 = num9; } } let obj = { doMVCP, forceFullUpdate: forceFullItemPositions, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null }; let tmp82 = !forceFullItemPositions; if (!forceFullItemPositions) { tmp82 = !dataChanged; } if (tmp82) { tmp82 = tmp15Result3 > 1; } if (tmp82) { tmp82 = undefined !== minIndexSizeChanged; } obj.optimizeForVisibleWindow = tmp82; obj.scrollBottomBuffered = scrollBottomBuffered; obj.scrollVelocity = scrollVelocity; obj.startIndex = num8; closure_1_89(tmp7, dataChanged, obj); const tmp17Result = ref2(tmp7); closure_8 = tmp17Result; if (undefined !== minIndexSizeChanged) { tmp2.minIndexSizeChanged = undefined; } if (dataChanged) { if (doMVCP) { if (tmp2.props.maintainVisibleContentPosition.data) { if (tmp2.didContainersLayout) { if (tmp2.idsInView.length > 0) { const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition; const _Set2 = Set; set = new Set(); const idsInView = tmp2.idsInView; for (const item10226 of idsInView) { let tmp99 = item10226; value = indexByKey.get(item10226); let tmp101 = value; if (undefined !== value) { let tmp102 = shouldRestorePosition; if (shouldRestorePosition) { tmp102 = !shouldRestorePosition(data[tmp101], tmp101, data); } if (!tmp102) { let addResult = set.add(tmp99); } } continue; } } } } } } const tmp112 = closure_1_21(containerItemKeys, "scrollAdjustPending"); let num11 = 0; if (null != tmp112) { num11 = tmp112; } if (null != tmp73) { tmp73(); } let tmp114 = tmp73; if (tmp114) { let tmp116 = tmp107.scroll !== state.scroll; if (!tmp116) { const tmp109Result = tmp109(tmp111, "scrollAdjustPending"); let num12 = 0; if (null != tmp109Result) { num12 = tmp109Result; } tmp116 = num12 !== num11; } tmp114 = tmp116; } if (tmp114) { updateScroll2(tmp107.scroll); updateScrollRange(); } if (dataChanged) { stickyState = resolveStickyState(); } let tmp123; if (!tmp13) { let targetIndexSeed; if (null != bootstrap) { targetIndexSeed = bootstrap.targetIndexSeed; } tmp123 = targetIndexSeed; } if (null == tmp123) { let num13 = !dataChanged; if (!dataChanged) { num13 = startBufferedId; } if (num13) { num13 = indexByKey.get(startBufferedId); } if (!num13) { num13 = 0; } tmp123 = num13; } let diff = tmp123; let tmp126 = tmp123; let tmp127 = tmp123; if (tmp123 >= 0) { while (true) { let tmp128 = idCache[diff]; let tmp129 = diff; if (null == tmp128) { tmp128 = closure_1_49(state, diff); } let value4 = sizes.get(tmp128); if (null == value4) { value4 = closure_1_58(containerItemKeys, tmp135, tmp129, data[diff]); } tmp127 = tmp126; if (positions[diff] + value4 <= closure_13) { break; } else { diff = diff - 1; tmp126 = tmp129; tmp127 = tmp129; if (diff < 0) { break; } } } } let tmp143 = tmp127; if (tmp15Result3 > 1) { let diff1 = tmp127; tmp143 = tmp127; if (tmp127 > 0) { tmp143 = diff1; while (1 !== state.columns[diff1]) { tmp143 = diff1; if (undefined === tmp145) { break; } else { diff1 = diff1 - 1; tmp143 = diff1; if (0 >= diff1) { break; } } } } } let num16 = 0; let num17 = 0; let num18 = 0; if (0 < tmp16) { do { let _HermesInternal = HermesInternal; let tmp152 = closure_1_21(containerItemKeys, "containerItemKey" + num16); let bound = num17; if (undefined !== tmp152) { let _Math3 = Math; bound = Math.max(num17, indexByKey.get(tmp152)); } num16 = num16 + 1; num17 = bound; num18 = bound; } while (num16 < tmp16); } let obj2 = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: -1 }; const length = data.length; let _Math4 = Math; const bound1 = Math.max(0, tmp143); let tmp157 = bound1; let flag3 = false; let tmp160 = null; let tmp161 = null; let tmp162 = null; let endNoBuffer1 = null; let tmp166 = null; let startNoBuffer1 = null; if (bound1 < length) { while (true) { let tmp168 = idCache[tmp157]; let tmp169 = tmp157; let tmp171 = tmp158; let tmp172 = tmp159; let tmp173 = tmp160; let tmp174 = tmp161; let tmp175 = tmp162; if (null == tmp168) { tmp168 = closure_1_49(state, tmp157); } let value5 = sizes.get(tmp168); if (null == value5) { value5 = closure_1_58(containerItemKeys, tmp180, tmp169, data[tmp157]); } let tmp187 = positions[tmp157]; let tmp188 = tmp171; let tmp189 = tmp172; let tmp190 = tmp173; let tmp191 = tmp174; let tmp192 = tmp175; let tmp193 = flag3; if (!flag3) { let tmp201 = closure_1_100(obj2, tmp169, tmp187, value5, closure_12, closure_14); let tmp202 = null === tmp175; if (tmp202) { tmp202 = tmp187 + value5 > closure_13; } if (tmp202) { let tmp205 = null; if (closure_13 >= 0) { tmp205 = tmp187; } tmp172 = tmp205; tmp174 = tmp168; tmp175 = tmp157; } let tmp206 = flag3; let tmp207 = tmp171; let tmp208 = tmp173; if (null !== obj2.startNoBuffer) { let flag4 = true; if (tmp187 <= scrollBottomBuffered) { let sum1 = null; if (scrollBottomBuffered <= tmp17Result) { sum1 = tmp187 + value5; } tmp171 = sum1; flag4 = flag3; tmp173 = tmp157; } tmp206 = flag4; tmp207 = tmp171; tmp208 = tmp173; } tmp193 = tmp206; tmp188 = tmp207; tmp190 = tmp208; tmp189 = tmp172; tmp191 = tmp174; tmp192 = tmp175; } let sum2 = tmp157 + 1; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; if (sum2 >= length) { break; } else { tmp157 = sum2; flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; if (!tmp193) { continue; } else { flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; tmp157 = sum2; if (sum2 > num18) { break; } } continue; } } } const _Object = Object; let obj3 = { endBuffered: endNoBuffer1, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null }; ({ endNoBuffer: obj5.endNoBuffer, firstFullyOnScreenIndex: obj5.firstFullyOnScreenIndex } = obj2); obj3.idsInView = closure_1_101(state, obj2); obj3.startBuffered = startNoBuffer1; obj3.startBufferedId = tmp166; obj3.startNoBuffer = obj2.startNoBuffer; let merged = Object.assign(state, obj3); if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp164; } if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp163; } if (enableScrollForNextCalculateItemsInView) { if (!closure_1_54(tmp164)) { const rect = { bottom: tmp163, top: tmp164 }; const tmp219 = rect; } tmp214.scrollForNextCalculateItemsInView = tmp219; } let sum4 = tmp16; let items = []; if (dataChanged) { let num21 = 0; if (0 < sum4) { do { let _HermesInternal2 = HermesInternal; let tmp226 = closure_1_21(containerItemKeys, "containerItemKey" + num21); let tmp227 = !keyExtractor; if (keyExtractor) { let tmp229 = tmp226; if (tmp226) { tmp229 = undefined === indexByKey.get(tmp226); } tmp227 = tmp229; } if (tmp227) { let arr = items.push(num21); } num21 = num21 + 1; } while (num21 < sum4); } } let tmp233 = state; const scrollTargetPinnedRange = state.scrollTargetPinnedRange; let bound2 = 0; let bound3 = -1; let num23 = -1; let num24 = 0; if (scrollTargetPinnedRange) { const _Math5 = Math; const _Math6 = Math; bound2 = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); const _Math7 = Math; const _Math8 = Math; const diff2 = length - 1; bound3 = Math.min(diff2, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); num23 = bound3; num24 = bound2; } closure_24 = tmp237; function isPinnedRenderIndex(arg0) { let hasItem = set.has(arg0); if (!hasItem) { let tmp2 = closure_24; if (closure_24) { tmp2 = arg0 >= bound2; } if (tmp2) { tmp2 = arg0 <= bound3; } hasItem = tmp2; } return hasItem; } if (null !== startNoBuffer1) { if (null !== endNoBuffer1) { let items1 = []; const _Set6 = Set; const set1 = new Set(); function addPinnedIndex(bound2) { if (bound2 >= 0) { if (bound2 < length) { let tmp4 = idCache[bound2]; if (null == tmp4) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp2 = null; if (bound2 < data.length) { let keyExtractorResult = bound2; if (keyExtractor) { keyExtractorResult = keyExtractor(data[bound2], bound2); } tmp2 = keyExtractorResult; } tmp.idCache[bound2] = tmp2; str = tmp2; } tmp4 = str; } value = containerItemKeys.get(tmp4); if (undefined !== value) { const stickyContainerPool = state.stickyContainerPool; stickyContainerPool.add(value); } else { let hasItem = null == tmp4; if (!hasItem) { hasItem = set1.has(bound2); } if (!hasItem) { set1.add(bound2); items1.push(bound2); } } } } } let sum3 = startNoBuffer1; if (startNoBuffer1 <= endNoBuffer1) { do { let tmp238 = idCache[sum3]; if (null == tmp238) { tmp238 = closure_1_49(state, sum3); } if (!containerItemKeys.has(tmp238)) { let addResult1 = set1.add(sum3); let arr2 = items1.push(sum3); } sum3 = sum3 + 1; } while (sum3 <= endNoBuffer1); } for (const item10471 of alwaysRenderIndicesArr) { let addPinnedIndexResult = addPinnedIndex(item10471); continue; } if (tmp237) { if (num24 <= num23) { do { let addPinnedIndexResult1 = addPinnedIndex(num24); num24 = num24 + 1; } while (num24 <= num23); } } if (prop.length > 0) { let currentStickyIdx; if (null != stickyState) { currentStickyIdx = stickyState.currentStickyIdx; } let num25 = -1; if (null != currentStickyIdx) { num25 = currentStickyIdx; } (function handleStickyActivation(containerItemKeys, prop, currentStickyIdx, items1, set1, startNoBuffer1, endNoBuffer1) { state = containerItemKeys.state; num = -1; if (currentStickyIdx >= 0) { num = prop[currentStickyIdx]; } bound2(containerItemKeys, "activeStickyIndex", num); let num2 = 0; do { let diff = currentStickyIdx - num2; if (diff >= 0) { let tmp12 = prop[diff]; if (!closure_1_99(containerItemKeys, tmp12)) { let tmp5 = state.idCache[tmp12]; if (null == tmp5) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp6 = null; if (tmp12 < data.length) { let keyExtractorResult = tmp12; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp12], tmp12); } tmp6 = keyExtractorResult; } state.idCache[tmp12] = tmp6; str = tmp6; } tmp5 = str; } let tmp8 = tmp5; if (tmp5) { containerItemKeys = state.containerItemKeys; tmp8 = !containerItemKeys.has(tmp5); } if (tmp8) { let tmp9 = tmp12 < startNoBuffer1 || tmp12 > endNoBuffer1; tmp8 = tmp9; } if (tmp8) { tmp8 = !set1.has(tmp12); } if (tmp8) { let addResult = set1.add(tmp12); let arr = items1.push(tmp12); } } } num2 = num2 + 1; } while (num2 <= 1); })(containerItemKeys, prop, num25, items1, tmp476, startNoBuffer1, endNoBuffer1); } else if (-1 !== tmp15Result4) { context(containerItemKeys, "activeStickyIndex", -1); } if (items1.length > 0) { let fn; if (getItemType) { fn = (arg0) => { const tmp = getItemType(data[arg0], arg0); let str = ""; if (undefined !== tmp) { const _String = String; str = String(tmp); } return str; }; } const tmp275 = (function findAvailableContainers(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, set) { closure_0 = fn; if (0 === items1.length) { return []; } else { const tmp56 = length(containerItemKeys, "numContainers"); state = containerItemKeys.state; ({ containerItemMetadata: closure_2, stickyContainerPool } = state); set = undefined; if (items.length > 0) { const _Set = Set; set = new Set(items); } const mapped = items1.map((itemIndex, order) => { const obj = { isSticky: null, itemIndex, itemType: null, order: null }; const stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet; obj.isSticky = stickyHeaderIndicesSet.has(itemIndex); let tmp; if (null != closure_0) { tmp = closure_0(itemIndex); } obj.itemType = tmp; obj.order = order; return obj; }); const found = mapped.filter((isSticky) => !isSticky.isSticky); items = []; items1 = []; let num2 = 0; const found1 = mapped.filter((isSticky) => isSticky.isSticky); if (0 < tmp56) { while (true) { let _HermesInternal = HermesInternal; let tmp13 = length(containerItemKeys, "containerItemKey" + num2); let hasItem; if (null != set) { hasItem = set.has(num2); } let tmp16 = !hasItem; if (tmp13) { let hasItem1; if (null != set) { hasItem1 = set.has(tmp13); } if (hasItem1) { let indexByKey = state.indexByKey; } num2 = num2 + 1; if (num2 >= tmp56) { break; } } let tmp18 = !tmp16; if (stickyContainerPool.has(num2)) { let tmp22 = undefined === tmp13 || tmp18; if (tmp22) { let obj2 = { containerIndex: num2, distance: null }; let _Number2 = Number; obj2.distance = Number.POSITIVE_INFINITY; let arr = items1.push(obj2); } } else { if (undefined !== tmp13) { if (!tmp18) { if (!tmp) { let indexByKey2 = state.indexByKey; value = indexByKey2.get(tmp13); if (undefined !== value) { if (value < startNoBuffer1) { let obj = { containerIndex: num2, distance: value < startNoBuffer1 ? startNoBuffer1 - value : value - endNoBuffer1 }; let arr2 = items.push(obj); } } } } } let obj3 = { containerIndex: num2, distance: null }; let _Number = Number; obj3.distance = Number.POSITIVE_INFINITY; let arr3 = items.push(obj3); } } } const sorted = items.sort(closure_98); const _Array = Array; const array = new Array(length); let sum = tmp56; c5 = false; function assign(itemIndex, containerIndex) { array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType }; let deleteResult; if (null != set) { deleteResult = set.delete(containerIndex); } if (deleteResult) { c5 = true; } } function assignMatching(found, items, arg2) { closure_1 = arg2; function _loop2(iter) { items = iter; if (closure_1_4[iter.order]) { return 1; } else { const findIndexResult = items.findIndex(() => { ... }); if (-1 !== findIndexResult) { const containerIndex = array(items.splice(findIndexResult, 1), 1)[0].containerIndex; if (typeof assign === "function") { const obj = { containerIndex, itemIndex: null, itemType: null }; ({ itemIndex: obj.itemIndex, itemType: obj.itemType } = iter); tmp[iter.order] = obj; let deleteResult; if (null != set) { deleteResult = obj2.delete(containerIndex); } if (deleteResult) { c5 = true; } obj2 = set; } else { throw new TypeError("Trying to call a non-function"); } } } } const iter = found[Symbol.iterator](); while (iter !== undefined) { let _loop2Result = _loop2(iter.next()); continue; } } function assignFromPool(found, items, arg2) { if (closure_0) { assignMatching(found, items, (arg0, arg1) => { let tmp = undefined !== arg1; if (tmp) { tmp = arg0 === arg1; } return tmp; }); } assignMatching(found, items, (arg0) => undefined === arg0); if (arg2) { assignMatching(found, items, () => true); } } assignFromPool(found, items, true); assignFromPool(found1, items1, false); for (const item10099 of mapped) { let tmp36 = item10099; if (!array[item10099.order]) { let tmp38 = +sum; sum = tmp38 + 1; let tmp39 = tmp38; if (tmp36.isSticky) { let addResult = stickyContainerPool.add(tmp39); } let obj4 = assign(tmp36, tmp39); } continue; } if (c5) { items.length = 0; if (set) { for (const item10120 of set) { let arr7 = arg4.push(item10120); continue; } } } if (closure_31) { let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled"); if (null == POSITIVE_INFINITY) { const _Number3 = Number; POSITIVE_INFINITY = Number.POSITIVE_INFINITY; } if (sum > POSITIVE_INFINITY) { const _console = console; const obj5 = { debugInfo: null }; const obj10 = { numContainers: tmp56, numContainersPooled: POSITIVE_INFINITY, numNeeded: length, stillNeeded: sum - tmp56 }; obj5.debugInfo = obj10; console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj5); } } return array; } })(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, tmp88); let iter = tmp275[Symbol.iterator](); let nextResult = iter.next(); while (iter !== undefined) { let itemIndex = nextResult.itemIndex; let tmp281 = itemIndex; let containerIndex = nextResult.containerIndex; let tmp282 = idCache[itemIndex]; let tmp280 = nextResult; if (null != tmp282) { let tmp288 = tmp282; } else { tmp288 = closure_1_49(state, tmp281); } let tmp289 = tmp288; let tmp293 = containerItemKeys; let _HermesInternal3 = HermesInternal; let tmp291 = closure_1_21; let tmp295 = closure_1_21(containerItemKeys, "containerItemKey" + containerIndex); let tmp296 = tmp295; if (tmp295) { tmp295 = tmp296 !== tmp289; } if (tmp295) { let deleteResult = containerItemKeys.delete(tmp296); } if (tmp296 !== tmp289) { if (null == set2) { let _Set3 = Set; let tmp304 = new.target; let tmp305 = new.target; set2 = new Set(); } let addResult2 = set2.add(containerIndex); let tmp311 = state.containerItemGenerations[containerIndex]; let num28 = 0; if (null != tmp311) { num28 = tmp311; } state.containerItemGenerations[containerIndex] = num28 + 1; } let tmp314 = context; let _HermesInternal4 = HermesInternal; let tmp318 = context(tmp293, "containerItemKey" + containerIndex, tmp289); let _HermesInternal5 = HermesInternal; let tmp320 = context(tmp293, "containerItemIndex" + containerIndex, tmp281); let _HermesInternal6 = HermesInternal; let tmp321 = context(tmp293, "containerItemData" + containerIndex, data[tmp281]); let tmp323 = state; let containerItemMetadata = state.containerItemMetadata; let result4 = containerItemMetadata.set(containerIndex, ref3(state, itemIndex, data[tmp281], tmp280.itemType)); let result5 = containerItemKeys.set(tmp289, containerIndex); let userScrollAnchorReset = state.userScrollAnchorReset; if (null != userScrollAnchorReset) { let keys = tmp330.keys; let addResult3 = keys.add(tmp289); } let _HermesInternal7 = HermesInternal; let combined = "containerSticky" + containerIndex; let hasItem = stickyHeaderIndicesSet.has(tmp281); let isPinnedRenderIndexResult = isPinnedRenderIndex(tmp281); if (hasItem) { let tmp314Result = tmp314(tmp293, combined, true); let stickyContainerPool2 = tmp323.stickyContainerPool; let addResult4 = stickyContainerPool2.add(containerIndex); } else { if (tmp291(tmp293, combined)) { let tmp314Result2 = tmp314(tmp293, combined, false); } let stickyContainerPool = tmp323.stickyContainerPool; if (isPinnedRenderIndexResult) { let addResult5 = stickyContainerPool.add(containerIndex); } else { let deleteResult1 = stickyContainerPool.delete(containerIndex); } } if (containerIndex >= sum4) { sum4 = containerIndex + 1; } continue; } if (sum4 !== tmp16) { context(containerItemKeys, "numContainers", sum4); if (sum4 > closure_1_21(containerItemKeys, "numContainersPooled")) { tmp364(tmp366, "numContainersPooled", (function getExpandedContainerPoolSize(length, sum4) { num = 0; if (length > 0) { num = 0; if (sum4 > 0) { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const _Math4 = Math; const bound = Math.max(length, sum4); num = Math.min(bound, Math.max(sum4, Math.ceil(1.5 * sum4))); } } return num; })(length, sum4)); } tmp364 = context; tmp366 = containerItemKeys; } } tmp233 = state; const userScrollAnchorReset2 = state.userScrollAnchorReset; let size; if (null != userScrollAnchorReset2) { size = userScrollAnchorReset2.keys.size; } if (0 === size) { tmp233.userScrollAnchorReset = undefined; } tmp476 = set1; } } if (tmp233.stickyContainerPool.size > 0) { let currentStickyIdx1; if (null != stickyState) { currentStickyIdx1 = stickyState.currentStickyIdx; } let num30 = -1; if (null != currentStickyIdx1) { num30 = currentStickyIdx1; } (function handleStickyRecycling(containerItemKeys, prop, arg2, arg3, currentStickyIdx1, items, isPinnedRenderIndex) { state = containerItemKeys.state; const iter = state.stickyContainerPool[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { let tmp2 = nextResult; let _HermesInternal = HermesInternal; let tmp4 = length(containerItemKeys, "containerItemKey" + nextResult); value = undefined; if (tmp4) { let indexByKey = state.indexByKey; value = indexByKey.get(tmp5); } let tmp8 = value; if (undefined !== value) { if (!isPinnedRenderIndex(tmp8)) { let index = prop.indexOf(tmp8); let tmp11 = index; if (-1 !== index) { if (tmp11 < currentStickyIdx1 - 1) { let tmp19 = prop[tmp11 + 1]; flag = false; if (tmp19) { let tmp45 = state.positions[tmp20]; let tmp47 = undefined !== tmp45; if (tmp47) { tmp47 = arg2 > tmp46 + 2 * arg3; } flag = tmp47; } else { let tmp22 = state.idCache[tmp8]; if (null != tmp22) { let tmp26 = tmp22; } else { tmp26 = closure_1_49(state, tmp8); } let tmp27 = tmp26; if (tmp26) { let tmp29 = state.positions[tmp8]; let sizes = state.sizes; value2 = sizes.get(tmp27); if (null != value2) { } else { let tmp38 = closure_1_58(containerItemKeys, tmp27, value, state.props.data[tmp8]); } let tmp41 = undefined !== tmp29; if (tmp41) { tmp41 = arg2 > tmp29 + tmp39 + 3 * arg3; } flag = tmp41; } } if (flag) { let arr = items.push(tmp2); } } } else { let stickyContainerPool = state.stickyContainerPool; let deleteResult = stickyContainerPool.delete(tmp2); let _HermesInternal2 = HermesInternal; let tmp15 = bound2(containerItemKeys, "containerSticky" + tmp2, false); } } } continue; } })(containerItemKeys, prop, closure_12, tmp9, num30, items, isPinnedRenderIndex); } if (items.length > 0) { const _Set4 = Set; const set3 = new Set(items); } let num32 = 0; let flag5 = false; if (0 < sum4) { do { let tmp398 = containerItemKeys; let _HermesInternal8 = HermesInternal; let tmp399 = closure_1_21(containerItemKeys, "containerItemKey" + num32); let hasItem1; let tmp400 = num32; if (null != set3) { hasItem1 = set3.has(num32); } if (hasItem1) { if (undefined !== tmp399) { let deleteResult2 = containerItemKeys.delete(tmp399); if (null == set2) { let _Set5 = Set; let tmp408 = new.target; let tmp409 = new.target; set2 = new Set(); } let addResult6 = set2.add(num32); let tmp414 = state.containerItemGenerations[num32]; let num33 = 0; if (null != tmp414) { num33 = tmp414; } state.containerItemGenerations[num32] = num33 + 1; } let containerItemMetadata2 = state.containerItemMetadata; let tmp416 = state; let deleteResult3 = containerItemMetadata2.delete(num32); let stickyContainerPool3 = state.stickyContainerPool; if (stickyContainerPool3.has(num32)) { let _HermesInternal9 = HermesInternal; let tmp421 = context(tmp398, "containerSticky" + num32, false); let stickyContainerPool4 = tmp416.stickyContainerPool; let deleteResult4 = stickyContainerPool4.delete(num32); } let _HermesInternal10 = HermesInternal; let tmp427 = context(tmp398, "containerItemKey" + num32, undefined); let _HermesInternal11 = HermesInternal; let tmp428 = context(tmp398, "containerItemIndex" + num32, undefined); let _HermesInternal12 = HermesInternal; let tmp429 = context(tmp398, "containerItemData" + num32, undefined); let _HermesInternal13 = HermesInternal; let tmp431 = context(tmp398, "containerPosition" + num32, hasHadNonEmptyData); let _HermesInternal14 = HermesInternal; let tmp432 = context(tmp398, "containerColumn" + num32, -1); let _HermesInternal15 = HermesInternal; let tmp433 = context(tmp398, "containerSpan" + num32, 1); let tmp404 = flag5; } else { let value6 = indexByKey.get(tmp399); tmp404 = flag5; if (undefined !== value6) { let obj4 = { scrollAdjustPending: null, updateLayout: true }; obj4.scrollAdjustPending = num; let tmp405 = closure_1_88(tmp398, tmp400, value6, obj4).didChangePosition || flag5; tmp404 = tmp405; } } num32 = num32 + 1; flag5 = tmp404; } while (num32 < sum4); } let tmp435 = set2; if (set2) { tmp435 = overrideItemLayout; } if (tmp435) { closure_1_87(containerItemKeys, set2); } if (!tmp13) { closure_1_84(containerItemKeys); } else { closure_1_102(state, obj2.startNoBuffer); if (!queuedInitialLayout) { if (!tmp442.didContainersLayout) { if (closure_1_41(tmp442)) { let tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } else { tmp447Result = tmp447(tmp442, tmp442.startNoBuffer, tmp442.endNoBuffer); if (!tmp447Result) { tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } } if (tmp447Result) { (function setDidLayout(containerItemKeys) { containerItemKeys.state.queuedInitialLayout = true; closure_1_42(containerItemKeys); closure_1_47(containerItemKeys, { didLayout: true }); })(containerItemKeys); (function handleInitialScrollLayoutReady(containerItemKeys) { closure_0 = containerItemKeys; if (containerItemKeys.state.initialScroll) { closure_76(containerItemKeys, { forceScroll: true }); const initialScrollSession = containerItemKeys.state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("offset" !== kind) { const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(function runScroll() { return closure_2_76(closure_0, { forceScroll: true }); }); } closure_129_0 = containerItemKeys; const scrollingTo = containerItemKeys.state.scrollingTo; { let isInitialScroll; if (null != scrollingTo) { isInitialScroll = scrollingTo.isInitialScroll; } } } })(containerItemKeys); } } } let tmp455 = viewabilityConfigCallbackPairs; if (viewabilityConfigCallbackPairs) { tmp455 = null !== obj2.startNoBuffer; } if (tmp455) { tmp455 = null !== obj2.endNoBuffer; } if (tmp455) { state = containerItemKeys.state; ({ startNoBuffer, endNoBuffer } = obj2); if (null == startNoBuffer1) { startNoBuffer1 = obj2.startNoBuffer; } if (null == endNoBuffer1) { endNoBuffer1 = obj2.endNoBuffer; } closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, startNoBuffer1, endNoBuffer1); } let prop2; if (null != stickyState) { prop2 = stickyState.finishCalculateItemsInView; } if (null != prop2) { const call2 = prop2.call; if (typeof call2 === "unknown") { prop2(); } else { call2(stickyState); } } } tmp109 = closure_1_21; tmp111 = containerItemKeys; const tmp15Result = tmp15(tmp7, "stylePaddingTop"); tmp214 = state; } } } }); } } return true; } } } } function normalizeMaintainScrollAtEndOn(on, arg1) { let tmp = !arg1; let tmp2 = tmp; if (arg1) { let dataChange; if (null != on) { dataChange = on.dataChange; } tmp2 = null != dataChange && dataChange; const tmp5 = null != dataChange && dataChange; } const obj = { animated: false, onDataChange: tmp2, onFooterLayout: null, onItemLayout: null, onLayout: null }; let tmp6 = tmp; if (arg1) { let footerLayout; if (null != on) { footerLayout = on.footerLayout; } tmp6 = null != footerLayout && footerLayout; const tmp9 = null != footerLayout && footerLayout; } obj.onFooterLayout = tmp6; let tmp10 = tmp; if (arg1) { let itemLayout; if (null != on) { itemLayout = on.itemLayout; } tmp10 = null != itemLayout && itemLayout; const tmp13 = null != itemLayout && itemLayout; } obj.onItemLayout = tmp10; if (arg1) { let layout; if (null != on) { layout = on.layout; } tmp = null != layout && layout; const tmp16 = null != layout && layout; } obj.onLayout = tmp; return obj; } let closure_5 = ["noScrollingTo", "forceScroll"]; let closure_6 = ["index"]; let closure_7 = ["children", "data", "renderItem"]; let closure_8 = ["alignItemsAtEnd", "anchoredEndSpace", "alwaysRender", "columnWrapperStyle", "contentContainerStyle", "contentInset", "data", "dataKey", "dataVersion", "drawDistance", "contentInsetEndAdjustment", "estimatedItemSize", "estimatedListSize", "extraData", "getFixedItemSize", "getItemType", "horizontal", "rtl", "estimatedHeaderSize", "initialScrollAtEnd", "initialScrollIndex", "initialScrollOffset", "experimental_adaptiveRender", "itemsAreEqual", "keyExtractor", "ListEmptyComponent", "ListFooterComponent", "ListFooterComponentStyle", "ListHeaderComponent", "maintainScrollAtEnd", "maintainScrollAtEndThreshold", "maintainVisibleContentPosition", "numColumns", "overrideItemLayout", "onEndReached", "onEndReachedThreshold", "onItemSizeChanged", "onMetricsChange", "onLayout", "onLoad", "onMomentumScrollEnd", "onRefresh", "onScroll", "onScrollBeginDrag", "onStartReached", "onStartReachedThreshold", "onStickyHeaderChange", "onFirstVisibleItemChanged", "onViewableItemsChanged", "progressViewOffset", "recycleItems", "refreshControl", "refreshing", "refScrollView", "renderScrollComponent", "renderItem", "scrollEventThrottle", "snapToIndices", "stickyHeaderIndices", "style", "useWindowScroll", "viewabilityConfig", "viewabilityConfigCallbackPairs"]; let closure_9 = ["positionComponentInternal", "stickyPositionComponentInternal"]; let noop = noop_mod; let closure_129_0 = noop; let closure_129_1; if (!noop) { let _Object = Object; let obj = Object.create(null); closure_129_1 = obj; if (noop) { const _Object2 = Object; let keys = Object.keys(noop); let item = keys.forEach((item) => { closure_0 = item; if ("default" !== item) { const _Object = Object; let ownPropertyDescriptor = Object.getOwnPropertyDescriptor(closure_0, item); if (!ownPropertyDescriptor.get) { const obj = { enumerable: true, get() { return ScrollAdjustHandler[closure_0]; } }; ownPropertyDescriptor = obj; } Object.defineProperty(dependencyMap, item, ownPropertyDescriptor); } }); } obj.default = noop; const _Object3 = Object; let frozen = Object.freeze(obj); } else { frozen = noop; } let closure_130_0 = get_ActivityIndicator; let closure_130_1; if (!get_ActivityIndicator) { const _Object4 = Object; let obj2 = Object.create(null); closure_130_1 = obj2; if (get_ActivityIndicator) { const _Object5 = Object; const keys1 = Object.keys(get_ActivityIndicator); const item1 = keys1.forEach((item) => { closure_0 = item; if ("default" !== item) { const _Object = Object; let ownPropertyDescriptor = Object.getOwnPropertyDescriptor(closure_0, item); if (!ownPropertyDescriptor.get) { const obj = { enumerable: true, get() { return ScrollAdjustHandler[closure_0]; } }; ownPropertyDescriptor = obj; } Object.defineProperty(dependencyMap, item, ownPropertyDescriptor); } }); } obj2.default = get_ActivityIndicator; const _Object6 = Object; let frozen1 = Object.freeze(obj2); } else { frozen1 = get_ActivityIndicator; } ({ View: map1, Text: closure_14, Platform } = get_ActivityIndicator); function createAnimatedValue(arg0) { } const redux = frozen.createContext(null); let c18 = 0; function DebugRow(children) { return {arg0.children}; } frozen.memo(function DebugView2() { const items = ["totalSize", "scrollAdjust", "debugRawScroll", "debugComputedScroll", "numContainers", "numContainersPooled", "isAtEnd"]; let first; const context = frozen.useContext(closure_17); const context1 = frozen.useContext(closure_17); let f101383 = context1; if (1 === items.length) { first = items[0]; } else { first = items.join("\0"); } const items1 = [context1, first]; const memo = obj.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; const tmp6 = _slicedToArray(f101383(first[6]).useSyncExternalStore(memo.subscribe, get, get), 7); const first1 = tmp6[0]; let num = 0; if (undefined !== first1) { num = first1; } let num2 = 0; if (undefined !== tmp6[1]) { num2 = tmp8; } let num3 = 0; if (undefined !== tmp6[2]) { num3 = tmp9; } let num4 = 0; if (undefined !== tmp6[3]) { num4 = tmp10; } const obj2 = f101383(first[6]); const tmp12 = undefined !== tmp6[6] && tmp6[6]; const tmp5 = _slicedToArray; tmp5(noop.useReducer((arg0) => arg0 + 1, 0), 2)[1]; f101383 = () => { f101383(); }; const items2 = [100]; const effect = noop.useEffect(() => { const interval = setInterval(f101383, 100); return () => clearInterval(closure_0); }, items2); ({ createElement, createElement: createElement2 } = frozen); const element = {"TotalSize:"}; const element2 = createElement2(DebugRow, null, element, {num.toFixed(2)}); const element1 = {"ContentSize:"}; const element3 = {element1}{getContentSize(context).toFixed(2)}; const element4 = {"At end:"}; const element5 = {element4}{String(tmp12)}; const element6 = {"ScrollAdjust:"}; const element7 = {element6}{num2.toFixed(2)}; const element8 = {"RawScroll: "}; const element9 = {element8}{num3.toFixed(2)}; const element10 = {"ComputedScroll: "}; return {element2}{element3}{element5}{element7}{element9}{element10}{num4.toFixed(2)}; }); const nativeFabricUIManager = global.nativeFabricUIManager; let closure_27 = tmp13; let str; if (typeof process !== "undefined") { const _process = process; if (typeof process.env === "object") { const _process2 = process; if (process.env) { str = "production"; } } } let tmp14; if (typeof str === "string") { tmp14 = "production" !== str.toLowerCase(); } let closure_31 = tmp16; let c32 = -10000000; let flag = tmp16; if (null != (null != tmp14 && tmp14) && (null != tmp14 && tmp14)) { flag = false; } let flag2 = tmp16; if (null != (null != tmp14 && tmp14) && (null != tmp14 && tmp14)) { flag2 = false; } let closure_36 = { didDispatchNativeScroll(state) { const initialScrollSession = state.initialScrollSession; let completion; if (null != initialScrollSession) { completion = initialScrollSession.completion; } let prop; if (null != completion) { prop = completion.didDispatchNativeScroll; } return prop; }, didRetrySilentInitialScroll(state) { const initialScrollSession = state.initialScrollSession; let completion; if (null != initialScrollSession) { completion = initialScrollSession.completion; } let prop; if (null != completion) { prop = completion.didRetrySilentInitialScroll; } return prop; }, markInitialScrollNativeDispatch(state) { ensureInitialScrollSessionCompletion(state).didDispatchNativeScroll = true; }, markSilentInitialScrollRetry(state) { ensureInitialScrollSessionCompletion(state).didRetrySilentInitialScroll = true; }, resetFlags(state) { if (state.initialScrollSession) { const tmp2 = ensureInitialScrollSessionCompletion(state, state.initialScrollSession.kind); tmp2.didDispatchNativeScroll = undefined; tmp2.didRetrySilentInitialScroll = undefined; } } }; let closure_37 = { clear(arg0) { const result = closure_37.set(arg0, undefined); }, didReachTarget(bound4, value) { return Math.abs(bound4 - value.targetOffset) <= 1; }, get(initialScrollSession) { initialScrollSession = initialScrollSession.initialScrollSession; let completion; if (null != initialScrollSession) { completion = initialScrollSession.completion; } let watchdog; if (null != completion) { watchdog = completion.watchdog; } return watchdog; }, hasNonZeroTargetOffset(targetOffset) { let tmp = undefined !== targetOffset; if (tmp) { tmp = targetOffset > 1; } return tmp; }, isAtZeroTargetOffset(offsetWithOffsetPosition) { return offsetWithOffsetPosition <= 1; }, set(initialScrollSession, arg1) { let tmp = arg1; if (!arg1) { initialScrollSession = initialScrollSession.initialScrollSession; let completion; if (null != initialScrollSession) { completion = initialScrollSession.completion; } let watchdog; if (null != completion) { watchdog = completion.watchdog; } tmp = watchdog; } if (tmp) { let tmp7; if (arg1) { const obj = { startScroll: null, targetOffset: null }; ({ startScroll: obj.startScroll, targetOffset: obj.targetOffset } = arg1); tmp7 = obj; } ensureInitialScrollSessionCompletion(initialScrollSession).watchdog = tmp7; const tmp6 = ensureInitialScrollSessionCompletion(initialScrollSession); } } }; function checkThreshold(scroll, atThreshold, result, isStartReached, startReachedSnapshot, contentSize, fn, fn2) { let tmp2 = atThreshold; if (!atThreshold) { tmp2 = result > 0 && tmp <= result; const tmp3 = result > 0 && tmp <= result; } if (isStartReached) { const _Math = Math; const absolute = Math.abs(scroll); let tmp8 = !atThreshold; let tmp9 = tmp8; if (!atThreshold) { tmp9 = result > 0; } if (tmp9) { tmp9 = absolute >= 1.3 * result; } if (!tmp9) { if (!atThreshold) { tmp8 = result <= 0; } if (tmp8) { tmp8 = absolute > 0; } tmp9 = tmp8; } if (tmp9) { fn2(undefined); return false; } else { if (tmp2) { let tmp11 = !startReachedSnapshot; if (startReachedSnapshot) { tmp11 = startReachedSnapshot.atThreshold !== atThreshold; } if (!tmp11) { tmp11 = startReachedSnapshot.contentSize !== contentSize.contentSize; } if (!tmp11) { tmp11 = startReachedSnapshot.dataLength !== contentSize.dataLength; } if (tmp11) { const obj3 = { atThreshold, contentSize: null, dataLength: null, scrollPosition: null }; ({ contentSize: obj2.contentSize, dataLength: obj2.dataLength, scrollPosition: obj2.scrollPosition } = contentSize); fn2(obj3); } } return true; } } else { flag = tmp2; if (flag) { fn(scroll); const obj = { atThreshold, contentSize: null, dataLength: null, scrollPosition: null }; ({ contentSize: obj.contentSize, dataLength: obj.dataLength, scrollPosition: obj.scrollPosition } = contentSize); fn2(obj); flag = true; } return flag; } } let set = new Set(); let c66 = 0.1; function getScrollVelocity(state) { const scrollHistory = state.scrollHistory; let diff = scrollHistory.length - 1; if (diff < 1) { return 0; } else { const _Date = Date; if (Date.now() - scrollHistory[diff].time > 1000) { return 0; } else { let num3 = 0; let num4 = 0; let num5 = 0; let num = 0; let num2 = 0; if (0 < diff) { while (true) { let tmp2 = scrollHistory[diff]; let diff1 = diff - 1; let tmp4 = scrollHistory[diff1]; let diff2 = tmp2.scroll - tmp4.scroll; let diff3 = tmp2.time - tmp4.time; let _Math = Math; let signResult = Math.sign(diff2); let tmp11 = num5; if (0 !== signResult) { tmp11 = signResult; if (0 !== num5) { tmp11 = num5; num = num3; num2 = num4; if (signResult !== num5) { break; } } break; } num = num3; num2 = num4; if (tmp15.time - tmp4.time > 1000) { break; } else { let sum1 = num3; let sum = num4; if (0 !== diff2) { sum1 = num3; sum = num4; if (diff3 > 0) { let _Math2 = Math; let expResult = Math.exp(-tmp15.time - tmp2.time / 200); sum = num4 + diff2 / diff3 * expResult; sum1 = num3 + expResult; } } num3 = sum1; num4 = sum; num5 = tmp11; num = sum1; num2 = sum; diff = diff1; if (0 >= diff1) { break; } } } } let num6 = 0; if (num > 0) { num6 = num2 / num; } return num6; } } } let current = frozen1.unstable_batchedUpdates; if (typeof current !== "function") { current = (fn) => fn(); } const PixelRatio = get_ActivityIndicator.PixelRatio; let closure_104 = 1 / PixelRatio.get() + 0.01; ({ forwardRef, memo } = frozen); let closure_110 = memo(function ContainerLayoutCoordinatorComponent(children) { const context = frozen.useContext(closure_17); const items = ["containerLayoutEpoch"]; closure_129_1 = undefined; const context1 = frozen.useContext(closure_17); closure_129_0 = context1; if (1 === items.length) { let first = items[0]; } else { first = items.join("\0"); } closure_129_1 = first; const items1 = [context1, first]; const memo = obj.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; const items2 = [context, _slicedToArray(context(1247).useSyncExternalStore(memo.subscribe, get, get), 1)[0]]; const layoutEffect = obj.useLayoutEffect(() => { if (closure_27) { const tmp2 = (function getContainerLayoutEffectScope(context) { const pendingContainerIds = context.pendingContainerIds; context.pendingContainerIds = undefined; if (undefined !== pendingContainerIds) { const state = context.state; let tmp = pendingContainerIds; if (pendingContainerIds) { const userScrollAnchorReset = state.userScrollAnchorReset; let size; if (null != userScrollAnchorReset) { size = userScrollAnchorReset.keys.size; } tmp = pendingContainerIds; if (size) { const _Set = Set; set = new Set(pendingContainerIds); const keys = state.userScrollAnchorReset.keys; tmp = set; for (const item10023 of keys) { let containerItemKeys = state.containerItemKeys; value = containerItemKeys.get(item10023); if (undefined !== value) { let addResult = set.add(tmp12); } continue; } } } return tmp; } })(context); if (undefined !== tmp2) { measureContainersInLayoutEffect(tmp, tmp2); } tmp = context; } }, items2); return children.children; }); function getComponent(icon) { let tmp = icon; if (!frozen.isValidElement(icon)) { let element = null; if (icon) { element = frozen.createElement(icon, null); } tmp = element; } return tmp; } let memoResult2 = memo(function PositionViewAnimated2(arg0) { ({ id, horizontal, style, refView } = arg0); const merged = Object.assign(arg0, Object.assign({ id: 0, horizontal: 0, style: 0, refView: 0 })); const tmp2 = useValue$("containerPosition" + id, { getValue(arg0) { let tmp = arg0; if (null == arg0) { tmp = closure_1_32; } return tmp; } }); if (horizontal) { const obj2 = { left: tmp2 }; let obj3 = obj2; } else { obj3 = { top: tmp2 }; } const obj4 = { ref: refView, style: null }; const items = [style, obj3]; obj4.style = items; const merged1 = Object.assign(merged); return frozen.createElement(get_ActivityIndicator.Animated.View, { ref: refView, style: null }); }); let closure_113 = memo(function PositionViewSticky2(animatedScrollY) { ({ id, horizontal: ScrollAdjustHandler, style } = animatedScrollY); animatedScrollY = animatedScrollY.animatedScrollY; const stickyHeaderConfig = animatedScrollY.stickyHeaderConfig; const merged = Object.assign(animatedScrollY, Object.assign({ id: 0, horizontal: 0, style: 0, refView: 0, animatedScrollY: 0, stickyHeaderConfig: 0, children: 0 })); let first1; let num; let num2; let num3; closure_9 = undefined; closure_10 = undefined; let memo1; let memo2; const context = memo2.useContext(closure_17); let items = ["containerPosition" + id, "alignItemsAtEndPadding", "headerSize", "stylePaddingTop", "containerItemKey" + id, "containerItemIndex" + id, "totalSize"]; closure_129_1 = undefined; const context1 = memo2.useContext(closure_17); closure_129_0 = context1; if (1 === items.length) { let first = items[0]; } else { first = items.join("\0"); } closure_129_1 = first; let items1 = [context1, first]; const memo = obj.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; let tmp6 = context(ScrollAdjustHandler(style[6]).useSyncExternalStore(memo.subscribe, get, get), 7); first1 = tmp6[0]; if (undefined === first1) { first1 = c32; } num = 0; if (undefined !== tmp6[1]) { num = tmp8; } num2 = 0; if (undefined !== tmp6[2]) { num2 = tmp9; } num3 = 0; if (undefined !== tmp6[3]) { num3 = tmp10; } closure_9 = tmp11; closure_10 = tmp12; let num4 = 0; if (undefined !== tmp6[6]) { num4 = tmp13; } let items2 = [context.state, tmp6[5], tmp6[4], num4]; memo1 = obj.useMemo(() => { const state = context.state; let diff; if (closure_9) { const sizes = state.sizes; value = sizes.get(tmp2); if (value) { if (value > 0) { const prop = state.props.stickyHeaderIndicesArr; const index = prop.indexOf(tmp); if (-1 !== index) { if (undefined !== state.props.stickyHeaderIndicesArr[index + 1]) { if (undefined !== state.positions[tmp6]) { diff = tmp7 - value; } } } } } } return diff; }, items2); let items3 = [num, animatedScrollY, num2, first1, memo1, num3, ]; let offset; if (null != stickyHeaderConfig) { offset = stickyHeaderConfig.offset; } items3[6] = offset; memo2 = obj.useMemo(() => { if (animatedScrollY) { let offset; if (null != stickyHeaderConfig) { offset = stickyHeaderConfig.offset; } num = 0; if (null != offset) { num = offset; } const diff = first1 + num2 + num3 + num - num; if (undefined !== memo1) { let interpolateResult = tmp8; if (tmp8 > tmp3) { const obj2 = { extrapolateLeft: "clamp", extrapolateRight: "clamp", inputRange: null, outputRange: null }; const items = [diff, diff + (tmp8 - tmp3)]; obj2.inputRange = items; const items1 = [tmp3, tmp8]; obj2.outputRange = items1; interpolateResult = obj.interpolate(obj2); } let interpolateResult1 = interpolateResult; } else { const obj3 = { extrapolateLeft: "clamp", extrapolateRight: "extend", inputRange: null, outputRange: null }; const items2 = [diff, diff + 5000]; obj3.inputRange = items2; const items3 = [tmp3, tmp3 + 5000]; obj3.outputRange = items3; interpolateResult1 = obj.interpolate(obj3); } if (ScrollAdjustHandler) { const obj4 = { translateX: interpolateResult1 }; const items4 = [obj4]; let items5 = items4; } else { const obj5 = { translateY: interpolateResult1 }; items5 = [obj5]; } return items5; } }, items3); let items4 = [style, tmp6[5], memo2]; let backdropComponent; const memo3 = obj.useMemo(() => { const items = [style, { zIndex: closure_10 + 1000 }, { transform: memo2 }]; return items; }, items4); if (null != stickyHeaderConfig) { backdropComponent = stickyHeaderConfig.backdropComponent; } let items5 = [backdropComponent]; const memo4 = obj.useMemo(() => { let backdropComponent1; if (null != stickyHeaderConfig) { backdropComponent1 = tmp.backdropComponent; } let element1 = null; if (backdropComponent1) { const obj2 = { style: { inset: 0, pointerEvents: "none", position: "absolute" } }; if (null != tmp) { const backdropComponent = tmp.backdropComponent; } if (typeof tmp5 === "function") { let tmp6 = backdropComponent; if (!obj.isValidElement(backdropComponent)) { let element = null; if (backdropComponent) { element = ; } tmp6 = element; } element1 = {tmp6}; } else { throw new TypeError("Trying to call a non-function"); } tmp5 = getComponent; } return element1; }, items5); const merged1 = Object.assign(merged); return memo2.createElement(memo1.Animated.View, { ref: animatedScrollY.refView, style: memo3 }, memo4, animatedScrollY.children); }); if (undefined !== nativeFabricUIManager && null != nativeFabricUIManager) { memoResult2 = memoResult1; } const redux2 = noop.createContext(null); noop = function noop() { }; let map = new Map(); let closure_121 = memo(function Container2(id) { id = id.id; ScrollAdjustHandler = id; let itemKey = id.itemKey; measureInLayoutEffect = itemKey; const horizontal = id.horizontal; let onLayoutProp = horizontal; ({ getRenderedItem: onLayoutChange, ItemSeparatorComponent } = id); let num3; let ref; let callback1; let num6; I18nManager = undefined; ({ recycleItems, stickyHeaderConfig } = id); const context = frozen.useContext(closure_17); const columnWrapperStyle = context.columnWrapperStyle; const state = context.state; let props; if (null != state) { props = state.props; } let horizontal1; if (null != props) { horizontal1 = props.horizontal; } let tmp5 = horizontal1; if (tmp5) { let rtl; if (null != props) { rtl = props.rtl; } if (null == rtl) { rtl = I18nManager.I18nManager.isRTL; } tmp5 = rtl; } let positionComponentInternal = context.state.props.positionComponentInternal; let stickyPositionComponentInternal = context.state.props.stickyPositionComponentInternal; let items = ["containerColumn" + id, "containerSpan" + id, "containerItemData" + id, "numColumns", "extraData", "containerSticky" + id]; measureInLayoutEffect = undefined; const context1 = obj.useContext(closure_17); ScrollAdjustHandler = context1; if (1 === items.length) { let first = items[0]; } else { first = items.join("\0"); } measureInLayoutEffect = first; const items1 = [context1, first]; const memo = obj.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; const tmp12 = ItemSeparatorComponent(ScrollAdjustHandler(measureInLayoutEffect[6]).useSyncExternalStore(memo.subscribe, get, get), 6); const first1 = tmp12[0]; let num = 0; if (undefined !== first1) { num = first1; } let num2 = 1; if (undefined !== tmp12[1]) { num2 = tmp14; } num3 = 1; if (undefined !== tmp12[3]) { num3 = tmp15; } ref = num6.useRef(null); closure_129_0 = id; closure_129_1 = context; closure_129_2 = ref; const ref1 = num6.useRef({ didLayout: false, horizontal, itemKey }); closure_129_3 = ref1; ref1.current.horizontal = horizontal; ref1.current.itemKey = itemKey; const tmp11Result = ItemSeparatorComponent(num6.useState(0), 2); closure_129_4 = tmp11Result[1]; const items2 = [id, context, ref]; const items3 = [id, context]; const callback = num6.useCallback((arg0) => { current = onLayoutChange.current; closure_1 = measureInLayoutEffect; let f124145; const itemKey = current.itemKey; current.didLayout = true; let size = arg0; let str = "height"; if (current.horizontal) { str = "width"; } const result = Math.floor(8 * arg0[str]) / 8; if (current.lastSize) { const _Math = Math; const result1 = Math.floor(8 * current.lastSize[str]) / 8; } const sizesKnown = measureInLayoutEffect.state.sizesKnown; value = sizesKnown.get(itemKey); f124145 = () => { }; if (!closure_27) { if (0 >= result) { const current2 = onLayoutProp.current; let measure; if (null != current2) { measure = current2.measure; } if (null != measure) { const call = measure.call; const fn = (arg0, arg1, width, height) => { size = { height, width }; if (typeof f124145 === "function") { current.lastSize = size; const obj = { containerId, itemKey, size }; const items = [obj]; updateItemSizesBatch(closure_1, items); } else { throw new TypeError("Trying to call a non-function"); } }; if (typeof call === "unknown") { measure(fn); } else { call(current2, fn); } } } } current.lastSize = size; let items = [{ containerId, itemKey, size }]; updateItemSizesBatch(measureInLayoutEffect, items); }, items2); callback1 = num6.useCallback(() => { if (closure_27) { scheduleContainerLayout(measureInLayoutEffect, c0); } else { ItemSeparatorComponent((arg0) => arg0 + 1); } }, items3); closure_129_5 = callback1; const items4 = [id, context, callback1]; const layoutEffect = num6.useLayoutEffect(() => { let containerLayoutTriggers = measureInLayoutEffect.containerLayoutTriggers; const result = containerLayoutTriggers.set(c0, context); return () => { set.delete(ref.current); const containerLayoutTriggers = measureInLayoutEffect.containerLayoutTriggers; if (containerLayoutTriggers.get(containerId) === context) { const containerLayoutTriggers2 = measureInLayoutEffect.containerLayoutTriggers; containerLayoutTriggers2.delete(containerId); } }; }, items4); const layoutEffect1 = num6.useLayoutEffect(() => { if (closure_27) { scheduleContainerLayout(measureInLayoutEffect, c0); } }); let obj4 = { measureInLayoutEffect: !closure_27, onLayoutChange: callback, ref }; const items5 = [itemKey, tmp11Result[0]]; ScrollAdjustHandler = undefined; measureInLayoutEffect = undefined; onLayoutProp = undefined; onLayoutChange = undefined; ({ ref: c0, measureInLayoutEffect } = obj4); if (measureInLayoutEffect === undefined) { measureInLayoutEffect = true; } onLayoutProp = obj4.onLayoutProp; onLayoutChange = obj4.onLayoutChange; const items6 = [onLayoutChange, onLayoutProp]; const callback2 = obj3.useCallback((nativeEvent) => { onLayoutChange(nativeEvent.nativeEvent.layout, false); if (null != onLayoutProp) { onLayoutProp(nativeEvent); } }, items6); if (closure_27) { const items7 = [measureInLayoutEffect]; HermesBuiltin.arraySpread(items5, 1); const layoutEffect2 = obj3.useLayoutEffect(() => { current = measureInLayoutEffect; if (measureInLayoutEffect) { current = f101429.current; } if (current) { const current2 = f101429.current; current2.measure((x, y, width, height) => { const size = { height, width, x, y }; onLayoutChange(size, true); }); } }, items7); } const items8 = [id, context, itemKey]; const effect = obj3.useEffect(() => { if (!closure_1_27) { onLayoutChange.current.didLayout = false; const _setTimeout = setTimeout; containerId = setTimeout(() => { current = ref.current; const didLayout = current.didLayout; let lastSize = !didLayout; if (!didLayout) { lastSize = current.lastSize; } if (lastSize) { const obj = { containerId, itemKey: null, size: null }; ({ itemKey: obj.itemKey, lastSize: obj.size } = current); const items = [obj]; updateItemSizesBatch(measureInLayoutEffect, items); current.didLayout = true; } }, 16); return () => { clearTimeout(closure_0); }; } }, items8); let num5 = 1; if (num > 0) { num5 = num; } if (!num2) { num2 = 1; } num6 = 0; const bound = Math.min(Math.max(num2, 1), num3); if (num3 > 1) { num6 = `${(num5 - 1) / num3 * 100}%`; } let text; if (num3 > 1) { text = `${tmp31 / num3 * 100}%`; } I18nManager = text; const items9 = [horizontal, tmp5, num6, text, columnWrapperStyle, context.state.props.contentContainerAlignItems, num3, ItemSeparatorComponent]; const items10 = [itemKey, tmp12[2], tmp12[4]]; const memo1 = obj3.useMemo(() => { if (!columnWrapperStyle) { if (tmp4) { let num11; if ("flex-end" === tmp2) { if (1 === tmp5) { num11 = 0; } } const rect = { bottom: num11, boxSizing: null, direction: "r", flexDirection: 0, height: "absolute", left: null, position: 24, top: 36 }; let str3; if (obj) { str3 = "border-box"; } rect.boxSizing = str3; let str4; if (!tmp3) { str4 = "row"; } rect.flexDirection = str4; rect.height = tmp7; if ("flex-end" !== tmp2) { const tmp19 = tmp6; } rect.top = tmp19; if (!obj) { obj = {}; } const merged = Object.assign(obj); let rect1 = rect; } else { let str; if (obj) { str = "border-box"; } rect1 = { boxSizing: str, left: tmp6, position: "absolute", right: null, top: 0, width: null }; let tmp14 = 0; if (tmp5 > 1) { tmp14 = null; } rect1.right = tmp14; rect1.width = tmp7; let obj2 = obj; if (!obj) { obj2 = {}; } const merged1 = Object.assign(obj2); } return rect1; } else { ({ columnGap, rowGap, gap } = columnWrapperStyle); if (tmp4) { let result; if (tmp5 > 1) { let num7 = rowGap; if (!rowGap) { num7 = gap; } if (!num7) { num7 = 0; } result = num7 / 2; } const obj3 = { paddingBottom: result, paddingRight: null, paddingTop: null }; if (!columnGap) { columnGap = gap; } obj3.paddingRight = columnGap; let result1; if (tmp5 > 1) { if (!rowGap) { rowGap = gap; } if (!rowGap) { rowGap = 0; } result1 = rowGap / 2; } obj3.paddingTop = result1; let obj4 = obj3; } else { let tmp8 = rowGap; if (!rowGap) { tmp8 = gap; } obj4 = { paddingBottom: tmp8, paddingLeft: null, paddingRight: null }; let result2; if (tmp5 > 1) { let num2 = columnGap; if (!columnGap) { num2 = gap; } if (!num2) { num2 = 0; } result2 = num2 / 2; } obj4.paddingLeft = result2; let result3; if (tmp5 > 1) { let num4 = columnGap; if (!columnGap) { num4 = gap; } if (!num4) { num4 = 0; } result3 = num4 / 2; } obj4.paddingRight = result3; } } }, items9); const memo2 = obj3.useMemo(() => { let tmp2 = null; if (undefined !== measureInLayoutEffect) { tmp2 = onLayoutChange(tmp); } return tmp2; }, items10); let obj5 = memo2; if (!memo2) { obj5 = {}; } const items11 = [id, callback1]; const memo3 = obj3.useMemo(() => { const viewRefs = context.viewRefs; const result = viewRefs.set(containerId, ref); return { containerId, triggerLayout: callback1 }; }, items11); if (tmp12[5]) { if (!stickyPositionComponentInternal) { stickyPositionComponentInternal = closure_113; } positionComponentInternal = stickyPositionComponentInternal; } else if (!positionComponentInternal) { positionComponentInternal = memoResult2; } let animatedScrollY; if (tmp12[5]) { animatedScrollY = context.animatedScrollY; } const obj6 = { animatedScrollY, horizontal, id, key: null, onLayout: null, refView: null, stickyHeaderConfig: null, style: null }; let tmp37; if (!recycleItems) { tmp37 = itemKey; } obj6.key = tmp37; obj6.onLayout = callback2; obj6.refView = ref; obj6.stickyHeaderConfig = stickyHeaderConfig; obj6.style = memo1; let element = memo2; if (memo2) { element = ItemSeparatorComponent; } if (element) { const obj8 = { ItemSeparatorComponent, leadingItem: memo2.item }; element = ; } return {obj5.renderedItem}{element}; }); let closure_123 = memo(function ContainerSlot2(arg0) { const merged = Object.assign(arg0); return ; }); let closure_124 = memo(function ContainersLayer2(horizontal) { horizontal = horizontal.horizontal; const columnWrapperStyle = frozen.useContext(closure_17).columnWrapperStyle; const tmp = useValue$("totalSize"); const items = ["readyToRender", "numColumns", "otherAxisSize"]; let first; const context = frozen.useContext(closure_17); if (1 === items.length) { first = items[0]; } else { first = items.join("\0"); } const items1 = [context, first]; const memo = obj.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; const obj2 = context(first[6]); [tmp6, tmp7, tmp8] = context(first[6]).useSyncExternalStore(memo.subscribe, get, get); let num = 0; if (undefined !== tmp8) { num = tmp8; } if (horizontal) { let str2 = num; if (!num) { str2 = "100%"; } const size = { height: str2, minHeight: num, opacity: null, width: null }; let num3 = 0; if (tmp6) { num3 = 1; } size.opacity = num3; size.width = tmp; let obj3 = size; } else { obj3 = { height: tmp, minWidth: num, opacity: null }; let num2 = 0; if (tmp6) { num2 = 1; } obj3.opacity = num2; } if (columnWrapperStyle) { ({ columnGap, rowGap, gap } = columnWrapperStyle); if (!columnGap) { columnGap = gap; } if (!columnGap) { columnGap = 0; } if (!rowGap) { rowGap = gap; } if (!rowGap) { rowGap = 0; } if (horizontal) { let tmp10 = rowGap; if (rowGap) { tmp10 = tmp7 > 1; } if (tmp10) { obj3.marginVertical = -rowGap / 2; } if (columnGap) { obj3.marginRight = -columnGap; } } else { let tmp9 = columnGap; if (columnGap) { tmp9 = tmp7 > 1; } if (tmp9) { obj3.marginHorizontal = -columnGap; } if (rowGap) { obj3.marginBottom = -rowGap; } } } return frozen.createElement(get_ActivityIndicator.Animated.View, { style: obj3 }, {arg0.children}); }); let closure_125 = memo(function Containers2(horizontal) { horizontal = horizontal.horizontal; const items = ["numContainersPooled"]; let first; let obj = frozen; ({ recycleItems, ItemSeparatorComponent, stickyHeaderConfig, getRenderedItem } = horizontal); const context = frozen.useContext(closure_17); if (1 === items.length) { first = items[0]; } else { first = items.join("\0"); } const items1 = [context, first]; const memo = obj.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; const first1 = _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0]; const items2 = []; let num = 0; if (0 < first1) { do { let obj3 = { getRenderedItem, horizontal, ItemSeparatorComponent, id: num, key: num, recycleItems, stickyHeaderConfig }; let arr = items2.push(); num = num + 1; obj = frozen; } while (num < first1); } return {items2}; }); const ScrollView = get_ActivityIndicator.Animated.ScrollView; let closure_128 = frozen.forwardRef(function SnapWrapperInner(ScrollComponent, ref) { const merged = Object.assign(ScrollComponent, Object.assign({ ScrollComponent: 0 })); const items = ["snapToOffsets"]; let first; const context = frozen.useContext(closure_17); if (1 === items.length) { first = items[0]; } else { first = items.join("\0"); } const items1 = [context, first]; const memo = obj.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; const obj3 = {}; const merged1 = Object.assign(merged); obj3.ref = ref; obj3.snapToOffsets = _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0]; return frozen.createElement(ScrollComponent.ScrollComponent, {}); }); function LayoutView(onLayoutChange) { const refView = onLayoutChange.refView; const merged = Object.assign(onLayoutChange, Object.assign({ onLayoutChange: 0, refView: 0 })); let ref = noop.useRef(null); if (null != refView) { ref = refView; } const obj2 = { onLayoutChange: onLayoutChange.onLayoutChange, ref }; ({ ref: ScrollAdjustHandler, measureInLayoutEffect } = obj2); if (measureInLayoutEffect === undefined) { measureInLayoutEffect = true; } const onLayoutProp = obj2.onLayoutProp; onLayoutChange = obj2.onLayoutChange; const items = [onLayoutChange, onLayoutProp]; const callback = obj.useCallback((nativeEvent) => { onLayoutChange(nativeEvent.nativeEvent.layout, false); if (null != onLayoutProp) { onLayoutProp(nativeEvent); } }, items); if (closure_27) { const items1 = [measureInLayoutEffect]; HermesBuiltin.arraySpread([], 1); const layoutEffect = obj.useLayoutEffect(() => { current = measureInLayoutEffect; if (measureInLayoutEffect) { current = f101429.current; } if (current) { const current2 = f101429.current; current2.measure((x, y, width, height) => { const size = { height, width, x, y }; onLayoutChange(size, true); }); } }, items1); } const obj3 = {}; const merged1 = Object.assign(merged); obj3.onLayout = callback; obj3.ref = ref; return ; } let closure_130 = memo(function AlignItemsAtEndSpacer2(horizontal) { const items = ["alignItemsAtEndPadding"]; let first; const context = frozen.useContext(closure_17); if (1 === items.length) { first = items[0]; } else { first = items.join("\0"); } const items1 = [context, first]; const memo = obj.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; const first1 = _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0]; let num = 0; if (undefined !== first1) { num = first1; } if (num <= 0) { return null; } else { if (horizontal.horizontal) { const obj3 = { flexShrink: 0, width: num }; let obj4 = obj3; } else { obj4 = { flexShrink: 0, height: num }; } const obj5 = { style: obj4 }; const element = {null}; } }); let closure_131 = memo(function ListComponent2(ListFooterComponent) { ({ canRender, style, horizontal } = ListFooterComponent); ({ initialContentOffset, alignItemsAtEnd, ListHeaderComponent } = ListFooterComponent); ListFooterComponent = ListFooterComponent.ListFooterComponent; ({ ListEmptyComponent, renderScrollComponent, onLayoutFooter } = ListFooterComponent); ({ onInternalScrollEnd, scrollAdjustHandler, snapToIndices, stickyHeaderIndices, useWindowScroll } = ListFooterComponent); ({ contentContainerStyle, recycleItems, ItemSeparatorComponent, onScroll, onLayout, ListHeaderComponentStyle, ListFooterComponentStyle, getRenderedItem, refScrollView, onInternalScrollBeginDrag, stickyHeaderConfig } = ListFooterComponent); let merged = Object.assign(ListFooterComponent, Object.assign({ canRender: 0, style: 0, contentContainerStyle: 0, horizontal: 0, initialContentOffset: 0, recycleItems: 0, ItemSeparatorComponent: 0, alignItemsAtEnd: 0, onScroll: 0, onLayout: 0, ListHeaderComponent: 0, ListHeaderComponentStyle: 0, ListFooterComponent: 0, ListFooterComponentStyle: 0, ListEmptyComponent: 0, getRenderedItem: 0, refScrollView: 0, renderScrollComponent: 0, onLayoutFooter: 0, onInternalScrollBeginDrag: 0, onInternalScrollEnd: 0, scrollAdjustHandler: 0, snapToIndices: 0, stickyHeaderConfig: 0, stickyHeaderIndices: 0, useWindowScroll: 0 })); let callback; const context = frozen.useContext(closure_17); const maintainVisibleContentPosition = context.state.props.maintainVisibleContentPosition; const items = ["otherAxisSize"]; closure_129_1 = undefined; const context1 = frozen.useContext(closure_17); closure_129_0 = context1; if (1 === items.length) { let first = items[0]; } else { first = items.join("\0"); } closure_129_1 = first; const items1 = [context1, first]; const memo = obj.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; const first1 = context(horizontal(ListHeaderComponent[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0]; let num = 0; if (undefined !== first1) { num = first1; } let alignItemsAtEndPaddingEnabled = context.state.props.alignItemsAtEndPaddingEnabled; if (context.state.needsOtherAxisSize) { if (num) { if (num > 0) { if (horizontal) { const obj3 = { height: num }; } else { const obj4 = { width: num }; } } } } current = (arg0, ref) => { const obj = {}; const merged = Object.assign(arg0); obj.ref = ref; return obj; }; const ref = frozen.useRef(renderScrollComponent); ref.current = renderScrollComponent; closure_130_0 = ref; const ref1 = frozen.useRef(current); ref1.current = current; closure_130_1 = ref1; const items2 = [ref1, ref]; let memo1 = obj.useMemo(() => frozen.forwardRef((AUTO_DISMISS, current) => { current = ref.current; if (null == current) { return null; } else { const call = current.call; const currentResult = ref2.current(AUTO_DISMISS, current); typeof call === "unknown" ? current(currentResult) : call(ref, currentResult); } }), items2); if (!renderScrollComponent) { memo1 = ScrollView; } const items3 = [context]; callback = noop.useCallback((data, fn) => { const values = context.values; let tmp2 = values.get("footerSize") !== data; if (tmp2) { set$(tmp, "footerSize", data); updateContentMetricsState(tmp); } if (null != fn) { fn(); } if (tmp2) { const maintainScrollAtEnd = tmp.state.props.maintainScrollAtEnd; let onFooterLayout; if (null != maintainScrollAtEnd) { onFooterLayout = maintainScrollAtEnd.onFooterLayout; } tmp2 = onFooterLayout; } if (tmp2) { doMaintainScrollAtEnd(tmp); } }, items3); const items4 = [ListHeaderComponent, ListFooterComponent, context, callback]; const layoutEffect = noop.useLayoutEffect(() => { if (!ListHeaderComponent) { ({ state, values } = context); const tmp2 = values.get("headerSize") || 0; flag = state.didMeasureHeader; if (!flag) { flag = tmp2 > 0.1; } if (tmp2 !== 0) { set$(tmp, "headerSize", 0); updateContentMetricsState(tmp); if (flag) { ({ didContainersLayout, didFinishInitialScroll, props, scroll, scrollingTo } = tmp.state); if (props.horizontal) { const stylePaddingLeft = props.stylePaddingLeft; flag = false; } else { const stylePaddingTop = props.stylePaddingTop; flag = false; } } if (flag) { requestAdjust(tmp, 0 - tmp2); } } state.didMeasureHeader = true; } if (!ListFooterComponent) { callback(0); } }, items4); const items5 = [context, horizontal]; const items6 = [horizontal, onLayoutFooter, callback]; const callback1 = noop.useCallback((data) => { let str = "height"; if (horizontal) { str = "width"; } ({ state, values } = context); const tmp3 = values.get("headerSize") || 0; flag = state.didMeasureHeader; if (!flag) { flag = tmp3 > 0.1; } if (tmp3 !== data[str]) { set$(tmp2, "headerSize", tmp); updateContentMetricsState(tmp2); if (flag) { ({ didContainersLayout, didFinishInitialScroll, props, scroll, scrollingTo } = tmp2.state); if (props.horizontal) { const stylePaddingLeft = props.stylePaddingLeft; flag = false; } else { const stylePaddingTop = props.stylePaddingTop; flag = false; } } if (flag) { requestAdjust(tmp2, tmp - tmp3); } } state.didMeasureHeader = true; }, items5); const obj5 = {}; const callback2 = noop.useCallback((arg0, arg1) => { closure_0 = arg0; closure_1 = arg1; let str = "height"; if (closure_0) { str = "width"; } callback(arg0[str], () => { if (null != onLayoutFooter) { tmp(closure_0, closure_1); } }); }, items6); const merged1 = Object.assign(merged); obj5.onScrollBeginDrag = onInternalScrollBeginDrag; const items7 = [horizontal ? { height: "100%" } : {}, contentContainerStyle]; obj5.contentContainerStyle = items7; if (undefined === initialContentOffset) { obj5.contentOffset = undefined; obj5.horizontal = horizontal; if (maintainVisibleContentPosition.size) { const obj6 = { minIndexForVisible: 0 }; } obj5.maintainVisibleContentPosition = obj6; obj5.onLayout = onLayout; obj5.onScroll = onScroll; obj5.ref = refScrollView; let tmp19; if (snapToIndices) { tmp19 = memo1; } obj5.ScrollComponent = tmp19; let tmp20 = style; if (tmp7) { const items8 = [tmp7, style]; tmp20 = items8; } obj5.style = tmp20; const element = ; let tmp24Result = ListHeaderComponent; if (ListHeaderComponent) { const obj7 = { onLayoutChange: callback1, style: ListHeaderComponentStyle }; if (typeof getComponent === "function") { let tmp27 = ListHeaderComponent; if (!obj.isValidElement(ListHeaderComponent)) { let element1 = null; if (ListHeaderComponent) { element1 = ; } tmp27 = element1; } tmp24Result = tmp24(tmp25, obj7, tmp27); } else { throw new TypeError("Trying to call a non-function"); } } let tmp29 = ListEmptyComponent; if (ListEmptyComponent) { if (typeof getComponent === "function") { let tmp31 = ListEmptyComponent; if (!obj.isValidElement(ListEmptyComponent)) { let element2 = null; if (ListEmptyComponent) { element2 = ; } tmp31 = element2; } tmp29 = tmp31; } else { throw new TypeError("Trying to call a non-function"); } } if (alignItemsAtEndPaddingEnabled) { const obj8 = { horizontal }; alignItemsAtEndPaddingEnabled = ; } if (canRender) { canRender = !ListEmptyComponent; } if (canRender) { const obj9 = { getRenderedItem, horizontal, ItemSeparatorComponent, recycleItems, stickyHeaderConfig }; canRender = ; } let tmp36Result = ListFooterComponent; if (ListFooterComponent) { const obj10 = { onLayoutChange: callback2, style: ListFooterComponentStyle }; if (typeof getComponent === "function") { let tmp39 = ListFooterComponent; if (!obj.isValidElement(ListFooterComponent)) { let element3 = null; if (ListFooterComponent) { element3 = ; } tmp39 = element3; } tmp36Result = tmp36(tmp37, obj10, tmp39); } else { throw new TypeError("Trying to call a non-function"); } } let tmp41 = closure_31; if (closure_31) { tmp41 = flag; } return {element}{tmp24Result}{tmp29}{alignItemsAtEndPaddingEnabled}{canRender}{tmp36Result}{false}{tmp41}; } else if (horizontal) { const point = { x: initialContentOffset, y: 0 }; let point1 = point; } else { point1 = { x: 0, y: initialContentOffset }; } }); let closure_132 = tmp16 ? (function useDevChecksImpl(childrenMode) { const context = frozen.useContext(closure_17); childrenMode = childrenMode.childrenMode; const keyExtractor = childrenMode.keyExtractor; const renderScrollComponent = childrenMode.renderScrollComponent; const useWindowScroll = childrenMode.useWindowScroll; const items = [renderScrollComponent, useWindowScroll]; const effect = noop.useEffect(() => { let tmp = useWindowScroll; if (useWindowScroll) { tmp = renderScrollComponent; } if (tmp) { let tmp2 = closure_31; if (closure_31) { tmp2 = !set.has("useWindowScrollRenderScrollComponent"); } if (tmp2) { set.add("useWindowScrollRenderScrollComponent"); const _console = console; const _HermesInternal = HermesInternal; console.warn("[legend-list] " + "useWindowScroll is not supported when renderScrollComponent is provided."); } } }, items); const items1 = [childrenMode, context, keyExtractor]; const effect1 = noop.useEffect(() => { let isFirst = keyExtractor; if (!keyExtractor) { isFirst = context.state.isFirst; } if (!isFirst) { isFirst = !context.state.didDataChange; } if (!isFirst) { isFirst = childrenMode; } if (!isFirst) { let tmp3 = closure_31; if (closure_31) { tmp3 = !set.has("keyExtractor"); } if (tmp3) { set.add("keyExtractor"); const _console = console; const _HermesInternal = HermesInternal; console.warn("[legend-list] " + "Changing data without a keyExtractor can cause slow performance and resetting scroll. If your list data can change you should use a keyExtractor with a unique id for best performance and behavior."); } } }, items1); const items2 = [context]; const effect2 = noop.useEffect(() => { const state = context.state; }, items2); }) : (function useDevChecksNoop(arg0) { }); class ScrollAdjustHandler { constructor(arg0) { tmp = c2(this, ScrollAdjustHandler); this.appliedAdjust = 0; this.pendingAdjust = 0; this.ctx = global; return; } } const entry = { key: "requestAdjust", value: function requestAdjust(arg0) { const self = this; const scrollingTo = this.ctx.state.scrollingTo; let animated; if (null != scrollingTo) { animated = scrollingTo.animated; } if (animated) { if (!scrollingTo.isInitialScroll) { self.pendingAdjust = self.pendingAdjust + arg0; set$(self.ctx, "scrollAdjustPending", self.pendingAdjust); } if (self.ctx.state.scrollingTo) { const ctx = self.ctx; const scrollingTo2 = ctx.state.scrollingTo; const _requestAnimationFrame = requestAnimationFrame; ctx.state.animFrameCheckFinishedScroll = requestAnimationFrame(() => { const scrollingTo = state.state.scrollingTo; if (scrollingTo) { state = tmp.state; state.animFrameCheckFinishedScroll = undefined; const tmp3 = closure_2_62(tmp, scrollingTo); let isAtResolvedTarget = tmp3.isAtResolvedTarget; if (isAtResolvedTarget) { const isInitialScroll = scrollingTo.isInitialScroll; let hasScrolled = !isInitialScroll; if (isInitialScroll) { hasScrolled = state.hasScrolled; } if (!hasScrolled) { hasScrolled = tmp3.clampedTargetOffset <= 1; } isAtResolvedTarget = hasScrolled; } if (isAtResolvedTarget) { closure_2_60(tmp); } } }); } } self.appliedAdjust = self.appliedAdjust + arg0; set$(self.ctx, "scrollAdjust", self.appliedAdjust); } }; let items = [ entry, { key: "getAdjust", value: function getAdjust() { return this.appliedAdjust; } }, { key: "commitPendingAdjust", value: function commitPendingAdjust(scrollingTo) { const self = this; let state = this.ctx.state; const pendingAdjust = this.pendingAdjust; this.pendingAdjust = 0; if (0 !== pendingAdjust) { let index1; if (null != scrollingTo) { index1 = scrollingTo.index; } if (undefined !== index1) { const index = scrollingTo.index; const tmp7 = calculateOffsetWithOffsetPosition(self.ctx, undefined !== index && self.ctx.state.positions[index] || 0, scrollingTo); const ctx = self.ctx; const state2 = ctx.state; const tmp9 = getContentSize(ctx); const _Number2 = Number; let bound1 = tmp7; if (Number.isFinite(tmp9)) { const _Number3 = Number; bound1 = tmp7; if (Number.isFinite(state2.scrollLength)) { bound1 = tmp7; if (state2.lastLayout) { const _Math4 = Math; let viewOffset; const bound = Math.max(0, tmp9 - state2.scrollLength); if (null != scrollingTo) { viewOffset = scrollingTo.viewOffset; } let num2 = 0; if (typeof viewOffset === "number") { num2 = 0; if (viewOffset < 0) { num2 = -viewOffset; } } const _Math5 = Math; bound1 = Math.min(tmp7, bound + num2); } } } const _Math6 = Math; let bound2 = Math.max(0, bound1); const tmp5 = undefined !== index && self.ctx.state.positions[index] || 0; } else { const ctx3 = self.ctx; const sum = state.scroll + pendingAdjust; const state3 = ctx3.state; const tmp27 = getContentSize(ctx3); const _Number4 = Number; let bound4 = sum; if (Number.isFinite(tmp27)) { const _Number = Number; bound4 = sum; if (Number.isFinite(state3.scrollLength)) { bound4 = sum; if (state3.lastLayout) { const _Math = Math; let num = 0; const bound3 = Math.max(0, tmp27 - state3.scrollLength); if (typeof undefined === "number") { num = 0; if (undefined < 0) { num = NaN; } } const _Math2 = Math; bound4 = Math.min(sum, bound3 + num); } } } const _Math3 = Math; bound2 = Math.max(0, bound4); } const diff = bound2 - state.scroll; const _Math7 = Math; let tmp16 = Math.abs(diff) > 0.1; if (!tmp16) { const _Math8 = Math; tmp16 = Math.abs(pendingAdjust) > 0.1; } if (tmp16) { self.appliedAdjust = self.appliedAdjust + diff; state.scroll = bound2; state.scrollForNextCalculateItemsInView = undefined; set$(self.ctx, "scrollAdjust", self.appliedAdjust); } set$(self.ctx, "scrollAdjustPending", 0); const ctx2 = self.ctx; closure_1 = {}; state = ctx2.state; fn(() => { let set2; let tmp163; let tmp164; let containerItemKeys = state.containerItemKeys; ({ enableScrollForNextCalculateItemsInView, idCache } = state); ({ indexByKey, minIndexSizeChanged, positions, props } = state); ({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props); ({ keyExtractor, onStickyHeaderChange: closure_4 } = props); ({ scrollForNextCalculateItemsInView, scrollLength } = state); ({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state); const data = state.props.data; let prop = state.props.stickyHeaderIndicesArr; if (!prop) { prop = []; } let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet; if (!stickyHeaderIndicesSet) { let _Set = Set; stickyHeaderIndicesSet = new Set(); } let tmp9 = closure_1_46(containerItemKeys, idCache.drawDistanceMode); ({ dataChanged, doMVCP, forceFullItemPositions } = idCache); let initialScrollSession = tmp2.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = tmp2.initialScrollSession.bootstrap; } let tmp16 = closure_1_21(containerItemKeys, "numContainers"); if (data) { if (0 !== scrollLength) { if (tmp16) { closure_8 = ref2(tmp7); let sum = tmp15(tmp7, "stylePaddingTop") + tmp15(tmp7, "alignItemsAtEndPadding"); closure_9 = sum + tmp15(tmp7, "headerSize"); const tmp15Result3 = tmp15(tmp7, "numColumns"); let scrollVelocity = idCache.scrollVelocity; if (null == scrollVelocity) { scrollVelocity = closure_1_69(tmp2); } ({ initialScroll, queuedInitialLayout } = tmp2); if (!tmp13) { let scroll1; if (null != bootstrap) { scroll1 = bootstrap.scroll; } if (null == scroll1) { scroll1 = tmp2.scroll; } let scroll = scroll1; } else { if (!queuedInitialLayout) { if (closure_1_41(tmp2)) { if (initialScroll) { scroll = closure_1_75(tmp7, initialScroll); } } } scroll = tmp2.scroll; } let num = 0; closure_11 = 0; closure_12 = 0; closure_13 = 0; closure_14 = 0; scrollBottomBuffered = 0; closure_16 = scroll; function updateScroll2(scroll) { closure_16 = scroll; values = values.values; value = values.get("scrollAdjustPending"); num = 0; if (null != value) { num = value; } closure_11 = num - closure_9; const rounded = Math.round(scroll + closure_11); closure_12 = rounded; if (rounded + scrollLength > closure_8) { const _Math = Math; closure_12 = Math.max(0, tmp4 - tmp3); } } updateScroll2(scroll); const tmp15Result4 = tmp15(tmp7, "activeStickyIndex"); closure_17 = tmp15Result4; function resolveStickyState() { num = -1; let num2 = -1; if (prop.length > 0) { let diff = arr.length - 1; let tmp5 = num; if (0 <= diff) { while (true) { let tmp6 = tmp3[arr[diff]]; if (undefined === tmp6) { diff = diff - 1; tmp5 = num; if (0 > diff) { break; } } else { tmp5 = diff; if (tmp >= tmp6) { break; } } break; } } num2 = tmp5; } if (0 <= num2) { num = arr[num2]; } let tmp8 = num2 >= 0; if (0 > num2) { tmp8 = tmp9 >= 0; } if (tmp8) { context(containerItemKeys, "activeStickyIndex", num); } let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null }; finishCalculateItemsInView = undefined; if (closure_4) { if (arr.length > 0) { if (tmp9 !== num) { finishCalculateItemsInView = () => { if (undefined !== data[num]) { if (null != closure_2_4) { const obj = { index: tmp, item: tmp2 }; tmp3(obj); } } }; } } } obj.finishCalculateItemsInView = finishCalculateItemsInView; return obj; } if (!dataChanged) { let stickyState = resolveStickyState(); } let result2 = tmp9; let result3 = tmp9; if (scrollVelocity > 0) { let result = 0.5 * tmp9; const result1 = 1.5 * tmp9; result3 = result1; result2 = result; } else { if (0 === scrollVelocity) { let _Math = Math; num = 50; } result2 = 1.5 * tmp9; result3 = 0.5 * tmp9; } let num6 = 0; if (!dataChanged) { num6 = 0; if (!forceFullItemPositions) { num6 = 0; if (!tmp25) { num6 = 0; if (!closure_1_41(tmp2)) { num6 = 0; if (!tmp2.scrollingTo) { num6 = 0; if (!tmp2.pendingNativeMVCPAdjust) { num6 = 0; if (tmp15(tmp7, "readyToRender")) { let _Math2 = Math; num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) { if (arg1 <= 0) { return 0; } else { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const bound = Math.min(1, Math.abs(scrollVelocity) / 4); return Math.sign(scrollVelocity) * arg1 * bound; } })(scrollVelocity, Math.min(result2, result3)); } } } } } } } function updateScrollRange() { const bound = Math.max(0, closure_12); closure_14 = Math.max(bound, closure_12 + scrollLength + Math.max(0, -closure_16)); closure_13 = bound - result2 + num6; closure_15 = closure_14 + result3 + num6; } updateScrollRange(); if (0 !== num6) { (function scheduleRenderRangeProjectionSettle(containerItemKeys) { state = containerItemKeys.state; const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle; if (undefined !== timeoutRenderRangeProjectionSettle) { const _clearTimeout = clearTimeout; clearTimeout(timeoutRenderRangeProjectionSettle); let timeouts = state.timeouts; timeouts.delete(timeoutRenderRangeProjectionSettle); } const timerId = setTimeout(() => { state.timeoutRenderRangeProjectionSettle = undefined; const timeouts = state.timeouts; timeouts.delete(timerId); state.scrollHistory.length = 0; const triggerCalculateItemsInView = state.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(); } else { call(state); } } }, 100); state.timeoutRenderRangeProjectionSettle = timerId; const timeouts2 = state.timeouts; timeouts2.add(timerId); })(tmp7); } if (enableScrollForNextCalculateItemsInView) { if (!tmp25) { if (!dataChanged) { if (!forceFullItemPositions) { if (scrollForNextCalculateItemsInView) { ({ top, bottom } = scrollForNextCalculateItemsInView); if (null === top) { if (null === bottom) { tmp2.scrollForNextCalculateItemsInView = undefined; } } if (null === top) { if (viewabilityConfigCallbackPairs) { (function updateViewabilityForCachedRange(containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, arg3, arg4) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { let tmp7 = null; let sum1; let tmp9 = null; if (startBuffered <= endBuffered) { let tmp3 = null; let tmp5 = null; let tmp6 = startBuffered; tmp7 = null; tmp9 = null; if (startBuffered < data1.length) { while (true) { let tmp10 = tmp[tmp6]; let tmp11 = tmp3; let tmp12 = tmp4; let tmp13 = tmp5; let tmp14 = tmp6; if (null == tmp10) { ({ data, keyExtractor } = state.props); let str2 = ""; if (data) { let tmp15 = null; if (tmp6 < data.length) { let keyExtractorResult = tmp6; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp6], tmp6); } tmp15 = keyExtractorResult; } state.idCache[tmp6] = tmp15; str2 = tmp15; } tmp10 = str2; } value = sizes.get(tmp10); if (null == value) { value = closure_1_58(containerItemKeys, tmp18, tmp14, data1[tmp6]); } let tmp23 = tmp2[tmp6]; let tmp24 = null === tmp11 && tmp23 + value > arg3; if (tmp24) { tmp11 = tmp6; } let tmp25 = undefined === tmp12 && tmp23 >= arg3 - 10 && tmp23 <= arg4; if (tmp25) { tmp12 = tmp6; } let tmp26 = tmp13; flag = false; if (null !== tmp11) { flag2 = true; if (tmp23 <= arg4) { tmp13 = tmp6; flag2 = false; } tmp26 = tmp13; flag = flag2; } tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (flag) { break; } else { let sum = tmp6 + 1; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (sum > endBuffered) { break; } else { tmp3 = tmp11; tmp4 = tmp12; tmp5 = tmp26; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; tmp6 = sum; if (sum >= data1.length) { break; } } } } } } const obj = { endNoBuffer: tmp9, firstFullyOnScreenIndex: sum1, idsInView: null, startNoBuffer: null }; if (null == sum1) { sum1 = tmp7; } const items = []; if (null != sum1) { if (null !== tmp9) { if (sum1 <= tmp9) { do { let tmp29 = state.idCache[sum1]; if (null == tmp29) { ({ data: data2, keyExtractor: keyExtractor2 } = state.props); let str4 = ""; if (data2) { let tmp31 = null; if (sum1 < data2.length) { let keyExtractor2Result = sum1; if (keyExtractor2) { keyExtractor2Result = keyExtractor2(data2[sum1], sum1); } tmp31 = keyExtractor2Result; } state.idCache[sum1] = tmp31; str4 = tmp31; } tmp29 = str4; } let arr = items.push(tmp29); sum1 = sum1 + 1; } while (sum1 <= tmp9); } } } obj.idsInView = items; obj.startNoBuffer = tmp7; const merged = Object.assign(state, obj); closure_1_102(state, tmp7); if (tmp37) { closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered); } tmp37 = null !== tmp7 && null !== tmp9; } } } } })(tmp7, viewabilityConfigCallbackPairs, scrollLength, closure_12, closure_14); } else if (tmp2.props.onFirstVisibleItemChanged) { closure_1_102(tmp2, (function findFirstVisibleIndexInCachedRange(containerItemKeys, arg1) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { if (startBuffered <= endBuffered) { if (startBuffered < data1.length) { while (true) { let tmp3 = tmp[startBuffered]; let tmp4 = startBuffered; if (null == tmp3) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp5 = null; if (startBuffered < data.length) { let keyExtractorResult = startBuffered; if (keyExtractor) { keyExtractorResult = keyExtractor(data[startBuffered], startBuffered); } tmp5 = keyExtractorResult; } state.idCache[startBuffered] = tmp5; str = tmp5; } tmp3 = str; } value = sizes.get(tmp3); let tmp9 = value; if (null == value) { tmp9 = closure_1_58(containerItemKeys, tmp8, tmp4, data1[startBuffered]); } if (tmp2[startBuffered] + tmp9 > arg1) { break; } else { let sum = startBuffered + 1; if (sum <= endBuffered) { startBuffered = sum; } } } return startBuffered; } } return null; } } } } return null; })(tmp7, closure_12)); } let prop1; if (null != stickyState) { prop1 = stickyState.finishCalculateItemsInView; } if (null != prop1) { let call = prop1.call; typeof call === "unknown" ? prop1() : call(stickyState); } } } } } } } let tmp73; if (doMVCP) { if (!tmp25) { tmp73 = closure_1_68(tmp7, dataChanged); } } if (dataChanged) { closure_1_86(tmp2); } let num8 = 0; if (!forceFullItemPositions) { num8 = 0; if (!dataChanged) { let startBuffered = minIndexSizeChanged; if (null == minIndexSizeChanged) { startBuffered = tmp2.startBuffered; } let num9 = 0; if (null != startBuffered) { num9 = startBuffered; } num8 = num9; } } let obj = { doMVCP, forceFullUpdate: forceFullItemPositions, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null }; let tmp82 = !forceFullItemPositions; if (!forceFullItemPositions) { tmp82 = !dataChanged; } if (tmp82) { tmp82 = tmp15Result3 > 1; } if (tmp82) { tmp82 = undefined !== minIndexSizeChanged; } obj.optimizeForVisibleWindow = tmp82; obj.scrollBottomBuffered = scrollBottomBuffered; obj.scrollVelocity = scrollVelocity; obj.startIndex = num8; closure_1_89(tmp7, dataChanged, obj); const tmp17Result = ref2(tmp7); closure_8 = tmp17Result; if (undefined !== minIndexSizeChanged) { tmp2.minIndexSizeChanged = undefined; } if (dataChanged) { if (doMVCP) { if (tmp2.props.maintainVisibleContentPosition.data) { if (tmp2.didContainersLayout) { if (tmp2.idsInView.length > 0) { const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition; const _Set2 = Set; set = new Set(); const idsInView = tmp2.idsInView; for (const item10226 of idsInView) { let tmp99 = item10226; value = indexByKey.get(item10226); let tmp101 = value; if (undefined !== value) { let tmp102 = shouldRestorePosition; if (shouldRestorePosition) { tmp102 = !shouldRestorePosition(data[tmp101], tmp101, data); } if (!tmp102) { let addResult = set.add(tmp99); } } continue; } } } } } } const tmp112 = closure_1_21(containerItemKeys, "scrollAdjustPending"); let num11 = 0; if (null != tmp112) { num11 = tmp112; } if (null != tmp73) { tmp73(); } let tmp114 = tmp73; if (tmp114) { let tmp116 = tmp107.scroll !== state.scroll; if (!tmp116) { const tmp109Result = tmp109(tmp111, "scrollAdjustPending"); let num12 = 0; if (null != tmp109Result) { num12 = tmp109Result; } tmp116 = num12 !== num11; } tmp114 = tmp116; } if (tmp114) { updateScroll2(tmp107.scroll); updateScrollRange(); } if (dataChanged) { stickyState = resolveStickyState(); } let tmp123; if (!tmp13) { let targetIndexSeed; if (null != bootstrap) { targetIndexSeed = bootstrap.targetIndexSeed; } tmp123 = targetIndexSeed; } if (null == tmp123) { let num13 = !dataChanged; if (!dataChanged) { num13 = startBufferedId; } if (num13) { num13 = indexByKey.get(startBufferedId); } if (!num13) { num13 = 0; } tmp123 = num13; } let diff = tmp123; let tmp126 = tmp123; let tmp127 = tmp123; if (tmp123 >= 0) { while (true) { let tmp128 = idCache[diff]; let tmp129 = diff; if (null == tmp128) { tmp128 = closure_1_49(state, diff); } let value4 = sizes.get(tmp128); if (null == value4) { value4 = closure_1_58(containerItemKeys, tmp135, tmp129, data[diff]); } tmp127 = tmp126; if (positions[diff] + value4 <= closure_13) { break; } else { diff = diff - 1; tmp126 = tmp129; tmp127 = tmp129; if (diff < 0) { break; } } } } let tmp143 = tmp127; if (tmp15Result3 > 1) { let diff1 = tmp127; tmp143 = tmp127; if (tmp127 > 0) { tmp143 = diff1; while (1 !== state.columns[diff1]) { tmp143 = diff1; if (undefined === tmp145) { break; } else { diff1 = diff1 - 1; tmp143 = diff1; if (0 >= diff1) { break; } } } } } let num16 = 0; let num17 = 0; let num18 = 0; if (0 < tmp16) { do { let _HermesInternal = HermesInternal; let tmp152 = closure_1_21(containerItemKeys, "containerItemKey" + num16); let bound = num17; if (undefined !== tmp152) { let _Math3 = Math; bound = Math.max(num17, indexByKey.get(tmp152)); } num16 = num16 + 1; num17 = bound; num18 = bound; } while (num16 < tmp16); } let obj2 = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: -1 }; const length = data.length; let _Math4 = Math; const bound1 = Math.max(0, tmp143); let tmp157 = bound1; let flag3 = false; let tmp160 = null; let tmp161 = null; let tmp162 = null; let endNoBuffer1 = null; let tmp166 = null; let startNoBuffer1 = null; if (bound1 < length) { while (true) { let tmp168 = idCache[tmp157]; let tmp169 = tmp157; let tmp171 = tmp158; let tmp172 = tmp159; let tmp173 = tmp160; let tmp174 = tmp161; let tmp175 = tmp162; if (null == tmp168) { tmp168 = closure_1_49(state, tmp157); } let value5 = sizes.get(tmp168); if (null == value5) { value5 = closure_1_58(containerItemKeys, tmp180, tmp169, data[tmp157]); } let tmp187 = positions[tmp157]; let tmp188 = tmp171; let tmp189 = tmp172; let tmp190 = tmp173; let tmp191 = tmp174; let tmp192 = tmp175; let tmp193 = flag3; if (!flag3) { let tmp201 = closure_1_100(obj2, tmp169, tmp187, value5, closure_12, closure_14); let tmp202 = null === tmp175; if (tmp202) { tmp202 = tmp187 + value5 > closure_13; } if (tmp202) { let tmp205 = null; if (closure_13 >= 0) { tmp205 = tmp187; } tmp172 = tmp205; tmp174 = tmp168; tmp175 = tmp157; } let tmp206 = flag3; let tmp207 = tmp171; let tmp208 = tmp173; if (null !== obj2.startNoBuffer) { let flag4 = true; if (tmp187 <= scrollBottomBuffered) { let sum1 = null; if (scrollBottomBuffered <= tmp17Result) { sum1 = tmp187 + value5; } tmp171 = sum1; flag4 = flag3; tmp173 = tmp157; } tmp206 = flag4; tmp207 = tmp171; tmp208 = tmp173; } tmp193 = tmp206; tmp188 = tmp207; tmp190 = tmp208; tmp189 = tmp172; tmp191 = tmp174; tmp192 = tmp175; } let sum2 = tmp157 + 1; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; if (sum2 >= length) { break; } else { tmp157 = sum2; flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; if (!tmp193) { continue; } else { flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; tmp157 = sum2; if (sum2 > num18) { break; } } continue; } } } const _Object = Object; let obj3 = { endBuffered: endNoBuffer1, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null }; ({ endNoBuffer: obj5.endNoBuffer, firstFullyOnScreenIndex: obj5.firstFullyOnScreenIndex } = obj2); obj3.idsInView = closure_1_101(state, obj2); obj3.startBuffered = startNoBuffer1; obj3.startBufferedId = tmp166; obj3.startNoBuffer = obj2.startNoBuffer; let merged = Object.assign(state, obj3); if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp164; } if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp163; } if (enableScrollForNextCalculateItemsInView) { if (!closure_1_54(tmp164)) { const rect = { bottom: tmp163, top: tmp164 }; const tmp219 = rect; } tmp214.scrollForNextCalculateItemsInView = tmp219; } let sum4 = tmp16; let items = []; if (dataChanged) { let num21 = 0; if (0 < sum4) { do { let _HermesInternal2 = HermesInternal; let tmp226 = closure_1_21(containerItemKeys, "containerItemKey" + num21); let tmp227 = !keyExtractor; if (keyExtractor) { let tmp229 = tmp226; if (tmp226) { tmp229 = undefined === indexByKey.get(tmp226); } tmp227 = tmp229; } if (tmp227) { let arr = items.push(num21); } num21 = num21 + 1; } while (num21 < sum4); } } let tmp233 = state; const scrollTargetPinnedRange = state.scrollTargetPinnedRange; let bound2 = 0; let bound3 = -1; let num23 = -1; let num24 = 0; if (scrollTargetPinnedRange) { const _Math5 = Math; const _Math6 = Math; bound2 = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); const _Math7 = Math; const _Math8 = Math; const diff2 = length - 1; bound3 = Math.min(diff2, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); num23 = bound3; num24 = bound2; } closure_24 = tmp237; function isPinnedRenderIndex(arg0) { let hasItem = set.has(arg0); if (!hasItem) { let tmp2 = closure_24; if (closure_24) { tmp2 = arg0 >= bound2; } if (tmp2) { tmp2 = arg0 <= bound3; } hasItem = tmp2; } return hasItem; } if (null !== startNoBuffer1) { if (null !== endNoBuffer1) { let items1 = []; const _Set6 = Set; const set1 = new Set(); function addPinnedIndex(bound2) { if (bound2 >= 0) { if (bound2 < length) { let tmp4 = idCache[bound2]; if (null == tmp4) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp2 = null; if (bound2 < data.length) { let keyExtractorResult = bound2; if (keyExtractor) { keyExtractorResult = keyExtractor(data[bound2], bound2); } tmp2 = keyExtractorResult; } tmp.idCache[bound2] = tmp2; str = tmp2; } tmp4 = str; } value = containerItemKeys.get(tmp4); if (undefined !== value) { const stickyContainerPool = state.stickyContainerPool; stickyContainerPool.add(value); } else { let hasItem = null == tmp4; if (!hasItem) { hasItem = set1.has(bound2); } if (!hasItem) { set1.add(bound2); items1.push(bound2); } } } } } let sum3 = startNoBuffer1; if (startNoBuffer1 <= endNoBuffer1) { do { let tmp238 = idCache[sum3]; if (null == tmp238) { tmp238 = closure_1_49(state, sum3); } if (!containerItemKeys.has(tmp238)) { let addResult1 = set1.add(sum3); let arr2 = items1.push(sum3); } sum3 = sum3 + 1; } while (sum3 <= endNoBuffer1); } for (const item10471 of alwaysRenderIndicesArr) { let addPinnedIndexResult = addPinnedIndex(item10471); continue; } if (tmp237) { if (num24 <= num23) { do { let addPinnedIndexResult1 = addPinnedIndex(num24); num24 = num24 + 1; } while (num24 <= num23); } } if (prop.length > 0) { let currentStickyIdx; if (null != stickyState) { currentStickyIdx = stickyState.currentStickyIdx; } let num25 = -1; if (null != currentStickyIdx) { num25 = currentStickyIdx; } (function handleStickyActivation(containerItemKeys, prop, currentStickyIdx, items1, set1, startNoBuffer1, endNoBuffer1) { state = containerItemKeys.state; num = -1; if (currentStickyIdx >= 0) { num = prop[currentStickyIdx]; } bound2(containerItemKeys, "activeStickyIndex", num); let num2 = 0; do { let diff = currentStickyIdx - num2; if (diff >= 0) { let tmp12 = prop[diff]; if (!closure_1_99(containerItemKeys, tmp12)) { let tmp5 = state.idCache[tmp12]; if (null == tmp5) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp6 = null; if (tmp12 < data.length) { let keyExtractorResult = tmp12; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp12], tmp12); } tmp6 = keyExtractorResult; } state.idCache[tmp12] = tmp6; str = tmp6; } tmp5 = str; } let tmp8 = tmp5; if (tmp5) { containerItemKeys = state.containerItemKeys; tmp8 = !containerItemKeys.has(tmp5); } if (tmp8) { let tmp9 = tmp12 < startNoBuffer1 || tmp12 > endNoBuffer1; tmp8 = tmp9; } if (tmp8) { tmp8 = !set1.has(tmp12); } if (tmp8) { let addResult = set1.add(tmp12); let arr = items1.push(tmp12); } } } num2 = num2 + 1; } while (num2 <= 1); })(containerItemKeys, prop, num25, items1, tmp476, startNoBuffer1, endNoBuffer1); } else if (-1 !== tmp15Result4) { context(containerItemKeys, "activeStickyIndex", -1); } if (items1.length > 0) { let fn; if (getItemType) { fn = (arg0) => { const tmp = getItemType(data[arg0], arg0); let str = ""; if (undefined !== tmp) { const _String = String; str = String(tmp); } return str; }; } const tmp275 = (function findAvailableContainers(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, set) { closure_0 = fn; if (0 === items1.length) { return []; } else { const tmp56 = length(containerItemKeys, "numContainers"); state = containerItemKeys.state; ({ containerItemMetadata: closure_2, stickyContainerPool } = state); set = undefined; if (items.length > 0) { const _Set = Set; set = new Set(items); } const mapped = items1.map((itemIndex, order) => { const obj = { isSticky: null, itemIndex, itemType: null, order: null }; const stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet; obj.isSticky = stickyHeaderIndicesSet.has(itemIndex); let tmp; if (null != closure_0) { tmp = closure_0(itemIndex); } obj.itemType = tmp; obj.order = order; return obj; }); const found = mapped.filter((isSticky) => !isSticky.isSticky); items = []; items1 = []; let num2 = 0; const found1 = mapped.filter((isSticky) => isSticky.isSticky); if (0 < tmp56) { while (true) { let _HermesInternal = HermesInternal; let tmp13 = length(containerItemKeys, "containerItemKey" + num2); let hasItem; if (null != set) { hasItem = set.has(num2); } let tmp16 = !hasItem; if (tmp13) { let hasItem1; if (null != set) { hasItem1 = set.has(tmp13); } if (hasItem1) { let indexByKey = state.indexByKey; } num2 = num2 + 1; if (num2 >= tmp56) { break; } } let tmp18 = !tmp16; if (stickyContainerPool.has(num2)) { let tmp22 = undefined === tmp13 || tmp18; if (tmp22) { let obj2 = { containerIndex: num2, distance: null }; let _Number2 = Number; obj2.distance = Number.POSITIVE_INFINITY; let arr = items1.push(obj2); } } else { if (undefined !== tmp13) { if (!tmp18) { if (!tmp) { let indexByKey2 = state.indexByKey; value = indexByKey2.get(tmp13); if (undefined !== value) { if (value < startNoBuffer1) { let obj = { containerIndex: num2, distance: value < startNoBuffer1 ? startNoBuffer1 - value : value - endNoBuffer1 }; let arr2 = items.push(obj); } } } } } let obj3 = { containerIndex: num2, distance: null }; let _Number = Number; obj3.distance = Number.POSITIVE_INFINITY; let arr3 = items.push(obj3); } } } const sorted = items.sort(closure_98); const _Array = Array; const array = new Array(length); let sum = tmp56; c5 = false; function assign(itemIndex, containerIndex) { array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType }; let deleteResult; if (null != set) { deleteResult = set.delete(containerIndex); } if (deleteResult) { c5 = true; } } function assignMatching(found, items, arg2) { closure_1 = arg2; function _loop2(iter) { items = iter; if (closure_1_4[iter.order]) { return 1; } else { const findIndexResult = items.findIndex(() => { ... }); if (-1 !== findIndexResult) { const containerIndex = array(items.splice(findIndexResult, 1), 1)[0].containerIndex; if (typeof assign === "function") { const obj = { containerIndex, itemIndex: null, itemType: null }; ({ itemIndex: obj.itemIndex, itemType: obj.itemType } = iter); tmp[iter.order] = obj; let deleteResult; if (null != set) { deleteResult = obj2.delete(containerIndex); } if (deleteResult) { c5 = true; } obj2 = set; } else { throw new TypeError("Trying to call a non-function"); } } } } const iter = found[Symbol.iterator](); while (iter !== undefined) { let _loop2Result = _loop2(iter.next()); continue; } } function assignFromPool(found, items, arg2) { if (closure_0) { assignMatching(found, items, (arg0, arg1) => { let tmp = undefined !== arg1; if (tmp) { tmp = arg0 === arg1; } return tmp; }); } assignMatching(found, items, (arg0) => undefined === arg0); if (arg2) { assignMatching(found, items, () => true); } } assignFromPool(found, items, true); assignFromPool(found1, items1, false); for (const item10099 of mapped) { let tmp36 = item10099; if (!array[item10099.order]) { let tmp38 = +sum; sum = tmp38 + 1; let tmp39 = tmp38; if (tmp36.isSticky) { let addResult = stickyContainerPool.add(tmp39); } let obj4 = assign(tmp36, tmp39); } continue; } if (c5) { items.length = 0; if (set) { for (const item10120 of set) { let arr7 = arg4.push(item10120); continue; } } } if (closure_31) { let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled"); if (null == POSITIVE_INFINITY) { const _Number3 = Number; POSITIVE_INFINITY = Number.POSITIVE_INFINITY; } if (sum > POSITIVE_INFINITY) { const _console = console; const obj5 = { debugInfo: null }; const obj10 = { numContainers: tmp56, numContainersPooled: POSITIVE_INFINITY, numNeeded: length, stillNeeded: sum - tmp56 }; obj5.debugInfo = obj10; console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj5); } } return array; } })(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, tmp88); let iter = tmp275[Symbol.iterator](); let nextResult = iter.next(); while (iter !== undefined) { let itemIndex = nextResult.itemIndex; let tmp281 = itemIndex; let containerIndex = nextResult.containerIndex; let tmp282 = idCache[itemIndex]; let tmp280 = nextResult; if (null != tmp282) { let tmp288 = tmp282; } else { tmp288 = closure_1_49(state, tmp281); } let tmp289 = tmp288; let tmp293 = containerItemKeys; let _HermesInternal3 = HermesInternal; let tmp291 = closure_1_21; let tmp295 = closure_1_21(containerItemKeys, "containerItemKey" + containerIndex); let tmp296 = tmp295; if (tmp295) { tmp295 = tmp296 !== tmp289; } if (tmp295) { let deleteResult = containerItemKeys.delete(tmp296); } if (tmp296 !== tmp289) { if (null == set2) { let _Set3 = Set; let tmp304 = new.target; let tmp305 = new.target; set2 = new Set(); } let addResult2 = set2.add(containerIndex); let tmp311 = state.containerItemGenerations[containerIndex]; let num28 = 0; if (null != tmp311) { num28 = tmp311; } state.containerItemGenerations[containerIndex] = num28 + 1; } let tmp314 = context; let _HermesInternal4 = HermesInternal; let tmp318 = context(tmp293, "containerItemKey" + containerIndex, tmp289); let _HermesInternal5 = HermesInternal; let tmp320 = context(tmp293, "containerItemIndex" + containerIndex, tmp281); let _HermesInternal6 = HermesInternal; let tmp321 = context(tmp293, "containerItemData" + containerIndex, data[tmp281]); let tmp323 = state; let containerItemMetadata = state.containerItemMetadata; let result4 = containerItemMetadata.set(containerIndex, ref3(state, itemIndex, data[tmp281], tmp280.itemType)); let result5 = containerItemKeys.set(tmp289, containerIndex); let userScrollAnchorReset = state.userScrollAnchorReset; if (null != userScrollAnchorReset) { let keys = tmp330.keys; let addResult3 = keys.add(tmp289); } let _HermesInternal7 = HermesInternal; let combined = "containerSticky" + containerIndex; let hasItem = stickyHeaderIndicesSet.has(tmp281); let isPinnedRenderIndexResult = isPinnedRenderIndex(tmp281); if (hasItem) { let tmp314Result = tmp314(tmp293, combined, true); let stickyContainerPool2 = tmp323.stickyContainerPool; let addResult4 = stickyContainerPool2.add(containerIndex); } else { if (tmp291(tmp293, combined)) { let tmp314Result2 = tmp314(tmp293, combined, false); } let stickyContainerPool = tmp323.stickyContainerPool; if (isPinnedRenderIndexResult) { let addResult5 = stickyContainerPool.add(containerIndex); } else { let deleteResult1 = stickyContainerPool.delete(containerIndex); } } if (containerIndex >= sum4) { sum4 = containerIndex + 1; } continue; } if (sum4 !== tmp16) { context(containerItemKeys, "numContainers", sum4); if (sum4 > closure_1_21(containerItemKeys, "numContainersPooled")) { tmp364(tmp366, "numContainersPooled", (function getExpandedContainerPoolSize(length, sum4) { num = 0; if (length > 0) { num = 0; if (sum4 > 0) { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const _Math4 = Math; const bound = Math.max(length, sum4); num = Math.min(bound, Math.max(sum4, Math.ceil(1.5 * sum4))); } } return num; })(length, sum4)); } tmp364 = context; tmp366 = containerItemKeys; } } tmp233 = state; const userScrollAnchorReset2 = state.userScrollAnchorReset; let size; if (null != userScrollAnchorReset2) { size = userScrollAnchorReset2.keys.size; } if (0 === size) { tmp233.userScrollAnchorReset = undefined; } tmp476 = set1; } } if (tmp233.stickyContainerPool.size > 0) { let currentStickyIdx1; if (null != stickyState) { currentStickyIdx1 = stickyState.currentStickyIdx; } let num30 = -1; if (null != currentStickyIdx1) { num30 = currentStickyIdx1; } (function handleStickyRecycling(containerItemKeys, prop, arg2, arg3, currentStickyIdx1, items, isPinnedRenderIndex) { state = containerItemKeys.state; const iter = state.stickyContainerPool[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { let tmp2 = nextResult; let _HermesInternal = HermesInternal; let tmp4 = length(containerItemKeys, "containerItemKey" + nextResult); value = undefined; if (tmp4) { let indexByKey = state.indexByKey; value = indexByKey.get(tmp5); } let tmp8 = value; if (undefined !== value) { if (!isPinnedRenderIndex(tmp8)) { let index = prop.indexOf(tmp8); let tmp11 = index; if (-1 !== index) { if (tmp11 < currentStickyIdx1 - 1) { let tmp19 = prop[tmp11 + 1]; flag = false; if (tmp19) { let tmp45 = state.positions[tmp20]; let tmp47 = undefined !== tmp45; if (tmp47) { tmp47 = arg2 > tmp46 + 2 * arg3; } flag = tmp47; } else { let tmp22 = state.idCache[tmp8]; if (null != tmp22) { let tmp26 = tmp22; } else { tmp26 = closure_1_49(state, tmp8); } let tmp27 = tmp26; if (tmp26) { let tmp29 = state.positions[tmp8]; let sizes = state.sizes; value2 = sizes.get(tmp27); if (null != value2) { } else { let tmp38 = closure_1_58(containerItemKeys, tmp27, value, state.props.data[tmp8]); } let tmp41 = undefined !== tmp29; if (tmp41) { tmp41 = arg2 > tmp29 + tmp39 + 3 * arg3; } flag = tmp41; } } if (flag) { let arr = items.push(tmp2); } } } else { let stickyContainerPool = state.stickyContainerPool; let deleteResult = stickyContainerPool.delete(tmp2); let _HermesInternal2 = HermesInternal; let tmp15 = bound2(containerItemKeys, "containerSticky" + tmp2, false); } } } continue; } })(containerItemKeys, prop, closure_12, tmp9, num30, items, isPinnedRenderIndex); } if (items.length > 0) { const _Set4 = Set; const set3 = new Set(items); } let num32 = 0; let flag5 = false; if (0 < sum4) { do { let tmp398 = containerItemKeys; let _HermesInternal8 = HermesInternal; let tmp399 = closure_1_21(containerItemKeys, "containerItemKey" + num32); let hasItem1; let tmp400 = num32; if (null != set3) { hasItem1 = set3.has(num32); } if (hasItem1) { if (undefined !== tmp399) { let deleteResult2 = containerItemKeys.delete(tmp399); if (null == set2) { let _Set5 = Set; let tmp408 = new.target; let tmp409 = new.target; set2 = new Set(); } let addResult6 = set2.add(num32); let tmp414 = state.containerItemGenerations[num32]; let num33 = 0; if (null != tmp414) { num33 = tmp414; } state.containerItemGenerations[num32] = num33 + 1; } let containerItemMetadata2 = state.containerItemMetadata; let tmp416 = state; let deleteResult3 = containerItemMetadata2.delete(num32); let stickyContainerPool3 = state.stickyContainerPool; if (stickyContainerPool3.has(num32)) { let _HermesInternal9 = HermesInternal; let tmp421 = context(tmp398, "containerSticky" + num32, false); let stickyContainerPool4 = tmp416.stickyContainerPool; let deleteResult4 = stickyContainerPool4.delete(num32); } let _HermesInternal10 = HermesInternal; let tmp427 = context(tmp398, "containerItemKey" + num32, undefined); let _HermesInternal11 = HermesInternal; let tmp428 = context(tmp398, "containerItemIndex" + num32, undefined); let _HermesInternal12 = HermesInternal; let tmp429 = context(tmp398, "containerItemData" + num32, undefined); let _HermesInternal13 = HermesInternal; let tmp431 = context(tmp398, "containerPosition" + num32, hasHadNonEmptyData); let _HermesInternal14 = HermesInternal; let tmp432 = context(tmp398, "containerColumn" + num32, -1); let _HermesInternal15 = HermesInternal; let tmp433 = context(tmp398, "containerSpan" + num32, 1); let tmp404 = flag5; } else { let value6 = indexByKey.get(tmp399); tmp404 = flag5; if (undefined !== value6) { let obj4 = { scrollAdjustPending: null, updateLayout: true }; obj4.scrollAdjustPending = num; let tmp405 = closure_1_88(tmp398, tmp400, value6, obj4).didChangePosition || flag5; tmp404 = tmp405; } } num32 = num32 + 1; flag5 = tmp404; } while (num32 < sum4); } let tmp435 = set2; if (set2) { tmp435 = overrideItemLayout; } if (tmp435) { closure_1_87(containerItemKeys, set2); } if (!tmp13) { closure_1_84(containerItemKeys); } else { closure_1_102(state, obj2.startNoBuffer); if (!queuedInitialLayout) { if (!tmp442.didContainersLayout) { if (closure_1_41(tmp442)) { let tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } else { tmp447Result = tmp447(tmp442, tmp442.startNoBuffer, tmp442.endNoBuffer); if (!tmp447Result) { tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } } if (tmp447Result) { (function setDidLayout(containerItemKeys) { containerItemKeys.state.queuedInitialLayout = true; closure_1_42(containerItemKeys); closure_1_47(containerItemKeys, { didLayout: true }); })(containerItemKeys); (function handleInitialScrollLayoutReady(containerItemKeys) { closure_0 = containerItemKeys; if (containerItemKeys.state.initialScroll) { closure_76(containerItemKeys, { forceScroll: true }); const initialScrollSession = containerItemKeys.state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("offset" !== kind) { const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(function runScroll() { return closure_2_76(closure_0, { forceScroll: true }); }); } closure_129_0 = containerItemKeys; const scrollingTo = containerItemKeys.state.scrollingTo; { let isInitialScroll; if (null != scrollingTo) { isInitialScroll = scrollingTo.isInitialScroll; } } } })(containerItemKeys); } } } let tmp455 = viewabilityConfigCallbackPairs; if (viewabilityConfigCallbackPairs) { tmp455 = null !== obj2.startNoBuffer; } if (tmp455) { tmp455 = null !== obj2.endNoBuffer; } if (tmp455) { state = containerItemKeys.state; ({ startNoBuffer, endNoBuffer } = obj2); if (null == startNoBuffer1) { startNoBuffer1 = obj2.startNoBuffer; } if (null == endNoBuffer1) { endNoBuffer1 = obj2.endNoBuffer; } closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, startNoBuffer1, endNoBuffer1); } let prop2; if (null != stickyState) { prop2 = stickyState.finishCalculateItemsInView; } if (null != prop2) { const call2 = prop2.call; if (typeof call2 === "unknown") { prop2(); } else { call2(stickyState); } } } tmp109 = closure_1_21; tmp111 = containerItemKeys; const tmp15Result = tmp15(tmp7, "stylePaddingTop"); tmp214 = state; } } } }); } } } ]; function useStateContext() { return frozen.useContext(closure_17); } function useArr$(items) { const context = frozen.useContext(closure_17); if (1 === items.length) { let first = items[0]; } else { first = items.join("\0"); } items = [context, first]; const memo = frozen.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items); const get = memo.get; return context(first[6]).useSyncExternalStore(memo.subscribe, get, get); } function getStickyPushLimit(state, arg1, arg2) { if (arg2) { const sizes = state.sizes; value = sizes.get(arg2); if (value) { if (value > 0) { const prop = state.props.stickyHeaderIndicesArr; const index = prop.indexOf(arg1); if (-1 !== index) { if (undefined !== state.props.stickyHeaderIndicesArr[index + 1]) { if (undefined !== state.positions[tmp5]) { return tmp6 - value; } } } } } } } function useLatestRef(itemLayoutAnimation) { const ref = frozen.useRef(itemLayoutAnimation); ref.current = itemLayoutAnimation; return ref; } function useStableRenderComponent(renderScrollComponent, current2) { const ref = frozen.useRef(renderScrollComponent); ref.current = renderScrollComponent; const ref1 = frozen.useRef(current2); ref1.current = current2; const items = [ref1, ref]; return frozen.useMemo(() => frozen.forwardRef((AUTO_DISMISS, current) => { current = ref.current; if (null == current) { return null; } else { const call = current.call; const currentResult = ref2.current(AUTO_DISMISS, current); typeof call === "unknown" ? current(currentResult) : call(ref, currentResult); } }), items); } let closure_134 = _createClass(ScrollAdjustHandler, items); function useCombinedRef() { const items = [...arguments]; return noop.useCallback((current) => { const iter = items[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { let tmp3 = nextResult; if (nextResult) { if (isFunction(tmp3)) { let tmp3Result = tmp3(current); } else { tmp3.current = current; } } continue; } }, items); } const StyleSheet = get_ActivityIndicator.StyleSheet; function sortAsc(arg0, arg1) { return arg0 - arg1; } function toCount(num) { num = 0; if (typeof num === "number") { const _Number = Number; num = 0; if (Number.isFinite(num)) { const _Math = Math; const _Math2 = Math; num = Math.max(0, Math.floor(num)); } } return num; } function addIndex(add, arg1, arg2) { let tmp = arg2 >= 0; if (tmp) { tmp = arg2 < arg1; } if (tmp) { add.add(arg2); } } memoResult1 = memo(function PositionViewState2(id) { id = id.id; ({ horizontal, style, refView } = id); const merged = Object.assign(id, Object.assign({ id: 0, horizontal: 0, style: 0, refView: 0 })); const items = ["containerPosition" + id, "containerItemKey" + id]; let first; const context = frozen.useContext(closure_17); if (1 === items.length) { first = items[0]; } else { first = items.join("\0"); } const items1 = [context, first]; const memo = obj.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; const obj2 = context(first[6]); let first1 = _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 2)[0]; if (undefined === first1) { first1 = c32; } const obj3 = { ref: refView, style: null }; const items2 = [style, ]; if (horizontal) { const obj4 = { left: first1 }; let obj5 = obj4; } else { obj5 = { top: first1 }; } items2[1] = obj5; obj3.style = items2; const merged1 = Object.assign(merged); return ; }); let closure_141 = forwardRef(function LegendListInner2(recycleItems, ref) { const callback = snapToIndices.useCallback((arg0) => { }, []); if (undefined === recycleItems.recycleItems) { let tmp2 = closure_31; if (closure_31) { tmp2 = !set.has("recycleItems-omitted"); } if (tmp2) { set.add("recycleItems-omitted"); let _console = console; let _HermesInternal = HermesInternal; console.warn("[legend-list] " + "recycleItems was not provided, so it defaults to false. Set recycleItems explicitly to true for better performance with recycling-aware rows, or false to preserve remount-on-reuse behavior."); } } const alignItemsAtEnd = recycleItems.alignItemsAtEnd; let anchoredEndSpace = recycleItems.anchoredEndSpace; f101429 = anchoredEndSpace; const alwaysRender = recycleItems.alwaysRender; measureInLayoutEffect = alwaysRender; ({ columnWrapperStyle, contentInset, data, contentContainerStyle } = recycleItems); if (undefined === data) { data = []; } let onLayoutProp = data; ({ dataKey, dataVersion, drawDistance } = recycleItems); let num = 250; if (undefined !== drawDistance) { num = drawDistance; } ({ contentInsetEndAdjustment, estimatedItemSize } = recycleItems); let num2 = 100; if (undefined !== estimatedItemSize) { num2 = estimatedItemSize; } ({ estimatedListSize, extraData } = recycleItems); let onLayoutChange = extraData; ({ getFixedItemSize, getItemType, horizontal } = recycleItems); ({ rtl, estimatedHeaderSize, initialScrollAtEnd } = recycleItems); closure_5 = tmp9; ({ initialScrollIndex, initialScrollOffset, experimental_adaptiveRender, keyExtractor, ListFooterComponent } = recycleItems); let maintainScrollAtEnd = recycleItems.maintainScrollAtEnd; let tmp10 = undefined !== maintainScrollAtEnd; ({ itemsAreEqual, ListEmptyComponent, ListFooterComponentStyle, ListHeaderComponent } = recycleItems); if (tmp10) { tmp10 = maintainScrollAtEnd; } const maintainScrollAtEndThreshold = recycleItems.maintainScrollAtEndThreshold; let num3 = 0.1; if (undefined !== maintainScrollAtEndThreshold) { num3 = maintainScrollAtEndThreshold; } ({ maintainVisibleContentPosition, numColumns } = recycleItems); let num4 = 1; if (undefined !== numColumns) { num4 = numColumns; } ({ overrideItemLayout, onEndReachedThreshold } = recycleItems); let num5 = 0.5; let num6 = 0.5; if (undefined !== onEndReachedThreshold) { num6 = onEndReachedThreshold; } const onMetricsChange = recycleItems.onMetricsChange; ({ onRefresh, onScroll, onStartReachedThreshold, onItemSizeChanged, onLayout, onLoad, onMomentumScrollEnd, onScrollBeginDrag, onStartReached } = recycleItems); if (undefined !== onStartReachedThreshold) { num5 = onStartReachedThreshold; } const onViewableItemsChanged = recycleItems.onViewableItemsChanged; ({ progressViewOffset, recycleItems } = recycleItems); let tmp11 = undefined !== recycleItems; ({ onStickyHeaderChange, onFirstVisibleItemChanged } = recycleItems); if (tmp11) { tmp11 = recycleItems; } ({ refreshControl, scrollEventThrottle, snapToIndices } = recycleItems); ({ stickyHeaderIndices, useWindowScroll, viewabilityConfig } = recycleItems); const viewabilityConfigCallbackPairs = recycleItems.viewabilityConfigCallbackPairs; ({ refreshing, refScrollView, renderScrollComponent, renderItem, style } = recycleItems); let tmp12 = onLayoutChange(recycleItems, onMetricsChange); ({ positionComponentInternal: positionComponentInternal2, stickyPositionComponentInternal: stickyPositionComponentInternal2 } = tmp12); ({ animatedPropsInternal, positionComponentInternal, stickyPositionComponentInternal } = recycleItems); let tmp13 = onLayoutChange(tmp12, onViewableItemsChanged); const flattenResult = StyleSheet.flatten(contentContainerStyle); let tmp15 = tmp8; if (undefined !== alignItemsAtEnd && alignItemsAtEnd) { tmp15 = !horizontal; } if (tmp15) { let minHeight; if (null != flattenResult) { minHeight = flattenResult.minHeight; } tmp15 = null == minHeight; } if (tmp15) { tmp15 = data.length > 0; } let tmp18 = tmp8; if (undefined !== alignItemsAtEnd && alignItemsAtEnd) { tmp18 = !tmp15; } if (!tmp18) { let obj3 = {}; let merged = Object.assign(flattenResult); if (tmp8) { if (!tmp15) { let str5 = "column"; if (horizontal) { str5 = "row"; } let obj4 = { display: "flex", flexDirection: str5 }; let tmp28 = tmp18 ? { flexGrow: 1 } : {}; let merged1 = Object.assign(tmp28); obj4.justifyContent = "flex-end"; } const merged2 = Object.assign(obj4); let obj5 = {}; const merged3 = Object.assign(StyleSheet.flatten(style)); let tmp38 = extractPadding(obj5, obj3, "Top"); closure_13 = tmp38; let tmp39 = extractPadding(obj5, obj3, "Bottom"); let stylePaddingBottom = tmp39; if (!tmp10) { if (true === maintainVisibleContentPosition) { let obj6 = { data: true, size: true }; } else { if (maintainVisibleContentPosition) { if (typeof maintainVisibleContentPosition === "object") { const data2 = maintainVisibleContentPosition.data; let obj7 = { data: null != data2 && data2, shouldRestorePosition: null, size: null }; ({ shouldRestorePosition: obj9.shouldRestorePosition, size } = maintainVisibleContentPosition); obj7.size = null == size || size; obj6 = obj7; let tmp51 = null != data2 && data2; } } obj6 = false === maintainVisibleContentPosition ? { data: false, size: false } : { data: false, size: true }; } let tmp54 = null != initialScrollOffset; let tmp55 = !tmp9; if (!tmp9) { tmp55 = !tmp53; } if (tmp55) { tmp55 = !tmp54; } if (tmp55) { let tmp56 = horizontal; if (tmp56) { let isRTL = rtl; if (null == rtl) { isRTL = viewabilityConfig.I18nManager.isRTL; } tmp56 = isRTL; } tmp55 = tmp56; } isRTL = tmp55; let tmp59 = !tmp9; if (!tmp9) { tmp59 = !tmp53; } if (tmp59) { if (!tmp54) { tmp54 = tmp55; } tmp59 = tmp54; } isRTL = tmp59; let tmp60 = tmp9; if (!tmp9) { tmp60 = tmp53; } closure_18 = tmp60; if (tmp9) { let obj8 = { index: null, preserveForBottomPadding: true, viewOffset: null, viewPosition: 1 }; let _Math = Math; obj8.index = Math.max(0, data.length - 1); obj8.viewOffset = -tmp39; let tmp61 = obj8; } else if (tmp53) { if (typeof initialScrollIndex === "object") { let index = initialScrollIndex.index; let num12 = 0; if (null != index) { num12 = index; } let obj10 = { index: num12, preserveForBottomPadding: undefined === initialScrollIndex.viewOffset && 1 === initialScrollIndex.viewPosition || undefined, viewOffset: null, viewPosition: null }; let viewOffset = initialScrollIndex.viewOffset; if (null == viewOffset) { let num13 = 0; if (1 === initialScrollIndex.viewPosition) { num13 = -tmp39; } viewOffset = num13; } obj10.viewOffset = viewOffset; let viewPosition = initialScrollIndex.viewPosition; initialScrollIndex = 0; if (null != viewPosition) { initialScrollIndex = viewPosition; } obj10.viewPosition = initialScrollIndex; let obj11 = obj10; } else { let num10 = 0; if (null != initialScrollIndex) { num10 = initialScrollIndex; } obj11 = { index: num10, viewOffset: null }; let num11 = 0; if (null != initialScrollOffset) { num11 = initialScrollOffset; } obj11.viewOffset = num11; } } else if (tmp59) { let num9 = 0; if (null != initialScrollOffset) { num9 = initialScrollOffset; } let obj12 = { contentOffset: num9, index: 0, viewOffset: 0 }; tmp61 = obj12; } obj12 = tmp61; [tmp67, listen$] = horizontal(viewabilityConfigCallbackPairs.useState(!overrideItemLayout), 2); closure_21 = horizontal(viewabilityConfigCallbackPairs.useReducer((arg0) => arg0 + 1, 0), 2)[1]; const context = viewabilityConfigCallbackPairs.useContext(isRTL); if (!columnWrapperStyle) { ({ gap, columnGap, rowGap } = obj3); obj3.gap = undefined; obj3.columnGap = undefined; obj3.rowGap = undefined; const obj13 = { columnGap, gap, rowGap }; } context.columnWrapperStyle = columnWrapperStyle; if (horizontal) { let columnGap1; if (!tmp71) { columnGap1 = columnWrapperStyle2.columnGap; } if (null == columnGap1) { let gap1; if (null != context.columnWrapperStyle) { gap1 = columnWrapperStyle4.gap; } columnGap1 = gap1; } let rowGap1 = columnGap1; } else { rowGap1 = undefined; if (!tmp71) { rowGap1 = columnWrapperStyle2.rowGap; } if (null == rowGap1) { let gap2; if (null != context.columnWrapperStyle) { gap2 = columnWrapperStyle3.gap; } rowGap1 = gap2; } } let num15 = 0; if (typeof rowGap1 === "number") { let _Number = Number; num15 = 0; if (Number.isFinite(rowGap1)) { num15 = rowGap1; } } ref = obj.useRef(null); let finishCalculateItemsInView = keyExtractor; const tmp64 = overrideItemLayout; const tmp66 = horizontal(viewabilityConfigCallbackPairs.useState(!overrideItemLayout), 2); if (null == keyExtractor) { finishCalculateItemsInView = (arg0, arg1) => arg1.toString(); } obj.useRef(undefined); let anchorIndex; if (null != anchoredEndSpace) { anchorIndex = anchoredEndSpace.anchorIndex; } let items = [anchorIndex, , , , , , , , ]; let top; if (null != alwaysRender) { top = alwaysRender.top; } items[1] = top; let bottom; if (null != alwaysRender) { bottom = alwaysRender.bottom; } items[2] = bottom; let indices; if (null != alwaysRender) { indices = alwaysRender.indices; } let joined; if (null != indices) { joined = indices.join(","); } items[3] = joined; let keys; if (null != alwaysRender) { keys = alwaysRender.keys; } let joined1; if (null != keys) { joined1 = keys.join(","); } items[4] = joined1; items[5] = data; items[6] = dataKey; items[7] = dataVersion; items[8] = finishCalculateItemsInView; const memo = obj.useMemo(() => { let anchorIndex; if (null != f101429) { anchorIndex = f101429.anchorIndex; } let tmp5 = (function getAlwaysRenderIndices(measureInLayoutEffect, onLayoutProp, fn, anchorIndex) { let bound; if (0 === onLayoutProp.length) { return []; } else { const _Set2 = Set; set = new Set(); let top; if (null != measureInLayoutEffect) { top = measureInLayoutEffect.top; } const tmp44Result = closure_1_138(top); if (tmp44Result > 0) { const _Math = Math; let num2 = 0; if (0 < Math.min(tmp44Result, length)) { do { let tmp5 = closure_1_139(set, length, num2); num2 = num2 + 1; let _Math2 = Math; bound = Math.min(tmp44Result, length); } while (num2 < bound); } } let bottom; if (null != measureInLayoutEffect) { bottom = measureInLayoutEffect.bottom; } const tmp7Result = closure_1_138(bottom); if (tmp7Result > 0) { const _Math3 = Math; let bound1 = Math.max(0, length - tmp7Result); if (bound1 < length) { do { let tmp12 = closure_1_139(set, length, bound1); bound1 = bound1 + 1; } while (bound1 < length); } } let indices1; if (null != measureInLayoutEffect) { indices1 = measureInLayoutEffect.indices; } let length1; if (null != indices1) { length1 = indices1.length; } if (length1) { const indices = measureInLayoutEffect.indices; for (const item10038 of indices) { let _Number = Number; let tmp17 = item10038; if (Number.isFinite(item10038)) { let _Math4 = Math; let tmp20 = closure_1_139(set, length, Math.floor(tmp17)); } continue; } } let keys; if (null != measureInLayoutEffect) { keys = measureInLayoutEffect.keys; } let length2; if (null != keys) { length2 = keys.length; } if (length2) { const _Set = Set; const set1 = new Set(measureInLayoutEffect.keys); if (0 < length) { num4 = 0; if (set1.size > 0) { while (true) { let tmp26 = fn(onLayoutProp[num4], num4); if (set1.has(tmp26)) { let tmp29 = closure_1_139(set, length, num4); let deleteResult = set1.delete(tmp26); } let sum = num4 + 1; if (sum >= length) { break; } else { num4 = sum; if (set1.size <= 0) { break; } } } } } } if (undefined !== anchorIndex) { const _Number2 = Number; if (Number.isFinite(anchorIndex)) { const _Math5 = Math; const rounded = Math.floor(anchorIndex); let sum1 = length; if (rounded >= 0) { sum1 = rounded; } if (sum1 < length) { do { let tmp36 = closure_1_139(set, length, sum1); sum1 = sum1 + 1; } while (sum1 < length); } } } const _Array = Array; const arr = Array.from(set); const sorted = arr.sort(closure_1_137); return arr; } })(measureInLayoutEffect, onLayoutProp, fn, anchorIndex); const obj = { arr: tmp5, set: new Set(tmp5) }; return obj; }, items); const ref1 = obj.useRef(undefined); overrideItemLayout = tmp88; obj.useRef(overrideItemLayout); if (!ref1.current) { if (!context.state) { if (null != estimatedListSize) { let str15 = "height"; if (horizontal) { str15 = "width"; } let values = context.values; let initialMode; if (null != experimental_adaptiveRender) { initialMode = experimental_adaptiveRender.initialMode; } let str16 = "normal"; if (null != initialMode) { str16 = initialMode; } let result = values.set("adaptiveRender", str16); const obj15 = { averageSizes: {}, columnSpans: [], columns: [], containerItemGenerations: [], containerItemKeys: null, containerItemMetadata: null, contentInsetOverride: "ip", dataChangeEpoch: false, dataChangeNeedsScrollUpdate: false, didColumnsChange: false, didDataChange: false, didLoad: true, enableScrollForNextCalculateItemsInView: -1, endBuffered: -1, endNoBuffer: "ip", endReachedSnapshot: 285736959, firstFullyOnScreenIndex: 7430402, hasHadNonEmptyData: 16777216, idCache: 113, idsInView: 7430400, indexByKey: 1644167168, initialScroll: 28930, initialScrollSession: 23134208, isEndReached: 113, isFirst: 39911680, isStartReached: 115, lastBatchingAction: 0, lastLayout: 0, lastScrollDelta: 7409920, loadStartTime: 33554432, minIndexSizeChanged: -142, nativeContentInset: -1, nativeMarginTop: 1627546111, pendingDataComparison: 28929, pendingNativeMVCPAdjust: 1365311488, positions: 3222569, props: 0, queuedCalculateItemsInView: 1916788736, queuedFullDrawDistancePrewarm: 80, refScroller: 320, scroll: 829129809, scrollAdjustHandler: 0, scrollForNextCalculateItemsInView: 1071644672, scrollHistory: 153714, scrollLength: 7680, scrollPending: 2066882816, scrollPrev: -515396076, scrollPrevTime: 2067760250, scrollProcessingEnabled: -515396076, scrollTime: 1363117178, sizes: 523315420, sizesKnown: 522133279, startBuffered: 1363132191, startNoBuffer: -768519025, startReachedSnapshot: -774778415, stickyContainerPool: 1363136977, stickyContainers: -1708062060, timeoutAdaptiveRender: -1717986919, timeouts: 1900005785, totalSize: 1, viewabilityConfigCallbackPairs: 1227838801 }; const _Map = Map; map = new Map(); obj15.containerItemKeys = map; const _Map2 = Map; map1 = new Map(); obj15.containerItemMetadata = map1; obj15.hasHadNonEmptyData = data.length > 0; obj15.idCache = []; obj15.idsInView = []; const _Map3 = Map; keys = new.target; const map2 = new Map(); obj15.indexByKey = map2; obj15.initialScroll = tmp61; let tmp106; if (tmp61) { let str18 = "bootstrap"; if (tmp59) { str18 = "offset"; } const obj17 = { kind: str18, previousDataLength: data.length }; tmp106 = obj17; } obj15.initialScrollSession = tmp106; let _Date = Date; obj15.lastBatchingAction = Date.now(); const _Date2 = Date; obj15.loadStartTime = Date.now(); obj15.positions = []; obj15.props = {}; obj15.refScroller = { current: null }; let tmp111 = new closure_134(context); obj15.scrollAdjustHandler = tmp111; obj15.scrollHistory = []; obj15.scrollLength = estimatedListSize[str15]; const _Map4 = Map; const map3 = new Map(); obj15.sizes = map3; const _Map5 = Map; const map4 = new Map(); obj15.sizesKnown = map4; let _Set = Set; set = new Set(); obj15.stickyContainerPool = set; const _Map6 = Map; const map5 = new Map(); obj15.stickyContainers = map5; let _Set2 = Set; let set1 = new Set(); obj15.timeouts = set1; context.state = obj15; let state = context.state; state.triggerCalculateItemsInView = (arg0) => { closure_0 = context; if (arg0 === undefined) { const obj = {}; } state = context.state; fn(() => { let set2; let tmp163; let tmp164; let containerItemKeys = state.containerItemKeys; ({ enableScrollForNextCalculateItemsInView, idCache } = state); ({ indexByKey, minIndexSizeChanged, positions, props } = state); ({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props); ({ keyExtractor, onStickyHeaderChange: closure_4 } = props); ({ scrollForNextCalculateItemsInView, scrollLength } = state); ({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state); const data = state.props.data; let prop = state.props.stickyHeaderIndicesArr; if (!prop) { prop = []; } let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet; if (!stickyHeaderIndicesSet) { let _Set = Set; stickyHeaderIndicesSet = new Set(); } let tmp9 = closure_1_46(containerItemKeys, idCache.drawDistanceMode); ({ dataChanged, doMVCP, forceFullItemPositions } = idCache); let initialScrollSession = tmp2.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = tmp2.initialScrollSession.bootstrap; } let tmp16 = closure_1_21(containerItemKeys, "numContainers"); if (data) { if (0 !== scrollLength) { if (tmp16) { closure_8 = ref2(tmp7); let sum = tmp15(tmp7, "stylePaddingTop") + tmp15(tmp7, "alignItemsAtEndPadding"); closure_9 = sum + tmp15(tmp7, "headerSize"); const tmp15Result3 = tmp15(tmp7, "numColumns"); let scrollVelocity = idCache.scrollVelocity; if (null == scrollVelocity) { scrollVelocity = closure_1_69(tmp2); } ({ initialScroll, queuedInitialLayout } = tmp2); if (!tmp13) { let scroll1; if (null != bootstrap) { scroll1 = bootstrap.scroll; } if (null == scroll1) { scroll1 = tmp2.scroll; } let scroll = scroll1; } else { if (!queuedInitialLayout) { if (closure_1_41(tmp2)) { if (initialScroll) { scroll = closure_1_75(tmp7, initialScroll); } } } scroll = tmp2.scroll; } let num = 0; closure_11 = 0; closure_12 = 0; closure_13 = 0; closure_14 = 0; scrollBottomBuffered = 0; closure_16 = scroll; function updateScroll2(scroll) { closure_16 = scroll; values = values.values; value = values.get("scrollAdjustPending"); num = 0; if (null != value) { num = value; } closure_11 = num - closure_9; const rounded = Math.round(scroll + closure_11); closure_12 = rounded; if (rounded + scrollLength > closure_8) { const _Math = Math; closure_12 = Math.max(0, tmp4 - tmp3); } } updateScroll2(scroll); const tmp15Result4 = tmp15(tmp7, "activeStickyIndex"); closure_17 = tmp15Result4; function resolveStickyState() { num = -1; let num2 = -1; if (prop.length > 0) { let diff = arr.length - 1; let tmp5 = num; if (0 <= diff) { while (true) { let tmp6 = tmp3[arr[diff]]; if (undefined === tmp6) { diff = diff - 1; tmp5 = num; if (0 > diff) { break; } } else { tmp5 = diff; if (tmp >= tmp6) { break; } } break; } } num2 = tmp5; } if (0 <= num2) { num = arr[num2]; } let tmp8 = num2 >= 0; if (0 > num2) { tmp8 = tmp9 >= 0; } if (tmp8) { context(containerItemKeys, "activeStickyIndex", num); } let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null }; finishCalculateItemsInView = undefined; if (closure_4) { if (arr.length > 0) { if (tmp9 !== num) { finishCalculateItemsInView = () => { if (undefined !== data[num]) { if (null != closure_2_4) { const obj = { index: tmp, item: tmp2 }; tmp3(obj); } } }; } } } obj.finishCalculateItemsInView = finishCalculateItemsInView; return obj; } if (!dataChanged) { let stickyState = resolveStickyState(); } let result2 = tmp9; let result3 = tmp9; if (scrollVelocity > 0) { let result = 0.5 * tmp9; const result1 = 1.5 * tmp9; result3 = result1; result2 = result; } else { if (0 === scrollVelocity) { let _Math = Math; num = 50; } result2 = 1.5 * tmp9; result3 = 0.5 * tmp9; } let num6 = 0; if (!dataChanged) { num6 = 0; if (!forceFullItemPositions) { num6 = 0; if (!tmp25) { num6 = 0; if (!closure_1_41(tmp2)) { num6 = 0; if (!tmp2.scrollingTo) { num6 = 0; if (!tmp2.pendingNativeMVCPAdjust) { num6 = 0; if (tmp15(tmp7, "readyToRender")) { let _Math2 = Math; num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) { if (arg1 <= 0) { return 0; } else { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const bound = Math.min(1, Math.abs(scrollVelocity) / 4); return Math.sign(scrollVelocity) * arg1 * bound; } })(scrollVelocity, Math.min(result2, result3)); } } } } } } } function updateScrollRange() { const bound = Math.max(0, closure_12); closure_14 = Math.max(bound, closure_12 + scrollLength + Math.max(0, -closure_16)); closure_13 = bound - result2 + num6; closure_15 = closure_14 + result3 + num6; } updateScrollRange(); if (0 !== num6) { (function scheduleRenderRangeProjectionSettle(containerItemKeys) { state = containerItemKeys.state; const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle; if (undefined !== timeoutRenderRangeProjectionSettle) { const _clearTimeout = clearTimeout; clearTimeout(timeoutRenderRangeProjectionSettle); let timeouts = state.timeouts; timeouts.delete(timeoutRenderRangeProjectionSettle); } const timerId = setTimeout(() => { state.timeoutRenderRangeProjectionSettle = undefined; const timeouts = state.timeouts; timeouts.delete(timerId); state.scrollHistory.length = 0; const triggerCalculateItemsInView = state.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(); } else { call(state); } } }, 100); state.timeoutRenderRangeProjectionSettle = timerId; const timeouts2 = state.timeouts; timeouts2.add(timerId); })(tmp7); } if (enableScrollForNextCalculateItemsInView) { if (!tmp25) { if (!dataChanged) { if (!forceFullItemPositions) { if (scrollForNextCalculateItemsInView) { ({ top, bottom } = scrollForNextCalculateItemsInView); if (null === top) { if (null === bottom) { tmp2.scrollForNextCalculateItemsInView = undefined; } } if (null === top) { if (viewabilityConfigCallbackPairs) { (function updateViewabilityForCachedRange(containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, arg3, arg4) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { let tmp7 = null; let sum1; let tmp9 = null; if (startBuffered <= endBuffered) { let tmp3 = null; let tmp5 = null; let tmp6 = startBuffered; tmp7 = null; tmp9 = null; if (startBuffered < data1.length) { while (true) { let tmp10 = tmp[tmp6]; let tmp11 = tmp3; let tmp12 = tmp4; let tmp13 = tmp5; let tmp14 = tmp6; if (null == tmp10) { ({ data, keyExtractor } = state.props); let str2 = ""; if (data) { let tmp15 = null; if (tmp6 < data.length) { let keyExtractorResult = tmp6; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp6], tmp6); } tmp15 = keyExtractorResult; } state.idCache[tmp6] = tmp15; str2 = tmp15; } tmp10 = str2; } value = sizes.get(tmp10); if (null == value) { value = closure_1_58(containerItemKeys, tmp18, tmp14, data1[tmp6]); } let tmp23 = tmp2[tmp6]; let tmp24 = null === tmp11 && tmp23 + value > arg3; if (tmp24) { tmp11 = tmp6; } let tmp25 = undefined === tmp12 && tmp23 >= arg3 - 10 && tmp23 <= arg4; if (tmp25) { tmp12 = tmp6; } let tmp26 = tmp13; flag = false; if (null !== tmp11) { flag2 = true; if (tmp23 <= arg4) { tmp13 = tmp6; flag2 = false; } tmp26 = tmp13; flag = flag2; } tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (flag) { break; } else { let sum = tmp6 + 1; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (sum > endBuffered) { break; } else { tmp3 = tmp11; tmp4 = tmp12; tmp5 = tmp26; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; tmp6 = sum; if (sum >= data1.length) { break; } } } } } } const obj = { endNoBuffer: tmp9, firstFullyOnScreenIndex: sum1, idsInView: null, startNoBuffer: null }; if (null == sum1) { sum1 = tmp7; } const items = []; if (null != sum1) { if (null !== tmp9) { if (sum1 <= tmp9) { do { let tmp29 = state.idCache[sum1]; if (null == tmp29) { ({ data: data2, keyExtractor: keyExtractor2 } = state.props); let str4 = ""; if (data2) { let tmp31 = null; if (sum1 < data2.length) { let keyExtractor2Result = sum1; if (keyExtractor2) { keyExtractor2Result = keyExtractor2(data2[sum1], sum1); } tmp31 = keyExtractor2Result; } state.idCache[sum1] = tmp31; str4 = tmp31; } tmp29 = str4; } let arr = items.push(tmp29); sum1 = sum1 + 1; } while (sum1 <= tmp9); } } } obj.idsInView = items; obj.startNoBuffer = tmp7; const merged = Object.assign(state, obj); closure_1_102(state, tmp7); if (tmp37) { closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered); } tmp37 = null !== tmp7 && null !== tmp9; } } } } })(tmp7, viewabilityConfigCallbackPairs, scrollLength, closure_12, closure_14); } else if (tmp2.props.onFirstVisibleItemChanged) { closure_1_102(tmp2, (function findFirstVisibleIndexInCachedRange(containerItemKeys, arg1) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { if (startBuffered <= endBuffered) { if (startBuffered < data1.length) { while (true) { let tmp3 = tmp[startBuffered]; let tmp4 = startBuffered; if (null == tmp3) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp5 = null; if (startBuffered < data.length) { let keyExtractorResult = startBuffered; if (keyExtractor) { keyExtractorResult = keyExtractor(data[startBuffered], startBuffered); } tmp5 = keyExtractorResult; } state.idCache[startBuffered] = tmp5; str = tmp5; } tmp3 = str; } value = sizes.get(tmp3); let tmp9 = value; if (null == value) { tmp9 = closure_1_58(containerItemKeys, tmp8, tmp4, data1[startBuffered]); } if (tmp2[startBuffered] + tmp9 > arg1) { break; } else { let sum = startBuffered + 1; if (sum <= endBuffered) { startBuffered = sum; } } } return startBuffered; } } return null; } } } } return null; })(tmp7, closure_12)); } let prop1; if (null != stickyState) { prop1 = stickyState.finishCalculateItemsInView; } if (null != prop1) { let call = prop1.call; typeof call === "unknown" ? prop1() : call(stickyState); } } } } } } } let tmp73; if (doMVCP) { if (!tmp25) { tmp73 = closure_1_68(tmp7, dataChanged); } } if (dataChanged) { closure_1_86(tmp2); } let num8 = 0; if (!forceFullItemPositions) { num8 = 0; if (!dataChanged) { let startBuffered = minIndexSizeChanged; if (null == minIndexSizeChanged) { startBuffered = tmp2.startBuffered; } let num9 = 0; if (null != startBuffered) { num9 = startBuffered; } num8 = num9; } } let obj = { doMVCP, forceFullUpdate: forceFullItemPositions, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null }; let tmp82 = !forceFullItemPositions; if (!forceFullItemPositions) { tmp82 = !dataChanged; } if (tmp82) { tmp82 = tmp15Result3 > 1; } if (tmp82) { tmp82 = undefined !== minIndexSizeChanged; } obj.optimizeForVisibleWindow = tmp82; obj.scrollBottomBuffered = scrollBottomBuffered; obj.scrollVelocity = scrollVelocity; obj.startIndex = num8; closure_1_89(tmp7, dataChanged, obj); const tmp17Result = ref2(tmp7); closure_8 = tmp17Result; if (undefined !== minIndexSizeChanged) { tmp2.minIndexSizeChanged = undefined; } if (dataChanged) { if (doMVCP) { if (tmp2.props.maintainVisibleContentPosition.data) { if (tmp2.didContainersLayout) { if (tmp2.idsInView.length > 0) { const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition; const _Set2 = Set; set = new Set(); const idsInView = tmp2.idsInView; for (const item10226 of idsInView) { let tmp99 = item10226; value = indexByKey.get(item10226); let tmp101 = value; if (undefined !== value) { let tmp102 = shouldRestorePosition; if (shouldRestorePosition) { tmp102 = !shouldRestorePosition(data[tmp101], tmp101, data); } if (!tmp102) { let addResult = set.add(tmp99); } } continue; } } } } } } const tmp112 = closure_1_21(containerItemKeys, "scrollAdjustPending"); let num11 = 0; if (null != tmp112) { num11 = tmp112; } if (null != tmp73) { tmp73(); } let tmp114 = tmp73; if (tmp114) { let tmp116 = tmp107.scroll !== state.scroll; if (!tmp116) { const tmp109Result = tmp109(tmp111, "scrollAdjustPending"); let num12 = 0; if (null != tmp109Result) { num12 = tmp109Result; } tmp116 = num12 !== num11; } tmp114 = tmp116; } if (tmp114) { updateScroll2(tmp107.scroll); updateScrollRange(); } if (dataChanged) { stickyState = resolveStickyState(); } let tmp123; if (!tmp13) { let targetIndexSeed; if (null != bootstrap) { targetIndexSeed = bootstrap.targetIndexSeed; } tmp123 = targetIndexSeed; } if (null == tmp123) { let num13 = !dataChanged; if (!dataChanged) { num13 = startBufferedId; } if (num13) { num13 = indexByKey.get(startBufferedId); } if (!num13) { num13 = 0; } tmp123 = num13; } let diff = tmp123; let tmp126 = tmp123; let tmp127 = tmp123; if (tmp123 >= 0) { while (true) { let tmp128 = idCache[diff]; let tmp129 = diff; if (null == tmp128) { tmp128 = closure_1_49(state, diff); } let value4 = sizes.get(tmp128); if (null == value4) { value4 = closure_1_58(containerItemKeys, tmp135, tmp129, data[diff]); } tmp127 = tmp126; if (positions[diff] + value4 <= closure_13) { break; } else { diff = diff - 1; tmp126 = tmp129; tmp127 = tmp129; if (diff < 0) { break; } } } } let tmp143 = tmp127; if (tmp15Result3 > 1) { let diff1 = tmp127; tmp143 = tmp127; if (tmp127 > 0) { tmp143 = diff1; while (1 !== state.columns[diff1]) { tmp143 = diff1; if (undefined === tmp145) { break; } else { diff1 = diff1 - 1; tmp143 = diff1; if (0 >= diff1) { break; } } } } } let num16 = 0; let num17 = 0; let num18 = 0; if (0 < tmp16) { do { let _HermesInternal = HermesInternal; let tmp152 = closure_1_21(containerItemKeys, "containerItemKey" + num16); let bound = num17; if (undefined !== tmp152) { let _Math3 = Math; bound = Math.max(num17, indexByKey.get(tmp152)); } num16 = num16 + 1; num17 = bound; num18 = bound; } while (num16 < tmp16); } let obj2 = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: -1 }; const length = data.length; let _Math4 = Math; const bound1 = Math.max(0, tmp143); let tmp157 = bound1; let flag3 = false; let tmp160 = null; let tmp161 = null; let tmp162 = null; let endNoBuffer1 = null; let tmp166 = null; let startNoBuffer1 = null; if (bound1 < length) { while (true) { let tmp168 = idCache[tmp157]; let tmp169 = tmp157; let tmp171 = tmp158; let tmp172 = tmp159; let tmp173 = tmp160; let tmp174 = tmp161; let tmp175 = tmp162; if (null == tmp168) { tmp168 = closure_1_49(state, tmp157); } let value5 = sizes.get(tmp168); if (null == value5) { value5 = closure_1_58(containerItemKeys, tmp180, tmp169, data[tmp157]); } let tmp187 = positions[tmp157]; let tmp188 = tmp171; let tmp189 = tmp172; let tmp190 = tmp173; let tmp191 = tmp174; let tmp192 = tmp175; let tmp193 = flag3; if (!flag3) { let tmp201 = closure_1_100(obj2, tmp169, tmp187, value5, closure_12, closure_14); let tmp202 = null === tmp175; if (tmp202) { tmp202 = tmp187 + value5 > closure_13; } if (tmp202) { let tmp205 = null; if (closure_13 >= 0) { tmp205 = tmp187; } tmp172 = tmp205; tmp174 = tmp168; tmp175 = tmp157; } let tmp206 = flag3; let tmp207 = tmp171; let tmp208 = tmp173; if (null !== obj2.startNoBuffer) { let flag4 = true; if (tmp187 <= scrollBottomBuffered) { let sum1 = null; if (scrollBottomBuffered <= tmp17Result) { sum1 = tmp187 + value5; } tmp171 = sum1; flag4 = flag3; tmp173 = tmp157; } tmp206 = flag4; tmp207 = tmp171; tmp208 = tmp173; } tmp193 = tmp206; tmp188 = tmp207; tmp190 = tmp208; tmp189 = tmp172; tmp191 = tmp174; tmp192 = tmp175; } let sum2 = tmp157 + 1; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; if (sum2 >= length) { break; } else { tmp157 = sum2; flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; if (!tmp193) { continue; } else { flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; tmp157 = sum2; if (sum2 > num18) { break; } } continue; } } } const _Object = Object; let obj3 = { endBuffered: endNoBuffer1, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null }; ({ endNoBuffer: obj5.endNoBuffer, firstFullyOnScreenIndex: obj5.firstFullyOnScreenIndex } = obj2); obj3.idsInView = closure_1_101(state, obj2); obj3.startBuffered = startNoBuffer1; obj3.startBufferedId = tmp166; obj3.startNoBuffer = obj2.startNoBuffer; let merged = Object.assign(state, obj3); if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp164; } if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp163; } if (enableScrollForNextCalculateItemsInView) { if (!closure_1_54(tmp164)) { const rect = { bottom: tmp163, top: tmp164 }; const tmp219 = rect; } tmp214.scrollForNextCalculateItemsInView = tmp219; } let sum4 = tmp16; let items = []; if (dataChanged) { let num21 = 0; if (0 < sum4) { do { let _HermesInternal2 = HermesInternal; let tmp226 = closure_1_21(containerItemKeys, "containerItemKey" + num21); let tmp227 = !keyExtractor; if (keyExtractor) { let tmp229 = tmp226; if (tmp226) { tmp229 = undefined === indexByKey.get(tmp226); } tmp227 = tmp229; } if (tmp227) { let arr = items.push(num21); } num21 = num21 + 1; } while (num21 < sum4); } } let tmp233 = state; const scrollTargetPinnedRange = state.scrollTargetPinnedRange; let bound2 = 0; let bound3 = -1; let num23 = -1; let num24 = 0; if (scrollTargetPinnedRange) { const _Math5 = Math; const _Math6 = Math; bound2 = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); const _Math7 = Math; const _Math8 = Math; const diff2 = length - 1; bound3 = Math.min(diff2, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); num23 = bound3; num24 = bound2; } closure_24 = tmp237; function isPinnedRenderIndex(arg0) { let hasItem = set.has(arg0); if (!hasItem) { let tmp2 = closure_24; if (closure_24) { tmp2 = arg0 >= bound2; } if (tmp2) { tmp2 = arg0 <= bound3; } hasItem = tmp2; } return hasItem; } if (null !== startNoBuffer1) { if (null !== endNoBuffer1) { let items1 = []; const _Set6 = Set; const set1 = new Set(); function addPinnedIndex(bound2) { if (bound2 >= 0) { if (bound2 < length) { let tmp4 = idCache[bound2]; if (null == tmp4) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp2 = null; if (bound2 < data.length) { let keyExtractorResult = bound2; if (keyExtractor) { keyExtractorResult = keyExtractor(data[bound2], bound2); } tmp2 = keyExtractorResult; } tmp.idCache[bound2] = tmp2; str = tmp2; } tmp4 = str; } value = containerItemKeys.get(tmp4); if (undefined !== value) { const stickyContainerPool = state.stickyContainerPool; stickyContainerPool.add(value); } else { let hasItem = null == tmp4; if (!hasItem) { hasItem = set1.has(bound2); } if (!hasItem) { set1.add(bound2); items1.push(bound2); } } } } } let sum3 = startNoBuffer1; if (startNoBuffer1 <= endNoBuffer1) { do { let tmp238 = idCache[sum3]; if (null == tmp238) { tmp238 = closure_1_49(state, sum3); } if (!containerItemKeys.has(tmp238)) { let addResult1 = set1.add(sum3); let arr2 = items1.push(sum3); } sum3 = sum3 + 1; } while (sum3 <= endNoBuffer1); } for (const item10471 of alwaysRenderIndicesArr) { let addPinnedIndexResult = addPinnedIndex(item10471); continue; } if (tmp237) { if (num24 <= num23) { do { let addPinnedIndexResult1 = addPinnedIndex(num24); num24 = num24 + 1; } while (num24 <= num23); } } if (prop.length > 0) { let currentStickyIdx; if (null != stickyState) { currentStickyIdx = stickyState.currentStickyIdx; } let num25 = -1; if (null != currentStickyIdx) { num25 = currentStickyIdx; } (function handleStickyActivation(containerItemKeys, prop, currentStickyIdx, items1, set1, startNoBuffer1, endNoBuffer1) { state = containerItemKeys.state; num = -1; if (currentStickyIdx >= 0) { num = prop[currentStickyIdx]; } bound2(containerItemKeys, "activeStickyIndex", num); let num2 = 0; do { let diff = currentStickyIdx - num2; if (diff >= 0) { let tmp12 = prop[diff]; if (!closure_1_99(containerItemKeys, tmp12)) { let tmp5 = state.idCache[tmp12]; if (null == tmp5) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp6 = null; if (tmp12 < data.length) { let keyExtractorResult = tmp12; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp12], tmp12); } tmp6 = keyExtractorResult; } state.idCache[tmp12] = tmp6; str = tmp6; } tmp5 = str; } let tmp8 = tmp5; if (tmp5) { containerItemKeys = state.containerItemKeys; tmp8 = !containerItemKeys.has(tmp5); } if (tmp8) { let tmp9 = tmp12 < startNoBuffer1 || tmp12 > endNoBuffer1; tmp8 = tmp9; } if (tmp8) { tmp8 = !set1.has(tmp12); } if (tmp8) { let addResult = set1.add(tmp12); let arr = items1.push(tmp12); } } } num2 = num2 + 1; } while (num2 <= 1); })(containerItemKeys, prop, num25, items1, tmp476, startNoBuffer1, endNoBuffer1); } else if (-1 !== tmp15Result4) { context(containerItemKeys, "activeStickyIndex", -1); } if (items1.length > 0) { let fn; if (getItemType) { fn = (arg0) => { const tmp = getItemType(data[arg0], arg0); let str = ""; if (undefined !== tmp) { const _String = String; str = String(tmp); } return str; }; } const tmp275 = (function findAvailableContainers(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, set) { closure_0 = fn; if (0 === items1.length) { return []; } else { const tmp56 = length(containerItemKeys, "numContainers"); state = containerItemKeys.state; ({ containerItemMetadata: closure_2, stickyContainerPool } = state); set = undefined; if (items.length > 0) { const _Set = Set; set = new Set(items); } const mapped = items1.map((itemIndex, order) => { const obj = { isSticky: null, itemIndex, itemType: null, order: null }; const stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet; obj.isSticky = stickyHeaderIndicesSet.has(itemIndex); let tmp; if (null != closure_0) { tmp = closure_0(itemIndex); } obj.itemType = tmp; obj.order = order; return obj; }); const found = mapped.filter((isSticky) => !isSticky.isSticky); items = []; items1 = []; let num2 = 0; const found1 = mapped.filter((isSticky) => isSticky.isSticky); if (0 < tmp56) { while (true) { let _HermesInternal = HermesInternal; let tmp13 = length(containerItemKeys, "containerItemKey" + num2); let hasItem; if (null != set) { hasItem = set.has(num2); } let tmp16 = !hasItem; if (tmp13) { let hasItem1; if (null != set) { hasItem1 = set.has(tmp13); } if (hasItem1) { let indexByKey = state.indexByKey; } num2 = num2 + 1; if (num2 >= tmp56) { break; } } let tmp18 = !tmp16; if (stickyContainerPool.has(num2)) { let tmp22 = undefined === tmp13 || tmp18; if (tmp22) { let obj2 = { containerIndex: num2, distance: null }; let _Number2 = Number; obj2.distance = Number.POSITIVE_INFINITY; let arr = items1.push(obj2); } } else { if (undefined !== tmp13) { if (!tmp18) { if (!tmp) { let indexByKey2 = state.indexByKey; value = indexByKey2.get(tmp13); if (undefined !== value) { if (value < startNoBuffer1) { let obj = { containerIndex: num2, distance: value < startNoBuffer1 ? startNoBuffer1 - value : value - endNoBuffer1 }; let arr2 = items.push(obj); } } } } } let obj3 = { containerIndex: num2, distance: null }; let _Number = Number; obj3.distance = Number.POSITIVE_INFINITY; let arr3 = items.push(obj3); } } } const sorted = items.sort(closure_98); const _Array = Array; const array = new Array(length); let sum = tmp56; c5 = false; function assign(itemIndex, containerIndex) { array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType }; let deleteResult; if (null != set) { deleteResult = set.delete(containerIndex); } if (deleteResult) { c5 = true; } } function assignMatching(found, items, arg2) { closure_1 = arg2; function _loop2() { ... } const iter = found[Symbol.iterator](); while (iter !== undefined) { let _loop2Result = _loop2(iter.next()); continue; } } function assignFromPool(found, items, arg2) { if (closure_0) { assignMatching(found, items, /* F125837 */ function() { ... }); } assignMatching(found, items, /* F125838 */ function() { ... }); if (arg2) { assignMatching(found, items, /* F125839 */ function() { ... }); } } assignFromPool(found, items, true); assignFromPool(found1, items1, false); for (const item10099 of mapped) { let tmp36 = item10099; if (!array[item10099.order]) { let tmp38 = +sum; sum = tmp38 + 1; let tmp39 = tmp38; if (tmp36.isSticky) { let addResult = stickyContainerPool.add(tmp39); } let obj4 = assign(tmp36, tmp39); } continue; } if (c5) { items.length = 0; if (set) { for (const item10120 of set) { let arr7 = arg4.push(item10120); continue; } } } if (closure_31) { let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled"); if (null == POSITIVE_INFINITY) { const _Number3 = Number; POSITIVE_INFINITY = Number.POSITIVE_INFINITY; } if (sum > POSITIVE_INFINITY) { const _console = console; const obj5 = { debugInfo: null }; const obj10 = { numContainers: tmp56, numContainersPooled: POSITIVE_INFINITY, numNeeded: length, stillNeeded: sum - tmp56 }; obj5.debugInfo = obj10; console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj5); } } return array; } })(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, tmp88); let iter = tmp275[Symbol.iterator](); let nextResult = iter.next(); while (iter !== undefined) { let itemIndex = nextResult.itemIndex; let tmp281 = itemIndex; let containerIndex = nextResult.containerIndex; let tmp282 = idCache[itemIndex]; let tmp280 = nextResult; if (null != tmp282) { let tmp288 = tmp282; } else { tmp288 = closure_1_49(state, tmp281); } let tmp289 = tmp288; let tmp293 = containerItemKeys; let _HermesInternal3 = HermesInternal; let tmp291 = closure_1_21; let tmp295 = closure_1_21(containerItemKeys, "containerItemKey" + containerIndex); let tmp296 = tmp295; if (tmp295) { tmp295 = tmp296 !== tmp289; } if (tmp295) { let deleteResult = containerItemKeys.delete(tmp296); } if (tmp296 !== tmp289) { if (null == set2) { let _Set3 = Set; let tmp304 = new.target; let tmp305 = new.target; set2 = new Set(); } let addResult2 = set2.add(containerIndex); let tmp311 = state.containerItemGenerations[containerIndex]; let num28 = 0; if (null != tmp311) { num28 = tmp311; } state.containerItemGenerations[containerIndex] = num28 + 1; } let tmp314 = context; let _HermesInternal4 = HermesInternal; let tmp318 = context(tmp293, "containerItemKey" + containerIndex, tmp289); let _HermesInternal5 = HermesInternal; let tmp320 = context(tmp293, "containerItemIndex" + containerIndex, tmp281); let _HermesInternal6 = HermesInternal; let tmp321 = context(tmp293, "containerItemData" + containerIndex, data[tmp281]); let tmp323 = state; let containerItemMetadata = state.containerItemMetadata; let result4 = containerItemMetadata.set(containerIndex, ref3(state, itemIndex, data[tmp281], tmp280.itemType)); let result5 = containerItemKeys.set(tmp289, containerIndex); let userScrollAnchorReset = state.userScrollAnchorReset; if (null != userScrollAnchorReset) { let keys = tmp330.keys; let addResult3 = keys.add(tmp289); } let _HermesInternal7 = HermesInternal; let combined = "containerSticky" + containerIndex; let hasItem = stickyHeaderIndicesSet.has(tmp281); let isPinnedRenderIndexResult = isPinnedRenderIndex(tmp281); if (hasItem) { let tmp314Result = tmp314(tmp293, combined, true); let stickyContainerPool2 = tmp323.stickyContainerPool; let addResult4 = stickyContainerPool2.add(containerIndex); } else { if (tmp291(tmp293, combined)) { let tmp314Result2 = tmp314(tmp293, combined, false); } let stickyContainerPool = tmp323.stickyContainerPool; if (isPinnedRenderIndexResult) { let addResult5 = stickyContainerPool.add(containerIndex); } else { let deleteResult1 = stickyContainerPool.delete(containerIndex); } } if (containerIndex >= sum4) { sum4 = containerIndex + 1; } continue; } if (sum4 !== tmp16) { context(containerItemKeys, "numContainers", sum4); if (sum4 > closure_1_21(containerItemKeys, "numContainersPooled")) { tmp364(tmp366, "numContainersPooled", (function getExpandedContainerPoolSize(length, sum4) { num = 0; if (length > 0) { num = 0; if (sum4 > 0) { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const _Math4 = Math; const bound = Math.max(length, sum4); num = Math.min(bound, Math.max(sum4, Math.ceil(1.5 * sum4))); } } return num; })(length, sum4)); } tmp364 = context; tmp366 = containerItemKeys; } } tmp233 = state; const userScrollAnchorReset2 = state.userScrollAnchorReset; let size; if (null != userScrollAnchorReset2) { size = userScrollAnchorReset2.keys.size; } if (0 === size) { tmp233.userScrollAnchorReset = undefined; } tmp476 = set1; } } if (tmp233.stickyContainerPool.size > 0) { let currentStickyIdx1; if (null != stickyState) { currentStickyIdx1 = stickyState.currentStickyIdx; } let num30 = -1; if (null != currentStickyIdx1) { num30 = currentStickyIdx1; } (function handleStickyRecycling(containerItemKeys, prop, arg2, arg3, currentStickyIdx1, items, isPinnedRenderIndex) { state = containerItemKeys.state; const iter = state.stickyContainerPool[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { let tmp2 = nextResult; let _HermesInternal = HermesInternal; let tmp4 = length(containerItemKeys, "containerItemKey" + nextResult); value = undefined; if (tmp4) { let indexByKey = state.indexByKey; value = indexByKey.get(tmp5); } let tmp8 = value; if (undefined !== value) { if (!isPinnedRenderIndex(tmp8)) { let index = prop.indexOf(tmp8); let tmp11 = index; if (-1 !== index) { if (tmp11 < currentStickyIdx1 - 1) { let tmp19 = prop[tmp11 + 1]; flag = false; if (tmp19) { let tmp45 = state.positions[tmp20]; let tmp47 = undefined !== tmp45; if (tmp47) { tmp47 = arg2 > tmp46 + 2 * arg3; } flag = tmp47; } else { let tmp22 = state.idCache[tmp8]; if (null != tmp22) { let tmp26 = tmp22; } else { tmp26 = closure_1_49(state, tmp8); } let tmp27 = tmp26; if (tmp26) { let tmp29 = state.positions[tmp8]; let sizes = state.sizes; value2 = sizes.get(tmp27); if (null != value2) { } else { let tmp38 = closure_1_58(containerItemKeys, tmp27, value, state.props.data[tmp8]); } let tmp41 = undefined !== tmp29; if (tmp41) { tmp41 = arg2 > tmp29 + tmp39 + 3 * arg3; } flag = tmp41; } } if (flag) { let arr = items.push(tmp2); } } } else { let stickyContainerPool = state.stickyContainerPool; let deleteResult = stickyContainerPool.delete(tmp2); let _HermesInternal2 = HermesInternal; let tmp15 = bound2(containerItemKeys, "containerSticky" + tmp2, false); } } } continue; } })(containerItemKeys, prop, closure_12, tmp9, num30, items, isPinnedRenderIndex); } if (items.length > 0) { const _Set4 = Set; const set3 = new Set(items); } let num32 = 0; let flag5 = false; if (0 < sum4) { do { let tmp398 = containerItemKeys; let _HermesInternal8 = HermesInternal; let tmp399 = closure_1_21(containerItemKeys, "containerItemKey" + num32); let hasItem1; let tmp400 = num32; if (null != set3) { hasItem1 = set3.has(num32); } if (hasItem1) { if (undefined !== tmp399) { let deleteResult2 = containerItemKeys.delete(tmp399); if (null == set2) { let _Set5 = Set; let tmp408 = new.target; let tmp409 = new.target; set2 = new Set(); } let addResult6 = set2.add(num32); let tmp414 = state.containerItemGenerations[num32]; let num33 = 0; if (null != tmp414) { num33 = tmp414; } state.containerItemGenerations[num32] = num33 + 1; } let containerItemMetadata2 = state.containerItemMetadata; let tmp416 = state; let deleteResult3 = containerItemMetadata2.delete(num32); let stickyContainerPool3 = state.stickyContainerPool; if (stickyContainerPool3.has(num32)) { let _HermesInternal9 = HermesInternal; let tmp421 = context(tmp398, "containerSticky" + num32, false); let stickyContainerPool4 = tmp416.stickyContainerPool; let deleteResult4 = stickyContainerPool4.delete(num32); } let _HermesInternal10 = HermesInternal; let tmp427 = context(tmp398, "containerItemKey" + num32, undefined); let _HermesInternal11 = HermesInternal; let tmp428 = context(tmp398, "containerItemIndex" + num32, undefined); let _HermesInternal12 = HermesInternal; let tmp429 = context(tmp398, "containerItemData" + num32, undefined); let _HermesInternal13 = HermesInternal; let tmp431 = context(tmp398, "containerPosition" + num32, hasHadNonEmptyData); let _HermesInternal14 = HermesInternal; let tmp432 = context(tmp398, "containerColumn" + num32, -1); let _HermesInternal15 = HermesInternal; let tmp433 = context(tmp398, "containerSpan" + num32, 1); let tmp404 = flag5; } else { let value6 = indexByKey.get(tmp399); tmp404 = flag5; if (undefined !== value6) { let obj4 = { scrollAdjustPending: null, updateLayout: true }; obj4.scrollAdjustPending = num; let tmp405 = closure_1_88(tmp398, tmp400, value6, obj4).didChangePosition || flag5; tmp404 = tmp405; } } num32 = num32 + 1; flag5 = tmp404; } while (num32 < sum4); } let tmp435 = set2; if (set2) { tmp435 = overrideItemLayout; } if (tmp435) { closure_1_87(containerItemKeys, set2); } if (!tmp13) { closure_1_84(containerItemKeys); } else { closure_1_102(state, obj2.startNoBuffer); if (!queuedInitialLayout) { if (!tmp442.didContainersLayout) { if (closure_1_41(tmp442)) { let tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } else { tmp447Result = tmp447(tmp442, tmp442.startNoBuffer, tmp442.endNoBuffer); if (!tmp447Result) { tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } } if (tmp447Result) { (function setDidLayout(containerItemKeys) { containerItemKeys.state.queuedInitialLayout = true; closure_1_42(containerItemKeys); closure_1_47(containerItemKeys, { didLayout: true }); })(containerItemKeys); (function handleInitialScrollLayoutReady(containerItemKeys) { closure_0 = containerItemKeys; if (containerItemKeys.state.initialScroll) { closure_76(containerItemKeys, { forceScroll: true }); const initialScrollSession = containerItemKeys.state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("offset" !== kind) { const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(function runScroll() { return closure_2_76(closure_0, { forceScroll: true }); }); } closure_129_0 = containerItemKeys; const scrollingTo = containerItemKeys.state.scrollingTo; { let isInitialScroll; if (null != scrollingTo) { isInitialScroll = scrollingTo.isInitialScroll; } } } })(containerItemKeys); } } } let tmp455 = viewabilityConfigCallbackPairs; if (viewabilityConfigCallbackPairs) { tmp455 = null !== obj2.startNoBuffer; } if (tmp455) { tmp455 = null !== obj2.endNoBuffer; } if (tmp455) { state = containerItemKeys.state; ({ startNoBuffer, endNoBuffer } = obj2); if (null == startNoBuffer1) { startNoBuffer1 = obj2.startNoBuffer; } if (null == endNoBuffer1) { endNoBuffer1 = obj2.endNoBuffer; } closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, startNoBuffer1, endNoBuffer1); } let prop2; if (null != stickyState) { prop2 = stickyState.finishCalculateItemsInView; } if (null != prop2) { const call2 = prop2.call; if (typeof call2 === "unknown") { prop2(); } else { call2(stickyState); } } } tmp109 = closure_1_21; tmp111 = containerItemKeys; const tmp15Result = tmp15(tmp7, "stylePaddingTop"); tmp214 = state; } } } }); }; state.reprocessCurrentScroll = () => { updateScroll(context, state.scroll, true); }; context(context, "maintainVisibleContentPosition", obj6); context(context, "extraData", extraData); if (undefined !== estimatedHeaderSize) { tmp133(context, "headerSize", estimatedHeaderSize); } tmp133 = context; } else if (tmp64) { let size1 = { height: 0, width: 0 }; } else { let Dimensions = viewabilityConfig.Dimensions; value = Dimensions.get("window"); size1 = { height: null, width: null }; ({ height: obj16.height, width: obj16.width } = value); } } ref1.current = context.state; } current = ref1.current; let isFirst = current.isFirst; let tmp137 = !isFirst; if (!isFirst) { tmp137 = context.scrollAxisGap !== num15; } context.scrollAxisGap = num15; current.didColumnsChange = num4 !== current.props.numColumns || tmp137; let data1 = current.props.data; let length; if (null != data1) { length = data1.length; } let num16 = 0; if (null != length) { num16 = length; } let tmp139 = current.props.dataKey !== dataKey; let tmp140 = tmp139; if (!tmp139) { tmp140 = current.props.dataVersion !== dataVersion; } if (!tmp140) { if (current.props.data === data) { tmp140 = tmp141; } else { const data3 = current.props.data; current.pendingDataComparison = undefined; let flag5 = true; if (data3) { flag5 = true; if (data) { keys = data.length; flag5 = true; if (keys === data3.length) { ({ itemsAreEqual: itemsAreEqual2, keyExtractor: keyExtractor2 } = current.props); let num18 = 0; let tmp148; flag5 = false; let sum = num18; keys = tmp148; let tmp143 = tmp148; if (data[num18] === data3[num18]) { sum = sum + 1; tmp148 = tmp143; num18 = sum; flag5 = false; } else if (!keyExtractor2) { flag5 = true; if (keys) { const obj18 = { byIndex: keys, nextData: data, previousData: data3 }; current.pendingDataComparison = obj18; flag5 = true; } } let keyExtractor2Result = current.idCache[sum]; if (null == keyExtractor2Result) { keyExtractor2Result = keyExtractor2(data3[sum], sum); } if (keyExtractor2Result !== keyExtractor2(data[sum], sum)) { flag5 = true; if (keys) { const obj19 = { byIndex: keys, nextData: data, previousData: data3 }; current.pendingDataComparison = obj19; flag5 = true; } } else if (itemsAreEqual2) { const itemsAreEqual2Result = itemsAreEqual2(data3[sum], data[sum], sum, data); let items1 = keys; if (null == keys) { items1 = []; } let num17 = 2; if (itemsAreEqual2Result) { num17 = 1; } items1[sum] = num17; tmp143 = items1; if (!itemsAreEqual2Result) { const obj20 = { byIndex: items1, nextData: data, previousData: data3 }; current.pendingDataComparison = obj20; flag5 = true; } } else { flag5 = true; if (keys) { const obj21 = { byIndex: keys, nextData: data, previousData: data3 }; current.pendingDataComparison = obj21; flag5 = true; } } } } } } } closure_31 = tmp140; let hasHadNonEmptyData = !isFirst; if (!isFirst) { hasHadNonEmptyData = tmp140; } if (hasHadNonEmptyData) { hasHadNonEmptyData = current.hasHadNonEmptyData; } if (hasHadNonEmptyData) { if (!tmp139) { tmp139 = 0 === num16; } hasHadNonEmptyData = tmp139; } if (hasHadNonEmptyData) { hasHadNonEmptyData = data.length > 0; } let didFinishInitialScroll = tmp140; if (tmp140) { didFinishInitialScroll = !tmp9; } if (didFinishInitialScroll) { didFinishInitialScroll = current.didFinishInitialScroll; } if (didFinishInitialScroll) { let initialScroll = current.initialScroll; let viewPosition1; if (null != initialScroll) { viewPosition1 = initialScroll.viewPosition; } didFinishInitialScroll = 1 === viewPosition1; } if (didFinishInitialScroll) { didFinishInitialScroll = current.props.data.length > 0; } if (didFinishInitialScroll) { if (undefined !== current.timeoutPreservedInitialScrollClear) { let _clearTimeout = clearTimeout; clearTimeout(current.timeoutPreservedInitialScrollClear); current.timeoutPreservedInitialScrollClear = undefined; } current.clearPreservedInitialScrollOnNextFinish = undefined; current.initialScroll = undefined; setInitialScrollSession(current); } if (tmp140) { current.dataChangeEpoch = current.dataChangeEpoch + 1; current.dataChangeNeedsScrollUpdate = true; current.didDataChange = true; current.previousData = current.props.data; } f101429 = snapToIndices.useRef(null); measureInLayoutEffect = snapToIndices.useRef(0); snapToIndices.useRef(null); onLayoutChange = function clearTimeoutRef() { }; const items2 = ["throttle"]; onLayoutProp = snapToIndices.useCallback((arg0, arg1) => { const substr = [...arguments].slice(); const timestamp = Date.now(); onLayoutProp.current = substr; if (timestamp - measureInLayoutEffect.current >= arg1) { tmp3.current = timestamp; let items = []; HermesBuiltin.arraySpread(substr, 0); HermesBuiltin.apply(items, undefined); if (typeof onLayoutChange === "function") { if (ref.current) { const _clearTimeout2 = clearTimeout; clearTimeout(tmp15.current); tmp15.current = null; } } else { throw new TypeError("Trying to call a non-function"); } } else if (typeof onLayoutChange === "function") { if (ref.current) { const _clearTimeout = clearTimeout; clearTimeout(tmp5.current); tmp5.current = null; } const _setTimeout = setTimeout; ref.current = setTimeout(() => { if (onLayoutProp.current) { const _Date = Date; measureInLayoutEffect.current = Date.now(); const items = []; HermesBuiltin.arraySpread(tmp.current, 0); HermesBuiltin.apply(items, undefined); f101429.current = null; tmp.current = null; } }, arg1 - (timestamp - tmp3.current)); } else { throw new TypeError("Trying to call a non-function"); } }, items2); let fn2 = onScroll; if (scrollEventThrottle) { fn2 = onScroll; if (onScroll) { fn2 = (nativeEvent) => onLayoutProp(f101429, measureInLayoutEffect, { nativeEvent: nativeEvent.nativeEvent }); } } let tmp156 = !isFirst; if (!isFirst) { tmp156 = !tmp140; } if (tmp156) { const anchoredEndSpace2 = current.props.anchoredEndSpace; let anchorIndex1; if (null != anchoredEndSpace2) { anchorIndex1 = anchoredEndSpace2.anchorIndex; } let anchorIndex2; if (null != anchoredEndSpace) { anchorIndex2 = anchoredEndSpace.anchorIndex; } tmp156 = anchorIndex1 !== anchorIndex2; } closure_33 = tmp156; const obj22 = { adaptiveRender: experimental_adaptiveRender, alignItemsAtEnd: tmp8, alignItemsAtEndPaddingEnabled: tmp15, alwaysRender, alwaysRenderIndicesArr: null, alwaysRenderIndicesSet: null, anchoredEndSpace: null, animatedProps: null, contentContainerAlignItems: null, contentInset: null, contentInsetEndAdjustment: "fill", data: false, dataKey: false, dataVersion: false, drawDistance: false, estimatedItemSize: false, getFixedItemSize: false, getItemType: false, horizontal: "Sweden", itemsAreEqual: "SE", keyExtractor: "+46", maintainScrollAtEnd: null, maintainScrollAtEndThreshold: "\u27BF", maintainVisibleContentPosition: 6, numColumns: 1237, onEndReached: "kr\u00F8lle", onEndReachedThreshold: "l\u00F8kke", onFirstVisibleItemChanged: "loop", onItemSizeChanged: true, onLoad: true, onMomentumScrollEnd: null, onScroll: null, onScrollBeginDrag: null, onStartReached: null, onStartReachedThreshold: null, onStickyHeaderChange: null, overrideItemLayout: null, positionComponentInternal: null, recycleItems: null, renderItem: null, rtl: null, snapToIndices: null, stickyHeaderIndicesArr: null, stickyHeaderIndicesSet: null, stickyPositionComponentInternal: "Switzerland", stylePaddingBottom: "CH", stylePaddingLeft: "+41", stylePaddingRight: null, stylePaddingTop: "\u{1F51A}", useWindowScroll: 6 }; ({ arr: obj24.alwaysRenderIndicesArr, set: obj24.alwaysRenderIndicesSet } = memo); obj22.anchoredEndSpace = anchoredEndSpace; obj22.animatedProps = animatedPropsInternal; obj22.contentContainerAlignItems = obj3.alignItems; obj22.contentInset = contentInset; obj22.data = data; obj22.dataKey = dataKey; obj22.dataVersion = dataVersion; obj22.drawDistance = num; obj22.estimatedItemSize = num2; const items3 = [getFixedItemSize]; obj22.getFixedItemSize = snapToIndices.useMemo(() => { let fn; if (f101429) { fn = (arg0, arg1, arg2) => { let tmp; if (undefined !== arg0) { if (undefined !== arg1) { tmp = ref(arg0, arg1, arg2); } } return tmp; }; } return fn; }, items3); const items4 = [getItemType]; obj22.getItemType = snapToIndices.useMemo(() => { let fn; if (f101429) { fn = (arg0, arg1, arg2) => { let tmp; if (undefined !== arg0) { if (undefined !== arg1) { tmp = ref(arg0, arg1, arg2); } } return tmp; }; } return fn; }, items4); obj22.horizontal = horizontal; obj22.itemsAreEqual = itemsAreEqual; f101429 = finishCalculateItemsInView; const items5 = [finishCalculateItemsInView]; obj22.keyExtractor = snapToIndices.useMemo(() => { let fn; if (f101429) { fn = (arg0, arg1, arg2) => { let tmp; if (undefined !== arg0) { if (undefined !== arg1) { tmp = ref(arg0, arg1, arg2); } } return tmp; }; } return fn; }, items5); obj22.maintainScrollAtEnd = undefined; obj22.maintainScrollAtEndThreshold = num3; obj22.maintainVisibleContentPosition = obj6; obj22.numColumns = num4; obj22.onEndReached = recycleItems.onEndReached; obj22.onEndReachedThreshold = num6; obj22.onFirstVisibleItemChanged = onFirstVisibleItemChanged; obj22.onItemSizeChanged = onItemSizeChanged; obj22.onLoad = onLoad; obj22.onMomentumScrollEnd = onMomentumScrollEnd; obj22.onScroll = fn2; obj22.onScrollBeginDrag = onScrollBeginDrag; obj22.onStartReached = onStartReached; obj22.onStartReachedThreshold = num5; obj22.onStickyHeaderChange = onStickyHeaderChange; obj22.overrideItemLayout = overrideItemLayout; obj22.positionComponentInternal = positionComponentInternal; obj22.recycleItems = tmp11; obj22.renderItem = renderItem; obj22.rtl = rtl; obj22.snapToIndices = snapToIndices; let items6 = stickyHeaderIndices; if (null == stickyHeaderIndices) { items6 = []; } obj22.stickyHeaderIndicesArr = items6; let joined2; if (null != stickyHeaderIndices) { joined2 = stickyHeaderIndices.join(","); } const items7 = [joined2]; obj22.stickyHeaderIndicesSet = obj.useMemo(() => { let items = stickyHeaderIndices; if (null == stickyHeaderIndices) { items = []; } return new Set(items); }, items7); obj22.stickyPositionComponentInternal = stickyPositionComponentInternal; obj22.stylePaddingBottom = tmp39; obj22.stylePaddingLeft = tmp40; obj22.stylePaddingRight = tmp41; obj22.stylePaddingTop = tmp38; current.props = obj22; current.refScroller = ref; let tmp160 = isFirst; if (!isFirst) { tmp160 = !current.props.adaptiveRender; } if (!tmp160) { tmp160 = experimental_adaptiveRender; } if (!tmp160) { resetAdaptiveRender(context); } if (hasHadNonEmptyData) { let state2 = context.state; state2.didContainersLayout = false; state2.queuedInitialLayout = false; if (tmp61) { state2.didFinishInitialScroll = false; } context(context, "readyToRender", false); resetAdaptiveRender(context); } const items8 = [data, dataKey, dataVersion, num4]; const memo1 = obj.useMemo(() => { if (onLayoutProp.length) { const _Array = Array; const obj = { length: null }; const _Math = Math; obj.length = Math.min(num4, arr.length); let arr2 = Array.from(obj, (arg0, arg1) => { const diff = length.length - 1 - arg1; ({ data, keyExtractor } = props.props); let str = ""; if (data) { let tmp3 = null; if (diff < data.length) { let keyExtractorResult = diff; if (keyExtractor) { keyExtractorResult = keyExtractor(data[diff], diff); } tmp3 = keyExtractorResult; } tmp.idCache[diff] = tmp3; str = tmp3; } return str; }); } else { arr2 = []; } return arr2; }, items8); function initializeStateVars(arg0) { set$(context, "lastItemKeys", memo1); set$(context, "numColumns", num4); let values = context.values; value = values.get("stylePaddingTop"); values = context; closure_1 = undefined; if (undefined !== closure_13) { const values2 = tmp2.values; const tmp8 = values2.get("stylePaddingTop") || 0; closure_1 = tmp8; if (tmp6 < tmp8) { const values3 = tmp2.values; tmp(tmp2, "totalSize", (values3.get("totalSize") || 0) + tmp8); const _setTimeout = setTimeout; tmp7.timeoutSetPaddingTop = setTimeout(() => { values = values.values; context(values, "totalSize", (values.get("totalSize") || 0) - closure_1); }, 16); const tmp9 = values3.get("totalSize") || 0; } tmp(tmp2, "stylePaddingTop", tmp6); } ref1.current.props.stylePaddingBottom = stylePaddingBottom; updateContentMetricsState(context); if (arg0) { const size = obj6.size; } } if (isFirst) { initializeStateVars(false); let indexByKey = current.indexByKey; indexByKey.clear(); current.idCache.length = 0; current.positions.length = 0; current.columns.length = 0; current.columnSpans.length = 0; updateItemPositions(context, true); } const items9 = [tmp60]; const memo2 = obj.useMemo(() => { const initialScroll = current.initialScroll; if (initialScroll) { let contentOffset = initialScroll.contentOffset; if (null == contentOffset) { contentOffset = resolveInitialScrollOffset(context, initialScroll); } if (closure_18) { const initialScrollSession = tmp.initialScrollSession; if (null != initialScrollSession) { const kind = initialScrollSession.kind; } } return contentOffset; } }, items9); const layoutEffect = obj.useLayoutEffect(() => { let tmp2 = isRTL; state = context.state; const initialScroll = state.initialScroll; let num = 0; if (null != memo2) { num = memo2; } let tmp6 = tmp5; if (closure_18) { tmp6 = tmp4; } if (tmp6) { tmp6 = !tmp3; } let tmp7 = initialScroll; if (initialScroll) { let tmp8 = undefined === initialScroll.contentOffset; if (!tmp8) { let tmp9 = initialScroll.preserveForFooterLayout !== tmp6; if (tmp9) { let initialScrollSession = state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } tmp9 = "offset" !== kind; } tmp8 = tmp9; } tmp7 = tmp8; } if (tmp7) { let obj = {}; const merged = Object.assign(initialScroll); obj.contentOffset = num; obj.preserveForFooterLayout = tmp6; const state2 = tmp.state; state2.clearPreservedInitialScrollOnNextFinish = undefined; if (undefined !== state2.timeoutPreservedInitialScrollClear) { const _clearTimeout = clearTimeout; clearTimeout(state2.timeoutPreservedInitialScrollClear); state2.timeoutPreservedInitialScrollClear = undefined; } state2.initialScroll = obj; let initialScrollSession2 = state2.initialScrollSession; let kind1; if (null != initialScrollSession2) { kind1 = initialScrollSession2.kind; } let str2 = "bootstrap"; if ("offset" === kind1) { str2 = "offset"; } const obj2 = { kind: str2 }; setInitialScrollSession(state2, obj2); } if (closure_18) { if (initialScroll) { const initialScrollSession3 = state.initialScrollSession; let kind2; if (null != initialScrollSession3) { kind2 = initialScrollSession3.kind; } if ("offset" !== kind2) { const initialScroll2 = state.initialScroll; const state3 = tmp.state; const tmp27 = resolveInitialScrollOffset(tmp, initialScroll2); if (!(0 === tmp27 && !tmp4)) { if (tmp28) { const initialScrollSession8 = state3.initialScrollSession; let kind3; if (null != initialScrollSession8) { kind3 = initialScrollSession8.kind; } let bootstrap; if ("bootstrap" === kind3) { bootstrap = state3.initialScrollSession.bootstrap; } let frameHandle; if (null != bootstrap) { frameHandle = bootstrap.frameHandle; } let tmp54 = undefined !== frameHandle; if (tmp54) { const _cancelAnimationFrame3 = cancelAnimationFrame; tmp54 = typeof cancelAnimationFrame === "function"; } if (tmp54) { const _cancelAnimationFrame4 = cancelAnimationFrame; cancelAnimationFrame(frameHandle); } if (bootstrap) { bootstrap.frameHandle = undefined; } const initialScrollSession9 = state3.initialScrollSession; let kind4; if (null != initialScrollSession9) { kind4 = initialScrollSession9.kind; } const obj3 = { bootstrap: null, kind: kind4 }; setInitialScrollSession(state3, obj3); const obj4 = { resolvedOffset: tmp27 }; finishInitialScroll(tmp, obj4); } else if (tmp34) { const initialScrollSession6 = state3.initialScrollSession; let kind5; if (null != initialScrollSession6) { kind5 = initialScrollSession6.kind; } let bootstrap1; if ("bootstrap" === kind5) { bootstrap1 = state3.initialScrollSession.bootstrap; } let frameHandle1; if (null != bootstrap1) { frameHandle1 = bootstrap1.frameHandle; } let tmp42 = undefined !== frameHandle1; if (tmp42) { const _cancelAnimationFrame = cancelAnimationFrame; tmp42 = typeof cancelAnimationFrame === "function"; } if (tmp42) { const _cancelAnimationFrame2 = cancelAnimationFrame; cancelAnimationFrame(frameHandle1); } if (bootstrap1) { bootstrap1.frameHandle = undefined; } const initialScrollSession7 = state3.initialScrollSession; let kind6; if (null != initialScrollSession7) { kind6 = initialScrollSession7.kind; } const obj5 = { bootstrap: null, kind: kind6 }; setInitialScrollSession(state3, obj5); obj6 = { preserveTarget: true, resolvedOffset: tmp27 }; finishInitialScroll(tmp, obj6); } else { const obj7 = { scroll: tmp27, seedContentOffset: tmp27, targetIndexSeed: initialScroll2.index }; startBootstrapInitialScrollSession(state3, obj7); closure_0 = tmp; const state4 = tmp.state; const initialScrollSession5 = state4.initialScrollSession; let kind7; if (null != initialScrollSession5) { kind7 = initialScrollSession5.kind; } let bootstrap2; if ("bootstrap" === kind7) { bootstrap2 = state4.initialScrollSession.bootstrap; } if (bootstrap2) { if (undefined === bootstrap2.frameHandle) { let _requestAnimationFrame = requestAnimationFrame; bootstrap2.frameHandle = requestAnimationFrame(() => { const initialScrollSession = state4.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = state4.initialScrollSession.bootstrap; } if (bootstrap) { bootstrap.frameHandle = undefined; bootstrap.mountFrameCount = bootstrap.mountFrameCount + 1; const obj = { mountFrameCount: null, passCount: null }; ({ mountFrameCount: obj.mountFrameCount, passCount: obj.passCount } = bootstrap); if (!abortBootstrapRevealIfNeeded(closure_0, obj)) { closure_0 = tmp5; state = tmp5.state; const initialScrollSession2 = state.initialScrollSession; let kind1; if (null != initialScrollSession2) { kind1 = initialScrollSession2.kind; } let bootstrap1; if ("bootstrap" === kind1) { bootstrap1 = state.initialScrollSession.bootstrap; } if (bootstrap1) { if (undefined === bootstrap1.frameHandle) { const _requestAnimationFrame = requestAnimationFrame; bootstrap1.frameHandle = requestAnimationFrame(() => { const initialScrollSession = state4.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = state4.initialScrollSession.bootstrap; } if (bootstrap) { bootstrap.frameHandle = undefined; bootstrap.mountFrameCount = bootstrap.mountFrameCount + 1; const obj = { mountFrameCount: null, passCount: null }; ({ mountFrameCount: obj.mountFrameCount, passCount: obj.passCount } = bootstrap); if (!abortBootstrapRevealIfNeeded(closure_0, obj)) { closure_0 = tmp5; state = tmp5.state; const initialScrollSession2 = state.initialScrollSession; let kind1; if (null != initialScrollSession2) { kind1 = initialScrollSession2.kind; } let bootstrap1; if ("bootstrap" === kind1) { bootstrap1 = state.initialScrollSession.bootstrap; } if (bootstrap1) { if (undefined === bootstrap1.frameHandle) { const _requestAnimationFrame = requestAnimationFrame; bootstrap1.frameHandle = requestAnimationFrame(() => { const initialScrollSession = state4.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = state4.initialScrollSession.bootstrap; } if (bootstrap) { bootstrap.frameHandle = undefined; bootstrap.mountFrameCount = bootstrap.mountFrameCount + 1; const obj = { mountFrameCount: null, passCount: null }; ({ mountFrameCount: obj.mountFrameCount, passCount: obj.passCount } = bootstrap); if (!abortBootstrapRevealIfNeeded(closure_0, obj)) { closure_0 = tmp5; state = tmp5.state; const initialScrollSession2 = state.initialScrollSession; let kind1; if (null != initialScrollSession2) { kind1 = initialScrollSession2.kind; } let bootstrap1; if ("bootstrap" === kind1) { bootstrap1 = state.initialScrollSession.bootstrap; } if (bootstrap1) { if (undefined === bootstrap1.frameHandle) { const _requestAnimationFrame = requestAnimationFrame; bootstrap1.frameHandle = requestAnimationFrame(() => { ... }); } } } } }); } } } } }); } } } } }); } } } tmp34 = 0 === state3.props.data.length && undefined !== initialScroll2.index; } else { const initialScrollSession4 = state3.initialScrollSession; let kind8; if (null != initialScrollSession4) { kind8 = initialScrollSession4.kind; } if ("offset" === kind8) { const contentOffset = initialScroll2.contentOffset; let num5 = 0; if (null != contentOffset) { num5 = contentOffset; } let tmp30 = Math.abs(num5) <= 1; } else { tmp30 = 0 === initialScroll2.index; if (tmp30) { const viewPosition = initialScroll2.viewPosition; let num2 = 0; if (null != viewPosition) { num2 = viewPosition; } tmp30 = 0 === num2; } if (tmp30) { const viewOffset = initialScroll2.viewOffset; let num3 = 0; if (null != viewOffset) { num3 = viewOffset; } tmp30 = Math.abs(num3) <= 1; } } } } } } if (!tmp2) { tmp2 = num; } if (!tmp2) { let tmp20 = !initialScroll; if (initialScroll) { tmp20 = 0 !== onLayoutProp.length; } if (!tmp20) { tmp20 = 0 === num && !tmp4; const tmp21 = 0 === num && !tmp4; } tmp2 = !tmp20; } if (!tmp2) { if (initialScroll) { if (!tmp4) { const obj8 = { resolvedOffset: num }; finishInitialScroll(tmp, obj8); } } setInitialRenderState(tmp, { didInitialScroll: true }); } }, []); let didColumnsChange = isFirst; if (!isFirst) { didColumnsChange = tmp140; } if (!didColumnsChange) { didColumnsChange = current.didColumnsChange; } if (didColumnsChange) { const _Date3 = Date; ref1.current.lastBatchingAction = Date.now(); if (!keyExtractor) { keyExtractor = isFirst; } if (!keyExtractor) { keyExtractor = !tmp140; } if (!keyExtractor) { let sizes = ref1.current.sizes; sizes.clear(); ref1.current.positions.length = 0; ref1.current.totalSize = 0; context(context, "totalSize", 0); } } let tmp177 = closure_31; if (closure_31) { closure_132(recycleItems); } const items10 = [data.length, dataKey, tmp140, hasHadNonEmptyData, tmp9, tmp39, tmp60]; const layoutEffect1 = obj.useLayoutEffect(() => { let tmp2 = closure_31; let str = "bootstrap"; let str2 = "bootstrap"; if (isRTL) { str2 = "offset"; } state = tmp.state; const initialScrollSession = state.initialScrollSession; let previousDataLength; if (null != initialScrollSession) { previousDataLength = initialScrollSession.previousDataLength; } let num = 0; if (null != previousDataLength) { num = previousDataLength; } let tmp9 = length > 0; if (tmp9) { hasHadNonEmptyData = state.hasHadNonEmptyData; let tmp10 = !hasHadNonEmptyData; if (hasHadNonEmptyData) { tmp10 = hasHadNonEmptyData; } tmp9 = tmp10; } if (onLayoutProp.length > 0) { state.hasHadNonEmptyData = true; } if (tmp9) { if (tmp5) { const state2 = tmp.state; state2.clearPreservedInitialScrollOnNextFinish = undefined; if (undefined !== state2.timeoutPreservedInitialScrollClear) { const _clearTimeout2 = clearTimeout; clearTimeout(state2.timeoutPreservedInitialScrollClear); state2.timeoutPreservedInitialScrollClear = undefined; } state2.initialScroll = tmp5; const initialScrollSession2 = state2.initialScrollSession; let kind; if (null != initialScrollSession2) { kind = initialScrollSession2.kind; } let str4 = str; if ("offset" === kind) { str4 = "offset"; } const obj = { kind: str4 }; setInitialScrollSession(state2, obj); const obj2 = { kind: str2, previousDataLength: num }; setInitialScrollSession(state, obj2); } else { if (undefined !== state.timeoutPreservedInitialScrollClear) { const _clearTimeout = clearTimeout; clearTimeout(state.timeoutPreservedInitialScrollClear); state.timeoutPreservedInitialScrollClear = undefined; } state.clearPreservedInitialScrollOnNextFinish = undefined; state.initialScroll = undefined; setInitialScrollSession(state); } } if (state.initialScrollSession) { state.initialScrollSession.previousDataLength = length; } setInitialScrollSession(state); if (closure_18) { const state4 = tmp.state; ({ initialScroll, initialScrollSession: initialScrollSession4 } = state4); let kind1; if (null != initialScrollSession4) { kind1 = initialScrollSession4.kind; } if ("offset" !== kind1) { if (initialScroll) { const initialScrollSession5 = state4.initialScrollSession; let kind2; if (null != initialScrollSession5) { kind2 = initialScrollSession5.kind; } if (str === kind2) { const bootstrap = state4.initialScrollSession.bootstrap; } const tmp36 = !!(state4.didFinishInitialScroll && 0 === num && length > 0 && undefined !== initialScroll.index); if (!tmp4) { if (tmp2) { if (length > 0) { if (state4.didFinishInitialScroll) { if (!bootstrap) { if (!tmp36) { if (undefined !== state4.timeoutPreservedInitialScrollClear) { const _clearTimeout3 = clearTimeout; clearTimeout(state4.timeoutPreservedInitialScrollClear); state4.timeoutPreservedInitialScrollClear = undefined; } state4.clearPreservedInitialScrollOnNextFinish = undefined; state4.initialScroll = undefined; setInitialScrollSession(state4); } } } } } } let tmp41 = length > 0; if (tmp41) { let tmp42 = tmp4; if (!tmp4) { let tmp43 = !initialScroll; if (initialScroll) { tmp43 = 1 !== initialScroll.viewPosition; } if (!tmp43) { let prop; if (null != initialScroll) { prop = initialScroll.preserveForBottomPadding; } let tmp46 = !tmp45; if (!prop) { let prop1; if (null != initialScroll) { prop1 = initialScroll.preserveForFooterLayout; } tmp46 = !prop1; } tmp43 = tmp46; } tmp42 = !tmp43; } tmp41 = tmp42; } if (!tmp41) { if (tmp2) { let tmp63 = bootstrap; if (!bootstrap) { tmp63 = tmp36; } tmp2 = tmp63; } if (tmp2) { const state5 = tmp.state; state5.clearPreservedInitialScrollOnNextFinish = undefined; if (undefined !== state5.timeoutPreservedInitialScrollClear) { const _clearTimeout4 = clearTimeout; clearTimeout(state5.timeoutPreservedInitialScrollClear); state5.timeoutPreservedInitialScrollClear = undefined; } state5.initialScroll = initialScroll; if (tmp36) { const obj3 = { resetInitialScroll: true }; const state6 = tmp.state; if (obj3.resetLayout) { state6.didContainersLayout = false; state6.queuedInitialLayout = false; } if (obj3.resetInitialScroll) { state6.didFinishInitialScroll = false; } set$(tmp, "readyToRender", false); resetAdaptiveRender(tmp); } const initialScrollSession6 = state5.initialScrollSession; let kind3; if (null != initialScrollSession6) { kind3 = initialScrollSession6.kind; } let str10 = str; if ("offset" === kind3) { str10 = "offset"; } const obj4 = { kind: str10 }; setInitialScrollSession(state5, obj4); const obj5 = { scroll: resolveInitialScrollOffset(tmp, initialScroll), seedContentOffset: null, targetIndexSeed: null }; let tmp75; if (tmp36) { if (!bootstrap) { current = state4.refScroller.current; let prop2; if (null != current) { prop2 = current.getCurrentScrollOffset; } if (null == prop2) { if (typeof tmp77 !== "number") { let scroll = state4.scrollPending; if (null == scroll) { scroll = state4.scroll; } } else { const _Number = Number; } tmp75 = tmp77; } else { const call = prop2.call; typeof call === "unknown" ? prop2() : call(current); } } } obj5.seedContentOffset = tmp75; obj5.targetIndexSeed = initialScroll.index; rearmBootstrapInitialScroll(tmp, obj5); } } else { const values = tmp.values; value = values.get("footerSize"); if (tmp4) { let num7 = value; if (!value) { num7 = 0; } let prop3; if (null != initialScroll) { prop3 = initialScroll.preserveForFooterLayout; } obj6 = { contentOffset: "Array", index: true, preserveForBottomPadding: null, preserveForFooterLayout: null, viewOffset: 1, viewPosition: 190 }; const _Math2 = Math; obj6.index = Math.max(0, length - 1); obj6.preserveForFooterLayout = !!prop3; obj6.viewOffset = -tmp6 - num7; let obj7 = obj6; const tmp57 = !prop3; } else { let num3 = value; if (!value) { num3 = 0; } let prop4; if (null != initialScroll) { prop4 = initialScroll.preserveForFooterLayout; } obj7 = {}; const merged = Object.assign(initialScroll); obj7.contentOffset = undefined; if (tmp4) { const _Math = Math; let index = Math.max(0, length - 1); } else { index = initialScroll.index; } obj7.index = index; obj7.preserveForBottomPadding = true; obj7.preserveForFooterLayout = !!prop4; let num5 = 0; if (!!prop4) { num5 = num3; } obj7.viewOffset = -tmp6 - num5; obj7.viewPosition = 1; const tmp50 = !prop4; } if (!tmp36) { if (didFinishedInitialScrollMoveAwayFromTarget(tmp, initialScroll)) { const obj8 = { dataLength: length, stylePaddingBottom: tmp6, target: initialScroll }; clearPendingInitialScrollFooterLayout(tmp, obj8); } } const state7 = tmp.state; state7.clearPreservedInitialScrollOnNextFinish = undefined; if (undefined !== state7.timeoutPreservedInitialScrollClear) { const _clearTimeout5 = clearTimeout; clearTimeout(state7.timeoutPreservedInitialScrollClear); state7.timeoutPreservedInitialScrollClear = undefined; } state7.initialScroll = obj7; if (tmp36) { const obj9 = { resetInitialScroll: true }; const state8 = tmp.state; if (obj9.resetLayout) { state8.didContainersLayout = false; state8.queuedInitialLayout = false; } if (obj9.resetInitialScroll) { state8.didFinishInitialScroll = false; } set$(tmp, "readyToRender", false); resetAdaptiveRender(tmp); } const initialScrollSession7 = state7.initialScrollSession; let kind4; if (null != initialScrollSession7) { kind4 = initialScrollSession7.kind; } if ("offset" === kind4) { str = "offset"; } const obj10 = { kind: str }; setInitialScrollSession(state7, obj10); const obj11 = { scroll: resolveInitialScrollOffset(tmp, obj7), seedContentOffset: null, targetIndexSeed: null }; let tmp91; if (tmp36) { if (!bootstrap) { const current2 = state4.refScroller.current; let prop5; if (null != current2) { prop5 = current2.getCurrentScrollOffset; } if (null == prop5) { if (typeof tmp93 !== "number") { let scroll2 = state4.scrollPending; if (null == scroll2) { scroll2 = state4.scroll; } } else { const _Number2 = Number; } tmp91 = tmp93; } else { const call2 = prop5.call; typeof call2 === "unknown" ? prop5() : call2(current2); } } } obj11.seedContentOffset = tmp91; obj11.targetIndexSeed = obj7.index; rearmBootstrapInitialScroll(tmp, obj11); const tmp62 = initialScroll.index === obj7.index && initialScroll.preserveForBottomPadding === obj7.preserveForBottomPadding && initialScroll.preserveForFooterLayout === obj7.preserveForFooterLayout && initialScroll.viewOffset === obj7.viewOffset && initialScroll.viewPosition === obj7.viewPosition; } const tmp33 = state4.didFinishInitialScroll && 0 === num && length > 0 && undefined !== initialScroll.index; const tmp34 = !(state4.didFinishInitialScroll && 0 === num && length > 0 && undefined !== initialScroll.index); } } } else { let queuedInitialLayout = 0 === num; let initialScroll1 = queuedInitialLayout; if (queuedInitialLayout) { initialScroll1 = length > 0; } if (initialScroll1) { initialScroll1 = state.initialScroll; } if (initialScroll1) { const initialScrollSession3 = tmp.state.initialScrollSession; let kind5; if (null != initialScrollSession3) { kind5 = initialScrollSession3.kind; } initialScroll1 = "offset" === kind5; } if (initialScroll1) { initialScroll1 = state.didFinishInitialScroll; } if (queuedInitialLayout) { queuedInitialLayout = 0 !== length; } if (queuedInitialLayout) { queuedInitialLayout = state.initialScroll; } if (queuedInitialLayout) { queuedInitialLayout = state.queuedInitialLayout; } if (queuedInitialLayout) { const didFinishInitialScroll = state.didFinishInitialScroll; let tmp25 = !didFinishInitialScroll; if (didFinishInitialScroll) { tmp25 = initialScroll1; } queuedInitialLayout = tmp25; } if (queuedInitialLayout) { if (initialScroll1) { obj12 = { resetInitialScroll: true }; const state3 = tmp.state; if (obj12.resetLayout) { state3.didContainersLayout = false; state3.queuedInitialLayout = false; } if (obj12.resetInitialScroll) { state3.didFinishInitialScroll = false; } set$(tmp, "readyToRender", false); resetAdaptiveRender(tmp); } advanceCurrentInitialScrollSession(tmp); } } }, items10); const items11 = [context, data, dataVersion, , , , , ]; let anchorIndex3; if (null != anchoredEndSpace) { anchorIndex3 = anchoredEndSpace.anchorIndex; } items11[3] = anchorIndex3; let anchorMaxSize; if (null != anchoredEndSpace) { anchorMaxSize = anchoredEndSpace.anchorMaxSize; } items11[4] = anchorMaxSize; let anchorOffset; if (null != anchoredEndSpace) { anchorOffset = anchoredEndSpace.anchorOffset; } items11[5] = anchorOffset; items11[6] = tmp156; items11[7] = num4; const layoutEffect2 = obj.useLayoutEffect(() => { if (closure_33) { current.scrollForNextCalculateItemsInView = undefined; const triggerCalculateItemsInView = current.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(); } else { call(tmp); } } tmp = current; } maybeUpdateAnchoredEndSpace(context); }, items11); const items12 = [context, undefined]; const layoutEffect3 = obj.useLayoutEffect(() => { ref2.current = undefined; const diff = getContentInsetEnd(context) - getContentInsetEnd(context, ref2.current); if (0 !== diff) { const values = tmp.values; updateScroll(tmp, context.state.scroll, true, { markHasScrolled: false }); const tmp9 = retargetActiveInitialScrollAtEnd(tmp); let tmp10 = !tmp9; if (!tmp9) { tmp10 = !tmp4; } if (tmp10) { requestAdjust(tmp, diff); } tmp4 = !values.get("isWithinMaintainScrollAtEndThreshold"); } }, items12); const items13 = [data.length, tmp9, horizontal, tmp39, tmp60]; const items14 = [data.length, tmp9, tmp39, tmp60]; const callback1 = obj.useCallback((arg0) => { if (closure_18) { state = tmp.state; if (closure_5) { ({ initialScroll, initialScrollSession } = state); let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("offset" !== kind) { if (0 !== length) { if (initialScroll) { const initialScrollSession2 = state.initialScrollSession; let kind1; if (null != initialScrollSession2) { kind1 = initialScrollSession2.kind; } let str3 = "bootstrap"; let bootstrap; if ("bootstrap" === kind1) { bootstrap = state.initialScrollSession.bootstrap; } if (bootstrap) { if (didFinishedInitialScrollMoveAwayFromTarget(tmp, initialScroll)) { const obj2 = { dataLength: length, stylePaddingBottom: tmp7, target: initialScroll }; clearPendingInitialScrollFooterLayout(tmp, obj2); } else { let prop; if (null != initialScroll) { prop = initialScroll.preserveForFooterLayout; } const obj = { contentOffset: "Array", index: true, preserveForBottomPadding: null, preserveForFooterLayout: null, viewOffset: 1, viewPosition: 190 }; const _Math = Math; obj.index = Math.max(0, length - 1); obj.preserveForFooterLayout = !!prop; obj.viewOffset = -tmp7 - tmp5; if (initialScroll.index === obj.index) { if (initialScroll.viewPosition === obj.viewPosition) { if (initialScroll.viewOffset === obj.viewOffset) { const obj3 = { dataLength: length, stylePaddingBottom: tmp7, target: initialScroll }; clearPendingInitialScrollFooterLayout(tmp, obj3); } } } const state2 = tmp.state; state2.clearPreservedInitialScrollOnNextFinish = undefined; if (undefined !== state2.timeoutPreservedInitialScrollClear) { const _clearTimeout = clearTimeout; clearTimeout(state2.timeoutPreservedInitialScrollClear); state2.timeoutPreservedInitialScrollClear = undefined; } state2.initialScroll = obj; if (!tmp19) { const obj4 = { resetInitialScroll: true }; const state3 = tmp.state; if (obj4.resetLayout) { state3.didContainersLayout = false; state3.queuedInitialLayout = false; } if (obj4.resetInitialScroll) { state3.didFinishInitialScroll = false; } set$(tmp, "readyToRender", false); resetAdaptiveRender(tmp); } const initialScrollSession3 = state2.initialScrollSession; let kind2; if (null != initialScrollSession3) { kind2 = initialScrollSession3.kind; } if ("offset" === kind2) { str3 = "offset"; } const obj5 = { kind: str3 }; setInitialScrollSession(state2, obj5); obj6 = { scroll: resolveInitialScrollOffset(tmp, obj), targetIndexSeed: obj.index }; rearmBootstrapInitialScroll(tmp, obj6); const tmp15 = !prop; tmp19 = !state.didFinishInitialScroll; } } else { let prop1; if (null != initialScroll) { prop1 = initialScroll.preserveForFooterLayout; } } } } } } } }, items13); const obj25 = { onLayoutChange: obj.useCallback((arg0, arg1) => { state = context.state; const props = state.props; const maintainScrollAtEnd = props.maintainScrollAtEnd; let str = "height"; let str2 = "height"; ({ scrollLength, otherAxisSize } = current); if (state.props.horizontal) { str2 = "width"; } const str3 = "width"; let point = arg0; if (props.useWindowScroll) { const Dimensions = get_ActivityIndicator.Dimensions; value = Dimensions.get("window"); const size = { height: null, width: null }; ({ height: obj.height, width: obj.width } = value); let tmp7 = arg0; if (size[str2] > 0) { const obj2 = {}; const merged = Object.assign(arg0); obj2[str2] = tmp6; tmp7 = obj2; } point = tmp7; } let scrollLength2 = state.scrollLength; if (point[str2] > 0) { scrollLength2 = tmp11; } const lastLayout = state.lastLayout; let tmp13 = !lastLayout; if (lastLayout) { tmp13 = scrollLength2 > state.scrollLength; } if (!tmp13) { tmp13 = state.lastLayout.x !== point.x; } if (!tmp13) { tmp13 = state.lastLayout.y !== point.y; } state.lastLayout = point; const otherAxisSize2 = state.otherAxisSize; let tmp14 = scrollLength2 !== state.scrollLength || tmp12 !== otherAxisSize2; if (tmp14) { state.scrollLength = scrollLength2; state.otherAxisSize = tmp12; updateContentMetricsState(tmp2); let _Date = Date; state.lastBatchingAction = Date.now(); state.scrollForNextCalculateItemsInView = undefined; if (scrollLength2 > 0) { doInitialAllocateContainers(tmp2); } if (tmp13) { closure_0 = tmp2; let obj4 = { doMVCP: true }; let state3 = tmp2.state; fn(() => { let set2; let tmp163; let tmp164; let containerItemKeys = state.containerItemKeys; ({ enableScrollForNextCalculateItemsInView, idCache } = state); ({ indexByKey, minIndexSizeChanged, positions, props } = state); ({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props); ({ keyExtractor, onStickyHeaderChange: closure_4 } = props); ({ scrollForNextCalculateItemsInView, scrollLength } = state); ({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state); const data = state.props.data; let prop = state.props.stickyHeaderIndicesArr; if (!prop) { prop = []; } let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet; if (!stickyHeaderIndicesSet) { let _Set = Set; stickyHeaderIndicesSet = new Set(); } let tmp9 = closure_1_46(containerItemKeys, idCache.drawDistanceMode); ({ dataChanged, doMVCP, forceFullItemPositions } = idCache); let initialScrollSession = tmp2.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = tmp2.initialScrollSession.bootstrap; } let tmp16 = closure_1_21(containerItemKeys, "numContainers"); if (data) { if (0 !== scrollLength) { if (tmp16) { closure_8 = ref2(tmp7); let sum = tmp15(tmp7, "stylePaddingTop") + tmp15(tmp7, "alignItemsAtEndPadding"); closure_9 = sum + tmp15(tmp7, "headerSize"); const tmp15Result3 = tmp15(tmp7, "numColumns"); let scrollVelocity = idCache.scrollVelocity; if (null == scrollVelocity) { scrollVelocity = closure_1_69(tmp2); } ({ initialScroll, queuedInitialLayout } = tmp2); if (!tmp13) { let scroll1; if (null != bootstrap) { scroll1 = bootstrap.scroll; } if (null == scroll1) { scroll1 = tmp2.scroll; } let scroll = scroll1; } else { if (!queuedInitialLayout) { if (closure_1_41(tmp2)) { if (initialScroll) { scroll = closure_1_75(tmp7, initialScroll); } } } scroll = tmp2.scroll; } let num = 0; closure_11 = 0; closure_12 = 0; closure_13 = 0; closure_14 = 0; scrollBottomBuffered = 0; closure_16 = scroll; function updateScroll2(scroll) { closure_16 = scroll; values = values.values; value = values.get("scrollAdjustPending"); num = 0; if (null != value) { num = value; } closure_11 = num - closure_9; const rounded = Math.round(scroll + closure_11); closure_12 = rounded; if (rounded + scrollLength > closure_8) { const _Math = Math; closure_12 = Math.max(0, tmp4 - tmp3); } } updateScroll2(scroll); const tmp15Result4 = tmp15(tmp7, "activeStickyIndex"); closure_17 = tmp15Result4; function resolveStickyState() { num = -1; let num2 = -1; if (prop.length > 0) { let diff = arr.length - 1; let tmp5 = num; if (0 <= diff) { while (true) { let tmp6 = tmp3[arr[diff]]; if (undefined === tmp6) { diff = diff - 1; tmp5 = num; if (0 > diff) { break; } } else { tmp5 = diff; if (tmp >= tmp6) { break; } } break; } } num2 = tmp5; } if (0 <= num2) { num = arr[num2]; } let tmp8 = num2 >= 0; if (0 > num2) { tmp8 = tmp9 >= 0; } if (tmp8) { context(containerItemKeys, "activeStickyIndex", num); } let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null }; finishCalculateItemsInView = undefined; if (closure_4) { if (arr.length > 0) { if (tmp9 !== num) { finishCalculateItemsInView = () => { if (undefined !== data[num]) { if (null != closure_2_4) { const obj = { index: tmp, item: tmp2 }; tmp3(obj); } } }; } } } obj.finishCalculateItemsInView = finishCalculateItemsInView; return obj; } if (!dataChanged) { let stickyState = resolveStickyState(); } let result2 = tmp9; let result3 = tmp9; if (scrollVelocity > 0) { let result = 0.5 * tmp9; const result1 = 1.5 * tmp9; result3 = result1; result2 = result; } else { if (0 === scrollVelocity) { let _Math = Math; num = 50; } result2 = 1.5 * tmp9; result3 = 0.5 * tmp9; } let num6 = 0; if (!dataChanged) { num6 = 0; if (!forceFullItemPositions) { num6 = 0; if (!tmp25) { num6 = 0; if (!closure_1_41(tmp2)) { num6 = 0; if (!tmp2.scrollingTo) { num6 = 0; if (!tmp2.pendingNativeMVCPAdjust) { num6 = 0; if (tmp15(tmp7, "readyToRender")) { let _Math2 = Math; num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) { if (arg1 <= 0) { return 0; } else { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const bound = Math.min(1, Math.abs(scrollVelocity) / 4); return Math.sign(scrollVelocity) * arg1 * bound; } })(scrollVelocity, Math.min(result2, result3)); } } } } } } } function updateScrollRange() { const bound = Math.max(0, closure_12); closure_14 = Math.max(bound, closure_12 + scrollLength + Math.max(0, -closure_16)); closure_13 = bound - result2 + num6; closure_15 = closure_14 + result3 + num6; } updateScrollRange(); if (0 !== num6) { (function scheduleRenderRangeProjectionSettle(containerItemKeys) { state = containerItemKeys.state; const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle; if (undefined !== timeoutRenderRangeProjectionSettle) { const _clearTimeout = clearTimeout; clearTimeout(timeoutRenderRangeProjectionSettle); let timeouts = state.timeouts; timeouts.delete(timeoutRenderRangeProjectionSettle); } const timerId = setTimeout(() => { state.timeoutRenderRangeProjectionSettle = undefined; const timeouts = state.timeouts; timeouts.delete(timerId); state.scrollHistory.length = 0; const triggerCalculateItemsInView = state.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(); } else { call(state); } } }, 100); state.timeoutRenderRangeProjectionSettle = timerId; const timeouts2 = state.timeouts; timeouts2.add(timerId); })(tmp7); } if (enableScrollForNextCalculateItemsInView) { if (!tmp25) { if (!dataChanged) { if (!forceFullItemPositions) { if (scrollForNextCalculateItemsInView) { ({ top, bottom } = scrollForNextCalculateItemsInView); if (null === top) { if (null === bottom) { tmp2.scrollForNextCalculateItemsInView = undefined; } } if (null === top) { if (viewabilityConfigCallbackPairs) { (function updateViewabilityForCachedRange(containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, arg3, arg4) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { let tmp7 = null; let sum1; let tmp9 = null; if (startBuffered <= endBuffered) { let tmp3 = null; let tmp5 = null; let tmp6 = startBuffered; tmp7 = null; tmp9 = null; if (startBuffered < data1.length) { while (true) { let tmp10 = tmp[tmp6]; let tmp11 = tmp3; let tmp12 = tmp4; let tmp13 = tmp5; let tmp14 = tmp6; if (null == tmp10) { ({ data, keyExtractor } = state.props); let str2 = ""; if (data) { let tmp15 = null; if (tmp6 < data.length) { let keyExtractorResult = tmp6; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp6], tmp6); } tmp15 = keyExtractorResult; } state.idCache[tmp6] = tmp15; str2 = tmp15; } tmp10 = str2; } value = sizes.get(tmp10); if (null == value) { value = closure_1_58(containerItemKeys, tmp18, tmp14, data1[tmp6]); } let tmp23 = tmp2[tmp6]; let tmp24 = null === tmp11 && tmp23 + value > arg3; if (tmp24) { tmp11 = tmp6; } let tmp25 = undefined === tmp12 && tmp23 >= arg3 - 10 && tmp23 <= arg4; if (tmp25) { tmp12 = tmp6; } let tmp26 = tmp13; flag = false; if (null !== tmp11) { flag2 = true; if (tmp23 <= arg4) { tmp13 = tmp6; flag2 = false; } tmp26 = tmp13; flag = flag2; } tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (flag) { break; } else { let sum = tmp6 + 1; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (sum > endBuffered) { break; } else { tmp3 = tmp11; tmp4 = tmp12; tmp5 = tmp26; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; tmp6 = sum; if (sum >= data1.length) { break; } } } } } } const obj = { endNoBuffer: tmp9, firstFullyOnScreenIndex: sum1, idsInView: null, startNoBuffer: null }; if (null == sum1) { sum1 = tmp7; } const items = []; if (null != sum1) { if (null !== tmp9) { if (sum1 <= tmp9) { do { let tmp29 = state.idCache[sum1]; if (null == tmp29) { ({ data: data2, keyExtractor: keyExtractor2 } = state.props); let str4 = ""; if (data2) { let tmp31 = null; if (sum1 < data2.length) { let keyExtractor2Result = sum1; if (keyExtractor2) { keyExtractor2Result = keyExtractor2(data2[sum1], sum1); } tmp31 = keyExtractor2Result; } state.idCache[sum1] = tmp31; str4 = tmp31; } tmp29 = str4; } let arr = items.push(tmp29); sum1 = sum1 + 1; } while (sum1 <= tmp9); } } } obj.idsInView = items; obj.startNoBuffer = tmp7; const merged = Object.assign(state, obj); closure_1_102(state, tmp7); if (tmp37) { closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered); } tmp37 = null !== tmp7 && null !== tmp9; } } } } })(tmp7, viewabilityConfigCallbackPairs, scrollLength, closure_12, closure_14); } else if (tmp2.props.onFirstVisibleItemChanged) { closure_1_102(tmp2, (function findFirstVisibleIndexInCachedRange(containerItemKeys, arg1) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { if (startBuffered <= endBuffered) { if (startBuffered < data1.length) { while (true) { let tmp3 = tmp[startBuffered]; let tmp4 = startBuffered; if (null == tmp3) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp5 = null; if (startBuffered < data.length) { let keyExtractorResult = startBuffered; if (keyExtractor) { keyExtractorResult = keyExtractor(data[startBuffered], startBuffered); } tmp5 = keyExtractorResult; } state.idCache[startBuffered] = tmp5; str = tmp5; } tmp3 = str; } value = sizes.get(tmp3); let tmp9 = value; if (null == value) { tmp9 = closure_1_58(containerItemKeys, tmp8, tmp4, data1[startBuffered]); } if (tmp2[startBuffered] + tmp9 > arg1) { break; } else { let sum = startBuffered + 1; if (sum <= endBuffered) { startBuffered = sum; } } } return startBuffered; } } return null; } } } } return null; })(tmp7, closure_12)); } let prop1; if (null != stickyState) { prop1 = stickyState.finishCalculateItemsInView; } if (null != prop1) { let call = prop1.call; typeof call === "unknown" ? prop1() : call(stickyState); } } } } } } } let tmp73; if (doMVCP) { if (!tmp25) { tmp73 = closure_1_68(tmp7, dataChanged); } } if (dataChanged) { closure_1_86(tmp2); } let num8 = 0; if (!forceFullItemPositions) { num8 = 0; if (!dataChanged) { let startBuffered = minIndexSizeChanged; if (null == minIndexSizeChanged) { startBuffered = tmp2.startBuffered; } let num9 = 0; if (null != startBuffered) { num9 = startBuffered; } num8 = num9; } } let obj = { doMVCP, forceFullUpdate: forceFullItemPositions, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null }; let tmp82 = !forceFullItemPositions; if (!forceFullItemPositions) { tmp82 = !dataChanged; } if (tmp82) { tmp82 = tmp15Result3 > 1; } if (tmp82) { tmp82 = undefined !== minIndexSizeChanged; } obj.optimizeForVisibleWindow = tmp82; obj.scrollBottomBuffered = scrollBottomBuffered; obj.scrollVelocity = scrollVelocity; obj.startIndex = num8; closure_1_89(tmp7, dataChanged, obj); const tmp17Result = ref2(tmp7); closure_8 = tmp17Result; if (undefined !== minIndexSizeChanged) { tmp2.minIndexSizeChanged = undefined; } if (dataChanged) { if (doMVCP) { if (tmp2.props.maintainVisibleContentPosition.data) { if (tmp2.didContainersLayout) { if (tmp2.idsInView.length > 0) { const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition; const _Set2 = Set; set = new Set(); const idsInView = tmp2.idsInView; for (const item10226 of idsInView) { let tmp99 = item10226; value = indexByKey.get(item10226); let tmp101 = value; if (undefined !== value) { let tmp102 = shouldRestorePosition; if (shouldRestorePosition) { tmp102 = !shouldRestorePosition(data[tmp101], tmp101, data); } if (!tmp102) { let addResult = set.add(tmp99); } } continue; } } } } } } const tmp112 = closure_1_21(containerItemKeys, "scrollAdjustPending"); let num11 = 0; if (null != tmp112) { num11 = tmp112; } if (null != tmp73) { tmp73(); } let tmp114 = tmp73; if (tmp114) { let tmp116 = tmp107.scroll !== state.scroll; if (!tmp116) { const tmp109Result = tmp109(tmp111, "scrollAdjustPending"); let num12 = 0; if (null != tmp109Result) { num12 = tmp109Result; } tmp116 = num12 !== num11; } tmp114 = tmp116; } if (tmp114) { updateScroll2(tmp107.scroll); updateScrollRange(); } if (dataChanged) { stickyState = resolveStickyState(); } let tmp123; if (!tmp13) { let targetIndexSeed; if (null != bootstrap) { targetIndexSeed = bootstrap.targetIndexSeed; } tmp123 = targetIndexSeed; } if (null == tmp123) { let num13 = !dataChanged; if (!dataChanged) { num13 = startBufferedId; } if (num13) { num13 = indexByKey.get(startBufferedId); } if (!num13) { num13 = 0; } tmp123 = num13; } let diff = tmp123; let tmp126 = tmp123; let tmp127 = tmp123; if (tmp123 >= 0) { while (true) { let tmp128 = idCache[diff]; let tmp129 = diff; if (null == tmp128) { tmp128 = closure_1_49(state, diff); } let value4 = sizes.get(tmp128); if (null == value4) { value4 = closure_1_58(containerItemKeys, tmp135, tmp129, data[diff]); } tmp127 = tmp126; if (positions[diff] + value4 <= closure_13) { break; } else { diff = diff - 1; tmp126 = tmp129; tmp127 = tmp129; if (diff < 0) { break; } } } } let tmp143 = tmp127; if (tmp15Result3 > 1) { let diff1 = tmp127; tmp143 = tmp127; if (tmp127 > 0) { tmp143 = diff1; while (1 !== state.columns[diff1]) { tmp143 = diff1; if (undefined === tmp145) { break; } else { diff1 = diff1 - 1; tmp143 = diff1; if (0 >= diff1) { break; } } } } } let num16 = 0; let num17 = 0; let num18 = 0; if (0 < tmp16) { do { let _HermesInternal = HermesInternal; let tmp152 = closure_1_21(containerItemKeys, "containerItemKey" + num16); let bound = num17; if (undefined !== tmp152) { let _Math3 = Math; bound = Math.max(num17, indexByKey.get(tmp152)); } num16 = num16 + 1; num17 = bound; num18 = bound; } while (num16 < tmp16); } let obj2 = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: -1 }; const length = data.length; let _Math4 = Math; const bound1 = Math.max(0, tmp143); let tmp157 = bound1; let flag3 = false; let tmp160 = null; let tmp161 = null; let tmp162 = null; let endNoBuffer1 = null; let tmp166 = null; let startNoBuffer1 = null; if (bound1 < length) { while (true) { let tmp168 = idCache[tmp157]; let tmp169 = tmp157; let tmp171 = tmp158; let tmp172 = tmp159; let tmp173 = tmp160; let tmp174 = tmp161; let tmp175 = tmp162; if (null == tmp168) { tmp168 = closure_1_49(state, tmp157); } let value5 = sizes.get(tmp168); if (null == value5) { value5 = closure_1_58(containerItemKeys, tmp180, tmp169, data[tmp157]); } let tmp187 = positions[tmp157]; let tmp188 = tmp171; let tmp189 = tmp172; let tmp190 = tmp173; let tmp191 = tmp174; let tmp192 = tmp175; let tmp193 = flag3; if (!flag3) { let tmp201 = closure_1_100(obj2, tmp169, tmp187, value5, closure_12, closure_14); let tmp202 = null === tmp175; if (tmp202) { tmp202 = tmp187 + value5 > closure_13; } if (tmp202) { let tmp205 = null; if (closure_13 >= 0) { tmp205 = tmp187; } tmp172 = tmp205; tmp174 = tmp168; tmp175 = tmp157; } let tmp206 = flag3; let tmp207 = tmp171; let tmp208 = tmp173; if (null !== obj2.startNoBuffer) { let flag4 = true; if (tmp187 <= scrollBottomBuffered) { let sum1 = null; if (scrollBottomBuffered <= tmp17Result) { sum1 = tmp187 + value5; } tmp171 = sum1; flag4 = flag3; tmp173 = tmp157; } tmp206 = flag4; tmp207 = tmp171; tmp208 = tmp173; } tmp193 = tmp206; tmp188 = tmp207; tmp190 = tmp208; tmp189 = tmp172; tmp191 = tmp174; tmp192 = tmp175; } let sum2 = tmp157 + 1; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; if (sum2 >= length) { break; } else { tmp157 = sum2; flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; if (!tmp193) { continue; } else { flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; tmp157 = sum2; if (sum2 > num18) { break; } } continue; } } } const _Object = Object; let obj3 = { endBuffered: endNoBuffer1, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null }; ({ endNoBuffer: obj5.endNoBuffer, firstFullyOnScreenIndex: obj5.firstFullyOnScreenIndex } = obj2); obj3.idsInView = closure_1_101(state, obj2); obj3.startBuffered = startNoBuffer1; obj3.startBufferedId = tmp166; obj3.startNoBuffer = obj2.startNoBuffer; let merged = Object.assign(state, obj3); if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp164; } if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp163; } if (enableScrollForNextCalculateItemsInView) { if (!closure_1_54(tmp164)) { const rect = { bottom: tmp163, top: tmp164 }; const tmp219 = rect; } tmp214.scrollForNextCalculateItemsInView = tmp219; } let sum4 = tmp16; let items = []; if (dataChanged) { let num21 = 0; if (0 < sum4) { do { let _HermesInternal2 = HermesInternal; let tmp226 = closure_1_21(containerItemKeys, "containerItemKey" + num21); let tmp227 = !keyExtractor; if (keyExtractor) { let tmp229 = tmp226; if (tmp226) { tmp229 = undefined === indexByKey.get(tmp226); } tmp227 = tmp229; } if (tmp227) { let arr = items.push(num21); } num21 = num21 + 1; } while (num21 < sum4); } } let tmp233 = state; const scrollTargetPinnedRange = state.scrollTargetPinnedRange; let bound2 = 0; let bound3 = -1; let num23 = -1; let num24 = 0; if (scrollTargetPinnedRange) { const _Math5 = Math; const _Math6 = Math; bound2 = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); const _Math7 = Math; const _Math8 = Math; const diff2 = length - 1; bound3 = Math.min(diff2, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); num23 = bound3; num24 = bound2; } closure_24 = tmp237; function isPinnedRenderIndex(arg0) { let hasItem = set.has(arg0); if (!hasItem) { let tmp2 = closure_24; if (closure_24) { tmp2 = arg0 >= bound2; } if (tmp2) { tmp2 = arg0 <= bound3; } hasItem = tmp2; } return hasItem; } if (null !== startNoBuffer1) { if (null !== endNoBuffer1) { let items1 = []; const _Set6 = Set; const set1 = new Set(); function addPinnedIndex(bound2) { if (bound2 >= 0) { if (bound2 < length) { let tmp4 = idCache[bound2]; if (null == tmp4) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp2 = null; if (bound2 < data.length) { let keyExtractorResult = bound2; if (keyExtractor) { keyExtractorResult = keyExtractor(data[bound2], bound2); } tmp2 = keyExtractorResult; } tmp.idCache[bound2] = tmp2; str = tmp2; } tmp4 = str; } value = containerItemKeys.get(tmp4); if (undefined !== value) { const stickyContainerPool = state.stickyContainerPool; stickyContainerPool.add(value); } else { let hasItem = null == tmp4; if (!hasItem) { hasItem = set1.has(bound2); } if (!hasItem) { set1.add(bound2); items1.push(bound2); } } } } } let sum3 = startNoBuffer1; if (startNoBuffer1 <= endNoBuffer1) { do { let tmp238 = idCache[sum3]; if (null == tmp238) { tmp238 = closure_1_49(state, sum3); } if (!containerItemKeys.has(tmp238)) { let addResult1 = set1.add(sum3); let arr2 = items1.push(sum3); } sum3 = sum3 + 1; } while (sum3 <= endNoBuffer1); } for (const item10471 of alwaysRenderIndicesArr) { let addPinnedIndexResult = addPinnedIndex(item10471); continue; } if (tmp237) { if (num24 <= num23) { do { let addPinnedIndexResult1 = addPinnedIndex(num24); num24 = num24 + 1; } while (num24 <= num23); } } if (prop.length > 0) { let currentStickyIdx; if (null != stickyState) { currentStickyIdx = stickyState.currentStickyIdx; } let num25 = -1; if (null != currentStickyIdx) { num25 = currentStickyIdx; } (function handleStickyActivation(containerItemKeys, prop, currentStickyIdx, items1, set1, startNoBuffer1, endNoBuffer1) { state = containerItemKeys.state; num = -1; if (currentStickyIdx >= 0) { num = prop[currentStickyIdx]; } bound2(containerItemKeys, "activeStickyIndex", num); let num2 = 0; do { let diff = currentStickyIdx - num2; if (diff >= 0) { let tmp12 = prop[diff]; if (!closure_1_99(containerItemKeys, tmp12)) { let tmp5 = state.idCache[tmp12]; if (null == tmp5) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp6 = null; if (tmp12 < data.length) { let keyExtractorResult = tmp12; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp12], tmp12); } tmp6 = keyExtractorResult; } state.idCache[tmp12] = tmp6; str = tmp6; } tmp5 = str; } let tmp8 = tmp5; if (tmp5) { containerItemKeys = state.containerItemKeys; tmp8 = !containerItemKeys.has(tmp5); } if (tmp8) { let tmp9 = tmp12 < startNoBuffer1 || tmp12 > endNoBuffer1; tmp8 = tmp9; } if (tmp8) { tmp8 = !set1.has(tmp12); } if (tmp8) { let addResult = set1.add(tmp12); let arr = items1.push(tmp12); } } } num2 = num2 + 1; } while (num2 <= 1); })(containerItemKeys, prop, num25, items1, tmp476, startNoBuffer1, endNoBuffer1); } else if (-1 !== tmp15Result4) { context(containerItemKeys, "activeStickyIndex", -1); } if (items1.length > 0) { let fn; if (getItemType) { fn = (arg0) => { const tmp = getItemType(data[arg0], arg0); let str = ""; if (undefined !== tmp) { const _String = String; str = String(tmp); } return str; }; } const tmp275 = (function findAvailableContainers(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, set) { closure_0 = fn; if (0 === items1.length) { return []; } else { const tmp56 = length(containerItemKeys, "numContainers"); state = containerItemKeys.state; ({ containerItemMetadata: closure_2, stickyContainerPool } = state); set = undefined; if (items.length > 0) { const _Set = Set; set = new Set(items); } const mapped = items1.map((itemIndex, order) => { const obj = { isSticky: null, itemIndex, itemType: null, order: null }; const stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet; obj.isSticky = stickyHeaderIndicesSet.has(itemIndex); let tmp; if (null != closure_0) { tmp = closure_0(itemIndex); } obj.itemType = tmp; obj.order = order; return obj; }); const found = mapped.filter((isSticky) => !isSticky.isSticky); items = []; items1 = []; let num2 = 0; const found1 = mapped.filter((isSticky) => isSticky.isSticky); if (0 < tmp56) { while (true) { let _HermesInternal = HermesInternal; let tmp13 = length(containerItemKeys, "containerItemKey" + num2); let hasItem; if (null != set) { hasItem = set.has(num2); } let tmp16 = !hasItem; if (tmp13) { let hasItem1; if (null != set) { hasItem1 = set.has(tmp13); } if (hasItem1) { let indexByKey = state.indexByKey; } num2 = num2 + 1; if (num2 >= tmp56) { break; } } let tmp18 = !tmp16; if (stickyContainerPool.has(num2)) { let tmp22 = undefined === tmp13 || tmp18; if (tmp22) { let obj2 = { containerIndex: num2, distance: null }; let _Number2 = Number; obj2.distance = Number.POSITIVE_INFINITY; let arr = items1.push(obj2); } } else { if (undefined !== tmp13) { if (!tmp18) { if (!tmp) { let indexByKey2 = state.indexByKey; value = indexByKey2.get(tmp13); if (undefined !== value) { if (value < startNoBuffer1) { let obj = { containerIndex: num2, distance: value < startNoBuffer1 ? startNoBuffer1 - value : value - endNoBuffer1 }; let arr2 = items.push(obj); } } } } } let obj3 = { containerIndex: num2, distance: null }; let _Number = Number; obj3.distance = Number.POSITIVE_INFINITY; let arr3 = items.push(obj3); } } } const sorted = items.sort(closure_98); const _Array = Array; const array = new Array(length); let sum = tmp56; c5 = false; function assign(itemIndex, containerIndex) { array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType }; let deleteResult; if (null != set) { deleteResult = set.delete(containerIndex); } if (deleteResult) { c5 = true; } } function assignMatching(found, items, arg2) { closure_1 = arg2; function _loop2() { ... } const iter = found[Symbol.iterator](); while (iter !== undefined) { let _loop2Result = _loop2(iter.next()); continue; } } function assignFromPool(found, items, arg2) { if (closure_0) { assignMatching(found, items, /* F125837 */ function() { ... }); } assignMatching(found, items, /* F125838 */ function() { ... }); if (arg2) { assignMatching(found, items, /* F125839 */ function() { ... }); } } assignFromPool(found, items, true); assignFromPool(found1, items1, false); for (const item10099 of mapped) { let tmp36 = item10099; if (!array[item10099.order]) { let tmp38 = +sum; sum = tmp38 + 1; let tmp39 = tmp38; if (tmp36.isSticky) { let addResult = stickyContainerPool.add(tmp39); } let obj4 = assign(tmp36, tmp39); } continue; } if (c5) { items.length = 0; if (set) { for (const item10120 of set) { let arr7 = arg4.push(item10120); continue; } } } if (closure_31) { let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled"); if (null == POSITIVE_INFINITY) { const _Number3 = Number; POSITIVE_INFINITY = Number.POSITIVE_INFINITY; } if (sum > POSITIVE_INFINITY) { const _console = console; const obj5 = { debugInfo: null }; const obj10 = { numContainers: tmp56, numContainersPooled: POSITIVE_INFINITY, numNeeded: length, stillNeeded: sum - tmp56 }; obj5.debugInfo = obj10; console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj5); } } return array; } })(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, tmp88); let iter = tmp275[Symbol.iterator](); let nextResult = iter.next(); while (iter !== undefined) { let itemIndex = nextResult.itemIndex; let tmp281 = itemIndex; let containerIndex = nextResult.containerIndex; let tmp282 = idCache[itemIndex]; let tmp280 = nextResult; if (null != tmp282) { let tmp288 = tmp282; } else { tmp288 = closure_1_49(state, tmp281); } let tmp289 = tmp288; let tmp293 = containerItemKeys; let _HermesInternal3 = HermesInternal; let tmp291 = closure_1_21; let tmp295 = closure_1_21(containerItemKeys, "containerItemKey" + containerIndex); let tmp296 = tmp295; if (tmp295) { tmp295 = tmp296 !== tmp289; } if (tmp295) { let deleteResult = containerItemKeys.delete(tmp296); } if (tmp296 !== tmp289) { if (null == set2) { let _Set3 = Set; let tmp304 = new.target; let tmp305 = new.target; set2 = new Set(); } let addResult2 = set2.add(containerIndex); let tmp311 = state.containerItemGenerations[containerIndex]; let num28 = 0; if (null != tmp311) { num28 = tmp311; } state.containerItemGenerations[containerIndex] = num28 + 1; } let tmp314 = context; let _HermesInternal4 = HermesInternal; let tmp318 = context(tmp293, "containerItemKey" + containerIndex, tmp289); let _HermesInternal5 = HermesInternal; let tmp320 = context(tmp293, "containerItemIndex" + containerIndex, tmp281); let _HermesInternal6 = HermesInternal; let tmp321 = context(tmp293, "containerItemData" + containerIndex, data[tmp281]); let tmp323 = state; let containerItemMetadata = state.containerItemMetadata; let result4 = containerItemMetadata.set(containerIndex, ref3(state, itemIndex, data[tmp281], tmp280.itemType)); let result5 = containerItemKeys.set(tmp289, containerIndex); let userScrollAnchorReset = state.userScrollAnchorReset; if (null != userScrollAnchorReset) { let keys = tmp330.keys; let addResult3 = keys.add(tmp289); } let _HermesInternal7 = HermesInternal; let combined = "containerSticky" + containerIndex; let hasItem = stickyHeaderIndicesSet.has(tmp281); let isPinnedRenderIndexResult = isPinnedRenderIndex(tmp281); if (hasItem) { let tmp314Result = tmp314(tmp293, combined, true); let stickyContainerPool2 = tmp323.stickyContainerPool; let addResult4 = stickyContainerPool2.add(containerIndex); } else { if (tmp291(tmp293, combined)) { let tmp314Result2 = tmp314(tmp293, combined, false); } let stickyContainerPool = tmp323.stickyContainerPool; if (isPinnedRenderIndexResult) { let addResult5 = stickyContainerPool.add(containerIndex); } else { let deleteResult1 = stickyContainerPool.delete(containerIndex); } } if (containerIndex >= sum4) { sum4 = containerIndex + 1; } continue; } if (sum4 !== tmp16) { context(containerItemKeys, "numContainers", sum4); if (sum4 > closure_1_21(containerItemKeys, "numContainersPooled")) { tmp364(tmp366, "numContainersPooled", (function getExpandedContainerPoolSize(length, sum4) { num = 0; if (length > 0) { num = 0; if (sum4 > 0) { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const _Math4 = Math; const bound = Math.max(length, sum4); num = Math.min(bound, Math.max(sum4, Math.ceil(1.5 * sum4))); } } return num; })(length, sum4)); } tmp364 = context; tmp366 = containerItemKeys; } } tmp233 = state; const userScrollAnchorReset2 = state.userScrollAnchorReset; let size; if (null != userScrollAnchorReset2) { size = userScrollAnchorReset2.keys.size; } if (0 === size) { tmp233.userScrollAnchorReset = undefined; } tmp476 = set1; } } if (tmp233.stickyContainerPool.size > 0) { let currentStickyIdx1; if (null != stickyState) { currentStickyIdx1 = stickyState.currentStickyIdx; } let num30 = -1; if (null != currentStickyIdx1) { num30 = currentStickyIdx1; } (function handleStickyRecycling(containerItemKeys, prop, arg2, arg3, currentStickyIdx1, items, isPinnedRenderIndex) { state = containerItemKeys.state; const iter = state.stickyContainerPool[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { let tmp2 = nextResult; let _HermesInternal = HermesInternal; let tmp4 = length(containerItemKeys, "containerItemKey" + nextResult); value = undefined; if (tmp4) { let indexByKey = state.indexByKey; value = indexByKey.get(tmp5); } let tmp8 = value; if (undefined !== value) { if (!isPinnedRenderIndex(tmp8)) { let index = prop.indexOf(tmp8); let tmp11 = index; if (-1 !== index) { if (tmp11 < currentStickyIdx1 - 1) { let tmp19 = prop[tmp11 + 1]; flag = false; if (tmp19) { let tmp45 = state.positions[tmp20]; let tmp47 = undefined !== tmp45; if (tmp47) { tmp47 = arg2 > tmp46 + 2 * arg3; } flag = tmp47; } else { let tmp22 = state.idCache[tmp8]; if (null != tmp22) { let tmp26 = tmp22; } else { tmp26 = closure_1_49(state, tmp8); } let tmp27 = tmp26; if (tmp26) { let tmp29 = state.positions[tmp8]; let sizes = state.sizes; value2 = sizes.get(tmp27); if (null != value2) { } else { let tmp38 = closure_1_58(containerItemKeys, tmp27, value, state.props.data[tmp8]); } let tmp41 = undefined !== tmp29; if (tmp41) { tmp41 = arg2 > tmp29 + tmp39 + 3 * arg3; } flag = tmp41; } } if (flag) { let arr = items.push(tmp2); } } } else { let stickyContainerPool = state.stickyContainerPool; let deleteResult = stickyContainerPool.delete(tmp2); let _HermesInternal2 = HermesInternal; let tmp15 = bound2(containerItemKeys, "containerSticky" + tmp2, false); } } } continue; } })(containerItemKeys, prop, closure_12, tmp9, num30, items, isPinnedRenderIndex); } if (items.length > 0) { const _Set4 = Set; const set3 = new Set(items); } let num32 = 0; let flag5 = false; if (0 < sum4) { do { let tmp398 = containerItemKeys; let _HermesInternal8 = HermesInternal; let tmp399 = closure_1_21(containerItemKeys, "containerItemKey" + num32); let hasItem1; let tmp400 = num32; if (null != set3) { hasItem1 = set3.has(num32); } if (hasItem1) { if (undefined !== tmp399) { let deleteResult2 = containerItemKeys.delete(tmp399); if (null == set2) { let _Set5 = Set; let tmp408 = new.target; let tmp409 = new.target; set2 = new Set(); } let addResult6 = set2.add(num32); let tmp414 = state.containerItemGenerations[num32]; let num33 = 0; if (null != tmp414) { num33 = tmp414; } state.containerItemGenerations[num32] = num33 + 1; } let containerItemMetadata2 = state.containerItemMetadata; let tmp416 = state; let deleteResult3 = containerItemMetadata2.delete(num32); let stickyContainerPool3 = state.stickyContainerPool; if (stickyContainerPool3.has(num32)) { let _HermesInternal9 = HermesInternal; let tmp421 = context(tmp398, "containerSticky" + num32, false); let stickyContainerPool4 = tmp416.stickyContainerPool; let deleteResult4 = stickyContainerPool4.delete(num32); } let _HermesInternal10 = HermesInternal; let tmp427 = context(tmp398, "containerItemKey" + num32, undefined); let _HermesInternal11 = HermesInternal; let tmp428 = context(tmp398, "containerItemIndex" + num32, undefined); let _HermesInternal12 = HermesInternal; let tmp429 = context(tmp398, "containerItemData" + num32, undefined); let _HermesInternal13 = HermesInternal; let tmp431 = context(tmp398, "containerPosition" + num32, hasHadNonEmptyData); let _HermesInternal14 = HermesInternal; let tmp432 = context(tmp398, "containerColumn" + num32, -1); let _HermesInternal15 = HermesInternal; let tmp433 = context(tmp398, "containerSpan" + num32, 1); let tmp404 = flag5; } else { let value6 = indexByKey.get(tmp399); tmp404 = flag5; if (undefined !== value6) { let obj4 = { scrollAdjustPending: null, updateLayout: true }; obj4.scrollAdjustPending = num; let tmp405 = closure_1_88(tmp398, tmp400, value6, obj4).didChangePosition || flag5; tmp404 = tmp405; } } num32 = num32 + 1; flag5 = tmp404; } while (num32 < sum4); } let tmp435 = set2; if (set2) { tmp435 = overrideItemLayout; } if (tmp435) { closure_1_87(containerItemKeys, set2); } if (!tmp13) { closure_1_84(containerItemKeys); } else { closure_1_102(state, obj2.startNoBuffer); if (!queuedInitialLayout) { if (!tmp442.didContainersLayout) { if (closure_1_41(tmp442)) { let tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } else { tmp447Result = tmp447(tmp442, tmp442.startNoBuffer, tmp442.endNoBuffer); if (!tmp447Result) { tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } } if (tmp447Result) { (function setDidLayout(containerItemKeys) { containerItemKeys.state.queuedInitialLayout = true; closure_1_42(containerItemKeys); closure_1_47(containerItemKeys, { didLayout: true }); })(containerItemKeys); (function handleInitialScrollLayoutReady(containerItemKeys) { closure_0 = containerItemKeys; if (containerItemKeys.state.initialScroll) { closure_76(containerItemKeys, { forceScroll: true }); const initialScrollSession = containerItemKeys.state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("offset" !== kind) { const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(function runScroll() { return closure_2_76(closure_0, { forceScroll: true }); }); } closure_129_0 = containerItemKeys; const scrollingTo = containerItemKeys.state.scrollingTo; { let isInitialScroll; if (null != scrollingTo) { isInitialScroll = scrollingTo.isInitialScroll; } } } })(containerItemKeys); } } } let tmp455 = viewabilityConfigCallbackPairs; if (viewabilityConfigCallbackPairs) { tmp455 = null !== obj2.startNoBuffer; } if (tmp455) { tmp455 = null !== obj2.endNoBuffer; } if (tmp455) { state = containerItemKeys.state; ({ startNoBuffer, endNoBuffer } = obj2); if (null == startNoBuffer1) { startNoBuffer1 = obj2.startNoBuffer; } if (null == endNoBuffer1) { endNoBuffer1 = obj2.endNoBuffer; } closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, startNoBuffer1, endNoBuffer1); } let prop2; if (null != stickyState) { prop2 = stickyState.finishCalculateItemsInView; } if (null != prop2) { const call2 = prop2.call; if (typeof call2 === "unknown") { prop2(); } else { call2(stickyState); } } } tmp109 = closure_1_21; tmp111 = containerItemKeys; const tmp15Result = tmp15(tmp7, "stylePaddingTop"); tmp214 = state; } } } }); } if (!tmp14) { tmp14 = tmp12 !== otherAxisSize2; } if (tmp14) { const size1 = { height: null, width: null }; ({ height: obj3.height, width: obj3.width } = point); set$(tmp2, "scrollSize", size1); } let onLayout; if (null != maintainScrollAtEnd) { onLayout = maintainScrollAtEnd.onLayout; } if (onLayout) { doMaintainScrollAtEnd(tmp2); } checkThresholds(tmp2); if (!state) { let tmp34 = closure_31; let tmp35 = closure_31; if (closure_31) { tmp35 = 0 === tmp11; } if (tmp35) { if (state.props.horizontal) { str = "width"; } const _HermesInternal = HermesInternal; const combined = "List " + str + " is 0. You may need to set a style or `flex: ` for the list, because children are absolutely positioned."; if (tmp34) { tmp34 = !set.has("height0"); } if (tmp34) { set.add("height0"); const _console = console; const _HermesInternal2 = HermesInternal; console.warn("[legend-list] " + combined); } } } else { let props2 = state.props; if (state.props.horizontal) { props2 = state.props.stylePaddingBottom || 0; let sum = (props2.stylePaddingTop || 0) + props2; const tmp33 = props2.stylePaddingTop || 0; } else { sum = (props2.stylePaddingLeft || 0) + (state.props.stylePaddingRight || 0); const tmp30 = props2.stylePaddingLeft || 0; const tmp31 = state.props.stylePaddingRight || 0; } state.needsOtherAxisSize = tmp12 - sum < 10; } } listen$(true); maybeUpdateAnchoredEndSpace(context); let tmp45 = closure_18; if (closure_18) { tmp45 = !arg1; } if (tmp45) { tmp45 = tmp43; } if (tmp45) { const state2 = tmp2.state; ({ initialScroll, initialScrollSession } = state2); let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("bootstrap" === kind) { const bootstrap = state2.initialScrollSession.bootstrap; } if (initialScroll) { if (state2.props.data.length > 0) { const initialScrollSession2 = state2.initialScrollSession; let kind1; if (null != initialScrollSession2) { kind1 = initialScrollSession2.kind; } if ("offset" !== kind1) { if (bootstrap) { const tmp51 = resolveInitialScrollOffset(tmp2, initialScroll); const scrollingTo = state2.scrollingTo; let isInitialScroll; if (null != scrollingTo) { isInitialScroll = scrollingTo.isInitialScroll; } if (isInitialScroll) { const scrollingTo2 = state2.scrollingTo; } if (!bootstrap) { if (scrollingTo2) { let offset = scrollingTo2.targetOffset; if (null == offset) { offset = scrollingTo2.offset; } let tmp54 = offset; } else { current = state2.refScroller.current; let prop; if (null != current) { prop = current.getCurrentScrollOffset; } if (null == prop) { if (typeof tmp54 !== "number") { let scroll = state2.scrollPending; if (null == scroll) { scroll = state2.scroll; } num4 = 0; if (null != scroll) { num4 = scroll; } tmp54 = num4; } else { const _Number = Number; } } else { const call = prop.call; typeof call === "unknown" ? prop() : call(current); } } const diff = tmp51 - tmp54; let _Math = Math; if (Math.abs(diff) > 1) { if (state2.didFinishInitialScroll) { if (undefined !== getPreservedEndAnchorOffsetDiff(tmp2)) { obj4 = {}; closure_0 = tmp2; state3 = tmp2.state; state3.preservedEndAnchorCorrection = obj4; let _requestAnimationFrame = requestAnimationFrame; let animationFrame = requestAnimationFrame(() => { const preservedEndAnchorCorrection = state3.preservedEndAnchorCorrection; if (preservedEndAnchorCorrection === obj4) { const tmp10 = getPreservedEndAnchorOffsetDiff(closure_0); if (undefined !== tmp10) { const _Math = Math; if (Math.abs(tmp10) > 1) { const lastRequestTime = preservedEndAnchorCorrection.lastRequestTime; let tmp4 = !lastRequestTime; if (lastRequestTime) { const lastNativeScrollTime = tmp.lastNativeScrollTime; let num = 0; if (null != lastNativeScrollTime) { num = lastNativeScrollTime; } tmp4 = num > preservedEndAnchorCorrection.lastRequestTime; } if (tmp4) { const _Date = Date; preservedEndAnchorCorrection.lastRequestTime = Date.now(); requestAdjust(tmp9, tmp10); } closure_0 = tmp9; closure_1 = tmp2; state = tmp9.state; state.preservedEndAnchorCorrection = tmp2; const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(() => { const preservedEndAnchorCorrection = state3.preservedEndAnchorCorrection; if (preservedEndAnchorCorrection === obj4) { const tmp10 = getPreservedEndAnchorOffsetDiff(closure_0); if (undefined !== tmp10) { const _Math = Math; if (Math.abs(tmp10) > 1) { const lastRequestTime = preservedEndAnchorCorrection.lastRequestTime; let tmp4 = !lastRequestTime; if (lastRequestTime) { const lastNativeScrollTime = tmp.lastNativeScrollTime; let num = 0; if (null != lastNativeScrollTime) { num = lastNativeScrollTime; } tmp4 = num > preservedEndAnchorCorrection.lastRequestTime; } if (tmp4) { const _Date = Date; preservedEndAnchorCorrection.lastRequestTime = Date.now(); requestAdjust(tmp9, tmp10); } closure_0 = tmp9; closure_1 = tmp2; state = tmp9.state; state.preservedEndAnchorCorrection = tmp2; const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(() => { const preservedEndAnchorCorrection = state3.preservedEndAnchorCorrection; if (preservedEndAnchorCorrection === obj4) { const tmp10 = getPreservedEndAnchorOffsetDiff(closure_0); if (undefined !== tmp10) { const _Math = Math; if (Math.abs(tmp10) > 1) { const lastRequestTime = preservedEndAnchorCorrection.lastRequestTime; let tmp4 = !lastRequestTime; if (lastRequestTime) { const lastNativeScrollTime = tmp.lastNativeScrollTime; let num = 0; if (null != lastNativeScrollTime) { num = lastNativeScrollTime; } tmp4 = num > preservedEndAnchorCorrection.lastRequestTime; } if (tmp4) { const _Date = Date; preservedEndAnchorCorrection.lastRequestTime = Date.now(); requestAdjust(tmp9, tmp10); } closure_0 = tmp9; closure_1 = tmp2; state = tmp9.state; state.preservedEndAnchorCorrection = tmp2; const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(() => { ... }); } } tmp.preservedEndAnchorCorrection = undefined; } }); } } tmp.preservedEndAnchorCorrection = undefined; } }); } } tmp.preservedEndAnchorCorrection = undefined; } }); } } else if (scrollingTo2) { value2 = closure_37.get(state2); scrollingTo2.offset = tmp51; scrollingTo2.targetOffset = tmp51; const obj5 = {}; const merged1 = Object.assign(initialScroll); obj5.contentOffset = tmp51; state2.initialScroll = obj5; state2.hasScrolled = false; let startScroll; if (null != value2) { startScroll = value2.startScroll; } if (null == startScroll) { startScroll = state2.scroll; } obj6 = { startScroll, targetOffset: tmp51 }; const result = closure_37.set(state2, obj6); requestAdjust(tmp2, diff); } } } const obj7 = { scroll: tmp51, targetIndexSeed: initialScroll.index }; rearmBootstrapInitialScroll(tmp2, obj7); } } } } } if (!closure_18) { advanceCurrentInitialScrollSession(tmp2); } }, items14), onLayoutProp: onLayout, ref }; f101429 = undefined; measureInLayoutEffect = undefined; onLayoutProp = undefined; onLayoutChange = undefined; ({ ref: f101429, measureInLayoutEffect } = obj25); if (measureInLayoutEffect === undefined) { measureInLayoutEffect = true; } onLayoutProp = obj25.onLayoutProp; onLayoutChange = obj25.onLayoutChange; const items15 = [onLayoutChange, onLayoutProp]; const callback2 = obj23.useCallback((nativeEvent) => { onLayoutChange(nativeEvent.nativeEvent.layout, false); if (null != onLayoutProp) { onLayoutProp(nativeEvent); } }, items15); if (overrideItemLayout) { const items16 = [measureInLayoutEffect]; HermesBuiltin.arraySpread([], 1); const layoutEffect4 = obj23.useLayoutEffect(() => { current = measureInLayoutEffect; if (measureInLayoutEffect) { current = f101429.current; } if (current) { const current2 = f101429.current; current2.measure((x, y, width, height) => { const size = { height, width, x, y }; onLayoutChange(size, true); }); } }, items16); } const items17 = [snapToIndices]; const layoutEffect5 = obj.useLayoutEffect(() => { if (snapToIndices) { state = context.state; snapToIndices = state.props.snapToIndices; if (state.props.horizontal) { const tmp2 = getContentSize(tmp); } const _Array = Array; const ArrayResult = Array(snapToIndices.length); for (let num4 = 0; num4 < snapToIndices.length; num4 = num4 + 1) { let tmp6 = snapToIndices[num4]; ({ data, keyExtractor } = state.props); if (data) { let tmp8 = null; if (tmp6 < data.length) { let keyExtractorResult = tmp6; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp6], tmp6); } tmp8 = keyExtractorResult; } state.idCache[tmp6] = tmp8; } ArrayResult[num4] = toNativeHorizontalOffset(state, state.positions[tmp6], tmp2); } set$(context, "snapToOffsets", ArrayResult); } }, items17); const items18 = [dataKey, dataVersion, memo1.join(","), num4, num15, tmp39, tmp38, tmp15]; const layoutEffect6 = obj.useLayoutEffect(() => { initializeStateVars(true); }, items18); const items19 = [data, dataKey, dataVersion, num4, num15]; const layoutEffect7 = obj.useLayoutEffect(() => { ({ didColumnsChange, didDataChange } = current); let data = current.props.data; let isFirst = data.length > 0; if (isFirst) { isFirst = doInitialAllocateContainers(context); } if (!isFirst) { isFirst = current.isFirst; } if (!isFirst) { let tmp8 = !didDataChange; if (!didDataChange) { tmp8 = !didColumnsChange; } isFirst = tmp8; } if (!isFirst) { let obj = { didColumnsChange }; flag = obj.didColumnsChange; if (flag === undefined) { flag = false; } state = tmp9.state; const previousData = state.previousData; const maintainScrollAtEnd = state.props.maintainScrollAtEnd; if (flag) { let sizes = state.sizes; sizes.clear(); const sizesKnown = state.sizesKnown; sizesKnown.clear(); invalidateContainerFixedItemSizes(state); for (const key10030 in state.averageSizes) { let averageSizes = state.averageSizes; delete tmp3[tmp4]; continue; } state.minIndexSizeChanged = 0; state.scrollForNextCalculateItemsInView = undefined; } closure_0 = tmp9; closure_1 = { dataChanged: true, doMVCP: true }; state = tmp9.state; fn(() => { let set2; let tmp163; let tmp164; let containerItemKeys = state.containerItemKeys; ({ enableScrollForNextCalculateItemsInView, idCache } = state); ({ indexByKey, minIndexSizeChanged, positions, props } = state); ({ alwaysRenderIndicesArr, alwaysRenderIndicesSet: state, getItemType } = props); ({ keyExtractor, onStickyHeaderChange: closure_4 } = props); ({ scrollForNextCalculateItemsInView, scrollLength } = state); ({ sizes, startBufferedId, viewabilityConfigCallbackPairs } = state); const data = state.props.data; let prop = state.props.stickyHeaderIndicesArr; if (!prop) { prop = []; } let stickyHeaderIndicesSet = tmp2.props.stickyHeaderIndicesSet; if (!stickyHeaderIndicesSet) { let _Set = Set; stickyHeaderIndicesSet = new Set(); } let tmp9 = closure_1_46(containerItemKeys, idCache.drawDistanceMode); ({ dataChanged, doMVCP, forceFullItemPositions } = idCache); let initialScrollSession = tmp2.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } let bootstrap; if ("bootstrap" === kind) { bootstrap = tmp2.initialScrollSession.bootstrap; } let tmp16 = closure_1_21(containerItemKeys, "numContainers"); if (data) { if (0 !== scrollLength) { if (tmp16) { closure_8 = ref2(tmp7); let sum = tmp15(tmp7, "stylePaddingTop") + tmp15(tmp7, "alignItemsAtEndPadding"); closure_9 = sum + tmp15(tmp7, "headerSize"); const tmp15Result3 = tmp15(tmp7, "numColumns"); let scrollVelocity = idCache.scrollVelocity; if (null == scrollVelocity) { scrollVelocity = closure_1_69(tmp2); } ({ initialScroll, queuedInitialLayout } = tmp2); if (!tmp13) { let scroll1; if (null != bootstrap) { scroll1 = bootstrap.scroll; } if (null == scroll1) { scroll1 = tmp2.scroll; } let scroll = scroll1; } else { if (!queuedInitialLayout) { if (closure_1_41(tmp2)) { if (initialScroll) { scroll = closure_1_75(tmp7, initialScroll); } } } scroll = tmp2.scroll; } let num = 0; closure_11 = 0; closure_12 = 0; closure_13 = 0; closure_14 = 0; scrollBottomBuffered = 0; closure_16 = scroll; function updateScroll2(scroll) { closure_16 = scroll; values = values.values; value = values.get("scrollAdjustPending"); num = 0; if (null != value) { num = value; } closure_11 = num - closure_9; const rounded = Math.round(scroll + closure_11); closure_12 = rounded; if (rounded + scrollLength > closure_8) { const _Math = Math; closure_12 = Math.max(0, tmp4 - tmp3); } } updateScroll2(scroll); const tmp15Result4 = tmp15(tmp7, "activeStickyIndex"); closure_17 = tmp15Result4; function resolveStickyState() { num = -1; let num2 = -1; if (prop.length > 0) { let diff = arr.length - 1; let tmp5 = num; if (0 <= diff) { while (true) { let tmp6 = tmp3[arr[diff]]; if (undefined === tmp6) { diff = diff - 1; tmp5 = num; if (0 > diff) { break; } } else { tmp5 = diff; if (tmp >= tmp6) { break; } } break; } } num2 = tmp5; } if (0 <= num2) { num = arr[num2]; } let tmp8 = num2 >= 0; if (0 > num2) { tmp8 = tmp9 >= 0; } if (tmp8) { context(containerItemKeys, "activeStickyIndex", num); } let obj = { currentStickyIdx: num2, finishCalculateItemsInView: null }; finishCalculateItemsInView = undefined; if (closure_4) { if (arr.length > 0) { if (tmp9 !== num) { finishCalculateItemsInView = () => { if (undefined !== data[num]) { if (null != closure_2_4) { const obj = { index: tmp, item: tmp2 }; tmp3(obj); } } }; } } } obj.finishCalculateItemsInView = finishCalculateItemsInView; return obj; } if (!dataChanged) { let stickyState = resolveStickyState(); } let result2 = tmp9; let result3 = tmp9; if (scrollVelocity > 0) { let result = 0.5 * tmp9; const result1 = 1.5 * tmp9; result3 = result1; result2 = result; } else { if (0 === scrollVelocity) { let _Math = Math; num = 50; } result2 = 1.5 * tmp9; result3 = 0.5 * tmp9; } let num6 = 0; if (!dataChanged) { num6 = 0; if (!forceFullItemPositions) { num6 = 0; if (!tmp25) { num6 = 0; if (!closure_1_41(tmp2)) { num6 = 0; if (!tmp2.scrollingTo) { num6 = 0; if (!tmp2.pendingNativeMVCPAdjust) { num6 = 0; if (tmp15(tmp7, "readyToRender")) { let _Math2 = Math; num6 = (function getProjectedBufferAdjustment(scrollVelocity, arg1) { if (arg1 <= 0) { return 0; } else { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const bound = Math.min(1, Math.abs(scrollVelocity) / 4); return Math.sign(scrollVelocity) * arg1 * bound; } })(scrollVelocity, Math.min(result2, result3)); } } } } } } } function updateScrollRange() { const bound = Math.max(0, closure_12); closure_14 = Math.max(bound, closure_12 + scrollLength + Math.max(0, -closure_16)); closure_13 = bound - result2 + num6; closure_15 = closure_14 + result3 + num6; } updateScrollRange(); if (0 !== num6) { (function scheduleRenderRangeProjectionSettle(containerItemKeys) { state = containerItemKeys.state; const timeoutRenderRangeProjectionSettle = state.timeoutRenderRangeProjectionSettle; if (undefined !== timeoutRenderRangeProjectionSettle) { const _clearTimeout = clearTimeout; clearTimeout(timeoutRenderRangeProjectionSettle); let timeouts = state.timeouts; timeouts.delete(timeoutRenderRangeProjectionSettle); } const timerId = setTimeout(() => { state.timeoutRenderRangeProjectionSettle = undefined; const timeouts = state.timeouts; timeouts.delete(timerId); state.scrollHistory.length = 0; const triggerCalculateItemsInView = state.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(); } else { call(state); } } }, 100); state.timeoutRenderRangeProjectionSettle = timerId; const timeouts2 = state.timeouts; timeouts2.add(timerId); })(tmp7); } if (enableScrollForNextCalculateItemsInView) { if (!tmp25) { if (!dataChanged) { if (!forceFullItemPositions) { if (scrollForNextCalculateItemsInView) { ({ top, bottom } = scrollForNextCalculateItemsInView); if (null === top) { if (null === bottom) { tmp2.scrollForNextCalculateItemsInView = undefined; } } if (null === top) { if (viewabilityConfigCallbackPairs) { (function updateViewabilityForCachedRange(containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, arg3, arg4) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { let tmp7 = null; let sum1; let tmp9 = null; if (startBuffered <= endBuffered) { let tmp3 = null; let tmp5 = null; let tmp6 = startBuffered; tmp7 = null; tmp9 = null; if (startBuffered < data1.length) { while (true) { let tmp10 = tmp[tmp6]; let tmp11 = tmp3; let tmp12 = tmp4; let tmp13 = tmp5; let tmp14 = tmp6; if (null == tmp10) { ({ data, keyExtractor } = state.props); let str2 = ""; if (data) { let tmp15 = null; if (tmp6 < data.length) { let keyExtractorResult = tmp6; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp6], tmp6); } tmp15 = keyExtractorResult; } state.idCache[tmp6] = tmp15; str2 = tmp15; } tmp10 = str2; } value = sizes.get(tmp10); if (null == value) { value = closure_1_58(containerItemKeys, tmp18, tmp14, data1[tmp6]); } let tmp23 = tmp2[tmp6]; let tmp24 = null === tmp11 && tmp23 + value > arg3; if (tmp24) { tmp11 = tmp6; } let tmp25 = undefined === tmp12 && tmp23 >= arg3 - 10 && tmp23 <= arg4; if (tmp25) { tmp12 = tmp6; } let tmp26 = tmp13; flag = false; if (null !== tmp11) { flag2 = true; if (tmp23 <= arg4) { tmp13 = tmp6; flag2 = false; } tmp26 = tmp13; flag = flag2; } tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (flag) { break; } else { let sum = tmp6 + 1; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; if (sum > endBuffered) { break; } else { tmp3 = tmp11; tmp4 = tmp12; tmp5 = tmp26; tmp7 = tmp11; sum1 = tmp12; tmp9 = tmp26; tmp6 = sum; if (sum >= data1.length) { break; } } } } } } const obj = { endNoBuffer: tmp9, firstFullyOnScreenIndex: sum1, idsInView: null, startNoBuffer: null }; if (null == sum1) { sum1 = tmp7; } const items = []; if (null != sum1) { if (null !== tmp9) { if (sum1 <= tmp9) { do { let tmp29 = state.idCache[sum1]; if (null == tmp29) { ({ data: data2, keyExtractor: keyExtractor2 } = state.props); let str4 = ""; if (data2) { let tmp31 = null; if (sum1 < data2.length) { let keyExtractor2Result = sum1; if (keyExtractor2) { keyExtractor2Result = keyExtractor2(data2[sum1], sum1); } tmp31 = keyExtractor2Result; } state.idCache[sum1] = tmp31; str4 = tmp31; } tmp29 = str4; } let arr = items.push(tmp29); sum1 = sum1 + 1; } while (sum1 <= tmp9); } } } obj.idsInView = items; obj.startNoBuffer = tmp7; const merged = Object.assign(state, obj); closure_1_102(state, tmp7); if (tmp37) { closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, tmp7, tmp9, startBuffered, endBuffered); } tmp37 = null !== tmp7 && null !== tmp9; } } } } })(tmp7, viewabilityConfigCallbackPairs, scrollLength, closure_12, closure_14); } else if (tmp2.props.onFirstVisibleItemChanged) { closure_1_102(tmp2, (function findFirstVisibleIndexInCachedRange(containerItemKeys, arg1) { state = containerItemKeys.state; const endBuffered = state.endBuffered; const data1 = state.props.data; ({ sizes, startBuffered } = state); if (null !== startBuffered) { if (null !== endBuffered) { if (startBuffered >= 0) { if (endBuffered >= startBuffered) { if (startBuffered <= endBuffered) { if (startBuffered < data1.length) { while (true) { let tmp3 = tmp[startBuffered]; let tmp4 = startBuffered; if (null == tmp3) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp5 = null; if (startBuffered < data.length) { let keyExtractorResult = startBuffered; if (keyExtractor) { keyExtractorResult = keyExtractor(data[startBuffered], startBuffered); } tmp5 = keyExtractorResult; } state.idCache[startBuffered] = tmp5; str = tmp5; } tmp3 = str; } value = sizes.get(tmp3); let tmp9 = value; if (null == value) { tmp9 = closure_1_58(containerItemKeys, tmp8, tmp4, data1[startBuffered]); } if (tmp2[startBuffered] + tmp9 > arg1) { break; } else { let sum = startBuffered + 1; if (sum <= endBuffered) { startBuffered = sum; } } } return startBuffered; } } return null; } } } } return null; })(tmp7, closure_12)); } let prop1; if (null != stickyState) { prop1 = stickyState.finishCalculateItemsInView; } if (null != prop1) { let call = prop1.call; typeof call === "unknown" ? prop1() : call(stickyState); } } } } } } } let tmp73; if (doMVCP) { if (!tmp25) { tmp73 = closure_1_68(tmp7, dataChanged); } } if (dataChanged) { closure_1_86(tmp2); } let num8 = 0; if (!forceFullItemPositions) { num8 = 0; if (!dataChanged) { let startBuffered = minIndexSizeChanged; if (null == minIndexSizeChanged) { startBuffered = tmp2.startBuffered; } let num9 = 0; if (null != startBuffered) { num9 = startBuffered; } num8 = num9; } } let obj = { doMVCP, forceFullUpdate: forceFullItemPositions, optimizeForVisibleWindow: null, scrollBottomBuffered: null, scrollVelocity: null, startIndex: null }; let tmp82 = !forceFullItemPositions; if (!forceFullItemPositions) { tmp82 = !dataChanged; } if (tmp82) { tmp82 = tmp15Result3 > 1; } if (tmp82) { tmp82 = undefined !== minIndexSizeChanged; } obj.optimizeForVisibleWindow = tmp82; obj.scrollBottomBuffered = scrollBottomBuffered; obj.scrollVelocity = scrollVelocity; obj.startIndex = num8; closure_1_89(tmp7, dataChanged, obj); const tmp17Result = ref2(tmp7); closure_8 = tmp17Result; if (undefined !== minIndexSizeChanged) { tmp2.minIndexSizeChanged = undefined; } if (dataChanged) { if (doMVCP) { if (tmp2.props.maintainVisibleContentPosition.data) { if (tmp2.didContainersLayout) { if (tmp2.idsInView.length > 0) { const shouldRestorePosition = tmp2.props.maintainVisibleContentPosition.shouldRestorePosition; const _Set2 = Set; set = new Set(); const idsInView = tmp2.idsInView; for (const item10226 of idsInView) { let tmp99 = item10226; value = indexByKey.get(item10226); let tmp101 = value; if (undefined !== value) { let tmp102 = shouldRestorePosition; if (shouldRestorePosition) { tmp102 = !shouldRestorePosition(data[tmp101], tmp101, data); } if (!tmp102) { let addResult = set.add(tmp99); } } continue; } } } } } } const tmp112 = closure_1_21(containerItemKeys, "scrollAdjustPending"); let num11 = 0; if (null != tmp112) { num11 = tmp112; } if (null != tmp73) { tmp73(); } let tmp114 = tmp73; if (tmp114) { let tmp116 = tmp107.scroll !== state.scroll; if (!tmp116) { const tmp109Result = tmp109(tmp111, "scrollAdjustPending"); let num12 = 0; if (null != tmp109Result) { num12 = tmp109Result; } tmp116 = num12 !== num11; } tmp114 = tmp116; } if (tmp114) { updateScroll2(tmp107.scroll); updateScrollRange(); } if (dataChanged) { stickyState = resolveStickyState(); } let tmp123; if (!tmp13) { let targetIndexSeed; if (null != bootstrap) { targetIndexSeed = bootstrap.targetIndexSeed; } tmp123 = targetIndexSeed; } if (null == tmp123) { let num13 = !dataChanged; if (!dataChanged) { num13 = startBufferedId; } if (num13) { num13 = indexByKey.get(startBufferedId); } if (!num13) { num13 = 0; } tmp123 = num13; } let diff = tmp123; let tmp126 = tmp123; let tmp127 = tmp123; if (tmp123 >= 0) { while (true) { let tmp128 = idCache[diff]; let tmp129 = diff; if (null == tmp128) { tmp128 = closure_1_49(state, diff); } let value4 = sizes.get(tmp128); if (null == value4) { value4 = closure_1_58(containerItemKeys, tmp135, tmp129, data[diff]); } tmp127 = tmp126; if (positions[diff] + value4 <= closure_13) { break; } else { diff = diff - 1; tmp126 = tmp129; tmp127 = tmp129; if (diff < 0) { break; } } } } let tmp143 = tmp127; if (tmp15Result3 > 1) { let diff1 = tmp127; tmp143 = tmp127; if (tmp127 > 0) { tmp143 = diff1; while (1 !== state.columns[diff1]) { tmp143 = diff1; if (undefined === tmp145) { break; } else { diff1 = diff1 - 1; tmp143 = diff1; if (0 >= diff1) { break; } } } } } let num16 = 0; let num17 = 0; let num18 = 0; if (0 < tmp16) { do { let _HermesInternal = HermesInternal; let tmp152 = closure_1_21(containerItemKeys, "containerItemKey" + num16); let bound = num17; if (undefined !== tmp152) { let _Math3 = Math; bound = Math.max(num17, indexByKey.get(tmp152)); } num16 = num16 + 1; num17 = bound; num18 = bound; } while (num16 < tmp16); } let obj2 = { endNoBuffer: null, firstFullyOnScreenIndex: "Array", startNoBuffer: -1 }; const length = data.length; let _Math4 = Math; const bound1 = Math.max(0, tmp143); let tmp157 = bound1; let flag3 = false; let tmp160 = null; let tmp161 = null; let tmp162 = null; let endNoBuffer1 = null; let tmp166 = null; let startNoBuffer1 = null; if (bound1 < length) { while (true) { let tmp168 = idCache[tmp157]; let tmp169 = tmp157; let tmp171 = tmp158; let tmp172 = tmp159; let tmp173 = tmp160; let tmp174 = tmp161; let tmp175 = tmp162; if (null == tmp168) { tmp168 = closure_1_49(state, tmp157); } let value5 = sizes.get(tmp168); if (null == value5) { value5 = closure_1_58(containerItemKeys, tmp180, tmp169, data[tmp157]); } let tmp187 = positions[tmp157]; let tmp188 = tmp171; let tmp189 = tmp172; let tmp190 = tmp173; let tmp191 = tmp174; let tmp192 = tmp175; let tmp193 = flag3; if (!flag3) { let tmp201 = closure_1_100(obj2, tmp169, tmp187, value5, closure_12, closure_14); let tmp202 = null === tmp175; if (tmp202) { tmp202 = tmp187 + value5 > closure_13; } if (tmp202) { let tmp205 = null; if (closure_13 >= 0) { tmp205 = tmp187; } tmp172 = tmp205; tmp174 = tmp168; tmp175 = tmp157; } let tmp206 = flag3; let tmp207 = tmp171; let tmp208 = tmp173; if (null !== obj2.startNoBuffer) { let flag4 = true; if (tmp187 <= scrollBottomBuffered) { let sum1 = null; if (scrollBottomBuffered <= tmp17Result) { sum1 = tmp187 + value5; } tmp171 = sum1; flag4 = flag3; tmp173 = tmp157; } tmp206 = flag4; tmp207 = tmp171; tmp208 = tmp173; } tmp193 = tmp206; tmp188 = tmp207; tmp190 = tmp208; tmp189 = tmp172; tmp191 = tmp174; tmp192 = tmp175; } let sum2 = tmp157 + 1; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; if (sum2 >= length) { break; } else { tmp157 = sum2; flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; if (!tmp193) { continue; } else { flag3 = tmp193; tmp158 = tmp188; tmp159 = tmp189; tmp160 = tmp190; tmp161 = tmp191; tmp162 = tmp192; tmp163 = tmp188; tmp164 = tmp189; endNoBuffer1 = tmp190; tmp166 = tmp191; startNoBuffer1 = tmp192; tmp157 = sum2; if (sum2 > num18) { break; } } continue; } } } const _Object = Object; let obj3 = { endBuffered: endNoBuffer1, endNoBuffer: null, firstFullyOnScreenIndex: null, idsInView: null, startBuffered: null, startBufferedId: null, startNoBuffer: null }; ({ endNoBuffer: obj5.endNoBuffer, firstFullyOnScreenIndex: obj5.firstFullyOnScreenIndex } = obj2); obj3.idsInView = closure_1_101(state, obj2); obj3.startBuffered = startNoBuffer1; obj3.startBufferedId = tmp166; obj3.startNoBuffer = obj2.startNoBuffer; let merged = Object.assign(state, obj3); if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp164; } if (enableScrollForNextCalculateItemsInView) { enableScrollForNextCalculateItemsInView = undefined !== tmp163; } if (enableScrollForNextCalculateItemsInView) { if (!closure_1_54(tmp164)) { const rect = { bottom: tmp163, top: tmp164 }; const tmp219 = rect; } tmp214.scrollForNextCalculateItemsInView = tmp219; } let sum4 = tmp16; let items = []; if (dataChanged) { let num21 = 0; if (0 < sum4) { do { let _HermesInternal2 = HermesInternal; let tmp226 = closure_1_21(containerItemKeys, "containerItemKey" + num21); let tmp227 = !keyExtractor; if (keyExtractor) { let tmp229 = tmp226; if (tmp226) { tmp229 = undefined === indexByKey.get(tmp226); } tmp227 = tmp229; } if (tmp227) { let arr = items.push(num21); } num21 = num21 + 1; } while (num21 < sum4); } } let tmp233 = state; const scrollTargetPinnedRange = state.scrollTargetPinnedRange; let bound2 = 0; let bound3 = -1; let num23 = -1; let num24 = 0; if (scrollTargetPinnedRange) { const _Math5 = Math; const _Math6 = Math; bound2 = Math.max(0, Math.min(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); const _Math7 = Math; const _Math8 = Math; const diff2 = length - 1; bound3 = Math.min(diff2, Math.max(scrollTargetPinnedRange.start, scrollTargetPinnedRange.end)); num23 = bound3; num24 = bound2; } closure_24 = tmp237; function isPinnedRenderIndex(arg0) { let hasItem = set.has(arg0); if (!hasItem) { let tmp2 = closure_24; if (closure_24) { tmp2 = arg0 >= bound2; } if (tmp2) { tmp2 = arg0 <= bound3; } hasItem = tmp2; } return hasItem; } if (null !== startNoBuffer1) { if (null !== endNoBuffer1) { let items1 = []; const _Set6 = Set; const set1 = new Set(); function addPinnedIndex(bound2) { if (bound2 >= 0) { if (bound2 < length) { let tmp4 = idCache[bound2]; if (null == tmp4) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp2 = null; if (bound2 < data.length) { let keyExtractorResult = bound2; if (keyExtractor) { keyExtractorResult = keyExtractor(data[bound2], bound2); } tmp2 = keyExtractorResult; } tmp.idCache[bound2] = tmp2; str = tmp2; } tmp4 = str; } value = containerItemKeys.get(tmp4); if (undefined !== value) { const stickyContainerPool = state.stickyContainerPool; stickyContainerPool.add(value); } else { let hasItem = null == tmp4; if (!hasItem) { hasItem = set1.has(bound2); } if (!hasItem) { set1.add(bound2); items1.push(bound2); } } } } } let sum3 = startNoBuffer1; if (startNoBuffer1 <= endNoBuffer1) { do { let tmp238 = idCache[sum3]; if (null == tmp238) { tmp238 = closure_1_49(state, sum3); } if (!containerItemKeys.has(tmp238)) { let addResult1 = set1.add(sum3); let arr2 = items1.push(sum3); } sum3 = sum3 + 1; } while (sum3 <= endNoBuffer1); } for (const item10471 of alwaysRenderIndicesArr) { let addPinnedIndexResult = addPinnedIndex(item10471); continue; } if (tmp237) { if (num24 <= num23) { do { let addPinnedIndexResult1 = addPinnedIndex(num24); num24 = num24 + 1; } while (num24 <= num23); } } if (prop.length > 0) { let currentStickyIdx; if (null != stickyState) { currentStickyIdx = stickyState.currentStickyIdx; } let num25 = -1; if (null != currentStickyIdx) { num25 = currentStickyIdx; } (function handleStickyActivation(containerItemKeys, prop, currentStickyIdx, items1, set1, startNoBuffer1, endNoBuffer1) { state = containerItemKeys.state; num = -1; if (currentStickyIdx >= 0) { num = prop[currentStickyIdx]; } bound2(containerItemKeys, "activeStickyIndex", num); let num2 = 0; do { let diff = currentStickyIdx - num2; if (diff >= 0) { let tmp12 = prop[diff]; if (!closure_1_99(containerItemKeys, tmp12)) { let tmp5 = state.idCache[tmp12]; if (null == tmp5) { ({ data, keyExtractor } = state.props); let str = ""; if (data) { let tmp6 = null; if (tmp12 < data.length) { let keyExtractorResult = tmp12; if (keyExtractor) { keyExtractorResult = keyExtractor(data[tmp12], tmp12); } tmp6 = keyExtractorResult; } state.idCache[tmp12] = tmp6; str = tmp6; } tmp5 = str; } let tmp8 = tmp5; if (tmp5) { containerItemKeys = state.containerItemKeys; tmp8 = !containerItemKeys.has(tmp5); } if (tmp8) { let tmp9 = tmp12 < startNoBuffer1 || tmp12 > endNoBuffer1; tmp8 = tmp9; } if (tmp8) { tmp8 = !set1.has(tmp12); } if (tmp8) { let addResult = set1.add(tmp12); let arr = items1.push(tmp12); } } } num2 = num2 + 1; } while (num2 <= 1); })(containerItemKeys, prop, num25, items1, tmp476, startNoBuffer1, endNoBuffer1); } else if (-1 !== tmp15Result4) { context(containerItemKeys, "activeStickyIndex", -1); } if (items1.length > 0) { let fn; if (getItemType) { fn = (arg0) => { const tmp = getItemType(data[arg0], arg0); let str = ""; if (undefined !== tmp) { const _String = String; str = String(tmp); } return str; }; } const tmp275 = (function findAvailableContainers(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, set) { closure_0 = fn; if (0 === items1.length) { return []; } else { const tmp56 = length(containerItemKeys, "numContainers"); state = containerItemKeys.state; ({ containerItemMetadata: closure_2, stickyContainerPool } = state); set = undefined; if (items.length > 0) { const _Set = Set; set = new Set(items); } const mapped = items1.map((itemIndex, order) => { const obj = { isSticky: null, itemIndex, itemType: null, order: null }; const stickyHeaderIndicesSet = state.props.stickyHeaderIndicesSet; obj.isSticky = stickyHeaderIndicesSet.has(itemIndex); let tmp; if (null != closure_0) { tmp = closure_0(itemIndex); } obj.itemType = tmp; obj.order = order; return obj; }); const found = mapped.filter((isSticky) => !isSticky.isSticky); items = []; items1 = []; let num2 = 0; const found1 = mapped.filter((isSticky) => isSticky.isSticky); if (0 < tmp56) { while (true) { let _HermesInternal = HermesInternal; let tmp13 = length(containerItemKeys, "containerItemKey" + num2); let hasItem; if (null != set) { hasItem = set.has(num2); } let tmp16 = !hasItem; if (tmp13) { let hasItem1; if (null != set) { hasItem1 = set.has(tmp13); } if (hasItem1) { let indexByKey = state.indexByKey; } num2 = num2 + 1; if (num2 >= tmp56) { break; } } let tmp18 = !tmp16; if (stickyContainerPool.has(num2)) { let tmp22 = undefined === tmp13 || tmp18; if (tmp22) { let obj2 = { containerIndex: num2, distance: null }; let _Number2 = Number; obj2.distance = Number.POSITIVE_INFINITY; let arr = items1.push(obj2); } } else { if (undefined !== tmp13) { if (!tmp18) { if (!tmp) { let indexByKey2 = state.indexByKey; value = indexByKey2.get(tmp13); if (undefined !== value) { if (value < startNoBuffer1) { let obj = { containerIndex: num2, distance: value < startNoBuffer1 ? startNoBuffer1 - value : value - endNoBuffer1 }; let arr2 = items.push(obj); } } } } } let obj3 = { containerIndex: num2, distance: null }; let _Number = Number; obj3.distance = Number.POSITIVE_INFINITY; let arr3 = items.push(obj3); } } } const sorted = items.sort(closure_98); const _Array = Array; const array = new Array(length); let sum = tmp56; c5 = false; function assign(itemIndex, containerIndex) { array[itemIndex.order] = { containerIndex, itemIndex: itemIndex.itemIndex, itemType: itemIndex.itemType }; let deleteResult; if (null != set) { deleteResult = set.delete(containerIndex); } if (deleteResult) { c5 = true; } } function assignMatching(found, items, arg2) { closure_1 = arg2; function _loop2() { ... } const iter = found[Symbol.iterator](); while (iter !== undefined) { let _loop2Result = _loop2(iter.next()); continue; } } function assignFromPool(found, items, arg2) { if (closure_0) { assignMatching(found, items, /* F125837 */ function() { ... }); } assignMatching(found, items, /* F125838 */ function() { ... }); if (arg2) { assignMatching(found, items, /* F125839 */ function() { ... }); } } assignFromPool(found, items, true); assignFromPool(found1, items1, false); for (const item10099 of mapped) { let tmp36 = item10099; if (!array[item10099.order]) { let tmp38 = +sum; sum = tmp38 + 1; let tmp39 = tmp38; if (tmp36.isSticky) { let addResult = stickyContainerPool.add(tmp39); } let obj4 = assign(tmp36, tmp39); } continue; } if (c5) { items.length = 0; if (set) { for (const item10120 of set) { let arr7 = arg4.push(item10120); continue; } } } if (closure_31) { let POSITIVE_INFINITY = length(containerItemKeys, "numContainersPooled"); if (null == POSITIVE_INFINITY) { const _Number3 = Number; POSITIVE_INFINITY = Number.POSITIVE_INFINITY; } if (sum > POSITIVE_INFINITY) { const _console = console; const obj5 = { debugInfo: null }; const obj10 = { numContainers: tmp56, numContainersPooled: POSITIVE_INFINITY, numNeeded: length, stillNeeded: sum - tmp56 }; obj5.debugInfo = obj10; console.warn("[legend-list] No unused container available, so creating one on demand. This can be a minor performance issue and is likely caused by the estimatedItemSize being too large. Consider decreasing estimatedItemSize.", obj5); } } return array; } })(containerItemKeys, items1, startNoBuffer1, endNoBuffer1, items, fn, tmp88); let iter = tmp275[Symbol.iterator](); let nextResult = iter.next(); while (iter !== undefined) { let itemIndex = nextResult.itemIndex; let tmp281 = itemIndex; let containerIndex = nextResult.containerIndex; let tmp282 = idCache[itemIndex]; let tmp280 = nextResult; if (null != tmp282) { let tmp288 = tmp282; } else { tmp288 = closure_1_49(state, tmp281); } let tmp289 = tmp288; let tmp293 = containerItemKeys; let _HermesInternal3 = HermesInternal; let tmp291 = closure_1_21; let tmp295 = closure_1_21(containerItemKeys, "containerItemKey" + containerIndex); let tmp296 = tmp295; if (tmp295) { tmp295 = tmp296 !== tmp289; } if (tmp295) { let deleteResult = containerItemKeys.delete(tmp296); } if (tmp296 !== tmp289) { if (null == set2) { let _Set3 = Set; let tmp304 = new.target; let tmp305 = new.target; set2 = new Set(); } let addResult2 = set2.add(containerIndex); let tmp311 = state.containerItemGenerations[containerIndex]; let num28 = 0; if (null != tmp311) { num28 = tmp311; } state.containerItemGenerations[containerIndex] = num28 + 1; } let tmp314 = context; let _HermesInternal4 = HermesInternal; let tmp318 = context(tmp293, "containerItemKey" + containerIndex, tmp289); let _HermesInternal5 = HermesInternal; let tmp320 = context(tmp293, "containerItemIndex" + containerIndex, tmp281); let _HermesInternal6 = HermesInternal; let tmp321 = context(tmp293, "containerItemData" + containerIndex, data[tmp281]); let tmp323 = state; let containerItemMetadata = state.containerItemMetadata; let result4 = containerItemMetadata.set(containerIndex, ref3(state, itemIndex, data[tmp281], tmp280.itemType)); let result5 = containerItemKeys.set(tmp289, containerIndex); let userScrollAnchorReset = state.userScrollAnchorReset; if (null != userScrollAnchorReset) { let keys = tmp330.keys; let addResult3 = keys.add(tmp289); } let _HermesInternal7 = HermesInternal; let combined = "containerSticky" + containerIndex; let hasItem = stickyHeaderIndicesSet.has(tmp281); let isPinnedRenderIndexResult = isPinnedRenderIndex(tmp281); if (hasItem) { let tmp314Result = tmp314(tmp293, combined, true); let stickyContainerPool2 = tmp323.stickyContainerPool; let addResult4 = stickyContainerPool2.add(containerIndex); } else { if (tmp291(tmp293, combined)) { let tmp314Result2 = tmp314(tmp293, combined, false); } let stickyContainerPool = tmp323.stickyContainerPool; if (isPinnedRenderIndexResult) { let addResult5 = stickyContainerPool.add(containerIndex); } else { let deleteResult1 = stickyContainerPool.delete(containerIndex); } } if (containerIndex >= sum4) { sum4 = containerIndex + 1; } continue; } if (sum4 !== tmp16) { context(containerItemKeys, "numContainers", sum4); if (sum4 > closure_1_21(containerItemKeys, "numContainersPooled")) { tmp364(tmp366, "numContainersPooled", (function getExpandedContainerPoolSize(length, sum4) { num = 0; if (length > 0) { num = 0; if (sum4 > 0) { const _Math = Math; const _Math2 = Math; const _Math3 = Math; const _Math4 = Math; const bound = Math.max(length, sum4); num = Math.min(bound, Math.max(sum4, Math.ceil(1.5 * sum4))); } } return num; })(length, sum4)); } tmp364 = context; tmp366 = containerItemKeys; } } tmp233 = state; const userScrollAnchorReset2 = state.userScrollAnchorReset; let size; if (null != userScrollAnchorReset2) { size = userScrollAnchorReset2.keys.size; } if (0 === size) { tmp233.userScrollAnchorReset = undefined; } tmp476 = set1; } } if (tmp233.stickyContainerPool.size > 0) { let currentStickyIdx1; if (null != stickyState) { currentStickyIdx1 = stickyState.currentStickyIdx; } let num30 = -1; if (null != currentStickyIdx1) { num30 = currentStickyIdx1; } (function handleStickyRecycling(containerItemKeys, prop, arg2, arg3, currentStickyIdx1, items, isPinnedRenderIndex) { state = containerItemKeys.state; const iter = state.stickyContainerPool[Symbol.iterator](); const nextResult = iter.next(); while (iter !== undefined) { let tmp2 = nextResult; let _HermesInternal = HermesInternal; let tmp4 = length(containerItemKeys, "containerItemKey" + nextResult); value = undefined; if (tmp4) { let indexByKey = state.indexByKey; value = indexByKey.get(tmp5); } let tmp8 = value; if (undefined !== value) { if (!isPinnedRenderIndex(tmp8)) { let index = prop.indexOf(tmp8); let tmp11 = index; if (-1 !== index) { if (tmp11 < currentStickyIdx1 - 1) { let tmp19 = prop[tmp11 + 1]; flag = false; if (tmp19) { let tmp45 = state.positions[tmp20]; let tmp47 = undefined !== tmp45; if (tmp47) { tmp47 = arg2 > tmp46 + 2 * arg3; } flag = tmp47; } else { let tmp22 = state.idCache[tmp8]; if (null != tmp22) { let tmp26 = tmp22; } else { tmp26 = closure_1_49(state, tmp8); } let tmp27 = tmp26; if (tmp26) { let tmp29 = state.positions[tmp8]; let sizes = state.sizes; value2 = sizes.get(tmp27); if (null != value2) { } else { let tmp38 = closure_1_58(containerItemKeys, tmp27, value, state.props.data[tmp8]); } let tmp41 = undefined !== tmp29; if (tmp41) { tmp41 = arg2 > tmp29 + tmp39 + 3 * arg3; } flag = tmp41; } } if (flag) { let arr = items.push(tmp2); } } } else { let stickyContainerPool = state.stickyContainerPool; let deleteResult = stickyContainerPool.delete(tmp2); let _HermesInternal2 = HermesInternal; let tmp15 = bound2(containerItemKeys, "containerSticky" + tmp2, false); } } } continue; } })(containerItemKeys, prop, closure_12, tmp9, num30, items, isPinnedRenderIndex); } if (items.length > 0) { const _Set4 = Set; const set3 = new Set(items); } let num32 = 0; let flag5 = false; if (0 < sum4) { do { let tmp398 = containerItemKeys; let _HermesInternal8 = HermesInternal; let tmp399 = closure_1_21(containerItemKeys, "containerItemKey" + num32); let hasItem1; let tmp400 = num32; if (null != set3) { hasItem1 = set3.has(num32); } if (hasItem1) { if (undefined !== tmp399) { let deleteResult2 = containerItemKeys.delete(tmp399); if (null == set2) { let _Set5 = Set; let tmp408 = new.target; let tmp409 = new.target; set2 = new Set(); } let addResult6 = set2.add(num32); let tmp414 = state.containerItemGenerations[num32]; let num33 = 0; if (null != tmp414) { num33 = tmp414; } state.containerItemGenerations[num32] = num33 + 1; } let containerItemMetadata2 = state.containerItemMetadata; let tmp416 = state; let deleteResult3 = containerItemMetadata2.delete(num32); let stickyContainerPool3 = state.stickyContainerPool; if (stickyContainerPool3.has(num32)) { let _HermesInternal9 = HermesInternal; let tmp421 = context(tmp398, "containerSticky" + num32, false); let stickyContainerPool4 = tmp416.stickyContainerPool; let deleteResult4 = stickyContainerPool4.delete(num32); } let _HermesInternal10 = HermesInternal; let tmp427 = context(tmp398, "containerItemKey" + num32, undefined); let _HermesInternal11 = HermesInternal; let tmp428 = context(tmp398, "containerItemIndex" + num32, undefined); let _HermesInternal12 = HermesInternal; let tmp429 = context(tmp398, "containerItemData" + num32, undefined); let _HermesInternal13 = HermesInternal; let tmp431 = context(tmp398, "containerPosition" + num32, hasHadNonEmptyData); let _HermesInternal14 = HermesInternal; let tmp432 = context(tmp398, "containerColumn" + num32, -1); let _HermesInternal15 = HermesInternal; let tmp433 = context(tmp398, "containerSpan" + num32, 1); let tmp404 = flag5; } else { let value6 = indexByKey.get(tmp399); tmp404 = flag5; if (undefined !== value6) { let obj4 = { scrollAdjustPending: null, updateLayout: true }; obj4.scrollAdjustPending = num; let tmp405 = closure_1_88(tmp398, tmp400, value6, obj4).didChangePosition || flag5; tmp404 = tmp405; } } num32 = num32 + 1; flag5 = tmp404; } while (num32 < sum4); } let tmp435 = set2; if (set2) { tmp435 = overrideItemLayout; } if (tmp435) { closure_1_87(containerItemKeys, set2); } if (!tmp13) { closure_1_84(containerItemKeys); } else { closure_1_102(state, obj2.startNoBuffer); if (!queuedInitialLayout) { if (!tmp442.didContainersLayout) { if (closure_1_41(tmp442)) { let tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } else { tmp447Result = tmp447(tmp442, tmp442.startNoBuffer, tmp442.endNoBuffer); if (!tmp447Result) { tmp447Result = tmp447(tmp442, tmp442.startBuffered, tmp442.endBuffered); } } if (tmp447Result) { (function setDidLayout(containerItemKeys) { containerItemKeys.state.queuedInitialLayout = true; closure_1_42(containerItemKeys); closure_1_47(containerItemKeys, { didLayout: true }); })(containerItemKeys); (function handleInitialScrollLayoutReady(containerItemKeys) { closure_0 = containerItemKeys; if (containerItemKeys.state.initialScroll) { closure_76(containerItemKeys, { forceScroll: true }); const initialScrollSession = containerItemKeys.state.initialScrollSession; let kind; if (null != initialScrollSession) { kind = initialScrollSession.kind; } if ("offset" !== kind) { const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(function runScroll() { return closure_2_76(closure_0, { forceScroll: true }); }); } closure_129_0 = containerItemKeys; const scrollingTo = containerItemKeys.state.scrollingTo; { let isInitialScroll; if (null != scrollingTo) { isInitialScroll = scrollingTo.isInitialScroll; } } } })(containerItemKeys); } } } let tmp455 = viewabilityConfigCallbackPairs; if (viewabilityConfigCallbackPairs) { tmp455 = null !== obj2.startNoBuffer; } if (tmp455) { tmp455 = null !== obj2.endNoBuffer; } if (tmp455) { state = containerItemKeys.state; ({ startNoBuffer, endNoBuffer } = obj2); if (null == startNoBuffer1) { startNoBuffer1 = obj2.startNoBuffer; } if (null == endNoBuffer1) { endNoBuffer1 = obj2.endNoBuffer; } closure_1_91(state, containerItemKeys, viewabilityConfigCallbackPairs, scrollLength, startNoBuffer, endNoBuffer, startNoBuffer1, endNoBuffer1); } let prop2; if (null != stickyState) { prop2 = stickyState.finishCalculateItemsInView; } if (null != prop2) { const call2 = prop2.call; if (typeof call2 === "unknown") { prop2(); } else { call2(stickyState); } } } tmp109 = closure_1_21; tmp111 = containerItemKeys; const tmp15Result = tmp15(tmp7, "stylePaddingTop"); tmp214 = state; } } } }); let tmp16 = !flag; if (!flag) { let onDataChange; if (null != maintainScrollAtEnd) { onDataChange = maintainScrollAtEnd.onDataChange; } tmp16 = onDataChange; } if (tmp16) { tmp16 = doMaintainScrollAtEnd(tmp9); } let tmp20 = !tmp16; if (!tmp16) { tmp20 = previousData; } if (tmp20) { tmp20 = data.length > previousData.length; } if (tmp20) { state.isEndReached = false; } if (!tmp16) { checkThresholds(tmp9); } delete tmp2[tmp]; } if (didDataChange) { tmp5.pendingDataComparison = undefined; } current.didColumnsChange = false; current.didDataChange = false; current.isFirst = false; }, items19); const items20 = [extraData, overrideItemLayout, num4]; const layoutEffect8 = obj.useLayoutEffect(() => { set$(context, "extraData", onLayoutChange); ref3.current = overrideItemLayout; let tmp2 = overrideItemLayout; if (!overrideItemLayout) { tmp2 = ref3.current !== overrideItemLayout; } if (tmp2) { tmp2 = num4 > 1; } if (tmp2) { const triggerCalculateItemsInView = current.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; const obj = { forceFullItemPositions: true }; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(obj); } else { call(tmp4, obj); } } tmp4 = current; } }, items20); const items21 = [context, onMetricsChange]; const effect = obj.useEffect(() => { if (onMetricsChange) { let values = context.values; let obj = { footerSize: values.get("footerSize") || 0, headerSize: null }; let values2 = tmp2.values; const tmp3 = values.get("footerSize") || 0; obj.headerSize = values2.get("headerSize") || 0; let tmp5 = obj; if (obj) { tmp5 = obj.headerSize === obj.headerSize; } if (tmp5) { tmp5 = obj.footerSize === obj.footerSize; } if (!tmp5) { tmp(obj); } function emitMetrics() { const values = context.values; obj = { footerSize: values.get("footerSize") || 0, headerSize: null }; const values2 = context.values; const tmp2 = values.get("footerSize") || 0; obj.headerSize = values2.get("headerSize") || 0; let tmp4 = obj; if (obj) { tmp4 = obj.headerSize === obj.headerSize; } if (tmp4) { tmp4 = obj.footerSize === obj.footerSize; } if (!tmp4) { onMetricsChange(obj); } } obj = emitMetrics; const listeners = tmp2.listeners; value = listeners.get("headerSize"); let items = value; let obj2 = value; if (!value) { const _Set = Set; set = new Set(); items = set; const result = listeners.set("headerSize", set); obj2 = set; } obj2.add(emitMetrics); items = [() => set.delete(closure_0), ]; obj = emitMetrics; const listeners2 = tmp2.listeners; value2 = listeners2.get("footerSize"); items = value2; let obj3 = value2; if (!value2) { const _Set2 = Set; const set1 = new Set(); items = set1; const result1 = listeners2.set("footerSize", set1); obj3 = set1; } obj3.add(emitMetrics); items[1] = () => set.delete(closure_0); return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }, items21); const items22 = [viewabilityConfig, viewabilityConfigCallbackPairs, onViewableItemsChanged]; const effect1 = obj.useEffect(() => { let obj = viewabilityConfig; let tmp3 = viewabilityConfig; if (!viewabilityConfig) { tmp3 = tmp; } let tmp4 = tmp2; if (tmp3) { let items = tmp2; if (!tmp2) { items = []; } const items1 = []; const obj2 = { onViewableItemsChanged: tmp, viewabilityConfig: null }; if (!obj) { obj = { viewAreaCoveragePercentThreshold: 0 }; } obj2.viewabilityConfig = obj; items1[HermesBuiltin.arraySpread(items, 0)] = obj2; tmp4 = items1; const arraySpreadResult = HermesBuiltin.arraySpread(items, 0); } current.viewabilityConfigCallbackPairs = tmp4; current.enableScrollForNextCalculateItemsInView = true; if (tmp4) { tmp8.scrollForNextCalculateItemsInView = undefined; } }, items22); f101429 = () => { if (!closure_27) { doInitialAllocateContainers(context); } }; const state1 = obj23.useState(() => f101442()); const imperativeHandle = obj.useImperativeHandle(ref, () => { closure_0 = context; closure_1 = closure_21; state = context.state; c3 = 0; function isSettlingAfterDataChange() { } function isScrollToIndexReady(index) { flag = arg1; if (arg1 === undefined) { flag = false; } const props = state.props; const anchoredEndSpace = props.anchoredEndSpace; if (null != anchoredEndSpace) { let anchorIndex = anchoredEndSpace.anchorIndex; } if (index >= 0) { let tmp = index < length; if (tmp) { let tmp2 = undefined === anchorIndex || anchorIndex < 0 || anchorIndex >= length || index < anchorIndex; if (!tmp2) { const diff = length - 1; flag2 = true; if (anchorIndex <= diff) { flag2 = false; while (undefined !== getKnownOrFixedItemSize(tmp3, anchorIndex)) { anchorIndex = anchorIndex + 1; flag2 = true; if (anchorIndex > diff) { break; } } } tmp2 = flag2; } tmp = tmp2; } flag = tmp; } return flag; } function runScrollRequest(sum, resolve, fn2, arg3) { closure_0 = sum; state = fn2; let fn = arg3; if (arg3 === undefined) { fn = function r() { return true; }; } if (typeof check === "function") { if (!tmp2) { if (fn()) { if (sum === c3) { if (!tmp4) { if (tmp.pendingScrollResolve === resolve) { tmp.pendingScrollResolve = undefined; } resolve(); } tmp4 = fn2() && tmp.scrollingTo; } } } closure_0 = sum; let _Date = Date; state = Date.now(); c3 = 0; check = function check() { if (closure_0 === onLayoutChange) { if (typeof horizontal === "function") { let tmp2 = onLayoutProp.didDataChange || tmp.didColumnsChange; if (!tmp2) { tmp2 = undefined !== tmp.queuedMVCPRecalculate; } if (!tmp2) { tmp2 = undefined !== tmp.ignoreScrollFromMVCP; } if (!tmp2) { if (fn()) { c3 = c3 + 1; } const _Date = Date; if (c3 < 2) { if (tmp7 < 800) { const _requestAnimationFrame = requestAnimationFrame; const animationFrame = requestAnimationFrame(check); } } if (closure_0 === c3) { let scrollingTo = state(); if (scrollingTo) { scrollingTo = closure_2.scrollingTo; } if (!scrollingTo) { if (closure_2.pendingScrollResolve === closure_1) { closure_2.pendingScrollResolve = undefined; } closure_1(); } } } c3 = 0; } else { throw new TypeError("Trying to call a non-function"); } } }; let _requestAnimationFrame = requestAnimationFrame; let animationFrame = requestAnimationFrame(check); tmp2 = state.didDataChange || state.didColumnsChange || undefined !== state.queuedMVCPRecalculate || undefined !== state.ignoreScrollFromMVCP; } else { throw new TypeError("Trying to call a non-function"); } } function startImperativeScroll(arg0) { } function runScrollWithPromise(arg0) { } state.runPendingScrollToEnd = () => { const pendingScrollToEnd = state.pendingScrollToEnd; if (pendingScrollToEnd) { tmp.pendingScrollToEnd = undefined; if (pendingScrollToEnd.token === c3) { runScrollRequest(pendingScrollToEnd.token, pendingScrollToEnd.resolve, () => { const options = pendingScrollToEnd.options; state = pendingScrollToEnd.state; const diff = state.props.data.length - 1; flag = false; if (-1 !== diff) { const values = tmp.values; const obj = {}; const merged = Object.assign(options); obj.index = diff; let num; const diff1 = -state.props.stylePaddingBottom || 0 - (values.get("footerSize") || 0); if (null != options) { num = options.viewOffset; } if (!num) { num = 0; } obj.viewOffset = diff1 + num; obj.viewPosition = 1; scrollToIndex(tmp, obj); flag = true; const tmp3 = state.props.stylePaddingBottom || 0; const tmp4 = values.get("footerSize") || 0; } return flag; }, () => isScrollToIndexReady(props.props.data.length - 1, true)); } } }; function scrollIndexIntoView(arg0) { } const refScroller = state.refScroller; return { clearCaches(mode) { mode = undefined; if (null != mode) { mode = mode.mode; } let str = "sizes"; if (null != mode) { str = mode; } const sizes = state.sizes; sizes.clear(); const sizesKnown = state.sizesKnown; sizesKnown.clear(); current(state); for (const key10019 in state.averageSizes) { let averageSizes = state.averageSizes; delete tmp[tmp2]; continue; } state.minIndexSizeChanged = 0; state.scrollForNextCalculateItemsInView = undefined; state.pendingTotalSize = undefined; state.totalSize = 0; context(closure_0, "totalSize", 0); if ("full" === str) { const indexByKey = tmp7.indexByKey; indexByKey.clear(); tmp7.idCache.length = 0; tmp7.positions.length = 0; tmp7.columns.length = 0; tmp7.columnSpans.length = 0; } (function triggerMountedContainerLayouts(containerLayoutTriggers) { if (closure_1_27) { closure_1_87(containerLayoutTriggers); } else { containerLayoutTriggers = containerLayoutTriggers.containerLayoutTriggers; const values = containerLayoutTriggers.values(); for (const item10009 of values) { let item10009Result = item10009(); continue; } } })(closure_0); const triggerCalculateItemsInView = tmp7.triggerCalculateItemsInView; if (null != triggerCalculateItemsInView) { const call = triggerCalculateItemsInView.call; const obj = { forceFullItemPositions: true }; if (typeof call === "unknown") { const result = triggerCalculateItemsInView(obj); } else { call(tmp7, obj); } } }, flashScrollIndicators() { current = refScroller.current; return current.flashScrollIndicators(); }, getAnimatableRef() { current = refScroller.current; const getNativeScrollRef = current.getNativeScrollRef; if (null == getNativeScrollRef) { if (null == current2) { current2 = refScroller.current; } return current2; } else { const call = getNativeScrollRef.call; typeof call === "unknown" ? getNativeScrollRef() : call(current); } }, getNativeScrollRef() { return refScroller.current; }, getScrollableNode() { current = refScroller.current; return current.getScrollableNode(); }, getScrollResponder() { current = refScroller.current; return current.getScrollResponder(); }, getState() { let obj = { activeStickyIndex: null, contentLength: closure_25(closure_0), data: state.props.data, elementAtIndex(arg0) { const viewRefs = closure_1_0.viewRefs; ({ data, keyExtractor } = closure_1_2.props); let str = ""; if (data) { let tmp4 = null; if (arg0 < data.length) { let keyExtractorResult = arg0; if (keyExtractor) { keyExtractorResult = keyExtractor(data[arg0], arg0); } tmp4 = keyExtractorResult; } tmp2.idCache[arg0] = tmp4; str = tmp4; } state = tmp.state; let containerItemKeys; if (null != state) { containerItemKeys = state.containerItemKeys; } let num; if (null != containerItemKeys) { num = containerItemKeys.get(str); } if (undefined === num) { const values = tmp.values; value = values.get("numContainers"); let num2 = 0; num = -1; if (0 < value) { const _HermesInternal = HermesInternal; const values2 = tmp.values; num = num2; while (values2.get("containerItemKey" + num2) !== str) { let sum = num2 + 1; num2 = sum; num = -1; if (sum >= value) { break; } } } } value2 = viewRefs.get(num); current = undefined; if (null != value2) { current = value2.current; } return current; }, end: state.endNoBuffer, endBuffered: state.endBuffered, getAverageItemSizes() { const obj = {}; for (const key10005 in closure_1_2.averageSizes) { let str = key10005; let tmp2 = tmp.averageSizes[key10005]; if (!tmp2) { continue; } else { if (!str) { str = "default"; } let obj3 = { average: null, count: null }; ({ avg: obj2.average, num: obj2.count } = tmp2); obj[str] = obj3; continue; } continue; } return obj; }, isAtEnd: null, isAtStart: null, isEndReached: state.isEndReached, isNearEnd: null, isNearStart: null, isStartReached: state.isStartReached, isWithinMaintainScrollAtEndThreshold: null, listen(arg0, arg1) { closure_0 = arg1; const listeners = closure_1_0.listeners; value = listeners.get(arg0); set = value; let obj = value; if (!value) { const _Set = Set; set = new Set(); const result = listeners.set(arg0, set); obj = set; } obj.add(arg1); return () => set.delete(closure_0); }, listenToPosition(arg0, arg1) { closure_0 = arg1; const positionListeners = closure_1_0.positionListeners; value = positionListeners.get(arg0); set = value; let obj = value; if (!value) { const _Set = Set; set = new Set(); const result = positionListeners.set(arg0, set); obj = set; } obj.add(arg1); return () => set.delete(closure_0); }, positionAtIndex(arg0) { return state.positions[arg0]; }, positionByKey(arg0) { const indexByKey = state.indexByKey; value = indexByKey.get(arg0); let tmp3; if (undefined !== value) { tmp3 = state.positions[value]; } return tmp3; }, scroll: state.scroll, scrollLength: state.scrollLength, scrollVelocity: getScrollVelocity(state), sizeAtIndex(arg0) { ({ sizesKnown, props } = state); ({ data, keyExtractor } = props); let str = ""; if (data) { let tmp3 = null; if (arg0 < data.length) { let keyExtractorResult = arg0; if (keyExtractor) { keyExtractorResult = keyExtractor(data[arg0], arg0); } tmp3 = keyExtractorResult; } tmp.idCache[arg0] = tmp3; str = tmp3; } return sizesKnown.get(str); }, sizes: state.sizesKnown, start: state.startNoBuffer, startBuffered: state.startBuffered }; let values = closure_0.values; obj.activeStickyIndex = values.get("activeStickyIndex"); let values2 = closure_0.values; obj.isAtEnd = values2.get("isAtEnd"); const values3 = closure_0.values; obj.isAtStart = values3.get("isAtStart"); const values4 = closure_0.values; obj.isNearEnd = values4.get("isNearEnd"); const values5 = closure_0.values; obj.isNearStart = values5.get("isNearStart"); const values6 = closure_0.values; obj.isWithinMaintainScrollAtEndThreshold = values6.get("isWithinMaintainScrollAtEndThreshold"); return obj; }, reportContentInset(arg0) { state = closure_0.state; let tmp2; if (null != arg0) { tmp2 = arg0; } const contentInsetOverride = state.contentInsetOverride; let top; if (null != contentInsetOverride) { top = contentInsetOverride.top; } let num = 0; if (null != top) { num = top; } let top1; if (null != tmp2) { top1 = tmp2.top; } let num2 = 0; if (null != top1) { num2 = top1; } let tmp5 = num === num2; if (tmp5) { let bottom; if (null != contentInsetOverride) { bottom = contentInsetOverride.bottom; } let num3 = 0; if (null != bottom) { num3 = bottom; } let bottom1; if (null != tmp2) { bottom1 = tmp2.bottom; } num4 = 0; if (null != bottom1) { num4 = bottom1; } tmp5 = num3 === num4; } if (tmp5) { let left; if (null != contentInsetOverride) { left = contentInsetOverride.left; } let num5 = 0; if (null != left) { num5 = left; } let left1; if (null != tmp2) { left1 = tmp2.left; } let num6 = 0; if (null != left1) { num6 = left1; } tmp5 = num5 === num6; } if (tmp5) { let right; if (null != contentInsetOverride) { right = contentInsetOverride.right; } let num7 = 0; if (null != right) { num7 = right; } let right1; if (null != tmp2) { right1 = tmp2.right; } let num8 = 0; if (null != right1) { num8 = right1; } tmp5 = num7 === num8; } state.contentInsetOverride = tmp2; if (!tmp5) { updateContentMetricsState(tmp); } updateScroll(closure_0, state.scroll, true, { markHasScrolled: false }); if (!tmp5) { retargetActiveInitialScrollAtEnd(tmp); } }, scrollIndexIntoView(arg0) { closure_0 = arg0; if (typeof runScrollWithPromise === "function") { closure_129_0 = () => { if (typeof scrollIndexIntoView === "function") { flag = false; if (state) { const index = tmp.index; const tmp5 = closure_1_3(tmp, runScrollRequest); const startNoBuffer = state.startNoBuffer; if (index < startNoBuffer) { const obj = {}; const merged = Object.assign(tmp5); obj.index = index; let num = 1; if (index < startNoBuffer) { num = 0; } obj.viewPosition = num; closure_1_73(closure_0, obj); flag = true; } else { flag = false; } } return flag; } else { throw new TypeError("Trying to call a non-function"); } }; closure_129_1 = function t() { return true; }; const promise = new Promise((pendingScrollResolve) => { if (typeof startImperativeScroll === "function") { const sum = c3 + 1; c3 = sum; state.pendingScrollToEnd = undefined; pendingScrollResolve = state.pendingScrollResolve; if (null != pendingScrollResolve) { const call = pendingScrollResolve.call; if (typeof call === "unknown") { pendingScrollResolve(); } else { call(tmp3); } } state.pendingScrollResolve = pendingScrollResolve; runScrollRequest(sum, pendingScrollResolve, closure_0, closure_1_1); } else { throw new TypeError("Trying to call a non-function"); } }); return promise; } else { throw new TypeError("Trying to call a non-function"); } }, scrollItemIntoView(item) { item = item.item; closure_1 = Object.assign(item, Object.assign({ item: 0 })); if (typeof runScrollWithPromise === "function") { closure_129_0 = () => { const data = state.props.data; const index1 = data.indexOf(item); flag = -1 !== index1; if (flag) { const obj = { index: index1 }; const merged = Object.assign(closure_1); if (typeof scrollIndexIntoView === "function") { flag = true; if (tmp) { const index = obj.index; const tmp9 = closure_1_3(obj, runScrollRequest); const startNoBuffer = tmp.startNoBuffer; if (index < startNoBuffer) { const obj2 = {}; const merged1 = Object.assign(tmp9); obj2.index = index; let num = 1; if (index < startNoBuffer) { num = 0; } obj2.viewPosition = num; closure_1_73(closure_0, obj2); flag = true; } else { flag = true; } } } else { throw new TypeError("Trying to call a non-function"); } } return flag; }; closure_129_1 = function t() { return true; }; const promise = new Promise((pendingScrollResolve) => { if (typeof startImperativeScroll === "function") { const sum = c3 + 1; c3 = sum; state.pendingScrollToEnd = undefined; pendingScrollResolve = state.pendingScrollResolve; if (null != pendingScrollResolve) { const call = pendingScrollResolve.call; if (typeof call === "unknown") { pendingScrollResolve(); } else { call(tmp3); } } state.pendingScrollResolve = pendingScrollResolve; runScrollRequest(sum, pendingScrollResolve, closure_0, closure_1_1); } else { throw new TypeError("Trying to call a non-function"); } }); return promise; } else { throw new TypeError("Trying to call a non-function"); } }, scrollToEnd(options) { return new Promise((pendingScrollResolve) => { if (typeof startImperativeScroll === "function") { const sum = c3 + 1; c3 = sum; state.pendingScrollToEnd = undefined; pendingScrollResolve = state.pendingScrollResolve; if (null != pendingScrollResolve) { const call = pendingScrollResolve.call; if (typeof call === "unknown") { pendingScrollResolve(); } else { call(tmp3); } } state.pendingScrollResolve = pendingScrollResolve; const obj = { options, resolve: pendingScrollResolve, token: sum }; state.pendingScrollToEnd = obj; if (closure_1) { closure_1(); } else { const runPendingScrollToEnd = tmp3.runPendingScrollToEnd; if (null != runPendingScrollToEnd) { const call2 = runPendingScrollToEnd.call; if (typeof call2 === "unknown") { const result = runPendingScrollToEnd(); } else { call2(tmp3); } } } } else { throw new TypeError("Trying to call a non-function"); } }); }, scrollToIndex(index) { if (index.index >= 0) { let fn = () => isScrollToIndexReady(index.index); } if (typeof tmp === "function") { closure_129_0 = () => { scrollToIndex(closure_0, closure_0); return true; }; if (fn === undefined) { fn = function t() { return true; }; } closure_129_1 = fn; const promise = new Promise((pendingScrollResolve) => { if (typeof startImperativeScroll === "function") { const sum = c3 + 1; c3 = sum; state.pendingScrollToEnd = undefined; pendingScrollResolve = state.pendingScrollResolve; if (null != pendingScrollResolve) { const call = pendingScrollResolve.call; if (typeof call === "unknown") { pendingScrollResolve(); } else { call(tmp3); } } state.pendingScrollResolve = pendingScrollResolve; runScrollRequest(sum, pendingScrollResolve, closure_0, closure_1_1); } else { throw new TypeError("Trying to call a non-function"); } }); return promise; } else { throw new TypeError("Trying to call a non-function"); } tmp = runScrollWithPromise; }, scrollToItem(item) { item = item.item; closure_1 = Object.assign(item, Object.assign({ item: 0 })); if (typeof runScrollWithPromise === "function") { closure_129_0 = () => { const data = state.props.data; const index = data.indexOf(item); flag = -1 !== index; if (flag) { const obj = { index }; const merged = Object.assign(closure_1); scrollToIndex(closure_0, obj); flag = true; } return flag; }; closure_129_1 = function t() { return true; }; const promise = new Promise((pendingScrollResolve) => { if (typeof startImperativeScroll === "function") { const sum = c3 + 1; c3 = sum; state.pendingScrollToEnd = undefined; pendingScrollResolve = state.pendingScrollResolve; if (null != pendingScrollResolve) { const call = pendingScrollResolve.call; if (typeof call === "unknown") { pendingScrollResolve(); } else { call(tmp3); } } state.pendingScrollResolve = pendingScrollResolve; runScrollRequest(sum, pendingScrollResolve, closure_0, closure_1_1); } else { throw new TypeError("Trying to call a non-function"); } }); return promise; } else { throw new TypeError("Trying to call a non-function"); } }, scrollToOffset(arg0) { closure_0 = arg0; if (typeof runScrollWithPromise === "function") { closure_129_0 = () => { scrollTo(closure_0, closure_0); return true; }; closure_129_1 = function t() { return true; }; const promise = new Promise((pendingScrollResolve) => { if (typeof startImperativeScroll === "function") { const sum = c3 + 1; c3 = sum; state.pendingScrollToEnd = undefined; pendingScrollResolve = state.pendingScrollResolve; if (null != pendingScrollResolve) { const call = pendingScrollResolve.call; if (typeof call === "unknown") { pendingScrollResolve(); } else { call(tmp3); } } state.pendingScrollResolve = pendingScrollResolve; runScrollRequest(sum, pendingScrollResolve, closure_0, closure_1_1); } else { throw new TypeError("Trying to call a non-function"); } }); return promise; } else { throw new TypeError("Trying to call a non-function"); } }, setItemSize(itemKey, size) { const items = [{ itemKey, size }]; updateItemSizesBatch(closure_0, items); }, setScrollProcessingEnabled(scrollProcessingEnabled) { state.scrollProcessingEnabled = scrollProcessingEnabled; }, setVisibleContentAnchorOffset(fn) { let tmp = fn; if (typeof fn === "function") { const values = closure_0.values; tmp = fn(values.get("scrollAdjustUserOffset") || 0); const tmp2 = values.get("scrollAdjustUserOffset") || 0; } context(closure_0, "scrollAdjustUserOffset", tmp); } }; }, []); const items23 = [current]; const effect2 = obj.useEffect(() => () => { if (undefined !== current.queuedFullDrawDistancePrewarm) { const _cancelAnimationFrame = cancelAnimationFrame; cancelAnimationFrame(tmp.queuedFullDrawDistancePrewarm); tmp.queuedFullDrawDistancePrewarm = undefined; } while (tmp4 !== undefined) { let _clearTimeout = clearTimeout; let clearTimeoutResult = clearTimeout(tmp5); continue; } const timeouts = current.timeouts; timeouts.clear(); }, items23); const layoutEffect9 = obj.useLayoutEffect(() => { const runPendingScrollToEnd = current.runPendingScrollToEnd; if (null != runPendingScrollToEnd) { const call = runPendingScrollToEnd.call; if (typeof call === "unknown") { const result = runPendingScrollToEnd(); } else { call(current); } } }); const items24 = [context, tmp60]; const effect3 = obj.useEffect(() => { }, items24); const memo3 = obj.useMemo(() => ({ getRenderedItem(arg0) { state = context.state; let tmp2 = null; if (state) { ({ indexByKey, props } = state); ({ data, getItemType, renderItem } = props); value = indexByKey.get(arg0); tmp2 = null; if (undefined !== value) { const values = tmp.values; let tmp5 = renderItem; value2 = values.get("extraData"); if (renderItem) { tmp5 = null != tmp9; } let renderItemResult = null; if (tmp5) { const obj = { data, extraData: value2, index: value, item: tmp9, type: null }; let str2 = ""; if (getItemType) { const itemType = getItemType(tmp9, value); str2 = ""; if (null != itemType) { str2 = itemType; } } obj.type = str2; renderItemResult = renderItem(obj); } const obj2 = { index: value, item: data[value], renderedItem: renderItemResult }; tmp2 = obj2; } } return tmp2; }, onMomentumScrollEnd(arg0) { checkFinishedScrollFallback(context); if (current.props.onMomentumScrollEnd) { const props = tmp2.props; props.onMomentumScrollEnd(arg0); } }, onScroll(nativeEvent) { state = context.state; if (false !== state.scrollProcessingEnabled) { const nativeEvent2 = nativeEvent.nativeEvent; let contentSize1; if (null != nativeEvent2) { contentSize1 = nativeEvent2.contentSize; } let height; if (null != contentSize1) { height = contentSize1.height; } if (0 !== height) { nativeEvent = nativeEvent.nativeEvent; let contentInset1; if (null != nativeEvent) { contentInset1 = nativeEvent.contentInset; } flag = false; if (contentInset1) { const contentInset = nativeEvent.nativeEvent.contentInset; const nativeContentInset = state.nativeContentInset; let tmp6 = nativeContentInset; if (nativeContentInset) { tmp6 = nativeContentInset.top === contentInset.top; } if (tmp6) { tmp6 = nativeContentInset.bottom === contentInset.bottom; } if (tmp6) { tmp6 = nativeContentInset.left === contentInset.left; } if (tmp6) { tmp6 = nativeContentInset.right === contentInset.right; } flag = false; if (!tmp6) { state.nativeContentInset = contentInset; flag = true; } } let str = "y"; if (state.props.horizontal) { str = "x"; } let bound4 = nativeEvent.nativeEvent.contentOffset[str]; if (!state.props.horizontal) { let didFinishInitialScroll = state.didFinishInitialScroll; if (didFinishInitialScroll) { const initialScroll = state.initialScroll; let viewPosition; if (null != initialScroll) { viewPosition = initialScroll.viewPosition; } didFinishInitialScroll = 1 === viewPosition; } if (didFinishInitialScroll) { didFinishInitialScroll = state.scroll > state.scrollLength; } state.lastNativeScroll = bound4; const _Date = Date; state.lastNativeScrollTime = Date.now(); if (state.scrollingTo) { if (state.scrollingTo.offset >= bound4) { const scrollingTo3 = state.scrollingTo; const state3 = tmp.state; const tmp65 = closure_25(tmp); const _Number7 = Number; let bound1 = bound4; if (Number.isFinite(tmp65)) { const _Number6 = Number; bound1 = bound4; if (Number.isFinite(state3.scrollLength)) { bound1 = bound4; if (state3.lastLayout) { const _Math13 = Math; let viewOffset; const bound = Math.max(0, tmp65 - state3.scrollLength); if (null != scrollingTo3) { viewOffset = scrollingTo3.viewOffset; } let num5 = 0; if (typeof viewOffset === "number") { num5 = 0; if (viewOffset < 0) { num5 = -viewOffset; } } const _Math14 = Math; bound1 = Math.min(bound4, bound + num5); } } } const _Math15 = Math; const bound2 = Math.max(0, bound1); if (bound4 !== bound2) { const _Math16 = Math; if (Math.abs(bound4 - bound2) > 1) { const obj3 = { forceScroll: true, isInitialScroll: true, noScrollingTo: true, offset: bound2 }; scrollTo(tmp, obj3); } } } } state.scrollPending = bound4; updateScroll(tmp, tmp8, flag, { fromNativeScrollEvent: true }); value = closure_2_37.get(state); if (value) { if (obj.didReachTarget(bound4, value)) { obj.clear(state); } const state2 = tmp.state; ({ initialScroll: initialScroll2, didFinishInitialScroll: didFinishInitialScroll2 } = state2); let preservedEndAnchorCorrection = !didFinishInitialScroll2; if (didFinishInitialScroll2) { let scrollingTo = state2.scrollingTo; let isInitialScroll; if (null != scrollingTo) { isInitialScroll = scrollingTo.isInitialScroll; } preservedEndAnchorCorrection = isInitialScroll; } if (!preservedEndAnchorCorrection) { let viewPosition1; if (null != initialScroll2) { viewPosition1 = initialScroll2.viewPosition; } preservedEndAnchorCorrection = 1 !== viewPosition1; } if (!preservedEndAnchorCorrection) { preservedEndAnchorCorrection = state2.preservedEndAnchorCorrection; } if (!preservedEndAnchorCorrection) { if (didFinishedInitialScrollMoveAwayFromTarget(tmp, initialScroll2)) { let tmp46 = !initialScroll2; if (initialScroll2) { tmp46 = 1 !== initialScroll2.viewPosition; } if (!tmp46) { let prop; if (null != initialScroll2) { prop = initialScroll2.preserveForBottomPadding; } let tmp49 = !tmp48; if (!prop) { let prop1; if (null != initialScroll2) { prop1 = initialScroll2.preserveForFooterLayout; } tmp49 = !prop1; } tmp46 = tmp49; } value2 = !tmp46; if (value2) { const values = tmp.values; value2 = values.get("isAtEnd"); } if (!value2) { let prop2; if (null != initialScroll2) { prop2 = initialScroll2.preserveForFooterLayout; } if (prop2) { const obj4 = { dataLength: state2.props.data.length, stylePaddingBottom: null, target: null }; stylePaddingBottom = state2.props.stylePaddingBottom; let num10 = 0; if (null != stylePaddingBottom) { num10 = stylePaddingBottom; } obj4.stylePaddingBottom = num10; obj4.target = initialScroll2; clearPendingInitialScrollFooterLayout(tmp, obj4); } else { if (undefined !== state2.timeoutPreservedInitialScrollClear) { const _clearTimeout = clearTimeout; clearTimeout(state2.timeoutPreservedInitialScrollClear); state2.timeoutPreservedInitialScrollClear = undefined; } state2.clearPreservedInitialScrollOnNextFinish = undefined; state2.initialScroll = undefined; setInitialScrollSession(state2); } } } } if (state.scrollingTo) { state = tmp; const scrollingTo2 = tmp.state.scrollingTo; const _requestAnimationFrame = requestAnimationFrame; tmp.state.animFrameCheckFinishedScroll = requestAnimationFrame(() => { const scrollingTo = state.state.scrollingTo; if (scrollingTo) { state = tmp.state; state.animFrameCheckFinishedScroll = undefined; const tmp3 = closure_2_62(tmp, scrollingTo); let isAtResolvedTarget = tmp3.isAtResolvedTarget; if (isAtResolvedTarget) { const isInitialScroll = scrollingTo.isInitialScroll; let hasScrolled = !isInitialScroll; if (isInitialScroll) { hasScrolled = state.hasScrolled; } if (!hasScrolled) { hasScrolled = tmp3.clampedTargetOffset <= 1; } isAtResolvedTarget = hasScrolled; } if (isAtResolvedTarget) { closure_2_60(tmp); } } }); } if (state.props.onScroll) { const props = state.props; props.onScroll(nativeEvent); } } if (value) { state.hasScrolled = false; ({ startScroll: obj2.startScroll, targetOffset: obj2.targetOffset } = value); const result = obj.set(state, { startScroll: null, targetOffset: null }); const obj7 = { startScroll: null, targetOffset: null }; } } else { const contentSize2 = nativeEvent.nativeEvent.contentSize; if (null != contentSize2) { let _Math = contentSize2.width; } let props1; if (null != state) { props1 = state.props; } horizontal = undefined; if (null != props1) { horizontal = props1.horizontal; } let tmp11 = horizontal; if (tmp11) { let rtl; if (null != props1) { rtl = props1.rtl; } if (null == rtl) { rtl = viewabilityConfig.I18nManager.isRTL; } tmp11 = rtl; } if (tmp11) { if (undefined !== _Math) { const _Number = Number; if (Number.isFinite(_Math)) { const _Number2 = Number; if (Number.isFinite(state.scrollLength)) { if (_Math > state.scrollLength) { const _Math2 = Math; let bound3 = Math.max(0, _Math - state.scrollLength); } if (bound4 < 0) { state.horizontalRTLScrollType = "negative"; bound4 = tmp26; if (undefined !== bound3) { const _Math12 = Math; _Math = Math; bound4 = Math.max(0, Math.min(bound3, tmp26)); } } else if (undefined !== bound3) { const diff = bound3 - bound4; const _Number5 = Number; if (Number.isFinite(diff)) { _Math = state.horizontalRTLScrollType; if ("inverted" === _Math) { let bound5 = diff; if (!tmp63) { _Math = Math; const _Math11 = Math; bound5 = Math.max(0, Math.min(bound3, diff)); } } else { let str4 = "normal"; if ("normal" === _Math) { let bound6 = bound4; if (!tmp63) { const _Math9 = Math; const _Math10 = Math; bound6 = Math.max(0, Math.min(bound3, bound4)); } } else if (state.hasScrolled) { const scroll = state.scroll; const _Math5 = Math; const _Math6 = Math; const absolute = Math.abs(bound4 - scroll); _Math = Math.abs(diff - scroll) + 0.5; if (_Math < absolute) { str4 = "inverted"; } state.horizontalRTLScrollType = str4; let tmp22 = bound4; if (_Math < absolute) { tmp22 = diff; } let bound7 = tmp22; if (!tmp63) { const _Math7 = Math; const _Math8 = Math; bound7 = Math.max(0, Math.min(bound3, tmp22)); } } else { state.horizontalRTLScrollType = "inverted"; _Math = diff; if (!tmp63) { const _Math3 = Math; const _Math4 = Math; _Math = Math.max(0, Math.min(bound3, diff)); } } } } else { state.horizontalRTLScrollType = "normal"; } } } } } let num2; if (undefined !== _Math) { const _Number3 = Number; if (Number.isFinite(_Math)) { const _Number4 = Number; if (Number.isFinite(state.scrollLength)) { num2 = 0; } } } bound3 = num2; } else { state.horizontalRTLScrollType = undefined; } } } else { const contentSize = nativeEvent.nativeEvent.contentSize; let width; if (null != contentSize) { width = contentSize.width; } } } }, onScrollBeginDrag(arg0) { if (context.state.edgeReachedGate) { context.state.edgeReachedGate = "prepared"; } const props = current.props; const onScrollBeginDrag = props.onScrollBeginDrag; if (null != onScrollBeginDrag) { const call = onScrollBeginDrag.call; if (typeof call === "unknown") { onScrollBeginDrag(arg0); } else { call(props, arg0); } } }, onScrollEnd() { if (context.state.edgeReachedGate) { context.state.edgeReachedGate = "prepared"; } } }), []); closure_129_0 = stickyHeaderIndices; closure_129_1 = horizontal; closure_129_2 = context; const onScroll2 = memo3.onScroll; closure_129_4 = tmp205; let joined3; if (null != stickyHeaderIndices) { joined3 = stickyHeaderIndices.join(","); } const items25 = [joined3, horizontal, !context.state.props.stickyPositionComponentInternal]; const Fragment = obj14.Fragment; const obj26 = {}; const memo4 = obj23.useMemo(() => { let length; if (null != f101429) { length = f101429.length; } if (length) { if (horizontal) { const Animated = get_ActivityIndicator.Animated; let str = "y"; if (measureInLayoutEffect) { str = "x"; } const obj = { nativeEvent: null }; const obj2 = { contentOffset: null }; const obj3 = {}; obj3[str] = onLayoutProp.animatedScrollY; obj2.contentOffset = obj3; obj.nativeEvent = obj2; const items = [obj]; const obj4 = { listener: onLayoutChange, useNativeDriver: true }; return Animated.event(items, obj4); } } return onLayoutChange; }, items25); ({ createElement, createElement: createElement2 } = viewabilityConfigCallbackPairs); const merged4 = Object.assign(tmp13); obj26.alignItemsAtEnd = tmp8; obj26.canRender = tmp67; obj26.contentContainerStyle = obj3; obj26.contentInset = contentInset; obj26.getRenderedItem = memo3.getRenderedItem; obj26.horizontal = horizontal; obj26.initialContentOffset = memo2; let tmp212; if (0 === data.length) { tmp212 = ListEmptyComponent; } obj26.ListEmptyComponent = tmp212; obj26.ListFooterComponent = ListFooterComponent; obj26.ListFooterComponentStyle = ListFooterComponentStyle; obj26.ListHeaderComponent = ListHeaderComponent; ({ onScrollBeginDrag: obj27.onInternalScrollBeginDrag, onScrollEnd: obj27.onInternalScrollEnd } = memo3); obj26.onLayout = callback2; obj26.onLayoutFooter = callback1; obj26.onMomentumScrollEnd = memo3.onMomentumScrollEnd; obj26.onScroll = memo4; obj26.recycleItems = tmp11; if (refreshControl) { let cloneElementResult = refreshControl; if (tmp38 > 0) { const progressViewOffset2 = refreshControl.props.progressViewOffset; let num21 = 0; if (null != progressViewOffset2) { num21 = progressViewOffset2; } const obj28 = { progressViewOffset: num21 + tmp38 }; cloneElementResult = obj14.cloneElement(refreshControl, obj28); } let element = cloneElementResult; } else { element = onRefresh; if (onRefresh) { const obj29 = { onRefresh, progressViewOffset: null, refreshing: null }; if (!progressViewOffset) { progressViewOffset = 0; } obj29.progressViewOffset = progressViewOffset + tmp38; obj29.refreshing = refreshing; element = ; } } obj26.refreshControl = element; obj26.refScrollView = useCombinedRef(ref, refScrollView); obj26.renderScrollComponent = renderScrollComponent; let current2 = ref1.current; let scrollAdjustHandler; if (null != current2) { scrollAdjustHandler = current2.scrollAdjustHandler; } obj26.scrollAdjustHandler = scrollAdjustHandler; obj26.scrollEventThrottle = 0; obj26.snapToIndices = snapToIndices; obj26.stickyHeaderIndices = stickyHeaderIndices; obj26.style = obj5; obj26.useWindowScroll = false; const element2 = createElement2(closure_131, obj26); if (tmp177) { tmp177 = memo1; } return <>{element2}{tmp177}; } else if (true === tmp10) { const obj52 = {}; const merged5 = Object.assign(normalizeMaintainScrollAtEndOn(undefined, false)); obj52.animated = false; let obj53 = obj52; } else { obj53 = {}; const merged6 = Object.assign(normalizeMaintainScrollAtEndOn(tmp10.on, "on" in tmp10)); const animated = tmp10.animated; obj53.animated = null != animated && animated; } tmp40 = extractPadding(obj5, obj3, "Left"); } obj4 = {}; } else if (horizontal) { let minWidth; if (!tmp20) { minWidth = flattenResult.minWidth; } let tmp22 = null == minWidth; } else { let minHeight1; if (!tmp20) { minHeight1 = flattenResult.minHeight; } tmp22 = null == minHeight1; } }); export const LegendList = memo(forwardRef(function LegendList2(renderItem, ref) { ({ children, data } = renderItem); const tmp = _objectWithoutProperties(renderItem, closure_7); if (undefined !== children) { if (undefined === data) { const obj2 = {}; const merged = Object.assign(tmp); obj2.childrenMode = true; const _Array = Array; let toArrayResult = children; if (!Array.isArray(children)) { const Children = frozen.Children; toArrayResult = Children.toArray(children); } obj2.data = toArrayResult.flat(1); obj2.renderItem = function renderItem(item) { return item.item; }; let tmp3 = obj2; } const obj3 = {}; ({ createElement, createElement: createElement2 } = frozen); const merged1 = Object.assign(tmp3); obj3.ref = ref; return {createElement2(closure_141, obj3)}; } const obj = {}; const merged2 = Object.assign(tmp); if (!data) { data = []; } obj.data = data; obj.renderItem = renderItem.renderItem; tmp3 = obj; })); export const internal = { getComponent, getStickyPushLimit, IsNewArchitecture: undefined !== nativeFabricUIManager && null != nativeFabricUIManager, POSITION_OUT_OF_VIEW: -10000000, peek$, typedForwardRef: forwardRef, typedMemo: memo, useArr$, useCombinedRef, useLatestRef, useStableRenderComponent, useStateContext }; export const useAdaptiveRender = function useAdaptiveRender() { const items = ["adaptiveRender"]; const context = frozen.useContext(closure_17); if (1 === items.length) { let first = items[0]; } else { first = items.join("\0"); } const items1 = [context, first]; const memo = frozen.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; return _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0]; }; export const useAdaptiveRenderChange = function useAdaptiveRenderChange(current) { let context = frozen.useContext(closure_17); const ref = noop.useRef(current); ref.current = current; const items = [context]; const layoutEffect = noop.useLayoutEffect(() => { const values = context.values; values.get("adaptiveRender"); const fn = (AUTO_DISMISS) => { if (closure_0 !== AUTO_DISMISS) { closure_0 = AUTO_DISMISS; ref.current(AUTO_DISMISS); } }; context = fn; const listeners = context.listeners; value = listeners.get("adaptiveRender"); set = value; let obj = value; if (!value) { const _Set = Set; set = new Set(); const result = listeners.set("adaptiveRender", set); obj = set; } obj.add(fn); return () => set.delete(closure_0); }, items); }; export { useIsLastItem }; export const useListScrollSize = function useListScrollSize() { const items = ["scrollSize"]; const context = frozen.useContext(closure_17); if (1 === items.length) { let first = items[0]; } else { first = items.join("\0"); } const items1 = [context, first]; const memo = frozen.useMemo(() => { closure_0 = context; closure_1 = first.split("\0"); closure_2 = []; closure_3 = []; return { get() { let arr2; items = []; let num = 0; flag = false; flag2 = false; if (0 < items.length) { do { values = values.values; arr2 = items; value = values.get(items[num]); let arr = items.push(value); let flag3 = flag; if (value !== items[num]) { flag3 = true; } num = num + 1; flag = flag3; flag2 = flag3; } while (num < arr2.length); } return items; }, subscribe(arg0) { items = []; while (tmp2 !== undefined) { let arr = items.push(listen$(closure_0, tmp3, arg0)); continue; } return () => { for (const item10005 of items) { let item10005Result = item10005(); continue; } }; } }; }, items1); const get = memo.get; return _slicedToArray(context(first[6]).useSyncExternalStore(memo.subscribe, get, get), 1)[0]; }; export const useRecyclingEffect = function useRecyclingEffect(arg0) { closure_0 = arg0; const tmp = useContainerItemSignals(noop.useContext(closure_115)); const hasItemInfo = tmp.hasItemInfo; const item = tmp.item; const itemIndex = tmp.itemIndex; noop.useRef(undefined); const items = [arg0, hasItemInfo, itemIndex, item, tmp.itemKey]; const effect = noop.useEffect(() => { if (hasItemInfo) { let tmp2; if (ref.current) { const obj = { index: itemIndex, item, prevIndex: tmp.current.index, prevItem: tmp.current.item }; tmp2 = closure_0(obj); } const obj2 = { index: itemIndex, item }; ref.current = obj2; return tmp2; } }, items); }; export const useRecyclingState = function useRecyclingState(fn) { closure_0 = fn; const context = noop.useContext(closure_115); const tmp2 = useContainerItemSignals(context); const hasItemInfo = tmp2.hasItemInfo; const item = tmp2.item; const itemIndex = tmp2.itemIndex; const itemKey = tmp2.itemKey; function computeValue() { } const tmp3 = _slicedToArray(noop.useState(() => { if (typeof computeValue === "function") { if (typeof closure_0 !== "function") { return tmp; } else if (hasItemInfo) { const obj = { index: itemIndex, item, prevIndex: "r", prevItem: "HermesInternal" }; let tmpResult = tmp(obj); } else { tmpResult = tmp(); } } else { throw new TypeError("Trying to call a non-function"); } }), 2); closure_5 = tmp4; let tmp5 = null; if (hasItemInfo) { tmp5 = itemKey; } const ref = noop.useRef(tmp5); let tmp7 = hasItemInfo; if (hasItemInfo) { tmp7 = ref.current !== itemKey; } if (tmp7) { ref.current = itemKey; if (typeof fn !== "function") { tmp4(fn); } else if (hasItemInfo) { const obj2 = { index: itemIndex, item, prevIndex: "r", prevItem: "HermesInternal" }; let tmp9 = fn(obj2); } else { tmp9 = fn(); } } let triggerLayout; if (null != context) { triggerLayout = context.triggerLayout; } const items = [tmp3[0], ]; const items1 = [triggerLayout]; items[1] = noop.useCallback((arg0) => { closure_0 = arg0; if (triggerLayout) { closure_5((arg0) => { let tmpResult = closure_0; if (typeof closure_0 === "function") { tmpResult = tmp(arg0); } return tmpResult; }); tmp(); } }, items1); return items; }; export const useSyncLayout = function useSyncLayout() { const context = noop.useContext(closure_115); if (closure_27) { if (context) { let triggerLayout = context.triggerLayout; } return triggerLayout; } triggerLayout = noop; }; export const useViewability = function useViewability(arg0, arg1) { closure_1 = arg1; const context = frozen.useContext(closure_17); const context1 = noop.useContext(closure_115); let f101440 = () => { if (context1) { let str = ""; if (null != closure_1) { str = closure_1; } const mapViewabilityValues = context.mapViewabilityValues; value = mapViewabilityValues.get(context1.containerId + str); if (value) { f101440(value); } } }; const state = noop.useState(() => f101442()); const items = [context, arg0, arg1, context1]; const effect = noop.useEffect(() => { if (context1) { let str = ""; if (null != closure_1) { str = closure_1; } const sum = context1.containerId + str; f101440 = sum; const result = context.mapViewabilityCallbacks.set(sum, f101440); return () => { context.mapViewabilityCallbacks.delete(sum); }; } }, items); }; export const useViewabilityAmount = function useViewabilityAmount(arg0) { const context = frozen.useContext(closure_17); const context1 = noop.useContext(closure_115); const f101442 = () => { if (context1) { const mapViewabilityAmountValues = context.mapViewabilityAmountValues; value = mapViewabilityAmountValues.get(context1.containerId); if (value) { f101442(value); } } }; const state = noop.useState(() => f101442()); const items = [context, arg0, context1]; const effect = noop.useEffect(() => { if (context1) { const containerId = context1.containerId; const result = context.mapViewabilityAmountCallbacks.set(containerId, containerId); return () => { context.mapViewabilityAmountCallbacks.delete(containerId); }; } }, items); };