decord/source/modules/applications/useGetOrFetchApplications.tsx

61 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-07-24 07:16:23 +00:00
// Module ID: 5468
2026-07-25 08:10:48 +00:00
// Function ID: 46741
2026-07-20 16:05:17 +00:00
// Name: useGetOrFetchApplications
2026-07-25 08:10:48 +00:00
// Dependencies: [31, 4168, 620, 5463, 22, 1327, 566, 2]
2026-07-20 16:05:17 +00:00
// Exports: useGetOrFetchApplication
2026-07-24 07:16:23 +00:00
// Module 5468 (useGetOrFetchApplications)
2026-07-23 10:11:24 +00:00
import result from "result";
import _isNativeReflectConstruct from "_isNativeReflectConstruct";
2026-07-20 16:05:17 +00:00
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function useGetOrFetchApplications(arg0) {
let flag = arg1;
2026-07-23 10:11:24 +00:00
const _require = arg0;
2026-07-20 16:05:17 +00:00
if (arg1 === undefined) {
flag = true;
}
2026-07-23 10:11:24 +00:00
let dependencyMap;
dependencyMap = React.useRef([]);
2026-07-20 16:05:17 +00:00
const items = [arg0, flag];
const effect = React.useEffect(() => {
let tmp = flag;
if (flag) {
2026-07-23 10:11:24 +00:00
tmp = !lib(ref[2]).areArraysShallowEqual(lib, ref.current);
const obj = lib(ref[2]);
2026-07-20 16:05:17 +00:00
}
if (tmp) {
const obj2 = flag(ref[3]);
2026-07-23 10:11:24 +00:00
const found = flag(ref[4])(lib).filter(lib(ref[5]).isNotNullish);
const arr = flag(ref[4])(lib);
2026-07-20 16:05:17 +00:00
const applications = obj2.fetchApplications(found.uniq().value(), false);
2026-07-23 10:11:24 +00:00
ref.current = lib;
2026-07-20 16:05:17 +00:00
const iter = found.uniq();
}
}, items);
2026-07-23 10:11:24 +00:00
const items1 = [_isNativeReflectConstruct];
return _require(566).useStateFromStoresArray(items1, () => lib.map((applicationId) => {
2026-07-20 16:05:17 +00:00
let application;
if (null != applicationId) {
2026-07-23 10:11:24 +00:00
application = outer2_4.getApplication(applicationId);
2026-07-20 16:05:17 +00:00
}
return application;
}));
}
2026-07-23 10:11:24 +00:00
const result = require("shallowEqual").fileFinishedImporting("modules/applications/useGetOrFetchApplications.tsx");
2026-07-20 16:05:17 +00:00
export default useGetOrFetchApplications;
export const useGetOrFetchApplication = function useGetOrFetchApplication(applicationId, fetchesApplication) {
let flag = fetchesApplication;
if (fetchesApplication === undefined) {
flag = true;
}
if (null != applicationId) {
const items = [applicationId];
let items1 = items;
} else {
items1 = [];
}
return useGetOrFetchApplications(items1, flag)[0];
};