77 lines
2.9 KiB
JavaScript
77 lines
2.9 KiB
JavaScript
// Metro module 9717 (f9718).
|
|
import { DATA_LENGTH } from "./Module9718";
|
|
let isAutoFillData;
|
|
const SINGLE_ITEM = DATA_LENGTH.SINGLE_ITEM;
|
|
const DOUBLE_ITEM = DATA_LENGTH.DOUBLE_ITEM;
|
|
const isAutoFillData2 = function isAutoFillData(a0) {
|
|
return !!a0.loop && !!a0.autoFillData;
|
|
};
|
|
isAutoFillData2.__closure = {};
|
|
isAutoFillData2.__workletHash = 3243810595903;
|
|
isAutoFillData2.__initData = {
|
|
code: "function isAutoFillData_Pnpm_computedWithAutoFillDataTs1(params){return!!params.loop&&!!params.autoFillData;}"
|
|
};
|
|
isAutoFillData = isAutoFillData2;
|
|
export function convertToSharedIndex({ loop, rawDataLength, index, autoFillData }) {
|
|
if (!!loop && !!autoFillData) {
|
|
if (SINGLE_ITEM === rawDataLength) {
|
|
return 0;
|
|
}
|
|
if (DOUBLE_ITEM === rawDataLength) {
|
|
return index % 2;
|
|
}
|
|
}
|
|
return index;
|
|
}
|
|
convertToSharedIndex.__closure = {
|
|
isAutoFillData,
|
|
SINGLE_ITEM,
|
|
DOUBLE_ITEM
|
|
};
|
|
convertToSharedIndex.__workletHash = 6582547575185;
|
|
convertToSharedIndex.__initData = {
|
|
code: "function convertToSharedIndex_Pnpm_computedWithAutoFillDataTs2(params){const{isAutoFillData,SINGLE_ITEM,DOUBLE_ITEM}=this.__closure;const{loop:loop,rawDataLength:rawDataLength,index:index,autoFillData:autoFillData}=params;if(isAutoFillData({loop:loop,autoFillData:autoFillData})){switch(rawDataLength){case SINGLE_ITEM:return 0;case DOUBLE_ITEM:return index%2;}}return index;}"
|
|
};
|
|
export function computedOffsetXValueWithAutoFillData({ rawDataLength, value, size, loop, autoFillData }) {
|
|
if (!!loop && !!autoFillData) {
|
|
if (SINGLE_ITEM === rawDataLength) {
|
|
return value % size;
|
|
}
|
|
if (DOUBLE_ITEM === rawDataLength) {
|
|
return value % (2 * size);
|
|
}
|
|
}
|
|
return value;
|
|
}
|
|
computedOffsetXValueWithAutoFillData.__closure = {
|
|
isAutoFillData,
|
|
SINGLE_ITEM,
|
|
DOUBLE_ITEM
|
|
};
|
|
computedOffsetXValueWithAutoFillData.__workletHash = 4588043425301;
|
|
computedOffsetXValueWithAutoFillData.__initData = {
|
|
code: "function computedOffsetXValueWithAutoFillData_Pnpm_computedWithAutoFillDataTs3(params){const{isAutoFillData,SINGLE_ITEM,DOUBLE_ITEM}=this.__closure;const{rawDataLength:rawDataLength,value:value,size:size,loop:loop,autoFillData:autoFillData}=params;if(isAutoFillData({loop:loop,autoFillData:autoFillData})){switch(rawDataLength){case SINGLE_ITEM:return value%size;case DOUBLE_ITEM:return value%(size*2);}}return value;}"
|
|
};
|
|
export function computedRealIndexWithAutoFillData({ index, dataLength, loop, autoFillData }) {
|
|
if (!!loop && !!autoFillData) {
|
|
if (SINGLE_ITEM === dataLength) {
|
|
return index % 1;
|
|
}
|
|
if (DOUBLE_ITEM === dataLength) {
|
|
return index % 2;
|
|
}
|
|
}
|
|
return index;
|
|
}
|
|
export function computedFillDataWithAutoFillData({ data, loop, autoFillData, dataLength }) {
|
|
if (!!loop && !!autoFillData) {
|
|
if (SINGLE_ITEM === dataLength) {
|
|
return [data[0], data[0], data[0]];
|
|
}
|
|
if (DOUBLE_ITEM === dataLength) {
|
|
return [data[0], data[1], data[0], data[1]];
|
|
}
|
|
}
|
|
return data;
|
|
}
|