decord/source/modules/soundpacks/SoundpackStore.tsx
github-actions 67d978d9fb chore: update source for alpha 346.0
Skipped 1 file(s) >100MB (GitHub limit): source/__vendor/09xxx/9672_m.js (378.6 MB)
2026-09-07 16:44:02 +00:00

52 lines
1.8 KiB
TypeScript

// Module ID: 9908
// Function ID: 9909
// Name: Soundpacks
// Dependencies: [9909, 504, 573, 2]
// Module 9908 (Soundpacks)
import set from "set" /* 2 */;
import initializeDefault from "initialize" /* 504 */;
import dispatcherDefault from "dispatcher" /* 573 */;
import Soundpacks2 from "Soundpacks" /* 9909 */;
const Soundpacks = Soundpacks2.Soundpacks;
let closure_1 = { soundpack: Soundpacks.CLASSIC, lastSoundpackExperimentId: null };
const PersistedStore = initializeDefault.PersistedStore;
class SoundpackStore extends PersistedStore {
}
const prototype = SoundpackStore.prototype;
prototype["initialize"] = function initialize(arg0) {
if (null != arg0) {
closure_1 = arg0;
const _Object = Object;
const values = Object.values(Soundpacks);
if (!values.includes(closure_1.soundpack)) {
closure_1.soundpack = tmp2.CLASSIC;
}
tmp2 = Soundpacks;
}
};
prototype["getState"] = function getState() {
return closure_1;
};
prototype["getSoundpack"] = function getSoundpack() {
return closure_1.soundpack;
};
prototype["getLastSoundpackExperimentId"] = function getLastSoundpackExperimentId() {
return closure_1.lastSoundpackExperimentId;
};
SoundpackStore.displayName = "SoundpackStore";
SoundpackStore.persistKey = "SoundpackStore";
const soundpackStore = new SoundpackStore(dispatcherDefault, {
SET_SOUNDPACK: function handleSetSoundpack(forExperimentId) {
let lastSoundpackExperimentId = forExperimentId.forExperimentId;
const obj = { soundpack: forExperimentId.soundpack, lastSoundpackExperimentId: null };
if (undefined === lastSoundpackExperimentId) {
lastSoundpackExperimentId = obj.lastSoundpackExperimentId;
}
obj[1] = lastSoundpackExperimentId;
}
});
const result = set.fileFinishedImporting("modules/soundpacks/SoundpackStore.tsx");
export default soundpackStore;