decord/source/modules/libdiscore/LibdiscoreExperimentManager.tsx

67 lines
2.3 KiB
TypeScript
Raw Normal View History

2026-07-30 10:14:41 +00:00
// Module ID: 16691
// Function ID: 16692
2026-07-29 08:29:29 +00:00
// Name: experimentStoreUpdateHandler
// Dependencies: [1212, 1869, 1866, 643, 1452, 5134, 2]
2026-07-20 16:05:17 +00:00
2026-07-30 10:14:41 +00:00
// Module 16691 (experimentStoreUpdateHandler)
2026-07-29 08:29:29 +00:00
import initialize from "initialize";
import "initialize";
2026-07-23 10:11:24 +00:00
const require = arg1;
2026-07-20 16:05:17 +00:00
function experimentStoreUpdateHandler() {
2026-07-29 08:29:29 +00:00
let obj = require(1869) /* isBlockedDomain */;
2026-07-20 16:05:17 +00:00
if (obj.isLibdiscoreInitialized()) {
2026-07-29 08:29:29 +00:00
if (!tmpResult.isExperimentSyncDisabled()) {
2026-07-20 16:05:17 +00:00
obj = {};
2026-07-29 08:29:29 +00:00
const ALL_LIBDISCORE_EXPERIMENTS = tmp(1866).ALL_LIBDISCORE_EXPERIMENTS;
for (const item10018 of ALL_LIBDISCORE_EXPERIMENTS) {
obj[item10018.id] = item10018.getCurrentConfig();
continue;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
let tmp7 = null != obj;
if (tmp7) {
tmp7 = importDefault(643)(obj, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp7) {
const experimentCacher = require(1869) /* isBlockedDomain */.getExperimentCacher();
2026-07-20 16:05:17 +00:00
const _JSON = JSON;
experimentCacher.flushToCache(JSON.stringify(obj));
2026-07-29 08:29:29 +00:00
const obj4 = require(1869) /* isBlockedDomain */;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
tmpResult = tmp(1866);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
let c4 = null;
class LibdiscoreExperimentManager extends tmp2 {
constructor() {
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
applyArgumentsResult.actions = {};
map = new Map();
applyArgumentsResult.stores = map.set(experimentStoreUpdateHandler, experimentStoreUpdateHandler);
return applyArgumentsResult;
}
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
const prototype = LibdiscoreExperimentManager.prototype;
prototype["_initialize"] = function _initialize() {
const prop = require(1866) /* items */.ALL_LIBDISCORE_EXPERIMENTS;
const item = prop.forEach((id) => {
let obj = callback(table[4]);
obj = { kind: "user", name: id.id, defaultConfig: { treatmentId: -1 }, variations: null };
const treatments = id.getTreatments();
obj[3] = Object.fromEntries(treatments.map((treatmentId) => {
treatmentId = treatmentId.treatmentId;
const items = [treatmentId, { treatmentId }];
return items;
}));
id.setExperiment(obj.createApexExperiment(obj));
});
};
prototype["_terminate"] = function _terminate() {
};
const libdiscoreExperimentManager = new LibdiscoreExperimentManager();
const result = require("items").fileFinishedImporting("modules/libdiscore/LibdiscoreExperimentManager.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default libdiscoreExperimentManager;