/* Metro module 13007; source: modules/voice_calls/native/VoiceNotificationManager.android.tsx; dependencies: [15, 17, 18, 57, 6, 7, 27, 1378, 4234, 4492, 1379, 4259, 4294, 3793, 4607, 1878, 661, 697, 13008, 7146, 7145, 10867, 8845, 4805, 1244, 4561, 2] */ function _fun99197(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99197, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:6, offset: 0x021bf5cc, size: 555 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); const env0_3 = importDefault(15) /* metro dependency 15 */; const env0_4 = importDefault(17) /* metro dependency 17 */; const env0_5 = importDefault(18) /* metro dependency 18 */; const env0_6 = importDefault(57) /* metro dependency 57 */; const env0_7 = importDefault(6) /* metro dependency 6 */; const env0_8 = importDefault(7) /* metro dependency 7 */; const processColor = (require(27) /* metro dependency 27 */).processColor; const embeddedActivitiesStore = importDefault(1378) /* metro dependency 1378: EmbeddedActivitiesStore */; const applicationStore = importDefault(4234) /* metro dependency 4234: ApplicationStore */; const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */; const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */; const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */; const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */; const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */; const speakingStore = importDefault(4607) /* metro dependency 4607: SpeakingStore */; const userStore = importDefault(1878) /* metro dependency 1878: UserStore */; const env0_18 = (require(661) /* metro dependency 661: Constants */).InputModes; const BRAND_500 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.BRAND_500; const env0_19 = processColor(BRAND_500); const GREEN_NEW_40 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.GREEN_NEW_40; const env0_20 = processColor(GREEN_NEW_40); const RED_NEW_46 = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.RED_NEW_46; const env0_21 = processColor(RED_NEW_46); let value = _fun99201(); value = new value(); value = importDefault(4561) /* metro dependency 4561: LifecycleManager */; value = _fun99213(value); value = new value(); (require(2) /* metro dependency 2 */).fileFinishedImporting('modules/voice_calls/native/VoiceNotificationManager.android.tsx'); exports.default = value; } function _isNativeReflectConstruct_99198() { // fn#99198, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:299, offset: 0x021bf7f7, 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_99198_isNativeReflectConstruct = function() { return !!result; })(); } function _fun99201() { // fn#99201, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:629, offset: 0x021bf859, size: 84 bytes, params: 1, frame: 15 return env0_8(VoiceNotificationManager, [{key: 'initialize', value: function() { RTCConnectionStore.addChangeListener(this.handleVoiceStateChange); MediaEngineStore.addChangeListener(this.handleMediaEngineStateChange); EmbeddedActivitiesStore.addChangeListener(this.handleEmbeddedActivityStateChange); ApplicationStreamingStore.addChangeListener(this.handleApplicationStreamStateChange); SpeakingStore.addChangeListener(this.handleSpeakingStateChange); }}, {key: 'terminate', value: function() { RTCConnectionStore.removeChangeListener(this.handleVoiceStateChange); MediaEngineStore.removeChangeListener(this.handleMediaEngineStateChange); EmbeddedActivitiesStore.removeChangeListener(this.handleEmbeddedActivityStateChange); ApplicationStreamingStore.removeChangeListener(this.handleApplicationStreamStateChange); SpeakingStore.removeChangeListener(this.handleSpeakingStateChange); }}]); } function _fun99213(a0) { // fn#99213, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:4769, offset: 0x021c02dc, size: 97 bytes, params: 2, frame: 16 const closure = VoiceNotificationLifecycleManager; env0_5(closure, a0); return env0_8(closure, [{key: '_initialize', value: value_99215}, {key: '_terminate', value: value_99216}]); } function VoiceNotificationManager() { // fn#99202, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:650, offset: 0x021bf8ad, size: 187 bytes, params: 1, frame: 14 env1_7(this, VoiceNotificationManager); this.voiceServiceHandlerId = 9000; this.state = {'channelId': null, 'connectionState': null, 'selfMute': false, 'deafened': false, 'isPushToTalk': false, 'embeddedActivity': null, 'isStreaming': false, 'isSpeaking': false, channelId: undefined, connectionState: undefined, embeddedActivity: undefined}; this.handleVoiceStateChange = handleVoiceStateChange; this.handleMediaEngineStateChange = handleMediaEngineStateChange; this.handleEmbeddedActivityStateChange = handleEmbeddedActivityStateChange; this.handleApplicationStreamStateChange = handleApplicationStreamStateChange; this.handleSpeakingStateChange = handleSpeakingStateChange; this.getIcon = getIcon_99208; this.handleUpdate = handleUpdate_99209; this.createAction = function(a0, a1, a2) { return {tag: '' + a1 + a0.id, taskName: a1, title: a2, data: {channelId: a0.id}}; }; } function VoiceNotificationLifecycleManager() { // fn#99214, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:4781, offset: 0x021c033d, size: 113 bytes, params: 1, frame: 20 const value = environment.__proto__; env1_7(this, VoiceNotificationLifecycleManager); const value3 = env1_4(VoiceNotificationLifecycleManager); return env1_3(this, _isNativeReflectConstruct_99198() ? global.Reflect.construct(value3, arguments, env1_4(this).constructor) : value3.apply(this, arguments)); } function value_99215() { // fn#99215, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:5165, offset: 0x021c03ae, size: 21 bytes, params: 1, frame: 9 env1_22.initialize(); } function value_99216() { // fn#99216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:5217, offset: 0x021c03c3, size: 21 bytes, params: 1, frame: 9 env1_22.terminate(); } function handleVoiceStateChange() { // fn#99203, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:924, owner: VoiceNotificationManager.handleVoiceStateChange, offset: 0x021bf968, size: 124 bytes, params: 1, frame: 15 var binding; var handleUpdate; var object2; let value = environment.__proto__.__proto__; value = RTCConnectionStore.getChannelId(); const state = RTCConnectionStore.getState(); if (!(env0_0.state.channelId === value && env0_0.state.connectionState === state)) { binding = env0_0; handleUpdate = binding.handleUpdate; object2 = {}; copyDataProperties(object2, binding.state, value); object2['channelId'] = value; object2['connectionState'] = state; Reflect.apply(handleUpdate, binding, [object2]); } } function handleMediaEngineStateChange() { // fn#99204, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:1125, owner: VoiceNotificationManager.handleMediaEngineStateChange, offset: 0x021bf9e4, size: 222 bytes, params: 1, frame: 16 var binding; var handleUpdate; var object2; let value = environment.__proto__.__proto__; const r6 = MediaEngineStore.isSelfMute() || MediaEngineStore.isSelfMutedTemporarily(); const r5 = MediaEngineStore.isSelfDeaf() || MediaEngineStore.isDeaf(); const mode = MediaEngineStore.getMode(); const PUSH_TO_TALK = InputModes.PUSH_TO_TALK; value = mode === PUSH_TO_TALK; if (!(env0_0.state.selfMute === r6 && env0_0.state.deafened === r5 && env0_0.state.isPushToTalk === value)) { binding = env0_0; handleUpdate = binding.handleUpdate; object2 = {}; copyDataProperties(object2, binding.state, r6); object2['selfMute'] = r6; object2['deafened'] = r5; object2['isPushToTalk'] = value; Reflect.apply(handleUpdate, binding, [object2]); } } function handleEmbeddedActivityStateChange() { // fn#99205, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:1430, owner: VoiceNotificationManager.handleEmbeddedActivityStateChange, offset: 0x021bfac2, size: 82 bytes, params: 1, frame: 14 var value2; var currentEmbeddedActivity; var binding; var handleUpdate; var object2; if (env0_0.state.channelId != null) { value2 = environment.__proto__.__proto__; currentEmbeddedActivity = EmbeddedActivitiesStore.getCurrentEmbeddedActivity(); binding = env0_0; handleUpdate = binding.handleUpdate; object2 = {}; copyDataProperties(object2, binding.state, currentEmbeddedActivity); object2['embeddedActivity'] = currentEmbeddedActivity; Reflect.apply(handleUpdate, binding, [object2]); } } function handleApplicationStreamStateChange() { // fn#99206, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:1599, owner: VoiceNotificationManager.handleApplicationStreamStateChange, offset: 0x021bfb14, size: 87 bytes, params: 1, frame: 14 var binding; var handleUpdate; var object2; let value = environment.__proto__.__proto__; value = ApplicationStreamingStore.getCurrentUserActiveStream(); value = value != null; if (env0_0.state.isStreaming !== value) { binding = env0_0; handleUpdate = binding.handleUpdate; object2 = {}; copyDataProperties(object2, binding.state, value); object2['isStreaming'] = value; Reflect.apply(handleUpdate, binding, [object2]); } } function handleSpeakingStateChange() { // fn#99207, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:1756, owner: VoiceNotificationManager.handleSpeakingStateChange, offset: 0x021bfb6b, size: 81 bytes, params: 1, frame: 14 var binding; var handleUpdate; var object2; let value = environment.__proto__.__proto__; value = SpeakingStore.isCurrentUserSpeaking(); if (env0_0.state.isSpeaking !== value) { binding = env0_0; handleUpdate = binding.handleUpdate; object2 = {}; copyDataProperties(object2, binding.state, value); object2['isSpeaking'] = value; Reflect.apply(handleUpdate, binding, [object2]); } } function VoiceNotificationManagerGetIcon(a0) { // fn#99208, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:1882, owner: VoiceNotificationManager.getIcon, offset: 0x021bfbbc, size: 396 bytes, params: 2, frame: 15 const ServiceNotificationIcon = (require(7146) /* metro dependency 7146: ForegroundServiceManagerTypes */).ServiceNotificationIcon; const config = (importDefault(13008) /* metro dependency 13008: AndroidVoiceNotificationExperiment */).getConfig({location: 'VoiceNotificationManager'}); if (config.enabled) { return a0.deafened ? [ServiceNotificationIcon.DEAFENED, env2_21] : a0.selfMute ? [ServiceNotificationIcon.MUTED, env2_21] : a0.isSpeaking && config.showSpeakingIcon ? [ServiceNotificationIcon.SPEAKING, env2_20] : a0.isPushToTalk ? [ServiceNotificationIcon.DEFAULT, env2_19] : [ServiceNotificationIcon.IDLE, env2_19]; } const DEFAULT = ServiceNotificationIcon.DEFAULT; return [DEFAULT, env2_19]; } function VoiceNotificationManagerHandleUpdate(a0) { // fn#99209, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13197:2361, owner: VoiceNotificationManager.handleUpdate, offset: 0x021bfd48, size: 1127 bytes, params: 2, frame: 31 var compositeInstanceId; var r12; var binding; var getIcon; var state; var value2; var value3; var binding2; var value4; var value5; var property; var property2; var value6; var property3; var property4; var channelId; var selfMute; var deafened; var embeddedActivity; var isStreaming; var channel; var defaultImport; var defaultImport2; var connectionStatusText; var value8; var channelName; var object2; const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const t = (require(1244) /* metro dependency 1244: indexNative */).t; const ServiceNotificationPriority = (require(7146) /* metro dependency 7146: ForegroundServiceManagerTypes */).ServiceNotificationPriority; var createAction; var string; var items2; const ServiceNotificationType = (require(7146) /* metro dependency 7146: ForegroundServiceManagerTypes */).ServiceNotificationType; var defaultImport4; let connectionState = a0.connectionState; if (connectionState != null) { binding = env0_0; getIcon = binding.getIcon; state = binding.state; value2 = Reflect.apply(getIcon, binding, [state]); value3 = environment.__proto__.__proto__; binding2 = env2_6; value4 = undefined; value5 = binding2(value2, 2); property = value5[0]; property2 = value5[1]; getIcon = binding.getIcon; value6 = binding2(Reflect.apply(getIcon, binding, [a0]), 2); property3 = value6[0]; property4 = value6[1]; state = binding.state; channelId = state.channelId; if (channelId !== a0.channelId) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore, RelationshipStore); object2 = {}; object2.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object2.content = value8 + channelName + r12; object2.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object2.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object2.auxiliaryActions = items2; object2.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object2.usesGateway = true; object2.icon = property3; object2.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object2); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else { connectionState = env0_0.state.connectionState; if (connectionState !== a0.connectionState) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore, RelationshipStore); object2 = {}; object2.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object2.content = value8 + channelName + r12; object2.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object2.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object2.auxiliaryActions = items2; object2.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object2.usesGateway = true; object2.icon = property3; object2.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object2); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else { selfMute = env0_0.state.selfMute; if (selfMute !== a0.selfMute) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore, RelationshipStore); object2 = {}; object2.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object2.content = value8 + channelName + r12; object2.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object2.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object2.auxiliaryActions = items2; object2.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object2.usesGateway = true; object2.icon = property3; object2.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object2); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else { deafened = env0_0.state.deafened; if (deafened !== a0.deafened) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore, RelationshipStore); object2 = {}; object2.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object2.content = value8 + channelName + r12; object2.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object2.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object2.auxiliaryActions = items2; object2.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object2.usesGateway = true; object2.icon = property3; object2.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object2); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else { embeddedActivity = env0_0.state.embeddedActivity; compositeInstanceId = embeddedActivity == null ? value4 : embeddedActivity.compositeInstanceId; embeddedActivity = a0.embeddedActivity; if (compositeInstanceId !== (embeddedActivity == null ? value4 : embeddedActivity.compositeInstanceId)) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore, RelationshipStore); object2 = {}; object2.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object2.content = value8 + channelName + r12; object2.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object2.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object2.auxiliaryActions = items2; object2.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object2.usesGateway = true; object2.icon = property3; object2.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object2); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else { isStreaming = env0_0.state.isStreaming; if (isStreaming !== a0.isStreaming) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore, RelationshipStore); object2 = {}; object2.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object2.content = value8 + channelName + r12; object2.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object2.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object2.auxiliaryActions = items2; object2.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object2.usesGateway = true; object2.icon = property3; object2.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object2); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else if (property !== property3) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore, RelationshipStore); object2 = {}; object2.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object2.content = value8 + channelName + r12; object2.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object2.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object2.auxiliaryActions = items2; object2.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object2.usesGateway = true; object2.icon = property3; object2.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object2); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else if (property2 !== property4) { channelId = a0.channelId; connectionState = a0.connectionState; selfMute = a0.selfMute; deafened = a0.deafened; embeddedActivity = a0.embeddedActivity; isStreaming = a0.isStreaming; env0_0.state = a0; channel = ChannelStore.getChannel(channelId); if (channel != null) { defaultImport2 = importDefault(10867) /* metro dependency 10867: RTCConnectionUtils */; connectionStatusText = defaultImport2.getStatus(connectionState).connectionStatusText; value8 = ''; r12 = embeddedActivity != null ? ' - ' + (importDefault(8845) /* metro dependency 8845: getChannelCopyForEmbeddedActivity */)(ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId) == null ? value4 : ApplicationStore.getApplication(embeddedActivity == null ? value4 : embeddedActivity.applicationId).name) : value8; channelName = (require(4805) /* metro dependency 4805: useChannelName */).computeChannelName(channel, UserStore, RelationshipStore); object2 = {}; object2.title = intl.formatToPlainString(t['aUT3+M'], {callState: connectionStatusText}); object2.content = value8 + channelName + r12; object2.priority = ServiceNotificationPriority.HIGH; binding = env0_0; object2.contentAction = binding.createAction(channel, 'SelectVoiceChannel', value4); createAction = binding.createAction; items2 = [Reflect.apply(createAction, binding, [channel, 'Disconnect', intl.string(t['6vrfgt'])])]; createAction = binding.createAction; string = intl.string; items2[1] = Reflect.apply(createAction, binding, [channel, 'ToggleSelfMute', selfMute ? Reflect.apply(string, intl, [t.YqAjXy]) : Reflect.apply(string, intl, [t.w4m945])]); binding = env0_0; createAction = binding.createAction; string = intl.string; items2[2] = Reflect.apply(createAction, binding, [channel, 'ToggleDeafen', deafened ? Reflect.apply(string, intl, [t['2US872']]) : Reflect.apply(string, intl, [t.wjcRFX])]); object2.auxiliaryActions = items2; object2.type = isStreaming ? ServiceNotificationType.SCREEN_SHARE : ServiceNotificationType.VOICE_CALL; object2.usesGateway = true; object2.icon = property3; object2.color = property4; defaultImport4 = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport4.updateServiceHandler(env0_0.voiceServiceHandlerId, object2); } else { defaultImport = importDefault(7145) /* metro dependency 7145: ForegroundServiceManagerAndroid */; defaultImport.removeServiceHandler(env0_0.voiceServiceHandlerId); } } else { env0_0.state = a0; } } } } } } } else { env0_0.state = a0; } }