decord/source/modules/libdiscore/LibdiscoreExperimentManager.tsx

71 lines
2.4 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 17171
// Function ID: 17172
2026-07-29 08:29:29 +00:00
// Name: experimentStoreUpdateHandler
2026-08-24 06:08:38 +00:00
// Dependencies: [1212, 1917, 1914, 643, 1472, 5043, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 17171 (experimentStoreUpdateHandler)
import shallowEqualDefault from "shallowEqual" /* 643 */;
import items2 from "items" /* 1914 */;
import isBlockedDomain from "isBlockedDomain" /* 1917 */;
import initializeDefault from "initialize" /* 5043 */;
import closure_3 from "initialize" /* 1212 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function experimentStoreUpdateHandler() {
2026-08-24 06:08:38 +00:00
let obj = 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-08-11 06:20:06 +00:00
const ALL_LIBDISCORE_EXPERIMENTS = tmp(1914).ALL_LIBDISCORE_EXPERIMENTS;
2026-07-29 08:29:29 +00:00
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) {
2026-08-24 06:08:38 +00:00
tmp7 = shallowEqualDefault(obj, obj);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (!tmp7) {
2026-08-24 06:08:38 +00:00
const experimentCacher = isBlockedDomain.getExperimentCacher();
2026-07-20 16:05:17 +00:00
const _JSON = JSON;
experimentCacher.flushToCache(JSON.stringify(obj));
2026-08-24 06:08:38 +00:00
const obj4 = isBlockedDomain;
2026-07-20 16:05:17 +00:00
}
}
2026-08-11 06:20:06 +00:00
tmpResult = tmp(1914);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
let c4 = null;
2026-08-24 06:08:38 +00:00
initializeDefault;
2026-07-29 08:29:29 +00:00
class LibdiscoreExperimentManager extends tmp2 {
constructor() {
applyArgumentsResult = HermesBuiltin.applyArguments(new.target, new.target);
applyArgumentsResult.actions = {};
map = new Map();
2026-08-24 06:08:38 +00:00
applyArgumentsResult.stores = map.set(closure_3, experimentStoreUpdateHandler);
2026-07-29 08:29:29 +00:00
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() {
2026-08-24 06:08:38 +00:00
const prop = items2.ALL_LIBDISCORE_EXPERIMENTS;
2026-07-29 08:29:29 +00:00
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();
2026-08-24 06:08:38 +00:00
const result = require("set").fileFinishedImporting("modules/libdiscore/LibdiscoreExperimentManager.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default libdiscoreExperimentManager;