decord/source/modules/hotspot/HotspotStore.tsx

103 lines
3.1 KiB
TypeScript
Raw Normal View History

2026-08-24 06:08:38 +00:00
// Module ID: 7232
// Function ID: 7233
2026-07-29 08:29:29 +00:00
// Name: set
2026-08-24 06:08:38 +00:00
// Dependencies: [683, 589, 4847, 709, 2]
2026-07-20 16:05:17 +00:00
2026-08-24 06:08:38 +00:00
// Module 7232 (set)
import initializeDefault from "initialize" /* 589 */;
import CONFERENCE_MODE_ENABLED2 from "CONFERENCE_MODE_ENABLED" /* 683 */;
import dispatcherDefault from "dispatcher" /* 709 */;
import get from "get" /* 4847 */;
import set from "set" /* 2 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
const CONFERENCE_MODE_ENABLED = CONFERENCE_MODE_ENABLED2.CONFERENCE_MODE_ENABLED;
2026-07-23 10:11:24 +00:00
let set = new Set();
2026-07-29 08:29:29 +00:00
let closure_4 = {};
2026-08-24 06:08:38 +00:00
const PersistedStore = initializeDefault.PersistedStore;
2026-07-29 08:29:29 +00:00
class HotspotStore extends PersistedStore {
}
const prototype = HotspotStore.prototype;
prototype["initialize"] = function initialize(hiddenHotspots) {
if (null != hiddenHotspots) {
const _Array = Array;
if (Array.isArray(hiddenHotspots.hiddenHotspots)) {
const _Set = Set;
2026-08-24 06:08:38 +00:00
set = new Set(hiddenHotspots.hiddenHotspots);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
if (null != hiddenHotspots.hotspotOverrides) {
const hotspotOverrides = hiddenHotspots.hotspotOverrides;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
}
};
prototype["hasHotspot"] = function hasHotspot(LIVE_STAGE_NOTIFICATION_BADGE) {
let flag = arg1;
if (arg1 === undefined) {
flag = false;
}
let tmp = !flag;
if (!flag) {
tmp = dependencyMap[LIVE_STAGE_NOTIFICATION_BADGE];
}
let tmp3 = !CONFERENCE_MODE_ENABLED;
if (!CONFERENCE_MODE_ENABLED) {
2026-08-24 06:08:38 +00:00
const ProcessArgs = get.ProcessArgs;
2026-07-29 08:29:29 +00:00
const isDisallowPopupsSetResult = ProcessArgs.isDisallowPopupsSet();
let tmp7 = !isDisallowPopupsSetResult;
if (!isDisallowPopupsSetResult) {
if (!tmp) {
tmp = !set.has(LIVE_STAGE_NOTIFICATION_BADGE);
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp7 = tmp;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
tmp3 = tmp7;
}
return tmp3;
};
prototype["hasHiddenHotspot"] = function hasHiddenHotspot(HUB_SECOND_EMAIL_CONNECTION_UPSELL) {
return set.has(HUB_SECOND_EMAIL_CONNECTION_UPSELL);
};
prototype["getHotspotOverride"] = function getHotspotOverride(arg0) {
return dependencyMap[arg0];
};
prototype["getState"] = function getState() {
return { hiddenHotspots: set, hotspotOverrides: closure_4 };
};
HotspotStore.displayName = "HotspotStore";
HotspotStore.persistKey = "hotspots";
const items = [
2026-07-20 16:05:17 +00:00
(arg0) => {
2026-07-29 08:29:29 +00:00
let hiddenHotspots = arg0;
if (arg0 == null) {
hiddenHotspots = [];
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
return { hiddenHotspots, hotspotOverrides: {} };
2026-07-20 16:05:17 +00:00
}
];
2026-07-29 08:29:29 +00:00
HotspotStore.migrations = items;
2026-08-24 06:08:38 +00:00
const hotspotStore = new HotspotStore(dispatcherDefault, {
2026-07-20 16:05:17 +00:00
OVERLAY_INITIALIZE: function handleOverlayInitialize(hiddenHotspots) {
2026-08-24 06:08:38 +00:00
set = new Set(hiddenHotspots.hiddenHotspots);
2026-07-20 16:05:17 +00:00
},
HOTSPOT_HIDE: function handleHotspotHide(location) {
const _location = location.location;
if (set.has(_location)) {
return false;
} else {
set.add(_location);
}
},
HOTSPOT_OVERRIDE_SET: function handleSetHotspotOverride(location) {
2026-07-29 08:29:29 +00:00
closure_4[location.location] = location.enabled;
2026-07-20 16:05:17 +00:00
},
HOTSPOT_OVERRIDE_CLEAR: function handleClearHotspotOverride(arg0) {
2026-07-29 08:29:29 +00:00
if (null == dependencyMap[arg0.location]) {
2026-07-20 16:05:17 +00:00
return false;
} else {
2026-07-23 10:11:24 +00:00
delete tmp[tmp2];
2026-07-20 16:05:17 +00:00
}
}
});
2026-07-29 08:29:29 +00:00
const result = set.fileFinishedImporting("modules/hotspot/HotspotStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default hotspotStore;