/* Metro module 4864; source: stores/UserGuildSettingsStore.tsx; dependencies: [6, 7, 15, 17, 18, 1937, 3786, 1383, 1379, 1867, 1878, 661, 3796, 4865, 670, 3787, 22, 1391, 694, 21, 566, 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 SnowflakeUtils from '../utils/SnowflakeUtils.tsx'; /* Metro dependency 21 */ import defaultImport22 from '../by-id/module-00022.js'; /* Metro dependency 22 */ import Flux from '../external/discord_common/js/packages/flux/index.tsx'; /* Metro dependency 566 */ import Dispatcher from '../Dispatcher.tsx'; /* Metro dependency 694 */ import ChannelStore from './ChannelStore.tsx'; /* Metro dependency 1379 */ import GuildStore from './GuildStore.tsx'; /* Metro dependency 1867 */ import UserStore from './UserStore.tsx'; /* Metro dependency 1878 */ import ImpersonateStore from '../modules/impersonate/ImpersonateStore.tsx'; /* Metro dependency 1937 */ import JoinedThreadsStore from '../modules/threads/JoinedThreadsStore.tsx'; /* Metro dependency 3786 */ import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */ import * as ChannelRecordModule from '../records/ChannelRecord.tsx'; /* Metro dependency 1383 */ import * as FlagUtilsModule from '../external/discord_common/js/shared/utils/FlagUtils.tsx'; /* Metro dependency 1391 */ import * as MuteTimersModule from '../lib/MuteTimers.tsx'; /* Metro dependency 3787 */ import * as NotificationConstantsModule from '../modules/notifications/NotificationConstants.tsx'; /* Metro dependency 3796 */ import * as ReadStateConstantsModule from '../modules/read_states/ReadStateConstants.tsx'; /* Metro dependency 4865 */ function _fun42513(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#42513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:6, offset: 0x0113be77, size: 1101 bytes, params: 8, frame: 27 const env0_0 = require; const updateUserGuildChannelSettings = function(a0, a1, a2) { updateMultipleChannels(a0, {[a1]: computeNewChannelSettings(a0, a1, a2)}); }; const getGuildDefaults2 = getGuildDefaults; const convertChannelOverridesToMap2 = convertChannelOverridesToMap; const processAccountNotificationSettings = function(a0) { env0_23 = importAll(dependencyMap[17]).hasFlag(a0.flags, AccountNotificationFlags.USE_NEW_NOTIFICATIONS); env0_24 = importAll(dependencyMap[17]).hasFlag(a0.flags, AccountNotificationFlags.MENTION_ON_ALL_MESSAGES); env0_25 = a0; }; const closure3 = function() { return true; }; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); let value = ChannelRecordModule; const env0_11 = value.THREAD_CHANNEL_TYPES; const env0_12 = value.isPrivate; value = require(661) /* metro dependency 661: Constants */; const HighlightSettings = value.HighlightSettings; const UserNotificationSettings = value.UserNotificationSettings; value = require(670) /* metro dependency 670: UserSettingsConstants */; const env0_19 = value.ChannelNotificationSettingsFlags; const env0_20 = value.GuildNotificationSettingsFlags; const env0_21 = {}; const env0_22 = {}; object = {flags: 0}; value = importDefault(3787) /* metro dependency 3787: MuteTimers */; value = new value(); value = importDefault(3787) /* metro dependency 3787: MuteTimers */; value = new value(); object = {'suppress_everyone': false, 'suppress_roles': false, 'mute_scheduled_events': false, 'mobile_push': true, 'muted': false, 'message_notifications': null, 'flags': 0, 'channel_overrides': null, 'notify_highlights': null, 'hide_muted_channels': false, 'version': -1, 'mute_config': null}; let ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES; object.message_notifications = ALL_MESSAGES; object.channel_overrides = {}; const NULL = HighlightSettings.NULL; object.notify_highlights = NULL; const object2 = {}; ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES; const object3 = {}; copyDataProperties(object3, object, undefined); const ALL_MESSAGES2 = UserNotificationSettings.ALL_MESSAGES; object3['message_notifications'] = ALL_MESSAGES2; object2[ALL_MESSAGES] = object3; const ONLY_MENTIONS = UserNotificationSettings.ONLY_MENTIONS; const object4 = {}; copyDataProperties(object4, object, undefined); const ONLY_MENTIONS2 = UserNotificationSettings.ONLY_MENTIONS; object4['message_notifications'] = ONLY_MENTIONS2; object2[ONLY_MENTIONS] = object4; const env0_29 = {}; const env0_30 = {}; let Set = global.Set; let set = new Set(); Set = global.Set; set = new Set(); const env0_33 = {}; const env0_34 = {}; const PersistedStore = (Flux).PersistedStore; set = _fun42540(PersistedStore); set.displayName = 'UserGuildSettingsStore'; set.persistKey = 'collapsedGuilds'; set = new set(importDefault(694) /* metro dependency 694: Dispatcher */, {USER_GUILD_SETTINGS_FULL_UPDATE: function({userGuildSettings}) { userGuildSettings.forEach(_fun42592); }, USER_GUILD_SETTINGS_GUILD_UPDATE: function({guildId, settings}) { updateUserGuildSettings_42525(guildId, settings); }, USER_GUILD_SETTINGS_GUILD_AND_CHANNELS_UPDATE: function({guildId, settings}) { updateUserGuildSettings_42525(guildId, settings); updateUserGuildChannelSettingsBulk(guildId, settings.channel_overrides); }, USER_GUILD_SETTINGS_CHANNEL_UPDATE: USER_GUILD_SETTINGS_CHANNEL_UPDATE, USER_GUILD_SETTINGS_CHANNEL_UPDATE_BULK: USER_GUILD_SETTINGS_CHANNEL_UPDATE_BULK_42596, CONNECTION_OPEN: CONNECTION_OPEN_42597, CACHE_LOADED: CACHE_LOADED_42599, OVERLAY_INITIALIZE: OVERLAY_INITIALIZE_42601, GUILD_CREATE: closure3, GUILD_UPDATE: closure3, GUILD_TOGGLE_COLLAPSE_MUTED: GUILD_TOGGLE_COLLAPSE_MUTED, IMPERSONATE_UPDATE: closure3, IMPERSONATE_STOP: closure3, USER_GUILD_SETTINGS_REMOVE_PENDING_CHANNEL_UPDATES: USER_GUILD_SETTINGS_REMOVE_PENDING_CHANNEL_UPDATES, CLEAR_PENDING_CHANNEL_AND_ROLE_UPDATES: CLEAR_PENDING_CHANNEL_AND_ROLE_UPDATES_42606, NOTIFICATION_SETTINGS_UPDATE: function({settings}) { processAccountNotificationSettings(settings); }, GUILD_MUTE_EXPIRED: function() { return true; }, CHANNEL_MUTE_EXPIRED: function() { return true; }}); (FileImportTrackerModule).fileFinishedImporting('stores/UserGuildSettingsStore.tsx'); exports.default = set; exports.getGuildDefaults = getGuildDefaults2; exports.convertChannelOverridesToMap = convertChannelOverridesToMap2; function _isNativeReflectConstruct_42514() { // fn#42514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:454, offset: 0x0113c2c4, 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_42514_isNativeReflectConstruct = function() { return !!result; })(); } function updateUserGuildSettingsInternal(a0, a1) { // fn#42517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:1117, offset: 0x0113c322, size: 493 bytes, params: 3, frame: 26 var r6; var r9; var propertyName; var propertyName2; var moduleValue; var hasFlag; var flags; var OPT_IN_ENABLED; var Object; let property = env0_21[a0]; const value2 = undefined; const r12 = (property == null ? value2 : property.channel_overrides) ?? ({}); const value3 = convertChannelOverridesToMap(a1.channel_overrides); const object = {}; copyDataProperties(object, getGuildDefaults(a0), undefined); copyDataProperties(object, property, undefined); copyDataProperties(object, a1, undefined); object['channel_overrides'] = value3; let binding = env0_26; binding.clearTimer(a0); (defaultImport22).forEach(r12, _fun42518); setMuteTimers(a0, object); env0_21[a0] = object; env0_29[a0] = mutedChannelsForGuild(env0_21[a0]); const defaultImport2 = defaultImport22; const value4 = defaultImport2.filter(object.channel_overrides, function(a0) { var moduleValue = importAll(dependencyMap[17]); return moduleValue.hasFlag(a0.flags ?? 0, ChannelNotificationSettingsFlags.OPT_IN_ENABLED); }); binding = env0_30; let Set = global.Set; const value5 = value4.map(function(a0) { return a0.channel_id; }); const value6 = Object.create(Set.prototype, {constructor: {value: Set}}); let set = new Set(value5); binding[a0] = set instanceof Object ? set : value6; if (a0 != null) { Set = global.Set; property = env0_30[a0]; set = new Set(property); property = env0_33[a0]; r6 = property ?? ({}); for (propertyName in r6) { property = r6[propertyName]; moduleValue = importAll(1391) /* metro dependency 1391: FlagUtils */; hasFlag = moduleValue.hasFlag; flags = property.flags; OPT_IN_ENABLED = ChannelNotificationSettingsFlags.OPT_IN_ENABLED; if (Reflect.apply(hasFlag, moduleValue, [flags, OPT_IN_ENABLED])) { set.add(propertyName); r9 = propertyName2; } else { set.delete(propertyName); r9 = propertyName2; } } Object = global.Object; if (Object.keys(r6).length > 0) { env0_34[a0] = set; } else { delete env0_34[a0]; } } delete env0_22[a0]; return value2; function _fun42518({channel_id}) { // fn#42518, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:1373, offset: 0x0113c50f, size: 30 bytes, params: 2, frame: 11 env1_27.clearTimer(channel_id); } } function setMuteTimers(a0, a1) { // fn#42521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:1893, offset: 0x0113c574, size: 115 bytes, params: 3, frame: 17 var binding; const env0_0 = a0; if (a1.muted === true) { binding = env0_26; if (binding.setTimer(a0, a1.mute_config, _fun42522)) { a1.muted = false; } } defaultImport22.forEach(a1.channel_overrides, _fun42523); function _fun42522() { // fn#42522, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:1964, offset: 0x0113c5e7, size: 77 bytes, params: 1, frame: 15 let value = environment.__proto__; const updateUserGuildSettings_42525Binding = updateUserGuildSettings_42525; const binding = env0_0; updateUserGuildSettings_42525Binding(binding, {muted: false}); value = importDefault(694) /* metro dependency 694: Dispatcher */; value.dispatch({type: 'GUILD_MUTE_EXPIRED', guildId: binding}); } function _fun42523(a0) { // fn#42523, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:2120, offset: 0x0113c634, size: 72 bytes, params: 2, frame: 16 var environment; var value; var binding; const env0_0 = a0; if (a0.muted === true) { value = environment.__proto__; binding = env1_27; if (binding.setTimer(a0.channel_id, a0.mute_config, _fun42524)) { a0.muted = false; } } function _fun42524() { // fn#42524, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:2178, offset: 0x0113c67c, size: 99 bytes, params: 1, frame: 17 const value = environment.__proto__.__proto__; const updateUserGuildChannelSettingsBinding = updateUserGuildChannelSettings; const binding = env1_0; const binding2 = env0_0; updateUserGuildChannelSettingsBinding(binding, binding2.channel_id, {muted: false}); (Dispatcher).dispatch({type: 'CHANNEL_MUTE_EXPIRED', guildId: binding, channelId: binding2.channel_id}); } } } function updateUserGuildSettings_42525(a0, a1) { // fn#42525, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:2344, offset: 0x0113c6df, size: 68 bytes, params: 3, frame: 17 const property = env0_21[a0]; const updateUserGuildSettingsInternalBinding = updateUserGuildSettingsInternal; const object = {}; const value = property == null; const value2 = undefined; object.channel_overrides = (value ? value2 : property.channel_overrides) ?? ({}); copyDataProperties(object, a1, value); updateUserGuildSettingsInternalBinding(a0, object); return value2; } function updateUserGuildChannelSettingsBulk(a0, a1) { // fn#42527, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:2625, offset: 0x0113c74f, size: 151 bytes, params: 3, frame: 19 var binding; var object2; const env0_0 = a0; const env0_1 = a1; const value = null; let r6 = value != a0 ? env0_33[a0] : value; r6 = value == r6 ? {} : r6; (SnowflakeUtils).keys(a1).forEach(_fun42528); if (value != a0) { binding = env0_33; object2 = {}; copyDataProperties(object2, binding[a0], a1); copyDataProperties(object2, r6, a1); binding[a0] = object2; } updateMultipleChannels(a0, {}); function _fun42528(a0) { // fn#42528, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:2746, offset: 0x0113c7e6, size: 77 bytes, params: 2, frame: 17 const value = environment.__proto__; const newChannelSettings = computeNewChannelSettings(env0_0, a0, require[a0]); env0_2[a0] = newChannelSettings; env0_3[a0] = {flags: newChannelSettings.flags ?? 0}; } } function updateMultipleChannels(a0, a1) { // fn#42529, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:2898, offset: 0x0113c833, size: 93 bytes, params: 3, frame: 18 var r4; var object2; const value = a1; const property = env0_21[a0]; const value3 = undefined; const r7 = (property == null ? value3 : property.channel_overrides) ?? ({}); const updateUserGuildSettingsInternalBinding = updateUserGuildSettingsInternal; if (property == null) { r4 = value; } else { object2 = {}; copyDataProperties(object2, r7, property); copyDataProperties(object2, value, property); r4 = object2; } updateUserGuildSettingsInternalBinding(a0, {channel_overrides: r4}); return value3; } function computeNewChannelSettings(a0, a1, a2) { // fn#42530, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:3077, offset: 0x0113c890, size: 76 bytes, params: 4, frame: 15 const property = env0_21[a0]; const object = {channel_id: a1, muted: false}; const value = property == null; copyDataProperties(object, ((value ? undefined : property.channel_overrides) ?? ({}))[a1], value); copyDataProperties(object, a2, value); return object; } function getGuildDefaults(a0) { // fn#42531, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:3225, offset: 0x0113c8dc, size: 55 bytes, params: 2, frame: 12 const guild = GuildStore.getGuild(a0); return env0_28[guild != null ? guild.defaultMessageNotifications : UserNotificationSettings.ALL_MESSAGES]; } function convertChannelOverridesToMap() { // fn#42532, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:3341, offset: 0x0113c913, size: 70 bytes, params: 1, frame: 15 var r0; let value = a0; const r4 = value !== undefined ? value : {}; const Array = global.Array; if (r4 instanceof Array) { value = importDefault(22) /* metro dependency 22 */; value = value.keyBy(r4, 'channel_id'); r0 = value; } else { r0 = r4; } return r0; } function getGuildSettings(a0) { // fn#42533, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:3444, offset: 0x0113c959, size: 33 bytes, params: 2, frame: 12 return env0_21[a0] ?? getGuildDefaults(a0); } function mutedChannelsForGuild(a0) { // fn#42535, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:3680, offset: 0x0113c9e3, size: 128 bytes, params: 2, frame: 15 var r0; const Set = global.Set; const channel_overrides = a0.channel_overrides; let value = null; if (value != channel_overrides) { value = importDefault(22) /* metro dependency 22 */; value = value(a0.channel_overrides); value = value.filter(_fun42536); value = value.map(function(a0) { return a0.channel_id; }); value = value.value(); r0 = value; } else { r0 = value; } value = Object.create(Set.prototype, {constructor: {value: Set}}); const set = new Set(); return set instanceof Object ? set : value; function _fun42536(a0) { // fn#42536, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:3793, offset: 0x0113ca63, size: 41 bytes, params: 2, frame: 11 const value = environment.__proto__; return (MuteTimersModule).computeIsMuted(a0); } } function shouldUseNewUnreadBehavior() { // fn#42539, offset: 0x00e6496b, size: 9 bytes, params: 1, frame: 1 return env0_23; } function _fun42540(a0) { // fn#42540, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:3953, offset: 0x0113ca8c, size: 1098 bytes, params: 2, frame: 16 const UserGuildSettingsStoreClass2 = UserGuildSettingsStoreClass; Inherits(UserGuildSettingsStoreClass2, a0); return CreateClass(UserGuildSettingsStoreClass2, [{key: 'initialize', value: value_42542}, {key: 'getState', value: value_42545}, {key: 'mentionOnAllMessages', get: get_42546}, {key: 'isSuppressEveryoneEnabled', value: function(a0) { return getGuildSettings(a0).suppress_everyone; }}, {key: 'isSuppressRolesEnabled', value: function(a0) { return getGuildSettings(a0).suppress_roles; }}, {key: 'isMuteScheduledEventsEnabled', value: function(a0) { return getGuildSettings(a0).mute_scheduled_events; }}, {key: 'isMobilePushEnabled', value: function(a0) { return getGuildSettings(a0).mobile_push; }}, {key: 'isMuted', value: value_42551}, {key: 'isTemporarilyMuted', value: value_42552}, {key: 'getMuteConfig', value: function(a0) { return getGuildSettings(a0).mute_config; }}, {key: 'getMessageNotifications', value: function(a0) { return getGuildSettings(a0).message_notifications; }}, {key: 'getChannelOverrides', value: function(a0) { return getGuildSettings(a0).channel_overrides ?? ({}); }}, {key: 'getNotifyHighlights', value: function(a0) { return getGuildSettings(a0).notify_highlights; }}, {key: 'getGuildFlags', value: function(a0) { return getGuildSettings(a0).flags; }}, {key: 'getChannelMessageNotifications', value: function(a0, a1) { var property = this.getChannelOverrides(a0)[a1]; return property == null || property.message_notifications == null ? UserNotificationSettings.NULL : property.message_notifications; }}, {key: 'getChannelMuteConfig', value: function(a0, a1) { var property = this.getChannelOverrides(a0)[a1]; value = null; return value != property ? property.mute_config : value; }}, {key: 'getMutedChannels', value: value_42560}, {key: 'isChannelMuted', value: function(a0, a1) { var value = a0; value = this.getMutedChannels(ChannelStore.getChannel(a1)?.getGuildId() ?? value); return value.has(a1); }}, {key: 'isCategoryMuted', value: value_42562}, {key: 'resolvedMessageNotifications', value: function(a0) { var value = this.getChannelMessageNotifications(a0.guild_id, a0.id); if (value !== UserNotificationSettings.NULL) { return value; } if (a0.parent_id != null) { value = this.getChannelMessageNotifications(a0.guild_id, a0.parent_id); if (value !== UserNotificationSettings.NULL) { return value; } } return this.getMessageNotifications(a0.guild_id); }}, {key: 'resolveUnreadSetting', value: value_42564}, {key: 'isGuildOrCategoryOrChannelMuted', value: function(a0, a1) { var r0; r0 = this.isMuted(a0) || this.isCategoryMuted(a0, a1); r0 = !r0 ? this.isChannelMuted(a0, a1) : r0; return r0; }}, {key: 'allowNoMessages', value: value_42566}, {key: 'allowAllMessages', value: value_42567}, {key: 'isGuildCollapsed', value: value_42568}, {key: 'getAllSettings', value: value_42569}, {key: 'getChannelIdFlags', value: function(a0, a1) { return this.getChannelOverrides(a0)[a1]?.flags ?? 0; }}, {key: 'getChannelFlags', value: function(a0) { return this.getChannelIdFlags(a0.guild_id, a0.id); }}, {key: 'getNewForumThreadsCreated', value: value_42572}, {key: 'isOptInEnabled', value: function(a0) { return a0 != null && (ImpersonateStore.isFullServerPreview(a0) ? ImpersonateStore.isOptInEnabled(a0) : importAll(dependencyMap[17]).hasFlag(this.getGuildFlags(a0), GuildNotificationSettingsFlags.OPT_IN_CHANNELS_ON)); }}, {key: 'isChannelRecordOrParentOptedIn', value: function(a0, a1) { return a0 != null && a0.guild_id != null && (this.isChannelOptedIn(a0.guild_id, a0.id, a1) || a0.parent_id != null && this.isChannelOptedIn(a0.guild_id, a0.parent_id, a1)); }}, {key: 'isChannelOrParentOptedIn', value: value_42575}, {key: 'isChannelOptedIn', value: value_42576}, {key: 'getOptedInChannels', value: value_42577}, {key: 'getOptedInChannelsWithPendingUpdates', value: value_42578}, {key: 'getPendingChannelUpdates', value: value_42579}, {key: 'getGuildFavorites', value: value_42580}, {key: 'isFavorite', value: value_42583}, {key: 'isMessagesFavorite', value: function(a0) { return importAll(dependencyMap[17]).hasFlag(this.getChannelOverrides(null)[a0]?.flags ?? 0, ChannelNotificationSettingsFlags.FAVORITED); }}, {key: 'accountNotificationSettings', get: get_42585}, {key: 'useNewNotifications', get: get_42586}, {key: 'getGuildUnreadSetting', value: value_42587}, {key: 'resolveGuildUnreadSetting', value: value_42588}, {key: 'getChannelRecordUnreadSetting', value: function(a0) { return this.getChannelUnreadSetting(a0.guild_id, a0.id); }}, {key: 'getChannelUnreadSetting', value: value_42590}]); function UserGuildSettingsStoreClass() { // fn#42541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:3965, offset: 0x0113ced6, size: 113 bytes, params: 1, frame: 20 const value = environment.__proto__; env1_4(this, UserGuildSettingsStoreClass); const value3 = env1_7(UserGuildSettingsStoreClass); return env1_6(this, _isNativeReflectConstruct_42514() ? global.Reflect.construct(value3, arguments, env1_7(this).constructor) : value3.apply(this, arguments)); } function value_42542(a0) { // fn#42542, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:4318, offset: 0x0113cf47, size: 190 bytes, params: 2, frame: 22 var environment; var r4; var useNewNotifications; var defaultImport; var defaultImport2; const waitFor = this.waitFor; let value = environment.__proto__; Reflect.apply(waitFor, this, [ChannelStore, GuildStore, ImpersonateStore, JoinedThreadsStore, UserStore]); if (a0 != null) { useNewNotifications = a0.useNewNotifications; r4 = useNewNotifications != null && useNewNotifications; if ('userGuildSettings' in a0) { userGuildSettings = a0.userGuildSettings; defaultImport = importDefault(22) /* metro dependency 22 */; env1_30 = defaultImport.mapValues(a0.optedInChannelsByGuild ?? ({}), function(a0) { var Set = global.Set; var value = Object.create(Set.prototype, {constructor: {value: Set}}); var value2 = new Set(a0); return value2 instanceof Object ? value2 : value; }); defaultImport2 = importDefault(22) /* metro dependency 22 */; defaultImport2.forEach(userGuildSettings, _fun42544); } } function _fun42544(a0, a1) { // fn#42544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:4557, offset: 0x0113d026, size: 30 bytes, params: 3, frame: 12 const value = environment.__proto__.__proto__; env2_29[a1] = mutedChannelsForGuild(a0); } } function value_42545() { // fn#42545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:4624, offset: 0x0113d044, size: 16 bytes, params: 1, frame: 2 return {useNewNotifications: env1_23}; } function get_42546() { // fn#42546, offset: 0x00df3acd, size: 9 bytes, params: 1, frame: 1 return env1_24; } function value_42551(a0) { // fn#42551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:5123, offset: 0x0113d0b8, size: 50 bytes, params: 2, frame: 13 const value = environment.__proto__; return (MuteTimersModule).computeIsMuted(getGuildSettings(a0)); } function value_42552(a0) { // fn#42552, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:5229, offset: 0x0113d0ea, size: 50 bytes, params: 2, frame: 13 const value = environment.__proto__; return (MuteTimersModule).isTemporarilyMuted(getGuildSettings(a0)); } function value_42560(a0) { // fn#42560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:6091, offset: 0x0113d208, size: 26 bytes, params: 2, frame: 3 return env1_29[a0] ?? env1_31; } function value_42562(a0, a1) { // fn#42562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:6319, offset: 0x0113d26f, size: 72 bytes, params: 3, frame: 13 var r0; let value = environment.__proto__; value = ChannelStore.getChannel(a1); if (value == null) { return false; } const parent_id = value.parent_id; value = parent_id != null; if (value) { value = this.getMutedChannels(a0); value = value.has(parent_id); r0 = value; } else { r0 = value; } return r0; } function value_42564(a0) { // fn#42564, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:6774, offset: 0x0113d32b, size: 277 bytes, params: 2, frame: 16 var getChannelUnreadSetting; var guild_id; var value2; var UNSET; var parent_id; var value3; var getGuildUnreadSetting; var value4; if (!THREAD_CHANNEL_TYPES.has(a0.type)) { if (isPrivate(a0.type)) { return UnreadSetting.ALL_MESSAGES; } if (shouldUseNewUnreadBehavior()) { getChannelUnreadSetting = this.getChannelUnreadSetting; guild_id = a0.guild_id; value2 = Reflect.apply(getChannelUnreadSetting, this, [guild_id, a0.id]); UNSET = UnreadSetting.UNSET; if (value2 !== UNSET) { return value2; } parent_id = a0.parent_id; if (parent_id == null) { value4 = this.getGuildUnreadSetting(a0.guild_id); return value4 !== UnreadSetting.UNSET ? value4 : this.resolvedMessageNotifications(a0) === UserNotificationSettings.ALL_MESSAGES ? UnreadSetting.ALL_MESSAGES : UnreadSetting.ONLY_MENTIONS; } getChannelUnreadSetting = this.getChannelUnreadSetting; guild_id = a0.guild_id; parent_id = a0.parent_id; value3 = Reflect.apply(getChannelUnreadSetting, this, [guild_id, parent_id]); UNSET = UnreadSetting.UNSET; if (value3 !== UNSET) { return value3; } getGuildUnreadSetting = this.getGuildUnreadSetting; guild_id = a0.guild_id; value4 = Reflect.apply(getGuildUnreadSetting, this, [guild_id]); UNSET = UnreadSetting.UNSET; return value4 !== UNSET ? value4 : this.resolvedMessageNotifications(a0) === UserNotificationSettings.ALL_MESSAGES ? UnreadSetting.ALL_MESSAGES : UnreadSetting.ONLY_MENTIONS; } } return UnreadSetting.ALL_MESSAGES; } function value_42566(a0) { // fn#42566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:7415, offset: 0x0113d476, size: 100 bytes, params: 2, frame: 14 var r0; var value2; let value = this.isGuildOrCategoryOrChannelMuted(a0.guild_id, a0.id); if (value) { r0 = value; } else { value = this.resolvedMessageNotifications(a0); value2 = environment.__proto__; value = value === UserNotificationSettings.NO_MESSAGES; r0 = value; } r0 = !r0 ? this.isOptInEnabled(a0.guild_id) && !this.isChannelRecordOrParentOptedIn(a0) : r0; return r0; } function value_42567(a0) { // fn#42567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:7648, offset: 0x0113d4da, size: 103 bytes, params: 2, frame: 14 var r0; var value3; let value = this.isGuildOrCategoryOrChannelMuted(a0.guild_id, a0.id); if (value) { r0 = !value; } else { value = this.resolvedMessageNotifications(a0); value3 = environment.__proto__; value = value === UserNotificationSettings.ALL_MESSAGES; r0 = value; } r0 = r0 && (this.isOptInEnabled(a0.guild_id) ? this.isChannelRecordOrParentOptedIn(a0) : !this.isOptInEnabled(a0.guild_id)); return r0; } function value_42568(a0) { // fn#42568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:7884, offset: 0x0113d541, size: 39 bytes, params: 2, frame: 3 const value = environment.__proto__; return env1_21[a0]?.hide_muted_channels === true; } function value_42569() { // fn#42569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:7989, offset: 0x0113d568, size: 34 bytes, params: 1, frame: 3 return {userGuildSettings: env1_21, mutedChannels: env1_29, optedInChannelsByGuild: env1_30}; } function value_42572(a0) { // fn#42572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:8330, offset: 0x0113d5de, size: 186 bytes, params: 2, frame: 19 var value2; let value = this.getChannelOverrides(a0.guild_id); const property = value[a0.id]; if (property == null) { value = this.resolvedMessageNotifications(a0); value2 = environment.__proto__; return value === UserNotificationSettings.ALL_MESSAGES; } let flags = property.flags; if (flags == null) { value = this.resolvedMessageNotifications(a0); value2 = environment.__proto__; return value === UserNotificationSettings.ALL_MESSAGES; } value = environment.__proto__; let hasFlag = FlagUtilsModule.hasFlag; flags = property.flags; const NEW_FORUM_THREADS_ON = ChannelNotificationSettingsFlags.NEW_FORUM_THREADS_ON; if (Reflect.apply(hasFlag, FlagUtilsModule, [flags, NEW_FORUM_THREADS_ON])) { return true; } hasFlag = FlagUtilsModule.hasFlag; flags = property.flags; const NEW_FORUM_THREADS_OFF = ChannelNotificationSettingsFlags.NEW_FORUM_THREADS_OFF; if (Reflect.apply(hasFlag, FlagUtilsModule, [flags, NEW_FORUM_THREADS_OFF])) { return false; } value = this.resolvedMessageNotifications(a0); const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES; return value === ALL_MESSAGES; } function value_42575(a0, a1, a2) { // fn#42575, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:9013, offset: 0x0113d76e, size: 40 bytes, params: 4, frame: 14 const isChannelRecordOrParentOptedIn = this.isChannelRecordOrParentOptedIn; const value = environment.__proto__; return Reflect.apply(isChannelRecordOrParentOptedIn, this, [ChannelStore.getChannel(a1), a2]); } function value_42576(a0, a1) { // fn#42576, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:9123, offset: 0x0113d796, size: 192 bytes, params: 3, frame: 18 var r6; var property; var moduleValue; let value = a2; const value2 = undefined; const r1 = value !== value2 ? value : false; if (a0 == null) { return false; } value = environment.__proto__; const impersonateStoreBinding = ImpersonateStore; if (impersonateStoreBinding.isFullServerPreview(a0)) { return ImpersonateStore.isChannelOptedIn(a0, a1); } if (r1) { if (env1_34[a0] != null) { return env1_34[a0].has(a1); } property = this.getChannelOverrides(a0)[a1]; r6 = (property == null ? value2 : property.flags) ?? 0; moduleValue = importAll(1391) /* metro dependency 1391: FlagUtils */; return moduleValue.hasFlag(r6, ChannelNotificationSettingsFlags.OPT_IN_ENABLED); } const getChannelOverrides = this.getChannelOverrides; property = Reflect.apply(getChannelOverrides, this, [a0])[a1]; r6 = (property == null ? value2 : property.flags) ?? 0; moduleValue = importAll(1391) /* metro dependency 1391: FlagUtils */; const hasFlag = moduleValue.hasFlag; const OPT_IN_ENABLED = ChannelNotificationSettingsFlags.OPT_IN_ENABLED; return Reflect.apply(hasFlag, moduleValue, [r6, OPT_IN_ENABLED]); } function value_42577(a0) { // fn#42577, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:9419, offset: 0x0113d856, size: 74 bytes, params: 2, frame: 13 const impersonateStoreBinding = ImpersonateStore; return impersonateStoreBinding.isFullServerPreview(a0) ? ImpersonateStore.getViewingChannels(a0) ?? env1_32 : env1_30[a0] ?? env1_32; } function value_42578(a0) { // fn#42578, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:9580, offset: 0x0113d8a0, size: 16 bytes, params: 2, frame: 2 return env1_34[a0]; } function value_42579(a0) { // fn#42579, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:9644, offset: 0x0113d8b0, size: 16 bytes, params: 2, frame: 2 return env1_33[a0]; } function value_42580(a0) { // fn#42580, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:9701, offset: 0x0113d8c0, size: 131 bytes, params: 2, frame: 17 var defaultImport; var value3; const env0_0 = a0; const impersonateStoreBinding = ImpersonateStore; if (impersonateStoreBinding.isFullServerPreview(a0)) { return null; } if (env1_22[a0] == null) { defaultImport = importDefault(22) /* metro dependency 22 */; value3 = defaultImport.filter(this.getChannelOverrides(a0), _fun42581); env1_22[a0] = value3.map(function(a0) { return a0.channel_id; }); } return env1_22[a0]; function _fun42581(a0) { // fn#42581, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:9819, offset: 0x0113d943, size: 118 bytes, params: 2, frame: 18 var r0; var channelStoreBinding; let value = environment.__proto__.__proto__; const value2 = undefined; const hasFlag = FlagUtilsModule.hasFlag; const r5 = a0.flags ?? 0; const FAVORITED = ChannelNotificationSettingsFlags.FAVORITED; const hasFlag2 = Reflect.apply(hasFlag, FlagUtilsModule, [r5, FAVORITED]); if (hasFlag2) { channelStoreBinding = ChannelStore; value = channelStoreBinding.getChannel(a0.channel_id); value = (value == null ? value2 : value.guild_id) === env0_0; r0 = value; } else { r0 = hasFlag2; } return r0; } } function value_42583(a0, a1) { // fn#42583, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:10023, offset: 0x0113d9b9, size: 73 bytes, params: 3, frame: 13 var r2; var r0; let value = environment.__proto__; if (value) { r0 = !ImpersonateStore.isFullServerPreview(a0); } else { value = this.getGuildFavorites(a0); if (value == null) { r2 = undefined; } else { value = value.includes(a1); r2 = value; } value = r2 === true; r0 = value; } return r0; } function get_42585() { // fn#42585, offset: 0x00df3ad6, size: 9 bytes, params: 1, frame: 1 return env1_25; } function get_42586() { // fn#42586, offset: 0x00df3ac4, size: 9 bytes, params: 1, frame: 1 return env1_23; } function value_42587(a0) { // fn#42587, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:10459, offset: 0x0113da64, size: 164 bytes, params: 2, frame: 16 var r0; var guildFlags; var moduleValue; var moduleValue2; if (shouldUseNewUnreadBehavior()) { guildFlags = this.getGuildFlags(a0); moduleValue = importAll(1391) /* metro dependency 1391: FlagUtils */; if (moduleValue.hasFlag(guildFlags, GuildNotificationSettingsFlags.UNREADS_ALL_MESSAGES)) { r0 = UnreadSetting.ALL_MESSAGES; } else { moduleValue2 = importAll(1391) /* metro dependency 1391: FlagUtils */; r0 = moduleValue2.hasFlag(guildFlags, GuildNotificationSettingsFlags.UNREADS_ONLY_MENTIONS) ? UnreadSetting.ONLY_MENTIONS : UnreadSetting.UNSET; } return r0; } return UnreadSetting.ALL_MESSAGES; } function value_42588(a0) { // fn#42588, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:10728, offset: 0x0113db08, size: 211 bytes, params: 2, frame: 18 var r1; var r0; var moduleValue; var moduleValue2; const guildFlags = this.getGuildFlags(a0.id); if (shouldUseNewUnreadBehavior()) { moduleValue = importAll(1391) /* metro dependency 1391: FlagUtils */; if (moduleValue.hasFlag(guildFlags, GuildNotificationSettingsFlags.UNREADS_ALL_MESSAGES)) { r1 = UnreadSetting.ALL_MESSAGES; } else { moduleValue2 = importAll(1391) /* metro dependency 1391: FlagUtils */; r1 = moduleValue2.hasFlag(guildFlags, GuildNotificationSettingsFlags.UNREADS_ONLY_MENTIONS) ? UnreadSetting.ONLY_MENTIONS : a0.defaultMessageNotifications === UserNotificationSettings.ALL_MESSAGES ? UnreadSetting.ALL_MESSAGES : UnreadSetting.ONLY_MENTIONS; } r0 = r1; } else { r0 = UnreadSetting.ALL_MESSAGES; } return r0; } function value_42590(a0, a1) { // fn#42590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:11167, offset: 0x0113dbf9, size: 145 bytes, params: 3, frame: 16 var r0; var moduleValue2; let value = this.getChannelIdFlags(a0, a1); const hasFlag = FlagUtilsModule.hasFlag; const UNREADS_ALL_MESSAGES = ChannelNotificationSettingsFlags.UNREADS_ALL_MESSAGES; if (Reflect.apply(hasFlag, FlagUtilsModule, [value, UNREADS_ALL_MESSAGES])) { r0 = UnreadSetting.ALL_MESSAGES; } else { moduleValue2 = FlagUtilsModule; value = moduleValue2.hasFlag(value, ChannelNotificationSettingsFlags.UNREADS_ONLY_MENTIONS); r0 = value ? UnreadSetting.ONLY_MENTIONS : UnreadSetting.UNSET; } return r0; } } function USER_GUILD_SETTINGS_FULL_UPDATE({userGuildSettings}) { // fn#42591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:11502, offset: 0x0113dc8a, size: 30 bytes, params: 2, frame: 11 userGuildSettings.forEach(function(a0) { var updateUserGuildSettingsInternalBinding = updateUserGuildSettingsInternal; var guild_id = a0.guild_id; var object = {}; var object2 = {}; object.channel_overrides = object2; copyDataProperties(object, a0, object2); updateUserGuildSettingsInternalBinding(guild_id, object); }); function _fun42592(a0) { // fn#42592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:11579, offset: 0x0113dca8, size: 44 bytes, params: 2, frame: 14 const updateUserGuildSettingsInternalBinding = updateUserGuildSettingsInternal; const guild_id = a0.guild_id; const object = {}; const object2 = {}; object.channel_overrides = object2; copyDataProperties(object, a0, object2); updateUserGuildSettingsInternalBinding(guild_id, object); } } function USER_GUILD_SETTINGS_CHANNEL_UPDATE({guildId, channelId, settings}) { // fn#42595, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:12038, offset: 0x0113dd22, size: 98 bytes, params: 2, frame: 17 var binding; var object; if (guildId != null && settings.flags != null) { binding = env0_33; object = {}; copyDataProperties(object, binding[guildId], undefined); object[channelId] = {flags: settings.flags}; binding[guildId] = object; } updateUserGuildChannelSettings(guildId, channelId, settings); } function USER_GUILD_SETTINGS_CHANNEL_UPDATE_BULK_42596({guildId, overrides}) { // fn#42596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:12260, offset: 0x0113dd84, size: 66 bytes, params: 2, frame: 14 let r0 = guildId != null && !ImpersonateStore.isFullServerPreview(guildId); if (r0) { updateUserGuildChannelSettingsBulk(guildId, overrides); r0 = true; } return r0; } function CONNECTION_OPEN_42597(a0) { // fn#42597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:12440, offset: 0x0113ddc6, size: 204 bytes, params: 2, frame: 20 var r3; var propertyName; var propertyName2; var has; processAccountNotificationSettings(a0.notificationSettings); env0_26.reset(); env0_27.reset(); let userGuildSettings = a0.userGuildSettings; env0_21 = !userGuildSettings.partial ? {} : env0_21; const Set = global.Set; const set = new Set(); userGuildSettings = a0.userGuildSettings; userGuildSettings.entries.forEach(_fun42598); for (propertyName in env0_21) { has = set.has; if (Reflect.apply(has, set, [propertyName])) { r3 = propertyName2; continue; } setMuteTimers(propertyName, env0_21[propertyName]); r3 = propertyName2; } function _fun42598(a0) { // fn#42598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:12662, offset: 0x0113de92, size: 77 bytes, params: 2, frame: 13 var binding; if (!('channel_overrides' in a0)) { a0.channel_overrides = {}; } updateUserGuildSettingsInternal(a0.guild_id, a0); if (a0.guild_id != null) { binding = env0_0; binding.add(a0.guild_id); } } } function CACHE_LOADED_42599(a0) { // fn#42599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:12857, offset: 0x0113dedf, size: 86 bytes, params: 2, frame: 12 const userGuildSettings = a0.userGuildSettings; if (userGuildSettings != null && a0.userGuildSettings.length !== 0) { env0_21 = {}; env0_29 = {}; env0_30 = {}; a0.userGuildSettings.forEach(_fun42600); } function _fun42600(a0) { // fn#42600, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:12991, offset: 0x0113df35, size: 258 bytes, params: 2, frame: 30 var r11; var r17; var propertyName; var propertyName2; var channel_overrides2; var property; var moduleValue; var computeIsMuted; var moduleValue2; var hasFlag; var flags; var value6; var OPT_IN_ENABLED; const guild_id = a0.guild_id; env1_21[guild_id] = a0; let Set = global.Set; let set = new Set(); Set = global.Set; set = new Set(); for (propertyName in a0.channel_overrides) { channel_overrides2 = a0.channel_overrides; property = channel_overrides2[propertyName]; moduleValue = require(3787) /* metro dependency 3787: MuteTimers */; computeIsMuted = moduleValue.computeIsMuted; if (!Reflect.apply(computeIsMuted, moduleValue, [property])) { continue; } set.add(propertyName); moduleValue2 = importAll(1391) /* metro dependency 1391: FlagUtils */; hasFlag = moduleValue2.hasFlag; flags = property.flags; value6 = 0; if (flags != null) { r17 = flags; continue; } r17 = value6; continue; OPT_IN_ENABLED = ChannelNotificationSettingsFlags.OPT_IN_ENABLED; if (!Reflect.apply(hasFlag, moduleValue2, [r17, OPT_IN_ENABLED])) { r11 = propertyName2; continue; } set.add(propertyName); r11 = propertyName2; } env1_29[guild_id] = set; env1_30[guild_id] = set; } } function OVERLAY_INITIALIZE_42601({allUserGuildSettings}) { // fn#42601, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:13250, offset: 0x0113e037, size: 150 bytes, params: 2, frame: 18 const userGuildSettings = allUserGuildSettings.userGuildSettings; const mutedChannels = allUserGuildSettings.mutedChannels; const optedInChannelsByGuild = allUserGuildSettings.optedInChannelsByGuild; copyDataProperties({}, userGuildSettings, mutedChannels); env0_29 = {}; env0_30 = {}; let value = importDefault(21) /* metro dependency 21: SnowflakeUtils */; value = value.keys(mutedChannels); value.forEach(_fun42602); value = importDefault(21) /* metro dependency 21: SnowflakeUtils */; value = value.keys(optedInChannelsByGuild); value.forEach(_fun42603); function _fun42602(a0) { // fn#42602, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:13425, offset: 0x0113e0cd, size: 57 bytes, params: 2, frame: 13 const value = environment.__proto__; const binding = env1_29; const Set = global.Set; binding[a0] = new Set(mutedChannels[a0]); } function _fun42603(a0) { // fn#42603, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:13477, offset: 0x0113e106, size: 57 bytes, params: 2, frame: 13 const value = environment.__proto__; const binding = env1_30; const Set = global.Set; binding[a0] = new Set(optedInChannelsByGuild[a0]); } } function GUILD_TOGGLE_COLLAPSE_MUTED({guildId}) { // fn#42604, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:13594, offset: 0x0113e13f, size: 103 bytes, params: 2, frame: 14 var r4; var r3; var getGuildDefaultsBinding; if (env0_21[guildId] == null) { getGuildDefaultsBinding = getGuildDefaults; r3 = getGuildDefaultsBinding(guildId); r4 = getGuildDefaultsBinding; } else { r3 = env0_21[guildId]; } const binding = env0_21; const object = {}; copyDataProperties(object, r3, r4); object['guild_id'] = guildId; object['hide_muted_channels'] = !(r3.hide_muted_channels === true); binding[guildId] = object; } function USER_GUILD_SETTINGS_REMOVE_PENDING_CHANNEL_UPDATES({guildId, updates}) { // fn#42605, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:13881, offset: 0x0113e1a6, size: 119 bytes, params: 2, frame: 24 var r4; var propertyName; var propertyName2; var defaultImport; var isEqual; var property2; if (guildId == null) { return false; } const property = env0_33[guildId]; if (property == null) { return false; } for (propertyName in updates) { defaultImport = importDefault(22) /* metro dependency 22 */; isEqual = defaultImport.isEqual; property2 = updates[propertyName]; if (!Reflect.apply(isEqual, defaultImport, [property2, property[propertyName]])) { r4 = propertyName2; continue; } delete property[propertyName]; r4 = propertyName2; } } function CLEAR_PENDING_CHANNEL_AND_ROLE_UPDATES_42606({guildId}) { // fn#42606, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:5042:14087, offset: 0x0113e21d, size: 41 bytes, params: 2, frame: 3 if (guildId == null) { return false; } delete env0_33[guildId]; delete env0_34[guildId]; } } global.__d(_fun42513, 4864, [6, 7, 15, 17, 18, 1937, 3786, 1383, 1379, 1867, 1878, 661, 3796, 4865, 670, 3787, 22, 1391, 694, 21, 566, 2]) /* metro module 4864, dependencies: [6, 7, 15, 17, 18, 1937, 3786, 1383, 1379, 1867, 1878, 661, 3796, 4865, 670, 3787, 22, 1391, 694, 21, 566, 2] */;