decord/source/modules/games/GameActionCreators.tsx

234 lines
6.3 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 5384
// Function ID: 5385
2026-07-20 16:05:17 +00:00
// Name: requestGames
2026-08-24 06:08:38 +00:00
// Dependencies: [5, 4509, 676, 530, 709, 4263, 12, 2]
2026-07-20 16:05:17 +00:00
// Exports: fetchGamesWithSupplementalData
2026-08-24 06:08:38 +00:00
// Module 5384 (requestGames)
import dispatcherDefault from "dispatcher" /* 709 */;
import importDefaultResult from "asyncGeneratorStep" /* 5 */;
import closure_4 from "handleLoadMessages" /* 4509 */;
import { Endpoints } from "ME" /* 676 */;
2026-07-23 10:11:24 +00:00
2026-07-29 08:29:29 +00:00
let closure_0 = arg1;
2026-07-20 16:05:17 +00:00
function requestGames() {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _requestGames.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
function _requestGames() {
const self = this;
const tmp = importDefaultResult((arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
c4 = 0;
c5 = 0;
c3 = 0;
2026-07-29 08:29:29 +00:00
return (function*(arg0, body) {
2026-08-24 06:08:38 +00:00
dependencyMap = tmp3;
c3 = 1;
const HTTP = callback(closure_1_2[3]).HTTP;
obj1 = { url: null, query: null, rejectWithError: true };
2026-08-04 21:03:28 +00:00
obj1[0] = constants.GAMES;
const obj2 = { game_ids: null };
obj2[0] = callback;
obj1[1] = obj2;
yield HTTP.get(obj1);
if (1 === tmp7) {
c3 = 0;
const obj3 = body(709);
const obj4 = { type: "GAME_FETCH_FAILURE", gameIds: null };
obj4[1] = callback;
obj3.dispatch(obj4);
2026-07-29 08:29:29 +00:00
constants = 3;
2026-08-04 21:03:28 +00:00
} else if (arg0 === 1) {
constants = 3;
throw body;
} else if (arg0 !== 2) {
body = body.body;
const obj = body(709);
const obj5 = { type: "GAME_FETCH_SUCCESS", gameIds: null, games: null };
obj5[1] = callback;
obj5[2] = body;
obj.dispatch(obj5);
c3 = 0;
2026-07-29 08:29:29 +00:00
}
2026-08-04 21:03:28 +00:00
c3 = 0;
return body;
2026-07-29 08:29:29 +00:00
})();
});
2026-08-24 06:08:38 +00:00
closure_7 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
function _fetchGamesWithSupplementalData() {
const self = this;
const tmp = importDefaultResult((arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
c2 = 0;
c1 = 0;
2026-07-29 08:29:29 +00:00
return (function*(arg0) {
if (c1 === 2) {
c1 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
c1 = 2;
if (0 === c2) {
if (arg0 === 1) {
c1 = 3;
throw arg1;
} else if (arg0 === 2) {
c1 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else if (0 !== length.length) {
c2 = 1;
c1 = 1;
2026-08-24 06:08:38 +00:00
obj1 = { value: null, done: false };
obj1[0] = closure_1_8.queue(tmp5);
2026-07-29 08:29:29 +00:00
return obj1;
}
} else if (arg0 === 1) {
c1 = 3;
throw arg1;
} else if (arg0 === 2) {
c1 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
}
c1 = 3;
2026-08-24 06:08:38 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
} catch (tmp7) {
c1 = tmp;
throw tmp7;
}
}
})();
2026-07-20 16:05:17 +00:00
});
2026-08-24 06:08:38 +00:00
closure_9 = tmp;
2026-07-29 08:29:29 +00:00
const apply = tmp.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
}
let c3 = importDefaultResult;
closure_0 = undefined;
closure_0 = importDefaultResult((arg0) => {
2026-08-24 06:08:38 +00:00
closure_0 = arg0;
c2 = 0;
c1 = 0;
2026-07-29 08:29:29 +00:00
return (function*(arg0) {
if (v0 === 2) {
v0 = 3;
HermesBuiltin.throwTypeError();
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw arg1;
} else if (arg0 === 2) {
let obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} else {
try {
v0 = 2;
if (0 === table) {
if (arg0 === 1) {
v0 = 3;
throw arg1;
} else if (arg0 === 2) {
v0 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
2026-08-24 06:08:38 +00:00
obj1 = v0(table[6]);
2026-07-29 08:29:29 +00:00
table = 1;
v0 = 1;
obj1 = { value: null, done: false };
2026-08-24 06:08:38 +00:00
obj1[0] = Promise.all(obj1.chunk(closure_0, 20).map(closure_1_6));
2026-07-29 08:29:29 +00:00
return obj1;
}
} else if (arg0 === 1) {
v0 = 3;
throw arg1;
} else if (arg0 === 2) {
v0 = 3;
obj = { value: null, done: true };
obj[0] = arg1;
return obj;
} else {
v0 = 3;
2026-08-24 06:08:38 +00:00
return { value: "HermesInternal", done: null };
2026-07-29 08:29:29 +00:00
}
} catch (tmp10) {
v0 = tmp;
throw tmp10;
}
}
})();
});
const batchInvocationManager = new require("start").BatchInvocationManager(function() {
const self = this;
const apply = closure_0.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
}, {
2026-08-05 07:35:12 +00:00
predicate(closure_0) {
2026-08-24 06:08:38 +00:00
return !closure_4.hasNoData(closure_0);
2026-07-23 10:11:24 +00:00
},
onQueued(gameIds) {
2026-08-24 06:08:38 +00:00
let obj = dispatcherDefault;
2026-07-23 10:11:24 +00:00
obj = { type: "GAME_FETCH", gameIds };
return obj.dispatch(obj);
},
onCancelled(gameIds) {
2026-08-24 06:08:38 +00:00
let obj = dispatcherDefault;
2026-07-23 10:11:24 +00:00
obj = { type: "GAME_FETCH_CANCELLED", gameIds };
return obj.dispatch(obj);
}
});
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/games/GameActionCreators.tsx");
2026-07-20 16:05:17 +00:00
export const fetchGamesWithSupplementalData = function fetchGamesWithSupplementalData(items) {
2026-07-29 08:29:29 +00:00
const self = this;
const apply = _fetchGamesWithSupplementalData.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
2026-07-20 16:05:17 +00:00
};