Files
discord-decomp/sources/modules/poggermode/PoggermodeSettingsStore.tsx
T
2026-07-28 01:06:53 +03:00

163 lines
9.6 KiB
TypeScript

/* Metro module 7072; source: modules/poggermode/PoggermodeSettingsStore.tsx; dependencies: [6, 7, 15, 17, 18, 7073, 22, 566, 694, 2] */
import ClassCallCheck from '../../by-id/module-00006-ClassCallCheck.js'; /* Metro dependency 6 */
import CreateClass from '../../by-id/module-00007-CreateClass.js'; /* Metro dependency 7 */
import PossibleConstructorReturn from '../../by-id/module-00015-PossibleConstructorReturn.js'; /* Metro dependency 15 */
import Module00017 from '../../by-id/module-00017.js'; /* Metro dependency 17 */
import Inherits from '../../by-id/module-00018-Inherits.js'; /* Metro dependency 18 */
import Flux from '../../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */
import * as FileImportTrackerModule from '../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
import * as Module00022Module from '../../by-id/module-00022.js'; /* Metro dependency 22 */
import * as PoggermodeConstantsModule from './PoggermodeConstants.tsx'; /* Metro dependency 7073 */
function _fun56350(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#56350, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7250:6, offset: 0x013c5a6d, size: 447 bytes, params: 8, frame: 23
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = PoggermodeConstantsModule;
const ShakeLocation = value.ShakeLocation;
const ConfettiLocation = value.ConfettiLocation;
object = {'settingsVisible': false, 'enabled': false, 'combosEnabled': true, 'combosRequiredCount': 5,
'comboSoundsEnabled': true, 'screenshakeEnabled': true, 'screenshakeEnabledLocations': null,
'shakeIntensity': 1, 'confettiEnabled': true, 'confettiEnabledLocations': null, 'confettiSize': 16,
'confettiCount': 5, 'warningSeen': false};
let CHAT_INPUT = ShakeLocation.CHAT_INPUT;
const VOICE_USER = ShakeLocation.VOICE_USER;
const MENTION = ShakeLocation.MENTION;
object.screenshakeEnabledLocations = {[CHAT_INPUT]: true, [VOICE_USER]: false, [MENTION]: false};
CHAT_INPUT = ConfettiLocation.CHAT_INPUT;
const REACTION = ConfettiLocation.REACTION;
const MEMBER_USER = ConfettiLocation.MEMBER_USER;
const CALL_TILE = ConfettiLocation.CALL_TILE;
object.confettiEnabledLocations = {[CHAT_INPUT]: true, [REACTION]: true, [MEMBER_USER]: true, [CALL_TILE]: true};
const env0_6 = (Module00022Module).cloneDeep(object);
const DeviceSettingsStore = (Flux).DeviceSettingsStore;
value = _fun56354(DeviceSettingsStore);
value.displayName = 'PoggermodeSettingsStore';
value.persistKey = 'PoggermodeSettingsStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{POGGERMODE_SETTINGS_UPDATE: POGGERMODE_SETTINGS_UPDATE, POGGERMODE_TEMPORARILY_DISABLED: function() {
env0_5 = true;
}});
(FileImportTrackerModule).fileFinishedImporting('modules/poggermode/PoggermodeSettingsStore.tsx');
exports.default = value;
exports.initialState = object;
function _isNativeReflectConstruct_56351() { // fn#56351, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7250:197, offset: 0x013c5c2c, size: 94 bytes, params: 1, frame: 18
var Boolean;
var prototype;
var valueOf;
var call;
var Reflect;
var construct;
var closure;
var value;
var error;
try {
Boolean = global.Boolean;
prototype = Boolean.prototype;
valueOf = prototype.valueOf;
call = valueOf.call;
Reflect = global.Reflect;
construct = Reflect.construct;
Boolean = global.Boolean;
closure = function() {
};
value = Reflect.apply(construct, Reflect, [Boolean, [], closure]);
value = Reflect.apply(call, valueOf, [value]);
var result = !value;
} catch (error) {
}
return (_isNativeReflectConstruct_56351_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun56354(a0) { // fn#56354, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7250:806, offset: 0x013c5c8a, size: 275 bytes, params: 2, frame: 16
const PoggermodeSettingsStore2 = PoggermodeSettingsStore;
Inherits(PoggermodeSettingsStore2, a0);
return CreateClass(PoggermodeSettingsStore2, [{key: 'initialize', value: value_56356}, {key: 'getUserAgnosticState',
value: value_56357}, {key: 'settingsVisible', get: get_56358}, {key: 'isEnabled', value: value_56359},
{key: 'shakeIntensity', get: get_56360}, {key: 'combosRequiredCount', get: get_56361},
{key: 'screenshakeEnabled', get: get_56362}, {key: 'screenshakeEnabledLocations', get: get_56363},
{key: 'combosEnabled', get: get_56364}, {key: 'comboSoundsEnabled', get: get_56365}]);
function PoggermodeSettingsStore() { // fn#56355, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7250:818, offset: 0x00e3db8d, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_0(this, PoggermodeSettingsStore);
const value3 = env1_3(PoggermodeSettingsStore);
return env1_2(this, _isNativeReflectConstruct_56351() ? global.Reflect.construct(value3, arguments,
env1_3(this).constructor) : value3.apply(this, arguments));
}
function value_56356(a0) { // fn#56356, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7250:1151, offset: 0x013c5d9d, size: 34 bytes, params: 2, frame: 12
const object = {};
copyDataProperties(object, a0, copyDataProperties(object, env1_6, undefined));
}
function value_56357() { // fn#56357, offset: 0x00c82288, size: 9 bytes, params: 1, frame: 1
return env1_6;
}
function get_56358() { // fn#56358, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7250:1262, offset: 0x013c5dbf, size: 15 bytes, params: 1, frame: 1
return env1_6.settingsVisible;
}
function value_56359() { // fn#56359, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7250:1323, offset: 0x013c5dce, size: 160 bytes, params: 1, frame: 7
var r1;
let value = a0;
let r0 = value !== undefined ? value : {};
const confettiLocation = r0.confettiLocation;
const shakeLocation = r0.shakeLocation;
const r2 = confettiLocation == null || env1_6.confettiEnabled && env1_6.confettiEnabledLocations[confettiLocation];
value = shakeLocation == null;
if (value) {
r1 = value;
} else {
value = environment.__proto__;
r1 = env1_6.screenshakeEnabled && env1_6.screenshakeEnabledLocations[shakeLocation];
}
const settingsVisible = this.settingsVisible;
if (settingsVisible) {
value = environment.__proto__;
value = !env1_5;
r0 = value;
} else {
r0 = settingsVisible;
}
r0 = r0 && env1_6.enabled && r2 && r1;
return r0;
}
function get_56360() { // fn#56360, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7250:1580, offset: 0x013c5e6e, size: 33 bytes, params: 1, frame: 9
return this.isEnabled() ? env1_6.shakeIntensity : 0;
}
function get_56361() { // fn#56361, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7250:1667, offset: 0x013c5e8f, size: 33 bytes, params: 1, frame: 9
return this.isEnabled() ? env1_6.combosRequiredCount : 0;
}
function get_56362() { // fn#56362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7250:1758, offset: 0x013c5eb0, size: 15 bytes, params: 1, frame: 1
return env1_6.screenshakeEnabled;
}
function get_56363() { // fn#56363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7250:1838, offset: 0x013c5ebf, size: 15 bytes, params: 1, frame: 1
return env1_6.screenshakeEnabledLocations;
}
function get_56364() { // fn#56364, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7250:1913, offset: 0x013c5ece, size: 15 bytes, params: 1, frame: 1
return env1_6.combosEnabled;
}
function get_56365() { // fn#56365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7250:1979, offset: 0x013c5edd, size: 15 bytes, params: 1, frame: 1
return env1_6.comboSoundsEnabled;
}
}
function POGGERMODE_SETTINGS_UPDATE({settings}) { // fn#56366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7250:2179, offset: 0x013c5eec, size: 43 bytes, params: 2, frame: 13
const object = {};
copyDataProperties(object, settings, copyDataProperties(object, env0_6, undefined));
}
}
global.__d(_fun56350, 7072, [6, 7, 15, 17, 18, 7073, 22, 566, 694,
2]) /* metro module 7072, dependencies: [6, 7, 15, 17, 18, 7073, 22, 566, 694, 2] */;