decord/alpha/source/modules/applications/utils/ApplicationFlagUtils.tsx

54 lines
1.7 KiB
TypeScript
Raw Normal View History

2026-10-09 10:00:15 +00:00
// Module ID: 9205
// Function ID: 9206
// Name: ApplicationFlagUtils
2026-10-09 10:00:15 +00:00
// Dependencies: [2022, 1097, 2]
2026-07-20 16:05:17 +00:00
// Exports: hasApplicationFlag
2026-10-09 10:00:15 +00:00
// Module 9205 (ApplicationFlagUtils)
2026-10-03 08:58:59 +00:00
import BigFlagUtilsAll from "BigFlagUtils" /* 1097 */;
2026-10-09 10:00:15 +00:00
import ApplicationRecord from "ApplicationRecord" /* 2022 */;
2026-10-03 08:58:59 +00:00
import size from "module_2" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-07-20 16:05:17 +00:00
function getApplicationFlags(application) {
2026-10-03 08:58:59 +00:00
let flags;
2026-07-20 16:05:17 +00:00
if (null == application) {
2026-10-03 08:58:59 +00:00
const deserializer = BigFlagUtilsAll;
flags = deserializer.deserialize(0);
2026-07-20 16:05:17 +00:00
} else {
let tmp5 = null != application;
if (tmp5) {
let tmp2 = application instanceof ApplicationRecord;
2026-07-20 16:05:17 +00:00
if (!tmp2) {
2026-08-04 21:03:28 +00:00
tmp2 = "flags" in application && typeof application.flags === "bigint";
2026-07-20 16:05:17 +00:00
}
if (!tmp2) {
2026-10-03 08:58:59 +00:00
tmp2 = "flags" in application && null != application.flags && typeof application.flags === "object" && "parts" in application.flags;
const tmp4 = "flags" in application && null != application.flags && typeof application.flags === "object" && "parts" in application.flags;
2026-07-20 16:05:17 +00:00
}
tmp5 = tmp2;
}
if (tmp5) {
2026-07-29 08:29:29 +00:00
flags = application.flags;
2026-07-20 16:05:17 +00:00
} else {
2026-07-29 08:29:29 +00:00
let num = application.flags_new;
2026-10-03 08:58:59 +00:00
const deserialize = BigFlagUtilsAll.deserialize;
BigFlagUtilsAll;
2026-07-29 08:29:29 +00:00
if (num == null) {
num = application.flags;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (num == null) {
num = 0;
2026-07-20 16:05:17 +00:00
}
2026-10-03 08:58:59 +00:00
flags = deserialize(num);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
return flags;
2026-07-20 16:05:17 +00:00
}
const result = size.fileFinishedImporting("modules/applications/utils/ApplicationFlagUtils.tsx");
2026-07-20 16:05:17 +00:00
export { getApplicationFlags };
2026-10-03 08:58:59 +00:00
export const hasApplicationFlag = function hasApplicationFlag(application, EMBEDDED_FIRST_PARTY) {
const obj = BigFlagUtilsAll;
return obj.has(getApplicationFlags(application), EMBEDDED_FIRST_PARTY);
2026-07-20 16:05:17 +00:00
};