decord/source/5406_asyncGeneratorStep.js

37 lines
966 B
JavaScript
Raw Normal View History

2026-07-23 10:11:24 +00:00
// Module ID: 5406
2026-07-27 11:26:19 +00:00
// Function ID: 46379
2026-07-20 16:05:17 +00:00
// Name: asyncGeneratorStep
// Dependencies: []
2026-07-23 10:11:24 +00:00
// Module 5406 (asyncGeneratorStep)
2026-07-20 16:05:17 +00:00
function asyncGeneratorStep(arg0, arg1, arg2, arg3, arg4, arg5, arg6) {
const iter = arg0[arg5](arg6);
const value = iter.value;
if (iter.done) {
arg1(value);
} else {
const resolved = Promise.resolve(value);
resolved.then(arg3, arg4);
}
}
export default function _asyncToGenerator(arg0) {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
2026-07-20 16:05:17 +00:00
return function() {
2026-07-23 10:11:24 +00:00
const self = this;
2026-07-20 16:05:17 +00:00
let closure_1 = arguments;
return new Promise((arg0, arg1) => {
2026-07-23 10:11:24 +00:00
let closure_0 = arg0;
2026-07-20 16:05:17 +00:00
let closure_1 = arg1;
function _next(arg0) {
2026-07-23 10:11:24 +00:00
callback(closure_2, callback, closure_1, _next, _throw, "next", arg0);
2026-07-20 16:05:17 +00:00
}
function _throw(arg0) {
2026-07-23 10:11:24 +00:00
callback(closure_2, callback, closure_1, _next, _throw, "throw", arg0);
2026-07-20 16:05:17 +00:00
}
2026-07-23 10:11:24 +00:00
let closure_2 = self.apply(closure_0, closure_1);
2026-07-20 16:05:17 +00:00
_next(undefined);
});
};
};