Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
76 lines
2.4 KiB
JavaScript
76 lines
2.4 KiB
JavaScript
// Module ID: 444
|
|
// Function ID: 445
|
|
// Dependencies: [442, 143]
|
|
|
|
// Module 444
|
|
import _modDef143 from "module_143" /* 143 */;
|
|
import DEFAULT_INITIAL_NUM_TO_RENDER from "module_442" /* 442 */;
|
|
|
|
const FALLBACK_ESTIMATED_WIDTH = DEFAULT_INITIAL_NUM_TO_RENDER.FALLBACK_ESTIMATED_WIDTH;
|
|
|
|
export default {
|
|
initial: {
|
|
itemCount: DEFAULT_INITIAL_NUM_TO_RENDER.INITIAL_NUM_TO_RENDER,
|
|
spacerStyle(arg0) {
|
|
return { width: arg0 * FALLBACK_ESTIMATED_WIDTH };
|
|
}
|
|
},
|
|
next(arg0) {
|
|
({ target, targetRect, thresholdRect } = arg0);
|
|
c0 = undefined;
|
|
if (target instanceof _modDef143) {
|
|
const _Math = Math;
|
|
const _Math2 = Math;
|
|
const bound = Math.min(targetRect.x + targetRect.width, thresholdRect.x + thresholdRect.width);
|
|
let previousElementSibling = target.previousElementSibling;
|
|
let num2 = 0;
|
|
let obj = target;
|
|
const diff = bound - Math.max(targetRect.x, thresholdRect.x);
|
|
if (null != previousElementSibling) {
|
|
const nodeName = previousElementSibling.nodeName;
|
|
let num5 = 0;
|
|
num2 = 0;
|
|
obj = target;
|
|
if (nodeName.startsWith("RN:VirtualView")) {
|
|
const sum = num5 + 1;
|
|
const previousElementSibling2 = previousElementSibling.previousElementSibling;
|
|
num2 = sum;
|
|
obj = previousElementSibling;
|
|
while (sum < 3) {
|
|
num2 = sum;
|
|
obj = previousElementSibling;
|
|
if (null == previousElementSibling2) {
|
|
break;
|
|
} else {
|
|
let nodeName2 = previousElementSibling2.nodeName;
|
|
previousElementSibling = previousElementSibling2;
|
|
num5 = sum;
|
|
num2 = sum;
|
|
obj = tmp9;
|
|
if (!nodeName2.startsWith("RN:VirtualView")) {
|
|
break;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (0 < num2) {
|
|
let result = (target.getBoundingClientRect().left - obj.getBoundingClientRect().left) / num2;
|
|
} else {
|
|
result = FALLBACK_ESTIMATED_WIDTH;
|
|
}
|
|
c0 = result;
|
|
const obj2 = {
|
|
itemCount: diff / result,
|
|
spacerStyle(arg0) {
|
|
return { width: arg0 * c0 };
|
|
}
|
|
};
|
|
return obj2;
|
|
} else {
|
|
const _Error = Error;
|
|
const error = new Error("Expected target to be a ReactNativeElement. VirtualRow requires DOM APIs to be enabled in React Native.");
|
|
throw error;
|
|
}
|
|
}
|
|
};
|