decord/beta/source/modules/games/GameActionCreators.tsx
github-actions 30c0bb2ec3 chore: update source for beta 347.10
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4975.js (118.4 MB)
2026-09-24 16:03:38 +00:00

176 lines
5 KiB
TypeScript

// Module ID: 7586
// Function ID: 7587
// Name: GameActionCreators
// Dependencies: [5, 2004, 1078, 1275, 577, 2040, 12, 2]
// Exports: fetchGamesWithSupplementalData
// Module 7586 (GameActionCreators)
import DispatcherDefault from "Dispatcher" /* 577 */;
import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */;
import GameStore from "GameStore" /* 2004 */;
function requestGames() {
const self = this;
const apply = closure_7.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
}
let closure_7 = async function _requestGames(game_ids) {
c4 = 0;
c5 = 0;
c3 = 0;
return (async (arg0, value) => {
closure_2 = tmp3;
closure_129_0 = game_ids;
const HTTP = closure_2_0(dependencyMap[3]).HTTP;
const request = { url: constants.GAMES, query: { game_ids }, rejectWithError: true };
await HTTP.get(request);
if (1 === tmp7) {
c3 = 0;
closure_130_1(closure_130_2[4]).dispatch({ type: "GAME_FETCH_FAILURE", gameIds: closure_129_0 });
c5 = 3;
closure_130_1(closure_130_2[4]);
} else if (arg0 === 1) {
c5 = 3;
throw value;
} else if (arg0 !== 2) {
const body = value.body;
closure_130_1(closure_130_2[4]).dispatch({ type: "GAME_FETCH_SUCCESS", gameIds: closure_129_0, games: body });
c3 = 0;
closure_130_1(closure_130_2[4]);
}
return value;
})();
};
let closure_9 = async function _fetchGamesWithSupplementalData(arg0, value) {
if (c1 === 2) {
c1 = 3;
throw new TypeError("Generator functions may not be called on executing generators");
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw value;
} else if (arg0 === 2) {
const obj2 = { value, done: true };
return obj2;
} else {
return { value: "IconComponent", done: null };
}
} else {
try {
c1 = 2;
if (0 === c2) {
if (arg0 === 1) {
c1 = 3;
throw value;
} else if (arg0 === 2) {
c1 = 3;
const obj3 = { value, done: true };
return obj3;
} else if (0 !== length.length) {
c2 = 1;
c1 = 1;
const obj4 = { value: batchInvocationManager.queue(tmp5), done: false };
return obj4;
}
} else if (arg0 === 1) {
c1 = 3;
throw value;
} else if (arg0 === 2) {
c1 = 3;
const obj = { value, done: true };
return obj;
}
c1 = 3;
return { value: "IconComponent", done: null };
} catch (tmp7) {
c1 = tmp;
throw tmp7;
}
}
};
const Endpoints = fn(1078).Endpoints;
let closure_0 = asyncGeneratorStep(async (arg0, value) => {
if (v3 === 2) {
v3 = 3;
throw new TypeError("Generator functions may not be called on executing generators");
} else if (tmp3 === 3) {
if (arg0 === 1) {
throw value;
} else if (arg0 === 2) {
const obj3 = { value, done: true };
return obj3;
} else {
return { value: "IconComponent", done: null };
}
} else {
try {
v3 = 2;
if (0 === dependencyMap) {
if (arg0 === 1) {
v3 = 3;
throw value;
} else if (arg0 === 2) {
v3 = 3;
const obj4 = { value, done: true };
return obj4;
} else {
const obj2 = v3(dependencyMap[6]);
dependencyMap = 1;
v3 = 1;
const obj5 = { value: Promise.all(v3(dependencyMap[6]).chunk(closure_0, 20).map(requestGames)), done: false };
return obj5;
}
} else if (arg0 === 1) {
v3 = 3;
throw value;
} else if (arg0 === 2) {
v3 = 3;
const obj = { value, done: true };
return obj;
} else {
v3 = 3;
return { value: "IconComponent", done: null };
}
} catch (tmp10) {
v3 = tmp;
throw tmp10;
}
}
});
const batchInvocationManager = new fn(2040).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;
}, {
predicate(item) {
return !GameStore.hasNoData(item);
},
onQueued(gameIds) {
return DispatcherDefault.dispatch({ type: "GAME_FETCH", gameIds });
},
onCancelled(gameIds) {
return DispatcherDefault.dispatch({ type: "GAME_FETCH_CANCELLED", gameIds });
}
});
const size = fn(2);
const result = size.fileFinishedImporting("modules/games/GameActionCreators.tsx");
export const fetchGamesWithSupplementalData = function fetchGamesWithSupplementalData() {
const self = this;
const apply = closure_9.apply;
if (typeof apply === "unknown") {
let applyArgumentsResult = HermesBuiltin.applyArguments(self);
} else {
applyArgumentsResult = apply(self, arguments);
}
return applyArgumentsResult;
};