/* Metro module 4610; source: modules/calls/ChannelRTCParticipants.tsx; dependencies: [6, 7, 1378, 4492, 1226, 4258, 1379, 4259, 4607, 1878, 4609, 4297, 4299, 661, 4291, 4611, 3780, 4612, 22, 4617, 4618, 4285, 2] */ function _fun39541(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39541, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:6, offset: 0x010e4767, size: 506 bytes, params: 8, frame: 21 const env0_0 = require; const closure = function({applicationId, instanceId}) { return instanceId != null ? 'activity-' + applicationId + '-' + instanceId : 'activity-' + applicationId; }; const closure2 = sortKey; 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 embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */; const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */; const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */; const callStore = importDefault(4258) /* metro dependency 4258: CallStore */; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */; const speakingStore = importDefault(4607) /* metro dependency 4607: SpeakingStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const videoStreamStore = importDefault(4609) /* metro dependency 4609: VideoStreamStore */; const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */; let value = require(4299) /* metro dependency 4299: CallConstants */; const env0_15 = value.isStreamParticipant; const env0_16 = value.ParticipantTypes; value = require(661) /* metro dependency 661: Constants */; const env0_17 = value.ActivityTypes; const env0_18 = value.ChannelTypes; const env0_19 = (require(4291) /* metro dependency 4291: Constants */).MediaEngineContextTypes; value = _fun39544(); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/ChannelRTCParticipants.tsx'); exports.default = value; exports.getEmbeddedActivityParticipantId = closure; exports.activityParticipantIdToApplicationId = function(a0) { var r0; var value = a0; if (value == null) { r0 = value; } else { value = value.split('-'); r0 = value[1]; } return r0; }; exports.sortKey = closure2; exports.areParticipantsEqual = areParticipantsEqual; exports.ChannelRTCParticipantsIndexes = {VIDEO: 'VIDEO', STREAM: 'STREAM', FILTERED: 'FILTERED', SPEAKING: 'SPEAKING', ACTIVITY: 'ACTIVITY', NOT_POPPED_OUT: 'NOT_POPPED_OUT'}; } function sortKey(a0) { // fn#39543, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:509, offset: 0x010e49af, size: 326 bytes, params: 2, frame: 17 var r5; var r4; var voiceState; var userVideo; var value6; const type = a0.type; var value; const ACTIVITY = ParticipantTypes.ACTIVITY; if (ACTIVITY === type) { return '\x01' + a0.sortKey; } const HIDDEN_STREAM = ParticipantTypes.HIDDEN_STREAM; if (HIDDEN_STREAM === type) { userVideo = a0.userVideo; value6 = '\x03'; r4 = userVideo ? '\x02' : value6; value = importDefault(4611) /* metro dependency 4611: getParticipantUserKey */; value = value(a0.userNick, a0.user); return '' + r4 + value + value6; } const STREAM = ParticipantTypes.STREAM; if (STREAM === type) { userVideo = a0.userVideo; value6 = '\x03'; r4 = userVideo ? '\x02' : value6; value = importDefault(4611) /* metro dependency 4611: getParticipantUserKey */; value = value(a0.userNick, a0.user); return '' + r4 + value + value6; } const USER = ParticipantTypes.USER; if (USER === type) { voiceState = a0.voiceState; r5 = voiceState == null ? a0.voiceState != null && a0.voiceState.selfStream ? '\x04' : '\x05' : voiceState.selfVideo ? '\x03' : a0.voiceState != null && a0.voiceState.selfStream ? '\x04' : '\x05'; value = importDefault(4611) /* metro dependency 4611: getParticipantUserKey */; value = value(a0.userNick, a0.user); return '' + r5 + value; } } function _fun39544() { // fn#39544, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:1010, offset: 0x010e4af5, size: 385 bytes, params: 1, frame: 15 return env0_4(ChannelRTCParticipants, [{key: 'version', get: function() { return this.participantByIndex.version; }}, {key: 'size', value: function(a0) { return this.participantByIndex.size(a0); }}, {key: 'toArray', value: function(a0) { return this.participantByIndex.values(a0, true); }}, {key: 'rebuild', value: value_39550}, {key: 'getParticipant', value: function(a0) { var value = this.participantByIndex.get(a0); var value2 = null; return value2 != value ? value : value2; }}, {key: 'updateEmbeddedActivities', value: function() { return this.updateParticipant('__EMBEDDED_ACTIVITIES__'); }}, {key: 'hasEmbeddedActivity', value: value_39555}, {key: 'updateParticipant', value: function(a0) { var r2; var r0; var env0_0 = this; var property = this.participants[a0]; r2 = a0 === '__EMBEDDED_ACTIVITIES__' ? this._getParticipantsForEmbeddedActivities() : this._getParticipantsForUser(a0); r0 = property != null || r2.length !== 0; if (r0) { if (property != null) { property.forEach(_fun39557); } r2.forEach(_fun39558); this.participants[a0] = r2; r0 = true; } return r0; }}, {key: 'updateParticipantSpeaking', value: function(a0) { var r1; var env0_0 = this; var env0_1 = a0; r1 = this.participants[a0]?.reduce(_fun39560, false); return r1 != null && r1; }}, {key: 'updateParticipantQuality', value: function(a0, a1, a2) { var r1; var env0_0 = this; var env0_1 = a1; var env0_2 = a2; r1 = this.participants[a0]?.reduce(_fun39562, false); return r1 != null && r1; }}, {key: 'updateGuildRingingUsers', value: function(a0, a1) { var guildRingingUsers = this.guildRingingUsers; if (a1) { guildRingingUsers.add(a0); } else { guildRingingUsers.delete(a0); } }}, {key: 'updateParticipantPoppedOut', value: function(a0, a1) { var poppedOutParticipants = this.poppedOutParticipants; if (a1) { poppedOutParticipants.add(a0); } else { poppedOutParticipants.delete(a0); } }}, {key: '_getEmbeddedActivities', value: value_39565}, {key: '_getParticipantsForEmbeddedActivities', value: function() { var env0_0 = this; return this._getEmbeddedActivities().map(_fun39568); }}, {key: '_getParticipantsForUser', value: value_39569}]); } function ChannelRTCParticipants(a0) { // fn#39545, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:1031, offset: 0x010e4c76, size: 181 bytes, params: 2, frame: 15 var environment; const value = environment.__proto__; env1_3(this, ChannelRTCParticipants); this.participants = {}; this.lastSpoke = {}; let Set = global.Set; const value3 = Object.create(Set.prototype, {constructor: {value: Set}}); let set = new Set(); this.guildRingingUsers = set instanceof Object ? set : value3; Set = global.Set; const value5 = Object.create(Set.prototype, {constructor: {value: Set}}); set = new Set(); this.poppedOutParticipants = set instanceof Object ? set : value5; const SecondaryIndexMap = (require(3780) /* metro dependency 3780: SecondaryIndexMap */).SecondaryIndexMap; this.participantByIndex = new SecondaryIndexMap(_fun39546, sortKey); this.channelId = a0; } function value_39550() { // fn#39550, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:1933, offset: 0x010e4ec8, size: 427 bytes, params: 1, frame: 21 var r10; var environment; var r3; var call; var Set; var Object; var set; var items2; const value = environment.__proto__; const channel = ChannelStore.getChannel(this.channelId); if (channel == null) { return false; } const type = channel.type; const GUILD_TEXT = ChannelTypes.GUILD_TEXT; if (type === GUILD_TEXT) { return false; } const getCall = CallStore.getCall; this.call = Reflect.apply(getCall, CallStore, [this.channelId]); if (channel.isPrivate()) { call = this.call; if (call == null) { return false; } call = this.call; if (call.unavailable) { return false; } Set = global.Set; if (channel.isGuildVocalOrThread()) { Object = global.Object; r3 = Object.keys(VoiceStateStore.getVoiceStatesForChannel(channel.id)); r10 = VoiceStateStore; } else { r3 = channel.recipients; } set = new Set(); set.add(AuthenticationStore.getId()); if (this.guildRingingUsers.size > 0) { Set = global.Set; items2 = []; arraySpread(items2, this.guildRingingUsers, arraySpread(items2, set, 0, r10), r10); set = new Set(); } else { r3 = set; } ApplicationStreamingStore.getAllActiveStreamsForChannel(this.channelId).forEach(_fun39551); this.participantByIndex.clear(); this.participants = {}; r3.forEach(_fun39552); } else { Set = global.Set; if (channel.isGuildVocalOrThread()) { Object = global.Object; r3 = Object.keys(VoiceStateStore.getVoiceStatesForChannel(channel.id)); r10 = VoiceStateStore; } else { r3 = channel.recipients; } set = new Set(); set.add(AuthenticationStore.getId()); if (this.guildRingingUsers.size > 0) { Set = global.Set; items2 = []; arraySpread(items2, this.guildRingingUsers, arraySpread(items2, set, 0, r10), r10); set = new Set(); } else { r3 = set; } ApplicationStreamingStore.getAllActiveStreamsForChannel(this.channelId).forEach(_fun39551); this.participantByIndex.clear(); this.participants = {}; r3.forEach(_fun39552); } this.updateEmbeddedActivities(); return true; } function value_39555() { // fn#39555, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:2761, offset: 0x010e50e0, size: 34 bytes, params: 1, frame: 11 const size = this.size; const value = environment.__proto__; const ACTIVITY = env1_20.ACTIVITY; return Reflect.apply(size, this, [ACTIVITY]) > 0; } function value_39556(a0) { // fn#39556, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:2836, offset: 0x010e5102, size: 128 bytes, params: 2, frame: 17 const property = this.participants[a0]; const r2 = a0 === '__EMBEDDED_ACTIVITIES__' ? this._getParticipantsForEmbeddedActivities() : this._getParticipantsForUser(a0); let r0 = property != null || r2.length !== 0; if (r0) { if (property != null) { property.forEach(_fun39557); } r2.forEach(_fun39558); this.participants[a0] = r2; r0 = true; } return r0; } function value_39559(a0) { // fn#39559, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:3178, offset: 0x010e51c9, size: 68 bytes, params: 2, frame: 15 const env0_1 = a0; const r1 = this.participants[a0]?.reduce(_fun39560, false); return r1 != null && r1; } function value_39561(a0, a1, a2) { // fn#39561, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:3675, offset: 0x010e5331, size: 78 bytes, params: 4, frame: 15 const env0_1 = a1; const env0_2 = a2; const r1 = this.participants[a0]?.reduce(_fun39562, false); return r1 != null && r1; } function value_39565() { // fn#39565, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:4161, offset: 0x010e543a, size: 122 bytes, params: 1, frame: 17 var environment; var r0; var uniqBy; var items2; var value4; let value = environment.__proto__; const embeddedActivitiesForChannel = EmbeddedActivitiesStore.getEmbeddedActivitiesForChannel(this.channelId); const selfEmbeddedActivityForChannel = EmbeddedActivitiesStore.getSelfEmbeddedActivityForChannel(this.channelId); if (selfEmbeddedActivityForChannel == null) { r0 = embeddedActivitiesForChannel; } else { value = require(22) /* metro dependency 22 */; uniqBy = value.uniqBy; items2 = []; value4 = arraySpread(items2, embeddedActivitiesForChannel, 0, embeddedActivitiesForChannel); items2[value4] = selfEmbeddedActivityForChannel; value4 + 1; value = Reflect.apply(uniqBy, value, [items2, function(a0) { return a0.compositeInstanceId; }]); r0 = value; } return r0; } function value_39567() { // fn#39567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:4405, offset: 0x010e54bf, size: 38 bytes, params: 1, frame: 11 return this._getEmbeddedActivities().map(_fun39568); } function value_39569(a0) { // fn#39569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:4870, offset: 0x010e55b7, size: 1005 bytes, params: 2, frame: 28 var r8; var r2; var r6; var r12; var type; var r14; var selfVideo; var has; var object2; var getUserStreamData; var id; var property; var defaultImport; var isLocalVideoDisabled; var poppedOutParticipants; var value20; var participant; var STREAM; var object3; var object6; const items2 = []; let value = environment.__proto__; const user = UserStore.getUser(a0); const value3 = null; if (value3 != user) { var voiceStateForChannel = VoiceStateStore.getVoiceStateForChannel(this.channelId, a0); var voicePlatformForChannel = VoiceStateStore.getVoicePlatformForChannel(this.channelId, a0); var channel = ChannelStore.getChannel(this.channelId); var value7 = undefined; r8 = value3 == channel ? value7 : channel.getGuildId(); var call = this.call; r2 = value3 == call || value3 == call.ringing ? value7 : call.ringing.includes(a0); r2 = !r2 ? this.guildRingingUsers.has(a0) : r2; var r5 = value3 != r2 && r2; if (value3 != voiceStateForChannel || r5) { object2 = {}; object2.type = ParticipantTypes.USER; copyDataProperties(object2, VideoStreamStore.getUserStreamData(a0, r8), undefined); object2['user'] = user; id = user.id; object2['id'] = id; object2['voiceState'] = voiceStateForChannel; object2['voicePlatform'] = voicePlatformForChannel; object2['speaking'] = (require(4612) /* metro dependency 4612: useIsSpeaking */).getIsSpeaking({userId: a0, checkIsMuted: true}); property = this.lastSpoke[a0]; object2['lastSpoke'] = value3 != property ? property : 0; object2['soundsharing'] = SpeakingStore.isSoundSharing(a0); object2['ringing'] = r5; defaultImport = importDefault(4617) /* metro dependency 4617: NicknameUtils */; object2['userNick'] = defaultImport.getName(r8, this.channelId, user); object2['userAvatarDecoration'] = (require(4618) /* metro dependency 4618: useAvatarDecoration */).getAvatarDecoration(user, r8); isLocalVideoDisabled = MediaEngineStore.isLocalVideoDisabled; id = user.id; object2['localVideoDisabled'] = Reflect.apply(isLocalVideoDisabled, MediaEngineStore, [id]); poppedOutParticipants = this.poppedOutParticipants; has = poppedOutParticipants.has; id = user.id; object2['isPoppedOut'] = Reflect.apply(has, poppedOutParticipants, [id]); items2.push(object2); } var streamForUser = ApplicationStreamingStore.getStreamForUser(a0, r8); r5 = value3 != streamForUser ? streamForUser : ApplicationStreamingStore.getActiveStreamForUser(a0, r8); if (value3 != r5) { if (r5.channelId === this.channelId) { value20 = (require(4285) /* metro dependency 4285: StreamKeyUtils */).encodeStreamKey(r5); participant = this.getParticipant(value20); r12 = r5.ownerId === AuthenticationStore.getId() && ApplicationStreamingStore.isSelfStreamHidden(this.channelId); type = value3 == participant ? value7 : participant.type; STREAM = ParticipantTypes.STREAM; if (type !== STREAM) { r6 = value3; } else { if (value3 != participant.maxResolution) { object3 = {}; copyDataProperties(object3, participant.maxResolution, undefined); r14 = object3; } else { r14 = value7; } r6 = {maxResolution: r14, maxFrameRate: participant.maxFrameRate}; } object6 = {}; getUserStreamData = VideoStreamStore.getUserStreamData; STREAM = MediaEngineContextTypes.STREAM; copyDataProperties(object6, Reflect.apply(getUserStreamData, VideoStreamStore, [a0, r8, STREAM]), undefined); copyDataProperties(object6, r6, undefined); r12 = r12 ? ParticipantTypes.HIDDEN_STREAM : ParticipantTypes.STREAM; object6['type'] = r12; object6['id'] = value20; selfVideo = value3 == voiceStateForChannel ? value7 : voiceStateForChannel.selfVideo; object6['userVideo'] = value3 != selfVideo && selfVideo; object6['user'] = user; value = importDefault(4617) /* metro dependency 4617: NicknameUtils */; value = value.getName(r8, this.channelId, user); object6['userNick'] = value; object6['stream'] = r5; value = this.poppedOutParticipants.has(value20); object6['isPoppedOut'] = value; items2.push(object6); } } } return items2; } function _fun39546(a0) { // fn#39546, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:1259, offset: 0x010e4d2b, size: 345 bytes, params: 2, frame: 14 var voiceState; const items2 = []; let type = a0.type; let USER = ParticipantTypes.USER; let r2 = type === USER && a0.speaking; if (r2) { items2.push(env2_20.SPEAKING); } type = a0.type; USER = ParticipantTypes.USER; if (type !== USER) { if (isStreamParticipant(a0)) { items2.push(env2_20.STREAM); r2 = a0.type === ParticipantTypes.HIDDEN_STREAM || a0.streamId == null; r2 = !r2 ? a0.isPoppedOut : r2; if (!r2) { items2.push(env2_20.FILTERED); } } } else { voiceState = a0.voiceState; if (voiceState == null) { if (isStreamParticipant(a0)) { items2.push(env2_20.STREAM); r2 = a0.type === ParticipantTypes.HIDDEN_STREAM || a0.streamId == null; r2 = !r2 ? a0.isPoppedOut : r2; if (!r2) { items2.push(env2_20.FILTERED); } } } else if (voiceState.selfVideo) { items2.push(env2_20.VIDEO); if (!(a0.localVideoDisabled || a0.isPoppedOut)) { items2.push(env2_20.FILTERED); } } else if (isStreamParticipant(a0)) { items2.push(env2_20.STREAM); r2 = a0.type === ParticipantTypes.HIDDEN_STREAM || a0.streamId == null; r2 = !r2 ? a0.isPoppedOut : r2; if (!r2) { items2.push(env2_20.FILTERED); } } } type = a0.type; const ACTIVITY = ParticipantTypes.ACTIVITY; if (type === ACTIVITY) { items2.push(env2_20.ACTIVITY); } if (!('isPoppedOut' in a0 && a0.isPoppedOut)) { items2.push(env2_20.NOT_POPPED_OUT); } return items2; } function _fun39551({ownerId}) { // fn#39551, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:2383, offset: 0x010e5073, size: 28 bytes, params: 2, frame: 11 return env0_1.add(ownerId); } function _fun39557({id}) { // fn#39557, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:3012, offset: 0x010e5182, size: 35 bytes, params: 2, frame: 11 env0_0.participantByIndex.delete(id); } function _fun39558(a0) { // fn#39558, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:3067, offset: 0x010e51a5, size: 36 bytes, params: 2, frame: 13 const participantByIndex = env0_0.participantByIndex; participantByIndex.set(a0.id, a0); } function _fun39560(a0, a1) { // fn#39560, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:3262, offset: 0x010e520d, size: 292 bytes, params: 3, frame: 20 var r0; var value3; var moduleValue; var getIsSpeaking; var object2; var binding; var value5; var value6; var isSoundSharing2; var participantByIndex; var get; var id; var value7; var lastSpoke; var Date; var set; const value = a0; const type = a1.type; const USER = ParticipantTypes.USER; if (type === USER) { value3 = undefined; moduleValue = require(4612) /* metro dependency 4612: useIsSpeaking */; getIsSpeaking = moduleValue.getIsSpeaking; object2 = {}; binding = env0_1; object2.userId = binding; value5 = true; object2.checkIsMuted = value5; value6 = Reflect.apply(getIsSpeaking, moduleValue, [object2]); isSoundSharing2 = SpeakingStore.isSoundSharing(binding); participantByIndex = env0_0.participantByIndex; get = participantByIndex.get; id = a1.id; value7 = Reflect.apply(get, participantByIndex, [id]); if ((value7 == null ? value3 : value7.type) !== ParticipantTypes.USER) { if (value6) { lastSpoke = env0_0.lastSpoke; binding = env0_1; Date = global.Date; lastSpoke[binding] = Date.now(); } binding = env0_0; participantByIndex = binding.participantByIndex; set = participantByIndex.set; id = a1.id; object2 = {}; copyDataProperties(object2, a1, value6); object2['speaking'] = value6; lastSpoke = binding.lastSpoke; object2['lastSpoke'] = lastSpoke[env0_1]; object2['soundsharing'] = isSoundSharing2; Reflect.apply(set, participantByIndex, [id, object2]); r0 = value5; } else if (value7.speaking !== value6) { if (value6) { lastSpoke = env0_0.lastSpoke; binding = env0_1; Date = global.Date; lastSpoke[binding] = Date.now(); } binding = env0_0; participantByIndex = binding.participantByIndex; set = participantByIndex.set; id = a1.id; object2 = {}; copyDataProperties(object2, a1, value6); object2['speaking'] = value6; lastSpoke = binding.lastSpoke; object2['lastSpoke'] = lastSpoke[env0_1]; object2['soundsharing'] = isSoundSharing2; Reflect.apply(set, participantByIndex, [id, object2]); r0 = value5; } else if (value7.soundsharing === isSoundSharing2) { r0 = value; } else { if (value6) { lastSpoke = env0_0.lastSpoke; binding = env0_1; Date = global.Date; lastSpoke[binding] = Date.now(); } binding = env0_0; participantByIndex = binding.participantByIndex; set = participantByIndex.set; id = a1.id; object2 = {}; copyDataProperties(object2, a1, value6); object2['speaking'] = value6; lastSpoke = binding.lastSpoke; object2['lastSpoke'] = lastSpoke[env0_1]; object2['soundsharing'] = isSoundSharing2; Reflect.apply(set, participantByIndex, [id, object2]); r0 = value5; } return r0; } return value; } function _fun39562(a0, a1) { // fn#39562, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:3763, offset: 0x010e537f, size: 99 bytes, params: 3, frame: 17 var r0; var participantByIndex; var set; var id; var object2; const value = a0; const type = a1.type; const STREAM = ParticipantTypes.STREAM; if (type !== STREAM) { r0 = value; } else { participantByIndex = env0_0.participantByIndex; set = participantByIndex.set; id = a1.id; object2 = {}; copyDataProperties(object2, a1, undefined); object2['maxResolution'] = require; object2['maxFrameRate'] = importDefault; Reflect.apply(set, participantByIndex, [id, object2]); r0 = true; } return r0; } function _fun39568(a0, a1) { // fn#39568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4788:4458, offset: 0x010e54e5, size: 210 bytes, params: 3, frame: 18 var r3; const object2 = {}; let value = environment.__proto__.__proto__; const ACTIVITY = ParticipantTypes.ACTIVITY; object2.type = ACTIVITY; const getEmbeddedActivityParticipantIdBinding = getEmbeddedActivityParticipantId; const value2 = undefined; object2.id = getEmbeddedActivityParticipantIdBinding({applicationId: a0.applicationId, instanceId: a0.compositeInstanceId}); object2.applicationId = a0.applicationId; const PLAYING = ActivityTypes.PLAYING; object2.activityType = PLAYING; object2.activityUrl = a0.url; const participants = a0.participants; const value3 = null; const r7 = value3 != participants ? participants : []; const items2 = []; arraySpread(items2, r7, 0, r7); object2.participants = items2; value = ChannelStore.getChannel(env0_0.channelId); if (value3 == value) { r3 = value2; } else { value = value.getGuildId(); r3 = value; } object2.guildId = value3 != r3 ? r3 : value3; object2.sortKey = a1.toString(); return object2; }