// Module ID: 10184 // Function ID: 78754 // Name: _isNativeReflectConstruct // Dependencies: [6, 7, 15, 17, 18, 653, 477, 566, 686, 2] // Module 10184 (_isNativeReflectConstruct) import set from "set"; import initialize from "initialize"; import _possibleConstructorReturn from "_possibleConstructorReturn"; import _getPrototypeOf from "_getPrototypeOf"; import _inherits from "_inherits"; import ME from "ME"; let TTSNotificationTypes; let closure_8; const require = arg1; function _isNativeReflectConstruct() { let closure_0 = !valueOf.call(Reflect.construct(Boolean, [], () => { })); function _isNativeReflectConstruct() { return closure_0; } const result = _isNativeReflectConstruct(); } function handleSetDesktopType(desktopType) { obj.desktopType = desktopType.desktopType; } const DesktopNotificationTypes = ME.DesktopNotificationTypes; ({ NotificationPermissionTypes: closure_8, TTSNotificationTypes } = ME); let obj = { desktopType: require("set").isPlatformEmbedded ? DesktopNotificationTypes.ALL : DesktopNotificationTypes.NEVER, disableAllSounds: false, disabledSounds: [], ttsType: TTSNotificationTypes.NEVER, disableUnreadBadge: false, taskbarFlash: true, notifyMessagesInSelectedChannel: false, screenDowntimeReminder: true }; let tmp3 = ((DeviceSettingsStore) => { class NotificationSettingsStore { constructor() { self = this; tmp = outer1_2(this, NotificationSettingsStore); obj = outer1_5(NotificationSettingsStore); tmp2 = outer1_4; if (outer1_12()) { tmp6 = globalThis; _Reflect = Reflect; tmp7 = outer1_5; tmp8 = arguments; constructResult = Reflect.construct(obj, arguments, outer1_5(self).constructor); } else { tmp3 = arguments; tmp4 = arguments; constructResult = obj(...arguments); } return tmp2(self, constructResult); } } callback2(NotificationSettingsStore, DeviceSettingsStore); let obj = { key: "initialize", value(arg0) { const merged = Object.assign(outer1_10); const merged1 = Object.assign(arg0); const outer1_11 = {}; } }; const items = [obj, , , , , , , , , , ]; obj = { key: "getUserAgnosticState", value() { return outer1_11; } }; items[1] = obj; obj = { key: "getDesktopType", value() { return outer1_11.desktopType; } }; items[2] = obj; items[3] = { key: "getTTSType", value() { return outer1_11.ttsType; } }; items[4] = { key: "getDisabledSounds", value() { return outer1_11.disabledSounds; } }; items[5] = { key: "getDisableAllSounds", value() { return outer1_11.disableAllSounds; } }; items[6] = { key: "getDisableUnreadBadge", value() { return outer1_11.disableUnreadBadge; } }; items[7] = { key: "getNotifyMessagesInSelectedChannel", value() { return outer1_11.notifyMessagesInSelectedChannel; } }; items[8] = { key: "taskbarFlash", get() { return outer1_11.taskbarFlash; } }; items[9] = { key: "screenDowntimeReminder", get() { return outer1_11.screenDowntimeReminder; } }; items[10] = { key: "isSoundDisabled", value(arg0) { let disableAllSounds = outer1_11.disableAllSounds; if (!disableAllSounds) { const disabledSounds = outer1_11.disabledSounds; disableAllSounds = -1 !== disabledSounds.indexOf(arg0); } return disableAllSounds; } }; return callback(NotificationSettingsStore, items); })(require("initialize").DeviceSettingsStore); tmp3.displayName = "NotificationSettingsStore"; tmp3.persistKey = "notifications"; let items = [ (arg0) => { const obj = {}; const merged = Object.assign(arg0); obj.disabledSounds = obj.disabledSounds || []; obj.disableUnreadBadge = obj.disableUnreadBadge || false; obj.taskbarFlash = null == obj.taskbarFlash || obj.taskbarFlash; let NEVER = obj.ttsType; if (!NEVER) { NEVER = TTSNotificationTypes.NEVER; } obj.ttsType = NEVER; if (null != obj.desktopType) { return obj; } else { obj.desktopType = require(477) /* set */.isPlatformEmbedded ? DesktopNotificationTypes.ALL : DesktopNotificationTypes.NEVER; } } ]; tmp3.migrations = items; obj = { NOTIFICATIONS_SET_DESKTOP_TYPE: handleSetDesktopType, NOTIFICATIONS_SET_TTS_TYPE: function handleSetTTSType(ttsType) { obj.ttsType = ttsType.ttsType; }, NOTIFICATIONS_SET_DISABLED_SOUNDS: function handleSetDisabledSounds(sounds) { obj.disabledSounds = sounds.sounds; }, NOTIFICATIONS_TOGGLE_ALL_DISABLED: function handleToggleAllDisabled() { obj.disableAllSounds = !obj.disableAllSounds; }, NOTIFICATIONS_SET_PERMISSION_STATE: function handleSetHavePermission(enabled) { enabled = enabled.enabled; if (enabled === constants.BLOCKED) { let obj = { desktopType: DesktopNotificationTypes.NEVER }; handleSetDesktopType(obj); } else if (enabled === constants.ENABLED) { obj = { desktopType: DesktopNotificationTypes.ALL }; handleSetDesktopType(obj); } }, NOTIFICATIONS_SET_DISABLE_UNREAD_BADGE: function handleSetDisableUnreadBadge(disableUnreadBadge) { obj.disableUnreadBadge = disableUnreadBadge.disableUnreadBadge; }, NOTIFICATIONS_SET_TASKBAR_FLASH: function handleSetTaskbarFlash(taskbarFlash) { obj.taskbarFlash = taskbarFlash.taskbarFlash; }, NOTIFICATIONS_SET_NOTIFY_MESSAGES_IN_SELECTED_CHANNEL: function handleSetNotifyMessagesInSelectedChannel(notify) { obj.notifyMessagesInSelectedChannel = notify.notify; }, NOTIFICATIONS_SET_SCREEN_DOWNTIME_REMINDER: function handleSetScreenDowntimeReminder(screenDowntimeReminder) { obj.screenDowntimeReminder = screenDowntimeReminder.screenDowntimeReminder; } }; tmp3 = new tmp3(require("dispatcher"), obj); let result = require("_possibleConstructorReturn").fileFinishedImporting("stores/NotificationSettingsStore.tsx"); export default tmp3;