decord/source/3649_closestIndexTo.js

67 lines
1.6 KiB
JavaScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 3649
// Function ID: 3650
2026-07-29 08:29:29 +00:00
// Name: closestIndexTo
2026-08-24 06:08:38 +00:00
// Dependencies: [3475, 3476]
2026-07-29 08:29:29 +00:00
// Exports: default
2026-08-24 06:08:38 +00:00
// Module 3649 (closestIndexTo)
import _typeof from "_typeof" /* 3475 */;
import requiredArgs from "requiredArgs" /* 3476 */;
2026-07-29 08:29:29 +00:00
if (!_typeof) {
let obj = { default: null };
obj[0] = _typeof;
let tmp3 = obj;
} else {
tmp3 = _typeof;
}
2026-08-24 06:08:38 +00:00
_typeof = tmp3;
2026-07-29 08:29:29 +00:00
if (!requiredArgs) {
obj = { default: null };
obj[0] = requiredArgs;
let tmp5 = obj;
} else {
tmp5 = requiredArgs;
}
2026-08-24 06:08:38 +00:00
requiredArgs = tmp5;
2026-07-29 08:29:29 +00:00
export default function closestIndexTo(arg0, arg1) {
2026-08-24 06:08:38 +00:00
requiredArgs.default(2, arguments);
const defaultResult1 = _typeof.default(arg0);
2026-07-29 08:29:29 +00:00
if (isNaN(Number(defaultResult1))) {
return NaN;
} else {
const time = defaultResult1.getTime();
if (null == arg1) {
let items = [];
} else {
items = arg1;
2026-08-04 21:03:28 +00:00
if (typeof arg1.forEach !== "function") {
2026-07-29 08:29:29 +00:00
const _Array = Array;
const call = slice.call;
typeof call === "unknown" ? slice() : call(arg1);
}
}
const item = items.forEach((arg0, arg1) => {
2026-08-24 06:08:38 +00:00
const defaultResult = closure_1_0.default(arg0);
2026-07-29 08:29:29 +00:00
if (isNaN(Number(defaultResult))) {
2026-08-24 06:08:38 +00:00
closure_0 = NaN;
2026-07-29 08:29:29 +00:00
let absolute = NaN;
} else {
const _Math = Math;
absolute = Math.abs(closure_2 - defaultResult.getTime());
let tmp5 = null == closure_0;
if (!tmp5) {
const _Number = Number;
tmp5 = absolute < Number(absolute);
}
if (tmp5) {
closure_0 = arg1;
}
}
});
2026-08-24 06:08:38 +00:00
return _typeof;
2026-07-29 08:29:29 +00:00
}
};
export default exports.default;