/* Metro module 12495; source: modules/gateway/GatewaySocketOpCodes.tsx; dependencies: [6, 7, 15, 17, 18, 4402, 12496, 21, 639, 2] */ function _fun95147(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#95147, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:6, offset: 0x02133530, size: 256 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(6) /* metro dependency 6 */; const env0_4 = importDefault(7) /* metro dependency 7 */; const env0_5 = importDefault(15) /* metro dependency 15 */; const env0_6 = importDefault(17) /* metro dependency 17 */; const env0_7 = importDefault(18) /* metro dependency 18 */; const rtcRegionStore = importDefault(4402) /* metro dependency 4402: RTCRegionStore */; const EventEmitter = (require(639) /* metro dependency 639 */).EventEmitter; const value = _fun95151(EventEmitter); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/gateway/GatewaySocketOpCodes.tsx'); exports.default = value; const Opcode = (require(12496) /* metro dependency 12496: GatewaySocketOpcode */).Opcode; exports.Opcode = Opcode; } function _isNativeReflectConstruct_95148() { // fn#95148, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:158, offset: 0x02133630, size: 98 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_95148_isNativeReflectConstruct = function() { return !!result; })(); } function _fun95151(a0) { // fn#95151, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:357, offset: 0x02133692, size: 575 bytes, params: 2, frame: 16 const closure = GatewaySocketOpCodes; env0_7(closure, a0); return env0_4(closure, [{key: 'presenceUpdate', value: function(a0, a1, a2, a3) { var PRESENCE_UPDATE = require(dependencyMap[6]).Opcode.PRESENCE_UPDATE; this.send(PRESENCE_UPDATE, {status: a0, since: a1, activities: a2, afk: a3}); }}, {key: 'voiceStateUpdate', value: value_95154}, {key: 'voiceServerPing', value: function() { var VOICE_SERVER_PING = require(dependencyMap[6]).Opcode.VOICE_SERVER_PING; this.send(VOICE_SERVER_PING, null); }}, {key: 'requestGuildMembers', value: function(a0, {query, limit, userIds, presences}) { var REQUEST_GUILD_MEMBERS = require(dependencyMap[6]).Opcode.REQUEST_GUILD_MEMBERS; this.send(REQUEST_GUILD_MEMBERS, {guild_id: a0, query: query, limit: limit, user_ids: userIds, presences: presences}); }}, {key: 'searchRecentMembers', value: value_95158}, {key: 'updateGuildSubscriptions', value: value_95159}, {key: 'callConnect', value: function(a0) { var CALL_CONNECT = require(dependencyMap[6]).Opcode.CALL_CONNECT; this.send(CALL_CONNECT, {channel_id: a0}); }}, {key: 'streamCreate', value: value_95162}, {key: 'streamWatch', value: function(a0) { var STREAM_WATCH = require(dependencyMap[6]).Opcode.STREAM_WATCH; this.send(STREAM_WATCH, {stream_key: a0}); }}, {key: 'streamPing', value: function(a0) { var STREAM_PING = require(dependencyMap[6]).Opcode.STREAM_PING; this.send(STREAM_PING, {stream_key: a0}); }}, {key: 'streamDelete', value: function(a0) { var STREAM_DELETE = require(dependencyMap[6]).Opcode.STREAM_DELETE; this.send(STREAM_DELETE, {stream_key: a0}); }}, {key: 'streamSetPaused', value: function(a0, a1) { var STREAM_SET_PAUSED = require(dependencyMap[6]).Opcode.STREAM_SET_PAUSED; this.send(STREAM_SET_PAUSED, {stream_key: a0, paused: a1}); }}, {key: 'requestForumUnreads', value: function(a0, a1, a2) { var REQUEST_FORUM_UNREADS = require(dependencyMap[6]).Opcode.REQUEST_FORUM_UNREADS; this.send(REQUEST_FORUM_UNREADS, {guild_id: a0, channel_id: a1, threads: a2.map(_fun95168)}); }}, {key: 'requestSoundboardSounds', value: function(a0) { var REQUEST_SOUNDBOARD_SOUNDS = require(dependencyMap[6]).Opcode.REQUEST_SOUNDBOARD_SOUNDS; this.send(REQUEST_SOUNDBOARD_SOUNDS, {guild_ids: a0}); }}, {key: 'requestLastMessages', value: function(a0, a1) { var REQUEST_LAST_MESSAGES = require(dependencyMap[6]).Opcode.REQUEST_LAST_MESSAGES; this.send(REQUEST_LAST_MESSAGES, {guild_id: a0, channel_ids: a1}); }}, {key: 'getDeletedEntityIdsNotMatchingHash', value: function(a0, a1, a2, a3, a4) { var GET_DELETED_ENTITY_IDS_NOT_MATCHING_HASH = require(dependencyMap[6]).Opcode.GET_DELETED_ENTITY_IDS_NOT_MATCHING_HASH; this.send(GET_DELETED_ENTITY_IDS_NOT_MATCHING_HASH, {guild_id: a0, channel_ids_hash: a1, role_ids_hash: a2, emoji_ids_hash: a3, sticker_ids_hash: a4}); }}, {key: 'triggerGuildChannelResync', value: function(a0, a1) { var GUILD_CHANNELS_RESYNC = require(dependencyMap[6]).Opcode.GUILD_CHANNELS_RESYNC; this.send(GUILD_CHANNELS_RESYNC, {guild_id: a0, obfuscated_channel_ids: a1}); }}, {key: 'requestChannelInfo', value: function(a0, a1) { var REQUEST_CHANNEL_INFO = require(dependencyMap[6]).Opcode.REQUEST_CHANNEL_INFO; this.send(REQUEST_CHANNEL_INFO, {guild_id: a0, fields: a1}); }}, {key: 'requestChannelMemberCount', value: function(a0, a1) { var REQUEST_CHANNEL_MEMBER_COUNT = require(dependencyMap[6]).Opcode.REQUEST_CHANNEL_MEMBER_COUNT; this.send(REQUEST_CHANNEL_MEMBER_COUNT, {guild_id: a0, channel_id: a1}); }}, {key: 'remoteCommand', value: function(a0, a1) { var REMOTE_COMMAND = require(dependencyMap[6]).Opcode.REMOTE_COMMAND; this.send(REMOTE_COMMAND, {target_session_id: a0, payload: a1}); }}]); } function value_95154({guildId, channelId, selfMute, selfDeaf, selfVideo, preferredRegion, preferredRegions, videoStreamParameters, flags}) { // fn#95154, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:821, offset: 0x02133928, size: 272 bytes, params: 2, frame: 21 guildId = guildId === undefined ? null : guildId; channelId = channelId === undefined ? null : channelId; selfMute = !(selfMute === undefined) && selfMute; selfDeaf = !(selfDeaf === undefined) && selfDeaf; selfVideo = !(selfVideo === undefined) && selfVideo; preferredRegion = preferredRegion === undefined ? null : preferredRegion; preferredRegions = preferredRegions === undefined ? null : preferredRegions; videoStreamParameters = videoStreamParameters === undefined ? null : videoStreamParameters; flags = flags === undefined ? 0 : flags; const object2 = {guild_id: guildId, channel_id: channelId, self_mute: selfMute, self_deaf: selfDeaf, self_video: selfVideo, flags: flags}; if (channelId != null && RTCRegionStore.shouldIncludePreferredRegion()) { object2.preferred_region = preferredRegion; object2.preferred_regions = preferredRegions; } if (videoStreamParameters != null) { object2.tracks = videoStreamParameters?.map(function(a0) { return {type: a0.type, rid: a0.rid, quality: a0.quality}; }); } const send = this.send; const Opcode = (require(12496) /* metro dependency 12496: GatewaySocketOpcode */).Opcode; const VOICE_STATE_UPDATE = Opcode.VOICE_STATE_UPDATE; Reflect.apply(send, this, [VOICE_STATE_UPDATE, object2]); } function value_95158(a0, {query, continuationToken}) { // fn#95158, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:1610, offset: 0x02133b02, size: 118 bytes, params: 3, frame: 19 const send = this.send; let value = environment.__proto__; const Opcode = (require(12496) /* metro dependency 12496: GatewaySocketOpcode */).Opcode; const SEARCH_RECENT_MEMBERS = Opcode.SEARCH_RECENT_MEMBERS; value = null; Reflect.apply(send, this, [SEARCH_RECENT_MEMBERS, {guild_id: a0, query: value != query ? query : '', continuation_token: value != continuationToken ? continuationToken : value}]); } function value_95159(a0) { // fn#95159, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:1806, offset: 0x02133b78, size: 145 bytes, params: 2, frame: 17 const env0_1 = a0; const env0_2 = {}; const env0_3 = 0; (importDefault(21) /* metro dependency 21: SnowflakeUtils */).keys(a0).forEach(_fun95160); if (env0_3 > 0) { this.send((require(12496) /* metro dependency 12496: GatewaySocketOpcode */).Opcode.GUILD_SUBSCRIPTIONS_BULK, {subscriptions: env0_2}); } } function value_95162(a0, a1, a2) { // fn#95162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:2203, offset: 0x02133cf0, size: 91 bytes, params: 4, frame: 16 let value = a3; const r5 = value !== undefined ? value : null; const send = this.send; value = environment.__proto__; const Opcode = (require(12496) /* metro dependency 12496: GatewaySocketOpcode */).Opcode; const STREAM_CREATE = Opcode.STREAM_CREATE; Reflect.apply(send, this, [STREAM_CREATE, {type: a0, guild_id: a1, channel_id: a2, preferred_region: r5}]); } function value_95167(a0, a1, a2) { // fn#95167, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:2745, offset: 0x02133e53, size: 97 bytes, params: 4, frame: 17 const send = this.send; const Opcode = (require(12496) /* metro dependency 12496: GatewaySocketOpcode */).Opcode; const REQUEST_FORUM_UNREADS = Opcode.REQUEST_FORUM_UNREADS; const object2 = {guild_id: a0, channel_id: a1}; object2.threads = a2.map(function(a0) { return {thread_id: a0.threadId, ack_message_id: a0.ackMessageId}; }); Reflect.apply(send, this, [REQUEST_FORUM_UNREADS, object2]); } function _fun95160(a0) { // fn#95160, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12685:1856, offset: 0x02133c09, size: 168 bytes, params: 2, frame: 18 var binding; var send; var value2; const property = env0_1[a0]; const JSON = global.JSON; const length = JSON.stringify([a0, property]).length; if (env0_3 + length > 15360) { binding = env0_0; send = binding.send; value2 = environment.__proto__.__proto__; Reflect.apply(send, binding, [(require(12496) /* metro dependency 12496: GatewaySocketOpcode */).Opcode.GUILD_SUBSCRIPTIONS_BULK, {subscriptions: env0_2}]); env0_2 = {}; env0_3 = 0; } env0_2[a0] = property; env0_3 += length; }