decord/alpha/source/modules/labs/LabFeatureStore.tsx

58 lines
1.6 KiB
TypeScript
Raw Normal View History

// Module ID: 7996
// Function ID: 7997
// Name: LabFeatureStore
// Dependencies: [504, 7997, 573, 2]
2026-07-23 10:11:24 +00:00
// Module 7996 (LabFeatureStore)
import initializeDefault from "initialize" /* 504 */;
import DispatcherDefault from "Dispatcher" /* 573 */;
import LabFeaturesDefault from "LabFeatures" /* 7997 */;
2026-07-20 16:05:17 +00:00
let toggleStates = {};
2026-08-24 06:08:38 +00:00
const DeviceSettingsStore = initializeDefault.DeviceSettingsStore;
2026-07-29 08:29:29 +00:00
class LabFeatureStore extends DeviceSettingsStore {
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = LabFeatureStore.prototype;
prototype["getUserAgnosticState"] = function getUserAgnosticState() {
return { toggleStates };
2026-07-29 08:29:29 +00:00
};
prototype["initialize"] = function initialize(toggleStates) {
for (const key10008 in LabFeaturesDefault) {
2026-07-29 08:29:29 +00:00
let flag;
let tmp2 = closure_2;
if (arg0 != null) {
toggleStates = arg0.toggleStates;
if (toggleStates != null) {
flag = toggleStates[key10008];
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
if (flag == null) {
flag = false;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp2[key10008] = flag;
continue;
}
};
prototype["get"] = function get(arg0) {
let flag = toggleStates[arg0];
2026-07-29 08:29:29 +00:00
if (flag == null) {
flag = false;
}
return flag;
};
prototype["set"] = function set(arg0, arg1) {
closure_2[arg0] = arg1;
return arg1;
};
LabFeatureStore.displayName = "LabFeatureStore";
LabFeatureStore.persistKey = "LabFeatureStore";
const labFeatureStore = new LabFeatureStore(DispatcherDefault, {
2026-07-20 16:05:17 +00:00
LAB_FEATURE_TOGGLE: function handleLabFeatureToggleSet(labFeature) {
2026-07-29 08:29:29 +00:00
closure_2[labFeature.labFeature] = labFeature.enabled;
2026-07-20 16:05:17 +00:00
}
});
const size = fn(2);
const result = size.fileFinishedImporting("modules/labs/LabFeatureStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default labFeatureStore;