decord/source/4392_allSettled.js
2026-08-24 06:08:38 +00:00

30 lines
995 B
JavaScript

// Module ID: 4392
// Function ID: 4393
// Name: allSettled
// Dependencies: [4390, 1422, 540, 4393, 4396, 4399, 4466]
// Module 4392 (allSettled)
import getEvalledConstructor from "getEvalledConstructor" /* 540 */;
import requirePromise from "requirePromise" /* 4390 */;
import callBind from "callBind" /* 1422 */;
requirePromise();
let closure_2 = callBind(getEvalledConstructor("%Promise.all%"));
let closure_3 = callBind(getEvalledConstructor("%Promise.reject%"));
export default function allSettled(arg0) {
const self = this;
if ("Object" !== self(4393)(this)) {
const _TypeError = TypeError;
const typeError = new TypeError("`this` value must be an object");
throw typeError;
} else {
return callback(this, tmp(4399)(tmp(4396)(arg0), (arg0) => {
try {
return promise.then((value) => ({ status: "fulfilled", value }), (reason) => ({ status: "rejected", reason }));
} catch (tmp3) {
return closure_1_3(tmp, tmp3);
}
}));
}
};