Initial commit

This commit is contained in:
janisslsm committed 2026-07-27 16:20:00 +03:00
commit af3b49f756
16065 files changed
+2938410

No files matched your search

@@ -0,0 +1,11 @@
/* Metro module 12395; source: modules/calls/BroadcastUploadDisposeFixExperiment.tsx; dependencies: [1358, 2] */
function _fun94497(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94497, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12581:6, offset: 0x0211a752, size: 142 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
value = value({'kind': 'user', 'name': '2026-06-ios-broadcast-upload-dispose-fix', defaultConfig: {enabled: false},
variations: {[1]: {enabled: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/BroadcastUploadDisposeFixExperiment.tsx');
exports.default = value;
}
+88
View File
@@ -0,0 +1,88 @@
/* Metro module 4299; source: modules/calls/CallConstants.tsx; dependencies: [2] */
function _fun36590(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#36590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4471:6, offset: 0x0108efb2, size: 622 bytes, params: 8, frame: 25
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {STREAM: 0};
object2[0] = 'STREAM';
object2.HIDDEN_STREAM = 1;
object2[1] = 'HIDDEN_STREAM';
object2.USER = 2;
object2[2] = 'USER';
object2.ACTIVITY = 3;
object2[3] = 'ACTIVITY';
const object3 = {DESKTOP: 0};
object3[0] = 'DESKTOP';
object3.MOBILE = 1;
object3[1] = 'MOBILE';
object3.XBOX = 2;
object3[2] = 'XBOX';
object3.PLAYSTATION = 3;
object3[3] = 'PLAYSTATION';
object3.QUEST = 4;
object3[4] = 'QUEST';
const object5 = {VIDEO: 0};
object5[0] = 'VIDEO';
object5.CAMERA_PREVIEW = 1;
object5[1] = 'CAMERA_PREVIEW';
object5.HAVEN = 2;
object5[2] = 'HAVEN';
const object10 = {};
let VIDEO = object5.VIDEO;
object10[VIDEO] = 320;
let CAMERA_PREVIEW = object5.CAMERA_PREVIEW;
object10[CAMERA_PREVIEW] = 160;
let HAVEN = object5.HAVEN;
object10[HAVEN] = 320;
const object11 = {};
VIDEO = object5.VIDEO;
object11[VIDEO] = 960;
CAMERA_PREVIEW = object5.CAMERA_PREVIEW;
object11[CAMERA_PREVIEW] = 480;
HAVEN = object5.HAVEN;
object11[HAVEN] = 960;
const object12 = {};
VIDEO = object5.VIDEO;
object12[VIDEO] = 200;
CAMERA_PREVIEW = object5.CAMERA_PREVIEW;
object12[CAMERA_PREVIEW] = 160;
HAVEN = object5.HAVEN;
object12[HAVEN] = 200;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/CallConstants.tsx');
exports.ParticipantTypes = object2;
exports.ContextMenuTileTypes = {STREAM: 'STREAM', USER: 'USER', ACTIVITY: 'ACTIVITY'};
exports.ParticipantSelectionTypes = {NONE: 'NONE', AUTO: 'AUTO'};
exports.VoicePlatforms = object3;
exports.CallMenuEntrypoint = {CONTEXT_MENU: 'Context Menu', THREE_DOT: 'Three-Dot', CARET: 'Caret',
OTHER_BUTTON: 'Other Button'};
exports.isStreamParticipant = isStreamParticipant;
exports.isUserParticipant = isUserParticipant;
exports.isActivityParticipant = isActivityParticipant;
exports.PictureInPictureTypes = object5;
exports.DEFAULT_PIP_WIDTH = object10;
exports.MAX_PIP_WIDTH = object11;
exports.MIN_PIP_WIDTH = object12;
exports.EMOJI_PICKER_EMOJI_TO_SHOW_COUNT = 8;
exports.MIN_CALL_WIDTH = 550;
exports.MIN_CALL_HEIGHT = 230;
}
function isStreamParticipant(a0) { // fn#36591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4471:1128, offset: 0x0108f220, size: 69 bytes, params: 2, frame: 6
const value = undefined;
const type = a0 == null ? value : a0.type;
const STREAM = env0_0.STREAM;
return type === STREAM || (a0 == null ? value : a0.type) === env0_0.HIDDEN_STREAM;
}
function isUserParticipant(a0) { // fn#36592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4471:1265, offset: 0x0108f265, size: 38 bytes, params: 2, frame: 3
const type = a0?.type;
const USER = env0_0.USER;
return type === USER;
}
function isActivityParticipant(a0) { // fn#36593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4471:1359, offset: 0x0108f28b, size: 38 bytes, params: 2, frame: 3
const type = a0?.type;
const ACTIVITY = env0_0.ACTIVITY;
return type === ACTIVITY;
}
@@ -0,0 +1,264 @@
/* Metro module 15678; source: modules/calls/ChannelCallManager.tsx; dependencies: [6, 7, 15, 17, 18, 99, 100, 10757, 4258, 1379, 10907, 1934, 3996, 4297, 4300, 4606, 10756, 4860, 2] */
function _fun120248(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#120248, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:6, offset: 0x02525a03, size: 455 bytes, params: 8, frame: 21
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_2 = importDefault(6) /* metro dependency 6 */;
const env0_3 = importDefault(7) /* metro dependency 7 */;
const env0_4 = importDefault(15) /* metro dependency 15 */;
const env0_5 = importDefault(17) /* metro dependency 17 */;
const env0_6 = importDefault(18) /* metro dependency 18 */;
const env0_7 = importDefault(99) /* metro dependency 99 */;
let value = importDefault(100) /* metro dependency 100 */;
const soundpackStore = importDefault(10757) /* metro dependency 10757: SoundpackStore */;
const callStore = importDefault(4258) /* metro dependency 4258: CallStore */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
const notificationSettingsStore = importDefault(10907) /* metro dependency 10907: NotificationSettingsStore */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
const streamerModeStore = importDefault(3996) /* metro dependency 3996: StreamerModeStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const sortedVoiceStateStore = importDefault(4300) /* metro dependency 4300: SortedVoiceStateStore */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const soundUtilsModule = require(10756) /* metro dependency 10756: SoundUtils */;
const env0_17 = soundUtilsModule.createSoundForPack('call_calling', soundpackStore.getSoundpack());
const env0_18 = value('outboundRingingGuildUserIds');
value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun120252(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/ChannelCallManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_120249() { // fn#120249, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:264, offset: 0x02525bca, 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_120249_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun120252(a0) { // fn#120252, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:565, offset: 0x02525c2c, size: 72 bytes, params: 2, frame: 15
const closure = ChannelCallManager;
env0_6(closure, a0);
return env0_3(closure, [{key: '_initialize', value: value_120267}]);
}
function ChannelCallManager(a0) { // fn#120253, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:577, offset: 0x02525c74, size: 307 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_2;
binding(this, ChannelCallManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_5(ChannelCallManager);
binding = env1_4;
if (_isNativeReflectConstruct_120249()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_5(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
const Object = global.Object;
const defineProperty = Object.defineProperty;
binding = env1_18;
const Set = global.Set;
const value4 = Object.create(Set.prototype, {constructor: {value: Set}});
const set = new Set();
Reflect.apply(defineProperty, Object, [value, binding, {writable: true,
value: set instanceof Object ? set : value4}]);
value.actions = {GUILD_LOCAL_RING_START: GUILD_LOCAL_RING_START, GUILD_RING_STOP: GUILD_RING_STOP_120255};
value._handleRing = _handleRing;
value.handleSoundpackUpdate = handleSoundpackUpdate;
value.handleRingUpdate = handleRingUpdate;
value.handleGuildRingStart = handleGuildRingStart;
value.handleGuildRingStop = handleGuildRingStop;
value.handleChannelRTCStoreChange = handleChannelRTCStoreChange;
return value;
}
function value_120267() { // fn#120267, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:2199, offset: 0x025261c9, size: 170 bytes, params: 1, frame: 15
const Map = global.Map;
let map = new Map();
map = map.set(CallStore, this.handleRingUpdate);
map = map.set(NotificationSettingsStore, this.handleRingUpdate);
map = map.set(StreamerModeStore, this.handleRingUpdate);
map = map.set(VoiceStateStore, this.handleRingUpdate);
map = map.set(ChannelRTCStore, this.handleChannelRTCStoreChange);
this.stores = map.set(SoundpackStore, this.handleSoundpackUpdate);
}
function GUILD_LOCAL_RING_START(a0) { // fn#120254, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:906, owner: ChannelCallManager.GUILD_LOCAL_RING_START, offset: 0x02525da7, size: 23 bytes, params: 2, frame: 11
return env0_0.handleGuildRingStart(a0);
}
function ChannelCallManagerGUILD_RING_STOP(a0) { // fn#120255, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:951, owner: ChannelCallManager.GUILD_RING_STOP, offset: 0x02525dbe, size: 23 bytes, params: 2, frame: 11
return env0_0.handleGuildRingStop(a0);
}
function _handleRing(a0, a1) { // fn#120256, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:994, owner: ChannelCallManager._handleRing, offset: 0x02525dd5, size: 134 bytes, params: 3, frame: 14
const currentClientVoiceChannelId = VoiceStateStore.getCurrentClientVoiceChannelId(a1);
if (currentClientVoiceChannelId == null) {
env2_17.stop();
} else if (currentClientVoiceChannelId != null && SortedVoiceStateStore.countVoiceStatesForChannel(currentClientVoiceChannelId) >= 2) {
env2_17.stop();
} else if (a0) {
if (NotificationSettingsStore.isSoundDisabled('call_calling')) {
env2_17.stop();
} else if (StreamerModeStore.disableSounds) {
env2_17.stop();
} else {
env2_17.loop();
}
} else {
env2_17.stop();
}
}
function handleSoundpackUpdate() { // fn#120257, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:1200, owner: ChannelCallManager.handleSoundpackUpdate, offset: 0x02525e5b, size: 75 bytes, params: 1, frame: 15
env2_17.stop();
const soundUtilsModule = require(10756) /* metro dependency 10756: SoundUtils */;
env2_17 = soundUtilsModule.createSoundForPack('call_calling', SoundpackStore.getSoundpack());
}
function handleRingUpdate() { // fn#120258, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:1297, owner: ChannelCallManager.handleRingUpdate, offset: 0x02525ea6, size: 152 bytes, params: 1, frame: 17
var environment;
const value = environment.__proto__.__proto__;
const channel = ChannelStore.getChannel(SelectedChannelStore.getVoiceChannelId());
const value4 = null;
const value5 = undefined;
const guild_id = value4 == channel ? value5 : channel.guild_id;
const r4 = value4 != guild_id ? guild_id : value4;
const value7 = CallStore.getCalls().some(_fun120259);
const binding = env0_0;
binding._handleRing(value7 || env2_7(env0_0, env2_18)[env2_18].size > 0, r4);
return value5;
}
function handleGuildRingStart({ringing, guildId}) { // fn#120260, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:1557, owner: ChannelCallManager.handleGuildRingStart, offset: 0x02525f74, size: 88 bytes, params: 2, frame: 15
ringing.forEach(_fun120261);
const binding = env0_0;
const _handleRing = binding._handleRing;
const binding2 = env2_7;
const binding3 = env2_18;
Reflect.apply(_handleRing, binding, [binding2(binding, binding3)[binding3].size > 0, guildId]);
}
function handleGuildRingStop({ringing, guildId}) { // fn#120262, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:1675, owner: ChannelCallManager.handleGuildRingStop, offset: 0x02525ff9, size: 88 bytes, params: 2, frame: 15
ringing.forEach(_fun120263);
const binding = env0_0;
const _handleRing = binding._handleRing;
const binding2 = env2_7;
const binding3 = env2_18;
Reflect.apply(_handleRing, binding, [binding2(binding, binding3)[binding3].size > 0, guildId]);
}
function handleChannelRTCStoreChange() { // fn#120264, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:1804, owner: ChannelCallManager.handleChannelRTCStoreChange, offset: 0x0252607e, size: 331 bytes, params: 1, frame: 20
var environment;
var Set;
var binding4;
var binding5;
var property;
var items2;
var value4;
var set;
var _handleRing;
var binding6;
var binding7;
var binding8;
var binding9;
var value7;
let value = environment.__proto__.__proto__;
const voiceChannelId = SelectedChannelStore.getVoiceChannelId();
let binding = env2_7;
const binding2 = env0_0;
const binding3 = env2_18;
if (binding(binding2, binding3)[binding3].size > 0) {
if (voiceChannelId == null) {
binding = env2_7;
binding8 = env0_0;
binding9 = env2_18;
value = binding(binding8, binding9);
Set = global.Set;
value7 = Object.create(Set.prototype, {constructor: {value: Set}});
set = new Set();
value[binding9] = set instanceof Object ? set : value7;
binding8._handleRing(binding(binding8, binding9)[binding9].size > 0, null);
return undefined;
}
if (voiceChannelId != null) {
var env0_0 = ChannelRTCStore.getGuildRingingUsers(voiceChannelId);
Set = global.Set;
binding = env2_7;
binding4 = env0_0;
binding5 = env2_18;
property = binding(binding4, binding5)[binding5];
items2 = [];
arraySpread(items2, property, 0, items2);
value4 = items2.filter(_fun120265);
set = new Set();
if (set.size > 0) {
set.forEach(_fun120266);
binding = env0_0;
_handleRing = binding._handleRing;
binding6 = env2_7;
binding7 = env2_18;
Reflect.apply(_handleRing, binding, [binding6(binding, binding7)[binding7].size > 0, null]);
}
}
}
}
function _fun120259(a0) { // fn#120259, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:1418, offset: 0x02525f3e, size: 54 bytes, params: 2, frame: 13
var r0;
let value = a0.ringing.length > 0;
if (value) {
value = environment.__proto__.__proto__.__proto__;
value = VoiceStateStore.getCurrentClientVoiceChannelId(null);
value = value === a0.channelId;
r0 = value;
} else {
r0 = value;
}
return r0;
}
function _fun120261(a0) { // fn#120261, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:1594, offset: 0x02525fcc, size: 45 bytes, params: 2, frame: 13
const binding = env3_7;
const binding2 = env1_0;
const binding3 = env3_18;
binding(binding2, binding3)[binding3].add(a0);
}
function _fun120263(a0) { // fn#120263, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15886:1712, offset: 0x02526051, size: 45 bytes, params: 2, frame: 13
const binding = env3_7;
const binding2 = env1_0;
const binding3 = env3_18;
binding(binding2, binding3)[binding3].delete(a0);
}
@@ -0,0 +1,653 @@
/* 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;
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,13 @@
/* Metro module 15552; source: modules/calls/HideSelfStreamAndVideoConstants.tsx; dependencies: [2] */
function _fun119057(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119057, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15749:6, offset: 0x024fafe5, size: 111 bytes, params: 8, frame: 16
var object2;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
object2 = {STREAM: 0};
object2[0] = 'STREAM';
object2.VIDEO = 1;
object2[1] = 'VIDEO';
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/HideSelfStreamAndVideoConstants.tsx');
exports.SelfStreamAndVideoAlertType = object2;
}
@@ -0,0 +1,11 @@
/* Metro module 15407; source: modules/calls/MobileMuteIndicatorExperiment.tsx; dependencies: [1358, 2] */
function _fun117866(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#117866, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15604:6, offset: 0x024c38a9, size: 144 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
value = value({'kind': 'user', 'name': '2026-02-mobile-mute-indicator', defaultConfig: {enableMuteWarning: false},
variations: {[1]: {enableMuteWarning: true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/MobileMuteIndicatorExperiment.tsx');
exports.default = value;
}
@@ -0,0 +1,121 @@
/* Metro module 12401; source: modules/calls/NativeMuteManager.native.tsx; dependencies: [6, 7, 9229, 4259, 3, 4041, 694, 8899, 4261, 2] */
function _fun94506(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12587:6, offset: 0x0211aaf6, size: 278 bytes, params: 8, frame: 20
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 audioRouteStoreNative = importDefault(9229) /* metro dependency 9229: AudioRouteStoreNative */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
let value = importDefault(3) /* metro dependency 3: Logger */;
value = new value('NativeMuteManager');
value.enableNativeLogger(true);
value = _fun94507();
value = new value();
value = _fun94514();
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/NativeMuteManager.native.tsx');
exports.default = value;
}
function _fun94507() { // fn#94507, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12587:207, offset: 0x0211ac0c, size: 109 bytes, params: 1, frame: 15
return env0_4(NativeMuteManager, [{key: 'nativeMuteChanged', value: value_94511}, {key: 'updateNativeMute',
value: value_94512}, {key: 'handleVoiceChannelSelect', value: value_94513}]);
}
function _fun94514() { // fn#94514, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12587:1653, offset: 0x0211af06, size: 84 bytes, params: 1, frame: 15
return env0_4(NativeMuteManagerWrapper, [{key: 'nativeMuteChanged', value: value_94516}, {key: 'updateNativeMute',
value: value_94517}]);
}
function NativeMuteManager() { // fn#94508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12587:228, offset: 0x0211ac79, size: 189 bytes, params: 1, frame: 16
var environment;
let value = environment.__proto__;
env1_3(this, NativeMuteManager);
this.ignoreForNativeUnmute = false;
this.needToUnmuteNative = false;
this.ignoreForAudioRouteChange = false;
const Timeout = (require(4041) /* metro dependency 4041: Timers */).Timeout;
const value3 = Object.create(Timeout.prototype, {constructor: {value: Timeout}});
const timeout = new Timeout();
this.audioRouteChangeIgnoreTimer = timeout instanceof Object ? timeout : value3;
this.AUDIO_ROUTE_CHANGE_IGNORE_DURATION_MS = 300;
this.handleAudioRouteChange = handleAudioRouteChange;
const addChangeListener = AudioRouteStoreNative.addChangeListener;
var handleAudioRouteChange = this.handleAudioRouteChange;
Reflect.apply(addChangeListener, AudioRouteStoreNative, [handleAudioRouteChange]);
value = importDefault(694) /* metro dependency 694: Dispatcher */;
value.subscribe('VOICE_CHANNEL_SELECT', this.handleVoiceChannelSelect);
}
function value_94511() { // fn#94511, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12587:909, offset: 0x0211ada7, size: 126 bytes, params: 1, frame: 13
const value = environment.__proto__;
if (!MediaEngineStore.hasActiveCallKitCall()) {
if (this.ignoreForNativeUnmute) {
this.ignoreForNativeUnmute = false;
} else if (!this.ignoreForAudioRouteChange) {
this.needToUnmuteNative = true;
env1_7.log('Native mute changed > toggling mute');
(importDefault(8899) /* metro dependency 8899: AudioActionCreators */).toggleSelfMute({playSoundEffect: false});
}
}
}
function value_94512() { // fn#94512, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12587:1188, offset: 0x0211ae25, size: 128 bytes, params: 1, frame: 14
var setNativeMuteState;
let value = environment.__proto__;
if (!MediaEngineStore.hasActiveCallKitCall()) {
if (this.needToUnmuteNative) {
this.needToUnmuteNative = false;
this.ignoreForNativeUnmute = true;
env1_7.log('Update native mute > unmuting native');
value = require(4261) /* metro dependency 4261: inject */;
value = value.getVoiceEngine();
setNativeMuteState = value.setNativeMuteState;
if (setNativeMuteState != null) {
setNativeMuteState.call(value, false);
}
}
}
}
function value_94513({channelId}) { // fn#94513, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12587:1475, offset: 0x0211aea5, size: 97 bytes, params: 2, frame: 14
var value;
var setNativeMuteState;
if (channelId == null) {
value = environment.__proto__;
env1_7.log('Leaving voice channel > unmuting native');
value = require(4261) /* metro dependency 4261: inject */;
value = value.getVoiceEngine();
setNativeMuteState = value.setNativeMuteState;
if (setNativeMuteState != null) {
setNativeMuteState.call(value, false);
}
}
}
function value_94516(a0) { // fn#94516, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12587:1777, offset: 0x0211af5a, size: 25 bytes, params: 2, frame: 11
env1_8.nativeMuteChanged(a0);
}
function value_94517() { // fn#94517, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12587:1844, offset: 0x0211af73, size: 21 bytes, params: 1, frame: 9
env1_8.updateNativeMute();
}
function handleAudioRouteChange() { // fn#94509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12587:503, owner: NativeMuteManager.handleAudioRouteChange, offset: 0x0211ad36, size: 94 bytes, params: 1, frame: 13
let audioRouteChangeIgnoreTimer = env0_0.audioRouteChangeIgnoreTimer;
if (audioRouteChangeIgnoreTimer.isStarted()) {
env0_0.audioRouteChangeIgnoreTimer.stop();
}
const binding = env0_0;
binding.ignoreForAudioRouteChange = true;
audioRouteChangeIgnoreTimer = binding.audioRouteChangeIgnoreTimer;
const start = audioRouteChangeIgnoreTimer.start;
const AUDIO_ROUTE_CHANGE_IGNORE_DURATION_MS = binding.AUDIO_ROUTE_CHANGE_IGNORE_DURATION_MS;
Reflect.apply(start, audioRouteChangeIgnoreTimer, [AUDIO_ROUTE_CHANGE_IGNORE_DURATION_MS, _fun94510]);
}
function _fun94510() { // fn#94510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12587:711, offset: 0x0211ad94, size: 19 bytes, params: 1, frame: 2
env1_0.ignoreForAudioRouteChange = false;
}
@@ -0,0 +1,98 @@
/* Metro module 15810; source: modules/calls/ParticipantFocusManager.tsx; dependencies: [6, 7, 15, 17, 18, 4294, 4606, 4860, 2] */
function _fun121498(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121498, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16018:6, offset: 0x0254979e, size: 250 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const rtcConnectionStore = importDefault(4294) /* metro dependency 4294: RTCConnectionStore */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun121502(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/ParticipantFocusManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_121499() { // fn#121499, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16018:168, offset: 0x02549898, 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_121499_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun121502(a0) { // fn#121502, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16018:371, offset: 0x025498fa, size: 74 bytes, params: 2, frame: 15
const closure = ParticipantFocusManager;
env0_4(closure, a0);
return env0_1(closure, [{key: 'handleFocusParticipant', value: value_121504}]);
}
function ParticipantFocusManager(a0) { // fn#121503, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16018:383, offset: 0x02549944, size: 183 bytes, params: 2, frame: 20
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_0;
binding(this, ParticipantFocusManager);
const items2 = [];
arraySpread(items2, value, 0, items2);
value = env1_3(ParticipantFocusManager);
binding = env1_2;
if (_isNativeReflectConstruct_121499()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items2, env1_3(this).constructor);
r0 = value;
} else {
value = value.apply(this, items2);
r0 = value;
}
value = binding(this, r0);
const Map = global.Map;
const map = new Map();
value.stores = map.set(ChannelRTCStore, value.handleFocusParticipant);
return value;
}
function value_121504() { // fn#121504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16018:790, offset: 0x025499fb, size: 120 bytes, params: 1, frame: 14
var environment;
var videoParticipants;
let value = environment.__proto__;
const channelId = RTCConnectionStore.getChannelId();
if (channelId != null) {
var env0_0 = ChannelRTCStore.getSelectedParticipantId(channelId);
videoParticipants = ChannelRTCStore.getVideoParticipants(channelId);
value = RTCConnectionStore.getRTCConnection();
if (value != null) {
value.setSelectedParticipant(videoParticipants.find(_fun121505)?.id);
}
}
}
function _fun121505(a0) { // fn#121505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16018:978, offset: 0x02549a73, size: 33 bytes, params: 2, frame: 3
return a0.id === env0_0 && !a0.localVideoDisabled;
}
@@ -0,0 +1,13 @@
/* Metro module 4608; source: modules/calls/ProportionalVadIndicatorExperiment.tsx; dependencies: [1358, 2] */
function _fun39521(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39521, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4786:6, offset: 0x010e40cd, size: 196 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
value = value({'kind': 'user', 'name': '2025-12-proportional-vad-indicator', defaultConfig: {enabled: false},
variations: {[1]: {enabled: true}, [2]: {'enabled': true, 'disableUI': true}, [3]: {'enabled': true,
'disableUI': true, 'swallowVolumeOnlySpeakingEvents': true}, [4]: {'enabled': true, 'disableUI': true,
'dontEmitVolumeOnlySpeakingEvents': true}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/ProportionalVadIndicatorExperiment.tsx');
exports.default = value;
}
+368
View File
@@ -0,0 +1,368 @@
/* Metro module 7735; source: modules/calls/VideoSpeakerStore.tsx; dependencies: [6, 7, 15, 17, 18, 4492, 1226, 4259, 4607, 4606, 4299, 4285, 22, 566, 694, 2] */
function _fun61916(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61916, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7913:6, offset: 0x01b4e36f, size: 444 bytes, params: 8, frame: 22
const env0_0 = require;
const _arrayLikeToArray_61922 = function(a0, a1) {
var r0;
var r1;
var r2;
var value3;
var length;
var value5;
var value = undefined;
var value2 = value == null;
reducibleJoin2: while (true) {
if (value2) {
r0 = value2;
break reducibleJoin2;
}
value3 = value > a0.length;
r0 = value3;
break reducibleJoin2;
}
reducibleJoin4: while (true) {
if (r0) {
length = a0.length;
r1 = length;
break reducibleJoin4;
}
r1 = value;
break reducibleJoin4;
}
value = (0, global.Array)(r1);
var value4 = 0;
if (value4 < r1) {
r2 = value4;
reducibleLoop5: while (true) {
value[r2] = a0[r2];
value5 = typeof r2 === 'bigint' ? r2 + 1n : +r2 + 1;
if (value5 < r1) {
r2 = value5;
continue reducibleLoop5;
}
break reducibleLoop5;
}
}
return value;
};
const closure = updateSpeaker;
const closure2 = AUDIO_SET_LOCAL_VIDEO_DISABLED_61924;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_4 = importDefault(6) /* metro dependency 6 */;
const env0_5 = importDefault(7) /* metro dependency 7 */;
const env0_6 = importDefault(15) /* metro dependency 15 */;
const env0_7 = importDefault(17) /* metro dependency 17 */;
const env0_8 = importDefault(18) /* metro dependency 18 */;
const applicationStreamingStore = importDefault(4492) /* metro dependency 4492: ApplicationStreamingStore */;
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const speakingStore = importDefault(4607) /* metro dependency 4607: SpeakingStore */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const env0_14 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
const env0_15 = (importDefault(22) /* metro dependency 22 */).throttle(closure, 300, {trailing: true});
const Store = (importDefault(566) /* metro dependency 566: flux */).Store;
_fun61925(Store).displayName = 'VideoSpeakerStore';
value = new value(importDefault(694) /* metro dependency 694: Dispatcher */,
{AUDIO_SET_LOCAL_VIDEO_DISABLED: closure2});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/VideoSpeakerStore.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_61917() { // fn#61917, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7913:233, offset: 0x01b4e52b, 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_61917_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _createForOfIteratorHelperLoose_61920(a0, a1) { // fn#61920, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7913:426, offset: 0x01b4e589, size: 370 bytes, params: 3, frame: 20
var r6;
var r9;
var r5;
var value3;
var regexp;
const env0_0 = a0;
const Symbol = global.Symbol;
let value = typeof Symbol !== 'undefined';
let r1 = value && a0[global.Symbol.iterator];
r1 = !r1 ? a0['@@iterator'] : r1;
if (r1) {
value = r1.call(a0);
return value.next.bind(value);
}
const Array = global.Array;
if (Array.isArray(a0)) {
if (r1) {
}
return _fun61921;
}
value = undefined;
if (a0) {
if (typeof a0 === 'string') {
value = _arrayLikeToArray_61922(a0, value);
r5 = value;
} else {
value3 = ({}).toString.call(a0).slice(8, -1);
r6 = value3 === 'Object' && a0.constructor;
r9 = r6 ? a0.constructor.name : value3;
if (r9 === 'Map') {
r6 = global.Array.from(a0);
} else if (r9 === 'Set') {
r6 = global.Array.from(a0);
} else if (r9 === 'Arguments') {
value = _arrayLikeToArray_61922(a0, value);
r6 = value;
} else {
regexp = RegExp('^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$', '');
if (regexp.test(r9)) {
value = _arrayLikeToArray_61922(a0, value);
r6 = value;
} else {
r6 = value;
}
}
r5 = r6;
}
} else {
r5 = value;
}
if (r5) {
if (r5) {
}
return _fun61921;
}
const TypeError = global.TypeError;
throw new TypeError('Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.');
}
function updateSpeaker() { // fn#61923, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7913:1336, offset: 0x01b4e6fb, size: 776 bytes, params: 1, frame: 28
var r4;
var r5;
var r8;
var r6;
var id;
var r9;
var r10;
var r11;
var r14;
var r3;
var selectedParticipantId;
var isParticipantPoppedOut;
var lastActiveStream;
var getParticipant;
var value8;
var binding;
var moduleValue;
var value11;
var id2;
var value14;
var items3;
var items2;
var value15;
var value16;
var done;
var value17;
var value18;
var user;
var isLocalVideoDisabled;
var push;
var getSpeakingDuration;
var value19;
var value20;
var length;
var property;
var userId;
var duration;
var value21;
var value22;
var value23;
const value = a0;
const value2 = undefined;
const r2 = !(value !== value2) || value;
const value3 = null;
if (value3 == env0_2) {
r3 = value3;
} else {
selectedParticipantId = ChannelRTCStore.getSelectedParticipantId(env0_2);
r4 = value3 != selectedParticipantId && ChannelRTCStore.isParticipantPoppedOut(env0_2, selectedParticipantId);
r5 = r4 ? value3 : selectedParticipantId;
lastActiveStream = ApplicationStreamingStore.getLastActiveStream();
r8 = value3 != r5 ? ChannelRTCStore.getParticipant(env0_2, r5) : value3;
value8 = (value3 == r8 ? value2 : r8.type) !== ParticipantTypes.ACTIVITY;
if (value8) {
r6 = (value3 == r8 ? value2 : r8.type) !== ParticipantTypes.USER || value3 != r8.voiceState && r8.voiceState.selfVideo;
r4 = r6;
} else {
r4 = value8;
}
r8 = r4 ? r5 : value3;
if (value3 == lastActiveStream) {
r4 = r8;
} else if (value3 != r8) {
r4 = r8;
} else {
getParticipant = ChannelRTCStore.getParticipant;
binding = env0_2;
moduleValue = require(4285) /* metro dependency 4285: StreamKeyUtils */;
value11 = Reflect.apply(getParticipant, ChannelRTCStore, [binding,
moduleValue.encodeStreamKey(lastActiveStream)]);
id = value3 == value11 ? value2 : value11.id;
r6 = value3 == id || ChannelRTCStore.isParticipantPoppedOut(env0_2, id);
r4 = r6 ? r8 : id;
}
if (value3 != r4) {
r3 = r4;
} else {
id2 = AuthenticationStore.getId();
value14 = global.Date.now();
items3 = [];
items2 = [];
value15 = _createForOfIteratorHelperLoose_61920(ChannelRTCStore.getVideoParticipants(env0_2));
value16 = value15();
done = value16.done;
value17 = 0;
if (!done) {
r9 = value16;
while (true) {
value18 = r9.value;
user = value18.user;
id = user.id;
if (id !== id2) {
isLocalVideoDisabled = MediaEngineStore.isLocalVideoDisabled;
user = value18.user;
id = user.id;
if (Reflect.apply(isLocalVideoDisabled, MediaEngineStore, [id])) {
break;
}
isParticipantPoppedOut = ChannelRTCStore.isParticipantPoppedOut;
binding = env0_2;
id = value18.id;
if (Reflect.apply(isParticipantPoppedOut, ChannelRTCStore, [binding, id])) {
break;
}
push = items3.push;
user = value18.user;
id = user.id;
Reflect.apply(push, items3, [id]);
getSpeakingDuration = SpeakingStore.getSpeakingDuration;
user = value18.user;
id = user.id;
value19 = Reflect.apply(getSpeakingDuration, SpeakingStore, [id, value14]);
if (value17 === value19) {
break;
}
push = items2.push;
user = value18.user;
id = user.id;
Reflect.apply(push, items2, [{userId: id, duration: value19}]);
break;
}
value20 = value15();
done = value20.done;
if (done) {
break;
}
r9 = value20;
continue;
}
}
length = items2.length;
if (value17 < length) {
r9 = value17;
r10 = value2;
r11 = value2;
while (true) {
property = items2[r9];
userId = property.userId;
duration = property.duration;
value21 = value3 == r10;
if (value21) {
r14 = value21;
} else {
value22 = duration < r10;
r14 = value22;
}
if (r14) {
r10 = duration;
r11 = userId;
continue;
}
continue;
value23 = typeof r9 === 'bigint' ? r9 + 1n : +r9 + 1;
length = items2.length;
if (value23 < length) {
r9 = value23;
continue;
}
r6 = r11;
break;
}
} else {
r6 = value2;
}
r3 = value3 != r6 ? r6 : value3 == env0_3 ? items3[value17] : items3.includes(env0_3) ? env0_3 : items3[value17];
}
}
if (env0_3 !== r3) {
if (r2) {
env0_16.emitChange();
}
}
return value2;
}
function AUDIO_SET_LOCAL_VIDEO_DISABLED_61924() { // fn#61924, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7913:2389, offset: 0x01b4ea03, size: 17 bytes, params: 1, frame: 9
env0_15();
return false;
}
function _fun61925(a0) { // fn#61925, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7913:2443, offset: 0x01b4ea14, size: 93 bytes, params: 2, frame: 16
const closure = VideoSpeakerStoreClass;
env0_8(closure, a0);
return env0_5(closure, [{key: 'initialize', value: function() {
this.waitFor(ChannelRTCStore, AuthenticationStore, SpeakingStore, ApplicationStreamingStore, MediaEngineStore);
this.syncWith([ChannelRTCStore, ApplicationStreamingStore], AUDIO_SET_LOCAL_VIDEO_DISABLED_61924);
}}, {key: 'getSpeaker', value: value_61928}]);
}
function VideoSpeakerStoreClass() { // fn#61926, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7913:2455, offset: 0x01b4ea71, size: 113 bytes, params: 1, frame: 20
const value = environment.__proto__;
env1_4(this, VideoSpeakerStoreClass);
const value3 = env1_7(VideoSpeakerStoreClass);
return env1_6(this, _isNativeReflectConstruct_61917() ? global.Reflect.construct(value3, arguments,
env1_7(this).constructor) : value3.apply(this, arguments));
}
function value_61928(a0) { // fn#61928, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7913:2888, offset: 0x01b4eb31, size: 69 bytes, params: 2, frame: 12
const value = environment.__proto__;
if (env1_2 !== a0) {
env1_2 = a0;
env1_3 = null;
updateSpeaker(false);
}
return env1_3 ?? AuthenticationStore.getId();
}
@@ -0,0 +1,11 @@
/* Metro module 12394; source: modules/calls/VideoStabilizationExperiment.tsx; dependencies: [1358, 2] */
function _fun94496(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#94496, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12580:6, offset: 0x0211a6ac, size: 166 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = importDefault(1358) /* metro dependency 1358: ApexExperiment */;
value = value({'kind': 'user', 'name': '2026-05-ios-video-stabilization', defaultConfig: {mode: 'off'},
variations: {[1]: {mode: 'standard'}, [2]: {mode: 'low_latency'}}});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/VideoStabilizationExperiment.tsx');
exports.default = value;
}
@@ -0,0 +1,12 @@
/* Metro module 4611; source: modules/calls/getParticipantUserKey.tsx; dependencies: [2] */
function _fun39572(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#39572, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:4789:6, offset: 0x010e5a6f, size: 85 bytes, params: 8, frame: 15
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/getParticipantUserKey.tsx');
exports.default = function(a0, a1) {
var value = a0.toLowerCase();
value = value.padEnd(32, '!');
return '' + value + a1.id;
};
}
@@ -0,0 +1,27 @@
/* Metro module 10698; source: modules/calls/mediaEngineContextFromParticipantType.tsx; dependencies: [4299, 4291, 2] */
function _fun82216(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#82216, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10884:6, offset: 0x01eef2fc, size: 214 bytes, params: 8, frame: 22
var object2;
let Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const ParticipantTypes = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
const MediaEngineContextTypes = (require(4291) /* metro dependency 4291: Constants */).MediaEngineContextTypes;
Object = global.Object;
const freeze = Object.freeze;
object2 = {};
let STREAM = ParticipantTypes.STREAM;
const STREAM2 = MediaEngineContextTypes.STREAM;
object2[STREAM] = STREAM2;
const HIDDEN_STREAM = ParticipantTypes.HIDDEN_STREAM;
STREAM = MediaEngineContextTypes.STREAM;
object2[HIDDEN_STREAM] = STREAM;
const USER = ParticipantTypes.USER;
let DEFAULT = MediaEngineContextTypes.DEFAULT;
object2[USER] = DEFAULT;
const ACTIVITY = ParticipantTypes.ACTIVITY;
DEFAULT = MediaEngineContextTypes.DEFAULT;
object2[ACTIVITY] = DEFAULT;
const env0_0 = Reflect.apply(freeze, Object, [object2]);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/mediaEngineContextFromParticipantType.tsx');
exports.default = mediaEngineContextFromParticipantType;
}
@@ -0,0 +1,54 @@
/* Metro module 12996; source: modules/calls/mobile/CallKitManager.android.tsx; dependencies: [6, 7, 15, 17, 18, 4561, 2] */
function _fun99125(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#99125, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13186:6, offset: 0x021bbb3f, size: 218 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(6) /* metro dependency 6 */;
const env0_1 = importDefault(7) /* metro dependency 7 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
let value = importDefault(4561) /* metro dependency 4561: LifecycleManager */;
value = _fun99129(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/mobile/CallKitManager.android.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_99126() { // fn#99126, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13186:148, offset: 0x021bbc19, 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_99126_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun99129(a0) { // fn#99129, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13186:347, offset: 0x021bbc7b, size: 97 bytes, params: 2, frame: 16
const closure = CallKitLifecycleManager;
env0_4(closure, a0);
return env0_1(closure, [{key: '_initialize', value: function() {
}}, {key: '_terminate', value: function() {
}}]);
}
@@ -0,0 +1,62 @@
/* Metro module 8214; source: modules/calls/mobile/useIsCallActive.tsx; dependencies: [4258, 4606, 4299, 566, 2] */
function _fun65769(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#65769, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8399:6, offset: 0x01bddde4, size: 182 bytes, params: 8, frame: 20
let env0_0 = require;
const closure = checkIsCallActive;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const callStore = importDefault(4258) /* metro dependency 4258: CallStore */;
const channelRTCStore = importDefault(4606) /* metro dependency 4606: ChannelRTCStore */;
const env0_4 = (require(4299) /* metro dependency 4299: CallConstants */).ParticipantTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/mobile/useIsCallActive.tsx');
exports.default = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return require(dependencyMap[3]).useStateFromStores([CallStore, ChannelRTCStore], _fun65773, [a0, a1]);
};
exports.checkIsCallActive = closure;
exports.useIsCallActiveNullable = function(a0, a1) {
var env0_0 = a0;
var env0_1 = a1;
return require(dependencyMap[3]).useStateFromStores([CallStore, ChannelRTCStore], _fun65775, [a0, a1]);
};
}
function checkIsCallActive(a0, a1) { // fn#65770, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8399:143, offset: 0x01bdde9a, size: 65 bytes, params: 3, frame: 14
var r0;
var value;
const isCallActive2 = CallStore.isCallActive(a0, a1);
if (isCallActive2) {
value = ChannelRTCStore.getParticipants(a0);
value = value.some(_fun65771);
r0 = value;
} else {
r0 = isCallActive2;
}
return r0;
}
function useIsCallActive(a0, a1) { // fn#65772, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8399:347, offset: 0x01bddf02, size: 94 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([CallStore, ChannelRTCStore], _fun65773,
[a0, a1]);
}
function useIsCallActiveNullable(a0, a1) { // fn#65774, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8399:518, offset: 0x01bddf60, size: 94 bytes, params: 3, frame: 18
const env0_0 = a0;
const env0_1 = a1;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([CallStore, ChannelRTCStore], _fun65775,
[a0, a1]);
}
function _fun65771(a0) { // fn#65771, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8399:230, offset: 0x01bddedb, size: 39 bytes, params: 2, frame: 3
const type = a0.type;
const value = environment.__proto__;
const USER = ParticipantTypes.USER;
return type === USER && !a0.ringing;
}
function _fun65775() { // fn#65775, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8399:597, offset: 0x01bddfbe, size: 41 bytes, params: 1, frame: 14
return env0_0 != null && checkIsCallActive(env0_0, require);
}
File diff suppressed because it is too large. Load diff
@@ -0,0 +1,130 @@
/* Metro module 8421; source: modules/calls/native/VideoBackground.tsx; dependencies: [57, 31, 27, 661, 33, 4501, 22, 8422, 8423, 4000, 697, 1305, 2] */
function _fun66879(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66879, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8606:6, offset: 0x01c0dbfc, size: 414 bytes, params: 8, frame: 26
const env0_0 = require;
const closure = useDominantRGBFromImage;
const closure2 = useDominantColorFromImage;
const closure3 = VideoBackground;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(57) /* metro dependency 57 */;
let value = importAll(31) /* metro dependency 31 */;
let value2 = require(27) /* metro dependency 27 */;
const env0_5 = value2.View;
const env0_6 = value2.NativeModules;
const env0_7 = value2.Image;
const env0_8 = (require(661) /* metro dependency 661: Constants */).NOOP;
const value3 = require(33) /* metro dependency 33 */;
const env0_9 = value3.jsx;
const env0_10 = value3.jsxs;
const env0_11 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({videoBackground: {alignItems: 'center'},
videoDetailsSpacer: {paddingTop: 12}});
const value6 = (importDefault(22) /* metro dependency 22 */).memoize(function(a0) {
var value = a0;
var value2 = null;
return value2 == value || value === '' ? value2 : typeof value === 'number' ? value : {uri: value};
});
const AvatarSizes = (require(1305) /* metro dependency 1305: native */).AvatarSizes;
closure3.AvatarSizes = AvatarSizes;
value = value.memo(closure3);
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/native/VideoBackground.tsx');
exports.default = value;
exports.AvatarSizes = AvatarSizes;
exports.memoizedImageSource = value6;
exports.useDominantRGBFromImage = closure;
exports.useDominantColorFromImage = closure2;
}
function useDominantRGBFromImage(a0, a1) { // fn#66880, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8606:384, offset: 0x01c0dd9a, size: 273 bytes, params: 3, frame: 23
var moduleValue;
const value = a1;
const env0_0 = a0;
const Array = global.Array;
const r7 = Array.isArray(value) ? value[0] : value;
const value2 = undefined;
const value3 = (importDefault(8422) /* metro dependency 8422: useGetIsMounted */)();
const binding = env0_4;
const useState = binding.useState;
let r0 = a0 != null ? (importDefault(8423) /* metro dependency 8423: VideoBackgroundManager */).cachedDominantColors[a0] : value2;
if (r0 == null) {
moduleValue = require(4000) /* metro dependency 4000: ColorUtils */;
r0 = moduleValue.hexToRgb((importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.PRIMARY_800);
}
const value6 = env0_3(Reflect.apply(useState, binding, [r0]), 2);
const property = value6[0];
var env0_3 = value6[1];
env0_4.useEffect(_fun66881, [r7, a0, value3]);
return property;
}
function useDominantColorFromImage(a0, a1) { // fn#66883, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8606:1013, offset: 0x01c0e01f, size: 80 bytes, params: 3, frame: 20
const value = useDominantRGBFromImage(a0, a1);
return 'rgb(' + value.r + ', ' + value.g + ', ' + value.b + ')';
}
function VideoBackground(a0) { // fn#66884, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8606:1124, offset: 0x01c0e06f, size: 331 bytes, params: 2, frame: 26
const style = a0.style;
const url = a0.url;
let isStageCall = a0.isStageCall;
const value = undefined;
isStageCall = !(isStageCall === value) && isStageCall;
const avatarStyle = a0.avatarStyle;
a0.user;
a0.guildId;
const renderVideoDetails = a0.renderVideoDetails;
const object2 = {'style': 0, 'url': 0, 'isStageCall': 0, 'avatarStyle': 0, 'user': 0, 'guildId': 0,
'renderVideoDetails': 0};
const value3 = null;
silentSetPrototypeOf(object2, value3, undefined);
const value4 = copyDataProperties({}, a0, object2, undefined);
const styles = useStyles();
const value6 = env0_12(url);
const value7 = useDominantColorFromImage(url, value6);
if (value3 == value6) {
return value3;
}
const r1 = value3 == renderVideoDetails ? value : renderVideoDetails();
const r6 = value3 != r1 ? r1 : value3;
const items2 = [style];
items2[1] = styles.videoBackground;
items2[2] = {backgroundColor: value7};
items2[3] = value3 != r6 ? styles.videoDetailsSpacer : value3;
const Avatar = (require(1305) /* metro dependency 1305: native */).Avatar;
return (
<View style={items2}>
<Avatar
source={value6}
{...value4}
{...{['avatarStyle']: [avatarStyle, isStageCall ? {backgroundColor: value7} : value3]}}
{...{['isStageCall']: isStageCall}}
/>
{r6}
</View>
);
}
function _fun66881() { // fn#66881, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8606:644, offset: 0x01c0deab, size: 253 bytes, params: 1, frame: 15
var environment;
var value4;
if (require != null && env0_0 != null) {
value4 = environment.__proto__;
if ((importDefault(8423) /* metro dependency 8423: VideoBackgroundManager */).cachedDominantColors[env0_0] == null) {
(typeof require === 'number' ? NativeModules.ImageManager.getDominantColorsLocalAsset(Image.resolveAssetSource(require)) : NativeModules.ImageManager.getDominantColors(Image.resolveAssetSource(require))).then(_fun66882).catch(NOOP);
} else {
env0_3((importDefault(8423) /* metro dependency 8423: VideoBackgroundManager */).cachedDominantColors[env0_0]);
}
}
}
function _fun66882(a0) { // fn#66882, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8606:859, offset: 0x01c0dfa8, size: 119 bytes, params: 2, frame: 16
var value2;
var value3;
var object2;
if (env1_2()) {
value2 = environment.__proto__.__proto__;
value3 = env2_3(a0[0], 3);
object2 = {r: value3[0], g: value3[1], b: value3[2]};
env1_3(object2);
(importDefault(8423) /* metro dependency 8423: VideoBackgroundManager */).cachedDominantColors[env1_0] = object2;
}
}
@@ -0,0 +1,87 @@
/* Metro module 8423; source: modules/calls/native/VideoBackgroundManager.tsx; dependencies: [7, 6, 15, 17, 18, 1934, 4860, 2] */
function _fun66891(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#66891, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8608:6, offset: 0x01c0e2bd, size: 234 bytes, params: 8, frame: 18
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_0 = importDefault(7) /* metro dependency 7 */;
const env0_1 = importDefault(6) /* metro dependency 6 */;
const env0_2 = importDefault(15) /* metro dependency 15 */;
const env0_3 = importDefault(17) /* metro dependency 17 */;
const env0_4 = importDefault(18) /* metro dependency 18 */;
const selectedChannelStore = importDefault(1934) /* metro dependency 1934: SelectedChannelStore */;
let value = importDefault(4860) /* metro dependency 4860: AutomaticLifecycleManager */;
value = _fun66895(value);
value = new value();
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/native/VideoBackgroundManager.tsx');
exports.default = value;
}
function _isNativeReflectConstruct_66892() { // fn#66892, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8608:158, offset: 0x01c0e3a7, 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_66892_isNativeReflectConstruct = function() {
return !!result;
})();
}
function _fun66895(a0) { // fn#66895, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8608:361, offset: 0x01c0e409, size: 42 bytes, params: 2, frame: 14
const closure = VideoBackgroundManager;
env0_4(closure, a0);
return env0_0(closure);
}
function VideoBackgroundManager(a0) { // fn#66896, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8608:373, offset: 0x01c0e433, size: 192 bytes, params: 2, frame: 21
var r0;
var Reflect;
let value = copyRestArgs(0, undefined);
let binding = env1_1;
binding(this, VideoBackgroundManager);
const items = [];
arraySpread(items, value, 0, items);
value = env1_3(VideoBackgroundManager);
binding = env1_2;
if (_isNativeReflectConstruct_66892()) {
Reflect = global.Reflect;
value = Reflect.construct(value, items, env1_3(this).constructor);
r0 = value;
} else {
value = value.apply(this, items);
r0 = value;
}
value = binding(this, r0);
value.previousSelectedVoiceChannelId = SelectedChannelStore.getVoiceChannelId();
value.cachedDominantColors = {};
value._handleSelectVoiceChannel = _handleSelectVoiceChannel;
var _handleSelectVoiceChannel = value._handleSelectVoiceChannel;
value.actions = {VOICE_CHANNEL_SELECT: _handleSelectVoiceChannel};
return value;
}
function _handleSelectVoiceChannel({channelId}) { // fn#66897, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8608:734, owner: VideoBackgroundManager._handleSelectVoiceChannel, offset: 0x01c0e4f3, size: 51 bytes, params: 2, frame: 4
if (env0_0.previousSelectedVoiceChannelId !== channelId) {
env0_0.cachedDominantColors = {};
}
env0_0.previousSelectedVoiceChannelId = channelId;
}
@@ -0,0 +1,76 @@
/* Metro module 7708; source: modules/calls/native/getPrivateChannelCall.tsx; dependencies: [4297, 661, 7709, 8214, 1244, 9228, 2] */
function _fun61566(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#61566, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7886:6, offset: 0x01b4564d, size: 134 bytes, params: 8, frame: 18
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const env0_3 = (require(661) /* metro dependency 661: Constants */).NOOP_NULL;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/native/getPrivateChannelCall.tsx');
exports.default = getPrivateChannelCall;
}
function getPrivateChannelCall(a0) { // fn#61567, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7886:216, offset: 0x01b456d3, size: 621 bytes, params: 2, frame: 23
var r1;
var r3;
var r4;
var r7;
var r9;
var handleJoinCall;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
var string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
let value = a1;
const value2 = a2;
const value3 = a3;
const env0_0 = a0;
const value4 = undefined;
const r8 = value !== value4 ? value : false;
if (value2 !== value4) {
r1 = value2;
} else {
r1 = (require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).handleStartCall;
}
if (value3 === value4) {
handleJoinCall = (require(7709) /* metro dependency 7709: PrivateChannelCallUtils */).handleJoinCall;
}
const isInChannel2 = VoiceStateStore.isInChannel(a0.id);
const useIsCallActiveModule = require(8214) /* metro dependency 8214: useIsCallActive */;
if (a0.isSystemDM()) {
value = null;
r1 = NOOP_NULL;
r3 = value;
r4 = value4;
} else if (isInChannel2) {
r7 = r8 ? null : intl.string(t['4ry6yi']);
r1 = getPrivateChannelCallC;
r3 = r7;
r4 = value4;
} else if (useIsCallActiveModule.checkIsCallActive(a0.id)) {
r9 = r8 ? a0 != null && VoiceStateStore.hasVideo(a0.id) ? intl.string(t.W68MhH) : null : intl.string(t.fdEeb5);
r1 = getPrivateChannelCallC_61569;
r3 = r9;
r4 = value4;
} else {
string = intl.string;
r3 = r8 ? Reflect.apply(string, intl, [t['7AWk50']]) : Reflect.apply(string, intl, [t['EZgS+9']]);
string = intl.string;
r4 = r8 ? Reflect.apply(string, intl, [t.oCqlGG]) : Reflect.apply(string, intl, [t.focH1t]);
r1 = getPrivateChannelCallC_61570;
}
const object2 = {text: r3};
r3 = r4 ?? r3;
object2.accessibilityHint = r3;
object2.inCall = isInChannel2;
object2.onPress = r1;
return object2;
}
function getPrivateChannelCallC() { // fn#61568, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7886:462, owner: getPrivateChannelCall.C, offset: 0x01b45940, size: 45 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (require(9228) /* metro dependency 9228: CallsUtils */).handleDisconnect(env0_0);
}
function getPrivateChannelCallC_61569() { // fn#61569, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:7886:611, owner: getPrivateChannelCall.C, offset: 0x01b4596d, size: 25 bytes, params: 1, frame: 13
return env0_3(env0_0, env0_1);
}
@@ -0,0 +1,92 @@
/* Metro module 10493; source: modules/calls/native/usePrivateChannelCall.tsx; dependencies: [5, 31, 1379, 566, 1244, 7708, 4603, 2] */
function _fun81182(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81182, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10679:6, offset: 0x01e9d445, size: 153 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const channelStore = importDefault(1379) /* metro dependency 1379: ChannelStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/native/usePrivateChannelCall.tsx');
exports.default = usePrivateChannelCall;
}
function usePrivateChannelCall(a0, a1, a2) { // fn#81183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10679:216, offset: 0x01e9d4de, size: 179 bytes, params: 4, frame: 21
var object2;
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a2;
const value2 = (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([ChannelStore], _fun81184,
[a1, a0]);
const text = value2.text;
const accessibilityHint = value2.accessibilityHint;
object2 = {text: text};
object2.inCall = value2.inCall;
object2.accessibilityHint = accessibilityHint;
object2.handlePress = env0_4.useCallback(env0_3(_fun81186), [a0, a1, a2]);
return object2;
}
function _fun81184() { // fn#81184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10679:298, offset: 0x01e9d591, size: 290 bytes, params: 1, frame: 19
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
let value = environment.__proto__;
const getChannel = ChannelStore.getChannel;
const getDMFromUserId = ChannelStore.getDMFromUserId;
const value3 = Reflect.apply(getChannel, ChannelStore, [Reflect.apply(getDMFromUserId, ChannelStore, [env0_0])]);
if (value3 != null) {
if (value3.isPrivate()) {
value = importDefault(7708) /* metro dependency 7708: getPrivateChannelCall */;
value = value(value3, require);
return {text: value.text, accessibilityHint: value.accessibilityHint, inCall: value.inCall};
}
}
const object2 = {};
let string = intl.string;
object2.text = require ? Reflect.apply(string, intl, [t['7AWk50']]) : Reflect.apply(string, intl, [t['EZgS+9']]);
string = intl.string;
object2.accessibilityHint = require ? Reflect.apply(string, intl, [t.oCqlGG]) : Reflect.apply(string, intl,
[t.focH1t]);
object2.inCall = false;
return object2;
}
function* _fun81186() { // fn#81186, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10679:786, offset: 0x01e9d6be, size: 202 bytes, params: 1, frame: 17
var r7;
if (true) {
value = environment.__proto__.__proto__;
var binding = env2_5;
var getChannel = binding.getChannel;
var getDMFromUserId = binding.getDMFromUserId;
var value4 = Reflect.apply(getChannel, binding, [Reflect.apply(getDMFromUserId, binding, [require])]);
if (value4 != null) {
r7 = value4;
if (r7 != null && r7.isPrivate()) {
value = env2_1(env2_2[5]);
value = value(r7, importDefault);
value.onPress();
}
if (dependencyMap != null) {
dependencyMap();
}
} else {
binding = env2_1;
var value5 = binding(env2_2[6]);
yield value5.ensurePrivateChannel(require);
var value6 = undefined;
if (false) {
return value6;
}
binding = env2_5;
r7 = binding.getChannel(value6);
if (r7 != null && r7.isPrivate()) {
value = env2_1(env2_2[5]);
value = value(r7, importDefault);
value.onPress();
}
if (dependencyMap != null) {
dependencyMap();
}
}
}
}
@@ -0,0 +1,30 @@
/* Metro module 14467; source: modules/calls/useCallA11yState.tsx; dependencies: [1226, 4258, 566, 2] */
function _fun109483(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#109483, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14664:6, offset: 0x0234e0dd, size: 130 bytes, params: 8, frame: 19
let env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const callStore = importDefault(4258) /* metro dependency 4258: CallStore */;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/useCallA11yState.tsx');
exports.default = function(a0) {
var env0_0 = a0;
return require(dependencyMap[2]).useStateFromStoresObject([CallStore, AuthenticationStore], _fun109485);
};
}
function useCallA11yState(a0) { // fn#109484, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14664:194, offset: 0x0234e15f, size: 75 bytes, params: 2, frame: 15
const env0_0 = a0;
return (require(566) /* metro dependency 566: flux */).useStateFromStoresObject([CallStore, AuthenticationStore],
_fun109485);
}
function _fun109485() { // fn#109485, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14664:270, offset: 0x0234e1aa, size: 110 bytes, params: 1, frame: 15
const value = environment.__proto__;
const call = CallStore.getCall(env0_0);
const id = AuthenticationStore.getId();
const r2 = call != null && id != null && call.ringing.includes(id);
const object2 = {isIncomingCall: r2};
object2.isOngoingCall = CallStore.isCallActive(env0_0) && !r2;
return object2;
}
+146
View File
@@ -0,0 +1,146 @@
/* Metro module 8917; source: modules/calls/useCanRing.tsx; dependencies: [1226, 4258, 1379, 1945, 4798, 3784, 4396, 3793, 4297, 661, 566, 4619, 4808, 6632, 2] */
function _fun69590(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#69590, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9102:6, offset: 0x01c77aca, size: 320 bytes, params: 8, frame: 20
const env0_0 = require;
const closure = useCanRingToGuildVoiceChannel;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
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 guildMemberStore = importDefault(1945) /* metro dependency 1945: GuildMemberStore */;
const guildVerificationStore = importDefault(4798) /* metro dependency 4798: GuildVerificationStore */;
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const presenceStore = importDefault(4396) /* metro dependency 4396: PresenceStore */;
const relationshipStore = importDefault(3793) /* metro dependency 3793: RelationshipStore */;
const voiceStateStore = importDefault(4297) /* metro dependency 4297: VoiceStateStore */;
const constantsModule = require(661) /* metro dependency 661: Constants */;
const env0_12 = constantsModule.ChannelTypes;
const env0_13 = constantsModule.ChannelTypesSets;
const env0_14 = constantsModule.StatusTypes;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/useCanRing.tsx');
exports.useCanRing = useCanRing;
exports.canRingUsersInChannel = canRingUsersInChannel;
exports.useCanRingToGuildVoiceChannel = closure;
}
function useCanRingToGuildVoiceChannel(a0) { // fn#69591, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9102:250, offset: 0x01c77c0a, size: 288 bytes, params: 2, frame: 22
const value = a1;
const env0_0 = a0;
const value2 = undefined;
const r10 = value !== value2 ? value : 'useCanRingToGuildVoiceChannel';
const env0_1 = a2;
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun69592);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([GuildMemberStore,
GuildVerificationStore], _fun69593);
const needSubscriptionToAccess = (importDefault(6632) /* metro dependency 6632: useChannelRoleSubscriptionStatus */)(a2 == null ? value2 : a2.id).needSubscriptionToAccess;
const defaultImport2 = importDefault(4619) /* metro dependency 4619: GuildVoiceRingingExperiment */;
const useExperiment = defaultImport2.useExperiment;
const enabled = Reflect.apply(useExperiment, defaultImport2, [{guildId: a2 == null ? value2 : a2.guild_id,
location: r10}]).enabled;
const type = a2 == null ? value2 : a2.type;
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
let r0 = enabled && type === GUILD_VOICE && value4;
r0 = r0 && value3 && !needSubscriptionToAccess;
return r0;
}
function useCanRing(a0) { // fn#69594, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9102:839, offset: 0x01c77dc3, size: 323 bytes, params: 2, frame: 24
let value = a1;
const env0_0 = a0;
const value2 = undefined;
const r8 = value !== value2 ? value : 'useCanRing';
const env0_1 = a2;
const channel = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], function() {
return ChannelStore.getChannel(importDefault);
});
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], _fun69596);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], _fun69597);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([PresenceStore], _fun69598);
const type = channel == null ? value2 : channel.type;
const r2 = type != null && ChannelTypesSets.CALLABLE.has(type);
value = useCanRingToGuildVoiceChannel(a0, r8, channel);
let r0 = value4 && !value5 && !value3;
r0 = r0 && !a0.bot && !a0.system;
r0 = r0 && !a0.isProvisional && (value || r2);
return r0;
}
function canRingUsersInChannel(a0) { // fn#69599, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9102:1337, offset: 0x01c77fb0, size: 248 bytes, params: 2, frame: 17
var r0;
var defaultImport;
var getCurrentConfig;
var guild_id;
var enabled;
var getVoiceState;
var value4;
var value;
const CALLABLE = ChannelTypesSets.CALLABLE;
const has = CALLABLE.has;
let type = a0.type;
const value2 = Reflect.apply(has, CALLABLE, [type]);
type = a0.type;
const GUILD_VOICE = ChannelTypes.GUILD_VOICE;
if (value2) {
value4 = CallStore.getCall(a0.id);
r0 = value4 != null && value4.messageId != null;
r0 = r0 && !CallStore.isCallUnavailable(a0.id);
return r0;
}
if (type === GUILD_VOICE) {
defaultImport = importDefault(4619) /* metro dependency 4619: GuildVoiceRingingExperiment */;
getCurrentConfig = defaultImport.getCurrentConfig;
guild_id = a0.guild_id;
enabled = Reflect.apply(getCurrentConfig, defaultImport, [{guildId: guild_id, location: 'ring'}]).enabled;
getVoiceState = VoiceStateStore.getVoiceState;
guild_id = a0.guild_id;
value = Reflect.apply(getVoiceState, VoiceStateStore, [guild_id, AuthenticationStore.getId()]);
r0 = enabled && value != null;
r0 = r0 && value.channelId === a0.id;
return r0;
}
return false;
}
function _fun69592() { // fn#69592, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9102:367, offset: 0x01c77d2a, size: 57 bytes, params: 1, frame: 15
return importDefault != null && (importDefault(4808) /* metro dependency 4808: canJoinVoiceChannel */)(importDefault,
PermissionStore);
}
function _fun69593() { // fn#69593, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9102:433, offset: 0x01c77d63, size: 96 bytes, params: 1, frame: 15
const guild_id = importDefault?.guild_id;
if (guild_id == null) {
return false;
}
const getMember = GuildMemberStore.getMember;
const value = Reflect.apply(getMember, GuildMemberStore, [guild_id, env0_0.id]) != null;
const getCheck = GuildVerificationStore.getCheck;
return value && Reflect.apply(getCheck, GuildVerificationStore, [guild_id]).canChat;
}
function _fun69596() { // fn#69596, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9102:975, offset: 0x01c77f20, size: 35 bytes, params: 1, frame: 9
const value = environment.__proto__;
return AuthenticationStore.getId() === env0_0.id;
}
function _fun69597() { // fn#69597, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9102:1033, offset: 0x01c77f43, size: 32 bytes, params: 1, frame: 11
return RelationshipStore.isFriend(env0_0.id);
}
function _fun69598() { // fn#69598, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:9102:1091, offset: 0x01c77f63, size: 77 bytes, params: 1, frame: 13
var r0;
var channelBinding;
let value = environment.__proto__;
const status = PresenceStore.getStatus(env0_0.id);
const DND = StatusTypes.DND;
value = status === DND;
if (value) {
channelBinding = channel;
value = undefined;
value = (channelBinding == null ? value : channel.guild_id) != null;
r0 = value;
} else {
r0 = value;
}
return r0;
}
@@ -0,0 +1,53 @@
/* Metro module 15466; source: modules/calls/useCanSetVoiceChannelStatus.tsx; dependencies: [3784, 482, 3789, 566, 2] */
function _fun118386(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#118386, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15663:6, offset: 0x024d9ee0, size: 229 bytes, params: 8, frame: 19
const env0_0 = require;
const closure = _canSetVoiceChannelStatus;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const permissionStore = importDefault(3784) /* metro dependency 3784: PermissionStore */;
const Permissions = (require(482) /* metro dependency 482: Constants */).Permissions;
let SET_VOICE_CHANNEL_STATUS = Permissions.SET_VOICE_CHANNEL_STATUS;
items = [SET_VOICE_CHANNEL_STATUS];
const CONNECT = Permissions.CONNECT;
items[1] = CONNECT;
const VIEW_CHANNEL = Permissions.VIEW_CHANNEL;
items[2] = VIEW_CHANNEL;
SET_VOICE_CHANNEL_STATUS = Permissions.SET_VOICE_CHANNEL_STATUS;
items = [SET_VOICE_CHANNEL_STATUS];
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/useCanSetVoiceChannelStatus.tsx');
exports.default = useCanSetVoiceChannelStatus;
exports._canSetVoiceChannelStatus = closure;
exports.canSetVoiceChannelStatus = canSetVoiceChannelStatus;
}
function _canSetVoiceChannelStatus(a0, a1, a2, a3) { // fn#118387, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15663:215, offset: 0x024d9fc5, size: 62 bytes, params: 5, frame: 12
const env0_0 = a0;
const env0_1 = a1;
const env0_2 = a3;
return (a2 ? env0_5 : env0_4).every(_fun118388);
}
function useCanSetVoiceChannelStatus(a0) { // fn#118389, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15663:438, offset: 0x024da066, size: 103 bytes, params: 2, frame: 19
const value = a1;
const env0_0 = a0;
const r6 = value !== undefined ? value : false;
const env0_2 = a2;
return (require(566) /* metro dependency 566: flux */).useStateFromStores([PermissionStore], _fun118390, [a0, r6,
a2]);
}
function canSetVoiceChannelStatus(a0) { // fn#118391, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15663:655, offset: 0x024da0ef, size: 39 bytes, params: 2, frame: 17
const value = a1;
return _canSetVoiceChannelStatus(a0, PermissionStore, value !== undefined ? value : false, a2);
}
function _fun118388(a0) { // fn#118388, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15663:280, offset: 0x024da003, size: 99 bytes, params: 2, frame: 15
return importAll == null ? require.can(a0,
env0_0) : (importAll(3789) /* metro dependency 3789: PermissionUtils */).can({permission: a0, user: importAll,
context: env0_0});
}
function _fun118390() { // fn#118390, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15663:524, offset: 0x024da0cd, size: 34 bytes, params: 1, frame: 17
return _canSetVoiceChannelStatus(env0_0, PermissionStore, env0_1, importDefault);
}
@@ -0,0 +1,39 @@
/* Metro module 15554; source: modules/calls/useHideSelfVideo.tsx; dependencies: [1226, 4259, 661, 4291, 566, 8899, 2] */
function _fun119061(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#119061, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15751:6, offset: 0x024fb4a1, size: 188 bytes, params: 8, frame: 19
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const authenticationStore = importDefault(1226) /* metro dependency 1226: AuthenticationStore */;
const mediaEngineStore = importDefault(4259) /* metro dependency 4259: MediaEngineStore */;
const env0_5 = (require(661) /* metro dependency 661: Constants */).VideoToggleState;
const constantsModule = require(4291) /* metro dependency 4291: Constants */;
const env0_6 = constantsModule.MediaEngineContextTypes;
const env0_7 = constantsModule.Features;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/calls/useHideSelfVideo.tsx');
exports.default = useHideSelfVideo;
}
function useHideSelfVideo(a0) { // fn#119062, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15751:272, offset: 0x024fb55d, size: 223 bytes, params: 2, frame: 23
const value = a1;
const r2 = value !== undefined ? value : MediaEngineContextTypes.DEFAULT;
const id = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore], function() {
return AuthenticationStore.getId();
});
return [(a0 == null || a0 === id) && (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore],
function() {
return MediaEngineStore.supports(Features.DISABLE_VIDEO);
}), (require(566) /* metro dependency 566: flux */).useStateFromStores([MediaEngineStore], _fun119065, [id, r2]),
_fun119066];
}
function _fun119065() { // fn#119065, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15751:469, offset: 0x024fb65a, size: 32 bytes, params: 1, frame: 13
return MediaEngineStore.isLocalVideoDisabled(id, env0_0);
}
function _fun119066(a0) { // fn#119066, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15751:538, offset: 0x024fb67a, size: 75 bytes, params: 2, frame: 16
let value = environment.__proto__;
const r5 = a0 ? VideoToggleState.DISABLED : VideoToggleState.MANUAL_ENABLED;
value = importDefault(8899) /* metro dependency 8899: AudioActionCreators */;
value.setDisableLocalVideo(id, r5, env0_0);
}